diff --git a/.gitignore b/.gitignore index 29a486cd..1eeb0be9 100644 --- a/.gitignore +++ b/.gitignore @@ -46,9 +46,6 @@ generated/* !generated/OpenBIOS_full.c !generated/OpenBIOS_dispatch.c !generated/OpenBIOS.emitter.sha -!generated/SCPH1001_full.c -!generated/SCPH1001_dispatch.c -!generated/SCPH1001.emitter.sha # Release packaging artifacts release-stage/ diff --git a/generated/SCPH1001.emitter.sha b/generated/SCPH1001.emitter.sha deleted file mode 100644 index 98b6e45d..00000000 --- a/generated/SCPH1001.emitter.sha +++ /dev/null @@ -1 +0,0 @@ -ed1556580af634a352beb3ef85e2fef1665e57e612e55e3f0511c1db05c5a845 diff --git a/generated/SCPH1001_dispatch.c b/generated/SCPH1001_dispatch.c deleted file mode 100644 index f420ba67..00000000 --- a/generated/SCPH1001_dispatch.c +++ /dev/null @@ -1,27778 +0,0 @@ -/* AUTO-GENERATED by psxrecomp-bios --emit-full. DO NOT EDIT. - * - * BIOS SHA256: 71af94d1e47a68c11e8fdb9f8368040601514a42a5a399cda48c7d3bff1e99d3 - * Dispatch entries: 13012 - */ - -#define psx_dispatch SCPH1001_psx_dispatch -#define psx_dispatch_call SCPH1001_psx_dispatch_call - -#include "cpu_state.h" -#include "psx_bios_backend.h" -#include "psx_segment_miss.h" -#include -#include -#include - -extern void psx_unknown_dispatch(CPUState* cpu, uint32_t addr, uint32_t phys); -extern void psx_check_interrupts(CPUState* cpu); -extern void psx_check_interrupts_at(CPUState* cpu, uint32_t resume_pc); -extern void psx_restore_state_escape(void); -extern void gte_execute(CPUState* cpu, uint32_t cmd); -extern void gte_write_data(CPUState* cpu, uint8_t reg, uint32_t val); -extern uint32_t gte_read_data(CPUState* cpu, uint8_t reg); -extern uint32_t g_debug_current_func_addr; -extern void debug_server_trace_dispatch(uint32_t func_addr); -/* BIOS HLE tier (CLAUDE.md ยง0 amendment 2026-07-02): null-by-default - * hook consulted at the top of every dispatch iteration, BEFORE any - * backend (game image / dirty-RAM interp / static table) claims the - * target. Installed by the runtime (bios_hle.c) when [runtime] bios_hle - * is on; returns 1 when it fully serviced the target, and the guest - * resumes at $ra exactly as if the kernel routine executed jr $ra. - * NULL (the default) = pure LLE, dispatch identical to a build without - * the tier. */ -extern int (*g_psx_bios_hle_hook)(CPUState* cpu, uint32_t phys); - -extern uint32_t g_psx_mod_guest_functions; -extern int psx_mod_dispatch_guest_function(CPUState*, uint32_t); - -#ifdef PSX_HAS_GAME_DISPATCH -extern int psx_game_address_in_text(uint32_t addr); -#endif - -extern void SCPH1001_func_00000500(CPUState* cpu); -extern void SCPH1001_func_00000510(CPUState* cpu); -extern void SCPH1001_func_00000520(CPUState* cpu); -extern void SCPH1001_func_00000530(CPUState* cpu); -extern void SCPH1001_func_00000540(CPUState* cpu); -extern void SCPH1001_func_00000540_cont_BFC10054(CPUState* cpu); -extern void SCPH1001_func_00000540_cont_BFC10068(CPUState* cpu); -extern void SCPH1001_func_00000540_cont_BFC1007C(CPUState* cpu); -extern void SCPH1001_func_00000540_cont_BFC10090(CPUState* cpu); -extern void SCPH1001_func_00000598(CPUState* cpu); -extern void SCPH1001_func_00000598_cont_BFC100A8(CPUState* cpu); -extern void SCPH1001_func_00000598_cont_BFC100BC(CPUState* cpu); -extern void SCPH1001_func_000005C4(CPUState* cpu); -extern void SCPH1001_func_000005E0(CPUState* cpu); -extern void SCPH1001_func_00000600(CPUState* cpu); -extern void SCPH1001_func_00000620(CPUState* cpu); -extern void SCPH1001_func_00000630(CPUState* cpu); -extern void SCPH1001_func_00000640(CPUState* cpu); -extern void SCPH1001_func_00000650(CPUState* cpu); -extern void SCPH1001_func_0000065C(CPUState* cpu); -extern void SCPH1001_func_00000668(CPUState* cpu); -extern void SCPH1001_func_00000674(CPUState* cpu); -extern void SCPH1001_func_00000C80(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC107B8(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC107C0(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC107CC(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC107E8(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC107EC(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10800(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC108E8(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC108F8(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10908(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10910(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10918(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10920(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10928(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10938(CPUState* cpu); -extern void SCPH1001_func_00000C80_cont_BFC10944(CPUState* cpu); -extern void SCPH1001_func_00000EA0(CPUState* cpu); -extern void SCPH1001_func_00000EB0(CPUState* cpu); -extern void SCPH1001_func_00000EB0_cont_BFC109C8(CPUState* cpu); -extern void SCPH1001_func_00000EB0_cont_BFC109DC(CPUState* cpu); -extern void SCPH1001_func_00000EB0_cont_BFC109F0(CPUState* cpu); -extern void SCPH1001_func_00000EB0_cont_BFC10A04(CPUState* cpu); -extern void SCPH1001_func_00000F20(CPUState* cpu); -extern void SCPH1001_func_00000F2C(CPUState* cpu); -extern void SCPH1001_func_00000F40(CPUState* cpu); -extern void SCPH1001_func_00001030(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B38(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B50(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B5C(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B60(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B64(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B94(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10B9C(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10BA0(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10BA8(CPUState* cpu); -extern void SCPH1001_func_00001030_cont_BFC10BB0(CPUState* cpu); -extern void SCPH1001_func_000010B8(CPUState* cpu); -extern void SCPH1001_func_000010B8_cont_BFC10BD8(CPUState* cpu); -extern void SCPH1001_func_000010E0(CPUState* cpu); -extern void SCPH1001_func_000010E4(CPUState* cpu); -extern void SCPH1001_func_000010E4_cont_BFC10BFC(CPUState* cpu); -extern void SCPH1001_func_000010E4_cont_BFC10C00(CPUState* cpu); -extern void SCPH1001_func_000010E4_cont_BFC10C1C(CPUState* cpu); -extern void SCPH1001_func_000010E4_cont_BFC10C20(CPUState* cpu); -extern void SCPH1001_func_0000113C(CPUState* cpu); -extern void SCPH1001_func_00001174(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10CB0(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10CB8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10CD8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10CE0(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10CE4(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D04(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D0C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D14(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D30(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D48(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D50(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D5C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D70(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D74(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D7C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D98(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10D9C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DB8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DBC(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DC4(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DE8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DF4(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10DFC(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E04(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E0C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E20(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E24(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E2C(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E48(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E50(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E68(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E70(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10E94(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EA0(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EA8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EB0(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EB8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EC8(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EE0(CPUState* cpu); -extern void SCPH1001_func_00001174_cont_BFC10EF0(CPUState* cpu); -extern void SCPH1001_func_00001408(CPUState* cpu); -extern void SCPH1001_func_00001420(CPUState* cpu); -extern void SCPH1001_func_00001444(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F64(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F6C(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F74(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F84(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F94(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10F9C(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FA4(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FB0(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FB8(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FC4(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FC8(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FD4(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FE4(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FEC(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC10FFC(CPUState* cpu); -extern void SCPH1001_func_00001444_cont_BFC11000(CPUState* cpu); -extern void SCPH1001_func_00001508(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC11050(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC11070(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC11080(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC1108C(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC11094(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC1109C(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC110A8(CPUState* cpu); -extern void SCPH1001_func_00001508_cont_BFC110B4(CPUState* cpu); -extern void SCPH1001_func_000015D8(CPUState* cpu); -extern void SCPH1001_func_000015F8(CPUState* cpu); -extern void SCPH1001_func_000015F8_cont_BFC1110C(CPUState* cpu); -extern void SCPH1001_func_00001614(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11140(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC1114C(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11158(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11160(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11168(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11170(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11174(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC1117C(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11188(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC1118C(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11190(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC11198(CPUState* cpu); -extern void SCPH1001_func_00001614_cont_BFC1119C(CPUState* cpu); -extern void SCPH1001_func_000016AC(CPUState* cpu); -extern void SCPH1001_func_000016AC_cont_BFC111BC(CPUState* cpu); -extern void SCPH1001_func_000016C4(CPUState* cpu); -extern void SCPH1001_func_000016E4(CPUState* cpu); -extern void SCPH1001_func_000016E4_cont_BFC11214(CPUState* cpu); -extern void SCPH1001_func_0000171C(CPUState* cpu); -extern void SCPH1001_func_00001728(CPUState* cpu); -extern void SCPH1001_func_0000175C(CPUState* cpu); -extern void SCPH1001_func_0000175C_cont_BFC1126C(CPUState* cpu); -extern void SCPH1001_func_00001774(CPUState* cpu); -extern void SCPH1001_func_00001794(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112B8(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112CC(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112D4(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112D8(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112E0(CPUState* cpu); -extern void SCPH1001_func_00001794_cont_BFC112E4(CPUState* cpu); -extern void SCPH1001_func_000017F4(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC11318(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC1132C(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC11334(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC11338(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC11344(CPUState* cpu); -extern void SCPH1001_func_000017F4_cont_BFC11348(CPUState* cpu); -extern void SCPH1001_func_00001858(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC1137C(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC11390(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC11398(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC1139C(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC113A8(CPUState* cpu); -extern void SCPH1001_func_00001858_cont_BFC113AC(CPUState* cpu); -extern void SCPH1001_func_000018BC(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC113E0(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC113F4(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC113FC(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC11400(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC1140C(CPUState* cpu); -extern void SCPH1001_func_000018BC_cont_BFC11410(CPUState* cpu); -extern void SCPH1001_func_00001920(CPUState* cpu); -extern void SCPH1001_func_00001920_cont_BFC11434(CPUState* cpu); -extern void SCPH1001_func_00001920_cont_BFC11448(CPUState* cpu); -extern void SCPH1001_func_00001958(CPUState* cpu); -extern void SCPH1001_func_00001958_cont_BFC1146C(CPUState* cpu); -extern void SCPH1001_func_00001958_cont_BFC11480(CPUState* cpu); -extern void SCPH1001_func_00001990(CPUState* cpu); -extern void SCPH1001_func_00001990_cont_BFC114A4(CPUState* cpu); -extern void SCPH1001_func_00001990_cont_BFC114B8(CPUState* cpu); -extern void SCPH1001_func_000019C8(CPUState* cpu); -extern void SCPH1001_func_000019C8_cont_BFC114DC(CPUState* cpu); -extern void SCPH1001_func_000019C8_cont_BFC114F0(CPUState* cpu); -extern void SCPH1001_func_00001A00(CPUState* cpu); -extern void SCPH1001_func_00001A24(CPUState* cpu); -extern void SCPH1001_func_00001A2C(CPUState* cpu); -extern void SCPH1001_func_00001A2C_cont_BFC11544(CPUState* cpu); -extern void SCPH1001_func_00001A60(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC11574(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC11580(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC11584(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC11598(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC115AC(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC115C0(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC115D0(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC115D8(CPUState* cpu); -extern void SCPH1001_func_00001A60_cont_BFC115E0(CPUState* cpu); -extern void SCPH1001_func_00001AE8(CPUState* cpu); -extern void SCPH1001_func_00001AE8_cont_BFC115F0(CPUState* cpu); -extern void SCPH1001_func_00001AE8_cont_BFC115F8(CPUState* cpu); -extern void SCPH1001_func_00001AFC(CPUState* cpu); -extern void SCPH1001_func_00001AFC_cont_BFC11608(CPUState* cpu); -extern void SCPH1001_func_00001B10(CPUState* cpu); -extern void SCPH1001_func_00001B20(CPUState* cpu); -extern void SCPH1001_func_00001B20_cont_BFC11634(CPUState* cpu); -extern void SCPH1001_func_00001B44(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116A0(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116B8(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116C8(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116D8(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116E8(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC116F8(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11700(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11708(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11718(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11720(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11730(CPUState* cpu); -extern void SCPH1001_func_00001B44_cont_BFC11740(CPUState* cpu); -extern void SCPH1001_func_00001C5C(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC1179C(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117A4(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117B4(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117C4(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117D4(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117E4(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117E8(CPUState* cpu); -extern void SCPH1001_func_00001C5C_cont_BFC117F8(CPUState* cpu); -extern void SCPH1001_func_00001D00(CPUState* cpu); -extern void SCPH1001_func_00001D40(CPUState* cpu); -extern void SCPH1001_func_00001D40_cont_BFC11850(CPUState* cpu); -extern void SCPH1001_func_00001D70(CPUState* cpu); -extern void SCPH1001_func_00001D70_cont_BFC11880(CPUState* cpu); -extern void SCPH1001_func_00001D8C(CPUState* cpu); -extern void SCPH1001_func_00001D8C_cont_BFC118B4(CPUState* cpu); -extern void SCPH1001_func_00001D8C_cont_BFC118C4(CPUState* cpu); -extern void SCPH1001_func_00001D8C_cont_BFC118CC(CPUState* cpu); -extern void SCPH1001_func_00001D8C_cont_BFC1190C(CPUState* cpu); -extern void SCPH1001_func_00001E1C(CPUState* cpu); -extern void SCPH1001_func_00001E44(CPUState* cpu); -extern void SCPH1001_func_00001E44_cont_BFC11970(CPUState* cpu); -extern void SCPH1001_func_00001E80(CPUState* cpu); -extern void SCPH1001_func_00001E80_cont_BFC11990(CPUState* cpu); -extern void SCPH1001_func_00001E98(CPUState* cpu); -extern void SCPH1001_func_00001E98_cont_BFC119A8(CPUState* cpu); -extern void SCPH1001_func_00001E98_cont_BFC119B8(CPUState* cpu); -extern void SCPH1001_func_00001EC8(CPUState* cpu); -extern void SCPH1001_func_00001EC8_cont_BFC119F4(CPUState* cpu); -extern void SCPH1001_func_00001F04(CPUState* cpu); -extern void SCPH1001_func_00001F10(CPUState* cpu); -extern void SCPH1001_func_00001F10_cont_BFC11A3C(CPUState* cpu); -extern void SCPH1001_func_00001F10_cont_BFC11A44(CPUState* cpu); -extern void SCPH1001_func_00001F4C(CPUState* cpu); -extern void SCPH1001_func_00001F4C_cont_BFC11A78(CPUState* cpu); -extern void SCPH1001_func_00001F4C_cont_BFC11A80(CPUState* cpu); -extern void SCPH1001_func_00001F88(CPUState* cpu); -extern void SCPH1001_func_00001F88_cont_BFC11AC8(CPUState* cpu); -extern void SCPH1001_func_00001F88_cont_BFC11ACC(CPUState* cpu); -extern void SCPH1001_func_00001F88_cont_BFC11ADC(CPUState* cpu); -extern void SCPH1001_func_00001FFC(CPUState* cpu); -extern void SCPH1001_func_00001FFC_cont_BFC11B0C(CPUState* cpu); -extern void SCPH1001_func_00002018(CPUState* cpu); -extern void SCPH1001_func_00002018_cont_BFC11B3C(CPUState* cpu); -extern void SCPH1001_func_00002018_cont_BFC11B50(CPUState* cpu); -extern void SCPH1001_func_00002018_cont_BFC11B58(CPUState* cpu); -extern void SCPH1001_func_00002018_cont_BFC11B98(CPUState* cpu); -extern void SCPH1001_func_000020A8(CPUState* cpu); -extern void SCPH1001_func_000020D4(CPUState* cpu); -extern void SCPH1001_func_000020D4_cont_BFC11C04(CPUState* cpu); -extern void SCPH1001_func_00002114(CPUState* cpu); -extern void SCPH1001_func_00002114_cont_BFC11C1C(CPUState* cpu); -extern void SCPH1001_func_00002124(CPUState* cpu); -extern void SCPH1001_func_00002124_cont_BFC11C2C(CPUState* cpu); -extern void SCPH1001_func_00002124_cont_BFC11C44(CPUState* cpu); -extern void SCPH1001_func_00002150(CPUState* cpu); -extern void SCPH1001_func_00002150_cont_BFC11C58(CPUState* cpu); -extern void SCPH1001_func_00002150_cont_BFC11C60(CPUState* cpu); -extern void SCPH1001_func_00002168(CPUState* cpu); -extern void SCPH1001_func_00002168_cont_BFC11C70(CPUState* cpu); -extern void SCPH1001_func_00002168_cont_BFC11C80(CPUState* cpu); -extern void SCPH1001_func_0000218C(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11CB8(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11CC8(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11CD4(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11CF0(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D00(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D0C(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D28(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D38(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D44(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D60(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D70(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D7C(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11D98(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11DA8(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11DB4(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11DD0(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11DE0(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11DEC(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E08(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E18(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E24(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E40(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E50(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E5C(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E78(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E88(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11E94(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11EB0(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11EC0(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11ECC(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11EE8(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11EF8(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11F04(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11F18(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11F28(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11F34(CPUState* cpu); -extern void SCPH1001_func_0000218C_cont_BFC11F40(CPUState* cpu); -extern void SCPH1001_func_00002458(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11F84(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11F94(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11FA0(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11FBC(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11FCC(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11FD8(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC11FF4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12004(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12010(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1202C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1203C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12048(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12064(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12074(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12080(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1209C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC120AC(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC120B8(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC120D4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC120E4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC120F0(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1210C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1211C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12128(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12144(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12154(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12160(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1217C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1218C(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12198(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC121B4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC121C4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC121D0(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC121E4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC121F4(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC12200(CPUState* cpu); -extern void SCPH1001_func_00002458_cont_BFC1220C(CPUState* cpu); -extern void SCPH1001_func_00002724(CPUState* cpu); -extern void SCPH1001_func_00002724_cont_BFC12258(CPUState* cpu); -extern void SCPH1001_func_00002724_cont_BFC12270(CPUState* cpu); -extern void SCPH1001_func_00002724_cont_BFC1227C(CPUState* cpu); -extern void SCPH1001_func_0000278C(CPUState* cpu); -extern void SCPH1001_func_000027A0(CPUState* cpu); -extern void SCPH1001_func_000027C0(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC12328(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC12330(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC1233C(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC12344(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC12358(CPUState* cpu); -extern void SCPH1001_func_000027C0_cont_BFC12360(CPUState* cpu); -extern void SCPH1001_func_00002870(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC12384(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123A0(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123A8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123B8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123C0(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123C8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123D0(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123D8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123E0(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123E8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123F0(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123F8(CPUState* cpu); -extern void SCPH1001_func_00002870_cont_BFC123FC(CPUState* cpu); -extern void SCPH1001_func_00002908(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC12418(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC12420(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC12430(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC12438(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC12448(CPUState* cpu); -extern void SCPH1001_func_00002908_cont_BFC1244C(CPUState* cpu); -extern void SCPH1001_func_00002958(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC1246C(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC12474(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC12488(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC1249C(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC124AC(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC124C4(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC1250C(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC12518(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC12530(CPUState* cpu); -extern void SCPH1001_func_00002958_cont_BFC12554(CPUState* cpu); -extern void SCPH1001_func_00002A64(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12578(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12588(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12598(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC125AC(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC125B4(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC125C8(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC125D8(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC125F8(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12600(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12608(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12610(CPUState* cpu); -extern void SCPH1001_func_00002A64_cont_BFC12618(CPUState* cpu); -extern void SCPH1001_func_00002B28(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1263C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12644(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12654(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12668(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12670(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1268C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC126A8(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC126B4(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC126B8(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC126E0(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC126FC(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12700(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12708(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12714(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1271C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12738(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1273C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12750(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1275C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC1276C(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12774(CPUState* cpu); -extern void SCPH1001_func_00002B28_cont_BFC12784(CPUState* cpu); -extern void SCPH1001_func_00002C94(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127A8(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127B0(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127C0(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127D4(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127DC(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC127F8(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12814(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12820(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12824(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC1284C(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12868(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC1286C(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12874(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12880(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC12888(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128A4(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128A8(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128BC(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128C8(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128D8(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128E0(CPUState* cpu); -extern void SCPH1001_func_00002C94_cont_BFC128F0(CPUState* cpu); -extern void SCPH1001_func_00002E00(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12918(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12920(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12930(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12944(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12960(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC1296C(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12980(CPUState* cpu); -extern void SCPH1001_func_00002E00_cont_BFC12988(CPUState* cpu); -extern void SCPH1001_func_00002E98(CPUState* cpu); -extern void SCPH1001_func_00002E98_cont_BFC129A8(CPUState* cpu); -extern void SCPH1001_func_00002E98_cont_BFC129B0(CPUState* cpu); -extern void SCPH1001_func_00002E98_cont_BFC129C0(CPUState* cpu); -extern void SCPH1001_func_00002E98_cont_BFC129D4(CPUState* cpu); -extern void SCPH1001_func_00002E98_cont_BFC129DC(CPUState* cpu); -extern void SCPH1001_func_00002EEC(CPUState* cpu); -extern void SCPH1001_func_00002EFC(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A10(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A20(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A30(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A44(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A4C(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A58(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A5C(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A64(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A6C(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A70(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A78(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12A94(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12AA0(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12AB4(CPUState* cpu); -extern void SCPH1001_func_00002EFC_cont_BFC12AB8(CPUState* cpu); -extern void SCPH1001_func_00002FC8(CPUState* cpu); -extern void SCPH1001_func_00002FC8_cont_BFC12AE8(CPUState* cpu); -extern void SCPH1001_func_00002FC8_cont_BFC12AF0(CPUState* cpu); -extern void SCPH1001_func_00003000(CPUState* cpu); -extern void SCPH1001_func_00003000_cont_BFC12B1C(CPUState* cpu); -extern void SCPH1001_func_00003000_cont_BFC12B24(CPUState* cpu); -extern void SCPH1001_func_00003000_cont_BFC12B30(CPUState* cpu); -extern void SCPH1001_func_00003000_cont_BFC12B40(CPUState* cpu); -extern void SCPH1001_func_00003000_cont_BFC12B4C(CPUState* cpu); -extern void SCPH1001_func_00003060(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12B78(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12B88(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12B90(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12BA0(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12BB4(CPUState* cpu); -extern void SCPH1001_func_00003060_cont_BFC12BB8(CPUState* cpu); -extern void SCPH1001_func_000030C8(CPUState* cpu); -extern void SCPH1001_func_000030C8_cont_BFC12BD0(CPUState* cpu); -extern void SCPH1001_func_000030C8_cont_BFC12BD8(CPUState* cpu); -extern void SCPH1001_func_000030E0(CPUState* cpu); -extern void SCPH1001_func_000030E4(CPUState* cpu); -extern void SCPH1001_func_00003108(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12C54(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12C64(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12C6C(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12C74(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12C7C(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CA0(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CA4(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CB8(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CC4(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CCC(CPUState* cpu); -extern void SCPH1001_func_00003108_cont_BFC12CD0(CPUState* cpu); -extern void SCPH1001_func_000031E8(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D10(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D20(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D3C(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D44(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D50(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D68(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D70(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D74(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12D8C(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12DBC(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12DDC(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12DFC(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E04(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E24(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E2C(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E30(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E58(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E5C(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E6C(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E74(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E80(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E88(CPUState* cpu); -extern void SCPH1001_func_000031E8_cont_BFC12E8C(CPUState* cpu); -extern void SCPH1001_func_000033A4(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12EBC(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12EC8(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12EE4(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12EF4(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12F3C(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12F50(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12F58(CPUState* cpu); -extern void SCPH1001_func_000033A4_cont_BFC12F5C(CPUState* cpu); -extern void SCPH1001_func_0000346C(CPUState* cpu); -extern void SCPH1001_func_0000346C_cont_BFC12F7C(CPUState* cpu); -extern void SCPH1001_func_0000346C_cont_BFC12F8C(CPUState* cpu); -extern void SCPH1001_func_0000346C_cont_BFC12FA8(CPUState* cpu); -extern void SCPH1001_func_000034B4(CPUState* cpu); -extern void SCPH1001_func_000034B4_cont_BFC12FD4(CPUState* cpu); -extern void SCPH1001_func_000034B4_cont_BFC12FE4(CPUState* cpu); -extern void SCPH1001_func_000034B4_cont_BFC12FF4(CPUState* cpu); -extern void SCPH1001_func_000034B4_cont_BFC13014(CPUState* cpu); -extern void SCPH1001_func_000034B4_cont_BFC1301C(CPUState* cpu); -extern void SCPH1001_func_0000352C(CPUState* cpu); -extern void SCPH1001_func_0000352C_cont_BFC13044(CPUState* cpu); -extern void SCPH1001_func_0000352C_cont_BFC1304C(CPUState* cpu); -extern void SCPH1001_func_0000352C_cont_BFC13050(CPUState* cpu); -extern void SCPH1001_func_0000352C_cont_BFC13060(CPUState* cpu); -extern void SCPH1001_func_0000352C_cont_BFC13068(CPUState* cpu); -extern void SCPH1001_func_00003570(CPUState* cpu); -extern void SCPH1001_func_00003570_cont_BFC13088(CPUState* cpu); -extern void SCPH1001_func_000035A4(CPUState* cpu); -extern void SCPH1001_func_000035AC(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC130BC(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC130C4(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC130D8(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC130EC(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC130FC(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC13114(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC13144(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC13150(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC13164(CPUState* cpu); -extern void SCPH1001_func_000035AC_cont_BFC13168(CPUState* cpu); -extern void SCPH1001_func_00003678(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC13188(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC13190(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC131A4(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC131B8(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC131C8(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC131E0(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC13210(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC1321C(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC13230(CPUState* cpu); -extern void SCPH1001_func_00003678_cont_BFC13234(CPUState* cpu); -extern void SCPH1001_func_00003744(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC13254(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC1325C(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC13270(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC13284(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC13294(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC132AC(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC132DC(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC132E8(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC132FC(CPUState* cpu); -extern void SCPH1001_func_00003744_cont_BFC13300(CPUState* cpu); -extern void SCPH1001_func_00003810(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC13320(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC13328(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC1333C(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC13350(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC13360(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC13374(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC133A4(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC133B0(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC133C4(CPUState* cpu); -extern void SCPH1001_func_00003810_cont_BFC133C8(CPUState* cpu); -extern void SCPH1001_func_000038D8(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC133E8(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC133F0(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13404(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13418(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13428(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13440(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13444(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13470(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC1347C(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13490(CPUState* cpu); -extern void SCPH1001_func_000038D8_cont_BFC13494(CPUState* cpu); -extern void SCPH1001_func_000039A4(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC134C0(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC134C8(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC134D8(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC134EC(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC134FC(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC13508(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC13528(CPUState* cpu); -extern void SCPH1001_func_000039A4_cont_BFC13560(CPUState* cpu); -extern void SCPH1001_func_00003A70(CPUState* cpu); -extern void SCPH1001_func_00003A70_cont_BFC1359C(CPUState* cpu); -extern void SCPH1001_func_00003AAC(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC135C4(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC135CC(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC135E0(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC135E8(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC135F0(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13608(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1361C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1362C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1363C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13654(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1366C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1367C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13688(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13698(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1369C(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC136E0(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC136F4(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13708(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC13710(CPUState* cpu); -extern void SCPH1001_func_00003AAC_cont_BFC1371C(CPUState* cpu); -extern void SCPH1001_func_00003C2C(CPUState* cpu); -extern void SCPH1001_func_00003C6C(CPUState* cpu); -extern void SCPH1001_func_00003C6C_cont_BFC1377C(CPUState* cpu); -extern void SCPH1001_func_00003C6C_cont_BFC13790(CPUState* cpu); -extern void SCPH1001_func_00003C6C_cont_BFC1379C(CPUState* cpu); -extern void SCPH1001_func_00003CB4(CPUState* cpu); -extern void SCPH1001_func_00003CBC(CPUState* cpu); -extern void SCPH1001_func_00003CBC_cont_BFC137CC(CPUState* cpu); -extern void SCPH1001_func_00003CD0(CPUState* cpu); -extern void SCPH1001_func_00003CE0(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC1382C(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC1383C(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC13844(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC1384C(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC1385C(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC13868(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC13890(CPUState* cpu); -extern void SCPH1001_func_00003CE0_cont_BFC13894(CPUState* cpu); -extern void SCPH1001_func_00003DAC(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC138EC(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC138F8(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC13908(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC13914(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC13934(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC13944(CPUState* cpu); -extern void SCPH1001_func_00003DAC_cont_BFC1394C(CPUState* cpu); -extern void SCPH1001_func_00003E5C(CPUState* cpu); -extern void SCPH1001_func_00003E68(CPUState* cpu); -extern void SCPH1001_func_00003E80(CPUState* cpu); -extern void SCPH1001_func_00003E80_cont_BFC139A8(CPUState* cpu); -extern void SCPH1001_func_00003E80_cont_BFC139BC(CPUState* cpu); -extern void SCPH1001_func_00003E80_cont_BFC139DC(CPUState* cpu); -extern void SCPH1001_func_00003E80_cont_BFC139EC(CPUState* cpu); -extern void SCPH1001_func_00003F04(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A1C(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A30(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A40(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A4C(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A5C(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A68(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A6C(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A78(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13A8C(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AA0(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AA4(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AAC(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AC0(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AD4(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AE0(CPUState* cpu); -extern void SCPH1001_func_00003F04_cont_BFC13AE4(CPUState* cpu); -extern void SCPH1001_func_00003FF0(CPUState* cpu); -extern void SCPH1001_func_00003FF0_cont_BFC13B08(CPUState* cpu); -extern void SCPH1001_func_00004024(CPUState* cpu); -extern void SCPH1001_func_00004024_cont_BFC13B38(CPUState* cpu); -extern void SCPH1001_func_00004024_cont_BFC13B40(CPUState* cpu); -extern void SCPH1001_func_00004024_cont_BFC13B48(CPUState* cpu); -extern void SCPH1001_func_00004024_cont_BFC13B4C(CPUState* cpu); -extern void SCPH1001_func_00004024_cont_BFC13B5C(CPUState* cpu); -extern void SCPH1001_func_0000406C(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13B84(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13B90(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13B98(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BA4(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BAC(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BC4(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BCC(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BD0(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BD8(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BE0(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13BE4(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13C00(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13C14(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13C18(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13C24(CPUState* cpu); -extern void SCPH1001_func_0000406C_cont_BFC13C28(CPUState* cpu); -extern void SCPH1001_func_00004134(CPUState* cpu); -extern void SCPH1001_func_00004134_cont_BFC13C54(CPUState* cpu); -extern void SCPH1001_func_00004164(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CB0(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CB8(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CCC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CD4(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CDC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CE4(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CEC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CF4(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13CFC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D04(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D14(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D20(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D28(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D30(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D38(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D40(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D4C(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D50(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D58(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D64(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D6C(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D74(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D7C(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13D84(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DA0(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DB0(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DBC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DC4(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DCC(CPUState* cpu); -extern void SCPH1001_func_00004164_cont_BFC13DD4(CPUState* cpu); -extern void SCPH1001_func_00004304(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E1C(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E24(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E34(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E3C(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E4C(CPUState* cpu); -extern void SCPH1001_func_00004304_cont_BFC13E50(CPUState* cpu); -extern void SCPH1001_func_00004360(CPUState* cpu); -extern void SCPH1001_func_00004360_cont_BFC13E78(CPUState* cpu); -extern void SCPH1001_func_000043D0(CPUState* cpu); -extern void SCPH1001_func_000043E8(CPUState* cpu); -extern void SCPH1001_func_000043E8_cont_BFC13F20(CPUState* cpu); -extern void SCPH1001_func_000043E8_cont_BFC13F30(CPUState* cpu); -extern void SCPH1001_func_000043E8_cont_BFC13F40(CPUState* cpu); -extern void SCPH1001_func_0000445C(CPUState* cpu); -extern void SCPH1001_func_0000445C_cont_BFC13F78(CPUState* cpu); -extern void SCPH1001_func_0000445C_cont_BFC13F90(CPUState* cpu); -extern void SCPH1001_func_00004498(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC13FE0(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC13FE8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC13FEC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14024(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1402C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14030(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14048(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1406C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14080(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14084(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14090(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC140C4(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC140D8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC140E4(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC140F8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC140FC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14114(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14128(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1412C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14138(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14164(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14178(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141A4(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141A8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141BC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141C0(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141D8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141EC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC141FC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14228(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1423C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14254(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1425C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14270(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14274(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1428C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC142A0(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC142B4(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC142B8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC142C8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC142F4(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14308(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1431C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14330(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1433C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14350(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14378(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC1437C(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14394(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC143A8(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC143BC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC143C0(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC143D0(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC143FC(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14410(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14434(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14438(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14450(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14454(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14490(CPUState* cpu); -extern void SCPH1001_func_00004498_cont_BFC14498(CPUState* cpu); -extern void SCPH1001_func_000049BC(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC144D0(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC144D8(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC144E0(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC144F4(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC144FC(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC14510(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC14520(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC14534(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC1453C(CPUState* cpu); -extern void SCPH1001_func_000049BC_cont_BFC14540(CPUState* cpu); -extern void SCPH1001_func_00004A4C(CPUState* cpu); -extern void SCPH1001_func_00004A4C_cont_BFC1456C(CPUState* cpu); -extern void SCPH1001_func_00004A4C_cont_BFC14580(CPUState* cpu); -extern void SCPH1001_func_00004A88(CPUState* cpu); -extern void SCPH1001_func_00004A88_cont_BFC1458C(CPUState* cpu); -extern void SCPH1001_func_00004A94(CPUState* cpu); -extern void SCPH1001_func_00004AC8(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC145F4(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14600(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14614(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14640(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14650(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14658(CPUState* cpu); -extern void SCPH1001_func_00004AC8_cont_BFC14660(CPUState* cpu); -extern void SCPH1001_func_00004B70(CPUState* cpu); -extern void SCPH1001_func_00004B90(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146A0(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146A8(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146B8(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146C8(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146EC(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC146F8(CPUState* cpu); -extern void SCPH1001_func_00004B90_cont_BFC14700(CPUState* cpu); -extern void SCPH1001_func_00004C10(CPUState* cpu); -extern void SCPH1001_func_00004C10_cont_BFC14720(CPUState* cpu); -extern void SCPH1001_func_00004C10_cont_BFC1472C(CPUState* cpu); -extern void SCPH1001_func_00004C10_cont_BFC1473C(CPUState* cpu); -extern void SCPH1001_func_00004C10_cont_BFC14744(CPUState* cpu); -extern void SCPH1001_func_00004C54(CPUState* cpu); -extern void SCPH1001_func_00004C64(CPUState* cpu); -extern void SCPH1001_func_00004C70(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC14780(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC14788(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC14798(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC147A8(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC147C8(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC147D4(CPUState* cpu); -extern void SCPH1001_func_00004C70_cont_BFC147E4(CPUState* cpu); -extern void SCPH1001_func_00004CF4(CPUState* cpu); -extern void SCPH1001_func_00004CF4_cont_BFC14804(CPUState* cpu); -extern void SCPH1001_func_00004CF4_cont_BFC14810(CPUState* cpu); -extern void SCPH1001_func_00004CF4_cont_BFC14820(CPUState* cpu); -extern void SCPH1001_func_00004CF4_cont_BFC1482C(CPUState* cpu); -extern void SCPH1001_func_00004D3C(CPUState* cpu); -extern void SCPH1001_func_00004D4C(CPUState* cpu); -extern void SCPH1001_func_00004D64(CPUState* cpu); -extern void SCPH1001_func_00004D6C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14880(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14888(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC1488C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC148AC(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC148DC(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC148E4(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC148F0(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC148F8(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14900(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14908(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14910(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14934(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC1495C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC1498C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC1499C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC149BC(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC149E0(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14A0C(CPUState* cpu); -extern void SCPH1001_func_00004D6C_cont_BFC14A3C(CPUState* cpu); -extern void SCPH1001_func_00004F54(CPUState* cpu); -extern void SCPH1001_func_00004F54_cont_BFC14A6C(CPUState* cpu); -extern void SCPH1001_func_00004F54_cont_BFC14A7C(CPUState* cpu); -extern void SCPH1001_func_00004F54_cont_BFC14A80(CPUState* cpu); -extern void SCPH1001_func_00004F90(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AB4(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AC8(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AD0(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AD8(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AE4(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AEC(CPUState* cpu); -extern void SCPH1001_func_00004F90_cont_BFC14AF0(CPUState* cpu); -extern void SCPH1001_func_00005000(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B18(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B28(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B38(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B48(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B58(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14B6C(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14BE0(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14BF0(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14C00(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14C28(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14C68(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14C70(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14CB0(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14CC0(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14CD0(CPUState* cpu); -extern void SCPH1001_func_00005000_cont_BFC14CE4(CPUState* cpu); -extern void SCPH1001_func_000051F4(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14D28(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14D44(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14D4C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14D54(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14D58(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14DC4(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14DF8(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14E40(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14E4C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14E74(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14E84(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14E98(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14ECC(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14ED4(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14F10(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14F18(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14F2C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14F80(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14F88(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14FCC(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC14FFC(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15030(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15038(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1506C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15074(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15088(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1509C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC150B0(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC150D0(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15104(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15118(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15128(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1512C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15134(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1513C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15144(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1514C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15154(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1515C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15164(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC1516C(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15174(CPUState* cpu); -extern void SCPH1001_func_000051F4_cont_BFC15178(CPUState* cpu); -extern void SCPH1001_func_00005688(CPUState* cpu); -extern void SCPH1001_func_00005688_cont_BFC151CC(CPUState* cpu); -extern void SCPH1001_func_000056E8(CPUState* cpu); -extern void SCPH1001_func_000056E8_cont_BFC151F0(CPUState* cpu); -extern void SCPH1001_func_000056E8_cont_BFC151F8(CPUState* cpu); -extern void SCPH1001_func_000056E8_cont_BFC151FC(CPUState* cpu); -extern void SCPH1001_func_00005768(CPUState* cpu); -extern void SCPH1001_func_0000579C(CPUState* cpu); -extern void SCPH1001_func_0000579C_cont_BFC152DC(CPUState* cpu); -extern void SCPH1001_func_0000579C_cont_BFC152E8(CPUState* cpu); -extern void SCPH1001_func_0000579C_cont_BFC15310(CPUState* cpu); -extern void SCPH1001_func_0000579C_cont_BFC15320(CPUState* cpu); -extern void SCPH1001_func_00005834(CPUState* cpu); -extern void SCPH1001_func_00005834_cont_BFC15368(CPUState* cpu); -extern void SCPH1001_func_00005870(CPUState* cpu); -extern void SCPH1001_func_00005870_cont_BFC153AC(CPUState* cpu); -extern void SCPH1001_func_000058B4(CPUState* cpu); -extern void SCPH1001_func_000058E8(CPUState* cpu); -extern void SCPH1001_func_00005918(CPUState* cpu); -extern void SCPH1001_func_00005918_cont_BFC1544C(CPUState* cpu); -extern void SCPH1001_func_00005954(CPUState* cpu); -extern void SCPH1001_func_00005954_cont_BFC15488(CPUState* cpu); -extern void SCPH1001_func_00005990(CPUState* cpu); -extern void SCPH1001_func_00005990_cont_BFC154C8(CPUState* cpu); -extern void SCPH1001_func_000059CC(CPUState* cpu); -extern void SCPH1001_func_000059CC_cont_BFC154D0(CPUState* cpu); -extern void SCPH1001_func_00005A00(CPUState* cpu); -extern void SCPH1001_func_00005A08(CPUState* cpu); -extern void SCPH1001_func_00005A08_cont_BFC15540(CPUState* cpu); -extern void SCPH1001_func_00005A44(CPUState* cpu); -extern void SCPH1001_func_00005A44_cont_BFC15548(CPUState* cpu); -extern void SCPH1001_func_00005A44_cont_BFC15550(CPUState* cpu); -extern void SCPH1001_func_00005A58(CPUState* cpu); -extern void SCPH1001_func_00005A80(CPUState* cpu); -extern void SCPH1001_func_00005AB0(CPUState* cpu); -extern void SCPH1001_func_00005ABC(CPUState* cpu); -extern void SCPH1001_func_00005AF8(CPUState* cpu); -extern void SCPH1001_func_00005AF8_cont_BFC15600(CPUState* cpu); -extern void SCPH1001_func_00005AF8_cont_BFC15614(CPUState* cpu); -extern void SCPH1001_func_00005AF8_cont_BFC15628(CPUState* cpu); -extern void SCPH1001_func_00005B34(CPUState* cpu); -extern void SCPH1001_func_00005B34_cont_BFC15638(CPUState* cpu); -extern void SCPH1001_func_00005B34_cont_BFC15640(CPUState* cpu); -extern void SCPH1001_func_00005B34_cont_BFC15648(CPUState* cpu); -extern void SCPH1001_func_00005B50(CPUState* cpu); -extern void SCPH1001_func_00005B54(CPUState* cpu); -extern void SCPH1001_func_00005B64(CPUState* cpu); -extern void SCPH1001_func_00005B64_cont_BFC15688(CPUState* cpu); -extern void SCPH1001_func_00005BA4(CPUState* cpu); -extern void SCPH1001_func_00005BA4_cont_BFC156AC(CPUState* cpu); -extern void SCPH1001_func_00005BA4_cont_BFC156B4(CPUState* cpu); -extern void SCPH1001_func_00005BA4_cont_BFC156B8(CPUState* cpu); -extern void SCPH1001_func_00005C24(CPUState* cpu); -extern void SCPH1001_func_00005C58(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC15798(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC157A4(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC157CC(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC157DC(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC157F0(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC157FC(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC15824(CPUState* cpu); -extern void SCPH1001_func_00005C58_cont_BFC15834(CPUState* cpu); -extern void SCPH1001_func_00005D48(CPUState* cpu); -extern void SCPH1001_func_00005D48_cont_BFC1587C(CPUState* cpu); -extern void SCPH1001_func_00005D48_cont_BFC15884(CPUState* cpu); -extern void SCPH1001_func_00005D48_cont_BFC1588C(CPUState* cpu); -extern void SCPH1001_func_00005D94(CPUState* cpu); -extern void SCPH1001_func_00005D98(CPUState* cpu); -extern void SCPH1001_func_00005DA8(CPUState* cpu); -extern void SCPH1001_func_00005DA8_cont_BFC158B8(CPUState* cpu); -extern void SCPH1001_func_00005DD0(CPUState* cpu); -extern void SCPH1001_func_00005DD8(CPUState* cpu); -extern void SCPH1001_func_00005DD8_cont_BFC15910(CPUState* cpu); -extern void SCPH1001_func_00005DD8_cont_BFC15918(CPUState* cpu); -extern void SCPH1001_func_00005E30(CPUState* cpu); -extern void SCPH1001_func_00005E50(CPUState* cpu); -extern void SCPH1001_func_00005E50_cont_BFC15960(CPUState* cpu); -extern void SCPH1001_func_00005E50_cont_BFC15964(CPUState* cpu); -extern void SCPH1001_func_00005E50_cont_BFC15980(CPUState* cpu); -extern void SCPH1001_func_00005E50_cont_BFC15988(CPUState* cpu); -extern void SCPH1001_func_00005E50_cont_BFC15990(CPUState* cpu); -extern void SCPH1001_func_00005E98(CPUState* cpu); -extern void SCPH1001_func_00005EF4(CPUState* cpu); -extern void SCPH1001_func_00005F04(CPUState* cpu); -extern void SCPH1001_func_00005F04_cont_BFC15A14(CPUState* cpu); -extern void SCPH1001_func_00005F04_cont_BFC15A18(CPUState* cpu); -extern void SCPH1001_func_00005F04_cont_BFC15A34(CPUState* cpu); -extern void SCPH1001_func_00005F04_cont_BFC15A3C(CPUState* cpu); -extern void SCPH1001_func_00005F04_cont_BFC15A44(CPUState* cpu); -extern void SCPH1001_func_00005F4C(CPUState* cpu); -extern void SCPH1001_func_00005FA8(CPUState* cpu); -extern void SCPH1001_func_00005FB8(CPUState* cpu); -extern void SCPH1001_func_00005FB8_cont_BFC15AC8(CPUState* cpu); -extern void SCPH1001_func_00005FB8_cont_BFC15ACC(CPUState* cpu); -extern void SCPH1001_func_00005FB8_cont_BFC15AE8(CPUState* cpu); -extern void SCPH1001_func_00005FF0(CPUState* cpu); -extern void SCPH1001_func_0000605C(CPUState* cpu); -extern void SCPH1001_func_00006070(CPUState* cpu); -extern void SCPH1001_func_00006070_cont_BFC15B7C(CPUState* cpu); -extern void SCPH1001_func_00006070_cont_BFC15B90(CPUState* cpu); -extern void SCPH1001_func_0000609C(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BBC(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BC8(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BD0(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BDC(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BE8(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15BF4(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15C44(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15C70(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15C8C(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15C9C(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15CA4(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15CB0(CPUState* cpu); -extern void SCPH1001_func_0000609C_cont_BFC15CB4(CPUState* cpu); -extern void SCPH1001_func_000061C4(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15CE8(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15CF0(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D04(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D0C(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D10(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D18(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D4C(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D70(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D80(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15D98(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15DA8(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15DBC(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15DD0(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15DD8(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15E0C(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15E30(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15E40(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15E58(CPUState* cpu); -extern void SCPH1001_func_000061C4_cont_BFC15E68(CPUState* cpu); -extern void SCPH1001_func_00006380(CPUState* cpu); -extern void SCPH1001_func_00006390(CPUState* cpu); -extern void SCPH1001_func_000063BC(CPUState* cpu); -extern void SCPH1001_func_000063BC_cont_BFC15EDC(CPUState* cpu); -extern void SCPH1001_func_000063BC_cont_BFC15EF0(CPUState* cpu); -extern void SCPH1001_func_000063F8(CPUState* cpu); -extern void SCPH1001_func_00006408(CPUState* cpu); -extern void SCPH1001_func_00006408_cont_BFC15F18(CPUState* cpu); -extern void SCPH1001_func_0000641C(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC15F30(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC15F58(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC15F74(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC15FE8(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC15FEC(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC1600C(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC16014(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC16088(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC1608C(CPUState* cpu); -extern void SCPH1001_func_0000641C_cont_BFC16094(CPUState* cpu); -extern void SCPH1001_func_0000659C(CPUState* cpu); -extern void SCPH1001_func_00006670(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1618C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161A8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161C4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161D8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161E0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161E8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161EC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161F4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC161FC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16204(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16208(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16210(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16218(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16220(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16224(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1622C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16234(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1623C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16240(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16248(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16250(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16258(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1625C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16264(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1626C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16274(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16278(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16280(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1628C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16290(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162B8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162CC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162D4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162DC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162E0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162E8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162F0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162F8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC162FC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16304(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1630C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16314(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16318(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16320(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1632C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16330(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16338(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16344(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16348(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16370(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16384(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1638C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16394(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16398(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163A0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163A8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163B0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163B4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163BC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163C4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163CC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163D0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163D8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163E4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163E8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163F0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC163FC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16400(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16428(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1643C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16444(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1644C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16450(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16458(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16460(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16468(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1646C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16474(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1647C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16484(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16488(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16490(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC1649C(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164A0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164A8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164B4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164B8(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164E0(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164F4(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC164FC(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16500(CPUState* cpu); -extern void SCPH1001_func_00006670_cont_BFC16538(CPUState* cpu); -extern void SCPH1001_func_00006A70(CPUState* cpu); -extern void SCPH1001_func_00006A80(CPUState* cpu); -extern void SCPH1001_func_00006A90(CPUState* cpu); -extern void SCPH1001_func_00006AA0(CPUState* cpu); -extern void SCPH1001_func_00006AB0(CPUState* cpu); -extern void SCPH1001_func_00006AC0(CPUState* cpu); -extern void SCPH1001_func_00006AD0(CPUState* cpu); -extern void SCPH1001_func_00006AE0(CPUState* cpu); -extern void SCPH1001_func_00006AF0(CPUState* cpu); -extern void SCPH1001_func_00006B00(CPUState* cpu); -extern void SCPH1001_func_00006B10(CPUState* cpu); -extern void SCPH1001_func_00006B20(CPUState* cpu); -extern void SCPH1001_func_00006B30(CPUState* cpu); -extern void SCPH1001_func_00006B40(CPUState* cpu); -extern void SCPH1001_func_00006B50(CPUState* cpu); -extern void SCPH1001_func_00006B60(CPUState* cpu); -extern void SCPH1001_func_00006B70(CPUState* cpu); -extern void SCPH1001_func_00006B80(CPUState* cpu); -extern void SCPH1001_func_00006B90(CPUState* cpu); -extern void SCPH1001_func_00006BA0(CPUState* cpu); -extern void SCPH1001_func_00006BB0(CPUState* cpu); -extern void SCPH1001_func_00006BC0(CPUState* cpu); -extern void SCPH1001_func_00006BD0(CPUState* cpu); -extern void SCPH1001_func_00006BE0(CPUState* cpu); -extern void SCPH1001_func_00006BF0(CPUState* cpu); -extern void SCPH1001_func_00006C00(CPUState* cpu); -extern void SCPH1001_func_00006C10(CPUState* cpu); -extern void SCPH1001_func_00006C20(CPUState* cpu); -extern void SCPH1001_func_1FC00000(CPUState* cpu); -extern void SCPH1001_func_1FC00000_cont_BFC00150(CPUState* cpu); -extern void SCPH1001_func_1FC00180(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC00250(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC00278(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC002A0(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC00328(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC003B8(CPUState* cpu); -extern void SCPH1001_func_1FC00180_cont_BFC003CC(CPUState* cpu); -extern void SCPH1001_func_1FC00420(CPUState* cpu); -extern void SCPH1001_func_1FC00420_cont_BFC00434(CPUState* cpu); -extern void SCPH1001_func_1FC00420_cont_BFC0044C(CPUState* cpu); -extern void SCPH1001_func_1FC00678(CPUState* cpu); -extern void SCPH1001_func_1FC00678_cont_BFC00688(CPUState* cpu); -extern void SCPH1001_func_1FC00678_cont_BFC00698(CPUState* cpu); -extern void SCPH1001_func_1FC006A8(CPUState* cpu); -extern void SCPH1001_func_1FC006A8_cont_BFC006B8(CPUState* cpu); -extern void SCPH1001_func_1FC006A8_cont_BFC006C8(CPUState* cpu); -extern void SCPH1001_func_1FC006D8(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC006F4(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC006FC(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC00708(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC00714(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC0071C(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC00728(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC00730(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC0073C(CPUState* cpu); -extern void SCPH1001_func_1FC006D8_cont_BFC00768(CPUState* cpu); -extern void SCPH1001_func_1FC00778(CPUState* cpu); -extern void SCPH1001_func_1FC00778_cont_BFC007A0(CPUState* cpu); -extern void SCPH1001_func_1FC00778_cont_BFC007C0(CPUState* cpu); -extern void SCPH1001_func_1FC00778_cont_BFC007E0(CPUState* cpu); -extern void SCPH1001_func_1FC00778_cont_BFC00800(CPUState* cpu); -extern void SCPH1001_func_1FC00810(CPUState* cpu); -extern void SCPH1001_func_1FC00810_cont_BFC00890(CPUState* cpu); -extern void SCPH1001_func_1FC008A0(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC008BC(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC008CC(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC008EC(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC00904(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC0091C(CPUState* cpu); -extern void SCPH1001_func_1FC008A0_cont_BFC00934(CPUState* cpu); -extern void SCPH1001_func_1FC00944(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00970(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00978(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00980(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00990(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00998(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009A0(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009A4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009B4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009BC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009CC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009DC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009E4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009F4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC009FC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A04(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A30(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A38(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A40(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A64(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A6C(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A74(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00A7C(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AA4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AAC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AB4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00ADC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AE0(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AE8(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AEC(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00AF4(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B04(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B0C(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B20(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B48(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B64(CPUState* cpu); -extern void SCPH1001_func_1FC00944_cont_BFC00B68(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00BAC(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00BBC(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00BC4(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00BD0(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00BD8(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C04(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C0C(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C14(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C38(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C40(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C48(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C50(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C74(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C7C(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00C84(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00CA8(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00CB0(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00CC0(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00CE4(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D04(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D14(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D28(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D38(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D48(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D50(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D60(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D68(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D78(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D88(CPUState* cpu); -extern void SCPH1001_func_1FC00B7C_cont_BFC00D8C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00DB8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00DC0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E1C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E2C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E58(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E5C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E64(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E6C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E90(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00E94(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EA8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EB8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EC0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EC8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00ED0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EE0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EE4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EEC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00EF4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F04(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F10(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F14(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F1C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F34(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F38(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F58(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F70(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F74(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F7C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F84(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F8C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F94(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F98(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00F9C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FBC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FD4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FE0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FE8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FF0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC00FF8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01014(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01018(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01028(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01034(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01040(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0104C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01054(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01058(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01060(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0106C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01078(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0108C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01090(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01098(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010AC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010B0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010C0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010C8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010D8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010E4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010F0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC010FC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01104(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0110C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01124(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01134(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0113C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01144(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01154(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0117C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0118C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01194(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0119C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011A4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011CC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011D0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011E4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011F0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC011FC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01208(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01210(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01218(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01228(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01238(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01244(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01250(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0125C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01264(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01268(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01274(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0127C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01280(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01288(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01290(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01298(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012A0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012A8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012CC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012D0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012D8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012E8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC012F4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01304(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01310(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01314(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01318(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01328(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01338(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01344(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01354(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0136C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01374(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01378(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01380(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0138C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01394(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC013A8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC013B0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC013DC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC013E4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC013EC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01410(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0141C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01424(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0144C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01470(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0147C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01490(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01498(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC014C4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC014C8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC014DC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC014E4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01514(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01518(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01524(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01530(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01558(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01564(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0156C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01594(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01598(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015A0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015B4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015BC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015E8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015EC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC015FC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01604(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01608(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0160C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01620(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01624(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0164C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01654(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0165C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01664(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0166C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01674(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0167C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01684(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0168C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01694(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0169C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016A4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016AC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016B4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016B8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016C0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016F0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC016F8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01700(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01708(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01710(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01718(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01720(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0172C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01734(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01738(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01740(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01748(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01750(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01758(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01760(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01768(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01774(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0177C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01788(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01790(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01798(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017A0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017AC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017B4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017B8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017C0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017C8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017D0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017D8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017E0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017E8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017F0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC017F8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01804(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0180C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01818(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01820(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01828(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01830(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0183C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01844(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01850(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01858(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01860(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01868(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01870(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01878(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01884(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC0188C(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC01898(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018A0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018A8(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018B0(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018BC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018C4(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018CC(CPUState* cpu); -extern void SCPH1001_func_1FC00DA0_cont_BFC018D0(CPUState* cpu); -extern void SCPH1001_func_1FC018E0(CPUState* cpu); -extern void SCPH1001_func_1FC018E0_cont_BFC01910(CPUState* cpu); -extern void SCPH1001_func_1FC01920(CPUState* cpu); -extern void SCPH1001_func_1FC0193C(CPUState* cpu); -extern void SCPH1001_func_1FC0193C_cont_BFC01960(CPUState* cpu); -extern void SCPH1001_func_1FC0193C_cont_BFC01988(CPUState* cpu); -extern void SCPH1001_func_1FC0193C_cont_BFC019B0(CPUState* cpu); -extern void SCPH1001_func_1FC0193C_cont_BFC01A38(CPUState* cpu); -extern void SCPH1001_func_1FC01A60(CPUState* cpu); -extern void SCPH1001_func_1FC01A60_cont_BFC01A78(CPUState* cpu); -extern void SCPH1001_func_1FC01A90(CPUState* cpu); -extern void SCPH1001_func_1FC01A90_cont_BFC01A98(CPUState* cpu); -extern void SCPH1001_func_1FC01A90_cont_BFC01AA0(CPUState* cpu); -extern void SCPH1001_func_1FC01A90_cont_BFC01AA8(CPUState* cpu); -extern void SCPH1001_func_1FC01A90_cont_BFC01AC0(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC_cont_BFC01AD4(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC_cont_BFC01ADC(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC_cont_BFC01AE4(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC_cont_BFC01AEC(CPUState* cpu); -extern void SCPH1001_func_1FC01ACC_cont_BFC01AFC(CPUState* cpu); -extern void SCPH1001_func_1FC01B08(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B10(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B18(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B24(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B2C(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B40(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B4C(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B54(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B5C(CPUState* cpu); -extern void SCPH1001_func_1FC01B08_cont_BFC01B6C(CPUState* cpu); -extern void SCPH1001_func_1FC01B80(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01B88(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BA0(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BAC(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BB0(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BB4(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BE4(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BEC(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BF0(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01BF8(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C00(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C08(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C28(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C34(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C4C(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C50(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C6C(CPUState* cpu); -extern void SCPH1001_func_1FC01B80_cont_BFC01C70(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01CAC(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01CB4(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01CD0(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01CE8(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D00(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D0C(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D1C(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D24(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D40(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D50(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D54(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D70(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01D9C(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01DA8(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01DAC(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01DBC(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01DC4(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01DC8(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01E08(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01E0C(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01E14(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01E18(CPUState* cpu); -extern void SCPH1001_func_1FC01C8C_cont_BFC01E1C(CPUState* cpu); -extern void SCPH1001_func_1FC01E24(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01E98(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EA0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EC0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EC8(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01ECC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EEC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EF4(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01EFC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F18(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F30(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F38(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F44(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F58(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F5C(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F64(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F80(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01F84(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FA0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FA4(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FAC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FD0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FDC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FE4(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FEC(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC01FF4(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02008(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC0200C(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02014(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02030(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02038(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02050(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02058(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC0207C(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02088(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02090(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC02098(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC020A0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC020B0(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC020C8(CPUState* cpu); -extern void SCPH1001_func_1FC01E5C_cont_BFC020D8(CPUState* cpu); -extern void SCPH1001_func_1FC020F0(CPUState* cpu); -extern void SCPH1001_func_1FC02104(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC0211C(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02124(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC0212C(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02134(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC0213C(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02144(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02148(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02154(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02160(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC0216C(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02178(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02184(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC0218C(CPUState* cpu); -extern void SCPH1001_func_1FC02104_cont_BFC02190(CPUState* cpu); -extern void SCPH1001_func_1FC021A0(CPUState* cpu); -extern void SCPH1001_func_1FC021A0_cont_BFC021C0(CPUState* cpu); -extern void SCPH1001_func_1FC021A0_cont_BFC021CC(CPUState* cpu); -extern void SCPH1001_func_1FC021A0_cont_BFC021D4(CPUState* cpu); -extern void SCPH1001_func_1FC021A0_cont_BFC021E0(CPUState* cpu); -extern void SCPH1001_func_1FC021A0_cont_BFC021EC(CPUState* cpu); -extern void SCPH1001_func_1FC02200(CPUState* cpu); -extern void SCPH1001_func_1FC02230(CPUState* cpu); -extern void SCPH1001_func_1FC02240(CPUState* cpu); -extern void SCPH1001_func_1FC0227C(CPUState* cpu); -extern void SCPH1001_func_1FC022C0(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC022E8(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC022F0(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC022FC(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC02304(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC0230C(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC02310(CPUState* cpu); -extern void SCPH1001_func_1FC022C0_cont_BFC02314(CPUState* cpu); -extern void SCPH1001_func_1FC02324(CPUState* cpu); -extern void SCPH1001_func_1FC02590(CPUState* cpu); -extern void SCPH1001_func_1FC02590_cont_BFC025A0(CPUState* cpu); -extern void SCPH1001_func_1FC025B0(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC025D8(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC025E0(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0260C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02630(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02638(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02640(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02644(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0264C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02654(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0265C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02670(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0267C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02684(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0268C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0269C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026AC(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026B4(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026C0(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026C8(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026D0(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026D8(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC026E4(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02700(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC0270C(CPUState* cpu); -extern void SCPH1001_func_1FC025B0_cont_BFC02720(CPUState* cpu); -extern void SCPH1001_func_1FC02738(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02768(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02770(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0279C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027C0(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027CC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027DC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027E0(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027E8(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027F0(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027F4(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC027FC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02804(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0280C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02820(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0282C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02834(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0283C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0284C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC0285C(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02864(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02870(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02878(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02880(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02888(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC02894(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC028A8(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC028AC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC028CC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC028DC(CPUState* cpu); -extern void SCPH1001_func_1FC02738_cont_BFC028FC(CPUState* cpu); -extern void SCPH1001_func_1FC02918(CPUState* cpu); -extern void SCPH1001_func_1FC02918_cont_BFC02920(CPUState* cpu); -extern void SCPH1001_func_1FC02918_cont_BFC02928(CPUState* cpu); -extern void SCPH1001_func_1FC02918_cont_BFC0292C(CPUState* cpu); -extern void SCPH1001_func_1FC02934(CPUState* cpu); -extern void SCPH1001_func_1FC02934_cont_BFC0293C(CPUState* cpu); -extern void SCPH1001_func_1FC02934_cont_BFC02944(CPUState* cpu); -extern void SCPH1001_func_1FC02934_cont_BFC02948(CPUState* cpu); -extern void SCPH1001_func_1FC02950(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC0297C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02984(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029B0(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029D4(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029E0(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029F0(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029F4(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC029FC(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A0C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A1C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A2C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A38(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A40(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A48(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A50(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A54(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A5C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A68(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A88(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02A8C(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02AA8(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02AB4(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02AC0(CPUState* cpu); -extern void SCPH1001_func_1FC02950_cont_BFC02AD4(CPUState* cpu); -extern void SCPH1001_func_1FC02AF0(CPUState* cpu); -extern void SCPH1001_func_1FC02AF0_cont_BFC02B00(CPUState* cpu); -extern void SCPH1001_func_1FC02B10(CPUState* cpu); -extern void SCPH1001_func_1FC02B10_cont_BFC02B28(CPUState* cpu); -extern void SCPH1001_func_1FC02B50(CPUState* cpu); -extern void SCPH1001_func_1FC02B50_cont_BFC02B58(CPUState* cpu); -extern void SCPH1001_func_1FC02B50_cont_BFC02B60(CPUState* cpu); -extern void SCPH1001_func_1FC02B50_cont_BFC02B68(CPUState* cpu); -extern void SCPH1001_func_1FC02B50_cont_BFC02B80(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C_cont_BFC02B94(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C_cont_BFC02B9C(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C_cont_BFC02BA4(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C_cont_BFC02BAC(CPUState* cpu); -extern void SCPH1001_func_1FC02B8C_cont_BFC02BBC(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02BD0(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02BDC(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02BE4(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02BF4(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C04(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C1C(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C24(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C2C(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C44(CPUState* cpu); -extern void SCPH1001_func_1FC02BC8_cont_BFC02C48(CPUState* cpu); -extern void SCPH1001_func_1FC02C50(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C58(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C60(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C6C(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C74(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C88(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C94(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02C9C(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02CA4(CPUState* cpu); -extern void SCPH1001_func_1FC02C50_cont_BFC02CB4(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02CC8(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02CD0(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02CDC(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02CE4(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02CF4(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02D00(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02D08(CPUState* cpu); -extern void SCPH1001_func_1FC02CC0_cont_BFC02D0C(CPUState* cpu); -extern void SCPH1001_func_1FC02D20(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D4C(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D58(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D64(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D6C(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D78(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D7C(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D84(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D8C(CPUState* cpu); -extern void SCPH1001_func_1FC02D20_cont_BFC02D90(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02DE8(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02DF4(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02DFC(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E0C(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E10(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E28(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E30(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E38(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E3C(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E48(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E60(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E68(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E70(CPUState* cpu); -extern void SCPH1001_func_1FC02DAC_cont_BFC02E74(CPUState* cpu); -extern void SCPH1001_func_1FC02EA0(CPUState* cpu); -extern void SCPH1001_func_1FC02EA0_cont_BFC02EC8(CPUState* cpu); -extern void SCPH1001_func_1FC02EA0_cont_BFC02ED4(CPUState* cpu); -extern void SCPH1001_func_1FC02EDC(CPUState* cpu); -extern void SCPH1001_func_1FC02EDC_cont_BFC02F04(CPUState* cpu); -extern void SCPH1001_func_1FC02EDC_cont_BFC02F10(CPUState* cpu); -extern void SCPH1001_func_1FC02F20(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F58(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F64(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F70(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F74(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F84(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02F94(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02FB4(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02FD0(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02FD8(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02FE0(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC02FF0(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03014(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC0301C(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03024(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03034(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03038(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03040(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03050(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03064(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC0306C(CPUState* cpu); -extern void SCPH1001_func_1FC02F20_cont_BFC03070(CPUState* cpu); -extern void SCPH1001_func_1FC03098(CPUState* cpu); -extern void SCPH1001_func_1FC03098_cont_BFC030C0(CPUState* cpu); -extern void SCPH1001_func_1FC03098_cont_BFC030CC(CPUState* cpu); -extern void SCPH1001_func_1FC03098_cont_BFC030E4(CPUState* cpu); -extern void SCPH1001_func_1FC03098_cont_BFC030F4(CPUState* cpu); -extern void SCPH1001_func_1FC03104(CPUState* cpu); -extern void SCPH1001_func_1FC03104_cont_BFC0314C(CPUState* cpu); -extern void SCPH1001_func_1FC03104_cont_BFC03160(CPUState* cpu); -extern void SCPH1001_func_1FC03104_cont_BFC03178(CPUState* cpu); -extern void SCPH1001_func_1FC03190(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC03198(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031A0(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031A8(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031B8(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031C8(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031E0(CPUState* cpu); -extern void SCPH1001_func_1FC03190_cont_BFC031F4(CPUState* cpu); -extern void SCPH1001_func_1FC03200(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03208(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03210(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03218(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03228(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03238(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03250(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC0325C(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC03268(CPUState* cpu); -extern void SCPH1001_func_1FC03200_cont_BFC0327C(CPUState* cpu); -extern void SCPH1001_func_1FC03288(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC03290(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC03298(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032A0(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032A8(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032B0(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032B8(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032C0(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032D4(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032D8(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032E0(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032E8(CPUState* cpu); -extern void SCPH1001_func_1FC03288_cont_BFC032FC(CPUState* cpu); -extern void SCPH1001_func_1FC03310(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03318(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03320(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03328(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03330(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03338(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03340(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC0334C(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03354(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03368(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC0336C(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03374(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC0337C(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC03388(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC0339C(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC033A4(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC033AC(CPUState* cpu); -extern void SCPH1001_func_1FC03310_cont_BFC033BC(CPUState* cpu); -extern void SCPH1001_func_1FC033C8(CPUState* cpu); -extern void SCPH1001_func_1FC033C8_cont_BFC033D0(CPUState* cpu); -extern void SCPH1001_func_1FC033C8_cont_BFC033D8(CPUState* cpu); -extern void SCPH1001_func_1FC033C8_cont_BFC033E0(CPUState* cpu); -extern void SCPH1001_func_1FC033C8_cont_BFC033F8(CPUState* cpu); -extern void SCPH1001_func_1FC033C8_cont_BFC0340C(CPUState* cpu); -extern void SCPH1001_func_1FC03418(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03420(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03428(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03430(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC0343C(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03450(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03460(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03474(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC0347C(CPUState* cpu); -extern void SCPH1001_func_1FC03418_cont_BFC03488(CPUState* cpu); -extern void SCPH1001_func_1FC03494(CPUState* cpu); -extern void SCPH1001_func_1FC03494_cont_BFC0349C(CPUState* cpu); -extern void SCPH1001_func_1FC03494_cont_BFC034A4(CPUState* cpu); -extern void SCPH1001_func_1FC03494_cont_BFC034B4(CPUState* cpu); -extern void SCPH1001_func_1FC03494_cont_BFC034C4(CPUState* cpu); -extern void SCPH1001_func_1FC03494_cont_BFC034C8(CPUState* cpu); -extern void SCPH1001_func_1FC034D0(CPUState* cpu); -extern void SCPH1001_func_1FC034D0_cont_BFC034DC(CPUState* cpu); -extern void SCPH1001_func_1FC034D0_cont_BFC034E4(CPUState* cpu); -extern void SCPH1001_func_1FC034D0_cont_BFC034F4(CPUState* cpu); -extern void SCPH1001_func_1FC034D0_cont_BFC034FC(CPUState* cpu); -extern void SCPH1001_func_1FC034D0_cont_BFC03508(CPUState* cpu); -extern void SCPH1001_func_1FC03514(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03520(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03528(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03538(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03548(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC0354C(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC0355C(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03564(CPUState* cpu); -extern void SCPH1001_func_1FC03514_cont_BFC03570(CPUState* cpu); -extern void SCPH1001_func_1FC0357C(CPUState* cpu); -extern void SCPH1001_func_1FC0357C_cont_BFC03588(CPUState* cpu); -extern void SCPH1001_func_1FC0357C_cont_BFC03590(CPUState* cpu); -extern void SCPH1001_func_1FC0357C_cont_BFC035A0(CPUState* cpu); -extern void SCPH1001_func_1FC0357C_cont_BFC035A8(CPUState* cpu); -extern void SCPH1001_func_1FC0357C_cont_BFC035B4(CPUState* cpu); -extern void SCPH1001_func_1FC035C0(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC035CC(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC035D4(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC035E4(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC035F4(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC035F8(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC03608(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC03610(CPUState* cpu); -extern void SCPH1001_func_1FC035C0_cont_BFC0361C(CPUState* cpu); -extern void SCPH1001_func_1FC03628(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03638(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03640(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03648(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03650(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03658(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03660(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03670(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03680(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC03688(CPUState* cpu); -extern void SCPH1001_func_1FC03628_cont_BFC0368C(CPUState* cpu); -extern void SCPH1001_func_1FC03694(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036A4(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036AC(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036B4(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036BC(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036C4(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036D4(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036E4(CPUState* cpu); -extern void SCPH1001_func_1FC03694_cont_BFC036F4(CPUState* cpu); -extern void SCPH1001_func_1FC036FC(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0370C(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC03714(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0371C(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC03724(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0372C(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0373C(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0374C(CPUState* cpu); -extern void SCPH1001_func_1FC036FC_cont_BFC0375C(CPUState* cpu); -extern void SCPH1001_func_1FC03764(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03778(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03788(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC0379C(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037AC(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037B8(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037C0(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037C8(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037D0(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037D8(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037E8(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC037F8(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03800(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC0380C(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03814(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03824(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC0382C(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03834(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03844(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03854(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC0385C(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03864(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03870(CPUState* cpu); -extern void SCPH1001_func_1FC03764_cont_BFC03884(CPUState* cpu); -extern void SCPH1001_func_1FC03894(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038A8(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038B8(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038C8(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038D0(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038D8(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038E4(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038EC(CPUState* cpu); -extern void SCPH1001_func_1FC03894_cont_BFC038FC(CPUState* cpu); -extern void SCPH1001_func_1FC03910(CPUState* cpu); -extern void SCPH1001_func_1FC03910_cont_BFC03930(CPUState* cpu); -extern void SCPH1001_func_1FC03910_cont_BFC03944(CPUState* cpu); -extern void SCPH1001_func_1FC03910_cont_BFC03948(CPUState* cpu); -extern void SCPH1001_func_1FC03968(CPUState* cpu); -extern void SCPH1001_func_1FC03978(CPUState* cpu); -extern void SCPH1001_func_1FC03990(CPUState* cpu); -extern void SCPH1001_func_1FC039B0(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039C4(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039CC(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039D4(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039E0(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039EC(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039F4(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC039FC(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC03A04(CPUState* cpu); -extern void SCPH1001_func_1FC039B0_cont_BFC03A08(CPUState* cpu); -extern void SCPH1001_func_1FC03A18(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A2C(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A34(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A3C(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A48(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A54(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A5C(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A64(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A68(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A7C(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A88(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A90(CPUState* cpu); -extern void SCPH1001_func_1FC03A18_cont_BFC03A94(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03ACC(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03AD8(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03AE0(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03AF4(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03AFC(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B08(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B10(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B20(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B28(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B38(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B40(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B48(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B58(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B68(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B78(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03B9C(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03BB0(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03BBC(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03BE4(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03BEC(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03BF8(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C0C(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C14(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C24(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C2C(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C5C(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C74(CPUState* cpu); -extern void SCPH1001_func_1FC03AA4_cont_BFC03C7C(CPUState* cpu); -extern void SCPH1001_func_1FC03C90(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CAC(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CB8(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CC0(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CC4(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CD4(CPUState* cpu); -extern void SCPH1001_func_1FC03C90_cont_BFC03CD8(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D10(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D18(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D28(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D38(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D4C(CPUState* cpu); -extern void SCPH1001_func_1FC03CF0_cont_BFC03D60(CPUState* cpu); -extern void SCPH1001_func_1FC03D80(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03DBC(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03DCC(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03DD4(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03DDC(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03DFC(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03E04(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03E68(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03E70(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03E88(CPUState* cpu); -extern void SCPH1001_func_1FC03D80_cont_BFC03E8C(CPUState* cpu); -extern void SCPH1001_func_1FC03EA0(CPUState* cpu); -extern void SCPH1001_func_1FC03EA0_cont_BFC03EBC(CPUState* cpu); -extern void SCPH1001_func_1FC03EA0_cont_BFC03F5C(CPUState* cpu); -extern void SCPH1001_func_1FC03EA0_cont_BFC03F60(CPUState* cpu); -extern void SCPH1001_func_1FC03F8C(CPUState* cpu); -extern void SCPH1001_func_1FC03FAC(CPUState* cpu); -extern void SCPH1001_func_1FC03FAC_cont_BFC03FBC(CPUState* cpu); -extern void SCPH1001_func_1FC03FC0(CPUState* cpu); -extern void SCPH1001_func_1FC03FE0(CPUState* cpu); -extern void SCPH1001_func_1FC03FE0_cont_BFC03FF4(CPUState* cpu); -extern void SCPH1001_func_1FC03FE0_cont_BFC04008(CPUState* cpu); -extern void SCPH1001_func_1FC03FE0_cont_BFC04014(CPUState* cpu); -extern void SCPH1001_func_1FC03FE0_cont_BFC0402C(CPUState* cpu); -extern void SCPH1001_func_1FC0403C(CPUState* cpu); -extern void SCPH1001_func_1FC0403C_cont_BFC04058(CPUState* cpu); -extern void SCPH1001_func_1FC0403C_cont_BFC04060(CPUState* cpu); -extern void SCPH1001_func_1FC0403C_cont_BFC040BC(CPUState* cpu); -extern void SCPH1001_func_1FC0403C_cont_BFC040DC(CPUState* cpu); -extern void SCPH1001_func_1FC040EC(CPUState* cpu); -extern void SCPH1001_func_1FC04120(CPUState* cpu); -extern void SCPH1001_func_1FC04138(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC0415C(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04170(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04174(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC0417C(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04188(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04190(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041A4(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041AC(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041CC(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041D0(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041D8(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041E4(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC041EC(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04200(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04214(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04228(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC0422C(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04234(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04240(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04248(CPUState* cpu); -extern void SCPH1001_func_1FC04138_cont_BFC04250(CPUState* cpu); -extern void SCPH1001_func_1FC04260(CPUState* cpu); -extern void SCPH1001_func_1FC04260_cont_BFC04284(CPUState* cpu); -extern void SCPH1001_func_1FC04260_cont_BFC0428C(CPUState* cpu); -extern void SCPH1001_func_1FC042A0(CPUState* cpu); -extern void SCPH1001_func_1FC042A0_cont_BFC042B4(CPUState* cpu); -extern void SCPH1001_func_1FC042A0_cont_BFC042C8(CPUState* cpu); -extern void SCPH1001_func_1FC042D0(CPUState* cpu); -extern void SCPH1001_func_1FC042D0_cont_BFC042E4(CPUState* cpu); -extern void SCPH1001_func_1FC042D0_cont_BFC042F8(CPUState* cpu); -extern void SCPH1001_func_1FC04610(CPUState* cpu); -extern void SCPH1001_func_1FC04610_cont_BFC0462C(CPUState* cpu); -extern void SCPH1001_func_1FC04610_cont_BFC04638(CPUState* cpu); -extern void SCPH1001_func_1FC04610_cont_BFC04640(CPUState* cpu); -extern void SCPH1001_func_1FC04610_cont_BFC0464C(CPUState* cpu); -extern void SCPH1001_func_1FC04610_cont_BFC04668(CPUState* cpu); -extern void SCPH1001_func_1FC04678(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC04698(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC046C0(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC046CC(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC046D4(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC046D8(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC04708(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC04718(CPUState* cpu); -extern void SCPH1001_func_1FC04678_cont_BFC0471C(CPUState* cpu); -extern void SCPH1001_func_1FC0472C(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC04754(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC04788(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC04790(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC04798(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047A4(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047B0(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047B8(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047D4(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047E4(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC047E8(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC04808(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC0480C(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC0481C(CPUState* cpu); -extern void SCPH1001_func_1FC0472C_cont_BFC0483C(CPUState* cpu); -extern void SCPH1001_func_1FC04850(CPUState* cpu); -extern void SCPH1001_func_1FC04850_cont_BFC04890(CPUState* cpu); -extern void SCPH1001_func_1FC04850_cont_BFC048C0(CPUState* cpu); -extern void SCPH1001_func_1FC048D0(CPUState* cpu); -extern void SCPH1001_func_1FC048D0_cont_BFC048EC(CPUState* cpu); -extern void SCPH1001_func_1FC048D0_cont_BFC04900(CPUState* cpu); -extern void SCPH1001_func_1FC04910(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04934(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC049DC(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC049EC(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A20(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A48(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A5C(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A64(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A6C(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A80(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A88(CPUState* cpu); -extern void SCPH1001_func_1FC04910_cont_BFC04A90(CPUState* cpu); -extern void SCPH1001_func_1FC04AA0(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04ACC(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04AE0(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04AE8(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04AF0(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B04(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B0C(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B14(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B34(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B3C(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B44(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B5C(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B60(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B64(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04B68(CPUState* cpu); -extern void SCPH1001_func_1FC04ABC_cont_BFC04BB4(CPUState* cpu); -extern void SCPH1001_func_1FC04BC4(CPUState* cpu); -extern void SCPH1001_func_1FC04BC4_cont_BFC04BE0(CPUState* cpu); -extern void SCPH1001_func_1FC04BC4_cont_BFC04BE8(CPUState* cpu); -extern void SCPH1001_func_1FC04BC4_cont_BFC04BF0(CPUState* cpu); -extern void SCPH1001_func_1FC04BC4_cont_BFC04C28(CPUState* cpu); -extern void SCPH1001_func_1FC04C38(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04C54(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04C5C(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04C64(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04C70(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CAC(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CBC(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CC8(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CD8(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CDC(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04CE4(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04D04(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04D0C(CPUState* cpu); -extern void SCPH1001_func_1FC04C38_cont_BFC04D40(CPUState* cpu); -extern void SCPH1001_func_1FC04D50(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04D68(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04D70(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04D78(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04DA0(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04DA8(CPUState* cpu); -extern void SCPH1001_func_1FC04D50_cont_BFC04DDC(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E10(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E18(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E2C(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E34(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E64(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04E88(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04EB8(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04EBC(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04EC8(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04EE8(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F18(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F1C(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F2C(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F48(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F50(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F58(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F60(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F68(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F70(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F78(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F80(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F88(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F90(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04F98(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04FA0(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04FA8(CPUState* cpu); -extern void SCPH1001_func_1FC04DEC_cont_BFC04FAC(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC04FE0(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC04FE8(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC04FFC(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC05004(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC05040(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC05050(CPUState* cpu); -extern void SCPH1001_func_1FC04FBC_cont_BFC0505C(CPUState* cpu); -extern void SCPH1001_func_1FC0506C(CPUState* cpu); -extern void SCPH1001_func_1FC0506C_cont_BFC05080(CPUState* cpu); -extern void SCPH1001_func_1FC0506C_cont_BFC05094(CPUState* cpu); -extern void SCPH1001_func_1FC050A4(CPUState* cpu); -extern void SCPH1001_func_1FC050A4_cont_BFC050B8(CPUState* cpu); -extern void SCPH1001_func_1FC050A4_cont_BFC050CC(CPUState* cpu); -extern void SCPH1001_func_1FC050DC(CPUState* cpu); -extern void SCPH1001_func_1FC050FC(CPUState* cpu); -extern void SCPH1001_func_1FC05120(CPUState* cpu); -extern void SCPH1001_func_1FC05120_cont_BFC0515C(CPUState* cpu); -extern void SCPH1001_func_1FC05120_cont_BFC05160(CPUState* cpu); -extern void SCPH1001_func_1FC05120_cont_BFC0518C(CPUState* cpu); -extern void SCPH1001_func_1FC05194(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051AC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051B4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051BC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051C8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051D0(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051D8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051F0(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC051F8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05200(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05208(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05210(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05214(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05220(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05224(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0523C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05244(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0524C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05254(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0525C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05264(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0526C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05274(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0527C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05284(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0528C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05294(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0529C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052A4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052AC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052B4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052BC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052C4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052CC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052D4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052DC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052E4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052E8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052F4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC052FC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05300(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05308(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05310(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05318(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05320(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05328(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05330(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05338(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05340(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05348(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05350(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05358(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05360(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0536C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05374(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05380(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05388(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05394(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0539C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053A4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053AC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053B8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053C0(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053CC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053D4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053DC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053E4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053EC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC053F4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05400(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05408(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05414(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0541C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05424(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0542C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05438(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05440(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0544C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05454(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0545C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05464(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0546C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05474(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0547C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05484(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05490(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05498(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054A4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054AC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054B4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054BC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054C8(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054D0(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054DC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054E4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054EC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054F4(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC054FC(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05504(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05510(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05518(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05524(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0552C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05534(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0553C(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC05548(CPUState* cpu); -extern void SCPH1001_func_1FC05194_cont_BFC0554C(CPUState* cpu); -extern void SCPH1001_func_1FC05558(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05580(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05588(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05590(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055A4(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055AC(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055B4(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055C0(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055C8(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055D8(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055F0(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC055F8(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05614(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0561C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05640(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05648(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05664(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05674(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056A4(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056C0(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056C8(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056CC(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056D8(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056E0(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056E4(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056EC(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056F4(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC056FC(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05704(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0570C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05714(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0571C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05724(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05730(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05734(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0574C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05754(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05760(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05768(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05774(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0577C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05784(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC0578C(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC05798(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC057A0(CPUState* cpu); -extern void SCPH1001_func_1FC05558_cont_BFC057A4(CPUState* cpu); -extern void SCPH1001_func_1FC057B0(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC057EC(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05828(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05860(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05864(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05888(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05890(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05894(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC0589C(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC058AC(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC058C0(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC058EC(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC058F4(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC0592C(CPUState* cpu); -extern void SCPH1001_func_1FC057B0_cont_BFC05930(CPUState* cpu); -extern void SCPH1001_func_1FC0593C(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05964(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05970(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05984(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC0598C(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05994(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC0599C(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059A8(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059B4(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059BC(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059C4(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059CC(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059D4(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059D8(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059E0(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059E8(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059F0(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC059F8(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A00(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A04(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A0C(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A1C(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A24(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A28(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A34(CPUState* cpu); -extern void SCPH1001_func_1FC0593C_cont_BFC05A38(CPUState* cpu); -extern void SCPH1001_func_1FC05A44(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05A5C(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05A68(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05A7C(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05A84(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05A98(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AA8(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AB4(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05ABC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AC4(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05ACC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AD0(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AD8(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AE4(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AEC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05AF8(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B00(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B14(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B1C(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B30(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B34(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B44(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B58(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B60(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B68(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B6C(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B74(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B80(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B88(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B94(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05B9C(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BA8(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BAC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BBC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BCC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BE0(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BF0(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BF8(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05BFC(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05C08(CPUState* cpu); -extern void SCPH1001_func_1FC05A44_cont_BFC05C0C(CPUState* cpu); -extern void SCPH1001_func_1FC05C18(CPUState* cpu); -extern void SCPH1001_func_1FC05C18_cont_BFC05C20(CPUState* cpu); -extern void SCPH1001_func_1FC05C18_cont_BFC05C28(CPUState* cpu); -extern void SCPH1001_func_1FC05C18_cont_BFC05C2C(CPUState* cpu); -extern void SCPH1001_func_1FC05C50(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05C94(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05CB0(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05CC4(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05CD8(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05CE4(CPUState* cpu); -extern void SCPH1001_func_1FC05C50_cont_BFC05CF4(CPUState* cpu); -extern void SCPH1001_func_1FC05D04(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05D20(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05D3C(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05D6C(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05D84(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05D90(CPUState* cpu); -extern void SCPH1001_func_1FC05D04_cont_BFC05DA0(CPUState* cpu); -extern void SCPH1001_func_1FC05DB0(CPUState* cpu); -extern void SCPH1001_func_1FC05DB0_cont_BFC05DE4(CPUState* cpu); -extern void SCPH1001_func_1FC05DF4(CPUState* cpu); -extern void SCPH1001_func_1FC05DF4_cont_BFC05E1C(CPUState* cpu); -extern void SCPH1001_func_1FC05DF4_cont_BFC05E2C(CPUState* cpu); -extern void SCPH1001_func_1FC05DF4_cont_BFC05E48(CPUState* cpu); -extern void SCPH1001_func_1FC05E58(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05E7C(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05E90(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EA0(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EA4(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EAC(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EC0(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05ED4(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EE4(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EE8(CPUState* cpu); -extern void SCPH1001_func_1FC05E58_cont_BFC05EF0(CPUState* cpu); -extern void SCPH1001_func_1FC05F08(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC05F1C(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC05F94(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC05FC8(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC05FEC(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC05FF4(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC06000(CPUState* cpu); -extern void SCPH1001_func_1FC05F08_cont_BFC06004(CPUState* cpu); -extern void SCPH1001_func_1FC06010(CPUState* cpu); -extern void SCPH1001_func_1FC06010_cont_BFC06028(CPUState* cpu); -extern void SCPH1001_func_1FC06038(CPUState* cpu); -extern void SCPH1001_func_1FC06038_cont_BFC0608C(CPUState* cpu); -extern void SCPH1001_func_1FC06038_cont_BFC060BC(CPUState* cpu); -extern void SCPH1001_func_1FC06038_cont_BFC060CC(CPUState* cpu); -extern void SCPH1001_func_1FC060DC(CPUState* cpu); -extern void SCPH1001_func_1FC060DC_cont_BFC0610C(CPUState* cpu); -extern void SCPH1001_func_1FC060DC_cont_BFC06114(CPUState* cpu); -extern void SCPH1001_func_1FC060DC_cont_BFC06130(CPUState* cpu); -extern void SCPH1001_func_1FC060DC_cont_BFC06134(CPUState* cpu); -extern void SCPH1001_func_1FC060DC_cont_BFC0614C(CPUState* cpu); -extern void SCPH1001_func_1FC0615C(CPUState* cpu); -extern void SCPH1001_func_1FC0615C_cont_BFC06190(CPUState* cpu); -extern void SCPH1001_func_1FC061A0(CPUState* cpu); -extern void SCPH1001_func_1FC061A0_cont_BFC061C4(CPUState* cpu); -extern void SCPH1001_func_1FC061D4(CPUState* cpu); -extern void SCPH1001_func_1FC061D4_cont_BFC06208(CPUState* cpu); -extern void SCPH1001_func_1FC06218(CPUState* cpu); -extern void SCPH1001_func_1FC06218_cont_BFC0623C(CPUState* cpu); -extern void SCPH1001_func_1FC06218_cont_BFC06244(CPUState* cpu); -extern void SCPH1001_func_1FC06218_cont_BFC0624C(CPUState* cpu); -extern void SCPH1001_func_1FC06218_cont_BFC06250(CPUState* cpu); -extern void SCPH1001_func_1FC06218_cont_BFC0627C(CPUState* cpu); -extern void SCPH1001_func_1FC06288(CPUState* cpu); -extern void SCPH1001_func_1FC062CC(CPUState* cpu); -extern void SCPH1001_func_1FC062CC_cont_BFC06358(CPUState* cpu); -extern void SCPH1001_func_1FC062CC_cont_BFC06364(CPUState* cpu); -extern void SCPH1001_func_1FC062CC_cont_BFC0636C(CPUState* cpu); -extern void SCPH1001_func_1FC062CC_cont_BFC063C0(CPUState* cpu); -extern void SCPH1001_func_1FC063CC(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC06420(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC0643C(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC06444(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC06464(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC0646C(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC06474(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC06478(CPUState* cpu); -extern void SCPH1001_func_1FC063CC_cont_BFC064CC(CPUState* cpu); -extern void SCPH1001_func_1FC064D8(CPUState* cpu); -extern void SCPH1001_func_1FC064D8_cont_BFC064F0(CPUState* cpu); -extern void SCPH1001_func_1FC064D8_cont_BFC06500(CPUState* cpu); -extern void SCPH1001_func_1FC064D8_cont_BFC06510(CPUState* cpu); -extern void SCPH1001_func_1FC064D8_cont_BFC06520(CPUState* cpu); -extern void SCPH1001_func_1FC064D8_cont_BFC06530(CPUState* cpu); -extern void SCPH1001_func_1FC06548(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC06568(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC06574(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC06580(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC0658C(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC06598(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC065A4(CPUState* cpu); -extern void SCPH1001_func_1FC06548_cont_BFC065B0(CPUState* cpu); -extern void SCPH1001_func_1FC065C0(CPUState* cpu); -extern void SCPH1001_func_1FC0661C(CPUState* cpu); -extern void SCPH1001_func_1FC06680(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066AC(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066B4(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066BC(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066C4(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066C8(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066CC(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066DC(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066E4(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066F0(CPUState* cpu); -extern void SCPH1001_func_1FC06680_cont_BFC066F4(CPUState* cpu); -extern void SCPH1001_func_1FC06700(CPUState* cpu); -extern void SCPH1001_func_1FC06700_cont_BFC06718(CPUState* cpu); -extern void SCPH1001_func_1FC06728(CPUState* cpu); -extern void SCPH1001_func_1FC06750(CPUState* cpu); -extern void SCPH1001_func_1FC06750_cont_BFC06774(CPUState* cpu); -extern void SCPH1001_func_1FC06784(CPUState* cpu); -extern void SCPH1001_func_1FC06784_cont_BFC0679C(CPUState* cpu); -extern void SCPH1001_func_1FC06784_cont_BFC067AC(CPUState* cpu); -extern void SCPH1001_func_1FC06784_cont_BFC067BC(CPUState* cpu); -extern void SCPH1001_func_1FC06784_cont_BFC067CC(CPUState* cpu); -extern void SCPH1001_func_1FC06784_cont_BFC067D8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06800(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06808(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06814(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06834(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0683C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06844(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0684C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06854(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0685C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06864(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0686C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06874(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC068AC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC068B4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC068C0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC068C8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC068F8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06904(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06914(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0691C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06924(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0692C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0693C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC0694C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06954(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06978(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06980(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06988(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06990(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06998(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069A0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069B4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069C0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069C8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069D0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069D8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069E4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069EC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC069F8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A04(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A0C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A14(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A1C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A28(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A30(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A38(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A3C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A44(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A4C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A5C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A68(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A70(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A78(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A7C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A8C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06A94(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AAC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06ABC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AC4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AD8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AE4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AEC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06AF4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B10(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B18(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B24(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B2C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B34(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B50(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B60(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B6C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B74(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B7C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B84(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06B98(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BA4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BAC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BB4(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BBC(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BD0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BD8(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06BE0(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C04(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C20(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C48(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C50(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C5C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C64(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C6C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C80(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C8C(CPUState* cpu); -extern void SCPH1001_func_1FC067E8_cont_BFC06C94(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CC8(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CD4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CDC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CE4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CEC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CF4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06CFC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D1C(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D28(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D30(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D40(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D48(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D50(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D58(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D68(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D78(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D80(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06D94(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DA0(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DA8(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DB0(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DB8(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DC4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DCC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DD4(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DDC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DF0(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06DF8(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E00(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E24(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E40(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E68(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E70(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E7C(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E84(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06E8C(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06EA0(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06EAC(CPUState* cpu); -extern void SCPH1001_func_1FC06CA4_cont_BFC06EB4(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06ED4(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06EF0(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06EFC(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06F04(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06F0C(CPUState* cpu); -extern void SCPH1001_func_1FC06EC4_cont_BFC06F18(CPUState* cpu); -extern void SCPH1001_func_1FC06F28(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F3C(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F4C(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F54(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F5C(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F64(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F74(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F84(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F8C(CPUState* cpu); -extern void SCPH1001_func_1FC06F28_cont_BFC06F94(CPUState* cpu); -extern void SCPH1001_func_1FC06FA4(CPUState* cpu); -extern void SCPH1001_func_1FC06FA4_cont_BFC06FB8(CPUState* cpu); -extern void SCPH1001_func_1FC06FA4_cont_BFC06FC4(CPUState* cpu); -extern void SCPH1001_func_1FC06FDC(CPUState* cpu); -extern void SCPH1001_func_1FC06FF0(CPUState* cpu); -extern void SCPH1001_func_1FC06FF0_cont_BFC07014(CPUState* cpu); -extern void SCPH1001_func_1FC06FF0_cont_BFC0701C(CPUState* cpu); -extern void SCPH1001_func_1FC06FF0_cont_BFC0702C(CPUState* cpu); -extern void SCPH1001_func_1FC0703C(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC0705C(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC07064(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC07078(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC07088(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC07098(CPUState* cpu); -extern void SCPH1001_func_1FC0703C_cont_BFC070A4(CPUState* cpu); -extern void SCPH1001_func_1FC070AC(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC070CC(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC070D4(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC070E8(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC070F8(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC07108(CPUState* cpu); -extern void SCPH1001_func_1FC070AC_cont_BFC07114(CPUState* cpu); -extern void SCPH1001_func_1FC0711C(CPUState* cpu); -extern void SCPH1001_func_1FC0711C_cont_BFC07138(CPUState* cpu); -extern void SCPH1001_func_1FC07148(CPUState* cpu); -extern void SCPH1001_func_1FC07148_cont_BFC0715C(CPUState* cpu); -extern void SCPH1001_func_1FC07148_cont_BFC07170(CPUState* cpu); -extern void SCPH1001_func_1FC07148_cont_BFC07184(CPUState* cpu); -extern void SCPH1001_func_1FC071A0(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC071B0(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC071C8(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC071E8(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC07208(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC07228(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC07248(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC0725C(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC0726C(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC0727C(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC0728C(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC0729C(CPUState* cpu); -extern void SCPH1001_func_1FC071A0_cont_BFC072A4(CPUState* cpu); -extern void SCPH1001_func_1FC072B8(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC072C8(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC072D8(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC072E8(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC072F8(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC07308(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC07318(CPUState* cpu); -extern void SCPH1001_func_1FC072B8_cont_BFC07320(CPUState* cpu); -extern void SCPH1001_func_1FC07330(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07340(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07348(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07350(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07358(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07360(CPUState* cpu); -extern void SCPH1001_func_1FC07330_cont_BFC07364(CPUState* cpu); -extern void SCPH1001_func_1FC07370(CPUState* cpu); -extern void SCPH1001_func_1FC07370_cont_BFC07380(CPUState* cpu); -extern void SCPH1001_func_1FC07370_cont_BFC07390(CPUState* cpu); -extern void SCPH1001_func_1FC073A0(CPUState* cpu); -extern void SCPH1001_func_1FC073A0_cont_BFC073B0(CPUState* cpu); -extern void SCPH1001_func_1FC073A0_cont_BFC073C8(CPUState* cpu); -extern void SCPH1001_func_1FC073A0_cont_BFC073CC(CPUState* cpu); -extern void SCPH1001_func_1FC073A0_cont_BFC073F8(CPUState* cpu); -extern void SCPH1001_func_1FC073A0_cont_BFC07400(CPUState* cpu); -extern void SCPH1001_func_1FC07410(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07438(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07444(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC0744C(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07464(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC0746C(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07474(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC074F0(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC074F8(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07500(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07518(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07540(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07560(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07570(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07580(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC075DC(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC075F8(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07604(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC0760C(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07618(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07620(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07630(CPUState* cpu); -extern void SCPH1001_func_1FC07410_cont_BFC07650(CPUState* cpu); -extern void SCPH1001_func_1FC07664(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC0769C(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076AC(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076B8(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076C0(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076C8(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076E0(CPUState* cpu); -extern void SCPH1001_func_1FC07664_cont_BFC076E4(CPUState* cpu); -extern void SCPH1001_func_1FC07700(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07718(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07720(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC0775C(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07768(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07774(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC077A8(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC077B8(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC077C8(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07834(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07854(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07860(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07870(CPUState* cpu); -extern void SCPH1001_func_1FC07700_cont_BFC07894(CPUState* cpu); -extern void SCPH1001_func_1FC078A4(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078C8(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078D4(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078DC(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078E4(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078F4(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC078F8(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07908(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07910(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07920(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07928(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07938(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07940(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07948(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07958(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07968(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07978(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC0797C(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07984(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC07990(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC079A0(CPUState* cpu); -extern void SCPH1001_func_1FC078A4_cont_BFC079E0(CPUState* cpu); -extern void SCPH1001_func_1FC079F8(CPUState* cpu); -extern void SCPH1001_func_1FC07A04(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A28(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A30(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A34(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A3C(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A50(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A54(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A60(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A74(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A84(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A8C(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07A9C(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AA4(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AB0(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AC0(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AD8(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AE8(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07AEC(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B04(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B08(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B20(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B30(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B40(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B5C(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B64(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B68(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B6C(CPUState* cpu); -extern void SCPH1001_func_1FC07A04_cont_BFC07B78(CPUState* cpu); -extern void SCPH1001_func_1FC07B88(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07B98(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BA4(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BAC(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BB4(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BC8(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BCC(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BD4(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BDC(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07BF0(CPUState* cpu); -extern void SCPH1001_func_1FC07B88_cont_BFC07C0C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07C5C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07C64(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07C70(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07C78(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07D8C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07D94(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DA0(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DA8(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DB0(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DB8(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DC4(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DCC(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DDC(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DE4(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07DF0(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E00(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E08(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E14(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E1C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E2C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E34(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E40(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E50(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E58(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E60(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E6C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E74(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E7C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E8C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E94(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07E9C(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EAC(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EB4(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EC0(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EC8(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07ED8(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EE0(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EEC(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EF4(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07EFC(CPUState* cpu); -extern void SCPH1001_func_1FC07C1C_cont_BFC07F00(CPUState* cpu); -extern void SCPH1001_func_1FC07F28(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F44(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F50(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F5C(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F64(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F70(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F78(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F84(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F8C(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F94(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07F9C(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FAC(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FB8(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FC4(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FD4(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FE0(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FEC(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC07FF8(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC08000(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC0800C(CPUState* cpu); -extern void SCPH1001_func_1FC07F28_cont_BFC08010(CPUState* cpu); -extern void SCPH1001_func_1FC08020(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC08030(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC08038(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC0803C(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC0804C(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC08054(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC0805C(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC0806C(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC0807C(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC08084(CPUState* cpu); -extern void SCPH1001_func_1FC08020_cont_BFC08090(CPUState* cpu); -extern void SCPH1001_func_1FC08098(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC080B0(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC080BC(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC080CC(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC080D8(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC080EC(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08100(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC0811C(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08130(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC0814C(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08154(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08174(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08180(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC08194(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC081E8(CPUState* cpu); -extern void SCPH1001_func_1FC08098_cont_BFC081EC(CPUState* cpu); -extern void SCPH1001_func_1FC081FC(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08218(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08220(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08234(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08250(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08258(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08264(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08274(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC0827C(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08290(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08298(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082A0(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082A8(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082B4(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082C8(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082D8(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082EC(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC082F0(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08300(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08304(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC0830C(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC0832C(CPUState* cpu); -extern void SCPH1001_func_1FC081FC_cont_BFC08344(CPUState* cpu); -extern void SCPH1001_func_1FC08354(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC0837C(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC08388(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC08394(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC083A8(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC083B0(CPUState* cpu); -extern void SCPH1001_func_1FC08354_cont_BFC083B8(CPUState* cpu); -extern void SCPH1001_func_1FC083CC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08404(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC0841C(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC0842C(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08438(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08440(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08454(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC0846C(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC0847C(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08484(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08498(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084A0(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084A8(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084BC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084C4(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084CC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084D8(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084DC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084E4(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084EC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084F0(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC084FC(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08504(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08510(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08518(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08520(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08538(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08554(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08560(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08568(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08574(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08584(CPUState* cpu); -extern void SCPH1001_func_1FC083CC_cont_BFC08588(CPUState* cpu); -extern void SCPH1001_func_1FC085B0(CPUState* cpu); -extern void SCPH1001_func_1FC085B0_cont_BFC085C4(CPUState* cpu); -extern void SCPH1001_func_1FC085D4(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC085E4(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC085EC(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC085F4(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08600(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08608(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08610(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08618(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08624(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC0862C(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08634(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC0863C(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC0864C(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08654(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08660(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08670(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08678(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08684(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08690(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC08698(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC086A0(CPUState* cpu); -extern void SCPH1001_func_1FC085D4_cont_BFC086A4(CPUState* cpu); -extern void SCPH1001_func_1FC086B0(CPUState* cpu); -extern void SCPH1001_func_1FC086B0_cont_BFC086C4(CPUState* cpu); -extern void SCPH1001_func_1FC086EC(CPUState* cpu); -extern void SCPH1001_func_1FC086EC_cont_BFC08708(CPUState* cpu); -extern void SCPH1001_func_1FC08720(CPUState* cpu); -extern void SCPH1001_func_1FC08720_cont_BFC08758(CPUState* cpu); -extern void SCPH1001_func_1FC08720_cont_BFC087A0(CPUState* cpu); -extern void SCPH1001_func_1FC08720_cont_BFC087B0(CPUState* cpu); -extern void SCPH1001_func_1FC08720_cont_BFC087BC(CPUState* cpu); -extern void SCPH1001_func_1FC087C4(CPUState* cpu); -extern void SCPH1001_func_1FC087C4_cont_BFC087FC(CPUState* cpu); -extern void SCPH1001_func_1FC087C4_cont_BFC08844(CPUState* cpu); -extern void SCPH1001_func_1FC0884C(CPUState* cpu); -extern void SCPH1001_func_1FC0884C_cont_BFC08870(CPUState* cpu); -extern void SCPH1001_func_1FC0884C_cont_BFC08888(CPUState* cpu); -extern void SCPH1001_func_1FC0884C_cont_BFC08890(CPUState* cpu); -extern void SCPH1001_func_1FC088A0(CPUState* cpu); -extern void SCPH1001_func_1FC088A0_cont_BFC088D4(CPUState* cpu); -extern void SCPH1001_func_1FC088A0_cont_BFC088F8(CPUState* cpu); -extern void SCPH1001_func_1FC088A0_cont_BFC08904(CPUState* cpu); -extern void SCPH1001_func_1FC088A0_cont_BFC08910(CPUState* cpu); -extern void SCPH1001_func_1FC088A0_cont_BFC08934(CPUState* cpu); -extern void SCPH1001_func_1FC0895C(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC0896C(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC08978(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC08988(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC08990(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC0899C(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC089A8(CPUState* cpu); -extern void SCPH1001_func_1FC0895C_cont_BFC089B0(CPUState* cpu); -extern void SCPH1001_func_1FC089C0(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC089F0(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC089F4(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A0C(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A18(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A20(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A28(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A38(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A48(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A5C(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A64(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A6C(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A74(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A78(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A80(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A88(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A90(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A98(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08A9C(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08AC0(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08ACC(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08AD8(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08B00(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08B20(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08B24(CPUState* cpu); -extern void SCPH1001_func_1FC089C0_cont_BFC08B28(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08B64(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08B7C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08B80(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08B98(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08BA4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08BAC(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08BB4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08BB8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08BF4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C04(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C14(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C28(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C34(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C3C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C40(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C7C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C84(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C94(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08C9C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08CC0(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08CD8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08CF0(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08CF8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D08(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D10(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D18(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D20(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D24(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D44(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D4C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D54(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D78(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D7C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D8C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08D98(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DA4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DB8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DC4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DC8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DD4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08DEC(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E04(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E18(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E2C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E34(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E38(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E54(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E58(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E68(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E70(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08E74(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EA0(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EA8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EB8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EC4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08ED4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EEC(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08EF8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F1C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F28(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F30(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F38(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F40(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F48(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F50(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F58(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F60(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F64(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F74(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F84(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F8C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F90(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08F9C(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08FA8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08FB4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08FD4(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08FD8(CPUState* cpu); -extern void SCPH1001_func_1FC08B3C_cont_BFC08FDC(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC0902C(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09034(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09038(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09040(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09048(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09050(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09068(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC0906C(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09080(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09088(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09094(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09098(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090B0(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090B8(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090C8(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090D0(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090D8(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC090FC(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09104(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09108(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09128(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC09130(CPUState* cpu); -extern void SCPH1001_func_1FC08FFC_cont_BFC0913C(CPUState* cpu); -extern void SCPH1001_func_1FC09144(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC09158(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC0916C(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC09174(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC0917C(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC09188(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC09198(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC091A0(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC091A8(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC091AC(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC091B4(CPUState* cpu); -extern void SCPH1001_func_1FC09144_cont_BFC091BC(CPUState* cpu); -extern void SCPH1001_func_1FC091CC(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09208(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09224(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09228(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC0922C(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09238(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09240(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09244(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09250(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09258(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC0926C(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC09274(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC0927C(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC092A0(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC092B4(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC092C4(CPUState* cpu); -extern void SCPH1001_func_1FC091CC_cont_BFC092C8(CPUState* cpu); -extern void SCPH1001_func_1FC092EC(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0932C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09334(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09348(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0934C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09350(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0935C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09364(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09368(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09374(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09380(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09390(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09398(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093A4(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093B4(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093BC(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093C0(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093CC(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093D4(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC093F8(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09400(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09420(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09424(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09434(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09440(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09448(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09454(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0945C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09464(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09470(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0947C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09480(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09490(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09498(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC0949C(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094A8(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094B0(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094D4(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094DC(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094E4(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094EC(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC094F0(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09510(CPUState* cpu); -extern void SCPH1001_func_1FC092EC_cont_BFC09518(CPUState* cpu); -extern void SCPH1001_func_1FC09540(CPUState* cpu); -extern void SCPH1001_func_1FC09540_cont_BFC09568(CPUState* cpu); -extern void SCPH1001_func_1FC09540_cont_BFC09578(CPUState* cpu); -extern void SCPH1001_func_1FC09540_cont_BFC09580(CPUState* cpu); -extern void SCPH1001_func_1FC09540_cont_BFC0958C(CPUState* cpu); -extern void SCPH1001_func_1FC09598(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC095F4(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC095F8(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09618(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09630(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC0963C(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09644(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC0964C(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09650(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09668(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09670(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09678(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09680(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC09688(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC0968C(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096B0(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096C0(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096C8(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096D8(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096E0(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096E8(CPUState* cpu); -extern void SCPH1001_func_1FC09598_cont_BFC096F0(CPUState* cpu); -extern void SCPH1001_func_1FC09720(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09774(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC0977C(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09790(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09798(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097A0(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097A8(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097AC(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097DC(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097E4(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC097F8(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09804(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC0980C(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09814(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09820(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09824(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC0982C(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09834(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09840(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09848(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09850(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC0985C(CPUState* cpu); -extern void SCPH1001_func_1FC09720_cont_BFC09860(CPUState* cpu); -extern void SCPH1001_func_1FC09890(CPUState* cpu); -extern void SCPH1001_func_1FC0989C(CPUState* cpu); -extern void SCPH1001_func_1FC098A8(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC098C0(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC098C8(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC098E0(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC098F8(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC09900(CPUState* cpu); -extern void SCPH1001_func_1FC098A8_cont_BFC09904(CPUState* cpu); -extern void SCPH1001_func_1FC09914(CPUState* cpu); -extern void SCPH1001_func_1FC09914_cont_BFC0992C(CPUState* cpu); -extern void SCPH1001_func_1FC09914_cont_BFC09934(CPUState* cpu); -extern void SCPH1001_func_1FC09914_cont_BFC0993C(CPUState* cpu); -extern void SCPH1001_func_1FC0994C(CPUState* cpu); -extern void SCPH1001_func_1FC0994C_cont_BFC0995C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099A8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099AC(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099C8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099D0(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099D8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099E8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099F4(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC099FC(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A04(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A08(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A14(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A1C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A2C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A38(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A48(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A80(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A94(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09A98(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09AA4(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09AC0(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09AD4(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09AD8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09AF0(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B04(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B14(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B4C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B70(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B90(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09B98(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09BA8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09BB8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09BC0(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09BD4(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09BE4(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C00(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C18(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C1C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C28(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C30(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C40(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C58(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C60(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C70(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C7C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09C8C(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09CA8(CPUState* cpu); -extern void SCPH1001_func_1FC0996C_cont_BFC09CC4(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09CF8(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09CFC(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09D18(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09D20(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09D28(CPUState* cpu); -extern void SCPH1001_func_1FC09CDC_cont_BFC09D2C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09D84(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09D88(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DA4(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DAC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DB4(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DC8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DD8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DEC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09DFC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09E20(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09E24(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09E34(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09E4C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09E5C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09EB4(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09EBC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09ED8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09EEC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F00(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F10(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F1C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F20(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F30(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F3C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F50(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F68(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F70(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F78(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F80(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F88(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F8C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09F9C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FA4(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FA8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FB8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FCC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FD8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FE8(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FEC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC09FFC(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC0A00C(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC0A034(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC0A044(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC0A048(CPUState* cpu); -extern void SCPH1001_func_1FC09D3C_cont_BFC0A060(CPUState* cpu); -extern void SCPH1001_func_1FC0A080(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A0C8(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A0CC(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A0E8(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A0F0(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A0F8(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A10C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A11C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A130(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A140(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A164(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A168(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A178(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A190(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A1A0(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A1F8(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A200(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A21C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A230(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A244(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A254(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A260(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A264(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A284(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A290(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2A4(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2BC(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2C4(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2CC(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2D4(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2DC(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2E0(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2F0(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2F8(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A2FC(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A30C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A320(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A32C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A33C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A340(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A350(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A360(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A388(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A398(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A39C(CPUState* cpu); -extern void SCPH1001_func_1FC0A080_cont_BFC0A3B4(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A3E0(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A400(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A414(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A420(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A428(CPUState* cpu); -extern void SCPH1001_func_1FC0A3D4_cont_BFC0A42C(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A44C(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A454(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A458(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A468(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A470(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A478(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A488(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A498(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A4A0(CPUState* cpu); -extern void SCPH1001_func_1FC0A43C_cont_BFC0A4AC(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A4D8(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A4DC(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A4F8(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A508(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A51C(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A548(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A560(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A570(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A5C4(CPUState* cpu); -extern void SCPH1001_func_1FC0A4B4_cont_BFC0A5D4(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A60C(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A610(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A62C(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A634(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A640(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A64C(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A654(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A65C(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A660(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A678(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A688(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A694(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6A4(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6AC(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6B0(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6C4(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6CC(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6D4(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6DC(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A6F0(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A700(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A714(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A718(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A728(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A72C(CPUState* cpu); -extern void SCPH1001_func_1FC0A5E4_cont_BFC0A744(CPUState* cpu); -extern void SCPH1001_func_1FC0A754(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A774(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7A0(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7A4(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7BC(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7C4(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7CC(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7DC(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7E8(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7F0(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A7FC(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A804(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A824(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A834(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A840(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A848(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A854(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A85C(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A87C(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A88C(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A8A4(CPUState* cpu); -extern void SCPH1001_func_1FC0A754_cont_BFC0A8A8(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A8E0(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A8E4(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A900(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A908(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A918(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A924(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A92C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A934(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A93C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A94C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A958(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A96C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A984(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A99C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A9EC(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0A9F0(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA00(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA0C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA10(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA24(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA2C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA3C(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA44(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA48(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA50(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA68(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA80(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA90(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AA98(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AAB0(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AAC0(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AAD8(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AAE4(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AAF0(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB00(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB10(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB24(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB30(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB44(CPUState* cpu); -extern void SCPH1001_func_1FC0A8BC_cont_BFC0AB50(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AB94(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AB98(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABB4(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABBC(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABC8(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABD4(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABDC(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABE4(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABEC(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ABFC(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC08(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC18(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC1C(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC28(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC34(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC44(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC5C(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0AC74(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACA8(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACC8(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACD0(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACE0(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACF0(CPUState* cpu); -extern void SCPH1001_func_1FC0AB60_cont_BFC0ACF8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD2C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD30(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD4C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD54(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD64(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD70(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD78(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD80(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD88(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AD98(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADA4(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADB8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADC0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADD0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADE0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0ADF0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE24(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE34(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE3C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE50(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE54(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE64(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE6C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE70(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE84(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE8C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AE9C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AEA0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AEA8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AEC0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AED0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AED4(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AEE8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AEF0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF04(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF08(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF28(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF40(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF60(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF6C(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF78(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF80(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF84(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AF98(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFA0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFA4(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFAC(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFC8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFD0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFE8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFF0(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0AFF8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B010(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B024(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B028(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B034(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B040(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B050(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B060(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B074(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B080(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B094(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B0A4(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B0A8(CPUState* cpu); -extern void SCPH1001_func_1FC0AD08_cont_BFC0B0B4(CPUState* cpu); -extern void SCPH1001_func_1FC0B0C4(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B0F0(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B0F4(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B110(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B120(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B128(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B13C(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B148(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B158(CPUState* cpu); -extern void SCPH1001_func_1FC0B0D0_cont_BFC0B160(CPUState* cpu); -extern void SCPH1001_func_1FC0B170(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B19C(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1A0(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1B8(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1D0(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1D8(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1E8(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1F4(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B1FC(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B218(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B248(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B258(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B274(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B27C(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B290(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B298(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B2B8(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B2C0(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B2CC(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B2F8(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B30C(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B314(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B324(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B32C(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B34C(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B354(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B360(CPUState* cpu); -extern void SCPH1001_func_1FC0B170_cont_BFC0B37C(CPUState* cpu); -extern void SCPH1001_func_1FC0B394(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3A4(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3B8(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3BC(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3D8(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3E4(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3EC(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B3F4(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B438(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B450(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B464(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B468(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B488(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B498(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B4A4(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B4A8(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B4B0(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B4E0(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B4FC(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B530(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B534(CPUState* cpu); -extern void SCPH1001_func_1FC0B394_cont_BFC0B53C(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B55C(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B564(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B568(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B588(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B590(CPUState* cpu); -extern void SCPH1001_func_1FC0B54C_cont_BFC0B594(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5B0(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5B8(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5BC(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5DC(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5E4(CPUState* cpu); -extern void SCPH1001_func_1FC0B5A0_cont_BFC0B5E8(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B604(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B60C(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B610(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B630(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B638(CPUState* cpu); -extern void SCPH1001_func_1FC0B5F4_cont_BFC0B63C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B658(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B66C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B670(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B68C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B6A0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B6BC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B6E0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B6EC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B70C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B714(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B788(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B79C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7AC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7B0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7C0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7CC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7E8(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B7F4(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B818(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B828(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B834(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B84C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B850(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B864(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B8D8(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B8EC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B8FC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B900(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B920(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B92C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B948(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B954(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B9D0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B9E0(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0B9EC(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA04(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA10(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA2C(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA38(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA44(CPUState* cpu); -extern void SCPH1001_func_1FC0B648_cont_BFC0BA6C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BA98(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BAA0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BABC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BAC4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BACC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BAD4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BAF4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB00(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB04(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB20(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB28(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB48(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB58(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB80(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BB9C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BBA8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BBC4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BBCC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BBF4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BBFC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BC14(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BC1C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BC5C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BC64(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BC8C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BCA0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BCAC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BCC8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BCD0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BCFC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD18(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD2C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD38(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD44(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD5C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD74(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD84(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BD94(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BDB8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BDBC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BDCC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BDD4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BDD8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE04(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE0C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE1C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE28(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE38(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE44(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE50(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE74(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BE90(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEA0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEAC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEB8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEBC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEDC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEF4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BEFC(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BF38(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BF60(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BF74(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BF80(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BF9C(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFA4(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFB0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFB8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFD8(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFE0(CPUState* cpu); -extern void SCPH1001_func_1FC0BA8C_cont_BFC0BFE4(CPUState* cpu); -extern void SCPH1001_func_1FC0BFF0(CPUState* cpu); -extern void SCPH1001_func_1FC0BFF0_cont_BFC0C038(CPUState* cpu); -extern void SCPH1001_func_1FC0C048(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C070(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C074(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C090(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C0B0(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C0B8(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C0C8(CPUState* cpu); -extern void SCPH1001_func_1FC0C048_cont_BFC0C0CC(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C0F8(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C0FC(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C114(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C120(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C12C(CPUState* cpu); -extern void SCPH1001_func_1FC0C0DC_cont_BFC0C130(CPUState* cpu); -extern void SCPH1001_func_1FC0C140(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C168(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C16C(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C190(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C1A0(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C1AC(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C1B0(CPUState* cpu); -extern void SCPH1001_func_1FC0C140_cont_BFC0C1CC(CPUState* cpu); -extern void SCPH1001_func_1FC0C1DC(CPUState* cpu); -extern void SCPH1001_func_1FC0C1FC(CPUState* cpu); -extern void SCPH1001_func_1FC0C1FC_cont_BFC0C210(CPUState* cpu); -extern void SCPH1001_func_1FC0C220(CPUState* cpu); -extern void SCPH1001_func_1FC0C220_cont_BFC0C238(CPUState* cpu); -extern void SCPH1001_func_1FC0C248(CPUState* cpu); -extern void SCPH1001_func_1FC0C248_cont_BFC0C260(CPUState* cpu); -extern void SCPH1001_func_1FC0C270(CPUState* cpu); -extern void SCPH1001_func_1FC0C270_cont_BFC0C288(CPUState* cpu); -extern void SCPH1001_func_1FC0C298(CPUState* cpu); -extern void SCPH1001_func_1FC0C298_cont_BFC0C2B0(CPUState* cpu); -extern void SCPH1001_func_1FC0C2C0(CPUState* cpu); -extern void SCPH1001_func_1FC0C2C0_cont_BFC0C2D8(CPUState* cpu); -extern void SCPH1001_func_1FC0C2E8(CPUState* cpu); -extern void SCPH1001_func_1FC0C2E8_cont_BFC0C2F8(CPUState* cpu); -extern void SCPH1001_func_1FC0C2E8_cont_BFC0C300(CPUState* cpu); -extern void SCPH1001_func_1FC0C2E8_cont_BFC0C308(CPUState* cpu); -extern void SCPH1001_func_1FC0C318(CPUState* cpu); -extern void SCPH1001_func_1FC0C318_cont_BFC0C32C(CPUState* cpu); -extern void SCPH1001_func_1FC0C318_cont_BFC0C33C(CPUState* cpu); -extern void SCPH1001_func_1FC0C318_cont_BFC0C344(CPUState* cpu); -extern void SCPH1001_func_1FC0C354(CPUState* cpu); -extern void SCPH1001_func_1FC0C354_cont_BFC0C36C(CPUState* cpu); -extern void SCPH1001_func_1FC0C354_cont_BFC0C37C(CPUState* cpu); -extern void SCPH1001_func_1FC0C354_cont_BFC0C38C(CPUState* cpu); -extern void SCPH1001_func_1FC0C354_cont_BFC0C39C(CPUState* cpu); -extern void SCPH1001_func_1FC0C580(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C598(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C5AC(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C5B4(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C5F4(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C608(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C60C(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C638(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C640(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C648(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C660(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C664(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C678(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C69C(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C6A4(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C6BC(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C6C0(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C6D4(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C6F8(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C700(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C708(CPUState* cpu); -extern void SCPH1001_func_1FC0C580_cont_BFC0C710(CPUState* cpu); -extern void SCPH1001_func_1FC0C720(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C738(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C750(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C758(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C790(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7A4(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7A8(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7D4(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7DC(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7E4(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7F0(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C7FC(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C804(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C80C(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C814(CPUState* cpu); -extern void SCPH1001_func_1FC0C720_cont_BFC0C818(CPUState* cpu); -extern void SCPH1001_func_1FC0C830(CPUState* cpu); -extern void SCPH1001_func_1FC0C830_cont_BFC0C84C(CPUState* cpu); -extern void SCPH1001_func_1FC0C830_cont_BFC0C854(CPUState* cpu); -extern void SCPH1001_func_1FC0C830_cont_BFC0C860(CPUState* cpu); -extern void SCPH1001_func_1FC0C830_cont_BFC0C868(CPUState* cpu); -extern void SCPH1001_func_1FC0C830_cont_BFC0C874(CPUState* cpu); -extern void SCPH1001_func_1FC0C890(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C8B0(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C8C0(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C8D0(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C8F0(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C8FC(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C908(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C914(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C920(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C944(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C950(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C95C(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C968(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C974(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C994(CPUState* cpu); -extern void SCPH1001_func_1FC0C890_cont_BFC0C9B4(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0C9EC(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0C9FC(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA0C(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA38(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA44(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA50(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA5C(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA68(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA74(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CA90(CPUState* cpu); -extern void SCPH1001_func_1FC0C9CC_cont_BFC0CAA4(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CAD4(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB00(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB0C(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB14(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB1C(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB28(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB30(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB44(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB58(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB60(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB74(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB88(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CB9C(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CBA4(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CBD0(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CBE0(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CBEC(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC00(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC10(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC28(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC40(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC4C(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC58(CPUState* cpu); -extern void SCPH1001_func_1FC0CAB4_cont_BFC0CC5C(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCAC(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCB8(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCC0(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCC8(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCD0(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCD8(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCE0(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCE8(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCF4(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CCFC(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD04(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD0C(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD20(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD34(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD44(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD4C(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD54(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD58(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD64(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD68(CPUState* cpu); -extern void SCPH1001_func_1FC0CC68_cont_BFC0CD6C(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CDAC(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CDB8(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CDE4(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CDF0(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CDF8(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE08(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE14(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE20(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE2C(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE40(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE4C(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE74(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE78(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CE94(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CEA8(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CEAC(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CED0(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CED4(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CEF0(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF00(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF14(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF18(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF20(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF2C(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF6C(CPUState* cpu); -extern void SCPH1001_func_1FC0CD80_cont_BFC0CF78(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CF8C(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CF94(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CF9C(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFA4(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFAC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFB4(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFBC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFC4(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFCC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFD4(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFDC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFE4(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFEC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFF0(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0CFF8(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D000(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D008(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D010(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D018(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D020(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D028(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D030(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D03C(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D044(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D050(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D058(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D060(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D068(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D074(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D07C(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D088(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D090(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D098(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D0A0(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D0A8(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D0B0(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D0BC(CPUState* cpu); -extern void SCPH1001_func_1FC0CF84_cont_BFC0D0C4(CPUState* cpu); -extern void SCPH1001_func_1FC0D0CC(CPUState* cpu); -extern void SCPH1001_func_1FC0D0CC_cont_BFC0D0E0(CPUState* cpu); -extern void SCPH1001_func_1FC0D0CC_cont_BFC0D0F0(CPUState* cpu); -extern void SCPH1001_func_1FC0D0CC_cont_BFC0D0FC(CPUState* cpu); -extern void SCPH1001_func_1FC0D0CC_cont_BFC0D108(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D150(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D158(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D15C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D164(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D178(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D17C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D1A0(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D1A4(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D1C0(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D1EC(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D1F0(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D20C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D218(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D22C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D230(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D238(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D240(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D244(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D24C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D25C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D26C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D28C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D298(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2AC(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2C0(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2CC(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2D4(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2E4(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D2EC(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D318(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D31C(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D338(CPUState* cpu); -extern void SCPH1001_func_1FC0D11C_cont_BFC0D33C(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D39C(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3A4(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3B8(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3BC(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3D8(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3EC(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D3F4(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D400(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D414(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D41C(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D444(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D448(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D464(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D468(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D470(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D498(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D49C(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D4B8(CPUState* cpu); -extern void SCPH1001_func_1FC0D34C_cont_BFC0D4BC(CPUState* cpu); -extern void SCPH1001_func_1FC0D4CC(CPUState* cpu); -extern void SCPH1001_func_1FC0D4CC_cont_BFC0D4E0(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D500(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D51C(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D534(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D540(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D54C(CPUState* cpu); -extern void SCPH1001_func_1FC0D4F0_cont_BFC0D564(CPUState* cpu); -extern void SCPH1001_func_1FC0D570(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D588(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D59C(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5A4(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5AC(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5B8(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5C0(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5C8(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5D4(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5DC(CPUState* cpu); -extern void SCPH1001_func_1FC0D570_cont_BFC0D5F0(CPUState* cpu); -extern void SCPH1001_func_1FC0D600(CPUState* cpu); -extern void SCPH1001_func_1FC0D600_cont_BFC0D628(CPUState* cpu); -extern void SCPH1001_func_1FC0D600_cont_BFC0D638(CPUState* cpu); -extern void SCPH1001_func_1FC0D640(CPUState* cpu); -extern void SCPH1001_func_1FC0D664(CPUState* cpu); -extern void SCPH1001_func_1FC0D688(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D6B4(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D6E0(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D6E8(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D6F4(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D6FC(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D704(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D70C(CPUState* cpu); -extern void SCPH1001_func_1FC0D688_cont_BFC0D710(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D73C(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D744(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D764(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D76C(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D774(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D77C(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D780(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D788(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D790(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D798(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D7A0(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D7A8(CPUState* cpu); -extern void SCPH1001_func_1FC0D72C_cont_BFC0D7AC(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D7CC(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D7D4(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D7F4(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D7FC(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D804(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D80C(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D810(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D818(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D820(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D828(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D830(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D838(CPUState* cpu); -extern void SCPH1001_func_1FC0D7BC_cont_BFC0D83C(CPUState* cpu); -extern void SCPH1001_func_1FC0D850(CPUState* cpu); -extern void SCPH1001_func_1FC0D850_cont_BFC0D864(CPUState* cpu); -extern void SCPH1001_func_1FC0D850_cont_BFC0D874(CPUState* cpu); -extern void SCPH1001_func_1FC0D880(CPUState* cpu); -extern void SCPH1001_func_1FC0D890(CPUState* cpu); -extern void SCPH1001_func_1FC0D8A0(CPUState* cpu); -extern void SCPH1001_func_1FC0D8B0(CPUState* cpu); -extern void SCPH1001_func_1FC0D8C0(CPUState* cpu); -extern void SCPH1001_func_1FC0D8D0(CPUState* cpu); -extern void SCPH1001_func_1FC0D8E0(CPUState* cpu); -extern void SCPH1001_func_1FC0D8F0(CPUState* cpu); -extern void SCPH1001_func_1FC0D900(CPUState* cpu); -extern void SCPH1001_func_1FC0D910(CPUState* cpu); -extern void SCPH1001_func_1FC0D920(CPUState* cpu); -extern void SCPH1001_func_1FC0D930(CPUState* cpu); -extern void SCPH1001_func_1FC0D940(CPUState* cpu); -extern void SCPH1001_func_1FC0D950(CPUState* cpu); -extern void SCPH1001_func_1FC0D960(CPUState* cpu); -extern void SCPH1001_func_1FC0D970(CPUState* cpu); -extern void SCPH1001_func_1FC0D980(CPUState* cpu); -extern void SCPH1001_func_1FC0D990(CPUState* cpu); -extern void SCPH1001_func_1FC0D9A0(CPUState* cpu); -extern void SCPH1001_func_1FC0D9B0(CPUState* cpu); -extern void SCPH1001_func_1FC0D9C0(CPUState* cpu); -extern void SCPH1001_func_1FC0D9D0(CPUState* cpu); -extern void SCPH1001_func_1FC0D9E0(CPUState* cpu); -extern void SCPH1001_func_1FC0D9F0(CPUState* cpu); -extern void SCPH1001_func_1FC0DA00(CPUState* cpu); -extern void SCPH1001_func_1FC0DA10(CPUState* cpu); -extern void SCPH1001_func_1FC0DA20(CPUState* cpu); -extern void SCPH1001_func_1FC0DA30(CPUState* cpu); -extern void SCPH1001_func_1FC0DA40(CPUState* cpu); -extern void SCPH1001_func_1FC0DA50(CPUState* cpu); -extern void SCPH1001_func_1FC0DA60(CPUState* cpu); -extern void SCPH1001_func_1FC0DA70(CPUState* cpu); -extern void SCPH1001_func_1FC0DA80(CPUState* cpu); -extern void SCPH1001_func_1FC0DA90(CPUState* cpu); -extern void SCPH1001_func_1FC0DAA0(CPUState* cpu); -extern void SCPH1001_func_1FC0DAB0(CPUState* cpu); -extern void SCPH1001_func_1FC0DAC0(CPUState* cpu); -extern void SCPH1001_func_1FC0DAD0(CPUState* cpu); -extern void SCPH1001_func_1FC0DAE0(CPUState* cpu); -extern void SCPH1001_func_1FC0DAF0(CPUState* cpu); -extern void SCPH1001_func_1FC0DB00(CPUState* cpu); -extern void SCPH1001_func_1FC0DB10(CPUState* cpu); -extern void SCPH1001_func_1FC0DB20(CPUState* cpu); -extern void SCPH1001_func_1FC0DB30(CPUState* cpu); -extern void SCPH1001_func_1FC0DB40(CPUState* cpu); -extern void SCPH1001_func_1FC0DB50(CPUState* cpu); -extern void SCPH1001_func_1FC0DB60(CPUState* cpu); -extern void SCPH1001_func_1FC0DB70(CPUState* cpu); -extern void SCPH1001_func_1FC0DB80(CPUState* cpu); -extern void SCPH1001_func_1FC0DB90(CPUState* cpu); -extern void SCPH1001_func_1FC0DBA0(CPUState* cpu); -extern void SCPH1001_func_1FC0DBB0(CPUState* cpu); -extern void SCPH1001_func_1FC0DBC0(CPUState* cpu); -extern void SCPH1001_func_1FC0DBD0(CPUState* cpu); -extern void SCPH1001_func_1FC0DBE0(CPUState* cpu); -extern void SCPH1001_func_1FC0DBF0(CPUState* cpu); -extern void SCPH1001_func_1FC0DC00(CPUState* cpu); -extern void SCPH1001_func_1FC0DC10(CPUState* cpu); -extern void SCPH1001_func_1FC0DC20(CPUState* cpu); -extern void SCPH1001_func_1FC0DC30(CPUState* cpu); -extern void SCPH1001_func_1FC0DC40(CPUState* cpu); -extern void SCPH1001_func_1FC0DC50(CPUState* cpu); -extern void SCPH1001_func_1FC18000(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18010(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC1802C(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18034(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18060(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18068(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18070(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18078(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18088(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18090(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18098(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180A0(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180A8(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180B0(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180B8(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180C0(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC180FC(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18104(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC1810C(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18118(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18120(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18128(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18130(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18144(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18158(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18160(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18168(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18170(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18184(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC1818C(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18194(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC1819C(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181C4(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181CC(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181D4(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181DC(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181E4(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC181E8(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18208(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC1821C(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18228(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18230(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18244(CPUState* cpu); -extern void SCPH1001_func_1FC18000_cont_BFC18248(CPUState* cpu); -extern void SCPH1001_func_1FC18254(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1826C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1827C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18284(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1828C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18298(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182A8(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182B0(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182C0(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182D4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182E8(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC182FC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18300(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1831C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18330(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18344(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18360(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18374(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1837C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18384(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183A0(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183BC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183D4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183DC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183E4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183EC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183F4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC183FC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18404(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18418(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18440(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18454(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1845C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18464(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18474(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18484(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18494(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184A4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184B4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184C8(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184D0(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184E4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184EC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184F4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC184FC(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1850C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1851C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1852C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18534(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18548(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18560(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18568(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18578(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1858C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1859C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC185C8(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC185F4(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18600(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18618(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18628(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18638(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18640(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18648(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC1865C(CPUState* cpu); -extern void SCPH1001_func_1FC18254_cont_BFC18670(CPUState* cpu); -extern void SCPH1001_func_1FC18684(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186A0(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186A8(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186B0(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186C4(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186D8(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186E0(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186E8(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186F0(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC186F8(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18700(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18708(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18710(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18718(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18720(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18728(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18730(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18738(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18740(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC1874C(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18754(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC1875C(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18764(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC1876C(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18774(CPUState* cpu); -extern void SCPH1001_func_1FC18684_cont_BFC18778(CPUState* cpu); -extern void SCPH1001_func_1FC18788(CPUState* cpu); -extern void SCPH1001_func_1FC18798(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC187B8(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC187C8(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC187D4(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC187E4(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC187F8(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18808(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18818(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18828(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC1883C(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18848(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18854(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC1885C(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC1886C(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC1887C(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18884(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC18898(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC188A0(CPUState* cpu); -extern void SCPH1001_func_1FC18798_cont_BFC188A4(CPUState* cpu); -extern void SCPH1001_func_1FC188B4(CPUState* cpu); -extern void SCPH1001_func_1FC188B4_cont_BFC188C0(CPUState* cpu); -extern void SCPH1001_func_1FC188B4_cont_BFC188DC(CPUState* cpu); -extern void SCPH1001_func_1FC188F0(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18900(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC1891C(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18930(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18940(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18948(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18958(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18960(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18968(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18974(CPUState* cpu); -extern void SCPH1001_func_1FC188F0_cont_BFC18978(CPUState* cpu); -extern void SCPH1001_func_1FC18990(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC189A4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC189B0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC189D0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC189E4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC189F8(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A00(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A14(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A28(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A3C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A44(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A5C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A70(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A7C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18A90(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18AA4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18AB8(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18AC0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18AC8(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18ADC(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18AF0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B04(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B0C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B14(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B1C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B30(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B38(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B40(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B48(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B50(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B58(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B7C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B84(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B8C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18B94(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18BA4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18BB8(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18BCC(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18BDC(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18BF0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C04(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C0C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C14(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C2C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C3C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C50(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C58(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C60(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C6C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C7C(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18C90(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18CA4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18CB8(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18CCC(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18CE0(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18CF4(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18D00(CPUState* cpu); -extern void SCPH1001_func_1FC18990_cont_BFC18D04(CPUState* cpu); -extern void SCPH1001_func_1FC18D10(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D2C(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D34(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D44(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D54(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D5C(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D78(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18D98(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18DB8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18DD8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18DEC(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18DF4(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E20(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E3C(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E48(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E54(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E60(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E78(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18E90(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18EA8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18EC0(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18ED8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18EF0(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18F48(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC18FC8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19050(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC190D0(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19150(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC191D0(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19250(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19280(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19288(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC19294(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC1929C(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC192A4(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC192B0(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC192B8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC192C8(CPUState* cpu); -extern void SCPH1001_func_1FC18D10_cont_BFC192D4(CPUState* cpu); -extern void SCPH1001_func_1FC192E4(CPUState* cpu); -extern void SCPH1001_func_1FC192E4_cont_BFC192FC(CPUState* cpu); -extern void SCPH1001_func_1FC192E4_cont_BFC193A4(CPUState* cpu); -extern void SCPH1001_func_1FC193C0(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC193E8(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC193FC(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19408(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19418(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC1942C(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19440(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19454(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19468(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19488(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC194C0(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC194F0(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC19508(CPUState* cpu); -extern void SCPH1001_func_1FC193C0_cont_BFC1951C(CPUState* cpu); -extern void SCPH1001_func_1FC1952C(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC19544(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC19558(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC1957C(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC19598(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC195D8(CPUState* cpu); -extern void SCPH1001_func_1FC1952C_cont_BFC19614(CPUState* cpu); -extern void SCPH1001_func_1FC19630(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19650(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19658(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19660(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19684(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19688(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC19698(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC1969C(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC196A8(CPUState* cpu); -extern void SCPH1001_func_1FC19630_cont_BFC196B8(CPUState* cpu); -extern void SCPH1001_func_1FC196C8(CPUState* cpu); -extern void SCPH1001_func_1FC196D4(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC196F4(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19704(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1970C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1972C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1973C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19754(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19760(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19770(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19780(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1979C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197AC(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197BC(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197C8(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197CC(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197D8(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197E4(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC197F0(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19834(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1983C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19840(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19848(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1993C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19944(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19958(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19960(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19968(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19970(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19984(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19998(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC1999C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199C4(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199D8(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199DC(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199E4(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199E8(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC199FC(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19A18(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19A2C(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19A38(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19A44(CPUState* cpu); -extern void SCPH1001_func_1FC196D4_cont_BFC19A48(CPUState* cpu); -extern void SCPH1001_func_1FC19A58(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19A74(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AAC(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AB4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AC4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AD8(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AE0(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AE4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19AF0(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B04(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B0C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B10(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B1C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B30(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B38(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B3C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B48(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B5C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B60(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B90(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19B94(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19BEC(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19BF0(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19C30(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19C54(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19C74(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19C80(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CB4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CC0(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CD4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CE4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CE8(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CF4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19CFC(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D04(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D0C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D18(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D20(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D28(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D3C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D54(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D5C(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D74(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19D94(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19DBC(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19DC8(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19DD4(CPUState* cpu); -extern void SCPH1001_func_1FC19A58_cont_BFC19DDC(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E24(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E4C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E5C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E6C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E74(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E78(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E90(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19E94(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EA0(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EAC(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EB8(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EC8(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19ED4(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EDC(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EE4(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19EF4(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F04(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F10(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F20(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F28(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F30(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F4C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F50(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F5C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F74(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19F8C(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19FA4(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19FAC(CPUState* cpu); -extern void SCPH1001_func_1FC19DF4_cont_BFC19FB0(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC19FE8(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A00C(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A014(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A01C(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A024(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A02C(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A034(CPUState* cpu); -extern void SCPH1001_func_1FC19FD0_cont_BFC1A040(CPUState* cpu); -extern void SCPH1001_func_1FC1A050(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A068(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A070(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A084(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A098(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A0AC(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A0B4(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A0BC(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A0D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A0F4(CPUState* cpu); -extern void SCPH1001_func_1FC1A050_cont_BFC1A10C(CPUState* cpu); -extern void SCPH1001_func_1FC1A11C(CPUState* cpu); -extern void SCPH1001_func_1FC1A11C_cont_BFC1A134(CPUState* cpu); -extern void SCPH1001_func_1FC1A11C_cont_BFC1A14C(CPUState* cpu); -extern void SCPH1001_func_1FC1A15C(CPUState* cpu); -extern void SCPH1001_func_1FC1A15C_cont_BFC1A16C(CPUState* cpu); -extern void SCPH1001_func_1FC1A17C(CPUState* cpu); -extern void SCPH1001_func_1FC1A17C_cont_BFC1A18C(CPUState* cpu); -extern void SCPH1001_func_1FC1A19C(CPUState* cpu); -extern void SCPH1001_func_1FC1A19C_cont_BFC1A1AC(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A1D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A1DC(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A1E4(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A1F0(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A1F8(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A204(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A20C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A218(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A220(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A22C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A234(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A240(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A248(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A254(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A25C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A268(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A270(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A27C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A284(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A290(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2B8(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2C0(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2CC(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2E0(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2E8(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2F0(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A2F8(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A300(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A308(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A310(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A318(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A320(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A328(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A33C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A344(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A348(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A34C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A354(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A358(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A360(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A368(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A378(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A380(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A38C(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A394(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A3A0(CPUState* cpu); -extern void SCPH1001_func_1FC1A1BC_cont_BFC1A3A8(CPUState* cpu); -extern void SCPH1001_func_1FC1A3B8(CPUState* cpu); -extern void SCPH1001_func_1FC1A3B8_cont_BFC1A400(CPUState* cpu); -extern void SCPH1001_func_1FC1A3B8_cont_BFC1A40C(CPUState* cpu); -extern void SCPH1001_func_1FC1A414(CPUState* cpu); -extern void SCPH1001_func_1FC1A420(CPUState* cpu); -extern void SCPH1001_func_1FC1A430(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A450(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A45C(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A460(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A468(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A470(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A484(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A48C(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A49C(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4AC(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4B4(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4C8(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4E4(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A4FC(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A504(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A50C(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A520(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A528(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A538(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A548(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A550(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A564(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A570(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A580(CPUState* cpu); -extern void SCPH1001_func_1FC1A430_cont_BFC1A5A0(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A5C8(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A5E0(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A5F4(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A608(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A61C(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A624(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A630(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A650(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A66C(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A674(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A67C(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A684(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A68C(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A694(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A69C(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6A4(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6AC(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6B4(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6BC(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6C4(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6CC(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6DC(CPUState* cpu); -extern void SCPH1001_func_1FC1A5B0_cont_BFC1A6E0(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A71C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A728(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A750(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A760(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A774(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A780(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A794(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7A8(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7BC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7C0(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7C8(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7DC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7E0(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7EC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A7F4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A80C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A814(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A818(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A820(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A82C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A838(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A840(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A854(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A85C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A864(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A870(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A87C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A884(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A898(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8AC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8B4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8C0(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8CC(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8D4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8D8(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8E0(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A8F8(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A908(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A92C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A940(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A964(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A970(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A974(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A980(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A9A4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A9C4(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1A9E8(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA00(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA18(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA30(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA44(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA5C(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA74(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA80(CPUState* cpu); -extern void SCPH1001_func_1FC1A6EC_cont_BFC1AA84(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AAA8(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AAB8(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AAD0(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AADC(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AAE8(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AAF4(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB00(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB10(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB20(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB30(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB40(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB50(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB64(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB70(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB74(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB78(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AB84(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1ABC0(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1ABC8(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1ABCC(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1ABD8(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AC14(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AC1C(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AC58(CPUState* cpu); -extern void SCPH1001_func_1FC1AA90_cont_BFC1AC5C(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AC80(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACA0(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACBC(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACC4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACCC(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACD4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACE8(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACF0(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACF4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ACFC(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD04(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD08(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD10(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD1C(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD34(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD50(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD5C(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD60(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD74(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD84(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD88(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD8C(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AD94(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADA4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADB4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADB8(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADC0(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADD4(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADF0(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1ADFC(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AE04(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AE0C(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AE14(CPUState* cpu); -extern void SCPH1001_func_1FC1AC68_cont_BFC1AE18(CPUState* cpu); -extern void SCPH1001_func_1FC1AE24(CPUState* cpu); -extern void SCPH1001_func_1FC1AE34(CPUState* cpu); -extern void SCPH1001_func_1FC1AE34_cont_BFC1AE48(CPUState* cpu); -extern void SCPH1001_func_1FC1AE34_cont_BFC1AE60(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AE80(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AE94(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AEA8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AEBC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AEC4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AED0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AEE4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF04(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF18(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF28(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF3C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF44(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF4C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF50(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF64(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AF90(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFA0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFB8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFCC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFDC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFE0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1AFE8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B010(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B01C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B054(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B06C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B078(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B08C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0A0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0A8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0B0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0B8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0C8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0CC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0D4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B0E4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B100(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B110(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B11C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B120(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B128(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B130(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B140(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B150(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B174(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B17C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B190(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B1A4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B1AC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B1B4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B1DC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B1F4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B200(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B220(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B228(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B23C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B244(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B24C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B260(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B270(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B274(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B280(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B294(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2A0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2AC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2B0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2B8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2C8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2E4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2E8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B2F0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B308(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B31C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B324(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B328(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B33C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B344(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B358(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B36C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B378(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3B4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3C8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3D0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3D4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3E8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3F0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B3FC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B410(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B428(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B43C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B460(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B468(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B474(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B47C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B488(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B494(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4A4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4BC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4C4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4D0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4E8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B4F4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B508(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B528(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B538(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B54C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B560(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B56C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B58C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B59C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5A4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5BC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5C0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5C8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5E0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5EC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B5FC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B604(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B610(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B618(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B624(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B62C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B654(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B65C(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B664(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B670(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B680(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B688(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B690(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B698(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6A4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6B4(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6BC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6C8(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6D0(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6DC(CPUState* cpu); -extern void SCPH1001_func_1FC1AE68_cont_BFC1B6E0(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B704(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B718(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B738(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B748(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B764(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B774(CPUState* cpu); -extern void SCPH1001_func_1FC1B6EC_cont_BFC1B778(CPUState* cpu); -extern void SCPH1001_func_1FC1B784(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B7F8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B80C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B820(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B82C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B834(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B848(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B85C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B868(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B870(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B88C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8A8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8AC(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8B4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8D0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8D8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8E4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B8F0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B900(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B90C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B918(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B928(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B934(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B940(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B950(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B958(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B960(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B968(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B9B4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B9C8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B9D8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1B9EC(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA04(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA0C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA18(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA20(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA28(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA34(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA48(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA4C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA58(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA60(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA68(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA7C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BA90(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BAE8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BAF4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB0C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB10(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB18(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB20(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB2C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB44(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB5C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB60(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB68(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB74(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB7C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BB88(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBA0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBB8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBC4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBD0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBE8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BBF0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC0C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC10(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC18(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC20(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC2C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC3C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC50(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC60(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC68(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC74(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC90(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BC98(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BCA4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BCC0(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BCD8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BCE8(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BCF4(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BD0C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BD18(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BD1C(CPUState* cpu); -extern void SCPH1001_func_1FC1B7E0_cont_BFC1BD20(CPUState* cpu); -extern void SCPH1001_func_1FC1BD3C(CPUState* cpu); -extern void SCPH1001_func_1FC1BD58(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BD80(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BD98(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BDAC(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BDC0(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BDD4(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BDDC(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BDF8(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE14(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE1C(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE24(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE38(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE50(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE64(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE6C(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE78(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE80(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE88(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE90(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BE98(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BEA4(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BEB0(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BEB8(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BEC0(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BEC8(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BED0(CPUState* cpu); -extern void SCPH1001_func_1FC1BD68_cont_BFC1BED4(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BEF4(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BF08(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BF1C(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BF2C(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BF34(CPUState* cpu); -extern void SCPH1001_func_1FC1BEE0_cont_BFC1BF38(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BF64(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BF80(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BF90(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BFC8(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BFD4(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BFE4(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BFEC(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1BFF8(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C010(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C018(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C030(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C03C(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C048(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C054(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C05C(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C068(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C070(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C07C(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C094(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C09C(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C0B0(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C0B8(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C0D0(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C0D8(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C0EC(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C104(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C10C(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C114(CPUState* cpu); -extern void SCPH1001_func_1FC1BF44_cont_BFC1C11C(CPUState* cpu); -extern void SCPH1001_func_1FC1C130(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C154(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C15C(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C170(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C174(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C188(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C18C(CPUState* cpu); -extern void SCPH1001_func_1FC1C130_cont_BFC1C194(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C1C8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C1D4(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C1E4(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C1EC(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C1F8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C210(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C218(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C230(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C244(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C250(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C25C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C264(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C270(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C27C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C28C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C294(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C29C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C2A8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C2CC(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C2D0(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C2D8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C308(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C30C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C31C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C338(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C348(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C34C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C36C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C370(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C380(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3B0(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3C0(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3D4(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3D8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3DC(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3E4(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C3F8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C408(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C428(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C42C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C438(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C43C(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C448(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C454(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C460(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C488(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C4A0(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C4A8(CPUState* cpu); -extern void SCPH1001_func_1FC1C1A4_cont_BFC1C4B0(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C4D8(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C4EC(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C500(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C508(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C518(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C520(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C538(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C540(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C550(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C558(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C564(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C578(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C588(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C58C(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C594(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C598(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C5A0(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C5A8(CPUState* cpu); -extern void SCPH1001_func_1FC1C4C0_cont_BFC1C5AC(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C5D8(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C5E0(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C5F4(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C604(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C618(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C638(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C64C(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C65C(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C660(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C674(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C694(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C6AC(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C6C0(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C6C8(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C6D4(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C6E8(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C708(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C70C(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C714(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C720(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C738(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C73C(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C744(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C770(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C774(CPUState* cpu); -extern void SCPH1001_func_1FC1C5B8_cont_BFC1C77C(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7A4(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7B0(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7C0(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7C8(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7DC(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7F0(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C7FC(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C808(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C818(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C81C(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C824(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C830(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C838(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C840(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C854(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C868(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C870(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C874(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C87C(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C888(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C890(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8A8(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8BC(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8C4(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8C8(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8D0(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8DC(CPUState* cpu); -extern void SCPH1001_func_1FC1C78C_cont_BFC1C8E0(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC_cont_BFC1C904(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC_cont_BFC1C91C(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC_cont_BFC1C934(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC_cont_BFC1C93C(CPUState* cpu); -extern void SCPH1001_func_1FC1C8EC_cont_BFC1C96C(CPUState* cpu); -extern void SCPH1001_func_1FC1C978(CPUState* cpu); -extern void SCPH1001_func_1FC1C988(CPUState* cpu); -extern void SCPH1001_func_1FC1C998(CPUState* cpu); -extern void SCPH1001_func_1FC1C9A8(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1C9C8(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1C9DC(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1C9F0(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA00(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA14(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA1C(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA24(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA2C(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA34(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA38(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA48(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA50(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA58(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA5C(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA6C(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA74(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA7C(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA80(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA90(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CA98(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAA0(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAA4(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAB4(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CABC(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAC4(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAC8(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAD8(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAE0(CPUState* cpu); -extern void SCPH1001_func_1FC1C9B4_cont_BFC1CAE4(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB08(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB2C(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB34(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB3C(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB48(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB54(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB5C(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB68(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB70(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB7C(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB88(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB90(CPUState* cpu); -extern void SCPH1001_func_1FC1CAF0_cont_BFC1CB9C(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBCC(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBD8(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBE0(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBE4(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBF0(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CBF4(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CC3C(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CC88(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CC90(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CCB0(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CCB8(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CCCC(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CCDC(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CCF0(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CD00(CPUState* cpu); -extern void SCPH1001_func_1FC1CBAC_cont_BFC1CD30(CPUState* cpu); -extern void SCPH1001_func_1FC1CD40(CPUState* cpu); -extern void SCPH1001_func_1FC1CD40_cont_BFC1CD64(CPUState* cpu); -extern void SCPH1001_func_1FC1CD40_cont_BFC1CD68(CPUState* cpu); -extern void SCPH1001_func_1FC1CD70(CPUState* cpu); -extern void SCPH1001_func_1FC1CD80(CPUState* cpu); -extern void SCPH1001_func_1FC1CD90(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CDF0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE04(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE24(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE3C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE58(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE6C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE74(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE7C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE84(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CE8C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CEB0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CEC0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CED4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CEE8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CEF0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CEF8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF00(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF08(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF1C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF48(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF50(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF58(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CF6C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFA8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFBC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFC4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFE4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFF4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1CFF8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D000(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D028(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D03C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D054(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D068(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D078(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D090(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D0A0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D0E4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D118(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D130(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D144(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D154(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D16C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D17C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D190(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D1A4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D1A8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D1B0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D1EC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D220(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D234(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D244(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D260(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D268(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D288(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D294(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D2BC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D2C8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D2DC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D2F4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D304(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D324(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D348(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D368(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D384(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D388(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D39C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D3BC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D3F4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D414(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D42C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D44C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D454(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D468(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D470(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D480(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D4BC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D4F4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D508(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D514(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D528(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D53C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D550(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D58C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D59C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D5D0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D5E0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D5F0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D608(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D618(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D61C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D628(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D630(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D638(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D640(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D664(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D66C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D690(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D6A8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D6B8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D6D8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D6EC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D70C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D718(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D71C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D730(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D750(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D770(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D790(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D798(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D7AC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D7C0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D7D0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D804(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D814(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D81C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D824(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D850(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D86C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D874(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D87C(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8A8(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8B0(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8C4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8CC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8D4(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8DC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D8EC(CPUState* cpu); -extern void SCPH1001_func_1FC1CDD8_cont_BFC1D970(CPUState* cpu); -extern void SCPH1001_func_1FC1D980(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1D9F8(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA00(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA08(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA10(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA18(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA30(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA38(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA40(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA60(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA68(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA70(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA78(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA90(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DA98(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAA0(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAAC(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAB4(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAB8(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAC4(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAD8(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAF4(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DAFC(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB04(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB0C(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB20(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB30(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB48(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB60(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB74(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB78(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB90(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DB9C(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBAC(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBB0(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBB8(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBC4(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBD0(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBE0(CPUState* cpu); -extern void SCPH1001_func_1FC1D9C4_cont_BFC1DBE4(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DC04(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DC10(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DC54(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DCA4(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DCBC(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DCDC(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DCFC(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD1C(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD3C(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD5C(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD70(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD80(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DD90(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DDA0(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DDB0(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DDC0(CPUState* cpu); -extern void SCPH1001_func_1FC1DBF4_cont_BFC1DDC8(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DDF4(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DE44(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DE78(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DE90(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DEAC(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DEC4(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DED8(CPUState* cpu); -extern void SCPH1001_func_1FC1DDD8_cont_BFC1DEF0(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DF94(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DFB0(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DFD0(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DFD8(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DFEC(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1DFF4(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E024(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E03C(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E044(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E058(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E070(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E078(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E07C(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E084(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E09C(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E0A4(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E0A8(CPUState* cpu); -extern void SCPH1001_func_1FC1DF50_cont_BFC1E0B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E0C4(CPUState* cpu); -extern void SCPH1001_func_1FC1E0C4_cont_BFC1E0DC(CPUState* cpu); -extern void SCPH1001_func_1FC1E0C4_cont_BFC1E0FC(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E118(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E130(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E13C(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E160(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E18C(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E194(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E19C(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E1B0(CPUState* cpu); -extern void SCPH1001_func_1FC1E10C_cont_BFC1E1B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E1EC(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E208(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E210(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E218(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E228(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E260(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E268(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E28C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E294(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E2B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E2C0(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E2D0(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E2D8(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E2E0(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E300(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E308(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E314(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E31C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E324(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E32C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E33C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E344(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E350(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E358(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E36C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E374(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E37C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E384(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E38C(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E398(CPUState* cpu); -extern void SCPH1001_func_1FC1E1CC_cont_BFC1E3A4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3AC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3AC_cont_BFC1E3B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3AC_cont_BFC1E3BC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3C0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E3E4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E3F0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E410(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E42C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E448(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E450(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E474(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E47C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E48C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E4C0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E4DC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E4EC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E508(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E518(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E528(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E538(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E548(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E558(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E568(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E578(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E58C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5A4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5C4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5D0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5E4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5EC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E5FC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E624(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E630(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E640(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E64C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E654(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E668(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E67C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E688(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E694(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E6A4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E6BC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E6D4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E6E4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E6FC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E708(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E718(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E730(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E738(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E74C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E77C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E790(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E798(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7A0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7B0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7C4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7D8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E7E0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E800(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E80C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E824(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E840(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E84C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E864(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E86C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E874(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E880(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E89C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8AC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8CC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8DC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8E8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8F0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E8FC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E910(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E918(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E92C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E934(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E954(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E95C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E964(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E96C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E974(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E98C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9A0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9C8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9D0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9D8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1E9F8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA00(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA08(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA10(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA18(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA20(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA2C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA34(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA4C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA60(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA78(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EA84(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAA0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAA8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAB0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAC0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAC8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAD0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAE4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAEC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAF4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EAFC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB10(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB1C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB24(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB3C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB50(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB68(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB74(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB94(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EB9C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBA4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBAC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBB8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBC0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBC8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBDC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EBF0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC00(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC1C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC24(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC2C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC4C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC54(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC74(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EC7C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECA0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECA8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECB0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECD0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECD8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ECE0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED00(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED10(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED1C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED34(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED40(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED48(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED50(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED64(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED78(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED80(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED88(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED90(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1ED98(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EDA0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EDB4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EDD4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EDE4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EDF0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE08(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE14(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE1C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE24(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE2C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE34(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE48(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE5C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE70(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE78(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EE80(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEA0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEA8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEB0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEB8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEC0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EED4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEE0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EEEC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF00(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF28(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF34(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF38(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF40(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF4C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF50(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF5C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF84(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF8C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF90(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF94(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EF9C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EFA4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EFC4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EFEC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EFF4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1EFFC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F01C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F024(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F038(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F050(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F058(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F05C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F064(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F078(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F08C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0A0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0C0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0C8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0E0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F0E8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F108(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F124(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F128(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F130(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F138(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F148(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F154(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F160(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F178(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F180(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1C8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1D4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1E8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F1F4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F208(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F214(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F21C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F224(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F230(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F23C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F250(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F268(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F278(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F284(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F290(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2A0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2BC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2C4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2D0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2D8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F2F8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F308(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F31C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F32C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F340(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F348(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F360(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F364(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F370(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F37C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F388(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F394(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F39C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3AC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3C0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3D4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3E4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F3F8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F408(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F41C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F430(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F440(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F454(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F468(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F478(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F48C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F498(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4A8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4B4(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4B8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4CC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4E0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F4F8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F50C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F518(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F524(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F538(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F540(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F550(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F578(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F584(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F59C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F5B0(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F5CC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F5EC(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F5F8(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F600(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F608(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F61C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F624(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F638(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F640(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F648(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F654(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F668(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F670(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F678(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F680(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F694(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F69C(CPUState* cpu); -extern void SCPH1001_func_1FC1E3CC_cont_BFC1F6A0(CPUState* cpu); -extern void SCPH1001_func_1FC1F6AC(CPUState* cpu); -extern void SCPH1001_func_1FC1F6AC_cont_BFC1F6C8(CPUState* cpu); -extern void SCPH1001_func_1FC1F6AC_cont_BFC1F704(CPUState* cpu); -extern void SCPH1001_func_1FC1F6AC_cont_BFC1F73C(CPUState* cpu); -extern void SCPH1001_func_1FC1F6AC_cont_BFC1F754(CPUState* cpu); -extern void SCPH1001_func_1FC1F778(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F7B4(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F7D4(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F7DC(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F7E4(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F7F8(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F804(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F824(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F84C(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F858(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F860(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F868(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F86C(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F878(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F8A8(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F8D4(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F8DC(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F8E4(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F8F8(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F904(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F924(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F92C(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F934(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F948(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F954(CPUState* cpu); -extern void SCPH1001_func_1FC1F778_cont_BFC1F970(CPUState* cpu); -extern void SCPH1001_func_1FC1F980(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F998(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9BC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9C4(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9D0(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9D8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9E0(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9F4(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1F9F8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA0C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA14(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA1C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA24(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA2C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA34(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA44(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA50(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA54(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA78(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA80(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA88(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FA94(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FAA8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FABC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FADC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FAE8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FAFC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB10(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB18(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB20(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB40(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB48(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB4C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB54(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB5C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB80(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB84(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB8C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB94(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FB9C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBA4(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBAC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBB4(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBB8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBD8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBE0(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBE8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FBFC(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC04(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC18(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC20(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC28(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC30(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC38(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC40(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC50(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC5C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC60(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC84(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC8C(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FC94(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FCB8(CPUState* cpu); -extern void SCPH1001_func_1FC1F980_cont_BFC1FCBC(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC1FFC4(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC1FFD0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC1FFE4(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC1FFF0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20014(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2001C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20028(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20034(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2003C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20048(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2005C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20064(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20084(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2008C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20094(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC200B0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC200C0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC200C8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC200DC(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC200FC(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20104(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20110(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20124(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2012C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20140(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20150(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2016C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20174(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20188(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC201A8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC201BC(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC201C4(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC201D8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC201E8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20204(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2020C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2022C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20230(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20238(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20250(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20260(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC20268(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2027C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC2029C(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC202B0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC202BC(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC202C0(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC202C8(CPUState* cpu); -extern void SCPH1001_func_1FC1FFA8_cont_BFC202D0(CPUState* cpu); -extern void SCPH1001_func_1FC20338(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20348(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20350(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20364(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20378(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20380(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20394(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2039C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203A8(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203BC(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203C4(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203D0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203D8(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203E4(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC203F0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20404(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20410(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2041C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20428(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20430(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2043C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20450(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2045C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20464(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2046C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2048C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20490(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2049C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204A4(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204AC(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204C0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204D4(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204DC(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC204FC(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20510(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20528(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2053C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20550(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20558(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20560(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20580(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20584(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20590(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205A4(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205B8(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205C0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205CC(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205E0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205E8(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205F0(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC205F8(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20600(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20608(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20610(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20618(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2062C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20634(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC2063C(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20650(CPUState* cpu); -extern void SCPH1001_func_1FC20338_cont_BFC20670(CPUState* cpu); -extern void SCPH1001_func_1FC2069C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206AC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206B4(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206C8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206D0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206E8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206F0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC206FC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20704(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20718(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20728(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20730(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2073C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20744(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20758(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20764(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20770(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2077C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20784(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20790(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20798(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207AC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207C0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207C8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207D0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207D8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207EC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC207F8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20804(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2081C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20844(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20854(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20858(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20860(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2086C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20874(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20878(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20884(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC208AC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC208B4(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC208B8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC208BC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC208DC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20908(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20918(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20920(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20928(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20930(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20934(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2093C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20944(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2094C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2096C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20974(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC2097C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20990(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC209B0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC209D0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A04(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A1C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A24(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A28(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A30(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A38(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A40(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A60(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A68(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A70(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A84(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20A9C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20AD0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20AE8(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20AF0(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20AF4(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20AFC(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B04(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B0C(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B14(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B18(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B20(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B28(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B30(CPUState* cpu); -extern void SCPH1001_func_1FC2069C_cont_BFC20B50(CPUState* cpu); -extern void SCPH1001_func_1FC20B60(CPUState* cpu); -extern void SCPH1001_func_1FC20B60_cont_BFC20B74(CPUState* cpu); -extern void SCPH1001_func_1FC20B60_cont_BFC20B7C(CPUState* cpu); -extern void SCPH1001_func_1FC20B60_cont_BFC20B94(CPUState* cpu); -extern void SCPH1001_func_1FC20B9C(CPUState* cpu); -extern void SCPH1001_func_1FC20B9C_cont_BFC20BB0(CPUState* cpu); -extern void SCPH1001_func_1FC20B9C_cont_BFC20BB8(CPUState* cpu); -extern void SCPH1001_func_1FC20B9C_cont_BFC20BDC(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20BFC(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C08(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C18(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C20(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C2C(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C34(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C3C(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C44(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C50(CPUState* cpu); -extern void SCPH1001_func_1FC20BE4_cont_BFC20C54(CPUState* cpu); -extern void SCPH1001_func_1FC20C64(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20C80(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20C8C(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CAC(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CB4(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CB8(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CC0(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CC8(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CD0(CPUState* cpu); -extern void SCPH1001_func_1FC20C64_cont_BFC20CD4(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D00(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D0C(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D14(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D1C(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D20(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D28(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D30(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D38(CPUState* cpu); -extern void SCPH1001_func_1FC20CE4_cont_BFC20D3C(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D68(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D74(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D7C(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D84(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D88(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D90(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20D98(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20DA0(CPUState* cpu); -extern void SCPH1001_func_1FC20D4C_cont_BFC20DA4(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DC8(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DD4(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DDC(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DE4(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DE8(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DF0(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20DF8(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20E00(CPUState* cpu); -extern void SCPH1001_func_1FC20DB4_cont_BFC20E04(CPUState* cpu); -extern void SCPH1001_func_1FC20E10(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E24(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E30(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E38(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E40(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E44(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E4C(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E54(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E5C(CPUState* cpu); -extern void SCPH1001_func_1FC20E10_cont_BFC20E60(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20E80(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20E8C(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20E94(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20E9C(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20EA0(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20EA8(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20EB0(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20EB8(CPUState* cpu); -extern void SCPH1001_func_1FC20E6C_cont_BFC20EBC(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20EDC(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20EE8(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20EF0(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20EF8(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20EFC(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20F04(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20F0C(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20F14(CPUState* cpu); -extern void SCPH1001_func_1FC20EC8_cont_BFC20F18(CPUState* cpu); -extern void SCPH1001_func_1FC20F24(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F40(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F4C(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F54(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F5C(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F60(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F68(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F70(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F78(CPUState* cpu); -extern void SCPH1001_func_1FC20F24_cont_BFC20F7C(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FA0(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FAC(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FB4(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FBC(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FC0(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FC8(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FD0(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FD8(CPUState* cpu); -extern void SCPH1001_func_1FC20F8C_cont_BFC20FDC(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC20FFC(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21008(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21010(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21018(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC2101C(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21024(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC2102C(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21034(CPUState* cpu); -extern void SCPH1001_func_1FC20FE8_cont_BFC21038(CPUState* cpu); -extern void SCPH1001_func_1FC21044(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC21060(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC2106C(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC21074(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC2107C(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC21088(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC21090(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC21098(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC210A0(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC210AC(CPUState* cpu); -extern void SCPH1001_func_1FC21044_cont_BFC210B0(CPUState* cpu); -extern void SCPH1001_func_1FC210C0(CPUState* cpu); -extern void SCPH1001_func_1FC210C0_cont_BFC210DC(CPUState* cpu); -extern void SCPH1001_func_1FC210C0_cont_BFC210E8(CPUState* cpu); -extern void SCPH1001_func_1FC210F0(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC210F8(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC210FC(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC21104(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC2110C(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC21114(CPUState* cpu); -extern void SCPH1001_func_1FC210F0_cont_BFC21118(CPUState* cpu); -extern void SCPH1001_func_1FC21128(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC2113C(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21148(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21150(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21158(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC2115C(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21164(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC2116C(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21174(CPUState* cpu); -extern void SCPH1001_func_1FC21128_cont_BFC21178(CPUState* cpu); -extern void SCPH1001_func_1FC21184(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211A8(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211B4(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211C0(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211C8(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211CC(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211D4(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211E0(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211E8(CPUState* cpu); -extern void SCPH1001_func_1FC21184_cont_BFC211EC(CPUState* cpu); -extern void SCPH1001_func_1FC21200(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC21224(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC21228(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC21230(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC2123C(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC21244(CPUState* cpu); -extern void SCPH1001_func_1FC21200_cont_BFC21248(CPUState* cpu); -extern void SCPH1001_func_1FC2125C(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC21278(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC21284(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC2128C(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC21294(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC21298(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC212A0(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC212A8(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC212B0(CPUState* cpu); -extern void SCPH1001_func_1FC2125C_cont_BFC212B4(CPUState* cpu); -extern void SCPH1001_func_1FC212C4(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC212D8(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC212E4(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC212EC(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC212F4(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC212F8(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC21300(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC21308(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC21310(CPUState* cpu); -extern void SCPH1001_func_1FC212C4_cont_BFC21314(CPUState* cpu); -extern void SCPH1001_func_1FC21320(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC2133C(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21348(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21364(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC2136C(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21370(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21378(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21384(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC2138C(CPUState* cpu); -extern void SCPH1001_func_1FC21320_cont_BFC21390(CPUState* cpu); -extern void SCPH1001_func_1FC213A4(CPUState* cpu); -extern void SCPH1001_func_1FC213A4_cont_BFC213BC(CPUState* cpu); -extern void SCPH1001_func_1FC213A4_cont_BFC213C8(CPUState* cpu); -extern void SCPH1001_func_1FC213E8(CPUState* cpu); -extern void SCPH1001_func_1FC213F4(CPUState* cpu); -extern void SCPH1001_func_1FC213FC(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21428(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21430(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21438(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC2144C(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21460(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21468(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC2146C(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21474(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC21488(CPUState* cpu); -extern void SCPH1001_func_1FC213FC_cont_BFC2148C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC214CC(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC214E8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC214F0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21504(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2150C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21520(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21534(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2153C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21544(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21554(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21564(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21578(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21584(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21598(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC215F8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21608(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21610(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21628(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2163C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21648(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21658(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21660(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21668(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21674(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2167C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21684(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2168C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216A0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216B4(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216BC(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216C4(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216D0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216D8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216E4(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216EC(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC216F8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21700(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2170C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21714(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21720(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21748(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21750(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2175C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21764(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21770(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21778(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21780(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21788(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21794(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2179C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217A8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217B0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217C0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217C8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217D4(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217DC(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217E8(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC217F0(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21800(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21808(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21814(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2181C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21828(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21830(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21840(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21854(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC2185C(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21860(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21864(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21880(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21888(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC21898(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC218BC(CPUState* cpu); -extern void SCPH1001_func_1FC214B0_cont_BFC218C0(CPUState* cpu); -extern void SCPH1001_func_1FC218CC(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC218E0(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC218F4(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC218FC(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC21908(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC21910(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC21914(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC21924(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC2192C(CPUState* cpu); -extern void SCPH1001_func_1FC218CC_cont_BFC21930(CPUState* cpu); -extern void SCPH1001_func_1FC2193C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC2195C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC2196C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21974(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21984(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21988(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21990(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC2199C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A1C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A24(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A38(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A3C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A54(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A5C(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A68(CPUState* cpu); -extern void SCPH1001_func_1FC2193C_cont_BFC21A78(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21AB0(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21ADC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21AF0(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21AF8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B04(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B10(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B28(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B3C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B44(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B4C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B5C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B6C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B78(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21B7C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BA4(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BAC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BBC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BC8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BD8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21BE0(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21C38(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21C6C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21C78(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21C90(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D0C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D18(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D30(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D40(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D64(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D88(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21D9C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21DA4(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21DBC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21E38(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21E44(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21E5C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21E6C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21E90(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21EB4(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21EB8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F10(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F18(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F2C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F6C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F78(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21F90(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21FA0(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21FC4(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC21FE8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC22028(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC2207C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC2209C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220AC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220BC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220C8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220DC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220E8(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC220FC(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC22130(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC2214C(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC22154(CPUState* cpu); -extern void SCPH1001_func_1FC21A9C_cont_BFC22158(CPUState* cpu); -extern void SCPH1001_func_1FC22164(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22194(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221A0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221A8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221B8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221C8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221D0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221E0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221F0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC221F4(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2221C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22234(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2223C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22248(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22258(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22268(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22278(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22280(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222B0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222BC(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222C4(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222C8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222D4(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222E0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222F0(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC222F4(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22308(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2230C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22314(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22328(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22330(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2233C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2234C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22350(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22370(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC2238C(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22434(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC224B8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC224C8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC22530(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC225A8(CPUState* cpu); -extern void SCPH1001_func_1FC22164_cont_BFC226A8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC226E4(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC226F8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22700(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC2271C(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22724(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC2272C(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22734(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22740(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22748(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22750(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22758(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22760(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22768(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22770(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22778(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22780(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22788(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22790(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22798(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227A0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227A8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227B0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227B8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227C0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227CC(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227D4(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227DC(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227E0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227E8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227EC(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC227FC(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22804(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC2280C(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22810(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22820(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22830(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22840(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22850(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22870(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22878(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC2288C(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC22894(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC2289C(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228A4(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228B0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228B8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228C0(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228C8(CPUState* cpu); -extern void SCPH1001_func_1FC226D0_cont_BFC228CC(CPUState* cpu); -extern void SCPH1001_func_1FC228D8(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC228F0(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC2296C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC2297C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC229A4(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC229D0(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC229D8(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC229E0(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC229F8(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A18(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A38(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A58(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A6C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A7C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A8C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22A9C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22AA4(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22AAC(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22AB4(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22AC4(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22ACC(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B1C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B28(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B30(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B3C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B40(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B50(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B5C(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B64(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B70(CPUState* cpu); -extern void SCPH1001_func_1FC228D8_cont_BFC22B74(CPUState* cpu); -extern void SCPH1001_func_1FC22B80(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22B94(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BAC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BBC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BC4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BC8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BD0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BD8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BE0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BE8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BF0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22BF8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C00(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C14(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C20(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C28(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C2C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C34(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C3C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C44(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C48(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C58(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C60(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C68(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C6C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C80(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C88(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C94(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22C9C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CA0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CA4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CB0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CB8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CC0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CC4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CD4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CDC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CE8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CF0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22CF8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D08(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D10(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D14(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D1C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D20(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D38(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D40(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D44(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D4C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D54(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D64(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D68(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D74(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D7C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D80(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D90(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22D98(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DA0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DA8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DB0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DB8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DC0(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DC8(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DDC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DE4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DEC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DF4(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22DFC(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22E04(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22E0C(CPUState* cpu); -extern void SCPH1001_func_1FC22B80_cont_BFC22E10(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E30(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E3C(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E44(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E54(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E64(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E6C(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E74(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E7C(CPUState* cpu); -extern void SCPH1001_func_1FC22E1C_cont_BFC22E80(CPUState* cpu); -extern void SCPH1001_func_1FC22E90(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC22F60(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC22FC4(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC22FEC(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC22FF8(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC23004(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC23008(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC23014(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC23020(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC2303C(CPUState* cpu); -extern void SCPH1001_func_1FC22E90_cont_BFC23054(CPUState* cpu); -extern void SCPH1001_func_1FC23078(CPUState* cpu); -extern void SCPH1001_func_1FC23078_cont_BFC23098(CPUState* cpu); -extern void SCPH1001_func_1FC23078_cont_BFC230A0(CPUState* cpu); -extern void SCPH1001_func_1FC23078_cont_BFC230AC(CPUState* cpu); -extern void SCPH1001_func_1FC230C4(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC230D8(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC230E0(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC230E4(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC230F0(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC230F8(CPUState* cpu); -extern void SCPH1001_func_1FC230C4_cont_BFC23108(CPUState* cpu); -extern void SCPH1001_func_1FC2311C(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC23170(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC2317C(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC23184(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC2318C(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC231CC(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC231DC(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC231F0(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC2321C(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC23224(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC23230(CPUState* cpu); -extern void SCPH1001_func_1FC2311C_cont_BFC23234(CPUState* cpu); -extern void SCPH1001_func_1FC2324C(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC23294(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232A0(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232A8(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232B0(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232B4(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232BC(CPUState* cpu); -extern void SCPH1001_func_1FC2324C_cont_BFC232C0(CPUState* cpu); -extern void SCPH1001_func_1FC232DC(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC232FC(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC2332C(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC23344(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC23360(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC2337C(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC233C0(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC2340C(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC23450(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC23490(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC234D0(CPUState* cpu); -extern void SCPH1001_func_1FC232DC_cont_BFC234E0(CPUState* cpu); -extern void SCPH1001_func_1FC23500(CPUState* cpu); -extern void SCPH1001_func_1FC23500_cont_BFC2350C(CPUState* cpu); -extern void SCPH1001_func_1FC23500_cont_BFC23514(CPUState* cpu); -extern void SCPH1001_func_1FC23524(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23544(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23570(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC2357C(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235A4(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235A8(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235B0(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235C4(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235C8(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC235D0(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23620(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23628(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23630(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23634(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC2364C(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23660(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC236E8(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23770(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC237C0(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC237F4(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23828(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23858(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC238E0(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23968(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC239B0(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC239E4(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23A18(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23A48(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23A64(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23A74(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23A78(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23AA4(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23AB8(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23AC8(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23B3C(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23B48(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23B54(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23BCC(CPUState* cpu); -extern void SCPH1001_func_1FC23524_cont_BFC23C4C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23D5C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23D64(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23D74(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23D88(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23D90(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DA0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DB4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DB8(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DC0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DD4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DE4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23DF0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E00(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E10(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E20(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E2C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E38(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E4C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E54(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E70(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E7C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E8C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23E9C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23EB0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23EB4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23EC8(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23EE0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23EEC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F04(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F18(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F28(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F34(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F40(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F58(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F6C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F74(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F7C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23F98(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FA4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FB4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FC4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FD4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FF4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC23FFC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24014(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24028(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2403C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24058(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24064(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24074(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24084(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24094(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240BC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240CC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240D4(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240DC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240E0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC240EC(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24108(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24114(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24124(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24134(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24144(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2416C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2417C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24184(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2418C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC241B8(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC241D0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC241E0(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24208(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24218(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24228(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24238(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24248(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24250(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24254(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2425C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2426C(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24274(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC24278(CPUState* cpu); -extern void SCPH1001_func_1FC23D3C_cont_BFC2427C(CPUState* cpu); -extern void SCPH1001_func_1FC24288(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242A0(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242B4(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242C8(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242DC(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242E4(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242F8(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC242FC(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24304(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24308(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24314(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC2432C(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24334(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24338(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24340(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24350(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC2435C(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24390(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24398(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC243A0(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC243F8(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC24408(CPUState* cpu); -extern void SCPH1001_func_1FC24288_cont_BFC2440C(CPUState* cpu); -extern void SCPH1001_func_1FC24418(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC2443C(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC24454(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC2447C(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC24484(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC2449C(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC244C4(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC244CC(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC244D8(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC244EC(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC24550(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC24588(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC24598(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC245AC(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC245D4(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC245E8(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC245FC(CPUState* cpu); -extern void SCPH1001_func_1FC24418_cont_BFC2462C(CPUState* cpu); -extern void SCPH1001_func_1FC24640(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24664(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2467C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC246B8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC246C4(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC246F0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC246F8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC246FC(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24734(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24740(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2476C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24770(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC247CC(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC247D8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC247F0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC247F8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24800(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2480C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24814(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2482C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24830(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2489C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC248B0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC248C0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC248C8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC248FC(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24904(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2493C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24960(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24978(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24984(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24988(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24998(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC2499C(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249A4(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249A8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249B8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249D0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249D8(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249DC(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249E0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249F0(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC249FC(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24A00(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24A08(CPUState* cpu); -extern void SCPH1001_func_1FC24640_cont_BFC24A34(CPUState* cpu); -extern void SCPH1001_func_1FC24A48(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24A7C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24A94(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24AB0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24AC8(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24AE0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24AF0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24AFC(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B44(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B50(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B58(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B60(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B68(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B74(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24B7C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24BC4(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24BD8(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24BDC(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C00(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C1C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C34(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C40(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C88(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C94(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24C9C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24CA4(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24CAC(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24CB8(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24CC0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D3C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D48(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D54(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D60(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D68(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24D98(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24DA0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24DD8(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24DFC(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E14(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E20(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E24(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E34(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E38(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E40(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E44(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E54(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E6C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E74(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E78(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E7C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E8C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E98(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24E9C(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24EA4(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24EB0(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24EB4(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24EC8(CPUState* cpu); -extern void SCPH1001_func_1FC24A48_cont_BFC24EE0(CPUState* cpu); -extern void SCPH1001_func_1FC24F00(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F18(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F28(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F2C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F34(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F3C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F44(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F50(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F74(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F80(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F84(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F90(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24F9C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FBC(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FC8(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FD4(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FDC(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FE8(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FF0(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC24FFC(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25004(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25010(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25018(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25024(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC2502C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25038(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25040(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC2504C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25054(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25060(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25068(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25074(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC2509C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250A4(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250B0(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250B8(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250C4(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250D0(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250D8(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250E4(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250EC(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC250F8(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25108(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25110(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25120(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25148(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25150(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25154(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC2515C(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25164(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25178(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25180(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25194(CPUState* cpu); -extern void SCPH1001_func_1FC24F00_cont_BFC25198(CPUState* cpu); -extern void SCPH1001_func_1FC251A8(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251B8(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251C4(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251CC(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251D4(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251DC(CPUState* cpu); -extern void SCPH1001_func_1FC251A8_cont_BFC251F0(CPUState* cpu); -extern void SCPH1001_func_1FC25200(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25210(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25220(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25228(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25230(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25238(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25248(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25250(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25258(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25260(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25270(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25278(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25280(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25288(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC25298(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC252A0(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC252A8(CPUState* cpu); -extern void SCPH1001_func_1FC25200_cont_BFC252AC(CPUState* cpu); -extern void SCPH1001_func_1FC252BC(CPUState* cpu); -extern void SCPH1001_func_1FC252BC_cont_BFC252D4(CPUState* cpu); -extern void SCPH1001_func_1FC252BC_cont_BFC252E4(CPUState* cpu); -extern void SCPH1001_func_1FC252BC_cont_BFC252F4(CPUState* cpu); -extern void SCPH1001_func_1FC252BC_cont_BFC25304(CPUState* cpu); -extern void SCPH1001_func_1FC25314(CPUState* cpu); -extern void SCPH1001_func_1FC2531C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC2532C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC2533C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC2534C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC2535C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC2536C(CPUState* cpu); -extern void SCPH1001_func_1FC2531C_cont_BFC25374(CPUState* cpu); -extern void SCPH1001_func_1FC25390(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253A4(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253B8(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253C0(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253C4(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253D8(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC253E4(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC25404(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC2540C(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC25418(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC25444(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC25468(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC25484(CPUState* cpu); -extern void SCPH1001_func_1FC25390_cont_BFC254A0(CPUState* cpu); -extern void SCPH1001_func_1FC254B0(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC254C0(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC254DC(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC254EC(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC25500(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC2550C(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC25520(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC2552C(CPUState* cpu); -extern void SCPH1001_func_1FC254B0_cont_BFC25534(CPUState* cpu); -extern void SCPH1001_func_1FC25558(CPUState* cpu); -extern void SCPH1001_func_1FC25558_cont_BFC25570(CPUState* cpu); -extern void SCPH1001_func_1FC25558_cont_BFC25584(CPUState* cpu); -extern void SCPH1001_func_1FC25558_cont_BFC25590(CPUState* cpu); -extern void SCPH1001_func_1FC255A0(CPUState* cpu); -extern void SCPH1001_func_1FC255A0_cont_BFC255D8(CPUState* cpu); -extern void SCPH1001_func_1FC255A0_cont_BFC25604(CPUState* cpu); -extern void SCPH1001_func_1FC255A0_cont_BFC25628(CPUState* cpu); -extern void SCPH1001_func_1FC255A0_cont_BFC25658(CPUState* cpu); -extern void SCPH1001_func_1FC255A0_cont_BFC25698(CPUState* cpu); -extern void SCPH1001_func_1FC256D8(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC256E4(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC256FC(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC25714(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC2571C(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC25730(CPUState* cpu); -extern void SCPH1001_func_1FC256D8_cont_BFC25744(CPUState* cpu); -extern void SCPH1001_func_1FC25754(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC25788(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC257A4(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC257E0(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC257EC(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC25800(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC2580C(CPUState* cpu); -extern void SCPH1001_func_1FC25754_cont_BFC25840(CPUState* cpu); -extern void SCPH1001_func_1FC25884(CPUState* cpu); -extern void SCPH1001_func_1FC25884_cont_BFC25890(CPUState* cpu); -extern void SCPH1001_func_1FC25884_cont_BFC258AC(CPUState* cpu); -extern void SCPH1001_func_1FC2592C(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC25944(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC2594C(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC25964(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC25968(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC25980(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC25988(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC259A0(CPUState* cpu); -extern void SCPH1001_func_1FC2592C_cont_BFC259A4(CPUState* cpu); -extern void SCPH1001_func_1FC259D8(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A04(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A0C(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A18(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A24(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A2C(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A60(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A74(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25A88(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AA0(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AB4(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AC8(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AD4(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AEC(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25AFC(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B04(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B14(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B48(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B54(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B5C(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B64(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B68(CPUState* cpu); -extern void SCPH1001_func_1FC259D8_cont_BFC25B6C(CPUState* cpu); -extern void SCPH1001_func_1FC25B74(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25B9C(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25BA8(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25BBC(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25BC0(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25BD4(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25BFC(CPUState* cpu); -extern void SCPH1001_func_1FC25B74_cont_BFC25C38(CPUState* cpu); -extern void SCPH1001_func_1FC25C74(CPUState* cpu); -extern void SCPH1001_func_1FC25C7C(CPUState* cpu); -extern void SCPH1001_func_1FC25C84(CPUState* cpu); -extern void SCPH1001_func_1FC25C8C(CPUState* cpu); -extern void SCPH1001_func_1FC25C94(CPUState* cpu); -extern void SCPH1001_func_1FC25CB0(CPUState* cpu); -extern void SCPH1001_func_1FC25CB8(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25CE8(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D04(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D18(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D20(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D54(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D7C(CPUState* cpu); -extern void SCPH1001_func_1FC25CC0_cont_BFC25D80(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DA8(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DB0(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DB8(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DC0(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DE0(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25DF0(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E00(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E0C(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E18(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E28(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E3C(CPUState* cpu); -extern void SCPH1001_func_1FC25D8C_cont_BFC25E40(CPUState* cpu); -extern void SCPH1001_func_1FC25E60(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25E9C(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25EB8(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25ECC(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25ED8(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25EE0(CPUState* cpu); -extern void SCPH1001_func_1FC25E8C_cont_BFC25EE8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F24(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F34(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F3C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F48(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F58(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F60(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F6C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F74(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F88(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25F9C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FA4(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FAC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FC4(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FC8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FD0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FD8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC25FF0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26048(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2604C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26060(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26064(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2606C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2607C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2608C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC260AC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC260F8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC260FC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2610C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26110(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26120(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26130(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26138(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26148(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26150(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26164(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26178(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26180(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2618C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26198(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2619C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC261A4(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC261B0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC261CC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC261E0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC261EC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26200(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26208(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2621C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2622C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26244(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2624C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26254(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26264(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2627C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26284(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2628C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26294(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26298(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262A0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262B4(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262C8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262D0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262D8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262E0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262E8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262F0(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262F8(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC262FC(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26304(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC2630C(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26314(CPUState* cpu); -extern void SCPH1001_func_1FC25EF8_cont_BFC26318(CPUState* cpu); -extern void SCPH1001_func_1FC2632C(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26344(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26358(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26360(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26368(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26378(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26388(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26390(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26398(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263A0(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263A8(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263C8(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263D8(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263E0(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263F0(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC263FC(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26404(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC2640C(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26414(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26420(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26428(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26430(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC26438(CPUState* cpu); -extern void SCPH1001_func_1FC2632C_cont_BFC2643C(CPUState* cpu); -extern void SCPH1001_func_1FC2644C(CPUState* cpu); -extern void SCPH1001_func_1FC2644C_cont_BFC26468(CPUState* cpu); -extern void SCPH1001_func_1FC2644C_cont_BFC26474(CPUState* cpu); -extern void SCPH1001_func_1FC264A0(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC264B8(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC264D0(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC264EC(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC264F4(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC26508(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC26510(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC26518(CPUState* cpu); -extern void SCPH1001_func_1FC264A0_cont_BFC2652C(CPUState* cpu); -extern void SCPH1001_func_1FC26550(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC2656C(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC26580(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC2658C(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC26594(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC26598(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC265A0(CPUState* cpu); -extern void SCPH1001_func_1FC26550_cont_BFC265A4(CPUState* cpu); -extern void SCPH1001_func_1FC265C0(CPUState* cpu); -extern void SCPH1001_func_1FC265C0_cont_BFC265D0(CPUState* cpu); -extern void SCPH1001_func_1FC265C0_cont_BFC265E4(CPUState* cpu); -extern void SCPH1001_func_1FC265C0_cont_BFC265F0(CPUState* cpu); -extern void SCPH1001_func_1FC26610(CPUState* cpu); -extern void SCPH1001_func_1FC26610_cont_BFC26620(CPUState* cpu); -extern void SCPH1001_func_1FC26610_cont_BFC26634(CPUState* cpu); -extern void SCPH1001_func_1FC26610_cont_BFC26640(CPUState* cpu); -extern void SCPH1001_func_1FC26660(CPUState* cpu); -extern void SCPH1001_func_1FC26670(CPUState* cpu); -extern void SCPH1001_func_1FC26670_cont_BFC26680(CPUState* cpu); -extern void SCPH1001_func_1FC266B0(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC266C8(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC266DC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC266EC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26704(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26728(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC2673C(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26748(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26750(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26760(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26768(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC2676C(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26774(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26780(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26798(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267A4(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267AC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267B4(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267C8(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267CC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267E0(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267E8(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC267FC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26804(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26820(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26824(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC2682C(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26834(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26844(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26850(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26870(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26878(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26880(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC26894(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC268B0(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC268CC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC268D4(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC268DC(CPUState* cpu); -extern void SCPH1001_func_1FC266B0_cont_BFC268E0(CPUState* cpu); -extern void SCPH1001_func_1FC268EC(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26908(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC2691C(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26928(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26940(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC2695C(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC269E0(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC269E8(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC269F0(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC269F8(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A0C(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A38(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A4C(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A74(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A7C(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A80(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26A88(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AA0(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AAC(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AB4(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AB8(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AC0(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AE8(CPUState* cpu); -extern void SCPH1001_func_1FC268EC_cont_BFC26AEC(CPUState* cpu); -extern void SCPH1001_func_1FC26AF8(CPUState* cpu); -extern void SCPH1001_func_1FC26C10(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C24(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C40(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C48(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C50(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C74(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C84(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C8C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26C9C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26CB4(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26CBC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26CC8(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26CDC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26CF0(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D04(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D0C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D18(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D28(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D30(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D38(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D50(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D5C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D64(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D78(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D8C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26D98(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DA0(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DA8(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DBC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DC8(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DCC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DDC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DE8(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DEC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26DFC(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26E30(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26E3C(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26E48(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26E54(CPUState* cpu); -extern void SCPH1001_func_1FC26C10_cont_BFC26E58(CPUState* cpu); -extern void SCPH1001_func_1FC26E64(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26E88(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26E90(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26E98(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26E9C(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EA4(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EAC(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EB0(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EC0(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EC8(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26ED8(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EE0(CPUState* cpu); -extern void SCPH1001_func_1FC26E64_cont_BFC26EE8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27024(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2702C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27034(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2703C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27044(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27048(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27058(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27060(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2706C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2707C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27084(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2708C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270A4(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270AC(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270B8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270C8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270D0(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270D8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270E8(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270F0(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC270FC(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27104(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27114(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2711C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2712C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2713C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27144(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC27154(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2715C(CPUState* cpu); -extern void SCPH1001_func_1FC26EF8_cont_BFC2716C(CPUState* cpu); -extern void SCPH1001_func_1FC27190(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC271C0(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC271C8(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC271E8(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27208(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27228(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27248(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC2725C(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC272B8(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC272EC(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC272F4(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27324(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27328(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27330(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27338(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC2734C(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC2738C(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC27398(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC273A0(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC273A8(CPUState* cpu); -extern void SCPH1001_func_1FC27190_cont_BFC273B8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27434(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27448(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27454(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2745C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2746C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27480(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27494(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274A8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274C4(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274C8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274D4(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274DC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274E0(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC274EC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27508(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2750C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27518(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27520(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27524(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27530(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2754C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27550(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2755C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27564(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27568(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27574(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27590(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27594(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275A0(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275A8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275AC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275B8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275C0(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275C8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275D4(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275F0(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC275FC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27600(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27614(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC276CC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC276D8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC276F8(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27700(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27708(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27714(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27734(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2773C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2775C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27760(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2777C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2779C(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC277BC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC277DC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC277FC(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27804(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27824(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC27828(CPUState* cpu); -extern void SCPH1001_func_1FC273E4_cont_BFC2783C(CPUState* cpu); -extern void SCPH1001_func_1FC27868(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC27890(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC278C8(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC278D8(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC278EC(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC278F4(CPUState* cpu); -extern void SCPH1001_func_1FC27868_cont_BFC278F8(CPUState* cpu); -extern void SCPH1001_func_1FC27910(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC2792C(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27954(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27974(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC2799C(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC279D8(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC279E0(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC279F0(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27A00(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27A04(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27A0C(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27A14(CPUState* cpu); -extern void SCPH1001_func_1FC27910_cont_BFC27A18(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27A64(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27A84(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27AAC(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27AE8(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27AF0(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27B0C(CPUState* cpu); -extern void SCPH1001_func_1FC27A2C_cont_BFC27B10(CPUState* cpu); -extern void SCPH1001_func_1FC27B24(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27B34(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27B58(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27B7C(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27BA0(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27BC4(CPUState* cpu); -extern void SCPH1001_func_1FC27B24_cont_BFC27BCC(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27C14(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27C30(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27C58(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27C8C(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27C94(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27CB0(CPUState* cpu); -extern void SCPH1001_func_1FC27BDC_cont_BFC27CB4(CPUState* cpu); -extern void SCPH1001_func_1FC27CC8(CPUState* cpu); -extern void SCPH1001_func_1FC27CC8_cont_BFC27CD8(CPUState* cpu); -extern void SCPH1001_func_1FC27CC8_cont_BFC27CE0(CPUState* cpu); -extern void SCPH1001_func_1FC27D2C(CPUState* cpu); -extern void SCPH1001_func_1FC27D2C_cont_BFC27D48(CPUState* cpu); -extern void SCPH1001_func_1FC27D2C_cont_BFC27D70(CPUState* cpu); -extern void SCPH1001_func_1FC27D2C_cont_BFC27D7C(CPUState* cpu); -extern void SCPH1001_func_1FC27D2C_cont_BFC27D8C(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DBC(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DC4(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DCC(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DD8(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DE8(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27DF8(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27E08(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27E18(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27E28(CPUState* cpu); -extern void SCPH1001_func_1FC27DB0_cont_BFC27E58(CPUState* cpu); -extern void SCPH1001_func_1FC27E68(CPUState* cpu); -extern void SCPH1001_func_1FC27E68_cont_BFC27E78(CPUState* cpu); -extern void SCPH1001_func_1FC27E88(CPUState* cpu); -extern void SCPH1001_func_1FC27E88_cont_BFC27EA0(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27ED4(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27EF0(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27EF8(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F08(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F10(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F18(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F28(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F30(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F38(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F48(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F50(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F58(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F68(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F70(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F78(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F88(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F90(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27F98(CPUState* cpu); -extern void SCPH1001_func_1FC27EB4_cont_BFC27FA8(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC27FC4(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC27FDC(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC27FEC(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC27FF8(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC2800C(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC28018(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC28024(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC2802C(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC2803C(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC2804C(CPUState* cpu); -extern void SCPH1001_func_1FC27FB0_cont_BFC28054(CPUState* cpu); -extern void SCPH1001_func_1FC28064(CPUState* cpu); -extern void SCPH1001_func_1FC28064_cont_BFC2807C(CPUState* cpu); -extern void SCPH1001_func_1FC282E8(CPUState* cpu); -extern void SCPH1001_func_1FC282E8_cont_BFC282FC(CPUState* cpu); -extern void SCPH1001_func_1FC282E8_cont_BFC28324(CPUState* cpu); -extern void SCPH1001_func_1FC282E8_cont_BFC2834C(CPUState* cpu); -extern void SCPH1001_func_1FC282E8_cont_BFC28354(CPUState* cpu); -extern void SCPH1001_func_1FC282E8_cont_BFC28360(CPUState* cpu); -extern void SCPH1001_func_1FC28370(CPUState* cpu); -extern void SCPH1001_func_1FC28370_cont_BFC28388(CPUState* cpu); -extern void SCPH1001_func_1FC28370_cont_BFC283AC(CPUState* cpu); -extern void SCPH1001_func_1FC28370_cont_BFC283D0(CPUState* cpu); -extern void SCPH1001_func_1FC28370_cont_BFC283D8(CPUState* cpu); -extern void SCPH1001_func_1FC28370_cont_BFC283E0(CPUState* cpu); -extern void SCPH1001_func_1FC283F0(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC283F8(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC2840C(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28418(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28420(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28424(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28444(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28450(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC2845C(CPUState* cpu); -extern void SCPH1001_func_1FC283F0_cont_BFC28480(CPUState* cpu); -extern void SCPH1001_func_1FC28490(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284AC(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284B4(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284C0(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284C8(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284D0(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284D8(CPUState* cpu); -extern void SCPH1001_func_1FC28490_cont_BFC284DC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28504(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28514(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2851C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2852C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2853C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28544(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28568(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28578(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28580(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28594(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285A4(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285B8(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285C0(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285C4(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285CC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285D0(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285DC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285F0(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285F8(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC285FC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28610(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28614(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28620(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28628(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2863C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28644(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28648(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28650(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28654(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28660(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28674(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2867C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28688(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2868C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC286C4(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC286FC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28734(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2873C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28750(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28788(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC287C0(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC287F8(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC287FC(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28808(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28810(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28818(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28820(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28834(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2883C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28840(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28848(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2884C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC2885C(CPUState* cpu); -extern void SCPH1001_func_1FC284F0_cont_BFC28860(CPUState* cpu); -extern void SCPH1001_func_1FC2886C(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC288A0(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC288D4(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28900(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC2892C(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28958(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28988(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC289B8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC289E8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC289F0(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC289F8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC289FC(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A34(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A38(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A44(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A4C(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A50(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A58(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A60(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A68(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28A6C(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AA4(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AA8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AB4(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28ABC(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AC0(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AC8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AD0(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28AD8(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28ADC(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B14(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B18(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B24(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B2C(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B30(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B38(CPUState* cpu); -extern void SCPH1001_func_1FC2886C_cont_BFC28B54(CPUState* cpu); -extern void SCPH1001_func_1FC28B84(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28BCC(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28BD0(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28BDC(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28BE4(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28BE8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C40(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C44(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C50(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C58(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C5C(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28C90(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28CB8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28CEC(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28D20(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28D54(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28D88(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28DB8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28DE8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28E18(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28E48(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28E74(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28E9C(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28ED0(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28F04(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28F38(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28F68(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28F98(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28FC8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC28FF4(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC2901C(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29050(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29084(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC290B8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC290E8(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29118(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29148(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29174(CPUState* cpu); -extern void SCPH1001_func_1FC28B84_cont_BFC29194(CPUState* cpu); -extern void SCPH1001_func_1FC291C4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC291E8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29210(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29214(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29220(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29224(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2924C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29254(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29258(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2928C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29290(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2929C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292A4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292A8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292B8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292BC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292E4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC292E8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2932C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29344(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29350(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29368(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC293E4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29458(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29460(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294BC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294C0(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294CC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294D4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294D8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC294E4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29558(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2955C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29568(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29570(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29574(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295AC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295B0(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295BC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295C4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295C8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC295DC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29640(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29644(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29650(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29658(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2965C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29664(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC296D8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC296DC(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC296E8(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC296F0(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC296F4(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2972C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29730(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2973C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29744(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29748(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC2975C(CPUState* cpu); -extern void SCPH1001_func_1FC291C4_cont_BFC29760(CPUState* cpu); -extern void SCPH1001_func_1FC29770(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29788(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC297A0(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC297E0(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29834(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC2983C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC2984C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC2986C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29878(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29880(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29888(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC2989C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC298D4(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC298DC(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC298EC(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29958(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC2995C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29968(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29970(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29974(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29994(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29998(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299A4(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299AC(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299B0(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299D8(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299DC(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299E8(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299F0(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC299F4(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A3C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A40(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A4C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A54(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A58(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A6C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A88(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29A9C(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29AB4(CPUState* cpu); -extern void SCPH1001_func_1FC29770_cont_BFC29AC8(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B20(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B30(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B38(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B40(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B60(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29B80(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29BA0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29BC0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29BDC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C34(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C58(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C60(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C70(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C80(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C8C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29C98(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CA4(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CB0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CBC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CD0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CE0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29CF4(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D08(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D20(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D2C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D30(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D38(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D40(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D44(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D48(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D5C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D74(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D7C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D84(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29D9C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29DAC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29DB8(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29DDC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29DEC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29E7C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29EB4(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29ECC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29EE0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29EEC(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29EF4(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F10(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F14(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F5C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F6C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F7C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F8C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29F9C(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29FB0(CPUState* cpu); -extern void SCPH1001_func_1FC29AE0_cont_BFC29FB8(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A024(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A05C(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A068(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A158(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A2C8(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A2D0(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A2D8(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A2E4(CPUState* cpu); -extern void SCPH1001_func_1FC29FE8_cont_BFC2A30C(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A344(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A3B8(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A3C0(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A3C8(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A3CC(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A400(CPUState* cpu); -extern void SCPH1001_func_1FC2A31C_cont_BFC2A40C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A550(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A55C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A56C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A578(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A580(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A588(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A58C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5A0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5A4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5AC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5B4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5CC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5D4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5E0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5E8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5EC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A5F8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A600(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A61C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A62C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A638(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A654(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A660(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A668(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A670(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A68C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A690(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6A0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6A8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6AC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6C0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6C4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6CC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A6D8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A700(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A884(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A994(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9A4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9B4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9BC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9CC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9D4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9E4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9E8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9F4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2A9F8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AA00(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AA04(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AA14(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AA20(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AAC0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AAC8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AAD0(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AAD8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AADC(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AAE4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB00(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB10(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB18(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB20(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB28(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB2C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB38(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB44(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB88(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB90(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2AB9C(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2ABA8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2ABD4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2ABD8(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2ABF4(CPUState* cpu); -extern void SCPH1001_func_1FC2A4E0_cont_BFC2ABF8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ACEC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD08(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD24(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD38(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD40(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD48(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD4C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD54(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD5C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD64(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD68(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD70(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD78(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD80(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD84(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD8C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD94(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AD9C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADA0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADA8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADB0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADB8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADBC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADC4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADCC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADD4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADD8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADE0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADEC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2ADF0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE18(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE2C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE34(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE3C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE40(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE48(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE50(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE58(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE5C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE64(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE6C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE74(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE78(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE80(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE8C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE90(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AE98(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEA4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEA8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AED0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEE4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEEC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEF4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AEF8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF00(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF08(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF10(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF14(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF1C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF24(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF2C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF30(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF38(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF44(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF48(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF50(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF5C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF60(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF88(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AF9C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFA4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFAC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFB0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFB8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFC0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFC8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFCC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFD4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFDC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFE4(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFE8(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFF0(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2AFFC(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B000(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B008(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B014(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B018(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B040(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B054(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B05C(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B060(CPUState* cpu); -extern void SCPH1001_func_1FC2ACD0_cont_BFC2B098(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0C0(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0CC(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0D4(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0D8(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0E0(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0E8(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0F0(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0F4(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B0FC(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B104(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B10C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B110(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B118(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B120(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B12C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B130(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B138(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B140(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B148(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B14C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B154(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B15C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B168(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B16C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B174(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B17C(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B184(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B190(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B198(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B1A0(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B1C4(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B1C8(CPUState* cpu); -extern void SCPH1001_func_1FC2B0A8_cont_BFC2B1EC(CPUState* cpu); -extern void SCPH1001_func_1FC2B1FC(CPUState* cpu); -extern void SCPH1001_func_1FC2B1FC_cont_BFC2B208(CPUState* cpu); -extern void SCPH1001_func_1FC2B1FC_cont_BFC2B224(CPUState* cpu); -extern void SCPH1001_func_1FC2B22C(CPUState* cpu); -extern void SCPH1001_func_1FC2B22C_cont_BFC2B238(CPUState* cpu); -extern void SCPH1001_func_1FC2B22C_cont_BFC2B24C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B2D8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B2E4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B2F4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B304(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B30C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B320(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B324(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B338(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B33C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B344(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B34C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B364(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B36C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B378(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B380(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B384(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B394(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B3A0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B3CC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B3DC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B3E8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B418(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B424(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B42C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B434(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B44C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B458(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B460(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B4A4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B574(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B680(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B688(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B690(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B698(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B6D0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B7A4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8B0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8B8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8BC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8D4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8D8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8E4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B8F4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B908(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B924(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B92C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B938(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B944(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B94C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2B970(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BB04(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC2C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC48(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC54(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC64(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC70(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC88(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC8C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BC94(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCA4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCA8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCB4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCB8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCC0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCC4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCD4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BCEC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BD90(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BD98(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDA0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDA8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDAC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDB4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDD0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDE0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDE8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDF0(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDF8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BDFC(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE08(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE14(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE58(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE60(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE6C(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BE78(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BEA4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BEA8(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BEC4(CPUState* cpu); -extern void SCPH1001_func_1FC2B260_cont_BFC2BEC8(CPUState* cpu); -extern void SCPH1001_func_1FC2BF00(CPUState* cpu); -extern void SCPH1001_func_1FC2BF10(CPUState* cpu); -extern void SCPH1001_func_1FC2BF1C(CPUState* cpu); -extern void SCPH1001_func_1FC2BF1C_cont_BFC2BF64(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BF98(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BFA0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BFAC(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BFC0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BFD0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2BFF8(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C000(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C020(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C030(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C040(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C060(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C068(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C070(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C074(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C090(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0B0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0B8(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0BC(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0D4(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0DC(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0E0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C0F8(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C108(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C158(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C16C(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C1B0(CPUState* cpu); -extern void SCPH1001_func_1FC2BF74_cont_BFC2C1B4(CPUState* cpu); -extern void SCPH1001_func_1FC2C1C4(CPUState* cpu); -extern void SCPH1001_func_1FC2C1C4_cont_BFC2C1E8(CPUState* cpu); -extern void SCPH1001_func_1FC2C1C4_cont_BFC2C290(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C314(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C320(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C328(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C348(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C364(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C370(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C39C(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C3AC(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C3BC(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C3C0(CPUState* cpu); -extern void SCPH1001_func_1FC2C2F0_cont_BFC2C3D0(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C3FC(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C420(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C45C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C468(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C46C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C470(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C47C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C484(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C48C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C494(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4B0(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4BC(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4C4(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4C8(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4D8(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C4E4(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C614(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C618(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C620(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C624(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C62C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C630(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C638(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C69C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6B0(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6B4(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6C8(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6CC(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6D8(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C6E4(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C760(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C764(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C76C(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C794(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C7A8(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C7AC(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C7C0(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C7C4(CPUState* cpu); -extern void SCPH1001_func_1FC2C3E0_cont_BFC2C7E4(CPUState* cpu); -extern void SCPH1001_func_1FC2C7F4(CPUState* cpu); -extern void SCPH1001_func_1FC2C7F4_cont_BFC2C814(CPUState* cpu); -extern void SCPH1001_func_1FC2C7F4_cont_BFC2C880(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C8B8(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C8E8(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C8EC(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C8F8(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C8FC(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C908(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C90C(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C920(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C924(CPUState* cpu); -extern void SCPH1001_func_1FC2C8A8_cont_BFC2C980(CPUState* cpu); -extern void SCPH1001_func_1FC2C988(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2C998(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2C9B8(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2C9BC(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2C9D0(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2C9D4(CPUState* cpu); -extern void SCPH1001_func_1FC2C988_cont_BFC2CA48(CPUState* cpu); -extern void SCPH1001_func_1FC2CA50(CPUState* cpu); -extern void SCPH1001_func_1FC2CA58(CPUState* cpu); -extern void SCPH1001_func_1FC2CA58_cont_BFC2CA78(CPUState* cpu); -extern void SCPH1001_func_1FC2CA58_cont_BFC2CA88(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C_cont_BFC2CAB8(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C_cont_BFC2CAC0(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C_cont_BFC2CAC8(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C_cont_BFC2CAD0(CPUState* cpu); -extern void SCPH1001_func_1FC2CA9C_cont_BFC2CAD4(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0_cont_BFC2CAFC(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0_cont_BFC2CB04(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0_cont_BFC2CB0C(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0_cont_BFC2CB14(CPUState* cpu); -extern void SCPH1001_func_1FC2CAE0_cont_BFC2CB18(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB40(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB48(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB50(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB60(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB70(CPUState* cpu); -extern void SCPH1001_func_1FC2CB24_cont_BFC2CB74(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CB9C(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CBB4(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CBBC(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CBDC(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CBFC(CPUState* cpu); -extern void SCPH1001_func_1FC2CB80_cont_BFC2CC00(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10_cont_BFC2CC40(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10_cont_BFC2CC4C(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10_cont_BFC2CC5C(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10_cont_BFC2CC70(CPUState* cpu); -extern void SCPH1001_func_1FC2CC10_cont_BFC2CC88(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CCDC(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CCE8(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CCF0(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CD28(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CD4C(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CD88(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CDA0(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CDAC(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CDE0(CPUState* cpu); -extern void SCPH1001_func_1FC2CCC4_cont_BFC2CDF8(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CE28(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CE30(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CE38(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CE70(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CE94(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CED4(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CEEC(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CEF8(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CF2C(CPUState* cpu); -extern void SCPH1001_func_1FC2CE08_cont_BFC2CF44(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CF6C(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CF74(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CF7C(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CFB0(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CFD4(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2CFE0(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2D004(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2D06C(CPUState* cpu); -extern void SCPH1001_func_1FC2CF54_cont_BFC2D094(CPUState* cpu); -extern void SCPH1001_func_1FC2D0A4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0A4_cont_BFC2D0B8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0A4_cont_BFC2D0C8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0A4_cont_BFC2D0CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0A4_cont_BFC2D0D8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D134(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D144(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D154(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D1A4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D1B8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D1CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D1E0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D1EC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D214(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D218(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D224(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D22C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D230(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D240(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D2B0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D2BC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D2D4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D2F8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D308(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D310(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D31C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D370(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D384(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D38C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D3D8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D400(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D414(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D41C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D450(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D458(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D45C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D464(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D46C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D470(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D488(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D494(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D4CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D4E0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D530(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D534(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D540(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D548(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D54C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D55C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D5CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D5D8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D5F0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D614(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D624(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D644(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D648(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D658(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D66C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D674(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D684(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D68C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6AC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6B0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6BC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6C4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6C8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6D0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D6E4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D734(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D748(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D758(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D764(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D76C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D77C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D784(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D78C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7A4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7A8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7B0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7B8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7C0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D7CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D870(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D878(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D87C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D894(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D89C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8A0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8B8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8BC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8D4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8D8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8F0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D8F8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D90C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D910(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D964(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D990(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D998(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D99C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D9CC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D9EC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2D9F0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA00(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA18(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA2C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA34(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA38(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA54(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA5C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA6C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA70(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DA78(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DABC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DAC8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DADC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DAE4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DAEC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB00(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB14(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB18(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB24(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB2C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB44(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB50(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB60(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB6C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB74(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB94(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DB98(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DBA0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DBB4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DBF4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC08(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC20(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC34(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC38(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC60(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DC90(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DCA8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DCC0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DCC8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DCE0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DCF0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DD08(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DD20(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DD28(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DD40(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DD6C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DDD4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DDE0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DDEC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DE0C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DE30(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DE40(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DE6C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DEA8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DEBC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DED0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DEE0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DEE8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DEF4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF38(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF48(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF60(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF78(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF80(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DF98(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DFA8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DFC0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DFD8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DFE0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2DFF8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E02C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E038(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E060(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E084(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E094(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E0C0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E0FC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E110(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E118(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E134(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E15C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E19C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E1A8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E1B0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E1B8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E204(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E208(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E218(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E224(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E238(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E240(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E254(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2A4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2B0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2C8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2D0(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2D4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2E8(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2EC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E2FC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E30C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E32C(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E370(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E380(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E390(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E3A4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E3B4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E3C4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E3EC(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E3F4(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E410(CPUState* cpu); -extern void SCPH1001_func_1FC2D0E0_cont_BFC2E420(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E458(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E460(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E468(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E474(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E47C(CPUState* cpu); -extern void SCPH1001_func_1FC2E44C_cont_BFC2E4C0(CPUState* cpu); -extern void SCPH1001_func_1FC2E4D0(CPUState* cpu); -extern void SCPH1001_func_1FC2E544(CPUState* cpu); -extern void SCPH1001_func_1FC2E574(CPUState* cpu); -extern void SCPH1001_func_1FC2E574_cont_BFC2E588(CPUState* cpu); -extern void SCPH1001_func_1FC2E574_cont_BFC2E590(CPUState* cpu); -extern void SCPH1001_func_1FC2E5B4(CPUState* cpu); -extern void SCPH1001_func_1FC2E5C0(CPUState* cpu); -extern void SCPH1001_func_1FC2E5C0_cont_BFC2E5D0(CPUState* cpu); -extern void SCPH1001_func_1FC2E5C0_cont_BFC2E5E0(CPUState* cpu); -extern void SCPH1001_func_1FC2E5C0_cont_BFC2E5E8(CPUState* cpu); -extern void SCPH1001_func_1FC2E5C0_cont_BFC2E5F4(CPUState* cpu); -extern void SCPH1001_func_1FC2E600(CPUState* cpu); -extern void SCPH1001_func_1FC2E600_cont_BFC2E610(CPUState* cpu); -extern void SCPH1001_func_1FC2E65C(CPUState* cpu); -extern void SCPH1001_func_1FC2E65C_cont_BFC2E66C(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E704(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E714(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E744(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E74C(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E750(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E760(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E770(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E7A0(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E7B4(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E7C4(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E7F4(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E800(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E814(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E824(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E854(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E860(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E874(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E884(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E8B4(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E8BC(CPUState* cpu); -extern void SCPH1001_func_1FC2E6B8_cont_BFC2E8C0(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E8F4(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E900(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E938(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E968(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E978(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E97C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E98C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E9BC(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E9C8(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E9DC(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2E9EC(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA1C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA28(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA3C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA4C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA7C(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA84(CPUState* cpu); -extern void SCPH1001_func_1FC2E8CC_cont_BFC2EA88(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EAD8(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EB34(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EB58(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EB88(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EBC0(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EBE4(CPUState* cpu); -extern void SCPH1001_func_1FC2EA94_cont_BFC2EC68(CPUState* cpu); -extern void SCPH1001_func_1FC2EC90(CPUState* cpu); -extern void SCPH1001_func_1FC2EC90_cont_BFC2ECA4(CPUState* cpu); -extern void SCPH1001_func_1FC2EC90_cont_BFC2ECB4(CPUState* cpu); -extern void SCPH1001_func_1FC2EC90_cont_BFC2ECC4(CPUState* cpu); -extern void SCPH1001_func_1FC2EC90_cont_BFC2ECD0(CPUState* cpu); -extern void SCPH1001_func_1FC2ECD8(CPUState* cpu); -extern void SCPH1001_func_1FC2ED1C(CPUState* cpu); -extern void SCPH1001_func_1FC2ED1C_cont_BFC2ED2C(CPUState* cpu); -extern void SCPH1001_func_1FC2ED1C_cont_BFC2ED74(CPUState* cpu); -extern void SCPH1001_func_1FC2ED1C_cont_BFC2ED98(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C_cont_BFC2EE80(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C_cont_BFC2EE90(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C_cont_BFC2EEA0(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C_cont_BFC2EEA8(CPUState* cpu); -extern void SCPH1001_func_1FC2EE6C_cont_BFC2EEB4(CPUState* cpu); -extern void SCPH1001_func_1FC2EEC0(CPUState* cpu); -extern void SCPH1001_func_1FC2EEC0_cont_BFC2EED8(CPUState* cpu); -extern void SCPH1001_func_1FC2EEC0_cont_BFC2EEE8(CPUState* cpu); -extern void SCPH1001_func_1FC2EEC0_cont_BFC2EEEC(CPUState* cpu); -extern void SCPH1001_func_1FC2EEC0_cont_BFC2EEF8(CPUState* cpu); -extern void SCPH1001_func_1FC2EF00(CPUState* cpu); -extern void SCPH1001_func_1FC2EF00_cont_BFC2EF18(CPUState* cpu); -extern void SCPH1001_func_1FC2EF00_cont_BFC2EF28(CPUState* cpu); -extern void SCPH1001_func_1FC2EF00_cont_BFC2EF2C(CPUState* cpu); -extern void SCPH1001_func_1FC2EF00_cont_BFC2EF38(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EF6C(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EF78(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EF88(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EFB0(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EFB8(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2EFC8(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F014(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F020(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F030(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F034(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F03C(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F070(CPUState* cpu); -extern void SCPH1001_func_1FC2EF40_cont_BFC2F084(CPUState* cpu); -extern void SCPH1001_func_1FC2F1D4(CPUState* cpu); -extern void SCPH1001_func_1FC2F1D4_cont_BFC2F1E0(CPUState* cpu); -extern void SCPH1001_func_1FC2F1D4_cont_BFC2F1FC(CPUState* cpu); -extern void SCPH1001_func_1FC2F210(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F228(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F230(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F240(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F248(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F254(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F264(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F29C(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F2C4(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F2F0(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F31C(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F330(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F388(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F3A0(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F3A4(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F3C4(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F3C8(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F3FC(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F424(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F450(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F47C(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F490(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F4E8(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F50C(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F518(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F58C(CPUState* cpu); -extern void SCPH1001_func_1FC2F210_cont_BFC2F60C(CPUState* cpu); -extern void SCPH1001_func_1FC2F618(CPUState* cpu); -extern void SCPH1001_func_1FC2F618_cont_BFC2F62C(CPUState* cpu); -extern void SCPH1001_func_1FC2F618_cont_BFC2F630(CPUState* cpu); -extern void SCPH1001_func_1FC2F618_cont_BFC2F63C(CPUState* cpu); -extern void SCPH1001_func_1FC2F618_cont_BFC2F644(CPUState* cpu); -extern void SCPH1001_func_1FC2F618_cont_BFC2F64C(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C_cont_BFC2F670(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C_cont_BFC2F674(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C_cont_BFC2F680(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C_cont_BFC2F688(CPUState* cpu); -extern void SCPH1001_func_1FC2F65C_cont_BFC2F690(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F6BC(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F6C8(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F6CC(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F6E0(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F6F8(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F700(CPUState* cpu); -extern void SCPH1001_func_1FC2F6A0_cont_BFC2F704(CPUState* cpu); -extern void SCPH1001_func_1FC2F718(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F728(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F730(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F740(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F750(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F760(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F774(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F784(CPUState* cpu); -extern void SCPH1001_func_1FC2F718_cont_BFC2F78C(CPUState* cpu); -extern void SCPH1001_func_1FC2F79C(CPUState* cpu); -extern void SCPH1001_func_1FC2F79C_cont_BFC2F7F8(CPUState* cpu); -extern void SCPH1001_func_1FC2F808(CPUState* cpu); -extern void SCPH1001_func_1FC2F808_cont_BFC2F81C(CPUState* cpu); -extern void SCPH1001_func_1FC2F808_cont_BFC2F830(CPUState* cpu); -extern void SCPH1001_func_1FC2F808_cont_BFC2F840(CPUState* cpu); -extern void SCPH1001_func_1FC2F808_cont_BFC2F84C(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C_cont_BFC2F874(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C_cont_BFC2F87C(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C_cont_BFC2F884(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C_cont_BFC2F88C(CPUState* cpu); -extern void SCPH1001_func_1FC2F85C_cont_BFC2F898(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F924(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F928(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F934(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F93C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F940(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F948(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F94C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F958(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F960(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F964(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F96C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F970(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F97C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F984(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F988(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F990(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F99C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F9A4(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F9C0(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F9F0(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2F9F8(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA08(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA10(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA18(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA28(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA48(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA4C(CPUState* cpu); -extern void SCPH1001_func_1FC2F8AC_cont_BFC2FA5C(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FAEC(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FAF0(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FAFC(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB04(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB08(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB10(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB14(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB20(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB28(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB2C(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB34(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB38(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB44(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB4C(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB50(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB58(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB94(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FB9C(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBB8(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBC0(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBC8(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBDC(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBEC(CPUState* cpu); -extern void SCPH1001_func_1FC2FA78_cont_BFC2FBF4(CPUState* cpu); -extern void SCPH1001_func_1FC2FC10(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FCDC(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FD24(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FD64(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FD6C(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FDB4(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FDF4(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FDFC(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE38(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE40(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE48(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE54(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE5C(CPUState* cpu); -extern void SCPH1001_func_1FC2FCC4_cont_BFC2FE60(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FEAC(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FEB4(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FEC4(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FEE0(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FEEC(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FF20(CPUState* cpu); -extern void SCPH1001_func_1FC2FE6C_cont_BFC2FF24(CPUState* cpu); -extern void SCPH1001_func_1FC2FF34(CPUState* cpu); -extern void SCPH1001_func_1FC2FF34_cont_BFC2FF40(CPUState* cpu); -extern void SCPH1001_func_1FC2FF34_cont_BFC2FF5C(CPUState* cpu); -extern void SCPH1001_func_1FC3010C(CPUState* cpu); -extern void SCPH1001_func_1FC3010C_cont_BFC3012C(CPUState* cpu); -extern void SCPH1001_func_1FC3010C_cont_BFC30138(CPUState* cpu); -extern void SCPH1001_func_1FC3015C(CPUState* cpu); -extern void SCPH1001_func_1FC3015C_cont_BFC3017C(CPUState* cpu); -extern void SCPH1001_func_1FC3015C_cont_BFC30188(CPUState* cpu); -extern void SCPH1001_func_1FC301AC(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC301D8(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC301E8(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC301F0(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC301F4(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC30200(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC30208(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC30214(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC3021C(CPUState* cpu); -extern void SCPH1001_func_1FC301AC_cont_BFC30220(CPUState* cpu); -extern void SCPH1001_func_1FC3022C(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30258(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30260(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30268(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30270(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30278(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30284(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC3028C(CPUState* cpu); -extern void SCPH1001_func_1FC3022C_cont_BFC30290(CPUState* cpu); -extern void SCPH1001_func_1FC3029C(CPUState* cpu); -extern void SCPH1001_func_1FC3029C_cont_BFC302AC(CPUState* cpu); -extern void SCPH1001_func_1FC302BC(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302D0(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302DC(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302E4(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302E8(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302F0(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302F8(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC302FC(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC30304(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC3030C(CPUState* cpu); -extern void SCPH1001_func_1FC302BC_cont_BFC30310(CPUState* cpu); -extern void SCPH1001_func_1FC3031C(CPUState* cpu); -extern void SCPH1001_func_1FC3031C_cont_BFC30340(CPUState* cpu); -extern void SCPH1001_func_1FC30350(CPUState* cpu); -extern void SCPH1001_func_1FC30350_cont_BFC30384(CPUState* cpu); -extern void SCPH1001_func_1FC303A4(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC303C0(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC303D4(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC303E8(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC303FC(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC30404(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC3040C(CPUState* cpu); -extern void SCPH1001_func_1FC303A4_cont_BFC30414(CPUState* cpu); -extern void SCPH1001_func_1FC3041C(CPUState* cpu); -extern void SCPH1001_func_1FC3041C_cont_BFC30440(CPUState* cpu); -extern void SCPH1001_func_1FC3045C(CPUState* cpu); -extern void SCPH1001_func_1FC30470(CPUState* cpu); -extern void SCPH1001_func_1FC30484(CPUState* cpu); -extern void SCPH1001_func_1FC30498(CPUState* cpu); -extern void SCPH1001_func_1FC304AC(CPUState* cpu); -extern void SCPH1001_func_1FC304B4(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC304D0(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC304DC(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC304E8(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC304F4(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC304FC(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC30504(CPUState* cpu); -extern void SCPH1001_func_1FC304B4_cont_BFC3050C(CPUState* cpu); -extern void SCPH1001_func_1FC30514(CPUState* cpu); -extern void SCPH1001_func_1FC30514_cont_BFC30538(CPUState* cpu); -extern void SCPH1001_func_1FC30554(CPUState* cpu); -extern void SCPH1001_func_1FC30560(CPUState* cpu); -extern void SCPH1001_func_1FC3056C(CPUState* cpu); -extern void SCPH1001_func_1FC30578(CPUState* cpu); -extern void SCPH1001_func_1FC30584(CPUState* cpu); -extern void SCPH1001_func_1FC3058C(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC305DC(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC305E0(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30600(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30604(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30624(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30628(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30638(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC3063C(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC3064C(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30650(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30660(CPUState* cpu); -extern void SCPH1001_func_1FC3058C_cont_BFC30664(CPUState* cpu); -extern void SCPH1001_func_1FC30670(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC306C0(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC306C4(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC306E4(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC306E8(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30708(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC3070C(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC3072C(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30730(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30750(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30754(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30764(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30768(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30778(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC3077C(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC3078C(CPUState* cpu); -extern void SCPH1001_func_1FC30670_cont_BFC30790(CPUState* cpu); -extern void SCPH1001_func_1FC3079C(CPUState* cpu); -extern void SCPH1001_func_1FC3079C_cont_BFC307C0(CPUState* cpu); -extern void SCPH1001_func_1FC3079C_cont_BFC307D4(CPUState* cpu); -extern void SCPH1001_func_1FC30868(CPUState* cpu); -extern void SCPH1001_func_1FC30868_cont_BFC3088C(CPUState* cpu); -extern void SCPH1001_func_1FC30868_cont_BFC308A0(CPUState* cpu); -extern void SCPH1001_func_1FC30960(CPUState* cpu); -extern void SCPH1001_func_1FC30960_cont_BFC30998(CPUState* cpu); -extern void SCPH1001_func_1FC30960_cont_BFC309A8(CPUState* cpu); -extern void SCPH1001_func_1FC30960_cont_BFC309CC(CPUState* cpu); -extern void SCPH1001_func_1FC30960_cont_BFC30A14(CPUState* cpu); -extern void SCPH1001_func_1FC30960_cont_BFC30A20(CPUState* cpu); -extern void SCPH1001_func_1FC30A80(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30AD4(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30AE8(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30B0C(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30BD8(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30BE0(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30C18(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30C44(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30C84(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30CB4(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30CE8(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30D14(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30D50(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30D80(CPUState* cpu); -extern void SCPH1001_func_1FC30A80_cont_BFC30D8C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30E3C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30E4C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30E68(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30E7C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30E8C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30EAC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30ECC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30EDC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F38(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F44(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F50(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F58(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F68(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F6C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F78(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F80(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F84(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F8C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30F94(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FA8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FAC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FB8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FC0(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FC4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FCC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FD4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FE4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FE8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FF4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC30FFC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31000(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31008(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31018(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC3101C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31028(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31030(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31034(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC3103C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31044(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31058(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC3105C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31068(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31070(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31074(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC3107C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31084(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31094(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31098(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310A4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310AC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310B0(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310B4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310C4(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310D0(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310D8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310E0(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310E8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310EC(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC310F8(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31100(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC3111C(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31128(CPUState* cpu); -extern void SCPH1001_func_1FC30DF0_cont_BFC31138(CPUState* cpu); -extern void SCPH1001_func_1FC31194(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC311CC(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC311DC(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31200(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31234(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC3123C(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31244(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31288(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31290(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31294(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC312D4(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC312D8(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC312E4(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC312E8(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC312FC(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31300(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC3130C(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31314(CPUState* cpu); -extern void SCPH1001_func_1FC31194_cont_BFC31320(CPUState* cpu); -extern void SCPH1001_func_1FC31380(CPUState* cpu); -extern void SCPH1001_func_1FC31380_cont_BFC313AC(CPUState* cpu); -extern void SCPH1001_func_1FC31380_cont_BFC313B8(CPUState* cpu); -extern void SCPH1001_func_1FC31380_cont_BFC313D0(CPUState* cpu); -extern void SCPH1001_func_1FC313EC(CPUState* cpu); -extern void SCPH1001_func_1FC313EC_cont_BFC31410(CPUState* cpu); -extern void SCPH1001_func_1FC313EC_cont_BFC31418(CPUState* cpu); -extern void SCPH1001_func_1FC313EC_cont_BFC31430(CPUState* cpu); -extern void SCPH1001_func_1FC31448(CPUState* cpu); -extern void SCPH1001_func_1FC31448_cont_BFC31500(CPUState* cpu); -extern void SCPH1001_func_1FC31448_cont_BFC31530(CPUState* cpu); -extern void SCPH1001_func_1FC31448_cont_BFC31540(CPUState* cpu); -extern void SCPH1001_func_1FC31448_cont_BFC31550(CPUState* cpu); -extern void SCPH1001_func_1FC31448_cont_BFC31554(CPUState* cpu); -extern void SCPH1001_func_1FC31580(CPUState* cpu); -extern void SCPH1001_func_1FC31580_cont_BFC315B8(CPUState* cpu); -extern void SCPH1001_func_1FC31580_cont_BFC315FC(CPUState* cpu); -extern void SCPH1001_func_1FC31580_cont_BFC31614(CPUState* cpu); -extern void SCPH1001_func_1FC31638(CPUState* cpu); -extern void SCPH1001_func_1FC31638_cont_BFC3165C(CPUState* cpu); -extern void SCPH1001_func_1FC31638_cont_BFC316DC(CPUState* cpu); -extern void SCPH1001_func_1FC31638_cont_BFC31708(CPUState* cpu); -extern void SCPH1001_func_1FC31638_cont_BFC31724(CPUState* cpu); -extern void SCPH1001_func_1FC31638_cont_BFC31744(CPUState* cpu); -extern void SCPH1001_func_1FC317D0(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3180C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31828(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3182C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31858(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31860(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31864(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3186C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31874(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31878(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31880(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31884(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC318C4(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC318E0(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC318E4(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31910(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31918(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3191C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31924(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3192C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31930(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31938(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC3193C(CPUState* cpu); -extern void SCPH1001_func_1FC317D0_cont_BFC31958(CPUState* cpu); -extern void SCPH1001_func_1FC31968(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC3197C(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC31994(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC319AC(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC319B8(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC319D0(CPUState* cpu); -extern void SCPH1001_func_1FC31968_cont_BFC319DC(CPUState* cpu); -extern void SCPH1001_func_1FC319EC(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A18(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A20(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A24(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A2C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A34(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A38(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A4C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A50(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31A9C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31AA8(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31AF4(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31AFC(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B28(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B38(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B40(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B48(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B4C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B54(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B5C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B60(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B74(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31B78(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31BC0(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31BCC(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31C18(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31C20(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31C4C(CPUState* cpu); -extern void SCPH1001_func_1FC319EC_cont_BFC31C50(CPUState* cpu); -extern void SCPH1001_func_1FC31C64(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31C84(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31C88(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CB0(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CB8(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CBC(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CC4(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CCC(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CD0(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CD8(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31CDC(CPUState* cpu); -extern void SCPH1001_func_1FC31C64_cont_BFC31D04(CPUState* cpu); -extern void SCPH1001_func_1FC31D14(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D34(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D38(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D60(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D68(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D6C(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D74(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D7C(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D80(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D88(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31D8C(CPUState* cpu); -extern void SCPH1001_func_1FC31D14_cont_BFC31DB4(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31DE4(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31DE8(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E10(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E18(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E1C(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E24(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E2C(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E30(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E38(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E3C(CPUState* cpu); -extern void SCPH1001_func_1FC31DC4_cont_BFC31E64(CPUState* cpu); -extern void SCPH1001_func_1FC31E74(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31E94(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31E98(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EC0(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EC8(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31ECC(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31ED4(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EDC(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EE0(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EE8(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31EEC(CPUState* cpu); -extern void SCPH1001_func_1FC31E74_cont_BFC31F14(CPUState* cpu); -extern void SCPH1001_func_1FC32010(CPUState* cpu); -extern void SCPH1001_func_1FC32010_cont_BFC32024(CPUState* cpu); -extern void SCPH1001_func_1FC32010_cont_BFC32038(CPUState* cpu); -extern void SCPH1001_func_1FC32040(CPUState* cpu); -extern void SCPH1001_func_1FC32040_cont_BFC32054(CPUState* cpu); -extern void SCPH1001_func_1FC32040_cont_BFC32070(CPUState* cpu); -extern void SCPH1001_func_1FC32078(CPUState* cpu); -extern void SCPH1001_func_1FC32078_cont_BFC32090(CPUState* cpu); -extern void SCPH1001_func_1FC32078_cont_BFC320AC(CPUState* cpu); -extern void SCPH1001_func_1FC320B4(CPUState* cpu); -extern void SCPH1001_func_1FC320B4_cont_BFC320D0(CPUState* cpu); -extern void SCPH1001_func_1FC320B4_cont_BFC320F8(CPUState* cpu); -extern void SCPH1001_func_1FC32100(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC32114(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC3211C(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC32130(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC32144(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC3214C(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321CC(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321D0(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321D8(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321DC(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321E4(CPUState* cpu); -extern void SCPH1001_func_1FC32100_cont_BFC321E8(CPUState* cpu); -extern void SCPH1001_func_1FC321F0(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC32208(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC32210(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC32224(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC32238(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322C0(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322C4(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322CC(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322D0(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322D8(CPUState* cpu); -extern void SCPH1001_func_1FC321F0_cont_BFC322DC(CPUState* cpu); -extern void SCPH1001_func_1FC322E4(CPUState* cpu); -extern void SCPH1001_func_1FC322E4_cont_BFC32324(CPUState* cpu); -extern void SCPH1001_func_1FC322E4_cont_BFC32348(CPUState* cpu); -extern void SCPH1001_func_1FC322E4_cont_BFC32354(CPUState* cpu); -extern void SCPH1001_func_1FC32368(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC3239C(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323A0(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323A8(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323AC(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323B8(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323C0(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323C4(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323CC(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323D4(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323D8(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323EC(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323F0(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC323FC(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC32404(CPUState* cpu); -extern void SCPH1001_func_1FC32368_cont_BFC32408(CPUState* cpu); -extern void SCPH1001_func_1FC32410(CPUState* cpu); -extern void SCPH1001_func_1FC32410_cont_BFC32434(CPUState* cpu); -extern void SCPH1001_func_1FC32450(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC32490(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC324A4(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC324AC(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC324C8(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC324D0(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC324F8(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC32514(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC3251C(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC32534(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC32540(CPUState* cpu); -extern void SCPH1001_func_1FC32450_cont_BFC32548(CPUState* cpu); -extern void SCPH1001_func_1FC3255C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3258C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC325A8(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC325B0(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC325C8(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC325E4(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC325EC(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32604(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3260C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32624(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3262C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32644(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3264C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3265C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32660(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3266C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32674(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3267C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3268C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC32690(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC3269C(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC326C0(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC326D0(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC326E8(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC326F0(CPUState* cpu); -extern void SCPH1001_func_1FC3255C_cont_BFC326F8(CPUState* cpu); -extern void SCPH1001_func_1FC32710(CPUState* cpu); -extern void SCPH1001_func_1FC32724(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC32758(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC32764(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC3278C(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC327C4(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC327CC(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC327E0(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC327F4(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC327F8(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC32800(CPUState* cpu); -extern void SCPH1001_func_1FC32724_cont_BFC32808(CPUState* cpu); -extern void SCPH1001_func_1FC32820(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC3285C(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC3286C(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC32874(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC328BC(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC328C0(CPUState* cpu); -extern void SCPH1001_func_1FC32820_cont_BFC328CC(CPUState* cpu); -extern void SCPH1001_func_1FC328F4(CPUState* cpu); -extern void SCPH1001_func_1FC328F4_cont_BFC3291C(CPUState* cpu); -extern void SCPH1001_func_1FC328F4_cont_BFC32934(CPUState* cpu); -extern void SCPH1001_func_1FC32944(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC3294C(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC3296C(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC32988(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC329A8(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC329B0(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC329B8(CPUState* cpu); -extern void SCPH1001_func_1FC32944_cont_BFC329C0(CPUState* cpu); -extern void SCPH1001_func_1FC329F0(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32A44(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32A48(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32A50(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32A5C(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32A6C(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AA4(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AA8(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AB8(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32ABC(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AC4(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AEC(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AF0(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32AF4(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32B0C(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32B18(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32B1C(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32C30(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32C50(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32C90(CPUState* cpu); -extern void SCPH1001_func_1FC329F0_cont_BFC32C9C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D0C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D18(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D20(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D3C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D44(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D54(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D58(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D64(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D6C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D70(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D78(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D80(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D94(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32D98(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DA4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DAC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DB0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DB8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DC0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DD0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DD4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DE0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DE8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DEC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32DF4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E04(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E08(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E14(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E1C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E20(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E28(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E30(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E44(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E48(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E54(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E5C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E60(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E68(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E70(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E80(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E84(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E90(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E98(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32E9C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32EA0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32EB0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32EBC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32ECC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32ED4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F0C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F10(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F1C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F20(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F2C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F30(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F3C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F40(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F44(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F4C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F5C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F60(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F6C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F74(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F78(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F80(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F88(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32F9C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FA0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FAC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FB4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FB8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FC0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FC8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FD8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FDC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FE8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FF0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FF4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC32FFC(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3300C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33010(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3301C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33024(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33028(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33030(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33038(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3304C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33050(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3305C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33064(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33068(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33070(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33078(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33088(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3308C(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33098(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330A0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330A4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330A8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330B8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330C4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330D8(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330E4(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC330F0(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33104(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC33114(CPUState* cpu); -extern void SCPH1001_func_1FC32CCC_cont_BFC3311C(CPUState* cpu); -extern void SCPH1001_func_1FC33138(CPUState* cpu); -extern void SCPH1001_func_1FC33138_cont_BFC33148(CPUState* cpu); -extern void SCPH1001_func_1FC331A0(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC331E8(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC331F0(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC331F4(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33208(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33210(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33214(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33220(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33228(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3322C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33238(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33240(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33244(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33250(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3325C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33268(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3327C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3328C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3329C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332B4(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332C0(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332C4(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332CC(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332D8(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332EC(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC332FC(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3330C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33324(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC3332C(CPUState* cpu); -extern void SCPH1001_func_1FC331A0_cont_BFC33330(CPUState* cpu); -extern void SCPH1001_func_1FC33358(CPUState* cpu); -extern void SCPH1001_func_1FC33358_cont_BFC33398(CPUState* cpu); -extern void SCPH1001_func_1FC33358_cont_BFC333BC(CPUState* cpu); -extern void SCPH1001_func_1FC33358_cont_BFC333E0(CPUState* cpu); -extern void SCPH1001_func_1FC33400(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33438(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33460(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33468(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33478(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC3347C(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC3348C(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC3349C(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334AC(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334BC(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334C4(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334CC(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334D0(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334E0(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC334F0(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33504(CPUState* cpu); -extern void SCPH1001_func_1FC33400_cont_BFC33528(CPUState* cpu); -extern void SCPH1001_func_1FC33538(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3356C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33574(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33580(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33588(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33594(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3359C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335A8(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335B0(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335BC(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335C0(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335CC(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335D4(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335E0(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335E4(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC335F8(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33600(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3360C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33614(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33620(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33628(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33634(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33638(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33644(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3364C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3365C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33660(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33674(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3367C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33684(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3368C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC33698(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC3369C(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336A8(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336AC(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336BC(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336C4(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336D0(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336D4(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336E0(CPUState* cpu); -extern void SCPH1001_func_1FC33538_cont_BFC336E4(CPUState* cpu); -extern void SCPH1001_func_1FC336F0(CPUState* cpu); -extern void SCPH1001_func_1FC33758(CPUState* cpu); -extern void SCPH1001_func_1FC337AC(CPUState* cpu); -extern void SCPH1001_func_1FC33800(CPUState* cpu); -extern void SCPH1001_func_1FC3388C(CPUState* cpu); -extern void SCPH1001_func_1FC33918(CPUState* cpu); -extern void SCPH1001_func_1FC33978(CPUState* cpu); -extern void SCPH1001_func_1FC339F0(CPUState* cpu); -extern void SCPH1001_func_1FC339F0_cont_BFC33A58(CPUState* cpu); -extern void SCPH1001_func_1FC33AB8(CPUState* cpu); -extern void SCPH1001_func_1FC33AB8_cont_BFC33B20(CPUState* cpu); -extern void SCPH1001_func_1FC33B80(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33B9C(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33BC0(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33BC8(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33BCC(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33BD4(CPUState* cpu); -extern void SCPH1001_func_1FC33B80_cont_BFC33BFC(CPUState* cpu); -extern void SCPH1001_func_1FC33C04(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C20(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C44(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C4C(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C50(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C58(CPUState* cpu); -extern void SCPH1001_func_1FC33C04_cont_BFC33C78(CPUState* cpu); -extern void SCPH1001_func_1FC33C84(CPUState* cpu); -extern void SCPH1001_func_1FC33C90(CPUState* cpu); -extern void SCPH1001_func_1FC33C98(CPUState* cpu); -extern void SCPH1001_func_1FC33C98_cont_BFC33CB4(CPUState* cpu); -extern void SCPH1001_func_1FC33C98_cont_BFC33CBC(CPUState* cpu); -extern void SCPH1001_func_1FC33CC0(CPUState* cpu); -extern void SCPH1001_func_1FC33CC0_cont_BFC33CE0(CPUState* cpu); -extern void SCPH1001_func_1FC33CC0_cont_BFC33CE8(CPUState* cpu); -extern void SCPH1001_func_1FC33CC0_cont_BFC33CEC(CPUState* cpu); -extern void SCPH1001_func_1FC33CC0_cont_BFC33CF4(CPUState* cpu); -extern void SCPH1001_func_1FC33D1C(CPUState* cpu); -extern void SCPH1001_func_1FC33D24(CPUState* cpu); -extern void SCPH1001_func_1FC33D24_cont_BFC33D30(CPUState* cpu); -extern void SCPH1001_func_1FC33D24_cont_BFC33D9C(CPUState* cpu); -extern void SCPH1001_func_1FC33DA4(CPUState* cpu); -extern void SCPH1001_func_1FC33E20(CPUState* cpu); -extern void SCPH1001_func_1FC33E80(CPUState* cpu); -extern void SCPH1001_func_1FC33E90(CPUState* cpu); -extern void SCPH1001_func_1FC33EA0(CPUState* cpu); -extern void SCPH1001_func_1FC33EC0(CPUState* cpu); -extern void SCPH1001_func_1FC33ECC(CPUState* cpu); -extern void SCPH1001_func_1FC33EE0(CPUState* cpu); -extern void SCPH1001_func_1FC33EF4(CPUState* cpu); -extern void SCPH1001_func_1FC33F00(CPUState* cpu); -extern void SCPH1001_func_1FC33F20(CPUState* cpu); -extern void SCPH1001_func_1FC33F40(CPUState* cpu); -extern void SCPH1001_func_1FC33F54(CPUState* cpu); -extern void SCPH1001_func_1FC33F6C(CPUState* cpu); -extern void SCPH1001_func_1FC33F80(CPUState* cpu); -extern void SCPH1001_func_1FC33F94(CPUState* cpu); -extern void SCPH1001_func_1FC33FA8(CPUState* cpu); -extern void SCPH1001_func_1FC33FB4(CPUState* cpu); -extern void SCPH1001_func_1FC33FCC(CPUState* cpu); -extern void SCPH1001_func_1FC33FD8(CPUState* cpu); -extern void SCPH1001_func_1FC33FE4(CPUState* cpu); -extern void SCPH1001_func_1FC33FF0(CPUState* cpu); -extern void SCPH1001_func_1FC33FFC(CPUState* cpu); -extern void SCPH1001_func_1FC34008(CPUState* cpu); -extern void SCPH1001_func_1FC3401C(CPUState* cpu); -extern void SCPH1001_func_1FC34028(CPUState* cpu); -extern void SCPH1001_func_1FC3403C(CPUState* cpu); -extern void SCPH1001_func_1FC34054(CPUState* cpu); -extern void SCPH1001_func_1FC34068(CPUState* cpu); -extern void SCPH1001_func_1FC3407C(CPUState* cpu); -extern void SCPH1001_func_1FC34088(CPUState* cpu); -extern void SCPH1001_func_1FC3409C(CPUState* cpu); -extern void SCPH1001_func_1FC340CC(CPUState* cpu); -extern void SCPH1001_func_1FC340D8(CPUState* cpu); -extern void SCPH1001_func_1FC340E4(CPUState* cpu); -extern void SCPH1001_func_1FC34104(CPUState* cpu); -extern void SCPH1001_func_1FC34110(CPUState* cpu); -extern void SCPH1001_func_1FC34110_cont_BFC34120(CPUState* cpu); -extern void SCPH1001_func_1FC34110_cont_BFC34130(CPUState* cpu); -extern void SCPH1001_func_1FC34110_cont_BFC34148(CPUState* cpu); -extern void SCPH1001_func_1FC34110_cont_BFC34158(CPUState* cpu); -extern void SCPH1001_func_1FC34160(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC34188(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC34194(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC341A0(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC341B0(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC341C4(CPUState* cpu); -extern void SCPH1001_func_1FC34160_cont_BFC341DC(CPUState* cpu); -extern void SCPH1001_func_1FC34304(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC3432C(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC34338(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC34344(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC34354(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC34368(CPUState* cpu); -extern void SCPH1001_func_1FC34304_cont_BFC34380(CPUState* cpu); -extern void SCPH1001_func_1FC344A4(CPUState* cpu); -extern void SCPH1001_func_1FC344A4_cont_BFC344BC(CPUState* cpu); -extern void SCPH1001_func_1FC344A4_cont_BFC344D0(CPUState* cpu); -extern void SCPH1001_func_1FC345F4(CPUState* cpu); -extern void SCPH1001_func_1FC345F4_cont_BFC3460C(CPUState* cpu); -extern void SCPH1001_func_1FC345F4_cont_BFC34620(CPUState* cpu); -extern void SCPH1001_func_1FC34748(CPUState* cpu); -extern void SCPH1001_func_1FC34748_cont_BFC34760(CPUState* cpu); -extern void SCPH1001_func_1FC34748_cont_BFC34774(CPUState* cpu); -extern void SCPH1001_func_1FC34898(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348A8(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348B4(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348BC(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348C0(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348C8(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348D0(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348D8(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348E0(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348E4(CPUState* cpu); -extern void SCPH1001_func_1FC34898_cont_BFC348EC(CPUState* cpu); -extern void SCPH1001_func_1FC348FC(CPUState* cpu); -extern void SCPH1001_func_1FC348FC_cont_BFC34904(CPUState* cpu); -extern void SCPH1001_func_1FC348FC_cont_BFC3490C(CPUState* cpu); -extern void SCPH1001_func_1FC34924(CPUState* cpu); -extern void SCPH1001_func_1FC34928(CPUState* cpu); -extern void SCPH1001_func_1FC34928_cont_BFC34930(CPUState* cpu); -extern void SCPH1001_func_1FC34928_cont_BFC34938(CPUState* cpu); -extern void SCPH1001_func_1FC34954(CPUState* cpu); -extern void SCPH1001_func_1FC34958(CPUState* cpu); -extern void SCPH1001_func_1FC34958_cont_BFC34960(CPUState* cpu); -extern void SCPH1001_func_1FC34958_cont_BFC34968(CPUState* cpu); -extern void SCPH1001_func_1FC34980(CPUState* cpu); -extern void SCPH1001_func_1FC34984(CPUState* cpu); -extern void SCPH1001_func_1FC34984_cont_BFC3498C(CPUState* cpu); -extern void SCPH1001_func_1FC34984_cont_BFC34994(CPUState* cpu); -extern void SCPH1001_func_1FC34984_cont_BFC349B0(CPUState* cpu); -extern void SCPH1001_func_1FC349B8(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349C0(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349C4(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349CC(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349D4(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349D8(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349E0(CPUState* cpu); -extern void SCPH1001_func_1FC349B8_cont_BFC349E8(CPUState* cpu); -extern void SCPH1001_func_1FC34A04(CPUState* cpu); -extern void SCPH1001_func_1FC34A08(CPUState* cpu); -extern void SCPH1001_func_1FC34A08_cont_BFC34A10(CPUState* cpu); -extern void SCPH1001_func_1FC34A08_cont_BFC34A18(CPUState* cpu); -extern void SCPH1001_func_1FC34A30(CPUState* cpu); -extern void SCPH1001_func_1FC34A34(CPUState* cpu); -extern void SCPH1001_func_1FC34A34_cont_BFC34A3C(CPUState* cpu); -extern void SCPH1001_func_1FC34A34_cont_BFC34A44(CPUState* cpu); -extern void SCPH1001_func_1FC34A60(CPUState* cpu); -extern void SCPH1001_func_1FC34A64(CPUState* cpu); -extern void SCPH1001_func_1FC34A64_cont_BFC34A6C(CPUState* cpu); -extern void SCPH1001_func_1FC34A64_cont_BFC34A74(CPUState* cpu); -extern void SCPH1001_func_1FC34A64_cont_BFC34A88(CPUState* cpu); -extern void SCPH1001_func_1FC34A90(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AB4(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AB8(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AC4(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34ACC(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AD0(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AD8(CPUState* cpu); -extern void SCPH1001_func_1FC34AA0_cont_BFC34AE0(CPUState* cpu); -extern void SCPH1001_func_1FC34AF0(CPUState* cpu); -extern void SCPH1001_func_1FC34B08(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B1C(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B20(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B2C(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B34(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B38(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B40(CPUState* cpu); -extern void SCPH1001_func_1FC34B08_cont_BFC34B48(CPUState* cpu); -extern void SCPH1001_func_1FC34B58(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34CC8(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34CD0(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34CE0(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34CE8(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34CF4(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D04(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D24(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D2C(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D40(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D54(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D60(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D70(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D80(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34D9C(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34DC8(CPUState* cpu); -extern void SCPH1001_func_1FC34B58_cont_BFC34DF0(CPUState* cpu); -extern void SCPH1001_func_1FC34E00(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E18(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E28(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E34(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E58(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E80(CPUState* cpu); -extern void SCPH1001_func_1FC34E00_cont_BFC34E8C(CPUState* cpu); -extern void SCPH1001_func_1FC34EC0(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F38(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F40(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F50(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F60(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F70(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F80(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F88(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F90(CPUState* cpu); -extern void SCPH1001_func_1FC34EC4_cont_BFC34F94(CPUState* cpu); -extern void SCPH1001_func_1FC34FA0(CPUState* cpu); -extern void SCPH1001_func_1FC35128(CPUState* cpu); -extern void SCPH1001_func_1FC3524C(CPUState* cpu); -extern void SCPH1001_func_1FC35348(CPUState* cpu); -extern void SCPH1001_func_1FC35470(CPUState* cpu); -extern void SCPH1001_func_1FC35598(CPUState* cpu); -extern void SCPH1001_func_1FC35698(CPUState* cpu); -extern void SCPH1001_func_1FC357C4(CPUState* cpu); -extern void SCPH1001_func_1FC3582C(CPUState* cpu); -extern void SCPH1001_func_1FC3586C(CPUState* cpu); -extern void SCPH1001_func_1FC35890(CPUState* cpu); -extern void SCPH1001_func_1FC359B4(CPUState* cpu); -extern void SCPH1001_func_1FC35AD8(CPUState* cpu); -extern void SCPH1001_func_1FC35B08(CPUState* cpu); -extern void SCPH1001_func_1FC35B38(CPUState* cpu); -extern void SCPH1001_func_1FC35B68(CPUState* cpu); -extern void SCPH1001_func_1FC35B88(CPUState* cpu); -extern void SCPH1001_func_1FC35B88_cont_BFC35BA0(CPUState* cpu); -extern void SCPH1001_func_1FC35B88_cont_BFC35BB0(CPUState* cpu); -extern void SCPH1001_func_1FC35BC4(CPUState* cpu); -extern void SCPH1001_func_1FC35C28(CPUState* cpu); -extern void SCPH1001_func_1FC35C28_cont_BFC35C3C(CPUState* cpu); -extern void SCPH1001_func_1FC35C28_cont_BFC35C4C(CPUState* cpu); -extern void SCPH1001_func_1FC35C60(CPUState* cpu); -extern void SCPH1001_func_1FC35CC8(CPUState* cpu); -extern void SCPH1001_func_1FC35D10(CPUState* cpu); -extern void SCPH1001_func_1FC35D58(CPUState* cpu); -extern void SCPH1001_func_1FC35DA0(CPUState* cpu); -extern void SCPH1001_func_1FC35DD4(CPUState* cpu); -extern void SCPH1001_func_1FC35E30(CPUState* cpu); -extern void SCPH1001_func_1FC35E64(CPUState* cpu); -extern void SCPH1001_func_1FC35E98(CPUState* cpu); -extern void SCPH1001_func_1FC35EC0(CPUState* cpu); -extern void SCPH1001_func_1FC35EEC(CPUState* cpu); -extern void SCPH1001_func_1FC35F18(CPUState* cpu); -extern void SCPH1001_func_1FC35F38(CPUState* cpu); -extern void SCPH1001_func_1FC35F78(CPUState* cpu); -extern void SCPH1001_func_1FC35FA0(CPUState* cpu); -extern void SCPH1001_func_1FC35FD0(CPUState* cpu); -extern void SCPH1001_func_1FC36000(CPUState* cpu); -extern void SCPH1001_func_1FC36024(CPUState* cpu); -extern void SCPH1001_func_1FC36068(CPUState* cpu); -extern void SCPH1001_func_1FC36094(CPUState* cpu); -extern void SCPH1001_func_1FC360E0(CPUState* cpu); -extern void SCPH1001_func_1FC36104(CPUState* cpu); -extern void SCPH1001_func_1FC3614C(CPUState* cpu); -extern void SCPH1001_func_1FC36178(CPUState* cpu); -extern void SCPH1001_func_1FC361A0(CPUState* cpu); -extern void SCPH1001_func_1FC361CC(CPUState* cpu); -extern void SCPH1001_func_1FC361F4(CPUState* cpu); -extern void SCPH1001_func_1FC3621C(CPUState* cpu); -extern void SCPH1001_func_1FC36244(CPUState* cpu); -extern void SCPH1001_func_1FC3625C(CPUState* cpu); -extern void SCPH1001_func_1FC36280(CPUState* cpu); -extern void SCPH1001_func_1FC36294(CPUState* cpu); -extern void SCPH1001_func_1FC362BC(CPUState* cpu); -extern void SCPH1001_func_1FC362D0(CPUState* cpu); -extern void SCPH1001_func_1FC3632C(CPUState* cpu); -extern void SCPH1001_func_1FC36388(CPUState* cpu); -extern void SCPH1001_func_1FC363A0(CPUState* cpu); -extern void SCPH1001_func_1FC363A0_cont_BFC363A8(CPUState* cpu); -extern void SCPH1001_func_1FC363A0_cont_BFC363E8(CPUState* cpu); -extern void SCPH1001_func_1FC363F0(CPUState* cpu); -extern void SCPH1001_func_1FC363F0_cont_BFC363F8(CPUState* cpu); -extern void SCPH1001_func_1FC363F0_cont_BFC36450(CPUState* cpu); -extern void SCPH1001_func_1FC36458(CPUState* cpu); -extern void SCPH1001_func_1FC364DC(CPUState* cpu); -extern void SCPH1001_func_1FC3653C(CPUState* cpu); -extern void SCPH1001_func_1FC365C4(CPUState* cpu); -extern void SCPH1001_func_1FC365F8(CPUState* cpu); -extern void SCPH1001_func_1FC365F8_cont_BFC36654(CPUState* cpu); -extern void SCPH1001_func_1FC365F8_cont_BFC3665C(CPUState* cpu); -extern void SCPH1001_func_1FC365F8_cont_BFC3667C(CPUState* cpu); -extern void SCPH1001_func_1FC36684(CPUState* cpu); -extern void SCPH1001_func_1FC36684_cont_BFC366E0(CPUState* cpu); -extern void SCPH1001_func_1FC36684_cont_BFC366E8(CPUState* cpu); -extern void SCPH1001_func_1FC36684_cont_BFC36738(CPUState* cpu); -extern void SCPH1001_func_1FC36740(CPUState* cpu); -extern void SCPH1001_func_1FC36740_cont_BFC36798(CPUState* cpu); -extern void SCPH1001_func_1FC36740_cont_BFC367A0(CPUState* cpu); -extern void SCPH1001_func_1FC36740_cont_BFC367CC(CPUState* cpu); -extern void SCPH1001_func_1FC367D4(CPUState* cpu); -extern void SCPH1001_func_1FC367D4_cont_BFC36828(CPUState* cpu); -extern void SCPH1001_func_1FC367D4_cont_BFC36830(CPUState* cpu); -extern void SCPH1001_func_1FC367D4_cont_BFC36834(CPUState* cpu); -extern void SCPH1001_func_1FC367D4_cont_BFC36878(CPUState* cpu); -extern void SCPH1001_func_1FC36880(CPUState* cpu); -extern void SCPH1001_func_1FC36880_cont_BFC368D8(CPUState* cpu); -extern void SCPH1001_func_1FC36880_cont_BFC368E0(CPUState* cpu); -extern void SCPH1001_func_1FC36880_cont_BFC36938(CPUState* cpu); -extern void SCPH1001_func_1FC36940(CPUState* cpu); -extern void SCPH1001_func_1FC36998(CPUState* cpu); -extern void SCPH1001_func_1FC36A3C(CPUState* cpu); -extern void SCPH1001_func_1FC36A3C_cont_BFC36A94(CPUState* cpu); -extern void SCPH1001_func_1FC36A3C_cont_BFC36A98(CPUState* cpu); -extern void SCPH1001_func_1FC36A3C_cont_BFC36A9C(CPUState* cpu); -extern void SCPH1001_func_1FC36A3C_cont_BFC36B0C(CPUState* cpu); -extern void SCPH1001_func_1FC36B14(CPUState* cpu); -extern void SCPH1001_func_1FC36B14_cont_BFC36B6C(CPUState* cpu); -extern void SCPH1001_func_1FC36B14_cont_BFC36B70(CPUState* cpu); -extern void SCPH1001_func_1FC36B14_cont_BFC36B74(CPUState* cpu); -extern void SCPH1001_func_1FC36B14_cont_BFC36BE4(CPUState* cpu); -extern void SCPH1001_func_1FC36BEC(CPUState* cpu); -extern void SCPH1001_func_1FC36BEC_cont_BFC36C24(CPUState* cpu); -extern void SCPH1001_func_1FC36BEC_cont_BFC36C34(CPUState* cpu); -extern void SCPH1001_func_1FC36C60(CPUState* cpu); -extern void SCPH1001_func_1FC36C60_cont_BFC36C74(CPUState* cpu); -extern void SCPH1001_func_1FC36C60_cont_BFC36C84(CPUState* cpu); -extern void SCPH1001_func_1FC36CA4(CPUState* cpu); -extern void SCPH1001_func_1FC36CA4_cont_BFC36CB8(CPUState* cpu); -extern void SCPH1001_func_1FC36CA4_cont_BFC36CC8(CPUState* cpu); -extern void SCPH1001_func_1FC36CF0(CPUState* cpu); -extern void SCPH1001_func_1FC36CF0_cont_BFC36D0C(CPUState* cpu); -extern void SCPH1001_func_1FC36D1C(CPUState* cpu); -extern void SCPH1001_func_1FC36D48(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36D50(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36D68(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36D78(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36D94(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36DA0(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36DA8(CPUState* cpu); -extern void SCPH1001_func_1FC36D48_cont_BFC36DC4(CPUState* cpu); -extern void SCPH1001_func_1FC36DD0(CPUState* cpu); -extern void SCPH1001_func_1FC36DD0_cont_BFC36DEC(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E0C(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E14(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E18(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E34(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E54(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E68(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E80(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E8C(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36E94(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36EB0(CPUState* cpu); -extern void SCPH1001_func_1FC36DF8_cont_BFC36EB4(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36EE0(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36EE8(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36EEC(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F08(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F28(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F3C(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F50(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F5C(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F60(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F64(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F80(CPUState* cpu); -extern void SCPH1001_func_1FC36EC0_cont_BFC36F84(CPUState* cpu); -extern void SCPH1001_func_1FC36F90(CPUState* cpu); -extern void SCPH1001_func_1FC36F90_cont_BFC36FB0(CPUState* cpu); -extern void SCPH1001_func_1FC36F90_cont_BFC36FD8(CPUState* cpu); -extern void SCPH1001_func_1FC36F90_cont_BFC36FE0(CPUState* cpu); -extern void SCPH1001_func_1FC36FF0(CPUState* cpu); -extern void SCPH1001_func_1FC37028(CPUState* cpu); -extern void SCPH1001_func_1FC37028_cont_BFC37034(CPUState* cpu); -extern void SCPH1001_func_1FC37028_cont_BFC3703C(CPUState* cpu); -extern void SCPH1001_func_1FC37028_cont_BFC37044(CPUState* cpu); -extern void SCPH1001_func_1FC37028_cont_BFC37060(CPUState* cpu); -extern void SCPH1001_func_1FC37070(CPUState* cpu); -extern void SCPH1001_func_1FC37070_cont_BFC37090(CPUState* cpu); -extern void SCPH1001_func_1FC370A0(CPUState* cpu); -extern void SCPH1001_func_1FC370A0_cont_BFC370E4(CPUState* cpu); -extern void SCPH1001_func_1FC370F4(CPUState* cpu); -extern void SCPH1001_func_1FC370F4_cont_BFC37120(CPUState* cpu); -extern void SCPH1001_func_1FC37130(CPUState* cpu); -extern void SCPH1001_func_1FC37130_cont_BFC3715C(CPUState* cpu); -extern void SCPH1001_func_1FC3716C(CPUState* cpu); -extern void SCPH1001_func_1FC3716C_cont_BFC371D4(CPUState* cpu); -extern void SCPH1001_func_1FC37334(CPUState* cpu); -extern void SCPH1001_func_1FC37334_cont_BFC37358(CPUState* cpu); -extern void SCPH1001_func_1FC37368(CPUState* cpu); -extern void SCPH1001_func_1FC37368_cont_BFC37380(CPUState* cpu); -extern void SCPH1001_func_1FC37368_cont_BFC37390(CPUState* cpu); -extern void SCPH1001_func_1FC37368_cont_BFC373AC(CPUState* cpu); -extern void SCPH1001_func_1FC37368_cont_BFC373D0(CPUState* cpu); -extern void SCPH1001_func_1FC373E0(CPUState* cpu); -extern void SCPH1001_func_1FC373E0_cont_BFC373F8(CPUState* cpu); -extern void SCPH1001_func_1FC373E0_cont_BFC37400(CPUState* cpu); -extern void SCPH1001_func_1FC373E0_cont_BFC37408(CPUState* cpu); -extern void SCPH1001_func_1FC373E0_cont_BFC37424(CPUState* cpu); -extern void SCPH1001_func_1FC373E0_cont_BFC37428(CPUState* cpu); -extern void SCPH1001_func_1FC37434(CPUState* cpu); -extern void SCPH1001_func_1FC37434_cont_BFC37458(CPUState* cpu); -extern void SCPH1001_func_1FC37434_cont_BFC37494(CPUState* cpu); -extern void SCPH1001_func_1FC37434_cont_BFC374A8(CPUState* cpu); -extern void SCPH1001_func_1FC374BC(CPUState* cpu); -extern void SCPH1001_func_1FC374BC_cont_BFC374DC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37508(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37518(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37538(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37550(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37570(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375A0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375A8(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375AC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375C4(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375CC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375D0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375DC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375E4(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375F0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375F8(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC375FC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37600(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37610(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37618(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3761C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37624(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3762C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37630(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37634(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3763C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37644(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37648(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37650(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37658(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3765C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37660(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3766C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37674(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37678(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37680(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37688(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3768C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37690(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC376C8(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37700(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37718(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37720(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37730(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37734(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37744(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37748(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3775C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37760(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37774(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3777C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37780(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37788(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37790(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37794(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3779C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377A4(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377A8(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377B0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377B8(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377BC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377C4(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377CC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377D0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377E4(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377EC(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC377F0(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC3780C(CPUState* cpu); -extern void SCPH1001_func_1FC374EC_cont_BFC37824(CPUState* cpu); -extern void SCPH1001_func_1FC37838(CPUState* cpu); -extern void SCPH1001_func_1FC37838_cont_BFC37858(CPUState* cpu); -extern void SCPH1001_func_1FC37868(CPUState* cpu); -extern void SCPH1001_func_1FC37868_cont_BFC37888(CPUState* cpu); -extern void SCPH1001_func_1FC37868_cont_BFC37898(CPUState* cpu); -extern void SCPH1001_func_1FC37868_cont_BFC378A0(CPUState* cpu); -extern void SCPH1001_func_1FC37868_cont_BFC378A4(CPUState* cpu); -extern void SCPH1001_func_1FC378B4(CPUState* cpu); -extern void SCPH1001_func_1FC378B4_cont_BFC378E8(CPUState* cpu); -extern void SCPH1001_func_1FC37908(CPUState* cpu); -extern void SCPH1001_func_1FC37908_cont_BFC37948(CPUState* cpu); -extern void SCPH1001_func_1FC37908_cont_BFC3797C(CPUState* cpu); -extern void SCPH1001_func_1FC37998(CPUState* cpu); -extern void SCPH1001_func_1FC37998_cont_BFC379D4(CPUState* cpu); -extern void SCPH1001_func_1FC37A4C(CPUState* cpu); -extern void SCPH1001_func_1FC37A4C_cont_BFC37A90(CPUState* cpu); -extern void SCPH1001_func_1FC37A4C_cont_BFC37AA8(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37AF0(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37B1C(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37B40(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37B64(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37B80(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37BA8(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37BE0(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37BE8(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37BEC(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37BFC(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C04(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C08(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C0C(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C10(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C20(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C28(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C3C(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C44(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C48(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C5C(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C64(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C6C(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C70(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C78(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C80(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C84(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37C98(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37CAC(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37CB0(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37D40(CPUState* cpu); -extern void SCPH1001_func_1FC37AC4_cont_BFC37D90(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37DDC(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37DE4(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37DEC(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37DF0(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37DF8(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E00(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E04(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E1C(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E24(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E2C(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E30(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E38(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E40(CPUState* cpu); -extern void SCPH1001_func_1FC37DC8_cont_BFC37E44(CPUState* cpu); -extern void SCPH1001_func_1FC37E60(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E74(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E7C(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E88(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E90(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E94(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37E9C(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EA4(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EB4(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EC8(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37ED0(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37ED4(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EE0(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EE8(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EF0(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EF4(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37EFC(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37F00(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37F08(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37F10(CPUState* cpu); -extern void SCPH1001_func_1FC37E60_cont_BFC37F30(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F60(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F68(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F74(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F7C(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F80(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F88(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37F90(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FA0(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FB4(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FBC(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FC0(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FCC(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FD4(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FDC(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FE0(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FE8(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FEC(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FF4(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC37FFC(CPUState* cpu); -extern void SCPH1001_func_1FC37F4C_cont_BFC3801C(CPUState* cpu); -extern void SCPH1001_func_1FC38038(CPUState* cpu); -extern void SCPH1001_func_1FC38038_cont_BFC38054(CPUState* cpu); -extern void SCPH1001_func_1FC38038_cont_BFC38070(CPUState* cpu); -extern void SCPH1001_func_1FC38090(CPUState* cpu); -extern void SCPH1001_func_1FC38090_cont_BFC38098(CPUState* cpu); -extern void SCPH1001_func_1FC38090_cont_BFC38100(CPUState* cpu); -extern void SCPH1001_func_1FC38108(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38110(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC3811C(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38130(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38148(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38150(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38158(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC3816C(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC38188(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC3818C(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC3819C(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381B0(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381B4(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381B8(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381C0(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381D4(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381DC(CPUState* cpu); -extern void SCPH1001_func_1FC38108_cont_BFC381E4(CPUState* cpu); -extern void SCPH1001_func_1FC38204(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC38270(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC38290(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC38298(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC382A0(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC382A8(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC382C8(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC382CC(CPUState* cpu); -extern void SCPH1001_func_1FC38204_cont_BFC382D0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38320(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38328(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3832C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3833C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38344(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38348(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3834C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38350(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38360(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38368(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3837C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38384(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38388(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3839C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383A4(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383AC(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383B0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383B8(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383C0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383C4(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383D8(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383EC(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC383F0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC3847C(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38494(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC384AC(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC384C0(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC384C4(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38508(CPUState* cpu); -extern void SCPH1001_func_1FC382E0_cont_BFC38514(CPUState* cpu); -extern void SCPH1001_func_1FC38524(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC3856C(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38574(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38578(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38588(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38590(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38594(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38598(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC3859C(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385AC(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385B4(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385C8(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385D0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385D4(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385E8(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385F0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385F8(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC385FC(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38604(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC3860C(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38610(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38624(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38630(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38634(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38644(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38660(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38664(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38670(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38690(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38698(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386A0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386C0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386E0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386EC(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386F0(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC386F4(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38718(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38720(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38724(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38730(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38748(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38750(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38754(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC38760(CPUState* cpu); -extern void SCPH1001_func_1FC38524_cont_BFC387C0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38818(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38820(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38824(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38834(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC3883C(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38840(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38844(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38848(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38858(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38860(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38874(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC3887C(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38880(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38894(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC3889C(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388A4(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388A8(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388B0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388B8(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388BC(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388DC(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388E0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388EC(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC388F4(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38914(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC3891C(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38924(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC3892C(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38940(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38960(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38968(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389AC(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389C0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389C8(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389D0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389D4(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389E0(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC389F8(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38A00(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38A04(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38A10(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38A68(CPUState* cpu); -extern void SCPH1001_func_1FC387D4_cont_BFC38A6C(CPUState* cpu); -extern void SCPH1001_func_1FC38A7C(CPUState* cpu); -extern void SCPH1001_func_1FC38A7C_cont_BFC38A94(CPUState* cpu); -extern void SCPH1001_func_1FC38AA4(CPUState* cpu); -extern void SCPH1001_func_1FC38AD4(CPUState* cpu); -extern void SCPH1001_func_1FC38AF0(CPUState* cpu); -extern void SCPH1001_func_1FC38AF0_cont_BFC38AFC(CPUState* cpu); -extern void SCPH1001_func_1FC38AF0_cont_BFC38B08(CPUState* cpu); -extern void SCPH1001_func_1FC38AF0_cont_BFC38B20(CPUState* cpu); -extern void SCPH1001_func_1FC38B28(CPUState* cpu); -extern void SCPH1001_func_1FC38B80(CPUState* cpu); -extern void SCPH1001_func_1FC38BE8(CPUState* cpu); -extern void SCPH1001_func_1FC38BE8_cont_BFC38C24(CPUState* cpu); -extern void SCPH1001_func_1FC38BE8_cont_BFC38C58(CPUState* cpu); -extern void SCPH1001_func_1FC38C68(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38C94(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CA8(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CB0(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CB8(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CC0(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CD4(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38CD8(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38D78(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38D80(CPUState* cpu); -extern void SCPH1001_func_1FC38C68_cont_BFC38D9C(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38DC0(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38DC8(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38DE8(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38DFC(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E1C(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E24(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E40(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E48(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E68(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E70(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E78(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38E98(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F20(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F3C(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F48(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F5C(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F64(CPUState* cpu); -extern void SCPH1001_func_1FC38DAC_cont_BFC38F7C(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC38F94(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC38FCC(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39018(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39020(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39028(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39034(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC3906C(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39074(CPUState* cpu); -extern void SCPH1001_func_1FC38F8C_cont_BFC39078(CPUState* cpu); -extern void SCPH1001_func_1FC39080(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC3908C(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC3909C(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390B8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390C8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390CC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390D4(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390DC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC390F0(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39110(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39118(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39134(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC3913C(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39144(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC3914C(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39160(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39180(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39194(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC3919C(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC391BC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC391C8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC391DC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC391E4(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC391EC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39200(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39220(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39228(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39244(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39264(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39284(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC39290(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392A8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392B8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392BC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392C8(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392CC(CPUState* cpu); -extern void SCPH1001_func_1FC39080_cont_BFC392D8(CPUState* cpu); -extern void SCPH1001_func_1FC392E8(CPUState* cpu); -extern void SCPH1001_func_1FC39300(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC39320(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC39340(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC39348(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC3934C(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC3936C(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC39374(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC39378(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC393A8(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC393B0(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC393B8(CPUState* cpu); -extern void SCPH1001_func_1FC39300_cont_BFC393BC(CPUState* cpu); -extern void SCPH1001_func_1FC393CC(CPUState* cpu); -extern void SCPH1001_func_1FC393CC_cont_BFC393D8(CPUState* cpu); -extern void SCPH1001_func_1FC393CC_cont_BFC393F4(CPUState* cpu); -extern void SCPH1001_func_1FC39410(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39440(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39454(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39458(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39464(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39478(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC3947C(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39488(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC3948C(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC39494(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC3949C(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC394A4(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC394AC(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC394C0(CPUState* cpu); -extern void SCPH1001_func_1FC39410_cont_BFC394DC(CPUState* cpu); -extern void SCPH1001_func_1FC394EC(CPUState* cpu); -extern void SCPH1001_func_1FC394EC_cont_BFC3952C(CPUState* cpu); -extern void SCPH1001_func_1FC394EC_cont_BFC3953C(CPUState* cpu); -extern void SCPH1001_func_1FC3954C(CPUState* cpu); -extern void SCPH1001_func_1FC3954C_cont_BFC395A0(CPUState* cpu); -extern void SCPH1001_func_1FC3954C_cont_BFC395A8(CPUState* cpu); -extern void SCPH1001_func_1FC3954C_cont_BFC395AC(CPUState* cpu); -extern void SCPH1001_func_1FC3954C_cont_BFC395CC(CPUState* cpu); -extern void SCPH1001_func_1FC395EC(CPUState* cpu); -extern void SCPH1001_func_1FC39630(CPUState* cpu); -extern void SCPH1001_func_1FC39630_cont_BFC3964C(CPUState* cpu); -extern void SCPH1001_func_1FC39630_cont_BFC39664(CPUState* cpu); -extern void SCPH1001_func_1FC39630_cont_BFC39694(CPUState* cpu); -extern void SCPH1001_func_1FC39630_cont_BFC39698(CPUState* cpu); -extern void SCPH1001_func_1FC39630_cont_BFC396C0(CPUState* cpu); -extern void SCPH1001_func_1FC396D0(CPUState* cpu); -extern void SCPH1001_func_1FC396E8(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC396FC(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC39708(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC39740(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC39748(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC39780(CPUState* cpu); -extern void SCPH1001_func_1FC396E8_cont_BFC39784(CPUState* cpu); -extern void SCPH1001_func_1FC39804(CPUState* cpu); -extern void SCPH1001_func_1FC398D4(CPUState* cpu); -extern void SCPH1001_func_1FC398D4_cont_BFC398DC(CPUState* cpu); -extern void SCPH1001_func_1FC398D4_cont_BFC398F4(CPUState* cpu); -extern void SCPH1001_func_1FC39910(CPUState* cpu); -extern void SCPH1001_func_1FC39910_cont_BFC39918(CPUState* cpu); -extern void SCPH1001_func_1FC39910_cont_BFC39930(CPUState* cpu); -extern void SCPH1001_func_1FC3994C(CPUState* cpu); -extern void SCPH1001_func_1FC3999C(CPUState* cpu); -extern void SCPH1001_func_1FC399EC(CPUState* cpu); -extern void SCPH1001_func_1FC39A14(CPUState* cpu); -extern void SCPH1001_func_1FC39A3C(CPUState* cpu); -extern void SCPH1001_func_1FC39ADC(CPUState* cpu); -extern void SCPH1001_func_1FC39BA4(CPUState* cpu); -extern void SCPH1001_func_1FC39BCC(CPUState* cpu); -extern void SCPH1001_func_1FC39D38(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39D70(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39D8C(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39DB4(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39DCC(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39DE4(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39DEC(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39DF4(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39E30(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39E38(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39E74(CPUState* cpu); -extern void SCPH1001_func_1FC39D38_cont_BFC39E78(CPUState* cpu); -extern void SCPH1001_func_1FC39E84(CPUState* cpu); -extern void SCPH1001_func_1FC39E84_cont_BFC39EBC(CPUState* cpu); -extern void SCPH1001_func_1FC39E84_cont_BFC39EE4(CPUState* cpu); -extern void SCPH1001_func_1FC39E84_cont_BFC39EFC(CPUState* cpu); -extern void SCPH1001_func_1FC39E84_cont_BFC39F14(CPUState* cpu); -extern void SCPH1001_func_1FC39F30(CPUState* cpu); -extern void SCPH1001_func_1FC39F30_cont_BFC39F40(CPUState* cpu); -extern void SCPH1001_func_1FC39F30_cont_BFC39F50(CPUState* cpu); -extern void SCPH1001_func_1FC39F30_cont_BFC39F58(CPUState* cpu); -extern void SCPH1001_func_1FC39F30_cont_BFC39F60(CPUState* cpu); -extern void SCPH1001_func_1FC39F30_cont_BFC39F80(CPUState* cpu); -extern void SCPH1001_func_1FC39F90(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FA0(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FAC(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FB4(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FBC(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FD8(CPUState* cpu); -extern void SCPH1001_func_1FC39F90_cont_BFC39FDC(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A014(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A020(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A02C(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A034(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A044(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A060(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A06C(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A078(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A080(CPUState* cpu); -extern void SCPH1001_func_1FC39FE4_cont_BFC3A084(CPUState* cpu); -extern void SCPH1001_func_1FC3A094(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A0C8(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A0E4(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A114(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A120(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A13C(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A150(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A164(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A16C(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A178(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A184(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A198(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A1AC(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A1C8(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A1DC(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A1EC(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A1F8(CPUState* cpu); -extern void SCPH1001_func_1FC3A094_cont_BFC3A210(CPUState* cpu); -extern void SCPH1001_func_1FC3A228(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A244(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A250(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A268(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A274(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A2A4(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A2AC(CPUState* cpu); -extern void SCPH1001_func_1FC3A228_cont_BFC3A2B0(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A2D4(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A2F4(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A308(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A31C(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A334(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A33C(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A340(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A344(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A358(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A36C(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A3B8(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A3BC(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A3CC(CPUState* cpu); -extern void SCPH1001_func_1FC3A2C0_cont_BFC3A3F4(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A480(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A498(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A4AC(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A4CC(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A4DC(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A4E4(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A4F8(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A508(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A510(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A518(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A524(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A52C(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A540(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A550(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A560(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A568(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A57C(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A584(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5A0(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5A8(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5B0(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5B8(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5C0(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5C4(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5D0(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5D4(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A5F4(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A608(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A610(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A624(CPUState* cpu); -extern void SCPH1001_func_1FC3A44C_cont_BFC3A628(CPUState* cpu); -extern void SCPH1001_func_1FC3A638(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A714(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A730(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A734(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A74C(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A764(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A778(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A77C(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A78C(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7A4(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7B8(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7BC(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7CC(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7E0(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7E8(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7F0(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A7F4(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A894(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A8A8(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A8BC(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A8D4(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A900(CPUState* cpu); -extern void SCPH1001_func_1FC3A638_cont_BFC3A930(CPUState* cpu); -extern void SCPH1001_func_1FC3A95C(CPUState* cpu); -extern void SCPH1001_func_1FC3A95C_cont_BFC3A974(CPUState* cpu); -extern void SCPH1001_func_1FC3A95C_cont_BFC3A988(CPUState* cpu); -extern void SCPH1001_func_1FC3A95C_cont_BFC3A98C(CPUState* cpu); -extern void SCPH1001_func_1FC3A95C_cont_BFC3A99C(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AA20(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AA24(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AA4C(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AA50(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AA9C(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AAA8(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AAB0(CPUState* cpu); -extern void SCPH1001_func_1FC3A9EC_cont_BFC3AABC(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AAE0(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AAF4(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AB20(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AB34(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AB50(CPUState* cpu); -extern void SCPH1001_func_1FC3AAC4_cont_BFC3AB68(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3ABB4(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3ABD8(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3ABDC(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3ABF4(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3AC18(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3AC1C(CPUState* cpu); -extern void SCPH1001_func_1FC3AB70_cont_BFC3AC34(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C_cont_BFC3ACB0(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C_cont_BFC3ACB8(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C_cont_BFC3ACD0(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C_cont_BFC3ACE8(CPUState* cpu); -extern void SCPH1001_func_1FC3AC9C_cont_BFC3ACF4(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3ADA0(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3ADA8(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3ADB0(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE34(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE48(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE50(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE60(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE68(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE6C(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE74(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AE84(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AEB0(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AF44(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AF68(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AF70(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AFD8(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AFE0(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3AFEC(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3B004(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3B018(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3B028(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3B02C(CPUState* cpu); -extern void SCPH1001_func_1FC3AD68_cont_BFC3B03C(CPUState* cpu); -extern void SCPH1001_func_1FC3B054(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B0A8(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B0B8(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B0D4(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B0E4(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B0F4(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B104(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B110(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B118(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B12C(CPUState* cpu); -extern void SCPH1001_func_1FC3B054_cont_BFC3B134(CPUState* cpu); -extern void SCPH1001_func_1FC3B160(CPUState* cpu); -extern void SCPH1001_func_1FC3B160_cont_BFC3B174(CPUState* cpu); -extern void SCPH1001_func_1FC3B160_cont_BFC3B17C(CPUState* cpu); -extern void SCPH1001_func_1FC3B160_cont_BFC3B1B8(CPUState* cpu); -extern void SCPH1001_func_1FC3B30C(CPUState* cpu); -extern void SCPH1001_func_1FC3B30C_cont_BFC3B320(CPUState* cpu); -extern void SCPH1001_func_1FC3B30C_cont_BFC3B338(CPUState* cpu); -extern void SCPH1001_func_1FC3B30C_cont_BFC3B350(CPUState* cpu); -extern void SCPH1001_func_1FC3B30C_cont_BFC3B358(CPUState* cpu); -extern void SCPH1001_func_1FC3B368(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B388(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B39C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3A4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3B4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3C4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3CC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3D4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3E0(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3EC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B3FC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B424(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B430(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B438(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B444(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B460(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B46C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B470(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B490(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B498(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B4A8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B4C4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B4C8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B4F0(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B4FC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B50C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B528(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B530(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B544(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B548(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B554(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B558(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B560(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B57C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B58C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B5A8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B5AC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B5E0(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B5EC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B610(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B614(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B62C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B634(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B668(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B674(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B698(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B6A4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B6AC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B6B8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B6C4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B6EC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B70C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B71C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B738(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B750(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B760(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B77C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B780(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B798(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7AC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7B4(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7B8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7C0(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7D8(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7DC(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B7F0(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B808(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B80C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B81C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B82C(CPUState* cpu); -extern void SCPH1001_func_1FC3B368_cont_BFC3B84C(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B87C(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B884(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B88C(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8A8(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8B0(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8B4(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8D0(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8DC(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B8FC(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B914(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B91C(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B920(CPUState* cpu); -extern void SCPH1001_func_1FC3B85C_cont_BFC3B92C(CPUState* cpu); -extern void SCPH1001_func_1FC3B93C(CPUState* cpu); -extern void SCPH1001_func_1FC3B93C_cont_BFC3B950(CPUState* cpu); -extern void SCPH1001_func_1FC3B964(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3B9BC(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3B9CC(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3BA4C(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3BA58(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3BA60(CPUState* cpu); -extern void SCPH1001_func_1FC3B964_cont_BFC3BA6C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BA98(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BAA4(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BAAC(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BADC(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BAF0(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BAFC(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB10(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB14(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB20(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB28(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB2C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB3C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB40(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB60(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB64(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB70(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB78(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB7C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BB88(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BBD4(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BBE0(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BBEC(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BC0C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BC14(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BC8C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BC9C(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BCA8(CPUState* cpu); -extern void SCPH1001_func_1FC3BA74_cont_BFC3BCB0(CPUState* cpu); -extern void SCPH1001_func_1FC3BD78(CPUState* cpu); -extern void SCPH1001_func_1FC3BD78_cont_BFC3BD88(CPUState* cpu); -extern void SCPH1001_func_1FC3BD98(CPUState* cpu); -extern void SCPH1001_func_1FC3BD98_cont_BFC3BDA8(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8_cont_BFC3BDCC(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8_cont_BFC3BDD8(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8_cont_BFC3BDF8(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8_cont_BFC3BE04(CPUState* cpu); -extern void SCPH1001_func_1FC3BDB8_cont_BFC3BE08(CPUState* cpu); -extern void SCPH1001_func_1FC3BE18(CPUState* cpu); -extern void SCPH1001_func_1FC3BE6C(CPUState* cpu); -extern void SCPH1001_func_1FC3BE6C_cont_BFC3BE7C(CPUState* cpu); -extern void SCPH1001_func_1FC3BE90(CPUState* cpu); -extern void SCPH1001_func_1FC3BE90_cont_BFC3BEF4(CPUState* cpu); -extern void SCPH1001_func_1FC3BF10(CPUState* cpu); -extern void SCPH1001_func_1FC3BF10_cont_BFC3BF30(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF64(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF6C(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF74(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF84(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF8C(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BF98(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFA0(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFA8(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFB4(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFBC(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFCC(CPUState* cpu); -extern void SCPH1001_func_1FC3BF40_cont_BFC3BFD8(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0_cont_BFC3C014(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0_cont_BFC3C024(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0_cont_BFC3C030(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0_cont_BFC3C044(CPUState* cpu); -extern void SCPH1001_func_1FC3BFF0_cont_BFC3C050(CPUState* cpu); -extern void SCPH1001_func_1FC3C060(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C070(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C080(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C0D8(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C0F0(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C100(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C118(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C128(CPUState* cpu); -extern void SCPH1001_func_1FC3C060_cont_BFC3C130(CPUState* cpu); -extern void SCPH1001_func_1FC3C140(CPUState* cpu); -extern void SCPH1001_func_1FC3C140_cont_BFC3C15C(CPUState* cpu); -extern void SCPH1001_func_1FC3C140_cont_BFC3C160(CPUState* cpu); -extern void SCPH1001_func_1FC3C140_cont_BFC3C194(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C1EC(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C200(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C208(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C218(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C230(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C240(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C254(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C258(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C25C(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C2C0(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C2E0(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C384(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3A8(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3B0(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3B8(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3C0(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3E4(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3EC(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3F4(CPUState* cpu); -extern void SCPH1001_func_1FC3C19C_cont_BFC3C3FC(CPUState* cpu); -extern void SCPH1001_func_1FC3C418(CPUState* cpu); -extern void SCPH1001_func_1FC3C428(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C46C(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C478(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C488(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4A0(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4A8(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4BC(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4C0(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4C4(CPUState* cpu); -extern void SCPH1001_func_1FC3C428_cont_BFC3C4D0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C528(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C53C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C540(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C54C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C564(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C574(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C588(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C58C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C594(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C59C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5A4(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5AC(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5B0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5B8(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5D0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C5F0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C604(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C608(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C614(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C62C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C63C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C650(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C654(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C65C(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C664(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C670(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C678(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6A0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6A8(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6B8(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6D0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6D8(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6EC(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6F0(CPUState* cpu); -extern void SCPH1001_func_1FC3C4E0_cont_BFC3C6F4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C740(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C748(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C750(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C758(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C76C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C780(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C794(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C79C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7A0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7A8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7B0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7C8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7E0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C7F4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C800(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C808(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C828(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C83C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C85C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C864(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C874(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C88C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C894(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8A8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8B0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8BC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8CC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8D0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8DC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8E4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8E8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8F0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C8F8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C918(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C92C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C940(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C960(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C968(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C978(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C990(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C998(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9AC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9B4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9C0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9D0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9D4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9E0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9E8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9EC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9F4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3C9FC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA14(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA24(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA3C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA4C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA5C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA74(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA7C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CA98(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CAB4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CACC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CAF4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB08(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB14(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB1C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB30(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB3C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB4C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB50(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB5C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB64(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB68(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB70(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB78(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB88(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CB9C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CBB8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CBC0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CBC8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC08(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC28(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC70(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC78(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC80(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC88(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC90(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CC9C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCA4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCAC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCB4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCBC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCC4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCCC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCD4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCDC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCE4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCE8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCF0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CCFC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD04(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD10(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD18(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD20(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD28(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD34(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD3C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD48(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD50(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD58(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD60(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD68(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD70(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD7C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD84(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD90(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CD98(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDA0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDA8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDB4(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDBC(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDC8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDD0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDD8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDE0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDE8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDF0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CDF8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE00(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE0C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE14(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE20(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE28(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE30(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE38(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE44(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE4C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE58(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE60(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE68(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE70(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE78(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE80(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE8C(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CE94(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CEA0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CEA8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CEB0(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CEB8(CPUState* cpu); -extern void SCPH1001_func_1FC3C710_cont_BFC3CEBC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CED8(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CEE0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CEE4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CEEC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CEF8(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF08(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF1C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF24(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF30(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF3C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF44(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF50(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF5C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF64(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF70(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF7C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF84(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF90(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CF9C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFA4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFB0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFBC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFC4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFD0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFDC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFE4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFF0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3CFFC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D004(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D010(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D01C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D024(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D030(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D03C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D044(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D050(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D05C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D064(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D070(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D07C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D084(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D090(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D09C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0A4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0B0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0BC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0C4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0D0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0DC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0E4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0F0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D0FC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D104(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D110(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D11C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D124(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D130(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D13C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D144(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D150(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D15C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D164(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D170(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D17C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D184(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D190(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D19C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1A4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1B0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1BC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1C4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1D0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1DC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1E4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1F0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D1FC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D204(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D210(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D21C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D224(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D230(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D23C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D244(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D250(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D25C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D264(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D270(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D27C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D284(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D290(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D29C(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2A4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2B0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2BC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2C4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2D0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2DC(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2E4(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2F0(CPUState* cpu); -extern void SCPH1001_func_1FC3CEC8_cont_BFC3D2FC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D314(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D31C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D320(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D328(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D334(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D344(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D358(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D360(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D36C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D378(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D380(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D38C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D398(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3A0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3AC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3B8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3C0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3CC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3D8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3E0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3EC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D3F8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D400(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D40C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D41C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D430(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D440(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D448(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D454(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D464(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D478(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D488(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D490(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D49C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4A8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4B0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4BC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4C8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4D0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4DC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D4EC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D500(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D510(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D518(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D524(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D534(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D548(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D558(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D560(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D56C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D598(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D5A0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D5AC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D5D8(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D5E0(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D5EC(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D618(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D620(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D62C(CPUState* cpu); -extern void SCPH1001_func_1FC3D304_cont_BFC3D654(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D6DC(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D6E8(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D6F0(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D704(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D70C(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D710(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D744(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D74C(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D750(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D764(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D76C(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D770(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D798(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D7A4(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D7A8(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D7D0(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D7DC(CPUState* cpu); -extern void SCPH1001_func_1FC3D65C_cont_BFC3D7E0(CPUState* cpu); -extern void SCPH1001_func_1FC3D810(CPUState* cpu); -extern void SCPH1001_func_1FC3D810_cont_BFC3D828(CPUState* cpu); -extern void SCPH1001_func_1FC3D810_cont_BFC3D83C(CPUState* cpu); -extern void SCPH1001_func_1FC3D810_cont_BFC3D844(CPUState* cpu); -extern void SCPH1001_func_1FC3D810_cont_BFC3D848(CPUState* cpu); -extern void SCPH1001_func_1FC3D810_cont_BFC3D850(CPUState* cpu); -extern void SCPH1001_func_1FC3D870(CPUState* cpu); -extern void SCPH1001_func_1FC3D870_cont_BFC3D8A4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D8DC(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D8E4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D8E8(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D938(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D950(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D974(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D984(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D98C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9A0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9A4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9BC(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9C4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9E0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3D9EC(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA0C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA1C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA58(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA88(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA94(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DA9C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DAB8(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DAD0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DAE4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DAEC(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DAF4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB14(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB20(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB34(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB3C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB4C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB7C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DB8C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC08(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC1C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC24(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC28(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC2C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC38(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC4C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC54(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC64(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DC74(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DCA4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DCB4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DCB8(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DCC4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DCFC(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD10(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD18(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD20(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD2C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD3C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD4C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD64(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD70(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD7C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DD8C(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DDA0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DDC4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DDD0(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DDE4(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DE08(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DE14(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DE28(CPUState* cpu); -extern void SCPH1001_func_1FC3D8C0_cont_BFC3DE2C(CPUState* cpu); -extern void SCPH1001_func_1FC3DED0(CPUState* cpu); -extern void SCPH1001_func_1FC3DED0_cont_BFC3DEE8(CPUState* cpu); -extern void SCPH1001_func_1FC3DED0_cont_BFC3DEF0(CPUState* cpu); -extern void SCPH1001_func_1FC3DED0_cont_BFC3DEF8(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF30(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF3C(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF44(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF4C(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF54(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF5C(CPUState* cpu); -extern void SCPH1001_func_1FC3DF20_cont_BFC3DF78(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFA8(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFB0(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFBC(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFC4(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFC8(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFD0(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFD8(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFE8(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3DFFC(CPUState* cpu); -extern void SCPH1001_func_1FC3DF90_cont_BFC3E008(CPUState* cpu); -extern void SCPH1001_func_1FC3E020(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E03C(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E044(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E054(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E064(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E06C(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E07C(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E084(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E088(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E098(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E0A0(CPUState* cpu); -extern void SCPH1001_func_1FC3E020_cont_BFC3E0B0(CPUState* cpu); -extern void SCPH1001_func_1FC3E0C0(CPUState* cpu); -extern void SCPH1001_func_1FC3E0C0_cont_BFC3E0CC(CPUState* cpu); -extern void SCPH1001_func_1FC3E0C0_cont_BFC3E0D4(CPUState* cpu); -extern void SCPH1001_func_1FC3E0E8(CPUState* cpu); -extern void SCPH1001_func_1FC3E0E8_cont_BFC3E0FC(CPUState* cpu); -extern void SCPH1001_func_1FC3E0E8_cont_BFC3E108(CPUState* cpu); -extern void SCPH1001_func_1FC3E110(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E128(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E144(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E164(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E178(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E184(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E194(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E19C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1A0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1A8(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1C0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1DC(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1E4(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1F0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1F4(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E1FC(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E204(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E208(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E20C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E220(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E228(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E22C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E23C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E244(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E258(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E270(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E28C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E29C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2A0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2AC(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2B0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2B8(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2BC(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2D0(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E2D8(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E30C(CPUState* cpu); -extern void SCPH1001_func_1FC3E110_cont_BFC3E318(CPUState* cpu); -extern void SCPH1001_func_1FC3E324(CPUState* cpu); -extern void SCPH1001_func_1FC3E324_cont_BFC3E32C(CPUState* cpu); -extern void SCPH1001_func_1FC3E324_cont_BFC3E384(CPUState* cpu); -extern void SCPH1001_func_1FC3E390(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E3C4(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E3CC(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E3F0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E404(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E40C(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E410(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E434(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E444(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E458(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E478(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E488(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E49C(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4B0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4BC(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4D0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4D8(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4E0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4F0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4F4(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E4FC(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E504(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E508(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E520(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E528(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E540(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E590(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E598(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E5A0(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E5B4(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E5CC(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E610(CPUState* cpu); -extern void SCPH1001_func_1FC3E390_cont_BFC3E624(CPUState* cpu); -extern void SCPH1001_func_1FC3E634(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E660(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E668(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E694(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E6A4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E6C4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E6E4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E6F0(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E6F8(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E700(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E708(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E728(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E730(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E734(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E77C(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E79C(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E7A4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E7A8(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E7C4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E7F8(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E800(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E808(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E828(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E830(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E850(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E858(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E85C(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E88C(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E898(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E8D8(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E8DC(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E8E4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E8F4(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E914(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E91C(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E920(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E938(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E974(CPUState* cpu); -extern void SCPH1001_func_1FC3E634_cont_BFC3E978(CPUState* cpu); -extern void SCPH1001_func_1FC3E980(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9B0(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9B8(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9DC(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9F0(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9F8(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3E9FC(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA14(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA1C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA20(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA38(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA40(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA44(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA5C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA64(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA84(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EA9C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EABC(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EAC4(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB00(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB20(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB28(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB2C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB4C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB54(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB64(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EB90(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBA4(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBB4(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBCC(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBE0(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBEC(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EBF0(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC00(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC0C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC10(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC18(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC20(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC34(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC40(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC44(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC50(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC58(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC5C(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC64(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC70(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC88(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC90(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3EC94(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3ECA0(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3ECA4(CPUState* cpu); -extern void SCPH1001_func_1FC3E980_cont_BFC3ECA8(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ECD4(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ECE8(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ECF4(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ED04(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ED0C(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ED24(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ED2C(CPUState* cpu); -extern void SCPH1001_func_1FC3ECB8_cont_BFC3ED34(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED5C(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED68(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED7C(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED84(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED90(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3ED9C(CPUState* cpu); -extern void SCPH1001_func_1FC3ED40_cont_BFC3EDA4(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EDC4(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EDD8(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EDF8(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EE0C(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EE30(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EE44(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EE5C(CPUState* cpu); -extern void SCPH1001_func_1FC3EDB4_cont_BFC3EE70(CPUState* cpu); -extern void SCPH1001_func_1FC3EE80(CPUState* cpu); -extern void SCPH1001_func_1FC3EE80_cont_BFC3EEA8(CPUState* cpu); -extern void SCPH1001_func_1FC3EE80_cont_BFC3EEB8(CPUState* cpu); -extern void SCPH1001_func_1FC3EEC0(CPUState* cpu); -extern void SCPH1001_func_1FC3EEE4(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF24(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF3C(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF44(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF60(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF68(CPUState* cpu); -extern void SCPH1001_func_1FC3EF08_cont_BFC3EF6C(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EF98(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EFB0(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EFB8(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EFD4(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EFDC(CPUState* cpu); -extern void SCPH1001_func_1FC3EF7C_cont_BFC3EFE0(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F000(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F020(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F028(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F030(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F038(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F040(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F048(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F050(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F058(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F05C(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F064(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F06C(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F074(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F07C(CPUState* cpu); -extern void SCPH1001_func_1FC3EFF0_cont_BFC3F080(CPUState* cpu); -extern void SCPH1001_func_1FC3F090(CPUState* cpu); -extern void SCPH1001_func_1FC3F090_cont_BFC3F140(CPUState* cpu); -extern void SCPH1001_func_1FC3F090_cont_BFC3F150(CPUState* cpu); -extern void SCPH1001_func_1FC3F090_cont_BFC3F184(CPUState* cpu); -extern void SCPH1001_func_1FC3F19C(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F1C8(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F1DC(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F1E4(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F1EC(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F200(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F208(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F210(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F230(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F238(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F240(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F244(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F248(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F24C(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F254(CPUState* cpu); -extern void SCPH1001_func_1FC3F1B8_cont_BFC3F2A4(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F2C4(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F2D8(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F2E0(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F2E8(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F2FC(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F304(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F30C(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F314(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F31C(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F324(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F344(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F34C(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F350(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F358(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F360(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F368(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F370(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F374(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F378(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F37C(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F384(CPUState* cpu); -extern void SCPH1001_func_1FC3F2B4_cont_BFC3F3D4(CPUState* cpu); -extern void SCPH1001_func_1FC3F484(CPUState* cpu); -extern void SCPH1001_func_1FC3F484_cont_BFC3F49C(CPUState* cpu); -extern void SCPH1001_func_1FC3F484_cont_BFC3F4A4(CPUState* cpu); -extern void SCPH1001_func_1FC3F484_cont_BFC3F4A8(CPUState* cpu); -extern void SCPH1001_func_1FC3F484_cont_BFC3F4AC(CPUState* cpu); -extern void SCPH1001_func_1FC3F484_cont_BFC3F4B8(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0_cont_BFC3F508(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0_cont_BFC3F514(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0_cont_BFC3F528(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0_cont_BFC3F534(CPUState* cpu); -extern void SCPH1001_func_1FC3F4F0_cont_BFC3F560(CPUState* cpu); -extern void SCPH1001_func_1FC3F570(CPUState* cpu); -extern void SCPH1001_func_1FC3F570_cont_BFC3F588(CPUState* cpu); -extern void SCPH1001_func_1FC3F570_cont_BFC3F590(CPUState* cpu); -extern void SCPH1001_func_1FC3F570_cont_BFC3F59C(CPUState* cpu); -extern void SCPH1001_func_1FC3F570_cont_BFC3F5C8(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F5F4(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F5FC(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F604(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F608(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F638(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F648(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F654(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F664(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F668(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F670(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F690(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F698(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F6A0(CPUState* cpu); -extern void SCPH1001_func_1FC3F5D8_cont_BFC3F6E0(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F708(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F710(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F730(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F740(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F74C(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F75C(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F760(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F768(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F788(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F790(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F798(CPUState* cpu); -extern void SCPH1001_func_1FC3F6F0_cont_BFC3F7D8(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F804(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F810(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F824(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F82C(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F834(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F848(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F850(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F854(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F86C(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F8D0(CPUState* cpu); -extern void SCPH1001_func_1FC3F7E8_cont_BFC3F8D4(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F8FC(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F908(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F910(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F934(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F93C(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F94C(CPUState* cpu); -extern void SCPH1001_func_1FC3F8E4_cont_BFC3F99C(CPUState* cpu); -extern void SCPH1001_func_1FC3F9AC(CPUState* cpu); -extern void SCPH1001_func_1FC3F9AC_cont_BFC3F9C4(CPUState* cpu); -extern void SCPH1001_func_1FC3F9AC_cont_BFC3F9CC(CPUState* cpu); -extern void SCPH1001_func_1FC3F9AC_cont_BFC3F9D4(CPUState* cpu); -extern void SCPH1001_func_1FC3F9AC_cont_BFC3FA00(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA1C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA30(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA38(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA40(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA54(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA5C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA64(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA6C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA74(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA7C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA84(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA8C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA94(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FA9C(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FAA0(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FAA4(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FAA8(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FAB0(CPUState* cpu); -extern void SCPH1001_func_1FC3FA10_cont_BFC3FADC(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB04(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB10(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB18(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB20(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB28(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB30(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB44(CPUState* cpu); -extern void SCPH1001_func_1FC3FAEC_cont_BFC3FB64(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FB80(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FB94(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FB9C(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBA4(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBB8(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBC0(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBC8(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBD0(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBD8(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBE0(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBE8(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBF0(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FBF8(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC00(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC04(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC08(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC0C(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC14(CPUState* cpu); -extern void SCPH1001_func_1FC3FB74_cont_BFC3FC40(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC5C(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC70(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC78(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC80(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC94(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FC9C(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCA4(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCAC(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCB4(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCBC(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCC0(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCC4(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCC8(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCD0(CPUState* cpu); -extern void SCPH1001_func_1FC3FC50_cont_BFC3FCFC(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD18(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD2C(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD34(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD3C(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD50(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD58(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD60(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD68(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD70(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD78(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD7C(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD80(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD84(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FD8C(CPUState* cpu); -extern void SCPH1001_func_1FC3FD0C_cont_BFC3FDB8(CPUState* cpu); -extern void SCPH1001_func_1FC3FDC8(CPUState* cpu); -extern void SCPH1001_func_1FC3FDC8_cont_BFC3FDE0(CPUState* cpu); -extern void SCPH1001_func_1FC3FDC8_cont_BFC3FDE8(CPUState* cpu); -extern void SCPH1001_func_1FC3FDC8_cont_BFC3FDF0(CPUState* cpu); -extern void SCPH1001_func_1FC3FDC8_cont_BFC3FE50(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FE7C(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FE84(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FEA4(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FEAC(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FEC0(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FEFC(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FF04(CPUState* cpu); -extern void SCPH1001_func_1FC3FE60_cont_BFC3FF30(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FF5C(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FF64(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FF84(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FF8C(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FFA0(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FFDC(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC3FFE4(CPUState* cpu); -extern void SCPH1001_func_1FC3FF40_cont_BFC40024(CPUState* cpu); -extern void SCPH1001_func_1FC40034(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40040(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40054(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC4005C(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40064(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40078(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40080(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40088(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40090(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC40098(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC400A0(CPUState* cpu); -extern void SCPH1001_func_1FC40034_cont_BFC400CC(CPUState* cpu); -extern void SCPH1001_func_1FC400DC(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC400E8(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC400FC(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40104(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC4010C(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40120(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40128(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40130(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40138(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40140(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40148(CPUState* cpu); -extern void SCPH1001_func_1FC400DC_cont_BFC40174(CPUState* cpu); -extern void SCPH1001_func_1FC40184(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC40194(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401A8(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401B0(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401B8(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401CC(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401D4(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401DC(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401E4(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401EC(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401F4(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC401FC(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC40210(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC40220(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC40230(CPUState* cpu); -extern void SCPH1001_func_1FC40184_cont_BFC40250(CPUState* cpu); -extern void SCPH1001_func_1FC40260(CPUState* cpu); -extern void SCPH1001_func_1FC40260_cont_BFC40278(CPUState* cpu); -extern void SCPH1001_func_1FC40260_cont_BFC40284(CPUState* cpu); -extern void SCPH1001_func_1FC40260_cont_BFC4028C(CPUState* cpu); -extern void SCPH1001_func_1FC40260_cont_BFC402A0(CPUState* cpu); -extern void SCPH1001_func_1FC40260_cont_BFC402CC(CPUState* cpu); -extern void SCPH1001_func_1FC402DC(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC402F8(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40300(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40320(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40328(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40348(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40370(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40378(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC40394(CPUState* cpu); -extern void SCPH1001_func_1FC402DC_cont_BFC403B4(CPUState* cpu); -extern void SCPH1001_func_1FC403C4(CPUState* cpu); -extern void SCPH1001_func_1FC403C4_cont_BFC403D8(CPUState* cpu); -extern void SCPH1001_func_1FC403C4_cont_BFC403E0(CPUState* cpu); -extern void SCPH1001_func_1FC40404(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40418(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40420(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40428(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40430(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40434(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40448(CPUState* cpu); -extern void SCPH1001_func_1FC40404_cont_BFC40478(CPUState* cpu); -extern void SCPH1001_func_1FC40484(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC404A8(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC404B0(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC404C4(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC404CC(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40518(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40534(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4053C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4054C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40554(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40564(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4056C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4057C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40584(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40594(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4059C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC405AC(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC405B0(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC405DC(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC405E0(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC4060C(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40610(CPUState* cpu); -extern void SCPH1001_func_1FC40484_cont_BFC40618(CPUState* cpu); -extern void SCPH1001_func_1FC40628(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC4064C(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC40654(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC40668(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC40670(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC406B4(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC406C4(CPUState* cpu); -extern void SCPH1001_func_1FC40628_cont_BFC406D0(CPUState* cpu); -extern void SCPH1001_func_1FC406E0(CPUState* cpu); -extern void SCPH1001_func_1FC406E0_cont_BFC406F0(CPUState* cpu); -extern void SCPH1001_func_1FC40700(CPUState* cpu); -extern void SCPH1001_func_1FC40700_cont_BFC40710(CPUState* cpu); -extern void SCPH1001_func_1FC40720(CPUState* cpu); -extern void SCPH1001_func_1FC40744(CPUState* cpu); -extern void SCPH1001_func_1FC40744_cont_BFC40780(CPUState* cpu); -extern void SCPH1001_func_1FC40744_cont_BFC40784(CPUState* cpu); -extern void SCPH1001_func_1FC40744_cont_BFC407B0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407D0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407D8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407E0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407EC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407F4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC407FC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40814(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4081C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40824(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4082C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40834(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40838(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40844(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40848(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40854(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4085C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40864(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4086C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40874(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4087C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40884(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4088C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40894(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4089C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408A4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408AC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408B4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408BC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408C4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408CC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408D4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408DC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408E4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408EC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408F4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC408F8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40904(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4090C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40918(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40920(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40928(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40930(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40938(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40940(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40948(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40950(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40958(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40960(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40968(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40970(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC4097C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40984(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40990(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40998(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409A4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409AC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409B4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409BC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409C8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409D0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409DC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409E4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409EC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409F4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC409FC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A04(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A10(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A18(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A24(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A2C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A34(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A3C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A48(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A50(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A5C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A64(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A6C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A74(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A7C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A84(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A8C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40A94(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AA0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AA8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AB4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40ABC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AC4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40ACC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AD8(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AE0(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AEC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AF4(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40AFC(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B04(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B0C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B14(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B20(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B28(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B34(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B3C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B44(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B4C(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B58(CPUState* cpu); -extern void SCPH1001_func_1FC407B8_cont_BFC40B5C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40B90(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40B98(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BA0(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BB4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BBC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BC4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BCC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BD4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BE4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40BFC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C04(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C20(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C28(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C4C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C54(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40C70(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40CA8(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40CD8(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40CF4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40CFC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D00(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D0C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D14(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D18(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D20(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D28(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D30(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D38(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D40(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D48(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D54(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D5C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D60(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D68(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D6C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D84(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D8C(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40D98(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DA0(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DAC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DB4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DBC(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DC4(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DD0(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DD8(CPUState* cpu); -extern void SCPH1001_func_1FC40B68_cont_BFC40DDC(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40E24(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40E60(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40E98(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40E9C(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40EC0(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40EC8(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40ECC(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40ED4(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40EF0(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40F24(CPUState* cpu); -extern void SCPH1001_func_1FC40DE8_cont_BFC40F28(CPUState* cpu); -extern void SCPH1001_func_1FC40F34(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F60(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F6C(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F80(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F88(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F90(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40F98(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FA4(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FB0(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FB8(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FC0(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FC8(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FD0(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FD4(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FDC(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FE4(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FEC(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FF4(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC40FFC(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC41004(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC4100C(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC41010(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC4101C(CPUState* cpu); -extern void SCPH1001_func_1FC40F34_cont_BFC41020(CPUState* cpu); -extern void SCPH1001_func_1FC4102C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41044(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41050(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41064(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4106C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41080(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41090(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4109C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410A4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410AC(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410B4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410B8(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410C0(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410CC(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410D4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410E0(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410E8(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC410FC(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41104(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41118(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4111C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4112C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41140(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41148(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41150(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41154(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4115C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41168(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41170(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC4117C(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41184(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41190(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC41194(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411A4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411B4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411C8(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411D8(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411E0(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411E4(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411F0(CPUState* cpu); -extern void SCPH1001_func_1FC4102C_cont_BFC411F4(CPUState* cpu); -extern void SCPH1001_func_1FC41200(CPUState* cpu); -extern void SCPH1001_func_1FC41200_cont_BFC4120C(CPUState* cpu); -extern void SCPH1001_func_1FC41200_cont_BFC41214(CPUState* cpu); -extern void SCPH1001_func_1FC41200_cont_BFC41218(CPUState* cpu); -extern void SCPH1001_func_1FC41200_cont_BFC41224(CPUState* cpu); -extern void SCPH1001_func_1FC41258(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC4129C(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC412B8(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC412CC(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC412E0(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC412EC(CPUState* cpu); -extern void SCPH1001_func_1FC41258_cont_BFC412FC(CPUState* cpu); -extern void SCPH1001_func_1FC4130C(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC4132C(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC4135C(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC41370(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC41384(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC41390(CPUState* cpu); -extern void SCPH1001_func_1FC4130C_cont_BFC413A0(CPUState* cpu); -extern void SCPH1001_func_1FC413B0(CPUState* cpu); -extern void SCPH1001_func_1FC413B0_cont_BFC413E4(CPUState* cpu); -extern void SCPH1001_func_1FC413F4(CPUState* cpu); -extern void SCPH1001_func_1FC413F4_cont_BFC4141C(CPUState* cpu); -extern void SCPH1001_func_1FC413F4_cont_BFC4142C(CPUState* cpu); -extern void SCPH1001_func_1FC413F4_cont_BFC41448(CPUState* cpu); -extern void SCPH1001_func_1FC41458(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC41468(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC4148C(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414A0(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414B0(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414B4(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414BC(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414D0(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414E4(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414F4(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC414F8(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC41500(CPUState* cpu); -extern void SCPH1001_func_1FC41458_cont_BFC41510(CPUState* cpu); -extern void SCPH1001_func_1FC41520(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC41534(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC41554(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC415C4(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC415F0(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC415F8(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC41624(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC4162C(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC41638(CPUState* cpu); -extern void SCPH1001_func_1FC41520_cont_BFC4163C(CPUState* cpu); -extern void SCPH1001_func_1FC41648(CPUState* cpu); -extern void SCPH1001_func_1FC41648_cont_BFC41660(CPUState* cpu); -extern void SCPH1001_func_1FC41670(CPUState* cpu); -extern void SCPH1001_func_1FC41670_cont_BFC416B8(CPUState* cpu); -extern void SCPH1001_func_1FC41670_cont_BFC416E8(CPUState* cpu); -extern void SCPH1001_func_1FC41670_cont_BFC416F8(CPUState* cpu); -extern void SCPH1001_func_1FC41708(CPUState* cpu); -extern void SCPH1001_func_1FC41708_cont_BFC41738(CPUState* cpu); -extern void SCPH1001_func_1FC41708_cont_BFC41740(CPUState* cpu); -extern void SCPH1001_func_1FC41708_cont_BFC4175C(CPUState* cpu); -extern void SCPH1001_func_1FC41708_cont_BFC41760(CPUState* cpu); -extern void SCPH1001_func_1FC41708_cont_BFC41778(CPUState* cpu); -extern void SCPH1001_func_1FC41788(CPUState* cpu); -extern void SCPH1001_func_1FC41788_cont_BFC417BC(CPUState* cpu); -extern void SCPH1001_func_1FC417CC(CPUState* cpu); -extern void SCPH1001_func_1FC417CC_cont_BFC417F4(CPUState* cpu); -extern void SCPH1001_func_1FC41804(CPUState* cpu); -extern void SCPH1001_func_1FC41804_cont_BFC41838(CPUState* cpu); -extern void SCPH1001_func_1FC41848(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC4186C(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC41874(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC4187C(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC41880(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC4188C(CPUState* cpu); -extern void SCPH1001_func_1FC41848_cont_BFC418B8(CPUState* cpu); -extern void SCPH1001_func_1FC418C4(CPUState* cpu); -extern void SCPH1001_func_1FC418C4_cont_BFC418F4(CPUState* cpu); -extern void SCPH1001_func_1FC4192C(CPUState* cpu); -extern void SCPH1001_func_1FC4192C_cont_BFC419B8(CPUState* cpu); -extern void SCPH1001_func_1FC4192C_cont_BFC419C0(CPUState* cpu); -extern void SCPH1001_func_1FC4192C_cont_BFC419C8(CPUState* cpu); -extern void SCPH1001_func_1FC4192C_cont_BFC419FC(CPUState* cpu); -extern void SCPH1001_func_1FC4192C_cont_BFC41A38(CPUState* cpu); -extern void SCPH1001_func_1FC41A44(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41A64(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41A8C(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41ABC(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41ACC(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41AE8(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41AF0(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B10(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B18(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B20(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B24(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B44(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B48(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B60(CPUState* cpu); -extern void SCPH1001_func_1FC41A44_cont_BFC41B9C(CPUState* cpu); -extern void SCPH1001_func_1FC41BA8(CPUState* cpu); -extern void SCPH1001_func_1FC41C04(CPUState* cpu); -extern void SCPH1001_func_1FC41C0C(CPUState* cpu); -extern void SCPH1001_func_1FC41C0C_cont_BFC41C48(CPUState* cpu); -extern void SCPH1001_func_1FC41C0C_cont_BFC41C4C(CPUState* cpu); -extern void SCPH1001_func_1FC41C0C_cont_BFC41C78(CPUState* cpu); -extern void SCPH1001_func_1FC41C80(CPUState* cpu); -extern void SCPH1001_func_1FC41C80_cont_BFC41CB8(CPUState* cpu); -extern void SCPH1001_func_1FC41C80_cont_BFC41CC8(CPUState* cpu); -extern void SCPH1001_func_1FC41C80_cont_BFC41CD4(CPUState* cpu); -extern void SCPH1001_func_1FC41C80_cont_BFC41CDC(CPUState* cpu); -extern void SCPH1001_func_1FC41C80_cont_BFC41CF4(CPUState* cpu); -extern void SCPH1001_func_1FC41D18(CPUState* cpu); -extern void SCPH1001_func_1FC41D18_cont_BFC41D30(CPUState* cpu); -extern void SCPH1001_func_1FC41D18_cont_BFC41D54(CPUState* cpu); -extern void SCPH1001_func_1FC41D18_cont_BFC41D6C(CPUState* cpu); -extern void SCPH1001_func_1FC41D18_cont_BFC41D94(CPUState* cpu); -extern void SCPH1001_func_1FC41D18_cont_BFC41D98(CPUState* cpu); -extern void SCPH1001_func_1FC41DA4(CPUState* cpu); -extern void SCPH1001_func_1FC41DC8(CPUState* cpu); -extern void SCPH1001_func_1FC41DC8_cont_BFC41DE0(CPUState* cpu); -extern void SCPH1001_func_1FC41DC8_cont_BFC41DF4(CPUState* cpu); -extern void SCPH1001_func_1FC41DFC(CPUState* cpu); -extern void SCPH1001_func_1FC41E14(CPUState* cpu); -extern void SCPH1001_func_1FC41E14_cont_BFC41E18(CPUState* cpu); -extern void SCPH1001_func_1FC41E30(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E44(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E4C(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E6C(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E78(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E84(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E8C(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E94(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41E9C(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EA0(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EA8(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EB4(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EB8(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EBC(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EC4(CPUState* cpu); -extern void SCPH1001_func_1FC41E30_cont_BFC41EC8(CPUState* cpu); -extern void SCPH1001_func_1FC41ED8(CPUState* cpu); -extern void SCPH1001_func_1FC41ED8_cont_BFC41EE8(CPUState* cpu); -extern void SCPH1001_func_1FC41ED8_cont_BFC41EF0(CPUState* cpu); -extern void SCPH1001_func_1FC41F10(CPUState* cpu); -extern void SCPH1001_func_1FC41F10_cont_BFC41F40(CPUState* cpu); -extern void SCPH1001_func_1FC41F10_cont_BFC41F48(CPUState* cpu); -extern void SCPH1001_func_1FC41F54(CPUState* cpu); -extern void SCPH1001_func_1FC41F88(CPUState* cpu); -extern void SCPH1001_func_1FC41F88_cont_BFC41F98(CPUState* cpu); -extern void SCPH1001_func_1FC41F88_cont_BFC41FA0(CPUState* cpu); -extern void SCPH1001_func_1FC41FC0(CPUState* cpu); -extern void SCPH1001_func_1FC41FC0_cont_BFC41FE8(CPUState* cpu); -extern void SCPH1001_func_1FC41FC0_cont_BFC41FFC(CPUState* cpu); -extern void SCPH1001_func_1FC41FC0_cont_BFC42004(CPUState* cpu); -extern void SCPH1001_func_1FC42014(CPUState* cpu); -extern void SCPH1001_func_1FC42014_cont_BFC42024(CPUState* cpu); -extern void SCPH1001_func_1FC4203C(CPUState* cpu); -extern void SCPH1001_func_1FC4203C_cont_BFC4204C(CPUState* cpu); -extern void SCPH1001_func_1FC42060(CPUState* cpu); -extern void SCPH1001_func_1FC42060_cont_BFC42080(CPUState* cpu); -extern void SCPH1001_func_1FC42090(CPUState* cpu); -extern void SCPH1001_func_1FC42090_cont_BFC420B0(CPUState* cpu); -extern void SCPH1001_func_1FC420C0(CPUState* cpu); -extern void SCPH1001_func_1FC420C0_cont_BFC420E0(CPUState* cpu); -extern void SCPH1001_func_1FC420F0(CPUState* cpu); -extern void SCPH1001_func_1FC420F0_cont_BFC42110(CPUState* cpu); -extern void SCPH1001_func_1FC42120(CPUState* cpu); -extern void SCPH1001_func_1FC42120_cont_BFC42140(CPUState* cpu); -extern void SCPH1001_func_1FC42160(CPUState* cpu); -extern void SCPH1001_func_1FC42160_cont_BFC42174(CPUState* cpu); -extern void SCPH1001_func_1FC42160_cont_BFC4217C(CPUState* cpu); -extern void SCPH1001_func_1FC42160_cont_BFC42184(CPUState* cpu); -extern void SCPH1001_func_1FC42160_cont_BFC421B4(CPUState* cpu); -extern void SCPH1001_func_1FC42160_cont_BFC421CC(CPUState* cpu); -extern void SCPH1001_func_1FC421D8(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC421E0(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC42220(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC4223C(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC42244(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC42250(CPUState* cpu); -extern void SCPH1001_func_1FC421D8_cont_BFC42264(CPUState* cpu); -extern void SCPH1001_func_1FC4226C(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC42290(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC422B0(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC422B8(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC422CC(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC422D8(CPUState* cpu); -extern void SCPH1001_func_1FC4226C_cont_BFC422F8(CPUState* cpu); -extern void SCPH1001_func_1FC42308(CPUState* cpu); -extern void SCPH1001_func_1FC42308_cont_BFC42314(CPUState* cpu); -extern void SCPH1001_func_1FC4231C(CPUState* cpu); -extern void SCPH1001_func_1FC4231C_cont_BFC42338(CPUState* cpu); -extern void SCPH1001_func_1FC4231C_cont_BFC42348(CPUState* cpu); -extern void SCPH1001_func_1FC4231C_cont_BFC42358(CPUState* cpu); -extern void SCPH1001_func_1FC4231C_cont_BFC42368(CPUState* cpu); -extern void SCPH1001_func_1FC42370(CPUState* cpu); -extern void SCPH1001_func_1FC42380(CPUState* cpu); -extern void SCPH1001_func_1FC42380_cont_BFC423A0(CPUState* cpu); -extern void SCPH1001_func_1FC42380_cont_BFC423A8(CPUState* cpu); -extern void SCPH1001_func_1FC42380_cont_BFC423E4(CPUState* cpu); -extern void SCPH1001_func_1FC42380_cont_BFC4241C(CPUState* cpu); -extern void SCPH1001_func_1FC42424(CPUState* cpu); -extern void SCPH1001_func_1FC42424_cont_BFC42434(CPUState* cpu); -extern void SCPH1001_func_1FC42424_cont_BFC42474(CPUState* cpu); -extern void SCPH1001_func_1FC42424_cont_BFC4248C(CPUState* cpu); -extern void SCPH1001_func_1FC42424_cont_BFC42498(CPUState* cpu); -extern void SCPH1001_func_1FC424A8(CPUState* cpu); -extern void SCPH1001_func_1FC424A8_cont_BFC42514(CPUState* cpu); -extern void SCPH1001_func_1FC424A8_cont_BFC42520(CPUState* cpu); -extern void SCPH1001_func_1FC424A8_cont_BFC42530(CPUState* cpu); -extern void SCPH1001_func_1FC424A8_cont_BFC42534(CPUState* cpu); -extern void SCPH1001_func_1FC42540(CPUState* cpu); -extern void SCPH1001_func_1FC42540_cont_BFC4255C(CPUState* cpu); -extern void SCPH1001_func_1FC42540_cont_BFC4256C(CPUState* cpu); -extern void SCPH1001_func_1FC42540_cont_BFC42594(CPUState* cpu); -extern void SCPH1001_func_1FC42540_cont_BFC425A0(CPUState* cpu); -extern void SCPH1001_func_1FC42540_cont_BFC425AC(CPUState* cpu); -extern void SCPH1001_func_1FC425BC(CPUState* cpu); -extern void SCPH1001_func_1FC425BC_cont_BFC425E4(CPUState* cpu); -extern void SCPH1001_func_1FC425BC_cont_BFC425EC(CPUState* cpu); -extern void SCPH1001_func_1FC425FC(CPUState* cpu); -extern void SCPH1001_func_1FC425FC_cont_BFC4260C(CPUState* cpu); -extern void SCPH1001_func_1FC425FC_cont_BFC42624(CPUState* cpu); -extern void SCPH1001_func_1FC425FC_cont_BFC42634(CPUState* cpu); -extern void SCPH1001_func_1FC42640(CPUState* cpu); -extern void SCPH1001_func_1FC42640_cont_BFC4265C(CPUState* cpu); -extern void SCPH1001_func_1FC42640_cont_BFC4266C(CPUState* cpu); -extern void SCPH1001_func_1FC42640_cont_BFC426A0(CPUState* cpu); -extern void SCPH1001_func_1FC42640_cont_BFC426B8(CPUState* cpu); -extern void SCPH1001_func_1FC42640_cont_BFC426CC(CPUState* cpu); -extern void SCPH1001_func_1FC426DC(CPUState* cpu); -extern void SCPH1001_func_1FC426DC_cont_BFC426FC(CPUState* cpu); -extern void SCPH1001_func_1FC4270C(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42734(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42768(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC4276C(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42780(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427A8(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427B0(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427BC(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427C8(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427DC(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC427F8(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42810(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42824(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42834(CPUState* cpu); -extern void SCPH1001_func_1FC4270C_cont_BFC42838(CPUState* cpu); -extern void SCPH1001_func_1FC42844(CPUState* cpu); -extern void SCPH1001_func_1FC42844_cont_BFC42864(CPUState* cpu); -extern void SCPH1001_func_1FC42844_cont_BFC4286C(CPUState* cpu); -extern void SCPH1001_func_1FC42844_cont_BFC42898(CPUState* cpu); -extern void SCPH1001_func_1FC42844_cont_BFC428BC(CPUState* cpu); -extern void SCPH1001_func_1FC428D0(CPUState* cpu); -extern void SCPH1001_func_1FC428E0(CPUState* cpu); -extern void SCPH1001_func_1FC428F0(CPUState* cpu); -extern void SCPH1001_func_1FC42900(CPUState* cpu); -extern void SCPH1001_func_1FC42910(CPUState* cpu); -extern void SCPH1001_func_1FC42920(CPUState* cpu); -extern void SCPH1001_func_1FC42930(CPUState* cpu); -extern void SCPH1001_func_1FC42940(CPUState* cpu); -extern void SCPH1001_func_1FC42950(CPUState* cpu); -extern void SCPH1001_func_1FC42960(CPUState* cpu); -extern void SCPH1001_func_1FC42970(CPUState* cpu); -extern void SCPH1001_func_1FC42980(CPUState* cpu); -extern void SCPH1001_func_1FC42990(CPUState* cpu); -extern void SCPH1001_func_1FC429A0(CPUState* cpu); -extern void SCPH1001_func_1FC429B0(CPUState* cpu); -extern void SCPH1001_func_1FC429C0(CPUState* cpu); -extern void SCPH1001_func_1FC429D0(CPUState* cpu); -extern void SCPH1001_func_1FC429E0(CPUState* cpu); -extern void SCPH1001_func_1FC429F0(CPUState* cpu); -extern void SCPH1001_func_1FC42A00(CPUState* cpu); -extern void SCPH1001_func_1FC42A10(CPUState* cpu); -extern void SCPH1001_func_1FC42A20(CPUState* cpu); -extern void SCPH1001_func_1FC42A30(CPUState* cpu); -extern void SCPH1001_func_1FC42A40(CPUState* cpu); -extern void SCPH1001_func_1FC42A50(CPUState* cpu); -extern void SCPH1001_func_1FC42A60(CPUState* cpu); -extern void SCPH1001_func_1FC42A70(CPUState* cpu); -extern void SCPH1001_func_1FC42A80(CPUState* cpu); -extern void SCPH1001_func_1FC42A90(CPUState* cpu); -extern void SCPH1001_func_1FC42AA0(CPUState* cpu); -extern void SCPH1001_func_1FC42AB0(CPUState* cpu); -extern void SCPH1001_func_1FC42AC0(CPUState* cpu); -extern void SCPH1001_func_1FC42AD0(CPUState* cpu); -extern void SCPH1001_func_1FC42AE0(CPUState* cpu); -extern void SCPH1001_func_1FC42AF0(CPUState* cpu); -extern void SCPH1001_func_1FC42B00(CPUState* cpu); -extern void SCPH1001_func_1FC42B10(CPUState* cpu); -extern void SCPH1001_func_1FC42B20(CPUState* cpu); -extern void SCPH1001_func_1FC42B30(CPUState* cpu); -extern void SCPH1001_func_1FC42B40(CPUState* cpu); -extern void SCPH1001_func_1FC42B50(CPUState* cpu); -extern void SCPH1001_func_1FC42B60(CPUState* cpu); -extern void SCPH1001_func_1FC42B70(CPUState* cpu); -extern void SCPH1001_func_1FC42B80(CPUState* cpu); -extern void SCPH1001_func_1FC42B90(CPUState* cpu); -extern void SCPH1001_func_1FC42BA0(CPUState* cpu); -extern void SCPH1001_func_1FC42BB0(CPUState* cpu); -extern void SCPH1001_func_1FC42BC0(CPUState* cpu); -extern void SCPH1001_func_1FC42BD0(CPUState* cpu); -extern void SCPH1001_func_1FC42BE0(CPUState* cpu); -extern void SCPH1001_func_1FC42BF0(CPUState* cpu); -extern void SCPH1001_func_1FC42C00(CPUState* cpu); -extern void SCPH1001_func_A0000500(CPUState* cpu); - -typedef void (*PsxRecompFunc)(CPUState*); - -typedef struct { - uint32_t addr; - PsxRecompFunc func; -} DispatchEntry; - -static const DispatchEntry dispatch_table[13012] = { - { 0x00000500u, SCPH1001_func_00000500 }, - { 0x00000510u, SCPH1001_func_00000510 }, - { 0x00000520u, SCPH1001_func_00000520 }, - { 0x00000530u, SCPH1001_func_00000530 }, - { 0x00000540u, SCPH1001_func_00000540 }, - { 0x00000554u, SCPH1001_func_00000540_cont_BFC10054 }, - { 0x00000568u, SCPH1001_func_00000540_cont_BFC10068 }, - { 0x0000057Cu, SCPH1001_func_00000540_cont_BFC1007C }, - { 0x00000590u, SCPH1001_func_00000540_cont_BFC10090 }, - { 0x00000598u, SCPH1001_func_00000598 }, - { 0x000005A8u, SCPH1001_func_00000598_cont_BFC100A8 }, - { 0x000005BCu, SCPH1001_func_00000598_cont_BFC100BC }, - { 0x000005C4u, SCPH1001_func_000005C4 }, - { 0x000005E0u, SCPH1001_func_000005E0 }, - { 0x00000600u, SCPH1001_func_00000600 }, - { 0x00000620u, SCPH1001_func_00000620 }, - { 0x00000630u, SCPH1001_func_00000630 }, - { 0x00000640u, SCPH1001_func_00000640 }, - { 0x00000650u, SCPH1001_func_00000650 }, - { 0x0000065Cu, SCPH1001_func_0000065C }, - { 0x00000668u, SCPH1001_func_00000668 }, - { 0x00000674u, SCPH1001_func_00000674 }, - { 0x00000C80u, SCPH1001_func_00000C80 }, - { 0x00000CB8u, SCPH1001_func_00000C80_cont_BFC107B8 }, - { 0x00000CC0u, SCPH1001_func_00000C80_cont_BFC107C0 }, - { 0x00000CCCu, SCPH1001_func_00000C80_cont_BFC107CC }, - { 0x00000CE8u, SCPH1001_func_00000C80_cont_BFC107E8 }, - { 0x00000CECu, SCPH1001_func_00000C80_cont_BFC107EC }, - { 0x00000D00u, SCPH1001_func_00000C80_cont_BFC10800 }, - { 0x00000DE8u, SCPH1001_func_00000C80_cont_BFC108E8 }, - { 0x00000DF8u, SCPH1001_func_00000C80_cont_BFC108F8 }, - { 0x00000E08u, SCPH1001_func_00000C80_cont_BFC10908 }, - { 0x00000E10u, SCPH1001_func_00000C80_cont_BFC10910 }, - { 0x00000E18u, SCPH1001_func_00000C80_cont_BFC10918 }, - { 0x00000E20u, SCPH1001_func_00000C80_cont_BFC10920 }, - { 0x00000E28u, SCPH1001_func_00000C80_cont_BFC10928 }, - { 0x00000E38u, SCPH1001_func_00000C80_cont_BFC10938 }, - { 0x00000E44u, SCPH1001_func_00000C80_cont_BFC10944 }, - { 0x00000EA0u, SCPH1001_func_00000EA0 }, - { 0x00000EB0u, SCPH1001_func_00000EB0 }, - { 0x00000EC8u, SCPH1001_func_00000EB0_cont_BFC109C8 }, - { 0x00000EDCu, SCPH1001_func_00000EB0_cont_BFC109DC }, - { 0x00000EF0u, SCPH1001_func_00000EB0_cont_BFC109F0 }, - { 0x00000F04u, SCPH1001_func_00000EB0_cont_BFC10A04 }, - { 0x00000F20u, SCPH1001_func_00000F20 }, - { 0x00000F2Cu, SCPH1001_func_00000F2C }, - { 0x00000F40u, SCPH1001_func_00000F40 }, - { 0x00001030u, SCPH1001_func_00001030 }, - { 0x00001038u, SCPH1001_func_00001030_cont_BFC10B38 }, - { 0x00001050u, SCPH1001_func_00001030_cont_BFC10B50 }, - { 0x0000105Cu, SCPH1001_func_00001030_cont_BFC10B5C }, - { 0x00001060u, SCPH1001_func_00001030_cont_BFC10B60 }, - { 0x00001064u, SCPH1001_func_00001030_cont_BFC10B64 }, - { 0x00001094u, SCPH1001_func_00001030_cont_BFC10B94 }, - { 0x0000109Cu, SCPH1001_func_00001030_cont_BFC10B9C }, - { 0x000010A0u, SCPH1001_func_00001030_cont_BFC10BA0 }, - { 0x000010A8u, SCPH1001_func_00001030_cont_BFC10BA8 }, - { 0x000010B0u, SCPH1001_func_00001030_cont_BFC10BB0 }, - { 0x000010B8u, SCPH1001_func_000010B8 }, - { 0x000010D8u, SCPH1001_func_000010B8_cont_BFC10BD8 }, - { 0x000010E0u, SCPH1001_func_000010E0 }, - { 0x000010E4u, SCPH1001_func_000010E4 }, - { 0x000010FCu, SCPH1001_func_000010E4_cont_BFC10BFC }, - { 0x00001100u, SCPH1001_func_000010E4_cont_BFC10C00 }, - { 0x0000111Cu, SCPH1001_func_000010E4_cont_BFC10C1C }, - { 0x00001120u, SCPH1001_func_000010E4_cont_BFC10C20 }, - { 0x0000113Cu, SCPH1001_func_0000113C }, - { 0x00001174u, SCPH1001_func_00001174 }, - { 0x000011B0u, SCPH1001_func_00001174_cont_BFC10CB0 }, - { 0x000011B8u, SCPH1001_func_00001174_cont_BFC10CB8 }, - { 0x000011D8u, SCPH1001_func_00001174_cont_BFC10CD8 }, - { 0x000011E0u, SCPH1001_func_00001174_cont_BFC10CE0 }, - { 0x000011E4u, SCPH1001_func_00001174_cont_BFC10CE4 }, - { 0x00001204u, SCPH1001_func_00001174_cont_BFC10D04 }, - { 0x0000120Cu, SCPH1001_func_00001174_cont_BFC10D0C }, - { 0x00001214u, SCPH1001_func_00001174_cont_BFC10D14 }, - { 0x00001230u, SCPH1001_func_00001174_cont_BFC10D30 }, - { 0x00001248u, SCPH1001_func_00001174_cont_BFC10D48 }, - { 0x00001250u, SCPH1001_func_00001174_cont_BFC10D50 }, - { 0x0000125Cu, SCPH1001_func_00001174_cont_BFC10D5C }, - { 0x00001270u, SCPH1001_func_00001174_cont_BFC10D70 }, - { 0x00001274u, SCPH1001_func_00001174_cont_BFC10D74 }, - { 0x0000127Cu, SCPH1001_func_00001174_cont_BFC10D7C }, - { 0x00001298u, SCPH1001_func_00001174_cont_BFC10D98 }, - { 0x0000129Cu, SCPH1001_func_00001174_cont_BFC10D9C }, - { 0x000012B8u, SCPH1001_func_00001174_cont_BFC10DB8 }, - { 0x000012BCu, SCPH1001_func_00001174_cont_BFC10DBC }, - { 0x000012C4u, SCPH1001_func_00001174_cont_BFC10DC4 }, - { 0x000012E8u, SCPH1001_func_00001174_cont_BFC10DE8 }, - { 0x000012F4u, SCPH1001_func_00001174_cont_BFC10DF4 }, - { 0x000012FCu, SCPH1001_func_00001174_cont_BFC10DFC }, - { 0x00001304u, SCPH1001_func_00001174_cont_BFC10E04 }, - { 0x0000130Cu, SCPH1001_func_00001174_cont_BFC10E0C }, - { 0x00001320u, SCPH1001_func_00001174_cont_BFC10E20 }, - { 0x00001324u, SCPH1001_func_00001174_cont_BFC10E24 }, - { 0x0000132Cu, SCPH1001_func_00001174_cont_BFC10E2C }, - { 0x00001348u, SCPH1001_func_00001174_cont_BFC10E48 }, - { 0x00001350u, SCPH1001_func_00001174_cont_BFC10E50 }, - { 0x00001368u, SCPH1001_func_00001174_cont_BFC10E68 }, - { 0x00001370u, SCPH1001_func_00001174_cont_BFC10E70 }, - { 0x00001394u, SCPH1001_func_00001174_cont_BFC10E94 }, - { 0x000013A0u, SCPH1001_func_00001174_cont_BFC10EA0 }, - { 0x000013A8u, SCPH1001_func_00001174_cont_BFC10EA8 }, - { 0x000013B0u, SCPH1001_func_00001174_cont_BFC10EB0 }, - { 0x000013B8u, SCPH1001_func_00001174_cont_BFC10EB8 }, - { 0x000013C8u, SCPH1001_func_00001174_cont_BFC10EC8 }, - { 0x000013E0u, SCPH1001_func_00001174_cont_BFC10EE0 }, - { 0x000013F0u, SCPH1001_func_00001174_cont_BFC10EF0 }, - { 0x00001408u, SCPH1001_func_00001408 }, - { 0x00001420u, SCPH1001_func_00001420 }, - { 0x00001444u, SCPH1001_func_00001444 }, - { 0x00001464u, SCPH1001_func_00001444_cont_BFC10F64 }, - { 0x0000146Cu, SCPH1001_func_00001444_cont_BFC10F6C }, - { 0x00001474u, SCPH1001_func_00001444_cont_BFC10F74 }, - { 0x00001484u, SCPH1001_func_00001444_cont_BFC10F84 }, - { 0x00001494u, SCPH1001_func_00001444_cont_BFC10F94 }, - { 0x0000149Cu, SCPH1001_func_00001444_cont_BFC10F9C }, - { 0x000014A4u, SCPH1001_func_00001444_cont_BFC10FA4 }, - { 0x000014B0u, SCPH1001_func_00001444_cont_BFC10FB0 }, - { 0x000014B8u, SCPH1001_func_00001444_cont_BFC10FB8 }, - { 0x000014C4u, SCPH1001_func_00001444_cont_BFC10FC4 }, - { 0x000014C8u, SCPH1001_func_00001444_cont_BFC10FC8 }, - { 0x000014D4u, SCPH1001_func_00001444_cont_BFC10FD4 }, - { 0x000014E4u, SCPH1001_func_00001444_cont_BFC10FE4 }, - { 0x000014ECu, SCPH1001_func_00001444_cont_BFC10FEC }, - { 0x000014FCu, SCPH1001_func_00001444_cont_BFC10FFC }, - { 0x00001500u, SCPH1001_func_00001444_cont_BFC11000 }, - { 0x00001508u, SCPH1001_func_00001508 }, - { 0x00001550u, SCPH1001_func_00001508_cont_BFC11050 }, - { 0x00001570u, SCPH1001_func_00001508_cont_BFC11070 }, - { 0x00001580u, SCPH1001_func_00001508_cont_BFC11080 }, - { 0x0000158Cu, SCPH1001_func_00001508_cont_BFC1108C }, - { 0x00001594u, SCPH1001_func_00001508_cont_BFC11094 }, - { 0x0000159Cu, SCPH1001_func_00001508_cont_BFC1109C }, - { 0x000015A8u, SCPH1001_func_00001508_cont_BFC110A8 }, - { 0x000015B4u, SCPH1001_func_00001508_cont_BFC110B4 }, - { 0x000015D8u, SCPH1001_func_000015D8 }, - { 0x000015F8u, SCPH1001_func_000015F8 }, - { 0x0000160Cu, SCPH1001_func_000015F8_cont_BFC1110C }, - { 0x00001614u, SCPH1001_func_00001614 }, - { 0x00001640u, SCPH1001_func_00001614_cont_BFC11140 }, - { 0x0000164Cu, SCPH1001_func_00001614_cont_BFC1114C }, - { 0x00001658u, SCPH1001_func_00001614_cont_BFC11158 }, - { 0x00001660u, SCPH1001_func_00001614_cont_BFC11160 }, - { 0x00001668u, SCPH1001_func_00001614_cont_BFC11168 }, - { 0x00001670u, SCPH1001_func_00001614_cont_BFC11170 }, - { 0x00001674u, SCPH1001_func_00001614_cont_BFC11174 }, - { 0x0000167Cu, SCPH1001_func_00001614_cont_BFC1117C }, - { 0x00001688u, SCPH1001_func_00001614_cont_BFC11188 }, - { 0x0000168Cu, SCPH1001_func_00001614_cont_BFC1118C }, - { 0x00001690u, SCPH1001_func_00001614_cont_BFC11190 }, - { 0x00001698u, SCPH1001_func_00001614_cont_BFC11198 }, - { 0x0000169Cu, SCPH1001_func_00001614_cont_BFC1119C }, - { 0x000016ACu, SCPH1001_func_000016AC }, - { 0x000016BCu, SCPH1001_func_000016AC_cont_BFC111BC }, - { 0x000016C4u, SCPH1001_func_000016C4 }, - { 0x000016E4u, SCPH1001_func_000016E4 }, - { 0x00001714u, SCPH1001_func_000016E4_cont_BFC11214 }, - { 0x0000171Cu, SCPH1001_func_0000171C }, - { 0x00001728u, SCPH1001_func_00001728 }, - { 0x0000175Cu, SCPH1001_func_0000175C }, - { 0x0000176Cu, SCPH1001_func_0000175C_cont_BFC1126C }, - { 0x00001774u, SCPH1001_func_00001774 }, - { 0x00001794u, SCPH1001_func_00001794 }, - { 0x000017B8u, SCPH1001_func_00001794_cont_BFC112B8 }, - { 0x000017CCu, SCPH1001_func_00001794_cont_BFC112CC }, - { 0x000017D4u, SCPH1001_func_00001794_cont_BFC112D4 }, - { 0x000017D8u, SCPH1001_func_00001794_cont_BFC112D8 }, - { 0x000017E0u, SCPH1001_func_00001794_cont_BFC112E0 }, - { 0x000017E4u, SCPH1001_func_00001794_cont_BFC112E4 }, - { 0x000017F4u, SCPH1001_func_000017F4 }, - { 0x00001818u, SCPH1001_func_000017F4_cont_BFC11318 }, - { 0x0000182Cu, SCPH1001_func_000017F4_cont_BFC1132C }, - { 0x00001834u, SCPH1001_func_000017F4_cont_BFC11334 }, - { 0x00001838u, SCPH1001_func_000017F4_cont_BFC11338 }, - { 0x00001844u, SCPH1001_func_000017F4_cont_BFC11344 }, - { 0x00001848u, SCPH1001_func_000017F4_cont_BFC11348 }, - { 0x00001858u, SCPH1001_func_00001858 }, - { 0x0000187Cu, SCPH1001_func_00001858_cont_BFC1137C }, - { 0x00001890u, SCPH1001_func_00001858_cont_BFC11390 }, - { 0x00001898u, SCPH1001_func_00001858_cont_BFC11398 }, - { 0x0000189Cu, SCPH1001_func_00001858_cont_BFC1139C }, - { 0x000018A8u, SCPH1001_func_00001858_cont_BFC113A8 }, - { 0x000018ACu, SCPH1001_func_00001858_cont_BFC113AC }, - { 0x000018BCu, SCPH1001_func_000018BC }, - { 0x000018E0u, SCPH1001_func_000018BC_cont_BFC113E0 }, - { 0x000018F4u, SCPH1001_func_000018BC_cont_BFC113F4 }, - { 0x000018FCu, SCPH1001_func_000018BC_cont_BFC113FC }, - { 0x00001900u, SCPH1001_func_000018BC_cont_BFC11400 }, - { 0x0000190Cu, SCPH1001_func_000018BC_cont_BFC1140C }, - { 0x00001910u, SCPH1001_func_000018BC_cont_BFC11410 }, - { 0x00001920u, SCPH1001_func_00001920 }, - { 0x00001934u, SCPH1001_func_00001920_cont_BFC11434 }, - { 0x00001948u, SCPH1001_func_00001920_cont_BFC11448 }, - { 0x00001958u, SCPH1001_func_00001958 }, - { 0x0000196Cu, SCPH1001_func_00001958_cont_BFC1146C }, - { 0x00001980u, SCPH1001_func_00001958_cont_BFC11480 }, - { 0x00001990u, SCPH1001_func_00001990 }, - { 0x000019A4u, SCPH1001_func_00001990_cont_BFC114A4 }, - { 0x000019B8u, SCPH1001_func_00001990_cont_BFC114B8 }, - { 0x000019C8u, SCPH1001_func_000019C8 }, - { 0x000019DCu, SCPH1001_func_000019C8_cont_BFC114DC }, - { 0x000019F0u, SCPH1001_func_000019C8_cont_BFC114F0 }, - { 0x00001A00u, SCPH1001_func_00001A00 }, - { 0x00001A24u, SCPH1001_func_00001A24 }, - { 0x00001A2Cu, SCPH1001_func_00001A2C }, - { 0x00001A44u, SCPH1001_func_00001A2C_cont_BFC11544 }, - { 0x00001A60u, SCPH1001_func_00001A60 }, - { 0x00001A74u, SCPH1001_func_00001A60_cont_BFC11574 }, - { 0x00001A80u, SCPH1001_func_00001A60_cont_BFC11580 }, - { 0x00001A84u, SCPH1001_func_00001A60_cont_BFC11584 }, - { 0x00001A98u, SCPH1001_func_00001A60_cont_BFC11598 }, - { 0x00001AACu, SCPH1001_func_00001A60_cont_BFC115AC }, - { 0x00001AC0u, SCPH1001_func_00001A60_cont_BFC115C0 }, - { 0x00001AD0u, SCPH1001_func_00001A60_cont_BFC115D0 }, - { 0x00001AD8u, SCPH1001_func_00001A60_cont_BFC115D8 }, - { 0x00001AE0u, SCPH1001_func_00001A60_cont_BFC115E0 }, - { 0x00001AE8u, SCPH1001_func_00001AE8 }, - { 0x00001AF0u, SCPH1001_func_00001AE8_cont_BFC115F0 }, - { 0x00001AF8u, SCPH1001_func_00001AE8_cont_BFC115F8 }, - { 0x00001AFCu, SCPH1001_func_00001AFC }, - { 0x00001B08u, SCPH1001_func_00001AFC_cont_BFC11608 }, - { 0x00001B10u, SCPH1001_func_00001B10 }, - { 0x00001B20u, SCPH1001_func_00001B20 }, - { 0x00001B34u, SCPH1001_func_00001B20_cont_BFC11634 }, - { 0x00001B44u, SCPH1001_func_00001B44 }, - { 0x00001BA0u, SCPH1001_func_00001B44_cont_BFC116A0 }, - { 0x00001BB8u, SCPH1001_func_00001B44_cont_BFC116B8 }, - { 0x00001BC8u, SCPH1001_func_00001B44_cont_BFC116C8 }, - { 0x00001BD8u, SCPH1001_func_00001B44_cont_BFC116D8 }, - { 0x00001BE8u, SCPH1001_func_00001B44_cont_BFC116E8 }, - { 0x00001BF8u, SCPH1001_func_00001B44_cont_BFC116F8 }, - { 0x00001C00u, SCPH1001_func_00001B44_cont_BFC11700 }, - { 0x00001C08u, SCPH1001_func_00001B44_cont_BFC11708 }, - { 0x00001C18u, SCPH1001_func_00001B44_cont_BFC11718 }, - { 0x00001C20u, SCPH1001_func_00001B44_cont_BFC11720 }, - { 0x00001C30u, SCPH1001_func_00001B44_cont_BFC11730 }, - { 0x00001C40u, SCPH1001_func_00001B44_cont_BFC11740 }, - { 0x00001C5Cu, SCPH1001_func_00001C5C }, - { 0x00001C9Cu, SCPH1001_func_00001C5C_cont_BFC1179C }, - { 0x00001CA4u, SCPH1001_func_00001C5C_cont_BFC117A4 }, - { 0x00001CB4u, SCPH1001_func_00001C5C_cont_BFC117B4 }, - { 0x00001CC4u, SCPH1001_func_00001C5C_cont_BFC117C4 }, - { 0x00001CD4u, SCPH1001_func_00001C5C_cont_BFC117D4 }, - { 0x00001CE4u, SCPH1001_func_00001C5C_cont_BFC117E4 }, - { 0x00001CE8u, SCPH1001_func_00001C5C_cont_BFC117E8 }, - { 0x00001CF8u, SCPH1001_func_00001C5C_cont_BFC117F8 }, - { 0x00001D00u, SCPH1001_func_00001D00 }, - { 0x00001D40u, SCPH1001_func_00001D40 }, - { 0x00001D50u, SCPH1001_func_00001D40_cont_BFC11850 }, - { 0x00001D70u, SCPH1001_func_00001D70 }, - { 0x00001D80u, SCPH1001_func_00001D70_cont_BFC11880 }, - { 0x00001D8Cu, SCPH1001_func_00001D8C }, - { 0x00001DB4u, SCPH1001_func_00001D8C_cont_BFC118B4 }, - { 0x00001DC4u, SCPH1001_func_00001D8C_cont_BFC118C4 }, - { 0x00001DCCu, SCPH1001_func_00001D8C_cont_BFC118CC }, - { 0x00001E0Cu, SCPH1001_func_00001D8C_cont_BFC1190C }, - { 0x00001E1Cu, SCPH1001_func_00001E1C }, - { 0x00001E44u, SCPH1001_func_00001E44 }, - { 0x00001E70u, SCPH1001_func_00001E44_cont_BFC11970 }, - { 0x00001E80u, SCPH1001_func_00001E80 }, - { 0x00001E90u, SCPH1001_func_00001E80_cont_BFC11990 }, - { 0x00001E98u, SCPH1001_func_00001E98 }, - { 0x00001EA8u, SCPH1001_func_00001E98_cont_BFC119A8 }, - { 0x00001EB8u, SCPH1001_func_00001E98_cont_BFC119B8 }, - { 0x00001EC8u, SCPH1001_func_00001EC8 }, - { 0x00001EF4u, SCPH1001_func_00001EC8_cont_BFC119F4 }, - { 0x00001F04u, SCPH1001_func_00001F04 }, - { 0x00001F10u, SCPH1001_func_00001F10 }, - { 0x00001F3Cu, SCPH1001_func_00001F10_cont_BFC11A3C }, - { 0x00001F44u, SCPH1001_func_00001F10_cont_BFC11A44 }, - { 0x00001F4Cu, SCPH1001_func_00001F4C }, - { 0x00001F78u, SCPH1001_func_00001F4C_cont_BFC11A78 }, - { 0x00001F80u, SCPH1001_func_00001F4C_cont_BFC11A80 }, - { 0x00001F88u, SCPH1001_func_00001F88 }, - { 0x00001FC8u, SCPH1001_func_00001F88_cont_BFC11AC8 }, - { 0x00001FCCu, SCPH1001_func_00001F88_cont_BFC11ACC }, - { 0x00001FDCu, SCPH1001_func_00001F88_cont_BFC11ADC }, - { 0x00001FFCu, SCPH1001_func_00001FFC }, - { 0x0000200Cu, SCPH1001_func_00001FFC_cont_BFC11B0C }, - { 0x00002018u, SCPH1001_func_00002018 }, - { 0x0000203Cu, SCPH1001_func_00002018_cont_BFC11B3C }, - { 0x00002050u, SCPH1001_func_00002018_cont_BFC11B50 }, - { 0x00002058u, SCPH1001_func_00002018_cont_BFC11B58 }, - { 0x00002098u, SCPH1001_func_00002018_cont_BFC11B98 }, - { 0x000020A8u, SCPH1001_func_000020A8 }, - { 0x000020D4u, SCPH1001_func_000020D4 }, - { 0x00002104u, SCPH1001_func_000020D4_cont_BFC11C04 }, - { 0x00002114u, SCPH1001_func_00002114 }, - { 0x0000211Cu, SCPH1001_func_00002114_cont_BFC11C1C }, - { 0x00002124u, SCPH1001_func_00002124 }, - { 0x0000212Cu, SCPH1001_func_00002124_cont_BFC11C2C }, - { 0x00002144u, SCPH1001_func_00002124_cont_BFC11C44 }, - { 0x00002150u, SCPH1001_func_00002150 }, - { 0x00002158u, SCPH1001_func_00002150_cont_BFC11C58 }, - { 0x00002160u, SCPH1001_func_00002150_cont_BFC11C60 }, - { 0x00002168u, SCPH1001_func_00002168 }, - { 0x00002170u, SCPH1001_func_00002168_cont_BFC11C70 }, - { 0x00002180u, SCPH1001_func_00002168_cont_BFC11C80 }, - { 0x0000218Cu, SCPH1001_func_0000218C }, - { 0x000021B8u, SCPH1001_func_0000218C_cont_BFC11CB8 }, - { 0x000021C8u, SCPH1001_func_0000218C_cont_BFC11CC8 }, - { 0x000021D4u, SCPH1001_func_0000218C_cont_BFC11CD4 }, - { 0x000021F0u, SCPH1001_func_0000218C_cont_BFC11CF0 }, - { 0x00002200u, SCPH1001_func_0000218C_cont_BFC11D00 }, - { 0x0000220Cu, SCPH1001_func_0000218C_cont_BFC11D0C }, - { 0x00002228u, SCPH1001_func_0000218C_cont_BFC11D28 }, - { 0x00002238u, SCPH1001_func_0000218C_cont_BFC11D38 }, - { 0x00002244u, SCPH1001_func_0000218C_cont_BFC11D44 }, - { 0x00002260u, SCPH1001_func_0000218C_cont_BFC11D60 }, - { 0x00002270u, SCPH1001_func_0000218C_cont_BFC11D70 }, - { 0x0000227Cu, SCPH1001_func_0000218C_cont_BFC11D7C }, - { 0x00002298u, SCPH1001_func_0000218C_cont_BFC11D98 }, - { 0x000022A8u, SCPH1001_func_0000218C_cont_BFC11DA8 }, - { 0x000022B4u, SCPH1001_func_0000218C_cont_BFC11DB4 }, - { 0x000022D0u, SCPH1001_func_0000218C_cont_BFC11DD0 }, - { 0x000022E0u, SCPH1001_func_0000218C_cont_BFC11DE0 }, - { 0x000022ECu, SCPH1001_func_0000218C_cont_BFC11DEC }, - { 0x00002308u, SCPH1001_func_0000218C_cont_BFC11E08 }, - { 0x00002318u, SCPH1001_func_0000218C_cont_BFC11E18 }, - { 0x00002324u, SCPH1001_func_0000218C_cont_BFC11E24 }, - { 0x00002340u, SCPH1001_func_0000218C_cont_BFC11E40 }, - { 0x00002350u, SCPH1001_func_0000218C_cont_BFC11E50 }, - { 0x0000235Cu, SCPH1001_func_0000218C_cont_BFC11E5C }, - { 0x00002378u, SCPH1001_func_0000218C_cont_BFC11E78 }, - { 0x00002388u, SCPH1001_func_0000218C_cont_BFC11E88 }, - { 0x00002394u, SCPH1001_func_0000218C_cont_BFC11E94 }, - { 0x000023B0u, SCPH1001_func_0000218C_cont_BFC11EB0 }, - { 0x000023C0u, SCPH1001_func_0000218C_cont_BFC11EC0 }, - { 0x000023CCu, SCPH1001_func_0000218C_cont_BFC11ECC }, - { 0x000023E8u, SCPH1001_func_0000218C_cont_BFC11EE8 }, - { 0x000023F8u, SCPH1001_func_0000218C_cont_BFC11EF8 }, - { 0x00002404u, SCPH1001_func_0000218C_cont_BFC11F04 }, - { 0x00002418u, SCPH1001_func_0000218C_cont_BFC11F18 }, - { 0x00002428u, SCPH1001_func_0000218C_cont_BFC11F28 }, - { 0x00002434u, SCPH1001_func_0000218C_cont_BFC11F34 }, - { 0x00002440u, SCPH1001_func_0000218C_cont_BFC11F40 }, - { 0x00002458u, SCPH1001_func_00002458 }, - { 0x00002484u, SCPH1001_func_00002458_cont_BFC11F84 }, - { 0x00002494u, SCPH1001_func_00002458_cont_BFC11F94 }, - { 0x000024A0u, SCPH1001_func_00002458_cont_BFC11FA0 }, - { 0x000024BCu, SCPH1001_func_00002458_cont_BFC11FBC }, - { 0x000024CCu, SCPH1001_func_00002458_cont_BFC11FCC }, - { 0x000024D8u, SCPH1001_func_00002458_cont_BFC11FD8 }, - { 0x000024F4u, SCPH1001_func_00002458_cont_BFC11FF4 }, - { 0x00002504u, SCPH1001_func_00002458_cont_BFC12004 }, - { 0x00002510u, SCPH1001_func_00002458_cont_BFC12010 }, - { 0x0000252Cu, SCPH1001_func_00002458_cont_BFC1202C }, - { 0x0000253Cu, SCPH1001_func_00002458_cont_BFC1203C }, - { 0x00002548u, SCPH1001_func_00002458_cont_BFC12048 }, - { 0x00002564u, SCPH1001_func_00002458_cont_BFC12064 }, - { 0x00002574u, SCPH1001_func_00002458_cont_BFC12074 }, - { 0x00002580u, SCPH1001_func_00002458_cont_BFC12080 }, - { 0x0000259Cu, SCPH1001_func_00002458_cont_BFC1209C }, - { 0x000025ACu, SCPH1001_func_00002458_cont_BFC120AC }, - { 0x000025B8u, SCPH1001_func_00002458_cont_BFC120B8 }, - { 0x000025D4u, SCPH1001_func_00002458_cont_BFC120D4 }, - { 0x000025E4u, SCPH1001_func_00002458_cont_BFC120E4 }, - { 0x000025F0u, SCPH1001_func_00002458_cont_BFC120F0 }, - { 0x0000260Cu, SCPH1001_func_00002458_cont_BFC1210C }, - { 0x0000261Cu, SCPH1001_func_00002458_cont_BFC1211C }, - { 0x00002628u, SCPH1001_func_00002458_cont_BFC12128 }, - { 0x00002644u, SCPH1001_func_00002458_cont_BFC12144 }, - { 0x00002654u, SCPH1001_func_00002458_cont_BFC12154 }, - { 0x00002660u, SCPH1001_func_00002458_cont_BFC12160 }, - { 0x0000267Cu, SCPH1001_func_00002458_cont_BFC1217C }, - { 0x0000268Cu, SCPH1001_func_00002458_cont_BFC1218C }, - { 0x00002698u, SCPH1001_func_00002458_cont_BFC12198 }, - { 0x000026B4u, SCPH1001_func_00002458_cont_BFC121B4 }, - { 0x000026C4u, SCPH1001_func_00002458_cont_BFC121C4 }, - { 0x000026D0u, SCPH1001_func_00002458_cont_BFC121D0 }, - { 0x000026E4u, SCPH1001_func_00002458_cont_BFC121E4 }, - { 0x000026F4u, SCPH1001_func_00002458_cont_BFC121F4 }, - { 0x00002700u, SCPH1001_func_00002458_cont_BFC12200 }, - { 0x0000270Cu, SCPH1001_func_00002458_cont_BFC1220C }, - { 0x00002724u, SCPH1001_func_00002724 }, - { 0x00002758u, SCPH1001_func_00002724_cont_BFC12258 }, - { 0x00002770u, SCPH1001_func_00002724_cont_BFC12270 }, - { 0x0000277Cu, SCPH1001_func_00002724_cont_BFC1227C }, - { 0x0000278Cu, SCPH1001_func_0000278C }, - { 0x000027A0u, SCPH1001_func_000027A0 }, - { 0x000027C0u, SCPH1001_func_000027C0 }, - { 0x00002828u, SCPH1001_func_000027C0_cont_BFC12328 }, - { 0x00002830u, SCPH1001_func_000027C0_cont_BFC12330 }, - { 0x0000283Cu, SCPH1001_func_000027C0_cont_BFC1233C }, - { 0x00002844u, SCPH1001_func_000027C0_cont_BFC12344 }, - { 0x00002858u, SCPH1001_func_000027C0_cont_BFC12358 }, - { 0x00002860u, SCPH1001_func_000027C0_cont_BFC12360 }, - { 0x00002870u, SCPH1001_func_00002870 }, - { 0x00002884u, SCPH1001_func_00002870_cont_BFC12384 }, - { 0x000028A0u, SCPH1001_func_00002870_cont_BFC123A0 }, - { 0x000028A8u, SCPH1001_func_00002870_cont_BFC123A8 }, - { 0x000028B8u, SCPH1001_func_00002870_cont_BFC123B8 }, - { 0x000028C0u, SCPH1001_func_00002870_cont_BFC123C0 }, - { 0x000028C8u, SCPH1001_func_00002870_cont_BFC123C8 }, - { 0x000028D0u, SCPH1001_func_00002870_cont_BFC123D0 }, - { 0x000028D8u, SCPH1001_func_00002870_cont_BFC123D8 }, - { 0x000028E0u, SCPH1001_func_00002870_cont_BFC123E0 }, - { 0x000028E8u, SCPH1001_func_00002870_cont_BFC123E8 }, - { 0x000028F0u, SCPH1001_func_00002870_cont_BFC123F0 }, - { 0x000028F8u, SCPH1001_func_00002870_cont_BFC123F8 }, - { 0x000028FCu, SCPH1001_func_00002870_cont_BFC123FC }, - { 0x00002908u, SCPH1001_func_00002908 }, - { 0x00002918u, SCPH1001_func_00002908_cont_BFC12418 }, - { 0x00002920u, SCPH1001_func_00002908_cont_BFC12420 }, - { 0x00002930u, SCPH1001_func_00002908_cont_BFC12430 }, - { 0x00002938u, SCPH1001_func_00002908_cont_BFC12438 }, - { 0x00002948u, SCPH1001_func_00002908_cont_BFC12448 }, - { 0x0000294Cu, SCPH1001_func_00002908_cont_BFC1244C }, - { 0x00002958u, SCPH1001_func_00002958 }, - { 0x0000296Cu, SCPH1001_func_00002958_cont_BFC1246C }, - { 0x00002974u, SCPH1001_func_00002958_cont_BFC12474 }, - { 0x00002988u, SCPH1001_func_00002958_cont_BFC12488 }, - { 0x0000299Cu, SCPH1001_func_00002958_cont_BFC1249C }, - { 0x000029ACu, SCPH1001_func_00002958_cont_BFC124AC }, - { 0x000029C4u, SCPH1001_func_00002958_cont_BFC124C4 }, - { 0x00002A0Cu, SCPH1001_func_00002958_cont_BFC1250C }, - { 0x00002A18u, SCPH1001_func_00002958_cont_BFC12518 }, - { 0x00002A30u, SCPH1001_func_00002958_cont_BFC12530 }, - { 0x00002A54u, SCPH1001_func_00002958_cont_BFC12554 }, - { 0x00002A64u, SCPH1001_func_00002A64 }, - { 0x00002A78u, SCPH1001_func_00002A64_cont_BFC12578 }, - { 0x00002A88u, SCPH1001_func_00002A64_cont_BFC12588 }, - { 0x00002A98u, SCPH1001_func_00002A64_cont_BFC12598 }, - { 0x00002AACu, SCPH1001_func_00002A64_cont_BFC125AC }, - { 0x00002AB4u, SCPH1001_func_00002A64_cont_BFC125B4 }, - { 0x00002AC8u, SCPH1001_func_00002A64_cont_BFC125C8 }, - { 0x00002AD8u, SCPH1001_func_00002A64_cont_BFC125D8 }, - { 0x00002AF8u, SCPH1001_func_00002A64_cont_BFC125F8 }, - { 0x00002B00u, SCPH1001_func_00002A64_cont_BFC12600 }, - { 0x00002B08u, SCPH1001_func_00002A64_cont_BFC12608 }, - { 0x00002B10u, SCPH1001_func_00002A64_cont_BFC12610 }, - { 0x00002B18u, SCPH1001_func_00002A64_cont_BFC12618 }, - { 0x00002B28u, SCPH1001_func_00002B28 }, - { 0x00002B3Cu, SCPH1001_func_00002B28_cont_BFC1263C }, - { 0x00002B44u, SCPH1001_func_00002B28_cont_BFC12644 }, - { 0x00002B54u, SCPH1001_func_00002B28_cont_BFC12654 }, - { 0x00002B68u, SCPH1001_func_00002B28_cont_BFC12668 }, - { 0x00002B70u, SCPH1001_func_00002B28_cont_BFC12670 }, - { 0x00002B8Cu, SCPH1001_func_00002B28_cont_BFC1268C }, - { 0x00002BA8u, SCPH1001_func_00002B28_cont_BFC126A8 }, - { 0x00002BB4u, SCPH1001_func_00002B28_cont_BFC126B4 }, - { 0x00002BB8u, SCPH1001_func_00002B28_cont_BFC126B8 }, - { 0x00002BE0u, SCPH1001_func_00002B28_cont_BFC126E0 }, - { 0x00002BFCu, SCPH1001_func_00002B28_cont_BFC126FC }, - { 0x00002C00u, SCPH1001_func_00002B28_cont_BFC12700 }, - { 0x00002C08u, SCPH1001_func_00002B28_cont_BFC12708 }, - { 0x00002C14u, SCPH1001_func_00002B28_cont_BFC12714 }, - { 0x00002C1Cu, SCPH1001_func_00002B28_cont_BFC1271C }, - { 0x00002C38u, SCPH1001_func_00002B28_cont_BFC12738 }, - { 0x00002C3Cu, SCPH1001_func_00002B28_cont_BFC1273C }, - { 0x00002C50u, SCPH1001_func_00002B28_cont_BFC12750 }, - { 0x00002C5Cu, SCPH1001_func_00002B28_cont_BFC1275C }, - { 0x00002C6Cu, SCPH1001_func_00002B28_cont_BFC1276C }, - { 0x00002C74u, SCPH1001_func_00002B28_cont_BFC12774 }, - { 0x00002C84u, SCPH1001_func_00002B28_cont_BFC12784 }, - { 0x00002C94u, SCPH1001_func_00002C94 }, - { 0x00002CA8u, SCPH1001_func_00002C94_cont_BFC127A8 }, - { 0x00002CB0u, SCPH1001_func_00002C94_cont_BFC127B0 }, - { 0x00002CC0u, SCPH1001_func_00002C94_cont_BFC127C0 }, - { 0x00002CD4u, SCPH1001_func_00002C94_cont_BFC127D4 }, - { 0x00002CDCu, SCPH1001_func_00002C94_cont_BFC127DC }, - { 0x00002CF8u, SCPH1001_func_00002C94_cont_BFC127F8 }, - { 0x00002D14u, SCPH1001_func_00002C94_cont_BFC12814 }, - { 0x00002D20u, SCPH1001_func_00002C94_cont_BFC12820 }, - { 0x00002D24u, SCPH1001_func_00002C94_cont_BFC12824 }, - { 0x00002D4Cu, SCPH1001_func_00002C94_cont_BFC1284C }, - { 0x00002D68u, SCPH1001_func_00002C94_cont_BFC12868 }, - { 0x00002D6Cu, SCPH1001_func_00002C94_cont_BFC1286C }, - { 0x00002D74u, SCPH1001_func_00002C94_cont_BFC12874 }, - { 0x00002D80u, SCPH1001_func_00002C94_cont_BFC12880 }, - { 0x00002D88u, SCPH1001_func_00002C94_cont_BFC12888 }, - { 0x00002DA4u, SCPH1001_func_00002C94_cont_BFC128A4 }, - { 0x00002DA8u, SCPH1001_func_00002C94_cont_BFC128A8 }, - { 0x00002DBCu, SCPH1001_func_00002C94_cont_BFC128BC }, - { 0x00002DC8u, SCPH1001_func_00002C94_cont_BFC128C8 }, - { 0x00002DD8u, SCPH1001_func_00002C94_cont_BFC128D8 }, - { 0x00002DE0u, SCPH1001_func_00002C94_cont_BFC128E0 }, - { 0x00002DF0u, SCPH1001_func_00002C94_cont_BFC128F0 }, - { 0x00002E00u, SCPH1001_func_00002E00 }, - { 0x00002E18u, SCPH1001_func_00002E00_cont_BFC12918 }, - { 0x00002E20u, SCPH1001_func_00002E00_cont_BFC12920 }, - { 0x00002E30u, SCPH1001_func_00002E00_cont_BFC12930 }, - { 0x00002E44u, SCPH1001_func_00002E00_cont_BFC12944 }, - { 0x00002E60u, SCPH1001_func_00002E00_cont_BFC12960 }, - { 0x00002E6Cu, SCPH1001_func_00002E00_cont_BFC1296C }, - { 0x00002E80u, SCPH1001_func_00002E00_cont_BFC12980 }, - { 0x00002E88u, SCPH1001_func_00002E00_cont_BFC12988 }, - { 0x00002E98u, SCPH1001_func_00002E98 }, - { 0x00002EA8u, SCPH1001_func_00002E98_cont_BFC129A8 }, - { 0x00002EB0u, SCPH1001_func_00002E98_cont_BFC129B0 }, - { 0x00002EC0u, SCPH1001_func_00002E98_cont_BFC129C0 }, - { 0x00002ED4u, SCPH1001_func_00002E98_cont_BFC129D4 }, - { 0x00002EDCu, SCPH1001_func_00002E98_cont_BFC129DC }, - { 0x00002EECu, SCPH1001_func_00002EEC }, - { 0x00002EFCu, SCPH1001_func_00002EFC }, - { 0x00002F10u, SCPH1001_func_00002EFC_cont_BFC12A10 }, - { 0x00002F20u, SCPH1001_func_00002EFC_cont_BFC12A20 }, - { 0x00002F30u, SCPH1001_func_00002EFC_cont_BFC12A30 }, - { 0x00002F44u, SCPH1001_func_00002EFC_cont_BFC12A44 }, - { 0x00002F4Cu, SCPH1001_func_00002EFC_cont_BFC12A4C }, - { 0x00002F58u, SCPH1001_func_00002EFC_cont_BFC12A58 }, - { 0x00002F5Cu, SCPH1001_func_00002EFC_cont_BFC12A5C }, - { 0x00002F64u, SCPH1001_func_00002EFC_cont_BFC12A64 }, - { 0x00002F6Cu, SCPH1001_func_00002EFC_cont_BFC12A6C }, - { 0x00002F70u, SCPH1001_func_00002EFC_cont_BFC12A70 }, - { 0x00002F78u, SCPH1001_func_00002EFC_cont_BFC12A78 }, - { 0x00002F94u, SCPH1001_func_00002EFC_cont_BFC12A94 }, - { 0x00002FA0u, SCPH1001_func_00002EFC_cont_BFC12AA0 }, - { 0x00002FB4u, SCPH1001_func_00002EFC_cont_BFC12AB4 }, - { 0x00002FB8u, SCPH1001_func_00002EFC_cont_BFC12AB8 }, - { 0x00002FC8u, SCPH1001_func_00002FC8 }, - { 0x00002FE8u, SCPH1001_func_00002FC8_cont_BFC12AE8 }, - { 0x00002FF0u, SCPH1001_func_00002FC8_cont_BFC12AF0 }, - { 0x00003000u, SCPH1001_func_00003000 }, - { 0x0000301Cu, SCPH1001_func_00003000_cont_BFC12B1C }, - { 0x00003024u, SCPH1001_func_00003000_cont_BFC12B24 }, - { 0x00003030u, SCPH1001_func_00003000_cont_BFC12B30 }, - { 0x00003040u, SCPH1001_func_00003000_cont_BFC12B40 }, - { 0x0000304Cu, SCPH1001_func_00003000_cont_BFC12B4C }, - { 0x00003060u, SCPH1001_func_00003060 }, - { 0x00003078u, SCPH1001_func_00003060_cont_BFC12B78 }, - { 0x00003088u, SCPH1001_func_00003060_cont_BFC12B88 }, - { 0x00003090u, SCPH1001_func_00003060_cont_BFC12B90 }, - { 0x000030A0u, SCPH1001_func_00003060_cont_BFC12BA0 }, - { 0x000030B4u, SCPH1001_func_00003060_cont_BFC12BB4 }, - { 0x000030B8u, SCPH1001_func_00003060_cont_BFC12BB8 }, - { 0x000030C8u, SCPH1001_func_000030C8 }, - { 0x000030D0u, SCPH1001_func_000030C8_cont_BFC12BD0 }, - { 0x000030D8u, SCPH1001_func_000030C8_cont_BFC12BD8 }, - { 0x000030E0u, SCPH1001_func_000030E0 }, - { 0x000030E4u, SCPH1001_func_000030E4 }, - { 0x00003108u, SCPH1001_func_00003108 }, - { 0x00003154u, SCPH1001_func_00003108_cont_BFC12C54 }, - { 0x00003164u, SCPH1001_func_00003108_cont_BFC12C64 }, - { 0x0000316Cu, SCPH1001_func_00003108_cont_BFC12C6C }, - { 0x00003174u, SCPH1001_func_00003108_cont_BFC12C74 }, - { 0x0000317Cu, SCPH1001_func_00003108_cont_BFC12C7C }, - { 0x000031A0u, SCPH1001_func_00003108_cont_BFC12CA0 }, - { 0x000031A4u, SCPH1001_func_00003108_cont_BFC12CA4 }, - { 0x000031B8u, SCPH1001_func_00003108_cont_BFC12CB8 }, - { 0x000031C4u, SCPH1001_func_00003108_cont_BFC12CC4 }, - { 0x000031CCu, SCPH1001_func_00003108_cont_BFC12CCC }, - { 0x000031D0u, SCPH1001_func_00003108_cont_BFC12CD0 }, - { 0x000031E8u, SCPH1001_func_000031E8 }, - { 0x00003210u, SCPH1001_func_000031E8_cont_BFC12D10 }, - { 0x00003220u, SCPH1001_func_000031E8_cont_BFC12D20 }, - { 0x0000323Cu, SCPH1001_func_000031E8_cont_BFC12D3C }, - { 0x00003244u, SCPH1001_func_000031E8_cont_BFC12D44 }, - { 0x00003250u, SCPH1001_func_000031E8_cont_BFC12D50 }, - { 0x00003268u, SCPH1001_func_000031E8_cont_BFC12D68 }, - { 0x00003270u, SCPH1001_func_000031E8_cont_BFC12D70 }, - { 0x00003274u, SCPH1001_func_000031E8_cont_BFC12D74 }, - { 0x0000328Cu, SCPH1001_func_000031E8_cont_BFC12D8C }, - { 0x000032BCu, SCPH1001_func_000031E8_cont_BFC12DBC }, - { 0x000032DCu, SCPH1001_func_000031E8_cont_BFC12DDC }, - { 0x000032FCu, SCPH1001_func_000031E8_cont_BFC12DFC }, - { 0x00003304u, SCPH1001_func_000031E8_cont_BFC12E04 }, - { 0x00003324u, SCPH1001_func_000031E8_cont_BFC12E24 }, - { 0x0000332Cu, SCPH1001_func_000031E8_cont_BFC12E2C }, - { 0x00003330u, SCPH1001_func_000031E8_cont_BFC12E30 }, - { 0x00003358u, SCPH1001_func_000031E8_cont_BFC12E58 }, - { 0x0000335Cu, SCPH1001_func_000031E8_cont_BFC12E5C }, - { 0x0000336Cu, SCPH1001_func_000031E8_cont_BFC12E6C }, - { 0x00003374u, SCPH1001_func_000031E8_cont_BFC12E74 }, - { 0x00003380u, SCPH1001_func_000031E8_cont_BFC12E80 }, - { 0x00003388u, SCPH1001_func_000031E8_cont_BFC12E88 }, - { 0x0000338Cu, SCPH1001_func_000031E8_cont_BFC12E8C }, - { 0x000033A4u, SCPH1001_func_000033A4 }, - { 0x000033BCu, SCPH1001_func_000033A4_cont_BFC12EBC }, - { 0x000033C8u, SCPH1001_func_000033A4_cont_BFC12EC8 }, - { 0x000033E4u, SCPH1001_func_000033A4_cont_BFC12EE4 }, - { 0x000033F4u, SCPH1001_func_000033A4_cont_BFC12EF4 }, - { 0x0000343Cu, SCPH1001_func_000033A4_cont_BFC12F3C }, - { 0x00003450u, SCPH1001_func_000033A4_cont_BFC12F50 }, - { 0x00003458u, SCPH1001_func_000033A4_cont_BFC12F58 }, - { 0x0000345Cu, SCPH1001_func_000033A4_cont_BFC12F5C }, - { 0x0000346Cu, SCPH1001_func_0000346C }, - { 0x0000347Cu, SCPH1001_func_0000346C_cont_BFC12F7C }, - { 0x0000348Cu, SCPH1001_func_0000346C_cont_BFC12F8C }, - { 0x000034A8u, SCPH1001_func_0000346C_cont_BFC12FA8 }, - { 0x000034B4u, SCPH1001_func_000034B4 }, - { 0x000034D4u, SCPH1001_func_000034B4_cont_BFC12FD4 }, - { 0x000034E4u, SCPH1001_func_000034B4_cont_BFC12FE4 }, - { 0x000034F4u, SCPH1001_func_000034B4_cont_BFC12FF4 }, - { 0x00003514u, SCPH1001_func_000034B4_cont_BFC13014 }, - { 0x0000351Cu, SCPH1001_func_000034B4_cont_BFC1301C }, - { 0x0000352Cu, SCPH1001_func_0000352C }, - { 0x00003544u, SCPH1001_func_0000352C_cont_BFC13044 }, - { 0x0000354Cu, SCPH1001_func_0000352C_cont_BFC1304C }, - { 0x00003550u, SCPH1001_func_0000352C_cont_BFC13050 }, - { 0x00003560u, SCPH1001_func_0000352C_cont_BFC13060 }, - { 0x00003568u, SCPH1001_func_0000352C_cont_BFC13068 }, - { 0x00003570u, SCPH1001_func_00003570 }, - { 0x00003588u, SCPH1001_func_00003570_cont_BFC13088 }, - { 0x000035A4u, SCPH1001_func_000035A4 }, - { 0x000035ACu, SCPH1001_func_000035AC }, - { 0x000035BCu, SCPH1001_func_000035AC_cont_BFC130BC }, - { 0x000035C4u, SCPH1001_func_000035AC_cont_BFC130C4 }, - { 0x000035D8u, SCPH1001_func_000035AC_cont_BFC130D8 }, - { 0x000035ECu, SCPH1001_func_000035AC_cont_BFC130EC }, - { 0x000035FCu, SCPH1001_func_000035AC_cont_BFC130FC }, - { 0x00003614u, SCPH1001_func_000035AC_cont_BFC13114 }, - { 0x00003644u, SCPH1001_func_000035AC_cont_BFC13144 }, - { 0x00003650u, SCPH1001_func_000035AC_cont_BFC13150 }, - { 0x00003664u, SCPH1001_func_000035AC_cont_BFC13164 }, - { 0x00003668u, SCPH1001_func_000035AC_cont_BFC13168 }, - { 0x00003678u, SCPH1001_func_00003678 }, - { 0x00003688u, SCPH1001_func_00003678_cont_BFC13188 }, - { 0x00003690u, SCPH1001_func_00003678_cont_BFC13190 }, - { 0x000036A4u, SCPH1001_func_00003678_cont_BFC131A4 }, - { 0x000036B8u, SCPH1001_func_00003678_cont_BFC131B8 }, - { 0x000036C8u, SCPH1001_func_00003678_cont_BFC131C8 }, - { 0x000036E0u, SCPH1001_func_00003678_cont_BFC131E0 }, - { 0x00003710u, SCPH1001_func_00003678_cont_BFC13210 }, - { 0x0000371Cu, SCPH1001_func_00003678_cont_BFC1321C }, - { 0x00003730u, SCPH1001_func_00003678_cont_BFC13230 }, - { 0x00003734u, SCPH1001_func_00003678_cont_BFC13234 }, - { 0x00003744u, SCPH1001_func_00003744 }, - { 0x00003754u, SCPH1001_func_00003744_cont_BFC13254 }, - { 0x0000375Cu, SCPH1001_func_00003744_cont_BFC1325C }, - { 0x00003770u, SCPH1001_func_00003744_cont_BFC13270 }, - { 0x00003784u, SCPH1001_func_00003744_cont_BFC13284 }, - { 0x00003794u, SCPH1001_func_00003744_cont_BFC13294 }, - { 0x000037ACu, SCPH1001_func_00003744_cont_BFC132AC }, - { 0x000037DCu, SCPH1001_func_00003744_cont_BFC132DC }, - { 0x000037E8u, SCPH1001_func_00003744_cont_BFC132E8 }, - { 0x000037FCu, SCPH1001_func_00003744_cont_BFC132FC }, - { 0x00003800u, SCPH1001_func_00003744_cont_BFC13300 }, - { 0x00003810u, SCPH1001_func_00003810 }, - { 0x00003820u, SCPH1001_func_00003810_cont_BFC13320 }, - { 0x00003828u, SCPH1001_func_00003810_cont_BFC13328 }, - { 0x0000383Cu, SCPH1001_func_00003810_cont_BFC1333C }, - { 0x00003850u, SCPH1001_func_00003810_cont_BFC13350 }, - { 0x00003860u, SCPH1001_func_00003810_cont_BFC13360 }, - { 0x00003874u, SCPH1001_func_00003810_cont_BFC13374 }, - { 0x000038A4u, SCPH1001_func_00003810_cont_BFC133A4 }, - { 0x000038B0u, SCPH1001_func_00003810_cont_BFC133B0 }, - { 0x000038C4u, SCPH1001_func_00003810_cont_BFC133C4 }, - { 0x000038C8u, SCPH1001_func_00003810_cont_BFC133C8 }, - { 0x000038D8u, SCPH1001_func_000038D8 }, - { 0x000038E8u, SCPH1001_func_000038D8_cont_BFC133E8 }, - { 0x000038F0u, SCPH1001_func_000038D8_cont_BFC133F0 }, - { 0x00003904u, SCPH1001_func_000038D8_cont_BFC13404 }, - { 0x00003918u, SCPH1001_func_000038D8_cont_BFC13418 }, - { 0x00003928u, SCPH1001_func_000038D8_cont_BFC13428 }, - { 0x00003940u, SCPH1001_func_000038D8_cont_BFC13440 }, - { 0x00003944u, SCPH1001_func_000038D8_cont_BFC13444 }, - { 0x00003970u, SCPH1001_func_000038D8_cont_BFC13470 }, - { 0x0000397Cu, SCPH1001_func_000038D8_cont_BFC1347C }, - { 0x00003990u, SCPH1001_func_000038D8_cont_BFC13490 }, - { 0x00003994u, SCPH1001_func_000038D8_cont_BFC13494 }, - { 0x000039A4u, SCPH1001_func_000039A4 }, - { 0x000039C0u, SCPH1001_func_000039A4_cont_BFC134C0 }, - { 0x000039C8u, SCPH1001_func_000039A4_cont_BFC134C8 }, - { 0x000039D8u, SCPH1001_func_000039A4_cont_BFC134D8 }, - { 0x000039ECu, SCPH1001_func_000039A4_cont_BFC134EC }, - { 0x000039FCu, SCPH1001_func_000039A4_cont_BFC134FC }, - { 0x00003A08u, SCPH1001_func_000039A4_cont_BFC13508 }, - { 0x00003A28u, SCPH1001_func_000039A4_cont_BFC13528 }, - { 0x00003A60u, SCPH1001_func_000039A4_cont_BFC13560 }, - { 0x00003A70u, SCPH1001_func_00003A70 }, - { 0x00003A9Cu, SCPH1001_func_00003A70_cont_BFC1359C }, - { 0x00003AACu, SCPH1001_func_00003AAC }, - { 0x00003AC4u, SCPH1001_func_00003AAC_cont_BFC135C4 }, - { 0x00003ACCu, SCPH1001_func_00003AAC_cont_BFC135CC }, - { 0x00003AE0u, SCPH1001_func_00003AAC_cont_BFC135E0 }, - { 0x00003AE8u, SCPH1001_func_00003AAC_cont_BFC135E8 }, - { 0x00003AF0u, SCPH1001_func_00003AAC_cont_BFC135F0 }, - { 0x00003B08u, SCPH1001_func_00003AAC_cont_BFC13608 }, - { 0x00003B1Cu, SCPH1001_func_00003AAC_cont_BFC1361C }, - { 0x00003B2Cu, SCPH1001_func_00003AAC_cont_BFC1362C }, - { 0x00003B3Cu, SCPH1001_func_00003AAC_cont_BFC1363C }, - { 0x00003B54u, SCPH1001_func_00003AAC_cont_BFC13654 }, - { 0x00003B6Cu, SCPH1001_func_00003AAC_cont_BFC1366C }, - { 0x00003B7Cu, SCPH1001_func_00003AAC_cont_BFC1367C }, - { 0x00003B88u, SCPH1001_func_00003AAC_cont_BFC13688 }, - { 0x00003B98u, SCPH1001_func_00003AAC_cont_BFC13698 }, - { 0x00003B9Cu, SCPH1001_func_00003AAC_cont_BFC1369C }, - { 0x00003BE0u, SCPH1001_func_00003AAC_cont_BFC136E0 }, - { 0x00003BF4u, SCPH1001_func_00003AAC_cont_BFC136F4 }, - { 0x00003C08u, SCPH1001_func_00003AAC_cont_BFC13708 }, - { 0x00003C10u, SCPH1001_func_00003AAC_cont_BFC13710 }, - { 0x00003C1Cu, SCPH1001_func_00003AAC_cont_BFC1371C }, - { 0x00003C2Cu, SCPH1001_func_00003C2C }, - { 0x00003C6Cu, SCPH1001_func_00003C6C }, - { 0x00003C7Cu, SCPH1001_func_00003C6C_cont_BFC1377C }, - { 0x00003C90u, SCPH1001_func_00003C6C_cont_BFC13790 }, - { 0x00003C9Cu, SCPH1001_func_00003C6C_cont_BFC1379C }, - { 0x00003CB4u, SCPH1001_func_00003CB4 }, - { 0x00003CBCu, SCPH1001_func_00003CBC }, - { 0x00003CCCu, SCPH1001_func_00003CBC_cont_BFC137CC }, - { 0x00003CD0u, SCPH1001_func_00003CD0 }, - { 0x00003CE0u, SCPH1001_func_00003CE0 }, - { 0x00003D2Cu, SCPH1001_func_00003CE0_cont_BFC1382C }, - { 0x00003D3Cu, SCPH1001_func_00003CE0_cont_BFC1383C }, - { 0x00003D44u, SCPH1001_func_00003CE0_cont_BFC13844 }, - { 0x00003D4Cu, SCPH1001_func_00003CE0_cont_BFC1384C }, - { 0x00003D5Cu, SCPH1001_func_00003CE0_cont_BFC1385C }, - { 0x00003D68u, SCPH1001_func_00003CE0_cont_BFC13868 }, - { 0x00003D90u, SCPH1001_func_00003CE0_cont_BFC13890 }, - { 0x00003D94u, SCPH1001_func_00003CE0_cont_BFC13894 }, - { 0x00003DACu, SCPH1001_func_00003DAC }, - { 0x00003DECu, SCPH1001_func_00003DAC_cont_BFC138EC }, - { 0x00003DF8u, SCPH1001_func_00003DAC_cont_BFC138F8 }, - { 0x00003E08u, SCPH1001_func_00003DAC_cont_BFC13908 }, - { 0x00003E14u, SCPH1001_func_00003DAC_cont_BFC13914 }, - { 0x00003E34u, SCPH1001_func_00003DAC_cont_BFC13934 }, - { 0x00003E44u, SCPH1001_func_00003DAC_cont_BFC13944 }, - { 0x00003E4Cu, SCPH1001_func_00003DAC_cont_BFC1394C }, - { 0x00003E5Cu, SCPH1001_func_00003E5C }, - { 0x00003E68u, SCPH1001_func_00003E68 }, - { 0x00003E80u, SCPH1001_func_00003E80 }, - { 0x00003EA8u, SCPH1001_func_00003E80_cont_BFC139A8 }, - { 0x00003EBCu, SCPH1001_func_00003E80_cont_BFC139BC }, - { 0x00003EDCu, SCPH1001_func_00003E80_cont_BFC139DC }, - { 0x00003EECu, SCPH1001_func_00003E80_cont_BFC139EC }, - { 0x00003F04u, SCPH1001_func_00003F04 }, - { 0x00003F1Cu, SCPH1001_func_00003F04_cont_BFC13A1C }, - { 0x00003F30u, SCPH1001_func_00003F04_cont_BFC13A30 }, - { 0x00003F40u, SCPH1001_func_00003F04_cont_BFC13A40 }, - { 0x00003F4Cu, SCPH1001_func_00003F04_cont_BFC13A4C }, - { 0x00003F5Cu, SCPH1001_func_00003F04_cont_BFC13A5C }, - { 0x00003F68u, SCPH1001_func_00003F04_cont_BFC13A68 }, - { 0x00003F6Cu, SCPH1001_func_00003F04_cont_BFC13A6C }, - { 0x00003F78u, SCPH1001_func_00003F04_cont_BFC13A78 }, - { 0x00003F8Cu, SCPH1001_func_00003F04_cont_BFC13A8C }, - { 0x00003FA0u, SCPH1001_func_00003F04_cont_BFC13AA0 }, - { 0x00003FA4u, SCPH1001_func_00003F04_cont_BFC13AA4 }, - { 0x00003FACu, SCPH1001_func_00003F04_cont_BFC13AAC }, - { 0x00003FC0u, SCPH1001_func_00003F04_cont_BFC13AC0 }, - { 0x00003FD4u, SCPH1001_func_00003F04_cont_BFC13AD4 }, - { 0x00003FE0u, SCPH1001_func_00003F04_cont_BFC13AE0 }, - { 0x00003FE4u, SCPH1001_func_00003F04_cont_BFC13AE4 }, - { 0x00003FF0u, SCPH1001_func_00003FF0 }, - { 0x00004008u, SCPH1001_func_00003FF0_cont_BFC13B08 }, - { 0x00004024u, SCPH1001_func_00004024 }, - { 0x00004038u, SCPH1001_func_00004024_cont_BFC13B38 }, - { 0x00004040u, SCPH1001_func_00004024_cont_BFC13B40 }, - { 0x00004048u, SCPH1001_func_00004024_cont_BFC13B48 }, - { 0x0000404Cu, SCPH1001_func_00004024_cont_BFC13B4C }, - { 0x0000405Cu, SCPH1001_func_00004024_cont_BFC13B5C }, - { 0x0000406Cu, SCPH1001_func_0000406C }, - { 0x00004084u, SCPH1001_func_0000406C_cont_BFC13B84 }, - { 0x00004090u, SCPH1001_func_0000406C_cont_BFC13B90 }, - { 0x00004098u, SCPH1001_func_0000406C_cont_BFC13B98 }, - { 0x000040A4u, SCPH1001_func_0000406C_cont_BFC13BA4 }, - { 0x000040ACu, SCPH1001_func_0000406C_cont_BFC13BAC }, - { 0x000040C4u, SCPH1001_func_0000406C_cont_BFC13BC4 }, - { 0x000040CCu, SCPH1001_func_0000406C_cont_BFC13BCC }, - { 0x000040D0u, SCPH1001_func_0000406C_cont_BFC13BD0 }, - { 0x000040D8u, SCPH1001_func_0000406C_cont_BFC13BD8 }, - { 0x000040E0u, SCPH1001_func_0000406C_cont_BFC13BE0 }, - { 0x000040E4u, SCPH1001_func_0000406C_cont_BFC13BE4 }, - { 0x00004100u, SCPH1001_func_0000406C_cont_BFC13C00 }, - { 0x00004114u, SCPH1001_func_0000406C_cont_BFC13C14 }, - { 0x00004118u, SCPH1001_func_0000406C_cont_BFC13C18 }, - { 0x00004124u, SCPH1001_func_0000406C_cont_BFC13C24 }, - { 0x00004128u, SCPH1001_func_0000406C_cont_BFC13C28 }, - { 0x00004134u, SCPH1001_func_00004134 }, - { 0x00004154u, SCPH1001_func_00004134_cont_BFC13C54 }, - { 0x00004164u, SCPH1001_func_00004164 }, - { 0x000041B0u, SCPH1001_func_00004164_cont_BFC13CB0 }, - { 0x000041B8u, SCPH1001_func_00004164_cont_BFC13CB8 }, - { 0x000041CCu, SCPH1001_func_00004164_cont_BFC13CCC }, - { 0x000041D4u, SCPH1001_func_00004164_cont_BFC13CD4 }, - { 0x000041DCu, SCPH1001_func_00004164_cont_BFC13CDC }, - { 0x000041E4u, SCPH1001_func_00004164_cont_BFC13CE4 }, - { 0x000041ECu, SCPH1001_func_00004164_cont_BFC13CEC }, - { 0x000041F4u, SCPH1001_func_00004164_cont_BFC13CF4 }, - { 0x000041FCu, SCPH1001_func_00004164_cont_BFC13CFC }, - { 0x00004204u, SCPH1001_func_00004164_cont_BFC13D04 }, - { 0x00004214u, SCPH1001_func_00004164_cont_BFC13D14 }, - { 0x00004220u, SCPH1001_func_00004164_cont_BFC13D20 }, - { 0x00004228u, SCPH1001_func_00004164_cont_BFC13D28 }, - { 0x00004230u, SCPH1001_func_00004164_cont_BFC13D30 }, - { 0x00004238u, SCPH1001_func_00004164_cont_BFC13D38 }, - { 0x00004240u, SCPH1001_func_00004164_cont_BFC13D40 }, - { 0x0000424Cu, SCPH1001_func_00004164_cont_BFC13D4C }, - { 0x00004250u, SCPH1001_func_00004164_cont_BFC13D50 }, - { 0x00004258u, SCPH1001_func_00004164_cont_BFC13D58 }, - { 0x00004264u, SCPH1001_func_00004164_cont_BFC13D64 }, - { 0x0000426Cu, SCPH1001_func_00004164_cont_BFC13D6C }, - { 0x00004274u, SCPH1001_func_00004164_cont_BFC13D74 }, - { 0x0000427Cu, SCPH1001_func_00004164_cont_BFC13D7C }, - { 0x00004284u, SCPH1001_func_00004164_cont_BFC13D84 }, - { 0x000042A0u, SCPH1001_func_00004164_cont_BFC13DA0 }, - { 0x000042B0u, SCPH1001_func_00004164_cont_BFC13DB0 }, - { 0x000042BCu, SCPH1001_func_00004164_cont_BFC13DBC }, - { 0x000042C4u, SCPH1001_func_00004164_cont_BFC13DC4 }, - { 0x000042CCu, SCPH1001_func_00004164_cont_BFC13DCC }, - { 0x000042D4u, SCPH1001_func_00004164_cont_BFC13DD4 }, - { 0x00004304u, SCPH1001_func_00004304 }, - { 0x0000431Cu, SCPH1001_func_00004304_cont_BFC13E1C }, - { 0x00004324u, SCPH1001_func_00004304_cont_BFC13E24 }, - { 0x00004334u, SCPH1001_func_00004304_cont_BFC13E34 }, - { 0x0000433Cu, SCPH1001_func_00004304_cont_BFC13E3C }, - { 0x0000434Cu, SCPH1001_func_00004304_cont_BFC13E4C }, - { 0x00004350u, SCPH1001_func_00004304_cont_BFC13E50 }, - { 0x00004360u, SCPH1001_func_00004360 }, - { 0x00004378u, SCPH1001_func_00004360_cont_BFC13E78 }, - { 0x000043D0u, SCPH1001_func_000043D0 }, - { 0x000043E8u, SCPH1001_func_000043E8 }, - { 0x00004420u, SCPH1001_func_000043E8_cont_BFC13F20 }, - { 0x00004430u, SCPH1001_func_000043E8_cont_BFC13F30 }, - { 0x00004440u, SCPH1001_func_000043E8_cont_BFC13F40 }, - { 0x0000445Cu, SCPH1001_func_0000445C }, - { 0x00004478u, SCPH1001_func_0000445C_cont_BFC13F78 }, - { 0x00004490u, SCPH1001_func_0000445C_cont_BFC13F90 }, - { 0x00004498u, SCPH1001_func_00004498 }, - { 0x000044E0u, SCPH1001_func_00004498_cont_BFC13FE0 }, - { 0x000044E8u, SCPH1001_func_00004498_cont_BFC13FE8 }, - { 0x000044ECu, SCPH1001_func_00004498_cont_BFC13FEC }, - { 0x00004524u, SCPH1001_func_00004498_cont_BFC14024 }, - { 0x0000452Cu, SCPH1001_func_00004498_cont_BFC1402C }, - { 0x00004530u, SCPH1001_func_00004498_cont_BFC14030 }, - { 0x00004548u, SCPH1001_func_00004498_cont_BFC14048 }, - { 0x0000456Cu, SCPH1001_func_00004498_cont_BFC1406C }, - { 0x00004580u, SCPH1001_func_00004498_cont_BFC14080 }, - { 0x00004584u, SCPH1001_func_00004498_cont_BFC14084 }, - { 0x00004590u, SCPH1001_func_00004498_cont_BFC14090 }, - { 0x000045C4u, SCPH1001_func_00004498_cont_BFC140C4 }, - { 0x000045D8u, SCPH1001_func_00004498_cont_BFC140D8 }, - { 0x000045E4u, SCPH1001_func_00004498_cont_BFC140E4 }, - { 0x000045F8u, SCPH1001_func_00004498_cont_BFC140F8 }, - { 0x000045FCu, SCPH1001_func_00004498_cont_BFC140FC }, - { 0x00004614u, SCPH1001_func_00004498_cont_BFC14114 }, - { 0x00004628u, SCPH1001_func_00004498_cont_BFC14128 }, - { 0x0000462Cu, SCPH1001_func_00004498_cont_BFC1412C }, - { 0x00004638u, SCPH1001_func_00004498_cont_BFC14138 }, - { 0x00004664u, SCPH1001_func_00004498_cont_BFC14164 }, - { 0x00004678u, SCPH1001_func_00004498_cont_BFC14178 }, - { 0x000046A4u, SCPH1001_func_00004498_cont_BFC141A4 }, - { 0x000046A8u, SCPH1001_func_00004498_cont_BFC141A8 }, - { 0x000046BCu, SCPH1001_func_00004498_cont_BFC141BC }, - { 0x000046C0u, SCPH1001_func_00004498_cont_BFC141C0 }, - { 0x000046D8u, SCPH1001_func_00004498_cont_BFC141D8 }, - { 0x000046ECu, SCPH1001_func_00004498_cont_BFC141EC }, - { 0x000046FCu, SCPH1001_func_00004498_cont_BFC141FC }, - { 0x00004728u, SCPH1001_func_00004498_cont_BFC14228 }, - { 0x0000473Cu, SCPH1001_func_00004498_cont_BFC1423C }, - { 0x00004754u, SCPH1001_func_00004498_cont_BFC14254 }, - { 0x0000475Cu, SCPH1001_func_00004498_cont_BFC1425C }, - { 0x00004770u, SCPH1001_func_00004498_cont_BFC14270 }, - { 0x00004774u, SCPH1001_func_00004498_cont_BFC14274 }, - { 0x0000478Cu, SCPH1001_func_00004498_cont_BFC1428C }, - { 0x000047A0u, SCPH1001_func_00004498_cont_BFC142A0 }, - { 0x000047B4u, SCPH1001_func_00004498_cont_BFC142B4 }, - { 0x000047B8u, SCPH1001_func_00004498_cont_BFC142B8 }, - { 0x000047C8u, SCPH1001_func_00004498_cont_BFC142C8 }, - { 0x000047F4u, SCPH1001_func_00004498_cont_BFC142F4 }, - { 0x00004808u, SCPH1001_func_00004498_cont_BFC14308 }, - { 0x0000481Cu, SCPH1001_func_00004498_cont_BFC1431C }, - { 0x00004830u, SCPH1001_func_00004498_cont_BFC14330 }, - { 0x0000483Cu, SCPH1001_func_00004498_cont_BFC1433C }, - { 0x00004850u, SCPH1001_func_00004498_cont_BFC14350 }, - { 0x00004878u, SCPH1001_func_00004498_cont_BFC14378 }, - { 0x0000487Cu, SCPH1001_func_00004498_cont_BFC1437C }, - { 0x00004894u, SCPH1001_func_00004498_cont_BFC14394 }, - { 0x000048A8u, SCPH1001_func_00004498_cont_BFC143A8 }, - { 0x000048BCu, SCPH1001_func_00004498_cont_BFC143BC }, - { 0x000048C0u, SCPH1001_func_00004498_cont_BFC143C0 }, - { 0x000048D0u, SCPH1001_func_00004498_cont_BFC143D0 }, - { 0x000048FCu, SCPH1001_func_00004498_cont_BFC143FC }, - { 0x00004910u, SCPH1001_func_00004498_cont_BFC14410 }, - { 0x00004934u, SCPH1001_func_00004498_cont_BFC14434 }, - { 0x00004938u, SCPH1001_func_00004498_cont_BFC14438 }, - { 0x00004950u, SCPH1001_func_00004498_cont_BFC14450 }, - { 0x00004954u, SCPH1001_func_00004498_cont_BFC14454 }, - { 0x00004990u, SCPH1001_func_00004498_cont_BFC14490 }, - { 0x00004998u, SCPH1001_func_00004498_cont_BFC14498 }, - { 0x000049BCu, SCPH1001_func_000049BC }, - { 0x000049D0u, SCPH1001_func_000049BC_cont_BFC144D0 }, - { 0x000049D8u, SCPH1001_func_000049BC_cont_BFC144D8 }, - { 0x000049E0u, SCPH1001_func_000049BC_cont_BFC144E0 }, - { 0x000049F4u, SCPH1001_func_000049BC_cont_BFC144F4 }, - { 0x000049FCu, SCPH1001_func_000049BC_cont_BFC144FC }, - { 0x00004A10u, SCPH1001_func_000049BC_cont_BFC14510 }, - { 0x00004A20u, SCPH1001_func_000049BC_cont_BFC14520 }, - { 0x00004A34u, SCPH1001_func_000049BC_cont_BFC14534 }, - { 0x00004A3Cu, SCPH1001_func_000049BC_cont_BFC1453C }, - { 0x00004A40u, SCPH1001_func_000049BC_cont_BFC14540 }, - { 0x00004A4Cu, SCPH1001_func_00004A4C }, - { 0x00004A6Cu, SCPH1001_func_00004A4C_cont_BFC1456C }, - { 0x00004A80u, SCPH1001_func_00004A4C_cont_BFC14580 }, - { 0x00004A88u, SCPH1001_func_00004A88 }, - { 0x00004A8Cu, SCPH1001_func_00004A88_cont_BFC1458C }, - { 0x00004A94u, SCPH1001_func_00004A94 }, - { 0x00004AC8u, SCPH1001_func_00004AC8 }, - { 0x00004AF4u, SCPH1001_func_00004AC8_cont_BFC145F4 }, - { 0x00004B00u, SCPH1001_func_00004AC8_cont_BFC14600 }, - { 0x00004B14u, SCPH1001_func_00004AC8_cont_BFC14614 }, - { 0x00004B40u, SCPH1001_func_00004AC8_cont_BFC14640 }, - { 0x00004B50u, SCPH1001_func_00004AC8_cont_BFC14650 }, - { 0x00004B58u, SCPH1001_func_00004AC8_cont_BFC14658 }, - { 0x00004B60u, SCPH1001_func_00004AC8_cont_BFC14660 }, - { 0x00004B70u, SCPH1001_func_00004B70 }, - { 0x00004B90u, SCPH1001_func_00004B90 }, - { 0x00004BA0u, SCPH1001_func_00004B90_cont_BFC146A0 }, - { 0x00004BA8u, SCPH1001_func_00004B90_cont_BFC146A8 }, - { 0x00004BB8u, SCPH1001_func_00004B90_cont_BFC146B8 }, - { 0x00004BC8u, SCPH1001_func_00004B90_cont_BFC146C8 }, - { 0x00004BECu, SCPH1001_func_00004B90_cont_BFC146EC }, - { 0x00004BF8u, SCPH1001_func_00004B90_cont_BFC146F8 }, - { 0x00004C00u, SCPH1001_func_00004B90_cont_BFC14700 }, - { 0x00004C10u, SCPH1001_func_00004C10 }, - { 0x00004C20u, SCPH1001_func_00004C10_cont_BFC14720 }, - { 0x00004C2Cu, SCPH1001_func_00004C10_cont_BFC1472C }, - { 0x00004C3Cu, SCPH1001_func_00004C10_cont_BFC1473C }, - { 0x00004C44u, SCPH1001_func_00004C10_cont_BFC14744 }, - { 0x00004C54u, SCPH1001_func_00004C54 }, - { 0x00004C64u, SCPH1001_func_00004C64 }, - { 0x00004C70u, SCPH1001_func_00004C70 }, - { 0x00004C80u, SCPH1001_func_00004C70_cont_BFC14780 }, - { 0x00004C88u, SCPH1001_func_00004C70_cont_BFC14788 }, - { 0x00004C98u, SCPH1001_func_00004C70_cont_BFC14798 }, - { 0x00004CA8u, SCPH1001_func_00004C70_cont_BFC147A8 }, - { 0x00004CC8u, SCPH1001_func_00004C70_cont_BFC147C8 }, - { 0x00004CD4u, SCPH1001_func_00004C70_cont_BFC147D4 }, - { 0x00004CE4u, SCPH1001_func_00004C70_cont_BFC147E4 }, - { 0x00004CF4u, SCPH1001_func_00004CF4 }, - { 0x00004D04u, SCPH1001_func_00004CF4_cont_BFC14804 }, - { 0x00004D10u, SCPH1001_func_00004CF4_cont_BFC14810 }, - { 0x00004D20u, SCPH1001_func_00004CF4_cont_BFC14820 }, - { 0x00004D2Cu, SCPH1001_func_00004CF4_cont_BFC1482C }, - { 0x00004D3Cu, SCPH1001_func_00004D3C }, - { 0x00004D4Cu, SCPH1001_func_00004D4C }, - { 0x00004D64u, SCPH1001_func_00004D64 }, - { 0x00004D6Cu, SCPH1001_func_00004D6C }, - { 0x00004D80u, SCPH1001_func_00004D6C_cont_BFC14880 }, - { 0x00004D88u, SCPH1001_func_00004D6C_cont_BFC14888 }, - { 0x00004D8Cu, SCPH1001_func_00004D6C_cont_BFC1488C }, - { 0x00004DACu, SCPH1001_func_00004D6C_cont_BFC148AC }, - { 0x00004DDCu, SCPH1001_func_00004D6C_cont_BFC148DC }, - { 0x00004DE4u, SCPH1001_func_00004D6C_cont_BFC148E4 }, - { 0x00004DF0u, SCPH1001_func_00004D6C_cont_BFC148F0 }, - { 0x00004DF8u, SCPH1001_func_00004D6C_cont_BFC148F8 }, - { 0x00004E00u, SCPH1001_func_00004D6C_cont_BFC14900 }, - { 0x00004E08u, SCPH1001_func_00004D6C_cont_BFC14908 }, - { 0x00004E10u, SCPH1001_func_00004D6C_cont_BFC14910 }, - { 0x00004E34u, SCPH1001_func_00004D6C_cont_BFC14934 }, - { 0x00004E5Cu, SCPH1001_func_00004D6C_cont_BFC1495C }, - { 0x00004E8Cu, SCPH1001_func_00004D6C_cont_BFC1498C }, - { 0x00004E9Cu, SCPH1001_func_00004D6C_cont_BFC1499C }, - { 0x00004EBCu, SCPH1001_func_00004D6C_cont_BFC149BC }, - { 0x00004EE0u, SCPH1001_func_00004D6C_cont_BFC149E0 }, - { 0x00004F0Cu, SCPH1001_func_00004D6C_cont_BFC14A0C }, - { 0x00004F3Cu, SCPH1001_func_00004D6C_cont_BFC14A3C }, - { 0x00004F54u, SCPH1001_func_00004F54 }, - { 0x00004F6Cu, SCPH1001_func_00004F54_cont_BFC14A6C }, - { 0x00004F7Cu, SCPH1001_func_00004F54_cont_BFC14A7C }, - { 0x00004F80u, SCPH1001_func_00004F54_cont_BFC14A80 }, - { 0x00004F90u, SCPH1001_func_00004F90 }, - { 0x00004FB4u, SCPH1001_func_00004F90_cont_BFC14AB4 }, - { 0x00004FC8u, SCPH1001_func_00004F90_cont_BFC14AC8 }, - { 0x00004FD0u, SCPH1001_func_00004F90_cont_BFC14AD0 }, - { 0x00004FD8u, SCPH1001_func_00004F90_cont_BFC14AD8 }, - { 0x00004FE4u, SCPH1001_func_00004F90_cont_BFC14AE4 }, - { 0x00004FECu, SCPH1001_func_00004F90_cont_BFC14AEC }, - { 0x00004FF0u, SCPH1001_func_00004F90_cont_BFC14AF0 }, - { 0x00005000u, SCPH1001_func_00005000 }, - { 0x00005018u, SCPH1001_func_00005000_cont_BFC14B18 }, - { 0x00005028u, SCPH1001_func_00005000_cont_BFC14B28 }, - { 0x00005038u, SCPH1001_func_00005000_cont_BFC14B38 }, - { 0x00005048u, SCPH1001_func_00005000_cont_BFC14B48 }, - { 0x00005058u, SCPH1001_func_00005000_cont_BFC14B58 }, - { 0x0000506Cu, SCPH1001_func_00005000_cont_BFC14B6C }, - { 0x000050E0u, SCPH1001_func_00005000_cont_BFC14BE0 }, - { 0x000050F0u, SCPH1001_func_00005000_cont_BFC14BF0 }, - { 0x00005100u, SCPH1001_func_00005000_cont_BFC14C00 }, - { 0x00005128u, SCPH1001_func_00005000_cont_BFC14C28 }, - { 0x00005168u, SCPH1001_func_00005000_cont_BFC14C68 }, - { 0x00005170u, SCPH1001_func_00005000_cont_BFC14C70 }, - { 0x000051B0u, SCPH1001_func_00005000_cont_BFC14CB0 }, - { 0x000051C0u, SCPH1001_func_00005000_cont_BFC14CC0 }, - { 0x000051D0u, SCPH1001_func_00005000_cont_BFC14CD0 }, - { 0x000051E4u, SCPH1001_func_00005000_cont_BFC14CE4 }, - { 0x000051F4u, SCPH1001_func_000051F4 }, - { 0x00005228u, SCPH1001_func_000051F4_cont_BFC14D28 }, - { 0x00005244u, SCPH1001_func_000051F4_cont_BFC14D44 }, - { 0x0000524Cu, SCPH1001_func_000051F4_cont_BFC14D4C }, - { 0x00005254u, SCPH1001_func_000051F4_cont_BFC14D54 }, - { 0x00005258u, SCPH1001_func_000051F4_cont_BFC14D58 }, - { 0x000052C4u, SCPH1001_func_000051F4_cont_BFC14DC4 }, - { 0x000052F8u, SCPH1001_func_000051F4_cont_BFC14DF8 }, - { 0x00005340u, SCPH1001_func_000051F4_cont_BFC14E40 }, - { 0x0000534Cu, SCPH1001_func_000051F4_cont_BFC14E4C }, - { 0x00005374u, SCPH1001_func_000051F4_cont_BFC14E74 }, - { 0x00005384u, SCPH1001_func_000051F4_cont_BFC14E84 }, - { 0x00005398u, SCPH1001_func_000051F4_cont_BFC14E98 }, - { 0x000053CCu, SCPH1001_func_000051F4_cont_BFC14ECC }, - { 0x000053D4u, SCPH1001_func_000051F4_cont_BFC14ED4 }, - { 0x00005410u, SCPH1001_func_000051F4_cont_BFC14F10 }, - { 0x00005418u, SCPH1001_func_000051F4_cont_BFC14F18 }, - { 0x0000542Cu, SCPH1001_func_000051F4_cont_BFC14F2C }, - { 0x00005480u, SCPH1001_func_000051F4_cont_BFC14F80 }, - { 0x00005488u, SCPH1001_func_000051F4_cont_BFC14F88 }, - { 0x000054CCu, SCPH1001_func_000051F4_cont_BFC14FCC }, - { 0x000054FCu, SCPH1001_func_000051F4_cont_BFC14FFC }, - { 0x00005530u, SCPH1001_func_000051F4_cont_BFC15030 }, - { 0x00005538u, SCPH1001_func_000051F4_cont_BFC15038 }, - { 0x0000556Cu, SCPH1001_func_000051F4_cont_BFC1506C }, - { 0x00005574u, SCPH1001_func_000051F4_cont_BFC15074 }, - { 0x00005588u, SCPH1001_func_000051F4_cont_BFC15088 }, - { 0x0000559Cu, SCPH1001_func_000051F4_cont_BFC1509C }, - { 0x000055B0u, SCPH1001_func_000051F4_cont_BFC150B0 }, - { 0x000055D0u, SCPH1001_func_000051F4_cont_BFC150D0 }, - { 0x00005604u, SCPH1001_func_000051F4_cont_BFC15104 }, - { 0x00005618u, SCPH1001_func_000051F4_cont_BFC15118 }, - { 0x00005628u, SCPH1001_func_000051F4_cont_BFC15128 }, - { 0x0000562Cu, SCPH1001_func_000051F4_cont_BFC1512C }, - { 0x00005634u, SCPH1001_func_000051F4_cont_BFC15134 }, - { 0x0000563Cu, SCPH1001_func_000051F4_cont_BFC1513C }, - { 0x00005644u, SCPH1001_func_000051F4_cont_BFC15144 }, - { 0x0000564Cu, SCPH1001_func_000051F4_cont_BFC1514C }, - { 0x00005654u, SCPH1001_func_000051F4_cont_BFC15154 }, - { 0x0000565Cu, SCPH1001_func_000051F4_cont_BFC1515C }, - { 0x00005664u, SCPH1001_func_000051F4_cont_BFC15164 }, - { 0x0000566Cu, SCPH1001_func_000051F4_cont_BFC1516C }, - { 0x00005674u, SCPH1001_func_000051F4_cont_BFC15174 }, - { 0x00005678u, SCPH1001_func_000051F4_cont_BFC15178 }, - { 0x00005688u, SCPH1001_func_00005688 }, - { 0x000056CCu, SCPH1001_func_00005688_cont_BFC151CC }, - { 0x000056E8u, SCPH1001_func_000056E8 }, - { 0x000056F0u, SCPH1001_func_000056E8_cont_BFC151F0 }, - { 0x000056F8u, SCPH1001_func_000056E8_cont_BFC151F8 }, - { 0x000056FCu, SCPH1001_func_000056E8_cont_BFC151FC }, - { 0x00005768u, SCPH1001_func_00005768 }, - { 0x0000579Cu, SCPH1001_func_0000579C }, - { 0x000057DCu, SCPH1001_func_0000579C_cont_BFC152DC }, - { 0x000057E8u, SCPH1001_func_0000579C_cont_BFC152E8 }, - { 0x00005810u, SCPH1001_func_0000579C_cont_BFC15310 }, - { 0x00005820u, SCPH1001_func_0000579C_cont_BFC15320 }, - { 0x00005834u, SCPH1001_func_00005834 }, - { 0x00005868u, SCPH1001_func_00005834_cont_BFC15368 }, - { 0x00005870u, SCPH1001_func_00005870 }, - { 0x000058ACu, SCPH1001_func_00005870_cont_BFC153AC }, - { 0x000058B4u, SCPH1001_func_000058B4 }, - { 0x000058E8u, SCPH1001_func_000058E8 }, - { 0x00005918u, SCPH1001_func_00005918 }, - { 0x0000594Cu, SCPH1001_func_00005918_cont_BFC1544C }, - { 0x00005954u, SCPH1001_func_00005954 }, - { 0x00005988u, SCPH1001_func_00005954_cont_BFC15488 }, - { 0x00005990u, SCPH1001_func_00005990 }, - { 0x000059C8u, SCPH1001_func_00005990_cont_BFC154C8 }, - { 0x000059CCu, SCPH1001_func_000059CC }, - { 0x000059D0u, SCPH1001_func_000059CC_cont_BFC154D0 }, - { 0x00005A00u, SCPH1001_func_00005A00 }, - { 0x00005A08u, SCPH1001_func_00005A08 }, - { 0x00005A40u, SCPH1001_func_00005A08_cont_BFC15540 }, - { 0x00005A44u, SCPH1001_func_00005A44 }, - { 0x00005A48u, SCPH1001_func_00005A44_cont_BFC15548 }, - { 0x00005A50u, SCPH1001_func_00005A44_cont_BFC15550 }, - { 0x00005A58u, SCPH1001_func_00005A58 }, - { 0x00005A80u, SCPH1001_func_00005A80 }, - { 0x00005AB0u, SCPH1001_func_00005AB0 }, - { 0x00005ABCu, SCPH1001_func_00005ABC }, - { 0x00005AF8u, SCPH1001_func_00005AF8 }, - { 0x00005B00u, SCPH1001_func_00005AF8_cont_BFC15600 }, - { 0x00005B14u, SCPH1001_func_00005AF8_cont_BFC15614 }, - { 0x00005B28u, SCPH1001_func_00005AF8_cont_BFC15628 }, - { 0x00005B34u, SCPH1001_func_00005B34 }, - { 0x00005B38u, SCPH1001_func_00005B34_cont_BFC15638 }, - { 0x00005B40u, SCPH1001_func_00005B34_cont_BFC15640 }, - { 0x00005B48u, SCPH1001_func_00005B34_cont_BFC15648 }, - { 0x00005B50u, SCPH1001_func_00005B50 }, - { 0x00005B54u, SCPH1001_func_00005B54 }, - { 0x00005B64u, SCPH1001_func_00005B64 }, - { 0x00005B88u, SCPH1001_func_00005B64_cont_BFC15688 }, - { 0x00005BA4u, SCPH1001_func_00005BA4 }, - { 0x00005BACu, SCPH1001_func_00005BA4_cont_BFC156AC }, - { 0x00005BB4u, SCPH1001_func_00005BA4_cont_BFC156B4 }, - { 0x00005BB8u, SCPH1001_func_00005BA4_cont_BFC156B8 }, - { 0x00005C24u, SCPH1001_func_00005C24 }, - { 0x00005C58u, SCPH1001_func_00005C58 }, - { 0x00005C98u, SCPH1001_func_00005C58_cont_BFC15798 }, - { 0x00005CA4u, SCPH1001_func_00005C58_cont_BFC157A4 }, - { 0x00005CCCu, SCPH1001_func_00005C58_cont_BFC157CC }, - { 0x00005CDCu, SCPH1001_func_00005C58_cont_BFC157DC }, - { 0x00005CF0u, SCPH1001_func_00005C58_cont_BFC157F0 }, - { 0x00005CFCu, SCPH1001_func_00005C58_cont_BFC157FC }, - { 0x00005D24u, SCPH1001_func_00005C58_cont_BFC15824 }, - { 0x00005D34u, SCPH1001_func_00005C58_cont_BFC15834 }, - { 0x00005D48u, SCPH1001_func_00005D48 }, - { 0x00005D7Cu, SCPH1001_func_00005D48_cont_BFC1587C }, - { 0x00005D84u, SCPH1001_func_00005D48_cont_BFC15884 }, - { 0x00005D8Cu, SCPH1001_func_00005D48_cont_BFC1588C }, - { 0x00005D94u, SCPH1001_func_00005D94 }, - { 0x00005D98u, SCPH1001_func_00005D98 }, - { 0x00005DA8u, SCPH1001_func_00005DA8 }, - { 0x00005DB8u, SCPH1001_func_00005DA8_cont_BFC158B8 }, - { 0x00005DD0u, SCPH1001_func_00005DD0 }, - { 0x00005DD8u, SCPH1001_func_00005DD8 }, - { 0x00005E10u, SCPH1001_func_00005DD8_cont_BFC15910 }, - { 0x00005E18u, SCPH1001_func_00005DD8_cont_BFC15918 }, - { 0x00005E30u, SCPH1001_func_00005E30 }, - { 0x00005E50u, SCPH1001_func_00005E50 }, - { 0x00005E60u, SCPH1001_func_00005E50_cont_BFC15960 }, - { 0x00005E64u, SCPH1001_func_00005E50_cont_BFC15964 }, - { 0x00005E80u, SCPH1001_func_00005E50_cont_BFC15980 }, - { 0x00005E88u, SCPH1001_func_00005E50_cont_BFC15988 }, - { 0x00005E90u, SCPH1001_func_00005E50_cont_BFC15990 }, - { 0x00005E98u, SCPH1001_func_00005E98 }, - { 0x00005EF4u, SCPH1001_func_00005EF4 }, - { 0x00005F04u, SCPH1001_func_00005F04 }, - { 0x00005F14u, SCPH1001_func_00005F04_cont_BFC15A14 }, - { 0x00005F18u, SCPH1001_func_00005F04_cont_BFC15A18 }, - { 0x00005F34u, SCPH1001_func_00005F04_cont_BFC15A34 }, - { 0x00005F3Cu, SCPH1001_func_00005F04_cont_BFC15A3C }, - { 0x00005F44u, SCPH1001_func_00005F04_cont_BFC15A44 }, - { 0x00005F4Cu, SCPH1001_func_00005F4C }, - { 0x00005FA8u, SCPH1001_func_00005FA8 }, - { 0x00005FB8u, SCPH1001_func_00005FB8 }, - { 0x00005FC8u, SCPH1001_func_00005FB8_cont_BFC15AC8 }, - { 0x00005FCCu, SCPH1001_func_00005FB8_cont_BFC15ACC }, - { 0x00005FE8u, SCPH1001_func_00005FB8_cont_BFC15AE8 }, - { 0x00005FF0u, SCPH1001_func_00005FF0 }, - { 0x0000605Cu, SCPH1001_func_0000605C }, - { 0x00006070u, SCPH1001_func_00006070 }, - { 0x0000607Cu, SCPH1001_func_00006070_cont_BFC15B7C }, - { 0x00006090u, SCPH1001_func_00006070_cont_BFC15B90 }, - { 0x0000609Cu, SCPH1001_func_0000609C }, - { 0x000060BCu, SCPH1001_func_0000609C_cont_BFC15BBC }, - { 0x000060C8u, SCPH1001_func_0000609C_cont_BFC15BC8 }, - { 0x000060D0u, SCPH1001_func_0000609C_cont_BFC15BD0 }, - { 0x000060DCu, SCPH1001_func_0000609C_cont_BFC15BDC }, - { 0x000060E8u, SCPH1001_func_0000609C_cont_BFC15BE8 }, - { 0x000060F4u, SCPH1001_func_0000609C_cont_BFC15BF4 }, - { 0x00006144u, SCPH1001_func_0000609C_cont_BFC15C44 }, - { 0x00006170u, SCPH1001_func_0000609C_cont_BFC15C70 }, - { 0x0000618Cu, SCPH1001_func_0000609C_cont_BFC15C8C }, - { 0x0000619Cu, SCPH1001_func_0000609C_cont_BFC15C9C }, - { 0x000061A4u, SCPH1001_func_0000609C_cont_BFC15CA4 }, - { 0x000061B0u, SCPH1001_func_0000609C_cont_BFC15CB0 }, - { 0x000061B4u, SCPH1001_func_0000609C_cont_BFC15CB4 }, - { 0x000061C4u, SCPH1001_func_000061C4 }, - { 0x000061E8u, SCPH1001_func_000061C4_cont_BFC15CE8 }, - { 0x000061F0u, SCPH1001_func_000061C4_cont_BFC15CF0 }, - { 0x00006204u, SCPH1001_func_000061C4_cont_BFC15D04 }, - { 0x0000620Cu, SCPH1001_func_000061C4_cont_BFC15D0C }, - { 0x00006210u, SCPH1001_func_000061C4_cont_BFC15D10 }, - { 0x00006218u, SCPH1001_func_000061C4_cont_BFC15D18 }, - { 0x0000624Cu, SCPH1001_func_000061C4_cont_BFC15D4C }, - { 0x00006270u, SCPH1001_func_000061C4_cont_BFC15D70 }, - { 0x00006280u, SCPH1001_func_000061C4_cont_BFC15D80 }, - { 0x00006298u, SCPH1001_func_000061C4_cont_BFC15D98 }, - { 0x000062A8u, SCPH1001_func_000061C4_cont_BFC15DA8 }, - { 0x000062BCu, SCPH1001_func_000061C4_cont_BFC15DBC }, - { 0x000062D0u, SCPH1001_func_000061C4_cont_BFC15DD0 }, - { 0x000062D8u, SCPH1001_func_000061C4_cont_BFC15DD8 }, - { 0x0000630Cu, SCPH1001_func_000061C4_cont_BFC15E0C }, - { 0x00006330u, SCPH1001_func_000061C4_cont_BFC15E30 }, - { 0x00006340u, SCPH1001_func_000061C4_cont_BFC15E40 }, - { 0x00006358u, SCPH1001_func_000061C4_cont_BFC15E58 }, - { 0x00006368u, SCPH1001_func_000061C4_cont_BFC15E68 }, - { 0x00006380u, SCPH1001_func_00006380 }, - { 0x00006390u, SCPH1001_func_00006390 }, - { 0x000063BCu, SCPH1001_func_000063BC }, - { 0x000063DCu, SCPH1001_func_000063BC_cont_BFC15EDC }, - { 0x000063F0u, SCPH1001_func_000063BC_cont_BFC15EF0 }, - { 0x000063F8u, SCPH1001_func_000063F8 }, - { 0x00006408u, SCPH1001_func_00006408 }, - { 0x00006418u, SCPH1001_func_00006408_cont_BFC15F18 }, - { 0x0000641Cu, SCPH1001_func_0000641C }, - { 0x00006430u, SCPH1001_func_0000641C_cont_BFC15F30 }, - { 0x00006458u, SCPH1001_func_0000641C_cont_BFC15F58 }, - { 0x00006474u, SCPH1001_func_0000641C_cont_BFC15F74 }, - { 0x000064E8u, SCPH1001_func_0000641C_cont_BFC15FE8 }, - { 0x000064ECu, SCPH1001_func_0000641C_cont_BFC15FEC }, - { 0x0000650Cu, SCPH1001_func_0000641C_cont_BFC1600C }, - { 0x00006514u, SCPH1001_func_0000641C_cont_BFC16014 }, - { 0x00006588u, SCPH1001_func_0000641C_cont_BFC16088 }, - { 0x0000658Cu, SCPH1001_func_0000641C_cont_BFC1608C }, - { 0x00006594u, SCPH1001_func_0000641C_cont_BFC16094 }, - { 0x0000659Cu, SCPH1001_func_0000659C }, - { 0x00006670u, SCPH1001_func_00006670 }, - { 0x0000668Cu, SCPH1001_func_00006670_cont_BFC1618C }, - { 0x000066A8u, SCPH1001_func_00006670_cont_BFC161A8 }, - { 0x000066C4u, SCPH1001_func_00006670_cont_BFC161C4 }, - { 0x000066D8u, SCPH1001_func_00006670_cont_BFC161D8 }, - { 0x000066E0u, SCPH1001_func_00006670_cont_BFC161E0 }, - { 0x000066E8u, SCPH1001_func_00006670_cont_BFC161E8 }, - { 0x000066ECu, SCPH1001_func_00006670_cont_BFC161EC }, - { 0x000066F4u, SCPH1001_func_00006670_cont_BFC161F4 }, - { 0x000066FCu, SCPH1001_func_00006670_cont_BFC161FC }, - { 0x00006704u, SCPH1001_func_00006670_cont_BFC16204 }, - { 0x00006708u, SCPH1001_func_00006670_cont_BFC16208 }, - { 0x00006710u, SCPH1001_func_00006670_cont_BFC16210 }, - { 0x00006718u, SCPH1001_func_00006670_cont_BFC16218 }, - { 0x00006720u, SCPH1001_func_00006670_cont_BFC16220 }, - { 0x00006724u, SCPH1001_func_00006670_cont_BFC16224 }, - { 0x0000672Cu, SCPH1001_func_00006670_cont_BFC1622C }, - { 0x00006734u, SCPH1001_func_00006670_cont_BFC16234 }, - { 0x0000673Cu, SCPH1001_func_00006670_cont_BFC1623C }, - { 0x00006740u, SCPH1001_func_00006670_cont_BFC16240 }, - { 0x00006748u, SCPH1001_func_00006670_cont_BFC16248 }, - { 0x00006750u, SCPH1001_func_00006670_cont_BFC16250 }, - { 0x00006758u, SCPH1001_func_00006670_cont_BFC16258 }, - { 0x0000675Cu, SCPH1001_func_00006670_cont_BFC1625C }, - { 0x00006764u, SCPH1001_func_00006670_cont_BFC16264 }, - { 0x0000676Cu, SCPH1001_func_00006670_cont_BFC1626C }, - { 0x00006774u, SCPH1001_func_00006670_cont_BFC16274 }, - { 0x00006778u, SCPH1001_func_00006670_cont_BFC16278 }, - { 0x00006780u, SCPH1001_func_00006670_cont_BFC16280 }, - { 0x0000678Cu, SCPH1001_func_00006670_cont_BFC1628C }, - { 0x00006790u, SCPH1001_func_00006670_cont_BFC16290 }, - { 0x000067B8u, SCPH1001_func_00006670_cont_BFC162B8 }, - { 0x000067CCu, SCPH1001_func_00006670_cont_BFC162CC }, - { 0x000067D4u, SCPH1001_func_00006670_cont_BFC162D4 }, - { 0x000067DCu, SCPH1001_func_00006670_cont_BFC162DC }, - { 0x000067E0u, SCPH1001_func_00006670_cont_BFC162E0 }, - { 0x000067E8u, SCPH1001_func_00006670_cont_BFC162E8 }, - { 0x000067F0u, SCPH1001_func_00006670_cont_BFC162F0 }, - { 0x000067F8u, SCPH1001_func_00006670_cont_BFC162F8 }, - { 0x000067FCu, SCPH1001_func_00006670_cont_BFC162FC }, - { 0x00006804u, SCPH1001_func_00006670_cont_BFC16304 }, - { 0x0000680Cu, SCPH1001_func_00006670_cont_BFC1630C }, - { 0x00006814u, SCPH1001_func_00006670_cont_BFC16314 }, - { 0x00006818u, SCPH1001_func_00006670_cont_BFC16318 }, - { 0x00006820u, SCPH1001_func_00006670_cont_BFC16320 }, - { 0x0000682Cu, SCPH1001_func_00006670_cont_BFC1632C }, - { 0x00006830u, SCPH1001_func_00006670_cont_BFC16330 }, - { 0x00006838u, SCPH1001_func_00006670_cont_BFC16338 }, - { 0x00006844u, SCPH1001_func_00006670_cont_BFC16344 }, - { 0x00006848u, SCPH1001_func_00006670_cont_BFC16348 }, - { 0x00006870u, SCPH1001_func_00006670_cont_BFC16370 }, - { 0x00006884u, SCPH1001_func_00006670_cont_BFC16384 }, - { 0x0000688Cu, SCPH1001_func_00006670_cont_BFC1638C }, - { 0x00006894u, SCPH1001_func_00006670_cont_BFC16394 }, - { 0x00006898u, SCPH1001_func_00006670_cont_BFC16398 }, - { 0x000068A0u, SCPH1001_func_00006670_cont_BFC163A0 }, - { 0x000068A8u, SCPH1001_func_00006670_cont_BFC163A8 }, - { 0x000068B0u, SCPH1001_func_00006670_cont_BFC163B0 }, - { 0x000068B4u, SCPH1001_func_00006670_cont_BFC163B4 }, - { 0x000068BCu, SCPH1001_func_00006670_cont_BFC163BC }, - { 0x000068C4u, SCPH1001_func_00006670_cont_BFC163C4 }, - { 0x000068CCu, SCPH1001_func_00006670_cont_BFC163CC }, - { 0x000068D0u, SCPH1001_func_00006670_cont_BFC163D0 }, - { 0x000068D8u, SCPH1001_func_00006670_cont_BFC163D8 }, - { 0x000068E4u, SCPH1001_func_00006670_cont_BFC163E4 }, - { 0x000068E8u, SCPH1001_func_00006670_cont_BFC163E8 }, - { 0x000068F0u, SCPH1001_func_00006670_cont_BFC163F0 }, - { 0x000068FCu, SCPH1001_func_00006670_cont_BFC163FC }, - { 0x00006900u, SCPH1001_func_00006670_cont_BFC16400 }, - { 0x00006928u, SCPH1001_func_00006670_cont_BFC16428 }, - { 0x0000693Cu, SCPH1001_func_00006670_cont_BFC1643C }, - { 0x00006944u, SCPH1001_func_00006670_cont_BFC16444 }, - { 0x0000694Cu, SCPH1001_func_00006670_cont_BFC1644C }, - { 0x00006950u, SCPH1001_func_00006670_cont_BFC16450 }, - { 0x00006958u, SCPH1001_func_00006670_cont_BFC16458 }, - { 0x00006960u, SCPH1001_func_00006670_cont_BFC16460 }, - { 0x00006968u, SCPH1001_func_00006670_cont_BFC16468 }, - { 0x0000696Cu, SCPH1001_func_00006670_cont_BFC1646C }, - { 0x00006974u, SCPH1001_func_00006670_cont_BFC16474 }, - { 0x0000697Cu, SCPH1001_func_00006670_cont_BFC1647C }, - { 0x00006984u, SCPH1001_func_00006670_cont_BFC16484 }, - { 0x00006988u, SCPH1001_func_00006670_cont_BFC16488 }, - { 0x00006990u, SCPH1001_func_00006670_cont_BFC16490 }, - { 0x0000699Cu, SCPH1001_func_00006670_cont_BFC1649C }, - { 0x000069A0u, SCPH1001_func_00006670_cont_BFC164A0 }, - { 0x000069A8u, SCPH1001_func_00006670_cont_BFC164A8 }, - { 0x000069B4u, SCPH1001_func_00006670_cont_BFC164B4 }, - { 0x000069B8u, SCPH1001_func_00006670_cont_BFC164B8 }, - { 0x000069E0u, SCPH1001_func_00006670_cont_BFC164E0 }, - { 0x000069F4u, SCPH1001_func_00006670_cont_BFC164F4 }, - { 0x000069FCu, SCPH1001_func_00006670_cont_BFC164FC }, - { 0x00006A00u, SCPH1001_func_00006670_cont_BFC16500 }, - { 0x00006A38u, SCPH1001_func_00006670_cont_BFC16538 }, - { 0x00006A70u, SCPH1001_func_00006A70 }, - { 0x00006A80u, SCPH1001_func_00006A80 }, - { 0x00006A90u, SCPH1001_func_00006A90 }, - { 0x00006AA0u, SCPH1001_func_00006AA0 }, - { 0x00006AB0u, SCPH1001_func_00006AB0 }, - { 0x00006AC0u, SCPH1001_func_00006AC0 }, - { 0x00006AD0u, SCPH1001_func_00006AD0 }, - { 0x00006AE0u, SCPH1001_func_00006AE0 }, - { 0x00006AF0u, SCPH1001_func_00006AF0 }, - { 0x00006B00u, SCPH1001_func_00006B00 }, - { 0x00006B10u, SCPH1001_func_00006B10 }, - { 0x00006B20u, SCPH1001_func_00006B20 }, - { 0x00006B30u, SCPH1001_func_00006B30 }, - { 0x00006B40u, SCPH1001_func_00006B40 }, - { 0x00006B50u, SCPH1001_func_00006B50 }, - { 0x00006B60u, SCPH1001_func_00006B60 }, - { 0x00006B70u, SCPH1001_func_00006B70 }, - { 0x00006B80u, SCPH1001_func_00006B80 }, - { 0x00006B90u, SCPH1001_func_00006B90 }, - { 0x00006BA0u, SCPH1001_func_00006BA0 }, - { 0x00006BB0u, SCPH1001_func_00006BB0 }, - { 0x00006BC0u, SCPH1001_func_00006BC0 }, - { 0x00006BD0u, SCPH1001_func_00006BD0 }, - { 0x00006BE0u, SCPH1001_func_00006BE0 }, - { 0x00006BF0u, SCPH1001_func_00006BF0 }, - { 0x00006C00u, SCPH1001_func_00006C00 }, - { 0x00006C10u, SCPH1001_func_00006C10 }, - { 0x00006C20u, SCPH1001_func_00006C20 }, - { 0x1FC00000u, SCPH1001_func_1FC00000 }, - { 0x1FC00150u, SCPH1001_func_1FC00000_cont_BFC00150 }, - { 0x1FC00180u, SCPH1001_func_1FC00180 }, - { 0x1FC00250u, SCPH1001_func_1FC00180_cont_BFC00250 }, - { 0x1FC00278u, SCPH1001_func_1FC00180_cont_BFC00278 }, - { 0x1FC002A0u, SCPH1001_func_1FC00180_cont_BFC002A0 }, - { 0x1FC00328u, SCPH1001_func_1FC00180_cont_BFC00328 }, - { 0x1FC003B8u, SCPH1001_func_1FC00180_cont_BFC003B8 }, - { 0x1FC003CCu, SCPH1001_func_1FC00180_cont_BFC003CC }, - { 0x1FC00420u, SCPH1001_func_1FC00420 }, - { 0x1FC00434u, SCPH1001_func_1FC00420_cont_BFC00434 }, - { 0x1FC0044Cu, SCPH1001_func_1FC00420_cont_BFC0044C }, - { 0x1FC00678u, SCPH1001_func_1FC00678 }, - { 0x1FC00688u, SCPH1001_func_1FC00678_cont_BFC00688 }, - { 0x1FC00698u, SCPH1001_func_1FC00678_cont_BFC00698 }, - { 0x1FC006A8u, SCPH1001_func_1FC006A8 }, - { 0x1FC006B8u, SCPH1001_func_1FC006A8_cont_BFC006B8 }, - { 0x1FC006C8u, SCPH1001_func_1FC006A8_cont_BFC006C8 }, - { 0x1FC006D8u, SCPH1001_func_1FC006D8 }, - { 0x1FC006F4u, SCPH1001_func_1FC006D8_cont_BFC006F4 }, - { 0x1FC006FCu, SCPH1001_func_1FC006D8_cont_BFC006FC }, - { 0x1FC00708u, SCPH1001_func_1FC006D8_cont_BFC00708 }, - { 0x1FC00714u, SCPH1001_func_1FC006D8_cont_BFC00714 }, - { 0x1FC0071Cu, SCPH1001_func_1FC006D8_cont_BFC0071C }, - { 0x1FC00728u, SCPH1001_func_1FC006D8_cont_BFC00728 }, - { 0x1FC00730u, SCPH1001_func_1FC006D8_cont_BFC00730 }, - { 0x1FC0073Cu, SCPH1001_func_1FC006D8_cont_BFC0073C }, - { 0x1FC00768u, SCPH1001_func_1FC006D8_cont_BFC00768 }, - { 0x1FC00778u, SCPH1001_func_1FC00778 }, - { 0x1FC007A0u, SCPH1001_func_1FC00778_cont_BFC007A0 }, - { 0x1FC007C0u, SCPH1001_func_1FC00778_cont_BFC007C0 }, - { 0x1FC007E0u, SCPH1001_func_1FC00778_cont_BFC007E0 }, - { 0x1FC00800u, SCPH1001_func_1FC00778_cont_BFC00800 }, - { 0x1FC00810u, SCPH1001_func_1FC00810 }, - { 0x1FC00890u, SCPH1001_func_1FC00810_cont_BFC00890 }, - { 0x1FC008A0u, SCPH1001_func_1FC008A0 }, - { 0x1FC008BCu, SCPH1001_func_1FC008A0_cont_BFC008BC }, - { 0x1FC008CCu, SCPH1001_func_1FC008A0_cont_BFC008CC }, - { 0x1FC008ECu, SCPH1001_func_1FC008A0_cont_BFC008EC }, - { 0x1FC00904u, SCPH1001_func_1FC008A0_cont_BFC00904 }, - { 0x1FC0091Cu, SCPH1001_func_1FC008A0_cont_BFC0091C }, - { 0x1FC00934u, SCPH1001_func_1FC008A0_cont_BFC00934 }, - { 0x1FC00944u, SCPH1001_func_1FC00944 }, - { 0x1FC00970u, SCPH1001_func_1FC00944_cont_BFC00970 }, - { 0x1FC00978u, SCPH1001_func_1FC00944_cont_BFC00978 }, - { 0x1FC00980u, SCPH1001_func_1FC00944_cont_BFC00980 }, - { 0x1FC00990u, SCPH1001_func_1FC00944_cont_BFC00990 }, - { 0x1FC00998u, SCPH1001_func_1FC00944_cont_BFC00998 }, - { 0x1FC009A0u, SCPH1001_func_1FC00944_cont_BFC009A0 }, - { 0x1FC009A4u, SCPH1001_func_1FC00944_cont_BFC009A4 }, - { 0x1FC009B4u, SCPH1001_func_1FC00944_cont_BFC009B4 }, - { 0x1FC009BCu, SCPH1001_func_1FC00944_cont_BFC009BC }, - { 0x1FC009CCu, SCPH1001_func_1FC00944_cont_BFC009CC }, - { 0x1FC009DCu, SCPH1001_func_1FC00944_cont_BFC009DC }, - { 0x1FC009E4u, SCPH1001_func_1FC00944_cont_BFC009E4 }, - { 0x1FC009F4u, SCPH1001_func_1FC00944_cont_BFC009F4 }, - { 0x1FC009FCu, SCPH1001_func_1FC00944_cont_BFC009FC }, - { 0x1FC00A04u, SCPH1001_func_1FC00944_cont_BFC00A04 }, - { 0x1FC00A30u, SCPH1001_func_1FC00944_cont_BFC00A30 }, - { 0x1FC00A38u, SCPH1001_func_1FC00944_cont_BFC00A38 }, - { 0x1FC00A40u, SCPH1001_func_1FC00944_cont_BFC00A40 }, - { 0x1FC00A64u, SCPH1001_func_1FC00944_cont_BFC00A64 }, - { 0x1FC00A6Cu, SCPH1001_func_1FC00944_cont_BFC00A6C }, - { 0x1FC00A74u, SCPH1001_func_1FC00944_cont_BFC00A74 }, - { 0x1FC00A7Cu, SCPH1001_func_1FC00944_cont_BFC00A7C }, - { 0x1FC00AA4u, SCPH1001_func_1FC00944_cont_BFC00AA4 }, - { 0x1FC00AACu, SCPH1001_func_1FC00944_cont_BFC00AAC }, - { 0x1FC00AB4u, SCPH1001_func_1FC00944_cont_BFC00AB4 }, - { 0x1FC00ADCu, SCPH1001_func_1FC00944_cont_BFC00ADC }, - { 0x1FC00AE0u, SCPH1001_func_1FC00944_cont_BFC00AE0 }, - { 0x1FC00AE8u, SCPH1001_func_1FC00944_cont_BFC00AE8 }, - { 0x1FC00AECu, SCPH1001_func_1FC00944_cont_BFC00AEC }, - { 0x1FC00AF4u, SCPH1001_func_1FC00944_cont_BFC00AF4 }, - { 0x1FC00B04u, SCPH1001_func_1FC00944_cont_BFC00B04 }, - { 0x1FC00B0Cu, SCPH1001_func_1FC00944_cont_BFC00B0C }, - { 0x1FC00B20u, SCPH1001_func_1FC00944_cont_BFC00B20 }, - { 0x1FC00B48u, SCPH1001_func_1FC00944_cont_BFC00B48 }, - { 0x1FC00B64u, SCPH1001_func_1FC00944_cont_BFC00B64 }, - { 0x1FC00B68u, SCPH1001_func_1FC00944_cont_BFC00B68 }, - { 0x1FC00B7Cu, SCPH1001_func_1FC00B7C }, - { 0x1FC00BACu, SCPH1001_func_1FC00B7C_cont_BFC00BAC }, - { 0x1FC00BBCu, SCPH1001_func_1FC00B7C_cont_BFC00BBC }, - { 0x1FC00BC4u, SCPH1001_func_1FC00B7C_cont_BFC00BC4 }, - { 0x1FC00BD0u, SCPH1001_func_1FC00B7C_cont_BFC00BD0 }, - { 0x1FC00BD8u, SCPH1001_func_1FC00B7C_cont_BFC00BD8 }, - { 0x1FC00C04u, SCPH1001_func_1FC00B7C_cont_BFC00C04 }, - { 0x1FC00C0Cu, SCPH1001_func_1FC00B7C_cont_BFC00C0C }, - { 0x1FC00C14u, SCPH1001_func_1FC00B7C_cont_BFC00C14 }, - { 0x1FC00C38u, SCPH1001_func_1FC00B7C_cont_BFC00C38 }, - { 0x1FC00C40u, SCPH1001_func_1FC00B7C_cont_BFC00C40 }, - { 0x1FC00C48u, SCPH1001_func_1FC00B7C_cont_BFC00C48 }, - { 0x1FC00C50u, SCPH1001_func_1FC00B7C_cont_BFC00C50 }, - { 0x1FC00C74u, SCPH1001_func_1FC00B7C_cont_BFC00C74 }, - { 0x1FC00C7Cu, SCPH1001_func_1FC00B7C_cont_BFC00C7C }, - { 0x1FC00C84u, SCPH1001_func_1FC00B7C_cont_BFC00C84 }, - { 0x1FC00CA8u, SCPH1001_func_1FC00B7C_cont_BFC00CA8 }, - { 0x1FC00CB0u, SCPH1001_func_1FC00B7C_cont_BFC00CB0 }, - { 0x1FC00CC0u, SCPH1001_func_1FC00B7C_cont_BFC00CC0 }, - { 0x1FC00CE4u, SCPH1001_func_1FC00B7C_cont_BFC00CE4 }, - { 0x1FC00D04u, SCPH1001_func_1FC00B7C_cont_BFC00D04 }, - { 0x1FC00D14u, SCPH1001_func_1FC00B7C_cont_BFC00D14 }, - { 0x1FC00D28u, SCPH1001_func_1FC00B7C_cont_BFC00D28 }, - { 0x1FC00D38u, SCPH1001_func_1FC00B7C_cont_BFC00D38 }, - { 0x1FC00D48u, SCPH1001_func_1FC00B7C_cont_BFC00D48 }, - { 0x1FC00D50u, SCPH1001_func_1FC00B7C_cont_BFC00D50 }, - { 0x1FC00D60u, SCPH1001_func_1FC00B7C_cont_BFC00D60 }, - { 0x1FC00D68u, SCPH1001_func_1FC00B7C_cont_BFC00D68 }, - { 0x1FC00D78u, SCPH1001_func_1FC00B7C_cont_BFC00D78 }, - { 0x1FC00D88u, SCPH1001_func_1FC00B7C_cont_BFC00D88 }, - { 0x1FC00D8Cu, SCPH1001_func_1FC00B7C_cont_BFC00D8C }, - { 0x1FC00DA0u, SCPH1001_func_1FC00DA0 }, - { 0x1FC00DB8u, SCPH1001_func_1FC00DA0_cont_BFC00DB8 }, - { 0x1FC00DC0u, SCPH1001_func_1FC00DA0_cont_BFC00DC0 }, - { 0x1FC00E1Cu, SCPH1001_func_1FC00DA0_cont_BFC00E1C }, - { 0x1FC00E2Cu, SCPH1001_func_1FC00DA0_cont_BFC00E2C }, - { 0x1FC00E58u, SCPH1001_func_1FC00DA0_cont_BFC00E58 }, - { 0x1FC00E5Cu, SCPH1001_func_1FC00DA0_cont_BFC00E5C }, - { 0x1FC00E64u, SCPH1001_func_1FC00DA0_cont_BFC00E64 }, - { 0x1FC00E6Cu, SCPH1001_func_1FC00DA0_cont_BFC00E6C }, - { 0x1FC00E90u, SCPH1001_func_1FC00DA0_cont_BFC00E90 }, - { 0x1FC00E94u, SCPH1001_func_1FC00DA0_cont_BFC00E94 }, - { 0x1FC00EA8u, SCPH1001_func_1FC00DA0_cont_BFC00EA8 }, - { 0x1FC00EB8u, SCPH1001_func_1FC00DA0_cont_BFC00EB8 }, - { 0x1FC00EC0u, SCPH1001_func_1FC00DA0_cont_BFC00EC0 }, - { 0x1FC00EC8u, SCPH1001_func_1FC00DA0_cont_BFC00EC8 }, - { 0x1FC00ED0u, SCPH1001_func_1FC00DA0_cont_BFC00ED0 }, - { 0x1FC00EE0u, SCPH1001_func_1FC00DA0_cont_BFC00EE0 }, - { 0x1FC00EE4u, SCPH1001_func_1FC00DA0_cont_BFC00EE4 }, - { 0x1FC00EECu, SCPH1001_func_1FC00DA0_cont_BFC00EEC }, - { 0x1FC00EF4u, SCPH1001_func_1FC00DA0_cont_BFC00EF4 }, - { 0x1FC00F04u, SCPH1001_func_1FC00DA0_cont_BFC00F04 }, - { 0x1FC00F10u, SCPH1001_func_1FC00DA0_cont_BFC00F10 }, - { 0x1FC00F14u, SCPH1001_func_1FC00DA0_cont_BFC00F14 }, - { 0x1FC00F1Cu, SCPH1001_func_1FC00DA0_cont_BFC00F1C }, - { 0x1FC00F34u, SCPH1001_func_1FC00DA0_cont_BFC00F34 }, - { 0x1FC00F38u, SCPH1001_func_1FC00DA0_cont_BFC00F38 }, - { 0x1FC00F58u, SCPH1001_func_1FC00DA0_cont_BFC00F58 }, - { 0x1FC00F70u, SCPH1001_func_1FC00DA0_cont_BFC00F70 }, - { 0x1FC00F74u, SCPH1001_func_1FC00DA0_cont_BFC00F74 }, - { 0x1FC00F7Cu, SCPH1001_func_1FC00DA0_cont_BFC00F7C }, - { 0x1FC00F84u, SCPH1001_func_1FC00DA0_cont_BFC00F84 }, - { 0x1FC00F8Cu, SCPH1001_func_1FC00DA0_cont_BFC00F8C }, - { 0x1FC00F94u, SCPH1001_func_1FC00DA0_cont_BFC00F94 }, - { 0x1FC00F98u, SCPH1001_func_1FC00DA0_cont_BFC00F98 }, - { 0x1FC00F9Cu, SCPH1001_func_1FC00DA0_cont_BFC00F9C }, - { 0x1FC00FBCu, SCPH1001_func_1FC00DA0_cont_BFC00FBC }, - { 0x1FC00FD4u, SCPH1001_func_1FC00DA0_cont_BFC00FD4 }, - { 0x1FC00FE0u, SCPH1001_func_1FC00DA0_cont_BFC00FE0 }, - { 0x1FC00FE8u, SCPH1001_func_1FC00DA0_cont_BFC00FE8 }, - { 0x1FC00FF0u, SCPH1001_func_1FC00DA0_cont_BFC00FF0 }, - { 0x1FC00FF8u, SCPH1001_func_1FC00DA0_cont_BFC00FF8 }, - { 0x1FC01014u, SCPH1001_func_1FC00DA0_cont_BFC01014 }, - { 0x1FC01018u, SCPH1001_func_1FC00DA0_cont_BFC01018 }, - { 0x1FC01028u, SCPH1001_func_1FC00DA0_cont_BFC01028 }, - { 0x1FC01034u, SCPH1001_func_1FC00DA0_cont_BFC01034 }, - { 0x1FC01040u, SCPH1001_func_1FC00DA0_cont_BFC01040 }, - { 0x1FC0104Cu, SCPH1001_func_1FC00DA0_cont_BFC0104C }, - { 0x1FC01054u, SCPH1001_func_1FC00DA0_cont_BFC01054 }, - { 0x1FC01058u, SCPH1001_func_1FC00DA0_cont_BFC01058 }, - { 0x1FC01060u, SCPH1001_func_1FC00DA0_cont_BFC01060 }, - { 0x1FC0106Cu, SCPH1001_func_1FC00DA0_cont_BFC0106C }, - { 0x1FC01078u, SCPH1001_func_1FC00DA0_cont_BFC01078 }, - { 0x1FC0108Cu, SCPH1001_func_1FC00DA0_cont_BFC0108C }, - { 0x1FC01090u, SCPH1001_func_1FC00DA0_cont_BFC01090 }, - { 0x1FC01098u, SCPH1001_func_1FC00DA0_cont_BFC01098 }, - { 0x1FC010ACu, SCPH1001_func_1FC00DA0_cont_BFC010AC }, - { 0x1FC010B0u, SCPH1001_func_1FC00DA0_cont_BFC010B0 }, - { 0x1FC010C0u, SCPH1001_func_1FC00DA0_cont_BFC010C0 }, - { 0x1FC010C8u, SCPH1001_func_1FC00DA0_cont_BFC010C8 }, - { 0x1FC010D8u, SCPH1001_func_1FC00DA0_cont_BFC010D8 }, - { 0x1FC010E4u, SCPH1001_func_1FC00DA0_cont_BFC010E4 }, - { 0x1FC010F0u, SCPH1001_func_1FC00DA0_cont_BFC010F0 }, - { 0x1FC010FCu, SCPH1001_func_1FC00DA0_cont_BFC010FC }, - { 0x1FC01104u, SCPH1001_func_1FC00DA0_cont_BFC01104 }, - { 0x1FC0110Cu, SCPH1001_func_1FC00DA0_cont_BFC0110C }, - { 0x1FC01124u, SCPH1001_func_1FC00DA0_cont_BFC01124 }, - { 0x1FC01134u, SCPH1001_func_1FC00DA0_cont_BFC01134 }, - { 0x1FC0113Cu, SCPH1001_func_1FC00DA0_cont_BFC0113C }, - { 0x1FC01144u, SCPH1001_func_1FC00DA0_cont_BFC01144 }, - { 0x1FC01154u, SCPH1001_func_1FC00DA0_cont_BFC01154 }, - { 0x1FC0117Cu, SCPH1001_func_1FC00DA0_cont_BFC0117C }, - { 0x1FC0118Cu, SCPH1001_func_1FC00DA0_cont_BFC0118C }, - { 0x1FC01194u, SCPH1001_func_1FC00DA0_cont_BFC01194 }, - { 0x1FC0119Cu, SCPH1001_func_1FC00DA0_cont_BFC0119C }, - { 0x1FC011A4u, SCPH1001_func_1FC00DA0_cont_BFC011A4 }, - { 0x1FC011CCu, SCPH1001_func_1FC00DA0_cont_BFC011CC }, - { 0x1FC011D0u, SCPH1001_func_1FC00DA0_cont_BFC011D0 }, - { 0x1FC011E4u, SCPH1001_func_1FC00DA0_cont_BFC011E4 }, - { 0x1FC011F0u, SCPH1001_func_1FC00DA0_cont_BFC011F0 }, - { 0x1FC011FCu, SCPH1001_func_1FC00DA0_cont_BFC011FC }, - { 0x1FC01208u, SCPH1001_func_1FC00DA0_cont_BFC01208 }, - { 0x1FC01210u, SCPH1001_func_1FC00DA0_cont_BFC01210 }, - { 0x1FC01218u, SCPH1001_func_1FC00DA0_cont_BFC01218 }, - { 0x1FC01228u, SCPH1001_func_1FC00DA0_cont_BFC01228 }, - { 0x1FC01238u, SCPH1001_func_1FC00DA0_cont_BFC01238 }, - { 0x1FC01244u, SCPH1001_func_1FC00DA0_cont_BFC01244 }, - { 0x1FC01250u, SCPH1001_func_1FC00DA0_cont_BFC01250 }, - { 0x1FC0125Cu, SCPH1001_func_1FC00DA0_cont_BFC0125C }, - { 0x1FC01264u, SCPH1001_func_1FC00DA0_cont_BFC01264 }, - { 0x1FC01268u, SCPH1001_func_1FC00DA0_cont_BFC01268 }, - { 0x1FC01274u, SCPH1001_func_1FC00DA0_cont_BFC01274 }, - { 0x1FC0127Cu, SCPH1001_func_1FC00DA0_cont_BFC0127C }, - { 0x1FC01280u, SCPH1001_func_1FC00DA0_cont_BFC01280 }, - { 0x1FC01288u, SCPH1001_func_1FC00DA0_cont_BFC01288 }, - { 0x1FC01290u, SCPH1001_func_1FC00DA0_cont_BFC01290 }, - { 0x1FC01298u, SCPH1001_func_1FC00DA0_cont_BFC01298 }, - { 0x1FC012A0u, SCPH1001_func_1FC00DA0_cont_BFC012A0 }, - { 0x1FC012A8u, SCPH1001_func_1FC00DA0_cont_BFC012A8 }, - { 0x1FC012CCu, SCPH1001_func_1FC00DA0_cont_BFC012CC }, - { 0x1FC012D0u, SCPH1001_func_1FC00DA0_cont_BFC012D0 }, - { 0x1FC012D8u, SCPH1001_func_1FC00DA0_cont_BFC012D8 }, - { 0x1FC012E8u, SCPH1001_func_1FC00DA0_cont_BFC012E8 }, - { 0x1FC012F4u, SCPH1001_func_1FC00DA0_cont_BFC012F4 }, - { 0x1FC01304u, SCPH1001_func_1FC00DA0_cont_BFC01304 }, - { 0x1FC01310u, SCPH1001_func_1FC00DA0_cont_BFC01310 }, - { 0x1FC01314u, SCPH1001_func_1FC00DA0_cont_BFC01314 }, - { 0x1FC01318u, SCPH1001_func_1FC00DA0_cont_BFC01318 }, - { 0x1FC01328u, SCPH1001_func_1FC00DA0_cont_BFC01328 }, - { 0x1FC01338u, SCPH1001_func_1FC00DA0_cont_BFC01338 }, - { 0x1FC01344u, SCPH1001_func_1FC00DA0_cont_BFC01344 }, - { 0x1FC01354u, SCPH1001_func_1FC00DA0_cont_BFC01354 }, - { 0x1FC0136Cu, SCPH1001_func_1FC00DA0_cont_BFC0136C }, - { 0x1FC01374u, SCPH1001_func_1FC00DA0_cont_BFC01374 }, - { 0x1FC01378u, SCPH1001_func_1FC00DA0_cont_BFC01378 }, - { 0x1FC01380u, SCPH1001_func_1FC00DA0_cont_BFC01380 }, - { 0x1FC0138Cu, SCPH1001_func_1FC00DA0_cont_BFC0138C }, - { 0x1FC01394u, SCPH1001_func_1FC00DA0_cont_BFC01394 }, - { 0x1FC013A8u, SCPH1001_func_1FC00DA0_cont_BFC013A8 }, - { 0x1FC013B0u, SCPH1001_func_1FC00DA0_cont_BFC013B0 }, - { 0x1FC013DCu, SCPH1001_func_1FC00DA0_cont_BFC013DC }, - { 0x1FC013E4u, SCPH1001_func_1FC00DA0_cont_BFC013E4 }, - { 0x1FC013ECu, SCPH1001_func_1FC00DA0_cont_BFC013EC }, - { 0x1FC01410u, SCPH1001_func_1FC00DA0_cont_BFC01410 }, - { 0x1FC0141Cu, SCPH1001_func_1FC00DA0_cont_BFC0141C }, - { 0x1FC01424u, SCPH1001_func_1FC00DA0_cont_BFC01424 }, - { 0x1FC0144Cu, SCPH1001_func_1FC00DA0_cont_BFC0144C }, - { 0x1FC01470u, SCPH1001_func_1FC00DA0_cont_BFC01470 }, - { 0x1FC0147Cu, SCPH1001_func_1FC00DA0_cont_BFC0147C }, - { 0x1FC01490u, SCPH1001_func_1FC00DA0_cont_BFC01490 }, - { 0x1FC01498u, SCPH1001_func_1FC00DA0_cont_BFC01498 }, - { 0x1FC014C4u, SCPH1001_func_1FC00DA0_cont_BFC014C4 }, - { 0x1FC014C8u, SCPH1001_func_1FC00DA0_cont_BFC014C8 }, - { 0x1FC014DCu, SCPH1001_func_1FC00DA0_cont_BFC014DC }, - { 0x1FC014E4u, SCPH1001_func_1FC00DA0_cont_BFC014E4 }, - { 0x1FC01514u, SCPH1001_func_1FC00DA0_cont_BFC01514 }, - { 0x1FC01518u, SCPH1001_func_1FC00DA0_cont_BFC01518 }, - { 0x1FC01524u, SCPH1001_func_1FC00DA0_cont_BFC01524 }, - { 0x1FC01530u, SCPH1001_func_1FC00DA0_cont_BFC01530 }, - { 0x1FC01558u, SCPH1001_func_1FC00DA0_cont_BFC01558 }, - { 0x1FC01564u, SCPH1001_func_1FC00DA0_cont_BFC01564 }, - { 0x1FC0156Cu, SCPH1001_func_1FC00DA0_cont_BFC0156C }, - { 0x1FC01594u, SCPH1001_func_1FC00DA0_cont_BFC01594 }, - { 0x1FC01598u, SCPH1001_func_1FC00DA0_cont_BFC01598 }, - { 0x1FC015A0u, SCPH1001_func_1FC00DA0_cont_BFC015A0 }, - { 0x1FC015B4u, SCPH1001_func_1FC00DA0_cont_BFC015B4 }, - { 0x1FC015BCu, SCPH1001_func_1FC00DA0_cont_BFC015BC }, - { 0x1FC015E8u, SCPH1001_func_1FC00DA0_cont_BFC015E8 }, - { 0x1FC015ECu, SCPH1001_func_1FC00DA0_cont_BFC015EC }, - { 0x1FC015FCu, SCPH1001_func_1FC00DA0_cont_BFC015FC }, - { 0x1FC01604u, SCPH1001_func_1FC00DA0_cont_BFC01604 }, - { 0x1FC01608u, SCPH1001_func_1FC00DA0_cont_BFC01608 }, - { 0x1FC0160Cu, SCPH1001_func_1FC00DA0_cont_BFC0160C }, - { 0x1FC01620u, SCPH1001_func_1FC00DA0_cont_BFC01620 }, - { 0x1FC01624u, SCPH1001_func_1FC00DA0_cont_BFC01624 }, - { 0x1FC0164Cu, SCPH1001_func_1FC00DA0_cont_BFC0164C }, - { 0x1FC01654u, SCPH1001_func_1FC00DA0_cont_BFC01654 }, - { 0x1FC0165Cu, SCPH1001_func_1FC00DA0_cont_BFC0165C }, - { 0x1FC01664u, SCPH1001_func_1FC00DA0_cont_BFC01664 }, - { 0x1FC0166Cu, SCPH1001_func_1FC00DA0_cont_BFC0166C }, - { 0x1FC01674u, SCPH1001_func_1FC00DA0_cont_BFC01674 }, - { 0x1FC0167Cu, SCPH1001_func_1FC00DA0_cont_BFC0167C }, - { 0x1FC01684u, SCPH1001_func_1FC00DA0_cont_BFC01684 }, - { 0x1FC0168Cu, SCPH1001_func_1FC00DA0_cont_BFC0168C }, - { 0x1FC01694u, SCPH1001_func_1FC00DA0_cont_BFC01694 }, - { 0x1FC0169Cu, SCPH1001_func_1FC00DA0_cont_BFC0169C }, - { 0x1FC016A4u, SCPH1001_func_1FC00DA0_cont_BFC016A4 }, - { 0x1FC016ACu, SCPH1001_func_1FC00DA0_cont_BFC016AC }, - { 0x1FC016B4u, SCPH1001_func_1FC00DA0_cont_BFC016B4 }, - { 0x1FC016B8u, SCPH1001_func_1FC00DA0_cont_BFC016B8 }, - { 0x1FC016C0u, SCPH1001_func_1FC00DA0_cont_BFC016C0 }, - { 0x1FC016F0u, SCPH1001_func_1FC00DA0_cont_BFC016F0 }, - { 0x1FC016F8u, SCPH1001_func_1FC00DA0_cont_BFC016F8 }, - { 0x1FC01700u, SCPH1001_func_1FC00DA0_cont_BFC01700 }, - { 0x1FC01708u, SCPH1001_func_1FC00DA0_cont_BFC01708 }, - { 0x1FC01710u, SCPH1001_func_1FC00DA0_cont_BFC01710 }, - { 0x1FC01718u, SCPH1001_func_1FC00DA0_cont_BFC01718 }, - { 0x1FC01720u, SCPH1001_func_1FC00DA0_cont_BFC01720 }, - { 0x1FC0172Cu, SCPH1001_func_1FC00DA0_cont_BFC0172C }, - { 0x1FC01734u, SCPH1001_func_1FC00DA0_cont_BFC01734 }, - { 0x1FC01738u, SCPH1001_func_1FC00DA0_cont_BFC01738 }, - { 0x1FC01740u, SCPH1001_func_1FC00DA0_cont_BFC01740 }, - { 0x1FC01748u, SCPH1001_func_1FC00DA0_cont_BFC01748 }, - { 0x1FC01750u, SCPH1001_func_1FC00DA0_cont_BFC01750 }, - { 0x1FC01758u, SCPH1001_func_1FC00DA0_cont_BFC01758 }, - { 0x1FC01760u, SCPH1001_func_1FC00DA0_cont_BFC01760 }, - { 0x1FC01768u, SCPH1001_func_1FC00DA0_cont_BFC01768 }, - { 0x1FC01774u, SCPH1001_func_1FC00DA0_cont_BFC01774 }, - { 0x1FC0177Cu, SCPH1001_func_1FC00DA0_cont_BFC0177C }, - { 0x1FC01788u, SCPH1001_func_1FC00DA0_cont_BFC01788 }, - { 0x1FC01790u, SCPH1001_func_1FC00DA0_cont_BFC01790 }, - { 0x1FC01798u, SCPH1001_func_1FC00DA0_cont_BFC01798 }, - { 0x1FC017A0u, SCPH1001_func_1FC00DA0_cont_BFC017A0 }, - { 0x1FC017ACu, SCPH1001_func_1FC00DA0_cont_BFC017AC }, - { 0x1FC017B4u, SCPH1001_func_1FC00DA0_cont_BFC017B4 }, - { 0x1FC017B8u, SCPH1001_func_1FC00DA0_cont_BFC017B8 }, - { 0x1FC017C0u, SCPH1001_func_1FC00DA0_cont_BFC017C0 }, - { 0x1FC017C8u, SCPH1001_func_1FC00DA0_cont_BFC017C8 }, - { 0x1FC017D0u, SCPH1001_func_1FC00DA0_cont_BFC017D0 }, - { 0x1FC017D8u, SCPH1001_func_1FC00DA0_cont_BFC017D8 }, - { 0x1FC017E0u, SCPH1001_func_1FC00DA0_cont_BFC017E0 }, - { 0x1FC017E8u, SCPH1001_func_1FC00DA0_cont_BFC017E8 }, - { 0x1FC017F0u, SCPH1001_func_1FC00DA0_cont_BFC017F0 }, - { 0x1FC017F8u, SCPH1001_func_1FC00DA0_cont_BFC017F8 }, - { 0x1FC01804u, SCPH1001_func_1FC00DA0_cont_BFC01804 }, - { 0x1FC0180Cu, SCPH1001_func_1FC00DA0_cont_BFC0180C }, - { 0x1FC01818u, SCPH1001_func_1FC00DA0_cont_BFC01818 }, - { 0x1FC01820u, SCPH1001_func_1FC00DA0_cont_BFC01820 }, - { 0x1FC01828u, SCPH1001_func_1FC00DA0_cont_BFC01828 }, - { 0x1FC01830u, SCPH1001_func_1FC00DA0_cont_BFC01830 }, - { 0x1FC0183Cu, SCPH1001_func_1FC00DA0_cont_BFC0183C }, - { 0x1FC01844u, SCPH1001_func_1FC00DA0_cont_BFC01844 }, - { 0x1FC01850u, SCPH1001_func_1FC00DA0_cont_BFC01850 }, - { 0x1FC01858u, SCPH1001_func_1FC00DA0_cont_BFC01858 }, - { 0x1FC01860u, SCPH1001_func_1FC00DA0_cont_BFC01860 }, - { 0x1FC01868u, SCPH1001_func_1FC00DA0_cont_BFC01868 }, - { 0x1FC01870u, SCPH1001_func_1FC00DA0_cont_BFC01870 }, - { 0x1FC01878u, SCPH1001_func_1FC00DA0_cont_BFC01878 }, - { 0x1FC01884u, SCPH1001_func_1FC00DA0_cont_BFC01884 }, - { 0x1FC0188Cu, SCPH1001_func_1FC00DA0_cont_BFC0188C }, - { 0x1FC01898u, SCPH1001_func_1FC00DA0_cont_BFC01898 }, - { 0x1FC018A0u, SCPH1001_func_1FC00DA0_cont_BFC018A0 }, - { 0x1FC018A8u, SCPH1001_func_1FC00DA0_cont_BFC018A8 }, - { 0x1FC018B0u, SCPH1001_func_1FC00DA0_cont_BFC018B0 }, - { 0x1FC018BCu, SCPH1001_func_1FC00DA0_cont_BFC018BC }, - { 0x1FC018C4u, SCPH1001_func_1FC00DA0_cont_BFC018C4 }, - { 0x1FC018CCu, SCPH1001_func_1FC00DA0_cont_BFC018CC }, - { 0x1FC018D0u, SCPH1001_func_1FC00DA0_cont_BFC018D0 }, - { 0x1FC018E0u, SCPH1001_func_1FC018E0 }, - { 0x1FC01910u, SCPH1001_func_1FC018E0_cont_BFC01910 }, - { 0x1FC01920u, SCPH1001_func_1FC01920 }, - { 0x1FC0193Cu, SCPH1001_func_1FC0193C }, - { 0x1FC01960u, SCPH1001_func_1FC0193C_cont_BFC01960 }, - { 0x1FC01988u, SCPH1001_func_1FC0193C_cont_BFC01988 }, - { 0x1FC019B0u, SCPH1001_func_1FC0193C_cont_BFC019B0 }, - { 0x1FC01A38u, SCPH1001_func_1FC0193C_cont_BFC01A38 }, - { 0x1FC01A60u, SCPH1001_func_1FC01A60 }, - { 0x1FC01A78u, SCPH1001_func_1FC01A60_cont_BFC01A78 }, - { 0x1FC01A90u, SCPH1001_func_1FC01A90 }, - { 0x1FC01A98u, SCPH1001_func_1FC01A90_cont_BFC01A98 }, - { 0x1FC01AA0u, SCPH1001_func_1FC01A90_cont_BFC01AA0 }, - { 0x1FC01AA8u, SCPH1001_func_1FC01A90_cont_BFC01AA8 }, - { 0x1FC01AC0u, SCPH1001_func_1FC01A90_cont_BFC01AC0 }, - { 0x1FC01ACCu, SCPH1001_func_1FC01ACC }, - { 0x1FC01AD4u, SCPH1001_func_1FC01ACC_cont_BFC01AD4 }, - { 0x1FC01ADCu, SCPH1001_func_1FC01ACC_cont_BFC01ADC }, - { 0x1FC01AE4u, SCPH1001_func_1FC01ACC_cont_BFC01AE4 }, - { 0x1FC01AECu, SCPH1001_func_1FC01ACC_cont_BFC01AEC }, - { 0x1FC01AFCu, SCPH1001_func_1FC01ACC_cont_BFC01AFC }, - { 0x1FC01B08u, SCPH1001_func_1FC01B08 }, - { 0x1FC01B10u, SCPH1001_func_1FC01B08_cont_BFC01B10 }, - { 0x1FC01B18u, SCPH1001_func_1FC01B08_cont_BFC01B18 }, - { 0x1FC01B24u, SCPH1001_func_1FC01B08_cont_BFC01B24 }, - { 0x1FC01B2Cu, SCPH1001_func_1FC01B08_cont_BFC01B2C }, - { 0x1FC01B40u, SCPH1001_func_1FC01B08_cont_BFC01B40 }, - { 0x1FC01B4Cu, SCPH1001_func_1FC01B08_cont_BFC01B4C }, - { 0x1FC01B54u, SCPH1001_func_1FC01B08_cont_BFC01B54 }, - { 0x1FC01B5Cu, SCPH1001_func_1FC01B08_cont_BFC01B5C }, - { 0x1FC01B6Cu, SCPH1001_func_1FC01B08_cont_BFC01B6C }, - { 0x1FC01B80u, SCPH1001_func_1FC01B80 }, - { 0x1FC01B88u, SCPH1001_func_1FC01B80_cont_BFC01B88 }, - { 0x1FC01BA0u, SCPH1001_func_1FC01B80_cont_BFC01BA0 }, - { 0x1FC01BACu, SCPH1001_func_1FC01B80_cont_BFC01BAC }, - { 0x1FC01BB0u, SCPH1001_func_1FC01B80_cont_BFC01BB0 }, - { 0x1FC01BB4u, SCPH1001_func_1FC01B80_cont_BFC01BB4 }, - { 0x1FC01BE4u, SCPH1001_func_1FC01B80_cont_BFC01BE4 }, - { 0x1FC01BECu, SCPH1001_func_1FC01B80_cont_BFC01BEC }, - { 0x1FC01BF0u, SCPH1001_func_1FC01B80_cont_BFC01BF0 }, - { 0x1FC01BF8u, SCPH1001_func_1FC01B80_cont_BFC01BF8 }, - { 0x1FC01C00u, SCPH1001_func_1FC01B80_cont_BFC01C00 }, - { 0x1FC01C08u, SCPH1001_func_1FC01B80_cont_BFC01C08 }, - { 0x1FC01C28u, SCPH1001_func_1FC01B80_cont_BFC01C28 }, - { 0x1FC01C34u, SCPH1001_func_1FC01B80_cont_BFC01C34 }, - { 0x1FC01C4Cu, SCPH1001_func_1FC01B80_cont_BFC01C4C }, - { 0x1FC01C50u, SCPH1001_func_1FC01B80_cont_BFC01C50 }, - { 0x1FC01C6Cu, SCPH1001_func_1FC01B80_cont_BFC01C6C }, - { 0x1FC01C70u, SCPH1001_func_1FC01B80_cont_BFC01C70 }, - { 0x1FC01C8Cu, SCPH1001_func_1FC01C8C }, - { 0x1FC01CACu, SCPH1001_func_1FC01C8C_cont_BFC01CAC }, - { 0x1FC01CB4u, SCPH1001_func_1FC01C8C_cont_BFC01CB4 }, - { 0x1FC01CD0u, SCPH1001_func_1FC01C8C_cont_BFC01CD0 }, - { 0x1FC01CE8u, SCPH1001_func_1FC01C8C_cont_BFC01CE8 }, - { 0x1FC01D00u, SCPH1001_func_1FC01C8C_cont_BFC01D00 }, - { 0x1FC01D0Cu, SCPH1001_func_1FC01C8C_cont_BFC01D0C }, - { 0x1FC01D1Cu, SCPH1001_func_1FC01C8C_cont_BFC01D1C }, - { 0x1FC01D24u, SCPH1001_func_1FC01C8C_cont_BFC01D24 }, - { 0x1FC01D40u, SCPH1001_func_1FC01C8C_cont_BFC01D40 }, - { 0x1FC01D50u, SCPH1001_func_1FC01C8C_cont_BFC01D50 }, - { 0x1FC01D54u, SCPH1001_func_1FC01C8C_cont_BFC01D54 }, - { 0x1FC01D70u, SCPH1001_func_1FC01C8C_cont_BFC01D70 }, - { 0x1FC01D9Cu, SCPH1001_func_1FC01C8C_cont_BFC01D9C }, - { 0x1FC01DA8u, SCPH1001_func_1FC01C8C_cont_BFC01DA8 }, - { 0x1FC01DACu, SCPH1001_func_1FC01C8C_cont_BFC01DAC }, - { 0x1FC01DBCu, SCPH1001_func_1FC01C8C_cont_BFC01DBC }, - { 0x1FC01DC4u, SCPH1001_func_1FC01C8C_cont_BFC01DC4 }, - { 0x1FC01DC8u, SCPH1001_func_1FC01C8C_cont_BFC01DC8 }, - { 0x1FC01E08u, SCPH1001_func_1FC01C8C_cont_BFC01E08 }, - { 0x1FC01E0Cu, SCPH1001_func_1FC01C8C_cont_BFC01E0C }, - { 0x1FC01E14u, SCPH1001_func_1FC01C8C_cont_BFC01E14 }, - { 0x1FC01E18u, SCPH1001_func_1FC01C8C_cont_BFC01E18 }, - { 0x1FC01E1Cu, SCPH1001_func_1FC01C8C_cont_BFC01E1C }, - { 0x1FC01E24u, SCPH1001_func_1FC01E24 }, - { 0x1FC01E5Cu, SCPH1001_func_1FC01E5C }, - { 0x1FC01E98u, SCPH1001_func_1FC01E5C_cont_BFC01E98 }, - { 0x1FC01EA0u, SCPH1001_func_1FC01E5C_cont_BFC01EA0 }, - { 0x1FC01EC0u, SCPH1001_func_1FC01E5C_cont_BFC01EC0 }, - { 0x1FC01EC8u, SCPH1001_func_1FC01E5C_cont_BFC01EC8 }, - { 0x1FC01ECCu, SCPH1001_func_1FC01E5C_cont_BFC01ECC }, - { 0x1FC01EECu, SCPH1001_func_1FC01E5C_cont_BFC01EEC }, - { 0x1FC01EF4u, SCPH1001_func_1FC01E5C_cont_BFC01EF4 }, - { 0x1FC01EFCu, SCPH1001_func_1FC01E5C_cont_BFC01EFC }, - { 0x1FC01F18u, SCPH1001_func_1FC01E5C_cont_BFC01F18 }, - { 0x1FC01F30u, SCPH1001_func_1FC01E5C_cont_BFC01F30 }, - { 0x1FC01F38u, SCPH1001_func_1FC01E5C_cont_BFC01F38 }, - { 0x1FC01F44u, SCPH1001_func_1FC01E5C_cont_BFC01F44 }, - { 0x1FC01F58u, SCPH1001_func_1FC01E5C_cont_BFC01F58 }, - { 0x1FC01F5Cu, SCPH1001_func_1FC01E5C_cont_BFC01F5C }, - { 0x1FC01F64u, SCPH1001_func_1FC01E5C_cont_BFC01F64 }, - { 0x1FC01F80u, SCPH1001_func_1FC01E5C_cont_BFC01F80 }, - { 0x1FC01F84u, SCPH1001_func_1FC01E5C_cont_BFC01F84 }, - { 0x1FC01FA0u, SCPH1001_func_1FC01E5C_cont_BFC01FA0 }, - { 0x1FC01FA4u, SCPH1001_func_1FC01E5C_cont_BFC01FA4 }, - { 0x1FC01FACu, SCPH1001_func_1FC01E5C_cont_BFC01FAC }, - { 0x1FC01FD0u, SCPH1001_func_1FC01E5C_cont_BFC01FD0 }, - { 0x1FC01FDCu, SCPH1001_func_1FC01E5C_cont_BFC01FDC }, - { 0x1FC01FE4u, SCPH1001_func_1FC01E5C_cont_BFC01FE4 }, - { 0x1FC01FECu, SCPH1001_func_1FC01E5C_cont_BFC01FEC }, - { 0x1FC01FF4u, SCPH1001_func_1FC01E5C_cont_BFC01FF4 }, - { 0x1FC02008u, SCPH1001_func_1FC01E5C_cont_BFC02008 }, - { 0x1FC0200Cu, SCPH1001_func_1FC01E5C_cont_BFC0200C }, - { 0x1FC02014u, SCPH1001_func_1FC01E5C_cont_BFC02014 }, - { 0x1FC02030u, SCPH1001_func_1FC01E5C_cont_BFC02030 }, - { 0x1FC02038u, SCPH1001_func_1FC01E5C_cont_BFC02038 }, - { 0x1FC02050u, SCPH1001_func_1FC01E5C_cont_BFC02050 }, - { 0x1FC02058u, SCPH1001_func_1FC01E5C_cont_BFC02058 }, - { 0x1FC0207Cu, SCPH1001_func_1FC01E5C_cont_BFC0207C }, - { 0x1FC02088u, SCPH1001_func_1FC01E5C_cont_BFC02088 }, - { 0x1FC02090u, SCPH1001_func_1FC01E5C_cont_BFC02090 }, - { 0x1FC02098u, SCPH1001_func_1FC01E5C_cont_BFC02098 }, - { 0x1FC020A0u, SCPH1001_func_1FC01E5C_cont_BFC020A0 }, - { 0x1FC020B0u, SCPH1001_func_1FC01E5C_cont_BFC020B0 }, - { 0x1FC020C8u, SCPH1001_func_1FC01E5C_cont_BFC020C8 }, - { 0x1FC020D8u, SCPH1001_func_1FC01E5C_cont_BFC020D8 }, - { 0x1FC020F0u, SCPH1001_func_1FC020F0 }, - { 0x1FC02104u, SCPH1001_func_1FC02104 }, - { 0x1FC0211Cu, SCPH1001_func_1FC02104_cont_BFC0211C }, - { 0x1FC02124u, SCPH1001_func_1FC02104_cont_BFC02124 }, - { 0x1FC0212Cu, SCPH1001_func_1FC02104_cont_BFC0212C }, - { 0x1FC02134u, SCPH1001_func_1FC02104_cont_BFC02134 }, - { 0x1FC0213Cu, SCPH1001_func_1FC02104_cont_BFC0213C }, - { 0x1FC02144u, SCPH1001_func_1FC02104_cont_BFC02144 }, - { 0x1FC02148u, SCPH1001_func_1FC02104_cont_BFC02148 }, - { 0x1FC02154u, SCPH1001_func_1FC02104_cont_BFC02154 }, - { 0x1FC02160u, SCPH1001_func_1FC02104_cont_BFC02160 }, - { 0x1FC0216Cu, SCPH1001_func_1FC02104_cont_BFC0216C }, - { 0x1FC02178u, SCPH1001_func_1FC02104_cont_BFC02178 }, - { 0x1FC02184u, SCPH1001_func_1FC02104_cont_BFC02184 }, - { 0x1FC0218Cu, SCPH1001_func_1FC02104_cont_BFC0218C }, - { 0x1FC02190u, SCPH1001_func_1FC02104_cont_BFC02190 }, - { 0x1FC021A0u, SCPH1001_func_1FC021A0 }, - { 0x1FC021C0u, SCPH1001_func_1FC021A0_cont_BFC021C0 }, - { 0x1FC021CCu, SCPH1001_func_1FC021A0_cont_BFC021CC }, - { 0x1FC021D4u, SCPH1001_func_1FC021A0_cont_BFC021D4 }, - { 0x1FC021E0u, SCPH1001_func_1FC021A0_cont_BFC021E0 }, - { 0x1FC021ECu, SCPH1001_func_1FC021A0_cont_BFC021EC }, - { 0x1FC02200u, SCPH1001_func_1FC02200 }, - { 0x1FC02230u, SCPH1001_func_1FC02230 }, - { 0x1FC02240u, SCPH1001_func_1FC02240 }, - { 0x1FC0227Cu, SCPH1001_func_1FC0227C }, - { 0x1FC022C0u, SCPH1001_func_1FC022C0 }, - { 0x1FC022E8u, SCPH1001_func_1FC022C0_cont_BFC022E8 }, - { 0x1FC022F0u, SCPH1001_func_1FC022C0_cont_BFC022F0 }, - { 0x1FC022FCu, SCPH1001_func_1FC022C0_cont_BFC022FC }, - { 0x1FC02304u, SCPH1001_func_1FC022C0_cont_BFC02304 }, - { 0x1FC0230Cu, SCPH1001_func_1FC022C0_cont_BFC0230C }, - { 0x1FC02310u, SCPH1001_func_1FC022C0_cont_BFC02310 }, - { 0x1FC02314u, SCPH1001_func_1FC022C0_cont_BFC02314 }, - { 0x1FC02324u, SCPH1001_func_1FC02324 }, - { 0x1FC02590u, SCPH1001_func_1FC02590 }, - { 0x1FC025A0u, SCPH1001_func_1FC02590_cont_BFC025A0 }, - { 0x1FC025B0u, SCPH1001_func_1FC025B0 }, - { 0x1FC025D8u, SCPH1001_func_1FC025B0_cont_BFC025D8 }, - { 0x1FC025E0u, SCPH1001_func_1FC025B0_cont_BFC025E0 }, - { 0x1FC0260Cu, SCPH1001_func_1FC025B0_cont_BFC0260C }, - { 0x1FC02630u, SCPH1001_func_1FC025B0_cont_BFC02630 }, - { 0x1FC02638u, SCPH1001_func_1FC025B0_cont_BFC02638 }, - { 0x1FC02640u, SCPH1001_func_1FC025B0_cont_BFC02640 }, - { 0x1FC02644u, SCPH1001_func_1FC025B0_cont_BFC02644 }, - { 0x1FC0264Cu, SCPH1001_func_1FC025B0_cont_BFC0264C }, - { 0x1FC02654u, SCPH1001_func_1FC025B0_cont_BFC02654 }, - { 0x1FC0265Cu, SCPH1001_func_1FC025B0_cont_BFC0265C }, - { 0x1FC02670u, SCPH1001_func_1FC025B0_cont_BFC02670 }, - { 0x1FC0267Cu, SCPH1001_func_1FC025B0_cont_BFC0267C }, - { 0x1FC02684u, SCPH1001_func_1FC025B0_cont_BFC02684 }, - { 0x1FC0268Cu, SCPH1001_func_1FC025B0_cont_BFC0268C }, - { 0x1FC0269Cu, SCPH1001_func_1FC025B0_cont_BFC0269C }, - { 0x1FC026ACu, SCPH1001_func_1FC025B0_cont_BFC026AC }, - { 0x1FC026B4u, SCPH1001_func_1FC025B0_cont_BFC026B4 }, - { 0x1FC026C0u, SCPH1001_func_1FC025B0_cont_BFC026C0 }, - { 0x1FC026C8u, SCPH1001_func_1FC025B0_cont_BFC026C8 }, - { 0x1FC026D0u, SCPH1001_func_1FC025B0_cont_BFC026D0 }, - { 0x1FC026D8u, SCPH1001_func_1FC025B0_cont_BFC026D8 }, - { 0x1FC026E4u, SCPH1001_func_1FC025B0_cont_BFC026E4 }, - { 0x1FC02700u, SCPH1001_func_1FC025B0_cont_BFC02700 }, - { 0x1FC0270Cu, SCPH1001_func_1FC025B0_cont_BFC0270C }, - { 0x1FC02720u, SCPH1001_func_1FC025B0_cont_BFC02720 }, - { 0x1FC02738u, SCPH1001_func_1FC02738 }, - { 0x1FC02768u, SCPH1001_func_1FC02738_cont_BFC02768 }, - { 0x1FC02770u, SCPH1001_func_1FC02738_cont_BFC02770 }, - { 0x1FC0279Cu, SCPH1001_func_1FC02738_cont_BFC0279C }, - { 0x1FC027C0u, SCPH1001_func_1FC02738_cont_BFC027C0 }, - { 0x1FC027CCu, SCPH1001_func_1FC02738_cont_BFC027CC }, - { 0x1FC027DCu, SCPH1001_func_1FC02738_cont_BFC027DC }, - { 0x1FC027E0u, SCPH1001_func_1FC02738_cont_BFC027E0 }, - { 0x1FC027E8u, SCPH1001_func_1FC02738_cont_BFC027E8 }, - { 0x1FC027F0u, SCPH1001_func_1FC02738_cont_BFC027F0 }, - { 0x1FC027F4u, SCPH1001_func_1FC02738_cont_BFC027F4 }, - { 0x1FC027FCu, SCPH1001_func_1FC02738_cont_BFC027FC }, - { 0x1FC02804u, SCPH1001_func_1FC02738_cont_BFC02804 }, - { 0x1FC0280Cu, SCPH1001_func_1FC02738_cont_BFC0280C }, - { 0x1FC02820u, SCPH1001_func_1FC02738_cont_BFC02820 }, - { 0x1FC0282Cu, SCPH1001_func_1FC02738_cont_BFC0282C }, - { 0x1FC02834u, SCPH1001_func_1FC02738_cont_BFC02834 }, - { 0x1FC0283Cu, SCPH1001_func_1FC02738_cont_BFC0283C }, - { 0x1FC0284Cu, SCPH1001_func_1FC02738_cont_BFC0284C }, - { 0x1FC0285Cu, SCPH1001_func_1FC02738_cont_BFC0285C }, - { 0x1FC02864u, SCPH1001_func_1FC02738_cont_BFC02864 }, - { 0x1FC02870u, SCPH1001_func_1FC02738_cont_BFC02870 }, - { 0x1FC02878u, SCPH1001_func_1FC02738_cont_BFC02878 }, - { 0x1FC02880u, SCPH1001_func_1FC02738_cont_BFC02880 }, - { 0x1FC02888u, SCPH1001_func_1FC02738_cont_BFC02888 }, - { 0x1FC02894u, SCPH1001_func_1FC02738_cont_BFC02894 }, - { 0x1FC028A8u, SCPH1001_func_1FC02738_cont_BFC028A8 }, - { 0x1FC028ACu, SCPH1001_func_1FC02738_cont_BFC028AC }, - { 0x1FC028CCu, SCPH1001_func_1FC02738_cont_BFC028CC }, - { 0x1FC028DCu, SCPH1001_func_1FC02738_cont_BFC028DC }, - { 0x1FC028FCu, SCPH1001_func_1FC02738_cont_BFC028FC }, - { 0x1FC02918u, SCPH1001_func_1FC02918 }, - { 0x1FC02920u, SCPH1001_func_1FC02918_cont_BFC02920 }, - { 0x1FC02928u, SCPH1001_func_1FC02918_cont_BFC02928 }, - { 0x1FC0292Cu, SCPH1001_func_1FC02918_cont_BFC0292C }, - { 0x1FC02934u, SCPH1001_func_1FC02934 }, - { 0x1FC0293Cu, SCPH1001_func_1FC02934_cont_BFC0293C }, - { 0x1FC02944u, SCPH1001_func_1FC02934_cont_BFC02944 }, - { 0x1FC02948u, SCPH1001_func_1FC02934_cont_BFC02948 }, - { 0x1FC02950u, SCPH1001_func_1FC02950 }, - { 0x1FC0297Cu, SCPH1001_func_1FC02950_cont_BFC0297C }, - { 0x1FC02984u, SCPH1001_func_1FC02950_cont_BFC02984 }, - { 0x1FC029B0u, SCPH1001_func_1FC02950_cont_BFC029B0 }, - { 0x1FC029D4u, SCPH1001_func_1FC02950_cont_BFC029D4 }, - { 0x1FC029E0u, SCPH1001_func_1FC02950_cont_BFC029E0 }, - { 0x1FC029F0u, SCPH1001_func_1FC02950_cont_BFC029F0 }, - { 0x1FC029F4u, SCPH1001_func_1FC02950_cont_BFC029F4 }, - { 0x1FC029FCu, SCPH1001_func_1FC02950_cont_BFC029FC }, - { 0x1FC02A0Cu, SCPH1001_func_1FC02950_cont_BFC02A0C }, - { 0x1FC02A1Cu, SCPH1001_func_1FC02950_cont_BFC02A1C }, - { 0x1FC02A2Cu, SCPH1001_func_1FC02950_cont_BFC02A2C }, - { 0x1FC02A38u, SCPH1001_func_1FC02950_cont_BFC02A38 }, - { 0x1FC02A40u, SCPH1001_func_1FC02950_cont_BFC02A40 }, - { 0x1FC02A48u, SCPH1001_func_1FC02950_cont_BFC02A48 }, - { 0x1FC02A50u, SCPH1001_func_1FC02950_cont_BFC02A50 }, - { 0x1FC02A54u, SCPH1001_func_1FC02950_cont_BFC02A54 }, - { 0x1FC02A5Cu, SCPH1001_func_1FC02950_cont_BFC02A5C }, - { 0x1FC02A68u, SCPH1001_func_1FC02950_cont_BFC02A68 }, - { 0x1FC02A88u, SCPH1001_func_1FC02950_cont_BFC02A88 }, - { 0x1FC02A8Cu, SCPH1001_func_1FC02950_cont_BFC02A8C }, - { 0x1FC02AA8u, SCPH1001_func_1FC02950_cont_BFC02AA8 }, - { 0x1FC02AB4u, SCPH1001_func_1FC02950_cont_BFC02AB4 }, - { 0x1FC02AC0u, SCPH1001_func_1FC02950_cont_BFC02AC0 }, - { 0x1FC02AD4u, SCPH1001_func_1FC02950_cont_BFC02AD4 }, - { 0x1FC02AF0u, SCPH1001_func_1FC02AF0 }, - { 0x1FC02B00u, SCPH1001_func_1FC02AF0_cont_BFC02B00 }, - { 0x1FC02B10u, SCPH1001_func_1FC02B10 }, - { 0x1FC02B28u, SCPH1001_func_1FC02B10_cont_BFC02B28 }, - { 0x1FC02B50u, SCPH1001_func_1FC02B50 }, - { 0x1FC02B58u, SCPH1001_func_1FC02B50_cont_BFC02B58 }, - { 0x1FC02B60u, SCPH1001_func_1FC02B50_cont_BFC02B60 }, - { 0x1FC02B68u, SCPH1001_func_1FC02B50_cont_BFC02B68 }, - { 0x1FC02B80u, SCPH1001_func_1FC02B50_cont_BFC02B80 }, - { 0x1FC02B8Cu, SCPH1001_func_1FC02B8C }, - { 0x1FC02B94u, SCPH1001_func_1FC02B8C_cont_BFC02B94 }, - { 0x1FC02B9Cu, SCPH1001_func_1FC02B8C_cont_BFC02B9C }, - { 0x1FC02BA4u, SCPH1001_func_1FC02B8C_cont_BFC02BA4 }, - { 0x1FC02BACu, SCPH1001_func_1FC02B8C_cont_BFC02BAC }, - { 0x1FC02BBCu, SCPH1001_func_1FC02B8C_cont_BFC02BBC }, - { 0x1FC02BC8u, SCPH1001_func_1FC02BC8 }, - { 0x1FC02BD0u, SCPH1001_func_1FC02BC8_cont_BFC02BD0 }, - { 0x1FC02BDCu, SCPH1001_func_1FC02BC8_cont_BFC02BDC }, - { 0x1FC02BE4u, SCPH1001_func_1FC02BC8_cont_BFC02BE4 }, - { 0x1FC02BF4u, SCPH1001_func_1FC02BC8_cont_BFC02BF4 }, - { 0x1FC02C04u, SCPH1001_func_1FC02BC8_cont_BFC02C04 }, - { 0x1FC02C1Cu, SCPH1001_func_1FC02BC8_cont_BFC02C1C }, - { 0x1FC02C24u, SCPH1001_func_1FC02BC8_cont_BFC02C24 }, - { 0x1FC02C2Cu, SCPH1001_func_1FC02BC8_cont_BFC02C2C }, - { 0x1FC02C44u, SCPH1001_func_1FC02BC8_cont_BFC02C44 }, - { 0x1FC02C48u, SCPH1001_func_1FC02BC8_cont_BFC02C48 }, - { 0x1FC02C50u, SCPH1001_func_1FC02C50 }, - { 0x1FC02C58u, SCPH1001_func_1FC02C50_cont_BFC02C58 }, - { 0x1FC02C60u, SCPH1001_func_1FC02C50_cont_BFC02C60 }, - { 0x1FC02C6Cu, SCPH1001_func_1FC02C50_cont_BFC02C6C }, - { 0x1FC02C74u, SCPH1001_func_1FC02C50_cont_BFC02C74 }, - { 0x1FC02C88u, SCPH1001_func_1FC02C50_cont_BFC02C88 }, - { 0x1FC02C94u, SCPH1001_func_1FC02C50_cont_BFC02C94 }, - { 0x1FC02C9Cu, SCPH1001_func_1FC02C50_cont_BFC02C9C }, - { 0x1FC02CA4u, SCPH1001_func_1FC02C50_cont_BFC02CA4 }, - { 0x1FC02CB4u, SCPH1001_func_1FC02C50_cont_BFC02CB4 }, - { 0x1FC02CC0u, SCPH1001_func_1FC02CC0 }, - { 0x1FC02CC8u, SCPH1001_func_1FC02CC0_cont_BFC02CC8 }, - { 0x1FC02CD0u, SCPH1001_func_1FC02CC0_cont_BFC02CD0 }, - { 0x1FC02CDCu, SCPH1001_func_1FC02CC0_cont_BFC02CDC }, - { 0x1FC02CE4u, SCPH1001_func_1FC02CC0_cont_BFC02CE4 }, - { 0x1FC02CF4u, SCPH1001_func_1FC02CC0_cont_BFC02CF4 }, - { 0x1FC02D00u, SCPH1001_func_1FC02CC0_cont_BFC02D00 }, - { 0x1FC02D08u, SCPH1001_func_1FC02CC0_cont_BFC02D08 }, - { 0x1FC02D0Cu, SCPH1001_func_1FC02CC0_cont_BFC02D0C }, - { 0x1FC02D20u, SCPH1001_func_1FC02D20 }, - { 0x1FC02D4Cu, SCPH1001_func_1FC02D20_cont_BFC02D4C }, - { 0x1FC02D58u, SCPH1001_func_1FC02D20_cont_BFC02D58 }, - { 0x1FC02D64u, SCPH1001_func_1FC02D20_cont_BFC02D64 }, - { 0x1FC02D6Cu, SCPH1001_func_1FC02D20_cont_BFC02D6C }, - { 0x1FC02D78u, SCPH1001_func_1FC02D20_cont_BFC02D78 }, - { 0x1FC02D7Cu, SCPH1001_func_1FC02D20_cont_BFC02D7C }, - { 0x1FC02D84u, SCPH1001_func_1FC02D20_cont_BFC02D84 }, - { 0x1FC02D8Cu, SCPH1001_func_1FC02D20_cont_BFC02D8C }, - { 0x1FC02D90u, SCPH1001_func_1FC02D20_cont_BFC02D90 }, - { 0x1FC02DACu, SCPH1001_func_1FC02DAC }, - { 0x1FC02DE8u, SCPH1001_func_1FC02DAC_cont_BFC02DE8 }, - { 0x1FC02DF4u, SCPH1001_func_1FC02DAC_cont_BFC02DF4 }, - { 0x1FC02DFCu, SCPH1001_func_1FC02DAC_cont_BFC02DFC }, - { 0x1FC02E0Cu, SCPH1001_func_1FC02DAC_cont_BFC02E0C }, - { 0x1FC02E10u, SCPH1001_func_1FC02DAC_cont_BFC02E10 }, - { 0x1FC02E28u, SCPH1001_func_1FC02DAC_cont_BFC02E28 }, - { 0x1FC02E30u, SCPH1001_func_1FC02DAC_cont_BFC02E30 }, - { 0x1FC02E38u, SCPH1001_func_1FC02DAC_cont_BFC02E38 }, - { 0x1FC02E3Cu, SCPH1001_func_1FC02DAC_cont_BFC02E3C }, - { 0x1FC02E48u, SCPH1001_func_1FC02DAC_cont_BFC02E48 }, - { 0x1FC02E60u, SCPH1001_func_1FC02DAC_cont_BFC02E60 }, - { 0x1FC02E68u, SCPH1001_func_1FC02DAC_cont_BFC02E68 }, - { 0x1FC02E70u, SCPH1001_func_1FC02DAC_cont_BFC02E70 }, - { 0x1FC02E74u, SCPH1001_func_1FC02DAC_cont_BFC02E74 }, - { 0x1FC02EA0u, SCPH1001_func_1FC02EA0 }, - { 0x1FC02EC8u, SCPH1001_func_1FC02EA0_cont_BFC02EC8 }, - { 0x1FC02ED4u, SCPH1001_func_1FC02EA0_cont_BFC02ED4 }, - { 0x1FC02EDCu, SCPH1001_func_1FC02EDC }, - { 0x1FC02F04u, SCPH1001_func_1FC02EDC_cont_BFC02F04 }, - { 0x1FC02F10u, SCPH1001_func_1FC02EDC_cont_BFC02F10 }, - { 0x1FC02F20u, SCPH1001_func_1FC02F20 }, - { 0x1FC02F58u, SCPH1001_func_1FC02F20_cont_BFC02F58 }, - { 0x1FC02F64u, SCPH1001_func_1FC02F20_cont_BFC02F64 }, - { 0x1FC02F70u, SCPH1001_func_1FC02F20_cont_BFC02F70 }, - { 0x1FC02F74u, SCPH1001_func_1FC02F20_cont_BFC02F74 }, - { 0x1FC02F84u, SCPH1001_func_1FC02F20_cont_BFC02F84 }, - { 0x1FC02F94u, SCPH1001_func_1FC02F20_cont_BFC02F94 }, - { 0x1FC02FB4u, SCPH1001_func_1FC02F20_cont_BFC02FB4 }, - { 0x1FC02FD0u, SCPH1001_func_1FC02F20_cont_BFC02FD0 }, - { 0x1FC02FD8u, SCPH1001_func_1FC02F20_cont_BFC02FD8 }, - { 0x1FC02FE0u, SCPH1001_func_1FC02F20_cont_BFC02FE0 }, - { 0x1FC02FF0u, SCPH1001_func_1FC02F20_cont_BFC02FF0 }, - { 0x1FC03014u, SCPH1001_func_1FC02F20_cont_BFC03014 }, - { 0x1FC0301Cu, SCPH1001_func_1FC02F20_cont_BFC0301C }, - { 0x1FC03024u, SCPH1001_func_1FC02F20_cont_BFC03024 }, - { 0x1FC03034u, SCPH1001_func_1FC02F20_cont_BFC03034 }, - { 0x1FC03038u, SCPH1001_func_1FC02F20_cont_BFC03038 }, - { 0x1FC03040u, SCPH1001_func_1FC02F20_cont_BFC03040 }, - { 0x1FC03050u, SCPH1001_func_1FC02F20_cont_BFC03050 }, - { 0x1FC03064u, SCPH1001_func_1FC02F20_cont_BFC03064 }, - { 0x1FC0306Cu, SCPH1001_func_1FC02F20_cont_BFC0306C }, - { 0x1FC03070u, SCPH1001_func_1FC02F20_cont_BFC03070 }, - { 0x1FC03098u, SCPH1001_func_1FC03098 }, - { 0x1FC030C0u, SCPH1001_func_1FC03098_cont_BFC030C0 }, - { 0x1FC030CCu, SCPH1001_func_1FC03098_cont_BFC030CC }, - { 0x1FC030E4u, SCPH1001_func_1FC03098_cont_BFC030E4 }, - { 0x1FC030F4u, SCPH1001_func_1FC03098_cont_BFC030F4 }, - { 0x1FC03104u, SCPH1001_func_1FC03104 }, - { 0x1FC0314Cu, SCPH1001_func_1FC03104_cont_BFC0314C }, - { 0x1FC03160u, SCPH1001_func_1FC03104_cont_BFC03160 }, - { 0x1FC03178u, SCPH1001_func_1FC03104_cont_BFC03178 }, - { 0x1FC03190u, SCPH1001_func_1FC03190 }, - { 0x1FC03198u, SCPH1001_func_1FC03190_cont_BFC03198 }, - { 0x1FC031A0u, SCPH1001_func_1FC03190_cont_BFC031A0 }, - { 0x1FC031A8u, SCPH1001_func_1FC03190_cont_BFC031A8 }, - { 0x1FC031B8u, SCPH1001_func_1FC03190_cont_BFC031B8 }, - { 0x1FC031C8u, SCPH1001_func_1FC03190_cont_BFC031C8 }, - { 0x1FC031E0u, SCPH1001_func_1FC03190_cont_BFC031E0 }, - { 0x1FC031F4u, SCPH1001_func_1FC03190_cont_BFC031F4 }, - { 0x1FC03200u, SCPH1001_func_1FC03200 }, - { 0x1FC03208u, SCPH1001_func_1FC03200_cont_BFC03208 }, - { 0x1FC03210u, SCPH1001_func_1FC03200_cont_BFC03210 }, - { 0x1FC03218u, SCPH1001_func_1FC03200_cont_BFC03218 }, - { 0x1FC03228u, SCPH1001_func_1FC03200_cont_BFC03228 }, - { 0x1FC03238u, SCPH1001_func_1FC03200_cont_BFC03238 }, - { 0x1FC03250u, SCPH1001_func_1FC03200_cont_BFC03250 }, - { 0x1FC0325Cu, SCPH1001_func_1FC03200_cont_BFC0325C }, - { 0x1FC03268u, SCPH1001_func_1FC03200_cont_BFC03268 }, - { 0x1FC0327Cu, SCPH1001_func_1FC03200_cont_BFC0327C }, - { 0x1FC03288u, SCPH1001_func_1FC03288 }, - { 0x1FC03290u, SCPH1001_func_1FC03288_cont_BFC03290 }, - { 0x1FC03298u, SCPH1001_func_1FC03288_cont_BFC03298 }, - { 0x1FC032A0u, SCPH1001_func_1FC03288_cont_BFC032A0 }, - { 0x1FC032A8u, SCPH1001_func_1FC03288_cont_BFC032A8 }, - { 0x1FC032B0u, SCPH1001_func_1FC03288_cont_BFC032B0 }, - { 0x1FC032B8u, SCPH1001_func_1FC03288_cont_BFC032B8 }, - { 0x1FC032C0u, SCPH1001_func_1FC03288_cont_BFC032C0 }, - { 0x1FC032D4u, SCPH1001_func_1FC03288_cont_BFC032D4 }, - { 0x1FC032D8u, SCPH1001_func_1FC03288_cont_BFC032D8 }, - { 0x1FC032E0u, SCPH1001_func_1FC03288_cont_BFC032E0 }, - { 0x1FC032E8u, SCPH1001_func_1FC03288_cont_BFC032E8 }, - { 0x1FC032FCu, SCPH1001_func_1FC03288_cont_BFC032FC }, - { 0x1FC03310u, SCPH1001_func_1FC03310 }, - { 0x1FC03318u, SCPH1001_func_1FC03310_cont_BFC03318 }, - { 0x1FC03320u, SCPH1001_func_1FC03310_cont_BFC03320 }, - { 0x1FC03328u, SCPH1001_func_1FC03310_cont_BFC03328 }, - { 0x1FC03330u, SCPH1001_func_1FC03310_cont_BFC03330 }, - { 0x1FC03338u, SCPH1001_func_1FC03310_cont_BFC03338 }, - { 0x1FC03340u, SCPH1001_func_1FC03310_cont_BFC03340 }, - { 0x1FC0334Cu, SCPH1001_func_1FC03310_cont_BFC0334C }, - { 0x1FC03354u, SCPH1001_func_1FC03310_cont_BFC03354 }, - { 0x1FC03368u, SCPH1001_func_1FC03310_cont_BFC03368 }, - { 0x1FC0336Cu, SCPH1001_func_1FC03310_cont_BFC0336C }, - { 0x1FC03374u, SCPH1001_func_1FC03310_cont_BFC03374 }, - { 0x1FC0337Cu, SCPH1001_func_1FC03310_cont_BFC0337C }, - { 0x1FC03388u, SCPH1001_func_1FC03310_cont_BFC03388 }, - { 0x1FC0339Cu, SCPH1001_func_1FC03310_cont_BFC0339C }, - { 0x1FC033A4u, SCPH1001_func_1FC03310_cont_BFC033A4 }, - { 0x1FC033ACu, SCPH1001_func_1FC03310_cont_BFC033AC }, - { 0x1FC033BCu, SCPH1001_func_1FC03310_cont_BFC033BC }, - { 0x1FC033C8u, SCPH1001_func_1FC033C8 }, - { 0x1FC033D0u, SCPH1001_func_1FC033C8_cont_BFC033D0 }, - { 0x1FC033D8u, SCPH1001_func_1FC033C8_cont_BFC033D8 }, - { 0x1FC033E0u, SCPH1001_func_1FC033C8_cont_BFC033E0 }, - { 0x1FC033F8u, SCPH1001_func_1FC033C8_cont_BFC033F8 }, - { 0x1FC0340Cu, SCPH1001_func_1FC033C8_cont_BFC0340C }, - { 0x1FC03418u, SCPH1001_func_1FC03418 }, - { 0x1FC03420u, SCPH1001_func_1FC03418_cont_BFC03420 }, - { 0x1FC03428u, SCPH1001_func_1FC03418_cont_BFC03428 }, - { 0x1FC03430u, SCPH1001_func_1FC03418_cont_BFC03430 }, - { 0x1FC0343Cu, SCPH1001_func_1FC03418_cont_BFC0343C }, - { 0x1FC03450u, SCPH1001_func_1FC03418_cont_BFC03450 }, - { 0x1FC03460u, SCPH1001_func_1FC03418_cont_BFC03460 }, - { 0x1FC03474u, SCPH1001_func_1FC03418_cont_BFC03474 }, - { 0x1FC0347Cu, SCPH1001_func_1FC03418_cont_BFC0347C }, - { 0x1FC03488u, SCPH1001_func_1FC03418_cont_BFC03488 }, - { 0x1FC03494u, SCPH1001_func_1FC03494 }, - { 0x1FC0349Cu, SCPH1001_func_1FC03494_cont_BFC0349C }, - { 0x1FC034A4u, SCPH1001_func_1FC03494_cont_BFC034A4 }, - { 0x1FC034B4u, SCPH1001_func_1FC03494_cont_BFC034B4 }, - { 0x1FC034C4u, SCPH1001_func_1FC03494_cont_BFC034C4 }, - { 0x1FC034C8u, SCPH1001_func_1FC03494_cont_BFC034C8 }, - { 0x1FC034D0u, SCPH1001_func_1FC034D0 }, - { 0x1FC034DCu, SCPH1001_func_1FC034D0_cont_BFC034DC }, - { 0x1FC034E4u, SCPH1001_func_1FC034D0_cont_BFC034E4 }, - { 0x1FC034F4u, SCPH1001_func_1FC034D0_cont_BFC034F4 }, - { 0x1FC034FCu, SCPH1001_func_1FC034D0_cont_BFC034FC }, - { 0x1FC03508u, SCPH1001_func_1FC034D0_cont_BFC03508 }, - { 0x1FC03514u, SCPH1001_func_1FC03514 }, - { 0x1FC03520u, SCPH1001_func_1FC03514_cont_BFC03520 }, - { 0x1FC03528u, SCPH1001_func_1FC03514_cont_BFC03528 }, - { 0x1FC03538u, SCPH1001_func_1FC03514_cont_BFC03538 }, - { 0x1FC03548u, SCPH1001_func_1FC03514_cont_BFC03548 }, - { 0x1FC0354Cu, SCPH1001_func_1FC03514_cont_BFC0354C }, - { 0x1FC0355Cu, SCPH1001_func_1FC03514_cont_BFC0355C }, - { 0x1FC03564u, SCPH1001_func_1FC03514_cont_BFC03564 }, - { 0x1FC03570u, SCPH1001_func_1FC03514_cont_BFC03570 }, - { 0x1FC0357Cu, SCPH1001_func_1FC0357C }, - { 0x1FC03588u, SCPH1001_func_1FC0357C_cont_BFC03588 }, - { 0x1FC03590u, SCPH1001_func_1FC0357C_cont_BFC03590 }, - { 0x1FC035A0u, SCPH1001_func_1FC0357C_cont_BFC035A0 }, - { 0x1FC035A8u, SCPH1001_func_1FC0357C_cont_BFC035A8 }, - { 0x1FC035B4u, SCPH1001_func_1FC0357C_cont_BFC035B4 }, - { 0x1FC035C0u, SCPH1001_func_1FC035C0 }, - { 0x1FC035CCu, SCPH1001_func_1FC035C0_cont_BFC035CC }, - { 0x1FC035D4u, SCPH1001_func_1FC035C0_cont_BFC035D4 }, - { 0x1FC035E4u, SCPH1001_func_1FC035C0_cont_BFC035E4 }, - { 0x1FC035F4u, SCPH1001_func_1FC035C0_cont_BFC035F4 }, - { 0x1FC035F8u, SCPH1001_func_1FC035C0_cont_BFC035F8 }, - { 0x1FC03608u, SCPH1001_func_1FC035C0_cont_BFC03608 }, - { 0x1FC03610u, SCPH1001_func_1FC035C0_cont_BFC03610 }, - { 0x1FC0361Cu, SCPH1001_func_1FC035C0_cont_BFC0361C }, - { 0x1FC03628u, SCPH1001_func_1FC03628 }, - { 0x1FC03638u, SCPH1001_func_1FC03628_cont_BFC03638 }, - { 0x1FC03640u, SCPH1001_func_1FC03628_cont_BFC03640 }, - { 0x1FC03648u, SCPH1001_func_1FC03628_cont_BFC03648 }, - { 0x1FC03650u, SCPH1001_func_1FC03628_cont_BFC03650 }, - { 0x1FC03658u, SCPH1001_func_1FC03628_cont_BFC03658 }, - { 0x1FC03660u, SCPH1001_func_1FC03628_cont_BFC03660 }, - { 0x1FC03670u, SCPH1001_func_1FC03628_cont_BFC03670 }, - { 0x1FC03680u, SCPH1001_func_1FC03628_cont_BFC03680 }, - { 0x1FC03688u, SCPH1001_func_1FC03628_cont_BFC03688 }, - { 0x1FC0368Cu, SCPH1001_func_1FC03628_cont_BFC0368C }, - { 0x1FC03694u, SCPH1001_func_1FC03694 }, - { 0x1FC036A4u, SCPH1001_func_1FC03694_cont_BFC036A4 }, - { 0x1FC036ACu, SCPH1001_func_1FC03694_cont_BFC036AC }, - { 0x1FC036B4u, SCPH1001_func_1FC03694_cont_BFC036B4 }, - { 0x1FC036BCu, SCPH1001_func_1FC03694_cont_BFC036BC }, - { 0x1FC036C4u, SCPH1001_func_1FC03694_cont_BFC036C4 }, - { 0x1FC036D4u, SCPH1001_func_1FC03694_cont_BFC036D4 }, - { 0x1FC036E4u, SCPH1001_func_1FC03694_cont_BFC036E4 }, - { 0x1FC036F4u, SCPH1001_func_1FC03694_cont_BFC036F4 }, - { 0x1FC036FCu, SCPH1001_func_1FC036FC }, - { 0x1FC0370Cu, SCPH1001_func_1FC036FC_cont_BFC0370C }, - { 0x1FC03714u, SCPH1001_func_1FC036FC_cont_BFC03714 }, - { 0x1FC0371Cu, SCPH1001_func_1FC036FC_cont_BFC0371C }, - { 0x1FC03724u, SCPH1001_func_1FC036FC_cont_BFC03724 }, - { 0x1FC0372Cu, SCPH1001_func_1FC036FC_cont_BFC0372C }, - { 0x1FC0373Cu, SCPH1001_func_1FC036FC_cont_BFC0373C }, - { 0x1FC0374Cu, SCPH1001_func_1FC036FC_cont_BFC0374C }, - { 0x1FC0375Cu, SCPH1001_func_1FC036FC_cont_BFC0375C }, - { 0x1FC03764u, SCPH1001_func_1FC03764 }, - { 0x1FC03778u, SCPH1001_func_1FC03764_cont_BFC03778 }, - { 0x1FC03788u, SCPH1001_func_1FC03764_cont_BFC03788 }, - { 0x1FC0379Cu, SCPH1001_func_1FC03764_cont_BFC0379C }, - { 0x1FC037ACu, SCPH1001_func_1FC03764_cont_BFC037AC }, - { 0x1FC037B8u, SCPH1001_func_1FC03764_cont_BFC037B8 }, - { 0x1FC037C0u, SCPH1001_func_1FC03764_cont_BFC037C0 }, - { 0x1FC037C8u, SCPH1001_func_1FC03764_cont_BFC037C8 }, - { 0x1FC037D0u, SCPH1001_func_1FC03764_cont_BFC037D0 }, - { 0x1FC037D8u, SCPH1001_func_1FC03764_cont_BFC037D8 }, - { 0x1FC037E8u, SCPH1001_func_1FC03764_cont_BFC037E8 }, - { 0x1FC037F8u, SCPH1001_func_1FC03764_cont_BFC037F8 }, - { 0x1FC03800u, SCPH1001_func_1FC03764_cont_BFC03800 }, - { 0x1FC0380Cu, SCPH1001_func_1FC03764_cont_BFC0380C }, - { 0x1FC03814u, SCPH1001_func_1FC03764_cont_BFC03814 }, - { 0x1FC03824u, SCPH1001_func_1FC03764_cont_BFC03824 }, - { 0x1FC0382Cu, SCPH1001_func_1FC03764_cont_BFC0382C }, - { 0x1FC03834u, SCPH1001_func_1FC03764_cont_BFC03834 }, - { 0x1FC03844u, SCPH1001_func_1FC03764_cont_BFC03844 }, - { 0x1FC03854u, SCPH1001_func_1FC03764_cont_BFC03854 }, - { 0x1FC0385Cu, SCPH1001_func_1FC03764_cont_BFC0385C }, - { 0x1FC03864u, SCPH1001_func_1FC03764_cont_BFC03864 }, - { 0x1FC03870u, SCPH1001_func_1FC03764_cont_BFC03870 }, - { 0x1FC03884u, SCPH1001_func_1FC03764_cont_BFC03884 }, - { 0x1FC03894u, SCPH1001_func_1FC03894 }, - { 0x1FC038A8u, SCPH1001_func_1FC03894_cont_BFC038A8 }, - { 0x1FC038B8u, SCPH1001_func_1FC03894_cont_BFC038B8 }, - { 0x1FC038C8u, SCPH1001_func_1FC03894_cont_BFC038C8 }, - { 0x1FC038D0u, SCPH1001_func_1FC03894_cont_BFC038D0 }, - { 0x1FC038D8u, SCPH1001_func_1FC03894_cont_BFC038D8 }, - { 0x1FC038E4u, SCPH1001_func_1FC03894_cont_BFC038E4 }, - { 0x1FC038ECu, SCPH1001_func_1FC03894_cont_BFC038EC }, - { 0x1FC038FCu, SCPH1001_func_1FC03894_cont_BFC038FC }, - { 0x1FC03910u, SCPH1001_func_1FC03910 }, - { 0x1FC03930u, SCPH1001_func_1FC03910_cont_BFC03930 }, - { 0x1FC03944u, SCPH1001_func_1FC03910_cont_BFC03944 }, - { 0x1FC03948u, SCPH1001_func_1FC03910_cont_BFC03948 }, - { 0x1FC03968u, SCPH1001_func_1FC03968 }, - { 0x1FC03978u, SCPH1001_func_1FC03978 }, - { 0x1FC03990u, SCPH1001_func_1FC03990 }, - { 0x1FC039B0u, SCPH1001_func_1FC039B0 }, - { 0x1FC039C4u, SCPH1001_func_1FC039B0_cont_BFC039C4 }, - { 0x1FC039CCu, SCPH1001_func_1FC039B0_cont_BFC039CC }, - { 0x1FC039D4u, SCPH1001_func_1FC039B0_cont_BFC039D4 }, - { 0x1FC039E0u, SCPH1001_func_1FC039B0_cont_BFC039E0 }, - { 0x1FC039ECu, SCPH1001_func_1FC039B0_cont_BFC039EC }, - { 0x1FC039F4u, SCPH1001_func_1FC039B0_cont_BFC039F4 }, - { 0x1FC039FCu, SCPH1001_func_1FC039B0_cont_BFC039FC }, - { 0x1FC03A04u, SCPH1001_func_1FC039B0_cont_BFC03A04 }, - { 0x1FC03A08u, SCPH1001_func_1FC039B0_cont_BFC03A08 }, - { 0x1FC03A18u, SCPH1001_func_1FC03A18 }, - { 0x1FC03A2Cu, SCPH1001_func_1FC03A18_cont_BFC03A2C }, - { 0x1FC03A34u, SCPH1001_func_1FC03A18_cont_BFC03A34 }, - { 0x1FC03A3Cu, SCPH1001_func_1FC03A18_cont_BFC03A3C }, - { 0x1FC03A48u, SCPH1001_func_1FC03A18_cont_BFC03A48 }, - { 0x1FC03A54u, SCPH1001_func_1FC03A18_cont_BFC03A54 }, - { 0x1FC03A5Cu, SCPH1001_func_1FC03A18_cont_BFC03A5C }, - { 0x1FC03A64u, SCPH1001_func_1FC03A18_cont_BFC03A64 }, - { 0x1FC03A68u, SCPH1001_func_1FC03A18_cont_BFC03A68 }, - { 0x1FC03A7Cu, SCPH1001_func_1FC03A18_cont_BFC03A7C }, - { 0x1FC03A88u, SCPH1001_func_1FC03A18_cont_BFC03A88 }, - { 0x1FC03A90u, SCPH1001_func_1FC03A18_cont_BFC03A90 }, - { 0x1FC03A94u, SCPH1001_func_1FC03A18_cont_BFC03A94 }, - { 0x1FC03AA4u, SCPH1001_func_1FC03AA4 }, - { 0x1FC03ACCu, SCPH1001_func_1FC03AA4_cont_BFC03ACC }, - { 0x1FC03AD8u, SCPH1001_func_1FC03AA4_cont_BFC03AD8 }, - { 0x1FC03AE0u, SCPH1001_func_1FC03AA4_cont_BFC03AE0 }, - { 0x1FC03AF4u, SCPH1001_func_1FC03AA4_cont_BFC03AF4 }, - { 0x1FC03AFCu, SCPH1001_func_1FC03AA4_cont_BFC03AFC }, - { 0x1FC03B08u, SCPH1001_func_1FC03AA4_cont_BFC03B08 }, - { 0x1FC03B10u, SCPH1001_func_1FC03AA4_cont_BFC03B10 }, - { 0x1FC03B20u, SCPH1001_func_1FC03AA4_cont_BFC03B20 }, - { 0x1FC03B28u, SCPH1001_func_1FC03AA4_cont_BFC03B28 }, - { 0x1FC03B38u, SCPH1001_func_1FC03AA4_cont_BFC03B38 }, - { 0x1FC03B40u, SCPH1001_func_1FC03AA4_cont_BFC03B40 }, - { 0x1FC03B48u, SCPH1001_func_1FC03AA4_cont_BFC03B48 }, - { 0x1FC03B58u, SCPH1001_func_1FC03AA4_cont_BFC03B58 }, - { 0x1FC03B68u, SCPH1001_func_1FC03AA4_cont_BFC03B68 }, - { 0x1FC03B78u, SCPH1001_func_1FC03AA4_cont_BFC03B78 }, - { 0x1FC03B9Cu, SCPH1001_func_1FC03AA4_cont_BFC03B9C }, - { 0x1FC03BB0u, SCPH1001_func_1FC03AA4_cont_BFC03BB0 }, - { 0x1FC03BBCu, SCPH1001_func_1FC03AA4_cont_BFC03BBC }, - { 0x1FC03BE4u, SCPH1001_func_1FC03AA4_cont_BFC03BE4 }, - { 0x1FC03BECu, SCPH1001_func_1FC03AA4_cont_BFC03BEC }, - { 0x1FC03BF8u, SCPH1001_func_1FC03AA4_cont_BFC03BF8 }, - { 0x1FC03C0Cu, SCPH1001_func_1FC03AA4_cont_BFC03C0C }, - { 0x1FC03C14u, SCPH1001_func_1FC03AA4_cont_BFC03C14 }, - { 0x1FC03C24u, SCPH1001_func_1FC03AA4_cont_BFC03C24 }, - { 0x1FC03C2Cu, SCPH1001_func_1FC03AA4_cont_BFC03C2C }, - { 0x1FC03C5Cu, SCPH1001_func_1FC03AA4_cont_BFC03C5C }, - { 0x1FC03C74u, SCPH1001_func_1FC03AA4_cont_BFC03C74 }, - { 0x1FC03C7Cu, SCPH1001_func_1FC03AA4_cont_BFC03C7C }, - { 0x1FC03C90u, SCPH1001_func_1FC03C90 }, - { 0x1FC03CACu, SCPH1001_func_1FC03C90_cont_BFC03CAC }, - { 0x1FC03CB8u, SCPH1001_func_1FC03C90_cont_BFC03CB8 }, - { 0x1FC03CC0u, SCPH1001_func_1FC03C90_cont_BFC03CC0 }, - { 0x1FC03CC4u, SCPH1001_func_1FC03C90_cont_BFC03CC4 }, - { 0x1FC03CD4u, SCPH1001_func_1FC03C90_cont_BFC03CD4 }, - { 0x1FC03CD8u, SCPH1001_func_1FC03C90_cont_BFC03CD8 }, - { 0x1FC03CF0u, SCPH1001_func_1FC03CF0 }, - { 0x1FC03D10u, SCPH1001_func_1FC03CF0_cont_BFC03D10 }, - { 0x1FC03D18u, SCPH1001_func_1FC03CF0_cont_BFC03D18 }, - { 0x1FC03D28u, SCPH1001_func_1FC03CF0_cont_BFC03D28 }, - { 0x1FC03D38u, SCPH1001_func_1FC03CF0_cont_BFC03D38 }, - { 0x1FC03D4Cu, SCPH1001_func_1FC03CF0_cont_BFC03D4C }, - { 0x1FC03D60u, SCPH1001_func_1FC03CF0_cont_BFC03D60 }, - { 0x1FC03D80u, SCPH1001_func_1FC03D80 }, - { 0x1FC03DBCu, SCPH1001_func_1FC03D80_cont_BFC03DBC }, - { 0x1FC03DCCu, SCPH1001_func_1FC03D80_cont_BFC03DCC }, - { 0x1FC03DD4u, SCPH1001_func_1FC03D80_cont_BFC03DD4 }, - { 0x1FC03DDCu, SCPH1001_func_1FC03D80_cont_BFC03DDC }, - { 0x1FC03DFCu, SCPH1001_func_1FC03D80_cont_BFC03DFC }, - { 0x1FC03E04u, SCPH1001_func_1FC03D80_cont_BFC03E04 }, - { 0x1FC03E68u, SCPH1001_func_1FC03D80_cont_BFC03E68 }, - { 0x1FC03E70u, SCPH1001_func_1FC03D80_cont_BFC03E70 }, - { 0x1FC03E88u, SCPH1001_func_1FC03D80_cont_BFC03E88 }, - { 0x1FC03E8Cu, SCPH1001_func_1FC03D80_cont_BFC03E8C }, - { 0x1FC03EA0u, SCPH1001_func_1FC03EA0 }, - { 0x1FC03EBCu, SCPH1001_func_1FC03EA0_cont_BFC03EBC }, - { 0x1FC03F5Cu, SCPH1001_func_1FC03EA0_cont_BFC03F5C }, - { 0x1FC03F60u, SCPH1001_func_1FC03EA0_cont_BFC03F60 }, - { 0x1FC03F8Cu, SCPH1001_func_1FC03F8C }, - { 0x1FC03FACu, SCPH1001_func_1FC03FAC }, - { 0x1FC03FBCu, SCPH1001_func_1FC03FAC_cont_BFC03FBC }, - { 0x1FC03FC0u, SCPH1001_func_1FC03FC0 }, - { 0x1FC03FE0u, SCPH1001_func_1FC03FE0 }, - { 0x1FC03FF4u, SCPH1001_func_1FC03FE0_cont_BFC03FF4 }, - { 0x1FC04008u, SCPH1001_func_1FC03FE0_cont_BFC04008 }, - { 0x1FC04014u, SCPH1001_func_1FC03FE0_cont_BFC04014 }, - { 0x1FC0402Cu, SCPH1001_func_1FC03FE0_cont_BFC0402C }, - { 0x1FC0403Cu, SCPH1001_func_1FC0403C }, - { 0x1FC04058u, SCPH1001_func_1FC0403C_cont_BFC04058 }, - { 0x1FC04060u, SCPH1001_func_1FC0403C_cont_BFC04060 }, - { 0x1FC040BCu, SCPH1001_func_1FC0403C_cont_BFC040BC }, - { 0x1FC040DCu, SCPH1001_func_1FC0403C_cont_BFC040DC }, - { 0x1FC040ECu, SCPH1001_func_1FC040EC }, - { 0x1FC04120u, SCPH1001_func_1FC04120 }, - { 0x1FC04138u, SCPH1001_func_1FC04138 }, - { 0x1FC0415Cu, SCPH1001_func_1FC04138_cont_BFC0415C }, - { 0x1FC04170u, SCPH1001_func_1FC04138_cont_BFC04170 }, - { 0x1FC04174u, SCPH1001_func_1FC04138_cont_BFC04174 }, - { 0x1FC0417Cu, SCPH1001_func_1FC04138_cont_BFC0417C }, - { 0x1FC04188u, SCPH1001_func_1FC04138_cont_BFC04188 }, - { 0x1FC04190u, SCPH1001_func_1FC04138_cont_BFC04190 }, - { 0x1FC041A4u, SCPH1001_func_1FC04138_cont_BFC041A4 }, - { 0x1FC041ACu, SCPH1001_func_1FC04138_cont_BFC041AC }, - { 0x1FC041CCu, SCPH1001_func_1FC04138_cont_BFC041CC }, - { 0x1FC041D0u, SCPH1001_func_1FC04138_cont_BFC041D0 }, - { 0x1FC041D8u, SCPH1001_func_1FC04138_cont_BFC041D8 }, - { 0x1FC041E4u, SCPH1001_func_1FC04138_cont_BFC041E4 }, - { 0x1FC041ECu, SCPH1001_func_1FC04138_cont_BFC041EC }, - { 0x1FC04200u, SCPH1001_func_1FC04138_cont_BFC04200 }, - { 0x1FC04214u, SCPH1001_func_1FC04138_cont_BFC04214 }, - { 0x1FC04228u, SCPH1001_func_1FC04138_cont_BFC04228 }, - { 0x1FC0422Cu, SCPH1001_func_1FC04138_cont_BFC0422C }, - { 0x1FC04234u, SCPH1001_func_1FC04138_cont_BFC04234 }, - { 0x1FC04240u, SCPH1001_func_1FC04138_cont_BFC04240 }, - { 0x1FC04248u, SCPH1001_func_1FC04138_cont_BFC04248 }, - { 0x1FC04250u, SCPH1001_func_1FC04138_cont_BFC04250 }, - { 0x1FC04260u, SCPH1001_func_1FC04260 }, - { 0x1FC04284u, SCPH1001_func_1FC04260_cont_BFC04284 }, - { 0x1FC0428Cu, SCPH1001_func_1FC04260_cont_BFC0428C }, - { 0x1FC042A0u, SCPH1001_func_1FC042A0 }, - { 0x1FC042B4u, SCPH1001_func_1FC042A0_cont_BFC042B4 }, - { 0x1FC042C8u, SCPH1001_func_1FC042A0_cont_BFC042C8 }, - { 0x1FC042D0u, SCPH1001_func_1FC042D0 }, - { 0x1FC042E4u, SCPH1001_func_1FC042D0_cont_BFC042E4 }, - { 0x1FC042F8u, SCPH1001_func_1FC042D0_cont_BFC042F8 }, - { 0x1FC04610u, SCPH1001_func_1FC04610 }, - { 0x1FC0462Cu, SCPH1001_func_1FC04610_cont_BFC0462C }, - { 0x1FC04638u, SCPH1001_func_1FC04610_cont_BFC04638 }, - { 0x1FC04640u, SCPH1001_func_1FC04610_cont_BFC04640 }, - { 0x1FC0464Cu, SCPH1001_func_1FC04610_cont_BFC0464C }, - { 0x1FC04668u, SCPH1001_func_1FC04610_cont_BFC04668 }, - { 0x1FC04678u, SCPH1001_func_1FC04678 }, - { 0x1FC04698u, SCPH1001_func_1FC04678_cont_BFC04698 }, - { 0x1FC046C0u, SCPH1001_func_1FC04678_cont_BFC046C0 }, - { 0x1FC046CCu, SCPH1001_func_1FC04678_cont_BFC046CC }, - { 0x1FC046D4u, SCPH1001_func_1FC04678_cont_BFC046D4 }, - { 0x1FC046D8u, SCPH1001_func_1FC04678_cont_BFC046D8 }, - { 0x1FC04708u, SCPH1001_func_1FC04678_cont_BFC04708 }, - { 0x1FC04718u, SCPH1001_func_1FC04678_cont_BFC04718 }, - { 0x1FC0471Cu, SCPH1001_func_1FC04678_cont_BFC0471C }, - { 0x1FC0472Cu, SCPH1001_func_1FC0472C }, - { 0x1FC04754u, SCPH1001_func_1FC0472C_cont_BFC04754 }, - { 0x1FC04788u, SCPH1001_func_1FC0472C_cont_BFC04788 }, - { 0x1FC04790u, SCPH1001_func_1FC0472C_cont_BFC04790 }, - { 0x1FC04798u, SCPH1001_func_1FC0472C_cont_BFC04798 }, - { 0x1FC047A4u, SCPH1001_func_1FC0472C_cont_BFC047A4 }, - { 0x1FC047B0u, SCPH1001_func_1FC0472C_cont_BFC047B0 }, - { 0x1FC047B8u, SCPH1001_func_1FC0472C_cont_BFC047B8 }, - { 0x1FC047D4u, SCPH1001_func_1FC0472C_cont_BFC047D4 }, - { 0x1FC047E4u, SCPH1001_func_1FC0472C_cont_BFC047E4 }, - { 0x1FC047E8u, SCPH1001_func_1FC0472C_cont_BFC047E8 }, - { 0x1FC04808u, SCPH1001_func_1FC0472C_cont_BFC04808 }, - { 0x1FC0480Cu, SCPH1001_func_1FC0472C_cont_BFC0480C }, - { 0x1FC0481Cu, SCPH1001_func_1FC0472C_cont_BFC0481C }, - { 0x1FC0483Cu, SCPH1001_func_1FC0472C_cont_BFC0483C }, - { 0x1FC04850u, SCPH1001_func_1FC04850 }, - { 0x1FC04890u, SCPH1001_func_1FC04850_cont_BFC04890 }, - { 0x1FC048C0u, SCPH1001_func_1FC04850_cont_BFC048C0 }, - { 0x1FC048D0u, SCPH1001_func_1FC048D0 }, - { 0x1FC048ECu, SCPH1001_func_1FC048D0_cont_BFC048EC }, - { 0x1FC04900u, SCPH1001_func_1FC048D0_cont_BFC04900 }, - { 0x1FC04910u, SCPH1001_func_1FC04910 }, - { 0x1FC04934u, SCPH1001_func_1FC04910_cont_BFC04934 }, - { 0x1FC049DCu, SCPH1001_func_1FC04910_cont_BFC049DC }, - { 0x1FC049ECu, SCPH1001_func_1FC04910_cont_BFC049EC }, - { 0x1FC04A20u, SCPH1001_func_1FC04910_cont_BFC04A20 }, - { 0x1FC04A48u, SCPH1001_func_1FC04910_cont_BFC04A48 }, - { 0x1FC04A5Cu, SCPH1001_func_1FC04910_cont_BFC04A5C }, - { 0x1FC04A64u, SCPH1001_func_1FC04910_cont_BFC04A64 }, - { 0x1FC04A6Cu, SCPH1001_func_1FC04910_cont_BFC04A6C }, - { 0x1FC04A80u, SCPH1001_func_1FC04910_cont_BFC04A80 }, - { 0x1FC04A88u, SCPH1001_func_1FC04910_cont_BFC04A88 }, - { 0x1FC04A90u, SCPH1001_func_1FC04910_cont_BFC04A90 }, - { 0x1FC04AA0u, SCPH1001_func_1FC04AA0 }, - { 0x1FC04ABCu, SCPH1001_func_1FC04ABC }, - { 0x1FC04ACCu, SCPH1001_func_1FC04ABC_cont_BFC04ACC }, - { 0x1FC04AE0u, SCPH1001_func_1FC04ABC_cont_BFC04AE0 }, - { 0x1FC04AE8u, SCPH1001_func_1FC04ABC_cont_BFC04AE8 }, - { 0x1FC04AF0u, SCPH1001_func_1FC04ABC_cont_BFC04AF0 }, - { 0x1FC04B04u, SCPH1001_func_1FC04ABC_cont_BFC04B04 }, - { 0x1FC04B0Cu, SCPH1001_func_1FC04ABC_cont_BFC04B0C }, - { 0x1FC04B14u, SCPH1001_func_1FC04ABC_cont_BFC04B14 }, - { 0x1FC04B34u, SCPH1001_func_1FC04ABC_cont_BFC04B34 }, - { 0x1FC04B3Cu, SCPH1001_func_1FC04ABC_cont_BFC04B3C }, - { 0x1FC04B44u, SCPH1001_func_1FC04ABC_cont_BFC04B44 }, - { 0x1FC04B5Cu, SCPH1001_func_1FC04ABC_cont_BFC04B5C }, - { 0x1FC04B60u, SCPH1001_func_1FC04ABC_cont_BFC04B60 }, - { 0x1FC04B64u, SCPH1001_func_1FC04ABC_cont_BFC04B64 }, - { 0x1FC04B68u, SCPH1001_func_1FC04ABC_cont_BFC04B68 }, - { 0x1FC04BB4u, SCPH1001_func_1FC04ABC_cont_BFC04BB4 }, - { 0x1FC04BC4u, SCPH1001_func_1FC04BC4 }, - { 0x1FC04BE0u, SCPH1001_func_1FC04BC4_cont_BFC04BE0 }, - { 0x1FC04BE8u, SCPH1001_func_1FC04BC4_cont_BFC04BE8 }, - { 0x1FC04BF0u, SCPH1001_func_1FC04BC4_cont_BFC04BF0 }, - { 0x1FC04C28u, SCPH1001_func_1FC04BC4_cont_BFC04C28 }, - { 0x1FC04C38u, SCPH1001_func_1FC04C38 }, - { 0x1FC04C54u, SCPH1001_func_1FC04C38_cont_BFC04C54 }, - { 0x1FC04C5Cu, SCPH1001_func_1FC04C38_cont_BFC04C5C }, - { 0x1FC04C64u, SCPH1001_func_1FC04C38_cont_BFC04C64 }, - { 0x1FC04C70u, SCPH1001_func_1FC04C38_cont_BFC04C70 }, - { 0x1FC04CACu, SCPH1001_func_1FC04C38_cont_BFC04CAC }, - { 0x1FC04CBCu, SCPH1001_func_1FC04C38_cont_BFC04CBC }, - { 0x1FC04CC8u, SCPH1001_func_1FC04C38_cont_BFC04CC8 }, - { 0x1FC04CD8u, SCPH1001_func_1FC04C38_cont_BFC04CD8 }, - { 0x1FC04CDCu, SCPH1001_func_1FC04C38_cont_BFC04CDC }, - { 0x1FC04CE4u, SCPH1001_func_1FC04C38_cont_BFC04CE4 }, - { 0x1FC04D04u, SCPH1001_func_1FC04C38_cont_BFC04D04 }, - { 0x1FC04D0Cu, SCPH1001_func_1FC04C38_cont_BFC04D0C }, - { 0x1FC04D40u, SCPH1001_func_1FC04C38_cont_BFC04D40 }, - { 0x1FC04D50u, SCPH1001_func_1FC04D50 }, - { 0x1FC04D68u, SCPH1001_func_1FC04D50_cont_BFC04D68 }, - { 0x1FC04D70u, SCPH1001_func_1FC04D50_cont_BFC04D70 }, - { 0x1FC04D78u, SCPH1001_func_1FC04D50_cont_BFC04D78 }, - { 0x1FC04DA0u, SCPH1001_func_1FC04D50_cont_BFC04DA0 }, - { 0x1FC04DA8u, SCPH1001_func_1FC04D50_cont_BFC04DA8 }, - { 0x1FC04DDCu, SCPH1001_func_1FC04D50_cont_BFC04DDC }, - { 0x1FC04DECu, SCPH1001_func_1FC04DEC }, - { 0x1FC04E10u, SCPH1001_func_1FC04DEC_cont_BFC04E10 }, - { 0x1FC04E18u, SCPH1001_func_1FC04DEC_cont_BFC04E18 }, - { 0x1FC04E2Cu, SCPH1001_func_1FC04DEC_cont_BFC04E2C }, - { 0x1FC04E34u, SCPH1001_func_1FC04DEC_cont_BFC04E34 }, - { 0x1FC04E64u, SCPH1001_func_1FC04DEC_cont_BFC04E64 }, - { 0x1FC04E88u, SCPH1001_func_1FC04DEC_cont_BFC04E88 }, - { 0x1FC04EB8u, SCPH1001_func_1FC04DEC_cont_BFC04EB8 }, - { 0x1FC04EBCu, SCPH1001_func_1FC04DEC_cont_BFC04EBC }, - { 0x1FC04EC8u, SCPH1001_func_1FC04DEC_cont_BFC04EC8 }, - { 0x1FC04EE8u, SCPH1001_func_1FC04DEC_cont_BFC04EE8 }, - { 0x1FC04F18u, SCPH1001_func_1FC04DEC_cont_BFC04F18 }, - { 0x1FC04F1Cu, SCPH1001_func_1FC04DEC_cont_BFC04F1C }, - { 0x1FC04F2Cu, SCPH1001_func_1FC04DEC_cont_BFC04F2C }, - { 0x1FC04F48u, SCPH1001_func_1FC04DEC_cont_BFC04F48 }, - { 0x1FC04F50u, SCPH1001_func_1FC04DEC_cont_BFC04F50 }, - { 0x1FC04F58u, SCPH1001_func_1FC04DEC_cont_BFC04F58 }, - { 0x1FC04F60u, SCPH1001_func_1FC04DEC_cont_BFC04F60 }, - { 0x1FC04F68u, SCPH1001_func_1FC04DEC_cont_BFC04F68 }, - { 0x1FC04F70u, SCPH1001_func_1FC04DEC_cont_BFC04F70 }, - { 0x1FC04F78u, SCPH1001_func_1FC04DEC_cont_BFC04F78 }, - { 0x1FC04F80u, SCPH1001_func_1FC04DEC_cont_BFC04F80 }, - { 0x1FC04F88u, SCPH1001_func_1FC04DEC_cont_BFC04F88 }, - { 0x1FC04F90u, SCPH1001_func_1FC04DEC_cont_BFC04F90 }, - { 0x1FC04F98u, SCPH1001_func_1FC04DEC_cont_BFC04F98 }, - { 0x1FC04FA0u, SCPH1001_func_1FC04DEC_cont_BFC04FA0 }, - { 0x1FC04FA8u, SCPH1001_func_1FC04DEC_cont_BFC04FA8 }, - { 0x1FC04FACu, SCPH1001_func_1FC04DEC_cont_BFC04FAC }, - { 0x1FC04FBCu, SCPH1001_func_1FC04FBC }, - { 0x1FC04FE0u, SCPH1001_func_1FC04FBC_cont_BFC04FE0 }, - { 0x1FC04FE8u, SCPH1001_func_1FC04FBC_cont_BFC04FE8 }, - { 0x1FC04FFCu, SCPH1001_func_1FC04FBC_cont_BFC04FFC }, - { 0x1FC05004u, SCPH1001_func_1FC04FBC_cont_BFC05004 }, - { 0x1FC05040u, SCPH1001_func_1FC04FBC_cont_BFC05040 }, - { 0x1FC05050u, SCPH1001_func_1FC04FBC_cont_BFC05050 }, - { 0x1FC0505Cu, SCPH1001_func_1FC04FBC_cont_BFC0505C }, - { 0x1FC0506Cu, SCPH1001_func_1FC0506C }, - { 0x1FC05080u, SCPH1001_func_1FC0506C_cont_BFC05080 }, - { 0x1FC05094u, SCPH1001_func_1FC0506C_cont_BFC05094 }, - { 0x1FC050A4u, SCPH1001_func_1FC050A4 }, - { 0x1FC050B8u, SCPH1001_func_1FC050A4_cont_BFC050B8 }, - { 0x1FC050CCu, SCPH1001_func_1FC050A4_cont_BFC050CC }, - { 0x1FC050DCu, SCPH1001_func_1FC050DC }, - { 0x1FC050FCu, SCPH1001_func_1FC050FC }, - { 0x1FC05120u, SCPH1001_func_1FC05120 }, - { 0x1FC0515Cu, SCPH1001_func_1FC05120_cont_BFC0515C }, - { 0x1FC05160u, SCPH1001_func_1FC05120_cont_BFC05160 }, - { 0x1FC0518Cu, SCPH1001_func_1FC05120_cont_BFC0518C }, - { 0x1FC05194u, SCPH1001_func_1FC05194 }, - { 0x1FC051ACu, SCPH1001_func_1FC05194_cont_BFC051AC }, - { 0x1FC051B4u, SCPH1001_func_1FC05194_cont_BFC051B4 }, - { 0x1FC051BCu, SCPH1001_func_1FC05194_cont_BFC051BC }, - { 0x1FC051C8u, SCPH1001_func_1FC05194_cont_BFC051C8 }, - { 0x1FC051D0u, SCPH1001_func_1FC05194_cont_BFC051D0 }, - { 0x1FC051D8u, SCPH1001_func_1FC05194_cont_BFC051D8 }, - { 0x1FC051F0u, SCPH1001_func_1FC05194_cont_BFC051F0 }, - { 0x1FC051F8u, SCPH1001_func_1FC05194_cont_BFC051F8 }, - { 0x1FC05200u, SCPH1001_func_1FC05194_cont_BFC05200 }, - { 0x1FC05208u, SCPH1001_func_1FC05194_cont_BFC05208 }, - { 0x1FC05210u, SCPH1001_func_1FC05194_cont_BFC05210 }, - { 0x1FC05214u, SCPH1001_func_1FC05194_cont_BFC05214 }, - { 0x1FC05220u, SCPH1001_func_1FC05194_cont_BFC05220 }, - { 0x1FC05224u, SCPH1001_func_1FC05194_cont_BFC05224 }, - { 0x1FC0523Cu, SCPH1001_func_1FC05194_cont_BFC0523C }, - { 0x1FC05244u, SCPH1001_func_1FC05194_cont_BFC05244 }, - { 0x1FC0524Cu, SCPH1001_func_1FC05194_cont_BFC0524C }, - { 0x1FC05254u, SCPH1001_func_1FC05194_cont_BFC05254 }, - { 0x1FC0525Cu, SCPH1001_func_1FC05194_cont_BFC0525C }, - { 0x1FC05264u, SCPH1001_func_1FC05194_cont_BFC05264 }, - { 0x1FC0526Cu, SCPH1001_func_1FC05194_cont_BFC0526C }, - { 0x1FC05274u, SCPH1001_func_1FC05194_cont_BFC05274 }, - { 0x1FC0527Cu, SCPH1001_func_1FC05194_cont_BFC0527C }, - { 0x1FC05284u, SCPH1001_func_1FC05194_cont_BFC05284 }, - { 0x1FC0528Cu, SCPH1001_func_1FC05194_cont_BFC0528C }, - { 0x1FC05294u, SCPH1001_func_1FC05194_cont_BFC05294 }, - { 0x1FC0529Cu, SCPH1001_func_1FC05194_cont_BFC0529C }, - { 0x1FC052A4u, SCPH1001_func_1FC05194_cont_BFC052A4 }, - { 0x1FC052ACu, SCPH1001_func_1FC05194_cont_BFC052AC }, - { 0x1FC052B4u, SCPH1001_func_1FC05194_cont_BFC052B4 }, - { 0x1FC052BCu, SCPH1001_func_1FC05194_cont_BFC052BC }, - { 0x1FC052C4u, SCPH1001_func_1FC05194_cont_BFC052C4 }, - { 0x1FC052CCu, SCPH1001_func_1FC05194_cont_BFC052CC }, - { 0x1FC052D4u, SCPH1001_func_1FC05194_cont_BFC052D4 }, - { 0x1FC052DCu, SCPH1001_func_1FC05194_cont_BFC052DC }, - { 0x1FC052E4u, SCPH1001_func_1FC05194_cont_BFC052E4 }, - { 0x1FC052E8u, SCPH1001_func_1FC05194_cont_BFC052E8 }, - { 0x1FC052F4u, SCPH1001_func_1FC05194_cont_BFC052F4 }, - { 0x1FC052FCu, SCPH1001_func_1FC05194_cont_BFC052FC }, - { 0x1FC05300u, SCPH1001_func_1FC05194_cont_BFC05300 }, - { 0x1FC05308u, SCPH1001_func_1FC05194_cont_BFC05308 }, - { 0x1FC05310u, SCPH1001_func_1FC05194_cont_BFC05310 }, - { 0x1FC05318u, SCPH1001_func_1FC05194_cont_BFC05318 }, - { 0x1FC05320u, SCPH1001_func_1FC05194_cont_BFC05320 }, - { 0x1FC05328u, SCPH1001_func_1FC05194_cont_BFC05328 }, - { 0x1FC05330u, SCPH1001_func_1FC05194_cont_BFC05330 }, - { 0x1FC05338u, SCPH1001_func_1FC05194_cont_BFC05338 }, - { 0x1FC05340u, SCPH1001_func_1FC05194_cont_BFC05340 }, - { 0x1FC05348u, SCPH1001_func_1FC05194_cont_BFC05348 }, - { 0x1FC05350u, SCPH1001_func_1FC05194_cont_BFC05350 }, - { 0x1FC05358u, SCPH1001_func_1FC05194_cont_BFC05358 }, - { 0x1FC05360u, SCPH1001_func_1FC05194_cont_BFC05360 }, - { 0x1FC0536Cu, SCPH1001_func_1FC05194_cont_BFC0536C }, - { 0x1FC05374u, SCPH1001_func_1FC05194_cont_BFC05374 }, - { 0x1FC05380u, SCPH1001_func_1FC05194_cont_BFC05380 }, - { 0x1FC05388u, SCPH1001_func_1FC05194_cont_BFC05388 }, - { 0x1FC05394u, SCPH1001_func_1FC05194_cont_BFC05394 }, - { 0x1FC0539Cu, SCPH1001_func_1FC05194_cont_BFC0539C }, - { 0x1FC053A4u, SCPH1001_func_1FC05194_cont_BFC053A4 }, - { 0x1FC053ACu, SCPH1001_func_1FC05194_cont_BFC053AC }, - { 0x1FC053B8u, SCPH1001_func_1FC05194_cont_BFC053B8 }, - { 0x1FC053C0u, SCPH1001_func_1FC05194_cont_BFC053C0 }, - { 0x1FC053CCu, SCPH1001_func_1FC05194_cont_BFC053CC }, - { 0x1FC053D4u, SCPH1001_func_1FC05194_cont_BFC053D4 }, - { 0x1FC053DCu, SCPH1001_func_1FC05194_cont_BFC053DC }, - { 0x1FC053E4u, SCPH1001_func_1FC05194_cont_BFC053E4 }, - { 0x1FC053ECu, SCPH1001_func_1FC05194_cont_BFC053EC }, - { 0x1FC053F4u, SCPH1001_func_1FC05194_cont_BFC053F4 }, - { 0x1FC05400u, SCPH1001_func_1FC05194_cont_BFC05400 }, - { 0x1FC05408u, SCPH1001_func_1FC05194_cont_BFC05408 }, - { 0x1FC05414u, SCPH1001_func_1FC05194_cont_BFC05414 }, - { 0x1FC0541Cu, SCPH1001_func_1FC05194_cont_BFC0541C }, - { 0x1FC05424u, SCPH1001_func_1FC05194_cont_BFC05424 }, - { 0x1FC0542Cu, SCPH1001_func_1FC05194_cont_BFC0542C }, - { 0x1FC05438u, SCPH1001_func_1FC05194_cont_BFC05438 }, - { 0x1FC05440u, SCPH1001_func_1FC05194_cont_BFC05440 }, - { 0x1FC0544Cu, SCPH1001_func_1FC05194_cont_BFC0544C }, - { 0x1FC05454u, SCPH1001_func_1FC05194_cont_BFC05454 }, - { 0x1FC0545Cu, SCPH1001_func_1FC05194_cont_BFC0545C }, - { 0x1FC05464u, SCPH1001_func_1FC05194_cont_BFC05464 }, - { 0x1FC0546Cu, SCPH1001_func_1FC05194_cont_BFC0546C }, - { 0x1FC05474u, SCPH1001_func_1FC05194_cont_BFC05474 }, - { 0x1FC0547Cu, SCPH1001_func_1FC05194_cont_BFC0547C }, - { 0x1FC05484u, SCPH1001_func_1FC05194_cont_BFC05484 }, - { 0x1FC05490u, SCPH1001_func_1FC05194_cont_BFC05490 }, - { 0x1FC05498u, SCPH1001_func_1FC05194_cont_BFC05498 }, - { 0x1FC054A4u, SCPH1001_func_1FC05194_cont_BFC054A4 }, - { 0x1FC054ACu, SCPH1001_func_1FC05194_cont_BFC054AC }, - { 0x1FC054B4u, SCPH1001_func_1FC05194_cont_BFC054B4 }, - { 0x1FC054BCu, SCPH1001_func_1FC05194_cont_BFC054BC }, - { 0x1FC054C8u, SCPH1001_func_1FC05194_cont_BFC054C8 }, - { 0x1FC054D0u, SCPH1001_func_1FC05194_cont_BFC054D0 }, - { 0x1FC054DCu, SCPH1001_func_1FC05194_cont_BFC054DC }, - { 0x1FC054E4u, SCPH1001_func_1FC05194_cont_BFC054E4 }, - { 0x1FC054ECu, SCPH1001_func_1FC05194_cont_BFC054EC }, - { 0x1FC054F4u, SCPH1001_func_1FC05194_cont_BFC054F4 }, - { 0x1FC054FCu, SCPH1001_func_1FC05194_cont_BFC054FC }, - { 0x1FC05504u, SCPH1001_func_1FC05194_cont_BFC05504 }, - { 0x1FC05510u, SCPH1001_func_1FC05194_cont_BFC05510 }, - { 0x1FC05518u, SCPH1001_func_1FC05194_cont_BFC05518 }, - { 0x1FC05524u, SCPH1001_func_1FC05194_cont_BFC05524 }, - { 0x1FC0552Cu, SCPH1001_func_1FC05194_cont_BFC0552C }, - { 0x1FC05534u, SCPH1001_func_1FC05194_cont_BFC05534 }, - { 0x1FC0553Cu, SCPH1001_func_1FC05194_cont_BFC0553C }, - { 0x1FC05548u, SCPH1001_func_1FC05194_cont_BFC05548 }, - { 0x1FC0554Cu, SCPH1001_func_1FC05194_cont_BFC0554C }, - { 0x1FC05558u, SCPH1001_func_1FC05558 }, - { 0x1FC05580u, SCPH1001_func_1FC05558_cont_BFC05580 }, - { 0x1FC05588u, SCPH1001_func_1FC05558_cont_BFC05588 }, - { 0x1FC05590u, SCPH1001_func_1FC05558_cont_BFC05590 }, - { 0x1FC055A4u, SCPH1001_func_1FC05558_cont_BFC055A4 }, - { 0x1FC055ACu, SCPH1001_func_1FC05558_cont_BFC055AC }, - { 0x1FC055B4u, SCPH1001_func_1FC05558_cont_BFC055B4 }, - { 0x1FC055C0u, SCPH1001_func_1FC05558_cont_BFC055C0 }, - { 0x1FC055C8u, SCPH1001_func_1FC05558_cont_BFC055C8 }, - { 0x1FC055D8u, SCPH1001_func_1FC05558_cont_BFC055D8 }, - { 0x1FC055F0u, SCPH1001_func_1FC05558_cont_BFC055F0 }, - { 0x1FC055F8u, SCPH1001_func_1FC05558_cont_BFC055F8 }, - { 0x1FC05614u, SCPH1001_func_1FC05558_cont_BFC05614 }, - { 0x1FC0561Cu, SCPH1001_func_1FC05558_cont_BFC0561C }, - { 0x1FC05640u, SCPH1001_func_1FC05558_cont_BFC05640 }, - { 0x1FC05648u, SCPH1001_func_1FC05558_cont_BFC05648 }, - { 0x1FC05664u, SCPH1001_func_1FC05558_cont_BFC05664 }, - { 0x1FC05674u, SCPH1001_func_1FC05558_cont_BFC05674 }, - { 0x1FC056A4u, SCPH1001_func_1FC05558_cont_BFC056A4 }, - { 0x1FC056C0u, SCPH1001_func_1FC05558_cont_BFC056C0 }, - { 0x1FC056C8u, SCPH1001_func_1FC05558_cont_BFC056C8 }, - { 0x1FC056CCu, SCPH1001_func_1FC05558_cont_BFC056CC }, - { 0x1FC056D8u, SCPH1001_func_1FC05558_cont_BFC056D8 }, - { 0x1FC056E0u, SCPH1001_func_1FC05558_cont_BFC056E0 }, - { 0x1FC056E4u, SCPH1001_func_1FC05558_cont_BFC056E4 }, - { 0x1FC056ECu, SCPH1001_func_1FC05558_cont_BFC056EC }, - { 0x1FC056F4u, SCPH1001_func_1FC05558_cont_BFC056F4 }, - { 0x1FC056FCu, SCPH1001_func_1FC05558_cont_BFC056FC }, - { 0x1FC05704u, SCPH1001_func_1FC05558_cont_BFC05704 }, - { 0x1FC0570Cu, SCPH1001_func_1FC05558_cont_BFC0570C }, - { 0x1FC05714u, SCPH1001_func_1FC05558_cont_BFC05714 }, - { 0x1FC0571Cu, SCPH1001_func_1FC05558_cont_BFC0571C }, - { 0x1FC05724u, SCPH1001_func_1FC05558_cont_BFC05724 }, - { 0x1FC05730u, SCPH1001_func_1FC05558_cont_BFC05730 }, - { 0x1FC05734u, SCPH1001_func_1FC05558_cont_BFC05734 }, - { 0x1FC0574Cu, SCPH1001_func_1FC05558_cont_BFC0574C }, - { 0x1FC05754u, SCPH1001_func_1FC05558_cont_BFC05754 }, - { 0x1FC05760u, SCPH1001_func_1FC05558_cont_BFC05760 }, - { 0x1FC05768u, SCPH1001_func_1FC05558_cont_BFC05768 }, - { 0x1FC05774u, SCPH1001_func_1FC05558_cont_BFC05774 }, - { 0x1FC0577Cu, SCPH1001_func_1FC05558_cont_BFC0577C }, - { 0x1FC05784u, SCPH1001_func_1FC05558_cont_BFC05784 }, - { 0x1FC0578Cu, SCPH1001_func_1FC05558_cont_BFC0578C }, - { 0x1FC05798u, SCPH1001_func_1FC05558_cont_BFC05798 }, - { 0x1FC057A0u, SCPH1001_func_1FC05558_cont_BFC057A0 }, - { 0x1FC057A4u, SCPH1001_func_1FC05558_cont_BFC057A4 }, - { 0x1FC057B0u, SCPH1001_func_1FC057B0 }, - { 0x1FC057ECu, SCPH1001_func_1FC057B0_cont_BFC057EC }, - { 0x1FC05828u, SCPH1001_func_1FC057B0_cont_BFC05828 }, - { 0x1FC05860u, SCPH1001_func_1FC057B0_cont_BFC05860 }, - { 0x1FC05864u, SCPH1001_func_1FC057B0_cont_BFC05864 }, - { 0x1FC05888u, SCPH1001_func_1FC057B0_cont_BFC05888 }, - { 0x1FC05890u, SCPH1001_func_1FC057B0_cont_BFC05890 }, - { 0x1FC05894u, SCPH1001_func_1FC057B0_cont_BFC05894 }, - { 0x1FC0589Cu, SCPH1001_func_1FC057B0_cont_BFC0589C }, - { 0x1FC058ACu, SCPH1001_func_1FC057B0_cont_BFC058AC }, - { 0x1FC058C0u, SCPH1001_func_1FC057B0_cont_BFC058C0 }, - { 0x1FC058ECu, SCPH1001_func_1FC057B0_cont_BFC058EC }, - { 0x1FC058F4u, SCPH1001_func_1FC057B0_cont_BFC058F4 }, - { 0x1FC0592Cu, SCPH1001_func_1FC057B0_cont_BFC0592C }, - { 0x1FC05930u, SCPH1001_func_1FC057B0_cont_BFC05930 }, - { 0x1FC0593Cu, SCPH1001_func_1FC0593C }, - { 0x1FC05964u, SCPH1001_func_1FC0593C_cont_BFC05964 }, - { 0x1FC05970u, SCPH1001_func_1FC0593C_cont_BFC05970 }, - { 0x1FC05984u, SCPH1001_func_1FC0593C_cont_BFC05984 }, - { 0x1FC0598Cu, SCPH1001_func_1FC0593C_cont_BFC0598C }, - { 0x1FC05994u, SCPH1001_func_1FC0593C_cont_BFC05994 }, - { 0x1FC0599Cu, SCPH1001_func_1FC0593C_cont_BFC0599C }, - { 0x1FC059A8u, SCPH1001_func_1FC0593C_cont_BFC059A8 }, - { 0x1FC059B4u, SCPH1001_func_1FC0593C_cont_BFC059B4 }, - { 0x1FC059BCu, SCPH1001_func_1FC0593C_cont_BFC059BC }, - { 0x1FC059C4u, SCPH1001_func_1FC0593C_cont_BFC059C4 }, - { 0x1FC059CCu, SCPH1001_func_1FC0593C_cont_BFC059CC }, - { 0x1FC059D4u, SCPH1001_func_1FC0593C_cont_BFC059D4 }, - { 0x1FC059D8u, SCPH1001_func_1FC0593C_cont_BFC059D8 }, - { 0x1FC059E0u, SCPH1001_func_1FC0593C_cont_BFC059E0 }, - { 0x1FC059E8u, SCPH1001_func_1FC0593C_cont_BFC059E8 }, - { 0x1FC059F0u, SCPH1001_func_1FC0593C_cont_BFC059F0 }, - { 0x1FC059F8u, SCPH1001_func_1FC0593C_cont_BFC059F8 }, - { 0x1FC05A00u, SCPH1001_func_1FC0593C_cont_BFC05A00 }, - { 0x1FC05A04u, SCPH1001_func_1FC0593C_cont_BFC05A04 }, - { 0x1FC05A0Cu, SCPH1001_func_1FC0593C_cont_BFC05A0C }, - { 0x1FC05A1Cu, SCPH1001_func_1FC0593C_cont_BFC05A1C }, - { 0x1FC05A24u, SCPH1001_func_1FC0593C_cont_BFC05A24 }, - { 0x1FC05A28u, SCPH1001_func_1FC0593C_cont_BFC05A28 }, - { 0x1FC05A34u, SCPH1001_func_1FC0593C_cont_BFC05A34 }, - { 0x1FC05A38u, SCPH1001_func_1FC0593C_cont_BFC05A38 }, - { 0x1FC05A44u, SCPH1001_func_1FC05A44 }, - { 0x1FC05A5Cu, SCPH1001_func_1FC05A44_cont_BFC05A5C }, - { 0x1FC05A68u, SCPH1001_func_1FC05A44_cont_BFC05A68 }, - { 0x1FC05A7Cu, SCPH1001_func_1FC05A44_cont_BFC05A7C }, - { 0x1FC05A84u, SCPH1001_func_1FC05A44_cont_BFC05A84 }, - { 0x1FC05A98u, SCPH1001_func_1FC05A44_cont_BFC05A98 }, - { 0x1FC05AA8u, SCPH1001_func_1FC05A44_cont_BFC05AA8 }, - { 0x1FC05AB4u, SCPH1001_func_1FC05A44_cont_BFC05AB4 }, - { 0x1FC05ABCu, SCPH1001_func_1FC05A44_cont_BFC05ABC }, - { 0x1FC05AC4u, SCPH1001_func_1FC05A44_cont_BFC05AC4 }, - { 0x1FC05ACCu, SCPH1001_func_1FC05A44_cont_BFC05ACC }, - { 0x1FC05AD0u, SCPH1001_func_1FC05A44_cont_BFC05AD0 }, - { 0x1FC05AD8u, SCPH1001_func_1FC05A44_cont_BFC05AD8 }, - { 0x1FC05AE4u, SCPH1001_func_1FC05A44_cont_BFC05AE4 }, - { 0x1FC05AECu, SCPH1001_func_1FC05A44_cont_BFC05AEC }, - { 0x1FC05AF8u, SCPH1001_func_1FC05A44_cont_BFC05AF8 }, - { 0x1FC05B00u, SCPH1001_func_1FC05A44_cont_BFC05B00 }, - { 0x1FC05B14u, SCPH1001_func_1FC05A44_cont_BFC05B14 }, - { 0x1FC05B1Cu, SCPH1001_func_1FC05A44_cont_BFC05B1C }, - { 0x1FC05B30u, SCPH1001_func_1FC05A44_cont_BFC05B30 }, - { 0x1FC05B34u, SCPH1001_func_1FC05A44_cont_BFC05B34 }, - { 0x1FC05B44u, SCPH1001_func_1FC05A44_cont_BFC05B44 }, - { 0x1FC05B58u, SCPH1001_func_1FC05A44_cont_BFC05B58 }, - { 0x1FC05B60u, SCPH1001_func_1FC05A44_cont_BFC05B60 }, - { 0x1FC05B68u, SCPH1001_func_1FC05A44_cont_BFC05B68 }, - { 0x1FC05B6Cu, SCPH1001_func_1FC05A44_cont_BFC05B6C }, - { 0x1FC05B74u, SCPH1001_func_1FC05A44_cont_BFC05B74 }, - { 0x1FC05B80u, SCPH1001_func_1FC05A44_cont_BFC05B80 }, - { 0x1FC05B88u, SCPH1001_func_1FC05A44_cont_BFC05B88 }, - { 0x1FC05B94u, SCPH1001_func_1FC05A44_cont_BFC05B94 }, - { 0x1FC05B9Cu, SCPH1001_func_1FC05A44_cont_BFC05B9C }, - { 0x1FC05BA8u, SCPH1001_func_1FC05A44_cont_BFC05BA8 }, - { 0x1FC05BACu, SCPH1001_func_1FC05A44_cont_BFC05BAC }, - { 0x1FC05BBCu, SCPH1001_func_1FC05A44_cont_BFC05BBC }, - { 0x1FC05BCCu, SCPH1001_func_1FC05A44_cont_BFC05BCC }, - { 0x1FC05BE0u, SCPH1001_func_1FC05A44_cont_BFC05BE0 }, - { 0x1FC05BF0u, SCPH1001_func_1FC05A44_cont_BFC05BF0 }, - { 0x1FC05BF8u, SCPH1001_func_1FC05A44_cont_BFC05BF8 }, - { 0x1FC05BFCu, SCPH1001_func_1FC05A44_cont_BFC05BFC }, - { 0x1FC05C08u, SCPH1001_func_1FC05A44_cont_BFC05C08 }, - { 0x1FC05C0Cu, SCPH1001_func_1FC05A44_cont_BFC05C0C }, - { 0x1FC05C18u, SCPH1001_func_1FC05C18 }, - { 0x1FC05C20u, SCPH1001_func_1FC05C18_cont_BFC05C20 }, - { 0x1FC05C28u, SCPH1001_func_1FC05C18_cont_BFC05C28 }, - { 0x1FC05C2Cu, SCPH1001_func_1FC05C18_cont_BFC05C2C }, - { 0x1FC05C50u, SCPH1001_func_1FC05C50 }, - { 0x1FC05C94u, SCPH1001_func_1FC05C50_cont_BFC05C94 }, - { 0x1FC05CB0u, SCPH1001_func_1FC05C50_cont_BFC05CB0 }, - { 0x1FC05CC4u, SCPH1001_func_1FC05C50_cont_BFC05CC4 }, - { 0x1FC05CD8u, SCPH1001_func_1FC05C50_cont_BFC05CD8 }, - { 0x1FC05CE4u, SCPH1001_func_1FC05C50_cont_BFC05CE4 }, - { 0x1FC05CF4u, SCPH1001_func_1FC05C50_cont_BFC05CF4 }, - { 0x1FC05D04u, SCPH1001_func_1FC05D04 }, - { 0x1FC05D20u, SCPH1001_func_1FC05D04_cont_BFC05D20 }, - { 0x1FC05D3Cu, SCPH1001_func_1FC05D04_cont_BFC05D3C }, - { 0x1FC05D6Cu, SCPH1001_func_1FC05D04_cont_BFC05D6C }, - { 0x1FC05D84u, SCPH1001_func_1FC05D04_cont_BFC05D84 }, - { 0x1FC05D90u, SCPH1001_func_1FC05D04_cont_BFC05D90 }, - { 0x1FC05DA0u, SCPH1001_func_1FC05D04_cont_BFC05DA0 }, - { 0x1FC05DB0u, SCPH1001_func_1FC05DB0 }, - { 0x1FC05DE4u, SCPH1001_func_1FC05DB0_cont_BFC05DE4 }, - { 0x1FC05DF4u, SCPH1001_func_1FC05DF4 }, - { 0x1FC05E1Cu, SCPH1001_func_1FC05DF4_cont_BFC05E1C }, - { 0x1FC05E2Cu, SCPH1001_func_1FC05DF4_cont_BFC05E2C }, - { 0x1FC05E48u, SCPH1001_func_1FC05DF4_cont_BFC05E48 }, - { 0x1FC05E58u, SCPH1001_func_1FC05E58 }, - { 0x1FC05E7Cu, SCPH1001_func_1FC05E58_cont_BFC05E7C }, - { 0x1FC05E90u, SCPH1001_func_1FC05E58_cont_BFC05E90 }, - { 0x1FC05EA0u, SCPH1001_func_1FC05E58_cont_BFC05EA0 }, - { 0x1FC05EA4u, SCPH1001_func_1FC05E58_cont_BFC05EA4 }, - { 0x1FC05EACu, SCPH1001_func_1FC05E58_cont_BFC05EAC }, - { 0x1FC05EC0u, SCPH1001_func_1FC05E58_cont_BFC05EC0 }, - { 0x1FC05ED4u, SCPH1001_func_1FC05E58_cont_BFC05ED4 }, - { 0x1FC05EE4u, SCPH1001_func_1FC05E58_cont_BFC05EE4 }, - { 0x1FC05EE8u, SCPH1001_func_1FC05E58_cont_BFC05EE8 }, - { 0x1FC05EF0u, SCPH1001_func_1FC05E58_cont_BFC05EF0 }, - { 0x1FC05F08u, SCPH1001_func_1FC05F08 }, - { 0x1FC05F1Cu, SCPH1001_func_1FC05F08_cont_BFC05F1C }, - { 0x1FC05F94u, SCPH1001_func_1FC05F08_cont_BFC05F94 }, - { 0x1FC05FC8u, SCPH1001_func_1FC05F08_cont_BFC05FC8 }, - { 0x1FC05FECu, SCPH1001_func_1FC05F08_cont_BFC05FEC }, - { 0x1FC05FF4u, SCPH1001_func_1FC05F08_cont_BFC05FF4 }, - { 0x1FC06000u, SCPH1001_func_1FC05F08_cont_BFC06000 }, - { 0x1FC06004u, SCPH1001_func_1FC05F08_cont_BFC06004 }, - { 0x1FC06010u, SCPH1001_func_1FC06010 }, - { 0x1FC06028u, SCPH1001_func_1FC06010_cont_BFC06028 }, - { 0x1FC06038u, SCPH1001_func_1FC06038 }, - { 0x1FC0608Cu, SCPH1001_func_1FC06038_cont_BFC0608C }, - { 0x1FC060BCu, SCPH1001_func_1FC06038_cont_BFC060BC }, - { 0x1FC060CCu, SCPH1001_func_1FC06038_cont_BFC060CC }, - { 0x1FC060DCu, SCPH1001_func_1FC060DC }, - { 0x1FC0610Cu, SCPH1001_func_1FC060DC_cont_BFC0610C }, - { 0x1FC06114u, SCPH1001_func_1FC060DC_cont_BFC06114 }, - { 0x1FC06130u, SCPH1001_func_1FC060DC_cont_BFC06130 }, - { 0x1FC06134u, SCPH1001_func_1FC060DC_cont_BFC06134 }, - { 0x1FC0614Cu, SCPH1001_func_1FC060DC_cont_BFC0614C }, - { 0x1FC0615Cu, SCPH1001_func_1FC0615C }, - { 0x1FC06190u, SCPH1001_func_1FC0615C_cont_BFC06190 }, - { 0x1FC061A0u, SCPH1001_func_1FC061A0 }, - { 0x1FC061C4u, SCPH1001_func_1FC061A0_cont_BFC061C4 }, - { 0x1FC061D4u, SCPH1001_func_1FC061D4 }, - { 0x1FC06208u, SCPH1001_func_1FC061D4_cont_BFC06208 }, - { 0x1FC06218u, SCPH1001_func_1FC06218 }, - { 0x1FC0623Cu, SCPH1001_func_1FC06218_cont_BFC0623C }, - { 0x1FC06244u, SCPH1001_func_1FC06218_cont_BFC06244 }, - { 0x1FC0624Cu, SCPH1001_func_1FC06218_cont_BFC0624C }, - { 0x1FC06250u, SCPH1001_func_1FC06218_cont_BFC06250 }, - { 0x1FC0627Cu, SCPH1001_func_1FC06218_cont_BFC0627C }, - { 0x1FC06288u, SCPH1001_func_1FC06288 }, - { 0x1FC062CCu, SCPH1001_func_1FC062CC }, - { 0x1FC06358u, SCPH1001_func_1FC062CC_cont_BFC06358 }, - { 0x1FC06364u, SCPH1001_func_1FC062CC_cont_BFC06364 }, - { 0x1FC0636Cu, SCPH1001_func_1FC062CC_cont_BFC0636C }, - { 0x1FC063C0u, SCPH1001_func_1FC062CC_cont_BFC063C0 }, - { 0x1FC063CCu, SCPH1001_func_1FC063CC }, - { 0x1FC06420u, SCPH1001_func_1FC063CC_cont_BFC06420 }, - { 0x1FC0643Cu, SCPH1001_func_1FC063CC_cont_BFC0643C }, - { 0x1FC06444u, SCPH1001_func_1FC063CC_cont_BFC06444 }, - { 0x1FC06464u, SCPH1001_func_1FC063CC_cont_BFC06464 }, - { 0x1FC0646Cu, SCPH1001_func_1FC063CC_cont_BFC0646C }, - { 0x1FC06474u, SCPH1001_func_1FC063CC_cont_BFC06474 }, - { 0x1FC06478u, SCPH1001_func_1FC063CC_cont_BFC06478 }, - { 0x1FC064CCu, SCPH1001_func_1FC063CC_cont_BFC064CC }, - { 0x1FC064D8u, SCPH1001_func_1FC064D8 }, - { 0x1FC064F0u, SCPH1001_func_1FC064D8_cont_BFC064F0 }, - { 0x1FC06500u, SCPH1001_func_1FC064D8_cont_BFC06500 }, - { 0x1FC06510u, SCPH1001_func_1FC064D8_cont_BFC06510 }, - { 0x1FC06520u, SCPH1001_func_1FC064D8_cont_BFC06520 }, - { 0x1FC06530u, SCPH1001_func_1FC064D8_cont_BFC06530 }, - { 0x1FC06548u, SCPH1001_func_1FC06548 }, - { 0x1FC06568u, SCPH1001_func_1FC06548_cont_BFC06568 }, - { 0x1FC06574u, SCPH1001_func_1FC06548_cont_BFC06574 }, - { 0x1FC06580u, SCPH1001_func_1FC06548_cont_BFC06580 }, - { 0x1FC0658Cu, SCPH1001_func_1FC06548_cont_BFC0658C }, - { 0x1FC06598u, SCPH1001_func_1FC06548_cont_BFC06598 }, - { 0x1FC065A4u, SCPH1001_func_1FC06548_cont_BFC065A4 }, - { 0x1FC065B0u, SCPH1001_func_1FC06548_cont_BFC065B0 }, - { 0x1FC065C0u, SCPH1001_func_1FC065C0 }, - { 0x1FC0661Cu, SCPH1001_func_1FC0661C }, - { 0x1FC06680u, SCPH1001_func_1FC06680 }, - { 0x1FC066ACu, SCPH1001_func_1FC06680_cont_BFC066AC }, - { 0x1FC066B4u, SCPH1001_func_1FC06680_cont_BFC066B4 }, - { 0x1FC066BCu, SCPH1001_func_1FC06680_cont_BFC066BC }, - { 0x1FC066C4u, SCPH1001_func_1FC06680_cont_BFC066C4 }, - { 0x1FC066C8u, SCPH1001_func_1FC06680_cont_BFC066C8 }, - { 0x1FC066CCu, SCPH1001_func_1FC06680_cont_BFC066CC }, - { 0x1FC066DCu, SCPH1001_func_1FC06680_cont_BFC066DC }, - { 0x1FC066E4u, SCPH1001_func_1FC06680_cont_BFC066E4 }, - { 0x1FC066F0u, SCPH1001_func_1FC06680_cont_BFC066F0 }, - { 0x1FC066F4u, SCPH1001_func_1FC06680_cont_BFC066F4 }, - { 0x1FC06700u, SCPH1001_func_1FC06700 }, - { 0x1FC06718u, SCPH1001_func_1FC06700_cont_BFC06718 }, - { 0x1FC06728u, SCPH1001_func_1FC06728 }, - { 0x1FC06750u, SCPH1001_func_1FC06750 }, - { 0x1FC06774u, SCPH1001_func_1FC06750_cont_BFC06774 }, - { 0x1FC06784u, SCPH1001_func_1FC06784 }, - { 0x1FC0679Cu, SCPH1001_func_1FC06784_cont_BFC0679C }, - { 0x1FC067ACu, SCPH1001_func_1FC06784_cont_BFC067AC }, - { 0x1FC067BCu, SCPH1001_func_1FC06784_cont_BFC067BC }, - { 0x1FC067CCu, SCPH1001_func_1FC06784_cont_BFC067CC }, - { 0x1FC067D8u, SCPH1001_func_1FC06784_cont_BFC067D8 }, - { 0x1FC067E8u, SCPH1001_func_1FC067E8 }, - { 0x1FC06800u, SCPH1001_func_1FC067E8_cont_BFC06800 }, - { 0x1FC06808u, SCPH1001_func_1FC067E8_cont_BFC06808 }, - { 0x1FC06814u, SCPH1001_func_1FC067E8_cont_BFC06814 }, - { 0x1FC06834u, SCPH1001_func_1FC067E8_cont_BFC06834 }, - { 0x1FC0683Cu, SCPH1001_func_1FC067E8_cont_BFC0683C }, - { 0x1FC06844u, SCPH1001_func_1FC067E8_cont_BFC06844 }, - { 0x1FC0684Cu, SCPH1001_func_1FC067E8_cont_BFC0684C }, - { 0x1FC06854u, SCPH1001_func_1FC067E8_cont_BFC06854 }, - { 0x1FC0685Cu, SCPH1001_func_1FC067E8_cont_BFC0685C }, - { 0x1FC06864u, SCPH1001_func_1FC067E8_cont_BFC06864 }, - { 0x1FC0686Cu, SCPH1001_func_1FC067E8_cont_BFC0686C }, - { 0x1FC06874u, SCPH1001_func_1FC067E8_cont_BFC06874 }, - { 0x1FC068ACu, SCPH1001_func_1FC067E8_cont_BFC068AC }, - { 0x1FC068B4u, SCPH1001_func_1FC067E8_cont_BFC068B4 }, - { 0x1FC068C0u, SCPH1001_func_1FC067E8_cont_BFC068C0 }, - { 0x1FC068C8u, SCPH1001_func_1FC067E8_cont_BFC068C8 }, - { 0x1FC068F8u, SCPH1001_func_1FC067E8_cont_BFC068F8 }, - { 0x1FC06904u, SCPH1001_func_1FC067E8_cont_BFC06904 }, - { 0x1FC06914u, SCPH1001_func_1FC067E8_cont_BFC06914 }, - { 0x1FC0691Cu, SCPH1001_func_1FC067E8_cont_BFC0691C }, - { 0x1FC06924u, SCPH1001_func_1FC067E8_cont_BFC06924 }, - { 0x1FC0692Cu, SCPH1001_func_1FC067E8_cont_BFC0692C }, - { 0x1FC0693Cu, SCPH1001_func_1FC067E8_cont_BFC0693C }, - { 0x1FC0694Cu, SCPH1001_func_1FC067E8_cont_BFC0694C }, - { 0x1FC06954u, SCPH1001_func_1FC067E8_cont_BFC06954 }, - { 0x1FC06978u, SCPH1001_func_1FC067E8_cont_BFC06978 }, - { 0x1FC06980u, SCPH1001_func_1FC067E8_cont_BFC06980 }, - { 0x1FC06988u, SCPH1001_func_1FC067E8_cont_BFC06988 }, - { 0x1FC06990u, SCPH1001_func_1FC067E8_cont_BFC06990 }, - { 0x1FC06998u, SCPH1001_func_1FC067E8_cont_BFC06998 }, - { 0x1FC069A0u, SCPH1001_func_1FC067E8_cont_BFC069A0 }, - { 0x1FC069B4u, SCPH1001_func_1FC067E8_cont_BFC069B4 }, - { 0x1FC069C0u, SCPH1001_func_1FC067E8_cont_BFC069C0 }, - { 0x1FC069C8u, SCPH1001_func_1FC067E8_cont_BFC069C8 }, - { 0x1FC069D0u, SCPH1001_func_1FC067E8_cont_BFC069D0 }, - { 0x1FC069D8u, SCPH1001_func_1FC067E8_cont_BFC069D8 }, - { 0x1FC069E4u, SCPH1001_func_1FC067E8_cont_BFC069E4 }, - { 0x1FC069ECu, SCPH1001_func_1FC067E8_cont_BFC069EC }, - { 0x1FC069F8u, SCPH1001_func_1FC067E8_cont_BFC069F8 }, - { 0x1FC06A04u, SCPH1001_func_1FC067E8_cont_BFC06A04 }, - { 0x1FC06A0Cu, SCPH1001_func_1FC067E8_cont_BFC06A0C }, - { 0x1FC06A14u, SCPH1001_func_1FC067E8_cont_BFC06A14 }, - { 0x1FC06A1Cu, SCPH1001_func_1FC067E8_cont_BFC06A1C }, - { 0x1FC06A28u, SCPH1001_func_1FC067E8_cont_BFC06A28 }, - { 0x1FC06A30u, SCPH1001_func_1FC067E8_cont_BFC06A30 }, - { 0x1FC06A38u, SCPH1001_func_1FC067E8_cont_BFC06A38 }, - { 0x1FC06A3Cu, SCPH1001_func_1FC067E8_cont_BFC06A3C }, - { 0x1FC06A44u, SCPH1001_func_1FC067E8_cont_BFC06A44 }, - { 0x1FC06A4Cu, SCPH1001_func_1FC067E8_cont_BFC06A4C }, - { 0x1FC06A5Cu, SCPH1001_func_1FC067E8_cont_BFC06A5C }, - { 0x1FC06A68u, SCPH1001_func_1FC067E8_cont_BFC06A68 }, - { 0x1FC06A70u, SCPH1001_func_1FC067E8_cont_BFC06A70 }, - { 0x1FC06A78u, SCPH1001_func_1FC067E8_cont_BFC06A78 }, - { 0x1FC06A7Cu, SCPH1001_func_1FC067E8_cont_BFC06A7C }, - { 0x1FC06A8Cu, SCPH1001_func_1FC067E8_cont_BFC06A8C }, - { 0x1FC06A94u, SCPH1001_func_1FC067E8_cont_BFC06A94 }, - { 0x1FC06AACu, SCPH1001_func_1FC067E8_cont_BFC06AAC }, - { 0x1FC06ABCu, SCPH1001_func_1FC067E8_cont_BFC06ABC }, - { 0x1FC06AC4u, SCPH1001_func_1FC067E8_cont_BFC06AC4 }, - { 0x1FC06AD8u, SCPH1001_func_1FC067E8_cont_BFC06AD8 }, - { 0x1FC06AE4u, SCPH1001_func_1FC067E8_cont_BFC06AE4 }, - { 0x1FC06AECu, SCPH1001_func_1FC067E8_cont_BFC06AEC }, - { 0x1FC06AF4u, SCPH1001_func_1FC067E8_cont_BFC06AF4 }, - { 0x1FC06B10u, SCPH1001_func_1FC067E8_cont_BFC06B10 }, - { 0x1FC06B18u, SCPH1001_func_1FC067E8_cont_BFC06B18 }, - { 0x1FC06B24u, SCPH1001_func_1FC067E8_cont_BFC06B24 }, - { 0x1FC06B2Cu, SCPH1001_func_1FC067E8_cont_BFC06B2C }, - { 0x1FC06B34u, SCPH1001_func_1FC067E8_cont_BFC06B34 }, - { 0x1FC06B50u, SCPH1001_func_1FC067E8_cont_BFC06B50 }, - { 0x1FC06B60u, SCPH1001_func_1FC067E8_cont_BFC06B60 }, - { 0x1FC06B6Cu, SCPH1001_func_1FC067E8_cont_BFC06B6C }, - { 0x1FC06B74u, SCPH1001_func_1FC067E8_cont_BFC06B74 }, - { 0x1FC06B7Cu, SCPH1001_func_1FC067E8_cont_BFC06B7C }, - { 0x1FC06B84u, SCPH1001_func_1FC067E8_cont_BFC06B84 }, - { 0x1FC06B98u, SCPH1001_func_1FC067E8_cont_BFC06B98 }, - { 0x1FC06BA4u, SCPH1001_func_1FC067E8_cont_BFC06BA4 }, - { 0x1FC06BACu, SCPH1001_func_1FC067E8_cont_BFC06BAC }, - { 0x1FC06BB4u, SCPH1001_func_1FC067E8_cont_BFC06BB4 }, - { 0x1FC06BBCu, SCPH1001_func_1FC067E8_cont_BFC06BBC }, - { 0x1FC06BD0u, SCPH1001_func_1FC067E8_cont_BFC06BD0 }, - { 0x1FC06BD8u, SCPH1001_func_1FC067E8_cont_BFC06BD8 }, - { 0x1FC06BE0u, SCPH1001_func_1FC067E8_cont_BFC06BE0 }, - { 0x1FC06C04u, SCPH1001_func_1FC067E8_cont_BFC06C04 }, - { 0x1FC06C20u, SCPH1001_func_1FC067E8_cont_BFC06C20 }, - { 0x1FC06C48u, SCPH1001_func_1FC067E8_cont_BFC06C48 }, - { 0x1FC06C50u, SCPH1001_func_1FC067E8_cont_BFC06C50 }, - { 0x1FC06C5Cu, SCPH1001_func_1FC067E8_cont_BFC06C5C }, - { 0x1FC06C64u, SCPH1001_func_1FC067E8_cont_BFC06C64 }, - { 0x1FC06C6Cu, SCPH1001_func_1FC067E8_cont_BFC06C6C }, - { 0x1FC06C80u, SCPH1001_func_1FC067E8_cont_BFC06C80 }, - { 0x1FC06C8Cu, SCPH1001_func_1FC067E8_cont_BFC06C8C }, - { 0x1FC06C94u, SCPH1001_func_1FC067E8_cont_BFC06C94 }, - { 0x1FC06CA4u, SCPH1001_func_1FC06CA4 }, - { 0x1FC06CC8u, SCPH1001_func_1FC06CA4_cont_BFC06CC8 }, - { 0x1FC06CD4u, SCPH1001_func_1FC06CA4_cont_BFC06CD4 }, - { 0x1FC06CDCu, SCPH1001_func_1FC06CA4_cont_BFC06CDC }, - { 0x1FC06CE4u, SCPH1001_func_1FC06CA4_cont_BFC06CE4 }, - { 0x1FC06CECu, SCPH1001_func_1FC06CA4_cont_BFC06CEC }, - { 0x1FC06CF4u, SCPH1001_func_1FC06CA4_cont_BFC06CF4 }, - { 0x1FC06CFCu, SCPH1001_func_1FC06CA4_cont_BFC06CFC }, - { 0x1FC06D1Cu, SCPH1001_func_1FC06CA4_cont_BFC06D1C }, - { 0x1FC06D28u, SCPH1001_func_1FC06CA4_cont_BFC06D28 }, - { 0x1FC06D30u, SCPH1001_func_1FC06CA4_cont_BFC06D30 }, - { 0x1FC06D40u, SCPH1001_func_1FC06CA4_cont_BFC06D40 }, - { 0x1FC06D48u, SCPH1001_func_1FC06CA4_cont_BFC06D48 }, - { 0x1FC06D50u, SCPH1001_func_1FC06CA4_cont_BFC06D50 }, - { 0x1FC06D58u, SCPH1001_func_1FC06CA4_cont_BFC06D58 }, - { 0x1FC06D68u, SCPH1001_func_1FC06CA4_cont_BFC06D68 }, - { 0x1FC06D78u, SCPH1001_func_1FC06CA4_cont_BFC06D78 }, - { 0x1FC06D80u, SCPH1001_func_1FC06CA4_cont_BFC06D80 }, - { 0x1FC06D94u, SCPH1001_func_1FC06CA4_cont_BFC06D94 }, - { 0x1FC06DA0u, SCPH1001_func_1FC06CA4_cont_BFC06DA0 }, - { 0x1FC06DA8u, SCPH1001_func_1FC06CA4_cont_BFC06DA8 }, - { 0x1FC06DB0u, SCPH1001_func_1FC06CA4_cont_BFC06DB0 }, - { 0x1FC06DB8u, SCPH1001_func_1FC06CA4_cont_BFC06DB8 }, - { 0x1FC06DC4u, SCPH1001_func_1FC06CA4_cont_BFC06DC4 }, - { 0x1FC06DCCu, SCPH1001_func_1FC06CA4_cont_BFC06DCC }, - { 0x1FC06DD4u, SCPH1001_func_1FC06CA4_cont_BFC06DD4 }, - { 0x1FC06DDCu, SCPH1001_func_1FC06CA4_cont_BFC06DDC }, - { 0x1FC06DF0u, SCPH1001_func_1FC06CA4_cont_BFC06DF0 }, - { 0x1FC06DF8u, SCPH1001_func_1FC06CA4_cont_BFC06DF8 }, - { 0x1FC06E00u, SCPH1001_func_1FC06CA4_cont_BFC06E00 }, - { 0x1FC06E24u, SCPH1001_func_1FC06CA4_cont_BFC06E24 }, - { 0x1FC06E40u, SCPH1001_func_1FC06CA4_cont_BFC06E40 }, - { 0x1FC06E68u, SCPH1001_func_1FC06CA4_cont_BFC06E68 }, - { 0x1FC06E70u, SCPH1001_func_1FC06CA4_cont_BFC06E70 }, - { 0x1FC06E7Cu, SCPH1001_func_1FC06CA4_cont_BFC06E7C }, - { 0x1FC06E84u, SCPH1001_func_1FC06CA4_cont_BFC06E84 }, - { 0x1FC06E8Cu, SCPH1001_func_1FC06CA4_cont_BFC06E8C }, - { 0x1FC06EA0u, SCPH1001_func_1FC06CA4_cont_BFC06EA0 }, - { 0x1FC06EACu, SCPH1001_func_1FC06CA4_cont_BFC06EAC }, - { 0x1FC06EB4u, SCPH1001_func_1FC06CA4_cont_BFC06EB4 }, - { 0x1FC06EC4u, SCPH1001_func_1FC06EC4 }, - { 0x1FC06ED4u, SCPH1001_func_1FC06EC4_cont_BFC06ED4 }, - { 0x1FC06EF0u, SCPH1001_func_1FC06EC4_cont_BFC06EF0 }, - { 0x1FC06EFCu, SCPH1001_func_1FC06EC4_cont_BFC06EFC }, - { 0x1FC06F04u, SCPH1001_func_1FC06EC4_cont_BFC06F04 }, - { 0x1FC06F0Cu, SCPH1001_func_1FC06EC4_cont_BFC06F0C }, - { 0x1FC06F18u, SCPH1001_func_1FC06EC4_cont_BFC06F18 }, - { 0x1FC06F28u, SCPH1001_func_1FC06F28 }, - { 0x1FC06F3Cu, SCPH1001_func_1FC06F28_cont_BFC06F3C }, - { 0x1FC06F4Cu, SCPH1001_func_1FC06F28_cont_BFC06F4C }, - { 0x1FC06F54u, SCPH1001_func_1FC06F28_cont_BFC06F54 }, - { 0x1FC06F5Cu, SCPH1001_func_1FC06F28_cont_BFC06F5C }, - { 0x1FC06F64u, SCPH1001_func_1FC06F28_cont_BFC06F64 }, - { 0x1FC06F74u, SCPH1001_func_1FC06F28_cont_BFC06F74 }, - { 0x1FC06F84u, SCPH1001_func_1FC06F28_cont_BFC06F84 }, - { 0x1FC06F8Cu, SCPH1001_func_1FC06F28_cont_BFC06F8C }, - { 0x1FC06F94u, SCPH1001_func_1FC06F28_cont_BFC06F94 }, - { 0x1FC06FA4u, SCPH1001_func_1FC06FA4 }, - { 0x1FC06FB8u, SCPH1001_func_1FC06FA4_cont_BFC06FB8 }, - { 0x1FC06FC4u, SCPH1001_func_1FC06FA4_cont_BFC06FC4 }, - { 0x1FC06FDCu, SCPH1001_func_1FC06FDC }, - { 0x1FC06FF0u, SCPH1001_func_1FC06FF0 }, - { 0x1FC07014u, SCPH1001_func_1FC06FF0_cont_BFC07014 }, - { 0x1FC0701Cu, SCPH1001_func_1FC06FF0_cont_BFC0701C }, - { 0x1FC0702Cu, SCPH1001_func_1FC06FF0_cont_BFC0702C }, - { 0x1FC0703Cu, SCPH1001_func_1FC0703C }, - { 0x1FC0705Cu, SCPH1001_func_1FC0703C_cont_BFC0705C }, - { 0x1FC07064u, SCPH1001_func_1FC0703C_cont_BFC07064 }, - { 0x1FC07078u, SCPH1001_func_1FC0703C_cont_BFC07078 }, - { 0x1FC07088u, SCPH1001_func_1FC0703C_cont_BFC07088 }, - { 0x1FC07098u, SCPH1001_func_1FC0703C_cont_BFC07098 }, - { 0x1FC070A4u, SCPH1001_func_1FC0703C_cont_BFC070A4 }, - { 0x1FC070ACu, SCPH1001_func_1FC070AC }, - { 0x1FC070CCu, SCPH1001_func_1FC070AC_cont_BFC070CC }, - { 0x1FC070D4u, SCPH1001_func_1FC070AC_cont_BFC070D4 }, - { 0x1FC070E8u, SCPH1001_func_1FC070AC_cont_BFC070E8 }, - { 0x1FC070F8u, SCPH1001_func_1FC070AC_cont_BFC070F8 }, - { 0x1FC07108u, SCPH1001_func_1FC070AC_cont_BFC07108 }, - { 0x1FC07114u, SCPH1001_func_1FC070AC_cont_BFC07114 }, - { 0x1FC0711Cu, SCPH1001_func_1FC0711C }, - { 0x1FC07138u, SCPH1001_func_1FC0711C_cont_BFC07138 }, - { 0x1FC07148u, SCPH1001_func_1FC07148 }, - { 0x1FC0715Cu, SCPH1001_func_1FC07148_cont_BFC0715C }, - { 0x1FC07170u, SCPH1001_func_1FC07148_cont_BFC07170 }, - { 0x1FC07184u, SCPH1001_func_1FC07148_cont_BFC07184 }, - { 0x1FC071A0u, SCPH1001_func_1FC071A0 }, - { 0x1FC071B0u, SCPH1001_func_1FC071A0_cont_BFC071B0 }, - { 0x1FC071C8u, SCPH1001_func_1FC071A0_cont_BFC071C8 }, - { 0x1FC071E8u, SCPH1001_func_1FC071A0_cont_BFC071E8 }, - { 0x1FC07208u, SCPH1001_func_1FC071A0_cont_BFC07208 }, - { 0x1FC07228u, SCPH1001_func_1FC071A0_cont_BFC07228 }, - { 0x1FC07248u, SCPH1001_func_1FC071A0_cont_BFC07248 }, - { 0x1FC0725Cu, SCPH1001_func_1FC071A0_cont_BFC0725C }, - { 0x1FC0726Cu, SCPH1001_func_1FC071A0_cont_BFC0726C }, - { 0x1FC0727Cu, SCPH1001_func_1FC071A0_cont_BFC0727C }, - { 0x1FC0728Cu, SCPH1001_func_1FC071A0_cont_BFC0728C }, - { 0x1FC0729Cu, SCPH1001_func_1FC071A0_cont_BFC0729C }, - { 0x1FC072A4u, SCPH1001_func_1FC071A0_cont_BFC072A4 }, - { 0x1FC072B8u, SCPH1001_func_1FC072B8 }, - { 0x1FC072C8u, SCPH1001_func_1FC072B8_cont_BFC072C8 }, - { 0x1FC072D8u, SCPH1001_func_1FC072B8_cont_BFC072D8 }, - { 0x1FC072E8u, SCPH1001_func_1FC072B8_cont_BFC072E8 }, - { 0x1FC072F8u, SCPH1001_func_1FC072B8_cont_BFC072F8 }, - { 0x1FC07308u, SCPH1001_func_1FC072B8_cont_BFC07308 }, - { 0x1FC07318u, SCPH1001_func_1FC072B8_cont_BFC07318 }, - { 0x1FC07320u, SCPH1001_func_1FC072B8_cont_BFC07320 }, - { 0x1FC07330u, SCPH1001_func_1FC07330 }, - { 0x1FC07340u, SCPH1001_func_1FC07330_cont_BFC07340 }, - { 0x1FC07348u, SCPH1001_func_1FC07330_cont_BFC07348 }, - { 0x1FC07350u, SCPH1001_func_1FC07330_cont_BFC07350 }, - { 0x1FC07358u, SCPH1001_func_1FC07330_cont_BFC07358 }, - { 0x1FC07360u, SCPH1001_func_1FC07330_cont_BFC07360 }, - { 0x1FC07364u, SCPH1001_func_1FC07330_cont_BFC07364 }, - { 0x1FC07370u, SCPH1001_func_1FC07370 }, - { 0x1FC07380u, SCPH1001_func_1FC07370_cont_BFC07380 }, - { 0x1FC07390u, SCPH1001_func_1FC07370_cont_BFC07390 }, - { 0x1FC073A0u, SCPH1001_func_1FC073A0 }, - { 0x1FC073B0u, SCPH1001_func_1FC073A0_cont_BFC073B0 }, - { 0x1FC073C8u, SCPH1001_func_1FC073A0_cont_BFC073C8 }, - { 0x1FC073CCu, SCPH1001_func_1FC073A0_cont_BFC073CC }, - { 0x1FC073F8u, SCPH1001_func_1FC073A0_cont_BFC073F8 }, - { 0x1FC07400u, SCPH1001_func_1FC073A0_cont_BFC07400 }, - { 0x1FC07410u, SCPH1001_func_1FC07410 }, - { 0x1FC07438u, SCPH1001_func_1FC07410_cont_BFC07438 }, - { 0x1FC07444u, SCPH1001_func_1FC07410_cont_BFC07444 }, - { 0x1FC0744Cu, SCPH1001_func_1FC07410_cont_BFC0744C }, - { 0x1FC07464u, SCPH1001_func_1FC07410_cont_BFC07464 }, - { 0x1FC0746Cu, SCPH1001_func_1FC07410_cont_BFC0746C }, - { 0x1FC07474u, SCPH1001_func_1FC07410_cont_BFC07474 }, - { 0x1FC074F0u, SCPH1001_func_1FC07410_cont_BFC074F0 }, - { 0x1FC074F8u, SCPH1001_func_1FC07410_cont_BFC074F8 }, - { 0x1FC07500u, SCPH1001_func_1FC07410_cont_BFC07500 }, - { 0x1FC07518u, SCPH1001_func_1FC07410_cont_BFC07518 }, - { 0x1FC07540u, SCPH1001_func_1FC07410_cont_BFC07540 }, - { 0x1FC07560u, SCPH1001_func_1FC07410_cont_BFC07560 }, - { 0x1FC07570u, SCPH1001_func_1FC07410_cont_BFC07570 }, - { 0x1FC07580u, SCPH1001_func_1FC07410_cont_BFC07580 }, - { 0x1FC075DCu, SCPH1001_func_1FC07410_cont_BFC075DC }, - { 0x1FC075F8u, SCPH1001_func_1FC07410_cont_BFC075F8 }, - { 0x1FC07604u, SCPH1001_func_1FC07410_cont_BFC07604 }, - { 0x1FC0760Cu, SCPH1001_func_1FC07410_cont_BFC0760C }, - { 0x1FC07618u, SCPH1001_func_1FC07410_cont_BFC07618 }, - { 0x1FC07620u, SCPH1001_func_1FC07410_cont_BFC07620 }, - { 0x1FC07630u, SCPH1001_func_1FC07410_cont_BFC07630 }, - { 0x1FC07650u, SCPH1001_func_1FC07410_cont_BFC07650 }, - { 0x1FC07664u, SCPH1001_func_1FC07664 }, - { 0x1FC0769Cu, SCPH1001_func_1FC07664_cont_BFC0769C }, - { 0x1FC076ACu, SCPH1001_func_1FC07664_cont_BFC076AC }, - { 0x1FC076B8u, SCPH1001_func_1FC07664_cont_BFC076B8 }, - { 0x1FC076C0u, SCPH1001_func_1FC07664_cont_BFC076C0 }, - { 0x1FC076C8u, SCPH1001_func_1FC07664_cont_BFC076C8 }, - { 0x1FC076E0u, SCPH1001_func_1FC07664_cont_BFC076E0 }, - { 0x1FC076E4u, SCPH1001_func_1FC07664_cont_BFC076E4 }, - { 0x1FC07700u, SCPH1001_func_1FC07700 }, - { 0x1FC07718u, SCPH1001_func_1FC07700_cont_BFC07718 }, - { 0x1FC07720u, SCPH1001_func_1FC07700_cont_BFC07720 }, - { 0x1FC0775Cu, SCPH1001_func_1FC07700_cont_BFC0775C }, - { 0x1FC07768u, SCPH1001_func_1FC07700_cont_BFC07768 }, - { 0x1FC07774u, SCPH1001_func_1FC07700_cont_BFC07774 }, - { 0x1FC077A8u, SCPH1001_func_1FC07700_cont_BFC077A8 }, - { 0x1FC077B8u, SCPH1001_func_1FC07700_cont_BFC077B8 }, - { 0x1FC077C8u, SCPH1001_func_1FC07700_cont_BFC077C8 }, - { 0x1FC07834u, SCPH1001_func_1FC07700_cont_BFC07834 }, - { 0x1FC07854u, SCPH1001_func_1FC07700_cont_BFC07854 }, - { 0x1FC07860u, SCPH1001_func_1FC07700_cont_BFC07860 }, - { 0x1FC07870u, SCPH1001_func_1FC07700_cont_BFC07870 }, - { 0x1FC07894u, SCPH1001_func_1FC07700_cont_BFC07894 }, - { 0x1FC078A4u, SCPH1001_func_1FC078A4 }, - { 0x1FC078C8u, SCPH1001_func_1FC078A4_cont_BFC078C8 }, - { 0x1FC078D4u, SCPH1001_func_1FC078A4_cont_BFC078D4 }, - { 0x1FC078DCu, SCPH1001_func_1FC078A4_cont_BFC078DC }, - { 0x1FC078E4u, SCPH1001_func_1FC078A4_cont_BFC078E4 }, - { 0x1FC078F4u, SCPH1001_func_1FC078A4_cont_BFC078F4 }, - { 0x1FC078F8u, SCPH1001_func_1FC078A4_cont_BFC078F8 }, - { 0x1FC07908u, SCPH1001_func_1FC078A4_cont_BFC07908 }, - { 0x1FC07910u, SCPH1001_func_1FC078A4_cont_BFC07910 }, - { 0x1FC07920u, SCPH1001_func_1FC078A4_cont_BFC07920 }, - { 0x1FC07928u, SCPH1001_func_1FC078A4_cont_BFC07928 }, - { 0x1FC07938u, SCPH1001_func_1FC078A4_cont_BFC07938 }, - { 0x1FC07940u, SCPH1001_func_1FC078A4_cont_BFC07940 }, - { 0x1FC07948u, SCPH1001_func_1FC078A4_cont_BFC07948 }, - { 0x1FC07958u, SCPH1001_func_1FC078A4_cont_BFC07958 }, - { 0x1FC07968u, SCPH1001_func_1FC078A4_cont_BFC07968 }, - { 0x1FC07978u, SCPH1001_func_1FC078A4_cont_BFC07978 }, - { 0x1FC0797Cu, SCPH1001_func_1FC078A4_cont_BFC0797C }, - { 0x1FC07984u, SCPH1001_func_1FC078A4_cont_BFC07984 }, - { 0x1FC07990u, SCPH1001_func_1FC078A4_cont_BFC07990 }, - { 0x1FC079A0u, SCPH1001_func_1FC078A4_cont_BFC079A0 }, - { 0x1FC079E0u, SCPH1001_func_1FC078A4_cont_BFC079E0 }, - { 0x1FC079F8u, SCPH1001_func_1FC079F8 }, - { 0x1FC07A04u, SCPH1001_func_1FC07A04 }, - { 0x1FC07A28u, SCPH1001_func_1FC07A04_cont_BFC07A28 }, - { 0x1FC07A30u, SCPH1001_func_1FC07A04_cont_BFC07A30 }, - { 0x1FC07A34u, SCPH1001_func_1FC07A04_cont_BFC07A34 }, - { 0x1FC07A3Cu, SCPH1001_func_1FC07A04_cont_BFC07A3C }, - { 0x1FC07A50u, SCPH1001_func_1FC07A04_cont_BFC07A50 }, - { 0x1FC07A54u, SCPH1001_func_1FC07A04_cont_BFC07A54 }, - { 0x1FC07A60u, SCPH1001_func_1FC07A04_cont_BFC07A60 }, - { 0x1FC07A74u, SCPH1001_func_1FC07A04_cont_BFC07A74 }, - { 0x1FC07A84u, SCPH1001_func_1FC07A04_cont_BFC07A84 }, - { 0x1FC07A8Cu, SCPH1001_func_1FC07A04_cont_BFC07A8C }, - { 0x1FC07A9Cu, SCPH1001_func_1FC07A04_cont_BFC07A9C }, - { 0x1FC07AA4u, SCPH1001_func_1FC07A04_cont_BFC07AA4 }, - { 0x1FC07AB0u, SCPH1001_func_1FC07A04_cont_BFC07AB0 }, - { 0x1FC07AC0u, SCPH1001_func_1FC07A04_cont_BFC07AC0 }, - { 0x1FC07AD8u, SCPH1001_func_1FC07A04_cont_BFC07AD8 }, - { 0x1FC07AE8u, SCPH1001_func_1FC07A04_cont_BFC07AE8 }, - { 0x1FC07AECu, SCPH1001_func_1FC07A04_cont_BFC07AEC }, - { 0x1FC07B04u, SCPH1001_func_1FC07A04_cont_BFC07B04 }, - { 0x1FC07B08u, SCPH1001_func_1FC07A04_cont_BFC07B08 }, - { 0x1FC07B20u, SCPH1001_func_1FC07A04_cont_BFC07B20 }, - { 0x1FC07B30u, SCPH1001_func_1FC07A04_cont_BFC07B30 }, - { 0x1FC07B40u, SCPH1001_func_1FC07A04_cont_BFC07B40 }, - { 0x1FC07B5Cu, SCPH1001_func_1FC07A04_cont_BFC07B5C }, - { 0x1FC07B64u, SCPH1001_func_1FC07A04_cont_BFC07B64 }, - { 0x1FC07B68u, SCPH1001_func_1FC07A04_cont_BFC07B68 }, - { 0x1FC07B6Cu, SCPH1001_func_1FC07A04_cont_BFC07B6C }, - { 0x1FC07B78u, SCPH1001_func_1FC07A04_cont_BFC07B78 }, - { 0x1FC07B88u, SCPH1001_func_1FC07B88 }, - { 0x1FC07B98u, SCPH1001_func_1FC07B88_cont_BFC07B98 }, - { 0x1FC07BA4u, SCPH1001_func_1FC07B88_cont_BFC07BA4 }, - { 0x1FC07BACu, SCPH1001_func_1FC07B88_cont_BFC07BAC }, - { 0x1FC07BB4u, SCPH1001_func_1FC07B88_cont_BFC07BB4 }, - { 0x1FC07BC8u, SCPH1001_func_1FC07B88_cont_BFC07BC8 }, - { 0x1FC07BCCu, SCPH1001_func_1FC07B88_cont_BFC07BCC }, - { 0x1FC07BD4u, SCPH1001_func_1FC07B88_cont_BFC07BD4 }, - { 0x1FC07BDCu, SCPH1001_func_1FC07B88_cont_BFC07BDC }, - { 0x1FC07BF0u, SCPH1001_func_1FC07B88_cont_BFC07BF0 }, - { 0x1FC07C0Cu, SCPH1001_func_1FC07B88_cont_BFC07C0C }, - { 0x1FC07C1Cu, SCPH1001_func_1FC07C1C }, - { 0x1FC07C5Cu, SCPH1001_func_1FC07C1C_cont_BFC07C5C }, - { 0x1FC07C64u, SCPH1001_func_1FC07C1C_cont_BFC07C64 }, - { 0x1FC07C70u, SCPH1001_func_1FC07C1C_cont_BFC07C70 }, - { 0x1FC07C78u, SCPH1001_func_1FC07C1C_cont_BFC07C78 }, - { 0x1FC07D8Cu, SCPH1001_func_1FC07C1C_cont_BFC07D8C }, - { 0x1FC07D94u, SCPH1001_func_1FC07C1C_cont_BFC07D94 }, - { 0x1FC07DA0u, SCPH1001_func_1FC07C1C_cont_BFC07DA0 }, - { 0x1FC07DA8u, SCPH1001_func_1FC07C1C_cont_BFC07DA8 }, - { 0x1FC07DB0u, SCPH1001_func_1FC07C1C_cont_BFC07DB0 }, - { 0x1FC07DB8u, SCPH1001_func_1FC07C1C_cont_BFC07DB8 }, - { 0x1FC07DC4u, SCPH1001_func_1FC07C1C_cont_BFC07DC4 }, - { 0x1FC07DCCu, SCPH1001_func_1FC07C1C_cont_BFC07DCC }, - { 0x1FC07DDCu, SCPH1001_func_1FC07C1C_cont_BFC07DDC }, - { 0x1FC07DE4u, SCPH1001_func_1FC07C1C_cont_BFC07DE4 }, - { 0x1FC07DF0u, SCPH1001_func_1FC07C1C_cont_BFC07DF0 }, - { 0x1FC07E00u, SCPH1001_func_1FC07C1C_cont_BFC07E00 }, - { 0x1FC07E08u, SCPH1001_func_1FC07C1C_cont_BFC07E08 }, - { 0x1FC07E14u, SCPH1001_func_1FC07C1C_cont_BFC07E14 }, - { 0x1FC07E1Cu, SCPH1001_func_1FC07C1C_cont_BFC07E1C }, - { 0x1FC07E2Cu, SCPH1001_func_1FC07C1C_cont_BFC07E2C }, - { 0x1FC07E34u, SCPH1001_func_1FC07C1C_cont_BFC07E34 }, - { 0x1FC07E40u, SCPH1001_func_1FC07C1C_cont_BFC07E40 }, - { 0x1FC07E50u, SCPH1001_func_1FC07C1C_cont_BFC07E50 }, - { 0x1FC07E58u, SCPH1001_func_1FC07C1C_cont_BFC07E58 }, - { 0x1FC07E60u, SCPH1001_func_1FC07C1C_cont_BFC07E60 }, - { 0x1FC07E6Cu, SCPH1001_func_1FC07C1C_cont_BFC07E6C }, - { 0x1FC07E74u, SCPH1001_func_1FC07C1C_cont_BFC07E74 }, - { 0x1FC07E7Cu, SCPH1001_func_1FC07C1C_cont_BFC07E7C }, - { 0x1FC07E8Cu, SCPH1001_func_1FC07C1C_cont_BFC07E8C }, - { 0x1FC07E94u, SCPH1001_func_1FC07C1C_cont_BFC07E94 }, - { 0x1FC07E9Cu, SCPH1001_func_1FC07C1C_cont_BFC07E9C }, - { 0x1FC07EACu, SCPH1001_func_1FC07C1C_cont_BFC07EAC }, - { 0x1FC07EB4u, SCPH1001_func_1FC07C1C_cont_BFC07EB4 }, - { 0x1FC07EC0u, SCPH1001_func_1FC07C1C_cont_BFC07EC0 }, - { 0x1FC07EC8u, SCPH1001_func_1FC07C1C_cont_BFC07EC8 }, - { 0x1FC07ED8u, SCPH1001_func_1FC07C1C_cont_BFC07ED8 }, - { 0x1FC07EE0u, SCPH1001_func_1FC07C1C_cont_BFC07EE0 }, - { 0x1FC07EECu, SCPH1001_func_1FC07C1C_cont_BFC07EEC }, - { 0x1FC07EF4u, SCPH1001_func_1FC07C1C_cont_BFC07EF4 }, - { 0x1FC07EFCu, SCPH1001_func_1FC07C1C_cont_BFC07EFC }, - { 0x1FC07F00u, SCPH1001_func_1FC07C1C_cont_BFC07F00 }, - { 0x1FC07F28u, SCPH1001_func_1FC07F28 }, - { 0x1FC07F44u, SCPH1001_func_1FC07F28_cont_BFC07F44 }, - { 0x1FC07F50u, SCPH1001_func_1FC07F28_cont_BFC07F50 }, - { 0x1FC07F5Cu, SCPH1001_func_1FC07F28_cont_BFC07F5C }, - { 0x1FC07F64u, SCPH1001_func_1FC07F28_cont_BFC07F64 }, - { 0x1FC07F70u, SCPH1001_func_1FC07F28_cont_BFC07F70 }, - { 0x1FC07F78u, SCPH1001_func_1FC07F28_cont_BFC07F78 }, - { 0x1FC07F84u, SCPH1001_func_1FC07F28_cont_BFC07F84 }, - { 0x1FC07F8Cu, SCPH1001_func_1FC07F28_cont_BFC07F8C }, - { 0x1FC07F94u, SCPH1001_func_1FC07F28_cont_BFC07F94 }, - { 0x1FC07F9Cu, SCPH1001_func_1FC07F28_cont_BFC07F9C }, - { 0x1FC07FACu, SCPH1001_func_1FC07F28_cont_BFC07FAC }, - { 0x1FC07FB8u, SCPH1001_func_1FC07F28_cont_BFC07FB8 }, - { 0x1FC07FC4u, SCPH1001_func_1FC07F28_cont_BFC07FC4 }, - { 0x1FC07FD4u, SCPH1001_func_1FC07F28_cont_BFC07FD4 }, - { 0x1FC07FE0u, SCPH1001_func_1FC07F28_cont_BFC07FE0 }, - { 0x1FC07FECu, SCPH1001_func_1FC07F28_cont_BFC07FEC }, - { 0x1FC07FF8u, SCPH1001_func_1FC07F28_cont_BFC07FF8 }, - { 0x1FC08000u, SCPH1001_func_1FC07F28_cont_BFC08000 }, - { 0x1FC0800Cu, SCPH1001_func_1FC07F28_cont_BFC0800C }, - { 0x1FC08010u, SCPH1001_func_1FC07F28_cont_BFC08010 }, - { 0x1FC08020u, SCPH1001_func_1FC08020 }, - { 0x1FC08030u, SCPH1001_func_1FC08020_cont_BFC08030 }, - { 0x1FC08038u, SCPH1001_func_1FC08020_cont_BFC08038 }, - { 0x1FC0803Cu, SCPH1001_func_1FC08020_cont_BFC0803C }, - { 0x1FC0804Cu, SCPH1001_func_1FC08020_cont_BFC0804C }, - { 0x1FC08054u, SCPH1001_func_1FC08020_cont_BFC08054 }, - { 0x1FC0805Cu, SCPH1001_func_1FC08020_cont_BFC0805C }, - { 0x1FC0806Cu, SCPH1001_func_1FC08020_cont_BFC0806C }, - { 0x1FC0807Cu, SCPH1001_func_1FC08020_cont_BFC0807C }, - { 0x1FC08084u, SCPH1001_func_1FC08020_cont_BFC08084 }, - { 0x1FC08090u, SCPH1001_func_1FC08020_cont_BFC08090 }, - { 0x1FC08098u, SCPH1001_func_1FC08098 }, - { 0x1FC080B0u, SCPH1001_func_1FC08098_cont_BFC080B0 }, - { 0x1FC080BCu, SCPH1001_func_1FC08098_cont_BFC080BC }, - { 0x1FC080CCu, SCPH1001_func_1FC08098_cont_BFC080CC }, - { 0x1FC080D8u, SCPH1001_func_1FC08098_cont_BFC080D8 }, - { 0x1FC080ECu, SCPH1001_func_1FC08098_cont_BFC080EC }, - { 0x1FC08100u, SCPH1001_func_1FC08098_cont_BFC08100 }, - { 0x1FC0811Cu, SCPH1001_func_1FC08098_cont_BFC0811C }, - { 0x1FC08130u, SCPH1001_func_1FC08098_cont_BFC08130 }, - { 0x1FC0814Cu, SCPH1001_func_1FC08098_cont_BFC0814C }, - { 0x1FC08154u, SCPH1001_func_1FC08098_cont_BFC08154 }, - { 0x1FC08174u, SCPH1001_func_1FC08098_cont_BFC08174 }, - { 0x1FC08180u, SCPH1001_func_1FC08098_cont_BFC08180 }, - { 0x1FC08194u, SCPH1001_func_1FC08098_cont_BFC08194 }, - { 0x1FC081E8u, SCPH1001_func_1FC08098_cont_BFC081E8 }, - { 0x1FC081ECu, SCPH1001_func_1FC08098_cont_BFC081EC }, - { 0x1FC081FCu, SCPH1001_func_1FC081FC }, - { 0x1FC08218u, SCPH1001_func_1FC081FC_cont_BFC08218 }, - { 0x1FC08220u, SCPH1001_func_1FC081FC_cont_BFC08220 }, - { 0x1FC08234u, SCPH1001_func_1FC081FC_cont_BFC08234 }, - { 0x1FC08250u, SCPH1001_func_1FC081FC_cont_BFC08250 }, - { 0x1FC08258u, SCPH1001_func_1FC081FC_cont_BFC08258 }, - { 0x1FC08264u, SCPH1001_func_1FC081FC_cont_BFC08264 }, - { 0x1FC08274u, SCPH1001_func_1FC081FC_cont_BFC08274 }, - { 0x1FC0827Cu, SCPH1001_func_1FC081FC_cont_BFC0827C }, - { 0x1FC08290u, SCPH1001_func_1FC081FC_cont_BFC08290 }, - { 0x1FC08298u, SCPH1001_func_1FC081FC_cont_BFC08298 }, - { 0x1FC082A0u, SCPH1001_func_1FC081FC_cont_BFC082A0 }, - { 0x1FC082A8u, SCPH1001_func_1FC081FC_cont_BFC082A8 }, - { 0x1FC082B4u, SCPH1001_func_1FC081FC_cont_BFC082B4 }, - { 0x1FC082C8u, SCPH1001_func_1FC081FC_cont_BFC082C8 }, - { 0x1FC082D8u, SCPH1001_func_1FC081FC_cont_BFC082D8 }, - { 0x1FC082ECu, SCPH1001_func_1FC081FC_cont_BFC082EC }, - { 0x1FC082F0u, SCPH1001_func_1FC081FC_cont_BFC082F0 }, - { 0x1FC08300u, SCPH1001_func_1FC081FC_cont_BFC08300 }, - { 0x1FC08304u, SCPH1001_func_1FC081FC_cont_BFC08304 }, - { 0x1FC0830Cu, SCPH1001_func_1FC081FC_cont_BFC0830C }, - { 0x1FC0832Cu, SCPH1001_func_1FC081FC_cont_BFC0832C }, - { 0x1FC08344u, SCPH1001_func_1FC081FC_cont_BFC08344 }, - { 0x1FC08354u, SCPH1001_func_1FC08354 }, - { 0x1FC0837Cu, SCPH1001_func_1FC08354_cont_BFC0837C }, - { 0x1FC08388u, SCPH1001_func_1FC08354_cont_BFC08388 }, - { 0x1FC08394u, SCPH1001_func_1FC08354_cont_BFC08394 }, - { 0x1FC083A8u, SCPH1001_func_1FC08354_cont_BFC083A8 }, - { 0x1FC083B0u, SCPH1001_func_1FC08354_cont_BFC083B0 }, - { 0x1FC083B8u, SCPH1001_func_1FC08354_cont_BFC083B8 }, - { 0x1FC083CCu, SCPH1001_func_1FC083CC }, - { 0x1FC08404u, SCPH1001_func_1FC083CC_cont_BFC08404 }, - { 0x1FC0841Cu, SCPH1001_func_1FC083CC_cont_BFC0841C }, - { 0x1FC0842Cu, SCPH1001_func_1FC083CC_cont_BFC0842C }, - { 0x1FC08438u, SCPH1001_func_1FC083CC_cont_BFC08438 }, - { 0x1FC08440u, SCPH1001_func_1FC083CC_cont_BFC08440 }, - { 0x1FC08454u, SCPH1001_func_1FC083CC_cont_BFC08454 }, - { 0x1FC0846Cu, SCPH1001_func_1FC083CC_cont_BFC0846C }, - { 0x1FC0847Cu, SCPH1001_func_1FC083CC_cont_BFC0847C }, - { 0x1FC08484u, SCPH1001_func_1FC083CC_cont_BFC08484 }, - { 0x1FC08498u, SCPH1001_func_1FC083CC_cont_BFC08498 }, - { 0x1FC084A0u, SCPH1001_func_1FC083CC_cont_BFC084A0 }, - { 0x1FC084A8u, SCPH1001_func_1FC083CC_cont_BFC084A8 }, - { 0x1FC084BCu, SCPH1001_func_1FC083CC_cont_BFC084BC }, - { 0x1FC084C4u, SCPH1001_func_1FC083CC_cont_BFC084C4 }, - { 0x1FC084CCu, SCPH1001_func_1FC083CC_cont_BFC084CC }, - { 0x1FC084D8u, SCPH1001_func_1FC083CC_cont_BFC084D8 }, - { 0x1FC084DCu, SCPH1001_func_1FC083CC_cont_BFC084DC }, - { 0x1FC084E4u, SCPH1001_func_1FC083CC_cont_BFC084E4 }, - { 0x1FC084ECu, SCPH1001_func_1FC083CC_cont_BFC084EC }, - { 0x1FC084F0u, SCPH1001_func_1FC083CC_cont_BFC084F0 }, - { 0x1FC084FCu, SCPH1001_func_1FC083CC_cont_BFC084FC }, - { 0x1FC08504u, SCPH1001_func_1FC083CC_cont_BFC08504 }, - { 0x1FC08510u, SCPH1001_func_1FC083CC_cont_BFC08510 }, - { 0x1FC08518u, SCPH1001_func_1FC083CC_cont_BFC08518 }, - { 0x1FC08520u, SCPH1001_func_1FC083CC_cont_BFC08520 }, - { 0x1FC08538u, SCPH1001_func_1FC083CC_cont_BFC08538 }, - { 0x1FC08554u, SCPH1001_func_1FC083CC_cont_BFC08554 }, - { 0x1FC08560u, SCPH1001_func_1FC083CC_cont_BFC08560 }, - { 0x1FC08568u, SCPH1001_func_1FC083CC_cont_BFC08568 }, - { 0x1FC08574u, SCPH1001_func_1FC083CC_cont_BFC08574 }, - { 0x1FC08584u, SCPH1001_func_1FC083CC_cont_BFC08584 }, - { 0x1FC08588u, SCPH1001_func_1FC083CC_cont_BFC08588 }, - { 0x1FC085B0u, SCPH1001_func_1FC085B0 }, - { 0x1FC085C4u, SCPH1001_func_1FC085B0_cont_BFC085C4 }, - { 0x1FC085D4u, SCPH1001_func_1FC085D4 }, - { 0x1FC085E4u, SCPH1001_func_1FC085D4_cont_BFC085E4 }, - { 0x1FC085ECu, SCPH1001_func_1FC085D4_cont_BFC085EC }, - { 0x1FC085F4u, SCPH1001_func_1FC085D4_cont_BFC085F4 }, - { 0x1FC08600u, SCPH1001_func_1FC085D4_cont_BFC08600 }, - { 0x1FC08608u, SCPH1001_func_1FC085D4_cont_BFC08608 }, - { 0x1FC08610u, SCPH1001_func_1FC085D4_cont_BFC08610 }, - { 0x1FC08618u, SCPH1001_func_1FC085D4_cont_BFC08618 }, - { 0x1FC08624u, SCPH1001_func_1FC085D4_cont_BFC08624 }, - { 0x1FC0862Cu, SCPH1001_func_1FC085D4_cont_BFC0862C }, - { 0x1FC08634u, SCPH1001_func_1FC085D4_cont_BFC08634 }, - { 0x1FC0863Cu, SCPH1001_func_1FC085D4_cont_BFC0863C }, - { 0x1FC0864Cu, SCPH1001_func_1FC085D4_cont_BFC0864C }, - { 0x1FC08654u, SCPH1001_func_1FC085D4_cont_BFC08654 }, - { 0x1FC08660u, SCPH1001_func_1FC085D4_cont_BFC08660 }, - { 0x1FC08670u, SCPH1001_func_1FC085D4_cont_BFC08670 }, - { 0x1FC08678u, SCPH1001_func_1FC085D4_cont_BFC08678 }, - { 0x1FC08684u, SCPH1001_func_1FC085D4_cont_BFC08684 }, - { 0x1FC08690u, SCPH1001_func_1FC085D4_cont_BFC08690 }, - { 0x1FC08698u, SCPH1001_func_1FC085D4_cont_BFC08698 }, - { 0x1FC086A0u, SCPH1001_func_1FC085D4_cont_BFC086A0 }, - { 0x1FC086A4u, SCPH1001_func_1FC085D4_cont_BFC086A4 }, - { 0x1FC086B0u, SCPH1001_func_1FC086B0 }, - { 0x1FC086C4u, SCPH1001_func_1FC086B0_cont_BFC086C4 }, - { 0x1FC086ECu, SCPH1001_func_1FC086EC }, - { 0x1FC08708u, SCPH1001_func_1FC086EC_cont_BFC08708 }, - { 0x1FC08720u, SCPH1001_func_1FC08720 }, - { 0x1FC08758u, SCPH1001_func_1FC08720_cont_BFC08758 }, - { 0x1FC087A0u, SCPH1001_func_1FC08720_cont_BFC087A0 }, - { 0x1FC087B0u, SCPH1001_func_1FC08720_cont_BFC087B0 }, - { 0x1FC087BCu, SCPH1001_func_1FC08720_cont_BFC087BC }, - { 0x1FC087C4u, SCPH1001_func_1FC087C4 }, - { 0x1FC087FCu, SCPH1001_func_1FC087C4_cont_BFC087FC }, - { 0x1FC08844u, SCPH1001_func_1FC087C4_cont_BFC08844 }, - { 0x1FC0884Cu, SCPH1001_func_1FC0884C }, - { 0x1FC08870u, SCPH1001_func_1FC0884C_cont_BFC08870 }, - { 0x1FC08888u, SCPH1001_func_1FC0884C_cont_BFC08888 }, - { 0x1FC08890u, SCPH1001_func_1FC0884C_cont_BFC08890 }, - { 0x1FC088A0u, SCPH1001_func_1FC088A0 }, - { 0x1FC088D4u, SCPH1001_func_1FC088A0_cont_BFC088D4 }, - { 0x1FC088F8u, SCPH1001_func_1FC088A0_cont_BFC088F8 }, - { 0x1FC08904u, SCPH1001_func_1FC088A0_cont_BFC08904 }, - { 0x1FC08910u, SCPH1001_func_1FC088A0_cont_BFC08910 }, - { 0x1FC08934u, SCPH1001_func_1FC088A0_cont_BFC08934 }, - { 0x1FC0895Cu, SCPH1001_func_1FC0895C }, - { 0x1FC0896Cu, SCPH1001_func_1FC0895C_cont_BFC0896C }, - { 0x1FC08978u, SCPH1001_func_1FC0895C_cont_BFC08978 }, - { 0x1FC08988u, SCPH1001_func_1FC0895C_cont_BFC08988 }, - { 0x1FC08990u, SCPH1001_func_1FC0895C_cont_BFC08990 }, - { 0x1FC0899Cu, SCPH1001_func_1FC0895C_cont_BFC0899C }, - { 0x1FC089A8u, SCPH1001_func_1FC0895C_cont_BFC089A8 }, - { 0x1FC089B0u, SCPH1001_func_1FC0895C_cont_BFC089B0 }, - { 0x1FC089C0u, SCPH1001_func_1FC089C0 }, - { 0x1FC089F0u, SCPH1001_func_1FC089C0_cont_BFC089F0 }, - { 0x1FC089F4u, SCPH1001_func_1FC089C0_cont_BFC089F4 }, - { 0x1FC08A0Cu, SCPH1001_func_1FC089C0_cont_BFC08A0C }, - { 0x1FC08A18u, SCPH1001_func_1FC089C0_cont_BFC08A18 }, - { 0x1FC08A20u, SCPH1001_func_1FC089C0_cont_BFC08A20 }, - { 0x1FC08A28u, SCPH1001_func_1FC089C0_cont_BFC08A28 }, - { 0x1FC08A38u, SCPH1001_func_1FC089C0_cont_BFC08A38 }, - { 0x1FC08A48u, SCPH1001_func_1FC089C0_cont_BFC08A48 }, - { 0x1FC08A5Cu, SCPH1001_func_1FC089C0_cont_BFC08A5C }, - { 0x1FC08A64u, SCPH1001_func_1FC089C0_cont_BFC08A64 }, - { 0x1FC08A6Cu, SCPH1001_func_1FC089C0_cont_BFC08A6C }, - { 0x1FC08A74u, SCPH1001_func_1FC089C0_cont_BFC08A74 }, - { 0x1FC08A78u, SCPH1001_func_1FC089C0_cont_BFC08A78 }, - { 0x1FC08A80u, SCPH1001_func_1FC089C0_cont_BFC08A80 }, - { 0x1FC08A88u, SCPH1001_func_1FC089C0_cont_BFC08A88 }, - { 0x1FC08A90u, SCPH1001_func_1FC089C0_cont_BFC08A90 }, - { 0x1FC08A98u, SCPH1001_func_1FC089C0_cont_BFC08A98 }, - { 0x1FC08A9Cu, SCPH1001_func_1FC089C0_cont_BFC08A9C }, - { 0x1FC08AC0u, SCPH1001_func_1FC089C0_cont_BFC08AC0 }, - { 0x1FC08ACCu, SCPH1001_func_1FC089C0_cont_BFC08ACC }, - { 0x1FC08AD8u, SCPH1001_func_1FC089C0_cont_BFC08AD8 }, - { 0x1FC08B00u, SCPH1001_func_1FC089C0_cont_BFC08B00 }, - { 0x1FC08B20u, SCPH1001_func_1FC089C0_cont_BFC08B20 }, - { 0x1FC08B24u, SCPH1001_func_1FC089C0_cont_BFC08B24 }, - { 0x1FC08B28u, SCPH1001_func_1FC089C0_cont_BFC08B28 }, - { 0x1FC08B3Cu, SCPH1001_func_1FC08B3C }, - { 0x1FC08B64u, SCPH1001_func_1FC08B3C_cont_BFC08B64 }, - { 0x1FC08B7Cu, SCPH1001_func_1FC08B3C_cont_BFC08B7C }, - { 0x1FC08B80u, SCPH1001_func_1FC08B3C_cont_BFC08B80 }, - { 0x1FC08B98u, SCPH1001_func_1FC08B3C_cont_BFC08B98 }, - { 0x1FC08BA4u, SCPH1001_func_1FC08B3C_cont_BFC08BA4 }, - { 0x1FC08BACu, SCPH1001_func_1FC08B3C_cont_BFC08BAC }, - { 0x1FC08BB4u, SCPH1001_func_1FC08B3C_cont_BFC08BB4 }, - { 0x1FC08BB8u, SCPH1001_func_1FC08B3C_cont_BFC08BB8 }, - { 0x1FC08BF4u, SCPH1001_func_1FC08B3C_cont_BFC08BF4 }, - { 0x1FC08C04u, SCPH1001_func_1FC08B3C_cont_BFC08C04 }, - { 0x1FC08C14u, SCPH1001_func_1FC08B3C_cont_BFC08C14 }, - { 0x1FC08C28u, SCPH1001_func_1FC08B3C_cont_BFC08C28 }, - { 0x1FC08C34u, SCPH1001_func_1FC08B3C_cont_BFC08C34 }, - { 0x1FC08C3Cu, SCPH1001_func_1FC08B3C_cont_BFC08C3C }, - { 0x1FC08C40u, SCPH1001_func_1FC08B3C_cont_BFC08C40 }, - { 0x1FC08C7Cu, SCPH1001_func_1FC08B3C_cont_BFC08C7C }, - { 0x1FC08C84u, SCPH1001_func_1FC08B3C_cont_BFC08C84 }, - { 0x1FC08C94u, SCPH1001_func_1FC08B3C_cont_BFC08C94 }, - { 0x1FC08C9Cu, SCPH1001_func_1FC08B3C_cont_BFC08C9C }, - { 0x1FC08CC0u, SCPH1001_func_1FC08B3C_cont_BFC08CC0 }, - { 0x1FC08CD8u, SCPH1001_func_1FC08B3C_cont_BFC08CD8 }, - { 0x1FC08CF0u, SCPH1001_func_1FC08B3C_cont_BFC08CF0 }, - { 0x1FC08CF8u, SCPH1001_func_1FC08B3C_cont_BFC08CF8 }, - { 0x1FC08D08u, SCPH1001_func_1FC08B3C_cont_BFC08D08 }, - { 0x1FC08D10u, SCPH1001_func_1FC08B3C_cont_BFC08D10 }, - { 0x1FC08D18u, SCPH1001_func_1FC08B3C_cont_BFC08D18 }, - { 0x1FC08D20u, SCPH1001_func_1FC08B3C_cont_BFC08D20 }, - { 0x1FC08D24u, SCPH1001_func_1FC08B3C_cont_BFC08D24 }, - { 0x1FC08D44u, SCPH1001_func_1FC08B3C_cont_BFC08D44 }, - { 0x1FC08D4Cu, SCPH1001_func_1FC08B3C_cont_BFC08D4C }, - { 0x1FC08D54u, SCPH1001_func_1FC08B3C_cont_BFC08D54 }, - { 0x1FC08D78u, SCPH1001_func_1FC08B3C_cont_BFC08D78 }, - { 0x1FC08D7Cu, SCPH1001_func_1FC08B3C_cont_BFC08D7C }, - { 0x1FC08D8Cu, SCPH1001_func_1FC08B3C_cont_BFC08D8C }, - { 0x1FC08D98u, SCPH1001_func_1FC08B3C_cont_BFC08D98 }, - { 0x1FC08DA4u, SCPH1001_func_1FC08B3C_cont_BFC08DA4 }, - { 0x1FC08DB8u, SCPH1001_func_1FC08B3C_cont_BFC08DB8 }, - { 0x1FC08DC4u, SCPH1001_func_1FC08B3C_cont_BFC08DC4 }, - { 0x1FC08DC8u, SCPH1001_func_1FC08B3C_cont_BFC08DC8 }, - { 0x1FC08DD4u, SCPH1001_func_1FC08B3C_cont_BFC08DD4 }, - { 0x1FC08DECu, SCPH1001_func_1FC08B3C_cont_BFC08DEC }, - { 0x1FC08E04u, SCPH1001_func_1FC08B3C_cont_BFC08E04 }, - { 0x1FC08E18u, SCPH1001_func_1FC08B3C_cont_BFC08E18 }, - { 0x1FC08E2Cu, SCPH1001_func_1FC08B3C_cont_BFC08E2C }, - { 0x1FC08E34u, SCPH1001_func_1FC08B3C_cont_BFC08E34 }, - { 0x1FC08E38u, SCPH1001_func_1FC08B3C_cont_BFC08E38 }, - { 0x1FC08E54u, SCPH1001_func_1FC08B3C_cont_BFC08E54 }, - { 0x1FC08E58u, SCPH1001_func_1FC08B3C_cont_BFC08E58 }, - { 0x1FC08E68u, SCPH1001_func_1FC08B3C_cont_BFC08E68 }, - { 0x1FC08E70u, SCPH1001_func_1FC08B3C_cont_BFC08E70 }, - { 0x1FC08E74u, SCPH1001_func_1FC08B3C_cont_BFC08E74 }, - { 0x1FC08EA0u, SCPH1001_func_1FC08B3C_cont_BFC08EA0 }, - { 0x1FC08EA8u, SCPH1001_func_1FC08B3C_cont_BFC08EA8 }, - { 0x1FC08EB8u, SCPH1001_func_1FC08B3C_cont_BFC08EB8 }, - { 0x1FC08EC4u, SCPH1001_func_1FC08B3C_cont_BFC08EC4 }, - { 0x1FC08ED4u, SCPH1001_func_1FC08B3C_cont_BFC08ED4 }, - { 0x1FC08EECu, SCPH1001_func_1FC08B3C_cont_BFC08EEC }, - { 0x1FC08EF8u, SCPH1001_func_1FC08B3C_cont_BFC08EF8 }, - { 0x1FC08F1Cu, SCPH1001_func_1FC08B3C_cont_BFC08F1C }, - { 0x1FC08F28u, SCPH1001_func_1FC08B3C_cont_BFC08F28 }, - { 0x1FC08F30u, SCPH1001_func_1FC08B3C_cont_BFC08F30 }, - { 0x1FC08F38u, SCPH1001_func_1FC08B3C_cont_BFC08F38 }, - { 0x1FC08F40u, SCPH1001_func_1FC08B3C_cont_BFC08F40 }, - { 0x1FC08F48u, SCPH1001_func_1FC08B3C_cont_BFC08F48 }, - { 0x1FC08F50u, SCPH1001_func_1FC08B3C_cont_BFC08F50 }, - { 0x1FC08F58u, SCPH1001_func_1FC08B3C_cont_BFC08F58 }, - { 0x1FC08F60u, SCPH1001_func_1FC08B3C_cont_BFC08F60 }, - { 0x1FC08F64u, SCPH1001_func_1FC08B3C_cont_BFC08F64 }, - { 0x1FC08F74u, SCPH1001_func_1FC08B3C_cont_BFC08F74 }, - { 0x1FC08F84u, SCPH1001_func_1FC08B3C_cont_BFC08F84 }, - { 0x1FC08F8Cu, SCPH1001_func_1FC08B3C_cont_BFC08F8C }, - { 0x1FC08F90u, SCPH1001_func_1FC08B3C_cont_BFC08F90 }, - { 0x1FC08F9Cu, SCPH1001_func_1FC08B3C_cont_BFC08F9C }, - { 0x1FC08FA8u, SCPH1001_func_1FC08B3C_cont_BFC08FA8 }, - { 0x1FC08FB4u, SCPH1001_func_1FC08B3C_cont_BFC08FB4 }, - { 0x1FC08FD4u, SCPH1001_func_1FC08B3C_cont_BFC08FD4 }, - { 0x1FC08FD8u, SCPH1001_func_1FC08B3C_cont_BFC08FD8 }, - { 0x1FC08FDCu, SCPH1001_func_1FC08B3C_cont_BFC08FDC }, - { 0x1FC08FFCu, SCPH1001_func_1FC08FFC }, - { 0x1FC0902Cu, SCPH1001_func_1FC08FFC_cont_BFC0902C }, - { 0x1FC09034u, SCPH1001_func_1FC08FFC_cont_BFC09034 }, - { 0x1FC09038u, SCPH1001_func_1FC08FFC_cont_BFC09038 }, - { 0x1FC09040u, SCPH1001_func_1FC08FFC_cont_BFC09040 }, - { 0x1FC09048u, SCPH1001_func_1FC08FFC_cont_BFC09048 }, - { 0x1FC09050u, SCPH1001_func_1FC08FFC_cont_BFC09050 }, - { 0x1FC09068u, SCPH1001_func_1FC08FFC_cont_BFC09068 }, - { 0x1FC0906Cu, SCPH1001_func_1FC08FFC_cont_BFC0906C }, - { 0x1FC09080u, SCPH1001_func_1FC08FFC_cont_BFC09080 }, - { 0x1FC09088u, SCPH1001_func_1FC08FFC_cont_BFC09088 }, - { 0x1FC09094u, SCPH1001_func_1FC08FFC_cont_BFC09094 }, - { 0x1FC09098u, SCPH1001_func_1FC08FFC_cont_BFC09098 }, - { 0x1FC090B0u, SCPH1001_func_1FC08FFC_cont_BFC090B0 }, - { 0x1FC090B8u, SCPH1001_func_1FC08FFC_cont_BFC090B8 }, - { 0x1FC090C8u, SCPH1001_func_1FC08FFC_cont_BFC090C8 }, - { 0x1FC090D0u, SCPH1001_func_1FC08FFC_cont_BFC090D0 }, - { 0x1FC090D8u, SCPH1001_func_1FC08FFC_cont_BFC090D8 }, - { 0x1FC090FCu, SCPH1001_func_1FC08FFC_cont_BFC090FC }, - { 0x1FC09104u, SCPH1001_func_1FC08FFC_cont_BFC09104 }, - { 0x1FC09108u, SCPH1001_func_1FC08FFC_cont_BFC09108 }, - { 0x1FC09128u, SCPH1001_func_1FC08FFC_cont_BFC09128 }, - { 0x1FC09130u, SCPH1001_func_1FC08FFC_cont_BFC09130 }, - { 0x1FC0913Cu, SCPH1001_func_1FC08FFC_cont_BFC0913C }, - { 0x1FC09144u, SCPH1001_func_1FC09144 }, - { 0x1FC09158u, SCPH1001_func_1FC09144_cont_BFC09158 }, - { 0x1FC0916Cu, SCPH1001_func_1FC09144_cont_BFC0916C }, - { 0x1FC09174u, SCPH1001_func_1FC09144_cont_BFC09174 }, - { 0x1FC0917Cu, SCPH1001_func_1FC09144_cont_BFC0917C }, - { 0x1FC09188u, SCPH1001_func_1FC09144_cont_BFC09188 }, - { 0x1FC09198u, SCPH1001_func_1FC09144_cont_BFC09198 }, - { 0x1FC091A0u, SCPH1001_func_1FC09144_cont_BFC091A0 }, - { 0x1FC091A8u, SCPH1001_func_1FC09144_cont_BFC091A8 }, - { 0x1FC091ACu, SCPH1001_func_1FC09144_cont_BFC091AC }, - { 0x1FC091B4u, SCPH1001_func_1FC09144_cont_BFC091B4 }, - { 0x1FC091BCu, SCPH1001_func_1FC09144_cont_BFC091BC }, - { 0x1FC091CCu, SCPH1001_func_1FC091CC }, - { 0x1FC09208u, SCPH1001_func_1FC091CC_cont_BFC09208 }, - { 0x1FC09224u, SCPH1001_func_1FC091CC_cont_BFC09224 }, - { 0x1FC09228u, SCPH1001_func_1FC091CC_cont_BFC09228 }, - { 0x1FC0922Cu, SCPH1001_func_1FC091CC_cont_BFC0922C }, - { 0x1FC09238u, SCPH1001_func_1FC091CC_cont_BFC09238 }, - { 0x1FC09240u, SCPH1001_func_1FC091CC_cont_BFC09240 }, - { 0x1FC09244u, SCPH1001_func_1FC091CC_cont_BFC09244 }, - { 0x1FC09250u, SCPH1001_func_1FC091CC_cont_BFC09250 }, - { 0x1FC09258u, SCPH1001_func_1FC091CC_cont_BFC09258 }, - { 0x1FC0926Cu, SCPH1001_func_1FC091CC_cont_BFC0926C }, - { 0x1FC09274u, SCPH1001_func_1FC091CC_cont_BFC09274 }, - { 0x1FC0927Cu, SCPH1001_func_1FC091CC_cont_BFC0927C }, - { 0x1FC092A0u, SCPH1001_func_1FC091CC_cont_BFC092A0 }, - { 0x1FC092B4u, SCPH1001_func_1FC091CC_cont_BFC092B4 }, - { 0x1FC092C4u, SCPH1001_func_1FC091CC_cont_BFC092C4 }, - { 0x1FC092C8u, SCPH1001_func_1FC091CC_cont_BFC092C8 }, - { 0x1FC092ECu, SCPH1001_func_1FC092EC }, - { 0x1FC0932Cu, SCPH1001_func_1FC092EC_cont_BFC0932C }, - { 0x1FC09334u, SCPH1001_func_1FC092EC_cont_BFC09334 }, - { 0x1FC09348u, SCPH1001_func_1FC092EC_cont_BFC09348 }, - { 0x1FC0934Cu, SCPH1001_func_1FC092EC_cont_BFC0934C }, - { 0x1FC09350u, SCPH1001_func_1FC092EC_cont_BFC09350 }, - { 0x1FC0935Cu, SCPH1001_func_1FC092EC_cont_BFC0935C }, - { 0x1FC09364u, SCPH1001_func_1FC092EC_cont_BFC09364 }, - { 0x1FC09368u, SCPH1001_func_1FC092EC_cont_BFC09368 }, - { 0x1FC09374u, SCPH1001_func_1FC092EC_cont_BFC09374 }, - { 0x1FC09380u, SCPH1001_func_1FC092EC_cont_BFC09380 }, - { 0x1FC09390u, SCPH1001_func_1FC092EC_cont_BFC09390 }, - { 0x1FC09398u, SCPH1001_func_1FC092EC_cont_BFC09398 }, - { 0x1FC093A4u, SCPH1001_func_1FC092EC_cont_BFC093A4 }, - { 0x1FC093B4u, SCPH1001_func_1FC092EC_cont_BFC093B4 }, - { 0x1FC093BCu, SCPH1001_func_1FC092EC_cont_BFC093BC }, - { 0x1FC093C0u, SCPH1001_func_1FC092EC_cont_BFC093C0 }, - { 0x1FC093CCu, SCPH1001_func_1FC092EC_cont_BFC093CC }, - { 0x1FC093D4u, SCPH1001_func_1FC092EC_cont_BFC093D4 }, - { 0x1FC093F8u, SCPH1001_func_1FC092EC_cont_BFC093F8 }, - { 0x1FC09400u, SCPH1001_func_1FC092EC_cont_BFC09400 }, - { 0x1FC09420u, SCPH1001_func_1FC092EC_cont_BFC09420 }, - { 0x1FC09424u, SCPH1001_func_1FC092EC_cont_BFC09424 }, - { 0x1FC09434u, SCPH1001_func_1FC092EC_cont_BFC09434 }, - { 0x1FC09440u, SCPH1001_func_1FC092EC_cont_BFC09440 }, - { 0x1FC09448u, SCPH1001_func_1FC092EC_cont_BFC09448 }, - { 0x1FC09454u, SCPH1001_func_1FC092EC_cont_BFC09454 }, - { 0x1FC0945Cu, SCPH1001_func_1FC092EC_cont_BFC0945C }, - { 0x1FC09464u, SCPH1001_func_1FC092EC_cont_BFC09464 }, - { 0x1FC09470u, SCPH1001_func_1FC092EC_cont_BFC09470 }, - { 0x1FC0947Cu, SCPH1001_func_1FC092EC_cont_BFC0947C }, - { 0x1FC09480u, SCPH1001_func_1FC092EC_cont_BFC09480 }, - { 0x1FC09490u, SCPH1001_func_1FC092EC_cont_BFC09490 }, - { 0x1FC09498u, SCPH1001_func_1FC092EC_cont_BFC09498 }, - { 0x1FC0949Cu, SCPH1001_func_1FC092EC_cont_BFC0949C }, - { 0x1FC094A8u, SCPH1001_func_1FC092EC_cont_BFC094A8 }, - { 0x1FC094B0u, SCPH1001_func_1FC092EC_cont_BFC094B0 }, - { 0x1FC094D4u, SCPH1001_func_1FC092EC_cont_BFC094D4 }, - { 0x1FC094DCu, SCPH1001_func_1FC092EC_cont_BFC094DC }, - { 0x1FC094E4u, SCPH1001_func_1FC092EC_cont_BFC094E4 }, - { 0x1FC094ECu, SCPH1001_func_1FC092EC_cont_BFC094EC }, - { 0x1FC094F0u, SCPH1001_func_1FC092EC_cont_BFC094F0 }, - { 0x1FC09510u, SCPH1001_func_1FC092EC_cont_BFC09510 }, - { 0x1FC09518u, SCPH1001_func_1FC092EC_cont_BFC09518 }, - { 0x1FC09540u, SCPH1001_func_1FC09540 }, - { 0x1FC09568u, SCPH1001_func_1FC09540_cont_BFC09568 }, - { 0x1FC09578u, SCPH1001_func_1FC09540_cont_BFC09578 }, - { 0x1FC09580u, SCPH1001_func_1FC09540_cont_BFC09580 }, - { 0x1FC0958Cu, SCPH1001_func_1FC09540_cont_BFC0958C }, - { 0x1FC09598u, SCPH1001_func_1FC09598 }, - { 0x1FC095F4u, SCPH1001_func_1FC09598_cont_BFC095F4 }, - { 0x1FC095F8u, SCPH1001_func_1FC09598_cont_BFC095F8 }, - { 0x1FC09618u, SCPH1001_func_1FC09598_cont_BFC09618 }, - { 0x1FC09630u, SCPH1001_func_1FC09598_cont_BFC09630 }, - { 0x1FC0963Cu, SCPH1001_func_1FC09598_cont_BFC0963C }, - { 0x1FC09644u, SCPH1001_func_1FC09598_cont_BFC09644 }, - { 0x1FC0964Cu, SCPH1001_func_1FC09598_cont_BFC0964C }, - { 0x1FC09650u, SCPH1001_func_1FC09598_cont_BFC09650 }, - { 0x1FC09668u, SCPH1001_func_1FC09598_cont_BFC09668 }, - { 0x1FC09670u, SCPH1001_func_1FC09598_cont_BFC09670 }, - { 0x1FC09678u, SCPH1001_func_1FC09598_cont_BFC09678 }, - { 0x1FC09680u, SCPH1001_func_1FC09598_cont_BFC09680 }, - { 0x1FC09688u, SCPH1001_func_1FC09598_cont_BFC09688 }, - { 0x1FC0968Cu, SCPH1001_func_1FC09598_cont_BFC0968C }, - { 0x1FC096B0u, SCPH1001_func_1FC09598_cont_BFC096B0 }, - { 0x1FC096C0u, SCPH1001_func_1FC09598_cont_BFC096C0 }, - { 0x1FC096C8u, SCPH1001_func_1FC09598_cont_BFC096C8 }, - { 0x1FC096D8u, SCPH1001_func_1FC09598_cont_BFC096D8 }, - { 0x1FC096E0u, SCPH1001_func_1FC09598_cont_BFC096E0 }, - { 0x1FC096E8u, SCPH1001_func_1FC09598_cont_BFC096E8 }, - { 0x1FC096F0u, SCPH1001_func_1FC09598_cont_BFC096F0 }, - { 0x1FC09720u, SCPH1001_func_1FC09720 }, - { 0x1FC09774u, SCPH1001_func_1FC09720_cont_BFC09774 }, - { 0x1FC0977Cu, SCPH1001_func_1FC09720_cont_BFC0977C }, - { 0x1FC09790u, SCPH1001_func_1FC09720_cont_BFC09790 }, - { 0x1FC09798u, SCPH1001_func_1FC09720_cont_BFC09798 }, - { 0x1FC097A0u, SCPH1001_func_1FC09720_cont_BFC097A0 }, - { 0x1FC097A8u, SCPH1001_func_1FC09720_cont_BFC097A8 }, - { 0x1FC097ACu, SCPH1001_func_1FC09720_cont_BFC097AC }, - { 0x1FC097DCu, SCPH1001_func_1FC09720_cont_BFC097DC }, - { 0x1FC097E4u, SCPH1001_func_1FC09720_cont_BFC097E4 }, - { 0x1FC097F8u, SCPH1001_func_1FC09720_cont_BFC097F8 }, - { 0x1FC09804u, SCPH1001_func_1FC09720_cont_BFC09804 }, - { 0x1FC0980Cu, SCPH1001_func_1FC09720_cont_BFC0980C }, - { 0x1FC09814u, SCPH1001_func_1FC09720_cont_BFC09814 }, - { 0x1FC09820u, SCPH1001_func_1FC09720_cont_BFC09820 }, - { 0x1FC09824u, SCPH1001_func_1FC09720_cont_BFC09824 }, - { 0x1FC0982Cu, SCPH1001_func_1FC09720_cont_BFC0982C }, - { 0x1FC09834u, SCPH1001_func_1FC09720_cont_BFC09834 }, - { 0x1FC09840u, SCPH1001_func_1FC09720_cont_BFC09840 }, - { 0x1FC09848u, SCPH1001_func_1FC09720_cont_BFC09848 }, - { 0x1FC09850u, SCPH1001_func_1FC09720_cont_BFC09850 }, - { 0x1FC0985Cu, SCPH1001_func_1FC09720_cont_BFC0985C }, - { 0x1FC09860u, SCPH1001_func_1FC09720_cont_BFC09860 }, - { 0x1FC09890u, SCPH1001_func_1FC09890 }, - { 0x1FC0989Cu, SCPH1001_func_1FC0989C }, - { 0x1FC098A8u, SCPH1001_func_1FC098A8 }, - { 0x1FC098C0u, SCPH1001_func_1FC098A8_cont_BFC098C0 }, - { 0x1FC098C8u, SCPH1001_func_1FC098A8_cont_BFC098C8 }, - { 0x1FC098E0u, SCPH1001_func_1FC098A8_cont_BFC098E0 }, - { 0x1FC098F8u, SCPH1001_func_1FC098A8_cont_BFC098F8 }, - { 0x1FC09900u, SCPH1001_func_1FC098A8_cont_BFC09900 }, - { 0x1FC09904u, SCPH1001_func_1FC098A8_cont_BFC09904 }, - { 0x1FC09914u, SCPH1001_func_1FC09914 }, - { 0x1FC0992Cu, SCPH1001_func_1FC09914_cont_BFC0992C }, - { 0x1FC09934u, SCPH1001_func_1FC09914_cont_BFC09934 }, - { 0x1FC0993Cu, SCPH1001_func_1FC09914_cont_BFC0993C }, - { 0x1FC0994Cu, SCPH1001_func_1FC0994C }, - { 0x1FC0995Cu, SCPH1001_func_1FC0994C_cont_BFC0995C }, - { 0x1FC0996Cu, SCPH1001_func_1FC0996C }, - { 0x1FC099A8u, SCPH1001_func_1FC0996C_cont_BFC099A8 }, - { 0x1FC099ACu, SCPH1001_func_1FC0996C_cont_BFC099AC }, - { 0x1FC099C8u, SCPH1001_func_1FC0996C_cont_BFC099C8 }, - { 0x1FC099D0u, SCPH1001_func_1FC0996C_cont_BFC099D0 }, - { 0x1FC099D8u, SCPH1001_func_1FC0996C_cont_BFC099D8 }, - { 0x1FC099E8u, SCPH1001_func_1FC0996C_cont_BFC099E8 }, - { 0x1FC099F4u, SCPH1001_func_1FC0996C_cont_BFC099F4 }, - { 0x1FC099FCu, SCPH1001_func_1FC0996C_cont_BFC099FC }, - { 0x1FC09A04u, SCPH1001_func_1FC0996C_cont_BFC09A04 }, - { 0x1FC09A08u, SCPH1001_func_1FC0996C_cont_BFC09A08 }, - { 0x1FC09A14u, SCPH1001_func_1FC0996C_cont_BFC09A14 }, - { 0x1FC09A1Cu, SCPH1001_func_1FC0996C_cont_BFC09A1C }, - { 0x1FC09A2Cu, SCPH1001_func_1FC0996C_cont_BFC09A2C }, - { 0x1FC09A38u, SCPH1001_func_1FC0996C_cont_BFC09A38 }, - { 0x1FC09A48u, SCPH1001_func_1FC0996C_cont_BFC09A48 }, - { 0x1FC09A80u, SCPH1001_func_1FC0996C_cont_BFC09A80 }, - { 0x1FC09A94u, SCPH1001_func_1FC0996C_cont_BFC09A94 }, - { 0x1FC09A98u, SCPH1001_func_1FC0996C_cont_BFC09A98 }, - { 0x1FC09AA4u, SCPH1001_func_1FC0996C_cont_BFC09AA4 }, - { 0x1FC09AC0u, SCPH1001_func_1FC0996C_cont_BFC09AC0 }, - { 0x1FC09AD4u, SCPH1001_func_1FC0996C_cont_BFC09AD4 }, - { 0x1FC09AD8u, SCPH1001_func_1FC0996C_cont_BFC09AD8 }, - { 0x1FC09AF0u, SCPH1001_func_1FC0996C_cont_BFC09AF0 }, - { 0x1FC09B04u, SCPH1001_func_1FC0996C_cont_BFC09B04 }, - { 0x1FC09B14u, SCPH1001_func_1FC0996C_cont_BFC09B14 }, - { 0x1FC09B4Cu, SCPH1001_func_1FC0996C_cont_BFC09B4C }, - { 0x1FC09B70u, SCPH1001_func_1FC0996C_cont_BFC09B70 }, - { 0x1FC09B90u, SCPH1001_func_1FC0996C_cont_BFC09B90 }, - { 0x1FC09B98u, SCPH1001_func_1FC0996C_cont_BFC09B98 }, - { 0x1FC09BA8u, SCPH1001_func_1FC0996C_cont_BFC09BA8 }, - { 0x1FC09BB8u, SCPH1001_func_1FC0996C_cont_BFC09BB8 }, - { 0x1FC09BC0u, SCPH1001_func_1FC0996C_cont_BFC09BC0 }, - { 0x1FC09BD4u, SCPH1001_func_1FC0996C_cont_BFC09BD4 }, - { 0x1FC09BE4u, SCPH1001_func_1FC0996C_cont_BFC09BE4 }, - { 0x1FC09C00u, SCPH1001_func_1FC0996C_cont_BFC09C00 }, - { 0x1FC09C18u, SCPH1001_func_1FC0996C_cont_BFC09C18 }, - { 0x1FC09C1Cu, SCPH1001_func_1FC0996C_cont_BFC09C1C }, - { 0x1FC09C28u, SCPH1001_func_1FC0996C_cont_BFC09C28 }, - { 0x1FC09C30u, SCPH1001_func_1FC0996C_cont_BFC09C30 }, - { 0x1FC09C40u, SCPH1001_func_1FC0996C_cont_BFC09C40 }, - { 0x1FC09C58u, SCPH1001_func_1FC0996C_cont_BFC09C58 }, - { 0x1FC09C60u, SCPH1001_func_1FC0996C_cont_BFC09C60 }, - { 0x1FC09C70u, SCPH1001_func_1FC0996C_cont_BFC09C70 }, - { 0x1FC09C7Cu, SCPH1001_func_1FC0996C_cont_BFC09C7C }, - { 0x1FC09C8Cu, SCPH1001_func_1FC0996C_cont_BFC09C8C }, - { 0x1FC09CA8u, SCPH1001_func_1FC0996C_cont_BFC09CA8 }, - { 0x1FC09CC4u, SCPH1001_func_1FC0996C_cont_BFC09CC4 }, - { 0x1FC09CDCu, SCPH1001_func_1FC09CDC }, - { 0x1FC09CF8u, SCPH1001_func_1FC09CDC_cont_BFC09CF8 }, - { 0x1FC09CFCu, SCPH1001_func_1FC09CDC_cont_BFC09CFC }, - { 0x1FC09D18u, SCPH1001_func_1FC09CDC_cont_BFC09D18 }, - { 0x1FC09D20u, SCPH1001_func_1FC09CDC_cont_BFC09D20 }, - { 0x1FC09D28u, SCPH1001_func_1FC09CDC_cont_BFC09D28 }, - { 0x1FC09D2Cu, SCPH1001_func_1FC09CDC_cont_BFC09D2C }, - { 0x1FC09D3Cu, SCPH1001_func_1FC09D3C }, - { 0x1FC09D84u, SCPH1001_func_1FC09D3C_cont_BFC09D84 }, - { 0x1FC09D88u, SCPH1001_func_1FC09D3C_cont_BFC09D88 }, - { 0x1FC09DA4u, SCPH1001_func_1FC09D3C_cont_BFC09DA4 }, - { 0x1FC09DACu, SCPH1001_func_1FC09D3C_cont_BFC09DAC }, - { 0x1FC09DB4u, SCPH1001_func_1FC09D3C_cont_BFC09DB4 }, - { 0x1FC09DC8u, SCPH1001_func_1FC09D3C_cont_BFC09DC8 }, - { 0x1FC09DD8u, SCPH1001_func_1FC09D3C_cont_BFC09DD8 }, - { 0x1FC09DECu, SCPH1001_func_1FC09D3C_cont_BFC09DEC }, - { 0x1FC09DFCu, SCPH1001_func_1FC09D3C_cont_BFC09DFC }, - { 0x1FC09E20u, SCPH1001_func_1FC09D3C_cont_BFC09E20 }, - { 0x1FC09E24u, SCPH1001_func_1FC09D3C_cont_BFC09E24 }, - { 0x1FC09E34u, SCPH1001_func_1FC09D3C_cont_BFC09E34 }, - { 0x1FC09E4Cu, SCPH1001_func_1FC09D3C_cont_BFC09E4C }, - { 0x1FC09E5Cu, SCPH1001_func_1FC09D3C_cont_BFC09E5C }, - { 0x1FC09EB4u, SCPH1001_func_1FC09D3C_cont_BFC09EB4 }, - { 0x1FC09EBCu, SCPH1001_func_1FC09D3C_cont_BFC09EBC }, - { 0x1FC09ED8u, SCPH1001_func_1FC09D3C_cont_BFC09ED8 }, - { 0x1FC09EECu, SCPH1001_func_1FC09D3C_cont_BFC09EEC }, - { 0x1FC09F00u, SCPH1001_func_1FC09D3C_cont_BFC09F00 }, - { 0x1FC09F10u, SCPH1001_func_1FC09D3C_cont_BFC09F10 }, - { 0x1FC09F1Cu, SCPH1001_func_1FC09D3C_cont_BFC09F1C }, - { 0x1FC09F20u, SCPH1001_func_1FC09D3C_cont_BFC09F20 }, - { 0x1FC09F30u, SCPH1001_func_1FC09D3C_cont_BFC09F30 }, - { 0x1FC09F3Cu, SCPH1001_func_1FC09D3C_cont_BFC09F3C }, - { 0x1FC09F50u, SCPH1001_func_1FC09D3C_cont_BFC09F50 }, - { 0x1FC09F68u, SCPH1001_func_1FC09D3C_cont_BFC09F68 }, - { 0x1FC09F70u, SCPH1001_func_1FC09D3C_cont_BFC09F70 }, - { 0x1FC09F78u, SCPH1001_func_1FC09D3C_cont_BFC09F78 }, - { 0x1FC09F80u, SCPH1001_func_1FC09D3C_cont_BFC09F80 }, - { 0x1FC09F88u, SCPH1001_func_1FC09D3C_cont_BFC09F88 }, - { 0x1FC09F8Cu, SCPH1001_func_1FC09D3C_cont_BFC09F8C }, - { 0x1FC09F9Cu, SCPH1001_func_1FC09D3C_cont_BFC09F9C }, - { 0x1FC09FA4u, SCPH1001_func_1FC09D3C_cont_BFC09FA4 }, - { 0x1FC09FA8u, SCPH1001_func_1FC09D3C_cont_BFC09FA8 }, - { 0x1FC09FB8u, SCPH1001_func_1FC09D3C_cont_BFC09FB8 }, - { 0x1FC09FCCu, SCPH1001_func_1FC09D3C_cont_BFC09FCC }, - { 0x1FC09FD8u, SCPH1001_func_1FC09D3C_cont_BFC09FD8 }, - { 0x1FC09FE8u, SCPH1001_func_1FC09D3C_cont_BFC09FE8 }, - { 0x1FC09FECu, SCPH1001_func_1FC09D3C_cont_BFC09FEC }, - { 0x1FC09FFCu, SCPH1001_func_1FC09D3C_cont_BFC09FFC }, - { 0x1FC0A00Cu, SCPH1001_func_1FC09D3C_cont_BFC0A00C }, - { 0x1FC0A034u, SCPH1001_func_1FC09D3C_cont_BFC0A034 }, - { 0x1FC0A044u, SCPH1001_func_1FC09D3C_cont_BFC0A044 }, - { 0x1FC0A048u, SCPH1001_func_1FC09D3C_cont_BFC0A048 }, - { 0x1FC0A060u, SCPH1001_func_1FC09D3C_cont_BFC0A060 }, - { 0x1FC0A080u, SCPH1001_func_1FC0A080 }, - { 0x1FC0A0C8u, SCPH1001_func_1FC0A080_cont_BFC0A0C8 }, - { 0x1FC0A0CCu, SCPH1001_func_1FC0A080_cont_BFC0A0CC }, - { 0x1FC0A0E8u, SCPH1001_func_1FC0A080_cont_BFC0A0E8 }, - { 0x1FC0A0F0u, SCPH1001_func_1FC0A080_cont_BFC0A0F0 }, - { 0x1FC0A0F8u, SCPH1001_func_1FC0A080_cont_BFC0A0F8 }, - { 0x1FC0A10Cu, SCPH1001_func_1FC0A080_cont_BFC0A10C }, - { 0x1FC0A11Cu, SCPH1001_func_1FC0A080_cont_BFC0A11C }, - { 0x1FC0A130u, SCPH1001_func_1FC0A080_cont_BFC0A130 }, - { 0x1FC0A140u, SCPH1001_func_1FC0A080_cont_BFC0A140 }, - { 0x1FC0A164u, SCPH1001_func_1FC0A080_cont_BFC0A164 }, - { 0x1FC0A168u, SCPH1001_func_1FC0A080_cont_BFC0A168 }, - { 0x1FC0A178u, SCPH1001_func_1FC0A080_cont_BFC0A178 }, - { 0x1FC0A190u, SCPH1001_func_1FC0A080_cont_BFC0A190 }, - { 0x1FC0A1A0u, SCPH1001_func_1FC0A080_cont_BFC0A1A0 }, - { 0x1FC0A1F8u, SCPH1001_func_1FC0A080_cont_BFC0A1F8 }, - { 0x1FC0A200u, SCPH1001_func_1FC0A080_cont_BFC0A200 }, - { 0x1FC0A21Cu, SCPH1001_func_1FC0A080_cont_BFC0A21C }, - { 0x1FC0A230u, SCPH1001_func_1FC0A080_cont_BFC0A230 }, - { 0x1FC0A244u, SCPH1001_func_1FC0A080_cont_BFC0A244 }, - { 0x1FC0A254u, SCPH1001_func_1FC0A080_cont_BFC0A254 }, - { 0x1FC0A260u, SCPH1001_func_1FC0A080_cont_BFC0A260 }, - { 0x1FC0A264u, SCPH1001_func_1FC0A080_cont_BFC0A264 }, - { 0x1FC0A284u, SCPH1001_func_1FC0A080_cont_BFC0A284 }, - { 0x1FC0A290u, SCPH1001_func_1FC0A080_cont_BFC0A290 }, - { 0x1FC0A2A4u, SCPH1001_func_1FC0A080_cont_BFC0A2A4 }, - { 0x1FC0A2BCu, SCPH1001_func_1FC0A080_cont_BFC0A2BC }, - { 0x1FC0A2C4u, SCPH1001_func_1FC0A080_cont_BFC0A2C4 }, - { 0x1FC0A2CCu, SCPH1001_func_1FC0A080_cont_BFC0A2CC }, - { 0x1FC0A2D4u, SCPH1001_func_1FC0A080_cont_BFC0A2D4 }, - { 0x1FC0A2DCu, SCPH1001_func_1FC0A080_cont_BFC0A2DC }, - { 0x1FC0A2E0u, SCPH1001_func_1FC0A080_cont_BFC0A2E0 }, - { 0x1FC0A2F0u, SCPH1001_func_1FC0A080_cont_BFC0A2F0 }, - { 0x1FC0A2F8u, SCPH1001_func_1FC0A080_cont_BFC0A2F8 }, - { 0x1FC0A2FCu, SCPH1001_func_1FC0A080_cont_BFC0A2FC }, - { 0x1FC0A30Cu, SCPH1001_func_1FC0A080_cont_BFC0A30C }, - { 0x1FC0A320u, SCPH1001_func_1FC0A080_cont_BFC0A320 }, - { 0x1FC0A32Cu, SCPH1001_func_1FC0A080_cont_BFC0A32C }, - { 0x1FC0A33Cu, SCPH1001_func_1FC0A080_cont_BFC0A33C }, - { 0x1FC0A340u, SCPH1001_func_1FC0A080_cont_BFC0A340 }, - { 0x1FC0A350u, SCPH1001_func_1FC0A080_cont_BFC0A350 }, - { 0x1FC0A360u, SCPH1001_func_1FC0A080_cont_BFC0A360 }, - { 0x1FC0A388u, SCPH1001_func_1FC0A080_cont_BFC0A388 }, - { 0x1FC0A398u, SCPH1001_func_1FC0A080_cont_BFC0A398 }, - { 0x1FC0A39Cu, SCPH1001_func_1FC0A080_cont_BFC0A39C }, - { 0x1FC0A3B4u, SCPH1001_func_1FC0A080_cont_BFC0A3B4 }, - { 0x1FC0A3D4u, SCPH1001_func_1FC0A3D4 }, - { 0x1FC0A3E0u, SCPH1001_func_1FC0A3D4_cont_BFC0A3E0 }, - { 0x1FC0A400u, SCPH1001_func_1FC0A3D4_cont_BFC0A400 }, - { 0x1FC0A414u, SCPH1001_func_1FC0A3D4_cont_BFC0A414 }, - { 0x1FC0A420u, SCPH1001_func_1FC0A3D4_cont_BFC0A420 }, - { 0x1FC0A428u, SCPH1001_func_1FC0A3D4_cont_BFC0A428 }, - { 0x1FC0A42Cu, SCPH1001_func_1FC0A3D4_cont_BFC0A42C }, - { 0x1FC0A43Cu, SCPH1001_func_1FC0A43C }, - { 0x1FC0A44Cu, SCPH1001_func_1FC0A43C_cont_BFC0A44C }, - { 0x1FC0A454u, SCPH1001_func_1FC0A43C_cont_BFC0A454 }, - { 0x1FC0A458u, SCPH1001_func_1FC0A43C_cont_BFC0A458 }, - { 0x1FC0A468u, SCPH1001_func_1FC0A43C_cont_BFC0A468 }, - { 0x1FC0A470u, SCPH1001_func_1FC0A43C_cont_BFC0A470 }, - { 0x1FC0A478u, SCPH1001_func_1FC0A43C_cont_BFC0A478 }, - { 0x1FC0A488u, SCPH1001_func_1FC0A43C_cont_BFC0A488 }, - { 0x1FC0A498u, SCPH1001_func_1FC0A43C_cont_BFC0A498 }, - { 0x1FC0A4A0u, SCPH1001_func_1FC0A43C_cont_BFC0A4A0 }, - { 0x1FC0A4ACu, SCPH1001_func_1FC0A43C_cont_BFC0A4AC }, - { 0x1FC0A4B4u, SCPH1001_func_1FC0A4B4 }, - { 0x1FC0A4D8u, SCPH1001_func_1FC0A4B4_cont_BFC0A4D8 }, - { 0x1FC0A4DCu, SCPH1001_func_1FC0A4B4_cont_BFC0A4DC }, - { 0x1FC0A4F8u, SCPH1001_func_1FC0A4B4_cont_BFC0A4F8 }, - { 0x1FC0A508u, SCPH1001_func_1FC0A4B4_cont_BFC0A508 }, - { 0x1FC0A51Cu, SCPH1001_func_1FC0A4B4_cont_BFC0A51C }, - { 0x1FC0A548u, SCPH1001_func_1FC0A4B4_cont_BFC0A548 }, - { 0x1FC0A560u, SCPH1001_func_1FC0A4B4_cont_BFC0A560 }, - { 0x1FC0A570u, SCPH1001_func_1FC0A4B4_cont_BFC0A570 }, - { 0x1FC0A5C4u, SCPH1001_func_1FC0A4B4_cont_BFC0A5C4 }, - { 0x1FC0A5D4u, SCPH1001_func_1FC0A4B4_cont_BFC0A5D4 }, - { 0x1FC0A5E4u, SCPH1001_func_1FC0A5E4 }, - { 0x1FC0A60Cu, SCPH1001_func_1FC0A5E4_cont_BFC0A60C }, - { 0x1FC0A610u, SCPH1001_func_1FC0A5E4_cont_BFC0A610 }, - { 0x1FC0A62Cu, SCPH1001_func_1FC0A5E4_cont_BFC0A62C }, - { 0x1FC0A634u, SCPH1001_func_1FC0A5E4_cont_BFC0A634 }, - { 0x1FC0A640u, SCPH1001_func_1FC0A5E4_cont_BFC0A640 }, - { 0x1FC0A64Cu, SCPH1001_func_1FC0A5E4_cont_BFC0A64C }, - { 0x1FC0A654u, SCPH1001_func_1FC0A5E4_cont_BFC0A654 }, - { 0x1FC0A65Cu, SCPH1001_func_1FC0A5E4_cont_BFC0A65C }, - { 0x1FC0A660u, SCPH1001_func_1FC0A5E4_cont_BFC0A660 }, - { 0x1FC0A678u, SCPH1001_func_1FC0A5E4_cont_BFC0A678 }, - { 0x1FC0A688u, SCPH1001_func_1FC0A5E4_cont_BFC0A688 }, - { 0x1FC0A694u, SCPH1001_func_1FC0A5E4_cont_BFC0A694 }, - { 0x1FC0A6A4u, SCPH1001_func_1FC0A5E4_cont_BFC0A6A4 }, - { 0x1FC0A6ACu, SCPH1001_func_1FC0A5E4_cont_BFC0A6AC }, - { 0x1FC0A6B0u, SCPH1001_func_1FC0A5E4_cont_BFC0A6B0 }, - { 0x1FC0A6C4u, SCPH1001_func_1FC0A5E4_cont_BFC0A6C4 }, - { 0x1FC0A6CCu, SCPH1001_func_1FC0A5E4_cont_BFC0A6CC }, - { 0x1FC0A6D4u, SCPH1001_func_1FC0A5E4_cont_BFC0A6D4 }, - { 0x1FC0A6DCu, SCPH1001_func_1FC0A5E4_cont_BFC0A6DC }, - { 0x1FC0A6F0u, SCPH1001_func_1FC0A5E4_cont_BFC0A6F0 }, - { 0x1FC0A700u, SCPH1001_func_1FC0A5E4_cont_BFC0A700 }, - { 0x1FC0A714u, SCPH1001_func_1FC0A5E4_cont_BFC0A714 }, - { 0x1FC0A718u, SCPH1001_func_1FC0A5E4_cont_BFC0A718 }, - { 0x1FC0A728u, SCPH1001_func_1FC0A5E4_cont_BFC0A728 }, - { 0x1FC0A72Cu, SCPH1001_func_1FC0A5E4_cont_BFC0A72C }, - { 0x1FC0A744u, SCPH1001_func_1FC0A5E4_cont_BFC0A744 }, - { 0x1FC0A754u, SCPH1001_func_1FC0A754 }, - { 0x1FC0A774u, SCPH1001_func_1FC0A754_cont_BFC0A774 }, - { 0x1FC0A7A0u, SCPH1001_func_1FC0A754_cont_BFC0A7A0 }, - { 0x1FC0A7A4u, SCPH1001_func_1FC0A754_cont_BFC0A7A4 }, - { 0x1FC0A7BCu, SCPH1001_func_1FC0A754_cont_BFC0A7BC }, - { 0x1FC0A7C4u, SCPH1001_func_1FC0A754_cont_BFC0A7C4 }, - { 0x1FC0A7CCu, SCPH1001_func_1FC0A754_cont_BFC0A7CC }, - { 0x1FC0A7DCu, SCPH1001_func_1FC0A754_cont_BFC0A7DC }, - { 0x1FC0A7E8u, SCPH1001_func_1FC0A754_cont_BFC0A7E8 }, - { 0x1FC0A7F0u, SCPH1001_func_1FC0A754_cont_BFC0A7F0 }, - { 0x1FC0A7FCu, SCPH1001_func_1FC0A754_cont_BFC0A7FC }, - { 0x1FC0A804u, SCPH1001_func_1FC0A754_cont_BFC0A804 }, - { 0x1FC0A824u, SCPH1001_func_1FC0A754_cont_BFC0A824 }, - { 0x1FC0A834u, SCPH1001_func_1FC0A754_cont_BFC0A834 }, - { 0x1FC0A840u, SCPH1001_func_1FC0A754_cont_BFC0A840 }, - { 0x1FC0A848u, SCPH1001_func_1FC0A754_cont_BFC0A848 }, - { 0x1FC0A854u, SCPH1001_func_1FC0A754_cont_BFC0A854 }, - { 0x1FC0A85Cu, SCPH1001_func_1FC0A754_cont_BFC0A85C }, - { 0x1FC0A87Cu, SCPH1001_func_1FC0A754_cont_BFC0A87C }, - { 0x1FC0A88Cu, SCPH1001_func_1FC0A754_cont_BFC0A88C }, - { 0x1FC0A8A4u, SCPH1001_func_1FC0A754_cont_BFC0A8A4 }, - { 0x1FC0A8A8u, SCPH1001_func_1FC0A754_cont_BFC0A8A8 }, - { 0x1FC0A8BCu, SCPH1001_func_1FC0A8BC }, - { 0x1FC0A8E0u, SCPH1001_func_1FC0A8BC_cont_BFC0A8E0 }, - { 0x1FC0A8E4u, SCPH1001_func_1FC0A8BC_cont_BFC0A8E4 }, - { 0x1FC0A900u, SCPH1001_func_1FC0A8BC_cont_BFC0A900 }, - { 0x1FC0A908u, SCPH1001_func_1FC0A8BC_cont_BFC0A908 }, - { 0x1FC0A918u, SCPH1001_func_1FC0A8BC_cont_BFC0A918 }, - { 0x1FC0A924u, SCPH1001_func_1FC0A8BC_cont_BFC0A924 }, - { 0x1FC0A92Cu, SCPH1001_func_1FC0A8BC_cont_BFC0A92C }, - { 0x1FC0A934u, SCPH1001_func_1FC0A8BC_cont_BFC0A934 }, - { 0x1FC0A93Cu, SCPH1001_func_1FC0A8BC_cont_BFC0A93C }, - { 0x1FC0A94Cu, SCPH1001_func_1FC0A8BC_cont_BFC0A94C }, - { 0x1FC0A958u, SCPH1001_func_1FC0A8BC_cont_BFC0A958 }, - { 0x1FC0A96Cu, SCPH1001_func_1FC0A8BC_cont_BFC0A96C }, - { 0x1FC0A984u, SCPH1001_func_1FC0A8BC_cont_BFC0A984 }, - { 0x1FC0A99Cu, SCPH1001_func_1FC0A8BC_cont_BFC0A99C }, - { 0x1FC0A9ECu, SCPH1001_func_1FC0A8BC_cont_BFC0A9EC }, - { 0x1FC0A9F0u, SCPH1001_func_1FC0A8BC_cont_BFC0A9F0 }, - { 0x1FC0AA00u, SCPH1001_func_1FC0A8BC_cont_BFC0AA00 }, - { 0x1FC0AA0Cu, SCPH1001_func_1FC0A8BC_cont_BFC0AA0C }, - { 0x1FC0AA10u, SCPH1001_func_1FC0A8BC_cont_BFC0AA10 }, - { 0x1FC0AA24u, SCPH1001_func_1FC0A8BC_cont_BFC0AA24 }, - { 0x1FC0AA2Cu, SCPH1001_func_1FC0A8BC_cont_BFC0AA2C }, - { 0x1FC0AA3Cu, SCPH1001_func_1FC0A8BC_cont_BFC0AA3C }, - { 0x1FC0AA44u, SCPH1001_func_1FC0A8BC_cont_BFC0AA44 }, - { 0x1FC0AA48u, SCPH1001_func_1FC0A8BC_cont_BFC0AA48 }, - { 0x1FC0AA50u, SCPH1001_func_1FC0A8BC_cont_BFC0AA50 }, - { 0x1FC0AA68u, SCPH1001_func_1FC0A8BC_cont_BFC0AA68 }, - { 0x1FC0AA80u, SCPH1001_func_1FC0A8BC_cont_BFC0AA80 }, - { 0x1FC0AA90u, SCPH1001_func_1FC0A8BC_cont_BFC0AA90 }, - { 0x1FC0AA98u, SCPH1001_func_1FC0A8BC_cont_BFC0AA98 }, - { 0x1FC0AAB0u, SCPH1001_func_1FC0A8BC_cont_BFC0AAB0 }, - { 0x1FC0AAC0u, SCPH1001_func_1FC0A8BC_cont_BFC0AAC0 }, - { 0x1FC0AAD8u, SCPH1001_func_1FC0A8BC_cont_BFC0AAD8 }, - { 0x1FC0AAE4u, SCPH1001_func_1FC0A8BC_cont_BFC0AAE4 }, - { 0x1FC0AAF0u, SCPH1001_func_1FC0A8BC_cont_BFC0AAF0 }, - { 0x1FC0AB00u, SCPH1001_func_1FC0A8BC_cont_BFC0AB00 }, - { 0x1FC0AB10u, SCPH1001_func_1FC0A8BC_cont_BFC0AB10 }, - { 0x1FC0AB24u, SCPH1001_func_1FC0A8BC_cont_BFC0AB24 }, - { 0x1FC0AB30u, SCPH1001_func_1FC0A8BC_cont_BFC0AB30 }, - { 0x1FC0AB44u, SCPH1001_func_1FC0A8BC_cont_BFC0AB44 }, - { 0x1FC0AB50u, SCPH1001_func_1FC0A8BC_cont_BFC0AB50 }, - { 0x1FC0AB60u, SCPH1001_func_1FC0AB60 }, - { 0x1FC0AB94u, SCPH1001_func_1FC0AB60_cont_BFC0AB94 }, - { 0x1FC0AB98u, SCPH1001_func_1FC0AB60_cont_BFC0AB98 }, - { 0x1FC0ABB4u, SCPH1001_func_1FC0AB60_cont_BFC0ABB4 }, - { 0x1FC0ABBCu, SCPH1001_func_1FC0AB60_cont_BFC0ABBC }, - { 0x1FC0ABC8u, SCPH1001_func_1FC0AB60_cont_BFC0ABC8 }, - { 0x1FC0ABD4u, SCPH1001_func_1FC0AB60_cont_BFC0ABD4 }, - { 0x1FC0ABDCu, SCPH1001_func_1FC0AB60_cont_BFC0ABDC }, - { 0x1FC0ABE4u, SCPH1001_func_1FC0AB60_cont_BFC0ABE4 }, - { 0x1FC0ABECu, SCPH1001_func_1FC0AB60_cont_BFC0ABEC }, - { 0x1FC0ABFCu, SCPH1001_func_1FC0AB60_cont_BFC0ABFC }, - { 0x1FC0AC08u, SCPH1001_func_1FC0AB60_cont_BFC0AC08 }, - { 0x1FC0AC18u, SCPH1001_func_1FC0AB60_cont_BFC0AC18 }, - { 0x1FC0AC1Cu, SCPH1001_func_1FC0AB60_cont_BFC0AC1C }, - { 0x1FC0AC28u, SCPH1001_func_1FC0AB60_cont_BFC0AC28 }, - { 0x1FC0AC34u, SCPH1001_func_1FC0AB60_cont_BFC0AC34 }, - { 0x1FC0AC44u, SCPH1001_func_1FC0AB60_cont_BFC0AC44 }, - { 0x1FC0AC5Cu, SCPH1001_func_1FC0AB60_cont_BFC0AC5C }, - { 0x1FC0AC74u, SCPH1001_func_1FC0AB60_cont_BFC0AC74 }, - { 0x1FC0ACA8u, SCPH1001_func_1FC0AB60_cont_BFC0ACA8 }, - { 0x1FC0ACC8u, SCPH1001_func_1FC0AB60_cont_BFC0ACC8 }, - { 0x1FC0ACD0u, SCPH1001_func_1FC0AB60_cont_BFC0ACD0 }, - { 0x1FC0ACE0u, SCPH1001_func_1FC0AB60_cont_BFC0ACE0 }, - { 0x1FC0ACF0u, SCPH1001_func_1FC0AB60_cont_BFC0ACF0 }, - { 0x1FC0ACF8u, SCPH1001_func_1FC0AB60_cont_BFC0ACF8 }, - { 0x1FC0AD08u, SCPH1001_func_1FC0AD08 }, - { 0x1FC0AD2Cu, SCPH1001_func_1FC0AD08_cont_BFC0AD2C }, - { 0x1FC0AD30u, SCPH1001_func_1FC0AD08_cont_BFC0AD30 }, - { 0x1FC0AD4Cu, SCPH1001_func_1FC0AD08_cont_BFC0AD4C }, - { 0x1FC0AD54u, SCPH1001_func_1FC0AD08_cont_BFC0AD54 }, - { 0x1FC0AD64u, SCPH1001_func_1FC0AD08_cont_BFC0AD64 }, - { 0x1FC0AD70u, SCPH1001_func_1FC0AD08_cont_BFC0AD70 }, - { 0x1FC0AD78u, SCPH1001_func_1FC0AD08_cont_BFC0AD78 }, - { 0x1FC0AD80u, SCPH1001_func_1FC0AD08_cont_BFC0AD80 }, - { 0x1FC0AD88u, SCPH1001_func_1FC0AD08_cont_BFC0AD88 }, - { 0x1FC0AD98u, SCPH1001_func_1FC0AD08_cont_BFC0AD98 }, - { 0x1FC0ADA4u, SCPH1001_func_1FC0AD08_cont_BFC0ADA4 }, - { 0x1FC0ADB8u, SCPH1001_func_1FC0AD08_cont_BFC0ADB8 }, - { 0x1FC0ADC0u, SCPH1001_func_1FC0AD08_cont_BFC0ADC0 }, - { 0x1FC0ADD0u, SCPH1001_func_1FC0AD08_cont_BFC0ADD0 }, - { 0x1FC0ADE0u, SCPH1001_func_1FC0AD08_cont_BFC0ADE0 }, - { 0x1FC0ADF0u, SCPH1001_func_1FC0AD08_cont_BFC0ADF0 }, - { 0x1FC0AE24u, SCPH1001_func_1FC0AD08_cont_BFC0AE24 }, - { 0x1FC0AE34u, SCPH1001_func_1FC0AD08_cont_BFC0AE34 }, - { 0x1FC0AE3Cu, SCPH1001_func_1FC0AD08_cont_BFC0AE3C }, - { 0x1FC0AE50u, SCPH1001_func_1FC0AD08_cont_BFC0AE50 }, - { 0x1FC0AE54u, SCPH1001_func_1FC0AD08_cont_BFC0AE54 }, - { 0x1FC0AE64u, SCPH1001_func_1FC0AD08_cont_BFC0AE64 }, - { 0x1FC0AE6Cu, SCPH1001_func_1FC0AD08_cont_BFC0AE6C }, - { 0x1FC0AE70u, SCPH1001_func_1FC0AD08_cont_BFC0AE70 }, - { 0x1FC0AE84u, SCPH1001_func_1FC0AD08_cont_BFC0AE84 }, - { 0x1FC0AE8Cu, SCPH1001_func_1FC0AD08_cont_BFC0AE8C }, - { 0x1FC0AE9Cu, SCPH1001_func_1FC0AD08_cont_BFC0AE9C }, - { 0x1FC0AEA0u, SCPH1001_func_1FC0AD08_cont_BFC0AEA0 }, - { 0x1FC0AEA8u, SCPH1001_func_1FC0AD08_cont_BFC0AEA8 }, - { 0x1FC0AEC0u, SCPH1001_func_1FC0AD08_cont_BFC0AEC0 }, - { 0x1FC0AED0u, SCPH1001_func_1FC0AD08_cont_BFC0AED0 }, - { 0x1FC0AED4u, SCPH1001_func_1FC0AD08_cont_BFC0AED4 }, - { 0x1FC0AEE8u, SCPH1001_func_1FC0AD08_cont_BFC0AEE8 }, - { 0x1FC0AEF0u, SCPH1001_func_1FC0AD08_cont_BFC0AEF0 }, - { 0x1FC0AF04u, SCPH1001_func_1FC0AD08_cont_BFC0AF04 }, - { 0x1FC0AF08u, SCPH1001_func_1FC0AD08_cont_BFC0AF08 }, - { 0x1FC0AF28u, SCPH1001_func_1FC0AD08_cont_BFC0AF28 }, - { 0x1FC0AF40u, SCPH1001_func_1FC0AD08_cont_BFC0AF40 }, - { 0x1FC0AF60u, SCPH1001_func_1FC0AD08_cont_BFC0AF60 }, - { 0x1FC0AF6Cu, SCPH1001_func_1FC0AD08_cont_BFC0AF6C }, - { 0x1FC0AF78u, SCPH1001_func_1FC0AD08_cont_BFC0AF78 }, - { 0x1FC0AF80u, SCPH1001_func_1FC0AD08_cont_BFC0AF80 }, - { 0x1FC0AF84u, SCPH1001_func_1FC0AD08_cont_BFC0AF84 }, - { 0x1FC0AF98u, SCPH1001_func_1FC0AD08_cont_BFC0AF98 }, - { 0x1FC0AFA0u, SCPH1001_func_1FC0AD08_cont_BFC0AFA0 }, - { 0x1FC0AFA4u, SCPH1001_func_1FC0AD08_cont_BFC0AFA4 }, - { 0x1FC0AFACu, SCPH1001_func_1FC0AD08_cont_BFC0AFAC }, - { 0x1FC0AFC8u, SCPH1001_func_1FC0AD08_cont_BFC0AFC8 }, - { 0x1FC0AFD0u, SCPH1001_func_1FC0AD08_cont_BFC0AFD0 }, - { 0x1FC0AFE8u, SCPH1001_func_1FC0AD08_cont_BFC0AFE8 }, - { 0x1FC0AFF0u, SCPH1001_func_1FC0AD08_cont_BFC0AFF0 }, - { 0x1FC0AFF8u, SCPH1001_func_1FC0AD08_cont_BFC0AFF8 }, - { 0x1FC0B010u, SCPH1001_func_1FC0AD08_cont_BFC0B010 }, - { 0x1FC0B024u, SCPH1001_func_1FC0AD08_cont_BFC0B024 }, - { 0x1FC0B028u, SCPH1001_func_1FC0AD08_cont_BFC0B028 }, - { 0x1FC0B034u, SCPH1001_func_1FC0AD08_cont_BFC0B034 }, - { 0x1FC0B040u, SCPH1001_func_1FC0AD08_cont_BFC0B040 }, - { 0x1FC0B050u, SCPH1001_func_1FC0AD08_cont_BFC0B050 }, - { 0x1FC0B060u, SCPH1001_func_1FC0AD08_cont_BFC0B060 }, - { 0x1FC0B074u, SCPH1001_func_1FC0AD08_cont_BFC0B074 }, - { 0x1FC0B080u, SCPH1001_func_1FC0AD08_cont_BFC0B080 }, - { 0x1FC0B094u, SCPH1001_func_1FC0AD08_cont_BFC0B094 }, - { 0x1FC0B0A4u, SCPH1001_func_1FC0AD08_cont_BFC0B0A4 }, - { 0x1FC0B0A8u, SCPH1001_func_1FC0AD08_cont_BFC0B0A8 }, - { 0x1FC0B0B4u, SCPH1001_func_1FC0AD08_cont_BFC0B0B4 }, - { 0x1FC0B0C4u, SCPH1001_func_1FC0B0C4 }, - { 0x1FC0B0D0u, SCPH1001_func_1FC0B0D0 }, - { 0x1FC0B0F0u, SCPH1001_func_1FC0B0D0_cont_BFC0B0F0 }, - { 0x1FC0B0F4u, SCPH1001_func_1FC0B0D0_cont_BFC0B0F4 }, - { 0x1FC0B110u, SCPH1001_func_1FC0B0D0_cont_BFC0B110 }, - { 0x1FC0B120u, SCPH1001_func_1FC0B0D0_cont_BFC0B120 }, - { 0x1FC0B128u, SCPH1001_func_1FC0B0D0_cont_BFC0B128 }, - { 0x1FC0B13Cu, SCPH1001_func_1FC0B0D0_cont_BFC0B13C }, - { 0x1FC0B148u, SCPH1001_func_1FC0B0D0_cont_BFC0B148 }, - { 0x1FC0B158u, SCPH1001_func_1FC0B0D0_cont_BFC0B158 }, - { 0x1FC0B160u, SCPH1001_func_1FC0B0D0_cont_BFC0B160 }, - { 0x1FC0B170u, SCPH1001_func_1FC0B170 }, - { 0x1FC0B19Cu, SCPH1001_func_1FC0B170_cont_BFC0B19C }, - { 0x1FC0B1A0u, SCPH1001_func_1FC0B170_cont_BFC0B1A0 }, - { 0x1FC0B1B8u, SCPH1001_func_1FC0B170_cont_BFC0B1B8 }, - { 0x1FC0B1D0u, SCPH1001_func_1FC0B170_cont_BFC0B1D0 }, - { 0x1FC0B1D8u, SCPH1001_func_1FC0B170_cont_BFC0B1D8 }, - { 0x1FC0B1E8u, SCPH1001_func_1FC0B170_cont_BFC0B1E8 }, - { 0x1FC0B1F4u, SCPH1001_func_1FC0B170_cont_BFC0B1F4 }, - { 0x1FC0B1FCu, SCPH1001_func_1FC0B170_cont_BFC0B1FC }, - { 0x1FC0B218u, SCPH1001_func_1FC0B170_cont_BFC0B218 }, - { 0x1FC0B248u, SCPH1001_func_1FC0B170_cont_BFC0B248 }, - { 0x1FC0B258u, SCPH1001_func_1FC0B170_cont_BFC0B258 }, - { 0x1FC0B274u, SCPH1001_func_1FC0B170_cont_BFC0B274 }, - { 0x1FC0B27Cu, SCPH1001_func_1FC0B170_cont_BFC0B27C }, - { 0x1FC0B290u, SCPH1001_func_1FC0B170_cont_BFC0B290 }, - { 0x1FC0B298u, SCPH1001_func_1FC0B170_cont_BFC0B298 }, - { 0x1FC0B2B8u, SCPH1001_func_1FC0B170_cont_BFC0B2B8 }, - { 0x1FC0B2C0u, SCPH1001_func_1FC0B170_cont_BFC0B2C0 }, - { 0x1FC0B2CCu, SCPH1001_func_1FC0B170_cont_BFC0B2CC }, - { 0x1FC0B2F8u, SCPH1001_func_1FC0B170_cont_BFC0B2F8 }, - { 0x1FC0B30Cu, SCPH1001_func_1FC0B170_cont_BFC0B30C }, - { 0x1FC0B314u, SCPH1001_func_1FC0B170_cont_BFC0B314 }, - { 0x1FC0B324u, SCPH1001_func_1FC0B170_cont_BFC0B324 }, - { 0x1FC0B32Cu, SCPH1001_func_1FC0B170_cont_BFC0B32C }, - { 0x1FC0B34Cu, SCPH1001_func_1FC0B170_cont_BFC0B34C }, - { 0x1FC0B354u, SCPH1001_func_1FC0B170_cont_BFC0B354 }, - { 0x1FC0B360u, SCPH1001_func_1FC0B170_cont_BFC0B360 }, - { 0x1FC0B37Cu, SCPH1001_func_1FC0B170_cont_BFC0B37C }, - { 0x1FC0B394u, SCPH1001_func_1FC0B394 }, - { 0x1FC0B3A4u, SCPH1001_func_1FC0B394_cont_BFC0B3A4 }, - { 0x1FC0B3B8u, SCPH1001_func_1FC0B394_cont_BFC0B3B8 }, - { 0x1FC0B3BCu, SCPH1001_func_1FC0B394_cont_BFC0B3BC }, - { 0x1FC0B3D8u, SCPH1001_func_1FC0B394_cont_BFC0B3D8 }, - { 0x1FC0B3E4u, SCPH1001_func_1FC0B394_cont_BFC0B3E4 }, - { 0x1FC0B3ECu, SCPH1001_func_1FC0B394_cont_BFC0B3EC }, - { 0x1FC0B3F4u, SCPH1001_func_1FC0B394_cont_BFC0B3F4 }, - { 0x1FC0B438u, SCPH1001_func_1FC0B394_cont_BFC0B438 }, - { 0x1FC0B450u, SCPH1001_func_1FC0B394_cont_BFC0B450 }, - { 0x1FC0B464u, SCPH1001_func_1FC0B394_cont_BFC0B464 }, - { 0x1FC0B468u, SCPH1001_func_1FC0B394_cont_BFC0B468 }, - { 0x1FC0B488u, SCPH1001_func_1FC0B394_cont_BFC0B488 }, - { 0x1FC0B498u, SCPH1001_func_1FC0B394_cont_BFC0B498 }, - { 0x1FC0B4A4u, SCPH1001_func_1FC0B394_cont_BFC0B4A4 }, - { 0x1FC0B4A8u, SCPH1001_func_1FC0B394_cont_BFC0B4A8 }, - { 0x1FC0B4B0u, SCPH1001_func_1FC0B394_cont_BFC0B4B0 }, - { 0x1FC0B4E0u, SCPH1001_func_1FC0B394_cont_BFC0B4E0 }, - { 0x1FC0B4FCu, SCPH1001_func_1FC0B394_cont_BFC0B4FC }, - { 0x1FC0B530u, SCPH1001_func_1FC0B394_cont_BFC0B530 }, - { 0x1FC0B534u, SCPH1001_func_1FC0B394_cont_BFC0B534 }, - { 0x1FC0B53Cu, SCPH1001_func_1FC0B394_cont_BFC0B53C }, - { 0x1FC0B54Cu, SCPH1001_func_1FC0B54C }, - { 0x1FC0B55Cu, SCPH1001_func_1FC0B54C_cont_BFC0B55C }, - { 0x1FC0B564u, SCPH1001_func_1FC0B54C_cont_BFC0B564 }, - { 0x1FC0B568u, SCPH1001_func_1FC0B54C_cont_BFC0B568 }, - { 0x1FC0B588u, SCPH1001_func_1FC0B54C_cont_BFC0B588 }, - { 0x1FC0B590u, SCPH1001_func_1FC0B54C_cont_BFC0B590 }, - { 0x1FC0B594u, SCPH1001_func_1FC0B54C_cont_BFC0B594 }, - { 0x1FC0B5A0u, SCPH1001_func_1FC0B5A0 }, - { 0x1FC0B5B0u, SCPH1001_func_1FC0B5A0_cont_BFC0B5B0 }, - { 0x1FC0B5B8u, SCPH1001_func_1FC0B5A0_cont_BFC0B5B8 }, - { 0x1FC0B5BCu, SCPH1001_func_1FC0B5A0_cont_BFC0B5BC }, - { 0x1FC0B5DCu, SCPH1001_func_1FC0B5A0_cont_BFC0B5DC }, - { 0x1FC0B5E4u, SCPH1001_func_1FC0B5A0_cont_BFC0B5E4 }, - { 0x1FC0B5E8u, SCPH1001_func_1FC0B5A0_cont_BFC0B5E8 }, - { 0x1FC0B5F4u, SCPH1001_func_1FC0B5F4 }, - { 0x1FC0B604u, SCPH1001_func_1FC0B5F4_cont_BFC0B604 }, - { 0x1FC0B60Cu, SCPH1001_func_1FC0B5F4_cont_BFC0B60C }, - { 0x1FC0B610u, SCPH1001_func_1FC0B5F4_cont_BFC0B610 }, - { 0x1FC0B630u, SCPH1001_func_1FC0B5F4_cont_BFC0B630 }, - { 0x1FC0B638u, SCPH1001_func_1FC0B5F4_cont_BFC0B638 }, - { 0x1FC0B63Cu, SCPH1001_func_1FC0B5F4_cont_BFC0B63C }, - { 0x1FC0B648u, SCPH1001_func_1FC0B648 }, - { 0x1FC0B658u, SCPH1001_func_1FC0B648_cont_BFC0B658 }, - { 0x1FC0B66Cu, SCPH1001_func_1FC0B648_cont_BFC0B66C }, - { 0x1FC0B670u, SCPH1001_func_1FC0B648_cont_BFC0B670 }, - { 0x1FC0B68Cu, SCPH1001_func_1FC0B648_cont_BFC0B68C }, - { 0x1FC0B6A0u, SCPH1001_func_1FC0B648_cont_BFC0B6A0 }, - { 0x1FC0B6BCu, SCPH1001_func_1FC0B648_cont_BFC0B6BC }, - { 0x1FC0B6E0u, SCPH1001_func_1FC0B648_cont_BFC0B6E0 }, - { 0x1FC0B6ECu, SCPH1001_func_1FC0B648_cont_BFC0B6EC }, - { 0x1FC0B70Cu, SCPH1001_func_1FC0B648_cont_BFC0B70C }, - { 0x1FC0B714u, SCPH1001_func_1FC0B648_cont_BFC0B714 }, - { 0x1FC0B788u, SCPH1001_func_1FC0B648_cont_BFC0B788 }, - { 0x1FC0B79Cu, SCPH1001_func_1FC0B648_cont_BFC0B79C }, - { 0x1FC0B7ACu, SCPH1001_func_1FC0B648_cont_BFC0B7AC }, - { 0x1FC0B7B0u, SCPH1001_func_1FC0B648_cont_BFC0B7B0 }, - { 0x1FC0B7C0u, SCPH1001_func_1FC0B648_cont_BFC0B7C0 }, - { 0x1FC0B7CCu, SCPH1001_func_1FC0B648_cont_BFC0B7CC }, - { 0x1FC0B7E8u, SCPH1001_func_1FC0B648_cont_BFC0B7E8 }, - { 0x1FC0B7F4u, SCPH1001_func_1FC0B648_cont_BFC0B7F4 }, - { 0x1FC0B818u, SCPH1001_func_1FC0B648_cont_BFC0B818 }, - { 0x1FC0B828u, SCPH1001_func_1FC0B648_cont_BFC0B828 }, - { 0x1FC0B834u, SCPH1001_func_1FC0B648_cont_BFC0B834 }, - { 0x1FC0B84Cu, SCPH1001_func_1FC0B648_cont_BFC0B84C }, - { 0x1FC0B850u, SCPH1001_func_1FC0B648_cont_BFC0B850 }, - { 0x1FC0B864u, SCPH1001_func_1FC0B648_cont_BFC0B864 }, - { 0x1FC0B8D8u, SCPH1001_func_1FC0B648_cont_BFC0B8D8 }, - { 0x1FC0B8ECu, SCPH1001_func_1FC0B648_cont_BFC0B8EC }, - { 0x1FC0B8FCu, SCPH1001_func_1FC0B648_cont_BFC0B8FC }, - { 0x1FC0B900u, SCPH1001_func_1FC0B648_cont_BFC0B900 }, - { 0x1FC0B920u, SCPH1001_func_1FC0B648_cont_BFC0B920 }, - { 0x1FC0B92Cu, SCPH1001_func_1FC0B648_cont_BFC0B92C }, - { 0x1FC0B948u, SCPH1001_func_1FC0B648_cont_BFC0B948 }, - { 0x1FC0B954u, SCPH1001_func_1FC0B648_cont_BFC0B954 }, - { 0x1FC0B9D0u, SCPH1001_func_1FC0B648_cont_BFC0B9D0 }, - { 0x1FC0B9E0u, SCPH1001_func_1FC0B648_cont_BFC0B9E0 }, - { 0x1FC0B9ECu, SCPH1001_func_1FC0B648_cont_BFC0B9EC }, - { 0x1FC0BA04u, SCPH1001_func_1FC0B648_cont_BFC0BA04 }, - { 0x1FC0BA10u, SCPH1001_func_1FC0B648_cont_BFC0BA10 }, - { 0x1FC0BA2Cu, SCPH1001_func_1FC0B648_cont_BFC0BA2C }, - { 0x1FC0BA38u, SCPH1001_func_1FC0B648_cont_BFC0BA38 }, - { 0x1FC0BA44u, SCPH1001_func_1FC0B648_cont_BFC0BA44 }, - { 0x1FC0BA6Cu, SCPH1001_func_1FC0B648_cont_BFC0BA6C }, - { 0x1FC0BA8Cu, SCPH1001_func_1FC0BA8C }, - { 0x1FC0BA98u, SCPH1001_func_1FC0BA8C_cont_BFC0BA98 }, - { 0x1FC0BAA0u, SCPH1001_func_1FC0BA8C_cont_BFC0BAA0 }, - { 0x1FC0BABCu, SCPH1001_func_1FC0BA8C_cont_BFC0BABC }, - { 0x1FC0BAC4u, SCPH1001_func_1FC0BA8C_cont_BFC0BAC4 }, - { 0x1FC0BACCu, SCPH1001_func_1FC0BA8C_cont_BFC0BACC }, - { 0x1FC0BAD4u, SCPH1001_func_1FC0BA8C_cont_BFC0BAD4 }, - { 0x1FC0BAF4u, SCPH1001_func_1FC0BA8C_cont_BFC0BAF4 }, - { 0x1FC0BB00u, SCPH1001_func_1FC0BA8C_cont_BFC0BB00 }, - { 0x1FC0BB04u, SCPH1001_func_1FC0BA8C_cont_BFC0BB04 }, - { 0x1FC0BB20u, SCPH1001_func_1FC0BA8C_cont_BFC0BB20 }, - { 0x1FC0BB28u, SCPH1001_func_1FC0BA8C_cont_BFC0BB28 }, - { 0x1FC0BB48u, SCPH1001_func_1FC0BA8C_cont_BFC0BB48 }, - { 0x1FC0BB58u, SCPH1001_func_1FC0BA8C_cont_BFC0BB58 }, - { 0x1FC0BB80u, SCPH1001_func_1FC0BA8C_cont_BFC0BB80 }, - { 0x1FC0BB9Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BB9C }, - { 0x1FC0BBA8u, SCPH1001_func_1FC0BA8C_cont_BFC0BBA8 }, - { 0x1FC0BBC4u, SCPH1001_func_1FC0BA8C_cont_BFC0BBC4 }, - { 0x1FC0BBCCu, SCPH1001_func_1FC0BA8C_cont_BFC0BBCC }, - { 0x1FC0BBF4u, SCPH1001_func_1FC0BA8C_cont_BFC0BBF4 }, - { 0x1FC0BBFCu, SCPH1001_func_1FC0BA8C_cont_BFC0BBFC }, - { 0x1FC0BC14u, SCPH1001_func_1FC0BA8C_cont_BFC0BC14 }, - { 0x1FC0BC1Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BC1C }, - { 0x1FC0BC5Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BC5C }, - { 0x1FC0BC64u, SCPH1001_func_1FC0BA8C_cont_BFC0BC64 }, - { 0x1FC0BC8Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BC8C }, - { 0x1FC0BCA0u, SCPH1001_func_1FC0BA8C_cont_BFC0BCA0 }, - { 0x1FC0BCACu, SCPH1001_func_1FC0BA8C_cont_BFC0BCAC }, - { 0x1FC0BCC8u, SCPH1001_func_1FC0BA8C_cont_BFC0BCC8 }, - { 0x1FC0BCD0u, SCPH1001_func_1FC0BA8C_cont_BFC0BCD0 }, - { 0x1FC0BCFCu, SCPH1001_func_1FC0BA8C_cont_BFC0BCFC }, - { 0x1FC0BD18u, SCPH1001_func_1FC0BA8C_cont_BFC0BD18 }, - { 0x1FC0BD2Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BD2C }, - { 0x1FC0BD38u, SCPH1001_func_1FC0BA8C_cont_BFC0BD38 }, - { 0x1FC0BD44u, SCPH1001_func_1FC0BA8C_cont_BFC0BD44 }, - { 0x1FC0BD5Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BD5C }, - { 0x1FC0BD74u, SCPH1001_func_1FC0BA8C_cont_BFC0BD74 }, - { 0x1FC0BD84u, SCPH1001_func_1FC0BA8C_cont_BFC0BD84 }, - { 0x1FC0BD94u, SCPH1001_func_1FC0BA8C_cont_BFC0BD94 }, - { 0x1FC0BDB8u, SCPH1001_func_1FC0BA8C_cont_BFC0BDB8 }, - { 0x1FC0BDBCu, SCPH1001_func_1FC0BA8C_cont_BFC0BDBC }, - { 0x1FC0BDCCu, SCPH1001_func_1FC0BA8C_cont_BFC0BDCC }, - { 0x1FC0BDD4u, SCPH1001_func_1FC0BA8C_cont_BFC0BDD4 }, - { 0x1FC0BDD8u, SCPH1001_func_1FC0BA8C_cont_BFC0BDD8 }, - { 0x1FC0BE04u, SCPH1001_func_1FC0BA8C_cont_BFC0BE04 }, - { 0x1FC0BE0Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BE0C }, - { 0x1FC0BE1Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BE1C }, - { 0x1FC0BE28u, SCPH1001_func_1FC0BA8C_cont_BFC0BE28 }, - { 0x1FC0BE38u, SCPH1001_func_1FC0BA8C_cont_BFC0BE38 }, - { 0x1FC0BE44u, SCPH1001_func_1FC0BA8C_cont_BFC0BE44 }, - { 0x1FC0BE50u, SCPH1001_func_1FC0BA8C_cont_BFC0BE50 }, - { 0x1FC0BE74u, SCPH1001_func_1FC0BA8C_cont_BFC0BE74 }, - { 0x1FC0BE90u, SCPH1001_func_1FC0BA8C_cont_BFC0BE90 }, - { 0x1FC0BEA0u, SCPH1001_func_1FC0BA8C_cont_BFC0BEA0 }, - { 0x1FC0BEACu, SCPH1001_func_1FC0BA8C_cont_BFC0BEAC }, - { 0x1FC0BEB8u, SCPH1001_func_1FC0BA8C_cont_BFC0BEB8 }, - { 0x1FC0BEBCu, SCPH1001_func_1FC0BA8C_cont_BFC0BEBC }, - { 0x1FC0BEDCu, SCPH1001_func_1FC0BA8C_cont_BFC0BEDC }, - { 0x1FC0BEF4u, SCPH1001_func_1FC0BA8C_cont_BFC0BEF4 }, - { 0x1FC0BEFCu, SCPH1001_func_1FC0BA8C_cont_BFC0BEFC }, - { 0x1FC0BF38u, SCPH1001_func_1FC0BA8C_cont_BFC0BF38 }, - { 0x1FC0BF60u, SCPH1001_func_1FC0BA8C_cont_BFC0BF60 }, - { 0x1FC0BF74u, SCPH1001_func_1FC0BA8C_cont_BFC0BF74 }, - { 0x1FC0BF80u, SCPH1001_func_1FC0BA8C_cont_BFC0BF80 }, - { 0x1FC0BF9Cu, SCPH1001_func_1FC0BA8C_cont_BFC0BF9C }, - { 0x1FC0BFA4u, SCPH1001_func_1FC0BA8C_cont_BFC0BFA4 }, - { 0x1FC0BFB0u, SCPH1001_func_1FC0BA8C_cont_BFC0BFB0 }, - { 0x1FC0BFB8u, SCPH1001_func_1FC0BA8C_cont_BFC0BFB8 }, - { 0x1FC0BFD8u, SCPH1001_func_1FC0BA8C_cont_BFC0BFD8 }, - { 0x1FC0BFE0u, SCPH1001_func_1FC0BA8C_cont_BFC0BFE0 }, - { 0x1FC0BFE4u, SCPH1001_func_1FC0BA8C_cont_BFC0BFE4 }, - { 0x1FC0BFF0u, SCPH1001_func_1FC0BFF0 }, - { 0x1FC0C038u, SCPH1001_func_1FC0BFF0_cont_BFC0C038 }, - { 0x1FC0C048u, SCPH1001_func_1FC0C048 }, - { 0x1FC0C070u, SCPH1001_func_1FC0C048_cont_BFC0C070 }, - { 0x1FC0C074u, SCPH1001_func_1FC0C048_cont_BFC0C074 }, - { 0x1FC0C090u, SCPH1001_func_1FC0C048_cont_BFC0C090 }, - { 0x1FC0C0B0u, SCPH1001_func_1FC0C048_cont_BFC0C0B0 }, - { 0x1FC0C0B8u, SCPH1001_func_1FC0C048_cont_BFC0C0B8 }, - { 0x1FC0C0C8u, SCPH1001_func_1FC0C048_cont_BFC0C0C8 }, - { 0x1FC0C0CCu, SCPH1001_func_1FC0C048_cont_BFC0C0CC }, - { 0x1FC0C0DCu, SCPH1001_func_1FC0C0DC }, - { 0x1FC0C0F8u, SCPH1001_func_1FC0C0DC_cont_BFC0C0F8 }, - { 0x1FC0C0FCu, SCPH1001_func_1FC0C0DC_cont_BFC0C0FC }, - { 0x1FC0C114u, SCPH1001_func_1FC0C0DC_cont_BFC0C114 }, - { 0x1FC0C120u, SCPH1001_func_1FC0C0DC_cont_BFC0C120 }, - { 0x1FC0C12Cu, SCPH1001_func_1FC0C0DC_cont_BFC0C12C }, - { 0x1FC0C130u, SCPH1001_func_1FC0C0DC_cont_BFC0C130 }, - { 0x1FC0C140u, SCPH1001_func_1FC0C140 }, - { 0x1FC0C168u, SCPH1001_func_1FC0C140_cont_BFC0C168 }, - { 0x1FC0C16Cu, SCPH1001_func_1FC0C140_cont_BFC0C16C }, - { 0x1FC0C190u, SCPH1001_func_1FC0C140_cont_BFC0C190 }, - { 0x1FC0C1A0u, SCPH1001_func_1FC0C140_cont_BFC0C1A0 }, - { 0x1FC0C1ACu, SCPH1001_func_1FC0C140_cont_BFC0C1AC }, - { 0x1FC0C1B0u, SCPH1001_func_1FC0C140_cont_BFC0C1B0 }, - { 0x1FC0C1CCu, SCPH1001_func_1FC0C140_cont_BFC0C1CC }, - { 0x1FC0C1DCu, SCPH1001_func_1FC0C1DC }, - { 0x1FC0C1FCu, SCPH1001_func_1FC0C1FC }, - { 0x1FC0C210u, SCPH1001_func_1FC0C1FC_cont_BFC0C210 }, - { 0x1FC0C220u, SCPH1001_func_1FC0C220 }, - { 0x1FC0C238u, SCPH1001_func_1FC0C220_cont_BFC0C238 }, - { 0x1FC0C248u, SCPH1001_func_1FC0C248 }, - { 0x1FC0C260u, SCPH1001_func_1FC0C248_cont_BFC0C260 }, - { 0x1FC0C270u, SCPH1001_func_1FC0C270 }, - { 0x1FC0C288u, SCPH1001_func_1FC0C270_cont_BFC0C288 }, - { 0x1FC0C298u, SCPH1001_func_1FC0C298 }, - { 0x1FC0C2B0u, SCPH1001_func_1FC0C298_cont_BFC0C2B0 }, - { 0x1FC0C2C0u, SCPH1001_func_1FC0C2C0 }, - { 0x1FC0C2D8u, SCPH1001_func_1FC0C2C0_cont_BFC0C2D8 }, - { 0x1FC0C2E8u, SCPH1001_func_1FC0C2E8 }, - { 0x1FC0C2F8u, SCPH1001_func_1FC0C2E8_cont_BFC0C2F8 }, - { 0x1FC0C300u, SCPH1001_func_1FC0C2E8_cont_BFC0C300 }, - { 0x1FC0C308u, SCPH1001_func_1FC0C2E8_cont_BFC0C308 }, - { 0x1FC0C318u, SCPH1001_func_1FC0C318 }, - { 0x1FC0C32Cu, SCPH1001_func_1FC0C318_cont_BFC0C32C }, - { 0x1FC0C33Cu, SCPH1001_func_1FC0C318_cont_BFC0C33C }, - { 0x1FC0C344u, SCPH1001_func_1FC0C318_cont_BFC0C344 }, - { 0x1FC0C354u, SCPH1001_func_1FC0C354 }, - { 0x1FC0C36Cu, SCPH1001_func_1FC0C354_cont_BFC0C36C }, - { 0x1FC0C37Cu, SCPH1001_func_1FC0C354_cont_BFC0C37C }, - { 0x1FC0C38Cu, SCPH1001_func_1FC0C354_cont_BFC0C38C }, - { 0x1FC0C39Cu, SCPH1001_func_1FC0C354_cont_BFC0C39C }, - { 0x1FC0C580u, SCPH1001_func_1FC0C580 }, - { 0x1FC0C598u, SCPH1001_func_1FC0C580_cont_BFC0C598 }, - { 0x1FC0C5ACu, SCPH1001_func_1FC0C580_cont_BFC0C5AC }, - { 0x1FC0C5B4u, SCPH1001_func_1FC0C580_cont_BFC0C5B4 }, - { 0x1FC0C5F4u, SCPH1001_func_1FC0C580_cont_BFC0C5F4 }, - { 0x1FC0C608u, SCPH1001_func_1FC0C580_cont_BFC0C608 }, - { 0x1FC0C60Cu, SCPH1001_func_1FC0C580_cont_BFC0C60C }, - { 0x1FC0C638u, SCPH1001_func_1FC0C580_cont_BFC0C638 }, - { 0x1FC0C640u, SCPH1001_func_1FC0C580_cont_BFC0C640 }, - { 0x1FC0C648u, SCPH1001_func_1FC0C580_cont_BFC0C648 }, - { 0x1FC0C660u, SCPH1001_func_1FC0C580_cont_BFC0C660 }, - { 0x1FC0C664u, SCPH1001_func_1FC0C580_cont_BFC0C664 }, - { 0x1FC0C678u, SCPH1001_func_1FC0C580_cont_BFC0C678 }, - { 0x1FC0C69Cu, SCPH1001_func_1FC0C580_cont_BFC0C69C }, - { 0x1FC0C6A4u, SCPH1001_func_1FC0C580_cont_BFC0C6A4 }, - { 0x1FC0C6BCu, SCPH1001_func_1FC0C580_cont_BFC0C6BC }, - { 0x1FC0C6C0u, SCPH1001_func_1FC0C580_cont_BFC0C6C0 }, - { 0x1FC0C6D4u, SCPH1001_func_1FC0C580_cont_BFC0C6D4 }, - { 0x1FC0C6F8u, SCPH1001_func_1FC0C580_cont_BFC0C6F8 }, - { 0x1FC0C700u, SCPH1001_func_1FC0C580_cont_BFC0C700 }, - { 0x1FC0C708u, SCPH1001_func_1FC0C580_cont_BFC0C708 }, - { 0x1FC0C710u, SCPH1001_func_1FC0C580_cont_BFC0C710 }, - { 0x1FC0C720u, SCPH1001_func_1FC0C720 }, - { 0x1FC0C738u, SCPH1001_func_1FC0C720_cont_BFC0C738 }, - { 0x1FC0C750u, SCPH1001_func_1FC0C720_cont_BFC0C750 }, - { 0x1FC0C758u, SCPH1001_func_1FC0C720_cont_BFC0C758 }, - { 0x1FC0C790u, SCPH1001_func_1FC0C720_cont_BFC0C790 }, - { 0x1FC0C7A4u, SCPH1001_func_1FC0C720_cont_BFC0C7A4 }, - { 0x1FC0C7A8u, SCPH1001_func_1FC0C720_cont_BFC0C7A8 }, - { 0x1FC0C7D4u, SCPH1001_func_1FC0C720_cont_BFC0C7D4 }, - { 0x1FC0C7DCu, SCPH1001_func_1FC0C720_cont_BFC0C7DC }, - { 0x1FC0C7E4u, SCPH1001_func_1FC0C720_cont_BFC0C7E4 }, - { 0x1FC0C7F0u, SCPH1001_func_1FC0C720_cont_BFC0C7F0 }, - { 0x1FC0C7FCu, SCPH1001_func_1FC0C720_cont_BFC0C7FC }, - { 0x1FC0C804u, SCPH1001_func_1FC0C720_cont_BFC0C804 }, - { 0x1FC0C80Cu, SCPH1001_func_1FC0C720_cont_BFC0C80C }, - { 0x1FC0C814u, SCPH1001_func_1FC0C720_cont_BFC0C814 }, - { 0x1FC0C818u, SCPH1001_func_1FC0C720_cont_BFC0C818 }, - { 0x1FC0C830u, SCPH1001_func_1FC0C830 }, - { 0x1FC0C84Cu, SCPH1001_func_1FC0C830_cont_BFC0C84C }, - { 0x1FC0C854u, SCPH1001_func_1FC0C830_cont_BFC0C854 }, - { 0x1FC0C860u, SCPH1001_func_1FC0C830_cont_BFC0C860 }, - { 0x1FC0C868u, SCPH1001_func_1FC0C830_cont_BFC0C868 }, - { 0x1FC0C874u, SCPH1001_func_1FC0C830_cont_BFC0C874 }, - { 0x1FC0C890u, SCPH1001_func_1FC0C890 }, - { 0x1FC0C8B0u, SCPH1001_func_1FC0C890_cont_BFC0C8B0 }, - { 0x1FC0C8C0u, SCPH1001_func_1FC0C890_cont_BFC0C8C0 }, - { 0x1FC0C8D0u, SCPH1001_func_1FC0C890_cont_BFC0C8D0 }, - { 0x1FC0C8F0u, SCPH1001_func_1FC0C890_cont_BFC0C8F0 }, - { 0x1FC0C8FCu, SCPH1001_func_1FC0C890_cont_BFC0C8FC }, - { 0x1FC0C908u, SCPH1001_func_1FC0C890_cont_BFC0C908 }, - { 0x1FC0C914u, SCPH1001_func_1FC0C890_cont_BFC0C914 }, - { 0x1FC0C920u, SCPH1001_func_1FC0C890_cont_BFC0C920 }, - { 0x1FC0C944u, SCPH1001_func_1FC0C890_cont_BFC0C944 }, - { 0x1FC0C950u, SCPH1001_func_1FC0C890_cont_BFC0C950 }, - { 0x1FC0C95Cu, SCPH1001_func_1FC0C890_cont_BFC0C95C }, - { 0x1FC0C968u, SCPH1001_func_1FC0C890_cont_BFC0C968 }, - { 0x1FC0C974u, SCPH1001_func_1FC0C890_cont_BFC0C974 }, - { 0x1FC0C994u, SCPH1001_func_1FC0C890_cont_BFC0C994 }, - { 0x1FC0C9B4u, SCPH1001_func_1FC0C890_cont_BFC0C9B4 }, - { 0x1FC0C9CCu, SCPH1001_func_1FC0C9CC }, - { 0x1FC0C9ECu, SCPH1001_func_1FC0C9CC_cont_BFC0C9EC }, - { 0x1FC0C9FCu, SCPH1001_func_1FC0C9CC_cont_BFC0C9FC }, - { 0x1FC0CA0Cu, SCPH1001_func_1FC0C9CC_cont_BFC0CA0C }, - { 0x1FC0CA38u, SCPH1001_func_1FC0C9CC_cont_BFC0CA38 }, - { 0x1FC0CA44u, SCPH1001_func_1FC0C9CC_cont_BFC0CA44 }, - { 0x1FC0CA50u, SCPH1001_func_1FC0C9CC_cont_BFC0CA50 }, - { 0x1FC0CA5Cu, SCPH1001_func_1FC0C9CC_cont_BFC0CA5C }, - { 0x1FC0CA68u, SCPH1001_func_1FC0C9CC_cont_BFC0CA68 }, - { 0x1FC0CA74u, SCPH1001_func_1FC0C9CC_cont_BFC0CA74 }, - { 0x1FC0CA90u, SCPH1001_func_1FC0C9CC_cont_BFC0CA90 }, - { 0x1FC0CAA4u, SCPH1001_func_1FC0C9CC_cont_BFC0CAA4 }, - { 0x1FC0CAB4u, SCPH1001_func_1FC0CAB4 }, - { 0x1FC0CAD4u, SCPH1001_func_1FC0CAB4_cont_BFC0CAD4 }, - { 0x1FC0CB00u, SCPH1001_func_1FC0CAB4_cont_BFC0CB00 }, - { 0x1FC0CB0Cu, SCPH1001_func_1FC0CAB4_cont_BFC0CB0C }, - { 0x1FC0CB14u, SCPH1001_func_1FC0CAB4_cont_BFC0CB14 }, - { 0x1FC0CB1Cu, SCPH1001_func_1FC0CAB4_cont_BFC0CB1C }, - { 0x1FC0CB28u, SCPH1001_func_1FC0CAB4_cont_BFC0CB28 }, - { 0x1FC0CB30u, SCPH1001_func_1FC0CAB4_cont_BFC0CB30 }, - { 0x1FC0CB44u, SCPH1001_func_1FC0CAB4_cont_BFC0CB44 }, - { 0x1FC0CB58u, SCPH1001_func_1FC0CAB4_cont_BFC0CB58 }, - { 0x1FC0CB60u, SCPH1001_func_1FC0CAB4_cont_BFC0CB60 }, - { 0x1FC0CB74u, SCPH1001_func_1FC0CAB4_cont_BFC0CB74 }, - { 0x1FC0CB88u, SCPH1001_func_1FC0CAB4_cont_BFC0CB88 }, - { 0x1FC0CB9Cu, SCPH1001_func_1FC0CAB4_cont_BFC0CB9C }, - { 0x1FC0CBA4u, SCPH1001_func_1FC0CAB4_cont_BFC0CBA4 }, - { 0x1FC0CBD0u, SCPH1001_func_1FC0CAB4_cont_BFC0CBD0 }, - { 0x1FC0CBE0u, SCPH1001_func_1FC0CAB4_cont_BFC0CBE0 }, - { 0x1FC0CBECu, SCPH1001_func_1FC0CAB4_cont_BFC0CBEC }, - { 0x1FC0CC00u, SCPH1001_func_1FC0CAB4_cont_BFC0CC00 }, - { 0x1FC0CC10u, SCPH1001_func_1FC0CAB4_cont_BFC0CC10 }, - { 0x1FC0CC28u, SCPH1001_func_1FC0CAB4_cont_BFC0CC28 }, - { 0x1FC0CC40u, SCPH1001_func_1FC0CAB4_cont_BFC0CC40 }, - { 0x1FC0CC4Cu, SCPH1001_func_1FC0CAB4_cont_BFC0CC4C }, - { 0x1FC0CC58u, SCPH1001_func_1FC0CAB4_cont_BFC0CC58 }, - { 0x1FC0CC5Cu, SCPH1001_func_1FC0CAB4_cont_BFC0CC5C }, - { 0x1FC0CC68u, SCPH1001_func_1FC0CC68 }, - { 0x1FC0CCACu, SCPH1001_func_1FC0CC68_cont_BFC0CCAC }, - { 0x1FC0CCB8u, SCPH1001_func_1FC0CC68_cont_BFC0CCB8 }, - { 0x1FC0CCC0u, SCPH1001_func_1FC0CC68_cont_BFC0CCC0 }, - { 0x1FC0CCC8u, SCPH1001_func_1FC0CC68_cont_BFC0CCC8 }, - { 0x1FC0CCD0u, SCPH1001_func_1FC0CC68_cont_BFC0CCD0 }, - { 0x1FC0CCD8u, SCPH1001_func_1FC0CC68_cont_BFC0CCD8 }, - { 0x1FC0CCE0u, SCPH1001_func_1FC0CC68_cont_BFC0CCE0 }, - { 0x1FC0CCE8u, SCPH1001_func_1FC0CC68_cont_BFC0CCE8 }, - { 0x1FC0CCF4u, SCPH1001_func_1FC0CC68_cont_BFC0CCF4 }, - { 0x1FC0CCFCu, SCPH1001_func_1FC0CC68_cont_BFC0CCFC }, - { 0x1FC0CD04u, SCPH1001_func_1FC0CC68_cont_BFC0CD04 }, - { 0x1FC0CD0Cu, SCPH1001_func_1FC0CC68_cont_BFC0CD0C }, - { 0x1FC0CD20u, SCPH1001_func_1FC0CC68_cont_BFC0CD20 }, - { 0x1FC0CD34u, SCPH1001_func_1FC0CC68_cont_BFC0CD34 }, - { 0x1FC0CD44u, SCPH1001_func_1FC0CC68_cont_BFC0CD44 }, - { 0x1FC0CD4Cu, SCPH1001_func_1FC0CC68_cont_BFC0CD4C }, - { 0x1FC0CD54u, SCPH1001_func_1FC0CC68_cont_BFC0CD54 }, - { 0x1FC0CD58u, SCPH1001_func_1FC0CC68_cont_BFC0CD58 }, - { 0x1FC0CD64u, SCPH1001_func_1FC0CC68_cont_BFC0CD64 }, - { 0x1FC0CD68u, SCPH1001_func_1FC0CC68_cont_BFC0CD68 }, - { 0x1FC0CD6Cu, SCPH1001_func_1FC0CC68_cont_BFC0CD6C }, - { 0x1FC0CD80u, SCPH1001_func_1FC0CD80 }, - { 0x1FC0CDACu, SCPH1001_func_1FC0CD80_cont_BFC0CDAC }, - { 0x1FC0CDB8u, SCPH1001_func_1FC0CD80_cont_BFC0CDB8 }, - { 0x1FC0CDE4u, SCPH1001_func_1FC0CD80_cont_BFC0CDE4 }, - { 0x1FC0CDF0u, SCPH1001_func_1FC0CD80_cont_BFC0CDF0 }, - { 0x1FC0CDF8u, SCPH1001_func_1FC0CD80_cont_BFC0CDF8 }, - { 0x1FC0CE08u, SCPH1001_func_1FC0CD80_cont_BFC0CE08 }, - { 0x1FC0CE14u, SCPH1001_func_1FC0CD80_cont_BFC0CE14 }, - { 0x1FC0CE20u, SCPH1001_func_1FC0CD80_cont_BFC0CE20 }, - { 0x1FC0CE2Cu, SCPH1001_func_1FC0CD80_cont_BFC0CE2C }, - { 0x1FC0CE40u, SCPH1001_func_1FC0CD80_cont_BFC0CE40 }, - { 0x1FC0CE4Cu, SCPH1001_func_1FC0CD80_cont_BFC0CE4C }, - { 0x1FC0CE74u, SCPH1001_func_1FC0CD80_cont_BFC0CE74 }, - { 0x1FC0CE78u, SCPH1001_func_1FC0CD80_cont_BFC0CE78 }, - { 0x1FC0CE94u, SCPH1001_func_1FC0CD80_cont_BFC0CE94 }, - { 0x1FC0CEA8u, SCPH1001_func_1FC0CD80_cont_BFC0CEA8 }, - { 0x1FC0CEACu, SCPH1001_func_1FC0CD80_cont_BFC0CEAC }, - { 0x1FC0CED0u, SCPH1001_func_1FC0CD80_cont_BFC0CED0 }, - { 0x1FC0CED4u, SCPH1001_func_1FC0CD80_cont_BFC0CED4 }, - { 0x1FC0CEF0u, SCPH1001_func_1FC0CD80_cont_BFC0CEF0 }, - { 0x1FC0CF00u, SCPH1001_func_1FC0CD80_cont_BFC0CF00 }, - { 0x1FC0CF14u, SCPH1001_func_1FC0CD80_cont_BFC0CF14 }, - { 0x1FC0CF18u, SCPH1001_func_1FC0CD80_cont_BFC0CF18 }, - { 0x1FC0CF20u, SCPH1001_func_1FC0CD80_cont_BFC0CF20 }, - { 0x1FC0CF2Cu, SCPH1001_func_1FC0CD80_cont_BFC0CF2C }, - { 0x1FC0CF6Cu, SCPH1001_func_1FC0CD80_cont_BFC0CF6C }, - { 0x1FC0CF78u, SCPH1001_func_1FC0CD80_cont_BFC0CF78 }, - { 0x1FC0CF84u, SCPH1001_func_1FC0CF84 }, - { 0x1FC0CF8Cu, SCPH1001_func_1FC0CF84_cont_BFC0CF8C }, - { 0x1FC0CF94u, SCPH1001_func_1FC0CF84_cont_BFC0CF94 }, - { 0x1FC0CF9Cu, SCPH1001_func_1FC0CF84_cont_BFC0CF9C }, - { 0x1FC0CFA4u, SCPH1001_func_1FC0CF84_cont_BFC0CFA4 }, - { 0x1FC0CFACu, SCPH1001_func_1FC0CF84_cont_BFC0CFAC }, - { 0x1FC0CFB4u, SCPH1001_func_1FC0CF84_cont_BFC0CFB4 }, - { 0x1FC0CFBCu, SCPH1001_func_1FC0CF84_cont_BFC0CFBC }, - { 0x1FC0CFC4u, SCPH1001_func_1FC0CF84_cont_BFC0CFC4 }, - { 0x1FC0CFCCu, SCPH1001_func_1FC0CF84_cont_BFC0CFCC }, - { 0x1FC0CFD4u, SCPH1001_func_1FC0CF84_cont_BFC0CFD4 }, - { 0x1FC0CFDCu, SCPH1001_func_1FC0CF84_cont_BFC0CFDC }, - { 0x1FC0CFE4u, SCPH1001_func_1FC0CF84_cont_BFC0CFE4 }, - { 0x1FC0CFECu, SCPH1001_func_1FC0CF84_cont_BFC0CFEC }, - { 0x1FC0CFF0u, SCPH1001_func_1FC0CF84_cont_BFC0CFF0 }, - { 0x1FC0CFF8u, SCPH1001_func_1FC0CF84_cont_BFC0CFF8 }, - { 0x1FC0D000u, SCPH1001_func_1FC0CF84_cont_BFC0D000 }, - { 0x1FC0D008u, SCPH1001_func_1FC0CF84_cont_BFC0D008 }, - { 0x1FC0D010u, SCPH1001_func_1FC0CF84_cont_BFC0D010 }, - { 0x1FC0D018u, SCPH1001_func_1FC0CF84_cont_BFC0D018 }, - { 0x1FC0D020u, SCPH1001_func_1FC0CF84_cont_BFC0D020 }, - { 0x1FC0D028u, SCPH1001_func_1FC0CF84_cont_BFC0D028 }, - { 0x1FC0D030u, SCPH1001_func_1FC0CF84_cont_BFC0D030 }, - { 0x1FC0D03Cu, SCPH1001_func_1FC0CF84_cont_BFC0D03C }, - { 0x1FC0D044u, SCPH1001_func_1FC0CF84_cont_BFC0D044 }, - { 0x1FC0D050u, SCPH1001_func_1FC0CF84_cont_BFC0D050 }, - { 0x1FC0D058u, SCPH1001_func_1FC0CF84_cont_BFC0D058 }, - { 0x1FC0D060u, SCPH1001_func_1FC0CF84_cont_BFC0D060 }, - { 0x1FC0D068u, SCPH1001_func_1FC0CF84_cont_BFC0D068 }, - { 0x1FC0D074u, SCPH1001_func_1FC0CF84_cont_BFC0D074 }, - { 0x1FC0D07Cu, SCPH1001_func_1FC0CF84_cont_BFC0D07C }, - { 0x1FC0D088u, SCPH1001_func_1FC0CF84_cont_BFC0D088 }, - { 0x1FC0D090u, SCPH1001_func_1FC0CF84_cont_BFC0D090 }, - { 0x1FC0D098u, SCPH1001_func_1FC0CF84_cont_BFC0D098 }, - { 0x1FC0D0A0u, SCPH1001_func_1FC0CF84_cont_BFC0D0A0 }, - { 0x1FC0D0A8u, SCPH1001_func_1FC0CF84_cont_BFC0D0A8 }, - { 0x1FC0D0B0u, SCPH1001_func_1FC0CF84_cont_BFC0D0B0 }, - { 0x1FC0D0BCu, SCPH1001_func_1FC0CF84_cont_BFC0D0BC }, - { 0x1FC0D0C4u, SCPH1001_func_1FC0CF84_cont_BFC0D0C4 }, - { 0x1FC0D0CCu, SCPH1001_func_1FC0D0CC }, - { 0x1FC0D0E0u, SCPH1001_func_1FC0D0CC_cont_BFC0D0E0 }, - { 0x1FC0D0F0u, SCPH1001_func_1FC0D0CC_cont_BFC0D0F0 }, - { 0x1FC0D0FCu, SCPH1001_func_1FC0D0CC_cont_BFC0D0FC }, - { 0x1FC0D108u, SCPH1001_func_1FC0D0CC_cont_BFC0D108 }, - { 0x1FC0D11Cu, SCPH1001_func_1FC0D11C }, - { 0x1FC0D150u, SCPH1001_func_1FC0D11C_cont_BFC0D150 }, - { 0x1FC0D158u, SCPH1001_func_1FC0D11C_cont_BFC0D158 }, - { 0x1FC0D15Cu, SCPH1001_func_1FC0D11C_cont_BFC0D15C }, - { 0x1FC0D164u, SCPH1001_func_1FC0D11C_cont_BFC0D164 }, - { 0x1FC0D178u, SCPH1001_func_1FC0D11C_cont_BFC0D178 }, - { 0x1FC0D17Cu, SCPH1001_func_1FC0D11C_cont_BFC0D17C }, - { 0x1FC0D1A0u, SCPH1001_func_1FC0D11C_cont_BFC0D1A0 }, - { 0x1FC0D1A4u, SCPH1001_func_1FC0D11C_cont_BFC0D1A4 }, - { 0x1FC0D1C0u, SCPH1001_func_1FC0D11C_cont_BFC0D1C0 }, - { 0x1FC0D1ECu, SCPH1001_func_1FC0D11C_cont_BFC0D1EC }, - { 0x1FC0D1F0u, SCPH1001_func_1FC0D11C_cont_BFC0D1F0 }, - { 0x1FC0D20Cu, SCPH1001_func_1FC0D11C_cont_BFC0D20C }, - { 0x1FC0D218u, SCPH1001_func_1FC0D11C_cont_BFC0D218 }, - { 0x1FC0D22Cu, SCPH1001_func_1FC0D11C_cont_BFC0D22C }, - { 0x1FC0D230u, SCPH1001_func_1FC0D11C_cont_BFC0D230 }, - { 0x1FC0D238u, SCPH1001_func_1FC0D11C_cont_BFC0D238 }, - { 0x1FC0D240u, SCPH1001_func_1FC0D11C_cont_BFC0D240 }, - { 0x1FC0D244u, SCPH1001_func_1FC0D11C_cont_BFC0D244 }, - { 0x1FC0D24Cu, SCPH1001_func_1FC0D11C_cont_BFC0D24C }, - { 0x1FC0D25Cu, SCPH1001_func_1FC0D11C_cont_BFC0D25C }, - { 0x1FC0D26Cu, SCPH1001_func_1FC0D11C_cont_BFC0D26C }, - { 0x1FC0D28Cu, SCPH1001_func_1FC0D11C_cont_BFC0D28C }, - { 0x1FC0D298u, SCPH1001_func_1FC0D11C_cont_BFC0D298 }, - { 0x1FC0D2ACu, SCPH1001_func_1FC0D11C_cont_BFC0D2AC }, - { 0x1FC0D2C0u, SCPH1001_func_1FC0D11C_cont_BFC0D2C0 }, - { 0x1FC0D2CCu, SCPH1001_func_1FC0D11C_cont_BFC0D2CC }, - { 0x1FC0D2D4u, SCPH1001_func_1FC0D11C_cont_BFC0D2D4 }, - { 0x1FC0D2E4u, SCPH1001_func_1FC0D11C_cont_BFC0D2E4 }, - { 0x1FC0D2ECu, SCPH1001_func_1FC0D11C_cont_BFC0D2EC }, - { 0x1FC0D318u, SCPH1001_func_1FC0D11C_cont_BFC0D318 }, - { 0x1FC0D31Cu, SCPH1001_func_1FC0D11C_cont_BFC0D31C }, - { 0x1FC0D338u, SCPH1001_func_1FC0D11C_cont_BFC0D338 }, - { 0x1FC0D33Cu, SCPH1001_func_1FC0D11C_cont_BFC0D33C }, - { 0x1FC0D34Cu, SCPH1001_func_1FC0D34C }, - { 0x1FC0D39Cu, SCPH1001_func_1FC0D34C_cont_BFC0D39C }, - { 0x1FC0D3A4u, SCPH1001_func_1FC0D34C_cont_BFC0D3A4 }, - { 0x1FC0D3B8u, SCPH1001_func_1FC0D34C_cont_BFC0D3B8 }, - { 0x1FC0D3BCu, SCPH1001_func_1FC0D34C_cont_BFC0D3BC }, - { 0x1FC0D3D8u, SCPH1001_func_1FC0D34C_cont_BFC0D3D8 }, - { 0x1FC0D3ECu, SCPH1001_func_1FC0D34C_cont_BFC0D3EC }, - { 0x1FC0D3F4u, SCPH1001_func_1FC0D34C_cont_BFC0D3F4 }, - { 0x1FC0D400u, SCPH1001_func_1FC0D34C_cont_BFC0D400 }, - { 0x1FC0D414u, SCPH1001_func_1FC0D34C_cont_BFC0D414 }, - { 0x1FC0D41Cu, SCPH1001_func_1FC0D34C_cont_BFC0D41C }, - { 0x1FC0D444u, SCPH1001_func_1FC0D34C_cont_BFC0D444 }, - { 0x1FC0D448u, SCPH1001_func_1FC0D34C_cont_BFC0D448 }, - { 0x1FC0D464u, SCPH1001_func_1FC0D34C_cont_BFC0D464 }, - { 0x1FC0D468u, SCPH1001_func_1FC0D34C_cont_BFC0D468 }, - { 0x1FC0D470u, SCPH1001_func_1FC0D34C_cont_BFC0D470 }, - { 0x1FC0D498u, SCPH1001_func_1FC0D34C_cont_BFC0D498 }, - { 0x1FC0D49Cu, SCPH1001_func_1FC0D34C_cont_BFC0D49C }, - { 0x1FC0D4B8u, SCPH1001_func_1FC0D34C_cont_BFC0D4B8 }, - { 0x1FC0D4BCu, SCPH1001_func_1FC0D34C_cont_BFC0D4BC }, - { 0x1FC0D4CCu, SCPH1001_func_1FC0D4CC }, - { 0x1FC0D4E0u, SCPH1001_func_1FC0D4CC_cont_BFC0D4E0 }, - { 0x1FC0D4F0u, SCPH1001_func_1FC0D4F0 }, - { 0x1FC0D500u, SCPH1001_func_1FC0D4F0_cont_BFC0D500 }, - { 0x1FC0D51Cu, SCPH1001_func_1FC0D4F0_cont_BFC0D51C }, - { 0x1FC0D534u, SCPH1001_func_1FC0D4F0_cont_BFC0D534 }, - { 0x1FC0D540u, SCPH1001_func_1FC0D4F0_cont_BFC0D540 }, - { 0x1FC0D54Cu, SCPH1001_func_1FC0D4F0_cont_BFC0D54C }, - { 0x1FC0D564u, SCPH1001_func_1FC0D4F0_cont_BFC0D564 }, - { 0x1FC0D570u, SCPH1001_func_1FC0D570 }, - { 0x1FC0D588u, SCPH1001_func_1FC0D570_cont_BFC0D588 }, - { 0x1FC0D59Cu, SCPH1001_func_1FC0D570_cont_BFC0D59C }, - { 0x1FC0D5A4u, SCPH1001_func_1FC0D570_cont_BFC0D5A4 }, - { 0x1FC0D5ACu, SCPH1001_func_1FC0D570_cont_BFC0D5AC }, - { 0x1FC0D5B8u, SCPH1001_func_1FC0D570_cont_BFC0D5B8 }, - { 0x1FC0D5C0u, SCPH1001_func_1FC0D570_cont_BFC0D5C0 }, - { 0x1FC0D5C8u, SCPH1001_func_1FC0D570_cont_BFC0D5C8 }, - { 0x1FC0D5D4u, SCPH1001_func_1FC0D570_cont_BFC0D5D4 }, - { 0x1FC0D5DCu, SCPH1001_func_1FC0D570_cont_BFC0D5DC }, - { 0x1FC0D5F0u, SCPH1001_func_1FC0D570_cont_BFC0D5F0 }, - { 0x1FC0D600u, SCPH1001_func_1FC0D600 }, - { 0x1FC0D628u, SCPH1001_func_1FC0D600_cont_BFC0D628 }, - { 0x1FC0D638u, SCPH1001_func_1FC0D600_cont_BFC0D638 }, - { 0x1FC0D640u, SCPH1001_func_1FC0D640 }, - { 0x1FC0D664u, SCPH1001_func_1FC0D664 }, - { 0x1FC0D688u, SCPH1001_func_1FC0D688 }, - { 0x1FC0D6B4u, SCPH1001_func_1FC0D688_cont_BFC0D6B4 }, - { 0x1FC0D6E0u, SCPH1001_func_1FC0D688_cont_BFC0D6E0 }, - { 0x1FC0D6E8u, SCPH1001_func_1FC0D688_cont_BFC0D6E8 }, - { 0x1FC0D6F4u, SCPH1001_func_1FC0D688_cont_BFC0D6F4 }, - { 0x1FC0D6FCu, SCPH1001_func_1FC0D688_cont_BFC0D6FC }, - { 0x1FC0D704u, SCPH1001_func_1FC0D688_cont_BFC0D704 }, - { 0x1FC0D70Cu, SCPH1001_func_1FC0D688_cont_BFC0D70C }, - { 0x1FC0D710u, SCPH1001_func_1FC0D688_cont_BFC0D710 }, - { 0x1FC0D72Cu, SCPH1001_func_1FC0D72C }, - { 0x1FC0D73Cu, SCPH1001_func_1FC0D72C_cont_BFC0D73C }, - { 0x1FC0D744u, SCPH1001_func_1FC0D72C_cont_BFC0D744 }, - { 0x1FC0D764u, SCPH1001_func_1FC0D72C_cont_BFC0D764 }, - { 0x1FC0D76Cu, SCPH1001_func_1FC0D72C_cont_BFC0D76C }, - { 0x1FC0D774u, SCPH1001_func_1FC0D72C_cont_BFC0D774 }, - { 0x1FC0D77Cu, SCPH1001_func_1FC0D72C_cont_BFC0D77C }, - { 0x1FC0D780u, SCPH1001_func_1FC0D72C_cont_BFC0D780 }, - { 0x1FC0D788u, SCPH1001_func_1FC0D72C_cont_BFC0D788 }, - { 0x1FC0D790u, SCPH1001_func_1FC0D72C_cont_BFC0D790 }, - { 0x1FC0D798u, SCPH1001_func_1FC0D72C_cont_BFC0D798 }, - { 0x1FC0D7A0u, SCPH1001_func_1FC0D72C_cont_BFC0D7A0 }, - { 0x1FC0D7A8u, SCPH1001_func_1FC0D72C_cont_BFC0D7A8 }, - { 0x1FC0D7ACu, SCPH1001_func_1FC0D72C_cont_BFC0D7AC }, - { 0x1FC0D7BCu, SCPH1001_func_1FC0D7BC }, - { 0x1FC0D7CCu, SCPH1001_func_1FC0D7BC_cont_BFC0D7CC }, - { 0x1FC0D7D4u, SCPH1001_func_1FC0D7BC_cont_BFC0D7D4 }, - { 0x1FC0D7F4u, SCPH1001_func_1FC0D7BC_cont_BFC0D7F4 }, - { 0x1FC0D7FCu, SCPH1001_func_1FC0D7BC_cont_BFC0D7FC }, - { 0x1FC0D804u, SCPH1001_func_1FC0D7BC_cont_BFC0D804 }, - { 0x1FC0D80Cu, SCPH1001_func_1FC0D7BC_cont_BFC0D80C }, - { 0x1FC0D810u, SCPH1001_func_1FC0D7BC_cont_BFC0D810 }, - { 0x1FC0D818u, SCPH1001_func_1FC0D7BC_cont_BFC0D818 }, - { 0x1FC0D820u, SCPH1001_func_1FC0D7BC_cont_BFC0D820 }, - { 0x1FC0D828u, SCPH1001_func_1FC0D7BC_cont_BFC0D828 }, - { 0x1FC0D830u, SCPH1001_func_1FC0D7BC_cont_BFC0D830 }, - { 0x1FC0D838u, SCPH1001_func_1FC0D7BC_cont_BFC0D838 }, - { 0x1FC0D83Cu, SCPH1001_func_1FC0D7BC_cont_BFC0D83C }, - { 0x1FC0D850u, SCPH1001_func_1FC0D850 }, - { 0x1FC0D864u, SCPH1001_func_1FC0D850_cont_BFC0D864 }, - { 0x1FC0D874u, SCPH1001_func_1FC0D850_cont_BFC0D874 }, - { 0x1FC0D880u, SCPH1001_func_1FC0D880 }, - { 0x1FC0D890u, SCPH1001_func_1FC0D890 }, - { 0x1FC0D8A0u, SCPH1001_func_1FC0D8A0 }, - { 0x1FC0D8B0u, SCPH1001_func_1FC0D8B0 }, - { 0x1FC0D8C0u, SCPH1001_func_1FC0D8C0 }, - { 0x1FC0D8D0u, SCPH1001_func_1FC0D8D0 }, - { 0x1FC0D8E0u, SCPH1001_func_1FC0D8E0 }, - { 0x1FC0D8F0u, SCPH1001_func_1FC0D8F0 }, - { 0x1FC0D900u, SCPH1001_func_1FC0D900 }, - { 0x1FC0D910u, SCPH1001_func_1FC0D910 }, - { 0x1FC0D920u, SCPH1001_func_1FC0D920 }, - { 0x1FC0D930u, SCPH1001_func_1FC0D930 }, - { 0x1FC0D940u, SCPH1001_func_1FC0D940 }, - { 0x1FC0D950u, SCPH1001_func_1FC0D950 }, - { 0x1FC0D960u, SCPH1001_func_1FC0D960 }, - { 0x1FC0D970u, SCPH1001_func_1FC0D970 }, - { 0x1FC0D980u, SCPH1001_func_1FC0D980 }, - { 0x1FC0D990u, SCPH1001_func_1FC0D990 }, - { 0x1FC0D9A0u, SCPH1001_func_1FC0D9A0 }, - { 0x1FC0D9B0u, SCPH1001_func_1FC0D9B0 }, - { 0x1FC0D9C0u, SCPH1001_func_1FC0D9C0 }, - { 0x1FC0D9D0u, SCPH1001_func_1FC0D9D0 }, - { 0x1FC0D9E0u, SCPH1001_func_1FC0D9E0 }, - { 0x1FC0D9F0u, SCPH1001_func_1FC0D9F0 }, - { 0x1FC0DA00u, SCPH1001_func_1FC0DA00 }, - { 0x1FC0DA10u, SCPH1001_func_1FC0DA10 }, - { 0x1FC0DA20u, SCPH1001_func_1FC0DA20 }, - { 0x1FC0DA30u, SCPH1001_func_1FC0DA30 }, - { 0x1FC0DA40u, SCPH1001_func_1FC0DA40 }, - { 0x1FC0DA50u, SCPH1001_func_1FC0DA50 }, - { 0x1FC0DA60u, SCPH1001_func_1FC0DA60 }, - { 0x1FC0DA70u, SCPH1001_func_1FC0DA70 }, - { 0x1FC0DA80u, SCPH1001_func_1FC0DA80 }, - { 0x1FC0DA90u, SCPH1001_func_1FC0DA90 }, - { 0x1FC0DAA0u, SCPH1001_func_1FC0DAA0 }, - { 0x1FC0DAB0u, SCPH1001_func_1FC0DAB0 }, - { 0x1FC0DAC0u, SCPH1001_func_1FC0DAC0 }, - { 0x1FC0DAD0u, SCPH1001_func_1FC0DAD0 }, - { 0x1FC0DAE0u, SCPH1001_func_1FC0DAE0 }, - { 0x1FC0DAF0u, SCPH1001_func_1FC0DAF0 }, - { 0x1FC0DB00u, SCPH1001_func_1FC0DB00 }, - { 0x1FC0DB10u, SCPH1001_func_1FC0DB10 }, - { 0x1FC0DB20u, SCPH1001_func_1FC0DB20 }, - { 0x1FC0DB30u, SCPH1001_func_1FC0DB30 }, - { 0x1FC0DB40u, SCPH1001_func_1FC0DB40 }, - { 0x1FC0DB50u, SCPH1001_func_1FC0DB50 }, - { 0x1FC0DB60u, SCPH1001_func_1FC0DB60 }, - { 0x1FC0DB70u, SCPH1001_func_1FC0DB70 }, - { 0x1FC0DB80u, SCPH1001_func_1FC0DB80 }, - { 0x1FC0DB90u, SCPH1001_func_1FC0DB90 }, - { 0x1FC0DBA0u, SCPH1001_func_1FC0DBA0 }, - { 0x1FC0DBB0u, SCPH1001_func_1FC0DBB0 }, - { 0x1FC0DBC0u, SCPH1001_func_1FC0DBC0 }, - { 0x1FC0DBD0u, SCPH1001_func_1FC0DBD0 }, - { 0x1FC0DBE0u, SCPH1001_func_1FC0DBE0 }, - { 0x1FC0DBF0u, SCPH1001_func_1FC0DBF0 }, - { 0x1FC0DC00u, SCPH1001_func_1FC0DC00 }, - { 0x1FC0DC10u, SCPH1001_func_1FC0DC10 }, - { 0x1FC0DC20u, SCPH1001_func_1FC0DC20 }, - { 0x1FC0DC30u, SCPH1001_func_1FC0DC30 }, - { 0x1FC0DC40u, SCPH1001_func_1FC0DC40 }, - { 0x1FC0DC50u, SCPH1001_func_1FC0DC50 }, - { 0x1FC18000u, SCPH1001_func_1FC18000 }, - { 0x1FC18010u, SCPH1001_func_1FC18000_cont_BFC18010 }, - { 0x1FC1802Cu, SCPH1001_func_1FC18000_cont_BFC1802C }, - { 0x1FC18034u, SCPH1001_func_1FC18000_cont_BFC18034 }, - { 0x1FC18060u, SCPH1001_func_1FC18000_cont_BFC18060 }, - { 0x1FC18068u, SCPH1001_func_1FC18000_cont_BFC18068 }, - { 0x1FC18070u, SCPH1001_func_1FC18000_cont_BFC18070 }, - { 0x1FC18078u, SCPH1001_func_1FC18000_cont_BFC18078 }, - { 0x1FC18088u, SCPH1001_func_1FC18000_cont_BFC18088 }, - { 0x1FC18090u, SCPH1001_func_1FC18000_cont_BFC18090 }, - { 0x1FC18098u, SCPH1001_func_1FC18000_cont_BFC18098 }, - { 0x1FC180A0u, SCPH1001_func_1FC18000_cont_BFC180A0 }, - { 0x1FC180A8u, SCPH1001_func_1FC18000_cont_BFC180A8 }, - { 0x1FC180B0u, SCPH1001_func_1FC18000_cont_BFC180B0 }, - { 0x1FC180B8u, SCPH1001_func_1FC18000_cont_BFC180B8 }, - { 0x1FC180C0u, SCPH1001_func_1FC18000_cont_BFC180C0 }, - { 0x1FC180FCu, SCPH1001_func_1FC18000_cont_BFC180FC }, - { 0x1FC18104u, SCPH1001_func_1FC18000_cont_BFC18104 }, - { 0x1FC1810Cu, SCPH1001_func_1FC18000_cont_BFC1810C }, - { 0x1FC18118u, SCPH1001_func_1FC18000_cont_BFC18118 }, - { 0x1FC18120u, SCPH1001_func_1FC18000_cont_BFC18120 }, - { 0x1FC18128u, SCPH1001_func_1FC18000_cont_BFC18128 }, - { 0x1FC18130u, SCPH1001_func_1FC18000_cont_BFC18130 }, - { 0x1FC18144u, SCPH1001_func_1FC18000_cont_BFC18144 }, - { 0x1FC18158u, SCPH1001_func_1FC18000_cont_BFC18158 }, - { 0x1FC18160u, SCPH1001_func_1FC18000_cont_BFC18160 }, - { 0x1FC18168u, SCPH1001_func_1FC18000_cont_BFC18168 }, - { 0x1FC18170u, SCPH1001_func_1FC18000_cont_BFC18170 }, - { 0x1FC18184u, SCPH1001_func_1FC18000_cont_BFC18184 }, - { 0x1FC1818Cu, SCPH1001_func_1FC18000_cont_BFC1818C }, - { 0x1FC18194u, SCPH1001_func_1FC18000_cont_BFC18194 }, - { 0x1FC1819Cu, SCPH1001_func_1FC18000_cont_BFC1819C }, - { 0x1FC181C4u, SCPH1001_func_1FC18000_cont_BFC181C4 }, - { 0x1FC181CCu, SCPH1001_func_1FC18000_cont_BFC181CC }, - { 0x1FC181D4u, SCPH1001_func_1FC18000_cont_BFC181D4 }, - { 0x1FC181DCu, SCPH1001_func_1FC18000_cont_BFC181DC }, - { 0x1FC181E4u, SCPH1001_func_1FC18000_cont_BFC181E4 }, - { 0x1FC181E8u, SCPH1001_func_1FC18000_cont_BFC181E8 }, - { 0x1FC18208u, SCPH1001_func_1FC18000_cont_BFC18208 }, - { 0x1FC1821Cu, SCPH1001_func_1FC18000_cont_BFC1821C }, - { 0x1FC18228u, SCPH1001_func_1FC18000_cont_BFC18228 }, - { 0x1FC18230u, SCPH1001_func_1FC18000_cont_BFC18230 }, - { 0x1FC18244u, SCPH1001_func_1FC18000_cont_BFC18244 }, - { 0x1FC18248u, SCPH1001_func_1FC18000_cont_BFC18248 }, - { 0x1FC18254u, SCPH1001_func_1FC18254 }, - { 0x1FC1826Cu, SCPH1001_func_1FC18254_cont_BFC1826C }, - { 0x1FC1827Cu, SCPH1001_func_1FC18254_cont_BFC1827C }, - { 0x1FC18284u, SCPH1001_func_1FC18254_cont_BFC18284 }, - { 0x1FC1828Cu, SCPH1001_func_1FC18254_cont_BFC1828C }, - { 0x1FC18298u, SCPH1001_func_1FC18254_cont_BFC18298 }, - { 0x1FC182A8u, SCPH1001_func_1FC18254_cont_BFC182A8 }, - { 0x1FC182B0u, SCPH1001_func_1FC18254_cont_BFC182B0 }, - { 0x1FC182C0u, SCPH1001_func_1FC18254_cont_BFC182C0 }, - { 0x1FC182D4u, SCPH1001_func_1FC18254_cont_BFC182D4 }, - { 0x1FC182E8u, SCPH1001_func_1FC18254_cont_BFC182E8 }, - { 0x1FC182FCu, SCPH1001_func_1FC18254_cont_BFC182FC }, - { 0x1FC18300u, SCPH1001_func_1FC18254_cont_BFC18300 }, - { 0x1FC1831Cu, SCPH1001_func_1FC18254_cont_BFC1831C }, - { 0x1FC18330u, SCPH1001_func_1FC18254_cont_BFC18330 }, - { 0x1FC18344u, SCPH1001_func_1FC18254_cont_BFC18344 }, - { 0x1FC18360u, SCPH1001_func_1FC18254_cont_BFC18360 }, - { 0x1FC18374u, SCPH1001_func_1FC18254_cont_BFC18374 }, - { 0x1FC1837Cu, SCPH1001_func_1FC18254_cont_BFC1837C }, - { 0x1FC18384u, SCPH1001_func_1FC18254_cont_BFC18384 }, - { 0x1FC183A0u, SCPH1001_func_1FC18254_cont_BFC183A0 }, - { 0x1FC183BCu, SCPH1001_func_1FC18254_cont_BFC183BC }, - { 0x1FC183D4u, SCPH1001_func_1FC18254_cont_BFC183D4 }, - { 0x1FC183DCu, SCPH1001_func_1FC18254_cont_BFC183DC }, - { 0x1FC183E4u, SCPH1001_func_1FC18254_cont_BFC183E4 }, - { 0x1FC183ECu, SCPH1001_func_1FC18254_cont_BFC183EC }, - { 0x1FC183F4u, SCPH1001_func_1FC18254_cont_BFC183F4 }, - { 0x1FC183FCu, SCPH1001_func_1FC18254_cont_BFC183FC }, - { 0x1FC18404u, SCPH1001_func_1FC18254_cont_BFC18404 }, - { 0x1FC18418u, SCPH1001_func_1FC18254_cont_BFC18418 }, - { 0x1FC18440u, SCPH1001_func_1FC18254_cont_BFC18440 }, - { 0x1FC18454u, SCPH1001_func_1FC18254_cont_BFC18454 }, - { 0x1FC1845Cu, SCPH1001_func_1FC18254_cont_BFC1845C }, - { 0x1FC18464u, SCPH1001_func_1FC18254_cont_BFC18464 }, - { 0x1FC18474u, SCPH1001_func_1FC18254_cont_BFC18474 }, - { 0x1FC18484u, SCPH1001_func_1FC18254_cont_BFC18484 }, - { 0x1FC18494u, SCPH1001_func_1FC18254_cont_BFC18494 }, - { 0x1FC184A4u, SCPH1001_func_1FC18254_cont_BFC184A4 }, - { 0x1FC184B4u, SCPH1001_func_1FC18254_cont_BFC184B4 }, - { 0x1FC184C8u, SCPH1001_func_1FC18254_cont_BFC184C8 }, - { 0x1FC184D0u, SCPH1001_func_1FC18254_cont_BFC184D0 }, - { 0x1FC184E4u, SCPH1001_func_1FC18254_cont_BFC184E4 }, - { 0x1FC184ECu, SCPH1001_func_1FC18254_cont_BFC184EC }, - { 0x1FC184F4u, SCPH1001_func_1FC18254_cont_BFC184F4 }, - { 0x1FC184FCu, SCPH1001_func_1FC18254_cont_BFC184FC }, - { 0x1FC1850Cu, SCPH1001_func_1FC18254_cont_BFC1850C }, - { 0x1FC1851Cu, SCPH1001_func_1FC18254_cont_BFC1851C }, - { 0x1FC1852Cu, SCPH1001_func_1FC18254_cont_BFC1852C }, - { 0x1FC18534u, SCPH1001_func_1FC18254_cont_BFC18534 }, - { 0x1FC18548u, SCPH1001_func_1FC18254_cont_BFC18548 }, - { 0x1FC18560u, SCPH1001_func_1FC18254_cont_BFC18560 }, - { 0x1FC18568u, SCPH1001_func_1FC18254_cont_BFC18568 }, - { 0x1FC18578u, SCPH1001_func_1FC18254_cont_BFC18578 }, - { 0x1FC1858Cu, SCPH1001_func_1FC18254_cont_BFC1858C }, - { 0x1FC1859Cu, SCPH1001_func_1FC18254_cont_BFC1859C }, - { 0x1FC185C8u, SCPH1001_func_1FC18254_cont_BFC185C8 }, - { 0x1FC185F4u, SCPH1001_func_1FC18254_cont_BFC185F4 }, - { 0x1FC18600u, SCPH1001_func_1FC18254_cont_BFC18600 }, - { 0x1FC18618u, SCPH1001_func_1FC18254_cont_BFC18618 }, - { 0x1FC18628u, SCPH1001_func_1FC18254_cont_BFC18628 }, - { 0x1FC18638u, SCPH1001_func_1FC18254_cont_BFC18638 }, - { 0x1FC18640u, SCPH1001_func_1FC18254_cont_BFC18640 }, - { 0x1FC18648u, SCPH1001_func_1FC18254_cont_BFC18648 }, - { 0x1FC1865Cu, SCPH1001_func_1FC18254_cont_BFC1865C }, - { 0x1FC18670u, SCPH1001_func_1FC18254_cont_BFC18670 }, - { 0x1FC18684u, SCPH1001_func_1FC18684 }, - { 0x1FC186A0u, SCPH1001_func_1FC18684_cont_BFC186A0 }, - { 0x1FC186A8u, SCPH1001_func_1FC18684_cont_BFC186A8 }, - { 0x1FC186B0u, SCPH1001_func_1FC18684_cont_BFC186B0 }, - { 0x1FC186C4u, SCPH1001_func_1FC18684_cont_BFC186C4 }, - { 0x1FC186D8u, SCPH1001_func_1FC18684_cont_BFC186D8 }, - { 0x1FC186E0u, SCPH1001_func_1FC18684_cont_BFC186E0 }, - { 0x1FC186E8u, SCPH1001_func_1FC18684_cont_BFC186E8 }, - { 0x1FC186F0u, SCPH1001_func_1FC18684_cont_BFC186F0 }, - { 0x1FC186F8u, SCPH1001_func_1FC18684_cont_BFC186F8 }, - { 0x1FC18700u, SCPH1001_func_1FC18684_cont_BFC18700 }, - { 0x1FC18708u, SCPH1001_func_1FC18684_cont_BFC18708 }, - { 0x1FC18710u, SCPH1001_func_1FC18684_cont_BFC18710 }, - { 0x1FC18718u, SCPH1001_func_1FC18684_cont_BFC18718 }, - { 0x1FC18720u, SCPH1001_func_1FC18684_cont_BFC18720 }, - { 0x1FC18728u, SCPH1001_func_1FC18684_cont_BFC18728 }, - { 0x1FC18730u, SCPH1001_func_1FC18684_cont_BFC18730 }, - { 0x1FC18738u, SCPH1001_func_1FC18684_cont_BFC18738 }, - { 0x1FC18740u, SCPH1001_func_1FC18684_cont_BFC18740 }, - { 0x1FC1874Cu, SCPH1001_func_1FC18684_cont_BFC1874C }, - { 0x1FC18754u, SCPH1001_func_1FC18684_cont_BFC18754 }, - { 0x1FC1875Cu, SCPH1001_func_1FC18684_cont_BFC1875C }, - { 0x1FC18764u, SCPH1001_func_1FC18684_cont_BFC18764 }, - { 0x1FC1876Cu, SCPH1001_func_1FC18684_cont_BFC1876C }, - { 0x1FC18774u, SCPH1001_func_1FC18684_cont_BFC18774 }, - { 0x1FC18778u, SCPH1001_func_1FC18684_cont_BFC18778 }, - { 0x1FC18788u, SCPH1001_func_1FC18788 }, - { 0x1FC18798u, SCPH1001_func_1FC18798 }, - { 0x1FC187B8u, SCPH1001_func_1FC18798_cont_BFC187B8 }, - { 0x1FC187C8u, SCPH1001_func_1FC18798_cont_BFC187C8 }, - { 0x1FC187D4u, SCPH1001_func_1FC18798_cont_BFC187D4 }, - { 0x1FC187E4u, SCPH1001_func_1FC18798_cont_BFC187E4 }, - { 0x1FC187F8u, SCPH1001_func_1FC18798_cont_BFC187F8 }, - { 0x1FC18808u, SCPH1001_func_1FC18798_cont_BFC18808 }, - { 0x1FC18818u, SCPH1001_func_1FC18798_cont_BFC18818 }, - { 0x1FC18828u, SCPH1001_func_1FC18798_cont_BFC18828 }, - { 0x1FC1883Cu, SCPH1001_func_1FC18798_cont_BFC1883C }, - { 0x1FC18848u, SCPH1001_func_1FC18798_cont_BFC18848 }, - { 0x1FC18854u, SCPH1001_func_1FC18798_cont_BFC18854 }, - { 0x1FC1885Cu, SCPH1001_func_1FC18798_cont_BFC1885C }, - { 0x1FC1886Cu, SCPH1001_func_1FC18798_cont_BFC1886C }, - { 0x1FC1887Cu, SCPH1001_func_1FC18798_cont_BFC1887C }, - { 0x1FC18884u, SCPH1001_func_1FC18798_cont_BFC18884 }, - { 0x1FC18898u, SCPH1001_func_1FC18798_cont_BFC18898 }, - { 0x1FC188A0u, SCPH1001_func_1FC18798_cont_BFC188A0 }, - { 0x1FC188A4u, SCPH1001_func_1FC18798_cont_BFC188A4 }, - { 0x1FC188B4u, SCPH1001_func_1FC188B4 }, - { 0x1FC188C0u, SCPH1001_func_1FC188B4_cont_BFC188C0 }, - { 0x1FC188DCu, SCPH1001_func_1FC188B4_cont_BFC188DC }, - { 0x1FC188F0u, SCPH1001_func_1FC188F0 }, - { 0x1FC18900u, SCPH1001_func_1FC188F0_cont_BFC18900 }, - { 0x1FC1891Cu, SCPH1001_func_1FC188F0_cont_BFC1891C }, - { 0x1FC18930u, SCPH1001_func_1FC188F0_cont_BFC18930 }, - { 0x1FC18940u, SCPH1001_func_1FC188F0_cont_BFC18940 }, - { 0x1FC18948u, SCPH1001_func_1FC188F0_cont_BFC18948 }, - { 0x1FC18958u, SCPH1001_func_1FC188F0_cont_BFC18958 }, - { 0x1FC18960u, SCPH1001_func_1FC188F0_cont_BFC18960 }, - { 0x1FC18968u, SCPH1001_func_1FC188F0_cont_BFC18968 }, - { 0x1FC18974u, SCPH1001_func_1FC188F0_cont_BFC18974 }, - { 0x1FC18978u, SCPH1001_func_1FC188F0_cont_BFC18978 }, - { 0x1FC18990u, SCPH1001_func_1FC18990 }, - { 0x1FC189A4u, SCPH1001_func_1FC18990_cont_BFC189A4 }, - { 0x1FC189B0u, SCPH1001_func_1FC18990_cont_BFC189B0 }, - { 0x1FC189D0u, SCPH1001_func_1FC18990_cont_BFC189D0 }, - { 0x1FC189E4u, SCPH1001_func_1FC18990_cont_BFC189E4 }, - { 0x1FC189F8u, SCPH1001_func_1FC18990_cont_BFC189F8 }, - { 0x1FC18A00u, SCPH1001_func_1FC18990_cont_BFC18A00 }, - { 0x1FC18A14u, SCPH1001_func_1FC18990_cont_BFC18A14 }, - { 0x1FC18A28u, SCPH1001_func_1FC18990_cont_BFC18A28 }, - { 0x1FC18A3Cu, SCPH1001_func_1FC18990_cont_BFC18A3C }, - { 0x1FC18A44u, SCPH1001_func_1FC18990_cont_BFC18A44 }, - { 0x1FC18A5Cu, SCPH1001_func_1FC18990_cont_BFC18A5C }, - { 0x1FC18A70u, SCPH1001_func_1FC18990_cont_BFC18A70 }, - { 0x1FC18A7Cu, SCPH1001_func_1FC18990_cont_BFC18A7C }, - { 0x1FC18A90u, SCPH1001_func_1FC18990_cont_BFC18A90 }, - { 0x1FC18AA4u, SCPH1001_func_1FC18990_cont_BFC18AA4 }, - { 0x1FC18AB8u, SCPH1001_func_1FC18990_cont_BFC18AB8 }, - { 0x1FC18AC0u, SCPH1001_func_1FC18990_cont_BFC18AC0 }, - { 0x1FC18AC8u, SCPH1001_func_1FC18990_cont_BFC18AC8 }, - { 0x1FC18ADCu, SCPH1001_func_1FC18990_cont_BFC18ADC }, - { 0x1FC18AF0u, SCPH1001_func_1FC18990_cont_BFC18AF0 }, - { 0x1FC18B04u, SCPH1001_func_1FC18990_cont_BFC18B04 }, - { 0x1FC18B0Cu, SCPH1001_func_1FC18990_cont_BFC18B0C }, - { 0x1FC18B14u, SCPH1001_func_1FC18990_cont_BFC18B14 }, - { 0x1FC18B1Cu, SCPH1001_func_1FC18990_cont_BFC18B1C }, - { 0x1FC18B30u, SCPH1001_func_1FC18990_cont_BFC18B30 }, - { 0x1FC18B38u, SCPH1001_func_1FC18990_cont_BFC18B38 }, - { 0x1FC18B40u, SCPH1001_func_1FC18990_cont_BFC18B40 }, - { 0x1FC18B48u, SCPH1001_func_1FC18990_cont_BFC18B48 }, - { 0x1FC18B50u, SCPH1001_func_1FC18990_cont_BFC18B50 }, - { 0x1FC18B58u, SCPH1001_func_1FC18990_cont_BFC18B58 }, - { 0x1FC18B7Cu, SCPH1001_func_1FC18990_cont_BFC18B7C }, - { 0x1FC18B84u, SCPH1001_func_1FC18990_cont_BFC18B84 }, - { 0x1FC18B8Cu, SCPH1001_func_1FC18990_cont_BFC18B8C }, - { 0x1FC18B94u, SCPH1001_func_1FC18990_cont_BFC18B94 }, - { 0x1FC18BA4u, SCPH1001_func_1FC18990_cont_BFC18BA4 }, - { 0x1FC18BB8u, SCPH1001_func_1FC18990_cont_BFC18BB8 }, - { 0x1FC18BCCu, SCPH1001_func_1FC18990_cont_BFC18BCC }, - { 0x1FC18BDCu, SCPH1001_func_1FC18990_cont_BFC18BDC }, - { 0x1FC18BF0u, SCPH1001_func_1FC18990_cont_BFC18BF0 }, - { 0x1FC18C04u, SCPH1001_func_1FC18990_cont_BFC18C04 }, - { 0x1FC18C0Cu, SCPH1001_func_1FC18990_cont_BFC18C0C }, - { 0x1FC18C14u, SCPH1001_func_1FC18990_cont_BFC18C14 }, - { 0x1FC18C2Cu, SCPH1001_func_1FC18990_cont_BFC18C2C }, - { 0x1FC18C3Cu, SCPH1001_func_1FC18990_cont_BFC18C3C }, - { 0x1FC18C50u, SCPH1001_func_1FC18990_cont_BFC18C50 }, - { 0x1FC18C58u, SCPH1001_func_1FC18990_cont_BFC18C58 }, - { 0x1FC18C60u, SCPH1001_func_1FC18990_cont_BFC18C60 }, - { 0x1FC18C6Cu, SCPH1001_func_1FC18990_cont_BFC18C6C }, - { 0x1FC18C7Cu, SCPH1001_func_1FC18990_cont_BFC18C7C }, - { 0x1FC18C90u, SCPH1001_func_1FC18990_cont_BFC18C90 }, - { 0x1FC18CA4u, SCPH1001_func_1FC18990_cont_BFC18CA4 }, - { 0x1FC18CB8u, SCPH1001_func_1FC18990_cont_BFC18CB8 }, - { 0x1FC18CCCu, SCPH1001_func_1FC18990_cont_BFC18CCC }, - { 0x1FC18CE0u, SCPH1001_func_1FC18990_cont_BFC18CE0 }, - { 0x1FC18CF4u, SCPH1001_func_1FC18990_cont_BFC18CF4 }, - { 0x1FC18D00u, SCPH1001_func_1FC18990_cont_BFC18D00 }, - { 0x1FC18D04u, SCPH1001_func_1FC18990_cont_BFC18D04 }, - { 0x1FC18D10u, SCPH1001_func_1FC18D10 }, - { 0x1FC18D2Cu, SCPH1001_func_1FC18D10_cont_BFC18D2C }, - { 0x1FC18D34u, SCPH1001_func_1FC18D10_cont_BFC18D34 }, - { 0x1FC18D44u, SCPH1001_func_1FC18D10_cont_BFC18D44 }, - { 0x1FC18D54u, SCPH1001_func_1FC18D10_cont_BFC18D54 }, - { 0x1FC18D5Cu, SCPH1001_func_1FC18D10_cont_BFC18D5C }, - { 0x1FC18D78u, SCPH1001_func_1FC18D10_cont_BFC18D78 }, - { 0x1FC18D98u, SCPH1001_func_1FC18D10_cont_BFC18D98 }, - { 0x1FC18DB8u, SCPH1001_func_1FC18D10_cont_BFC18DB8 }, - { 0x1FC18DD8u, SCPH1001_func_1FC18D10_cont_BFC18DD8 }, - { 0x1FC18DECu, SCPH1001_func_1FC18D10_cont_BFC18DEC }, - { 0x1FC18DF4u, SCPH1001_func_1FC18D10_cont_BFC18DF4 }, - { 0x1FC18E20u, SCPH1001_func_1FC18D10_cont_BFC18E20 }, - { 0x1FC18E3Cu, SCPH1001_func_1FC18D10_cont_BFC18E3C }, - { 0x1FC18E48u, SCPH1001_func_1FC18D10_cont_BFC18E48 }, - { 0x1FC18E54u, SCPH1001_func_1FC18D10_cont_BFC18E54 }, - { 0x1FC18E60u, SCPH1001_func_1FC18D10_cont_BFC18E60 }, - { 0x1FC18E78u, SCPH1001_func_1FC18D10_cont_BFC18E78 }, - { 0x1FC18E90u, SCPH1001_func_1FC18D10_cont_BFC18E90 }, - { 0x1FC18EA8u, SCPH1001_func_1FC18D10_cont_BFC18EA8 }, - { 0x1FC18EC0u, SCPH1001_func_1FC18D10_cont_BFC18EC0 }, - { 0x1FC18ED8u, SCPH1001_func_1FC18D10_cont_BFC18ED8 }, - { 0x1FC18EF0u, SCPH1001_func_1FC18D10_cont_BFC18EF0 }, - { 0x1FC18F48u, SCPH1001_func_1FC18D10_cont_BFC18F48 }, - { 0x1FC18FC8u, SCPH1001_func_1FC18D10_cont_BFC18FC8 }, - { 0x1FC19050u, SCPH1001_func_1FC18D10_cont_BFC19050 }, - { 0x1FC190D0u, SCPH1001_func_1FC18D10_cont_BFC190D0 }, - { 0x1FC19150u, SCPH1001_func_1FC18D10_cont_BFC19150 }, - { 0x1FC191D0u, SCPH1001_func_1FC18D10_cont_BFC191D0 }, - { 0x1FC19250u, SCPH1001_func_1FC18D10_cont_BFC19250 }, - { 0x1FC19280u, SCPH1001_func_1FC18D10_cont_BFC19280 }, - { 0x1FC19288u, SCPH1001_func_1FC18D10_cont_BFC19288 }, - { 0x1FC19294u, SCPH1001_func_1FC18D10_cont_BFC19294 }, - { 0x1FC1929Cu, SCPH1001_func_1FC18D10_cont_BFC1929C }, - { 0x1FC192A4u, SCPH1001_func_1FC18D10_cont_BFC192A4 }, - { 0x1FC192B0u, SCPH1001_func_1FC18D10_cont_BFC192B0 }, - { 0x1FC192B8u, SCPH1001_func_1FC18D10_cont_BFC192B8 }, - { 0x1FC192C8u, SCPH1001_func_1FC18D10_cont_BFC192C8 }, - { 0x1FC192D4u, SCPH1001_func_1FC18D10_cont_BFC192D4 }, - { 0x1FC192E4u, SCPH1001_func_1FC192E4 }, - { 0x1FC192FCu, SCPH1001_func_1FC192E4_cont_BFC192FC }, - { 0x1FC193A4u, SCPH1001_func_1FC192E4_cont_BFC193A4 }, - { 0x1FC193C0u, SCPH1001_func_1FC193C0 }, - { 0x1FC193E8u, SCPH1001_func_1FC193C0_cont_BFC193E8 }, - { 0x1FC193FCu, SCPH1001_func_1FC193C0_cont_BFC193FC }, - { 0x1FC19408u, SCPH1001_func_1FC193C0_cont_BFC19408 }, - { 0x1FC19418u, SCPH1001_func_1FC193C0_cont_BFC19418 }, - { 0x1FC1942Cu, SCPH1001_func_1FC193C0_cont_BFC1942C }, - { 0x1FC19440u, SCPH1001_func_1FC193C0_cont_BFC19440 }, - { 0x1FC19454u, SCPH1001_func_1FC193C0_cont_BFC19454 }, - { 0x1FC19468u, SCPH1001_func_1FC193C0_cont_BFC19468 }, - { 0x1FC19488u, SCPH1001_func_1FC193C0_cont_BFC19488 }, - { 0x1FC194C0u, SCPH1001_func_1FC193C0_cont_BFC194C0 }, - { 0x1FC194F0u, SCPH1001_func_1FC193C0_cont_BFC194F0 }, - { 0x1FC19508u, SCPH1001_func_1FC193C0_cont_BFC19508 }, - { 0x1FC1951Cu, SCPH1001_func_1FC193C0_cont_BFC1951C }, - { 0x1FC1952Cu, SCPH1001_func_1FC1952C }, - { 0x1FC19544u, SCPH1001_func_1FC1952C_cont_BFC19544 }, - { 0x1FC19558u, SCPH1001_func_1FC1952C_cont_BFC19558 }, - { 0x1FC1957Cu, SCPH1001_func_1FC1952C_cont_BFC1957C }, - { 0x1FC19598u, SCPH1001_func_1FC1952C_cont_BFC19598 }, - { 0x1FC195D8u, SCPH1001_func_1FC1952C_cont_BFC195D8 }, - { 0x1FC19614u, SCPH1001_func_1FC1952C_cont_BFC19614 }, - { 0x1FC19630u, SCPH1001_func_1FC19630 }, - { 0x1FC19650u, SCPH1001_func_1FC19630_cont_BFC19650 }, - { 0x1FC19658u, SCPH1001_func_1FC19630_cont_BFC19658 }, - { 0x1FC19660u, SCPH1001_func_1FC19630_cont_BFC19660 }, - { 0x1FC19684u, SCPH1001_func_1FC19630_cont_BFC19684 }, - { 0x1FC19688u, SCPH1001_func_1FC19630_cont_BFC19688 }, - { 0x1FC19698u, SCPH1001_func_1FC19630_cont_BFC19698 }, - { 0x1FC1969Cu, SCPH1001_func_1FC19630_cont_BFC1969C }, - { 0x1FC196A8u, SCPH1001_func_1FC19630_cont_BFC196A8 }, - { 0x1FC196B8u, SCPH1001_func_1FC19630_cont_BFC196B8 }, - { 0x1FC196C8u, SCPH1001_func_1FC196C8 }, - { 0x1FC196D4u, SCPH1001_func_1FC196D4 }, - { 0x1FC196F4u, SCPH1001_func_1FC196D4_cont_BFC196F4 }, - { 0x1FC19704u, SCPH1001_func_1FC196D4_cont_BFC19704 }, - { 0x1FC1970Cu, SCPH1001_func_1FC196D4_cont_BFC1970C }, - { 0x1FC1972Cu, SCPH1001_func_1FC196D4_cont_BFC1972C }, - { 0x1FC1973Cu, SCPH1001_func_1FC196D4_cont_BFC1973C }, - { 0x1FC19754u, SCPH1001_func_1FC196D4_cont_BFC19754 }, - { 0x1FC19760u, SCPH1001_func_1FC196D4_cont_BFC19760 }, - { 0x1FC19770u, SCPH1001_func_1FC196D4_cont_BFC19770 }, - { 0x1FC19780u, SCPH1001_func_1FC196D4_cont_BFC19780 }, - { 0x1FC1979Cu, SCPH1001_func_1FC196D4_cont_BFC1979C }, - { 0x1FC197ACu, SCPH1001_func_1FC196D4_cont_BFC197AC }, - { 0x1FC197BCu, SCPH1001_func_1FC196D4_cont_BFC197BC }, - { 0x1FC197C8u, SCPH1001_func_1FC196D4_cont_BFC197C8 }, - { 0x1FC197CCu, SCPH1001_func_1FC196D4_cont_BFC197CC }, - { 0x1FC197D8u, SCPH1001_func_1FC196D4_cont_BFC197D8 }, - { 0x1FC197E4u, SCPH1001_func_1FC196D4_cont_BFC197E4 }, - { 0x1FC197F0u, SCPH1001_func_1FC196D4_cont_BFC197F0 }, - { 0x1FC19834u, SCPH1001_func_1FC196D4_cont_BFC19834 }, - { 0x1FC1983Cu, SCPH1001_func_1FC196D4_cont_BFC1983C }, - { 0x1FC19840u, SCPH1001_func_1FC196D4_cont_BFC19840 }, - { 0x1FC19848u, SCPH1001_func_1FC196D4_cont_BFC19848 }, - { 0x1FC1993Cu, SCPH1001_func_1FC196D4_cont_BFC1993C }, - { 0x1FC19944u, SCPH1001_func_1FC196D4_cont_BFC19944 }, - { 0x1FC19958u, SCPH1001_func_1FC196D4_cont_BFC19958 }, - { 0x1FC19960u, SCPH1001_func_1FC196D4_cont_BFC19960 }, - { 0x1FC19968u, SCPH1001_func_1FC196D4_cont_BFC19968 }, - { 0x1FC19970u, SCPH1001_func_1FC196D4_cont_BFC19970 }, - { 0x1FC19984u, SCPH1001_func_1FC196D4_cont_BFC19984 }, - { 0x1FC19998u, SCPH1001_func_1FC196D4_cont_BFC19998 }, - { 0x1FC1999Cu, SCPH1001_func_1FC196D4_cont_BFC1999C }, - { 0x1FC199C4u, SCPH1001_func_1FC196D4_cont_BFC199C4 }, - { 0x1FC199D8u, SCPH1001_func_1FC196D4_cont_BFC199D8 }, - { 0x1FC199DCu, SCPH1001_func_1FC196D4_cont_BFC199DC }, - { 0x1FC199E4u, SCPH1001_func_1FC196D4_cont_BFC199E4 }, - { 0x1FC199E8u, SCPH1001_func_1FC196D4_cont_BFC199E8 }, - { 0x1FC199FCu, SCPH1001_func_1FC196D4_cont_BFC199FC }, - { 0x1FC19A18u, SCPH1001_func_1FC196D4_cont_BFC19A18 }, - { 0x1FC19A2Cu, SCPH1001_func_1FC196D4_cont_BFC19A2C }, - { 0x1FC19A38u, SCPH1001_func_1FC196D4_cont_BFC19A38 }, - { 0x1FC19A44u, SCPH1001_func_1FC196D4_cont_BFC19A44 }, - { 0x1FC19A48u, SCPH1001_func_1FC196D4_cont_BFC19A48 }, - { 0x1FC19A58u, SCPH1001_func_1FC19A58 }, - { 0x1FC19A74u, SCPH1001_func_1FC19A58_cont_BFC19A74 }, - { 0x1FC19AACu, SCPH1001_func_1FC19A58_cont_BFC19AAC }, - { 0x1FC19AB4u, SCPH1001_func_1FC19A58_cont_BFC19AB4 }, - { 0x1FC19AC4u, SCPH1001_func_1FC19A58_cont_BFC19AC4 }, - { 0x1FC19AD8u, SCPH1001_func_1FC19A58_cont_BFC19AD8 }, - { 0x1FC19AE0u, SCPH1001_func_1FC19A58_cont_BFC19AE0 }, - { 0x1FC19AE4u, SCPH1001_func_1FC19A58_cont_BFC19AE4 }, - { 0x1FC19AF0u, SCPH1001_func_1FC19A58_cont_BFC19AF0 }, - { 0x1FC19B04u, SCPH1001_func_1FC19A58_cont_BFC19B04 }, - { 0x1FC19B0Cu, SCPH1001_func_1FC19A58_cont_BFC19B0C }, - { 0x1FC19B10u, SCPH1001_func_1FC19A58_cont_BFC19B10 }, - { 0x1FC19B1Cu, SCPH1001_func_1FC19A58_cont_BFC19B1C }, - { 0x1FC19B30u, SCPH1001_func_1FC19A58_cont_BFC19B30 }, - { 0x1FC19B38u, SCPH1001_func_1FC19A58_cont_BFC19B38 }, - { 0x1FC19B3Cu, SCPH1001_func_1FC19A58_cont_BFC19B3C }, - { 0x1FC19B48u, SCPH1001_func_1FC19A58_cont_BFC19B48 }, - { 0x1FC19B5Cu, SCPH1001_func_1FC19A58_cont_BFC19B5C }, - { 0x1FC19B60u, SCPH1001_func_1FC19A58_cont_BFC19B60 }, - { 0x1FC19B90u, SCPH1001_func_1FC19A58_cont_BFC19B90 }, - { 0x1FC19B94u, SCPH1001_func_1FC19A58_cont_BFC19B94 }, - { 0x1FC19BECu, SCPH1001_func_1FC19A58_cont_BFC19BEC }, - { 0x1FC19BF0u, SCPH1001_func_1FC19A58_cont_BFC19BF0 }, - { 0x1FC19C30u, SCPH1001_func_1FC19A58_cont_BFC19C30 }, - { 0x1FC19C54u, SCPH1001_func_1FC19A58_cont_BFC19C54 }, - { 0x1FC19C74u, SCPH1001_func_1FC19A58_cont_BFC19C74 }, - { 0x1FC19C80u, SCPH1001_func_1FC19A58_cont_BFC19C80 }, - { 0x1FC19CB4u, SCPH1001_func_1FC19A58_cont_BFC19CB4 }, - { 0x1FC19CC0u, SCPH1001_func_1FC19A58_cont_BFC19CC0 }, - { 0x1FC19CD4u, SCPH1001_func_1FC19A58_cont_BFC19CD4 }, - { 0x1FC19CE4u, SCPH1001_func_1FC19A58_cont_BFC19CE4 }, - { 0x1FC19CE8u, SCPH1001_func_1FC19A58_cont_BFC19CE8 }, - { 0x1FC19CF4u, SCPH1001_func_1FC19A58_cont_BFC19CF4 }, - { 0x1FC19CFCu, SCPH1001_func_1FC19A58_cont_BFC19CFC }, - { 0x1FC19D04u, SCPH1001_func_1FC19A58_cont_BFC19D04 }, - { 0x1FC19D0Cu, SCPH1001_func_1FC19A58_cont_BFC19D0C }, - { 0x1FC19D18u, SCPH1001_func_1FC19A58_cont_BFC19D18 }, - { 0x1FC19D20u, SCPH1001_func_1FC19A58_cont_BFC19D20 }, - { 0x1FC19D28u, SCPH1001_func_1FC19A58_cont_BFC19D28 }, - { 0x1FC19D3Cu, SCPH1001_func_1FC19A58_cont_BFC19D3C }, - { 0x1FC19D54u, SCPH1001_func_1FC19A58_cont_BFC19D54 }, - { 0x1FC19D5Cu, SCPH1001_func_1FC19A58_cont_BFC19D5C }, - { 0x1FC19D74u, SCPH1001_func_1FC19A58_cont_BFC19D74 }, - { 0x1FC19D94u, SCPH1001_func_1FC19A58_cont_BFC19D94 }, - { 0x1FC19DBCu, SCPH1001_func_1FC19A58_cont_BFC19DBC }, - { 0x1FC19DC8u, SCPH1001_func_1FC19A58_cont_BFC19DC8 }, - { 0x1FC19DD4u, SCPH1001_func_1FC19A58_cont_BFC19DD4 }, - { 0x1FC19DDCu, SCPH1001_func_1FC19A58_cont_BFC19DDC }, - { 0x1FC19DF4u, SCPH1001_func_1FC19DF4 }, - { 0x1FC19E24u, SCPH1001_func_1FC19DF4_cont_BFC19E24 }, - { 0x1FC19E4Cu, SCPH1001_func_1FC19DF4_cont_BFC19E4C }, - { 0x1FC19E5Cu, SCPH1001_func_1FC19DF4_cont_BFC19E5C }, - { 0x1FC19E6Cu, SCPH1001_func_1FC19DF4_cont_BFC19E6C }, - { 0x1FC19E74u, SCPH1001_func_1FC19DF4_cont_BFC19E74 }, - { 0x1FC19E78u, SCPH1001_func_1FC19DF4_cont_BFC19E78 }, - { 0x1FC19E90u, SCPH1001_func_1FC19DF4_cont_BFC19E90 }, - { 0x1FC19E94u, SCPH1001_func_1FC19DF4_cont_BFC19E94 }, - { 0x1FC19EA0u, SCPH1001_func_1FC19DF4_cont_BFC19EA0 }, - { 0x1FC19EACu, SCPH1001_func_1FC19DF4_cont_BFC19EAC }, - { 0x1FC19EB8u, SCPH1001_func_1FC19DF4_cont_BFC19EB8 }, - { 0x1FC19EC8u, SCPH1001_func_1FC19DF4_cont_BFC19EC8 }, - { 0x1FC19ED4u, SCPH1001_func_1FC19DF4_cont_BFC19ED4 }, - { 0x1FC19EDCu, SCPH1001_func_1FC19DF4_cont_BFC19EDC }, - { 0x1FC19EE4u, SCPH1001_func_1FC19DF4_cont_BFC19EE4 }, - { 0x1FC19EF4u, SCPH1001_func_1FC19DF4_cont_BFC19EF4 }, - { 0x1FC19F04u, SCPH1001_func_1FC19DF4_cont_BFC19F04 }, - { 0x1FC19F10u, SCPH1001_func_1FC19DF4_cont_BFC19F10 }, - { 0x1FC19F20u, SCPH1001_func_1FC19DF4_cont_BFC19F20 }, - { 0x1FC19F28u, SCPH1001_func_1FC19DF4_cont_BFC19F28 }, - { 0x1FC19F30u, SCPH1001_func_1FC19DF4_cont_BFC19F30 }, - { 0x1FC19F4Cu, SCPH1001_func_1FC19DF4_cont_BFC19F4C }, - { 0x1FC19F50u, SCPH1001_func_1FC19DF4_cont_BFC19F50 }, - { 0x1FC19F5Cu, SCPH1001_func_1FC19DF4_cont_BFC19F5C }, - { 0x1FC19F74u, SCPH1001_func_1FC19DF4_cont_BFC19F74 }, - { 0x1FC19F8Cu, SCPH1001_func_1FC19DF4_cont_BFC19F8C }, - { 0x1FC19FA4u, SCPH1001_func_1FC19DF4_cont_BFC19FA4 }, - { 0x1FC19FACu, SCPH1001_func_1FC19DF4_cont_BFC19FAC }, - { 0x1FC19FB0u, SCPH1001_func_1FC19DF4_cont_BFC19FB0 }, - { 0x1FC19FD0u, SCPH1001_func_1FC19FD0 }, - { 0x1FC19FE8u, SCPH1001_func_1FC19FD0_cont_BFC19FE8 }, - { 0x1FC1A00Cu, SCPH1001_func_1FC19FD0_cont_BFC1A00C }, - { 0x1FC1A014u, SCPH1001_func_1FC19FD0_cont_BFC1A014 }, - { 0x1FC1A01Cu, SCPH1001_func_1FC19FD0_cont_BFC1A01C }, - { 0x1FC1A024u, SCPH1001_func_1FC19FD0_cont_BFC1A024 }, - { 0x1FC1A02Cu, SCPH1001_func_1FC19FD0_cont_BFC1A02C }, - { 0x1FC1A034u, SCPH1001_func_1FC19FD0_cont_BFC1A034 }, - { 0x1FC1A040u, SCPH1001_func_1FC19FD0_cont_BFC1A040 }, - { 0x1FC1A050u, SCPH1001_func_1FC1A050 }, - { 0x1FC1A068u, SCPH1001_func_1FC1A050_cont_BFC1A068 }, - { 0x1FC1A070u, SCPH1001_func_1FC1A050_cont_BFC1A070 }, - { 0x1FC1A084u, SCPH1001_func_1FC1A050_cont_BFC1A084 }, - { 0x1FC1A098u, SCPH1001_func_1FC1A050_cont_BFC1A098 }, - { 0x1FC1A0ACu, SCPH1001_func_1FC1A050_cont_BFC1A0AC }, - { 0x1FC1A0B4u, SCPH1001_func_1FC1A050_cont_BFC1A0B4 }, - { 0x1FC1A0BCu, SCPH1001_func_1FC1A050_cont_BFC1A0BC }, - { 0x1FC1A0D4u, SCPH1001_func_1FC1A050_cont_BFC1A0D4 }, - { 0x1FC1A0F4u, SCPH1001_func_1FC1A050_cont_BFC1A0F4 }, - { 0x1FC1A10Cu, SCPH1001_func_1FC1A050_cont_BFC1A10C }, - { 0x1FC1A11Cu, SCPH1001_func_1FC1A11C }, - { 0x1FC1A134u, SCPH1001_func_1FC1A11C_cont_BFC1A134 }, - { 0x1FC1A14Cu, SCPH1001_func_1FC1A11C_cont_BFC1A14C }, - { 0x1FC1A15Cu, SCPH1001_func_1FC1A15C }, - { 0x1FC1A16Cu, SCPH1001_func_1FC1A15C_cont_BFC1A16C }, - { 0x1FC1A17Cu, SCPH1001_func_1FC1A17C }, - { 0x1FC1A18Cu, SCPH1001_func_1FC1A17C_cont_BFC1A18C }, - { 0x1FC1A19Cu, SCPH1001_func_1FC1A19C }, - { 0x1FC1A1ACu, SCPH1001_func_1FC1A19C_cont_BFC1A1AC }, - { 0x1FC1A1BCu, SCPH1001_func_1FC1A1BC }, - { 0x1FC1A1D4u, SCPH1001_func_1FC1A1BC_cont_BFC1A1D4 }, - { 0x1FC1A1DCu, SCPH1001_func_1FC1A1BC_cont_BFC1A1DC }, - { 0x1FC1A1E4u, SCPH1001_func_1FC1A1BC_cont_BFC1A1E4 }, - { 0x1FC1A1F0u, SCPH1001_func_1FC1A1BC_cont_BFC1A1F0 }, - { 0x1FC1A1F8u, SCPH1001_func_1FC1A1BC_cont_BFC1A1F8 }, - { 0x1FC1A204u, SCPH1001_func_1FC1A1BC_cont_BFC1A204 }, - { 0x1FC1A20Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A20C }, - { 0x1FC1A218u, SCPH1001_func_1FC1A1BC_cont_BFC1A218 }, - { 0x1FC1A220u, SCPH1001_func_1FC1A1BC_cont_BFC1A220 }, - { 0x1FC1A22Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A22C }, - { 0x1FC1A234u, SCPH1001_func_1FC1A1BC_cont_BFC1A234 }, - { 0x1FC1A240u, SCPH1001_func_1FC1A1BC_cont_BFC1A240 }, - { 0x1FC1A248u, SCPH1001_func_1FC1A1BC_cont_BFC1A248 }, - { 0x1FC1A254u, SCPH1001_func_1FC1A1BC_cont_BFC1A254 }, - { 0x1FC1A25Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A25C }, - { 0x1FC1A268u, SCPH1001_func_1FC1A1BC_cont_BFC1A268 }, - { 0x1FC1A270u, SCPH1001_func_1FC1A1BC_cont_BFC1A270 }, - { 0x1FC1A27Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A27C }, - { 0x1FC1A284u, SCPH1001_func_1FC1A1BC_cont_BFC1A284 }, - { 0x1FC1A290u, SCPH1001_func_1FC1A1BC_cont_BFC1A290 }, - { 0x1FC1A2B8u, SCPH1001_func_1FC1A1BC_cont_BFC1A2B8 }, - { 0x1FC1A2C0u, SCPH1001_func_1FC1A1BC_cont_BFC1A2C0 }, - { 0x1FC1A2CCu, SCPH1001_func_1FC1A1BC_cont_BFC1A2CC }, - { 0x1FC1A2D4u, SCPH1001_func_1FC1A1BC_cont_BFC1A2D4 }, - { 0x1FC1A2E0u, SCPH1001_func_1FC1A1BC_cont_BFC1A2E0 }, - { 0x1FC1A2E8u, SCPH1001_func_1FC1A1BC_cont_BFC1A2E8 }, - { 0x1FC1A2F0u, SCPH1001_func_1FC1A1BC_cont_BFC1A2F0 }, - { 0x1FC1A2F8u, SCPH1001_func_1FC1A1BC_cont_BFC1A2F8 }, - { 0x1FC1A300u, SCPH1001_func_1FC1A1BC_cont_BFC1A300 }, - { 0x1FC1A308u, SCPH1001_func_1FC1A1BC_cont_BFC1A308 }, - { 0x1FC1A310u, SCPH1001_func_1FC1A1BC_cont_BFC1A310 }, - { 0x1FC1A318u, SCPH1001_func_1FC1A1BC_cont_BFC1A318 }, - { 0x1FC1A320u, SCPH1001_func_1FC1A1BC_cont_BFC1A320 }, - { 0x1FC1A328u, SCPH1001_func_1FC1A1BC_cont_BFC1A328 }, - { 0x1FC1A33Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A33C }, - { 0x1FC1A344u, SCPH1001_func_1FC1A1BC_cont_BFC1A344 }, - { 0x1FC1A348u, SCPH1001_func_1FC1A1BC_cont_BFC1A348 }, - { 0x1FC1A34Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A34C }, - { 0x1FC1A354u, SCPH1001_func_1FC1A1BC_cont_BFC1A354 }, - { 0x1FC1A358u, SCPH1001_func_1FC1A1BC_cont_BFC1A358 }, - { 0x1FC1A360u, SCPH1001_func_1FC1A1BC_cont_BFC1A360 }, - { 0x1FC1A368u, SCPH1001_func_1FC1A1BC_cont_BFC1A368 }, - { 0x1FC1A378u, SCPH1001_func_1FC1A1BC_cont_BFC1A378 }, - { 0x1FC1A380u, SCPH1001_func_1FC1A1BC_cont_BFC1A380 }, - { 0x1FC1A38Cu, SCPH1001_func_1FC1A1BC_cont_BFC1A38C }, - { 0x1FC1A394u, SCPH1001_func_1FC1A1BC_cont_BFC1A394 }, - { 0x1FC1A3A0u, SCPH1001_func_1FC1A1BC_cont_BFC1A3A0 }, - { 0x1FC1A3A8u, SCPH1001_func_1FC1A1BC_cont_BFC1A3A8 }, - { 0x1FC1A3B8u, SCPH1001_func_1FC1A3B8 }, - { 0x1FC1A400u, SCPH1001_func_1FC1A3B8_cont_BFC1A400 }, - { 0x1FC1A40Cu, SCPH1001_func_1FC1A3B8_cont_BFC1A40C }, - { 0x1FC1A414u, SCPH1001_func_1FC1A414 }, - { 0x1FC1A420u, SCPH1001_func_1FC1A420 }, - { 0x1FC1A430u, SCPH1001_func_1FC1A430 }, - { 0x1FC1A450u, SCPH1001_func_1FC1A430_cont_BFC1A450 }, - { 0x1FC1A45Cu, SCPH1001_func_1FC1A430_cont_BFC1A45C }, - { 0x1FC1A460u, SCPH1001_func_1FC1A430_cont_BFC1A460 }, - { 0x1FC1A468u, SCPH1001_func_1FC1A430_cont_BFC1A468 }, - { 0x1FC1A470u, SCPH1001_func_1FC1A430_cont_BFC1A470 }, - { 0x1FC1A484u, SCPH1001_func_1FC1A430_cont_BFC1A484 }, - { 0x1FC1A48Cu, SCPH1001_func_1FC1A430_cont_BFC1A48C }, - { 0x1FC1A49Cu, SCPH1001_func_1FC1A430_cont_BFC1A49C }, - { 0x1FC1A4ACu, SCPH1001_func_1FC1A430_cont_BFC1A4AC }, - { 0x1FC1A4B4u, SCPH1001_func_1FC1A430_cont_BFC1A4B4 }, - { 0x1FC1A4C8u, SCPH1001_func_1FC1A430_cont_BFC1A4C8 }, - { 0x1FC1A4D4u, SCPH1001_func_1FC1A430_cont_BFC1A4D4 }, - { 0x1FC1A4E4u, SCPH1001_func_1FC1A430_cont_BFC1A4E4 }, - { 0x1FC1A4FCu, SCPH1001_func_1FC1A430_cont_BFC1A4FC }, - { 0x1FC1A504u, SCPH1001_func_1FC1A430_cont_BFC1A504 }, - { 0x1FC1A50Cu, SCPH1001_func_1FC1A430_cont_BFC1A50C }, - { 0x1FC1A520u, SCPH1001_func_1FC1A430_cont_BFC1A520 }, - { 0x1FC1A528u, SCPH1001_func_1FC1A430_cont_BFC1A528 }, - { 0x1FC1A538u, SCPH1001_func_1FC1A430_cont_BFC1A538 }, - { 0x1FC1A548u, SCPH1001_func_1FC1A430_cont_BFC1A548 }, - { 0x1FC1A550u, SCPH1001_func_1FC1A430_cont_BFC1A550 }, - { 0x1FC1A564u, SCPH1001_func_1FC1A430_cont_BFC1A564 }, - { 0x1FC1A570u, SCPH1001_func_1FC1A430_cont_BFC1A570 }, - { 0x1FC1A580u, SCPH1001_func_1FC1A430_cont_BFC1A580 }, - { 0x1FC1A5A0u, SCPH1001_func_1FC1A430_cont_BFC1A5A0 }, - { 0x1FC1A5B0u, SCPH1001_func_1FC1A5B0 }, - { 0x1FC1A5C8u, SCPH1001_func_1FC1A5B0_cont_BFC1A5C8 }, - { 0x1FC1A5E0u, SCPH1001_func_1FC1A5B0_cont_BFC1A5E0 }, - { 0x1FC1A5F4u, SCPH1001_func_1FC1A5B0_cont_BFC1A5F4 }, - { 0x1FC1A608u, SCPH1001_func_1FC1A5B0_cont_BFC1A608 }, - { 0x1FC1A61Cu, SCPH1001_func_1FC1A5B0_cont_BFC1A61C }, - { 0x1FC1A624u, SCPH1001_func_1FC1A5B0_cont_BFC1A624 }, - { 0x1FC1A630u, SCPH1001_func_1FC1A5B0_cont_BFC1A630 }, - { 0x1FC1A650u, SCPH1001_func_1FC1A5B0_cont_BFC1A650 }, - { 0x1FC1A66Cu, SCPH1001_func_1FC1A5B0_cont_BFC1A66C }, - { 0x1FC1A674u, SCPH1001_func_1FC1A5B0_cont_BFC1A674 }, - { 0x1FC1A67Cu, SCPH1001_func_1FC1A5B0_cont_BFC1A67C }, - { 0x1FC1A684u, SCPH1001_func_1FC1A5B0_cont_BFC1A684 }, - { 0x1FC1A68Cu, SCPH1001_func_1FC1A5B0_cont_BFC1A68C }, - { 0x1FC1A694u, SCPH1001_func_1FC1A5B0_cont_BFC1A694 }, - { 0x1FC1A69Cu, SCPH1001_func_1FC1A5B0_cont_BFC1A69C }, - { 0x1FC1A6A4u, SCPH1001_func_1FC1A5B0_cont_BFC1A6A4 }, - { 0x1FC1A6ACu, SCPH1001_func_1FC1A5B0_cont_BFC1A6AC }, - { 0x1FC1A6B4u, SCPH1001_func_1FC1A5B0_cont_BFC1A6B4 }, - { 0x1FC1A6BCu, SCPH1001_func_1FC1A5B0_cont_BFC1A6BC }, - { 0x1FC1A6C4u, SCPH1001_func_1FC1A5B0_cont_BFC1A6C4 }, - { 0x1FC1A6CCu, SCPH1001_func_1FC1A5B0_cont_BFC1A6CC }, - { 0x1FC1A6D4u, SCPH1001_func_1FC1A5B0_cont_BFC1A6D4 }, - { 0x1FC1A6DCu, SCPH1001_func_1FC1A5B0_cont_BFC1A6DC }, - { 0x1FC1A6E0u, SCPH1001_func_1FC1A5B0_cont_BFC1A6E0 }, - { 0x1FC1A6ECu, SCPH1001_func_1FC1A6EC }, - { 0x1FC1A71Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A71C }, - { 0x1FC1A728u, SCPH1001_func_1FC1A6EC_cont_BFC1A728 }, - { 0x1FC1A750u, SCPH1001_func_1FC1A6EC_cont_BFC1A750 }, - { 0x1FC1A760u, SCPH1001_func_1FC1A6EC_cont_BFC1A760 }, - { 0x1FC1A774u, SCPH1001_func_1FC1A6EC_cont_BFC1A774 }, - { 0x1FC1A780u, SCPH1001_func_1FC1A6EC_cont_BFC1A780 }, - { 0x1FC1A794u, SCPH1001_func_1FC1A6EC_cont_BFC1A794 }, - { 0x1FC1A7A8u, SCPH1001_func_1FC1A6EC_cont_BFC1A7A8 }, - { 0x1FC1A7BCu, SCPH1001_func_1FC1A6EC_cont_BFC1A7BC }, - { 0x1FC1A7C0u, SCPH1001_func_1FC1A6EC_cont_BFC1A7C0 }, - { 0x1FC1A7C8u, SCPH1001_func_1FC1A6EC_cont_BFC1A7C8 }, - { 0x1FC1A7D4u, SCPH1001_func_1FC1A6EC_cont_BFC1A7D4 }, - { 0x1FC1A7DCu, SCPH1001_func_1FC1A6EC_cont_BFC1A7DC }, - { 0x1FC1A7E0u, SCPH1001_func_1FC1A6EC_cont_BFC1A7E0 }, - { 0x1FC1A7ECu, SCPH1001_func_1FC1A6EC_cont_BFC1A7EC }, - { 0x1FC1A7F4u, SCPH1001_func_1FC1A6EC_cont_BFC1A7F4 }, - { 0x1FC1A80Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A80C }, - { 0x1FC1A814u, SCPH1001_func_1FC1A6EC_cont_BFC1A814 }, - { 0x1FC1A818u, SCPH1001_func_1FC1A6EC_cont_BFC1A818 }, - { 0x1FC1A820u, SCPH1001_func_1FC1A6EC_cont_BFC1A820 }, - { 0x1FC1A82Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A82C }, - { 0x1FC1A838u, SCPH1001_func_1FC1A6EC_cont_BFC1A838 }, - { 0x1FC1A840u, SCPH1001_func_1FC1A6EC_cont_BFC1A840 }, - { 0x1FC1A854u, SCPH1001_func_1FC1A6EC_cont_BFC1A854 }, - { 0x1FC1A85Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A85C }, - { 0x1FC1A864u, SCPH1001_func_1FC1A6EC_cont_BFC1A864 }, - { 0x1FC1A870u, SCPH1001_func_1FC1A6EC_cont_BFC1A870 }, - { 0x1FC1A87Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A87C }, - { 0x1FC1A884u, SCPH1001_func_1FC1A6EC_cont_BFC1A884 }, - { 0x1FC1A898u, SCPH1001_func_1FC1A6EC_cont_BFC1A898 }, - { 0x1FC1A8ACu, SCPH1001_func_1FC1A6EC_cont_BFC1A8AC }, - { 0x1FC1A8B4u, SCPH1001_func_1FC1A6EC_cont_BFC1A8B4 }, - { 0x1FC1A8C0u, SCPH1001_func_1FC1A6EC_cont_BFC1A8C0 }, - { 0x1FC1A8CCu, SCPH1001_func_1FC1A6EC_cont_BFC1A8CC }, - { 0x1FC1A8D4u, SCPH1001_func_1FC1A6EC_cont_BFC1A8D4 }, - { 0x1FC1A8D8u, SCPH1001_func_1FC1A6EC_cont_BFC1A8D8 }, - { 0x1FC1A8E0u, SCPH1001_func_1FC1A6EC_cont_BFC1A8E0 }, - { 0x1FC1A8F8u, SCPH1001_func_1FC1A6EC_cont_BFC1A8F8 }, - { 0x1FC1A908u, SCPH1001_func_1FC1A6EC_cont_BFC1A908 }, - { 0x1FC1A92Cu, SCPH1001_func_1FC1A6EC_cont_BFC1A92C }, - { 0x1FC1A940u, SCPH1001_func_1FC1A6EC_cont_BFC1A940 }, - { 0x1FC1A964u, SCPH1001_func_1FC1A6EC_cont_BFC1A964 }, - { 0x1FC1A970u, SCPH1001_func_1FC1A6EC_cont_BFC1A970 }, - { 0x1FC1A974u, SCPH1001_func_1FC1A6EC_cont_BFC1A974 }, - { 0x1FC1A980u, SCPH1001_func_1FC1A6EC_cont_BFC1A980 }, - { 0x1FC1A9A4u, SCPH1001_func_1FC1A6EC_cont_BFC1A9A4 }, - { 0x1FC1A9C4u, SCPH1001_func_1FC1A6EC_cont_BFC1A9C4 }, - { 0x1FC1A9E8u, SCPH1001_func_1FC1A6EC_cont_BFC1A9E8 }, - { 0x1FC1AA00u, SCPH1001_func_1FC1A6EC_cont_BFC1AA00 }, - { 0x1FC1AA18u, SCPH1001_func_1FC1A6EC_cont_BFC1AA18 }, - { 0x1FC1AA30u, SCPH1001_func_1FC1A6EC_cont_BFC1AA30 }, - { 0x1FC1AA44u, SCPH1001_func_1FC1A6EC_cont_BFC1AA44 }, - { 0x1FC1AA5Cu, SCPH1001_func_1FC1A6EC_cont_BFC1AA5C }, - { 0x1FC1AA74u, SCPH1001_func_1FC1A6EC_cont_BFC1AA74 }, - { 0x1FC1AA80u, SCPH1001_func_1FC1A6EC_cont_BFC1AA80 }, - { 0x1FC1AA84u, SCPH1001_func_1FC1A6EC_cont_BFC1AA84 }, - { 0x1FC1AA90u, SCPH1001_func_1FC1AA90 }, - { 0x1FC1AAA8u, SCPH1001_func_1FC1AA90_cont_BFC1AAA8 }, - { 0x1FC1AAB8u, SCPH1001_func_1FC1AA90_cont_BFC1AAB8 }, - { 0x1FC1AAD0u, SCPH1001_func_1FC1AA90_cont_BFC1AAD0 }, - { 0x1FC1AADCu, SCPH1001_func_1FC1AA90_cont_BFC1AADC }, - { 0x1FC1AAE8u, SCPH1001_func_1FC1AA90_cont_BFC1AAE8 }, - { 0x1FC1AAF4u, SCPH1001_func_1FC1AA90_cont_BFC1AAF4 }, - { 0x1FC1AB00u, SCPH1001_func_1FC1AA90_cont_BFC1AB00 }, - { 0x1FC1AB10u, SCPH1001_func_1FC1AA90_cont_BFC1AB10 }, - { 0x1FC1AB20u, SCPH1001_func_1FC1AA90_cont_BFC1AB20 }, - { 0x1FC1AB30u, SCPH1001_func_1FC1AA90_cont_BFC1AB30 }, - { 0x1FC1AB40u, SCPH1001_func_1FC1AA90_cont_BFC1AB40 }, - { 0x1FC1AB50u, SCPH1001_func_1FC1AA90_cont_BFC1AB50 }, - { 0x1FC1AB64u, SCPH1001_func_1FC1AA90_cont_BFC1AB64 }, - { 0x1FC1AB70u, SCPH1001_func_1FC1AA90_cont_BFC1AB70 }, - { 0x1FC1AB74u, SCPH1001_func_1FC1AA90_cont_BFC1AB74 }, - { 0x1FC1AB78u, SCPH1001_func_1FC1AA90_cont_BFC1AB78 }, - { 0x1FC1AB84u, SCPH1001_func_1FC1AA90_cont_BFC1AB84 }, - { 0x1FC1ABC0u, SCPH1001_func_1FC1AA90_cont_BFC1ABC0 }, - { 0x1FC1ABC8u, SCPH1001_func_1FC1AA90_cont_BFC1ABC8 }, - { 0x1FC1ABCCu, SCPH1001_func_1FC1AA90_cont_BFC1ABCC }, - { 0x1FC1ABD8u, SCPH1001_func_1FC1AA90_cont_BFC1ABD8 }, - { 0x1FC1AC14u, SCPH1001_func_1FC1AA90_cont_BFC1AC14 }, - { 0x1FC1AC1Cu, SCPH1001_func_1FC1AA90_cont_BFC1AC1C }, - { 0x1FC1AC58u, SCPH1001_func_1FC1AA90_cont_BFC1AC58 }, - { 0x1FC1AC5Cu, SCPH1001_func_1FC1AA90_cont_BFC1AC5C }, - { 0x1FC1AC68u, SCPH1001_func_1FC1AC68 }, - { 0x1FC1AC80u, SCPH1001_func_1FC1AC68_cont_BFC1AC80 }, - { 0x1FC1ACA0u, SCPH1001_func_1FC1AC68_cont_BFC1ACA0 }, - { 0x1FC1ACBCu, SCPH1001_func_1FC1AC68_cont_BFC1ACBC }, - { 0x1FC1ACC4u, SCPH1001_func_1FC1AC68_cont_BFC1ACC4 }, - { 0x1FC1ACCCu, SCPH1001_func_1FC1AC68_cont_BFC1ACCC }, - { 0x1FC1ACD4u, SCPH1001_func_1FC1AC68_cont_BFC1ACD4 }, - { 0x1FC1ACE8u, SCPH1001_func_1FC1AC68_cont_BFC1ACE8 }, - { 0x1FC1ACF0u, SCPH1001_func_1FC1AC68_cont_BFC1ACF0 }, - { 0x1FC1ACF4u, SCPH1001_func_1FC1AC68_cont_BFC1ACF4 }, - { 0x1FC1ACFCu, SCPH1001_func_1FC1AC68_cont_BFC1ACFC }, - { 0x1FC1AD04u, SCPH1001_func_1FC1AC68_cont_BFC1AD04 }, - { 0x1FC1AD08u, SCPH1001_func_1FC1AC68_cont_BFC1AD08 }, - { 0x1FC1AD10u, SCPH1001_func_1FC1AC68_cont_BFC1AD10 }, - { 0x1FC1AD1Cu, SCPH1001_func_1FC1AC68_cont_BFC1AD1C }, - { 0x1FC1AD34u, SCPH1001_func_1FC1AC68_cont_BFC1AD34 }, - { 0x1FC1AD50u, SCPH1001_func_1FC1AC68_cont_BFC1AD50 }, - { 0x1FC1AD5Cu, SCPH1001_func_1FC1AC68_cont_BFC1AD5C }, - { 0x1FC1AD60u, SCPH1001_func_1FC1AC68_cont_BFC1AD60 }, - { 0x1FC1AD74u, SCPH1001_func_1FC1AC68_cont_BFC1AD74 }, - { 0x1FC1AD84u, SCPH1001_func_1FC1AC68_cont_BFC1AD84 }, - { 0x1FC1AD88u, SCPH1001_func_1FC1AC68_cont_BFC1AD88 }, - { 0x1FC1AD8Cu, SCPH1001_func_1FC1AC68_cont_BFC1AD8C }, - { 0x1FC1AD94u, SCPH1001_func_1FC1AC68_cont_BFC1AD94 }, - { 0x1FC1ADA4u, SCPH1001_func_1FC1AC68_cont_BFC1ADA4 }, - { 0x1FC1ADB4u, SCPH1001_func_1FC1AC68_cont_BFC1ADB4 }, - { 0x1FC1ADB8u, SCPH1001_func_1FC1AC68_cont_BFC1ADB8 }, - { 0x1FC1ADC0u, SCPH1001_func_1FC1AC68_cont_BFC1ADC0 }, - { 0x1FC1ADD4u, SCPH1001_func_1FC1AC68_cont_BFC1ADD4 }, - { 0x1FC1ADF0u, SCPH1001_func_1FC1AC68_cont_BFC1ADF0 }, - { 0x1FC1ADFCu, SCPH1001_func_1FC1AC68_cont_BFC1ADFC }, - { 0x1FC1AE04u, SCPH1001_func_1FC1AC68_cont_BFC1AE04 }, - { 0x1FC1AE0Cu, SCPH1001_func_1FC1AC68_cont_BFC1AE0C }, - { 0x1FC1AE14u, SCPH1001_func_1FC1AC68_cont_BFC1AE14 }, - { 0x1FC1AE18u, SCPH1001_func_1FC1AC68_cont_BFC1AE18 }, - { 0x1FC1AE24u, SCPH1001_func_1FC1AE24 }, - { 0x1FC1AE34u, SCPH1001_func_1FC1AE34 }, - { 0x1FC1AE48u, SCPH1001_func_1FC1AE34_cont_BFC1AE48 }, - { 0x1FC1AE60u, SCPH1001_func_1FC1AE34_cont_BFC1AE60 }, - { 0x1FC1AE68u, SCPH1001_func_1FC1AE68 }, - { 0x1FC1AE80u, SCPH1001_func_1FC1AE68_cont_BFC1AE80 }, - { 0x1FC1AE94u, SCPH1001_func_1FC1AE68_cont_BFC1AE94 }, - { 0x1FC1AEA8u, SCPH1001_func_1FC1AE68_cont_BFC1AEA8 }, - { 0x1FC1AEBCu, SCPH1001_func_1FC1AE68_cont_BFC1AEBC }, - { 0x1FC1AEC4u, SCPH1001_func_1FC1AE68_cont_BFC1AEC4 }, - { 0x1FC1AED0u, SCPH1001_func_1FC1AE68_cont_BFC1AED0 }, - { 0x1FC1AEE4u, SCPH1001_func_1FC1AE68_cont_BFC1AEE4 }, - { 0x1FC1AF04u, SCPH1001_func_1FC1AE68_cont_BFC1AF04 }, - { 0x1FC1AF18u, SCPH1001_func_1FC1AE68_cont_BFC1AF18 }, - { 0x1FC1AF28u, SCPH1001_func_1FC1AE68_cont_BFC1AF28 }, - { 0x1FC1AF3Cu, SCPH1001_func_1FC1AE68_cont_BFC1AF3C }, - { 0x1FC1AF44u, SCPH1001_func_1FC1AE68_cont_BFC1AF44 }, - { 0x1FC1AF4Cu, SCPH1001_func_1FC1AE68_cont_BFC1AF4C }, - { 0x1FC1AF50u, SCPH1001_func_1FC1AE68_cont_BFC1AF50 }, - { 0x1FC1AF64u, SCPH1001_func_1FC1AE68_cont_BFC1AF64 }, - { 0x1FC1AF90u, SCPH1001_func_1FC1AE68_cont_BFC1AF90 }, - { 0x1FC1AFA0u, SCPH1001_func_1FC1AE68_cont_BFC1AFA0 }, - { 0x1FC1AFB8u, SCPH1001_func_1FC1AE68_cont_BFC1AFB8 }, - { 0x1FC1AFCCu, SCPH1001_func_1FC1AE68_cont_BFC1AFCC }, - { 0x1FC1AFDCu, SCPH1001_func_1FC1AE68_cont_BFC1AFDC }, - { 0x1FC1AFE0u, SCPH1001_func_1FC1AE68_cont_BFC1AFE0 }, - { 0x1FC1AFE8u, SCPH1001_func_1FC1AE68_cont_BFC1AFE8 }, - { 0x1FC1B010u, SCPH1001_func_1FC1AE68_cont_BFC1B010 }, - { 0x1FC1B01Cu, SCPH1001_func_1FC1AE68_cont_BFC1B01C }, - { 0x1FC1B054u, SCPH1001_func_1FC1AE68_cont_BFC1B054 }, - { 0x1FC1B06Cu, SCPH1001_func_1FC1AE68_cont_BFC1B06C }, - { 0x1FC1B078u, SCPH1001_func_1FC1AE68_cont_BFC1B078 }, - { 0x1FC1B08Cu, SCPH1001_func_1FC1AE68_cont_BFC1B08C }, - { 0x1FC1B0A0u, SCPH1001_func_1FC1AE68_cont_BFC1B0A0 }, - { 0x1FC1B0A8u, SCPH1001_func_1FC1AE68_cont_BFC1B0A8 }, - { 0x1FC1B0B0u, SCPH1001_func_1FC1AE68_cont_BFC1B0B0 }, - { 0x1FC1B0B8u, SCPH1001_func_1FC1AE68_cont_BFC1B0B8 }, - { 0x1FC1B0C8u, SCPH1001_func_1FC1AE68_cont_BFC1B0C8 }, - { 0x1FC1B0CCu, SCPH1001_func_1FC1AE68_cont_BFC1B0CC }, - { 0x1FC1B0D4u, SCPH1001_func_1FC1AE68_cont_BFC1B0D4 }, - { 0x1FC1B0E4u, SCPH1001_func_1FC1AE68_cont_BFC1B0E4 }, - { 0x1FC1B100u, SCPH1001_func_1FC1AE68_cont_BFC1B100 }, - { 0x1FC1B110u, SCPH1001_func_1FC1AE68_cont_BFC1B110 }, - { 0x1FC1B11Cu, SCPH1001_func_1FC1AE68_cont_BFC1B11C }, - { 0x1FC1B120u, SCPH1001_func_1FC1AE68_cont_BFC1B120 }, - { 0x1FC1B128u, SCPH1001_func_1FC1AE68_cont_BFC1B128 }, - { 0x1FC1B130u, SCPH1001_func_1FC1AE68_cont_BFC1B130 }, - { 0x1FC1B140u, SCPH1001_func_1FC1AE68_cont_BFC1B140 }, - { 0x1FC1B150u, SCPH1001_func_1FC1AE68_cont_BFC1B150 }, - { 0x1FC1B174u, SCPH1001_func_1FC1AE68_cont_BFC1B174 }, - { 0x1FC1B17Cu, SCPH1001_func_1FC1AE68_cont_BFC1B17C }, - { 0x1FC1B190u, SCPH1001_func_1FC1AE68_cont_BFC1B190 }, - { 0x1FC1B1A4u, SCPH1001_func_1FC1AE68_cont_BFC1B1A4 }, - { 0x1FC1B1ACu, SCPH1001_func_1FC1AE68_cont_BFC1B1AC }, - { 0x1FC1B1B4u, SCPH1001_func_1FC1AE68_cont_BFC1B1B4 }, - { 0x1FC1B1DCu, SCPH1001_func_1FC1AE68_cont_BFC1B1DC }, - { 0x1FC1B1F4u, SCPH1001_func_1FC1AE68_cont_BFC1B1F4 }, - { 0x1FC1B200u, SCPH1001_func_1FC1AE68_cont_BFC1B200 }, - { 0x1FC1B220u, SCPH1001_func_1FC1AE68_cont_BFC1B220 }, - { 0x1FC1B228u, SCPH1001_func_1FC1AE68_cont_BFC1B228 }, - { 0x1FC1B23Cu, SCPH1001_func_1FC1AE68_cont_BFC1B23C }, - { 0x1FC1B244u, SCPH1001_func_1FC1AE68_cont_BFC1B244 }, - { 0x1FC1B24Cu, SCPH1001_func_1FC1AE68_cont_BFC1B24C }, - { 0x1FC1B260u, SCPH1001_func_1FC1AE68_cont_BFC1B260 }, - { 0x1FC1B270u, SCPH1001_func_1FC1AE68_cont_BFC1B270 }, - { 0x1FC1B274u, SCPH1001_func_1FC1AE68_cont_BFC1B274 }, - { 0x1FC1B280u, SCPH1001_func_1FC1AE68_cont_BFC1B280 }, - { 0x1FC1B294u, SCPH1001_func_1FC1AE68_cont_BFC1B294 }, - { 0x1FC1B2A0u, SCPH1001_func_1FC1AE68_cont_BFC1B2A0 }, - { 0x1FC1B2ACu, SCPH1001_func_1FC1AE68_cont_BFC1B2AC }, - { 0x1FC1B2B0u, SCPH1001_func_1FC1AE68_cont_BFC1B2B0 }, - { 0x1FC1B2B8u, SCPH1001_func_1FC1AE68_cont_BFC1B2B8 }, - { 0x1FC1B2C8u, SCPH1001_func_1FC1AE68_cont_BFC1B2C8 }, - { 0x1FC1B2E4u, SCPH1001_func_1FC1AE68_cont_BFC1B2E4 }, - { 0x1FC1B2E8u, SCPH1001_func_1FC1AE68_cont_BFC1B2E8 }, - { 0x1FC1B2F0u, SCPH1001_func_1FC1AE68_cont_BFC1B2F0 }, - { 0x1FC1B308u, SCPH1001_func_1FC1AE68_cont_BFC1B308 }, - { 0x1FC1B31Cu, SCPH1001_func_1FC1AE68_cont_BFC1B31C }, - { 0x1FC1B324u, SCPH1001_func_1FC1AE68_cont_BFC1B324 }, - { 0x1FC1B328u, SCPH1001_func_1FC1AE68_cont_BFC1B328 }, - { 0x1FC1B33Cu, SCPH1001_func_1FC1AE68_cont_BFC1B33C }, - { 0x1FC1B344u, SCPH1001_func_1FC1AE68_cont_BFC1B344 }, - { 0x1FC1B358u, SCPH1001_func_1FC1AE68_cont_BFC1B358 }, - { 0x1FC1B36Cu, SCPH1001_func_1FC1AE68_cont_BFC1B36C }, - { 0x1FC1B378u, SCPH1001_func_1FC1AE68_cont_BFC1B378 }, - { 0x1FC1B3B4u, SCPH1001_func_1FC1AE68_cont_BFC1B3B4 }, - { 0x1FC1B3C8u, SCPH1001_func_1FC1AE68_cont_BFC1B3C8 }, - { 0x1FC1B3D0u, SCPH1001_func_1FC1AE68_cont_BFC1B3D0 }, - { 0x1FC1B3D4u, SCPH1001_func_1FC1AE68_cont_BFC1B3D4 }, - { 0x1FC1B3E8u, SCPH1001_func_1FC1AE68_cont_BFC1B3E8 }, - { 0x1FC1B3F0u, SCPH1001_func_1FC1AE68_cont_BFC1B3F0 }, - { 0x1FC1B3FCu, SCPH1001_func_1FC1AE68_cont_BFC1B3FC }, - { 0x1FC1B410u, SCPH1001_func_1FC1AE68_cont_BFC1B410 }, - { 0x1FC1B428u, SCPH1001_func_1FC1AE68_cont_BFC1B428 }, - { 0x1FC1B43Cu, SCPH1001_func_1FC1AE68_cont_BFC1B43C }, - { 0x1FC1B460u, SCPH1001_func_1FC1AE68_cont_BFC1B460 }, - { 0x1FC1B468u, SCPH1001_func_1FC1AE68_cont_BFC1B468 }, - { 0x1FC1B474u, SCPH1001_func_1FC1AE68_cont_BFC1B474 }, - { 0x1FC1B47Cu, SCPH1001_func_1FC1AE68_cont_BFC1B47C }, - { 0x1FC1B488u, SCPH1001_func_1FC1AE68_cont_BFC1B488 }, - { 0x1FC1B494u, SCPH1001_func_1FC1AE68_cont_BFC1B494 }, - { 0x1FC1B4A4u, SCPH1001_func_1FC1AE68_cont_BFC1B4A4 }, - { 0x1FC1B4BCu, SCPH1001_func_1FC1AE68_cont_BFC1B4BC }, - { 0x1FC1B4C4u, SCPH1001_func_1FC1AE68_cont_BFC1B4C4 }, - { 0x1FC1B4D0u, SCPH1001_func_1FC1AE68_cont_BFC1B4D0 }, - { 0x1FC1B4E8u, SCPH1001_func_1FC1AE68_cont_BFC1B4E8 }, - { 0x1FC1B4F4u, SCPH1001_func_1FC1AE68_cont_BFC1B4F4 }, - { 0x1FC1B508u, SCPH1001_func_1FC1AE68_cont_BFC1B508 }, - { 0x1FC1B528u, SCPH1001_func_1FC1AE68_cont_BFC1B528 }, - { 0x1FC1B538u, SCPH1001_func_1FC1AE68_cont_BFC1B538 }, - { 0x1FC1B54Cu, SCPH1001_func_1FC1AE68_cont_BFC1B54C }, - { 0x1FC1B560u, SCPH1001_func_1FC1AE68_cont_BFC1B560 }, - { 0x1FC1B56Cu, SCPH1001_func_1FC1AE68_cont_BFC1B56C }, - { 0x1FC1B58Cu, SCPH1001_func_1FC1AE68_cont_BFC1B58C }, - { 0x1FC1B59Cu, SCPH1001_func_1FC1AE68_cont_BFC1B59C }, - { 0x1FC1B5A4u, SCPH1001_func_1FC1AE68_cont_BFC1B5A4 }, - { 0x1FC1B5BCu, SCPH1001_func_1FC1AE68_cont_BFC1B5BC }, - { 0x1FC1B5C0u, SCPH1001_func_1FC1AE68_cont_BFC1B5C0 }, - { 0x1FC1B5C8u, SCPH1001_func_1FC1AE68_cont_BFC1B5C8 }, - { 0x1FC1B5E0u, SCPH1001_func_1FC1AE68_cont_BFC1B5E0 }, - { 0x1FC1B5ECu, SCPH1001_func_1FC1AE68_cont_BFC1B5EC }, - { 0x1FC1B5FCu, SCPH1001_func_1FC1AE68_cont_BFC1B5FC }, - { 0x1FC1B604u, SCPH1001_func_1FC1AE68_cont_BFC1B604 }, - { 0x1FC1B610u, SCPH1001_func_1FC1AE68_cont_BFC1B610 }, - { 0x1FC1B618u, SCPH1001_func_1FC1AE68_cont_BFC1B618 }, - { 0x1FC1B624u, SCPH1001_func_1FC1AE68_cont_BFC1B624 }, - { 0x1FC1B62Cu, SCPH1001_func_1FC1AE68_cont_BFC1B62C }, - { 0x1FC1B654u, SCPH1001_func_1FC1AE68_cont_BFC1B654 }, - { 0x1FC1B65Cu, SCPH1001_func_1FC1AE68_cont_BFC1B65C }, - { 0x1FC1B664u, SCPH1001_func_1FC1AE68_cont_BFC1B664 }, - { 0x1FC1B670u, SCPH1001_func_1FC1AE68_cont_BFC1B670 }, - { 0x1FC1B680u, SCPH1001_func_1FC1AE68_cont_BFC1B680 }, - { 0x1FC1B688u, SCPH1001_func_1FC1AE68_cont_BFC1B688 }, - { 0x1FC1B690u, SCPH1001_func_1FC1AE68_cont_BFC1B690 }, - { 0x1FC1B698u, SCPH1001_func_1FC1AE68_cont_BFC1B698 }, - { 0x1FC1B6A4u, SCPH1001_func_1FC1AE68_cont_BFC1B6A4 }, - { 0x1FC1B6B4u, SCPH1001_func_1FC1AE68_cont_BFC1B6B4 }, - { 0x1FC1B6BCu, SCPH1001_func_1FC1AE68_cont_BFC1B6BC }, - { 0x1FC1B6C8u, SCPH1001_func_1FC1AE68_cont_BFC1B6C8 }, - { 0x1FC1B6D0u, SCPH1001_func_1FC1AE68_cont_BFC1B6D0 }, - { 0x1FC1B6DCu, SCPH1001_func_1FC1AE68_cont_BFC1B6DC }, - { 0x1FC1B6E0u, SCPH1001_func_1FC1AE68_cont_BFC1B6E0 }, - { 0x1FC1B6ECu, SCPH1001_func_1FC1B6EC }, - { 0x1FC1B704u, SCPH1001_func_1FC1B6EC_cont_BFC1B704 }, - { 0x1FC1B718u, SCPH1001_func_1FC1B6EC_cont_BFC1B718 }, - { 0x1FC1B738u, SCPH1001_func_1FC1B6EC_cont_BFC1B738 }, - { 0x1FC1B748u, SCPH1001_func_1FC1B6EC_cont_BFC1B748 }, - { 0x1FC1B764u, SCPH1001_func_1FC1B6EC_cont_BFC1B764 }, - { 0x1FC1B774u, SCPH1001_func_1FC1B6EC_cont_BFC1B774 }, - { 0x1FC1B778u, SCPH1001_func_1FC1B6EC_cont_BFC1B778 }, - { 0x1FC1B784u, SCPH1001_func_1FC1B784 }, - { 0x1FC1B7E0u, SCPH1001_func_1FC1B7E0 }, - { 0x1FC1B7F8u, SCPH1001_func_1FC1B7E0_cont_BFC1B7F8 }, - { 0x1FC1B80Cu, SCPH1001_func_1FC1B7E0_cont_BFC1B80C }, - { 0x1FC1B820u, SCPH1001_func_1FC1B7E0_cont_BFC1B820 }, - { 0x1FC1B82Cu, SCPH1001_func_1FC1B7E0_cont_BFC1B82C }, - { 0x1FC1B834u, SCPH1001_func_1FC1B7E0_cont_BFC1B834 }, - { 0x1FC1B848u, SCPH1001_func_1FC1B7E0_cont_BFC1B848 }, - { 0x1FC1B85Cu, SCPH1001_func_1FC1B7E0_cont_BFC1B85C }, - { 0x1FC1B868u, SCPH1001_func_1FC1B7E0_cont_BFC1B868 }, - { 0x1FC1B870u, SCPH1001_func_1FC1B7E0_cont_BFC1B870 }, - { 0x1FC1B88Cu, SCPH1001_func_1FC1B7E0_cont_BFC1B88C }, - { 0x1FC1B8A8u, SCPH1001_func_1FC1B7E0_cont_BFC1B8A8 }, - { 0x1FC1B8ACu, SCPH1001_func_1FC1B7E0_cont_BFC1B8AC }, - { 0x1FC1B8B4u, SCPH1001_func_1FC1B7E0_cont_BFC1B8B4 }, - { 0x1FC1B8D0u, SCPH1001_func_1FC1B7E0_cont_BFC1B8D0 }, - { 0x1FC1B8D8u, SCPH1001_func_1FC1B7E0_cont_BFC1B8D8 }, - { 0x1FC1B8E4u, SCPH1001_func_1FC1B7E0_cont_BFC1B8E4 }, - { 0x1FC1B8F0u, SCPH1001_func_1FC1B7E0_cont_BFC1B8F0 }, - { 0x1FC1B900u, SCPH1001_func_1FC1B7E0_cont_BFC1B900 }, - { 0x1FC1B90Cu, SCPH1001_func_1FC1B7E0_cont_BFC1B90C }, - { 0x1FC1B918u, SCPH1001_func_1FC1B7E0_cont_BFC1B918 }, - { 0x1FC1B928u, SCPH1001_func_1FC1B7E0_cont_BFC1B928 }, - { 0x1FC1B934u, SCPH1001_func_1FC1B7E0_cont_BFC1B934 }, - { 0x1FC1B940u, SCPH1001_func_1FC1B7E0_cont_BFC1B940 }, - { 0x1FC1B950u, SCPH1001_func_1FC1B7E0_cont_BFC1B950 }, - { 0x1FC1B958u, SCPH1001_func_1FC1B7E0_cont_BFC1B958 }, - { 0x1FC1B960u, SCPH1001_func_1FC1B7E0_cont_BFC1B960 }, - { 0x1FC1B968u, SCPH1001_func_1FC1B7E0_cont_BFC1B968 }, - { 0x1FC1B9B4u, SCPH1001_func_1FC1B7E0_cont_BFC1B9B4 }, - { 0x1FC1B9C8u, SCPH1001_func_1FC1B7E0_cont_BFC1B9C8 }, - { 0x1FC1B9D8u, SCPH1001_func_1FC1B7E0_cont_BFC1B9D8 }, - { 0x1FC1B9ECu, SCPH1001_func_1FC1B7E0_cont_BFC1B9EC }, - { 0x1FC1BA04u, SCPH1001_func_1FC1B7E0_cont_BFC1BA04 }, - { 0x1FC1BA0Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BA0C }, - { 0x1FC1BA18u, SCPH1001_func_1FC1B7E0_cont_BFC1BA18 }, - { 0x1FC1BA20u, SCPH1001_func_1FC1B7E0_cont_BFC1BA20 }, - { 0x1FC1BA28u, SCPH1001_func_1FC1B7E0_cont_BFC1BA28 }, - { 0x1FC1BA34u, SCPH1001_func_1FC1B7E0_cont_BFC1BA34 }, - { 0x1FC1BA48u, SCPH1001_func_1FC1B7E0_cont_BFC1BA48 }, - { 0x1FC1BA4Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BA4C }, - { 0x1FC1BA58u, SCPH1001_func_1FC1B7E0_cont_BFC1BA58 }, - { 0x1FC1BA60u, SCPH1001_func_1FC1B7E0_cont_BFC1BA60 }, - { 0x1FC1BA68u, SCPH1001_func_1FC1B7E0_cont_BFC1BA68 }, - { 0x1FC1BA7Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BA7C }, - { 0x1FC1BA90u, SCPH1001_func_1FC1B7E0_cont_BFC1BA90 }, - { 0x1FC1BAE8u, SCPH1001_func_1FC1B7E0_cont_BFC1BAE8 }, - { 0x1FC1BAF4u, SCPH1001_func_1FC1B7E0_cont_BFC1BAF4 }, - { 0x1FC1BB0Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BB0C }, - { 0x1FC1BB10u, SCPH1001_func_1FC1B7E0_cont_BFC1BB10 }, - { 0x1FC1BB18u, SCPH1001_func_1FC1B7E0_cont_BFC1BB18 }, - { 0x1FC1BB20u, SCPH1001_func_1FC1B7E0_cont_BFC1BB20 }, - { 0x1FC1BB2Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BB2C }, - { 0x1FC1BB44u, SCPH1001_func_1FC1B7E0_cont_BFC1BB44 }, - { 0x1FC1BB5Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BB5C }, - { 0x1FC1BB60u, SCPH1001_func_1FC1B7E0_cont_BFC1BB60 }, - { 0x1FC1BB68u, SCPH1001_func_1FC1B7E0_cont_BFC1BB68 }, - { 0x1FC1BB74u, SCPH1001_func_1FC1B7E0_cont_BFC1BB74 }, - { 0x1FC1BB7Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BB7C }, - { 0x1FC1BB88u, SCPH1001_func_1FC1B7E0_cont_BFC1BB88 }, - { 0x1FC1BBA0u, SCPH1001_func_1FC1B7E0_cont_BFC1BBA0 }, - { 0x1FC1BBB8u, SCPH1001_func_1FC1B7E0_cont_BFC1BBB8 }, - { 0x1FC1BBC4u, SCPH1001_func_1FC1B7E0_cont_BFC1BBC4 }, - { 0x1FC1BBD0u, SCPH1001_func_1FC1B7E0_cont_BFC1BBD0 }, - { 0x1FC1BBE8u, SCPH1001_func_1FC1B7E0_cont_BFC1BBE8 }, - { 0x1FC1BBF0u, SCPH1001_func_1FC1B7E0_cont_BFC1BBF0 }, - { 0x1FC1BC0Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BC0C }, - { 0x1FC1BC10u, SCPH1001_func_1FC1B7E0_cont_BFC1BC10 }, - { 0x1FC1BC18u, SCPH1001_func_1FC1B7E0_cont_BFC1BC18 }, - { 0x1FC1BC20u, SCPH1001_func_1FC1B7E0_cont_BFC1BC20 }, - { 0x1FC1BC2Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BC2C }, - { 0x1FC1BC3Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BC3C }, - { 0x1FC1BC50u, SCPH1001_func_1FC1B7E0_cont_BFC1BC50 }, - { 0x1FC1BC60u, SCPH1001_func_1FC1B7E0_cont_BFC1BC60 }, - { 0x1FC1BC68u, SCPH1001_func_1FC1B7E0_cont_BFC1BC68 }, - { 0x1FC1BC74u, SCPH1001_func_1FC1B7E0_cont_BFC1BC74 }, - { 0x1FC1BC90u, SCPH1001_func_1FC1B7E0_cont_BFC1BC90 }, - { 0x1FC1BC98u, SCPH1001_func_1FC1B7E0_cont_BFC1BC98 }, - { 0x1FC1BCA4u, SCPH1001_func_1FC1B7E0_cont_BFC1BCA4 }, - { 0x1FC1BCC0u, SCPH1001_func_1FC1B7E0_cont_BFC1BCC0 }, - { 0x1FC1BCD8u, SCPH1001_func_1FC1B7E0_cont_BFC1BCD8 }, - { 0x1FC1BCE8u, SCPH1001_func_1FC1B7E0_cont_BFC1BCE8 }, - { 0x1FC1BCF4u, SCPH1001_func_1FC1B7E0_cont_BFC1BCF4 }, - { 0x1FC1BD0Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BD0C }, - { 0x1FC1BD18u, SCPH1001_func_1FC1B7E0_cont_BFC1BD18 }, - { 0x1FC1BD1Cu, SCPH1001_func_1FC1B7E0_cont_BFC1BD1C }, - { 0x1FC1BD20u, SCPH1001_func_1FC1B7E0_cont_BFC1BD20 }, - { 0x1FC1BD3Cu, SCPH1001_func_1FC1BD3C }, - { 0x1FC1BD58u, SCPH1001_func_1FC1BD58 }, - { 0x1FC1BD68u, SCPH1001_func_1FC1BD68 }, - { 0x1FC1BD80u, SCPH1001_func_1FC1BD68_cont_BFC1BD80 }, - { 0x1FC1BD98u, SCPH1001_func_1FC1BD68_cont_BFC1BD98 }, - { 0x1FC1BDACu, SCPH1001_func_1FC1BD68_cont_BFC1BDAC }, - { 0x1FC1BDC0u, SCPH1001_func_1FC1BD68_cont_BFC1BDC0 }, - { 0x1FC1BDD4u, SCPH1001_func_1FC1BD68_cont_BFC1BDD4 }, - { 0x1FC1BDDCu, SCPH1001_func_1FC1BD68_cont_BFC1BDDC }, - { 0x1FC1BDF8u, SCPH1001_func_1FC1BD68_cont_BFC1BDF8 }, - { 0x1FC1BE14u, SCPH1001_func_1FC1BD68_cont_BFC1BE14 }, - { 0x1FC1BE1Cu, SCPH1001_func_1FC1BD68_cont_BFC1BE1C }, - { 0x1FC1BE24u, SCPH1001_func_1FC1BD68_cont_BFC1BE24 }, - { 0x1FC1BE38u, SCPH1001_func_1FC1BD68_cont_BFC1BE38 }, - { 0x1FC1BE50u, SCPH1001_func_1FC1BD68_cont_BFC1BE50 }, - { 0x1FC1BE64u, SCPH1001_func_1FC1BD68_cont_BFC1BE64 }, - { 0x1FC1BE6Cu, SCPH1001_func_1FC1BD68_cont_BFC1BE6C }, - { 0x1FC1BE78u, SCPH1001_func_1FC1BD68_cont_BFC1BE78 }, - { 0x1FC1BE80u, SCPH1001_func_1FC1BD68_cont_BFC1BE80 }, - { 0x1FC1BE88u, SCPH1001_func_1FC1BD68_cont_BFC1BE88 }, - { 0x1FC1BE90u, SCPH1001_func_1FC1BD68_cont_BFC1BE90 }, - { 0x1FC1BE98u, SCPH1001_func_1FC1BD68_cont_BFC1BE98 }, - { 0x1FC1BEA4u, SCPH1001_func_1FC1BD68_cont_BFC1BEA4 }, - { 0x1FC1BEB0u, SCPH1001_func_1FC1BD68_cont_BFC1BEB0 }, - { 0x1FC1BEB8u, SCPH1001_func_1FC1BD68_cont_BFC1BEB8 }, - { 0x1FC1BEC0u, SCPH1001_func_1FC1BD68_cont_BFC1BEC0 }, - { 0x1FC1BEC8u, SCPH1001_func_1FC1BD68_cont_BFC1BEC8 }, - { 0x1FC1BED0u, SCPH1001_func_1FC1BD68_cont_BFC1BED0 }, - { 0x1FC1BED4u, SCPH1001_func_1FC1BD68_cont_BFC1BED4 }, - { 0x1FC1BEE0u, SCPH1001_func_1FC1BEE0 }, - { 0x1FC1BEF4u, SCPH1001_func_1FC1BEE0_cont_BFC1BEF4 }, - { 0x1FC1BF08u, SCPH1001_func_1FC1BEE0_cont_BFC1BF08 }, - { 0x1FC1BF1Cu, SCPH1001_func_1FC1BEE0_cont_BFC1BF1C }, - { 0x1FC1BF2Cu, SCPH1001_func_1FC1BEE0_cont_BFC1BF2C }, - { 0x1FC1BF34u, SCPH1001_func_1FC1BEE0_cont_BFC1BF34 }, - { 0x1FC1BF38u, SCPH1001_func_1FC1BEE0_cont_BFC1BF38 }, - { 0x1FC1BF44u, SCPH1001_func_1FC1BF44 }, - { 0x1FC1BF64u, SCPH1001_func_1FC1BF44_cont_BFC1BF64 }, - { 0x1FC1BF80u, SCPH1001_func_1FC1BF44_cont_BFC1BF80 }, - { 0x1FC1BF90u, SCPH1001_func_1FC1BF44_cont_BFC1BF90 }, - { 0x1FC1BFC8u, SCPH1001_func_1FC1BF44_cont_BFC1BFC8 }, - { 0x1FC1BFD4u, SCPH1001_func_1FC1BF44_cont_BFC1BFD4 }, - { 0x1FC1BFE4u, SCPH1001_func_1FC1BF44_cont_BFC1BFE4 }, - { 0x1FC1BFECu, SCPH1001_func_1FC1BF44_cont_BFC1BFEC }, - { 0x1FC1BFF8u, SCPH1001_func_1FC1BF44_cont_BFC1BFF8 }, - { 0x1FC1C010u, SCPH1001_func_1FC1BF44_cont_BFC1C010 }, - { 0x1FC1C018u, SCPH1001_func_1FC1BF44_cont_BFC1C018 }, - { 0x1FC1C030u, SCPH1001_func_1FC1BF44_cont_BFC1C030 }, - { 0x1FC1C03Cu, SCPH1001_func_1FC1BF44_cont_BFC1C03C }, - { 0x1FC1C048u, SCPH1001_func_1FC1BF44_cont_BFC1C048 }, - { 0x1FC1C054u, SCPH1001_func_1FC1BF44_cont_BFC1C054 }, - { 0x1FC1C05Cu, SCPH1001_func_1FC1BF44_cont_BFC1C05C }, - { 0x1FC1C068u, SCPH1001_func_1FC1BF44_cont_BFC1C068 }, - { 0x1FC1C070u, SCPH1001_func_1FC1BF44_cont_BFC1C070 }, - { 0x1FC1C07Cu, SCPH1001_func_1FC1BF44_cont_BFC1C07C }, - { 0x1FC1C094u, SCPH1001_func_1FC1BF44_cont_BFC1C094 }, - { 0x1FC1C09Cu, SCPH1001_func_1FC1BF44_cont_BFC1C09C }, - { 0x1FC1C0B0u, SCPH1001_func_1FC1BF44_cont_BFC1C0B0 }, - { 0x1FC1C0B8u, SCPH1001_func_1FC1BF44_cont_BFC1C0B8 }, - { 0x1FC1C0D0u, SCPH1001_func_1FC1BF44_cont_BFC1C0D0 }, - { 0x1FC1C0D8u, SCPH1001_func_1FC1BF44_cont_BFC1C0D8 }, - { 0x1FC1C0ECu, SCPH1001_func_1FC1BF44_cont_BFC1C0EC }, - { 0x1FC1C104u, SCPH1001_func_1FC1BF44_cont_BFC1C104 }, - { 0x1FC1C10Cu, SCPH1001_func_1FC1BF44_cont_BFC1C10C }, - { 0x1FC1C114u, SCPH1001_func_1FC1BF44_cont_BFC1C114 }, - { 0x1FC1C11Cu, SCPH1001_func_1FC1BF44_cont_BFC1C11C }, - { 0x1FC1C130u, SCPH1001_func_1FC1C130 }, - { 0x1FC1C154u, SCPH1001_func_1FC1C130_cont_BFC1C154 }, - { 0x1FC1C15Cu, SCPH1001_func_1FC1C130_cont_BFC1C15C }, - { 0x1FC1C170u, SCPH1001_func_1FC1C130_cont_BFC1C170 }, - { 0x1FC1C174u, SCPH1001_func_1FC1C130_cont_BFC1C174 }, - { 0x1FC1C188u, SCPH1001_func_1FC1C130_cont_BFC1C188 }, - { 0x1FC1C18Cu, SCPH1001_func_1FC1C130_cont_BFC1C18C }, - { 0x1FC1C194u, SCPH1001_func_1FC1C130_cont_BFC1C194 }, - { 0x1FC1C1A4u, SCPH1001_func_1FC1C1A4 }, - { 0x1FC1C1C8u, SCPH1001_func_1FC1C1A4_cont_BFC1C1C8 }, - { 0x1FC1C1D4u, SCPH1001_func_1FC1C1A4_cont_BFC1C1D4 }, - { 0x1FC1C1E4u, SCPH1001_func_1FC1C1A4_cont_BFC1C1E4 }, - { 0x1FC1C1ECu, SCPH1001_func_1FC1C1A4_cont_BFC1C1EC }, - { 0x1FC1C1F8u, SCPH1001_func_1FC1C1A4_cont_BFC1C1F8 }, - { 0x1FC1C210u, SCPH1001_func_1FC1C1A4_cont_BFC1C210 }, - { 0x1FC1C218u, SCPH1001_func_1FC1C1A4_cont_BFC1C218 }, - { 0x1FC1C230u, SCPH1001_func_1FC1C1A4_cont_BFC1C230 }, - { 0x1FC1C244u, SCPH1001_func_1FC1C1A4_cont_BFC1C244 }, - { 0x1FC1C250u, SCPH1001_func_1FC1C1A4_cont_BFC1C250 }, - { 0x1FC1C25Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C25C }, - { 0x1FC1C264u, SCPH1001_func_1FC1C1A4_cont_BFC1C264 }, - { 0x1FC1C270u, SCPH1001_func_1FC1C1A4_cont_BFC1C270 }, - { 0x1FC1C27Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C27C }, - { 0x1FC1C28Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C28C }, - { 0x1FC1C294u, SCPH1001_func_1FC1C1A4_cont_BFC1C294 }, - { 0x1FC1C29Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C29C }, - { 0x1FC1C2A8u, SCPH1001_func_1FC1C1A4_cont_BFC1C2A8 }, - { 0x1FC1C2CCu, SCPH1001_func_1FC1C1A4_cont_BFC1C2CC }, - { 0x1FC1C2D0u, SCPH1001_func_1FC1C1A4_cont_BFC1C2D0 }, - { 0x1FC1C2D8u, SCPH1001_func_1FC1C1A4_cont_BFC1C2D8 }, - { 0x1FC1C308u, SCPH1001_func_1FC1C1A4_cont_BFC1C308 }, - { 0x1FC1C30Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C30C }, - { 0x1FC1C31Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C31C }, - { 0x1FC1C338u, SCPH1001_func_1FC1C1A4_cont_BFC1C338 }, - { 0x1FC1C348u, SCPH1001_func_1FC1C1A4_cont_BFC1C348 }, - { 0x1FC1C34Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C34C }, - { 0x1FC1C36Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C36C }, - { 0x1FC1C370u, SCPH1001_func_1FC1C1A4_cont_BFC1C370 }, - { 0x1FC1C380u, SCPH1001_func_1FC1C1A4_cont_BFC1C380 }, - { 0x1FC1C3B0u, SCPH1001_func_1FC1C1A4_cont_BFC1C3B0 }, - { 0x1FC1C3C0u, SCPH1001_func_1FC1C1A4_cont_BFC1C3C0 }, - { 0x1FC1C3D4u, SCPH1001_func_1FC1C1A4_cont_BFC1C3D4 }, - { 0x1FC1C3D8u, SCPH1001_func_1FC1C1A4_cont_BFC1C3D8 }, - { 0x1FC1C3DCu, SCPH1001_func_1FC1C1A4_cont_BFC1C3DC }, - { 0x1FC1C3E4u, SCPH1001_func_1FC1C1A4_cont_BFC1C3E4 }, - { 0x1FC1C3F8u, SCPH1001_func_1FC1C1A4_cont_BFC1C3F8 }, - { 0x1FC1C408u, SCPH1001_func_1FC1C1A4_cont_BFC1C408 }, - { 0x1FC1C428u, SCPH1001_func_1FC1C1A4_cont_BFC1C428 }, - { 0x1FC1C42Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C42C }, - { 0x1FC1C438u, SCPH1001_func_1FC1C1A4_cont_BFC1C438 }, - { 0x1FC1C43Cu, SCPH1001_func_1FC1C1A4_cont_BFC1C43C }, - { 0x1FC1C448u, SCPH1001_func_1FC1C1A4_cont_BFC1C448 }, - { 0x1FC1C454u, SCPH1001_func_1FC1C1A4_cont_BFC1C454 }, - { 0x1FC1C460u, SCPH1001_func_1FC1C1A4_cont_BFC1C460 }, - { 0x1FC1C488u, SCPH1001_func_1FC1C1A4_cont_BFC1C488 }, - { 0x1FC1C4A0u, SCPH1001_func_1FC1C1A4_cont_BFC1C4A0 }, - { 0x1FC1C4A8u, SCPH1001_func_1FC1C1A4_cont_BFC1C4A8 }, - { 0x1FC1C4B0u, SCPH1001_func_1FC1C1A4_cont_BFC1C4B0 }, - { 0x1FC1C4C0u, SCPH1001_func_1FC1C4C0 }, - { 0x1FC1C4D8u, SCPH1001_func_1FC1C4C0_cont_BFC1C4D8 }, - { 0x1FC1C4ECu, SCPH1001_func_1FC1C4C0_cont_BFC1C4EC }, - { 0x1FC1C500u, SCPH1001_func_1FC1C4C0_cont_BFC1C500 }, - { 0x1FC1C508u, SCPH1001_func_1FC1C4C0_cont_BFC1C508 }, - { 0x1FC1C518u, SCPH1001_func_1FC1C4C0_cont_BFC1C518 }, - { 0x1FC1C520u, SCPH1001_func_1FC1C4C0_cont_BFC1C520 }, - { 0x1FC1C538u, SCPH1001_func_1FC1C4C0_cont_BFC1C538 }, - { 0x1FC1C540u, SCPH1001_func_1FC1C4C0_cont_BFC1C540 }, - { 0x1FC1C550u, SCPH1001_func_1FC1C4C0_cont_BFC1C550 }, - { 0x1FC1C558u, SCPH1001_func_1FC1C4C0_cont_BFC1C558 }, - { 0x1FC1C564u, SCPH1001_func_1FC1C4C0_cont_BFC1C564 }, - { 0x1FC1C578u, SCPH1001_func_1FC1C4C0_cont_BFC1C578 }, - { 0x1FC1C588u, SCPH1001_func_1FC1C4C0_cont_BFC1C588 }, - { 0x1FC1C58Cu, SCPH1001_func_1FC1C4C0_cont_BFC1C58C }, - { 0x1FC1C594u, SCPH1001_func_1FC1C4C0_cont_BFC1C594 }, - { 0x1FC1C598u, SCPH1001_func_1FC1C4C0_cont_BFC1C598 }, - { 0x1FC1C5A0u, SCPH1001_func_1FC1C4C0_cont_BFC1C5A0 }, - { 0x1FC1C5A8u, SCPH1001_func_1FC1C4C0_cont_BFC1C5A8 }, - { 0x1FC1C5ACu, SCPH1001_func_1FC1C4C0_cont_BFC1C5AC }, - { 0x1FC1C5B8u, SCPH1001_func_1FC1C5B8 }, - { 0x1FC1C5D8u, SCPH1001_func_1FC1C5B8_cont_BFC1C5D8 }, - { 0x1FC1C5E0u, SCPH1001_func_1FC1C5B8_cont_BFC1C5E0 }, - { 0x1FC1C5F4u, SCPH1001_func_1FC1C5B8_cont_BFC1C5F4 }, - { 0x1FC1C604u, SCPH1001_func_1FC1C5B8_cont_BFC1C604 }, - { 0x1FC1C618u, SCPH1001_func_1FC1C5B8_cont_BFC1C618 }, - { 0x1FC1C638u, SCPH1001_func_1FC1C5B8_cont_BFC1C638 }, - { 0x1FC1C64Cu, SCPH1001_func_1FC1C5B8_cont_BFC1C64C }, - { 0x1FC1C65Cu, SCPH1001_func_1FC1C5B8_cont_BFC1C65C }, - { 0x1FC1C660u, SCPH1001_func_1FC1C5B8_cont_BFC1C660 }, - { 0x1FC1C674u, SCPH1001_func_1FC1C5B8_cont_BFC1C674 }, - { 0x1FC1C694u, SCPH1001_func_1FC1C5B8_cont_BFC1C694 }, - { 0x1FC1C6ACu, SCPH1001_func_1FC1C5B8_cont_BFC1C6AC }, - { 0x1FC1C6C0u, SCPH1001_func_1FC1C5B8_cont_BFC1C6C0 }, - { 0x1FC1C6C8u, SCPH1001_func_1FC1C5B8_cont_BFC1C6C8 }, - { 0x1FC1C6D4u, SCPH1001_func_1FC1C5B8_cont_BFC1C6D4 }, - { 0x1FC1C6E8u, SCPH1001_func_1FC1C5B8_cont_BFC1C6E8 }, - { 0x1FC1C708u, SCPH1001_func_1FC1C5B8_cont_BFC1C708 }, - { 0x1FC1C70Cu, SCPH1001_func_1FC1C5B8_cont_BFC1C70C }, - { 0x1FC1C714u, SCPH1001_func_1FC1C5B8_cont_BFC1C714 }, - { 0x1FC1C720u, SCPH1001_func_1FC1C5B8_cont_BFC1C720 }, - { 0x1FC1C738u, SCPH1001_func_1FC1C5B8_cont_BFC1C738 }, - { 0x1FC1C73Cu, SCPH1001_func_1FC1C5B8_cont_BFC1C73C }, - { 0x1FC1C744u, SCPH1001_func_1FC1C5B8_cont_BFC1C744 }, - { 0x1FC1C770u, SCPH1001_func_1FC1C5B8_cont_BFC1C770 }, - { 0x1FC1C774u, SCPH1001_func_1FC1C5B8_cont_BFC1C774 }, - { 0x1FC1C77Cu, SCPH1001_func_1FC1C5B8_cont_BFC1C77C }, - { 0x1FC1C78Cu, SCPH1001_func_1FC1C78C }, - { 0x1FC1C7A4u, SCPH1001_func_1FC1C78C_cont_BFC1C7A4 }, - { 0x1FC1C7B0u, SCPH1001_func_1FC1C78C_cont_BFC1C7B0 }, - { 0x1FC1C7C0u, SCPH1001_func_1FC1C78C_cont_BFC1C7C0 }, - { 0x1FC1C7C8u, SCPH1001_func_1FC1C78C_cont_BFC1C7C8 }, - { 0x1FC1C7DCu, SCPH1001_func_1FC1C78C_cont_BFC1C7DC }, - { 0x1FC1C7F0u, SCPH1001_func_1FC1C78C_cont_BFC1C7F0 }, - { 0x1FC1C7FCu, SCPH1001_func_1FC1C78C_cont_BFC1C7FC }, - { 0x1FC1C808u, SCPH1001_func_1FC1C78C_cont_BFC1C808 }, - { 0x1FC1C818u, SCPH1001_func_1FC1C78C_cont_BFC1C818 }, - { 0x1FC1C81Cu, SCPH1001_func_1FC1C78C_cont_BFC1C81C }, - { 0x1FC1C824u, SCPH1001_func_1FC1C78C_cont_BFC1C824 }, - { 0x1FC1C830u, SCPH1001_func_1FC1C78C_cont_BFC1C830 }, - { 0x1FC1C838u, SCPH1001_func_1FC1C78C_cont_BFC1C838 }, - { 0x1FC1C840u, SCPH1001_func_1FC1C78C_cont_BFC1C840 }, - { 0x1FC1C854u, SCPH1001_func_1FC1C78C_cont_BFC1C854 }, - { 0x1FC1C868u, SCPH1001_func_1FC1C78C_cont_BFC1C868 }, - { 0x1FC1C870u, SCPH1001_func_1FC1C78C_cont_BFC1C870 }, - { 0x1FC1C874u, SCPH1001_func_1FC1C78C_cont_BFC1C874 }, - { 0x1FC1C87Cu, SCPH1001_func_1FC1C78C_cont_BFC1C87C }, - { 0x1FC1C888u, SCPH1001_func_1FC1C78C_cont_BFC1C888 }, - { 0x1FC1C890u, SCPH1001_func_1FC1C78C_cont_BFC1C890 }, - { 0x1FC1C8A8u, SCPH1001_func_1FC1C78C_cont_BFC1C8A8 }, - { 0x1FC1C8BCu, SCPH1001_func_1FC1C78C_cont_BFC1C8BC }, - { 0x1FC1C8C4u, SCPH1001_func_1FC1C78C_cont_BFC1C8C4 }, - { 0x1FC1C8C8u, SCPH1001_func_1FC1C78C_cont_BFC1C8C8 }, - { 0x1FC1C8D0u, SCPH1001_func_1FC1C78C_cont_BFC1C8D0 }, - { 0x1FC1C8DCu, SCPH1001_func_1FC1C78C_cont_BFC1C8DC }, - { 0x1FC1C8E0u, SCPH1001_func_1FC1C78C_cont_BFC1C8E0 }, - { 0x1FC1C8ECu, SCPH1001_func_1FC1C8EC }, - { 0x1FC1C904u, SCPH1001_func_1FC1C8EC_cont_BFC1C904 }, - { 0x1FC1C91Cu, SCPH1001_func_1FC1C8EC_cont_BFC1C91C }, - { 0x1FC1C934u, SCPH1001_func_1FC1C8EC_cont_BFC1C934 }, - { 0x1FC1C93Cu, SCPH1001_func_1FC1C8EC_cont_BFC1C93C }, - { 0x1FC1C96Cu, SCPH1001_func_1FC1C8EC_cont_BFC1C96C }, - { 0x1FC1C978u, SCPH1001_func_1FC1C978 }, - { 0x1FC1C988u, SCPH1001_func_1FC1C988 }, - { 0x1FC1C998u, SCPH1001_func_1FC1C998 }, - { 0x1FC1C9A8u, SCPH1001_func_1FC1C9A8 }, - { 0x1FC1C9B4u, SCPH1001_func_1FC1C9B4 }, - { 0x1FC1C9C8u, SCPH1001_func_1FC1C9B4_cont_BFC1C9C8 }, - { 0x1FC1C9DCu, SCPH1001_func_1FC1C9B4_cont_BFC1C9DC }, - { 0x1FC1C9F0u, SCPH1001_func_1FC1C9B4_cont_BFC1C9F0 }, - { 0x1FC1CA00u, SCPH1001_func_1FC1C9B4_cont_BFC1CA00 }, - { 0x1FC1CA14u, SCPH1001_func_1FC1C9B4_cont_BFC1CA14 }, - { 0x1FC1CA1Cu, SCPH1001_func_1FC1C9B4_cont_BFC1CA1C }, - { 0x1FC1CA24u, SCPH1001_func_1FC1C9B4_cont_BFC1CA24 }, - { 0x1FC1CA2Cu, SCPH1001_func_1FC1C9B4_cont_BFC1CA2C }, - { 0x1FC1CA34u, SCPH1001_func_1FC1C9B4_cont_BFC1CA34 }, - { 0x1FC1CA38u, SCPH1001_func_1FC1C9B4_cont_BFC1CA38 }, - { 0x1FC1CA48u, SCPH1001_func_1FC1C9B4_cont_BFC1CA48 }, - { 0x1FC1CA50u, SCPH1001_func_1FC1C9B4_cont_BFC1CA50 }, - { 0x1FC1CA58u, SCPH1001_func_1FC1C9B4_cont_BFC1CA58 }, - { 0x1FC1CA5Cu, SCPH1001_func_1FC1C9B4_cont_BFC1CA5C }, - { 0x1FC1CA6Cu, SCPH1001_func_1FC1C9B4_cont_BFC1CA6C }, - { 0x1FC1CA74u, SCPH1001_func_1FC1C9B4_cont_BFC1CA74 }, - { 0x1FC1CA7Cu, SCPH1001_func_1FC1C9B4_cont_BFC1CA7C }, - { 0x1FC1CA80u, SCPH1001_func_1FC1C9B4_cont_BFC1CA80 }, - { 0x1FC1CA90u, SCPH1001_func_1FC1C9B4_cont_BFC1CA90 }, - { 0x1FC1CA98u, SCPH1001_func_1FC1C9B4_cont_BFC1CA98 }, - { 0x1FC1CAA0u, SCPH1001_func_1FC1C9B4_cont_BFC1CAA0 }, - { 0x1FC1CAA4u, SCPH1001_func_1FC1C9B4_cont_BFC1CAA4 }, - { 0x1FC1CAB4u, SCPH1001_func_1FC1C9B4_cont_BFC1CAB4 }, - { 0x1FC1CABCu, SCPH1001_func_1FC1C9B4_cont_BFC1CABC }, - { 0x1FC1CAC4u, SCPH1001_func_1FC1C9B4_cont_BFC1CAC4 }, - { 0x1FC1CAC8u, SCPH1001_func_1FC1C9B4_cont_BFC1CAC8 }, - { 0x1FC1CAD8u, SCPH1001_func_1FC1C9B4_cont_BFC1CAD8 }, - { 0x1FC1CAE0u, SCPH1001_func_1FC1C9B4_cont_BFC1CAE0 }, - { 0x1FC1CAE4u, SCPH1001_func_1FC1C9B4_cont_BFC1CAE4 }, - { 0x1FC1CAF0u, SCPH1001_func_1FC1CAF0 }, - { 0x1FC1CB08u, SCPH1001_func_1FC1CAF0_cont_BFC1CB08 }, - { 0x1FC1CB2Cu, SCPH1001_func_1FC1CAF0_cont_BFC1CB2C }, - { 0x1FC1CB34u, SCPH1001_func_1FC1CAF0_cont_BFC1CB34 }, - { 0x1FC1CB3Cu, SCPH1001_func_1FC1CAF0_cont_BFC1CB3C }, - { 0x1FC1CB48u, SCPH1001_func_1FC1CAF0_cont_BFC1CB48 }, - { 0x1FC1CB54u, SCPH1001_func_1FC1CAF0_cont_BFC1CB54 }, - { 0x1FC1CB5Cu, SCPH1001_func_1FC1CAF0_cont_BFC1CB5C }, - { 0x1FC1CB68u, SCPH1001_func_1FC1CAF0_cont_BFC1CB68 }, - { 0x1FC1CB70u, SCPH1001_func_1FC1CAF0_cont_BFC1CB70 }, - { 0x1FC1CB7Cu, SCPH1001_func_1FC1CAF0_cont_BFC1CB7C }, - { 0x1FC1CB88u, SCPH1001_func_1FC1CAF0_cont_BFC1CB88 }, - { 0x1FC1CB90u, SCPH1001_func_1FC1CAF0_cont_BFC1CB90 }, - { 0x1FC1CB9Cu, SCPH1001_func_1FC1CAF0_cont_BFC1CB9C }, - { 0x1FC1CBACu, SCPH1001_func_1FC1CBAC }, - { 0x1FC1CBCCu, SCPH1001_func_1FC1CBAC_cont_BFC1CBCC }, - { 0x1FC1CBD8u, SCPH1001_func_1FC1CBAC_cont_BFC1CBD8 }, - { 0x1FC1CBE0u, SCPH1001_func_1FC1CBAC_cont_BFC1CBE0 }, - { 0x1FC1CBE4u, SCPH1001_func_1FC1CBAC_cont_BFC1CBE4 }, - { 0x1FC1CBF0u, SCPH1001_func_1FC1CBAC_cont_BFC1CBF0 }, - { 0x1FC1CBF4u, SCPH1001_func_1FC1CBAC_cont_BFC1CBF4 }, - { 0x1FC1CC3Cu, SCPH1001_func_1FC1CBAC_cont_BFC1CC3C }, - { 0x1FC1CC88u, SCPH1001_func_1FC1CBAC_cont_BFC1CC88 }, - { 0x1FC1CC90u, SCPH1001_func_1FC1CBAC_cont_BFC1CC90 }, - { 0x1FC1CCB0u, SCPH1001_func_1FC1CBAC_cont_BFC1CCB0 }, - { 0x1FC1CCB8u, SCPH1001_func_1FC1CBAC_cont_BFC1CCB8 }, - { 0x1FC1CCCCu, SCPH1001_func_1FC1CBAC_cont_BFC1CCCC }, - { 0x1FC1CCDCu, SCPH1001_func_1FC1CBAC_cont_BFC1CCDC }, - { 0x1FC1CCF0u, SCPH1001_func_1FC1CBAC_cont_BFC1CCF0 }, - { 0x1FC1CD00u, SCPH1001_func_1FC1CBAC_cont_BFC1CD00 }, - { 0x1FC1CD30u, SCPH1001_func_1FC1CBAC_cont_BFC1CD30 }, - { 0x1FC1CD40u, SCPH1001_func_1FC1CD40 }, - { 0x1FC1CD64u, SCPH1001_func_1FC1CD40_cont_BFC1CD64 }, - { 0x1FC1CD68u, SCPH1001_func_1FC1CD40_cont_BFC1CD68 }, - { 0x1FC1CD70u, SCPH1001_func_1FC1CD70 }, - { 0x1FC1CD80u, SCPH1001_func_1FC1CD80 }, - { 0x1FC1CD90u, SCPH1001_func_1FC1CD90 }, - { 0x1FC1CDD8u, SCPH1001_func_1FC1CDD8 }, - { 0x1FC1CDF0u, SCPH1001_func_1FC1CDD8_cont_BFC1CDF0 }, - { 0x1FC1CE04u, SCPH1001_func_1FC1CDD8_cont_BFC1CE04 }, - { 0x1FC1CE24u, SCPH1001_func_1FC1CDD8_cont_BFC1CE24 }, - { 0x1FC1CE3Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CE3C }, - { 0x1FC1CE58u, SCPH1001_func_1FC1CDD8_cont_BFC1CE58 }, - { 0x1FC1CE6Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CE6C }, - { 0x1FC1CE74u, SCPH1001_func_1FC1CDD8_cont_BFC1CE74 }, - { 0x1FC1CE7Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CE7C }, - { 0x1FC1CE84u, SCPH1001_func_1FC1CDD8_cont_BFC1CE84 }, - { 0x1FC1CE8Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CE8C }, - { 0x1FC1CEB0u, SCPH1001_func_1FC1CDD8_cont_BFC1CEB0 }, - { 0x1FC1CEC0u, SCPH1001_func_1FC1CDD8_cont_BFC1CEC0 }, - { 0x1FC1CED4u, SCPH1001_func_1FC1CDD8_cont_BFC1CED4 }, - { 0x1FC1CEE8u, SCPH1001_func_1FC1CDD8_cont_BFC1CEE8 }, - { 0x1FC1CEF0u, SCPH1001_func_1FC1CDD8_cont_BFC1CEF0 }, - { 0x1FC1CEF8u, SCPH1001_func_1FC1CDD8_cont_BFC1CEF8 }, - { 0x1FC1CF00u, SCPH1001_func_1FC1CDD8_cont_BFC1CF00 }, - { 0x1FC1CF08u, SCPH1001_func_1FC1CDD8_cont_BFC1CF08 }, - { 0x1FC1CF1Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CF1C }, - { 0x1FC1CF48u, SCPH1001_func_1FC1CDD8_cont_BFC1CF48 }, - { 0x1FC1CF50u, SCPH1001_func_1FC1CDD8_cont_BFC1CF50 }, - { 0x1FC1CF58u, SCPH1001_func_1FC1CDD8_cont_BFC1CF58 }, - { 0x1FC1CF6Cu, SCPH1001_func_1FC1CDD8_cont_BFC1CF6C }, - { 0x1FC1CFA8u, SCPH1001_func_1FC1CDD8_cont_BFC1CFA8 }, - { 0x1FC1CFBCu, SCPH1001_func_1FC1CDD8_cont_BFC1CFBC }, - { 0x1FC1CFC4u, SCPH1001_func_1FC1CDD8_cont_BFC1CFC4 }, - { 0x1FC1CFE4u, SCPH1001_func_1FC1CDD8_cont_BFC1CFE4 }, - { 0x1FC1CFF4u, SCPH1001_func_1FC1CDD8_cont_BFC1CFF4 }, - { 0x1FC1CFF8u, SCPH1001_func_1FC1CDD8_cont_BFC1CFF8 }, - { 0x1FC1D000u, SCPH1001_func_1FC1CDD8_cont_BFC1D000 }, - { 0x1FC1D028u, SCPH1001_func_1FC1CDD8_cont_BFC1D028 }, - { 0x1FC1D03Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D03C }, - { 0x1FC1D054u, SCPH1001_func_1FC1CDD8_cont_BFC1D054 }, - { 0x1FC1D068u, SCPH1001_func_1FC1CDD8_cont_BFC1D068 }, - { 0x1FC1D078u, SCPH1001_func_1FC1CDD8_cont_BFC1D078 }, - { 0x1FC1D090u, SCPH1001_func_1FC1CDD8_cont_BFC1D090 }, - { 0x1FC1D0A0u, SCPH1001_func_1FC1CDD8_cont_BFC1D0A0 }, - { 0x1FC1D0E4u, SCPH1001_func_1FC1CDD8_cont_BFC1D0E4 }, - { 0x1FC1D118u, SCPH1001_func_1FC1CDD8_cont_BFC1D118 }, - { 0x1FC1D130u, SCPH1001_func_1FC1CDD8_cont_BFC1D130 }, - { 0x1FC1D144u, SCPH1001_func_1FC1CDD8_cont_BFC1D144 }, - { 0x1FC1D154u, SCPH1001_func_1FC1CDD8_cont_BFC1D154 }, - { 0x1FC1D16Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D16C }, - { 0x1FC1D17Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D17C }, - { 0x1FC1D190u, SCPH1001_func_1FC1CDD8_cont_BFC1D190 }, - { 0x1FC1D1A4u, SCPH1001_func_1FC1CDD8_cont_BFC1D1A4 }, - { 0x1FC1D1A8u, SCPH1001_func_1FC1CDD8_cont_BFC1D1A8 }, - { 0x1FC1D1B0u, SCPH1001_func_1FC1CDD8_cont_BFC1D1B0 }, - { 0x1FC1D1ECu, SCPH1001_func_1FC1CDD8_cont_BFC1D1EC }, - { 0x1FC1D220u, SCPH1001_func_1FC1CDD8_cont_BFC1D220 }, - { 0x1FC1D234u, SCPH1001_func_1FC1CDD8_cont_BFC1D234 }, - { 0x1FC1D244u, SCPH1001_func_1FC1CDD8_cont_BFC1D244 }, - { 0x1FC1D260u, SCPH1001_func_1FC1CDD8_cont_BFC1D260 }, - { 0x1FC1D268u, SCPH1001_func_1FC1CDD8_cont_BFC1D268 }, - { 0x1FC1D288u, SCPH1001_func_1FC1CDD8_cont_BFC1D288 }, - { 0x1FC1D294u, SCPH1001_func_1FC1CDD8_cont_BFC1D294 }, - { 0x1FC1D2BCu, SCPH1001_func_1FC1CDD8_cont_BFC1D2BC }, - { 0x1FC1D2C8u, SCPH1001_func_1FC1CDD8_cont_BFC1D2C8 }, - { 0x1FC1D2DCu, SCPH1001_func_1FC1CDD8_cont_BFC1D2DC }, - { 0x1FC1D2F4u, SCPH1001_func_1FC1CDD8_cont_BFC1D2F4 }, - { 0x1FC1D304u, SCPH1001_func_1FC1CDD8_cont_BFC1D304 }, - { 0x1FC1D324u, SCPH1001_func_1FC1CDD8_cont_BFC1D324 }, - { 0x1FC1D348u, SCPH1001_func_1FC1CDD8_cont_BFC1D348 }, - { 0x1FC1D368u, SCPH1001_func_1FC1CDD8_cont_BFC1D368 }, - { 0x1FC1D384u, SCPH1001_func_1FC1CDD8_cont_BFC1D384 }, - { 0x1FC1D388u, SCPH1001_func_1FC1CDD8_cont_BFC1D388 }, - { 0x1FC1D39Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D39C }, - { 0x1FC1D3BCu, SCPH1001_func_1FC1CDD8_cont_BFC1D3BC }, - { 0x1FC1D3F4u, SCPH1001_func_1FC1CDD8_cont_BFC1D3F4 }, - { 0x1FC1D414u, SCPH1001_func_1FC1CDD8_cont_BFC1D414 }, - { 0x1FC1D42Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D42C }, - { 0x1FC1D44Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D44C }, - { 0x1FC1D454u, SCPH1001_func_1FC1CDD8_cont_BFC1D454 }, - { 0x1FC1D468u, SCPH1001_func_1FC1CDD8_cont_BFC1D468 }, - { 0x1FC1D470u, SCPH1001_func_1FC1CDD8_cont_BFC1D470 }, - { 0x1FC1D480u, SCPH1001_func_1FC1CDD8_cont_BFC1D480 }, - { 0x1FC1D4BCu, SCPH1001_func_1FC1CDD8_cont_BFC1D4BC }, - { 0x1FC1D4F4u, SCPH1001_func_1FC1CDD8_cont_BFC1D4F4 }, - { 0x1FC1D508u, SCPH1001_func_1FC1CDD8_cont_BFC1D508 }, - { 0x1FC1D514u, SCPH1001_func_1FC1CDD8_cont_BFC1D514 }, - { 0x1FC1D528u, SCPH1001_func_1FC1CDD8_cont_BFC1D528 }, - { 0x1FC1D53Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D53C }, - { 0x1FC1D550u, SCPH1001_func_1FC1CDD8_cont_BFC1D550 }, - { 0x1FC1D58Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D58C }, - { 0x1FC1D59Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D59C }, - { 0x1FC1D5D0u, SCPH1001_func_1FC1CDD8_cont_BFC1D5D0 }, - { 0x1FC1D5E0u, SCPH1001_func_1FC1CDD8_cont_BFC1D5E0 }, - { 0x1FC1D5F0u, SCPH1001_func_1FC1CDD8_cont_BFC1D5F0 }, - { 0x1FC1D608u, SCPH1001_func_1FC1CDD8_cont_BFC1D608 }, - { 0x1FC1D618u, SCPH1001_func_1FC1CDD8_cont_BFC1D618 }, - { 0x1FC1D61Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D61C }, - { 0x1FC1D628u, SCPH1001_func_1FC1CDD8_cont_BFC1D628 }, - { 0x1FC1D630u, SCPH1001_func_1FC1CDD8_cont_BFC1D630 }, - { 0x1FC1D638u, SCPH1001_func_1FC1CDD8_cont_BFC1D638 }, - { 0x1FC1D640u, SCPH1001_func_1FC1CDD8_cont_BFC1D640 }, - { 0x1FC1D664u, SCPH1001_func_1FC1CDD8_cont_BFC1D664 }, - { 0x1FC1D66Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D66C }, - { 0x1FC1D690u, SCPH1001_func_1FC1CDD8_cont_BFC1D690 }, - { 0x1FC1D6A8u, SCPH1001_func_1FC1CDD8_cont_BFC1D6A8 }, - { 0x1FC1D6B8u, SCPH1001_func_1FC1CDD8_cont_BFC1D6B8 }, - { 0x1FC1D6D8u, SCPH1001_func_1FC1CDD8_cont_BFC1D6D8 }, - { 0x1FC1D6ECu, SCPH1001_func_1FC1CDD8_cont_BFC1D6EC }, - { 0x1FC1D70Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D70C }, - { 0x1FC1D718u, SCPH1001_func_1FC1CDD8_cont_BFC1D718 }, - { 0x1FC1D71Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D71C }, - { 0x1FC1D730u, SCPH1001_func_1FC1CDD8_cont_BFC1D730 }, - { 0x1FC1D750u, SCPH1001_func_1FC1CDD8_cont_BFC1D750 }, - { 0x1FC1D770u, SCPH1001_func_1FC1CDD8_cont_BFC1D770 }, - { 0x1FC1D790u, SCPH1001_func_1FC1CDD8_cont_BFC1D790 }, - { 0x1FC1D798u, SCPH1001_func_1FC1CDD8_cont_BFC1D798 }, - { 0x1FC1D7ACu, SCPH1001_func_1FC1CDD8_cont_BFC1D7AC }, - { 0x1FC1D7C0u, SCPH1001_func_1FC1CDD8_cont_BFC1D7C0 }, - { 0x1FC1D7D0u, SCPH1001_func_1FC1CDD8_cont_BFC1D7D0 }, - { 0x1FC1D804u, SCPH1001_func_1FC1CDD8_cont_BFC1D804 }, - { 0x1FC1D814u, SCPH1001_func_1FC1CDD8_cont_BFC1D814 }, - { 0x1FC1D81Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D81C }, - { 0x1FC1D824u, SCPH1001_func_1FC1CDD8_cont_BFC1D824 }, - { 0x1FC1D850u, SCPH1001_func_1FC1CDD8_cont_BFC1D850 }, - { 0x1FC1D86Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D86C }, - { 0x1FC1D874u, SCPH1001_func_1FC1CDD8_cont_BFC1D874 }, - { 0x1FC1D87Cu, SCPH1001_func_1FC1CDD8_cont_BFC1D87C }, - { 0x1FC1D8A8u, SCPH1001_func_1FC1CDD8_cont_BFC1D8A8 }, - { 0x1FC1D8B0u, SCPH1001_func_1FC1CDD8_cont_BFC1D8B0 }, - { 0x1FC1D8C4u, SCPH1001_func_1FC1CDD8_cont_BFC1D8C4 }, - { 0x1FC1D8CCu, SCPH1001_func_1FC1CDD8_cont_BFC1D8CC }, - { 0x1FC1D8D4u, SCPH1001_func_1FC1CDD8_cont_BFC1D8D4 }, - { 0x1FC1D8DCu, SCPH1001_func_1FC1CDD8_cont_BFC1D8DC }, - { 0x1FC1D8ECu, SCPH1001_func_1FC1CDD8_cont_BFC1D8EC }, - { 0x1FC1D970u, SCPH1001_func_1FC1CDD8_cont_BFC1D970 }, - { 0x1FC1D980u, SCPH1001_func_1FC1D980 }, - { 0x1FC1D9C4u, SCPH1001_func_1FC1D9C4 }, - { 0x1FC1D9F8u, SCPH1001_func_1FC1D9C4_cont_BFC1D9F8 }, - { 0x1FC1DA00u, SCPH1001_func_1FC1D9C4_cont_BFC1DA00 }, - { 0x1FC1DA08u, SCPH1001_func_1FC1D9C4_cont_BFC1DA08 }, - { 0x1FC1DA10u, SCPH1001_func_1FC1D9C4_cont_BFC1DA10 }, - { 0x1FC1DA18u, SCPH1001_func_1FC1D9C4_cont_BFC1DA18 }, - { 0x1FC1DA30u, SCPH1001_func_1FC1D9C4_cont_BFC1DA30 }, - { 0x1FC1DA38u, SCPH1001_func_1FC1D9C4_cont_BFC1DA38 }, - { 0x1FC1DA40u, SCPH1001_func_1FC1D9C4_cont_BFC1DA40 }, - { 0x1FC1DA60u, SCPH1001_func_1FC1D9C4_cont_BFC1DA60 }, - { 0x1FC1DA68u, SCPH1001_func_1FC1D9C4_cont_BFC1DA68 }, - { 0x1FC1DA70u, SCPH1001_func_1FC1D9C4_cont_BFC1DA70 }, - { 0x1FC1DA78u, SCPH1001_func_1FC1D9C4_cont_BFC1DA78 }, - { 0x1FC1DA90u, SCPH1001_func_1FC1D9C4_cont_BFC1DA90 }, - { 0x1FC1DA98u, SCPH1001_func_1FC1D9C4_cont_BFC1DA98 }, - { 0x1FC1DAA0u, SCPH1001_func_1FC1D9C4_cont_BFC1DAA0 }, - { 0x1FC1DAACu, SCPH1001_func_1FC1D9C4_cont_BFC1DAAC }, - { 0x1FC1DAB4u, SCPH1001_func_1FC1D9C4_cont_BFC1DAB4 }, - { 0x1FC1DAB8u, SCPH1001_func_1FC1D9C4_cont_BFC1DAB8 }, - { 0x1FC1DAC4u, SCPH1001_func_1FC1D9C4_cont_BFC1DAC4 }, - { 0x1FC1DAD8u, SCPH1001_func_1FC1D9C4_cont_BFC1DAD8 }, - { 0x1FC1DAF4u, SCPH1001_func_1FC1D9C4_cont_BFC1DAF4 }, - { 0x1FC1DAFCu, SCPH1001_func_1FC1D9C4_cont_BFC1DAFC }, - { 0x1FC1DB04u, SCPH1001_func_1FC1D9C4_cont_BFC1DB04 }, - { 0x1FC1DB0Cu, SCPH1001_func_1FC1D9C4_cont_BFC1DB0C }, - { 0x1FC1DB20u, SCPH1001_func_1FC1D9C4_cont_BFC1DB20 }, - { 0x1FC1DB30u, SCPH1001_func_1FC1D9C4_cont_BFC1DB30 }, - { 0x1FC1DB48u, SCPH1001_func_1FC1D9C4_cont_BFC1DB48 }, - { 0x1FC1DB60u, SCPH1001_func_1FC1D9C4_cont_BFC1DB60 }, - { 0x1FC1DB74u, SCPH1001_func_1FC1D9C4_cont_BFC1DB74 }, - { 0x1FC1DB78u, SCPH1001_func_1FC1D9C4_cont_BFC1DB78 }, - { 0x1FC1DB90u, SCPH1001_func_1FC1D9C4_cont_BFC1DB90 }, - { 0x1FC1DB9Cu, SCPH1001_func_1FC1D9C4_cont_BFC1DB9C }, - { 0x1FC1DBACu, SCPH1001_func_1FC1D9C4_cont_BFC1DBAC }, - { 0x1FC1DBB0u, SCPH1001_func_1FC1D9C4_cont_BFC1DBB0 }, - { 0x1FC1DBB8u, SCPH1001_func_1FC1D9C4_cont_BFC1DBB8 }, - { 0x1FC1DBC4u, SCPH1001_func_1FC1D9C4_cont_BFC1DBC4 }, - { 0x1FC1DBD0u, SCPH1001_func_1FC1D9C4_cont_BFC1DBD0 }, - { 0x1FC1DBE0u, SCPH1001_func_1FC1D9C4_cont_BFC1DBE0 }, - { 0x1FC1DBE4u, SCPH1001_func_1FC1D9C4_cont_BFC1DBE4 }, - { 0x1FC1DBF4u, SCPH1001_func_1FC1DBF4 }, - { 0x1FC1DC04u, SCPH1001_func_1FC1DBF4_cont_BFC1DC04 }, - { 0x1FC1DC10u, SCPH1001_func_1FC1DBF4_cont_BFC1DC10 }, - { 0x1FC1DC54u, SCPH1001_func_1FC1DBF4_cont_BFC1DC54 }, - { 0x1FC1DCA4u, SCPH1001_func_1FC1DBF4_cont_BFC1DCA4 }, - { 0x1FC1DCBCu, SCPH1001_func_1FC1DBF4_cont_BFC1DCBC }, - { 0x1FC1DCDCu, SCPH1001_func_1FC1DBF4_cont_BFC1DCDC }, - { 0x1FC1DCFCu, SCPH1001_func_1FC1DBF4_cont_BFC1DCFC }, - { 0x1FC1DD1Cu, SCPH1001_func_1FC1DBF4_cont_BFC1DD1C }, - { 0x1FC1DD3Cu, SCPH1001_func_1FC1DBF4_cont_BFC1DD3C }, - { 0x1FC1DD5Cu, SCPH1001_func_1FC1DBF4_cont_BFC1DD5C }, - { 0x1FC1DD70u, SCPH1001_func_1FC1DBF4_cont_BFC1DD70 }, - { 0x1FC1DD80u, SCPH1001_func_1FC1DBF4_cont_BFC1DD80 }, - { 0x1FC1DD90u, SCPH1001_func_1FC1DBF4_cont_BFC1DD90 }, - { 0x1FC1DDA0u, SCPH1001_func_1FC1DBF4_cont_BFC1DDA0 }, - { 0x1FC1DDB0u, SCPH1001_func_1FC1DBF4_cont_BFC1DDB0 }, - { 0x1FC1DDC0u, SCPH1001_func_1FC1DBF4_cont_BFC1DDC0 }, - { 0x1FC1DDC8u, SCPH1001_func_1FC1DBF4_cont_BFC1DDC8 }, - { 0x1FC1DDD8u, SCPH1001_func_1FC1DDD8 }, - { 0x1FC1DDF4u, SCPH1001_func_1FC1DDD8_cont_BFC1DDF4 }, - { 0x1FC1DE44u, SCPH1001_func_1FC1DDD8_cont_BFC1DE44 }, - { 0x1FC1DE78u, SCPH1001_func_1FC1DDD8_cont_BFC1DE78 }, - { 0x1FC1DE90u, SCPH1001_func_1FC1DDD8_cont_BFC1DE90 }, - { 0x1FC1DEACu, SCPH1001_func_1FC1DDD8_cont_BFC1DEAC }, - { 0x1FC1DEC4u, SCPH1001_func_1FC1DDD8_cont_BFC1DEC4 }, - { 0x1FC1DED8u, SCPH1001_func_1FC1DDD8_cont_BFC1DED8 }, - { 0x1FC1DEF0u, SCPH1001_func_1FC1DDD8_cont_BFC1DEF0 }, - { 0x1FC1DF50u, SCPH1001_func_1FC1DF50 }, - { 0x1FC1DF94u, SCPH1001_func_1FC1DF50_cont_BFC1DF94 }, - { 0x1FC1DFB0u, SCPH1001_func_1FC1DF50_cont_BFC1DFB0 }, - { 0x1FC1DFD0u, SCPH1001_func_1FC1DF50_cont_BFC1DFD0 }, - { 0x1FC1DFD8u, SCPH1001_func_1FC1DF50_cont_BFC1DFD8 }, - { 0x1FC1DFECu, SCPH1001_func_1FC1DF50_cont_BFC1DFEC }, - { 0x1FC1DFF4u, SCPH1001_func_1FC1DF50_cont_BFC1DFF4 }, - { 0x1FC1E024u, SCPH1001_func_1FC1DF50_cont_BFC1E024 }, - { 0x1FC1E03Cu, SCPH1001_func_1FC1DF50_cont_BFC1E03C }, - { 0x1FC1E044u, SCPH1001_func_1FC1DF50_cont_BFC1E044 }, - { 0x1FC1E058u, SCPH1001_func_1FC1DF50_cont_BFC1E058 }, - { 0x1FC1E070u, SCPH1001_func_1FC1DF50_cont_BFC1E070 }, - { 0x1FC1E078u, SCPH1001_func_1FC1DF50_cont_BFC1E078 }, - { 0x1FC1E07Cu, SCPH1001_func_1FC1DF50_cont_BFC1E07C }, - { 0x1FC1E084u, SCPH1001_func_1FC1DF50_cont_BFC1E084 }, - { 0x1FC1E09Cu, SCPH1001_func_1FC1DF50_cont_BFC1E09C }, - { 0x1FC1E0A4u, SCPH1001_func_1FC1DF50_cont_BFC1E0A4 }, - { 0x1FC1E0A8u, SCPH1001_func_1FC1DF50_cont_BFC1E0A8 }, - { 0x1FC1E0B4u, SCPH1001_func_1FC1DF50_cont_BFC1E0B4 }, - { 0x1FC1E0C4u, SCPH1001_func_1FC1E0C4 }, - { 0x1FC1E0DCu, SCPH1001_func_1FC1E0C4_cont_BFC1E0DC }, - { 0x1FC1E0FCu, SCPH1001_func_1FC1E0C4_cont_BFC1E0FC }, - { 0x1FC1E10Cu, SCPH1001_func_1FC1E10C }, - { 0x1FC1E118u, SCPH1001_func_1FC1E10C_cont_BFC1E118 }, - { 0x1FC1E130u, SCPH1001_func_1FC1E10C_cont_BFC1E130 }, - { 0x1FC1E13Cu, SCPH1001_func_1FC1E10C_cont_BFC1E13C }, - { 0x1FC1E160u, SCPH1001_func_1FC1E10C_cont_BFC1E160 }, - { 0x1FC1E18Cu, SCPH1001_func_1FC1E10C_cont_BFC1E18C }, - { 0x1FC1E194u, SCPH1001_func_1FC1E10C_cont_BFC1E194 }, - { 0x1FC1E19Cu, SCPH1001_func_1FC1E10C_cont_BFC1E19C }, - { 0x1FC1E1B0u, SCPH1001_func_1FC1E10C_cont_BFC1E1B0 }, - { 0x1FC1E1B4u, SCPH1001_func_1FC1E10C_cont_BFC1E1B4 }, - { 0x1FC1E1CCu, SCPH1001_func_1FC1E1CC }, - { 0x1FC1E1ECu, SCPH1001_func_1FC1E1CC_cont_BFC1E1EC }, - { 0x1FC1E208u, SCPH1001_func_1FC1E1CC_cont_BFC1E208 }, - { 0x1FC1E210u, SCPH1001_func_1FC1E1CC_cont_BFC1E210 }, - { 0x1FC1E218u, SCPH1001_func_1FC1E1CC_cont_BFC1E218 }, - { 0x1FC1E228u, SCPH1001_func_1FC1E1CC_cont_BFC1E228 }, - { 0x1FC1E260u, SCPH1001_func_1FC1E1CC_cont_BFC1E260 }, - { 0x1FC1E268u, SCPH1001_func_1FC1E1CC_cont_BFC1E268 }, - { 0x1FC1E28Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E28C }, - { 0x1FC1E294u, SCPH1001_func_1FC1E1CC_cont_BFC1E294 }, - { 0x1FC1E2B8u, SCPH1001_func_1FC1E1CC_cont_BFC1E2B8 }, - { 0x1FC1E2C0u, SCPH1001_func_1FC1E1CC_cont_BFC1E2C0 }, - { 0x1FC1E2D0u, SCPH1001_func_1FC1E1CC_cont_BFC1E2D0 }, - { 0x1FC1E2D8u, SCPH1001_func_1FC1E1CC_cont_BFC1E2D8 }, - { 0x1FC1E2E0u, SCPH1001_func_1FC1E1CC_cont_BFC1E2E0 }, - { 0x1FC1E300u, SCPH1001_func_1FC1E1CC_cont_BFC1E300 }, - { 0x1FC1E308u, SCPH1001_func_1FC1E1CC_cont_BFC1E308 }, - { 0x1FC1E314u, SCPH1001_func_1FC1E1CC_cont_BFC1E314 }, - { 0x1FC1E31Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E31C }, - { 0x1FC1E324u, SCPH1001_func_1FC1E1CC_cont_BFC1E324 }, - { 0x1FC1E32Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E32C }, - { 0x1FC1E33Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E33C }, - { 0x1FC1E344u, SCPH1001_func_1FC1E1CC_cont_BFC1E344 }, - { 0x1FC1E350u, SCPH1001_func_1FC1E1CC_cont_BFC1E350 }, - { 0x1FC1E358u, SCPH1001_func_1FC1E1CC_cont_BFC1E358 }, - { 0x1FC1E36Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E36C }, - { 0x1FC1E374u, SCPH1001_func_1FC1E1CC_cont_BFC1E374 }, - { 0x1FC1E37Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E37C }, - { 0x1FC1E384u, SCPH1001_func_1FC1E1CC_cont_BFC1E384 }, - { 0x1FC1E38Cu, SCPH1001_func_1FC1E1CC_cont_BFC1E38C }, - { 0x1FC1E398u, SCPH1001_func_1FC1E1CC_cont_BFC1E398 }, - { 0x1FC1E3A4u, SCPH1001_func_1FC1E1CC_cont_BFC1E3A4 }, - { 0x1FC1E3ACu, SCPH1001_func_1FC1E3AC }, - { 0x1FC1E3B4u, SCPH1001_func_1FC1E3AC_cont_BFC1E3B4 }, - { 0x1FC1E3BCu, SCPH1001_func_1FC1E3AC_cont_BFC1E3BC }, - { 0x1FC1E3C0u, SCPH1001_func_1FC1E3C0 }, - { 0x1FC1E3CCu, SCPH1001_func_1FC1E3CC }, - { 0x1FC1E3E4u, SCPH1001_func_1FC1E3CC_cont_BFC1E3E4 }, - { 0x1FC1E3F0u, SCPH1001_func_1FC1E3CC_cont_BFC1E3F0 }, - { 0x1FC1E410u, SCPH1001_func_1FC1E3CC_cont_BFC1E410 }, - { 0x1FC1E42Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E42C }, - { 0x1FC1E448u, SCPH1001_func_1FC1E3CC_cont_BFC1E448 }, - { 0x1FC1E450u, SCPH1001_func_1FC1E3CC_cont_BFC1E450 }, - { 0x1FC1E474u, SCPH1001_func_1FC1E3CC_cont_BFC1E474 }, - { 0x1FC1E47Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E47C }, - { 0x1FC1E48Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E48C }, - { 0x1FC1E4C0u, SCPH1001_func_1FC1E3CC_cont_BFC1E4C0 }, - { 0x1FC1E4DCu, SCPH1001_func_1FC1E3CC_cont_BFC1E4DC }, - { 0x1FC1E4ECu, SCPH1001_func_1FC1E3CC_cont_BFC1E4EC }, - { 0x1FC1E508u, SCPH1001_func_1FC1E3CC_cont_BFC1E508 }, - { 0x1FC1E518u, SCPH1001_func_1FC1E3CC_cont_BFC1E518 }, - { 0x1FC1E528u, SCPH1001_func_1FC1E3CC_cont_BFC1E528 }, - { 0x1FC1E538u, SCPH1001_func_1FC1E3CC_cont_BFC1E538 }, - { 0x1FC1E548u, SCPH1001_func_1FC1E3CC_cont_BFC1E548 }, - { 0x1FC1E558u, SCPH1001_func_1FC1E3CC_cont_BFC1E558 }, - { 0x1FC1E568u, SCPH1001_func_1FC1E3CC_cont_BFC1E568 }, - { 0x1FC1E578u, SCPH1001_func_1FC1E3CC_cont_BFC1E578 }, - { 0x1FC1E58Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E58C }, - { 0x1FC1E5A4u, SCPH1001_func_1FC1E3CC_cont_BFC1E5A4 }, - { 0x1FC1E5B8u, SCPH1001_func_1FC1E3CC_cont_BFC1E5B8 }, - { 0x1FC1E5C4u, SCPH1001_func_1FC1E3CC_cont_BFC1E5C4 }, - { 0x1FC1E5D0u, SCPH1001_func_1FC1E3CC_cont_BFC1E5D0 }, - { 0x1FC1E5E4u, SCPH1001_func_1FC1E3CC_cont_BFC1E5E4 }, - { 0x1FC1E5ECu, SCPH1001_func_1FC1E3CC_cont_BFC1E5EC }, - { 0x1FC1E5FCu, SCPH1001_func_1FC1E3CC_cont_BFC1E5FC }, - { 0x1FC1E624u, SCPH1001_func_1FC1E3CC_cont_BFC1E624 }, - { 0x1FC1E630u, SCPH1001_func_1FC1E3CC_cont_BFC1E630 }, - { 0x1FC1E640u, SCPH1001_func_1FC1E3CC_cont_BFC1E640 }, - { 0x1FC1E64Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E64C }, - { 0x1FC1E654u, SCPH1001_func_1FC1E3CC_cont_BFC1E654 }, - { 0x1FC1E668u, SCPH1001_func_1FC1E3CC_cont_BFC1E668 }, - { 0x1FC1E67Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E67C }, - { 0x1FC1E688u, SCPH1001_func_1FC1E3CC_cont_BFC1E688 }, - { 0x1FC1E694u, SCPH1001_func_1FC1E3CC_cont_BFC1E694 }, - { 0x1FC1E6A4u, SCPH1001_func_1FC1E3CC_cont_BFC1E6A4 }, - { 0x1FC1E6BCu, SCPH1001_func_1FC1E3CC_cont_BFC1E6BC }, - { 0x1FC1E6D4u, SCPH1001_func_1FC1E3CC_cont_BFC1E6D4 }, - { 0x1FC1E6E4u, SCPH1001_func_1FC1E3CC_cont_BFC1E6E4 }, - { 0x1FC1E6FCu, SCPH1001_func_1FC1E3CC_cont_BFC1E6FC }, - { 0x1FC1E708u, SCPH1001_func_1FC1E3CC_cont_BFC1E708 }, - { 0x1FC1E718u, SCPH1001_func_1FC1E3CC_cont_BFC1E718 }, - { 0x1FC1E730u, SCPH1001_func_1FC1E3CC_cont_BFC1E730 }, - { 0x1FC1E738u, SCPH1001_func_1FC1E3CC_cont_BFC1E738 }, - { 0x1FC1E74Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E74C }, - { 0x1FC1E77Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E77C }, - { 0x1FC1E790u, SCPH1001_func_1FC1E3CC_cont_BFC1E790 }, - { 0x1FC1E798u, SCPH1001_func_1FC1E3CC_cont_BFC1E798 }, - { 0x1FC1E7A0u, SCPH1001_func_1FC1E3CC_cont_BFC1E7A0 }, - { 0x1FC1E7A8u, SCPH1001_func_1FC1E3CC_cont_BFC1E7A8 }, - { 0x1FC1E7B0u, SCPH1001_func_1FC1E3CC_cont_BFC1E7B0 }, - { 0x1FC1E7B8u, SCPH1001_func_1FC1E3CC_cont_BFC1E7B8 }, - { 0x1FC1E7C4u, SCPH1001_func_1FC1E3CC_cont_BFC1E7C4 }, - { 0x1FC1E7D8u, SCPH1001_func_1FC1E3CC_cont_BFC1E7D8 }, - { 0x1FC1E7E0u, SCPH1001_func_1FC1E3CC_cont_BFC1E7E0 }, - { 0x1FC1E800u, SCPH1001_func_1FC1E3CC_cont_BFC1E800 }, - { 0x1FC1E80Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E80C }, - { 0x1FC1E824u, SCPH1001_func_1FC1E3CC_cont_BFC1E824 }, - { 0x1FC1E840u, SCPH1001_func_1FC1E3CC_cont_BFC1E840 }, - { 0x1FC1E84Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E84C }, - { 0x1FC1E864u, SCPH1001_func_1FC1E3CC_cont_BFC1E864 }, - { 0x1FC1E86Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E86C }, - { 0x1FC1E874u, SCPH1001_func_1FC1E3CC_cont_BFC1E874 }, - { 0x1FC1E880u, SCPH1001_func_1FC1E3CC_cont_BFC1E880 }, - { 0x1FC1E89Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E89C }, - { 0x1FC1E8ACu, SCPH1001_func_1FC1E3CC_cont_BFC1E8AC }, - { 0x1FC1E8CCu, SCPH1001_func_1FC1E3CC_cont_BFC1E8CC }, - { 0x1FC1E8DCu, SCPH1001_func_1FC1E3CC_cont_BFC1E8DC }, - { 0x1FC1E8E8u, SCPH1001_func_1FC1E3CC_cont_BFC1E8E8 }, - { 0x1FC1E8F0u, SCPH1001_func_1FC1E3CC_cont_BFC1E8F0 }, - { 0x1FC1E8FCu, SCPH1001_func_1FC1E3CC_cont_BFC1E8FC }, - { 0x1FC1E910u, SCPH1001_func_1FC1E3CC_cont_BFC1E910 }, - { 0x1FC1E918u, SCPH1001_func_1FC1E3CC_cont_BFC1E918 }, - { 0x1FC1E92Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E92C }, - { 0x1FC1E934u, SCPH1001_func_1FC1E3CC_cont_BFC1E934 }, - { 0x1FC1E954u, SCPH1001_func_1FC1E3CC_cont_BFC1E954 }, - { 0x1FC1E95Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E95C }, - { 0x1FC1E964u, SCPH1001_func_1FC1E3CC_cont_BFC1E964 }, - { 0x1FC1E96Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E96C }, - { 0x1FC1E974u, SCPH1001_func_1FC1E3CC_cont_BFC1E974 }, - { 0x1FC1E98Cu, SCPH1001_func_1FC1E3CC_cont_BFC1E98C }, - { 0x1FC1E9A0u, SCPH1001_func_1FC1E3CC_cont_BFC1E9A0 }, - { 0x1FC1E9B4u, SCPH1001_func_1FC1E3CC_cont_BFC1E9B4 }, - { 0x1FC1E9C8u, SCPH1001_func_1FC1E3CC_cont_BFC1E9C8 }, - { 0x1FC1E9D0u, SCPH1001_func_1FC1E3CC_cont_BFC1E9D0 }, - { 0x1FC1E9D8u, SCPH1001_func_1FC1E3CC_cont_BFC1E9D8 }, - { 0x1FC1E9F8u, SCPH1001_func_1FC1E3CC_cont_BFC1E9F8 }, - { 0x1FC1EA00u, SCPH1001_func_1FC1E3CC_cont_BFC1EA00 }, - { 0x1FC1EA08u, SCPH1001_func_1FC1E3CC_cont_BFC1EA08 }, - { 0x1FC1EA10u, SCPH1001_func_1FC1E3CC_cont_BFC1EA10 }, - { 0x1FC1EA18u, SCPH1001_func_1FC1E3CC_cont_BFC1EA18 }, - { 0x1FC1EA20u, SCPH1001_func_1FC1E3CC_cont_BFC1EA20 }, - { 0x1FC1EA2Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EA2C }, - { 0x1FC1EA34u, SCPH1001_func_1FC1E3CC_cont_BFC1EA34 }, - { 0x1FC1EA4Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EA4C }, - { 0x1FC1EA60u, SCPH1001_func_1FC1E3CC_cont_BFC1EA60 }, - { 0x1FC1EA78u, SCPH1001_func_1FC1E3CC_cont_BFC1EA78 }, - { 0x1FC1EA84u, SCPH1001_func_1FC1E3CC_cont_BFC1EA84 }, - { 0x1FC1EAA0u, SCPH1001_func_1FC1E3CC_cont_BFC1EAA0 }, - { 0x1FC1EAA8u, SCPH1001_func_1FC1E3CC_cont_BFC1EAA8 }, - { 0x1FC1EAB0u, SCPH1001_func_1FC1E3CC_cont_BFC1EAB0 }, - { 0x1FC1EAC0u, SCPH1001_func_1FC1E3CC_cont_BFC1EAC0 }, - { 0x1FC1EAC8u, SCPH1001_func_1FC1E3CC_cont_BFC1EAC8 }, - { 0x1FC1EAD0u, SCPH1001_func_1FC1E3CC_cont_BFC1EAD0 }, - { 0x1FC1EAE4u, SCPH1001_func_1FC1E3CC_cont_BFC1EAE4 }, - { 0x1FC1EAECu, SCPH1001_func_1FC1E3CC_cont_BFC1EAEC }, - { 0x1FC1EAF4u, SCPH1001_func_1FC1E3CC_cont_BFC1EAF4 }, - { 0x1FC1EAFCu, SCPH1001_func_1FC1E3CC_cont_BFC1EAFC }, - { 0x1FC1EB10u, SCPH1001_func_1FC1E3CC_cont_BFC1EB10 }, - { 0x1FC1EB1Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EB1C }, - { 0x1FC1EB24u, SCPH1001_func_1FC1E3CC_cont_BFC1EB24 }, - { 0x1FC1EB3Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EB3C }, - { 0x1FC1EB50u, SCPH1001_func_1FC1E3CC_cont_BFC1EB50 }, - { 0x1FC1EB68u, SCPH1001_func_1FC1E3CC_cont_BFC1EB68 }, - { 0x1FC1EB74u, SCPH1001_func_1FC1E3CC_cont_BFC1EB74 }, - { 0x1FC1EB94u, SCPH1001_func_1FC1E3CC_cont_BFC1EB94 }, - { 0x1FC1EB9Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EB9C }, - { 0x1FC1EBA4u, SCPH1001_func_1FC1E3CC_cont_BFC1EBA4 }, - { 0x1FC1EBACu, SCPH1001_func_1FC1E3CC_cont_BFC1EBAC }, - { 0x1FC1EBB8u, SCPH1001_func_1FC1E3CC_cont_BFC1EBB8 }, - { 0x1FC1EBC0u, SCPH1001_func_1FC1E3CC_cont_BFC1EBC0 }, - { 0x1FC1EBC8u, SCPH1001_func_1FC1E3CC_cont_BFC1EBC8 }, - { 0x1FC1EBDCu, SCPH1001_func_1FC1E3CC_cont_BFC1EBDC }, - { 0x1FC1EBF0u, SCPH1001_func_1FC1E3CC_cont_BFC1EBF0 }, - { 0x1FC1EC00u, SCPH1001_func_1FC1E3CC_cont_BFC1EC00 }, - { 0x1FC1EC1Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EC1C }, - { 0x1FC1EC24u, SCPH1001_func_1FC1E3CC_cont_BFC1EC24 }, - { 0x1FC1EC2Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EC2C }, - { 0x1FC1EC4Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EC4C }, - { 0x1FC1EC54u, SCPH1001_func_1FC1E3CC_cont_BFC1EC54 }, - { 0x1FC1EC74u, SCPH1001_func_1FC1E3CC_cont_BFC1EC74 }, - { 0x1FC1EC7Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EC7C }, - { 0x1FC1ECA0u, SCPH1001_func_1FC1E3CC_cont_BFC1ECA0 }, - { 0x1FC1ECA8u, SCPH1001_func_1FC1E3CC_cont_BFC1ECA8 }, - { 0x1FC1ECB0u, SCPH1001_func_1FC1E3CC_cont_BFC1ECB0 }, - { 0x1FC1ECD0u, SCPH1001_func_1FC1E3CC_cont_BFC1ECD0 }, - { 0x1FC1ECD8u, SCPH1001_func_1FC1E3CC_cont_BFC1ECD8 }, - { 0x1FC1ECE0u, SCPH1001_func_1FC1E3CC_cont_BFC1ECE0 }, - { 0x1FC1ED00u, SCPH1001_func_1FC1E3CC_cont_BFC1ED00 }, - { 0x1FC1ED10u, SCPH1001_func_1FC1E3CC_cont_BFC1ED10 }, - { 0x1FC1ED1Cu, SCPH1001_func_1FC1E3CC_cont_BFC1ED1C }, - { 0x1FC1ED34u, SCPH1001_func_1FC1E3CC_cont_BFC1ED34 }, - { 0x1FC1ED40u, SCPH1001_func_1FC1E3CC_cont_BFC1ED40 }, - { 0x1FC1ED48u, SCPH1001_func_1FC1E3CC_cont_BFC1ED48 }, - { 0x1FC1ED50u, SCPH1001_func_1FC1E3CC_cont_BFC1ED50 }, - { 0x1FC1ED64u, SCPH1001_func_1FC1E3CC_cont_BFC1ED64 }, - { 0x1FC1ED78u, SCPH1001_func_1FC1E3CC_cont_BFC1ED78 }, - { 0x1FC1ED80u, SCPH1001_func_1FC1E3CC_cont_BFC1ED80 }, - { 0x1FC1ED88u, SCPH1001_func_1FC1E3CC_cont_BFC1ED88 }, - { 0x1FC1ED90u, SCPH1001_func_1FC1E3CC_cont_BFC1ED90 }, - { 0x1FC1ED98u, SCPH1001_func_1FC1E3CC_cont_BFC1ED98 }, - { 0x1FC1EDA0u, SCPH1001_func_1FC1E3CC_cont_BFC1EDA0 }, - { 0x1FC1EDB4u, SCPH1001_func_1FC1E3CC_cont_BFC1EDB4 }, - { 0x1FC1EDD4u, SCPH1001_func_1FC1E3CC_cont_BFC1EDD4 }, - { 0x1FC1EDE4u, SCPH1001_func_1FC1E3CC_cont_BFC1EDE4 }, - { 0x1FC1EDF0u, SCPH1001_func_1FC1E3CC_cont_BFC1EDF0 }, - { 0x1FC1EE08u, SCPH1001_func_1FC1E3CC_cont_BFC1EE08 }, - { 0x1FC1EE14u, SCPH1001_func_1FC1E3CC_cont_BFC1EE14 }, - { 0x1FC1EE1Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EE1C }, - { 0x1FC1EE24u, SCPH1001_func_1FC1E3CC_cont_BFC1EE24 }, - { 0x1FC1EE2Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EE2C }, - { 0x1FC1EE34u, SCPH1001_func_1FC1E3CC_cont_BFC1EE34 }, - { 0x1FC1EE48u, SCPH1001_func_1FC1E3CC_cont_BFC1EE48 }, - { 0x1FC1EE5Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EE5C }, - { 0x1FC1EE70u, SCPH1001_func_1FC1E3CC_cont_BFC1EE70 }, - { 0x1FC1EE78u, SCPH1001_func_1FC1E3CC_cont_BFC1EE78 }, - { 0x1FC1EE80u, SCPH1001_func_1FC1E3CC_cont_BFC1EE80 }, - { 0x1FC1EEA0u, SCPH1001_func_1FC1E3CC_cont_BFC1EEA0 }, - { 0x1FC1EEA8u, SCPH1001_func_1FC1E3CC_cont_BFC1EEA8 }, - { 0x1FC1EEB0u, SCPH1001_func_1FC1E3CC_cont_BFC1EEB0 }, - { 0x1FC1EEB8u, SCPH1001_func_1FC1E3CC_cont_BFC1EEB8 }, - { 0x1FC1EEC0u, SCPH1001_func_1FC1E3CC_cont_BFC1EEC0 }, - { 0x1FC1EED4u, SCPH1001_func_1FC1E3CC_cont_BFC1EED4 }, - { 0x1FC1EEE0u, SCPH1001_func_1FC1E3CC_cont_BFC1EEE0 }, - { 0x1FC1EEECu, SCPH1001_func_1FC1E3CC_cont_BFC1EEEC }, - { 0x1FC1EF00u, SCPH1001_func_1FC1E3CC_cont_BFC1EF00 }, - { 0x1FC1EF28u, SCPH1001_func_1FC1E3CC_cont_BFC1EF28 }, - { 0x1FC1EF34u, SCPH1001_func_1FC1E3CC_cont_BFC1EF34 }, - { 0x1FC1EF38u, SCPH1001_func_1FC1E3CC_cont_BFC1EF38 }, - { 0x1FC1EF40u, SCPH1001_func_1FC1E3CC_cont_BFC1EF40 }, - { 0x1FC1EF4Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EF4C }, - { 0x1FC1EF50u, SCPH1001_func_1FC1E3CC_cont_BFC1EF50 }, - { 0x1FC1EF5Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EF5C }, - { 0x1FC1EF84u, SCPH1001_func_1FC1E3CC_cont_BFC1EF84 }, - { 0x1FC1EF8Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EF8C }, - { 0x1FC1EF90u, SCPH1001_func_1FC1E3CC_cont_BFC1EF90 }, - { 0x1FC1EF94u, SCPH1001_func_1FC1E3CC_cont_BFC1EF94 }, - { 0x1FC1EF9Cu, SCPH1001_func_1FC1E3CC_cont_BFC1EF9C }, - { 0x1FC1EFA4u, SCPH1001_func_1FC1E3CC_cont_BFC1EFA4 }, - { 0x1FC1EFC4u, SCPH1001_func_1FC1E3CC_cont_BFC1EFC4 }, - { 0x1FC1EFECu, SCPH1001_func_1FC1E3CC_cont_BFC1EFEC }, - { 0x1FC1EFF4u, SCPH1001_func_1FC1E3CC_cont_BFC1EFF4 }, - { 0x1FC1EFFCu, SCPH1001_func_1FC1E3CC_cont_BFC1EFFC }, - { 0x1FC1F01Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F01C }, - { 0x1FC1F024u, SCPH1001_func_1FC1E3CC_cont_BFC1F024 }, - { 0x1FC1F038u, SCPH1001_func_1FC1E3CC_cont_BFC1F038 }, - { 0x1FC1F050u, SCPH1001_func_1FC1E3CC_cont_BFC1F050 }, - { 0x1FC1F058u, SCPH1001_func_1FC1E3CC_cont_BFC1F058 }, - { 0x1FC1F05Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F05C }, - { 0x1FC1F064u, SCPH1001_func_1FC1E3CC_cont_BFC1F064 }, - { 0x1FC1F078u, SCPH1001_func_1FC1E3CC_cont_BFC1F078 }, - { 0x1FC1F08Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F08C }, - { 0x1FC1F0A0u, SCPH1001_func_1FC1E3CC_cont_BFC1F0A0 }, - { 0x1FC1F0A8u, SCPH1001_func_1FC1E3CC_cont_BFC1F0A8 }, - { 0x1FC1F0B8u, SCPH1001_func_1FC1E3CC_cont_BFC1F0B8 }, - { 0x1FC1F0C0u, SCPH1001_func_1FC1E3CC_cont_BFC1F0C0 }, - { 0x1FC1F0C8u, SCPH1001_func_1FC1E3CC_cont_BFC1F0C8 }, - { 0x1FC1F0E0u, SCPH1001_func_1FC1E3CC_cont_BFC1F0E0 }, - { 0x1FC1F0E8u, SCPH1001_func_1FC1E3CC_cont_BFC1F0E8 }, - { 0x1FC1F108u, SCPH1001_func_1FC1E3CC_cont_BFC1F108 }, - { 0x1FC1F124u, SCPH1001_func_1FC1E3CC_cont_BFC1F124 }, - { 0x1FC1F128u, SCPH1001_func_1FC1E3CC_cont_BFC1F128 }, - { 0x1FC1F130u, SCPH1001_func_1FC1E3CC_cont_BFC1F130 }, - { 0x1FC1F138u, SCPH1001_func_1FC1E3CC_cont_BFC1F138 }, - { 0x1FC1F148u, SCPH1001_func_1FC1E3CC_cont_BFC1F148 }, - { 0x1FC1F154u, SCPH1001_func_1FC1E3CC_cont_BFC1F154 }, - { 0x1FC1F160u, SCPH1001_func_1FC1E3CC_cont_BFC1F160 }, - { 0x1FC1F178u, SCPH1001_func_1FC1E3CC_cont_BFC1F178 }, - { 0x1FC1F180u, SCPH1001_func_1FC1E3CC_cont_BFC1F180 }, - { 0x1FC1F1A8u, SCPH1001_func_1FC1E3CC_cont_BFC1F1A8 }, - { 0x1FC1F1B4u, SCPH1001_func_1FC1E3CC_cont_BFC1F1B4 }, - { 0x1FC1F1C8u, SCPH1001_func_1FC1E3CC_cont_BFC1F1C8 }, - { 0x1FC1F1D4u, SCPH1001_func_1FC1E3CC_cont_BFC1F1D4 }, - { 0x1FC1F1E8u, SCPH1001_func_1FC1E3CC_cont_BFC1F1E8 }, - { 0x1FC1F1F4u, SCPH1001_func_1FC1E3CC_cont_BFC1F1F4 }, - { 0x1FC1F208u, SCPH1001_func_1FC1E3CC_cont_BFC1F208 }, - { 0x1FC1F214u, SCPH1001_func_1FC1E3CC_cont_BFC1F214 }, - { 0x1FC1F21Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F21C }, - { 0x1FC1F224u, SCPH1001_func_1FC1E3CC_cont_BFC1F224 }, - { 0x1FC1F230u, SCPH1001_func_1FC1E3CC_cont_BFC1F230 }, - { 0x1FC1F23Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F23C }, - { 0x1FC1F250u, SCPH1001_func_1FC1E3CC_cont_BFC1F250 }, - { 0x1FC1F268u, SCPH1001_func_1FC1E3CC_cont_BFC1F268 }, - { 0x1FC1F278u, SCPH1001_func_1FC1E3CC_cont_BFC1F278 }, - { 0x1FC1F284u, SCPH1001_func_1FC1E3CC_cont_BFC1F284 }, - { 0x1FC1F290u, SCPH1001_func_1FC1E3CC_cont_BFC1F290 }, - { 0x1FC1F2A0u, SCPH1001_func_1FC1E3CC_cont_BFC1F2A0 }, - { 0x1FC1F2A8u, SCPH1001_func_1FC1E3CC_cont_BFC1F2A8 }, - { 0x1FC1F2B8u, SCPH1001_func_1FC1E3CC_cont_BFC1F2B8 }, - { 0x1FC1F2BCu, SCPH1001_func_1FC1E3CC_cont_BFC1F2BC }, - { 0x1FC1F2C4u, SCPH1001_func_1FC1E3CC_cont_BFC1F2C4 }, - { 0x1FC1F2D0u, SCPH1001_func_1FC1E3CC_cont_BFC1F2D0 }, - { 0x1FC1F2D8u, SCPH1001_func_1FC1E3CC_cont_BFC1F2D8 }, - { 0x1FC1F2F8u, SCPH1001_func_1FC1E3CC_cont_BFC1F2F8 }, - { 0x1FC1F308u, SCPH1001_func_1FC1E3CC_cont_BFC1F308 }, - { 0x1FC1F31Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F31C }, - { 0x1FC1F32Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F32C }, - { 0x1FC1F340u, SCPH1001_func_1FC1E3CC_cont_BFC1F340 }, - { 0x1FC1F348u, SCPH1001_func_1FC1E3CC_cont_BFC1F348 }, - { 0x1FC1F360u, SCPH1001_func_1FC1E3CC_cont_BFC1F360 }, - { 0x1FC1F364u, SCPH1001_func_1FC1E3CC_cont_BFC1F364 }, - { 0x1FC1F370u, SCPH1001_func_1FC1E3CC_cont_BFC1F370 }, - { 0x1FC1F37Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F37C }, - { 0x1FC1F388u, SCPH1001_func_1FC1E3CC_cont_BFC1F388 }, - { 0x1FC1F394u, SCPH1001_func_1FC1E3CC_cont_BFC1F394 }, - { 0x1FC1F39Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F39C }, - { 0x1FC1F3A8u, SCPH1001_func_1FC1E3CC_cont_BFC1F3A8 }, - { 0x1FC1F3ACu, SCPH1001_func_1FC1E3CC_cont_BFC1F3AC }, - { 0x1FC1F3B4u, SCPH1001_func_1FC1E3CC_cont_BFC1F3B4 }, - { 0x1FC1F3C0u, SCPH1001_func_1FC1E3CC_cont_BFC1F3C0 }, - { 0x1FC1F3D4u, SCPH1001_func_1FC1E3CC_cont_BFC1F3D4 }, - { 0x1FC1F3E4u, SCPH1001_func_1FC1E3CC_cont_BFC1F3E4 }, - { 0x1FC1F3F8u, SCPH1001_func_1FC1E3CC_cont_BFC1F3F8 }, - { 0x1FC1F408u, SCPH1001_func_1FC1E3CC_cont_BFC1F408 }, - { 0x1FC1F41Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F41C }, - { 0x1FC1F430u, SCPH1001_func_1FC1E3CC_cont_BFC1F430 }, - { 0x1FC1F440u, SCPH1001_func_1FC1E3CC_cont_BFC1F440 }, - { 0x1FC1F454u, SCPH1001_func_1FC1E3CC_cont_BFC1F454 }, - { 0x1FC1F468u, SCPH1001_func_1FC1E3CC_cont_BFC1F468 }, - { 0x1FC1F478u, SCPH1001_func_1FC1E3CC_cont_BFC1F478 }, - { 0x1FC1F48Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F48C }, - { 0x1FC1F498u, SCPH1001_func_1FC1E3CC_cont_BFC1F498 }, - { 0x1FC1F4A8u, SCPH1001_func_1FC1E3CC_cont_BFC1F4A8 }, - { 0x1FC1F4B4u, SCPH1001_func_1FC1E3CC_cont_BFC1F4B4 }, - { 0x1FC1F4B8u, SCPH1001_func_1FC1E3CC_cont_BFC1F4B8 }, - { 0x1FC1F4CCu, SCPH1001_func_1FC1E3CC_cont_BFC1F4CC }, - { 0x1FC1F4E0u, SCPH1001_func_1FC1E3CC_cont_BFC1F4E0 }, - { 0x1FC1F4F8u, SCPH1001_func_1FC1E3CC_cont_BFC1F4F8 }, - { 0x1FC1F50Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F50C }, - { 0x1FC1F518u, SCPH1001_func_1FC1E3CC_cont_BFC1F518 }, - { 0x1FC1F524u, SCPH1001_func_1FC1E3CC_cont_BFC1F524 }, - { 0x1FC1F538u, SCPH1001_func_1FC1E3CC_cont_BFC1F538 }, - { 0x1FC1F540u, SCPH1001_func_1FC1E3CC_cont_BFC1F540 }, - { 0x1FC1F550u, SCPH1001_func_1FC1E3CC_cont_BFC1F550 }, - { 0x1FC1F578u, SCPH1001_func_1FC1E3CC_cont_BFC1F578 }, - { 0x1FC1F584u, SCPH1001_func_1FC1E3CC_cont_BFC1F584 }, - { 0x1FC1F59Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F59C }, - { 0x1FC1F5B0u, SCPH1001_func_1FC1E3CC_cont_BFC1F5B0 }, - { 0x1FC1F5CCu, SCPH1001_func_1FC1E3CC_cont_BFC1F5CC }, - { 0x1FC1F5ECu, SCPH1001_func_1FC1E3CC_cont_BFC1F5EC }, - { 0x1FC1F5F8u, SCPH1001_func_1FC1E3CC_cont_BFC1F5F8 }, - { 0x1FC1F600u, SCPH1001_func_1FC1E3CC_cont_BFC1F600 }, - { 0x1FC1F608u, SCPH1001_func_1FC1E3CC_cont_BFC1F608 }, - { 0x1FC1F61Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F61C }, - { 0x1FC1F624u, SCPH1001_func_1FC1E3CC_cont_BFC1F624 }, - { 0x1FC1F638u, SCPH1001_func_1FC1E3CC_cont_BFC1F638 }, - { 0x1FC1F640u, SCPH1001_func_1FC1E3CC_cont_BFC1F640 }, - { 0x1FC1F648u, SCPH1001_func_1FC1E3CC_cont_BFC1F648 }, - { 0x1FC1F654u, SCPH1001_func_1FC1E3CC_cont_BFC1F654 }, - { 0x1FC1F668u, SCPH1001_func_1FC1E3CC_cont_BFC1F668 }, - { 0x1FC1F670u, SCPH1001_func_1FC1E3CC_cont_BFC1F670 }, - { 0x1FC1F678u, SCPH1001_func_1FC1E3CC_cont_BFC1F678 }, - { 0x1FC1F680u, SCPH1001_func_1FC1E3CC_cont_BFC1F680 }, - { 0x1FC1F694u, SCPH1001_func_1FC1E3CC_cont_BFC1F694 }, - { 0x1FC1F69Cu, SCPH1001_func_1FC1E3CC_cont_BFC1F69C }, - { 0x1FC1F6A0u, SCPH1001_func_1FC1E3CC_cont_BFC1F6A0 }, - { 0x1FC1F6ACu, SCPH1001_func_1FC1F6AC }, - { 0x1FC1F6C8u, SCPH1001_func_1FC1F6AC_cont_BFC1F6C8 }, - { 0x1FC1F704u, SCPH1001_func_1FC1F6AC_cont_BFC1F704 }, - { 0x1FC1F73Cu, SCPH1001_func_1FC1F6AC_cont_BFC1F73C }, - { 0x1FC1F754u, SCPH1001_func_1FC1F6AC_cont_BFC1F754 }, - { 0x1FC1F778u, SCPH1001_func_1FC1F778 }, - { 0x1FC1F7B4u, SCPH1001_func_1FC1F778_cont_BFC1F7B4 }, - { 0x1FC1F7D4u, SCPH1001_func_1FC1F778_cont_BFC1F7D4 }, - { 0x1FC1F7DCu, SCPH1001_func_1FC1F778_cont_BFC1F7DC }, - { 0x1FC1F7E4u, SCPH1001_func_1FC1F778_cont_BFC1F7E4 }, - { 0x1FC1F7F8u, SCPH1001_func_1FC1F778_cont_BFC1F7F8 }, - { 0x1FC1F804u, SCPH1001_func_1FC1F778_cont_BFC1F804 }, - { 0x1FC1F824u, SCPH1001_func_1FC1F778_cont_BFC1F824 }, - { 0x1FC1F84Cu, SCPH1001_func_1FC1F778_cont_BFC1F84C }, - { 0x1FC1F858u, SCPH1001_func_1FC1F778_cont_BFC1F858 }, - { 0x1FC1F860u, SCPH1001_func_1FC1F778_cont_BFC1F860 }, - { 0x1FC1F868u, SCPH1001_func_1FC1F778_cont_BFC1F868 }, - { 0x1FC1F86Cu, SCPH1001_func_1FC1F778_cont_BFC1F86C }, - { 0x1FC1F878u, SCPH1001_func_1FC1F778_cont_BFC1F878 }, - { 0x1FC1F8A8u, SCPH1001_func_1FC1F778_cont_BFC1F8A8 }, - { 0x1FC1F8D4u, SCPH1001_func_1FC1F778_cont_BFC1F8D4 }, - { 0x1FC1F8DCu, SCPH1001_func_1FC1F778_cont_BFC1F8DC }, - { 0x1FC1F8E4u, SCPH1001_func_1FC1F778_cont_BFC1F8E4 }, - { 0x1FC1F8F8u, SCPH1001_func_1FC1F778_cont_BFC1F8F8 }, - { 0x1FC1F904u, SCPH1001_func_1FC1F778_cont_BFC1F904 }, - { 0x1FC1F924u, SCPH1001_func_1FC1F778_cont_BFC1F924 }, - { 0x1FC1F92Cu, SCPH1001_func_1FC1F778_cont_BFC1F92C }, - { 0x1FC1F934u, SCPH1001_func_1FC1F778_cont_BFC1F934 }, - { 0x1FC1F948u, SCPH1001_func_1FC1F778_cont_BFC1F948 }, - { 0x1FC1F954u, SCPH1001_func_1FC1F778_cont_BFC1F954 }, - { 0x1FC1F970u, SCPH1001_func_1FC1F778_cont_BFC1F970 }, - { 0x1FC1F980u, SCPH1001_func_1FC1F980 }, - { 0x1FC1F998u, SCPH1001_func_1FC1F980_cont_BFC1F998 }, - { 0x1FC1F9BCu, SCPH1001_func_1FC1F980_cont_BFC1F9BC }, - { 0x1FC1F9C4u, SCPH1001_func_1FC1F980_cont_BFC1F9C4 }, - { 0x1FC1F9D0u, SCPH1001_func_1FC1F980_cont_BFC1F9D0 }, - { 0x1FC1F9D8u, SCPH1001_func_1FC1F980_cont_BFC1F9D8 }, - { 0x1FC1F9E0u, SCPH1001_func_1FC1F980_cont_BFC1F9E0 }, - { 0x1FC1F9F4u, SCPH1001_func_1FC1F980_cont_BFC1F9F4 }, - { 0x1FC1F9F8u, SCPH1001_func_1FC1F980_cont_BFC1F9F8 }, - { 0x1FC1FA0Cu, SCPH1001_func_1FC1F980_cont_BFC1FA0C }, - { 0x1FC1FA14u, SCPH1001_func_1FC1F980_cont_BFC1FA14 }, - { 0x1FC1FA1Cu, SCPH1001_func_1FC1F980_cont_BFC1FA1C }, - { 0x1FC1FA24u, SCPH1001_func_1FC1F980_cont_BFC1FA24 }, - { 0x1FC1FA2Cu, SCPH1001_func_1FC1F980_cont_BFC1FA2C }, - { 0x1FC1FA34u, SCPH1001_func_1FC1F980_cont_BFC1FA34 }, - { 0x1FC1FA44u, SCPH1001_func_1FC1F980_cont_BFC1FA44 }, - { 0x1FC1FA50u, SCPH1001_func_1FC1F980_cont_BFC1FA50 }, - { 0x1FC1FA54u, SCPH1001_func_1FC1F980_cont_BFC1FA54 }, - { 0x1FC1FA78u, SCPH1001_func_1FC1F980_cont_BFC1FA78 }, - { 0x1FC1FA80u, SCPH1001_func_1FC1F980_cont_BFC1FA80 }, - { 0x1FC1FA88u, SCPH1001_func_1FC1F980_cont_BFC1FA88 }, - { 0x1FC1FA94u, SCPH1001_func_1FC1F980_cont_BFC1FA94 }, - { 0x1FC1FAA8u, SCPH1001_func_1FC1F980_cont_BFC1FAA8 }, - { 0x1FC1FABCu, SCPH1001_func_1FC1F980_cont_BFC1FABC }, - { 0x1FC1FADCu, SCPH1001_func_1FC1F980_cont_BFC1FADC }, - { 0x1FC1FAE8u, SCPH1001_func_1FC1F980_cont_BFC1FAE8 }, - { 0x1FC1FAFCu, SCPH1001_func_1FC1F980_cont_BFC1FAFC }, - { 0x1FC1FB10u, SCPH1001_func_1FC1F980_cont_BFC1FB10 }, - { 0x1FC1FB18u, SCPH1001_func_1FC1F980_cont_BFC1FB18 }, - { 0x1FC1FB20u, SCPH1001_func_1FC1F980_cont_BFC1FB20 }, - { 0x1FC1FB40u, SCPH1001_func_1FC1F980_cont_BFC1FB40 }, - { 0x1FC1FB48u, SCPH1001_func_1FC1F980_cont_BFC1FB48 }, - { 0x1FC1FB4Cu, SCPH1001_func_1FC1F980_cont_BFC1FB4C }, - { 0x1FC1FB54u, SCPH1001_func_1FC1F980_cont_BFC1FB54 }, - { 0x1FC1FB5Cu, SCPH1001_func_1FC1F980_cont_BFC1FB5C }, - { 0x1FC1FB80u, SCPH1001_func_1FC1F980_cont_BFC1FB80 }, - { 0x1FC1FB84u, SCPH1001_func_1FC1F980_cont_BFC1FB84 }, - { 0x1FC1FB8Cu, SCPH1001_func_1FC1F980_cont_BFC1FB8C }, - { 0x1FC1FB94u, SCPH1001_func_1FC1F980_cont_BFC1FB94 }, - { 0x1FC1FB9Cu, SCPH1001_func_1FC1F980_cont_BFC1FB9C }, - { 0x1FC1FBA4u, SCPH1001_func_1FC1F980_cont_BFC1FBA4 }, - { 0x1FC1FBACu, SCPH1001_func_1FC1F980_cont_BFC1FBAC }, - { 0x1FC1FBB4u, SCPH1001_func_1FC1F980_cont_BFC1FBB4 }, - { 0x1FC1FBB8u, SCPH1001_func_1FC1F980_cont_BFC1FBB8 }, - { 0x1FC1FBD8u, SCPH1001_func_1FC1F980_cont_BFC1FBD8 }, - { 0x1FC1FBE0u, SCPH1001_func_1FC1F980_cont_BFC1FBE0 }, - { 0x1FC1FBE8u, SCPH1001_func_1FC1F980_cont_BFC1FBE8 }, - { 0x1FC1FBFCu, SCPH1001_func_1FC1F980_cont_BFC1FBFC }, - { 0x1FC1FC04u, SCPH1001_func_1FC1F980_cont_BFC1FC04 }, - { 0x1FC1FC18u, SCPH1001_func_1FC1F980_cont_BFC1FC18 }, - { 0x1FC1FC20u, SCPH1001_func_1FC1F980_cont_BFC1FC20 }, - { 0x1FC1FC28u, SCPH1001_func_1FC1F980_cont_BFC1FC28 }, - { 0x1FC1FC30u, SCPH1001_func_1FC1F980_cont_BFC1FC30 }, - { 0x1FC1FC38u, SCPH1001_func_1FC1F980_cont_BFC1FC38 }, - { 0x1FC1FC40u, SCPH1001_func_1FC1F980_cont_BFC1FC40 }, - { 0x1FC1FC50u, SCPH1001_func_1FC1F980_cont_BFC1FC50 }, - { 0x1FC1FC5Cu, SCPH1001_func_1FC1F980_cont_BFC1FC5C }, - { 0x1FC1FC60u, SCPH1001_func_1FC1F980_cont_BFC1FC60 }, - { 0x1FC1FC84u, SCPH1001_func_1FC1F980_cont_BFC1FC84 }, - { 0x1FC1FC8Cu, SCPH1001_func_1FC1F980_cont_BFC1FC8C }, - { 0x1FC1FC94u, SCPH1001_func_1FC1F980_cont_BFC1FC94 }, - { 0x1FC1FCB8u, SCPH1001_func_1FC1F980_cont_BFC1FCB8 }, - { 0x1FC1FCBCu, SCPH1001_func_1FC1F980_cont_BFC1FCBC }, - { 0x1FC1FFA8u, SCPH1001_func_1FC1FFA8 }, - { 0x1FC1FFC4u, SCPH1001_func_1FC1FFA8_cont_BFC1FFC4 }, - { 0x1FC1FFD0u, SCPH1001_func_1FC1FFA8_cont_BFC1FFD0 }, - { 0x1FC1FFE4u, SCPH1001_func_1FC1FFA8_cont_BFC1FFE4 }, - { 0x1FC1FFF0u, SCPH1001_func_1FC1FFA8_cont_BFC1FFF0 }, - { 0x1FC20014u, SCPH1001_func_1FC1FFA8_cont_BFC20014 }, - { 0x1FC2001Cu, SCPH1001_func_1FC1FFA8_cont_BFC2001C }, - { 0x1FC20028u, SCPH1001_func_1FC1FFA8_cont_BFC20028 }, - { 0x1FC20034u, SCPH1001_func_1FC1FFA8_cont_BFC20034 }, - { 0x1FC2003Cu, SCPH1001_func_1FC1FFA8_cont_BFC2003C }, - { 0x1FC20048u, SCPH1001_func_1FC1FFA8_cont_BFC20048 }, - { 0x1FC2005Cu, SCPH1001_func_1FC1FFA8_cont_BFC2005C }, - { 0x1FC20064u, SCPH1001_func_1FC1FFA8_cont_BFC20064 }, - { 0x1FC20084u, SCPH1001_func_1FC1FFA8_cont_BFC20084 }, - { 0x1FC2008Cu, SCPH1001_func_1FC1FFA8_cont_BFC2008C }, - { 0x1FC20094u, SCPH1001_func_1FC1FFA8_cont_BFC20094 }, - { 0x1FC200B0u, SCPH1001_func_1FC1FFA8_cont_BFC200B0 }, - { 0x1FC200C0u, SCPH1001_func_1FC1FFA8_cont_BFC200C0 }, - { 0x1FC200C8u, SCPH1001_func_1FC1FFA8_cont_BFC200C8 }, - { 0x1FC200DCu, SCPH1001_func_1FC1FFA8_cont_BFC200DC }, - { 0x1FC200FCu, SCPH1001_func_1FC1FFA8_cont_BFC200FC }, - { 0x1FC20104u, SCPH1001_func_1FC1FFA8_cont_BFC20104 }, - { 0x1FC20110u, SCPH1001_func_1FC1FFA8_cont_BFC20110 }, - { 0x1FC20124u, SCPH1001_func_1FC1FFA8_cont_BFC20124 }, - { 0x1FC2012Cu, SCPH1001_func_1FC1FFA8_cont_BFC2012C }, - { 0x1FC20140u, SCPH1001_func_1FC1FFA8_cont_BFC20140 }, - { 0x1FC20150u, SCPH1001_func_1FC1FFA8_cont_BFC20150 }, - { 0x1FC2016Cu, SCPH1001_func_1FC1FFA8_cont_BFC2016C }, - { 0x1FC20174u, SCPH1001_func_1FC1FFA8_cont_BFC20174 }, - { 0x1FC20188u, SCPH1001_func_1FC1FFA8_cont_BFC20188 }, - { 0x1FC201A8u, SCPH1001_func_1FC1FFA8_cont_BFC201A8 }, - { 0x1FC201BCu, SCPH1001_func_1FC1FFA8_cont_BFC201BC }, - { 0x1FC201C4u, SCPH1001_func_1FC1FFA8_cont_BFC201C4 }, - { 0x1FC201D8u, SCPH1001_func_1FC1FFA8_cont_BFC201D8 }, - { 0x1FC201E8u, SCPH1001_func_1FC1FFA8_cont_BFC201E8 }, - { 0x1FC20204u, SCPH1001_func_1FC1FFA8_cont_BFC20204 }, - { 0x1FC2020Cu, SCPH1001_func_1FC1FFA8_cont_BFC2020C }, - { 0x1FC2022Cu, SCPH1001_func_1FC1FFA8_cont_BFC2022C }, - { 0x1FC20230u, SCPH1001_func_1FC1FFA8_cont_BFC20230 }, - { 0x1FC20238u, SCPH1001_func_1FC1FFA8_cont_BFC20238 }, - { 0x1FC20250u, SCPH1001_func_1FC1FFA8_cont_BFC20250 }, - { 0x1FC20260u, SCPH1001_func_1FC1FFA8_cont_BFC20260 }, - { 0x1FC20268u, SCPH1001_func_1FC1FFA8_cont_BFC20268 }, - { 0x1FC2027Cu, SCPH1001_func_1FC1FFA8_cont_BFC2027C }, - { 0x1FC2029Cu, SCPH1001_func_1FC1FFA8_cont_BFC2029C }, - { 0x1FC202B0u, SCPH1001_func_1FC1FFA8_cont_BFC202B0 }, - { 0x1FC202BCu, SCPH1001_func_1FC1FFA8_cont_BFC202BC }, - { 0x1FC202C0u, SCPH1001_func_1FC1FFA8_cont_BFC202C0 }, - { 0x1FC202C8u, SCPH1001_func_1FC1FFA8_cont_BFC202C8 }, - { 0x1FC202D0u, SCPH1001_func_1FC1FFA8_cont_BFC202D0 }, - { 0x1FC20338u, SCPH1001_func_1FC20338 }, - { 0x1FC20348u, SCPH1001_func_1FC20338_cont_BFC20348 }, - { 0x1FC20350u, SCPH1001_func_1FC20338_cont_BFC20350 }, - { 0x1FC20364u, SCPH1001_func_1FC20338_cont_BFC20364 }, - { 0x1FC20378u, SCPH1001_func_1FC20338_cont_BFC20378 }, - { 0x1FC20380u, SCPH1001_func_1FC20338_cont_BFC20380 }, - { 0x1FC20394u, SCPH1001_func_1FC20338_cont_BFC20394 }, - { 0x1FC2039Cu, SCPH1001_func_1FC20338_cont_BFC2039C }, - { 0x1FC203A8u, SCPH1001_func_1FC20338_cont_BFC203A8 }, - { 0x1FC203BCu, SCPH1001_func_1FC20338_cont_BFC203BC }, - { 0x1FC203C4u, SCPH1001_func_1FC20338_cont_BFC203C4 }, - { 0x1FC203D0u, SCPH1001_func_1FC20338_cont_BFC203D0 }, - { 0x1FC203D8u, SCPH1001_func_1FC20338_cont_BFC203D8 }, - { 0x1FC203E4u, SCPH1001_func_1FC20338_cont_BFC203E4 }, - { 0x1FC203F0u, SCPH1001_func_1FC20338_cont_BFC203F0 }, - { 0x1FC20404u, SCPH1001_func_1FC20338_cont_BFC20404 }, - { 0x1FC20410u, SCPH1001_func_1FC20338_cont_BFC20410 }, - { 0x1FC2041Cu, SCPH1001_func_1FC20338_cont_BFC2041C }, - { 0x1FC20428u, SCPH1001_func_1FC20338_cont_BFC20428 }, - { 0x1FC20430u, SCPH1001_func_1FC20338_cont_BFC20430 }, - { 0x1FC2043Cu, SCPH1001_func_1FC20338_cont_BFC2043C }, - { 0x1FC20450u, SCPH1001_func_1FC20338_cont_BFC20450 }, - { 0x1FC2045Cu, SCPH1001_func_1FC20338_cont_BFC2045C }, - { 0x1FC20464u, SCPH1001_func_1FC20338_cont_BFC20464 }, - { 0x1FC2046Cu, SCPH1001_func_1FC20338_cont_BFC2046C }, - { 0x1FC2048Cu, SCPH1001_func_1FC20338_cont_BFC2048C }, - { 0x1FC20490u, SCPH1001_func_1FC20338_cont_BFC20490 }, - { 0x1FC2049Cu, SCPH1001_func_1FC20338_cont_BFC2049C }, - { 0x1FC204A4u, SCPH1001_func_1FC20338_cont_BFC204A4 }, - { 0x1FC204ACu, SCPH1001_func_1FC20338_cont_BFC204AC }, - { 0x1FC204C0u, SCPH1001_func_1FC20338_cont_BFC204C0 }, - { 0x1FC204D4u, SCPH1001_func_1FC20338_cont_BFC204D4 }, - { 0x1FC204DCu, SCPH1001_func_1FC20338_cont_BFC204DC }, - { 0x1FC204FCu, SCPH1001_func_1FC20338_cont_BFC204FC }, - { 0x1FC20510u, SCPH1001_func_1FC20338_cont_BFC20510 }, - { 0x1FC20528u, SCPH1001_func_1FC20338_cont_BFC20528 }, - { 0x1FC2053Cu, SCPH1001_func_1FC20338_cont_BFC2053C }, - { 0x1FC20550u, SCPH1001_func_1FC20338_cont_BFC20550 }, - { 0x1FC20558u, SCPH1001_func_1FC20338_cont_BFC20558 }, - { 0x1FC20560u, SCPH1001_func_1FC20338_cont_BFC20560 }, - { 0x1FC20580u, SCPH1001_func_1FC20338_cont_BFC20580 }, - { 0x1FC20584u, SCPH1001_func_1FC20338_cont_BFC20584 }, - { 0x1FC20590u, SCPH1001_func_1FC20338_cont_BFC20590 }, - { 0x1FC205A4u, SCPH1001_func_1FC20338_cont_BFC205A4 }, - { 0x1FC205B8u, SCPH1001_func_1FC20338_cont_BFC205B8 }, - { 0x1FC205C0u, SCPH1001_func_1FC20338_cont_BFC205C0 }, - { 0x1FC205CCu, SCPH1001_func_1FC20338_cont_BFC205CC }, - { 0x1FC205E0u, SCPH1001_func_1FC20338_cont_BFC205E0 }, - { 0x1FC205E8u, SCPH1001_func_1FC20338_cont_BFC205E8 }, - { 0x1FC205F0u, SCPH1001_func_1FC20338_cont_BFC205F0 }, - { 0x1FC205F8u, SCPH1001_func_1FC20338_cont_BFC205F8 }, - { 0x1FC20600u, SCPH1001_func_1FC20338_cont_BFC20600 }, - { 0x1FC20608u, SCPH1001_func_1FC20338_cont_BFC20608 }, - { 0x1FC20610u, SCPH1001_func_1FC20338_cont_BFC20610 }, - { 0x1FC20618u, SCPH1001_func_1FC20338_cont_BFC20618 }, - { 0x1FC2062Cu, SCPH1001_func_1FC20338_cont_BFC2062C }, - { 0x1FC20634u, SCPH1001_func_1FC20338_cont_BFC20634 }, - { 0x1FC2063Cu, SCPH1001_func_1FC20338_cont_BFC2063C }, - { 0x1FC20650u, SCPH1001_func_1FC20338_cont_BFC20650 }, - { 0x1FC20670u, SCPH1001_func_1FC20338_cont_BFC20670 }, - { 0x1FC2069Cu, SCPH1001_func_1FC2069C }, - { 0x1FC206ACu, SCPH1001_func_1FC2069C_cont_BFC206AC }, - { 0x1FC206B4u, SCPH1001_func_1FC2069C_cont_BFC206B4 }, - { 0x1FC206C8u, SCPH1001_func_1FC2069C_cont_BFC206C8 }, - { 0x1FC206D0u, SCPH1001_func_1FC2069C_cont_BFC206D0 }, - { 0x1FC206E8u, SCPH1001_func_1FC2069C_cont_BFC206E8 }, - { 0x1FC206F0u, SCPH1001_func_1FC2069C_cont_BFC206F0 }, - { 0x1FC206FCu, SCPH1001_func_1FC2069C_cont_BFC206FC }, - { 0x1FC20704u, SCPH1001_func_1FC2069C_cont_BFC20704 }, - { 0x1FC20718u, SCPH1001_func_1FC2069C_cont_BFC20718 }, - { 0x1FC20728u, SCPH1001_func_1FC2069C_cont_BFC20728 }, - { 0x1FC20730u, SCPH1001_func_1FC2069C_cont_BFC20730 }, - { 0x1FC2073Cu, SCPH1001_func_1FC2069C_cont_BFC2073C }, - { 0x1FC20744u, SCPH1001_func_1FC2069C_cont_BFC20744 }, - { 0x1FC20758u, SCPH1001_func_1FC2069C_cont_BFC20758 }, - { 0x1FC20764u, SCPH1001_func_1FC2069C_cont_BFC20764 }, - { 0x1FC20770u, SCPH1001_func_1FC2069C_cont_BFC20770 }, - { 0x1FC2077Cu, SCPH1001_func_1FC2069C_cont_BFC2077C }, - { 0x1FC20784u, SCPH1001_func_1FC2069C_cont_BFC20784 }, - { 0x1FC20790u, SCPH1001_func_1FC2069C_cont_BFC20790 }, - { 0x1FC20798u, SCPH1001_func_1FC2069C_cont_BFC20798 }, - { 0x1FC207ACu, SCPH1001_func_1FC2069C_cont_BFC207AC }, - { 0x1FC207C0u, SCPH1001_func_1FC2069C_cont_BFC207C0 }, - { 0x1FC207C8u, SCPH1001_func_1FC2069C_cont_BFC207C8 }, - { 0x1FC207D0u, SCPH1001_func_1FC2069C_cont_BFC207D0 }, - { 0x1FC207D8u, SCPH1001_func_1FC2069C_cont_BFC207D8 }, - { 0x1FC207ECu, SCPH1001_func_1FC2069C_cont_BFC207EC }, - { 0x1FC207F8u, SCPH1001_func_1FC2069C_cont_BFC207F8 }, - { 0x1FC20804u, SCPH1001_func_1FC2069C_cont_BFC20804 }, - { 0x1FC2081Cu, SCPH1001_func_1FC2069C_cont_BFC2081C }, - { 0x1FC20844u, SCPH1001_func_1FC2069C_cont_BFC20844 }, - { 0x1FC20854u, SCPH1001_func_1FC2069C_cont_BFC20854 }, - { 0x1FC20858u, SCPH1001_func_1FC2069C_cont_BFC20858 }, - { 0x1FC20860u, SCPH1001_func_1FC2069C_cont_BFC20860 }, - { 0x1FC2086Cu, SCPH1001_func_1FC2069C_cont_BFC2086C }, - { 0x1FC20874u, SCPH1001_func_1FC2069C_cont_BFC20874 }, - { 0x1FC20878u, SCPH1001_func_1FC2069C_cont_BFC20878 }, - { 0x1FC20884u, SCPH1001_func_1FC2069C_cont_BFC20884 }, - { 0x1FC208ACu, SCPH1001_func_1FC2069C_cont_BFC208AC }, - { 0x1FC208B4u, SCPH1001_func_1FC2069C_cont_BFC208B4 }, - { 0x1FC208B8u, SCPH1001_func_1FC2069C_cont_BFC208B8 }, - { 0x1FC208BCu, SCPH1001_func_1FC2069C_cont_BFC208BC }, - { 0x1FC208DCu, SCPH1001_func_1FC2069C_cont_BFC208DC }, - { 0x1FC20908u, SCPH1001_func_1FC2069C_cont_BFC20908 }, - { 0x1FC20918u, SCPH1001_func_1FC2069C_cont_BFC20918 }, - { 0x1FC20920u, SCPH1001_func_1FC2069C_cont_BFC20920 }, - { 0x1FC20928u, SCPH1001_func_1FC2069C_cont_BFC20928 }, - { 0x1FC20930u, SCPH1001_func_1FC2069C_cont_BFC20930 }, - { 0x1FC20934u, SCPH1001_func_1FC2069C_cont_BFC20934 }, - { 0x1FC2093Cu, SCPH1001_func_1FC2069C_cont_BFC2093C }, - { 0x1FC20944u, SCPH1001_func_1FC2069C_cont_BFC20944 }, - { 0x1FC2094Cu, SCPH1001_func_1FC2069C_cont_BFC2094C }, - { 0x1FC2096Cu, SCPH1001_func_1FC2069C_cont_BFC2096C }, - { 0x1FC20974u, SCPH1001_func_1FC2069C_cont_BFC20974 }, - { 0x1FC2097Cu, SCPH1001_func_1FC2069C_cont_BFC2097C }, - { 0x1FC20990u, SCPH1001_func_1FC2069C_cont_BFC20990 }, - { 0x1FC209B0u, SCPH1001_func_1FC2069C_cont_BFC209B0 }, - { 0x1FC209D0u, SCPH1001_func_1FC2069C_cont_BFC209D0 }, - { 0x1FC20A04u, SCPH1001_func_1FC2069C_cont_BFC20A04 }, - { 0x1FC20A1Cu, SCPH1001_func_1FC2069C_cont_BFC20A1C }, - { 0x1FC20A24u, SCPH1001_func_1FC2069C_cont_BFC20A24 }, - { 0x1FC20A28u, SCPH1001_func_1FC2069C_cont_BFC20A28 }, - { 0x1FC20A30u, SCPH1001_func_1FC2069C_cont_BFC20A30 }, - { 0x1FC20A38u, SCPH1001_func_1FC2069C_cont_BFC20A38 }, - { 0x1FC20A40u, SCPH1001_func_1FC2069C_cont_BFC20A40 }, - { 0x1FC20A60u, SCPH1001_func_1FC2069C_cont_BFC20A60 }, - { 0x1FC20A68u, SCPH1001_func_1FC2069C_cont_BFC20A68 }, - { 0x1FC20A70u, SCPH1001_func_1FC2069C_cont_BFC20A70 }, - { 0x1FC20A84u, SCPH1001_func_1FC2069C_cont_BFC20A84 }, - { 0x1FC20A9Cu, SCPH1001_func_1FC2069C_cont_BFC20A9C }, - { 0x1FC20AD0u, SCPH1001_func_1FC2069C_cont_BFC20AD0 }, - { 0x1FC20AE8u, SCPH1001_func_1FC2069C_cont_BFC20AE8 }, - { 0x1FC20AF0u, SCPH1001_func_1FC2069C_cont_BFC20AF0 }, - { 0x1FC20AF4u, SCPH1001_func_1FC2069C_cont_BFC20AF4 }, - { 0x1FC20AFCu, SCPH1001_func_1FC2069C_cont_BFC20AFC }, - { 0x1FC20B04u, SCPH1001_func_1FC2069C_cont_BFC20B04 }, - { 0x1FC20B0Cu, SCPH1001_func_1FC2069C_cont_BFC20B0C }, - { 0x1FC20B14u, SCPH1001_func_1FC2069C_cont_BFC20B14 }, - { 0x1FC20B18u, SCPH1001_func_1FC2069C_cont_BFC20B18 }, - { 0x1FC20B20u, SCPH1001_func_1FC2069C_cont_BFC20B20 }, - { 0x1FC20B28u, SCPH1001_func_1FC2069C_cont_BFC20B28 }, - { 0x1FC20B30u, SCPH1001_func_1FC2069C_cont_BFC20B30 }, - { 0x1FC20B50u, SCPH1001_func_1FC2069C_cont_BFC20B50 }, - { 0x1FC20B60u, SCPH1001_func_1FC20B60 }, - { 0x1FC20B74u, SCPH1001_func_1FC20B60_cont_BFC20B74 }, - { 0x1FC20B7Cu, SCPH1001_func_1FC20B60_cont_BFC20B7C }, - { 0x1FC20B94u, SCPH1001_func_1FC20B60_cont_BFC20B94 }, - { 0x1FC20B9Cu, SCPH1001_func_1FC20B9C }, - { 0x1FC20BB0u, SCPH1001_func_1FC20B9C_cont_BFC20BB0 }, - { 0x1FC20BB8u, SCPH1001_func_1FC20B9C_cont_BFC20BB8 }, - { 0x1FC20BDCu, SCPH1001_func_1FC20B9C_cont_BFC20BDC }, - { 0x1FC20BE4u, SCPH1001_func_1FC20BE4 }, - { 0x1FC20BFCu, SCPH1001_func_1FC20BE4_cont_BFC20BFC }, - { 0x1FC20C08u, SCPH1001_func_1FC20BE4_cont_BFC20C08 }, - { 0x1FC20C18u, SCPH1001_func_1FC20BE4_cont_BFC20C18 }, - { 0x1FC20C20u, SCPH1001_func_1FC20BE4_cont_BFC20C20 }, - { 0x1FC20C2Cu, SCPH1001_func_1FC20BE4_cont_BFC20C2C }, - { 0x1FC20C34u, SCPH1001_func_1FC20BE4_cont_BFC20C34 }, - { 0x1FC20C3Cu, SCPH1001_func_1FC20BE4_cont_BFC20C3C }, - { 0x1FC20C44u, SCPH1001_func_1FC20BE4_cont_BFC20C44 }, - { 0x1FC20C50u, SCPH1001_func_1FC20BE4_cont_BFC20C50 }, - { 0x1FC20C54u, SCPH1001_func_1FC20BE4_cont_BFC20C54 }, - { 0x1FC20C64u, SCPH1001_func_1FC20C64 }, - { 0x1FC20C80u, SCPH1001_func_1FC20C64_cont_BFC20C80 }, - { 0x1FC20C8Cu, SCPH1001_func_1FC20C64_cont_BFC20C8C }, - { 0x1FC20CACu, SCPH1001_func_1FC20C64_cont_BFC20CAC }, - { 0x1FC20CB4u, SCPH1001_func_1FC20C64_cont_BFC20CB4 }, - { 0x1FC20CB8u, SCPH1001_func_1FC20C64_cont_BFC20CB8 }, - { 0x1FC20CC0u, SCPH1001_func_1FC20C64_cont_BFC20CC0 }, - { 0x1FC20CC8u, SCPH1001_func_1FC20C64_cont_BFC20CC8 }, - { 0x1FC20CD0u, SCPH1001_func_1FC20C64_cont_BFC20CD0 }, - { 0x1FC20CD4u, SCPH1001_func_1FC20C64_cont_BFC20CD4 }, - { 0x1FC20CE4u, SCPH1001_func_1FC20CE4 }, - { 0x1FC20D00u, SCPH1001_func_1FC20CE4_cont_BFC20D00 }, - { 0x1FC20D0Cu, SCPH1001_func_1FC20CE4_cont_BFC20D0C }, - { 0x1FC20D14u, SCPH1001_func_1FC20CE4_cont_BFC20D14 }, - { 0x1FC20D1Cu, SCPH1001_func_1FC20CE4_cont_BFC20D1C }, - { 0x1FC20D20u, SCPH1001_func_1FC20CE4_cont_BFC20D20 }, - { 0x1FC20D28u, SCPH1001_func_1FC20CE4_cont_BFC20D28 }, - { 0x1FC20D30u, SCPH1001_func_1FC20CE4_cont_BFC20D30 }, - { 0x1FC20D38u, SCPH1001_func_1FC20CE4_cont_BFC20D38 }, - { 0x1FC20D3Cu, SCPH1001_func_1FC20CE4_cont_BFC20D3C }, - { 0x1FC20D4Cu, SCPH1001_func_1FC20D4C }, - { 0x1FC20D68u, SCPH1001_func_1FC20D4C_cont_BFC20D68 }, - { 0x1FC20D74u, SCPH1001_func_1FC20D4C_cont_BFC20D74 }, - { 0x1FC20D7Cu, SCPH1001_func_1FC20D4C_cont_BFC20D7C }, - { 0x1FC20D84u, SCPH1001_func_1FC20D4C_cont_BFC20D84 }, - { 0x1FC20D88u, SCPH1001_func_1FC20D4C_cont_BFC20D88 }, - { 0x1FC20D90u, SCPH1001_func_1FC20D4C_cont_BFC20D90 }, - { 0x1FC20D98u, SCPH1001_func_1FC20D4C_cont_BFC20D98 }, - { 0x1FC20DA0u, SCPH1001_func_1FC20D4C_cont_BFC20DA0 }, - { 0x1FC20DA4u, SCPH1001_func_1FC20D4C_cont_BFC20DA4 }, - { 0x1FC20DB4u, SCPH1001_func_1FC20DB4 }, - { 0x1FC20DC8u, SCPH1001_func_1FC20DB4_cont_BFC20DC8 }, - { 0x1FC20DD4u, SCPH1001_func_1FC20DB4_cont_BFC20DD4 }, - { 0x1FC20DDCu, SCPH1001_func_1FC20DB4_cont_BFC20DDC }, - { 0x1FC20DE4u, SCPH1001_func_1FC20DB4_cont_BFC20DE4 }, - { 0x1FC20DE8u, SCPH1001_func_1FC20DB4_cont_BFC20DE8 }, - { 0x1FC20DF0u, SCPH1001_func_1FC20DB4_cont_BFC20DF0 }, - { 0x1FC20DF8u, SCPH1001_func_1FC20DB4_cont_BFC20DF8 }, - { 0x1FC20E00u, SCPH1001_func_1FC20DB4_cont_BFC20E00 }, - { 0x1FC20E04u, SCPH1001_func_1FC20DB4_cont_BFC20E04 }, - { 0x1FC20E10u, SCPH1001_func_1FC20E10 }, - { 0x1FC20E24u, SCPH1001_func_1FC20E10_cont_BFC20E24 }, - { 0x1FC20E30u, SCPH1001_func_1FC20E10_cont_BFC20E30 }, - { 0x1FC20E38u, SCPH1001_func_1FC20E10_cont_BFC20E38 }, - { 0x1FC20E40u, SCPH1001_func_1FC20E10_cont_BFC20E40 }, - { 0x1FC20E44u, SCPH1001_func_1FC20E10_cont_BFC20E44 }, - { 0x1FC20E4Cu, SCPH1001_func_1FC20E10_cont_BFC20E4C }, - { 0x1FC20E54u, SCPH1001_func_1FC20E10_cont_BFC20E54 }, - { 0x1FC20E5Cu, SCPH1001_func_1FC20E10_cont_BFC20E5C }, - { 0x1FC20E60u, SCPH1001_func_1FC20E10_cont_BFC20E60 }, - { 0x1FC20E6Cu, SCPH1001_func_1FC20E6C }, - { 0x1FC20E80u, SCPH1001_func_1FC20E6C_cont_BFC20E80 }, - { 0x1FC20E8Cu, SCPH1001_func_1FC20E6C_cont_BFC20E8C }, - { 0x1FC20E94u, SCPH1001_func_1FC20E6C_cont_BFC20E94 }, - { 0x1FC20E9Cu, SCPH1001_func_1FC20E6C_cont_BFC20E9C }, - { 0x1FC20EA0u, SCPH1001_func_1FC20E6C_cont_BFC20EA0 }, - { 0x1FC20EA8u, SCPH1001_func_1FC20E6C_cont_BFC20EA8 }, - { 0x1FC20EB0u, SCPH1001_func_1FC20E6C_cont_BFC20EB0 }, - { 0x1FC20EB8u, SCPH1001_func_1FC20E6C_cont_BFC20EB8 }, - { 0x1FC20EBCu, SCPH1001_func_1FC20E6C_cont_BFC20EBC }, - { 0x1FC20EC8u, SCPH1001_func_1FC20EC8 }, - { 0x1FC20EDCu, SCPH1001_func_1FC20EC8_cont_BFC20EDC }, - { 0x1FC20EE8u, SCPH1001_func_1FC20EC8_cont_BFC20EE8 }, - { 0x1FC20EF0u, SCPH1001_func_1FC20EC8_cont_BFC20EF0 }, - { 0x1FC20EF8u, SCPH1001_func_1FC20EC8_cont_BFC20EF8 }, - { 0x1FC20EFCu, SCPH1001_func_1FC20EC8_cont_BFC20EFC }, - { 0x1FC20F04u, SCPH1001_func_1FC20EC8_cont_BFC20F04 }, - { 0x1FC20F0Cu, SCPH1001_func_1FC20EC8_cont_BFC20F0C }, - { 0x1FC20F14u, SCPH1001_func_1FC20EC8_cont_BFC20F14 }, - { 0x1FC20F18u, SCPH1001_func_1FC20EC8_cont_BFC20F18 }, - { 0x1FC20F24u, SCPH1001_func_1FC20F24 }, - { 0x1FC20F40u, SCPH1001_func_1FC20F24_cont_BFC20F40 }, - { 0x1FC20F4Cu, SCPH1001_func_1FC20F24_cont_BFC20F4C }, - { 0x1FC20F54u, SCPH1001_func_1FC20F24_cont_BFC20F54 }, - { 0x1FC20F5Cu, SCPH1001_func_1FC20F24_cont_BFC20F5C }, - { 0x1FC20F60u, SCPH1001_func_1FC20F24_cont_BFC20F60 }, - { 0x1FC20F68u, SCPH1001_func_1FC20F24_cont_BFC20F68 }, - { 0x1FC20F70u, SCPH1001_func_1FC20F24_cont_BFC20F70 }, - { 0x1FC20F78u, SCPH1001_func_1FC20F24_cont_BFC20F78 }, - { 0x1FC20F7Cu, SCPH1001_func_1FC20F24_cont_BFC20F7C }, - { 0x1FC20F8Cu, SCPH1001_func_1FC20F8C }, - { 0x1FC20FA0u, SCPH1001_func_1FC20F8C_cont_BFC20FA0 }, - { 0x1FC20FACu, SCPH1001_func_1FC20F8C_cont_BFC20FAC }, - { 0x1FC20FB4u, SCPH1001_func_1FC20F8C_cont_BFC20FB4 }, - { 0x1FC20FBCu, SCPH1001_func_1FC20F8C_cont_BFC20FBC }, - { 0x1FC20FC0u, SCPH1001_func_1FC20F8C_cont_BFC20FC0 }, - { 0x1FC20FC8u, SCPH1001_func_1FC20F8C_cont_BFC20FC8 }, - { 0x1FC20FD0u, SCPH1001_func_1FC20F8C_cont_BFC20FD0 }, - { 0x1FC20FD8u, SCPH1001_func_1FC20F8C_cont_BFC20FD8 }, - { 0x1FC20FDCu, SCPH1001_func_1FC20F8C_cont_BFC20FDC }, - { 0x1FC20FE8u, SCPH1001_func_1FC20FE8 }, - { 0x1FC20FFCu, SCPH1001_func_1FC20FE8_cont_BFC20FFC }, - { 0x1FC21008u, SCPH1001_func_1FC20FE8_cont_BFC21008 }, - { 0x1FC21010u, SCPH1001_func_1FC20FE8_cont_BFC21010 }, - { 0x1FC21018u, SCPH1001_func_1FC20FE8_cont_BFC21018 }, - { 0x1FC2101Cu, SCPH1001_func_1FC20FE8_cont_BFC2101C }, - { 0x1FC21024u, SCPH1001_func_1FC20FE8_cont_BFC21024 }, - { 0x1FC2102Cu, SCPH1001_func_1FC20FE8_cont_BFC2102C }, - { 0x1FC21034u, SCPH1001_func_1FC20FE8_cont_BFC21034 }, - { 0x1FC21038u, SCPH1001_func_1FC20FE8_cont_BFC21038 }, - { 0x1FC21044u, SCPH1001_func_1FC21044 }, - { 0x1FC21060u, SCPH1001_func_1FC21044_cont_BFC21060 }, - { 0x1FC2106Cu, SCPH1001_func_1FC21044_cont_BFC2106C }, - { 0x1FC21074u, SCPH1001_func_1FC21044_cont_BFC21074 }, - { 0x1FC2107Cu, SCPH1001_func_1FC21044_cont_BFC2107C }, - { 0x1FC21088u, SCPH1001_func_1FC21044_cont_BFC21088 }, - { 0x1FC21090u, SCPH1001_func_1FC21044_cont_BFC21090 }, - { 0x1FC21098u, SCPH1001_func_1FC21044_cont_BFC21098 }, - { 0x1FC210A0u, SCPH1001_func_1FC21044_cont_BFC210A0 }, - { 0x1FC210ACu, SCPH1001_func_1FC21044_cont_BFC210AC }, - { 0x1FC210B0u, SCPH1001_func_1FC21044_cont_BFC210B0 }, - { 0x1FC210C0u, SCPH1001_func_1FC210C0 }, - { 0x1FC210DCu, SCPH1001_func_1FC210C0_cont_BFC210DC }, - { 0x1FC210E8u, SCPH1001_func_1FC210C0_cont_BFC210E8 }, - { 0x1FC210F0u, SCPH1001_func_1FC210F0 }, - { 0x1FC210F8u, SCPH1001_func_1FC210F0_cont_BFC210F8 }, - { 0x1FC210FCu, SCPH1001_func_1FC210F0_cont_BFC210FC }, - { 0x1FC21104u, SCPH1001_func_1FC210F0_cont_BFC21104 }, - { 0x1FC2110Cu, SCPH1001_func_1FC210F0_cont_BFC2110C }, - { 0x1FC21114u, SCPH1001_func_1FC210F0_cont_BFC21114 }, - { 0x1FC21118u, SCPH1001_func_1FC210F0_cont_BFC21118 }, - { 0x1FC21128u, SCPH1001_func_1FC21128 }, - { 0x1FC2113Cu, SCPH1001_func_1FC21128_cont_BFC2113C }, - { 0x1FC21148u, SCPH1001_func_1FC21128_cont_BFC21148 }, - { 0x1FC21150u, SCPH1001_func_1FC21128_cont_BFC21150 }, - { 0x1FC21158u, SCPH1001_func_1FC21128_cont_BFC21158 }, - { 0x1FC2115Cu, SCPH1001_func_1FC21128_cont_BFC2115C }, - { 0x1FC21164u, SCPH1001_func_1FC21128_cont_BFC21164 }, - { 0x1FC2116Cu, SCPH1001_func_1FC21128_cont_BFC2116C }, - { 0x1FC21174u, SCPH1001_func_1FC21128_cont_BFC21174 }, - { 0x1FC21178u, SCPH1001_func_1FC21128_cont_BFC21178 }, - { 0x1FC21184u, SCPH1001_func_1FC21184 }, - { 0x1FC211A8u, SCPH1001_func_1FC21184_cont_BFC211A8 }, - { 0x1FC211B4u, SCPH1001_func_1FC21184_cont_BFC211B4 }, - { 0x1FC211C0u, SCPH1001_func_1FC21184_cont_BFC211C0 }, - { 0x1FC211C8u, SCPH1001_func_1FC21184_cont_BFC211C8 }, - { 0x1FC211CCu, SCPH1001_func_1FC21184_cont_BFC211CC }, - { 0x1FC211D4u, SCPH1001_func_1FC21184_cont_BFC211D4 }, - { 0x1FC211E0u, SCPH1001_func_1FC21184_cont_BFC211E0 }, - { 0x1FC211E8u, SCPH1001_func_1FC21184_cont_BFC211E8 }, - { 0x1FC211ECu, SCPH1001_func_1FC21184_cont_BFC211EC }, - { 0x1FC21200u, SCPH1001_func_1FC21200 }, - { 0x1FC21224u, SCPH1001_func_1FC21200_cont_BFC21224 }, - { 0x1FC21228u, SCPH1001_func_1FC21200_cont_BFC21228 }, - { 0x1FC21230u, SCPH1001_func_1FC21200_cont_BFC21230 }, - { 0x1FC2123Cu, SCPH1001_func_1FC21200_cont_BFC2123C }, - { 0x1FC21244u, SCPH1001_func_1FC21200_cont_BFC21244 }, - { 0x1FC21248u, SCPH1001_func_1FC21200_cont_BFC21248 }, - { 0x1FC2125Cu, SCPH1001_func_1FC2125C }, - { 0x1FC21278u, SCPH1001_func_1FC2125C_cont_BFC21278 }, - { 0x1FC21284u, SCPH1001_func_1FC2125C_cont_BFC21284 }, - { 0x1FC2128Cu, SCPH1001_func_1FC2125C_cont_BFC2128C }, - { 0x1FC21294u, SCPH1001_func_1FC2125C_cont_BFC21294 }, - { 0x1FC21298u, SCPH1001_func_1FC2125C_cont_BFC21298 }, - { 0x1FC212A0u, SCPH1001_func_1FC2125C_cont_BFC212A0 }, - { 0x1FC212A8u, SCPH1001_func_1FC2125C_cont_BFC212A8 }, - { 0x1FC212B0u, SCPH1001_func_1FC2125C_cont_BFC212B0 }, - { 0x1FC212B4u, SCPH1001_func_1FC2125C_cont_BFC212B4 }, - { 0x1FC212C4u, SCPH1001_func_1FC212C4 }, - { 0x1FC212D8u, SCPH1001_func_1FC212C4_cont_BFC212D8 }, - { 0x1FC212E4u, SCPH1001_func_1FC212C4_cont_BFC212E4 }, - { 0x1FC212ECu, SCPH1001_func_1FC212C4_cont_BFC212EC }, - { 0x1FC212F4u, SCPH1001_func_1FC212C4_cont_BFC212F4 }, - { 0x1FC212F8u, SCPH1001_func_1FC212C4_cont_BFC212F8 }, - { 0x1FC21300u, SCPH1001_func_1FC212C4_cont_BFC21300 }, - { 0x1FC21308u, SCPH1001_func_1FC212C4_cont_BFC21308 }, - { 0x1FC21310u, SCPH1001_func_1FC212C4_cont_BFC21310 }, - { 0x1FC21314u, SCPH1001_func_1FC212C4_cont_BFC21314 }, - { 0x1FC21320u, SCPH1001_func_1FC21320 }, - { 0x1FC2133Cu, SCPH1001_func_1FC21320_cont_BFC2133C }, - { 0x1FC21348u, SCPH1001_func_1FC21320_cont_BFC21348 }, - { 0x1FC21364u, SCPH1001_func_1FC21320_cont_BFC21364 }, - { 0x1FC2136Cu, SCPH1001_func_1FC21320_cont_BFC2136C }, - { 0x1FC21370u, SCPH1001_func_1FC21320_cont_BFC21370 }, - { 0x1FC21378u, SCPH1001_func_1FC21320_cont_BFC21378 }, - { 0x1FC21384u, SCPH1001_func_1FC21320_cont_BFC21384 }, - { 0x1FC2138Cu, SCPH1001_func_1FC21320_cont_BFC2138C }, - { 0x1FC21390u, SCPH1001_func_1FC21320_cont_BFC21390 }, - { 0x1FC213A4u, SCPH1001_func_1FC213A4 }, - { 0x1FC213BCu, SCPH1001_func_1FC213A4_cont_BFC213BC }, - { 0x1FC213C8u, SCPH1001_func_1FC213A4_cont_BFC213C8 }, - { 0x1FC213E8u, SCPH1001_func_1FC213E8 }, - { 0x1FC213F4u, SCPH1001_func_1FC213F4 }, - { 0x1FC213FCu, SCPH1001_func_1FC213FC }, - { 0x1FC21428u, SCPH1001_func_1FC213FC_cont_BFC21428 }, - { 0x1FC21430u, SCPH1001_func_1FC213FC_cont_BFC21430 }, - { 0x1FC21438u, SCPH1001_func_1FC213FC_cont_BFC21438 }, - { 0x1FC2144Cu, SCPH1001_func_1FC213FC_cont_BFC2144C }, - { 0x1FC21460u, SCPH1001_func_1FC213FC_cont_BFC21460 }, - { 0x1FC21468u, SCPH1001_func_1FC213FC_cont_BFC21468 }, - { 0x1FC2146Cu, SCPH1001_func_1FC213FC_cont_BFC2146C }, - { 0x1FC21474u, SCPH1001_func_1FC213FC_cont_BFC21474 }, - { 0x1FC21488u, SCPH1001_func_1FC213FC_cont_BFC21488 }, - { 0x1FC2148Cu, SCPH1001_func_1FC213FC_cont_BFC2148C }, - { 0x1FC214B0u, SCPH1001_func_1FC214B0 }, - { 0x1FC214CCu, SCPH1001_func_1FC214B0_cont_BFC214CC }, - { 0x1FC214E8u, SCPH1001_func_1FC214B0_cont_BFC214E8 }, - { 0x1FC214F0u, SCPH1001_func_1FC214B0_cont_BFC214F0 }, - { 0x1FC21504u, SCPH1001_func_1FC214B0_cont_BFC21504 }, - { 0x1FC2150Cu, SCPH1001_func_1FC214B0_cont_BFC2150C }, - { 0x1FC21520u, SCPH1001_func_1FC214B0_cont_BFC21520 }, - { 0x1FC21534u, SCPH1001_func_1FC214B0_cont_BFC21534 }, - { 0x1FC2153Cu, SCPH1001_func_1FC214B0_cont_BFC2153C }, - { 0x1FC21544u, SCPH1001_func_1FC214B0_cont_BFC21544 }, - { 0x1FC21554u, SCPH1001_func_1FC214B0_cont_BFC21554 }, - { 0x1FC21564u, SCPH1001_func_1FC214B0_cont_BFC21564 }, - { 0x1FC21578u, SCPH1001_func_1FC214B0_cont_BFC21578 }, - { 0x1FC21584u, SCPH1001_func_1FC214B0_cont_BFC21584 }, - { 0x1FC21598u, SCPH1001_func_1FC214B0_cont_BFC21598 }, - { 0x1FC215F8u, SCPH1001_func_1FC214B0_cont_BFC215F8 }, - { 0x1FC21608u, SCPH1001_func_1FC214B0_cont_BFC21608 }, - { 0x1FC21610u, SCPH1001_func_1FC214B0_cont_BFC21610 }, - { 0x1FC21628u, SCPH1001_func_1FC214B0_cont_BFC21628 }, - { 0x1FC2163Cu, SCPH1001_func_1FC214B0_cont_BFC2163C }, - { 0x1FC21648u, SCPH1001_func_1FC214B0_cont_BFC21648 }, - { 0x1FC21658u, SCPH1001_func_1FC214B0_cont_BFC21658 }, - { 0x1FC21660u, SCPH1001_func_1FC214B0_cont_BFC21660 }, - { 0x1FC21668u, SCPH1001_func_1FC214B0_cont_BFC21668 }, - { 0x1FC21674u, SCPH1001_func_1FC214B0_cont_BFC21674 }, - { 0x1FC2167Cu, SCPH1001_func_1FC214B0_cont_BFC2167C }, - { 0x1FC21684u, SCPH1001_func_1FC214B0_cont_BFC21684 }, - { 0x1FC2168Cu, SCPH1001_func_1FC214B0_cont_BFC2168C }, - { 0x1FC216A0u, SCPH1001_func_1FC214B0_cont_BFC216A0 }, - { 0x1FC216B4u, SCPH1001_func_1FC214B0_cont_BFC216B4 }, - { 0x1FC216BCu, SCPH1001_func_1FC214B0_cont_BFC216BC }, - { 0x1FC216C4u, SCPH1001_func_1FC214B0_cont_BFC216C4 }, - { 0x1FC216D0u, SCPH1001_func_1FC214B0_cont_BFC216D0 }, - { 0x1FC216D8u, SCPH1001_func_1FC214B0_cont_BFC216D8 }, - { 0x1FC216E4u, SCPH1001_func_1FC214B0_cont_BFC216E4 }, - { 0x1FC216ECu, SCPH1001_func_1FC214B0_cont_BFC216EC }, - { 0x1FC216F8u, SCPH1001_func_1FC214B0_cont_BFC216F8 }, - { 0x1FC21700u, SCPH1001_func_1FC214B0_cont_BFC21700 }, - { 0x1FC2170Cu, SCPH1001_func_1FC214B0_cont_BFC2170C }, - { 0x1FC21714u, SCPH1001_func_1FC214B0_cont_BFC21714 }, - { 0x1FC21720u, SCPH1001_func_1FC214B0_cont_BFC21720 }, - { 0x1FC21748u, SCPH1001_func_1FC214B0_cont_BFC21748 }, - { 0x1FC21750u, SCPH1001_func_1FC214B0_cont_BFC21750 }, - { 0x1FC2175Cu, SCPH1001_func_1FC214B0_cont_BFC2175C }, - { 0x1FC21764u, SCPH1001_func_1FC214B0_cont_BFC21764 }, - { 0x1FC21770u, SCPH1001_func_1FC214B0_cont_BFC21770 }, - { 0x1FC21778u, SCPH1001_func_1FC214B0_cont_BFC21778 }, - { 0x1FC21780u, SCPH1001_func_1FC214B0_cont_BFC21780 }, - { 0x1FC21788u, SCPH1001_func_1FC214B0_cont_BFC21788 }, - { 0x1FC21794u, SCPH1001_func_1FC214B0_cont_BFC21794 }, - { 0x1FC2179Cu, SCPH1001_func_1FC214B0_cont_BFC2179C }, - { 0x1FC217A8u, SCPH1001_func_1FC214B0_cont_BFC217A8 }, - { 0x1FC217B0u, SCPH1001_func_1FC214B0_cont_BFC217B0 }, - { 0x1FC217C0u, SCPH1001_func_1FC214B0_cont_BFC217C0 }, - { 0x1FC217C8u, SCPH1001_func_1FC214B0_cont_BFC217C8 }, - { 0x1FC217D4u, SCPH1001_func_1FC214B0_cont_BFC217D4 }, - { 0x1FC217DCu, SCPH1001_func_1FC214B0_cont_BFC217DC }, - { 0x1FC217E8u, SCPH1001_func_1FC214B0_cont_BFC217E8 }, - { 0x1FC217F0u, SCPH1001_func_1FC214B0_cont_BFC217F0 }, - { 0x1FC21800u, SCPH1001_func_1FC214B0_cont_BFC21800 }, - { 0x1FC21808u, SCPH1001_func_1FC214B0_cont_BFC21808 }, - { 0x1FC21814u, SCPH1001_func_1FC214B0_cont_BFC21814 }, - { 0x1FC2181Cu, SCPH1001_func_1FC214B0_cont_BFC2181C }, - { 0x1FC21828u, SCPH1001_func_1FC214B0_cont_BFC21828 }, - { 0x1FC21830u, SCPH1001_func_1FC214B0_cont_BFC21830 }, - { 0x1FC21840u, SCPH1001_func_1FC214B0_cont_BFC21840 }, - { 0x1FC21854u, SCPH1001_func_1FC214B0_cont_BFC21854 }, - { 0x1FC2185Cu, SCPH1001_func_1FC214B0_cont_BFC2185C }, - { 0x1FC21860u, SCPH1001_func_1FC214B0_cont_BFC21860 }, - { 0x1FC21864u, SCPH1001_func_1FC214B0_cont_BFC21864 }, - { 0x1FC21880u, SCPH1001_func_1FC214B0_cont_BFC21880 }, - { 0x1FC21888u, SCPH1001_func_1FC214B0_cont_BFC21888 }, - { 0x1FC21898u, SCPH1001_func_1FC214B0_cont_BFC21898 }, - { 0x1FC218BCu, SCPH1001_func_1FC214B0_cont_BFC218BC }, - { 0x1FC218C0u, SCPH1001_func_1FC214B0_cont_BFC218C0 }, - { 0x1FC218CCu, SCPH1001_func_1FC218CC }, - { 0x1FC218E0u, SCPH1001_func_1FC218CC_cont_BFC218E0 }, - { 0x1FC218F4u, SCPH1001_func_1FC218CC_cont_BFC218F4 }, - { 0x1FC218FCu, SCPH1001_func_1FC218CC_cont_BFC218FC }, - { 0x1FC21908u, SCPH1001_func_1FC218CC_cont_BFC21908 }, - { 0x1FC21910u, SCPH1001_func_1FC218CC_cont_BFC21910 }, - { 0x1FC21914u, SCPH1001_func_1FC218CC_cont_BFC21914 }, - { 0x1FC21924u, SCPH1001_func_1FC218CC_cont_BFC21924 }, - { 0x1FC2192Cu, SCPH1001_func_1FC218CC_cont_BFC2192C }, - { 0x1FC21930u, SCPH1001_func_1FC218CC_cont_BFC21930 }, - { 0x1FC2193Cu, SCPH1001_func_1FC2193C }, - { 0x1FC2195Cu, SCPH1001_func_1FC2193C_cont_BFC2195C }, - { 0x1FC2196Cu, SCPH1001_func_1FC2193C_cont_BFC2196C }, - { 0x1FC21974u, SCPH1001_func_1FC2193C_cont_BFC21974 }, - { 0x1FC21984u, SCPH1001_func_1FC2193C_cont_BFC21984 }, - { 0x1FC21988u, SCPH1001_func_1FC2193C_cont_BFC21988 }, - { 0x1FC21990u, SCPH1001_func_1FC2193C_cont_BFC21990 }, - { 0x1FC2199Cu, SCPH1001_func_1FC2193C_cont_BFC2199C }, - { 0x1FC21A1Cu, SCPH1001_func_1FC2193C_cont_BFC21A1C }, - { 0x1FC21A24u, SCPH1001_func_1FC2193C_cont_BFC21A24 }, - { 0x1FC21A38u, SCPH1001_func_1FC2193C_cont_BFC21A38 }, - { 0x1FC21A3Cu, SCPH1001_func_1FC2193C_cont_BFC21A3C }, - { 0x1FC21A54u, SCPH1001_func_1FC2193C_cont_BFC21A54 }, - { 0x1FC21A5Cu, SCPH1001_func_1FC2193C_cont_BFC21A5C }, - { 0x1FC21A68u, SCPH1001_func_1FC2193C_cont_BFC21A68 }, - { 0x1FC21A78u, SCPH1001_func_1FC2193C_cont_BFC21A78 }, - { 0x1FC21A9Cu, SCPH1001_func_1FC21A9C }, - { 0x1FC21AB0u, SCPH1001_func_1FC21A9C_cont_BFC21AB0 }, - { 0x1FC21ADCu, SCPH1001_func_1FC21A9C_cont_BFC21ADC }, - { 0x1FC21AF0u, SCPH1001_func_1FC21A9C_cont_BFC21AF0 }, - { 0x1FC21AF8u, SCPH1001_func_1FC21A9C_cont_BFC21AF8 }, - { 0x1FC21B04u, SCPH1001_func_1FC21A9C_cont_BFC21B04 }, - { 0x1FC21B10u, SCPH1001_func_1FC21A9C_cont_BFC21B10 }, - { 0x1FC21B28u, SCPH1001_func_1FC21A9C_cont_BFC21B28 }, - { 0x1FC21B3Cu, SCPH1001_func_1FC21A9C_cont_BFC21B3C }, - { 0x1FC21B44u, SCPH1001_func_1FC21A9C_cont_BFC21B44 }, - { 0x1FC21B4Cu, SCPH1001_func_1FC21A9C_cont_BFC21B4C }, - { 0x1FC21B5Cu, SCPH1001_func_1FC21A9C_cont_BFC21B5C }, - { 0x1FC21B6Cu, SCPH1001_func_1FC21A9C_cont_BFC21B6C }, - { 0x1FC21B78u, SCPH1001_func_1FC21A9C_cont_BFC21B78 }, - { 0x1FC21B7Cu, SCPH1001_func_1FC21A9C_cont_BFC21B7C }, - { 0x1FC21BA4u, SCPH1001_func_1FC21A9C_cont_BFC21BA4 }, - { 0x1FC21BACu, SCPH1001_func_1FC21A9C_cont_BFC21BAC }, - { 0x1FC21BBCu, SCPH1001_func_1FC21A9C_cont_BFC21BBC }, - { 0x1FC21BC8u, SCPH1001_func_1FC21A9C_cont_BFC21BC8 }, - { 0x1FC21BD8u, SCPH1001_func_1FC21A9C_cont_BFC21BD8 }, - { 0x1FC21BE0u, SCPH1001_func_1FC21A9C_cont_BFC21BE0 }, - { 0x1FC21C38u, SCPH1001_func_1FC21A9C_cont_BFC21C38 }, - { 0x1FC21C6Cu, SCPH1001_func_1FC21A9C_cont_BFC21C6C }, - { 0x1FC21C78u, SCPH1001_func_1FC21A9C_cont_BFC21C78 }, - { 0x1FC21C90u, SCPH1001_func_1FC21A9C_cont_BFC21C90 }, - { 0x1FC21D0Cu, SCPH1001_func_1FC21A9C_cont_BFC21D0C }, - { 0x1FC21D18u, SCPH1001_func_1FC21A9C_cont_BFC21D18 }, - { 0x1FC21D30u, SCPH1001_func_1FC21A9C_cont_BFC21D30 }, - { 0x1FC21D40u, SCPH1001_func_1FC21A9C_cont_BFC21D40 }, - { 0x1FC21D64u, SCPH1001_func_1FC21A9C_cont_BFC21D64 }, - { 0x1FC21D88u, SCPH1001_func_1FC21A9C_cont_BFC21D88 }, - { 0x1FC21D9Cu, SCPH1001_func_1FC21A9C_cont_BFC21D9C }, - { 0x1FC21DA4u, SCPH1001_func_1FC21A9C_cont_BFC21DA4 }, - { 0x1FC21DBCu, SCPH1001_func_1FC21A9C_cont_BFC21DBC }, - { 0x1FC21E38u, SCPH1001_func_1FC21A9C_cont_BFC21E38 }, - { 0x1FC21E44u, SCPH1001_func_1FC21A9C_cont_BFC21E44 }, - { 0x1FC21E5Cu, SCPH1001_func_1FC21A9C_cont_BFC21E5C }, - { 0x1FC21E6Cu, SCPH1001_func_1FC21A9C_cont_BFC21E6C }, - { 0x1FC21E90u, SCPH1001_func_1FC21A9C_cont_BFC21E90 }, - { 0x1FC21EB4u, SCPH1001_func_1FC21A9C_cont_BFC21EB4 }, - { 0x1FC21EB8u, SCPH1001_func_1FC21A9C_cont_BFC21EB8 }, - { 0x1FC21F10u, SCPH1001_func_1FC21A9C_cont_BFC21F10 }, - { 0x1FC21F18u, SCPH1001_func_1FC21A9C_cont_BFC21F18 }, - { 0x1FC21F2Cu, SCPH1001_func_1FC21A9C_cont_BFC21F2C }, - { 0x1FC21F6Cu, SCPH1001_func_1FC21A9C_cont_BFC21F6C }, - { 0x1FC21F78u, SCPH1001_func_1FC21A9C_cont_BFC21F78 }, - { 0x1FC21F90u, SCPH1001_func_1FC21A9C_cont_BFC21F90 }, - { 0x1FC21FA0u, SCPH1001_func_1FC21A9C_cont_BFC21FA0 }, - { 0x1FC21FC4u, SCPH1001_func_1FC21A9C_cont_BFC21FC4 }, - { 0x1FC21FE8u, SCPH1001_func_1FC21A9C_cont_BFC21FE8 }, - { 0x1FC22028u, SCPH1001_func_1FC21A9C_cont_BFC22028 }, - { 0x1FC2207Cu, SCPH1001_func_1FC21A9C_cont_BFC2207C }, - { 0x1FC2209Cu, SCPH1001_func_1FC21A9C_cont_BFC2209C }, - { 0x1FC220ACu, SCPH1001_func_1FC21A9C_cont_BFC220AC }, - { 0x1FC220BCu, SCPH1001_func_1FC21A9C_cont_BFC220BC }, - { 0x1FC220C8u, SCPH1001_func_1FC21A9C_cont_BFC220C8 }, - { 0x1FC220DCu, SCPH1001_func_1FC21A9C_cont_BFC220DC }, - { 0x1FC220E8u, SCPH1001_func_1FC21A9C_cont_BFC220E8 }, - { 0x1FC220FCu, SCPH1001_func_1FC21A9C_cont_BFC220FC }, - { 0x1FC22130u, SCPH1001_func_1FC21A9C_cont_BFC22130 }, - { 0x1FC2214Cu, SCPH1001_func_1FC21A9C_cont_BFC2214C }, - { 0x1FC22154u, SCPH1001_func_1FC21A9C_cont_BFC22154 }, - { 0x1FC22158u, SCPH1001_func_1FC21A9C_cont_BFC22158 }, - { 0x1FC22164u, SCPH1001_func_1FC22164 }, - { 0x1FC22194u, SCPH1001_func_1FC22164_cont_BFC22194 }, - { 0x1FC221A0u, SCPH1001_func_1FC22164_cont_BFC221A0 }, - { 0x1FC221A8u, SCPH1001_func_1FC22164_cont_BFC221A8 }, - { 0x1FC221B8u, SCPH1001_func_1FC22164_cont_BFC221B8 }, - { 0x1FC221C8u, SCPH1001_func_1FC22164_cont_BFC221C8 }, - { 0x1FC221D0u, SCPH1001_func_1FC22164_cont_BFC221D0 }, - { 0x1FC221E0u, SCPH1001_func_1FC22164_cont_BFC221E0 }, - { 0x1FC221F0u, SCPH1001_func_1FC22164_cont_BFC221F0 }, - { 0x1FC221F4u, SCPH1001_func_1FC22164_cont_BFC221F4 }, - { 0x1FC2221Cu, SCPH1001_func_1FC22164_cont_BFC2221C }, - { 0x1FC22234u, SCPH1001_func_1FC22164_cont_BFC22234 }, - { 0x1FC2223Cu, SCPH1001_func_1FC22164_cont_BFC2223C }, - { 0x1FC22248u, SCPH1001_func_1FC22164_cont_BFC22248 }, - { 0x1FC22258u, SCPH1001_func_1FC22164_cont_BFC22258 }, - { 0x1FC22268u, SCPH1001_func_1FC22164_cont_BFC22268 }, - { 0x1FC22278u, SCPH1001_func_1FC22164_cont_BFC22278 }, - { 0x1FC22280u, SCPH1001_func_1FC22164_cont_BFC22280 }, - { 0x1FC222B0u, SCPH1001_func_1FC22164_cont_BFC222B0 }, - { 0x1FC222BCu, SCPH1001_func_1FC22164_cont_BFC222BC }, - { 0x1FC222C4u, SCPH1001_func_1FC22164_cont_BFC222C4 }, - { 0x1FC222C8u, SCPH1001_func_1FC22164_cont_BFC222C8 }, - { 0x1FC222D4u, SCPH1001_func_1FC22164_cont_BFC222D4 }, - { 0x1FC222E0u, SCPH1001_func_1FC22164_cont_BFC222E0 }, - { 0x1FC222F0u, SCPH1001_func_1FC22164_cont_BFC222F0 }, - { 0x1FC222F4u, SCPH1001_func_1FC22164_cont_BFC222F4 }, - { 0x1FC22308u, SCPH1001_func_1FC22164_cont_BFC22308 }, - { 0x1FC2230Cu, SCPH1001_func_1FC22164_cont_BFC2230C }, - { 0x1FC22314u, SCPH1001_func_1FC22164_cont_BFC22314 }, - { 0x1FC22328u, SCPH1001_func_1FC22164_cont_BFC22328 }, - { 0x1FC22330u, SCPH1001_func_1FC22164_cont_BFC22330 }, - { 0x1FC2233Cu, SCPH1001_func_1FC22164_cont_BFC2233C }, - { 0x1FC2234Cu, SCPH1001_func_1FC22164_cont_BFC2234C }, - { 0x1FC22350u, SCPH1001_func_1FC22164_cont_BFC22350 }, - { 0x1FC22370u, SCPH1001_func_1FC22164_cont_BFC22370 }, - { 0x1FC2238Cu, SCPH1001_func_1FC22164_cont_BFC2238C }, - { 0x1FC22434u, SCPH1001_func_1FC22164_cont_BFC22434 }, - { 0x1FC224B8u, SCPH1001_func_1FC22164_cont_BFC224B8 }, - { 0x1FC224C8u, SCPH1001_func_1FC22164_cont_BFC224C8 }, - { 0x1FC22530u, SCPH1001_func_1FC22164_cont_BFC22530 }, - { 0x1FC225A8u, SCPH1001_func_1FC22164_cont_BFC225A8 }, - { 0x1FC226A8u, SCPH1001_func_1FC22164_cont_BFC226A8 }, - { 0x1FC226D0u, SCPH1001_func_1FC226D0 }, - { 0x1FC226E4u, SCPH1001_func_1FC226D0_cont_BFC226E4 }, - { 0x1FC226F8u, SCPH1001_func_1FC226D0_cont_BFC226F8 }, - { 0x1FC22700u, SCPH1001_func_1FC226D0_cont_BFC22700 }, - { 0x1FC2271Cu, SCPH1001_func_1FC226D0_cont_BFC2271C }, - { 0x1FC22724u, SCPH1001_func_1FC226D0_cont_BFC22724 }, - { 0x1FC2272Cu, SCPH1001_func_1FC226D0_cont_BFC2272C }, - { 0x1FC22734u, SCPH1001_func_1FC226D0_cont_BFC22734 }, - { 0x1FC22740u, SCPH1001_func_1FC226D0_cont_BFC22740 }, - { 0x1FC22748u, SCPH1001_func_1FC226D0_cont_BFC22748 }, - { 0x1FC22750u, SCPH1001_func_1FC226D0_cont_BFC22750 }, - { 0x1FC22758u, SCPH1001_func_1FC226D0_cont_BFC22758 }, - { 0x1FC22760u, SCPH1001_func_1FC226D0_cont_BFC22760 }, - { 0x1FC22768u, SCPH1001_func_1FC226D0_cont_BFC22768 }, - { 0x1FC22770u, SCPH1001_func_1FC226D0_cont_BFC22770 }, - { 0x1FC22778u, SCPH1001_func_1FC226D0_cont_BFC22778 }, - { 0x1FC22780u, SCPH1001_func_1FC226D0_cont_BFC22780 }, - { 0x1FC22788u, SCPH1001_func_1FC226D0_cont_BFC22788 }, - { 0x1FC22790u, SCPH1001_func_1FC226D0_cont_BFC22790 }, - { 0x1FC22798u, SCPH1001_func_1FC226D0_cont_BFC22798 }, - { 0x1FC227A0u, SCPH1001_func_1FC226D0_cont_BFC227A0 }, - { 0x1FC227A8u, SCPH1001_func_1FC226D0_cont_BFC227A8 }, - { 0x1FC227B0u, SCPH1001_func_1FC226D0_cont_BFC227B0 }, - { 0x1FC227B8u, SCPH1001_func_1FC226D0_cont_BFC227B8 }, - { 0x1FC227C0u, SCPH1001_func_1FC226D0_cont_BFC227C0 }, - { 0x1FC227CCu, SCPH1001_func_1FC226D0_cont_BFC227CC }, - { 0x1FC227D4u, SCPH1001_func_1FC226D0_cont_BFC227D4 }, - { 0x1FC227DCu, SCPH1001_func_1FC226D0_cont_BFC227DC }, - { 0x1FC227E0u, SCPH1001_func_1FC226D0_cont_BFC227E0 }, - { 0x1FC227E8u, SCPH1001_func_1FC226D0_cont_BFC227E8 }, - { 0x1FC227ECu, SCPH1001_func_1FC226D0_cont_BFC227EC }, - { 0x1FC227FCu, SCPH1001_func_1FC226D0_cont_BFC227FC }, - { 0x1FC22804u, SCPH1001_func_1FC226D0_cont_BFC22804 }, - { 0x1FC2280Cu, SCPH1001_func_1FC226D0_cont_BFC2280C }, - { 0x1FC22810u, SCPH1001_func_1FC226D0_cont_BFC22810 }, - { 0x1FC22820u, SCPH1001_func_1FC226D0_cont_BFC22820 }, - { 0x1FC22830u, SCPH1001_func_1FC226D0_cont_BFC22830 }, - { 0x1FC22840u, SCPH1001_func_1FC226D0_cont_BFC22840 }, - { 0x1FC22850u, SCPH1001_func_1FC226D0_cont_BFC22850 }, - { 0x1FC22870u, SCPH1001_func_1FC226D0_cont_BFC22870 }, - { 0x1FC22878u, SCPH1001_func_1FC226D0_cont_BFC22878 }, - { 0x1FC2288Cu, SCPH1001_func_1FC226D0_cont_BFC2288C }, - { 0x1FC22894u, SCPH1001_func_1FC226D0_cont_BFC22894 }, - { 0x1FC2289Cu, SCPH1001_func_1FC226D0_cont_BFC2289C }, - { 0x1FC228A4u, SCPH1001_func_1FC226D0_cont_BFC228A4 }, - { 0x1FC228B0u, SCPH1001_func_1FC226D0_cont_BFC228B0 }, - { 0x1FC228B8u, SCPH1001_func_1FC226D0_cont_BFC228B8 }, - { 0x1FC228C0u, SCPH1001_func_1FC226D0_cont_BFC228C0 }, - { 0x1FC228C8u, SCPH1001_func_1FC226D0_cont_BFC228C8 }, - { 0x1FC228CCu, SCPH1001_func_1FC226D0_cont_BFC228CC }, - { 0x1FC228D8u, SCPH1001_func_1FC228D8 }, - { 0x1FC228F0u, SCPH1001_func_1FC228D8_cont_BFC228F0 }, - { 0x1FC2296Cu, SCPH1001_func_1FC228D8_cont_BFC2296C }, - { 0x1FC2297Cu, SCPH1001_func_1FC228D8_cont_BFC2297C }, - { 0x1FC229A4u, SCPH1001_func_1FC228D8_cont_BFC229A4 }, - { 0x1FC229D0u, SCPH1001_func_1FC228D8_cont_BFC229D0 }, - { 0x1FC229D8u, SCPH1001_func_1FC228D8_cont_BFC229D8 }, - { 0x1FC229E0u, SCPH1001_func_1FC228D8_cont_BFC229E0 }, - { 0x1FC229F8u, SCPH1001_func_1FC228D8_cont_BFC229F8 }, - { 0x1FC22A18u, SCPH1001_func_1FC228D8_cont_BFC22A18 }, - { 0x1FC22A38u, SCPH1001_func_1FC228D8_cont_BFC22A38 }, - { 0x1FC22A58u, SCPH1001_func_1FC228D8_cont_BFC22A58 }, - { 0x1FC22A6Cu, SCPH1001_func_1FC228D8_cont_BFC22A6C }, - { 0x1FC22A7Cu, SCPH1001_func_1FC228D8_cont_BFC22A7C }, - { 0x1FC22A8Cu, SCPH1001_func_1FC228D8_cont_BFC22A8C }, - { 0x1FC22A9Cu, SCPH1001_func_1FC228D8_cont_BFC22A9C }, - { 0x1FC22AA4u, SCPH1001_func_1FC228D8_cont_BFC22AA4 }, - { 0x1FC22AACu, SCPH1001_func_1FC228D8_cont_BFC22AAC }, - { 0x1FC22AB4u, SCPH1001_func_1FC228D8_cont_BFC22AB4 }, - { 0x1FC22AC4u, SCPH1001_func_1FC228D8_cont_BFC22AC4 }, - { 0x1FC22ACCu, SCPH1001_func_1FC228D8_cont_BFC22ACC }, - { 0x1FC22B1Cu, SCPH1001_func_1FC228D8_cont_BFC22B1C }, - { 0x1FC22B28u, SCPH1001_func_1FC228D8_cont_BFC22B28 }, - { 0x1FC22B30u, SCPH1001_func_1FC228D8_cont_BFC22B30 }, - { 0x1FC22B3Cu, SCPH1001_func_1FC228D8_cont_BFC22B3C }, - { 0x1FC22B40u, SCPH1001_func_1FC228D8_cont_BFC22B40 }, - { 0x1FC22B50u, SCPH1001_func_1FC228D8_cont_BFC22B50 }, - { 0x1FC22B5Cu, SCPH1001_func_1FC228D8_cont_BFC22B5C }, - { 0x1FC22B64u, SCPH1001_func_1FC228D8_cont_BFC22B64 }, - { 0x1FC22B70u, SCPH1001_func_1FC228D8_cont_BFC22B70 }, - { 0x1FC22B74u, SCPH1001_func_1FC228D8_cont_BFC22B74 }, - { 0x1FC22B80u, SCPH1001_func_1FC22B80 }, - { 0x1FC22B94u, SCPH1001_func_1FC22B80_cont_BFC22B94 }, - { 0x1FC22BACu, SCPH1001_func_1FC22B80_cont_BFC22BAC }, - { 0x1FC22BBCu, SCPH1001_func_1FC22B80_cont_BFC22BBC }, - { 0x1FC22BC4u, SCPH1001_func_1FC22B80_cont_BFC22BC4 }, - { 0x1FC22BC8u, SCPH1001_func_1FC22B80_cont_BFC22BC8 }, - { 0x1FC22BD0u, SCPH1001_func_1FC22B80_cont_BFC22BD0 }, - { 0x1FC22BD8u, SCPH1001_func_1FC22B80_cont_BFC22BD8 }, - { 0x1FC22BE0u, SCPH1001_func_1FC22B80_cont_BFC22BE0 }, - { 0x1FC22BE8u, SCPH1001_func_1FC22B80_cont_BFC22BE8 }, - { 0x1FC22BF0u, SCPH1001_func_1FC22B80_cont_BFC22BF0 }, - { 0x1FC22BF8u, SCPH1001_func_1FC22B80_cont_BFC22BF8 }, - { 0x1FC22C00u, SCPH1001_func_1FC22B80_cont_BFC22C00 }, - { 0x1FC22C14u, SCPH1001_func_1FC22B80_cont_BFC22C14 }, - { 0x1FC22C20u, SCPH1001_func_1FC22B80_cont_BFC22C20 }, - { 0x1FC22C28u, SCPH1001_func_1FC22B80_cont_BFC22C28 }, - { 0x1FC22C2Cu, SCPH1001_func_1FC22B80_cont_BFC22C2C }, - { 0x1FC22C34u, SCPH1001_func_1FC22B80_cont_BFC22C34 }, - { 0x1FC22C3Cu, SCPH1001_func_1FC22B80_cont_BFC22C3C }, - { 0x1FC22C44u, SCPH1001_func_1FC22B80_cont_BFC22C44 }, - { 0x1FC22C48u, SCPH1001_func_1FC22B80_cont_BFC22C48 }, - { 0x1FC22C58u, SCPH1001_func_1FC22B80_cont_BFC22C58 }, - { 0x1FC22C60u, SCPH1001_func_1FC22B80_cont_BFC22C60 }, - { 0x1FC22C68u, SCPH1001_func_1FC22B80_cont_BFC22C68 }, - { 0x1FC22C6Cu, SCPH1001_func_1FC22B80_cont_BFC22C6C }, - { 0x1FC22C80u, SCPH1001_func_1FC22B80_cont_BFC22C80 }, - { 0x1FC22C88u, SCPH1001_func_1FC22B80_cont_BFC22C88 }, - { 0x1FC22C94u, SCPH1001_func_1FC22B80_cont_BFC22C94 }, - { 0x1FC22C9Cu, SCPH1001_func_1FC22B80_cont_BFC22C9C }, - { 0x1FC22CA0u, SCPH1001_func_1FC22B80_cont_BFC22CA0 }, - { 0x1FC22CA4u, SCPH1001_func_1FC22B80_cont_BFC22CA4 }, - { 0x1FC22CB0u, SCPH1001_func_1FC22B80_cont_BFC22CB0 }, - { 0x1FC22CB8u, SCPH1001_func_1FC22B80_cont_BFC22CB8 }, - { 0x1FC22CC0u, SCPH1001_func_1FC22B80_cont_BFC22CC0 }, - { 0x1FC22CC4u, SCPH1001_func_1FC22B80_cont_BFC22CC4 }, - { 0x1FC22CD4u, SCPH1001_func_1FC22B80_cont_BFC22CD4 }, - { 0x1FC22CDCu, SCPH1001_func_1FC22B80_cont_BFC22CDC }, - { 0x1FC22CE8u, SCPH1001_func_1FC22B80_cont_BFC22CE8 }, - { 0x1FC22CF0u, SCPH1001_func_1FC22B80_cont_BFC22CF0 }, - { 0x1FC22CF8u, SCPH1001_func_1FC22B80_cont_BFC22CF8 }, - { 0x1FC22D08u, SCPH1001_func_1FC22B80_cont_BFC22D08 }, - { 0x1FC22D10u, SCPH1001_func_1FC22B80_cont_BFC22D10 }, - { 0x1FC22D14u, SCPH1001_func_1FC22B80_cont_BFC22D14 }, - { 0x1FC22D1Cu, SCPH1001_func_1FC22B80_cont_BFC22D1C }, - { 0x1FC22D20u, SCPH1001_func_1FC22B80_cont_BFC22D20 }, - { 0x1FC22D38u, SCPH1001_func_1FC22B80_cont_BFC22D38 }, - { 0x1FC22D40u, SCPH1001_func_1FC22B80_cont_BFC22D40 }, - { 0x1FC22D44u, SCPH1001_func_1FC22B80_cont_BFC22D44 }, - { 0x1FC22D4Cu, SCPH1001_func_1FC22B80_cont_BFC22D4C }, - { 0x1FC22D54u, SCPH1001_func_1FC22B80_cont_BFC22D54 }, - { 0x1FC22D64u, SCPH1001_func_1FC22B80_cont_BFC22D64 }, - { 0x1FC22D68u, SCPH1001_func_1FC22B80_cont_BFC22D68 }, - { 0x1FC22D74u, SCPH1001_func_1FC22B80_cont_BFC22D74 }, - { 0x1FC22D7Cu, SCPH1001_func_1FC22B80_cont_BFC22D7C }, - { 0x1FC22D80u, SCPH1001_func_1FC22B80_cont_BFC22D80 }, - { 0x1FC22D90u, SCPH1001_func_1FC22B80_cont_BFC22D90 }, - { 0x1FC22D98u, SCPH1001_func_1FC22B80_cont_BFC22D98 }, - { 0x1FC22DA0u, SCPH1001_func_1FC22B80_cont_BFC22DA0 }, - { 0x1FC22DA8u, SCPH1001_func_1FC22B80_cont_BFC22DA8 }, - { 0x1FC22DB0u, SCPH1001_func_1FC22B80_cont_BFC22DB0 }, - { 0x1FC22DB8u, SCPH1001_func_1FC22B80_cont_BFC22DB8 }, - { 0x1FC22DC0u, SCPH1001_func_1FC22B80_cont_BFC22DC0 }, - { 0x1FC22DC8u, SCPH1001_func_1FC22B80_cont_BFC22DC8 }, - { 0x1FC22DDCu, SCPH1001_func_1FC22B80_cont_BFC22DDC }, - { 0x1FC22DE4u, SCPH1001_func_1FC22B80_cont_BFC22DE4 }, - { 0x1FC22DECu, SCPH1001_func_1FC22B80_cont_BFC22DEC }, - { 0x1FC22DF4u, SCPH1001_func_1FC22B80_cont_BFC22DF4 }, - { 0x1FC22DFCu, SCPH1001_func_1FC22B80_cont_BFC22DFC }, - { 0x1FC22E04u, SCPH1001_func_1FC22B80_cont_BFC22E04 }, - { 0x1FC22E0Cu, SCPH1001_func_1FC22B80_cont_BFC22E0C }, - { 0x1FC22E10u, SCPH1001_func_1FC22B80_cont_BFC22E10 }, - { 0x1FC22E1Cu, SCPH1001_func_1FC22E1C }, - { 0x1FC22E30u, SCPH1001_func_1FC22E1C_cont_BFC22E30 }, - { 0x1FC22E3Cu, SCPH1001_func_1FC22E1C_cont_BFC22E3C }, - { 0x1FC22E44u, SCPH1001_func_1FC22E1C_cont_BFC22E44 }, - { 0x1FC22E54u, SCPH1001_func_1FC22E1C_cont_BFC22E54 }, - { 0x1FC22E64u, SCPH1001_func_1FC22E1C_cont_BFC22E64 }, - { 0x1FC22E6Cu, SCPH1001_func_1FC22E1C_cont_BFC22E6C }, - { 0x1FC22E74u, SCPH1001_func_1FC22E1C_cont_BFC22E74 }, - { 0x1FC22E7Cu, SCPH1001_func_1FC22E1C_cont_BFC22E7C }, - { 0x1FC22E80u, SCPH1001_func_1FC22E1C_cont_BFC22E80 }, - { 0x1FC22E90u, SCPH1001_func_1FC22E90 }, - { 0x1FC22F60u, SCPH1001_func_1FC22E90_cont_BFC22F60 }, - { 0x1FC22FC4u, SCPH1001_func_1FC22E90_cont_BFC22FC4 }, - { 0x1FC22FECu, SCPH1001_func_1FC22E90_cont_BFC22FEC }, - { 0x1FC22FF8u, SCPH1001_func_1FC22E90_cont_BFC22FF8 }, - { 0x1FC23004u, SCPH1001_func_1FC22E90_cont_BFC23004 }, - { 0x1FC23008u, SCPH1001_func_1FC22E90_cont_BFC23008 }, - { 0x1FC23014u, SCPH1001_func_1FC22E90_cont_BFC23014 }, - { 0x1FC23020u, SCPH1001_func_1FC22E90_cont_BFC23020 }, - { 0x1FC2303Cu, SCPH1001_func_1FC22E90_cont_BFC2303C }, - { 0x1FC23054u, SCPH1001_func_1FC22E90_cont_BFC23054 }, - { 0x1FC23078u, SCPH1001_func_1FC23078 }, - { 0x1FC23098u, SCPH1001_func_1FC23078_cont_BFC23098 }, - { 0x1FC230A0u, SCPH1001_func_1FC23078_cont_BFC230A0 }, - { 0x1FC230ACu, SCPH1001_func_1FC23078_cont_BFC230AC }, - { 0x1FC230C4u, SCPH1001_func_1FC230C4 }, - { 0x1FC230D8u, SCPH1001_func_1FC230C4_cont_BFC230D8 }, - { 0x1FC230E0u, SCPH1001_func_1FC230C4_cont_BFC230E0 }, - { 0x1FC230E4u, SCPH1001_func_1FC230C4_cont_BFC230E4 }, - { 0x1FC230F0u, SCPH1001_func_1FC230C4_cont_BFC230F0 }, - { 0x1FC230F8u, SCPH1001_func_1FC230C4_cont_BFC230F8 }, - { 0x1FC23108u, SCPH1001_func_1FC230C4_cont_BFC23108 }, - { 0x1FC2311Cu, SCPH1001_func_1FC2311C }, - { 0x1FC23170u, SCPH1001_func_1FC2311C_cont_BFC23170 }, - { 0x1FC2317Cu, SCPH1001_func_1FC2311C_cont_BFC2317C }, - { 0x1FC23184u, SCPH1001_func_1FC2311C_cont_BFC23184 }, - { 0x1FC2318Cu, SCPH1001_func_1FC2311C_cont_BFC2318C }, - { 0x1FC231CCu, SCPH1001_func_1FC2311C_cont_BFC231CC }, - { 0x1FC231DCu, SCPH1001_func_1FC2311C_cont_BFC231DC }, - { 0x1FC231F0u, SCPH1001_func_1FC2311C_cont_BFC231F0 }, - { 0x1FC2321Cu, SCPH1001_func_1FC2311C_cont_BFC2321C }, - { 0x1FC23224u, SCPH1001_func_1FC2311C_cont_BFC23224 }, - { 0x1FC23230u, SCPH1001_func_1FC2311C_cont_BFC23230 }, - { 0x1FC23234u, SCPH1001_func_1FC2311C_cont_BFC23234 }, - { 0x1FC2324Cu, SCPH1001_func_1FC2324C }, - { 0x1FC23294u, SCPH1001_func_1FC2324C_cont_BFC23294 }, - { 0x1FC232A0u, SCPH1001_func_1FC2324C_cont_BFC232A0 }, - { 0x1FC232A8u, SCPH1001_func_1FC2324C_cont_BFC232A8 }, - { 0x1FC232B0u, SCPH1001_func_1FC2324C_cont_BFC232B0 }, - { 0x1FC232B4u, SCPH1001_func_1FC2324C_cont_BFC232B4 }, - { 0x1FC232BCu, SCPH1001_func_1FC2324C_cont_BFC232BC }, - { 0x1FC232C0u, SCPH1001_func_1FC2324C_cont_BFC232C0 }, - { 0x1FC232DCu, SCPH1001_func_1FC232DC }, - { 0x1FC232FCu, SCPH1001_func_1FC232DC_cont_BFC232FC }, - { 0x1FC2332Cu, SCPH1001_func_1FC232DC_cont_BFC2332C }, - { 0x1FC23344u, SCPH1001_func_1FC232DC_cont_BFC23344 }, - { 0x1FC23360u, SCPH1001_func_1FC232DC_cont_BFC23360 }, - { 0x1FC2337Cu, SCPH1001_func_1FC232DC_cont_BFC2337C }, - { 0x1FC233C0u, SCPH1001_func_1FC232DC_cont_BFC233C0 }, - { 0x1FC2340Cu, SCPH1001_func_1FC232DC_cont_BFC2340C }, - { 0x1FC23450u, SCPH1001_func_1FC232DC_cont_BFC23450 }, - { 0x1FC23490u, SCPH1001_func_1FC232DC_cont_BFC23490 }, - { 0x1FC234D0u, SCPH1001_func_1FC232DC_cont_BFC234D0 }, - { 0x1FC234E0u, SCPH1001_func_1FC232DC_cont_BFC234E0 }, - { 0x1FC23500u, SCPH1001_func_1FC23500 }, - { 0x1FC2350Cu, SCPH1001_func_1FC23500_cont_BFC2350C }, - { 0x1FC23514u, SCPH1001_func_1FC23500_cont_BFC23514 }, - { 0x1FC23524u, SCPH1001_func_1FC23524 }, - { 0x1FC23544u, SCPH1001_func_1FC23524_cont_BFC23544 }, - { 0x1FC23570u, SCPH1001_func_1FC23524_cont_BFC23570 }, - { 0x1FC2357Cu, SCPH1001_func_1FC23524_cont_BFC2357C }, - { 0x1FC235A4u, SCPH1001_func_1FC23524_cont_BFC235A4 }, - { 0x1FC235A8u, SCPH1001_func_1FC23524_cont_BFC235A8 }, - { 0x1FC235B0u, SCPH1001_func_1FC23524_cont_BFC235B0 }, - { 0x1FC235C4u, SCPH1001_func_1FC23524_cont_BFC235C4 }, - { 0x1FC235C8u, SCPH1001_func_1FC23524_cont_BFC235C8 }, - { 0x1FC235D0u, SCPH1001_func_1FC23524_cont_BFC235D0 }, - { 0x1FC23620u, SCPH1001_func_1FC23524_cont_BFC23620 }, - { 0x1FC23628u, SCPH1001_func_1FC23524_cont_BFC23628 }, - { 0x1FC23630u, SCPH1001_func_1FC23524_cont_BFC23630 }, - { 0x1FC23634u, SCPH1001_func_1FC23524_cont_BFC23634 }, - { 0x1FC2364Cu, SCPH1001_func_1FC23524_cont_BFC2364C }, - { 0x1FC23660u, SCPH1001_func_1FC23524_cont_BFC23660 }, - { 0x1FC236E8u, SCPH1001_func_1FC23524_cont_BFC236E8 }, - { 0x1FC23770u, SCPH1001_func_1FC23524_cont_BFC23770 }, - { 0x1FC237C0u, SCPH1001_func_1FC23524_cont_BFC237C0 }, - { 0x1FC237F4u, SCPH1001_func_1FC23524_cont_BFC237F4 }, - { 0x1FC23828u, SCPH1001_func_1FC23524_cont_BFC23828 }, - { 0x1FC23858u, SCPH1001_func_1FC23524_cont_BFC23858 }, - { 0x1FC238E0u, SCPH1001_func_1FC23524_cont_BFC238E0 }, - { 0x1FC23968u, SCPH1001_func_1FC23524_cont_BFC23968 }, - { 0x1FC239B0u, SCPH1001_func_1FC23524_cont_BFC239B0 }, - { 0x1FC239E4u, SCPH1001_func_1FC23524_cont_BFC239E4 }, - { 0x1FC23A18u, SCPH1001_func_1FC23524_cont_BFC23A18 }, - { 0x1FC23A48u, SCPH1001_func_1FC23524_cont_BFC23A48 }, - { 0x1FC23A64u, SCPH1001_func_1FC23524_cont_BFC23A64 }, - { 0x1FC23A74u, SCPH1001_func_1FC23524_cont_BFC23A74 }, - { 0x1FC23A78u, SCPH1001_func_1FC23524_cont_BFC23A78 }, - { 0x1FC23AA4u, SCPH1001_func_1FC23524_cont_BFC23AA4 }, - { 0x1FC23AB8u, SCPH1001_func_1FC23524_cont_BFC23AB8 }, - { 0x1FC23AC8u, SCPH1001_func_1FC23524_cont_BFC23AC8 }, - { 0x1FC23B3Cu, SCPH1001_func_1FC23524_cont_BFC23B3C }, - { 0x1FC23B48u, SCPH1001_func_1FC23524_cont_BFC23B48 }, - { 0x1FC23B54u, SCPH1001_func_1FC23524_cont_BFC23B54 }, - { 0x1FC23BCCu, SCPH1001_func_1FC23524_cont_BFC23BCC }, - { 0x1FC23C4Cu, SCPH1001_func_1FC23524_cont_BFC23C4C }, - { 0x1FC23D3Cu, SCPH1001_func_1FC23D3C }, - { 0x1FC23D5Cu, SCPH1001_func_1FC23D3C_cont_BFC23D5C }, - { 0x1FC23D64u, SCPH1001_func_1FC23D3C_cont_BFC23D64 }, - { 0x1FC23D74u, SCPH1001_func_1FC23D3C_cont_BFC23D74 }, - { 0x1FC23D88u, SCPH1001_func_1FC23D3C_cont_BFC23D88 }, - { 0x1FC23D90u, SCPH1001_func_1FC23D3C_cont_BFC23D90 }, - { 0x1FC23DA0u, SCPH1001_func_1FC23D3C_cont_BFC23DA0 }, - { 0x1FC23DB4u, SCPH1001_func_1FC23D3C_cont_BFC23DB4 }, - { 0x1FC23DB8u, SCPH1001_func_1FC23D3C_cont_BFC23DB8 }, - { 0x1FC23DC0u, SCPH1001_func_1FC23D3C_cont_BFC23DC0 }, - { 0x1FC23DD4u, SCPH1001_func_1FC23D3C_cont_BFC23DD4 }, - { 0x1FC23DE4u, SCPH1001_func_1FC23D3C_cont_BFC23DE4 }, - { 0x1FC23DF0u, SCPH1001_func_1FC23D3C_cont_BFC23DF0 }, - { 0x1FC23E00u, SCPH1001_func_1FC23D3C_cont_BFC23E00 }, - { 0x1FC23E10u, SCPH1001_func_1FC23D3C_cont_BFC23E10 }, - { 0x1FC23E20u, SCPH1001_func_1FC23D3C_cont_BFC23E20 }, - { 0x1FC23E2Cu, SCPH1001_func_1FC23D3C_cont_BFC23E2C }, - { 0x1FC23E38u, SCPH1001_func_1FC23D3C_cont_BFC23E38 }, - { 0x1FC23E4Cu, SCPH1001_func_1FC23D3C_cont_BFC23E4C }, - { 0x1FC23E54u, SCPH1001_func_1FC23D3C_cont_BFC23E54 }, - { 0x1FC23E70u, SCPH1001_func_1FC23D3C_cont_BFC23E70 }, - { 0x1FC23E7Cu, SCPH1001_func_1FC23D3C_cont_BFC23E7C }, - { 0x1FC23E8Cu, SCPH1001_func_1FC23D3C_cont_BFC23E8C }, - { 0x1FC23E9Cu, SCPH1001_func_1FC23D3C_cont_BFC23E9C }, - { 0x1FC23EB0u, SCPH1001_func_1FC23D3C_cont_BFC23EB0 }, - { 0x1FC23EB4u, SCPH1001_func_1FC23D3C_cont_BFC23EB4 }, - { 0x1FC23EC8u, SCPH1001_func_1FC23D3C_cont_BFC23EC8 }, - { 0x1FC23EE0u, SCPH1001_func_1FC23D3C_cont_BFC23EE0 }, - { 0x1FC23EECu, SCPH1001_func_1FC23D3C_cont_BFC23EEC }, - { 0x1FC23F04u, SCPH1001_func_1FC23D3C_cont_BFC23F04 }, - { 0x1FC23F18u, SCPH1001_func_1FC23D3C_cont_BFC23F18 }, - { 0x1FC23F28u, SCPH1001_func_1FC23D3C_cont_BFC23F28 }, - { 0x1FC23F34u, SCPH1001_func_1FC23D3C_cont_BFC23F34 }, - { 0x1FC23F40u, SCPH1001_func_1FC23D3C_cont_BFC23F40 }, - { 0x1FC23F58u, SCPH1001_func_1FC23D3C_cont_BFC23F58 }, - { 0x1FC23F6Cu, SCPH1001_func_1FC23D3C_cont_BFC23F6C }, - { 0x1FC23F74u, SCPH1001_func_1FC23D3C_cont_BFC23F74 }, - { 0x1FC23F7Cu, SCPH1001_func_1FC23D3C_cont_BFC23F7C }, - { 0x1FC23F98u, SCPH1001_func_1FC23D3C_cont_BFC23F98 }, - { 0x1FC23FA4u, SCPH1001_func_1FC23D3C_cont_BFC23FA4 }, - { 0x1FC23FB4u, SCPH1001_func_1FC23D3C_cont_BFC23FB4 }, - { 0x1FC23FC4u, SCPH1001_func_1FC23D3C_cont_BFC23FC4 }, - { 0x1FC23FD4u, SCPH1001_func_1FC23D3C_cont_BFC23FD4 }, - { 0x1FC23FF4u, SCPH1001_func_1FC23D3C_cont_BFC23FF4 }, - { 0x1FC23FFCu, SCPH1001_func_1FC23D3C_cont_BFC23FFC }, - { 0x1FC24014u, SCPH1001_func_1FC23D3C_cont_BFC24014 }, - { 0x1FC24028u, SCPH1001_func_1FC23D3C_cont_BFC24028 }, - { 0x1FC2403Cu, SCPH1001_func_1FC23D3C_cont_BFC2403C }, - { 0x1FC24058u, SCPH1001_func_1FC23D3C_cont_BFC24058 }, - { 0x1FC24064u, SCPH1001_func_1FC23D3C_cont_BFC24064 }, - { 0x1FC24074u, SCPH1001_func_1FC23D3C_cont_BFC24074 }, - { 0x1FC24084u, SCPH1001_func_1FC23D3C_cont_BFC24084 }, - { 0x1FC24094u, SCPH1001_func_1FC23D3C_cont_BFC24094 }, - { 0x1FC240BCu, SCPH1001_func_1FC23D3C_cont_BFC240BC }, - { 0x1FC240CCu, SCPH1001_func_1FC23D3C_cont_BFC240CC }, - { 0x1FC240D4u, SCPH1001_func_1FC23D3C_cont_BFC240D4 }, - { 0x1FC240DCu, SCPH1001_func_1FC23D3C_cont_BFC240DC }, - { 0x1FC240E0u, SCPH1001_func_1FC23D3C_cont_BFC240E0 }, - { 0x1FC240ECu, SCPH1001_func_1FC23D3C_cont_BFC240EC }, - { 0x1FC24108u, SCPH1001_func_1FC23D3C_cont_BFC24108 }, - { 0x1FC24114u, SCPH1001_func_1FC23D3C_cont_BFC24114 }, - { 0x1FC24124u, SCPH1001_func_1FC23D3C_cont_BFC24124 }, - { 0x1FC24134u, SCPH1001_func_1FC23D3C_cont_BFC24134 }, - { 0x1FC24144u, SCPH1001_func_1FC23D3C_cont_BFC24144 }, - { 0x1FC2416Cu, SCPH1001_func_1FC23D3C_cont_BFC2416C }, - { 0x1FC2417Cu, SCPH1001_func_1FC23D3C_cont_BFC2417C }, - { 0x1FC24184u, SCPH1001_func_1FC23D3C_cont_BFC24184 }, - { 0x1FC2418Cu, SCPH1001_func_1FC23D3C_cont_BFC2418C }, - { 0x1FC241B8u, SCPH1001_func_1FC23D3C_cont_BFC241B8 }, - { 0x1FC241D0u, SCPH1001_func_1FC23D3C_cont_BFC241D0 }, - { 0x1FC241E0u, SCPH1001_func_1FC23D3C_cont_BFC241E0 }, - { 0x1FC24208u, SCPH1001_func_1FC23D3C_cont_BFC24208 }, - { 0x1FC24218u, SCPH1001_func_1FC23D3C_cont_BFC24218 }, - { 0x1FC24228u, SCPH1001_func_1FC23D3C_cont_BFC24228 }, - { 0x1FC24238u, SCPH1001_func_1FC23D3C_cont_BFC24238 }, - { 0x1FC24248u, SCPH1001_func_1FC23D3C_cont_BFC24248 }, - { 0x1FC24250u, SCPH1001_func_1FC23D3C_cont_BFC24250 }, - { 0x1FC24254u, SCPH1001_func_1FC23D3C_cont_BFC24254 }, - { 0x1FC2425Cu, SCPH1001_func_1FC23D3C_cont_BFC2425C }, - { 0x1FC2426Cu, SCPH1001_func_1FC23D3C_cont_BFC2426C }, - { 0x1FC24274u, SCPH1001_func_1FC23D3C_cont_BFC24274 }, - { 0x1FC24278u, SCPH1001_func_1FC23D3C_cont_BFC24278 }, - { 0x1FC2427Cu, SCPH1001_func_1FC23D3C_cont_BFC2427C }, - { 0x1FC24288u, SCPH1001_func_1FC24288 }, - { 0x1FC242A0u, SCPH1001_func_1FC24288_cont_BFC242A0 }, - { 0x1FC242B4u, SCPH1001_func_1FC24288_cont_BFC242B4 }, - { 0x1FC242C8u, SCPH1001_func_1FC24288_cont_BFC242C8 }, - { 0x1FC242DCu, SCPH1001_func_1FC24288_cont_BFC242DC }, - { 0x1FC242E4u, SCPH1001_func_1FC24288_cont_BFC242E4 }, - { 0x1FC242F8u, SCPH1001_func_1FC24288_cont_BFC242F8 }, - { 0x1FC242FCu, SCPH1001_func_1FC24288_cont_BFC242FC }, - { 0x1FC24304u, SCPH1001_func_1FC24288_cont_BFC24304 }, - { 0x1FC24308u, SCPH1001_func_1FC24288_cont_BFC24308 }, - { 0x1FC24314u, SCPH1001_func_1FC24288_cont_BFC24314 }, - { 0x1FC2432Cu, SCPH1001_func_1FC24288_cont_BFC2432C }, - { 0x1FC24334u, SCPH1001_func_1FC24288_cont_BFC24334 }, - { 0x1FC24338u, SCPH1001_func_1FC24288_cont_BFC24338 }, - { 0x1FC24340u, SCPH1001_func_1FC24288_cont_BFC24340 }, - { 0x1FC24350u, SCPH1001_func_1FC24288_cont_BFC24350 }, - { 0x1FC2435Cu, SCPH1001_func_1FC24288_cont_BFC2435C }, - { 0x1FC24390u, SCPH1001_func_1FC24288_cont_BFC24390 }, - { 0x1FC24398u, SCPH1001_func_1FC24288_cont_BFC24398 }, - { 0x1FC243A0u, SCPH1001_func_1FC24288_cont_BFC243A0 }, - { 0x1FC243F8u, SCPH1001_func_1FC24288_cont_BFC243F8 }, - { 0x1FC24408u, SCPH1001_func_1FC24288_cont_BFC24408 }, - { 0x1FC2440Cu, SCPH1001_func_1FC24288_cont_BFC2440C }, - { 0x1FC24418u, SCPH1001_func_1FC24418 }, - { 0x1FC2443Cu, SCPH1001_func_1FC24418_cont_BFC2443C }, - { 0x1FC24454u, SCPH1001_func_1FC24418_cont_BFC24454 }, - { 0x1FC2447Cu, SCPH1001_func_1FC24418_cont_BFC2447C }, - { 0x1FC24484u, SCPH1001_func_1FC24418_cont_BFC24484 }, - { 0x1FC2449Cu, SCPH1001_func_1FC24418_cont_BFC2449C }, - { 0x1FC244C4u, SCPH1001_func_1FC24418_cont_BFC244C4 }, - { 0x1FC244CCu, SCPH1001_func_1FC24418_cont_BFC244CC }, - { 0x1FC244D8u, SCPH1001_func_1FC24418_cont_BFC244D8 }, - { 0x1FC244ECu, SCPH1001_func_1FC24418_cont_BFC244EC }, - { 0x1FC24550u, SCPH1001_func_1FC24418_cont_BFC24550 }, - { 0x1FC24588u, SCPH1001_func_1FC24418_cont_BFC24588 }, - { 0x1FC24598u, SCPH1001_func_1FC24418_cont_BFC24598 }, - { 0x1FC245ACu, SCPH1001_func_1FC24418_cont_BFC245AC }, - { 0x1FC245D4u, SCPH1001_func_1FC24418_cont_BFC245D4 }, - { 0x1FC245E8u, SCPH1001_func_1FC24418_cont_BFC245E8 }, - { 0x1FC245FCu, SCPH1001_func_1FC24418_cont_BFC245FC }, - { 0x1FC2462Cu, SCPH1001_func_1FC24418_cont_BFC2462C }, - { 0x1FC24640u, SCPH1001_func_1FC24640 }, - { 0x1FC24664u, SCPH1001_func_1FC24640_cont_BFC24664 }, - { 0x1FC2467Cu, SCPH1001_func_1FC24640_cont_BFC2467C }, - { 0x1FC246B8u, SCPH1001_func_1FC24640_cont_BFC246B8 }, - { 0x1FC246C4u, SCPH1001_func_1FC24640_cont_BFC246C4 }, - { 0x1FC246F0u, SCPH1001_func_1FC24640_cont_BFC246F0 }, - { 0x1FC246F8u, SCPH1001_func_1FC24640_cont_BFC246F8 }, - { 0x1FC246FCu, SCPH1001_func_1FC24640_cont_BFC246FC }, - { 0x1FC24734u, SCPH1001_func_1FC24640_cont_BFC24734 }, - { 0x1FC24740u, SCPH1001_func_1FC24640_cont_BFC24740 }, - { 0x1FC2476Cu, SCPH1001_func_1FC24640_cont_BFC2476C }, - { 0x1FC24770u, SCPH1001_func_1FC24640_cont_BFC24770 }, - { 0x1FC247CCu, SCPH1001_func_1FC24640_cont_BFC247CC }, - { 0x1FC247D8u, SCPH1001_func_1FC24640_cont_BFC247D8 }, - { 0x1FC247F0u, SCPH1001_func_1FC24640_cont_BFC247F0 }, - { 0x1FC247F8u, SCPH1001_func_1FC24640_cont_BFC247F8 }, - { 0x1FC24800u, SCPH1001_func_1FC24640_cont_BFC24800 }, - { 0x1FC2480Cu, SCPH1001_func_1FC24640_cont_BFC2480C }, - { 0x1FC24814u, SCPH1001_func_1FC24640_cont_BFC24814 }, - { 0x1FC2482Cu, SCPH1001_func_1FC24640_cont_BFC2482C }, - { 0x1FC24830u, SCPH1001_func_1FC24640_cont_BFC24830 }, - { 0x1FC2489Cu, SCPH1001_func_1FC24640_cont_BFC2489C }, - { 0x1FC248B0u, SCPH1001_func_1FC24640_cont_BFC248B0 }, - { 0x1FC248C0u, SCPH1001_func_1FC24640_cont_BFC248C0 }, - { 0x1FC248C8u, SCPH1001_func_1FC24640_cont_BFC248C8 }, - { 0x1FC248FCu, SCPH1001_func_1FC24640_cont_BFC248FC }, - { 0x1FC24904u, SCPH1001_func_1FC24640_cont_BFC24904 }, - { 0x1FC2493Cu, SCPH1001_func_1FC24640_cont_BFC2493C }, - { 0x1FC24960u, SCPH1001_func_1FC24640_cont_BFC24960 }, - { 0x1FC24978u, SCPH1001_func_1FC24640_cont_BFC24978 }, - { 0x1FC24984u, SCPH1001_func_1FC24640_cont_BFC24984 }, - { 0x1FC24988u, SCPH1001_func_1FC24640_cont_BFC24988 }, - { 0x1FC24998u, SCPH1001_func_1FC24640_cont_BFC24998 }, - { 0x1FC2499Cu, SCPH1001_func_1FC24640_cont_BFC2499C }, - { 0x1FC249A4u, SCPH1001_func_1FC24640_cont_BFC249A4 }, - { 0x1FC249A8u, SCPH1001_func_1FC24640_cont_BFC249A8 }, - { 0x1FC249B8u, SCPH1001_func_1FC24640_cont_BFC249B8 }, - { 0x1FC249D0u, SCPH1001_func_1FC24640_cont_BFC249D0 }, - { 0x1FC249D8u, SCPH1001_func_1FC24640_cont_BFC249D8 }, - { 0x1FC249DCu, SCPH1001_func_1FC24640_cont_BFC249DC }, - { 0x1FC249E0u, SCPH1001_func_1FC24640_cont_BFC249E0 }, - { 0x1FC249F0u, SCPH1001_func_1FC24640_cont_BFC249F0 }, - { 0x1FC249FCu, SCPH1001_func_1FC24640_cont_BFC249FC }, - { 0x1FC24A00u, SCPH1001_func_1FC24640_cont_BFC24A00 }, - { 0x1FC24A08u, SCPH1001_func_1FC24640_cont_BFC24A08 }, - { 0x1FC24A34u, SCPH1001_func_1FC24640_cont_BFC24A34 }, - { 0x1FC24A48u, SCPH1001_func_1FC24A48 }, - { 0x1FC24A7Cu, SCPH1001_func_1FC24A48_cont_BFC24A7C }, - { 0x1FC24A94u, SCPH1001_func_1FC24A48_cont_BFC24A94 }, - { 0x1FC24AB0u, SCPH1001_func_1FC24A48_cont_BFC24AB0 }, - { 0x1FC24AC8u, SCPH1001_func_1FC24A48_cont_BFC24AC8 }, - { 0x1FC24AE0u, SCPH1001_func_1FC24A48_cont_BFC24AE0 }, - { 0x1FC24AF0u, SCPH1001_func_1FC24A48_cont_BFC24AF0 }, - { 0x1FC24AFCu, SCPH1001_func_1FC24A48_cont_BFC24AFC }, - { 0x1FC24B44u, SCPH1001_func_1FC24A48_cont_BFC24B44 }, - { 0x1FC24B50u, SCPH1001_func_1FC24A48_cont_BFC24B50 }, - { 0x1FC24B58u, SCPH1001_func_1FC24A48_cont_BFC24B58 }, - { 0x1FC24B60u, SCPH1001_func_1FC24A48_cont_BFC24B60 }, - { 0x1FC24B68u, SCPH1001_func_1FC24A48_cont_BFC24B68 }, - { 0x1FC24B74u, SCPH1001_func_1FC24A48_cont_BFC24B74 }, - { 0x1FC24B7Cu, SCPH1001_func_1FC24A48_cont_BFC24B7C }, - { 0x1FC24BC4u, SCPH1001_func_1FC24A48_cont_BFC24BC4 }, - { 0x1FC24BD8u, SCPH1001_func_1FC24A48_cont_BFC24BD8 }, - { 0x1FC24BDCu, SCPH1001_func_1FC24A48_cont_BFC24BDC }, - { 0x1FC24C00u, SCPH1001_func_1FC24A48_cont_BFC24C00 }, - { 0x1FC24C1Cu, SCPH1001_func_1FC24A48_cont_BFC24C1C }, - { 0x1FC24C34u, SCPH1001_func_1FC24A48_cont_BFC24C34 }, - { 0x1FC24C40u, SCPH1001_func_1FC24A48_cont_BFC24C40 }, - { 0x1FC24C88u, SCPH1001_func_1FC24A48_cont_BFC24C88 }, - { 0x1FC24C94u, SCPH1001_func_1FC24A48_cont_BFC24C94 }, - { 0x1FC24C9Cu, SCPH1001_func_1FC24A48_cont_BFC24C9C }, - { 0x1FC24CA4u, SCPH1001_func_1FC24A48_cont_BFC24CA4 }, - { 0x1FC24CACu, SCPH1001_func_1FC24A48_cont_BFC24CAC }, - { 0x1FC24CB8u, SCPH1001_func_1FC24A48_cont_BFC24CB8 }, - { 0x1FC24CC0u, SCPH1001_func_1FC24A48_cont_BFC24CC0 }, - { 0x1FC24D3Cu, SCPH1001_func_1FC24A48_cont_BFC24D3C }, - { 0x1FC24D48u, SCPH1001_func_1FC24A48_cont_BFC24D48 }, - { 0x1FC24D54u, SCPH1001_func_1FC24A48_cont_BFC24D54 }, - { 0x1FC24D60u, SCPH1001_func_1FC24A48_cont_BFC24D60 }, - { 0x1FC24D68u, SCPH1001_func_1FC24A48_cont_BFC24D68 }, - { 0x1FC24D98u, SCPH1001_func_1FC24A48_cont_BFC24D98 }, - { 0x1FC24DA0u, SCPH1001_func_1FC24A48_cont_BFC24DA0 }, - { 0x1FC24DD8u, SCPH1001_func_1FC24A48_cont_BFC24DD8 }, - { 0x1FC24DFCu, SCPH1001_func_1FC24A48_cont_BFC24DFC }, - { 0x1FC24E14u, SCPH1001_func_1FC24A48_cont_BFC24E14 }, - { 0x1FC24E20u, SCPH1001_func_1FC24A48_cont_BFC24E20 }, - { 0x1FC24E24u, SCPH1001_func_1FC24A48_cont_BFC24E24 }, - { 0x1FC24E34u, SCPH1001_func_1FC24A48_cont_BFC24E34 }, - { 0x1FC24E38u, SCPH1001_func_1FC24A48_cont_BFC24E38 }, - { 0x1FC24E40u, SCPH1001_func_1FC24A48_cont_BFC24E40 }, - { 0x1FC24E44u, SCPH1001_func_1FC24A48_cont_BFC24E44 }, - { 0x1FC24E54u, SCPH1001_func_1FC24A48_cont_BFC24E54 }, - { 0x1FC24E6Cu, SCPH1001_func_1FC24A48_cont_BFC24E6C }, - { 0x1FC24E74u, SCPH1001_func_1FC24A48_cont_BFC24E74 }, - { 0x1FC24E78u, SCPH1001_func_1FC24A48_cont_BFC24E78 }, - { 0x1FC24E7Cu, SCPH1001_func_1FC24A48_cont_BFC24E7C }, - { 0x1FC24E8Cu, SCPH1001_func_1FC24A48_cont_BFC24E8C }, - { 0x1FC24E98u, SCPH1001_func_1FC24A48_cont_BFC24E98 }, - { 0x1FC24E9Cu, SCPH1001_func_1FC24A48_cont_BFC24E9C }, - { 0x1FC24EA4u, SCPH1001_func_1FC24A48_cont_BFC24EA4 }, - { 0x1FC24EB0u, SCPH1001_func_1FC24A48_cont_BFC24EB0 }, - { 0x1FC24EB4u, SCPH1001_func_1FC24A48_cont_BFC24EB4 }, - { 0x1FC24EC8u, SCPH1001_func_1FC24A48_cont_BFC24EC8 }, - { 0x1FC24EE0u, SCPH1001_func_1FC24A48_cont_BFC24EE0 }, - { 0x1FC24F00u, SCPH1001_func_1FC24F00 }, - { 0x1FC24F18u, SCPH1001_func_1FC24F00_cont_BFC24F18 }, - { 0x1FC24F28u, SCPH1001_func_1FC24F00_cont_BFC24F28 }, - { 0x1FC24F2Cu, SCPH1001_func_1FC24F00_cont_BFC24F2C }, - { 0x1FC24F34u, SCPH1001_func_1FC24F00_cont_BFC24F34 }, - { 0x1FC24F3Cu, SCPH1001_func_1FC24F00_cont_BFC24F3C }, - { 0x1FC24F44u, SCPH1001_func_1FC24F00_cont_BFC24F44 }, - { 0x1FC24F50u, SCPH1001_func_1FC24F00_cont_BFC24F50 }, - { 0x1FC24F74u, SCPH1001_func_1FC24F00_cont_BFC24F74 }, - { 0x1FC24F80u, SCPH1001_func_1FC24F00_cont_BFC24F80 }, - { 0x1FC24F84u, SCPH1001_func_1FC24F00_cont_BFC24F84 }, - { 0x1FC24F90u, SCPH1001_func_1FC24F00_cont_BFC24F90 }, - { 0x1FC24F9Cu, SCPH1001_func_1FC24F00_cont_BFC24F9C }, - { 0x1FC24FBCu, SCPH1001_func_1FC24F00_cont_BFC24FBC }, - { 0x1FC24FC8u, SCPH1001_func_1FC24F00_cont_BFC24FC8 }, - { 0x1FC24FD4u, SCPH1001_func_1FC24F00_cont_BFC24FD4 }, - { 0x1FC24FDCu, SCPH1001_func_1FC24F00_cont_BFC24FDC }, - { 0x1FC24FE8u, SCPH1001_func_1FC24F00_cont_BFC24FE8 }, - { 0x1FC24FF0u, SCPH1001_func_1FC24F00_cont_BFC24FF0 }, - { 0x1FC24FFCu, SCPH1001_func_1FC24F00_cont_BFC24FFC }, - { 0x1FC25004u, SCPH1001_func_1FC24F00_cont_BFC25004 }, - { 0x1FC25010u, SCPH1001_func_1FC24F00_cont_BFC25010 }, - { 0x1FC25018u, SCPH1001_func_1FC24F00_cont_BFC25018 }, - { 0x1FC25024u, SCPH1001_func_1FC24F00_cont_BFC25024 }, - { 0x1FC2502Cu, SCPH1001_func_1FC24F00_cont_BFC2502C }, - { 0x1FC25038u, SCPH1001_func_1FC24F00_cont_BFC25038 }, - { 0x1FC25040u, SCPH1001_func_1FC24F00_cont_BFC25040 }, - { 0x1FC2504Cu, SCPH1001_func_1FC24F00_cont_BFC2504C }, - { 0x1FC25054u, SCPH1001_func_1FC24F00_cont_BFC25054 }, - { 0x1FC25060u, SCPH1001_func_1FC24F00_cont_BFC25060 }, - { 0x1FC25068u, SCPH1001_func_1FC24F00_cont_BFC25068 }, - { 0x1FC25074u, SCPH1001_func_1FC24F00_cont_BFC25074 }, - { 0x1FC2509Cu, SCPH1001_func_1FC24F00_cont_BFC2509C }, - { 0x1FC250A4u, SCPH1001_func_1FC24F00_cont_BFC250A4 }, - { 0x1FC250B0u, SCPH1001_func_1FC24F00_cont_BFC250B0 }, - { 0x1FC250B8u, SCPH1001_func_1FC24F00_cont_BFC250B8 }, - { 0x1FC250C4u, SCPH1001_func_1FC24F00_cont_BFC250C4 }, - { 0x1FC250D0u, SCPH1001_func_1FC24F00_cont_BFC250D0 }, - { 0x1FC250D8u, SCPH1001_func_1FC24F00_cont_BFC250D8 }, - { 0x1FC250E4u, SCPH1001_func_1FC24F00_cont_BFC250E4 }, - { 0x1FC250ECu, SCPH1001_func_1FC24F00_cont_BFC250EC }, - { 0x1FC250F8u, SCPH1001_func_1FC24F00_cont_BFC250F8 }, - { 0x1FC25108u, SCPH1001_func_1FC24F00_cont_BFC25108 }, - { 0x1FC25110u, SCPH1001_func_1FC24F00_cont_BFC25110 }, - { 0x1FC25120u, SCPH1001_func_1FC24F00_cont_BFC25120 }, - { 0x1FC25148u, SCPH1001_func_1FC24F00_cont_BFC25148 }, - { 0x1FC25150u, SCPH1001_func_1FC24F00_cont_BFC25150 }, - { 0x1FC25154u, SCPH1001_func_1FC24F00_cont_BFC25154 }, - { 0x1FC2515Cu, SCPH1001_func_1FC24F00_cont_BFC2515C }, - { 0x1FC25164u, SCPH1001_func_1FC24F00_cont_BFC25164 }, - { 0x1FC25178u, SCPH1001_func_1FC24F00_cont_BFC25178 }, - { 0x1FC25180u, SCPH1001_func_1FC24F00_cont_BFC25180 }, - { 0x1FC25194u, SCPH1001_func_1FC24F00_cont_BFC25194 }, - { 0x1FC25198u, SCPH1001_func_1FC24F00_cont_BFC25198 }, - { 0x1FC251A8u, SCPH1001_func_1FC251A8 }, - { 0x1FC251B8u, SCPH1001_func_1FC251A8_cont_BFC251B8 }, - { 0x1FC251C4u, SCPH1001_func_1FC251A8_cont_BFC251C4 }, - { 0x1FC251CCu, SCPH1001_func_1FC251A8_cont_BFC251CC }, - { 0x1FC251D4u, SCPH1001_func_1FC251A8_cont_BFC251D4 }, - { 0x1FC251DCu, SCPH1001_func_1FC251A8_cont_BFC251DC }, - { 0x1FC251F0u, SCPH1001_func_1FC251A8_cont_BFC251F0 }, - { 0x1FC25200u, SCPH1001_func_1FC25200 }, - { 0x1FC25210u, SCPH1001_func_1FC25200_cont_BFC25210 }, - { 0x1FC25220u, SCPH1001_func_1FC25200_cont_BFC25220 }, - { 0x1FC25228u, SCPH1001_func_1FC25200_cont_BFC25228 }, - { 0x1FC25230u, SCPH1001_func_1FC25200_cont_BFC25230 }, - { 0x1FC25238u, SCPH1001_func_1FC25200_cont_BFC25238 }, - { 0x1FC25248u, SCPH1001_func_1FC25200_cont_BFC25248 }, - { 0x1FC25250u, SCPH1001_func_1FC25200_cont_BFC25250 }, - { 0x1FC25258u, SCPH1001_func_1FC25200_cont_BFC25258 }, - { 0x1FC25260u, SCPH1001_func_1FC25200_cont_BFC25260 }, - { 0x1FC25270u, SCPH1001_func_1FC25200_cont_BFC25270 }, - { 0x1FC25278u, SCPH1001_func_1FC25200_cont_BFC25278 }, - { 0x1FC25280u, SCPH1001_func_1FC25200_cont_BFC25280 }, - { 0x1FC25288u, SCPH1001_func_1FC25200_cont_BFC25288 }, - { 0x1FC25298u, SCPH1001_func_1FC25200_cont_BFC25298 }, - { 0x1FC252A0u, SCPH1001_func_1FC25200_cont_BFC252A0 }, - { 0x1FC252A8u, SCPH1001_func_1FC25200_cont_BFC252A8 }, - { 0x1FC252ACu, SCPH1001_func_1FC25200_cont_BFC252AC }, - { 0x1FC252BCu, SCPH1001_func_1FC252BC }, - { 0x1FC252D4u, SCPH1001_func_1FC252BC_cont_BFC252D4 }, - { 0x1FC252E4u, SCPH1001_func_1FC252BC_cont_BFC252E4 }, - { 0x1FC252F4u, SCPH1001_func_1FC252BC_cont_BFC252F4 }, - { 0x1FC25304u, SCPH1001_func_1FC252BC_cont_BFC25304 }, - { 0x1FC25314u, SCPH1001_func_1FC25314 }, - { 0x1FC2531Cu, SCPH1001_func_1FC2531C }, - { 0x1FC2532Cu, SCPH1001_func_1FC2531C_cont_BFC2532C }, - { 0x1FC2533Cu, SCPH1001_func_1FC2531C_cont_BFC2533C }, - { 0x1FC2534Cu, SCPH1001_func_1FC2531C_cont_BFC2534C }, - { 0x1FC2535Cu, SCPH1001_func_1FC2531C_cont_BFC2535C }, - { 0x1FC2536Cu, SCPH1001_func_1FC2531C_cont_BFC2536C }, - { 0x1FC25374u, SCPH1001_func_1FC2531C_cont_BFC25374 }, - { 0x1FC25390u, SCPH1001_func_1FC25390 }, - { 0x1FC253A4u, SCPH1001_func_1FC25390_cont_BFC253A4 }, - { 0x1FC253B8u, SCPH1001_func_1FC25390_cont_BFC253B8 }, - { 0x1FC253C0u, SCPH1001_func_1FC25390_cont_BFC253C0 }, - { 0x1FC253C4u, SCPH1001_func_1FC25390_cont_BFC253C4 }, - { 0x1FC253D8u, SCPH1001_func_1FC25390_cont_BFC253D8 }, - { 0x1FC253E4u, SCPH1001_func_1FC25390_cont_BFC253E4 }, - { 0x1FC25404u, SCPH1001_func_1FC25390_cont_BFC25404 }, - { 0x1FC2540Cu, SCPH1001_func_1FC25390_cont_BFC2540C }, - { 0x1FC25418u, SCPH1001_func_1FC25390_cont_BFC25418 }, - { 0x1FC25444u, SCPH1001_func_1FC25390_cont_BFC25444 }, - { 0x1FC25468u, SCPH1001_func_1FC25390_cont_BFC25468 }, - { 0x1FC25484u, SCPH1001_func_1FC25390_cont_BFC25484 }, - { 0x1FC254A0u, SCPH1001_func_1FC25390_cont_BFC254A0 }, - { 0x1FC254B0u, SCPH1001_func_1FC254B0 }, - { 0x1FC254C0u, SCPH1001_func_1FC254B0_cont_BFC254C0 }, - { 0x1FC254DCu, SCPH1001_func_1FC254B0_cont_BFC254DC }, - { 0x1FC254ECu, SCPH1001_func_1FC254B0_cont_BFC254EC }, - { 0x1FC25500u, SCPH1001_func_1FC254B0_cont_BFC25500 }, - { 0x1FC2550Cu, SCPH1001_func_1FC254B0_cont_BFC2550C }, - { 0x1FC25520u, SCPH1001_func_1FC254B0_cont_BFC25520 }, - { 0x1FC2552Cu, SCPH1001_func_1FC254B0_cont_BFC2552C }, - { 0x1FC25534u, SCPH1001_func_1FC254B0_cont_BFC25534 }, - { 0x1FC25558u, SCPH1001_func_1FC25558 }, - { 0x1FC25570u, SCPH1001_func_1FC25558_cont_BFC25570 }, - { 0x1FC25584u, SCPH1001_func_1FC25558_cont_BFC25584 }, - { 0x1FC25590u, SCPH1001_func_1FC25558_cont_BFC25590 }, - { 0x1FC255A0u, SCPH1001_func_1FC255A0 }, - { 0x1FC255D8u, SCPH1001_func_1FC255A0_cont_BFC255D8 }, - { 0x1FC25604u, SCPH1001_func_1FC255A0_cont_BFC25604 }, - { 0x1FC25628u, SCPH1001_func_1FC255A0_cont_BFC25628 }, - { 0x1FC25658u, SCPH1001_func_1FC255A0_cont_BFC25658 }, - { 0x1FC25698u, SCPH1001_func_1FC255A0_cont_BFC25698 }, - { 0x1FC256D8u, SCPH1001_func_1FC256D8 }, - { 0x1FC256E4u, SCPH1001_func_1FC256D8_cont_BFC256E4 }, - { 0x1FC256FCu, SCPH1001_func_1FC256D8_cont_BFC256FC }, - { 0x1FC25714u, SCPH1001_func_1FC256D8_cont_BFC25714 }, - { 0x1FC2571Cu, SCPH1001_func_1FC256D8_cont_BFC2571C }, - { 0x1FC25730u, SCPH1001_func_1FC256D8_cont_BFC25730 }, - { 0x1FC25744u, SCPH1001_func_1FC256D8_cont_BFC25744 }, - { 0x1FC25754u, SCPH1001_func_1FC25754 }, - { 0x1FC25788u, SCPH1001_func_1FC25754_cont_BFC25788 }, - { 0x1FC257A4u, SCPH1001_func_1FC25754_cont_BFC257A4 }, - { 0x1FC257E0u, SCPH1001_func_1FC25754_cont_BFC257E0 }, - { 0x1FC257ECu, SCPH1001_func_1FC25754_cont_BFC257EC }, - { 0x1FC25800u, SCPH1001_func_1FC25754_cont_BFC25800 }, - { 0x1FC2580Cu, SCPH1001_func_1FC25754_cont_BFC2580C }, - { 0x1FC25840u, SCPH1001_func_1FC25754_cont_BFC25840 }, - { 0x1FC25884u, SCPH1001_func_1FC25884 }, - { 0x1FC25890u, SCPH1001_func_1FC25884_cont_BFC25890 }, - { 0x1FC258ACu, SCPH1001_func_1FC25884_cont_BFC258AC }, - { 0x1FC2592Cu, SCPH1001_func_1FC2592C }, - { 0x1FC25944u, SCPH1001_func_1FC2592C_cont_BFC25944 }, - { 0x1FC2594Cu, SCPH1001_func_1FC2592C_cont_BFC2594C }, - { 0x1FC25964u, SCPH1001_func_1FC2592C_cont_BFC25964 }, - { 0x1FC25968u, SCPH1001_func_1FC2592C_cont_BFC25968 }, - { 0x1FC25980u, SCPH1001_func_1FC2592C_cont_BFC25980 }, - { 0x1FC25988u, SCPH1001_func_1FC2592C_cont_BFC25988 }, - { 0x1FC259A0u, SCPH1001_func_1FC2592C_cont_BFC259A0 }, - { 0x1FC259A4u, SCPH1001_func_1FC2592C_cont_BFC259A4 }, - { 0x1FC259D8u, SCPH1001_func_1FC259D8 }, - { 0x1FC25A04u, SCPH1001_func_1FC259D8_cont_BFC25A04 }, - { 0x1FC25A0Cu, SCPH1001_func_1FC259D8_cont_BFC25A0C }, - { 0x1FC25A18u, SCPH1001_func_1FC259D8_cont_BFC25A18 }, - { 0x1FC25A24u, SCPH1001_func_1FC259D8_cont_BFC25A24 }, - { 0x1FC25A2Cu, SCPH1001_func_1FC259D8_cont_BFC25A2C }, - { 0x1FC25A60u, SCPH1001_func_1FC259D8_cont_BFC25A60 }, - { 0x1FC25A74u, SCPH1001_func_1FC259D8_cont_BFC25A74 }, - { 0x1FC25A88u, SCPH1001_func_1FC259D8_cont_BFC25A88 }, - { 0x1FC25AA0u, SCPH1001_func_1FC259D8_cont_BFC25AA0 }, - { 0x1FC25AB4u, SCPH1001_func_1FC259D8_cont_BFC25AB4 }, - { 0x1FC25AC8u, SCPH1001_func_1FC259D8_cont_BFC25AC8 }, - { 0x1FC25AD4u, SCPH1001_func_1FC259D8_cont_BFC25AD4 }, - { 0x1FC25AECu, SCPH1001_func_1FC259D8_cont_BFC25AEC }, - { 0x1FC25AFCu, SCPH1001_func_1FC259D8_cont_BFC25AFC }, - { 0x1FC25B04u, SCPH1001_func_1FC259D8_cont_BFC25B04 }, - { 0x1FC25B14u, SCPH1001_func_1FC259D8_cont_BFC25B14 }, - { 0x1FC25B48u, SCPH1001_func_1FC259D8_cont_BFC25B48 }, - { 0x1FC25B54u, SCPH1001_func_1FC259D8_cont_BFC25B54 }, - { 0x1FC25B5Cu, SCPH1001_func_1FC259D8_cont_BFC25B5C }, - { 0x1FC25B64u, SCPH1001_func_1FC259D8_cont_BFC25B64 }, - { 0x1FC25B68u, SCPH1001_func_1FC259D8_cont_BFC25B68 }, - { 0x1FC25B6Cu, SCPH1001_func_1FC259D8_cont_BFC25B6C }, - { 0x1FC25B74u, SCPH1001_func_1FC25B74 }, - { 0x1FC25B9Cu, SCPH1001_func_1FC25B74_cont_BFC25B9C }, - { 0x1FC25BA8u, SCPH1001_func_1FC25B74_cont_BFC25BA8 }, - { 0x1FC25BBCu, SCPH1001_func_1FC25B74_cont_BFC25BBC }, - { 0x1FC25BC0u, SCPH1001_func_1FC25B74_cont_BFC25BC0 }, - { 0x1FC25BD4u, SCPH1001_func_1FC25B74_cont_BFC25BD4 }, - { 0x1FC25BFCu, SCPH1001_func_1FC25B74_cont_BFC25BFC }, - { 0x1FC25C38u, SCPH1001_func_1FC25B74_cont_BFC25C38 }, - { 0x1FC25C74u, SCPH1001_func_1FC25C74 }, - { 0x1FC25C7Cu, SCPH1001_func_1FC25C7C }, - { 0x1FC25C84u, SCPH1001_func_1FC25C84 }, - { 0x1FC25C8Cu, SCPH1001_func_1FC25C8C }, - { 0x1FC25C94u, SCPH1001_func_1FC25C94 }, - { 0x1FC25CB0u, SCPH1001_func_1FC25CB0 }, - { 0x1FC25CB8u, SCPH1001_func_1FC25CB8 }, - { 0x1FC25CC0u, SCPH1001_func_1FC25CC0 }, - { 0x1FC25CE8u, SCPH1001_func_1FC25CC0_cont_BFC25CE8 }, - { 0x1FC25D04u, SCPH1001_func_1FC25CC0_cont_BFC25D04 }, - { 0x1FC25D18u, SCPH1001_func_1FC25CC0_cont_BFC25D18 }, - { 0x1FC25D20u, SCPH1001_func_1FC25CC0_cont_BFC25D20 }, - { 0x1FC25D54u, SCPH1001_func_1FC25CC0_cont_BFC25D54 }, - { 0x1FC25D7Cu, SCPH1001_func_1FC25CC0_cont_BFC25D7C }, - { 0x1FC25D80u, SCPH1001_func_1FC25CC0_cont_BFC25D80 }, - { 0x1FC25D8Cu, SCPH1001_func_1FC25D8C }, - { 0x1FC25DA8u, SCPH1001_func_1FC25D8C_cont_BFC25DA8 }, - { 0x1FC25DB0u, SCPH1001_func_1FC25D8C_cont_BFC25DB0 }, - { 0x1FC25DB8u, SCPH1001_func_1FC25D8C_cont_BFC25DB8 }, - { 0x1FC25DC0u, SCPH1001_func_1FC25D8C_cont_BFC25DC0 }, - { 0x1FC25DE0u, SCPH1001_func_1FC25D8C_cont_BFC25DE0 }, - { 0x1FC25DF0u, SCPH1001_func_1FC25D8C_cont_BFC25DF0 }, - { 0x1FC25E00u, SCPH1001_func_1FC25D8C_cont_BFC25E00 }, - { 0x1FC25E0Cu, SCPH1001_func_1FC25D8C_cont_BFC25E0C }, - { 0x1FC25E18u, SCPH1001_func_1FC25D8C_cont_BFC25E18 }, - { 0x1FC25E28u, SCPH1001_func_1FC25D8C_cont_BFC25E28 }, - { 0x1FC25E3Cu, SCPH1001_func_1FC25D8C_cont_BFC25E3C }, - { 0x1FC25E40u, SCPH1001_func_1FC25D8C_cont_BFC25E40 }, - { 0x1FC25E60u, SCPH1001_func_1FC25E60 }, - { 0x1FC25E8Cu, SCPH1001_func_1FC25E8C }, - { 0x1FC25E9Cu, SCPH1001_func_1FC25E8C_cont_BFC25E9C }, - { 0x1FC25EB8u, SCPH1001_func_1FC25E8C_cont_BFC25EB8 }, - { 0x1FC25ECCu, SCPH1001_func_1FC25E8C_cont_BFC25ECC }, - { 0x1FC25ED8u, SCPH1001_func_1FC25E8C_cont_BFC25ED8 }, - { 0x1FC25EE0u, SCPH1001_func_1FC25E8C_cont_BFC25EE0 }, - { 0x1FC25EE8u, SCPH1001_func_1FC25E8C_cont_BFC25EE8 }, - { 0x1FC25EF8u, SCPH1001_func_1FC25EF8 }, - { 0x1FC25F24u, SCPH1001_func_1FC25EF8_cont_BFC25F24 }, - { 0x1FC25F34u, SCPH1001_func_1FC25EF8_cont_BFC25F34 }, - { 0x1FC25F3Cu, SCPH1001_func_1FC25EF8_cont_BFC25F3C }, - { 0x1FC25F48u, SCPH1001_func_1FC25EF8_cont_BFC25F48 }, - { 0x1FC25F58u, SCPH1001_func_1FC25EF8_cont_BFC25F58 }, - { 0x1FC25F60u, SCPH1001_func_1FC25EF8_cont_BFC25F60 }, - { 0x1FC25F6Cu, SCPH1001_func_1FC25EF8_cont_BFC25F6C }, - { 0x1FC25F74u, SCPH1001_func_1FC25EF8_cont_BFC25F74 }, - { 0x1FC25F88u, SCPH1001_func_1FC25EF8_cont_BFC25F88 }, - { 0x1FC25F9Cu, SCPH1001_func_1FC25EF8_cont_BFC25F9C }, - { 0x1FC25FA4u, SCPH1001_func_1FC25EF8_cont_BFC25FA4 }, - { 0x1FC25FACu, SCPH1001_func_1FC25EF8_cont_BFC25FAC }, - { 0x1FC25FC4u, SCPH1001_func_1FC25EF8_cont_BFC25FC4 }, - { 0x1FC25FC8u, SCPH1001_func_1FC25EF8_cont_BFC25FC8 }, - { 0x1FC25FD0u, SCPH1001_func_1FC25EF8_cont_BFC25FD0 }, - { 0x1FC25FD8u, SCPH1001_func_1FC25EF8_cont_BFC25FD8 }, - { 0x1FC25FF0u, SCPH1001_func_1FC25EF8_cont_BFC25FF0 }, - { 0x1FC26048u, SCPH1001_func_1FC25EF8_cont_BFC26048 }, - { 0x1FC2604Cu, SCPH1001_func_1FC25EF8_cont_BFC2604C }, - { 0x1FC26060u, SCPH1001_func_1FC25EF8_cont_BFC26060 }, - { 0x1FC26064u, SCPH1001_func_1FC25EF8_cont_BFC26064 }, - { 0x1FC2606Cu, SCPH1001_func_1FC25EF8_cont_BFC2606C }, - { 0x1FC2607Cu, SCPH1001_func_1FC25EF8_cont_BFC2607C }, - { 0x1FC2608Cu, SCPH1001_func_1FC25EF8_cont_BFC2608C }, - { 0x1FC260ACu, SCPH1001_func_1FC25EF8_cont_BFC260AC }, - { 0x1FC260F8u, SCPH1001_func_1FC25EF8_cont_BFC260F8 }, - { 0x1FC260FCu, SCPH1001_func_1FC25EF8_cont_BFC260FC }, - { 0x1FC2610Cu, SCPH1001_func_1FC25EF8_cont_BFC2610C }, - { 0x1FC26110u, SCPH1001_func_1FC25EF8_cont_BFC26110 }, - { 0x1FC26120u, SCPH1001_func_1FC25EF8_cont_BFC26120 }, - { 0x1FC26130u, SCPH1001_func_1FC25EF8_cont_BFC26130 }, - { 0x1FC26138u, SCPH1001_func_1FC25EF8_cont_BFC26138 }, - { 0x1FC26148u, SCPH1001_func_1FC25EF8_cont_BFC26148 }, - { 0x1FC26150u, SCPH1001_func_1FC25EF8_cont_BFC26150 }, - { 0x1FC26164u, SCPH1001_func_1FC25EF8_cont_BFC26164 }, - { 0x1FC26178u, SCPH1001_func_1FC25EF8_cont_BFC26178 }, - { 0x1FC26180u, SCPH1001_func_1FC25EF8_cont_BFC26180 }, - { 0x1FC2618Cu, SCPH1001_func_1FC25EF8_cont_BFC2618C }, - { 0x1FC26198u, SCPH1001_func_1FC25EF8_cont_BFC26198 }, - { 0x1FC2619Cu, SCPH1001_func_1FC25EF8_cont_BFC2619C }, - { 0x1FC261A4u, SCPH1001_func_1FC25EF8_cont_BFC261A4 }, - { 0x1FC261B0u, SCPH1001_func_1FC25EF8_cont_BFC261B0 }, - { 0x1FC261CCu, SCPH1001_func_1FC25EF8_cont_BFC261CC }, - { 0x1FC261E0u, SCPH1001_func_1FC25EF8_cont_BFC261E0 }, - { 0x1FC261ECu, SCPH1001_func_1FC25EF8_cont_BFC261EC }, - { 0x1FC26200u, SCPH1001_func_1FC25EF8_cont_BFC26200 }, - { 0x1FC26208u, SCPH1001_func_1FC25EF8_cont_BFC26208 }, - { 0x1FC2621Cu, SCPH1001_func_1FC25EF8_cont_BFC2621C }, - { 0x1FC2622Cu, SCPH1001_func_1FC25EF8_cont_BFC2622C }, - { 0x1FC26244u, SCPH1001_func_1FC25EF8_cont_BFC26244 }, - { 0x1FC2624Cu, SCPH1001_func_1FC25EF8_cont_BFC2624C }, - { 0x1FC26254u, SCPH1001_func_1FC25EF8_cont_BFC26254 }, - { 0x1FC26264u, SCPH1001_func_1FC25EF8_cont_BFC26264 }, - { 0x1FC2627Cu, SCPH1001_func_1FC25EF8_cont_BFC2627C }, - { 0x1FC26284u, SCPH1001_func_1FC25EF8_cont_BFC26284 }, - { 0x1FC2628Cu, SCPH1001_func_1FC25EF8_cont_BFC2628C }, - { 0x1FC26294u, SCPH1001_func_1FC25EF8_cont_BFC26294 }, - { 0x1FC26298u, SCPH1001_func_1FC25EF8_cont_BFC26298 }, - { 0x1FC262A0u, SCPH1001_func_1FC25EF8_cont_BFC262A0 }, - { 0x1FC262B4u, SCPH1001_func_1FC25EF8_cont_BFC262B4 }, - { 0x1FC262C8u, SCPH1001_func_1FC25EF8_cont_BFC262C8 }, - { 0x1FC262D0u, SCPH1001_func_1FC25EF8_cont_BFC262D0 }, - { 0x1FC262D8u, SCPH1001_func_1FC25EF8_cont_BFC262D8 }, - { 0x1FC262E0u, SCPH1001_func_1FC25EF8_cont_BFC262E0 }, - { 0x1FC262E8u, SCPH1001_func_1FC25EF8_cont_BFC262E8 }, - { 0x1FC262F0u, SCPH1001_func_1FC25EF8_cont_BFC262F0 }, - { 0x1FC262F8u, SCPH1001_func_1FC25EF8_cont_BFC262F8 }, - { 0x1FC262FCu, SCPH1001_func_1FC25EF8_cont_BFC262FC }, - { 0x1FC26304u, SCPH1001_func_1FC25EF8_cont_BFC26304 }, - { 0x1FC2630Cu, SCPH1001_func_1FC25EF8_cont_BFC2630C }, - { 0x1FC26314u, SCPH1001_func_1FC25EF8_cont_BFC26314 }, - { 0x1FC26318u, SCPH1001_func_1FC25EF8_cont_BFC26318 }, - { 0x1FC2632Cu, SCPH1001_func_1FC2632C }, - { 0x1FC26344u, SCPH1001_func_1FC2632C_cont_BFC26344 }, - { 0x1FC26358u, SCPH1001_func_1FC2632C_cont_BFC26358 }, - { 0x1FC26360u, SCPH1001_func_1FC2632C_cont_BFC26360 }, - { 0x1FC26368u, SCPH1001_func_1FC2632C_cont_BFC26368 }, - { 0x1FC26378u, SCPH1001_func_1FC2632C_cont_BFC26378 }, - { 0x1FC26388u, SCPH1001_func_1FC2632C_cont_BFC26388 }, - { 0x1FC26390u, SCPH1001_func_1FC2632C_cont_BFC26390 }, - { 0x1FC26398u, SCPH1001_func_1FC2632C_cont_BFC26398 }, - { 0x1FC263A0u, SCPH1001_func_1FC2632C_cont_BFC263A0 }, - { 0x1FC263A8u, SCPH1001_func_1FC2632C_cont_BFC263A8 }, - { 0x1FC263C8u, SCPH1001_func_1FC2632C_cont_BFC263C8 }, - { 0x1FC263D8u, SCPH1001_func_1FC2632C_cont_BFC263D8 }, - { 0x1FC263E0u, SCPH1001_func_1FC2632C_cont_BFC263E0 }, - { 0x1FC263F0u, SCPH1001_func_1FC2632C_cont_BFC263F0 }, - { 0x1FC263FCu, SCPH1001_func_1FC2632C_cont_BFC263FC }, - { 0x1FC26404u, SCPH1001_func_1FC2632C_cont_BFC26404 }, - { 0x1FC2640Cu, SCPH1001_func_1FC2632C_cont_BFC2640C }, - { 0x1FC26414u, SCPH1001_func_1FC2632C_cont_BFC26414 }, - { 0x1FC26420u, SCPH1001_func_1FC2632C_cont_BFC26420 }, - { 0x1FC26428u, SCPH1001_func_1FC2632C_cont_BFC26428 }, - { 0x1FC26430u, SCPH1001_func_1FC2632C_cont_BFC26430 }, - { 0x1FC26438u, SCPH1001_func_1FC2632C_cont_BFC26438 }, - { 0x1FC2643Cu, SCPH1001_func_1FC2632C_cont_BFC2643C }, - { 0x1FC2644Cu, SCPH1001_func_1FC2644C }, - { 0x1FC26468u, SCPH1001_func_1FC2644C_cont_BFC26468 }, - { 0x1FC26474u, SCPH1001_func_1FC2644C_cont_BFC26474 }, - { 0x1FC264A0u, SCPH1001_func_1FC264A0 }, - { 0x1FC264B8u, SCPH1001_func_1FC264A0_cont_BFC264B8 }, - { 0x1FC264D0u, SCPH1001_func_1FC264A0_cont_BFC264D0 }, - { 0x1FC264ECu, SCPH1001_func_1FC264A0_cont_BFC264EC }, - { 0x1FC264F4u, SCPH1001_func_1FC264A0_cont_BFC264F4 }, - { 0x1FC26508u, SCPH1001_func_1FC264A0_cont_BFC26508 }, - { 0x1FC26510u, SCPH1001_func_1FC264A0_cont_BFC26510 }, - { 0x1FC26518u, SCPH1001_func_1FC264A0_cont_BFC26518 }, - { 0x1FC2652Cu, SCPH1001_func_1FC264A0_cont_BFC2652C }, - { 0x1FC26550u, SCPH1001_func_1FC26550 }, - { 0x1FC2656Cu, SCPH1001_func_1FC26550_cont_BFC2656C }, - { 0x1FC26580u, SCPH1001_func_1FC26550_cont_BFC26580 }, - { 0x1FC2658Cu, SCPH1001_func_1FC26550_cont_BFC2658C }, - { 0x1FC26594u, SCPH1001_func_1FC26550_cont_BFC26594 }, - { 0x1FC26598u, SCPH1001_func_1FC26550_cont_BFC26598 }, - { 0x1FC265A0u, SCPH1001_func_1FC26550_cont_BFC265A0 }, - { 0x1FC265A4u, SCPH1001_func_1FC26550_cont_BFC265A4 }, - { 0x1FC265C0u, SCPH1001_func_1FC265C0 }, - { 0x1FC265D0u, SCPH1001_func_1FC265C0_cont_BFC265D0 }, - { 0x1FC265E4u, SCPH1001_func_1FC265C0_cont_BFC265E4 }, - { 0x1FC265F0u, SCPH1001_func_1FC265C0_cont_BFC265F0 }, - { 0x1FC26610u, SCPH1001_func_1FC26610 }, - { 0x1FC26620u, SCPH1001_func_1FC26610_cont_BFC26620 }, - { 0x1FC26634u, SCPH1001_func_1FC26610_cont_BFC26634 }, - { 0x1FC26640u, SCPH1001_func_1FC26610_cont_BFC26640 }, - { 0x1FC26660u, SCPH1001_func_1FC26660 }, - { 0x1FC26670u, SCPH1001_func_1FC26670 }, - { 0x1FC26680u, SCPH1001_func_1FC26670_cont_BFC26680 }, - { 0x1FC266B0u, SCPH1001_func_1FC266B0 }, - { 0x1FC266C8u, SCPH1001_func_1FC266B0_cont_BFC266C8 }, - { 0x1FC266DCu, SCPH1001_func_1FC266B0_cont_BFC266DC }, - { 0x1FC266ECu, SCPH1001_func_1FC266B0_cont_BFC266EC }, - { 0x1FC26704u, SCPH1001_func_1FC266B0_cont_BFC26704 }, - { 0x1FC26728u, SCPH1001_func_1FC266B0_cont_BFC26728 }, - { 0x1FC2673Cu, SCPH1001_func_1FC266B0_cont_BFC2673C }, - { 0x1FC26748u, SCPH1001_func_1FC266B0_cont_BFC26748 }, - { 0x1FC26750u, SCPH1001_func_1FC266B0_cont_BFC26750 }, - { 0x1FC26760u, SCPH1001_func_1FC266B0_cont_BFC26760 }, - { 0x1FC26768u, SCPH1001_func_1FC266B0_cont_BFC26768 }, - { 0x1FC2676Cu, SCPH1001_func_1FC266B0_cont_BFC2676C }, - { 0x1FC26774u, SCPH1001_func_1FC266B0_cont_BFC26774 }, - { 0x1FC26780u, SCPH1001_func_1FC266B0_cont_BFC26780 }, - { 0x1FC26798u, SCPH1001_func_1FC266B0_cont_BFC26798 }, - { 0x1FC267A4u, SCPH1001_func_1FC266B0_cont_BFC267A4 }, - { 0x1FC267ACu, SCPH1001_func_1FC266B0_cont_BFC267AC }, - { 0x1FC267B4u, SCPH1001_func_1FC266B0_cont_BFC267B4 }, - { 0x1FC267C8u, SCPH1001_func_1FC266B0_cont_BFC267C8 }, - { 0x1FC267CCu, SCPH1001_func_1FC266B0_cont_BFC267CC }, - { 0x1FC267E0u, SCPH1001_func_1FC266B0_cont_BFC267E0 }, - { 0x1FC267E8u, SCPH1001_func_1FC266B0_cont_BFC267E8 }, - { 0x1FC267FCu, SCPH1001_func_1FC266B0_cont_BFC267FC }, - { 0x1FC26804u, SCPH1001_func_1FC266B0_cont_BFC26804 }, - { 0x1FC26820u, SCPH1001_func_1FC266B0_cont_BFC26820 }, - { 0x1FC26824u, SCPH1001_func_1FC266B0_cont_BFC26824 }, - { 0x1FC2682Cu, SCPH1001_func_1FC266B0_cont_BFC2682C }, - { 0x1FC26834u, SCPH1001_func_1FC266B0_cont_BFC26834 }, - { 0x1FC26844u, SCPH1001_func_1FC266B0_cont_BFC26844 }, - { 0x1FC26850u, SCPH1001_func_1FC266B0_cont_BFC26850 }, - { 0x1FC26870u, SCPH1001_func_1FC266B0_cont_BFC26870 }, - { 0x1FC26878u, SCPH1001_func_1FC266B0_cont_BFC26878 }, - { 0x1FC26880u, SCPH1001_func_1FC266B0_cont_BFC26880 }, - { 0x1FC26894u, SCPH1001_func_1FC266B0_cont_BFC26894 }, - { 0x1FC268B0u, SCPH1001_func_1FC266B0_cont_BFC268B0 }, - { 0x1FC268CCu, SCPH1001_func_1FC266B0_cont_BFC268CC }, - { 0x1FC268D4u, SCPH1001_func_1FC266B0_cont_BFC268D4 }, - { 0x1FC268DCu, SCPH1001_func_1FC266B0_cont_BFC268DC }, - { 0x1FC268E0u, SCPH1001_func_1FC266B0_cont_BFC268E0 }, - { 0x1FC268ECu, SCPH1001_func_1FC268EC }, - { 0x1FC26908u, SCPH1001_func_1FC268EC_cont_BFC26908 }, - { 0x1FC2691Cu, SCPH1001_func_1FC268EC_cont_BFC2691C }, - { 0x1FC26928u, SCPH1001_func_1FC268EC_cont_BFC26928 }, - { 0x1FC26940u, SCPH1001_func_1FC268EC_cont_BFC26940 }, - { 0x1FC2695Cu, SCPH1001_func_1FC268EC_cont_BFC2695C }, - { 0x1FC269E0u, SCPH1001_func_1FC268EC_cont_BFC269E0 }, - { 0x1FC269E8u, SCPH1001_func_1FC268EC_cont_BFC269E8 }, - { 0x1FC269F0u, SCPH1001_func_1FC268EC_cont_BFC269F0 }, - { 0x1FC269F8u, SCPH1001_func_1FC268EC_cont_BFC269F8 }, - { 0x1FC26A0Cu, SCPH1001_func_1FC268EC_cont_BFC26A0C }, - { 0x1FC26A38u, SCPH1001_func_1FC268EC_cont_BFC26A38 }, - { 0x1FC26A4Cu, SCPH1001_func_1FC268EC_cont_BFC26A4C }, - { 0x1FC26A74u, SCPH1001_func_1FC268EC_cont_BFC26A74 }, - { 0x1FC26A7Cu, SCPH1001_func_1FC268EC_cont_BFC26A7C }, - { 0x1FC26A80u, SCPH1001_func_1FC268EC_cont_BFC26A80 }, - { 0x1FC26A88u, SCPH1001_func_1FC268EC_cont_BFC26A88 }, - { 0x1FC26AA0u, SCPH1001_func_1FC268EC_cont_BFC26AA0 }, - { 0x1FC26AACu, SCPH1001_func_1FC268EC_cont_BFC26AAC }, - { 0x1FC26AB4u, SCPH1001_func_1FC268EC_cont_BFC26AB4 }, - { 0x1FC26AB8u, SCPH1001_func_1FC268EC_cont_BFC26AB8 }, - { 0x1FC26AC0u, SCPH1001_func_1FC268EC_cont_BFC26AC0 }, - { 0x1FC26AE8u, SCPH1001_func_1FC268EC_cont_BFC26AE8 }, - { 0x1FC26AECu, SCPH1001_func_1FC268EC_cont_BFC26AEC }, - { 0x1FC26AF8u, SCPH1001_func_1FC26AF8 }, - { 0x1FC26C10u, SCPH1001_func_1FC26C10 }, - { 0x1FC26C24u, SCPH1001_func_1FC26C10_cont_BFC26C24 }, - { 0x1FC26C40u, SCPH1001_func_1FC26C10_cont_BFC26C40 }, - { 0x1FC26C48u, SCPH1001_func_1FC26C10_cont_BFC26C48 }, - { 0x1FC26C50u, SCPH1001_func_1FC26C10_cont_BFC26C50 }, - { 0x1FC26C74u, SCPH1001_func_1FC26C10_cont_BFC26C74 }, - { 0x1FC26C84u, SCPH1001_func_1FC26C10_cont_BFC26C84 }, - { 0x1FC26C8Cu, SCPH1001_func_1FC26C10_cont_BFC26C8C }, - { 0x1FC26C9Cu, SCPH1001_func_1FC26C10_cont_BFC26C9C }, - { 0x1FC26CB4u, SCPH1001_func_1FC26C10_cont_BFC26CB4 }, - { 0x1FC26CBCu, SCPH1001_func_1FC26C10_cont_BFC26CBC }, - { 0x1FC26CC8u, SCPH1001_func_1FC26C10_cont_BFC26CC8 }, - { 0x1FC26CDCu, SCPH1001_func_1FC26C10_cont_BFC26CDC }, - { 0x1FC26CF0u, SCPH1001_func_1FC26C10_cont_BFC26CF0 }, - { 0x1FC26D04u, SCPH1001_func_1FC26C10_cont_BFC26D04 }, - { 0x1FC26D0Cu, SCPH1001_func_1FC26C10_cont_BFC26D0C }, - { 0x1FC26D18u, SCPH1001_func_1FC26C10_cont_BFC26D18 }, - { 0x1FC26D28u, SCPH1001_func_1FC26C10_cont_BFC26D28 }, - { 0x1FC26D30u, SCPH1001_func_1FC26C10_cont_BFC26D30 }, - { 0x1FC26D38u, SCPH1001_func_1FC26C10_cont_BFC26D38 }, - { 0x1FC26D50u, SCPH1001_func_1FC26C10_cont_BFC26D50 }, - { 0x1FC26D5Cu, SCPH1001_func_1FC26C10_cont_BFC26D5C }, - { 0x1FC26D64u, SCPH1001_func_1FC26C10_cont_BFC26D64 }, - { 0x1FC26D78u, SCPH1001_func_1FC26C10_cont_BFC26D78 }, - { 0x1FC26D8Cu, SCPH1001_func_1FC26C10_cont_BFC26D8C }, - { 0x1FC26D98u, SCPH1001_func_1FC26C10_cont_BFC26D98 }, - { 0x1FC26DA0u, SCPH1001_func_1FC26C10_cont_BFC26DA0 }, - { 0x1FC26DA8u, SCPH1001_func_1FC26C10_cont_BFC26DA8 }, - { 0x1FC26DBCu, SCPH1001_func_1FC26C10_cont_BFC26DBC }, - { 0x1FC26DC8u, SCPH1001_func_1FC26C10_cont_BFC26DC8 }, - { 0x1FC26DCCu, SCPH1001_func_1FC26C10_cont_BFC26DCC }, - { 0x1FC26DDCu, SCPH1001_func_1FC26C10_cont_BFC26DDC }, - { 0x1FC26DE8u, SCPH1001_func_1FC26C10_cont_BFC26DE8 }, - { 0x1FC26DECu, SCPH1001_func_1FC26C10_cont_BFC26DEC }, - { 0x1FC26DFCu, SCPH1001_func_1FC26C10_cont_BFC26DFC }, - { 0x1FC26E30u, SCPH1001_func_1FC26C10_cont_BFC26E30 }, - { 0x1FC26E3Cu, SCPH1001_func_1FC26C10_cont_BFC26E3C }, - { 0x1FC26E48u, SCPH1001_func_1FC26C10_cont_BFC26E48 }, - { 0x1FC26E54u, SCPH1001_func_1FC26C10_cont_BFC26E54 }, - { 0x1FC26E58u, SCPH1001_func_1FC26C10_cont_BFC26E58 }, - { 0x1FC26E64u, SCPH1001_func_1FC26E64 }, - { 0x1FC26E88u, SCPH1001_func_1FC26E64_cont_BFC26E88 }, - { 0x1FC26E90u, SCPH1001_func_1FC26E64_cont_BFC26E90 }, - { 0x1FC26E98u, SCPH1001_func_1FC26E64_cont_BFC26E98 }, - { 0x1FC26E9Cu, SCPH1001_func_1FC26E64_cont_BFC26E9C }, - { 0x1FC26EA4u, SCPH1001_func_1FC26E64_cont_BFC26EA4 }, - { 0x1FC26EACu, SCPH1001_func_1FC26E64_cont_BFC26EAC }, - { 0x1FC26EB0u, SCPH1001_func_1FC26E64_cont_BFC26EB0 }, - { 0x1FC26EC0u, SCPH1001_func_1FC26E64_cont_BFC26EC0 }, - { 0x1FC26EC8u, SCPH1001_func_1FC26E64_cont_BFC26EC8 }, - { 0x1FC26ED8u, SCPH1001_func_1FC26E64_cont_BFC26ED8 }, - { 0x1FC26EE0u, SCPH1001_func_1FC26E64_cont_BFC26EE0 }, - { 0x1FC26EE8u, SCPH1001_func_1FC26E64_cont_BFC26EE8 }, - { 0x1FC26EF8u, SCPH1001_func_1FC26EF8 }, - { 0x1FC27024u, SCPH1001_func_1FC26EF8_cont_BFC27024 }, - { 0x1FC2702Cu, SCPH1001_func_1FC26EF8_cont_BFC2702C }, - { 0x1FC27034u, SCPH1001_func_1FC26EF8_cont_BFC27034 }, - { 0x1FC2703Cu, SCPH1001_func_1FC26EF8_cont_BFC2703C }, - { 0x1FC27044u, SCPH1001_func_1FC26EF8_cont_BFC27044 }, - { 0x1FC27048u, SCPH1001_func_1FC26EF8_cont_BFC27048 }, - { 0x1FC27058u, SCPH1001_func_1FC26EF8_cont_BFC27058 }, - { 0x1FC27060u, SCPH1001_func_1FC26EF8_cont_BFC27060 }, - { 0x1FC2706Cu, SCPH1001_func_1FC26EF8_cont_BFC2706C }, - { 0x1FC2707Cu, SCPH1001_func_1FC26EF8_cont_BFC2707C }, - { 0x1FC27084u, SCPH1001_func_1FC26EF8_cont_BFC27084 }, - { 0x1FC2708Cu, SCPH1001_func_1FC26EF8_cont_BFC2708C }, - { 0x1FC270A4u, SCPH1001_func_1FC26EF8_cont_BFC270A4 }, - { 0x1FC270ACu, SCPH1001_func_1FC26EF8_cont_BFC270AC }, - { 0x1FC270B8u, SCPH1001_func_1FC26EF8_cont_BFC270B8 }, - { 0x1FC270C8u, SCPH1001_func_1FC26EF8_cont_BFC270C8 }, - { 0x1FC270D0u, SCPH1001_func_1FC26EF8_cont_BFC270D0 }, - { 0x1FC270D8u, SCPH1001_func_1FC26EF8_cont_BFC270D8 }, - { 0x1FC270E8u, SCPH1001_func_1FC26EF8_cont_BFC270E8 }, - { 0x1FC270F0u, SCPH1001_func_1FC26EF8_cont_BFC270F0 }, - { 0x1FC270FCu, SCPH1001_func_1FC26EF8_cont_BFC270FC }, - { 0x1FC27104u, SCPH1001_func_1FC26EF8_cont_BFC27104 }, - { 0x1FC27114u, SCPH1001_func_1FC26EF8_cont_BFC27114 }, - { 0x1FC2711Cu, SCPH1001_func_1FC26EF8_cont_BFC2711C }, - { 0x1FC2712Cu, SCPH1001_func_1FC26EF8_cont_BFC2712C }, - { 0x1FC2713Cu, SCPH1001_func_1FC26EF8_cont_BFC2713C }, - { 0x1FC27144u, SCPH1001_func_1FC26EF8_cont_BFC27144 }, - { 0x1FC27154u, SCPH1001_func_1FC26EF8_cont_BFC27154 }, - { 0x1FC2715Cu, SCPH1001_func_1FC26EF8_cont_BFC2715C }, - { 0x1FC2716Cu, SCPH1001_func_1FC26EF8_cont_BFC2716C }, - { 0x1FC27190u, SCPH1001_func_1FC27190 }, - { 0x1FC271C0u, SCPH1001_func_1FC27190_cont_BFC271C0 }, - { 0x1FC271C8u, SCPH1001_func_1FC27190_cont_BFC271C8 }, - { 0x1FC271E8u, SCPH1001_func_1FC27190_cont_BFC271E8 }, - { 0x1FC27208u, SCPH1001_func_1FC27190_cont_BFC27208 }, - { 0x1FC27228u, SCPH1001_func_1FC27190_cont_BFC27228 }, - { 0x1FC27248u, SCPH1001_func_1FC27190_cont_BFC27248 }, - { 0x1FC2725Cu, SCPH1001_func_1FC27190_cont_BFC2725C }, - { 0x1FC272B8u, SCPH1001_func_1FC27190_cont_BFC272B8 }, - { 0x1FC272ECu, SCPH1001_func_1FC27190_cont_BFC272EC }, - { 0x1FC272F4u, SCPH1001_func_1FC27190_cont_BFC272F4 }, - { 0x1FC27324u, SCPH1001_func_1FC27190_cont_BFC27324 }, - { 0x1FC27328u, SCPH1001_func_1FC27190_cont_BFC27328 }, - { 0x1FC27330u, SCPH1001_func_1FC27190_cont_BFC27330 }, - { 0x1FC27338u, SCPH1001_func_1FC27190_cont_BFC27338 }, - { 0x1FC2734Cu, SCPH1001_func_1FC27190_cont_BFC2734C }, - { 0x1FC2738Cu, SCPH1001_func_1FC27190_cont_BFC2738C }, - { 0x1FC27398u, SCPH1001_func_1FC27190_cont_BFC27398 }, - { 0x1FC273A0u, SCPH1001_func_1FC27190_cont_BFC273A0 }, - { 0x1FC273A8u, SCPH1001_func_1FC27190_cont_BFC273A8 }, - { 0x1FC273B8u, SCPH1001_func_1FC27190_cont_BFC273B8 }, - { 0x1FC273E4u, SCPH1001_func_1FC273E4 }, - { 0x1FC27434u, SCPH1001_func_1FC273E4_cont_BFC27434 }, - { 0x1FC27448u, SCPH1001_func_1FC273E4_cont_BFC27448 }, - { 0x1FC27454u, SCPH1001_func_1FC273E4_cont_BFC27454 }, - { 0x1FC2745Cu, SCPH1001_func_1FC273E4_cont_BFC2745C }, - { 0x1FC2746Cu, SCPH1001_func_1FC273E4_cont_BFC2746C }, - { 0x1FC27480u, SCPH1001_func_1FC273E4_cont_BFC27480 }, - { 0x1FC27494u, SCPH1001_func_1FC273E4_cont_BFC27494 }, - { 0x1FC274A8u, SCPH1001_func_1FC273E4_cont_BFC274A8 }, - { 0x1FC274C4u, SCPH1001_func_1FC273E4_cont_BFC274C4 }, - { 0x1FC274C8u, SCPH1001_func_1FC273E4_cont_BFC274C8 }, - { 0x1FC274D4u, SCPH1001_func_1FC273E4_cont_BFC274D4 }, - { 0x1FC274DCu, SCPH1001_func_1FC273E4_cont_BFC274DC }, - { 0x1FC274E0u, SCPH1001_func_1FC273E4_cont_BFC274E0 }, - { 0x1FC274ECu, SCPH1001_func_1FC273E4_cont_BFC274EC }, - { 0x1FC27508u, SCPH1001_func_1FC273E4_cont_BFC27508 }, - { 0x1FC2750Cu, SCPH1001_func_1FC273E4_cont_BFC2750C }, - { 0x1FC27518u, SCPH1001_func_1FC273E4_cont_BFC27518 }, - { 0x1FC27520u, SCPH1001_func_1FC273E4_cont_BFC27520 }, - { 0x1FC27524u, SCPH1001_func_1FC273E4_cont_BFC27524 }, - { 0x1FC27530u, SCPH1001_func_1FC273E4_cont_BFC27530 }, - { 0x1FC2754Cu, SCPH1001_func_1FC273E4_cont_BFC2754C }, - { 0x1FC27550u, SCPH1001_func_1FC273E4_cont_BFC27550 }, - { 0x1FC2755Cu, SCPH1001_func_1FC273E4_cont_BFC2755C }, - { 0x1FC27564u, SCPH1001_func_1FC273E4_cont_BFC27564 }, - { 0x1FC27568u, SCPH1001_func_1FC273E4_cont_BFC27568 }, - { 0x1FC27574u, SCPH1001_func_1FC273E4_cont_BFC27574 }, - { 0x1FC27590u, SCPH1001_func_1FC273E4_cont_BFC27590 }, - { 0x1FC27594u, SCPH1001_func_1FC273E4_cont_BFC27594 }, - { 0x1FC275A0u, SCPH1001_func_1FC273E4_cont_BFC275A0 }, - { 0x1FC275A8u, SCPH1001_func_1FC273E4_cont_BFC275A8 }, - { 0x1FC275ACu, SCPH1001_func_1FC273E4_cont_BFC275AC }, - { 0x1FC275B8u, SCPH1001_func_1FC273E4_cont_BFC275B8 }, - { 0x1FC275C0u, SCPH1001_func_1FC273E4_cont_BFC275C0 }, - { 0x1FC275C8u, SCPH1001_func_1FC273E4_cont_BFC275C8 }, - { 0x1FC275D4u, SCPH1001_func_1FC273E4_cont_BFC275D4 }, - { 0x1FC275F0u, SCPH1001_func_1FC273E4_cont_BFC275F0 }, - { 0x1FC275FCu, SCPH1001_func_1FC273E4_cont_BFC275FC }, - { 0x1FC27600u, SCPH1001_func_1FC273E4_cont_BFC27600 }, - { 0x1FC27614u, SCPH1001_func_1FC273E4_cont_BFC27614 }, - { 0x1FC276CCu, SCPH1001_func_1FC273E4_cont_BFC276CC }, - { 0x1FC276D8u, SCPH1001_func_1FC273E4_cont_BFC276D8 }, - { 0x1FC276F8u, SCPH1001_func_1FC273E4_cont_BFC276F8 }, - { 0x1FC27700u, SCPH1001_func_1FC273E4_cont_BFC27700 }, - { 0x1FC27708u, SCPH1001_func_1FC273E4_cont_BFC27708 }, - { 0x1FC27714u, SCPH1001_func_1FC273E4_cont_BFC27714 }, - { 0x1FC27734u, SCPH1001_func_1FC273E4_cont_BFC27734 }, - { 0x1FC2773Cu, SCPH1001_func_1FC273E4_cont_BFC2773C }, - { 0x1FC2775Cu, SCPH1001_func_1FC273E4_cont_BFC2775C }, - { 0x1FC27760u, SCPH1001_func_1FC273E4_cont_BFC27760 }, - { 0x1FC2777Cu, SCPH1001_func_1FC273E4_cont_BFC2777C }, - { 0x1FC2779Cu, SCPH1001_func_1FC273E4_cont_BFC2779C }, - { 0x1FC277BCu, SCPH1001_func_1FC273E4_cont_BFC277BC }, - { 0x1FC277DCu, SCPH1001_func_1FC273E4_cont_BFC277DC }, - { 0x1FC277FCu, SCPH1001_func_1FC273E4_cont_BFC277FC }, - { 0x1FC27804u, SCPH1001_func_1FC273E4_cont_BFC27804 }, - { 0x1FC27824u, SCPH1001_func_1FC273E4_cont_BFC27824 }, - { 0x1FC27828u, SCPH1001_func_1FC273E4_cont_BFC27828 }, - { 0x1FC2783Cu, SCPH1001_func_1FC273E4_cont_BFC2783C }, - { 0x1FC27868u, SCPH1001_func_1FC27868 }, - { 0x1FC27890u, SCPH1001_func_1FC27868_cont_BFC27890 }, - { 0x1FC278C8u, SCPH1001_func_1FC27868_cont_BFC278C8 }, - { 0x1FC278D8u, SCPH1001_func_1FC27868_cont_BFC278D8 }, - { 0x1FC278ECu, SCPH1001_func_1FC27868_cont_BFC278EC }, - { 0x1FC278F4u, SCPH1001_func_1FC27868_cont_BFC278F4 }, - { 0x1FC278F8u, SCPH1001_func_1FC27868_cont_BFC278F8 }, - { 0x1FC27910u, SCPH1001_func_1FC27910 }, - { 0x1FC2792Cu, SCPH1001_func_1FC27910_cont_BFC2792C }, - { 0x1FC27954u, SCPH1001_func_1FC27910_cont_BFC27954 }, - { 0x1FC27974u, SCPH1001_func_1FC27910_cont_BFC27974 }, - { 0x1FC2799Cu, SCPH1001_func_1FC27910_cont_BFC2799C }, - { 0x1FC279D8u, SCPH1001_func_1FC27910_cont_BFC279D8 }, - { 0x1FC279E0u, SCPH1001_func_1FC27910_cont_BFC279E0 }, - { 0x1FC279F0u, SCPH1001_func_1FC27910_cont_BFC279F0 }, - { 0x1FC27A00u, SCPH1001_func_1FC27910_cont_BFC27A00 }, - { 0x1FC27A04u, SCPH1001_func_1FC27910_cont_BFC27A04 }, - { 0x1FC27A0Cu, SCPH1001_func_1FC27910_cont_BFC27A0C }, - { 0x1FC27A14u, SCPH1001_func_1FC27910_cont_BFC27A14 }, - { 0x1FC27A18u, SCPH1001_func_1FC27910_cont_BFC27A18 }, - { 0x1FC27A2Cu, SCPH1001_func_1FC27A2C }, - { 0x1FC27A64u, SCPH1001_func_1FC27A2C_cont_BFC27A64 }, - { 0x1FC27A84u, SCPH1001_func_1FC27A2C_cont_BFC27A84 }, - { 0x1FC27AACu, SCPH1001_func_1FC27A2C_cont_BFC27AAC }, - { 0x1FC27AE8u, SCPH1001_func_1FC27A2C_cont_BFC27AE8 }, - { 0x1FC27AF0u, SCPH1001_func_1FC27A2C_cont_BFC27AF0 }, - { 0x1FC27B0Cu, SCPH1001_func_1FC27A2C_cont_BFC27B0C }, - { 0x1FC27B10u, SCPH1001_func_1FC27A2C_cont_BFC27B10 }, - { 0x1FC27B24u, SCPH1001_func_1FC27B24 }, - { 0x1FC27B34u, SCPH1001_func_1FC27B24_cont_BFC27B34 }, - { 0x1FC27B58u, SCPH1001_func_1FC27B24_cont_BFC27B58 }, - { 0x1FC27B7Cu, SCPH1001_func_1FC27B24_cont_BFC27B7C }, - { 0x1FC27BA0u, SCPH1001_func_1FC27B24_cont_BFC27BA0 }, - { 0x1FC27BC4u, SCPH1001_func_1FC27B24_cont_BFC27BC4 }, - { 0x1FC27BCCu, SCPH1001_func_1FC27B24_cont_BFC27BCC }, - { 0x1FC27BDCu, SCPH1001_func_1FC27BDC }, - { 0x1FC27C14u, SCPH1001_func_1FC27BDC_cont_BFC27C14 }, - { 0x1FC27C30u, SCPH1001_func_1FC27BDC_cont_BFC27C30 }, - { 0x1FC27C58u, SCPH1001_func_1FC27BDC_cont_BFC27C58 }, - { 0x1FC27C8Cu, SCPH1001_func_1FC27BDC_cont_BFC27C8C }, - { 0x1FC27C94u, SCPH1001_func_1FC27BDC_cont_BFC27C94 }, - { 0x1FC27CB0u, SCPH1001_func_1FC27BDC_cont_BFC27CB0 }, - { 0x1FC27CB4u, SCPH1001_func_1FC27BDC_cont_BFC27CB4 }, - { 0x1FC27CC8u, SCPH1001_func_1FC27CC8 }, - { 0x1FC27CD8u, SCPH1001_func_1FC27CC8_cont_BFC27CD8 }, - { 0x1FC27CE0u, SCPH1001_func_1FC27CC8_cont_BFC27CE0 }, - { 0x1FC27D2Cu, SCPH1001_func_1FC27D2C }, - { 0x1FC27D48u, SCPH1001_func_1FC27D2C_cont_BFC27D48 }, - { 0x1FC27D70u, SCPH1001_func_1FC27D2C_cont_BFC27D70 }, - { 0x1FC27D7Cu, SCPH1001_func_1FC27D2C_cont_BFC27D7C }, - { 0x1FC27D8Cu, SCPH1001_func_1FC27D2C_cont_BFC27D8C }, - { 0x1FC27DB0u, SCPH1001_func_1FC27DB0 }, - { 0x1FC27DBCu, SCPH1001_func_1FC27DB0_cont_BFC27DBC }, - { 0x1FC27DC4u, SCPH1001_func_1FC27DB0_cont_BFC27DC4 }, - { 0x1FC27DCCu, SCPH1001_func_1FC27DB0_cont_BFC27DCC }, - { 0x1FC27DD8u, SCPH1001_func_1FC27DB0_cont_BFC27DD8 }, - { 0x1FC27DE8u, SCPH1001_func_1FC27DB0_cont_BFC27DE8 }, - { 0x1FC27DF8u, SCPH1001_func_1FC27DB0_cont_BFC27DF8 }, - { 0x1FC27E08u, SCPH1001_func_1FC27DB0_cont_BFC27E08 }, - { 0x1FC27E18u, SCPH1001_func_1FC27DB0_cont_BFC27E18 }, - { 0x1FC27E28u, SCPH1001_func_1FC27DB0_cont_BFC27E28 }, - { 0x1FC27E58u, SCPH1001_func_1FC27DB0_cont_BFC27E58 }, - { 0x1FC27E68u, SCPH1001_func_1FC27E68 }, - { 0x1FC27E78u, SCPH1001_func_1FC27E68_cont_BFC27E78 }, - { 0x1FC27E88u, SCPH1001_func_1FC27E88 }, - { 0x1FC27EA0u, SCPH1001_func_1FC27E88_cont_BFC27EA0 }, - { 0x1FC27EB4u, SCPH1001_func_1FC27EB4 }, - { 0x1FC27ED4u, SCPH1001_func_1FC27EB4_cont_BFC27ED4 }, - { 0x1FC27EF0u, SCPH1001_func_1FC27EB4_cont_BFC27EF0 }, - { 0x1FC27EF8u, SCPH1001_func_1FC27EB4_cont_BFC27EF8 }, - { 0x1FC27F08u, SCPH1001_func_1FC27EB4_cont_BFC27F08 }, - { 0x1FC27F10u, SCPH1001_func_1FC27EB4_cont_BFC27F10 }, - { 0x1FC27F18u, SCPH1001_func_1FC27EB4_cont_BFC27F18 }, - { 0x1FC27F28u, SCPH1001_func_1FC27EB4_cont_BFC27F28 }, - { 0x1FC27F30u, SCPH1001_func_1FC27EB4_cont_BFC27F30 }, - { 0x1FC27F38u, SCPH1001_func_1FC27EB4_cont_BFC27F38 }, - { 0x1FC27F48u, SCPH1001_func_1FC27EB4_cont_BFC27F48 }, - { 0x1FC27F50u, SCPH1001_func_1FC27EB4_cont_BFC27F50 }, - { 0x1FC27F58u, SCPH1001_func_1FC27EB4_cont_BFC27F58 }, - { 0x1FC27F68u, SCPH1001_func_1FC27EB4_cont_BFC27F68 }, - { 0x1FC27F70u, SCPH1001_func_1FC27EB4_cont_BFC27F70 }, - { 0x1FC27F78u, SCPH1001_func_1FC27EB4_cont_BFC27F78 }, - { 0x1FC27F88u, SCPH1001_func_1FC27EB4_cont_BFC27F88 }, - { 0x1FC27F90u, SCPH1001_func_1FC27EB4_cont_BFC27F90 }, - { 0x1FC27F98u, SCPH1001_func_1FC27EB4_cont_BFC27F98 }, - { 0x1FC27FA8u, SCPH1001_func_1FC27EB4_cont_BFC27FA8 }, - { 0x1FC27FB0u, SCPH1001_func_1FC27FB0 }, - { 0x1FC27FC4u, SCPH1001_func_1FC27FB0_cont_BFC27FC4 }, - { 0x1FC27FDCu, SCPH1001_func_1FC27FB0_cont_BFC27FDC }, - { 0x1FC27FECu, SCPH1001_func_1FC27FB0_cont_BFC27FEC }, - { 0x1FC27FF8u, SCPH1001_func_1FC27FB0_cont_BFC27FF8 }, - { 0x1FC2800Cu, SCPH1001_func_1FC27FB0_cont_BFC2800C }, - { 0x1FC28018u, SCPH1001_func_1FC27FB0_cont_BFC28018 }, - { 0x1FC28024u, SCPH1001_func_1FC27FB0_cont_BFC28024 }, - { 0x1FC2802Cu, SCPH1001_func_1FC27FB0_cont_BFC2802C }, - { 0x1FC2803Cu, SCPH1001_func_1FC27FB0_cont_BFC2803C }, - { 0x1FC2804Cu, SCPH1001_func_1FC27FB0_cont_BFC2804C }, - { 0x1FC28054u, SCPH1001_func_1FC27FB0_cont_BFC28054 }, - { 0x1FC28064u, SCPH1001_func_1FC28064 }, - { 0x1FC2807Cu, SCPH1001_func_1FC28064_cont_BFC2807C }, - { 0x1FC282E8u, SCPH1001_func_1FC282E8 }, - { 0x1FC282FCu, SCPH1001_func_1FC282E8_cont_BFC282FC }, - { 0x1FC28324u, SCPH1001_func_1FC282E8_cont_BFC28324 }, - { 0x1FC2834Cu, SCPH1001_func_1FC282E8_cont_BFC2834C }, - { 0x1FC28354u, SCPH1001_func_1FC282E8_cont_BFC28354 }, - { 0x1FC28360u, SCPH1001_func_1FC282E8_cont_BFC28360 }, - { 0x1FC28370u, SCPH1001_func_1FC28370 }, - { 0x1FC28388u, SCPH1001_func_1FC28370_cont_BFC28388 }, - { 0x1FC283ACu, SCPH1001_func_1FC28370_cont_BFC283AC }, - { 0x1FC283D0u, SCPH1001_func_1FC28370_cont_BFC283D0 }, - { 0x1FC283D8u, SCPH1001_func_1FC28370_cont_BFC283D8 }, - { 0x1FC283E0u, SCPH1001_func_1FC28370_cont_BFC283E0 }, - { 0x1FC283F0u, SCPH1001_func_1FC283F0 }, - { 0x1FC283F8u, SCPH1001_func_1FC283F0_cont_BFC283F8 }, - { 0x1FC2840Cu, SCPH1001_func_1FC283F0_cont_BFC2840C }, - { 0x1FC28418u, SCPH1001_func_1FC283F0_cont_BFC28418 }, - { 0x1FC28420u, SCPH1001_func_1FC283F0_cont_BFC28420 }, - { 0x1FC28424u, SCPH1001_func_1FC283F0_cont_BFC28424 }, - { 0x1FC28444u, SCPH1001_func_1FC283F0_cont_BFC28444 }, - { 0x1FC28450u, SCPH1001_func_1FC283F0_cont_BFC28450 }, - { 0x1FC2845Cu, SCPH1001_func_1FC283F0_cont_BFC2845C }, - { 0x1FC28480u, SCPH1001_func_1FC283F0_cont_BFC28480 }, - { 0x1FC28490u, SCPH1001_func_1FC28490 }, - { 0x1FC284ACu, SCPH1001_func_1FC28490_cont_BFC284AC }, - { 0x1FC284B4u, SCPH1001_func_1FC28490_cont_BFC284B4 }, - { 0x1FC284C0u, SCPH1001_func_1FC28490_cont_BFC284C0 }, - { 0x1FC284C8u, SCPH1001_func_1FC28490_cont_BFC284C8 }, - { 0x1FC284D0u, SCPH1001_func_1FC28490_cont_BFC284D0 }, - { 0x1FC284D8u, SCPH1001_func_1FC28490_cont_BFC284D8 }, - { 0x1FC284DCu, SCPH1001_func_1FC28490_cont_BFC284DC }, - { 0x1FC284F0u, SCPH1001_func_1FC284F0 }, - { 0x1FC28504u, SCPH1001_func_1FC284F0_cont_BFC28504 }, - { 0x1FC28514u, SCPH1001_func_1FC284F0_cont_BFC28514 }, - { 0x1FC2851Cu, SCPH1001_func_1FC284F0_cont_BFC2851C }, - { 0x1FC2852Cu, SCPH1001_func_1FC284F0_cont_BFC2852C }, - { 0x1FC2853Cu, SCPH1001_func_1FC284F0_cont_BFC2853C }, - { 0x1FC28544u, SCPH1001_func_1FC284F0_cont_BFC28544 }, - { 0x1FC28568u, SCPH1001_func_1FC284F0_cont_BFC28568 }, - { 0x1FC28578u, SCPH1001_func_1FC284F0_cont_BFC28578 }, - { 0x1FC28580u, SCPH1001_func_1FC284F0_cont_BFC28580 }, - { 0x1FC28594u, SCPH1001_func_1FC284F0_cont_BFC28594 }, - { 0x1FC285A4u, SCPH1001_func_1FC284F0_cont_BFC285A4 }, - { 0x1FC285B8u, SCPH1001_func_1FC284F0_cont_BFC285B8 }, - { 0x1FC285C0u, SCPH1001_func_1FC284F0_cont_BFC285C0 }, - { 0x1FC285C4u, SCPH1001_func_1FC284F0_cont_BFC285C4 }, - { 0x1FC285CCu, SCPH1001_func_1FC284F0_cont_BFC285CC }, - { 0x1FC285D0u, SCPH1001_func_1FC284F0_cont_BFC285D0 }, - { 0x1FC285DCu, SCPH1001_func_1FC284F0_cont_BFC285DC }, - { 0x1FC285F0u, SCPH1001_func_1FC284F0_cont_BFC285F0 }, - { 0x1FC285F8u, SCPH1001_func_1FC284F0_cont_BFC285F8 }, - { 0x1FC285FCu, SCPH1001_func_1FC284F0_cont_BFC285FC }, - { 0x1FC28610u, SCPH1001_func_1FC284F0_cont_BFC28610 }, - { 0x1FC28614u, SCPH1001_func_1FC284F0_cont_BFC28614 }, - { 0x1FC28620u, SCPH1001_func_1FC284F0_cont_BFC28620 }, - { 0x1FC28628u, SCPH1001_func_1FC284F0_cont_BFC28628 }, - { 0x1FC2863Cu, SCPH1001_func_1FC284F0_cont_BFC2863C }, - { 0x1FC28644u, SCPH1001_func_1FC284F0_cont_BFC28644 }, - { 0x1FC28648u, SCPH1001_func_1FC284F0_cont_BFC28648 }, - { 0x1FC28650u, SCPH1001_func_1FC284F0_cont_BFC28650 }, - { 0x1FC28654u, SCPH1001_func_1FC284F0_cont_BFC28654 }, - { 0x1FC28660u, SCPH1001_func_1FC284F0_cont_BFC28660 }, - { 0x1FC28674u, SCPH1001_func_1FC284F0_cont_BFC28674 }, - { 0x1FC2867Cu, SCPH1001_func_1FC284F0_cont_BFC2867C }, - { 0x1FC28688u, SCPH1001_func_1FC284F0_cont_BFC28688 }, - { 0x1FC2868Cu, SCPH1001_func_1FC284F0_cont_BFC2868C }, - { 0x1FC286C4u, SCPH1001_func_1FC284F0_cont_BFC286C4 }, - { 0x1FC286FCu, SCPH1001_func_1FC284F0_cont_BFC286FC }, - { 0x1FC28734u, SCPH1001_func_1FC284F0_cont_BFC28734 }, - { 0x1FC2873Cu, SCPH1001_func_1FC284F0_cont_BFC2873C }, - { 0x1FC28750u, SCPH1001_func_1FC284F0_cont_BFC28750 }, - { 0x1FC28788u, SCPH1001_func_1FC284F0_cont_BFC28788 }, - { 0x1FC287C0u, SCPH1001_func_1FC284F0_cont_BFC287C0 }, - { 0x1FC287F8u, SCPH1001_func_1FC284F0_cont_BFC287F8 }, - { 0x1FC287FCu, SCPH1001_func_1FC284F0_cont_BFC287FC }, - { 0x1FC28808u, SCPH1001_func_1FC284F0_cont_BFC28808 }, - { 0x1FC28810u, SCPH1001_func_1FC284F0_cont_BFC28810 }, - { 0x1FC28818u, SCPH1001_func_1FC284F0_cont_BFC28818 }, - { 0x1FC28820u, SCPH1001_func_1FC284F0_cont_BFC28820 }, - { 0x1FC28834u, SCPH1001_func_1FC284F0_cont_BFC28834 }, - { 0x1FC2883Cu, SCPH1001_func_1FC284F0_cont_BFC2883C }, - { 0x1FC28840u, SCPH1001_func_1FC284F0_cont_BFC28840 }, - { 0x1FC28848u, SCPH1001_func_1FC284F0_cont_BFC28848 }, - { 0x1FC2884Cu, SCPH1001_func_1FC284F0_cont_BFC2884C }, - { 0x1FC2885Cu, SCPH1001_func_1FC284F0_cont_BFC2885C }, - { 0x1FC28860u, SCPH1001_func_1FC284F0_cont_BFC28860 }, - { 0x1FC2886Cu, SCPH1001_func_1FC2886C }, - { 0x1FC288A0u, SCPH1001_func_1FC2886C_cont_BFC288A0 }, - { 0x1FC288D4u, SCPH1001_func_1FC2886C_cont_BFC288D4 }, - { 0x1FC28900u, SCPH1001_func_1FC2886C_cont_BFC28900 }, - { 0x1FC2892Cu, SCPH1001_func_1FC2886C_cont_BFC2892C }, - { 0x1FC28958u, SCPH1001_func_1FC2886C_cont_BFC28958 }, - { 0x1FC28988u, SCPH1001_func_1FC2886C_cont_BFC28988 }, - { 0x1FC289B8u, SCPH1001_func_1FC2886C_cont_BFC289B8 }, - { 0x1FC289E8u, SCPH1001_func_1FC2886C_cont_BFC289E8 }, - { 0x1FC289F0u, SCPH1001_func_1FC2886C_cont_BFC289F0 }, - { 0x1FC289F8u, SCPH1001_func_1FC2886C_cont_BFC289F8 }, - { 0x1FC289FCu, SCPH1001_func_1FC2886C_cont_BFC289FC }, - { 0x1FC28A34u, SCPH1001_func_1FC2886C_cont_BFC28A34 }, - { 0x1FC28A38u, SCPH1001_func_1FC2886C_cont_BFC28A38 }, - { 0x1FC28A44u, SCPH1001_func_1FC2886C_cont_BFC28A44 }, - { 0x1FC28A4Cu, SCPH1001_func_1FC2886C_cont_BFC28A4C }, - { 0x1FC28A50u, SCPH1001_func_1FC2886C_cont_BFC28A50 }, - { 0x1FC28A58u, SCPH1001_func_1FC2886C_cont_BFC28A58 }, - { 0x1FC28A60u, SCPH1001_func_1FC2886C_cont_BFC28A60 }, - { 0x1FC28A68u, SCPH1001_func_1FC2886C_cont_BFC28A68 }, - { 0x1FC28A6Cu, SCPH1001_func_1FC2886C_cont_BFC28A6C }, - { 0x1FC28AA4u, SCPH1001_func_1FC2886C_cont_BFC28AA4 }, - { 0x1FC28AA8u, SCPH1001_func_1FC2886C_cont_BFC28AA8 }, - { 0x1FC28AB4u, SCPH1001_func_1FC2886C_cont_BFC28AB4 }, - { 0x1FC28ABCu, SCPH1001_func_1FC2886C_cont_BFC28ABC }, - { 0x1FC28AC0u, SCPH1001_func_1FC2886C_cont_BFC28AC0 }, - { 0x1FC28AC8u, SCPH1001_func_1FC2886C_cont_BFC28AC8 }, - { 0x1FC28AD0u, SCPH1001_func_1FC2886C_cont_BFC28AD0 }, - { 0x1FC28AD8u, SCPH1001_func_1FC2886C_cont_BFC28AD8 }, - { 0x1FC28ADCu, SCPH1001_func_1FC2886C_cont_BFC28ADC }, - { 0x1FC28B14u, SCPH1001_func_1FC2886C_cont_BFC28B14 }, - { 0x1FC28B18u, SCPH1001_func_1FC2886C_cont_BFC28B18 }, - { 0x1FC28B24u, SCPH1001_func_1FC2886C_cont_BFC28B24 }, - { 0x1FC28B2Cu, SCPH1001_func_1FC2886C_cont_BFC28B2C }, - { 0x1FC28B30u, SCPH1001_func_1FC2886C_cont_BFC28B30 }, - { 0x1FC28B38u, SCPH1001_func_1FC2886C_cont_BFC28B38 }, - { 0x1FC28B54u, SCPH1001_func_1FC2886C_cont_BFC28B54 }, - { 0x1FC28B84u, SCPH1001_func_1FC28B84 }, - { 0x1FC28BCCu, SCPH1001_func_1FC28B84_cont_BFC28BCC }, - { 0x1FC28BD0u, SCPH1001_func_1FC28B84_cont_BFC28BD0 }, - { 0x1FC28BDCu, SCPH1001_func_1FC28B84_cont_BFC28BDC }, - { 0x1FC28BE4u, SCPH1001_func_1FC28B84_cont_BFC28BE4 }, - { 0x1FC28BE8u, SCPH1001_func_1FC28B84_cont_BFC28BE8 }, - { 0x1FC28C40u, SCPH1001_func_1FC28B84_cont_BFC28C40 }, - { 0x1FC28C44u, SCPH1001_func_1FC28B84_cont_BFC28C44 }, - { 0x1FC28C50u, SCPH1001_func_1FC28B84_cont_BFC28C50 }, - { 0x1FC28C58u, SCPH1001_func_1FC28B84_cont_BFC28C58 }, - { 0x1FC28C5Cu, SCPH1001_func_1FC28B84_cont_BFC28C5C }, - { 0x1FC28C90u, SCPH1001_func_1FC28B84_cont_BFC28C90 }, - { 0x1FC28CB8u, SCPH1001_func_1FC28B84_cont_BFC28CB8 }, - { 0x1FC28CECu, SCPH1001_func_1FC28B84_cont_BFC28CEC }, - { 0x1FC28D20u, SCPH1001_func_1FC28B84_cont_BFC28D20 }, - { 0x1FC28D54u, SCPH1001_func_1FC28B84_cont_BFC28D54 }, - { 0x1FC28D88u, SCPH1001_func_1FC28B84_cont_BFC28D88 }, - { 0x1FC28DB8u, SCPH1001_func_1FC28B84_cont_BFC28DB8 }, - { 0x1FC28DE8u, SCPH1001_func_1FC28B84_cont_BFC28DE8 }, - { 0x1FC28E18u, SCPH1001_func_1FC28B84_cont_BFC28E18 }, - { 0x1FC28E48u, SCPH1001_func_1FC28B84_cont_BFC28E48 }, - { 0x1FC28E74u, SCPH1001_func_1FC28B84_cont_BFC28E74 }, - { 0x1FC28E9Cu, SCPH1001_func_1FC28B84_cont_BFC28E9C }, - { 0x1FC28ED0u, SCPH1001_func_1FC28B84_cont_BFC28ED0 }, - { 0x1FC28F04u, SCPH1001_func_1FC28B84_cont_BFC28F04 }, - { 0x1FC28F38u, SCPH1001_func_1FC28B84_cont_BFC28F38 }, - { 0x1FC28F68u, SCPH1001_func_1FC28B84_cont_BFC28F68 }, - { 0x1FC28F98u, SCPH1001_func_1FC28B84_cont_BFC28F98 }, - { 0x1FC28FC8u, SCPH1001_func_1FC28B84_cont_BFC28FC8 }, - { 0x1FC28FF4u, SCPH1001_func_1FC28B84_cont_BFC28FF4 }, - { 0x1FC2901Cu, SCPH1001_func_1FC28B84_cont_BFC2901C }, - { 0x1FC29050u, SCPH1001_func_1FC28B84_cont_BFC29050 }, - { 0x1FC29084u, SCPH1001_func_1FC28B84_cont_BFC29084 }, - { 0x1FC290B8u, SCPH1001_func_1FC28B84_cont_BFC290B8 }, - { 0x1FC290E8u, SCPH1001_func_1FC28B84_cont_BFC290E8 }, - { 0x1FC29118u, SCPH1001_func_1FC28B84_cont_BFC29118 }, - { 0x1FC29148u, SCPH1001_func_1FC28B84_cont_BFC29148 }, - { 0x1FC29174u, SCPH1001_func_1FC28B84_cont_BFC29174 }, - { 0x1FC29194u, SCPH1001_func_1FC28B84_cont_BFC29194 }, - { 0x1FC291C4u, SCPH1001_func_1FC291C4 }, - { 0x1FC291E8u, SCPH1001_func_1FC291C4_cont_BFC291E8 }, - { 0x1FC29210u, SCPH1001_func_1FC291C4_cont_BFC29210 }, - { 0x1FC29214u, SCPH1001_func_1FC291C4_cont_BFC29214 }, - { 0x1FC29220u, SCPH1001_func_1FC291C4_cont_BFC29220 }, - { 0x1FC29224u, SCPH1001_func_1FC291C4_cont_BFC29224 }, - { 0x1FC2924Cu, SCPH1001_func_1FC291C4_cont_BFC2924C }, - { 0x1FC29254u, SCPH1001_func_1FC291C4_cont_BFC29254 }, - { 0x1FC29258u, SCPH1001_func_1FC291C4_cont_BFC29258 }, - { 0x1FC2928Cu, SCPH1001_func_1FC291C4_cont_BFC2928C }, - { 0x1FC29290u, SCPH1001_func_1FC291C4_cont_BFC29290 }, - { 0x1FC2929Cu, SCPH1001_func_1FC291C4_cont_BFC2929C }, - { 0x1FC292A4u, SCPH1001_func_1FC291C4_cont_BFC292A4 }, - { 0x1FC292A8u, SCPH1001_func_1FC291C4_cont_BFC292A8 }, - { 0x1FC292B8u, SCPH1001_func_1FC291C4_cont_BFC292B8 }, - { 0x1FC292BCu, SCPH1001_func_1FC291C4_cont_BFC292BC }, - { 0x1FC292E4u, SCPH1001_func_1FC291C4_cont_BFC292E4 }, - { 0x1FC292E8u, SCPH1001_func_1FC291C4_cont_BFC292E8 }, - { 0x1FC2932Cu, SCPH1001_func_1FC291C4_cont_BFC2932C }, - { 0x1FC29344u, SCPH1001_func_1FC291C4_cont_BFC29344 }, - { 0x1FC29350u, SCPH1001_func_1FC291C4_cont_BFC29350 }, - { 0x1FC29368u, SCPH1001_func_1FC291C4_cont_BFC29368 }, - { 0x1FC293E4u, SCPH1001_func_1FC291C4_cont_BFC293E4 }, - { 0x1FC29458u, SCPH1001_func_1FC291C4_cont_BFC29458 }, - { 0x1FC29460u, SCPH1001_func_1FC291C4_cont_BFC29460 }, - { 0x1FC294BCu, SCPH1001_func_1FC291C4_cont_BFC294BC }, - { 0x1FC294C0u, SCPH1001_func_1FC291C4_cont_BFC294C0 }, - { 0x1FC294CCu, SCPH1001_func_1FC291C4_cont_BFC294CC }, - { 0x1FC294D4u, SCPH1001_func_1FC291C4_cont_BFC294D4 }, - { 0x1FC294D8u, SCPH1001_func_1FC291C4_cont_BFC294D8 }, - { 0x1FC294E4u, SCPH1001_func_1FC291C4_cont_BFC294E4 }, - { 0x1FC29558u, SCPH1001_func_1FC291C4_cont_BFC29558 }, - { 0x1FC2955Cu, SCPH1001_func_1FC291C4_cont_BFC2955C }, - { 0x1FC29568u, SCPH1001_func_1FC291C4_cont_BFC29568 }, - { 0x1FC29570u, SCPH1001_func_1FC291C4_cont_BFC29570 }, - { 0x1FC29574u, SCPH1001_func_1FC291C4_cont_BFC29574 }, - { 0x1FC295ACu, SCPH1001_func_1FC291C4_cont_BFC295AC }, - { 0x1FC295B0u, SCPH1001_func_1FC291C4_cont_BFC295B0 }, - { 0x1FC295BCu, SCPH1001_func_1FC291C4_cont_BFC295BC }, - { 0x1FC295C4u, SCPH1001_func_1FC291C4_cont_BFC295C4 }, - { 0x1FC295C8u, SCPH1001_func_1FC291C4_cont_BFC295C8 }, - { 0x1FC295DCu, SCPH1001_func_1FC291C4_cont_BFC295DC }, - { 0x1FC29640u, SCPH1001_func_1FC291C4_cont_BFC29640 }, - { 0x1FC29644u, SCPH1001_func_1FC291C4_cont_BFC29644 }, - { 0x1FC29650u, SCPH1001_func_1FC291C4_cont_BFC29650 }, - { 0x1FC29658u, SCPH1001_func_1FC291C4_cont_BFC29658 }, - { 0x1FC2965Cu, SCPH1001_func_1FC291C4_cont_BFC2965C }, - { 0x1FC29664u, SCPH1001_func_1FC291C4_cont_BFC29664 }, - { 0x1FC296D8u, SCPH1001_func_1FC291C4_cont_BFC296D8 }, - { 0x1FC296DCu, SCPH1001_func_1FC291C4_cont_BFC296DC }, - { 0x1FC296E8u, SCPH1001_func_1FC291C4_cont_BFC296E8 }, - { 0x1FC296F0u, SCPH1001_func_1FC291C4_cont_BFC296F0 }, - { 0x1FC296F4u, SCPH1001_func_1FC291C4_cont_BFC296F4 }, - { 0x1FC2972Cu, SCPH1001_func_1FC291C4_cont_BFC2972C }, - { 0x1FC29730u, SCPH1001_func_1FC291C4_cont_BFC29730 }, - { 0x1FC2973Cu, SCPH1001_func_1FC291C4_cont_BFC2973C }, - { 0x1FC29744u, SCPH1001_func_1FC291C4_cont_BFC29744 }, - { 0x1FC29748u, SCPH1001_func_1FC291C4_cont_BFC29748 }, - { 0x1FC2975Cu, SCPH1001_func_1FC291C4_cont_BFC2975C }, - { 0x1FC29760u, SCPH1001_func_1FC291C4_cont_BFC29760 }, - { 0x1FC29770u, SCPH1001_func_1FC29770 }, - { 0x1FC29788u, SCPH1001_func_1FC29770_cont_BFC29788 }, - { 0x1FC297A0u, SCPH1001_func_1FC29770_cont_BFC297A0 }, - { 0x1FC297E0u, SCPH1001_func_1FC29770_cont_BFC297E0 }, - { 0x1FC29834u, SCPH1001_func_1FC29770_cont_BFC29834 }, - { 0x1FC2983Cu, SCPH1001_func_1FC29770_cont_BFC2983C }, - { 0x1FC2984Cu, SCPH1001_func_1FC29770_cont_BFC2984C }, - { 0x1FC2986Cu, SCPH1001_func_1FC29770_cont_BFC2986C }, - { 0x1FC29878u, SCPH1001_func_1FC29770_cont_BFC29878 }, - { 0x1FC29880u, SCPH1001_func_1FC29770_cont_BFC29880 }, - { 0x1FC29888u, SCPH1001_func_1FC29770_cont_BFC29888 }, - { 0x1FC2989Cu, SCPH1001_func_1FC29770_cont_BFC2989C }, - { 0x1FC298D4u, SCPH1001_func_1FC29770_cont_BFC298D4 }, - { 0x1FC298DCu, SCPH1001_func_1FC29770_cont_BFC298DC }, - { 0x1FC298ECu, SCPH1001_func_1FC29770_cont_BFC298EC }, - { 0x1FC29958u, SCPH1001_func_1FC29770_cont_BFC29958 }, - { 0x1FC2995Cu, SCPH1001_func_1FC29770_cont_BFC2995C }, - { 0x1FC29968u, SCPH1001_func_1FC29770_cont_BFC29968 }, - { 0x1FC29970u, SCPH1001_func_1FC29770_cont_BFC29970 }, - { 0x1FC29974u, SCPH1001_func_1FC29770_cont_BFC29974 }, - { 0x1FC29994u, SCPH1001_func_1FC29770_cont_BFC29994 }, - { 0x1FC29998u, SCPH1001_func_1FC29770_cont_BFC29998 }, - { 0x1FC299A4u, SCPH1001_func_1FC29770_cont_BFC299A4 }, - { 0x1FC299ACu, SCPH1001_func_1FC29770_cont_BFC299AC }, - { 0x1FC299B0u, SCPH1001_func_1FC29770_cont_BFC299B0 }, - { 0x1FC299D8u, SCPH1001_func_1FC29770_cont_BFC299D8 }, - { 0x1FC299DCu, SCPH1001_func_1FC29770_cont_BFC299DC }, - { 0x1FC299E8u, SCPH1001_func_1FC29770_cont_BFC299E8 }, - { 0x1FC299F0u, SCPH1001_func_1FC29770_cont_BFC299F0 }, - { 0x1FC299F4u, SCPH1001_func_1FC29770_cont_BFC299F4 }, - { 0x1FC29A3Cu, SCPH1001_func_1FC29770_cont_BFC29A3C }, - { 0x1FC29A40u, SCPH1001_func_1FC29770_cont_BFC29A40 }, - { 0x1FC29A4Cu, SCPH1001_func_1FC29770_cont_BFC29A4C }, - { 0x1FC29A54u, SCPH1001_func_1FC29770_cont_BFC29A54 }, - { 0x1FC29A58u, SCPH1001_func_1FC29770_cont_BFC29A58 }, - { 0x1FC29A6Cu, SCPH1001_func_1FC29770_cont_BFC29A6C }, - { 0x1FC29A88u, SCPH1001_func_1FC29770_cont_BFC29A88 }, - { 0x1FC29A9Cu, SCPH1001_func_1FC29770_cont_BFC29A9C }, - { 0x1FC29AB4u, SCPH1001_func_1FC29770_cont_BFC29AB4 }, - { 0x1FC29AC8u, SCPH1001_func_1FC29770_cont_BFC29AC8 }, - { 0x1FC29AE0u, SCPH1001_func_1FC29AE0 }, - { 0x1FC29B20u, SCPH1001_func_1FC29AE0_cont_BFC29B20 }, - { 0x1FC29B30u, SCPH1001_func_1FC29AE0_cont_BFC29B30 }, - { 0x1FC29B38u, SCPH1001_func_1FC29AE0_cont_BFC29B38 }, - { 0x1FC29B40u, SCPH1001_func_1FC29AE0_cont_BFC29B40 }, - { 0x1FC29B60u, SCPH1001_func_1FC29AE0_cont_BFC29B60 }, - { 0x1FC29B80u, SCPH1001_func_1FC29AE0_cont_BFC29B80 }, - { 0x1FC29BA0u, SCPH1001_func_1FC29AE0_cont_BFC29BA0 }, - { 0x1FC29BC0u, SCPH1001_func_1FC29AE0_cont_BFC29BC0 }, - { 0x1FC29BDCu, SCPH1001_func_1FC29AE0_cont_BFC29BDC }, - { 0x1FC29C34u, SCPH1001_func_1FC29AE0_cont_BFC29C34 }, - { 0x1FC29C58u, SCPH1001_func_1FC29AE0_cont_BFC29C58 }, - { 0x1FC29C60u, SCPH1001_func_1FC29AE0_cont_BFC29C60 }, - { 0x1FC29C70u, SCPH1001_func_1FC29AE0_cont_BFC29C70 }, - { 0x1FC29C80u, SCPH1001_func_1FC29AE0_cont_BFC29C80 }, - { 0x1FC29C8Cu, SCPH1001_func_1FC29AE0_cont_BFC29C8C }, - { 0x1FC29C98u, SCPH1001_func_1FC29AE0_cont_BFC29C98 }, - { 0x1FC29CA4u, SCPH1001_func_1FC29AE0_cont_BFC29CA4 }, - { 0x1FC29CB0u, SCPH1001_func_1FC29AE0_cont_BFC29CB0 }, - { 0x1FC29CBCu, SCPH1001_func_1FC29AE0_cont_BFC29CBC }, - { 0x1FC29CD0u, SCPH1001_func_1FC29AE0_cont_BFC29CD0 }, - { 0x1FC29CE0u, SCPH1001_func_1FC29AE0_cont_BFC29CE0 }, - { 0x1FC29CF4u, SCPH1001_func_1FC29AE0_cont_BFC29CF4 }, - { 0x1FC29D08u, SCPH1001_func_1FC29AE0_cont_BFC29D08 }, - { 0x1FC29D20u, SCPH1001_func_1FC29AE0_cont_BFC29D20 }, - { 0x1FC29D2Cu, SCPH1001_func_1FC29AE0_cont_BFC29D2C }, - { 0x1FC29D30u, SCPH1001_func_1FC29AE0_cont_BFC29D30 }, - { 0x1FC29D38u, SCPH1001_func_1FC29AE0_cont_BFC29D38 }, - { 0x1FC29D40u, SCPH1001_func_1FC29AE0_cont_BFC29D40 }, - { 0x1FC29D44u, SCPH1001_func_1FC29AE0_cont_BFC29D44 }, - { 0x1FC29D48u, SCPH1001_func_1FC29AE0_cont_BFC29D48 }, - { 0x1FC29D5Cu, SCPH1001_func_1FC29AE0_cont_BFC29D5C }, - { 0x1FC29D74u, SCPH1001_func_1FC29AE0_cont_BFC29D74 }, - { 0x1FC29D7Cu, SCPH1001_func_1FC29AE0_cont_BFC29D7C }, - { 0x1FC29D84u, SCPH1001_func_1FC29AE0_cont_BFC29D84 }, - { 0x1FC29D9Cu, SCPH1001_func_1FC29AE0_cont_BFC29D9C }, - { 0x1FC29DACu, SCPH1001_func_1FC29AE0_cont_BFC29DAC }, - { 0x1FC29DB8u, SCPH1001_func_1FC29AE0_cont_BFC29DB8 }, - { 0x1FC29DDCu, SCPH1001_func_1FC29AE0_cont_BFC29DDC }, - { 0x1FC29DECu, SCPH1001_func_1FC29AE0_cont_BFC29DEC }, - { 0x1FC29E7Cu, SCPH1001_func_1FC29AE0_cont_BFC29E7C }, - { 0x1FC29EB4u, SCPH1001_func_1FC29AE0_cont_BFC29EB4 }, - { 0x1FC29ECCu, SCPH1001_func_1FC29AE0_cont_BFC29ECC }, - { 0x1FC29EE0u, SCPH1001_func_1FC29AE0_cont_BFC29EE0 }, - { 0x1FC29EECu, SCPH1001_func_1FC29AE0_cont_BFC29EEC }, - { 0x1FC29EF4u, SCPH1001_func_1FC29AE0_cont_BFC29EF4 }, - { 0x1FC29F10u, SCPH1001_func_1FC29AE0_cont_BFC29F10 }, - { 0x1FC29F14u, SCPH1001_func_1FC29AE0_cont_BFC29F14 }, - { 0x1FC29F5Cu, SCPH1001_func_1FC29AE0_cont_BFC29F5C }, - { 0x1FC29F6Cu, SCPH1001_func_1FC29AE0_cont_BFC29F6C }, - { 0x1FC29F7Cu, SCPH1001_func_1FC29AE0_cont_BFC29F7C }, - { 0x1FC29F8Cu, SCPH1001_func_1FC29AE0_cont_BFC29F8C }, - { 0x1FC29F9Cu, SCPH1001_func_1FC29AE0_cont_BFC29F9C }, - { 0x1FC29FB0u, SCPH1001_func_1FC29AE0_cont_BFC29FB0 }, - { 0x1FC29FB8u, SCPH1001_func_1FC29AE0_cont_BFC29FB8 }, - { 0x1FC29FE8u, SCPH1001_func_1FC29FE8 }, - { 0x1FC2A024u, SCPH1001_func_1FC29FE8_cont_BFC2A024 }, - { 0x1FC2A05Cu, SCPH1001_func_1FC29FE8_cont_BFC2A05C }, - { 0x1FC2A068u, SCPH1001_func_1FC29FE8_cont_BFC2A068 }, - { 0x1FC2A158u, SCPH1001_func_1FC29FE8_cont_BFC2A158 }, - { 0x1FC2A2C8u, SCPH1001_func_1FC29FE8_cont_BFC2A2C8 }, - { 0x1FC2A2D0u, SCPH1001_func_1FC29FE8_cont_BFC2A2D0 }, - { 0x1FC2A2D8u, SCPH1001_func_1FC29FE8_cont_BFC2A2D8 }, - { 0x1FC2A2E4u, SCPH1001_func_1FC29FE8_cont_BFC2A2E4 }, - { 0x1FC2A30Cu, SCPH1001_func_1FC29FE8_cont_BFC2A30C }, - { 0x1FC2A31Cu, SCPH1001_func_1FC2A31C }, - { 0x1FC2A344u, SCPH1001_func_1FC2A31C_cont_BFC2A344 }, - { 0x1FC2A3B8u, SCPH1001_func_1FC2A31C_cont_BFC2A3B8 }, - { 0x1FC2A3C0u, SCPH1001_func_1FC2A31C_cont_BFC2A3C0 }, - { 0x1FC2A3C8u, SCPH1001_func_1FC2A31C_cont_BFC2A3C8 }, - { 0x1FC2A3CCu, SCPH1001_func_1FC2A31C_cont_BFC2A3CC }, - { 0x1FC2A400u, SCPH1001_func_1FC2A31C_cont_BFC2A400 }, - { 0x1FC2A40Cu, SCPH1001_func_1FC2A31C_cont_BFC2A40C }, - { 0x1FC2A4E0u, SCPH1001_func_1FC2A4E0 }, - { 0x1FC2A550u, SCPH1001_func_1FC2A4E0_cont_BFC2A550 }, - { 0x1FC2A55Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A55C }, - { 0x1FC2A56Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A56C }, - { 0x1FC2A578u, SCPH1001_func_1FC2A4E0_cont_BFC2A578 }, - { 0x1FC2A580u, SCPH1001_func_1FC2A4E0_cont_BFC2A580 }, - { 0x1FC2A588u, SCPH1001_func_1FC2A4E0_cont_BFC2A588 }, - { 0x1FC2A58Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A58C }, - { 0x1FC2A5A0u, SCPH1001_func_1FC2A4E0_cont_BFC2A5A0 }, - { 0x1FC2A5A4u, SCPH1001_func_1FC2A4E0_cont_BFC2A5A4 }, - { 0x1FC2A5ACu, SCPH1001_func_1FC2A4E0_cont_BFC2A5AC }, - { 0x1FC2A5B4u, SCPH1001_func_1FC2A4E0_cont_BFC2A5B4 }, - { 0x1FC2A5CCu, SCPH1001_func_1FC2A4E0_cont_BFC2A5CC }, - { 0x1FC2A5D4u, SCPH1001_func_1FC2A4E0_cont_BFC2A5D4 }, - { 0x1FC2A5E0u, SCPH1001_func_1FC2A4E0_cont_BFC2A5E0 }, - { 0x1FC2A5E8u, SCPH1001_func_1FC2A4E0_cont_BFC2A5E8 }, - { 0x1FC2A5ECu, SCPH1001_func_1FC2A4E0_cont_BFC2A5EC }, - { 0x1FC2A5F8u, SCPH1001_func_1FC2A4E0_cont_BFC2A5F8 }, - { 0x1FC2A600u, SCPH1001_func_1FC2A4E0_cont_BFC2A600 }, - { 0x1FC2A61Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A61C }, - { 0x1FC2A62Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A62C }, - { 0x1FC2A638u, SCPH1001_func_1FC2A4E0_cont_BFC2A638 }, - { 0x1FC2A654u, SCPH1001_func_1FC2A4E0_cont_BFC2A654 }, - { 0x1FC2A660u, SCPH1001_func_1FC2A4E0_cont_BFC2A660 }, - { 0x1FC2A668u, SCPH1001_func_1FC2A4E0_cont_BFC2A668 }, - { 0x1FC2A670u, SCPH1001_func_1FC2A4E0_cont_BFC2A670 }, - { 0x1FC2A68Cu, SCPH1001_func_1FC2A4E0_cont_BFC2A68C }, - { 0x1FC2A690u, SCPH1001_func_1FC2A4E0_cont_BFC2A690 }, - { 0x1FC2A6A0u, SCPH1001_func_1FC2A4E0_cont_BFC2A6A0 }, - { 0x1FC2A6A8u, SCPH1001_func_1FC2A4E0_cont_BFC2A6A8 }, - { 0x1FC2A6ACu, SCPH1001_func_1FC2A4E0_cont_BFC2A6AC }, - { 0x1FC2A6C0u, SCPH1001_func_1FC2A4E0_cont_BFC2A6C0 }, - { 0x1FC2A6C4u, SCPH1001_func_1FC2A4E0_cont_BFC2A6C4 }, - { 0x1FC2A6CCu, SCPH1001_func_1FC2A4E0_cont_BFC2A6CC }, - { 0x1FC2A6D8u, SCPH1001_func_1FC2A4E0_cont_BFC2A6D8 }, - { 0x1FC2A700u, SCPH1001_func_1FC2A4E0_cont_BFC2A700 }, - { 0x1FC2A884u, SCPH1001_func_1FC2A4E0_cont_BFC2A884 }, - { 0x1FC2A994u, SCPH1001_func_1FC2A4E0_cont_BFC2A994 }, - { 0x1FC2A9A4u, SCPH1001_func_1FC2A4E0_cont_BFC2A9A4 }, - { 0x1FC2A9B4u, SCPH1001_func_1FC2A4E0_cont_BFC2A9B4 }, - { 0x1FC2A9BCu, SCPH1001_func_1FC2A4E0_cont_BFC2A9BC }, - { 0x1FC2A9CCu, SCPH1001_func_1FC2A4E0_cont_BFC2A9CC }, - { 0x1FC2A9D4u, SCPH1001_func_1FC2A4E0_cont_BFC2A9D4 }, - { 0x1FC2A9E4u, SCPH1001_func_1FC2A4E0_cont_BFC2A9E4 }, - { 0x1FC2A9E8u, SCPH1001_func_1FC2A4E0_cont_BFC2A9E8 }, - { 0x1FC2A9F4u, SCPH1001_func_1FC2A4E0_cont_BFC2A9F4 }, - { 0x1FC2A9F8u, SCPH1001_func_1FC2A4E0_cont_BFC2A9F8 }, - { 0x1FC2AA00u, SCPH1001_func_1FC2A4E0_cont_BFC2AA00 }, - { 0x1FC2AA04u, SCPH1001_func_1FC2A4E0_cont_BFC2AA04 }, - { 0x1FC2AA14u, SCPH1001_func_1FC2A4E0_cont_BFC2AA14 }, - { 0x1FC2AA20u, SCPH1001_func_1FC2A4E0_cont_BFC2AA20 }, - { 0x1FC2AAC0u, SCPH1001_func_1FC2A4E0_cont_BFC2AAC0 }, - { 0x1FC2AAC8u, SCPH1001_func_1FC2A4E0_cont_BFC2AAC8 }, - { 0x1FC2AAD0u, SCPH1001_func_1FC2A4E0_cont_BFC2AAD0 }, - { 0x1FC2AAD8u, SCPH1001_func_1FC2A4E0_cont_BFC2AAD8 }, - { 0x1FC2AADCu, SCPH1001_func_1FC2A4E0_cont_BFC2AADC }, - { 0x1FC2AAE4u, SCPH1001_func_1FC2A4E0_cont_BFC2AAE4 }, - { 0x1FC2AB00u, SCPH1001_func_1FC2A4E0_cont_BFC2AB00 }, - { 0x1FC2AB10u, SCPH1001_func_1FC2A4E0_cont_BFC2AB10 }, - { 0x1FC2AB18u, SCPH1001_func_1FC2A4E0_cont_BFC2AB18 }, - { 0x1FC2AB20u, SCPH1001_func_1FC2A4E0_cont_BFC2AB20 }, - { 0x1FC2AB28u, SCPH1001_func_1FC2A4E0_cont_BFC2AB28 }, - { 0x1FC2AB2Cu, SCPH1001_func_1FC2A4E0_cont_BFC2AB2C }, - { 0x1FC2AB38u, SCPH1001_func_1FC2A4E0_cont_BFC2AB38 }, - { 0x1FC2AB44u, SCPH1001_func_1FC2A4E0_cont_BFC2AB44 }, - { 0x1FC2AB88u, SCPH1001_func_1FC2A4E0_cont_BFC2AB88 }, - { 0x1FC2AB90u, SCPH1001_func_1FC2A4E0_cont_BFC2AB90 }, - { 0x1FC2AB9Cu, SCPH1001_func_1FC2A4E0_cont_BFC2AB9C }, - { 0x1FC2ABA8u, SCPH1001_func_1FC2A4E0_cont_BFC2ABA8 }, - { 0x1FC2ABD4u, SCPH1001_func_1FC2A4E0_cont_BFC2ABD4 }, - { 0x1FC2ABD8u, SCPH1001_func_1FC2A4E0_cont_BFC2ABD8 }, - { 0x1FC2ABF4u, SCPH1001_func_1FC2A4E0_cont_BFC2ABF4 }, - { 0x1FC2ABF8u, SCPH1001_func_1FC2A4E0_cont_BFC2ABF8 }, - { 0x1FC2ACD0u, SCPH1001_func_1FC2ACD0 }, - { 0x1FC2ACECu, SCPH1001_func_1FC2ACD0_cont_BFC2ACEC }, - { 0x1FC2AD08u, SCPH1001_func_1FC2ACD0_cont_BFC2AD08 }, - { 0x1FC2AD24u, SCPH1001_func_1FC2ACD0_cont_BFC2AD24 }, - { 0x1FC2AD38u, SCPH1001_func_1FC2ACD0_cont_BFC2AD38 }, - { 0x1FC2AD40u, SCPH1001_func_1FC2ACD0_cont_BFC2AD40 }, - { 0x1FC2AD48u, SCPH1001_func_1FC2ACD0_cont_BFC2AD48 }, - { 0x1FC2AD4Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AD4C }, - { 0x1FC2AD54u, SCPH1001_func_1FC2ACD0_cont_BFC2AD54 }, - { 0x1FC2AD5Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AD5C }, - { 0x1FC2AD64u, SCPH1001_func_1FC2ACD0_cont_BFC2AD64 }, - { 0x1FC2AD68u, SCPH1001_func_1FC2ACD0_cont_BFC2AD68 }, - { 0x1FC2AD70u, SCPH1001_func_1FC2ACD0_cont_BFC2AD70 }, - { 0x1FC2AD78u, SCPH1001_func_1FC2ACD0_cont_BFC2AD78 }, - { 0x1FC2AD80u, SCPH1001_func_1FC2ACD0_cont_BFC2AD80 }, - { 0x1FC2AD84u, SCPH1001_func_1FC2ACD0_cont_BFC2AD84 }, - { 0x1FC2AD8Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AD8C }, - { 0x1FC2AD94u, SCPH1001_func_1FC2ACD0_cont_BFC2AD94 }, - { 0x1FC2AD9Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AD9C }, - { 0x1FC2ADA0u, SCPH1001_func_1FC2ACD0_cont_BFC2ADA0 }, - { 0x1FC2ADA8u, SCPH1001_func_1FC2ACD0_cont_BFC2ADA8 }, - { 0x1FC2ADB0u, SCPH1001_func_1FC2ACD0_cont_BFC2ADB0 }, - { 0x1FC2ADB8u, SCPH1001_func_1FC2ACD0_cont_BFC2ADB8 }, - { 0x1FC2ADBCu, SCPH1001_func_1FC2ACD0_cont_BFC2ADBC }, - { 0x1FC2ADC4u, SCPH1001_func_1FC2ACD0_cont_BFC2ADC4 }, - { 0x1FC2ADCCu, SCPH1001_func_1FC2ACD0_cont_BFC2ADCC }, - { 0x1FC2ADD4u, SCPH1001_func_1FC2ACD0_cont_BFC2ADD4 }, - { 0x1FC2ADD8u, SCPH1001_func_1FC2ACD0_cont_BFC2ADD8 }, - { 0x1FC2ADE0u, SCPH1001_func_1FC2ACD0_cont_BFC2ADE0 }, - { 0x1FC2ADECu, SCPH1001_func_1FC2ACD0_cont_BFC2ADEC }, - { 0x1FC2ADF0u, SCPH1001_func_1FC2ACD0_cont_BFC2ADF0 }, - { 0x1FC2AE18u, SCPH1001_func_1FC2ACD0_cont_BFC2AE18 }, - { 0x1FC2AE2Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AE2C }, - { 0x1FC2AE34u, SCPH1001_func_1FC2ACD0_cont_BFC2AE34 }, - { 0x1FC2AE3Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AE3C }, - { 0x1FC2AE40u, SCPH1001_func_1FC2ACD0_cont_BFC2AE40 }, - { 0x1FC2AE48u, SCPH1001_func_1FC2ACD0_cont_BFC2AE48 }, - { 0x1FC2AE50u, SCPH1001_func_1FC2ACD0_cont_BFC2AE50 }, - { 0x1FC2AE58u, SCPH1001_func_1FC2ACD0_cont_BFC2AE58 }, - { 0x1FC2AE5Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AE5C }, - { 0x1FC2AE64u, SCPH1001_func_1FC2ACD0_cont_BFC2AE64 }, - { 0x1FC2AE6Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AE6C }, - { 0x1FC2AE74u, SCPH1001_func_1FC2ACD0_cont_BFC2AE74 }, - { 0x1FC2AE78u, SCPH1001_func_1FC2ACD0_cont_BFC2AE78 }, - { 0x1FC2AE80u, SCPH1001_func_1FC2ACD0_cont_BFC2AE80 }, - { 0x1FC2AE8Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AE8C }, - { 0x1FC2AE90u, SCPH1001_func_1FC2ACD0_cont_BFC2AE90 }, - { 0x1FC2AE98u, SCPH1001_func_1FC2ACD0_cont_BFC2AE98 }, - { 0x1FC2AEA4u, SCPH1001_func_1FC2ACD0_cont_BFC2AEA4 }, - { 0x1FC2AEA8u, SCPH1001_func_1FC2ACD0_cont_BFC2AEA8 }, - { 0x1FC2AED0u, SCPH1001_func_1FC2ACD0_cont_BFC2AED0 }, - { 0x1FC2AEE4u, SCPH1001_func_1FC2ACD0_cont_BFC2AEE4 }, - { 0x1FC2AEECu, SCPH1001_func_1FC2ACD0_cont_BFC2AEEC }, - { 0x1FC2AEF4u, SCPH1001_func_1FC2ACD0_cont_BFC2AEF4 }, - { 0x1FC2AEF8u, SCPH1001_func_1FC2ACD0_cont_BFC2AEF8 }, - { 0x1FC2AF00u, SCPH1001_func_1FC2ACD0_cont_BFC2AF00 }, - { 0x1FC2AF08u, SCPH1001_func_1FC2ACD0_cont_BFC2AF08 }, - { 0x1FC2AF10u, SCPH1001_func_1FC2ACD0_cont_BFC2AF10 }, - { 0x1FC2AF14u, SCPH1001_func_1FC2ACD0_cont_BFC2AF14 }, - { 0x1FC2AF1Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AF1C }, - { 0x1FC2AF24u, SCPH1001_func_1FC2ACD0_cont_BFC2AF24 }, - { 0x1FC2AF2Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AF2C }, - { 0x1FC2AF30u, SCPH1001_func_1FC2ACD0_cont_BFC2AF30 }, - { 0x1FC2AF38u, SCPH1001_func_1FC2ACD0_cont_BFC2AF38 }, - { 0x1FC2AF44u, SCPH1001_func_1FC2ACD0_cont_BFC2AF44 }, - { 0x1FC2AF48u, SCPH1001_func_1FC2ACD0_cont_BFC2AF48 }, - { 0x1FC2AF50u, SCPH1001_func_1FC2ACD0_cont_BFC2AF50 }, - { 0x1FC2AF5Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AF5C }, - { 0x1FC2AF60u, SCPH1001_func_1FC2ACD0_cont_BFC2AF60 }, - { 0x1FC2AF88u, SCPH1001_func_1FC2ACD0_cont_BFC2AF88 }, - { 0x1FC2AF9Cu, SCPH1001_func_1FC2ACD0_cont_BFC2AF9C }, - { 0x1FC2AFA4u, SCPH1001_func_1FC2ACD0_cont_BFC2AFA4 }, - { 0x1FC2AFACu, SCPH1001_func_1FC2ACD0_cont_BFC2AFAC }, - { 0x1FC2AFB0u, SCPH1001_func_1FC2ACD0_cont_BFC2AFB0 }, - { 0x1FC2AFB8u, SCPH1001_func_1FC2ACD0_cont_BFC2AFB8 }, - { 0x1FC2AFC0u, SCPH1001_func_1FC2ACD0_cont_BFC2AFC0 }, - { 0x1FC2AFC8u, SCPH1001_func_1FC2ACD0_cont_BFC2AFC8 }, - { 0x1FC2AFCCu, SCPH1001_func_1FC2ACD0_cont_BFC2AFCC }, - { 0x1FC2AFD4u, SCPH1001_func_1FC2ACD0_cont_BFC2AFD4 }, - { 0x1FC2AFDCu, SCPH1001_func_1FC2ACD0_cont_BFC2AFDC }, - { 0x1FC2AFE4u, SCPH1001_func_1FC2ACD0_cont_BFC2AFE4 }, - { 0x1FC2AFE8u, SCPH1001_func_1FC2ACD0_cont_BFC2AFE8 }, - { 0x1FC2AFF0u, SCPH1001_func_1FC2ACD0_cont_BFC2AFF0 }, - { 0x1FC2AFFCu, SCPH1001_func_1FC2ACD0_cont_BFC2AFFC }, - { 0x1FC2B000u, SCPH1001_func_1FC2ACD0_cont_BFC2B000 }, - { 0x1FC2B008u, SCPH1001_func_1FC2ACD0_cont_BFC2B008 }, - { 0x1FC2B014u, SCPH1001_func_1FC2ACD0_cont_BFC2B014 }, - { 0x1FC2B018u, SCPH1001_func_1FC2ACD0_cont_BFC2B018 }, - { 0x1FC2B040u, SCPH1001_func_1FC2ACD0_cont_BFC2B040 }, - { 0x1FC2B054u, SCPH1001_func_1FC2ACD0_cont_BFC2B054 }, - { 0x1FC2B05Cu, SCPH1001_func_1FC2ACD0_cont_BFC2B05C }, - { 0x1FC2B060u, SCPH1001_func_1FC2ACD0_cont_BFC2B060 }, - { 0x1FC2B098u, SCPH1001_func_1FC2ACD0_cont_BFC2B098 }, - { 0x1FC2B0A8u, SCPH1001_func_1FC2B0A8 }, - { 0x1FC2B0C0u, SCPH1001_func_1FC2B0A8_cont_BFC2B0C0 }, - { 0x1FC2B0CCu, SCPH1001_func_1FC2B0A8_cont_BFC2B0CC }, - { 0x1FC2B0D4u, SCPH1001_func_1FC2B0A8_cont_BFC2B0D4 }, - { 0x1FC2B0D8u, SCPH1001_func_1FC2B0A8_cont_BFC2B0D8 }, - { 0x1FC2B0E0u, SCPH1001_func_1FC2B0A8_cont_BFC2B0E0 }, - { 0x1FC2B0E8u, SCPH1001_func_1FC2B0A8_cont_BFC2B0E8 }, - { 0x1FC2B0F0u, SCPH1001_func_1FC2B0A8_cont_BFC2B0F0 }, - { 0x1FC2B0F4u, SCPH1001_func_1FC2B0A8_cont_BFC2B0F4 }, - { 0x1FC2B0FCu, SCPH1001_func_1FC2B0A8_cont_BFC2B0FC }, - { 0x1FC2B104u, SCPH1001_func_1FC2B0A8_cont_BFC2B104 }, - { 0x1FC2B10Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B10C }, - { 0x1FC2B110u, SCPH1001_func_1FC2B0A8_cont_BFC2B110 }, - { 0x1FC2B118u, SCPH1001_func_1FC2B0A8_cont_BFC2B118 }, - { 0x1FC2B120u, SCPH1001_func_1FC2B0A8_cont_BFC2B120 }, - { 0x1FC2B12Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B12C }, - { 0x1FC2B130u, SCPH1001_func_1FC2B0A8_cont_BFC2B130 }, - { 0x1FC2B138u, SCPH1001_func_1FC2B0A8_cont_BFC2B138 }, - { 0x1FC2B140u, SCPH1001_func_1FC2B0A8_cont_BFC2B140 }, - { 0x1FC2B148u, SCPH1001_func_1FC2B0A8_cont_BFC2B148 }, - { 0x1FC2B14Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B14C }, - { 0x1FC2B154u, SCPH1001_func_1FC2B0A8_cont_BFC2B154 }, - { 0x1FC2B15Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B15C }, - { 0x1FC2B168u, SCPH1001_func_1FC2B0A8_cont_BFC2B168 }, - { 0x1FC2B16Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B16C }, - { 0x1FC2B174u, SCPH1001_func_1FC2B0A8_cont_BFC2B174 }, - { 0x1FC2B17Cu, SCPH1001_func_1FC2B0A8_cont_BFC2B17C }, - { 0x1FC2B184u, SCPH1001_func_1FC2B0A8_cont_BFC2B184 }, - { 0x1FC2B190u, SCPH1001_func_1FC2B0A8_cont_BFC2B190 }, - { 0x1FC2B198u, SCPH1001_func_1FC2B0A8_cont_BFC2B198 }, - { 0x1FC2B1A0u, SCPH1001_func_1FC2B0A8_cont_BFC2B1A0 }, - { 0x1FC2B1C4u, SCPH1001_func_1FC2B0A8_cont_BFC2B1C4 }, - { 0x1FC2B1C8u, SCPH1001_func_1FC2B0A8_cont_BFC2B1C8 }, - { 0x1FC2B1ECu, SCPH1001_func_1FC2B0A8_cont_BFC2B1EC }, - { 0x1FC2B1FCu, SCPH1001_func_1FC2B1FC }, - { 0x1FC2B208u, SCPH1001_func_1FC2B1FC_cont_BFC2B208 }, - { 0x1FC2B224u, SCPH1001_func_1FC2B1FC_cont_BFC2B224 }, - { 0x1FC2B22Cu, SCPH1001_func_1FC2B22C }, - { 0x1FC2B238u, SCPH1001_func_1FC2B22C_cont_BFC2B238 }, - { 0x1FC2B24Cu, SCPH1001_func_1FC2B22C_cont_BFC2B24C }, - { 0x1FC2B260u, SCPH1001_func_1FC2B260 }, - { 0x1FC2B2D8u, SCPH1001_func_1FC2B260_cont_BFC2B2D8 }, - { 0x1FC2B2E4u, SCPH1001_func_1FC2B260_cont_BFC2B2E4 }, - { 0x1FC2B2F4u, SCPH1001_func_1FC2B260_cont_BFC2B2F4 }, - { 0x1FC2B304u, SCPH1001_func_1FC2B260_cont_BFC2B304 }, - { 0x1FC2B30Cu, SCPH1001_func_1FC2B260_cont_BFC2B30C }, - { 0x1FC2B320u, SCPH1001_func_1FC2B260_cont_BFC2B320 }, - { 0x1FC2B324u, SCPH1001_func_1FC2B260_cont_BFC2B324 }, - { 0x1FC2B338u, SCPH1001_func_1FC2B260_cont_BFC2B338 }, - { 0x1FC2B33Cu, SCPH1001_func_1FC2B260_cont_BFC2B33C }, - { 0x1FC2B344u, SCPH1001_func_1FC2B260_cont_BFC2B344 }, - { 0x1FC2B34Cu, SCPH1001_func_1FC2B260_cont_BFC2B34C }, - { 0x1FC2B364u, SCPH1001_func_1FC2B260_cont_BFC2B364 }, - { 0x1FC2B36Cu, SCPH1001_func_1FC2B260_cont_BFC2B36C }, - { 0x1FC2B378u, SCPH1001_func_1FC2B260_cont_BFC2B378 }, - { 0x1FC2B380u, SCPH1001_func_1FC2B260_cont_BFC2B380 }, - { 0x1FC2B384u, SCPH1001_func_1FC2B260_cont_BFC2B384 }, - { 0x1FC2B394u, SCPH1001_func_1FC2B260_cont_BFC2B394 }, - { 0x1FC2B3A0u, SCPH1001_func_1FC2B260_cont_BFC2B3A0 }, - { 0x1FC2B3CCu, SCPH1001_func_1FC2B260_cont_BFC2B3CC }, - { 0x1FC2B3DCu, SCPH1001_func_1FC2B260_cont_BFC2B3DC }, - { 0x1FC2B3E8u, SCPH1001_func_1FC2B260_cont_BFC2B3E8 }, - { 0x1FC2B418u, SCPH1001_func_1FC2B260_cont_BFC2B418 }, - { 0x1FC2B424u, SCPH1001_func_1FC2B260_cont_BFC2B424 }, - { 0x1FC2B42Cu, SCPH1001_func_1FC2B260_cont_BFC2B42C }, - { 0x1FC2B434u, SCPH1001_func_1FC2B260_cont_BFC2B434 }, - { 0x1FC2B44Cu, SCPH1001_func_1FC2B260_cont_BFC2B44C }, - { 0x1FC2B458u, SCPH1001_func_1FC2B260_cont_BFC2B458 }, - { 0x1FC2B460u, SCPH1001_func_1FC2B260_cont_BFC2B460 }, - { 0x1FC2B4A4u, SCPH1001_func_1FC2B260_cont_BFC2B4A4 }, - { 0x1FC2B574u, SCPH1001_func_1FC2B260_cont_BFC2B574 }, - { 0x1FC2B680u, SCPH1001_func_1FC2B260_cont_BFC2B680 }, - { 0x1FC2B688u, SCPH1001_func_1FC2B260_cont_BFC2B688 }, - { 0x1FC2B690u, SCPH1001_func_1FC2B260_cont_BFC2B690 }, - { 0x1FC2B698u, SCPH1001_func_1FC2B260_cont_BFC2B698 }, - { 0x1FC2B6D0u, SCPH1001_func_1FC2B260_cont_BFC2B6D0 }, - { 0x1FC2B7A4u, SCPH1001_func_1FC2B260_cont_BFC2B7A4 }, - { 0x1FC2B8B0u, SCPH1001_func_1FC2B260_cont_BFC2B8B0 }, - { 0x1FC2B8B8u, SCPH1001_func_1FC2B260_cont_BFC2B8B8 }, - { 0x1FC2B8BCu, SCPH1001_func_1FC2B260_cont_BFC2B8BC }, - { 0x1FC2B8D4u, SCPH1001_func_1FC2B260_cont_BFC2B8D4 }, - { 0x1FC2B8D8u, SCPH1001_func_1FC2B260_cont_BFC2B8D8 }, - { 0x1FC2B8E4u, SCPH1001_func_1FC2B260_cont_BFC2B8E4 }, - { 0x1FC2B8F4u, SCPH1001_func_1FC2B260_cont_BFC2B8F4 }, - { 0x1FC2B908u, SCPH1001_func_1FC2B260_cont_BFC2B908 }, - { 0x1FC2B924u, SCPH1001_func_1FC2B260_cont_BFC2B924 }, - { 0x1FC2B92Cu, SCPH1001_func_1FC2B260_cont_BFC2B92C }, - { 0x1FC2B938u, SCPH1001_func_1FC2B260_cont_BFC2B938 }, - { 0x1FC2B944u, SCPH1001_func_1FC2B260_cont_BFC2B944 }, - { 0x1FC2B94Cu, SCPH1001_func_1FC2B260_cont_BFC2B94C }, - { 0x1FC2B970u, SCPH1001_func_1FC2B260_cont_BFC2B970 }, - { 0x1FC2BB04u, SCPH1001_func_1FC2B260_cont_BFC2BB04 }, - { 0x1FC2BC2Cu, SCPH1001_func_1FC2B260_cont_BFC2BC2C }, - { 0x1FC2BC48u, SCPH1001_func_1FC2B260_cont_BFC2BC48 }, - { 0x1FC2BC54u, SCPH1001_func_1FC2B260_cont_BFC2BC54 }, - { 0x1FC2BC64u, SCPH1001_func_1FC2B260_cont_BFC2BC64 }, - { 0x1FC2BC70u, SCPH1001_func_1FC2B260_cont_BFC2BC70 }, - { 0x1FC2BC88u, SCPH1001_func_1FC2B260_cont_BFC2BC88 }, - { 0x1FC2BC8Cu, SCPH1001_func_1FC2B260_cont_BFC2BC8C }, - { 0x1FC2BC94u, SCPH1001_func_1FC2B260_cont_BFC2BC94 }, - { 0x1FC2BCA4u, SCPH1001_func_1FC2B260_cont_BFC2BCA4 }, - { 0x1FC2BCA8u, SCPH1001_func_1FC2B260_cont_BFC2BCA8 }, - { 0x1FC2BCB4u, SCPH1001_func_1FC2B260_cont_BFC2BCB4 }, - { 0x1FC2BCB8u, SCPH1001_func_1FC2B260_cont_BFC2BCB8 }, - { 0x1FC2BCC0u, SCPH1001_func_1FC2B260_cont_BFC2BCC0 }, - { 0x1FC2BCC4u, SCPH1001_func_1FC2B260_cont_BFC2BCC4 }, - { 0x1FC2BCD4u, SCPH1001_func_1FC2B260_cont_BFC2BCD4 }, - { 0x1FC2BCECu, SCPH1001_func_1FC2B260_cont_BFC2BCEC }, - { 0x1FC2BD90u, SCPH1001_func_1FC2B260_cont_BFC2BD90 }, - { 0x1FC2BD98u, SCPH1001_func_1FC2B260_cont_BFC2BD98 }, - { 0x1FC2BDA0u, SCPH1001_func_1FC2B260_cont_BFC2BDA0 }, - { 0x1FC2BDA8u, SCPH1001_func_1FC2B260_cont_BFC2BDA8 }, - { 0x1FC2BDACu, SCPH1001_func_1FC2B260_cont_BFC2BDAC }, - { 0x1FC2BDB4u, SCPH1001_func_1FC2B260_cont_BFC2BDB4 }, - { 0x1FC2BDD0u, SCPH1001_func_1FC2B260_cont_BFC2BDD0 }, - { 0x1FC2BDE0u, SCPH1001_func_1FC2B260_cont_BFC2BDE0 }, - { 0x1FC2BDE8u, SCPH1001_func_1FC2B260_cont_BFC2BDE8 }, - { 0x1FC2BDF0u, SCPH1001_func_1FC2B260_cont_BFC2BDF0 }, - { 0x1FC2BDF8u, SCPH1001_func_1FC2B260_cont_BFC2BDF8 }, - { 0x1FC2BDFCu, SCPH1001_func_1FC2B260_cont_BFC2BDFC }, - { 0x1FC2BE08u, SCPH1001_func_1FC2B260_cont_BFC2BE08 }, - { 0x1FC2BE14u, SCPH1001_func_1FC2B260_cont_BFC2BE14 }, - { 0x1FC2BE58u, SCPH1001_func_1FC2B260_cont_BFC2BE58 }, - { 0x1FC2BE60u, SCPH1001_func_1FC2B260_cont_BFC2BE60 }, - { 0x1FC2BE6Cu, SCPH1001_func_1FC2B260_cont_BFC2BE6C }, - { 0x1FC2BE78u, SCPH1001_func_1FC2B260_cont_BFC2BE78 }, - { 0x1FC2BEA4u, SCPH1001_func_1FC2B260_cont_BFC2BEA4 }, - { 0x1FC2BEA8u, SCPH1001_func_1FC2B260_cont_BFC2BEA8 }, - { 0x1FC2BEC4u, SCPH1001_func_1FC2B260_cont_BFC2BEC4 }, - { 0x1FC2BEC8u, SCPH1001_func_1FC2B260_cont_BFC2BEC8 }, - { 0x1FC2BF00u, SCPH1001_func_1FC2BF00 }, - { 0x1FC2BF10u, SCPH1001_func_1FC2BF10 }, - { 0x1FC2BF1Cu, SCPH1001_func_1FC2BF1C }, - { 0x1FC2BF64u, SCPH1001_func_1FC2BF1C_cont_BFC2BF64 }, - { 0x1FC2BF74u, SCPH1001_func_1FC2BF74 }, - { 0x1FC2BF98u, SCPH1001_func_1FC2BF74_cont_BFC2BF98 }, - { 0x1FC2BFA0u, SCPH1001_func_1FC2BF74_cont_BFC2BFA0 }, - { 0x1FC2BFACu, SCPH1001_func_1FC2BF74_cont_BFC2BFAC }, - { 0x1FC2BFC0u, SCPH1001_func_1FC2BF74_cont_BFC2BFC0 }, - { 0x1FC2BFD0u, SCPH1001_func_1FC2BF74_cont_BFC2BFD0 }, - { 0x1FC2BFF8u, SCPH1001_func_1FC2BF74_cont_BFC2BFF8 }, - { 0x1FC2C000u, SCPH1001_func_1FC2BF74_cont_BFC2C000 }, - { 0x1FC2C020u, SCPH1001_func_1FC2BF74_cont_BFC2C020 }, - { 0x1FC2C030u, SCPH1001_func_1FC2BF74_cont_BFC2C030 }, - { 0x1FC2C040u, SCPH1001_func_1FC2BF74_cont_BFC2C040 }, - { 0x1FC2C060u, SCPH1001_func_1FC2BF74_cont_BFC2C060 }, - { 0x1FC2C068u, SCPH1001_func_1FC2BF74_cont_BFC2C068 }, - { 0x1FC2C070u, SCPH1001_func_1FC2BF74_cont_BFC2C070 }, - { 0x1FC2C074u, SCPH1001_func_1FC2BF74_cont_BFC2C074 }, - { 0x1FC2C090u, SCPH1001_func_1FC2BF74_cont_BFC2C090 }, - { 0x1FC2C0B0u, SCPH1001_func_1FC2BF74_cont_BFC2C0B0 }, - { 0x1FC2C0B8u, SCPH1001_func_1FC2BF74_cont_BFC2C0B8 }, - { 0x1FC2C0BCu, SCPH1001_func_1FC2BF74_cont_BFC2C0BC }, - { 0x1FC2C0D4u, SCPH1001_func_1FC2BF74_cont_BFC2C0D4 }, - { 0x1FC2C0DCu, SCPH1001_func_1FC2BF74_cont_BFC2C0DC }, - { 0x1FC2C0E0u, SCPH1001_func_1FC2BF74_cont_BFC2C0E0 }, - { 0x1FC2C0F8u, SCPH1001_func_1FC2BF74_cont_BFC2C0F8 }, - { 0x1FC2C108u, SCPH1001_func_1FC2BF74_cont_BFC2C108 }, - { 0x1FC2C158u, SCPH1001_func_1FC2BF74_cont_BFC2C158 }, - { 0x1FC2C16Cu, SCPH1001_func_1FC2BF74_cont_BFC2C16C }, - { 0x1FC2C1B0u, SCPH1001_func_1FC2BF74_cont_BFC2C1B0 }, - { 0x1FC2C1B4u, SCPH1001_func_1FC2BF74_cont_BFC2C1B4 }, - { 0x1FC2C1C4u, SCPH1001_func_1FC2C1C4 }, - { 0x1FC2C1E8u, SCPH1001_func_1FC2C1C4_cont_BFC2C1E8 }, - { 0x1FC2C290u, SCPH1001_func_1FC2C1C4_cont_BFC2C290 }, - { 0x1FC2C2F0u, SCPH1001_func_1FC2C2F0 }, - { 0x1FC2C314u, SCPH1001_func_1FC2C2F0_cont_BFC2C314 }, - { 0x1FC2C320u, SCPH1001_func_1FC2C2F0_cont_BFC2C320 }, - { 0x1FC2C328u, SCPH1001_func_1FC2C2F0_cont_BFC2C328 }, - { 0x1FC2C348u, SCPH1001_func_1FC2C2F0_cont_BFC2C348 }, - { 0x1FC2C364u, SCPH1001_func_1FC2C2F0_cont_BFC2C364 }, - { 0x1FC2C370u, SCPH1001_func_1FC2C2F0_cont_BFC2C370 }, - { 0x1FC2C39Cu, SCPH1001_func_1FC2C2F0_cont_BFC2C39C }, - { 0x1FC2C3ACu, SCPH1001_func_1FC2C2F0_cont_BFC2C3AC }, - { 0x1FC2C3BCu, SCPH1001_func_1FC2C2F0_cont_BFC2C3BC }, - { 0x1FC2C3C0u, SCPH1001_func_1FC2C2F0_cont_BFC2C3C0 }, - { 0x1FC2C3D0u, SCPH1001_func_1FC2C2F0_cont_BFC2C3D0 }, - { 0x1FC2C3E0u, SCPH1001_func_1FC2C3E0 }, - { 0x1FC2C3FCu, SCPH1001_func_1FC2C3E0_cont_BFC2C3FC }, - { 0x1FC2C420u, SCPH1001_func_1FC2C3E0_cont_BFC2C420 }, - { 0x1FC2C45Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C45C }, - { 0x1FC2C468u, SCPH1001_func_1FC2C3E0_cont_BFC2C468 }, - { 0x1FC2C46Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C46C }, - { 0x1FC2C470u, SCPH1001_func_1FC2C3E0_cont_BFC2C470 }, - { 0x1FC2C47Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C47C }, - { 0x1FC2C484u, SCPH1001_func_1FC2C3E0_cont_BFC2C484 }, - { 0x1FC2C48Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C48C }, - { 0x1FC2C494u, SCPH1001_func_1FC2C3E0_cont_BFC2C494 }, - { 0x1FC2C4B0u, SCPH1001_func_1FC2C3E0_cont_BFC2C4B0 }, - { 0x1FC2C4BCu, SCPH1001_func_1FC2C3E0_cont_BFC2C4BC }, - { 0x1FC2C4C4u, SCPH1001_func_1FC2C3E0_cont_BFC2C4C4 }, - { 0x1FC2C4C8u, SCPH1001_func_1FC2C3E0_cont_BFC2C4C8 }, - { 0x1FC2C4D8u, SCPH1001_func_1FC2C3E0_cont_BFC2C4D8 }, - { 0x1FC2C4E4u, SCPH1001_func_1FC2C3E0_cont_BFC2C4E4 }, - { 0x1FC2C614u, SCPH1001_func_1FC2C3E0_cont_BFC2C614 }, - { 0x1FC2C618u, SCPH1001_func_1FC2C3E0_cont_BFC2C618 }, - { 0x1FC2C620u, SCPH1001_func_1FC2C3E0_cont_BFC2C620 }, - { 0x1FC2C624u, SCPH1001_func_1FC2C3E0_cont_BFC2C624 }, - { 0x1FC2C62Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C62C }, - { 0x1FC2C630u, SCPH1001_func_1FC2C3E0_cont_BFC2C630 }, - { 0x1FC2C638u, SCPH1001_func_1FC2C3E0_cont_BFC2C638 }, - { 0x1FC2C69Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C69C }, - { 0x1FC2C6B0u, SCPH1001_func_1FC2C3E0_cont_BFC2C6B0 }, - { 0x1FC2C6B4u, SCPH1001_func_1FC2C3E0_cont_BFC2C6B4 }, - { 0x1FC2C6C8u, SCPH1001_func_1FC2C3E0_cont_BFC2C6C8 }, - { 0x1FC2C6CCu, SCPH1001_func_1FC2C3E0_cont_BFC2C6CC }, - { 0x1FC2C6D8u, SCPH1001_func_1FC2C3E0_cont_BFC2C6D8 }, - { 0x1FC2C6E4u, SCPH1001_func_1FC2C3E0_cont_BFC2C6E4 }, - { 0x1FC2C760u, SCPH1001_func_1FC2C3E0_cont_BFC2C760 }, - { 0x1FC2C764u, SCPH1001_func_1FC2C3E0_cont_BFC2C764 }, - { 0x1FC2C76Cu, SCPH1001_func_1FC2C3E0_cont_BFC2C76C }, - { 0x1FC2C794u, SCPH1001_func_1FC2C3E0_cont_BFC2C794 }, - { 0x1FC2C7A8u, SCPH1001_func_1FC2C3E0_cont_BFC2C7A8 }, - { 0x1FC2C7ACu, SCPH1001_func_1FC2C3E0_cont_BFC2C7AC }, - { 0x1FC2C7C0u, SCPH1001_func_1FC2C3E0_cont_BFC2C7C0 }, - { 0x1FC2C7C4u, SCPH1001_func_1FC2C3E0_cont_BFC2C7C4 }, - { 0x1FC2C7E4u, SCPH1001_func_1FC2C3E0_cont_BFC2C7E4 }, - { 0x1FC2C7F4u, SCPH1001_func_1FC2C7F4 }, - { 0x1FC2C814u, SCPH1001_func_1FC2C7F4_cont_BFC2C814 }, - { 0x1FC2C880u, SCPH1001_func_1FC2C7F4_cont_BFC2C880 }, - { 0x1FC2C8A8u, SCPH1001_func_1FC2C8A8 }, - { 0x1FC2C8B8u, SCPH1001_func_1FC2C8A8_cont_BFC2C8B8 }, - { 0x1FC2C8E8u, SCPH1001_func_1FC2C8A8_cont_BFC2C8E8 }, - { 0x1FC2C8ECu, SCPH1001_func_1FC2C8A8_cont_BFC2C8EC }, - { 0x1FC2C8F8u, SCPH1001_func_1FC2C8A8_cont_BFC2C8F8 }, - { 0x1FC2C8FCu, SCPH1001_func_1FC2C8A8_cont_BFC2C8FC }, - { 0x1FC2C908u, SCPH1001_func_1FC2C8A8_cont_BFC2C908 }, - { 0x1FC2C90Cu, SCPH1001_func_1FC2C8A8_cont_BFC2C90C }, - { 0x1FC2C920u, SCPH1001_func_1FC2C8A8_cont_BFC2C920 }, - { 0x1FC2C924u, SCPH1001_func_1FC2C8A8_cont_BFC2C924 }, - { 0x1FC2C980u, SCPH1001_func_1FC2C8A8_cont_BFC2C980 }, - { 0x1FC2C988u, SCPH1001_func_1FC2C988 }, - { 0x1FC2C998u, SCPH1001_func_1FC2C988_cont_BFC2C998 }, - { 0x1FC2C9B8u, SCPH1001_func_1FC2C988_cont_BFC2C9B8 }, - { 0x1FC2C9BCu, SCPH1001_func_1FC2C988_cont_BFC2C9BC }, - { 0x1FC2C9D0u, SCPH1001_func_1FC2C988_cont_BFC2C9D0 }, - { 0x1FC2C9D4u, SCPH1001_func_1FC2C988_cont_BFC2C9D4 }, - { 0x1FC2CA48u, SCPH1001_func_1FC2C988_cont_BFC2CA48 }, - { 0x1FC2CA50u, SCPH1001_func_1FC2CA50 }, - { 0x1FC2CA58u, SCPH1001_func_1FC2CA58 }, - { 0x1FC2CA78u, SCPH1001_func_1FC2CA58_cont_BFC2CA78 }, - { 0x1FC2CA88u, SCPH1001_func_1FC2CA58_cont_BFC2CA88 }, - { 0x1FC2CA9Cu, SCPH1001_func_1FC2CA9C }, - { 0x1FC2CAB8u, SCPH1001_func_1FC2CA9C_cont_BFC2CAB8 }, - { 0x1FC2CAC0u, SCPH1001_func_1FC2CA9C_cont_BFC2CAC0 }, - { 0x1FC2CAC8u, SCPH1001_func_1FC2CA9C_cont_BFC2CAC8 }, - { 0x1FC2CAD0u, SCPH1001_func_1FC2CA9C_cont_BFC2CAD0 }, - { 0x1FC2CAD4u, SCPH1001_func_1FC2CA9C_cont_BFC2CAD4 }, - { 0x1FC2CAE0u, SCPH1001_func_1FC2CAE0 }, - { 0x1FC2CAFCu, SCPH1001_func_1FC2CAE0_cont_BFC2CAFC }, - { 0x1FC2CB04u, SCPH1001_func_1FC2CAE0_cont_BFC2CB04 }, - { 0x1FC2CB0Cu, SCPH1001_func_1FC2CAE0_cont_BFC2CB0C }, - { 0x1FC2CB14u, SCPH1001_func_1FC2CAE0_cont_BFC2CB14 }, - { 0x1FC2CB18u, SCPH1001_func_1FC2CAE0_cont_BFC2CB18 }, - { 0x1FC2CB24u, SCPH1001_func_1FC2CB24 }, - { 0x1FC2CB40u, SCPH1001_func_1FC2CB24_cont_BFC2CB40 }, - { 0x1FC2CB48u, SCPH1001_func_1FC2CB24_cont_BFC2CB48 }, - { 0x1FC2CB50u, SCPH1001_func_1FC2CB24_cont_BFC2CB50 }, - { 0x1FC2CB60u, SCPH1001_func_1FC2CB24_cont_BFC2CB60 }, - { 0x1FC2CB70u, SCPH1001_func_1FC2CB24_cont_BFC2CB70 }, - { 0x1FC2CB74u, SCPH1001_func_1FC2CB24_cont_BFC2CB74 }, - { 0x1FC2CB80u, SCPH1001_func_1FC2CB80 }, - { 0x1FC2CB9Cu, SCPH1001_func_1FC2CB80_cont_BFC2CB9C }, - { 0x1FC2CBB4u, SCPH1001_func_1FC2CB80_cont_BFC2CBB4 }, - { 0x1FC2CBBCu, SCPH1001_func_1FC2CB80_cont_BFC2CBBC }, - { 0x1FC2CBDCu, SCPH1001_func_1FC2CB80_cont_BFC2CBDC }, - { 0x1FC2CBFCu, SCPH1001_func_1FC2CB80_cont_BFC2CBFC }, - { 0x1FC2CC00u, SCPH1001_func_1FC2CB80_cont_BFC2CC00 }, - { 0x1FC2CC10u, SCPH1001_func_1FC2CC10 }, - { 0x1FC2CC40u, SCPH1001_func_1FC2CC10_cont_BFC2CC40 }, - { 0x1FC2CC4Cu, SCPH1001_func_1FC2CC10_cont_BFC2CC4C }, - { 0x1FC2CC5Cu, SCPH1001_func_1FC2CC10_cont_BFC2CC5C }, - { 0x1FC2CC70u, SCPH1001_func_1FC2CC10_cont_BFC2CC70 }, - { 0x1FC2CC88u, SCPH1001_func_1FC2CC10_cont_BFC2CC88 }, - { 0x1FC2CCC4u, SCPH1001_func_1FC2CCC4 }, - { 0x1FC2CCDCu, SCPH1001_func_1FC2CCC4_cont_BFC2CCDC }, - { 0x1FC2CCE8u, SCPH1001_func_1FC2CCC4_cont_BFC2CCE8 }, - { 0x1FC2CCF0u, SCPH1001_func_1FC2CCC4_cont_BFC2CCF0 }, - { 0x1FC2CD28u, SCPH1001_func_1FC2CCC4_cont_BFC2CD28 }, - { 0x1FC2CD4Cu, SCPH1001_func_1FC2CCC4_cont_BFC2CD4C }, - { 0x1FC2CD88u, SCPH1001_func_1FC2CCC4_cont_BFC2CD88 }, - { 0x1FC2CDA0u, SCPH1001_func_1FC2CCC4_cont_BFC2CDA0 }, - { 0x1FC2CDACu, SCPH1001_func_1FC2CCC4_cont_BFC2CDAC }, - { 0x1FC2CDE0u, SCPH1001_func_1FC2CCC4_cont_BFC2CDE0 }, - { 0x1FC2CDF8u, SCPH1001_func_1FC2CCC4_cont_BFC2CDF8 }, - { 0x1FC2CE08u, SCPH1001_func_1FC2CE08 }, - { 0x1FC2CE28u, SCPH1001_func_1FC2CE08_cont_BFC2CE28 }, - { 0x1FC2CE30u, SCPH1001_func_1FC2CE08_cont_BFC2CE30 }, - { 0x1FC2CE38u, SCPH1001_func_1FC2CE08_cont_BFC2CE38 }, - { 0x1FC2CE70u, SCPH1001_func_1FC2CE08_cont_BFC2CE70 }, - { 0x1FC2CE94u, SCPH1001_func_1FC2CE08_cont_BFC2CE94 }, - { 0x1FC2CED4u, SCPH1001_func_1FC2CE08_cont_BFC2CED4 }, - { 0x1FC2CEECu, SCPH1001_func_1FC2CE08_cont_BFC2CEEC }, - { 0x1FC2CEF8u, SCPH1001_func_1FC2CE08_cont_BFC2CEF8 }, - { 0x1FC2CF2Cu, SCPH1001_func_1FC2CE08_cont_BFC2CF2C }, - { 0x1FC2CF44u, SCPH1001_func_1FC2CE08_cont_BFC2CF44 }, - { 0x1FC2CF54u, SCPH1001_func_1FC2CF54 }, - { 0x1FC2CF6Cu, SCPH1001_func_1FC2CF54_cont_BFC2CF6C }, - { 0x1FC2CF74u, SCPH1001_func_1FC2CF54_cont_BFC2CF74 }, - { 0x1FC2CF7Cu, SCPH1001_func_1FC2CF54_cont_BFC2CF7C }, - { 0x1FC2CFB0u, SCPH1001_func_1FC2CF54_cont_BFC2CFB0 }, - { 0x1FC2CFD4u, SCPH1001_func_1FC2CF54_cont_BFC2CFD4 }, - { 0x1FC2CFE0u, SCPH1001_func_1FC2CF54_cont_BFC2CFE0 }, - { 0x1FC2D004u, SCPH1001_func_1FC2CF54_cont_BFC2D004 }, - { 0x1FC2D06Cu, SCPH1001_func_1FC2CF54_cont_BFC2D06C }, - { 0x1FC2D094u, SCPH1001_func_1FC2CF54_cont_BFC2D094 }, - { 0x1FC2D0A4u, SCPH1001_func_1FC2D0A4 }, - { 0x1FC2D0B8u, SCPH1001_func_1FC2D0A4_cont_BFC2D0B8 }, - { 0x1FC2D0C8u, SCPH1001_func_1FC2D0A4_cont_BFC2D0C8 }, - { 0x1FC2D0CCu, SCPH1001_func_1FC2D0A4_cont_BFC2D0CC }, - { 0x1FC2D0D8u, SCPH1001_func_1FC2D0A4_cont_BFC2D0D8 }, - { 0x1FC2D0E0u, SCPH1001_func_1FC2D0E0 }, - { 0x1FC2D134u, SCPH1001_func_1FC2D0E0_cont_BFC2D134 }, - { 0x1FC2D144u, SCPH1001_func_1FC2D0E0_cont_BFC2D144 }, - { 0x1FC2D154u, SCPH1001_func_1FC2D0E0_cont_BFC2D154 }, - { 0x1FC2D1A4u, SCPH1001_func_1FC2D0E0_cont_BFC2D1A4 }, - { 0x1FC2D1B8u, SCPH1001_func_1FC2D0E0_cont_BFC2D1B8 }, - { 0x1FC2D1CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D1CC }, - { 0x1FC2D1E0u, SCPH1001_func_1FC2D0E0_cont_BFC2D1E0 }, - { 0x1FC2D1ECu, SCPH1001_func_1FC2D0E0_cont_BFC2D1EC }, - { 0x1FC2D214u, SCPH1001_func_1FC2D0E0_cont_BFC2D214 }, - { 0x1FC2D218u, SCPH1001_func_1FC2D0E0_cont_BFC2D218 }, - { 0x1FC2D224u, SCPH1001_func_1FC2D0E0_cont_BFC2D224 }, - { 0x1FC2D22Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D22C }, - { 0x1FC2D230u, SCPH1001_func_1FC2D0E0_cont_BFC2D230 }, - { 0x1FC2D240u, SCPH1001_func_1FC2D0E0_cont_BFC2D240 }, - { 0x1FC2D2B0u, SCPH1001_func_1FC2D0E0_cont_BFC2D2B0 }, - { 0x1FC2D2BCu, SCPH1001_func_1FC2D0E0_cont_BFC2D2BC }, - { 0x1FC2D2D4u, SCPH1001_func_1FC2D0E0_cont_BFC2D2D4 }, - { 0x1FC2D2F8u, SCPH1001_func_1FC2D0E0_cont_BFC2D2F8 }, - { 0x1FC2D308u, SCPH1001_func_1FC2D0E0_cont_BFC2D308 }, - { 0x1FC2D310u, SCPH1001_func_1FC2D0E0_cont_BFC2D310 }, - { 0x1FC2D31Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D31C }, - { 0x1FC2D370u, SCPH1001_func_1FC2D0E0_cont_BFC2D370 }, - { 0x1FC2D384u, SCPH1001_func_1FC2D0E0_cont_BFC2D384 }, - { 0x1FC2D38Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D38C }, - { 0x1FC2D3D8u, SCPH1001_func_1FC2D0E0_cont_BFC2D3D8 }, - { 0x1FC2D400u, SCPH1001_func_1FC2D0E0_cont_BFC2D400 }, - { 0x1FC2D414u, SCPH1001_func_1FC2D0E0_cont_BFC2D414 }, - { 0x1FC2D41Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D41C }, - { 0x1FC2D450u, SCPH1001_func_1FC2D0E0_cont_BFC2D450 }, - { 0x1FC2D458u, SCPH1001_func_1FC2D0E0_cont_BFC2D458 }, - { 0x1FC2D45Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D45C }, - { 0x1FC2D464u, SCPH1001_func_1FC2D0E0_cont_BFC2D464 }, - { 0x1FC2D46Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D46C }, - { 0x1FC2D470u, SCPH1001_func_1FC2D0E0_cont_BFC2D470 }, - { 0x1FC2D488u, SCPH1001_func_1FC2D0E0_cont_BFC2D488 }, - { 0x1FC2D494u, SCPH1001_func_1FC2D0E0_cont_BFC2D494 }, - { 0x1FC2D4CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D4CC }, - { 0x1FC2D4E0u, SCPH1001_func_1FC2D0E0_cont_BFC2D4E0 }, - { 0x1FC2D530u, SCPH1001_func_1FC2D0E0_cont_BFC2D530 }, - { 0x1FC2D534u, SCPH1001_func_1FC2D0E0_cont_BFC2D534 }, - { 0x1FC2D540u, SCPH1001_func_1FC2D0E0_cont_BFC2D540 }, - { 0x1FC2D548u, SCPH1001_func_1FC2D0E0_cont_BFC2D548 }, - { 0x1FC2D54Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D54C }, - { 0x1FC2D55Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D55C }, - { 0x1FC2D5CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D5CC }, - { 0x1FC2D5D8u, SCPH1001_func_1FC2D0E0_cont_BFC2D5D8 }, - { 0x1FC2D5F0u, SCPH1001_func_1FC2D0E0_cont_BFC2D5F0 }, - { 0x1FC2D614u, SCPH1001_func_1FC2D0E0_cont_BFC2D614 }, - { 0x1FC2D624u, SCPH1001_func_1FC2D0E0_cont_BFC2D624 }, - { 0x1FC2D644u, SCPH1001_func_1FC2D0E0_cont_BFC2D644 }, - { 0x1FC2D648u, SCPH1001_func_1FC2D0E0_cont_BFC2D648 }, - { 0x1FC2D658u, SCPH1001_func_1FC2D0E0_cont_BFC2D658 }, - { 0x1FC2D66Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D66C }, - { 0x1FC2D674u, SCPH1001_func_1FC2D0E0_cont_BFC2D674 }, - { 0x1FC2D684u, SCPH1001_func_1FC2D0E0_cont_BFC2D684 }, - { 0x1FC2D68Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D68C }, - { 0x1FC2D6ACu, SCPH1001_func_1FC2D0E0_cont_BFC2D6AC }, - { 0x1FC2D6B0u, SCPH1001_func_1FC2D0E0_cont_BFC2D6B0 }, - { 0x1FC2D6BCu, SCPH1001_func_1FC2D0E0_cont_BFC2D6BC }, - { 0x1FC2D6C4u, SCPH1001_func_1FC2D0E0_cont_BFC2D6C4 }, - { 0x1FC2D6C8u, SCPH1001_func_1FC2D0E0_cont_BFC2D6C8 }, - { 0x1FC2D6D0u, SCPH1001_func_1FC2D0E0_cont_BFC2D6D0 }, - { 0x1FC2D6E4u, SCPH1001_func_1FC2D0E0_cont_BFC2D6E4 }, - { 0x1FC2D734u, SCPH1001_func_1FC2D0E0_cont_BFC2D734 }, - { 0x1FC2D748u, SCPH1001_func_1FC2D0E0_cont_BFC2D748 }, - { 0x1FC2D758u, SCPH1001_func_1FC2D0E0_cont_BFC2D758 }, - { 0x1FC2D764u, SCPH1001_func_1FC2D0E0_cont_BFC2D764 }, - { 0x1FC2D76Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D76C }, - { 0x1FC2D77Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D77C }, - { 0x1FC2D784u, SCPH1001_func_1FC2D0E0_cont_BFC2D784 }, - { 0x1FC2D78Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D78C }, - { 0x1FC2D7A4u, SCPH1001_func_1FC2D0E0_cont_BFC2D7A4 }, - { 0x1FC2D7A8u, SCPH1001_func_1FC2D0E0_cont_BFC2D7A8 }, - { 0x1FC2D7B0u, SCPH1001_func_1FC2D0E0_cont_BFC2D7B0 }, - { 0x1FC2D7B8u, SCPH1001_func_1FC2D0E0_cont_BFC2D7B8 }, - { 0x1FC2D7C0u, SCPH1001_func_1FC2D0E0_cont_BFC2D7C0 }, - { 0x1FC2D7CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D7CC }, - { 0x1FC2D870u, SCPH1001_func_1FC2D0E0_cont_BFC2D870 }, - { 0x1FC2D878u, SCPH1001_func_1FC2D0E0_cont_BFC2D878 }, - { 0x1FC2D87Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D87C }, - { 0x1FC2D894u, SCPH1001_func_1FC2D0E0_cont_BFC2D894 }, - { 0x1FC2D89Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D89C }, - { 0x1FC2D8A0u, SCPH1001_func_1FC2D0E0_cont_BFC2D8A0 }, - { 0x1FC2D8B8u, SCPH1001_func_1FC2D0E0_cont_BFC2D8B8 }, - { 0x1FC2D8BCu, SCPH1001_func_1FC2D0E0_cont_BFC2D8BC }, - { 0x1FC2D8CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D8CC }, - { 0x1FC2D8D4u, SCPH1001_func_1FC2D0E0_cont_BFC2D8D4 }, - { 0x1FC2D8D8u, SCPH1001_func_1FC2D0E0_cont_BFC2D8D8 }, - { 0x1FC2D8F0u, SCPH1001_func_1FC2D0E0_cont_BFC2D8F0 }, - { 0x1FC2D8F8u, SCPH1001_func_1FC2D0E0_cont_BFC2D8F8 }, - { 0x1FC2D90Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D90C }, - { 0x1FC2D910u, SCPH1001_func_1FC2D0E0_cont_BFC2D910 }, - { 0x1FC2D964u, SCPH1001_func_1FC2D0E0_cont_BFC2D964 }, - { 0x1FC2D990u, SCPH1001_func_1FC2D0E0_cont_BFC2D990 }, - { 0x1FC2D998u, SCPH1001_func_1FC2D0E0_cont_BFC2D998 }, - { 0x1FC2D99Cu, SCPH1001_func_1FC2D0E0_cont_BFC2D99C }, - { 0x1FC2D9CCu, SCPH1001_func_1FC2D0E0_cont_BFC2D9CC }, - { 0x1FC2D9ECu, SCPH1001_func_1FC2D0E0_cont_BFC2D9EC }, - { 0x1FC2D9F0u, SCPH1001_func_1FC2D0E0_cont_BFC2D9F0 }, - { 0x1FC2DA00u, SCPH1001_func_1FC2D0E0_cont_BFC2DA00 }, - { 0x1FC2DA18u, SCPH1001_func_1FC2D0E0_cont_BFC2DA18 }, - { 0x1FC2DA2Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DA2C }, - { 0x1FC2DA34u, SCPH1001_func_1FC2D0E0_cont_BFC2DA34 }, - { 0x1FC2DA38u, SCPH1001_func_1FC2D0E0_cont_BFC2DA38 }, - { 0x1FC2DA54u, SCPH1001_func_1FC2D0E0_cont_BFC2DA54 }, - { 0x1FC2DA5Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DA5C }, - { 0x1FC2DA6Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DA6C }, - { 0x1FC2DA70u, SCPH1001_func_1FC2D0E0_cont_BFC2DA70 }, - { 0x1FC2DA78u, SCPH1001_func_1FC2D0E0_cont_BFC2DA78 }, - { 0x1FC2DABCu, SCPH1001_func_1FC2D0E0_cont_BFC2DABC }, - { 0x1FC2DAC8u, SCPH1001_func_1FC2D0E0_cont_BFC2DAC8 }, - { 0x1FC2DADCu, SCPH1001_func_1FC2D0E0_cont_BFC2DADC }, - { 0x1FC2DAE4u, SCPH1001_func_1FC2D0E0_cont_BFC2DAE4 }, - { 0x1FC2DAECu, SCPH1001_func_1FC2D0E0_cont_BFC2DAEC }, - { 0x1FC2DB00u, SCPH1001_func_1FC2D0E0_cont_BFC2DB00 }, - { 0x1FC2DB14u, SCPH1001_func_1FC2D0E0_cont_BFC2DB14 }, - { 0x1FC2DB18u, SCPH1001_func_1FC2D0E0_cont_BFC2DB18 }, - { 0x1FC2DB24u, SCPH1001_func_1FC2D0E0_cont_BFC2DB24 }, - { 0x1FC2DB2Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DB2C }, - { 0x1FC2DB44u, SCPH1001_func_1FC2D0E0_cont_BFC2DB44 }, - { 0x1FC2DB50u, SCPH1001_func_1FC2D0E0_cont_BFC2DB50 }, - { 0x1FC2DB60u, SCPH1001_func_1FC2D0E0_cont_BFC2DB60 }, - { 0x1FC2DB6Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DB6C }, - { 0x1FC2DB74u, SCPH1001_func_1FC2D0E0_cont_BFC2DB74 }, - { 0x1FC2DB94u, SCPH1001_func_1FC2D0E0_cont_BFC2DB94 }, - { 0x1FC2DB98u, SCPH1001_func_1FC2D0E0_cont_BFC2DB98 }, - { 0x1FC2DBA0u, SCPH1001_func_1FC2D0E0_cont_BFC2DBA0 }, - { 0x1FC2DBB4u, SCPH1001_func_1FC2D0E0_cont_BFC2DBB4 }, - { 0x1FC2DBF4u, SCPH1001_func_1FC2D0E0_cont_BFC2DBF4 }, - { 0x1FC2DC08u, SCPH1001_func_1FC2D0E0_cont_BFC2DC08 }, - { 0x1FC2DC20u, SCPH1001_func_1FC2D0E0_cont_BFC2DC20 }, - { 0x1FC2DC34u, SCPH1001_func_1FC2D0E0_cont_BFC2DC34 }, - { 0x1FC2DC38u, SCPH1001_func_1FC2D0E0_cont_BFC2DC38 }, - { 0x1FC2DC60u, SCPH1001_func_1FC2D0E0_cont_BFC2DC60 }, - { 0x1FC2DC90u, SCPH1001_func_1FC2D0E0_cont_BFC2DC90 }, - { 0x1FC2DCA8u, SCPH1001_func_1FC2D0E0_cont_BFC2DCA8 }, - { 0x1FC2DCC0u, SCPH1001_func_1FC2D0E0_cont_BFC2DCC0 }, - { 0x1FC2DCC8u, SCPH1001_func_1FC2D0E0_cont_BFC2DCC8 }, - { 0x1FC2DCE0u, SCPH1001_func_1FC2D0E0_cont_BFC2DCE0 }, - { 0x1FC2DCF0u, SCPH1001_func_1FC2D0E0_cont_BFC2DCF0 }, - { 0x1FC2DD08u, SCPH1001_func_1FC2D0E0_cont_BFC2DD08 }, - { 0x1FC2DD20u, SCPH1001_func_1FC2D0E0_cont_BFC2DD20 }, - { 0x1FC2DD28u, SCPH1001_func_1FC2D0E0_cont_BFC2DD28 }, - { 0x1FC2DD40u, SCPH1001_func_1FC2D0E0_cont_BFC2DD40 }, - { 0x1FC2DD6Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DD6C }, - { 0x1FC2DDD4u, SCPH1001_func_1FC2D0E0_cont_BFC2DDD4 }, - { 0x1FC2DDE0u, SCPH1001_func_1FC2D0E0_cont_BFC2DDE0 }, - { 0x1FC2DDECu, SCPH1001_func_1FC2D0E0_cont_BFC2DDEC }, - { 0x1FC2DE0Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DE0C }, - { 0x1FC2DE30u, SCPH1001_func_1FC2D0E0_cont_BFC2DE30 }, - { 0x1FC2DE40u, SCPH1001_func_1FC2D0E0_cont_BFC2DE40 }, - { 0x1FC2DE6Cu, SCPH1001_func_1FC2D0E0_cont_BFC2DE6C }, - { 0x1FC2DEA8u, SCPH1001_func_1FC2D0E0_cont_BFC2DEA8 }, - { 0x1FC2DEBCu, SCPH1001_func_1FC2D0E0_cont_BFC2DEBC }, - { 0x1FC2DED0u, SCPH1001_func_1FC2D0E0_cont_BFC2DED0 }, - { 0x1FC2DEE0u, SCPH1001_func_1FC2D0E0_cont_BFC2DEE0 }, - { 0x1FC2DEE8u, SCPH1001_func_1FC2D0E0_cont_BFC2DEE8 }, - { 0x1FC2DEF4u, SCPH1001_func_1FC2D0E0_cont_BFC2DEF4 }, - { 0x1FC2DF38u, SCPH1001_func_1FC2D0E0_cont_BFC2DF38 }, - { 0x1FC2DF48u, SCPH1001_func_1FC2D0E0_cont_BFC2DF48 }, - { 0x1FC2DF60u, SCPH1001_func_1FC2D0E0_cont_BFC2DF60 }, - { 0x1FC2DF78u, SCPH1001_func_1FC2D0E0_cont_BFC2DF78 }, - { 0x1FC2DF80u, SCPH1001_func_1FC2D0E0_cont_BFC2DF80 }, - { 0x1FC2DF98u, SCPH1001_func_1FC2D0E0_cont_BFC2DF98 }, - { 0x1FC2DFA8u, SCPH1001_func_1FC2D0E0_cont_BFC2DFA8 }, - { 0x1FC2DFC0u, SCPH1001_func_1FC2D0E0_cont_BFC2DFC0 }, - { 0x1FC2DFD8u, SCPH1001_func_1FC2D0E0_cont_BFC2DFD8 }, - { 0x1FC2DFE0u, SCPH1001_func_1FC2D0E0_cont_BFC2DFE0 }, - { 0x1FC2DFF8u, SCPH1001_func_1FC2D0E0_cont_BFC2DFF8 }, - { 0x1FC2E02Cu, SCPH1001_func_1FC2D0E0_cont_BFC2E02C }, - { 0x1FC2E038u, SCPH1001_func_1FC2D0E0_cont_BFC2E038 }, - { 0x1FC2E060u, SCPH1001_func_1FC2D0E0_cont_BFC2E060 }, - { 0x1FC2E084u, SCPH1001_func_1FC2D0E0_cont_BFC2E084 }, - { 0x1FC2E094u, SCPH1001_func_1FC2D0E0_cont_BFC2E094 }, - { 0x1FC2E0C0u, SCPH1001_func_1FC2D0E0_cont_BFC2E0C0 }, - { 0x1FC2E0FCu, SCPH1001_func_1FC2D0E0_cont_BFC2E0FC }, - { 0x1FC2E110u, SCPH1001_func_1FC2D0E0_cont_BFC2E110 }, - { 0x1FC2E118u, SCPH1001_func_1FC2D0E0_cont_BFC2E118 }, - { 0x1FC2E134u, SCPH1001_func_1FC2D0E0_cont_BFC2E134 }, - { 0x1FC2E15Cu, SCPH1001_func_1FC2D0E0_cont_BFC2E15C }, - { 0x1FC2E19Cu, SCPH1001_func_1FC2D0E0_cont_BFC2E19C }, - { 0x1FC2E1A8u, SCPH1001_func_1FC2D0E0_cont_BFC2E1A8 }, - { 0x1FC2E1B0u, SCPH1001_func_1FC2D0E0_cont_BFC2E1B0 }, - { 0x1FC2E1B8u, SCPH1001_func_1FC2D0E0_cont_BFC2E1B8 }, - { 0x1FC2E204u, SCPH1001_func_1FC2D0E0_cont_BFC2E204 }, - { 0x1FC2E208u, SCPH1001_func_1FC2D0E0_cont_BFC2E208 }, - { 0x1FC2E218u, SCPH1001_func_1FC2D0E0_cont_BFC2E218 }, - { 0x1FC2E224u, SCPH1001_func_1FC2D0E0_cont_BFC2E224 }, - { 0x1FC2E238u, SCPH1001_func_1FC2D0E0_cont_BFC2E238 }, - { 0x1FC2E240u, SCPH1001_func_1FC2D0E0_cont_BFC2E240 }, - { 0x1FC2E254u, SCPH1001_func_1FC2D0E0_cont_BFC2E254 }, - { 0x1FC2E2A4u, SCPH1001_func_1FC2D0E0_cont_BFC2E2A4 }, - { 0x1FC2E2B0u, SCPH1001_func_1FC2D0E0_cont_BFC2E2B0 }, - { 0x1FC2E2C8u, SCPH1001_func_1FC2D0E0_cont_BFC2E2C8 }, - { 0x1FC2E2D0u, SCPH1001_func_1FC2D0E0_cont_BFC2E2D0 }, - { 0x1FC2E2D4u, SCPH1001_func_1FC2D0E0_cont_BFC2E2D4 }, - { 0x1FC2E2E8u, SCPH1001_func_1FC2D0E0_cont_BFC2E2E8 }, - { 0x1FC2E2ECu, SCPH1001_func_1FC2D0E0_cont_BFC2E2EC }, - { 0x1FC2E2FCu, SCPH1001_func_1FC2D0E0_cont_BFC2E2FC }, - { 0x1FC2E30Cu, SCPH1001_func_1FC2D0E0_cont_BFC2E30C }, - { 0x1FC2E32Cu, SCPH1001_func_1FC2D0E0_cont_BFC2E32C }, - { 0x1FC2E370u, SCPH1001_func_1FC2D0E0_cont_BFC2E370 }, - { 0x1FC2E380u, SCPH1001_func_1FC2D0E0_cont_BFC2E380 }, - { 0x1FC2E390u, SCPH1001_func_1FC2D0E0_cont_BFC2E390 }, - { 0x1FC2E3A4u, SCPH1001_func_1FC2D0E0_cont_BFC2E3A4 }, - { 0x1FC2E3B4u, SCPH1001_func_1FC2D0E0_cont_BFC2E3B4 }, - { 0x1FC2E3C4u, SCPH1001_func_1FC2D0E0_cont_BFC2E3C4 }, - { 0x1FC2E3ECu, SCPH1001_func_1FC2D0E0_cont_BFC2E3EC }, - { 0x1FC2E3F4u, SCPH1001_func_1FC2D0E0_cont_BFC2E3F4 }, - { 0x1FC2E410u, SCPH1001_func_1FC2D0E0_cont_BFC2E410 }, - { 0x1FC2E420u, SCPH1001_func_1FC2D0E0_cont_BFC2E420 }, - { 0x1FC2E44Cu, SCPH1001_func_1FC2E44C }, - { 0x1FC2E458u, SCPH1001_func_1FC2E44C_cont_BFC2E458 }, - { 0x1FC2E460u, SCPH1001_func_1FC2E44C_cont_BFC2E460 }, - { 0x1FC2E468u, SCPH1001_func_1FC2E44C_cont_BFC2E468 }, - { 0x1FC2E474u, SCPH1001_func_1FC2E44C_cont_BFC2E474 }, - { 0x1FC2E47Cu, SCPH1001_func_1FC2E44C_cont_BFC2E47C }, - { 0x1FC2E4C0u, SCPH1001_func_1FC2E44C_cont_BFC2E4C0 }, - { 0x1FC2E4D0u, SCPH1001_func_1FC2E4D0 }, - { 0x1FC2E544u, SCPH1001_func_1FC2E544 }, - { 0x1FC2E574u, SCPH1001_func_1FC2E574 }, - { 0x1FC2E588u, SCPH1001_func_1FC2E574_cont_BFC2E588 }, - { 0x1FC2E590u, SCPH1001_func_1FC2E574_cont_BFC2E590 }, - { 0x1FC2E5B4u, SCPH1001_func_1FC2E5B4 }, - { 0x1FC2E5C0u, SCPH1001_func_1FC2E5C0 }, - { 0x1FC2E5D0u, SCPH1001_func_1FC2E5C0_cont_BFC2E5D0 }, - { 0x1FC2E5E0u, SCPH1001_func_1FC2E5C0_cont_BFC2E5E0 }, - { 0x1FC2E5E8u, SCPH1001_func_1FC2E5C0_cont_BFC2E5E8 }, - { 0x1FC2E5F4u, SCPH1001_func_1FC2E5C0_cont_BFC2E5F4 }, - { 0x1FC2E600u, SCPH1001_func_1FC2E600 }, - { 0x1FC2E610u, SCPH1001_func_1FC2E600_cont_BFC2E610 }, - { 0x1FC2E65Cu, SCPH1001_func_1FC2E65C }, - { 0x1FC2E66Cu, SCPH1001_func_1FC2E65C_cont_BFC2E66C }, - { 0x1FC2E6B8u, SCPH1001_func_1FC2E6B8 }, - { 0x1FC2E704u, SCPH1001_func_1FC2E6B8_cont_BFC2E704 }, - { 0x1FC2E714u, SCPH1001_func_1FC2E6B8_cont_BFC2E714 }, - { 0x1FC2E744u, SCPH1001_func_1FC2E6B8_cont_BFC2E744 }, - { 0x1FC2E74Cu, SCPH1001_func_1FC2E6B8_cont_BFC2E74C }, - { 0x1FC2E750u, SCPH1001_func_1FC2E6B8_cont_BFC2E750 }, - { 0x1FC2E760u, SCPH1001_func_1FC2E6B8_cont_BFC2E760 }, - { 0x1FC2E770u, SCPH1001_func_1FC2E6B8_cont_BFC2E770 }, - { 0x1FC2E7A0u, SCPH1001_func_1FC2E6B8_cont_BFC2E7A0 }, - { 0x1FC2E7B4u, SCPH1001_func_1FC2E6B8_cont_BFC2E7B4 }, - { 0x1FC2E7C4u, SCPH1001_func_1FC2E6B8_cont_BFC2E7C4 }, - { 0x1FC2E7F4u, SCPH1001_func_1FC2E6B8_cont_BFC2E7F4 }, - { 0x1FC2E800u, SCPH1001_func_1FC2E6B8_cont_BFC2E800 }, - { 0x1FC2E814u, SCPH1001_func_1FC2E6B8_cont_BFC2E814 }, - { 0x1FC2E824u, SCPH1001_func_1FC2E6B8_cont_BFC2E824 }, - { 0x1FC2E854u, SCPH1001_func_1FC2E6B8_cont_BFC2E854 }, - { 0x1FC2E860u, SCPH1001_func_1FC2E6B8_cont_BFC2E860 }, - { 0x1FC2E874u, SCPH1001_func_1FC2E6B8_cont_BFC2E874 }, - { 0x1FC2E884u, SCPH1001_func_1FC2E6B8_cont_BFC2E884 }, - { 0x1FC2E8B4u, SCPH1001_func_1FC2E6B8_cont_BFC2E8B4 }, - { 0x1FC2E8BCu, SCPH1001_func_1FC2E6B8_cont_BFC2E8BC }, - { 0x1FC2E8C0u, SCPH1001_func_1FC2E6B8_cont_BFC2E8C0 }, - { 0x1FC2E8CCu, SCPH1001_func_1FC2E8CC }, - { 0x1FC2E8F4u, SCPH1001_func_1FC2E8CC_cont_BFC2E8F4 }, - { 0x1FC2E900u, SCPH1001_func_1FC2E8CC_cont_BFC2E900 }, - { 0x1FC2E938u, SCPH1001_func_1FC2E8CC_cont_BFC2E938 }, - { 0x1FC2E968u, SCPH1001_func_1FC2E8CC_cont_BFC2E968 }, - { 0x1FC2E978u, SCPH1001_func_1FC2E8CC_cont_BFC2E978 }, - { 0x1FC2E97Cu, SCPH1001_func_1FC2E8CC_cont_BFC2E97C }, - { 0x1FC2E98Cu, SCPH1001_func_1FC2E8CC_cont_BFC2E98C }, - { 0x1FC2E9BCu, SCPH1001_func_1FC2E8CC_cont_BFC2E9BC }, - { 0x1FC2E9C8u, SCPH1001_func_1FC2E8CC_cont_BFC2E9C8 }, - { 0x1FC2E9DCu, SCPH1001_func_1FC2E8CC_cont_BFC2E9DC }, - { 0x1FC2E9ECu, SCPH1001_func_1FC2E8CC_cont_BFC2E9EC }, - { 0x1FC2EA1Cu, SCPH1001_func_1FC2E8CC_cont_BFC2EA1C }, - { 0x1FC2EA28u, SCPH1001_func_1FC2E8CC_cont_BFC2EA28 }, - { 0x1FC2EA3Cu, SCPH1001_func_1FC2E8CC_cont_BFC2EA3C }, - { 0x1FC2EA4Cu, SCPH1001_func_1FC2E8CC_cont_BFC2EA4C }, - { 0x1FC2EA7Cu, SCPH1001_func_1FC2E8CC_cont_BFC2EA7C }, - { 0x1FC2EA84u, SCPH1001_func_1FC2E8CC_cont_BFC2EA84 }, - { 0x1FC2EA88u, SCPH1001_func_1FC2E8CC_cont_BFC2EA88 }, - { 0x1FC2EA94u, SCPH1001_func_1FC2EA94 }, - { 0x1FC2EAD8u, SCPH1001_func_1FC2EA94_cont_BFC2EAD8 }, - { 0x1FC2EB34u, SCPH1001_func_1FC2EA94_cont_BFC2EB34 }, - { 0x1FC2EB58u, SCPH1001_func_1FC2EA94_cont_BFC2EB58 }, - { 0x1FC2EB88u, SCPH1001_func_1FC2EA94_cont_BFC2EB88 }, - { 0x1FC2EBC0u, SCPH1001_func_1FC2EA94_cont_BFC2EBC0 }, - { 0x1FC2EBE4u, SCPH1001_func_1FC2EA94_cont_BFC2EBE4 }, - { 0x1FC2EC68u, SCPH1001_func_1FC2EA94_cont_BFC2EC68 }, - { 0x1FC2EC90u, SCPH1001_func_1FC2EC90 }, - { 0x1FC2ECA4u, SCPH1001_func_1FC2EC90_cont_BFC2ECA4 }, - { 0x1FC2ECB4u, SCPH1001_func_1FC2EC90_cont_BFC2ECB4 }, - { 0x1FC2ECC4u, SCPH1001_func_1FC2EC90_cont_BFC2ECC4 }, - { 0x1FC2ECD0u, SCPH1001_func_1FC2EC90_cont_BFC2ECD0 }, - { 0x1FC2ECD8u, SCPH1001_func_1FC2ECD8 }, - { 0x1FC2ED1Cu, SCPH1001_func_1FC2ED1C }, - { 0x1FC2ED2Cu, SCPH1001_func_1FC2ED1C_cont_BFC2ED2C }, - { 0x1FC2ED74u, SCPH1001_func_1FC2ED1C_cont_BFC2ED74 }, - { 0x1FC2ED98u, SCPH1001_func_1FC2ED1C_cont_BFC2ED98 }, - { 0x1FC2EE6Cu, SCPH1001_func_1FC2EE6C }, - { 0x1FC2EE80u, SCPH1001_func_1FC2EE6C_cont_BFC2EE80 }, - { 0x1FC2EE90u, SCPH1001_func_1FC2EE6C_cont_BFC2EE90 }, - { 0x1FC2EEA0u, SCPH1001_func_1FC2EE6C_cont_BFC2EEA0 }, - { 0x1FC2EEA8u, SCPH1001_func_1FC2EE6C_cont_BFC2EEA8 }, - { 0x1FC2EEB4u, SCPH1001_func_1FC2EE6C_cont_BFC2EEB4 }, - { 0x1FC2EEC0u, SCPH1001_func_1FC2EEC0 }, - { 0x1FC2EED8u, SCPH1001_func_1FC2EEC0_cont_BFC2EED8 }, - { 0x1FC2EEE8u, SCPH1001_func_1FC2EEC0_cont_BFC2EEE8 }, - { 0x1FC2EEECu, SCPH1001_func_1FC2EEC0_cont_BFC2EEEC }, - { 0x1FC2EEF8u, SCPH1001_func_1FC2EEC0_cont_BFC2EEF8 }, - { 0x1FC2EF00u, SCPH1001_func_1FC2EF00 }, - { 0x1FC2EF18u, SCPH1001_func_1FC2EF00_cont_BFC2EF18 }, - { 0x1FC2EF28u, SCPH1001_func_1FC2EF00_cont_BFC2EF28 }, - { 0x1FC2EF2Cu, SCPH1001_func_1FC2EF00_cont_BFC2EF2C }, - { 0x1FC2EF38u, SCPH1001_func_1FC2EF00_cont_BFC2EF38 }, - { 0x1FC2EF40u, SCPH1001_func_1FC2EF40 }, - { 0x1FC2EF6Cu, SCPH1001_func_1FC2EF40_cont_BFC2EF6C }, - { 0x1FC2EF78u, SCPH1001_func_1FC2EF40_cont_BFC2EF78 }, - { 0x1FC2EF88u, SCPH1001_func_1FC2EF40_cont_BFC2EF88 }, - { 0x1FC2EFB0u, SCPH1001_func_1FC2EF40_cont_BFC2EFB0 }, - { 0x1FC2EFB8u, SCPH1001_func_1FC2EF40_cont_BFC2EFB8 }, - { 0x1FC2EFC8u, SCPH1001_func_1FC2EF40_cont_BFC2EFC8 }, - { 0x1FC2F014u, SCPH1001_func_1FC2EF40_cont_BFC2F014 }, - { 0x1FC2F020u, SCPH1001_func_1FC2EF40_cont_BFC2F020 }, - { 0x1FC2F030u, SCPH1001_func_1FC2EF40_cont_BFC2F030 }, - { 0x1FC2F034u, SCPH1001_func_1FC2EF40_cont_BFC2F034 }, - { 0x1FC2F03Cu, SCPH1001_func_1FC2EF40_cont_BFC2F03C }, - { 0x1FC2F070u, SCPH1001_func_1FC2EF40_cont_BFC2F070 }, - { 0x1FC2F084u, SCPH1001_func_1FC2EF40_cont_BFC2F084 }, - { 0x1FC2F1D4u, SCPH1001_func_1FC2F1D4 }, - { 0x1FC2F1E0u, SCPH1001_func_1FC2F1D4_cont_BFC2F1E0 }, - { 0x1FC2F1FCu, SCPH1001_func_1FC2F1D4_cont_BFC2F1FC }, - { 0x1FC2F210u, SCPH1001_func_1FC2F210 }, - { 0x1FC2F228u, SCPH1001_func_1FC2F210_cont_BFC2F228 }, - { 0x1FC2F230u, SCPH1001_func_1FC2F210_cont_BFC2F230 }, - { 0x1FC2F240u, SCPH1001_func_1FC2F210_cont_BFC2F240 }, - { 0x1FC2F248u, SCPH1001_func_1FC2F210_cont_BFC2F248 }, - { 0x1FC2F254u, SCPH1001_func_1FC2F210_cont_BFC2F254 }, - { 0x1FC2F264u, SCPH1001_func_1FC2F210_cont_BFC2F264 }, - { 0x1FC2F29Cu, SCPH1001_func_1FC2F210_cont_BFC2F29C }, - { 0x1FC2F2C4u, SCPH1001_func_1FC2F210_cont_BFC2F2C4 }, - { 0x1FC2F2F0u, SCPH1001_func_1FC2F210_cont_BFC2F2F0 }, - { 0x1FC2F31Cu, SCPH1001_func_1FC2F210_cont_BFC2F31C }, - { 0x1FC2F330u, SCPH1001_func_1FC2F210_cont_BFC2F330 }, - { 0x1FC2F388u, SCPH1001_func_1FC2F210_cont_BFC2F388 }, - { 0x1FC2F3A0u, SCPH1001_func_1FC2F210_cont_BFC2F3A0 }, - { 0x1FC2F3A4u, SCPH1001_func_1FC2F210_cont_BFC2F3A4 }, - { 0x1FC2F3C4u, SCPH1001_func_1FC2F210_cont_BFC2F3C4 }, - { 0x1FC2F3C8u, SCPH1001_func_1FC2F210_cont_BFC2F3C8 }, - { 0x1FC2F3FCu, SCPH1001_func_1FC2F210_cont_BFC2F3FC }, - { 0x1FC2F424u, SCPH1001_func_1FC2F210_cont_BFC2F424 }, - { 0x1FC2F450u, SCPH1001_func_1FC2F210_cont_BFC2F450 }, - { 0x1FC2F47Cu, SCPH1001_func_1FC2F210_cont_BFC2F47C }, - { 0x1FC2F490u, SCPH1001_func_1FC2F210_cont_BFC2F490 }, - { 0x1FC2F4E8u, SCPH1001_func_1FC2F210_cont_BFC2F4E8 }, - { 0x1FC2F50Cu, SCPH1001_func_1FC2F210_cont_BFC2F50C }, - { 0x1FC2F518u, SCPH1001_func_1FC2F210_cont_BFC2F518 }, - { 0x1FC2F58Cu, SCPH1001_func_1FC2F210_cont_BFC2F58C }, - { 0x1FC2F60Cu, SCPH1001_func_1FC2F210_cont_BFC2F60C }, - { 0x1FC2F618u, SCPH1001_func_1FC2F618 }, - { 0x1FC2F62Cu, SCPH1001_func_1FC2F618_cont_BFC2F62C }, - { 0x1FC2F630u, SCPH1001_func_1FC2F618_cont_BFC2F630 }, - { 0x1FC2F63Cu, SCPH1001_func_1FC2F618_cont_BFC2F63C }, - { 0x1FC2F644u, SCPH1001_func_1FC2F618_cont_BFC2F644 }, - { 0x1FC2F64Cu, SCPH1001_func_1FC2F618_cont_BFC2F64C }, - { 0x1FC2F65Cu, SCPH1001_func_1FC2F65C }, - { 0x1FC2F670u, SCPH1001_func_1FC2F65C_cont_BFC2F670 }, - { 0x1FC2F674u, SCPH1001_func_1FC2F65C_cont_BFC2F674 }, - { 0x1FC2F680u, SCPH1001_func_1FC2F65C_cont_BFC2F680 }, - { 0x1FC2F688u, SCPH1001_func_1FC2F65C_cont_BFC2F688 }, - { 0x1FC2F690u, SCPH1001_func_1FC2F65C_cont_BFC2F690 }, - { 0x1FC2F6A0u, SCPH1001_func_1FC2F6A0 }, - { 0x1FC2F6BCu, SCPH1001_func_1FC2F6A0_cont_BFC2F6BC }, - { 0x1FC2F6C8u, SCPH1001_func_1FC2F6A0_cont_BFC2F6C8 }, - { 0x1FC2F6CCu, SCPH1001_func_1FC2F6A0_cont_BFC2F6CC }, - { 0x1FC2F6E0u, SCPH1001_func_1FC2F6A0_cont_BFC2F6E0 }, - { 0x1FC2F6F8u, SCPH1001_func_1FC2F6A0_cont_BFC2F6F8 }, - { 0x1FC2F700u, SCPH1001_func_1FC2F6A0_cont_BFC2F700 }, - { 0x1FC2F704u, SCPH1001_func_1FC2F6A0_cont_BFC2F704 }, - { 0x1FC2F718u, SCPH1001_func_1FC2F718 }, - { 0x1FC2F728u, SCPH1001_func_1FC2F718_cont_BFC2F728 }, - { 0x1FC2F730u, SCPH1001_func_1FC2F718_cont_BFC2F730 }, - { 0x1FC2F740u, SCPH1001_func_1FC2F718_cont_BFC2F740 }, - { 0x1FC2F750u, SCPH1001_func_1FC2F718_cont_BFC2F750 }, - { 0x1FC2F760u, SCPH1001_func_1FC2F718_cont_BFC2F760 }, - { 0x1FC2F774u, SCPH1001_func_1FC2F718_cont_BFC2F774 }, - { 0x1FC2F784u, SCPH1001_func_1FC2F718_cont_BFC2F784 }, - { 0x1FC2F78Cu, SCPH1001_func_1FC2F718_cont_BFC2F78C }, - { 0x1FC2F79Cu, SCPH1001_func_1FC2F79C }, - { 0x1FC2F7F8u, SCPH1001_func_1FC2F79C_cont_BFC2F7F8 }, - { 0x1FC2F808u, SCPH1001_func_1FC2F808 }, - { 0x1FC2F81Cu, SCPH1001_func_1FC2F808_cont_BFC2F81C }, - { 0x1FC2F830u, SCPH1001_func_1FC2F808_cont_BFC2F830 }, - { 0x1FC2F840u, SCPH1001_func_1FC2F808_cont_BFC2F840 }, - { 0x1FC2F84Cu, SCPH1001_func_1FC2F808_cont_BFC2F84C }, - { 0x1FC2F85Cu, SCPH1001_func_1FC2F85C }, - { 0x1FC2F874u, SCPH1001_func_1FC2F85C_cont_BFC2F874 }, - { 0x1FC2F87Cu, SCPH1001_func_1FC2F85C_cont_BFC2F87C }, - { 0x1FC2F884u, SCPH1001_func_1FC2F85C_cont_BFC2F884 }, - { 0x1FC2F88Cu, SCPH1001_func_1FC2F85C_cont_BFC2F88C }, - { 0x1FC2F898u, SCPH1001_func_1FC2F85C_cont_BFC2F898 }, - { 0x1FC2F8ACu, SCPH1001_func_1FC2F8AC }, - { 0x1FC2F924u, SCPH1001_func_1FC2F8AC_cont_BFC2F924 }, - { 0x1FC2F928u, SCPH1001_func_1FC2F8AC_cont_BFC2F928 }, - { 0x1FC2F934u, SCPH1001_func_1FC2F8AC_cont_BFC2F934 }, - { 0x1FC2F93Cu, SCPH1001_func_1FC2F8AC_cont_BFC2F93C }, - { 0x1FC2F940u, SCPH1001_func_1FC2F8AC_cont_BFC2F940 }, - { 0x1FC2F948u, SCPH1001_func_1FC2F8AC_cont_BFC2F948 }, - { 0x1FC2F94Cu, SCPH1001_func_1FC2F8AC_cont_BFC2F94C }, - { 0x1FC2F958u, SCPH1001_func_1FC2F8AC_cont_BFC2F958 }, - { 0x1FC2F960u, SCPH1001_func_1FC2F8AC_cont_BFC2F960 }, - { 0x1FC2F964u, SCPH1001_func_1FC2F8AC_cont_BFC2F964 }, - { 0x1FC2F96Cu, SCPH1001_func_1FC2F8AC_cont_BFC2F96C }, - { 0x1FC2F970u, SCPH1001_func_1FC2F8AC_cont_BFC2F970 }, - { 0x1FC2F97Cu, SCPH1001_func_1FC2F8AC_cont_BFC2F97C }, - { 0x1FC2F984u, SCPH1001_func_1FC2F8AC_cont_BFC2F984 }, - { 0x1FC2F988u, SCPH1001_func_1FC2F8AC_cont_BFC2F988 }, - { 0x1FC2F990u, SCPH1001_func_1FC2F8AC_cont_BFC2F990 }, - { 0x1FC2F99Cu, SCPH1001_func_1FC2F8AC_cont_BFC2F99C }, - { 0x1FC2F9A4u, SCPH1001_func_1FC2F8AC_cont_BFC2F9A4 }, - { 0x1FC2F9C0u, SCPH1001_func_1FC2F8AC_cont_BFC2F9C0 }, - { 0x1FC2F9F0u, SCPH1001_func_1FC2F8AC_cont_BFC2F9F0 }, - { 0x1FC2F9F8u, SCPH1001_func_1FC2F8AC_cont_BFC2F9F8 }, - { 0x1FC2FA08u, SCPH1001_func_1FC2F8AC_cont_BFC2FA08 }, - { 0x1FC2FA10u, SCPH1001_func_1FC2F8AC_cont_BFC2FA10 }, - { 0x1FC2FA18u, SCPH1001_func_1FC2F8AC_cont_BFC2FA18 }, - { 0x1FC2FA28u, SCPH1001_func_1FC2F8AC_cont_BFC2FA28 }, - { 0x1FC2FA48u, SCPH1001_func_1FC2F8AC_cont_BFC2FA48 }, - { 0x1FC2FA4Cu, SCPH1001_func_1FC2F8AC_cont_BFC2FA4C }, - { 0x1FC2FA5Cu, SCPH1001_func_1FC2F8AC_cont_BFC2FA5C }, - { 0x1FC2FA78u, SCPH1001_func_1FC2FA78 }, - { 0x1FC2FAECu, SCPH1001_func_1FC2FA78_cont_BFC2FAEC }, - { 0x1FC2FAF0u, SCPH1001_func_1FC2FA78_cont_BFC2FAF0 }, - { 0x1FC2FAFCu, SCPH1001_func_1FC2FA78_cont_BFC2FAFC }, - { 0x1FC2FB04u, SCPH1001_func_1FC2FA78_cont_BFC2FB04 }, - { 0x1FC2FB08u, SCPH1001_func_1FC2FA78_cont_BFC2FB08 }, - { 0x1FC2FB10u, SCPH1001_func_1FC2FA78_cont_BFC2FB10 }, - { 0x1FC2FB14u, SCPH1001_func_1FC2FA78_cont_BFC2FB14 }, - { 0x1FC2FB20u, SCPH1001_func_1FC2FA78_cont_BFC2FB20 }, - { 0x1FC2FB28u, SCPH1001_func_1FC2FA78_cont_BFC2FB28 }, - { 0x1FC2FB2Cu, SCPH1001_func_1FC2FA78_cont_BFC2FB2C }, - { 0x1FC2FB34u, SCPH1001_func_1FC2FA78_cont_BFC2FB34 }, - { 0x1FC2FB38u, SCPH1001_func_1FC2FA78_cont_BFC2FB38 }, - { 0x1FC2FB44u, SCPH1001_func_1FC2FA78_cont_BFC2FB44 }, - { 0x1FC2FB4Cu, SCPH1001_func_1FC2FA78_cont_BFC2FB4C }, - { 0x1FC2FB50u, SCPH1001_func_1FC2FA78_cont_BFC2FB50 }, - { 0x1FC2FB58u, SCPH1001_func_1FC2FA78_cont_BFC2FB58 }, - { 0x1FC2FB94u, SCPH1001_func_1FC2FA78_cont_BFC2FB94 }, - { 0x1FC2FB9Cu, SCPH1001_func_1FC2FA78_cont_BFC2FB9C }, - { 0x1FC2FBB8u, SCPH1001_func_1FC2FA78_cont_BFC2FBB8 }, - { 0x1FC2FBC0u, SCPH1001_func_1FC2FA78_cont_BFC2FBC0 }, - { 0x1FC2FBC8u, SCPH1001_func_1FC2FA78_cont_BFC2FBC8 }, - { 0x1FC2FBDCu, SCPH1001_func_1FC2FA78_cont_BFC2FBDC }, - { 0x1FC2FBECu, SCPH1001_func_1FC2FA78_cont_BFC2FBEC }, - { 0x1FC2FBF4u, SCPH1001_func_1FC2FA78_cont_BFC2FBF4 }, - { 0x1FC2FC10u, SCPH1001_func_1FC2FC10 }, - { 0x1FC2FCC4u, SCPH1001_func_1FC2FCC4 }, - { 0x1FC2FCDCu, SCPH1001_func_1FC2FCC4_cont_BFC2FCDC }, - { 0x1FC2FD24u, SCPH1001_func_1FC2FCC4_cont_BFC2FD24 }, - { 0x1FC2FD64u, SCPH1001_func_1FC2FCC4_cont_BFC2FD64 }, - { 0x1FC2FD6Cu, SCPH1001_func_1FC2FCC4_cont_BFC2FD6C }, - { 0x1FC2FDB4u, SCPH1001_func_1FC2FCC4_cont_BFC2FDB4 }, - { 0x1FC2FDF4u, SCPH1001_func_1FC2FCC4_cont_BFC2FDF4 }, - { 0x1FC2FDFCu, SCPH1001_func_1FC2FCC4_cont_BFC2FDFC }, - { 0x1FC2FE38u, SCPH1001_func_1FC2FCC4_cont_BFC2FE38 }, - { 0x1FC2FE40u, SCPH1001_func_1FC2FCC4_cont_BFC2FE40 }, - { 0x1FC2FE48u, SCPH1001_func_1FC2FCC4_cont_BFC2FE48 }, - { 0x1FC2FE54u, SCPH1001_func_1FC2FCC4_cont_BFC2FE54 }, - { 0x1FC2FE5Cu, SCPH1001_func_1FC2FCC4_cont_BFC2FE5C }, - { 0x1FC2FE60u, SCPH1001_func_1FC2FCC4_cont_BFC2FE60 }, - { 0x1FC2FE6Cu, SCPH1001_func_1FC2FE6C }, - { 0x1FC2FEACu, SCPH1001_func_1FC2FE6C_cont_BFC2FEAC }, - { 0x1FC2FEB4u, SCPH1001_func_1FC2FE6C_cont_BFC2FEB4 }, - { 0x1FC2FEC4u, SCPH1001_func_1FC2FE6C_cont_BFC2FEC4 }, - { 0x1FC2FEE0u, SCPH1001_func_1FC2FE6C_cont_BFC2FEE0 }, - { 0x1FC2FEECu, SCPH1001_func_1FC2FE6C_cont_BFC2FEEC }, - { 0x1FC2FF20u, SCPH1001_func_1FC2FE6C_cont_BFC2FF20 }, - { 0x1FC2FF24u, SCPH1001_func_1FC2FE6C_cont_BFC2FF24 }, - { 0x1FC2FF34u, SCPH1001_func_1FC2FF34 }, - { 0x1FC2FF40u, SCPH1001_func_1FC2FF34_cont_BFC2FF40 }, - { 0x1FC2FF5Cu, SCPH1001_func_1FC2FF34_cont_BFC2FF5C }, - { 0x1FC3010Cu, SCPH1001_func_1FC3010C }, - { 0x1FC3012Cu, SCPH1001_func_1FC3010C_cont_BFC3012C }, - { 0x1FC30138u, SCPH1001_func_1FC3010C_cont_BFC30138 }, - { 0x1FC3015Cu, SCPH1001_func_1FC3015C }, - { 0x1FC3017Cu, SCPH1001_func_1FC3015C_cont_BFC3017C }, - { 0x1FC30188u, SCPH1001_func_1FC3015C_cont_BFC30188 }, - { 0x1FC301ACu, SCPH1001_func_1FC301AC }, - { 0x1FC301D8u, SCPH1001_func_1FC301AC_cont_BFC301D8 }, - { 0x1FC301E8u, SCPH1001_func_1FC301AC_cont_BFC301E8 }, - { 0x1FC301F0u, SCPH1001_func_1FC301AC_cont_BFC301F0 }, - { 0x1FC301F4u, SCPH1001_func_1FC301AC_cont_BFC301F4 }, - { 0x1FC30200u, SCPH1001_func_1FC301AC_cont_BFC30200 }, - { 0x1FC30208u, SCPH1001_func_1FC301AC_cont_BFC30208 }, - { 0x1FC30214u, SCPH1001_func_1FC301AC_cont_BFC30214 }, - { 0x1FC3021Cu, SCPH1001_func_1FC301AC_cont_BFC3021C }, - { 0x1FC30220u, SCPH1001_func_1FC301AC_cont_BFC30220 }, - { 0x1FC3022Cu, SCPH1001_func_1FC3022C }, - { 0x1FC30258u, SCPH1001_func_1FC3022C_cont_BFC30258 }, - { 0x1FC30260u, SCPH1001_func_1FC3022C_cont_BFC30260 }, - { 0x1FC30268u, SCPH1001_func_1FC3022C_cont_BFC30268 }, - { 0x1FC30270u, SCPH1001_func_1FC3022C_cont_BFC30270 }, - { 0x1FC30278u, SCPH1001_func_1FC3022C_cont_BFC30278 }, - { 0x1FC30284u, SCPH1001_func_1FC3022C_cont_BFC30284 }, - { 0x1FC3028Cu, SCPH1001_func_1FC3022C_cont_BFC3028C }, - { 0x1FC30290u, SCPH1001_func_1FC3022C_cont_BFC30290 }, - { 0x1FC3029Cu, SCPH1001_func_1FC3029C }, - { 0x1FC302ACu, SCPH1001_func_1FC3029C_cont_BFC302AC }, - { 0x1FC302BCu, SCPH1001_func_1FC302BC }, - { 0x1FC302D0u, SCPH1001_func_1FC302BC_cont_BFC302D0 }, - { 0x1FC302DCu, SCPH1001_func_1FC302BC_cont_BFC302DC }, - { 0x1FC302E4u, SCPH1001_func_1FC302BC_cont_BFC302E4 }, - { 0x1FC302E8u, SCPH1001_func_1FC302BC_cont_BFC302E8 }, - { 0x1FC302F0u, SCPH1001_func_1FC302BC_cont_BFC302F0 }, - { 0x1FC302F8u, SCPH1001_func_1FC302BC_cont_BFC302F8 }, - { 0x1FC302FCu, SCPH1001_func_1FC302BC_cont_BFC302FC }, - { 0x1FC30304u, SCPH1001_func_1FC302BC_cont_BFC30304 }, - { 0x1FC3030Cu, SCPH1001_func_1FC302BC_cont_BFC3030C }, - { 0x1FC30310u, SCPH1001_func_1FC302BC_cont_BFC30310 }, - { 0x1FC3031Cu, SCPH1001_func_1FC3031C }, - { 0x1FC30340u, SCPH1001_func_1FC3031C_cont_BFC30340 }, - { 0x1FC30350u, SCPH1001_func_1FC30350 }, - { 0x1FC30384u, SCPH1001_func_1FC30350_cont_BFC30384 }, - { 0x1FC303A4u, SCPH1001_func_1FC303A4 }, - { 0x1FC303C0u, SCPH1001_func_1FC303A4_cont_BFC303C0 }, - { 0x1FC303D4u, SCPH1001_func_1FC303A4_cont_BFC303D4 }, - { 0x1FC303E8u, SCPH1001_func_1FC303A4_cont_BFC303E8 }, - { 0x1FC303FCu, SCPH1001_func_1FC303A4_cont_BFC303FC }, - { 0x1FC30404u, SCPH1001_func_1FC303A4_cont_BFC30404 }, - { 0x1FC3040Cu, SCPH1001_func_1FC303A4_cont_BFC3040C }, - { 0x1FC30414u, SCPH1001_func_1FC303A4_cont_BFC30414 }, - { 0x1FC3041Cu, SCPH1001_func_1FC3041C }, - { 0x1FC30440u, SCPH1001_func_1FC3041C_cont_BFC30440 }, - { 0x1FC3045Cu, SCPH1001_func_1FC3045C }, - { 0x1FC30470u, SCPH1001_func_1FC30470 }, - { 0x1FC30484u, SCPH1001_func_1FC30484 }, - { 0x1FC30498u, SCPH1001_func_1FC30498 }, - { 0x1FC304ACu, SCPH1001_func_1FC304AC }, - { 0x1FC304B4u, SCPH1001_func_1FC304B4 }, - { 0x1FC304D0u, SCPH1001_func_1FC304B4_cont_BFC304D0 }, - { 0x1FC304DCu, SCPH1001_func_1FC304B4_cont_BFC304DC }, - { 0x1FC304E8u, SCPH1001_func_1FC304B4_cont_BFC304E8 }, - { 0x1FC304F4u, SCPH1001_func_1FC304B4_cont_BFC304F4 }, - { 0x1FC304FCu, SCPH1001_func_1FC304B4_cont_BFC304FC }, - { 0x1FC30504u, SCPH1001_func_1FC304B4_cont_BFC30504 }, - { 0x1FC3050Cu, SCPH1001_func_1FC304B4_cont_BFC3050C }, - { 0x1FC30514u, SCPH1001_func_1FC30514 }, - { 0x1FC30538u, SCPH1001_func_1FC30514_cont_BFC30538 }, - { 0x1FC30554u, SCPH1001_func_1FC30554 }, - { 0x1FC30560u, SCPH1001_func_1FC30560 }, - { 0x1FC3056Cu, SCPH1001_func_1FC3056C }, - { 0x1FC30578u, SCPH1001_func_1FC30578 }, - { 0x1FC30584u, SCPH1001_func_1FC30584 }, - { 0x1FC3058Cu, SCPH1001_func_1FC3058C }, - { 0x1FC305DCu, SCPH1001_func_1FC3058C_cont_BFC305DC }, - { 0x1FC305E0u, SCPH1001_func_1FC3058C_cont_BFC305E0 }, - { 0x1FC30600u, SCPH1001_func_1FC3058C_cont_BFC30600 }, - { 0x1FC30604u, SCPH1001_func_1FC3058C_cont_BFC30604 }, - { 0x1FC30624u, SCPH1001_func_1FC3058C_cont_BFC30624 }, - { 0x1FC30628u, SCPH1001_func_1FC3058C_cont_BFC30628 }, - { 0x1FC30638u, SCPH1001_func_1FC3058C_cont_BFC30638 }, - { 0x1FC3063Cu, SCPH1001_func_1FC3058C_cont_BFC3063C }, - { 0x1FC3064Cu, SCPH1001_func_1FC3058C_cont_BFC3064C }, - { 0x1FC30650u, SCPH1001_func_1FC3058C_cont_BFC30650 }, - { 0x1FC30660u, SCPH1001_func_1FC3058C_cont_BFC30660 }, - { 0x1FC30664u, SCPH1001_func_1FC3058C_cont_BFC30664 }, - { 0x1FC30670u, SCPH1001_func_1FC30670 }, - { 0x1FC306C0u, SCPH1001_func_1FC30670_cont_BFC306C0 }, - { 0x1FC306C4u, SCPH1001_func_1FC30670_cont_BFC306C4 }, - { 0x1FC306E4u, SCPH1001_func_1FC30670_cont_BFC306E4 }, - { 0x1FC306E8u, SCPH1001_func_1FC30670_cont_BFC306E8 }, - { 0x1FC30708u, SCPH1001_func_1FC30670_cont_BFC30708 }, - { 0x1FC3070Cu, SCPH1001_func_1FC30670_cont_BFC3070C }, - { 0x1FC3072Cu, SCPH1001_func_1FC30670_cont_BFC3072C }, - { 0x1FC30730u, SCPH1001_func_1FC30670_cont_BFC30730 }, - { 0x1FC30750u, SCPH1001_func_1FC30670_cont_BFC30750 }, - { 0x1FC30754u, SCPH1001_func_1FC30670_cont_BFC30754 }, - { 0x1FC30764u, SCPH1001_func_1FC30670_cont_BFC30764 }, - { 0x1FC30768u, SCPH1001_func_1FC30670_cont_BFC30768 }, - { 0x1FC30778u, SCPH1001_func_1FC30670_cont_BFC30778 }, - { 0x1FC3077Cu, SCPH1001_func_1FC30670_cont_BFC3077C }, - { 0x1FC3078Cu, SCPH1001_func_1FC30670_cont_BFC3078C }, - { 0x1FC30790u, SCPH1001_func_1FC30670_cont_BFC30790 }, - { 0x1FC3079Cu, SCPH1001_func_1FC3079C }, - { 0x1FC307C0u, SCPH1001_func_1FC3079C_cont_BFC307C0 }, - { 0x1FC307D4u, SCPH1001_func_1FC3079C_cont_BFC307D4 }, - { 0x1FC30868u, SCPH1001_func_1FC30868 }, - { 0x1FC3088Cu, SCPH1001_func_1FC30868_cont_BFC3088C }, - { 0x1FC308A0u, SCPH1001_func_1FC30868_cont_BFC308A0 }, - { 0x1FC30960u, SCPH1001_func_1FC30960 }, - { 0x1FC30998u, SCPH1001_func_1FC30960_cont_BFC30998 }, - { 0x1FC309A8u, SCPH1001_func_1FC30960_cont_BFC309A8 }, - { 0x1FC309CCu, SCPH1001_func_1FC30960_cont_BFC309CC }, - { 0x1FC30A14u, SCPH1001_func_1FC30960_cont_BFC30A14 }, - { 0x1FC30A20u, SCPH1001_func_1FC30960_cont_BFC30A20 }, - { 0x1FC30A80u, SCPH1001_func_1FC30A80 }, - { 0x1FC30AD4u, SCPH1001_func_1FC30A80_cont_BFC30AD4 }, - { 0x1FC30AE8u, SCPH1001_func_1FC30A80_cont_BFC30AE8 }, - { 0x1FC30B0Cu, SCPH1001_func_1FC30A80_cont_BFC30B0C }, - { 0x1FC30BD8u, SCPH1001_func_1FC30A80_cont_BFC30BD8 }, - { 0x1FC30BE0u, SCPH1001_func_1FC30A80_cont_BFC30BE0 }, - { 0x1FC30C18u, SCPH1001_func_1FC30A80_cont_BFC30C18 }, - { 0x1FC30C44u, SCPH1001_func_1FC30A80_cont_BFC30C44 }, - { 0x1FC30C84u, SCPH1001_func_1FC30A80_cont_BFC30C84 }, - { 0x1FC30CB4u, SCPH1001_func_1FC30A80_cont_BFC30CB4 }, - { 0x1FC30CE8u, SCPH1001_func_1FC30A80_cont_BFC30CE8 }, - { 0x1FC30D14u, SCPH1001_func_1FC30A80_cont_BFC30D14 }, - { 0x1FC30D50u, SCPH1001_func_1FC30A80_cont_BFC30D50 }, - { 0x1FC30D80u, SCPH1001_func_1FC30A80_cont_BFC30D80 }, - { 0x1FC30D8Cu, SCPH1001_func_1FC30A80_cont_BFC30D8C }, - { 0x1FC30DF0u, SCPH1001_func_1FC30DF0 }, - { 0x1FC30E3Cu, SCPH1001_func_1FC30DF0_cont_BFC30E3C }, - { 0x1FC30E4Cu, SCPH1001_func_1FC30DF0_cont_BFC30E4C }, - { 0x1FC30E68u, SCPH1001_func_1FC30DF0_cont_BFC30E68 }, - { 0x1FC30E7Cu, SCPH1001_func_1FC30DF0_cont_BFC30E7C }, - { 0x1FC30E8Cu, SCPH1001_func_1FC30DF0_cont_BFC30E8C }, - { 0x1FC30EACu, SCPH1001_func_1FC30DF0_cont_BFC30EAC }, - { 0x1FC30ECCu, SCPH1001_func_1FC30DF0_cont_BFC30ECC }, - { 0x1FC30EDCu, SCPH1001_func_1FC30DF0_cont_BFC30EDC }, - { 0x1FC30F38u, SCPH1001_func_1FC30DF0_cont_BFC30F38 }, - { 0x1FC30F44u, SCPH1001_func_1FC30DF0_cont_BFC30F44 }, - { 0x1FC30F50u, SCPH1001_func_1FC30DF0_cont_BFC30F50 }, - { 0x1FC30F58u, SCPH1001_func_1FC30DF0_cont_BFC30F58 }, - { 0x1FC30F68u, SCPH1001_func_1FC30DF0_cont_BFC30F68 }, - { 0x1FC30F6Cu, SCPH1001_func_1FC30DF0_cont_BFC30F6C }, - { 0x1FC30F78u, SCPH1001_func_1FC30DF0_cont_BFC30F78 }, - { 0x1FC30F80u, SCPH1001_func_1FC30DF0_cont_BFC30F80 }, - { 0x1FC30F84u, SCPH1001_func_1FC30DF0_cont_BFC30F84 }, - { 0x1FC30F8Cu, SCPH1001_func_1FC30DF0_cont_BFC30F8C }, - { 0x1FC30F94u, SCPH1001_func_1FC30DF0_cont_BFC30F94 }, - { 0x1FC30FA8u, SCPH1001_func_1FC30DF0_cont_BFC30FA8 }, - { 0x1FC30FACu, SCPH1001_func_1FC30DF0_cont_BFC30FAC }, - { 0x1FC30FB8u, SCPH1001_func_1FC30DF0_cont_BFC30FB8 }, - { 0x1FC30FC0u, SCPH1001_func_1FC30DF0_cont_BFC30FC0 }, - { 0x1FC30FC4u, SCPH1001_func_1FC30DF0_cont_BFC30FC4 }, - { 0x1FC30FCCu, SCPH1001_func_1FC30DF0_cont_BFC30FCC }, - { 0x1FC30FD4u, SCPH1001_func_1FC30DF0_cont_BFC30FD4 }, - { 0x1FC30FE4u, SCPH1001_func_1FC30DF0_cont_BFC30FE4 }, - { 0x1FC30FE8u, SCPH1001_func_1FC30DF0_cont_BFC30FE8 }, - { 0x1FC30FF4u, SCPH1001_func_1FC30DF0_cont_BFC30FF4 }, - { 0x1FC30FFCu, SCPH1001_func_1FC30DF0_cont_BFC30FFC }, - { 0x1FC31000u, SCPH1001_func_1FC30DF0_cont_BFC31000 }, - { 0x1FC31008u, SCPH1001_func_1FC30DF0_cont_BFC31008 }, - { 0x1FC31018u, SCPH1001_func_1FC30DF0_cont_BFC31018 }, - { 0x1FC3101Cu, SCPH1001_func_1FC30DF0_cont_BFC3101C }, - { 0x1FC31028u, SCPH1001_func_1FC30DF0_cont_BFC31028 }, - { 0x1FC31030u, SCPH1001_func_1FC30DF0_cont_BFC31030 }, - { 0x1FC31034u, SCPH1001_func_1FC30DF0_cont_BFC31034 }, - { 0x1FC3103Cu, SCPH1001_func_1FC30DF0_cont_BFC3103C }, - { 0x1FC31044u, SCPH1001_func_1FC30DF0_cont_BFC31044 }, - { 0x1FC31058u, SCPH1001_func_1FC30DF0_cont_BFC31058 }, - { 0x1FC3105Cu, SCPH1001_func_1FC30DF0_cont_BFC3105C }, - { 0x1FC31068u, SCPH1001_func_1FC30DF0_cont_BFC31068 }, - { 0x1FC31070u, SCPH1001_func_1FC30DF0_cont_BFC31070 }, - { 0x1FC31074u, SCPH1001_func_1FC30DF0_cont_BFC31074 }, - { 0x1FC3107Cu, SCPH1001_func_1FC30DF0_cont_BFC3107C }, - { 0x1FC31084u, SCPH1001_func_1FC30DF0_cont_BFC31084 }, - { 0x1FC31094u, SCPH1001_func_1FC30DF0_cont_BFC31094 }, - { 0x1FC31098u, SCPH1001_func_1FC30DF0_cont_BFC31098 }, - { 0x1FC310A4u, SCPH1001_func_1FC30DF0_cont_BFC310A4 }, - { 0x1FC310ACu, SCPH1001_func_1FC30DF0_cont_BFC310AC }, - { 0x1FC310B0u, SCPH1001_func_1FC30DF0_cont_BFC310B0 }, - { 0x1FC310B4u, SCPH1001_func_1FC30DF0_cont_BFC310B4 }, - { 0x1FC310C4u, SCPH1001_func_1FC30DF0_cont_BFC310C4 }, - { 0x1FC310D0u, SCPH1001_func_1FC30DF0_cont_BFC310D0 }, - { 0x1FC310D8u, SCPH1001_func_1FC30DF0_cont_BFC310D8 }, - { 0x1FC310E0u, SCPH1001_func_1FC30DF0_cont_BFC310E0 }, - { 0x1FC310E8u, SCPH1001_func_1FC30DF0_cont_BFC310E8 }, - { 0x1FC310ECu, SCPH1001_func_1FC30DF0_cont_BFC310EC }, - { 0x1FC310F8u, SCPH1001_func_1FC30DF0_cont_BFC310F8 }, - { 0x1FC31100u, SCPH1001_func_1FC30DF0_cont_BFC31100 }, - { 0x1FC3111Cu, SCPH1001_func_1FC30DF0_cont_BFC3111C }, - { 0x1FC31128u, SCPH1001_func_1FC30DF0_cont_BFC31128 }, - { 0x1FC31138u, SCPH1001_func_1FC30DF0_cont_BFC31138 }, - { 0x1FC31194u, SCPH1001_func_1FC31194 }, - { 0x1FC311CCu, SCPH1001_func_1FC31194_cont_BFC311CC }, - { 0x1FC311DCu, SCPH1001_func_1FC31194_cont_BFC311DC }, - { 0x1FC31200u, SCPH1001_func_1FC31194_cont_BFC31200 }, - { 0x1FC31234u, SCPH1001_func_1FC31194_cont_BFC31234 }, - { 0x1FC3123Cu, SCPH1001_func_1FC31194_cont_BFC3123C }, - { 0x1FC31244u, SCPH1001_func_1FC31194_cont_BFC31244 }, - { 0x1FC31288u, SCPH1001_func_1FC31194_cont_BFC31288 }, - { 0x1FC31290u, SCPH1001_func_1FC31194_cont_BFC31290 }, - { 0x1FC31294u, SCPH1001_func_1FC31194_cont_BFC31294 }, - { 0x1FC312D4u, SCPH1001_func_1FC31194_cont_BFC312D4 }, - { 0x1FC312D8u, SCPH1001_func_1FC31194_cont_BFC312D8 }, - { 0x1FC312E4u, SCPH1001_func_1FC31194_cont_BFC312E4 }, - { 0x1FC312E8u, SCPH1001_func_1FC31194_cont_BFC312E8 }, - { 0x1FC312FCu, SCPH1001_func_1FC31194_cont_BFC312FC }, - { 0x1FC31300u, SCPH1001_func_1FC31194_cont_BFC31300 }, - { 0x1FC3130Cu, SCPH1001_func_1FC31194_cont_BFC3130C }, - { 0x1FC31314u, SCPH1001_func_1FC31194_cont_BFC31314 }, - { 0x1FC31320u, SCPH1001_func_1FC31194_cont_BFC31320 }, - { 0x1FC31380u, SCPH1001_func_1FC31380 }, - { 0x1FC313ACu, SCPH1001_func_1FC31380_cont_BFC313AC }, - { 0x1FC313B8u, SCPH1001_func_1FC31380_cont_BFC313B8 }, - { 0x1FC313D0u, SCPH1001_func_1FC31380_cont_BFC313D0 }, - { 0x1FC313ECu, SCPH1001_func_1FC313EC }, - { 0x1FC31410u, SCPH1001_func_1FC313EC_cont_BFC31410 }, - { 0x1FC31418u, SCPH1001_func_1FC313EC_cont_BFC31418 }, - { 0x1FC31430u, SCPH1001_func_1FC313EC_cont_BFC31430 }, - { 0x1FC31448u, SCPH1001_func_1FC31448 }, - { 0x1FC31500u, SCPH1001_func_1FC31448_cont_BFC31500 }, - { 0x1FC31530u, SCPH1001_func_1FC31448_cont_BFC31530 }, - { 0x1FC31540u, SCPH1001_func_1FC31448_cont_BFC31540 }, - { 0x1FC31550u, SCPH1001_func_1FC31448_cont_BFC31550 }, - { 0x1FC31554u, SCPH1001_func_1FC31448_cont_BFC31554 }, - { 0x1FC31580u, SCPH1001_func_1FC31580 }, - { 0x1FC315B8u, SCPH1001_func_1FC31580_cont_BFC315B8 }, - { 0x1FC315FCu, SCPH1001_func_1FC31580_cont_BFC315FC }, - { 0x1FC31614u, SCPH1001_func_1FC31580_cont_BFC31614 }, - { 0x1FC31638u, SCPH1001_func_1FC31638 }, - { 0x1FC3165Cu, SCPH1001_func_1FC31638_cont_BFC3165C }, - { 0x1FC316DCu, SCPH1001_func_1FC31638_cont_BFC316DC }, - { 0x1FC31708u, SCPH1001_func_1FC31638_cont_BFC31708 }, - { 0x1FC31724u, SCPH1001_func_1FC31638_cont_BFC31724 }, - { 0x1FC31744u, SCPH1001_func_1FC31638_cont_BFC31744 }, - { 0x1FC317D0u, SCPH1001_func_1FC317D0 }, - { 0x1FC3180Cu, SCPH1001_func_1FC317D0_cont_BFC3180C }, - { 0x1FC31828u, SCPH1001_func_1FC317D0_cont_BFC31828 }, - { 0x1FC3182Cu, SCPH1001_func_1FC317D0_cont_BFC3182C }, - { 0x1FC31858u, SCPH1001_func_1FC317D0_cont_BFC31858 }, - { 0x1FC31860u, SCPH1001_func_1FC317D0_cont_BFC31860 }, - { 0x1FC31864u, SCPH1001_func_1FC317D0_cont_BFC31864 }, - { 0x1FC3186Cu, SCPH1001_func_1FC317D0_cont_BFC3186C }, - { 0x1FC31874u, SCPH1001_func_1FC317D0_cont_BFC31874 }, - { 0x1FC31878u, SCPH1001_func_1FC317D0_cont_BFC31878 }, - { 0x1FC31880u, SCPH1001_func_1FC317D0_cont_BFC31880 }, - { 0x1FC31884u, SCPH1001_func_1FC317D0_cont_BFC31884 }, - { 0x1FC318C4u, SCPH1001_func_1FC317D0_cont_BFC318C4 }, - { 0x1FC318E0u, SCPH1001_func_1FC317D0_cont_BFC318E0 }, - { 0x1FC318E4u, SCPH1001_func_1FC317D0_cont_BFC318E4 }, - { 0x1FC31910u, SCPH1001_func_1FC317D0_cont_BFC31910 }, - { 0x1FC31918u, SCPH1001_func_1FC317D0_cont_BFC31918 }, - { 0x1FC3191Cu, SCPH1001_func_1FC317D0_cont_BFC3191C }, - { 0x1FC31924u, SCPH1001_func_1FC317D0_cont_BFC31924 }, - { 0x1FC3192Cu, SCPH1001_func_1FC317D0_cont_BFC3192C }, - { 0x1FC31930u, SCPH1001_func_1FC317D0_cont_BFC31930 }, - { 0x1FC31938u, SCPH1001_func_1FC317D0_cont_BFC31938 }, - { 0x1FC3193Cu, SCPH1001_func_1FC317D0_cont_BFC3193C }, - { 0x1FC31958u, SCPH1001_func_1FC317D0_cont_BFC31958 }, - { 0x1FC31968u, SCPH1001_func_1FC31968 }, - { 0x1FC3197Cu, SCPH1001_func_1FC31968_cont_BFC3197C }, - { 0x1FC31994u, SCPH1001_func_1FC31968_cont_BFC31994 }, - { 0x1FC319ACu, SCPH1001_func_1FC31968_cont_BFC319AC }, - { 0x1FC319B8u, SCPH1001_func_1FC31968_cont_BFC319B8 }, - { 0x1FC319D0u, SCPH1001_func_1FC31968_cont_BFC319D0 }, - { 0x1FC319DCu, SCPH1001_func_1FC31968_cont_BFC319DC }, - { 0x1FC319ECu, SCPH1001_func_1FC319EC }, - { 0x1FC31A18u, SCPH1001_func_1FC319EC_cont_BFC31A18 }, - { 0x1FC31A20u, SCPH1001_func_1FC319EC_cont_BFC31A20 }, - { 0x1FC31A24u, SCPH1001_func_1FC319EC_cont_BFC31A24 }, - { 0x1FC31A2Cu, SCPH1001_func_1FC319EC_cont_BFC31A2C }, - { 0x1FC31A34u, SCPH1001_func_1FC319EC_cont_BFC31A34 }, - { 0x1FC31A38u, SCPH1001_func_1FC319EC_cont_BFC31A38 }, - { 0x1FC31A4Cu, SCPH1001_func_1FC319EC_cont_BFC31A4C }, - { 0x1FC31A50u, SCPH1001_func_1FC319EC_cont_BFC31A50 }, - { 0x1FC31A9Cu, SCPH1001_func_1FC319EC_cont_BFC31A9C }, - { 0x1FC31AA8u, SCPH1001_func_1FC319EC_cont_BFC31AA8 }, - { 0x1FC31AF4u, SCPH1001_func_1FC319EC_cont_BFC31AF4 }, - { 0x1FC31AFCu, SCPH1001_func_1FC319EC_cont_BFC31AFC }, - { 0x1FC31B28u, SCPH1001_func_1FC319EC_cont_BFC31B28 }, - { 0x1FC31B38u, SCPH1001_func_1FC319EC_cont_BFC31B38 }, - { 0x1FC31B40u, SCPH1001_func_1FC319EC_cont_BFC31B40 }, - { 0x1FC31B48u, SCPH1001_func_1FC319EC_cont_BFC31B48 }, - { 0x1FC31B4Cu, SCPH1001_func_1FC319EC_cont_BFC31B4C }, - { 0x1FC31B54u, SCPH1001_func_1FC319EC_cont_BFC31B54 }, - { 0x1FC31B5Cu, SCPH1001_func_1FC319EC_cont_BFC31B5C }, - { 0x1FC31B60u, SCPH1001_func_1FC319EC_cont_BFC31B60 }, - { 0x1FC31B74u, SCPH1001_func_1FC319EC_cont_BFC31B74 }, - { 0x1FC31B78u, SCPH1001_func_1FC319EC_cont_BFC31B78 }, - { 0x1FC31BC0u, SCPH1001_func_1FC319EC_cont_BFC31BC0 }, - { 0x1FC31BCCu, SCPH1001_func_1FC319EC_cont_BFC31BCC }, - { 0x1FC31C18u, SCPH1001_func_1FC319EC_cont_BFC31C18 }, - { 0x1FC31C20u, SCPH1001_func_1FC319EC_cont_BFC31C20 }, - { 0x1FC31C4Cu, SCPH1001_func_1FC319EC_cont_BFC31C4C }, - { 0x1FC31C50u, SCPH1001_func_1FC319EC_cont_BFC31C50 }, - { 0x1FC31C64u, SCPH1001_func_1FC31C64 }, - { 0x1FC31C84u, SCPH1001_func_1FC31C64_cont_BFC31C84 }, - { 0x1FC31C88u, SCPH1001_func_1FC31C64_cont_BFC31C88 }, - { 0x1FC31CB0u, SCPH1001_func_1FC31C64_cont_BFC31CB0 }, - { 0x1FC31CB8u, SCPH1001_func_1FC31C64_cont_BFC31CB8 }, - { 0x1FC31CBCu, SCPH1001_func_1FC31C64_cont_BFC31CBC }, - { 0x1FC31CC4u, SCPH1001_func_1FC31C64_cont_BFC31CC4 }, - { 0x1FC31CCCu, SCPH1001_func_1FC31C64_cont_BFC31CCC }, - { 0x1FC31CD0u, SCPH1001_func_1FC31C64_cont_BFC31CD0 }, - { 0x1FC31CD8u, SCPH1001_func_1FC31C64_cont_BFC31CD8 }, - { 0x1FC31CDCu, SCPH1001_func_1FC31C64_cont_BFC31CDC }, - { 0x1FC31D04u, SCPH1001_func_1FC31C64_cont_BFC31D04 }, - { 0x1FC31D14u, SCPH1001_func_1FC31D14 }, - { 0x1FC31D34u, SCPH1001_func_1FC31D14_cont_BFC31D34 }, - { 0x1FC31D38u, SCPH1001_func_1FC31D14_cont_BFC31D38 }, - { 0x1FC31D60u, SCPH1001_func_1FC31D14_cont_BFC31D60 }, - { 0x1FC31D68u, SCPH1001_func_1FC31D14_cont_BFC31D68 }, - { 0x1FC31D6Cu, SCPH1001_func_1FC31D14_cont_BFC31D6C }, - { 0x1FC31D74u, SCPH1001_func_1FC31D14_cont_BFC31D74 }, - { 0x1FC31D7Cu, SCPH1001_func_1FC31D14_cont_BFC31D7C }, - { 0x1FC31D80u, SCPH1001_func_1FC31D14_cont_BFC31D80 }, - { 0x1FC31D88u, SCPH1001_func_1FC31D14_cont_BFC31D88 }, - { 0x1FC31D8Cu, SCPH1001_func_1FC31D14_cont_BFC31D8C }, - { 0x1FC31DB4u, SCPH1001_func_1FC31D14_cont_BFC31DB4 }, - { 0x1FC31DC4u, SCPH1001_func_1FC31DC4 }, - { 0x1FC31DE4u, SCPH1001_func_1FC31DC4_cont_BFC31DE4 }, - { 0x1FC31DE8u, SCPH1001_func_1FC31DC4_cont_BFC31DE8 }, - { 0x1FC31E10u, SCPH1001_func_1FC31DC4_cont_BFC31E10 }, - { 0x1FC31E18u, SCPH1001_func_1FC31DC4_cont_BFC31E18 }, - { 0x1FC31E1Cu, SCPH1001_func_1FC31DC4_cont_BFC31E1C }, - { 0x1FC31E24u, SCPH1001_func_1FC31DC4_cont_BFC31E24 }, - { 0x1FC31E2Cu, SCPH1001_func_1FC31DC4_cont_BFC31E2C }, - { 0x1FC31E30u, SCPH1001_func_1FC31DC4_cont_BFC31E30 }, - { 0x1FC31E38u, SCPH1001_func_1FC31DC4_cont_BFC31E38 }, - { 0x1FC31E3Cu, SCPH1001_func_1FC31DC4_cont_BFC31E3C }, - { 0x1FC31E64u, SCPH1001_func_1FC31DC4_cont_BFC31E64 }, - { 0x1FC31E74u, SCPH1001_func_1FC31E74 }, - { 0x1FC31E94u, SCPH1001_func_1FC31E74_cont_BFC31E94 }, - { 0x1FC31E98u, SCPH1001_func_1FC31E74_cont_BFC31E98 }, - { 0x1FC31EC0u, SCPH1001_func_1FC31E74_cont_BFC31EC0 }, - { 0x1FC31EC8u, SCPH1001_func_1FC31E74_cont_BFC31EC8 }, - { 0x1FC31ECCu, SCPH1001_func_1FC31E74_cont_BFC31ECC }, - { 0x1FC31ED4u, SCPH1001_func_1FC31E74_cont_BFC31ED4 }, - { 0x1FC31EDCu, SCPH1001_func_1FC31E74_cont_BFC31EDC }, - { 0x1FC31EE0u, SCPH1001_func_1FC31E74_cont_BFC31EE0 }, - { 0x1FC31EE8u, SCPH1001_func_1FC31E74_cont_BFC31EE8 }, - { 0x1FC31EECu, SCPH1001_func_1FC31E74_cont_BFC31EEC }, - { 0x1FC31F14u, SCPH1001_func_1FC31E74_cont_BFC31F14 }, - { 0x1FC32010u, SCPH1001_func_1FC32010 }, - { 0x1FC32024u, SCPH1001_func_1FC32010_cont_BFC32024 }, - { 0x1FC32038u, SCPH1001_func_1FC32010_cont_BFC32038 }, - { 0x1FC32040u, SCPH1001_func_1FC32040 }, - { 0x1FC32054u, SCPH1001_func_1FC32040_cont_BFC32054 }, - { 0x1FC32070u, SCPH1001_func_1FC32040_cont_BFC32070 }, - { 0x1FC32078u, SCPH1001_func_1FC32078 }, - { 0x1FC32090u, SCPH1001_func_1FC32078_cont_BFC32090 }, - { 0x1FC320ACu, SCPH1001_func_1FC32078_cont_BFC320AC }, - { 0x1FC320B4u, SCPH1001_func_1FC320B4 }, - { 0x1FC320D0u, SCPH1001_func_1FC320B4_cont_BFC320D0 }, - { 0x1FC320F8u, SCPH1001_func_1FC320B4_cont_BFC320F8 }, - { 0x1FC32100u, SCPH1001_func_1FC32100 }, - { 0x1FC32114u, SCPH1001_func_1FC32100_cont_BFC32114 }, - { 0x1FC3211Cu, SCPH1001_func_1FC32100_cont_BFC3211C }, - { 0x1FC32130u, SCPH1001_func_1FC32100_cont_BFC32130 }, - { 0x1FC32144u, SCPH1001_func_1FC32100_cont_BFC32144 }, - { 0x1FC3214Cu, SCPH1001_func_1FC32100_cont_BFC3214C }, - { 0x1FC321CCu, SCPH1001_func_1FC32100_cont_BFC321CC }, - { 0x1FC321D0u, SCPH1001_func_1FC32100_cont_BFC321D0 }, - { 0x1FC321D8u, SCPH1001_func_1FC32100_cont_BFC321D8 }, - { 0x1FC321DCu, SCPH1001_func_1FC32100_cont_BFC321DC }, - { 0x1FC321E4u, SCPH1001_func_1FC32100_cont_BFC321E4 }, - { 0x1FC321E8u, SCPH1001_func_1FC32100_cont_BFC321E8 }, - { 0x1FC321F0u, SCPH1001_func_1FC321F0 }, - { 0x1FC32208u, SCPH1001_func_1FC321F0_cont_BFC32208 }, - { 0x1FC32210u, SCPH1001_func_1FC321F0_cont_BFC32210 }, - { 0x1FC32224u, SCPH1001_func_1FC321F0_cont_BFC32224 }, - { 0x1FC32238u, SCPH1001_func_1FC321F0_cont_BFC32238 }, - { 0x1FC322C0u, SCPH1001_func_1FC321F0_cont_BFC322C0 }, - { 0x1FC322C4u, SCPH1001_func_1FC321F0_cont_BFC322C4 }, - { 0x1FC322CCu, SCPH1001_func_1FC321F0_cont_BFC322CC }, - { 0x1FC322D0u, SCPH1001_func_1FC321F0_cont_BFC322D0 }, - { 0x1FC322D8u, SCPH1001_func_1FC321F0_cont_BFC322D8 }, - { 0x1FC322DCu, SCPH1001_func_1FC321F0_cont_BFC322DC }, - { 0x1FC322E4u, SCPH1001_func_1FC322E4 }, - { 0x1FC32324u, SCPH1001_func_1FC322E4_cont_BFC32324 }, - { 0x1FC32348u, SCPH1001_func_1FC322E4_cont_BFC32348 }, - { 0x1FC32354u, SCPH1001_func_1FC322E4_cont_BFC32354 }, - { 0x1FC32368u, SCPH1001_func_1FC32368 }, - { 0x1FC3239Cu, SCPH1001_func_1FC32368_cont_BFC3239C }, - { 0x1FC323A0u, SCPH1001_func_1FC32368_cont_BFC323A0 }, - { 0x1FC323A8u, SCPH1001_func_1FC32368_cont_BFC323A8 }, - { 0x1FC323ACu, SCPH1001_func_1FC32368_cont_BFC323AC }, - { 0x1FC323B8u, SCPH1001_func_1FC32368_cont_BFC323B8 }, - { 0x1FC323C0u, SCPH1001_func_1FC32368_cont_BFC323C0 }, - { 0x1FC323C4u, SCPH1001_func_1FC32368_cont_BFC323C4 }, - { 0x1FC323CCu, SCPH1001_func_1FC32368_cont_BFC323CC }, - { 0x1FC323D4u, SCPH1001_func_1FC32368_cont_BFC323D4 }, - { 0x1FC323D8u, SCPH1001_func_1FC32368_cont_BFC323D8 }, - { 0x1FC323ECu, SCPH1001_func_1FC32368_cont_BFC323EC }, - { 0x1FC323F0u, SCPH1001_func_1FC32368_cont_BFC323F0 }, - { 0x1FC323FCu, SCPH1001_func_1FC32368_cont_BFC323FC }, - { 0x1FC32404u, SCPH1001_func_1FC32368_cont_BFC32404 }, - { 0x1FC32408u, SCPH1001_func_1FC32368_cont_BFC32408 }, - { 0x1FC32410u, SCPH1001_func_1FC32410 }, - { 0x1FC32434u, SCPH1001_func_1FC32410_cont_BFC32434 }, - { 0x1FC32450u, SCPH1001_func_1FC32450 }, - { 0x1FC32490u, SCPH1001_func_1FC32450_cont_BFC32490 }, - { 0x1FC324A4u, SCPH1001_func_1FC32450_cont_BFC324A4 }, - { 0x1FC324ACu, SCPH1001_func_1FC32450_cont_BFC324AC }, - { 0x1FC324C8u, SCPH1001_func_1FC32450_cont_BFC324C8 }, - { 0x1FC324D0u, SCPH1001_func_1FC32450_cont_BFC324D0 }, - { 0x1FC324F8u, SCPH1001_func_1FC32450_cont_BFC324F8 }, - { 0x1FC32514u, SCPH1001_func_1FC32450_cont_BFC32514 }, - { 0x1FC3251Cu, SCPH1001_func_1FC32450_cont_BFC3251C }, - { 0x1FC32534u, SCPH1001_func_1FC32450_cont_BFC32534 }, - { 0x1FC32540u, SCPH1001_func_1FC32450_cont_BFC32540 }, - { 0x1FC32548u, SCPH1001_func_1FC32450_cont_BFC32548 }, - { 0x1FC3255Cu, SCPH1001_func_1FC3255C }, - { 0x1FC3258Cu, SCPH1001_func_1FC3255C_cont_BFC3258C }, - { 0x1FC325A8u, SCPH1001_func_1FC3255C_cont_BFC325A8 }, - { 0x1FC325B0u, SCPH1001_func_1FC3255C_cont_BFC325B0 }, - { 0x1FC325C8u, SCPH1001_func_1FC3255C_cont_BFC325C8 }, - { 0x1FC325E4u, SCPH1001_func_1FC3255C_cont_BFC325E4 }, - { 0x1FC325ECu, SCPH1001_func_1FC3255C_cont_BFC325EC }, - { 0x1FC32604u, SCPH1001_func_1FC3255C_cont_BFC32604 }, - { 0x1FC3260Cu, SCPH1001_func_1FC3255C_cont_BFC3260C }, - { 0x1FC32624u, SCPH1001_func_1FC3255C_cont_BFC32624 }, - { 0x1FC3262Cu, SCPH1001_func_1FC3255C_cont_BFC3262C }, - { 0x1FC32644u, SCPH1001_func_1FC3255C_cont_BFC32644 }, - { 0x1FC3264Cu, SCPH1001_func_1FC3255C_cont_BFC3264C }, - { 0x1FC3265Cu, SCPH1001_func_1FC3255C_cont_BFC3265C }, - { 0x1FC32660u, SCPH1001_func_1FC3255C_cont_BFC32660 }, - { 0x1FC3266Cu, SCPH1001_func_1FC3255C_cont_BFC3266C }, - { 0x1FC32674u, SCPH1001_func_1FC3255C_cont_BFC32674 }, - { 0x1FC3267Cu, SCPH1001_func_1FC3255C_cont_BFC3267C }, - { 0x1FC3268Cu, SCPH1001_func_1FC3255C_cont_BFC3268C }, - { 0x1FC32690u, SCPH1001_func_1FC3255C_cont_BFC32690 }, - { 0x1FC3269Cu, SCPH1001_func_1FC3255C_cont_BFC3269C }, - { 0x1FC326C0u, SCPH1001_func_1FC3255C_cont_BFC326C0 }, - { 0x1FC326D0u, SCPH1001_func_1FC3255C_cont_BFC326D0 }, - { 0x1FC326E8u, SCPH1001_func_1FC3255C_cont_BFC326E8 }, - { 0x1FC326F0u, SCPH1001_func_1FC3255C_cont_BFC326F0 }, - { 0x1FC326F8u, SCPH1001_func_1FC3255C_cont_BFC326F8 }, - { 0x1FC32710u, SCPH1001_func_1FC32710 }, - { 0x1FC32724u, SCPH1001_func_1FC32724 }, - { 0x1FC32758u, SCPH1001_func_1FC32724_cont_BFC32758 }, - { 0x1FC32764u, SCPH1001_func_1FC32724_cont_BFC32764 }, - { 0x1FC3278Cu, SCPH1001_func_1FC32724_cont_BFC3278C }, - { 0x1FC327C4u, SCPH1001_func_1FC32724_cont_BFC327C4 }, - { 0x1FC327CCu, SCPH1001_func_1FC32724_cont_BFC327CC }, - { 0x1FC327E0u, SCPH1001_func_1FC32724_cont_BFC327E0 }, - { 0x1FC327F4u, SCPH1001_func_1FC32724_cont_BFC327F4 }, - { 0x1FC327F8u, SCPH1001_func_1FC32724_cont_BFC327F8 }, - { 0x1FC32800u, SCPH1001_func_1FC32724_cont_BFC32800 }, - { 0x1FC32808u, SCPH1001_func_1FC32724_cont_BFC32808 }, - { 0x1FC32820u, SCPH1001_func_1FC32820 }, - { 0x1FC3285Cu, SCPH1001_func_1FC32820_cont_BFC3285C }, - { 0x1FC3286Cu, SCPH1001_func_1FC32820_cont_BFC3286C }, - { 0x1FC32874u, SCPH1001_func_1FC32820_cont_BFC32874 }, - { 0x1FC328BCu, SCPH1001_func_1FC32820_cont_BFC328BC }, - { 0x1FC328C0u, SCPH1001_func_1FC32820_cont_BFC328C0 }, - { 0x1FC328CCu, SCPH1001_func_1FC32820_cont_BFC328CC }, - { 0x1FC328F4u, SCPH1001_func_1FC328F4 }, - { 0x1FC3291Cu, SCPH1001_func_1FC328F4_cont_BFC3291C }, - { 0x1FC32934u, SCPH1001_func_1FC328F4_cont_BFC32934 }, - { 0x1FC32944u, SCPH1001_func_1FC32944 }, - { 0x1FC3294Cu, SCPH1001_func_1FC32944_cont_BFC3294C }, - { 0x1FC3296Cu, SCPH1001_func_1FC32944_cont_BFC3296C }, - { 0x1FC32988u, SCPH1001_func_1FC32944_cont_BFC32988 }, - { 0x1FC329A8u, SCPH1001_func_1FC32944_cont_BFC329A8 }, - { 0x1FC329B0u, SCPH1001_func_1FC32944_cont_BFC329B0 }, - { 0x1FC329B8u, SCPH1001_func_1FC32944_cont_BFC329B8 }, - { 0x1FC329C0u, SCPH1001_func_1FC32944_cont_BFC329C0 }, - { 0x1FC329F0u, SCPH1001_func_1FC329F0 }, - { 0x1FC32A44u, SCPH1001_func_1FC329F0_cont_BFC32A44 }, - { 0x1FC32A48u, SCPH1001_func_1FC329F0_cont_BFC32A48 }, - { 0x1FC32A50u, SCPH1001_func_1FC329F0_cont_BFC32A50 }, - { 0x1FC32A5Cu, SCPH1001_func_1FC329F0_cont_BFC32A5C }, - { 0x1FC32A6Cu, SCPH1001_func_1FC329F0_cont_BFC32A6C }, - { 0x1FC32AA4u, SCPH1001_func_1FC329F0_cont_BFC32AA4 }, - { 0x1FC32AA8u, SCPH1001_func_1FC329F0_cont_BFC32AA8 }, - { 0x1FC32AB8u, SCPH1001_func_1FC329F0_cont_BFC32AB8 }, - { 0x1FC32ABCu, SCPH1001_func_1FC329F0_cont_BFC32ABC }, - { 0x1FC32AC4u, SCPH1001_func_1FC329F0_cont_BFC32AC4 }, - { 0x1FC32AECu, SCPH1001_func_1FC329F0_cont_BFC32AEC }, - { 0x1FC32AF0u, SCPH1001_func_1FC329F0_cont_BFC32AF0 }, - { 0x1FC32AF4u, SCPH1001_func_1FC329F0_cont_BFC32AF4 }, - { 0x1FC32B0Cu, SCPH1001_func_1FC329F0_cont_BFC32B0C }, - { 0x1FC32B18u, SCPH1001_func_1FC329F0_cont_BFC32B18 }, - { 0x1FC32B1Cu, SCPH1001_func_1FC329F0_cont_BFC32B1C }, - { 0x1FC32C30u, SCPH1001_func_1FC329F0_cont_BFC32C30 }, - { 0x1FC32C50u, SCPH1001_func_1FC329F0_cont_BFC32C50 }, - { 0x1FC32C90u, SCPH1001_func_1FC329F0_cont_BFC32C90 }, - { 0x1FC32C9Cu, SCPH1001_func_1FC329F0_cont_BFC32C9C }, - { 0x1FC32CCCu, SCPH1001_func_1FC32CCC }, - { 0x1FC32D0Cu, SCPH1001_func_1FC32CCC_cont_BFC32D0C }, - { 0x1FC32D18u, SCPH1001_func_1FC32CCC_cont_BFC32D18 }, - { 0x1FC32D20u, SCPH1001_func_1FC32CCC_cont_BFC32D20 }, - { 0x1FC32D3Cu, SCPH1001_func_1FC32CCC_cont_BFC32D3C }, - { 0x1FC32D44u, SCPH1001_func_1FC32CCC_cont_BFC32D44 }, - { 0x1FC32D54u, SCPH1001_func_1FC32CCC_cont_BFC32D54 }, - { 0x1FC32D58u, SCPH1001_func_1FC32CCC_cont_BFC32D58 }, - { 0x1FC32D64u, SCPH1001_func_1FC32CCC_cont_BFC32D64 }, - { 0x1FC32D6Cu, SCPH1001_func_1FC32CCC_cont_BFC32D6C }, - { 0x1FC32D70u, SCPH1001_func_1FC32CCC_cont_BFC32D70 }, - { 0x1FC32D78u, SCPH1001_func_1FC32CCC_cont_BFC32D78 }, - { 0x1FC32D80u, SCPH1001_func_1FC32CCC_cont_BFC32D80 }, - { 0x1FC32D94u, SCPH1001_func_1FC32CCC_cont_BFC32D94 }, - { 0x1FC32D98u, SCPH1001_func_1FC32CCC_cont_BFC32D98 }, - { 0x1FC32DA4u, SCPH1001_func_1FC32CCC_cont_BFC32DA4 }, - { 0x1FC32DACu, SCPH1001_func_1FC32CCC_cont_BFC32DAC }, - { 0x1FC32DB0u, SCPH1001_func_1FC32CCC_cont_BFC32DB0 }, - { 0x1FC32DB8u, SCPH1001_func_1FC32CCC_cont_BFC32DB8 }, - { 0x1FC32DC0u, SCPH1001_func_1FC32CCC_cont_BFC32DC0 }, - { 0x1FC32DD0u, SCPH1001_func_1FC32CCC_cont_BFC32DD0 }, - { 0x1FC32DD4u, SCPH1001_func_1FC32CCC_cont_BFC32DD4 }, - { 0x1FC32DE0u, SCPH1001_func_1FC32CCC_cont_BFC32DE0 }, - { 0x1FC32DE8u, SCPH1001_func_1FC32CCC_cont_BFC32DE8 }, - { 0x1FC32DECu, SCPH1001_func_1FC32CCC_cont_BFC32DEC }, - { 0x1FC32DF4u, SCPH1001_func_1FC32CCC_cont_BFC32DF4 }, - { 0x1FC32E04u, SCPH1001_func_1FC32CCC_cont_BFC32E04 }, - { 0x1FC32E08u, SCPH1001_func_1FC32CCC_cont_BFC32E08 }, - { 0x1FC32E14u, SCPH1001_func_1FC32CCC_cont_BFC32E14 }, - { 0x1FC32E1Cu, SCPH1001_func_1FC32CCC_cont_BFC32E1C }, - { 0x1FC32E20u, SCPH1001_func_1FC32CCC_cont_BFC32E20 }, - { 0x1FC32E28u, SCPH1001_func_1FC32CCC_cont_BFC32E28 }, - { 0x1FC32E30u, SCPH1001_func_1FC32CCC_cont_BFC32E30 }, - { 0x1FC32E44u, SCPH1001_func_1FC32CCC_cont_BFC32E44 }, - { 0x1FC32E48u, SCPH1001_func_1FC32CCC_cont_BFC32E48 }, - { 0x1FC32E54u, SCPH1001_func_1FC32CCC_cont_BFC32E54 }, - { 0x1FC32E5Cu, SCPH1001_func_1FC32CCC_cont_BFC32E5C }, - { 0x1FC32E60u, SCPH1001_func_1FC32CCC_cont_BFC32E60 }, - { 0x1FC32E68u, SCPH1001_func_1FC32CCC_cont_BFC32E68 }, - { 0x1FC32E70u, SCPH1001_func_1FC32CCC_cont_BFC32E70 }, - { 0x1FC32E80u, SCPH1001_func_1FC32CCC_cont_BFC32E80 }, - { 0x1FC32E84u, SCPH1001_func_1FC32CCC_cont_BFC32E84 }, - { 0x1FC32E90u, SCPH1001_func_1FC32CCC_cont_BFC32E90 }, - { 0x1FC32E98u, SCPH1001_func_1FC32CCC_cont_BFC32E98 }, - { 0x1FC32E9Cu, SCPH1001_func_1FC32CCC_cont_BFC32E9C }, - { 0x1FC32EA0u, SCPH1001_func_1FC32CCC_cont_BFC32EA0 }, - { 0x1FC32EB0u, SCPH1001_func_1FC32CCC_cont_BFC32EB0 }, - { 0x1FC32EBCu, SCPH1001_func_1FC32CCC_cont_BFC32EBC }, - { 0x1FC32ECCu, SCPH1001_func_1FC32CCC_cont_BFC32ECC }, - { 0x1FC32ED4u, SCPH1001_func_1FC32CCC_cont_BFC32ED4 }, - { 0x1FC32F0Cu, SCPH1001_func_1FC32CCC_cont_BFC32F0C }, - { 0x1FC32F10u, SCPH1001_func_1FC32CCC_cont_BFC32F10 }, - { 0x1FC32F1Cu, SCPH1001_func_1FC32CCC_cont_BFC32F1C }, - { 0x1FC32F20u, SCPH1001_func_1FC32CCC_cont_BFC32F20 }, - { 0x1FC32F2Cu, SCPH1001_func_1FC32CCC_cont_BFC32F2C }, - { 0x1FC32F30u, SCPH1001_func_1FC32CCC_cont_BFC32F30 }, - { 0x1FC32F3Cu, SCPH1001_func_1FC32CCC_cont_BFC32F3C }, - { 0x1FC32F40u, SCPH1001_func_1FC32CCC_cont_BFC32F40 }, - { 0x1FC32F44u, SCPH1001_func_1FC32CCC_cont_BFC32F44 }, - { 0x1FC32F4Cu, SCPH1001_func_1FC32CCC_cont_BFC32F4C }, - { 0x1FC32F5Cu, SCPH1001_func_1FC32CCC_cont_BFC32F5C }, - { 0x1FC32F60u, SCPH1001_func_1FC32CCC_cont_BFC32F60 }, - { 0x1FC32F6Cu, SCPH1001_func_1FC32CCC_cont_BFC32F6C }, - { 0x1FC32F74u, SCPH1001_func_1FC32CCC_cont_BFC32F74 }, - { 0x1FC32F78u, SCPH1001_func_1FC32CCC_cont_BFC32F78 }, - { 0x1FC32F80u, SCPH1001_func_1FC32CCC_cont_BFC32F80 }, - { 0x1FC32F88u, SCPH1001_func_1FC32CCC_cont_BFC32F88 }, - { 0x1FC32F9Cu, SCPH1001_func_1FC32CCC_cont_BFC32F9C }, - { 0x1FC32FA0u, SCPH1001_func_1FC32CCC_cont_BFC32FA0 }, - { 0x1FC32FACu, SCPH1001_func_1FC32CCC_cont_BFC32FAC }, - { 0x1FC32FB4u, SCPH1001_func_1FC32CCC_cont_BFC32FB4 }, - { 0x1FC32FB8u, SCPH1001_func_1FC32CCC_cont_BFC32FB8 }, - { 0x1FC32FC0u, SCPH1001_func_1FC32CCC_cont_BFC32FC0 }, - { 0x1FC32FC8u, SCPH1001_func_1FC32CCC_cont_BFC32FC8 }, - { 0x1FC32FD8u, SCPH1001_func_1FC32CCC_cont_BFC32FD8 }, - { 0x1FC32FDCu, SCPH1001_func_1FC32CCC_cont_BFC32FDC }, - { 0x1FC32FE8u, SCPH1001_func_1FC32CCC_cont_BFC32FE8 }, - { 0x1FC32FF0u, SCPH1001_func_1FC32CCC_cont_BFC32FF0 }, - { 0x1FC32FF4u, SCPH1001_func_1FC32CCC_cont_BFC32FF4 }, - { 0x1FC32FFCu, SCPH1001_func_1FC32CCC_cont_BFC32FFC }, - { 0x1FC3300Cu, SCPH1001_func_1FC32CCC_cont_BFC3300C }, - { 0x1FC33010u, SCPH1001_func_1FC32CCC_cont_BFC33010 }, - { 0x1FC3301Cu, SCPH1001_func_1FC32CCC_cont_BFC3301C }, - { 0x1FC33024u, SCPH1001_func_1FC32CCC_cont_BFC33024 }, - { 0x1FC33028u, SCPH1001_func_1FC32CCC_cont_BFC33028 }, - { 0x1FC33030u, SCPH1001_func_1FC32CCC_cont_BFC33030 }, - { 0x1FC33038u, SCPH1001_func_1FC32CCC_cont_BFC33038 }, - { 0x1FC3304Cu, SCPH1001_func_1FC32CCC_cont_BFC3304C }, - { 0x1FC33050u, SCPH1001_func_1FC32CCC_cont_BFC33050 }, - { 0x1FC3305Cu, SCPH1001_func_1FC32CCC_cont_BFC3305C }, - { 0x1FC33064u, SCPH1001_func_1FC32CCC_cont_BFC33064 }, - { 0x1FC33068u, SCPH1001_func_1FC32CCC_cont_BFC33068 }, - { 0x1FC33070u, SCPH1001_func_1FC32CCC_cont_BFC33070 }, - { 0x1FC33078u, SCPH1001_func_1FC32CCC_cont_BFC33078 }, - { 0x1FC33088u, SCPH1001_func_1FC32CCC_cont_BFC33088 }, - { 0x1FC3308Cu, SCPH1001_func_1FC32CCC_cont_BFC3308C }, - { 0x1FC33098u, SCPH1001_func_1FC32CCC_cont_BFC33098 }, - { 0x1FC330A0u, SCPH1001_func_1FC32CCC_cont_BFC330A0 }, - { 0x1FC330A4u, SCPH1001_func_1FC32CCC_cont_BFC330A4 }, - { 0x1FC330A8u, SCPH1001_func_1FC32CCC_cont_BFC330A8 }, - { 0x1FC330B8u, SCPH1001_func_1FC32CCC_cont_BFC330B8 }, - { 0x1FC330C4u, SCPH1001_func_1FC32CCC_cont_BFC330C4 }, - { 0x1FC330D8u, SCPH1001_func_1FC32CCC_cont_BFC330D8 }, - { 0x1FC330E4u, SCPH1001_func_1FC32CCC_cont_BFC330E4 }, - { 0x1FC330F0u, SCPH1001_func_1FC32CCC_cont_BFC330F0 }, - { 0x1FC33104u, SCPH1001_func_1FC32CCC_cont_BFC33104 }, - { 0x1FC33114u, SCPH1001_func_1FC32CCC_cont_BFC33114 }, - { 0x1FC3311Cu, SCPH1001_func_1FC32CCC_cont_BFC3311C }, - { 0x1FC33138u, SCPH1001_func_1FC33138 }, - { 0x1FC33148u, SCPH1001_func_1FC33138_cont_BFC33148 }, - { 0x1FC331A0u, SCPH1001_func_1FC331A0 }, - { 0x1FC331E8u, SCPH1001_func_1FC331A0_cont_BFC331E8 }, - { 0x1FC331F0u, SCPH1001_func_1FC331A0_cont_BFC331F0 }, - { 0x1FC331F4u, SCPH1001_func_1FC331A0_cont_BFC331F4 }, - { 0x1FC33208u, SCPH1001_func_1FC331A0_cont_BFC33208 }, - { 0x1FC33210u, SCPH1001_func_1FC331A0_cont_BFC33210 }, - { 0x1FC33214u, SCPH1001_func_1FC331A0_cont_BFC33214 }, - { 0x1FC33220u, SCPH1001_func_1FC331A0_cont_BFC33220 }, - { 0x1FC33228u, SCPH1001_func_1FC331A0_cont_BFC33228 }, - { 0x1FC3322Cu, SCPH1001_func_1FC331A0_cont_BFC3322C }, - { 0x1FC33238u, SCPH1001_func_1FC331A0_cont_BFC33238 }, - { 0x1FC33240u, SCPH1001_func_1FC331A0_cont_BFC33240 }, - { 0x1FC33244u, SCPH1001_func_1FC331A0_cont_BFC33244 }, - { 0x1FC33250u, SCPH1001_func_1FC331A0_cont_BFC33250 }, - { 0x1FC3325Cu, SCPH1001_func_1FC331A0_cont_BFC3325C }, - { 0x1FC33268u, SCPH1001_func_1FC331A0_cont_BFC33268 }, - { 0x1FC3327Cu, SCPH1001_func_1FC331A0_cont_BFC3327C }, - { 0x1FC3328Cu, SCPH1001_func_1FC331A0_cont_BFC3328C }, - { 0x1FC3329Cu, SCPH1001_func_1FC331A0_cont_BFC3329C }, - { 0x1FC332B4u, SCPH1001_func_1FC331A0_cont_BFC332B4 }, - { 0x1FC332C0u, SCPH1001_func_1FC331A0_cont_BFC332C0 }, - { 0x1FC332C4u, SCPH1001_func_1FC331A0_cont_BFC332C4 }, - { 0x1FC332CCu, SCPH1001_func_1FC331A0_cont_BFC332CC }, - { 0x1FC332D8u, SCPH1001_func_1FC331A0_cont_BFC332D8 }, - { 0x1FC332ECu, SCPH1001_func_1FC331A0_cont_BFC332EC }, - { 0x1FC332FCu, SCPH1001_func_1FC331A0_cont_BFC332FC }, - { 0x1FC3330Cu, SCPH1001_func_1FC331A0_cont_BFC3330C }, - { 0x1FC33324u, SCPH1001_func_1FC331A0_cont_BFC33324 }, - { 0x1FC3332Cu, SCPH1001_func_1FC331A0_cont_BFC3332C }, - { 0x1FC33330u, SCPH1001_func_1FC331A0_cont_BFC33330 }, - { 0x1FC33358u, SCPH1001_func_1FC33358 }, - { 0x1FC33398u, SCPH1001_func_1FC33358_cont_BFC33398 }, - { 0x1FC333BCu, SCPH1001_func_1FC33358_cont_BFC333BC }, - { 0x1FC333E0u, SCPH1001_func_1FC33358_cont_BFC333E0 }, - { 0x1FC33400u, SCPH1001_func_1FC33400 }, - { 0x1FC33438u, SCPH1001_func_1FC33400_cont_BFC33438 }, - { 0x1FC33460u, SCPH1001_func_1FC33400_cont_BFC33460 }, - { 0x1FC33468u, SCPH1001_func_1FC33400_cont_BFC33468 }, - { 0x1FC33478u, SCPH1001_func_1FC33400_cont_BFC33478 }, - { 0x1FC3347Cu, SCPH1001_func_1FC33400_cont_BFC3347C }, - { 0x1FC3348Cu, SCPH1001_func_1FC33400_cont_BFC3348C }, - { 0x1FC3349Cu, SCPH1001_func_1FC33400_cont_BFC3349C }, - { 0x1FC334ACu, SCPH1001_func_1FC33400_cont_BFC334AC }, - { 0x1FC334BCu, SCPH1001_func_1FC33400_cont_BFC334BC }, - { 0x1FC334C4u, SCPH1001_func_1FC33400_cont_BFC334C4 }, - { 0x1FC334CCu, SCPH1001_func_1FC33400_cont_BFC334CC }, - { 0x1FC334D0u, SCPH1001_func_1FC33400_cont_BFC334D0 }, - { 0x1FC334E0u, SCPH1001_func_1FC33400_cont_BFC334E0 }, - { 0x1FC334F0u, SCPH1001_func_1FC33400_cont_BFC334F0 }, - { 0x1FC33504u, SCPH1001_func_1FC33400_cont_BFC33504 }, - { 0x1FC33528u, SCPH1001_func_1FC33400_cont_BFC33528 }, - { 0x1FC33538u, SCPH1001_func_1FC33538 }, - { 0x1FC3356Cu, SCPH1001_func_1FC33538_cont_BFC3356C }, - { 0x1FC33574u, SCPH1001_func_1FC33538_cont_BFC33574 }, - { 0x1FC33580u, SCPH1001_func_1FC33538_cont_BFC33580 }, - { 0x1FC33588u, SCPH1001_func_1FC33538_cont_BFC33588 }, - { 0x1FC33594u, SCPH1001_func_1FC33538_cont_BFC33594 }, - { 0x1FC3359Cu, SCPH1001_func_1FC33538_cont_BFC3359C }, - { 0x1FC335A8u, SCPH1001_func_1FC33538_cont_BFC335A8 }, - { 0x1FC335B0u, SCPH1001_func_1FC33538_cont_BFC335B0 }, - { 0x1FC335BCu, SCPH1001_func_1FC33538_cont_BFC335BC }, - { 0x1FC335C0u, SCPH1001_func_1FC33538_cont_BFC335C0 }, - { 0x1FC335CCu, SCPH1001_func_1FC33538_cont_BFC335CC }, - { 0x1FC335D4u, SCPH1001_func_1FC33538_cont_BFC335D4 }, - { 0x1FC335E0u, SCPH1001_func_1FC33538_cont_BFC335E0 }, - { 0x1FC335E4u, SCPH1001_func_1FC33538_cont_BFC335E4 }, - { 0x1FC335F8u, SCPH1001_func_1FC33538_cont_BFC335F8 }, - { 0x1FC33600u, SCPH1001_func_1FC33538_cont_BFC33600 }, - { 0x1FC3360Cu, SCPH1001_func_1FC33538_cont_BFC3360C }, - { 0x1FC33614u, SCPH1001_func_1FC33538_cont_BFC33614 }, - { 0x1FC33620u, SCPH1001_func_1FC33538_cont_BFC33620 }, - { 0x1FC33628u, SCPH1001_func_1FC33538_cont_BFC33628 }, - { 0x1FC33634u, SCPH1001_func_1FC33538_cont_BFC33634 }, - { 0x1FC33638u, SCPH1001_func_1FC33538_cont_BFC33638 }, - { 0x1FC33644u, SCPH1001_func_1FC33538_cont_BFC33644 }, - { 0x1FC3364Cu, SCPH1001_func_1FC33538_cont_BFC3364C }, - { 0x1FC3365Cu, SCPH1001_func_1FC33538_cont_BFC3365C }, - { 0x1FC33660u, SCPH1001_func_1FC33538_cont_BFC33660 }, - { 0x1FC33674u, SCPH1001_func_1FC33538_cont_BFC33674 }, - { 0x1FC3367Cu, SCPH1001_func_1FC33538_cont_BFC3367C }, - { 0x1FC33684u, SCPH1001_func_1FC33538_cont_BFC33684 }, - { 0x1FC3368Cu, SCPH1001_func_1FC33538_cont_BFC3368C }, - { 0x1FC33698u, SCPH1001_func_1FC33538_cont_BFC33698 }, - { 0x1FC3369Cu, SCPH1001_func_1FC33538_cont_BFC3369C }, - { 0x1FC336A8u, SCPH1001_func_1FC33538_cont_BFC336A8 }, - { 0x1FC336ACu, SCPH1001_func_1FC33538_cont_BFC336AC }, - { 0x1FC336BCu, SCPH1001_func_1FC33538_cont_BFC336BC }, - { 0x1FC336C4u, SCPH1001_func_1FC33538_cont_BFC336C4 }, - { 0x1FC336D0u, SCPH1001_func_1FC33538_cont_BFC336D0 }, - { 0x1FC336D4u, SCPH1001_func_1FC33538_cont_BFC336D4 }, - { 0x1FC336E0u, SCPH1001_func_1FC33538_cont_BFC336E0 }, - { 0x1FC336E4u, SCPH1001_func_1FC33538_cont_BFC336E4 }, - { 0x1FC336F0u, SCPH1001_func_1FC336F0 }, - { 0x1FC33758u, SCPH1001_func_1FC33758 }, - { 0x1FC337ACu, SCPH1001_func_1FC337AC }, - { 0x1FC33800u, SCPH1001_func_1FC33800 }, - { 0x1FC3388Cu, SCPH1001_func_1FC3388C }, - { 0x1FC33918u, SCPH1001_func_1FC33918 }, - { 0x1FC33978u, SCPH1001_func_1FC33978 }, - { 0x1FC339F0u, SCPH1001_func_1FC339F0 }, - { 0x1FC33A58u, SCPH1001_func_1FC339F0_cont_BFC33A58 }, - { 0x1FC33AB8u, SCPH1001_func_1FC33AB8 }, - { 0x1FC33B20u, SCPH1001_func_1FC33AB8_cont_BFC33B20 }, - { 0x1FC33B80u, SCPH1001_func_1FC33B80 }, - { 0x1FC33B9Cu, SCPH1001_func_1FC33B80_cont_BFC33B9C }, - { 0x1FC33BC0u, SCPH1001_func_1FC33B80_cont_BFC33BC0 }, - { 0x1FC33BC8u, SCPH1001_func_1FC33B80_cont_BFC33BC8 }, - { 0x1FC33BCCu, SCPH1001_func_1FC33B80_cont_BFC33BCC }, - { 0x1FC33BD4u, SCPH1001_func_1FC33B80_cont_BFC33BD4 }, - { 0x1FC33BFCu, SCPH1001_func_1FC33B80_cont_BFC33BFC }, - { 0x1FC33C04u, SCPH1001_func_1FC33C04 }, - { 0x1FC33C20u, SCPH1001_func_1FC33C04_cont_BFC33C20 }, - { 0x1FC33C44u, SCPH1001_func_1FC33C04_cont_BFC33C44 }, - { 0x1FC33C4Cu, SCPH1001_func_1FC33C04_cont_BFC33C4C }, - { 0x1FC33C50u, SCPH1001_func_1FC33C04_cont_BFC33C50 }, - { 0x1FC33C58u, SCPH1001_func_1FC33C04_cont_BFC33C58 }, - { 0x1FC33C78u, SCPH1001_func_1FC33C04_cont_BFC33C78 }, - { 0x1FC33C84u, SCPH1001_func_1FC33C84 }, - { 0x1FC33C90u, SCPH1001_func_1FC33C90 }, - { 0x1FC33C98u, SCPH1001_func_1FC33C98 }, - { 0x1FC33CB4u, SCPH1001_func_1FC33C98_cont_BFC33CB4 }, - { 0x1FC33CBCu, SCPH1001_func_1FC33C98_cont_BFC33CBC }, - { 0x1FC33CC0u, SCPH1001_func_1FC33CC0 }, - { 0x1FC33CE0u, SCPH1001_func_1FC33CC0_cont_BFC33CE0 }, - { 0x1FC33CE8u, SCPH1001_func_1FC33CC0_cont_BFC33CE8 }, - { 0x1FC33CECu, SCPH1001_func_1FC33CC0_cont_BFC33CEC }, - { 0x1FC33CF4u, SCPH1001_func_1FC33CC0_cont_BFC33CF4 }, - { 0x1FC33D1Cu, SCPH1001_func_1FC33D1C }, - { 0x1FC33D24u, SCPH1001_func_1FC33D24 }, - { 0x1FC33D30u, SCPH1001_func_1FC33D24_cont_BFC33D30 }, - { 0x1FC33D9Cu, SCPH1001_func_1FC33D24_cont_BFC33D9C }, - { 0x1FC33DA4u, SCPH1001_func_1FC33DA4 }, - { 0x1FC33E20u, SCPH1001_func_1FC33E20 }, - { 0x1FC33E80u, SCPH1001_func_1FC33E80 }, - { 0x1FC33E90u, SCPH1001_func_1FC33E90 }, - { 0x1FC33EA0u, SCPH1001_func_1FC33EA0 }, - { 0x1FC33EC0u, SCPH1001_func_1FC33EC0 }, - { 0x1FC33ECCu, SCPH1001_func_1FC33ECC }, - { 0x1FC33EE0u, SCPH1001_func_1FC33EE0 }, - { 0x1FC33EF4u, SCPH1001_func_1FC33EF4 }, - { 0x1FC33F00u, SCPH1001_func_1FC33F00 }, - { 0x1FC33F20u, SCPH1001_func_1FC33F20 }, - { 0x1FC33F40u, SCPH1001_func_1FC33F40 }, - { 0x1FC33F54u, SCPH1001_func_1FC33F54 }, - { 0x1FC33F6Cu, SCPH1001_func_1FC33F6C }, - { 0x1FC33F80u, SCPH1001_func_1FC33F80 }, - { 0x1FC33F94u, SCPH1001_func_1FC33F94 }, - { 0x1FC33FA8u, SCPH1001_func_1FC33FA8 }, - { 0x1FC33FB4u, SCPH1001_func_1FC33FB4 }, - { 0x1FC33FCCu, SCPH1001_func_1FC33FCC }, - { 0x1FC33FD8u, SCPH1001_func_1FC33FD8 }, - { 0x1FC33FE4u, SCPH1001_func_1FC33FE4 }, - { 0x1FC33FF0u, SCPH1001_func_1FC33FF0 }, - { 0x1FC33FFCu, SCPH1001_func_1FC33FFC }, - { 0x1FC34008u, SCPH1001_func_1FC34008 }, - { 0x1FC3401Cu, SCPH1001_func_1FC3401C }, - { 0x1FC34028u, SCPH1001_func_1FC34028 }, - { 0x1FC3403Cu, SCPH1001_func_1FC3403C }, - { 0x1FC34054u, SCPH1001_func_1FC34054 }, - { 0x1FC34068u, SCPH1001_func_1FC34068 }, - { 0x1FC3407Cu, SCPH1001_func_1FC3407C }, - { 0x1FC34088u, SCPH1001_func_1FC34088 }, - { 0x1FC3409Cu, SCPH1001_func_1FC3409C }, - { 0x1FC340CCu, SCPH1001_func_1FC340CC }, - { 0x1FC340D8u, SCPH1001_func_1FC340D8 }, - { 0x1FC340E4u, SCPH1001_func_1FC340E4 }, - { 0x1FC34104u, SCPH1001_func_1FC34104 }, - { 0x1FC34110u, SCPH1001_func_1FC34110 }, - { 0x1FC34120u, SCPH1001_func_1FC34110_cont_BFC34120 }, - { 0x1FC34130u, SCPH1001_func_1FC34110_cont_BFC34130 }, - { 0x1FC34148u, SCPH1001_func_1FC34110_cont_BFC34148 }, - { 0x1FC34158u, SCPH1001_func_1FC34110_cont_BFC34158 }, - { 0x1FC34160u, SCPH1001_func_1FC34160 }, - { 0x1FC34188u, SCPH1001_func_1FC34160_cont_BFC34188 }, - { 0x1FC34194u, SCPH1001_func_1FC34160_cont_BFC34194 }, - { 0x1FC341A0u, SCPH1001_func_1FC34160_cont_BFC341A0 }, - { 0x1FC341B0u, SCPH1001_func_1FC34160_cont_BFC341B0 }, - { 0x1FC341C4u, SCPH1001_func_1FC34160_cont_BFC341C4 }, - { 0x1FC341DCu, SCPH1001_func_1FC34160_cont_BFC341DC }, - { 0x1FC34304u, SCPH1001_func_1FC34304 }, - { 0x1FC3432Cu, SCPH1001_func_1FC34304_cont_BFC3432C }, - { 0x1FC34338u, SCPH1001_func_1FC34304_cont_BFC34338 }, - { 0x1FC34344u, SCPH1001_func_1FC34304_cont_BFC34344 }, - { 0x1FC34354u, SCPH1001_func_1FC34304_cont_BFC34354 }, - { 0x1FC34368u, SCPH1001_func_1FC34304_cont_BFC34368 }, - { 0x1FC34380u, SCPH1001_func_1FC34304_cont_BFC34380 }, - { 0x1FC344A4u, SCPH1001_func_1FC344A4 }, - { 0x1FC344BCu, SCPH1001_func_1FC344A4_cont_BFC344BC }, - { 0x1FC344D0u, SCPH1001_func_1FC344A4_cont_BFC344D0 }, - { 0x1FC345F4u, SCPH1001_func_1FC345F4 }, - { 0x1FC3460Cu, SCPH1001_func_1FC345F4_cont_BFC3460C }, - { 0x1FC34620u, SCPH1001_func_1FC345F4_cont_BFC34620 }, - { 0x1FC34748u, SCPH1001_func_1FC34748 }, - { 0x1FC34760u, SCPH1001_func_1FC34748_cont_BFC34760 }, - { 0x1FC34774u, SCPH1001_func_1FC34748_cont_BFC34774 }, - { 0x1FC34898u, SCPH1001_func_1FC34898 }, - { 0x1FC348A8u, SCPH1001_func_1FC34898_cont_BFC348A8 }, - { 0x1FC348B4u, SCPH1001_func_1FC34898_cont_BFC348B4 }, - { 0x1FC348BCu, SCPH1001_func_1FC34898_cont_BFC348BC }, - { 0x1FC348C0u, SCPH1001_func_1FC34898_cont_BFC348C0 }, - { 0x1FC348C8u, SCPH1001_func_1FC34898_cont_BFC348C8 }, - { 0x1FC348D0u, SCPH1001_func_1FC34898_cont_BFC348D0 }, - { 0x1FC348D8u, SCPH1001_func_1FC34898_cont_BFC348D8 }, - { 0x1FC348E0u, SCPH1001_func_1FC34898_cont_BFC348E0 }, - { 0x1FC348E4u, SCPH1001_func_1FC34898_cont_BFC348E4 }, - { 0x1FC348ECu, SCPH1001_func_1FC34898_cont_BFC348EC }, - { 0x1FC348FCu, SCPH1001_func_1FC348FC }, - { 0x1FC34904u, SCPH1001_func_1FC348FC_cont_BFC34904 }, - { 0x1FC3490Cu, SCPH1001_func_1FC348FC_cont_BFC3490C }, - { 0x1FC34924u, SCPH1001_func_1FC34924 }, - { 0x1FC34928u, SCPH1001_func_1FC34928 }, - { 0x1FC34930u, SCPH1001_func_1FC34928_cont_BFC34930 }, - { 0x1FC34938u, SCPH1001_func_1FC34928_cont_BFC34938 }, - { 0x1FC34954u, SCPH1001_func_1FC34954 }, - { 0x1FC34958u, SCPH1001_func_1FC34958 }, - { 0x1FC34960u, SCPH1001_func_1FC34958_cont_BFC34960 }, - { 0x1FC34968u, SCPH1001_func_1FC34958_cont_BFC34968 }, - { 0x1FC34980u, SCPH1001_func_1FC34980 }, - { 0x1FC34984u, SCPH1001_func_1FC34984 }, - { 0x1FC3498Cu, SCPH1001_func_1FC34984_cont_BFC3498C }, - { 0x1FC34994u, SCPH1001_func_1FC34984_cont_BFC34994 }, - { 0x1FC349B0u, SCPH1001_func_1FC34984_cont_BFC349B0 }, - { 0x1FC349B8u, SCPH1001_func_1FC349B8 }, - { 0x1FC349C0u, SCPH1001_func_1FC349B8_cont_BFC349C0 }, - { 0x1FC349C4u, SCPH1001_func_1FC349B8_cont_BFC349C4 }, - { 0x1FC349CCu, SCPH1001_func_1FC349B8_cont_BFC349CC }, - { 0x1FC349D4u, SCPH1001_func_1FC349B8_cont_BFC349D4 }, - { 0x1FC349D8u, SCPH1001_func_1FC349B8_cont_BFC349D8 }, - { 0x1FC349E0u, SCPH1001_func_1FC349B8_cont_BFC349E0 }, - { 0x1FC349E8u, SCPH1001_func_1FC349B8_cont_BFC349E8 }, - { 0x1FC34A04u, SCPH1001_func_1FC34A04 }, - { 0x1FC34A08u, SCPH1001_func_1FC34A08 }, - { 0x1FC34A10u, SCPH1001_func_1FC34A08_cont_BFC34A10 }, - { 0x1FC34A18u, SCPH1001_func_1FC34A08_cont_BFC34A18 }, - { 0x1FC34A30u, SCPH1001_func_1FC34A30 }, - { 0x1FC34A34u, SCPH1001_func_1FC34A34 }, - { 0x1FC34A3Cu, SCPH1001_func_1FC34A34_cont_BFC34A3C }, - { 0x1FC34A44u, SCPH1001_func_1FC34A34_cont_BFC34A44 }, - { 0x1FC34A60u, SCPH1001_func_1FC34A60 }, - { 0x1FC34A64u, SCPH1001_func_1FC34A64 }, - { 0x1FC34A6Cu, SCPH1001_func_1FC34A64_cont_BFC34A6C }, - { 0x1FC34A74u, SCPH1001_func_1FC34A64_cont_BFC34A74 }, - { 0x1FC34A88u, SCPH1001_func_1FC34A64_cont_BFC34A88 }, - { 0x1FC34A90u, SCPH1001_func_1FC34A90 }, - { 0x1FC34AA0u, SCPH1001_func_1FC34AA0 }, - { 0x1FC34AB4u, SCPH1001_func_1FC34AA0_cont_BFC34AB4 }, - { 0x1FC34AB8u, SCPH1001_func_1FC34AA0_cont_BFC34AB8 }, - { 0x1FC34AC4u, SCPH1001_func_1FC34AA0_cont_BFC34AC4 }, - { 0x1FC34ACCu, SCPH1001_func_1FC34AA0_cont_BFC34ACC }, - { 0x1FC34AD0u, SCPH1001_func_1FC34AA0_cont_BFC34AD0 }, - { 0x1FC34AD8u, SCPH1001_func_1FC34AA0_cont_BFC34AD8 }, - { 0x1FC34AE0u, SCPH1001_func_1FC34AA0_cont_BFC34AE0 }, - { 0x1FC34AF0u, SCPH1001_func_1FC34AF0 }, - { 0x1FC34B08u, SCPH1001_func_1FC34B08 }, - { 0x1FC34B1Cu, SCPH1001_func_1FC34B08_cont_BFC34B1C }, - { 0x1FC34B20u, SCPH1001_func_1FC34B08_cont_BFC34B20 }, - { 0x1FC34B2Cu, SCPH1001_func_1FC34B08_cont_BFC34B2C }, - { 0x1FC34B34u, SCPH1001_func_1FC34B08_cont_BFC34B34 }, - { 0x1FC34B38u, SCPH1001_func_1FC34B08_cont_BFC34B38 }, - { 0x1FC34B40u, SCPH1001_func_1FC34B08_cont_BFC34B40 }, - { 0x1FC34B48u, SCPH1001_func_1FC34B08_cont_BFC34B48 }, - { 0x1FC34B58u, SCPH1001_func_1FC34B58 }, - { 0x1FC34CC8u, SCPH1001_func_1FC34B58_cont_BFC34CC8 }, - { 0x1FC34CD0u, SCPH1001_func_1FC34B58_cont_BFC34CD0 }, - { 0x1FC34CE0u, SCPH1001_func_1FC34B58_cont_BFC34CE0 }, - { 0x1FC34CE8u, SCPH1001_func_1FC34B58_cont_BFC34CE8 }, - { 0x1FC34CF4u, SCPH1001_func_1FC34B58_cont_BFC34CF4 }, - { 0x1FC34D04u, SCPH1001_func_1FC34B58_cont_BFC34D04 }, - { 0x1FC34D24u, SCPH1001_func_1FC34B58_cont_BFC34D24 }, - { 0x1FC34D2Cu, SCPH1001_func_1FC34B58_cont_BFC34D2C }, - { 0x1FC34D40u, SCPH1001_func_1FC34B58_cont_BFC34D40 }, - { 0x1FC34D54u, SCPH1001_func_1FC34B58_cont_BFC34D54 }, - { 0x1FC34D60u, SCPH1001_func_1FC34B58_cont_BFC34D60 }, - { 0x1FC34D70u, SCPH1001_func_1FC34B58_cont_BFC34D70 }, - { 0x1FC34D80u, SCPH1001_func_1FC34B58_cont_BFC34D80 }, - { 0x1FC34D9Cu, SCPH1001_func_1FC34B58_cont_BFC34D9C }, - { 0x1FC34DC8u, SCPH1001_func_1FC34B58_cont_BFC34DC8 }, - { 0x1FC34DF0u, SCPH1001_func_1FC34B58_cont_BFC34DF0 }, - { 0x1FC34E00u, SCPH1001_func_1FC34E00 }, - { 0x1FC34E18u, SCPH1001_func_1FC34E00_cont_BFC34E18 }, - { 0x1FC34E28u, SCPH1001_func_1FC34E00_cont_BFC34E28 }, - { 0x1FC34E34u, SCPH1001_func_1FC34E00_cont_BFC34E34 }, - { 0x1FC34E58u, SCPH1001_func_1FC34E00_cont_BFC34E58 }, - { 0x1FC34E80u, SCPH1001_func_1FC34E00_cont_BFC34E80 }, - { 0x1FC34E8Cu, SCPH1001_func_1FC34E00_cont_BFC34E8C }, - { 0x1FC34EC0u, SCPH1001_func_1FC34EC0 }, - { 0x1FC34EC4u, SCPH1001_func_1FC34EC4 }, - { 0x1FC34F38u, SCPH1001_func_1FC34EC4_cont_BFC34F38 }, - { 0x1FC34F40u, SCPH1001_func_1FC34EC4_cont_BFC34F40 }, - { 0x1FC34F50u, SCPH1001_func_1FC34EC4_cont_BFC34F50 }, - { 0x1FC34F60u, SCPH1001_func_1FC34EC4_cont_BFC34F60 }, - { 0x1FC34F70u, SCPH1001_func_1FC34EC4_cont_BFC34F70 }, - { 0x1FC34F80u, SCPH1001_func_1FC34EC4_cont_BFC34F80 }, - { 0x1FC34F88u, SCPH1001_func_1FC34EC4_cont_BFC34F88 }, - { 0x1FC34F90u, SCPH1001_func_1FC34EC4_cont_BFC34F90 }, - { 0x1FC34F94u, SCPH1001_func_1FC34EC4_cont_BFC34F94 }, - { 0x1FC34FA0u, SCPH1001_func_1FC34FA0 }, - { 0x1FC35128u, SCPH1001_func_1FC35128 }, - { 0x1FC3524Cu, SCPH1001_func_1FC3524C }, - { 0x1FC35348u, SCPH1001_func_1FC35348 }, - { 0x1FC35470u, SCPH1001_func_1FC35470 }, - { 0x1FC35598u, SCPH1001_func_1FC35598 }, - { 0x1FC35698u, SCPH1001_func_1FC35698 }, - { 0x1FC357C4u, SCPH1001_func_1FC357C4 }, - { 0x1FC3582Cu, SCPH1001_func_1FC3582C }, - { 0x1FC3586Cu, SCPH1001_func_1FC3586C }, - { 0x1FC35890u, SCPH1001_func_1FC35890 }, - { 0x1FC359B4u, SCPH1001_func_1FC359B4 }, - { 0x1FC35AD8u, SCPH1001_func_1FC35AD8 }, - { 0x1FC35B08u, SCPH1001_func_1FC35B08 }, - { 0x1FC35B38u, SCPH1001_func_1FC35B38 }, - { 0x1FC35B68u, SCPH1001_func_1FC35B68 }, - { 0x1FC35B88u, SCPH1001_func_1FC35B88 }, - { 0x1FC35BA0u, SCPH1001_func_1FC35B88_cont_BFC35BA0 }, - { 0x1FC35BB0u, SCPH1001_func_1FC35B88_cont_BFC35BB0 }, - { 0x1FC35BC4u, SCPH1001_func_1FC35BC4 }, - { 0x1FC35C28u, SCPH1001_func_1FC35C28 }, - { 0x1FC35C3Cu, SCPH1001_func_1FC35C28_cont_BFC35C3C }, - { 0x1FC35C4Cu, SCPH1001_func_1FC35C28_cont_BFC35C4C }, - { 0x1FC35C60u, SCPH1001_func_1FC35C60 }, - { 0x1FC35CC8u, SCPH1001_func_1FC35CC8 }, - { 0x1FC35D10u, SCPH1001_func_1FC35D10 }, - { 0x1FC35D58u, SCPH1001_func_1FC35D58 }, - { 0x1FC35DA0u, SCPH1001_func_1FC35DA0 }, - { 0x1FC35DD4u, SCPH1001_func_1FC35DD4 }, - { 0x1FC35E30u, SCPH1001_func_1FC35E30 }, - { 0x1FC35E64u, SCPH1001_func_1FC35E64 }, - { 0x1FC35E98u, SCPH1001_func_1FC35E98 }, - { 0x1FC35EC0u, SCPH1001_func_1FC35EC0 }, - { 0x1FC35EECu, SCPH1001_func_1FC35EEC }, - { 0x1FC35F18u, SCPH1001_func_1FC35F18 }, - { 0x1FC35F38u, SCPH1001_func_1FC35F38 }, - { 0x1FC35F78u, SCPH1001_func_1FC35F78 }, - { 0x1FC35FA0u, SCPH1001_func_1FC35FA0 }, - { 0x1FC35FD0u, SCPH1001_func_1FC35FD0 }, - { 0x1FC36000u, SCPH1001_func_1FC36000 }, - { 0x1FC36024u, SCPH1001_func_1FC36024 }, - { 0x1FC36068u, SCPH1001_func_1FC36068 }, - { 0x1FC36094u, SCPH1001_func_1FC36094 }, - { 0x1FC360E0u, SCPH1001_func_1FC360E0 }, - { 0x1FC36104u, SCPH1001_func_1FC36104 }, - { 0x1FC3614Cu, SCPH1001_func_1FC3614C }, - { 0x1FC36178u, SCPH1001_func_1FC36178 }, - { 0x1FC361A0u, SCPH1001_func_1FC361A0 }, - { 0x1FC361CCu, SCPH1001_func_1FC361CC }, - { 0x1FC361F4u, SCPH1001_func_1FC361F4 }, - { 0x1FC3621Cu, SCPH1001_func_1FC3621C }, - { 0x1FC36244u, SCPH1001_func_1FC36244 }, - { 0x1FC3625Cu, SCPH1001_func_1FC3625C }, - { 0x1FC36280u, SCPH1001_func_1FC36280 }, - { 0x1FC36294u, SCPH1001_func_1FC36294 }, - { 0x1FC362BCu, SCPH1001_func_1FC362BC }, - { 0x1FC362D0u, SCPH1001_func_1FC362D0 }, - { 0x1FC3632Cu, SCPH1001_func_1FC3632C }, - { 0x1FC36388u, SCPH1001_func_1FC36388 }, - { 0x1FC363A0u, SCPH1001_func_1FC363A0 }, - { 0x1FC363A8u, SCPH1001_func_1FC363A0_cont_BFC363A8 }, - { 0x1FC363E8u, SCPH1001_func_1FC363A0_cont_BFC363E8 }, - { 0x1FC363F0u, SCPH1001_func_1FC363F0 }, - { 0x1FC363F8u, SCPH1001_func_1FC363F0_cont_BFC363F8 }, - { 0x1FC36450u, SCPH1001_func_1FC363F0_cont_BFC36450 }, - { 0x1FC36458u, SCPH1001_func_1FC36458 }, - { 0x1FC364DCu, SCPH1001_func_1FC364DC }, - { 0x1FC3653Cu, SCPH1001_func_1FC3653C }, - { 0x1FC365C4u, SCPH1001_func_1FC365C4 }, - { 0x1FC365F8u, SCPH1001_func_1FC365F8 }, - { 0x1FC36654u, SCPH1001_func_1FC365F8_cont_BFC36654 }, - { 0x1FC3665Cu, SCPH1001_func_1FC365F8_cont_BFC3665C }, - { 0x1FC3667Cu, SCPH1001_func_1FC365F8_cont_BFC3667C }, - { 0x1FC36684u, SCPH1001_func_1FC36684 }, - { 0x1FC366E0u, SCPH1001_func_1FC36684_cont_BFC366E0 }, - { 0x1FC366E8u, SCPH1001_func_1FC36684_cont_BFC366E8 }, - { 0x1FC36738u, SCPH1001_func_1FC36684_cont_BFC36738 }, - { 0x1FC36740u, SCPH1001_func_1FC36740 }, - { 0x1FC36798u, SCPH1001_func_1FC36740_cont_BFC36798 }, - { 0x1FC367A0u, SCPH1001_func_1FC36740_cont_BFC367A0 }, - { 0x1FC367CCu, SCPH1001_func_1FC36740_cont_BFC367CC }, - { 0x1FC367D4u, SCPH1001_func_1FC367D4 }, - { 0x1FC36828u, SCPH1001_func_1FC367D4_cont_BFC36828 }, - { 0x1FC36830u, SCPH1001_func_1FC367D4_cont_BFC36830 }, - { 0x1FC36834u, SCPH1001_func_1FC367D4_cont_BFC36834 }, - { 0x1FC36878u, SCPH1001_func_1FC367D4_cont_BFC36878 }, - { 0x1FC36880u, SCPH1001_func_1FC36880 }, - { 0x1FC368D8u, SCPH1001_func_1FC36880_cont_BFC368D8 }, - { 0x1FC368E0u, SCPH1001_func_1FC36880_cont_BFC368E0 }, - { 0x1FC36938u, SCPH1001_func_1FC36880_cont_BFC36938 }, - { 0x1FC36940u, SCPH1001_func_1FC36940 }, - { 0x1FC36998u, SCPH1001_func_1FC36998 }, - { 0x1FC36A3Cu, SCPH1001_func_1FC36A3C }, - { 0x1FC36A94u, SCPH1001_func_1FC36A3C_cont_BFC36A94 }, - { 0x1FC36A98u, SCPH1001_func_1FC36A3C_cont_BFC36A98 }, - { 0x1FC36A9Cu, SCPH1001_func_1FC36A3C_cont_BFC36A9C }, - { 0x1FC36B0Cu, SCPH1001_func_1FC36A3C_cont_BFC36B0C }, - { 0x1FC36B14u, SCPH1001_func_1FC36B14 }, - { 0x1FC36B6Cu, SCPH1001_func_1FC36B14_cont_BFC36B6C }, - { 0x1FC36B70u, SCPH1001_func_1FC36B14_cont_BFC36B70 }, - { 0x1FC36B74u, SCPH1001_func_1FC36B14_cont_BFC36B74 }, - { 0x1FC36BE4u, SCPH1001_func_1FC36B14_cont_BFC36BE4 }, - { 0x1FC36BECu, SCPH1001_func_1FC36BEC }, - { 0x1FC36C24u, SCPH1001_func_1FC36BEC_cont_BFC36C24 }, - { 0x1FC36C34u, SCPH1001_func_1FC36BEC_cont_BFC36C34 }, - { 0x1FC36C60u, SCPH1001_func_1FC36C60 }, - { 0x1FC36C74u, SCPH1001_func_1FC36C60_cont_BFC36C74 }, - { 0x1FC36C84u, SCPH1001_func_1FC36C60_cont_BFC36C84 }, - { 0x1FC36CA4u, SCPH1001_func_1FC36CA4 }, - { 0x1FC36CB8u, SCPH1001_func_1FC36CA4_cont_BFC36CB8 }, - { 0x1FC36CC8u, SCPH1001_func_1FC36CA4_cont_BFC36CC8 }, - { 0x1FC36CF0u, SCPH1001_func_1FC36CF0 }, - { 0x1FC36D0Cu, SCPH1001_func_1FC36CF0_cont_BFC36D0C }, - { 0x1FC36D1Cu, SCPH1001_func_1FC36D1C }, - { 0x1FC36D48u, SCPH1001_func_1FC36D48 }, - { 0x1FC36D50u, SCPH1001_func_1FC36D48_cont_BFC36D50 }, - { 0x1FC36D68u, SCPH1001_func_1FC36D48_cont_BFC36D68 }, - { 0x1FC36D78u, SCPH1001_func_1FC36D48_cont_BFC36D78 }, - { 0x1FC36D94u, SCPH1001_func_1FC36D48_cont_BFC36D94 }, - { 0x1FC36DA0u, SCPH1001_func_1FC36D48_cont_BFC36DA0 }, - { 0x1FC36DA8u, SCPH1001_func_1FC36D48_cont_BFC36DA8 }, - { 0x1FC36DC4u, SCPH1001_func_1FC36D48_cont_BFC36DC4 }, - { 0x1FC36DD0u, SCPH1001_func_1FC36DD0 }, - { 0x1FC36DECu, SCPH1001_func_1FC36DD0_cont_BFC36DEC }, - { 0x1FC36DF8u, SCPH1001_func_1FC36DF8 }, - { 0x1FC36E0Cu, SCPH1001_func_1FC36DF8_cont_BFC36E0C }, - { 0x1FC36E14u, SCPH1001_func_1FC36DF8_cont_BFC36E14 }, - { 0x1FC36E18u, SCPH1001_func_1FC36DF8_cont_BFC36E18 }, - { 0x1FC36E34u, SCPH1001_func_1FC36DF8_cont_BFC36E34 }, - { 0x1FC36E54u, SCPH1001_func_1FC36DF8_cont_BFC36E54 }, - { 0x1FC36E68u, SCPH1001_func_1FC36DF8_cont_BFC36E68 }, - { 0x1FC36E80u, SCPH1001_func_1FC36DF8_cont_BFC36E80 }, - { 0x1FC36E8Cu, SCPH1001_func_1FC36DF8_cont_BFC36E8C }, - { 0x1FC36E94u, SCPH1001_func_1FC36DF8_cont_BFC36E94 }, - { 0x1FC36EB0u, SCPH1001_func_1FC36DF8_cont_BFC36EB0 }, - { 0x1FC36EB4u, SCPH1001_func_1FC36DF8_cont_BFC36EB4 }, - { 0x1FC36EC0u, SCPH1001_func_1FC36EC0 }, - { 0x1FC36EE0u, SCPH1001_func_1FC36EC0_cont_BFC36EE0 }, - { 0x1FC36EE8u, SCPH1001_func_1FC36EC0_cont_BFC36EE8 }, - { 0x1FC36EECu, SCPH1001_func_1FC36EC0_cont_BFC36EEC }, - { 0x1FC36F08u, SCPH1001_func_1FC36EC0_cont_BFC36F08 }, - { 0x1FC36F28u, SCPH1001_func_1FC36EC0_cont_BFC36F28 }, - { 0x1FC36F3Cu, SCPH1001_func_1FC36EC0_cont_BFC36F3C }, - { 0x1FC36F50u, SCPH1001_func_1FC36EC0_cont_BFC36F50 }, - { 0x1FC36F5Cu, SCPH1001_func_1FC36EC0_cont_BFC36F5C }, - { 0x1FC36F60u, SCPH1001_func_1FC36EC0_cont_BFC36F60 }, - { 0x1FC36F64u, SCPH1001_func_1FC36EC0_cont_BFC36F64 }, - { 0x1FC36F80u, SCPH1001_func_1FC36EC0_cont_BFC36F80 }, - { 0x1FC36F84u, SCPH1001_func_1FC36EC0_cont_BFC36F84 }, - { 0x1FC36F90u, SCPH1001_func_1FC36F90 }, - { 0x1FC36FB0u, SCPH1001_func_1FC36F90_cont_BFC36FB0 }, - { 0x1FC36FD8u, SCPH1001_func_1FC36F90_cont_BFC36FD8 }, - { 0x1FC36FE0u, SCPH1001_func_1FC36F90_cont_BFC36FE0 }, - { 0x1FC36FF0u, SCPH1001_func_1FC36FF0 }, - { 0x1FC37028u, SCPH1001_func_1FC37028 }, - { 0x1FC37034u, SCPH1001_func_1FC37028_cont_BFC37034 }, - { 0x1FC3703Cu, SCPH1001_func_1FC37028_cont_BFC3703C }, - { 0x1FC37044u, SCPH1001_func_1FC37028_cont_BFC37044 }, - { 0x1FC37060u, SCPH1001_func_1FC37028_cont_BFC37060 }, - { 0x1FC37070u, SCPH1001_func_1FC37070 }, - { 0x1FC37090u, SCPH1001_func_1FC37070_cont_BFC37090 }, - { 0x1FC370A0u, SCPH1001_func_1FC370A0 }, - { 0x1FC370E4u, SCPH1001_func_1FC370A0_cont_BFC370E4 }, - { 0x1FC370F4u, SCPH1001_func_1FC370F4 }, - { 0x1FC37120u, SCPH1001_func_1FC370F4_cont_BFC37120 }, - { 0x1FC37130u, SCPH1001_func_1FC37130 }, - { 0x1FC3715Cu, SCPH1001_func_1FC37130_cont_BFC3715C }, - { 0x1FC3716Cu, SCPH1001_func_1FC3716C }, - { 0x1FC371D4u, SCPH1001_func_1FC3716C_cont_BFC371D4 }, - { 0x1FC37334u, SCPH1001_func_1FC37334 }, - { 0x1FC37358u, SCPH1001_func_1FC37334_cont_BFC37358 }, - { 0x1FC37368u, SCPH1001_func_1FC37368 }, - { 0x1FC37380u, SCPH1001_func_1FC37368_cont_BFC37380 }, - { 0x1FC37390u, SCPH1001_func_1FC37368_cont_BFC37390 }, - { 0x1FC373ACu, SCPH1001_func_1FC37368_cont_BFC373AC }, - { 0x1FC373D0u, SCPH1001_func_1FC37368_cont_BFC373D0 }, - { 0x1FC373E0u, SCPH1001_func_1FC373E0 }, - { 0x1FC373F8u, SCPH1001_func_1FC373E0_cont_BFC373F8 }, - { 0x1FC37400u, SCPH1001_func_1FC373E0_cont_BFC37400 }, - { 0x1FC37408u, SCPH1001_func_1FC373E0_cont_BFC37408 }, - { 0x1FC37424u, SCPH1001_func_1FC373E0_cont_BFC37424 }, - { 0x1FC37428u, SCPH1001_func_1FC373E0_cont_BFC37428 }, - { 0x1FC37434u, SCPH1001_func_1FC37434 }, - { 0x1FC37458u, SCPH1001_func_1FC37434_cont_BFC37458 }, - { 0x1FC37494u, SCPH1001_func_1FC37434_cont_BFC37494 }, - { 0x1FC374A8u, SCPH1001_func_1FC37434_cont_BFC374A8 }, - { 0x1FC374BCu, SCPH1001_func_1FC374BC }, - { 0x1FC374DCu, SCPH1001_func_1FC374BC_cont_BFC374DC }, - { 0x1FC374ECu, SCPH1001_func_1FC374EC }, - { 0x1FC37508u, SCPH1001_func_1FC374EC_cont_BFC37508 }, - { 0x1FC37518u, SCPH1001_func_1FC374EC_cont_BFC37518 }, - { 0x1FC37538u, SCPH1001_func_1FC374EC_cont_BFC37538 }, - { 0x1FC37550u, SCPH1001_func_1FC374EC_cont_BFC37550 }, - { 0x1FC37570u, SCPH1001_func_1FC374EC_cont_BFC37570 }, - { 0x1FC375A0u, SCPH1001_func_1FC374EC_cont_BFC375A0 }, - { 0x1FC375A8u, SCPH1001_func_1FC374EC_cont_BFC375A8 }, - { 0x1FC375ACu, SCPH1001_func_1FC374EC_cont_BFC375AC }, - { 0x1FC375C4u, SCPH1001_func_1FC374EC_cont_BFC375C4 }, - { 0x1FC375CCu, SCPH1001_func_1FC374EC_cont_BFC375CC }, - { 0x1FC375D0u, SCPH1001_func_1FC374EC_cont_BFC375D0 }, - { 0x1FC375DCu, SCPH1001_func_1FC374EC_cont_BFC375DC }, - { 0x1FC375E4u, SCPH1001_func_1FC374EC_cont_BFC375E4 }, - { 0x1FC375F0u, SCPH1001_func_1FC374EC_cont_BFC375F0 }, - { 0x1FC375F8u, SCPH1001_func_1FC374EC_cont_BFC375F8 }, - { 0x1FC375FCu, SCPH1001_func_1FC374EC_cont_BFC375FC }, - { 0x1FC37600u, SCPH1001_func_1FC374EC_cont_BFC37600 }, - { 0x1FC37610u, SCPH1001_func_1FC374EC_cont_BFC37610 }, - { 0x1FC37618u, SCPH1001_func_1FC374EC_cont_BFC37618 }, - { 0x1FC3761Cu, SCPH1001_func_1FC374EC_cont_BFC3761C }, - { 0x1FC37624u, SCPH1001_func_1FC374EC_cont_BFC37624 }, - { 0x1FC3762Cu, SCPH1001_func_1FC374EC_cont_BFC3762C }, - { 0x1FC37630u, SCPH1001_func_1FC374EC_cont_BFC37630 }, - { 0x1FC37634u, SCPH1001_func_1FC374EC_cont_BFC37634 }, - { 0x1FC3763Cu, SCPH1001_func_1FC374EC_cont_BFC3763C }, - { 0x1FC37644u, SCPH1001_func_1FC374EC_cont_BFC37644 }, - { 0x1FC37648u, SCPH1001_func_1FC374EC_cont_BFC37648 }, - { 0x1FC37650u, SCPH1001_func_1FC374EC_cont_BFC37650 }, - { 0x1FC37658u, SCPH1001_func_1FC374EC_cont_BFC37658 }, - { 0x1FC3765Cu, SCPH1001_func_1FC374EC_cont_BFC3765C }, - { 0x1FC37660u, SCPH1001_func_1FC374EC_cont_BFC37660 }, - { 0x1FC3766Cu, SCPH1001_func_1FC374EC_cont_BFC3766C }, - { 0x1FC37674u, SCPH1001_func_1FC374EC_cont_BFC37674 }, - { 0x1FC37678u, SCPH1001_func_1FC374EC_cont_BFC37678 }, - { 0x1FC37680u, SCPH1001_func_1FC374EC_cont_BFC37680 }, - { 0x1FC37688u, SCPH1001_func_1FC374EC_cont_BFC37688 }, - { 0x1FC3768Cu, SCPH1001_func_1FC374EC_cont_BFC3768C }, - { 0x1FC37690u, SCPH1001_func_1FC374EC_cont_BFC37690 }, - { 0x1FC376C8u, SCPH1001_func_1FC374EC_cont_BFC376C8 }, - { 0x1FC37700u, SCPH1001_func_1FC374EC_cont_BFC37700 }, - { 0x1FC37718u, SCPH1001_func_1FC374EC_cont_BFC37718 }, - { 0x1FC37720u, SCPH1001_func_1FC374EC_cont_BFC37720 }, - { 0x1FC37730u, SCPH1001_func_1FC374EC_cont_BFC37730 }, - { 0x1FC37734u, SCPH1001_func_1FC374EC_cont_BFC37734 }, - { 0x1FC37744u, SCPH1001_func_1FC374EC_cont_BFC37744 }, - { 0x1FC37748u, SCPH1001_func_1FC374EC_cont_BFC37748 }, - { 0x1FC3775Cu, SCPH1001_func_1FC374EC_cont_BFC3775C }, - { 0x1FC37760u, SCPH1001_func_1FC374EC_cont_BFC37760 }, - { 0x1FC37774u, SCPH1001_func_1FC374EC_cont_BFC37774 }, - { 0x1FC3777Cu, SCPH1001_func_1FC374EC_cont_BFC3777C }, - { 0x1FC37780u, SCPH1001_func_1FC374EC_cont_BFC37780 }, - { 0x1FC37788u, SCPH1001_func_1FC374EC_cont_BFC37788 }, - { 0x1FC37790u, SCPH1001_func_1FC374EC_cont_BFC37790 }, - { 0x1FC37794u, SCPH1001_func_1FC374EC_cont_BFC37794 }, - { 0x1FC3779Cu, SCPH1001_func_1FC374EC_cont_BFC3779C }, - { 0x1FC377A4u, SCPH1001_func_1FC374EC_cont_BFC377A4 }, - { 0x1FC377A8u, SCPH1001_func_1FC374EC_cont_BFC377A8 }, - { 0x1FC377B0u, SCPH1001_func_1FC374EC_cont_BFC377B0 }, - { 0x1FC377B8u, SCPH1001_func_1FC374EC_cont_BFC377B8 }, - { 0x1FC377BCu, SCPH1001_func_1FC374EC_cont_BFC377BC }, - { 0x1FC377C4u, SCPH1001_func_1FC374EC_cont_BFC377C4 }, - { 0x1FC377CCu, SCPH1001_func_1FC374EC_cont_BFC377CC }, - { 0x1FC377D0u, SCPH1001_func_1FC374EC_cont_BFC377D0 }, - { 0x1FC377E4u, SCPH1001_func_1FC374EC_cont_BFC377E4 }, - { 0x1FC377ECu, SCPH1001_func_1FC374EC_cont_BFC377EC }, - { 0x1FC377F0u, SCPH1001_func_1FC374EC_cont_BFC377F0 }, - { 0x1FC3780Cu, SCPH1001_func_1FC374EC_cont_BFC3780C }, - { 0x1FC37824u, SCPH1001_func_1FC374EC_cont_BFC37824 }, - { 0x1FC37838u, SCPH1001_func_1FC37838 }, - { 0x1FC37858u, SCPH1001_func_1FC37838_cont_BFC37858 }, - { 0x1FC37868u, SCPH1001_func_1FC37868 }, - { 0x1FC37888u, SCPH1001_func_1FC37868_cont_BFC37888 }, - { 0x1FC37898u, SCPH1001_func_1FC37868_cont_BFC37898 }, - { 0x1FC378A0u, SCPH1001_func_1FC37868_cont_BFC378A0 }, - { 0x1FC378A4u, SCPH1001_func_1FC37868_cont_BFC378A4 }, - { 0x1FC378B4u, SCPH1001_func_1FC378B4 }, - { 0x1FC378E8u, SCPH1001_func_1FC378B4_cont_BFC378E8 }, - { 0x1FC37908u, SCPH1001_func_1FC37908 }, - { 0x1FC37948u, SCPH1001_func_1FC37908_cont_BFC37948 }, - { 0x1FC3797Cu, SCPH1001_func_1FC37908_cont_BFC3797C }, - { 0x1FC37998u, SCPH1001_func_1FC37998 }, - { 0x1FC379D4u, SCPH1001_func_1FC37998_cont_BFC379D4 }, - { 0x1FC37A4Cu, SCPH1001_func_1FC37A4C }, - { 0x1FC37A90u, SCPH1001_func_1FC37A4C_cont_BFC37A90 }, - { 0x1FC37AA8u, SCPH1001_func_1FC37A4C_cont_BFC37AA8 }, - { 0x1FC37AC4u, SCPH1001_func_1FC37AC4 }, - { 0x1FC37AF0u, SCPH1001_func_1FC37AC4_cont_BFC37AF0 }, - { 0x1FC37B1Cu, SCPH1001_func_1FC37AC4_cont_BFC37B1C }, - { 0x1FC37B40u, SCPH1001_func_1FC37AC4_cont_BFC37B40 }, - { 0x1FC37B64u, SCPH1001_func_1FC37AC4_cont_BFC37B64 }, - { 0x1FC37B80u, SCPH1001_func_1FC37AC4_cont_BFC37B80 }, - { 0x1FC37BA8u, SCPH1001_func_1FC37AC4_cont_BFC37BA8 }, - { 0x1FC37BE0u, SCPH1001_func_1FC37AC4_cont_BFC37BE0 }, - { 0x1FC37BE8u, SCPH1001_func_1FC37AC4_cont_BFC37BE8 }, - { 0x1FC37BECu, SCPH1001_func_1FC37AC4_cont_BFC37BEC }, - { 0x1FC37BFCu, SCPH1001_func_1FC37AC4_cont_BFC37BFC }, - { 0x1FC37C04u, SCPH1001_func_1FC37AC4_cont_BFC37C04 }, - { 0x1FC37C08u, SCPH1001_func_1FC37AC4_cont_BFC37C08 }, - { 0x1FC37C0Cu, SCPH1001_func_1FC37AC4_cont_BFC37C0C }, - { 0x1FC37C10u, SCPH1001_func_1FC37AC4_cont_BFC37C10 }, - { 0x1FC37C20u, SCPH1001_func_1FC37AC4_cont_BFC37C20 }, - { 0x1FC37C28u, SCPH1001_func_1FC37AC4_cont_BFC37C28 }, - { 0x1FC37C3Cu, SCPH1001_func_1FC37AC4_cont_BFC37C3C }, - { 0x1FC37C44u, SCPH1001_func_1FC37AC4_cont_BFC37C44 }, - { 0x1FC37C48u, SCPH1001_func_1FC37AC4_cont_BFC37C48 }, - { 0x1FC37C5Cu, SCPH1001_func_1FC37AC4_cont_BFC37C5C }, - { 0x1FC37C64u, SCPH1001_func_1FC37AC4_cont_BFC37C64 }, - { 0x1FC37C6Cu, SCPH1001_func_1FC37AC4_cont_BFC37C6C }, - { 0x1FC37C70u, SCPH1001_func_1FC37AC4_cont_BFC37C70 }, - { 0x1FC37C78u, SCPH1001_func_1FC37AC4_cont_BFC37C78 }, - { 0x1FC37C80u, SCPH1001_func_1FC37AC4_cont_BFC37C80 }, - { 0x1FC37C84u, SCPH1001_func_1FC37AC4_cont_BFC37C84 }, - { 0x1FC37C98u, SCPH1001_func_1FC37AC4_cont_BFC37C98 }, - { 0x1FC37CACu, SCPH1001_func_1FC37AC4_cont_BFC37CAC }, - { 0x1FC37CB0u, SCPH1001_func_1FC37AC4_cont_BFC37CB0 }, - { 0x1FC37D40u, SCPH1001_func_1FC37AC4_cont_BFC37D40 }, - { 0x1FC37D90u, SCPH1001_func_1FC37AC4_cont_BFC37D90 }, - { 0x1FC37DC8u, SCPH1001_func_1FC37DC8 }, - { 0x1FC37DDCu, SCPH1001_func_1FC37DC8_cont_BFC37DDC }, - { 0x1FC37DE4u, SCPH1001_func_1FC37DC8_cont_BFC37DE4 }, - { 0x1FC37DECu, SCPH1001_func_1FC37DC8_cont_BFC37DEC }, - { 0x1FC37DF0u, SCPH1001_func_1FC37DC8_cont_BFC37DF0 }, - { 0x1FC37DF8u, SCPH1001_func_1FC37DC8_cont_BFC37DF8 }, - { 0x1FC37E00u, SCPH1001_func_1FC37DC8_cont_BFC37E00 }, - { 0x1FC37E04u, SCPH1001_func_1FC37DC8_cont_BFC37E04 }, - { 0x1FC37E1Cu, SCPH1001_func_1FC37DC8_cont_BFC37E1C }, - { 0x1FC37E24u, SCPH1001_func_1FC37DC8_cont_BFC37E24 }, - { 0x1FC37E2Cu, SCPH1001_func_1FC37DC8_cont_BFC37E2C }, - { 0x1FC37E30u, SCPH1001_func_1FC37DC8_cont_BFC37E30 }, - { 0x1FC37E38u, SCPH1001_func_1FC37DC8_cont_BFC37E38 }, - { 0x1FC37E40u, SCPH1001_func_1FC37DC8_cont_BFC37E40 }, - { 0x1FC37E44u, SCPH1001_func_1FC37DC8_cont_BFC37E44 }, - { 0x1FC37E60u, SCPH1001_func_1FC37E60 }, - { 0x1FC37E74u, SCPH1001_func_1FC37E60_cont_BFC37E74 }, - { 0x1FC37E7Cu, SCPH1001_func_1FC37E60_cont_BFC37E7C }, - { 0x1FC37E88u, SCPH1001_func_1FC37E60_cont_BFC37E88 }, - { 0x1FC37E90u, SCPH1001_func_1FC37E60_cont_BFC37E90 }, - { 0x1FC37E94u, SCPH1001_func_1FC37E60_cont_BFC37E94 }, - { 0x1FC37E9Cu, SCPH1001_func_1FC37E60_cont_BFC37E9C }, - { 0x1FC37EA4u, SCPH1001_func_1FC37E60_cont_BFC37EA4 }, - { 0x1FC37EB4u, SCPH1001_func_1FC37E60_cont_BFC37EB4 }, - { 0x1FC37EC8u, SCPH1001_func_1FC37E60_cont_BFC37EC8 }, - { 0x1FC37ED0u, SCPH1001_func_1FC37E60_cont_BFC37ED0 }, - { 0x1FC37ED4u, SCPH1001_func_1FC37E60_cont_BFC37ED4 }, - { 0x1FC37EE0u, SCPH1001_func_1FC37E60_cont_BFC37EE0 }, - { 0x1FC37EE8u, SCPH1001_func_1FC37E60_cont_BFC37EE8 }, - { 0x1FC37EF0u, SCPH1001_func_1FC37E60_cont_BFC37EF0 }, - { 0x1FC37EF4u, SCPH1001_func_1FC37E60_cont_BFC37EF4 }, - { 0x1FC37EFCu, SCPH1001_func_1FC37E60_cont_BFC37EFC }, - { 0x1FC37F00u, SCPH1001_func_1FC37E60_cont_BFC37F00 }, - { 0x1FC37F08u, SCPH1001_func_1FC37E60_cont_BFC37F08 }, - { 0x1FC37F10u, SCPH1001_func_1FC37E60_cont_BFC37F10 }, - { 0x1FC37F30u, SCPH1001_func_1FC37E60_cont_BFC37F30 }, - { 0x1FC37F4Cu, SCPH1001_func_1FC37F4C }, - { 0x1FC37F60u, SCPH1001_func_1FC37F4C_cont_BFC37F60 }, - { 0x1FC37F68u, SCPH1001_func_1FC37F4C_cont_BFC37F68 }, - { 0x1FC37F74u, SCPH1001_func_1FC37F4C_cont_BFC37F74 }, - { 0x1FC37F7Cu, SCPH1001_func_1FC37F4C_cont_BFC37F7C }, - { 0x1FC37F80u, SCPH1001_func_1FC37F4C_cont_BFC37F80 }, - { 0x1FC37F88u, SCPH1001_func_1FC37F4C_cont_BFC37F88 }, - { 0x1FC37F90u, SCPH1001_func_1FC37F4C_cont_BFC37F90 }, - { 0x1FC37FA0u, SCPH1001_func_1FC37F4C_cont_BFC37FA0 }, - { 0x1FC37FB4u, SCPH1001_func_1FC37F4C_cont_BFC37FB4 }, - { 0x1FC37FBCu, SCPH1001_func_1FC37F4C_cont_BFC37FBC }, - { 0x1FC37FC0u, SCPH1001_func_1FC37F4C_cont_BFC37FC0 }, - { 0x1FC37FCCu, SCPH1001_func_1FC37F4C_cont_BFC37FCC }, - { 0x1FC37FD4u, SCPH1001_func_1FC37F4C_cont_BFC37FD4 }, - { 0x1FC37FDCu, SCPH1001_func_1FC37F4C_cont_BFC37FDC }, - { 0x1FC37FE0u, SCPH1001_func_1FC37F4C_cont_BFC37FE0 }, - { 0x1FC37FE8u, SCPH1001_func_1FC37F4C_cont_BFC37FE8 }, - { 0x1FC37FECu, SCPH1001_func_1FC37F4C_cont_BFC37FEC }, - { 0x1FC37FF4u, SCPH1001_func_1FC37F4C_cont_BFC37FF4 }, - { 0x1FC37FFCu, SCPH1001_func_1FC37F4C_cont_BFC37FFC }, - { 0x1FC3801Cu, SCPH1001_func_1FC37F4C_cont_BFC3801C }, - { 0x1FC38038u, SCPH1001_func_1FC38038 }, - { 0x1FC38054u, SCPH1001_func_1FC38038_cont_BFC38054 }, - { 0x1FC38070u, SCPH1001_func_1FC38038_cont_BFC38070 }, - { 0x1FC38090u, SCPH1001_func_1FC38090 }, - { 0x1FC38098u, SCPH1001_func_1FC38090_cont_BFC38098 }, - { 0x1FC38100u, SCPH1001_func_1FC38090_cont_BFC38100 }, - { 0x1FC38108u, SCPH1001_func_1FC38108 }, - { 0x1FC38110u, SCPH1001_func_1FC38108_cont_BFC38110 }, - { 0x1FC3811Cu, SCPH1001_func_1FC38108_cont_BFC3811C }, - { 0x1FC38130u, SCPH1001_func_1FC38108_cont_BFC38130 }, - { 0x1FC38148u, SCPH1001_func_1FC38108_cont_BFC38148 }, - { 0x1FC38150u, SCPH1001_func_1FC38108_cont_BFC38150 }, - { 0x1FC38158u, SCPH1001_func_1FC38108_cont_BFC38158 }, - { 0x1FC3816Cu, SCPH1001_func_1FC38108_cont_BFC3816C }, - { 0x1FC38188u, SCPH1001_func_1FC38108_cont_BFC38188 }, - { 0x1FC3818Cu, SCPH1001_func_1FC38108_cont_BFC3818C }, - { 0x1FC3819Cu, SCPH1001_func_1FC38108_cont_BFC3819C }, - { 0x1FC381B0u, SCPH1001_func_1FC38108_cont_BFC381B0 }, - { 0x1FC381B4u, SCPH1001_func_1FC38108_cont_BFC381B4 }, - { 0x1FC381B8u, SCPH1001_func_1FC38108_cont_BFC381B8 }, - { 0x1FC381C0u, SCPH1001_func_1FC38108_cont_BFC381C0 }, - { 0x1FC381D4u, SCPH1001_func_1FC38108_cont_BFC381D4 }, - { 0x1FC381DCu, SCPH1001_func_1FC38108_cont_BFC381DC }, - { 0x1FC381E4u, SCPH1001_func_1FC38108_cont_BFC381E4 }, - { 0x1FC38204u, SCPH1001_func_1FC38204 }, - { 0x1FC38270u, SCPH1001_func_1FC38204_cont_BFC38270 }, - { 0x1FC38290u, SCPH1001_func_1FC38204_cont_BFC38290 }, - { 0x1FC38298u, SCPH1001_func_1FC38204_cont_BFC38298 }, - { 0x1FC382A0u, SCPH1001_func_1FC38204_cont_BFC382A0 }, - { 0x1FC382A8u, SCPH1001_func_1FC38204_cont_BFC382A8 }, - { 0x1FC382C8u, SCPH1001_func_1FC38204_cont_BFC382C8 }, - { 0x1FC382CCu, SCPH1001_func_1FC38204_cont_BFC382CC }, - { 0x1FC382D0u, SCPH1001_func_1FC38204_cont_BFC382D0 }, - { 0x1FC382E0u, SCPH1001_func_1FC382E0 }, - { 0x1FC38320u, SCPH1001_func_1FC382E0_cont_BFC38320 }, - { 0x1FC38328u, SCPH1001_func_1FC382E0_cont_BFC38328 }, - { 0x1FC3832Cu, SCPH1001_func_1FC382E0_cont_BFC3832C }, - { 0x1FC3833Cu, SCPH1001_func_1FC382E0_cont_BFC3833C }, - { 0x1FC38344u, SCPH1001_func_1FC382E0_cont_BFC38344 }, - { 0x1FC38348u, SCPH1001_func_1FC382E0_cont_BFC38348 }, - { 0x1FC3834Cu, SCPH1001_func_1FC382E0_cont_BFC3834C }, - { 0x1FC38350u, SCPH1001_func_1FC382E0_cont_BFC38350 }, - { 0x1FC38360u, SCPH1001_func_1FC382E0_cont_BFC38360 }, - { 0x1FC38368u, SCPH1001_func_1FC382E0_cont_BFC38368 }, - { 0x1FC3837Cu, SCPH1001_func_1FC382E0_cont_BFC3837C }, - { 0x1FC38384u, SCPH1001_func_1FC382E0_cont_BFC38384 }, - { 0x1FC38388u, SCPH1001_func_1FC382E0_cont_BFC38388 }, - { 0x1FC3839Cu, SCPH1001_func_1FC382E0_cont_BFC3839C }, - { 0x1FC383A4u, SCPH1001_func_1FC382E0_cont_BFC383A4 }, - { 0x1FC383ACu, SCPH1001_func_1FC382E0_cont_BFC383AC }, - { 0x1FC383B0u, SCPH1001_func_1FC382E0_cont_BFC383B0 }, - { 0x1FC383B8u, SCPH1001_func_1FC382E0_cont_BFC383B8 }, - { 0x1FC383C0u, SCPH1001_func_1FC382E0_cont_BFC383C0 }, - { 0x1FC383C4u, SCPH1001_func_1FC382E0_cont_BFC383C4 }, - { 0x1FC383D8u, SCPH1001_func_1FC382E0_cont_BFC383D8 }, - { 0x1FC383ECu, SCPH1001_func_1FC382E0_cont_BFC383EC }, - { 0x1FC383F0u, SCPH1001_func_1FC382E0_cont_BFC383F0 }, - { 0x1FC3847Cu, SCPH1001_func_1FC382E0_cont_BFC3847C }, - { 0x1FC38494u, SCPH1001_func_1FC382E0_cont_BFC38494 }, - { 0x1FC384ACu, SCPH1001_func_1FC382E0_cont_BFC384AC }, - { 0x1FC384C0u, SCPH1001_func_1FC382E0_cont_BFC384C0 }, - { 0x1FC384C4u, SCPH1001_func_1FC382E0_cont_BFC384C4 }, - { 0x1FC38508u, SCPH1001_func_1FC382E0_cont_BFC38508 }, - { 0x1FC38514u, SCPH1001_func_1FC382E0_cont_BFC38514 }, - { 0x1FC38524u, SCPH1001_func_1FC38524 }, - { 0x1FC3856Cu, SCPH1001_func_1FC38524_cont_BFC3856C }, - { 0x1FC38574u, SCPH1001_func_1FC38524_cont_BFC38574 }, - { 0x1FC38578u, SCPH1001_func_1FC38524_cont_BFC38578 }, - { 0x1FC38588u, SCPH1001_func_1FC38524_cont_BFC38588 }, - { 0x1FC38590u, SCPH1001_func_1FC38524_cont_BFC38590 }, - { 0x1FC38594u, SCPH1001_func_1FC38524_cont_BFC38594 }, - { 0x1FC38598u, SCPH1001_func_1FC38524_cont_BFC38598 }, - { 0x1FC3859Cu, SCPH1001_func_1FC38524_cont_BFC3859C }, - { 0x1FC385ACu, SCPH1001_func_1FC38524_cont_BFC385AC }, - { 0x1FC385B4u, SCPH1001_func_1FC38524_cont_BFC385B4 }, - { 0x1FC385C8u, SCPH1001_func_1FC38524_cont_BFC385C8 }, - { 0x1FC385D0u, SCPH1001_func_1FC38524_cont_BFC385D0 }, - { 0x1FC385D4u, SCPH1001_func_1FC38524_cont_BFC385D4 }, - { 0x1FC385E8u, SCPH1001_func_1FC38524_cont_BFC385E8 }, - { 0x1FC385F0u, SCPH1001_func_1FC38524_cont_BFC385F0 }, - { 0x1FC385F8u, SCPH1001_func_1FC38524_cont_BFC385F8 }, - { 0x1FC385FCu, SCPH1001_func_1FC38524_cont_BFC385FC }, - { 0x1FC38604u, SCPH1001_func_1FC38524_cont_BFC38604 }, - { 0x1FC3860Cu, SCPH1001_func_1FC38524_cont_BFC3860C }, - { 0x1FC38610u, SCPH1001_func_1FC38524_cont_BFC38610 }, - { 0x1FC38624u, SCPH1001_func_1FC38524_cont_BFC38624 }, - { 0x1FC38630u, SCPH1001_func_1FC38524_cont_BFC38630 }, - { 0x1FC38634u, SCPH1001_func_1FC38524_cont_BFC38634 }, - { 0x1FC38644u, SCPH1001_func_1FC38524_cont_BFC38644 }, - { 0x1FC38660u, SCPH1001_func_1FC38524_cont_BFC38660 }, - { 0x1FC38664u, SCPH1001_func_1FC38524_cont_BFC38664 }, - { 0x1FC38670u, SCPH1001_func_1FC38524_cont_BFC38670 }, - { 0x1FC38690u, SCPH1001_func_1FC38524_cont_BFC38690 }, - { 0x1FC38698u, SCPH1001_func_1FC38524_cont_BFC38698 }, - { 0x1FC386A0u, SCPH1001_func_1FC38524_cont_BFC386A0 }, - { 0x1FC386C0u, SCPH1001_func_1FC38524_cont_BFC386C0 }, - { 0x1FC386E0u, SCPH1001_func_1FC38524_cont_BFC386E0 }, - { 0x1FC386ECu, SCPH1001_func_1FC38524_cont_BFC386EC }, - { 0x1FC386F0u, SCPH1001_func_1FC38524_cont_BFC386F0 }, - { 0x1FC386F4u, SCPH1001_func_1FC38524_cont_BFC386F4 }, - { 0x1FC38718u, SCPH1001_func_1FC38524_cont_BFC38718 }, - { 0x1FC38720u, SCPH1001_func_1FC38524_cont_BFC38720 }, - { 0x1FC38724u, SCPH1001_func_1FC38524_cont_BFC38724 }, - { 0x1FC38730u, SCPH1001_func_1FC38524_cont_BFC38730 }, - { 0x1FC38748u, SCPH1001_func_1FC38524_cont_BFC38748 }, - { 0x1FC38750u, SCPH1001_func_1FC38524_cont_BFC38750 }, - { 0x1FC38754u, SCPH1001_func_1FC38524_cont_BFC38754 }, - { 0x1FC38760u, SCPH1001_func_1FC38524_cont_BFC38760 }, - { 0x1FC387C0u, SCPH1001_func_1FC38524_cont_BFC387C0 }, - { 0x1FC387D4u, SCPH1001_func_1FC387D4 }, - { 0x1FC38818u, SCPH1001_func_1FC387D4_cont_BFC38818 }, - { 0x1FC38820u, SCPH1001_func_1FC387D4_cont_BFC38820 }, - { 0x1FC38824u, SCPH1001_func_1FC387D4_cont_BFC38824 }, - { 0x1FC38834u, SCPH1001_func_1FC387D4_cont_BFC38834 }, - { 0x1FC3883Cu, SCPH1001_func_1FC387D4_cont_BFC3883C }, - { 0x1FC38840u, SCPH1001_func_1FC387D4_cont_BFC38840 }, - { 0x1FC38844u, SCPH1001_func_1FC387D4_cont_BFC38844 }, - { 0x1FC38848u, SCPH1001_func_1FC387D4_cont_BFC38848 }, - { 0x1FC38858u, SCPH1001_func_1FC387D4_cont_BFC38858 }, - { 0x1FC38860u, SCPH1001_func_1FC387D4_cont_BFC38860 }, - { 0x1FC38874u, SCPH1001_func_1FC387D4_cont_BFC38874 }, - { 0x1FC3887Cu, SCPH1001_func_1FC387D4_cont_BFC3887C }, - { 0x1FC38880u, SCPH1001_func_1FC387D4_cont_BFC38880 }, - { 0x1FC38894u, SCPH1001_func_1FC387D4_cont_BFC38894 }, - { 0x1FC3889Cu, SCPH1001_func_1FC387D4_cont_BFC3889C }, - { 0x1FC388A4u, SCPH1001_func_1FC387D4_cont_BFC388A4 }, - { 0x1FC388A8u, SCPH1001_func_1FC387D4_cont_BFC388A8 }, - { 0x1FC388B0u, SCPH1001_func_1FC387D4_cont_BFC388B0 }, - { 0x1FC388B8u, SCPH1001_func_1FC387D4_cont_BFC388B8 }, - { 0x1FC388BCu, SCPH1001_func_1FC387D4_cont_BFC388BC }, - { 0x1FC388DCu, SCPH1001_func_1FC387D4_cont_BFC388DC }, - { 0x1FC388E0u, SCPH1001_func_1FC387D4_cont_BFC388E0 }, - { 0x1FC388ECu, SCPH1001_func_1FC387D4_cont_BFC388EC }, - { 0x1FC388F4u, SCPH1001_func_1FC387D4_cont_BFC388F4 }, - { 0x1FC38914u, SCPH1001_func_1FC387D4_cont_BFC38914 }, - { 0x1FC3891Cu, SCPH1001_func_1FC387D4_cont_BFC3891C }, - { 0x1FC38924u, SCPH1001_func_1FC387D4_cont_BFC38924 }, - { 0x1FC3892Cu, SCPH1001_func_1FC387D4_cont_BFC3892C }, - { 0x1FC38940u, SCPH1001_func_1FC387D4_cont_BFC38940 }, - { 0x1FC38960u, SCPH1001_func_1FC387D4_cont_BFC38960 }, - { 0x1FC38968u, SCPH1001_func_1FC387D4_cont_BFC38968 }, - { 0x1FC389ACu, SCPH1001_func_1FC387D4_cont_BFC389AC }, - { 0x1FC389C0u, SCPH1001_func_1FC387D4_cont_BFC389C0 }, - { 0x1FC389C8u, SCPH1001_func_1FC387D4_cont_BFC389C8 }, - { 0x1FC389D0u, SCPH1001_func_1FC387D4_cont_BFC389D0 }, - { 0x1FC389D4u, SCPH1001_func_1FC387D4_cont_BFC389D4 }, - { 0x1FC389E0u, SCPH1001_func_1FC387D4_cont_BFC389E0 }, - { 0x1FC389F8u, SCPH1001_func_1FC387D4_cont_BFC389F8 }, - { 0x1FC38A00u, SCPH1001_func_1FC387D4_cont_BFC38A00 }, - { 0x1FC38A04u, SCPH1001_func_1FC387D4_cont_BFC38A04 }, - { 0x1FC38A10u, SCPH1001_func_1FC387D4_cont_BFC38A10 }, - { 0x1FC38A68u, SCPH1001_func_1FC387D4_cont_BFC38A68 }, - { 0x1FC38A6Cu, SCPH1001_func_1FC387D4_cont_BFC38A6C }, - { 0x1FC38A7Cu, SCPH1001_func_1FC38A7C }, - { 0x1FC38A94u, SCPH1001_func_1FC38A7C_cont_BFC38A94 }, - { 0x1FC38AA4u, SCPH1001_func_1FC38AA4 }, - { 0x1FC38AD4u, SCPH1001_func_1FC38AD4 }, - { 0x1FC38AF0u, SCPH1001_func_1FC38AF0 }, - { 0x1FC38AFCu, SCPH1001_func_1FC38AF0_cont_BFC38AFC }, - { 0x1FC38B08u, SCPH1001_func_1FC38AF0_cont_BFC38B08 }, - { 0x1FC38B20u, SCPH1001_func_1FC38AF0_cont_BFC38B20 }, - { 0x1FC38B28u, SCPH1001_func_1FC38B28 }, - { 0x1FC38B80u, SCPH1001_func_1FC38B80 }, - { 0x1FC38BE8u, SCPH1001_func_1FC38BE8 }, - { 0x1FC38C24u, SCPH1001_func_1FC38BE8_cont_BFC38C24 }, - { 0x1FC38C58u, SCPH1001_func_1FC38BE8_cont_BFC38C58 }, - { 0x1FC38C68u, SCPH1001_func_1FC38C68 }, - { 0x1FC38C94u, SCPH1001_func_1FC38C68_cont_BFC38C94 }, - { 0x1FC38CA8u, SCPH1001_func_1FC38C68_cont_BFC38CA8 }, - { 0x1FC38CB0u, SCPH1001_func_1FC38C68_cont_BFC38CB0 }, - { 0x1FC38CB8u, SCPH1001_func_1FC38C68_cont_BFC38CB8 }, - { 0x1FC38CC0u, SCPH1001_func_1FC38C68_cont_BFC38CC0 }, - { 0x1FC38CD4u, SCPH1001_func_1FC38C68_cont_BFC38CD4 }, - { 0x1FC38CD8u, SCPH1001_func_1FC38C68_cont_BFC38CD8 }, - { 0x1FC38D78u, SCPH1001_func_1FC38C68_cont_BFC38D78 }, - { 0x1FC38D80u, SCPH1001_func_1FC38C68_cont_BFC38D80 }, - { 0x1FC38D9Cu, SCPH1001_func_1FC38C68_cont_BFC38D9C }, - { 0x1FC38DACu, SCPH1001_func_1FC38DAC }, - { 0x1FC38DC0u, SCPH1001_func_1FC38DAC_cont_BFC38DC0 }, - { 0x1FC38DC8u, SCPH1001_func_1FC38DAC_cont_BFC38DC8 }, - { 0x1FC38DE8u, SCPH1001_func_1FC38DAC_cont_BFC38DE8 }, - { 0x1FC38DFCu, SCPH1001_func_1FC38DAC_cont_BFC38DFC }, - { 0x1FC38E1Cu, SCPH1001_func_1FC38DAC_cont_BFC38E1C }, - { 0x1FC38E24u, SCPH1001_func_1FC38DAC_cont_BFC38E24 }, - { 0x1FC38E40u, SCPH1001_func_1FC38DAC_cont_BFC38E40 }, - { 0x1FC38E48u, SCPH1001_func_1FC38DAC_cont_BFC38E48 }, - { 0x1FC38E68u, SCPH1001_func_1FC38DAC_cont_BFC38E68 }, - { 0x1FC38E70u, SCPH1001_func_1FC38DAC_cont_BFC38E70 }, - { 0x1FC38E78u, SCPH1001_func_1FC38DAC_cont_BFC38E78 }, - { 0x1FC38E98u, SCPH1001_func_1FC38DAC_cont_BFC38E98 }, - { 0x1FC38F20u, SCPH1001_func_1FC38DAC_cont_BFC38F20 }, - { 0x1FC38F3Cu, SCPH1001_func_1FC38DAC_cont_BFC38F3C }, - { 0x1FC38F48u, SCPH1001_func_1FC38DAC_cont_BFC38F48 }, - { 0x1FC38F5Cu, SCPH1001_func_1FC38DAC_cont_BFC38F5C }, - { 0x1FC38F64u, SCPH1001_func_1FC38DAC_cont_BFC38F64 }, - { 0x1FC38F7Cu, SCPH1001_func_1FC38DAC_cont_BFC38F7C }, - { 0x1FC38F8Cu, SCPH1001_func_1FC38F8C }, - { 0x1FC38F94u, SCPH1001_func_1FC38F8C_cont_BFC38F94 }, - { 0x1FC38FCCu, SCPH1001_func_1FC38F8C_cont_BFC38FCC }, - { 0x1FC39018u, SCPH1001_func_1FC38F8C_cont_BFC39018 }, - { 0x1FC39020u, SCPH1001_func_1FC38F8C_cont_BFC39020 }, - { 0x1FC39028u, SCPH1001_func_1FC38F8C_cont_BFC39028 }, - { 0x1FC39034u, SCPH1001_func_1FC38F8C_cont_BFC39034 }, - { 0x1FC3906Cu, SCPH1001_func_1FC38F8C_cont_BFC3906C }, - { 0x1FC39074u, SCPH1001_func_1FC38F8C_cont_BFC39074 }, - { 0x1FC39078u, SCPH1001_func_1FC38F8C_cont_BFC39078 }, - { 0x1FC39080u, SCPH1001_func_1FC39080 }, - { 0x1FC3908Cu, SCPH1001_func_1FC39080_cont_BFC3908C }, - { 0x1FC3909Cu, SCPH1001_func_1FC39080_cont_BFC3909C }, - { 0x1FC390B8u, SCPH1001_func_1FC39080_cont_BFC390B8 }, - { 0x1FC390C8u, SCPH1001_func_1FC39080_cont_BFC390C8 }, - { 0x1FC390CCu, SCPH1001_func_1FC39080_cont_BFC390CC }, - { 0x1FC390D4u, SCPH1001_func_1FC39080_cont_BFC390D4 }, - { 0x1FC390DCu, SCPH1001_func_1FC39080_cont_BFC390DC }, - { 0x1FC390F0u, SCPH1001_func_1FC39080_cont_BFC390F0 }, - { 0x1FC39110u, SCPH1001_func_1FC39080_cont_BFC39110 }, - { 0x1FC39118u, SCPH1001_func_1FC39080_cont_BFC39118 }, - { 0x1FC39134u, SCPH1001_func_1FC39080_cont_BFC39134 }, - { 0x1FC3913Cu, SCPH1001_func_1FC39080_cont_BFC3913C }, - { 0x1FC39144u, SCPH1001_func_1FC39080_cont_BFC39144 }, - { 0x1FC3914Cu, SCPH1001_func_1FC39080_cont_BFC3914C }, - { 0x1FC39160u, SCPH1001_func_1FC39080_cont_BFC39160 }, - { 0x1FC39180u, SCPH1001_func_1FC39080_cont_BFC39180 }, - { 0x1FC39194u, SCPH1001_func_1FC39080_cont_BFC39194 }, - { 0x1FC3919Cu, SCPH1001_func_1FC39080_cont_BFC3919C }, - { 0x1FC391BCu, SCPH1001_func_1FC39080_cont_BFC391BC }, - { 0x1FC391C8u, SCPH1001_func_1FC39080_cont_BFC391C8 }, - { 0x1FC391DCu, SCPH1001_func_1FC39080_cont_BFC391DC }, - { 0x1FC391E4u, SCPH1001_func_1FC39080_cont_BFC391E4 }, - { 0x1FC391ECu, SCPH1001_func_1FC39080_cont_BFC391EC }, - { 0x1FC39200u, SCPH1001_func_1FC39080_cont_BFC39200 }, - { 0x1FC39220u, SCPH1001_func_1FC39080_cont_BFC39220 }, - { 0x1FC39228u, SCPH1001_func_1FC39080_cont_BFC39228 }, - { 0x1FC39244u, SCPH1001_func_1FC39080_cont_BFC39244 }, - { 0x1FC39264u, SCPH1001_func_1FC39080_cont_BFC39264 }, - { 0x1FC39284u, SCPH1001_func_1FC39080_cont_BFC39284 }, - { 0x1FC39290u, SCPH1001_func_1FC39080_cont_BFC39290 }, - { 0x1FC392A8u, SCPH1001_func_1FC39080_cont_BFC392A8 }, - { 0x1FC392B8u, SCPH1001_func_1FC39080_cont_BFC392B8 }, - { 0x1FC392BCu, SCPH1001_func_1FC39080_cont_BFC392BC }, - { 0x1FC392C8u, SCPH1001_func_1FC39080_cont_BFC392C8 }, - { 0x1FC392CCu, SCPH1001_func_1FC39080_cont_BFC392CC }, - { 0x1FC392D8u, SCPH1001_func_1FC39080_cont_BFC392D8 }, - { 0x1FC392E8u, SCPH1001_func_1FC392E8 }, - { 0x1FC39300u, SCPH1001_func_1FC39300 }, - { 0x1FC39320u, SCPH1001_func_1FC39300_cont_BFC39320 }, - { 0x1FC39340u, SCPH1001_func_1FC39300_cont_BFC39340 }, - { 0x1FC39348u, SCPH1001_func_1FC39300_cont_BFC39348 }, - { 0x1FC3934Cu, SCPH1001_func_1FC39300_cont_BFC3934C }, - { 0x1FC3936Cu, SCPH1001_func_1FC39300_cont_BFC3936C }, - { 0x1FC39374u, SCPH1001_func_1FC39300_cont_BFC39374 }, - { 0x1FC39378u, SCPH1001_func_1FC39300_cont_BFC39378 }, - { 0x1FC393A8u, SCPH1001_func_1FC39300_cont_BFC393A8 }, - { 0x1FC393B0u, SCPH1001_func_1FC39300_cont_BFC393B0 }, - { 0x1FC393B8u, SCPH1001_func_1FC39300_cont_BFC393B8 }, - { 0x1FC393BCu, SCPH1001_func_1FC39300_cont_BFC393BC }, - { 0x1FC393CCu, SCPH1001_func_1FC393CC }, - { 0x1FC393D8u, SCPH1001_func_1FC393CC_cont_BFC393D8 }, - { 0x1FC393F4u, SCPH1001_func_1FC393CC_cont_BFC393F4 }, - { 0x1FC39410u, SCPH1001_func_1FC39410 }, - { 0x1FC39440u, SCPH1001_func_1FC39410_cont_BFC39440 }, - { 0x1FC39454u, SCPH1001_func_1FC39410_cont_BFC39454 }, - { 0x1FC39458u, SCPH1001_func_1FC39410_cont_BFC39458 }, - { 0x1FC39464u, SCPH1001_func_1FC39410_cont_BFC39464 }, - { 0x1FC39478u, SCPH1001_func_1FC39410_cont_BFC39478 }, - { 0x1FC3947Cu, SCPH1001_func_1FC39410_cont_BFC3947C }, - { 0x1FC39488u, SCPH1001_func_1FC39410_cont_BFC39488 }, - { 0x1FC3948Cu, SCPH1001_func_1FC39410_cont_BFC3948C }, - { 0x1FC39494u, SCPH1001_func_1FC39410_cont_BFC39494 }, - { 0x1FC3949Cu, SCPH1001_func_1FC39410_cont_BFC3949C }, - { 0x1FC394A4u, SCPH1001_func_1FC39410_cont_BFC394A4 }, - { 0x1FC394ACu, SCPH1001_func_1FC39410_cont_BFC394AC }, - { 0x1FC394C0u, SCPH1001_func_1FC39410_cont_BFC394C0 }, - { 0x1FC394DCu, SCPH1001_func_1FC39410_cont_BFC394DC }, - { 0x1FC394ECu, SCPH1001_func_1FC394EC }, - { 0x1FC3952Cu, SCPH1001_func_1FC394EC_cont_BFC3952C }, - { 0x1FC3953Cu, SCPH1001_func_1FC394EC_cont_BFC3953C }, - { 0x1FC3954Cu, SCPH1001_func_1FC3954C }, - { 0x1FC395A0u, SCPH1001_func_1FC3954C_cont_BFC395A0 }, - { 0x1FC395A8u, SCPH1001_func_1FC3954C_cont_BFC395A8 }, - { 0x1FC395ACu, SCPH1001_func_1FC3954C_cont_BFC395AC }, - { 0x1FC395CCu, SCPH1001_func_1FC3954C_cont_BFC395CC }, - { 0x1FC395ECu, SCPH1001_func_1FC395EC }, - { 0x1FC39630u, SCPH1001_func_1FC39630 }, - { 0x1FC3964Cu, SCPH1001_func_1FC39630_cont_BFC3964C }, - { 0x1FC39664u, SCPH1001_func_1FC39630_cont_BFC39664 }, - { 0x1FC39694u, SCPH1001_func_1FC39630_cont_BFC39694 }, - { 0x1FC39698u, SCPH1001_func_1FC39630_cont_BFC39698 }, - { 0x1FC396C0u, SCPH1001_func_1FC39630_cont_BFC396C0 }, - { 0x1FC396D0u, SCPH1001_func_1FC396D0 }, - { 0x1FC396E8u, SCPH1001_func_1FC396E8 }, - { 0x1FC396FCu, SCPH1001_func_1FC396E8_cont_BFC396FC }, - { 0x1FC39708u, SCPH1001_func_1FC396E8_cont_BFC39708 }, - { 0x1FC39740u, SCPH1001_func_1FC396E8_cont_BFC39740 }, - { 0x1FC39748u, SCPH1001_func_1FC396E8_cont_BFC39748 }, - { 0x1FC39780u, SCPH1001_func_1FC396E8_cont_BFC39780 }, - { 0x1FC39784u, SCPH1001_func_1FC396E8_cont_BFC39784 }, - { 0x1FC39804u, SCPH1001_func_1FC39804 }, - { 0x1FC398D4u, SCPH1001_func_1FC398D4 }, - { 0x1FC398DCu, SCPH1001_func_1FC398D4_cont_BFC398DC }, - { 0x1FC398F4u, SCPH1001_func_1FC398D4_cont_BFC398F4 }, - { 0x1FC39910u, SCPH1001_func_1FC39910 }, - { 0x1FC39918u, SCPH1001_func_1FC39910_cont_BFC39918 }, - { 0x1FC39930u, SCPH1001_func_1FC39910_cont_BFC39930 }, - { 0x1FC3994Cu, SCPH1001_func_1FC3994C }, - { 0x1FC3999Cu, SCPH1001_func_1FC3999C }, - { 0x1FC399ECu, SCPH1001_func_1FC399EC }, - { 0x1FC39A14u, SCPH1001_func_1FC39A14 }, - { 0x1FC39A3Cu, SCPH1001_func_1FC39A3C }, - { 0x1FC39ADCu, SCPH1001_func_1FC39ADC }, - { 0x1FC39BA4u, SCPH1001_func_1FC39BA4 }, - { 0x1FC39BCCu, SCPH1001_func_1FC39BCC }, - { 0x1FC39D38u, SCPH1001_func_1FC39D38 }, - { 0x1FC39D70u, SCPH1001_func_1FC39D38_cont_BFC39D70 }, - { 0x1FC39D8Cu, SCPH1001_func_1FC39D38_cont_BFC39D8C }, - { 0x1FC39DB4u, SCPH1001_func_1FC39D38_cont_BFC39DB4 }, - { 0x1FC39DCCu, SCPH1001_func_1FC39D38_cont_BFC39DCC }, - { 0x1FC39DE4u, SCPH1001_func_1FC39D38_cont_BFC39DE4 }, - { 0x1FC39DECu, SCPH1001_func_1FC39D38_cont_BFC39DEC }, - { 0x1FC39DF4u, SCPH1001_func_1FC39D38_cont_BFC39DF4 }, - { 0x1FC39E30u, SCPH1001_func_1FC39D38_cont_BFC39E30 }, - { 0x1FC39E38u, SCPH1001_func_1FC39D38_cont_BFC39E38 }, - { 0x1FC39E74u, SCPH1001_func_1FC39D38_cont_BFC39E74 }, - { 0x1FC39E78u, SCPH1001_func_1FC39D38_cont_BFC39E78 }, - { 0x1FC39E84u, SCPH1001_func_1FC39E84 }, - { 0x1FC39EBCu, SCPH1001_func_1FC39E84_cont_BFC39EBC }, - { 0x1FC39EE4u, SCPH1001_func_1FC39E84_cont_BFC39EE4 }, - { 0x1FC39EFCu, SCPH1001_func_1FC39E84_cont_BFC39EFC }, - { 0x1FC39F14u, SCPH1001_func_1FC39E84_cont_BFC39F14 }, - { 0x1FC39F30u, SCPH1001_func_1FC39F30 }, - { 0x1FC39F40u, SCPH1001_func_1FC39F30_cont_BFC39F40 }, - { 0x1FC39F50u, SCPH1001_func_1FC39F30_cont_BFC39F50 }, - { 0x1FC39F58u, SCPH1001_func_1FC39F30_cont_BFC39F58 }, - { 0x1FC39F60u, SCPH1001_func_1FC39F30_cont_BFC39F60 }, - { 0x1FC39F80u, SCPH1001_func_1FC39F30_cont_BFC39F80 }, - { 0x1FC39F90u, SCPH1001_func_1FC39F90 }, - { 0x1FC39FA0u, SCPH1001_func_1FC39F90_cont_BFC39FA0 }, - { 0x1FC39FACu, SCPH1001_func_1FC39F90_cont_BFC39FAC }, - { 0x1FC39FB4u, SCPH1001_func_1FC39F90_cont_BFC39FB4 }, - { 0x1FC39FBCu, SCPH1001_func_1FC39F90_cont_BFC39FBC }, - { 0x1FC39FD8u, SCPH1001_func_1FC39F90_cont_BFC39FD8 }, - { 0x1FC39FDCu, SCPH1001_func_1FC39F90_cont_BFC39FDC }, - { 0x1FC39FE4u, SCPH1001_func_1FC39FE4 }, - { 0x1FC3A014u, SCPH1001_func_1FC39FE4_cont_BFC3A014 }, - { 0x1FC3A020u, SCPH1001_func_1FC39FE4_cont_BFC3A020 }, - { 0x1FC3A02Cu, SCPH1001_func_1FC39FE4_cont_BFC3A02C }, - { 0x1FC3A034u, SCPH1001_func_1FC39FE4_cont_BFC3A034 }, - { 0x1FC3A044u, SCPH1001_func_1FC39FE4_cont_BFC3A044 }, - { 0x1FC3A060u, SCPH1001_func_1FC39FE4_cont_BFC3A060 }, - { 0x1FC3A06Cu, SCPH1001_func_1FC39FE4_cont_BFC3A06C }, - { 0x1FC3A078u, SCPH1001_func_1FC39FE4_cont_BFC3A078 }, - { 0x1FC3A080u, SCPH1001_func_1FC39FE4_cont_BFC3A080 }, - { 0x1FC3A084u, SCPH1001_func_1FC39FE4_cont_BFC3A084 }, - { 0x1FC3A094u, SCPH1001_func_1FC3A094 }, - { 0x1FC3A0C8u, SCPH1001_func_1FC3A094_cont_BFC3A0C8 }, - { 0x1FC3A0E4u, SCPH1001_func_1FC3A094_cont_BFC3A0E4 }, - { 0x1FC3A114u, SCPH1001_func_1FC3A094_cont_BFC3A114 }, - { 0x1FC3A120u, SCPH1001_func_1FC3A094_cont_BFC3A120 }, - { 0x1FC3A13Cu, SCPH1001_func_1FC3A094_cont_BFC3A13C }, - { 0x1FC3A150u, SCPH1001_func_1FC3A094_cont_BFC3A150 }, - { 0x1FC3A164u, SCPH1001_func_1FC3A094_cont_BFC3A164 }, - { 0x1FC3A16Cu, SCPH1001_func_1FC3A094_cont_BFC3A16C }, - { 0x1FC3A178u, SCPH1001_func_1FC3A094_cont_BFC3A178 }, - { 0x1FC3A184u, SCPH1001_func_1FC3A094_cont_BFC3A184 }, - { 0x1FC3A198u, SCPH1001_func_1FC3A094_cont_BFC3A198 }, - { 0x1FC3A1ACu, SCPH1001_func_1FC3A094_cont_BFC3A1AC }, - { 0x1FC3A1C8u, SCPH1001_func_1FC3A094_cont_BFC3A1C8 }, - { 0x1FC3A1DCu, SCPH1001_func_1FC3A094_cont_BFC3A1DC }, - { 0x1FC3A1ECu, SCPH1001_func_1FC3A094_cont_BFC3A1EC }, - { 0x1FC3A1F8u, SCPH1001_func_1FC3A094_cont_BFC3A1F8 }, - { 0x1FC3A210u, SCPH1001_func_1FC3A094_cont_BFC3A210 }, - { 0x1FC3A228u, SCPH1001_func_1FC3A228 }, - { 0x1FC3A244u, SCPH1001_func_1FC3A228_cont_BFC3A244 }, - { 0x1FC3A250u, SCPH1001_func_1FC3A228_cont_BFC3A250 }, - { 0x1FC3A268u, SCPH1001_func_1FC3A228_cont_BFC3A268 }, - { 0x1FC3A274u, SCPH1001_func_1FC3A228_cont_BFC3A274 }, - { 0x1FC3A2A4u, SCPH1001_func_1FC3A228_cont_BFC3A2A4 }, - { 0x1FC3A2ACu, SCPH1001_func_1FC3A228_cont_BFC3A2AC }, - { 0x1FC3A2B0u, SCPH1001_func_1FC3A228_cont_BFC3A2B0 }, - { 0x1FC3A2C0u, SCPH1001_func_1FC3A2C0 }, - { 0x1FC3A2D4u, SCPH1001_func_1FC3A2C0_cont_BFC3A2D4 }, - { 0x1FC3A2F4u, SCPH1001_func_1FC3A2C0_cont_BFC3A2F4 }, - { 0x1FC3A308u, SCPH1001_func_1FC3A2C0_cont_BFC3A308 }, - { 0x1FC3A31Cu, SCPH1001_func_1FC3A2C0_cont_BFC3A31C }, - { 0x1FC3A334u, SCPH1001_func_1FC3A2C0_cont_BFC3A334 }, - { 0x1FC3A33Cu, SCPH1001_func_1FC3A2C0_cont_BFC3A33C }, - { 0x1FC3A340u, SCPH1001_func_1FC3A2C0_cont_BFC3A340 }, - { 0x1FC3A344u, SCPH1001_func_1FC3A2C0_cont_BFC3A344 }, - { 0x1FC3A358u, SCPH1001_func_1FC3A2C0_cont_BFC3A358 }, - { 0x1FC3A36Cu, SCPH1001_func_1FC3A2C0_cont_BFC3A36C }, - { 0x1FC3A3B8u, SCPH1001_func_1FC3A2C0_cont_BFC3A3B8 }, - { 0x1FC3A3BCu, SCPH1001_func_1FC3A2C0_cont_BFC3A3BC }, - { 0x1FC3A3CCu, SCPH1001_func_1FC3A2C0_cont_BFC3A3CC }, - { 0x1FC3A3F4u, SCPH1001_func_1FC3A2C0_cont_BFC3A3F4 }, - { 0x1FC3A44Cu, SCPH1001_func_1FC3A44C }, - { 0x1FC3A480u, SCPH1001_func_1FC3A44C_cont_BFC3A480 }, - { 0x1FC3A498u, SCPH1001_func_1FC3A44C_cont_BFC3A498 }, - { 0x1FC3A4ACu, SCPH1001_func_1FC3A44C_cont_BFC3A4AC }, - { 0x1FC3A4CCu, SCPH1001_func_1FC3A44C_cont_BFC3A4CC }, - { 0x1FC3A4DCu, SCPH1001_func_1FC3A44C_cont_BFC3A4DC }, - { 0x1FC3A4E4u, SCPH1001_func_1FC3A44C_cont_BFC3A4E4 }, - { 0x1FC3A4F8u, SCPH1001_func_1FC3A44C_cont_BFC3A4F8 }, - { 0x1FC3A508u, SCPH1001_func_1FC3A44C_cont_BFC3A508 }, - { 0x1FC3A510u, SCPH1001_func_1FC3A44C_cont_BFC3A510 }, - { 0x1FC3A518u, SCPH1001_func_1FC3A44C_cont_BFC3A518 }, - { 0x1FC3A524u, SCPH1001_func_1FC3A44C_cont_BFC3A524 }, - { 0x1FC3A52Cu, SCPH1001_func_1FC3A44C_cont_BFC3A52C }, - { 0x1FC3A540u, SCPH1001_func_1FC3A44C_cont_BFC3A540 }, - { 0x1FC3A550u, SCPH1001_func_1FC3A44C_cont_BFC3A550 }, - { 0x1FC3A560u, SCPH1001_func_1FC3A44C_cont_BFC3A560 }, - { 0x1FC3A568u, SCPH1001_func_1FC3A44C_cont_BFC3A568 }, - { 0x1FC3A57Cu, SCPH1001_func_1FC3A44C_cont_BFC3A57C }, - { 0x1FC3A584u, SCPH1001_func_1FC3A44C_cont_BFC3A584 }, - { 0x1FC3A5A0u, SCPH1001_func_1FC3A44C_cont_BFC3A5A0 }, - { 0x1FC3A5A8u, SCPH1001_func_1FC3A44C_cont_BFC3A5A8 }, - { 0x1FC3A5B0u, SCPH1001_func_1FC3A44C_cont_BFC3A5B0 }, - { 0x1FC3A5B8u, SCPH1001_func_1FC3A44C_cont_BFC3A5B8 }, - { 0x1FC3A5C0u, SCPH1001_func_1FC3A44C_cont_BFC3A5C0 }, - { 0x1FC3A5C4u, SCPH1001_func_1FC3A44C_cont_BFC3A5C4 }, - { 0x1FC3A5D0u, SCPH1001_func_1FC3A44C_cont_BFC3A5D0 }, - { 0x1FC3A5D4u, SCPH1001_func_1FC3A44C_cont_BFC3A5D4 }, - { 0x1FC3A5F4u, SCPH1001_func_1FC3A44C_cont_BFC3A5F4 }, - { 0x1FC3A608u, SCPH1001_func_1FC3A44C_cont_BFC3A608 }, - { 0x1FC3A610u, SCPH1001_func_1FC3A44C_cont_BFC3A610 }, - { 0x1FC3A624u, SCPH1001_func_1FC3A44C_cont_BFC3A624 }, - { 0x1FC3A628u, SCPH1001_func_1FC3A44C_cont_BFC3A628 }, - { 0x1FC3A638u, SCPH1001_func_1FC3A638 }, - { 0x1FC3A714u, SCPH1001_func_1FC3A638_cont_BFC3A714 }, - { 0x1FC3A730u, SCPH1001_func_1FC3A638_cont_BFC3A730 }, - { 0x1FC3A734u, SCPH1001_func_1FC3A638_cont_BFC3A734 }, - { 0x1FC3A74Cu, SCPH1001_func_1FC3A638_cont_BFC3A74C }, - { 0x1FC3A764u, SCPH1001_func_1FC3A638_cont_BFC3A764 }, - { 0x1FC3A778u, SCPH1001_func_1FC3A638_cont_BFC3A778 }, - { 0x1FC3A77Cu, SCPH1001_func_1FC3A638_cont_BFC3A77C }, - { 0x1FC3A78Cu, SCPH1001_func_1FC3A638_cont_BFC3A78C }, - { 0x1FC3A7A4u, SCPH1001_func_1FC3A638_cont_BFC3A7A4 }, - { 0x1FC3A7B8u, SCPH1001_func_1FC3A638_cont_BFC3A7B8 }, - { 0x1FC3A7BCu, SCPH1001_func_1FC3A638_cont_BFC3A7BC }, - { 0x1FC3A7CCu, SCPH1001_func_1FC3A638_cont_BFC3A7CC }, - { 0x1FC3A7E0u, SCPH1001_func_1FC3A638_cont_BFC3A7E0 }, - { 0x1FC3A7E8u, SCPH1001_func_1FC3A638_cont_BFC3A7E8 }, - { 0x1FC3A7F0u, SCPH1001_func_1FC3A638_cont_BFC3A7F0 }, - { 0x1FC3A7F4u, SCPH1001_func_1FC3A638_cont_BFC3A7F4 }, - { 0x1FC3A894u, SCPH1001_func_1FC3A638_cont_BFC3A894 }, - { 0x1FC3A8A8u, SCPH1001_func_1FC3A638_cont_BFC3A8A8 }, - { 0x1FC3A8BCu, SCPH1001_func_1FC3A638_cont_BFC3A8BC }, - { 0x1FC3A8D4u, SCPH1001_func_1FC3A638_cont_BFC3A8D4 }, - { 0x1FC3A900u, SCPH1001_func_1FC3A638_cont_BFC3A900 }, - { 0x1FC3A930u, SCPH1001_func_1FC3A638_cont_BFC3A930 }, - { 0x1FC3A95Cu, SCPH1001_func_1FC3A95C }, - { 0x1FC3A974u, SCPH1001_func_1FC3A95C_cont_BFC3A974 }, - { 0x1FC3A988u, SCPH1001_func_1FC3A95C_cont_BFC3A988 }, - { 0x1FC3A98Cu, SCPH1001_func_1FC3A95C_cont_BFC3A98C }, - { 0x1FC3A99Cu, SCPH1001_func_1FC3A95C_cont_BFC3A99C }, - { 0x1FC3A9ECu, SCPH1001_func_1FC3A9EC }, - { 0x1FC3AA20u, SCPH1001_func_1FC3A9EC_cont_BFC3AA20 }, - { 0x1FC3AA24u, SCPH1001_func_1FC3A9EC_cont_BFC3AA24 }, - { 0x1FC3AA4Cu, SCPH1001_func_1FC3A9EC_cont_BFC3AA4C }, - { 0x1FC3AA50u, SCPH1001_func_1FC3A9EC_cont_BFC3AA50 }, - { 0x1FC3AA9Cu, SCPH1001_func_1FC3A9EC_cont_BFC3AA9C }, - { 0x1FC3AAA8u, SCPH1001_func_1FC3A9EC_cont_BFC3AAA8 }, - { 0x1FC3AAB0u, SCPH1001_func_1FC3A9EC_cont_BFC3AAB0 }, - { 0x1FC3AABCu, SCPH1001_func_1FC3A9EC_cont_BFC3AABC }, - { 0x1FC3AAC4u, SCPH1001_func_1FC3AAC4 }, - { 0x1FC3AAE0u, SCPH1001_func_1FC3AAC4_cont_BFC3AAE0 }, - { 0x1FC3AAF4u, SCPH1001_func_1FC3AAC4_cont_BFC3AAF4 }, - { 0x1FC3AB20u, SCPH1001_func_1FC3AAC4_cont_BFC3AB20 }, - { 0x1FC3AB34u, SCPH1001_func_1FC3AAC4_cont_BFC3AB34 }, - { 0x1FC3AB50u, SCPH1001_func_1FC3AAC4_cont_BFC3AB50 }, - { 0x1FC3AB68u, SCPH1001_func_1FC3AAC4_cont_BFC3AB68 }, - { 0x1FC3AB70u, SCPH1001_func_1FC3AB70 }, - { 0x1FC3ABB4u, SCPH1001_func_1FC3AB70_cont_BFC3ABB4 }, - { 0x1FC3ABD8u, SCPH1001_func_1FC3AB70_cont_BFC3ABD8 }, - { 0x1FC3ABDCu, SCPH1001_func_1FC3AB70_cont_BFC3ABDC }, - { 0x1FC3ABF4u, SCPH1001_func_1FC3AB70_cont_BFC3ABF4 }, - { 0x1FC3AC18u, SCPH1001_func_1FC3AB70_cont_BFC3AC18 }, - { 0x1FC3AC1Cu, SCPH1001_func_1FC3AB70_cont_BFC3AC1C }, - { 0x1FC3AC34u, SCPH1001_func_1FC3AB70_cont_BFC3AC34 }, - { 0x1FC3AC9Cu, SCPH1001_func_1FC3AC9C }, - { 0x1FC3ACB0u, SCPH1001_func_1FC3AC9C_cont_BFC3ACB0 }, - { 0x1FC3ACB8u, SCPH1001_func_1FC3AC9C_cont_BFC3ACB8 }, - { 0x1FC3ACD0u, SCPH1001_func_1FC3AC9C_cont_BFC3ACD0 }, - { 0x1FC3ACE8u, SCPH1001_func_1FC3AC9C_cont_BFC3ACE8 }, - { 0x1FC3ACF4u, SCPH1001_func_1FC3AC9C_cont_BFC3ACF4 }, - { 0x1FC3AD68u, SCPH1001_func_1FC3AD68 }, - { 0x1FC3ADA0u, SCPH1001_func_1FC3AD68_cont_BFC3ADA0 }, - { 0x1FC3ADA8u, SCPH1001_func_1FC3AD68_cont_BFC3ADA8 }, - { 0x1FC3ADB0u, SCPH1001_func_1FC3AD68_cont_BFC3ADB0 }, - { 0x1FC3AE34u, SCPH1001_func_1FC3AD68_cont_BFC3AE34 }, - { 0x1FC3AE48u, SCPH1001_func_1FC3AD68_cont_BFC3AE48 }, - { 0x1FC3AE50u, SCPH1001_func_1FC3AD68_cont_BFC3AE50 }, - { 0x1FC3AE60u, SCPH1001_func_1FC3AD68_cont_BFC3AE60 }, - { 0x1FC3AE68u, SCPH1001_func_1FC3AD68_cont_BFC3AE68 }, - { 0x1FC3AE6Cu, SCPH1001_func_1FC3AD68_cont_BFC3AE6C }, - { 0x1FC3AE74u, SCPH1001_func_1FC3AD68_cont_BFC3AE74 }, - { 0x1FC3AE84u, SCPH1001_func_1FC3AD68_cont_BFC3AE84 }, - { 0x1FC3AEB0u, SCPH1001_func_1FC3AD68_cont_BFC3AEB0 }, - { 0x1FC3AF44u, SCPH1001_func_1FC3AD68_cont_BFC3AF44 }, - { 0x1FC3AF68u, SCPH1001_func_1FC3AD68_cont_BFC3AF68 }, - { 0x1FC3AF70u, SCPH1001_func_1FC3AD68_cont_BFC3AF70 }, - { 0x1FC3AFD8u, SCPH1001_func_1FC3AD68_cont_BFC3AFD8 }, - { 0x1FC3AFE0u, SCPH1001_func_1FC3AD68_cont_BFC3AFE0 }, - { 0x1FC3AFECu, SCPH1001_func_1FC3AD68_cont_BFC3AFEC }, - { 0x1FC3B004u, SCPH1001_func_1FC3AD68_cont_BFC3B004 }, - { 0x1FC3B018u, SCPH1001_func_1FC3AD68_cont_BFC3B018 }, - { 0x1FC3B028u, SCPH1001_func_1FC3AD68_cont_BFC3B028 }, - { 0x1FC3B02Cu, SCPH1001_func_1FC3AD68_cont_BFC3B02C }, - { 0x1FC3B03Cu, SCPH1001_func_1FC3AD68_cont_BFC3B03C }, - { 0x1FC3B054u, SCPH1001_func_1FC3B054 }, - { 0x1FC3B0A8u, SCPH1001_func_1FC3B054_cont_BFC3B0A8 }, - { 0x1FC3B0B8u, SCPH1001_func_1FC3B054_cont_BFC3B0B8 }, - { 0x1FC3B0D4u, SCPH1001_func_1FC3B054_cont_BFC3B0D4 }, - { 0x1FC3B0E4u, SCPH1001_func_1FC3B054_cont_BFC3B0E4 }, - { 0x1FC3B0F4u, SCPH1001_func_1FC3B054_cont_BFC3B0F4 }, - { 0x1FC3B104u, SCPH1001_func_1FC3B054_cont_BFC3B104 }, - { 0x1FC3B110u, SCPH1001_func_1FC3B054_cont_BFC3B110 }, - { 0x1FC3B118u, SCPH1001_func_1FC3B054_cont_BFC3B118 }, - { 0x1FC3B12Cu, SCPH1001_func_1FC3B054_cont_BFC3B12C }, - { 0x1FC3B134u, SCPH1001_func_1FC3B054_cont_BFC3B134 }, - { 0x1FC3B160u, SCPH1001_func_1FC3B160 }, - { 0x1FC3B174u, SCPH1001_func_1FC3B160_cont_BFC3B174 }, - { 0x1FC3B17Cu, SCPH1001_func_1FC3B160_cont_BFC3B17C }, - { 0x1FC3B1B8u, SCPH1001_func_1FC3B160_cont_BFC3B1B8 }, - { 0x1FC3B30Cu, SCPH1001_func_1FC3B30C }, - { 0x1FC3B320u, SCPH1001_func_1FC3B30C_cont_BFC3B320 }, - { 0x1FC3B338u, SCPH1001_func_1FC3B30C_cont_BFC3B338 }, - { 0x1FC3B350u, SCPH1001_func_1FC3B30C_cont_BFC3B350 }, - { 0x1FC3B358u, SCPH1001_func_1FC3B30C_cont_BFC3B358 }, - { 0x1FC3B368u, SCPH1001_func_1FC3B368 }, - { 0x1FC3B388u, SCPH1001_func_1FC3B368_cont_BFC3B388 }, - { 0x1FC3B39Cu, SCPH1001_func_1FC3B368_cont_BFC3B39C }, - { 0x1FC3B3A4u, SCPH1001_func_1FC3B368_cont_BFC3B3A4 }, - { 0x1FC3B3B4u, SCPH1001_func_1FC3B368_cont_BFC3B3B4 }, - { 0x1FC3B3C4u, SCPH1001_func_1FC3B368_cont_BFC3B3C4 }, - { 0x1FC3B3CCu, SCPH1001_func_1FC3B368_cont_BFC3B3CC }, - { 0x1FC3B3D4u, SCPH1001_func_1FC3B368_cont_BFC3B3D4 }, - { 0x1FC3B3E0u, SCPH1001_func_1FC3B368_cont_BFC3B3E0 }, - { 0x1FC3B3ECu, SCPH1001_func_1FC3B368_cont_BFC3B3EC }, - { 0x1FC3B3FCu, SCPH1001_func_1FC3B368_cont_BFC3B3FC }, - { 0x1FC3B424u, SCPH1001_func_1FC3B368_cont_BFC3B424 }, - { 0x1FC3B430u, SCPH1001_func_1FC3B368_cont_BFC3B430 }, - { 0x1FC3B438u, SCPH1001_func_1FC3B368_cont_BFC3B438 }, - { 0x1FC3B444u, SCPH1001_func_1FC3B368_cont_BFC3B444 }, - { 0x1FC3B460u, SCPH1001_func_1FC3B368_cont_BFC3B460 }, - { 0x1FC3B46Cu, SCPH1001_func_1FC3B368_cont_BFC3B46C }, - { 0x1FC3B470u, SCPH1001_func_1FC3B368_cont_BFC3B470 }, - { 0x1FC3B490u, SCPH1001_func_1FC3B368_cont_BFC3B490 }, - { 0x1FC3B498u, SCPH1001_func_1FC3B368_cont_BFC3B498 }, - { 0x1FC3B4A8u, SCPH1001_func_1FC3B368_cont_BFC3B4A8 }, - { 0x1FC3B4C4u, SCPH1001_func_1FC3B368_cont_BFC3B4C4 }, - { 0x1FC3B4C8u, SCPH1001_func_1FC3B368_cont_BFC3B4C8 }, - { 0x1FC3B4F0u, SCPH1001_func_1FC3B368_cont_BFC3B4F0 }, - { 0x1FC3B4FCu, SCPH1001_func_1FC3B368_cont_BFC3B4FC }, - { 0x1FC3B50Cu, SCPH1001_func_1FC3B368_cont_BFC3B50C }, - { 0x1FC3B528u, SCPH1001_func_1FC3B368_cont_BFC3B528 }, - { 0x1FC3B530u, SCPH1001_func_1FC3B368_cont_BFC3B530 }, - { 0x1FC3B544u, SCPH1001_func_1FC3B368_cont_BFC3B544 }, - { 0x1FC3B548u, SCPH1001_func_1FC3B368_cont_BFC3B548 }, - { 0x1FC3B554u, SCPH1001_func_1FC3B368_cont_BFC3B554 }, - { 0x1FC3B558u, SCPH1001_func_1FC3B368_cont_BFC3B558 }, - { 0x1FC3B560u, SCPH1001_func_1FC3B368_cont_BFC3B560 }, - { 0x1FC3B57Cu, SCPH1001_func_1FC3B368_cont_BFC3B57C }, - { 0x1FC3B58Cu, SCPH1001_func_1FC3B368_cont_BFC3B58C }, - { 0x1FC3B5A8u, SCPH1001_func_1FC3B368_cont_BFC3B5A8 }, - { 0x1FC3B5ACu, SCPH1001_func_1FC3B368_cont_BFC3B5AC }, - { 0x1FC3B5E0u, SCPH1001_func_1FC3B368_cont_BFC3B5E0 }, - { 0x1FC3B5ECu, SCPH1001_func_1FC3B368_cont_BFC3B5EC }, - { 0x1FC3B610u, SCPH1001_func_1FC3B368_cont_BFC3B610 }, - { 0x1FC3B614u, SCPH1001_func_1FC3B368_cont_BFC3B614 }, - { 0x1FC3B62Cu, SCPH1001_func_1FC3B368_cont_BFC3B62C }, - { 0x1FC3B634u, SCPH1001_func_1FC3B368_cont_BFC3B634 }, - { 0x1FC3B668u, SCPH1001_func_1FC3B368_cont_BFC3B668 }, - { 0x1FC3B674u, SCPH1001_func_1FC3B368_cont_BFC3B674 }, - { 0x1FC3B698u, SCPH1001_func_1FC3B368_cont_BFC3B698 }, - { 0x1FC3B6A4u, SCPH1001_func_1FC3B368_cont_BFC3B6A4 }, - { 0x1FC3B6ACu, SCPH1001_func_1FC3B368_cont_BFC3B6AC }, - { 0x1FC3B6B8u, SCPH1001_func_1FC3B368_cont_BFC3B6B8 }, - { 0x1FC3B6C4u, SCPH1001_func_1FC3B368_cont_BFC3B6C4 }, - { 0x1FC3B6ECu, SCPH1001_func_1FC3B368_cont_BFC3B6EC }, - { 0x1FC3B70Cu, SCPH1001_func_1FC3B368_cont_BFC3B70C }, - { 0x1FC3B71Cu, SCPH1001_func_1FC3B368_cont_BFC3B71C }, - { 0x1FC3B738u, SCPH1001_func_1FC3B368_cont_BFC3B738 }, - { 0x1FC3B750u, SCPH1001_func_1FC3B368_cont_BFC3B750 }, - { 0x1FC3B760u, SCPH1001_func_1FC3B368_cont_BFC3B760 }, - { 0x1FC3B77Cu, SCPH1001_func_1FC3B368_cont_BFC3B77C }, - { 0x1FC3B780u, SCPH1001_func_1FC3B368_cont_BFC3B780 }, - { 0x1FC3B798u, SCPH1001_func_1FC3B368_cont_BFC3B798 }, - { 0x1FC3B7ACu, SCPH1001_func_1FC3B368_cont_BFC3B7AC }, - { 0x1FC3B7B4u, SCPH1001_func_1FC3B368_cont_BFC3B7B4 }, - { 0x1FC3B7B8u, SCPH1001_func_1FC3B368_cont_BFC3B7B8 }, - { 0x1FC3B7C0u, SCPH1001_func_1FC3B368_cont_BFC3B7C0 }, - { 0x1FC3B7D8u, SCPH1001_func_1FC3B368_cont_BFC3B7D8 }, - { 0x1FC3B7DCu, SCPH1001_func_1FC3B368_cont_BFC3B7DC }, - { 0x1FC3B7F0u, SCPH1001_func_1FC3B368_cont_BFC3B7F0 }, - { 0x1FC3B808u, SCPH1001_func_1FC3B368_cont_BFC3B808 }, - { 0x1FC3B80Cu, SCPH1001_func_1FC3B368_cont_BFC3B80C }, - { 0x1FC3B81Cu, SCPH1001_func_1FC3B368_cont_BFC3B81C }, - { 0x1FC3B82Cu, SCPH1001_func_1FC3B368_cont_BFC3B82C }, - { 0x1FC3B84Cu, SCPH1001_func_1FC3B368_cont_BFC3B84C }, - { 0x1FC3B85Cu, SCPH1001_func_1FC3B85C }, - { 0x1FC3B87Cu, SCPH1001_func_1FC3B85C_cont_BFC3B87C }, - { 0x1FC3B884u, SCPH1001_func_1FC3B85C_cont_BFC3B884 }, - { 0x1FC3B88Cu, SCPH1001_func_1FC3B85C_cont_BFC3B88C }, - { 0x1FC3B8A8u, SCPH1001_func_1FC3B85C_cont_BFC3B8A8 }, - { 0x1FC3B8B0u, SCPH1001_func_1FC3B85C_cont_BFC3B8B0 }, - { 0x1FC3B8B4u, SCPH1001_func_1FC3B85C_cont_BFC3B8B4 }, - { 0x1FC3B8D0u, SCPH1001_func_1FC3B85C_cont_BFC3B8D0 }, - { 0x1FC3B8DCu, SCPH1001_func_1FC3B85C_cont_BFC3B8DC }, - { 0x1FC3B8FCu, SCPH1001_func_1FC3B85C_cont_BFC3B8FC }, - { 0x1FC3B914u, SCPH1001_func_1FC3B85C_cont_BFC3B914 }, - { 0x1FC3B91Cu, SCPH1001_func_1FC3B85C_cont_BFC3B91C }, - { 0x1FC3B920u, SCPH1001_func_1FC3B85C_cont_BFC3B920 }, - { 0x1FC3B92Cu, SCPH1001_func_1FC3B85C_cont_BFC3B92C }, - { 0x1FC3B93Cu, SCPH1001_func_1FC3B93C }, - { 0x1FC3B950u, SCPH1001_func_1FC3B93C_cont_BFC3B950 }, - { 0x1FC3B964u, SCPH1001_func_1FC3B964 }, - { 0x1FC3B9BCu, SCPH1001_func_1FC3B964_cont_BFC3B9BC }, - { 0x1FC3B9CCu, SCPH1001_func_1FC3B964_cont_BFC3B9CC }, - { 0x1FC3BA4Cu, SCPH1001_func_1FC3B964_cont_BFC3BA4C }, - { 0x1FC3BA58u, SCPH1001_func_1FC3B964_cont_BFC3BA58 }, - { 0x1FC3BA60u, SCPH1001_func_1FC3B964_cont_BFC3BA60 }, - { 0x1FC3BA6Cu, SCPH1001_func_1FC3B964_cont_BFC3BA6C }, - { 0x1FC3BA74u, SCPH1001_func_1FC3BA74 }, - { 0x1FC3BA98u, SCPH1001_func_1FC3BA74_cont_BFC3BA98 }, - { 0x1FC3BAA4u, SCPH1001_func_1FC3BA74_cont_BFC3BAA4 }, - { 0x1FC3BAACu, SCPH1001_func_1FC3BA74_cont_BFC3BAAC }, - { 0x1FC3BADCu, SCPH1001_func_1FC3BA74_cont_BFC3BADC }, - { 0x1FC3BAF0u, SCPH1001_func_1FC3BA74_cont_BFC3BAF0 }, - { 0x1FC3BAFCu, SCPH1001_func_1FC3BA74_cont_BFC3BAFC }, - { 0x1FC3BB10u, SCPH1001_func_1FC3BA74_cont_BFC3BB10 }, - { 0x1FC3BB14u, SCPH1001_func_1FC3BA74_cont_BFC3BB14 }, - { 0x1FC3BB20u, SCPH1001_func_1FC3BA74_cont_BFC3BB20 }, - { 0x1FC3BB28u, SCPH1001_func_1FC3BA74_cont_BFC3BB28 }, - { 0x1FC3BB2Cu, SCPH1001_func_1FC3BA74_cont_BFC3BB2C }, - { 0x1FC3BB3Cu, SCPH1001_func_1FC3BA74_cont_BFC3BB3C }, - { 0x1FC3BB40u, SCPH1001_func_1FC3BA74_cont_BFC3BB40 }, - { 0x1FC3BB60u, SCPH1001_func_1FC3BA74_cont_BFC3BB60 }, - { 0x1FC3BB64u, SCPH1001_func_1FC3BA74_cont_BFC3BB64 }, - { 0x1FC3BB70u, SCPH1001_func_1FC3BA74_cont_BFC3BB70 }, - { 0x1FC3BB78u, SCPH1001_func_1FC3BA74_cont_BFC3BB78 }, - { 0x1FC3BB7Cu, SCPH1001_func_1FC3BA74_cont_BFC3BB7C }, - { 0x1FC3BB88u, SCPH1001_func_1FC3BA74_cont_BFC3BB88 }, - { 0x1FC3BBD4u, SCPH1001_func_1FC3BA74_cont_BFC3BBD4 }, - { 0x1FC3BBE0u, SCPH1001_func_1FC3BA74_cont_BFC3BBE0 }, - { 0x1FC3BBECu, SCPH1001_func_1FC3BA74_cont_BFC3BBEC }, - { 0x1FC3BC0Cu, SCPH1001_func_1FC3BA74_cont_BFC3BC0C }, - { 0x1FC3BC14u, SCPH1001_func_1FC3BA74_cont_BFC3BC14 }, - { 0x1FC3BC8Cu, SCPH1001_func_1FC3BA74_cont_BFC3BC8C }, - { 0x1FC3BC9Cu, SCPH1001_func_1FC3BA74_cont_BFC3BC9C }, - { 0x1FC3BCA8u, SCPH1001_func_1FC3BA74_cont_BFC3BCA8 }, - { 0x1FC3BCB0u, SCPH1001_func_1FC3BA74_cont_BFC3BCB0 }, - { 0x1FC3BD78u, SCPH1001_func_1FC3BD78 }, - { 0x1FC3BD88u, SCPH1001_func_1FC3BD78_cont_BFC3BD88 }, - { 0x1FC3BD98u, SCPH1001_func_1FC3BD98 }, - { 0x1FC3BDA8u, SCPH1001_func_1FC3BD98_cont_BFC3BDA8 }, - { 0x1FC3BDB8u, SCPH1001_func_1FC3BDB8 }, - { 0x1FC3BDCCu, SCPH1001_func_1FC3BDB8_cont_BFC3BDCC }, - { 0x1FC3BDD8u, SCPH1001_func_1FC3BDB8_cont_BFC3BDD8 }, - { 0x1FC3BDF8u, SCPH1001_func_1FC3BDB8_cont_BFC3BDF8 }, - { 0x1FC3BE04u, SCPH1001_func_1FC3BDB8_cont_BFC3BE04 }, - { 0x1FC3BE08u, SCPH1001_func_1FC3BDB8_cont_BFC3BE08 }, - { 0x1FC3BE18u, SCPH1001_func_1FC3BE18 }, - { 0x1FC3BE6Cu, SCPH1001_func_1FC3BE6C }, - { 0x1FC3BE7Cu, SCPH1001_func_1FC3BE6C_cont_BFC3BE7C }, - { 0x1FC3BE90u, SCPH1001_func_1FC3BE90 }, - { 0x1FC3BEF4u, SCPH1001_func_1FC3BE90_cont_BFC3BEF4 }, - { 0x1FC3BF10u, SCPH1001_func_1FC3BF10 }, - { 0x1FC3BF30u, SCPH1001_func_1FC3BF10_cont_BFC3BF30 }, - { 0x1FC3BF40u, SCPH1001_func_1FC3BF40 }, - { 0x1FC3BF64u, SCPH1001_func_1FC3BF40_cont_BFC3BF64 }, - { 0x1FC3BF6Cu, SCPH1001_func_1FC3BF40_cont_BFC3BF6C }, - { 0x1FC3BF74u, SCPH1001_func_1FC3BF40_cont_BFC3BF74 }, - { 0x1FC3BF84u, SCPH1001_func_1FC3BF40_cont_BFC3BF84 }, - { 0x1FC3BF8Cu, SCPH1001_func_1FC3BF40_cont_BFC3BF8C }, - { 0x1FC3BF98u, SCPH1001_func_1FC3BF40_cont_BFC3BF98 }, - { 0x1FC3BFA0u, SCPH1001_func_1FC3BF40_cont_BFC3BFA0 }, - { 0x1FC3BFA8u, SCPH1001_func_1FC3BF40_cont_BFC3BFA8 }, - { 0x1FC3BFB4u, SCPH1001_func_1FC3BF40_cont_BFC3BFB4 }, - { 0x1FC3BFBCu, SCPH1001_func_1FC3BF40_cont_BFC3BFBC }, - { 0x1FC3BFCCu, SCPH1001_func_1FC3BF40_cont_BFC3BFCC }, - { 0x1FC3BFD8u, SCPH1001_func_1FC3BF40_cont_BFC3BFD8 }, - { 0x1FC3BFF0u, SCPH1001_func_1FC3BFF0 }, - { 0x1FC3C014u, SCPH1001_func_1FC3BFF0_cont_BFC3C014 }, - { 0x1FC3C024u, SCPH1001_func_1FC3BFF0_cont_BFC3C024 }, - { 0x1FC3C030u, SCPH1001_func_1FC3BFF0_cont_BFC3C030 }, - { 0x1FC3C044u, SCPH1001_func_1FC3BFF0_cont_BFC3C044 }, - { 0x1FC3C050u, SCPH1001_func_1FC3BFF0_cont_BFC3C050 }, - { 0x1FC3C060u, SCPH1001_func_1FC3C060 }, - { 0x1FC3C070u, SCPH1001_func_1FC3C060_cont_BFC3C070 }, - { 0x1FC3C080u, SCPH1001_func_1FC3C060_cont_BFC3C080 }, - { 0x1FC3C0D8u, SCPH1001_func_1FC3C060_cont_BFC3C0D8 }, - { 0x1FC3C0F0u, SCPH1001_func_1FC3C060_cont_BFC3C0F0 }, - { 0x1FC3C100u, SCPH1001_func_1FC3C060_cont_BFC3C100 }, - { 0x1FC3C118u, SCPH1001_func_1FC3C060_cont_BFC3C118 }, - { 0x1FC3C128u, SCPH1001_func_1FC3C060_cont_BFC3C128 }, - { 0x1FC3C130u, SCPH1001_func_1FC3C060_cont_BFC3C130 }, - { 0x1FC3C140u, SCPH1001_func_1FC3C140 }, - { 0x1FC3C15Cu, SCPH1001_func_1FC3C140_cont_BFC3C15C }, - { 0x1FC3C160u, SCPH1001_func_1FC3C140_cont_BFC3C160 }, - { 0x1FC3C194u, SCPH1001_func_1FC3C140_cont_BFC3C194 }, - { 0x1FC3C19Cu, SCPH1001_func_1FC3C19C }, - { 0x1FC3C1ECu, SCPH1001_func_1FC3C19C_cont_BFC3C1EC }, - { 0x1FC3C200u, SCPH1001_func_1FC3C19C_cont_BFC3C200 }, - { 0x1FC3C208u, SCPH1001_func_1FC3C19C_cont_BFC3C208 }, - { 0x1FC3C218u, SCPH1001_func_1FC3C19C_cont_BFC3C218 }, - { 0x1FC3C230u, SCPH1001_func_1FC3C19C_cont_BFC3C230 }, - { 0x1FC3C240u, SCPH1001_func_1FC3C19C_cont_BFC3C240 }, - { 0x1FC3C254u, SCPH1001_func_1FC3C19C_cont_BFC3C254 }, - { 0x1FC3C258u, SCPH1001_func_1FC3C19C_cont_BFC3C258 }, - { 0x1FC3C25Cu, SCPH1001_func_1FC3C19C_cont_BFC3C25C }, - { 0x1FC3C2C0u, SCPH1001_func_1FC3C19C_cont_BFC3C2C0 }, - { 0x1FC3C2E0u, SCPH1001_func_1FC3C19C_cont_BFC3C2E0 }, - { 0x1FC3C384u, SCPH1001_func_1FC3C19C_cont_BFC3C384 }, - { 0x1FC3C3A8u, SCPH1001_func_1FC3C19C_cont_BFC3C3A8 }, - { 0x1FC3C3B0u, SCPH1001_func_1FC3C19C_cont_BFC3C3B0 }, - { 0x1FC3C3B8u, SCPH1001_func_1FC3C19C_cont_BFC3C3B8 }, - { 0x1FC3C3C0u, SCPH1001_func_1FC3C19C_cont_BFC3C3C0 }, - { 0x1FC3C3E4u, SCPH1001_func_1FC3C19C_cont_BFC3C3E4 }, - { 0x1FC3C3ECu, SCPH1001_func_1FC3C19C_cont_BFC3C3EC }, - { 0x1FC3C3F4u, SCPH1001_func_1FC3C19C_cont_BFC3C3F4 }, - { 0x1FC3C3FCu, SCPH1001_func_1FC3C19C_cont_BFC3C3FC }, - { 0x1FC3C418u, SCPH1001_func_1FC3C418 }, - { 0x1FC3C428u, SCPH1001_func_1FC3C428 }, - { 0x1FC3C46Cu, SCPH1001_func_1FC3C428_cont_BFC3C46C }, - { 0x1FC3C478u, SCPH1001_func_1FC3C428_cont_BFC3C478 }, - { 0x1FC3C488u, SCPH1001_func_1FC3C428_cont_BFC3C488 }, - { 0x1FC3C4A0u, SCPH1001_func_1FC3C428_cont_BFC3C4A0 }, - { 0x1FC3C4A8u, SCPH1001_func_1FC3C428_cont_BFC3C4A8 }, - { 0x1FC3C4BCu, SCPH1001_func_1FC3C428_cont_BFC3C4BC }, - { 0x1FC3C4C0u, SCPH1001_func_1FC3C428_cont_BFC3C4C0 }, - { 0x1FC3C4C4u, SCPH1001_func_1FC3C428_cont_BFC3C4C4 }, - { 0x1FC3C4D0u, SCPH1001_func_1FC3C428_cont_BFC3C4D0 }, - { 0x1FC3C4E0u, SCPH1001_func_1FC3C4E0 }, - { 0x1FC3C528u, SCPH1001_func_1FC3C4E0_cont_BFC3C528 }, - { 0x1FC3C53Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C53C }, - { 0x1FC3C540u, SCPH1001_func_1FC3C4E0_cont_BFC3C540 }, - { 0x1FC3C54Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C54C }, - { 0x1FC3C564u, SCPH1001_func_1FC3C4E0_cont_BFC3C564 }, - { 0x1FC3C574u, SCPH1001_func_1FC3C4E0_cont_BFC3C574 }, - { 0x1FC3C588u, SCPH1001_func_1FC3C4E0_cont_BFC3C588 }, - { 0x1FC3C58Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C58C }, - { 0x1FC3C594u, SCPH1001_func_1FC3C4E0_cont_BFC3C594 }, - { 0x1FC3C59Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C59C }, - { 0x1FC3C5A4u, SCPH1001_func_1FC3C4E0_cont_BFC3C5A4 }, - { 0x1FC3C5ACu, SCPH1001_func_1FC3C4E0_cont_BFC3C5AC }, - { 0x1FC3C5B0u, SCPH1001_func_1FC3C4E0_cont_BFC3C5B0 }, - { 0x1FC3C5B8u, SCPH1001_func_1FC3C4E0_cont_BFC3C5B8 }, - { 0x1FC3C5D0u, SCPH1001_func_1FC3C4E0_cont_BFC3C5D0 }, - { 0x1FC3C5F0u, SCPH1001_func_1FC3C4E0_cont_BFC3C5F0 }, - { 0x1FC3C604u, SCPH1001_func_1FC3C4E0_cont_BFC3C604 }, - { 0x1FC3C608u, SCPH1001_func_1FC3C4E0_cont_BFC3C608 }, - { 0x1FC3C614u, SCPH1001_func_1FC3C4E0_cont_BFC3C614 }, - { 0x1FC3C62Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C62C }, - { 0x1FC3C63Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C63C }, - { 0x1FC3C650u, SCPH1001_func_1FC3C4E0_cont_BFC3C650 }, - { 0x1FC3C654u, SCPH1001_func_1FC3C4E0_cont_BFC3C654 }, - { 0x1FC3C65Cu, SCPH1001_func_1FC3C4E0_cont_BFC3C65C }, - { 0x1FC3C664u, SCPH1001_func_1FC3C4E0_cont_BFC3C664 }, - { 0x1FC3C670u, SCPH1001_func_1FC3C4E0_cont_BFC3C670 }, - { 0x1FC3C678u, SCPH1001_func_1FC3C4E0_cont_BFC3C678 }, - { 0x1FC3C6A0u, SCPH1001_func_1FC3C4E0_cont_BFC3C6A0 }, - { 0x1FC3C6A8u, SCPH1001_func_1FC3C4E0_cont_BFC3C6A8 }, - { 0x1FC3C6B8u, SCPH1001_func_1FC3C4E0_cont_BFC3C6B8 }, - { 0x1FC3C6D0u, SCPH1001_func_1FC3C4E0_cont_BFC3C6D0 }, - { 0x1FC3C6D8u, SCPH1001_func_1FC3C4E0_cont_BFC3C6D8 }, - { 0x1FC3C6ECu, SCPH1001_func_1FC3C4E0_cont_BFC3C6EC }, - { 0x1FC3C6F0u, SCPH1001_func_1FC3C4E0_cont_BFC3C6F0 }, - { 0x1FC3C6F4u, SCPH1001_func_1FC3C4E0_cont_BFC3C6F4 }, - { 0x1FC3C710u, SCPH1001_func_1FC3C710 }, - { 0x1FC3C740u, SCPH1001_func_1FC3C710_cont_BFC3C740 }, - { 0x1FC3C748u, SCPH1001_func_1FC3C710_cont_BFC3C748 }, - { 0x1FC3C750u, SCPH1001_func_1FC3C710_cont_BFC3C750 }, - { 0x1FC3C758u, SCPH1001_func_1FC3C710_cont_BFC3C758 }, - { 0x1FC3C76Cu, SCPH1001_func_1FC3C710_cont_BFC3C76C }, - { 0x1FC3C780u, SCPH1001_func_1FC3C710_cont_BFC3C780 }, - { 0x1FC3C794u, SCPH1001_func_1FC3C710_cont_BFC3C794 }, - { 0x1FC3C79Cu, SCPH1001_func_1FC3C710_cont_BFC3C79C }, - { 0x1FC3C7A0u, SCPH1001_func_1FC3C710_cont_BFC3C7A0 }, - { 0x1FC3C7A8u, SCPH1001_func_1FC3C710_cont_BFC3C7A8 }, - { 0x1FC3C7B0u, SCPH1001_func_1FC3C710_cont_BFC3C7B0 }, - { 0x1FC3C7C8u, SCPH1001_func_1FC3C710_cont_BFC3C7C8 }, - { 0x1FC3C7E0u, SCPH1001_func_1FC3C710_cont_BFC3C7E0 }, - { 0x1FC3C7F4u, SCPH1001_func_1FC3C710_cont_BFC3C7F4 }, - { 0x1FC3C800u, SCPH1001_func_1FC3C710_cont_BFC3C800 }, - { 0x1FC3C808u, SCPH1001_func_1FC3C710_cont_BFC3C808 }, - { 0x1FC3C828u, SCPH1001_func_1FC3C710_cont_BFC3C828 }, - { 0x1FC3C83Cu, SCPH1001_func_1FC3C710_cont_BFC3C83C }, - { 0x1FC3C85Cu, SCPH1001_func_1FC3C710_cont_BFC3C85C }, - { 0x1FC3C864u, SCPH1001_func_1FC3C710_cont_BFC3C864 }, - { 0x1FC3C874u, SCPH1001_func_1FC3C710_cont_BFC3C874 }, - { 0x1FC3C88Cu, SCPH1001_func_1FC3C710_cont_BFC3C88C }, - { 0x1FC3C894u, SCPH1001_func_1FC3C710_cont_BFC3C894 }, - { 0x1FC3C8A8u, SCPH1001_func_1FC3C710_cont_BFC3C8A8 }, - { 0x1FC3C8B0u, SCPH1001_func_1FC3C710_cont_BFC3C8B0 }, - { 0x1FC3C8BCu, SCPH1001_func_1FC3C710_cont_BFC3C8BC }, - { 0x1FC3C8CCu, SCPH1001_func_1FC3C710_cont_BFC3C8CC }, - { 0x1FC3C8D0u, SCPH1001_func_1FC3C710_cont_BFC3C8D0 }, - { 0x1FC3C8DCu, SCPH1001_func_1FC3C710_cont_BFC3C8DC }, - { 0x1FC3C8E4u, SCPH1001_func_1FC3C710_cont_BFC3C8E4 }, - { 0x1FC3C8E8u, SCPH1001_func_1FC3C710_cont_BFC3C8E8 }, - { 0x1FC3C8F0u, SCPH1001_func_1FC3C710_cont_BFC3C8F0 }, - { 0x1FC3C8F8u, SCPH1001_func_1FC3C710_cont_BFC3C8F8 }, - { 0x1FC3C918u, SCPH1001_func_1FC3C710_cont_BFC3C918 }, - { 0x1FC3C92Cu, SCPH1001_func_1FC3C710_cont_BFC3C92C }, - { 0x1FC3C940u, SCPH1001_func_1FC3C710_cont_BFC3C940 }, - { 0x1FC3C960u, SCPH1001_func_1FC3C710_cont_BFC3C960 }, - { 0x1FC3C968u, SCPH1001_func_1FC3C710_cont_BFC3C968 }, - { 0x1FC3C978u, SCPH1001_func_1FC3C710_cont_BFC3C978 }, - { 0x1FC3C990u, SCPH1001_func_1FC3C710_cont_BFC3C990 }, - { 0x1FC3C998u, SCPH1001_func_1FC3C710_cont_BFC3C998 }, - { 0x1FC3C9ACu, SCPH1001_func_1FC3C710_cont_BFC3C9AC }, - { 0x1FC3C9B4u, SCPH1001_func_1FC3C710_cont_BFC3C9B4 }, - { 0x1FC3C9C0u, SCPH1001_func_1FC3C710_cont_BFC3C9C0 }, - { 0x1FC3C9D0u, SCPH1001_func_1FC3C710_cont_BFC3C9D0 }, - { 0x1FC3C9D4u, SCPH1001_func_1FC3C710_cont_BFC3C9D4 }, - { 0x1FC3C9E0u, SCPH1001_func_1FC3C710_cont_BFC3C9E0 }, - { 0x1FC3C9E8u, SCPH1001_func_1FC3C710_cont_BFC3C9E8 }, - { 0x1FC3C9ECu, SCPH1001_func_1FC3C710_cont_BFC3C9EC }, - { 0x1FC3C9F4u, SCPH1001_func_1FC3C710_cont_BFC3C9F4 }, - { 0x1FC3C9FCu, SCPH1001_func_1FC3C710_cont_BFC3C9FC }, - { 0x1FC3CA14u, SCPH1001_func_1FC3C710_cont_BFC3CA14 }, - { 0x1FC3CA24u, SCPH1001_func_1FC3C710_cont_BFC3CA24 }, - { 0x1FC3CA3Cu, SCPH1001_func_1FC3C710_cont_BFC3CA3C }, - { 0x1FC3CA4Cu, SCPH1001_func_1FC3C710_cont_BFC3CA4C }, - { 0x1FC3CA5Cu, SCPH1001_func_1FC3C710_cont_BFC3CA5C }, - { 0x1FC3CA74u, SCPH1001_func_1FC3C710_cont_BFC3CA74 }, - { 0x1FC3CA7Cu, SCPH1001_func_1FC3C710_cont_BFC3CA7C }, - { 0x1FC3CA98u, SCPH1001_func_1FC3C710_cont_BFC3CA98 }, - { 0x1FC3CAB4u, SCPH1001_func_1FC3C710_cont_BFC3CAB4 }, - { 0x1FC3CACCu, SCPH1001_func_1FC3C710_cont_BFC3CACC }, - { 0x1FC3CAF4u, SCPH1001_func_1FC3C710_cont_BFC3CAF4 }, - { 0x1FC3CB08u, SCPH1001_func_1FC3C710_cont_BFC3CB08 }, - { 0x1FC3CB14u, SCPH1001_func_1FC3C710_cont_BFC3CB14 }, - { 0x1FC3CB1Cu, SCPH1001_func_1FC3C710_cont_BFC3CB1C }, - { 0x1FC3CB30u, SCPH1001_func_1FC3C710_cont_BFC3CB30 }, - { 0x1FC3CB3Cu, SCPH1001_func_1FC3C710_cont_BFC3CB3C }, - { 0x1FC3CB4Cu, SCPH1001_func_1FC3C710_cont_BFC3CB4C }, - { 0x1FC3CB50u, SCPH1001_func_1FC3C710_cont_BFC3CB50 }, - { 0x1FC3CB5Cu, SCPH1001_func_1FC3C710_cont_BFC3CB5C }, - { 0x1FC3CB64u, SCPH1001_func_1FC3C710_cont_BFC3CB64 }, - { 0x1FC3CB68u, SCPH1001_func_1FC3C710_cont_BFC3CB68 }, - { 0x1FC3CB70u, SCPH1001_func_1FC3C710_cont_BFC3CB70 }, - { 0x1FC3CB78u, SCPH1001_func_1FC3C710_cont_BFC3CB78 }, - { 0x1FC3CB88u, SCPH1001_func_1FC3C710_cont_BFC3CB88 }, - { 0x1FC3CB9Cu, SCPH1001_func_1FC3C710_cont_BFC3CB9C }, - { 0x1FC3CBB8u, SCPH1001_func_1FC3C710_cont_BFC3CBB8 }, - { 0x1FC3CBC0u, SCPH1001_func_1FC3C710_cont_BFC3CBC0 }, - { 0x1FC3CBC8u, SCPH1001_func_1FC3C710_cont_BFC3CBC8 }, - { 0x1FC3CC08u, SCPH1001_func_1FC3C710_cont_BFC3CC08 }, - { 0x1FC3CC28u, SCPH1001_func_1FC3C710_cont_BFC3CC28 }, - { 0x1FC3CC70u, SCPH1001_func_1FC3C710_cont_BFC3CC70 }, - { 0x1FC3CC78u, SCPH1001_func_1FC3C710_cont_BFC3CC78 }, - { 0x1FC3CC80u, SCPH1001_func_1FC3C710_cont_BFC3CC80 }, - { 0x1FC3CC88u, SCPH1001_func_1FC3C710_cont_BFC3CC88 }, - { 0x1FC3CC90u, SCPH1001_func_1FC3C710_cont_BFC3CC90 }, - { 0x1FC3CC9Cu, SCPH1001_func_1FC3C710_cont_BFC3CC9C }, - { 0x1FC3CCA4u, SCPH1001_func_1FC3C710_cont_BFC3CCA4 }, - { 0x1FC3CCACu, SCPH1001_func_1FC3C710_cont_BFC3CCAC }, - { 0x1FC3CCB4u, SCPH1001_func_1FC3C710_cont_BFC3CCB4 }, - { 0x1FC3CCBCu, SCPH1001_func_1FC3C710_cont_BFC3CCBC }, - { 0x1FC3CCC4u, SCPH1001_func_1FC3C710_cont_BFC3CCC4 }, - { 0x1FC3CCCCu, SCPH1001_func_1FC3C710_cont_BFC3CCCC }, - { 0x1FC3CCD4u, SCPH1001_func_1FC3C710_cont_BFC3CCD4 }, - { 0x1FC3CCDCu, SCPH1001_func_1FC3C710_cont_BFC3CCDC }, - { 0x1FC3CCE4u, SCPH1001_func_1FC3C710_cont_BFC3CCE4 }, - { 0x1FC3CCE8u, SCPH1001_func_1FC3C710_cont_BFC3CCE8 }, - { 0x1FC3CCF0u, SCPH1001_func_1FC3C710_cont_BFC3CCF0 }, - { 0x1FC3CCFCu, SCPH1001_func_1FC3C710_cont_BFC3CCFC }, - { 0x1FC3CD04u, SCPH1001_func_1FC3C710_cont_BFC3CD04 }, - { 0x1FC3CD10u, SCPH1001_func_1FC3C710_cont_BFC3CD10 }, - { 0x1FC3CD18u, SCPH1001_func_1FC3C710_cont_BFC3CD18 }, - { 0x1FC3CD20u, SCPH1001_func_1FC3C710_cont_BFC3CD20 }, - { 0x1FC3CD28u, SCPH1001_func_1FC3C710_cont_BFC3CD28 }, - { 0x1FC3CD34u, SCPH1001_func_1FC3C710_cont_BFC3CD34 }, - { 0x1FC3CD3Cu, SCPH1001_func_1FC3C710_cont_BFC3CD3C }, - { 0x1FC3CD48u, SCPH1001_func_1FC3C710_cont_BFC3CD48 }, - { 0x1FC3CD50u, SCPH1001_func_1FC3C710_cont_BFC3CD50 }, - { 0x1FC3CD58u, SCPH1001_func_1FC3C710_cont_BFC3CD58 }, - { 0x1FC3CD60u, SCPH1001_func_1FC3C710_cont_BFC3CD60 }, - { 0x1FC3CD68u, SCPH1001_func_1FC3C710_cont_BFC3CD68 }, - { 0x1FC3CD70u, SCPH1001_func_1FC3C710_cont_BFC3CD70 }, - { 0x1FC3CD7Cu, SCPH1001_func_1FC3C710_cont_BFC3CD7C }, - { 0x1FC3CD84u, SCPH1001_func_1FC3C710_cont_BFC3CD84 }, - { 0x1FC3CD90u, SCPH1001_func_1FC3C710_cont_BFC3CD90 }, - { 0x1FC3CD98u, SCPH1001_func_1FC3C710_cont_BFC3CD98 }, - { 0x1FC3CDA0u, SCPH1001_func_1FC3C710_cont_BFC3CDA0 }, - { 0x1FC3CDA8u, SCPH1001_func_1FC3C710_cont_BFC3CDA8 }, - { 0x1FC3CDB4u, SCPH1001_func_1FC3C710_cont_BFC3CDB4 }, - { 0x1FC3CDBCu, SCPH1001_func_1FC3C710_cont_BFC3CDBC }, - { 0x1FC3CDC8u, SCPH1001_func_1FC3C710_cont_BFC3CDC8 }, - { 0x1FC3CDD0u, SCPH1001_func_1FC3C710_cont_BFC3CDD0 }, - { 0x1FC3CDD8u, SCPH1001_func_1FC3C710_cont_BFC3CDD8 }, - { 0x1FC3CDE0u, SCPH1001_func_1FC3C710_cont_BFC3CDE0 }, - { 0x1FC3CDE8u, SCPH1001_func_1FC3C710_cont_BFC3CDE8 }, - { 0x1FC3CDF0u, SCPH1001_func_1FC3C710_cont_BFC3CDF0 }, - { 0x1FC3CDF8u, SCPH1001_func_1FC3C710_cont_BFC3CDF8 }, - { 0x1FC3CE00u, SCPH1001_func_1FC3C710_cont_BFC3CE00 }, - { 0x1FC3CE0Cu, SCPH1001_func_1FC3C710_cont_BFC3CE0C }, - { 0x1FC3CE14u, SCPH1001_func_1FC3C710_cont_BFC3CE14 }, - { 0x1FC3CE20u, SCPH1001_func_1FC3C710_cont_BFC3CE20 }, - { 0x1FC3CE28u, SCPH1001_func_1FC3C710_cont_BFC3CE28 }, - { 0x1FC3CE30u, SCPH1001_func_1FC3C710_cont_BFC3CE30 }, - { 0x1FC3CE38u, SCPH1001_func_1FC3C710_cont_BFC3CE38 }, - { 0x1FC3CE44u, SCPH1001_func_1FC3C710_cont_BFC3CE44 }, - { 0x1FC3CE4Cu, SCPH1001_func_1FC3C710_cont_BFC3CE4C }, - { 0x1FC3CE58u, SCPH1001_func_1FC3C710_cont_BFC3CE58 }, - { 0x1FC3CE60u, SCPH1001_func_1FC3C710_cont_BFC3CE60 }, - { 0x1FC3CE68u, SCPH1001_func_1FC3C710_cont_BFC3CE68 }, - { 0x1FC3CE70u, SCPH1001_func_1FC3C710_cont_BFC3CE70 }, - { 0x1FC3CE78u, SCPH1001_func_1FC3C710_cont_BFC3CE78 }, - { 0x1FC3CE80u, SCPH1001_func_1FC3C710_cont_BFC3CE80 }, - { 0x1FC3CE8Cu, SCPH1001_func_1FC3C710_cont_BFC3CE8C }, - { 0x1FC3CE94u, SCPH1001_func_1FC3C710_cont_BFC3CE94 }, - { 0x1FC3CEA0u, SCPH1001_func_1FC3C710_cont_BFC3CEA0 }, - { 0x1FC3CEA8u, SCPH1001_func_1FC3C710_cont_BFC3CEA8 }, - { 0x1FC3CEB0u, SCPH1001_func_1FC3C710_cont_BFC3CEB0 }, - { 0x1FC3CEB8u, SCPH1001_func_1FC3C710_cont_BFC3CEB8 }, - { 0x1FC3CEBCu, SCPH1001_func_1FC3C710_cont_BFC3CEBC }, - { 0x1FC3CEC8u, SCPH1001_func_1FC3CEC8 }, - { 0x1FC3CED8u, SCPH1001_func_1FC3CEC8_cont_BFC3CED8 }, - { 0x1FC3CEE0u, SCPH1001_func_1FC3CEC8_cont_BFC3CEE0 }, - { 0x1FC3CEE4u, SCPH1001_func_1FC3CEC8_cont_BFC3CEE4 }, - { 0x1FC3CEECu, SCPH1001_func_1FC3CEC8_cont_BFC3CEEC }, - { 0x1FC3CEF8u, SCPH1001_func_1FC3CEC8_cont_BFC3CEF8 }, - { 0x1FC3CF08u, SCPH1001_func_1FC3CEC8_cont_BFC3CF08 }, - { 0x1FC3CF1Cu, SCPH1001_func_1FC3CEC8_cont_BFC3CF1C }, - { 0x1FC3CF24u, SCPH1001_func_1FC3CEC8_cont_BFC3CF24 }, - { 0x1FC3CF30u, SCPH1001_func_1FC3CEC8_cont_BFC3CF30 }, - { 0x1FC3CF3Cu, SCPH1001_func_1FC3CEC8_cont_BFC3CF3C }, - { 0x1FC3CF44u, SCPH1001_func_1FC3CEC8_cont_BFC3CF44 }, - { 0x1FC3CF50u, SCPH1001_func_1FC3CEC8_cont_BFC3CF50 }, - { 0x1FC3CF5Cu, SCPH1001_func_1FC3CEC8_cont_BFC3CF5C }, - { 0x1FC3CF64u, SCPH1001_func_1FC3CEC8_cont_BFC3CF64 }, - { 0x1FC3CF70u, SCPH1001_func_1FC3CEC8_cont_BFC3CF70 }, - { 0x1FC3CF7Cu, SCPH1001_func_1FC3CEC8_cont_BFC3CF7C }, - { 0x1FC3CF84u, SCPH1001_func_1FC3CEC8_cont_BFC3CF84 }, - { 0x1FC3CF90u, SCPH1001_func_1FC3CEC8_cont_BFC3CF90 }, - { 0x1FC3CF9Cu, SCPH1001_func_1FC3CEC8_cont_BFC3CF9C }, - { 0x1FC3CFA4u, SCPH1001_func_1FC3CEC8_cont_BFC3CFA4 }, - { 0x1FC3CFB0u, SCPH1001_func_1FC3CEC8_cont_BFC3CFB0 }, - { 0x1FC3CFBCu, SCPH1001_func_1FC3CEC8_cont_BFC3CFBC }, - { 0x1FC3CFC4u, SCPH1001_func_1FC3CEC8_cont_BFC3CFC4 }, - { 0x1FC3CFD0u, SCPH1001_func_1FC3CEC8_cont_BFC3CFD0 }, - { 0x1FC3CFDCu, SCPH1001_func_1FC3CEC8_cont_BFC3CFDC }, - { 0x1FC3CFE4u, SCPH1001_func_1FC3CEC8_cont_BFC3CFE4 }, - { 0x1FC3CFF0u, SCPH1001_func_1FC3CEC8_cont_BFC3CFF0 }, - { 0x1FC3CFFCu, SCPH1001_func_1FC3CEC8_cont_BFC3CFFC }, - { 0x1FC3D004u, SCPH1001_func_1FC3CEC8_cont_BFC3D004 }, - { 0x1FC3D010u, SCPH1001_func_1FC3CEC8_cont_BFC3D010 }, - { 0x1FC3D01Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D01C }, - { 0x1FC3D024u, SCPH1001_func_1FC3CEC8_cont_BFC3D024 }, - { 0x1FC3D030u, SCPH1001_func_1FC3CEC8_cont_BFC3D030 }, - { 0x1FC3D03Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D03C }, - { 0x1FC3D044u, SCPH1001_func_1FC3CEC8_cont_BFC3D044 }, - { 0x1FC3D050u, SCPH1001_func_1FC3CEC8_cont_BFC3D050 }, - { 0x1FC3D05Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D05C }, - { 0x1FC3D064u, SCPH1001_func_1FC3CEC8_cont_BFC3D064 }, - { 0x1FC3D070u, SCPH1001_func_1FC3CEC8_cont_BFC3D070 }, - { 0x1FC3D07Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D07C }, - { 0x1FC3D084u, SCPH1001_func_1FC3CEC8_cont_BFC3D084 }, - { 0x1FC3D090u, SCPH1001_func_1FC3CEC8_cont_BFC3D090 }, - { 0x1FC3D09Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D09C }, - { 0x1FC3D0A4u, SCPH1001_func_1FC3CEC8_cont_BFC3D0A4 }, - { 0x1FC3D0B0u, SCPH1001_func_1FC3CEC8_cont_BFC3D0B0 }, - { 0x1FC3D0BCu, SCPH1001_func_1FC3CEC8_cont_BFC3D0BC }, - { 0x1FC3D0C4u, SCPH1001_func_1FC3CEC8_cont_BFC3D0C4 }, - { 0x1FC3D0D0u, SCPH1001_func_1FC3CEC8_cont_BFC3D0D0 }, - { 0x1FC3D0DCu, SCPH1001_func_1FC3CEC8_cont_BFC3D0DC }, - { 0x1FC3D0E4u, SCPH1001_func_1FC3CEC8_cont_BFC3D0E4 }, - { 0x1FC3D0F0u, SCPH1001_func_1FC3CEC8_cont_BFC3D0F0 }, - { 0x1FC3D0FCu, SCPH1001_func_1FC3CEC8_cont_BFC3D0FC }, - { 0x1FC3D104u, SCPH1001_func_1FC3CEC8_cont_BFC3D104 }, - { 0x1FC3D110u, SCPH1001_func_1FC3CEC8_cont_BFC3D110 }, - { 0x1FC3D11Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D11C }, - { 0x1FC3D124u, SCPH1001_func_1FC3CEC8_cont_BFC3D124 }, - { 0x1FC3D130u, SCPH1001_func_1FC3CEC8_cont_BFC3D130 }, - { 0x1FC3D13Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D13C }, - { 0x1FC3D144u, SCPH1001_func_1FC3CEC8_cont_BFC3D144 }, - { 0x1FC3D150u, SCPH1001_func_1FC3CEC8_cont_BFC3D150 }, - { 0x1FC3D15Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D15C }, - { 0x1FC3D164u, SCPH1001_func_1FC3CEC8_cont_BFC3D164 }, - { 0x1FC3D170u, SCPH1001_func_1FC3CEC8_cont_BFC3D170 }, - { 0x1FC3D17Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D17C }, - { 0x1FC3D184u, SCPH1001_func_1FC3CEC8_cont_BFC3D184 }, - { 0x1FC3D190u, SCPH1001_func_1FC3CEC8_cont_BFC3D190 }, - { 0x1FC3D19Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D19C }, - { 0x1FC3D1A4u, SCPH1001_func_1FC3CEC8_cont_BFC3D1A4 }, - { 0x1FC3D1B0u, SCPH1001_func_1FC3CEC8_cont_BFC3D1B0 }, - { 0x1FC3D1BCu, SCPH1001_func_1FC3CEC8_cont_BFC3D1BC }, - { 0x1FC3D1C4u, SCPH1001_func_1FC3CEC8_cont_BFC3D1C4 }, - { 0x1FC3D1D0u, SCPH1001_func_1FC3CEC8_cont_BFC3D1D0 }, - { 0x1FC3D1DCu, SCPH1001_func_1FC3CEC8_cont_BFC3D1DC }, - { 0x1FC3D1E4u, SCPH1001_func_1FC3CEC8_cont_BFC3D1E4 }, - { 0x1FC3D1F0u, SCPH1001_func_1FC3CEC8_cont_BFC3D1F0 }, - { 0x1FC3D1FCu, SCPH1001_func_1FC3CEC8_cont_BFC3D1FC }, - { 0x1FC3D204u, SCPH1001_func_1FC3CEC8_cont_BFC3D204 }, - { 0x1FC3D210u, SCPH1001_func_1FC3CEC8_cont_BFC3D210 }, - { 0x1FC3D21Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D21C }, - { 0x1FC3D224u, SCPH1001_func_1FC3CEC8_cont_BFC3D224 }, - { 0x1FC3D230u, SCPH1001_func_1FC3CEC8_cont_BFC3D230 }, - { 0x1FC3D23Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D23C }, - { 0x1FC3D244u, SCPH1001_func_1FC3CEC8_cont_BFC3D244 }, - { 0x1FC3D250u, SCPH1001_func_1FC3CEC8_cont_BFC3D250 }, - { 0x1FC3D25Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D25C }, - { 0x1FC3D264u, SCPH1001_func_1FC3CEC8_cont_BFC3D264 }, - { 0x1FC3D270u, SCPH1001_func_1FC3CEC8_cont_BFC3D270 }, - { 0x1FC3D27Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D27C }, - { 0x1FC3D284u, SCPH1001_func_1FC3CEC8_cont_BFC3D284 }, - { 0x1FC3D290u, SCPH1001_func_1FC3CEC8_cont_BFC3D290 }, - { 0x1FC3D29Cu, SCPH1001_func_1FC3CEC8_cont_BFC3D29C }, - { 0x1FC3D2A4u, SCPH1001_func_1FC3CEC8_cont_BFC3D2A4 }, - { 0x1FC3D2B0u, SCPH1001_func_1FC3CEC8_cont_BFC3D2B0 }, - { 0x1FC3D2BCu, SCPH1001_func_1FC3CEC8_cont_BFC3D2BC }, - { 0x1FC3D2C4u, SCPH1001_func_1FC3CEC8_cont_BFC3D2C4 }, - { 0x1FC3D2D0u, SCPH1001_func_1FC3CEC8_cont_BFC3D2D0 }, - { 0x1FC3D2DCu, SCPH1001_func_1FC3CEC8_cont_BFC3D2DC }, - { 0x1FC3D2E4u, SCPH1001_func_1FC3CEC8_cont_BFC3D2E4 }, - { 0x1FC3D2F0u, SCPH1001_func_1FC3CEC8_cont_BFC3D2F0 }, - { 0x1FC3D2FCu, SCPH1001_func_1FC3CEC8_cont_BFC3D2FC }, - { 0x1FC3D304u, SCPH1001_func_1FC3D304 }, - { 0x1FC3D314u, SCPH1001_func_1FC3D304_cont_BFC3D314 }, - { 0x1FC3D31Cu, SCPH1001_func_1FC3D304_cont_BFC3D31C }, - { 0x1FC3D320u, SCPH1001_func_1FC3D304_cont_BFC3D320 }, - { 0x1FC3D328u, SCPH1001_func_1FC3D304_cont_BFC3D328 }, - { 0x1FC3D334u, SCPH1001_func_1FC3D304_cont_BFC3D334 }, - { 0x1FC3D344u, SCPH1001_func_1FC3D304_cont_BFC3D344 }, - { 0x1FC3D358u, SCPH1001_func_1FC3D304_cont_BFC3D358 }, - { 0x1FC3D360u, SCPH1001_func_1FC3D304_cont_BFC3D360 }, - { 0x1FC3D36Cu, SCPH1001_func_1FC3D304_cont_BFC3D36C }, - { 0x1FC3D378u, SCPH1001_func_1FC3D304_cont_BFC3D378 }, - { 0x1FC3D380u, SCPH1001_func_1FC3D304_cont_BFC3D380 }, - { 0x1FC3D38Cu, SCPH1001_func_1FC3D304_cont_BFC3D38C }, - { 0x1FC3D398u, SCPH1001_func_1FC3D304_cont_BFC3D398 }, - { 0x1FC3D3A0u, SCPH1001_func_1FC3D304_cont_BFC3D3A0 }, - { 0x1FC3D3ACu, SCPH1001_func_1FC3D304_cont_BFC3D3AC }, - { 0x1FC3D3B8u, SCPH1001_func_1FC3D304_cont_BFC3D3B8 }, - { 0x1FC3D3C0u, SCPH1001_func_1FC3D304_cont_BFC3D3C0 }, - { 0x1FC3D3CCu, SCPH1001_func_1FC3D304_cont_BFC3D3CC }, - { 0x1FC3D3D8u, SCPH1001_func_1FC3D304_cont_BFC3D3D8 }, - { 0x1FC3D3E0u, SCPH1001_func_1FC3D304_cont_BFC3D3E0 }, - { 0x1FC3D3ECu, SCPH1001_func_1FC3D304_cont_BFC3D3EC }, - { 0x1FC3D3F8u, SCPH1001_func_1FC3D304_cont_BFC3D3F8 }, - { 0x1FC3D400u, SCPH1001_func_1FC3D304_cont_BFC3D400 }, - { 0x1FC3D40Cu, SCPH1001_func_1FC3D304_cont_BFC3D40C }, - { 0x1FC3D41Cu, SCPH1001_func_1FC3D304_cont_BFC3D41C }, - { 0x1FC3D430u, SCPH1001_func_1FC3D304_cont_BFC3D430 }, - { 0x1FC3D440u, SCPH1001_func_1FC3D304_cont_BFC3D440 }, - { 0x1FC3D448u, SCPH1001_func_1FC3D304_cont_BFC3D448 }, - { 0x1FC3D454u, SCPH1001_func_1FC3D304_cont_BFC3D454 }, - { 0x1FC3D464u, SCPH1001_func_1FC3D304_cont_BFC3D464 }, - { 0x1FC3D478u, SCPH1001_func_1FC3D304_cont_BFC3D478 }, - { 0x1FC3D488u, SCPH1001_func_1FC3D304_cont_BFC3D488 }, - { 0x1FC3D490u, SCPH1001_func_1FC3D304_cont_BFC3D490 }, - { 0x1FC3D49Cu, SCPH1001_func_1FC3D304_cont_BFC3D49C }, - { 0x1FC3D4A8u, SCPH1001_func_1FC3D304_cont_BFC3D4A8 }, - { 0x1FC3D4B0u, SCPH1001_func_1FC3D304_cont_BFC3D4B0 }, - { 0x1FC3D4BCu, SCPH1001_func_1FC3D304_cont_BFC3D4BC }, - { 0x1FC3D4C8u, SCPH1001_func_1FC3D304_cont_BFC3D4C8 }, - { 0x1FC3D4D0u, SCPH1001_func_1FC3D304_cont_BFC3D4D0 }, - { 0x1FC3D4DCu, SCPH1001_func_1FC3D304_cont_BFC3D4DC }, - { 0x1FC3D4ECu, SCPH1001_func_1FC3D304_cont_BFC3D4EC }, - { 0x1FC3D500u, SCPH1001_func_1FC3D304_cont_BFC3D500 }, - { 0x1FC3D510u, SCPH1001_func_1FC3D304_cont_BFC3D510 }, - { 0x1FC3D518u, SCPH1001_func_1FC3D304_cont_BFC3D518 }, - { 0x1FC3D524u, SCPH1001_func_1FC3D304_cont_BFC3D524 }, - { 0x1FC3D534u, SCPH1001_func_1FC3D304_cont_BFC3D534 }, - { 0x1FC3D548u, SCPH1001_func_1FC3D304_cont_BFC3D548 }, - { 0x1FC3D558u, SCPH1001_func_1FC3D304_cont_BFC3D558 }, - { 0x1FC3D560u, SCPH1001_func_1FC3D304_cont_BFC3D560 }, - { 0x1FC3D56Cu, SCPH1001_func_1FC3D304_cont_BFC3D56C }, - { 0x1FC3D598u, SCPH1001_func_1FC3D304_cont_BFC3D598 }, - { 0x1FC3D5A0u, SCPH1001_func_1FC3D304_cont_BFC3D5A0 }, - { 0x1FC3D5ACu, SCPH1001_func_1FC3D304_cont_BFC3D5AC }, - { 0x1FC3D5D8u, SCPH1001_func_1FC3D304_cont_BFC3D5D8 }, - { 0x1FC3D5E0u, SCPH1001_func_1FC3D304_cont_BFC3D5E0 }, - { 0x1FC3D5ECu, SCPH1001_func_1FC3D304_cont_BFC3D5EC }, - { 0x1FC3D618u, SCPH1001_func_1FC3D304_cont_BFC3D618 }, - { 0x1FC3D620u, SCPH1001_func_1FC3D304_cont_BFC3D620 }, - { 0x1FC3D62Cu, SCPH1001_func_1FC3D304_cont_BFC3D62C }, - { 0x1FC3D654u, SCPH1001_func_1FC3D304_cont_BFC3D654 }, - { 0x1FC3D65Cu, SCPH1001_func_1FC3D65C }, - { 0x1FC3D6DCu, SCPH1001_func_1FC3D65C_cont_BFC3D6DC }, - { 0x1FC3D6E8u, SCPH1001_func_1FC3D65C_cont_BFC3D6E8 }, - { 0x1FC3D6F0u, SCPH1001_func_1FC3D65C_cont_BFC3D6F0 }, - { 0x1FC3D704u, SCPH1001_func_1FC3D65C_cont_BFC3D704 }, - { 0x1FC3D70Cu, SCPH1001_func_1FC3D65C_cont_BFC3D70C }, - { 0x1FC3D710u, SCPH1001_func_1FC3D65C_cont_BFC3D710 }, - { 0x1FC3D744u, SCPH1001_func_1FC3D65C_cont_BFC3D744 }, - { 0x1FC3D74Cu, SCPH1001_func_1FC3D65C_cont_BFC3D74C }, - { 0x1FC3D750u, SCPH1001_func_1FC3D65C_cont_BFC3D750 }, - { 0x1FC3D764u, SCPH1001_func_1FC3D65C_cont_BFC3D764 }, - { 0x1FC3D76Cu, SCPH1001_func_1FC3D65C_cont_BFC3D76C }, - { 0x1FC3D770u, SCPH1001_func_1FC3D65C_cont_BFC3D770 }, - { 0x1FC3D798u, SCPH1001_func_1FC3D65C_cont_BFC3D798 }, - { 0x1FC3D7A4u, SCPH1001_func_1FC3D65C_cont_BFC3D7A4 }, - { 0x1FC3D7A8u, SCPH1001_func_1FC3D65C_cont_BFC3D7A8 }, - { 0x1FC3D7D0u, SCPH1001_func_1FC3D65C_cont_BFC3D7D0 }, - { 0x1FC3D7DCu, SCPH1001_func_1FC3D65C_cont_BFC3D7DC }, - { 0x1FC3D7E0u, SCPH1001_func_1FC3D65C_cont_BFC3D7E0 }, - { 0x1FC3D810u, SCPH1001_func_1FC3D810 }, - { 0x1FC3D828u, SCPH1001_func_1FC3D810_cont_BFC3D828 }, - { 0x1FC3D83Cu, SCPH1001_func_1FC3D810_cont_BFC3D83C }, - { 0x1FC3D844u, SCPH1001_func_1FC3D810_cont_BFC3D844 }, - { 0x1FC3D848u, SCPH1001_func_1FC3D810_cont_BFC3D848 }, - { 0x1FC3D850u, SCPH1001_func_1FC3D810_cont_BFC3D850 }, - { 0x1FC3D870u, SCPH1001_func_1FC3D870 }, - { 0x1FC3D8A4u, SCPH1001_func_1FC3D870_cont_BFC3D8A4 }, - { 0x1FC3D8C0u, SCPH1001_func_1FC3D8C0 }, - { 0x1FC3D8DCu, SCPH1001_func_1FC3D8C0_cont_BFC3D8DC }, - { 0x1FC3D8E4u, SCPH1001_func_1FC3D8C0_cont_BFC3D8E4 }, - { 0x1FC3D8E8u, SCPH1001_func_1FC3D8C0_cont_BFC3D8E8 }, - { 0x1FC3D938u, SCPH1001_func_1FC3D8C0_cont_BFC3D938 }, - { 0x1FC3D950u, SCPH1001_func_1FC3D8C0_cont_BFC3D950 }, - { 0x1FC3D974u, SCPH1001_func_1FC3D8C0_cont_BFC3D974 }, - { 0x1FC3D984u, SCPH1001_func_1FC3D8C0_cont_BFC3D984 }, - { 0x1FC3D98Cu, SCPH1001_func_1FC3D8C0_cont_BFC3D98C }, - { 0x1FC3D9A0u, SCPH1001_func_1FC3D8C0_cont_BFC3D9A0 }, - { 0x1FC3D9A4u, SCPH1001_func_1FC3D8C0_cont_BFC3D9A4 }, - { 0x1FC3D9BCu, SCPH1001_func_1FC3D8C0_cont_BFC3D9BC }, - { 0x1FC3D9C4u, SCPH1001_func_1FC3D8C0_cont_BFC3D9C4 }, - { 0x1FC3D9E0u, SCPH1001_func_1FC3D8C0_cont_BFC3D9E0 }, - { 0x1FC3D9ECu, SCPH1001_func_1FC3D8C0_cont_BFC3D9EC }, - { 0x1FC3DA0Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DA0C }, - { 0x1FC3DA1Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DA1C }, - { 0x1FC3DA58u, SCPH1001_func_1FC3D8C0_cont_BFC3DA58 }, - { 0x1FC3DA88u, SCPH1001_func_1FC3D8C0_cont_BFC3DA88 }, - { 0x1FC3DA94u, SCPH1001_func_1FC3D8C0_cont_BFC3DA94 }, - { 0x1FC3DA9Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DA9C }, - { 0x1FC3DAB8u, SCPH1001_func_1FC3D8C0_cont_BFC3DAB8 }, - { 0x1FC3DAD0u, SCPH1001_func_1FC3D8C0_cont_BFC3DAD0 }, - { 0x1FC3DAE4u, SCPH1001_func_1FC3D8C0_cont_BFC3DAE4 }, - { 0x1FC3DAECu, SCPH1001_func_1FC3D8C0_cont_BFC3DAEC }, - { 0x1FC3DAF4u, SCPH1001_func_1FC3D8C0_cont_BFC3DAF4 }, - { 0x1FC3DB14u, SCPH1001_func_1FC3D8C0_cont_BFC3DB14 }, - { 0x1FC3DB20u, SCPH1001_func_1FC3D8C0_cont_BFC3DB20 }, - { 0x1FC3DB34u, SCPH1001_func_1FC3D8C0_cont_BFC3DB34 }, - { 0x1FC3DB3Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DB3C }, - { 0x1FC3DB4Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DB4C }, - { 0x1FC3DB7Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DB7C }, - { 0x1FC3DB8Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DB8C }, - { 0x1FC3DC08u, SCPH1001_func_1FC3D8C0_cont_BFC3DC08 }, - { 0x1FC3DC1Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DC1C }, - { 0x1FC3DC24u, SCPH1001_func_1FC3D8C0_cont_BFC3DC24 }, - { 0x1FC3DC28u, SCPH1001_func_1FC3D8C0_cont_BFC3DC28 }, - { 0x1FC3DC2Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DC2C }, - { 0x1FC3DC38u, SCPH1001_func_1FC3D8C0_cont_BFC3DC38 }, - { 0x1FC3DC4Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DC4C }, - { 0x1FC3DC54u, SCPH1001_func_1FC3D8C0_cont_BFC3DC54 }, - { 0x1FC3DC64u, SCPH1001_func_1FC3D8C0_cont_BFC3DC64 }, - { 0x1FC3DC74u, SCPH1001_func_1FC3D8C0_cont_BFC3DC74 }, - { 0x1FC3DCA4u, SCPH1001_func_1FC3D8C0_cont_BFC3DCA4 }, - { 0x1FC3DCB4u, SCPH1001_func_1FC3D8C0_cont_BFC3DCB4 }, - { 0x1FC3DCB8u, SCPH1001_func_1FC3D8C0_cont_BFC3DCB8 }, - { 0x1FC3DCC4u, SCPH1001_func_1FC3D8C0_cont_BFC3DCC4 }, - { 0x1FC3DCFCu, SCPH1001_func_1FC3D8C0_cont_BFC3DCFC }, - { 0x1FC3DD10u, SCPH1001_func_1FC3D8C0_cont_BFC3DD10 }, - { 0x1FC3DD18u, SCPH1001_func_1FC3D8C0_cont_BFC3DD18 }, - { 0x1FC3DD20u, SCPH1001_func_1FC3D8C0_cont_BFC3DD20 }, - { 0x1FC3DD2Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DD2C }, - { 0x1FC3DD3Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DD3C }, - { 0x1FC3DD4Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DD4C }, - { 0x1FC3DD64u, SCPH1001_func_1FC3D8C0_cont_BFC3DD64 }, - { 0x1FC3DD70u, SCPH1001_func_1FC3D8C0_cont_BFC3DD70 }, - { 0x1FC3DD7Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DD7C }, - { 0x1FC3DD8Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DD8C }, - { 0x1FC3DDA0u, SCPH1001_func_1FC3D8C0_cont_BFC3DDA0 }, - { 0x1FC3DDC4u, SCPH1001_func_1FC3D8C0_cont_BFC3DDC4 }, - { 0x1FC3DDD0u, SCPH1001_func_1FC3D8C0_cont_BFC3DDD0 }, - { 0x1FC3DDE4u, SCPH1001_func_1FC3D8C0_cont_BFC3DDE4 }, - { 0x1FC3DE08u, SCPH1001_func_1FC3D8C0_cont_BFC3DE08 }, - { 0x1FC3DE14u, SCPH1001_func_1FC3D8C0_cont_BFC3DE14 }, - { 0x1FC3DE28u, SCPH1001_func_1FC3D8C0_cont_BFC3DE28 }, - { 0x1FC3DE2Cu, SCPH1001_func_1FC3D8C0_cont_BFC3DE2C }, - { 0x1FC3DED0u, SCPH1001_func_1FC3DED0 }, - { 0x1FC3DEE8u, SCPH1001_func_1FC3DED0_cont_BFC3DEE8 }, - { 0x1FC3DEF0u, SCPH1001_func_1FC3DED0_cont_BFC3DEF0 }, - { 0x1FC3DEF8u, SCPH1001_func_1FC3DED0_cont_BFC3DEF8 }, - { 0x1FC3DF20u, SCPH1001_func_1FC3DF20 }, - { 0x1FC3DF30u, SCPH1001_func_1FC3DF20_cont_BFC3DF30 }, - { 0x1FC3DF3Cu, SCPH1001_func_1FC3DF20_cont_BFC3DF3C }, - { 0x1FC3DF44u, SCPH1001_func_1FC3DF20_cont_BFC3DF44 }, - { 0x1FC3DF4Cu, SCPH1001_func_1FC3DF20_cont_BFC3DF4C }, - { 0x1FC3DF54u, SCPH1001_func_1FC3DF20_cont_BFC3DF54 }, - { 0x1FC3DF5Cu, SCPH1001_func_1FC3DF20_cont_BFC3DF5C }, - { 0x1FC3DF78u, SCPH1001_func_1FC3DF20_cont_BFC3DF78 }, - { 0x1FC3DF90u, SCPH1001_func_1FC3DF90 }, - { 0x1FC3DFA8u, SCPH1001_func_1FC3DF90_cont_BFC3DFA8 }, - { 0x1FC3DFB0u, SCPH1001_func_1FC3DF90_cont_BFC3DFB0 }, - { 0x1FC3DFBCu, SCPH1001_func_1FC3DF90_cont_BFC3DFBC }, - { 0x1FC3DFC4u, SCPH1001_func_1FC3DF90_cont_BFC3DFC4 }, - { 0x1FC3DFC8u, SCPH1001_func_1FC3DF90_cont_BFC3DFC8 }, - { 0x1FC3DFD0u, SCPH1001_func_1FC3DF90_cont_BFC3DFD0 }, - { 0x1FC3DFD8u, SCPH1001_func_1FC3DF90_cont_BFC3DFD8 }, - { 0x1FC3DFE8u, SCPH1001_func_1FC3DF90_cont_BFC3DFE8 }, - { 0x1FC3DFFCu, SCPH1001_func_1FC3DF90_cont_BFC3DFFC }, - { 0x1FC3E008u, SCPH1001_func_1FC3DF90_cont_BFC3E008 }, - { 0x1FC3E020u, SCPH1001_func_1FC3E020 }, - { 0x1FC3E03Cu, SCPH1001_func_1FC3E020_cont_BFC3E03C }, - { 0x1FC3E044u, SCPH1001_func_1FC3E020_cont_BFC3E044 }, - { 0x1FC3E054u, SCPH1001_func_1FC3E020_cont_BFC3E054 }, - { 0x1FC3E064u, SCPH1001_func_1FC3E020_cont_BFC3E064 }, - { 0x1FC3E06Cu, SCPH1001_func_1FC3E020_cont_BFC3E06C }, - { 0x1FC3E07Cu, SCPH1001_func_1FC3E020_cont_BFC3E07C }, - { 0x1FC3E084u, SCPH1001_func_1FC3E020_cont_BFC3E084 }, - { 0x1FC3E088u, SCPH1001_func_1FC3E020_cont_BFC3E088 }, - { 0x1FC3E098u, SCPH1001_func_1FC3E020_cont_BFC3E098 }, - { 0x1FC3E0A0u, SCPH1001_func_1FC3E020_cont_BFC3E0A0 }, - { 0x1FC3E0B0u, SCPH1001_func_1FC3E020_cont_BFC3E0B0 }, - { 0x1FC3E0C0u, SCPH1001_func_1FC3E0C0 }, - { 0x1FC3E0CCu, SCPH1001_func_1FC3E0C0_cont_BFC3E0CC }, - { 0x1FC3E0D4u, SCPH1001_func_1FC3E0C0_cont_BFC3E0D4 }, - { 0x1FC3E0E8u, SCPH1001_func_1FC3E0E8 }, - { 0x1FC3E0FCu, SCPH1001_func_1FC3E0E8_cont_BFC3E0FC }, - { 0x1FC3E108u, SCPH1001_func_1FC3E0E8_cont_BFC3E108 }, - { 0x1FC3E110u, SCPH1001_func_1FC3E110 }, - { 0x1FC3E128u, SCPH1001_func_1FC3E110_cont_BFC3E128 }, - { 0x1FC3E144u, SCPH1001_func_1FC3E110_cont_BFC3E144 }, - { 0x1FC3E164u, SCPH1001_func_1FC3E110_cont_BFC3E164 }, - { 0x1FC3E178u, SCPH1001_func_1FC3E110_cont_BFC3E178 }, - { 0x1FC3E184u, SCPH1001_func_1FC3E110_cont_BFC3E184 }, - { 0x1FC3E194u, SCPH1001_func_1FC3E110_cont_BFC3E194 }, - { 0x1FC3E19Cu, SCPH1001_func_1FC3E110_cont_BFC3E19C }, - { 0x1FC3E1A0u, SCPH1001_func_1FC3E110_cont_BFC3E1A0 }, - { 0x1FC3E1A8u, SCPH1001_func_1FC3E110_cont_BFC3E1A8 }, - { 0x1FC3E1C0u, SCPH1001_func_1FC3E110_cont_BFC3E1C0 }, - { 0x1FC3E1DCu, SCPH1001_func_1FC3E110_cont_BFC3E1DC }, - { 0x1FC3E1E4u, SCPH1001_func_1FC3E110_cont_BFC3E1E4 }, - { 0x1FC3E1F0u, SCPH1001_func_1FC3E110_cont_BFC3E1F0 }, - { 0x1FC3E1F4u, SCPH1001_func_1FC3E110_cont_BFC3E1F4 }, - { 0x1FC3E1FCu, SCPH1001_func_1FC3E110_cont_BFC3E1FC }, - { 0x1FC3E204u, SCPH1001_func_1FC3E110_cont_BFC3E204 }, - { 0x1FC3E208u, SCPH1001_func_1FC3E110_cont_BFC3E208 }, - { 0x1FC3E20Cu, SCPH1001_func_1FC3E110_cont_BFC3E20C }, - { 0x1FC3E220u, SCPH1001_func_1FC3E110_cont_BFC3E220 }, - { 0x1FC3E228u, SCPH1001_func_1FC3E110_cont_BFC3E228 }, - { 0x1FC3E22Cu, SCPH1001_func_1FC3E110_cont_BFC3E22C }, - { 0x1FC3E23Cu, SCPH1001_func_1FC3E110_cont_BFC3E23C }, - { 0x1FC3E244u, SCPH1001_func_1FC3E110_cont_BFC3E244 }, - { 0x1FC3E258u, SCPH1001_func_1FC3E110_cont_BFC3E258 }, - { 0x1FC3E270u, SCPH1001_func_1FC3E110_cont_BFC3E270 }, - { 0x1FC3E28Cu, SCPH1001_func_1FC3E110_cont_BFC3E28C }, - { 0x1FC3E29Cu, SCPH1001_func_1FC3E110_cont_BFC3E29C }, - { 0x1FC3E2A0u, SCPH1001_func_1FC3E110_cont_BFC3E2A0 }, - { 0x1FC3E2ACu, SCPH1001_func_1FC3E110_cont_BFC3E2AC }, - { 0x1FC3E2B0u, SCPH1001_func_1FC3E110_cont_BFC3E2B0 }, - { 0x1FC3E2B8u, SCPH1001_func_1FC3E110_cont_BFC3E2B8 }, - { 0x1FC3E2BCu, SCPH1001_func_1FC3E110_cont_BFC3E2BC }, - { 0x1FC3E2D0u, SCPH1001_func_1FC3E110_cont_BFC3E2D0 }, - { 0x1FC3E2D8u, SCPH1001_func_1FC3E110_cont_BFC3E2D8 }, - { 0x1FC3E30Cu, SCPH1001_func_1FC3E110_cont_BFC3E30C }, - { 0x1FC3E318u, SCPH1001_func_1FC3E110_cont_BFC3E318 }, - { 0x1FC3E324u, SCPH1001_func_1FC3E324 }, - { 0x1FC3E32Cu, SCPH1001_func_1FC3E324_cont_BFC3E32C }, - { 0x1FC3E384u, SCPH1001_func_1FC3E324_cont_BFC3E384 }, - { 0x1FC3E390u, SCPH1001_func_1FC3E390 }, - { 0x1FC3E3C4u, SCPH1001_func_1FC3E390_cont_BFC3E3C4 }, - { 0x1FC3E3CCu, SCPH1001_func_1FC3E390_cont_BFC3E3CC }, - { 0x1FC3E3F0u, SCPH1001_func_1FC3E390_cont_BFC3E3F0 }, - { 0x1FC3E404u, SCPH1001_func_1FC3E390_cont_BFC3E404 }, - { 0x1FC3E40Cu, SCPH1001_func_1FC3E390_cont_BFC3E40C }, - { 0x1FC3E410u, SCPH1001_func_1FC3E390_cont_BFC3E410 }, - { 0x1FC3E434u, SCPH1001_func_1FC3E390_cont_BFC3E434 }, - { 0x1FC3E444u, SCPH1001_func_1FC3E390_cont_BFC3E444 }, - { 0x1FC3E458u, SCPH1001_func_1FC3E390_cont_BFC3E458 }, - { 0x1FC3E478u, SCPH1001_func_1FC3E390_cont_BFC3E478 }, - { 0x1FC3E488u, SCPH1001_func_1FC3E390_cont_BFC3E488 }, - { 0x1FC3E49Cu, SCPH1001_func_1FC3E390_cont_BFC3E49C }, - { 0x1FC3E4B0u, SCPH1001_func_1FC3E390_cont_BFC3E4B0 }, - { 0x1FC3E4BCu, SCPH1001_func_1FC3E390_cont_BFC3E4BC }, - { 0x1FC3E4D0u, SCPH1001_func_1FC3E390_cont_BFC3E4D0 }, - { 0x1FC3E4D8u, SCPH1001_func_1FC3E390_cont_BFC3E4D8 }, - { 0x1FC3E4E0u, SCPH1001_func_1FC3E390_cont_BFC3E4E0 }, - { 0x1FC3E4F0u, SCPH1001_func_1FC3E390_cont_BFC3E4F0 }, - { 0x1FC3E4F4u, SCPH1001_func_1FC3E390_cont_BFC3E4F4 }, - { 0x1FC3E4FCu, SCPH1001_func_1FC3E390_cont_BFC3E4FC }, - { 0x1FC3E504u, SCPH1001_func_1FC3E390_cont_BFC3E504 }, - { 0x1FC3E508u, SCPH1001_func_1FC3E390_cont_BFC3E508 }, - { 0x1FC3E520u, SCPH1001_func_1FC3E390_cont_BFC3E520 }, - { 0x1FC3E528u, SCPH1001_func_1FC3E390_cont_BFC3E528 }, - { 0x1FC3E540u, SCPH1001_func_1FC3E390_cont_BFC3E540 }, - { 0x1FC3E590u, SCPH1001_func_1FC3E390_cont_BFC3E590 }, - { 0x1FC3E598u, SCPH1001_func_1FC3E390_cont_BFC3E598 }, - { 0x1FC3E5A0u, SCPH1001_func_1FC3E390_cont_BFC3E5A0 }, - { 0x1FC3E5B4u, SCPH1001_func_1FC3E390_cont_BFC3E5B4 }, - { 0x1FC3E5CCu, SCPH1001_func_1FC3E390_cont_BFC3E5CC }, - { 0x1FC3E610u, SCPH1001_func_1FC3E390_cont_BFC3E610 }, - { 0x1FC3E624u, SCPH1001_func_1FC3E390_cont_BFC3E624 }, - { 0x1FC3E634u, SCPH1001_func_1FC3E634 }, - { 0x1FC3E660u, SCPH1001_func_1FC3E634_cont_BFC3E660 }, - { 0x1FC3E668u, SCPH1001_func_1FC3E634_cont_BFC3E668 }, - { 0x1FC3E694u, SCPH1001_func_1FC3E634_cont_BFC3E694 }, - { 0x1FC3E6A4u, SCPH1001_func_1FC3E634_cont_BFC3E6A4 }, - { 0x1FC3E6C4u, SCPH1001_func_1FC3E634_cont_BFC3E6C4 }, - { 0x1FC3E6E4u, SCPH1001_func_1FC3E634_cont_BFC3E6E4 }, - { 0x1FC3E6F0u, SCPH1001_func_1FC3E634_cont_BFC3E6F0 }, - { 0x1FC3E6F8u, SCPH1001_func_1FC3E634_cont_BFC3E6F8 }, - { 0x1FC3E700u, SCPH1001_func_1FC3E634_cont_BFC3E700 }, - { 0x1FC3E708u, SCPH1001_func_1FC3E634_cont_BFC3E708 }, - { 0x1FC3E728u, SCPH1001_func_1FC3E634_cont_BFC3E728 }, - { 0x1FC3E730u, SCPH1001_func_1FC3E634_cont_BFC3E730 }, - { 0x1FC3E734u, SCPH1001_func_1FC3E634_cont_BFC3E734 }, - { 0x1FC3E77Cu, SCPH1001_func_1FC3E634_cont_BFC3E77C }, - { 0x1FC3E79Cu, SCPH1001_func_1FC3E634_cont_BFC3E79C }, - { 0x1FC3E7A4u, SCPH1001_func_1FC3E634_cont_BFC3E7A4 }, - { 0x1FC3E7A8u, SCPH1001_func_1FC3E634_cont_BFC3E7A8 }, - { 0x1FC3E7C4u, SCPH1001_func_1FC3E634_cont_BFC3E7C4 }, - { 0x1FC3E7F8u, SCPH1001_func_1FC3E634_cont_BFC3E7F8 }, - { 0x1FC3E800u, SCPH1001_func_1FC3E634_cont_BFC3E800 }, - { 0x1FC3E808u, SCPH1001_func_1FC3E634_cont_BFC3E808 }, - { 0x1FC3E828u, SCPH1001_func_1FC3E634_cont_BFC3E828 }, - { 0x1FC3E830u, SCPH1001_func_1FC3E634_cont_BFC3E830 }, - { 0x1FC3E850u, SCPH1001_func_1FC3E634_cont_BFC3E850 }, - { 0x1FC3E858u, SCPH1001_func_1FC3E634_cont_BFC3E858 }, - { 0x1FC3E85Cu, SCPH1001_func_1FC3E634_cont_BFC3E85C }, - { 0x1FC3E88Cu, SCPH1001_func_1FC3E634_cont_BFC3E88C }, - { 0x1FC3E898u, SCPH1001_func_1FC3E634_cont_BFC3E898 }, - { 0x1FC3E8D8u, SCPH1001_func_1FC3E634_cont_BFC3E8D8 }, - { 0x1FC3E8DCu, SCPH1001_func_1FC3E634_cont_BFC3E8DC }, - { 0x1FC3E8E4u, SCPH1001_func_1FC3E634_cont_BFC3E8E4 }, - { 0x1FC3E8F4u, SCPH1001_func_1FC3E634_cont_BFC3E8F4 }, - { 0x1FC3E914u, SCPH1001_func_1FC3E634_cont_BFC3E914 }, - { 0x1FC3E91Cu, SCPH1001_func_1FC3E634_cont_BFC3E91C }, - { 0x1FC3E920u, SCPH1001_func_1FC3E634_cont_BFC3E920 }, - { 0x1FC3E938u, SCPH1001_func_1FC3E634_cont_BFC3E938 }, - { 0x1FC3E974u, SCPH1001_func_1FC3E634_cont_BFC3E974 }, - { 0x1FC3E978u, SCPH1001_func_1FC3E634_cont_BFC3E978 }, - { 0x1FC3E980u, SCPH1001_func_1FC3E980 }, - { 0x1FC3E9B0u, SCPH1001_func_1FC3E980_cont_BFC3E9B0 }, - { 0x1FC3E9B8u, SCPH1001_func_1FC3E980_cont_BFC3E9B8 }, - { 0x1FC3E9DCu, SCPH1001_func_1FC3E980_cont_BFC3E9DC }, - { 0x1FC3E9F0u, SCPH1001_func_1FC3E980_cont_BFC3E9F0 }, - { 0x1FC3E9F8u, SCPH1001_func_1FC3E980_cont_BFC3E9F8 }, - { 0x1FC3E9FCu, SCPH1001_func_1FC3E980_cont_BFC3E9FC }, - { 0x1FC3EA14u, SCPH1001_func_1FC3E980_cont_BFC3EA14 }, - { 0x1FC3EA1Cu, SCPH1001_func_1FC3E980_cont_BFC3EA1C }, - { 0x1FC3EA20u, SCPH1001_func_1FC3E980_cont_BFC3EA20 }, - { 0x1FC3EA38u, SCPH1001_func_1FC3E980_cont_BFC3EA38 }, - { 0x1FC3EA40u, SCPH1001_func_1FC3E980_cont_BFC3EA40 }, - { 0x1FC3EA44u, SCPH1001_func_1FC3E980_cont_BFC3EA44 }, - { 0x1FC3EA5Cu, SCPH1001_func_1FC3E980_cont_BFC3EA5C }, - { 0x1FC3EA64u, SCPH1001_func_1FC3E980_cont_BFC3EA64 }, - { 0x1FC3EA84u, SCPH1001_func_1FC3E980_cont_BFC3EA84 }, - { 0x1FC3EA9Cu, SCPH1001_func_1FC3E980_cont_BFC3EA9C }, - { 0x1FC3EABCu, SCPH1001_func_1FC3E980_cont_BFC3EABC }, - { 0x1FC3EAC4u, SCPH1001_func_1FC3E980_cont_BFC3EAC4 }, - { 0x1FC3EB00u, SCPH1001_func_1FC3E980_cont_BFC3EB00 }, - { 0x1FC3EB20u, SCPH1001_func_1FC3E980_cont_BFC3EB20 }, - { 0x1FC3EB28u, SCPH1001_func_1FC3E980_cont_BFC3EB28 }, - { 0x1FC3EB2Cu, SCPH1001_func_1FC3E980_cont_BFC3EB2C }, - { 0x1FC3EB4Cu, SCPH1001_func_1FC3E980_cont_BFC3EB4C }, - { 0x1FC3EB54u, SCPH1001_func_1FC3E980_cont_BFC3EB54 }, - { 0x1FC3EB64u, SCPH1001_func_1FC3E980_cont_BFC3EB64 }, - { 0x1FC3EB90u, SCPH1001_func_1FC3E980_cont_BFC3EB90 }, - { 0x1FC3EBA4u, SCPH1001_func_1FC3E980_cont_BFC3EBA4 }, - { 0x1FC3EBB4u, SCPH1001_func_1FC3E980_cont_BFC3EBB4 }, - { 0x1FC3EBCCu, SCPH1001_func_1FC3E980_cont_BFC3EBCC }, - { 0x1FC3EBE0u, SCPH1001_func_1FC3E980_cont_BFC3EBE0 }, - { 0x1FC3EBECu, SCPH1001_func_1FC3E980_cont_BFC3EBEC }, - { 0x1FC3EBF0u, SCPH1001_func_1FC3E980_cont_BFC3EBF0 }, - { 0x1FC3EC00u, SCPH1001_func_1FC3E980_cont_BFC3EC00 }, - { 0x1FC3EC0Cu, SCPH1001_func_1FC3E980_cont_BFC3EC0C }, - { 0x1FC3EC10u, SCPH1001_func_1FC3E980_cont_BFC3EC10 }, - { 0x1FC3EC18u, SCPH1001_func_1FC3E980_cont_BFC3EC18 }, - { 0x1FC3EC20u, SCPH1001_func_1FC3E980_cont_BFC3EC20 }, - { 0x1FC3EC34u, SCPH1001_func_1FC3E980_cont_BFC3EC34 }, - { 0x1FC3EC40u, SCPH1001_func_1FC3E980_cont_BFC3EC40 }, - { 0x1FC3EC44u, SCPH1001_func_1FC3E980_cont_BFC3EC44 }, - { 0x1FC3EC50u, SCPH1001_func_1FC3E980_cont_BFC3EC50 }, - { 0x1FC3EC58u, SCPH1001_func_1FC3E980_cont_BFC3EC58 }, - { 0x1FC3EC5Cu, SCPH1001_func_1FC3E980_cont_BFC3EC5C }, - { 0x1FC3EC64u, SCPH1001_func_1FC3E980_cont_BFC3EC64 }, - { 0x1FC3EC70u, SCPH1001_func_1FC3E980_cont_BFC3EC70 }, - { 0x1FC3EC88u, SCPH1001_func_1FC3E980_cont_BFC3EC88 }, - { 0x1FC3EC90u, SCPH1001_func_1FC3E980_cont_BFC3EC90 }, - { 0x1FC3EC94u, SCPH1001_func_1FC3E980_cont_BFC3EC94 }, - { 0x1FC3ECA0u, SCPH1001_func_1FC3E980_cont_BFC3ECA0 }, - { 0x1FC3ECA4u, SCPH1001_func_1FC3E980_cont_BFC3ECA4 }, - { 0x1FC3ECA8u, SCPH1001_func_1FC3E980_cont_BFC3ECA8 }, - { 0x1FC3ECB8u, SCPH1001_func_1FC3ECB8 }, - { 0x1FC3ECD4u, SCPH1001_func_1FC3ECB8_cont_BFC3ECD4 }, - { 0x1FC3ECE8u, SCPH1001_func_1FC3ECB8_cont_BFC3ECE8 }, - { 0x1FC3ECF4u, SCPH1001_func_1FC3ECB8_cont_BFC3ECF4 }, - { 0x1FC3ED04u, SCPH1001_func_1FC3ECB8_cont_BFC3ED04 }, - { 0x1FC3ED0Cu, SCPH1001_func_1FC3ECB8_cont_BFC3ED0C }, - { 0x1FC3ED24u, SCPH1001_func_1FC3ECB8_cont_BFC3ED24 }, - { 0x1FC3ED2Cu, SCPH1001_func_1FC3ECB8_cont_BFC3ED2C }, - { 0x1FC3ED34u, SCPH1001_func_1FC3ECB8_cont_BFC3ED34 }, - { 0x1FC3ED40u, SCPH1001_func_1FC3ED40 }, - { 0x1FC3ED5Cu, SCPH1001_func_1FC3ED40_cont_BFC3ED5C }, - { 0x1FC3ED68u, SCPH1001_func_1FC3ED40_cont_BFC3ED68 }, - { 0x1FC3ED7Cu, SCPH1001_func_1FC3ED40_cont_BFC3ED7C }, - { 0x1FC3ED84u, SCPH1001_func_1FC3ED40_cont_BFC3ED84 }, - { 0x1FC3ED90u, SCPH1001_func_1FC3ED40_cont_BFC3ED90 }, - { 0x1FC3ED9Cu, SCPH1001_func_1FC3ED40_cont_BFC3ED9C }, - { 0x1FC3EDA4u, SCPH1001_func_1FC3ED40_cont_BFC3EDA4 }, - { 0x1FC3EDB4u, SCPH1001_func_1FC3EDB4 }, - { 0x1FC3EDC4u, SCPH1001_func_1FC3EDB4_cont_BFC3EDC4 }, - { 0x1FC3EDD8u, SCPH1001_func_1FC3EDB4_cont_BFC3EDD8 }, - { 0x1FC3EDF8u, SCPH1001_func_1FC3EDB4_cont_BFC3EDF8 }, - { 0x1FC3EE0Cu, SCPH1001_func_1FC3EDB4_cont_BFC3EE0C }, - { 0x1FC3EE30u, SCPH1001_func_1FC3EDB4_cont_BFC3EE30 }, - { 0x1FC3EE44u, SCPH1001_func_1FC3EDB4_cont_BFC3EE44 }, - { 0x1FC3EE5Cu, SCPH1001_func_1FC3EDB4_cont_BFC3EE5C }, - { 0x1FC3EE70u, SCPH1001_func_1FC3EDB4_cont_BFC3EE70 }, - { 0x1FC3EE80u, SCPH1001_func_1FC3EE80 }, - { 0x1FC3EEA8u, SCPH1001_func_1FC3EE80_cont_BFC3EEA8 }, - { 0x1FC3EEB8u, SCPH1001_func_1FC3EE80_cont_BFC3EEB8 }, - { 0x1FC3EEC0u, SCPH1001_func_1FC3EEC0 }, - { 0x1FC3EEE4u, SCPH1001_func_1FC3EEE4 }, - { 0x1FC3EF08u, SCPH1001_func_1FC3EF08 }, - { 0x1FC3EF24u, SCPH1001_func_1FC3EF08_cont_BFC3EF24 }, - { 0x1FC3EF3Cu, SCPH1001_func_1FC3EF08_cont_BFC3EF3C }, - { 0x1FC3EF44u, SCPH1001_func_1FC3EF08_cont_BFC3EF44 }, - { 0x1FC3EF60u, SCPH1001_func_1FC3EF08_cont_BFC3EF60 }, - { 0x1FC3EF68u, SCPH1001_func_1FC3EF08_cont_BFC3EF68 }, - { 0x1FC3EF6Cu, SCPH1001_func_1FC3EF08_cont_BFC3EF6C }, - { 0x1FC3EF7Cu, SCPH1001_func_1FC3EF7C }, - { 0x1FC3EF98u, SCPH1001_func_1FC3EF7C_cont_BFC3EF98 }, - { 0x1FC3EFB0u, SCPH1001_func_1FC3EF7C_cont_BFC3EFB0 }, - { 0x1FC3EFB8u, SCPH1001_func_1FC3EF7C_cont_BFC3EFB8 }, - { 0x1FC3EFD4u, SCPH1001_func_1FC3EF7C_cont_BFC3EFD4 }, - { 0x1FC3EFDCu, SCPH1001_func_1FC3EF7C_cont_BFC3EFDC }, - { 0x1FC3EFE0u, SCPH1001_func_1FC3EF7C_cont_BFC3EFE0 }, - { 0x1FC3EFF0u, SCPH1001_func_1FC3EFF0 }, - { 0x1FC3F000u, SCPH1001_func_1FC3EFF0_cont_BFC3F000 }, - { 0x1FC3F020u, SCPH1001_func_1FC3EFF0_cont_BFC3F020 }, - { 0x1FC3F028u, SCPH1001_func_1FC3EFF0_cont_BFC3F028 }, - { 0x1FC3F030u, SCPH1001_func_1FC3EFF0_cont_BFC3F030 }, - { 0x1FC3F038u, SCPH1001_func_1FC3EFF0_cont_BFC3F038 }, - { 0x1FC3F040u, SCPH1001_func_1FC3EFF0_cont_BFC3F040 }, - { 0x1FC3F048u, SCPH1001_func_1FC3EFF0_cont_BFC3F048 }, - { 0x1FC3F050u, SCPH1001_func_1FC3EFF0_cont_BFC3F050 }, - { 0x1FC3F058u, SCPH1001_func_1FC3EFF0_cont_BFC3F058 }, - { 0x1FC3F05Cu, SCPH1001_func_1FC3EFF0_cont_BFC3F05C }, - { 0x1FC3F064u, SCPH1001_func_1FC3EFF0_cont_BFC3F064 }, - { 0x1FC3F06Cu, SCPH1001_func_1FC3EFF0_cont_BFC3F06C }, - { 0x1FC3F074u, SCPH1001_func_1FC3EFF0_cont_BFC3F074 }, - { 0x1FC3F07Cu, SCPH1001_func_1FC3EFF0_cont_BFC3F07C }, - { 0x1FC3F080u, SCPH1001_func_1FC3EFF0_cont_BFC3F080 }, - { 0x1FC3F090u, SCPH1001_func_1FC3F090 }, - { 0x1FC3F140u, SCPH1001_func_1FC3F090_cont_BFC3F140 }, - { 0x1FC3F150u, SCPH1001_func_1FC3F090_cont_BFC3F150 }, - { 0x1FC3F184u, SCPH1001_func_1FC3F090_cont_BFC3F184 }, - { 0x1FC3F19Cu, SCPH1001_func_1FC3F19C }, - { 0x1FC3F1B8u, SCPH1001_func_1FC3F1B8 }, - { 0x1FC3F1C8u, SCPH1001_func_1FC3F1B8_cont_BFC3F1C8 }, - { 0x1FC3F1DCu, SCPH1001_func_1FC3F1B8_cont_BFC3F1DC }, - { 0x1FC3F1E4u, SCPH1001_func_1FC3F1B8_cont_BFC3F1E4 }, - { 0x1FC3F1ECu, SCPH1001_func_1FC3F1B8_cont_BFC3F1EC }, - { 0x1FC3F200u, SCPH1001_func_1FC3F1B8_cont_BFC3F200 }, - { 0x1FC3F208u, SCPH1001_func_1FC3F1B8_cont_BFC3F208 }, - { 0x1FC3F210u, SCPH1001_func_1FC3F1B8_cont_BFC3F210 }, - { 0x1FC3F230u, SCPH1001_func_1FC3F1B8_cont_BFC3F230 }, - { 0x1FC3F238u, SCPH1001_func_1FC3F1B8_cont_BFC3F238 }, - { 0x1FC3F240u, SCPH1001_func_1FC3F1B8_cont_BFC3F240 }, - { 0x1FC3F244u, SCPH1001_func_1FC3F1B8_cont_BFC3F244 }, - { 0x1FC3F248u, SCPH1001_func_1FC3F1B8_cont_BFC3F248 }, - { 0x1FC3F24Cu, SCPH1001_func_1FC3F1B8_cont_BFC3F24C }, - { 0x1FC3F254u, SCPH1001_func_1FC3F1B8_cont_BFC3F254 }, - { 0x1FC3F2A4u, SCPH1001_func_1FC3F1B8_cont_BFC3F2A4 }, - { 0x1FC3F2B4u, SCPH1001_func_1FC3F2B4 }, - { 0x1FC3F2C4u, SCPH1001_func_1FC3F2B4_cont_BFC3F2C4 }, - { 0x1FC3F2D8u, SCPH1001_func_1FC3F2B4_cont_BFC3F2D8 }, - { 0x1FC3F2E0u, SCPH1001_func_1FC3F2B4_cont_BFC3F2E0 }, - { 0x1FC3F2E8u, SCPH1001_func_1FC3F2B4_cont_BFC3F2E8 }, - { 0x1FC3F2FCu, SCPH1001_func_1FC3F2B4_cont_BFC3F2FC }, - { 0x1FC3F304u, SCPH1001_func_1FC3F2B4_cont_BFC3F304 }, - { 0x1FC3F30Cu, SCPH1001_func_1FC3F2B4_cont_BFC3F30C }, - { 0x1FC3F314u, SCPH1001_func_1FC3F2B4_cont_BFC3F314 }, - { 0x1FC3F31Cu, SCPH1001_func_1FC3F2B4_cont_BFC3F31C }, - { 0x1FC3F324u, SCPH1001_func_1FC3F2B4_cont_BFC3F324 }, - { 0x1FC3F344u, SCPH1001_func_1FC3F2B4_cont_BFC3F344 }, - { 0x1FC3F34Cu, SCPH1001_func_1FC3F2B4_cont_BFC3F34C }, - { 0x1FC3F350u, SCPH1001_func_1FC3F2B4_cont_BFC3F350 }, - { 0x1FC3F358u, SCPH1001_func_1FC3F2B4_cont_BFC3F358 }, - { 0x1FC3F360u, SCPH1001_func_1FC3F2B4_cont_BFC3F360 }, - { 0x1FC3F368u, SCPH1001_func_1FC3F2B4_cont_BFC3F368 }, - { 0x1FC3F370u, SCPH1001_func_1FC3F2B4_cont_BFC3F370 }, - { 0x1FC3F374u, SCPH1001_func_1FC3F2B4_cont_BFC3F374 }, - { 0x1FC3F378u, SCPH1001_func_1FC3F2B4_cont_BFC3F378 }, - { 0x1FC3F37Cu, SCPH1001_func_1FC3F2B4_cont_BFC3F37C }, - { 0x1FC3F384u, SCPH1001_func_1FC3F2B4_cont_BFC3F384 }, - { 0x1FC3F3D4u, SCPH1001_func_1FC3F2B4_cont_BFC3F3D4 }, - { 0x1FC3F484u, SCPH1001_func_1FC3F484 }, - { 0x1FC3F49Cu, SCPH1001_func_1FC3F484_cont_BFC3F49C }, - { 0x1FC3F4A4u, SCPH1001_func_1FC3F484_cont_BFC3F4A4 }, - { 0x1FC3F4A8u, SCPH1001_func_1FC3F484_cont_BFC3F4A8 }, - { 0x1FC3F4ACu, SCPH1001_func_1FC3F484_cont_BFC3F4AC }, - { 0x1FC3F4B8u, SCPH1001_func_1FC3F484_cont_BFC3F4B8 }, - { 0x1FC3F4F0u, SCPH1001_func_1FC3F4F0 }, - { 0x1FC3F508u, SCPH1001_func_1FC3F4F0_cont_BFC3F508 }, - { 0x1FC3F514u, SCPH1001_func_1FC3F4F0_cont_BFC3F514 }, - { 0x1FC3F528u, SCPH1001_func_1FC3F4F0_cont_BFC3F528 }, - { 0x1FC3F534u, SCPH1001_func_1FC3F4F0_cont_BFC3F534 }, - { 0x1FC3F560u, SCPH1001_func_1FC3F4F0_cont_BFC3F560 }, - { 0x1FC3F570u, SCPH1001_func_1FC3F570 }, - { 0x1FC3F588u, SCPH1001_func_1FC3F570_cont_BFC3F588 }, - { 0x1FC3F590u, SCPH1001_func_1FC3F570_cont_BFC3F590 }, - { 0x1FC3F59Cu, SCPH1001_func_1FC3F570_cont_BFC3F59C }, - { 0x1FC3F5C8u, SCPH1001_func_1FC3F570_cont_BFC3F5C8 }, - { 0x1FC3F5D8u, SCPH1001_func_1FC3F5D8 }, - { 0x1FC3F5F4u, SCPH1001_func_1FC3F5D8_cont_BFC3F5F4 }, - { 0x1FC3F5FCu, SCPH1001_func_1FC3F5D8_cont_BFC3F5FC }, - { 0x1FC3F604u, SCPH1001_func_1FC3F5D8_cont_BFC3F604 }, - { 0x1FC3F608u, SCPH1001_func_1FC3F5D8_cont_BFC3F608 }, - { 0x1FC3F638u, SCPH1001_func_1FC3F5D8_cont_BFC3F638 }, - { 0x1FC3F648u, SCPH1001_func_1FC3F5D8_cont_BFC3F648 }, - { 0x1FC3F654u, SCPH1001_func_1FC3F5D8_cont_BFC3F654 }, - { 0x1FC3F664u, SCPH1001_func_1FC3F5D8_cont_BFC3F664 }, - { 0x1FC3F668u, SCPH1001_func_1FC3F5D8_cont_BFC3F668 }, - { 0x1FC3F670u, SCPH1001_func_1FC3F5D8_cont_BFC3F670 }, - { 0x1FC3F690u, SCPH1001_func_1FC3F5D8_cont_BFC3F690 }, - { 0x1FC3F698u, SCPH1001_func_1FC3F5D8_cont_BFC3F698 }, - { 0x1FC3F6A0u, SCPH1001_func_1FC3F5D8_cont_BFC3F6A0 }, - { 0x1FC3F6E0u, SCPH1001_func_1FC3F5D8_cont_BFC3F6E0 }, - { 0x1FC3F6F0u, SCPH1001_func_1FC3F6F0 }, - { 0x1FC3F708u, SCPH1001_func_1FC3F6F0_cont_BFC3F708 }, - { 0x1FC3F710u, SCPH1001_func_1FC3F6F0_cont_BFC3F710 }, - { 0x1FC3F730u, SCPH1001_func_1FC3F6F0_cont_BFC3F730 }, - { 0x1FC3F740u, SCPH1001_func_1FC3F6F0_cont_BFC3F740 }, - { 0x1FC3F74Cu, SCPH1001_func_1FC3F6F0_cont_BFC3F74C }, - { 0x1FC3F75Cu, SCPH1001_func_1FC3F6F0_cont_BFC3F75C }, - { 0x1FC3F760u, SCPH1001_func_1FC3F6F0_cont_BFC3F760 }, - { 0x1FC3F768u, SCPH1001_func_1FC3F6F0_cont_BFC3F768 }, - { 0x1FC3F788u, SCPH1001_func_1FC3F6F0_cont_BFC3F788 }, - { 0x1FC3F790u, SCPH1001_func_1FC3F6F0_cont_BFC3F790 }, - { 0x1FC3F798u, SCPH1001_func_1FC3F6F0_cont_BFC3F798 }, - { 0x1FC3F7D8u, SCPH1001_func_1FC3F6F0_cont_BFC3F7D8 }, - { 0x1FC3F7E8u, SCPH1001_func_1FC3F7E8 }, - { 0x1FC3F804u, SCPH1001_func_1FC3F7E8_cont_BFC3F804 }, - { 0x1FC3F810u, SCPH1001_func_1FC3F7E8_cont_BFC3F810 }, - { 0x1FC3F824u, SCPH1001_func_1FC3F7E8_cont_BFC3F824 }, - { 0x1FC3F82Cu, SCPH1001_func_1FC3F7E8_cont_BFC3F82C }, - { 0x1FC3F834u, SCPH1001_func_1FC3F7E8_cont_BFC3F834 }, - { 0x1FC3F848u, SCPH1001_func_1FC3F7E8_cont_BFC3F848 }, - { 0x1FC3F850u, SCPH1001_func_1FC3F7E8_cont_BFC3F850 }, - { 0x1FC3F854u, SCPH1001_func_1FC3F7E8_cont_BFC3F854 }, - { 0x1FC3F86Cu, SCPH1001_func_1FC3F7E8_cont_BFC3F86C }, - { 0x1FC3F8D0u, SCPH1001_func_1FC3F7E8_cont_BFC3F8D0 }, - { 0x1FC3F8D4u, SCPH1001_func_1FC3F7E8_cont_BFC3F8D4 }, - { 0x1FC3F8E4u, SCPH1001_func_1FC3F8E4 }, - { 0x1FC3F8FCu, SCPH1001_func_1FC3F8E4_cont_BFC3F8FC }, - { 0x1FC3F908u, SCPH1001_func_1FC3F8E4_cont_BFC3F908 }, - { 0x1FC3F910u, SCPH1001_func_1FC3F8E4_cont_BFC3F910 }, - { 0x1FC3F934u, SCPH1001_func_1FC3F8E4_cont_BFC3F934 }, - { 0x1FC3F93Cu, SCPH1001_func_1FC3F8E4_cont_BFC3F93C }, - { 0x1FC3F94Cu, SCPH1001_func_1FC3F8E4_cont_BFC3F94C }, - { 0x1FC3F99Cu, SCPH1001_func_1FC3F8E4_cont_BFC3F99C }, - { 0x1FC3F9ACu, SCPH1001_func_1FC3F9AC }, - { 0x1FC3F9C4u, SCPH1001_func_1FC3F9AC_cont_BFC3F9C4 }, - { 0x1FC3F9CCu, SCPH1001_func_1FC3F9AC_cont_BFC3F9CC }, - { 0x1FC3F9D4u, SCPH1001_func_1FC3F9AC_cont_BFC3F9D4 }, - { 0x1FC3FA00u, SCPH1001_func_1FC3F9AC_cont_BFC3FA00 }, - { 0x1FC3FA10u, SCPH1001_func_1FC3FA10 }, - { 0x1FC3FA1Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA1C }, - { 0x1FC3FA30u, SCPH1001_func_1FC3FA10_cont_BFC3FA30 }, - { 0x1FC3FA38u, SCPH1001_func_1FC3FA10_cont_BFC3FA38 }, - { 0x1FC3FA40u, SCPH1001_func_1FC3FA10_cont_BFC3FA40 }, - { 0x1FC3FA54u, SCPH1001_func_1FC3FA10_cont_BFC3FA54 }, - { 0x1FC3FA5Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA5C }, - { 0x1FC3FA64u, SCPH1001_func_1FC3FA10_cont_BFC3FA64 }, - { 0x1FC3FA6Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA6C }, - { 0x1FC3FA74u, SCPH1001_func_1FC3FA10_cont_BFC3FA74 }, - { 0x1FC3FA7Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA7C }, - { 0x1FC3FA84u, SCPH1001_func_1FC3FA10_cont_BFC3FA84 }, - { 0x1FC3FA8Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA8C }, - { 0x1FC3FA94u, SCPH1001_func_1FC3FA10_cont_BFC3FA94 }, - { 0x1FC3FA9Cu, SCPH1001_func_1FC3FA10_cont_BFC3FA9C }, - { 0x1FC3FAA0u, SCPH1001_func_1FC3FA10_cont_BFC3FAA0 }, - { 0x1FC3FAA4u, SCPH1001_func_1FC3FA10_cont_BFC3FAA4 }, - { 0x1FC3FAA8u, SCPH1001_func_1FC3FA10_cont_BFC3FAA8 }, - { 0x1FC3FAB0u, SCPH1001_func_1FC3FA10_cont_BFC3FAB0 }, - { 0x1FC3FADCu, SCPH1001_func_1FC3FA10_cont_BFC3FADC }, - { 0x1FC3FAECu, SCPH1001_func_1FC3FAEC }, - { 0x1FC3FB04u, SCPH1001_func_1FC3FAEC_cont_BFC3FB04 }, - { 0x1FC3FB10u, SCPH1001_func_1FC3FAEC_cont_BFC3FB10 }, - { 0x1FC3FB18u, SCPH1001_func_1FC3FAEC_cont_BFC3FB18 }, - { 0x1FC3FB20u, SCPH1001_func_1FC3FAEC_cont_BFC3FB20 }, - { 0x1FC3FB28u, SCPH1001_func_1FC3FAEC_cont_BFC3FB28 }, - { 0x1FC3FB30u, SCPH1001_func_1FC3FAEC_cont_BFC3FB30 }, - { 0x1FC3FB44u, SCPH1001_func_1FC3FAEC_cont_BFC3FB44 }, - { 0x1FC3FB64u, SCPH1001_func_1FC3FAEC_cont_BFC3FB64 }, - { 0x1FC3FB74u, SCPH1001_func_1FC3FB74 }, - { 0x1FC3FB80u, SCPH1001_func_1FC3FB74_cont_BFC3FB80 }, - { 0x1FC3FB94u, SCPH1001_func_1FC3FB74_cont_BFC3FB94 }, - { 0x1FC3FB9Cu, SCPH1001_func_1FC3FB74_cont_BFC3FB9C }, - { 0x1FC3FBA4u, SCPH1001_func_1FC3FB74_cont_BFC3FBA4 }, - { 0x1FC3FBB8u, SCPH1001_func_1FC3FB74_cont_BFC3FBB8 }, - { 0x1FC3FBC0u, SCPH1001_func_1FC3FB74_cont_BFC3FBC0 }, - { 0x1FC3FBC8u, SCPH1001_func_1FC3FB74_cont_BFC3FBC8 }, - { 0x1FC3FBD0u, SCPH1001_func_1FC3FB74_cont_BFC3FBD0 }, - { 0x1FC3FBD8u, SCPH1001_func_1FC3FB74_cont_BFC3FBD8 }, - { 0x1FC3FBE0u, SCPH1001_func_1FC3FB74_cont_BFC3FBE0 }, - { 0x1FC3FBE8u, SCPH1001_func_1FC3FB74_cont_BFC3FBE8 }, - { 0x1FC3FBF0u, SCPH1001_func_1FC3FB74_cont_BFC3FBF0 }, - { 0x1FC3FBF8u, SCPH1001_func_1FC3FB74_cont_BFC3FBF8 }, - { 0x1FC3FC00u, SCPH1001_func_1FC3FB74_cont_BFC3FC00 }, - { 0x1FC3FC04u, SCPH1001_func_1FC3FB74_cont_BFC3FC04 }, - { 0x1FC3FC08u, SCPH1001_func_1FC3FB74_cont_BFC3FC08 }, - { 0x1FC3FC0Cu, SCPH1001_func_1FC3FB74_cont_BFC3FC0C }, - { 0x1FC3FC14u, SCPH1001_func_1FC3FB74_cont_BFC3FC14 }, - { 0x1FC3FC40u, SCPH1001_func_1FC3FB74_cont_BFC3FC40 }, - { 0x1FC3FC50u, SCPH1001_func_1FC3FC50 }, - { 0x1FC3FC5Cu, SCPH1001_func_1FC3FC50_cont_BFC3FC5C }, - { 0x1FC3FC70u, SCPH1001_func_1FC3FC50_cont_BFC3FC70 }, - { 0x1FC3FC78u, SCPH1001_func_1FC3FC50_cont_BFC3FC78 }, - { 0x1FC3FC80u, SCPH1001_func_1FC3FC50_cont_BFC3FC80 }, - { 0x1FC3FC94u, SCPH1001_func_1FC3FC50_cont_BFC3FC94 }, - { 0x1FC3FC9Cu, SCPH1001_func_1FC3FC50_cont_BFC3FC9C }, - { 0x1FC3FCA4u, SCPH1001_func_1FC3FC50_cont_BFC3FCA4 }, - { 0x1FC3FCACu, SCPH1001_func_1FC3FC50_cont_BFC3FCAC }, - { 0x1FC3FCB4u, SCPH1001_func_1FC3FC50_cont_BFC3FCB4 }, - { 0x1FC3FCBCu, SCPH1001_func_1FC3FC50_cont_BFC3FCBC }, - { 0x1FC3FCC0u, SCPH1001_func_1FC3FC50_cont_BFC3FCC0 }, - { 0x1FC3FCC4u, SCPH1001_func_1FC3FC50_cont_BFC3FCC4 }, - { 0x1FC3FCC8u, SCPH1001_func_1FC3FC50_cont_BFC3FCC8 }, - { 0x1FC3FCD0u, SCPH1001_func_1FC3FC50_cont_BFC3FCD0 }, - { 0x1FC3FCFCu, SCPH1001_func_1FC3FC50_cont_BFC3FCFC }, - { 0x1FC3FD0Cu, SCPH1001_func_1FC3FD0C }, - { 0x1FC3FD18u, SCPH1001_func_1FC3FD0C_cont_BFC3FD18 }, - { 0x1FC3FD2Cu, SCPH1001_func_1FC3FD0C_cont_BFC3FD2C }, - { 0x1FC3FD34u, SCPH1001_func_1FC3FD0C_cont_BFC3FD34 }, - { 0x1FC3FD3Cu, SCPH1001_func_1FC3FD0C_cont_BFC3FD3C }, - { 0x1FC3FD50u, SCPH1001_func_1FC3FD0C_cont_BFC3FD50 }, - { 0x1FC3FD58u, SCPH1001_func_1FC3FD0C_cont_BFC3FD58 }, - { 0x1FC3FD60u, SCPH1001_func_1FC3FD0C_cont_BFC3FD60 }, - { 0x1FC3FD68u, SCPH1001_func_1FC3FD0C_cont_BFC3FD68 }, - { 0x1FC3FD70u, SCPH1001_func_1FC3FD0C_cont_BFC3FD70 }, - { 0x1FC3FD78u, SCPH1001_func_1FC3FD0C_cont_BFC3FD78 }, - { 0x1FC3FD7Cu, SCPH1001_func_1FC3FD0C_cont_BFC3FD7C }, - { 0x1FC3FD80u, SCPH1001_func_1FC3FD0C_cont_BFC3FD80 }, - { 0x1FC3FD84u, SCPH1001_func_1FC3FD0C_cont_BFC3FD84 }, - { 0x1FC3FD8Cu, SCPH1001_func_1FC3FD0C_cont_BFC3FD8C }, - { 0x1FC3FDB8u, SCPH1001_func_1FC3FD0C_cont_BFC3FDB8 }, - { 0x1FC3FDC8u, SCPH1001_func_1FC3FDC8 }, - { 0x1FC3FDE0u, SCPH1001_func_1FC3FDC8_cont_BFC3FDE0 }, - { 0x1FC3FDE8u, SCPH1001_func_1FC3FDC8_cont_BFC3FDE8 }, - { 0x1FC3FDF0u, SCPH1001_func_1FC3FDC8_cont_BFC3FDF0 }, - { 0x1FC3FE50u, SCPH1001_func_1FC3FDC8_cont_BFC3FE50 }, - { 0x1FC3FE60u, SCPH1001_func_1FC3FE60 }, - { 0x1FC3FE7Cu, SCPH1001_func_1FC3FE60_cont_BFC3FE7C }, - { 0x1FC3FE84u, SCPH1001_func_1FC3FE60_cont_BFC3FE84 }, - { 0x1FC3FEA4u, SCPH1001_func_1FC3FE60_cont_BFC3FEA4 }, - { 0x1FC3FEACu, SCPH1001_func_1FC3FE60_cont_BFC3FEAC }, - { 0x1FC3FEC0u, SCPH1001_func_1FC3FE60_cont_BFC3FEC0 }, - { 0x1FC3FEFCu, SCPH1001_func_1FC3FE60_cont_BFC3FEFC }, - { 0x1FC3FF04u, SCPH1001_func_1FC3FE60_cont_BFC3FF04 }, - { 0x1FC3FF30u, SCPH1001_func_1FC3FE60_cont_BFC3FF30 }, - { 0x1FC3FF40u, SCPH1001_func_1FC3FF40 }, - { 0x1FC3FF5Cu, SCPH1001_func_1FC3FF40_cont_BFC3FF5C }, - { 0x1FC3FF64u, SCPH1001_func_1FC3FF40_cont_BFC3FF64 }, - { 0x1FC3FF84u, SCPH1001_func_1FC3FF40_cont_BFC3FF84 }, - { 0x1FC3FF8Cu, SCPH1001_func_1FC3FF40_cont_BFC3FF8C }, - { 0x1FC3FFA0u, SCPH1001_func_1FC3FF40_cont_BFC3FFA0 }, - { 0x1FC3FFDCu, SCPH1001_func_1FC3FF40_cont_BFC3FFDC }, - { 0x1FC3FFE4u, SCPH1001_func_1FC3FF40_cont_BFC3FFE4 }, - { 0x1FC40024u, SCPH1001_func_1FC3FF40_cont_BFC40024 }, - { 0x1FC40034u, SCPH1001_func_1FC40034 }, - { 0x1FC40040u, SCPH1001_func_1FC40034_cont_BFC40040 }, - { 0x1FC40054u, SCPH1001_func_1FC40034_cont_BFC40054 }, - { 0x1FC4005Cu, SCPH1001_func_1FC40034_cont_BFC4005C }, - { 0x1FC40064u, SCPH1001_func_1FC40034_cont_BFC40064 }, - { 0x1FC40078u, SCPH1001_func_1FC40034_cont_BFC40078 }, - { 0x1FC40080u, SCPH1001_func_1FC40034_cont_BFC40080 }, - { 0x1FC40088u, SCPH1001_func_1FC40034_cont_BFC40088 }, - { 0x1FC40090u, SCPH1001_func_1FC40034_cont_BFC40090 }, - { 0x1FC40098u, SCPH1001_func_1FC40034_cont_BFC40098 }, - { 0x1FC400A0u, SCPH1001_func_1FC40034_cont_BFC400A0 }, - { 0x1FC400CCu, SCPH1001_func_1FC40034_cont_BFC400CC }, - { 0x1FC400DCu, SCPH1001_func_1FC400DC }, - { 0x1FC400E8u, SCPH1001_func_1FC400DC_cont_BFC400E8 }, - { 0x1FC400FCu, SCPH1001_func_1FC400DC_cont_BFC400FC }, - { 0x1FC40104u, SCPH1001_func_1FC400DC_cont_BFC40104 }, - { 0x1FC4010Cu, SCPH1001_func_1FC400DC_cont_BFC4010C }, - { 0x1FC40120u, SCPH1001_func_1FC400DC_cont_BFC40120 }, - { 0x1FC40128u, SCPH1001_func_1FC400DC_cont_BFC40128 }, - { 0x1FC40130u, SCPH1001_func_1FC400DC_cont_BFC40130 }, - { 0x1FC40138u, SCPH1001_func_1FC400DC_cont_BFC40138 }, - { 0x1FC40140u, SCPH1001_func_1FC400DC_cont_BFC40140 }, - { 0x1FC40148u, SCPH1001_func_1FC400DC_cont_BFC40148 }, - { 0x1FC40174u, SCPH1001_func_1FC400DC_cont_BFC40174 }, - { 0x1FC40184u, SCPH1001_func_1FC40184 }, - { 0x1FC40194u, SCPH1001_func_1FC40184_cont_BFC40194 }, - { 0x1FC401A8u, SCPH1001_func_1FC40184_cont_BFC401A8 }, - { 0x1FC401B0u, SCPH1001_func_1FC40184_cont_BFC401B0 }, - { 0x1FC401B8u, SCPH1001_func_1FC40184_cont_BFC401B8 }, - { 0x1FC401CCu, SCPH1001_func_1FC40184_cont_BFC401CC }, - { 0x1FC401D4u, SCPH1001_func_1FC40184_cont_BFC401D4 }, - { 0x1FC401DCu, SCPH1001_func_1FC40184_cont_BFC401DC }, - { 0x1FC401E4u, SCPH1001_func_1FC40184_cont_BFC401E4 }, - { 0x1FC401ECu, SCPH1001_func_1FC40184_cont_BFC401EC }, - { 0x1FC401F4u, SCPH1001_func_1FC40184_cont_BFC401F4 }, - { 0x1FC401FCu, SCPH1001_func_1FC40184_cont_BFC401FC }, - { 0x1FC40210u, SCPH1001_func_1FC40184_cont_BFC40210 }, - { 0x1FC40220u, SCPH1001_func_1FC40184_cont_BFC40220 }, - { 0x1FC40230u, SCPH1001_func_1FC40184_cont_BFC40230 }, - { 0x1FC40250u, SCPH1001_func_1FC40184_cont_BFC40250 }, - { 0x1FC40260u, SCPH1001_func_1FC40260 }, - { 0x1FC40278u, SCPH1001_func_1FC40260_cont_BFC40278 }, - { 0x1FC40284u, SCPH1001_func_1FC40260_cont_BFC40284 }, - { 0x1FC4028Cu, SCPH1001_func_1FC40260_cont_BFC4028C }, - { 0x1FC402A0u, SCPH1001_func_1FC40260_cont_BFC402A0 }, - { 0x1FC402CCu, SCPH1001_func_1FC40260_cont_BFC402CC }, - { 0x1FC402DCu, SCPH1001_func_1FC402DC }, - { 0x1FC402F8u, SCPH1001_func_1FC402DC_cont_BFC402F8 }, - { 0x1FC40300u, SCPH1001_func_1FC402DC_cont_BFC40300 }, - { 0x1FC40320u, SCPH1001_func_1FC402DC_cont_BFC40320 }, - { 0x1FC40328u, SCPH1001_func_1FC402DC_cont_BFC40328 }, - { 0x1FC40348u, SCPH1001_func_1FC402DC_cont_BFC40348 }, - { 0x1FC40370u, SCPH1001_func_1FC402DC_cont_BFC40370 }, - { 0x1FC40378u, SCPH1001_func_1FC402DC_cont_BFC40378 }, - { 0x1FC40394u, SCPH1001_func_1FC402DC_cont_BFC40394 }, - { 0x1FC403B4u, SCPH1001_func_1FC402DC_cont_BFC403B4 }, - { 0x1FC403C4u, SCPH1001_func_1FC403C4 }, - { 0x1FC403D8u, SCPH1001_func_1FC403C4_cont_BFC403D8 }, - { 0x1FC403E0u, SCPH1001_func_1FC403C4_cont_BFC403E0 }, - { 0x1FC40404u, SCPH1001_func_1FC40404 }, - { 0x1FC40418u, SCPH1001_func_1FC40404_cont_BFC40418 }, - { 0x1FC40420u, SCPH1001_func_1FC40404_cont_BFC40420 }, - { 0x1FC40428u, SCPH1001_func_1FC40404_cont_BFC40428 }, - { 0x1FC40430u, SCPH1001_func_1FC40404_cont_BFC40430 }, - { 0x1FC40434u, SCPH1001_func_1FC40404_cont_BFC40434 }, - { 0x1FC40448u, SCPH1001_func_1FC40404_cont_BFC40448 }, - { 0x1FC40478u, SCPH1001_func_1FC40404_cont_BFC40478 }, - { 0x1FC40484u, SCPH1001_func_1FC40484 }, - { 0x1FC404A8u, SCPH1001_func_1FC40484_cont_BFC404A8 }, - { 0x1FC404B0u, SCPH1001_func_1FC40484_cont_BFC404B0 }, - { 0x1FC404C4u, SCPH1001_func_1FC40484_cont_BFC404C4 }, - { 0x1FC404CCu, SCPH1001_func_1FC40484_cont_BFC404CC }, - { 0x1FC40518u, SCPH1001_func_1FC40484_cont_BFC40518 }, - { 0x1FC40534u, SCPH1001_func_1FC40484_cont_BFC40534 }, - { 0x1FC4053Cu, SCPH1001_func_1FC40484_cont_BFC4053C }, - { 0x1FC4054Cu, SCPH1001_func_1FC40484_cont_BFC4054C }, - { 0x1FC40554u, SCPH1001_func_1FC40484_cont_BFC40554 }, - { 0x1FC40564u, SCPH1001_func_1FC40484_cont_BFC40564 }, - { 0x1FC4056Cu, SCPH1001_func_1FC40484_cont_BFC4056C }, - { 0x1FC4057Cu, SCPH1001_func_1FC40484_cont_BFC4057C }, - { 0x1FC40584u, SCPH1001_func_1FC40484_cont_BFC40584 }, - { 0x1FC40594u, SCPH1001_func_1FC40484_cont_BFC40594 }, - { 0x1FC4059Cu, SCPH1001_func_1FC40484_cont_BFC4059C }, - { 0x1FC405ACu, SCPH1001_func_1FC40484_cont_BFC405AC }, - { 0x1FC405B0u, SCPH1001_func_1FC40484_cont_BFC405B0 }, - { 0x1FC405DCu, SCPH1001_func_1FC40484_cont_BFC405DC }, - { 0x1FC405E0u, SCPH1001_func_1FC40484_cont_BFC405E0 }, - { 0x1FC4060Cu, SCPH1001_func_1FC40484_cont_BFC4060C }, - { 0x1FC40610u, SCPH1001_func_1FC40484_cont_BFC40610 }, - { 0x1FC40618u, SCPH1001_func_1FC40484_cont_BFC40618 }, - { 0x1FC40628u, SCPH1001_func_1FC40628 }, - { 0x1FC4064Cu, SCPH1001_func_1FC40628_cont_BFC4064C }, - { 0x1FC40654u, SCPH1001_func_1FC40628_cont_BFC40654 }, - { 0x1FC40668u, SCPH1001_func_1FC40628_cont_BFC40668 }, - { 0x1FC40670u, SCPH1001_func_1FC40628_cont_BFC40670 }, - { 0x1FC406B4u, SCPH1001_func_1FC40628_cont_BFC406B4 }, - { 0x1FC406C4u, SCPH1001_func_1FC40628_cont_BFC406C4 }, - { 0x1FC406D0u, SCPH1001_func_1FC40628_cont_BFC406D0 }, - { 0x1FC406E0u, SCPH1001_func_1FC406E0 }, - { 0x1FC406F0u, SCPH1001_func_1FC406E0_cont_BFC406F0 }, - { 0x1FC40700u, SCPH1001_func_1FC40700 }, - { 0x1FC40710u, SCPH1001_func_1FC40700_cont_BFC40710 }, - { 0x1FC40720u, SCPH1001_func_1FC40720 }, - { 0x1FC40744u, SCPH1001_func_1FC40744 }, - { 0x1FC40780u, SCPH1001_func_1FC40744_cont_BFC40780 }, - { 0x1FC40784u, SCPH1001_func_1FC40744_cont_BFC40784 }, - { 0x1FC407B0u, SCPH1001_func_1FC40744_cont_BFC407B0 }, - { 0x1FC407B8u, SCPH1001_func_1FC407B8 }, - { 0x1FC407D0u, SCPH1001_func_1FC407B8_cont_BFC407D0 }, - { 0x1FC407D8u, SCPH1001_func_1FC407B8_cont_BFC407D8 }, - { 0x1FC407E0u, SCPH1001_func_1FC407B8_cont_BFC407E0 }, - { 0x1FC407ECu, SCPH1001_func_1FC407B8_cont_BFC407EC }, - { 0x1FC407F4u, SCPH1001_func_1FC407B8_cont_BFC407F4 }, - { 0x1FC407FCu, SCPH1001_func_1FC407B8_cont_BFC407FC }, - { 0x1FC40814u, SCPH1001_func_1FC407B8_cont_BFC40814 }, - { 0x1FC4081Cu, SCPH1001_func_1FC407B8_cont_BFC4081C }, - { 0x1FC40824u, SCPH1001_func_1FC407B8_cont_BFC40824 }, - { 0x1FC4082Cu, SCPH1001_func_1FC407B8_cont_BFC4082C }, - { 0x1FC40834u, SCPH1001_func_1FC407B8_cont_BFC40834 }, - { 0x1FC40838u, SCPH1001_func_1FC407B8_cont_BFC40838 }, - { 0x1FC40844u, SCPH1001_func_1FC407B8_cont_BFC40844 }, - { 0x1FC40848u, SCPH1001_func_1FC407B8_cont_BFC40848 }, - { 0x1FC40854u, SCPH1001_func_1FC407B8_cont_BFC40854 }, - { 0x1FC4085Cu, SCPH1001_func_1FC407B8_cont_BFC4085C }, - { 0x1FC40864u, SCPH1001_func_1FC407B8_cont_BFC40864 }, - { 0x1FC4086Cu, SCPH1001_func_1FC407B8_cont_BFC4086C }, - { 0x1FC40874u, SCPH1001_func_1FC407B8_cont_BFC40874 }, - { 0x1FC4087Cu, SCPH1001_func_1FC407B8_cont_BFC4087C }, - { 0x1FC40884u, SCPH1001_func_1FC407B8_cont_BFC40884 }, - { 0x1FC4088Cu, SCPH1001_func_1FC407B8_cont_BFC4088C }, - { 0x1FC40894u, SCPH1001_func_1FC407B8_cont_BFC40894 }, - { 0x1FC4089Cu, SCPH1001_func_1FC407B8_cont_BFC4089C }, - { 0x1FC408A4u, SCPH1001_func_1FC407B8_cont_BFC408A4 }, - { 0x1FC408ACu, SCPH1001_func_1FC407B8_cont_BFC408AC }, - { 0x1FC408B4u, SCPH1001_func_1FC407B8_cont_BFC408B4 }, - { 0x1FC408BCu, SCPH1001_func_1FC407B8_cont_BFC408BC }, - { 0x1FC408C4u, SCPH1001_func_1FC407B8_cont_BFC408C4 }, - { 0x1FC408CCu, SCPH1001_func_1FC407B8_cont_BFC408CC }, - { 0x1FC408D4u, SCPH1001_func_1FC407B8_cont_BFC408D4 }, - { 0x1FC408DCu, SCPH1001_func_1FC407B8_cont_BFC408DC }, - { 0x1FC408E4u, SCPH1001_func_1FC407B8_cont_BFC408E4 }, - { 0x1FC408ECu, SCPH1001_func_1FC407B8_cont_BFC408EC }, - { 0x1FC408F4u, SCPH1001_func_1FC407B8_cont_BFC408F4 }, - { 0x1FC408F8u, SCPH1001_func_1FC407B8_cont_BFC408F8 }, - { 0x1FC40904u, SCPH1001_func_1FC407B8_cont_BFC40904 }, - { 0x1FC4090Cu, SCPH1001_func_1FC407B8_cont_BFC4090C }, - { 0x1FC40918u, SCPH1001_func_1FC407B8_cont_BFC40918 }, - { 0x1FC40920u, SCPH1001_func_1FC407B8_cont_BFC40920 }, - { 0x1FC40928u, SCPH1001_func_1FC407B8_cont_BFC40928 }, - { 0x1FC40930u, SCPH1001_func_1FC407B8_cont_BFC40930 }, - { 0x1FC40938u, SCPH1001_func_1FC407B8_cont_BFC40938 }, - { 0x1FC40940u, SCPH1001_func_1FC407B8_cont_BFC40940 }, - { 0x1FC40948u, SCPH1001_func_1FC407B8_cont_BFC40948 }, - { 0x1FC40950u, SCPH1001_func_1FC407B8_cont_BFC40950 }, - { 0x1FC40958u, SCPH1001_func_1FC407B8_cont_BFC40958 }, - { 0x1FC40960u, SCPH1001_func_1FC407B8_cont_BFC40960 }, - { 0x1FC40968u, SCPH1001_func_1FC407B8_cont_BFC40968 }, - { 0x1FC40970u, SCPH1001_func_1FC407B8_cont_BFC40970 }, - { 0x1FC4097Cu, SCPH1001_func_1FC407B8_cont_BFC4097C }, - { 0x1FC40984u, SCPH1001_func_1FC407B8_cont_BFC40984 }, - { 0x1FC40990u, SCPH1001_func_1FC407B8_cont_BFC40990 }, - { 0x1FC40998u, SCPH1001_func_1FC407B8_cont_BFC40998 }, - { 0x1FC409A4u, SCPH1001_func_1FC407B8_cont_BFC409A4 }, - { 0x1FC409ACu, SCPH1001_func_1FC407B8_cont_BFC409AC }, - { 0x1FC409B4u, SCPH1001_func_1FC407B8_cont_BFC409B4 }, - { 0x1FC409BCu, SCPH1001_func_1FC407B8_cont_BFC409BC }, - { 0x1FC409C8u, SCPH1001_func_1FC407B8_cont_BFC409C8 }, - { 0x1FC409D0u, SCPH1001_func_1FC407B8_cont_BFC409D0 }, - { 0x1FC409DCu, SCPH1001_func_1FC407B8_cont_BFC409DC }, - { 0x1FC409E4u, SCPH1001_func_1FC407B8_cont_BFC409E4 }, - { 0x1FC409ECu, SCPH1001_func_1FC407B8_cont_BFC409EC }, - { 0x1FC409F4u, SCPH1001_func_1FC407B8_cont_BFC409F4 }, - { 0x1FC409FCu, SCPH1001_func_1FC407B8_cont_BFC409FC }, - { 0x1FC40A04u, SCPH1001_func_1FC407B8_cont_BFC40A04 }, - { 0x1FC40A10u, SCPH1001_func_1FC407B8_cont_BFC40A10 }, - { 0x1FC40A18u, SCPH1001_func_1FC407B8_cont_BFC40A18 }, - { 0x1FC40A24u, SCPH1001_func_1FC407B8_cont_BFC40A24 }, - { 0x1FC40A2Cu, SCPH1001_func_1FC407B8_cont_BFC40A2C }, - { 0x1FC40A34u, SCPH1001_func_1FC407B8_cont_BFC40A34 }, - { 0x1FC40A3Cu, SCPH1001_func_1FC407B8_cont_BFC40A3C }, - { 0x1FC40A48u, SCPH1001_func_1FC407B8_cont_BFC40A48 }, - { 0x1FC40A50u, SCPH1001_func_1FC407B8_cont_BFC40A50 }, - { 0x1FC40A5Cu, SCPH1001_func_1FC407B8_cont_BFC40A5C }, - { 0x1FC40A64u, SCPH1001_func_1FC407B8_cont_BFC40A64 }, - { 0x1FC40A6Cu, SCPH1001_func_1FC407B8_cont_BFC40A6C }, - { 0x1FC40A74u, SCPH1001_func_1FC407B8_cont_BFC40A74 }, - { 0x1FC40A7Cu, SCPH1001_func_1FC407B8_cont_BFC40A7C }, - { 0x1FC40A84u, SCPH1001_func_1FC407B8_cont_BFC40A84 }, - { 0x1FC40A8Cu, SCPH1001_func_1FC407B8_cont_BFC40A8C }, - { 0x1FC40A94u, SCPH1001_func_1FC407B8_cont_BFC40A94 }, - { 0x1FC40AA0u, SCPH1001_func_1FC407B8_cont_BFC40AA0 }, - { 0x1FC40AA8u, SCPH1001_func_1FC407B8_cont_BFC40AA8 }, - { 0x1FC40AB4u, SCPH1001_func_1FC407B8_cont_BFC40AB4 }, - { 0x1FC40ABCu, SCPH1001_func_1FC407B8_cont_BFC40ABC }, - { 0x1FC40AC4u, SCPH1001_func_1FC407B8_cont_BFC40AC4 }, - { 0x1FC40ACCu, SCPH1001_func_1FC407B8_cont_BFC40ACC }, - { 0x1FC40AD8u, SCPH1001_func_1FC407B8_cont_BFC40AD8 }, - { 0x1FC40AE0u, SCPH1001_func_1FC407B8_cont_BFC40AE0 }, - { 0x1FC40AECu, SCPH1001_func_1FC407B8_cont_BFC40AEC }, - { 0x1FC40AF4u, SCPH1001_func_1FC407B8_cont_BFC40AF4 }, - { 0x1FC40AFCu, SCPH1001_func_1FC407B8_cont_BFC40AFC }, - { 0x1FC40B04u, SCPH1001_func_1FC407B8_cont_BFC40B04 }, - { 0x1FC40B0Cu, SCPH1001_func_1FC407B8_cont_BFC40B0C }, - { 0x1FC40B14u, SCPH1001_func_1FC407B8_cont_BFC40B14 }, - { 0x1FC40B20u, SCPH1001_func_1FC407B8_cont_BFC40B20 }, - { 0x1FC40B28u, SCPH1001_func_1FC407B8_cont_BFC40B28 }, - { 0x1FC40B34u, SCPH1001_func_1FC407B8_cont_BFC40B34 }, - { 0x1FC40B3Cu, SCPH1001_func_1FC407B8_cont_BFC40B3C }, - { 0x1FC40B44u, SCPH1001_func_1FC407B8_cont_BFC40B44 }, - { 0x1FC40B4Cu, SCPH1001_func_1FC407B8_cont_BFC40B4C }, - { 0x1FC40B58u, SCPH1001_func_1FC407B8_cont_BFC40B58 }, - { 0x1FC40B5Cu, SCPH1001_func_1FC407B8_cont_BFC40B5C }, - { 0x1FC40B68u, SCPH1001_func_1FC40B68 }, - { 0x1FC40B90u, SCPH1001_func_1FC40B68_cont_BFC40B90 }, - { 0x1FC40B98u, SCPH1001_func_1FC40B68_cont_BFC40B98 }, - { 0x1FC40BA0u, SCPH1001_func_1FC40B68_cont_BFC40BA0 }, - { 0x1FC40BB4u, SCPH1001_func_1FC40B68_cont_BFC40BB4 }, - { 0x1FC40BBCu, SCPH1001_func_1FC40B68_cont_BFC40BBC }, - { 0x1FC40BC4u, SCPH1001_func_1FC40B68_cont_BFC40BC4 }, - { 0x1FC40BCCu, SCPH1001_func_1FC40B68_cont_BFC40BCC }, - { 0x1FC40BD4u, SCPH1001_func_1FC40B68_cont_BFC40BD4 }, - { 0x1FC40BE4u, SCPH1001_func_1FC40B68_cont_BFC40BE4 }, - { 0x1FC40BFCu, SCPH1001_func_1FC40B68_cont_BFC40BFC }, - { 0x1FC40C04u, SCPH1001_func_1FC40B68_cont_BFC40C04 }, - { 0x1FC40C20u, SCPH1001_func_1FC40B68_cont_BFC40C20 }, - { 0x1FC40C28u, SCPH1001_func_1FC40B68_cont_BFC40C28 }, - { 0x1FC40C4Cu, SCPH1001_func_1FC40B68_cont_BFC40C4C }, - { 0x1FC40C54u, SCPH1001_func_1FC40B68_cont_BFC40C54 }, - { 0x1FC40C70u, SCPH1001_func_1FC40B68_cont_BFC40C70 }, - { 0x1FC40CA8u, SCPH1001_func_1FC40B68_cont_BFC40CA8 }, - { 0x1FC40CD8u, SCPH1001_func_1FC40B68_cont_BFC40CD8 }, - { 0x1FC40CF4u, SCPH1001_func_1FC40B68_cont_BFC40CF4 }, - { 0x1FC40CFCu, SCPH1001_func_1FC40B68_cont_BFC40CFC }, - { 0x1FC40D00u, SCPH1001_func_1FC40B68_cont_BFC40D00 }, - { 0x1FC40D0Cu, SCPH1001_func_1FC40B68_cont_BFC40D0C }, - { 0x1FC40D14u, SCPH1001_func_1FC40B68_cont_BFC40D14 }, - { 0x1FC40D18u, SCPH1001_func_1FC40B68_cont_BFC40D18 }, - { 0x1FC40D20u, SCPH1001_func_1FC40B68_cont_BFC40D20 }, - { 0x1FC40D28u, SCPH1001_func_1FC40B68_cont_BFC40D28 }, - { 0x1FC40D30u, SCPH1001_func_1FC40B68_cont_BFC40D30 }, - { 0x1FC40D38u, SCPH1001_func_1FC40B68_cont_BFC40D38 }, - { 0x1FC40D40u, SCPH1001_func_1FC40B68_cont_BFC40D40 }, - { 0x1FC40D48u, SCPH1001_func_1FC40B68_cont_BFC40D48 }, - { 0x1FC40D54u, SCPH1001_func_1FC40B68_cont_BFC40D54 }, - { 0x1FC40D5Cu, SCPH1001_func_1FC40B68_cont_BFC40D5C }, - { 0x1FC40D60u, SCPH1001_func_1FC40B68_cont_BFC40D60 }, - { 0x1FC40D68u, SCPH1001_func_1FC40B68_cont_BFC40D68 }, - { 0x1FC40D6Cu, SCPH1001_func_1FC40B68_cont_BFC40D6C }, - { 0x1FC40D84u, SCPH1001_func_1FC40B68_cont_BFC40D84 }, - { 0x1FC40D8Cu, SCPH1001_func_1FC40B68_cont_BFC40D8C }, - { 0x1FC40D98u, SCPH1001_func_1FC40B68_cont_BFC40D98 }, - { 0x1FC40DA0u, SCPH1001_func_1FC40B68_cont_BFC40DA0 }, - { 0x1FC40DACu, SCPH1001_func_1FC40B68_cont_BFC40DAC }, - { 0x1FC40DB4u, SCPH1001_func_1FC40B68_cont_BFC40DB4 }, - { 0x1FC40DBCu, SCPH1001_func_1FC40B68_cont_BFC40DBC }, - { 0x1FC40DC4u, SCPH1001_func_1FC40B68_cont_BFC40DC4 }, - { 0x1FC40DD0u, SCPH1001_func_1FC40B68_cont_BFC40DD0 }, - { 0x1FC40DD8u, SCPH1001_func_1FC40B68_cont_BFC40DD8 }, - { 0x1FC40DDCu, SCPH1001_func_1FC40B68_cont_BFC40DDC }, - { 0x1FC40DE8u, SCPH1001_func_1FC40DE8 }, - { 0x1FC40E24u, SCPH1001_func_1FC40DE8_cont_BFC40E24 }, - { 0x1FC40E60u, SCPH1001_func_1FC40DE8_cont_BFC40E60 }, - { 0x1FC40E98u, SCPH1001_func_1FC40DE8_cont_BFC40E98 }, - { 0x1FC40E9Cu, SCPH1001_func_1FC40DE8_cont_BFC40E9C }, - { 0x1FC40EC0u, SCPH1001_func_1FC40DE8_cont_BFC40EC0 }, - { 0x1FC40EC8u, SCPH1001_func_1FC40DE8_cont_BFC40EC8 }, - { 0x1FC40ECCu, SCPH1001_func_1FC40DE8_cont_BFC40ECC }, - { 0x1FC40ED4u, SCPH1001_func_1FC40DE8_cont_BFC40ED4 }, - { 0x1FC40EF0u, SCPH1001_func_1FC40DE8_cont_BFC40EF0 }, - { 0x1FC40F24u, SCPH1001_func_1FC40DE8_cont_BFC40F24 }, - { 0x1FC40F28u, SCPH1001_func_1FC40DE8_cont_BFC40F28 }, - { 0x1FC40F34u, SCPH1001_func_1FC40F34 }, - { 0x1FC40F60u, SCPH1001_func_1FC40F34_cont_BFC40F60 }, - { 0x1FC40F6Cu, SCPH1001_func_1FC40F34_cont_BFC40F6C }, - { 0x1FC40F80u, SCPH1001_func_1FC40F34_cont_BFC40F80 }, - { 0x1FC40F88u, SCPH1001_func_1FC40F34_cont_BFC40F88 }, - { 0x1FC40F90u, SCPH1001_func_1FC40F34_cont_BFC40F90 }, - { 0x1FC40F98u, SCPH1001_func_1FC40F34_cont_BFC40F98 }, - { 0x1FC40FA4u, SCPH1001_func_1FC40F34_cont_BFC40FA4 }, - { 0x1FC40FB0u, SCPH1001_func_1FC40F34_cont_BFC40FB0 }, - { 0x1FC40FB8u, SCPH1001_func_1FC40F34_cont_BFC40FB8 }, - { 0x1FC40FC0u, SCPH1001_func_1FC40F34_cont_BFC40FC0 }, - { 0x1FC40FC8u, SCPH1001_func_1FC40F34_cont_BFC40FC8 }, - { 0x1FC40FD0u, SCPH1001_func_1FC40F34_cont_BFC40FD0 }, - { 0x1FC40FD4u, SCPH1001_func_1FC40F34_cont_BFC40FD4 }, - { 0x1FC40FDCu, SCPH1001_func_1FC40F34_cont_BFC40FDC }, - { 0x1FC40FE4u, SCPH1001_func_1FC40F34_cont_BFC40FE4 }, - { 0x1FC40FECu, SCPH1001_func_1FC40F34_cont_BFC40FEC }, - { 0x1FC40FF4u, SCPH1001_func_1FC40F34_cont_BFC40FF4 }, - { 0x1FC40FFCu, SCPH1001_func_1FC40F34_cont_BFC40FFC }, - { 0x1FC41004u, SCPH1001_func_1FC40F34_cont_BFC41004 }, - { 0x1FC4100Cu, SCPH1001_func_1FC40F34_cont_BFC4100C }, - { 0x1FC41010u, SCPH1001_func_1FC40F34_cont_BFC41010 }, - { 0x1FC4101Cu, SCPH1001_func_1FC40F34_cont_BFC4101C }, - { 0x1FC41020u, SCPH1001_func_1FC40F34_cont_BFC41020 }, - { 0x1FC4102Cu, SCPH1001_func_1FC4102C }, - { 0x1FC41044u, SCPH1001_func_1FC4102C_cont_BFC41044 }, - { 0x1FC41050u, SCPH1001_func_1FC4102C_cont_BFC41050 }, - { 0x1FC41064u, SCPH1001_func_1FC4102C_cont_BFC41064 }, - { 0x1FC4106Cu, SCPH1001_func_1FC4102C_cont_BFC4106C }, - { 0x1FC41080u, SCPH1001_func_1FC4102C_cont_BFC41080 }, - { 0x1FC41090u, SCPH1001_func_1FC4102C_cont_BFC41090 }, - { 0x1FC4109Cu, SCPH1001_func_1FC4102C_cont_BFC4109C }, - { 0x1FC410A4u, SCPH1001_func_1FC4102C_cont_BFC410A4 }, - { 0x1FC410ACu, SCPH1001_func_1FC4102C_cont_BFC410AC }, - { 0x1FC410B4u, SCPH1001_func_1FC4102C_cont_BFC410B4 }, - { 0x1FC410B8u, SCPH1001_func_1FC4102C_cont_BFC410B8 }, - { 0x1FC410C0u, SCPH1001_func_1FC4102C_cont_BFC410C0 }, - { 0x1FC410CCu, SCPH1001_func_1FC4102C_cont_BFC410CC }, - { 0x1FC410D4u, SCPH1001_func_1FC4102C_cont_BFC410D4 }, - { 0x1FC410E0u, SCPH1001_func_1FC4102C_cont_BFC410E0 }, - { 0x1FC410E8u, SCPH1001_func_1FC4102C_cont_BFC410E8 }, - { 0x1FC410FCu, SCPH1001_func_1FC4102C_cont_BFC410FC }, - { 0x1FC41104u, SCPH1001_func_1FC4102C_cont_BFC41104 }, - { 0x1FC41118u, SCPH1001_func_1FC4102C_cont_BFC41118 }, - { 0x1FC4111Cu, SCPH1001_func_1FC4102C_cont_BFC4111C }, - { 0x1FC4112Cu, SCPH1001_func_1FC4102C_cont_BFC4112C }, - { 0x1FC41140u, SCPH1001_func_1FC4102C_cont_BFC41140 }, - { 0x1FC41148u, SCPH1001_func_1FC4102C_cont_BFC41148 }, - { 0x1FC41150u, SCPH1001_func_1FC4102C_cont_BFC41150 }, - { 0x1FC41154u, SCPH1001_func_1FC4102C_cont_BFC41154 }, - { 0x1FC4115Cu, SCPH1001_func_1FC4102C_cont_BFC4115C }, - { 0x1FC41168u, SCPH1001_func_1FC4102C_cont_BFC41168 }, - { 0x1FC41170u, SCPH1001_func_1FC4102C_cont_BFC41170 }, - { 0x1FC4117Cu, SCPH1001_func_1FC4102C_cont_BFC4117C }, - { 0x1FC41184u, SCPH1001_func_1FC4102C_cont_BFC41184 }, - { 0x1FC41190u, SCPH1001_func_1FC4102C_cont_BFC41190 }, - { 0x1FC41194u, SCPH1001_func_1FC4102C_cont_BFC41194 }, - { 0x1FC411A4u, SCPH1001_func_1FC4102C_cont_BFC411A4 }, - { 0x1FC411B4u, SCPH1001_func_1FC4102C_cont_BFC411B4 }, - { 0x1FC411C8u, SCPH1001_func_1FC4102C_cont_BFC411C8 }, - { 0x1FC411D8u, SCPH1001_func_1FC4102C_cont_BFC411D8 }, - { 0x1FC411E0u, SCPH1001_func_1FC4102C_cont_BFC411E0 }, - { 0x1FC411E4u, SCPH1001_func_1FC4102C_cont_BFC411E4 }, - { 0x1FC411F0u, SCPH1001_func_1FC4102C_cont_BFC411F0 }, - { 0x1FC411F4u, SCPH1001_func_1FC4102C_cont_BFC411F4 }, - { 0x1FC41200u, SCPH1001_func_1FC41200 }, - { 0x1FC4120Cu, SCPH1001_func_1FC41200_cont_BFC4120C }, - { 0x1FC41214u, SCPH1001_func_1FC41200_cont_BFC41214 }, - { 0x1FC41218u, SCPH1001_func_1FC41200_cont_BFC41218 }, - { 0x1FC41224u, SCPH1001_func_1FC41200_cont_BFC41224 }, - { 0x1FC41258u, SCPH1001_func_1FC41258 }, - { 0x1FC4129Cu, SCPH1001_func_1FC41258_cont_BFC4129C }, - { 0x1FC412B8u, SCPH1001_func_1FC41258_cont_BFC412B8 }, - { 0x1FC412CCu, SCPH1001_func_1FC41258_cont_BFC412CC }, - { 0x1FC412E0u, SCPH1001_func_1FC41258_cont_BFC412E0 }, - { 0x1FC412ECu, SCPH1001_func_1FC41258_cont_BFC412EC }, - { 0x1FC412FCu, SCPH1001_func_1FC41258_cont_BFC412FC }, - { 0x1FC4130Cu, SCPH1001_func_1FC4130C }, - { 0x1FC4132Cu, SCPH1001_func_1FC4130C_cont_BFC4132C }, - { 0x1FC4135Cu, SCPH1001_func_1FC4130C_cont_BFC4135C }, - { 0x1FC41370u, SCPH1001_func_1FC4130C_cont_BFC41370 }, - { 0x1FC41384u, SCPH1001_func_1FC4130C_cont_BFC41384 }, - { 0x1FC41390u, SCPH1001_func_1FC4130C_cont_BFC41390 }, - { 0x1FC413A0u, SCPH1001_func_1FC4130C_cont_BFC413A0 }, - { 0x1FC413B0u, SCPH1001_func_1FC413B0 }, - { 0x1FC413E4u, SCPH1001_func_1FC413B0_cont_BFC413E4 }, - { 0x1FC413F4u, SCPH1001_func_1FC413F4 }, - { 0x1FC4141Cu, SCPH1001_func_1FC413F4_cont_BFC4141C }, - { 0x1FC4142Cu, SCPH1001_func_1FC413F4_cont_BFC4142C }, - { 0x1FC41448u, SCPH1001_func_1FC413F4_cont_BFC41448 }, - { 0x1FC41458u, SCPH1001_func_1FC41458 }, - { 0x1FC41468u, SCPH1001_func_1FC41458_cont_BFC41468 }, - { 0x1FC4148Cu, SCPH1001_func_1FC41458_cont_BFC4148C }, - { 0x1FC414A0u, SCPH1001_func_1FC41458_cont_BFC414A0 }, - { 0x1FC414B0u, SCPH1001_func_1FC41458_cont_BFC414B0 }, - { 0x1FC414B4u, SCPH1001_func_1FC41458_cont_BFC414B4 }, - { 0x1FC414BCu, SCPH1001_func_1FC41458_cont_BFC414BC }, - { 0x1FC414D0u, SCPH1001_func_1FC41458_cont_BFC414D0 }, - { 0x1FC414E4u, SCPH1001_func_1FC41458_cont_BFC414E4 }, - { 0x1FC414F4u, SCPH1001_func_1FC41458_cont_BFC414F4 }, - { 0x1FC414F8u, SCPH1001_func_1FC41458_cont_BFC414F8 }, - { 0x1FC41500u, SCPH1001_func_1FC41458_cont_BFC41500 }, - { 0x1FC41510u, SCPH1001_func_1FC41458_cont_BFC41510 }, - { 0x1FC41520u, SCPH1001_func_1FC41520 }, - { 0x1FC41534u, SCPH1001_func_1FC41520_cont_BFC41534 }, - { 0x1FC41554u, SCPH1001_func_1FC41520_cont_BFC41554 }, - { 0x1FC415C4u, SCPH1001_func_1FC41520_cont_BFC415C4 }, - { 0x1FC415F0u, SCPH1001_func_1FC41520_cont_BFC415F0 }, - { 0x1FC415F8u, SCPH1001_func_1FC41520_cont_BFC415F8 }, - { 0x1FC41624u, SCPH1001_func_1FC41520_cont_BFC41624 }, - { 0x1FC4162Cu, SCPH1001_func_1FC41520_cont_BFC4162C }, - { 0x1FC41638u, SCPH1001_func_1FC41520_cont_BFC41638 }, - { 0x1FC4163Cu, SCPH1001_func_1FC41520_cont_BFC4163C }, - { 0x1FC41648u, SCPH1001_func_1FC41648 }, - { 0x1FC41660u, SCPH1001_func_1FC41648_cont_BFC41660 }, - { 0x1FC41670u, SCPH1001_func_1FC41670 }, - { 0x1FC416B8u, SCPH1001_func_1FC41670_cont_BFC416B8 }, - { 0x1FC416E8u, SCPH1001_func_1FC41670_cont_BFC416E8 }, - { 0x1FC416F8u, SCPH1001_func_1FC41670_cont_BFC416F8 }, - { 0x1FC41708u, SCPH1001_func_1FC41708 }, - { 0x1FC41738u, SCPH1001_func_1FC41708_cont_BFC41738 }, - { 0x1FC41740u, SCPH1001_func_1FC41708_cont_BFC41740 }, - { 0x1FC4175Cu, SCPH1001_func_1FC41708_cont_BFC4175C }, - { 0x1FC41760u, SCPH1001_func_1FC41708_cont_BFC41760 }, - { 0x1FC41778u, SCPH1001_func_1FC41708_cont_BFC41778 }, - { 0x1FC41788u, SCPH1001_func_1FC41788 }, - { 0x1FC417BCu, SCPH1001_func_1FC41788_cont_BFC417BC }, - { 0x1FC417CCu, SCPH1001_func_1FC417CC }, - { 0x1FC417F4u, SCPH1001_func_1FC417CC_cont_BFC417F4 }, - { 0x1FC41804u, SCPH1001_func_1FC41804 }, - { 0x1FC41838u, SCPH1001_func_1FC41804_cont_BFC41838 }, - { 0x1FC41848u, SCPH1001_func_1FC41848 }, - { 0x1FC4186Cu, SCPH1001_func_1FC41848_cont_BFC4186C }, - { 0x1FC41874u, SCPH1001_func_1FC41848_cont_BFC41874 }, - { 0x1FC4187Cu, SCPH1001_func_1FC41848_cont_BFC4187C }, - { 0x1FC41880u, SCPH1001_func_1FC41848_cont_BFC41880 }, - { 0x1FC4188Cu, SCPH1001_func_1FC41848_cont_BFC4188C }, - { 0x1FC418B8u, SCPH1001_func_1FC41848_cont_BFC418B8 }, - { 0x1FC418C4u, SCPH1001_func_1FC418C4 }, - { 0x1FC418F4u, SCPH1001_func_1FC418C4_cont_BFC418F4 }, - { 0x1FC4192Cu, SCPH1001_func_1FC4192C }, - { 0x1FC419B8u, SCPH1001_func_1FC4192C_cont_BFC419B8 }, - { 0x1FC419C0u, SCPH1001_func_1FC4192C_cont_BFC419C0 }, - { 0x1FC419C8u, SCPH1001_func_1FC4192C_cont_BFC419C8 }, - { 0x1FC419FCu, SCPH1001_func_1FC4192C_cont_BFC419FC }, - { 0x1FC41A38u, SCPH1001_func_1FC4192C_cont_BFC41A38 }, - { 0x1FC41A44u, SCPH1001_func_1FC41A44 }, - { 0x1FC41A64u, SCPH1001_func_1FC41A44_cont_BFC41A64 }, - { 0x1FC41A8Cu, SCPH1001_func_1FC41A44_cont_BFC41A8C }, - { 0x1FC41ABCu, SCPH1001_func_1FC41A44_cont_BFC41ABC }, - { 0x1FC41ACCu, SCPH1001_func_1FC41A44_cont_BFC41ACC }, - { 0x1FC41AE8u, SCPH1001_func_1FC41A44_cont_BFC41AE8 }, - { 0x1FC41AF0u, SCPH1001_func_1FC41A44_cont_BFC41AF0 }, - { 0x1FC41B10u, SCPH1001_func_1FC41A44_cont_BFC41B10 }, - { 0x1FC41B18u, SCPH1001_func_1FC41A44_cont_BFC41B18 }, - { 0x1FC41B20u, SCPH1001_func_1FC41A44_cont_BFC41B20 }, - { 0x1FC41B24u, SCPH1001_func_1FC41A44_cont_BFC41B24 }, - { 0x1FC41B44u, SCPH1001_func_1FC41A44_cont_BFC41B44 }, - { 0x1FC41B48u, SCPH1001_func_1FC41A44_cont_BFC41B48 }, - { 0x1FC41B60u, SCPH1001_func_1FC41A44_cont_BFC41B60 }, - { 0x1FC41B9Cu, SCPH1001_func_1FC41A44_cont_BFC41B9C }, - { 0x1FC41BA8u, SCPH1001_func_1FC41BA8 }, - { 0x1FC41C04u, SCPH1001_func_1FC41C04 }, - { 0x1FC41C0Cu, SCPH1001_func_1FC41C0C }, - { 0x1FC41C48u, SCPH1001_func_1FC41C0C_cont_BFC41C48 }, - { 0x1FC41C4Cu, SCPH1001_func_1FC41C0C_cont_BFC41C4C }, - { 0x1FC41C78u, SCPH1001_func_1FC41C0C_cont_BFC41C78 }, - { 0x1FC41C80u, SCPH1001_func_1FC41C80 }, - { 0x1FC41CB8u, SCPH1001_func_1FC41C80_cont_BFC41CB8 }, - { 0x1FC41CC8u, SCPH1001_func_1FC41C80_cont_BFC41CC8 }, - { 0x1FC41CD4u, SCPH1001_func_1FC41C80_cont_BFC41CD4 }, - { 0x1FC41CDCu, SCPH1001_func_1FC41C80_cont_BFC41CDC }, - { 0x1FC41CF4u, SCPH1001_func_1FC41C80_cont_BFC41CF4 }, - { 0x1FC41D18u, SCPH1001_func_1FC41D18 }, - { 0x1FC41D30u, SCPH1001_func_1FC41D18_cont_BFC41D30 }, - { 0x1FC41D54u, SCPH1001_func_1FC41D18_cont_BFC41D54 }, - { 0x1FC41D6Cu, SCPH1001_func_1FC41D18_cont_BFC41D6C }, - { 0x1FC41D94u, SCPH1001_func_1FC41D18_cont_BFC41D94 }, - { 0x1FC41D98u, SCPH1001_func_1FC41D18_cont_BFC41D98 }, - { 0x1FC41DA4u, SCPH1001_func_1FC41DA4 }, - { 0x1FC41DC8u, SCPH1001_func_1FC41DC8 }, - { 0x1FC41DE0u, SCPH1001_func_1FC41DC8_cont_BFC41DE0 }, - { 0x1FC41DF4u, SCPH1001_func_1FC41DC8_cont_BFC41DF4 }, - { 0x1FC41DFCu, SCPH1001_func_1FC41DFC }, - { 0x1FC41E14u, SCPH1001_func_1FC41E14 }, - { 0x1FC41E18u, SCPH1001_func_1FC41E14_cont_BFC41E18 }, - { 0x1FC41E30u, SCPH1001_func_1FC41E30 }, - { 0x1FC41E44u, SCPH1001_func_1FC41E30_cont_BFC41E44 }, - { 0x1FC41E4Cu, SCPH1001_func_1FC41E30_cont_BFC41E4C }, - { 0x1FC41E6Cu, SCPH1001_func_1FC41E30_cont_BFC41E6C }, - { 0x1FC41E78u, SCPH1001_func_1FC41E30_cont_BFC41E78 }, - { 0x1FC41E84u, SCPH1001_func_1FC41E30_cont_BFC41E84 }, - { 0x1FC41E8Cu, SCPH1001_func_1FC41E30_cont_BFC41E8C }, - { 0x1FC41E94u, SCPH1001_func_1FC41E30_cont_BFC41E94 }, - { 0x1FC41E9Cu, SCPH1001_func_1FC41E30_cont_BFC41E9C }, - { 0x1FC41EA0u, SCPH1001_func_1FC41E30_cont_BFC41EA0 }, - { 0x1FC41EA8u, SCPH1001_func_1FC41E30_cont_BFC41EA8 }, - { 0x1FC41EB4u, SCPH1001_func_1FC41E30_cont_BFC41EB4 }, - { 0x1FC41EB8u, SCPH1001_func_1FC41E30_cont_BFC41EB8 }, - { 0x1FC41EBCu, SCPH1001_func_1FC41E30_cont_BFC41EBC }, - { 0x1FC41EC4u, SCPH1001_func_1FC41E30_cont_BFC41EC4 }, - { 0x1FC41EC8u, SCPH1001_func_1FC41E30_cont_BFC41EC8 }, - { 0x1FC41ED8u, SCPH1001_func_1FC41ED8 }, - { 0x1FC41EE8u, SCPH1001_func_1FC41ED8_cont_BFC41EE8 }, - { 0x1FC41EF0u, SCPH1001_func_1FC41ED8_cont_BFC41EF0 }, - { 0x1FC41F10u, SCPH1001_func_1FC41F10 }, - { 0x1FC41F40u, SCPH1001_func_1FC41F10_cont_BFC41F40 }, - { 0x1FC41F48u, SCPH1001_func_1FC41F10_cont_BFC41F48 }, - { 0x1FC41F54u, SCPH1001_func_1FC41F54 }, - { 0x1FC41F88u, SCPH1001_func_1FC41F88 }, - { 0x1FC41F98u, SCPH1001_func_1FC41F88_cont_BFC41F98 }, - { 0x1FC41FA0u, SCPH1001_func_1FC41F88_cont_BFC41FA0 }, - { 0x1FC41FC0u, SCPH1001_func_1FC41FC0 }, - { 0x1FC41FE8u, SCPH1001_func_1FC41FC0_cont_BFC41FE8 }, - { 0x1FC41FFCu, SCPH1001_func_1FC41FC0_cont_BFC41FFC }, - { 0x1FC42004u, SCPH1001_func_1FC41FC0_cont_BFC42004 }, - { 0x1FC42014u, SCPH1001_func_1FC42014 }, - { 0x1FC42024u, SCPH1001_func_1FC42014_cont_BFC42024 }, - { 0x1FC4203Cu, SCPH1001_func_1FC4203C }, - { 0x1FC4204Cu, SCPH1001_func_1FC4203C_cont_BFC4204C }, - { 0x1FC42060u, SCPH1001_func_1FC42060 }, - { 0x1FC42080u, SCPH1001_func_1FC42060_cont_BFC42080 }, - { 0x1FC42090u, SCPH1001_func_1FC42090 }, - { 0x1FC420B0u, SCPH1001_func_1FC42090_cont_BFC420B0 }, - { 0x1FC420C0u, SCPH1001_func_1FC420C0 }, - { 0x1FC420E0u, SCPH1001_func_1FC420C0_cont_BFC420E0 }, - { 0x1FC420F0u, SCPH1001_func_1FC420F0 }, - { 0x1FC42110u, SCPH1001_func_1FC420F0_cont_BFC42110 }, - { 0x1FC42120u, SCPH1001_func_1FC42120 }, - { 0x1FC42140u, SCPH1001_func_1FC42120_cont_BFC42140 }, - { 0x1FC42160u, SCPH1001_func_1FC42160 }, - { 0x1FC42174u, SCPH1001_func_1FC42160_cont_BFC42174 }, - { 0x1FC4217Cu, SCPH1001_func_1FC42160_cont_BFC4217C }, - { 0x1FC42184u, SCPH1001_func_1FC42160_cont_BFC42184 }, - { 0x1FC421B4u, SCPH1001_func_1FC42160_cont_BFC421B4 }, - { 0x1FC421CCu, SCPH1001_func_1FC42160_cont_BFC421CC }, - { 0x1FC421D8u, SCPH1001_func_1FC421D8 }, - { 0x1FC421E0u, SCPH1001_func_1FC421D8_cont_BFC421E0 }, - { 0x1FC42220u, SCPH1001_func_1FC421D8_cont_BFC42220 }, - { 0x1FC4223Cu, SCPH1001_func_1FC421D8_cont_BFC4223C }, - { 0x1FC42244u, SCPH1001_func_1FC421D8_cont_BFC42244 }, - { 0x1FC42250u, SCPH1001_func_1FC421D8_cont_BFC42250 }, - { 0x1FC42264u, SCPH1001_func_1FC421D8_cont_BFC42264 }, - { 0x1FC4226Cu, SCPH1001_func_1FC4226C }, - { 0x1FC42290u, SCPH1001_func_1FC4226C_cont_BFC42290 }, - { 0x1FC422B0u, SCPH1001_func_1FC4226C_cont_BFC422B0 }, - { 0x1FC422B8u, SCPH1001_func_1FC4226C_cont_BFC422B8 }, - { 0x1FC422CCu, SCPH1001_func_1FC4226C_cont_BFC422CC }, - { 0x1FC422D8u, SCPH1001_func_1FC4226C_cont_BFC422D8 }, - { 0x1FC422F8u, SCPH1001_func_1FC4226C_cont_BFC422F8 }, - { 0x1FC42308u, SCPH1001_func_1FC42308 }, - { 0x1FC42314u, SCPH1001_func_1FC42308_cont_BFC42314 }, - { 0x1FC4231Cu, SCPH1001_func_1FC4231C }, - { 0x1FC42338u, SCPH1001_func_1FC4231C_cont_BFC42338 }, - { 0x1FC42348u, SCPH1001_func_1FC4231C_cont_BFC42348 }, - { 0x1FC42358u, SCPH1001_func_1FC4231C_cont_BFC42358 }, - { 0x1FC42368u, SCPH1001_func_1FC4231C_cont_BFC42368 }, - { 0x1FC42370u, SCPH1001_func_1FC42370 }, - { 0x1FC42380u, SCPH1001_func_1FC42380 }, - { 0x1FC423A0u, SCPH1001_func_1FC42380_cont_BFC423A0 }, - { 0x1FC423A8u, SCPH1001_func_1FC42380_cont_BFC423A8 }, - { 0x1FC423E4u, SCPH1001_func_1FC42380_cont_BFC423E4 }, - { 0x1FC4241Cu, SCPH1001_func_1FC42380_cont_BFC4241C }, - { 0x1FC42424u, SCPH1001_func_1FC42424 }, - { 0x1FC42434u, SCPH1001_func_1FC42424_cont_BFC42434 }, - { 0x1FC42474u, SCPH1001_func_1FC42424_cont_BFC42474 }, - { 0x1FC4248Cu, SCPH1001_func_1FC42424_cont_BFC4248C }, - { 0x1FC42498u, SCPH1001_func_1FC42424_cont_BFC42498 }, - { 0x1FC424A8u, SCPH1001_func_1FC424A8 }, - { 0x1FC42514u, SCPH1001_func_1FC424A8_cont_BFC42514 }, - { 0x1FC42520u, SCPH1001_func_1FC424A8_cont_BFC42520 }, - { 0x1FC42530u, SCPH1001_func_1FC424A8_cont_BFC42530 }, - { 0x1FC42534u, SCPH1001_func_1FC424A8_cont_BFC42534 }, - { 0x1FC42540u, SCPH1001_func_1FC42540 }, - { 0x1FC4255Cu, SCPH1001_func_1FC42540_cont_BFC4255C }, - { 0x1FC4256Cu, SCPH1001_func_1FC42540_cont_BFC4256C }, - { 0x1FC42594u, SCPH1001_func_1FC42540_cont_BFC42594 }, - { 0x1FC425A0u, SCPH1001_func_1FC42540_cont_BFC425A0 }, - { 0x1FC425ACu, SCPH1001_func_1FC42540_cont_BFC425AC }, - { 0x1FC425BCu, SCPH1001_func_1FC425BC }, - { 0x1FC425E4u, SCPH1001_func_1FC425BC_cont_BFC425E4 }, - { 0x1FC425ECu, SCPH1001_func_1FC425BC_cont_BFC425EC }, - { 0x1FC425FCu, SCPH1001_func_1FC425FC }, - { 0x1FC4260Cu, SCPH1001_func_1FC425FC_cont_BFC4260C }, - { 0x1FC42624u, SCPH1001_func_1FC425FC_cont_BFC42624 }, - { 0x1FC42634u, SCPH1001_func_1FC425FC_cont_BFC42634 }, - { 0x1FC42640u, SCPH1001_func_1FC42640 }, - { 0x1FC4265Cu, SCPH1001_func_1FC42640_cont_BFC4265C }, - { 0x1FC4266Cu, SCPH1001_func_1FC42640_cont_BFC4266C }, - { 0x1FC426A0u, SCPH1001_func_1FC42640_cont_BFC426A0 }, - { 0x1FC426B8u, SCPH1001_func_1FC42640_cont_BFC426B8 }, - { 0x1FC426CCu, SCPH1001_func_1FC42640_cont_BFC426CC }, - { 0x1FC426DCu, SCPH1001_func_1FC426DC }, - { 0x1FC426FCu, SCPH1001_func_1FC426DC_cont_BFC426FC }, - { 0x1FC4270Cu, SCPH1001_func_1FC4270C }, - { 0x1FC42734u, SCPH1001_func_1FC4270C_cont_BFC42734 }, - { 0x1FC42768u, SCPH1001_func_1FC4270C_cont_BFC42768 }, - { 0x1FC4276Cu, SCPH1001_func_1FC4270C_cont_BFC4276C }, - { 0x1FC42780u, SCPH1001_func_1FC4270C_cont_BFC42780 }, - { 0x1FC427A8u, SCPH1001_func_1FC4270C_cont_BFC427A8 }, - { 0x1FC427B0u, SCPH1001_func_1FC4270C_cont_BFC427B0 }, - { 0x1FC427BCu, SCPH1001_func_1FC4270C_cont_BFC427BC }, - { 0x1FC427C8u, SCPH1001_func_1FC4270C_cont_BFC427C8 }, - { 0x1FC427DCu, SCPH1001_func_1FC4270C_cont_BFC427DC }, - { 0x1FC427F8u, SCPH1001_func_1FC4270C_cont_BFC427F8 }, - { 0x1FC42810u, SCPH1001_func_1FC4270C_cont_BFC42810 }, - { 0x1FC42824u, SCPH1001_func_1FC4270C_cont_BFC42824 }, - { 0x1FC42834u, SCPH1001_func_1FC4270C_cont_BFC42834 }, - { 0x1FC42838u, SCPH1001_func_1FC4270C_cont_BFC42838 }, - { 0x1FC42844u, SCPH1001_func_1FC42844 }, - { 0x1FC42864u, SCPH1001_func_1FC42844_cont_BFC42864 }, - { 0x1FC4286Cu, SCPH1001_func_1FC42844_cont_BFC4286C }, - { 0x1FC42898u, SCPH1001_func_1FC42844_cont_BFC42898 }, - { 0x1FC428BCu, SCPH1001_func_1FC42844_cont_BFC428BC }, - { 0x1FC428D0u, SCPH1001_func_1FC428D0 }, - { 0x1FC428E0u, SCPH1001_func_1FC428E0 }, - { 0x1FC428F0u, SCPH1001_func_1FC428F0 }, - { 0x1FC42900u, SCPH1001_func_1FC42900 }, - { 0x1FC42910u, SCPH1001_func_1FC42910 }, - { 0x1FC42920u, SCPH1001_func_1FC42920 }, - { 0x1FC42930u, SCPH1001_func_1FC42930 }, - { 0x1FC42940u, SCPH1001_func_1FC42940 }, - { 0x1FC42950u, SCPH1001_func_1FC42950 }, - { 0x1FC42960u, SCPH1001_func_1FC42960 }, - { 0x1FC42970u, SCPH1001_func_1FC42970 }, - { 0x1FC42980u, SCPH1001_func_1FC42980 }, - { 0x1FC42990u, SCPH1001_func_1FC42990 }, - { 0x1FC429A0u, SCPH1001_func_1FC429A0 }, - { 0x1FC429B0u, SCPH1001_func_1FC429B0 }, - { 0x1FC429C0u, SCPH1001_func_1FC429C0 }, - { 0x1FC429D0u, SCPH1001_func_1FC429D0 }, - { 0x1FC429E0u, SCPH1001_func_1FC429E0 }, - { 0x1FC429F0u, SCPH1001_func_1FC429F0 }, - { 0x1FC42A00u, SCPH1001_func_1FC42A00 }, - { 0x1FC42A10u, SCPH1001_func_1FC42A10 }, - { 0x1FC42A20u, SCPH1001_func_1FC42A20 }, - { 0x1FC42A30u, SCPH1001_func_1FC42A30 }, - { 0x1FC42A40u, SCPH1001_func_1FC42A40 }, - { 0x1FC42A50u, SCPH1001_func_1FC42A50 }, - { 0x1FC42A60u, SCPH1001_func_1FC42A60 }, - { 0x1FC42A70u, SCPH1001_func_1FC42A70 }, - { 0x1FC42A80u, SCPH1001_func_1FC42A80 }, - { 0x1FC42A90u, SCPH1001_func_1FC42A90 }, - { 0x1FC42AA0u, SCPH1001_func_1FC42AA0 }, - { 0x1FC42AB0u, SCPH1001_func_1FC42AB0 }, - { 0x1FC42AC0u, SCPH1001_func_1FC42AC0 }, - { 0x1FC42AD0u, SCPH1001_func_1FC42AD0 }, - { 0x1FC42AE0u, SCPH1001_func_1FC42AE0 }, - { 0x1FC42AF0u, SCPH1001_func_1FC42AF0 }, - { 0x1FC42B00u, SCPH1001_func_1FC42B00 }, - { 0x1FC42B10u, SCPH1001_func_1FC42B10 }, - { 0x1FC42B20u, SCPH1001_func_1FC42B20 }, - { 0x1FC42B30u, SCPH1001_func_1FC42B30 }, - { 0x1FC42B40u, SCPH1001_func_1FC42B40 }, - { 0x1FC42B50u, SCPH1001_func_1FC42B50 }, - { 0x1FC42B60u, SCPH1001_func_1FC42B60 }, - { 0x1FC42B70u, SCPH1001_func_1FC42B70 }, - { 0x1FC42B80u, SCPH1001_func_1FC42B80 }, - { 0x1FC42B90u, SCPH1001_func_1FC42B90 }, - { 0x1FC42BA0u, SCPH1001_func_1FC42BA0 }, - { 0x1FC42BB0u, SCPH1001_func_1FC42BB0 }, - { 0x1FC42BC0u, SCPH1001_func_1FC42BC0 }, - { 0x1FC42BD0u, SCPH1001_func_1FC42BD0 }, - { 0x1FC42BE0u, SCPH1001_func_1FC42BE0 }, - { 0x1FC42BF0u, SCPH1001_func_1FC42BF0 }, - { 0x1FC42C00u, SCPH1001_func_1FC42C00 }, -}; - -static const DispatchEntry segment_variant_table[1] = { - { 0xA0000500u, SCPH1001_func_A0000500 }, -}; - -static const PsxKernelBody SCPH1001_psx_bios_kernel_bodies[1296] = { - { 0x00000500u, 0x00000500u, 0x00000510u }, - { 0x00000510u, 0x00000510u, 0x00000520u }, - { 0x00000520u, 0x00000520u, 0x00000530u }, - { 0x00000530u, 0x00000530u, 0x00000540u }, - { 0x00000540u, 0x00000540u, 0x00000598u }, - { 0x00000554u, 0x00000540u, 0x00000598u }, - { 0x00000568u, 0x00000540u, 0x00000598u }, - { 0x0000057Cu, 0x00000540u, 0x00000598u }, - { 0x00000590u, 0x00000540u, 0x00000598u }, - { 0x00000598u, 0x00000598u, 0x000005C4u }, - { 0x000005A8u, 0x00000598u, 0x000005C4u }, - { 0x000005BCu, 0x00000598u, 0x000005C4u }, - { 0x000005C4u, 0x000005C4u, 0x000005E0u }, - { 0x000005E0u, 0x000005E0u, 0x00000600u }, - { 0x00000600u, 0x00000600u, 0x00000620u }, - { 0x00000620u, 0x00000620u, 0x00000630u }, - { 0x00000630u, 0x00000630u, 0x00000640u }, - { 0x00000640u, 0x00000640u, 0x00000650u }, - { 0x00000650u, 0x00000650u, 0x0000065Cu }, - { 0x0000065Cu, 0x0000065Cu, 0x00000668u }, - { 0x00000668u, 0x00000668u, 0x00000674u }, - { 0x00000674u, 0x00000674u, 0x0000067Cu }, - { 0x00000C80u, 0x00000C80u, 0x00000EA0u }, - { 0x00000CB8u, 0x00000C80u, 0x00000EA0u }, - { 0x00000CC0u, 0x00000C80u, 0x00000EA0u }, - { 0x00000CCCu, 0x00000C80u, 0x00000EA0u }, - { 0x00000CE8u, 0x00000C80u, 0x00000EA0u }, - { 0x00000CECu, 0x00000C80u, 0x00000EA0u }, - { 0x00000D00u, 0x00000C80u, 0x00000EA0u }, - { 0x00000DE8u, 0x00000C80u, 0x00000EA0u }, - { 0x00000DF8u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E08u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E10u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E18u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E20u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E28u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E38u, 0x00000C80u, 0x00000EA0u }, - { 0x00000E44u, 0x00000C80u, 0x00000EA0u }, - { 0x00000EA0u, 0x00000EA0u, 0x00000EB0u }, - { 0x00000EB0u, 0x00000EB0u, 0x00000F0Cu }, - { 0x00000EC8u, 0x00000EB0u, 0x00000F0Cu }, - { 0x00000EDCu, 0x00000EB0u, 0x00000F0Cu }, - { 0x00000EF0u, 0x00000EB0u, 0x00000F0Cu }, - { 0x00000F04u, 0x00000EB0u, 0x00000F0Cu }, - { 0x00000F20u, 0x00000F20u, 0x00000F2Cu }, - { 0x00000F2Cu, 0x00000F2Cu, 0x00000F40u }, - { 0x00000F40u, 0x00000F40u, 0x00001018u }, - { 0x00001030u, 0x00001030u, 0x000010B8u }, - { 0x00001038u, 0x00001030u, 0x000010B8u }, - { 0x00001050u, 0x00001030u, 0x000010B8u }, - { 0x0000105Cu, 0x00001030u, 0x000010B8u }, - { 0x00001060u, 0x00001030u, 0x000010B8u }, - { 0x00001064u, 0x00001030u, 0x000010B8u }, - { 0x00001094u, 0x00001030u, 0x000010B8u }, - { 0x0000109Cu, 0x00001030u, 0x000010B8u }, - { 0x000010A0u, 0x00001030u, 0x000010B8u }, - { 0x000010A8u, 0x00001030u, 0x000010B8u }, - { 0x000010B0u, 0x00001030u, 0x000010B8u }, - { 0x000010B8u, 0x000010B8u, 0x000010E0u }, - { 0x000010D8u, 0x000010B8u, 0x000010E0u }, - { 0x000010E0u, 0x000010E0u, 0x000010E4u }, - { 0x000010E4u, 0x000010E4u, 0x0000113Cu }, - { 0x000010FCu, 0x000010E4u, 0x0000113Cu }, - { 0x00001100u, 0x000010E4u, 0x0000113Cu }, - { 0x0000111Cu, 0x000010E4u, 0x0000113Cu }, - { 0x00001120u, 0x000010E4u, 0x0000113Cu }, - { 0x0000113Cu, 0x0000113Cu, 0x00001174u }, - { 0x00001174u, 0x00001174u, 0x00001408u }, - { 0x000011B0u, 0x00001174u, 0x00001408u }, - { 0x000011B8u, 0x00001174u, 0x00001408u }, - { 0x000011D8u, 0x00001174u, 0x00001408u }, - { 0x000011E0u, 0x00001174u, 0x00001408u }, - { 0x000011E4u, 0x00001174u, 0x00001408u }, - { 0x00001204u, 0x00001174u, 0x00001408u }, - { 0x0000120Cu, 0x00001174u, 0x00001408u }, - { 0x00001214u, 0x00001174u, 0x00001408u }, - { 0x00001230u, 0x00001174u, 0x00001408u }, - { 0x00001248u, 0x00001174u, 0x00001408u }, - { 0x00001250u, 0x00001174u, 0x00001408u }, - { 0x0000125Cu, 0x00001174u, 0x00001408u }, - { 0x00001270u, 0x00001174u, 0x00001408u }, - { 0x00001274u, 0x00001174u, 0x00001408u }, - { 0x0000127Cu, 0x00001174u, 0x00001408u }, - { 0x00001298u, 0x00001174u, 0x00001408u }, - { 0x0000129Cu, 0x00001174u, 0x00001408u }, - { 0x000012B8u, 0x00001174u, 0x00001408u }, - { 0x000012BCu, 0x00001174u, 0x00001408u }, - { 0x000012C4u, 0x00001174u, 0x00001408u }, - { 0x000012E8u, 0x00001174u, 0x00001408u }, - { 0x000012F4u, 0x00001174u, 0x00001408u }, - { 0x000012FCu, 0x00001174u, 0x00001408u }, - { 0x00001304u, 0x00001174u, 0x00001408u }, - { 0x0000130Cu, 0x00001174u, 0x00001408u }, - { 0x00001320u, 0x00001174u, 0x00001408u }, - { 0x00001324u, 0x00001174u, 0x00001408u }, - { 0x0000132Cu, 0x00001174u, 0x00001408u }, - { 0x00001348u, 0x00001174u, 0x00001408u }, - { 0x00001350u, 0x00001174u, 0x00001408u }, - { 0x00001368u, 0x00001174u, 0x00001408u }, - { 0x00001370u, 0x00001174u, 0x00001408u }, - { 0x00001394u, 0x00001174u, 0x00001408u }, - { 0x000013A0u, 0x00001174u, 0x00001408u }, - { 0x000013A8u, 0x00001174u, 0x00001408u }, - { 0x000013B0u, 0x00001174u, 0x00001408u }, - { 0x000013B8u, 0x00001174u, 0x00001408u }, - { 0x000013C8u, 0x00001174u, 0x00001408u }, - { 0x000013E0u, 0x00001174u, 0x00001408u }, - { 0x000013F0u, 0x00001174u, 0x00001408u }, - { 0x00001408u, 0x00001408u, 0x0000141Cu }, - { 0x00001420u, 0x00001420u, 0x00001444u }, - { 0x00001444u, 0x00001444u, 0x00001508u }, - { 0x00001464u, 0x00001444u, 0x00001508u }, - { 0x0000146Cu, 0x00001444u, 0x00001508u }, - { 0x00001474u, 0x00001444u, 0x00001508u }, - { 0x00001484u, 0x00001444u, 0x00001508u }, - { 0x00001494u, 0x00001444u, 0x00001508u }, - { 0x0000149Cu, 0x00001444u, 0x00001508u }, - { 0x000014A4u, 0x00001444u, 0x00001508u }, - { 0x000014B0u, 0x00001444u, 0x00001508u }, - { 0x000014B8u, 0x00001444u, 0x00001508u }, - { 0x000014C4u, 0x00001444u, 0x00001508u }, - { 0x000014C8u, 0x00001444u, 0x00001508u }, - { 0x000014D4u, 0x00001444u, 0x00001508u }, - { 0x000014E4u, 0x00001444u, 0x00001508u }, - { 0x000014ECu, 0x00001444u, 0x00001508u }, - { 0x000014FCu, 0x00001444u, 0x00001508u }, - { 0x00001500u, 0x00001444u, 0x00001508u }, - { 0x00001508u, 0x00001508u, 0x000015D8u }, - { 0x00001550u, 0x00001508u, 0x000015D8u }, - { 0x00001570u, 0x00001508u, 0x000015D8u }, - { 0x00001580u, 0x00001508u, 0x000015D8u }, - { 0x0000158Cu, 0x00001508u, 0x000015D8u }, - { 0x00001594u, 0x00001508u, 0x000015D8u }, - { 0x0000159Cu, 0x00001508u, 0x000015D8u }, - { 0x000015A8u, 0x00001508u, 0x000015D8u }, - { 0x000015B4u, 0x00001508u, 0x000015D8u }, - { 0x000015D8u, 0x000015D8u, 0x000015F8u }, - { 0x000015F8u, 0x000015F8u, 0x00001614u }, - { 0x0000160Cu, 0x000015F8u, 0x00001614u }, - { 0x00001614u, 0x00001614u, 0x000016ACu }, - { 0x00001640u, 0x00001614u, 0x000016ACu }, - { 0x0000164Cu, 0x00001614u, 0x000016ACu }, - { 0x00001658u, 0x00001614u, 0x000016ACu }, - { 0x00001660u, 0x00001614u, 0x000016ACu }, - { 0x00001668u, 0x00001614u, 0x000016ACu }, - { 0x00001670u, 0x00001614u, 0x000016ACu }, - { 0x00001674u, 0x00001614u, 0x000016ACu }, - { 0x0000167Cu, 0x00001614u, 0x000016ACu }, - { 0x00001688u, 0x00001614u, 0x000016ACu }, - { 0x0000168Cu, 0x00001614u, 0x000016ACu }, - { 0x00001690u, 0x00001614u, 0x000016ACu }, - { 0x00001698u, 0x00001614u, 0x000016ACu }, - { 0x0000169Cu, 0x00001614u, 0x000016ACu }, - { 0x000016ACu, 0x000016ACu, 0x000016C4u }, - { 0x000016BCu, 0x000016ACu, 0x000016C4u }, - { 0x000016C4u, 0x000016C4u, 0x000016E4u }, - { 0x000016E4u, 0x000016E4u, 0x0000171Cu }, - { 0x00001714u, 0x000016E4u, 0x0000171Cu }, - { 0x0000171Cu, 0x0000171Cu, 0x00001728u }, - { 0x00001728u, 0x00001728u, 0x0000175Cu }, - { 0x0000175Cu, 0x0000175Cu, 0x00001774u }, - { 0x0000176Cu, 0x0000175Cu, 0x00001774u }, - { 0x00001774u, 0x00001774u, 0x00001794u }, - { 0x00001794u, 0x00001794u, 0x000017F4u }, - { 0x000017B8u, 0x00001794u, 0x000017F4u }, - { 0x000017CCu, 0x00001794u, 0x000017F4u }, - { 0x000017D4u, 0x00001794u, 0x000017F4u }, - { 0x000017D8u, 0x00001794u, 0x000017F4u }, - { 0x000017E0u, 0x00001794u, 0x000017F4u }, - { 0x000017E4u, 0x00001794u, 0x000017F4u }, - { 0x000017F4u, 0x000017F4u, 0x00001858u }, - { 0x00001818u, 0x000017F4u, 0x00001858u }, - { 0x0000182Cu, 0x000017F4u, 0x00001858u }, - { 0x00001834u, 0x000017F4u, 0x00001858u }, - { 0x00001838u, 0x000017F4u, 0x00001858u }, - { 0x00001844u, 0x000017F4u, 0x00001858u }, - { 0x00001848u, 0x000017F4u, 0x00001858u }, - { 0x00001858u, 0x00001858u, 0x000018BCu }, - { 0x0000187Cu, 0x00001858u, 0x000018BCu }, - { 0x00001890u, 0x00001858u, 0x000018BCu }, - { 0x00001898u, 0x00001858u, 0x000018BCu }, - { 0x0000189Cu, 0x00001858u, 0x000018BCu }, - { 0x000018A8u, 0x00001858u, 0x000018BCu }, - { 0x000018ACu, 0x00001858u, 0x000018BCu }, - { 0x000018BCu, 0x000018BCu, 0x00001920u }, - { 0x000018E0u, 0x000018BCu, 0x00001920u }, - { 0x000018F4u, 0x000018BCu, 0x00001920u }, - { 0x000018FCu, 0x000018BCu, 0x00001920u }, - { 0x00001900u, 0x000018BCu, 0x00001920u }, - { 0x0000190Cu, 0x000018BCu, 0x00001920u }, - { 0x00001910u, 0x000018BCu, 0x00001920u }, - { 0x00001920u, 0x00001920u, 0x00001958u }, - { 0x00001934u, 0x00001920u, 0x00001958u }, - { 0x00001948u, 0x00001920u, 0x00001958u }, - { 0x00001958u, 0x00001958u, 0x00001990u }, - { 0x0000196Cu, 0x00001958u, 0x00001990u }, - { 0x00001980u, 0x00001958u, 0x00001990u }, - { 0x00001990u, 0x00001990u, 0x000019C8u }, - { 0x000019A4u, 0x00001990u, 0x000019C8u }, - { 0x000019B8u, 0x00001990u, 0x000019C8u }, - { 0x000019C8u, 0x000019C8u, 0x00001A00u }, - { 0x000019DCu, 0x000019C8u, 0x00001A00u }, - { 0x000019F0u, 0x000019C8u, 0x00001A00u }, - { 0x00001A00u, 0x00001A00u, 0x00001A24u }, - { 0x00001A24u, 0x00001A24u, 0x00001A2Cu }, - { 0x00001A2Cu, 0x00001A2Cu, 0x00001A60u }, - { 0x00001A44u, 0x00001A2Cu, 0x00001A60u }, - { 0x00001A60u, 0x00001A60u, 0x00001AE8u }, - { 0x00001A74u, 0x00001A60u, 0x00001AE8u }, - { 0x00001A80u, 0x00001A60u, 0x00001AE8u }, - { 0x00001A84u, 0x00001A60u, 0x00001AE8u }, - { 0x00001A98u, 0x00001A60u, 0x00001AE8u }, - { 0x00001AACu, 0x00001A60u, 0x00001AE8u }, - { 0x00001AC0u, 0x00001A60u, 0x00001AE8u }, - { 0x00001AD0u, 0x00001A60u, 0x00001AE8u }, - { 0x00001AD8u, 0x00001A60u, 0x00001AE8u }, - { 0x00001AE0u, 0x00001A60u, 0x00001AE8u }, - { 0x00001AE8u, 0x00001AE8u, 0x00001AFCu }, - { 0x00001AF0u, 0x00001AE8u, 0x00001AFCu }, - { 0x00001AF8u, 0x00001AE8u, 0x00001AFCu }, - { 0x00001AFCu, 0x00001AFCu, 0x00001B10u }, - { 0x00001B08u, 0x00001AFCu, 0x00001B10u }, - { 0x00001B10u, 0x00001B10u, 0x00001B20u }, - { 0x00001B20u, 0x00001B20u, 0x00001B44u }, - { 0x00001B34u, 0x00001B20u, 0x00001B44u }, - { 0x00001B44u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BA0u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BB8u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BC8u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BD8u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BE8u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001BF8u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C00u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C08u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C18u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C20u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C30u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C40u, 0x00001B44u, 0x00001C5Cu }, - { 0x00001C5Cu, 0x00001C5Cu, 0x00001D00u }, - { 0x00001C9Cu, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CA4u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CB4u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CC4u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CD4u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CE4u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CE8u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001CF8u, 0x00001C5Cu, 0x00001D00u }, - { 0x00001D00u, 0x00001D00u, 0x00001D40u }, - { 0x00001D40u, 0x00001D40u, 0x00001D70u }, - { 0x00001D50u, 0x00001D40u, 0x00001D70u }, - { 0x00001D70u, 0x00001D70u, 0x00001D8Cu }, - { 0x00001D80u, 0x00001D70u, 0x00001D8Cu }, - { 0x00001D8Cu, 0x00001D8Cu, 0x00001E1Cu }, - { 0x00001DB4u, 0x00001D8Cu, 0x00001E1Cu }, - { 0x00001DC4u, 0x00001D8Cu, 0x00001E1Cu }, - { 0x00001DCCu, 0x00001D8Cu, 0x00001E1Cu }, - { 0x00001E0Cu, 0x00001D8Cu, 0x00001E1Cu }, - { 0x00001E1Cu, 0x00001E1Cu, 0x00001E44u }, - { 0x00001E44u, 0x00001E44u, 0x00001E80u }, - { 0x00001E70u, 0x00001E44u, 0x00001E80u }, - { 0x00001E80u, 0x00001E80u, 0x00001E98u }, - { 0x00001E90u, 0x00001E80u, 0x00001E98u }, - { 0x00001E98u, 0x00001E98u, 0x00001EC8u }, - { 0x00001EA8u, 0x00001E98u, 0x00001EC8u }, - { 0x00001EB8u, 0x00001E98u, 0x00001EC8u }, - { 0x00001EC8u, 0x00001EC8u, 0x00001F04u }, - { 0x00001EF4u, 0x00001EC8u, 0x00001F04u }, - { 0x00001F04u, 0x00001F04u, 0x00001F10u }, - { 0x00001F10u, 0x00001F10u, 0x00001F4Cu }, - { 0x00001F3Cu, 0x00001F10u, 0x00001F4Cu }, - { 0x00001F44u, 0x00001F10u, 0x00001F4Cu }, - { 0x00001F4Cu, 0x00001F4Cu, 0x00001F88u }, - { 0x00001F78u, 0x00001F4Cu, 0x00001F88u }, - { 0x00001F80u, 0x00001F4Cu, 0x00001F88u }, - { 0x00001F88u, 0x00001F88u, 0x00001FFCu }, - { 0x00001FC8u, 0x00001F88u, 0x00001FFCu }, - { 0x00001FCCu, 0x00001F88u, 0x00001FFCu }, - { 0x00001FDCu, 0x00001F88u, 0x00001FFCu }, - { 0x00001FFCu, 0x00001FFCu, 0x00002018u }, - { 0x0000200Cu, 0x00001FFCu, 0x00002018u }, - { 0x00002018u, 0x00002018u, 0x000020A8u }, - { 0x0000203Cu, 0x00002018u, 0x000020A8u }, - { 0x00002050u, 0x00002018u, 0x000020A8u }, - { 0x00002058u, 0x00002018u, 0x000020A8u }, - { 0x00002098u, 0x00002018u, 0x000020A8u }, - { 0x000020A8u, 0x000020A8u, 0x000020D4u }, - { 0x000020D4u, 0x000020D4u, 0x00002114u }, - { 0x00002104u, 0x000020D4u, 0x00002114u }, - { 0x00002114u, 0x00002114u, 0x00002124u }, - { 0x0000211Cu, 0x00002114u, 0x00002124u }, - { 0x00002124u, 0x00002124u, 0x00002150u }, - { 0x0000212Cu, 0x00002124u, 0x00002150u }, - { 0x00002144u, 0x00002124u, 0x00002150u }, - { 0x00002150u, 0x00002150u, 0x00002168u }, - { 0x00002158u, 0x00002150u, 0x00002168u }, - { 0x00002160u, 0x00002150u, 0x00002168u }, - { 0x00002168u, 0x00002168u, 0x0000218Cu }, - { 0x00002170u, 0x00002168u, 0x0000218Cu }, - { 0x00002180u, 0x00002168u, 0x0000218Cu }, - { 0x0000218Cu, 0x0000218Cu, 0x00002458u }, - { 0x000021B8u, 0x0000218Cu, 0x00002458u }, - { 0x000021C8u, 0x0000218Cu, 0x00002458u }, - { 0x000021D4u, 0x0000218Cu, 0x00002458u }, - { 0x000021F0u, 0x0000218Cu, 0x00002458u }, - { 0x00002200u, 0x0000218Cu, 0x00002458u }, - { 0x0000220Cu, 0x0000218Cu, 0x00002458u }, - { 0x00002228u, 0x0000218Cu, 0x00002458u }, - { 0x00002238u, 0x0000218Cu, 0x00002458u }, - { 0x00002244u, 0x0000218Cu, 0x00002458u }, - { 0x00002260u, 0x0000218Cu, 0x00002458u }, - { 0x00002270u, 0x0000218Cu, 0x00002458u }, - { 0x0000227Cu, 0x0000218Cu, 0x00002458u }, - { 0x00002298u, 0x0000218Cu, 0x00002458u }, - { 0x000022A8u, 0x0000218Cu, 0x00002458u }, - { 0x000022B4u, 0x0000218Cu, 0x00002458u }, - { 0x000022D0u, 0x0000218Cu, 0x00002458u }, - { 0x000022E0u, 0x0000218Cu, 0x00002458u }, - { 0x000022ECu, 0x0000218Cu, 0x00002458u }, - { 0x00002308u, 0x0000218Cu, 0x00002458u }, - { 0x00002318u, 0x0000218Cu, 0x00002458u }, - { 0x00002324u, 0x0000218Cu, 0x00002458u }, - { 0x00002340u, 0x0000218Cu, 0x00002458u }, - { 0x00002350u, 0x0000218Cu, 0x00002458u }, - { 0x0000235Cu, 0x0000218Cu, 0x00002458u }, - { 0x00002378u, 0x0000218Cu, 0x00002458u }, - { 0x00002388u, 0x0000218Cu, 0x00002458u }, - { 0x00002394u, 0x0000218Cu, 0x00002458u }, - { 0x000023B0u, 0x0000218Cu, 0x00002458u }, - { 0x000023C0u, 0x0000218Cu, 0x00002458u }, - { 0x000023CCu, 0x0000218Cu, 0x00002458u }, - { 0x000023E8u, 0x0000218Cu, 0x00002458u }, - { 0x000023F8u, 0x0000218Cu, 0x00002458u }, - { 0x00002404u, 0x0000218Cu, 0x00002458u }, - { 0x00002418u, 0x0000218Cu, 0x00002458u }, - { 0x00002428u, 0x0000218Cu, 0x00002458u }, - { 0x00002434u, 0x0000218Cu, 0x00002458u }, - { 0x00002440u, 0x0000218Cu, 0x00002458u }, - { 0x00002458u, 0x00002458u, 0x00002724u }, - { 0x00002484u, 0x00002458u, 0x00002724u }, - { 0x00002494u, 0x00002458u, 0x00002724u }, - { 0x000024A0u, 0x00002458u, 0x00002724u }, - { 0x000024BCu, 0x00002458u, 0x00002724u }, - { 0x000024CCu, 0x00002458u, 0x00002724u }, - { 0x000024D8u, 0x00002458u, 0x00002724u }, - { 0x000024F4u, 0x00002458u, 0x00002724u }, - { 0x00002504u, 0x00002458u, 0x00002724u }, - { 0x00002510u, 0x00002458u, 0x00002724u }, - { 0x0000252Cu, 0x00002458u, 0x00002724u }, - { 0x0000253Cu, 0x00002458u, 0x00002724u }, - { 0x00002548u, 0x00002458u, 0x00002724u }, - { 0x00002564u, 0x00002458u, 0x00002724u }, - { 0x00002574u, 0x00002458u, 0x00002724u }, - { 0x00002580u, 0x00002458u, 0x00002724u }, - { 0x0000259Cu, 0x00002458u, 0x00002724u }, - { 0x000025ACu, 0x00002458u, 0x00002724u }, - { 0x000025B8u, 0x00002458u, 0x00002724u }, - { 0x000025D4u, 0x00002458u, 0x00002724u }, - { 0x000025E4u, 0x00002458u, 0x00002724u }, - { 0x000025F0u, 0x00002458u, 0x00002724u }, - { 0x0000260Cu, 0x00002458u, 0x00002724u }, - { 0x0000261Cu, 0x00002458u, 0x00002724u }, - { 0x00002628u, 0x00002458u, 0x00002724u }, - { 0x00002644u, 0x00002458u, 0x00002724u }, - { 0x00002654u, 0x00002458u, 0x00002724u }, - { 0x00002660u, 0x00002458u, 0x00002724u }, - { 0x0000267Cu, 0x00002458u, 0x00002724u }, - { 0x0000268Cu, 0x00002458u, 0x00002724u }, - { 0x00002698u, 0x00002458u, 0x00002724u }, - { 0x000026B4u, 0x00002458u, 0x00002724u }, - { 0x000026C4u, 0x00002458u, 0x00002724u }, - { 0x000026D0u, 0x00002458u, 0x00002724u }, - { 0x000026E4u, 0x00002458u, 0x00002724u }, - { 0x000026F4u, 0x00002458u, 0x00002724u }, - { 0x00002700u, 0x00002458u, 0x00002724u }, - { 0x0000270Cu, 0x00002458u, 0x00002724u }, - { 0x00002724u, 0x00002724u, 0x0000278Cu }, - { 0x00002758u, 0x00002724u, 0x0000278Cu }, - { 0x00002770u, 0x00002724u, 0x0000278Cu }, - { 0x0000277Cu, 0x00002724u, 0x0000278Cu }, - { 0x0000278Cu, 0x0000278Cu, 0x000027A0u }, - { 0x000027A0u, 0x000027A0u, 0x000027BCu }, - { 0x000027C0u, 0x000027C0u, 0x00002870u }, - { 0x00002828u, 0x000027C0u, 0x00002870u }, - { 0x00002830u, 0x000027C0u, 0x00002870u }, - { 0x0000283Cu, 0x000027C0u, 0x00002870u }, - { 0x00002844u, 0x000027C0u, 0x00002870u }, - { 0x00002858u, 0x000027C0u, 0x00002870u }, - { 0x00002860u, 0x000027C0u, 0x00002870u }, - { 0x00002870u, 0x00002870u, 0x00002908u }, - { 0x00002884u, 0x00002870u, 0x00002908u }, - { 0x000028A0u, 0x00002870u, 0x00002908u }, - { 0x000028A8u, 0x00002870u, 0x00002908u }, - { 0x000028B8u, 0x00002870u, 0x00002908u }, - { 0x000028C0u, 0x00002870u, 0x00002908u }, - { 0x000028C8u, 0x00002870u, 0x00002908u }, - { 0x000028D0u, 0x00002870u, 0x00002908u }, - { 0x000028D8u, 0x00002870u, 0x00002908u }, - { 0x000028E0u, 0x00002870u, 0x00002908u }, - { 0x000028E8u, 0x00002870u, 0x00002908u }, - { 0x000028F0u, 0x00002870u, 0x00002908u }, - { 0x000028F8u, 0x00002870u, 0x00002908u }, - { 0x000028FCu, 0x00002870u, 0x00002908u }, - { 0x00002908u, 0x00002908u, 0x00002958u }, - { 0x00002918u, 0x00002908u, 0x00002958u }, - { 0x00002920u, 0x00002908u, 0x00002958u }, - { 0x00002930u, 0x00002908u, 0x00002958u }, - { 0x00002938u, 0x00002908u, 0x00002958u }, - { 0x00002948u, 0x00002908u, 0x00002958u }, - { 0x0000294Cu, 0x00002908u, 0x00002958u }, - { 0x00002958u, 0x00002958u, 0x00002A64u }, - { 0x0000296Cu, 0x00002958u, 0x00002A64u }, - { 0x00002974u, 0x00002958u, 0x00002A64u }, - { 0x00002988u, 0x00002958u, 0x00002A64u }, - { 0x0000299Cu, 0x00002958u, 0x00002A64u }, - { 0x000029ACu, 0x00002958u, 0x00002A64u }, - { 0x000029C4u, 0x00002958u, 0x00002A64u }, - { 0x00002A0Cu, 0x00002958u, 0x00002A64u }, - { 0x00002A18u, 0x00002958u, 0x00002A64u }, - { 0x00002A30u, 0x00002958u, 0x00002A64u }, - { 0x00002A54u, 0x00002958u, 0x00002A64u }, - { 0x00002A64u, 0x00002A64u, 0x00002B28u }, - { 0x00002A78u, 0x00002A64u, 0x00002B28u }, - { 0x00002A88u, 0x00002A64u, 0x00002B28u }, - { 0x00002A98u, 0x00002A64u, 0x00002B28u }, - { 0x00002AACu, 0x00002A64u, 0x00002B28u }, - { 0x00002AB4u, 0x00002A64u, 0x00002B28u }, - { 0x00002AC8u, 0x00002A64u, 0x00002B28u }, - { 0x00002AD8u, 0x00002A64u, 0x00002B28u }, - { 0x00002AF8u, 0x00002A64u, 0x00002B28u }, - { 0x00002B00u, 0x00002A64u, 0x00002B28u }, - { 0x00002B08u, 0x00002A64u, 0x00002B28u }, - { 0x00002B10u, 0x00002A64u, 0x00002B28u }, - { 0x00002B18u, 0x00002A64u, 0x00002B28u }, - { 0x00002B28u, 0x00002B28u, 0x00002C94u }, - { 0x00002B3Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002B44u, 0x00002B28u, 0x00002C94u }, - { 0x00002B54u, 0x00002B28u, 0x00002C94u }, - { 0x00002B68u, 0x00002B28u, 0x00002C94u }, - { 0x00002B70u, 0x00002B28u, 0x00002C94u }, - { 0x00002B8Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002BA8u, 0x00002B28u, 0x00002C94u }, - { 0x00002BB4u, 0x00002B28u, 0x00002C94u }, - { 0x00002BB8u, 0x00002B28u, 0x00002C94u }, - { 0x00002BE0u, 0x00002B28u, 0x00002C94u }, - { 0x00002BFCu, 0x00002B28u, 0x00002C94u }, - { 0x00002C00u, 0x00002B28u, 0x00002C94u }, - { 0x00002C08u, 0x00002B28u, 0x00002C94u }, - { 0x00002C14u, 0x00002B28u, 0x00002C94u }, - { 0x00002C1Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002C38u, 0x00002B28u, 0x00002C94u }, - { 0x00002C3Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002C50u, 0x00002B28u, 0x00002C94u }, - { 0x00002C5Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002C6Cu, 0x00002B28u, 0x00002C94u }, - { 0x00002C74u, 0x00002B28u, 0x00002C94u }, - { 0x00002C84u, 0x00002B28u, 0x00002C94u }, - { 0x00002C94u, 0x00002C94u, 0x00002E00u }, - { 0x00002CA8u, 0x00002C94u, 0x00002E00u }, - { 0x00002CB0u, 0x00002C94u, 0x00002E00u }, - { 0x00002CC0u, 0x00002C94u, 0x00002E00u }, - { 0x00002CD4u, 0x00002C94u, 0x00002E00u }, - { 0x00002CDCu, 0x00002C94u, 0x00002E00u }, - { 0x00002CF8u, 0x00002C94u, 0x00002E00u }, - { 0x00002D14u, 0x00002C94u, 0x00002E00u }, - { 0x00002D20u, 0x00002C94u, 0x00002E00u }, - { 0x00002D24u, 0x00002C94u, 0x00002E00u }, - { 0x00002D4Cu, 0x00002C94u, 0x00002E00u }, - { 0x00002D68u, 0x00002C94u, 0x00002E00u }, - { 0x00002D6Cu, 0x00002C94u, 0x00002E00u }, - { 0x00002D74u, 0x00002C94u, 0x00002E00u }, - { 0x00002D80u, 0x00002C94u, 0x00002E00u }, - { 0x00002D88u, 0x00002C94u, 0x00002E00u }, - { 0x00002DA4u, 0x00002C94u, 0x00002E00u }, - { 0x00002DA8u, 0x00002C94u, 0x00002E00u }, - { 0x00002DBCu, 0x00002C94u, 0x00002E00u }, - { 0x00002DC8u, 0x00002C94u, 0x00002E00u }, - { 0x00002DD8u, 0x00002C94u, 0x00002E00u }, - { 0x00002DE0u, 0x00002C94u, 0x00002E00u }, - { 0x00002DF0u, 0x00002C94u, 0x00002E00u }, - { 0x00002E00u, 0x00002E00u, 0x00002E98u }, - { 0x00002E18u, 0x00002E00u, 0x00002E98u }, - { 0x00002E20u, 0x00002E00u, 0x00002E98u }, - { 0x00002E30u, 0x00002E00u, 0x00002E98u }, - { 0x00002E44u, 0x00002E00u, 0x00002E98u }, - { 0x00002E60u, 0x00002E00u, 0x00002E98u }, - { 0x00002E6Cu, 0x00002E00u, 0x00002E98u }, - { 0x00002E80u, 0x00002E00u, 0x00002E98u }, - { 0x00002E88u, 0x00002E00u, 0x00002E98u }, - { 0x00002E98u, 0x00002E98u, 0x00002EECu }, - { 0x00002EA8u, 0x00002E98u, 0x00002EECu }, - { 0x00002EB0u, 0x00002E98u, 0x00002EECu }, - { 0x00002EC0u, 0x00002E98u, 0x00002EECu }, - { 0x00002ED4u, 0x00002E98u, 0x00002EECu }, - { 0x00002EDCu, 0x00002E98u, 0x00002EECu }, - { 0x00002EECu, 0x00002EECu, 0x00002EFCu }, - { 0x00002EFCu, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F10u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F20u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F30u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F44u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F4Cu, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F58u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F5Cu, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F64u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F6Cu, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F70u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F78u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002F94u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002FA0u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002FB4u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002FB8u, 0x00002EFCu, 0x00002FC8u }, - { 0x00002FC8u, 0x00002FC8u, 0x00003000u }, - { 0x00002FE8u, 0x00002FC8u, 0x00003000u }, - { 0x00002FF0u, 0x00002FC8u, 0x00003000u }, - { 0x00003000u, 0x00003000u, 0x00003060u }, - { 0x0000301Cu, 0x00003000u, 0x00003060u }, - { 0x00003024u, 0x00003000u, 0x00003060u }, - { 0x00003030u, 0x00003000u, 0x00003060u }, - { 0x00003040u, 0x00003000u, 0x00003060u }, - { 0x0000304Cu, 0x00003000u, 0x00003060u }, - { 0x00003060u, 0x00003060u, 0x000030C8u }, - { 0x00003078u, 0x00003060u, 0x000030C8u }, - { 0x00003088u, 0x00003060u, 0x000030C8u }, - { 0x00003090u, 0x00003060u, 0x000030C8u }, - { 0x000030A0u, 0x00003060u, 0x000030C8u }, - { 0x000030B4u, 0x00003060u, 0x000030C8u }, - { 0x000030B8u, 0x00003060u, 0x000030C8u }, - { 0x000030C8u, 0x000030C8u, 0x000030E0u }, - { 0x000030D0u, 0x000030C8u, 0x000030E0u }, - { 0x000030D8u, 0x000030C8u, 0x000030E0u }, - { 0x000030E0u, 0x000030E0u, 0x000030E4u }, - { 0x000030E4u, 0x000030E4u, 0x00003108u }, - { 0x00003108u, 0x00003108u, 0x000031E8u }, - { 0x00003154u, 0x00003108u, 0x000031E8u }, - { 0x00003164u, 0x00003108u, 0x000031E8u }, - { 0x0000316Cu, 0x00003108u, 0x000031E8u }, - { 0x00003174u, 0x00003108u, 0x000031E8u }, - { 0x0000317Cu, 0x00003108u, 0x000031E8u }, - { 0x000031A0u, 0x00003108u, 0x000031E8u }, - { 0x000031A4u, 0x00003108u, 0x000031E8u }, - { 0x000031B8u, 0x00003108u, 0x000031E8u }, - { 0x000031C4u, 0x00003108u, 0x000031E8u }, - { 0x000031CCu, 0x00003108u, 0x000031E8u }, - { 0x000031D0u, 0x00003108u, 0x000031E8u }, - { 0x000031E8u, 0x000031E8u, 0x000033A4u }, - { 0x00003210u, 0x000031E8u, 0x000033A4u }, - { 0x00003220u, 0x000031E8u, 0x000033A4u }, - { 0x0000323Cu, 0x000031E8u, 0x000033A4u }, - { 0x00003244u, 0x000031E8u, 0x000033A4u }, - { 0x00003250u, 0x000031E8u, 0x000033A4u }, - { 0x00003268u, 0x000031E8u, 0x000033A4u }, - { 0x00003270u, 0x000031E8u, 0x000033A4u }, - { 0x00003274u, 0x000031E8u, 0x000033A4u }, - { 0x0000328Cu, 0x000031E8u, 0x000033A4u }, - { 0x000032BCu, 0x000031E8u, 0x000033A4u }, - { 0x000032DCu, 0x000031E8u, 0x000033A4u }, - { 0x000032FCu, 0x000031E8u, 0x000033A4u }, - { 0x00003304u, 0x000031E8u, 0x000033A4u }, - { 0x00003324u, 0x000031E8u, 0x000033A4u }, - { 0x0000332Cu, 0x000031E8u, 0x000033A4u }, - { 0x00003330u, 0x000031E8u, 0x000033A4u }, - { 0x00003358u, 0x000031E8u, 0x000033A4u }, - { 0x0000335Cu, 0x000031E8u, 0x000033A4u }, - { 0x0000336Cu, 0x000031E8u, 0x000033A4u }, - { 0x00003374u, 0x000031E8u, 0x000033A4u }, - { 0x00003380u, 0x000031E8u, 0x000033A4u }, - { 0x00003388u, 0x000031E8u, 0x000033A4u }, - { 0x0000338Cu, 0x000031E8u, 0x000033A4u }, - { 0x000033A4u, 0x000033A4u, 0x0000346Cu }, - { 0x000033BCu, 0x000033A4u, 0x0000346Cu }, - { 0x000033C8u, 0x000033A4u, 0x0000346Cu }, - { 0x000033E4u, 0x000033A4u, 0x0000346Cu }, - { 0x000033F4u, 0x000033A4u, 0x0000346Cu }, - { 0x0000343Cu, 0x000033A4u, 0x0000346Cu }, - { 0x00003450u, 0x000033A4u, 0x0000346Cu }, - { 0x00003458u, 0x000033A4u, 0x0000346Cu }, - { 0x0000345Cu, 0x000033A4u, 0x0000346Cu }, - { 0x0000346Cu, 0x0000346Cu, 0x000034B4u }, - { 0x0000347Cu, 0x0000346Cu, 0x000034B4u }, - { 0x0000348Cu, 0x0000346Cu, 0x000034B4u }, - { 0x000034A8u, 0x0000346Cu, 0x000034B4u }, - { 0x000034B4u, 0x000034B4u, 0x0000352Cu }, - { 0x000034D4u, 0x000034B4u, 0x0000352Cu }, - { 0x000034E4u, 0x000034B4u, 0x0000352Cu }, - { 0x000034F4u, 0x000034B4u, 0x0000352Cu }, - { 0x00003514u, 0x000034B4u, 0x0000352Cu }, - { 0x0000351Cu, 0x000034B4u, 0x0000352Cu }, - { 0x0000352Cu, 0x0000352Cu, 0x00003570u }, - { 0x00003544u, 0x0000352Cu, 0x00003570u }, - { 0x0000354Cu, 0x0000352Cu, 0x00003570u }, - { 0x00003550u, 0x0000352Cu, 0x00003570u }, - { 0x00003560u, 0x0000352Cu, 0x00003570u }, - { 0x00003568u, 0x0000352Cu, 0x00003570u }, - { 0x00003570u, 0x00003570u, 0x000035A4u }, - { 0x00003588u, 0x00003570u, 0x000035A4u }, - { 0x000035A4u, 0x000035A4u, 0x000035ACu }, - { 0x000035ACu, 0x000035ACu, 0x00003678u }, - { 0x000035BCu, 0x000035ACu, 0x00003678u }, - { 0x000035C4u, 0x000035ACu, 0x00003678u }, - { 0x000035D8u, 0x000035ACu, 0x00003678u }, - { 0x000035ECu, 0x000035ACu, 0x00003678u }, - { 0x000035FCu, 0x000035ACu, 0x00003678u }, - { 0x00003614u, 0x000035ACu, 0x00003678u }, - { 0x00003644u, 0x000035ACu, 0x00003678u }, - { 0x00003650u, 0x000035ACu, 0x00003678u }, - { 0x00003664u, 0x000035ACu, 0x00003678u }, - { 0x00003668u, 0x000035ACu, 0x00003678u }, - { 0x00003678u, 0x00003678u, 0x00003744u }, - { 0x00003688u, 0x00003678u, 0x00003744u }, - { 0x00003690u, 0x00003678u, 0x00003744u }, - { 0x000036A4u, 0x00003678u, 0x00003744u }, - { 0x000036B8u, 0x00003678u, 0x00003744u }, - { 0x000036C8u, 0x00003678u, 0x00003744u }, - { 0x000036E0u, 0x00003678u, 0x00003744u }, - { 0x00003710u, 0x00003678u, 0x00003744u }, - { 0x0000371Cu, 0x00003678u, 0x00003744u }, - { 0x00003730u, 0x00003678u, 0x00003744u }, - { 0x00003734u, 0x00003678u, 0x00003744u }, - { 0x00003744u, 0x00003744u, 0x00003810u }, - { 0x00003754u, 0x00003744u, 0x00003810u }, - { 0x0000375Cu, 0x00003744u, 0x00003810u }, - { 0x00003770u, 0x00003744u, 0x00003810u }, - { 0x00003784u, 0x00003744u, 0x00003810u }, - { 0x00003794u, 0x00003744u, 0x00003810u }, - { 0x000037ACu, 0x00003744u, 0x00003810u }, - { 0x000037DCu, 0x00003744u, 0x00003810u }, - { 0x000037E8u, 0x00003744u, 0x00003810u }, - { 0x000037FCu, 0x00003744u, 0x00003810u }, - { 0x00003800u, 0x00003744u, 0x00003810u }, - { 0x00003810u, 0x00003810u, 0x000038D8u }, - { 0x00003820u, 0x00003810u, 0x000038D8u }, - { 0x00003828u, 0x00003810u, 0x000038D8u }, - { 0x0000383Cu, 0x00003810u, 0x000038D8u }, - { 0x00003850u, 0x00003810u, 0x000038D8u }, - { 0x00003860u, 0x00003810u, 0x000038D8u }, - { 0x00003874u, 0x00003810u, 0x000038D8u }, - { 0x000038A4u, 0x00003810u, 0x000038D8u }, - { 0x000038B0u, 0x00003810u, 0x000038D8u }, - { 0x000038C4u, 0x00003810u, 0x000038D8u }, - { 0x000038C8u, 0x00003810u, 0x000038D8u }, - { 0x000038D8u, 0x000038D8u, 0x000039A4u }, - { 0x000038E8u, 0x000038D8u, 0x000039A4u }, - { 0x000038F0u, 0x000038D8u, 0x000039A4u }, - { 0x00003904u, 0x000038D8u, 0x000039A4u }, - { 0x00003918u, 0x000038D8u, 0x000039A4u }, - { 0x00003928u, 0x000038D8u, 0x000039A4u }, - { 0x00003940u, 0x000038D8u, 0x000039A4u }, - { 0x00003944u, 0x000038D8u, 0x000039A4u }, - { 0x00003970u, 0x000038D8u, 0x000039A4u }, - { 0x0000397Cu, 0x000038D8u, 0x000039A4u }, - { 0x00003990u, 0x000038D8u, 0x000039A4u }, - { 0x00003994u, 0x000038D8u, 0x000039A4u }, - { 0x000039A4u, 0x000039A4u, 0x00003A70u }, - { 0x000039C0u, 0x000039A4u, 0x00003A70u }, - { 0x000039C8u, 0x000039A4u, 0x00003A70u }, - { 0x000039D8u, 0x000039A4u, 0x00003A70u }, - { 0x000039ECu, 0x000039A4u, 0x00003A70u }, - { 0x000039FCu, 0x000039A4u, 0x00003A70u }, - { 0x00003A08u, 0x000039A4u, 0x00003A70u }, - { 0x00003A28u, 0x000039A4u, 0x00003A70u }, - { 0x00003A60u, 0x000039A4u, 0x00003A70u }, - { 0x00003A70u, 0x00003A70u, 0x00003AACu }, - { 0x00003A9Cu, 0x00003A70u, 0x00003AACu }, - { 0x00003AACu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003AC4u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003ACCu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003AE0u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003AE8u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003AF0u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B08u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B1Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B2Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B3Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B54u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B6Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B7Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B88u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B98u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003B9Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003BE0u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003BF4u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003C08u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003C10u, 0x00003AACu, 0x00003C2Cu }, - { 0x00003C1Cu, 0x00003AACu, 0x00003C2Cu }, - { 0x00003C2Cu, 0x00003C2Cu, 0x00003C6Cu }, - { 0x00003C6Cu, 0x00003C6Cu, 0x00003CB4u }, - { 0x00003C7Cu, 0x00003C6Cu, 0x00003CB4u }, - { 0x00003C90u, 0x00003C6Cu, 0x00003CB4u }, - { 0x00003C9Cu, 0x00003C6Cu, 0x00003CB4u }, - { 0x00003CB4u, 0x00003CB4u, 0x00003CBCu }, - { 0x00003CBCu, 0x00003CBCu, 0x00003CD0u }, - { 0x00003CCCu, 0x00003CBCu, 0x00003CD0u }, - { 0x00003CD0u, 0x00003CD0u, 0x00003CE0u }, - { 0x00003CE0u, 0x00003CE0u, 0x00003DACu }, - { 0x00003D2Cu, 0x00003CE0u, 0x00003DACu }, - { 0x00003D3Cu, 0x00003CE0u, 0x00003DACu }, - { 0x00003D44u, 0x00003CE0u, 0x00003DACu }, - { 0x00003D4Cu, 0x00003CE0u, 0x00003DACu }, - { 0x00003D5Cu, 0x00003CE0u, 0x00003DACu }, - { 0x00003D68u, 0x00003CE0u, 0x00003DACu }, - { 0x00003D90u, 0x00003CE0u, 0x00003DACu }, - { 0x00003D94u, 0x00003CE0u, 0x00003DACu }, - { 0x00003DACu, 0x00003DACu, 0x00003E5Cu }, - { 0x00003DECu, 0x00003DACu, 0x00003E5Cu }, - { 0x00003DF8u, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E08u, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E14u, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E34u, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E44u, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E4Cu, 0x00003DACu, 0x00003E5Cu }, - { 0x00003E5Cu, 0x00003E5Cu, 0x00003E68u }, - { 0x00003E68u, 0x00003E68u, 0x00003E78u }, - { 0x00003E80u, 0x00003E80u, 0x00003F04u }, - { 0x00003EA8u, 0x00003E80u, 0x00003F04u }, - { 0x00003EBCu, 0x00003E80u, 0x00003F04u }, - { 0x00003EDCu, 0x00003E80u, 0x00003F04u }, - { 0x00003EECu, 0x00003E80u, 0x00003F04u }, - { 0x00003F04u, 0x00003F04u, 0x00003FF0u }, - { 0x00003F1Cu, 0x00003F04u, 0x00003FF0u }, - { 0x00003F30u, 0x00003F04u, 0x00003FF0u }, - { 0x00003F40u, 0x00003F04u, 0x00003FF0u }, - { 0x00003F4Cu, 0x00003F04u, 0x00003FF0u }, - { 0x00003F5Cu, 0x00003F04u, 0x00003FF0u }, - { 0x00003F68u, 0x00003F04u, 0x00003FF0u }, - { 0x00003F6Cu, 0x00003F04u, 0x00003FF0u }, - { 0x00003F78u, 0x00003F04u, 0x00003FF0u }, - { 0x00003F8Cu, 0x00003F04u, 0x00003FF0u }, - { 0x00003FA0u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FA4u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FACu, 0x00003F04u, 0x00003FF0u }, - { 0x00003FC0u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FD4u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FE0u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FE4u, 0x00003F04u, 0x00003FF0u }, - { 0x00003FF0u, 0x00003FF0u, 0x00004024u }, - { 0x00004008u, 0x00003FF0u, 0x00004024u }, - { 0x00004024u, 0x00004024u, 0x0000406Cu }, - { 0x00004038u, 0x00004024u, 0x0000406Cu }, - { 0x00004040u, 0x00004024u, 0x0000406Cu }, - { 0x00004048u, 0x00004024u, 0x0000406Cu }, - { 0x0000404Cu, 0x00004024u, 0x0000406Cu }, - { 0x0000405Cu, 0x00004024u, 0x0000406Cu }, - { 0x0000406Cu, 0x0000406Cu, 0x00004134u }, - { 0x00004084u, 0x0000406Cu, 0x00004134u }, - { 0x00004090u, 0x0000406Cu, 0x00004134u }, - { 0x00004098u, 0x0000406Cu, 0x00004134u }, - { 0x000040A4u, 0x0000406Cu, 0x00004134u }, - { 0x000040ACu, 0x0000406Cu, 0x00004134u }, - { 0x000040C4u, 0x0000406Cu, 0x00004134u }, - { 0x000040CCu, 0x0000406Cu, 0x00004134u }, - { 0x000040D0u, 0x0000406Cu, 0x00004134u }, - { 0x000040D8u, 0x0000406Cu, 0x00004134u }, - { 0x000040E0u, 0x0000406Cu, 0x00004134u }, - { 0x000040E4u, 0x0000406Cu, 0x00004134u }, - { 0x00004100u, 0x0000406Cu, 0x00004134u }, - { 0x00004114u, 0x0000406Cu, 0x00004134u }, - { 0x00004118u, 0x0000406Cu, 0x00004134u }, - { 0x00004124u, 0x0000406Cu, 0x00004134u }, - { 0x00004128u, 0x0000406Cu, 0x00004134u }, - { 0x00004134u, 0x00004134u, 0x00004164u }, - { 0x00004154u, 0x00004134u, 0x00004164u }, - { 0x00004164u, 0x00004164u, 0x00004304u }, - { 0x000041B0u, 0x00004164u, 0x00004304u }, - { 0x000041B8u, 0x00004164u, 0x00004304u }, - { 0x000041CCu, 0x00004164u, 0x00004304u }, - { 0x000041D4u, 0x00004164u, 0x00004304u }, - { 0x000041DCu, 0x00004164u, 0x00004304u }, - { 0x000041E4u, 0x00004164u, 0x00004304u }, - { 0x000041ECu, 0x00004164u, 0x00004304u }, - { 0x000041F4u, 0x00004164u, 0x00004304u }, - { 0x000041FCu, 0x00004164u, 0x00004304u }, - { 0x00004204u, 0x00004164u, 0x00004304u }, - { 0x00004214u, 0x00004164u, 0x00004304u }, - { 0x00004220u, 0x00004164u, 0x00004304u }, - { 0x00004228u, 0x00004164u, 0x00004304u }, - { 0x00004230u, 0x00004164u, 0x00004304u }, - { 0x00004238u, 0x00004164u, 0x00004304u }, - { 0x00004240u, 0x00004164u, 0x00004304u }, - { 0x0000424Cu, 0x00004164u, 0x00004304u }, - { 0x00004250u, 0x00004164u, 0x00004304u }, - { 0x00004258u, 0x00004164u, 0x00004304u }, - { 0x00004264u, 0x00004164u, 0x00004304u }, - { 0x0000426Cu, 0x00004164u, 0x00004304u }, - { 0x00004274u, 0x00004164u, 0x00004304u }, - { 0x0000427Cu, 0x00004164u, 0x00004304u }, - { 0x00004284u, 0x00004164u, 0x00004304u }, - { 0x000042A0u, 0x00004164u, 0x00004304u }, - { 0x000042B0u, 0x00004164u, 0x00004304u }, - { 0x000042BCu, 0x00004164u, 0x00004304u }, - { 0x000042C4u, 0x00004164u, 0x00004304u }, - { 0x000042CCu, 0x00004164u, 0x00004304u }, - { 0x000042D4u, 0x00004164u, 0x00004304u }, - { 0x00004304u, 0x00004304u, 0x00004360u }, - { 0x0000431Cu, 0x00004304u, 0x00004360u }, - { 0x00004324u, 0x00004304u, 0x00004360u }, - { 0x00004334u, 0x00004304u, 0x00004360u }, - { 0x0000433Cu, 0x00004304u, 0x00004360u }, - { 0x0000434Cu, 0x00004304u, 0x00004360u }, - { 0x00004350u, 0x00004304u, 0x00004360u }, - { 0x00004360u, 0x00004360u, 0x00004388u }, - { 0x00004378u, 0x00004360u, 0x00004388u }, - { 0x000043D0u, 0x000043D0u, 0x000043E8u }, - { 0x000043E8u, 0x000043E8u, 0x0000445Cu }, - { 0x00004420u, 0x000043E8u, 0x0000445Cu }, - { 0x00004430u, 0x000043E8u, 0x0000445Cu }, - { 0x00004440u, 0x000043E8u, 0x0000445Cu }, - { 0x0000445Cu, 0x0000445Cu, 0x00004498u }, - { 0x00004478u, 0x0000445Cu, 0x00004498u }, - { 0x00004490u, 0x0000445Cu, 0x00004498u }, - { 0x00004498u, 0x00004498u, 0x000049BCu }, - { 0x000044E0u, 0x00004498u, 0x000049BCu }, - { 0x000044E8u, 0x00004498u, 0x000049BCu }, - { 0x000044ECu, 0x00004498u, 0x000049BCu }, - { 0x00004524u, 0x00004498u, 0x000049BCu }, - { 0x0000452Cu, 0x00004498u, 0x000049BCu }, - { 0x00004530u, 0x00004498u, 0x000049BCu }, - { 0x00004548u, 0x00004498u, 0x000049BCu }, - { 0x0000456Cu, 0x00004498u, 0x000049BCu }, - { 0x00004580u, 0x00004498u, 0x000049BCu }, - { 0x00004584u, 0x00004498u, 0x000049BCu }, - { 0x00004590u, 0x00004498u, 0x000049BCu }, - { 0x000045C4u, 0x00004498u, 0x000049BCu }, - { 0x000045D8u, 0x00004498u, 0x000049BCu }, - { 0x000045E4u, 0x00004498u, 0x000049BCu }, - { 0x000045F8u, 0x00004498u, 0x000049BCu }, - { 0x000045FCu, 0x00004498u, 0x000049BCu }, - { 0x00004614u, 0x00004498u, 0x000049BCu }, - { 0x00004628u, 0x00004498u, 0x000049BCu }, - { 0x0000462Cu, 0x00004498u, 0x000049BCu }, - { 0x00004638u, 0x00004498u, 0x000049BCu }, - { 0x00004664u, 0x00004498u, 0x000049BCu }, - { 0x00004678u, 0x00004498u, 0x000049BCu }, - { 0x000046A4u, 0x00004498u, 0x000049BCu }, - { 0x000046A8u, 0x00004498u, 0x000049BCu }, - { 0x000046BCu, 0x00004498u, 0x000049BCu }, - { 0x000046C0u, 0x00004498u, 0x000049BCu }, - { 0x000046D8u, 0x00004498u, 0x000049BCu }, - { 0x000046ECu, 0x00004498u, 0x000049BCu }, - { 0x000046FCu, 0x00004498u, 0x000049BCu }, - { 0x00004728u, 0x00004498u, 0x000049BCu }, - { 0x0000473Cu, 0x00004498u, 0x000049BCu }, - { 0x00004754u, 0x00004498u, 0x000049BCu }, - { 0x0000475Cu, 0x00004498u, 0x000049BCu }, - { 0x00004770u, 0x00004498u, 0x000049BCu }, - { 0x00004774u, 0x00004498u, 0x000049BCu }, - { 0x0000478Cu, 0x00004498u, 0x000049BCu }, - { 0x000047A0u, 0x00004498u, 0x000049BCu }, - { 0x000047B4u, 0x00004498u, 0x000049BCu }, - { 0x000047B8u, 0x00004498u, 0x000049BCu }, - { 0x000047C8u, 0x00004498u, 0x000049BCu }, - { 0x000047F4u, 0x00004498u, 0x000049BCu }, - { 0x00004808u, 0x00004498u, 0x000049BCu }, - { 0x0000481Cu, 0x00004498u, 0x000049BCu }, - { 0x00004830u, 0x00004498u, 0x000049BCu }, - { 0x0000483Cu, 0x00004498u, 0x000049BCu }, - { 0x00004850u, 0x00004498u, 0x000049BCu }, - { 0x00004878u, 0x00004498u, 0x000049BCu }, - { 0x0000487Cu, 0x00004498u, 0x000049BCu }, - { 0x00004894u, 0x00004498u, 0x000049BCu }, - { 0x000048A8u, 0x00004498u, 0x000049BCu }, - { 0x000048BCu, 0x00004498u, 0x000049BCu }, - { 0x000048C0u, 0x00004498u, 0x000049BCu }, - { 0x000048D0u, 0x00004498u, 0x000049BCu }, - { 0x000048FCu, 0x00004498u, 0x000049BCu }, - { 0x00004910u, 0x00004498u, 0x000049BCu }, - { 0x00004934u, 0x00004498u, 0x000049BCu }, - { 0x00004938u, 0x00004498u, 0x000049BCu }, - { 0x00004950u, 0x00004498u, 0x000049BCu }, - { 0x00004954u, 0x00004498u, 0x000049BCu }, - { 0x00004990u, 0x00004498u, 0x000049BCu }, - { 0x00004998u, 0x00004498u, 0x000049BCu }, - { 0x000049BCu, 0x000049BCu, 0x00004A4Cu }, - { 0x000049D0u, 0x000049BCu, 0x00004A4Cu }, - { 0x000049D8u, 0x000049BCu, 0x00004A4Cu }, - { 0x000049E0u, 0x000049BCu, 0x00004A4Cu }, - { 0x000049F4u, 0x000049BCu, 0x00004A4Cu }, - { 0x000049FCu, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A10u, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A20u, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A34u, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A3Cu, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A40u, 0x000049BCu, 0x00004A4Cu }, - { 0x00004A4Cu, 0x00004A4Cu, 0x00004A88u }, - { 0x00004A6Cu, 0x00004A4Cu, 0x00004A88u }, - { 0x00004A80u, 0x00004A4Cu, 0x00004A88u }, - { 0x00004A88u, 0x00004A88u, 0x00004A94u }, - { 0x00004A8Cu, 0x00004A88u, 0x00004A94u }, - { 0x00004A94u, 0x00004A94u, 0x00004AC8u }, - { 0x00004AC8u, 0x00004AC8u, 0x00004B70u }, - { 0x00004AF4u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B00u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B14u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B40u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B50u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B58u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B60u, 0x00004AC8u, 0x00004B70u }, - { 0x00004B70u, 0x00004B70u, 0x00004B90u }, - { 0x00004B90u, 0x00004B90u, 0x00004C10u }, - { 0x00004BA0u, 0x00004B90u, 0x00004C10u }, - { 0x00004BA8u, 0x00004B90u, 0x00004C10u }, - { 0x00004BB8u, 0x00004B90u, 0x00004C10u }, - { 0x00004BC8u, 0x00004B90u, 0x00004C10u }, - { 0x00004BECu, 0x00004B90u, 0x00004C10u }, - { 0x00004BF8u, 0x00004B90u, 0x00004C10u }, - { 0x00004C00u, 0x00004B90u, 0x00004C10u }, - { 0x00004C10u, 0x00004C10u, 0x00004C54u }, - { 0x00004C20u, 0x00004C10u, 0x00004C54u }, - { 0x00004C2Cu, 0x00004C10u, 0x00004C54u }, - { 0x00004C3Cu, 0x00004C10u, 0x00004C54u }, - { 0x00004C44u, 0x00004C10u, 0x00004C54u }, - { 0x00004C54u, 0x00004C54u, 0x00004C64u }, - { 0x00004C64u, 0x00004C64u, 0x00004C70u }, - { 0x00004C70u, 0x00004C70u, 0x00004CF4u }, - { 0x00004C80u, 0x00004C70u, 0x00004CF4u }, - { 0x00004C88u, 0x00004C70u, 0x00004CF4u }, - { 0x00004C98u, 0x00004C70u, 0x00004CF4u }, - { 0x00004CA8u, 0x00004C70u, 0x00004CF4u }, - { 0x00004CC8u, 0x00004C70u, 0x00004CF4u }, - { 0x00004CD4u, 0x00004C70u, 0x00004CF4u }, - { 0x00004CE4u, 0x00004C70u, 0x00004CF4u }, - { 0x00004CF4u, 0x00004CF4u, 0x00004D3Cu }, - { 0x00004D04u, 0x00004CF4u, 0x00004D3Cu }, - { 0x00004D10u, 0x00004CF4u, 0x00004D3Cu }, - { 0x00004D20u, 0x00004CF4u, 0x00004D3Cu }, - { 0x00004D2Cu, 0x00004CF4u, 0x00004D3Cu }, - { 0x00004D3Cu, 0x00004D3Cu, 0x00004D4Cu }, - { 0x00004D4Cu, 0x00004D4Cu, 0x00004D64u }, - { 0x00004D64u, 0x00004D64u, 0x00004D6Cu }, - { 0x00004D6Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004D80u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004D88u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004D8Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004DACu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004DDCu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004DE4u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004DF0u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004DF8u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E00u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E08u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E10u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E34u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E5Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E8Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004E9Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004EBCu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004EE0u, 0x00004D6Cu, 0x00004F54u }, - { 0x00004F0Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004F3Cu, 0x00004D6Cu, 0x00004F54u }, - { 0x00004F54u, 0x00004F54u, 0x00004F90u }, - { 0x00004F6Cu, 0x00004F54u, 0x00004F90u }, - { 0x00004F7Cu, 0x00004F54u, 0x00004F90u }, - { 0x00004F80u, 0x00004F54u, 0x00004F90u }, - { 0x00004F90u, 0x00004F90u, 0x00005000u }, - { 0x00004FB4u, 0x00004F90u, 0x00005000u }, - { 0x00004FC8u, 0x00004F90u, 0x00005000u }, - { 0x00004FD0u, 0x00004F90u, 0x00005000u }, - { 0x00004FD8u, 0x00004F90u, 0x00005000u }, - { 0x00004FE4u, 0x00004F90u, 0x00005000u }, - { 0x00004FECu, 0x00004F90u, 0x00005000u }, - { 0x00004FF0u, 0x00004F90u, 0x00005000u }, - { 0x00005000u, 0x00005000u, 0x000051F4u }, - { 0x00005018u, 0x00005000u, 0x000051F4u }, - { 0x00005028u, 0x00005000u, 0x000051F4u }, - { 0x00005038u, 0x00005000u, 0x000051F4u }, - { 0x00005048u, 0x00005000u, 0x000051F4u }, - { 0x00005058u, 0x00005000u, 0x000051F4u }, - { 0x0000506Cu, 0x00005000u, 0x000051F4u }, - { 0x000050E0u, 0x00005000u, 0x000051F4u }, - { 0x000050F0u, 0x00005000u, 0x000051F4u }, - { 0x00005100u, 0x00005000u, 0x000051F4u }, - { 0x00005128u, 0x00005000u, 0x000051F4u }, - { 0x00005168u, 0x00005000u, 0x000051F4u }, - { 0x00005170u, 0x00005000u, 0x000051F4u }, - { 0x000051B0u, 0x00005000u, 0x000051F4u }, - { 0x000051C0u, 0x00005000u, 0x000051F4u }, - { 0x000051D0u, 0x00005000u, 0x000051F4u }, - { 0x000051E4u, 0x00005000u, 0x000051F4u }, - { 0x000051F4u, 0x000051F4u, 0x00005688u }, - { 0x00005228u, 0x000051F4u, 0x00005688u }, - { 0x00005244u, 0x000051F4u, 0x00005688u }, - { 0x0000524Cu, 0x000051F4u, 0x00005688u }, - { 0x00005254u, 0x000051F4u, 0x00005688u }, - { 0x00005258u, 0x000051F4u, 0x00005688u }, - { 0x000052C4u, 0x000051F4u, 0x00005688u }, - { 0x000052F8u, 0x000051F4u, 0x00005688u }, - { 0x00005340u, 0x000051F4u, 0x00005688u }, - { 0x0000534Cu, 0x000051F4u, 0x00005688u }, - { 0x00005374u, 0x000051F4u, 0x00005688u }, - { 0x00005384u, 0x000051F4u, 0x00005688u }, - { 0x00005398u, 0x000051F4u, 0x00005688u }, - { 0x000053CCu, 0x000051F4u, 0x00005688u }, - { 0x000053D4u, 0x000051F4u, 0x00005688u }, - { 0x00005410u, 0x000051F4u, 0x00005688u }, - { 0x00005418u, 0x000051F4u, 0x00005688u }, - { 0x0000542Cu, 0x000051F4u, 0x00005688u }, - { 0x00005480u, 0x000051F4u, 0x00005688u }, - { 0x00005488u, 0x000051F4u, 0x00005688u }, - { 0x000054CCu, 0x000051F4u, 0x00005688u }, - { 0x000054FCu, 0x000051F4u, 0x00005688u }, - { 0x00005530u, 0x000051F4u, 0x00005688u }, - { 0x00005538u, 0x000051F4u, 0x00005688u }, - { 0x0000556Cu, 0x000051F4u, 0x00005688u }, - { 0x00005574u, 0x000051F4u, 0x00005688u }, - { 0x00005588u, 0x000051F4u, 0x00005688u }, - { 0x0000559Cu, 0x000051F4u, 0x00005688u }, - { 0x000055B0u, 0x000051F4u, 0x00005688u }, - { 0x000055D0u, 0x000051F4u, 0x00005688u }, - { 0x00005604u, 0x000051F4u, 0x00005688u }, - { 0x00005618u, 0x000051F4u, 0x00005688u }, - { 0x00005628u, 0x000051F4u, 0x00005688u }, - { 0x0000562Cu, 0x000051F4u, 0x00005688u }, - { 0x00005634u, 0x000051F4u, 0x00005688u }, - { 0x0000563Cu, 0x000051F4u, 0x00005688u }, - { 0x00005644u, 0x000051F4u, 0x00005688u }, - { 0x0000564Cu, 0x000051F4u, 0x00005688u }, - { 0x00005654u, 0x000051F4u, 0x00005688u }, - { 0x0000565Cu, 0x000051F4u, 0x00005688u }, - { 0x00005664u, 0x000051F4u, 0x00005688u }, - { 0x0000566Cu, 0x000051F4u, 0x00005688u }, - { 0x00005674u, 0x000051F4u, 0x00005688u }, - { 0x00005678u, 0x000051F4u, 0x00005688u }, - { 0x00005688u, 0x00005688u, 0x000056E8u }, - { 0x000056CCu, 0x00005688u, 0x000056E8u }, - { 0x000056E8u, 0x000056E8u, 0x00005768u }, - { 0x000056F0u, 0x000056E8u, 0x00005768u }, - { 0x000056F8u, 0x000056E8u, 0x00005768u }, - { 0x000056FCu, 0x000056E8u, 0x00005768u }, - { 0x00005768u, 0x00005768u, 0x0000579Cu }, - { 0x0000579Cu, 0x0000579Cu, 0x00005834u }, - { 0x000057DCu, 0x0000579Cu, 0x00005834u }, - { 0x000057E8u, 0x0000579Cu, 0x00005834u }, - { 0x00005810u, 0x0000579Cu, 0x00005834u }, - { 0x00005820u, 0x0000579Cu, 0x00005834u }, - { 0x00005834u, 0x00005834u, 0x00005870u }, - { 0x00005868u, 0x00005834u, 0x00005870u }, - { 0x00005870u, 0x00005870u, 0x000058B4u }, - { 0x000058ACu, 0x00005870u, 0x000058B4u }, - { 0x000058B4u, 0x000058B4u, 0x000058E8u }, - { 0x000058E8u, 0x000058E8u, 0x00005918u }, - { 0x00005918u, 0x00005918u, 0x00005954u }, - { 0x0000594Cu, 0x00005918u, 0x00005954u }, - { 0x00005954u, 0x00005954u, 0x00005990u }, - { 0x00005988u, 0x00005954u, 0x00005990u }, - { 0x00005990u, 0x00005990u, 0x000059CCu }, - { 0x000059C8u, 0x00005990u, 0x000059CCu }, - { 0x000059CCu, 0x000059CCu, 0x00005A00u }, - { 0x000059D0u, 0x000059CCu, 0x00005A00u }, - { 0x00005A00u, 0x00005A00u, 0x00005A08u }, - { 0x00005A08u, 0x00005A08u, 0x00005A44u }, - { 0x00005A40u, 0x00005A08u, 0x00005A44u }, - { 0x00005A44u, 0x00005A44u, 0x00005A58u }, - { 0x00005A48u, 0x00005A44u, 0x00005A58u }, - { 0x00005A50u, 0x00005A44u, 0x00005A58u }, - { 0x00005A58u, 0x00005A58u, 0x00005A80u }, - { 0x00005A80u, 0x00005A80u, 0x00005AB0u }, - { 0x00005AB0u, 0x00005AB0u, 0x00005ABCu }, - { 0x00005ABCu, 0x00005ABCu, 0x00005AF8u }, - { 0x00005AF8u, 0x00005AF8u, 0x00005B34u }, - { 0x00005B00u, 0x00005AF8u, 0x00005B34u }, - { 0x00005B14u, 0x00005AF8u, 0x00005B34u }, - { 0x00005B28u, 0x00005AF8u, 0x00005B34u }, - { 0x00005B34u, 0x00005B34u, 0x00005B50u }, - { 0x00005B38u, 0x00005B34u, 0x00005B50u }, - { 0x00005B40u, 0x00005B34u, 0x00005B50u }, - { 0x00005B48u, 0x00005B34u, 0x00005B50u }, - { 0x00005B50u, 0x00005B50u, 0x00005B54u }, - { 0x00005B54u, 0x00005B54u, 0x00005B64u }, - { 0x00005B64u, 0x00005B64u, 0x00005BA4u }, - { 0x00005B88u, 0x00005B64u, 0x00005BA4u }, - { 0x00005BA4u, 0x00005BA4u, 0x00005C24u }, - { 0x00005BACu, 0x00005BA4u, 0x00005C24u }, - { 0x00005BB4u, 0x00005BA4u, 0x00005C24u }, - { 0x00005BB8u, 0x00005BA4u, 0x00005C24u }, - { 0x00005C24u, 0x00005C24u, 0x00005C58u }, - { 0x00005C58u, 0x00005C58u, 0x00005D48u }, - { 0x00005C98u, 0x00005C58u, 0x00005D48u }, - { 0x00005CA4u, 0x00005C58u, 0x00005D48u }, - { 0x00005CCCu, 0x00005C58u, 0x00005D48u }, - { 0x00005CDCu, 0x00005C58u, 0x00005D48u }, - { 0x00005CF0u, 0x00005C58u, 0x00005D48u }, - { 0x00005CFCu, 0x00005C58u, 0x00005D48u }, - { 0x00005D24u, 0x00005C58u, 0x00005D48u }, - { 0x00005D34u, 0x00005C58u, 0x00005D48u }, - { 0x00005D48u, 0x00005D48u, 0x00005D94u }, - { 0x00005D7Cu, 0x00005D48u, 0x00005D94u }, - { 0x00005D84u, 0x00005D48u, 0x00005D94u }, - { 0x00005D8Cu, 0x00005D48u, 0x00005D94u }, - { 0x00005D94u, 0x00005D94u, 0x00005D98u }, - { 0x00005D98u, 0x00005D98u, 0x00005DA8u }, - { 0x00005DA8u, 0x00005DA8u, 0x00005DD0u }, - { 0x00005DB8u, 0x00005DA8u, 0x00005DD0u }, - { 0x00005DD0u, 0x00005DD0u, 0x00005DD8u }, - { 0x00005DD8u, 0x00005DD8u, 0x00005E30u }, - { 0x00005E10u, 0x00005DD8u, 0x00005E30u }, - { 0x00005E18u, 0x00005DD8u, 0x00005E30u }, - { 0x00005E30u, 0x00005E30u, 0x00005E50u }, - { 0x00005E50u, 0x00005E50u, 0x00005E98u }, - { 0x00005E60u, 0x00005E50u, 0x00005E98u }, - { 0x00005E64u, 0x00005E50u, 0x00005E98u }, - { 0x00005E80u, 0x00005E50u, 0x00005E98u }, - { 0x00005E88u, 0x00005E50u, 0x00005E98u }, - { 0x00005E90u, 0x00005E50u, 0x00005E98u }, - { 0x00005E98u, 0x00005E98u, 0x00005EF4u }, - { 0x00005EF4u, 0x00005EF4u, 0x00005F04u }, - { 0x00005F04u, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F14u, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F18u, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F34u, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F3Cu, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F44u, 0x00005F04u, 0x00005F4Cu }, - { 0x00005F4Cu, 0x00005F4Cu, 0x00005FA8u }, - { 0x00005FA8u, 0x00005FA8u, 0x00005FB8u }, - { 0x00005FB8u, 0x00005FB8u, 0x00005FF0u }, - { 0x00005FC8u, 0x00005FB8u, 0x00005FF0u }, - { 0x00005FCCu, 0x00005FB8u, 0x00005FF0u }, - { 0x00005FE8u, 0x00005FB8u, 0x00005FF0u }, - { 0x00005FF0u, 0x00005FF0u, 0x0000605Cu }, - { 0x0000605Cu, 0x0000605Cu, 0x00006070u }, - { 0x00006070u, 0x00006070u, 0x0000609Cu }, - { 0x0000607Cu, 0x00006070u, 0x0000609Cu }, - { 0x00006090u, 0x00006070u, 0x0000609Cu }, - { 0x0000609Cu, 0x0000609Cu, 0x000061C4u }, - { 0x000060BCu, 0x0000609Cu, 0x000061C4u }, - { 0x000060C8u, 0x0000609Cu, 0x000061C4u }, - { 0x000060D0u, 0x0000609Cu, 0x000061C4u }, - { 0x000060DCu, 0x0000609Cu, 0x000061C4u }, - { 0x000060E8u, 0x0000609Cu, 0x000061C4u }, - { 0x000060F4u, 0x0000609Cu, 0x000061C4u }, - { 0x00006144u, 0x0000609Cu, 0x000061C4u }, - { 0x00006170u, 0x0000609Cu, 0x000061C4u }, - { 0x0000618Cu, 0x0000609Cu, 0x000061C4u }, - { 0x0000619Cu, 0x0000609Cu, 0x000061C4u }, - { 0x000061A4u, 0x0000609Cu, 0x000061C4u }, - { 0x000061B0u, 0x0000609Cu, 0x000061C4u }, - { 0x000061B4u, 0x0000609Cu, 0x000061C4u }, - { 0x000061C4u, 0x000061C4u, 0x00006374u }, - { 0x000061E8u, 0x000061C4u, 0x00006374u }, - { 0x000061F0u, 0x000061C4u, 0x00006374u }, - { 0x00006204u, 0x000061C4u, 0x00006374u }, - { 0x0000620Cu, 0x000061C4u, 0x00006374u }, - { 0x00006210u, 0x000061C4u, 0x00006374u }, - { 0x00006218u, 0x000061C4u, 0x00006374u }, - { 0x0000624Cu, 0x000061C4u, 0x00006374u }, - { 0x00006270u, 0x000061C4u, 0x00006374u }, - { 0x00006280u, 0x000061C4u, 0x00006374u }, - { 0x00006298u, 0x000061C4u, 0x00006374u }, - { 0x000062A8u, 0x000061C4u, 0x00006374u }, - { 0x000062BCu, 0x000061C4u, 0x00006374u }, - { 0x000062D0u, 0x000061C4u, 0x00006374u }, - { 0x000062D8u, 0x000061C4u, 0x00006374u }, - { 0x0000630Cu, 0x000061C4u, 0x00006374u }, - { 0x00006330u, 0x000061C4u, 0x00006374u }, - { 0x00006340u, 0x000061C4u, 0x00006374u }, - { 0x00006358u, 0x000061C4u, 0x00006374u }, - { 0x00006368u, 0x000061C4u, 0x00006374u }, - { 0x00006380u, 0x00006380u, 0x00006390u }, - { 0x00006390u, 0x00006390u, 0x000063BCu }, - { 0x000063BCu, 0x000063BCu, 0x000063F8u }, - { 0x000063DCu, 0x000063BCu, 0x000063F8u }, - { 0x000063F0u, 0x000063BCu, 0x000063F8u }, - { 0x000063F8u, 0x000063F8u, 0x00006408u }, - { 0x00006408u, 0x00006408u, 0x0000641Cu }, - { 0x00006418u, 0x00006408u, 0x0000641Cu }, - { 0x0000641Cu, 0x0000641Cu, 0x0000659Cu }, - { 0x00006430u, 0x0000641Cu, 0x0000659Cu }, - { 0x00006458u, 0x0000641Cu, 0x0000659Cu }, - { 0x00006474u, 0x0000641Cu, 0x0000659Cu }, - { 0x000064E8u, 0x0000641Cu, 0x0000659Cu }, - { 0x000064ECu, 0x0000641Cu, 0x0000659Cu }, - { 0x0000650Cu, 0x0000641Cu, 0x0000659Cu }, - { 0x00006514u, 0x0000641Cu, 0x0000659Cu }, - { 0x00006588u, 0x0000641Cu, 0x0000659Cu }, - { 0x0000658Cu, 0x0000641Cu, 0x0000659Cu }, - { 0x00006594u, 0x0000641Cu, 0x0000659Cu }, - { 0x0000659Cu, 0x0000659Cu, 0x000065D4u }, - { 0x00006670u, 0x00006670u, 0x00006A48u }, - { 0x0000668Cu, 0x00006670u, 0x00006A48u }, - { 0x000066A8u, 0x00006670u, 0x00006A48u }, - { 0x000066C4u, 0x00006670u, 0x00006A48u }, - { 0x000066D8u, 0x00006670u, 0x00006A48u }, - { 0x000066E0u, 0x00006670u, 0x00006A48u }, - { 0x000066E8u, 0x00006670u, 0x00006A48u }, - { 0x000066ECu, 0x00006670u, 0x00006A48u }, - { 0x000066F4u, 0x00006670u, 0x00006A48u }, - { 0x000066FCu, 0x00006670u, 0x00006A48u }, - { 0x00006704u, 0x00006670u, 0x00006A48u }, - { 0x00006708u, 0x00006670u, 0x00006A48u }, - { 0x00006710u, 0x00006670u, 0x00006A48u }, - { 0x00006718u, 0x00006670u, 0x00006A48u }, - { 0x00006720u, 0x00006670u, 0x00006A48u }, - { 0x00006724u, 0x00006670u, 0x00006A48u }, - { 0x0000672Cu, 0x00006670u, 0x00006A48u }, - { 0x00006734u, 0x00006670u, 0x00006A48u }, - { 0x0000673Cu, 0x00006670u, 0x00006A48u }, - { 0x00006740u, 0x00006670u, 0x00006A48u }, - { 0x00006748u, 0x00006670u, 0x00006A48u }, - { 0x00006750u, 0x00006670u, 0x00006A48u }, - { 0x00006758u, 0x00006670u, 0x00006A48u }, - { 0x0000675Cu, 0x00006670u, 0x00006A48u }, - { 0x00006764u, 0x00006670u, 0x00006A48u }, - { 0x0000676Cu, 0x00006670u, 0x00006A48u }, - { 0x00006774u, 0x00006670u, 0x00006A48u }, - { 0x00006778u, 0x00006670u, 0x00006A48u }, - { 0x00006780u, 0x00006670u, 0x00006A48u }, - { 0x0000678Cu, 0x00006670u, 0x00006A48u }, - { 0x00006790u, 0x00006670u, 0x00006A48u }, - { 0x000067B8u, 0x00006670u, 0x00006A48u }, - { 0x000067CCu, 0x00006670u, 0x00006A48u }, - { 0x000067D4u, 0x00006670u, 0x00006A48u }, - { 0x000067DCu, 0x00006670u, 0x00006A48u }, - { 0x000067E0u, 0x00006670u, 0x00006A48u }, - { 0x000067E8u, 0x00006670u, 0x00006A48u }, - { 0x000067F0u, 0x00006670u, 0x00006A48u }, - { 0x000067F8u, 0x00006670u, 0x00006A48u }, - { 0x000067FCu, 0x00006670u, 0x00006A48u }, - { 0x00006804u, 0x00006670u, 0x00006A48u }, - { 0x0000680Cu, 0x00006670u, 0x00006A48u }, - { 0x00006814u, 0x00006670u, 0x00006A48u }, - { 0x00006818u, 0x00006670u, 0x00006A48u }, - { 0x00006820u, 0x00006670u, 0x00006A48u }, - { 0x0000682Cu, 0x00006670u, 0x00006A48u }, - { 0x00006830u, 0x00006670u, 0x00006A48u }, - { 0x00006838u, 0x00006670u, 0x00006A48u }, - { 0x00006844u, 0x00006670u, 0x00006A48u }, - { 0x00006848u, 0x00006670u, 0x00006A48u }, - { 0x00006870u, 0x00006670u, 0x00006A48u }, - { 0x00006884u, 0x00006670u, 0x00006A48u }, - { 0x0000688Cu, 0x00006670u, 0x00006A48u }, - { 0x00006894u, 0x00006670u, 0x00006A48u }, - { 0x00006898u, 0x00006670u, 0x00006A48u }, - { 0x000068A0u, 0x00006670u, 0x00006A48u }, - { 0x000068A8u, 0x00006670u, 0x00006A48u }, - { 0x000068B0u, 0x00006670u, 0x00006A48u }, - { 0x000068B4u, 0x00006670u, 0x00006A48u }, - { 0x000068BCu, 0x00006670u, 0x00006A48u }, - { 0x000068C4u, 0x00006670u, 0x00006A48u }, - { 0x000068CCu, 0x00006670u, 0x00006A48u }, - { 0x000068D0u, 0x00006670u, 0x00006A48u }, - { 0x000068D8u, 0x00006670u, 0x00006A48u }, - { 0x000068E4u, 0x00006670u, 0x00006A48u }, - { 0x000068E8u, 0x00006670u, 0x00006A48u }, - { 0x000068F0u, 0x00006670u, 0x00006A48u }, - { 0x000068FCu, 0x00006670u, 0x00006A48u }, - { 0x00006900u, 0x00006670u, 0x00006A48u }, - { 0x00006928u, 0x00006670u, 0x00006A48u }, - { 0x0000693Cu, 0x00006670u, 0x00006A48u }, - { 0x00006944u, 0x00006670u, 0x00006A48u }, - { 0x0000694Cu, 0x00006670u, 0x00006A48u }, - { 0x00006950u, 0x00006670u, 0x00006A48u }, - { 0x00006958u, 0x00006670u, 0x00006A48u }, - { 0x00006960u, 0x00006670u, 0x00006A48u }, - { 0x00006968u, 0x00006670u, 0x00006A48u }, - { 0x0000696Cu, 0x00006670u, 0x00006A48u }, - { 0x00006974u, 0x00006670u, 0x00006A48u }, - { 0x0000697Cu, 0x00006670u, 0x00006A48u }, - { 0x00006984u, 0x00006670u, 0x00006A48u }, - { 0x00006988u, 0x00006670u, 0x00006A48u }, - { 0x00006990u, 0x00006670u, 0x00006A48u }, - { 0x0000699Cu, 0x00006670u, 0x00006A48u }, - { 0x000069A0u, 0x00006670u, 0x00006A48u }, - { 0x000069A8u, 0x00006670u, 0x00006A48u }, - { 0x000069B4u, 0x00006670u, 0x00006A48u }, - { 0x000069B8u, 0x00006670u, 0x00006A48u }, - { 0x000069E0u, 0x00006670u, 0x00006A48u }, - { 0x000069F4u, 0x00006670u, 0x00006A48u }, - { 0x000069FCu, 0x00006670u, 0x00006A48u }, - { 0x00006A00u, 0x00006670u, 0x00006A48u }, - { 0x00006A38u, 0x00006670u, 0x00006A48u }, - { 0x00006A70u, 0x00006A70u, 0x00006A7Cu }, - { 0x00006A80u, 0x00006A80u, 0x00006A8Cu }, - { 0x00006A90u, 0x00006A90u, 0x00006A9Cu }, - { 0x00006AA0u, 0x00006AA0u, 0x00006AACu }, - { 0x00006AB0u, 0x00006AB0u, 0x00006ABCu }, - { 0x00006AC0u, 0x00006AC0u, 0x00006ACCu }, - { 0x00006AD0u, 0x00006AD0u, 0x00006ADCu }, - { 0x00006AE0u, 0x00006AE0u, 0x00006AECu }, - { 0x00006AF0u, 0x00006AF0u, 0x00006AFCu }, - { 0x00006B00u, 0x00006B00u, 0x00006B0Cu }, - { 0x00006B10u, 0x00006B10u, 0x00006B1Cu }, - { 0x00006B20u, 0x00006B20u, 0x00006B2Cu }, - { 0x00006B30u, 0x00006B30u, 0x00006B3Cu }, - { 0x00006B40u, 0x00006B40u, 0x00006B4Cu }, - { 0x00006B50u, 0x00006B50u, 0x00006B5Cu }, - { 0x00006B60u, 0x00006B60u, 0x00006B6Cu }, - { 0x00006B70u, 0x00006B70u, 0x00006B7Cu }, - { 0x00006B80u, 0x00006B80u, 0x00006B90u }, - { 0x00006B90u, 0x00006B90u, 0x00006BA0u }, - { 0x00006BA0u, 0x00006BA0u, 0x00006BACu }, - { 0x00006BB0u, 0x00006BB0u, 0x00006BBCu }, - { 0x00006BC0u, 0x00006BC0u, 0x00006BCCu }, - { 0x00006BD0u, 0x00006BD0u, 0x00006BDCu }, - { 0x00006BE0u, 0x00006BE0u, 0x00006BECu }, - { 0x00006BF0u, 0x00006BF0u, 0x00006BFCu }, - { 0x00006C00u, 0x00006C00u, 0x00006C0Cu }, - { 0x00006C10u, 0x00006C10u, 0x00006C1Cu }, - { 0x00006C20u, 0x00006C20u, 0x00006C2Cu }, -}; -enum { SCPH1001_psx_bios_kernel_body_count = 1296u }; - -static const PsxKernelPatchRange SCPH1001_psx_bios_kernel_patch_ranges[5] = { - { 0x00000C88u, 0x00000CB8u }, - { 0x00000CF0u, 0x00000D00u }, - { 0x00004964u, 0x00004990u }, - { 0x00004D98u, 0x00004DACu }, - { 0x00006444u, 0x00006454u }, -}; -enum { SCPH1001_psx_bios_kernel_patch_range_count = 5u }; - -static const PsxBiosImageInfo SCPH1001_psx_bios_image = { - 0x00000500u, 0x00008500u, 0x00010000u, /* kbless lo/hi/rom_off */ - 0x00030000u, /* shell_entry_phys */ - 0x80001720u, /* deliver_event_ret */ - 524288u, 0x37157331u, 0xF67ECB99u, /* size / crc32 / wordsum */ - "71af94d1e47a68c11e8fdb9f8368040601514a42a5a399cda48c7d3bff1e99d3", - "SCPH-1001", - 0, /* image_bundled */ -}; - -static const PsxNativeStub SCPH1001_psx_bios_native_stubs[3] = { - { 0x000000A0u, 0x000000A0u, 0x000000B0u }, - { 0x000000B0u, 0x000000B0u, 0x000000C0u }, - { 0x000000C0u, 0x000000C0u, 0x000000D0u }, -}; -static const uint32_t SCPH1001_psx_bios_native_stub_count = 3u; - -static int psx_bios_try_native_call_stub(CPUState* cpu, uint32_t addr) { - uint32_t phys = addr & 0x1FFFFFFFu; - if (phys != 0xA0u && phys != 0xB0u && phys != 0xC0u) return 0; - uint32_t w0 = cpu->read_word(phys + 0u); - uint32_t w1 = cpu->read_word(phys + 4u); - uint32_t w2 = cpu->read_word(phys + 8u); - uint32_t w3 = cpu->read_word(phys + 12u); - uint32_t target; - if ((w0 & 0xFFFF0000u) == 0x3C080000u && - (w1 & 0xFFFF0000u) == 0x25080000u && - w2 == 0x01000008u && w3 == 0u) { - /* shape A: lui $t0,hi; addiu $t0,$t0,lo; jr $t0; nop */ - target = ((w0 & 0xFFFFu) << 16) + - (uint32_t)(int32_t)(int16_t)(w1 & 0xFFFFu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, addr); - psx_cyc_step(cpu, 0x100u); - psx_icache_fetch(cpu, addr + 4u); - psx_cyc_step(cpu, 0x100u); - psx_icache_fetch(cpu, addr + 8u); - psx_cyc_step(cpu, 0x101u); - psx_icache_fetch(cpu, addr + 12u); - psx_cyc_step(cpu, 0x1u); -#endif - } else if ((w0 & 0xFFFF0000u) == 0x24080000u && - w1 == 0x01000008u && w2 == 0u && w3 == 0u) { - /* shape B: addiu $t0,$zero,lo; jr $t0; nop; nop */ - target = (uint32_t)(int32_t)(int16_t)(w0 & 0xFFFFu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, addr); - psx_cyc_step(cpu, 0x101u); - psx_icache_fetch(cpu, addr + 4u); - psx_cyc_step(cpu, 0x101u); - psx_icache_fetch(cpu, addr + 8u); - psx_cyc_step(cpu, 0x1u); -#endif - } else { - return 0; - } - cpu->gpr[8] = target; - cpu->pc = target; - return 1; -} - -extern uint32_t g_psx_ram_mask; /* live main-RAM geometry, psx_memory.h */ -static uint32_t normalize(uint32_t addr) { - uint32_t phys = addr & 0x1FFFFFFFu; - /* PSX main RAM decode window [0, 0x00800000). Retail RAM folds its - * 2 MiB mirrors onto the BIOS RAM keys (mask 0x1FFFFF, unchanged - * behaviour); the opt-in 8 MB map decodes the window uniquely - * (mask 0x7FFFFF), so a high-bank PC never reaches a BIOS RAM key. */ - if (phys < 0x00800000u) phys &= g_psx_ram_mask; - /* Kernel Part 2: ROM 0x1FC10000+ -> RAM 0x500+ */ - if (phys >= 0x1FC10000u && phys <= 0x1FC17FFFu) - phys = phys - 0x1FC10000u + 0x00000500u; - /* Shell: RAM 0x30000+ -> ROM physical 0x1FC18000+ */ - if (phys >= 0x00030000u && phys <= 0x0005AFFFu) - phys = phys - 0x00030000u + 0x1FC18000u; - return phys; -} - -/* The runtime PC each dispatch key's home body was compiled for - * (docs/SEGMENT_AWARE_CODE.md ยง5.4): its copy window's runtime address, - * or the ROM run in place. 0 = in no window. */ -static uint32_t psx_bios_key_home_pc(uint32_t key) { - /* Kernel Part 2: RAM key 0x500+ runs at 0x00000500+ */ - if (key >= 0x00000500u && key <= 0x000084FFu) - return key - 0x00000500u + 0x00000500u; - /* Shell: ROM key 0x1FC18000+ runs at 0x80030000+ */ - if (key >= 0x1FC18000u && key <= 0x1FC42FFFu) - return key - 0x1FC18000u + 0x80030000u; - /* The ROM, run in place. */ - if (key >= 0x1FC00000u && key <= 0x1FC7FFFFu) - return 0xA0000000u | key; - return 0u; -} - -extern uint64_t s_frame_count; -static PsxRecompFunc psx_bios_hit_body(CPUState* cpu, uint32_t addr, uint32_t key, - PsxRecompFunc home) { - /* A segment variant compiled for this exact PC. */ - for (int lo_ = 0, hi_ = 1 - 1; lo_ <= hi_;) { - const int mid_ = (lo_ + hi_) / 2; - if (segment_variant_table[mid_].addr == addr) - return segment_variant_table[mid_].func; - if (segment_variant_table[mid_].addr < addr) lo_ = mid_ + 1; - else hi_ = mid_ - 1; - } - { - const uint32_t home_pc = psx_bios_key_home_pc(key); - if (home_pc != 0u && ((addr ^ home_pc) & 0xE0000000u) != 0u) - psx_segment_miss_record_kind(addr, home_pc, cpu->gpr[31], cpu->gpr[29], - (uint32_t)s_frame_count, - PSX_SEGMENT_MISS_BIOS); - } - return home; -} - -extern int dirty_ram_dispatch(CPUState* cpu, uint32_t addr, uint32_t stop_addr); -extern int dirty_ram_is_dirty(uint32_t phys); -extern int psx_kernel_bless_dispatchable(uint32_t phys); -extern void fntrace_record(CPUState* cpu, uint32_t target); -extern uint64_t g_dispatch_static_hits; - -extern int g_psx_dispatch_depth; /* runtime-owned: shared dispatch state, not per-image */ - -static void psx_dispatch_check_return_boundary(CPUState* cpu, uint32_t stop_addr) { - if (stop_addr != 0u) { - psx_check_interrupts_at(cpu, stop_addr); - if (cpu->pc == stop_addr) cpu->pc = 0; - } else { - psx_check_interrupts(cpu); - } -} - -static void psx_dispatch_impl(CPUState* cpu, uint32_t addr, uint32_t stop_addr) { - /* Tail-call trampoline: functions signal tail calls by setting - * cpu->pc to the target and returning. We loop here to re-dispatch - * without growing the native stack. Interrupts are only checked when - * the outermost dispatch returns, so a nested callee cannot interrupt - * before its generated caller runs the post-call continuation. */ - int outermost = (g_psx_dispatch_depth++ == 0); - /* Call contract (Bug D family): the guest $sp at the call. A C - * continuation behind this dispatch may only run if the guest - * actually returns here ($ra == stop_addr) with this $sp. */ - uint32_t sp_at_call = cpu->gpr[29]; - for (;;) { - /* Always-on call ring: every iteration counts as a separate - * call (initial entry + each tail-call re-dispatch). a0..a3 - * reflect the args being passed for THIS iteration. */ - fntrace_record(cpu, addr); - cpu->pc = 0; - int lo = 0, hi = 13012 - 1; - int found = 0; - if (g_psx_mod_guest_functions) - found = psx_mod_dispatch_guest_function(cpu, addr); - /* BIOS HLE tier: consult the hook FIRST, on the pre-normalize - * physical address. It must see (a) the A0/B0/C0 service vectors - * (game thunks jr there with the function number in $t1) and (b) - * the shell entry for HLE boot-skip โ€” the latter lies inside the - * game-text/dirty-RAM window, so the check cannot sit after those - * backends. Handled (rc 1) โ‡’ the service completed against guest - * state and the guest resumes at $ra via the trampoline's normal - * return/tail contract below. rc 0 โ‡’ pure LLE fall-through. */ - if (!found && g_psx_bios_hle_hook && - g_psx_bios_hle_hook(cpu, addr & 0x1FFFFFFFu)) { - cpu->pc = cpu->gpr[31]; - found = 1; - } - /* Byte-guarded A0/B0/C0 call-vector tail stubs. */ - if (!found && psx_bios_try_native_call_stub(cpu, addr)) - found = 1; -#ifdef PSX_HAS_GAME_DISPATCH - /* Game EXEs can overlap the BIOS shell copy window at - * physical 0x30000-0x5AFFF. If the target belongs to the - * active game text range, route it through the game/dirty-RAM - * path before normalizing it to shell ROM. */ - uint32_t game_phys = addr & 0x1FFFFFFFu; - /* Class-A shell-window collision fix: post-game-start the BIOS shell - * copy at RAM 0x30000-0x5AFFF is DEAD (overwritten by the game EXE, - * its runtime-loaded overlays, or CD streaming), so normalize()->shell - * ROM for a shell-window address is stale and runs dead shell code - * (func_1FC42090 -> null jalr -> pc=0, the MMX6 boot wedge class A; - * func_1FC38B80 data-as-code self-loop starving the main thread, the - * Tomba2 Whoopee-logo wedge). Once the game has started, route the - * WHOLE shell-overlap window to the game/overlay/dirty-RAM path - * BEFORE normalize() can shadow it to the shell โ€” real hardware - * executes the RAM bytes, whoever loaded them (boot EXE in text, - * runtime overlay above text-end, DMA stream). The old gate also - * required psx_game_address_in_text(), which silently exempted - * OVERLAY code above the boot-EXE text end (Tomba2 text ends - * 0x38800; its post-logo ISR-wait caller lives at 0x50B80) and sent - * it to the stale shell image. A genuine pre-start shell address - * (game not started) still falls through to normalize(). */ - extern int fntrace_is_game_started(void); - extern int dirty_ram_text_native_ok(uint32_t phys); - int game_shell_overlap = fntrace_is_game_started() && - game_phys >= 0x00030000u && game_phys <= 0x0005AFFFu; - /* Shell-window addresses the loaded game EXE image covers with - * matching bytes are GAME code, not the BIOS shell โ€” route them to - * the game path even when the game-start latch (a dispatch to - * entry_pc) never tripped. Fixes titles whose static text fills - * 0x30000-0x5AFFF: Crash Bash reaches its entry 0x2E7B0 via compiled - * internal flow, so `started` never latched and normalize() shadowed - * real text at 0x3358C to dead shell ROM (unknown-dispatch abort). - * The native-ok compare is ground truth: pre-game the RAM holds shell - * bytes (differ from the game image -> not routed here -> shell - * dispatches); post-load it holds the game EXE (matches -> game path). */ - int game_text_in_shell_window = - game_phys >= 0x00030000u && game_phys <= 0x0005AFFFu && - psx_game_address_in_text(addr) && dirty_ram_text_native_ok(game_phys); - if (!found && (game_shell_overlap || game_text_in_shell_window || - (psx_game_address_in_text(addr) && dirty_ram_is_dirty(game_phys)))) { - found = dirty_ram_dispatch(cpu, addr, stop_addr); - } -#endif - uint32_t phys = normalize(addr); - if (!found) { - while (lo <= hi) { - int mid = (lo + hi) / 2; - if (dispatch_table[mid].addr == phys) { - /* Kernel-image bless guard (CLAUDE.md Rule 18). The keys in - * the relocated kernel window [0x500,0x8500) were compiled - * from the ROM source of the BIOS's boot-time kernel copy โ€” - * but the BIOS (and games) PATCH kernel RAM at runtime (pad/ - * SIO installs land inside compiled bodies). A static hit - * here may only run if the live RAM bytes of everything the - * function can execute still byte-match the ROM image - * (memory.c psx_kernel_bless_dispatchable, lazily verified, - * invalidated on writes). Mismatched/unverifiable bodies - * fall through to the faithful dirty-RAM interpreter below. - * Non-kernel keys are unaffected. */ - if (phys - 0x500u < 0x8000u && - !psx_kernel_bless_dispatchable(phys)) - break; /* found stays 0 -> dirty_ram_dispatch */ - g_debug_current_func_addr = phys; - debug_server_trace_dispatch(phys); - psx_bios_hit_body(cpu, addr, phys, dispatch_table[mid].func)(cpu); - g_dispatch_static_hits++; - found = 1; - break; - } else if (dispatch_table[mid].addr < phys) { - lo = mid + 1; - } else { - hi = mid - 1; - } - } - } - /* Static dispatch miss. Self-modifying / install-at-runtime RAM - * (CLAUDE.md Rule 18): the BIOS writes dispatch stubs into kernel - * RAM at runtime. If the target page has been written-to since - * boot, interpret the basic block on cpu state. Falls back to - * psx_unknown_dispatch for genuinely unmapped PCs. */ - if (!found) { - if (dirty_ram_dispatch(cpu, addr, stop_addr)) { - found = 1; - } else { - psx_unknown_dispatch(cpu, addr, phys); - } - } - /* Fix B: if the function just RETURNED via the recompiled exception - * return (jr $k0; rfe) inside the synchronous handler, cpu->pc now holds - * the real resume EPC and the RFE armed the escape โ€” unwind to - * psx_check_interrupts here. A fiber/thread resume (in_exception==0) is a - * no-op, so the real EPC keeps dispatching. */ - psx_rfe_escape_check(cpu); - if (g_psx_call_bail) { - /* A nested generated frame began a bail unwind; cpu->pc - * holds the guest's true target. Resolve here iff the - * wild flow arrived exactly at this call's contract. */ - if (stop_addr != 0 && - cpu->pc == stop_addr && - cpu->gpr[29] == sp_at_call) { - g_psx_call_bail = 0; - g_psx_bail_resolved++; - cpu->pc = 0; - --g_psx_dispatch_depth; - if (outermost) { - psx_dispatch_check_return_boundary(cpu, stop_addr); - } - return; - } - if (!outermost) { - --g_psx_dispatch_depth; - return; /* propagate to the enclosing call site */ - } - /* Outermost: flatten โ€” host stack above is clean, keep - * executing the wild flow as a tail dispatch. */ - g_psx_call_bail = 0; - g_psx_bail_flattened++; - addr = cpu->pc; - continue; - } - if (cpu->pc == 0) { - if (stop_addr != 0 && - (cpu->gpr[29] != sp_at_call || - cpu->gpr[31] != stop_addr)) { - /* Callee C-returned but the guest did not return to - * this call site ($ra holds the wild jr's target): - * begin the bail unwind instead of resuming the - * suspended C continuation. */ - g_psx_call_bail = 1; - g_psx_bail_first++; - cpu->pc = cpu->gpr[31]; - if (outermost) { - g_psx_call_bail = 0; - g_psx_bail_flattened++; - addr = cpu->pc; - continue; - } - --g_psx_dispatch_depth; - return; - } - --g_psx_dispatch_depth; - if (outermost) { - psx_dispatch_check_return_boundary(cpu, stop_addr); - } - return; - } - if (stop_addr != 0 && cpu->pc == stop_addr) { - /* An IRQ taken at a polled call's return boundary swaps sp - * to/from the kernel exception/scratchpad stack, so a - * LEGITIMATE return ($ra == stop_addr) can arrive with sp - * differing from sp_at_call in EITHER direction (born on the - * task stack / returning on the exception stack, and vice - * versa). The strict gate misread that as recursion and - * re-dispatched the same delivery forever until the depth - * guard tripped (MoH, MoH Underground, Driver 2 mission - * freezes). Recognize the straddle ONLY when $ra matches and - * exactly one side is on the exception stack; recursion - * (different $ra) and same-stack wild arrivals keep the - * strict gate (Tomba Bug D unaffected). */ - uint32_t sp0_ = sp_at_call, sp1_ = cpu->gpr[29]; - int sp0_exc_ = ((uint32_t)(sp0_ - 0x1F800000u) < 0x400u); - int sp1_exc_ = ((uint32_t)(sp1_ - 0x1F800000u) < 0x400u); - int exc_sp_straddle_ = - (cpu->gpr[31] == stop_addr) && - (sp0_exc_ != sp1_exc_); - if (cpu->gpr[29] != sp_at_call && !exc_sp_straddle_) { - /* Same address, different frame (recursion or a wild - * arrival): not this call's return โ€” keep executing - * via tail dispatch (interior alias route). */ - addr = cpu->pc; - continue; - } - cpu->pc = 0; - --g_psx_dispatch_depth; - if (outermost) { - psx_dispatch_check_return_boundary(cpu, stop_addr); - } - return; - } - addr = cpu->pc; /* tail call: re-dispatch */ - } -} - -void psx_dispatch(CPUState* cpu, uint32_t addr) { - psx_dispatch_impl(cpu, addr, 0); -} - -void psx_dispatch_call(CPUState* cpu, uint32_t addr, uint32_t return_addr) { - psx_dispatch_impl(cpu, addr, return_addr); -} - -/* CPS runtime-mode marker (the overlay loader reads g_psx_cps_mode). */ -/* Not in a loadable BIOS module (psx_bios_module.h): the host that - * loads one already runs in CPS mode, and a constructor firing at - * dlopen would write a runtime global the module cannot reach. */ -#ifndef PSX_BIOS_MODULE_BUILD -static void psx_cps_mark_bios(void) { - extern int g_psx_cps_mode; g_psx_cps_mode = 1; -} -#if defined(_MSC_VER) -#pragma section(".CRT$XCU", read) -__declspec(allocate(".CRT$XCU")) static void (*psx_cps_mark_bios_ctor)(void) = psx_cps_mark_bios; -#else -__attribute__((constructor)) static void psx_cps_mark_bios_ctor(void) { psx_cps_mark_bios(); } -#endif -#endif /* !PSX_BIOS_MODULE_BUILD */ - -/* Backend descriptor: the one exported symbol of this image. */ -const PsxBiosBackend SCPH1001_psx_bios_backend = { - &SCPH1001_psx_bios_image, - SCPH1001_psx_dispatch, - SCPH1001_psx_dispatch_call, - SCPH1001_psx_bios_kernel_bodies, - SCPH1001_psx_bios_kernel_body_count, - SCPH1001_psx_bios_kernel_patch_ranges, - SCPH1001_psx_bios_kernel_patch_range_count, -}; diff --git a/generated/SCPH1001_full.c b/generated/SCPH1001_full.c deleted file mode 100644 index 99c805f2..00000000 --- a/generated/SCPH1001_full.c +++ /dev/null @@ -1,921419 +0,0 @@ -/* AUTO-GENERATED by psxrecomp-bios --emit-full. DO NOT EDIT. - * - * BIOS SHA256: 71af94d1e47a68c11e8fdb9f8368040601514a42a5a399cda48c7d3bff1e99d3 - * Functions: 1311 - */ - -#define psx_dispatch SCPH1001_psx_dispatch -#define psx_dispatch_call SCPH1001_psx_dispatch_call - -#include "cpu_state.h" - -extern void psx_dispatch(CPUState* cpu, uint32_t addr); -extern void psx_unknown_dispatch(CPUState* cpu, uint32_t addr, uint32_t phys); -extern void psx_check_interrupts(CPUState* cpu); -extern void psx_check_interrupts_at(CPUState* cpu, uint32_t resume_pc); -extern void psx_restore_state_escape(void); -extern void gte_execute(CPUState* cpu, uint32_t cmd); -extern void gte_write_data(CPUState* cpu, uint8_t reg, uint32_t val); -extern uint32_t gte_read_data(CPUState* cpu, uint8_t reg); -extern void debug_server_log_probe(uint32_t pc, CPUState *cpu); -#ifdef PSX_COSIM -extern void cosim_block(uint32_t block_leader_phys); -extern void cosim_instr(uint32_t pc); -#endif -#ifndef PSX_NO_DEBUG_TOOLS -extern void debug_server_log_call_entry(uint32_t func_addr); -extern void debug_server_cyc_observe(uint32_t block_leader_phys); -#endif -extern uint32_t g_debug_last_store_pc; -/* Phase 1.0e-d: per-block guest cycle accounting. - * Compile generated code with -DPSX_ENABLE_BLOCK_CYCLES=1 to - * activate cycle advancement at every block leader. */ -#ifdef PSX_ENABLE_BLOCK_CYCLES -extern void psx_advance_cycles(uint32_t cycles); -#endif - -void SCPH1001_func_1FC00000(CPUState* cpu); -void SCPH1001_func_1FC00180(CPUState* cpu); -void SCPH1001_func_1FC00420(CPUState* cpu); -void SCPH1001_func_1FC00678(CPUState* cpu); -void SCPH1001_func_1FC006A8(CPUState* cpu); -void SCPH1001_func_1FC006D8(CPUState* cpu); -void SCPH1001_func_1FC00778(CPUState* cpu); -void SCPH1001_func_1FC00810(CPUState* cpu); -void SCPH1001_func_1FC008A0(CPUState* cpu); -void SCPH1001_func_1FC00944(CPUState* cpu); -void SCPH1001_func_1FC00B7C(CPUState* cpu); -void SCPH1001_func_1FC00DA0(CPUState* cpu); -void SCPH1001_func_1FC018E0(CPUState* cpu); -void SCPH1001_func_1FC01920(CPUState* cpu); -void SCPH1001_func_1FC0193C(CPUState* cpu); -void SCPH1001_func_1FC01A60(CPUState* cpu); -void SCPH1001_func_1FC01A90(CPUState* cpu); -void SCPH1001_func_1FC01ACC(CPUState* cpu); -void SCPH1001_func_1FC01B08(CPUState* cpu); -void SCPH1001_func_1FC01B80(CPUState* cpu); -void SCPH1001_func_1FC01C8C(CPUState* cpu); -void SCPH1001_func_1FC01E24(CPUState* cpu); -void SCPH1001_func_1FC01E5C(CPUState* cpu); -void SCPH1001_func_1FC020F0(CPUState* cpu); -void SCPH1001_func_1FC02104(CPUState* cpu); -void SCPH1001_func_1FC021A0(CPUState* cpu); -void SCPH1001_func_1FC02200(CPUState* cpu); -void SCPH1001_func_1FC02230(CPUState* cpu); -void SCPH1001_func_1FC02240(CPUState* cpu); -void SCPH1001_func_1FC0227C(CPUState* cpu); -void SCPH1001_func_1FC022C0(CPUState* cpu); -void SCPH1001_func_1FC02324(CPUState* cpu); -void SCPH1001_func_1FC02590(CPUState* cpu); -void SCPH1001_func_1FC025B0(CPUState* cpu); -void SCPH1001_func_1FC02738(CPUState* cpu); -void SCPH1001_func_1FC02918(CPUState* cpu); -void SCPH1001_func_1FC02934(CPUState* cpu); -void SCPH1001_func_1FC02950(CPUState* cpu); -void SCPH1001_func_1FC02AF0(CPUState* cpu); -void SCPH1001_func_1FC02B10(CPUState* cpu); -void SCPH1001_func_1FC02B50(CPUState* cpu); -void SCPH1001_func_1FC02B8C(CPUState* cpu); -void SCPH1001_func_1FC02BC8(CPUState* cpu); -void SCPH1001_func_1FC02C50(CPUState* cpu); -void SCPH1001_func_1FC02CC0(CPUState* cpu); -void SCPH1001_func_1FC02D20(CPUState* cpu); -void SCPH1001_func_1FC02DAC(CPUState* cpu); -void SCPH1001_func_1FC02EA0(CPUState* cpu); -void SCPH1001_func_1FC02EDC(CPUState* cpu); -void SCPH1001_func_1FC02F20(CPUState* cpu); -void SCPH1001_func_1FC03098(CPUState* cpu); -void SCPH1001_func_1FC03104(CPUState* cpu); -void SCPH1001_func_1FC03190(CPUState* cpu); -void SCPH1001_func_1FC03200(CPUState* cpu); -void SCPH1001_func_1FC03288(CPUState* cpu); -void SCPH1001_func_1FC03310(CPUState* cpu); -void SCPH1001_func_1FC033C8(CPUState* cpu); -void SCPH1001_func_1FC03418(CPUState* cpu); -void SCPH1001_func_1FC03494(CPUState* cpu); -void SCPH1001_func_1FC034D0(CPUState* cpu); -void SCPH1001_func_1FC03514(CPUState* cpu); -void SCPH1001_func_1FC0357C(CPUState* cpu); -void SCPH1001_func_1FC035C0(CPUState* cpu); -void SCPH1001_func_1FC03628(CPUState* cpu); -void SCPH1001_func_1FC03694(CPUState* cpu); -void SCPH1001_func_1FC036FC(CPUState* cpu); -void SCPH1001_func_1FC03764(CPUState* cpu); -void SCPH1001_func_1FC03894(CPUState* cpu); -void SCPH1001_func_1FC03910(CPUState* cpu); -void SCPH1001_func_1FC03968(CPUState* cpu); -void SCPH1001_func_1FC03978(CPUState* cpu); -void SCPH1001_func_1FC03990(CPUState* cpu); -void SCPH1001_func_1FC039B0(CPUState* cpu); -void SCPH1001_func_1FC03A18(CPUState* cpu); -void SCPH1001_func_1FC03AA4(CPUState* cpu); -void SCPH1001_func_1FC03C90(CPUState* cpu); -void SCPH1001_func_1FC03CF0(CPUState* cpu); -void SCPH1001_func_1FC03D80(CPUState* cpu); -void SCPH1001_func_1FC03EA0(CPUState* cpu); -void SCPH1001_func_1FC03F8C(CPUState* cpu); -void SCPH1001_func_1FC03FAC(CPUState* cpu); -void SCPH1001_func_1FC03FC0(CPUState* cpu); -void SCPH1001_func_1FC03FE0(CPUState* cpu); -void SCPH1001_func_1FC0403C(CPUState* cpu); -void SCPH1001_func_1FC040EC(CPUState* cpu); -void SCPH1001_func_1FC04120(CPUState* cpu); -void SCPH1001_func_1FC04138(CPUState* cpu); -void SCPH1001_func_1FC04260(CPUState* cpu); -void SCPH1001_func_1FC042A0(CPUState* cpu); -void SCPH1001_func_1FC042D0(CPUState* cpu); -void SCPH1001_func_1FC04610(CPUState* cpu); -void SCPH1001_func_1FC04678(CPUState* cpu); -void SCPH1001_func_1FC0472C(CPUState* cpu); -void SCPH1001_func_1FC04850(CPUState* cpu); -void SCPH1001_func_1FC048D0(CPUState* cpu); -void SCPH1001_func_1FC04910(CPUState* cpu); -void SCPH1001_func_1FC04AA0(CPUState* cpu); -void SCPH1001_func_1FC04ABC(CPUState* cpu); -void SCPH1001_func_1FC04BC4(CPUState* cpu); -void SCPH1001_func_1FC04C38(CPUState* cpu); -void SCPH1001_func_1FC04D50(CPUState* cpu); -void SCPH1001_func_1FC04DEC(CPUState* cpu); -void SCPH1001_func_1FC04FBC(CPUState* cpu); -void SCPH1001_func_1FC0506C(CPUState* cpu); -void SCPH1001_func_1FC050A4(CPUState* cpu); -void SCPH1001_func_1FC050DC(CPUState* cpu); -void SCPH1001_func_1FC050FC(CPUState* cpu); -void SCPH1001_func_1FC05120(CPUState* cpu); -void SCPH1001_func_1FC05194(CPUState* cpu); -void SCPH1001_func_1FC05558(CPUState* cpu); -void SCPH1001_func_1FC057B0(CPUState* cpu); -void SCPH1001_func_1FC0593C(CPUState* cpu); -void SCPH1001_func_1FC05A44(CPUState* cpu); -void SCPH1001_func_1FC05C18(CPUState* cpu); -void SCPH1001_func_1FC05C50(CPUState* cpu); -void SCPH1001_func_1FC05D04(CPUState* cpu); -void SCPH1001_func_1FC05DB0(CPUState* cpu); -void SCPH1001_func_1FC05DF4(CPUState* cpu); -void SCPH1001_func_1FC05E58(CPUState* cpu); -void SCPH1001_func_1FC05F08(CPUState* cpu); -void SCPH1001_func_1FC06010(CPUState* cpu); -void SCPH1001_func_1FC06038(CPUState* cpu); -void SCPH1001_func_1FC060DC(CPUState* cpu); -void SCPH1001_func_1FC0615C(CPUState* cpu); -void SCPH1001_func_1FC061A0(CPUState* cpu); -void SCPH1001_func_1FC061D4(CPUState* cpu); -void SCPH1001_func_1FC06218(CPUState* cpu); -void SCPH1001_func_1FC06288(CPUState* cpu); -void SCPH1001_func_1FC062CC(CPUState* cpu); -void SCPH1001_func_1FC063CC(CPUState* cpu); -void SCPH1001_func_1FC064D8(CPUState* cpu); -void SCPH1001_func_1FC06548(CPUState* cpu); -void SCPH1001_func_1FC065C0(CPUState* cpu); -void SCPH1001_func_1FC0661C(CPUState* cpu); -void SCPH1001_func_1FC06680(CPUState* cpu); -void SCPH1001_func_1FC06700(CPUState* cpu); -void SCPH1001_func_1FC06728(CPUState* cpu); -void SCPH1001_func_1FC06750(CPUState* cpu); -void SCPH1001_func_1FC06784(CPUState* cpu); -void SCPH1001_func_1FC067E8(CPUState* cpu); -void SCPH1001_func_1FC06CA4(CPUState* cpu); -void SCPH1001_func_1FC06EC4(CPUState* cpu); -void SCPH1001_func_1FC06F28(CPUState* cpu); -void SCPH1001_func_1FC06FA4(CPUState* cpu); -void SCPH1001_func_1FC06FDC(CPUState* cpu); -void SCPH1001_func_1FC06FF0(CPUState* cpu); -void SCPH1001_func_1FC0703C(CPUState* cpu); -void SCPH1001_func_1FC070AC(CPUState* cpu); -void SCPH1001_func_1FC0711C(CPUState* cpu); -void SCPH1001_func_1FC07148(CPUState* cpu); -void SCPH1001_func_1FC071A0(CPUState* cpu); -void SCPH1001_func_1FC072B8(CPUState* cpu); -void SCPH1001_func_1FC07330(CPUState* cpu); -void SCPH1001_func_1FC07370(CPUState* cpu); -void SCPH1001_func_1FC073A0(CPUState* cpu); -void SCPH1001_func_1FC07410(CPUState* cpu); -void SCPH1001_func_1FC07664(CPUState* cpu); -void SCPH1001_func_1FC07700(CPUState* cpu); -void SCPH1001_func_1FC078A4(CPUState* cpu); -void SCPH1001_func_1FC079F8(CPUState* cpu); -void SCPH1001_func_1FC07A04(CPUState* cpu); -void SCPH1001_func_1FC07B88(CPUState* cpu); -void SCPH1001_func_1FC07C1C(CPUState* cpu); -void SCPH1001_func_1FC07F28(CPUState* cpu); -void SCPH1001_func_1FC08020(CPUState* cpu); -void SCPH1001_func_1FC08098(CPUState* cpu); -void SCPH1001_func_1FC081FC(CPUState* cpu); -void SCPH1001_func_1FC08354(CPUState* cpu); -void SCPH1001_func_1FC083CC(CPUState* cpu); -void SCPH1001_func_1FC085B0(CPUState* cpu); -void SCPH1001_func_1FC085D4(CPUState* cpu); -void SCPH1001_func_1FC086B0(CPUState* cpu); -void SCPH1001_func_1FC086EC(CPUState* cpu); -void SCPH1001_func_1FC08720(CPUState* cpu); -void SCPH1001_func_1FC087C4(CPUState* cpu); -void SCPH1001_func_1FC0884C(CPUState* cpu); -void SCPH1001_func_1FC088A0(CPUState* cpu); -void SCPH1001_func_1FC0895C(CPUState* cpu); -void SCPH1001_func_1FC089C0(CPUState* cpu); -void SCPH1001_func_1FC08B3C(CPUState* cpu); -void SCPH1001_func_1FC08FFC(CPUState* cpu); -void SCPH1001_func_1FC09144(CPUState* cpu); -void SCPH1001_func_1FC091CC(CPUState* cpu); -void SCPH1001_func_1FC092EC(CPUState* cpu); -void SCPH1001_func_1FC09540(CPUState* cpu); -void SCPH1001_func_1FC09598(CPUState* cpu); -void SCPH1001_func_1FC09720(CPUState* cpu); -void SCPH1001_func_1FC09890(CPUState* cpu); -void SCPH1001_func_1FC0989C(CPUState* cpu); -void SCPH1001_func_1FC098A8(CPUState* cpu); -void SCPH1001_func_1FC09914(CPUState* cpu); -void SCPH1001_func_1FC0994C(CPUState* cpu); -void SCPH1001_func_1FC0996C(CPUState* cpu); -void SCPH1001_func_1FC09CDC(CPUState* cpu); -void SCPH1001_func_1FC09D3C(CPUState* cpu); -void SCPH1001_func_1FC0A080(CPUState* cpu); -void SCPH1001_func_1FC0A3D4(CPUState* cpu); -void SCPH1001_func_1FC0A43C(CPUState* cpu); -void SCPH1001_func_1FC0A4B4(CPUState* cpu); -void SCPH1001_func_1FC0A5E4(CPUState* cpu); -void SCPH1001_func_1FC0A754(CPUState* cpu); -void SCPH1001_func_1FC0A8BC(CPUState* cpu); -void SCPH1001_func_1FC0AB60(CPUState* cpu); -void SCPH1001_func_1FC0AD08(CPUState* cpu); -void SCPH1001_func_1FC0B0C4(CPUState* cpu); -void SCPH1001_func_1FC0B0D0(CPUState* cpu); -void SCPH1001_func_1FC0B170(CPUState* cpu); -void SCPH1001_func_1FC0B394(CPUState* cpu); -void SCPH1001_func_1FC0B54C(CPUState* cpu); -void SCPH1001_func_1FC0B5A0(CPUState* cpu); -void SCPH1001_func_1FC0B5F4(CPUState* cpu); -void SCPH1001_func_1FC0B648(CPUState* cpu); -void SCPH1001_func_1FC0BA8C(CPUState* cpu); -void SCPH1001_func_1FC0BFF0(CPUState* cpu); -void SCPH1001_func_1FC0C048(CPUState* cpu); -void SCPH1001_func_1FC0C0DC(CPUState* cpu); -void SCPH1001_func_1FC0C140(CPUState* cpu); -void SCPH1001_func_1FC0C1DC(CPUState* cpu); -void SCPH1001_func_1FC0C1FC(CPUState* cpu); -void SCPH1001_func_1FC0C220(CPUState* cpu); -void SCPH1001_func_1FC0C248(CPUState* cpu); -void SCPH1001_func_1FC0C270(CPUState* cpu); -void SCPH1001_func_1FC0C298(CPUState* cpu); -void SCPH1001_func_1FC0C2C0(CPUState* cpu); -void SCPH1001_func_1FC0C2E8(CPUState* cpu); -void SCPH1001_func_1FC0C318(CPUState* cpu); -void SCPH1001_func_1FC0C354(CPUState* cpu); -void SCPH1001_func_1FC0C580(CPUState* cpu); -void SCPH1001_func_1FC0C720(CPUState* cpu); -void SCPH1001_func_1FC0C830(CPUState* cpu); -void SCPH1001_func_1FC0C890(CPUState* cpu); -void SCPH1001_func_1FC0C9CC(CPUState* cpu); -void SCPH1001_func_1FC0CAB4(CPUState* cpu); -void SCPH1001_func_1FC0CC68(CPUState* cpu); -void SCPH1001_func_1FC0CD80(CPUState* cpu); -void SCPH1001_func_1FC0CF84(CPUState* cpu); -void SCPH1001_func_1FC0D0CC(CPUState* cpu); -void SCPH1001_func_1FC0D11C(CPUState* cpu); -void SCPH1001_func_1FC0D34C(CPUState* cpu); -void SCPH1001_func_1FC0D4CC(CPUState* cpu); -void SCPH1001_func_1FC0D4F0(CPUState* cpu); -void SCPH1001_func_1FC0D570(CPUState* cpu); -void SCPH1001_func_1FC0D600(CPUState* cpu); -void SCPH1001_func_1FC0D640(CPUState* cpu); -void SCPH1001_func_1FC0D664(CPUState* cpu); -void SCPH1001_func_1FC0D688(CPUState* cpu); -void SCPH1001_func_1FC0D72C(CPUState* cpu); -void SCPH1001_func_1FC0D7BC(CPUState* cpu); -void SCPH1001_func_1FC0D850(CPUState* cpu); -void SCPH1001_func_1FC0D880(CPUState* cpu); -void SCPH1001_func_1FC0D890(CPUState* cpu); -void SCPH1001_func_1FC0D8A0(CPUState* cpu); -void SCPH1001_func_1FC0D8B0(CPUState* cpu); -void SCPH1001_func_1FC0D8C0(CPUState* cpu); -void SCPH1001_func_1FC0D8D0(CPUState* cpu); -void SCPH1001_func_1FC0D8E0(CPUState* cpu); -void SCPH1001_func_1FC0D8F0(CPUState* cpu); -void SCPH1001_func_1FC0D900(CPUState* cpu); -void SCPH1001_func_1FC0D910(CPUState* cpu); -void SCPH1001_func_1FC0D920(CPUState* cpu); -void SCPH1001_func_1FC0D930(CPUState* cpu); -void SCPH1001_func_1FC0D940(CPUState* cpu); -void SCPH1001_func_1FC0D950(CPUState* cpu); -void SCPH1001_func_1FC0D960(CPUState* cpu); -void SCPH1001_func_1FC0D970(CPUState* cpu); -void SCPH1001_func_1FC0D980(CPUState* cpu); -void SCPH1001_func_1FC0D990(CPUState* cpu); -void SCPH1001_func_1FC0D9A0(CPUState* cpu); -void SCPH1001_func_1FC0D9B0(CPUState* cpu); -void SCPH1001_func_1FC0D9C0(CPUState* cpu); -void SCPH1001_func_1FC0D9D0(CPUState* cpu); -void SCPH1001_func_1FC0D9E0(CPUState* cpu); -void SCPH1001_func_1FC0D9F0(CPUState* cpu); -void SCPH1001_func_1FC0DA00(CPUState* cpu); -void SCPH1001_func_1FC0DA10(CPUState* cpu); -void SCPH1001_func_1FC0DA20(CPUState* cpu); -void SCPH1001_func_1FC0DA30(CPUState* cpu); -void SCPH1001_func_1FC0DA40(CPUState* cpu); -void SCPH1001_func_1FC0DA50(CPUState* cpu); -void SCPH1001_func_1FC0DA60(CPUState* cpu); -void SCPH1001_func_1FC0DA70(CPUState* cpu); -void SCPH1001_func_1FC0DA80(CPUState* cpu); -void SCPH1001_func_1FC0DA90(CPUState* cpu); -void SCPH1001_func_1FC0DAA0(CPUState* cpu); -void SCPH1001_func_1FC0DAB0(CPUState* cpu); -void SCPH1001_func_1FC0DAC0(CPUState* cpu); -void SCPH1001_func_1FC0DAD0(CPUState* cpu); -void SCPH1001_func_1FC0DAE0(CPUState* cpu); -void SCPH1001_func_1FC0DAF0(CPUState* cpu); -void SCPH1001_func_1FC0DB00(CPUState* cpu); -void SCPH1001_func_1FC0DB10(CPUState* cpu); -void SCPH1001_func_1FC0DB20(CPUState* cpu); -void SCPH1001_func_1FC0DB30(CPUState* cpu); -void SCPH1001_func_1FC0DB40(CPUState* cpu); -void SCPH1001_func_1FC0DB50(CPUState* cpu); -void SCPH1001_func_1FC0DB60(CPUState* cpu); -void SCPH1001_func_1FC0DB70(CPUState* cpu); -void SCPH1001_func_1FC0DB80(CPUState* cpu); -void SCPH1001_func_1FC0DB90(CPUState* cpu); -void SCPH1001_func_1FC0DBA0(CPUState* cpu); -void SCPH1001_func_1FC0DBB0(CPUState* cpu); -void SCPH1001_func_1FC0DBC0(CPUState* cpu); -void SCPH1001_func_1FC0DBD0(CPUState* cpu); -void SCPH1001_func_1FC0DBE0(CPUState* cpu); -void SCPH1001_func_1FC0DBF0(CPUState* cpu); -void SCPH1001_func_1FC0DC00(CPUState* cpu); -void SCPH1001_func_1FC0DC10(CPUState* cpu); -void SCPH1001_func_1FC0DC20(CPUState* cpu); -void SCPH1001_func_1FC0DC30(CPUState* cpu); -void SCPH1001_func_1FC0DC40(CPUState* cpu); -void SCPH1001_func_1FC0DC50(CPUState* cpu); -void SCPH1001_func_00000500(CPUState* cpu); -void SCPH1001_func_00000510(CPUState* cpu); -void SCPH1001_func_00000520(CPUState* cpu); -void SCPH1001_func_00000530(CPUState* cpu); -void SCPH1001_func_00000540(CPUState* cpu); -void SCPH1001_func_00000598(CPUState* cpu); -void SCPH1001_func_000005C4(CPUState* cpu); -void SCPH1001_func_000005E0(CPUState* cpu); -void SCPH1001_func_00000600(CPUState* cpu); -void SCPH1001_func_00000620(CPUState* cpu); -void SCPH1001_func_00000630(CPUState* cpu); -void SCPH1001_func_00000640(CPUState* cpu); -void SCPH1001_func_00000650(CPUState* cpu); -void SCPH1001_func_0000065C(CPUState* cpu); -void SCPH1001_func_00000668(CPUState* cpu); -void SCPH1001_func_00000674(CPUState* cpu); -void SCPH1001_func_00000C80(CPUState* cpu); -void SCPH1001_func_00000EA0(CPUState* cpu); -void SCPH1001_func_00000EB0(CPUState* cpu); -void SCPH1001_func_00000F20(CPUState* cpu); -void SCPH1001_func_00000F2C(CPUState* cpu); -void SCPH1001_func_00000F40(CPUState* cpu); -void SCPH1001_func_00001030(CPUState* cpu); -void SCPH1001_func_000010B8(CPUState* cpu); -void SCPH1001_func_000010E0(CPUState* cpu); -void SCPH1001_func_000010E4(CPUState* cpu); -void SCPH1001_func_0000113C(CPUState* cpu); -void SCPH1001_func_00001174(CPUState* cpu); -void SCPH1001_func_00001408(CPUState* cpu); -void SCPH1001_func_00001420(CPUState* cpu); -void SCPH1001_func_00001444(CPUState* cpu); -void SCPH1001_func_00001508(CPUState* cpu); -void SCPH1001_func_000015D8(CPUState* cpu); -void SCPH1001_func_000015F8(CPUState* cpu); -void SCPH1001_func_00001614(CPUState* cpu); -void SCPH1001_func_000016AC(CPUState* cpu); -void SCPH1001_func_000016C4(CPUState* cpu); -void SCPH1001_func_000016E4(CPUState* cpu); -void SCPH1001_func_0000171C(CPUState* cpu); -void SCPH1001_func_00001728(CPUState* cpu); -void SCPH1001_func_0000175C(CPUState* cpu); -void SCPH1001_func_00001774(CPUState* cpu); -void SCPH1001_func_00001794(CPUState* cpu); -void SCPH1001_func_000017F4(CPUState* cpu); -void SCPH1001_func_00001858(CPUState* cpu); -void SCPH1001_func_000018BC(CPUState* cpu); -void SCPH1001_func_00001920(CPUState* cpu); -void SCPH1001_func_00001958(CPUState* cpu); -void SCPH1001_func_00001990(CPUState* cpu); -void SCPH1001_func_000019C8(CPUState* cpu); -void SCPH1001_func_00001A00(CPUState* cpu); -void SCPH1001_func_00001A24(CPUState* cpu); -void SCPH1001_func_00001A2C(CPUState* cpu); -void SCPH1001_func_00001A60(CPUState* cpu); -void SCPH1001_func_00001AE8(CPUState* cpu); -void SCPH1001_func_00001AFC(CPUState* cpu); -void SCPH1001_func_00001B10(CPUState* cpu); -void SCPH1001_func_00001B20(CPUState* cpu); -void SCPH1001_func_00001B44(CPUState* cpu); -void SCPH1001_func_00001C5C(CPUState* cpu); -void SCPH1001_func_00001D00(CPUState* cpu); -void SCPH1001_func_00001D40(CPUState* cpu); -void SCPH1001_func_00001D70(CPUState* cpu); -void SCPH1001_func_00001D8C(CPUState* cpu); -void SCPH1001_func_00001E1C(CPUState* cpu); -void SCPH1001_func_00001E44(CPUState* cpu); -void SCPH1001_func_00001E80(CPUState* cpu); -void SCPH1001_func_00001E98(CPUState* cpu); -void SCPH1001_func_00001EC8(CPUState* cpu); -void SCPH1001_func_00001F04(CPUState* cpu); -void SCPH1001_func_00001F10(CPUState* cpu); -void SCPH1001_func_00001F4C(CPUState* cpu); -void SCPH1001_func_00001F88(CPUState* cpu); -void SCPH1001_func_00001FFC(CPUState* cpu); -void SCPH1001_func_00002018(CPUState* cpu); -void SCPH1001_func_000020A8(CPUState* cpu); -void SCPH1001_func_000020D4(CPUState* cpu); -void SCPH1001_func_00002114(CPUState* cpu); -void SCPH1001_func_00002124(CPUState* cpu); -void SCPH1001_func_00002150(CPUState* cpu); -void SCPH1001_func_00002168(CPUState* cpu); -void SCPH1001_func_0000218C(CPUState* cpu); -void SCPH1001_func_00002458(CPUState* cpu); -void SCPH1001_func_00002724(CPUState* cpu); -void SCPH1001_func_0000278C(CPUState* cpu); -void SCPH1001_func_000027A0(CPUState* cpu); -void SCPH1001_func_000027C0(CPUState* cpu); -void SCPH1001_func_00002870(CPUState* cpu); -void SCPH1001_func_00002908(CPUState* cpu); -void SCPH1001_func_00002958(CPUState* cpu); -void SCPH1001_func_00002A64(CPUState* cpu); -void SCPH1001_func_00002B28(CPUState* cpu); -void SCPH1001_func_00002C94(CPUState* cpu); -void SCPH1001_func_00002E00(CPUState* cpu); -void SCPH1001_func_00002E98(CPUState* cpu); -void SCPH1001_func_00002EEC(CPUState* cpu); -void SCPH1001_func_00002EFC(CPUState* cpu); -void SCPH1001_func_00002FC8(CPUState* cpu); -void SCPH1001_func_00003000(CPUState* cpu); -void SCPH1001_func_00003060(CPUState* cpu); -void SCPH1001_func_000030C8(CPUState* cpu); -void SCPH1001_func_000030E0(CPUState* cpu); -void SCPH1001_func_000030E4(CPUState* cpu); -void SCPH1001_func_00003108(CPUState* cpu); -void SCPH1001_func_000031E8(CPUState* cpu); -void SCPH1001_func_000033A4(CPUState* cpu); -void SCPH1001_func_0000346C(CPUState* cpu); -void SCPH1001_func_000034B4(CPUState* cpu); -void SCPH1001_func_0000352C(CPUState* cpu); -void SCPH1001_func_00003570(CPUState* cpu); -void SCPH1001_func_000035A4(CPUState* cpu); -void SCPH1001_func_000035AC(CPUState* cpu); -void SCPH1001_func_00003678(CPUState* cpu); -void SCPH1001_func_00003744(CPUState* cpu); -void SCPH1001_func_00003810(CPUState* cpu); -void SCPH1001_func_000038D8(CPUState* cpu); -void SCPH1001_func_000039A4(CPUState* cpu); -void SCPH1001_func_00003A70(CPUState* cpu); -void SCPH1001_func_00003AAC(CPUState* cpu); -void SCPH1001_func_00003C2C(CPUState* cpu); -void SCPH1001_func_00003C6C(CPUState* cpu); -void SCPH1001_func_00003CB4(CPUState* cpu); -void SCPH1001_func_00003CBC(CPUState* cpu); -void SCPH1001_func_00003CD0(CPUState* cpu); -void SCPH1001_func_00003CE0(CPUState* cpu); -void SCPH1001_func_00003DAC(CPUState* cpu); -void SCPH1001_func_00003E5C(CPUState* cpu); -void SCPH1001_func_00003E68(CPUState* cpu); -void SCPH1001_func_00003E80(CPUState* cpu); -void SCPH1001_func_00003F04(CPUState* cpu); -void SCPH1001_func_00003FF0(CPUState* cpu); -void SCPH1001_func_00004024(CPUState* cpu); -void SCPH1001_func_0000406C(CPUState* cpu); -void SCPH1001_func_00004134(CPUState* cpu); -void SCPH1001_func_00004164(CPUState* cpu); -void SCPH1001_func_00004304(CPUState* cpu); -void SCPH1001_func_00004360(CPUState* cpu); -void SCPH1001_func_000043D0(CPUState* cpu); -void SCPH1001_func_000043E8(CPUState* cpu); -void SCPH1001_func_0000445C(CPUState* cpu); -void SCPH1001_func_00004498(CPUState* cpu); -void SCPH1001_func_000049BC(CPUState* cpu); -void SCPH1001_func_00004A4C(CPUState* cpu); -void SCPH1001_func_00004A88(CPUState* cpu); -void SCPH1001_func_00004A94(CPUState* cpu); -void SCPH1001_func_00004AC8(CPUState* cpu); -void SCPH1001_func_00004B70(CPUState* cpu); -void SCPH1001_func_00004B90(CPUState* cpu); -void SCPH1001_func_00004C10(CPUState* cpu); -void SCPH1001_func_00004C54(CPUState* cpu); -void SCPH1001_func_00004C64(CPUState* cpu); -void SCPH1001_func_00004C70(CPUState* cpu); -void SCPH1001_func_00004CF4(CPUState* cpu); -void SCPH1001_func_00004D3C(CPUState* cpu); -void SCPH1001_func_00004D4C(CPUState* cpu); -void SCPH1001_func_00004D64(CPUState* cpu); -void SCPH1001_func_00004D6C(CPUState* cpu); -void SCPH1001_func_00004F54(CPUState* cpu); -void SCPH1001_func_00004F90(CPUState* cpu); -void SCPH1001_func_00005000(CPUState* cpu); -void SCPH1001_func_000051F4(CPUState* cpu); -void SCPH1001_func_00005688(CPUState* cpu); -void SCPH1001_func_000056E8(CPUState* cpu); -void SCPH1001_func_00005768(CPUState* cpu); -void SCPH1001_func_0000579C(CPUState* cpu); -void SCPH1001_func_00005834(CPUState* cpu); -void SCPH1001_func_00005870(CPUState* cpu); -void SCPH1001_func_000058B4(CPUState* cpu); -void SCPH1001_func_000058E8(CPUState* cpu); -void SCPH1001_func_00005918(CPUState* cpu); -void SCPH1001_func_00005954(CPUState* cpu); -void SCPH1001_func_00005990(CPUState* cpu); -void SCPH1001_func_000059CC(CPUState* cpu); -void SCPH1001_func_00005A00(CPUState* cpu); -void SCPH1001_func_00005A08(CPUState* cpu); -void SCPH1001_func_00005A44(CPUState* cpu); -void SCPH1001_func_00005A58(CPUState* cpu); -void SCPH1001_func_00005A80(CPUState* cpu); -void SCPH1001_func_00005AB0(CPUState* cpu); -void SCPH1001_func_00005ABC(CPUState* cpu); -void SCPH1001_func_00005AF8(CPUState* cpu); -void SCPH1001_func_00005B34(CPUState* cpu); -void SCPH1001_func_00005B50(CPUState* cpu); -void SCPH1001_func_00005B54(CPUState* cpu); -void SCPH1001_func_00005B64(CPUState* cpu); -void SCPH1001_func_00005BA4(CPUState* cpu); -void SCPH1001_func_00005C24(CPUState* cpu); -void SCPH1001_func_00005C58(CPUState* cpu); -void SCPH1001_func_00005D48(CPUState* cpu); -void SCPH1001_func_00005D94(CPUState* cpu); -void SCPH1001_func_00005D98(CPUState* cpu); -void SCPH1001_func_00005DA8(CPUState* cpu); -void SCPH1001_func_00005DD0(CPUState* cpu); -void SCPH1001_func_00005DD8(CPUState* cpu); -void SCPH1001_func_00005E30(CPUState* cpu); -void SCPH1001_func_00005E50(CPUState* cpu); -void SCPH1001_func_00005E98(CPUState* cpu); -void SCPH1001_func_00005EF4(CPUState* cpu); -void SCPH1001_func_00005F04(CPUState* cpu); -void SCPH1001_func_00005F4C(CPUState* cpu); -void SCPH1001_func_00005FA8(CPUState* cpu); -void SCPH1001_func_00005FB8(CPUState* cpu); -void SCPH1001_func_00005FF0(CPUState* cpu); -void SCPH1001_func_0000605C(CPUState* cpu); -void SCPH1001_func_00006070(CPUState* cpu); -void SCPH1001_func_0000609C(CPUState* cpu); -void SCPH1001_func_000061C4(CPUState* cpu); -void SCPH1001_func_00006380(CPUState* cpu); -void SCPH1001_func_00006390(CPUState* cpu); -void SCPH1001_func_000063BC(CPUState* cpu); -void SCPH1001_func_000063F8(CPUState* cpu); -void SCPH1001_func_00006408(CPUState* cpu); -void SCPH1001_func_0000641C(CPUState* cpu); -void SCPH1001_func_0000659C(CPUState* cpu); -void SCPH1001_func_00006670(CPUState* cpu); -void SCPH1001_func_00006A70(CPUState* cpu); -void SCPH1001_func_00006A80(CPUState* cpu); -void SCPH1001_func_00006A90(CPUState* cpu); -void SCPH1001_func_00006AA0(CPUState* cpu); -void SCPH1001_func_00006AB0(CPUState* cpu); -void SCPH1001_func_00006AC0(CPUState* cpu); -void SCPH1001_func_00006AD0(CPUState* cpu); -void SCPH1001_func_00006AE0(CPUState* cpu); -void SCPH1001_func_00006AF0(CPUState* cpu); -void SCPH1001_func_00006B00(CPUState* cpu); -void SCPH1001_func_00006B10(CPUState* cpu); -void SCPH1001_func_00006B20(CPUState* cpu); -void SCPH1001_func_00006B30(CPUState* cpu); -void SCPH1001_func_00006B40(CPUState* cpu); -void SCPH1001_func_00006B50(CPUState* cpu); -void SCPH1001_func_00006B60(CPUState* cpu); -void SCPH1001_func_00006B70(CPUState* cpu); -void SCPH1001_func_00006B80(CPUState* cpu); -void SCPH1001_func_00006B90(CPUState* cpu); -void SCPH1001_func_00006BA0(CPUState* cpu); -void SCPH1001_func_00006BB0(CPUState* cpu); -void SCPH1001_func_00006BC0(CPUState* cpu); -void SCPH1001_func_00006BD0(CPUState* cpu); -void SCPH1001_func_00006BE0(CPUState* cpu); -void SCPH1001_func_00006BF0(CPUState* cpu); -void SCPH1001_func_00006C00(CPUState* cpu); -void SCPH1001_func_00006C10(CPUState* cpu); -void SCPH1001_func_00006C20(CPUState* cpu); -void SCPH1001_func_1FC18000(CPUState* cpu); -void SCPH1001_func_1FC18254(CPUState* cpu); -void SCPH1001_func_1FC18684(CPUState* cpu); -void SCPH1001_func_1FC18788(CPUState* cpu); -void SCPH1001_func_1FC18798(CPUState* cpu); -void SCPH1001_func_1FC188B4(CPUState* cpu); -void SCPH1001_func_1FC188F0(CPUState* cpu); -void SCPH1001_func_1FC18990(CPUState* cpu); -void SCPH1001_func_1FC18D10(CPUState* cpu); -void SCPH1001_func_1FC192E4(CPUState* cpu); -void SCPH1001_func_1FC193C0(CPUState* cpu); -void SCPH1001_func_1FC1952C(CPUState* cpu); -void SCPH1001_func_1FC19630(CPUState* cpu); -void SCPH1001_func_1FC196C8(CPUState* cpu); -void SCPH1001_func_1FC196D4(CPUState* cpu); -void SCPH1001_func_1FC19A58(CPUState* cpu); -void SCPH1001_func_1FC19DF4(CPUState* cpu); -void SCPH1001_func_1FC19FD0(CPUState* cpu); -void SCPH1001_func_1FC1A050(CPUState* cpu); -void SCPH1001_func_1FC1A11C(CPUState* cpu); -void SCPH1001_func_1FC1A15C(CPUState* cpu); -void SCPH1001_func_1FC1A17C(CPUState* cpu); -void SCPH1001_func_1FC1A19C(CPUState* cpu); -void SCPH1001_func_1FC1A1BC(CPUState* cpu); -void SCPH1001_func_1FC1A3B8(CPUState* cpu); -void SCPH1001_func_1FC1A414(CPUState* cpu); -void SCPH1001_func_1FC1A420(CPUState* cpu); -void SCPH1001_func_1FC1A430(CPUState* cpu); -void SCPH1001_func_1FC1A5B0(CPUState* cpu); -void SCPH1001_func_1FC1A6EC(CPUState* cpu); -void SCPH1001_func_1FC1AA90(CPUState* cpu); -void SCPH1001_func_1FC1AC68(CPUState* cpu); -void SCPH1001_func_1FC1AE24(CPUState* cpu); -void SCPH1001_func_1FC1AE34(CPUState* cpu); -void SCPH1001_func_1FC1AE68(CPUState* cpu); -void SCPH1001_func_1FC1B6EC(CPUState* cpu); -void SCPH1001_func_1FC1B784(CPUState* cpu); -void SCPH1001_func_1FC1B7E0(CPUState* cpu); -void SCPH1001_func_1FC1BD3C(CPUState* cpu); -void SCPH1001_func_1FC1BD58(CPUState* cpu); -void SCPH1001_func_1FC1BD68(CPUState* cpu); -void SCPH1001_func_1FC1BEE0(CPUState* cpu); -void SCPH1001_func_1FC1BF44(CPUState* cpu); -void SCPH1001_func_1FC1C130(CPUState* cpu); -void SCPH1001_func_1FC1C1A4(CPUState* cpu); -void SCPH1001_func_1FC1C4C0(CPUState* cpu); -void SCPH1001_func_1FC1C5B8(CPUState* cpu); -void SCPH1001_func_1FC1C78C(CPUState* cpu); -void SCPH1001_func_1FC1C8EC(CPUState* cpu); -void SCPH1001_func_1FC1C978(CPUState* cpu); -void SCPH1001_func_1FC1C988(CPUState* cpu); -void SCPH1001_func_1FC1C998(CPUState* cpu); -void SCPH1001_func_1FC1C9A8(CPUState* cpu); -void SCPH1001_func_1FC1C9B4(CPUState* cpu); -void SCPH1001_func_1FC1CAF0(CPUState* cpu); -void SCPH1001_func_1FC1CBAC(CPUState* cpu); -void SCPH1001_func_1FC1CD40(CPUState* cpu); -void SCPH1001_func_1FC1CD70(CPUState* cpu); -void SCPH1001_func_1FC1CD80(CPUState* cpu); -void SCPH1001_func_1FC1CD90(CPUState* cpu); -void SCPH1001_func_1FC1CDD8(CPUState* cpu); -void SCPH1001_func_1FC1D980(CPUState* cpu); -void SCPH1001_func_1FC1D9C4(CPUState* cpu); -void SCPH1001_func_1FC1DBF4(CPUState* cpu); -void SCPH1001_func_1FC1DDD8(CPUState* cpu); -void SCPH1001_func_1FC1DF50(CPUState* cpu); -void SCPH1001_func_1FC1E0C4(CPUState* cpu); -void SCPH1001_func_1FC1E10C(CPUState* cpu); -void SCPH1001_func_1FC1E1CC(CPUState* cpu); -void SCPH1001_func_1FC1E3AC(CPUState* cpu); -void SCPH1001_func_1FC1E3C0(CPUState* cpu); -void SCPH1001_func_1FC1E3CC(CPUState* cpu); -void SCPH1001_func_1FC1F6AC(CPUState* cpu); -void SCPH1001_func_1FC1F778(CPUState* cpu); -void SCPH1001_func_1FC1F980(CPUState* cpu); -void SCPH1001_func_1FC1FCC8(CPUState* cpu); -void SCPH1001_func_1FC1FFA8(CPUState* cpu); -void SCPH1001_func_1FC20338(CPUState* cpu); -void SCPH1001_func_1FC2069C(CPUState* cpu); -void SCPH1001_func_1FC20B60(CPUState* cpu); -void SCPH1001_func_1FC20B9C(CPUState* cpu); -void SCPH1001_func_1FC20BE4(CPUState* cpu); -void SCPH1001_func_1FC20C64(CPUState* cpu); -void SCPH1001_func_1FC20CE4(CPUState* cpu); -void SCPH1001_func_1FC20D4C(CPUState* cpu); -void SCPH1001_func_1FC20DB4(CPUState* cpu); -void SCPH1001_func_1FC20E10(CPUState* cpu); -void SCPH1001_func_1FC20E6C(CPUState* cpu); -void SCPH1001_func_1FC20EC8(CPUState* cpu); -void SCPH1001_func_1FC20F24(CPUState* cpu); -void SCPH1001_func_1FC20F8C(CPUState* cpu); -void SCPH1001_func_1FC20FE8(CPUState* cpu); -void SCPH1001_func_1FC21044(CPUState* cpu); -void SCPH1001_func_1FC210C0(CPUState* cpu); -void SCPH1001_func_1FC210F0(CPUState* cpu); -void SCPH1001_func_1FC21128(CPUState* cpu); -void SCPH1001_func_1FC21184(CPUState* cpu); -void SCPH1001_func_1FC21200(CPUState* cpu); -void SCPH1001_func_1FC2125C(CPUState* cpu); -void SCPH1001_func_1FC212C4(CPUState* cpu); -void SCPH1001_func_1FC21320(CPUState* cpu); -void SCPH1001_func_1FC213A4(CPUState* cpu); -void SCPH1001_func_1FC213E8(CPUState* cpu); -void SCPH1001_func_1FC213F4(CPUState* cpu); -void SCPH1001_func_1FC213FC(CPUState* cpu); -void SCPH1001_func_1FC214B0(CPUState* cpu); -void SCPH1001_func_1FC218CC(CPUState* cpu); -void SCPH1001_func_1FC2193C(CPUState* cpu); -void SCPH1001_func_1FC21A9C(CPUState* cpu); -void SCPH1001_func_1FC22164(CPUState* cpu); -void SCPH1001_func_1FC226D0(CPUState* cpu); -void SCPH1001_func_1FC228D8(CPUState* cpu); -void SCPH1001_func_1FC22B80(CPUState* cpu); -void SCPH1001_func_1FC22E1C(CPUState* cpu); -void SCPH1001_func_1FC22E90(CPUState* cpu); -void SCPH1001_func_1FC23078(CPUState* cpu); -void SCPH1001_func_1FC230C4(CPUState* cpu); -void SCPH1001_func_1FC2311C(CPUState* cpu); -void SCPH1001_func_1FC2324C(CPUState* cpu); -void SCPH1001_func_1FC232DC(CPUState* cpu); -void SCPH1001_func_1FC23500(CPUState* cpu); -void SCPH1001_func_1FC23524(CPUState* cpu); -void SCPH1001_func_1FC23D3C(CPUState* cpu); -void SCPH1001_func_1FC24288(CPUState* cpu); -void SCPH1001_func_1FC24418(CPUState* cpu); -void SCPH1001_func_1FC24640(CPUState* cpu); -void SCPH1001_func_1FC24A48(CPUState* cpu); -void SCPH1001_func_1FC24F00(CPUState* cpu); -void SCPH1001_func_1FC251A8(CPUState* cpu); -void SCPH1001_func_1FC25200(CPUState* cpu); -void SCPH1001_func_1FC252BC(CPUState* cpu); -void SCPH1001_func_1FC25314(CPUState* cpu); -void SCPH1001_func_1FC2531C(CPUState* cpu); -void SCPH1001_func_1FC25390(CPUState* cpu); -void SCPH1001_func_1FC254B0(CPUState* cpu); -void SCPH1001_func_1FC25558(CPUState* cpu); -void SCPH1001_func_1FC255A0(CPUState* cpu); -void SCPH1001_func_1FC256D8(CPUState* cpu); -void SCPH1001_func_1FC25754(CPUState* cpu); -void SCPH1001_func_1FC25884(CPUState* cpu); -void SCPH1001_func_1FC2592C(CPUState* cpu); -void SCPH1001_func_1FC259D8(CPUState* cpu); -void SCPH1001_func_1FC25B74(CPUState* cpu); -void SCPH1001_func_1FC25C74(CPUState* cpu); -void SCPH1001_func_1FC25C7C(CPUState* cpu); -void SCPH1001_func_1FC25C84(CPUState* cpu); -void SCPH1001_func_1FC25C8C(CPUState* cpu); -void SCPH1001_func_1FC25C94(CPUState* cpu); -void SCPH1001_func_1FC25CB0(CPUState* cpu); -void SCPH1001_func_1FC25CB8(CPUState* cpu); -void SCPH1001_func_1FC25CC0(CPUState* cpu); -void SCPH1001_func_1FC25D8C(CPUState* cpu); -void SCPH1001_func_1FC25E60(CPUState* cpu); -void SCPH1001_func_1FC25E8C(CPUState* cpu); -void SCPH1001_func_1FC25EF8(CPUState* cpu); -void SCPH1001_func_1FC2632C(CPUState* cpu); -void SCPH1001_func_1FC2644C(CPUState* cpu); -void SCPH1001_func_1FC264A0(CPUState* cpu); -void SCPH1001_func_1FC26550(CPUState* cpu); -void SCPH1001_func_1FC265C0(CPUState* cpu); -void SCPH1001_func_1FC26610(CPUState* cpu); -void SCPH1001_func_1FC26660(CPUState* cpu); -void SCPH1001_func_1FC26670(CPUState* cpu); -void SCPH1001_func_1FC266B0(CPUState* cpu); -void SCPH1001_func_1FC268EC(CPUState* cpu); -void SCPH1001_func_1FC26AF8(CPUState* cpu); -void SCPH1001_func_1FC26C10(CPUState* cpu); -void SCPH1001_func_1FC26E64(CPUState* cpu); -void SCPH1001_func_1FC26EF8(CPUState* cpu); -void SCPH1001_func_1FC27190(CPUState* cpu); -void SCPH1001_func_1FC273E4(CPUState* cpu); -void SCPH1001_func_1FC27868(CPUState* cpu); -void SCPH1001_func_1FC27910(CPUState* cpu); -void SCPH1001_func_1FC27A2C(CPUState* cpu); -void SCPH1001_func_1FC27B24(CPUState* cpu); -void SCPH1001_func_1FC27BDC(CPUState* cpu); -void SCPH1001_func_1FC27CC8(CPUState* cpu); -void SCPH1001_func_1FC27D2C(CPUState* cpu); -void SCPH1001_func_1FC27DB0(CPUState* cpu); -void SCPH1001_func_1FC27E68(CPUState* cpu); -void SCPH1001_func_1FC27E88(CPUState* cpu); -void SCPH1001_func_1FC27EB4(CPUState* cpu); -void SCPH1001_func_1FC27FB0(CPUState* cpu); -void SCPH1001_func_1FC28064(CPUState* cpu); -void SCPH1001_func_1FC282E8(CPUState* cpu); -void SCPH1001_func_1FC28370(CPUState* cpu); -void SCPH1001_func_1FC283F0(CPUState* cpu); -void SCPH1001_func_1FC28490(CPUState* cpu); -void SCPH1001_func_1FC284F0(CPUState* cpu); -void SCPH1001_func_1FC2886C(CPUState* cpu); -void SCPH1001_func_1FC28B84(CPUState* cpu); -void SCPH1001_func_1FC291C4(CPUState* cpu); -void SCPH1001_func_1FC29770(CPUState* cpu); -void SCPH1001_func_1FC29AE0(CPUState* cpu); -void SCPH1001_func_1FC29FE8(CPUState* cpu); -void SCPH1001_func_1FC2A31C(CPUState* cpu); -void SCPH1001_func_1FC2A4E0(CPUState* cpu); -void SCPH1001_func_1FC2ACD0(CPUState* cpu); -void SCPH1001_func_1FC2B0A8(CPUState* cpu); -void SCPH1001_func_1FC2B1FC(CPUState* cpu); -void SCPH1001_func_1FC2B22C(CPUState* cpu); -void SCPH1001_func_1FC2B260(CPUState* cpu); -void SCPH1001_func_1FC2BF00(CPUState* cpu); -void SCPH1001_func_1FC2BF10(CPUState* cpu); -void SCPH1001_func_1FC2BF1C(CPUState* cpu); -void SCPH1001_func_1FC2BF74(CPUState* cpu); -void SCPH1001_func_1FC2C1C4(CPUState* cpu); -void SCPH1001_func_1FC2C2F0(CPUState* cpu); -void SCPH1001_func_1FC2C3E0(CPUState* cpu); -void SCPH1001_func_1FC2C7F4(CPUState* cpu); -void SCPH1001_func_1FC2C8A8(CPUState* cpu); -void SCPH1001_func_1FC2C988(CPUState* cpu); -void SCPH1001_func_1FC2CA50(CPUState* cpu); -void SCPH1001_func_1FC2CA58(CPUState* cpu); -void SCPH1001_func_1FC2CA9C(CPUState* cpu); -void SCPH1001_func_1FC2CAE0(CPUState* cpu); -void SCPH1001_func_1FC2CB24(CPUState* cpu); -void SCPH1001_func_1FC2CB80(CPUState* cpu); -void SCPH1001_func_1FC2CC10(CPUState* cpu); -void SCPH1001_func_1FC2CCC4(CPUState* cpu); -void SCPH1001_func_1FC2CE08(CPUState* cpu); -void SCPH1001_func_1FC2CF54(CPUState* cpu); -void SCPH1001_func_1FC2D0A4(CPUState* cpu); -void SCPH1001_func_1FC2D0E0(CPUState* cpu); -void SCPH1001_func_1FC2E44C(CPUState* cpu); -void SCPH1001_func_1FC2E4D0(CPUState* cpu); -void SCPH1001_func_1FC2E544(CPUState* cpu); -void SCPH1001_func_1FC2E574(CPUState* cpu); -void SCPH1001_func_1FC2E5B4(CPUState* cpu); -void SCPH1001_func_1FC2E5C0(CPUState* cpu); -void SCPH1001_func_1FC2E600(CPUState* cpu); -void SCPH1001_func_1FC2E65C(CPUState* cpu); -void SCPH1001_func_1FC2E6B8(CPUState* cpu); -void SCPH1001_func_1FC2E8CC(CPUState* cpu); -void SCPH1001_func_1FC2EA94(CPUState* cpu); -void SCPH1001_func_1FC2EC90(CPUState* cpu); -void SCPH1001_func_1FC2ECD8(CPUState* cpu); -void SCPH1001_func_1FC2ED1C(CPUState* cpu); -void SCPH1001_func_1FC2EE6C(CPUState* cpu); -void SCPH1001_func_1FC2EEC0(CPUState* cpu); -void SCPH1001_func_1FC2EF00(CPUState* cpu); -void SCPH1001_func_1FC2EF40(CPUState* cpu); -void SCPH1001_func_1FC2F1D4(CPUState* cpu); -void SCPH1001_func_1FC2F210(CPUState* cpu); -void SCPH1001_func_1FC2F618(CPUState* cpu); -void SCPH1001_func_1FC2F65C(CPUState* cpu); -void SCPH1001_func_1FC2F6A0(CPUState* cpu); -void SCPH1001_func_1FC2F718(CPUState* cpu); -void SCPH1001_func_1FC2F79C(CPUState* cpu); -void SCPH1001_func_1FC2F808(CPUState* cpu); -void SCPH1001_func_1FC2F85C(CPUState* cpu); -void SCPH1001_func_1FC2F8AC(CPUState* cpu); -void SCPH1001_func_1FC2FA78(CPUState* cpu); -void SCPH1001_func_1FC2FC10(CPUState* cpu); -void SCPH1001_func_1FC2FCC4(CPUState* cpu); -void SCPH1001_func_1FC2FE6C(CPUState* cpu); -void SCPH1001_func_1FC2FF34(CPUState* cpu); -void SCPH1001_func_1FC3010C(CPUState* cpu); -void SCPH1001_func_1FC3015C(CPUState* cpu); -void SCPH1001_func_1FC301AC(CPUState* cpu); -void SCPH1001_func_1FC3022C(CPUState* cpu); -void SCPH1001_func_1FC3029C(CPUState* cpu); -void SCPH1001_func_1FC302BC(CPUState* cpu); -void SCPH1001_func_1FC3031C(CPUState* cpu); -void SCPH1001_func_1FC30350(CPUState* cpu); -void SCPH1001_func_1FC303A4(CPUState* cpu); -void SCPH1001_func_1FC3041C(CPUState* cpu); -void SCPH1001_func_1FC3045C(CPUState* cpu); -void SCPH1001_func_1FC30470(CPUState* cpu); -void SCPH1001_func_1FC30484(CPUState* cpu); -void SCPH1001_func_1FC30498(CPUState* cpu); -void SCPH1001_func_1FC304AC(CPUState* cpu); -void SCPH1001_func_1FC304B4(CPUState* cpu); -void SCPH1001_func_1FC30514(CPUState* cpu); -void SCPH1001_func_1FC30554(CPUState* cpu); -void SCPH1001_func_1FC30560(CPUState* cpu); -void SCPH1001_func_1FC3056C(CPUState* cpu); -void SCPH1001_func_1FC30578(CPUState* cpu); -void SCPH1001_func_1FC30584(CPUState* cpu); -void SCPH1001_func_1FC3058C(CPUState* cpu); -void SCPH1001_func_1FC30670(CPUState* cpu); -void SCPH1001_func_1FC3079C(CPUState* cpu); -void SCPH1001_func_1FC30868(CPUState* cpu); -void SCPH1001_func_1FC30960(CPUState* cpu); -void SCPH1001_func_1FC30A80(CPUState* cpu); -void SCPH1001_func_1FC30DF0(CPUState* cpu); -void SCPH1001_func_1FC31194(CPUState* cpu); -void SCPH1001_func_1FC31380(CPUState* cpu); -void SCPH1001_func_1FC313EC(CPUState* cpu); -void SCPH1001_func_1FC31448(CPUState* cpu); -void SCPH1001_func_1FC31580(CPUState* cpu); -void SCPH1001_func_1FC31638(CPUState* cpu); -void SCPH1001_func_1FC317D0(CPUState* cpu); -void SCPH1001_func_1FC31968(CPUState* cpu); -void SCPH1001_func_1FC319EC(CPUState* cpu); -void SCPH1001_func_1FC31C64(CPUState* cpu); -void SCPH1001_func_1FC31D14(CPUState* cpu); -void SCPH1001_func_1FC31DC4(CPUState* cpu); -void SCPH1001_func_1FC31E74(CPUState* cpu); -void SCPH1001_func_1FC32010(CPUState* cpu); -void SCPH1001_func_1FC32040(CPUState* cpu); -void SCPH1001_func_1FC32078(CPUState* cpu); -void SCPH1001_func_1FC320B4(CPUState* cpu); -void SCPH1001_func_1FC32100(CPUState* cpu); -void SCPH1001_func_1FC321F0(CPUState* cpu); -void SCPH1001_func_1FC322E4(CPUState* cpu); -void SCPH1001_func_1FC32368(CPUState* cpu); -void SCPH1001_func_1FC32410(CPUState* cpu); -void SCPH1001_func_1FC32450(CPUState* cpu); -void SCPH1001_func_1FC3255C(CPUState* cpu); -void SCPH1001_func_1FC32710(CPUState* cpu); -void SCPH1001_func_1FC32724(CPUState* cpu); -void SCPH1001_func_1FC32820(CPUState* cpu); -void SCPH1001_func_1FC328F4(CPUState* cpu); -void SCPH1001_func_1FC32944(CPUState* cpu); -void SCPH1001_func_1FC329F0(CPUState* cpu); -void SCPH1001_func_1FC32CCC(CPUState* cpu); -void SCPH1001_func_1FC33138(CPUState* cpu); -void SCPH1001_func_1FC331A0(CPUState* cpu); -void SCPH1001_func_1FC33358(CPUState* cpu); -void SCPH1001_func_1FC33400(CPUState* cpu); -void SCPH1001_func_1FC33538(CPUState* cpu); -void SCPH1001_func_1FC336F0(CPUState* cpu); -void SCPH1001_func_1FC33758(CPUState* cpu); -void SCPH1001_func_1FC337AC(CPUState* cpu); -void SCPH1001_func_1FC33800(CPUState* cpu); -void SCPH1001_func_1FC3388C(CPUState* cpu); -void SCPH1001_func_1FC33918(CPUState* cpu); -void SCPH1001_func_1FC33978(CPUState* cpu); -void SCPH1001_func_1FC339F0(CPUState* cpu); -void SCPH1001_func_1FC33AB8(CPUState* cpu); -void SCPH1001_func_1FC33B80(CPUState* cpu); -void SCPH1001_func_1FC33C04(CPUState* cpu); -void SCPH1001_func_1FC33C84(CPUState* cpu); -void SCPH1001_func_1FC33C90(CPUState* cpu); -void SCPH1001_func_1FC33C98(CPUState* cpu); -void SCPH1001_func_1FC33CC0(CPUState* cpu); -void SCPH1001_func_1FC33D1C(CPUState* cpu); -void SCPH1001_func_1FC33D24(CPUState* cpu); -void SCPH1001_func_1FC33DA4(CPUState* cpu); -void SCPH1001_func_1FC33E20(CPUState* cpu); -void SCPH1001_func_1FC33E80(CPUState* cpu); -void SCPH1001_func_1FC33E90(CPUState* cpu); -void SCPH1001_func_1FC33EA0(CPUState* cpu); -void SCPH1001_func_1FC33EC0(CPUState* cpu); -void SCPH1001_func_1FC33ECC(CPUState* cpu); -void SCPH1001_func_1FC33EE0(CPUState* cpu); -void SCPH1001_func_1FC33EF4(CPUState* cpu); -void SCPH1001_func_1FC33F00(CPUState* cpu); -void SCPH1001_func_1FC33F20(CPUState* cpu); -void SCPH1001_func_1FC33F40(CPUState* cpu); -void SCPH1001_func_1FC33F54(CPUState* cpu); -void SCPH1001_func_1FC33F6C(CPUState* cpu); -void SCPH1001_func_1FC33F80(CPUState* cpu); -void SCPH1001_func_1FC33F94(CPUState* cpu); -void SCPH1001_func_1FC33FA8(CPUState* cpu); -void SCPH1001_func_1FC33FB4(CPUState* cpu); -void SCPH1001_func_1FC33FCC(CPUState* cpu); -void SCPH1001_func_1FC33FD8(CPUState* cpu); -void SCPH1001_func_1FC33FE4(CPUState* cpu); -void SCPH1001_func_1FC33FF0(CPUState* cpu); -void SCPH1001_func_1FC33FFC(CPUState* cpu); -void SCPH1001_func_1FC34008(CPUState* cpu); -void SCPH1001_func_1FC3401C(CPUState* cpu); -void SCPH1001_func_1FC34028(CPUState* cpu); -void SCPH1001_func_1FC3403C(CPUState* cpu); -void SCPH1001_func_1FC34054(CPUState* cpu); -void SCPH1001_func_1FC34068(CPUState* cpu); -void SCPH1001_func_1FC3407C(CPUState* cpu); -void SCPH1001_func_1FC34088(CPUState* cpu); -void SCPH1001_func_1FC3409C(CPUState* cpu); -void SCPH1001_func_1FC340CC(CPUState* cpu); -void SCPH1001_func_1FC340D8(CPUState* cpu); -void SCPH1001_func_1FC340E4(CPUState* cpu); -void SCPH1001_func_1FC34104(CPUState* cpu); -void SCPH1001_func_1FC34110(CPUState* cpu); -void SCPH1001_func_1FC34160(CPUState* cpu); -void SCPH1001_func_1FC34304(CPUState* cpu); -void SCPH1001_func_1FC344A4(CPUState* cpu); -void SCPH1001_func_1FC345F4(CPUState* cpu); -void SCPH1001_func_1FC34748(CPUState* cpu); -void SCPH1001_func_1FC34898(CPUState* cpu); -void SCPH1001_func_1FC348FC(CPUState* cpu); -void SCPH1001_func_1FC34924(CPUState* cpu); -void SCPH1001_func_1FC34928(CPUState* cpu); -void SCPH1001_func_1FC34954(CPUState* cpu); -void SCPH1001_func_1FC34958(CPUState* cpu); -void SCPH1001_func_1FC34980(CPUState* cpu); -void SCPH1001_func_1FC34984(CPUState* cpu); -void SCPH1001_func_1FC349B8(CPUState* cpu); -void SCPH1001_func_1FC34A04(CPUState* cpu); -void SCPH1001_func_1FC34A08(CPUState* cpu); -void SCPH1001_func_1FC34A30(CPUState* cpu); -void SCPH1001_func_1FC34A34(CPUState* cpu); -void SCPH1001_func_1FC34A60(CPUState* cpu); -void SCPH1001_func_1FC34A64(CPUState* cpu); -void SCPH1001_func_1FC34A90(CPUState* cpu); -void SCPH1001_func_1FC34AA0(CPUState* cpu); -void SCPH1001_func_1FC34AF0(CPUState* cpu); -void SCPH1001_func_1FC34B08(CPUState* cpu); -void SCPH1001_func_1FC34B58(CPUState* cpu); -void SCPH1001_func_1FC34E00(CPUState* cpu); -void SCPH1001_func_1FC34EC0(CPUState* cpu); -void SCPH1001_func_1FC34EC4(CPUState* cpu); -void SCPH1001_func_1FC34FA0(CPUState* cpu); -void SCPH1001_func_1FC35128(CPUState* cpu); -void SCPH1001_func_1FC3524C(CPUState* cpu); -void SCPH1001_func_1FC35348(CPUState* cpu); -void SCPH1001_func_1FC35470(CPUState* cpu); -void SCPH1001_func_1FC35598(CPUState* cpu); -void SCPH1001_func_1FC35698(CPUState* cpu); -void SCPH1001_func_1FC357C4(CPUState* cpu); -void SCPH1001_func_1FC3582C(CPUState* cpu); -void SCPH1001_func_1FC3586C(CPUState* cpu); -void SCPH1001_func_1FC35890(CPUState* cpu); -void SCPH1001_func_1FC359B4(CPUState* cpu); -void SCPH1001_func_1FC35AD8(CPUState* cpu); -void SCPH1001_func_1FC35B08(CPUState* cpu); -void SCPH1001_func_1FC35B38(CPUState* cpu); -void SCPH1001_func_1FC35B68(CPUState* cpu); -void SCPH1001_func_1FC35B88(CPUState* cpu); -void SCPH1001_func_1FC35BC4(CPUState* cpu); -void SCPH1001_func_1FC35C28(CPUState* cpu); -void SCPH1001_func_1FC35C60(CPUState* cpu); -void SCPH1001_func_1FC35CC8(CPUState* cpu); -void SCPH1001_func_1FC35D10(CPUState* cpu); -void SCPH1001_func_1FC35D58(CPUState* cpu); -void SCPH1001_func_1FC35DA0(CPUState* cpu); -void SCPH1001_func_1FC35DD4(CPUState* cpu); -void SCPH1001_func_1FC35E30(CPUState* cpu); -void SCPH1001_func_1FC35E64(CPUState* cpu); -void SCPH1001_func_1FC35E98(CPUState* cpu); -void SCPH1001_func_1FC35EC0(CPUState* cpu); -void SCPH1001_func_1FC35EEC(CPUState* cpu); -void SCPH1001_func_1FC35F18(CPUState* cpu); -void SCPH1001_func_1FC35F38(CPUState* cpu); -void SCPH1001_func_1FC35F78(CPUState* cpu); -void SCPH1001_func_1FC35FA0(CPUState* cpu); -void SCPH1001_func_1FC35FD0(CPUState* cpu); -void SCPH1001_func_1FC36000(CPUState* cpu); -void SCPH1001_func_1FC36024(CPUState* cpu); -void SCPH1001_func_1FC36068(CPUState* cpu); -void SCPH1001_func_1FC36094(CPUState* cpu); -void SCPH1001_func_1FC360E0(CPUState* cpu); -void SCPH1001_func_1FC36104(CPUState* cpu); -void SCPH1001_func_1FC3614C(CPUState* cpu); -void SCPH1001_func_1FC36178(CPUState* cpu); -void SCPH1001_func_1FC361A0(CPUState* cpu); -void SCPH1001_func_1FC361CC(CPUState* cpu); -void SCPH1001_func_1FC361F4(CPUState* cpu); -void SCPH1001_func_1FC3621C(CPUState* cpu); -void SCPH1001_func_1FC36244(CPUState* cpu); -void SCPH1001_func_1FC3625C(CPUState* cpu); -void SCPH1001_func_1FC36280(CPUState* cpu); -void SCPH1001_func_1FC36294(CPUState* cpu); -void SCPH1001_func_1FC362BC(CPUState* cpu); -void SCPH1001_func_1FC362D0(CPUState* cpu); -void SCPH1001_func_1FC3632C(CPUState* cpu); -void SCPH1001_func_1FC36388(CPUState* cpu); -void SCPH1001_func_1FC363A0(CPUState* cpu); -void SCPH1001_func_1FC363F0(CPUState* cpu); -void SCPH1001_func_1FC36458(CPUState* cpu); -void SCPH1001_func_1FC364DC(CPUState* cpu); -void SCPH1001_func_1FC3653C(CPUState* cpu); -void SCPH1001_func_1FC365C4(CPUState* cpu); -void SCPH1001_func_1FC365F8(CPUState* cpu); -void SCPH1001_func_1FC36684(CPUState* cpu); -void SCPH1001_func_1FC36740(CPUState* cpu); -void SCPH1001_func_1FC367D4(CPUState* cpu); -void SCPH1001_func_1FC36880(CPUState* cpu); -void SCPH1001_func_1FC36940(CPUState* cpu); -void SCPH1001_func_1FC36998(CPUState* cpu); -void SCPH1001_func_1FC36A3C(CPUState* cpu); -void SCPH1001_func_1FC36B14(CPUState* cpu); -void SCPH1001_func_1FC36BEC(CPUState* cpu); -void SCPH1001_func_1FC36C60(CPUState* cpu); -void SCPH1001_func_1FC36CA4(CPUState* cpu); -void SCPH1001_func_1FC36CF0(CPUState* cpu); -void SCPH1001_func_1FC36D1C(CPUState* cpu); -void SCPH1001_func_1FC36D48(CPUState* cpu); -void SCPH1001_func_1FC36DD0(CPUState* cpu); -void SCPH1001_func_1FC36DF8(CPUState* cpu); -void SCPH1001_func_1FC36EC0(CPUState* cpu); -void SCPH1001_func_1FC36F90(CPUState* cpu); -void SCPH1001_func_1FC36FF0(CPUState* cpu); -void SCPH1001_func_1FC37028(CPUState* cpu); -void SCPH1001_func_1FC37070(CPUState* cpu); -void SCPH1001_func_1FC370A0(CPUState* cpu); -void SCPH1001_func_1FC370F4(CPUState* cpu); -void SCPH1001_func_1FC37130(CPUState* cpu); -void SCPH1001_func_1FC3716C(CPUState* cpu); -void SCPH1001_func_1FC37334(CPUState* cpu); -void SCPH1001_func_1FC37368(CPUState* cpu); -void SCPH1001_func_1FC373E0(CPUState* cpu); -void SCPH1001_func_1FC37434(CPUState* cpu); -void SCPH1001_func_1FC374BC(CPUState* cpu); -void SCPH1001_func_1FC374EC(CPUState* cpu); -void SCPH1001_func_1FC37838(CPUState* cpu); -void SCPH1001_func_1FC37868(CPUState* cpu); -void SCPH1001_func_1FC378B4(CPUState* cpu); -void SCPH1001_func_1FC37908(CPUState* cpu); -void SCPH1001_func_1FC37998(CPUState* cpu); -void SCPH1001_func_1FC37A4C(CPUState* cpu); -void SCPH1001_func_1FC37AC4(CPUState* cpu); -void SCPH1001_func_1FC37DC8(CPUState* cpu); -void SCPH1001_func_1FC37E60(CPUState* cpu); -void SCPH1001_func_1FC37F4C(CPUState* cpu); -void SCPH1001_func_1FC38038(CPUState* cpu); -void SCPH1001_func_1FC38090(CPUState* cpu); -void SCPH1001_func_1FC38108(CPUState* cpu); -void SCPH1001_func_1FC38204(CPUState* cpu); -void SCPH1001_func_1FC382E0(CPUState* cpu); -void SCPH1001_func_1FC38524(CPUState* cpu); -void SCPH1001_func_1FC387D4(CPUState* cpu); -void SCPH1001_func_1FC38A7C(CPUState* cpu); -void SCPH1001_func_1FC38AA4(CPUState* cpu); -void SCPH1001_func_1FC38AD4(CPUState* cpu); -void SCPH1001_func_1FC38AF0(CPUState* cpu); -void SCPH1001_func_1FC38B28(CPUState* cpu); -void SCPH1001_func_1FC38B80(CPUState* cpu); -void SCPH1001_func_1FC38BE8(CPUState* cpu); -void SCPH1001_func_1FC38C68(CPUState* cpu); -void SCPH1001_func_1FC38DAC(CPUState* cpu); -void SCPH1001_func_1FC38F8C(CPUState* cpu); -void SCPH1001_func_1FC39080(CPUState* cpu); -void SCPH1001_func_1FC392E8(CPUState* cpu); -void SCPH1001_func_1FC39300(CPUState* cpu); -void SCPH1001_func_1FC393CC(CPUState* cpu); -void SCPH1001_func_1FC39410(CPUState* cpu); -void SCPH1001_func_1FC394EC(CPUState* cpu); -void SCPH1001_func_1FC3954C(CPUState* cpu); -void SCPH1001_func_1FC395EC(CPUState* cpu); -void SCPH1001_func_1FC39630(CPUState* cpu); -void SCPH1001_func_1FC396D0(CPUState* cpu); -void SCPH1001_func_1FC396E8(CPUState* cpu); -void SCPH1001_func_1FC39804(CPUState* cpu); -void SCPH1001_func_1FC398D4(CPUState* cpu); -void SCPH1001_func_1FC39910(CPUState* cpu); -void SCPH1001_func_1FC3994C(CPUState* cpu); -void SCPH1001_func_1FC3999C(CPUState* cpu); -void SCPH1001_func_1FC399EC(CPUState* cpu); -void SCPH1001_func_1FC39A14(CPUState* cpu); -void SCPH1001_func_1FC39A3C(CPUState* cpu); -void SCPH1001_func_1FC39ADC(CPUState* cpu); -void SCPH1001_func_1FC39BA4(CPUState* cpu); -void SCPH1001_func_1FC39BCC(CPUState* cpu); -void SCPH1001_func_1FC39D38(CPUState* cpu); -void SCPH1001_func_1FC39E84(CPUState* cpu); -void SCPH1001_func_1FC39F30(CPUState* cpu); -void SCPH1001_func_1FC39F90(CPUState* cpu); -void SCPH1001_func_1FC39FE4(CPUState* cpu); -void SCPH1001_func_1FC3A094(CPUState* cpu); -void SCPH1001_func_1FC3A228(CPUState* cpu); -void SCPH1001_func_1FC3A2C0(CPUState* cpu); -void SCPH1001_func_1FC3A44C(CPUState* cpu); -void SCPH1001_func_1FC3A638(CPUState* cpu); -void SCPH1001_func_1FC3A95C(CPUState* cpu); -void SCPH1001_func_1FC3A9EC(CPUState* cpu); -void SCPH1001_func_1FC3AAC4(CPUState* cpu); -void SCPH1001_func_1FC3AB70(CPUState* cpu); -void SCPH1001_func_1FC3AC9C(CPUState* cpu); -void SCPH1001_func_1FC3AD68(CPUState* cpu); -void SCPH1001_func_1FC3B054(CPUState* cpu); -void SCPH1001_func_1FC3B160(CPUState* cpu); -void SCPH1001_func_1FC3B30C(CPUState* cpu); -void SCPH1001_func_1FC3B368(CPUState* cpu); -void SCPH1001_func_1FC3B85C(CPUState* cpu); -void SCPH1001_func_1FC3B93C(CPUState* cpu); -void SCPH1001_func_1FC3B964(CPUState* cpu); -void SCPH1001_func_1FC3BA74(CPUState* cpu); -void SCPH1001_func_1FC3BD78(CPUState* cpu); -void SCPH1001_func_1FC3BD98(CPUState* cpu); -void SCPH1001_func_1FC3BDB8(CPUState* cpu); -void SCPH1001_func_1FC3BE18(CPUState* cpu); -void SCPH1001_func_1FC3BE6C(CPUState* cpu); -void SCPH1001_func_1FC3BE90(CPUState* cpu); -void SCPH1001_func_1FC3BF10(CPUState* cpu); -void SCPH1001_func_1FC3BF40(CPUState* cpu); -void SCPH1001_func_1FC3BFF0(CPUState* cpu); -void SCPH1001_func_1FC3C060(CPUState* cpu); -void SCPH1001_func_1FC3C140(CPUState* cpu); -void SCPH1001_func_1FC3C19C(CPUState* cpu); -void SCPH1001_func_1FC3C418(CPUState* cpu); -void SCPH1001_func_1FC3C428(CPUState* cpu); -void SCPH1001_func_1FC3C4E0(CPUState* cpu); -void SCPH1001_func_1FC3C710(CPUState* cpu); -void SCPH1001_func_1FC3CEC8(CPUState* cpu); -void SCPH1001_func_1FC3D304(CPUState* cpu); -void SCPH1001_func_1FC3D65C(CPUState* cpu); -void SCPH1001_func_1FC3D810(CPUState* cpu); -void SCPH1001_func_1FC3D870(CPUState* cpu); -void SCPH1001_func_1FC3D8C0(CPUState* cpu); -void SCPH1001_func_1FC3DED0(CPUState* cpu); -void SCPH1001_func_1FC3DF20(CPUState* cpu); -void SCPH1001_func_1FC3DF90(CPUState* cpu); -void SCPH1001_func_1FC3E020(CPUState* cpu); -void SCPH1001_func_1FC3E0C0(CPUState* cpu); -void SCPH1001_func_1FC3E0E8(CPUState* cpu); -void SCPH1001_func_1FC3E110(CPUState* cpu); -void SCPH1001_func_1FC3E324(CPUState* cpu); -void SCPH1001_func_1FC3E390(CPUState* cpu); -void SCPH1001_func_1FC3E634(CPUState* cpu); -void SCPH1001_func_1FC3E980(CPUState* cpu); -void SCPH1001_func_1FC3ECB8(CPUState* cpu); -void SCPH1001_func_1FC3ED40(CPUState* cpu); -void SCPH1001_func_1FC3EDB4(CPUState* cpu); -void SCPH1001_func_1FC3EE80(CPUState* cpu); -void SCPH1001_func_1FC3EEC0(CPUState* cpu); -void SCPH1001_func_1FC3EEE4(CPUState* cpu); -void SCPH1001_func_1FC3EF08(CPUState* cpu); -void SCPH1001_func_1FC3EF7C(CPUState* cpu); -void SCPH1001_func_1FC3EFF0(CPUState* cpu); -void SCPH1001_func_1FC3F090(CPUState* cpu); -void SCPH1001_func_1FC3F19C(CPUState* cpu); -void SCPH1001_func_1FC3F1B8(CPUState* cpu); -void SCPH1001_func_1FC3F2B4(CPUState* cpu); -void SCPH1001_func_1FC3F484(CPUState* cpu); -void SCPH1001_func_1FC3F4F0(CPUState* cpu); -void SCPH1001_func_1FC3F570(CPUState* cpu); -void SCPH1001_func_1FC3F5D8(CPUState* cpu); -void SCPH1001_func_1FC3F6F0(CPUState* cpu); -void SCPH1001_func_1FC3F7E8(CPUState* cpu); -void SCPH1001_func_1FC3F8E4(CPUState* cpu); -void SCPH1001_func_1FC3F9AC(CPUState* cpu); -void SCPH1001_func_1FC3FA10(CPUState* cpu); -void SCPH1001_func_1FC3FAEC(CPUState* cpu); -void SCPH1001_func_1FC3FB74(CPUState* cpu); -void SCPH1001_func_1FC3FC50(CPUState* cpu); -void SCPH1001_func_1FC3FD0C(CPUState* cpu); -void SCPH1001_func_1FC3FDC8(CPUState* cpu); -void SCPH1001_func_1FC3FE60(CPUState* cpu); -void SCPH1001_func_1FC3FF40(CPUState* cpu); -void SCPH1001_func_1FC40034(CPUState* cpu); -void SCPH1001_func_1FC400DC(CPUState* cpu); -void SCPH1001_func_1FC40184(CPUState* cpu); -void SCPH1001_func_1FC40260(CPUState* cpu); -void SCPH1001_func_1FC402DC(CPUState* cpu); -void SCPH1001_func_1FC403C4(CPUState* cpu); -void SCPH1001_func_1FC40404(CPUState* cpu); -void SCPH1001_func_1FC40484(CPUState* cpu); -void SCPH1001_func_1FC40628(CPUState* cpu); -void SCPH1001_func_1FC406E0(CPUState* cpu); -void SCPH1001_func_1FC40700(CPUState* cpu); -void SCPH1001_func_1FC40720(CPUState* cpu); -void SCPH1001_func_1FC40744(CPUState* cpu); -void SCPH1001_func_1FC407B8(CPUState* cpu); -void SCPH1001_func_1FC40B68(CPUState* cpu); -void SCPH1001_func_1FC40DE8(CPUState* cpu); -void SCPH1001_func_1FC40F34(CPUState* cpu); -void SCPH1001_func_1FC4102C(CPUState* cpu); -void SCPH1001_func_1FC41200(CPUState* cpu); -void SCPH1001_func_1FC41258(CPUState* cpu); -void SCPH1001_func_1FC4130C(CPUState* cpu); -void SCPH1001_func_1FC413B0(CPUState* cpu); -void SCPH1001_func_1FC413F4(CPUState* cpu); -void SCPH1001_func_1FC41458(CPUState* cpu); -void SCPH1001_func_1FC41520(CPUState* cpu); -void SCPH1001_func_1FC41648(CPUState* cpu); -void SCPH1001_func_1FC41670(CPUState* cpu); -void SCPH1001_func_1FC41708(CPUState* cpu); -void SCPH1001_func_1FC41788(CPUState* cpu); -void SCPH1001_func_1FC417CC(CPUState* cpu); -void SCPH1001_func_1FC41804(CPUState* cpu); -void SCPH1001_func_1FC41848(CPUState* cpu); -void SCPH1001_func_1FC418C4(CPUState* cpu); -void SCPH1001_func_1FC4192C(CPUState* cpu); -void SCPH1001_func_1FC41A44(CPUState* cpu); -void SCPH1001_func_1FC41BA8(CPUState* cpu); -void SCPH1001_func_1FC41C04(CPUState* cpu); -void SCPH1001_func_1FC41C0C(CPUState* cpu); -void SCPH1001_func_1FC41C80(CPUState* cpu); -void SCPH1001_func_1FC41D18(CPUState* cpu); -void SCPH1001_func_1FC41DA4(CPUState* cpu); -void SCPH1001_func_1FC41DC8(CPUState* cpu); -void SCPH1001_func_1FC41DFC(CPUState* cpu); -void SCPH1001_func_1FC41E14(CPUState* cpu); -void SCPH1001_func_1FC41E30(CPUState* cpu); -void SCPH1001_func_1FC41ED8(CPUState* cpu); -void SCPH1001_func_1FC41F10(CPUState* cpu); -void SCPH1001_func_1FC41F54(CPUState* cpu); -void SCPH1001_func_1FC41F88(CPUState* cpu); -void SCPH1001_func_1FC41FC0(CPUState* cpu); -void SCPH1001_func_1FC42014(CPUState* cpu); -void SCPH1001_func_1FC4203C(CPUState* cpu); -void SCPH1001_func_1FC42060(CPUState* cpu); -void SCPH1001_func_1FC42090(CPUState* cpu); -void SCPH1001_func_1FC420C0(CPUState* cpu); -void SCPH1001_func_1FC420F0(CPUState* cpu); -void SCPH1001_func_1FC42120(CPUState* cpu); -void SCPH1001_func_1FC42160(CPUState* cpu); -void SCPH1001_func_1FC421D8(CPUState* cpu); -void SCPH1001_func_1FC4226C(CPUState* cpu); -void SCPH1001_func_1FC42308(CPUState* cpu); -void SCPH1001_func_1FC4231C(CPUState* cpu); -void SCPH1001_func_1FC42370(CPUState* cpu); -void SCPH1001_func_1FC42380(CPUState* cpu); -void SCPH1001_func_1FC42424(CPUState* cpu); -void SCPH1001_func_1FC424A8(CPUState* cpu); -void SCPH1001_func_1FC42540(CPUState* cpu); -void SCPH1001_func_1FC425BC(CPUState* cpu); -void SCPH1001_func_1FC425FC(CPUState* cpu); -void SCPH1001_func_1FC42640(CPUState* cpu); -void SCPH1001_func_1FC426DC(CPUState* cpu); -void SCPH1001_func_1FC4270C(CPUState* cpu); -void SCPH1001_func_1FC42844(CPUState* cpu); -void SCPH1001_func_1FC428D0(CPUState* cpu); -void SCPH1001_func_1FC428E0(CPUState* cpu); -void SCPH1001_func_1FC428F0(CPUState* cpu); -void SCPH1001_func_1FC42900(CPUState* cpu); -void SCPH1001_func_1FC42910(CPUState* cpu); -void SCPH1001_func_1FC42920(CPUState* cpu); -void SCPH1001_func_1FC42930(CPUState* cpu); -void SCPH1001_func_1FC42940(CPUState* cpu); -void SCPH1001_func_1FC42950(CPUState* cpu); -void SCPH1001_func_1FC42960(CPUState* cpu); -void SCPH1001_func_1FC42970(CPUState* cpu); -void SCPH1001_func_1FC42980(CPUState* cpu); -void SCPH1001_func_1FC42990(CPUState* cpu); -void SCPH1001_func_1FC429A0(CPUState* cpu); -void SCPH1001_func_1FC429B0(CPUState* cpu); -void SCPH1001_func_1FC429C0(CPUState* cpu); -void SCPH1001_func_1FC429D0(CPUState* cpu); -void SCPH1001_func_1FC429E0(CPUState* cpu); -void SCPH1001_func_1FC429F0(CPUState* cpu); -void SCPH1001_func_1FC42A00(CPUState* cpu); -void SCPH1001_func_1FC42A10(CPUState* cpu); -void SCPH1001_func_1FC42A20(CPUState* cpu); -void SCPH1001_func_1FC42A30(CPUState* cpu); -void SCPH1001_func_1FC42A40(CPUState* cpu); -void SCPH1001_func_1FC42A50(CPUState* cpu); -void SCPH1001_func_1FC42A60(CPUState* cpu); -void SCPH1001_func_1FC42A70(CPUState* cpu); -void SCPH1001_func_1FC42A80(CPUState* cpu); -void SCPH1001_func_1FC42A90(CPUState* cpu); -void SCPH1001_func_1FC42AA0(CPUState* cpu); -void SCPH1001_func_1FC42AB0(CPUState* cpu); -void SCPH1001_func_1FC42AC0(CPUState* cpu); -void SCPH1001_func_1FC42AD0(CPUState* cpu); -void SCPH1001_func_1FC42AE0(CPUState* cpu); -void SCPH1001_func_1FC42AF0(CPUState* cpu); -void SCPH1001_func_1FC42B00(CPUState* cpu); -void SCPH1001_func_1FC42B10(CPUState* cpu); -void SCPH1001_func_1FC42B20(CPUState* cpu); -void SCPH1001_func_1FC42B30(CPUState* cpu); -void SCPH1001_func_1FC42B40(CPUState* cpu); -void SCPH1001_func_1FC42B50(CPUState* cpu); -void SCPH1001_func_1FC42B60(CPUState* cpu); -void SCPH1001_func_1FC42B70(CPUState* cpu); -void SCPH1001_func_1FC42B80(CPUState* cpu); -void SCPH1001_func_1FC42B90(CPUState* cpu); -void SCPH1001_func_1FC42BA0(CPUState* cpu); -void SCPH1001_func_1FC42BB0(CPUState* cpu); -void SCPH1001_func_1FC42BC0(CPUState* cpu); -void SCPH1001_func_1FC42BD0(CPUState* cpu); -void SCPH1001_func_1FC42BE0(CPUState* cpu); -void SCPH1001_func_1FC42BF0(CPUState* cpu); -void SCPH1001_func_1FC42C00(CPUState* cpu); - -void SCPH1001_func_1FC00000(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00000u); - int psx_delay_BFC00070 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00150u: goto label_BFC00150; - default: break; - } - } -label_BFC00000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00000: 3C080013 lui $t0, 0x13 */ - cpu->gpr[8] = 0x00130000u; - PGXP_ALU(0x3C080013u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00004: 3508243F ori $t0, $t0, 0x243F */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x243Fu; - PGXP_ALU(0x3508243Fu, cpu->gpr[8], _pgx1, 0x243Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00008: 3C011F80 lui $at, 0x1F80 */ - cpu->gpr[1] = 0x1F800000u; - PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0000Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0000C: AC281010 sw $t0, 4112($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 4112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0000Cu); return; } g_debug_last_store_pc = 0xBFC0000Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC281010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0000Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC00014: 24080B88 addiu $t0, $zero, 2952 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2952)); - PGXP_ALU(0x24080B88u, cpu->gpr[8], _pgx1, 0x00000B88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00018: 3C011F80 lui $at, 0x1F80 */ - cpu->gpr[1] = 0x1F800000u; - PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0001C: AC281060 sw $t0, 4192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 4192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0001Cu); return; } g_debug_last_store_pc = 0xBFC0001Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC281060u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0002C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0003C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00044: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0004Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0004C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0004Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00058: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0005Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0005C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0005Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0006Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0006C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0006Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00070: 0BF00054 j 0xBFC00150 */ - psx_delay_BFC00070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00074u); -#endif - if (psx_delay_BFC00070) { - psx_delay_BFC00070 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00150u); - goto label_BFC00150; - } -label_BFC00150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00150: 3C091F80 lui $t1, 0x1F80 */ - cpu->gpr[9] = 0x1F800000u; - PGXP_ALU(0x3C091F80u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00154: 35291000 ori $t1, $t1, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] | 0x1000u; - PGXP_ALU(0x35291000u, cpu->gpr[9], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00158: 3C080003 lui $t0, 0x3 */ - cpu->gpr[8] = 0x00030000u; - PGXP_ALU(0x3C080003u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0015Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0015C: 35081125 ori $t0, $t0, 0x1125 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x1125u; - PGXP_ALU(0x35081125u, cpu->gpr[8], _pgx1, 0x1125u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0015Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00160: AD280020 sw $t0, 32($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00160u); return; } g_debug_last_store_pc = 0xBFC00160u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00164: 3C081F00 lui $t0, 0x1F00 */ - cpu->gpr[8] = 0x1F000000u; - PGXP_ALU(0x3C081F00u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00168: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00168u); return; } g_debug_last_store_pc = 0xBFC00168u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0016Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0016C: 3C081F80 lui $t0, 0x1F80 */ - cpu->gpr[8] = 0x1F800000u; - PGXP_ALU(0x3C081F80u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0016Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00170: 35082000 ori $t0, $t0, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x2000u; - PGXP_ALU(0x35082000u, cpu->gpr[8], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00174: AD280004 sw $t0, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00174u); return; } g_debug_last_store_pc = 0xBFC00174u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00178: 3C080013 lui $t0, 0x13 */ - cpu->gpr[8] = 0x00130000u; - PGXP_ALU(0x3C080013u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0017Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0017C: 3508243F ori $t0, $t0, 0x243F */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x243Fu; - PGXP_ALU(0x3508243Fu, cpu->gpr[8], _pgx1, 0x243Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0017Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00180u); - cpu->pc = 0xBFC00180u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC00180(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00180u); - int psx_delay_BFC00270 = 0; - int psx_taken_BFC00270 = 0; - int psx_delay_BFC00320 = 0; - int psx_taken_BFC00320 = 0; - int psx_delay_BFC003C4 = 0; - int psx_taken_BFC003C4 = 0; - int psx_delay_BFC00418 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00250u: goto label_BFC00250; - case 0xBFC00278u: goto label_BFC00278; - case 0xBFC002A0u: goto label_BFC002A0; - case 0xBFC00328u: goto label_BFC00328; - case 0xBFC003B8u: goto label_BFC003B8; - case 0xBFC003CCu: goto label_BFC003CC; - default: break; - } - } -label_BFC00180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00180: AD280008 sw $t0, 8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00180u); return; } g_debug_last_store_pc = 0xBFC00180u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00184: 3C082009 lui $t0, 0x2009 */ - cpu->gpr[8] = 0x20090000u; - PGXP_ALU(0x3C082009u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00188: 350831E1 ori $t0, $t0, 0x31E1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x31E1u; - PGXP_ALU(0x350831E1u, cpu->gpr[8], _pgx1, 0x31E1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0018Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0018C: AD280014 sw $t0, 20($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0018Cu); return; } g_debug_last_store_pc = 0xBFC0018Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0018Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00190: 3C080002 lui $t0, 0x2 */ - cpu->gpr[8] = 0x00020000u; - PGXP_ALU(0x3C080002u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00194: 35080843 ori $t0, $t0, 0x843 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x843u; - PGXP_ALU(0x35080843u, cpu->gpr[8], _pgx1, 0x0843u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00198: AD280018 sw $t0, 24($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00198u); return; } g_debug_last_store_pc = 0xBFC00198u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0019Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0019C: 24083022 addiu $t0, $zero, 12322 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (12322)); - PGXP_ALU(0x24083022u, cpu->gpr[8], _pgx1, 0x00003022u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0019Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC001A0: AD28000C sw $t0, 12($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001A0u); return; } g_debug_last_store_pc = 0xBFC001A0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD28000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC001A4: 3C080007 lui $t0, 0x7 */ - cpu->gpr[8] = 0x00070000u; - PGXP_ALU(0x3C080007u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC001A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC001A8: 35080777 ori $t0, $t0, 0x777 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x777u; - PGXP_ALU(0x35080777u, cpu->gpr[8], _pgx1, 0x0777u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC001AC: AD28001C sw $t0, 28($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001ACu); return; } g_debug_last_store_pc = 0xBFC001ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD28001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC001B0: 00000825 or $at, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00000825u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC001B4: 00001025 or $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00001025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC001B8: 00001825 or $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00001825u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC001BC: 00002025 or $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00002025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC001C0: 00002825 or $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00002825u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC001C4: 00003025 or $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00003025u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC001C8: 00003825 or $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00003825u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC001CC: 00004025 or $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00004025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC001D0: 00004825 or $t1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00004825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC001D4: 00005025 or $t2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00005025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC001D8: 00005825 or $t3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00005825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC001DC: 00006025 or $t4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00006025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC001E0: 00006825 or $t5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00006825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC001E4: 00007025 or $t6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[14] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00007025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC001E8: 00007825 or $t7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00007825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC001EC: 00008025 or $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00008025u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC001F0: 00008825 or $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00008825u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC001F4: 00009025 or $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00009025u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC001F8: 00009825 or $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x00009825u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC001FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC001FC: 0000A025 or $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000A025u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC001FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC00200: 0000A825 or $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000A825u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC00204: 0000B025 or $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000B025u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC00208: 0000B825 or $s7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000B825u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0020Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0020C: 0000C025 or $t8, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0020Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC00210: 0000C825 or $t9, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC00214: 0000D025 or $k0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[26] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000D025u, cpu->gpr[26], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000001u); -#endif - /* 0xBFC00218: 0000D825 or $k1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[27] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000D825u, cpu->gpr[27], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000001u); -#endif - /* 0xBFC0021C: 0000E025 or $gp, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[28] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000E025u, cpu->gpr[28], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00220: 0000E825 or $sp, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[29] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000E825u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC00224: 0000F025 or $fp, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000F025u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00228: 0000F825 or $ra, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[31] = cpu->gpr[0] | cpu->gpr[0]; - PGXP_ALU(0x0000F825u, cpu->gpr[31], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0022Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0022C: 24090804 addiu $t1, $zero, 2052 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2052)); - PGXP_ALU(0x24090804u, cpu->gpr[9], _pgx1, 0x00000804u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0022Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00230: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC00234: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00234u); return; } g_debug_last_store_pc = 0xBFC00234u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC00238: 3C0C0001 lui $t4, 0x1 */ - cpu->gpr[12] = 0x00010000u; - PGXP_ALU(0x3C0C0001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0023Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0023C: 408C6000 mtc0 $t4, cop0[12] */ - cpu->cop0[12] = cpu->gpr[12]; -#ifdef PSX_COSIM - cosim_instr(0xBFC0023Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00244: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00248: 240A0000 addiu $t2, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x240A0000u, cpu->gpr[10], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0024Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0024C: 240B0F80 addiu $t3, $zero, 3968 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3968)); - PGXP_ALU(0x240B0F80u, cpu->gpr[11], _pgx1, 0x00000F80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0024Cu); -#endif -label_BFC00250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00250: AD400000 sw $zero, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00250u); return; } g_debug_last_store_pc = 0xBFC00250u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00254: AD400010 sw $zero, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00254u); return; } g_debug_last_store_pc = 0xBFC00254u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00258: AD400020 sw $zero, 32($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00258u); return; } g_debug_last_store_pc = 0xBFC00258u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0025Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0025C: AD400030 sw $zero, 48($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0025Cu); return; } g_debug_last_store_pc = 0xBFC0025Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0025Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00260: AD400040 sw $zero, 64($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00260u); return; } g_debug_last_store_pc = 0xBFC00260u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00264: AD400050 sw $zero, 80($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00264u); return; } g_debug_last_store_pc = 0xBFC00264u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00268: AD400060 sw $zero, 96($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00268u); return; } g_debug_last_store_pc = 0xBFC00268u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400060u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0026Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0026C: AD400070 sw $zero, 112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0026Cu); return; } g_debug_last_store_pc = 0xBFC0026Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400070u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0026Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC00270: 154BFFF7 bne $t2, $t3, 0xBFC00250 */ - uint32_t psx_brA_BFC00270 = cpu->gpr[10]; uint32_t psx_brB_BFC00270 = cpu->gpr[11]; - psx_taken_BFC00270 = (psx_brA_BFC00270 != psx_brB_BFC00270); - psx_delay_BFC00270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC00274: 214A0080 addi $t2, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (128); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[10] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214A0080u, cpu->gpr[10], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00274u); -#endif - if (psx_delay_BFC00270) { - psx_delay_BFC00270 = 0; - if (psx_taken_BFC00270) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00250u); - goto label_BFC00250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00278u); - } -label_BFC00278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00278: 40806000 mtc0 $zero, cop0[12] */ - cpu->cop0[12] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0027Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0027C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0027Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00280: 24090800 addiu $t1, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24090800u, cpu->gpr[9], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00284: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC00288: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00288u); return; } g_debug_last_store_pc = 0xBFC00288u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0028C: 408C6000 mtc0 $t4, cop0[12] */ - cpu->cop0[12] = cpu->gpr[12]; -#ifdef PSX_COSIM - cosim_instr(0xBFC0028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00298: 240A0000 addiu $t2, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x240A0000u, cpu->gpr[10], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0029Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0029C: 240B0F80 addiu $t3, $zero, 3968 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3968)); - PGXP_ALU(0x240B0F80u, cpu->gpr[11], _pgx1, 0x00000F80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0029Cu); -#endif -label_BFC002A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC002A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC002A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002A0: AD400000 sw $zero, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002A0u); return; } g_debug_last_store_pc = 0xBFC002A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002A4: AD400004 sw $zero, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002A4u); return; } g_debug_last_store_pc = 0xBFC002A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002A8: AD400008 sw $zero, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002A8u); return; } g_debug_last_store_pc = 0xBFC002A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002AC: AD40000C sw $zero, 12($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002ACu); return; } g_debug_last_store_pc = 0xBFC002ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002B0: AD400010 sw $zero, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002B0u); return; } g_debug_last_store_pc = 0xBFC002B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002B4: AD400014 sw $zero, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002B4u); return; } g_debug_last_store_pc = 0xBFC002B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002B8: AD400018 sw $zero, 24($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002B8u); return; } g_debug_last_store_pc = 0xBFC002B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002BC: AD40001C sw $zero, 28($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002BCu); return; } g_debug_last_store_pc = 0xBFC002BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002C0: AD400020 sw $zero, 32($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002C0u); return; } g_debug_last_store_pc = 0xBFC002C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002C4: AD400024 sw $zero, 36($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002C4u); return; } g_debug_last_store_pc = 0xBFC002C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400024u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002C8: AD400028 sw $zero, 40($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002C8u); return; } g_debug_last_store_pc = 0xBFC002C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400028u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002CC: AD40002C sw $zero, 44($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002CCu); return; } g_debug_last_store_pc = 0xBFC002CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40002Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002D0: AD400030 sw $zero, 48($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002D0u); return; } g_debug_last_store_pc = 0xBFC002D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002D4: AD400034 sw $zero, 52($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002D4u); return; } g_debug_last_store_pc = 0xBFC002D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002D8: AD400038 sw $zero, 56($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002D8u); return; } g_debug_last_store_pc = 0xBFC002D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400038u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002DC: AD40003C sw $zero, 60($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002DCu); return; } g_debug_last_store_pc = 0xBFC002DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40003Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002E0: AD400040 sw $zero, 64($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002E0u); return; } g_debug_last_store_pc = 0xBFC002E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002E4: AD400044 sw $zero, 68($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002E4u); return; } g_debug_last_store_pc = 0xBFC002E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002E8: AD400048 sw $zero, 72($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002E8u); return; } g_debug_last_store_pc = 0xBFC002E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002EC: AD40004C sw $zero, 76($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002ECu); return; } g_debug_last_store_pc = 0xBFC002ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002F0: AD400050 sw $zero, 80($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002F0u); return; } g_debug_last_store_pc = 0xBFC002F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002F4: AD400054 sw $zero, 84($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002F4u); return; } g_debug_last_store_pc = 0xBFC002F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002F8: AD400058 sw $zero, 88($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002F8u); return; } g_debug_last_store_pc = 0xBFC002F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400058u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC002FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC002FC: AD40005C sw $zero, 92($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC002FCu); return; } g_debug_last_store_pc = 0xBFC002FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40005Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC002FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00300: AD400060 sw $zero, 96($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00300u); return; } g_debug_last_store_pc = 0xBFC00300u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400060u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00304: AD400064 sw $zero, 100($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00304u); return; } g_debug_last_store_pc = 0xBFC00304u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400064u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00308: AD400068 sw $zero, 104($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00308u); return; } g_debug_last_store_pc = 0xBFC00308u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400068u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0030C: AD40006C sw $zero, 108($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0030Cu); return; } g_debug_last_store_pc = 0xBFC0030Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40006Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00310: AD400070 sw $zero, 112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00310u); return; } g_debug_last_store_pc = 0xBFC00310u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400070u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00314: AD400074 sw $zero, 116($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00314u); return; } g_debug_last_store_pc = 0xBFC00314u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00318: AD400078 sw $zero, 120($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00318u); return; } g_debug_last_store_pc = 0xBFC00318u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400078u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0031Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0031C: AD40007C sw $zero, 124($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0031Cu); return; } g_debug_last_store_pc = 0xBFC0031Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40007Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0031Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC00320: 154BFFDF bne $t2, $t3, 0xBFC002A0 */ - uint32_t psx_brA_BFC00320 = cpu->gpr[10]; uint32_t psx_brB_BFC00320 = cpu->gpr[11]; - psx_taken_BFC00320 = (psx_brA_BFC00320 != psx_brB_BFC00320); - psx_delay_BFC00320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC00324: 214A0080 addi $t2, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (128); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[10] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214A0080u, cpu->gpr[10], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00324u); -#endif - if (psx_delay_BFC00320) { - psx_delay_BFC00320 = 0; - if (psx_taken_BFC00320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC002A0u); - goto label_BFC002A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00328u); - } -label_BFC00328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00328: 40806000 mtc0 $zero, cop0[12] */ - cpu->cop0[12] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0032Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0032C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0032Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC00330: 3C08A000 lui $t0, 0xA000 */ - cpu->gpr[8] = 0xA0000000u; - PGXP_ALU(0x3C08A000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00334u); -#endif - /* 0xBFC00334: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00334u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00338u); -#endif - /* 0xBFC00338: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00338u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0033Cu); -#endif - /* 0xBFC0033C: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0033Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0033Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00340u); -#endif - /* 0xBFC00340: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00340u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00344u); -#endif - /* 0xBFC00344: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00344u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00348u); -#endif - /* 0xBFC00348: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00348u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0034Cu); -#endif - /* 0xBFC0034C: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0034Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0034Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00350u); -#endif - /* 0xBFC00350: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00350u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00358: 3C090001 lui $t1, 0x1 */ - cpu->gpr[9] = 0x00010000u; - PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0035Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0035C: 3529E988 ori $t1, $t1, 0xE988 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] | 0xE988u; - PGXP_ALU(0x3529E988u, cpu->gpr[9], _pgx1, 0xE988u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0035Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00360: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC00364: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00364u); return; } g_debug_last_store_pc = 0xBFC00364u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00368: 40803800 mtc0 $zero, cop0[7] */ - cpu->cop0[7] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0036Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0036C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0036Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00370: 40801800 mtc0 $zero, cop0[3] */ - cpu->cop0[3] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00374: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00378: 40802800 mtc0 $zero, cop0[5] */ - cpu->cop0[5] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0037Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0037C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0037Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00380: 40803000 mtc0 $zero, cop0[6] */ - cpu->cop0[6] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00388: 40804800 mtc0 $zero, cop0[9] */ - cpu->cop0[9] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0038Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0038C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0038Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00390: 40805800 mtc0 $zero, cop0[11] */ - cpu->cop0[11] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00394: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00398: 40806000 mtc0 $zero, cop0[12] */ - cpu->cop0[12] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC00398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0039Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0039C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0039Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC003A0: 40806800 mtc0 $zero, cop0[13] */ - cpu->cop0[13] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC003A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC003A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC003A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC003A8: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC003A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC003AC: 24429000 addiu $v0, $v0, -28672 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-28672)); - PGXP_ALU(0x24429000u, cpu->gpr[2], _pgx1, 0xFFFF9000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC003B0: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC003B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC003B4: 2463C160 addiu $v1, $v1, -16032 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-16032)); - PGXP_ALU(0x2463C160u, cpu->gpr[3], _pgx1, 0xFFFFC160u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003B4u); -#endif -label_BFC003B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC003B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC003B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC003B8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC003B8u); return; } g_debug_last_store_pc = 0xBFC003B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC003BC: 20420004 addi $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; { int32_t psx_a = (int32_t)cpu->gpr[2]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[2] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC003C0: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC003C4: 1420FFFC bne $at, $zero, 0xBFC003B8 */ - uint32_t psx_brA_BFC003C4 = cpu->gpr[1]; uint32_t psx_brB_BFC003C4 = cpu->gpr[0]; - psx_taken_BFC003C4 = (psx_brA_BFC003C4 != psx_brB_BFC003C4); - psx_delay_BFC003C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC003C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC003C8u); -#endif - if (psx_delay_BFC003C4) { - psx_delay_BFC003C4 = 0; - if (psx_taken_BFC003C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC003B8u); - goto label_BFC003B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC003CCu); - } -label_BFC003CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC003CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC003CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC003CC: 3C1D801F lui $sp, 0x801F */ - cpu->gpr[29] = 0x801F0000u; - PGXP_ALU(0x3C1D801Fu, cpu->gpr[29], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC003CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC003D0: 37BDFF00 ori $sp, $sp, 0xFF00 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = cpu->gpr[29] | 0xFF00u; - PGXP_ALU(0x37BDFF00u, cpu->gpr[29], _pgx1, 0xFF00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000000u); -#endif - /* 0xBFC003D4: 3C1CA001 lui $gp, 0xA001 */ - cpu->gpr[28] = 0xA0010000u; - PGXP_ALU(0x3C1CA001u, cpu->gpr[28], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC003D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000000u); -#endif - /* 0xBFC003D8: 279C0FF0 addiu $gp, $gp, 4080 */ - { uint32_t _pgx1 = cpu->gpr[28]; cpu->gpr[28] = (uint32_t)((int32_t)cpu->gpr[28] + (4080)); - PGXP_ALU(0x279C0FF0u, cpu->gpr[28], _pgx1, 0x00000FF0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000001u); -#endif - /* 0xBFC003DC: 03A0F021 addu $fp, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC003E0: 24080B88 addiu $t0, $zero, 2952 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2952)); - PGXP_ALU(0x24080B88u, cpu->gpr[8], _pgx1, 0x00000B88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC003E4: 3C011F80 lui $at, 0x1F80 */ - cpu->gpr[1] = 0x1F800000u; - PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC003E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC003E8: AC281060 sw $t0, 4192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 4192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC003E8u); return; } g_debug_last_store_pc = 0xBFC003E8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC281060u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC003EC: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC003F0: AC080060 sw $t0, 96($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC003F0u); return; } g_debug_last_store_pc = 0xBFC003F0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC080060u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC003F4: 24020000 addiu $v0, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24020000u, cpu->gpr[2], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC003F8: AC020064 sw $v0, 100($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC003F8u); return; } g_debug_last_store_pc = 0xBFC003F8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC020064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC003FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC003FC: 240800FF addiu $t0, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240800FFu, cpu->gpr[8], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC003FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00400: 3C091F80 lui $t1, 0x1F80 */ - cpu->gpr[9] = 0x1F800000u; - PGXP_ALU(0x3C091F80u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC00404: AC080068 sw $t0, 104($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00404u); return; } g_debug_last_store_pc = 0xBFC00404u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC080068u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00408: 35291C00 ori $t1, $t1, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] | 0x1C00u; - PGXP_ALU(0x35291C00u, cpu->gpr[9], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0040C: A5200180 sh $zero, 384($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0040Cu); return; } g_debug_last_store_pc = 0xBFC0040Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5200180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00410: A5200182 sh $zero, 386($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00410u); return; } g_debug_last_store_pc = 0xBFC00410u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5200182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00414: A5200184 sh $zero, 388($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00414u); return; } g_debug_last_store_pc = 0xBFC00414u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5200184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC00418: 0BF01BB1 j 0xBFC06EC4 */ - psx_delay_BFC00418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0041Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0041C: A5200186 sh $zero, 390($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0041Cu); return; } g_debug_last_store_pc = 0xBFC0041Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5200186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0041Cu); -#endif - if (psx_delay_BFC00418) { - psx_delay_BFC00418 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06EC4u); - cpu->pc = 0xBFC06EC4u; return; - } -} - -void SCPH1001_func_1FC00420(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00420u); - int psx_delay_BFC00444 = 0; - int psx_taken_BFC00444 = 0; - int psx_delay_BFC00454 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00434u: goto label_BFC00434; - case 0xBFC0044Cu: goto label_BFC0044C; - default: break; - } - } -label_BFC00420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00420: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00424: 3C05A000 lui $a1, 0xA000 */ - cpu->gpr[5] = 0xA0000000u; - PGXP_ALU(0x3C05A000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00428: 24840000 addiu $a0, $a0, 0 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (0)); - PGXP_ALU(0x24840000u, cpu->gpr[4], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0042Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0042C: 34068BF0 ori $a2, $zero, 0x8BF0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] | 0x8BF0u; - PGXP_ALU(0x34068BF0u, cpu->gpr[6], _pgx1, 0x8BF0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0042Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00430: 24A50500 addiu $a1, $a1, 1280 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1280)); - PGXP_ALU(0x24A50500u, cpu->gpr[5], _pgx1, 0x00000500u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00430u); -#endif -label_BFC00434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00434u); -#endif - /* 0xBFC00434: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00434u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC00438: 20C6FFFC addi $a2, $a2, -4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (-4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C6FFFCu, cpu->gpr[6], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0043Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0043C: 20840004 addi $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0043Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00440: 20A50004 addi $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00444: 14C0FFFB bne $a2, $zero, 0xBFC00434 */ - uint32_t psx_brA_BFC00444 = cpu->gpr[6]; uint32_t psx_brB_BFC00444 = cpu->gpr[0]; - psx_taken_BFC00444 = (psx_brA_BFC00444 != psx_brB_BFC00444); - psx_delay_BFC00444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC00448: ACA7FFFC sw $a3, -4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00448u); return; } g_debug_last_store_pc = 0xBFC00448u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xACA7FFFCu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00448u); -#endif - if (psx_delay_BFC00444) { - psx_delay_BFC00444 = 0; - if (psx_taken_BFC00444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00434u); - goto label_BFC00434; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0044Cu); - } -label_BFC0044C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0044Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0044Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0044Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0044C: 3C04A000 lui $a0, 0xA000 */ - cpu->gpr[4] = 0xA0000000u; - PGXP_ALU(0x3C04A000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0044Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00450: 24840500 addiu $a0, $a0, 1280 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1280)); - PGXP_ALU(0x24840500u, cpu->gpr[4], _pgx1, 0x00000500u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00454: 00800008 jr $a0 */ - psx_delay_BFC00454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00458u); -#endif - if (psx_delay_BFC00454) { - psx_delay_BFC00454 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[4]); - cpu->pc = cpu->gpr[4]; return; - } -} - -void SCPH1001_func_1FC00678(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00678u); - int psx_delay_BFC00680 = 0; - int psx_delay_BFC00690 = 0; - int psx_delay_BFC006A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00688u: goto label_BFC00688; - case 0xBFC00698u: goto label_BFC00698; - default: break; - } - } -label_BFC00678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00678: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0067Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0067C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0067Cu); return; } g_debug_last_store_pc = 0xBFC0067Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0067Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00680: 0FF00E44 jal 0xBFC03910 */ - cpu->gpr[31] = 0xBFC00688u; /* jal link before delay slot */ - psx_delay_BFC00680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00684: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00684u); -#endif - if (psx_delay_BFC00680) { - psx_delay_BFC00680 = 0; - cpu->gpr[31] = 0xBFC00688u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03910u); - cpu->pc = 0xBFC03910u; return; - } -label_BFC00688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00688: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0068Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0068C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0068Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00690: 0FF001B6 jal 0xBFC006D8 */ - cpu->gpr[31] = 0xBFC00698u; /* jal link before delay slot */ - psx_delay_BFC00690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00694: 24060045 addiu $a2, $zero, 69 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (69)); - PGXP_ALU(0x24060045u, cpu->gpr[6], _pgx1, 0x00000045u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00694u); -#endif - if (psx_delay_BFC00690) { - psx_delay_BFC00690 = 0; - cpu->gpr[31] = 0xBFC00698u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC006D8u); - cpu->pc = 0xBFC006D8u; return; - } -label_BFC00698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00698u); -#endif - /* 0xBFC00698: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00698u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0069Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0069C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0069Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC006A0: 03E00008 jr $ra */ - psx_delay_BFC006A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC006A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC006A4u); -#endif - if (psx_delay_BFC006A0) { - psx_delay_BFC006A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC006A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC006A8u); - int psx_delay_BFC006B0 = 0; - int psx_delay_BFC006C0 = 0; - int psx_delay_BFC006D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC006B8u: goto label_BFC006B8; - case 0xBFC006C8u: goto label_BFC006C8; - default: break; - } - } -label_BFC006A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC006A8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC006AC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006ACu); return; } g_debug_last_store_pc = 0xBFC006ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC006B0: 0FF00E44 jal 0xBFC03910 */ - cpu->gpr[31] = 0xBFC006B8u; /* jal link before delay slot */ - psx_delay_BFC006B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC006B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC006B4u); -#endif - if (psx_delay_BFC006B0) { - psx_delay_BFC006B0 = 0; - cpu->gpr[31] = 0xBFC006B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03910u); - cpu->pc = 0xBFC03910u; return; - } -label_BFC006B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC006B8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC006BC: 24050045 addiu $a1, $zero, 69 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (69)); - PGXP_ALU(0x24050045u, cpu->gpr[5], _pgx1, 0x00000045u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC006C0: 0FF001B6 jal 0xBFC006D8 */ - cpu->gpr[31] = 0xBFC006C8u; /* jal link before delay slot */ - psx_delay_BFC006C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC006C4: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006C4u); -#endif - if (psx_delay_BFC006C0) { - psx_delay_BFC006C0 = 0; - cpu->gpr[31] = 0xBFC006C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC006D8u); - cpu->pc = 0xBFC006D8u; return; - } -label_BFC006C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006C8u); -#endif - /* 0xBFC006C8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC006CC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC006D0: 03E00008 jr $ra */ - psx_delay_BFC006D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC006D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC006D4u); -#endif - if (psx_delay_BFC006D0) { - psx_delay_BFC006D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC006D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC006D8u); - int psx_delay_BFC006EC = 0; - int psx_delay_BFC006F4 = 0; - int psx_delay_BFC00700 = 0; - int psx_delay_BFC0070C = 0; - int psx_delay_BFC00714 = 0; - int psx_delay_BFC00720 = 0; - int psx_delay_BFC00728 = 0; - int psx_delay_BFC00734 = 0; - int psx_delay_BFC00760 = 0; - int psx_delay_BFC00770 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC006F4u: goto label_BFC006F4; - case 0xBFC006FCu: goto label_BFC006FC; - case 0xBFC00708u: goto label_BFC00708; - case 0xBFC00714u: goto label_BFC00714; - case 0xBFC0071Cu: goto label_BFC0071C; - case 0xBFC00728u: goto label_BFC00728; - case 0xBFC00730u: goto label_BFC00730; - case 0xBFC0073Cu: goto label_BFC0073C; - case 0xBFC00768u: goto label_BFC00768; - default: break; - } - } -label_BFC006D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC006D8: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC006DC: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006DCu); return; } g_debug_last_store_pc = 0xBFC006DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC006E0: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006E0u); return; } g_debug_last_store_pc = 0xBFC006E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC006E4: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006E4u); return; } g_debug_last_store_pc = 0xBFC006E4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC006E8: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC006E8u); return; } g_debug_last_store_pc = 0xBFC006E8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC006EC: 0FF00FE3 jal 0xBFC03F8C */ - cpu->gpr[31] = 0xBFC006F4u; /* jal link before delay slot */ - psx_delay_BFC006EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC006F0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC006F0u); -#endif - if (psx_delay_BFC006EC) { - psx_delay_BFC006EC = 0; - cpu->gpr[31] = 0xBFC006F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F8Cu); - cpu->pc = 0xBFC03F8Cu; return; - } -label_BFC006F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC006F4: 0FF00FE3 jal 0xBFC03F8C */ - cpu->gpr[31] = 0xBFC006FCu; /* jal link before delay slot */ - psx_delay_BFC006F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC006F8: 3C040300 lui $a0, 0x300 */ - cpu->gpr[4] = 0x03000000u; - PGXP_ALU(0x3C040300u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC006F8u); -#endif - if (psx_delay_BFC006F4) { - psx_delay_BFC006F4 = 0; - cpu->gpr[31] = 0xBFC006FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F8Cu); - cpu->pc = 0xBFC03F8Cu; return; - } -label_BFC006FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC006FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC006FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC006FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC006FC: 3C0406C4 lui $a0, 0x6C4 */ - cpu->gpr[4] = 0x06C40000u; - PGXP_ALU(0x3C0406C4u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC006FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00700: 0FF00FE3 jal 0xBFC03F8C */ - cpu->gpr[31] = 0xBFC00708u; /* jal link before delay slot */ - psx_delay_BFC00700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00704: 34840240 ori $a0, $a0, 0x240 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x240u; - PGXP_ALU(0x34840240u, cpu->gpr[4], _pgx1, 0x0240u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00704u); -#endif - if (psx_delay_BFC00700) { - psx_delay_BFC00700 = 0; - cpu->gpr[31] = 0xBFC00708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F8Cu); - cpu->pc = 0xBFC03F8Cu; return; - } -label_BFC00708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00708: 3C04E100 lui $a0, 0xE100 */ - cpu->gpr[4] = 0xE1000000u; - PGXP_ALU(0x3C04E100u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0070Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0070C: 0FF00FEB jal 0xBFC03FAC */ - cpu->gpr[31] = 0xBFC00714u; /* jal link before delay slot */ - psx_delay_BFC0070C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00710: 34840400 ori $a0, $a0, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x400u; - PGXP_ALU(0x34840400u, cpu->gpr[4], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00710u); -#endif - if (psx_delay_BFC0070C) { - psx_delay_BFC0070C = 0; - cpu->gpr[31] = 0xBFC00714u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FACu); - cpu->pc = 0xBFC03FACu; return; - } -label_BFC00714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00714: 0FF00FEB jal 0xBFC03FAC */ - cpu->gpr[31] = 0xBFC0071Cu; /* jal link before delay slot */ - psx_delay_BFC00714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00718: 3C04E300 lui $a0, 0xE300 */ - cpu->gpr[4] = 0xE3000000u; - PGXP_ALU(0x3C04E300u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00718u); -#endif - if (psx_delay_BFC00714) { - psx_delay_BFC00714 = 0; - cpu->gpr[31] = 0xBFC0071Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FACu); - cpu->pc = 0xBFC03FACu; return; - } -label_BFC0071C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0071Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0071Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0071Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0071C: 3C04E407 lui $a0, 0xE407 */ - cpu->gpr[4] = 0xE4070000u; - PGXP_ALU(0x3C04E407u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0071Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00720: 0FF00FEB jal 0xBFC03FAC */ - cpu->gpr[31] = 0xBFC00728u; /* jal link before delay slot */ - psx_delay_BFC00720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00724: 3484FFFF ori $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xFFFFu; - PGXP_ALU(0x3484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00724u); -#endif - if (psx_delay_BFC00720) { - psx_delay_BFC00720 = 0; - cpu->gpr[31] = 0xBFC00728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FACu); - cpu->pc = 0xBFC03FACu; return; - } -label_BFC00728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00728: 0FF00FEB jal 0xBFC03FAC */ - cpu->gpr[31] = 0xBFC00730u; /* jal link before delay slot */ - psx_delay_BFC00728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0072Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0072C: 3C04E500 lui $a0, 0xE500 */ - cpu->gpr[4] = 0xE5000000u; - PGXP_ALU(0x3C04E500u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0072Cu); -#endif - if (psx_delay_BFC00728) { - psx_delay_BFC00728 = 0; - cpu->gpr[31] = 0xBFC00730u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FACu); - cpu->pc = 0xBFC03FACu; return; - } -label_BFC00730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00730: 3C040800 lui $a0, 0x800 */ - cpu->gpr[4] = 0x08000000u; - PGXP_ALU(0x3C040800u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00734: 0FF00FE3 jal 0xBFC03F8C */ - cpu->gpr[31] = 0xBFC0073Cu; /* jal link before delay slot */ - psx_delay_BFC00734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00738: 34840023 ori $a0, $a0, 0x23 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x23u; - PGXP_ALU(0x34840023u, cpu->gpr[4], _pgx1, 0x0023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00738u); -#endif - if (psx_delay_BFC00734) { - psx_delay_BFC00734 = 0; - cpu->gpr[31] = 0xBFC0073Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F8Cu); - cpu->pc = 0xBFC03F8Cu; return; - } -label_BFC0073C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0073Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0073Cu); -#endif - /* 0xBFC0073C: 8FAE0038 lw $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0073Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00740u); -#endif - /* 0xBFC00740: 8FAF003C lw $t7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00740u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00744u); -#endif - /* 0xBFC00744: 8FB80040 lw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00744u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC00748: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00748u); return; } g_debug_last_store_pc = 0xBFC00748u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0074Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0074C: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0074Cu); return; } g_debug_last_store_pc = 0xBFC0074Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0074Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00750: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC00754: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00758: 24060280 addiu $a2, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24060280u, cpu->gpr[6], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0075Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0075C: 240700F0 addiu $a3, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240700F0u, cpu->gpr[7], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0075Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00760: 0FF00204 jal 0xBFC00810 */ - cpu->gpr[31] = 0xBFC00768u; /* jal link before delay slot */ - psx_delay_BFC00760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC00764: AFB80018 sw $t8, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00764u); return; } g_debug_last_store_pc = 0xBFC00764u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00764u); -#endif - if (psx_delay_BFC00760) { - psx_delay_BFC00760 = 0; - cpu->gpr[31] = 0xBFC00768u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00810u); - cpu->pc = 0xBFC00810u; return; - } -label_BFC00768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00768u); -#endif - /* 0xBFC00768: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00768u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0076Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0076C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0076Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00770: 03E00008 jr $ra */ - psx_delay_BFC00770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00774u); -#endif - if (psx_delay_BFC00770) { - psx_delay_BFC00770 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC00778(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00778u); - int psx_delay_BFC00798 = 0; - int psx_delay_BFC007B8 = 0; - int psx_delay_BFC007D8 = 0; - int psx_delay_BFC007F8 = 0; - int psx_delay_BFC00808 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC007A0u: goto label_BFC007A0; - case 0xBFC007C0u: goto label_BFC007C0; - case 0xBFC007E0u: goto label_BFC007E0; - case 0xBFC00800u: goto label_BFC00800; - default: break; - } - } -label_BFC00778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00778: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0077C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0077Cu); return; } g_debug_last_store_pc = 0xBFC0077Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00780: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00780u); return; } g_debug_last_store_pc = 0xBFC00780u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00784: AFA00014 sw $zero, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00784u); return; } g_debug_last_store_pc = 0xBFC00784u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00788: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00788u); return; } g_debug_last_store_pc = 0xBFC00788u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0078C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC00790: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00794: 24060201 addiu $a2, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24060201u, cpu->gpr[6], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00798: 0FF00204 jal 0xBFC00810 */ - cpu->gpr[31] = 0xBFC007A0u; /* jal link before delay slot */ - psx_delay_BFC00798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0079Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0079C: 24070101 addiu $a3, $zero, 257 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); - PGXP_ALU(0x24070101u, cpu->gpr[7], _pgx1, 0x00000101u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0079Cu); -#endif - if (psx_delay_BFC00798) { - psx_delay_BFC00798 = 0; - cpu->gpr[31] = 0xBFC007A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00810u); - cpu->pc = 0xBFC00810u; return; - } -label_BFC007A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC007A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC007A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007A0: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007A0u); return; } g_debug_last_store_pc = 0xBFC007A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007A4: AFA00014 sw $zero, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007A4u); return; } g_debug_last_store_pc = 0xBFC007A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC007A8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC007AC: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC007B0: 24060201 addiu $a2, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24060201u, cpu->gpr[6], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC007B4: 24070101 addiu $a3, $zero, 257 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); - PGXP_ALU(0x24070101u, cpu->gpr[7], _pgx1, 0x00000101u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC007B8: 0FF00204 jal 0xBFC00810 */ - cpu->gpr[31] = 0xBFC007C0u; /* jal link before delay slot */ - psx_delay_BFC007B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007BC: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007BCu); return; } g_debug_last_store_pc = 0xBFC007BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007BCu); -#endif - if (psx_delay_BFC007B8) { - psx_delay_BFC007B8 = 0; - cpu->gpr[31] = 0xBFC007C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00810u); - cpu->pc = 0xBFC00810u; return; - } -label_BFC007C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC007C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC007C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007C0: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007C0u); return; } g_debug_last_store_pc = 0xBFC007C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007C4: AFA00014 sw $zero, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007C4u); return; } g_debug_last_store_pc = 0xBFC007C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC007C8: 24040200 addiu $a0, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24040200u, cpu->gpr[4], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC007CC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC007D0: 24060201 addiu $a2, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24060201u, cpu->gpr[6], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC007D4: 24070101 addiu $a3, $zero, 257 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); - PGXP_ALU(0x24070101u, cpu->gpr[7], _pgx1, 0x00000101u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC007D8: 0FF00204 jal 0xBFC00810 */ - cpu->gpr[31] = 0xBFC007E0u; /* jal link before delay slot */ - psx_delay_BFC007D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007DC: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007DCu); return; } g_debug_last_store_pc = 0xBFC007DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007DCu); -#endif - if (psx_delay_BFC007D8) { - psx_delay_BFC007D8 = 0; - cpu->gpr[31] = 0xBFC007E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00810u); - cpu->pc = 0xBFC00810u; return; - } -label_BFC007E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC007E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC007E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007E0: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007E0u); return; } g_debug_last_store_pc = 0xBFC007E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007E4: AFA00014 sw $zero, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007E4u); return; } g_debug_last_store_pc = 0xBFC007E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC007E8: 24040200 addiu $a0, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24040200u, cpu->gpr[4], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC007EC: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC007F0: 24060201 addiu $a2, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24060201u, cpu->gpr[6], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC007F4: 24070101 addiu $a3, $zero, 257 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); - PGXP_ALU(0x24070101u, cpu->gpr[7], _pgx1, 0x00000101u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC007F8: 0FF00204 jal 0xBFC00810 */ - cpu->gpr[31] = 0xBFC00800u; /* jal link before delay slot */ - psx_delay_BFC007F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC007FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC007FC: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007FCu); return; } g_debug_last_store_pc = 0xBFC007FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC007FCu); -#endif - if (psx_delay_BFC007F8) { - psx_delay_BFC007F8 = 0; - cpu->gpr[31] = 0xBFC00800u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00810u); - cpu->pc = 0xBFC00810u; return; - } -label_BFC00800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00800u); -#endif - /* 0xBFC00800: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00800u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00804: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00808: 03E00008 jr $ra */ - psx_delay_BFC00808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0080Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0080C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0080Cu); -#endif - if (psx_delay_BFC00808) { - psx_delay_BFC00808 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC00810(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00810u); - int psx_delay_BFC00888 = 0; - int psx_delay_BFC00898 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00890u: goto label_BFC00890; - default: break; - } - } -label_BFC00810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00810: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00814u); -#endif - /* 0xBFC00814: 8FAE0060 lw $t6, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00814u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0060u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00818u); -#endif - /* 0xBFC00818: 8FAB005C lw $t3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00818u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB005Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0081Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0081C: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0081Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC00820: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC00824: 3C012800 lui $at, 0x2800 */ - cpu->gpr[1] = 0x28000000u; - PGXP_ALU(0x3C012800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC00828: 316C00FF andi $t4, $t3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu; - PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0082Cu); -#endif - /* 0xBFC0082C: 8FAF0058 lw $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0082Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0082Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x421u); -#endif - /* 0xBFC00830: 00A05021 addu $t2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A05021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC00834: 000C6A00 sll $t5, $t4, 8 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 8u; - PGXP_ALU(0x000C6A00u, cpu->gpr[13], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC00838: 0301C825 or $t9, $t8, $at */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[1]; - PGXP_ALU(0x0301C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0083Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0083C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0083Cu); return; } g_debug_last_store_pc = 0xBFC0083Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0083Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC00840: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006000u); -#endif - /* 0xBFC00844: 032D7025 or $t6, $t9, $t5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[13]; - PGXP_ALU(0x032D7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x680u); -#endif - /* 0xBFC00848: 01474821 addu $t1, $t2, $a3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[10] + cpu->gpr[7]; - PGXP_ALU(0x01474821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0084Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC0084C: 000A1400 sll $v0, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A1400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0084Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x148u); -#endif - /* 0xBFC00850: 00664021 addu $t0, $v1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[6]; - PGXP_ALU(0x00664021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC00854: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC00858: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0085Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004800u); -#endif - /* 0xBFC0085C: 01D85825 or $t3, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[11] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D85825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0085Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC00860: AFAB0034 sw $t3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00860u); return; } g_debug_last_store_pc = 0xBFC00860u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100Cu); -#endif - /* 0xBFC00864: 00436025 or $t4, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[2] | cpu->gpr[3]; - PGXP_ALU(0x00436025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC00868: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00868u); return; } g_debug_last_store_pc = 0xBFC00868u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC0086C: 0048C825 or $t9, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[2] | cpu->gpr[8]; - PGXP_ALU(0x0048C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2208u); -#endif - /* 0xBFC00870: 01236825 or $t5, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[9] | cpu->gpr[3]; - PGXP_ALU(0x01236825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8300u); -#endif - /* 0xBFC00874: 01287825 or $t7, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[9] | cpu->gpr[8]; - PGXP_ALU(0x01287825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC00878: AFB9003C sw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00878u); return; } g_debug_last_store_pc = 0xBFC00878u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC0087C: AFAD0040 sw $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0087Cu); return; } g_debug_last_store_pc = 0xBFC0087Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC00880: AFAF0044 sw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00880u); return; } g_debug_last_store_pc = 0xBFC00880u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC00884: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00888: 0FF00FF8 jal 0xBFC03FE0 */ - cpu->gpr[31] = 0xBFC00890u; /* jal link before delay slot */ - psx_delay_BFC00888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0088Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0088C: 24050005 addiu $a1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24050005u, cpu->gpr[5], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0088Cu); -#endif - if (psx_delay_BFC00888) { - psx_delay_BFC00888 = 0; - cpu->gpr[31] = 0xBFC00890u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FE0u); - cpu->pc = 0xBFC03FE0u; return; - } -label_BFC00890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00890u); -#endif - /* 0xBFC00890: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00890u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00894: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00898: 03E00008 jr $ra */ - psx_delay_BFC00898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0089Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0089C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0089Cu); -#endif - if (psx_delay_BFC00898) { - psx_delay_BFC00898 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC008A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC008A0u); - int psx_delay_BFC008C4 = 0; - int psx_taken_BFC008C4 = 0; - int psx_delay_BFC008E4 = 0; - int psx_delay_BFC008FC = 0; - int psx_delay_BFC00914 = 0; - int psx_delay_BFC0092C = 0; - int psx_delay_BFC0093C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC008BCu: goto label_BFC008BC; - case 0xBFC008CCu: goto label_BFC008CC; - case 0xBFC008ECu: goto label_BFC008EC; - case 0xBFC00904u: goto label_BFC00904; - case 0xBFC0091Cu: goto label_BFC0091C; - case 0xBFC00934u: goto label_BFC00934; - default: break; - } - } -label_BFC008A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC008A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC008A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC008A0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC008A4: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008A4u); return; } g_debug_last_store_pc = 0xBFC008A4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC008A8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008A8u); return; } g_debug_last_store_pc = 0xBFC008A8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC008AC: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008ACu); return; } g_debug_last_store_pc = 0xBFC008ACu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC008B0: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC008B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC008B8: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008B8u); -#endif -label_BFC008BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC008BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC008BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC008BC: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC008C0: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008C0u); return; } g_debug_last_store_pc = 0xBFC008C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC008C4: 1444FFFD bne $v0, $a0, 0xBFC008BC */ - uint32_t psx_brA_BFC008C4 = cpu->gpr[2]; uint32_t psx_brB_BFC008C4 = cpu->gpr[4]; - psx_taken_BFC008C4 = (psx_brA_BFC008C4 != psx_brB_BFC008C4); - psx_delay_BFC008C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC008C8: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008C8u); -#endif - if (psx_delay_BFC008C4) { - psx_delay_BFC008C4 = 0; - if (psx_taken_BFC008C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC008BCu); - goto label_BFC008BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC008CCu); - } -label_BFC008CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC008CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC008CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008CCu); -#endif - /* 0xBFC008CC: 8FAE0030 lw $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC008D0: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC008D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC008D4: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC008D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008D8u); -#endif - /* 0xBFC008D8: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC008DC: A0000180 sb $zero, 384($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 384; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC008DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (384)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0000180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC008E0: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008E0u); return; } g_debug_last_store_pc = 0xBFC008E0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC008E4: 0FF00251 jal 0xBFC00944 */ - cpu->gpr[31] = 0xBFC008ECu; /* jal link before delay slot */ - psx_delay_BFC008E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC008E8: 24C6DD10 addiu $a2, $a2, -8944 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-8944)); - PGXP_ALU(0x24C6DD10u, cpu->gpr[6], _pgx1, 0xFFFFDD10u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008E8u); -#endif - if (psx_delay_BFC008E4) { - psx_delay_BFC008E4 = 0; - cpu->gpr[31] = 0xBFC008ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00944u); - cpu->pc = 0xBFC00944u; return; - } -label_BFC008EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC008ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC008ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008ECu); -#endif - /* 0xBFC008EC: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008F0u); -#endif - /* 0xBFC008F0: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC008F0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC008F4: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC008F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC008F8: 24C6DD14 addiu $a2, $a2, -8940 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-8940)); - PGXP_ALU(0x24C6DD14u, cpu->gpr[6], _pgx1, 0xFFFFDD14u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC008F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC008FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC008FC: 0FF00251 jal 0xBFC00944 */ - cpu->gpr[31] = 0xBFC00904u; /* jal link before delay slot */ - psx_delay_BFC008FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00900: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00900u); -#endif - if (psx_delay_BFC008FC) { - psx_delay_BFC008FC = 0; - cpu->gpr[31] = 0xBFC00904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00944u); - cpu->pc = 0xBFC00944u; return; - } -label_BFC00904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00904u); -#endif - /* 0xBFC00904: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00904u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00908u); -#endif - /* 0xBFC00908: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00908u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0090Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0090C: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0090Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC00910: 24C6DD1C addiu $a2, $a2, -8932 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-8932)); - PGXP_ALU(0x24C6DD1Cu, cpu->gpr[6], _pgx1, 0xFFFFDD1Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00914: 0FF00251 jal 0xBFC00944 */ - cpu->gpr[31] = 0xBFC0091Cu; /* jal link before delay slot */ - psx_delay_BFC00914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00918: 24A50008 addiu $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (8)); - PGXP_ALU(0x24A50008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00918u); -#endif - if (psx_delay_BFC00914) { - psx_delay_BFC00914 = 0; - cpu->gpr[31] = 0xBFC0091Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00944u); - cpu->pc = 0xBFC00944u; return; - } -label_BFC0091C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0091Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0091Cu); -#endif - /* 0xBFC0091C: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0091Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00920u); -#endif - /* 0xBFC00920: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00920u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC00924: 3C07BFC1 lui $a3, 0xBFC1 */ - cpu->gpr[7] = 0xBFC10000u; - PGXP_ALU(0x3C07BFC1u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC00928: 24E7DD24 addiu $a3, $a3, -8924 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-8924)); - PGXP_ALU(0x24E7DD24u, cpu->gpr[7], _pgx1, 0xFFFFDD24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0092Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0092C: 0FF002DF jal 0xBFC00B7C */ - cpu->gpr[31] = 0xBFC00934u; /* jal link before delay slot */ - psx_delay_BFC0092C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00930: 24060180 addiu $a2, $zero, 384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (384)); - PGXP_ALU(0x24060180u, cpu->gpr[6], _pgx1, 0x00000180u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00930u); -#endif - if (psx_delay_BFC0092C) { - psx_delay_BFC0092C = 0; - cpu->gpr[31] = 0xBFC00934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B7Cu); - cpu->pc = 0xBFC00B7Cu; return; - } -label_BFC00934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00934u); -#endif - /* 0xBFC00934: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00934u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00938: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0093Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0093C: 03E00008 jr $ra */ - psx_delay_BFC0093C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00940u); -#endif - if (psx_delay_BFC0093C) { - psx_delay_BFC0093C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC00944(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00944u); - int psx_delay_BFC00968 = 0; - int psx_taken_BFC00968 = 0; - int psx_delay_BFC00970 = 0; - int psx_taken_BFC00970 = 0; - int psx_delay_BFC00978 = 0; - int psx_delay_BFC00988 = 0; - int psx_delay_BFC00990 = 0; - int psx_taken_BFC00990 = 0; - int psx_delay_BFC00998 = 0; - int psx_taken_BFC00998 = 0; - int psx_delay_BFC009AC = 0; - int psx_taken_BFC009AC = 0; - int psx_delay_BFC009B4 = 0; - int psx_taken_BFC009B4 = 0; - int psx_delay_BFC009C4 = 0; - int psx_taken_BFC009C4 = 0; - int psx_delay_BFC009D4 = 0; - int psx_taken_BFC009D4 = 0; - int psx_delay_BFC009DC = 0; - int psx_delay_BFC009EC = 0; - int psx_delay_BFC009F4 = 0; - int psx_taken_BFC009F4 = 0; - int psx_delay_BFC009FC = 0; - int psx_delay_BFC00A28 = 0; - int psx_taken_BFC00A28 = 0; - int psx_delay_BFC00A30 = 0; - int psx_taken_BFC00A30 = 0; - int psx_delay_BFC00A38 = 0; - int psx_taken_BFC00A38 = 0; - int psx_delay_BFC00A5C = 0; - int psx_taken_BFC00A5C = 0; - int psx_delay_BFC00A64 = 0; - int psx_taken_BFC00A64 = 0; - int psx_delay_BFC00A6C = 0; - int psx_taken_BFC00A6C = 0; - int psx_delay_BFC00A74 = 0; - int psx_taken_BFC00A74 = 0; - int psx_delay_BFC00A9C = 0; - int psx_taken_BFC00A9C = 0; - int psx_delay_BFC00AA4 = 0; - int psx_taken_BFC00AA4 = 0; - int psx_delay_BFC00AAC = 0; - int psx_taken_BFC00AAC = 0; - int psx_delay_BFC00AD4 = 0; - int psx_taken_BFC00AD4 = 0; - int psx_delay_BFC00AE0 = 0; - int psx_taken_BFC00AE0 = 0; - int psx_delay_BFC00AEC = 0; - int psx_taken_BFC00AEC = 0; - int psx_delay_BFC00AFC = 0; - int psx_taken_BFC00AFC = 0; - int psx_delay_BFC00B04 = 0; - int psx_delay_BFC00B40 = 0; - int psx_taken_BFC00B40 = 0; - int psx_delay_BFC00B5C = 0; - int psx_delay_BFC00B74 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00970u: goto label_BFC00970; - case 0xBFC00978u: goto label_BFC00978; - case 0xBFC00980u: goto label_BFC00980; - case 0xBFC00990u: goto label_BFC00990; - case 0xBFC00998u: goto label_BFC00998; - case 0xBFC009A0u: goto label_BFC009A0; - case 0xBFC009A4u: goto label_BFC009A4; - case 0xBFC009B4u: goto label_BFC009B4; - case 0xBFC009BCu: goto label_BFC009BC; - case 0xBFC009CCu: goto label_BFC009CC; - case 0xBFC009DCu: goto label_BFC009DC; - case 0xBFC009E4u: goto label_BFC009E4; - case 0xBFC009F4u: goto label_BFC009F4; - case 0xBFC009FCu: goto label_BFC009FC; - case 0xBFC00A04u: goto label_BFC00A04; - case 0xBFC00A30u: goto label_BFC00A30; - case 0xBFC00A38u: goto label_BFC00A38; - case 0xBFC00A40u: goto label_BFC00A40; - case 0xBFC00A64u: goto label_BFC00A64; - case 0xBFC00A6Cu: goto label_BFC00A6C; - case 0xBFC00A74u: goto label_BFC00A74; - case 0xBFC00A7Cu: goto label_BFC00A7C; - case 0xBFC00AA4u: goto label_BFC00AA4; - case 0xBFC00AACu: goto label_BFC00AAC; - case 0xBFC00AB4u: goto label_BFC00AB4; - case 0xBFC00ADCu: goto label_BFC00ADC; - case 0xBFC00AE0u: goto label_BFC00AE0; - case 0xBFC00AE8u: goto label_BFC00AE8; - case 0xBFC00AECu: goto label_BFC00AEC; - case 0xBFC00AF4u: goto label_BFC00AF4; - case 0xBFC00B04u: goto label_BFC00B04; - case 0xBFC00B0Cu: goto label_BFC00B0C; - case 0xBFC00B20u: goto label_BFC00B20; - case 0xBFC00B48u: goto label_BFC00B48; - case 0xBFC00B64u: goto label_BFC00B64; - case 0xBFC00B68u: goto label_BFC00B68; - default: break; - } - } -label_BFC00944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00944: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC00948: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00948u); return; } g_debug_last_store_pc = 0xBFC00948u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0094C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC00950: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00950u); return; } g_debug_last_store_pc = 0xBFC00950u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC00954: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00954u); return; } g_debug_last_store_pc = 0xBFC00954u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC00958: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00958u); return; } g_debug_last_store_pc = 0xBFC00958u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0095Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0095C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0095Cu); return; } g_debug_last_store_pc = 0xBFC0095Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0095Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00960u); -#endif - /* 0xBFC00960: 822E0000 lb $t6, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 14, 0x20000u); - PGXP_LOAD(0x822E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC00964: 00C09021 addu $s2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC00968: 15C00003 bne $t6, $zero, 0xBFC00978 */ - uint32_t psx_brA_BFC00968 = cpu->gpr[14]; uint32_t psx_brB_BFC00968 = cpu->gpr[0]; - psx_taken_BFC00968 = (psx_brA_BFC00968 != psx_brB_BFC00968); - psx_delay_BFC00968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0096Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC0096C: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0096Cu); -#endif - if (psx_delay_BFC00968) { - psx_delay_BFC00968 = 0; - if (psx_taken_BFC00968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00978u); - goto label_BFC00978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00970u); - } -label_BFC00970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00970: 10000022 beq $zero, $zero, 0xBFC009FC */ - uint32_t psx_brA_BFC00970 = cpu->gpr[0]; uint32_t psx_brB_BFC00970 = cpu->gpr[0]; - psx_taken_BFC00970 = (psx_brA_BFC00970 == psx_brB_BFC00970); - psx_delay_BFC00970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00974: 2411000A addiu $s1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2411000Au, cpu->gpr[17], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00974u); -#endif - if (psx_delay_BFC00970) { - psx_delay_BFC00970 = 0; - if (psx_taken_BFC00970) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009FCu); - goto label_BFC009FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00978u); - } -label_BFC00978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00978: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC00980u; /* jal link before delay slot */ - psx_delay_BFC00978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0097C: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0097Cu); -#endif - if (psx_delay_BFC00978) { - psx_delay_BFC00978 = 0; - cpu->gpr[31] = 0xBFC00980u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC00980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC00980: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC00984: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00988: 0FF00CC4 jal 0xBFC03310 */ - cpu->gpr[31] = 0xBFC00990u; /* jal link before delay slot */ - psx_delay_BFC00988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0098Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC0098C: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0098Cu); -#endif - if (psx_delay_BFC00988) { - psx_delay_BFC00988 = 0; - cpu->gpr[31] = 0xBFC00990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03310u); - cpu->pc = 0xBFC03310u; return; - } -label_BFC00990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00990: 14400004 bne $v0, $zero, 0xBFC009A4 */ - uint32_t psx_brA_BFC00990 = cpu->gpr[2]; uint32_t psx_brB_BFC00990 = cpu->gpr[0]; - psx_taken_BFC00990 = (psx_brA_BFC00990 != psx_brB_BFC00990); - psx_delay_BFC00990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00994: 2411000A addiu $s1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2411000Au, cpu->gpr[17], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00994u); -#endif - if (psx_delay_BFC00990) { - psx_delay_BFC00990 = 0; - if (psx_taken_BFC00990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009A4u); - goto label_BFC009A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00998u); - } -label_BFC00998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00998: 10000018 beq $zero, $zero, 0xBFC009FC */ - uint32_t psx_brA_BFC00998 = cpu->gpr[0]; uint32_t psx_brB_BFC00998 = cpu->gpr[0]; - psx_taken_BFC00998 = (psx_brA_BFC00998 == psx_brB_BFC00998); - psx_delay_BFC00998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0099Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0099C: 2411000A addiu $s1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2411000Au, cpu->gpr[17], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0099Cu); -#endif - if (psx_delay_BFC00998) { - psx_delay_BFC00998 = 0; - if (psx_taken_BFC00998) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009FCu); - goto label_BFC009FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009A0u); - } -label_BFC009A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC009A0: 2411000A addiu $s1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2411000Au, cpu->gpr[17], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009A0u); -#endif -label_BFC009A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009A4u); -#endif - /* 0xBFC009A4: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC009A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC009A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC009AC: 12240007 beq $s1, $a0, 0xBFC009CC */ - uint32_t psx_brA_BFC009AC = cpu->gpr[17]; uint32_t psx_brB_BFC009AC = cpu->gpr[4]; - psx_taken_BFC009AC = (psx_brA_BFC009AC == psx_brB_BFC009AC); - psx_delay_BFC009AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC009B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC009B0u); -#endif - if (psx_delay_BFC009AC) { - psx_delay_BFC009AC = 0; - if (psx_taken_BFC009AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009CCu); - goto label_BFC009CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009B4u); - } -label_BFC009B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC009B4: 1080006C beq $a0, $zero, 0xBFC00B68 */ - uint32_t psx_brA_BFC009B4 = cpu->gpr[4]; uint32_t psx_brB_BFC009B4 = cpu->gpr[0]; - psx_taken_BFC009B4 = (psx_brA_BFC009B4 == psx_brB_BFC009B4); - psx_delay_BFC009B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009B8u); -#endif - /* 0xBFC009B8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC009B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009B8u); -#endif - if (psx_delay_BFC009B4) { - psx_delay_BFC009B4 = 0; - if (psx_taken_BFC009B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009BCu); - } -label_BFC009BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009BCu); -#endif - /* 0xBFC009BC: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC009C0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC009C4: 1624FFFB bne $s1, $a0, 0xBFC009B4 */ - uint32_t psx_brA_BFC009C4 = cpu->gpr[17]; uint32_t psx_brB_BFC009C4 = cpu->gpr[4]; - psx_taken_BFC009C4 = (psx_brA_BFC009C4 != psx_brB_BFC009C4); - psx_delay_BFC009C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC009C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC009C8u); -#endif - if (psx_delay_BFC009C4) { - psx_delay_BFC009C4 = 0; - if (psx_taken_BFC009C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009B4u); - goto label_BFC009B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009CCu); - } -label_BFC009CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009CCu); -#endif - /* 0xBFC009CC: 820F0001 lb $t7, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 15, 0x10000u); - PGXP_LOAD(0x820F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC009D0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC009D4: 11E00009 beq $t7, $zero, 0xBFC009FC */ - uint32_t psx_brA_BFC009D4 = cpu->gpr[15]; uint32_t psx_brB_BFC009D4 = cpu->gpr[0]; - psx_taken_BFC009D4 = (psx_brA_BFC009D4 == psx_brB_BFC009D4); - psx_delay_BFC009D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC009D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC009D8u); -#endif - if (psx_delay_BFC009D4) { - psx_delay_BFC009D4 = 0; - if (psx_taken_BFC009D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009FCu); - goto label_BFC009FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009DCu); - } -label_BFC009DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC009DC: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC009E4u; /* jal link before delay slot */ - psx_delay_BFC009DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC009E0: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009E0u); -#endif - if (psx_delay_BFC009DC) { - psx_delay_BFC009DC = 0; - cpu->gpr[31] = 0xBFC009E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC009E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC009E4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC009E8: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC009EC: 0FF00CC4 jal 0xBFC03310 */ - cpu->gpr[31] = 0xBFC009F4u; /* jal link before delay slot */ - psx_delay_BFC009EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC009F0: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC009F0u); -#endif - if (psx_delay_BFC009EC) { - psx_delay_BFC009EC = 0; - cpu->gpr[31] = 0xBFC009F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03310u); - cpu->pc = 0xBFC03310u; return; - } -label_BFC009F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC009F4: 1440FFEB bne $v0, $zero, 0xBFC009A4 */ - uint32_t psx_brA_BFC009F4 = cpu->gpr[2]; uint32_t psx_brB_BFC009F4 = cpu->gpr[0]; - psx_taken_BFC009F4 = (psx_brA_BFC009F4 != psx_brB_BFC009F4); - psx_delay_BFC009F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC009F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC009F8u); -#endif - if (psx_delay_BFC009F4) { - psx_delay_BFC009F4 = 0; - if (psx_taken_BFC009F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009A4u); - goto label_BFC009A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC009FCu); - } -label_BFC009FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC009FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC009FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC009FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC009FC: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC00A04u; /* jal link before delay slot */ - psx_delay_BFC009FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC00A00: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A00u); -#endif - if (psx_delay_BFC009FC) { - psx_delay_BFC009FC = 0; - cpu->gpr[31] = 0xBFC00A04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC00A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC00A04: 02028021 addu $s0, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[2]; - PGXP_ALU(0x02028021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A08u); -#endif - /* 0xBFC00A08: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00A0C: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00A10: 24A5DDB0 addiu $a1, $a1, -8784 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8784)); - PGXP_ALU(0x24A5DDB0u, cpu->gpr[5], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC00A14: 309800FF andi $t8, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x309800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC00A18: 00B8C821 addu $t9, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A1Cu); -#endif - /* 0xBFC00A1C: 83280001 lb $t0, 1($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 1; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (1)), 8, 0x2000000u); - PGXP_LOAD(0x83280001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00A20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00A24: 31090008 andi $t1, $t0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x8u; - PGXP_ALU(0x31090008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00A28: 1120000E beq $t1, $zero, 0xBFC00A64 */ - uint32_t psx_brA_BFC00A28 = cpu->gpr[9]; uint32_t psx_brB_BFC00A28 = cpu->gpr[0]; - psx_taken_BFC00A28 = (psx_brA_BFC00A28 == psx_brB_BFC00A28); - psx_delay_BFC00A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00A2C: 2401003D addiu $at, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2401003Du, cpu->gpr[1], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A2Cu); -#endif - if (psx_delay_BFC00A28) { - psx_delay_BFC00A28 = 0; - if (psx_taken_BFC00A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A64u); - goto label_BFC00A64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A30u); - } -label_BFC00A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC00A30: 1224004D beq $s1, $a0, 0xBFC00B68 */ - uint32_t psx_brA_BFC00A30 = cpu->gpr[17]; uint32_t psx_brB_BFC00A30 = cpu->gpr[4]; - psx_taken_BFC00A30 = (psx_brA_BFC00A30 == psx_brB_BFC00A30); - psx_delay_BFC00A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A34u); -#endif - /* 0xBFC00A34: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A34u); -#endif - if (psx_delay_BFC00A30) { - psx_delay_BFC00A30 = 0; - if (psx_taken_BFC00A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A38u); - } -label_BFC00A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00A38: 1080004B beq $a0, $zero, 0xBFC00B68 */ - uint32_t psx_brA_BFC00A38 = cpu->gpr[4]; uint32_t psx_brB_BFC00A38 = cpu->gpr[0]; - psx_taken_BFC00A38 = (psx_brA_BFC00A38 == psx_brB_BFC00A38); - psx_delay_BFC00A38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A3Cu); -#endif - /* 0xBFC00A3C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A3Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A3Cu); -#endif - if (psx_delay_BFC00A38) { - psx_delay_BFC00A38 = 0; - if (psx_taken_BFC00A38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A40u); - } -label_BFC00A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A40u); -#endif - /* 0xBFC00A40: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00A44: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC00A48: 308A00FF andi $t2, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC00A4C: 00AA5821 addu $t3, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[5] + cpu->gpr[10]; - PGXP_ALU(0x00AA5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A50u); -#endif - /* 0xBFC00A50: 816C0001 lb $t4, 1($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 1; cpu->gpr[12] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (1)), 12, 0x800u); - PGXP_LOAD(0x816C0001u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC00A58: 318D0008 andi $t5, $t4, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x8u; - PGXP_ALU(0x318D0008u, cpu->gpr[13], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC00A5C: 15A0FFF4 bne $t5, $zero, 0xBFC00A30 */ - uint32_t psx_brA_BFC00A5C = cpu->gpr[13]; uint32_t psx_brB_BFC00A5C = cpu->gpr[0]; - psx_taken_BFC00A5C = (psx_brA_BFC00A5C != psx_brB_BFC00A5C); - psx_delay_BFC00A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00A60: 2401003D addiu $at, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2401003Du, cpu->gpr[1], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A60u); -#endif - if (psx_delay_BFC00A5C) { - psx_delay_BFC00A5C = 0; - if (psx_taken_BFC00A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A30u); - goto label_BFC00A30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A64u); - } -label_BFC00A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC00A64: 14810040 bne $a0, $at, 0xBFC00B68 */ - uint32_t psx_brA_BFC00A64 = cpu->gpr[4]; uint32_t psx_brB_BFC00A64 = cpu->gpr[1]; - psx_taken_BFC00A64 = (psx_brA_BFC00A64 != psx_brB_BFC00A64); - psx_delay_BFC00A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A68u); -#endif - /* 0xBFC00A68: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A68u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A68u); -#endif - if (psx_delay_BFC00A64) { - psx_delay_BFC00A64 = 0; - if (psx_taken_BFC00A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A6Cu); - } -label_BFC00A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC00A6C: 1224003E beq $s1, $a0, 0xBFC00B68 */ - uint32_t psx_brA_BFC00A6C = cpu->gpr[17]; uint32_t psx_brB_BFC00A6C = cpu->gpr[4]; - psx_taken_BFC00A6C = (psx_brA_BFC00A6C == psx_brB_BFC00A6C); - psx_delay_BFC00A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A70u); -#endif - /* 0xBFC00A70: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A70u); -#endif - if (psx_delay_BFC00A6C) { - psx_delay_BFC00A6C = 0; - if (psx_taken_BFC00A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A74u); - } -label_BFC00A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00A74: 1080003C beq $a0, $zero, 0xBFC00B68 */ - uint32_t psx_brA_BFC00A74 = cpu->gpr[4]; uint32_t psx_brB_BFC00A74 = cpu->gpr[0]; - psx_taken_BFC00A74 = (psx_brA_BFC00A74 == psx_brB_BFC00A74); - psx_delay_BFC00A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A78u); -#endif - /* 0xBFC00A78: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A78u); -#endif - if (psx_delay_BFC00A74) { - psx_delay_BFC00A74 = 0; - if (psx_taken_BFC00A74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00A7Cu); - } -label_BFC00A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A7Cu); -#endif - /* 0xBFC00A7C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00A80: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC00A84: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC00A88: 306E00FF andi $t6, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC00A8C: 00AE7821 addu $t7, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[14]; - PGXP_ALU(0x00AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A90u); -#endif - /* 0xBFC00A90: 81E20001 lb $v0, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 2, 0x8000u); - PGXP_LOAD(0x81E20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00A94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC00A98: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC00A9C: 13000010 beq $t8, $zero, 0xBFC00AE0 */ - uint32_t psx_brA_BFC00A9C = cpu->gpr[24]; uint32_t psx_brB_BFC00A9C = cpu->gpr[0]; - psx_taken_BFC00A9C = (psx_brA_BFC00A9C == psx_brB_BFC00A9C); - psx_delay_BFC00A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC00AA0: 304A0044 andi $t2, $v0, 0x44 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x44u; - PGXP_ALU(0x304A0044u, cpu->gpr[10], _pgx1, 0x0044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AA0u); -#endif - if (psx_delay_BFC00A9C) { - psx_delay_BFC00A9C = 0; - if (psx_taken_BFC00A9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AE0u); - goto label_BFC00AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AA4u); - } -label_BFC00AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC00AA4: 12240030 beq $s1, $a0, 0xBFC00B68 */ - uint32_t psx_brA_BFC00AA4 = cpu->gpr[17]; uint32_t psx_brB_BFC00AA4 = cpu->gpr[4]; - psx_taken_BFC00AA4 = (psx_brA_BFC00AA4 == psx_brB_BFC00AA4); - psx_delay_BFC00AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AA8u); -#endif - /* 0xBFC00AA8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00AA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AA8u); -#endif - if (psx_delay_BFC00AA4) { - psx_delay_BFC00AA4 = 0; - if (psx_taken_BFC00AA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AACu); - } -label_BFC00AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00AAC: 1080002E beq $a0, $zero, 0xBFC00B68 */ - uint32_t psx_brA_BFC00AAC = cpu->gpr[4]; uint32_t psx_brB_BFC00AAC = cpu->gpr[0]; - psx_taken_BFC00AAC = (psx_brA_BFC00AAC == psx_brB_BFC00AAC); - psx_delay_BFC00AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AB0u); -#endif - /* 0xBFC00AB0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00AB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AB0u); -#endif - if (psx_delay_BFC00AAC) { - psx_delay_BFC00AAC = 0; - if (psx_taken_BFC00AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B68u); - goto label_BFC00B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AB4u); - } -label_BFC00AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AB4u); -#endif - /* 0xBFC00AB4: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00AB8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC00ABC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC00AC0: 307900FF andi $t9, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x307900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000120u); -#endif - /* 0xBFC00AC4: 00B94021 addu $t0, $a1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[25]; - PGXP_ALU(0x00B94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AC8u); -#endif - /* 0xBFC00AC8: 81020001 lb $v0, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 2, 0x100u); - PGXP_LOAD(0x81020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00ACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC00AD0: 30490008 andi $t1, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30490008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00AD4: 1520FFF3 bne $t1, $zero, 0xBFC00AA4 */ - uint32_t psx_brA_BFC00AD4 = cpu->gpr[9]; uint32_t psx_brB_BFC00AD4 = cpu->gpr[0]; - psx_taken_BFC00AD4 = (psx_brA_BFC00AD4 != psx_brB_BFC00AD4); - psx_delay_BFC00AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00AD8u); -#endif - if (psx_delay_BFC00AD4) { - psx_delay_BFC00AD4 = 0; - if (psx_taken_BFC00AD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AA4u); - goto label_BFC00AA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00ADCu); - } -label_BFC00ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC00ADC: 304A0044 andi $t2, $v0, 0x44 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x44u; - PGXP_ALU(0x304A0044u, cpu->gpr[10], _pgx1, 0x0044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00ADCu); -#endif -label_BFC00AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00AE0: 11400019 beq $t2, $zero, 0xBFC00B48 */ - uint32_t psx_brA_BFC00AE0 = cpu->gpr[10]; uint32_t psx_brB_BFC00AE0 = cpu->gpr[0]; - psx_taken_BFC00AE0 = (psx_brA_BFC00AE0 == psx_brB_BFC00AE0); - psx_delay_BFC00AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00AE4: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AE4u); -#endif - if (psx_delay_BFC00AE0) { - psx_delay_BFC00AE0 = 0; - if (psx_taken_BFC00AE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B48u); - goto label_BFC00B48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AE8u); - } -label_BFC00AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC00AE8: 304B0004 andi $t3, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x304B0004u, cpu->gpr[11], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AE8u); -#endif -label_BFC00AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC00AEC: 11600005 beq $t3, $zero, 0xBFC00B04 */ - uint32_t psx_brA_BFC00AEC = cpu->gpr[11]; uint32_t psx_brB_BFC00AEC = cpu->gpr[0]; - psx_taken_BFC00AEC = (psx_brA_BFC00AEC == psx_brB_BFC00AEC); - psx_delay_BFC00AEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00AF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00AF0u); -#endif - if (psx_delay_BFC00AEC) { - psx_delay_BFC00AEC = 0; - if (psx_taken_BFC00AEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B04u); - goto label_BFC00B04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AF4u); - } -label_BFC00AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC00AF4: 00116100 sll $t4, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00116100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21008u); -#endif - /* 0xBFC00AF8: 01838821 addu $s1, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[12] + cpu->gpr[3]; - PGXP_ALU(0x01838821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00AFC: 10000008 beq $zero, $zero, 0xBFC00B20 */ - uint32_t psx_brA_BFC00AFC = cpu->gpr[0]; uint32_t psx_brB_BFC00AFC = cpu->gpr[0]; - psx_taken_BFC00AFC = (psx_brA_BFC00AFC == psx_brB_BFC00AFC); - psx_delay_BFC00AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00B00: 2631FFD0 addiu $s1, $s1, -48 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-48)); - PGXP_ALU(0x2631FFD0u, cpu->gpr[17], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B00u); -#endif - if (psx_delay_BFC00AFC) { - psx_delay_BFC00AFC = 0; - if (psx_taken_BFC00AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B20u); - goto label_BFC00B20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B04u); - } -label_BFC00B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00B04: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC00B0Cu; /* jal link before delay slot */ - psx_delay_BFC00B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00B08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00B08u); -#endif - if (psx_delay_BFC00B04) { - psx_delay_BFC00B04 = 0; - cpu->gpr[31] = 0xBFC00B0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC00B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC00B0C: 00116900 sll $t5, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00116900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22004u); -#endif - /* 0xBFC00B10: 01A28821 addu $s1, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[13] + cpu->gpr[2]; - PGXP_ALU(0x01A28821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00B14: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC00B18: 24A5DDB0 addiu $a1, $a1, -8784 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8784)); - PGXP_ALU(0x24A5DDB0u, cpu->gpr[5], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00B1C: 2631FFC9 addiu $s1, $s1, -55 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-55)); - PGXP_ALU(0x2631FFC9u, cpu->gpr[17], _pgx1, 0xFFFFFFC9u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B1Cu); -#endif -label_BFC00B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B20u); -#endif - /* 0xBFC00B20: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00B24: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC00B28: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC00B2C: 306E00FF andi $t6, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC00B30: 00AE7821 addu $t7, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[14]; - PGXP_ALU(0x00AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B34u); -#endif - /* 0xBFC00B34: 81E20001 lb $v0, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 2, 0x8000u); - PGXP_LOAD(0x81E20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00B38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC00B3C: 30580044 andi $t8, $v0, 0x44 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x44u; - PGXP_ALU(0x30580044u, cpu->gpr[24], _pgx1, 0x0044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC00B40: 1700FFEA bne $t8, $zero, 0xBFC00AEC */ - uint32_t psx_brA_BFC00B40 = cpu->gpr[24]; uint32_t psx_brB_BFC00B40 = cpu->gpr[0]; - psx_taken_BFC00B40 = (psx_brA_BFC00B40 != psx_brB_BFC00B40); - psx_delay_BFC00B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC00B44: 304B0004 andi $t3, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x304B0004u, cpu->gpr[11], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B44u); -#endif - if (psx_delay_BFC00B40) { - psx_delay_BFC00B40 = 0; - if (psx_taken_BFC00B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00AECu); - goto label_BFC00AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00B48u); - } -label_BFC00B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B48u); -#endif - /* 0xBFC00B48: 8FB9002C lw $t9, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B48u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9002Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00B4C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00B50: 2484DD2C addiu $a0, $a0, -8916 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8916)); - PGXP_ALU(0x2484DD2Cu, cpu->gpr[4], _pgx1, 0xFFFFDD2Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC00B54: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC00B58: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00B5C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC00B64u; /* jal link before delay slot */ - psx_delay_BFC00B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC00B60: AF310000 sw $s1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B60u); return; } g_debug_last_store_pc = 0xBFC00B60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAF310000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B60u); -#endif - if (psx_delay_BFC00B5C) { - psx_delay_BFC00B5C = 0; - cpu->gpr[31] = 0xBFC00B64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC00B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B64u); -#endif - /* 0xBFC00B64: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B64u); -#endif -label_BFC00B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B68u); -#endif - /* 0xBFC00B68: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B68u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B6Cu); -#endif - /* 0xBFC00B6C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B6Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B70u); -#endif - /* 0xBFC00B70: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B70u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00B74: 03E00008 jr $ra */ - psx_delay_BFC00B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00B78: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B78u); -#endif - if (psx_delay_BFC00B74) { - psx_delay_BFC00B74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC00B7C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00B7Cu); - int psx_delay_BFC00BA4 = 0; - int psx_delay_BFC00BB4 = 0; - int psx_taken_BFC00BB4 = 0; - int psx_delay_BFC00BC8 = 0; - int psx_delay_BFC00BD0 = 0; - int psx_taken_BFC00BD0 = 0; - int psx_delay_BFC00BFC = 0; - int psx_taken_BFC00BFC = 0; - int psx_delay_BFC00C04 = 0; - int psx_taken_BFC00C04 = 0; - int psx_delay_BFC00C0C = 0; - int psx_taken_BFC00C0C = 0; - int psx_delay_BFC00C30 = 0; - int psx_taken_BFC00C30 = 0; - int psx_delay_BFC00C38 = 0; - int psx_taken_BFC00C38 = 0; - int psx_delay_BFC00C40 = 0; - int psx_taken_BFC00C40 = 0; - int psx_delay_BFC00C48 = 0; - int psx_taken_BFC00C48 = 0; - int psx_delay_BFC00C6C = 0; - int psx_taken_BFC00C6C = 0; - int psx_delay_BFC00C74 = 0; - int psx_taken_BFC00C74 = 0; - int psx_delay_BFC00C7C = 0; - int psx_taken_BFC00C7C = 0; - int psx_delay_BFC00CA0 = 0; - int psx_taken_BFC00CA0 = 0; - int psx_delay_BFC00CA8 = 0; - int psx_taken_BFC00CA8 = 0; - int psx_delay_BFC00CB8 = 0; - int psx_taken_BFC00CB8 = 0; - int psx_delay_BFC00CDC = 0; - int psx_taken_BFC00CDC = 0; - int psx_delay_BFC00CFC = 0; - int psx_taken_BFC00CFC = 0; - int psx_delay_BFC00D0C = 0; - int psx_delay_BFC00D20 = 0; - int psx_delay_BFC00D30 = 0; - int psx_delay_BFC00D40 = 0; - int psx_delay_BFC00D48 = 0; - int psx_taken_BFC00D48 = 0; - int psx_delay_BFC00D58 = 0; - int psx_taken_BFC00D58 = 0; - int psx_delay_BFC00D60 = 0; - int psx_taken_BFC00D60 = 0; - int psx_delay_BFC00D70 = 0; - int psx_taken_BFC00D70 = 0; - int psx_delay_BFC00D80 = 0; - int psx_taken_BFC00D80 = 0; - int psx_delay_BFC00D98 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00BACu: goto label_BFC00BAC; - case 0xBFC00BBCu: goto label_BFC00BBC; - case 0xBFC00BC4u: goto label_BFC00BC4; - case 0xBFC00BD0u: goto label_BFC00BD0; - case 0xBFC00BD8u: goto label_BFC00BD8; - case 0xBFC00C04u: goto label_BFC00C04; - case 0xBFC00C0Cu: goto label_BFC00C0C; - case 0xBFC00C14u: goto label_BFC00C14; - case 0xBFC00C38u: goto label_BFC00C38; - case 0xBFC00C40u: goto label_BFC00C40; - case 0xBFC00C48u: goto label_BFC00C48; - case 0xBFC00C50u: goto label_BFC00C50; - case 0xBFC00C74u: goto label_BFC00C74; - case 0xBFC00C7Cu: goto label_BFC00C7C; - case 0xBFC00C84u: goto label_BFC00C84; - case 0xBFC00CA8u: goto label_BFC00CA8; - case 0xBFC00CB0u: goto label_BFC00CB0; - case 0xBFC00CC0u: goto label_BFC00CC0; - case 0xBFC00CE4u: goto label_BFC00CE4; - case 0xBFC00D04u: goto label_BFC00D04; - case 0xBFC00D14u: goto label_BFC00D14; - case 0xBFC00D28u: goto label_BFC00D28; - case 0xBFC00D38u: goto label_BFC00D38; - case 0xBFC00D48u: goto label_BFC00D48; - case 0xBFC00D50u: goto label_BFC00D50; - case 0xBFC00D60u: goto label_BFC00D60; - case 0xBFC00D68u: goto label_BFC00D68; - case 0xBFC00D78u: goto label_BFC00D78; - case 0xBFC00D88u: goto label_BFC00D88; - case 0xBFC00D8Cu: goto label_BFC00D8C; - default: break; - } - } -label_BFC00B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00B7C: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC00B80: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B80u); return; } g_debug_last_store_pc = 0xBFC00B80u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC00B84: AFA70054 sw $a3, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B84u); return; } g_debug_last_store_pc = 0xBFC00B84u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70054u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC00B88: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B88u); return; } g_debug_last_store_pc = 0xBFC00B88u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC00B8C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC00B90: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B90u); return; } g_debug_last_store_pc = 0xBFC00B90u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B94u); -#endif - /* 0xBFC00B94: 8FA40054 lw $a0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40054u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC00B98: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B98u); return; } g_debug_last_store_pc = 0xBFC00B98u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC00B9C: AFA5004C sw $a1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B9Cu); return; } g_debug_last_store_pc = 0xBFC00B9Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5004Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC00BA0: AFA60050 sw $a2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00BA0u); return; } g_debug_last_store_pc = 0xBFC00BA0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60050u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00BA4: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC00BACu; /* jal link before delay slot */ - psx_delay_BFC00BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC00BA8: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BA8u); -#endif - if (psx_delay_BFC00BA4) { - psx_delay_BFC00BA4 = 0; - cpu->gpr[31] = 0xBFC00BACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC00BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BACu); -#endif - /* 0xBFC00BAC: 822E0000 lb $t6, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 14, 0x20000u); - PGXP_LOAD(0x822E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC00BB0: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC00BB4: 11C00075 beq $t6, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00BB4 = cpu->gpr[14]; uint32_t psx_brB_BFC00BB4 = cpu->gpr[0]; - psx_taken_BFC00BB4 = (psx_brA_BFC00BB4 == psx_brB_BFC00BB4); - psx_delay_BFC00BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BB8u); -#endif - /* 0xBFC00BB8: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00BB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BB8u); -#endif - if (psx_delay_BFC00BB4) { - psx_delay_BFC00BB4 = 0; - if (psx_taken_BFC00BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00BBCu); - } -label_BFC00BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00BBC: 2411000A addiu $s1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2411000Au, cpu->gpr[17], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BC0u); -#endif - /* 0xBFC00BC0: 8FA50054 lw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00BC0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BC0u); -#endif -label_BFC00BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC00BC4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00BC8: 0FF00CC4 jal 0xBFC03310 */ - cpu->gpr[31] = 0xBFC00BD0u; /* jal link before delay slot */ - psx_delay_BFC00BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC00BCC: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BCCu); -#endif - if (psx_delay_BFC00BC8) { - psx_delay_BFC00BC8 = 0; - cpu->gpr[31] = 0xBFC00BD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03310u); - cpu->pc = 0xBFC03310u; return; - } -label_BFC00BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00BD0: 1440005F bne $v0, $zero, 0xBFC00D50 */ - uint32_t psx_brA_BFC00BD0 = cpu->gpr[2]; uint32_t psx_brB_BFC00BD0 = cpu->gpr[0]; - psx_taken_BFC00BD0 = (psx_brA_BFC00BD0 != psx_brB_BFC00BD0); - psx_delay_BFC00BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00BD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00BD4u); -#endif - if (psx_delay_BFC00BD0) { - psx_delay_BFC00BD0 = 0; - if (psx_taken_BFC00BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D50u); - goto label_BFC00D50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00BD8u); - } -label_BFC00BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC00BD8: 02128021 addu $s0, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[18]; - PGXP_ALU(0x02128021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BDCu); -#endif - /* 0xBFC00BDC: 82020000 lb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 2, 0x10000u); - PGXP_LOAD(0x82020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC00BE0: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC00BE4: 2463DDB0 addiu $v1, $v1, -8784 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-8784)); - PGXP_ALU(0x2463DDB0u, cpu->gpr[3], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC00BE8: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC00BEC: 006FC021 addu $t8, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BF0u); -#endif - /* 0xBFC00BF0: 83190001 lb $t9, 1($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 1; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (1)), 25, 0x1000000u); - PGXP_LOAD(0x83190001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00BF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC00BF8: 33280008 andi $t0, $t9, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u; - PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC00BFC: 1100000E beq $t0, $zero, 0xBFC00C38 */ - uint32_t psx_brA_BFC00BFC = cpu->gpr[8]; uint32_t psx_brB_BFC00BFC = cpu->gpr[0]; - psx_taken_BFC00BFC = (psx_brA_BFC00BFC == psx_brB_BFC00BFC); - psx_delay_BFC00BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00C00: 2401003D addiu $at, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2401003Du, cpu->gpr[1], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C00u); -#endif - if (psx_delay_BFC00BFC) { - psx_delay_BFC00BFC = 0; - if (psx_taken_BFC00BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C38u); - goto label_BFC00C38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C04u); - } -label_BFC00C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00C04: 12220061 beq $s1, $v0, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C04 = cpu->gpr[17]; uint32_t psx_brB_BFC00C04 = cpu->gpr[2]; - psx_taken_BFC00C04 = (psx_brA_BFC00C04 == psx_brB_BFC00C04); - psx_delay_BFC00C04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C08u); -#endif - /* 0xBFC00C08: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C08u); -#endif - if (psx_delay_BFC00C04) { - psx_delay_BFC00C04 = 0; - if (psx_taken_BFC00C04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C0Cu); - } -label_BFC00C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00C0C: 1040005F beq $v0, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C0C = cpu->gpr[2]; uint32_t psx_brB_BFC00C0C = cpu->gpr[0]; - psx_taken_BFC00C0C = (psx_brA_BFC00C0C == psx_brB_BFC00C0C); - psx_delay_BFC00C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C10u); -#endif - /* 0xBFC00C10: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C10u); -#endif - if (psx_delay_BFC00C0C) { - psx_delay_BFC00C0C = 0; - if (psx_taken_BFC00C0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C14u); - } -label_BFC00C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C14u); -#endif - /* 0xBFC00C14: 82020001 lb $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x82020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00C18: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC00C1C: 304900FF andi $t1, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC00C20: 00695021 addu $t2, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[9]; - PGXP_ALU(0x00695021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C24u); -#endif - /* 0xBFC00C24: 814B0001 lb $t3, 1($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 1; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (1)), 11, 0x400u); - PGXP_LOAD(0x814B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00C28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC00C2C: 316C0008 andi $t4, $t3, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8u; - PGXP_ALU(0x316C0008u, cpu->gpr[12], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC00C30: 1580FFF4 bne $t4, $zero, 0xBFC00C04 */ - uint32_t psx_brA_BFC00C30 = cpu->gpr[12]; uint32_t psx_brB_BFC00C30 = cpu->gpr[0]; - psx_taken_BFC00C30 = (psx_brA_BFC00C30 != psx_brB_BFC00C30); - psx_delay_BFC00C30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00C34: 2401003D addiu $at, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2401003Du, cpu->gpr[1], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C34u); -#endif - if (psx_delay_BFC00C30) { - psx_delay_BFC00C30 = 0; - if (psx_taken_BFC00C30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C04u); - goto label_BFC00C04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C38u); - } -label_BFC00C38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC00C38: 14410054 bne $v0, $at, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C38 = cpu->gpr[2]; uint32_t psx_brB_BFC00C38 = cpu->gpr[1]; - psx_taken_BFC00C38 = (psx_brA_BFC00C38 != psx_brB_BFC00C38); - psx_delay_BFC00C38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C3Cu); -#endif - /* 0xBFC00C3C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C3Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C3Cu); -#endif - if (psx_delay_BFC00C38) { - psx_delay_BFC00C38 = 0; - if (psx_taken_BFC00C38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C40u); - } -label_BFC00C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00C40: 12220052 beq $s1, $v0, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C40 = cpu->gpr[17]; uint32_t psx_brB_BFC00C40 = cpu->gpr[2]; - psx_taken_BFC00C40 = (psx_brA_BFC00C40 == psx_brB_BFC00C40); - psx_delay_BFC00C40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C44u); -#endif - /* 0xBFC00C44: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C44u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C44u); -#endif - if (psx_delay_BFC00C40) { - psx_delay_BFC00C40 = 0; - if (psx_taken_BFC00C40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C48u); - } -label_BFC00C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00C48: 10400050 beq $v0, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C48 = cpu->gpr[2]; uint32_t psx_brB_BFC00C48 = cpu->gpr[0]; - psx_taken_BFC00C48 = (psx_brA_BFC00C48 == psx_brB_BFC00C48); - psx_delay_BFC00C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C4Cu); -#endif - /* 0xBFC00C4C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C4Cu); -#endif - if (psx_delay_BFC00C48) { - psx_delay_BFC00C48 = 0; - if (psx_taken_BFC00C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C50u); - } -label_BFC00C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C50u); -#endif - /* 0xBFC00C50: 82020001 lb $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x82020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00C54: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC00C58: 304D00FF andi $t5, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6008u); -#endif - /* 0xBFC00C5C: 006D7021 addu $t6, $v1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[3] + cpu->gpr[13]; - PGXP_ALU(0x006D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C60u); -#endif - /* 0xBFC00C60: 81CF0001 lb $t7, 1($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (1)), 15, 0x4000u); - PGXP_LOAD(0x81CF0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00C64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC00C68: 31F80008 andi $t8, $t7, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x8u; - PGXP_ALU(0x31F80008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC00C6C: 1300000E beq $t8, $zero, 0xBFC00CA8 */ - uint32_t psx_brA_BFC00C6C = cpu->gpr[24]; uint32_t psx_brB_BFC00C6C = cpu->gpr[0]; - psx_taken_BFC00C6C = (psx_brA_BFC00C6C == psx_brB_BFC00C6C); - psx_delay_BFC00C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00C70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00C70u); -#endif - if (psx_delay_BFC00C6C) { - psx_delay_BFC00C6C = 0; - if (psx_taken_BFC00C6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CA8u); - goto label_BFC00CA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C74u); - } -label_BFC00C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00C74: 12220045 beq $s1, $v0, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C74 = cpu->gpr[17]; uint32_t psx_brB_BFC00C74 = cpu->gpr[2]; - psx_taken_BFC00C74 = (psx_brA_BFC00C74 == psx_brB_BFC00C74); - psx_delay_BFC00C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C78u); -#endif - /* 0xBFC00C78: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C78u); -#endif - if (psx_delay_BFC00C74) { - psx_delay_BFC00C74 = 0; - if (psx_taken_BFC00C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C7Cu); - } -label_BFC00C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00C7C: 10400043 beq $v0, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00C7C = cpu->gpr[2]; uint32_t psx_brB_BFC00C7C = cpu->gpr[0]; - psx_taken_BFC00C7C = (psx_brA_BFC00C7C == psx_brB_BFC00C7C); - psx_delay_BFC00C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C80u); -#endif - /* 0xBFC00C80: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C80u); -#endif - if (psx_delay_BFC00C7C) { - psx_delay_BFC00C7C = 0; - if (psx_taken_BFC00C7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C84u); - } -label_BFC00C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C84u); -#endif - /* 0xBFC00C84: 82020001 lb $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x82020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00C88: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC00C8C: 305900FF andi $t9, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC00C90: 00794021 addu $t0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00794021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C94u); -#endif - /* 0xBFC00C94: 81090001 lb $t1, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[9] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 9, 0x100u); - PGXP_LOAD(0x81090001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC00C9C: 312A0008 andi $t2, $t1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x8u; - PGXP_ALU(0x312A0008u, cpu->gpr[10], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00CA0: 1540FFF4 bne $t2, $zero, 0xBFC00C74 */ - uint32_t psx_brA_BFC00CA0 = cpu->gpr[10]; uint32_t psx_brB_BFC00CA0 = cpu->gpr[0]; - psx_taken_BFC00CA0 = (psx_brA_BFC00CA0 != psx_brB_BFC00CA0); - psx_delay_BFC00CA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00CA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00CA4u); -#endif - if (psx_delay_BFC00CA0) { - psx_delay_BFC00CA0 = 0; - if (psx_taken_BFC00CA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00C74u); - goto label_BFC00C74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CA8u); - } -label_BFC00CA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00CA8: 12220005 beq $s1, $v0, 0xBFC00CC0 */ - uint32_t psx_brA_BFC00CA8 = cpu->gpr[17]; uint32_t psx_brB_BFC00CA8 = cpu->gpr[2]; - psx_taken_BFC00CA8 = (psx_brA_BFC00CA8 == psx_brB_BFC00CA8); - psx_delay_BFC00CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC00CAC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CACu); -#endif - if (psx_delay_BFC00CA8) { - psx_delay_BFC00CA8 = 0; - if (psx_taken_BFC00CA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CC0u); - goto label_BFC00CC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CB0u); - } -label_BFC00CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CB0u); -#endif - /* 0xBFC00CB0: 820B0001 lb $t3, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 11, 0x10000u); - PGXP_LOAD(0x820B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00CB4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC00CB8: 162BFFFD bne $s1, $t3, 0xBFC00CB0 */ - uint32_t psx_brA_BFC00CB8 = cpu->gpr[17]; uint32_t psx_brB_BFC00CB8 = cpu->gpr[11]; - psx_taken_BFC00CB8 = (psx_brA_BFC00CB8 != psx_brB_BFC00CB8); - psx_delay_BFC00CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00CBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00CBCu); -#endif - if (psx_delay_BFC00CB8) { - psx_delay_BFC00CB8 = 0; - if (psx_taken_BFC00CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CB0u); - goto label_BFC00CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CC0u); - } -label_BFC00CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC00CC0: A2000000 sb $zero, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC00CC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CC4u); -#endif - /* 0xBFC00CC4: 90AC0000 lbu $t4, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 12, 0x20u); - PGXP_LOAD(0x90AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC00CC8: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008u); -#endif - /* 0xBFC00CCC: 006C6821 addu $t5, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[3] + cpu->gpr[12]; - PGXP_ALU(0x006C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CD0u); -#endif - /* 0xBFC00CD0: 81AE0001 lb $t6, 1($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 1; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (1)), 14, 0x2000u); - PGXP_LOAD(0x81AE0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00CD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC00CD8: 31CF0008 andi $t7, $t6, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u; - PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC00CDC: 15E00009 bne $t7, $zero, 0xBFC00D04 */ - uint32_t psx_brA_BFC00CDC = cpu->gpr[15]; uint32_t psx_brB_BFC00CDC = cpu->gpr[0]; - psx_taken_BFC00CDC = (psx_brA_BFC00CDC != psx_brB_BFC00CDC); - psx_delay_BFC00CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00CE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00CE0u); -#endif - if (psx_delay_BFC00CDC) { - psx_delay_BFC00CDC = 0; - if (psx_taken_BFC00CDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D04u); - goto label_BFC00D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CE4u); - } -label_BFC00CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CE4u); -#endif - /* 0xBFC00CE4: 90580001 lbu $t8, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 24, 0x4u); - PGXP_LOAD(0x90580001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC00CE8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC00CEC: 0078C821 addu $t9, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x0078C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CF0u); -#endif - /* 0xBFC00CF0: 83280001 lb $t0, 1($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 1; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (1)), 8, 0x2000000u); - PGXP_LOAD(0x83280001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00CF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC00CF8: 31090008 andi $t1, $t0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x8u; - PGXP_ALU(0x31090008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00CFC: 1120FFF9 beq $t1, $zero, 0xBFC00CE4 */ - uint32_t psx_brA_BFC00CFC = cpu->gpr[9]; uint32_t psx_brB_BFC00CFC = cpu->gpr[0]; - psx_taken_BFC00CFC = (psx_brA_BFC00CFC == psx_brB_BFC00CFC); - psx_delay_BFC00CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00D00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00D00u); -#endif - if (psx_delay_BFC00CFC) { - psx_delay_BFC00CFC = 0; - if (psx_taken_BFC00CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00CE4u); - goto label_BFC00CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D04u); - } -label_BFC00D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00D04: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC00D04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D08u); -#endif - /* 0xBFC00D08: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D08u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00D0C: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC00D14u; /* jal link before delay slot */ - psx_delay_BFC00D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC00D10: AFA20030 sw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D10u); return; } g_debug_last_store_pc = 0xBFC00D10u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D10u); -#endif - if (psx_delay_BFC00D0C) { - psx_delay_BFC00D0C = 0; - cpu->gpr[31] = 0xBFC00D14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC00D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D14u); -#endif - /* 0xBFC00D14: 8FA20030 lw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D14u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D18u); -#endif - /* 0xBFC00D18: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00D1C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00D20: 0FF00D06 jal 0xBFC03418 */ - cpu->gpr[31] = 0xBFC00D28u; /* jal link before delay slot */ - psx_delay_BFC00D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC00D24: 24450001 addiu $a1, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24450001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D24u); -#endif - if (psx_delay_BFC00D20) { - psx_delay_BFC00D20 = 0; - cpu->gpr[31] = 0xBFC00D28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03418u); - cpu->pc = 0xBFC03418u; return; - } -label_BFC00D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00D28: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D2Cu); -#endif - /* 0xBFC00D2C: 8FA5004C lw $a1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5004Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00D30: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC00D38u; /* jal link before delay slot */ - psx_delay_BFC00D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00D34: 2484DD38 addiu $a0, $a0, -8904 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8904)); - PGXP_ALU(0x2484DD38u, cpu->gpr[4], _pgx1, 0xFFFFDD38u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D34u); -#endif - if (psx_delay_BFC00D30) { - psx_delay_BFC00D30 = 0; - cpu->gpr[31] = 0xBFC00D38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC00D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00D38: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D3Cu); -#endif - /* 0xBFC00D3C: 8FA50050 lw $a1, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D3Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50050u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00D40: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC00D48u; /* jal link before delay slot */ - psx_delay_BFC00D40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC00D44: 2484DD44 addiu $a0, $a0, -8892 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8892)); - PGXP_ALU(0x2484DD44u, cpu->gpr[4], _pgx1, 0xFFFFDD44u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D44u); -#endif - if (psx_delay_BFC00D40) { - psx_delay_BFC00D40 = 0; - cpu->gpr[31] = 0xBFC00D48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC00D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00D48: 10000010 beq $zero, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00D48 = cpu->gpr[0]; uint32_t psx_brB_BFC00D48 = cpu->gpr[0]; - psx_taken_BFC00D48 = (psx_brA_BFC00D48 == psx_brB_BFC00D48); - psx_delay_BFC00D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D4Cu); -#endif - /* 0xBFC00D4C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D4Cu); -#endif - if (psx_delay_BFC00D48) { - psx_delay_BFC00D48 = 0; - if (psx_taken_BFC00D48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D50u); - } -label_BFC00D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D50u); -#endif - /* 0xBFC00D50: 82020000 lb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 2, 0x10000u); - PGXP_LOAD(0x82020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00D54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00D58: 12220007 beq $s1, $v0, 0xBFC00D78 */ - uint32_t psx_brA_BFC00D58 = cpu->gpr[17]; uint32_t psx_brB_BFC00D58 = cpu->gpr[2]; - psx_taken_BFC00D58 = (psx_brA_BFC00D58 == psx_brB_BFC00D58); - psx_delay_BFC00D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00D5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00D5Cu); -#endif - if (psx_delay_BFC00D58) { - psx_delay_BFC00D58 = 0; - if (psx_taken_BFC00D58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D78u); - goto label_BFC00D78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D60u); - } -label_BFC00D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00D60: 1040000A beq $v0, $zero, 0xBFC00D8C */ - uint32_t psx_brA_BFC00D60 = cpu->gpr[2]; uint32_t psx_brB_BFC00D60 = cpu->gpr[0]; - psx_taken_BFC00D60 = (psx_brA_BFC00D60 == psx_brB_BFC00D60); - psx_delay_BFC00D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D64u); -#endif - /* 0xBFC00D64: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D64u); -#endif - if (psx_delay_BFC00D60) { - psx_delay_BFC00D60 = 0; - if (psx_taken_BFC00D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D8Cu); - goto label_BFC00D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D68u); - } -label_BFC00D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D68u); -#endif - /* 0xBFC00D68: 82020001 lb $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x82020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00D6C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC00D70: 1622FFFB bne $s1, $v0, 0xBFC00D60 */ - uint32_t psx_brA_BFC00D70 = cpu->gpr[17]; uint32_t psx_brB_BFC00D70 = cpu->gpr[2]; - psx_taken_BFC00D70 = (psx_brA_BFC00D70 != psx_brB_BFC00D70); - psx_delay_BFC00D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00D74u); -#endif - if (psx_delay_BFC00D70) { - psx_delay_BFC00D70 = 0; - if (psx_taken_BFC00D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D60u); - goto label_BFC00D60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D78u); - } -label_BFC00D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D78u); -#endif - /* 0xBFC00D78: 820A0001 lb $t2, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 10, 0x10000u); - PGXP_LOAD(0x820A0001u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00D7C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00D80: 1540FF90 bne $t2, $zero, 0xBFC00BC4 */ - uint32_t psx_brA_BFC00D80 = cpu->gpr[10]; uint32_t psx_brB_BFC00D80 = cpu->gpr[0]; - psx_taken_BFC00D80 = (psx_brA_BFC00D80 != psx_brB_BFC00D80); - psx_delay_BFC00D80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D84u); -#endif - /* 0xBFC00D84: 8FA50054 lw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D84u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D84u); -#endif - if (psx_delay_BFC00D80) { - psx_delay_BFC00D80 = 0; - if (psx_taken_BFC00D80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00BC4u); - goto label_BFC00BC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00D88u); - } -label_BFC00D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D88u); -#endif - /* 0xBFC00D88: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D88u); -#endif -label_BFC00D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D8Cu); -#endif - /* 0xBFC00D8C: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D8Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D90u); -#endif - /* 0xBFC00D90: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D90u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D94u); -#endif - /* 0xBFC00D94: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D94u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00D98: 03E00008 jr $ra */ - psx_delay_BFC00D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00D9C: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00D9Cu); -#endif - if (psx_delay_BFC00D98) { - psx_delay_BFC00D98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC00DA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC00DA0u); - int psx_delay_BFC00DB0 = 0; - int psx_taken_BFC00DB0 = 0; - int psx_delay_BFC00DB8 = 0; - int psx_taken_BFC00DB8 = 0; - int psx_delay_BFC00E24 = 0; - int psx_taken_BFC00E24 = 0; - int psx_delay_BFC00E50 = 0; - int psx_taken_BFC00E50 = 0; - int psx_delay_BFC00E5C = 0; - int psx_taken_BFC00E5C = 0; - int psx_delay_BFC00E64 = 0; - int psx_delay_BFC00E88 = 0; - int psx_taken_BFC00E88 = 0; - int psx_delay_BFC00EB0 = 0; - int psx_taken_BFC00EB0 = 0; - int psx_delay_BFC00EB8 = 0; - int psx_taken_BFC00EB8 = 0; - int psx_delay_BFC00EC0 = 0; - int psx_taken_BFC00EC0 = 0; - int psx_delay_BFC00EC8 = 0; - int psx_taken_BFC00EC8 = 0; - int psx_delay_BFC00ED8 = 0; - int psx_taken_BFC00ED8 = 0; - int psx_delay_BFC00EE4 = 0; - int psx_taken_BFC00EE4 = 0; - int psx_delay_BFC00EEC = 0; - int psx_taken_BFC00EEC = 0; - int psx_delay_BFC00EFC = 0; - int psx_taken_BFC00EFC = 0; - int psx_delay_BFC00F08 = 0; - int psx_taken_BFC00F08 = 0; - int psx_delay_BFC00F14 = 0; - int psx_taken_BFC00F14 = 0; - int psx_delay_BFC00F2C = 0; - int psx_taken_BFC00F2C = 0; - int psx_delay_BFC00F50 = 0; - int psx_taken_BFC00F50 = 0; - int psx_delay_BFC00F68 = 0; - int psx_taken_BFC00F68 = 0; - int psx_delay_BFC00F74 = 0; - int psx_taken_BFC00F74 = 0; - int psx_delay_BFC00F7C = 0; - int psx_taken_BFC00F7C = 0; - int psx_delay_BFC00F84 = 0; - int psx_taken_BFC00F84 = 0; - int psx_delay_BFC00F8C = 0; - int psx_taken_BFC00F8C = 0; - int psx_delay_BFC00FB4 = 0; - int psx_taken_BFC00FB4 = 0; - int psx_delay_BFC00FCC = 0; - int psx_taken_BFC00FCC = 0; - int psx_delay_BFC00FD8 = 0; - int psx_taken_BFC00FD8 = 0; - int psx_delay_BFC00FE0 = 0; - int psx_taken_BFC00FE0 = 0; - int psx_delay_BFC00FE8 = 0; - int psx_taken_BFC00FE8 = 0; - int psx_delay_BFC00FF0 = 0; - int psx_taken_BFC00FF0 = 0; - int psx_delay_BFC0100C = 0; - int psx_taken_BFC0100C = 0; - int psx_delay_BFC01020 = 0; - int psx_taken_BFC01020 = 0; - int psx_delay_BFC0102C = 0; - int psx_taken_BFC0102C = 0; - int psx_delay_BFC01038 = 0; - int psx_taken_BFC01038 = 0; - int psx_delay_BFC01044 = 0; - int psx_taken_BFC01044 = 0; - int psx_delay_BFC01058 = 0; - int psx_taken_BFC01058 = 0; - int psx_delay_BFC01064 = 0; - int psx_taken_BFC01064 = 0; - int psx_delay_BFC01070 = 0; - int psx_taken_BFC01070 = 0; - int psx_delay_BFC01084 = 0; - int psx_taken_BFC01084 = 0; - int psx_delay_BFC01090 = 0; - int psx_taken_BFC01090 = 0; - int psx_delay_BFC010A4 = 0; - int psx_taken_BFC010A4 = 0; - int psx_delay_BFC010B8 = 0; - int psx_taken_BFC010B8 = 0; - int psx_delay_BFC010D0 = 0; - int psx_taken_BFC010D0 = 0; - int psx_delay_BFC010DC = 0; - int psx_taken_BFC010DC = 0; - int psx_delay_BFC010E8 = 0; - int psx_taken_BFC010E8 = 0; - int psx_delay_BFC010F4 = 0; - int psx_taken_BFC010F4 = 0; - int psx_delay_BFC01104 = 0; - int psx_taken_BFC01104 = 0; - int psx_delay_BFC0111C = 0; - int psx_taken_BFC0111C = 0; - int psx_delay_BFC0112C = 0; - int psx_taken_BFC0112C = 0; - int psx_delay_BFC0113C = 0; - int psx_taken_BFC0113C = 0; - int psx_delay_BFC0114C = 0; - int psx_delay_BFC01174 = 0; - int psx_taken_BFC01174 = 0; - int psx_delay_BFC01184 = 0; - int psx_taken_BFC01184 = 0; - int psx_delay_BFC0118C = 0; - int psx_taken_BFC0118C = 0; - int psx_delay_BFC01194 = 0; - int psx_taken_BFC01194 = 0; - int psx_delay_BFC0119C = 0; - int psx_delay_BFC011C4 = 0; - int psx_taken_BFC011C4 = 0; - int psx_delay_BFC011DC = 0; - int psx_taken_BFC011DC = 0; - int psx_delay_BFC011E8 = 0; - int psx_taken_BFC011E8 = 0; - int psx_delay_BFC011F4 = 0; - int psx_taken_BFC011F4 = 0; - int psx_delay_BFC01200 = 0; - int psx_taken_BFC01200 = 0; - int psx_delay_BFC01210 = 0; - int psx_taken_BFC01210 = 0; - int psx_delay_BFC01230 = 0; - int psx_taken_BFC01230 = 0; - int psx_delay_BFC0123C = 0; - int psx_taken_BFC0123C = 0; - int psx_delay_BFC01248 = 0; - int psx_taken_BFC01248 = 0; - int psx_delay_BFC01254 = 0; - int psx_taken_BFC01254 = 0; - int psx_delay_BFC0126C = 0; - int psx_taken_BFC0126C = 0; - int psx_delay_BFC01274 = 0; - int psx_taken_BFC01274 = 0; - int psx_delay_BFC01280 = 0; - int psx_taken_BFC01280 = 0; - int psx_delay_BFC01290 = 0; - int psx_taken_BFC01290 = 0; - int psx_delay_BFC01298 = 0; - int psx_taken_BFC01298 = 0; - int psx_delay_BFC012C4 = 0; - int psx_taken_BFC012C4 = 0; - int psx_delay_BFC012D0 = 0; - int psx_taken_BFC012D0 = 0; - int psx_delay_BFC012E0 = 0; - int psx_taken_BFC012E0 = 0; - int psx_delay_BFC012EC = 0; - int psx_taken_BFC012EC = 0; - int psx_delay_BFC012FC = 0; - int psx_taken_BFC012FC = 0; - int psx_delay_BFC01320 = 0; - int psx_taken_BFC01320 = 0; - int psx_delay_BFC0133C = 0; - int psx_taken_BFC0133C = 0; - int psx_delay_BFC01364 = 0; - int psx_taken_BFC01364 = 0; - int psx_delay_BFC0136C = 0; - int psx_taken_BFC0136C = 0; - int psx_delay_BFC01384 = 0; - int psx_taken_BFC01384 = 0; - int psx_delay_BFC0138C = 0; - int psx_taken_BFC0138C = 0; - int psx_delay_BFC013A0 = 0; - int psx_taken_BFC013A0 = 0; - int psx_delay_BFC013A8 = 0; - int psx_delay_BFC013D4 = 0; - int psx_taken_BFC013D4 = 0; - int psx_delay_BFC013DC = 0; - int psx_taken_BFC013DC = 0; - int psx_delay_BFC013E4 = 0; - int psx_delay_BFC01414 = 0; - int psx_taken_BFC01414 = 0; - int psx_delay_BFC0141C = 0; - int psx_delay_BFC01444 = 0; - int psx_delay_BFC01474 = 0; - int psx_taken_BFC01474 = 0; - int psx_delay_BFC01488 = 0; - int psx_taken_BFC01488 = 0; - int psx_delay_BFC01490 = 0; - int psx_delay_BFC014BC = 0; - int psx_taken_BFC014BC = 0; - int psx_delay_BFC014D4 = 0; - int psx_taken_BFC014D4 = 0; - int psx_delay_BFC014DC = 0; - int psx_delay_BFC0150C = 0; - int psx_taken_BFC0150C = 0; - int psx_delay_BFC0151C = 0; - int psx_taken_BFC0151C = 0; - int psx_delay_BFC01528 = 0; - int psx_delay_BFC01550 = 0; - int psx_taken_BFC01550 = 0; - int psx_delay_BFC0155C = 0; - int psx_taken_BFC0155C = 0; - int psx_delay_BFC01564 = 0; - int psx_delay_BFC0158C = 0; - int psx_taken_BFC0158C = 0; - int psx_delay_BFC01598 = 0; - int psx_taken_BFC01598 = 0; - int psx_delay_BFC015AC = 0; - int psx_taken_BFC015AC = 0; - int psx_delay_BFC015B4 = 0; - int psx_delay_BFC015E0 = 0; - int psx_taken_BFC015E0 = 0; - int psx_delay_BFC015F4 = 0; - int psx_taken_BFC015F4 = 0; - int psx_delay_BFC015FC = 0; - int psx_taken_BFC015FC = 0; - int psx_delay_BFC01618 = 0; - int psx_taken_BFC01618 = 0; - int psx_delay_BFC01644 = 0; - int psx_taken_BFC01644 = 0; - int psx_delay_BFC0164C = 0; - int psx_taken_BFC0164C = 0; - int psx_delay_BFC01654 = 0; - int psx_taken_BFC01654 = 0; - int psx_delay_BFC0165C = 0; - int psx_taken_BFC0165C = 0; - int psx_delay_BFC01664 = 0; - int psx_taken_BFC01664 = 0; - int psx_delay_BFC0166C = 0; - int psx_taken_BFC0166C = 0; - int psx_delay_BFC01674 = 0; - int psx_taken_BFC01674 = 0; - int psx_delay_BFC0167C = 0; - int psx_taken_BFC0167C = 0; - int psx_delay_BFC01684 = 0; - int psx_taken_BFC01684 = 0; - int psx_delay_BFC0168C = 0; - int psx_taken_BFC0168C = 0; - int psx_delay_BFC01694 = 0; - int psx_taken_BFC01694 = 0; - int psx_delay_BFC0169C = 0; - int psx_taken_BFC0169C = 0; - int psx_delay_BFC016A4 = 0; - int psx_taken_BFC016A4 = 0; - int psx_delay_BFC016AC = 0; - int psx_taken_BFC016AC = 0; - int psx_delay_BFC016B8 = 0; - int psx_delay_BFC016E8 = 0; - int psx_taken_BFC016E8 = 0; - int psx_delay_BFC016F0 = 0; - int psx_taken_BFC016F0 = 0; - int psx_delay_BFC016F8 = 0; - int psx_taken_BFC016F8 = 0; - int psx_delay_BFC01700 = 0; - int psx_taken_BFC01700 = 0; - int psx_delay_BFC01708 = 0; - int psx_taken_BFC01708 = 0; - int psx_delay_BFC01710 = 0; - int psx_taken_BFC01710 = 0; - int psx_delay_BFC01718 = 0; - int psx_taken_BFC01718 = 0; - int psx_delay_BFC01724 = 0; - int psx_taken_BFC01724 = 0; - int psx_delay_BFC0172C = 0; - int psx_taken_BFC0172C = 0; - int psx_delay_BFC01738 = 0; - int psx_taken_BFC01738 = 0; - int psx_delay_BFC01740 = 0; - int psx_taken_BFC01740 = 0; - int psx_delay_BFC01748 = 0; - int psx_taken_BFC01748 = 0; - int psx_delay_BFC01750 = 0; - int psx_taken_BFC01750 = 0; - int psx_delay_BFC01758 = 0; - int psx_taken_BFC01758 = 0; - int psx_delay_BFC01760 = 0; - int psx_taken_BFC01760 = 0; - int psx_delay_BFC0176C = 0; - int psx_taken_BFC0176C = 0; - int psx_delay_BFC01774 = 0; - int psx_taken_BFC01774 = 0; - int psx_delay_BFC01780 = 0; - int psx_taken_BFC01780 = 0; - int psx_delay_BFC01788 = 0; - int psx_taken_BFC01788 = 0; - int psx_delay_BFC01790 = 0; - int psx_taken_BFC01790 = 0; - int psx_delay_BFC01798 = 0; - int psx_taken_BFC01798 = 0; - int psx_delay_BFC017A4 = 0; - int psx_taken_BFC017A4 = 0; - int psx_delay_BFC017AC = 0; - int psx_taken_BFC017AC = 0; - int psx_delay_BFC017B8 = 0; - int psx_taken_BFC017B8 = 0; - int psx_delay_BFC017C0 = 0; - int psx_taken_BFC017C0 = 0; - int psx_delay_BFC017C8 = 0; - int psx_taken_BFC017C8 = 0; - int psx_delay_BFC017D0 = 0; - int psx_taken_BFC017D0 = 0; - int psx_delay_BFC017D8 = 0; - int psx_taken_BFC017D8 = 0; - int psx_delay_BFC017E0 = 0; - int psx_taken_BFC017E0 = 0; - int psx_delay_BFC017E8 = 0; - int psx_taken_BFC017E8 = 0; - int psx_delay_BFC017F0 = 0; - int psx_taken_BFC017F0 = 0; - int psx_delay_BFC017FC = 0; - int psx_taken_BFC017FC = 0; - int psx_delay_BFC01804 = 0; - int psx_taken_BFC01804 = 0; - int psx_delay_BFC01810 = 0; - int psx_taken_BFC01810 = 0; - int psx_delay_BFC01818 = 0; - int psx_taken_BFC01818 = 0; - int psx_delay_BFC01820 = 0; - int psx_taken_BFC01820 = 0; - int psx_delay_BFC01828 = 0; - int psx_taken_BFC01828 = 0; - int psx_delay_BFC01834 = 0; - int psx_taken_BFC01834 = 0; - int psx_delay_BFC0183C = 0; - int psx_taken_BFC0183C = 0; - int psx_delay_BFC01848 = 0; - int psx_taken_BFC01848 = 0; - int psx_delay_BFC01850 = 0; - int psx_taken_BFC01850 = 0; - int psx_delay_BFC01858 = 0; - int psx_taken_BFC01858 = 0; - int psx_delay_BFC01860 = 0; - int psx_taken_BFC01860 = 0; - int psx_delay_BFC01868 = 0; - int psx_taken_BFC01868 = 0; - int psx_delay_BFC01870 = 0; - int psx_taken_BFC01870 = 0; - int psx_delay_BFC0187C = 0; - int psx_taken_BFC0187C = 0; - int psx_delay_BFC01884 = 0; - int psx_taken_BFC01884 = 0; - int psx_delay_BFC01890 = 0; - int psx_taken_BFC01890 = 0; - int psx_delay_BFC01898 = 0; - int psx_taken_BFC01898 = 0; - int psx_delay_BFC018A0 = 0; - int psx_taken_BFC018A0 = 0; - int psx_delay_BFC018A8 = 0; - int psx_taken_BFC018A8 = 0; - int psx_delay_BFC018B4 = 0; - int psx_taken_BFC018B4 = 0; - int psx_delay_BFC018BC = 0; - int psx_taken_BFC018BC = 0; - int psx_delay_BFC018C4 = 0; - int psx_taken_BFC018C4 = 0; - int psx_delay_BFC018D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC00DB8u: goto label_BFC00DB8; - case 0xBFC00DC0u: goto label_BFC00DC0; - case 0xBFC00E1Cu: goto label_BFC00E1C; - case 0xBFC00E2Cu: goto label_BFC00E2C; - case 0xBFC00E58u: goto label_BFC00E58; - case 0xBFC00E5Cu: goto label_BFC00E5C; - case 0xBFC00E64u: goto label_BFC00E64; - case 0xBFC00E6Cu: goto label_BFC00E6C; - case 0xBFC00E90u: goto label_BFC00E90; - case 0xBFC00E94u: goto label_BFC00E94; - case 0xBFC00EA8u: goto label_BFC00EA8; - case 0xBFC00EB8u: goto label_BFC00EB8; - case 0xBFC00EC0u: goto label_BFC00EC0; - case 0xBFC00EC8u: goto label_BFC00EC8; - case 0xBFC00ED0u: goto label_BFC00ED0; - case 0xBFC00EE0u: goto label_BFC00EE0; - case 0xBFC00EE4u: goto label_BFC00EE4; - case 0xBFC00EECu: goto label_BFC00EEC; - case 0xBFC00EF4u: goto label_BFC00EF4; - case 0xBFC00F04u: goto label_BFC00F04; - case 0xBFC00F10u: goto label_BFC00F10; - case 0xBFC00F14u: goto label_BFC00F14; - case 0xBFC00F1Cu: goto label_BFC00F1C; - case 0xBFC00F34u: goto label_BFC00F34; - case 0xBFC00F38u: goto label_BFC00F38; - case 0xBFC00F58u: goto label_BFC00F58; - case 0xBFC00F70u: goto label_BFC00F70; - case 0xBFC00F74u: goto label_BFC00F74; - case 0xBFC00F7Cu: goto label_BFC00F7C; - case 0xBFC00F84u: goto label_BFC00F84; - case 0xBFC00F8Cu: goto label_BFC00F8C; - case 0xBFC00F94u: goto label_BFC00F94; - case 0xBFC00F98u: goto label_BFC00F98; - case 0xBFC00F9Cu: goto label_BFC00F9C; - case 0xBFC00FBCu: goto label_BFC00FBC; - case 0xBFC00FD4u: goto label_BFC00FD4; - case 0xBFC00FE0u: goto label_BFC00FE0; - case 0xBFC00FE8u: goto label_BFC00FE8; - case 0xBFC00FF0u: goto label_BFC00FF0; - case 0xBFC00FF8u: goto label_BFC00FF8; - case 0xBFC01014u: goto label_BFC01014; - case 0xBFC01018u: goto label_BFC01018; - case 0xBFC01028u: goto label_BFC01028; - case 0xBFC01034u: goto label_BFC01034; - case 0xBFC01040u: goto label_BFC01040; - case 0xBFC0104Cu: goto label_BFC0104C; - case 0xBFC01054u: goto label_BFC01054; - case 0xBFC01058u: goto label_BFC01058; - case 0xBFC01060u: goto label_BFC01060; - case 0xBFC0106Cu: goto label_BFC0106C; - case 0xBFC01078u: goto label_BFC01078; - case 0xBFC0108Cu: goto label_BFC0108C; - case 0xBFC01090u: goto label_BFC01090; - case 0xBFC01098u: goto label_BFC01098; - case 0xBFC010ACu: goto label_BFC010AC; - case 0xBFC010B0u: goto label_BFC010B0; - case 0xBFC010C0u: goto label_BFC010C0; - case 0xBFC010C8u: goto label_BFC010C8; - case 0xBFC010D8u: goto label_BFC010D8; - case 0xBFC010E4u: goto label_BFC010E4; - case 0xBFC010F0u: goto label_BFC010F0; - case 0xBFC010FCu: goto label_BFC010FC; - case 0xBFC01104u: goto label_BFC01104; - case 0xBFC0110Cu: goto label_BFC0110C; - case 0xBFC01124u: goto label_BFC01124; - case 0xBFC01134u: goto label_BFC01134; - case 0xBFC0113Cu: goto label_BFC0113C; - case 0xBFC01144u: goto label_BFC01144; - case 0xBFC01154u: goto label_BFC01154; - case 0xBFC0117Cu: goto label_BFC0117C; - case 0xBFC0118Cu: goto label_BFC0118C; - case 0xBFC01194u: goto label_BFC01194; - case 0xBFC0119Cu: goto label_BFC0119C; - case 0xBFC011A4u: goto label_BFC011A4; - case 0xBFC011CCu: goto label_BFC011CC; - case 0xBFC011D0u: goto label_BFC011D0; - case 0xBFC011E4u: goto label_BFC011E4; - case 0xBFC011F0u: goto label_BFC011F0; - case 0xBFC011FCu: goto label_BFC011FC; - case 0xBFC01208u: goto label_BFC01208; - case 0xBFC01210u: goto label_BFC01210; - case 0xBFC01218u: goto label_BFC01218; - case 0xBFC01228u: goto label_BFC01228; - case 0xBFC01238u: goto label_BFC01238; - case 0xBFC01244u: goto label_BFC01244; - case 0xBFC01250u: goto label_BFC01250; - case 0xBFC0125Cu: goto label_BFC0125C; - case 0xBFC01264u: goto label_BFC01264; - case 0xBFC01268u: goto label_BFC01268; - case 0xBFC01274u: goto label_BFC01274; - case 0xBFC0127Cu: goto label_BFC0127C; - case 0xBFC01280u: goto label_BFC01280; - case 0xBFC01288u: goto label_BFC01288; - case 0xBFC01290u: goto label_BFC01290; - case 0xBFC01298u: goto label_BFC01298; - case 0xBFC012A0u: goto label_BFC012A0; - case 0xBFC012A8u: goto label_BFC012A8; - case 0xBFC012CCu: goto label_BFC012CC; - case 0xBFC012D0u: goto label_BFC012D0; - case 0xBFC012D8u: goto label_BFC012D8; - case 0xBFC012E8u: goto label_BFC012E8; - case 0xBFC012F4u: goto label_BFC012F4; - case 0xBFC01304u: goto label_BFC01304; - case 0xBFC01310u: goto label_BFC01310; - case 0xBFC01314u: goto label_BFC01314; - case 0xBFC01318u: goto label_BFC01318; - case 0xBFC01328u: goto label_BFC01328; - case 0xBFC01338u: goto label_BFC01338; - case 0xBFC01344u: goto label_BFC01344; - case 0xBFC01354u: goto label_BFC01354; - case 0xBFC0136Cu: goto label_BFC0136C; - case 0xBFC01374u: goto label_BFC01374; - case 0xBFC01378u: goto label_BFC01378; - case 0xBFC01380u: goto label_BFC01380; - case 0xBFC0138Cu: goto label_BFC0138C; - case 0xBFC01394u: goto label_BFC01394; - case 0xBFC013A8u: goto label_BFC013A8; - case 0xBFC013B0u: goto label_BFC013B0; - case 0xBFC013DCu: goto label_BFC013DC; - case 0xBFC013E4u: goto label_BFC013E4; - case 0xBFC013ECu: goto label_BFC013EC; - case 0xBFC01410u: goto label_BFC01410; - case 0xBFC0141Cu: goto label_BFC0141C; - case 0xBFC01424u: goto label_BFC01424; - case 0xBFC0144Cu: goto label_BFC0144C; - case 0xBFC01470u: goto label_BFC01470; - case 0xBFC0147Cu: goto label_BFC0147C; - case 0xBFC01490u: goto label_BFC01490; - case 0xBFC01498u: goto label_BFC01498; - case 0xBFC014C4u: goto label_BFC014C4; - case 0xBFC014C8u: goto label_BFC014C8; - case 0xBFC014DCu: goto label_BFC014DC; - case 0xBFC014E4u: goto label_BFC014E4; - case 0xBFC01514u: goto label_BFC01514; - case 0xBFC01518u: goto label_BFC01518; - case 0xBFC01524u: goto label_BFC01524; - case 0xBFC01530u: goto label_BFC01530; - case 0xBFC01558u: goto label_BFC01558; - case 0xBFC01564u: goto label_BFC01564; - case 0xBFC0156Cu: goto label_BFC0156C; - case 0xBFC01594u: goto label_BFC01594; - case 0xBFC01598u: goto label_BFC01598; - case 0xBFC015A0u: goto label_BFC015A0; - case 0xBFC015B4u: goto label_BFC015B4; - case 0xBFC015BCu: goto label_BFC015BC; - case 0xBFC015E8u: goto label_BFC015E8; - case 0xBFC015ECu: goto label_BFC015EC; - case 0xBFC015FCu: goto label_BFC015FC; - case 0xBFC01604u: goto label_BFC01604; - case 0xBFC01608u: goto label_BFC01608; - case 0xBFC0160Cu: goto label_BFC0160C; - case 0xBFC01620u: goto label_BFC01620; - case 0xBFC01624u: goto label_BFC01624; - case 0xBFC0164Cu: goto label_BFC0164C; - case 0xBFC01654u: goto label_BFC01654; - case 0xBFC0165Cu: goto label_BFC0165C; - case 0xBFC01664u: goto label_BFC01664; - case 0xBFC0166Cu: goto label_BFC0166C; - case 0xBFC01674u: goto label_BFC01674; - case 0xBFC0167Cu: goto label_BFC0167C; - case 0xBFC01684u: goto label_BFC01684; - case 0xBFC0168Cu: goto label_BFC0168C; - case 0xBFC01694u: goto label_BFC01694; - case 0xBFC0169Cu: goto label_BFC0169C; - case 0xBFC016A4u: goto label_BFC016A4; - case 0xBFC016ACu: goto label_BFC016AC; - case 0xBFC016B4u: goto label_BFC016B4; - case 0xBFC016B8u: goto label_BFC016B8; - case 0xBFC016C0u: goto label_BFC016C0; - case 0xBFC016F0u: goto label_BFC016F0; - case 0xBFC016F8u: goto label_BFC016F8; - case 0xBFC01700u: goto label_BFC01700; - case 0xBFC01708u: goto label_BFC01708; - case 0xBFC01710u: goto label_BFC01710; - case 0xBFC01718u: goto label_BFC01718; - case 0xBFC01720u: goto label_BFC01720; - case 0xBFC0172Cu: goto label_BFC0172C; - case 0xBFC01734u: goto label_BFC01734; - case 0xBFC01738u: goto label_BFC01738; - case 0xBFC01740u: goto label_BFC01740; - case 0xBFC01748u: goto label_BFC01748; - case 0xBFC01750u: goto label_BFC01750; - case 0xBFC01758u: goto label_BFC01758; - case 0xBFC01760u: goto label_BFC01760; - case 0xBFC01768u: goto label_BFC01768; - case 0xBFC01774u: goto label_BFC01774; - case 0xBFC0177Cu: goto label_BFC0177C; - case 0xBFC01788u: goto label_BFC01788; - case 0xBFC01790u: goto label_BFC01790; - case 0xBFC01798u: goto label_BFC01798; - case 0xBFC017A0u: goto label_BFC017A0; - case 0xBFC017ACu: goto label_BFC017AC; - case 0xBFC017B4u: goto label_BFC017B4; - case 0xBFC017B8u: goto label_BFC017B8; - case 0xBFC017C0u: goto label_BFC017C0; - case 0xBFC017C8u: goto label_BFC017C8; - case 0xBFC017D0u: goto label_BFC017D0; - case 0xBFC017D8u: goto label_BFC017D8; - case 0xBFC017E0u: goto label_BFC017E0; - case 0xBFC017E8u: goto label_BFC017E8; - case 0xBFC017F0u: goto label_BFC017F0; - case 0xBFC017F8u: goto label_BFC017F8; - case 0xBFC01804u: goto label_BFC01804; - case 0xBFC0180Cu: goto label_BFC0180C; - case 0xBFC01818u: goto label_BFC01818; - case 0xBFC01820u: goto label_BFC01820; - case 0xBFC01828u: goto label_BFC01828; - case 0xBFC01830u: goto label_BFC01830; - case 0xBFC0183Cu: goto label_BFC0183C; - case 0xBFC01844u: goto label_BFC01844; - case 0xBFC01850u: goto label_BFC01850; - case 0xBFC01858u: goto label_BFC01858; - case 0xBFC01860u: goto label_BFC01860; - case 0xBFC01868u: goto label_BFC01868; - case 0xBFC01870u: goto label_BFC01870; - case 0xBFC01878u: goto label_BFC01878; - case 0xBFC01884u: goto label_BFC01884; - case 0xBFC0188Cu: goto label_BFC0188C; - case 0xBFC01898u: goto label_BFC01898; - case 0xBFC018A0u: goto label_BFC018A0; - case 0xBFC018A8u: goto label_BFC018A8; - case 0xBFC018B0u: goto label_BFC018B0; - case 0xBFC018BCu: goto label_BFC018BC; - case 0xBFC018C4u: goto label_BFC018C4; - case 0xBFC018CCu: goto label_BFC018CC; - case 0xBFC018D0u: goto label_BFC018D0; - default: break; - } - } -label_BFC00DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC00DA0: 27BDFDD0 addiu $sp, $sp, -560 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-560)); - PGXP_ALU(0x27BDFDD0u, cpu->gpr[29], _pgx1, 0xFFFFFDD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC00DA4: AFB30038 sw $s3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DA4u); return; } g_debug_last_store_pc = 0xBFC00DA4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30038u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC00DA8: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DA8u); return; } g_debug_last_store_pc = 0xBFC00DA8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC00DAC: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC00DB0: 14A00003 bne $a1, $zero, 0xBFC00DC0 */ - uint32_t psx_brA_BFC00DB0 = cpu->gpr[5]; uint32_t psx_brB_BFC00DB0 = cpu->gpr[0]; - psx_taken_BFC00DB0 = (psx_brA_BFC00DB0 != psx_brB_BFC00DB0); - psx_delay_BFC00DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC00DB4: AFA40230 sw $a0, 560($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DB4u); return; } g_debug_last_store_pc = 0xBFC00DB4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40230u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DB4u); -#endif - if (psx_delay_BFC00DB0) { - psx_delay_BFC00DB0 = 0; - if (psx_taken_BFC00DB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00DC0u); - goto label_BFC00DC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00DB8u); - } -label_BFC00DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00DB8: 100002C4 beq $zero, $zero, 0xBFC018CC */ - uint32_t psx_brA_BFC00DB8 = cpu->gpr[0]; uint32_t psx_brB_BFC00DB8 = cpu->gpr[0]; - psx_taken_BFC00DB8 = (psx_brA_BFC00DB8 == psx_brB_BFC00DB8); - psx_delay_BFC00DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC00DBC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DBCu); -#endif - if (psx_delay_BFC00DB8) { - psx_delay_BFC00DB8 = 0; - if (psx_taken_BFC00DB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018CCu); - goto label_BFC018CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00DC0u); - } -label_BFC00DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC00DC0: AFBE0044 sw $fp, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DC0u); return; } g_debug_last_store_pc = 0xBFC00DC0u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0044u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC00DC4: AFB20058 sw $s2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DC4u); return; } g_debug_last_store_pc = 0xBFC00DC4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20058u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC00DC8: AFB00060 sw $s0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DC8u); return; } g_debug_last_store_pc = 0xBFC00DC8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00060u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC00DCC: AFB1005C sw $s1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DCCu); return; } g_debug_last_store_pc = 0xBFC00DCCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1005Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC00DD0: AFB40054 sw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DD0u); return; } g_debug_last_store_pc = 0xBFC00DD0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC00DD4: AFB50050 sw $s5, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DD4u); return; } g_debug_last_store_pc = 0xBFC00DD4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50050u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC00DD8: AFB6004C sw $s6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DD8u); return; } g_debug_last_store_pc = 0xBFC00DD8u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6004Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC00DDC: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC00DE0: AFB70048 sw $s7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DE0u); return; } g_debug_last_store_pc = 0xBFC00DE0u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70048u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC00DE4: 25CEDD60 addiu $t6, $t6, -8864 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-8864)); - PGXP_ALU(0x25CEDD60u, cpu->gpr[14], _pgx1, 0xFFFFDD60u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC00DE8: 3C1EBFC1 lui $fp, 0xBFC1 */ - cpu->gpr[30] = 0xBFC10000u; - PGXP_ALU(0x3C1EBFC1u, cpu->gpr[30], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC00DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC00DEC: AFAE01DC sw $t6, 476($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DECu); return; } g_debug_last_store_pc = 0xBFC00DECu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE01DCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC00DF0: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC00DF4: 27DEDDB0 addiu $fp, $fp, -8784 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (-8784)); - PGXP_ALU(0x27DEDDB0u, cpu->gpr[30], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00DF8: AFA00224 sw $zero, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00DF8u); return; } g_debug_last_store_pc = 0xBFC00DF8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00224u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC00DFC: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC00E00: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00E04: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00E08: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC00E0C: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC00E10: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC00E14: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00E18: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E18u); -#endif -label_BFC00E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E1Cu); -#endif - /* 0xBFC00E1C: 92440000 lbu $a0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 4, 0x40000u); - PGXP_LOAD(0x92440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC00E24: 1480000D bne $a0, $zero, 0xBFC00E5C */ - uint32_t psx_brA_BFC00E24 = cpu->gpr[4]; uint32_t psx_brB_BFC00E24 = cpu->gpr[0]; - psx_taken_BFC00E24 = (psx_brA_BFC00E24 != psx_brB_BFC00E24); - psx_delay_BFC00E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00E28: 24010025 addiu $at, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24010025u, cpu->gpr[1], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E28u); -#endif - if (psx_delay_BFC00E24) { - psx_delay_BFC00E24 = 0; - if (psx_taken_BFC00E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E5Cu); - goto label_BFC00E5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E2Cu); - } -label_BFC00E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E2Cu); -#endif - /* 0xBFC00E2C: 8FA20224 lw $v0, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E2Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20224u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E30u); -#endif - /* 0xBFC00E30: 8FB00060 lw $s0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E30u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00060u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E34u); -#endif - /* 0xBFC00E34: 8FB1005C lw $s1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E34u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1005Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E38u); -#endif - /* 0xBFC00E38: 8FB20058 lw $s2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E38u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20058u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E3Cu); -#endif - /* 0xBFC00E3C: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E3Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E40u); -#endif - /* 0xBFC00E40: 8FB50050 lw $s5, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E40u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50050u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E44u); -#endif - /* 0xBFC00E44: 8FB6004C lw $s6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E44u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6004Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E48u); -#endif - /* 0xBFC00E48: 8FB70048 lw $s7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E48u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70048u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E4Cu); -#endif - /* 0xBFC00E4C: 8FBE0044 lw $fp, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E4Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0044u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00E50: 1000029F beq $zero, $zero, 0xBFC018D0 */ - uint32_t psx_brA_BFC00E50 = cpu->gpr[0]; uint32_t psx_brB_BFC00E50 = cpu->gpr[0]; - psx_taken_BFC00E50 = (psx_brA_BFC00E50 == psx_brB_BFC00E50); - psx_delay_BFC00E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E54u); -#endif - /* 0xBFC00E54: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E54u); -#endif - if (psx_delay_BFC00E50) { - psx_delay_BFC00E50 = 0; - if (psx_taken_BFC00E50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018D0u); - goto label_BFC018D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E58u); - } -label_BFC00E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00E58: 24010025 addiu $at, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24010025u, cpu->gpr[1], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E58u); -#endif -label_BFC00E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC00E5C: 1081000D beq $a0, $at, 0xBFC00E94 */ - uint32_t psx_brA_BFC00E5C = cpu->gpr[4]; uint32_t psx_brB_BFC00E5C = cpu->gpr[1]; - psx_taken_BFC00E5C = (psx_brA_BFC00E5C == psx_brB_BFC00E5C); - psx_delay_BFC00E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00E60: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E60u); -#endif - if (psx_delay_BFC00E5C) { - psx_delay_BFC00E5C = 0; - if (psx_taken_BFC00E5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E94u); - goto label_BFC00E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E64u); - } -label_BFC00E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC00E64: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC00E6Cu; /* jal link before delay slot */ - psx_delay_BFC00E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00E68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00E68u); -#endif - if (psx_delay_BFC00E64) { - psx_delay_BFC00E64 = 0; - cpu->gpr[31] = 0xBFC00E6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC00E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC00E6C: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC00E70: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC00E74: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC00E78: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC00E7C: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC00E80: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC00E84: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00E88: 1000028E beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC00E88 = cpu->gpr[0]; uint32_t psx_brB_BFC00E88 = cpu->gpr[0]; - psx_taken_BFC00E88 = (psx_brA_BFC00E88 == psx_brB_BFC00E88); - psx_delay_BFC00E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC00E8C: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E8Cu); -#endif - if (psx_delay_BFC00E88) { - psx_delay_BFC00E88 = 0; - if (psx_taken_BFC00E88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E90u); - } -label_BFC00E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC00E90: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E90u); -#endif -label_BFC00E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC00E94: AFA00204 sw $zero, 516($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00E94u); return; } g_debug_last_store_pc = 0xBFC00E94u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00204u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC00E98: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC00E9C: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00EA0: 2406FFFF addiu $a2, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2406FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC00EA4: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EA4u); -#endif -label_BFC00EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EA8u); -#endif - /* 0xBFC00EA8: 92430001 lbu $v1, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (1)), 3, 0x40000u); - PGXP_LOAD(0x92430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00EAC: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EB0: 100001E6 beq $zero, $zero, 0xBFC0164C */ - uint32_t psx_brA_BFC00EB0 = cpu->gpr[0]; uint32_t psx_brB_BFC00EB0 = cpu->gpr[0]; - psx_taken_BFC00EB0 = (psx_brA_BFC00EB0 == psx_brB_BFC00EB0); - psx_delay_BFC00EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC00EB4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EB4u); -#endif - if (psx_delay_BFC00EB0) { - psx_delay_BFC00EB0 = 0; - if (psx_taken_BFC00EB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0164Cu); - goto label_BFC0164C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EB8u); - } -label_BFC00EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC00EB8: 1680FFFB bne $s4, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00EB8 = cpu->gpr[20]; uint32_t psx_brB_BFC00EB8 = cpu->gpr[0]; - psx_taken_BFC00EB8 = (psx_brA_BFC00EB8 != psx_brB_BFC00EB8); - psx_delay_BFC00EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00EBCu); -#endif - if (psx_delay_BFC00EB8) { - psx_delay_BFC00EB8 = 0; - if (psx_taken_BFC00EB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EC0u); - } -label_BFC00EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EC0: 1000FFF9 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00EC0 = cpu->gpr[0]; uint32_t psx_brB_BFC00EC0 = cpu->gpr[0]; - psx_taken_BFC00EC0 = (psx_brA_BFC00EC0 == psx_brB_BFC00EC0); - psx_delay_BFC00EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC00EC4: 24140020 addiu $s4, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24140020u, cpu->gpr[20], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EC4u); -#endif - if (psx_delay_BFC00EC0) { - psx_delay_BFC00EC0 = 0; - if (psx_taken_BFC00EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EC8u); - } -label_BFC00EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EC8: 1000FFF7 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00EC8 = cpu->gpr[0]; uint32_t psx_brB_BFC00EC8 = cpu->gpr[0]; - psx_taken_BFC00EC8 = (psx_brA_BFC00EC8 == psx_brB_BFC00EC8); - psx_delay_BFC00EC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00ECC: 36310008 ori $s1, $s1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x8u; - PGXP_ALU(0x36310008u, cpu->gpr[17], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00ECCu); -#endif - if (psx_delay_BFC00EC8) { - psx_delay_BFC00EC8 = 0; - if (psx_taken_BFC00EC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00ED0u); - } -label_BFC00ED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00ED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ED0u); -#endif - /* 0xBFC00ED0: 8E750000 lw $s5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00ED0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x80000u); } - PGXP_LOAD(0x8E750000u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC00ED4: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC00ED8: 06A1FFF3 bgez $s5, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00ED8 = cpu->gpr[21]; - psx_taken_BFC00ED8 = ((int32_t)psx_brA_BFC00ED8 >= 0); - psx_delay_BFC00ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00EDCu); -#endif - if (psx_delay_BFC00ED8) { - psx_delay_BFC00ED8 = 0; - if (psx_taken_BFC00ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EE0u); - } -label_BFC00EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC00EE0: 0015A823 subu $s5, $zero, $s5 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[0] - cpu->gpr[21]; - PGXP_ALU(0x0015A823u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EE0u); -#endif -label_BFC00EE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EE4: 1000FFF0 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00EE4 = cpu->gpr[0]; uint32_t psx_brB_BFC00EE4 = cpu->gpr[0]; - psx_taken_BFC00EE4 = (psx_brA_BFC00EE4 == psx_brB_BFC00EE4); - psx_delay_BFC00EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00EE8: 36310010 ori $s1, $s1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x10u; - PGXP_ALU(0x36310010u, cpu->gpr[17], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EE8u); -#endif - if (psx_delay_BFC00EE4) { - psx_delay_BFC00EE4 = 0; - if (psx_taken_BFC00EE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EECu); - } -label_BFC00EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00EEC: 1000FFEE beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00EEC = cpu->gpr[0]; uint32_t psx_brB_BFC00EEC = cpu->gpr[0]; - psx_taken_BFC00EEC = (psx_brA_BFC00EEC == psx_brB_BFC00EEC); - psx_delay_BFC00EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC00EF0: 2414002B addiu $s4, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2414002Bu, cpu->gpr[20], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EF0u); -#endif - if (psx_delay_BFC00EEC) { - psx_delay_BFC00EEC = 0; - if (psx_taken_BFC00EEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EF4u); - } -label_BFC00EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EF4u); -#endif - /* 0xBFC00EF4: 92430001 lbu $v1, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (1)), 3, 0x40000u); - PGXP_LOAD(0x92430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00EF8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC00EFC: 14E30005 bne $a3, $v1, 0xBFC00F14 */ - uint32_t psx_brA_BFC00EFC = cpu->gpr[7]; uint32_t psx_brB_BFC00EFC = cpu->gpr[3]; - psx_taken_BFC00EFC = (psx_brA_BFC00EFC != psx_brB_BFC00EFC); - psx_delay_BFC00EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC00F00: 2C610080 sltiu $at, $v1, 128 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F00u); -#endif - if (psx_delay_BFC00EFC) { - psx_delay_BFC00EFC = 0; - if (psx_taken_BFC00EFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F14u); - goto label_BFC00F14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F04u); - } -label_BFC00F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F04u); -#endif - /* 0xBFC00F04: 8E700000 lw $s0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00F04u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x80000u); } - PGXP_LOAD(0x8E700000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F08: 1000001A beq $zero, $zero, 0xBFC00F74 */ - uint32_t psx_brA_BFC00F08 = cpu->gpr[0]; uint32_t psx_brB_BFC00F08 = cpu->gpr[0]; - psx_taken_BFC00F08 = (psx_brA_BFC00F08 == psx_brB_BFC00F08); - psx_delay_BFC00F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC00F0C: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F0Cu); -#endif - if (psx_delay_BFC00F08) { - psx_delay_BFC00F08 = 0; - if (psx_taken_BFC00F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F74u); - goto label_BFC00F74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F10u); - } -label_BFC00F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC00F10: 2C610080 sltiu $at, $v1, 128 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F10u); -#endif -label_BFC00F14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00F14: 10200016 beq $at, $zero, 0xBFC00F70 */ - uint32_t psx_brA_BFC00F14 = cpu->gpr[1]; uint32_t psx_brB_BFC00F14 = cpu->gpr[0]; - psx_taken_BFC00F14 = (psx_brA_BFC00F14 == psx_brB_BFC00F14); - psx_delay_BFC00F14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC00F18: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F18u); -#endif - if (psx_delay_BFC00F14) { - psx_delay_BFC00F14 = 0; - if (psx_taken_BFC00F14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F70u); - goto label_BFC00F70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F1Cu); - } -label_BFC00F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008008u); -#endif - /* 0xBFC00F1C: 03C37821 addu $t7, $fp, $v1 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[30] + cpu->gpr[3]; - PGXP_ALU(0x03C37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F20u); -#endif - /* 0xBFC00F20: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC00F28: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC00F2C: 13200010 beq $t9, $zero, 0xBFC00F70 */ - uint32_t psx_brA_BFC00F2C = cpu->gpr[25]; uint32_t psx_brB_BFC00F2C = cpu->gpr[0]; - psx_taken_BFC00F2C = (psx_brA_BFC00F2C == psx_brB_BFC00F2C); - psx_delay_BFC00F2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00F30u); -#endif - if (psx_delay_BFC00F2C) { - psx_delay_BFC00F2C = 0; - if (psx_taken_BFC00F2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F70u); - goto label_BFC00F70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F34u); - } -label_BFC00F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00F34: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F34u); -#endif -label_BFC00F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00F38: 01D07021 addu $t6, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[16]; - PGXP_ALU(0x01D07021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC00F3C: 000E7040 sll $t6, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 1u; - PGXP_ALU(0x000E7040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14008u); -#endif - /* 0xBFC00F40: 01C38021 addu $s0, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C38021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F44u); -#endif - /* 0xBFC00F44: 92430001 lbu $v1, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (1)), 3, 0x40000u); - PGXP_LOAD(0x92430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00F48: 2610FFD0 addiu $s0, $s0, -48 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-48)); - PGXP_ALU(0x2610FFD0u, cpu->gpr[16], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC00F4C: 2C610080 sltiu $at, $v1, 128 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00F50: 10200007 beq $at, $zero, 0xBFC00F70 */ - uint32_t psx_brA_BFC00F50 = cpu->gpr[1]; uint32_t psx_brB_BFC00F50 = cpu->gpr[0]; - psx_taken_BFC00F50 = (psx_brA_BFC00F50 == psx_brB_BFC00F50); - psx_delay_BFC00F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00F54: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F54u); -#endif - if (psx_delay_BFC00F50) { - psx_delay_BFC00F50 = 0; - if (psx_taken_BFC00F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F70u); - goto label_BFC00F70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F58u); - } -label_BFC00F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008008u); -#endif - /* 0xBFC00F58: 03C37821 addu $t7, $fp, $v1 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[30] + cpu->gpr[3]; - PGXP_ALU(0x03C37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F5Cu); -#endif - /* 0xBFC00F5C: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC00F64: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC00F68: 1720FFF3 bne $t9, $zero, 0xBFC00F38 */ - uint32_t psx_brA_BFC00F68 = cpu->gpr[25]; uint32_t psx_brB_BFC00F68 = cpu->gpr[0]; - psx_taken_BFC00F68 = (psx_brA_BFC00F68 != psx_brB_BFC00F68); - psx_delay_BFC00F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00F6C: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F6Cu); -#endif - if (psx_delay_BFC00F68) { - psx_delay_BFC00F68 = 0; - if (psx_taken_BFC00F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F38u); - goto label_BFC00F38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F70u); - } -label_BFC00F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00F70: 2652FFFF addiu $s2, $s2, -1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-1)); - PGXP_ALU(0x2652FFFFu, cpu->gpr[18], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F70u); -#endif -label_BFC00F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00F74: 06010003 bgez $s0, 0xBFC00F84 */ - uint32_t psx_brA_BFC00F74 = cpu->gpr[16]; - psx_taken_BFC00F74 = ((int32_t)psx_brA_BFC00F74 >= 0); - psx_delay_BFC00F74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00F78u); -#endif - if (psx_delay_BFC00F74) { - psx_delay_BFC00F74 = 0; - if (psx_taken_BFC00F74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F84u); - goto label_BFC00F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F7Cu); - } -label_BFC00F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F7C: 1000FFCA beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00F7C = cpu->gpr[0]; uint32_t psx_brB_BFC00F7C = cpu->gpr[0]; - psx_taken_BFC00F7C = (psx_brA_BFC00F7C == psx_brB_BFC00F7C); - psx_delay_BFC00F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC00F80: 2406FFFF addiu $a2, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2406FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F80u); -#endif - if (psx_delay_BFC00F7C) { - psx_delay_BFC00F7C = 0; - if (psx_taken_BFC00F7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F84u); - } -label_BFC00F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F84: 1000FFC8 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00F84 = cpu->gpr[0]; uint32_t psx_brB_BFC00F84 = cpu->gpr[0]; - psx_taken_BFC00F84 = (psx_brA_BFC00F84 == psx_brB_BFC00F84); - psx_delay_BFC00F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC00F88: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F88u); -#endif - if (psx_delay_BFC00F84) { - psx_delay_BFC00F84 = 0; - if (psx_taken_BFC00F84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F8Cu); - } -label_BFC00F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00F8C: 1000FFC6 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00F8C = cpu->gpr[0]; uint32_t psx_brB_BFC00F8C = cpu->gpr[0]; - psx_taken_BFC00F8C = (psx_brA_BFC00F8C == psx_brB_BFC00F8C); - psx_delay_BFC00F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00F90: 36310020 ori $s1, $s1, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x20u; - PGXP_ALU(0x36310020u, cpu->gpr[17], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F90u); -#endif - if (psx_delay_BFC00F8C) { - psx_delay_BFC00F8C = 0; - if (psx_taken_BFC00F8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F94u); - } -label_BFC00F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC00F94: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F94u); -#endif -label_BFC00F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00F98: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F98u); -#endif -label_BFC00F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00F9C: 01D07021 addu $t6, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[16]; - PGXP_ALU(0x01D07021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC00FA0: 000E7040 sll $t6, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 1u; - PGXP_ALU(0x000E7040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14008u); -#endif - /* 0xBFC00FA4: 01C38021 addu $s0, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C38021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FA8u); -#endif - /* 0xBFC00FA8: 92430001 lbu $v1, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (1)), 3, 0x40000u); - PGXP_LOAD(0x92430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC00FAC: 2610FFD0 addiu $s0, $s0, -48 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-48)); - PGXP_ALU(0x2610FFD0u, cpu->gpr[16], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC00FB0: 2C610080 sltiu $at, $v1, 128 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C610080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC00FB4: 10200007 beq $at, $zero, 0xBFC00FD4 */ - uint32_t psx_brA_BFC00FB4 = cpu->gpr[1]; uint32_t psx_brB_BFC00FB4 = cpu->gpr[0]; - psx_taken_BFC00FB4 = (psx_brA_BFC00FB4 == psx_brB_BFC00FB4); - psx_delay_BFC00FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00FB8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FB8u); -#endif - if (psx_delay_BFC00FB4) { - psx_delay_BFC00FB4 = 0; - if (psx_taken_BFC00FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FD4u); - goto label_BFC00FD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FBCu); - } -label_BFC00FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008008u); -#endif - /* 0xBFC00FBC: 03C37821 addu $t7, $fp, $v1 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[30] + cpu->gpr[3]; - PGXP_ALU(0x03C37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FC0u); -#endif - /* 0xBFC00FC0: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00FC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC00FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC00FC8: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC00FCC: 1720FFF3 bne $t9, $zero, 0xBFC00F9C */ - uint32_t psx_brA_BFC00FCC = cpu->gpr[25]; uint32_t psx_brB_BFC00FCC = cpu->gpr[0]; - psx_taken_BFC00FCC = (psx_brA_BFC00FCC != psx_brB_BFC00FCC); - psx_delay_BFC00FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC00FD0: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FD0u); -#endif - if (psx_delay_BFC00FCC) { - psx_delay_BFC00FCC = 0; - if (psx_taken_BFC00FCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F9Cu); - goto label_BFC00F9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FD4u); - } -label_BFC00FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210001u); -#endif - /* 0xBFC00FD4: 0200A821 addu $s5, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x0200A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00FD8: 1000FFB3 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00FD8 = cpu->gpr[0]; uint32_t psx_brB_BFC00FD8 = cpu->gpr[0]; - psx_taken_BFC00FD8 = (psx_brA_BFC00FD8 == psx_brB_BFC00FD8); - psx_delay_BFC00FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC00FDC: 2652FFFF addiu $s2, $s2, -1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-1)); - PGXP_ALU(0x2652FFFFu, cpu->gpr[18], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FDCu); -#endif - if (psx_delay_BFC00FD8) { - psx_delay_BFC00FD8 = 0; - if (psx_taken_BFC00FD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FE0u); - } -label_BFC00FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00FE0: 1000FFB1 beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC00FE0 = cpu->gpr[0]; - psx_taken_BFC00FE0 = (psx_brA_BFC00FE0 == psx_brB_BFC00FE0); - psx_delay_BFC00FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00FE4: 36310002 ori $s1, $s1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x2u; - PGXP_ALU(0x36310002u, cpu->gpr[17], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FE4u); -#endif - if (psx_delay_BFC00FE0) { - psx_delay_BFC00FE0 = 0; - if (psx_taken_BFC00FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FE8u); - } -label_BFC00FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00FE8: 1000FFAF beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00FE8 = cpu->gpr[0]; uint32_t psx_brB_BFC00FE8 = cpu->gpr[0]; - psx_taken_BFC00FE8 = (psx_brA_BFC00FE8 == psx_brB_BFC00FE8); - psx_delay_BFC00FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00FEC: 36310004 ori $s1, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x4u; - PGXP_ALU(0x36310004u, cpu->gpr[17], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FECu); -#endif - if (psx_delay_BFC00FE8) { - psx_delay_BFC00FE8 = 0; - if (psx_taken_BFC00FE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FF0u); - } -label_BFC00FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC00FF0: 1000FFAD beq $zero, $zero, 0xBFC00EA8 */ - uint32_t psx_brA_BFC00FF0 = cpu->gpr[0]; uint32_t psx_brB_BFC00FF0 = cpu->gpr[0]; - psx_taken_BFC00FF0 = (psx_brA_BFC00FF0 == psx_brB_BFC00FF0); - psx_delay_BFC00FF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC00FF4: 36310001 ori $s1, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36310001u, cpu->gpr[17], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FF4u); -#endif - if (psx_delay_BFC00FF0) { - psx_delay_BFC00FF0 = 0; - if (psx_taken_BFC00FF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EA8u); - goto label_BFC00EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FF8u); - } -label_BFC00FF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC00FF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC00FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FF8u); -#endif - /* 0xBFC00FF8: 8E6E0000 lw $t6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00FF8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80000u); } - PGXP_LOAD(0x8E6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC00FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC00FFC: 27B60080 addiu $s6, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27B60080u, cpu->gpr[22], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC00FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01000: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC01004: 24170001 addiu $s7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24170001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01008: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0100C: 100000C2 beq $zero, $zero, 0xBFC01318 */ - uint32_t psx_brA_BFC0100C = cpu->gpr[0]; uint32_t psx_brB_BFC0100C = cpu->gpr[0]; - psx_taken_BFC0100C = (psx_brA_BFC0100C == psx_brB_BFC0100C); - psx_delay_BFC0100C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC01010: A3AE0080 sb $t6, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01010u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (128)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0080u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01010u); -#endif - if (psx_delay_BFC0100C) { - psx_delay_BFC0100C = 0; - if (psx_taken_BFC0100C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01318u); - goto label_BFC01318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01014u); - } -label_BFC01014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01014: 36310001 ori $s1, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36310001u, cpu->gpr[17], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01014u); -#endif -label_BFC01018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC01018: 322F0001 andi $t7, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x322F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0101C: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC01020: 11E00004 beq $t7, $zero, 0xBFC01034 */ - uint32_t psx_brA_BFC01020 = cpu->gpr[15]; uint32_t psx_brB_BFC01020 = cpu->gpr[0]; - psx_taken_BFC01020 = (psx_brA_BFC01020 == psx_brB_BFC01020); - psx_delay_BFC01020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC01024: 27B601DC addiu $s6, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27B601DCu, cpu->gpr[22], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01024u); -#endif - if (psx_delay_BFC01020) { - psx_delay_BFC01020 = 0; - if (psx_taken_BFC01020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01034u); - goto label_BFC01034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01028u); - } -label_BFC01028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01028u); -#endif - /* 0xBFC01028: 8E630000 lw $v1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01028u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } - PGXP_LOAD(0x8E630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0102C: 1000000A beq $zero, $zero, 0xBFC01058 */ - uint32_t psx_brA_BFC0102C = cpu->gpr[0]; uint32_t psx_brB_BFC0102C = cpu->gpr[0]; - psx_taken_BFC0102C = (psx_brA_BFC0102C == psx_brB_BFC0102C); - psx_delay_BFC0102C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01030: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01030u); -#endif - if (psx_delay_BFC0102C) { - psx_delay_BFC0102C = 0; - if (psx_taken_BFC0102C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01058u); - goto label_BFC01058; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01034u); - } -label_BFC01034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC01034: 32380004 andi $t8, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC01038: 13000004 beq $t8, $zero, 0xBFC0104C */ - uint32_t psx_brA_BFC01038 = cpu->gpr[24]; uint32_t psx_brB_BFC01038 = cpu->gpr[0]; - psx_taken_BFC01038 = (psx_brA_BFC01038 == psx_brB_BFC01038); - psx_delay_BFC01038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0103C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0103Cu); -#endif - if (psx_delay_BFC01038) { - psx_delay_BFC01038 = 0; - if (psx_taken_BFC01038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0104Cu); - goto label_BFC0104C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01040u); - } -label_BFC01040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01040u); -#endif - /* 0xBFC01040: 86620000 lh $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01040u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x86620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01044: 10000003 beq $zero, $zero, 0xBFC01054 */ - uint32_t psx_brA_BFC01044 = cpu->gpr[0]; uint32_t psx_brB_BFC01044 = cpu->gpr[0]; - psx_taken_BFC01044 = (psx_brA_BFC01044 == psx_brB_BFC01044); - psx_delay_BFC01044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01048: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01048u); -#endif - if (psx_delay_BFC01044) { - psx_delay_BFC01044 = 0; - if (psx_taken_BFC01044) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01054u); - goto label_BFC01054; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0104Cu); - } -label_BFC0104C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0104Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0104Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0104Cu); -#endif - /* 0xBFC0104C: 8E620000 lw $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0104Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x8E620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0104Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01050: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01050u); -#endif -label_BFC01054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01054: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01054u); -#endif -label_BFC01058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC01058: 04610089 bgez $v1, 0xBFC01280 */ - uint32_t psx_brA_BFC01058 = cpu->gpr[3]; - psx_taken_BFC01058 = ((int32_t)psx_brA_BFC01058 >= 0); - psx_delay_BFC01058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0105C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0105Cu); -#endif - if (psx_delay_BFC01058) { - psx_delay_BFC01058 = 0; - if (psx_taken_BFC01058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01060u); - } -label_BFC01060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01060: 00031823 subu $v1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00031823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01064: 10000086 beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC01064 = cpu->gpr[0]; uint32_t psx_brB_BFC01064 = cpu->gpr[0]; - psx_taken_BFC01064 = (psx_brA_BFC01064 == psx_brB_BFC01064); - psx_delay_BFC01064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01068: 2414002D addiu $s4, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2414002Du, cpu->gpr[20], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01068u); -#endif - if (psx_delay_BFC01064) { - psx_delay_BFC01064 = 0; - if (psx_taken_BFC01064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0106Cu); - } -label_BFC0106C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0106Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC0106C: 32390001 andi $t9, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC01070: 13200007 beq $t9, $zero, 0xBFC01090 */ - uint32_t psx_brA_BFC01070 = cpu->gpr[25]; uint32_t psx_brB_BFC01070 = cpu->gpr[0]; - psx_taken_BFC01070 = (psx_brA_BFC01070 == psx_brB_BFC01070); - psx_delay_BFC01070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC01074: 32380004 andi $t8, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01074u); -#endif - if (psx_delay_BFC01070) { - psx_delay_BFC01070 = 0; - if (psx_taken_BFC01070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01090u); - goto label_BFC01090; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01078u); - } -label_BFC01078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01078u); -#endif - /* 0xBFC01078: 8FAE0224 lw $t6, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01078u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0224u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0107Cu); -#endif - /* 0xBFC0107C: 8E6F0000 lw $t7, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0107Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80000u); } - PGXP_LOAD(0x8E6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0107Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01080: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01084: 1000020F beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC01084 = cpu->gpr[0]; uint32_t psx_brB_BFC01084 = cpu->gpr[0]; - psx_taken_BFC01084 = (psx_brA_BFC01084 == psx_brB_BFC01084); - psx_delay_BFC01084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC01088: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01088u); return; } g_debug_last_store_pc = 0xBFC01088u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01088u); -#endif - if (psx_delay_BFC01084) { - psx_delay_BFC01084 = 0; - if (psx_taken_BFC01084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0108Cu); - } -label_BFC0108C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0108Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0108C: 32380004 andi $t8, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0108Cu); -#endif -label_BFC01090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC01090: 13000007 beq $t8, $zero, 0xBFC010B0 */ - uint32_t psx_brA_BFC01090 = cpu->gpr[24]; uint32_t psx_brB_BFC01090 = cpu->gpr[0]; - psx_taken_BFC01090 = (psx_brA_BFC01090 == psx_brB_BFC01090); - psx_delay_BFC01090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01094u); -#endif - /* 0xBFC01094: 8FAF0224 lw $t7, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01094u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0224u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01094u); -#endif - if (psx_delay_BFC01090) { - psx_delay_BFC01090 = 0; - if (psx_taken_BFC01090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010B0u); - goto label_BFC010B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01098u); - } -label_BFC01098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01098u); -#endif - /* 0xBFC01098: 8FB90224 lw $t9, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01098u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90224u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0109Cu); -#endif - /* 0xBFC0109C: 8E6E0000 lw $t6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0109Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80000u); } - PGXP_LOAD(0x8E6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC010A0: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC010A4: 10000207 beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC010A4 = cpu->gpr[0]; uint32_t psx_brB_BFC010A4 = cpu->gpr[0]; - psx_taken_BFC010A4 = (psx_brA_BFC010A4 == psx_brB_BFC010A4); - psx_delay_BFC010A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC010A8: A5D90000 sh $t9, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010A8u); return; } g_debug_last_store_pc = 0xBFC010A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA5D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010A8u); -#endif - if (psx_delay_BFC010A4) { - psx_delay_BFC010A4 = 0; - if (psx_taken_BFC010A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010ACu); - } -label_BFC010AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010ACu); -#endif - /* 0xBFC010AC: 8FAF0224 lw $t7, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010ACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0224u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010ACu); -#endif -label_BFC010B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010B0u); -#endif - /* 0xBFC010B0: 8E780000 lw $t8, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010B0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x80000u); } - PGXP_LOAD(0x8E780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC010B4: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC010B8: 10000202 beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC010B8 = cpu->gpr[0]; uint32_t psx_brB_BFC010B8 = cpu->gpr[0]; - psx_taken_BFC010B8 = (psx_brA_BFC010B8 == psx_brB_BFC010B8); - psx_delay_BFC010B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC010BC: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010BCu); return; } g_debug_last_store_pc = 0xBFC010BCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010BCu); -#endif - if (psx_delay_BFC010B8) { - psx_delay_BFC010B8 = 0; - if (psx_taken_BFC010B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010C0u); - } -label_BFC010C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC010C0: 36310001 ori $s1, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36310001u, cpu->gpr[17], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC010C4: 32390001 andi $t9, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010C4u); -#endif -label_BFC010C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC010C8: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC010CC: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC010D0: 13200004 beq $t9, $zero, 0xBFC010E4 */ - uint32_t psx_brA_BFC010D0 = cpu->gpr[25]; uint32_t psx_brB_BFC010D0 = cpu->gpr[0]; - psx_taken_BFC010D0 = (psx_brA_BFC010D0 == psx_brB_BFC010D0); - psx_delay_BFC010D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC010D4: 27B601DC addiu $s6, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27B601DCu, cpu->gpr[22], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010D4u); -#endif - if (psx_delay_BFC010D0) { - psx_delay_BFC010D0 = 0; - if (psx_taken_BFC010D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010E4u); - goto label_BFC010E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010D8u); - } -label_BFC010D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010D8u); -#endif - /* 0xBFC010D8: 8E630000 lw $v1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } - PGXP_LOAD(0x8E630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC010DC: 10000068 beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC010DC = cpu->gpr[0]; uint32_t psx_brB_BFC010DC = cpu->gpr[0]; - psx_taken_BFC010DC = (psx_brA_BFC010DC == psx_brB_BFC010DC); - psx_delay_BFC010DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC010E0: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010E0u); -#endif - if (psx_delay_BFC010DC) { - psx_delay_BFC010DC = 0; - if (psx_taken_BFC010DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010E4u); - } -label_BFC010E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC010E4: 322E0004 andi $t6, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x322E0004u, cpu->gpr[14], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC010E8: 11C00004 beq $t6, $zero, 0xBFC010FC */ - uint32_t psx_brA_BFC010E8 = cpu->gpr[14]; uint32_t psx_brB_BFC010E8 = cpu->gpr[0]; - psx_taken_BFC010E8 = (psx_brA_BFC010E8 == psx_brB_BFC010E8); - psx_delay_BFC010E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC010EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC010ECu); -#endif - if (psx_delay_BFC010E8) { - psx_delay_BFC010E8 = 0; - if (psx_taken_BFC010E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010FCu); - goto label_BFC010FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010F0u); - } -label_BFC010F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010F0u); -#endif - /* 0xBFC010F0: 86620000 lh $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010F0u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x86620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC010F4: 10000003 beq $zero, $zero, 0xBFC01104 */ - uint32_t psx_brA_BFC010F4 = cpu->gpr[0]; uint32_t psx_brB_BFC010F4 = cpu->gpr[0]; - psx_taken_BFC010F4 = (psx_brA_BFC010F4 == psx_brB_BFC010F4); - psx_delay_BFC010F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC010F8: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010F8u); -#endif - if (psx_delay_BFC010F4) { - psx_delay_BFC010F4 = 0; - if (psx_taken_BFC010F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01104u); - goto label_BFC01104; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010FCu); - } -label_BFC010FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC010FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC010FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC010FCu); -#endif - /* 0xBFC010FC: 8E620000 lw $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x8E620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC010FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01100: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01100u); -#endif -label_BFC01104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01104: 1000005E beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC01104 = cpu->gpr[0]; uint32_t psx_brB_BFC01104 = cpu->gpr[0]; - psx_taken_BFC01104 = (psx_brA_BFC01104 == psx_brB_BFC01104); - psx_delay_BFC01104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01108: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01108u); -#endif - if (psx_delay_BFC01104) { - psx_delay_BFC01104 = 0; - if (psx_taken_BFC01104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0110Cu); - } -label_BFC0110C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0110Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0110Cu); -#endif - /* 0xBFC0110C: 8E630000 lw $v1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0110Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } - PGXP_LOAD(0x8E630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01110: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01114: 24040010 addiu $a0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24040010u, cpu->gpr[4], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01118: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0111C: 10000058 beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC0111C = cpu->gpr[0]; uint32_t psx_brB_BFC0111C = cpu->gpr[0]; - psx_taken_BFC0111C = (psx_brA_BFC0111C == psx_brB_BFC0111C); - psx_delay_BFC0111C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC01120: 27B601DC addiu $s6, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27B601DCu, cpu->gpr[22], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01120u); -#endif - if (psx_delay_BFC0111C) { - psx_delay_BFC0111C = 0; - if (psx_taken_BFC0111C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01124u); - } -label_BFC01124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01124u); -#endif - /* 0xBFC01124: 8E760000 lw $s6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01124u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x80000u); } - PGXP_LOAD(0x8E760000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01128: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0112Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0112C: 16C00003 bne $s6, $zero, 0xBFC0113C */ - uint32_t psx_brA_BFC0112C = cpu->gpr[22]; uint32_t psx_brB_BFC0112C = cpu->gpr[0]; - psx_taken_BFC0112C = (psx_brA_BFC0112C != psx_brB_BFC0112C); - psx_delay_BFC0112C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01130: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01130u); -#endif - if (psx_delay_BFC0112C) { - psx_delay_BFC0112C = 0; - if (psx_taken_BFC0112C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0113Cu); - goto label_BFC0113C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01134u); - } -label_BFC01134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC01134: 3C16BFC1 lui $s6, 0xBFC1 */ - cpu->gpr[22] = 0xBFC10000u; - PGXP_ALU(0x3C16BFC1u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC01138: 26D6DD74 addiu $s6, $s6, -8844 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-8844)); - PGXP_ALU(0x26D6DD74u, cpu->gpr[22], _pgx1, 0xFFFFDD74u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01138u); -#endif -label_BFC0113C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0113Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0113C: 04C00017 bltz $a2, 0xBFC0119C */ - uint32_t psx_brA_BFC0113C = cpu->gpr[6]; - psx_taken_BFC0113C = ((int32_t)psx_brA_BFC0113C < 0); - psx_delay_BFC0113C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01140u); -#endif - if (psx_delay_BFC0113C) { - psx_delay_BFC0113C = 0; - if (psx_taken_BFC0113C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0119Cu); - goto label_BFC0119C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01144u); - } -label_BFC01144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC01144: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC01148: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0114Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0114C: 0FF00B30 jal 0xBFC02CC0 */ - cpu->gpr[31] = 0xBFC01154u; /* jal link before delay slot */ - psx_delay_BFC0114C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC01150: AFA601F4 sw $a2, 500($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 500; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (500)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01150u); return; } g_debug_last_store_pc = 0xBFC01150u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA601F4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01150u); -#endif - if (psx_delay_BFC0114C) { - psx_delay_BFC0114C = 0; - cpu->gpr[31] = 0xBFC01154u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CC0u); - cpu->pc = 0xBFC02CC0u; return; - } -label_BFC01154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01154u); -#endif - /* 0xBFC01154: 8FA601F4 lw $a2, 500($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 500; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (500)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01154u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA601F4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC01158: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0115C: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC01160: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01164: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC01168: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0116Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0116C: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0116Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01170: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01174: 10400007 beq $v0, $zero, 0xBFC01194 */ - uint32_t psx_brA_BFC01174 = cpu->gpr[2]; uint32_t psx_brB_BFC01174 = cpu->gpr[0]; - psx_taken_BFC01174 = (psx_brA_BFC01174 == psx_brB_BFC01174); - psx_delay_BFC01174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01178: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01178u); -#endif - if (psx_delay_BFC01174) { - psx_delay_BFC01174 = 0; - if (psx_taken_BFC01174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01194u); - goto label_BFC01194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0117Cu); - } -label_BFC0117C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0117Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000Cu); -#endif - /* 0xBFC0117C: 00561823 subu $v1, $v0, $s6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[3] = cpu->gpr[2] - cpu->gpr[22]; - PGXP_ALU(0x00561823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4Au); -#endif - /* 0xBFC01180: 00C3082A slt $at, $a2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00C3082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01184: 10200064 beq $at, $zero, 0xBFC01318 */ - uint32_t psx_brA_BFC01184 = cpu->gpr[1]; uint32_t psx_brB_BFC01184 = cpu->gpr[0]; - psx_taken_BFC01184 = (psx_brA_BFC01184 == psx_brB_BFC01184); - psx_delay_BFC01184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800009u); -#endif - /* 0xBFC01188: 0060B821 addu $s7, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x0060B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01188u); -#endif - if (psx_delay_BFC01184) { - psx_delay_BFC01184 = 0; - if (psx_taken_BFC01184) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01318u); - goto label_BFC01318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0118Cu); - } -label_BFC0118C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0118Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0118Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0118Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0118C: 10000062 beq $zero, $zero, 0xBFC01318 */ - uint32_t psx_brA_BFC0118C = cpu->gpr[0]; uint32_t psx_brB_BFC0118C = cpu->gpr[0]; - psx_taken_BFC0118C = (psx_brA_BFC0118C == psx_brB_BFC0118C); - psx_delay_BFC0118C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800041u); -#endif - /* 0xBFC01190: 00C0B821 addu $s7, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01190u); -#endif - if (psx_delay_BFC0118C) { - psx_delay_BFC0118C = 0; - if (psx_taken_BFC0118C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01318u); - goto label_BFC01318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01194u); - } -label_BFC01194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01194: 10000060 beq $zero, $zero, 0xBFC01318 */ - uint32_t psx_brA_BFC01194 = cpu->gpr[0]; uint32_t psx_brB_BFC01194 = cpu->gpr[0]; - psx_taken_BFC01194 = (psx_brA_BFC01194 == psx_brB_BFC01194); - psx_delay_BFC01194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800041u); -#endif - /* 0xBFC01198: 00C0B821 addu $s7, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01198u); -#endif - if (psx_delay_BFC01194) { - psx_delay_BFC01194 = 0; - if (psx_taken_BFC01194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01318u); - goto label_BFC01318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0119Cu); - } -label_BFC0119C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0119Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0119C: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC011A4u; /* jal link before delay slot */ - psx_delay_BFC0119C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC011A0: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011A0u); -#endif - if (psx_delay_BFC0119C) { - psx_delay_BFC0119C = 0; - cpu->gpr[31] = 0xBFC011A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC011A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC011A4: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC011A8: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC011AC: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC011B0: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC011B4: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC011B8: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC011BC: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC011C0: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC011C4: 10000054 beq $zero, $zero, 0xBFC01318 */ - uint32_t psx_brA_BFC011C4 = cpu->gpr[0]; uint32_t psx_brB_BFC011C4 = cpu->gpr[0]; - psx_taken_BFC011C4 = (psx_brA_BFC011C4 == psx_brB_BFC011C4); - psx_delay_BFC011C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800005u); -#endif - /* 0xBFC011C8: 0040B821 addu $s7, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011C8u); -#endif - if (psx_delay_BFC011C4) { - psx_delay_BFC011C4 = 0; - if (psx_taken_BFC011C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01318u); - goto label_BFC01318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011CCu); - } -label_BFC011CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC011CC: 36310001 ori $s1, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36310001u, cpu->gpr[17], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011CCu); -#endif -label_BFC011D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC011D0: 322F0001 andi $t7, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x322F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC011D4: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC011D8: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC011DC: 11E00004 beq $t7, $zero, 0xBFC011F0 */ - uint32_t psx_brA_BFC011DC = cpu->gpr[15]; uint32_t psx_brB_BFC011DC = cpu->gpr[0]; - psx_taken_BFC011DC = (psx_brA_BFC011DC == psx_brB_BFC011DC); - psx_delay_BFC011DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC011E0: 27B601DC addiu $s6, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27B601DCu, cpu->gpr[22], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011E0u); -#endif - if (psx_delay_BFC011DC) { - psx_delay_BFC011DC = 0; - if (psx_taken_BFC011DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011F0u); - goto label_BFC011F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011E4u); - } -label_BFC011E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011E4u); -#endif - /* 0xBFC011E4: 8E630000 lw $v1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC011E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } - PGXP_LOAD(0x8E630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC011E8: 10000025 beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC011E8 = cpu->gpr[0]; uint32_t psx_brB_BFC011E8 = cpu->gpr[0]; - psx_taken_BFC011E8 = (psx_brA_BFC011E8 == psx_brB_BFC011E8); - psx_delay_BFC011E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC011EC: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011ECu); -#endif - if (psx_delay_BFC011E8) { - psx_delay_BFC011E8 = 0; - if (psx_taken_BFC011E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011F0u); - } -label_BFC011F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC011F0: 32380004 andi $t8, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x32380004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC011F4: 13000004 beq $t8, $zero, 0xBFC01208 */ - uint32_t psx_brA_BFC011F4 = cpu->gpr[24]; uint32_t psx_brB_BFC011F4 = cpu->gpr[0]; - psx_taken_BFC011F4 = (psx_brA_BFC011F4 == psx_brB_BFC011F4); - psx_delay_BFC011F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC011F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC011F8u); -#endif - if (psx_delay_BFC011F4) { - psx_delay_BFC011F4 = 0; - if (psx_taken_BFC011F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01208u); - goto label_BFC01208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011FCu); - } -label_BFC011FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC011FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC011FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC011FCu); -#endif - /* 0xBFC011FC: 86620000 lh $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC011FCu); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x86620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC011FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01200: 10000003 beq $zero, $zero, 0xBFC01210 */ - uint32_t psx_brA_BFC01200 = cpu->gpr[0]; uint32_t psx_brB_BFC01200 = cpu->gpr[0]; - psx_taken_BFC01200 = (psx_brA_BFC01200 == psx_brB_BFC01200); - psx_delay_BFC01200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01204: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01204u); -#endif - if (psx_delay_BFC01200) { - psx_delay_BFC01200 = 0; - if (psx_taken_BFC01200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01210u); - goto label_BFC01210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01208u); - } -label_BFC01208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01208u); -#endif - /* 0xBFC01208: 8E620000 lw $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01208u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x8E620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC0120C: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0120Cu); -#endif -label_BFC01210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01210: 1000001B beq $zero, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC01210 = cpu->gpr[0]; uint32_t psx_brB_BFC01210 = cpu->gpr[0]; - psx_taken_BFC01210 = (psx_brA_BFC01210 == psx_brB_BFC01210); - psx_delay_BFC01210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01214: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01214u); -#endif - if (psx_delay_BFC01210) { - psx_delay_BFC01210 = 0; - if (psx_taken_BFC01210) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01218u); - } -label_BFC01218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC01218: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0121Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0121C: 2739DD7C addiu $t9, $t9, -8836 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-8836)); - PGXP_ALU(0x2739DD7Cu, cpu->gpr[25], _pgx1, 0xFFFFDD7Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0121Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC01220: AFB901DC sw $t9, 476($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01220u); return; } g_debug_last_store_pc = 0xBFC01220u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB901DCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC01224: 322E0001 andi $t6, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x322E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01224u); -#endif -label_BFC01228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01228: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0122Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0122C: 24040010 addiu $a0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24040010u, cpu->gpr[4], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0122Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC01230: 11C00004 beq $t6, $zero, 0xBFC01244 */ - uint32_t psx_brA_BFC01230 = cpu->gpr[14]; uint32_t psx_brB_BFC01230 = cpu->gpr[0]; - psx_taken_BFC01230 = (psx_brA_BFC01230 == psx_brB_BFC01230); - psx_delay_BFC01230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC01234: 27B601DC addiu $s6, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27B601DCu, cpu->gpr[22], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01234u); -#endif - if (psx_delay_BFC01230) { - psx_delay_BFC01230 = 0; - if (psx_taken_BFC01230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01244u); - goto label_BFC01244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01238u); - } -label_BFC01238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01238u); -#endif - /* 0xBFC01238: 8E630000 lw $v1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01238u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } - PGXP_LOAD(0x8E630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0123C: 1000000A beq $zero, $zero, 0xBFC01268 */ - uint32_t psx_brA_BFC0123C = cpu->gpr[0]; uint32_t psx_brB_BFC0123C = cpu->gpr[0]; - psx_taken_BFC0123C = (psx_brA_BFC0123C == psx_brB_BFC0123C); - psx_delay_BFC0123C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01240: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01240u); -#endif - if (psx_delay_BFC0123C) { - psx_delay_BFC0123C = 0; - if (psx_taken_BFC0123C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01268u); - goto label_BFC01268; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01244u); - } -label_BFC01244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC01244: 322F0004 andi $t7, $s1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0x4u; - PGXP_ALU(0x322F0004u, cpu->gpr[15], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC01248: 11E00004 beq $t7, $zero, 0xBFC0125C */ - uint32_t psx_brA_BFC01248 = cpu->gpr[15]; uint32_t psx_brB_BFC01248 = cpu->gpr[0]; - psx_taken_BFC01248 = (psx_brA_BFC01248 == psx_brB_BFC01248); - psx_delay_BFC01248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0124Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0124C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0124Cu); -#endif - if (psx_delay_BFC01248) { - psx_delay_BFC01248 = 0; - if (psx_taken_BFC01248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0125Cu); - goto label_BFC0125C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01250u); - } -label_BFC01250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01250u); -#endif - /* 0xBFC01250: 86620000 lh $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01250u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x86620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01254: 10000003 beq $zero, $zero, 0xBFC01264 */ - uint32_t psx_brA_BFC01254 = cpu->gpr[0]; uint32_t psx_brB_BFC01254 = cpu->gpr[0]; - psx_taken_BFC01254 = (psx_brA_BFC01254 == psx_brB_BFC01254); - psx_delay_BFC01254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01258: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01258u); -#endif - if (psx_delay_BFC01254) { - psx_delay_BFC01254 = 0; - if (psx_taken_BFC01254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01264u); - goto label_BFC01264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0125Cu); - } -label_BFC0125C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0125Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0125Cu); -#endif - /* 0xBFC0125C: 8E620000 lw $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0125Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } - PGXP_LOAD(0x8E620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC01260: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01260u); -#endif -label_BFC01264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01264: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01264u); -#endif -label_BFC01268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC01268: 32380008 andi $t8, $s1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x8u; - PGXP_ALU(0x32380008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0126Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0126C: 13000004 beq $t8, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC0126C = cpu->gpr[24]; uint32_t psx_brB_BFC0126C = cpu->gpr[0]; - psx_taken_BFC0126C = (psx_brA_BFC0126C == psx_brB_BFC0126C); - psx_delay_BFC0126C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01270: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01270u); -#endif - if (psx_delay_BFC0126C) { - psx_delay_BFC0126C = 0; - if (psx_taken_BFC0126C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01274u); - } -label_BFC01274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01274: 10600002 beq $v1, $zero, 0xBFC01280 */ - uint32_t psx_brA_BFC01274 = cpu->gpr[3]; uint32_t psx_brB_BFC01274 = cpu->gpr[0]; - psx_taken_BFC01274 = (psx_brA_BFC01274 == psx_brB_BFC01274); - psx_delay_BFC01274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01278u); -#endif - if (psx_delay_BFC01274) { - psx_delay_BFC01274 = 0; - if (psx_taken_BFC01274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01280u); - goto label_BFC01280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0127Cu); - } -label_BFC0127C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0127Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0127C: 36310040 ori $s1, $s1, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x40u; - PGXP_ALU(0x36310040u, cpu->gpr[17], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0127Cu); -#endif -label_BFC01280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01280: 04C00003 bltz $a2, 0xBFC01290 */ - uint32_t psx_brA_BFC01280 = cpu->gpr[6]; - psx_taken_BFC01280 = ((int32_t)psx_brA_BFC01280 < 0); - psx_delay_BFC01280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC01284: AFA60204 sw $a2, 516($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01284u); return; } g_debug_last_store_pc = 0xBFC01284u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60204u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01284u); -#endif - if (psx_delay_BFC01280) { - psx_delay_BFC01280 = 0; - if (psx_taken_BFC01280) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01290u); - goto label_BFC01290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01288u); - } -label_BFC01288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01288: 2401FFDF addiu $at, $zero, -33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); - PGXP_ALU(0x2401FFDFu, cpu->gpr[1], _pgx1, 0xFFFFFFDFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0128Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC0128C: 02218824 and $s1, $s1, $at */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1]; - PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0128Cu); -#endif -label_BFC01290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01290: 14600003 bne $v1, $zero, 0xBFC012A0 */ - uint32_t psx_brA_BFC01290 = cpu->gpr[3]; uint32_t psx_brB_BFC01290 = cpu->gpr[0]; - psx_taken_BFC01290 = (psx_brA_BFC01290 != psx_brB_BFC01290); - psx_delay_BFC01290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01294u); -#endif - if (psx_delay_BFC01290) { - psx_delay_BFC01290 = 0; - if (psx_taken_BFC01290) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012A0u); - goto label_BFC012A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01298u); - } -label_BFC01298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC01298: 10C0001E beq $a2, $zero, 0xBFC01314 */ - uint32_t psx_brA_BFC01298 = cpu->gpr[6]; uint32_t psx_brB_BFC01298 = cpu->gpr[0]; - psx_taken_BFC01298 = (psx_brA_BFC01298 == psx_brB_BFC01298); - psx_delay_BFC01298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0129C: 27AF01DC addiu $t7, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27AF01DCu, cpu->gpr[15], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0129Cu); -#endif - if (psx_delay_BFC01298) { - psx_delay_BFC01298 = 0; - if (psx_taken_BFC01298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01314u); - goto label_BFC01314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012A0u); - } -label_BFC012A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012A0u); -#endif - /* 0xBFC012A0: 8FA501DC lw $a1, 476($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC012A0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA501DCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC012A4: 32220008 andi $v0, $s1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x8u; - PGXP_ALU(0x32220008u, cpu->gpr[2], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012A4u); -#endif -label_BFC012A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC012A8: 0064001B divu $v1, $a0 */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[4]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0064001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0xBFC012A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC012AC: 26D6FFFF addiu $s6, $s6, -1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); - PGXP_ALU(0x26D6FFFFu, cpu->gpr[22], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC012B0: 0000C810 mfhi $t9 */ - cpu->gpr[25] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C810u, cpu->gpr[25], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC012B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004020u); -#endif - /* 0xBFC012B4: 00B97021 addu $t6, $a1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[5] + cpu->gpr[25]; - PGXP_ALU(0x00B97021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012B8u); -#endif - /* 0xBFC012B8: 81CF0000 lb $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 15, 0x4000u); - PGXP_LOAD(0x81CF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC012BC: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC012BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408000u); -#endif - /* 0xBFC012C0: A2CF0000 sb $t7, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC012C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[22] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA2CF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC012C4: 14800002 bne $a0, $zero, 0xBFC012D0 */ - uint32_t psx_brA_BFC012C4 = cpu->gpr[4]; uint32_t psx_brB_BFC012C4 = cpu->gpr[0]; - psx_taken_BFC012C4 = (psx_brA_BFC012C4 != psx_brB_BFC012C4); - psx_delay_BFC012C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC012C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC012C8u); -#endif - if (psx_delay_BFC012C4) { - psx_delay_BFC012C4 = 0; - if (psx_taken_BFC012C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012D0u); - goto label_BFC012D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012CCu); - } -label_BFC012CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC012CC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0xBFC012CCu); return; -#ifdef PSX_COSIM - cosim_instr(0xBFC012CCu); -#endif -label_BFC012D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC012D0: 1460FFF5 bne $v1, $zero, 0xBFC012A8 */ - uint32_t psx_brA_BFC012D0 = cpu->gpr[3]; uint32_t psx_brB_BFC012D0 = cpu->gpr[0]; - psx_taken_BFC012D0 = (psx_brA_BFC012D0 != psx_brB_BFC012D0); - psx_delay_BFC012D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC012D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC012D4u); -#endif - if (psx_delay_BFC012D0) { - psx_delay_BFC012D0 = 0; - if (psx_taken_BFC012D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012A8u); - goto label_BFC012A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012D8u); - } -label_BFC012D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC012D8: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC012D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC012DC: 2718DD90 addiu $t8, $t8, -8816 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-8816)); - PGXP_ALU(0x2718DD90u, cpu->gpr[24], _pgx1, 0xFFFFDD90u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC012E0: 1040000B beq $v0, $zero, 0xBFC01310 */ - uint32_t psx_brA_BFC012E0 = cpu->gpr[2]; uint32_t psx_brB_BFC012E0 = cpu->gpr[0]; - psx_taken_BFC012E0 = (psx_brA_BFC012E0 == psx_brB_BFC012E0); - psx_delay_BFC012E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC012E4: AFB801DC sw $t8, 476($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC012E4u); return; } g_debug_last_store_pc = 0xBFC012E4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB801DCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012E4u); -#endif - if (psx_delay_BFC012E0) { - psx_delay_BFC012E0 = 0; - if (psx_taken_BFC012E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01310u); - goto label_BFC01310; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012E8u); - } -label_BFC012E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC012E8: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC012EC: 14810009 bne $a0, $at, 0xBFC01314 */ - uint32_t psx_brA_BFC012EC = cpu->gpr[4]; uint32_t psx_brB_BFC012EC = cpu->gpr[1]; - psx_taken_BFC012EC = (psx_brA_BFC012EC != psx_brB_BFC012EC); - psx_delay_BFC012EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC012F0: 27AF01DC addiu $t7, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27AF01DCu, cpu->gpr[15], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012F0u); -#endif - if (psx_delay_BFC012EC) { - psx_delay_BFC012EC = 0; - if (psx_taken_BFC012EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01314u); - goto label_BFC01314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC012F4u); - } -label_BFC012F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC012F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC012F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012F4u); -#endif - /* 0xBFC012F4: 82D90000 lb $t9, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (0)), 25, 0x400000u); - PGXP_LOAD(0x82D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC012F8: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC012F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC012FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC012FC: 13210005 beq $t9, $at, 0xBFC01314 */ - uint32_t psx_brA_BFC012FC = cpu->gpr[25]; uint32_t psx_brB_BFC012FC = cpu->gpr[1]; - psx_taken_BFC012FC = (psx_brA_BFC012FC == psx_brB_BFC012FC); - psx_delay_BFC012FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC01300: 27AF01DC addiu $t7, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27AF01DCu, cpu->gpr[15], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01300u); -#endif - if (psx_delay_BFC012FC) { - psx_delay_BFC012FC = 0; - if (psx_taken_BFC012FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01314u); - goto label_BFC01314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01304u); - } -label_BFC01304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC01304: 240E0030 addiu $t6, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x240E0030u, cpu->gpr[14], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC01308: A2CEFFFF sb $t6, -1($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01308u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[22] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA2CEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC0130C: 26D6FFFF addiu $s6, $s6, -1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); - PGXP_ALU(0x26D6FFFFu, cpu->gpr[22], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0130Cu); -#endif -label_BFC01310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC01310: 27AF01DC addiu $t7, $sp, 476 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (476)); - PGXP_ALU(0x27AF01DCu, cpu->gpr[15], _pgx1, 0x000001DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01310u); -#endif -label_BFC01314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC08000u); -#endif - /* 0xBFC01314: 01F6B823 subu $s7, $t7, $s6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[23] = cpu->gpr[15] - cpu->gpr[22]; - PGXP_ALU(0x01F6B823u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01314u); -#endif -label_BFC01318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800005u); -#endif - /* 0xBFC01318: 02E01021 addu $v0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0131Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0131C: AFA20200 sw $v0, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0131Cu); return; } g_debug_last_store_pc = 0xBFC0131Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20200u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0131Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC01320: 12800005 beq $s4, $zero, 0xBFC01338 */ - uint32_t psx_brA_BFC01320 = cpu->gpr[20]; uint32_t psx_brB_BFC01320 = cpu->gpr[0]; - psx_taken_BFC01320 = (psx_brA_BFC01320 == psx_brB_BFC01320); - psx_delay_BFC01320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC01324: AFA20064 sw $v0, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01324u); return; } g_debug_last_store_pc = 0xBFC01324u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01324u); -#endif - if (psx_delay_BFC01320) { - psx_delay_BFC01320 = 0; - if (psx_taken_BFC01320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01338u); - goto label_BFC01338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01328u); - } -label_BFC01328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01328u); -#endif - /* 0xBFC01328: 8FB80200 lw $t8, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01328u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80200u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0132C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC01330: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC01334: AFB90200 sw $t9, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01334u); return; } g_debug_last_store_pc = 0xBFC01334u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90200u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01334u); -#endif -label_BFC01338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC01338: 32220040 andi $v0, $s1, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x40u; - PGXP_ALU(0x32220040u, cpu->gpr[2], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0133Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0133C: 10400005 beq $v0, $zero, 0xBFC01354 */ - uint32_t psx_brA_BFC0133C = cpu->gpr[2]; uint32_t psx_brB_BFC0133C = cpu->gpr[0]; - psx_taken_BFC0133C = (psx_brA_BFC0133C == psx_brB_BFC0133C); - psx_delay_BFC0133C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC01340: AFA2006C sw $v0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01340u); return; } g_debug_last_store_pc = 0xBFC01340u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2006Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01340u); -#endif - if (psx_delay_BFC0133C) { - psx_delay_BFC0133C = 0; - if (psx_taken_BFC0133C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01354u); - goto label_BFC01354; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01344u); - } -label_BFC01344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01344u); -#endif - /* 0xBFC01344: 8FAE0200 lw $t6, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01344u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0134Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0134C: 25CF0002 addiu $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (2)); - PGXP_ALU(0x25CF0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0134Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC01350: AFAF0200 sw $t7, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01350u); return; } g_debug_last_store_pc = 0xBFC01350u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0200u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01350u); -#endif -label_BFC01354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01354u); -#endif - /* 0xBFC01354: 8FB80204 lw $t8, 516($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01354u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80204u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01358u); -#endif - /* 0xBFC01358: 8FB90200 lw $t9, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01358u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90200u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0135C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC01360: 0338082A slt $at, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0338082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01364: 10200004 beq $at, $zero, 0xBFC01378 */ - uint32_t psx_brA_BFC01364 = cpu->gpr[1]; uint32_t psx_brB_BFC01364 = cpu->gpr[0]; - psx_taken_BFC01364 = (psx_brA_BFC01364 == psx_brB_BFC01364); - psx_delay_BFC01364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01368u); -#endif - /* 0xBFC01368: 8FAE0200 lw $t6, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01368u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01368u); -#endif - if (psx_delay_BFC01364) { - psx_delay_BFC01364 = 0; - if (psx_taken_BFC01364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01378u); - goto label_BFC01378; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0136Cu); - } -label_BFC0136C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0136Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0136C: 10000004 beq $zero, $zero, 0xBFC01380 */ - uint32_t psx_brA_BFC0136C = cpu->gpr[0]; uint32_t psx_brB_BFC0136C = cpu->gpr[0]; - psx_taken_BFC0136C = (psx_brA_BFC0136C == psx_brB_BFC0136C); - psx_delay_BFC0136C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC01370: AFB801F0 sw $t8, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01370u); return; } g_debug_last_store_pc = 0xBFC01370u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB801F0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01370u); -#endif - if (psx_delay_BFC0136C) { - psx_delay_BFC0136C = 0; - if (psx_taken_BFC0136C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01380u); - goto label_BFC01380; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01374u); - } -label_BFC01374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01374u); -#endif - /* 0xBFC01374: 8FAE0200 lw $t6, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01374u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01374u); -#endif -label_BFC01378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0137Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC0137C: AFAE01F0 sw $t6, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0137Cu); return; } g_debug_last_store_pc = 0xBFC0137Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE01F0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0137Cu); -#endif -label_BFC01380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC01380: 32220030 andi $v0, $s1, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x30u; - PGXP_ALU(0x32220030u, cpu->gpr[2], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01384: 14400015 bne $v0, $zero, 0xBFC013DC */ - uint32_t psx_brA_BFC01384 = cpu->gpr[2]; uint32_t psx_brB_BFC01384 = cpu->gpr[0]; - psx_taken_BFC01384 = (psx_brA_BFC01384 != psx_brB_BFC01384); - psx_delay_BFC01384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC01388: AFA20068 sw $v0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01388u); return; } g_debug_last_store_pc = 0xBFC01388u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20068u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01388u); -#endif - if (psx_delay_BFC01384) { - psx_delay_BFC01384 = 0; - if (psx_taken_BFC01384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013DCu); - goto label_BFC013DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0138Cu); - } -label_BFC0138C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0138Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0138C: 12A00013 beq $s5, $zero, 0xBFC013DC */ - uint32_t psx_brA_BFC0138C = cpu->gpr[21]; uint32_t psx_brB_BFC0138C = cpu->gpr[0]; - psx_taken_BFC0138C = (psx_brA_BFC0138C == psx_brB_BFC0138C); - psx_delay_BFC0138C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01390u); -#endif - if (psx_delay_BFC0138C) { - psx_delay_BFC0138C = 0; - if (psx_taken_BFC0138C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013DCu); - goto label_BFC013DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01394u); - } -label_BFC01394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01394u); -#endif - /* 0xBFC01394: 8FA201F0 lw $v0, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01394u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA201F0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0139Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200006u); -#endif - /* 0xBFC0139C: 0055082A slt $at, $v0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0055082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0139Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC013A0: 1020000E beq $at, $zero, 0xBFC013DC */ - uint32_t psx_brA_BFC013A0 = cpu->gpr[1]; uint32_t psx_brB_BFC013A0 = cpu->gpr[0]; - psx_taken_BFC013A0 = (psx_brA_BFC013A0 == psx_brB_BFC013A0); - psx_delay_BFC013A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC013A4: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013A4u); -#endif - if (psx_delay_BFC013A0) { - psx_delay_BFC013A0 = 0; - if (psx_taken_BFC013A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013DCu); - goto label_BFC013DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013A8u); - } -label_BFC013A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC013A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC013A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC013A8: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC013B0u; /* jal link before delay slot */ - psx_delay_BFC013A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC013AC: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013ACu); -#endif - if (psx_delay_BFC013A8) { - psx_delay_BFC013A8 = 0; - cpu->gpr[31] = 0xBFC013B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC013B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC013B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC013B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC013B0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210002u); -#endif - /* 0xBFC013B4: 0215082A slt $at, $s0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC013B8: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC013BC: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC013C0: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC013C4: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC013C8: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC013CC: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC013D0: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC013D4: 1420FFF4 bne $at, $zero, 0xBFC013A8 */ - uint32_t psx_brA_BFC013D4 = cpu->gpr[1]; uint32_t psx_brB_BFC013D4 = cpu->gpr[0]; - psx_taken_BFC013D4 = (psx_brA_BFC013D4 != psx_brB_BFC013D4); - psx_delay_BFC013D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC013D8: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013D8u); -#endif - if (psx_delay_BFC013D4) { - psx_delay_BFC013D4 = 0; - if (psx_taken_BFC013D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013A8u); - goto label_BFC013A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013DCu); - } -label_BFC013DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC013DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC013DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC013DC: 1280000C beq $s4, $zero, 0xBFC01410 */ - uint32_t psx_brA_BFC013DC = cpu->gpr[20]; uint32_t psx_brB_BFC013DC = cpu->gpr[0]; - psx_taken_BFC013DC = (psx_brA_BFC013DC == psx_brB_BFC013DC); - psx_delay_BFC013DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013E0u); -#endif - /* 0xBFC013E0: 8FAF006C lw $t7, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC013E0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF006Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013E0u); -#endif - if (psx_delay_BFC013DC) { - psx_delay_BFC013DC = 0; - if (psx_taken_BFC013DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01410u); - goto label_BFC01410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC013E4u); - } -label_BFC013E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC013E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC013E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC013E4: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC013ECu; /* jal link before delay slot */ - psx_delay_BFC013E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC013E8: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013E8u); -#endif - if (psx_delay_BFC013E4) { - psx_delay_BFC013E4 = 0; - cpu->gpr[31] = 0xBFC013ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC013EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC013ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC013ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC013EC: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC013F0: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC013F4: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC013F8: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC013FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC013FC: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC013FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01400: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01404: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01408: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0140Cu); -#endif - /* 0xBFC0140C: 8FAF006C lw $t7, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0140Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF006Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0140Cu); -#endif -label_BFC01410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC01414: 11E00016 beq $t7, $zero, 0xBFC01470 */ - uint32_t psx_brA_BFC01414 = cpu->gpr[15]; uint32_t psx_brB_BFC01414 = cpu->gpr[0]; - psx_taken_BFC01414 = (psx_brA_BFC01414 == psx_brB_BFC01414); - psx_delay_BFC01414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01418u); -#endif - /* 0xBFC01418: 8FB90068 lw $t9, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01418u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90068u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01418u); -#endif - if (psx_delay_BFC01414) { - psx_delay_BFC01414 = 0; - if (psx_taken_BFC01414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01470u); - goto label_BFC01470; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0141Cu); - } -label_BFC0141C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0141Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0141C: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC01424u; /* jal link before delay slot */ - psx_delay_BFC0141C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01420: 24040030 addiu $a0, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24040030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01420u); -#endif - if (psx_delay_BFC0141C) { - psx_delay_BFC0141C = 0; - cpu->gpr[31] = 0xBFC01424u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC01424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01424: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01428u); -#endif - /* 0xBFC01428: 82440000 lb $a0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 4, 0x40000u); - PGXP_LOAD(0x82440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0142C: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC01430: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC01434: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01438: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0143Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0143C: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0143Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01440: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01444: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC0144Cu; /* jal link before delay slot */ - psx_delay_BFC01444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01448: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01448u); -#endif - if (psx_delay_BFC01444) { - psx_delay_BFC01444 = 0; - cpu->gpr[31] = 0xBFC0144Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC0144C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0144Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0144C: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC01450: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC01454: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01458: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0145Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0145C: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0145Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01460: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01464: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01468: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0146Cu); -#endif - /* 0xBFC0146C: 8FB90068 lw $t9, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0146Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90068u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0146Cu); -#endif -label_BFC01470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01470: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC01474: 17210014 bne $t9, $at, 0xBFC014C8 */ - uint32_t psx_brA_BFC01474 = cpu->gpr[25]; uint32_t psx_brB_BFC01474 = cpu->gpr[1]; - psx_taken_BFC01474 = (psx_brA_BFC01474 != psx_brB_BFC01474); - psx_delay_BFC01474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01478u); -#endif - /* 0xBFC01478: 8FB80200 lw $t8, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01478u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80200u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01478u); -#endif - if (psx_delay_BFC01474) { - psx_delay_BFC01474 = 0; - if (psx_taken_BFC01474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC014C8u); - goto label_BFC014C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0147Cu); - } -label_BFC0147C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0147Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0147Cu); -#endif - /* 0xBFC0147C: 8FA201F0 lw $v0, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0147Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA201F0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01480: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200006u); -#endif - /* 0xBFC01484: 0055082A slt $at, $v0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0055082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01488: 1020000E beq $at, $zero, 0xBFC014C4 */ - uint32_t psx_brA_BFC01488 = cpu->gpr[1]; uint32_t psx_brB_BFC01488 = cpu->gpr[0]; - psx_taken_BFC01488 = (psx_brA_BFC01488 == psx_brB_BFC01488); - psx_delay_BFC01488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0148C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0148Cu); -#endif - if (psx_delay_BFC01488) { - psx_delay_BFC01488 = 0; - if (psx_taken_BFC01488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC014C4u); - goto label_BFC014C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01490u); - } -label_BFC01490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01490: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC01498u; /* jal link before delay slot */ - psx_delay_BFC01490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01494: 24040030 addiu $a0, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24040030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01494u); -#endif - if (psx_delay_BFC01490) { - psx_delay_BFC01490 = 0; - cpu->gpr[31] = 0xBFC01498u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC01498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC01498: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210002u); -#endif - /* 0xBFC0149C: 0215082A slt $at, $s0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC014A0: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC014A4: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC014A8: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC014AC: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC014B0: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC014B4: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC014B8: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC014BC: 1420FFF4 bne $at, $zero, 0xBFC01490 */ - uint32_t psx_brA_BFC014BC = cpu->gpr[1]; uint32_t psx_brB_BFC014BC = cpu->gpr[0]; - psx_taken_BFC014BC = (psx_brA_BFC014BC != psx_brB_BFC014BC); - psx_delay_BFC014BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC014C0: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014C0u); -#endif - if (psx_delay_BFC014BC) { - psx_delay_BFC014BC = 0; - if (psx_taken_BFC014BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01490u); - goto label_BFC01490; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC014C4u); - } -label_BFC014C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC014C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC014C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014C4u); -#endif - /* 0xBFC014C4: 8FB80200 lw $t8, 512($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC014C4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80200u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014C4u); -#endif -label_BFC014C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC014C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC014C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014C8u); -#endif - /* 0xBFC014C8: 8FAE0204 lw $t6, 516($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC014C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0204u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010001u); -#endif - /* 0xBFC014CC: 03008021 addu $s0, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004002u); -#endif - /* 0xBFC014D0: 030E082A slt $at, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x030E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC014D4: 10200010 beq $at, $zero, 0xBFC01518 */ - uint32_t psx_brA_BFC014D4 = cpu->gpr[1]; uint32_t psx_brB_BFC014D4 = cpu->gpr[0]; - psx_taken_BFC014D4 = (psx_brA_BFC014D4 == psx_brB_BFC014D4); - psx_delay_BFC014D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014D8u); -#endif - /* 0xBFC014D8: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC014D8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014D8u); -#endif - if (psx_delay_BFC014D4) { - psx_delay_BFC014D4 = 0; - if (psx_taken_BFC014D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01518u); - goto label_BFC01518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC014DCu); - } -label_BFC014DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC014DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC014DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC014DC: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC014E4u; /* jal link before delay slot */ - psx_delay_BFC014DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC014E0: 24040030 addiu $a0, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24040030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014E0u); -#endif - if (psx_delay_BFC014DC) { - psx_delay_BFC014DC = 0; - cpu->gpr[31] = 0xBFC014E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC014E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC014E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC014E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014E4u); -#endif - /* 0xBFC014E4: 8FAF0204 lw $t7, 516($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC014E4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0204u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC014E8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18002u); -#endif - /* 0xBFC014EC: 020F082A slt $at, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC014F0: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC014F4: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC014F8: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC014FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC014FC: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC014FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC01500: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01504: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01508: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0150C: 1420FFF3 bne $at, $zero, 0xBFC014DC */ - uint32_t psx_brA_BFC0150C = cpu->gpr[1]; uint32_t psx_brB_BFC0150C = cpu->gpr[0]; - psx_taken_BFC0150C = (psx_brA_BFC0150C != psx_brB_BFC0150C); - psx_delay_BFC0150C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01510: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01510u); -#endif - if (psx_delay_BFC0150C) { - psx_delay_BFC0150C = 0; - if (psx_taken_BFC0150C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC014DCu); - goto label_BFC014DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01514u); - } -label_BFC01514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01514u); -#endif - /* 0xBFC01514: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01514u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01514u); -#endif -label_BFC01518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC01518: 26F0FFFF addiu $s0, $s7, -1 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[23] + (-1)); - PGXP_ALU(0x26F0FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0151Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0151C: 1B20000E blez $t9, 0xBFC01558 */ - uint32_t psx_brA_BFC0151C = cpu->gpr[25]; - psx_taken_BFC0151C = ((int32_t)psx_brA_BFC0151C <= 0); - psx_delay_BFC0151C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01520: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01520u); -#endif - if (psx_delay_BFC0151C) { - psx_delay_BFC0151C = 0; - if (psx_taken_BFC0151C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01558u); - goto label_BFC01558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01524u); - } -label_BFC01524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01524u); -#endif - /* 0xBFC01524: 82C40000 lb $a0, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (0)), 4, 0x400000u); - PGXP_LOAD(0x82C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01528: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC01530u; /* jal link before delay slot */ - psx_delay_BFC01528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC0152C: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0152Cu); -#endif - if (psx_delay_BFC01528) { - psx_delay_BFC01528 = 0; - cpu->gpr[31] = 0xBFC01530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC01530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC01530: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC01534: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC01538: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0153C: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01540: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC01544: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01548: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0154C: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC01550: 0601FFF4 bgez $s0, 0xBFC01524 */ - uint32_t psx_brA_BFC01550 = cpu->gpr[16]; - psx_taken_BFC01550 = ((int32_t)psx_brA_BFC01550 >= 0); - psx_delay_BFC01550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01554: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01554u); -#endif - if (psx_delay_BFC01550) { - psx_delay_BFC01550 = 0; - if (psx_taken_BFC01550) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01524u); - goto label_BFC01524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01558u); - } -label_BFC01558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC01558: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0155C: 0600000E bltz $s0, 0xBFC01598 */ - uint32_t psx_brA_BFC0155C = cpu->gpr[16]; - psx_taken_BFC0155C = ((int32_t)psx_brA_BFC0155C < 0); - psx_delay_BFC0155C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC01560: 32380010 andi $t8, $s1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x10u; - PGXP_ALU(0x32380010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01560u); -#endif - if (psx_delay_BFC0155C) { - psx_delay_BFC0155C = 0; - if (psx_taken_BFC0155C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01598u); - goto label_BFC01598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01564u); - } -label_BFC01564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01564: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC0156Cu; /* jal link before delay slot */ - psx_delay_BFC01564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01568: 24040030 addiu $a0, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24040030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01568u); -#endif - if (psx_delay_BFC01564) { - psx_delay_BFC01564 = 0; - cpu->gpr[31] = 0xBFC0156Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC0156C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0156Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0156Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0156Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0156C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0156Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC01570: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC01574: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC01578: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0157Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0157C: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0157Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC01580: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC01584: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC01588: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0158C: 0601FFF5 bgez $s0, 0xBFC01564 */ - uint32_t psx_brA_BFC0158C = cpu->gpr[16]; - psx_taken_BFC0158C = ((int32_t)psx_brA_BFC0158C >= 0); - psx_delay_BFC0158C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01590: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01590u); -#endif - if (psx_delay_BFC0158C) { - psx_delay_BFC0158C = 0; - if (psx_taken_BFC0158C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01564u); - goto label_BFC01564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01594u); - } -label_BFC01594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC01594: 32380010 andi $t8, $s1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] & 0x10u; - PGXP_ALU(0x32380010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01594u); -#endif -label_BFC01598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC01598: 13000014 beq $t8, $zero, 0xBFC015EC */ - uint32_t psx_brA_BFC01598 = cpu->gpr[24]; uint32_t psx_brB_BFC01598 = cpu->gpr[0]; - psx_taken_BFC01598 = (psx_brA_BFC01598 == psx_brB_BFC01598); - psx_delay_BFC01598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0159Cu); -#endif - /* 0xBFC0159C: 8FAF01F0 lw $t7, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0159Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF01F0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0159Cu); -#endif - if (psx_delay_BFC01598) { - psx_delay_BFC01598 = 0; - if (psx_taken_BFC01598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015ECu); - goto label_BFC015EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015A0u); - } -label_BFC015A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015A0u); -#endif - /* 0xBFC015A0: 8FAE01F0 lw $t6, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015A0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE01F0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC015A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC015A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204002u); -#endif - /* 0xBFC015A8: 01D5082A slt $at, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x01D5082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC015AC: 1020000E beq $at, $zero, 0xBFC015E8 */ - uint32_t psx_brA_BFC015AC = cpu->gpr[1]; uint32_t psx_brB_BFC015AC = cpu->gpr[0]; - psx_taken_BFC015AC = (psx_brA_BFC015AC == psx_brB_BFC015AC); - psx_delay_BFC015AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14001u); -#endif - /* 0xBFC015B0: 01C08021 addu $s0, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015B0u); -#endif - if (psx_delay_BFC015AC) { - psx_delay_BFC015AC = 0; - if (psx_taken_BFC015AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015E8u); - goto label_BFC015E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015B4u); - } -label_BFC015B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC015B4: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC015BCu; /* jal link before delay slot */ - psx_delay_BFC015B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC015B8: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015B8u); -#endif - if (psx_delay_BFC015B4) { - psx_delay_BFC015B4 = 0; - cpu->gpr[31] = 0xBFC015BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC015BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC015BC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210002u); -#endif - /* 0xBFC015C0: 0215082A slt $at, $s0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0215082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC015C4: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC015C8: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC015CC: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC015D0: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC015D4: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC015D8: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC015DC: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC015E0: 1420FFF4 bne $at, $zero, 0xBFC015B4 */ - uint32_t psx_brA_BFC015E0 = cpu->gpr[1]; uint32_t psx_brB_BFC015E0 = cpu->gpr[0]; - psx_taken_BFC015E0 = (psx_brA_BFC015E0 != psx_brB_BFC015E0); - psx_delay_BFC015E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC015E4: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015E4u); -#endif - if (psx_delay_BFC015E0) { - psx_delay_BFC015E0 = 0; - if (psx_taken_BFC015E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015B4u); - goto label_BFC015B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015E8u); - } -label_BFC015E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015E8u); -#endif - /* 0xBFC015E8: 8FAF01F0 lw $t7, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015E8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF01F0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015E8u); -#endif -label_BFC015EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC015EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC015ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208002u); -#endif - /* 0xBFC015F0: 01F5082A slt $at, $t7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x01F5082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC015F4: 10200004 beq $at, $zero, 0xBFC01608 */ - uint32_t psx_brA_BFC015F4 = cpu->gpr[1]; uint32_t psx_brB_BFC015F4 = cpu->gpr[0]; - psx_taken_BFC015F4 = (psx_brA_BFC015F4 == psx_brB_BFC015F4); - psx_delay_BFC015F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015F8u); -#endif - /* 0xBFC015F8: 8FA201F0 lw $v0, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA201F0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC015F8u); -#endif - if (psx_delay_BFC015F4) { - psx_delay_BFC015F4 = 0; - if (psx_taken_BFC015F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01608u); - goto label_BFC01608; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC015FCu); - } -label_BFC015FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC015FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC015FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC015FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC015FC: 10000003 beq $zero, $zero, 0xBFC0160C */ - uint32_t psx_brA_BFC015FC = cpu->gpr[0]; uint32_t psx_brB_BFC015FC = cpu->gpr[0]; - psx_taken_BFC015FC = (psx_brA_BFC015FC == psx_brB_BFC015FC); - psx_delay_BFC015FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200005u); -#endif - /* 0xBFC01600: 02A01021 addu $v0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01600u); -#endif - if (psx_delay_BFC015FC) { - psx_delay_BFC015FC = 0; - if (psx_taken_BFC015FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0160Cu); - goto label_BFC0160C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01604u); - } -label_BFC01604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01604u); -#endif - /* 0xBFC01604: 8FA201F0 lw $v0, 496($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01604u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA201F0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01604u); -#endif -label_BFC01608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01608: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01608u); -#endif -label_BFC0160C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0160Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0160Cu); -#endif - /* 0xBFC0160C: 8FB90224 lw $t9, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0160Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90224u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC01614: 0322C021 addu $t8, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[25] + cpu->gpr[2]; - PGXP_ALU(0x0322C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01618: 100000AA beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC01618 = cpu->gpr[0]; uint32_t psx_brB_BFC01618 = cpu->gpr[0]; - psx_taken_BFC01618 = (psx_brA_BFC01618 == psx_brB_BFC01618); - psx_delay_BFC01618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0161Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC0161C: AFB80224 sw $t8, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0161Cu); return; } g_debug_last_store_pc = 0xBFC0161Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80224u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0161Cu); -#endif - if (psx_delay_BFC01618) { - psx_delay_BFC01618 = 0; - if (psx_taken_BFC01618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01620u); - } -label_BFC01620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01620u); -#endif - /* 0xBFC01620: 8FA20224 lw $v0, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01620u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20224u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01620u); -#endif -label_BFC01624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01624u); -#endif - /* 0xBFC01624: 8FB00060 lw $s0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01624u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00060u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01628u); -#endif - /* 0xBFC01628: 8FB1005C lw $s1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01628u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1005Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0162Cu); -#endif - /* 0xBFC0162C: 8FB20058 lw $s2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0162Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20058u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0162Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01630u); -#endif - /* 0xBFC01630: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01630u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01634u); -#endif - /* 0xBFC01634: 8FB50050 lw $s5, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01634u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50050u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01638u); -#endif - /* 0xBFC01638: 8FB6004C lw $s6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01638u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6004Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0163Cu); -#endif - /* 0xBFC0163C: 8FB70048 lw $s7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0163Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70048u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0163Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01640u); -#endif - /* 0xBFC01640: 8FBE0044 lw $fp, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01640u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0044u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01644: 100000A2 beq $zero, $zero, 0xBFC018D0 */ - uint32_t psx_brA_BFC01644 = cpu->gpr[0]; uint32_t psx_brB_BFC01644 = cpu->gpr[0]; - psx_taken_BFC01644 = (psx_brA_BFC01644 == psx_brB_BFC01644); - psx_delay_BFC01644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01648u); -#endif - /* 0xBFC01648: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01648u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01648u); -#endif - if (psx_delay_BFC01644) { - psx_delay_BFC01644 = 0; - if (psx_taken_BFC01644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018D0u); - goto label_BFC018D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0164Cu); - } -label_BFC0164C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0164Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0164C: 1048FE71 beq $v0, $t0, 0xBFC01014 */ - uint32_t psx_brA_BFC0164C = cpu->gpr[2]; uint32_t psx_brB_BFC0164C = cpu->gpr[8]; - psx_taken_BFC0164C = (psx_brA_BFC0164C == psx_brB_BFC0164C); - psx_delay_BFC0164C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01650: 2C410045 sltiu $at, $v0, 69 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000045u ? 1 : 0); - PGXP_ALU(0x2C410045u, cpu->gpr[1], _pgx1, 0x0045u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01650u); -#endif - if (psx_delay_BFC0164C) { - psx_delay_BFC0164C = 0; - if (psx_taken_BFC0164C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01014u); - goto label_BFC01014; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01654u); - } -label_BFC01654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01654: 10200058 beq $at, $zero, 0xBFC017B8 */ - uint32_t psx_brA_BFC01654 = cpu->gpr[1]; uint32_t psx_brB_BFC01654 = cpu->gpr[0]; - psx_taken_BFC01654 = (psx_brA_BFC01654 == psx_brB_BFC01654); - psx_delay_BFC01654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01658: 24010069 addiu $at, $zero, 105 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (105)); - PGXP_ALU(0x24010069u, cpu->gpr[1], _pgx1, 0x00000069u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01658u); -#endif - if (psx_delay_BFC01654) { - psx_delay_BFC01654 = 0; - if (psx_taken_BFC01654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017B8u); - goto label_BFC017B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0165Cu); - } -label_BFC0165C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0165Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0165Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0165Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC0165C: 1049FE4D beq $v0, $t1, 0xBFC00F94 */ - uint32_t psx_brA_BFC0165C = cpu->gpr[2]; uint32_t psx_brB_BFC0165C = cpu->gpr[9]; - psx_taken_BFC0165C = (psx_brA_BFC0165C == psx_brB_BFC0165C); - psx_delay_BFC0165C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01660: 2C410033 sltiu $at, $v0, 51 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000033u ? 1 : 0); - PGXP_ALU(0x2C410033u, cpu->gpr[1], _pgx1, 0x0033u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01660u); -#endif - if (psx_delay_BFC0165C) { - psx_delay_BFC0165C = 0; - if (psx_taken_BFC0165C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F94u); - goto label_BFC00F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01664u); - } -label_BFC01664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01664: 10200034 beq $at, $zero, 0xBFC01738 */ - uint32_t psx_brA_BFC01664 = cpu->gpr[1]; uint32_t psx_brB_BFC01664 = cpu->gpr[0]; - psx_taken_BFC01664 = (psx_brA_BFC01664 == psx_brB_BFC01664); - psx_delay_BFC01664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01668: 24010036 addiu $at, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24010036u, cpu->gpr[1], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01668u); -#endif - if (psx_delay_BFC01664) { - psx_delay_BFC01664 = 0; - if (psx_taken_BFC01664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01738u); - goto label_BFC01738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0166Cu); - } -label_BFC0166C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0166Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0166Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0166Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC0166C: 104AFE1D beq $v0, $t2, 0xBFC00EE4 */ - uint32_t psx_brA_BFC0166C = cpu->gpr[2]; uint32_t psx_brB_BFC0166C = cpu->gpr[10]; - psx_taken_BFC0166C = (psx_brA_BFC0166C == psx_brB_BFC0166C); - psx_delay_BFC0166C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01670: 2C41002E sltiu $at, $v0, 46 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Eu ? 1 : 0); - PGXP_ALU(0x2C41002Eu, cpu->gpr[1], _pgx1, 0x002Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01670u); -#endif - if (psx_delay_BFC0166C) { - psx_delay_BFC0166C = 0; - if (psx_taken_BFC0166C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EE4u); - goto label_BFC00EE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01674u); - } -label_BFC01674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01674: 10200022 beq $at, $zero, 0xBFC01700 */ - uint32_t psx_brA_BFC01674 = cpu->gpr[1]; uint32_t psx_brB_BFC01674 = cpu->gpr[0]; - psx_taken_BFC01674 = (psx_brA_BFC01674 == psx_brB_BFC01674); - psx_delay_BFC01674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01678: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01678u); -#endif - if (psx_delay_BFC01674) { - psx_delay_BFC01674 = 0; - if (psx_taken_BFC01674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01700u); - goto label_BFC01700; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0167Cu); - } -label_BFC0167C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0167Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC0167C: 1047FE14 beq $v0, $a3, 0xBFC00ED0 */ - uint32_t psx_brA_BFC0167C = cpu->gpr[2]; uint32_t psx_brB_BFC0167C = cpu->gpr[7]; - psx_taken_BFC0167C = (psx_brA_BFC0167C == psx_brB_BFC0167C); - psx_delay_BFC0167C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01680: 2C41002B sltiu $at, $v0, 43 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000002Bu ? 1 : 0); - PGXP_ALU(0x2C41002Bu, cpu->gpr[1], _pgx1, 0x002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01680u); -#endif - if (psx_delay_BFC0167C) { - psx_delay_BFC0167C = 0; - if (psx_taken_BFC0167C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00ED0u); - goto label_BFC00ED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01684u); - } -label_BFC01684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01684: 1020001A beq $at, $zero, 0xBFC016F0 */ - uint32_t psx_brA_BFC01684 = cpu->gpr[1]; uint32_t psx_brB_BFC01684 = cpu->gpr[0]; - psx_taken_BFC01684 = (psx_brA_BFC01684 == psx_brB_BFC01684); - psx_delay_BFC01684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01688u); -#endif - if (psx_delay_BFC01684) { - psx_delay_BFC01684 = 0; - if (psx_taken_BFC01684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016F0u); - goto label_BFC016F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0168Cu); - } -label_BFC0168C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0168Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC0168C: 104BFE0A beq $v0, $t3, 0xBFC00EB8 */ - uint32_t psx_brA_BFC0168C = cpu->gpr[2]; uint32_t psx_brB_BFC0168C = cpu->gpr[11]; - psx_taken_BFC0168C = (psx_brA_BFC0168C == psx_brB_BFC0168C); - psx_delay_BFC0168C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01690: 2C410021 sltiu $at, $v0, 33 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0); - PGXP_ALU(0x2C410021u, cpu->gpr[1], _pgx1, 0x0021u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01690u); -#endif - if (psx_delay_BFC0168C) { - psx_delay_BFC0168C = 0; - if (psx_taken_BFC0168C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EB8u); - goto label_BFC00EB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01694u); - } -label_BFC01694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01694: 10200005 beq $at, $zero, 0xBFC016AC */ - uint32_t psx_brA_BFC01694 = cpu->gpr[1]; uint32_t psx_brB_BFC01694 = cpu->gpr[0]; - psx_taken_BFC01694 = (psx_brA_BFC01694 == psx_brB_BFC01694); - psx_delay_BFC01694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01698u); -#endif - if (psx_delay_BFC01694) { - psx_delay_BFC01694 = 0; - if (psx_taken_BFC01694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016ACu); - goto label_BFC016AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0169Cu); - } -label_BFC0169C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0169Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0169C: 1040FFE1 beq $v0, $zero, 0xBFC01624 */ - uint32_t psx_brA_BFC0169C = cpu->gpr[2]; uint32_t psx_brB_BFC0169C = cpu->gpr[0]; - psx_taken_BFC0169C = (psx_brA_BFC0169C == psx_brB_BFC0169C); - psx_delay_BFC0169C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016A0u); -#endif - /* 0xBFC016A0: 8FA20224 lw $v0, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC016A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20224u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016A0u); -#endif - if (psx_delay_BFC0169C) { - psx_delay_BFC0169C = 0; - if (psx_taken_BFC0169C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01624u); - goto label_BFC01624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016A4u); - } -label_BFC016A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC016A4: 10000004 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC016A4 = cpu->gpr[0]; uint32_t psx_brB_BFC016A4 = cpu->gpr[0]; - psx_taken_BFC016A4 = (psx_brA_BFC016A4 == psx_brB_BFC016A4); - psx_delay_BFC016A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC016A8: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016A8u); -#endif - if (psx_delay_BFC016A4) { - psx_delay_BFC016A4 = 0; - if (psx_taken_BFC016A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016ACu); - } -label_BFC016AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC016AC: 104CFE06 beq $v0, $t4, 0xBFC00EC8 */ - uint32_t psx_brA_BFC016AC = cpu->gpr[2]; uint32_t psx_brB_BFC016AC = cpu->gpr[12]; - psx_taken_BFC016AC = (psx_brA_BFC016AC == psx_brB_BFC016AC); - psx_delay_BFC016AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC016B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC016B0u); -#endif - if (psx_delay_BFC016AC) { - psx_delay_BFC016AC = 0; - if (psx_taken_BFC016AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EC8u); - goto label_BFC00EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B4u); - } -label_BFC016B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC016B4: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016B4u); -#endif -label_BFC016B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC016B8: 0FF03620 jal 0xBFC0D880 */ - cpu->gpr[31] = 0xBFC016C0u; /* jal link before delay slot */ - psx_delay_BFC016B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC016BC: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016BCu); -#endif - if (psx_delay_BFC016B8) { - psx_delay_BFC016B8 = 0; - cpu->gpr[31] = 0xBFC016C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D880u); - cpu->pc = 0xBFC0D880u; return; - } -label_BFC016C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016C0u); -#endif - /* 0xBFC016C0: 8FAE0224 lw $t6, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC016C0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0224u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC016C4: 2407002A addiu $a3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2407002Au, cpu->gpr[7], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC016C8: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC016CC: 24080044 addiu $t0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24080044u, cpu->gpr[8], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC016D0: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC016D4: 240A002D addiu $t2, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240A002Du, cpu->gpr[10], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC016D8: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC016DC: 240C0023 addiu $t4, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240C0023u, cpu->gpr[12], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC016E0: 240D002B addiu $t5, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x240D002Bu, cpu->gpr[13], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC016E4: 241F0030 addiu $ra, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x241F0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC016E8: 10000076 beq $zero, $zero, 0xBFC018C4 */ - uint32_t psx_brA_BFC016E8 = cpu->gpr[0]; uint32_t psx_brB_BFC016E8 = cpu->gpr[0]; - psx_taken_BFC016E8 = (psx_brA_BFC016E8 == psx_brB_BFC016E8); - psx_delay_BFC016E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC016EC: AFAF0224 sw $t7, 548($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC016ECu); return; } g_debug_last_store_pc = 0xBFC016ECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0224u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016ECu); -#endif - if (psx_delay_BFC016E8) { - psx_delay_BFC016E8 = 0; - if (psx_taken_BFC016E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - goto label_BFC018C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016F0u); - } -label_BFC016F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC016F0: 104DFDFE beq $v0, $t5, 0xBFC00EEC */ - uint32_t psx_brA_BFC016F0 = cpu->gpr[2]; uint32_t psx_brB_BFC016F0 = cpu->gpr[13]; - psx_taken_BFC016F0 = (psx_brA_BFC016F0 == psx_brB_BFC016F0); - psx_delay_BFC016F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC016F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC016F4u); -#endif - if (psx_delay_BFC016F0) { - psx_delay_BFC016F0 = 0; - if (psx_taken_BFC016F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EECu); - goto label_BFC00EEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016F8u); - } -label_BFC016F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC016F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC016F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC016F8: 1000FFEF beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC016F8 = cpu->gpr[0]; uint32_t psx_brB_BFC016F8 = cpu->gpr[0]; - psx_taken_BFC016F8 = (psx_brA_BFC016F8 == psx_brB_BFC016F8); - psx_delay_BFC016F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC016FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC016FC: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC016FCu); -#endif - if (psx_delay_BFC016F8) { - psx_delay_BFC016F8 = 0; - if (psx_taken_BFC016F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01700u); - } -label_BFC01700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC01700: 105FFE22 beq $v0, $ra, 0xBFC00F8C */ - uint32_t psx_brA_BFC01700 = cpu->gpr[2]; uint32_t psx_brB_BFC01700 = cpu->gpr[31]; - psx_taken_BFC01700 = (psx_brA_BFC01700 == psx_brB_BFC01700); - psx_delay_BFC01700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01704: 2C410031 sltiu $at, $v0, 49 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000031u ? 1 : 0); - PGXP_ALU(0x2C410031u, cpu->gpr[1], _pgx1, 0x0031u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01704u); -#endif - if (psx_delay_BFC01700) { - psx_delay_BFC01700 = 0; - if (psx_taken_BFC01700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F8Cu); - goto label_BFC00F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01708u); - } -label_BFC01708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01708: 10200005 beq $at, $zero, 0xBFC01720 */ - uint32_t psx_brA_BFC01708 = cpu->gpr[1]; uint32_t psx_brB_BFC01708 = cpu->gpr[0]; - psx_taken_BFC01708 = (psx_brA_BFC01708 == psx_brB_BFC01708); - psx_delay_BFC01708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0170Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0170C: 2401002E addiu $at, $zero, 46 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (46)); - PGXP_ALU(0x2401002Eu, cpu->gpr[1], _pgx1, 0x0000002Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0170Cu); -#endif - if (psx_delay_BFC01708) { - psx_delay_BFC01708 = 0; - if (psx_taken_BFC01708) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01720u); - goto label_BFC01720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01710u); - } -label_BFC01710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01710: 1041FDF8 beq $v0, $at, 0xBFC00EF4 */ - uint32_t psx_brA_BFC01710 = cpu->gpr[2]; uint32_t psx_brB_BFC01710 = cpu->gpr[1]; - psx_taken_BFC01710 = (psx_brA_BFC01710 == psx_brB_BFC01710); - psx_delay_BFC01710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01714u); -#endif - if (psx_delay_BFC01710) { - psx_delay_BFC01710 = 0; - if (psx_taken_BFC01710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00EF4u); - goto label_BFC00EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01718u); - } -label_BFC01718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01718: 1000FFE7 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01718 = cpu->gpr[0]; uint32_t psx_brB_BFC01718 = cpu->gpr[0]; - psx_taken_BFC01718 = (psx_brA_BFC01718 == psx_brB_BFC01718); - psx_delay_BFC01718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0171C: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0171Cu); -#endif - if (psx_delay_BFC01718) { - psx_delay_BFC01718 = 0; - if (psx_taken_BFC01718) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01720u); - } -label_BFC01720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01720: 24010031 addiu $at, $zero, 49 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (49)); - PGXP_ALU(0x24010031u, cpu->gpr[1], _pgx1, 0x00000031u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01724: 1041FE1C beq $v0, $at, 0xBFC00F98 */ - uint32_t psx_brA_BFC01724 = cpu->gpr[2]; uint32_t psx_brB_BFC01724 = cpu->gpr[1]; - psx_taken_BFC01724 = (psx_brA_BFC01724 == psx_brB_BFC01724); - psx_delay_BFC01724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC01728: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01728u); -#endif - if (psx_delay_BFC01724) { - psx_delay_BFC01724 = 0; - if (psx_taken_BFC01724) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F98u); - goto label_BFC00F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0172Cu); - } -label_BFC0172C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0172Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0172C: 1000FFE2 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC0172C = cpu->gpr[0]; uint32_t psx_brB_BFC0172C = cpu->gpr[0]; - psx_taken_BFC0172C = (psx_brA_BFC0172C == psx_brB_BFC0172C); - psx_delay_BFC0172C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01730: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01730u); -#endif - if (psx_delay_BFC0172C) { - psx_delay_BFC0172C = 0; - if (psx_taken_BFC0172C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01734u); - } -label_BFC01734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01734: 24010036 addiu $at, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24010036u, cpu->gpr[1], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01734u); -#endif -label_BFC01738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01738: 1041FE16 beq $v0, $at, 0xBFC00F94 */ - uint32_t psx_brA_BFC01738 = cpu->gpr[2]; uint32_t psx_brB_BFC01738 = cpu->gpr[1]; - psx_taken_BFC01738 = (psx_brA_BFC01738 == psx_brB_BFC01738); - psx_delay_BFC01738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0173Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0173C: 2C410037 sltiu $at, $v0, 55 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000037u ? 1 : 0); - PGXP_ALU(0x2C410037u, cpu->gpr[1], _pgx1, 0x0037u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0173Cu); -#endif - if (psx_delay_BFC01738) { - psx_delay_BFC01738 = 0; - if (psx_taken_BFC01738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F94u); - goto label_BFC00F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01740u); - } -label_BFC01740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01740: 1020000E beq $at, $zero, 0xBFC0177C */ - uint32_t psx_brA_BFC01740 = cpu->gpr[1]; uint32_t psx_brB_BFC01740 = cpu->gpr[0]; - psx_taken_BFC01740 = (psx_brA_BFC01740 == psx_brB_BFC01740); - psx_delay_BFC01740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01744: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01744u); -#endif - if (psx_delay_BFC01740) { - psx_delay_BFC01740 = 0; - if (psx_taken_BFC01740) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0177Cu); - goto label_BFC0177C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01748u); - } -label_BFC01748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01748: 1041FE12 beq $v0, $at, 0xBFC00F94 */ - uint32_t psx_brA_BFC01748 = cpu->gpr[2]; uint32_t psx_brB_BFC01748 = cpu->gpr[1]; - psx_taken_BFC01748 = (psx_brA_BFC01748 == psx_brB_BFC01748); - psx_delay_BFC01748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0174Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0174C: 2C410035 sltiu $at, $v0, 53 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000035u ? 1 : 0); - PGXP_ALU(0x2C410035u, cpu->gpr[1], _pgx1, 0x0035u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0174Cu); -#endif - if (psx_delay_BFC01748) { - psx_delay_BFC01748 = 0; - if (psx_taken_BFC01748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F94u); - goto label_BFC00F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01750u); - } -label_BFC01750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01750: 10200005 beq $at, $zero, 0xBFC01768 */ - uint32_t psx_brA_BFC01750 = cpu->gpr[1]; uint32_t psx_brB_BFC01750 = cpu->gpr[0]; - psx_taken_BFC01750 = (psx_brA_BFC01750 == psx_brB_BFC01750); - psx_delay_BFC01750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01754: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01754u); -#endif - if (psx_delay_BFC01750) { - psx_delay_BFC01750 = 0; - if (psx_taken_BFC01750) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01768u); - goto label_BFC01768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01758u); - } -label_BFC01758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01758: 1041FE0F beq $v0, $at, 0xBFC00F98 */ - uint32_t psx_brA_BFC01758 = cpu->gpr[2]; uint32_t psx_brB_BFC01758 = cpu->gpr[1]; - psx_taken_BFC01758 = (psx_brA_BFC01758 == psx_brB_BFC01758); - psx_delay_BFC01758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0175C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0175Cu); -#endif - if (psx_delay_BFC01758) { - psx_delay_BFC01758 = 0; - if (psx_taken_BFC01758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F98u); - goto label_BFC00F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01760u); - } -label_BFC01760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01760: 1000FFD5 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01760 = cpu->gpr[0]; uint32_t psx_brB_BFC01760 = cpu->gpr[0]; - psx_taken_BFC01760 = (psx_brA_BFC01760 == psx_brB_BFC01760); - psx_delay_BFC01760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01764: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01764u); -#endif - if (psx_delay_BFC01760) { - psx_delay_BFC01760 = 0; - if (psx_taken_BFC01760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01768u); - } -label_BFC01768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01768: 24010035 addiu $at, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x24010035u, cpu->gpr[1], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0176Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0176C: 1041FE0A beq $v0, $at, 0xBFC00F98 */ - uint32_t psx_brA_BFC0176C = cpu->gpr[2]; uint32_t psx_brB_BFC0176C = cpu->gpr[1]; - psx_taken_BFC0176C = (psx_brA_BFC0176C == psx_brB_BFC0176C); - psx_delay_BFC0176C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC01770: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01770u); -#endif - if (psx_delay_BFC0176C) { - psx_delay_BFC0176C = 0; - if (psx_taken_BFC0176C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F98u); - goto label_BFC00F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01774u); - } -label_BFC01774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01774: 1000FFD0 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01774 = cpu->gpr[0]; uint32_t psx_brB_BFC01774 = cpu->gpr[0]; - psx_taken_BFC01774 = (psx_brA_BFC01774 == psx_brB_BFC01774); - psx_delay_BFC01774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01778: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01778u); -#endif - if (psx_delay_BFC01774) { - psx_delay_BFC01774 = 0; - if (psx_taken_BFC01774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0177Cu); - } -label_BFC0177C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0177Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0177Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0177Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0177C: 24010038 addiu $at, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24010038u, cpu->gpr[1], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0177Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01780: 1041FE04 beq $v0, $at, 0xBFC00F94 */ - uint32_t psx_brA_BFC01780 = cpu->gpr[2]; uint32_t psx_brB_BFC01780 = cpu->gpr[1]; - psx_taken_BFC01780 = (psx_brA_BFC01780 == psx_brB_BFC01780); - psx_delay_BFC01780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01784: 2C410039 sltiu $at, $v0, 57 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000039u ? 1 : 0); - PGXP_ALU(0x2C410039u, cpu->gpr[1], _pgx1, 0x0039u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01784u); -#endif - if (psx_delay_BFC01780) { - psx_delay_BFC01780 = 0; - if (psx_taken_BFC01780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F94u); - goto label_BFC00F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01788u); - } -label_BFC01788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01788: 10200005 beq $at, $zero, 0xBFC017A0 */ - uint32_t psx_brA_BFC01788 = cpu->gpr[1]; uint32_t psx_brB_BFC01788 = cpu->gpr[0]; - psx_taken_BFC01788 = (psx_brA_BFC01788 == psx_brB_BFC01788); - psx_delay_BFC01788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0178Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0178C: 24010037 addiu $at, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24010037u, cpu->gpr[1], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0178Cu); -#endif - if (psx_delay_BFC01788) { - psx_delay_BFC01788 = 0; - if (psx_taken_BFC01788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017A0u); - goto label_BFC017A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01790u); - } -label_BFC01790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01790: 1041FE01 beq $v0, $at, 0xBFC00F98 */ - uint32_t psx_brA_BFC01790 = cpu->gpr[2]; uint32_t psx_brB_BFC01790 = cpu->gpr[1]; - psx_taken_BFC01790 = (psx_brA_BFC01790 == psx_brB_BFC01790); - psx_delay_BFC01790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC01794: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01794u); -#endif - if (psx_delay_BFC01790) { - psx_delay_BFC01790 = 0; - if (psx_taken_BFC01790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F98u); - goto label_BFC00F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01798u); - } -label_BFC01798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01798: 1000FFC7 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01798 = cpu->gpr[0]; uint32_t psx_brB_BFC01798 = cpu->gpr[0]; - psx_taken_BFC01798 = (psx_brA_BFC01798 == psx_brB_BFC01798); - psx_delay_BFC01798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0179Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0179C: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0179Cu); -#endif - if (psx_delay_BFC01798) { - psx_delay_BFC01798 = 0; - if (psx_taken_BFC01798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017A0u); - } -label_BFC017A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017A0: 24010039 addiu $at, $zero, 57 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (57)); - PGXP_ALU(0x24010039u, cpu->gpr[1], _pgx1, 0x00000039u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017A4: 1041FDFC beq $v0, $at, 0xBFC00F98 */ - uint32_t psx_brA_BFC017A4 = cpu->gpr[2]; uint32_t psx_brB_BFC017A4 = cpu->gpr[1]; - psx_taken_BFC017A4 = (psx_brA_BFC017A4 == psx_brB_BFC017A4); - psx_delay_BFC017A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC017A8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017A8u); -#endif - if (psx_delay_BFC017A4) { - psx_delay_BFC017A4 = 0; - if (psx_taken_BFC017A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00F98u); - goto label_BFC00F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017ACu); - } -label_BFC017AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC017AC: 1000FFC2 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC017AC = cpu->gpr[0]; uint32_t psx_brB_BFC017AC = cpu->gpr[0]; - psx_taken_BFC017AC = (psx_brA_BFC017AC == psx_brB_BFC017AC); - psx_delay_BFC017AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC017B0: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017B0u); -#endif - if (psx_delay_BFC017AC) { - psx_delay_BFC017AC = 0; - if (psx_taken_BFC017AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017B4u); - } -label_BFC017B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017B4: 24010069 addiu $at, $zero, 105 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (105)); - PGXP_ALU(0x24010069u, cpu->gpr[1], _pgx1, 0x00000069u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017B4u); -#endif -label_BFC017B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017B8: 1041FE17 beq $v0, $at, 0xBFC01018 */ - uint32_t psx_brA_BFC017B8 = cpu->gpr[2]; uint32_t psx_brB_BFC017B8 = cpu->gpr[1]; - psx_taken_BFC017B8 = (psx_brA_BFC017B8 == psx_brB_BFC017B8); - psx_delay_BFC017B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017BC: 2C41006A sltiu $at, $v0, 106 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Au ? 1 : 0); - PGXP_ALU(0x2C41006Au, cpu->gpr[1], _pgx1, 0x006Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017BCu); -#endif - if (psx_delay_BFC017B8) { - psx_delay_BFC017B8 = 0; - if (psx_taken_BFC017B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01018u); - goto label_BFC01018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017C0u); - } -label_BFC017C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017C0: 10200020 beq $at, $zero, 0xBFC01844 */ - uint32_t psx_brA_BFC017C0 = cpu->gpr[1]; uint32_t psx_brB_BFC017C0 = cpu->gpr[0]; - psx_taken_BFC017C0 = (psx_brA_BFC017C0 == psx_brB_BFC017C0); - psx_delay_BFC017C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017C4: 24010058 addiu $at, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24010058u, cpu->gpr[1], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017C4u); -#endif - if (psx_delay_BFC017C0) { - psx_delay_BFC017C0 = 0; - if (psx_taken_BFC017C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01844u); - goto label_BFC01844; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017C8u); - } -label_BFC017C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017C8: 1041FE93 beq $v0, $at, 0xBFC01218 */ - uint32_t psx_brA_BFC017C8 = cpu->gpr[2]; uint32_t psx_brB_BFC017C8 = cpu->gpr[1]; - psx_taken_BFC017C8 = (psx_brA_BFC017C8 == psx_brB_BFC017C8); - psx_delay_BFC017C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017CC: 2C410059 sltiu $at, $v0, 89 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0); - PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017CCu); -#endif - if (psx_delay_BFC017C8) { - psx_delay_BFC017C8 = 0; - if (psx_taken_BFC017C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01218u); - goto label_BFC01218; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017D0u); - } -label_BFC017D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017D0: 1020000E beq $at, $zero, 0xBFC0180C */ - uint32_t psx_brA_BFC017D0 = cpu->gpr[1]; uint32_t psx_brB_BFC017D0 = cpu->gpr[0]; - psx_taken_BFC017D0 = (psx_brA_BFC017D0 == psx_brB_BFC017D0); - psx_delay_BFC017D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017D4: 2401004F addiu $at, $zero, 79 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (79)); - PGXP_ALU(0x2401004Fu, cpu->gpr[1], _pgx1, 0x0000004Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017D4u); -#endif - if (psx_delay_BFC017D0) { - psx_delay_BFC017D0 = 0; - if (psx_taken_BFC017D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0180Cu); - goto label_BFC0180C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017D8u); - } -label_BFC017D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017D8: 1041FE39 beq $v0, $at, 0xBFC010C0 */ - uint32_t psx_brA_BFC017D8 = cpu->gpr[2]; uint32_t psx_brB_BFC017D8 = cpu->gpr[1]; - psx_taken_BFC017D8 = (psx_brA_BFC017D8 == psx_brB_BFC017D8); - psx_delay_BFC017D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017DC: 2C410050 sltiu $at, $v0, 80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000050u ? 1 : 0); - PGXP_ALU(0x2C410050u, cpu->gpr[1], _pgx1, 0x0050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017DCu); -#endif - if (psx_delay_BFC017D8) { - psx_delay_BFC017D8 = 0; - if (psx_taken_BFC017D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010C0u); - goto label_BFC010C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017E0u); - } -label_BFC017E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017E0: 10200005 beq $at, $zero, 0xBFC017F8 */ - uint32_t psx_brA_BFC017E0 = cpu->gpr[1]; uint32_t psx_brB_BFC017E0 = cpu->gpr[0]; - psx_taken_BFC017E0 = (psx_brA_BFC017E0 == psx_brB_BFC017E0); - psx_delay_BFC017E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017E4: 2401004C addiu $at, $zero, 76 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (76)); - PGXP_ALU(0x2401004Cu, cpu->gpr[1], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017E4u); -#endif - if (psx_delay_BFC017E0) { - psx_delay_BFC017E0 = 0; - if (psx_taken_BFC017E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017F8u); - goto label_BFC017F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017E8u); - } -label_BFC017E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017E8: 1041FDFD beq $v0, $at, 0xBFC00FE0 */ - uint32_t psx_brA_BFC017E8 = cpu->gpr[2]; uint32_t psx_brB_BFC017E8 = cpu->gpr[1]; - psx_taken_BFC017E8 = (psx_brA_BFC017E8 == psx_brB_BFC017E8); - psx_delay_BFC017E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC017EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC017ECu); -#endif - if (psx_delay_BFC017E8) { - psx_delay_BFC017E8 = 0; - if (psx_taken_BFC017E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FE0u); - goto label_BFC00FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017F0u); - } -label_BFC017F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC017F0: 1000FFB1 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC017F0 = cpu->gpr[0]; uint32_t psx_brB_BFC017F0 = cpu->gpr[0]; - psx_taken_BFC017F0 = (psx_brA_BFC017F0 == psx_brB_BFC017F0); - psx_delay_BFC017F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC017F4: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017F4u); -#endif - if (psx_delay_BFC017F0) { - psx_delay_BFC017F0 = 0; - if (psx_taken_BFC017F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC017F8u); - } -label_BFC017F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC017F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC017F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC017F8: 24010055 addiu $at, $zero, 85 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (85)); - PGXP_ALU(0x24010055u, cpu->gpr[1], _pgx1, 0x00000055u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC017F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC017FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC017FC: 1041FE74 beq $v0, $at, 0xBFC011D0 */ - uint32_t psx_brA_BFC017FC = cpu->gpr[2]; uint32_t psx_brB_BFC017FC = cpu->gpr[1]; - psx_taken_BFC017FC = (psx_brA_BFC017FC == psx_brB_BFC017FC); - psx_delay_BFC017FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01800: 36310001 ori $s1, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36310001u, cpu->gpr[17], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01800u); -#endif - if (psx_delay_BFC017FC) { - psx_delay_BFC017FC = 0; - if (psx_taken_BFC017FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011D0u); - goto label_BFC011D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01804u); - } -label_BFC01804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01804: 1000FFAC beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01804 = cpu->gpr[0]; uint32_t psx_brB_BFC01804 = cpu->gpr[0]; - psx_taken_BFC01804 = (psx_brA_BFC01804 == psx_brB_BFC01804); - psx_delay_BFC01804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01808: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01808u); -#endif - if (psx_delay_BFC01804) { - psx_delay_BFC01804 = 0; - if (psx_taken_BFC01804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0180Cu); - } -label_BFC0180C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0180Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0180C: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01810: 1041FE01 beq $v0, $at, 0xBFC01018 */ - uint32_t psx_brA_BFC01810 = cpu->gpr[2]; uint32_t psx_brB_BFC01810 = cpu->gpr[1]; - psx_taken_BFC01810 = (psx_brA_BFC01810 == psx_brB_BFC01810); - psx_delay_BFC01810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01814: 2C410065 sltiu $at, $v0, 101 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000065u ? 1 : 0); - PGXP_ALU(0x2C410065u, cpu->gpr[1], _pgx1, 0x0065u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01814u); -#endif - if (psx_delay_BFC01810) { - psx_delay_BFC01810 = 0; - if (psx_taken_BFC01810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01018u); - goto label_BFC01018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01818u); - } -label_BFC01818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01818: 10200005 beq $at, $zero, 0xBFC01830 */ - uint32_t psx_brA_BFC01818 = cpu->gpr[1]; uint32_t psx_brB_BFC01818 = cpu->gpr[0]; - psx_taken_BFC01818 = (psx_brA_BFC01818 == psx_brB_BFC01818); - psx_delay_BFC01818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0181C: 24010063 addiu $at, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24010063u, cpu->gpr[1], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0181Cu); -#endif - if (psx_delay_BFC01818) { - psx_delay_BFC01818 = 0; - if (psx_taken_BFC01818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01830u); - goto label_BFC01830; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01820u); - } -label_BFC01820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01820: 1041FDF5 beq $v0, $at, 0xBFC00FF8 */ - uint32_t psx_brA_BFC01820 = cpu->gpr[2]; uint32_t psx_brB_BFC01820 = cpu->gpr[1]; - psx_taken_BFC01820 = (psx_brA_BFC01820 == psx_brB_BFC01820); - psx_delay_BFC01820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01824u); -#endif - if (psx_delay_BFC01820) { - psx_delay_BFC01820 = 0; - if (psx_taken_BFC01820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FF8u); - goto label_BFC00FF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01828u); - } -label_BFC01828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01828: 1000FFA3 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01828 = cpu->gpr[0]; uint32_t psx_brB_BFC01828 = cpu->gpr[0]; - psx_taken_BFC01828 = (psx_brA_BFC01828 == psx_brB_BFC01828); - psx_delay_BFC01828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0182Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0182C: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0182Cu); -#endif - if (psx_delay_BFC01828) { - psx_delay_BFC01828 = 0; - if (psx_taken_BFC01828) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01830u); - } -label_BFC01830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01830: 24010068 addiu $at, $zero, 104 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (104)); - PGXP_ALU(0x24010068u, cpu->gpr[1], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01834: 1041FDEC beq $v0, $at, 0xBFC00FE8 */ - uint32_t psx_brA_BFC01834 = cpu->gpr[2]; uint32_t psx_brB_BFC01834 = cpu->gpr[1]; - psx_taken_BFC01834 = (psx_brA_BFC01834 == psx_brB_BFC01834); - psx_delay_BFC01834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01838u); -#endif - if (psx_delay_BFC01834) { - psx_delay_BFC01834 = 0; - if (psx_taken_BFC01834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FE8u); - goto label_BFC00FE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0183Cu); - } -label_BFC0183C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0183Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0183C: 1000FF9E beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC0183C = cpu->gpr[0]; uint32_t psx_brB_BFC0183C = cpu->gpr[0]; - psx_taken_BFC0183C = (psx_brA_BFC0183C == psx_brB_BFC0183C); - psx_delay_BFC0183C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01840: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01840u); -#endif - if (psx_delay_BFC0183C) { - psx_delay_BFC0183C = 0; - if (psx_taken_BFC0183C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01844u); - } -label_BFC01844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01844: 24010070 addiu $at, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24010070u, cpu->gpr[1], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01848: 1041FE30 beq $v0, $at, 0xBFC0110C */ - uint32_t psx_brA_BFC01848 = cpu->gpr[2]; uint32_t psx_brB_BFC01848 = cpu->gpr[1]; - psx_taken_BFC01848 = (psx_brA_BFC01848 == psx_brB_BFC01848); - psx_delay_BFC01848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0184Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0184C: 2C410071 sltiu $at, $v0, 113 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000071u ? 1 : 0); - PGXP_ALU(0x2C410071u, cpu->gpr[1], _pgx1, 0x0071u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0184Cu); -#endif - if (psx_delay_BFC01848) { - psx_delay_BFC01848 = 0; - if (psx_taken_BFC01848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0110Cu); - goto label_BFC0110C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01850u); - } -label_BFC01850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01850: 1020000E beq $at, $zero, 0xBFC0188C */ - uint32_t psx_brA_BFC01850 = cpu->gpr[1]; uint32_t psx_brB_BFC01850 = cpu->gpr[0]; - psx_taken_BFC01850 = (psx_brA_BFC01850 == psx_brB_BFC01850); - psx_delay_BFC01850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01854: 2401006E addiu $at, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2401006Eu, cpu->gpr[1], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01854u); -#endif - if (psx_delay_BFC01850) { - psx_delay_BFC01850 = 0; - if (psx_taken_BFC01850) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0188Cu); - goto label_BFC0188C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01858u); - } -label_BFC01858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01858: 1041FE04 beq $v0, $at, 0xBFC0106C */ - uint32_t psx_brA_BFC01858 = cpu->gpr[2]; uint32_t psx_brB_BFC01858 = cpu->gpr[1]; - psx_taken_BFC01858 = (psx_brA_BFC01858 == psx_brB_BFC01858); - psx_delay_BFC01858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0185Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0185C: 2C41006F sltiu $at, $v0, 111 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000006Fu ? 1 : 0); - PGXP_ALU(0x2C41006Fu, cpu->gpr[1], _pgx1, 0x006Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0185Cu); -#endif - if (psx_delay_BFC01858) { - psx_delay_BFC01858 = 0; - if (psx_taken_BFC01858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0106Cu); - goto label_BFC0106C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01860u); - } -label_BFC01860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01860: 10200005 beq $at, $zero, 0xBFC01878 */ - uint32_t psx_brA_BFC01860 = cpu->gpr[1]; uint32_t psx_brB_BFC01860 = cpu->gpr[0]; - psx_taken_BFC01860 = (psx_brA_BFC01860 == psx_brB_BFC01860); - psx_delay_BFC01860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01864: 2401006C addiu $at, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2401006Cu, cpu->gpr[1], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01864u); -#endif - if (psx_delay_BFC01860) { - psx_delay_BFC01860 = 0; - if (psx_taken_BFC01860) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01878u); - goto label_BFC01878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01868u); - } -label_BFC01868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01868: 1041FDE1 beq $v0, $at, 0xBFC00FF0 */ - uint32_t psx_brA_BFC01868 = cpu->gpr[2]; uint32_t psx_brB_BFC01868 = cpu->gpr[1]; - psx_taken_BFC01868 = (psx_brA_BFC01868 == psx_brB_BFC01868); - psx_delay_BFC01868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0186C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0186Cu); -#endif - if (psx_delay_BFC01868) { - psx_delay_BFC01868 = 0; - if (psx_taken_BFC01868) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00FF0u); - goto label_BFC00FF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01870u); - } -label_BFC01870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01870: 1000FF91 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01870 = cpu->gpr[0]; uint32_t psx_brB_BFC01870 = cpu->gpr[0]; - psx_taken_BFC01870 = (psx_brA_BFC01870 == psx_brB_BFC01870); - psx_delay_BFC01870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01874: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01874u); -#endif - if (psx_delay_BFC01870) { - psx_delay_BFC01870 = 0; - if (psx_taken_BFC01870) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01878u); - } -label_BFC01878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01878: 2401006F addiu $at, $zero, 111 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (111)); - PGXP_ALU(0x2401006Fu, cpu->gpr[1], _pgx1, 0x0000006Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0187Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0187C: 1041FE12 beq $v0, $at, 0xBFC010C8 */ - uint32_t psx_brA_BFC0187C = cpu->gpr[2]; uint32_t psx_brB_BFC0187C = cpu->gpr[1]; - psx_taken_BFC0187C = (psx_brA_BFC0187C == psx_brB_BFC0187C); - psx_delay_BFC0187C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC01880: 32390001 andi $t9, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x32390001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01880u); -#endif - if (psx_delay_BFC0187C) { - psx_delay_BFC0187C = 0; - if (psx_taken_BFC0187C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC010C8u); - goto label_BFC010C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01884u); - } -label_BFC01884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01884: 1000FF8C beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC01884 = cpu->gpr[0]; uint32_t psx_brB_BFC01884 = cpu->gpr[0]; - psx_taken_BFC01884 = (psx_brA_BFC01884 == psx_brB_BFC01884); - psx_delay_BFC01884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01888: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01888u); -#endif - if (psx_delay_BFC01884) { - psx_delay_BFC01884 = 0; - if (psx_taken_BFC01884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0188Cu); - } -label_BFC0188C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0188Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0188C: 24010075 addiu $at, $zero, 117 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (117)); - PGXP_ALU(0x24010075u, cpu->gpr[1], _pgx1, 0x00000075u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01890: 1041FE4F beq $v0, $at, 0xBFC011D0 */ - uint32_t psx_brA_BFC01890 = cpu->gpr[2]; uint32_t psx_brB_BFC01890 = cpu->gpr[1]; - psx_taken_BFC01890 = (psx_brA_BFC01890 == psx_brB_BFC01890); - psx_delay_BFC01890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01894: 2C410076 sltiu $at, $v0, 118 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000076u ? 1 : 0); - PGXP_ALU(0x2C410076u, cpu->gpr[1], _pgx1, 0x0076u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01894u); -#endif - if (psx_delay_BFC01890) { - psx_delay_BFC01890 = 0; - if (psx_taken_BFC01890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC011D0u); - goto label_BFC011D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01898u); - } -label_BFC01898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01898: 10200005 beq $at, $zero, 0xBFC018B0 */ - uint32_t psx_brA_BFC01898 = cpu->gpr[1]; uint32_t psx_brB_BFC01898 = cpu->gpr[0]; - psx_taken_BFC01898 = (psx_brA_BFC01898 == psx_brB_BFC01898); - psx_delay_BFC01898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0189C: 24010073 addiu $at, $zero, 115 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (115)); - PGXP_ALU(0x24010073u, cpu->gpr[1], _pgx1, 0x00000073u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0189Cu); -#endif - if (psx_delay_BFC01898) { - psx_delay_BFC01898 = 0; - if (psx_taken_BFC01898) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018B0u); - goto label_BFC018B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018A0u); - } -label_BFC018A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC018A0: 1041FE20 beq $v0, $at, 0xBFC01124 */ - uint32_t psx_brA_BFC018A0 = cpu->gpr[2]; uint32_t psx_brB_BFC018A0 = cpu->gpr[1]; - psx_taken_BFC018A0 = (psx_brA_BFC018A0 == psx_brB_BFC018A0); - psx_delay_BFC018A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC018A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC018A4u); -#endif - if (psx_delay_BFC018A0) { - psx_delay_BFC018A0 = 0; - if (psx_taken_BFC018A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01124u); - goto label_BFC01124; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018A8u); - } -label_BFC018A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC018A8: 1000FF83 beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC018A8 = cpu->gpr[0]; uint32_t psx_brB_BFC018A8 = cpu->gpr[0]; - psx_taken_BFC018A8 = (psx_brA_BFC018A8 == psx_brB_BFC018A8); - psx_delay_BFC018A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC018AC: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018ACu); -#endif - if (psx_delay_BFC018A8) { - psx_delay_BFC018A8 = 0; - if (psx_taken_BFC018A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018B0u); - } -label_BFC018B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC018B0: 24010078 addiu $at, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24010078u, cpu->gpr[1], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC018B4: 1041FE5C beq $v0, $at, 0xBFC01228 */ - uint32_t psx_brA_BFC018B4 = cpu->gpr[2]; uint32_t psx_brB_BFC018B4 = cpu->gpr[1]; - psx_taken_BFC018B4 = (psx_brA_BFC018B4 == psx_brB_BFC018B4); - psx_delay_BFC018B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC018B8: 322E0001 andi $t6, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x1u; - PGXP_ALU(0x322E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018B8u); -#endif - if (psx_delay_BFC018B4) { - psx_delay_BFC018B4 = 0; - if (psx_taken_BFC018B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01228u); - goto label_BFC01228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018BCu); - } -label_BFC018BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC018BC: 1000FF7E beq $zero, $zero, 0xBFC016B8 */ - uint32_t psx_brA_BFC018BC = cpu->gpr[0]; uint32_t psx_brB_BFC018BC = cpu->gpr[0]; - psx_taken_BFC018BC = (psx_brA_BFC018BC == psx_brB_BFC018BC); - psx_delay_BFC018BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC018C0: 00032600 sll $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018C0u); -#endif - if (psx_delay_BFC018BC) { - psx_delay_BFC018BC = 0; - if (psx_taken_BFC018BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC016B8u); - goto label_BFC016B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018C4u); - } -label_BFC018C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC018C4: 1000FD55 beq $zero, $zero, 0xBFC00E1C */ - uint32_t psx_brA_BFC018C4 = cpu->gpr[0]; uint32_t psx_brB_BFC018C4 = cpu->gpr[0]; - psx_taken_BFC018C4 = (psx_brA_BFC018C4 == psx_brB_BFC018C4); - psx_delay_BFC018C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC018C8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018C8u); -#endif - if (psx_delay_BFC018C4) { - psx_delay_BFC018C4 = 0; - if (psx_taken_BFC018C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00E1Cu); - goto label_BFC00E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018CCu); - } -label_BFC018CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018CCu); -#endif - /* 0xBFC018CC: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018CCu); -#endif -label_BFC018D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018D0u); -#endif - /* 0xBFC018D0: 8FB30038 lw $s3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018D0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30038u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC018D4: 03E00008 jr $ra */ - psx_delay_BFC018D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC018D8: 27BD0230 addiu $sp, $sp, 560 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (560)); - PGXP_ALU(0x27BD0230u, cpu->gpr[29], _pgx1, 0x00000230u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018D8u); -#endif - if (psx_delay_BFC018D4) { - psx_delay_BFC018D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC018E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC018E0u); - int psx_delay_BFC01908 = 0; - int psx_delay_BFC01918 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01910u: goto label_BFC01910; - default: break; - } - } -label_BFC018E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC018E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC018E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC018E0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC018E4: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018E4u); return; } g_debug_last_store_pc = 0xBFC018E4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC018E8: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC018EC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018ECu); return; } g_debug_last_store_pc = 0xBFC018ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018F0u); -#endif - /* 0xBFC018F0: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018F0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x141u); -#endif - /* 0xBFC018F4: 00C04021 addu $t0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC018F8: AFA80020 sw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018F8u); return; } g_debug_last_store_pc = 0xBFC018F8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC018FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC018FC: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC018FCu); return; } g_debug_last_store_pc = 0xBFC018FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC018FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC01900: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01904: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01908: 0FF00368 jal 0xBFC00DA0 */ - cpu->gpr[31] = 0xBFC01910u; /* jal link before delay slot */ - psx_delay_BFC01908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0190Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0190C: AFA70024 sw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0190Cu); return; } g_debug_last_store_pc = 0xBFC0190Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0190Cu); -#endif - if (psx_delay_BFC01908) { - psx_delay_BFC01908 = 0; - cpu->gpr[31] = 0xBFC01910u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00DA0u); - cpu->pc = 0xBFC00DA0u; return; - } -label_BFC01910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01910u); -#endif - /* 0xBFC01910: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01910u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC01914: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01918: 03E00008 jr $ra */ - psx_delay_BFC01918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0191Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0191C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0191Cu); -#endif - if (psx_delay_BFC01918) { - psx_delay_BFC01918 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01920(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01920u); - int psx_delay_BFC01938 = 0; -label_BFC01920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC01920: 40086000 mfc0 $t0, cop0[12] */ - cpu->gpr[8] = cpu->cop0[12]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 8u; -#endif - PGXP_ALU(0x40086000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC01928: 3C1ABFC0 lui $k0, 0xBFC0 */ - cpu->gpr[26] = 0xBFC00000u; - PGXP_ALU(0x3C1ABFC0u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC0192C: 275A193C addiu $k0, $k0, 6460 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (6460)); - PGXP_ALU(0x275A193Cu, cpu->gpr[26], _pgx1, 0x0000193Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01930: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC01934: 0341D025 or $k0, $k0, $at */ - { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[26] = cpu->gpr[26] | cpu->gpr[1]; - PGXP_ALU(0x0341D025u, cpu->gpr[26], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC01938: 03400008 jr $k0 */ - { uint32_t _t = cpu->gpr[26]; - /* DELAY (orphaned) 0xBFC0193C: 24090804 addiu $t1, $zero, 2052 */ -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2052)); - PGXP_ALU(0x24090804u, cpu->gpr[9], _pgx1, 0x00000804u); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } -} - -void SCPH1001_func_1FC0193C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0193Cu); - int psx_delay_BFC01980 = 0; - int psx_taken_BFC01980 = 0; - int psx_delay_BFC01A30 = 0; - int psx_taken_BFC01A30 = 0; - int psx_delay_BFC01A58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01960u: goto label_BFC01960; - case 0xBFC01988u: goto label_BFC01988; - case 0xBFC019B0u: goto label_BFC019B0; - case 0xBFC01A38u: goto label_BFC01A38; - default: break; - } - } -label_BFC0193C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0193Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0193C: 24090804 addiu $t1, $zero, 2052 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2052)); - PGXP_ALU(0x24090804u, cpu->gpr[9], _pgx1, 0x00000804u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01940: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC01944: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01944u); return; } g_debug_last_store_pc = 0xBFC01944u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC01948: 3C0C0001 lui $t4, 0x1 */ - cpu->gpr[12] = 0x00010000u; - PGXP_ALU(0x3C0C0001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0194C: 408C6000 mtc0 $t4, cop0[12] */ - cpu->cop0[12] = cpu->gpr[12]; -#ifdef PSX_COSIM - cosim_instr(0xBFC0194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01958: 240A0000 addiu $t2, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x240A0000u, cpu->gpr[10], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0195C: 240B0F80 addiu $t3, $zero, 3968 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3968)); - PGXP_ALU(0x240B0F80u, cpu->gpr[11], _pgx1, 0x00000F80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0195Cu); -#endif -label_BFC01960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01960: AD400000 sw $zero, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01960u); return; } g_debug_last_store_pc = 0xBFC01960u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01964: AD400010 sw $zero, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01964u); return; } g_debug_last_store_pc = 0xBFC01964u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01968: AD400020 sw $zero, 32($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01968u); return; } g_debug_last_store_pc = 0xBFC01968u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0196C: AD400030 sw $zero, 48($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0196Cu); return; } g_debug_last_store_pc = 0xBFC0196Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01970: AD400040 sw $zero, 64($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01970u); return; } g_debug_last_store_pc = 0xBFC01970u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01974: AD400050 sw $zero, 80($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01974u); return; } g_debug_last_store_pc = 0xBFC01974u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01978: AD400060 sw $zero, 96($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01978u); return; } g_debug_last_store_pc = 0xBFC01978u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400060u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0197Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0197C: AD400070 sw $zero, 112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0197Cu); return; } g_debug_last_store_pc = 0xBFC0197Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400070u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0197Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC01980: 154BFFF7 bne $t2, $t3, 0xBFC01960 */ - uint32_t psx_brA_BFC01980 = cpu->gpr[10]; uint32_t psx_brB_BFC01980 = cpu->gpr[11]; - psx_taken_BFC01980 = (psx_brA_BFC01980 != psx_brB_BFC01980); - psx_delay_BFC01980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC01984: 214A0080 addi $t2, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (128); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[10] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214A0080u, cpu->gpr[10], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01984u); -#endif - if (psx_delay_BFC01980) { - psx_delay_BFC01980 = 0; - if (psx_taken_BFC01980) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01960u); - goto label_BFC01960; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01988u); - } -label_BFC01988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC01988: 40806000 mtc0 $zero, cop0[12] */ - cpu->cop0[12] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC01988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0198Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0198C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0198Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC01990: 24090800 addiu $t1, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24090800u, cpu->gpr[9], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01994: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC01998: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01998u); return; } g_debug_last_store_pc = 0xBFC01998u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0199Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0199C: 408C6000 mtc0 $t4, cop0[12] */ - cpu->cop0[12] = cpu->gpr[12]; -#ifdef PSX_COSIM - cosim_instr(0xBFC0199Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC019A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC019A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC019A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC019A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019A8: 240A0000 addiu $t2, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x240A0000u, cpu->gpr[10], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC019AC: 240B0F80 addiu $t3, $zero, 3968 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3968)); - PGXP_ALU(0x240B0F80u, cpu->gpr[11], _pgx1, 0x00000F80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019ACu); -#endif -label_BFC019B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC019B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC019B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019B0: AD400000 sw $zero, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019B0u); return; } g_debug_last_store_pc = 0xBFC019B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019B4: AD400004 sw $zero, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019B4u); return; } g_debug_last_store_pc = 0xBFC019B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019B8: AD400008 sw $zero, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019B8u); return; } g_debug_last_store_pc = 0xBFC019B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019BC: AD40000C sw $zero, 12($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019BCu); return; } g_debug_last_store_pc = 0xBFC019BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019C0: AD400010 sw $zero, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019C0u); return; } g_debug_last_store_pc = 0xBFC019C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019C4: AD400014 sw $zero, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019C4u); return; } g_debug_last_store_pc = 0xBFC019C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019C8: AD400018 sw $zero, 24($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019C8u); return; } g_debug_last_store_pc = 0xBFC019C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019CC: AD40001C sw $zero, 28($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019CCu); return; } g_debug_last_store_pc = 0xBFC019CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019D0: AD400020 sw $zero, 32($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019D0u); return; } g_debug_last_store_pc = 0xBFC019D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019D4: AD400024 sw $zero, 36($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019D4u); return; } g_debug_last_store_pc = 0xBFC019D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400024u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019D8: AD400028 sw $zero, 40($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019D8u); return; } g_debug_last_store_pc = 0xBFC019D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400028u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019DC: AD40002C sw $zero, 44($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019DCu); return; } g_debug_last_store_pc = 0xBFC019DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40002Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019E0: AD400030 sw $zero, 48($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019E0u); return; } g_debug_last_store_pc = 0xBFC019E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019E4: AD400034 sw $zero, 52($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019E4u); return; } g_debug_last_store_pc = 0xBFC019E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019E8: AD400038 sw $zero, 56($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019E8u); return; } g_debug_last_store_pc = 0xBFC019E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400038u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019EC: AD40003C sw $zero, 60($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019ECu); return; } g_debug_last_store_pc = 0xBFC019ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40003Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019F0: AD400040 sw $zero, 64($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019F0u); return; } g_debug_last_store_pc = 0xBFC019F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019F4: AD400044 sw $zero, 68($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019F4u); return; } g_debug_last_store_pc = 0xBFC019F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019F8: AD400048 sw $zero, 72($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019F8u); return; } g_debug_last_store_pc = 0xBFC019F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC019FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC019FC: AD40004C sw $zero, 76($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC019FCu); return; } g_debug_last_store_pc = 0xBFC019FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC019FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A00: AD400050 sw $zero, 80($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A00u); return; } g_debug_last_store_pc = 0xBFC01A00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A04: AD400054 sw $zero, 84($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A04u); return; } g_debug_last_store_pc = 0xBFC01A04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A08: AD400058 sw $zero, 88($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A08u); return; } g_debug_last_store_pc = 0xBFC01A08u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400058u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A0C: AD40005C sw $zero, 92($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A0Cu); return; } g_debug_last_store_pc = 0xBFC01A0Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40005Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A10: AD400060 sw $zero, 96($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A10u); return; } g_debug_last_store_pc = 0xBFC01A10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400060u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A14: AD400064 sw $zero, 100($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A14u); return; } g_debug_last_store_pc = 0xBFC01A14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400064u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A18: AD400068 sw $zero, 104($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A18u); return; } g_debug_last_store_pc = 0xBFC01A18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400068u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A1C: AD40006C sw $zero, 108($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A1Cu); return; } g_debug_last_store_pc = 0xBFC01A1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40006Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A20: AD400070 sw $zero, 112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A20u); return; } g_debug_last_store_pc = 0xBFC01A20u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400070u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A24: AD400074 sw $zero, 116($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A24u); return; } g_debug_last_store_pc = 0xBFC01A24u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A28: AD400078 sw $zero, 120($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A28u); return; } g_debug_last_store_pc = 0xBFC01A28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400078u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01A2C: AD40007C sw $zero, 124($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A2Cu); return; } g_debug_last_store_pc = 0xBFC01A2Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD40007Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC01A30: 154BFFDF bne $t2, $t3, 0xBFC019B0 */ - uint32_t psx_brA_BFC01A30 = cpu->gpr[10]; uint32_t psx_brB_BFC01A30 = cpu->gpr[11]; - psx_taken_BFC01A30 = (psx_brA_BFC01A30 != psx_brB_BFC01A30); - psx_delay_BFC01A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC01A34: 214A0080 addi $t2, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (128); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[10] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214A0080u, cpu->gpr[10], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A34u); -#endif - if (psx_delay_BFC01A30) { - psx_delay_BFC01A30 = 0; - if (psx_taken_BFC01A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC019B0u); - goto label_BFC019B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A38u); - } -label_BFC01A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC01A38: 40806000 mtc0 $zero, cop0[12] */ - cpu->cop0[12] = cpu->gpr[0]; -#ifdef PSX_COSIM - cosim_instr(0xBFC01A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01A3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC01A40: 3C090001 lui $t1, 0x1 */ - cpu->gpr[9] = 0x00010000u; - PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC01A44: 3529E988 ori $t1, $t1, 0xE988 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] | 0xE988u; - PGXP_ALU(0x3529E988u, cpu->gpr[9], _pgx1, 0xE988u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01A48: 3C01FFFE lui $at, 0xFFFE */ - cpu->gpr[1] = 0xFFFE0000u; - PGXP_ALU(0x3C01FFFEu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC01A4C: AC290130 sw $t1, 304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A4Cu); return; } g_debug_last_store_pc = 0xBFC01A4Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC290130u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC01A50: 40886000 mtc0 $t0, cop0[12] */ - cpu->cop0[12] = cpu->gpr[8]; -#ifdef PSX_COSIM - cosim_instr(0xBFC01A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01A58: 03E00008 jr $ra */ - psx_delay_BFC01A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01A5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01A5Cu); -#endif - if (psx_delay_BFC01A58) { - psx_delay_BFC01A58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01A60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01A60u); - int psx_delay_BFC01A70 = 0; - int psx_delay_BFC01A80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01A78u: goto label_BFC01A78; - default: break; - } - } -label_BFC01A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC01A60: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC01A64: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A64u); return; } g_debug_last_store_pc = 0xBFC01A64u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01A68: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC01A6C: 3C0E1F80 lui $t6, 0x1F80 */ - cpu->gpr[14] = 0x1F800000u; - PGXP_ALU(0x3C0E1F80u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01A70: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC01A78u; /* jal link before delay slot */ - psx_delay_BFC01A70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC01A74: A1C42041 sb $a0, 8257($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01A74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (8257)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA1C42041u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A74u); -#endif - if (psx_delay_BFC01A70) { - psx_delay_BFC01A70 = 0; - cpu->gpr[31] = 0xBFC01A78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC01A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A78u); -#endif - /* 0xBFC01A78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC01A7C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01A80: 03E00008 jr $ra */ - psx_delay_BFC01A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01A84u); -#endif - if (psx_delay_BFC01A80) { - psx_delay_BFC01A80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01A90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01A90u); - int psx_delay_BFC01A90 = 0; - int psx_taken_BFC01A90 = 0; - int psx_delay_BFC01A98 = 0; - int psx_delay_BFC01AA0 = 0; - int psx_taken_BFC01AA0 = 0; - int psx_delay_BFC01AB8 = 0; - int psx_taken_BFC01AB8 = 0; - int psx_delay_BFC01AC4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01A98u: goto label_BFC01A98; - case 0xBFC01AA0u: goto label_BFC01AA0; - case 0xBFC01AA8u: goto label_BFC01AA8; - case 0xBFC01AC0u: goto label_BFC01AC0; - default: break; - } - } -label_BFC01A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01A90: 14800003 bne $a0, $zero, 0xBFC01AA0 */ - uint32_t psx_brA_BFC01A90 = cpu->gpr[4]; uint32_t psx_brB_BFC01A90 = cpu->gpr[0]; - psx_taken_BFC01A90 = (psx_brA_BFC01A90 != psx_brB_BFC01A90); - psx_delay_BFC01A90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01A94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01A94u); -#endif - if (psx_delay_BFC01A90) { - psx_delay_BFC01A90 = 0; - if (psx_taken_BFC01A90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AA0u); - goto label_BFC01AA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A98u); - } -label_BFC01A98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01A98: 03E00008 jr $ra */ - psx_delay_BFC01A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01A9C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01A9Cu); -#endif - if (psx_delay_BFC01A98) { - psx_delay_BFC01A98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01AA0: 18C00007 blez $a2, 0xBFC01AC0 */ - uint32_t psx_brA_BFC01AA0 = cpu->gpr[6]; - psx_taken_BFC01AA0 = ((int32_t)psx_brA_BFC01AA0 <= 0); - psx_delay_BFC01AA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC01AA4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AA4u); -#endif - if (psx_delay_BFC01AA0) { - psx_delay_BFC01AA0 = 0; - if (psx_taken_BFC01AA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AC0u); - goto label_BFC01AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AA8u); - } -label_BFC01AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AA8u); -#endif - /* 0xBFC01AA8: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01AAC: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01AB0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01AB4: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01AB8: 1CC0FFFB bgtz $a2, 0xBFC01AA8 */ - uint32_t psx_brA_BFC01AB8 = cpu->gpr[6]; - psx_taken_BFC01AB8 = ((int32_t)psx_brA_BFC01AB8 > 0); - psx_delay_BFC01AB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC01ABC: A0AEFFFF sb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01ABCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA0AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01ABCu); -#endif - if (psx_delay_BFC01AB8) { - psx_delay_BFC01AB8 = 0; - if (psx_taken_BFC01AB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AA8u); - goto label_BFC01AA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AC0u); - } -label_BFC01AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01AC0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01AC4: 03E00008 jr $ra */ - psx_delay_BFC01AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01AC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01AC8u); -#endif - if (psx_delay_BFC01AC4) { - psx_delay_BFC01AC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01ACC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01ACCu); - int psx_delay_BFC01ACC = 0; - int psx_taken_BFC01ACC = 0; - int psx_delay_BFC01AD4 = 0; - int psx_taken_BFC01AD4 = 0; - int psx_delay_BFC01ADC = 0; - int psx_delay_BFC01AE4 = 0; - int psx_taken_BFC01AE4 = 0; - int psx_delay_BFC01AF4 = 0; - int psx_taken_BFC01AF4 = 0; - int psx_delay_BFC01B00 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01AD4u: goto label_BFC01AD4; - case 0xBFC01ADCu: goto label_BFC01ADC; - case 0xBFC01AE4u: goto label_BFC01AE4; - case 0xBFC01AECu: goto label_BFC01AEC; - case 0xBFC01AFCu: goto label_BFC01AFC; - default: break; - } - } -label_BFC01ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01ACC: 10800003 beq $a0, $zero, 0xBFC01ADC */ - uint32_t psx_brA_BFC01ACC = cpu->gpr[4]; uint32_t psx_brB_BFC01ACC = cpu->gpr[0]; - psx_taken_BFC01ACC = (psx_brA_BFC01ACC == psx_brB_BFC01ACC); - psx_delay_BFC01ACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01AD0u); -#endif - if (psx_delay_BFC01ACC) { - psx_delay_BFC01ACC = 0; - if (psx_taken_BFC01ACC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ADCu); - goto label_BFC01ADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AD4u); - } -label_BFC01AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01AD4: 1CA00003 bgtz $a1, 0xBFC01AE4 */ - uint32_t psx_brA_BFC01AD4 = cpu->gpr[5]; - psx_taken_BFC01AD4 = ((int32_t)psx_brA_BFC01AD4 > 0); - psx_delay_BFC01AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01AD8u); -#endif - if (psx_delay_BFC01AD4) { - psx_delay_BFC01AD4 = 0; - if (psx_taken_BFC01AD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AE4u); - goto label_BFC01AE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ADCu); - } -label_BFC01ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01ADC: 03E00008 jr $ra */ - psx_delay_BFC01ADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01AE0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AE0u); -#endif - if (psx_delay_BFC01ADC) { - psx_delay_BFC01ADC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01AE4: 18A00005 blez $a1, 0xBFC01AFC */ - uint32_t psx_brA_BFC01AE4 = cpu->gpr[5]; - psx_taken_BFC01AE4 = ((int32_t)psx_brA_BFC01AE4 <= 0); - psx_delay_BFC01AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC01AE8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AE8u); -#endif - if (psx_delay_BFC01AE4) { - psx_delay_BFC01AE4 = 0; - if (psx_taken_BFC01AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AFCu); - goto label_BFC01AFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AECu); - } -label_BFC01AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01AEC: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01AF0: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01AF0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01AF4: 1CA0FFFD bgtz $a1, 0xBFC01AEC */ - uint32_t psx_brA_BFC01AF4 = cpu->gpr[5]; - psx_taken_BFC01AF4 = ((int32_t)psx_brA_BFC01AF4 > 0); - psx_delay_BFC01AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01AF8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AF8u); -#endif - if (psx_delay_BFC01AF4) { - psx_delay_BFC01AF4 = 0; - if (psx_taken_BFC01AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AECu); - goto label_BFC01AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01AFCu); - } -label_BFC01AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01AFC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01B00: 03E00008 jr $ra */ - psx_delay_BFC01B00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B04u); -#endif - if (psx_delay_BFC01B00) { - psx_delay_BFC01B00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01B08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01B08u); - int psx_delay_BFC01B08 = 0; - int psx_taken_BFC01B08 = 0; - int psx_delay_BFC01B10 = 0; - int psx_taken_BFC01B10 = 0; - int psx_delay_BFC01B18 = 0; - int psx_delay_BFC01B24 = 0; - int psx_taken_BFC01B24 = 0; - int psx_delay_BFC01B38 = 0; - int psx_taken_BFC01B38 = 0; - int psx_delay_BFC01B44 = 0; - int psx_taken_BFC01B44 = 0; - int psx_delay_BFC01B4C = 0; - int psx_taken_BFC01B4C = 0; - int psx_delay_BFC01B54 = 0; - int psx_taken_BFC01B54 = 0; - int psx_delay_BFC01B70 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01B10u: goto label_BFC01B10; - case 0xBFC01B18u: goto label_BFC01B18; - case 0xBFC01B24u: goto label_BFC01B24; - case 0xBFC01B2Cu: goto label_BFC01B2C; - case 0xBFC01B40u: goto label_BFC01B40; - case 0xBFC01B4Cu: goto label_BFC01B4C; - case 0xBFC01B54u: goto label_BFC01B54; - case 0xBFC01B5Cu: goto label_BFC01B5C; - case 0xBFC01B6Cu: goto label_BFC01B6C; - default: break; - } - } -label_BFC01B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01B08: 10800003 beq $a0, $zero, 0xBFC01B18 */ - uint32_t psx_brA_BFC01B08 = cpu->gpr[4]; uint32_t psx_brB_BFC01B08 = cpu->gpr[0]; - psx_taken_BFC01B08 = (psx_brA_BFC01B08 == psx_brB_BFC01B08); - psx_delay_BFC01B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B0Cu); -#endif - if (psx_delay_BFC01B08) { - psx_delay_BFC01B08 = 0; - if (psx_taken_BFC01B08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B18u); - goto label_BFC01B18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B10u); - } -label_BFC01B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC01B10: 14A00004 bne $a1, $zero, 0xBFC01B24 */ - uint32_t psx_brA_BFC01B10 = cpu->gpr[5]; uint32_t psx_brB_BFC01B10 = cpu->gpr[0]; - psx_taken_BFC01B10 = (psx_brA_BFC01B10 != psx_brB_BFC01B10); - psx_delay_BFC01B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01B14: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B14u); -#endif - if (psx_delay_BFC01B10) { - psx_delay_BFC01B10 = 0; - if (psx_taken_BFC01B10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B24u); - goto label_BFC01B24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B18u); - } -label_BFC01B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01B18: 03E00008 jr $ra */ - psx_delay_BFC01B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01B1C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B1Cu); -#endif - if (psx_delay_BFC01B18) { - psx_delay_BFC01B18 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01B24: 04C00009 bltz $a2, 0xBFC01B4C */ - uint32_t psx_brA_BFC01B24 = cpu->gpr[6]; - psx_taken_BFC01B24 = ((int32_t)psx_brA_BFC01B24 < 0); - psx_delay_BFC01B24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B28u); -#endif - if (psx_delay_BFC01B24) { - psx_delay_BFC01B24 = 0; - if (psx_taken_BFC01B24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B4Cu); - goto label_BFC01B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B2Cu); - } -label_BFC01B2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B2Cu); -#endif - /* 0xBFC01B2C: 90A30000 lbu $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x90A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B30u); -#endif - /* 0xBFC01B30: 90820000 lbu $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x90820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01B34: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC01B38: 14430004 bne $v0, $v1, 0xBFC01B4C */ - uint32_t psx_brA_BFC01B38 = cpu->gpr[2]; uint32_t psx_brB_BFC01B38 = cpu->gpr[3]; - psx_taken_BFC01B38 = (psx_brA_BFC01B38 != psx_brB_BFC01B38); - psx_delay_BFC01B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01B3C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B3Cu); -#endif - if (psx_delay_BFC01B38) { - psx_delay_BFC01B38 = 0; - if (psx_taken_BFC01B38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B4Cu); - goto label_BFC01B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B40u); - } -label_BFC01B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01B40: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01B44: 04C1FFF9 bgez $a2, 0xBFC01B2C */ - uint32_t psx_brA_BFC01B44 = cpu->gpr[6]; - psx_taken_BFC01B44 = ((int32_t)psx_brA_BFC01B44 >= 0); - psx_delay_BFC01B44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B48u); -#endif - if (psx_delay_BFC01B44) { - psx_delay_BFC01B44 = 0; - if (psx_taken_BFC01B44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B2Cu); - goto label_BFC01B2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B4Cu); - } -label_BFC01B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01B4C: 04C10003 bgez $a2, 0xBFC01B5C */ - uint32_t psx_brA_BFC01B4C = cpu->gpr[6]; - psx_taken_BFC01B4C = ((int32_t)psx_brA_BFC01B4C >= 0); - psx_delay_BFC01B4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B50u); -#endif - if (psx_delay_BFC01B4C) { - psx_delay_BFC01B4C = 0; - if (psx_taken_BFC01B4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B5Cu); - goto label_BFC01B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B54u); - } -label_BFC01B54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B54: 10000005 beq $zero, $zero, 0xBFC01B6C */ - uint32_t psx_brA_BFC01B54 = cpu->gpr[0]; uint32_t psx_brB_BFC01B54 = cpu->gpr[0]; - psx_taken_BFC01B54 = (psx_brA_BFC01B54 == psx_brB_BFC01B54); - psx_delay_BFC01B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01B58: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B58u); -#endif - if (psx_delay_BFC01B54) { - psx_delay_BFC01B54 = 0; - if (psx_taken_BFC01B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B6Cu); - goto label_BFC01B6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B5Cu); - } -label_BFC01B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B5Cu); -#endif - /* 0xBFC01B5C: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B60u); -#endif - /* 0xBFC01B60: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC01B68: 01CF1823 subu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B68u); -#endif -label_BFC01B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01B6C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01B70: 03E00008 jr $ra */ - psx_delay_BFC01B70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B74u); -#endif - if (psx_delay_BFC01B70) { - psx_delay_BFC01B70 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01B80u); - int psx_delay_BFC01B80 = 0; - int psx_taken_BFC01B80 = 0; - int psx_delay_BFC01B98 = 0; - int psx_taken_BFC01B98 = 0; - int psx_delay_BFC01BA4 = 0; - int psx_taken_BFC01BA4 = 0; - int psx_delay_BFC01BDC = 0; - int psx_taken_BFC01BDC = 0; - int psx_delay_BFC01BE4 = 0; - int psx_taken_BFC01BE4 = 0; - int psx_delay_BFC01BF0 = 0; - int psx_taken_BFC01BF0 = 0; - int psx_delay_BFC01BF8 = 0; - int psx_taken_BFC01BF8 = 0; - int psx_delay_BFC01C00 = 0; - int psx_delay_BFC01C20 = 0; - int psx_taken_BFC01C20 = 0; - int psx_delay_BFC01C28 = 0; - int psx_delay_BFC01C44 = 0; - int psx_taken_BFC01C44 = 0; - int psx_delay_BFC01C64 = 0; - int psx_taken_BFC01C64 = 0; - int psx_delay_BFC01C84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01B88u: goto label_BFC01B88; - case 0xBFC01BA0u: goto label_BFC01BA0; - case 0xBFC01BACu: goto label_BFC01BAC; - case 0xBFC01BB0u: goto label_BFC01BB0; - case 0xBFC01BB4u: goto label_BFC01BB4; - case 0xBFC01BE4u: goto label_BFC01BE4; - case 0xBFC01BECu: goto label_BFC01BEC; - case 0xBFC01BF0u: goto label_BFC01BF0; - case 0xBFC01BF8u: goto label_BFC01BF8; - case 0xBFC01C00u: goto label_BFC01C00; - case 0xBFC01C08u: goto label_BFC01C08; - case 0xBFC01C28u: goto label_BFC01C28; - case 0xBFC01C34u: goto label_BFC01C34; - case 0xBFC01C4Cu: goto label_BFC01C4C; - case 0xBFC01C50u: goto label_BFC01C50; - case 0xBFC01C6Cu: goto label_BFC01C6C; - case 0xBFC01C70u: goto label_BFC01C70; - default: break; - } - } -label_BFC01B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01B80: 10800021 beq $a0, $zero, 0xBFC01C08 */ - uint32_t psx_brA_BFC01B80 = cpu->gpr[4]; uint32_t psx_brB_BFC01B80 = cpu->gpr[0]; - psx_taken_BFC01B80 = (psx_brA_BFC01B80 == psx_brB_BFC01B80); - psx_delay_BFC01B80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B84u); -#endif - if (psx_delay_BFC01B80) { - psx_delay_BFC01B80 = 0; - if (psx_taken_BFC01B80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C08u); - goto label_BFC01C08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B88u); - } -label_BFC01B88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01B88: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B8Cu); -#endif - /* 0xBFC01B8C: 8C429004 lw $v0, -28668($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01B8Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01B90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC01B94: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01B98: 14200005 bne $at, $zero, 0xBFC01BB0 */ - uint32_t psx_brA_BFC01B98 = cpu->gpr[1]; uint32_t psx_brB_BFC01B98 = cpu->gpr[0]; - psx_taken_BFC01B98 = (psx_brA_BFC01B98 != psx_brB_BFC01B98); - psx_delay_BFC01B98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC01B9C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01B9Cu); -#endif - if (psx_delay_BFC01B98) { - psx_delay_BFC01B98 = 0; - if (psx_taken_BFC01B98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BB0u); - goto label_BFC01BB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BA0u); - } -label_BFC01BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01BA0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01BA4: 10000003 beq $zero, $zero, 0xBFC01BB4 */ - uint32_t psx_brA_BFC01BA4 = cpu->gpr[0]; uint32_t psx_brB_BFC01BA4 = cpu->gpr[0]; - psx_taken_BFC01BA4 = (psx_brA_BFC01BA4 == psx_brB_BFC01BA4); - psx_delay_BFC01BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC01BA8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BA8u); -#endif - if (psx_delay_BFC01BA4) { - psx_delay_BFC01BA4 = 0; - if (psx_taken_BFC01BA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BB4u); - goto label_BFC01BB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BACu); - } -label_BFC01BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC01BAC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BACu); -#endif -label_BFC01BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC01BB0: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BB0u); -#endif -label_BFC01BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01BB4: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC01BB8: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BBCu); -#endif - /* 0xBFC01BBC: 8C849000 lw $a0, -28672($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01BBCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BC0u); -#endif - /* 0xBFC01BC0: 8DCE9008 lw $t6, -28664($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01BC0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC01BC8: 01C41023 subu $v0, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C41023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01BCC: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01BD0: 00021080 sll $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00021080u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01BD4: 2442FFFC addiu $v0, $v0, -4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); - PGXP_ALU(0x2442FFFCu, cpu->gpr[2], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC01BD8: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01BDC: 14200004 bne $at, $zero, 0xBFC01BF0 */ - uint32_t psx_brA_BFC01BDC = cpu->gpr[1]; uint32_t psx_brB_BFC01BDC = cpu->gpr[0]; - psx_taken_BFC01BDC = (psx_brA_BFC01BDC != psx_brB_BFC01BDC); - psx_delay_BFC01BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC01BE0: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BE0u); -#endif - if (psx_delay_BFC01BDC) { - psx_delay_BFC01BDC = 0; - if (psx_taken_BFC01BDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BF0u); - goto label_BFC01BF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BE4u); - } -label_BFC01BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01BE4: 10000013 beq $zero, $zero, 0xBFC01C34 */ - uint32_t psx_brA_BFC01BE4 = cpu->gpr[0]; uint32_t psx_brB_BFC01BE4 = cpu->gpr[0]; - psx_taken_BFC01BE4 = (psx_brA_BFC01BE4 == psx_brB_BFC01BE4); - psx_delay_BFC01BE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC01BE8: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BE8u); -#endif - if (psx_delay_BFC01BE4) { - psx_delay_BFC01BE4 = 0; - if (psx_taken_BFC01BE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C34u); - goto label_BFC01C34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BECu); - } -label_BFC01BEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC01BEC: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BECu); -#endif -label_BFC01BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01BF0: 14200003 bne $at, $zero, 0xBFC01C00 */ - uint32_t psx_brA_BFC01BF0 = cpu->gpr[1]; uint32_t psx_brB_BFC01BF0 = cpu->gpr[0]; - psx_taken_BFC01BF0 = (psx_brA_BFC01BF0 != psx_brB_BFC01BF0); - psx_delay_BFC01BF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01BF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01BF4u); -#endif - if (psx_delay_BFC01BF0) { - psx_delay_BFC01BF0 = 0; - if (psx_taken_BFC01BF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C00u); - goto label_BFC01C00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01BF8u); - } -label_BFC01BF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01BF8: 1000000E beq $zero, $zero, 0xBFC01C34 */ - uint32_t psx_brA_BFC01BF8 = cpu->gpr[0]; uint32_t psx_brB_BFC01BF8 = cpu->gpr[0]; - psx_taken_BFC01BF8 = (psx_brA_BFC01BF8 == psx_brB_BFC01BF8); - psx_delay_BFC01BF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC01BFC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01BFCu); -#endif - if (psx_delay_BFC01BF8) { - psx_delay_BFC01BF8 = 0; - if (psx_taken_BFC01BF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C34u); - goto label_BFC01C34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C00u); - } -label_BFC01C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01C00: 03E00008 jr $ra */ - psx_delay_BFC01C00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01C04: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C04u); -#endif - if (psx_delay_BFC01C00) { - psx_delay_BFC01C00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01C08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01C08: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC01C0C: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C10u); -#endif - /* 0xBFC01C10: 8C849000 lw $a0, -28672($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C10u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C14u); -#endif - /* 0xBFC01C14: 8DEF9008 lw $t7, -28664($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C14u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01C18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC01C1C: 008F082B sltu $at, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x008F082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01C20: 14200004 bne $at, $zero, 0xBFC01C34 */ - uint32_t psx_brA_BFC01C20 = cpu->gpr[1]; uint32_t psx_brB_BFC01C20 = cpu->gpr[0]; - psx_taken_BFC01C20 = (psx_brA_BFC01C20 != psx_brB_BFC01C20); - psx_delay_BFC01C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC01C24: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C24u); -#endif - if (psx_delay_BFC01C20) { - psx_delay_BFC01C20 = 0; - if (psx_taken_BFC01C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C34u); - goto label_BFC01C34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C28u); - } -label_BFC01C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01C28: 03E00008 jr $ra */ - psx_delay_BFC01C28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01C2C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C2Cu); -#endif - if (psx_delay_BFC01C28) { - psx_delay_BFC01C28 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC01C34: 24CB0004 addiu $t3, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[6] + (4)); - PGXP_ALU(0x24CB0004u, cpu->gpr[11], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC01C38: 2418FFFE addiu $t8, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2418FFFEu, cpu->gpr[24], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC01C3C: 34CA0001 ori $t2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] | 0x1u; - PGXP_ALU(0x34CA0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01C40: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC01C44: 04C10002 bgez $a2, 0xBFC01C50 */ - uint32_t psx_brA_BFC01C44 = cpu->gpr[6]; - psx_taken_BFC01C44 = ((int32_t)psx_brA_BFC01C44 >= 0); - psx_delay_BFC01C44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC01C48: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C48u); -#endif - if (psx_delay_BFC01C44) { - psx_delay_BFC01C44 = 0; - if (psx_taken_BFC01C44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C50u); - goto label_BFC01C50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C4Cu); - } -label_BFC01C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01C4C: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C4Cu); -#endif -label_BFC01C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC01C50: 0001C883 sra $t9, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x0001C883u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC01C54: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC01C58: 00884821 addu $t1, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00884821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC01C5C: AD380000 sw $t8, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C5Cu); return; } g_debug_last_store_pc = 0xBFC01C5Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC01C60: AC8AFFFC sw $t2, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C60u); return; } g_debug_last_store_pc = 0xBFC01C60u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8AFFFCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC01C64: 05610002 bgez $t3, 0xBFC01C70 */ - uint32_t psx_brA_BFC01C64 = cpu->gpr[11]; - psx_taken_BFC01C64 = ((int32_t)psx_brA_BFC01C64 >= 0); - psx_delay_BFC01C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC01C68: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C68u); -#endif - if (psx_delay_BFC01C64) { - psx_delay_BFC01C64 = 0; - if (psx_taken_BFC01C64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C70u); - goto label_BFC01C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C6Cu); - } -label_BFC01C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01C6C: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C6Cu); -#endif -label_BFC01C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC01C70: 00016083 sra $t4, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00016083u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC01C74: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC01C78: 008D2021 addu $a0, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01C7C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC01C80: AC249000 sw $a0, -28672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C80u); return; } g_debug_last_store_pc = 0xBFC01C80u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01C84: 03E00008 jr $ra */ - psx_delay_BFC01C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01C88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01C88u); -#endif - if (psx_delay_BFC01C84) { - psx_delay_BFC01C84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01C8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01C8Cu); - int psx_delay_BFC01CA4 = 0; - int psx_taken_BFC01CA4 = 0; - int psx_delay_BFC01CAC = 0; - int psx_delay_BFC01CC8 = 0; - int psx_taken_BFC01CC8 = 0; - int psx_delay_BFC01CF8 = 0; - int psx_taken_BFC01CF8 = 0; - int psx_delay_BFC01D04 = 0; - int psx_taken_BFC01D04 = 0; - int psx_delay_BFC01D14 = 0; - int psx_taken_BFC01D14 = 0; - int psx_delay_BFC01D1C = 0; - int psx_taken_BFC01D1C = 0; - int psx_delay_BFC01D38 = 0; - int psx_taken_BFC01D38 = 0; - int psx_delay_BFC01D48 = 0; - int psx_taken_BFC01D48 = 0; - int psx_delay_BFC01D94 = 0; - int psx_taken_BFC01D94 = 0; - int psx_delay_BFC01DB4 = 0; - int psx_taken_BFC01DB4 = 0; - int psx_delay_BFC01DBC = 0; - int psx_taken_BFC01DBC = 0; - int psx_delay_BFC01E00 = 0; - int psx_taken_BFC01E00 = 0; - int psx_delay_BFC01E0C = 0; - int psx_taken_BFC01E0C = 0; - int psx_delay_BFC01E1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01CACu: goto label_BFC01CAC; - case 0xBFC01CB4u: goto label_BFC01CB4; - case 0xBFC01CD0u: goto label_BFC01CD0; - case 0xBFC01CE8u: goto label_BFC01CE8; - case 0xBFC01D00u: goto label_BFC01D00; - case 0xBFC01D0Cu: goto label_BFC01D0C; - case 0xBFC01D1Cu: goto label_BFC01D1C; - case 0xBFC01D24u: goto label_BFC01D24; - case 0xBFC01D40u: goto label_BFC01D40; - case 0xBFC01D50u: goto label_BFC01D50; - case 0xBFC01D54u: goto label_BFC01D54; - case 0xBFC01D70u: goto label_BFC01D70; - case 0xBFC01D9Cu: goto label_BFC01D9C; - case 0xBFC01DA8u: goto label_BFC01DA8; - case 0xBFC01DACu: goto label_BFC01DAC; - case 0xBFC01DBCu: goto label_BFC01DBC; - case 0xBFC01DC4u: goto label_BFC01DC4; - case 0xBFC01DC8u: goto label_BFC01DC8; - case 0xBFC01E08u: goto label_BFC01E08; - case 0xBFC01E0Cu: goto label_BFC01E0C; - case 0xBFC01E14u: goto label_BFC01E14; - case 0xBFC01E18u: goto label_BFC01E18; - case 0xBFC01E1Cu: goto label_BFC01E1C; - default: break; - } - } -label_BFC01C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01C8C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C90u); -#endif - /* 0xBFC01C90: 8C8EFFFC lw $t6, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01C90u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01C94: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC01C98: 240AFFFE addiu $t2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240AFFFEu, cpu->gpr[10], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01C9C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01CA0: 2401FFFC addiu $at, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2401FFFCu, cpu->gpr[1], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400u); -#endif - /* 0xBFC01CA4: 154E0003 bne $t2, $t6, 0xBFC01CB4 */ - uint32_t psx_brA_BFC01CA4 = cpu->gpr[10]; uint32_t psx_brB_BFC01CA4 = cpu->gpr[14]; - psx_taken_BFC01CA4 = (psx_brA_BFC01CA4 != psx_brB_BFC01CA4); - psx_delay_BFC01CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC01CA8: 00A12824 and $a1, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A12824u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CA8u); -#endif - if (psx_delay_BFC01CA4) { - psx_delay_BFC01CA4 = 0; - if (psx_taken_BFC01CA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01CB4u); - goto label_BFC01CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01CACu); - } -label_BFC01CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01CAC: 03E00008 jr $ra */ - psx_delay_BFC01CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01CB0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CB0u); -#endif - if (psx_delay_BFC01CAC) { - psx_delay_BFC01CAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC01CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC01CB4: 2482FFFC addiu $v0, $a0, -4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); - PGXP_ALU(0x2482FFFCu, cpu->gpr[2], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CB8u); -#endif - /* 0xBFC01CB8: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01CB8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC01CBC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x540u); -#endif - /* 0xBFC01CC0: 00CA4024 and $t0, $a2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[10]; - PGXP_ALU(0x00CA4024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC01CC4: 0105082B sltu $at, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01CC8: 10200038 beq $at, $zero, 0xBFC01DAC */ - uint32_t psx_brA_BFC01CC8 = cpu->gpr[1]; uint32_t psx_brB_BFC01CC8 = cpu->gpr[0]; - psx_taken_BFC01CC8 = (psx_brA_BFC01CC8 == psx_brB_BFC01CC8); - psx_delay_BFC01CC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01CCC: 2401FFFC addiu $at, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2401FFFCu, cpu->gpr[1], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CCCu); -#endif - if (psx_delay_BFC01CC8) { - psx_delay_BFC01CC8 = 0; - if (psx_taken_BFC01CC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DACu); - goto label_BFC01DAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01CD0u); - } -label_BFC01CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC01CD0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC01CD4: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CD8u); -#endif - /* 0xBFC01CD8: 8D299008 lw $t1, -28664($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -28664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-28664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01CD8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CDCu); -#endif - /* 0xBFC01CDC: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01CDCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x141u); -#endif - /* 0xBFC01CE0: 01003021 addu $a2, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC01CE4: 00077882 srl $t7, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] >> 2u; - PGXP_ALU(0x00077882u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CE4u); -#endif -label_BFC01CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC01CE8: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC01CEC: 00982021 addu $a0, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x00982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CF0u); -#endif - /* 0xBFC01CF0: 8C870004 lw $a3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01CF0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC01CF4: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC01CF8: 11470008 beq $t2, $a3, 0xBFC01D1C */ - uint32_t psx_brA_BFC01CF8 = cpu->gpr[10]; uint32_t psx_brB_BFC01CF8 = cpu->gpr[7]; - psx_taken_BFC01CF8 = (psx_brA_BFC01CF8 == psx_brB_BFC01CF8); - psx_delay_BFC01CF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01CFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01CFCu); -#endif - if (psx_delay_BFC01CF8) { - psx_delay_BFC01CF8 = 0; - if (psx_taken_BFC01CF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D1Cu); - goto label_BFC01D1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D00u); - } -label_BFC01D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC01D00: 30F90001 andi $t9, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC01D04: 17200005 bne $t9, $zero, 0xBFC01D1C */ - uint32_t psx_brA_BFC01D04 = cpu->gpr[25]; uint32_t psx_brB_BFC01D04 = cpu->gpr[0]; - psx_taken_BFC01D04 = (psx_brA_BFC01D04 != psx_brB_BFC01D04); - psx_delay_BFC01D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01D08u); -#endif - if (psx_delay_BFC01D04) { - psx_delay_BFC01D04 = 0; - if (psx_taken_BFC01D04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D1Cu); - goto label_BFC01D1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D0Cu); - } -label_BFC01D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D0Cu); -#endif - /* 0xBFC01D0C: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D0Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01D10: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D14: 10000024 beq $zero, $zero, 0xBFC01DA8 */ - uint32_t psx_brA_BFC01D14 = cpu->gpr[0]; uint32_t psx_brB_BFC01D14 = cpu->gpr[0]; - psx_taken_BFC01D14 = (psx_brA_BFC01D14 == psx_brB_BFC01D14); - psx_delay_BFC01D14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x142u); -#endif - /* 0xBFC01D18: 00C14024 and $t0, $a2, $at */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1]; - PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D18u); -#endif - if (psx_delay_BFC01D14) { - psx_delay_BFC01D14 = 0; - if (psx_taken_BFC01D14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DA8u); - goto label_BFC01DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D1Cu); - } -label_BFC01D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC01D1C: 15470014 bne $t2, $a3, 0xBFC01D70 */ - uint32_t psx_brA_BFC01D1C = cpu->gpr[10]; uint32_t psx_brB_BFC01D1C = cpu->gpr[7]; - psx_taken_BFC01D1C = (psx_brA_BFC01D1C != psx_brB_BFC01D1C); - psx_delay_BFC01D1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01D20u); -#endif - if (psx_delay_BFC01D1C) { - psx_delay_BFC01D1C = 0; - if (psx_taken_BFC01D1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D70u); - goto label_BFC01D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D24u); - } -label_BFC01D24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA10u); -#endif - /* 0xBFC01D24: 01245823 subu $t3, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[9] - cpu->gpr[4]; - PGXP_ALU(0x01245823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC01D28: 000B6083 sra $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 2u); - PGXP_ALU(0x000B6083u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC01D2C: 258DFFFC addiu $t5, $t4, -4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (-4)); - PGXP_ALU(0x258DFFFCu, cpu->gpr[13], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x160u); -#endif - /* 0xBFC01D30: 00A64023 subu $t0, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[5] - cpu->gpr[6]; - PGXP_ALU(0x00A64023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2102u); -#endif - /* 0xBFC01D34: 01A8082B sltu $at, $t5, $t0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x01A8082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01D38: 10200006 beq $at, $zero, 0xBFC01D54 */ - uint32_t psx_brA_BFC01D38 = cpu->gpr[1]; uint32_t psx_brB_BFC01D38 = cpu->gpr[0]; - psx_taken_BFC01D38 = (psx_brA_BFC01D38 == psx_brB_BFC01D38); - psx_delay_BFC01D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC01D3C: 00087082 srl $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] >> 2u; - PGXP_ALU(0x00087082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D3Cu); -#endif - if (psx_delay_BFC01D38) { - psx_delay_BFC01D38 = 0; - if (psx_taken_BFC01D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D54u); - goto label_BFC01D54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D40u); - } -label_BFC01D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D40u); -#endif - /* 0xBFC01D40: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D40u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01D44: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D48: 10000017 beq $zero, $zero, 0xBFC01DA8 */ - uint32_t psx_brA_BFC01D48 = cpu->gpr[0]; uint32_t psx_brB_BFC01D48 = cpu->gpr[0]; - psx_taken_BFC01D48 = (psx_brA_BFC01D48 == psx_brB_BFC01D48); - psx_delay_BFC01D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x142u); -#endif - /* 0xBFC01D4C: 00C14024 and $t0, $a2, $at */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1]; - PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D4Cu); -#endif - if (psx_delay_BFC01D48) { - psx_delay_BFC01D48 = 0; - if (psx_taken_BFC01D48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DA8u); - goto label_BFC01DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D50u); - } -label_BFC01D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC01D50: 00087082 srl $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] >> 2u; - PGXP_ALU(0x00087082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D50u); -#endif -label_BFC01D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC01D54: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC01D58: 008FC021 addu $t8, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC01D5C: AF0A0000 sw $t2, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D5Cu); return; } g_debug_last_store_pc = 0xBFC01D5Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAF0A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC01D60: 35190001 ori $t9, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] | 0x1u; - PGXP_ALU(0x35190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC01D64: AC990000 sw $t9, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D64u); return; } g_debug_last_store_pc = 0xBFC01D64u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D68u); -#endif - /* 0xBFC01D68: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D68u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01D6Cu); -#endif -label_BFC01D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D70u); -#endif - /* 0xBFC01D70: 8C4B0000 lw $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D70u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1480u); -#endif - /* 0xBFC01D74: 00EA6024 and $t4, $a3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[10]; - PGXP_ALU(0x00EA6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC01D78: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC01D7C: AC4D0000 sw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D7Cu); return; } g_debug_last_store_pc = 0xBFC01D7Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D80u); -#endif - /* 0xBFC01D80: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D80u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01D84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4480u); -#endif - /* 0xBFC01D88: 00EA7024 and $t6, $a3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[10]; - PGXP_ALU(0x00EA7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC01D8C: 00CE3021 addu $a2, $a2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[14]; - PGXP_ALU(0x00CE3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x62u); -#endif - /* 0xBFC01D90: 00C5082B sltu $at, $a2, $a1 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x00C5082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01D94: 1420FFD4 bne $at, $zero, 0xBFC01CE8 */ - uint32_t psx_brA_BFC01D94 = cpu->gpr[1]; uint32_t psx_brB_BFC01D94 = cpu->gpr[0]; - psx_taken_BFC01D94 = (psx_brA_BFC01D94 != psx_brB_BFC01D94); - psx_delay_BFC01D94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC01D98: 00077882 srl $t7, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] >> 2u; - PGXP_ALU(0x00077882u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D98u); -#endif - if (psx_delay_BFC01D94) { - psx_delay_BFC01D94 = 0; - if (psx_taken_BFC01D94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01CE8u); - goto label_BFC01CE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01D9Cu); - } -label_BFC01D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01D9Cu); -#endif - /* 0xBFC01D9C: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D9Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01DA0: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x142u); -#endif - /* 0xBFC01DA4: 00C14024 and $t0, $a2, $at */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[6] & cpu->gpr[1]; - PGXP_ALU(0x00C14024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DA4u); -#endif -label_BFC01DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01DA8: 2401FFFC addiu $at, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2401FFFCu, cpu->gpr[1], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DA8u); -#endif -label_BFC01DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8042u); -#endif - /* 0xBFC01DAC: 00C17824 and $t7, $a2, $at */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[6] & cpu->gpr[1]; - PGXP_ALU(0x00C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8022u); -#endif - /* 0xBFC01DB0: 00AF082B sltu $at, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x00AF082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01DB4: 10200015 beq $at, $zero, 0xBFC01E0C */ - uint32_t psx_brA_BFC01DB4 = cpu->gpr[1]; uint32_t psx_brB_BFC01DB4 = cpu->gpr[0]; - psx_taken_BFC01DB4 = (psx_brA_BFC01DB4 == psx_brB_BFC01DB4); - psx_delay_BFC01DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC01DB8: 0105082B sltu $at, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DB8u); -#endif - if (psx_delay_BFC01DB4) { - psx_delay_BFC01DB4 = 0; - if (psx_taken_BFC01DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E0Cu); - goto label_BFC01E0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DBCu); - } -label_BFC01DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC01DBC: 04A10002 bgez $a1, 0xBFC01DC8 */ - uint32_t psx_brA_BFC01DBC = cpu->gpr[5]; - psx_taken_BFC01DBC = ((int32_t)psx_brA_BFC01DBC >= 0); - psx_delay_BFC01DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC01DC0: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DC0u); -#endif - if (psx_delay_BFC01DBC) { - psx_delay_BFC01DBC = 0; - if (psx_taken_BFC01DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DC8u); - goto label_BFC01DC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01DC4u); - } -label_BFC01DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01DC4: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DC4u); -#endif -label_BFC01DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC01DC8: 0001C083 sra $t8, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x0001C083u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC01DCC: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x920u); -#endif - /* 0xBFC01DD0: 01055823 subu $t3, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[8] - cpu->gpr[5]; - PGXP_ALU(0x01055823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC01DD4: 256CFFFC addiu $t4, $t3, -4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-4)); - PGXP_ALU(0x256CFFFCu, cpu->gpr[12], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000014u); -#endif - /* 0xBFC01DD8: 00592021 addu $a0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00592021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC01DDC: AC8C0004 sw $t4, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DDCu); return; } g_debug_last_store_pc = 0xBFC01DDCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC8C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DE0u); -#endif - /* 0xBFC01DE0: 8C8D0004 lw $t5, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DE0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01DE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC01DE8: 35AE0001 ori $t6, $t5, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x1u; - PGXP_ALU(0x35AE0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC01DEC: AC8E0004 sw $t6, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DECu); return; } g_debug_last_store_pc = 0xBFC01DECu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DF0u); -#endif - /* 0xBFC01DF0: 8C4F0000 lw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DF0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01DF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC01DF8: 31F80001 andi $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC01DFC: 00B8C825 or $t9, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[5] | cpu->gpr[24]; - PGXP_ALU(0x00B8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01E00: 10000005 beq $zero, $zero, 0xBFC01E18 */ - uint32_t psx_brA_BFC01E00 = cpu->gpr[0]; uint32_t psx_brB_BFC01E00 = cpu->gpr[0]; - psx_taken_BFC01E00 = (psx_brA_BFC01E00 == psx_brB_BFC01E00); - psx_delay_BFC01E00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC01E04: AC590000 sw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E04u); return; } g_debug_last_store_pc = 0xBFC01E04u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E04u); -#endif - if (psx_delay_BFC01E00) { - psx_delay_BFC01E00 = 0; - if (psx_taken_BFC01E00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E18u); - goto label_BFC01E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E08u); - } -label_BFC01E08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC01E08: 0105082B sltu $at, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0105082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E08u); -#endif -label_BFC01E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01E0C: 10200003 beq $at, $zero, 0xBFC01E1C */ - uint32_t psx_brA_BFC01E0C = cpu->gpr[1]; uint32_t psx_brB_BFC01E0C = cpu->gpr[0]; - psx_taken_BFC01E0C = (psx_brA_BFC01E0C == psx_brB_BFC01E0C); - psx_delay_BFC01E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01E10: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E10u); -#endif - if (psx_delay_BFC01E0C) { - psx_delay_BFC01E0C = 0; - if (psx_taken_BFC01E0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E1Cu); - goto label_BFC01E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E14u); - } -label_BFC01E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01E14: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E14u); -#endif -label_BFC01E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC01E18: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E18u); -#endif -label_BFC01E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01E1C: 03E00008 jr $ra */ - psx_delay_BFC01E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01E20u); -#endif - if (psx_delay_BFC01E1C) { - psx_delay_BFC01E1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01E24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01E24u); - int psx_delay_BFC01E54 = 0; -label_BFC01E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01E24: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC01E28: 00057082 srl $t6, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] >> 2u; - PGXP_ALU(0x00057082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC01E2C: AC249000 sw $a0, -28672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E2Cu); return; } g_debug_last_store_pc = 0xBFC01E2Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC01E30: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC01E34: 008FC021 addu $t8, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC01E38: AC800000 sw $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E38u); return; } g_debug_last_store_pc = 0xBFC01E38u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC01E3C: 27190004 addiu $t9, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (4)); - PGXP_ALU(0x27190004u, cpu->gpr[25], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01E40: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC01E44: AC399008 sw $t9, -28664($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E44u); return; } g_debug_last_store_pc = 0xBFC01E44u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01E48: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC01E4C: AC259004 sw $a1, -28668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E4Cu); return; } g_debug_last_store_pc = 0xBFC01E4Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01E50: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC01E54: 03E00008 jr $ra */ - psx_delay_BFC01E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01E58: AC20900C sw $zero, -28660($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E58u); return; } g_debug_last_store_pc = 0xBFC01E58u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20900Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E58u); -#endif - if (psx_delay_BFC01E54) { - psx_delay_BFC01E54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC01E5C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC01E5Cu); - int psx_delay_BFC01E90 = 0; - int psx_taken_BFC01E90 = 0; - int psx_delay_BFC01E98 = 0; - int psx_taken_BFC01E98 = 0; - int psx_delay_BFC01EB8 = 0; - int psx_taken_BFC01EB8 = 0; - int psx_delay_BFC01EC0 = 0; - int psx_taken_BFC01EC0 = 0; - int psx_delay_BFC01EE4 = 0; - int psx_delay_BFC01EEC = 0; - int psx_taken_BFC01EEC = 0; - int psx_delay_BFC01EF4 = 0; - int psx_taken_BFC01EF4 = 0; - int psx_delay_BFC01F30 = 0; - int psx_taken_BFC01F30 = 0; - int psx_delay_BFC01F3C = 0; - int psx_taken_BFC01F3C = 0; - int psx_delay_BFC01F50 = 0; - int psx_taken_BFC01F50 = 0; - int psx_delay_BFC01F5C = 0; - int psx_taken_BFC01F5C = 0; - int psx_delay_BFC01F78 = 0; - int psx_taken_BFC01F78 = 0; - int psx_delay_BFC01F98 = 0; - int psx_taken_BFC01F98 = 0; - int psx_delay_BFC01FA4 = 0; - int psx_taken_BFC01FA4 = 0; - int psx_delay_BFC01FC8 = 0; - int psx_taken_BFC01FC8 = 0; - int psx_delay_BFC01FD4 = 0; - int psx_taken_BFC01FD4 = 0; - int psx_delay_BFC01FDC = 0; - int psx_delay_BFC01FE4 = 0; - int psx_taken_BFC01FE4 = 0; - int psx_delay_BFC01FEC = 0; - int psx_taken_BFC01FEC = 0; - int psx_delay_BFC02000 = 0; - int psx_taken_BFC02000 = 0; - int psx_delay_BFC0200C = 0; - int psx_taken_BFC0200C = 0; - int psx_delay_BFC02028 = 0; - int psx_taken_BFC02028 = 0; - int psx_delay_BFC02048 = 0; - int psx_taken_BFC02048 = 0; - int psx_delay_BFC02050 = 0; - int psx_taken_BFC02050 = 0; - int psx_delay_BFC02074 = 0; - int psx_taken_BFC02074 = 0; - int psx_delay_BFC02080 = 0; - int psx_taken_BFC02080 = 0; - int psx_delay_BFC02088 = 0; - int psx_delay_BFC02090 = 0; - int psx_taken_BFC02090 = 0; - int psx_delay_BFC02098 = 0; - int psx_taken_BFC02098 = 0; - int psx_delay_BFC020C0 = 0; - int psx_taken_BFC020C0 = 0; - int psx_delay_BFC020E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC01E98u: goto label_BFC01E98; - case 0xBFC01EA0u: goto label_BFC01EA0; - case 0xBFC01EC0u: goto label_BFC01EC0; - case 0xBFC01EC8u: goto label_BFC01EC8; - case 0xBFC01ECCu: goto label_BFC01ECC; - case 0xBFC01EECu: goto label_BFC01EEC; - case 0xBFC01EF4u: goto label_BFC01EF4; - case 0xBFC01EFCu: goto label_BFC01EFC; - case 0xBFC01F18u: goto label_BFC01F18; - case 0xBFC01F30u: goto label_BFC01F30; - case 0xBFC01F38u: goto label_BFC01F38; - case 0xBFC01F44u: goto label_BFC01F44; - case 0xBFC01F58u: goto label_BFC01F58; - case 0xBFC01F5Cu: goto label_BFC01F5C; - case 0xBFC01F64u: goto label_BFC01F64; - case 0xBFC01F80u: goto label_BFC01F80; - case 0xBFC01F84u: goto label_BFC01F84; - case 0xBFC01FA0u: goto label_BFC01FA0; - case 0xBFC01FA4u: goto label_BFC01FA4; - case 0xBFC01FACu: goto label_BFC01FAC; - case 0xBFC01FD0u: goto label_BFC01FD0; - case 0xBFC01FDCu: goto label_BFC01FDC; - case 0xBFC01FE4u: goto label_BFC01FE4; - case 0xBFC01FECu: goto label_BFC01FEC; - case 0xBFC01FF4u: goto label_BFC01FF4; - case 0xBFC02008u: goto label_BFC02008; - case 0xBFC0200Cu: goto label_BFC0200C; - case 0xBFC02014u: goto label_BFC02014; - case 0xBFC02030u: goto label_BFC02030; - case 0xBFC02038u: goto label_BFC02038; - case 0xBFC02050u: goto label_BFC02050; - case 0xBFC02058u: goto label_BFC02058; - case 0xBFC0207Cu: goto label_BFC0207C; - case 0xBFC02088u: goto label_BFC02088; - case 0xBFC02090u: goto label_BFC02090; - case 0xBFC02098u: goto label_BFC02098; - case 0xBFC020A0u: goto label_BFC020A0; - case 0xBFC020B0u: goto label_BFC020B0; - case 0xBFC020C8u: goto label_BFC020C8; - case 0xBFC020D8u: goto label_BFC020D8; - default: break; - } - } -label_BFC01E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC01E5C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC01E60: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E60u); return; } g_debug_last_store_pc = 0xBFC01E60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC01E64: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01E68: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC01E6C: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E70u); -#endif - /* 0xBFC01E70: 8DCE900C lw $t6, -28660($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E70u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE900Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01E74: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC01E78: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E78u); return; } g_debug_last_store_pc = 0xBFC01E78u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01E7C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01E80: 2401FFFC addiu $at, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2401FFFCu, cpu->gpr[1], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC01E84: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E84u); return; } g_debug_last_store_pc = 0xBFC01E84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC01E88: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E88u); return; } g_debug_last_store_pc = 0xBFC01E88u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC01E8C: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC01E90: 11C00003 beq $t6, $zero, 0xBFC01EA0 */ - uint32_t psx_brA_BFC01E90 = cpu->gpr[14]; uint32_t psx_brB_BFC01E90 = cpu->gpr[0]; - psx_taken_BFC01E90 = (psx_brA_BFC01E90 == psx_brB_BFC01E90); - psx_delay_BFC01E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC01E94: 02218824 and $s1, $s1, $at */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1]; - PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E94u); -#endif - if (psx_delay_BFC01E90) { - psx_delay_BFC01E90 = 0; - if (psx_taken_BFC01E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EA0u); - goto label_BFC01EA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E98u); - } -label_BFC01E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01E98: 1000001F beq $zero, $zero, 0xBFC01F18 */ - uint32_t psx_brA_BFC01E98 = cpu->gpr[0]; uint32_t psx_brB_BFC01E98 = cpu->gpr[0]; - psx_taken_BFC01E98 = (psx_brA_BFC01E98 == psx_brB_BFC01E98); - psx_delay_BFC01E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC01E9C: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01E9Cu); -#endif - if (psx_delay_BFC01E98) { - psx_delay_BFC01E98 = 0; - if (psx_taken_BFC01E98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F18u); - goto label_BFC01F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EA0u); - } -label_BFC01EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01EA0: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC01EA4: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EA8u); -#endif - /* 0xBFC01EA8: 8C429000 lw $v0, -28672($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01EA8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EACu); -#endif - /* 0xBFC01EAC: 8DEF9008 lw $t7, -28664($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01EACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01EB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC01EB4: 004F082B sltu $at, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x004F082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01EB8: 14200004 bne $at, $zero, 0xBFC01ECC */ - uint32_t psx_brA_BFC01EB8 = cpu->gpr[1]; uint32_t psx_brB_BFC01EB8 = cpu->gpr[0]; - psx_taken_BFC01EB8 = (psx_brA_BFC01EB8 != psx_brB_BFC01EB8); - psx_delay_BFC01EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC01EBC: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EBCu); -#endif - if (psx_delay_BFC01EB8) { - psx_delay_BFC01EB8 = 0; - if (psx_taken_BFC01EB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ECCu); - goto label_BFC01ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EC0u); - } -label_BFC01EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01EC0: 10000085 beq $zero, $zero, 0xBFC020D8 */ - uint32_t psx_brA_BFC01EC0 = cpu->gpr[0]; uint32_t psx_brB_BFC01EC0 = cpu->gpr[0]; - psx_taken_BFC01EC0 = (psx_brA_BFC01EC0 == psx_brB_BFC01EC0); - psx_delay_BFC01EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01EC4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EC4u); -#endif - if (psx_delay_BFC01EC0) { - psx_delay_BFC01EC0 = 0; - if (psx_taken_BFC01EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020D8u); - goto label_BFC020D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EC8u); - } -label_BFC01EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC01EC8: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EC8u); -#endif -label_BFC01ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC01ECC: AC520000 sw $s2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01ECCu); return; } g_debug_last_store_pc = 0xBFC01ECCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC520000u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01ED0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01ED4: AC22B064 sw $v0, -20380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01ED4u); return; } g_debug_last_store_pc = 0xBFC01ED4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC01ED8: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01EDC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC01EE0: AC229000 sw $v0, -28672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01EE0u); return; } g_debug_last_store_pc = 0xBFC01EE0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01EE4: 0FF006E0 jal 0xBFC01B80 */ - cpu->gpr[31] = 0xBFC01EECu; /* jal link before delay slot */ - psx_delay_BFC01EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC01EE8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EE8u); -#endif - if (psx_delay_BFC01EE4) { - psx_delay_BFC01EE4 = 0; - cpu->gpr[31] = 0xBFC01EECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B80u); - cpu->pc = 0xBFC01B80u; return; - } -label_BFC01EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01EEC: 10400003 beq $v0, $zero, 0xBFC01EFC */ - uint32_t psx_brA_BFC01EEC = cpu->gpr[2]; uint32_t psx_brB_BFC01EEC = cpu->gpr[0]; - psx_taken_BFC01EEC = (psx_brA_BFC01EEC == psx_brB_BFC01EEC); - psx_delay_BFC01EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01EF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01EF0u); -#endif - if (psx_delay_BFC01EEC) { - psx_delay_BFC01EEC = 0; - if (psx_taken_BFC01EEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EFCu); - goto label_BFC01EFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EF4u); - } -label_BFC01EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01EF4: 10000078 beq $zero, $zero, 0xBFC020D8 */ - uint32_t psx_brA_BFC01EF4 = cpu->gpr[0]; uint32_t psx_brB_BFC01EF4 = cpu->gpr[0]; - psx_taken_BFC01EF4 = (psx_brA_BFC01EF4 == psx_brB_BFC01EF4); - psx_delay_BFC01EF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01EF8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01EF8u); -#endif - if (psx_delay_BFC01EF4) { - psx_delay_BFC01EF4 = 0; - if (psx_taken_BFC01EF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020D8u); - goto label_BFC020D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01EFCu); - } -label_BFC01EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC01EFC: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F00u); -#endif - /* 0xBFC01F00: 8F18B064 lw $t8, -20380($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F00u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18B064u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01F04: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC01F08: AC38B060 sw $t8, -20384($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F08u); return; } g_debug_last_store_pc = 0xBFC01F08u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38B060u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01F0C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC01F10: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC01F14: AC39900C sw $t9, -28660($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F14u); return; } g_debug_last_store_pc = 0xBFC01F14u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39900Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F14u); -#endif -label_BFC01F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC01F18: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F1Cu); -#endif - /* 0xBFC01F1C: 8D08B064 lw $t0, -20380($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F1Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08B064u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01F20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F24u); -#endif - /* 0xBFC01F24: 8D040000 lw $a0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F24u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100u); } - PGXP_LOAD(0x8D040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01F28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC01F2C: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F2Cu); -#endif -label_BFC01F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC01F30: 10600047 beq $v1, $zero, 0xBFC02050 */ - uint32_t psx_brA_BFC01F30 = cpu->gpr[3]; uint32_t psx_brB_BFC01F30 = cpu->gpr[0]; - psx_taken_BFC01F30 = (psx_brA_BFC01F30 == psx_brB_BFC01F30); - psx_delay_BFC01F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01F34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01F34u); -#endif - if (psx_delay_BFC01F30) { - psx_delay_BFC01F30 = 0; - if (psx_taken_BFC01F30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02050u); - goto label_BFC02050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F38u); - } -label_BFC01F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC01F38: 36220001 ori $v0, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36220001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC01F3C: 14440007 bne $v0, $a0, 0xBFC01F5C */ - uint32_t psx_brA_BFC01F3C = cpu->gpr[2]; uint32_t psx_brB_BFC01F3C = cpu->gpr[4]; - psx_taken_BFC01F3C = (psx_brA_BFC01F3C != psx_brB_BFC01F3C); - psx_delay_BFC01F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC01F40: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F40u); -#endif - if (psx_delay_BFC01F3C) { - psx_delay_BFC01F3C = 0; - if (psx_taken_BFC01F3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F5Cu); - goto label_BFC01F5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F44u); - } -label_BFC01F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC01F44: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F48u); -#endif - /* 0xBFC01F48: 8D4AB064 lw $t2, -20380($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F48u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AB064u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40210u); -#endif - /* 0xBFC01F4C: 00924824 and $t1, $a0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18]; - PGXP_ALU(0x00924824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01F50: 1000005D beq $zero, $zero, 0xBFC020C8 */ - uint32_t psx_brA_BFC01F50 = cpu->gpr[0]; uint32_t psx_brB_BFC01F50 = cpu->gpr[0]; - psx_taken_BFC01F50 = (psx_brA_BFC01F50 == psx_brB_BFC01F50); - psx_delay_BFC01F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC01F54: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F54u); return; } g_debug_last_store_pc = 0xBFC01F54u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F54u); -#endif - if (psx_delay_BFC01F50) { - psx_delay_BFC01F50 = 0; - if (psx_taken_BFC01F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020C8u); - goto label_BFC020C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F58u); - } -label_BFC01F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC01F58: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F58u); -#endif -label_BFC01F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01F5C: 10200011 beq $at, $zero, 0xBFC01FA4 */ - uint32_t psx_brA_BFC01F5C = cpu->gpr[1]; uint32_t psx_brB_BFC01F5C = cpu->gpr[0]; - psx_taken_BFC01F5C = (psx_brA_BFC01F5C == psx_brB_BFC01F5C); - psx_delay_BFC01F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20012u); -#endif - /* 0xBFC01F60: 0091082B sltu $at, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F60u); -#endif - if (psx_delay_BFC01F5C) { - psx_delay_BFC01F5C = 0; - if (psx_taken_BFC01F5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FA4u); - goto label_BFC01FA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F64u); - } -label_BFC01F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC01F64: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F68u); -#endif - /* 0xBFC01F68: 8DADB064 lw $t5, -20380($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F68u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADB064u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20810u); -#endif - /* 0xBFC01F6C: 00915823 subu $t3, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[4] - cpu->gpr[17]; - PGXP_ALU(0x00915823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC01F70: 256CFFFC addiu $t4, $t3, -4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-4)); - PGXP_ALU(0x256CFFFCu, cpu->gpr[12], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC01F74: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC01F78: 06210002 bgez $s1, 0xBFC01F84 */ - uint32_t psx_brA_BFC01F78 = cpu->gpr[17]; - psx_taken_BFC01F78 = ((int32_t)psx_brA_BFC01F78 >= 0); - psx_delay_BFC01F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC01F7C: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F7Cu); -#endif - if (psx_delay_BFC01F78) { - psx_delay_BFC01F78 = 0; - if (psx_taken_BFC01F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F84u); - goto label_BFC01F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F80u); - } -label_BFC01F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01F80: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F80u); -#endif -label_BFC01F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC01F84: 00017083 sra $t6, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00017083u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC01F88: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC01F8C: 01AFC021 addu $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] + cpu->gpr[15]; - PGXP_ALU(0x01AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC01F90: AF0C0004 sw $t4, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F90u); return; } g_debug_last_store_pc = 0xBFC01F90u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAF0C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F94u); -#endif - /* 0xBFC01F94: 8F39B064 lw $t9, -20380($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F94u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39B064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01F98: 1000004B beq $zero, $zero, 0xBFC020C8 */ - uint32_t psx_brA_BFC01F98 = cpu->gpr[0]; uint32_t psx_brB_BFC01F98 = cpu->gpr[0]; - psx_taken_BFC01F98 = (psx_brA_BFC01F98 == psx_brB_BFC01F98); - psx_delay_BFC01F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC01F9C: AF310000 sw $s1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F9Cu); return; } g_debug_last_store_pc = 0xBFC01F9Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAF310000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01F9Cu); -#endif - if (psx_delay_BFC01F98) { - psx_delay_BFC01F98 = 0; - if (psx_taken_BFC01F98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020C8u); - goto label_BFC020C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FA0u); - } -label_BFC01FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20012u); -#endif - /* 0xBFC01FA0: 0091082B sltu $at, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FA0u); -#endif -label_BFC01FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC01FA4: 1020FFE2 beq $at, $zero, 0xBFC01F30 */ - uint32_t psx_brA_BFC01FA4 = cpu->gpr[1]; uint32_t psx_brB_BFC01FA4 = cpu->gpr[0]; - psx_taken_BFC01FA4 = (psx_brA_BFC01FA4 == psx_brB_BFC01FA4); - psx_delay_BFC01FA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01FA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01FA8u); -#endif - if (psx_delay_BFC01FA4) { - psx_delay_BFC01FA4 = 0; - if (psx_taken_BFC01FA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F30u); - goto label_BFC01F30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FACu); - } -label_BFC01FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC01FAC: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FB0u); -#endif - /* 0xBFC01FB0: 8D08B064 lw $t0, -20380($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01FB0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08B064u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC01FB4: 00044882 srl $t1, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] >> 2u; - PGXP_ALU(0x00044882u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC01FB8: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x508u); -#endif - /* 0xBFC01FBC: 010A1821 addu $v1, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[10]; - PGXP_ALU(0x010A1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FC0u); -#endif - /* 0xBFC01FC0: 8C620004 lw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01FC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC01FC4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC01FC8: 16420010 bne $s2, $v0, 0xBFC0200C */ - uint32_t psx_brA_BFC01FC8 = cpu->gpr[18]; uint32_t psx_brB_BFC01FC8 = cpu->gpr[2]; - psx_taken_BFC01FC8 = (psx_brA_BFC01FC8 != psx_brB_BFC01FC8); - psx_delay_BFC01FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC01FCC: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FCCu); -#endif - if (psx_delay_BFC01FC8) { - psx_delay_BFC01FC8 = 0; - if (psx_taken_BFC01FC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0200Cu); - goto label_BFC0200C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FD0u); - } -label_BFC01FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC01FD0: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC01FD4: 1E000007 bgtz $s0, 0xBFC01FF4 */ - uint32_t psx_brA_BFC01FD4 = cpu->gpr[16]; - psx_taken_BFC01FD4 = ((int32_t)psx_brA_BFC01FD4 > 0); - psx_delay_BFC01FD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01FD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01FD8u); -#endif - if (psx_delay_BFC01FD4) { - psx_delay_BFC01FD4 = 0; - if (psx_taken_BFC01FD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FF4u); - goto label_BFC01FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FDCu); - } -label_BFC01FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC01FDC: 0FF006E0 jal 0xBFC01B80 */ - cpu->gpr[31] = 0xBFC01FE4u; /* jal link before delay slot */ - psx_delay_BFC01FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC01FE0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FE0u); -#endif - if (psx_delay_BFC01FDC) { - psx_delay_BFC01FDC = 0; - cpu->gpr[31] = 0xBFC01FE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B80u); - cpu->pc = 0xBFC01B80u; return; - } -label_BFC01FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01FE4: 10400014 beq $v0, $zero, 0xBFC02038 */ - uint32_t psx_brA_BFC01FE4 = cpu->gpr[2]; uint32_t psx_brB_BFC01FE4 = cpu->gpr[0]; - psx_taken_BFC01FE4 = (psx_brA_BFC01FE4 == psx_brB_BFC01FE4); - psx_delay_BFC01FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01FE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC01FE8u); -#endif - if (psx_delay_BFC01FE4) { - psx_delay_BFC01FE4 = 0; - if (psx_taken_BFC01FE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02038u); - goto label_BFC02038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FECu); - } -label_BFC01FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC01FEC: 1000003A beq $zero, $zero, 0xBFC020D8 */ - uint32_t psx_brA_BFC01FEC = cpu->gpr[0]; uint32_t psx_brB_BFC01FEC = cpu->gpr[0]; - psx_taken_BFC01FEC = (psx_brA_BFC01FEC == psx_brB_BFC01FEC); - psx_delay_BFC01FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC01FF0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FF0u); -#endif - if (psx_delay_BFC01FEC) { - psx_delay_BFC01FEC = 0; - if (psx_taken_BFC01FEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020D8u); - goto label_BFC020D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01FF4u); - } -label_BFC01FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC01FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC01FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC01FF4: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FF8u); -#endif - /* 0xBFC01FF8: 8D6BB060 lw $t3, -20384($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -20384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-20384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01FF8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BB060u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC01FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC01FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC01FFC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC01FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02000: 1000000D beq $zero, $zero, 0xBFC02038 */ - uint32_t psx_brA_BFC02000 = cpu->gpr[0]; uint32_t psx_brB_BFC02000 = cpu->gpr[0]; - psx_taken_BFC02000 = (psx_brA_BFC02000 == psx_brB_BFC02000); - psx_delay_BFC02000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC02004: AC2BB064 sw $t3, -20380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02004u); return; } g_debug_last_store_pc = 0xBFC02004u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BB064u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02004u); -#endif - if (psx_delay_BFC02000) { - psx_delay_BFC02000 = 0; - if (psx_taken_BFC02000) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02038u); - goto label_BFC02038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02008u); - } -label_BFC02008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC02008: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02008u); -#endif -label_BFC0200C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0200Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0200C: 11C00008 beq $t6, $zero, 0xBFC02030 */ - uint32_t psx_brA_BFC0200C = cpu->gpr[14]; uint32_t psx_brB_BFC0200C = cpu->gpr[0]; - psx_taken_BFC0200C = (psx_brA_BFC0200C == psx_brB_BFC0200C); - psx_delay_BFC0200C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02010u); -#endif - if (psx_delay_BFC0200C) { - psx_delay_BFC0200C = 0; - if (psx_taken_BFC0200C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02030u); - goto label_BFC02030; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02014u); - } -label_BFC02014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42004u); -#endif - /* 0xBFC02014: 00526824 and $t5, $v0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18]; - PGXP_ALU(0x00526824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC02018: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0201Cu); -#endif - /* 0xBFC0201C: 8F18B064 lw $t8, -20380($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0201Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18B064u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0201Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA010u); -#endif - /* 0xBFC02020: 008D7821 addu $t7, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9000u); -#endif - /* 0xBFC02024: 25EC0004 addiu $t4, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[15] + (4)); - PGXP_ALU(0x25EC0004u, cpu->gpr[12], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02028: 10000003 beq $zero, $zero, 0xBFC02038 */ - uint32_t psx_brA_BFC02028 = cpu->gpr[0]; uint32_t psx_brB_BFC02028 = cpu->gpr[0]; - psx_taken_BFC02028 = (psx_brA_BFC02028 == psx_brB_BFC02028); - psx_delay_BFC02028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0202Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC0202C: AF0C0000 sw $t4, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0202Cu); return; } g_debug_last_store_pc = 0xBFC0202Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAF0C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0202Cu); -#endif - if (psx_delay_BFC02028) { - psx_delay_BFC02028 = 0; - if (psx_taken_BFC02028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02038u); - goto label_BFC02038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02030u); - } -label_BFC02030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02030: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC02034: AC23B064 sw $v1, -20380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02034u); return; } g_debug_last_store_pc = 0xBFC02034u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23B064u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02034u); -#endif -label_BFC02038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC02038: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0203Cu); -#endif - /* 0xBFC0203C: 8F39B064 lw $t9, -20380($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0203Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39B064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02044u); -#endif - /* 0xBFC02044: 8F240000 lw $a0, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02044u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000000u); } - PGXP_LOAD(0x8F240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02048: 1000FFB9 beq $zero, $zero, 0xBFC01F30 */ - uint32_t psx_brA_BFC02048 = cpu->gpr[0]; uint32_t psx_brB_BFC02048 = cpu->gpr[0]; - psx_taken_BFC02048 = (psx_brA_BFC02048 == psx_brB_BFC02048); - psx_delay_BFC02048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0204Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0204C: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0204Cu); -#endif - if (psx_delay_BFC02048) { - psx_delay_BFC02048 = 0; - if (psx_taken_BFC02048) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F30u); - goto label_BFC01F30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02050u); - } -label_BFC02050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC02050: 1244000A beq $s2, $a0, 0xBFC0207C */ - uint32_t psx_brA_BFC02050 = cpu->gpr[18]; uint32_t psx_brB_BFC02050 = cpu->gpr[4]; - psx_taken_BFC02050 = (psx_brA_BFC02050 == psx_brB_BFC02050); - psx_delay_BFC02050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02054u); -#endif - if (psx_delay_BFC02050) { - psx_delay_BFC02050 = 0; - if (psx_taken_BFC02050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0207Cu); - goto label_BFC0207C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02058u); - } -label_BFC02058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC02058: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0205Cu); -#endif - /* 0xBFC0205C: 8D29B064 lw $t1, -20380($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0205Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29B064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0205Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC02060: 00044082 srl $t0, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] >> 2u; - PGXP_ALU(0x00044082u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC02064: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC02068: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC0206C: 256E0004 addiu $t6, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); - PGXP_ALU(0x256E0004u, cpu->gpr[14], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02070: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02074: 1000000E beq $zero, $zero, 0xBFC020B0 */ - uint32_t psx_brA_BFC02074 = cpu->gpr[0]; uint32_t psx_brB_BFC02074 = cpu->gpr[0]; - psx_taken_BFC02074 = (psx_brA_BFC02074 == psx_brB_BFC02074); - psx_delay_BFC02074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC02078: AC2EB064 sw $t6, -20380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02078u); return; } g_debug_last_store_pc = 0xBFC02078u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB064u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02078u); -#endif - if (psx_delay_BFC02074) { - psx_delay_BFC02074 = 0; - if (psx_taken_BFC02074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020B0u); - goto label_BFC020B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0207Cu); - } -label_BFC0207C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0207Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0207C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02080: 1E000007 bgtz $s0, 0xBFC020A0 */ - uint32_t psx_brA_BFC02080 = cpu->gpr[16]; - psx_taken_BFC02080 = ((int32_t)psx_brA_BFC02080 > 0); - psx_delay_BFC02080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02084u); -#endif - if (psx_delay_BFC02080) { - psx_delay_BFC02080 = 0; - if (psx_taken_BFC02080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020A0u); - goto label_BFC020A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02088u); - } -label_BFC02088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02088: 0FF006E0 jal 0xBFC01B80 */ - cpu->gpr[31] = 0xBFC02090u; /* jal link before delay slot */ - psx_delay_BFC02088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0208Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0208C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0208Cu); -#endif - if (psx_delay_BFC02088) { - psx_delay_BFC02088 = 0; - cpu->gpr[31] = 0xBFC02090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01B80u); - cpu->pc = 0xBFC01B80u; return; - } -label_BFC02090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02090: 10400007 beq $v0, $zero, 0xBFC020B0 */ - uint32_t psx_brA_BFC02090 = cpu->gpr[2]; uint32_t psx_brB_BFC02090 = cpu->gpr[0]; - psx_taken_BFC02090 = (psx_brA_BFC02090 == psx_brB_BFC02090); - psx_delay_BFC02090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02094: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02094u); -#endif - if (psx_delay_BFC02090) { - psx_delay_BFC02090 = 0; - if (psx_taken_BFC02090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020B0u); - goto label_BFC020B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02098u); - } -label_BFC02098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02098: 1000000F beq $zero, $zero, 0xBFC020D8 */ - uint32_t psx_brA_BFC02098 = cpu->gpr[0]; uint32_t psx_brB_BFC02098 = cpu->gpr[0]; - psx_taken_BFC02098 = (psx_brA_BFC02098 == psx_brB_BFC02098); - psx_delay_BFC02098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0209C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0209Cu); -#endif - if (psx_delay_BFC02098) { - psx_delay_BFC02098 = 0; - if (psx_taken_BFC02098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020D8u); - goto label_BFC020D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020A0u); - } -label_BFC020A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC020A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC020A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC020A0: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC020A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020A4u); -#endif - /* 0xBFC020A4: 8DADB060 lw $t5, -20384($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -20384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-20384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020A4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADB060u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC020A8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC020A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC020AC: AC2DB064 sw $t5, -20380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020ACu); return; } g_debug_last_store_pc = 0xBFC020ACu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DB064u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020ACu); -#endif -label_BFC020B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC020B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC020B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC020B0: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC020B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020B4u); -#endif - /* 0xBFC020B4: 8DEFB064 lw $t7, -20380($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020B4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFB064u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC020B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC020B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020BCu); -#endif - /* 0xBFC020BC: 8DE40000 lw $a0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000u); } - PGXP_LOAD(0x8DE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC020C0: 1000FF9B beq $zero, $zero, 0xBFC01F30 */ - uint32_t psx_brA_BFC020C0 = cpu->gpr[0]; uint32_t psx_brB_BFC020C0 = cpu->gpr[0]; - psx_taken_BFC020C0 = (psx_brA_BFC020C0 == psx_brB_BFC020C0); - psx_delay_BFC020C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC020C4: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020C4u); -#endif - if (psx_delay_BFC020C0) { - psx_delay_BFC020C0 = 0; - if (psx_taken_BFC020C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01F30u); - goto label_BFC01F30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020C8u); - } -label_BFC020C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC020C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC020C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC020C8: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC020C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020CCu); -#endif - /* 0xBFC020CC: 8C42B064 lw $v0, -20380($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -20380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42B064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC020D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC020D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC020D4: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020D4u); -#endif -label_BFC020D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC020D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC020D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020D8u); -#endif - /* 0xBFC020D8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020DCu); -#endif - /* 0xBFC020DC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020E0u); -#endif - /* 0xBFC020E0: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020E0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020E4u); -#endif - /* 0xBFC020E4: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020E4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC020E8: 03E00008 jr $ra */ - psx_delay_BFC020E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC020EC: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020ECu); -#endif - if (psx_delay_BFC020E8) { - psx_delay_BFC020E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC020F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC020F0u); - int psx_delay_BFC020FC = 0; -label_BFC020F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC020F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC020F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020F0u); -#endif - /* 0xBFC020F0: 8C8EFFFC lw $t6, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC020F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC020F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC020F8: 35CF0001 ori $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x1u; - PGXP_ALU(0x35CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC020F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC020FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC020FC: 03E00008 jr $ra */ - psx_delay_BFC020FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC02100: AC8FFFFC sw $t7, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02100u); return; } g_debug_last_store_pc = 0xBFC02100u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8FFFFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02100u); -#endif - if (psx_delay_BFC020FC) { - psx_delay_BFC020FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02104(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02104u); - int psx_delay_BFC02114 = 0; - int psx_taken_BFC02114 = 0; - int psx_delay_BFC0211C = 0; - int psx_delay_BFC02124 = 0; - int psx_taken_BFC02124 = 0; - int psx_delay_BFC0212C = 0; - int psx_taken_BFC0212C = 0; - int psx_delay_BFC02134 = 0; - int psx_delay_BFC0213C = 0; - int psx_taken_BFC0213C = 0; - int psx_delay_BFC0214C = 0; - int psx_delay_BFC02158 = 0; - int psx_taken_BFC02158 = 0; - int psx_delay_BFC02164 = 0; - int psx_delay_BFC02170 = 0; - int psx_taken_BFC02170 = 0; - int psx_delay_BFC0217C = 0; - int psx_delay_BFC02184 = 0; - int psx_delay_BFC02198 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0211Cu: goto label_BFC0211C; - case 0xBFC02124u: goto label_BFC02124; - case 0xBFC0212Cu: goto label_BFC0212C; - case 0xBFC02134u: goto label_BFC02134; - case 0xBFC0213Cu: goto label_BFC0213C; - case 0xBFC02144u: goto label_BFC02144; - case 0xBFC02148u: goto label_BFC02148; - case 0xBFC02154u: goto label_BFC02154; - case 0xBFC02160u: goto label_BFC02160; - case 0xBFC0216Cu: goto label_BFC0216C; - case 0xBFC02178u: goto label_BFC02178; - case 0xBFC02184u: goto label_BFC02184; - case 0xBFC0218Cu: goto label_BFC0218C; - case 0xBFC02190u: goto label_BFC02190; - default: break; - } - } -label_BFC02104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02104: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC02108: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02108u); return; } g_debug_last_store_pc = 0xBFC02108u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0210Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0210C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0210Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02110: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02110u); return; } g_debug_last_store_pc = 0xBFC02110u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC02114: 16000005 bne $s0, $zero, 0xBFC0212C */ - uint32_t psx_brA_BFC02114 = cpu->gpr[16]; uint32_t psx_brB_BFC02114 = cpu->gpr[0]; - psx_taken_BFC02114 = (psx_brA_BFC02114 != psx_brB_BFC02114); - psx_delay_BFC02114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC02118: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02118u); -#endif - if (psx_delay_BFC02114) { - psx_delay_BFC02114 = 0; - if (psx_taken_BFC02114) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0212Cu); - goto label_BFC0212C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0211Cu); - } -label_BFC0211C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0211Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0211C: 0FF00797 jal 0xBFC01E5C */ - cpu->gpr[31] = 0xBFC02124u; /* jal link before delay slot */ - psx_delay_BFC0211C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC02120: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02120u); -#endif - if (psx_delay_BFC0211C) { - psx_delay_BFC0211C = 0; - cpu->gpr[31] = 0xBFC02124u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E5Cu); - cpu->pc = 0xBFC01E5Cu; return; - } -label_BFC02124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02124: 10000019 beq $zero, $zero, 0xBFC0218C */ - uint32_t psx_brA_BFC02124 = cpu->gpr[0]; uint32_t psx_brB_BFC02124 = cpu->gpr[0]; - psx_taken_BFC02124 = (psx_brA_BFC02124 == psx_brB_BFC02124); - psx_delay_BFC02124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC02128: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02128u); return; } g_debug_last_store_pc = 0xBFC02128u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02128u); -#endif - if (psx_delay_BFC02124) { - psx_delay_BFC02124 = 0; - if (psx_taken_BFC02124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0218Cu); - goto label_BFC0218C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0212Cu); - } -label_BFC0212C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0212Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0212C: 14C00006 bne $a2, $zero, 0xBFC02148 */ - uint32_t psx_brA_BFC0212C = cpu->gpr[6]; uint32_t psx_brB_BFC0212C = cpu->gpr[0]; - psx_taken_BFC0212C = (psx_brA_BFC0212C != psx_brB_BFC0212C); - psx_delay_BFC0212C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02130: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02130u); -#endif - if (psx_delay_BFC0212C) { - psx_delay_BFC0212C = 0; - if (psx_taken_BFC0212C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02148u); - goto label_BFC02148; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02134u); - } -label_BFC02134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02134: 0FF0083C jal 0xBFC020F0 */ - cpu->gpr[31] = 0xBFC0213Cu; /* jal link before delay slot */ - psx_delay_BFC02134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02138: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02138u); -#endif - if (psx_delay_BFC02134) { - psx_delay_BFC02134 = 0; - cpu->gpr[31] = 0xBFC0213Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020F0u); - cpu->pc = 0xBFC020F0u; return; - } -label_BFC0213C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0213Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0213C: 10000014 beq $zero, $zero, 0xBFC02190 */ - uint32_t psx_brA_BFC0213C = cpu->gpr[0]; uint32_t psx_brB_BFC0213C = cpu->gpr[0]; - psx_taken_BFC0213C = (psx_brA_BFC0213C == psx_brB_BFC0213C); - psx_delay_BFC0213C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02140u); -#endif - /* 0xBFC02140: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02140u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02140u); -#endif - if (psx_delay_BFC0213C) { - psx_delay_BFC0213C = 0; - if (psx_taken_BFC0213C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02190u); - goto label_BFC02190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02144u); - } -label_BFC02144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02144: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02144u); -#endif -label_BFC02148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC02148: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0214Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0214C: 0FF00723 jal 0xBFC01C8C */ - cpu->gpr[31] = 0xBFC02154u; /* jal link before delay slot */ - psx_delay_BFC0214C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC02150: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02150u); return; } g_debug_last_store_pc = 0xBFC02150u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02150u); -#endif - if (psx_delay_BFC0214C) { - psx_delay_BFC0214C = 0; - cpu->gpr[31] = 0xBFC02154u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01C8Cu); - cpu->pc = 0xBFC01C8Cu; return; - } -label_BFC02154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02154u); -#endif - /* 0xBFC02154: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02154u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02158: 1440000C bne $v0, $zero, 0xBFC0218C */ - uint32_t psx_brA_BFC02158 = cpu->gpr[2]; uint32_t psx_brB_BFC02158 = cpu->gpr[0]; - psx_taken_BFC02158 = (psx_brA_BFC02158 != psx_brB_BFC02158); - psx_delay_BFC02158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0215Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0215C: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0215Cu); return; } g_debug_last_store_pc = 0xBFC0215Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0215Cu); -#endif - if (psx_delay_BFC02158) { - psx_delay_BFC02158 = 0; - if (psx_taken_BFC02158) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0218Cu); - goto label_BFC0218C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02160u); - } -label_BFC02160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC02160: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02164: 0FF00797 jal 0xBFC01E5C */ - cpu->gpr[31] = 0xBFC0216Cu; /* jal link before delay slot */ - psx_delay_BFC02164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC02168: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02168u); return; } g_debug_last_store_pc = 0xBFC02168u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02168u); -#endif - if (psx_delay_BFC02164) { - psx_delay_BFC02164 = 0; - cpu->gpr[31] = 0xBFC0216Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E5Cu); - cpu->pc = 0xBFC01E5Cu; return; - } -label_BFC0216C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0216Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0216Cu); -#endif - /* 0xBFC0216C: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0216Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02170: 10400006 beq $v0, $zero, 0xBFC0218C */ - uint32_t psx_brA_BFC02170 = cpu->gpr[2]; uint32_t psx_brB_BFC02170 = cpu->gpr[0]; - psx_taken_BFC02170 = (psx_brA_BFC02170 == psx_brB_BFC02170); - psx_delay_BFC02170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC02174: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02174u); return; } g_debug_last_store_pc = 0xBFC02174u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02174u); -#endif - if (psx_delay_BFC02170) { - psx_delay_BFC02170 = 0; - if (psx_taken_BFC02170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0218Cu); - goto label_BFC0218C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02178u); - } -label_BFC02178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02178u); -#endif - /* 0xBFC02178: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02178u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0217Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0217C: 0FF006A4 jal 0xBFC01A90 */ - cpu->gpr[31] = 0xBFC02184u; /* jal link before delay slot */ - psx_delay_BFC0217C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02180: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02180u); -#endif - if (psx_delay_BFC0217C) { - psx_delay_BFC0217C = 0; - cpu->gpr[31] = 0xBFC02184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A90u); - cpu->pc = 0xBFC01A90u; return; - } -label_BFC02184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02184: 0FF0083C jal 0xBFC020F0 */ - cpu->gpr[31] = 0xBFC0218Cu; /* jal link before delay slot */ - psx_delay_BFC02184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02188: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02188u); -#endif - if (psx_delay_BFC02184) { - psx_delay_BFC02184 = 0; - cpu->gpr[31] = 0xBFC0218Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020F0u); - cpu->pc = 0xBFC020F0u; return; - } -label_BFC0218C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0218Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0218Cu); -#endif - /* 0xBFC0218C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0218Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0218Cu); -#endif -label_BFC02190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02190u); -#endif - /* 0xBFC02190: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02190u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02194u); -#endif - /* 0xBFC02194: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02194u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02198: 03E00008 jr $ra */ - psx_delay_BFC02198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0219C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0219Cu); -#endif - if (psx_delay_BFC02198) { - psx_delay_BFC02198 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC021A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC021A0u); - int psx_delay_BFC021B8 = 0; - int psx_delay_BFC021C4 = 0; - int psx_taken_BFC021C4 = 0; - int psx_delay_BFC021CC = 0; - int psx_taken_BFC021CC = 0; - int psx_delay_BFC021D8 = 0; - int psx_delay_BFC021F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC021C0u: goto label_BFC021C0; - case 0xBFC021CCu: goto label_BFC021CC; - case 0xBFC021D4u: goto label_BFC021D4; - case 0xBFC021E0u: goto label_BFC021E0; - case 0xBFC021ECu: goto label_BFC021EC; - default: break; - } - } -label_BFC021A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC021A0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC021A4: 00A30019 multu $a1, $v1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[5] * (uint64_t)cpu->gpr[3]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[5])); -#endif - PGXP_MULDIV(0x00A30019u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0xBFC021A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC021A8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC021AC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021ACu); return; } g_debug_last_store_pc = 0xBFC021ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC021B0: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC021B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC021B4: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC021B8: 0FF00797 jal 0xBFC01E5C */ - cpu->gpr[31] = 0xBFC021C0u; /* jal link before delay slot */ - psx_delay_BFC021B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC021BC: AFA60018 sw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021BCu); return; } g_debug_last_store_pc = 0xBFC021BCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021BCu); -#endif - if (psx_delay_BFC021B8) { - psx_delay_BFC021B8 = 0; - cpu->gpr[31] = 0xBFC021C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E5Cu); - cpu->pc = 0xBFC01E5Cu; return; - } -label_BFC021C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021C0u); -#endif - /* 0xBFC021C0: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021C0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC021C4: 14400003 bne $v0, $zero, 0xBFC021D4 */ - uint32_t psx_brA_BFC021C4 = cpu->gpr[2]; uint32_t psx_brB_BFC021C4 = cpu->gpr[0]; - psx_taken_BFC021C4 = (psx_brA_BFC021C4 != psx_brB_BFC021C4); - psx_delay_BFC021C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC021C8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021C8u); -#endif - if (psx_delay_BFC021C4) { - psx_delay_BFC021C4 = 0; - if (psx_taken_BFC021C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC021D4u); - goto label_BFC021D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC021CCu); - } -label_BFC021CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC021CC: 10000007 beq $zero, $zero, 0xBFC021EC */ - uint32_t psx_brA_BFC021CC = cpu->gpr[0]; uint32_t psx_brB_BFC021CC = cpu->gpr[0]; - psx_taken_BFC021CC = (psx_brA_BFC021CC == psx_brB_BFC021CC); - psx_delay_BFC021CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC021D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021D0u); -#endif - if (psx_delay_BFC021CC) { - psx_delay_BFC021CC = 0; - if (psx_taken_BFC021CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC021ECu); - goto label_BFC021EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC021D4u); - } -label_BFC021D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC021D4: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC021D8: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC021E0u; /* jal link before delay slot */ - psx_delay_BFC021D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC021DC: AFA4001C sw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021DCu); return; } g_debug_last_store_pc = 0xBFC021DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021DCu); -#endif - if (psx_delay_BFC021D8) { - psx_delay_BFC021D8 = 0; - cpu->gpr[31] = 0xBFC021E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC021E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021E0u); -#endif - /* 0xBFC021E0: 8FA4001C lw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC021E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC021E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC021E8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021E8u); -#endif -label_BFC021EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC021ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC021ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021ECu); -#endif - /* 0xBFC021EC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC021F0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC021F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC021F4: 03E00008 jr $ra */ - psx_delay_BFC021F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC021F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC021F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC021F8u); -#endif - if (psx_delay_BFC021F4) { - psx_delay_BFC021F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02200(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02200u); - int psx_delay_BFC02228 = 0; -label_BFC02200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC02200: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02204u); -#endif - /* 0xBFC02204: 8C639010 lw $v1, -28656($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02204u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02208: 3C0141C6 lui $at, 0x41C6 */ - cpu->gpr[1] = 0x41C60000u; - PGXP_ALU(0x3C0141C6u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0220C: 34214E6D ori $at, $at, 0x4E6D */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4E6Du; - PGXP_ALU(0x34214E6Du, cpu->gpr[1], _pgx1, 0x4E6Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC02210: 00610019 multu $v1, $at */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[1]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00610019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02214: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC02218: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0221C: 24633039 addiu $v1, $v1, 12345 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (12345)); - PGXP_ALU(0x24633039u, cpu->gpr[3], _pgx1, 0x00003039u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC02220: 00031402 srl $v0, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] >> 16u; - PGXP_ALU(0x00031402u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02224: 30427FFF andi $v0, $v0, 0x7FFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7FFFu; - PGXP_ALU(0x30427FFFu, cpu->gpr[2], _pgx1, 0x7FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02228: 03E00008 jr $ra */ - psx_delay_BFC02228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0222Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0222C: AC239010 sw $v1, -28656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0222Cu); return; } g_debug_last_store_pc = 0xBFC0222Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0222Cu); -#endif - if (psx_delay_BFC02228) { - psx_delay_BFC02228 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02230(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02230u); - int psx_delay_BFC02234 = 0; -label_BFC02230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02230: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02234: 03E00008 jr $ra */ - psx_delay_BFC02234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC02238: AC249010 sw $a0, -28656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02238u); return; } g_debug_last_store_pc = 0xBFC02238u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02238u); -#endif - if (psx_delay_BFC02234) { - psx_delay_BFC02234 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02240(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02240u); - int psx_delay_BFC02274 = 0; -label_BFC02240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000010u); -#endif - /* 0xBFC02240: AC9F0000 sw $ra, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02240u); return; } g_debug_last_store_pc = 0xBFC02240u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC9F0000u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000010u); -#endif - /* 0xBFC02244: AC9C002C sw $gp, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02244u); return; } g_debug_last_store_pc = 0xBFC02244u; cpu->write_word(psx_addr, cpu->gpr[28]); } - PGXP_STORE(0xAC9C002Cu, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC02248: AC9D0004 sw $sp, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02248u); return; } g_debug_last_store_pc = 0xBFC02248u; cpu->write_word(psx_addr, cpu->gpr[29]); } - PGXP_STORE(0xAC9D0004u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0224Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000010u); -#endif - /* 0xBFC0224C: AC9E0008 sw $fp, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0224Cu); return; } g_debug_last_store_pc = 0xBFC0224Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAC9E0008u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0224Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC02250: AC90000C sw $s0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02250u); return; } g_debug_last_store_pc = 0xBFC02250u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC90000Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC02254: AC910010 sw $s1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02254u); return; } g_debug_last_store_pc = 0xBFC02254u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAC910010u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC02258: AC920014 sw $s2, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02258u); return; } g_debug_last_store_pc = 0xBFC02258u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC920014u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80010u); -#endif - /* 0xBFC0225C: AC930018 sw $s3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0225Cu); return; } g_debug_last_store_pc = 0xBFC0225Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAC930018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100010u); -#endif - /* 0xBFC02260: AC94001C sw $s4, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02260u); return; } g_debug_last_store_pc = 0xBFC02260u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAC94001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200010u); -#endif - /* 0xBFC02264: AC950020 sw $s5, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02264u); return; } g_debug_last_store_pc = 0xBFC02264u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAC950020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC02268: AC960024 sw $s6, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02268u); return; } g_debug_last_store_pc = 0xBFC02268u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAC960024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0226Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800010u); -#endif - /* 0xBFC0226C: AC970028 sw $s7, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0226Cu); return; } g_debug_last_store_pc = 0xBFC0226Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAC970028u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0226Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02270: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02274: 03E00008 jr $ra */ - psx_delay_BFC02274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02278u); -#endif - if (psx_delay_BFC02274) { - psx_delay_BFC02274 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0227C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0227Cu); - int psx_delay_BFC022B0 = 0; -label_BFC0227C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0227Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0227Cu); -#endif - /* 0xBFC0227C: 8C9F0000 lw $ra, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0227Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x10u); } - PGXP_LOAD(0x8C9F0000u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02280u); -#endif - /* 0xBFC02280: 8C9C002C lw $gp, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02280u); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x10u); } - PGXP_LOAD(0x8C9C002Cu, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02284u); -#endif - /* 0xBFC02284: 8C9D0004 lw $sp, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02284u); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x10u); } - PGXP_LOAD(0x8C9D0004u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02288u); -#endif - /* 0xBFC02288: 8C9E0008 lw $fp, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02288u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x10u); } - PGXP_LOAD(0x8C9E0008u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0228Cu); -#endif - /* 0xBFC0228C: 8C90000C lw $s0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0228Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10u); } - PGXP_LOAD(0x8C90000Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0228Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02290u); -#endif - /* 0xBFC02290: 8C910010 lw $s1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02290u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } - PGXP_LOAD(0x8C910010u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02294u); -#endif - /* 0xBFC02294: 8C920014 lw $s2, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02294u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } - PGXP_LOAD(0x8C920014u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02298u); -#endif - /* 0xBFC02298: 8C930018 lw $s3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02298u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x10u); } - PGXP_LOAD(0x8C930018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0229Cu); -#endif - /* 0xBFC0229C: 8C94001C lw $s4, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0229Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x10u); } - PGXP_LOAD(0x8C94001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0229Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022A0u); -#endif - /* 0xBFC022A0: 8C950020 lw $s5, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC022A0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } - PGXP_LOAD(0x8C950020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022A4u); -#endif - /* 0xBFC022A4: 8C960024 lw $s6, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC022A4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x10u); } - PGXP_LOAD(0x8C960024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022A8u); -#endif - /* 0xBFC022A8: 8C970028 lw $s7, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC022A8u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x10u); } - PGXP_LOAD(0x8C970028u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC022AC: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC022B0: 03E00008 jr $ra */ - psx_delay_BFC022B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC022B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC022B4u); -#endif - if (psx_delay_BFC022B0) { - psx_delay_BFC022B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; psx_restore_state_escape(); return; /* longjmp-return */ - } -} - -void SCPH1001_func_1FC022C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC022C0u); - int psx_delay_BFC022E0 = 0; - int psx_taken_BFC022E0 = 0; - int psx_delay_BFC022E8 = 0; - int psx_taken_BFC022E8 = 0; - int psx_delay_BFC022F4 = 0; - int psx_taken_BFC022F4 = 0; - int psx_delay_BFC022FC = 0; - int psx_delay_BFC02304 = 0; - int psx_taken_BFC02304 = 0; - int psx_delay_BFC0231C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC022E8u: goto label_BFC022E8; - case 0xBFC022F0u: goto label_BFC022F0; - case 0xBFC022FCu: goto label_BFC022FC; - case 0xBFC02304u: goto label_BFC02304; - case 0xBFC0230Cu: goto label_BFC0230C; - case 0xBFC02310u: goto label_BFC02310; - case 0xBFC02314u: goto label_BFC02314; - default: break; - } - } -label_BFC022C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC022C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC022C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC022C0: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC022C4: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC022C8: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC022CC: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC022CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC022D0: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022D4u); -#endif - /* 0xBFC022D4: 8042DDB1 lb $v0, -8783($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8783; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-8783)), 2, 0x4u); - PGXP_LOAD(0x8042DDB1u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC022D8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC022DC: 304F0004 andi $t7, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x304F0004u, cpu->gpr[15], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC022E0: 11E00003 beq $t7, $zero, 0xBFC022F0 */ - uint32_t psx_brA_BFC022E0 = cpu->gpr[15]; uint32_t psx_brB_BFC022E0 = cpu->gpr[0]; - psx_taken_BFC022E0 = (psx_brA_BFC022E0 == psx_brB_BFC022E0); - psx_delay_BFC022E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC022E4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC022E4u); return; } g_debug_last_store_pc = 0xBFC022E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022E4u); -#endif - if (psx_delay_BFC022E0) { - psx_delay_BFC022E0 = 0; - if (psx_taken_BFC022E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022F0u); - goto label_BFC022F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022E8u); - } -label_BFC022E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC022E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC022E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC022E8: 1000000A beq $zero, $zero, 0xBFC02314 */ - uint32_t psx_brA_BFC022E8 = cpu->gpr[0]; uint32_t psx_brB_BFC022E8 = cpu->gpr[0]; - psx_taken_BFC022E8 = (psx_brA_BFC022E8 == psx_brB_BFC022E8); - psx_delay_BFC022E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC022EC: 2483FFD0 addiu $v1, $a0, -48 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] + (-48)); - PGXP_ALU(0x2483FFD0u, cpu->gpr[3], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022ECu); -#endif - if (psx_delay_BFC022E8) { - psx_delay_BFC022E8 = 0; - if (psx_taken_BFC022E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02314u); - goto label_BFC02314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022F0u); - } -label_BFC022F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC022F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC022F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC022F0: 30580003 andi $t8, $v0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u; - PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC022F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC022F4: 13000006 beq $t8, $zero, 0xBFC02310 */ - uint32_t psx_brA_BFC022F4 = cpu->gpr[24]; uint32_t psx_brB_BFC022F4 = cpu->gpr[0]; - psx_taken_BFC022F4 = (psx_brA_BFC022F4 == psx_brB_BFC022F4); - psx_delay_BFC022F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC022F8: 3C030098 lui $v1, 0x98 */ - cpu->gpr[3] = 0x00980000u; - PGXP_ALU(0x3C030098u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC022F8u); -#endif - if (psx_delay_BFC022F4) { - psx_delay_BFC022F4 = 0; - if (psx_taken_BFC022F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02310u); - goto label_BFC02310; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022FCu); - } -label_BFC022FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC022FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC022FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC022FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC022FC: 0FF00BB7 jal 0xBFC02EDC */ - cpu->gpr[31] = 0xBFC02304u; /* jal link before delay slot */ - psx_delay_BFC022FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02300: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02300u); -#endif - if (psx_delay_BFC022FC) { - psx_delay_BFC022FC = 0; - cpu->gpr[31] = 0xBFC02304u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EDCu); - cpu->pc = 0xBFC02EDCu; return; - } -label_BFC02304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02304: 10000003 beq $zero, $zero, 0xBFC02314 */ - uint32_t psx_brA_BFC02304 = cpu->gpr[0]; uint32_t psx_brB_BFC02304 = cpu->gpr[0]; - psx_taken_BFC02304 = (psx_brA_BFC02304 == psx_brB_BFC02304); - psx_delay_BFC02304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC02308: 2443FFA9 addiu $v1, $v0, -87 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (-87)); - PGXP_ALU(0x2443FFA9u, cpu->gpr[3], _pgx1, 0xFFFFFFA9u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02308u); -#endif - if (psx_delay_BFC02304) { - psx_delay_BFC02304 = 0; - if (psx_taken_BFC02304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02314u); - goto label_BFC02314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0230Cu); - } -label_BFC0230C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0230Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0230C: 3C030098 lui $v1, 0x98 */ - cpu->gpr[3] = 0x00980000u; - PGXP_ALU(0x3C030098u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0230Cu); -#endif -label_BFC02310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC02310: 3463967F ori $v1, $v1, 0x967F */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x967Fu; - PGXP_ALU(0x3463967Fu, cpu->gpr[3], _pgx1, 0x967Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02310u); -#endif -label_BFC02314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02314u); -#endif - /* 0xBFC02314: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02314u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02318: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0231C: 03E00008 jr $ra */ - psx_delay_BFC0231C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02320: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02320u); -#endif - if (psx_delay_BFC0231C) { - psx_delay_BFC0231C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02590(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02590u); - int psx_delay_BFC02598 = 0; - int psx_delay_BFC025A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC025A0u: goto label_BFC025A0; - default: break; - } - } -label_BFC02590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02590: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02594: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02594u); return; } g_debug_last_store_pc = 0xBFC02594u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02598: 0FF008C9 jal 0xBFC02324 */ - cpu->gpr[31] = 0xBFC025A0u; /* jal link before delay slot */ - psx_delay_BFC02598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0259Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0259C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0259Cu); -#endif - if (psx_delay_BFC02598) { - psx_delay_BFC02598 = 0; - cpu->gpr[31] = 0xBFC025A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02324u); - cpu->pc = 0xBFC02324u; return; - } -label_BFC025A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC025A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC025A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025A0u); -#endif - /* 0xBFC025A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC025A4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC025A8: 03E00008 jr $ra */ - psx_delay_BFC025A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC025AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC025ACu); -#endif - if (psx_delay_BFC025A8) { - psx_delay_BFC025A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC025B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC025B0u); - int psx_delay_BFC025D0 = 0; - int psx_taken_BFC025D0 = 0; - int psx_delay_BFC025D8 = 0; - int psx_taken_BFC025D8 = 0; - int psx_delay_BFC02604 = 0; - int psx_taken_BFC02604 = 0; - int psx_delay_BFC02628 = 0; - int psx_taken_BFC02628 = 0; - int psx_delay_BFC02630 = 0; - int psx_taken_BFC02630 = 0; - int psx_delay_BFC02638 = 0; - int psx_taken_BFC02638 = 0; - int psx_delay_BFC02644 = 0; - int psx_taken_BFC02644 = 0; - int psx_delay_BFC02654 = 0; - int psx_taken_BFC02654 = 0; - int psx_delay_BFC02668 = 0; - int psx_taken_BFC02668 = 0; - int psx_delay_BFC02674 = 0; - int psx_taken_BFC02674 = 0; - int psx_delay_BFC0267C = 0; - int psx_taken_BFC0267C = 0; - int psx_delay_BFC02684 = 0; - int psx_taken_BFC02684 = 0; - int psx_delay_BFC02694 = 0; - int psx_taken_BFC02694 = 0; - int psx_delay_BFC026A4 = 0; - int psx_taken_BFC026A4 = 0; - int psx_delay_BFC026AC = 0; - int psx_delay_BFC026B8 = 0; - int psx_taken_BFC026B8 = 0; - int psx_delay_BFC026D0 = 0; - int psx_delay_BFC026DC = 0; - int psx_taken_BFC026DC = 0; - int psx_delay_BFC026F8 = 0; - int psx_delay_BFC02704 = 0; - int psx_taken_BFC02704 = 0; - int psx_delay_BFC02730 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC025D8u: goto label_BFC025D8; - case 0xBFC025E0u: goto label_BFC025E0; - case 0xBFC0260Cu: goto label_BFC0260C; - case 0xBFC02630u: goto label_BFC02630; - case 0xBFC02638u: goto label_BFC02638; - case 0xBFC02640u: goto label_BFC02640; - case 0xBFC02644u: goto label_BFC02644; - case 0xBFC0264Cu: goto label_BFC0264C; - case 0xBFC02654u: goto label_BFC02654; - case 0xBFC0265Cu: goto label_BFC0265C; - case 0xBFC02670u: goto label_BFC02670; - case 0xBFC0267Cu: goto label_BFC0267C; - case 0xBFC02684u: goto label_BFC02684; - case 0xBFC0268Cu: goto label_BFC0268C; - case 0xBFC0269Cu: goto label_BFC0269C; - case 0xBFC026ACu: goto label_BFC026AC; - case 0xBFC026B4u: goto label_BFC026B4; - case 0xBFC026C0u: goto label_BFC026C0; - case 0xBFC026C8u: goto label_BFC026C8; - case 0xBFC026D0u: goto label_BFC026D0; - case 0xBFC026D8u: goto label_BFC026D8; - case 0xBFC026E4u: goto label_BFC026E4; - case 0xBFC02700u: goto label_BFC02700; - case 0xBFC0270Cu: goto label_BFC0270C; - case 0xBFC02720u: goto label_BFC02720; - default: break; - } - } -label_BFC025B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC025B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC025B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC025B0: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC025B4: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025B4u); return; } g_debug_last_store_pc = 0xBFC025B4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC025B8: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025B8u); return; } g_debug_last_store_pc = 0xBFC025B8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC025BC: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC025C0: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025C0u); return; } g_debug_last_store_pc = 0xBFC025C0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC025C4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025C4u); return; } g_debug_last_store_pc = 0xBFC025C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC025C8: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC025CC: AFA50044 sw $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025CCu); return; } g_debug_last_store_pc = 0xBFC025CCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC025D0: 16200003 bne $s1, $zero, 0xBFC025E0 */ - uint32_t psx_brA_BFC025D0 = cpu->gpr[17]; uint32_t psx_brB_BFC025D0 = cpu->gpr[0]; - psx_taken_BFC025D0 = (psx_brA_BFC025D0 != psx_brB_BFC025D0); - psx_delay_BFC025D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC025D4: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025D4u); -#endif - if (psx_delay_BFC025D0) { - psx_delay_BFC025D0 = 0; - if (psx_taken_BFC025D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC025E0u); - goto label_BFC025E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC025D8u); - } -label_BFC025D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC025D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC025D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC025D8: 10000051 beq $zero, $zero, 0xBFC02720 */ - uint32_t psx_brA_BFC025D8 = cpu->gpr[0]; uint32_t psx_brB_BFC025D8 = cpu->gpr[0]; - psx_taken_BFC025D8 = (psx_brA_BFC025D8 == psx_brB_BFC025D8); - psx_delay_BFC025D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC025DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025DCu); -#endif - if (psx_delay_BFC025D8) { - psx_delay_BFC025D8 = 0; - if (psx_taken_BFC025D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02720u); - goto label_BFC02720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC025E0u); - } -label_BFC025E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC025E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC025E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC025E0: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC025E0u); return; } g_debug_last_store_pc = 0xBFC025E0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025E4u); -#endif - /* 0xBFC025E4: 82240000 lb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 4, 0x20000u); - PGXP_LOAD(0x82240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC025E8: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC025E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC025EC: 2442DDB0 addiu $v0, $v0, -8784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-8784)); - PGXP_ALU(0x2442DDB0u, cpu->gpr[2], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC025F0: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC025F4: 004E7821 addu $t7, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025F8u); -#endif - /* 0xBFC025F8: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC025F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC025FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC025FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC025FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC02600: 33190008 andi $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u; - PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC02604: 1320000A beq $t9, $zero, 0xBFC02630 */ - uint32_t psx_brA_BFC02604 = cpu->gpr[25]; uint32_t psx_brB_BFC02604 = cpu->gpr[0]; - psx_taken_BFC02604 = (psx_brA_BFC02604 == psx_brB_BFC02604); - psx_delay_BFC02604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC02608: 2A610002 slti $at, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0); - PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02608u); -#endif - if (psx_delay_BFC02604) { - psx_delay_BFC02604 = 0; - if (psx_taken_BFC02604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02630u); - goto label_BFC02630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0260Cu); - } -label_BFC0260C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0260Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0260Cu); -#endif - /* 0xBFC0260C: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC02610: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC02614: 308800FF andi $t0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC02618: 00484821 addu $t1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0261Cu); -#endif - /* 0xBFC0261C: 812A0001 lb $t2, 1($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 1; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (1)), 10, 0x200u); - PGXP_LOAD(0x812A0001u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC02624: 314B0008 andi $t3, $t2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u; - PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC02628: 1560FFF8 bne $t3, $zero, 0xBFC0260C */ - uint32_t psx_brA_BFC02628 = cpu->gpr[11]; uint32_t psx_brB_BFC02628 = cpu->gpr[0]; - psx_taken_BFC02628 = (psx_brA_BFC02628 != psx_brB_BFC02628); - psx_delay_BFC02628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC0262C: 2A610002 slti $at, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0); - PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0262Cu); -#endif - if (psx_delay_BFC02628) { - psx_delay_BFC02628 = 0; - if (psx_taken_BFC02628) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0260Cu); - goto label_BFC0260C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02630u); - } -label_BFC02630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02630: 14200003 bne $at, $zero, 0xBFC02640 */ - uint32_t psx_brA_BFC02630 = cpu->gpr[1]; uint32_t psx_brB_BFC02630 = cpu->gpr[0]; - psx_taken_BFC02630 = (psx_brA_BFC02630 != psx_brB_BFC02630); - psx_delay_BFC02630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC02634: 2A610025 slti $at, $s3, 37 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (37) ? 1 : 0); - PGXP_ALU(0x2A610025u, cpu->gpr[1], _pgx1, 0x0025u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02634u); -#endif - if (psx_delay_BFC02630) { - psx_delay_BFC02630 = 0; - if (psx_taken_BFC02630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02640u); - goto label_BFC02640; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02638u); - } -label_BFC02638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02638: 14200002 bne $at, $zero, 0xBFC02644 */ - uint32_t psx_brA_BFC02638 = cpu->gpr[1]; uint32_t psx_brB_BFC02638 = cpu->gpr[0]; - psx_taken_BFC02638 = (psx_brA_BFC02638 != psx_brB_BFC02638); - psx_delay_BFC02638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0263Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0263C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0263Cu); -#endif - if (psx_delay_BFC02638) { - psx_delay_BFC02638 = 0; - if (psx_taken_BFC02638) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02644u); - goto label_BFC02644; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02640u); - } -label_BFC02640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02640: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02640u); -#endif -label_BFC02644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02644: 16600003 bne $s3, $zero, 0xBFC02654 */ - uint32_t psx_brA_BFC02644 = cpu->gpr[19]; uint32_t psx_brB_BFC02644 = cpu->gpr[0]; - psx_taken_BFC02644 = (psx_brA_BFC02644 != psx_brB_BFC02644); - psx_delay_BFC02644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02648: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02648u); -#endif - if (psx_delay_BFC02644) { - psx_delay_BFC02644 = 0; - if (psx_taken_BFC02644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02654u); - goto label_BFC02654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0264Cu); - } -label_BFC0264C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0264Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0264Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0264Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0264C: 2413000A addiu $s3, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2413000Au, cpu->gpr[19], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0264Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02650: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02650u); -#endif -label_BFC02654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC02654: 14810015 bne $a0, $at, 0xBFC026AC */ - uint32_t psx_brA_BFC02654 = cpu->gpr[4]; uint32_t psx_brB_BFC02654 = cpu->gpr[1]; - psx_taken_BFC02654 = (psx_brA_BFC02654 != psx_brB_BFC02654); - psx_delay_BFC02654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02658u); -#endif - if (psx_delay_BFC02654) { - psx_delay_BFC02654 = 0; - if (psx_taken_BFC02654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026ACu); - goto label_BFC026AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0265Cu); - } -label_BFC0265C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0265Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0265Cu); -#endif - /* 0xBFC0265C: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02660: 24010042 addiu $at, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24010042u, cpu->gpr[1], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC02664: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02668: 1041000C beq $v0, $at, 0xBFC0269C */ - uint32_t psx_brA_BFC02668 = cpu->gpr[2]; uint32_t psx_brB_BFC02668 = cpu->gpr[1]; - psx_taken_BFC02668 = (psx_brA_BFC02668 == psx_brB_BFC02668); - psx_delay_BFC02668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0266C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0266Cu); -#endif - if (psx_delay_BFC02668) { - psx_delay_BFC02668 = 0; - if (psx_taken_BFC02668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0269Cu); - goto label_BFC0269C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02670u); - } -label_BFC02670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02670: 24010058 addiu $at, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24010058u, cpu->gpr[1], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02674: 10410005 beq $v0, $at, 0xBFC0268C */ - uint32_t psx_brA_BFC02674 = cpu->gpr[2]; uint32_t psx_brB_BFC02674 = cpu->gpr[1]; - psx_taken_BFC02674 = (psx_brA_BFC02674 == psx_brB_BFC02674); - psx_delay_BFC02674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02678: 24010062 addiu $at, $zero, 98 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (98)); - PGXP_ALU(0x24010062u, cpu->gpr[1], _pgx1, 0x00000062u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02678u); -#endif - if (psx_delay_BFC02674) { - psx_delay_BFC02674 = 0; - if (psx_taken_BFC02674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0268Cu); - goto label_BFC0268C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0267Cu); - } -label_BFC0267C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0267Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0267C: 10410007 beq $v0, $at, 0xBFC0269C */ - uint32_t psx_brA_BFC0267C = cpu->gpr[2]; uint32_t psx_brB_BFC0267C = cpu->gpr[1]; - psx_taken_BFC0267C = (psx_brA_BFC0267C == psx_brB_BFC0267C); - psx_delay_BFC0267C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02680: 24010078 addiu $at, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24010078u, cpu->gpr[1], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02680u); -#endif - if (psx_delay_BFC0267C) { - psx_delay_BFC0267C = 0; - if (psx_taken_BFC0267C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0269Cu); - goto label_BFC0269C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02684u); - } -label_BFC02684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02684: 14410012 bne $v0, $at, 0xBFC026D0 */ - uint32_t psx_brA_BFC02684 = cpu->gpr[2]; uint32_t psx_brB_BFC02684 = cpu->gpr[1]; - psx_taken_BFC02684 = (psx_brA_BFC02684 != psx_brB_BFC02684); - psx_delay_BFC02684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02688u); -#endif - if (psx_delay_BFC02684) { - psx_delay_BFC02684 = 0; - if (psx_taken_BFC02684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026D0u); - goto label_BFC026D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0268Cu); - } -label_BFC0268C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0268Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0268Cu); -#endif - /* 0xBFC0268C: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC02690: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02694: 1000000E beq $zero, $zero, 0xBFC026D0 */ - uint32_t psx_brA_BFC02694 = cpu->gpr[0]; uint32_t psx_brB_BFC02694 = cpu->gpr[0]; - psx_taken_BFC02694 = (psx_brA_BFC02694 == psx_brB_BFC02694); - psx_delay_BFC02694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02698: 24130010 addiu $s3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24130010u, cpu->gpr[19], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02698u); -#endif - if (psx_delay_BFC02694) { - psx_delay_BFC02694 = 0; - if (psx_taken_BFC02694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026D0u); - goto label_BFC026D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0269Cu); - } -label_BFC0269C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0269Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0269Cu); -#endif - /* 0xBFC0269C: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC026A0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC026A4: 1000000A beq $zero, $zero, 0xBFC026D0 */ - uint32_t psx_brA_BFC026A4 = cpu->gpr[0]; uint32_t psx_brB_BFC026A4 = cpu->gpr[0]; - psx_taken_BFC026A4 = (psx_brA_BFC026A4 == psx_brB_BFC026A4); - psx_delay_BFC026A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC026A8: 24130002 addiu $s3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24130002u, cpu->gpr[19], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026A8u); -#endif - if (psx_delay_BFC026A4) { - psx_delay_BFC026A4 = 0; - if (psx_taken_BFC026A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026D0u); - goto label_BFC026D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026ACu); - } -label_BFC026AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC026AC: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC026B4u; /* jal link before delay slot */ - psx_delay_BFC026AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC026B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC026B0u); -#endif - if (psx_delay_BFC026AC) { - psx_delay_BFC026AC = 0; - cpu->gpr[31] = 0xBFC026B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC026B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC026B4: 2401004F addiu $at, $zero, 79 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (79)); - PGXP_ALU(0x2401004Fu, cpu->gpr[1], _pgx1, 0x0000004Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC026B8: 14410003 bne $v0, $at, 0xBFC026C8 */ - uint32_t psx_brA_BFC026B8 = cpu->gpr[2]; uint32_t psx_brB_BFC026B8 = cpu->gpr[1]; - psx_taken_BFC026B8 = (psx_brA_BFC026B8 != psx_brB_BFC026B8); - psx_delay_BFC026B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC026BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC026BCu); -#endif - if (psx_delay_BFC026B8) { - psx_delay_BFC026B8 = 0; - if (psx_taken_BFC026B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026C8u); - goto label_BFC026C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026C0u); - } -label_BFC026C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC026C0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC026C4: 24130008 addiu $s3, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24130008u, cpu->gpr[19], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026C4u); -#endif -label_BFC026C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026C8u); -#endif - /* 0xBFC026C8: 82240000 lb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 4, 0x20000u); - PGXP_LOAD(0x82240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC026CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC026CCu); -#endif -label_BFC026D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC026D0: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC026D8u; /* jal link before delay slot */ - psx_delay_BFC026D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC026D4: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026D4u); -#endif - if (psx_delay_BFC026D0) { - psx_delay_BFC026D0 = 0; - cpu->gpr[31] = 0xBFC026D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC026D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80006u); -#endif - /* 0xBFC026D8: 0053082B sltu $at, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC026DC: 1020000B beq $at, $zero, 0xBFC0270C */ - uint32_t psx_brA_BFC026DC = cpu->gpr[1]; uint32_t psx_brB_BFC026DC = cpu->gpr[0]; - psx_taken_BFC026DC = (psx_brA_BFC026DC == psx_brB_BFC026DC); - psx_delay_BFC026DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC026E0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026E0u); -#endif - if (psx_delay_BFC026DC) { - psx_delay_BFC026DC = 0; - if (psx_taken_BFC026DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0270Cu); - goto label_BFC0270C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026E4u); - } -label_BFC026E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC026E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC026E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC026E4: 02530019 multu $s2, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02530019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0xBFC026E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026E8u); -#endif - /* 0xBFC026E8: 82240000 lb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 4, 0x20000u); - PGXP_LOAD(0x82240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC026EC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC026F0: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC026F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC026F4: 02509021 addu $s2, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[16]; - PGXP_ALU(0x02509021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC026F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC026F8: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC02700u; /* jal link before delay slot */ - psx_delay_BFC026F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC026FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC026FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC026FCu); -#endif - if (psx_delay_BFC026F8) { - psx_delay_BFC026F8 = 0; - cpu->gpr[31] = 0xBFC02700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC02700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80006u); -#endif - /* 0xBFC02700: 0053082B sltu $at, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02704: 1420FFF7 bne $at, $zero, 0xBFC026E4 */ - uint32_t psx_brA_BFC02704 = cpu->gpr[1]; uint32_t psx_brB_BFC02704 = cpu->gpr[0]; - psx_taken_BFC02704 = (psx_brA_BFC02704 != psx_brB_BFC02704); - psx_delay_BFC02704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC02708: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02708u); -#endif - if (psx_delay_BFC02704) { - psx_delay_BFC02704 = 0; - if (psx_taken_BFC02704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC026E4u); - goto label_BFC026E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0270Cu); - } -label_BFC0270C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0270Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0270Cu); -#endif - /* 0xBFC0270C: 8FAC0044 lw $t4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0270Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0044u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC02710: 2631FFFF addiu $s1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2631FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC02714: AD910000 sw $s1, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02714u); return; } g_debug_last_store_pc = 0xBFC02714u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAD910000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02718u); -#endif - /* 0xBFC02718: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02718u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0271Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC0271C: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0271Cu); -#endif -label_BFC02720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02720u); -#endif - /* 0xBFC02720: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02720u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02724u); -#endif - /* 0xBFC02724: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02724u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02728u); -#endif - /* 0xBFC02728: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02728u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0272Cu); -#endif - /* 0xBFC0272C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0272Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0272Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02730: 03E00008 jr $ra */ - psx_delay_BFC02730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02734: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02734u); -#endif - if (psx_delay_BFC02730) { - psx_delay_BFC02730 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02738(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02738u); - int psx_delay_BFC02760 = 0; - int psx_taken_BFC02760 = 0; - int psx_delay_BFC02768 = 0; - int psx_taken_BFC02768 = 0; - int psx_delay_BFC02794 = 0; - int psx_taken_BFC02794 = 0; - int psx_delay_BFC027B8 = 0; - int psx_taken_BFC027B8 = 0; - int psx_delay_BFC027C4 = 0; - int psx_taken_BFC027C4 = 0; - int psx_delay_BFC027D4 = 0; - int psx_taken_BFC027D4 = 0; - int psx_delay_BFC027E0 = 0; - int psx_taken_BFC027E0 = 0; - int psx_delay_BFC027E8 = 0; - int psx_taken_BFC027E8 = 0; - int psx_delay_BFC027F4 = 0; - int psx_taken_BFC027F4 = 0; - int psx_delay_BFC02804 = 0; - int psx_taken_BFC02804 = 0; - int psx_delay_BFC02818 = 0; - int psx_taken_BFC02818 = 0; - int psx_delay_BFC02824 = 0; - int psx_taken_BFC02824 = 0; - int psx_delay_BFC0282C = 0; - int psx_taken_BFC0282C = 0; - int psx_delay_BFC02834 = 0; - int psx_taken_BFC02834 = 0; - int psx_delay_BFC02844 = 0; - int psx_taken_BFC02844 = 0; - int psx_delay_BFC02854 = 0; - int psx_taken_BFC02854 = 0; - int psx_delay_BFC0285C = 0; - int psx_delay_BFC02868 = 0; - int psx_taken_BFC02868 = 0; - int psx_delay_BFC02880 = 0; - int psx_delay_BFC0288C = 0; - int psx_taken_BFC0288C = 0; - int psx_delay_BFC028A0 = 0; - int psx_taken_BFC028A0 = 0; - int psx_delay_BFC028C4 = 0; - int psx_delay_BFC028D4 = 0; - int psx_taken_BFC028D4 = 0; - int psx_delay_BFC02910 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02768u: goto label_BFC02768; - case 0xBFC02770u: goto label_BFC02770; - case 0xBFC0279Cu: goto label_BFC0279C; - case 0xBFC027C0u: goto label_BFC027C0; - case 0xBFC027CCu: goto label_BFC027CC; - case 0xBFC027DCu: goto label_BFC027DC; - case 0xBFC027E0u: goto label_BFC027E0; - case 0xBFC027E8u: goto label_BFC027E8; - case 0xBFC027F0u: goto label_BFC027F0; - case 0xBFC027F4u: goto label_BFC027F4; - case 0xBFC027FCu: goto label_BFC027FC; - case 0xBFC02804u: goto label_BFC02804; - case 0xBFC0280Cu: goto label_BFC0280C; - case 0xBFC02820u: goto label_BFC02820; - case 0xBFC0282Cu: goto label_BFC0282C; - case 0xBFC02834u: goto label_BFC02834; - case 0xBFC0283Cu: goto label_BFC0283C; - case 0xBFC0284Cu: goto label_BFC0284C; - case 0xBFC0285Cu: goto label_BFC0285C; - case 0xBFC02864u: goto label_BFC02864; - case 0xBFC02870u: goto label_BFC02870; - case 0xBFC02878u: goto label_BFC02878; - case 0xBFC02880u: goto label_BFC02880; - case 0xBFC02888u: goto label_BFC02888; - case 0xBFC02894u: goto label_BFC02894; - case 0xBFC028A8u: goto label_BFC028A8; - case 0xBFC028ACu: goto label_BFC028AC; - case 0xBFC028CCu: goto label_BFC028CC; - case 0xBFC028DCu: goto label_BFC028DC; - case 0xBFC028FCu: goto label_BFC028FC; - default: break; - } - } -label_BFC02738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02738: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0273C: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0273Cu); return; } g_debug_last_store_pc = 0xBFC0273Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC02740: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02740u); return; } g_debug_last_store_pc = 0xBFC02740u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC02744: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02744u); return; } g_debug_last_store_pc = 0xBFC02744u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02748: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0274C: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0274Cu); return; } g_debug_last_store_pc = 0xBFC0274Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02750: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02750u); return; } g_debug_last_store_pc = 0xBFC02750u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC02754: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC02758: AFA50054 sw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02758u); return; } g_debug_last_store_pc = 0xBFC02758u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0275Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC0275C: 24140001 addiu $s4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24140001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0275Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC02760: 16000003 bne $s0, $zero, 0xBFC02770 */ - uint32_t psx_brA_BFC02760 = cpu->gpr[16]; uint32_t psx_brB_BFC02760 = cpu->gpr[0]; - psx_taken_BFC02760 = (psx_brA_BFC02760 != psx_brB_BFC02760); - psx_delay_BFC02760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC02764: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02764u); -#endif - if (psx_delay_BFC02760) { - psx_delay_BFC02760 = 0; - if (psx_taken_BFC02760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02770u); - goto label_BFC02770; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02768u); - } -label_BFC02768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02768: 10000064 beq $zero, $zero, 0xBFC028FC */ - uint32_t psx_brA_BFC02768 = cpu->gpr[0]; uint32_t psx_brB_BFC02768 = cpu->gpr[0]; - psx_taken_BFC02768 = (psx_brA_BFC02768 == psx_brB_BFC02768); - psx_delay_BFC02768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0276Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0276C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0276Cu); -#endif - if (psx_delay_BFC02768) { - psx_delay_BFC02768 = 0; - if (psx_taken_BFC02768) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028FCu); - goto label_BFC028FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02770u); - } -label_BFC02770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC02770: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02770u); return; } g_debug_last_store_pc = 0xBFC02770u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02774u); -#endif - /* 0xBFC02774: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02778: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0277C: 2442DDB0 addiu $v0, $v0, -8784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-8784)); - PGXP_ALU(0x2442DDB0u, cpu->gpr[2], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC02780: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC02784: 004E7821 addu $t7, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02788u); -#endif - /* 0xBFC02788: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0278C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC02790: 33190008 andi $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u; - PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC02794: 1320000A beq $t9, $zero, 0xBFC027C0 */ - uint32_t psx_brA_BFC02794 = cpu->gpr[25]; uint32_t psx_brB_BFC02794 = cpu->gpr[0]; - psx_taken_BFC02794 = (psx_brA_BFC02794 == psx_brB_BFC02794); - psx_delay_BFC02794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02798: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02798u); -#endif - if (psx_delay_BFC02794) { - psx_delay_BFC02794 = 0; - if (psx_taken_BFC02794) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027C0u); - goto label_BFC027C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0279Cu); - } -label_BFC0279C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0279Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0279Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0279Cu); -#endif - /* 0xBFC0279C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0279Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC027A0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC027A4: 308800FF andi $t0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC027A8: 00484821 addu $t1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027ACu); -#endif - /* 0xBFC027AC: 812A0001 lb $t2, 1($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 1; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (1)), 10, 0x200u); - PGXP_LOAD(0x812A0001u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC027B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC027B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC027B4: 314B0008 andi $t3, $t2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u; - PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC027B8: 1560FFF8 bne $t3, $zero, 0xBFC0279C */ - uint32_t psx_brA_BFC027B8 = cpu->gpr[11]; uint32_t psx_brB_BFC027B8 = cpu->gpr[0]; - psx_taken_BFC027B8 = (psx_brA_BFC027B8 != psx_brB_BFC027B8); - psx_delay_BFC027B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC027BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC027BCu); -#endif - if (psx_delay_BFC027B8) { - psx_delay_BFC027B8 = 0; - if (psx_taken_BFC027B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0279Cu); - goto label_BFC0279C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027C0u); - } -label_BFC027C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC027C0: 2402002D addiu $v0, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2402002Du, cpu->gpr[2], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC027C4: 14440006 bne $v0, $a0, 0xBFC027E0 */ - uint32_t psx_brA_BFC027C4 = cpu->gpr[2]; uint32_t psx_brB_BFC027C4 = cpu->gpr[4]; - psx_taken_BFC027C4 = (psx_brA_BFC027C4 != psx_brB_BFC027C4); - psx_delay_BFC027C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC027C8: 2E610002 sltiu $at, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2E610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027C8u); -#endif - if (psx_delay_BFC027C4) { - psx_delay_BFC027C4 = 0; - if (psx_taken_BFC027C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027E0u); - goto label_BFC027E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027CCu); - } -label_BFC027CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027CCu); -#endif - /* 0xBFC027CC: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC027D0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC027D4: 1044FFFD beq $v0, $a0, 0xBFC027CC */ - uint32_t psx_brA_BFC027D4 = cpu->gpr[2]; uint32_t psx_brB_BFC027D4 = cpu->gpr[4]; - psx_taken_BFC027D4 = (psx_brA_BFC027D4 == psx_brB_BFC027D4); - psx_delay_BFC027D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC027D8: 0014A023 subu $s4, $zero, $s4 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[0] - cpu->gpr[20]; - PGXP_ALU(0x0014A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027D8u); -#endif - if (psx_delay_BFC027D4) { - psx_delay_BFC027D4 = 0; - if (psx_taken_BFC027D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027CCu); - goto label_BFC027CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027DCu); - } -label_BFC027DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC027DC: 2E610002 sltiu $at, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2E610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027DCu); -#endif -label_BFC027E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC027E0: 14200003 bne $at, $zero, 0xBFC027F0 */ - uint32_t psx_brA_BFC027E0 = cpu->gpr[1]; uint32_t psx_brB_BFC027E0 = cpu->gpr[0]; - psx_taken_BFC027E0 = (psx_brA_BFC027E0 != psx_brB_BFC027E0); - psx_delay_BFC027E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC027E4: 2E610025 sltiu $at, $s3, 37 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < 0x00000025u ? 1 : 0); - PGXP_ALU(0x2E610025u, cpu->gpr[1], _pgx1, 0x0025u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027E4u); -#endif - if (psx_delay_BFC027E0) { - psx_delay_BFC027E0 = 0; - if (psx_taken_BFC027E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027F0u); - goto label_BFC027F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027E8u); - } -label_BFC027E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC027E8: 14200002 bne $at, $zero, 0xBFC027F4 */ - uint32_t psx_brA_BFC027E8 = cpu->gpr[1]; uint32_t psx_brB_BFC027E8 = cpu->gpr[0]; - psx_taken_BFC027E8 = (psx_brA_BFC027E8 != psx_brB_BFC027E8); - psx_delay_BFC027E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC027EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC027ECu); -#endif - if (psx_delay_BFC027E8) { - psx_delay_BFC027E8 = 0; - if (psx_taken_BFC027E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027F4u); - goto label_BFC027F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027F0u); - } -label_BFC027F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC027F0: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027F0u); -#endif -label_BFC027F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC027F4: 16600003 bne $s3, $zero, 0xBFC02804 */ - uint32_t psx_brA_BFC027F4 = cpu->gpr[19]; uint32_t psx_brB_BFC027F4 = cpu->gpr[0]; - psx_taken_BFC027F4 = (psx_brA_BFC027F4 != psx_brB_BFC027F4); - psx_delay_BFC027F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC027F8: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027F8u); -#endif - if (psx_delay_BFC027F4) { - psx_delay_BFC027F4 = 0; - if (psx_taken_BFC027F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02804u); - goto label_BFC02804; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC027FCu); - } -label_BFC027FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC027FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC027FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC027FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC027FC: 2413000A addiu $s3, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2413000Au, cpu->gpr[19], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC027FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02800: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02800u); -#endif -label_BFC02804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC02804: 14810015 bne $a0, $at, 0xBFC0285C */ - uint32_t psx_brA_BFC02804 = cpu->gpr[4]; uint32_t psx_brB_BFC02804 = cpu->gpr[1]; - psx_taken_BFC02804 = (psx_brA_BFC02804 != psx_brB_BFC02804); - psx_delay_BFC02804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02808u); -#endif - if (psx_delay_BFC02804) { - psx_delay_BFC02804 = 0; - if (psx_taken_BFC02804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0285Cu); - goto label_BFC0285C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0280Cu); - } -label_BFC0280C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0280Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0280Cu); -#endif - /* 0xBFC0280C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02810: 24010042 addiu $at, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24010042u, cpu->gpr[1], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC02814: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02818: 1041000C beq $v0, $at, 0xBFC0284C */ - uint32_t psx_brA_BFC02818 = cpu->gpr[2]; uint32_t psx_brB_BFC02818 = cpu->gpr[1]; - psx_taken_BFC02818 = (psx_brA_BFC02818 == psx_brB_BFC02818); - psx_delay_BFC02818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0281Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0281C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0281Cu); -#endif - if (psx_delay_BFC02818) { - psx_delay_BFC02818 = 0; - if (psx_taken_BFC02818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0284Cu); - goto label_BFC0284C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02820u); - } -label_BFC02820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02820: 24010058 addiu $at, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24010058u, cpu->gpr[1], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02824: 10410005 beq $v0, $at, 0xBFC0283C */ - uint32_t psx_brA_BFC02824 = cpu->gpr[2]; uint32_t psx_brB_BFC02824 = cpu->gpr[1]; - psx_taken_BFC02824 = (psx_brA_BFC02824 == psx_brB_BFC02824); - psx_delay_BFC02824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02828: 24010062 addiu $at, $zero, 98 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (98)); - PGXP_ALU(0x24010062u, cpu->gpr[1], _pgx1, 0x00000062u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02828u); -#endif - if (psx_delay_BFC02824) { - psx_delay_BFC02824 = 0; - if (psx_taken_BFC02824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0283Cu); - goto label_BFC0283C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0282Cu); - } -label_BFC0282C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0282Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0282Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0282Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0282C: 10410007 beq $v0, $at, 0xBFC0284C */ - uint32_t psx_brA_BFC0282C = cpu->gpr[2]; uint32_t psx_brB_BFC0282C = cpu->gpr[1]; - psx_taken_BFC0282C = (psx_brA_BFC0282C == psx_brB_BFC0282C); - psx_delay_BFC0282C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02830: 24010078 addiu $at, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24010078u, cpu->gpr[1], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02830u); -#endif - if (psx_delay_BFC0282C) { - psx_delay_BFC0282C = 0; - if (psx_taken_BFC0282C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0284Cu); - goto label_BFC0284C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02834u); - } -label_BFC02834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02834: 14410012 bne $v0, $at, 0xBFC02880 */ - uint32_t psx_brA_BFC02834 = cpu->gpr[2]; uint32_t psx_brB_BFC02834 = cpu->gpr[1]; - psx_taken_BFC02834 = (psx_brA_BFC02834 != psx_brB_BFC02834); - psx_delay_BFC02834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02838u); -#endif - if (psx_delay_BFC02834) { - psx_delay_BFC02834 = 0; - if (psx_taken_BFC02834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02880u); - goto label_BFC02880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0283Cu); - } -label_BFC0283C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0283Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0283Cu); -#endif - /* 0xBFC0283C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02840: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02844: 1000000E beq $zero, $zero, 0xBFC02880 */ - uint32_t psx_brA_BFC02844 = cpu->gpr[0]; uint32_t psx_brB_BFC02844 = cpu->gpr[0]; - psx_taken_BFC02844 = (psx_brA_BFC02844 == psx_brB_BFC02844); - psx_delay_BFC02844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02848: 24130010 addiu $s3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24130010u, cpu->gpr[19], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02848u); -#endif - if (psx_delay_BFC02844) { - psx_delay_BFC02844 = 0; - if (psx_taken_BFC02844) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02880u); - goto label_BFC02880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0284Cu); - } -label_BFC0284C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0284Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0284Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0284Cu); -#endif - /* 0xBFC0284C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0284Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02850: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02854: 1000000A beq $zero, $zero, 0xBFC02880 */ - uint32_t psx_brA_BFC02854 = cpu->gpr[0]; uint32_t psx_brB_BFC02854 = cpu->gpr[0]; - psx_taken_BFC02854 = (psx_brA_BFC02854 == psx_brB_BFC02854); - psx_delay_BFC02854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02858: 24130002 addiu $s3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24130002u, cpu->gpr[19], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02858u); -#endif - if (psx_delay_BFC02854) { - psx_delay_BFC02854 = 0; - if (psx_taken_BFC02854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02880u); - goto label_BFC02880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0285Cu); - } -label_BFC0285C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0285Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0285C: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC02864u; /* jal link before delay slot */ - psx_delay_BFC0285C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02860: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02860u); -#endif - if (psx_delay_BFC0285C) { - psx_delay_BFC0285C = 0; - cpu->gpr[31] = 0xBFC02864u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC02864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02864: 2401004F addiu $at, $zero, 79 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (79)); - PGXP_ALU(0x2401004Fu, cpu->gpr[1], _pgx1, 0x0000004Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02868: 14410003 bne $v0, $at, 0xBFC02878 */ - uint32_t psx_brA_BFC02868 = cpu->gpr[2]; uint32_t psx_brB_BFC02868 = cpu->gpr[1]; - psx_taken_BFC02868 = (psx_brA_BFC02868 != psx_brB_BFC02868); - psx_delay_BFC02868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0286Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0286C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0286Cu); -#endif - if (psx_delay_BFC02868) { - psx_delay_BFC02868 = 0; - if (psx_taken_BFC02868) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02878u); - goto label_BFC02878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02870u); - } -label_BFC02870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02870: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02874: 24130008 addiu $s3, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24130008u, cpu->gpr[19], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02874u); -#endif -label_BFC02878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02878u); -#endif - /* 0xBFC02878: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0287Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0287C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0287Cu); -#endif -label_BFC02880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02880: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC02888u; /* jal link before delay slot */ - psx_delay_BFC02880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02884: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02884u); -#endif - if (psx_delay_BFC02880) { - psx_delay_BFC02880 = 0; - cpu->gpr[31] = 0xBFC02888u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC02888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80006u); -#endif - /* 0xBFC02888: 0053082B sltu $at, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0288Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0288C: 10200013 beq $at, $zero, 0xBFC028DC */ - uint32_t psx_brA_BFC0288C = cpu->gpr[1]; uint32_t psx_brB_BFC0288C = cpu->gpr[0]; - psx_taken_BFC0288C = (psx_brA_BFC0288C == psx_brB_BFC0288C); - psx_delay_BFC0288C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC02890: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02890u); -#endif - if (psx_delay_BFC0288C) { - psx_delay_BFC0288C = 0; - if (psx_taken_BFC0288C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028DCu); - goto label_BFC028DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02894u); - } -label_BFC02894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC02894: 240CFFFF addiu $t4, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000u); -#endif - /* 0xBFC02898: 0193001B divu $t4, $s3 */ - { uint32_t psx_n = cpu->gpr[12]; uint32_t psx_d = cpu->gpr[19]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0193001Bu, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0289C: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC028A0: 16600002 bne $s3, $zero, 0xBFC028AC */ - uint32_t psx_brA_BFC028A0 = cpu->gpr[19]; uint32_t psx_brB_BFC028A0 = cpu->gpr[0]; - psx_taken_BFC028A0 = (psx_brA_BFC028A0 != psx_brB_BFC028A0); - psx_delay_BFC028A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC028A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC028A4u); -#endif - if (psx_delay_BFC028A0) { - psx_delay_BFC028A0 = 0; - if (psx_taken_BFC028A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028ACu); - goto label_BFC028AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028A8u); - } -label_BFC028A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC028A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC028A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC028A8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0xBFC028A8u); return; -#ifdef PSX_COSIM - cosim_instr(0xBFC028A8u); -#endif -label_BFC028AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC028ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC028ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC028AC: 02530019 multu $s2, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02530019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0xBFC028ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028B0u); -#endif - /* 0xBFC028B0: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC028B4: AFA30038 sw $v1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028B4u); return; } g_debug_last_store_pc = 0xBFC028B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC028B8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC028BC: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC028BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC028C0: 02519021 addu $s2, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[17]; - PGXP_ALU(0x02519021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC028C4: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC028CCu; /* jal link before delay slot */ - psx_delay_BFC028C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC028C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC028C8u); -#endif - if (psx_delay_BFC028C4) { - psx_delay_BFC028C4 = 0; - cpu->gpr[31] = 0xBFC028CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC028CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC028CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC028CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028CCu); -#endif - /* 0xBFC028CC: 8FA30038 lw $v1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30038u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80006u); -#endif - /* 0xBFC028D0: 0053082B sltu $at, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0053082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC028D4: 1420FFF5 bne $at, $zero, 0xBFC028AC */ - uint32_t psx_brA_BFC028D4 = cpu->gpr[1]; uint32_t psx_brB_BFC028D4 = cpu->gpr[0]; - psx_taken_BFC028D4 = (psx_brA_BFC028D4 != psx_brB_BFC028D4); - psx_delay_BFC028D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC028D8: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028D8u); -#endif - if (psx_delay_BFC028D4) { - psx_delay_BFC028D4 = 0; - if (psx_taken_BFC028D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028ACu); - goto label_BFC028AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC028DCu); - } -label_BFC028DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC028DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC028DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140000u); -#endif - /* 0xBFC028DC: 02540019 multu $s2, $s4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[20]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02540019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0xBFC028DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028E0u); -#endif - /* 0xBFC028E0: 8FAD0054 lw $t5, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028E0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0054u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC028E4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC028E8: ADB00000 sw $s0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028E8u); return; } g_debug_last_store_pc = 0xBFC028E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xADB00000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028ECu); -#endif - /* 0xBFC028EC: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028ECu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC028F0: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC028F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC028F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC028F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC028F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC028F8u); -#endif -label_BFC028FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC028FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC028FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC028FCu); -#endif - /* 0xBFC028FC: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC028FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02900u); -#endif - /* 0xBFC02900: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02900u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02904u); -#endif - /* 0xBFC02904: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02904u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02908u); -#endif - /* 0xBFC02908: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02908u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0290Cu); -#endif - /* 0xBFC0290C: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0290Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0290Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02910: 03E00008 jr $ra */ - psx_delay_BFC02910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02914: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02914u); -#endif - if (psx_delay_BFC02910) { - psx_delay_BFC02910 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02918(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02918u); - int psx_delay_BFC02918 = 0; - int psx_taken_BFC02918 = 0; - int psx_delay_BFC02920 = 0; - int psx_taken_BFC02920 = 0; - int psx_delay_BFC0292C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02920u: goto label_BFC02920; - case 0xBFC02928u: goto label_BFC02928; - case 0xBFC0292Cu: goto label_BFC0292C; - default: break; - } - } -label_BFC02918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02918: 04800004 bltz $a0, 0xBFC0292C */ - uint32_t psx_brA_BFC02918 = cpu->gpr[4]; - psx_taken_BFC02918 = ((int32_t)psx_brA_BFC02918 < 0); - psx_delay_BFC02918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0291Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0291C: 00041823 subu $v1, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00041823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0291Cu); -#endif - if (psx_delay_BFC02918) { - psx_delay_BFC02918 = 0; - if (psx_taken_BFC02918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0292Cu); - goto label_BFC0292C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02920u); - } -label_BFC02920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02920: 10000002 beq $zero, $zero, 0xBFC0292C */ - uint32_t psx_brA_BFC02920 = cpu->gpr[0]; uint32_t psx_brB_BFC02920 = cpu->gpr[0]; - psx_taken_BFC02920 = (psx_brA_BFC02920 == psx_brB_BFC02920); - psx_delay_BFC02920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02924: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02924u); -#endif - if (psx_delay_BFC02920) { - psx_delay_BFC02920 = 0; - if (psx_taken_BFC02920) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0292Cu); - goto label_BFC0292C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02928u); - } -label_BFC02928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02928: 00041823 subu $v1, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00041823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02928u); -#endif -label_BFC0292C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0292Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0292Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0292Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0292C: 03E00008 jr $ra */ - psx_delay_BFC0292C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02930: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02930u); -#endif - if (psx_delay_BFC0292C) { - psx_delay_BFC0292C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02934(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02934u); - int psx_delay_BFC02934 = 0; - int psx_taken_BFC02934 = 0; - int psx_delay_BFC0293C = 0; - int psx_taken_BFC0293C = 0; - int psx_delay_BFC02948 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0293Cu: goto label_BFC0293C; - case 0xBFC02944u: goto label_BFC02944; - case 0xBFC02948u: goto label_BFC02948; - default: break; - } - } -label_BFC02934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02934: 04800004 bltz $a0, 0xBFC02948 */ - uint32_t psx_brA_BFC02934 = cpu->gpr[4]; - psx_taken_BFC02934 = ((int32_t)psx_brA_BFC02934 < 0); - psx_delay_BFC02934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02938: 00041823 subu $v1, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00041823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02938u); -#endif - if (psx_delay_BFC02934) { - psx_delay_BFC02934 = 0; - if (psx_taken_BFC02934) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02948u); - goto label_BFC02948; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0293Cu); - } -label_BFC0293C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0293Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0293Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0293Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0293C: 10000002 beq $zero, $zero, 0xBFC02948 */ - uint32_t psx_brA_BFC0293C = cpu->gpr[0]; uint32_t psx_brB_BFC0293C = cpu->gpr[0]; - psx_taken_BFC0293C = (psx_brA_BFC0293C == psx_brB_BFC0293C); - psx_delay_BFC0293C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02940: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02940u); -#endif - if (psx_delay_BFC0293C) { - psx_delay_BFC0293C = 0; - if (psx_taken_BFC0293C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02948u); - goto label_BFC02948; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02944u); - } -label_BFC02944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02944: 00041823 subu $v1, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00041823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02944u); -#endif -label_BFC02948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02948: 03E00008 jr $ra */ - psx_delay_BFC02948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0294C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0294Cu); -#endif - if (psx_delay_BFC02948) { - psx_delay_BFC02948 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02950(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02950u); - int psx_delay_BFC02974 = 0; - int psx_taken_BFC02974 = 0; - int psx_delay_BFC0297C = 0; - int psx_taken_BFC0297C = 0; - int psx_delay_BFC029A8 = 0; - int psx_taken_BFC029A8 = 0; - int psx_delay_BFC029CC = 0; - int psx_taken_BFC029CC = 0; - int psx_delay_BFC029D8 = 0; - int psx_taken_BFC029D8 = 0; - int psx_delay_BFC029E8 = 0; - int psx_taken_BFC029E8 = 0; - int psx_delay_BFC029F4 = 0; - int psx_taken_BFC029F4 = 0; - int psx_delay_BFC02A04 = 0; - int psx_taken_BFC02A04 = 0; - int psx_delay_BFC02A14 = 0; - int psx_taken_BFC02A14 = 0; - int psx_delay_BFC02A24 = 0; - int psx_taken_BFC02A24 = 0; - int psx_delay_BFC02A30 = 0; - int psx_taken_BFC02A30 = 0; - int psx_delay_BFC02A38 = 0; - int psx_taken_BFC02A38 = 0; - int psx_delay_BFC02A40 = 0; - int psx_taken_BFC02A40 = 0; - int psx_delay_BFC02A48 = 0; - int psx_taken_BFC02A48 = 0; - int psx_delay_BFC02A54 = 0; - int psx_delay_BFC02A60 = 0; - int psx_taken_BFC02A60 = 0; - int psx_delay_BFC02A80 = 0; - int psx_taken_BFC02A80 = 0; - int psx_delay_BFC02AA0 = 0; - int psx_delay_BFC02AAC = 0; - int psx_taken_BFC02AAC = 0; - int psx_delay_BFC02AE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0297Cu: goto label_BFC0297C; - case 0xBFC02984u: goto label_BFC02984; - case 0xBFC029B0u: goto label_BFC029B0; - case 0xBFC029D4u: goto label_BFC029D4; - case 0xBFC029E0u: goto label_BFC029E0; - case 0xBFC029F0u: goto label_BFC029F0; - case 0xBFC029F4u: goto label_BFC029F4; - case 0xBFC029FCu: goto label_BFC029FC; - case 0xBFC02A0Cu: goto label_BFC02A0C; - case 0xBFC02A1Cu: goto label_BFC02A1C; - case 0xBFC02A2Cu: goto label_BFC02A2C; - case 0xBFC02A38u: goto label_BFC02A38; - case 0xBFC02A40u: goto label_BFC02A40; - case 0xBFC02A48u: goto label_BFC02A48; - case 0xBFC02A50u: goto label_BFC02A50; - case 0xBFC02A54u: goto label_BFC02A54; - case 0xBFC02A5Cu: goto label_BFC02A5C; - case 0xBFC02A68u: goto label_BFC02A68; - case 0xBFC02A88u: goto label_BFC02A88; - case 0xBFC02A8Cu: goto label_BFC02A8C; - case 0xBFC02AA8u: goto label_BFC02AA8; - case 0xBFC02AB4u: goto label_BFC02AB4; - case 0xBFC02AC0u: goto label_BFC02AC0; - case 0xBFC02AD4u: goto label_BFC02AD4; - default: break; - } - } -label_BFC02950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02950: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC02954: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02954u); return; } g_debug_last_store_pc = 0xBFC02954u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC02958: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02958u); return; } g_debug_last_store_pc = 0xBFC02958u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0295C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC02960: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02960u); return; } g_debug_last_store_pc = 0xBFC02960u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC02964: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02964u); return; } g_debug_last_store_pc = 0xBFC02964u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02968: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02968u); return; } g_debug_last_store_pc = 0xBFC02968u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0296C: 24160001 addiu $s6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24160001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC02970: 2415000A addiu $s5, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2415000Au, cpu->gpr[21], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC02974: 16000003 bne $s0, $zero, 0xBFC02984 */ - uint32_t psx_brA_BFC02974 = cpu->gpr[16]; uint32_t psx_brB_BFC02974 = cpu->gpr[0]; - psx_taken_BFC02974 = (psx_brA_BFC02974 != psx_brB_BFC02974); - psx_delay_BFC02974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC02978: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02978u); -#endif - if (psx_delay_BFC02974) { - psx_delay_BFC02974 = 0; - if (psx_taken_BFC02974) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02984u); - goto label_BFC02984; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0297Cu); - } -label_BFC0297C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0297Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0297C: 10000055 beq $zero, $zero, 0xBFC02AD4 */ - uint32_t psx_brA_BFC0297C = cpu->gpr[0]; uint32_t psx_brB_BFC0297C = cpu->gpr[0]; - psx_taken_BFC0297C = (psx_brA_BFC0297C == psx_brB_BFC0297C); - psx_delay_BFC0297C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02980: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02980u); -#endif - if (psx_delay_BFC0297C) { - psx_delay_BFC0297C = 0; - if (psx_taken_BFC0297C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02AD4u); - goto label_BFC02AD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02984u); - } -label_BFC02984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC02984: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02984u); return; } g_debug_last_store_pc = 0xBFC02984u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02988u); -#endif - /* 0xBFC02988: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0298C: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02990: 2442DDB0 addiu $v0, $v0, -8784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-8784)); - PGXP_ALU(0x2442DDB0u, cpu->gpr[2], _pgx1, 0xFFFFDDB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC02994: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC02998: 004E7821 addu $t7, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0299Cu); -#endif - /* 0xBFC0299C: 81F80001 lb $t8, 1($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 1; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (1)), 24, 0x8000u); - PGXP_LOAD(0x81F80001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0299Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC029A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC029A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC029A4: 33190008 andi $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u; - PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC029A8: 1320000A beq $t9, $zero, 0xBFC029D4 */ - uint32_t psx_brA_BFC029A8 = cpu->gpr[25]; uint32_t psx_brB_BFC029A8 = cpu->gpr[0]; - psx_taken_BFC029A8 = (psx_brA_BFC029A8 == psx_brB_BFC029A8); - psx_delay_BFC029A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC029AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC029ACu); -#endif - if (psx_delay_BFC029A8) { - psx_delay_BFC029A8 = 0; - if (psx_taken_BFC029A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029D4u); - goto label_BFC029D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029B0u); - } -label_BFC029B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029B0u); -#endif - /* 0xBFC029B0: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC029B4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC029B8: 308800FF andi $t0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC029BC: 00484821 addu $t1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029C0u); -#endif - /* 0xBFC029C0: 812A0001 lb $t2, 1($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 1; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (1)), 10, 0x200u); - PGXP_LOAD(0x812A0001u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC029C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC029C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC029C8: 314B0008 andi $t3, $t2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u; - PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC029CC: 1560FFF8 bne $t3, $zero, 0xBFC029B0 */ - uint32_t psx_brA_BFC029CC = cpu->gpr[11]; uint32_t psx_brB_BFC029CC = cpu->gpr[0]; - psx_taken_BFC029CC = (psx_brA_BFC029CC != psx_brB_BFC029CC); - psx_delay_BFC029CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC029D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC029D0u); -#endif - if (psx_delay_BFC029CC) { - psx_delay_BFC029CC = 0; - if (psx_taken_BFC029CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029B0u); - goto label_BFC029B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029D4u); - } -label_BFC029D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC029D4: 2402002D addiu $v0, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2402002Du, cpu->gpr[2], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC029D8: 14440006 bne $v0, $a0, 0xBFC029F4 */ - uint32_t psx_brA_BFC029D8 = cpu->gpr[2]; uint32_t psx_brB_BFC029D8 = cpu->gpr[4]; - psx_taken_BFC029D8 = (psx_brA_BFC029D8 != psx_brB_BFC029D8); - psx_delay_BFC029D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC029DC: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029DCu); -#endif - if (psx_delay_BFC029D8) { - psx_delay_BFC029D8 = 0; - if (psx_taken_BFC029D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029F4u); - goto label_BFC029F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029E0u); - } -label_BFC029E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029E0u); -#endif - /* 0xBFC029E0: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC029E4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC029E8: 1044FFFD beq $v0, $a0, 0xBFC029E0 */ - uint32_t psx_brA_BFC029E8 = cpu->gpr[2]; uint32_t psx_brB_BFC029E8 = cpu->gpr[4]; - psx_taken_BFC029E8 = (psx_brA_BFC029E8 == psx_brB_BFC029E8); - psx_delay_BFC029E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC029EC: 0016B023 subu $s6, $zero, $s6 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[0] - cpu->gpr[22]; - PGXP_ALU(0x0016B023u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029ECu); -#endif - if (psx_delay_BFC029E8) { - psx_delay_BFC029E8 = 0; - if (psx_taken_BFC029E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029E0u); - goto label_BFC029E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029F0u); - } -label_BFC029F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC029F0: 24010030 addiu $at, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24010030u, cpu->gpr[1], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029F0u); -#endif -label_BFC029F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC029F4: 14810017 bne $a0, $at, 0xBFC02A54 */ - uint32_t psx_brA_BFC029F4 = cpu->gpr[4]; uint32_t psx_brB_BFC029F4 = cpu->gpr[1]; - psx_taken_BFC029F4 = (psx_brA_BFC029F4 != psx_brB_BFC029F4); - psx_delay_BFC029F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC029F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC029F8u); -#endif - if (psx_delay_BFC029F4) { - psx_delay_BFC029F4 = 0; - if (psx_taken_BFC029F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A54u); - goto label_BFC02A54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC029FCu); - } -label_BFC029FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC029FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC029FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC029FCu); -#endif - /* 0xBFC029FC: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC029FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02A00: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02A04: 10000009 beq $zero, $zero, 0xBFC02A2C */ - uint32_t psx_brA_BFC02A04 = cpu->gpr[0]; uint32_t psx_brB_BFC02A04 = cpu->gpr[0]; - psx_taken_BFC02A04 = (psx_brA_BFC02A04 == psx_brB_BFC02A04); - psx_delay_BFC02A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC02A08: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A08u); -#endif - if (psx_delay_BFC02A04) { - psx_delay_BFC02A04 = 0; - if (psx_taken_BFC02A04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A2Cu); - goto label_BFC02A2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A0Cu); - } -label_BFC02A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A0Cu); -#endif - /* 0xBFC02A0C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02A10: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02A14: 1000000F beq $zero, $zero, 0xBFC02A54 */ - uint32_t psx_brA_BFC02A14 = cpu->gpr[0]; uint32_t psx_brB_BFC02A14 = cpu->gpr[0]; - psx_taken_BFC02A14 = (psx_brA_BFC02A14 == psx_brB_BFC02A14); - psx_delay_BFC02A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC02A18: 24150010 addiu $s5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24150010u, cpu->gpr[21], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A18u); -#endif - if (psx_delay_BFC02A14) { - psx_delay_BFC02A14 = 0; - if (psx_taken_BFC02A14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A54u); - goto label_BFC02A54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A1Cu); - } -label_BFC02A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A1Cu); -#endif - /* 0xBFC02A1C: 82040001 lb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 4, 0x10000u); - PGXP_LOAD(0x82040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02A20: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02A24: 1000000B beq $zero, $zero, 0xBFC02A54 */ - uint32_t psx_brA_BFC02A24 = cpu->gpr[0]; uint32_t psx_brB_BFC02A24 = cpu->gpr[0]; - psx_taken_BFC02A24 = (psx_brA_BFC02A24 == psx_brB_BFC02A24); - psx_delay_BFC02A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC02A28: 24150002 addiu $s5, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24150002u, cpu->gpr[21], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A28u); -#endif - if (psx_delay_BFC02A24) { - psx_delay_BFC02A24 = 0; - if (psx_taken_BFC02A24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A54u); - goto label_BFC02A54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A2Cu); - } -label_BFC02A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02A2C: 24010042 addiu $at, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24010042u, cpu->gpr[1], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02A30: 1041FFFA beq $v0, $at, 0xBFC02A1C */ - uint32_t psx_brA_BFC02A30 = cpu->gpr[2]; uint32_t psx_brB_BFC02A30 = cpu->gpr[1]; - psx_taken_BFC02A30 = (psx_brA_BFC02A30 == psx_brB_BFC02A30); - psx_delay_BFC02A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02A34: 24010058 addiu $at, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24010058u, cpu->gpr[1], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A34u); -#endif - if (psx_delay_BFC02A30) { - psx_delay_BFC02A30 = 0; - if (psx_taken_BFC02A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A1Cu); - goto label_BFC02A1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A38u); - } -label_BFC02A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02A38: 1041FFF4 beq $v0, $at, 0xBFC02A0C */ - uint32_t psx_brA_BFC02A38 = cpu->gpr[2]; uint32_t psx_brB_BFC02A38 = cpu->gpr[1]; - psx_taken_BFC02A38 = (psx_brA_BFC02A38 == psx_brB_BFC02A38); - psx_delay_BFC02A38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02A3C: 24010062 addiu $at, $zero, 98 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (98)); - PGXP_ALU(0x24010062u, cpu->gpr[1], _pgx1, 0x00000062u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A3Cu); -#endif - if (psx_delay_BFC02A38) { - psx_delay_BFC02A38 = 0; - if (psx_taken_BFC02A38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A0Cu); - goto label_BFC02A0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A40u); - } -label_BFC02A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02A40: 1041FFF6 beq $v0, $at, 0xBFC02A1C */ - uint32_t psx_brA_BFC02A40 = cpu->gpr[2]; uint32_t psx_brB_BFC02A40 = cpu->gpr[1]; - psx_taken_BFC02A40 = (psx_brA_BFC02A40 == psx_brB_BFC02A40); - psx_delay_BFC02A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02A44: 24010078 addiu $at, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24010078u, cpu->gpr[1], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A44u); -#endif - if (psx_delay_BFC02A40) { - psx_delay_BFC02A40 = 0; - if (psx_taken_BFC02A40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A1Cu); - goto label_BFC02A1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A48u); - } -label_BFC02A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC02A48: 1041FFF0 beq $v0, $at, 0xBFC02A0C */ - uint32_t psx_brA_BFC02A48 = cpu->gpr[2]; uint32_t psx_brB_BFC02A48 = cpu->gpr[1]; - psx_taken_BFC02A48 = (psx_brA_BFC02A48 == psx_brB_BFC02A48); - psx_delay_BFC02A48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02A4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02A4Cu); -#endif - if (psx_delay_BFC02A48) { - psx_delay_BFC02A48 = 0; - if (psx_taken_BFC02A48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A0Cu); - goto label_BFC02A0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A50u); - } -label_BFC02A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC02A50: 24150008 addiu $s5, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24150008u, cpu->gpr[21], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A50u); -#endif -label_BFC02A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02A54: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC02A5Cu; /* jal link before delay slot */ - psx_delay_BFC02A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02A58: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A58u); -#endif - if (psx_delay_BFC02A54) { - psx_delay_BFC02A54 = 0; - cpu->gpr[31] = 0xBFC02A5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC02A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200006u); -#endif - /* 0xBFC02A5C: 0055082B sltu $at, $v0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0055082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02A60: 10200017 beq $at, $zero, 0xBFC02AC0 */ - uint32_t psx_brA_BFC02A60 = cpu->gpr[1]; uint32_t psx_brB_BFC02A60 = cpu->gpr[0]; - psx_taken_BFC02A60 = (psx_brA_BFC02A60 == psx_brB_BFC02A60); - psx_delay_BFC02A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC02A64: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A64u); -#endif - if (psx_delay_BFC02A60) { - psx_delay_BFC02A60 = 0; - if (psx_taken_BFC02A60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02AC0u); - goto label_BFC02AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A68u); - } -label_BFC02A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC02A68: 240CFFFF addiu $t4, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC02A6C: 0195001B divu $t4, $s5 */ - { uint32_t psx_n = cpu->gpr[12]; uint32_t psx_d = cpu->gpr[21]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0195001Bu, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[21]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC02A70: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02A70u); return; } g_debug_last_store_pc = 0xBFC02A70u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC02A74: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02A74u); return; } g_debug_last_store_pc = 0xBFC02A74u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC02A78: 2413FFFF addiu $s3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2413FFFFu, cpu->gpr[19], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC02A7C: 0000A012 mflo $s4 */ - cpu->gpr[20] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A012u, cpu->gpr[20], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC02A80: 16A00002 bne $s5, $zero, 0xBFC02A8C */ - uint32_t psx_brA_BFC02A80 = cpu->gpr[21]; uint32_t psx_brB_BFC02A80 = cpu->gpr[0]; - psx_taken_BFC02A80 = (psx_brA_BFC02A80 != psx_brB_BFC02A80); - psx_delay_BFC02A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02A84u); -#endif - if (psx_delay_BFC02A80) { - psx_delay_BFC02A80 = 0; - if (psx_taken_BFC02A80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A8Cu); - goto label_BFC02A8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A88u); - } -label_BFC02A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC02A88: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0xBFC02A88u); return; -#ifdef PSX_COSIM - cosim_instr(0xBFC02A88u); -#endif -label_BFC02A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240000u); -#endif - /* 0xBFC02A8C: 02550019 multu $s2, $s5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[21]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02550019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[21]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A90u); -#endif - /* 0xBFC02A90: 82040000 lb $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 4, 0x10000u); - PGXP_LOAD(0x82040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02A94: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC02A98: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC02A9C: 02519021 addu $s2, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[17]; - PGXP_ALU(0x02519021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02AA0: 0FF008B0 jal 0xBFC022C0 */ - cpu->gpr[31] = 0xBFC02AA8u; /* jal link before delay slot */ - psx_delay_BFC02AA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02AA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02AA4u); -#endif - if (psx_delay_BFC02AA0) { - psx_delay_BFC02AA0 = 0; - cpu->gpr[31] = 0xBFC02AA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC022C0u); - cpu->pc = 0xBFC022C0u; return; - } -label_BFC02AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200006u); -#endif - /* 0xBFC02AA8: 0055082B sltu $at, $v0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0055082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02AAC: 1420FFF7 bne $at, $zero, 0xBFC02A8C */ - uint32_t psx_brA_BFC02AAC = cpu->gpr[1]; uint32_t psx_brB_BFC02AAC = cpu->gpr[0]; - psx_taken_BFC02AAC = (psx_brA_BFC02AAC != psx_brB_BFC02AAC); - psx_delay_BFC02AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC02AB0: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AB0u); -#endif - if (psx_delay_BFC02AAC) { - psx_delay_BFC02AAC = 0; - if (psx_taken_BFC02AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02A8Cu); - goto label_BFC02A8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02AB4u); - } -label_BFC02AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AB4u); -#endif - /* 0xBFC02AB4: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AB4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AB8u); -#endif - /* 0xBFC02AB8: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AB8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02ABC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02ABCu); -#endif -label_BFC02AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440000u); -#endif - /* 0xBFC02AC0: 02560019 multu $s2, $s6 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[22]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02560019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[22]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AC4u); -#endif - /* 0xBFC02AC4: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AC4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02AC8: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02ACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02AD0u); -#endif -label_BFC02AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AD4u); -#endif - /* 0xBFC02AD4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AD4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AD8u); -#endif - /* 0xBFC02AD8: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AD8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ADCu); -#endif - /* 0xBFC02ADC: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02ADCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AE0u); -#endif - /* 0xBFC02AE0: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AE0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AE4u); -#endif - /* 0xBFC02AE4: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AE4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02AE8: 03E00008 jr $ra */ - psx_delay_BFC02AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02AEC: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AECu); -#endif - if (psx_delay_BFC02AE8) { - psx_delay_BFC02AE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02AF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02AF0u); - int psx_delay_BFC02AF8 = 0; - int psx_delay_BFC02B08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02B00u: goto label_BFC02B00; - default: break; - } - } -label_BFC02AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02AF0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02AF4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02AF4u); return; } g_debug_last_store_pc = 0xBFC02AF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02AF8: 0FF00A54 jal 0xBFC02950 */ - cpu->gpr[31] = 0xBFC02B00u; /* jal link before delay slot */ - psx_delay_BFC02AF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02AFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02AFCu); -#endif - if (psx_delay_BFC02AF8) { - psx_delay_BFC02AF8 = 0; - cpu->gpr[31] = 0xBFC02B00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02950u); - cpu->pc = 0xBFC02950u; return; - } -label_BFC02B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B00u); -#endif - /* 0xBFC02B00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02B04: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02B08: 03E00008 jr $ra */ - psx_delay_BFC02B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02B0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02B0Cu); -#endif - if (psx_delay_BFC02B08) { - psx_delay_BFC02B08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02B10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02B10u); - int psx_delay_BFC02B20 = 0; - int psx_delay_BFC02B3C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02B28u: goto label_BFC02B28; - default: break; - } - } -label_BFC02B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02B10: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02B14: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B14u); return; } g_debug_last_store_pc = 0xBFC02B14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC02B18: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B18u); return; } g_debug_last_store_pc = 0xBFC02B18u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC02B1C: 27A50024 addiu $a1, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A50024u, cpu->gpr[5], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02B20: 0FF009CE jal 0xBFC02738 */ - cpu->gpr[31] = 0xBFC02B28u; /* jal link before delay slot */ - psx_delay_BFC02B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC02B24: 2406000A addiu $a2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2406000Au, cpu->gpr[6], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B24u); -#endif - if (psx_delay_BFC02B20) { - psx_delay_BFC02B20 = 0; - cpu->gpr[31] = 0xBFC02B28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02738u); - cpu->pc = 0xBFC02738u; return; - } -label_BFC02B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B28u); -#endif - /* 0xBFC02B28: 8FAE002C lw $t6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B28u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE002Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC02B30: ADC20000 sw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B30u); return; } g_debug_last_store_pc = 0xBFC02B30u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xADC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B34u); -#endif - /* 0xBFC02B34: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B38u); -#endif - /* 0xBFC02B38: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B38u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02B3C: 03E00008 jr $ra */ - psx_delay_BFC02B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02B40: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B40u); -#endif - if (psx_delay_BFC02B3C) { - psx_delay_BFC02B3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02B50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02B50u); - int psx_delay_BFC02B50 = 0; - int psx_taken_BFC02B50 = 0; - int psx_delay_BFC02B58 = 0; - int psx_delay_BFC02B60 = 0; - int psx_taken_BFC02B60 = 0; - int psx_delay_BFC02B78 = 0; - int psx_taken_BFC02B78 = 0; - int psx_delay_BFC02B84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02B58u: goto label_BFC02B58; - case 0xBFC02B60u: goto label_BFC02B60; - case 0xBFC02B68u: goto label_BFC02B68; - case 0xBFC02B80u: goto label_BFC02B80; - default: break; - } - } -label_BFC02B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC02B50: 14800003 bne $a0, $zero, 0xBFC02B60 */ - uint32_t psx_brA_BFC02B50 = cpu->gpr[4]; uint32_t psx_brB_BFC02B50 = cpu->gpr[0]; - psx_taken_BFC02B50 = (psx_brA_BFC02B50 != psx_brB_BFC02B50); - psx_delay_BFC02B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02B54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02B54u); -#endif - if (psx_delay_BFC02B50) { - psx_delay_BFC02B50 = 0; - if (psx_taken_BFC02B50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B60u); - goto label_BFC02B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B58u); - } -label_BFC02B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02B58: 03E00008 jr $ra */ - psx_delay_BFC02B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02B5C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B5Cu); -#endif - if (psx_delay_BFC02B58) { - psx_delay_BFC02B58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02B60: 18C00007 blez $a2, 0xBFC02B80 */ - uint32_t psx_brA_BFC02B60 = cpu->gpr[6]; - psx_taken_BFC02B60 = ((int32_t)psx_brA_BFC02B60 <= 0); - psx_delay_BFC02B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02B64: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B64u); -#endif - if (psx_delay_BFC02B60) { - psx_delay_BFC02B60 = 0; - if (psx_taken_BFC02B60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B80u); - goto label_BFC02B80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B68u); - } -label_BFC02B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B68u); -#endif - /* 0xBFC02B68: 90AE0000 lbu $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x90AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02B6C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02B70: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02B74: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02B78: 1CC0FFFB bgtz $a2, 0xBFC02B68 */ - uint32_t psx_brA_BFC02B78 = cpu->gpr[6]; - psx_taken_BFC02B78 = ((int32_t)psx_brA_BFC02B78 > 0); - psx_delay_BFC02B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC02B7C: A08EFFFF sb $t6, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02B7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08EFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B7Cu); -#endif - if (psx_delay_BFC02B78) { - psx_delay_BFC02B78 = 0; - if (psx_taken_BFC02B78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B68u); - goto label_BFC02B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B80u); - } -label_BFC02B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02B80: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02B84: 03E00008 jr $ra */ - psx_delay_BFC02B84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02B88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02B88u); -#endif - if (psx_delay_BFC02B84) { - psx_delay_BFC02B84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02B8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02B8Cu); - int psx_delay_BFC02B8C = 0; - int psx_taken_BFC02B8C = 0; - int psx_delay_BFC02B94 = 0; - int psx_taken_BFC02B94 = 0; - int psx_delay_BFC02B9C = 0; - int psx_delay_BFC02BA4 = 0; - int psx_taken_BFC02BA4 = 0; - int psx_delay_BFC02BB4 = 0; - int psx_taken_BFC02BB4 = 0; - int psx_delay_BFC02BC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02B94u: goto label_BFC02B94; - case 0xBFC02B9Cu: goto label_BFC02B9C; - case 0xBFC02BA4u: goto label_BFC02BA4; - case 0xBFC02BACu: goto label_BFC02BAC; - case 0xBFC02BBCu: goto label_BFC02BBC; - default: break; - } - } -label_BFC02B8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC02B8C: 10800003 beq $a0, $zero, 0xBFC02B9C */ - uint32_t psx_brA_BFC02B8C = cpu->gpr[4]; uint32_t psx_brB_BFC02B8C = cpu->gpr[0]; - psx_taken_BFC02B8C = (psx_brA_BFC02B8C == psx_brB_BFC02B8C); - psx_delay_BFC02B8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02B90: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02B90u); -#endif - if (psx_delay_BFC02B8C) { - psx_delay_BFC02B8C = 0; - if (psx_taken_BFC02B8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B9Cu); - goto label_BFC02B9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B94u); - } -label_BFC02B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02B94: 1CC00003 bgtz $a2, 0xBFC02BA4 */ - uint32_t psx_brA_BFC02B94 = cpu->gpr[6]; - psx_taken_BFC02B94 = ((int32_t)psx_brA_BFC02B94 > 0); - psx_delay_BFC02B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02B98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02B98u); -#endif - if (psx_delay_BFC02B94) { - psx_delay_BFC02B94 = 0; - if (psx_taken_BFC02B94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BA4u); - goto label_BFC02BA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B9Cu); - } -label_BFC02B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02B9C: 03E00008 jr $ra */ - psx_delay_BFC02B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02BA0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BA0u); -#endif - if (psx_delay_BFC02B9C) { - psx_delay_BFC02B9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02BA4: 18C00005 blez $a2, 0xBFC02BBC */ - uint32_t psx_brA_BFC02BA4 = cpu->gpr[6]; - psx_taken_BFC02BA4 = ((int32_t)psx_brA_BFC02BA4 <= 0); - psx_delay_BFC02BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02BA8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BA8u); -#endif - if (psx_delay_BFC02BA4) { - psx_delay_BFC02BA4 = 0; - if (psx_taken_BFC02BA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BBCu); - goto label_BFC02BBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BACu); - } -label_BFC02BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02BAC: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC02BB0: A0850000 sb $a1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02BB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA0850000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02BB4: 1CC0FFFD bgtz $a2, 0xBFC02BAC */ - uint32_t psx_brA_BFC02BB4 = cpu->gpr[6]; - psx_taken_BFC02BB4 = ((int32_t)psx_brA_BFC02BB4 > 0); - psx_delay_BFC02BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02BB8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BB8u); -#endif - if (psx_delay_BFC02BB4) { - psx_delay_BFC02BB4 = 0; - if (psx_taken_BFC02BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BACu); - goto label_BFC02BAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BBCu); - } -label_BFC02BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02BBC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02BC0: 03E00008 jr $ra */ - psx_delay_BFC02BC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02BC4u); -#endif - if (psx_delay_BFC02BC0) { - psx_delay_BFC02BC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02BC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02BC8u); - int psx_delay_BFC02BC8 = 0; - int psx_taken_BFC02BC8 = 0; - int psx_delay_BFC02BD0 = 0; - int psx_delay_BFC02BDC = 0; - int psx_taken_BFC02BDC = 0; - int psx_delay_BFC02BEC = 0; - int psx_taken_BFC02BEC = 0; - int psx_delay_BFC02BFC = 0; - int psx_taken_BFC02BFC = 0; - int psx_delay_BFC02C14 = 0; - int psx_taken_BFC02C14 = 0; - int psx_delay_BFC02C1C = 0; - int psx_taken_BFC02C1C = 0; - int psx_delay_BFC02C24 = 0; - int psx_taken_BFC02C24 = 0; - int psx_delay_BFC02C3C = 0; - int psx_taken_BFC02C3C = 0; - int psx_delay_BFC02C48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02BD0u: goto label_BFC02BD0; - case 0xBFC02BDCu: goto label_BFC02BDC; - case 0xBFC02BE4u: goto label_BFC02BE4; - case 0xBFC02BF4u: goto label_BFC02BF4; - case 0xBFC02C04u: goto label_BFC02C04; - case 0xBFC02C1Cu: goto label_BFC02C1C; - case 0xBFC02C24u: goto label_BFC02C24; - case 0xBFC02C2Cu: goto label_BFC02C2C; - case 0xBFC02C44u: goto label_BFC02C44; - case 0xBFC02C48u: goto label_BFC02C48; - default: break; - } - } -label_BFC02BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC02BC8: 14800004 bne $a0, $zero, 0xBFC02BDC */ - uint32_t psx_brA_BFC02BC8 = cpu->gpr[4]; uint32_t psx_brB_BFC02BC8 = cpu->gpr[0]; - psx_taken_BFC02BC8 = (psx_brA_BFC02BC8 != psx_brB_BFC02BC8); - psx_delay_BFC02BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x32u); -#endif - /* 0xBFC02BCC: 00A4082B sltu $at, $a1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x00A4082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BCCu); -#endif - if (psx_delay_BFC02BC8) { - psx_delay_BFC02BC8 = 0; - if (psx_taken_BFC02BC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BDCu); - goto label_BFC02BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BD0u); - } -label_BFC02BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02BD0: 03E00008 jr $ra */ - psx_delay_BFC02BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02BD4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BD4u); -#endif - if (psx_delay_BFC02BD0) { - psx_delay_BFC02BD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02BDC: 10200011 beq $at, $zero, 0xBFC02C24 */ - uint32_t psx_brA_BFC02BDC = cpu->gpr[1]; uint32_t psx_brB_BFC02BDC = cpu->gpr[0]; - psx_taken_BFC02BDC = (psx_brA_BFC02BDC == psx_brB_BFC02BDC); - psx_delay_BFC02BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02BE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02BE0u); -#endif - if (psx_delay_BFC02BDC) { - psx_delay_BFC02BDC = 0; - if (psx_taken_BFC02BDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C24u); - goto label_BFC02C24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BE4u); - } -label_BFC02BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x64u); -#endif - /* 0xBFC02BE4: 00A61021 addu $v0, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[6]; - PGXP_ALU(0x00A61021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC02BE8: 0082082B sltu $at, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0082082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02BEC: 1020000D beq $at, $zero, 0xBFC02C24 */ - uint32_t psx_brA_BFC02BEC = cpu->gpr[1]; uint32_t psx_brB_BFC02BEC = cpu->gpr[0]; - psx_taken_BFC02BEC = (psx_brA_BFC02BEC == psx_brB_BFC02BEC); - psx_delay_BFC02BEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02BF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02BF0u); -#endif - if (psx_delay_BFC02BEC) { - psx_delay_BFC02BEC = 0; - if (psx_taken_BFC02BEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C24u); - goto label_BFC02C24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02BF4u); - } -label_BFC02BF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02BF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02BF4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC02BF8: 00862021 addu $a0, $a0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[6]; - PGXP_ALU(0x00862021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02BFC: 04C00011 bltz $a2, 0xBFC02C44 */ - uint32_t psx_brA_BFC02BFC = cpu->gpr[6]; - psx_taken_BFC02BFC = ((int32_t)psx_brA_BFC02BFC < 0); - psx_delay_BFC02BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC02C00: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C00u); -#endif - if (psx_delay_BFC02BFC) { - psx_delay_BFC02BFC = 0; - if (psx_taken_BFC02BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C44u); - goto label_BFC02C44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C04u); - } -label_BFC02C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C04u); -#endif - /* 0xBFC02C04: 90AE0000 lbu $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x90AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C08: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02C0C: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02C10: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C14: 04C1FFFB bgez $a2, 0xBFC02C04 */ - uint32_t psx_brA_BFC02C14 = cpu->gpr[6]; - psx_taken_BFC02C14 = ((int32_t)psx_brA_BFC02C14 >= 0); - psx_delay_BFC02C14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC02C18: A08E0001 sb $t6, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02C18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C18u); -#endif - if (psx_delay_BFC02C14) { - psx_delay_BFC02C14 = 0; - if (psx_taken_BFC02C14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C04u); - goto label_BFC02C04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C1Cu); - } -label_BFC02C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C1C: 1000000A beq $zero, $zero, 0xBFC02C48 */ - uint32_t psx_brA_BFC02C1C = cpu->gpr[0]; uint32_t psx_brB_BFC02C1C = cpu->gpr[0]; - psx_taken_BFC02C1C = (psx_brA_BFC02C1C == psx_brB_BFC02C1C); - psx_delay_BFC02C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02C20: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C20u); -#endif - if (psx_delay_BFC02C1C) { - psx_delay_BFC02C1C = 0; - if (psx_taken_BFC02C1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C48u); - goto label_BFC02C48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C24u); - } -label_BFC02C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C24: 18C00007 blez $a2, 0xBFC02C44 */ - uint32_t psx_brA_BFC02C24 = cpu->gpr[6]; - psx_taken_BFC02C24 = ((int32_t)psx_brA_BFC02C24 <= 0); - psx_delay_BFC02C24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC02C28: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C28u); -#endif - if (psx_delay_BFC02C24) { - psx_delay_BFC02C24 = 0; - if (psx_taken_BFC02C24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C44u); - goto label_BFC02C44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C2Cu); - } -label_BFC02C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C2Cu); -#endif - /* 0xBFC02C2C: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C30: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02C34: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02C38: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C3C: 1CC0FFFB bgtz $a2, 0xBFC02C2C */ - uint32_t psx_brA_BFC02C3C = cpu->gpr[6]; - psx_taken_BFC02C3C = ((int32_t)psx_brA_BFC02C3C > 0); - psx_delay_BFC02C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC02C40: A08FFFFF sb $t7, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02C40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08FFFFFu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C40u); -#endif - if (psx_delay_BFC02C3C) { - psx_delay_BFC02C3C = 0; - if (psx_taken_BFC02C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C2Cu); - goto label_BFC02C2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C44u); - } -label_BFC02C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02C44: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C44u); -#endif -label_BFC02C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02C48: 03E00008 jr $ra */ - psx_delay_BFC02C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02C4Cu); -#endif - if (psx_delay_BFC02C48) { - psx_delay_BFC02C48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02C50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02C50u); - int psx_delay_BFC02C50 = 0; - int psx_taken_BFC02C50 = 0; - int psx_delay_BFC02C58 = 0; - int psx_taken_BFC02C58 = 0; - int psx_delay_BFC02C60 = 0; - int psx_delay_BFC02C6C = 0; - int psx_taken_BFC02C6C = 0; - int psx_delay_BFC02C80 = 0; - int psx_taken_BFC02C80 = 0; - int psx_delay_BFC02C8C = 0; - int psx_taken_BFC02C8C = 0; - int psx_delay_BFC02C94 = 0; - int psx_taken_BFC02C94 = 0; - int psx_delay_BFC02C9C = 0; - int psx_taken_BFC02C9C = 0; - int psx_delay_BFC02CB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02C58u: goto label_BFC02C58; - case 0xBFC02C60u: goto label_BFC02C60; - case 0xBFC02C6Cu: goto label_BFC02C6C; - case 0xBFC02C74u: goto label_BFC02C74; - case 0xBFC02C88u: goto label_BFC02C88; - case 0xBFC02C94u: goto label_BFC02C94; - case 0xBFC02C9Cu: goto label_BFC02C9C; - case 0xBFC02CA4u: goto label_BFC02CA4; - case 0xBFC02CB4u: goto label_BFC02CB4; - default: break; - } - } -label_BFC02C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC02C50: 10800003 beq $a0, $zero, 0xBFC02C60 */ - uint32_t psx_brA_BFC02C50 = cpu->gpr[4]; uint32_t psx_brB_BFC02C50 = cpu->gpr[0]; - psx_taken_BFC02C50 = (psx_brA_BFC02C50 == psx_brB_BFC02C50); - psx_delay_BFC02C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02C54u); -#endif - if (psx_delay_BFC02C50) { - psx_delay_BFC02C50 = 0; - if (psx_taken_BFC02C50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C60u); - goto label_BFC02C60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C58u); - } -label_BFC02C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC02C58: 14A00004 bne $a1, $zero, 0xBFC02C6C */ - uint32_t psx_brA_BFC02C58 = cpu->gpr[5]; uint32_t psx_brB_BFC02C58 = cpu->gpr[0]; - psx_taken_BFC02C58 = (psx_brA_BFC02C58 != psx_brB_BFC02C58); - psx_delay_BFC02C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C5C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C5Cu); -#endif - if (psx_delay_BFC02C58) { - psx_delay_BFC02C58 = 0; - if (psx_taken_BFC02C58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C6Cu); - goto label_BFC02C6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C60u); - } -label_BFC02C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02C60: 03E00008 jr $ra */ - psx_delay_BFC02C60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02C64: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C64u); -#endif - if (psx_delay_BFC02C60) { - psx_delay_BFC02C60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C6C: 04C00009 bltz $a2, 0xBFC02C94 */ - uint32_t psx_brA_BFC02C6C = cpu->gpr[6]; - psx_taken_BFC02C6C = ((int32_t)psx_brA_BFC02C6C < 0); - psx_delay_BFC02C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02C70u); -#endif - if (psx_delay_BFC02C6C) { - psx_delay_BFC02C6C = 0; - if (psx_taken_BFC02C6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C94u); - goto label_BFC02C94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C74u); - } -label_BFC02C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C74u); -#endif - /* 0xBFC02C74: 90A30000 lbu $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x90A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C78u); -#endif - /* 0xBFC02C78: 90820000 lbu $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x90820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02C7C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC02C80: 14430004 bne $v0, $v1, 0xBFC02C94 */ - uint32_t psx_brA_BFC02C80 = cpu->gpr[2]; uint32_t psx_brB_BFC02C80 = cpu->gpr[3]; - psx_taken_BFC02C80 = (psx_brA_BFC02C80 != psx_brB_BFC02C80); - psx_delay_BFC02C80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02C84: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C84u); -#endif - if (psx_delay_BFC02C80) { - psx_delay_BFC02C80 = 0; - if (psx_taken_BFC02C80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C94u); - goto label_BFC02C94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C88u); - } -label_BFC02C88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C88: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C8C: 04C1FFF9 bgez $a2, 0xBFC02C74 */ - uint32_t psx_brA_BFC02C8C = cpu->gpr[6]; - psx_taken_BFC02C8C = ((int32_t)psx_brA_BFC02C8C >= 0); - psx_delay_BFC02C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02C90u); -#endif - if (psx_delay_BFC02C8C) { - psx_delay_BFC02C8C = 0; - if (psx_taken_BFC02C8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C74u); - goto label_BFC02C74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C94u); - } -label_BFC02C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02C94: 04C10003 bgez $a2, 0xBFC02CA4 */ - uint32_t psx_brA_BFC02C94 = cpu->gpr[6]; - psx_taken_BFC02C94 = ((int32_t)psx_brA_BFC02C94 >= 0); - psx_delay_BFC02C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02C98u); -#endif - if (psx_delay_BFC02C94) { - psx_delay_BFC02C94 = 0; - if (psx_taken_BFC02C94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CA4u); - goto label_BFC02CA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02C9Cu); - } -label_BFC02C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02C9C: 10000005 beq $zero, $zero, 0xBFC02CB4 */ - uint32_t psx_brA_BFC02C9C = cpu->gpr[0]; uint32_t psx_brB_BFC02C9C = cpu->gpr[0]; - psx_taken_BFC02C9C = (psx_brA_BFC02C9C == psx_brB_BFC02C9C); - psx_delay_BFC02C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC02CA0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CA0u); -#endif - if (psx_delay_BFC02C9C) { - psx_delay_BFC02C9C = 0; - if (psx_taken_BFC02C9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CB4u); - goto label_BFC02CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CA4u); - } -label_BFC02CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CA4u); -#endif - /* 0xBFC02CA4: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CA8u); -#endif - /* 0xBFC02CA8: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC02CB0: 01CF1823 subu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CB0u); -#endif -label_BFC02CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC02CB4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02CB8: 03E00008 jr $ra */ - psx_delay_BFC02CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02CBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02CBCu); -#endif - if (psx_delay_BFC02CB8) { - psx_delay_BFC02CB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02CC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02CC0u); - int psx_delay_BFC02CC0 = 0; - int psx_taken_BFC02CC0 = 0; - int psx_delay_BFC02CC8 = 0; - int psx_taken_BFC02CC8 = 0; - int psx_delay_BFC02CD0 = 0; - int psx_delay_BFC02CDC = 0; - int psx_taken_BFC02CDC = 0; - int psx_delay_BFC02CEC = 0; - int psx_taken_BFC02CEC = 0; - int psx_delay_BFC02CF4 = 0; - int psx_delay_BFC02D00 = 0; - int psx_taken_BFC02D00 = 0; - int psx_delay_BFC02D0C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02CC8u: goto label_BFC02CC8; - case 0xBFC02CD0u: goto label_BFC02CD0; - case 0xBFC02CDCu: goto label_BFC02CDC; - case 0xBFC02CE4u: goto label_BFC02CE4; - case 0xBFC02CF4u: goto label_BFC02CF4; - case 0xBFC02D00u: goto label_BFC02D00; - case 0xBFC02D08u: goto label_BFC02D08; - case 0xBFC02D0Cu: goto label_BFC02D0C; - default: break; - } - } -label_BFC02CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC02CC0: 10800003 beq $a0, $zero, 0xBFC02CD0 */ - uint32_t psx_brA_BFC02CC0 = cpu->gpr[4]; uint32_t psx_brB_BFC02CC0 = cpu->gpr[0]; - psx_taken_BFC02CC0 = (psx_brA_BFC02CC0 == psx_brB_BFC02CC0); - psx_delay_BFC02CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC02CC4: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CC4u); -#endif - if (psx_delay_BFC02CC0) { - psx_delay_BFC02CC0 = 0; - if (psx_taken_BFC02CC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CD0u); - goto label_BFC02CD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CC8u); - } -label_BFC02CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02CC8: 1CC00004 bgtz $a2, 0xBFC02CDC */ - uint32_t psx_brA_BFC02CC8 = cpu->gpr[6]; - psx_taken_BFC02CC8 = ((int32_t)psx_brA_BFC02CC8 > 0); - psx_delay_BFC02CC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02CCC: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CCCu); -#endif - if (psx_delay_BFC02CC8) { - psx_delay_BFC02CC8 = 0; - if (psx_taken_BFC02CC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CDCu); - goto label_BFC02CDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CD0u); - } -label_BFC02CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02CD0: 03E00008 jr $ra */ - psx_delay_BFC02CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02CD4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CD4u); -#endif - if (psx_delay_BFC02CD0) { - psx_delay_BFC02CD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02CDC: 04C0000B bltz $a2, 0xBFC02D0C */ - uint32_t psx_brA_BFC02CDC = cpu->gpr[6]; - psx_taken_BFC02CDC = ((int32_t)psx_brA_BFC02CDC < 0); - psx_delay_BFC02CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02CE0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CE0u); -#endif - if (psx_delay_BFC02CDC) { - psx_delay_BFC02CDC = 0; - if (psx_taken_BFC02CDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D0Cu); - goto label_BFC02D0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CE4u); - } -label_BFC02CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CE4u); -#endif - /* 0xBFC02CE4: 90820000 lbu $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x90820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02CE8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC02CEC: 14450004 bne $v0, $a1, 0xBFC02D00 */ - uint32_t psx_brA_BFC02CEC = cpu->gpr[2]; uint32_t psx_brB_BFC02CEC = cpu->gpr[5]; - psx_taken_BFC02CEC = (psx_brA_BFC02CEC != psx_brB_BFC02CEC); - psx_delay_BFC02CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02CF0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CF0u); -#endif - if (psx_delay_BFC02CEC) { - psx_delay_BFC02CEC = 0; - if (psx_taken_BFC02CEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D00u); - goto label_BFC02D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CF4u); - } -label_BFC02CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02CF4: 03E00008 jr $ra */ - psx_delay_BFC02CF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC02CF8: 2482FFFF addiu $v0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2482FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02CF8u); -#endif - if (psx_delay_BFC02CF4) { - psx_delay_BFC02CF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC02D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02D00: 04C1FFF8 bgez $a2, 0xBFC02CE4 */ - uint32_t psx_brA_BFC02D00 = cpu->gpr[6]; - psx_taken_BFC02D00 = ((int32_t)psx_brA_BFC02D00 >= 0); - psx_delay_BFC02D00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02D04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02D04u); -#endif - if (psx_delay_BFC02D00) { - psx_delay_BFC02D00 = 0; - if (psx_taken_BFC02D00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02CE4u); - goto label_BFC02CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D08u); - } -label_BFC02D08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02D08: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D08u); -#endif -label_BFC02D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02D0C: 03E00008 jr $ra */ - psx_delay_BFC02D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02D10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02D10u); -#endif - if (psx_delay_BFC02D0C) { - psx_delay_BFC02D0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02D20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02D20u); - int psx_delay_BFC02D44 = 0; - int psx_taken_BFC02D44 = 0; - int psx_delay_BFC02D5C = 0; - int psx_delay_BFC02D64 = 0; - int psx_taken_BFC02D64 = 0; - int psx_delay_BFC02D70 = 0; - int psx_taken_BFC02D70 = 0; - int psx_delay_BFC02D7C = 0; - int psx_taken_BFC02D7C = 0; - int psx_delay_BFC02DA4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02D4Cu: goto label_BFC02D4C; - case 0xBFC02D58u: goto label_BFC02D58; - case 0xBFC02D64u: goto label_BFC02D64; - case 0xBFC02D6Cu: goto label_BFC02D6C; - case 0xBFC02D78u: goto label_BFC02D78; - case 0xBFC02D7Cu: goto label_BFC02D7C; - case 0xBFC02D84u: goto label_BFC02D84; - case 0xBFC02D8Cu: goto label_BFC02D8C; - case 0xBFC02D90u: goto label_BFC02D90; - default: break; - } - } -label_BFC02D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02D20: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC02D24: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D24u); return; } g_debug_last_store_pc = 0xBFC02D24u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC02D28: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D28u); return; } g_debug_last_store_pc = 0xBFC02D28u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC02D2C: 00C08021 addu $s0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC02D30: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D30u); return; } g_debug_last_store_pc = 0xBFC02D30u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC02D34: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D34u); return; } g_debug_last_store_pc = 0xBFC02D34u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC02D38: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC02D3C: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC02D40: 00E0A021 addu $s4, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02D44: 06000011 bltz $s0, 0xBFC02D8C */ - uint32_t psx_brA_BFC02D44 = cpu->gpr[16]; - psx_taken_BFC02D44 = ((int32_t)psx_brA_BFC02D44 < 0); - psx_delay_BFC02D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02D48: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D48u); return; } g_debug_last_store_pc = 0xBFC02D48u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D48u); -#endif - if (psx_delay_BFC02D44) { - psx_delay_BFC02D44 = 0; - if (psx_taken_BFC02D44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D8Cu); - goto label_BFC02D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D4Cu); - } -label_BFC02D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC02D4C: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D4Cu); return; } g_debug_last_store_pc = 0xBFC02D4Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D50u); -#endif - /* 0xBFC02D50: 8FB20040 lw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D50u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02D54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02D54u); -#endif -label_BFC02D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC02D58: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80040000u); -#endif - /* 0xBFC02D5C: 0240F809 jalr $ra, $s2 */ - cpu->gpr[31] = 0xBFC02D64u; /* jalr link before delay slot */ - psx_delay_BFC02D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC02D60: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D60u); -#endif - if (psx_delay_BFC02D5C) { - psx_delay_BFC02D5C = 0; - { uint32_t _t = cpu->gpr[18]; - cpu->gpr[31] = 0xBFC02D64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC02D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02D64: 14400005 bne $v0, $zero, 0xBFC02D7C */ - uint32_t psx_brA_BFC02D64 = cpu->gpr[2]; uint32_t psx_brB_BFC02D64 = cpu->gpr[0]; - psx_taken_BFC02D64 = (psx_brA_BFC02D64 != psx_brB_BFC02D64); - psx_delay_BFC02D64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02D68: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D68u); -#endif - if (psx_delay_BFC02D64) { - psx_delay_BFC02D64 = 0; - if (psx_taken_BFC02D64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D7Cu); - goto label_BFC02D7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D6Cu); - } -label_BFC02D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D6Cu); -#endif - /* 0xBFC02D6C: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D6Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02D70: 10000007 beq $zero, $zero, 0xBFC02D90 */ - uint32_t psx_brA_BFC02D70 = cpu->gpr[0]; uint32_t psx_brB_BFC02D70 = cpu->gpr[0]; - psx_taken_BFC02D70 = (psx_brA_BFC02D70 == psx_brB_BFC02D70); - psx_delay_BFC02D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC02D74: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D74u); -#endif - if (psx_delay_BFC02D70) { - psx_delay_BFC02D70 = 0; - if (psx_taken_BFC02D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D90u); - goto label_BFC02D90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D78u); - } -label_BFC02D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02D78: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D78u); -#endif -label_BFC02D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02D7C: 0601FFF6 bgez $s0, 0xBFC02D58 */ - uint32_t psx_brA_BFC02D7C = cpu->gpr[16]; - psx_taken_BFC02D7C = ((int32_t)psx_brA_BFC02D7C >= 0); - psx_delay_BFC02D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120000u); -#endif - /* 0xBFC02D80: 02348821 addu $s1, $s1, $s4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[20]; - PGXP_ALU(0x02348821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D80u); -#endif - if (psx_delay_BFC02D7C) { - psx_delay_BFC02D7C = 0; - if (psx_taken_BFC02D7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D58u); - goto label_BFC02D58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02D84u); - } -label_BFC02D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D84u); -#endif - /* 0xBFC02D84: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D84u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02D88u); -#endif -label_BFC02D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02D8C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D8Cu); -#endif -label_BFC02D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D90u); -#endif - /* 0xBFC02D90: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D90u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D94u); -#endif - /* 0xBFC02D94: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D94u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D98u); -#endif - /* 0xBFC02D98: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D98u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02D9Cu); -#endif - /* 0xBFC02D9C: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D9Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DA0u); -#endif - /* 0xBFC02DA0: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DA0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02DA4: 03E00008 jr $ra */ - psx_delay_BFC02DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02DA8: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DA8u); -#endif - if (psx_delay_BFC02DA4) { - psx_delay_BFC02DA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02DAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02DACu); - int psx_delay_BFC02DE0 = 0; - int psx_taken_BFC02DE0 = 0; - int psx_delay_BFC02DEC = 0; - int psx_taken_BFC02DEC = 0; - int psx_delay_BFC02E04 = 0; - int psx_taken_BFC02E04 = 0; - int psx_delay_BFC02E20 = 0; - int psx_delay_BFC02E28 = 0; - int psx_taken_BFC02E28 = 0; - int psx_delay_BFC02E30 = 0; - int psx_taken_BFC02E30 = 0; - int psx_delay_BFC02E40 = 0; - int psx_taken_BFC02E40 = 0; - int psx_delay_BFC02E58 = 0; - int psx_delay_BFC02E60 = 0; - int psx_taken_BFC02E60 = 0; - int psx_delay_BFC02E68 = 0; - int psx_taken_BFC02E68 = 0; - int psx_delay_BFC02E94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02DE8u: goto label_BFC02DE8; - case 0xBFC02DF4u: goto label_BFC02DF4; - case 0xBFC02DFCu: goto label_BFC02DFC; - case 0xBFC02E0Cu: goto label_BFC02E0C; - case 0xBFC02E10u: goto label_BFC02E10; - case 0xBFC02E28u: goto label_BFC02E28; - case 0xBFC02E30u: goto label_BFC02E30; - case 0xBFC02E38u: goto label_BFC02E38; - case 0xBFC02E3Cu: goto label_BFC02E3C; - case 0xBFC02E48u: goto label_BFC02E48; - case 0xBFC02E60u: goto label_BFC02E60; - case 0xBFC02E68u: goto label_BFC02E68; - case 0xBFC02E70u: goto label_BFC02E70; - case 0xBFC02E74u: goto label_BFC02E74; - default: break; - } - } -label_BFC02DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02DAC: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC02DB0: AFB60030 sw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DB0u); return; } g_debug_last_store_pc = 0xBFC02DB0u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC02DB4: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DB4u); return; } g_debug_last_store_pc = 0xBFC02DB4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC02DB8: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DB8u); return; } g_debug_last_store_pc = 0xBFC02DB8u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC02DBC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DBCu); return; } g_debug_last_store_pc = 0xBFC02DBCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC02DC0: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DC0u); return; } g_debug_last_store_pc = 0xBFC02DC0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02DC4: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DC4u); return; } g_debug_last_store_pc = 0xBFC02DC4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC02DC8: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DC8u); return; } g_debug_last_store_pc = 0xBFC02DC8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200081u); -#endif - /* 0xBFC02DCC: 00E0A821 addu $s5, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC02DD0: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC02DD4: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC02DD8: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DD8u); return; } g_debug_last_store_pc = 0xBFC02DD8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC02DDC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC02DE0: 1CC00004 bgtz $a2, 0xBFC02DF4 */ - uint32_t psx_brA_BFC02DE0 = cpu->gpr[6]; - psx_taken_BFC02DE0 = ((int32_t)psx_brA_BFC02DE0 > 0); - psx_delay_BFC02DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC02DE4: 00C09021 addu $s2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DE4u); -#endif - if (psx_delay_BFC02DE0) { - psx_delay_BFC02DE0 = 0; - if (psx_taken_BFC02DE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02DF4u); - goto label_BFC02DF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02DE8u); - } -label_BFC02DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DE8u); -#endif - /* 0xBFC02DE8: 8FB30048 lw $s3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DE8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30048u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02DEC: 10000016 beq $zero, $zero, 0xBFC02E48 */ - uint32_t psx_brA_BFC02DEC = cpu->gpr[0]; uint32_t psx_brB_BFC02DEC = cpu->gpr[0]; - psx_taken_BFC02DEC = (psx_brA_BFC02DEC == psx_brB_BFC02DEC); - psx_delay_BFC02DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02DF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02DF0u); -#endif - if (psx_delay_BFC02DEC) { - psx_delay_BFC02DEC = 0; - if (psx_taken_BFC02DEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E48u); - goto label_BFC02E48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02DF4u); - } -label_BFC02DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DF4u); -#endif - /* 0xBFC02DF4: 8FB30048 lw $s3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DF4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30048u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02DF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02DF8u); -#endif -label_BFC02DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC02DFC: 02B10019 multu $s5, $s1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[21] * (uint64_t)cpu->gpr[17]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[21])); -#endif - PGXP_MULDIV(0x02B10019u, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x70000u); -#endif - /* 0xBFC02E00: 02328021 addu $s0, $s1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[18]; - PGXP_ALU(0x02328021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02E04: 06010002 bgez $s0, 0xBFC02E10 */ - uint32_t psx_brA_BFC02E04 = cpu->gpr[16]; - psx_taken_BFC02E04 = ((int32_t)psx_brA_BFC02E04 >= 0); - psx_delay_BFC02E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10003u); -#endif - /* 0xBFC02E08: 02000821 addu $at, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E08u); -#endif - if (psx_delay_BFC02E04) { - psx_delay_BFC02E04 = 0; - if (psx_taken_BFC02E04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E10u); - goto label_BFC02E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E0Cu); - } -label_BFC02E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02E0C: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E0Cu); -#endif -label_BFC02E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC02E10: 00018043 sra $s0, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00018043u, cpu->gpr[16], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC02E14: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC02E18: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104010u); -#endif - /* 0xBFC02E1C: 028E2021 addu $a0, $s4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[14]; - PGXP_ALU(0x028E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80080000u); -#endif - /* 0xBFC02E20: 0260F809 jalr $ra, $s3 */ - cpu->gpr[31] = 0xBFC02E28u; /* jalr link before delay slot */ - psx_delay_BFC02E20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02E24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02E24u); -#endif - if (psx_delay_BFC02E20) { - psx_delay_BFC02E20 = 0; - { uint32_t _t = cpu->gpr[19]; - cpu->gpr[31] = 0xBFC02E28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC02E28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02E28: 04410003 bgez $v0, 0xBFC02E38 */ - uint32_t psx_brA_BFC02E28 = cpu->gpr[2]; - psx_taken_BFC02E28 = ((int32_t)psx_brA_BFC02E28 >= 0); - psx_delay_BFC02E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02E2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02E2Cu); -#endif - if (psx_delay_BFC02E28) { - psx_delay_BFC02E28 = 0; - if (psx_taken_BFC02E28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E38u); - goto label_BFC02E38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E30u); - } -label_BFC02E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02E30: 10000002 beq $zero, $zero, 0xBFC02E3C */ - uint32_t psx_brA_BFC02E30 = cpu->gpr[0]; uint32_t psx_brB_BFC02E30 = cpu->gpr[0]; - psx_taken_BFC02E30 = (psx_brA_BFC02E30 == psx_brB_BFC02E30); - psx_delay_BFC02E30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC02E34: 26110001 addiu $s1, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E34u); -#endif - if (psx_delay_BFC02E30) { - psx_delay_BFC02E30 = 0; - if (psx_taken_BFC02E30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E3Cu); - goto label_BFC02E3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E38u); - } -label_BFC02E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC02E38: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E38u); -#endif -label_BFC02E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60002u); -#endif - /* 0xBFC02E3C: 0232082A slt $at, $s1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0232082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02E40: 1420FFEE bne $at, $zero, 0xBFC02DFC */ - uint32_t psx_brA_BFC02E40 = cpu->gpr[1]; uint32_t psx_brB_BFC02E40 = cpu->gpr[0]; - psx_taken_BFC02E40 = (psx_brA_BFC02E40 != psx_brB_BFC02E40); - psx_delay_BFC02E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02E44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02E44u); -#endif - if (psx_delay_BFC02E40) { - psx_delay_BFC02E40 = 0; - if (psx_taken_BFC02E40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02DFCu); - goto label_BFC02DFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E48u); - } -label_BFC02E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC02E48: 02B10019 multu $s5, $s1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[21] * (uint64_t)cpu->gpr[17]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[21])); -#endif - PGXP_MULDIV(0x02B10019u, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC02E4C: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC02E50: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x118000u); -#endif - /* 0xBFC02E54: 028F8021 addu $s0, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80080000u); -#endif - /* 0xBFC02E58: 0260F809 jalr $ra, $s3 */ - cpu->gpr[31] = 0xBFC02E60u; /* jalr link before delay slot */ - psx_delay_BFC02E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC02E5C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E5Cu); -#endif - if (psx_delay_BFC02E58) { - psx_delay_BFC02E58 = 0; - { uint32_t _t = cpu->gpr[19]; - cpu->gpr[31] = 0xBFC02E60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC02E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02E60: 14400004 bne $v0, $zero, 0xBFC02E74 */ - uint32_t psx_brA_BFC02E60 = cpu->gpr[2]; uint32_t psx_brB_BFC02E60 = cpu->gpr[0]; - psx_taken_BFC02E60 = (psx_brA_BFC02E60 != psx_brB_BFC02E60); - psx_delay_BFC02E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02E64: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E64u); -#endif - if (psx_delay_BFC02E60) { - psx_delay_BFC02E60 = 0; - if (psx_taken_BFC02E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E74u); - goto label_BFC02E74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E68u); - } -label_BFC02E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02E68: 10000002 beq $zero, $zero, 0xBFC02E74 */ - uint32_t psx_brA_BFC02E68 = cpu->gpr[0]; uint32_t psx_brB_BFC02E68 = cpu->gpr[0]; - psx_taken_BFC02E68 = (psx_brA_BFC02E68 == psx_brB_BFC02E68); - psx_delay_BFC02E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC02E6C: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E6Cu); -#endif - if (psx_delay_BFC02E68) { - psx_delay_BFC02E68 = 0; - if (psx_taken_BFC02E68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E74u); - goto label_BFC02E74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02E70u); - } -label_BFC02E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC02E70: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E70u); -#endif -label_BFC02E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E74u); -#endif - /* 0xBFC02E74: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E74u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E78u); -#endif - /* 0xBFC02E78: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E78u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E7Cu); -#endif - /* 0xBFC02E7C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E7Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E80u); -#endif - /* 0xBFC02E80: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E80u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E84u); -#endif - /* 0xBFC02E84: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E84u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E88u); -#endif - /* 0xBFC02E88: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E88u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E8Cu); -#endif - /* 0xBFC02E8C: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E8Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E90u); -#endif - /* 0xBFC02E90: 8FB60030 lw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E90u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02E94: 03E00008 jr $ra */ - psx_delay_BFC02E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02E98: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02E98u); -#endif - if (psx_delay_BFC02E94) { - psx_delay_BFC02E94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02EA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02EA0u); - int psx_delay_BFC02EC0 = 0; - int psx_taken_BFC02EC0 = 0; - int psx_delay_BFC02ED4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02EC8u: goto label_BFC02EC8; - case 0xBFC02ED4u: goto label_BFC02ED4; - default: break; - } - } -label_BFC02EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02EA0: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02EA4: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC02EA8: 308200FF andi $v0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC02EAC: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC02EB0: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EB4u); -#endif - /* 0xBFC02EB4: 81CEDDB1 lb $t6, -8783($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8783; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-8783)), 14, 0x4000u); - PGXP_LOAD(0x81CEDDB1u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02EB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC02EBC: 31CF0002 andi $t7, $t6, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u; - PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC02EC0: 11E00004 beq $t7, $zero, 0xBFC02ED4 */ - uint32_t psx_brA_BFC02EC0 = cpu->gpr[15]; uint32_t psx_brB_BFC02EC0 = cpu->gpr[0]; - psx_taken_BFC02EC0 = (psx_brA_BFC02EC0 == psx_brB_BFC02EC0); - psx_delay_BFC02EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02EC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02EC4u); -#endif - if (psx_delay_BFC02EC0) { - psx_delay_BFC02EC0 = 0; - if (psx_taken_BFC02EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02ED4u); - goto label_BFC02ED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EC8u); - } -label_BFC02EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC02EC8: 2444FFE0 addiu $a0, $v0, -32 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (-32)); - PGXP_ALU(0x2444FFE0u, cpu->gpr[4], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02ECC: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02ED0: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02ED0u); -#endif -label_BFC02ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02ED4: 03E00008 jr $ra */ - psx_delay_BFC02ED4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC02ED8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02ED8u); -#endif - if (psx_delay_BFC02ED4) { - psx_delay_BFC02ED4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02EDC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02EDCu); - int psx_delay_BFC02EFC = 0; - int psx_taken_BFC02EFC = 0; - int psx_delay_BFC02F10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02F04u: goto label_BFC02F04; - case 0xBFC02F10u: goto label_BFC02F10; - default: break; - } - } -label_BFC02EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02EDC: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02EE0: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC02EE4: 308200FF andi $v0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC02EE8: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC02EEC: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EF0u); -#endif - /* 0xBFC02EF0: 81CEDDB1 lb $t6, -8783($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8783; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-8783)), 14, 0x4000u); - PGXP_LOAD(0x81CEDDB1u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02EF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC02EF8: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC02EFC: 11E00004 beq $t7, $zero, 0xBFC02F10 */ - uint32_t psx_brA_BFC02EFC = cpu->gpr[15]; uint32_t psx_brB_BFC02EFC = cpu->gpr[0]; - psx_taken_BFC02EFC = (psx_brA_BFC02EFC == psx_brB_BFC02EFC); - psx_delay_BFC02EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02F00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02F00u); -#endif - if (psx_delay_BFC02EFC) { - psx_delay_BFC02EFC = 0; - if (psx_taken_BFC02EFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F10u); - goto label_BFC02F10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F04u); - } -label_BFC02F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC02F04: 24440020 addiu $a0, $v0, 32 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (32)); - PGXP_ALU(0x24440020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02F08: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02F0C: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F0Cu); -#endif -label_BFC02F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC02F10: 03E00008 jr $ra */ - psx_delay_BFC02F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC02F14: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F14u); -#endif - if (psx_delay_BFC02F10) { - psx_delay_BFC02F10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC02F20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC02F20u); - int psx_delay_BFC02F5C = 0; - int psx_taken_BFC02F5C = 0; - int psx_delay_BFC02F68 = 0; - int psx_taken_BFC02F68 = 0; - int psx_delay_BFC02F7C = 0; - int psx_delay_BFC02F8C = 0; - int psx_taken_BFC02F8C = 0; - int psx_delay_BFC02FC8 = 0; - int psx_delay_BFC02FD0 = 0; - int psx_taken_BFC02FD0 = 0; - int psx_delay_BFC02FD8 = 0; - int psx_taken_BFC02FD8 = 0; - int psx_delay_BFC02FE8 = 0; - int psx_taken_BFC02FE8 = 0; - int psx_delay_BFC0300C = 0; - int psx_delay_BFC03014 = 0; - int psx_taken_BFC03014 = 0; - int psx_delay_BFC0301C = 0; - int psx_taken_BFC0301C = 0; - int psx_delay_BFC0302C = 0; - int psx_delay_BFC03038 = 0; - int psx_taken_BFC03038 = 0; - int psx_delay_BFC03048 = 0; - int psx_delay_BFC0305C = 0; - int psx_delay_BFC03064 = 0; - int psx_taken_BFC03064 = 0; - int psx_delay_BFC03090 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC02F58u: goto label_BFC02F58; - case 0xBFC02F64u: goto label_BFC02F64; - case 0xBFC02F70u: goto label_BFC02F70; - case 0xBFC02F74u: goto label_BFC02F74; - case 0xBFC02F84u: goto label_BFC02F84; - case 0xBFC02F94u: goto label_BFC02F94; - case 0xBFC02FB4u: goto label_BFC02FB4; - case 0xBFC02FD0u: goto label_BFC02FD0; - case 0xBFC02FD8u: goto label_BFC02FD8; - case 0xBFC02FE0u: goto label_BFC02FE0; - case 0xBFC02FF0u: goto label_BFC02FF0; - case 0xBFC03014u: goto label_BFC03014; - case 0xBFC0301Cu: goto label_BFC0301C; - case 0xBFC03024u: goto label_BFC03024; - case 0xBFC03034u: goto label_BFC03034; - case 0xBFC03038u: goto label_BFC03038; - case 0xBFC03040u: goto label_BFC03040; - case 0xBFC03050u: goto label_BFC03050; - case 0xBFC03064u: goto label_BFC03064; - case 0xBFC0306Cu: goto label_BFC0306C; - case 0xBFC03070u: goto label_BFC03070; - default: break; - } - } -label_BFC02F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC02F20: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC02F24: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F24u); return; } g_debug_last_store_pc = 0xBFC02F24u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC02F28: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F28u); return; } g_debug_last_store_pc = 0xBFC02F28u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC02F2C: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F2Cu); return; } g_debug_last_store_pc = 0xBFC02F2Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC02F30: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F30u); return; } g_debug_last_store_pc = 0xBFC02F30u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC02F34: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F34u); return; } g_debug_last_store_pc = 0xBFC02F34u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC02F38: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F38u); return; } g_debug_last_store_pc = 0xBFC02F38u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC02F3C: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F3Cu); return; } g_debug_last_store_pc = 0xBFC02F3Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC02F40: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F40u); return; } g_debug_last_store_pc = 0xBFC02F40u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC02F44: 00C0A021 addu $s4, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC02F48: 00A0A821 addu $s5, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400081u); -#endif - /* 0xBFC02F4C: 00E0B021 addu $s6, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC02F50: 0080B821 addu $s7, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC02F54: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F54u); return; } g_debug_last_store_pc = 0xBFC02F54u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F54u); -#endif -label_BFC02F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00002u); -#endif - /* 0xBFC02F58: 02F5082A slt $at, $s7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x02F5082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02F5C: 10200044 beq $at, $zero, 0xBFC03070 */ - uint32_t psx_brA_BFC02F5C = cpu->gpr[1]; uint32_t psx_brB_BFC02F5C = cpu->gpr[0]; - psx_taken_BFC02F5C = (psx_brA_BFC02F5C == psx_brB_BFC02F5C); - psx_delay_BFC02F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F60u); -#endif - /* 0xBFC02F60: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F60u); -#endif - if (psx_delay_BFC02F5C) { - psx_delay_BFC02F5C = 0; - if (psx_taken_BFC02F5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03070u); - goto label_BFC03070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F64u); - } -label_BFC02F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00010u); -#endif - /* 0xBFC02F64: 02F52021 addu $a0, $s7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[21]; - PGXP_ALU(0x02F52021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC02F68: 04810002 bgez $a0, 0xBFC02F74 */ - uint32_t psx_brA_BFC02F68 = cpu->gpr[4]; - psx_taken_BFC02F68 = ((int32_t)psx_brA_BFC02F68 >= 0); - psx_delay_BFC02F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC02F6C: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F6Cu); -#endif - if (psx_delay_BFC02F68) { - psx_delay_BFC02F68 = 0; - if (psx_taken_BFC02F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F74u); - goto label_BFC02F74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F70u); - } -label_BFC02F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC02F70: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F70u); -#endif -label_BFC02F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC02F74: 00012043 sra $a0, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00012043u, cpu->gpr[4], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC02F78: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC02F7C: 0FF00C41 jal 0xBFC03104 */ - cpu->gpr[31] = 0xBFC02F84u; /* jal link before delay slot */ - psx_delay_BFC02F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC02F80: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F80u); -#endif - if (psx_delay_BFC02F7C) { - psx_delay_BFC02F7C = 0; - cpu->gpr[31] = 0xBFC02F84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03104u); - cpu->pc = 0xBFC03104u; return; - } -label_BFC02F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00002u); -#endif - /* 0xBFC02F84: 02B7082A slt $at, $s5, $s7 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[23] ? 1 : 0); - PGXP_ALU(0x02B7082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820000u); -#endif - /* 0xBFC02F88: 26F1FFFF addiu $s1, $s7, -1 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[23] + (-1)); - PGXP_ALU(0x26F1FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02F8C: 1420002C bne $at, $zero, 0xBFC03040 */ - uint32_t psx_brA_BFC02F8C = cpu->gpr[1]; uint32_t psx_brB_BFC02F8C = cpu->gpr[0]; - psx_taken_BFC02F8C = (psx_brA_BFC02F8C != psx_brB_BFC02F8C); - psx_delay_BFC02F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210001u); -#endif - /* 0xBFC02F90: 02A08021 addu $s0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02F90u); -#endif - if (psx_delay_BFC02F8C) { - psx_delay_BFC02F8C = 0; - if (psx_taken_BFC02F8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03040u); - goto label_BFC03040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F94u); - } -label_BFC02F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120000u); -#endif - /* 0xBFC02F94: 02910019 multu $s4, $s1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[20] * (uint64_t)cpu->gpr[17]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[20])); -#endif - PGXP_MULDIV(0x02910019u, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC02F98: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02F9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02FA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300000u); -#endif - /* 0xBFC02FA4: 02950019 multu $s4, $s5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[20] * (uint64_t)cpu->gpr[21]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[20])); -#endif - PGXP_MULDIV(0x02950019u, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[21]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC02FA8: 00009812 mflo $s3 */ - cpu->gpr[19] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009812u, cpu->gpr[19], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02FB0u); -#endif -label_BFC02FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02FB4: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FB8u); -#endif - /* 0xBFC02FB8: 8C429020 lw $v0, -28640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02FB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140000u); -#endif - /* 0xBFC02FBC: 02549021 addu $s2, $s2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[20]; - PGXP_ALU(0x02549021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC02FC0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40014u); -#endif - /* 0xBFC02FC4: 00522021 addu $a0, $v0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[18]; - PGXP_ALU(0x00522021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400000u); -#endif - /* 0xBFC02FC8: 02C0F809 jalr $ra, $s6 */ - cpu->gpr[31] = 0xBFC02FD0u; /* jalr link before delay slot */ - psx_delay_BFC02FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80024u); -#endif - /* 0xBFC02FCC: 00532821 addu $a1, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[19]; - PGXP_ALU(0x00532821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FCCu); -#endif - if (psx_delay_BFC02FC8) { - psx_delay_BFC02FC8 = 0; - { uint32_t _t = cpu->gpr[22]; - cpu->gpr[31] = 0xBFC02FD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC02FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02FD0: 04410003 bgez $v0, 0xBFC02FE0 */ - uint32_t psx_brA_BFC02FD0 = cpu->gpr[2]; - psx_taken_BFC02FD0 = ((int32_t)psx_brA_BFC02FD0 >= 0); - psx_delay_BFC02FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC02FD4: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FD4u); -#endif - if (psx_delay_BFC02FD0) { - psx_delay_BFC02FD0 = 0; - if (psx_taken_BFC02FD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FE0u); - goto label_BFC02FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FD8u); - } -label_BFC02FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02FD8: 1420FFF6 bne $at, $zero, 0xBFC02FB4 */ - uint32_t psx_brA_BFC02FD8 = cpu->gpr[1]; uint32_t psx_brB_BFC02FD8 = cpu->gpr[0]; - psx_taken_BFC02FD8 = (psx_brA_BFC02FD8 != psx_brB_BFC02FD8); - psx_delay_BFC02FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02FDCu); -#endif - if (psx_delay_BFC02FD8) { - psx_delay_BFC02FD8 = 0; - if (psx_taken_BFC02FD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FB4u); - goto label_BFC02FB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FE0u); - } -label_BFC02FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC02FE0: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC02FE4: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC02FE8: 1020000C beq $at, $zero, 0xBFC0301C */ - uint32_t psx_brA_BFC02FE8 = cpu->gpr[1]; uint32_t psx_brB_BFC02FE8 = cpu->gpr[0]; - psx_taken_BFC02FE8 = (psx_brA_BFC02FE8 == psx_brB_BFC02FE8); - psx_delay_BFC02FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC02FEC: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FECu); -#endif - if (psx_delay_BFC02FE8) { - psx_delay_BFC02FE8 = 0; - if (psx_taken_BFC02FE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0301Cu); - goto label_BFC0301C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FF0u); - } -label_BFC02FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC02FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC02FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC02FF0: 02900019 multu $s4, $s0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[20] * (uint64_t)cpu->gpr[16]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[20])); -#endif - PGXP_MULDIV(0x02900019u, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[16]); -#ifdef PSX_COSIM - cosim_instr(0xBFC02FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC02FF4: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC02FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FF8u); -#endif - /* 0xBFC02FF8: 8C429020 lw $v0, -28640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02FF8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC02FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC02FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC02FFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC02FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80024u); -#endif - /* 0xBFC03000: 00532821 addu $a1, $v0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[19]; - PGXP_ALU(0x00532821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03004: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC03008: 004E2021 addu $a0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0300Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400000u); -#endif - /* 0xBFC0300C: 02C0F809 jalr $ra, $s6 */ - cpu->gpr[31] = 0xBFC03014u; /* jalr link before delay slot */ - psx_delay_BFC0300C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03010u); -#endif - if (psx_delay_BFC0300C) { - psx_delay_BFC0300C = 0; - { uint32_t _t = cpu->gpr[22]; - cpu->gpr[31] = 0xBFC03014u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC03014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03014: 1C40FFF2 bgtz $v0, 0xBFC02FE0 */ - uint32_t psx_brA_BFC03014 = cpu->gpr[2]; - psx_taken_BFC03014 = ((int32_t)psx_brA_BFC03014 > 0); - psx_delay_BFC03014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC03018: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03018u); -#endif - if (psx_delay_BFC03014) { - psx_delay_BFC03014 = 0; - if (psx_taken_BFC03014) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FE0u); - goto label_BFC02FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0301Cu); - } -label_BFC0301C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0301Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0301C: 10200006 beq $at, $zero, 0xBFC03038 */ - uint32_t psx_brA_BFC0301C = cpu->gpr[1]; uint32_t psx_brB_BFC0301C = cpu->gpr[0]; - psx_taken_BFC0301C = (psx_brA_BFC0301C == psx_brB_BFC0301C); - psx_delay_BFC0301C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC03020: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03020u); -#endif - if (psx_delay_BFC0301C) { - psx_delay_BFC0301C = 0; - if (psx_taken_BFC0301C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03038u); - goto label_BFC03038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03024u); - } -label_BFC03024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC03024: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC03028: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0302Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0302C: 0FF00C41 jal 0xBFC03104 */ - cpu->gpr[31] = 0xBFC03034u; /* jal link before delay slot */ - psx_delay_BFC0302C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC03030: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03030u); -#endif - if (psx_delay_BFC0302C) { - psx_delay_BFC0302C = 0; - cpu->gpr[31] = 0xBFC03034u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03104u); - cpu->pc = 0xBFC03104u; return; - } -label_BFC03034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC03034: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03034u); -#endif -label_BFC03038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC03038: 1420FFDE bne $at, $zero, 0xBFC02FB4 */ - uint32_t psx_brA_BFC03038 = cpu->gpr[1]; uint32_t psx_brB_BFC03038 = cpu->gpr[0]; - psx_taken_BFC03038 = (psx_brA_BFC03038 != psx_brB_BFC03038); - psx_delay_BFC03038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0303Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0303C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0303Cu); -#endif - if (psx_delay_BFC03038) { - psx_delay_BFC03038 = 0; - if (psx_taken_BFC03038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02FB4u); - goto label_BFC02FB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03040u); - } -label_BFC03040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC03040: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC03044: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03048: 0FF00C41 jal 0xBFC03104 */ - cpu->gpr[31] = 0xBFC03050u; /* jal link before delay slot */ - psx_delay_BFC03048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0304Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC0304C: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0304Cu); -#endif - if (psx_delay_BFC03048) { - psx_delay_BFC03048 = 0; - cpu->gpr[31] = 0xBFC03050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03104u); - cpu->pc = 0xBFC03104u; return; - } -label_BFC03050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC03050: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC03054: 2625FFFF addiu $a1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2625FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC03058: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0305Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0305C: 0FF00BC8 jal 0xBFC02F20 */ - cpu->gpr[31] = 0xBFC03064u; /* jal link before delay slot */ - psx_delay_BFC0305C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400081u); -#endif - /* 0xBFC03060: 02C03821 addu $a3, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03060u); -#endif - if (psx_delay_BFC0305C) { - psx_delay_BFC0305C = 0; - cpu->gpr[31] = 0xBFC03064u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F20u); - cpu->pc = 0xBFC02F20u; return; - } -label_BFC03064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03064: 1000FFBC beq $zero, $zero, 0xBFC02F58 */ - uint32_t psx_brA_BFC03064 = cpu->gpr[0]; uint32_t psx_brB_BFC03064 = cpu->gpr[0]; - psx_taken_BFC03064 = (psx_brA_BFC03064 == psx_brB_BFC03064); - psx_delay_BFC03064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820000u); -#endif - /* 0xBFC03068: 26370001 addiu $s7, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26370001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03068u); -#endif - if (psx_delay_BFC03064) { - psx_delay_BFC03064 = 0; - if (psx_taken_BFC03064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F58u); - goto label_BFC02F58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0306Cu); - } -label_BFC0306C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0306Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0306Cu); -#endif - /* 0xBFC0306C: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0306Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0306Cu); -#endif -label_BFC03070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03070u); -#endif - /* 0xBFC03070: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03070u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03074u); -#endif - /* 0xBFC03074: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03074u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03078u); -#endif - /* 0xBFC03078: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03078u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0307Cu); -#endif - /* 0xBFC0307C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0307Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0307Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03080u); -#endif - /* 0xBFC03080: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03080u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03084u); -#endif - /* 0xBFC03084: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03084u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03088u); -#endif - /* 0xBFC03088: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03088u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0308Cu); -#endif - /* 0xBFC0308C: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0308Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03090: 03E00008 jr $ra */ - psx_delay_BFC03090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03094: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03094u); -#endif - if (psx_delay_BFC03090) { - psx_delay_BFC03090 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03098(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03098u); - int psx_delay_BFC030B8 = 0; - int psx_delay_BFC030C4 = 0; - int psx_taken_BFC030C4 = 0; - int psx_delay_BFC030DC = 0; - int psx_delay_BFC030EC = 0; - int psx_delay_BFC030FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC030C0u: goto label_BFC030C0; - case 0xBFC030CCu: goto label_BFC030CC; - case 0xBFC030E4u: goto label_BFC030E4; - case 0xBFC030F4u: goto label_BFC030F4; - default: break; - } - } -label_BFC03098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03098: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0309Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0309C: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0309Cu); return; } g_debug_last_store_pc = 0xBFC0309Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0309Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC030A0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC030A4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030A4u); return; } g_debug_last_store_pc = 0xBFC030A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC030A8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC030A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030ACu); -#endif - /* 0xBFC030AC: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030ACu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC030B0: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030B0u); return; } g_debug_last_store_pc = 0xBFC030B0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC030B4: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030B4u); return; } g_debug_last_store_pc = 0xBFC030B4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC030B8: 0FF00797 jal 0xBFC01E5C */ - cpu->gpr[31] = 0xBFC030C0u; /* jal link before delay slot */ - psx_delay_BFC030B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC030BC: AC239020 sw $v1, -28640($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28640; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030BCu); return; } g_debug_last_store_pc = 0xBFC030BCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030BCu); -#endif - if (psx_delay_BFC030B8) { - psx_delay_BFC030B8 = 0; - cpu->gpr[31] = 0xBFC030C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01E5Cu); - cpu->pc = 0xBFC01E5Cu; return; - } -label_BFC030C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC030C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC030C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC030C0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC030C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC030C4: 1040000B beq $v0, $zero, 0xBFC030F4 */ - uint32_t psx_brA_BFC030C4 = cpu->gpr[2]; uint32_t psx_brB_BFC030C4 = cpu->gpr[0]; - psx_taken_BFC030C4 = (psx_brA_BFC030C4 == psx_brB_BFC030C4); - psx_delay_BFC030C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC030C8: AC229024 sw $v0, -28636($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28636; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28636)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030C8u); return; } g_debug_last_store_pc = 0xBFC030C8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030C8u); -#endif - if (psx_delay_BFC030C4) { - psx_delay_BFC030C4 = 0; - if (psx_taken_BFC030C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC030F4u); - goto label_BFC030F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC030CCu); - } -label_BFC030CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC030CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC030CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030CCu); -#endif - /* 0xBFC030CC: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030CCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030D0u); -#endif - /* 0xBFC030D0: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030D0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030D4u); -#endif - /* 0xBFC030D4: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030D4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC030D8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC030DC: 0FF00BC8 jal 0xBFC02F20 */ - cpu->gpr[31] = 0xBFC030E4u; /* jal link before delay slot */ - psx_delay_BFC030DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC030E0: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030E0u); -#endif - if (psx_delay_BFC030DC) { - psx_delay_BFC030DC = 0; - cpu->gpr[31] = 0xBFC030E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02F20u); - cpu->pc = 0xBFC02F20u; return; - } -label_BFC030E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC030E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC030E4: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030E8u); -#endif - /* 0xBFC030E8: 8C849024 lw $a0, -28636($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28636; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28636)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030E8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC030EC: 0FF0083C jal 0xBFC020F0 */ - cpu->gpr[31] = 0xBFC030F4u; /* jal link before delay slot */ - psx_delay_BFC030EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC030F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC030F0u); -#endif - if (psx_delay_BFC030EC) { - psx_delay_BFC030EC = 0; - cpu->gpr[31] = 0xBFC030F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC020F0u); - cpu->pc = 0xBFC020F0u; return; - } -label_BFC030F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC030F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC030F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030F4u); -#endif - /* 0xBFC030F4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC030F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC030F8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC030F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC030FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC030FC: 03E00008 jr $ra */ - psx_delay_BFC030FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03100u); -#endif - if (psx_delay_BFC030FC) { - psx_delay_BFC030FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03104(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03104u); - int psx_delay_BFC03144 = 0; - int psx_delay_BFC03158 = 0; - int psx_delay_BFC03170 = 0; - int psx_delay_BFC03180 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0314Cu: goto label_BFC0314C; - case 0xBFC03160u: goto label_BFC03160; - case 0xBFC03178u: goto label_BFC03178; - default: break; - } - } -label_BFC03104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC03104: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC03108: 00C30019 multu $a2, $v1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[3]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C30019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0xBFC03108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0310Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC0310C: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0310Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03110: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03114u); -#endif - /* 0xBFC03114: 8C429020 lw $v0, -28640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03114u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03118: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0311C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03120: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03120u); return; } g_debug_last_store_pc = 0xBFC03120u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03124u); -#endif - /* 0xBFC03124: 8C849024 lw $a0, -28636($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28636; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28636)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03124u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC03128: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03128u); return; } g_debug_last_store_pc = 0xBFC03128u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0312Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0312C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0312Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4024u); -#endif - /* 0xBFC03130: 004E2821 addu $a1, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03134: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03134u); return; } g_debug_last_store_pc = 0xBFC03134u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC03138: 00C70019 multu $a2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C70019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0xBFC03138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0313Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0313C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0313Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC03140: 004FC021 addu $t8, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03144: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0314Cu; /* jal link before delay slot */ - psx_delay_BFC03144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC03148: AFB80020 sw $t8, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03148u); return; } g_debug_last_store_pc = 0xBFC03148u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80020u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03148u); -#endif - if (psx_delay_BFC03144) { - psx_delay_BFC03144 = 0; - cpu->gpr[31] = 0xBFC0314Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0314C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0314Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0314Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0314Cu); -#endif - /* 0xBFC0314C: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0314Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0314Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03150u); -#endif - /* 0xBFC03150: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03150u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03154u); -#endif - /* 0xBFC03154: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03154u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03158: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC03160u; /* jal link before delay slot */ - psx_delay_BFC03158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0315Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0315C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0315Cu); -#endif - if (psx_delay_BFC03158) { - psx_delay_BFC03158 = 0; - cpu->gpr[31] = 0xBFC03160u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC03160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03160: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03164u); -#endif - /* 0xBFC03164: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03164u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03168u); -#endif - /* 0xBFC03168: 8CA59024 lw $a1, -28636($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28636; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28636)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03168u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0316Cu); -#endif - /* 0xBFC0316C: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0316Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0316Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03170: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC03178u; /* jal link before delay slot */ - psx_delay_BFC03170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03174u); -#endif - if (psx_delay_BFC03170) { - psx_delay_BFC03170 = 0; - cpu->gpr[31] = 0xBFC03178u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC03178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03178u); -#endif - /* 0xBFC03178: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03178u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0317C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03180: 03E00008 jr $ra */ - psx_delay_BFC03180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03184u); -#endif - if (psx_delay_BFC03180) { - psx_delay_BFC03180 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03190(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03190u); - int psx_delay_BFC03190 = 0; - int psx_taken_BFC03190 = 0; - int psx_delay_BFC03198 = 0; - int psx_taken_BFC03198 = 0; - int psx_delay_BFC031A0 = 0; - int psx_delay_BFC031B0 = 0; - int psx_taken_BFC031B0 = 0; - int psx_delay_BFC031C0 = 0; - int psx_taken_BFC031C0 = 0; - int psx_delay_BFC031D8 = 0; - int psx_taken_BFC031D8 = 0; - int psx_delay_BFC031EC = 0; - int psx_taken_BFC031EC = 0; - int psx_delay_BFC031F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03198u: goto label_BFC03198; - case 0xBFC031A0u: goto label_BFC031A0; - case 0xBFC031A8u: goto label_BFC031A8; - case 0xBFC031B8u: goto label_BFC031B8; - case 0xBFC031C8u: goto label_BFC031C8; - case 0xBFC031E0u: goto label_BFC031E0; - case 0xBFC031F4u: goto label_BFC031F4; - default: break; - } - } -label_BFC03190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03190: 10800003 beq $a0, $zero, 0xBFC031A0 */ - uint32_t psx_brA_BFC03190 = cpu->gpr[4]; uint32_t psx_brB_BFC03190 = cpu->gpr[0]; - psx_taken_BFC03190 = (psx_brA_BFC03190 == psx_brB_BFC03190); - psx_delay_BFC03190 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03194u); -#endif - if (psx_delay_BFC03190) { - psx_delay_BFC03190 = 0; - if (psx_taken_BFC03190) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031A0u); - goto label_BFC031A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03198u); - } -label_BFC03198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03198: 14A00003 bne $a1, $zero, 0xBFC031A8 */ - uint32_t psx_brA_BFC03198 = cpu->gpr[5]; uint32_t psx_brB_BFC03198 = cpu->gpr[0]; - psx_taken_BFC03198 = (psx_brA_BFC03198 != psx_brB_BFC03198); - psx_delay_BFC03198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0319Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0319C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0319Cu); -#endif - if (psx_delay_BFC03198) { - psx_delay_BFC03198 = 0; - if (psx_taken_BFC03198) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031A8u); - goto label_BFC031A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031A0u); - } -label_BFC031A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC031A0: 03E00008 jr $ra */ - psx_delay_BFC031A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC031A4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031A4u); -#endif - if (psx_delay_BFC031A0) { - psx_delay_BFC031A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC031A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031A8u); -#endif - /* 0xBFC031A8: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC031AC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC031B0: 10400005 beq $v0, $zero, 0xBFC031C8 */ - uint32_t psx_brA_BFC031B0 = cpu->gpr[2]; uint32_t psx_brB_BFC031B0 = cpu->gpr[0]; - psx_taken_BFC031B0 = (psx_brA_BFC031B0 == psx_brB_BFC031B0); - psx_delay_BFC031B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC031B4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031B4u); -#endif - if (psx_delay_BFC031B0) { - psx_delay_BFC031B0 = 0; - if (psx_taken_BFC031B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031C8u); - goto label_BFC031C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031B8u); - } -label_BFC031B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031B8u); -#endif - /* 0xBFC031B8: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC031BC: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC031C0: 1440FFFD bne $v0, $zero, 0xBFC031B8 */ - uint32_t psx_brA_BFC031C0 = cpu->gpr[2]; uint32_t psx_brB_BFC031C0 = cpu->gpr[0]; - psx_taken_BFC031C0 = (psx_brA_BFC031C0 != psx_brB_BFC031C0); - psx_delay_BFC031C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC031C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC031C4u); -#endif - if (psx_delay_BFC031C0) { - psx_delay_BFC031C0 = 0; - if (psx_taken_BFC031C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031B8u); - goto label_BFC031B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031C8u); - } -label_BFC031C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031C8u); -#endif - /* 0xBFC031C8: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC031CC: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC031D0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC031D4: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC031D8: 10400006 beq $v0, $zero, 0xBFC031F4 */ - uint32_t psx_brA_BFC031D8 = cpu->gpr[2]; uint32_t psx_brB_BFC031D8 = cpu->gpr[0]; - psx_taken_BFC031D8 = (psx_brA_BFC031D8 == psx_brB_BFC031D8); - psx_delay_BFC031D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC031DC: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC031DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031DCu); -#endif - if (psx_delay_BFC031D8) { - psx_delay_BFC031D8 = 0; - if (psx_taken_BFC031D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031F4u); - goto label_BFC031F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031E0u); - } -label_BFC031E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031E0u); -#endif - /* 0xBFC031E0: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC031E4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC031E8: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC031EC: 1440FFFC bne $v0, $zero, 0xBFC031E0 */ - uint32_t psx_brA_BFC031EC = cpu->gpr[2]; uint32_t psx_brB_BFC031EC = cpu->gpr[0]; - psx_taken_BFC031EC = (psx_brA_BFC031EC != psx_brB_BFC031EC); - psx_delay_BFC031EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC031F0: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC031F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031F0u); -#endif - if (psx_delay_BFC031EC) { - psx_delay_BFC031EC = 0; - if (psx_taken_BFC031EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031E0u); - goto label_BFC031E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC031F4u); - } -label_BFC031F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC031F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC031F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC031F4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC031F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC031F8: 03E00008 jr $ra */ - psx_delay_BFC031F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC031FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC031FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC031FCu); -#endif - if (psx_delay_BFC031F8) { - psx_delay_BFC031F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03200(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03200u); - int psx_delay_BFC03200 = 0; - int psx_taken_BFC03200 = 0; - int psx_delay_BFC03208 = 0; - int psx_taken_BFC03208 = 0; - int psx_delay_BFC03210 = 0; - int psx_delay_BFC03220 = 0; - int psx_taken_BFC03220 = 0; - int psx_delay_BFC03230 = 0; - int psx_taken_BFC03230 = 0; - int psx_delay_BFC03248 = 0; - int psx_taken_BFC03248 = 0; - int psx_delay_BFC03254 = 0; - int psx_taken_BFC03254 = 0; - int psx_delay_BFC03260 = 0; - int psx_taken_BFC03260 = 0; - int psx_delay_BFC03274 = 0; - int psx_taken_BFC03274 = 0; - int psx_delay_BFC03280 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03208u: goto label_BFC03208; - case 0xBFC03210u: goto label_BFC03210; - case 0xBFC03218u: goto label_BFC03218; - case 0xBFC03228u: goto label_BFC03228; - case 0xBFC03238u: goto label_BFC03238; - case 0xBFC03250u: goto label_BFC03250; - case 0xBFC0325Cu: goto label_BFC0325C; - case 0xBFC03268u: goto label_BFC03268; - case 0xBFC0327Cu: goto label_BFC0327C; - default: break; - } - } -label_BFC03200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03200: 10800003 beq $a0, $zero, 0xBFC03210 */ - uint32_t psx_brA_BFC03200 = cpu->gpr[4]; uint32_t psx_brB_BFC03200 = cpu->gpr[0]; - psx_taken_BFC03200 = (psx_brA_BFC03200 == psx_brB_BFC03200); - psx_delay_BFC03200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03204u); -#endif - if (psx_delay_BFC03200) { - psx_delay_BFC03200 = 0; - if (psx_taken_BFC03200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03210u); - goto label_BFC03210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03208u); - } -label_BFC03208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03208: 14A00003 bne $a1, $zero, 0xBFC03218 */ - uint32_t psx_brA_BFC03208 = cpu->gpr[5]; uint32_t psx_brB_BFC03208 = cpu->gpr[0]; - psx_taken_BFC03208 = (psx_brA_BFC03208 != psx_brB_BFC03208); - psx_delay_BFC03208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0320Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0320C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0320Cu); -#endif - if (psx_delay_BFC03208) { - psx_delay_BFC03208 = 0; - if (psx_taken_BFC03208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03218u); - goto label_BFC03218; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03210u); - } -label_BFC03210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03210: 03E00008 jr $ra */ - psx_delay_BFC03210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03214: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03214u); -#endif - if (psx_delay_BFC03210) { - psx_delay_BFC03210 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03218u); -#endif - /* 0xBFC03218: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0321Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0321C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0321Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03220: 10400005 beq $v0, $zero, 0xBFC03238 */ - uint32_t psx_brA_BFC03220 = cpu->gpr[2]; uint32_t psx_brB_BFC03220 = cpu->gpr[0]; - psx_taken_BFC03220 = (psx_brA_BFC03220 == psx_brB_BFC03220); - psx_delay_BFC03220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03224: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03224u); -#endif - if (psx_delay_BFC03220) { - psx_delay_BFC03220 = 0; - if (psx_taken_BFC03220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03238u); - goto label_BFC03238; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03228u); - } -label_BFC03228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03228u); -#endif - /* 0xBFC03228: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0322C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03230: 1440FFFD bne $v0, $zero, 0xBFC03228 */ - uint32_t psx_brA_BFC03230 = cpu->gpr[2]; uint32_t psx_brB_BFC03230 = cpu->gpr[0]; - psx_taken_BFC03230 = (psx_brA_BFC03230 != psx_brB_BFC03230); - psx_delay_BFC03230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03234: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03234u); -#endif - if (psx_delay_BFC03230) { - psx_delay_BFC03230 = 0; - if (psx_taken_BFC03230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03228u); - goto label_BFC03228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03238u); - } -label_BFC03238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03238u); -#endif - /* 0xBFC03238: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0323C: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03240: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03244: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03248: 1040000C beq $v0, $zero, 0xBFC0327C */ - uint32_t psx_brA_BFC03248 = cpu->gpr[2]; uint32_t psx_brB_BFC03248 = cpu->gpr[0]; - psx_taken_BFC03248 = (psx_brA_BFC03248 == psx_brB_BFC03248); - psx_delay_BFC03248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0324C: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0324Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0324Cu); -#endif - if (psx_delay_BFC03248) { - psx_delay_BFC03248 = 0; - if (psx_taken_BFC03248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0327Cu); - goto label_BFC0327C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03250u); - } -label_BFC03250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC03250: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC03254: 04C10004 bgez $a2, 0xBFC03268 */ - uint32_t psx_brA_BFC03254 = cpu->gpr[6]; - psx_taken_BFC03254 = ((int32_t)psx_brA_BFC03254 >= 0); - psx_delay_BFC03254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03258: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03258u); -#endif - if (psx_delay_BFC03254) { - psx_delay_BFC03254 = 0; - if (psx_taken_BFC03254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03268u); - goto label_BFC03268; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0325Cu); - } -label_BFC0325C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0325Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0325C: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03260: 10000006 beq $zero, $zero, 0xBFC0327C */ - uint32_t psx_brA_BFC03260 = cpu->gpr[0]; uint32_t psx_brB_BFC03260 = cpu->gpr[0]; - psx_taken_BFC03260 = (psx_brA_BFC03260 == psx_brB_BFC03260); - psx_delay_BFC03260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03264: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03264u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03264u); -#endif - if (psx_delay_BFC03260) { - psx_delay_BFC03260 = 0; - if (psx_taken_BFC03260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0327Cu); - goto label_BFC0327C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03268u); - } -label_BFC03268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03268u); -#endif - /* 0xBFC03268: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0326Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0326C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0326Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03270: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03274: 1440FFF6 bne $v0, $zero, 0xBFC03250 */ - uint32_t psx_brA_BFC03274 = cpu->gpr[2]; uint32_t psx_brB_BFC03274 = cpu->gpr[0]; - psx_taken_BFC03274 = (psx_brA_BFC03274 != psx_brB_BFC03274); - psx_delay_BFC03274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC03278: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03278u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03278u); -#endif - if (psx_delay_BFC03274) { - psx_delay_BFC03274 = 0; - if (psx_taken_BFC03274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03250u); - goto label_BFC03250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0327Cu); - } -label_BFC0327C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0327Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0327C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03280: 03E00008 jr $ra */ - psx_delay_BFC03280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03284: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03284u); -#endif - if (psx_delay_BFC03280) { - psx_delay_BFC03280 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03288(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03288u); - int psx_delay_BFC03288 = 0; - int psx_taken_BFC03288 = 0; - int psx_delay_BFC03290 = 0; - int psx_taken_BFC03290 = 0; - int psx_delay_BFC03298 = 0; - int psx_taken_BFC03298 = 0; - int psx_delay_BFC032A0 = 0; - int psx_delay_BFC032A8 = 0; - int psx_taken_BFC032A8 = 0; - int psx_delay_BFC032B0 = 0; - int psx_delay_BFC032B8 = 0; - int psx_delay_BFC032CC = 0; - int psx_taken_BFC032CC = 0; - int psx_delay_BFC032D8 = 0; - int psx_taken_BFC032D8 = 0; - int psx_delay_BFC032E0 = 0; - int psx_delay_BFC032F4 = 0; - int psx_taken_BFC032F4 = 0; - int psx_delay_BFC03308 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03290u: goto label_BFC03290; - case 0xBFC03298u: goto label_BFC03298; - case 0xBFC032A0u: goto label_BFC032A0; - case 0xBFC032A8u: goto label_BFC032A8; - case 0xBFC032B0u: goto label_BFC032B0; - case 0xBFC032B8u: goto label_BFC032B8; - case 0xBFC032C0u: goto label_BFC032C0; - case 0xBFC032D4u: goto label_BFC032D4; - case 0xBFC032D8u: goto label_BFC032D8; - case 0xBFC032E0u: goto label_BFC032E0; - case 0xBFC032E8u: goto label_BFC032E8; - case 0xBFC032FCu: goto label_BFC032FC; - default: break; - } - } -label_BFC03288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03288: 10800003 beq $a0, $zero, 0xBFC03298 */ - uint32_t psx_brA_BFC03288 = cpu->gpr[4]; uint32_t psx_brB_BFC03288 = cpu->gpr[0]; - psx_taken_BFC03288 = (psx_brA_BFC03288 == psx_brB_BFC03288); - psx_delay_BFC03288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0328C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0328Cu); -#endif - if (psx_delay_BFC03288) { - psx_delay_BFC03288 = 0; - if (psx_taken_BFC03288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03298u); - goto label_BFC03298; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03290u); - } -label_BFC03290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03290: 14A0000B bne $a1, $zero, 0xBFC032C0 */ - uint32_t psx_brA_BFC03290 = cpu->gpr[5]; uint32_t psx_brB_BFC03290 = cpu->gpr[0]; - psx_taken_BFC03290 = (psx_brA_BFC03290 != psx_brB_BFC03290); - psx_delay_BFC03290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03294u); -#endif - if (psx_delay_BFC03290) { - psx_delay_BFC03290 = 0; - if (psx_taken_BFC03290) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032C0u); - goto label_BFC032C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03298u); - } -label_BFC03298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC03298: 14850003 bne $a0, $a1, 0xBFC032A8 */ - uint32_t psx_brA_BFC03298 = cpu->gpr[4]; uint32_t psx_brB_BFC03298 = cpu->gpr[5]; - psx_taken_BFC03298 = (psx_brA_BFC03298 != psx_brB_BFC03298); - psx_delay_BFC03298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0329Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0329C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0329Cu); -#endif - if (psx_delay_BFC03298) { - psx_delay_BFC03298 = 0; - if (psx_taken_BFC03298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032A8u); - goto label_BFC032A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032A0u); - } -label_BFC032A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC032A0: 03E00008 jr $ra */ - psx_delay_BFC032A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC032A4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032A4u); -#endif - if (psx_delay_BFC032A0) { - psx_delay_BFC032A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC032A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC032A8: 14800003 bne $a0, $zero, 0xBFC032B8 */ - uint32_t psx_brA_BFC032A8 = cpu->gpr[4]; uint32_t psx_brB_BFC032A8 = cpu->gpr[0]; - psx_taken_BFC032A8 = (psx_brA_BFC032A8 != psx_brB_BFC032A8); - psx_delay_BFC032A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC032AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC032ACu); -#endif - if (psx_delay_BFC032A8) { - psx_delay_BFC032A8 = 0; - if (psx_taken_BFC032A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032B8u); - goto label_BFC032B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032B0u); - } -label_BFC032B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC032B0: 03E00008 jr $ra */ - psx_delay_BFC032B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC032B4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032B4u); -#endif - if (psx_delay_BFC032B0) { - psx_delay_BFC032B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC032B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC032B8: 03E00008 jr $ra */ - psx_delay_BFC032B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC032BC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032BCu); -#endif - if (psx_delay_BFC032B8) { - psx_delay_BFC032B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC032C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032C0u); -#endif - /* 0xBFC032C0: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032C4u); -#endif - /* 0xBFC032C4: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC032C8: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC032CC: 1443000B bne $v0, $v1, 0xBFC032FC */ - uint32_t psx_brA_BFC032CC = cpu->gpr[2]; uint32_t psx_brB_BFC032CC = cpu->gpr[3]; - psx_taken_BFC032CC = (psx_brA_BFC032CC != psx_brB_BFC032CC); - psx_delay_BFC032CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC032D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC032D0u); -#endif - if (psx_delay_BFC032CC) { - psx_delay_BFC032CC = 0; - if (psx_taken_BFC032CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032FCu); - goto label_BFC032FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032D4u); - } -label_BFC032D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC032D4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032D4u); -#endif -label_BFC032D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC032D8: 14400003 bne $v0, $zero, 0xBFC032E8 */ - uint32_t psx_brA_BFC032D8 = cpu->gpr[2]; uint32_t psx_brB_BFC032D8 = cpu->gpr[0]; - psx_taken_BFC032D8 = (psx_brA_BFC032D8 != psx_brB_BFC032D8); - psx_delay_BFC032D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC032DC: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032DCu); -#endif - if (psx_delay_BFC032D8) { - psx_delay_BFC032D8 = 0; - if (psx_taken_BFC032D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032E8u); - goto label_BFC032E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032E0u); - } -label_BFC032E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC032E0: 03E00008 jr $ra */ - psx_delay_BFC032E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC032E4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032E4u); -#endif - if (psx_delay_BFC032E0) { - psx_delay_BFC032E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC032E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032E8u); -#endif - /* 0xBFC032E8: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032ECu); -#endif - /* 0xBFC032EC: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC032F0: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC032F4: 1043FFF8 beq $v0, $v1, 0xBFC032D8 */ - uint32_t psx_brA_BFC032F4 = cpu->gpr[2]; uint32_t psx_brB_BFC032F4 = cpu->gpr[3]; - psx_taken_BFC032F4 = (psx_brA_BFC032F4 == psx_brB_BFC032F4); - psx_delay_BFC032F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC032F8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032F8u); -#endif - if (psx_delay_BFC032F4) { - psx_delay_BFC032F4 = 0; - if (psx_taken_BFC032F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032D8u); - goto label_BFC032D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC032FCu); - } -label_BFC032FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC032FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC032FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC032FCu); -#endif - /* 0xBFC032FC: 80AEFFFF lb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-1)), 14, 0x20u); - PGXP_LOAD(0x80AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC032FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03300: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400Cu); -#endif - /* 0xBFC03304: 006E1023 subu $v0, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[14]; - PGXP_ALU(0x006E1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03308: 03E00008 jr $ra */ - psx_delay_BFC03308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0330C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0330Cu); -#endif - if (psx_delay_BFC03308) { - psx_delay_BFC03308 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03310(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03310u); - int psx_delay_BFC03310 = 0; - int psx_taken_BFC03310 = 0; - int psx_delay_BFC03318 = 0; - int psx_taken_BFC03318 = 0; - int psx_delay_BFC03320 = 0; - int psx_taken_BFC03320 = 0; - int psx_delay_BFC03328 = 0; - int psx_delay_BFC03330 = 0; - int psx_taken_BFC03330 = 0; - int psx_delay_BFC03338 = 0; - int psx_delay_BFC03340 = 0; - int psx_delay_BFC0334C = 0; - int psx_taken_BFC0334C = 0; - int psx_delay_BFC03360 = 0; - int psx_taken_BFC03360 = 0; - int psx_delay_BFC0336C = 0; - int psx_taken_BFC0336C = 0; - int psx_delay_BFC03374 = 0; - int psx_delay_BFC03380 = 0; - int psx_taken_BFC03380 = 0; - int psx_delay_BFC03394 = 0; - int psx_taken_BFC03394 = 0; - int psx_delay_BFC0339C = 0; - int psx_taken_BFC0339C = 0; - int psx_delay_BFC033A4 = 0; - int psx_taken_BFC033A4 = 0; - int psx_delay_BFC033C0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03318u: goto label_BFC03318; - case 0xBFC03320u: goto label_BFC03320; - case 0xBFC03328u: goto label_BFC03328; - case 0xBFC03330u: goto label_BFC03330; - case 0xBFC03338u: goto label_BFC03338; - case 0xBFC03340u: goto label_BFC03340; - case 0xBFC0334Cu: goto label_BFC0334C; - case 0xBFC03354u: goto label_BFC03354; - case 0xBFC03368u: goto label_BFC03368; - case 0xBFC0336Cu: goto label_BFC0336C; - case 0xBFC03374u: goto label_BFC03374; - case 0xBFC0337Cu: goto label_BFC0337C; - case 0xBFC03388u: goto label_BFC03388; - case 0xBFC0339Cu: goto label_BFC0339C; - case 0xBFC033A4u: goto label_BFC033A4; - case 0xBFC033ACu: goto label_BFC033AC; - case 0xBFC033BCu: goto label_BFC033BC; - default: break; - } - } -label_BFC03310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03310: 10800003 beq $a0, $zero, 0xBFC03320 */ - uint32_t psx_brA_BFC03310 = cpu->gpr[4]; uint32_t psx_brB_BFC03310 = cpu->gpr[0]; - psx_taken_BFC03310 = (psx_brA_BFC03310 == psx_brB_BFC03310); - psx_delay_BFC03310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03314u); -#endif - if (psx_delay_BFC03310) { - psx_delay_BFC03310 = 0; - if (psx_taken_BFC03310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03320u); - goto label_BFC03320; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03318u); - } -label_BFC03318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03318: 14A0000C bne $a1, $zero, 0xBFC0334C */ - uint32_t psx_brA_BFC03318 = cpu->gpr[5]; uint32_t psx_brB_BFC03318 = cpu->gpr[0]; - psx_taken_BFC03318 = (psx_brA_BFC03318 != psx_brB_BFC03318); - psx_delay_BFC03318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0331Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0331C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0331Cu); -#endif - if (psx_delay_BFC03318) { - psx_delay_BFC03318 = 0; - if (psx_taken_BFC03318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0334Cu); - goto label_BFC0334C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03320u); - } -label_BFC03320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC03320: 14850003 bne $a0, $a1, 0xBFC03330 */ - uint32_t psx_brA_BFC03320 = cpu->gpr[4]; uint32_t psx_brB_BFC03320 = cpu->gpr[5]; - psx_taken_BFC03320 = (psx_brA_BFC03320 != psx_brB_BFC03320); - psx_delay_BFC03320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03324: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03324u); -#endif - if (psx_delay_BFC03320) { - psx_delay_BFC03320 = 0; - if (psx_taken_BFC03320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03330u); - goto label_BFC03330; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03328u); - } -label_BFC03328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03328: 03E00008 jr $ra */ - psx_delay_BFC03328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0332C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0332Cu); -#endif - if (psx_delay_BFC03328) { - psx_delay_BFC03328 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03330: 14800003 bne $a0, $zero, 0xBFC03340 */ - uint32_t psx_brA_BFC03330 = cpu->gpr[4]; uint32_t psx_brB_BFC03330 = cpu->gpr[0]; - psx_taken_BFC03330 = (psx_brA_BFC03330 != psx_brB_BFC03330); - psx_delay_BFC03330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03334: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03334u); -#endif - if (psx_delay_BFC03330) { - psx_delay_BFC03330 = 0; - if (psx_taken_BFC03330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03340u); - goto label_BFC03340; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03338u); - } -label_BFC03338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03338: 03E00008 jr $ra */ - psx_delay_BFC03338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0333Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0333C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0333Cu); -#endif - if (psx_delay_BFC03338) { - psx_delay_BFC03338 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03340: 03E00008 jr $ra */ - psx_delay_BFC03340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03344: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03344u); -#endif - if (psx_delay_BFC03340) { - psx_delay_BFC03340 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0334C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0334Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0334Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0334Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0334C: 04C00013 bltz $a2, 0xBFC0339C */ - uint32_t psx_brA_BFC0334C = cpu->gpr[6]; - psx_taken_BFC0334C = ((int32_t)psx_brA_BFC0334C < 0); - psx_delay_BFC0334C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03350: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03350u); -#endif - if (psx_delay_BFC0334C) { - psx_delay_BFC0334C = 0; - if (psx_taken_BFC0334C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0339Cu); - goto label_BFC0339C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03354u); - } -label_BFC03354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03354u); -#endif - /* 0xBFC03354: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03358u); -#endif - /* 0xBFC03358: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0335C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC03360: 1462000E bne $v1, $v0, 0xBFC0339C */ - uint32_t psx_brA_BFC03360 = cpu->gpr[3]; uint32_t psx_brB_BFC03360 = cpu->gpr[2]; - psx_taken_BFC03360 = (psx_brA_BFC03360 != psx_brB_BFC03360); - psx_delay_BFC03360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03364: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03364u); -#endif - if (psx_delay_BFC03360) { - psx_delay_BFC03360 = 0; - if (psx_taken_BFC03360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0339Cu); - goto label_BFC0339C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03368u); - } -label_BFC03368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC03368: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03368u); -#endif -label_BFC0336C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0336Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0336C: 14600003 bne $v1, $zero, 0xBFC0337C */ - uint32_t psx_brA_BFC0336C = cpu->gpr[3]; uint32_t psx_brB_BFC0336C = cpu->gpr[0]; - psx_taken_BFC0336C = (psx_brA_BFC0336C != psx_brB_BFC0336C); - psx_delay_BFC0336C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03370: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03370u); -#endif - if (psx_delay_BFC0336C) { - psx_delay_BFC0336C = 0; - if (psx_taken_BFC0336C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0337Cu); - goto label_BFC0337C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03374u); - } -label_BFC03374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03374: 03E00008 jr $ra */ - psx_delay_BFC03374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03378: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03378u); -#endif - if (psx_delay_BFC03374) { - psx_delay_BFC03374 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0337C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0337Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0337C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC03380: 04C00006 bltz $a2, 0xBFC0339C */ - uint32_t psx_brA_BFC03380 = cpu->gpr[6]; - psx_taken_BFC03380 = ((int32_t)psx_brA_BFC03380 < 0); - psx_delay_BFC03380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03384u); -#endif - if (psx_delay_BFC03380) { - psx_delay_BFC03380 = 0; - if (psx_taken_BFC03380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0339Cu); - goto label_BFC0339C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03388u); - } -label_BFC03388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03388u); -#endif - /* 0xBFC03388: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0338Cu); -#endif - /* 0xBFC0338C: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0338Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03390: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC03394: 1062FFF5 beq $v1, $v0, 0xBFC0336C */ - uint32_t psx_brA_BFC03394 = cpu->gpr[3]; uint32_t psx_brB_BFC03394 = cpu->gpr[2]; - psx_taken_BFC03394 = (psx_brA_BFC03394 == psx_brB_BFC03394); - psx_delay_BFC03394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC03398: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03398u); -#endif - if (psx_delay_BFC03394) { - psx_delay_BFC03394 = 0; - if (psx_taken_BFC03394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0336Cu); - goto label_BFC0336C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0339Cu); - } -label_BFC0339C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0339Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0339Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0339Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0339C: 04C10003 bgez $a2, 0xBFC033AC */ - uint32_t psx_brA_BFC0339C = cpu->gpr[6]; - psx_taken_BFC0339C = ((int32_t)psx_brA_BFC0339C >= 0); - psx_delay_BFC0339C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC033A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC033A0u); -#endif - if (psx_delay_BFC0339C) { - psx_delay_BFC0339C = 0; - if (psx_taken_BFC0339C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033ACu); - goto label_BFC033AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033A4u); - } -label_BFC033A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC033A4: 10000005 beq $zero, $zero, 0xBFC033BC */ - uint32_t psx_brA_BFC033A4 = cpu->gpr[0]; uint32_t psx_brB_BFC033A4 = cpu->gpr[0]; - psx_taken_BFC033A4 = (psx_brA_BFC033A4 == psx_brB_BFC033A4); - psx_delay_BFC033A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC033A8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033A8u); -#endif - if (psx_delay_BFC033A4) { - psx_delay_BFC033A4 = 0; - if (psx_taken_BFC033A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033BCu); - goto label_BFC033BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033ACu); - } -label_BFC033AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033ACu); -#endif - /* 0xBFC033AC: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033B0u); -#endif - /* 0xBFC033B0: 80AFFFFF lb $t7, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-1)), 15, 0x20u); - PGXP_LOAD(0x80AFFFFFu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC033B4: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC033B8: 01CF1823 subu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033B8u); -#endif -label_BFC033BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC033BC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC033C0: 03E00008 jr $ra */ - psx_delay_BFC033C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC033C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC033C4u); -#endif - if (psx_delay_BFC033C0) { - psx_delay_BFC033C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC033C8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC033C8u); - int psx_delay_BFC033C8 = 0; - int psx_taken_BFC033C8 = 0; - int psx_delay_BFC033D0 = 0; - int psx_taken_BFC033D0 = 0; - int psx_delay_BFC033D8 = 0; - int psx_delay_BFC033F0 = 0; - int psx_taken_BFC033F0 = 0; - int psx_delay_BFC03404 = 0; - int psx_taken_BFC03404 = 0; - int psx_delay_BFC03410 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC033D0u: goto label_BFC033D0; - case 0xBFC033D8u: goto label_BFC033D8; - case 0xBFC033E0u: goto label_BFC033E0; - case 0xBFC033F8u: goto label_BFC033F8; - case 0xBFC0340Cu: goto label_BFC0340C; - default: break; - } - } -label_BFC033C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC033C8: 10800003 beq $a0, $zero, 0xBFC033D8 */ - uint32_t psx_brA_BFC033C8 = cpu->gpr[4]; uint32_t psx_brB_BFC033C8 = cpu->gpr[0]; - psx_taken_BFC033C8 = (psx_brA_BFC033C8 == psx_brB_BFC033C8); - psx_delay_BFC033C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC033CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC033CCu); -#endif - if (psx_delay_BFC033C8) { - psx_delay_BFC033C8 = 0; - if (psx_taken_BFC033C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033D8u); - goto label_BFC033D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033D0u); - } -label_BFC033D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC033D0: 14A00003 bne $a1, $zero, 0xBFC033E0 */ - uint32_t psx_brA_BFC033D0 = cpu->gpr[5]; uint32_t psx_brB_BFC033D0 = cpu->gpr[0]; - psx_taken_BFC033D0 = (psx_brA_BFC033D0 != psx_brB_BFC033D0); - psx_delay_BFC033D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC033D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC033D4u); -#endif - if (psx_delay_BFC033D0) { - psx_delay_BFC033D0 = 0; - if (psx_taken_BFC033D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033E0u); - goto label_BFC033E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033D8u); - } -label_BFC033D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC033D8: 03E00008 jr $ra */ - psx_delay_BFC033D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC033DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033DCu); -#endif - if (psx_delay_BFC033D8) { - psx_delay_BFC033D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC033E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033E0u); -#endif - /* 0xBFC033E0: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC033E4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC033E8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC033EC: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC033F0: 10400006 beq $v0, $zero, 0xBFC0340C */ - uint32_t psx_brA_BFC033F0 = cpu->gpr[2]; uint32_t psx_brB_BFC033F0 = cpu->gpr[0]; - psx_taken_BFC033F0 = (psx_brA_BFC033F0 == psx_brB_BFC033F0); - psx_delay_BFC033F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC033F4: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC033F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033F4u); -#endif - if (psx_delay_BFC033F0) { - psx_delay_BFC033F0 = 0; - if (psx_taken_BFC033F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0340Cu); - goto label_BFC0340C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033F8u); - } -label_BFC033F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC033F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC033F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033F8u); -#endif - /* 0xBFC033F8: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC033FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC033FC: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC033FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03400: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03404: 1440FFFC bne $v0, $zero, 0xBFC033F8 */ - uint32_t psx_brA_BFC03404 = cpu->gpr[2]; uint32_t psx_brB_BFC03404 = cpu->gpr[0]; - psx_taken_BFC03404 = (psx_brA_BFC03404 != psx_brB_BFC03404); - psx_delay_BFC03404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC03408: A082FFFF sb $v0, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03408u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA082FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03408u); -#endif - if (psx_delay_BFC03404) { - psx_delay_BFC03404 = 0; - if (psx_taken_BFC03404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033F8u); - goto label_BFC033F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0340Cu); - } -label_BFC0340C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0340Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0340C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03410: 03E00008 jr $ra */ - psx_delay_BFC03410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03414: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03414u); -#endif - if (psx_delay_BFC03410) { - psx_delay_BFC03410 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03418(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03418u); - int psx_delay_BFC03418 = 0; - int psx_taken_BFC03418 = 0; - int psx_delay_BFC03420 = 0; - int psx_taken_BFC03420 = 0; - int psx_delay_BFC03428 = 0; - int psx_delay_BFC03434 = 0; - int psx_taken_BFC03434 = 0; - int psx_delay_BFC03448 = 0; - int psx_taken_BFC03448 = 0; - int psx_delay_BFC03458 = 0; - int psx_taken_BFC03458 = 0; - int psx_delay_BFC0346C = 0; - int psx_taken_BFC0346C = 0; - int psx_delay_BFC03474 = 0; - int psx_delay_BFC03480 = 0; - int psx_taken_BFC03480 = 0; - int psx_delay_BFC0348C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03420u: goto label_BFC03420; - case 0xBFC03428u: goto label_BFC03428; - case 0xBFC03430u: goto label_BFC03430; - case 0xBFC0343Cu: goto label_BFC0343C; - case 0xBFC03450u: goto label_BFC03450; - case 0xBFC03460u: goto label_BFC03460; - case 0xBFC03474u: goto label_BFC03474; - case 0xBFC0347Cu: goto label_BFC0347C; - case 0xBFC03488u: goto label_BFC03488; - default: break; - } - } -label_BFC03418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03418: 10800003 beq $a0, $zero, 0xBFC03428 */ - uint32_t psx_brA_BFC03418 = cpu->gpr[4]; uint32_t psx_brB_BFC03418 = cpu->gpr[0]; - psx_taken_BFC03418 = (psx_brA_BFC03418 == psx_brB_BFC03418); - psx_delay_BFC03418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0341Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0341C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0341Cu); -#endif - if (psx_delay_BFC03418) { - psx_delay_BFC03418 = 0; - if (psx_taken_BFC03418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03428u); - goto label_BFC03428; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03420u); - } -label_BFC03420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03420: 14A00003 bne $a1, $zero, 0xBFC03430 */ - uint32_t psx_brA_BFC03420 = cpu->gpr[5]; uint32_t psx_brB_BFC03420 = cpu->gpr[0]; - psx_taken_BFC03420 = (psx_brA_BFC03420 != psx_brB_BFC03420); - psx_delay_BFC03420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03424: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03424u); -#endif - if (psx_delay_BFC03420) { - psx_delay_BFC03420 = 0; - if (psx_taken_BFC03420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03430u); - goto label_BFC03430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03428u); - } -label_BFC03428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03428: 03E00008 jr $ra */ - psx_delay_BFC03428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0342Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0342C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0342Cu); -#endif - if (psx_delay_BFC03428) { - psx_delay_BFC03428 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC03430: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC03434: 18C00014 blez $a2, 0xBFC03488 */ - uint32_t psx_brA_BFC03434 = cpu->gpr[6]; - psx_taken_BFC03434 = ((int32_t)psx_brA_BFC03434 <= 0); - psx_delay_BFC03434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03438: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03438u); -#endif - if (psx_delay_BFC03434) { - psx_delay_BFC03434 = 0; - if (psx_taken_BFC03434) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03488u); - goto label_BFC03488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0343Cu); - } -label_BFC0343C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0343Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0343Cu); -#endif - /* 0xBFC0343C: 80A70000 lb $a3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 7, 0x20u); - PGXP_LOAD(0x80A70000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03440: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03444: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC03448: 14E0000C bne $a3, $zero, 0xBFC0347C */ - uint32_t psx_brA_BFC03448 = cpu->gpr[7]; uint32_t psx_brB_BFC03448 = cpu->gpr[0]; - psx_taken_BFC03448 = (psx_brA_BFC03448 != psx_brB_BFC03448); - psx_delay_BFC03448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0344Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC0344C: A087FFFF sb $a3, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0344Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087FFFFu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0344Cu); -#endif - if (psx_delay_BFC03448) { - psx_delay_BFC03448 = 0; - if (psx_taken_BFC03448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0347Cu); - goto label_BFC0347C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03450u); - } -label_BFC03450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03450: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46u); -#endif - /* 0xBFC03454: 0046082A slt $at, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC03458: 10200006 beq $at, $zero, 0xBFC03474 */ - uint32_t psx_brA_BFC03458 = cpu->gpr[1]; uint32_t psx_brB_BFC03458 = cpu->gpr[0]; - psx_taken_BFC03458 = (psx_brA_BFC03458 == psx_brB_BFC03458); - psx_delay_BFC03458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0345Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0345C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0345Cu); -#endif - if (psx_delay_BFC03458) { - psx_delay_BFC03458 = 0; - if (psx_taken_BFC03458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03474u); - goto label_BFC03474; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03460u); - } -label_BFC03460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03460: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46u); -#endif - /* 0xBFC03464: 0046082A slt $at, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03468: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03468u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0346C: 1420FFFC bne $at, $zero, 0xBFC03460 */ - uint32_t psx_brA_BFC0346C = cpu->gpr[1]; uint32_t psx_brB_BFC0346C = cpu->gpr[0]; - psx_taken_BFC0346C = (psx_brA_BFC0346C != psx_brB_BFC0346C); - psx_delay_BFC0346C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03470: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03470u); -#endif - if (psx_delay_BFC0346C) { - psx_delay_BFC0346C = 0; - if (psx_taken_BFC0346C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03460u); - goto label_BFC03460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03474u); - } -label_BFC03474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03474: 03E00008 jr $ra */ - psx_delay_BFC03474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC03478: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03478u); -#endif - if (psx_delay_BFC03474) { - psx_delay_BFC03474 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0347C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0347Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0347C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC03480: 1446FFEE bne $v0, $a2, 0xBFC0343C */ - uint32_t psx_brA_BFC03480 = cpu->gpr[2]; uint32_t psx_brB_BFC03480 = cpu->gpr[6]; - psx_taken_BFC03480 = (psx_brA_BFC03480 != psx_brB_BFC03480); - psx_delay_BFC03480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03484: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03484u); -#endif - if (psx_delay_BFC03480) { - psx_delay_BFC03480 = 0; - if (psx_taken_BFC03480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0343Cu); - goto label_BFC0343C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03488u); - } -label_BFC03488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC03488: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0348C: 03E00008 jr $ra */ - psx_delay_BFC0348C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03490: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03490u); -#endif - if (psx_delay_BFC0348C) { - psx_delay_BFC0348C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03494(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03494u); - int psx_delay_BFC03494 = 0; - int psx_taken_BFC03494 = 0; - int psx_delay_BFC0349C = 0; - int psx_delay_BFC034AC = 0; - int psx_taken_BFC034AC = 0; - int psx_delay_BFC034BC = 0; - int psx_taken_BFC034BC = 0; - int psx_delay_BFC034C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0349Cu: goto label_BFC0349C; - case 0xBFC034A4u: goto label_BFC034A4; - case 0xBFC034B4u: goto label_BFC034B4; - case 0xBFC034C4u: goto label_BFC034C4; - case 0xBFC034C8u: goto label_BFC034C8; - default: break; - } - } -label_BFC03494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03494: 14800003 bne $a0, $zero, 0xBFC034A4 */ - uint32_t psx_brA_BFC03494 = cpu->gpr[4]; uint32_t psx_brB_BFC03494 = cpu->gpr[0]; - psx_taken_BFC03494 = (psx_brA_BFC03494 != psx_brB_BFC03494); - psx_delay_BFC03494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03498: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03498u); -#endif - if (psx_delay_BFC03494) { - psx_delay_BFC03494 = 0; - if (psx_taken_BFC03494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034A4u); - goto label_BFC034A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0349Cu); - } -label_BFC0349C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0349Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0349Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0349Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0349C: 03E00008 jr $ra */ - psx_delay_BFC0349C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC034A0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034A0u); -#endif - if (psx_delay_BFC0349C) { - psx_delay_BFC0349C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC034A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034A4u); -#endif - /* 0xBFC034A4: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC034A8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC034AC: 10400006 beq $v0, $zero, 0xBFC034C8 */ - uint32_t psx_brA_BFC034AC = cpu->gpr[2]; uint32_t psx_brB_BFC034AC = cpu->gpr[0]; - psx_taken_BFC034AC = (psx_brA_BFC034AC == psx_brB_BFC034AC); - psx_delay_BFC034AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC034B0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034B0u); -#endif - if (psx_delay_BFC034AC) { - psx_delay_BFC034AC = 0; - if (psx_taken_BFC034AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034C8u); - goto label_BFC034C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034B4u); - } -label_BFC034B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034B4u); -#endif - /* 0xBFC034B4: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC034B8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC034BC: 1440FFFD bne $v0, $zero, 0xBFC034B4 */ - uint32_t psx_brA_BFC034BC = cpu->gpr[2]; uint32_t psx_brB_BFC034BC = cpu->gpr[0]; - psx_taken_BFC034BC = (psx_brA_BFC034BC != psx_brB_BFC034BC); - psx_delay_BFC034BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC034C0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034C0u); -#endif - if (psx_delay_BFC034BC) { - psx_delay_BFC034BC = 0; - if (psx_taken_BFC034BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034B4u); - goto label_BFC034B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034C4u); - } -label_BFC034C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC034C4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034C4u); -#endif -label_BFC034C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC034C8: 03E00008 jr $ra */ - psx_delay_BFC034C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC034CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC034CCu); -#endif - if (psx_delay_BFC034C8) { - psx_delay_BFC034C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC034D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC034D0u); - int psx_delay_BFC034D4 = 0; - int psx_taken_BFC034D4 = 0; - int psx_delay_BFC034DC = 0; - int psx_delay_BFC034EC = 0; - int psx_taken_BFC034EC = 0; - int psx_delay_BFC034F4 = 0; - int psx_delay_BFC03500 = 0; - int psx_taken_BFC03500 = 0; - int psx_delay_BFC0350C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC034DCu: goto label_BFC034DC; - case 0xBFC034E4u: goto label_BFC034E4; - case 0xBFC034F4u: goto label_BFC034F4; - case 0xBFC034FCu: goto label_BFC034FC; - case 0xBFC03508u: goto label_BFC03508; - default: break; - } - } -label_BFC034D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC034D0: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC034D4: 14800003 bne $a0, $zero, 0xBFC034E4 */ - uint32_t psx_brA_BFC034D4 = cpu->gpr[4]; uint32_t psx_brB_BFC034D4 = cpu->gpr[0]; - psx_taken_BFC034D4 = (psx_brA_BFC034D4 != psx_brB_BFC034D4); - psx_delay_BFC034D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC034D8: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034D8u); -#endif - if (psx_delay_BFC034D4) { - psx_delay_BFC034D4 = 0; - if (psx_taken_BFC034D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034E4u); - goto label_BFC034E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034DCu); - } -label_BFC034DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC034DC: 03E00008 jr $ra */ - psx_delay_BFC034DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC034E0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034E0u); -#endif - if (psx_delay_BFC034DC) { - psx_delay_BFC034DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC034E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034E4u); -#endif - /* 0xBFC034E4: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC034E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC034E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC034EC: 14A20003 bne $a1, $v0, 0xBFC034FC */ - uint32_t psx_brA_BFC034EC = cpu->gpr[5]; uint32_t psx_brB_BFC034EC = cpu->gpr[2]; - psx_taken_BFC034EC = (psx_brA_BFC034EC != psx_brB_BFC034EC); - psx_delay_BFC034EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC034F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC034F0u); -#endif - if (psx_delay_BFC034EC) { - psx_delay_BFC034EC = 0; - if (psx_taken_BFC034EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034FCu); - goto label_BFC034FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034F4u); - } -label_BFC034F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC034F4: 03E00008 jr $ra */ - psx_delay_BFC034F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC034F8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034F8u); -#endif - if (psx_delay_BFC034F4) { - psx_delay_BFC034F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC034FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC034FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC034FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC034FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC034FC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC034FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03500: 1460FFF8 bne $v1, $zero, 0xBFC034E4 */ - uint32_t psx_brA_BFC03500 = cpu->gpr[3]; uint32_t psx_brB_BFC03500 = cpu->gpr[0]; - psx_taken_BFC03500 = (psx_brA_BFC03500 != psx_brB_BFC03500); - psx_delay_BFC03500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03504: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03504u); -#endif - if (psx_delay_BFC03500) { - psx_delay_BFC03500 = 0; - if (psx_taken_BFC03500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC034E4u); - goto label_BFC034E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03508u); - } -label_BFC03508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03508: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0350C: 03E00008 jr $ra */ - psx_delay_BFC0350C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03510u); -#endif - if (psx_delay_BFC0350C) { - psx_delay_BFC0350C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03514(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03514u); - int psx_delay_BFC03518 = 0; - int psx_taken_BFC03518 = 0; - int psx_delay_BFC03520 = 0; - int psx_delay_BFC03530 = 0; - int psx_taken_BFC03530 = 0; - int psx_delay_BFC03540 = 0; - int psx_taken_BFC03540 = 0; - int psx_delay_BFC03554 = 0; - int psx_taken_BFC03554 = 0; - int psx_delay_BFC0355C = 0; - int psx_delay_BFC03568 = 0; - int psx_taken_BFC03568 = 0; - int psx_delay_BFC03574 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03520u: goto label_BFC03520; - case 0xBFC03528u: goto label_BFC03528; - case 0xBFC03538u: goto label_BFC03538; - case 0xBFC03548u: goto label_BFC03548; - case 0xBFC0354Cu: goto label_BFC0354C; - case 0xBFC0355Cu: goto label_BFC0355C; - case 0xBFC03564u: goto label_BFC03564; - case 0xBFC03570u: goto label_BFC03570; - default: break; - } - } -label_BFC03514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03514: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03518: 14800003 bne $a0, $zero, 0xBFC03528 */ - uint32_t psx_brA_BFC03518 = cpu->gpr[4]; uint32_t psx_brB_BFC03518 = cpu->gpr[0]; - psx_taken_BFC03518 = (psx_brA_BFC03518 != psx_brB_BFC03518); - psx_delay_BFC03518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0351C: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0351Cu); -#endif - if (psx_delay_BFC03518) { - psx_delay_BFC03518 = 0; - if (psx_taken_BFC03518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03528u); - goto label_BFC03528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03520u); - } -label_BFC03520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03520: 03E00008 jr $ra */ - psx_delay_BFC03520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03524: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03524u); -#endif - if (psx_delay_BFC03520) { - psx_delay_BFC03520 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03528u); -#endif - /* 0xBFC03528: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0352C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03530: 10600005 beq $v1, $zero, 0xBFC03548 */ - uint32_t psx_brA_BFC03530 = cpu->gpr[3]; uint32_t psx_brB_BFC03530 = cpu->gpr[0]; - psx_taken_BFC03530 = (psx_brA_BFC03530 == psx_brB_BFC03530); - psx_delay_BFC03530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03534: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03534u); -#endif - if (psx_delay_BFC03530) { - psx_delay_BFC03530 = 0; - if (psx_taken_BFC03530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03548u); - goto label_BFC03548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03538u); - } -label_BFC03538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03538u); -#endif - /* 0xBFC03538: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0353Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0353C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0353Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03540: 1460FFFD bne $v1, $zero, 0xBFC03538 */ - uint32_t psx_brA_BFC03540 = cpu->gpr[3]; uint32_t psx_brB_BFC03540 = cpu->gpr[0]; - psx_taken_BFC03540 = (psx_brA_BFC03540 != psx_brB_BFC03540); - psx_delay_BFC03540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03544: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03544u); -#endif - if (psx_delay_BFC03540) { - psx_delay_BFC03540 = 0; - if (psx_taken_BFC03540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03538u); - goto label_BFC03538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03548u); - } -label_BFC03548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03548: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03548u); -#endif -label_BFC0354C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0354Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0354Cu); -#endif - /* 0xBFC0354C: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03550: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC03554: 14AE0003 bne $a1, $t6, 0xBFC03564 */ - uint32_t psx_brA_BFC03554 = cpu->gpr[5]; uint32_t psx_brB_BFC03554 = cpu->gpr[14]; - psx_taken_BFC03554 = (psx_brA_BFC03554 != psx_brB_BFC03554); - psx_delay_BFC03554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03558: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03558u); -#endif - if (psx_delay_BFC03554) { - psx_delay_BFC03554 = 0; - if (psx_taken_BFC03554) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03564u); - goto label_BFC03564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0355Cu); - } -label_BFC0355C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0355Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0355Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0355Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0355C: 03E00008 jr $ra */ - psx_delay_BFC0355C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC03560: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03560u); -#endif - if (psx_delay_BFC0355C) { - psx_delay_BFC0355C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC03564: 0044182B sltu $v1, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044182Bu, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03568: 1460FFF8 bne $v1, $zero, 0xBFC0354C */ - uint32_t psx_brA_BFC03568 = cpu->gpr[3]; uint32_t psx_brB_BFC03568 = cpu->gpr[0]; - psx_taken_BFC03568 = (psx_brA_BFC03568 != psx_brB_BFC03568); - psx_delay_BFC03568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0356C: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0356Cu); -#endif - if (psx_delay_BFC03568) { - psx_delay_BFC03568 = 0; - if (psx_taken_BFC03568) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0354Cu); - goto label_BFC0354C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03570u); - } -label_BFC03570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03570: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03574: 03E00008 jr $ra */ - psx_delay_BFC03574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03578: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03578u); -#endif - if (psx_delay_BFC03574) { - psx_delay_BFC03574 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0357C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0357Cu); - int psx_delay_BFC03580 = 0; - int psx_taken_BFC03580 = 0; - int psx_delay_BFC03588 = 0; - int psx_delay_BFC03598 = 0; - int psx_taken_BFC03598 = 0; - int psx_delay_BFC035A0 = 0; - int psx_delay_BFC035AC = 0; - int psx_taken_BFC035AC = 0; - int psx_delay_BFC035B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03588u: goto label_BFC03588; - case 0xBFC03590u: goto label_BFC03590; - case 0xBFC035A0u: goto label_BFC035A0; - case 0xBFC035A8u: goto label_BFC035A8; - case 0xBFC035B4u: goto label_BFC035B4; - default: break; - } - } -label_BFC0357C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0357Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0357C: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03580: 14800003 bne $a0, $zero, 0xBFC03590 */ - uint32_t psx_brA_BFC03580 = cpu->gpr[4]; uint32_t psx_brB_BFC03580 = cpu->gpr[0]; - psx_taken_BFC03580 = (psx_brA_BFC03580 != psx_brB_BFC03580); - psx_delay_BFC03580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03584: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03584u); -#endif - if (psx_delay_BFC03580) { - psx_delay_BFC03580 = 0; - if (psx_taken_BFC03580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03590u); - goto label_BFC03590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03588u); - } -label_BFC03588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03588: 03E00008 jr $ra */ - psx_delay_BFC03588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0358C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0358Cu); -#endif - if (psx_delay_BFC03588) { - psx_delay_BFC03588 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03590u); -#endif - /* 0xBFC03590: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC03598: 14A20003 bne $a1, $v0, 0xBFC035A8 */ - uint32_t psx_brA_BFC03598 = cpu->gpr[5]; uint32_t psx_brB_BFC03598 = cpu->gpr[2]; - psx_taken_BFC03598 = (psx_brA_BFC03598 != psx_brB_BFC03598); - psx_delay_BFC03598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0359Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0359C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0359Cu); -#endif - if (psx_delay_BFC03598) { - psx_delay_BFC03598 = 0; - if (psx_taken_BFC03598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035A8u); - goto label_BFC035A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035A0u); - } -label_BFC035A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC035A0: 03E00008 jr $ra */ - psx_delay_BFC035A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC035A4: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035A4u); -#endif - if (psx_delay_BFC035A0) { - psx_delay_BFC035A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC035A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC035A8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC035AC: 1460FFF8 bne $v1, $zero, 0xBFC03590 */ - uint32_t psx_brA_BFC035AC = cpu->gpr[3]; uint32_t psx_brB_BFC035AC = cpu->gpr[0]; - psx_taken_BFC035AC = (psx_brA_BFC035AC != psx_brB_BFC035AC); - psx_delay_BFC035AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC035B0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035B0u); -#endif - if (psx_delay_BFC035AC) { - psx_delay_BFC035AC = 0; - if (psx_taken_BFC035AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03590u); - goto label_BFC03590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035B4u); - } -label_BFC035B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC035B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC035B8: 03E00008 jr $ra */ - psx_delay_BFC035B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC035BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC035BCu); -#endif - if (psx_delay_BFC035B8) { - psx_delay_BFC035B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC035C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC035C0u); - int psx_delay_BFC035C4 = 0; - int psx_taken_BFC035C4 = 0; - int psx_delay_BFC035CC = 0; - int psx_delay_BFC035DC = 0; - int psx_taken_BFC035DC = 0; - int psx_delay_BFC035EC = 0; - int psx_taken_BFC035EC = 0; - int psx_delay_BFC03600 = 0; - int psx_taken_BFC03600 = 0; - int psx_delay_BFC03608 = 0; - int psx_delay_BFC03614 = 0; - int psx_taken_BFC03614 = 0; - int psx_delay_BFC03620 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC035CCu: goto label_BFC035CC; - case 0xBFC035D4u: goto label_BFC035D4; - case 0xBFC035E4u: goto label_BFC035E4; - case 0xBFC035F4u: goto label_BFC035F4; - case 0xBFC035F8u: goto label_BFC035F8; - case 0xBFC03608u: goto label_BFC03608; - case 0xBFC03610u: goto label_BFC03610; - case 0xBFC0361Cu: goto label_BFC0361C; - default: break; - } - } -label_BFC035C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC035C0: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC035C4: 14800003 bne $a0, $zero, 0xBFC035D4 */ - uint32_t psx_brA_BFC035C4 = cpu->gpr[4]; uint32_t psx_brB_BFC035C4 = cpu->gpr[0]; - psx_taken_BFC035C4 = (psx_brA_BFC035C4 != psx_brB_BFC035C4); - psx_delay_BFC035C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC035C8: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035C8u); -#endif - if (psx_delay_BFC035C4) { - psx_delay_BFC035C4 = 0; - if (psx_taken_BFC035C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035D4u); - goto label_BFC035D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035CCu); - } -label_BFC035CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC035CC: 03E00008 jr $ra */ - psx_delay_BFC035CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC035D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035D0u); -#endif - if (psx_delay_BFC035CC) { - psx_delay_BFC035CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC035D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035D4u); -#endif - /* 0xBFC035D4: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC035D8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC035DC: 10600005 beq $v1, $zero, 0xBFC035F4 */ - uint32_t psx_brA_BFC035DC = cpu->gpr[3]; uint32_t psx_brB_BFC035DC = cpu->gpr[0]; - psx_taken_BFC035DC = (psx_brA_BFC035DC == psx_brB_BFC035DC); - psx_delay_BFC035DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC035E0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035E0u); -#endif - if (psx_delay_BFC035DC) { - psx_delay_BFC035DC = 0; - if (psx_taken_BFC035DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035F4u); - goto label_BFC035F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035E4u); - } -label_BFC035E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035E4u); -#endif - /* 0xBFC035E4: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC035E8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC035EC: 1460FFFD bne $v1, $zero, 0xBFC035E4 */ - uint32_t psx_brA_BFC035EC = cpu->gpr[3]; uint32_t psx_brB_BFC035EC = cpu->gpr[0]; - psx_taken_BFC035EC = (psx_brA_BFC035EC != psx_brB_BFC035EC); - psx_delay_BFC035EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC035F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC035F0u); -#endif - if (psx_delay_BFC035EC) { - psx_delay_BFC035EC = 0; - if (psx_taken_BFC035EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035E4u); - goto label_BFC035E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035F4u); - } -label_BFC035F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC035F4: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035F4u); -#endif -label_BFC035F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC035F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC035F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035F8u); -#endif - /* 0xBFC035F8: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC035F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC035FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC035FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC035FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC03600: 14AE0003 bne $a1, $t6, 0xBFC03610 */ - uint32_t psx_brA_BFC03600 = cpu->gpr[5]; uint32_t psx_brB_BFC03600 = cpu->gpr[14]; - psx_taken_BFC03600 = (psx_brA_BFC03600 != psx_brB_BFC03600); - psx_delay_BFC03600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03604u); -#endif - if (psx_delay_BFC03600) { - psx_delay_BFC03600 = 0; - if (psx_taken_BFC03600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03610u); - goto label_BFC03610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03608u); - } -label_BFC03608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03608: 03E00008 jr $ra */ - psx_delay_BFC03608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0360Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0360C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0360Cu); -#endif - if (psx_delay_BFC03608) { - psx_delay_BFC03608 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC03610: 0044182B sltu $v1, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044182Bu, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03614: 1460FFF8 bne $v1, $zero, 0xBFC035F8 */ - uint32_t psx_brA_BFC03614 = cpu->gpr[3]; uint32_t psx_brB_BFC03614 = cpu->gpr[0]; - psx_taken_BFC03614 = (psx_brA_BFC03614 != psx_brB_BFC03614); - psx_delay_BFC03614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03618: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03618u); -#endif - if (psx_delay_BFC03614) { - psx_delay_BFC03614 = 0; - if (psx_taken_BFC03614) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC035F8u); - goto label_BFC035F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0361Cu); - } -label_BFC0361C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0361Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0361C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03620: 03E00008 jr $ra */ - psx_delay_BFC03620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03624u); -#endif - if (psx_delay_BFC03620) { - psx_delay_BFC03620 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03628(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03628u); - int psx_delay_BFC03630 = 0; - int psx_taken_BFC03630 = 0; - int psx_delay_BFC03640 = 0; - int psx_taken_BFC03640 = 0; - int psx_delay_BFC03650 = 0; - int psx_taken_BFC03650 = 0; - int psx_delay_BFC03658 = 0; - int psx_delay_BFC03668 = 0; - int psx_taken_BFC03668 = 0; - int psx_delay_BFC03678 = 0; - int psx_taken_BFC03678 = 0; - int psx_delay_BFC03680 = 0; - int psx_taken_BFC03680 = 0; - int psx_delay_BFC0368C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03638u: goto label_BFC03638; - case 0xBFC03640u: goto label_BFC03640; - case 0xBFC03648u: goto label_BFC03648; - case 0xBFC03650u: goto label_BFC03650; - case 0xBFC03658u: goto label_BFC03658; - case 0xBFC03660u: goto label_BFC03660; - case 0xBFC03670u: goto label_BFC03670; - case 0xBFC03680u: goto label_BFC03680; - case 0xBFC03688u: goto label_BFC03688; - case 0xBFC0368Cu: goto label_BFC0368C; - default: break; - } - } -label_BFC03628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03628u); -#endif - /* 0xBFC03628: 80830000 lb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x80830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC0362C: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03630: 10600013 beq $v1, $zero, 0xBFC03680 */ - uint32_t psx_brA_BFC03630 = cpu->gpr[3]; uint32_t psx_brB_BFC03630 = cpu->gpr[0]; - psx_taken_BFC03630 = (psx_brA_BFC03630 == psx_brB_BFC03630); - psx_delay_BFC03630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC03634: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03634u); -#endif - if (psx_delay_BFC03630) { - psx_delay_BFC03630 = 0; - if (psx_taken_BFC03630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03680u); - goto label_BFC03680; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03638u); - } -label_BFC03638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03638u); -#endif - /* 0xBFC03638: 80C70000 lb $a3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 7, 0x40u); - PGXP_LOAD(0x80C70000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0363Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0363C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0363Cu); -#endif -label_BFC03640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC03640: 10E0000B beq $a3, $zero, 0xBFC03670 */ - uint32_t psx_brA_BFC03640 = cpu->gpr[7]; uint32_t psx_brB_BFC03640 = cpu->gpr[0]; - psx_taken_BFC03640 = (psx_brA_BFC03640 == psx_brB_BFC03640); - psx_delay_BFC03640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC03644: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03644u); -#endif - if (psx_delay_BFC03640) { - psx_delay_BFC03640 = 0; - if (psx_taken_BFC03640) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03670u); - goto label_BFC03670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03648u); - } -label_BFC03648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03648u); -#endif - /* 0xBFC03648: 80A80000 lb $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x80A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0364C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0364Cu); -#endif -label_BFC03650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC03650: 14680003 bne $v1, $t0, 0xBFC03660 */ - uint32_t psx_brA_BFC03650 = cpu->gpr[3]; uint32_t psx_brB_BFC03650 = cpu->gpr[8]; - psx_taken_BFC03650 = (psx_brA_BFC03650 != psx_brB_BFC03650); - psx_delay_BFC03650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03654u); -#endif - if (psx_delay_BFC03650) { - psx_delay_BFC03650 = 0; - if (psx_taken_BFC03650) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03660u); - goto label_BFC03660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03658u); - } -label_BFC03658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03658: 03E00008 jr $ra */ - psx_delay_BFC03658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0365Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0365C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0365Cu); -#endif - if (psx_delay_BFC03658) { - psx_delay_BFC03658 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC03660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03660u); -#endif - /* 0xBFC03660: 80A80001 lb $t0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 8, 0x20u); - PGXP_LOAD(0x80A80001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03664: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC03668: 1500FFF9 bne $t0, $zero, 0xBFC03650 */ - uint32_t psx_brA_BFC03668 = cpu->gpr[8]; uint32_t psx_brB_BFC03668 = cpu->gpr[0]; - psx_taken_BFC03668 = (psx_brA_BFC03668 != psx_brB_BFC03668); - psx_delay_BFC03668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0366Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0366C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0366Cu); -#endif - if (psx_delay_BFC03668) { - psx_delay_BFC03668 = 0; - if (psx_taken_BFC03668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03650u); - goto label_BFC03650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03670u); - } -label_BFC03670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03670u); -#endif - /* 0xBFC03670: 80830001 lb $v1, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 3, 0x10u); - PGXP_LOAD(0x80830001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03674: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03678: 1460FFF1 bne $v1, $zero, 0xBFC03640 */ - uint32_t psx_brA_BFC03678 = cpu->gpr[3]; uint32_t psx_brB_BFC03678 = cpu->gpr[0]; - psx_taken_BFC03678 = (psx_brA_BFC03678 != psx_brB_BFC03678); - psx_delay_BFC03678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0367Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0367C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0367Cu); -#endif - if (psx_delay_BFC03678) { - psx_delay_BFC03678 = 0; - if (psx_taken_BFC03678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03640u); - goto label_BFC03640; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03680u); - } -label_BFC03680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC03680: 14440002 bne $v0, $a0, 0xBFC0368C */ - uint32_t psx_brA_BFC03680 = cpu->gpr[2]; uint32_t psx_brB_BFC03680 = cpu->gpr[4]; - psx_taken_BFC03680 = (psx_brA_BFC03680 != psx_brB_BFC03680); - psx_delay_BFC03680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03684: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03684u); -#endif - if (psx_delay_BFC03680) { - psx_delay_BFC03680 = 0; - if (psx_taken_BFC03680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0368Cu); - goto label_BFC0368C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03688u); - } -label_BFC03688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03688: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03688u); -#endif -label_BFC0368C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0368Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0368Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0368Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0368C: 03E00008 jr $ra */ - psx_delay_BFC0368C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03690: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03690u); -#endif - if (psx_delay_BFC0368C) { - psx_delay_BFC0368C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03694(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03694u); - int psx_delay_BFC0369C = 0; - int psx_taken_BFC0369C = 0; - int psx_delay_BFC036AC = 0; - int psx_taken_BFC036AC = 0; - int psx_delay_BFC036BC = 0; - int psx_taken_BFC036BC = 0; - int psx_delay_BFC036CC = 0; - int psx_taken_BFC036CC = 0; - int psx_delay_BFC036DC = 0; - int psx_taken_BFC036DC = 0; - int psx_delay_BFC036EC = 0; - int psx_taken_BFC036EC = 0; - int psx_delay_BFC036F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC036A4u: goto label_BFC036A4; - case 0xBFC036ACu: goto label_BFC036AC; - case 0xBFC036B4u: goto label_BFC036B4; - case 0xBFC036BCu: goto label_BFC036BC; - case 0xBFC036C4u: goto label_BFC036C4; - case 0xBFC036D4u: goto label_BFC036D4; - case 0xBFC036E4u: goto label_BFC036E4; - case 0xBFC036F4u: goto label_BFC036F4; - default: break; - } - } -label_BFC03694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03694u); -#endif - /* 0xBFC03694: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC03698: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0369Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0369C: 10400015 beq $v0, $zero, 0xBFC036F4 */ - uint32_t psx_brA_BFC0369C = cpu->gpr[2]; uint32_t psx_brB_BFC0369C = cpu->gpr[0]; - psx_taken_BFC0369C = (psx_brA_BFC0369C == psx_brB_BFC0369C); - psx_delay_BFC0369C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC036A0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036A0u); -#endif - if (psx_delay_BFC0369C) { - psx_delay_BFC0369C = 0; - if (psx_taken_BFC0369C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036F4u); - goto label_BFC036F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036A4u); - } -label_BFC036A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036A4u); -#endif - /* 0xBFC036A4: 80C70000 lb $a3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 7, 0x40u); - PGXP_LOAD(0x80C70000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036A8u); -#endif -label_BFC036AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC036AC: 10E00009 beq $a3, $zero, 0xBFC036D4 */ - uint32_t psx_brA_BFC036AC = cpu->gpr[7]; uint32_t psx_brB_BFC036AC = cpu->gpr[0]; - psx_taken_BFC036AC = (psx_brA_BFC036AC == psx_brB_BFC036AC); - psx_delay_BFC036AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC036B0: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036B0u); -#endif - if (psx_delay_BFC036AC) { - psx_delay_BFC036AC = 0; - if (psx_taken_BFC036AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036D4u); - goto label_BFC036D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036B4u); - } -label_BFC036B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036B4u); -#endif - /* 0xBFC036B4: 80A80000 lb $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x80A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036B8u); -#endif -label_BFC036BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC036BC: 10480005 beq $v0, $t0, 0xBFC036D4 */ - uint32_t psx_brA_BFC036BC = cpu->gpr[2]; uint32_t psx_brB_BFC036BC = cpu->gpr[8]; - psx_taken_BFC036BC = (psx_brA_BFC036BC == psx_brB_BFC036BC); - psx_delay_BFC036BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036C0u); -#endif - if (psx_delay_BFC036BC) { - psx_delay_BFC036BC = 0; - if (psx_taken_BFC036BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036D4u); - goto label_BFC036D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036C4u); - } -label_BFC036C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036C4u); -#endif - /* 0xBFC036C4: 80A80001 lb $t0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 8, 0x20u); - PGXP_LOAD(0x80A80001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC036C8: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC036CC: 1500FFFB bne $t0, $zero, 0xBFC036BC */ - uint32_t psx_brA_BFC036CC = cpu->gpr[8]; uint32_t psx_brB_BFC036CC = cpu->gpr[0]; - psx_taken_BFC036CC = (psx_brA_BFC036CC != psx_brB_BFC036CC); - psx_delay_BFC036CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036D0u); -#endif - if (psx_delay_BFC036CC) { - psx_delay_BFC036CC = 0; - if (psx_taken_BFC036CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036BCu); - goto label_BFC036BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036D4u); - } -label_BFC036D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036D4u); -#endif - /* 0xBFC036D4: 80AE0000 lb $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x80AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC036DC: 11C00005 beq $t6, $zero, 0xBFC036F4 */ - uint32_t psx_brA_BFC036DC = cpu->gpr[14]; uint32_t psx_brB_BFC036DC = cpu->gpr[0]; - psx_taken_BFC036DC = (psx_brA_BFC036DC == psx_brB_BFC036DC); - psx_delay_BFC036DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036E0u); -#endif - if (psx_delay_BFC036DC) { - psx_delay_BFC036DC = 0; - if (psx_taken_BFC036DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036F4u); - goto label_BFC036F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036E4u); - } -label_BFC036E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036E4u); -#endif - /* 0xBFC036E4: 80820001 lb $v0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 2, 0x10u); - PGXP_LOAD(0x80820001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC036E8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC036EC: 1440FFEF bne $v0, $zero, 0xBFC036AC */ - uint32_t psx_brA_BFC036EC = cpu->gpr[2]; uint32_t psx_brB_BFC036EC = cpu->gpr[0]; - psx_taken_BFC036EC = (psx_brA_BFC036EC != psx_brB_BFC036EC); - psx_delay_BFC036EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC036F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC036F0u); -#endif - if (psx_delay_BFC036EC) { - psx_delay_BFC036EC = 0; - if (psx_taken_BFC036EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036ACu); - goto label_BFC036AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC036F4u); - } -label_BFC036F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC036F4: 03E00008 jr $ra */ - psx_delay_BFC036F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC036F8: 00831023 subu $v0, $a0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[4] - cpu->gpr[3]; - PGXP_ALU(0x00831023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036F8u); -#endif - if (psx_delay_BFC036F4) { - psx_delay_BFC036F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC036FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC036FCu); - int psx_delay_BFC03704 = 0; - int psx_taken_BFC03704 = 0; - int psx_delay_BFC03714 = 0; - int psx_taken_BFC03714 = 0; - int psx_delay_BFC03724 = 0; - int psx_taken_BFC03724 = 0; - int psx_delay_BFC03734 = 0; - int psx_taken_BFC03734 = 0; - int psx_delay_BFC03744 = 0; - int psx_taken_BFC03744 = 0; - int psx_delay_BFC03754 = 0; - int psx_taken_BFC03754 = 0; - int psx_delay_BFC0375C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0370Cu: goto label_BFC0370C; - case 0xBFC03714u: goto label_BFC03714; - case 0xBFC0371Cu: goto label_BFC0371C; - case 0xBFC03724u: goto label_BFC03724; - case 0xBFC0372Cu: goto label_BFC0372C; - case 0xBFC0373Cu: goto label_BFC0373C; - case 0xBFC0374Cu: goto label_BFC0374C; - case 0xBFC0375Cu: goto label_BFC0375C; - default: break; - } - } -label_BFC036FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC036FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC036FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC036FCu); -#endif - /* 0xBFC036FC: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC036FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC03700: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03704: 10400015 beq $v0, $zero, 0xBFC0375C */ - uint32_t psx_brA_BFC03704 = cpu->gpr[2]; uint32_t psx_brB_BFC03704 = cpu->gpr[0]; - psx_taken_BFC03704 = (psx_brA_BFC03704 == psx_brB_BFC03704); - psx_delay_BFC03704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC03708: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03708u); -#endif - if (psx_delay_BFC03704) { - psx_delay_BFC03704 = 0; - if (psx_taken_BFC03704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0375Cu); - goto label_BFC0375C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0370Cu); - } -label_BFC0370C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0370Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0370Cu); -#endif - /* 0xBFC0370C: 80C70000 lb $a3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 7, 0x40u); - PGXP_LOAD(0x80C70000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03710u); -#endif -label_BFC03714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC03714: 10E00009 beq $a3, $zero, 0xBFC0373C */ - uint32_t psx_brA_BFC03714 = cpu->gpr[7]; uint32_t psx_brB_BFC03714 = cpu->gpr[0]; - psx_taken_BFC03714 = (psx_brA_BFC03714 == psx_brB_BFC03714); - psx_delay_BFC03714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC03718: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03718u); -#endif - if (psx_delay_BFC03714) { - psx_delay_BFC03714 = 0; - if (psx_taken_BFC03714) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0373Cu); - goto label_BFC0373C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0371Cu); - } -label_BFC0371C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0371Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0371Cu); -#endif - /* 0xBFC0371C: 80A80000 lb $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x80A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03720: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03720u); -#endif -label_BFC03724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC03724: 10480005 beq $v0, $t0, 0xBFC0373C */ - uint32_t psx_brA_BFC03724 = cpu->gpr[2]; uint32_t psx_brB_BFC03724 = cpu->gpr[8]; - psx_taken_BFC03724 = (psx_brA_BFC03724 == psx_brB_BFC03724); - psx_delay_BFC03724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03728: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03728u); -#endif - if (psx_delay_BFC03724) { - psx_delay_BFC03724 = 0; - if (psx_taken_BFC03724) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0373Cu); - goto label_BFC0373C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0372Cu); - } -label_BFC0372C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0372Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0372Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0372Cu); -#endif - /* 0xBFC0372C: 80A80001 lb $t0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 8, 0x20u); - PGXP_LOAD(0x80A80001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0372Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03730: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC03734: 1500FFFB bne $t0, $zero, 0xBFC03724 */ - uint32_t psx_brA_BFC03734 = cpu->gpr[8]; uint32_t psx_brB_BFC03734 = cpu->gpr[0]; - psx_taken_BFC03734 = (psx_brA_BFC03734 != psx_brB_BFC03734); - psx_delay_BFC03734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03738: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03738u); -#endif - if (psx_delay_BFC03734) { - psx_delay_BFC03734 = 0; - if (psx_taken_BFC03734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03724u); - goto label_BFC03724; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0373Cu); - } -label_BFC0373C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0373Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0373Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0373Cu); -#endif - /* 0xBFC0373C: 80AE0000 lb $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x80AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0373Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC03744: 15C00005 bne $t6, $zero, 0xBFC0375C */ - uint32_t psx_brA_BFC03744 = cpu->gpr[14]; uint32_t psx_brB_BFC03744 = cpu->gpr[0]; - psx_taken_BFC03744 = (psx_brA_BFC03744 != psx_brB_BFC03744); - psx_delay_BFC03744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03748: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03748u); -#endif - if (psx_delay_BFC03744) { - psx_delay_BFC03744 = 0; - if (psx_taken_BFC03744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0375Cu); - goto label_BFC0375C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0374Cu); - } -label_BFC0374C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0374Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0374Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0374Cu); -#endif - /* 0xBFC0374C: 80820001 lb $v0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 2, 0x10u); - PGXP_LOAD(0x80820001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0374Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03750: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03754: 1440FFEF bne $v0, $zero, 0xBFC03714 */ - uint32_t psx_brA_BFC03754 = cpu->gpr[2]; uint32_t psx_brB_BFC03754 = cpu->gpr[0]; - psx_taken_BFC03754 = (psx_brA_BFC03754 != psx_brB_BFC03754); - psx_delay_BFC03754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03758: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03758u); -#endif - if (psx_delay_BFC03754) { - psx_delay_BFC03754 = 0; - if (psx_taken_BFC03754) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03714u); - goto label_BFC03714; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0375Cu); - } -label_BFC0375C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0375Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0375C: 03E00008 jr $ra */ - psx_delay_BFC0375C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC03760: 00831023 subu $v0, $a0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[4] - cpu->gpr[3]; - PGXP_ALU(0x00831023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03760u); -#endif - if (psx_delay_BFC0375C) { - psx_delay_BFC0375C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03764(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03764u); - int psx_delay_BFC03770 = 0; - int psx_taken_BFC03770 = 0; - int psx_delay_BFC03780 = 0; - int psx_taken_BFC03780 = 0; - int psx_delay_BFC03794 = 0; - int psx_delay_BFC037B0 = 0; - int psx_taken_BFC037B0 = 0; - int psx_delay_BFC037C0 = 0; - int psx_taken_BFC037C0 = 0; - int psx_delay_BFC037D0 = 0; - int psx_taken_BFC037D0 = 0; - int psx_delay_BFC037E0 = 0; - int psx_taken_BFC037E0 = 0; - int psx_delay_BFC037F0 = 0; - int psx_taken_BFC037F0 = 0; - int psx_delay_BFC037F8 = 0; - int psx_taken_BFC037F8 = 0; - int psx_delay_BFC03804 = 0; - int psx_taken_BFC03804 = 0; - int psx_delay_BFC0380C = 0; - int psx_taken_BFC0380C = 0; - int psx_delay_BFC0381C = 0; - int psx_taken_BFC0381C = 0; - int psx_delay_BFC0382C = 0; - int psx_taken_BFC0382C = 0; - int psx_delay_BFC0383C = 0; - int psx_taken_BFC0383C = 0; - int psx_delay_BFC0384C = 0; - int psx_taken_BFC0384C = 0; - int psx_delay_BFC03854 = 0; - int psx_taken_BFC03854 = 0; - int psx_delay_BFC0385C = 0; - int psx_taken_BFC0385C = 0; - int psx_delay_BFC03868 = 0; - int psx_taken_BFC03868 = 0; - int psx_delay_BFC0388C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03778u: goto label_BFC03778; - case 0xBFC03788u: goto label_BFC03788; - case 0xBFC0379Cu: goto label_BFC0379C; - case 0xBFC037ACu: goto label_BFC037AC; - case 0xBFC037B8u: goto label_BFC037B8; - case 0xBFC037C0u: goto label_BFC037C0; - case 0xBFC037C8u: goto label_BFC037C8; - case 0xBFC037D0u: goto label_BFC037D0; - case 0xBFC037D8u: goto label_BFC037D8; - case 0xBFC037E8u: goto label_BFC037E8; - case 0xBFC037F8u: goto label_BFC037F8; - case 0xBFC03800u: goto label_BFC03800; - case 0xBFC0380Cu: goto label_BFC0380C; - case 0xBFC03814u: goto label_BFC03814; - case 0xBFC03824u: goto label_BFC03824; - case 0xBFC0382Cu: goto label_BFC0382C; - case 0xBFC03834u: goto label_BFC03834; - case 0xBFC03844u: goto label_BFC03844; - case 0xBFC03854u: goto label_BFC03854; - case 0xBFC0385Cu: goto label_BFC0385C; - case 0xBFC03864u: goto label_BFC03864; - case 0xBFC03870u: goto label_BFC03870; - case 0xBFC03884u: goto label_BFC03884; - default: break; - } - } -label_BFC03764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03764: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC03768: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0376Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0376C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0376Cu); return; } g_debug_last_store_pc = 0xBFC0376Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0376Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03770: 14600005 bne $v1, $zero, 0xBFC03788 */ - uint32_t psx_brA_BFC03770 = cpu->gpr[3]; uint32_t psx_brB_BFC03770 = cpu->gpr[0]; - psx_taken_BFC03770 = (psx_brA_BFC03770 != psx_brB_BFC03770); - psx_delay_BFC03770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC03774: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03774u); -#endif - if (psx_delay_BFC03770) { - psx_delay_BFC03770 = 0; - if (psx_taken_BFC03770) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03788u); - goto label_BFC03788; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03778u); - } -label_BFC03778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03778: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0377Cu); -#endif - /* 0xBFC0377C: 8CA59130 lw $a1, -28368($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28368; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0377Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59130u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0377Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03780: 1000000A beq $zero, $zero, 0xBFC037AC */ - uint32_t psx_brA_BFC03780 = cpu->gpr[0]; uint32_t psx_brB_BFC03780 = cpu->gpr[0]; - psx_taken_BFC03780 = (psx_brA_BFC03780 == psx_brB_BFC03780); - psx_delay_BFC03780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03784u); -#endif - /* 0xBFC03784: 80A40000 lb $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 4, 0x20u); - PGXP_LOAD(0x80A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03784u); -#endif - if (psx_delay_BFC03780) { - psx_delay_BFC03780 = 0; - if (psx_taken_BFC03780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037ACu); - goto label_BFC037AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03788u); - } -label_BFC03788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03788: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0378Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0378C: 24849030 addiu $a0, $a0, -28624 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28624)); - PGXP_ALU(0x24849030u, cpu->gpr[4], _pgx1, 0xFFFF9030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0378Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC03790: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03794: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0379Cu; /* jal link before delay slot */ - psx_delay_BFC03794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC03798: AFA7001C sw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03798u); return; } g_debug_last_store_pc = 0xBFC03798u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03798u); -#endif - if (psx_delay_BFC03794) { - psx_delay_BFC03794 = 0; - cpu->gpr[31] = 0xBFC0379Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0379C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0379Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0379C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037A0u); -#endif - /* 0xBFC037A0: 8FA7001C lw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC037A0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC037A4: 24A59030 addiu $a1, $a1, -28624 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28624)); - PGXP_ALU(0x24A59030u, cpu->gpr[5], _pgx1, 0xFFFF9030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037A8u); -#endif - /* 0xBFC037A8: 80A40000 lb $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 4, 0x20u); - PGXP_LOAD(0x80A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037A8u); -#endif -label_BFC037AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC037AC: 00A04021 addu $t0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC037B0: 10800011 beq $a0, $zero, 0xBFC037F8 */ - uint32_t psx_brA_BFC037B0 = cpu->gpr[4]; uint32_t psx_brB_BFC037B0 = cpu->gpr[0]; - psx_taken_BFC037B0 = (psx_brA_BFC037B0 == psx_brB_BFC037B0); - psx_delay_BFC037B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037B4u); -#endif - if (psx_delay_BFC037B0) { - psx_delay_BFC037B0 = 0; - if (psx_taken_BFC037B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037F8u); - goto label_BFC037F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037B8u); - } -label_BFC037B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037B8u); -#endif - /* 0xBFC037B8: 80E60000 lb $a2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 6, 0x80u); - PGXP_LOAD(0x80E60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037BCu); -#endif -label_BFC037C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC037C0: 10C00009 beq $a2, $zero, 0xBFC037E8 */ - uint32_t psx_brA_BFC037C0 = cpu->gpr[6]; uint32_t psx_brB_BFC037C0 = cpu->gpr[0]; - psx_taken_BFC037C0 = (psx_brA_BFC037C0 == psx_brB_BFC037C0); - psx_delay_BFC037C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC037C4: 00E01821 addu $v1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037C4u); -#endif - if (psx_delay_BFC037C0) { - psx_delay_BFC037C0 = 0; - if (psx_taken_BFC037C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037E8u); - goto label_BFC037E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037C8u); - } -label_BFC037C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037C8u); -#endif - /* 0xBFC037C8: 80620000 lb $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x80620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037CCu); -#endif -label_BFC037D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC037D0: 1082000E beq $a0, $v0, 0xBFC0380C */ - uint32_t psx_brA_BFC037D0 = cpu->gpr[4]; uint32_t psx_brB_BFC037D0 = cpu->gpr[2]; - psx_taken_BFC037D0 = (psx_brA_BFC037D0 == psx_brB_BFC037D0); - psx_delay_BFC037D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037D4u); -#endif - if (psx_delay_BFC037D0) { - psx_delay_BFC037D0 = 0; - if (psx_taken_BFC037D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0380Cu); - goto label_BFC0380C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037D8u); - } -label_BFC037D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037D8u); -#endif - /* 0xBFC037D8: 80620001 lb $v0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 2, 0x8u); - PGXP_LOAD(0x80620001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC037DC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC037E0: 1440FFFB bne $v0, $zero, 0xBFC037D0 */ - uint32_t psx_brA_BFC037E0 = cpu->gpr[2]; uint32_t psx_brB_BFC037E0 = cpu->gpr[0]; - psx_taken_BFC037E0 = (psx_brA_BFC037E0 != psx_brB_BFC037E0); - psx_delay_BFC037E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037E4u); -#endif - if (psx_delay_BFC037E0) { - psx_delay_BFC037E0 = 0; - if (psx_taken_BFC037E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037D0u); - goto label_BFC037D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037E8u); - } -label_BFC037E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037E8u); -#endif - /* 0xBFC037E8: 80A40001 lb $a0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 4, 0x20u); - PGXP_LOAD(0x80A40001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC037EC: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC037ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC037F0: 1480FFF3 bne $a0, $zero, 0xBFC037C0 */ - uint32_t psx_brA_BFC037F0 = cpu->gpr[4]; uint32_t psx_brB_BFC037F0 = cpu->gpr[0]; - psx_taken_BFC037F0 = (psx_brA_BFC037F0 != psx_brB_BFC037F0); - psx_delay_BFC037F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC037F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC037F4u); -#endif - if (psx_delay_BFC037F0) { - psx_delay_BFC037F0 = 0; - if (psx_taken_BFC037F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037C0u); - goto label_BFC037C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC037F8u); - } -label_BFC037F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC037F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC037F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC037F8: 15050004 bne $t0, $a1, 0xBFC0380C */ - uint32_t psx_brA_BFC037F8 = cpu->gpr[8]; uint32_t psx_brB_BFC037F8 = cpu->gpr[5]; - psx_taken_BFC037F8 = (psx_brA_BFC037F8 != psx_brB_BFC037F8); - psx_delay_BFC037F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC037FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC037FC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC037FCu); -#endif - if (psx_delay_BFC037F8) { - psx_delay_BFC037F8 = 0; - if (psx_taken_BFC037F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0380Cu); - goto label_BFC0380C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03800u); - } -label_BFC03800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC03800: AC259130 sw $a1, -28368($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28368; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03800u); return; } g_debug_last_store_pc = 0xBFC03800u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259130u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03804: 1000001F beq $zero, $zero, 0xBFC03884 */ - uint32_t psx_brA_BFC03804 = cpu->gpr[0]; uint32_t psx_brB_BFC03804 = cpu->gpr[0]; - psx_taken_BFC03804 = (psx_brA_BFC03804 == psx_brB_BFC03804); - psx_delay_BFC03804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03808: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03808u); -#endif - if (psx_delay_BFC03804) { - psx_delay_BFC03804 = 0; - if (psx_taken_BFC03804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03884u); - goto label_BFC03884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0380Cu); - } -label_BFC0380C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0380Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0380C: 10800011 beq $a0, $zero, 0xBFC03854 */ - uint32_t psx_brA_BFC0380C = cpu->gpr[4]; uint32_t psx_brB_BFC0380C = cpu->gpr[0]; - psx_taken_BFC0380C = (psx_brA_BFC0380C == psx_brB_BFC0380C); - psx_delay_BFC0380C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03810: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03810u); -#endif - if (psx_delay_BFC0380C) { - psx_delay_BFC0380C = 0; - if (psx_taken_BFC0380C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03854u); - goto label_BFC03854; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03814u); - } -label_BFC03814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03814u); -#endif - /* 0xBFC03814: 80EE0000 lb $t6, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 14, 0x80u); - PGXP_LOAD(0x80EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC03818: 00E01821 addu $v1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0381Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0381C: 11C00009 beq $t6, $zero, 0xBFC03844 */ - uint32_t psx_brA_BFC0381C = cpu->gpr[14]; uint32_t psx_brB_BFC0381C = cpu->gpr[0]; - psx_taken_BFC0381C = (psx_brA_BFC0381C == psx_brB_BFC0381C); - psx_delay_BFC0381C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03820u); -#endif - if (psx_delay_BFC0381C) { - psx_delay_BFC0381C = 0; - if (psx_taken_BFC0381C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03844u); - goto label_BFC03844; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03824u); - } -label_BFC03824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03824u); -#endif - /* 0xBFC03824: 80620000 lb $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x80620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03828u); -#endif -label_BFC0382C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0382Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0382C: 14820010 bne $a0, $v0, 0xBFC03870 */ - uint32_t psx_brA_BFC0382C = cpu->gpr[4]; uint32_t psx_brB_BFC0382C = cpu->gpr[2]; - psx_taken_BFC0382C = (psx_brA_BFC0382C != psx_brB_BFC0382C); - psx_delay_BFC0382C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03830u); -#endif - if (psx_delay_BFC0382C) { - psx_delay_BFC0382C = 0; - if (psx_taken_BFC0382C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03870u); - goto label_BFC03870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03834u); - } -label_BFC03834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03834u); -#endif - /* 0xBFC03834: 80620001 lb $v0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 2, 0x8u); - PGXP_LOAD(0x80620001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC03838: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0383C: 1440FFFB bne $v0, $zero, 0xBFC0382C */ - uint32_t psx_brA_BFC0383C = cpu->gpr[2]; uint32_t psx_brB_BFC0383C = cpu->gpr[0]; - psx_taken_BFC0383C = (psx_brA_BFC0383C != psx_brB_BFC0383C); - psx_delay_BFC0383C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03840: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03840u); -#endif - if (psx_delay_BFC0383C) { - psx_delay_BFC0383C = 0; - if (psx_taken_BFC0383C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0382Cu); - goto label_BFC0382C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03844u); - } -label_BFC03844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03844u); -#endif - /* 0xBFC03844: 80A40001 lb $a0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 4, 0x20u); - PGXP_LOAD(0x80A40001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03848: A0A00000 sb $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03848u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0384Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0384C: 1480FFF1 bne $a0, $zero, 0xBFC03814 */ - uint32_t psx_brA_BFC0384C = cpu->gpr[4]; uint32_t psx_brB_BFC0384C = cpu->gpr[0]; - psx_taken_BFC0384C = (psx_brA_BFC0384C != psx_brB_BFC0384C); - psx_delay_BFC0384C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03850: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03850u); -#endif - if (psx_delay_BFC0384C) { - psx_delay_BFC0384C = 0; - if (psx_taken_BFC0384C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03814u); - goto label_BFC03814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03854u); - } -label_BFC03854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC03854: 14800006 bne $a0, $zero, 0xBFC03870 */ - uint32_t psx_brA_BFC03854 = cpu->gpr[4]; uint32_t psx_brB_BFC03854 = cpu->gpr[0]; - psx_taken_BFC03854 = (psx_brA_BFC03854 != psx_brB_BFC03854); - psx_delay_BFC03854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03858u); -#endif - if (psx_delay_BFC03854) { - psx_delay_BFC03854 = 0; - if (psx_taken_BFC03854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03870u); - goto label_BFC03870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0385Cu); - } -label_BFC0385C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0385Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC0385C: 15050004 bne $t0, $a1, 0xBFC03870 */ - uint32_t psx_brA_BFC0385C = cpu->gpr[8]; uint32_t psx_brB_BFC0385C = cpu->gpr[5]; - psx_taken_BFC0385C = (psx_brA_BFC0385C != psx_brB_BFC0385C); - psx_delay_BFC0385C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03860: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03860u); -#endif - if (psx_delay_BFC0385C) { - psx_delay_BFC0385C = 0; - if (psx_taken_BFC0385C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03870u); - goto label_BFC03870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03864u); - } -label_BFC03864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC03864: AC259130 sw $a1, -28368($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28368; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03864u); return; } g_debug_last_store_pc = 0xBFC03864u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259130u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03868: 10000006 beq $zero, $zero, 0xBFC03884 */ - uint32_t psx_brA_BFC03868 = cpu->gpr[0]; uint32_t psx_brB_BFC03868 = cpu->gpr[0]; - psx_taken_BFC03868 = (psx_brA_BFC03868 == psx_brB_BFC03868); - psx_delay_BFC03868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0386Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0386C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0386Cu); -#endif - if (psx_delay_BFC03868) { - psx_delay_BFC03868 = 0; - if (psx_taken_BFC03868) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03884u); - goto label_BFC03884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03870u); - } -label_BFC03870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03870: A0A00000 sb $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03870u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03874: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03878: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0387C: AC259130 sw $a1, -28368($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28368; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0387Cu); return; } g_debug_last_store_pc = 0xBFC0387Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259130u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC03880: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03880u); -#endif -label_BFC03884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03884u); -#endif - /* 0xBFC03884: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03884u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03888: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0388C: 03E00008 jr $ra */ - psx_delay_BFC0388C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03890: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03890u); -#endif - if (psx_delay_BFC0388C) { - psx_delay_BFC0388C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03894(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03894u); - int psx_delay_BFC038A0 = 0; - int psx_taken_BFC038A0 = 0; - int psx_delay_BFC038B0 = 0; - int psx_taken_BFC038B0 = 0; - int psx_delay_BFC038C0 = 0; - int psx_taken_BFC038C0 = 0; - int psx_delay_BFC038C8 = 0; - int psx_delay_BFC038D0 = 0; - int psx_taken_BFC038D0 = 0; - int psx_delay_BFC038DC = 0; - int psx_taken_BFC038DC = 0; - int psx_delay_BFC038F4 = 0; - int psx_taken_BFC038F4 = 0; - int psx_delay_BFC03900 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC038A8u: goto label_BFC038A8; - case 0xBFC038B8u: goto label_BFC038B8; - case 0xBFC038C8u: goto label_BFC038C8; - case 0xBFC038D0u: goto label_BFC038D0; - case 0xBFC038D8u: goto label_BFC038D8; - case 0xBFC038E4u: goto label_BFC038E4; - case 0xBFC038ECu: goto label_BFC038EC; - case 0xBFC038FCu: goto label_BFC038FC; - default: break; - } - } -label_BFC03894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03894u); -#endif - /* 0xBFC03894: 80870000 lb $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 7, 0x10u); - PGXP_LOAD(0x80870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03898: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0389Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC0389C: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0389Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC038A0: 10E00016 beq $a3, $zero, 0xBFC038FC */ - uint32_t psx_brA_BFC038A0 = cpu->gpr[7]; uint32_t psx_brB_BFC038A0 = cpu->gpr[0]; - psx_taken_BFC038A0 = (psx_brA_BFC038A0 == psx_brB_BFC038A0); - psx_delay_BFC038A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC038A4: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038A4u); -#endif - if (psx_delay_BFC038A0) { - psx_delay_BFC038A0 = 0; - if (psx_taken_BFC038A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038FCu); - goto label_BFC038FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038A8u); - } -label_BFC038A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038A8u); -#endif - /* 0xBFC038A8: 806E0000 lb $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x806E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC038ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC038B0: 15C7000C bne $t6, $a3, 0xBFC038E4 */ - uint32_t psx_brA_BFC038B0 = cpu->gpr[14]; uint32_t psx_brB_BFC038B0 = cpu->gpr[7]; - psx_taken_BFC038B0 = (psx_brA_BFC038B0 != psx_brB_BFC038B0); - psx_delay_BFC038B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC038B4u); -#endif - if (psx_delay_BFC038B0) { - psx_delay_BFC038B0 = 0; - if (psx_taken_BFC038B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038E4u); - goto label_BFC038E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038B8u); - } -label_BFC038B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038B8u); -#endif - /* 0xBFC038B8: 806F0001 lb $t7, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 15, 0x8u); - PGXP_LOAD(0x806F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC038BC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC038C0: 15E00003 bne $t7, $zero, 0xBFC038D0 */ - uint32_t psx_brA_BFC038C0 = cpu->gpr[15]; uint32_t psx_brB_BFC038C0 = cpu->gpr[0]; - psx_taken_BFC038C0 = (psx_brA_BFC038C0 != psx_brB_BFC038C0); - psx_delay_BFC038C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC038C4u); -#endif - if (psx_delay_BFC038C0) { - psx_delay_BFC038C0 = 0; - if (psx_taken_BFC038C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038D0u); - goto label_BFC038D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038C8u); - } -label_BFC038C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC038C8: 03E00008 jr $ra */ - psx_delay_BFC038C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC038CC: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038CCu); -#endif - if (psx_delay_BFC038C8) { - psx_delay_BFC038C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC038D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC038D0: 14400006 bne $v0, $zero, 0xBFC038EC */ - uint32_t psx_brA_BFC038D0 = cpu->gpr[2]; uint32_t psx_brB_BFC038D0 = cpu->gpr[0]; - psx_taken_BFC038D0 = (psx_brA_BFC038D0 != psx_brB_BFC038D0); - psx_delay_BFC038D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC038D4u); -#endif - if (psx_delay_BFC038D0) { - psx_delay_BFC038D0 = 0; - if (psx_taken_BFC038D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038ECu); - goto label_BFC038EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038D8u); - } -label_BFC038D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC038D8: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038DC: 10000003 beq $zero, $zero, 0xBFC038EC */ - uint32_t psx_brA_BFC038DC = cpu->gpr[0]; uint32_t psx_brB_BFC038DC = cpu->gpr[0]; - psx_taken_BFC038DC = (psx_brA_BFC038DC == psx_brB_BFC038DC); - psx_delay_BFC038DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC038E0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038E0u); -#endif - if (psx_delay_BFC038DC) { - psx_delay_BFC038DC = 0; - if (psx_taken_BFC038DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038ECu); - goto label_BFC038EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038E4u); - } -label_BFC038E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC038E4: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC038E8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038E8u); -#endif -label_BFC038EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038ECu); -#endif - /* 0xBFC038EC: 80870001 lb $a3, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 7, 0x10u); - PGXP_LOAD(0x80870001u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC038F0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC038F4: 14E0FFEC bne $a3, $zero, 0xBFC038A8 */ - uint32_t psx_brA_BFC038F4 = cpu->gpr[7]; uint32_t psx_brB_BFC038F4 = cpu->gpr[0]; - psx_taken_BFC038F4 = (psx_brA_BFC038F4 != psx_brB_BFC038F4); - psx_delay_BFC038F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC038F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC038F8u); -#endif - if (psx_delay_BFC038F4) { - psx_delay_BFC038F4 = 0; - if (psx_taken_BFC038F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038A8u); - goto label_BFC038A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC038FCu); - } -label_BFC038FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC038FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC038FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC038FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC038FC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC038FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03900: 03E00008 jr $ra */ - psx_delay_BFC03900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03904u); -#endif - if (psx_delay_BFC03900) { - psx_delay_BFC03900 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03910u); - int psx_delay_BFC03928 = 0; - int psx_taken_BFC03928 = 0; - int psx_delay_BFC0393C = 0; - int psx_taken_BFC0393C = 0; - int psx_delay_BFC03948 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03930u: goto label_BFC03930; - case 0xBFC03944u: goto label_BFC03944; - case 0xBFC03948u: goto label_BFC03948; - default: break; - } - } -label_BFC03910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03910: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03914u); -#endif - /* 0xBFC03914: 8C42DE40 lw $v0, -8640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03914u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42DE40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03918: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0391Cu); -#endif - /* 0xBFC0391C: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0391Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0391Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC03924: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC03928: 15E00007 bne $t7, $zero, 0xBFC03948 */ - uint32_t psx_brA_BFC03928 = cpu->gpr[15]; uint32_t psx_brB_BFC03928 = cpu->gpr[0]; - psx_taken_BFC03928 = (psx_brA_BFC03928 != psx_brB_BFC03928); - psx_delay_BFC03928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0392Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0392C: 2408FFFE addiu $t0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2408FFFEu, cpu->gpr[8], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0392Cu); -#endif - if (psx_delay_BFC03928) { - psx_delay_BFC03928 = 0; - if (psx_taken_BFC03928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03948u); - goto label_BFC03948; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03930u); - } -label_BFC03930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03930u); -#endif - /* 0xBFC03930: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03930u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03934: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC03938: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0393Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0393C: 1320FFFC beq $t9, $zero, 0xBFC03930 */ - uint32_t psx_brA_BFC0393C = cpu->gpr[25]; uint32_t psx_brB_BFC0393C = cpu->gpr[0]; - psx_taken_BFC0393C = (psx_brA_BFC0393C == psx_brB_BFC0393C); - psx_delay_BFC0393C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03940u); -#endif - if (psx_delay_BFC0393C) { - psx_delay_BFC0393C = 0; - if (psx_taken_BFC0393C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03930u); - goto label_BFC03930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03944u); - } -label_BFC03944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC03944: 2408FFFE addiu $t0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2408FFFEu, cpu->gpr[8], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03944u); -#endif -label_BFC03948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03948: 03E00008 jr $ra */ - psx_delay_BFC03948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0394Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0394C: AC480000 sw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0394Cu); return; } g_debug_last_store_pc = 0xBFC0394Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0394Cu); -#endif - if (psx_delay_BFC03948) { - psx_delay_BFC03948 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03968(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03968u); - int psx_delay_BFC03970 = 0; -label_BFC03968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC03968: 40026000 mfc0 $v0, cop0[12] */ - cpu->gpr[2] = cpu->cop0[12]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; -#endif - PGXP_ALU(0x40026000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0396Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0396C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0396Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03970: 03E00008 jr $ra */ - psx_delay_BFC03970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03974: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03974u); -#endif - if (psx_delay_BFC03970) { - psx_delay_BFC03970 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03978(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03978u); - int psx_delay_BFC03980 = 0; -label_BFC03978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC03978: 40846000 mtc0 $a0, cop0[12] */ - cpu->cop0[12] = cpu->gpr[4]; -#ifdef PSX_COSIM - cosim_instr(0xBFC03978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0397C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03980: 03E00008 jr $ra */ - psx_delay_BFC03980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03984u); -#endif - if (psx_delay_BFC03980) { - psx_delay_BFC03980 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03990u); - int psx_delay_BFC039A4 = 0; -label_BFC03990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03990: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03994: 2442B068 addiu $v0, $v0, -20376 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20376)); - PGXP_ALU(0x2442B068u, cpu->gpr[2], _pgx1, 0xFFFFB068u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03998: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03998u); return; } g_debug_last_store_pc = 0xBFC03998u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0399Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0399C: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0399Cu); return; } g_debug_last_store_pc = 0xBFC0399Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0399Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC039A0: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039A0u); return; } g_debug_last_store_pc = 0xBFC039A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC039A4: 03E00008 jr $ra */ - psx_delay_BFC039A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC039A8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039A8u); return; } g_debug_last_store_pc = 0xBFC039A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039A8u); -#endif - if (psx_delay_BFC039A4) { - psx_delay_BFC039A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC039B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC039B0u); - int psx_delay_BFC039BC = 0; - int psx_delay_BFC039C4 = 0; - int psx_taken_BFC039C4 = 0; - int psx_delay_BFC039CC = 0; - int psx_taken_BFC039CC = 0; - int psx_delay_BFC039D8 = 0; - int psx_delay_BFC039E4 = 0; - int psx_taken_BFC039E4 = 0; - int psx_delay_BFC039EC = 0; - int psx_delay_BFC039F4 = 0; - int psx_taken_BFC039F4 = 0; - int psx_delay_BFC039FC = 0; - int psx_delay_BFC03A10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC039C4u: goto label_BFC039C4; - case 0xBFC039CCu: goto label_BFC039CC; - case 0xBFC039D4u: goto label_BFC039D4; - case 0xBFC039E0u: goto label_BFC039E0; - case 0xBFC039ECu: goto label_BFC039EC; - case 0xBFC039F4u: goto label_BFC039F4; - case 0xBFC039FCu: goto label_BFC039FC; - case 0xBFC03A04u: goto label_BFC03A04; - case 0xBFC03A08u: goto label_BFC03A08; - default: break; - } - } -label_BFC039B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC039B0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC039B4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039B4u); return; } g_debug_last_store_pc = 0xBFC039B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC039B8: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039B8u); return; } g_debug_last_store_pc = 0xBFC039B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC039BC: 0FF03624 jal 0xBFC0D890 */ - cpu->gpr[31] = 0xBFC039C4u; /* jal link before delay slot */ - psx_delay_BFC039BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC039C0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039C0u); -#endif - if (psx_delay_BFC039BC) { - psx_delay_BFC039BC = 0; - cpu->gpr[31] = 0xBFC039C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D890u); - cpu->pc = 0xBFC0D890u; return; - } -label_BFC039C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC039C4: 04410003 bgez $v0, 0xBFC039D4 */ - uint32_t psx_brA_BFC039C4 = cpu->gpr[2]; - psx_taken_BFC039C4 = ((int32_t)psx_brA_BFC039C4 >= 0); - psx_delay_BFC039C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC039C8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039C8u); -#endif - if (psx_delay_BFC039C4) { - psx_delay_BFC039C4 = 0; - if (psx_taken_BFC039C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039D4u); - goto label_BFC039D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039CCu); - } -label_BFC039CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC039CC: 1000000E beq $zero, $zero, 0xBFC03A08 */ - uint32_t psx_brA_BFC039CC = cpu->gpr[0]; uint32_t psx_brB_BFC039CC = cpu->gpr[0]; - psx_taken_BFC039CC = (psx_brA_BFC039CC == psx_brB_BFC039CC); - psx_delay_BFC039CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC039D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039D0u); -#endif - if (psx_delay_BFC039CC) { - psx_delay_BFC039CC = 0; - if (psx_taken_BFC039CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A08u); - goto label_BFC03A08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039D4u); - } -label_BFC039D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039D4u); -#endif - /* 0xBFC039D4: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039D4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC039D8: 0FF00F24 jal 0xBFC03C90 */ - cpu->gpr[31] = 0xBFC039E0u; /* jal link before delay slot */ - psx_delay_BFC039D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC039DC: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039DCu); return; } g_debug_last_store_pc = 0xBFC039DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039DCu); -#endif - if (psx_delay_BFC039D8) { - psx_delay_BFC039D8 = 0; - cpu->gpr[31] = 0xBFC039E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C90u); - cpu->pc = 0xBFC03C90u; return; - } -label_BFC039E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039E0u); -#endif - /* 0xBFC039E0: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC039E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC039E4: 14400005 bne $v0, $zero, 0xBFC039FC */ - uint32_t psx_brA_BFC039E4 = cpu->gpr[2]; uint32_t psx_brB_BFC039E4 = cpu->gpr[0]; - psx_taken_BFC039E4 = (psx_brA_BFC039E4 != psx_brB_BFC039E4); - psx_delay_BFC039E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC039E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC039E8u); -#endif - if (psx_delay_BFC039E4) { - psx_delay_BFC039E4 = 0; - if (psx_taken_BFC039E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039FCu); - goto label_BFC039FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039ECu); - } -label_BFC039EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC039EC: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC039F4u; /* jal link before delay slot */ - psx_delay_BFC039EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC039F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC039F0u); -#endif - if (psx_delay_BFC039EC) { - psx_delay_BFC039EC = 0; - cpu->gpr[31] = 0xBFC039F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC039F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC039F4: 10000004 beq $zero, $zero, 0xBFC03A08 */ - uint32_t psx_brA_BFC039F4 = cpu->gpr[0]; uint32_t psx_brB_BFC039F4 = cpu->gpr[0]; - psx_taken_BFC039F4 = (psx_brA_BFC039F4 == psx_brB_BFC039F4); - psx_delay_BFC039F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC039F8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC039F8u); -#endif - if (psx_delay_BFC039F4) { - psx_delay_BFC039F4 = 0; - if (psx_taken_BFC039F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A08u); - goto label_BFC03A08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC039FCu); - } -label_BFC039FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC039FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC039FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC039FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC039FC: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC03A04u; /* jal link before delay slot */ - psx_delay_BFC039FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A00u); -#endif - if (psx_delay_BFC039FC) { - psx_delay_BFC039FC = 0; - cpu->gpr[31] = 0xBFC03A04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC03A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03A04: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A04u); -#endif -label_BFC03A08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A08u); -#endif - /* 0xBFC03A08: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03A0C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03A10: 03E00008 jr $ra */ - psx_delay_BFC03A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A14u); -#endif - if (psx_delay_BFC03A10) { - psx_delay_BFC03A10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03A18(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03A18u); - int psx_delay_BFC03A24 = 0; - int psx_delay_BFC03A2C = 0; - int psx_taken_BFC03A2C = 0; - int psx_delay_BFC03A34 = 0; - int psx_taken_BFC03A34 = 0; - int psx_delay_BFC03A40 = 0; - int psx_delay_BFC03A4C = 0; - int psx_taken_BFC03A4C = 0; - int psx_delay_BFC03A54 = 0; - int psx_delay_BFC03A5C = 0; - int psx_taken_BFC03A5C = 0; - int psx_delay_BFC03A74 = 0; - int psx_delay_BFC03A80 = 0; - int psx_delay_BFC03A88 = 0; - int psx_delay_BFC03A9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03A2Cu: goto label_BFC03A2C; - case 0xBFC03A34u: goto label_BFC03A34; - case 0xBFC03A3Cu: goto label_BFC03A3C; - case 0xBFC03A48u: goto label_BFC03A48; - case 0xBFC03A54u: goto label_BFC03A54; - case 0xBFC03A5Cu: goto label_BFC03A5C; - case 0xBFC03A64u: goto label_BFC03A64; - case 0xBFC03A68u: goto label_BFC03A68; - case 0xBFC03A7Cu: goto label_BFC03A7C; - case 0xBFC03A88u: goto label_BFC03A88; - case 0xBFC03A90u: goto label_BFC03A90; - case 0xBFC03A94u: goto label_BFC03A94; - default: break; - } - } -label_BFC03A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03A18: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03A1C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A1Cu); return; } g_debug_last_store_pc = 0xBFC03A1Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03A20: AFA50034 sw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A20u); return; } g_debug_last_store_pc = 0xBFC03A20u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A24: 0FF03624 jal 0xBFC0D890 */ - cpu->gpr[31] = 0xBFC03A2Cu; /* jal link before delay slot */ - psx_delay_BFC03A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03A28: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A28u); -#endif - if (psx_delay_BFC03A24) { - psx_delay_BFC03A24 = 0; - cpu->gpr[31] = 0xBFC03A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D890u); - cpu->pc = 0xBFC0D890u; return; - } -label_BFC03A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03A2C: 04410003 bgez $v0, 0xBFC03A3C */ - uint32_t psx_brA_BFC03A2C = cpu->gpr[2]; - psx_taken_BFC03A2C = ((int32_t)psx_brA_BFC03A2C >= 0); - psx_delay_BFC03A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC03A30: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A30u); -#endif - if (psx_delay_BFC03A2C) { - psx_delay_BFC03A2C = 0; - if (psx_taken_BFC03A2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A3Cu); - goto label_BFC03A3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A34u); - } -label_BFC03A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A34: 10000017 beq $zero, $zero, 0xBFC03A94 */ - uint32_t psx_brA_BFC03A34 = cpu->gpr[0]; uint32_t psx_brB_BFC03A34 = cpu->gpr[0]; - psx_taken_BFC03A34 = (psx_brA_BFC03A34 == psx_brB_BFC03A34); - psx_delay_BFC03A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03A38: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A38u); -#endif - if (psx_delay_BFC03A34) { - psx_delay_BFC03A34 = 0; - if (psx_taken_BFC03A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A94u); - goto label_BFC03A94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A3Cu); - } -label_BFC03A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A3Cu); -#endif - /* 0xBFC03A3C: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A3Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A40: 0FF00F24 jal 0xBFC03C90 */ - cpu->gpr[31] = 0xBFC03A48u; /* jal link before delay slot */ - psx_delay_BFC03A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03A44: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A44u); return; } g_debug_last_store_pc = 0xBFC03A44u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A44u); -#endif - if (psx_delay_BFC03A40) { - psx_delay_BFC03A40 = 0; - cpu->gpr[31] = 0xBFC03A48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C90u); - cpu->pc = 0xBFC03C90u; return; - } -label_BFC03A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A48u); -#endif - /* 0xBFC03A48: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A48u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03A4C: 14400006 bne $v0, $zero, 0xBFC03A68 */ - uint32_t psx_brA_BFC03A4C = cpu->gpr[2]; uint32_t psx_brB_BFC03A4C = cpu->gpr[0]; - psx_taken_BFC03A4C = (psx_brA_BFC03A4C != psx_brB_BFC03A4C); - psx_delay_BFC03A4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A50u); -#endif - /* 0xBFC03A50: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A50u); -#endif - if (psx_delay_BFC03A4C) { - psx_delay_BFC03A4C = 0; - if (psx_taken_BFC03A4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A68u); - goto label_BFC03A68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A54u); - } -label_BFC03A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A54: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC03A5Cu; /* jal link before delay slot */ - psx_delay_BFC03A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A58u); -#endif - if (psx_delay_BFC03A54) { - psx_delay_BFC03A54 = 0; - cpu->gpr[31] = 0xBFC03A5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC03A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A5C: 1000000D beq $zero, $zero, 0xBFC03A94 */ - uint32_t psx_brA_BFC03A5C = cpu->gpr[0]; uint32_t psx_brB_BFC03A5C = cpu->gpr[0]; - psx_taken_BFC03A5C = (psx_brA_BFC03A5C == psx_brB_BFC03A5C); - psx_delay_BFC03A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03A60: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A60u); -#endif - if (psx_delay_BFC03A5C) { - psx_delay_BFC03A5C = 0; - if (psx_taken_BFC03A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A94u); - goto label_BFC03A94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A64u); - } -label_BFC03A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A64u); -#endif - /* 0xBFC03A64: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A64u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A64u); -#endif -label_BFC03A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A6Cu); -#endif - /* 0xBFC03A6C: 8DC50008 lw $a1, 8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4000u); } - PGXP_LOAD(0x8DC50008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A70u); -#endif - /* 0xBFC03A70: 8DC6000C lw $a2, 12($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A70u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4000u); } - PGXP_LOAD(0x8DC6000Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A74: 0FF0362C jal 0xBFC0D8B0 */ - cpu->gpr[31] = 0xBFC03A7Cu; /* jal link before delay slot */ - psx_delay_BFC03A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03A78: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A78u); return; } g_debug_last_store_pc = 0xBFC03A78u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A78u); -#endif - if (psx_delay_BFC03A74) { - psx_delay_BFC03A74 = 0; - cpu->gpr[31] = 0xBFC03A7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8B0u); - cpu->pc = 0xBFC0D8B0u; return; - } -label_BFC03A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A7Cu); -#endif - /* 0xBFC03A7C: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A7Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A80: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC03A88u; /* jal link before delay slot */ - psx_delay_BFC03A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A84u); -#endif - if (psx_delay_BFC03A80) { - psx_delay_BFC03A80 = 0; - cpu->gpr[31] = 0xBFC03A88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC03A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03A88: 0FF00648 jal 0xBFC01920 */ - cpu->gpr[31] = 0xBFC03A90u; /* jal link before delay slot */ - psx_delay_BFC03A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03A8Cu); -#endif - if (psx_delay_BFC03A88) { - psx_delay_BFC03A88 = 0; - cpu->gpr[31] = 0xBFC03A90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01920u); - cpu->pc = 0xBFC01920u; return; - } -label_BFC03A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03A90: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A90u); -#endif -label_BFC03A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A94u); -#endif - /* 0xBFC03A94: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03A94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03A98: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03A9C: 03E00008 jr $ra */ - psx_delay_BFC03A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03AA0u); -#endif - if (psx_delay_BFC03A9C) { - psx_delay_BFC03A9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03AA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03AA4u); - int psx_delay_BFC03AC4 = 0; - int psx_taken_BFC03AC4 = 0; - int psx_delay_BFC03AD0 = 0; - int psx_taken_BFC03AD0 = 0; - int psx_delay_BFC03AEC = 0; - int psx_taken_BFC03AEC = 0; - int psx_delay_BFC03AF4 = 0; - int psx_taken_BFC03AF4 = 0; - int psx_delay_BFC03B00 = 0; - int psx_delay_BFC03B08 = 0; - int psx_taken_BFC03B08 = 0; - int psx_delay_BFC03B18 = 0; - int psx_delay_BFC03B20 = 0; - int psx_taken_BFC03B20 = 0; - int psx_delay_BFC03B30 = 0; - int psx_taken_BFC03B30 = 0; - int psx_delay_BFC03B40 = 0; - int psx_taken_BFC03B40 = 0; - int psx_delay_BFC03B50 = 0; - int psx_taken_BFC03B50 = 0; - int psx_delay_BFC03B60 = 0; - int psx_taken_BFC03B60 = 0; - int psx_delay_BFC03B70 = 0; - int psx_delay_BFC03B94 = 0; - int psx_delay_BFC03BA8 = 0; - int psx_delay_BFC03BB4 = 0; - int psx_taken_BFC03BB4 = 0; - int psx_delay_BFC03BDC = 0; - int psx_delay_BFC03BE4 = 0; - int psx_taken_BFC03BE4 = 0; - int psx_delay_BFC03BF0 = 0; - int psx_delay_BFC03C04 = 0; - int psx_delay_BFC03C0C = 0; - int psx_delay_BFC03C1C = 0; - int psx_delay_BFC03C24 = 0; - int psx_taken_BFC03C24 = 0; - int psx_delay_BFC03C54 = 0; - int psx_delay_BFC03C6C = 0; - int psx_delay_BFC03C74 = 0; - int psx_taken_BFC03C74 = 0; - int psx_delay_BFC03C88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03ACCu: goto label_BFC03ACC; - case 0xBFC03AD8u: goto label_BFC03AD8; - case 0xBFC03AE0u: goto label_BFC03AE0; - case 0xBFC03AF4u: goto label_BFC03AF4; - case 0xBFC03AFCu: goto label_BFC03AFC; - case 0xBFC03B08u: goto label_BFC03B08; - case 0xBFC03B10u: goto label_BFC03B10; - case 0xBFC03B20u: goto label_BFC03B20; - case 0xBFC03B28u: goto label_BFC03B28; - case 0xBFC03B38u: goto label_BFC03B38; - case 0xBFC03B40u: goto label_BFC03B40; - case 0xBFC03B48u: goto label_BFC03B48; - case 0xBFC03B58u: goto label_BFC03B58; - case 0xBFC03B68u: goto label_BFC03B68; - case 0xBFC03B78u: goto label_BFC03B78; - case 0xBFC03B9Cu: goto label_BFC03B9C; - case 0xBFC03BB0u: goto label_BFC03BB0; - case 0xBFC03BBCu: goto label_BFC03BBC; - case 0xBFC03BE4u: goto label_BFC03BE4; - case 0xBFC03BECu: goto label_BFC03BEC; - case 0xBFC03BF8u: goto label_BFC03BF8; - case 0xBFC03C0Cu: goto label_BFC03C0C; - case 0xBFC03C14u: goto label_BFC03C14; - case 0xBFC03C24u: goto label_BFC03C24; - case 0xBFC03C2Cu: goto label_BFC03C2C; - case 0xBFC03C5Cu: goto label_BFC03C5C; - case 0xBFC03C74u: goto label_BFC03C74; - case 0xBFC03C7Cu: goto label_BFC03C7C; - default: break; - } - } -label_BFC03AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03AA4: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03AA8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03AA8u); return; } g_debug_last_store_pc = 0xBFC03AA8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC03AAC: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03AACu); return; } g_debug_last_store_pc = 0xBFC03AACu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC03AB0: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03AB0u); return; } g_debug_last_store_pc = 0xBFC03AB0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03AB4: AFA50054 sw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03AB4u); return; } g_debug_last_store_pc = 0xBFC03AB4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC03AB8: AFA60058 sw $a2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03AB8u); return; } g_debug_last_store_pc = 0xBFC03AB8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60058u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ABCu); -#endif - /* 0xBFC03ABC: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC03AC0: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03AC4: 1040000D beq $v0, $zero, 0xBFC03AFC */ - uint32_t psx_brA_BFC03AC4 = cpu->gpr[2]; uint32_t psx_brB_BFC03AC4 = cpu->gpr[0]; - psx_taken_BFC03AC4 = (psx_brA_BFC03AC4 == psx_brB_BFC03AC4); - psx_delay_BFC03AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC03AC8: 27B00034 addiu $s0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27B00034u, cpu->gpr[16], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AC8u); -#endif - if (psx_delay_BFC03AC4) { - psx_delay_BFC03AC4 = 0; - if (psx_taken_BFC03AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AFCu); - goto label_BFC03AFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03ACCu); - } -label_BFC03ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03ACC: 2403003A addiu $v1, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2403003Au, cpu->gpr[3], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC03AD0: 1062000A beq $v1, $v0, 0xBFC03AFC */ - uint32_t psx_brA_BFC03AD0 = cpu->gpr[3]; uint32_t psx_brB_BFC03AD0 = cpu->gpr[2]; - psx_taken_BFC03AD0 = (psx_brA_BFC03AD0 == psx_brB_BFC03AD0); - psx_delay_BFC03AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03AD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03AD4u); -#endif - if (psx_delay_BFC03AD0) { - psx_delay_BFC03AD0 = 0; - if (psx_taken_BFC03AD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AFCu); - goto label_BFC03AFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AD8u); - } -label_BFC03AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AD8u); -#endif - /* 0xBFC03AD8: 82220000 lb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x82220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03ADC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03ADCu); -#endif -label_BFC03AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC03AE0: A2020000 sb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03AE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AE4u); -#endif - /* 0xBFC03AE4: 82220001 lb $v0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 2, 0x20000u); - PGXP_LOAD(0x82220001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC03AE8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03AEC: 10400003 beq $v0, $zero, 0xBFC03AFC */ - uint32_t psx_brA_BFC03AEC = cpu->gpr[2]; uint32_t psx_brB_BFC03AEC = cpu->gpr[0]; - psx_taken_BFC03AEC = (psx_brA_BFC03AEC == psx_brB_BFC03AEC); - psx_delay_BFC03AEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03AF0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AF0u); -#endif - if (psx_delay_BFC03AEC) { - psx_delay_BFC03AEC = 0; - if (psx_taken_BFC03AEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AFCu); - goto label_BFC03AFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AF4u); - } -label_BFC03AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC03AF4: 1462FFFA bne $v1, $v0, 0xBFC03AE0 */ - uint32_t psx_brA_BFC03AF4 = cpu->gpr[3]; uint32_t psx_brB_BFC03AF4 = cpu->gpr[2]; - psx_taken_BFC03AF4 = (psx_brA_BFC03AF4 != psx_brB_BFC03AF4); - psx_delay_BFC03AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03AF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03AF8u); -#endif - if (psx_delay_BFC03AF4) { - psx_delay_BFC03AF4 = 0; - if (psx_taken_BFC03AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AE0u); - goto label_BFC03AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03AFCu); - } -label_BFC03AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03AFCu); -#endif - /* 0xBFC03AFC: 82240000 lb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 4, 0x20000u); - PGXP_LOAD(0x82240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03B00: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC03B08u; /* jal link before delay slot */ - psx_delay_BFC03B00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03B04u); -#endif - if (psx_delay_BFC03B00) { - psx_delay_BFC03B00 = 0; - cpu->gpr[31] = 0xBFC03B08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC03B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03B08: 10400007 beq $v0, $zero, 0xBFC03B28 */ - uint32_t psx_brA_BFC03B08 = cpu->gpr[2]; uint32_t psx_brB_BFC03B08 = cpu->gpr[0]; - psx_taken_BFC03B08 = (psx_brA_BFC03B08 == psx_brB_BFC03B08); - psx_delay_BFC03B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC03B0C: A2020000 sb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03B0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B0Cu); -#endif - if (psx_delay_BFC03B08) { - psx_delay_BFC03B08 = 0; - if (psx_taken_BFC03B08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B28u); - goto label_BFC03B28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B10u); - } -label_BFC03B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B10u); -#endif - /* 0xBFC03B10: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC03B14: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03B18: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC03B20u; /* jal link before delay slot */ - psx_delay_BFC03B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03B1C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B1Cu); -#endif - if (psx_delay_BFC03B18) { - psx_delay_BFC03B18 = 0; - cpu->gpr[31] = 0xBFC03B20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC03B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03B20: 1440FFFB bne $v0, $zero, 0xBFC03B10 */ - uint32_t psx_brA_BFC03B20 = cpu->gpr[2]; uint32_t psx_brB_BFC03B20 = cpu->gpr[0]; - psx_taken_BFC03B20 = (psx_brA_BFC03B20 != psx_brB_BFC03B20); - psx_delay_BFC03B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC03B24: A2020000 sb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03B24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B24u); -#endif - if (psx_delay_BFC03B20) { - psx_delay_BFC03B20 = 0; - if (psx_taken_BFC03B20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B10u); - goto label_BFC03B10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B28u); - } -label_BFC03B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B28u); -#endif - /* 0xBFC03B28: 83AF0034 lb $t7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (52)), 15, 0x20000000u); - PGXP_LOAD(0x83AF0034u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC03B2C: 27AE0034 addiu $t6, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27AE0034u, cpu->gpr[14], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC03B30: 11E00009 beq $t7, $zero, 0xBFC03B58 */ - uint32_t psx_brA_BFC03B30 = cpu->gpr[15]; uint32_t psx_brB_BFC03B30 = cpu->gpr[0]; - psx_taken_BFC03B30 = (psx_brA_BFC03B30 == psx_brB_BFC03B30); - psx_delay_BFC03B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24001u); -#endif - /* 0xBFC03B34: 01C08821 addu $s1, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B34u); -#endif - if (psx_delay_BFC03B30) { - psx_delay_BFC03B30 = 0; - if (psx_taken_BFC03B30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B58u); - goto label_BFC03B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B38u); - } -label_BFC03B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B38u); -#endif - /* 0xBFC03B38: 81C20000 lb $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 2, 0x4000u); - PGXP_LOAD(0x81C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03B3C: 2403003B addiu $v1, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2403003Bu, cpu->gpr[3], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B3Cu); -#endif -label_BFC03B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC03B40: 10620005 beq $v1, $v0, 0xBFC03B58 */ - uint32_t psx_brA_BFC03B40 = cpu->gpr[3]; uint32_t psx_brB_BFC03B40 = cpu->gpr[2]; - psx_taken_BFC03B40 = (psx_brA_BFC03B40 == psx_brB_BFC03B40); - psx_delay_BFC03B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03B44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03B44u); -#endif - if (psx_delay_BFC03B40) { - psx_delay_BFC03B40 = 0; - if (psx_taken_BFC03B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B58u); - goto label_BFC03B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B48u); - } -label_BFC03B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B48u); -#endif - /* 0xBFC03B48: 82220001 lb $v0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 2, 0x20000u); - PGXP_LOAD(0x82220001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC03B4C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03B50: 1440FFFB bne $v0, $zero, 0xBFC03B40 */ - uint32_t psx_brA_BFC03B50 = cpu->gpr[2]; uint32_t psx_brB_BFC03B50 = cpu->gpr[0]; - psx_taken_BFC03B50 = (psx_brA_BFC03B50 != psx_brB_BFC03B50); - psx_delay_BFC03B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03B54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03B54u); -#endif - if (psx_delay_BFC03B50) { - psx_delay_BFC03B50 = 0; - if (psx_taken_BFC03B50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B40u); - goto label_BFC03B40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B58u); - } -label_BFC03B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B58u); -#endif - /* 0xBFC03B58: 82380000 lb $t8, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 24, 0x20000u); - PGXP_LOAD(0x82380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03B5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC03B60: 17000005 bne $t8, $zero, 0xBFC03B78 */ - uint32_t psx_brA_BFC03B60 = cpu->gpr[24]; uint32_t psx_brB_BFC03B60 = cpu->gpr[0]; - psx_taken_BFC03B60 = (psx_brA_BFC03B60 != psx_brB_BFC03B60); - psx_delay_BFC03B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03B64u); -#endif - if (psx_delay_BFC03B60) { - psx_delay_BFC03B60 = 0; - if (psx_taken_BFC03B60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B78u); - goto label_BFC03B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03B68u); - } -label_BFC03B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03B68: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03B6C: 24A5DE50 addiu $a1, $a1, -8624 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8624)); - PGXP_ALU(0x24A5DE50u, cpu->gpr[5], _pgx1, 0xFFFFDE50u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03B70: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC03B78u; /* jal link before delay slot */ - psx_delay_BFC03B70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03B74: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B74u); -#endif - if (psx_delay_BFC03B70) { - psx_delay_BFC03B70 = 0; - cpu->gpr[31] = 0xBFC03B78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC03B78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC03B78: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B7Cu); -#endif - /* 0xBFC03B7C: 8F39B890 lw $t9, -18288($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -18288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-18288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03B7Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39B890u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03B80: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC03B84: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B88u); -#endif - /* 0xBFC03B88: 8D08B894 lw $t0, -18284($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -18284; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-18284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03B88u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08B894u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC03B8C: AC399144 sw $t9, -28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03B8Cu); return; } g_debug_last_store_pc = 0xBFC03B8Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399144u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03B90: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03B94: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC03B9Cu; /* jal link before delay slot */ - psx_delay_BFC03B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC03B98: AC289148 sw $t0, -28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03B98u); return; } g_debug_last_store_pc = 0xBFC03B98u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289148u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03B98u); -#endif - if (psx_delay_BFC03B94) { - psx_delay_BFC03B94 = 0; - cpu->gpr[31] = 0xBFC03B9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC03B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03B9C: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03BA0: 2610B870 addiu $s0, $s0, -18320 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-18320)); - PGXP_ALU(0x2610B870u, cpu->gpr[16], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC03BA4: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03BA8: 0FF00E86 jal 0xBFC03A18 */ - cpu->gpr[31] = 0xBFC03BB0u; /* jal link before delay slot */ - psx_delay_BFC03BA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03BAC: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BACu); -#endif - if (psx_delay_BFC03BA8) { - psx_delay_BFC03BA8 = 0; - cpu->gpr[31] = 0xBFC03BB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A18u); - cpu->pc = 0xBFC03A18u; return; - } -label_BFC03BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC03BB0: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC03BB4: 1451000D bne $v0, $s1, 0xBFC03BEC */ - uint32_t psx_brA_BFC03BB4 = cpu->gpr[2]; uint32_t psx_brB_BFC03BB4 = cpu->gpr[17]; - psx_taken_BFC03BB4 = (psx_brA_BFC03BB4 != psx_brB_BFC03BB4); - psx_delay_BFC03BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03BB8u); -#endif - if (psx_delay_BFC03BB4) { - psx_delay_BFC03BB4 = 0; - if (psx_taken_BFC03BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03BECu); - goto label_BFC03BEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03BBCu); - } -label_BFC03BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BBCu); -#endif - /* 0xBFC03BBC: 8FA90054 lw $t1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BBCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90054u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03BC0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BC4u); -#endif - /* 0xBFC03BC4: 8FAA0058 lw $t2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0058u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC03BC8: AC29B890 sw $t1, -18288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BC8u); return; } g_debug_last_store_pc = 0xBFC03BC8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29B890u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03BCC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC03BD0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC03BD4: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC03BD8: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03BDC: 0FF00F3C jal 0xBFC03CF0 */ - cpu->gpr[31] = 0xBFC03BE4u; /* jal link before delay slot */ - psx_delay_BFC03BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC03BE0: AC2AB894 sw $t2, -18284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BE0u); return; } g_debug_last_store_pc = 0xBFC03BE0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AB894u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BE0u); -#endif - if (psx_delay_BFC03BDC) { - psx_delay_BFC03BDC = 0; - cpu->gpr[31] = 0xBFC03BE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CF0u); - cpu->pc = 0xBFC03CF0u; return; - } -label_BFC03BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03BE4: 10000004 beq $zero, $zero, 0xBFC03BF8 */ - uint32_t psx_brA_BFC03BE4 = cpu->gpr[0]; uint32_t psx_brB_BFC03BE4 = cpu->gpr[0]; - psx_taken_BFC03BE4 = (psx_brA_BFC03BE4 == psx_brB_BFC03BE4); - psx_delay_BFC03BE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03BE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03BE8u); -#endif - if (psx_delay_BFC03BE4) { - psx_delay_BFC03BE4 = 0; - if (psx_taken_BFC03BE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03BF8u); - goto label_BFC03BF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03BECu); - } -label_BFC03BEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03BEC: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03BF0: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC03BF8u; /* jal link before delay slot */ - psx_delay_BFC03BF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03BF4: 2484DE54 addiu $a0, $a0, -8620 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8620)); - PGXP_ALU(0x2484DE54u, cpu->gpr[4], _pgx1, 0xFFFFDE54u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BF4u); -#endif - if (psx_delay_BFC03BF0) { - psx_delay_BFC03BF0 = 0; - cpu->gpr[31] = 0xBFC03BF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC03BF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03BF8: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03BFCu); -#endif - /* 0xBFC03BFC: 8CA5B8B0 lw $a1, -18256($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BFCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B8B0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03C00: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03C04: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC03C0Cu; /* jal link before delay slot */ - psx_delay_BFC03C04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03C08: 2484DE64 addiu $a0, $a0, -8604 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8604)); - PGXP_ALU(0x2484DE64u, cpu->gpr[4], _pgx1, 0xFFFFDE64u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C08u); -#endif - if (psx_delay_BFC03C04) { - psx_delay_BFC03C04 = 0; - cpu->gpr[31] = 0xBFC03C0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC03C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03C0C: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC03C14u; /* jal link before delay slot */ - psx_delay_BFC03C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03C10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03C10u); -#endif - if (psx_delay_BFC03C0C) { - psx_delay_BFC03C0C = 0; - cpu->gpr[31] = 0xBFC03C14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC03C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03C14: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C18u); -#endif - /* 0xBFC03C18: 8C84B8B0 lw $a0, -18256($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B8B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03C1C: 0FF00E86 jal 0xBFC03A18 */ - cpu->gpr[31] = 0xBFC03C24u; /* jal link before delay slot */ - psx_delay_BFC03C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC03C20: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C20u); -#endif - if (psx_delay_BFC03C1C) { - psx_delay_BFC03C1C = 0; - cpu->gpr[31] = 0xBFC03C24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A18u); - cpu->pc = 0xBFC03A18u; return; - } -label_BFC03C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC03C24: 1451000D bne $v0, $s1, 0xBFC03C5C */ - uint32_t psx_brA_BFC03C24 = cpu->gpr[2]; uint32_t psx_brB_BFC03C24 = cpu->gpr[17]; - psx_taken_BFC03C24 = (psx_brA_BFC03C24 != psx_brB_BFC03C24); - psx_delay_BFC03C24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03C28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03C28u); -#endif - if (psx_delay_BFC03C24) { - psx_delay_BFC03C24 = 0; - if (psx_taken_BFC03C24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C5Cu); - goto label_BFC03C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C2Cu); - } -label_BFC03C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC03C2C: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C30u); -#endif - /* 0xBFC03C30: 8D6B9144 lw $t3, -28348($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -28348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C30u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9144u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03C34: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC03C38: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C3Cu); -#endif - /* 0xBFC03C3C: 8D8C9148 lw $t4, -28344($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28344; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C3Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9148u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC03C40: AC2BB890 sw $t3, -18288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C40u); return; } g_debug_last_store_pc = 0xBFC03C40u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BB890u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03C44: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC03C48: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC03C4C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC03C50: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03C54: 0FF00F3C jal 0xBFC03CF0 */ - cpu->gpr[31] = 0xBFC03C5Cu; /* jal link before delay slot */ - psx_delay_BFC03C54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC03C58: AC2CB894 sw $t4, -18284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C58u); return; } g_debug_last_store_pc = 0xBFC03C58u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CB894u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C58u); -#endif - if (psx_delay_BFC03C54) { - psx_delay_BFC03C54 = 0; - cpu->gpr[31] = 0xBFC03C5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CF0u); - cpu->pc = 0xBFC03CF0u; return; - } -label_BFC03C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03C5C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC03C60: 27AD0034 addiu $t5, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27AD0034u, cpu->gpr[13], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12001u); -#endif - /* 0xBFC03C64: 01A08021 addu $s0, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22001u); -#endif - /* 0xBFC03C68: 01A08821 addu $s1, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03C6C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC03C74u; /* jal link before delay slot */ - psx_delay_BFC03C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03C70: 2484DE80 addiu $a0, $a0, -8576 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8576)); - PGXP_ALU(0x2484DE80u, cpu->gpr[4], _pgx1, 0xFFFFDE80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C70u); -#endif - if (psx_delay_BFC03C6C) { - psx_delay_BFC03C6C = 0; - cpu->gpr[31] = 0xBFC03C74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC03C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03C74: 1000FFFF beq $zero, $zero, 0xBFC03C74 */ - uint32_t psx_brA_BFC03C74 = cpu->gpr[0]; uint32_t psx_brB_BFC03C74 = cpu->gpr[0]; - psx_taken_BFC03C74 = (psx_brA_BFC03C74 == psx_brB_BFC03C74); - psx_delay_BFC03C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03C78u); -#endif - if (psx_delay_BFC03C74) { - psx_delay_BFC03C74 = 0; - if (psx_taken_BFC03C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C74u); - goto label_BFC03C74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03C7Cu); - } -label_BFC03C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C7Cu); -#endif - /* 0xBFC03C7C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C80u); -#endif - /* 0xBFC03C80: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C80u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C84u); -#endif - /* 0xBFC03C84: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C84u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03C88: 03E00008 jr $ra */ - psx_delay_BFC03C88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03C8C: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C8Cu); -#endif - if (psx_delay_BFC03C88) { - psx_delay_BFC03C88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03C90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03C90u); - int psx_delay_BFC03CA4 = 0; - int psx_delay_BFC03CB0 = 0; - int psx_taken_BFC03CB0 = 0; - int psx_delay_BFC03CB8 = 0; - int psx_taken_BFC03CB8 = 0; - int psx_delay_BFC03CCC = 0; - int psx_delay_BFC03CE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03CACu: goto label_BFC03CAC; - case 0xBFC03CB8u: goto label_BFC03CB8; - case 0xBFC03CC0u: goto label_BFC03CC0; - case 0xBFC03CC4u: goto label_BFC03CC4; - case 0xBFC03CD4u: goto label_BFC03CD4; - case 0xBFC03CD8u: goto label_BFC03CD8; - default: break; - } - } -label_BFC03C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03C90: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03C94: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C94u); return; } g_debug_last_store_pc = 0xBFC03C94u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03C98: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C98u); return; } g_debug_last_store_pc = 0xBFC03C98u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03C9C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03CA0: 24A5B070 addiu $a1, $a1, -20368 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20368)); - PGXP_ALU(0x24A5B070u, cpu->gpr[5], _pgx1, 0xFFFFB070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03CA4: 0FF0362C jal 0xBFC0D8B0 */ - cpu->gpr[31] = 0xBFC03CACu; /* jal link before delay slot */ - psx_delay_BFC03CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC03CA8: 24060800 addiu $a2, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24060800u, cpu->gpr[6], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CA8u); -#endif - if (psx_delay_BFC03CA4) { - psx_delay_BFC03CA4 = 0; - cpu->gpr[31] = 0xBFC03CACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8B0u); - cpu->pc = 0xBFC0D8B0u; return; - } -label_BFC03CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC03CAC: 28410800 slti $at, $v0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0); - PGXP_ALU(0x28410800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC03CB0: 10200004 beq $at, $zero, 0xBFC03CC4 */ - uint32_t psx_brA_BFC03CB0 = cpu->gpr[1]; uint32_t psx_brB_BFC03CB0 = cpu->gpr[0]; - psx_taken_BFC03CB0 = (psx_brA_BFC03CB0 == psx_brB_BFC03CB0); - psx_delay_BFC03CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CB4u); -#endif - /* 0xBFC03CB4: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CB4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CB4u); -#endif - if (psx_delay_BFC03CB0) { - psx_delay_BFC03CB0 = 0; - if (psx_taken_BFC03CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CC4u); - goto label_BFC03CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CB8u); - } -label_BFC03CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03CB8: 10000007 beq $zero, $zero, 0xBFC03CD8 */ - uint32_t psx_brA_BFC03CB8 = cpu->gpr[0]; uint32_t psx_brB_BFC03CB8 = cpu->gpr[0]; - psx_taken_BFC03CB8 = (psx_brA_BFC03CB8 == psx_brB_BFC03CB8); - psx_delay_BFC03CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03CBC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CBCu); -#endif - if (psx_delay_BFC03CB8) { - psx_delay_BFC03CB8 = 0; - if (psx_taken_BFC03CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CD8u); - goto label_BFC03CD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CC0u); - } -label_BFC03CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CC0u); -#endif - /* 0xBFC03CC0: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CC0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CC0u); -#endif -label_BFC03CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03CC4: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03CC8: 24A5B080 addiu $a1, $a1, -20352 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20352)); - PGXP_ALU(0x24A5B080u, cpu->gpr[5], _pgx1, 0xFFFFB080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03CCC: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC03CD4u; /* jal link before delay slot */ - psx_delay_BFC03CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC03CD0: 2406003C addiu $a2, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2406003Cu, cpu->gpr[6], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CD0u); -#endif - if (psx_delay_BFC03CCC) { - psx_delay_BFC03CCC = 0; - cpu->gpr[31] = 0xBFC03CD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC03CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03CD4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CD4u); -#endif -label_BFC03CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CD8u); -#endif - /* 0xBFC03CD8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CD8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03CDC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03CE0: 03E00008 jr $ra */ - psx_delay_BFC03CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03CE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03CE4u); -#endif - if (psx_delay_BFC03CE0) { - psx_delay_BFC03CE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03CF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03CF0u); - int psx_delay_BFC03D08 = 0; - int psx_taken_BFC03D08 = 0; - int psx_delay_BFC03D20 = 0; - int psx_taken_BFC03D20 = 0; - int psx_delay_BFC03D30 = 0; - int psx_taken_BFC03D30 = 0; - int psx_delay_BFC03D58 = 0; - int psx_delay_BFC03D74 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03D10u: goto label_BFC03D10; - case 0xBFC03D18u: goto label_BFC03D18; - case 0xBFC03D28u: goto label_BFC03D28; - case 0xBFC03D38u: goto label_BFC03D38; - case 0xBFC03D4Cu: goto label_BFC03D4C; - case 0xBFC03D60u: goto label_BFC03D60; - default: break; - } - } -label_BFC03CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC03CF0: AC900038 sw $s0, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CF0u); return; } g_debug_last_store_pc = 0xBFC03CF0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC900038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CF4u); -#endif - /* 0xBFC03CF4: 8C88001C lw $t0, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CF4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C88001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000010u); -#endif - /* 0xBFC03CF8: AC9F0034 sw $ra, 52($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CF8u); return; } g_debug_last_store_pc = 0xBFC03CF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC9F0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03CFC: AC9D0028 sw $sp, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03CFCu); return; } g_debug_last_store_pc = 0xBFC03CFCu; cpu->write_word(psx_addr, cpu->gpr[29]); } - PGXP_STORE(0xAC9D0028u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000010u); -#endif - /* 0xBFC03D00: AC9E002C sw $fp, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D00u); return; } g_debug_last_store_pc = 0xBFC03D00u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAC9E002Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000010u); -#endif - /* 0xBFC03D04: AC9C0030 sw $gp, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D04u); return; } g_debug_last_store_pc = 0xBFC03D04u; cpu->write_word(psx_addr, cpu->gpr[28]); } - PGXP_STORE(0xAC9C0030u, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC03D08: 11000007 beq $t0, $zero, 0xBFC03D28 */ - uint32_t psx_brA_BFC03D08 = cpu->gpr[8]; uint32_t psx_brB_BFC03D08 = cpu->gpr[0]; - psx_taken_BFC03D08 = (psx_brA_BFC03D08 == psx_brB_BFC03D08); - psx_delay_BFC03D08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC03D0C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D0Cu); -#endif - if (psx_delay_BFC03D08) { - psx_delay_BFC03D08 = 0; - if (psx_taken_BFC03D08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D28u); - goto label_BFC03D28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D10u); - } -label_BFC03D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D10u); -#endif - /* 0xBFC03D10: 8C890018 lw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D10u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03D14u); -#endif -label_BFC03D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC03D18: 2108FFFC addi $t0, $t0, -4 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFCu, cpu->gpr[8], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC03D1C: AD200000 sw $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D1Cu); return; } g_debug_last_store_pc = 0xBFC03D1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC03D20: 1D00FFFD bgtz $t0, 0xBFC03D18 */ - uint32_t psx_brA_BFC03D20 = cpu->gpr[8]; - psx_taken_BFC03D20 = ((int32_t)psx_brA_BFC03D20 > 0); - psx_delay_BFC03D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC03D24: 21290004 addi $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[9]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[9] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x21290004u, cpu->gpr[9], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D24u); -#endif - if (psx_delay_BFC03D20) { - psx_delay_BFC03D20 = 0; - if (psx_taken_BFC03D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D18u); - goto label_BFC03D18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D28u); - } -label_BFC03D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D28u); -#endif - /* 0xBFC03D28: 8C880020 lw $t0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D28u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03D2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC03D30: 11000006 beq $t0, $zero, 0xBFC03D4C */ - uint32_t psx_brA_BFC03D30 = cpu->gpr[8]; uint32_t psx_brB_BFC03D30 = cpu->gpr[0]; - psx_taken_BFC03D30 = (psx_brA_BFC03D30 == psx_brB_BFC03D30); - psx_delay_BFC03D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03D34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03D34u); -#endif - if (psx_delay_BFC03D30) { - psx_delay_BFC03D30 = 0; - if (psx_taken_BFC03D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D4Cu); - goto label_BFC03D4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03D38u); - } -label_BFC03D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D38u); -#endif - /* 0xBFC03D38: 8C890024 lw $t1, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D38u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03D3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC03D40: 01094020 add $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (int32_t)cpu->gpr[9]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x01094020u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000101u); -#endif - /* 0xBFC03D44: 0100E821 addu $sp, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[29] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x0100E821u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000001u); -#endif - /* 0xBFC03D48: 03A0F021 addu $fp, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D48u); -#endif -label_BFC03D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D4Cu); -#endif - /* 0xBFC03D4C: 8C8B0000 lw $t3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D4Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D50u); -#endif - /* 0xBFC03D50: 8C9C0004 lw $gp, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D50u); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x10u); } - PGXP_LOAD(0x8C9C0004u, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC03D54: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC03D58: 0160F809 jalr $ra, $t3 */ - cpu->gpr[31] = 0xBFC03D60u; /* jalr link before delay slot */ - psx_delay_BFC03D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC03D5C: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D5Cu); -#endif - if (psx_delay_BFC03D58) { - psx_delay_BFC03D58 = 0; - { uint32_t _t = cpu->gpr[11]; - cpu->gpr[31] = 0xBFC03D60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC03D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D60u); -#endif - /* 0xBFC03D60: 8E1F0034 lw $ra, 52($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x10000u); } - PGXP_LOAD(0x8E1F0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D64u); -#endif - /* 0xBFC03D64: 8E1D0028 lw $sp, 40($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D64u); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x10000u); } - PGXP_LOAD(0x8E1D0028u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D68u); -#endif - /* 0xBFC03D68: 8E1E002C lw $fp, 44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D68u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x10000u); } - PGXP_LOAD(0x8E1E002Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D6Cu); -#endif - /* 0xBFC03D6C: 8E1C0030 lw $gp, 48($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D6Cu); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x10000u); } - PGXP_LOAD(0x8E1C0030u, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D70u); -#endif - /* 0xBFC03D70: 8E100038 lw $s0, 56($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D70u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E100038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03D74: 03E00008 jr $ra */ - psx_delay_BFC03D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC03D78: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D78u); -#endif - if (psx_delay_BFC03D74) { - psx_delay_BFC03D74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03D80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03D80u); - int psx_delay_BFC03DB4 = 0; - int psx_taken_BFC03DB4 = 0; - int psx_delay_BFC03DCC = 0; - int psx_taken_BFC03DCC = 0; - int psx_delay_BFC03DD4 = 0; - int psx_delay_BFC03DF4 = 0; - int psx_taken_BFC03DF4 = 0; - int psx_delay_BFC03E60 = 0; - int psx_taken_BFC03E60 = 0; - int psx_delay_BFC03E80 = 0; - int psx_taken_BFC03E80 = 0; - int psx_delay_BFC03E98 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03DBCu: goto label_BFC03DBC; - case 0xBFC03DCCu: goto label_BFC03DCC; - case 0xBFC03DD4u: goto label_BFC03DD4; - case 0xBFC03DDCu: goto label_BFC03DDC; - case 0xBFC03DFCu: goto label_BFC03DFC; - case 0xBFC03E04u: goto label_BFC03E04; - case 0xBFC03E68u: goto label_BFC03E68; - case 0xBFC03E70u: goto label_BFC03E70; - case 0xBFC03E88u: goto label_BFC03E88; - case 0xBFC03E8Cu: goto label_BFC03E8C; - default: break; - } - } -label_BFC03D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03D80: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03D84: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D84u); return; } g_debug_last_store_pc = 0xBFC03D84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03D88: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D8Cu); -#endif - /* 0xBFC03D8C: 8DCEDE94 lw $t6, -8556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D8Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC03D90: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D90u); return; } g_debug_last_store_pc = 0xBFC03D90u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC03D94: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D94u); return; } g_debug_last_store_pc = 0xBFC03D94u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03D98: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D98u); return; } g_debug_last_store_pc = 0xBFC03D98u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03D9C: AFA50044 sw $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D9Cu); return; } g_debug_last_store_pc = 0xBFC03D9Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC03DA0: AFA60048 sw $a2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DA0u); return; } g_debug_last_store_pc = 0xBFC03DA0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC03DA4: AFA7004C sw $a3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DA4u); return; } g_debug_last_store_pc = 0xBFC03DA4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7004Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DA8u); -#endif - /* 0xBFC03DA8: 8DCF0000 lw $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DA8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC03DAC: 3C120400 lui $s2, 0x400 */ - cpu->gpr[18] = 0x04000000u; - PGXP_ALU(0x3C120400u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1048000u); -#endif - /* 0xBFC03DB0: 01F2C024 and $t8, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[18]; - PGXP_ALU(0x01F2C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC03DB4: 17000013 bne $t8, $zero, 0xBFC03E04 */ - uint32_t psx_brA_BFC03DB4 = cpu->gpr[24]; uint32_t psx_brB_BFC03DB4 = cpu->gpr[0]; - psx_taken_BFC03DB4 = (psx_brA_BFC03DB4 != psx_brB_BFC03DB4); - psx_delay_BFC03DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03DB8: 3C100010 lui $s0, 0x10 */ - cpu->gpr[16] = 0x00100000u; - PGXP_ALU(0x3C100010u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03DB8u); -#endif - if (psx_delay_BFC03DB4) { - psx_delay_BFC03DB4 = 0; - if (psx_taken_BFC03DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03E04u); - goto label_BFC03E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03DBCu); - } -label_BFC03DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC03DBC: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DBCu); return; } g_debug_last_store_pc = 0xBFC03DBCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC03DC0: 3C11BFC1 lui $s1, 0xBFC1 */ - cpu->gpr[17] = 0xBFC10000u; - PGXP_ALU(0x3C11BFC1u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC03DC4: 2631DEAC addiu $s1, $s1, -8532 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-8532)); - PGXP_ALU(0x2631DEACu, cpu->gpr[17], _pgx1, 0xFFFFDEACu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC03DC8: 02001821 addu $v1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DC8u); -#endif -label_BFC03DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03DCC: 14600003 bne $v1, $zero, 0xBFC03DDC */ - uint32_t psx_brA_BFC03DCC = cpu->gpr[3]; uint32_t psx_brB_BFC03DCC = cpu->gpr[0]; - psx_taken_BFC03DCC = (psx_brA_BFC03DCC != psx_brB_BFC03DCC); - psx_delay_BFC03DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC03DD0: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DD0u); -#endif - if (psx_delay_BFC03DCC) { - psx_delay_BFC03DCC = 0; - if (psx_taken_BFC03DCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03DDCu); - goto label_BFC03DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03DD4u); - } -label_BFC03DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03DD4: 0FF01098 jal 0xBFC04260 */ - cpu->gpr[31] = 0xBFC03DDCu; /* jal link before delay slot */ - psx_delay_BFC03DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC03DD8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DD8u); -#endif - if (psx_delay_BFC03DD4) { - psx_delay_BFC03DD4 = 0; - cpu->gpr[31] = 0xBFC03DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04260u); - cpu->pc = 0xBFC04260u; return; - } -label_BFC03DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC03DDC: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DE0u); -#endif - /* 0xBFC03DE0: 8F39DE94 lw $t9, -8556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DE0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DE94u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03DE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DE8u); -#endif - /* 0xBFC03DE8: 8F280000 lw $t0, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DE8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2000000u); } - PGXP_LOAD(0x8F280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03DEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40300u); -#endif - /* 0xBFC03DF0: 01124824 and $t1, $t0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[18]; - PGXP_ALU(0x01124824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC03DF4: 1120FFF5 beq $t1, $zero, 0xBFC03DCC */ - uint32_t psx_brA_BFC03DF4 = cpu->gpr[9]; uint32_t psx_brB_BFC03DF4 = cpu->gpr[0]; - psx_taken_BFC03DF4 = (psx_brA_BFC03DF4 == psx_brB_BFC03DF4); - psx_delay_BFC03DF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC03DF8: 02001821 addu $v1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DF8u); -#endif - if (psx_delay_BFC03DF4) { - psx_delay_BFC03DF4 = 0; - if (psx_taken_BFC03DF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03DCCu); - goto label_BFC03DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03DFCu); - } -label_BFC03DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03DFCu); -#endif - /* 0xBFC03DFC: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DFCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03E00u); -#endif -label_BFC03E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC03E04: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E08u); -#endif - /* 0xBFC03E08: 8CA5DE90 lw $a1, -8560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -8560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-8560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E08u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5DE90u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC03E0C: 3C0AA000 lui $t2, 0xA000 */ - cpu->gpr[10] = 0xA0000000u; - PGXP_ALU(0x3C0AA000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC03E10: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E10u); return; } g_debug_last_store_pc = 0xBFC03E10u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E14u); -#endif - /* 0xBFC03E14: 8FAD0040 lw $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E14u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E18u); -#endif - /* 0xBFC03E18: 8FAB0044 lw $t3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E18u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0044u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC03E1C: 31AEFFFF andi $t6, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC03E20: 000B6400 sll $t4, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC03E24: 018E7825 or $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] | cpu->gpr[14]; - PGXP_ALU(0x018E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC03E28: ACAF0000 sw $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E28u); return; } g_debug_last_store_pc = 0xBFC03E28u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E2Cu); -#endif - /* 0xBFC03E2C: 8FB8004C lw $t8, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E2Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E30u); -#endif - /* 0xBFC03E30: 8FA80048 lw $t0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80048u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC03E34: 0018CC00 sll $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018CC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC03E38: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC03E3C: 03295025 or $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] | cpu->gpr[9]; - PGXP_ALU(0x03295025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC03E40: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E40u); return; } g_debug_last_store_pc = 0xBFC03E40u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E44u); -#endif - /* 0xBFC03E44: 8FAD004C lw $t5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E44u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD004Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E48u); -#endif - /* 0xBFC03E48: 8FAB0048 lw $t3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E48u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0048u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03E4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC03E50: 016D0019 multu $t3, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x016D0019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0xBFC03E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03E54: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03E58: 00021042 srl $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x00021042u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC03E5C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03E60: 1060000A beq $v1, $zero, 0xBFC03E8C */ - uint32_t psx_brA_BFC03E60 = cpu->gpr[3]; uint32_t psx_brB_BFC03E60 = cpu->gpr[0]; - psx_taken_BFC03E60 = (psx_brA_BFC03E60 == psx_brB_BFC03E60); - psx_delay_BFC03E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC03E64: 2444FFFF addiu $a0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2444FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E64u); -#endif - if (psx_delay_BFC03E60) { - psx_delay_BFC03E60 = 0; - if (psx_taken_BFC03E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03E8Cu); - goto label_BFC03E8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03E68u); - } -label_BFC03E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E68u); -#endif - /* 0xBFC03E68: 8FA20050 lw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E68u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03E6Cu); -#endif -label_BFC03E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E70u); -#endif - /* 0xBFC03E70: 8C4C0000 lw $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E70u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x8C4C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC03E74: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC03E78: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03E7C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC03E80: 1460FFFB bne $v1, $zero, 0xBFC03E70 */ - uint32_t psx_brA_BFC03E80 = cpu->gpr[3]; uint32_t psx_brB_BFC03E80 = cpu->gpr[0]; - psx_taken_BFC03E80 = (psx_brA_BFC03E80 != psx_brB_BFC03E80); - psx_delay_BFC03E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC03E84: ACAC0000 sw $t4, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E84u); return; } g_debug_last_store_pc = 0xBFC03E84u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xACAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E84u); -#endif - if (psx_delay_BFC03E80) { - psx_delay_BFC03E80 = 0; - if (psx_taken_BFC03E80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03E70u); - goto label_BFC03E70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03E88u); - } -label_BFC03E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC03E88: AFA20050 sw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E88u); return; } g_debug_last_store_pc = 0xBFC03E88u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E88u); -#endif -label_BFC03E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E8Cu); -#endif - /* 0xBFC03E8C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E8Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E90u); -#endif - /* 0xBFC03E90: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E90u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E94u); -#endif - /* 0xBFC03E94: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E94u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03E98: 03E00008 jr $ra */ - psx_delay_BFC03E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03E9C: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03E9Cu); -#endif - if (psx_delay_BFC03E98) { - psx_delay_BFC03E98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03EA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03EA0u); - int psx_delay_BFC03EB4 = 0; - int psx_delay_BFC03F54 = 0; - int psx_taken_BFC03F54 = 0; - int psx_delay_BFC03F84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03EBCu: goto label_BFC03EBC; - case 0xBFC03F5Cu: goto label_BFC03F5C; - case 0xBFC03F60u: goto label_BFC03F60; - default: break; - } - } -label_BFC03EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03EA0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03EA4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EA4u); return; } g_debug_last_store_pc = 0xBFC03EA4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03EA8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EA8u); return; } g_debug_last_store_pc = 0xBFC03EA8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03EAC: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EACu); return; } g_debug_last_store_pc = 0xBFC03EACu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC03EB0: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EB0u); return; } g_debug_last_store_pc = 0xBFC03EB0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03EB4: 0FF0104E jal 0xBFC04138 */ - cpu->gpr[31] = 0xBFC03EBCu; /* jal link before delay slot */ - psx_delay_BFC03EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC03EB8: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EB8u); return; } g_debug_last_store_pc = 0xBFC03EB8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EB8u); -#endif - if (psx_delay_BFC03EB4) { - psx_delay_BFC03EB4 = 0; - cpu->gpr[31] = 0xBFC03EBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04138u); - cpu->pc = 0xBFC04138u; return; - } -label_BFC03EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC03EBC: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EC0u); -#endif - /* 0xBFC03EC0: 8C42DE90 lw $v0, -8560($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42DE90u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC03EC4: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EC8u); -#endif - /* 0xBFC03EC8: 8C63DEA4 lw $v1, -8540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EC8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DEA4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ECCu); -#endif - /* 0xBFC03ECC: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03ECCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ED0u); -#endif - /* 0xBFC03ED0: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03ED0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03ED4: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC03ED8: AC4E0000 sw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03ED8u); return; } g_debug_last_store_pc = 0xBFC03ED8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EDCu); -#endif - /* 0xBFC03EDC: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EDCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EE0u); -#endif - /* 0xBFC03EE0: 8FAF002C lw $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC03EE4: 00850019 multu $a0, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00850019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0xBFC03EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC03EE8: 3328FFFF andi $t0, $t9, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFFFFu; - PGXP_ALU(0x3328FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC03EEC: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000300u); -#endif - /* 0xBFC03EF0: 03084825 or $t1, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[24] | cpu->gpr[8]; - PGXP_ALU(0x03084825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC03EF4: 308BFFFF andi $t3, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x308BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC03EF8: 00055400 sll $t2, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00055400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC03EFC: 014B6025 or $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] | cpu->gpr[11]; - PGXP_ALU(0x014B6025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC03F00: AC490000 sw $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F00u); return; } g_debug_last_store_pc = 0xBFC03F00u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03F04: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC03F08: AC4C0000 sw $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F08u); return; } g_debug_last_store_pc = 0xBFC03F08u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC4C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F0Cu); -#endif - /* 0xBFC03F0C: 8DCEDE94 lw $t6, -8556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F0Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC03F10: 3C0D0400 lui $t5, 0x400 */ - cpu->gpr[13] = 0x04000000u; - PGXP_ALU(0x3C0D0400u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC03F14: 35AD0002 ori $t5, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] | 0x2u; - PGXP_ALU(0x35AD0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC03F18: ADCD0000 sw $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F18u); return; } g_debug_last_store_pc = 0xBFC03F18u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F1Cu); -#endif - /* 0xBFC03F1C: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F1Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC03F20: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC03F24: 35F90800 ori $t9, $t7, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] | 0x800u; - PGXP_ALU(0x35F90800u, cpu->gpr[25], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC03F28: AC790000 sw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F28u); return; } g_debug_last_store_pc = 0xBFC03F28u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F2Cu); -#endif - /* 0xBFC03F2C: 8D08DE98 lw $t0, -8552($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F2Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08DE98u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F30u); -#endif - /* 0xBFC03F30: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F30u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC03F34: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC03F38: 00095042 srl $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] >> 1u; - PGXP_ALU(0x00095042u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03F3C: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC03F40: AD180000 sw $t8, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F40u); return; } g_debug_last_store_pc = 0xBFC03F40u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F44u); -#endif - /* 0xBFC03F44: 8DCEDE9C lw $t6, -8548($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE9Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC03F48: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC03F4C: 3C0F0100 lui $t7, 0x100 */ - cpu->gpr[15] = 0x01000000u; - PGXP_ALU(0x3C0F0100u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC03F50: 35EF0201 ori $t7, $t7, 0x201 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] | 0x201u; - PGXP_ALU(0x35EF0201u, cpu->gpr[15], _pgx1, 0x0201u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC03F54: 05410002 bgez $t2, 0xBFC03F60 */ - uint32_t psx_brA_BFC03F54 = cpu->gpr[10]; - psx_taken_BFC03F54 = ((int32_t)psx_brA_BFC03F54 >= 0); - psx_delay_BFC03F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC03F58: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F58u); -#endif - if (psx_delay_BFC03F54) { - psx_delay_BFC03F54 = 0; - if (psx_taken_BFC03F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F60u); - goto label_BFC03F60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03F5Cu); - } -label_BFC03F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC03F5C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F5Cu); -#endif -label_BFC03F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC03F60: 00015903 sra $t3, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00015903u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC03F64: 000B6400 sll $t4, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC03F68: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC03F6C: ADCD0000 sw $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F6Cu); return; } g_debug_last_store_pc = 0xBFC03F6Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F70u); -#endif - /* 0xBFC03F70: 8F39DEA0 lw $t9, -8544($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F70u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DEA0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC03F78: AF2F0000 sw $t7, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F78u); return; } g_debug_last_store_pc = 0xBFC03F78u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF2F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F7Cu); -#endif - /* 0xBFC03F7C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03F80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03F84: 03E00008 jr $ra */ - psx_delay_BFC03F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03F88: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F88u); -#endif - if (psx_delay_BFC03F84) { - psx_delay_BFC03F84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03F8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03F8Cu); - int psx_delay_BFC03F94 = 0; -label_BFC03F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC03F8C: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F90u); -#endif - /* 0xBFC03F90: 8DCEDE94 lw $t6, -8556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F90u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03F94: 03E00008 jr $ra */ - psx_delay_BFC03F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC03F98: ADC40000 sw $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F98u); return; } g_debug_last_store_pc = 0xBFC03F98u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xADC40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03F98u); -#endif - if (psx_delay_BFC03F94) { - psx_delay_BFC03F94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03FAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03FACu); - int psx_delay_BFC03FB4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03FBCu: goto label_BFC03FBC; - default: break; - } - } -label_BFC03FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03FAC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03FB0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FB0u); return; } g_debug_last_store_pc = 0xBFC03FB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03FB4: 0FF0104E jal 0xBFC04138 */ - cpu->gpr[31] = 0xBFC03FBCu; /* jal link before delay slot */ - psx_delay_BFC03FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03FB8: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FB8u); return; } g_debug_last_store_pc = 0xBFC03FB8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FB8u); -#endif - if (psx_delay_BFC03FB4) { - psx_delay_BFC03FB4 = 0; - cpu->gpr[31] = 0xBFC03FBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04138u); - cpu->pc = 0xBFC04138u; return; - } -label_BFC03FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC03FBC: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC03FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03FC0u); - cpu->pc = 0xBFC03FC0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC03FC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03FC0u); - int psx_delay_BFC03FD8 = 0; -label_BFC03FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FC0u); -#endif - /* 0xBFC03FC0: 8DEFDE90 lw $t7, -8560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FC0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDE90u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FC4u); -#endif - /* 0xBFC03FC4: 8FAE0020 lw $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FC4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03FC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC03FCC: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FCCu); return; } g_debug_last_store_pc = 0xBFC03FCCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FD0u); -#endif - /* 0xBFC03FD0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03FD4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC03FD8: 03E00008 jr $ra */ - psx_delay_BFC03FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC03FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC03FDCu); -#endif - if (psx_delay_BFC03FD8) { - psx_delay_BFC03FD8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC03FE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC03FE0u); - int psx_delay_BFC03FEC = 0; - int psx_delay_BFC04000 = 0; - int psx_taken_BFC04000 = 0; - int psx_delay_BFC04024 = 0; - int psx_taken_BFC04024 = 0; - int psx_delay_BFC04034 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC03FF4u: goto label_BFC03FF4; - case 0xBFC04008u: goto label_BFC04008; - case 0xBFC04014u: goto label_BFC04014; - case 0xBFC0402Cu: goto label_BFC0402C; - default: break; - } - } -label_BFC03FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC03FE0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC03FE4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FE4u); return; } g_debug_last_store_pc = 0xBFC03FE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC03FE8: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FE8u); return; } g_debug_last_store_pc = 0xBFC03FE8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC03FEC: 0FF0104E jal 0xBFC04138 */ - cpu->gpr[31] = 0xBFC03FF4u; /* jal link before delay slot */ - psx_delay_BFC03FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC03FF0: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FF0u); return; } g_debug_last_store_pc = 0xBFC03FF0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FF0u); -#endif - if (psx_delay_BFC03FEC) { - psx_delay_BFC03FEC = 0; - cpu->gpr[31] = 0xBFC03FF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04138u); - cpu->pc = 0xBFC04138u; return; - } -label_BFC03FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC03FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC03FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FF4u); -#endif - /* 0xBFC03FF4: 8FA5001C lw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FF4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FF8u); -#endif - /* 0xBFC03FF8: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FF8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC03FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC03FFC: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC03FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04000: 1040000A beq $v0, $zero, 0xBFC0402C */ - uint32_t psx_brA_BFC04000 = cpu->gpr[2]; uint32_t psx_brB_BFC04000 = cpu->gpr[0]; - psx_taken_BFC04000 = (psx_brA_BFC04000 == psx_brB_BFC04000); - psx_delay_BFC04000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC04004: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04004u); -#endif - if (psx_delay_BFC04000) { - psx_delay_BFC04000 = 0; - if (psx_taken_BFC04000) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0402Cu); - goto label_BFC0402C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04008u); - } -label_BFC04008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04008: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0400Cu); -#endif - /* 0xBFC0400C: 8C63DE90 lw $v1, -8560($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0400Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DE90u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0400Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04010u); -#endif -label_BFC04014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04014u); -#endif - /* 0xBFC04014: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04014u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC04018: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0401Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0401C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0401Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC04020: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04024: 1440FFFB bne $v0, $zero, 0xBFC04014 */ - uint32_t psx_brA_BFC04024 = cpu->gpr[2]; uint32_t psx_brB_BFC04024 = cpu->gpr[0]; - psx_taken_BFC04024 = (psx_brA_BFC04024 != psx_brB_BFC04024); - psx_delay_BFC04024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC04028: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04028u); return; } g_debug_last_store_pc = 0xBFC04028u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04028u); -#endif - if (psx_delay_BFC04024) { - psx_delay_BFC04024 = 0; - if (psx_taken_BFC04024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04014u); - goto label_BFC04014; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0402Cu); - } -label_BFC0402C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0402Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0402Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0402Cu); -#endif - /* 0xBFC0402C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0402Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0402Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04030: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04034: 03E00008 jr $ra */ - psx_delay_BFC04034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04038u); -#endif - if (psx_delay_BFC04034) { - psx_delay_BFC04034 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0403C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0403Cu); - int psx_delay_BFC04050 = 0; - int psx_delay_BFC04058 = 0; - int psx_delay_BFC040B4 = 0; - int psx_delay_BFC040D4 = 0; - int psx_delay_BFC040E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04058u: goto label_BFC04058; - case 0xBFC04060u: goto label_BFC04060; - case 0xBFC040BCu: goto label_BFC040BC; - case 0xBFC040DCu: goto label_BFC040DC; - default: break; - } - } -label_BFC0403C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0403Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0403C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC04040: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04040u); return; } g_debug_last_store_pc = 0xBFC04040u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04044: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04044u); return; } g_debug_last_store_pc = 0xBFC04044u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04048u); -#endif - /* 0xBFC04048: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04048u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0404C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04050: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC04058u; /* jal link before delay slot */ - psx_delay_BFC04050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04054: 2484DEB4 addiu $a0, $a0, -8524 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8524)); - PGXP_ALU(0x2484DEB4u, cpu->gpr[4], _pgx1, 0xFFFFDEB4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04054u); -#endif - if (psx_delay_BFC04050) { - psx_delay_BFC04050 = 0; - cpu->gpr[31] = 0xBFC04058u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC04058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04058: 0FF0104E jal 0xBFC04138 */ - cpu->gpr[31] = 0xBFC04060u; /* jal link before delay slot */ - psx_delay_BFC04058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0405Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0405C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0405Cu); -#endif - if (psx_delay_BFC04058) { - psx_delay_BFC04058 = 0; - cpu->gpr[31] = 0xBFC04060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04138u); - cpu->pc = 0xBFC04138u; return; - } -label_BFC04060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC04060: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04064u); -#endif - /* 0xBFC04064: 8DEFDE94 lw $t7, -8556($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04064u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDE94u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04068: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0406Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0406C: 3C0E0400 lui $t6, 0x400 */ - cpu->gpr[14] = 0x04000000u; - PGXP_ALU(0x3C0E0400u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0406Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04070u); -#endif - /* 0xBFC04070: 8C42DEA4 lw $v0, -8540($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04070u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42DEA4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04074: 35CE0002 ori $t6, $t6, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x2u; - PGXP_ALU(0x35CE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC04078: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0407C: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0407Cu); return; } g_debug_last_store_pc = 0xBFC0407Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04080u); -#endif - /* 0xBFC04080: 8F18DEA8 lw $t8, -8536($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04080u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DEA8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC04084: 3C0ABFC1 lui $t2, 0xBFC1 */ - cpu->gpr[10] = 0xBFC10000u; - PGXP_ALU(0x3C0ABFC1u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC04088: AF000000 sw $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04088u); return; } g_debug_last_store_pc = 0xBFC04088u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAF000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0408Cu); -#endif - /* 0xBFC0408C: 8C590000 lw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0408Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0408Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC04090: 3C0BBFC1 lui $t3, 0xBFC1 */ - cpu->gpr[11] = 0xBFC10000u; - PGXP_ALU(0x3C0BBFC1u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC04094: 37280800 ori $t0, $t9, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] | 0x800u; - PGXP_ALU(0x37280800u, cpu->gpr[8], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC04098: AC480000 sw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04098u); return; } g_debug_last_store_pc = 0xBFC04098u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0409Cu); -#endif - /* 0xBFC0409C: 8D4ADE98 lw $t2, -8552($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -8552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-8552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0409Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4ADE98u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040A0u); -#endif - /* 0xBFC040A0: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040A0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC040A4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC040A8: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040A8u); return; } g_debug_last_store_pc = 0xBFC040A8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040ACu); -#endif - /* 0xBFC040AC: 8D6BDE9C lw $t3, -8548($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040ACu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BDE9Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC040B0: 2484DEC0 addiu $a0, $a0, -8512 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8512)); - PGXP_ALU(0x2484DEC0u, cpu->gpr[4], _pgx1, 0xFFFFDEC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC040B4: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC040BCu; /* jal link before delay slot */ - psx_delay_BFC040B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC040B8: AD600000 sw $zero, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040B8u); return; } g_debug_last_store_pc = 0xBFC040B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040B8u); -#endif - if (psx_delay_BFC040B4) { - psx_delay_BFC040B4 = 0; - cpu->gpr[31] = 0xBFC040BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC040BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC040BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC040BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC040BC: 3C0DBFC1 lui $t5, 0xBFC1 */ - cpu->gpr[13] = 0xBFC10000u; - PGXP_ALU(0x3C0DBFC1u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040C0u); -#endif - /* 0xBFC040C0: 8DADDEA0 lw $t5, -8544($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040C0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADDEA0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC040C4: 3C0C0100 lui $t4, 0x100 */ - cpu->gpr[12] = 0x01000000u; - PGXP_ALU(0x3C0C0100u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC040C8: 358C0401 ori $t4, $t4, 0x401 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] | 0x401u; - PGXP_ALU(0x358C0401u, cpu->gpr[12], _pgx1, 0x0401u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC040CC: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC040D0: 2484DEC8 addiu $a0, $a0, -8504 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8504)); - PGXP_ALU(0x2484DEC8u, cpu->gpr[4], _pgx1, 0xFFFFDEC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC040D4: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC040DCu; /* jal link before delay slot */ - psx_delay_BFC040D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC040D8: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040D8u); return; } g_debug_last_store_pc = 0xBFC040D8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040D8u); -#endif - if (psx_delay_BFC040D4) { - psx_delay_BFC040D4 = 0; - cpu->gpr[31] = 0xBFC040DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC040DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC040DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC040DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040DCu); -#endif - /* 0xBFC040DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC040E0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC040E4: 03E00008 jr $ra */ - psx_delay_BFC040E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC040E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC040E8u); -#endif - if (psx_delay_BFC040E4) { - psx_delay_BFC040E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC040EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC040ECu); - int psx_delay_BFC04118 = 0; -label_BFC040EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC040ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC040ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC040EC: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC040F0: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC040F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040F4u); -#endif - /* 0xBFC040F4: 8C42DE94 lw $v0, -8556($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42DE94u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040F8u); -#endif - /* 0xBFC040F8: 8DEFDEA0 lw $t7, -8544($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040F8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDEA0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC040FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC040FC: 240E0401 addiu $t6, $zero, 1025 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1025)); - PGXP_ALU(0x240E0401u, cpu->gpr[14], _pgx1, 0x00000401u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC040FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC04100: 3C180400 lui $t8, 0x400 */ - cpu->gpr[24] = 0x04000000u; - PGXP_ALU(0x3C180400u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC04104: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04104u); return; } g_debug_last_store_pc = 0xBFC04104u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC04108: 3C190200 lui $t9, 0x200 */ - cpu->gpr[25] = 0x02000000u; - PGXP_ALU(0x3C190200u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC0410C: AC580000 sw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0410Cu); return; } g_debug_last_store_pc = 0xBFC0410Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC04110: 3C080100 lui $t0, 0x100 */ - cpu->gpr[8] = 0x01000000u; - PGXP_ALU(0x3C080100u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC04114: AC590000 sw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04114u); return; } g_debug_last_store_pc = 0xBFC04114u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04118: 03E00008 jr $ra */ - psx_delay_BFC04118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0411Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0411C: AC480000 sw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0411Cu); return; } g_debug_last_store_pc = 0xBFC0411Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0411Cu); -#endif - if (psx_delay_BFC04118) { - psx_delay_BFC04118 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04120(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04120u); - int psx_delay_BFC04130 = 0; -label_BFC04120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04120: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04124u); -#endif - /* 0xBFC04124: 8DCEDE94 lw $t6, -8556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04124u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04128: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0412Cu); -#endif - /* 0xBFC0412C: 8DC20000 lw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0412Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0412Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04130: 03E00008 jr $ra */ - psx_delay_BFC04130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04134u); -#endif - if (psx_delay_BFC04130) { - psx_delay_BFC04130 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04138(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04138u); - int psx_delay_BFC04154 = 0; - int psx_taken_BFC04154 = 0; - int psx_delay_BFC04168 = 0; - int psx_taken_BFC04168 = 0; - int psx_delay_BFC04174 = 0; - int psx_taken_BFC04174 = 0; - int psx_delay_BFC04180 = 0; - int psx_delay_BFC04188 = 0; - int psx_taken_BFC04188 = 0; - int psx_delay_BFC0419C = 0; - int psx_taken_BFC0419C = 0; - int psx_delay_BFC041A4 = 0; - int psx_taken_BFC041A4 = 0; - int psx_delay_BFC041C4 = 0; - int psx_taken_BFC041C4 = 0; - int psx_delay_BFC041D0 = 0; - int psx_taken_BFC041D0 = 0; - int psx_delay_BFC041DC = 0; - int psx_delay_BFC041E4 = 0; - int psx_taken_BFC041E4 = 0; - int psx_delay_BFC041F8 = 0; - int psx_taken_BFC041F8 = 0; - int psx_delay_BFC0420C = 0; - int psx_taken_BFC0420C = 0; - int psx_delay_BFC04220 = 0; - int psx_taken_BFC04220 = 0; - int psx_delay_BFC0422C = 0; - int psx_taken_BFC0422C = 0; - int psx_delay_BFC04238 = 0; - int psx_delay_BFC04240 = 0; - int psx_taken_BFC04240 = 0; - int psx_delay_BFC04258 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0415Cu: goto label_BFC0415C; - case 0xBFC04170u: goto label_BFC04170; - case 0xBFC04174u: goto label_BFC04174; - case 0xBFC0417Cu: goto label_BFC0417C; - case 0xBFC04188u: goto label_BFC04188; - case 0xBFC04190u: goto label_BFC04190; - case 0xBFC041A4u: goto label_BFC041A4; - case 0xBFC041ACu: goto label_BFC041AC; - case 0xBFC041CCu: goto label_BFC041CC; - case 0xBFC041D0u: goto label_BFC041D0; - case 0xBFC041D8u: goto label_BFC041D8; - case 0xBFC041E4u: goto label_BFC041E4; - case 0xBFC041ECu: goto label_BFC041EC; - case 0xBFC04200u: goto label_BFC04200; - case 0xBFC04214u: goto label_BFC04214; - case 0xBFC04228u: goto label_BFC04228; - case 0xBFC0422Cu: goto label_BFC0422C; - case 0xBFC04234u: goto label_BFC04234; - case 0xBFC04240u: goto label_BFC04240; - case 0xBFC04248u: goto label_BFC04248; - case 0xBFC04250u: goto label_BFC04250; - default: break; - } - } -label_BFC04138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC04138: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0413Cu); -#endif - /* 0xBFC0413C: 8CC6DE94 lw $a2, -8556($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0413Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6DE94u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0413Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04140: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04144: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04144u); return; } g_debug_last_store_pc = 0xBFC04144u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04148u); -#endif - /* 0xBFC04148: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04148u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0414Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0414C: 3C016000 lui $at, 0x6000 */ - cpu->gpr[1] = 0x60000000u; - PGXP_ALU(0x3C016000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0414Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC04150: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC04154: 15E00015 bne $t7, $zero, 0xBFC041AC */ - uint32_t psx_brA_BFC04154 = cpu->gpr[15]; uint32_t psx_brB_BFC04154 = cpu->gpr[0]; - psx_taken_BFC04154 = (psx_brA_BFC04154 != psx_brB_BFC04154); - psx_delay_BFC04154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04158: 3C031000 lui $v1, 0x1000 */ - cpu->gpr[3] = 0x10000000u; - PGXP_ALU(0x3C031000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04158u); -#endif - if (psx_delay_BFC04154) { - psx_delay_BFC04154 = 0; - if (psx_taken_BFC04154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041ACu); - goto label_BFC041AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0415Cu); - } -label_BFC0415C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0415Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0415Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0415Cu); -#endif - /* 0xBFC0415C: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0415Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0415Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04160: 3C041000 lui $a0, 0x1000 */ - cpu->gpr[4] = 0x10000000u; - PGXP_ALU(0x3C041000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC04164: 0304C824 and $t9, $t8, $a0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[4]; - PGXP_ALU(0x0304C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04168: 1720000E bne $t9, $zero, 0xBFC041A4 */ - uint32_t psx_brA_BFC04168 = cpu->gpr[25]; uint32_t psx_brB_BFC04168 = cpu->gpr[0]; - psx_taken_BFC04168 = (psx_brA_BFC04168 != psx_brB_BFC04168); - psx_delay_BFC04168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0416C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0416Cu); -#endif - if (psx_delay_BFC04168) { - psx_delay_BFC04168 = 0; - if (psx_taken_BFC04168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041A4u); - goto label_BFC041A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04170u); - } -label_BFC04170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC04170: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04170u); -#endif -label_BFC04174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04174: 14400006 bne $v0, $zero, 0xBFC04190 */ - uint32_t psx_brA_BFC04174 = cpu->gpr[2]; uint32_t psx_brB_BFC04174 = cpu->gpr[0]; - psx_taken_BFC04174 = (psx_brA_BFC04174 != psx_brB_BFC04174); - psx_delay_BFC04174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04178: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04178u); -#endif - if (psx_delay_BFC04174) { - psx_delay_BFC04174 = 0; - if (psx_taken_BFC04174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04190u); - goto label_BFC04190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0417Cu); - } -label_BFC0417C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0417Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0417C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04180: 0FF01098 jal 0xBFC04260 */ - cpu->gpr[31] = 0xBFC04188u; /* jal link before delay slot */ - psx_delay_BFC04180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04184: 2484DED0 addiu $a0, $a0, -8496 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8496)); - PGXP_ALU(0x2484DED0u, cpu->gpr[4], _pgx1, 0xFFFFDED0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04184u); -#endif - if (psx_delay_BFC04180) { - psx_delay_BFC04180 = 0; - cpu->gpr[31] = 0xBFC04188u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04260u); - cpu->pc = 0xBFC04260u; return; - } -label_BFC04188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04188: 10000031 beq $zero, $zero, 0xBFC04250 */ - uint32_t psx_brA_BFC04188 = cpu->gpr[0]; uint32_t psx_brB_BFC04188 = cpu->gpr[0]; - psx_taken_BFC04188 = (psx_brA_BFC04188 == psx_brB_BFC04188); - psx_delay_BFC04188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0418Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0418C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0418Cu); -#endif - if (psx_delay_BFC04188) { - psx_delay_BFC04188 = 0; - if (psx_taken_BFC04188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04250u); - goto label_BFC04250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04190u); - } -label_BFC04190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04190u); -#endif - /* 0xBFC04190: 8CC80000 lw $t0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04190u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x8CC80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC04198: 01044824 and $t1, $t0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[4]; - PGXP_ALU(0x01044824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0419Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0419C: 1120FFF5 beq $t1, $zero, 0xBFC04174 */ - uint32_t psx_brA_BFC0419C = cpu->gpr[9]; uint32_t psx_brB_BFC0419C = cpu->gpr[0]; - psx_taken_BFC0419C = (psx_brA_BFC0419C == psx_brB_BFC0419C); - psx_delay_BFC0419C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC041A0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041A0u); -#endif - if (psx_delay_BFC0419C) { - psx_delay_BFC0419C = 0; - if (psx_taken_BFC0419C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04174u); - goto label_BFC04174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041A4u); - } -label_BFC041A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC041A4: 1000002A beq $zero, $zero, 0xBFC04250 */ - uint32_t psx_brA_BFC041A4 = cpu->gpr[0]; uint32_t psx_brB_BFC041A4 = cpu->gpr[0]; - psx_taken_BFC041A4 = (psx_brA_BFC041A4 == psx_brB_BFC041A4); - psx_delay_BFC041A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC041A8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041A8u); -#endif - if (psx_delay_BFC041A4) { - psx_delay_BFC041A4 = 0; - if (psx_taken_BFC041A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04250u); - goto label_BFC04250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041ACu); - } -label_BFC041AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC041AC: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC041ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041B0u); -#endif - /* 0xBFC041B0: 8C84DEA0 lw $a0, -8544($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC041B0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DEA0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC041B4: 3C050100 lui $a1, 0x100 */ - cpu->gpr[5] = 0x01000000u; - PGXP_ALU(0x3C050100u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC041B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041B8u); -#endif - /* 0xBFC041B8: 8C8A0000 lw $t2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC041B8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC041BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC041BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC041C0: 01455824 and $t3, $t2, $a1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[5]; - PGXP_ALU(0x01455824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC041C4: 1160000E beq $t3, $zero, 0xBFC04200 */ - uint32_t psx_brA_BFC041C4 = cpu->gpr[11]; uint32_t psx_brB_BFC041C4 = cpu->gpr[0]; - psx_taken_BFC041C4 = (psx_brA_BFC041C4 == psx_brB_BFC041C4); - psx_delay_BFC041C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC041C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC041C8u); -#endif - if (psx_delay_BFC041C4) { - psx_delay_BFC041C4 = 0; - if (psx_taken_BFC041C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04200u); - goto label_BFC04200; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041CCu); - } -label_BFC041CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC041CC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041CCu); -#endif -label_BFC041D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC041D0: 14400006 bne $v0, $zero, 0xBFC041EC */ - uint32_t psx_brA_BFC041D0 = cpu->gpr[2]; uint32_t psx_brB_BFC041D0 = cpu->gpr[0]; - psx_taken_BFC041D0 = (psx_brA_BFC041D0 != psx_brB_BFC041D0); - psx_delay_BFC041D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC041D4: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041D4u); -#endif - if (psx_delay_BFC041D0) { - psx_delay_BFC041D0 = 0; - if (psx_taken_BFC041D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041ECu); - goto label_BFC041EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041D8u); - } -label_BFC041D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC041D8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC041D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC041DC: 0FF01098 jal 0xBFC04260 */ - cpu->gpr[31] = 0xBFC041E4u; /* jal link before delay slot */ - psx_delay_BFC041DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC041E0: 2484DEE0 addiu $a0, $a0, -8480 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8480)); - PGXP_ALU(0x2484DEE0u, cpu->gpr[4], _pgx1, 0xFFFFDEE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041E0u); -#endif - if (psx_delay_BFC041DC) { - psx_delay_BFC041DC = 0; - cpu->gpr[31] = 0xBFC041E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04260u); - cpu->pc = 0xBFC04260u; return; - } -label_BFC041E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC041E4: 1000001A beq $zero, $zero, 0xBFC04250 */ - uint32_t psx_brA_BFC041E4 = cpu->gpr[0]; uint32_t psx_brB_BFC041E4 = cpu->gpr[0]; - psx_taken_BFC041E4 = (psx_brA_BFC041E4 == psx_brB_BFC041E4); - psx_delay_BFC041E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC041E8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041E8u); -#endif - if (psx_delay_BFC041E4) { - psx_delay_BFC041E4 = 0; - if (psx_taken_BFC041E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04250u); - goto label_BFC04250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041ECu); - } -label_BFC041EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC041ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC041ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041ECu); -#endif - /* 0xBFC041EC: 8C8C0000 lw $t4, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC041ECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC041F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC041F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC041F4: 01856824 and $t5, $t4, $a1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[5]; - PGXP_ALU(0x01856824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC041F8: 15A0FFF5 bne $t5, $zero, 0xBFC041D0 */ - uint32_t psx_brA_BFC041F8 = cpu->gpr[13]; uint32_t psx_brB_BFC041F8 = cpu->gpr[0]; - psx_taken_BFC041F8 = (psx_brA_BFC041F8 != psx_brB_BFC041F8); - psx_delay_BFC041F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC041FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC041FC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC041FCu); -#endif - if (psx_delay_BFC041F8) { - psx_delay_BFC041F8 = 0; - if (psx_taken_BFC041F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC041D0u); - goto label_BFC041D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04200u); - } -label_BFC04200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04200u); -#endif - /* 0xBFC04200: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04200u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04204: 3C030400 lui $v1, 0x400 */ - cpu->gpr[3] = 0x04000000u; - PGXP_ALU(0x3C030400u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC04208: 01C37824 and $t7, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[3]; - PGXP_ALU(0x01C37824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0420Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0420C: 15E00007 bne $t7, $zero, 0xBFC0422C */ - uint32_t psx_brA_BFC0420C = cpu->gpr[15]; uint32_t psx_brB_BFC0420C = cpu->gpr[0]; - psx_taken_BFC0420C = (psx_brA_BFC0420C != psx_brB_BFC0420C); - psx_delay_BFC0420C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04210: 3C020010 lui $v0, 0x10 */ - cpu->gpr[2] = 0x00100000u; - PGXP_ALU(0x3C020010u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04210u); -#endif - if (psx_delay_BFC0420C) { - psx_delay_BFC0420C = 0; - if (psx_taken_BFC0420C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0422Cu); - goto label_BFC0422C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04214u); - } -label_BFC04214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04214u); -#endif - /* 0xBFC04214: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04214u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04218: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0421Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC0421C: 0303C824 and $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[3]; - PGXP_ALU(0x0303C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0421Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04220: 1320FFFC beq $t9, $zero, 0xBFC04214 */ - uint32_t psx_brA_BFC04220 = cpu->gpr[25]; uint32_t psx_brB_BFC04220 = cpu->gpr[0]; - psx_taken_BFC04220 = (psx_brA_BFC04220 == psx_brB_BFC04220); - psx_delay_BFC04220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04224: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04224u); -#endif - if (psx_delay_BFC04220) { - psx_delay_BFC04220 = 0; - if (psx_taken_BFC04220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04214u); - goto label_BFC04214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04228u); - } -label_BFC04228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04228: 3C020010 lui $v0, 0x10 */ - cpu->gpr[2] = 0x00100000u; - PGXP_ALU(0x3C020010u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04228u); -#endif -label_BFC0422C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0422Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0422Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0422Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0422C: 14400006 bne $v0, $zero, 0xBFC04248 */ - uint32_t psx_brA_BFC0422C = cpu->gpr[2]; uint32_t psx_brB_BFC0422C = cpu->gpr[0]; - psx_taken_BFC0422C = (psx_brA_BFC0422C != psx_brB_BFC0422C); - psx_delay_BFC0422C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04230: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04230u); -#endif - if (psx_delay_BFC0422C) { - psx_delay_BFC0422C = 0; - if (psx_taken_BFC0422C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04248u); - goto label_BFC04248; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04234u); - } -label_BFC04234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04234: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04238: 0FF01098 jal 0xBFC04260 */ - cpu->gpr[31] = 0xBFC04240u; /* jal link before delay slot */ - psx_delay_BFC04238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0423Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0423C: 2484DEF0 addiu $a0, $a0, -8464 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8464)); - PGXP_ALU(0x2484DEF0u, cpu->gpr[4], _pgx1, 0xFFFFDEF0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0423Cu); -#endif - if (psx_delay_BFC04238) { - psx_delay_BFC04238 = 0; - cpu->gpr[31] = 0xBFC04240u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04260u); - cpu->pc = 0xBFC04260u; return; - } -label_BFC04240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04240: 10000003 beq $zero, $zero, 0xBFC04250 */ - uint32_t psx_brA_BFC04240 = cpu->gpr[0]; uint32_t psx_brB_BFC04240 = cpu->gpr[0]; - psx_taken_BFC04240 = (psx_brA_BFC04240 == psx_brB_BFC04240); - psx_delay_BFC04240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04244: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04244u); -#endif - if (psx_delay_BFC04240) { - psx_delay_BFC04240 = 0; - if (psx_taken_BFC04240) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04250u); - goto label_BFC04250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04248u); - } -label_BFC04248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC04248: ACC30000 sw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04248u); return; } g_debug_last_store_pc = 0xBFC04248u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xACC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0424Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0424C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0424Cu); -#endif -label_BFC04250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04250u); -#endif - /* 0xBFC04250: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04250u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04254: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04258: 03E00008 jr $ra */ - psx_delay_BFC04258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0425C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0425Cu); -#endif - if (psx_delay_BFC04258) { - psx_delay_BFC04258 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04260(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04260u); - int psx_delay_BFC0427C = 0; - int psx_delay_BFC04284 = 0; - int psx_delay_BFC04294 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04284u: goto label_BFC04284; - case 0xBFC0428Cu: goto label_BFC0428C; - default: break; - } - } -label_BFC04260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04260: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04264u); -#endif - /* 0xBFC04264: 8DCEDE94 lw $t6, -8556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04264u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDE94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04268: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0426C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0426Cu); return; } g_debug_last_store_pc = 0xBFC0426Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC04270: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04274: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04278u); -#endif - /* 0xBFC04278: 8DC60000 lw $a2, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04278u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4000u); } - PGXP_LOAD(0x8DC60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0427C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC04284u; /* jal link before delay slot */ - psx_delay_BFC0427C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04280: 2484DF00 addiu $a0, $a0, -8448 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8448)); - PGXP_ALU(0x2484DF00u, cpu->gpr[4], _pgx1, 0xFFFFDF00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04280u); -#endif - if (psx_delay_BFC0427C) { - psx_delay_BFC0427C = 0; - cpu->gpr[31] = 0xBFC04284u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC04284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04284: 0FF0103B jal 0xBFC040EC */ - cpu->gpr[31] = 0xBFC0428Cu; /* jal link before delay slot */ - psx_delay_BFC04284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04288u); -#endif - if (psx_delay_BFC04284) { - psx_delay_BFC04284 = 0; - cpu->gpr[31] = 0xBFC0428Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC040ECu); - cpu->pc = 0xBFC040ECu; return; - } -label_BFC0428C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0428Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0428Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0428Cu); -#endif - /* 0xBFC0428C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0428Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0428Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04290: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04294: 03E00008 jr $ra */ - psx_delay_BFC04294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04298: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04298u); -#endif - if (psx_delay_BFC04294) { - psx_delay_BFC04294 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC042A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC042A0u); - int psx_delay_BFC042C0 = 0; - int psx_taken_BFC042C0 = 0; - int psx_delay_BFC042C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC042B4u: goto label_BFC042B4; - case 0xBFC042C8u: goto label_BFC042C8; - default: break; - } - } -label_BFC042A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042A0: 3C04A000 lui $a0, 0xA000 */ - cpu->gpr[4] = 0xA0000000u; - PGXP_ALU(0x3C04A000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC042A4: 3C05A000 lui $a1, 0xA000 */ - cpu->gpr[5] = 0xA0000000u; - PGXP_ALU(0x3C05A000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC042A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042A8: 24840510 addiu $a0, $a0, 1296 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1296)); - PGXP_ALU(0x24840510u, cpu->gpr[4], _pgx1, 0x00000510u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC042AC: 24A50540 addiu $a1, $a1, 1344 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1344)); - PGXP_ALU(0x24A50540u, cpu->gpr[5], _pgx1, 0x00000540u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC042B0: 240600A0 addiu $a2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240600A0u, cpu->gpr[6], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042B0u); -#endif -label_BFC042B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042B4u); -#endif - /* 0xBFC042B4: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC042B4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042B8: 20840004 addi $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC042BC: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC042C0: 1485FFFC bne $a0, $a1, 0xBFC042B4 */ - uint32_t psx_brA_BFC042C0 = cpu->gpr[4]; uint32_t psx_brB_BFC042C0 = cpu->gpr[5]; - psx_taken_BFC042C0 = (psx_brA_BFC042C0 != psx_brB_BFC042C0); - psx_delay_BFC042C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC042C4: ACC7FFFC sw $a3, -4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC042C4u); return; } g_debug_last_store_pc = 0xBFC042C4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xACC7FFFCu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042C4u); -#endif - if (psx_delay_BFC042C0) { - psx_delay_BFC042C0 = 0; - if (psx_taken_BFC042C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042B4u); - goto label_BFC042B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042C8u); - } -label_BFC042C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC042C8: 03E00008 jr $ra */ - psx_delay_BFC042C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC042CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC042CCu); -#endif - if (psx_delay_BFC042C8) { - psx_delay_BFC042C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC042D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC042D0u); - int psx_delay_BFC042F0 = 0; - int psx_taken_BFC042F0 = 0; - int psx_delay_BFC042F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC042E4u: goto label_BFC042E4; - case 0xBFC042F8u: goto label_BFC042F8; - default: break; - } - } -label_BFC042D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042D0: 3C04BFC0 lui $a0, 0xBFC0 */ - cpu->gpr[4] = 0xBFC00000u; - PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC042D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC042D4: 3C05BFC0 lui $a1, 0xBFC0 */ - cpu->gpr[5] = 0xBFC00000u; - PGXP_ALU(0x3C05BFC0u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC042D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042D8: 24844300 addiu $a0, $a0, 17152 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17152)); - PGXP_ALU(0x24844300u, cpu->gpr[4], _pgx1, 0x00004300u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC042DC: 24A54604 addiu $a1, $a1, 17924 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17924)); - PGXP_ALU(0x24A54604u, cpu->gpr[5], _pgx1, 0x00004604u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC042E0: 24060200 addiu $a2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24060200u, cpu->gpr[6], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042E0u); -#endif -label_BFC042E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042E4u); -#endif - /* 0xBFC042E4: 8C870000 lw $a3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC042E4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC042E8: 20840004 addi $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC042EC: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC042F0: 1485FFFC bne $a0, $a1, 0xBFC042E4 */ - uint32_t psx_brA_BFC042F0 = cpu->gpr[4]; uint32_t psx_brB_BFC042F0 = cpu->gpr[5]; - psx_taken_BFC042F0 = (psx_brA_BFC042F0 != psx_brB_BFC042F0); - psx_delay_BFC042F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC042F4: ACC7FFFC sw $a3, -4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC042F4u); return; } g_debug_last_store_pc = 0xBFC042F4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xACC7FFFCu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC042F4u); -#endif - if (psx_delay_BFC042F0) { - psx_delay_BFC042F0 = 0; - if (psx_taken_BFC042F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042E4u); - goto label_BFC042E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042F8u); - } -label_BFC042F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC042F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC042F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC042F8: 03E00008 jr $ra */ - psx_delay_BFC042F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC042FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC042FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC042FCu); -#endif - if (psx_delay_BFC042F8) { - psx_delay_BFC042F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04610(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04610u); - int psx_delay_BFC04624 = 0; - int psx_delay_BFC04630 = 0; - int psx_taken_BFC04630 = 0; - int psx_delay_BFC04638 = 0; - int psx_taken_BFC04638 = 0; - int psx_delay_BFC04644 = 0; - int psx_delay_BFC04670 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0462Cu: goto label_BFC0462C; - case 0xBFC04638u: goto label_BFC04638; - case 0xBFC04640u: goto label_BFC04640; - case 0xBFC0464Cu: goto label_BFC0464C; - case 0xBFC04668u: goto label_BFC04668; - default: break; - } - } -label_BFC04610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04610: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC04614: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04618: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04618u); return; } g_debug_last_store_pc = 0xBFC04618u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0461Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0461C: 000528C0 sll $a1, $a1, 3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 3u; - PGXP_ALU(0x000528C0u, cpu->gpr[5], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0461Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC04620: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04624: 0FF036B8 jal 0xBFC0DAE0 */ - cpu->gpr[31] = 0xBFC0462Cu; /* jal link before delay slot */ - psx_delay_BFC04624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC04628: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04628u); return; } g_debug_last_store_pc = 0xBFC04628u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04628u); -#endif - if (psx_delay_BFC04624) { - psx_delay_BFC04624 = 0; - cpu->gpr[31] = 0xBFC0462Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAE0u); - cpu->pc = 0xBFC0DAE0u; return; - } -label_BFC0462C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0462Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0462Cu); -#endif - /* 0xBFC0462C: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0462Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04630: 14400003 bne $v0, $zero, 0xBFC04640 */ - uint32_t psx_brA_BFC04630 = cpu->gpr[2]; uint32_t psx_brB_BFC04630 = cpu->gpr[0]; - psx_taken_BFC04630 = (psx_brA_BFC04630 != psx_brB_BFC04630); - psx_delay_BFC04630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC04634: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04634u); -#endif - if (psx_delay_BFC04630) { - psx_delay_BFC04630 = 0; - if (psx_taken_BFC04630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04640u); - goto label_BFC04640; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04638u); - } -label_BFC04638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04638: 1000000B beq $zero, $zero, 0xBFC04668 */ - uint32_t psx_brA_BFC04638 = cpu->gpr[0]; uint32_t psx_brB_BFC04638 = cpu->gpr[0]; - psx_taken_BFC04638 = (psx_brA_BFC04638 == psx_brB_BFC04638); - psx_delay_BFC04638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0463Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0463C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0463Cu); -#endif - if (psx_delay_BFC04638) { - psx_delay_BFC04638 = 0; - if (psx_taken_BFC04638) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04668u); - goto label_BFC04668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04640u); - } -label_BFC04640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC04640: AFA4001C sw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04640u); return; } g_debug_last_store_pc = 0xBFC04640u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04644: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0464Cu; /* jal link before delay slot */ - psx_delay_BFC04644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC04648: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04648u); return; } g_debug_last_store_pc = 0xBFC04648u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04648u); -#endif - if (psx_delay_BFC04644) { - psx_delay_BFC04644 = 0; - cpu->gpr[31] = 0xBFC0464Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0464C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0464Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0464Cu); -#endif - /* 0xBFC0464C: 8FA4001C lw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0464Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04650u); -#endif - /* 0xBFC04650: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04650u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04654: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04658: AC240100 sw $a0, 256($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04658u); return; } g_debug_last_store_pc = 0xBFC04658u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC240100u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0465Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0465C: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0465Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC04660: AC250104 sw $a1, 260($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 260; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04660u); return; } g_debug_last_store_pc = 0xBFC04660u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC250104u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC04664: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04664u); -#endif -label_BFC04668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04668u); -#endif - /* 0xBFC04668: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04668u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0466Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0466C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0466Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04670: 03E00008 jr $ra */ - psx_delay_BFC04670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04674u); -#endif - if (psx_delay_BFC04670) { - psx_delay_BFC04670 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04678(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04678u); - int psx_delay_BFC04690 = 0; - int psx_delay_BFC046B8 = 0; - int psx_delay_BFC046C4 = 0; - int psx_taken_BFC046C4 = 0; - int psx_delay_BFC046CC = 0; - int psx_taken_BFC046CC = 0; - int psx_delay_BFC04700 = 0; - int psx_taken_BFC04700 = 0; - int psx_delay_BFC04710 = 0; - int psx_taken_BFC04710 = 0; - int psx_delay_BFC04724 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04698u: goto label_BFC04698; - case 0xBFC046C0u: goto label_BFC046C0; - case 0xBFC046CCu: goto label_BFC046CC; - case 0xBFC046D4u: goto label_BFC046D4; - case 0xBFC046D8u: goto label_BFC046D8; - case 0xBFC04708u: goto label_BFC04708; - case 0xBFC04718u: goto label_BFC04718; - case 0xBFC0471Cu: goto label_BFC0471C; - default: break; - } - } -label_BFC04678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04678: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC0467C: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04680: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04680u); return; } g_debug_last_store_pc = 0xBFC04680u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04684: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04688: 2484DF20 addiu $a0, $a0, -8416 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8416)); - PGXP_ALU(0x2484DF20u, cpu->gpr[4], _pgx1, 0xFFFFDF20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC0468C: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04690: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC04698u; /* jal link before delay slot */ - psx_delay_BFC04690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC04694: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04694u); return; } g_debug_last_store_pc = 0xBFC04694u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04694u); -#endif - if (psx_delay_BFC04690) { - psx_delay_BFC04690 = 0; - cpu->gpr[31] = 0xBFC04698u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC04698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04698u); -#endif - /* 0xBFC04698: 8FA60028 lw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04698u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0469Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0469C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0469Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC046A0: AFA60024 sw $a2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046A0u); return; } g_debug_last_store_pc = 0xBFC046A0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60024u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC046A4: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC046A8: 000130C0 sll $a2, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[6] = cpu->gpr[1] << 3u; - PGXP_ALU(0x000130C0u, cpu->gpr[6], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC046AC: 00C13023 subu $a2, $a2, $at */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[6] = cpu->gpr[6] - cpu->gpr[1]; - PGXP_ALU(0x00C13023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC046B0: 00063080 sll $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00063080u, cpu->gpr[6], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC046B4: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC046B8: 0FF036B8 jal 0xBFC0DAE0 */ - cpu->gpr[31] = 0xBFC046C0u; /* jal link before delay slot */ - psx_delay_BFC046B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC046BC: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046BCu); return; } g_debug_last_store_pc = 0xBFC046BCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046BCu); -#endif - if (psx_delay_BFC046B8) { - psx_delay_BFC046B8 = 0; - cpu->gpr[31] = 0xBFC046C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAE0u); - cpu->pc = 0xBFC0DAE0u; return; - } -label_BFC046C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC046C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC046C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046C0u); -#endif - /* 0xBFC046C0: 8FA60028 lw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046C0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC046C4: 14400004 bne $v0, $zero, 0xBFC046D8 */ - uint32_t psx_brA_BFC046C4 = cpu->gpr[2]; uint32_t psx_brB_BFC046C4 = cpu->gpr[0]; - psx_taken_BFC046C4 = (psx_brA_BFC046C4 != psx_brB_BFC046C4); - psx_delay_BFC046C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046C8u); -#endif - /* 0xBFC046C8: 8FAE0024 lw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046C8u); -#endif - if (psx_delay_BFC046C4) { - psx_delay_BFC046C4 = 0; - if (psx_taken_BFC046C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC046D8u); - goto label_BFC046D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC046CCu); - } -label_BFC046CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC046CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC046CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC046CC: 10000013 beq $zero, $zero, 0xBFC0471C */ - uint32_t psx_brA_BFC046CC = cpu->gpr[0]; uint32_t psx_brB_BFC046CC = cpu->gpr[0]; - psx_taken_BFC046CC = (psx_brA_BFC046CC == psx_brB_BFC046CC); - psx_delay_BFC046CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC046D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046D0u); -#endif - if (psx_delay_BFC046CC) { - psx_delay_BFC046CC = 0; - if (psx_taken_BFC046CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0471Cu); - goto label_BFC0471C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC046D4u); - } -label_BFC046D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC046D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC046D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046D4u); -#endif - /* 0xBFC046D4: 8FAE0024 lw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046D4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046D4u); -#endif -label_BFC046D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC046D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC046D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC046D8: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC046D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC046DC: 000E78C0 sll $t7, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC046E0: AC260124 sw $a2, 292($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046E0u); return; } g_debug_last_store_pc = 0xBFC046E0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC260124u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC046E4: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC046E8: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC046E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC046EC: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC046F0: AC220120 sw $v0, 288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC046F0u); return; } g_debug_last_store_pc = 0xBFC046F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC220120u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8024u); -#endif - /* 0xBFC046F4: 004F2821 addu $a1, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC046F8: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC046FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC046FC: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC046FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04700: 10200005 beq $at, $zero, 0xBFC04718 */ - uint32_t psx_brA_BFC04700 = cpu->gpr[1]; uint32_t psx_brB_BFC04700 = cpu->gpr[0]; - psx_taken_BFC04700 = (psx_brA_BFC04700 == psx_brB_BFC04700); - psx_delay_BFC04700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC04704: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04704u); -#endif - if (psx_delay_BFC04700) { - psx_delay_BFC04700 = 0; - if (psx_taken_BFC04700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04718u); - goto label_BFC04718; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04708u); - } -label_BFC04708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04708: 2463001C addiu $v1, $v1, 28 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (28)); - PGXP_ALU(0x2463001Cu, cpu->gpr[3], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0470Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC0470C: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0470Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04710: 1420FFFD bne $at, $zero, 0xBFC04708 */ - uint32_t psx_brA_BFC04710 = cpu->gpr[1]; uint32_t psx_brB_BFC04710 = cpu->gpr[0]; - psx_taken_BFC04710 = (psx_brA_BFC04710 != psx_brB_BFC04710); - psx_delay_BFC04710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04714: AC60FFE8 sw $zero, -24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04714u); return; } g_debug_last_store_pc = 0xBFC04714u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04714u); -#endif - if (psx_delay_BFC04710) { - psx_delay_BFC04710 = 0; - if (psx_taken_BFC04710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04708u); - goto label_BFC04708; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04718u); - } -label_BFC04718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC04718: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04718u); -#endif -label_BFC0471C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0471Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0471Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0471Cu); -#endif - /* 0xBFC0471C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0471Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0471Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04720: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04724: 03E00008 jr $ra */ - psx_delay_BFC04724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04728: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04728u); -#endif - if (psx_delay_BFC04724) { - psx_delay_BFC04724 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0472C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0472Cu); - int psx_delay_BFC0474C = 0; - int psx_delay_BFC04780 = 0; - int psx_delay_BFC04788 = 0; - int psx_taken_BFC04788 = 0; - int psx_delay_BFC04790 = 0; - int psx_taken_BFC04790 = 0; - int psx_delay_BFC0479C = 0; - int psx_delay_BFC047A8 = 0; - int psx_taken_BFC047A8 = 0; - int psx_delay_BFC047B0 = 0; - int psx_taken_BFC047B0 = 0; - int psx_delay_BFC047CC = 0; - int psx_taken_BFC047CC = 0; - int psx_delay_BFC047DC = 0; - int psx_taken_BFC047DC = 0; - int psx_delay_BFC04800 = 0; - int psx_taken_BFC04800 = 0; - int psx_delay_BFC04814 = 0; - int psx_taken_BFC04814 = 0; - int psx_delay_BFC04848 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04754u: goto label_BFC04754; - case 0xBFC04788u: goto label_BFC04788; - case 0xBFC04790u: goto label_BFC04790; - case 0xBFC04798u: goto label_BFC04798; - case 0xBFC047A4u: goto label_BFC047A4; - case 0xBFC047B0u: goto label_BFC047B0; - case 0xBFC047B8u: goto label_BFC047B8; - case 0xBFC047D4u: goto label_BFC047D4; - case 0xBFC047E4u: goto label_BFC047E4; - case 0xBFC047E8u: goto label_BFC047E8; - case 0xBFC04808u: goto label_BFC04808; - case 0xBFC0480Cu: goto label_BFC0480C; - case 0xBFC0481Cu: goto label_BFC0481C; - case 0xBFC0483Cu: goto label_BFC0483C; - default: break; - } - } -label_BFC0472C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0472Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0472C: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC04730: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04730u); return; } g_debug_last_store_pc = 0xBFC04730u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC04734: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC04738: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04738u); return; } g_debug_last_store_pc = 0xBFC04738u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0473C: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04740: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04740u); return; } g_debug_last_store_pc = 0xBFC04740u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04744: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04748: 2484DF40 addiu $a0, $a0, -8384 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8384)); - PGXP_ALU(0x2484DF40u, cpu->gpr[4], _pgx1, 0xFFFFDF40u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0474Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0474C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC04754u; /* jal link before delay slot */ - psx_delay_BFC0474C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC04750: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04750u); -#endif - if (psx_delay_BFC0474C) { - psx_delay_BFC0474C = 0; - cpu->gpr[31] = 0xBFC04754u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC04754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC04754: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04754u); return; } g_debug_last_store_pc = 0xBFC04754u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC04758: 00118880 sll $s1, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00118880u, cpu->gpr[17], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0475C: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC04760: AC31010C sw $s1, 268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04760u); return; } g_debug_last_store_pc = 0xBFC04760u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAC31010Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC04764: AFB00030 sw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04764u); return; } g_debug_last_store_pc = 0xBFC04764u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10003u); -#endif - /* 0xBFC04768: 02000821 addu $at, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0476C: 00018080 sll $s0, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[16] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00018080u, cpu->gpr[16], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC04770: 02018023 subu $s0, $s0, $at */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[1]; - PGXP_ALU(0x02018023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC04774: 00108180 sll $s0, $s0, 6 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 6u; - PGXP_ALU(0x00108180u, cpu->gpr[16], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04778: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0477Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0477C: AC300114 sw $s0, 276($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0477Cu); return; } g_debug_last_store_pc = 0xBFC0477Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC300114u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0477Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04780: 0FF036B8 jal 0xBFC0DAE0 */ - cpu->gpr[31] = 0xBFC04788u; /* jal link before delay slot */ - psx_delay_BFC04780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC04784: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04784u); -#endif - if (psx_delay_BFC04780) { - psx_delay_BFC04780 = 0; - cpu->gpr[31] = 0xBFC04788u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAE0u); - cpu->pc = 0xBFC0DAE0u; return; - } -label_BFC04788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04788: 14400003 bne $v0, $zero, 0xBFC04798 */ - uint32_t psx_brA_BFC04788 = cpu->gpr[2]; uint32_t psx_brB_BFC04788 = cpu->gpr[0]; - psx_taken_BFC04788 = (psx_brA_BFC04788 != psx_brB_BFC04788); - psx_delay_BFC04788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0478Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC0478C: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0478Cu); -#endif - if (psx_delay_BFC04788) { - psx_delay_BFC04788 = 0; - if (psx_taken_BFC04788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04798u); - goto label_BFC04798; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04790u); - } -label_BFC04790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04790: 1000002A beq $zero, $zero, 0xBFC0483C */ - uint32_t psx_brA_BFC04790 = cpu->gpr[0]; uint32_t psx_brB_BFC04790 = cpu->gpr[0]; - psx_taken_BFC04790 = (psx_brA_BFC04790 == psx_brB_BFC04790); - psx_delay_BFC04790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04794: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04794u); -#endif - if (psx_delay_BFC04790) { - psx_delay_BFC04790 = 0; - if (psx_taken_BFC04790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0483Cu); - goto label_BFC0483C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04798u); - } -label_BFC04798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC04798: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0479Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0479C: 0FF036B8 jal 0xBFC0DAE0 */ - cpu->gpr[31] = 0xBFC047A4u; /* jal link before delay slot */ - psx_delay_BFC0479C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC047A0: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047A0u); return; } g_debug_last_store_pc = 0xBFC047A0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047A0u); -#endif - if (psx_delay_BFC0479C) { - psx_delay_BFC0479C = 0; - cpu->gpr[31] = 0xBFC047A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAE0u); - cpu->pc = 0xBFC0DAE0u; return; - } -label_BFC047A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047A4u); -#endif - /* 0xBFC047A4: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047A4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC047A8: 14400003 bne $v0, $zero, 0xBFC047B8 */ - uint32_t psx_brA_BFC047A8 = cpu->gpr[2]; uint32_t psx_brB_BFC047A8 = cpu->gpr[0]; - psx_taken_BFC047A8 = (psx_brA_BFC047A8 != psx_brB_BFC047A8); - psx_delay_BFC047A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC047AC: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047ACu); -#endif - if (psx_delay_BFC047A8) { - psx_delay_BFC047A8 = 0; - if (psx_taken_BFC047A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047B8u); - goto label_BFC047B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047B0u); - } -label_BFC047B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC047B0: 10000022 beq $zero, $zero, 0xBFC0483C */ - uint32_t psx_brA_BFC047B0 = cpu->gpr[0]; uint32_t psx_brB_BFC047B0 = cpu->gpr[0]; - psx_taken_BFC047B0 = (psx_brA_BFC047B0 == psx_brB_BFC047B0); - psx_delay_BFC047B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC047B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047B4u); -#endif - if (psx_delay_BFC047B0) { - psx_delay_BFC047B0 = 0; - if (psx_taken_BFC047B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0483Cu); - goto label_BFC0483C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047B8u); - } -label_BFC047B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047B8u); -#endif - /* 0xBFC047B8: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC047BC: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC047C0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8050u); -#endif - /* 0xBFC047C4: 00CF2021 addu $a0, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[15]; - PGXP_ALU(0x00CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x52u); -#endif - /* 0xBFC047C8: 00C4082B sltu $at, $a2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x00C4082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC047CC: 10200006 beq $at, $zero, 0xBFC047E8 */ - uint32_t psx_brA_BFC047CC = cpu->gpr[1]; uint32_t psx_brB_BFC047CC = cpu->gpr[0]; - psx_taken_BFC047CC = (psx_brA_BFC047CC == psx_brB_BFC047CC); - psx_delay_BFC047CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047D0u); -#endif - /* 0xBFC047D0: 8FB80030 lw $t8, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047D0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80030u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047D0u); -#endif - if (psx_delay_BFC047CC) { - psx_delay_BFC047CC = 0; - if (psx_taken_BFC047CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047E8u); - goto label_BFC047E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047D4u); - } -label_BFC047D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC047D4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC047D8: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC047DC: 1420FFFD bne $at, $zero, 0xBFC047D4 */ - uint32_t psx_brA_BFC047DC = cpu->gpr[1]; uint32_t psx_brB_BFC047DC = cpu->gpr[0]; - psx_taken_BFC047DC = (psx_brA_BFC047DC != psx_brB_BFC047DC); - psx_delay_BFC047DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC047E0: AC60FFFC sw $zero, -4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047E0u); return; } g_debug_last_store_pc = 0xBFC047E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047E0u); -#endif - if (psx_delay_BFC047DC) { - psx_delay_BFC047DC = 0; - if (psx_taken_BFC047DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047D4u); - goto label_BFC047D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC047E4u); - } -label_BFC047E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047E4u); -#endif - /* 0xBFC047E4: 8FB80030 lw $t8, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047E4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80030u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047E4u); -#endif -label_BFC047E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC047E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC047E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC047E8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC047EC: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC047F0: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC047F4: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000024u); -#endif - /* 0xBFC047F8: 00592821 addu $a1, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00592821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC047FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC047FC: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC047FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04800: 10200006 beq $at, $zero, 0xBFC0481C */ - uint32_t psx_brA_BFC04800 = cpu->gpr[1]; uint32_t psx_brB_BFC04800 = cpu->gpr[0]; - psx_taken_BFC04800 = (psx_brA_BFC04800 == psx_brB_BFC04800); - psx_delay_BFC04800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC04804: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04804u); -#endif - if (psx_delay_BFC04800) { - psx_delay_BFC04800 = 0; - if (psx_taken_BFC04800) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0481Cu); - goto label_BFC0481C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04808u); - } -label_BFC04808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04808: 24021000 addiu $v0, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24021000u, cpu->gpr[2], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04808u); -#endif -label_BFC0480C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0480Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0480C: 246300C0 addiu $v1, $v1, 192 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (192)); - PGXP_ALU(0x246300C0u, cpu->gpr[3], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC04810: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04814: 1420FFFD bne $at, $zero, 0xBFC0480C */ - uint32_t psx_brA_BFC04814 = cpu->gpr[1]; uint32_t psx_brB_BFC04814 = cpu->gpr[0]; - psx_taken_BFC04814 = (psx_brA_BFC04814 != psx_brB_BFC04814); - psx_delay_BFC04814 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC04818: AC62FF40 sw $v0, -192($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04818u); return; } g_debug_last_store_pc = 0xBFC04818u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC62FF40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04818u); -#endif - if (psx_delay_BFC04814) { - psx_delay_BFC04814 = 0; - if (psx_taken_BFC04814) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0480Cu); - goto label_BFC0480C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0481Cu); - } -label_BFC0481C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0481Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0481C: 24084000 addiu $t0, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24084000u, cpu->gpr[8], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC04820: ACE80000 sw $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04820u); return; } g_debug_last_store_pc = 0xBFC04820u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC04824: ACC70000 sw $a3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04824u); return; } g_debug_last_store_pc = 0xBFC04824u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xACC70000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04828: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0482Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC0482C: AC260108 sw $a2, 264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0482Cu); return; } g_debug_last_store_pc = 0xBFC0482Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC260108u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0482Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04830: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC04834: AC270110 sw $a3, 272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04834u); return; } g_debug_last_store_pc = 0xBFC04834u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC270110u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30004u); -#endif - /* 0xBFC04838: 02301021 addu $v0, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[16]; - PGXP_ALU(0x02301021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04838u); -#endif -label_BFC0483C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0483Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0483Cu); -#endif - /* 0xBFC0483C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0483Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04840u); -#endif - /* 0xBFC04840: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04840u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04844u); -#endif - /* 0xBFC04844: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04844u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04848: 03E00008 jr $ra */ - psx_delay_BFC04848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0484Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0484C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0484Cu); -#endif - if (psx_delay_BFC04848) { - psx_delay_BFC04848 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04850(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04850u); - int psx_delay_BFC04888 = 0; - int psx_delay_BFC048B8 = 0; - int psx_delay_BFC048C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04890u: goto label_BFC04890; - case 0xBFC048C0u: goto label_BFC048C0; - default: break; - } - } -label_BFC04850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04850: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04854: 3C0EBFC0 lui $t6, 0xBFC0 */ - cpu->gpr[14] = 0xBFC00000u; - PGXP_ALU(0x3C0EBFC0u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04858: 25CE506C addiu $t6, $t6, 20588 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (20588)); - PGXP_ALU(0x25CE506Cu, cpu->gpr[14], _pgx1, 0x0000506Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0485C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC04860: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04864: AC2091D0 sw $zero, -28208($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04864u); return; } g_debug_last_store_pc = 0xBFC04864u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC04868: AC2E91D4 sw $t6, -28204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28204)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04868u); return; } g_debug_last_store_pc = 0xBFC04868u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E91D4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0486Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0486C: 3C0FBFC0 lui $t7, 0xBFC0 */ - cpu->gpr[15] = 0xBFC00000u; - PGXP_ALU(0x3C0FBFC0u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0486Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC04870: 24A591D0 addiu $a1, $a1, -28208 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28208)); - PGXP_ALU(0x24A591D0u, cpu->gpr[5], _pgx1, 0xFFFF91D0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04874: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04874u); return; } g_debug_last_store_pc = 0xBFC04874u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC04878: 25EF4DEC addiu $t7, $t7, 19948 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (19948)); - PGXP_ALU(0x25EF4DECu, cpu->gpr[15], _pgx1, 0x00004DECu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0487C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC04880: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC04884: AC2F91D8 sw $t7, -28200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04884u); return; } g_debug_last_store_pc = 0xBFC04884u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F91D8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04888: 0FF036BC jal 0xBFC0DAF0 */ - cpu->gpr[31] = 0xBFC04890u; /* jal link before delay slot */ - psx_delay_BFC04888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0488Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0488C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0488Cu); -#endif - if (psx_delay_BFC04888) { - psx_delay_BFC04888 = 0; - cpu->gpr[31] = 0xBFC04890u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAF0u); - cpu->pc = 0xBFC0DAF0u; return; - } -label_BFC04890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04890: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04894: 244291E0 addiu $v0, $v0, -28192 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-28192)); - PGXP_ALU(0x244291E0u, cpu->gpr[2], _pgx1, 0xFFFF91E0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC04898: 3C18BFC0 lui $t8, 0xBFC0 */ - cpu->gpr[24] = 0xBFC00000u; - PGXP_ALU(0x3C18BFC0u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0489C: 3C19BFC0 lui $t9, 0xBFC0 */ - cpu->gpr[25] = 0xBFC00000u; - PGXP_ALU(0x3C19BFC0u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC048A0: 271850A4 addiu $t8, $t8, 20644 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (20644)); - PGXP_ALU(0x271850A4u, cpu->gpr[24], _pgx1, 0x000050A4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC048A4: 27394FBC addiu $t9, $t9, 20412 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (20412)); - PGXP_ALU(0x27394FBCu, cpu->gpr[25], _pgx1, 0x00004FBCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC048A8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048A8u); return; } g_debug_last_store_pc = 0xBFC048A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC048AC: AC580004 sw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048ACu); return; } g_debug_last_store_pc = 0xBFC048ACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC048B0: AC590008 sw $t9, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048B0u); return; } g_debug_last_store_pc = 0xBFC048B0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC048B4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC048B8: 0FF036BC jal 0xBFC0DAF0 */ - cpu->gpr[31] = 0xBFC048C0u; /* jal link before delay slot */ - psx_delay_BFC048B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC048BC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048BCu); -#endif - if (psx_delay_BFC048B8) { - psx_delay_BFC048B8 = 0; - cpu->gpr[31] = 0xBFC048C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAF0u); - cpu->pc = 0xBFC0DAF0u; return; - } -label_BFC048C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC048C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC048C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048C0u); -#endif - /* 0xBFC048C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC048C4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC048C8: 03E00008 jr $ra */ - psx_delay_BFC048C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC048CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC048CCu); -#endif - if (psx_delay_BFC048C8) { - psx_delay_BFC048C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC048D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC048D0u); - int psx_delay_BFC048E4 = 0; - int psx_delay_BFC048F8 = 0; - int psx_delay_BFC04908 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC048ECu: goto label_BFC048EC; - case 0xBFC04900u: goto label_BFC04900; - default: break; - } - } -label_BFC048D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC048D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC048D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC048D0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC048D4: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC048D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC048D8: 24A591D0 addiu $a1, $a1, -28208 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28208)); - PGXP_ALU(0x24A591D0u, cpu->gpr[5], _pgx1, 0xFFFF91D0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC048DC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048DCu); return; } g_debug_last_store_pc = 0xBFC048DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC048E0: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC048E4: 0FF036C0 jal 0xBFC0DB00 */ - cpu->gpr[31] = 0xBFC048ECu; /* jal link before delay slot */ - psx_delay_BFC048E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC048E8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048E8u); -#endif - if (psx_delay_BFC048E4) { - psx_delay_BFC048E4 = 0; - cpu->gpr[31] = 0xBFC048ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB00u); - cpu->pc = 0xBFC0DB00u; return; - } -label_BFC048EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC048ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC048ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC048EC: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC048ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC048F0: 244291E0 addiu $v0, $v0, -28192 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-28192)); - PGXP_ALU(0x244291E0u, cpu->gpr[2], _pgx1, 0xFFFF91E0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC048F4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC048F8: 0FF036C0 jal 0xBFC0DB00 */ - cpu->gpr[31] = 0xBFC04900u; /* jal link before delay slot */ - psx_delay_BFC048F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC048FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC048FC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC048FCu); -#endif - if (psx_delay_BFC048F8) { - psx_delay_BFC048F8 = 0; - cpu->gpr[31] = 0xBFC04900u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB00u); - cpu->pc = 0xBFC0DB00u; return; - } -label_BFC04900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04900u); -#endif - /* 0xBFC04900: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04900u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04904: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04908: 03E00008 jr $ra */ - psx_delay_BFC04908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0490C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0490Cu); -#endif - if (psx_delay_BFC04908) { - psx_delay_BFC04908 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04910u); - int psx_delay_BFC0492C = 0; - int psx_delay_BFC049D4 = 0; - int psx_delay_BFC049E4 = 0; - int psx_delay_BFC04A18 = 0; - int psx_delay_BFC04A54 = 0; - int psx_taken_BFC04A54 = 0; - int psx_delay_BFC04A5C = 0; - int psx_taken_BFC04A5C = 0; - int psx_delay_BFC04A64 = 0; - int psx_taken_BFC04A64 = 0; - int psx_delay_BFC04A78 = 0; - int psx_taken_BFC04A78 = 0; - int psx_delay_BFC04A80 = 0; - int psx_taken_BFC04A80 = 0; - int psx_delay_BFC04A88 = 0; - int psx_taken_BFC04A88 = 0; - int psx_delay_BFC04A98 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04934u: goto label_BFC04934; - case 0xBFC049DCu: goto label_BFC049DC; - case 0xBFC049ECu: goto label_BFC049EC; - case 0xBFC04A20u: goto label_BFC04A20; - case 0xBFC04A48u: goto label_BFC04A48; - case 0xBFC04A5Cu: goto label_BFC04A5C; - case 0xBFC04A64u: goto label_BFC04A64; - case 0xBFC04A6Cu: goto label_BFC04A6C; - case 0xBFC04A80u: goto label_BFC04A80; - case 0xBFC04A88u: goto label_BFC04A88; - case 0xBFC04A90u: goto label_BFC04A90; - default: break; - } - } -label_BFC04910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04910: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04914: AC2091C4 sw $zero, -28220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04914u); return; } g_debug_last_store_pc = 0xBFC04914u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091C4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04918: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0491C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04920: AC2091C8 sw $zero, -28216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04920u); return; } g_debug_last_store_pc = 0xBFC04920u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091C8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04924: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04924u); return; } g_debug_last_store_pc = 0xBFC04924u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04928: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0492Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0492C: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC04934u; /* jal link before delay slot */ - psx_delay_BFC0492C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04930: AC2091CC sw $zero, -28212($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04930u); return; } g_debug_last_store_pc = 0xBFC04930u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091CCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04930u); -#endif - if (psx_delay_BFC0492C) { - psx_delay_BFC0492C = 0; - cpu->gpr[31] = 0xBFC04934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC04934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04934: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04938u); -#endif - /* 0xBFC04938: 8C63DF74 lw $v1, -8332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04938u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0493C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04940u); -#endif - /* 0xBFC04940: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04940u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC04944: 2406FFFB addiu $a2, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x2406FFFBu, cpu->gpr[6], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04948u); -#endif - /* 0xBFC04948: 8C84DF6C lw $a0, -8340($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04948u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DF6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0494Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC0494C: 01C67824 and $t7, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6]; - PGXP_ALU(0x01C67824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0494Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC04950: AC6F0004 sw $t7, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04950u); return; } g_debug_last_store_pc = 0xBFC04950u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04954u); -#endif - /* 0xBFC04954: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04954u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC04958: 2405FFF7 addiu $a1, $zero, -9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); - PGXP_ALU(0x2405FFF7u, cpu->gpr[5], _pgx1, 0xFFFFFFF7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0495Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC0495C: 0305C824 and $t9, $t8, $a1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5]; - PGXP_ALU(0x0305C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0495Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC04960: AC790004 sw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04960u); return; } g_debug_last_store_pc = 0xBFC04960u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC04964: AC660000 sw $a2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04964u); return; } g_debug_last_store_pc = 0xBFC04964u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC660000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC04968: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0496C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC04970: AC650000 sw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04970u); return; } g_debug_last_store_pc = 0xBFC04970u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC04974: AC28B93C sw $t0, -18116($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04974u); return; } g_debug_last_store_pc = 0xBFC04974u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28B93Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04978: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0497C: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC04980: 3C0BBFC1 lui $t3, 0xBFC1 */ - cpu->gpr[11] = 0xBFC10000u; - PGXP_ALU(0x3C0BBFC1u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04984u); -#endif - /* 0xBFC04984: 8D6BDF68 lw $t3, -8344($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8344; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04984u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BDF68u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC04988: AC29B938 sw $t1, -18120($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04988u); return; } g_debug_last_store_pc = 0xBFC04988u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29B938u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0498C: 340A9099 ori $t2, $zero, 0x9099 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0x9099u; - PGXP_ALU(0x340A9099u, cpu->gpr[10], _pgx1, 0x9099u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC04990: AD6A0000 sw $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04990u); return; } g_debug_last_store_pc = 0xBFC04990u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04994u); -#endif - /* 0xBFC04994: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04994u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04998: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0499C: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC049A0: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC049A4: 3C018800 lui $at, 0x8800 */ - cpu->gpr[1] = 0x88000000u; - PGXP_ALU(0x3C018800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC049A8: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC049AC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC049B0: 340CFFFF ori $t4, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC049B4: AC820000 sw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049B4u); return; } g_debug_last_store_pc = 0xBFC049B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC049B8: AC2C9158 sw $t4, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049B8u); return; } g_debug_last_store_pc = 0xBFC049B8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9158u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC049BC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC049C0: 240D0CCC addiu $t5, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x240D0CCCu, cpu->gpr[13], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC049C4: AC2D9154 sw $t5, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049C4u); return; } g_debug_last_store_pc = 0xBFC049C4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9154u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC049C8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC049CC: AC209160 sw $zero, -28320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049CCu); return; } g_debug_last_store_pc = 0xBFC049CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209160u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC049D0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC049D4: 0FF01448 jal 0xBFC05120 */ - cpu->gpr[31] = 0xBFC049DCu; /* jal link before delay slot */ - psx_delay_BFC049D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC049D8: AC20915C sw $zero, -28324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049D8u); return; } g_debug_last_store_pc = 0xBFC049D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20915Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049D8u); -#endif - if (psx_delay_BFC049D4) { - psx_delay_BFC049D4 = 0; - cpu->gpr[31] = 0xBFC049DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05120u); - cpu->pc = 0xBFC05120u; return; - } -label_BFC049DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC049DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC049DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC049DC: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049E0u); -#endif - /* 0xBFC049E0: 8C63DF74 lw $v1, -8332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC049E4: 0FF0143F jal 0xBFC050FC */ - cpu->gpr[31] = 0xBFC049ECu; /* jal link before delay slot */ - psx_delay_BFC049E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC049E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC049E8u); -#endif - if (psx_delay_BFC049E4) { - psx_delay_BFC049E4 = 0; - cpu->gpr[31] = 0xBFC049ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC050FCu); - cpu->pc = 0xBFC050FCu; return; - } -label_BFC049EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC049ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC049ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC049EC: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC049ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049F0u); -#endif - /* 0xBFC049F0: 8C63DF74 lw $v1, -8332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC049F4: 240EFFFB addiu $t6, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x240EFFFBu, cpu->gpr[14], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC049F8: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049F8u); return; } g_debug_last_store_pc = 0xBFC049F8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC049FCu); -#endif - /* 0xBFC049FC: 8C6F0004 lw $t7, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049FCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC049FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC04A04: 35F80004 ori $t8, $t7, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x4u; - PGXP_ALU(0x35F80004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC04A08: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A08u); return; } g_debug_last_store_pc = 0xBFC04A08u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A0Cu); -#endif - /* 0xBFC04A0C: 8C790004 lw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A0Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC04A14: 37280008 ori $t0, $t9, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] | 0x8u; - PGXP_ALU(0x37280008u, cpu->gpr[8], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04A18: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC04A20u; /* jal link before delay slot */ - psx_delay_BFC04A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC04A1C: AC680004 sw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A1Cu); return; } g_debug_last_store_pc = 0xBFC04A1Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A1Cu); -#endif - if (psx_delay_BFC04A18) { - psx_delay_BFC04A18 = 0; - cpu->gpr[31] = 0xBFC04A20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC04A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC04A20: 3C09BFC1 lui $t1, 0xBFC1 */ - cpu->gpr[9] = 0xBFC10000u; - PGXP_ALU(0x3C09BFC1u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A24u); -#endif - /* 0xBFC04A24: 8D29DF58 lw $t1, -8360($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A24u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29DF58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC04A28: 3C0BBFC1 lui $t3, 0xBFC1 */ - cpu->gpr[11] = 0xBFC10000u; - PGXP_ALU(0x3C0BBFC1u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC04A2C: A1200000 sb $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04A2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A30u); -#endif - /* 0xBFC04A30: 8D6BDF5C lw $t3, -8356($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A30u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BDF5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC04A34: 240A000A addiu $t2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x240A000Au, cpu->gpr[10], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04A38: 24027530 addiu $v0, $zero, 30000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (30000)); - PGXP_ALU(0x24027530u, cpu->gpr[2], _pgx1, 0x00007530u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04A3C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC04A40: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC04A44: A16A0000 sb $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04A44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[11] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA16A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A44u); -#endif -label_BFC04A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC04A48: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A4Cu); -#endif - /* 0xBFC04A4C: 8D8C91C4 lw $t4, -28220($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A4Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C91C4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC04A54: 15830003 bne $t4, $v1, 0xBFC04A64 */ - uint32_t psx_brA_BFC04A54 = cpu->gpr[12]; uint32_t psx_brB_BFC04A54 = cpu->gpr[3]; - psx_taken_BFC04A54 = (psx_brA_BFC04A54 != psx_brB_BFC04A54); - psx_delay_BFC04A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A58u); -#endif - if (psx_delay_BFC04A54) { - psx_delay_BFC04A54 = 0; - if (psx_taken_BFC04A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A64u); - goto label_BFC04A64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A5Cu); - } -label_BFC04A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A5C: 1000000C beq $zero, $zero, 0xBFC04A90 */ - uint32_t psx_brA_BFC04A5C = cpu->gpr[0]; uint32_t psx_brB_BFC04A5C = cpu->gpr[0]; - psx_taken_BFC04A5C = (psx_brA_BFC04A5C == psx_brB_BFC04A5C); - psx_delay_BFC04A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04A60: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A60u); -#endif - if (psx_delay_BFC04A5C) { - psx_delay_BFC04A5C = 0; - if (psx_taken_BFC04A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A90u); - goto label_BFC04A90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A64u); - } -label_BFC04A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04A64: 10400006 beq $v0, $zero, 0xBFC04A80 */ - uint32_t psx_brA_BFC04A64 = cpu->gpr[2]; uint32_t psx_brB_BFC04A64 = cpu->gpr[0]; - psx_taken_BFC04A64 = (psx_brA_BFC04A64 == psx_brB_BFC04A64); - psx_delay_BFC04A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A68u); -#endif - if (psx_delay_BFC04A64) { - psx_delay_BFC04A64 = 0; - if (psx_taken_BFC04A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A80u); - goto label_BFC04A80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A6Cu); - } -label_BFC04A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC04A6C: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A70u); -#endif - /* 0xBFC04A70: 8DAD91C4 lw $t5, -28220($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -28220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-28220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A70u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD91C4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC04A78: 15A40003 bne $t5, $a0, 0xBFC04A88 */ - uint32_t psx_brA_BFC04A78 = cpu->gpr[13]; uint32_t psx_brB_BFC04A78 = cpu->gpr[4]; - psx_taken_BFC04A78 = (psx_brA_BFC04A78 != psx_brB_BFC04A78); - psx_delay_BFC04A78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A7Cu); -#endif - if (psx_delay_BFC04A78) { - psx_delay_BFC04A78 = 0; - if (psx_taken_BFC04A78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A88u); - goto label_BFC04A88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A80u); - } -label_BFC04A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A80: 10000003 beq $zero, $zero, 0xBFC04A90 */ - uint32_t psx_brA_BFC04A80 = cpu->gpr[0]; uint32_t psx_brB_BFC04A80 = cpu->gpr[0]; - psx_taken_BFC04A80 = (psx_brA_BFC04A80 == psx_brB_BFC04A80); - psx_delay_BFC04A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04A84: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A84u); -#endif - if (psx_delay_BFC04A80) { - psx_delay_BFC04A80 = 0; - if (psx_taken_BFC04A80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A90u); - goto label_BFC04A90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A88u); - } -label_BFC04A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A88: 1000FFEF beq $zero, $zero, 0xBFC04A48 */ - uint32_t psx_brA_BFC04A88 = cpu->gpr[0]; uint32_t psx_brB_BFC04A88 = cpu->gpr[0]; - psx_taken_BFC04A88 = (psx_brA_BFC04A88 == psx_brB_BFC04A88); - psx_delay_BFC04A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC04A8C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A8Cu); -#endif - if (psx_delay_BFC04A88) { - psx_delay_BFC04A88 = 0; - if (psx_taken_BFC04A88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A48u); - goto label_BFC04A48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04A90u); - } -label_BFC04A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A90u); -#endif - /* 0xBFC04A90: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A90u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04A94: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04A98: 03E00008 jr $ra */ - psx_delay_BFC04A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04A9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04A9Cu); -#endif - if (psx_delay_BFC04A98) { - psx_delay_BFC04A98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04AA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04AA0u); - int psx_delay_BFC04AB4 = 0; -label_BFC04AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04AA0: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AA4u); -#endif - /* 0xBFC04AA4: 91CE91B4 lbu $t6, -28236($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28236; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-28236)), 14, 0x4000u); - PGXP_LOAD(0x91CE91B4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC04AA8: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC04AAC: A08E0000 sb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04AACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AB0u); -#endif - /* 0xBFC04AB0: 91EF91B5 lbu $t7, -28235($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28235; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-28235)), 15, 0x8000u); - PGXP_LOAD(0x91EF91B5u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04AB4: 03E00008 jr $ra */ - psx_delay_BFC04AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC04AB8: A0AF0000 sb $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04AB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA0AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AB8u); -#endif - if (psx_delay_BFC04AB4) { - psx_delay_BFC04AB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04ABC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04ABCu); - int psx_delay_BFC04AC4 = 0; - int psx_taken_BFC04AC4 = 0; - int psx_delay_BFC04AD8 = 0; - int psx_taken_BFC04AD8 = 0; - int psx_delay_BFC04AE0 = 0; - int psx_taken_BFC04AE0 = 0; - int psx_delay_BFC04AE8 = 0; - int psx_taken_BFC04AE8 = 0; - int psx_delay_BFC04AFC = 0; - int psx_taken_BFC04AFC = 0; - int psx_delay_BFC04B04 = 0; - int psx_taken_BFC04B04 = 0; - int psx_delay_BFC04B0C = 0; - int psx_taken_BFC04B0C = 0; - int psx_delay_BFC04B2C = 0; - int psx_taken_BFC04B2C = 0; - int psx_delay_BFC04B34 = 0; - int psx_taken_BFC04B34 = 0; - int psx_delay_BFC04B3C = 0; - int psx_delay_BFC04B54 = 0; - int psx_taken_BFC04B54 = 0; - int psx_delay_BFC04B5C = 0; - int psx_taken_BFC04B5C = 0; - int psx_delay_BFC04BBC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04ACCu: goto label_BFC04ACC; - case 0xBFC04AE0u: goto label_BFC04AE0; - case 0xBFC04AE8u: goto label_BFC04AE8; - case 0xBFC04AF0u: goto label_BFC04AF0; - case 0xBFC04B04u: goto label_BFC04B04; - case 0xBFC04B0Cu: goto label_BFC04B0C; - case 0xBFC04B14u: goto label_BFC04B14; - case 0xBFC04B34u: goto label_BFC04B34; - case 0xBFC04B3Cu: goto label_BFC04B3C; - case 0xBFC04B44u: goto label_BFC04B44; - case 0xBFC04B5Cu: goto label_BFC04B5C; - case 0xBFC04B60u: goto label_BFC04B60; - case 0xBFC04B64u: goto label_BFC04B64; - case 0xBFC04B68u: goto label_BFC04B68; - case 0xBFC04BB4u: goto label_BFC04BB4; - default: break; - } - } -label_BFC04ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04ABC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04AC0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04AC0u); return; } g_debug_last_store_pc = 0xBFC04AC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04AC4: 1000000A beq $zero, $zero, 0xBFC04AF0 */ - uint32_t psx_brA_BFC04AC4 = cpu->gpr[0]; uint32_t psx_brB_BFC04AC4 = cpu->gpr[0]; - psx_taken_BFC04AC4 = (psx_brA_BFC04AC4 == psx_brB_BFC04AC4); - psx_delay_BFC04AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC04AC8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AC8u); -#endif - if (psx_delay_BFC04AC4) { - psx_delay_BFC04AC4 = 0; - if (psx_taken_BFC04AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04AF0u); - goto label_BFC04AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04ACCu); - } -label_BFC04ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04ACC: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AD0u); -#endif - /* 0xBFC04AD0: 8DCE915C lw $t6, -28324($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28324; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04AD0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE915Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04AD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC04AD8: 15C0000E bne $t6, $zero, 0xBFC04B14 */ - uint32_t psx_brA_BFC04AD8 = cpu->gpr[14]; uint32_t psx_brB_BFC04AD8 = cpu->gpr[0]; - psx_taken_BFC04AD8 = (psx_brA_BFC04AD8 != psx_brB_BFC04AD8); - psx_delay_BFC04AD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04ADC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04ADCu); -#endif - if (psx_delay_BFC04AD8) { - psx_delay_BFC04AD8 = 0; - if (psx_taken_BFC04AD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B14u); - goto label_BFC04B14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04AE0u); - } -label_BFC04AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04AE0: 10000034 beq $zero, $zero, 0xBFC04BB4 */ - uint32_t psx_brA_BFC04AE0 = cpu->gpr[0]; uint32_t psx_brB_BFC04AE0 = cpu->gpr[0]; - psx_taken_BFC04AE0 = (psx_brA_BFC04AE0 == psx_brB_BFC04AE0); - psx_delay_BFC04AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04AE4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AE4u); -#endif - if (psx_delay_BFC04AE0) { - psx_delay_BFC04AE0 = 0; - if (psx_taken_BFC04AE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BB4u); - goto label_BFC04BB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04AE8u); - } -label_BFC04AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04AE8: 10000032 beq $zero, $zero, 0xBFC04BB4 */ - uint32_t psx_brA_BFC04AE8 = cpu->gpr[0]; uint32_t psx_brB_BFC04AE8 = cpu->gpr[0]; - psx_taken_BFC04AE8 = (psx_brA_BFC04AE8 == psx_brB_BFC04AE8); - psx_delay_BFC04AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04AEC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AECu); -#endif - if (psx_delay_BFC04AE8) { - psx_delay_BFC04AE8 = 0; - if (psx_taken_BFC04AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BB4u); - goto label_BFC04BB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04AF0u); - } -label_BFC04AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04AF0: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AF4u); -#endif - /* 0xBFC04AF4: 8C849154 lw $a0, -28332($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04AF4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849154u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04AF8: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04AFC: 1081FFF3 beq $a0, $at, 0xBFC04ACC */ - uint32_t psx_brA_BFC04AFC = cpu->gpr[4]; uint32_t psx_brB_BFC04AFC = cpu->gpr[1]; - psx_taken_BFC04AFC = (psx_brA_BFC04AFC == psx_brB_BFC04AFC); - psx_delay_BFC04AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04B00: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B00u); -#endif - if (psx_delay_BFC04AFC) { - psx_delay_BFC04AFC = 0; - if (psx_taken_BFC04AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04ACCu); - goto label_BFC04ACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B04u); - } -label_BFC04B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04B04: 1081FFF1 beq $a0, $at, 0xBFC04ACC */ - uint32_t psx_brA_BFC04B04 = cpu->gpr[4]; uint32_t psx_brB_BFC04B04 = cpu->gpr[1]; - psx_taken_BFC04B04 = (psx_brA_BFC04B04 == psx_brB_BFC04B04); - psx_delay_BFC04B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04B08: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B08u); -#endif - if (psx_delay_BFC04B04) { - psx_delay_BFC04B04 = 0; - if (psx_taken_BFC04B04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04ACCu); - goto label_BFC04ACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B0Cu); - } -label_BFC04B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04B0C: 1481FFF6 bne $a0, $at, 0xBFC04AE8 */ - uint32_t psx_brA_BFC04B0C = cpu->gpr[4]; uint32_t psx_brB_BFC04B0C = cpu->gpr[1]; - psx_taken_BFC04B0C = (psx_brA_BFC04B0C != psx_brB_BFC04B0C); - psx_delay_BFC04B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04B10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04B10u); -#endif - if (psx_delay_BFC04B0C) { - psx_delay_BFC04B0C = 0; - if (psx_taken_BFC04B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04AE8u); - goto label_BFC04AE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B14u); - } -label_BFC04B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC04B14: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B18u); -#endif - /* 0xBFC04B18: 8DEFDF58 lw $t7, -8360($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B18u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04B1C: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B20u); -#endif - /* 0xBFC04B20: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04B24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC04B28: 30580010 andi $t8, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30580010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC04B2C: 13010003 beq $t8, $at, 0xBFC04B3C */ - uint32_t psx_brA_BFC04B2C = cpu->gpr[24]; uint32_t psx_brB_BFC04B2C = cpu->gpr[1]; - psx_taken_BFC04B2C = (psx_brA_BFC04B2C == psx_brB_BFC04B2C); - psx_delay_BFC04B2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04B30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04B30u); -#endif - if (psx_delay_BFC04B2C) { - psx_delay_BFC04B2C = 0; - if (psx_taken_BFC04B2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B3Cu); - goto label_BFC04B3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B34u); - } -label_BFC04B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04B34: 1000001F beq $zero, $zero, 0xBFC04BB4 */ - uint32_t psx_brA_BFC04B34 = cpu->gpr[0]; uint32_t psx_brB_BFC04B34 = cpu->gpr[0]; - psx_taken_BFC04B34 = (psx_brA_BFC04B34 == psx_brB_BFC04B34); - psx_delay_BFC04B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04B38: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B38u); -#endif - if (psx_delay_BFC04B34) { - psx_delay_BFC04B34 = 0; - if (psx_taken_BFC04B34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BB4u); - goto label_BFC04BB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B3Cu); - } -label_BFC04B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04B3C: 0FF01936 jal 0xBFC064D8 */ - cpu->gpr[31] = 0xBFC04B44u; /* jal link before delay slot */ - psx_delay_BFC04B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC04B40: AFA50018 sw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B40u); return; } g_debug_last_store_pc = 0xBFC04B40u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B40u); -#endif - if (psx_delay_BFC04B3C) { - psx_delay_BFC04B3C = 0; - cpu->gpr[31] = 0xBFC04B44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC064D8u); - cpu->pc = 0xBFC064D8u; return; - } -label_BFC04B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04B44: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B48u); -#endif - /* 0xBFC04B48: 8C849154 lw $a0, -28332($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B48u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849154u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B4Cu); -#endif - /* 0xBFC04B4C: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B4Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04B50: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04B54: 10810002 beq $a0, $at, 0xBFC04B60 */ - uint32_t psx_brA_BFC04B54 = cpu->gpr[4]; uint32_t psx_brB_BFC04B54 = cpu->gpr[1]; - psx_taken_BFC04B54 = (psx_brA_BFC04B54 == psx_brB_BFC04B54); - psx_delay_BFC04B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04B58: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B58u); -#endif - if (psx_delay_BFC04B54) { - psx_delay_BFC04B54 = 0; - if (psx_taken_BFC04B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B60u); - goto label_BFC04B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B5Cu); - } -label_BFC04B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04B5C: 14810002 bne $a0, $at, 0xBFC04B68 */ - uint32_t psx_brA_BFC04B5C = cpu->gpr[4]; uint32_t psx_brB_BFC04B5C = cpu->gpr[1]; - psx_taken_BFC04B5C = (psx_brA_BFC04B5C != psx_brB_BFC04B5C); - psx_delay_BFC04B5C = 1; -label_BFC04B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04B60: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B60u); -#endif - if (psx_delay_BFC04B5C) { - psx_delay_BFC04B5C = 0; - if (psx_taken_BFC04B5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B68u); - goto label_BFC04B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04B64u); - } -label_BFC04B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04B64: AC249158 sw $a0, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B64u); return; } g_debug_last_store_pc = 0xBFC04B64u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249158u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B64u); -#endif -label_BFC04B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC04B68: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B6Cu); -#endif - /* 0xBFC04B6C: 8F39DF58 lw $t9, -8360($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B6Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DF58u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04B70: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B74u); -#endif - /* 0xBFC04B74: 8C63DF60 lw $v1, -8352($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B74u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF60u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04B78: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04B78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B7Cu); -#endif - /* 0xBFC04B7C: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC04B80: 3C0CBFC1 lui $t4, 0xBFC1 */ - cpu->gpr[12] = 0xBFC10000u; - PGXP_ALU(0x3C0CBFC1u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC04B84: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04B84u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B88u); -#endif - /* 0xBFC04B88: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC04B8C: 240B0002 addiu $t3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240B0002u, cpu->gpr[11], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC04B90: A0690000 sb $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04B90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B94u); -#endif - /* 0xBFC04B94: 90AA0002 lbu $t2, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 10, 0x20u); - PGXP_LOAD(0x90AA0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC04B98: 240400F2 addiu $a0, $zero, 242 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); - PGXP_ALU(0x240400F2u, cpu->gpr[4], _pgx1, 0x000000F2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC04B9C: A06A0000 sb $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04B9Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA06A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BA0u); -#endif - /* 0xBFC04BA0: 8D8CDF5C lw $t4, -8356($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BA0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CDF5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04BA4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC04BA8: A18B0000 sb $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04BA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04BAC: AC249154 sw $a0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BACu); return; } g_debug_last_store_pc = 0xBFC04BACu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249154u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04BB0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BB0u); -#endif -label_BFC04BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BB4u); -#endif - /* 0xBFC04BB4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04BB8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04BBC: 03E00008 jr $ra */ - psx_delay_BFC04BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04BC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04BC0u); -#endif - if (psx_delay_BFC04BBC) { - psx_delay_BFC04BBC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04BC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04BC4u); - int psx_delay_BFC04BD8 = 0; - int psx_taken_BFC04BD8 = 0; - int psx_delay_BFC04BE0 = 0; - int psx_taken_BFC04BE0 = 0; - int psx_delay_BFC04BE8 = 0; - int psx_delay_BFC04C30 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04BE0u: goto label_BFC04BE0; - case 0xBFC04BE8u: goto label_BFC04BE8; - case 0xBFC04BF0u: goto label_BFC04BF0; - case 0xBFC04C28u: goto label_BFC04C28; - default: break; - } - } -label_BFC04BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04BC4: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BC8u); -#endif - /* 0xBFC04BC8: 8DCE9154 lw $t6, -28332($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BC8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04BCC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04BD0: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04BD4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BD4u); return; } g_debug_last_store_pc = 0xBFC04BD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC04BD8: 11C10003 beq $t6, $at, 0xBFC04BE8 */ - uint32_t psx_brA_BFC04BD8 = cpu->gpr[14]; uint32_t psx_brB_BFC04BD8 = cpu->gpr[1]; - psx_taken_BFC04BD8 = (psx_brA_BFC04BD8 == psx_brB_BFC04BD8); - psx_delay_BFC04BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC04BDC: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BDCu); return; } g_debug_last_store_pc = 0xBFC04BDCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BDCu); -#endif - if (psx_delay_BFC04BD8) { - psx_delay_BFC04BD8 = 0; - if (psx_taken_BFC04BD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BE8u); - goto label_BFC04BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BE0u); - } -label_BFC04BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04BE0: 10000011 beq $zero, $zero, 0xBFC04C28 */ - uint32_t psx_brA_BFC04BE0 = cpu->gpr[0]; uint32_t psx_brB_BFC04BE0 = cpu->gpr[0]; - psx_taken_BFC04BE0 = (psx_brA_BFC04BE0 == psx_brB_BFC04BE0); - psx_delay_BFC04BE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04BE4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BE4u); -#endif - if (psx_delay_BFC04BE0) { - psx_delay_BFC04BE0 = 0; - if (psx_taken_BFC04BE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C28u); - goto label_BFC04C28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04BE8u); - } -label_BFC04BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04BE8: 0FF01952 jal 0xBFC06548 */ - cpu->gpr[31] = 0xBFC04BF0u; /* jal link before delay slot */ - psx_delay_BFC04BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04BEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04BECu); -#endif - if (psx_delay_BFC04BE8) { - psx_delay_BFC04BE8 = 0; - cpu->gpr[31] = 0xBFC04BF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06548u); - cpu->pc = 0xBFC06548u; return; - } -label_BFC04BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BF0u); -#endif - /* 0xBFC04BF0: 8FAF0020 lw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BF0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC04BF4: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BF8u); -#endif - /* 0xBFC04BF8: 8F18DF58 lw $t8, -8360($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BF8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04BFC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC04C00: AC2F9164 sw $t7, -28316($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28316; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C00u); return; } g_debug_last_store_pc = 0xBFC04C00u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9164u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC04C04: 3C09BFC1 lui $t1, 0xBFC1 */ - cpu->gpr[9] = 0xBFC10000u; - PGXP_ALU(0x3C09BFC1u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC04C08: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04C08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C0Cu); -#endif - /* 0xBFC04C0C: 8D29DF5C lw $t1, -8356($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C0Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29DF5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C10: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04C14: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC04C18: AC399154 sw $t9, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C18u); return; } g_debug_last_store_pc = 0xBFC04C18u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399154u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC04C1C: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04C20: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC04C24: A1280000 sb $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04C24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C24u); -#endif -label_BFC04C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C28u); -#endif - /* 0xBFC04C28: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C28u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04C2C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04C30: 03E00008 jr $ra */ - psx_delay_BFC04C30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04C34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04C34u); -#endif - if (psx_delay_BFC04C30) { - psx_delay_BFC04C30 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04C38(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04C38u); - int psx_delay_BFC04C4C = 0; - int psx_taken_BFC04C4C = 0; - int psx_delay_BFC04C54 = 0; - int psx_taken_BFC04C54 = 0; - int psx_delay_BFC04C5C = 0; - int psx_taken_BFC04C5C = 0; - int psx_delay_BFC04C68 = 0; - int psx_delay_BFC04CA4 = 0; - int psx_taken_BFC04CA4 = 0; - int psx_delay_BFC04CB4 = 0; - int psx_taken_BFC04CB4 = 0; - int psx_delay_BFC04CC0 = 0; - int psx_taken_BFC04CC0 = 0; - int psx_delay_BFC04CD0 = 0; - int psx_taken_BFC04CD0 = 0; - int psx_delay_BFC04CFC = 0; - int psx_taken_BFC04CFC = 0; - int psx_delay_BFC04D04 = 0; - int psx_taken_BFC04D04 = 0; - int psx_delay_BFC04D48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04C54u: goto label_BFC04C54; - case 0xBFC04C5Cu: goto label_BFC04C5C; - case 0xBFC04C64u: goto label_BFC04C64; - case 0xBFC04C70u: goto label_BFC04C70; - case 0xBFC04CACu: goto label_BFC04CAC; - case 0xBFC04CBCu: goto label_BFC04CBC; - case 0xBFC04CC8u: goto label_BFC04CC8; - case 0xBFC04CD8u: goto label_BFC04CD8; - case 0xBFC04CDCu: goto label_BFC04CDC; - case 0xBFC04CE4u: goto label_BFC04CE4; - case 0xBFC04D04u: goto label_BFC04D04; - case 0xBFC04D0Cu: goto label_BFC04D0C; - case 0xBFC04D40u: goto label_BFC04D40; - default: break; - } - } -label_BFC04C38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04C38: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C3Cu); -#endif - /* 0xBFC04C3C: 8DCE9154 lw $t6, -28332($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C3Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04C40: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04C44: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04C48: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C48u); return; } g_debug_last_store_pc = 0xBFC04C48u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC04C4C: 15C10003 bne $t6, $at, 0xBFC04C5C */ - uint32_t psx_brA_BFC04C4C = cpu->gpr[14]; uint32_t psx_brB_BFC04C4C = cpu->gpr[1]; - psx_taken_BFC04C4C = (psx_brA_BFC04C4C != psx_brB_BFC04C4C); - psx_delay_BFC04C4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC04C50: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C50u); return; } g_debug_last_store_pc = 0xBFC04C50u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C50u); -#endif - if (psx_delay_BFC04C4C) { - psx_delay_BFC04C4C = 0; - if (psx_taken_BFC04C4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C5Cu); - goto label_BFC04C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C54u); - } -label_BFC04C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04C54: 1C800003 bgtz $a0, 0xBFC04C64 */ - uint32_t psx_brA_BFC04C54 = cpu->gpr[4]; - psx_taken_BFC04C54 = ((int32_t)psx_brA_BFC04C54 > 0); - psx_delay_BFC04C54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04C58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04C58u); -#endif - if (psx_delay_BFC04C54) { - psx_delay_BFC04C54 = 0; - if (psx_taken_BFC04C54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C64u); - goto label_BFC04C64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C5Cu); - } -label_BFC04C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04C5C: 10000038 beq $zero, $zero, 0xBFC04D40 */ - uint32_t psx_brA_BFC04C5C = cpu->gpr[0]; uint32_t psx_brB_BFC04C5C = cpu->gpr[0]; - psx_taken_BFC04C5C = (psx_brA_BFC04C5C == psx_brB_BFC04C5C); - psx_delay_BFC04C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04C60: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C60u); -#endif - if (psx_delay_BFC04C5C) { - psx_delay_BFC04C5C = 0; - if (psx_taken_BFC04C5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D40u); - goto label_BFC04D40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04C64u); - } -label_BFC04C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC04C64: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C64u); return; } g_debug_last_store_pc = 0xBFC04C64u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04C68: 0FF01952 jal 0xBFC06548 */ - cpu->gpr[31] = 0xBFC04C70u; /* jal link before delay slot */ - psx_delay_BFC04C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC04C6C: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C6Cu); return; } g_debug_last_store_pc = 0xBFC04C6Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C6Cu); -#endif - if (psx_delay_BFC04C68) { - psx_delay_BFC04C68 = 0; - cpu->gpr[31] = 0xBFC04C70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06548u); - cpu->pc = 0xBFC06548u; return; - } -label_BFC04C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C70u); -#endif - /* 0xBFC04C70: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C74: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04C78: AC249180 sw $a0, -28288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C78u); return; } g_debug_last_store_pc = 0xBFC04C78u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249180u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C7C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C80u); -#endif - /* 0xBFC04C80: 8FAF0024 lw $t7, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C80u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0024u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04C84: AC24917C sw $a0, -28292($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C84u); return; } g_debug_last_store_pc = 0xBFC04C84u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24917Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C88: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C8Cu); -#endif - /* 0xBFC04C8C: 8FA60028 lw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C8Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC04C90: AC2F9188 sw $t7, -28280($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C90u); return; } g_debug_last_store_pc = 0xBFC04C90u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9188u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C94: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC04C98: AC269190 sw $a2, -28272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C98u); return; } g_debug_last_store_pc = 0xBFC04C98u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC269190u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04C9C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC04CA0: 30D80010 andi $t8, $a2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0x10u; - PGXP_ALU(0x30D80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC04CA4: 13000005 beq $t8, $zero, 0xBFC04CBC */ - uint32_t psx_brA_BFC04CA4 = cpu->gpr[24]; uint32_t psx_brB_BFC04CA4 = cpu->gpr[0]; - psx_taken_BFC04CA4 = (psx_brA_BFC04CA4 == psx_brB_BFC04CA4); - psx_delay_BFC04CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04CA8: AC20915C sw $zero, -28324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CA8u); return; } g_debug_last_store_pc = 0xBFC04CA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20915Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CA8u); -#endif - if (psx_delay_BFC04CA4) { - psx_delay_BFC04CA4 = 0; - if (psx_taken_BFC04CA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CBCu); - goto label_BFC04CBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CACu); - } -label_BFC04CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04CAC: 24190246 addiu $t9, $zero, 582 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (582)); - PGXP_ALU(0x24190246u, cpu->gpr[25], _pgx1, 0x00000246u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04CB0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04CB4: 1000000B beq $zero, $zero, 0xBFC04CE4 */ - uint32_t psx_brA_BFC04CB4 = cpu->gpr[0]; uint32_t psx_brB_BFC04CB4 = cpu->gpr[0]; - psx_taken_BFC04CB4 = (psx_brA_BFC04CB4 == psx_brB_BFC04CB4); - psx_delay_BFC04CB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC04CB8: AC399198 sw $t9, -28264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CB8u); return; } g_debug_last_store_pc = 0xBFC04CB8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399198u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CB8u); -#endif - if (psx_delay_BFC04CB4) { - psx_delay_BFC04CB4 = 0; - if (psx_taken_BFC04CB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CE4u); - goto label_BFC04CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CBCu); - } -label_BFC04CBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC04CBC: 30C80020 andi $t0, $a2, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0x20u; - PGXP_ALU(0x30C80020u, cpu->gpr[8], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC04CC0: 11000006 beq $t0, $zero, 0xBFC04CDC */ - uint32_t psx_brA_BFC04CC0 = cpu->gpr[8]; uint32_t psx_brB_BFC04CC0 = cpu->gpr[0]; - psx_taken_BFC04CC0 = (psx_brA_BFC04CC0 == psx_brB_BFC04CC0); - psx_delay_BFC04CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC04CC4: 240A0200 addiu $t2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x240A0200u, cpu->gpr[10], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CC4u); -#endif - if (psx_delay_BFC04CC0) { - psx_delay_BFC04CC0 = 0; - if (psx_taken_BFC04CC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CDCu); - goto label_BFC04CDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CC8u); - } -label_BFC04CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC04CC8: 24090249 addiu $t1, $zero, 585 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (585)); - PGXP_ALU(0x24090249u, cpu->gpr[9], _pgx1, 0x00000249u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04CCC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04CD0: 10000004 beq $zero, $zero, 0xBFC04CE4 */ - uint32_t psx_brA_BFC04CD0 = cpu->gpr[0]; uint32_t psx_brB_BFC04CD0 = cpu->gpr[0]; - psx_taken_BFC04CD0 = (psx_brA_BFC04CD0 == psx_brB_BFC04CD0); - psx_delay_BFC04CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC04CD4: AC299198 sw $t1, -28264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CD4u); return; } g_debug_last_store_pc = 0xBFC04CD4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299198u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CD4u); -#endif - if (psx_delay_BFC04CD0) { - psx_delay_BFC04CD0 = 0; - if (psx_taken_BFC04CD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CE4u); - goto label_BFC04CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04CD8u); - } -label_BFC04CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC04CD8: 240A0200 addiu $t2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x240A0200u, cpu->gpr[10], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CD8u); -#endif -label_BFC04CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04CDC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC04CE0: AC2A9198 sw $t2, -28264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CE0u); return; } g_debug_last_store_pc = 0xBFC04CE0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9198u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CE0u); -#endif -label_BFC04CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04CE4: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CE8u); -#endif - /* 0xBFC04CE8: 8C63DF58 lw $v1, -8360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CE8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04CEC: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CF0u); -#endif - /* 0xBFC04CF0: 90620000 lbu $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x90620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04CF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC04CF8: 304B0010 andi $t3, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC04CFC: 11610003 beq $t3, $at, 0xBFC04D0C */ - uint32_t psx_brA_BFC04CFC = cpu->gpr[11]; uint32_t psx_brB_BFC04CFC = cpu->gpr[1]; - psx_taken_BFC04CFC = (psx_brA_BFC04CFC == psx_brB_BFC04CFC); - psx_delay_BFC04CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04D00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04D00u); -#endif - if (psx_delay_BFC04CFC) { - psx_delay_BFC04CFC = 0; - if (psx_taken_BFC04CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D0Cu); - goto label_BFC04D0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D04u); - } -label_BFC04D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04D04: 1000000E beq $zero, $zero, 0xBFC04D40 */ - uint32_t psx_brA_BFC04D04 = cpu->gpr[0]; uint32_t psx_brB_BFC04D04 = cpu->gpr[0]; - psx_taken_BFC04D04 = (psx_brA_BFC04D04 == psx_brB_BFC04D04); - psx_delay_BFC04D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04D08: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D08u); -#endif - if (psx_delay_BFC04D04) { - psx_delay_BFC04D04 = 0; - if (psx_taken_BFC04D04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D40u); - goto label_BFC04D40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D0Cu); - } -label_BFC04D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04D0C: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04D0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC04D10: 3C0DBFC1 lui $t5, 0xBFC1 */ - cpu->gpr[13] = 0xBFC10000u; - PGXP_ALU(0x3C0DBFC1u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D14u); -#endif - /* 0xBFC04D14: 8DADDF60 lw $t5, -8352($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D14u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADDF60u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC04D18: 30CC00FF andi $t4, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CC00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC04D1C: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC04D20: A1AC0000 sb $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04D20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA1AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D24u); -#endif - /* 0xBFC04D24: 8F18DF5C lw $t8, -8356($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D24u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC04D28: 240E00FE addiu $t6, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240E00FEu, cpu->gpr[14], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04D2C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC04D30: AC2E9154 sw $t6, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D30u); return; } g_debug_last_store_pc = 0xBFC04D30u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC04D34: 240F000E addiu $t7, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x240F000Eu, cpu->gpr[15], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04D38: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC04D3C: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04D3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D3Cu); -#endif -label_BFC04D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D40u); -#endif - /* 0xBFC04D40: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04D44: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04D48: 03E00008 jr $ra */ - psx_delay_BFC04D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04D4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04D4Cu); -#endif - if (psx_delay_BFC04D48) { - psx_delay_BFC04D48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04D50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04D50u); - int psx_delay_BFC04D60 = 0; - int psx_taken_BFC04D60 = 0; - int psx_delay_BFC04D68 = 0; - int psx_taken_BFC04D68 = 0; - int psx_delay_BFC04D70 = 0; - int psx_delay_BFC04D98 = 0; - int psx_taken_BFC04D98 = 0; - int psx_delay_BFC04DA0 = 0; - int psx_taken_BFC04DA0 = 0; - int psx_delay_BFC04DE4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04D68u: goto label_BFC04D68; - case 0xBFC04D70u: goto label_BFC04D70; - case 0xBFC04D78u: goto label_BFC04D78; - case 0xBFC04DA0u: goto label_BFC04DA0; - case 0xBFC04DA8u: goto label_BFC04DA8; - case 0xBFC04DDCu: goto label_BFC04DDC; - default: break; - } - } -label_BFC04D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC04D50: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D54u); -#endif - /* 0xBFC04D54: 8DCE9154 lw $t6, -28332($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D54u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04D58: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04D5C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC04D60: 11C10003 beq $t6, $at, 0xBFC04D70 */ - uint32_t psx_brA_BFC04D60 = cpu->gpr[14]; uint32_t psx_brB_BFC04D60 = cpu->gpr[1]; - psx_taken_BFC04D60 = (psx_brA_BFC04D60 == psx_brB_BFC04D60); - psx_delay_BFC04D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04D64: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D64u); return; } g_debug_last_store_pc = 0xBFC04D64u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D64u); -#endif - if (psx_delay_BFC04D60) { - psx_delay_BFC04D60 = 0; - if (psx_taken_BFC04D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D70u); - goto label_BFC04D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D68u); - } -label_BFC04D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04D68: 1000001C beq $zero, $zero, 0xBFC04DDC */ - uint32_t psx_brA_BFC04D68 = cpu->gpr[0]; uint32_t psx_brB_BFC04D68 = cpu->gpr[0]; - psx_taken_BFC04D68 = (psx_brA_BFC04D68 == psx_brB_BFC04D68); - psx_delay_BFC04D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04D6C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D6Cu); -#endif - if (psx_delay_BFC04D68) { - psx_delay_BFC04D68 = 0; - if (psx_taken_BFC04D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04DDCu); - goto label_BFC04DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04D70u); - } -label_BFC04D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04D70: 0FF01952 jal 0xBFC06548 */ - cpu->gpr[31] = 0xBFC04D78u; /* jal link before delay slot */ - psx_delay_BFC04D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC04D74: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D74u); return; } g_debug_last_store_pc = 0xBFC04D74u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D74u); -#endif - if (psx_delay_BFC04D70) { - psx_delay_BFC04D70 = 0; - cpu->gpr[31] = 0xBFC04D78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06548u); - cpu->pc = 0xBFC06548u; return; - } -label_BFC04D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D78u); -#endif - /* 0xBFC04D78: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D78u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04D7C: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D80u); -#endif - /* 0xBFC04D80: 8C63DF58 lw $v1, -8360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D80u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04D84: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC04D88: AC249190 sw $a0, -28272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D88u); return; } g_debug_last_store_pc = 0xBFC04D88u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249190u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D8Cu); -#endif - /* 0xBFC04D8C: 90620000 lbu $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x90620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04D90: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC04D94: 304F0010 andi $t7, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304F0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC04D98: 11E10003 beq $t7, $at, 0xBFC04DA8 */ - uint32_t psx_brA_BFC04D98 = cpu->gpr[15]; uint32_t psx_brB_BFC04D98 = cpu->gpr[1]; - psx_taken_BFC04D98 = (psx_brA_BFC04D98 == psx_brB_BFC04D98); - psx_delay_BFC04D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04D9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04D9Cu); -#endif - if (psx_delay_BFC04D98) { - psx_delay_BFC04D98 = 0; - if (psx_taken_BFC04D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04DA8u); - goto label_BFC04DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04DA0u); - } -label_BFC04DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04DA0: 1000000E beq $zero, $zero, 0xBFC04DDC */ - uint32_t psx_brA_BFC04DA0 = cpu->gpr[0]; uint32_t psx_brB_BFC04DA0 = cpu->gpr[0]; - psx_taken_BFC04DA0 = (psx_brA_BFC04DA0 == psx_brB_BFC04DA0); - psx_delay_BFC04DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04DA4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DA4u); -#endif - if (psx_delay_BFC04DA0) { - psx_delay_BFC04DA0 = 0; - if (psx_taken_BFC04DA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04DDCu); - goto label_BFC04DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04DA8u); - } -label_BFC04DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04DA8: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04DA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC04DAC: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DB0u); -#endif - /* 0xBFC04DB0: 8F39DF60 lw $t9, -8352($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DB0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DF60u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC04DB4: 309800FF andi $t8, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x309800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC04DB8: 3C0ABFC1 lui $t2, 0xBFC1 */ - cpu->gpr[10] = 0xBFC10000u; - PGXP_ALU(0x3C0ABFC1u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC04DBC: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04DBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DC0u); -#endif - /* 0xBFC04DC0: 8D4ADF5C lw $t2, -8356($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DC0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4ADF5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC04DC4: 2408000E addiu $t0, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2408000Eu, cpu->gpr[8], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04DC8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC04DCC: AC289154 sw $t0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DCCu); return; } g_debug_last_store_pc = 0xBFC04DCCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289154u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC04DD0: 2409000E addiu $t1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2409000Eu, cpu->gpr[9], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04DD4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC04DD8: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04DD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DD8u); -#endif -label_BFC04DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DDCu); -#endif - /* 0xBFC04DDC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04DE0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04DE4: 03E00008 jr $ra */ - psx_delay_BFC04DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04DE8u); -#endif - if (psx_delay_BFC04DE4) { - psx_delay_BFC04DE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04DEC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04DECu); - int psx_delay_BFC04E08 = 0; - int psx_taken_BFC04E08 = 0; - int psx_delay_BFC04E10 = 0; - int psx_taken_BFC04E10 = 0; - int psx_delay_BFC04E24 = 0; - int psx_taken_BFC04E24 = 0; - int psx_delay_BFC04E2C = 0; - int psx_taken_BFC04E2C = 0; - int psx_delay_BFC04E5C = 0; - int psx_taken_BFC04E5C = 0; - int psx_delay_BFC04E80 = 0; - int psx_taken_BFC04E80 = 0; - int psx_delay_BFC04EB0 = 0; - int psx_taken_BFC04EB0 = 0; - int psx_delay_BFC04EC0 = 0; - int psx_taken_BFC04EC0 = 0; - int psx_delay_BFC04EE0 = 0; - int psx_taken_BFC04EE0 = 0; - int psx_delay_BFC04F10 = 0; - int psx_taken_BFC04F10 = 0; - int psx_delay_BFC04F24 = 0; - int psx_taken_BFC04F24 = 0; - int psx_delay_BFC04F40 = 0; - int psx_delay_BFC04F48 = 0; - int psx_delay_BFC04F50 = 0; - int psx_taken_BFC04F50 = 0; - int psx_delay_BFC04F58 = 0; - int psx_delay_BFC04F60 = 0; - int psx_taken_BFC04F60 = 0; - int psx_delay_BFC04F68 = 0; - int psx_delay_BFC04F70 = 0; - int psx_taken_BFC04F70 = 0; - int psx_delay_BFC04F78 = 0; - int psx_delay_BFC04F80 = 0; - int psx_taken_BFC04F80 = 0; - int psx_delay_BFC04F88 = 0; - int psx_delay_BFC04F90 = 0; - int psx_taken_BFC04F90 = 0; - int psx_delay_BFC04F98 = 0; - int psx_taken_BFC04F98 = 0; - int psx_delay_BFC04FA0 = 0; - int psx_taken_BFC04FA0 = 0; - int psx_delay_BFC04FB4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04E10u: goto label_BFC04E10; - case 0xBFC04E18u: goto label_BFC04E18; - case 0xBFC04E2Cu: goto label_BFC04E2C; - case 0xBFC04E34u: goto label_BFC04E34; - case 0xBFC04E64u: goto label_BFC04E64; - case 0xBFC04E88u: goto label_BFC04E88; - case 0xBFC04EB8u: goto label_BFC04EB8; - case 0xBFC04EBCu: goto label_BFC04EBC; - case 0xBFC04EC8u: goto label_BFC04EC8; - case 0xBFC04EE8u: goto label_BFC04EE8; - case 0xBFC04F18u: goto label_BFC04F18; - case 0xBFC04F1Cu: goto label_BFC04F1C; - case 0xBFC04F2Cu: goto label_BFC04F2C; - case 0xBFC04F48u: goto label_BFC04F48; - case 0xBFC04F50u: goto label_BFC04F50; - case 0xBFC04F58u: goto label_BFC04F58; - case 0xBFC04F60u: goto label_BFC04F60; - case 0xBFC04F68u: goto label_BFC04F68; - case 0xBFC04F70u: goto label_BFC04F70; - case 0xBFC04F78u: goto label_BFC04F78; - case 0xBFC04F80u: goto label_BFC04F80; - case 0xBFC04F88u: goto label_BFC04F88; - case 0xBFC04F90u: goto label_BFC04F90; - case 0xBFC04F98u: goto label_BFC04F98; - case 0xBFC04FA0u: goto label_BFC04FA0; - case 0xBFC04FA8u: goto label_BFC04FA8; - case 0xBFC04FACu: goto label_BFC04FAC; - default: break; - } - } -label_BFC04DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04DEC: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DF0u); -#endif - /* 0xBFC04DF0: 8C63DF74 lw $v1, -8332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04DF4: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04DF8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DF8u); return; } g_debug_last_store_pc = 0xBFC04DF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04DFCu); -#endif - /* 0xBFC04DFC: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DFCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC04E04: 31CF0004 andi $t7, $t6, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x4u; - PGXP_ALU(0x31CF0004u, cpu->gpr[15], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC04E08: 15E00003 bne $t7, $zero, 0xBFC04E18 */ - uint32_t psx_brA_BFC04E08 = cpu->gpr[15]; uint32_t psx_brB_BFC04E08 = cpu->gpr[0]; - psx_taken_BFC04E08 = (psx_brA_BFC04E08 != psx_brB_BFC04E08); - psx_delay_BFC04E08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E0Cu); -#endif - if (psx_delay_BFC04E08) { - psx_delay_BFC04E08 = 0; - if (psx_taken_BFC04E08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E18u); - goto label_BFC04E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E10u); - } -label_BFC04E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E10: 10000066 beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04E10 = cpu->gpr[0]; uint32_t psx_brB_BFC04E10 = cpu->gpr[0]; - psx_taken_BFC04E10 = (psx_brA_BFC04E10 == psx_brB_BFC04E10); - psx_delay_BFC04E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04E14: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E14u); -#endif - if (psx_delay_BFC04E10) { - psx_delay_BFC04E10 = 0; - if (psx_taken_BFC04E10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E18u); - } -label_BFC04E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E18u); -#endif - /* 0xBFC04E18: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E18u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04E1C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC04E20: 30580004 andi $t8, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC04E24: 17000003 bne $t8, $zero, 0xBFC04E34 */ - uint32_t psx_brA_BFC04E24 = cpu->gpr[24]; uint32_t psx_brB_BFC04E24 = cpu->gpr[0]; - psx_taken_BFC04E24 = (psx_brA_BFC04E24 != psx_brB_BFC04E24); - psx_delay_BFC04E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC04E28: AC229150 sw $v0, -28336($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E28u); return; } g_debug_last_store_pc = 0xBFC04E28u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229150u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E28u); -#endif - if (psx_delay_BFC04E24) { - psx_delay_BFC04E24 = 0; - if (psx_taken_BFC04E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E34u); - goto label_BFC04E34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E2Cu); - } -label_BFC04E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E2C: 1000005F beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04E2C = cpu->gpr[0]; uint32_t psx_brB_BFC04E2C = cpu->gpr[0]; - psx_taken_BFC04E2C = (psx_brA_BFC04E2C == psx_brB_BFC04E2C); - psx_delay_BFC04E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04E30: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E30u); -#endif - if (psx_delay_BFC04E2C) { - psx_delay_BFC04E2C = 0; - if (psx_taken_BFC04E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E34u); - } -label_BFC04E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC04E34: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC04E38: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E3Cu); -#endif - /* 0xBFC04E3C: 8CA5DF64 lw $a1, -8348($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -8348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-8348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E3Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5DF64u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E40u); -#endif - /* 0xBFC04E40: 8C84DF58 lw $a0, -8360($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DF58u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC04E44: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC04E48: A0860000 sb $a2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04E48u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E4Cu); -#endif - /* 0xBFC04E4C: 90A20000 lbu $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x90A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC04E54: 30470007 andi $a3, $v0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] & 0x7u; - PGXP_ALU(0x30470007u, cpu->gpr[7], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC04E58: 30E700FF andi $a3, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC04E5C: 10E00017 beq $a3, $zero, 0xBFC04EBC */ - uint32_t psx_brA_BFC04E5C = cpu->gpr[7]; uint32_t psx_brB_BFC04E5C = cpu->gpr[0]; - psx_taken_BFC04E5C = (psx_brA_BFC04E5C == psx_brB_BFC04E5C); - psx_delay_BFC04E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC04E60: 30430018 andi $v1, $v0, 0x18 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u; - PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E60u); -#endif - if (psx_delay_BFC04E5C) { - psx_delay_BFC04E5C = 0; - if (psx_taken_BFC04E5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EBCu); - goto label_BFC04EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E64u); - } -label_BFC04E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC04E64: A0860000 sb $a2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04E64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC04E68: 24190007 addiu $t9, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24190007u, cpu->gpr[25], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC04E6C: A0B90000 sb $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04E6Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0B90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC04E70: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E70u); return; } g_debug_last_store_pc = 0xBFC04E70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E74u); -#endif - /* 0xBFC04E74: 8FA80018 lw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E74u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC04E7C: 29010004 slti $at, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0); - PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04E80: 1020000E beq $at, $zero, 0xBFC04EBC */ - uint32_t psx_brA_BFC04E80 = cpu->gpr[1]; uint32_t psx_brB_BFC04E80 = cpu->gpr[0]; - psx_taken_BFC04E80 = (psx_brA_BFC04E80 == psx_brB_BFC04E80); - psx_delay_BFC04E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC04E84: 30430018 andi $v1, $v0, 0x18 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u; - PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E84u); -#endif - if (psx_delay_BFC04E80) { - psx_delay_BFC04E80 = 0; - if (psx_taken_BFC04E80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EBCu); - goto label_BFC04EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E88u); - } -label_BFC04E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E88u); -#endif - /* 0xBFC04E88: 8FA90018 lw $t1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E88u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC04E90: AC090000 sw $t1, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E90u); return; } g_debug_last_store_pc = 0xBFC04E90u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E94u); -#endif - /* 0xBFC04E94: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04E94u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04E98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC04E9C: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC04EA0: AFAB0018 sw $t3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04EA0u); return; } g_debug_last_store_pc = 0xBFC04EA0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EA4u); -#endif - /* 0xBFC04EA4: 8FAC0018 lw $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04EA4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04EA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC04EAC: 29810004 slti $at, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0); - PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04EB0: 1420FFF5 bne $at, $zero, 0xBFC04E88 */ - uint32_t psx_brA_BFC04EB0 = cpu->gpr[1]; uint32_t psx_brB_BFC04EB0 = cpu->gpr[0]; - psx_taken_BFC04EB0 = (psx_brA_BFC04EB0 != psx_brB_BFC04EB0); - psx_delay_BFC04EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04EB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04EB4u); -#endif - if (psx_delay_BFC04EB0) { - psx_delay_BFC04EB0 = 0; - if (psx_taken_BFC04EB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04E88u); - goto label_BFC04E88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EB8u); - } -label_BFC04EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC04EB8: 30430018 andi $v1, $v0, 0x18 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x18u; - PGXP_ALU(0x30430018u, cpu->gpr[3], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EB8u); -#endif -label_BFC04EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04EBC: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04EC0: 10600016 beq $v1, $zero, 0xBFC04F1C */ - uint32_t psx_brA_BFC04EC0 = cpu->gpr[3]; uint32_t psx_brB_BFC04EC0 = cpu->gpr[0]; - psx_taken_BFC04EC0 = (psx_brA_BFC04EC0 == psx_brB_BFC04EC0); - psx_delay_BFC04EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC04EC4: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EC4u); -#endif - if (psx_delay_BFC04EC0) { - psx_delay_BFC04EC0 = 0; - if (psx_taken_BFC04EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F1Cu); - goto label_BFC04F1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EC8u); - } -label_BFC04EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC04EC8: A0860000 sb $a2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04EC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC04ECC: A0A30000 sb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04ECCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA0A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC04ED0: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04ED0u); return; } g_debug_last_store_pc = 0xBFC04ED0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ED4u); -#endif - /* 0xBFC04ED4: 8FAD0018 lw $t5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04ED4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04ED8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC04EDC: 29A10004 slti $at, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (4) ? 1 : 0); - PGXP_ALU(0x29A10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04EE0: 1020000E beq $at, $zero, 0xBFC04F1C */ - uint32_t psx_brA_BFC04EE0 = cpu->gpr[1]; uint32_t psx_brB_BFC04EE0 = cpu->gpr[0]; - psx_taken_BFC04EE0 = (psx_brA_BFC04EE0 == psx_brB_BFC04EE0); - psx_delay_BFC04EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC04EE4: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EE4u); -#endif - if (psx_delay_BFC04EE0) { - psx_delay_BFC04EE0 = 0; - if (psx_taken_BFC04EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F1Cu); - goto label_BFC04F1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EE8u); - } -label_BFC04EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EE8u); -#endif - /* 0xBFC04EE8: 8FAE0018 lw $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04EE8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04EEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC04EF0: AC0E0000 sw $t6, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04EF0u); return; } g_debug_last_store_pc = 0xBFC04EF0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC0E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EF4u); -#endif - /* 0xBFC04EF4: 8FAF0018 lw $t7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04EF4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04EF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC04EFC: 25F80001 addiu $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (1)); - PGXP_ALU(0x25F80001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC04F00: AFB80018 sw $t8, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F00u); return; } g_debug_last_store_pc = 0xBFC04F00u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F04u); -#endif - /* 0xBFC04F04: 8FB90018 lw $t9, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F04u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC04F0C: 2B210004 slti $at, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (4) ? 1 : 0); - PGXP_ALU(0x2B210004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04F10: 1420FFF5 bne $at, $zero, 0xBFC04EE8 */ - uint32_t psx_brA_BFC04F10 = cpu->gpr[1]; uint32_t psx_brB_BFC04F10 = cpu->gpr[0]; - psx_taken_BFC04F10 = (psx_brA_BFC04F10 != psx_brB_BFC04F10); - psx_delay_BFC04F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F14u); -#endif - if (psx_delay_BFC04F10) { - psx_delay_BFC04F10 = 0; - if (psx_taken_BFC04F10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04EE8u); - goto label_BFC04EE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F18u); - } -label_BFC04F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC04F18: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F18u); -#endif -label_BFC04F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC04F1C: 2448FFFF addiu $t0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2448FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC04F20: 2D010005 sltiu $at, $t0, 5 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000005u ? 1 : 0); - PGXP_ALU(0x2D010005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC04F24: 1020001C beq $at, $zero, 0xBFC04F98 */ - uint32_t psx_brA_BFC04F24 = cpu->gpr[1]; uint32_t psx_brB_BFC04F24 = cpu->gpr[0]; - psx_taken_BFC04F24 = (psx_brA_BFC04F24 == psx_brB_BFC04F24); - psx_delay_BFC04F24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F28u); -#endif - if (psx_delay_BFC04F24) { - psx_delay_BFC04F24 = 0; - if (psx_taken_BFC04F24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F98u); - goto label_BFC04F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F2Cu); - } -label_BFC04F2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC04F2C: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04F30: 3C01BFC1 lui $at, 0xBFC1 */ - cpu->gpr[1] = 0xBFC10000u; - PGXP_ALU(0x3C01BFC1u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC04F34: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F38u); -#endif - /* 0xBFC04F38: 8C28DC70 lw $t0, -9104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -9104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-9104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F38u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2u); } - PGXP_LOAD(0x8C28DC70u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC04F40: 01000008 jr $t0 */ - psx_delay_BFC04F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F44u); -#endif - if (psx_delay_BFC04F40) { - psx_delay_BFC04F40 = 0; - /* jump table at 0xBFC0DC70, 5 entries */ - switch (cpu->gpr[8]) { - case 0xBFC04F48u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F48u); - goto label_BFC04F48; - case 0xBFC04F58u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F58u); - goto label_BFC04F58; - case 0xBFC04F68u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F68u); - goto label_BFC04F68; - case 0xBFC04F78u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F78u); - goto label_BFC04F78; - case 0xBFC04F88u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F88u); - goto label_BFC04F88; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } - } -label_BFC04F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04F48: 0FF0164F jal 0xBFC0593C */ - cpu->gpr[31] = 0xBFC04F50u; /* jal link before delay slot */ - psx_delay_BFC04F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F4Cu); -#endif - if (psx_delay_BFC04F48) { - psx_delay_BFC04F48 = 0; - cpu->gpr[31] = 0xBFC04F50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0593Cu); - cpu->pc = 0xBFC0593Cu; return; - } -label_BFC04F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F50: 10000016 beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F50 = cpu->gpr[0]; uint32_t psx_brB_BFC04F50 = cpu->gpr[0]; - psx_taken_BFC04F50 = (psx_brA_BFC04F50 == psx_brB_BFC04F50); - psx_delay_BFC04F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F54: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F54u); -#endif - if (psx_delay_BFC04F50) { - psx_delay_BFC04F50 = 0; - if (psx_taken_BFC04F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F58u); - } -label_BFC04F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04F58: 0FF01556 jal 0xBFC05558 */ - cpu->gpr[31] = 0xBFC04F60u; /* jal link before delay slot */ - psx_delay_BFC04F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F5Cu); -#endif - if (psx_delay_BFC04F58) { - psx_delay_BFC04F58 = 0; - cpu->gpr[31] = 0xBFC04F60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05558u); - cpu->pc = 0xBFC05558u; return; - } -label_BFC04F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F60: 10000012 beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F60 = cpu->gpr[0]; uint32_t psx_brB_BFC04F60 = cpu->gpr[0]; - psx_taken_BFC04F60 = (psx_brA_BFC04F60 == psx_brB_BFC04F60); - psx_delay_BFC04F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F64: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F64u); -#endif - if (psx_delay_BFC04F60) { - psx_delay_BFC04F60 = 0; - if (psx_taken_BFC04F60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F68u); - } -label_BFC04F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04F68: 0FF01465 jal 0xBFC05194 */ - cpu->gpr[31] = 0xBFC04F70u; /* jal link before delay slot */ - psx_delay_BFC04F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F6Cu); -#endif - if (psx_delay_BFC04F68) { - psx_delay_BFC04F68 = 0; - cpu->gpr[31] = 0xBFC04F70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05194u); - cpu->pc = 0xBFC05194u; return; - } -label_BFC04F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F70: 1000000E beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F70 = cpu->gpr[0]; uint32_t psx_brB_BFC04F70 = cpu->gpr[0]; - psx_taken_BFC04F70 = (psx_brA_BFC04F70 == psx_brB_BFC04F70); - psx_delay_BFC04F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F74: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F74u); -#endif - if (psx_delay_BFC04F70) { - psx_delay_BFC04F70 = 0; - if (psx_taken_BFC04F70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F78u); - } -label_BFC04F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04F78: 0FF01691 jal 0xBFC05A44 */ - cpu->gpr[31] = 0xBFC04F80u; /* jal link before delay slot */ - psx_delay_BFC04F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F7Cu); -#endif - if (psx_delay_BFC04F78) { - psx_delay_BFC04F78 = 0; - cpu->gpr[31] = 0xBFC04F80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A44u); - cpu->pc = 0xBFC05A44u; return; - } -label_BFC04F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F80: 1000000A beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F80 = cpu->gpr[0]; uint32_t psx_brB_BFC04F80 = cpu->gpr[0]; - psx_taken_BFC04F80 = (psx_brA_BFC04F80 == psx_brB_BFC04F80); - psx_delay_BFC04F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F84: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F84u); -#endif - if (psx_delay_BFC04F80) { - psx_delay_BFC04F80 = 0; - if (psx_taken_BFC04F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F88u); - } -label_BFC04F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC04F88: 0FF015EC jal 0xBFC057B0 */ - cpu->gpr[31] = 0xBFC04F90u; /* jal link before delay slot */ - psx_delay_BFC04F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04F8Cu); -#endif - if (psx_delay_BFC04F88) { - psx_delay_BFC04F88 = 0; - cpu->gpr[31] = 0xBFC04F90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057B0u); - cpu->pc = 0xBFC057B0u; return; - } -label_BFC04F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04F90: 10000006 beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F90 = cpu->gpr[0]; uint32_t psx_brB_BFC04F90 = cpu->gpr[0]; - psx_taken_BFC04F90 = (psx_brA_BFC04F90 == psx_brB_BFC04F90); - psx_delay_BFC04F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F94: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F94u); -#endif - if (psx_delay_BFC04F90) { - psx_delay_BFC04F90 = 0; - if (psx_taken_BFC04F90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04F98u); - } -label_BFC04F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC04F98: 14600004 bne $v1, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04F98 = cpu->gpr[3]; uint32_t psx_brB_BFC04F98 = cpu->gpr[0]; - psx_taken_BFC04F98 = (psx_brA_BFC04F98 != psx_brB_BFC04F98); - psx_delay_BFC04F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04F9C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04F9Cu); -#endif - if (psx_delay_BFC04F98) { - psx_delay_BFC04F98 = 0; - if (psx_taken_BFC04F98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FA0u); - } -label_BFC04FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FA0: 10000002 beq $zero, $zero, 0xBFC04FAC */ - uint32_t psx_brA_BFC04FA0 = cpu->gpr[0]; uint32_t psx_brB_BFC04FA0 = cpu->gpr[0]; - psx_taken_BFC04FA0 = (psx_brA_BFC04FA0 == psx_brB_BFC04FA0); - psx_delay_BFC04FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04FA4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FA4u); -#endif - if (psx_delay_BFC04FA0) { - psx_delay_BFC04FA0 = 0; - if (psx_taken_BFC04FA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FACu); - goto label_BFC04FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FA8u); - } -label_BFC04FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04FA8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FA8u); -#endif -label_BFC04FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FACu); -#endif - /* 0xBFC04FAC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04FB0: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC04FB4: 03E00008 jr $ra */ - psx_delay_BFC04FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04FB8u); -#endif - if (psx_delay_BFC04FB4) { - psx_delay_BFC04FB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC04FBC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC04FBCu); - int psx_delay_BFC04FD8 = 0; - int psx_taken_BFC04FD8 = 0; - int psx_delay_BFC04FE0 = 0; - int psx_taken_BFC04FE0 = 0; - int psx_delay_BFC04FF4 = 0; - int psx_taken_BFC04FF4 = 0; - int psx_delay_BFC04FFC = 0; - int psx_taken_BFC04FFC = 0; - int psx_delay_BFC05038 = 0; - int psx_taken_BFC05038 = 0; - int psx_delay_BFC05048 = 0; - int psx_delay_BFC05064 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC04FE0u: goto label_BFC04FE0; - case 0xBFC04FE8u: goto label_BFC04FE8; - case 0xBFC04FFCu: goto label_BFC04FFC; - case 0xBFC05004u: goto label_BFC05004; - case 0xBFC05040u: goto label_BFC05040; - case 0xBFC05050u: goto label_BFC05050; - case 0xBFC0505Cu: goto label_BFC0505C; - default: break; - } - } -label_BFC04FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC04FBC: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FC0u); -#endif - /* 0xBFC04FC0: 8C63DF74 lw $v1, -8332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FC0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC04FC4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC04FC8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FC8u); return; } g_debug_last_store_pc = 0xBFC04FC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FCCu); -#endif - /* 0xBFC04FCC: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC04FD4: 31CF0008 andi $t7, $t6, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u; - PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC04FD8: 15E00003 bne $t7, $zero, 0xBFC04FE8 */ - uint32_t psx_brA_BFC04FD8 = cpu->gpr[15]; uint32_t psx_brB_BFC04FD8 = cpu->gpr[0]; - psx_taken_BFC04FD8 = (psx_brA_BFC04FD8 != psx_brB_BFC04FD8); - psx_delay_BFC04FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC04FDCu); -#endif - if (psx_delay_BFC04FD8) { - psx_delay_BFC04FD8 = 0; - if (psx_taken_BFC04FD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FE8u); - goto label_BFC04FE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FE0u); - } -label_BFC04FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FE0: 1000001E beq $zero, $zero, 0xBFC0505C */ - uint32_t psx_brA_BFC04FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC04FE0 = cpu->gpr[0]; - psx_taken_BFC04FE0 = (psx_brA_BFC04FE0 == psx_brB_BFC04FE0); - psx_delay_BFC04FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC04FE4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FE4u); -#endif - if (psx_delay_BFC04FE0) { - psx_delay_BFC04FE0 = 0; - if (psx_taken_BFC04FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0505Cu); - goto label_BFC0505C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FE8u); - } -label_BFC04FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FE8u); -#endif - /* 0xBFC04FE8: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FE8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC04FEC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC04FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC04FF0: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC04FF4: 17000003 bne $t8, $zero, 0xBFC05004 */ - uint32_t psx_brA_BFC04FF4 = cpu->gpr[24]; uint32_t psx_brB_BFC04FF4 = cpu->gpr[0]; - psx_taken_BFC04FF4 = (psx_brA_BFC04FF4 != psx_brB_BFC04FF4); - psx_delay_BFC04FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC04FF8: AC229150 sw $v0, -28336($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FF8u); return; } g_debug_last_store_pc = 0xBFC04FF8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229150u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC04FF8u); -#endif - if (psx_delay_BFC04FF4) { - psx_delay_BFC04FF4 = 0; - if (psx_taken_BFC04FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05004u); - goto label_BFC05004; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04FFCu); - } -label_BFC04FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC04FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC04FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC04FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC04FFC: 10000017 beq $zero, $zero, 0xBFC0505C */ - uint32_t psx_brA_BFC04FFC = cpu->gpr[0]; uint32_t psx_brB_BFC04FFC = cpu->gpr[0]; - psx_taken_BFC04FFC = (psx_brA_BFC04FFC == psx_brB_BFC04FFC); - psx_delay_BFC04FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05000: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05000u); -#endif - if (psx_delay_BFC04FFC) { - psx_delay_BFC04FFC = 0; - if (psx_taken_BFC04FFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0505Cu); - goto label_BFC0505C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05004u); - } -label_BFC05004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05004: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05008u); -#endif - /* 0xBFC05008: 8C63DF6C lw $v1, -8340($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05008u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF6Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0500Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0500C: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0500Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05010u); -#endif - /* 0xBFC05010: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05010u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05014: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05018: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0501C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05020: 3C018800 lui $at, 0x8800 */ - cpu->gpr[1] = 0x88000000u; - PGXP_ALU(0x3C018800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05024u); -#endif - /* 0xBFC05024: 8C849180 lw $a0, -28288($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05024u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849180u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05028: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0502C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05030: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05030u); return; } g_debug_last_store_pc = 0xBFC05030u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05034: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05038: 14800005 bne $a0, $zero, 0xBFC05050 */ - uint32_t psx_brA_BFC05038 = cpu->gpr[4]; uint32_t psx_brB_BFC05038 = cpu->gpr[0]; - psx_taken_BFC05038 = (psx_brA_BFC05038 != psx_brB_BFC05038); - psx_delay_BFC05038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0503C: AC249180 sw $a0, -28288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0503Cu); return; } g_debug_last_store_pc = 0xBFC0503Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249180u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0503Cu); -#endif - if (psx_delay_BFC05038) { - psx_delay_BFC05038 = 0; - if (psx_taken_BFC05038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05050u); - goto label_BFC05050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05040u); - } -label_BFC05040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05040: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05044: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05048: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05050u; /* jal link before delay slot */ - psx_delay_BFC05048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0504Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0504C: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0504Cu); -#endif - if (psx_delay_BFC05048) { - psx_delay_BFC05048 = 0; - cpu->gpr[31] = 0xBFC05050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05050: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05054: AC209160 sw $zero, -28320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05054u); return; } g_debug_last_store_pc = 0xBFC05054u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209160u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05058: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05058u); -#endif -label_BFC0505C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0505Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0505Cu); -#endif - /* 0xBFC0505C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0505Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05060: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05064: 03E00008 jr $ra */ - psx_delay_BFC05064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05068u); -#endif - if (psx_delay_BFC05064) { - psx_delay_BFC05064 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0506C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0506Cu); - int psx_delay_BFC05078 = 0; - int psx_taken_BFC05078 = 0; - int psx_delay_BFC0508C = 0; - int psx_delay_BFC0509C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05080u: goto label_BFC05080; - case 0xBFC05094u: goto label_BFC05094; - default: break; - } - } -label_BFC0506C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0506Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0506C: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05070u); -#endif - /* 0xBFC05070: 8DCEB938 lw $t6, -18120($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -18120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-18120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05070u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEB938u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05074: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05078: 11C00006 beq $t6, $zero, 0xBFC05094 */ - uint32_t psx_brA_BFC05078 = cpu->gpr[14]; uint32_t psx_brB_BFC05078 = cpu->gpr[0]; - psx_taken_BFC05078 = (psx_brA_BFC05078 == psx_brB_BFC05078); - psx_delay_BFC05078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0507Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0507C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0507Cu); return; } g_debug_last_store_pc = 0xBFC0507Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0507Cu); -#endif - if (psx_delay_BFC05078) { - psx_delay_BFC05078 = 0; - if (psx_taken_BFC05078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05094u); - goto label_BFC05094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05080u); - } -label_BFC05080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC05080: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05084u); -#endif - /* 0xBFC05084: 8F18DF74 lw $t8, -8332($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05084u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC05088: 240FFFFB addiu $t7, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x240FFFFBu, cpu->gpr[15], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0508Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0508C: 0FF03660 jal 0xBFC0D980 */ - cpu->gpr[31] = 0xBFC05094u; /* jal link before delay slot */ - psx_delay_BFC0508C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC05090: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05090u); return; } g_debug_last_store_pc = 0xBFC05090u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05090u); -#endif - if (psx_delay_BFC0508C) { - psx_delay_BFC0508C = 0; - cpu->gpr[31] = 0xBFC05094u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D980u); - cpu->pc = 0xBFC0D980u; return; - } -label_BFC05094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05094u); -#endif - /* 0xBFC05094: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05094u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05098: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0509Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0509C: 03E00008 jr $ra */ - psx_delay_BFC0509C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC050A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC050A0u); -#endif - if (psx_delay_BFC0509C) { - psx_delay_BFC0509C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC050A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC050A4u); - int psx_delay_BFC050B0 = 0; - int psx_taken_BFC050B0 = 0; - int psx_delay_BFC050C4 = 0; - int psx_delay_BFC050D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC050B8u: goto label_BFC050B8; - case 0xBFC050CCu: goto label_BFC050CC; - default: break; - } - } -label_BFC050A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC050A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC050A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC050A4: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC050A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050A8u); -#endif - /* 0xBFC050A8: 8DCEB93C lw $t6, -18116($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -18116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-18116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050A8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEB93Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC050AC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC050B0: 11C00006 beq $t6, $zero, 0xBFC050CC */ - uint32_t psx_brA_BFC050B0 = cpu->gpr[14]; uint32_t psx_brB_BFC050B0 = cpu->gpr[0]; - psx_taken_BFC050B0 = (psx_brA_BFC050B0 == psx_brB_BFC050B0); - psx_delay_BFC050B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC050B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050B4u); return; } g_debug_last_store_pc = 0xBFC050B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050B4u); -#endif - if (psx_delay_BFC050B0) { - psx_delay_BFC050B0 = 0; - if (psx_taken_BFC050B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC050CCu); - goto label_BFC050CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC050B8u); - } -label_BFC050B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC050B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC050B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC050B8: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC050B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050BCu); -#endif - /* 0xBFC050BC: 8F18DF74 lw $t8, -8332($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050BCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC050C0: 240FFFF7 addiu $t7, $zero, -9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); - PGXP_ALU(0x240FFFF7u, cpu->gpr[15], _pgx1, 0xFFFFFFF7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC050C4: 0FF03660 jal 0xBFC0D980 */ - cpu->gpr[31] = 0xBFC050CCu; /* jal link before delay slot */ - psx_delay_BFC050C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC050C8: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050C8u); return; } g_debug_last_store_pc = 0xBFC050C8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050C8u); -#endif - if (psx_delay_BFC050C4) { - psx_delay_BFC050C4 = 0; - cpu->gpr[31] = 0xBFC050CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D980u); - cpu->pc = 0xBFC0D980u; return; - } -label_BFC050CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC050CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC050CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050CCu); -#endif - /* 0xBFC050CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC050D0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC050D4: 03E00008 jr $ra */ - psx_delay_BFC050D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC050D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC050D8u); -#endif - if (psx_delay_BFC050D4) { - psx_delay_BFC050D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC050DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC050DCu); - int psx_delay_BFC050F4 = 0; -label_BFC050DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC050DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC050DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC050DC: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC050DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC050E0: 25EFB938 addiu $t7, $t7, -18120 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-18120)); - PGXP_ALU(0x25EFB938u, cpu->gpr[15], _pgx1, 0xFFFFB938u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC050E4: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC050E8: 01CF3021 addu $a2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[6] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050ECu); -#endif - /* 0xBFC050EC: 8CC30000 lw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x8CC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC050F0: ACC50000 sw $a1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050F0u); return; } g_debug_last_store_pc = 0xBFC050F0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xACC50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC050F4: 03E00008 jr $ra */ - psx_delay_BFC050F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC050F8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC050F8u); -#endif - if (psx_delay_BFC050F4) { - psx_delay_BFC050F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC050FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC050FCu); - int psx_delay_BFC05118 = 0; -label_BFC050FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC050FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC050FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC050FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC050FC: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC050FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05100u); -#endif - /* 0xBFC05100: 8DEFDF58 lw $t7, -8360($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05100u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05104: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC05108: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0510Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0510C: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0510Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0510Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05110u); -#endif - /* 0xBFC05110: 8F39DF60 lw $t9, -8352($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05110u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DF60u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05114: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05118: 03E00008 jr $ra */ - psx_delay_BFC05118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0511Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0511C: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0511Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0511Cu); -#endif - if (psx_delay_BFC05118) { - psx_delay_BFC05118 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05120(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05120u); - int psx_delay_BFC05154 = 0; - int psx_taken_BFC05154 = 0; - int psx_delay_BFC05184 = 0; - int psx_taken_BFC05184 = 0; - int psx_delay_BFC0518C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0515Cu: goto label_BFC0515C; - case 0xBFC05160u: goto label_BFC05160; - case 0xBFC0518Cu: goto label_BFC0518C; - default: break; - } - } -label_BFC05120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05120: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05124u); -#endif - /* 0xBFC05124: 8DEFDF58 lw $t7, -8360($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05124u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05128: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0512Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0512C: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0512Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC05130: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05130u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05134u); -#endif - /* 0xBFC05134: 8F39DF64 lw $t9, -8348($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05134u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DF64u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05138: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0513Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0513C: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0513Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC05140: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05140u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC05144: AFA00000 sw $zero, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05144u); return; } g_debug_last_store_pc = 0xBFC05144u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05148u); -#endif - /* 0xBFC05148: 8FA80000 lw $t0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05148u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0514Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0514C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0514Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC05150: 29010004 slti $at, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0); - PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05154: 1020000D beq $at, $zero, 0xBFC0518C */ - uint32_t psx_brA_BFC05154 = cpu->gpr[1]; uint32_t psx_brB_BFC05154 = cpu->gpr[0]; - psx_taken_BFC05154 = (psx_brA_BFC05154 == psx_brB_BFC05154); - psx_delay_BFC05154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05158u); -#endif - if (psx_delay_BFC05154) { - psx_delay_BFC05154 = 0; - if (psx_taken_BFC05154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0518Cu); - goto label_BFC0518C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0515Cu); - } -label_BFC0515C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0515Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0515Cu); -#endif - /* 0xBFC0515C: 8FA90000 lw $t1, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0515Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0515Cu); -#endif -label_BFC05160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC05164: AC090000 sw $t1, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05164u); return; } g_debug_last_store_pc = 0xBFC05164u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05168u); -#endif - /* 0xBFC05168: 8FAA0000 lw $t2, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05168u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0516Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0516C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0516Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC05170: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC05174: AFAB0000 sw $t3, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05174u); return; } g_debug_last_store_pc = 0xBFC05174u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05178u); -#endif - /* 0xBFC05178: 8FAC0000 lw $t4, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05178u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0517C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC05180: 29810004 slti $at, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0); - PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05184: 1420FFF6 bne $at, $zero, 0xBFC05160 */ - uint32_t psx_brA_BFC05184 = cpu->gpr[1]; uint32_t psx_brB_BFC05184 = cpu->gpr[0]; - psx_taken_BFC05184 = (psx_brA_BFC05184 != psx_brB_BFC05184); - psx_delay_BFC05184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05188u); -#endif - /* 0xBFC05188: 8FA90000 lw $t1, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05188u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05188u); -#endif - if (psx_delay_BFC05184) { - psx_delay_BFC05184 = 0; - if (psx_taken_BFC05184) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05160u); - goto label_BFC05160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0518Cu); - } -label_BFC0518C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0518Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0518Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0518Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0518C: 03E00008 jr $ra */ - psx_delay_BFC0518C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05190: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05190u); -#endif - if (psx_delay_BFC0518C) { - psx_delay_BFC0518C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05194(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05194u); - int psx_delay_BFC051A4 = 0; - int psx_taken_BFC051A4 = 0; - int psx_delay_BFC051AC = 0; - int psx_delay_BFC051B4 = 0; - int psx_taken_BFC051B4 = 0; - int psx_delay_BFC051C0 = 0; - int psx_taken_BFC051C0 = 0; - int psx_delay_BFC051C8 = 0; - int psx_delay_BFC051D0 = 0; - int psx_taken_BFC051D0 = 0; - int psx_delay_BFC051E8 = 0; - int psx_taken_BFC051E8 = 0; - int psx_delay_BFC051F0 = 0; - int psx_delay_BFC051F8 = 0; - int psx_taken_BFC051F8 = 0; - int psx_delay_BFC05200 = 0; - int psx_delay_BFC05208 = 0; - int psx_taken_BFC05208 = 0; - int psx_delay_BFC05218 = 0; - int psx_taken_BFC05218 = 0; - int psx_delay_BFC05234 = 0; - int psx_delay_BFC0523C = 0; - int psx_taken_BFC0523C = 0; - int psx_delay_BFC05244 = 0; - int psx_delay_BFC0524C = 0; - int psx_taken_BFC0524C = 0; - int psx_delay_BFC05254 = 0; - int psx_delay_BFC0525C = 0; - int psx_taken_BFC0525C = 0; - int psx_delay_BFC05264 = 0; - int psx_delay_BFC0526C = 0; - int psx_taken_BFC0526C = 0; - int psx_delay_BFC05274 = 0; - int psx_delay_BFC0527C = 0; - int psx_taken_BFC0527C = 0; - int psx_delay_BFC05284 = 0; - int psx_delay_BFC0528C = 0; - int psx_taken_BFC0528C = 0; - int psx_delay_BFC05294 = 0; - int psx_delay_BFC0529C = 0; - int psx_taken_BFC0529C = 0; - int psx_delay_BFC052A4 = 0; - int psx_delay_BFC052AC = 0; - int psx_taken_BFC052AC = 0; - int psx_delay_BFC052B4 = 0; - int psx_delay_BFC052BC = 0; - int psx_taken_BFC052BC = 0; - int psx_delay_BFC052C4 = 0; - int psx_delay_BFC052CC = 0; - int psx_taken_BFC052CC = 0; - int psx_delay_BFC052D4 = 0; - int psx_delay_BFC052DC = 0; - int psx_taken_BFC052DC = 0; - int psx_delay_BFC052EC = 0; - int psx_delay_BFC052F4 = 0; - int psx_taken_BFC052F4 = 0; - int psx_delay_BFC05300 = 0; - int psx_taken_BFC05300 = 0; - int psx_delay_BFC05308 = 0; - int psx_taken_BFC05308 = 0; - int psx_delay_BFC05310 = 0; - int psx_taken_BFC05310 = 0; - int psx_delay_BFC05318 = 0; - int psx_taken_BFC05318 = 0; - int psx_delay_BFC05320 = 0; - int psx_taken_BFC05320 = 0; - int psx_delay_BFC05328 = 0; - int psx_taken_BFC05328 = 0; - int psx_delay_BFC05330 = 0; - int psx_taken_BFC05330 = 0; - int psx_delay_BFC05338 = 0; - int psx_taken_BFC05338 = 0; - int psx_delay_BFC05340 = 0; - int psx_taken_BFC05340 = 0; - int psx_delay_BFC05348 = 0; - int psx_taken_BFC05348 = 0; - int psx_delay_BFC05350 = 0; - int psx_taken_BFC05350 = 0; - int psx_delay_BFC05358 = 0; - int psx_taken_BFC05358 = 0; - int psx_delay_BFC05364 = 0; - int psx_taken_BFC05364 = 0; - int psx_delay_BFC0536C = 0; - int psx_taken_BFC0536C = 0; - int psx_delay_BFC05378 = 0; - int psx_taken_BFC05378 = 0; - int psx_delay_BFC05380 = 0; - int psx_taken_BFC05380 = 0; - int psx_delay_BFC0538C = 0; - int psx_taken_BFC0538C = 0; - int psx_delay_BFC05394 = 0; - int psx_taken_BFC05394 = 0; - int psx_delay_BFC0539C = 0; - int psx_taken_BFC0539C = 0; - int psx_delay_BFC053A4 = 0; - int psx_taken_BFC053A4 = 0; - int psx_delay_BFC053B0 = 0; - int psx_taken_BFC053B0 = 0; - int psx_delay_BFC053B8 = 0; - int psx_taken_BFC053B8 = 0; - int psx_delay_BFC053C4 = 0; - int psx_taken_BFC053C4 = 0; - int psx_delay_BFC053CC = 0; - int psx_taken_BFC053CC = 0; - int psx_delay_BFC053D4 = 0; - int psx_taken_BFC053D4 = 0; - int psx_delay_BFC053DC = 0; - int psx_taken_BFC053DC = 0; - int psx_delay_BFC053E4 = 0; - int psx_taken_BFC053E4 = 0; - int psx_delay_BFC053EC = 0; - int psx_taken_BFC053EC = 0; - int psx_delay_BFC053F8 = 0; - int psx_taken_BFC053F8 = 0; - int psx_delay_BFC05400 = 0; - int psx_taken_BFC05400 = 0; - int psx_delay_BFC0540C = 0; - int psx_taken_BFC0540C = 0; - int psx_delay_BFC05414 = 0; - int psx_taken_BFC05414 = 0; - int psx_delay_BFC0541C = 0; - int psx_taken_BFC0541C = 0; - int psx_delay_BFC05424 = 0; - int psx_taken_BFC05424 = 0; - int psx_delay_BFC05430 = 0; - int psx_taken_BFC05430 = 0; - int psx_delay_BFC05438 = 0; - int psx_taken_BFC05438 = 0; - int psx_delay_BFC05444 = 0; - int psx_taken_BFC05444 = 0; - int psx_delay_BFC0544C = 0; - int psx_taken_BFC0544C = 0; - int psx_delay_BFC05454 = 0; - int psx_taken_BFC05454 = 0; - int psx_delay_BFC0545C = 0; - int psx_taken_BFC0545C = 0; - int psx_delay_BFC05464 = 0; - int psx_taken_BFC05464 = 0; - int psx_delay_BFC0546C = 0; - int psx_taken_BFC0546C = 0; - int psx_delay_BFC05474 = 0; - int psx_taken_BFC05474 = 0; - int psx_delay_BFC0547C = 0; - int psx_taken_BFC0547C = 0; - int psx_delay_BFC05488 = 0; - int psx_taken_BFC05488 = 0; - int psx_delay_BFC05490 = 0; - int psx_taken_BFC05490 = 0; - int psx_delay_BFC0549C = 0; - int psx_taken_BFC0549C = 0; - int psx_delay_BFC054A4 = 0; - int psx_taken_BFC054A4 = 0; - int psx_delay_BFC054AC = 0; - int psx_taken_BFC054AC = 0; - int psx_delay_BFC054B4 = 0; - int psx_taken_BFC054B4 = 0; - int psx_delay_BFC054C0 = 0; - int psx_taken_BFC054C0 = 0; - int psx_delay_BFC054C8 = 0; - int psx_taken_BFC054C8 = 0; - int psx_delay_BFC054D4 = 0; - int psx_taken_BFC054D4 = 0; - int psx_delay_BFC054DC = 0; - int psx_taken_BFC054DC = 0; - int psx_delay_BFC054E4 = 0; - int psx_taken_BFC054E4 = 0; - int psx_delay_BFC054EC = 0; - int psx_taken_BFC054EC = 0; - int psx_delay_BFC054F4 = 0; - int psx_taken_BFC054F4 = 0; - int psx_delay_BFC054FC = 0; - int psx_taken_BFC054FC = 0; - int psx_delay_BFC05508 = 0; - int psx_taken_BFC05508 = 0; - int psx_delay_BFC05510 = 0; - int psx_taken_BFC05510 = 0; - int psx_delay_BFC0551C = 0; - int psx_taken_BFC0551C = 0; - int psx_delay_BFC05524 = 0; - int psx_taken_BFC05524 = 0; - int psx_delay_BFC0552C = 0; - int psx_taken_BFC0552C = 0; - int psx_delay_BFC05534 = 0; - int psx_taken_BFC05534 = 0; - int psx_delay_BFC05540 = 0; - int psx_taken_BFC05540 = 0; - int psx_delay_BFC05550 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC051ACu: goto label_BFC051AC; - case 0xBFC051B4u: goto label_BFC051B4; - case 0xBFC051BCu: goto label_BFC051BC; - case 0xBFC051C8u: goto label_BFC051C8; - case 0xBFC051D0u: goto label_BFC051D0; - case 0xBFC051D8u: goto label_BFC051D8; - case 0xBFC051F0u: goto label_BFC051F0; - case 0xBFC051F8u: goto label_BFC051F8; - case 0xBFC05200u: goto label_BFC05200; - case 0xBFC05208u: goto label_BFC05208; - case 0xBFC05210u: goto label_BFC05210; - case 0xBFC05214u: goto label_BFC05214; - case 0xBFC05220u: goto label_BFC05220; - case 0xBFC05224u: goto label_BFC05224; - case 0xBFC0523Cu: goto label_BFC0523C; - case 0xBFC05244u: goto label_BFC05244; - case 0xBFC0524Cu: goto label_BFC0524C; - case 0xBFC05254u: goto label_BFC05254; - case 0xBFC0525Cu: goto label_BFC0525C; - case 0xBFC05264u: goto label_BFC05264; - case 0xBFC0526Cu: goto label_BFC0526C; - case 0xBFC05274u: goto label_BFC05274; - case 0xBFC0527Cu: goto label_BFC0527C; - case 0xBFC05284u: goto label_BFC05284; - case 0xBFC0528Cu: goto label_BFC0528C; - case 0xBFC05294u: goto label_BFC05294; - case 0xBFC0529Cu: goto label_BFC0529C; - case 0xBFC052A4u: goto label_BFC052A4; - case 0xBFC052ACu: goto label_BFC052AC; - case 0xBFC052B4u: goto label_BFC052B4; - case 0xBFC052BCu: goto label_BFC052BC; - case 0xBFC052C4u: goto label_BFC052C4; - case 0xBFC052CCu: goto label_BFC052CC; - case 0xBFC052D4u: goto label_BFC052D4; - case 0xBFC052DCu: goto label_BFC052DC; - case 0xBFC052E4u: goto label_BFC052E4; - case 0xBFC052E8u: goto label_BFC052E8; - case 0xBFC052F4u: goto label_BFC052F4; - case 0xBFC052FCu: goto label_BFC052FC; - case 0xBFC05300u: goto label_BFC05300; - case 0xBFC05308u: goto label_BFC05308; - case 0xBFC05310u: goto label_BFC05310; - case 0xBFC05318u: goto label_BFC05318; - case 0xBFC05320u: goto label_BFC05320; - case 0xBFC05328u: goto label_BFC05328; - case 0xBFC05330u: goto label_BFC05330; - case 0xBFC05338u: goto label_BFC05338; - case 0xBFC05340u: goto label_BFC05340; - case 0xBFC05348u: goto label_BFC05348; - case 0xBFC05350u: goto label_BFC05350; - case 0xBFC05358u: goto label_BFC05358; - case 0xBFC05360u: goto label_BFC05360; - case 0xBFC0536Cu: goto label_BFC0536C; - case 0xBFC05374u: goto label_BFC05374; - case 0xBFC05380u: goto label_BFC05380; - case 0xBFC05388u: goto label_BFC05388; - case 0xBFC05394u: goto label_BFC05394; - case 0xBFC0539Cu: goto label_BFC0539C; - case 0xBFC053A4u: goto label_BFC053A4; - case 0xBFC053ACu: goto label_BFC053AC; - case 0xBFC053B8u: goto label_BFC053B8; - case 0xBFC053C0u: goto label_BFC053C0; - case 0xBFC053CCu: goto label_BFC053CC; - case 0xBFC053D4u: goto label_BFC053D4; - case 0xBFC053DCu: goto label_BFC053DC; - case 0xBFC053E4u: goto label_BFC053E4; - case 0xBFC053ECu: goto label_BFC053EC; - case 0xBFC053F4u: goto label_BFC053F4; - case 0xBFC05400u: goto label_BFC05400; - case 0xBFC05408u: goto label_BFC05408; - case 0xBFC05414u: goto label_BFC05414; - case 0xBFC0541Cu: goto label_BFC0541C; - case 0xBFC05424u: goto label_BFC05424; - case 0xBFC0542Cu: goto label_BFC0542C; - case 0xBFC05438u: goto label_BFC05438; - case 0xBFC05440u: goto label_BFC05440; - case 0xBFC0544Cu: goto label_BFC0544C; - case 0xBFC05454u: goto label_BFC05454; - case 0xBFC0545Cu: goto label_BFC0545C; - case 0xBFC05464u: goto label_BFC05464; - case 0xBFC0546Cu: goto label_BFC0546C; - case 0xBFC05474u: goto label_BFC05474; - case 0xBFC0547Cu: goto label_BFC0547C; - case 0xBFC05484u: goto label_BFC05484; - case 0xBFC05490u: goto label_BFC05490; - case 0xBFC05498u: goto label_BFC05498; - case 0xBFC054A4u: goto label_BFC054A4; - case 0xBFC054ACu: goto label_BFC054AC; - case 0xBFC054B4u: goto label_BFC054B4; - case 0xBFC054BCu: goto label_BFC054BC; - case 0xBFC054C8u: goto label_BFC054C8; - case 0xBFC054D0u: goto label_BFC054D0; - case 0xBFC054DCu: goto label_BFC054DC; - case 0xBFC054E4u: goto label_BFC054E4; - case 0xBFC054ECu: goto label_BFC054EC; - case 0xBFC054F4u: goto label_BFC054F4; - case 0xBFC054FCu: goto label_BFC054FC; - case 0xBFC05504u: goto label_BFC05504; - case 0xBFC05510u: goto label_BFC05510; - case 0xBFC05518u: goto label_BFC05518; - case 0xBFC05524u: goto label_BFC05524; - case 0xBFC0552Cu: goto label_BFC0552C; - case 0xBFC05534u: goto label_BFC05534; - case 0xBFC0553Cu: goto label_BFC0553C; - case 0xBFC05548u: goto label_BFC05548; - case 0xBFC0554Cu: goto label_BFC0554C; - default: break; - } - } -label_BFC05194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05194: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05198u); -#endif - /* 0xBFC05198: 8C429154 lw $v0, -28332($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05198u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0519Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0519C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0519Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC051A0: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC051A4: 14410005 bne $v0, $at, 0xBFC051BC */ - uint32_t psx_brA_BFC051A4 = cpu->gpr[2]; uint32_t psx_brB_BFC051A4 = cpu->gpr[1]; - psx_taken_BFC051A4 = (psx_brA_BFC051A4 != psx_brB_BFC051A4); - psx_delay_BFC051A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC051A8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051A8u); return; } g_debug_last_store_pc = 0xBFC051A8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051A8u); -#endif - if (psx_delay_BFC051A4) { - psx_delay_BFC051A4 = 0; - if (psx_taken_BFC051A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051BCu); - goto label_BFC051BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051ACu); - } -label_BFC051AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC051AC: 0FF01714 jal 0xBFC05C50 */ - cpu->gpr[31] = 0xBFC051B4u; /* jal link before delay slot */ - psx_delay_BFC051AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC051B0u); -#endif - if (psx_delay_BFC051AC) { - psx_delay_BFC051AC = 0; - cpu->gpr[31] = 0xBFC051B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C50u); - cpu->pc = 0xBFC05C50u; return; - } -label_BFC051B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051B4: 100000E5 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC051B4 = cpu->gpr[0]; uint32_t psx_brB_BFC051B4 = cpu->gpr[0]; - psx_taken_BFC051B4 = (psx_brA_BFC051B4 == psx_brB_BFC051B4); - psx_delay_BFC051B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051B8u); -#endif - /* 0xBFC051B8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051B8u); -#endif - if (psx_delay_BFC051B4) { - psx_delay_BFC051B4 = 0; - if (psx_taken_BFC051B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051BCu); - } -label_BFC051BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC051BC: 24010011 addiu $at, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24010011u, cpu->gpr[1], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC051C0: 14410005 bne $v0, $at, 0xBFC051D8 */ - uint32_t psx_brA_BFC051C0 = cpu->gpr[2]; uint32_t psx_brB_BFC051C0 = cpu->gpr[1]; - psx_taken_BFC051C0 = (psx_brA_BFC051C0 != psx_brB_BFC051C0); - psx_delay_BFC051C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC051C4u); -#endif - if (psx_delay_BFC051C0) { - psx_delay_BFC051C0 = 0; - if (psx_taken_BFC051C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051D8u); - goto label_BFC051D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051C8u); - } -label_BFC051C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC051C8: 0FF01741 jal 0xBFC05D04 */ - cpu->gpr[31] = 0xBFC051D0u; /* jal link before delay slot */ - psx_delay_BFC051C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC051CCu); -#endif - if (psx_delay_BFC051C8) { - psx_delay_BFC051C8 = 0; - cpu->gpr[31] = 0xBFC051D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D04u); - cpu->pc = 0xBFC05D04u; return; - } -label_BFC051D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051D0: 100000DE beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC051D0 = cpu->gpr[0]; uint32_t psx_brB_BFC051D0 = cpu->gpr[0]; - psx_taken_BFC051D0 = (psx_brA_BFC051D0 == psx_brB_BFC051D0); - psx_delay_BFC051D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051D4u); -#endif - /* 0xBFC051D4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051D4u); -#endif - if (psx_delay_BFC051D0) { - psx_delay_BFC051D0 = 0; - if (psx_taken_BFC051D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051D8u); - } -label_BFC051D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC051D8: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC051D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051DCu); -#endif - /* 0xBFC051DC: 8DCEDF5C lw $t6, -8356($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051DCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDF5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC051E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051E4u); -#endif - /* 0xBFC051E4: 91C40000 lbu $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 4, 0x4000u); - PGXP_LOAD(0x91C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051E8: 10000045 beq $zero, $zero, 0xBFC05300 */ - uint32_t psx_brA_BFC051E8 = cpu->gpr[0]; uint32_t psx_brB_BFC051E8 = cpu->gpr[0]; - psx_taken_BFC051E8 = (psx_brA_BFC051E8 == psx_brB_BFC051E8); - psx_delay_BFC051E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC051EC: 24010019 addiu $at, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24010019u, cpu->gpr[1], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051ECu); -#endif - if (psx_delay_BFC051E8) { - psx_delay_BFC051E8 = 0; - if (psx_taken_BFC051E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05300u); - goto label_BFC05300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051F0u); - } -label_BFC051F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC051F0: 0FF01706 jal 0xBFC05C18 */ - cpu->gpr[31] = 0xBFC051F8u; /* jal link before delay slot */ - psx_delay_BFC051F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC051F4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051F4u); -#endif - if (psx_delay_BFC051F0) { - psx_delay_BFC051F0 = 0; - cpu->gpr[31] = 0xBFC051F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C18u); - cpu->pc = 0xBFC05C18u; return; - } -label_BFC051F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC051F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC051F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC051F8: 100000D4 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC051F8 = cpu->gpr[0]; uint32_t psx_brB_BFC051F8 = cpu->gpr[0]; - psx_taken_BFC051F8 = (psx_brA_BFC051F8 == psx_brB_BFC051F8); - psx_delay_BFC051F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC051FCu); -#endif - /* 0xBFC051FC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC051FCu); -#endif - if (psx_delay_BFC051F8) { - psx_delay_BFC051F8 = 0; - if (psx_taken_BFC051F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05200u); - } -label_BFC05200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05200: 0FF01706 jal 0xBFC05C18 */ - cpu->gpr[31] = 0xBFC05208u; /* jal link before delay slot */ - psx_delay_BFC05200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05204: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05204u); -#endif - if (psx_delay_BFC05200) { - psx_delay_BFC05200 = 0; - cpu->gpr[31] = 0xBFC05208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C18u); - cpu->pc = 0xBFC05C18u; return; - } -label_BFC05208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05208: 100000D0 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05208 = cpu->gpr[0]; uint32_t psx_brB_BFC05208 = cpu->gpr[0]; - psx_taken_BFC05208 = (psx_brA_BFC05208 == psx_brB_BFC05208); - psx_delay_BFC05208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0520Cu); -#endif - /* 0xBFC0520C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0520Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0520Cu); -#endif - if (psx_delay_BFC05208) { - psx_delay_BFC05208 = 0; - if (psx_taken_BFC05208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05210u); - } -label_BFC05210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC05210: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05210u); -#endif -label_BFC05214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05214: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05218: 100000CB beq $zero, $zero, 0xBFC05548 */ - uint32_t psx_brA_BFC05218 = cpu->gpr[0]; uint32_t psx_brB_BFC05218 = cpu->gpr[0]; - psx_taken_BFC05218 = (psx_brA_BFC05218 == psx_brB_BFC05218); - psx_delay_BFC05218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0521Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0521C: AC2F915C sw $t7, -28324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0521Cu); return; } g_debug_last_store_pc = 0xBFC0521Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F915Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0521Cu); -#endif - if (psx_delay_BFC05218) { - psx_delay_BFC05218 = 0; - if (psx_taken_BFC05218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05220u); - } -label_BFC05220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05220: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05220u); -#endif -label_BFC05224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05224: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05228: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0522Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0522C: AC38915C sw $t8, -28324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0522Cu); return; } g_debug_last_store_pc = 0xBFC0522Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38915Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0522Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05230: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05234: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0523Cu; /* jal link before delay slot */ - psx_delay_BFC05234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05238: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05238u); -#endif - if (psx_delay_BFC05234) { - psx_delay_BFC05234 = 0; - cpu->gpr[31] = 0xBFC0523Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0523C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0523Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0523Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0523Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0523C: 100000C3 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0523C = cpu->gpr[0]; uint32_t psx_brB_BFC0523C = cpu->gpr[0]; - psx_taken_BFC0523C = (psx_brA_BFC0523C == psx_brB_BFC0523C); - psx_delay_BFC0523C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05240u); -#endif - /* 0xBFC05240: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05240u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05240u); -#endif - if (psx_delay_BFC0523C) { - psx_delay_BFC0523C = 0; - if (psx_taken_BFC0523C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05244u); - } -label_BFC05244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05244: 0FF0176C jal 0xBFC05DB0 */ - cpu->gpr[31] = 0xBFC0524Cu; /* jal link before delay slot */ - psx_delay_BFC05244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05248u); -#endif - if (psx_delay_BFC05244) { - psx_delay_BFC05244 = 0; - cpu->gpr[31] = 0xBFC0524Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05DB0u); - cpu->pc = 0xBFC05DB0u; return; - } -label_BFC0524C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0524Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0524C: 100000BF beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0524C = cpu->gpr[0]; uint32_t psx_brB_BFC0524C = cpu->gpr[0]; - psx_taken_BFC0524C = (psx_brA_BFC0524C == psx_brB_BFC0524C); - psx_delay_BFC0524C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05250u); -#endif - /* 0xBFC05250: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05250u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05250u); -#endif - if (psx_delay_BFC0524C) { - psx_delay_BFC0524C = 0; - if (psx_taken_BFC0524C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05254u); - } -label_BFC05254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05254: 0FF0177D jal 0xBFC05DF4 */ - cpu->gpr[31] = 0xBFC0525Cu; /* jal link before delay slot */ - psx_delay_BFC05254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05258: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05258u); -#endif - if (psx_delay_BFC05254) { - psx_delay_BFC05254 = 0; - cpu->gpr[31] = 0xBFC0525Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05DF4u); - cpu->pc = 0xBFC05DF4u; return; - } -label_BFC0525C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0525Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0525Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0525Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0525C: 100000BB beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0525C = cpu->gpr[0]; uint32_t psx_brB_BFC0525C = cpu->gpr[0]; - psx_taken_BFC0525C = (psx_brA_BFC0525C == psx_brB_BFC0525C); - psx_delay_BFC0525C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05260u); -#endif - /* 0xBFC05260: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05260u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05260u); -#endif - if (psx_delay_BFC0525C) { - psx_delay_BFC0525C = 0; - if (psx_taken_BFC0525C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05264u); - } -label_BFC05264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05264: 0FF01796 jal 0xBFC05E58 */ - cpu->gpr[31] = 0xBFC0526Cu; /* jal link before delay slot */ - psx_delay_BFC05264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05268u); -#endif - if (psx_delay_BFC05264) { - psx_delay_BFC05264 = 0; - cpu->gpr[31] = 0xBFC0526Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05E58u); - cpu->pc = 0xBFC05E58u; return; - } -label_BFC0526C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0526Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0526Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0526Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0526C: 100000B7 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0526C = cpu->gpr[0]; uint32_t psx_brB_BFC0526C = cpu->gpr[0]; - psx_taken_BFC0526C = (psx_brA_BFC0526C == psx_brB_BFC0526C); - psx_delay_BFC0526C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05270u); -#endif - /* 0xBFC05270: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05270u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05270u); -#endif - if (psx_delay_BFC0526C) { - psx_delay_BFC0526C = 0; - if (psx_taken_BFC0526C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05274u); - } -label_BFC05274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05274: 0FF01875 jal 0xBFC061D4 */ - cpu->gpr[31] = 0xBFC0527Cu; /* jal link before delay slot */ - psx_delay_BFC05274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05278u); -#endif - if (psx_delay_BFC05274) { - psx_delay_BFC05274 = 0; - cpu->gpr[31] = 0xBFC0527Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC061D4u); - cpu->pc = 0xBFC061D4u; return; - } -label_BFC0527C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0527Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0527C: 100000B3 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0527C = cpu->gpr[0]; uint32_t psx_brB_BFC0527C = cpu->gpr[0]; - psx_taken_BFC0527C = (psx_brA_BFC0527C == psx_brB_BFC0527C); - psx_delay_BFC0527C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05280u); -#endif - /* 0xBFC05280: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05280u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05280u); -#endif - if (psx_delay_BFC0527C) { - psx_delay_BFC0527C = 0; - if (psx_taken_BFC0527C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05284u); - } -label_BFC05284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05284: 0FF01857 jal 0xBFC0615C */ - cpu->gpr[31] = 0xBFC0528Cu; /* jal link before delay slot */ - psx_delay_BFC05284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05288u); -#endif - if (psx_delay_BFC05284) { - psx_delay_BFC05284 = 0; - cpu->gpr[31] = 0xBFC0528Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0615Cu); - cpu->pc = 0xBFC0615Cu; return; - } -label_BFC0528C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0528Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0528Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0528Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0528C: 100000AF beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0528C = cpu->gpr[0]; uint32_t psx_brB_BFC0528C = cpu->gpr[0]; - psx_taken_BFC0528C = (psx_brA_BFC0528C == psx_brB_BFC0528C); - psx_delay_BFC0528C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05290u); -#endif - /* 0xBFC05290: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05290u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05290u); -#endif - if (psx_delay_BFC0528C) { - psx_delay_BFC0528C = 0; - if (psx_taken_BFC0528C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05294u); - } -label_BFC05294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05294: 0FF018A2 jal 0xBFC06288 */ - cpu->gpr[31] = 0xBFC0529Cu; /* jal link before delay slot */ - psx_delay_BFC05294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05298: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05298u); -#endif - if (psx_delay_BFC05294) { - psx_delay_BFC05294 = 0; - cpu->gpr[31] = 0xBFC0529Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06288u); - cpu->pc = 0xBFC06288u; return; - } -label_BFC0529C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0529Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0529C: 100000AB beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0529C = cpu->gpr[0]; uint32_t psx_brB_BFC0529C = cpu->gpr[0]; - psx_taken_BFC0529C = (psx_brA_BFC0529C == psx_brB_BFC0529C); - psx_delay_BFC0529C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052A0u); -#endif - /* 0xBFC052A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052A0u); -#endif - if (psx_delay_BFC0529C) { - psx_delay_BFC0529C = 0; - if (psx_taken_BFC0529C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052A4u); - } -label_BFC052A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC052A4: 0FF018F3 jal 0xBFC063CC */ - cpu->gpr[31] = 0xBFC052ACu; /* jal link before delay slot */ - psx_delay_BFC052A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC052A8u); -#endif - if (psx_delay_BFC052A4) { - psx_delay_BFC052A4 = 0; - cpu->gpr[31] = 0xBFC052ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC063CCu); - cpu->pc = 0xBFC063CCu; return; - } -label_BFC052AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052AC: 100000A7 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC052AC = cpu->gpr[0]; uint32_t psx_brB_BFC052AC = cpu->gpr[0]; - psx_taken_BFC052AC = (psx_brA_BFC052AC == psx_brB_BFC052AC); - psx_delay_BFC052AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052B0u); -#endif - /* 0xBFC052B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052B0u); -#endif - if (psx_delay_BFC052AC) { - psx_delay_BFC052AC = 0; - if (psx_taken_BFC052AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052B4u); - } -label_BFC052B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC052B4: 0FF01868 jal 0xBFC061A0 */ - cpu->gpr[31] = 0xBFC052BCu; /* jal link before delay slot */ - psx_delay_BFC052B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC052B8u); -#endif - if (psx_delay_BFC052B4) { - psx_delay_BFC052B4 = 0; - cpu->gpr[31] = 0xBFC052BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC061A0u); - cpu->pc = 0xBFC061A0u; return; - } -label_BFC052BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052BC: 100000A3 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC052BC = cpu->gpr[0]; uint32_t psx_brB_BFC052BC = cpu->gpr[0]; - psx_taken_BFC052BC = (psx_brA_BFC052BC == psx_brB_BFC052BC); - psx_delay_BFC052BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052C0u); -#endif - /* 0xBFC052C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052C0u); -#endif - if (psx_delay_BFC052BC) { - psx_delay_BFC052BC = 0; - if (psx_taken_BFC052BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052C4u); - } -label_BFC052C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC052C4: 0FF018B3 jal 0xBFC062CC */ - cpu->gpr[31] = 0xBFC052CCu; /* jal link before delay slot */ - psx_delay_BFC052C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC052C8u); -#endif - if (psx_delay_BFC052C4) { - psx_delay_BFC052C4 = 0; - cpu->gpr[31] = 0xBFC052CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC062CCu); - cpu->pc = 0xBFC062CCu; return; - } -label_BFC052CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052CC: 1000009F beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC052CC = cpu->gpr[0]; uint32_t psx_brB_BFC052CC = cpu->gpr[0]; - psx_taken_BFC052CC = (psx_brA_BFC052CC == psx_brB_BFC052CC); - psx_delay_BFC052CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052D0u); -#endif - /* 0xBFC052D0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052D0u); -#endif - if (psx_delay_BFC052CC) { - psx_delay_BFC052CC = 0; - if (psx_taken_BFC052CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052D4u); - } -label_BFC052D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC052D4: 0FF01837 jal 0xBFC060DC */ - cpu->gpr[31] = 0xBFC052DCu; /* jal link before delay slot */ - psx_delay_BFC052D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC052D8u); -#endif - if (psx_delay_BFC052D4) { - psx_delay_BFC052D4 = 0; - cpu->gpr[31] = 0xBFC052DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC060DCu); - cpu->pc = 0xBFC060DCu; return; - } -label_BFC052DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052DC: 1000009B beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC052DC = cpu->gpr[0]; uint32_t psx_brB_BFC052DC = cpu->gpr[0]; - psx_taken_BFC052DC = (psx_brA_BFC052DC == psx_brB_BFC052DC); - psx_delay_BFC052DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052E0u); -#endif - /* 0xBFC052E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052E0u); -#endif - if (psx_delay_BFC052DC) { - psx_delay_BFC052DC = 0; - if (psx_taken_BFC052DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052E4u); - } -label_BFC052E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC052E4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC052E4u); -#endif -label_BFC052E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC052E8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC052EC: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC052F4u; /* jal link before delay slot */ - psx_delay_BFC052EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC052F0: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052F0u); -#endif - if (psx_delay_BFC052EC) { - psx_delay_BFC052EC = 0; - cpu->gpr[31] = 0xBFC052F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC052F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC052F4: 10000095 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC052F4 = cpu->gpr[0]; uint32_t psx_brB_BFC052F4 = cpu->gpr[0]; - psx_taken_BFC052F4 = (psx_brA_BFC052F4 == psx_brB_BFC052F4); - psx_delay_BFC052F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052F8u); -#endif - /* 0xBFC052F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052F8u); -#endif - if (psx_delay_BFC052F4) { - psx_delay_BFC052F4 = 0; - if (psx_taken_BFC052F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052FCu); - } -label_BFC052FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC052FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC052FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC052FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC052FC: 24010019 addiu $at, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24010019u, cpu->gpr[1], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC052FCu); -#endif -label_BFC05300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05300: 1041FFF4 beq $v0, $at, 0xBFC052D4 */ - uint32_t psx_brA_BFC05300 = cpu->gpr[2]; uint32_t psx_brB_BFC05300 = cpu->gpr[1]; - psx_taken_BFC05300 = (psx_brA_BFC05300 == psx_brB_BFC05300); - psx_delay_BFC05300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05304: 2841001A slti $at, $v0, 26 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0); - PGXP_ALU(0x2841001Au, cpu->gpr[1], _pgx1, 0x001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05304u); -#endif - if (psx_delay_BFC05300) { - psx_delay_BFC05300 = 0; - if (psx_taken_BFC05300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052D4u); - goto label_BFC052D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05308u); - } -label_BFC05308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05308: 1020004D beq $at, $zero, 0xBFC05440 */ - uint32_t psx_brA_BFC05308 = cpu->gpr[1]; uint32_t psx_brB_BFC05308 = cpu->gpr[0]; - psx_taken_BFC05308 = (psx_brA_BFC05308 == psx_brB_BFC05308); - psx_delay_BFC05308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0530Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0530C: 2401000E addiu $at, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2401000Eu, cpu->gpr[1], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0530Cu); -#endif - if (psx_delay_BFC05308) { - psx_delay_BFC05308 = 0; - if (psx_taken_BFC05308) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05440u); - goto label_BFC05440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05310u); - } -label_BFC05310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05310: 1041FFE8 beq $v0, $at, 0xBFC052B4 */ - uint32_t psx_brA_BFC05310 = cpu->gpr[2]; uint32_t psx_brB_BFC05310 = cpu->gpr[1]; - psx_taken_BFC05310 = (psx_brA_BFC05310 == psx_brB_BFC05310); - psx_delay_BFC05310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05314: 2841000F slti $at, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0); - PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05314u); -#endif - if (psx_delay_BFC05310) { - psx_delay_BFC05310 = 0; - if (psx_taken_BFC05310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052B4u); - goto label_BFC052B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05318u); - } -label_BFC05318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05318: 10200029 beq $at, $zero, 0xBFC053C0 */ - uint32_t psx_brA_BFC05318 = cpu->gpr[1]; uint32_t psx_brB_BFC05318 = cpu->gpr[0]; - psx_taken_BFC05318 = (psx_brA_BFC05318 == psx_brB_BFC05318); - psx_delay_BFC05318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0531Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0531C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0531Cu); -#endif - if (psx_delay_BFC05318) { - psx_delay_BFC05318 = 0; - if (psx_taken_BFC05318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053C0u); - goto label_BFC053C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05320u); - } -label_BFC05320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05320: 10410089 beq $v0, $at, 0xBFC05548 */ - uint32_t psx_brA_BFC05320 = cpu->gpr[2]; uint32_t psx_brB_BFC05320 = cpu->gpr[1]; - psx_taken_BFC05320 = (psx_brA_BFC05320 == psx_brB_BFC05320); - psx_delay_BFC05320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05324: 28410009 slti $at, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0); - PGXP_ALU(0x28410009u, cpu->gpr[1], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05324u); -#endif - if (psx_delay_BFC05320) { - psx_delay_BFC05320 = 0; - if (psx_taken_BFC05320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05328u); - } -label_BFC05328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05328: 10200017 beq $at, $zero, 0xBFC05388 */ - uint32_t psx_brA_BFC05328 = cpu->gpr[1]; uint32_t psx_brB_BFC05328 = cpu->gpr[0]; - psx_taken_BFC05328 = (psx_brA_BFC05328 == psx_brB_BFC05328); - psx_delay_BFC05328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0532Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0532C: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0532Cu); -#endif - if (psx_delay_BFC05328) { - psx_delay_BFC05328 = 0; - if (psx_taken_BFC05328) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05388u); - goto label_BFC05388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05330u); - } -label_BFC05330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05330: 1041FFBB beq $v0, $at, 0xBFC05220 */ - uint32_t psx_brA_BFC05330 = cpu->gpr[2]; uint32_t psx_brB_BFC05330 = cpu->gpr[1]; - psx_taken_BFC05330 = (psx_brA_BFC05330 == psx_brB_BFC05330); - psx_delay_BFC05330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05334: 28410006 slti $at, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0); - PGXP_ALU(0x28410006u, cpu->gpr[1], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05334u); -#endif - if (psx_delay_BFC05330) { - psx_delay_BFC05330 = 0; - if (psx_taken_BFC05330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05220u); - goto label_BFC05220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05338u); - } -label_BFC05338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05338: 1020000E beq $at, $zero, 0xBFC05374 */ - uint32_t psx_brA_BFC05338 = cpu->gpr[1]; uint32_t psx_brB_BFC05338 = cpu->gpr[0]; - psx_taken_BFC05338 = (psx_brA_BFC05338 == psx_brB_BFC05338); - psx_delay_BFC05338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0533Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0533C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0533Cu); -#endif - if (psx_delay_BFC05338) { - psx_delay_BFC05338 = 0; - if (psx_taken_BFC05338) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05374u); - goto label_BFC05374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05340u); - } -label_BFC05340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05340: 1041FFB7 beq $v0, $at, 0xBFC05220 */ - uint32_t psx_brA_BFC05340 = cpu->gpr[2]; uint32_t psx_brB_BFC05340 = cpu->gpr[1]; - psx_taken_BFC05340 = (psx_brA_BFC05340 == psx_brB_BFC05340); - psx_delay_BFC05340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05344: 28410004 slti $at, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0); - PGXP_ALU(0x28410004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05344u); -#endif - if (psx_delay_BFC05340) { - psx_delay_BFC05340 = 0; - if (psx_taken_BFC05340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05220u); - goto label_BFC05220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05348u); - } -label_BFC05348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05348: 10200005 beq $at, $zero, 0xBFC05360 */ - uint32_t psx_brA_BFC05348 = cpu->gpr[1]; uint32_t psx_brB_BFC05348 = cpu->gpr[0]; - psx_taken_BFC05348 = (psx_brA_BFC05348 == psx_brB_BFC05348); - psx_delay_BFC05348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0534C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0534Cu); -#endif - if (psx_delay_BFC05348) { - psx_delay_BFC05348 = 0; - if (psx_taken_BFC05348) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05360u); - goto label_BFC05360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05350u); - } -label_BFC05350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05350: 1041FFBC beq $v0, $at, 0xBFC05244 */ - uint32_t psx_brA_BFC05350 = cpu->gpr[2]; uint32_t psx_brB_BFC05350 = cpu->gpr[1]; - psx_taken_BFC05350 = (psx_brA_BFC05350 == psx_brB_BFC05350); - psx_delay_BFC05350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05354u); -#endif - if (psx_delay_BFC05350) { - psx_delay_BFC05350 = 0; - if (psx_taken_BFC05350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05244u); - goto label_BFC05244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05358u); - } -label_BFC05358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05358: 1000007C beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05358 = cpu->gpr[0]; uint32_t psx_brB_BFC05358 = cpu->gpr[0]; - psx_taken_BFC05358 = (psx_brA_BFC05358 == psx_brB_BFC05358); - psx_delay_BFC05358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0535Cu); -#endif - /* 0xBFC0535C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0535Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0535Cu); -#endif - if (psx_delay_BFC05358) { - psx_delay_BFC05358 = 0; - if (psx_taken_BFC05358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05360u); - } -label_BFC05360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05360: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05364: 1041FFAF beq $v0, $at, 0xBFC05224 */ - uint32_t psx_brA_BFC05364 = cpu->gpr[2]; uint32_t psx_brB_BFC05364 = cpu->gpr[1]; - psx_taken_BFC05364 = (psx_brA_BFC05364 == psx_brB_BFC05364); - psx_delay_BFC05364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05368: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05368u); -#endif - if (psx_delay_BFC05364) { - psx_delay_BFC05364 = 0; - if (psx_taken_BFC05364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05224u); - goto label_BFC05224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0536Cu); - } -label_BFC0536C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0536Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0536Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0536Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0536C: 10000077 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0536C = cpu->gpr[0]; uint32_t psx_brB_BFC0536C = cpu->gpr[0]; - psx_taken_BFC0536C = (psx_brA_BFC0536C == psx_brB_BFC0536C); - psx_delay_BFC0536C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05370u); -#endif - /* 0xBFC05370: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05370u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05370u); -#endif - if (psx_delay_BFC0536C) { - psx_delay_BFC0536C = 0; - if (psx_taken_BFC0536C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05374u); - } -label_BFC05374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05374: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05378: 10410074 beq $v0, $at, 0xBFC0554C */ - uint32_t psx_brA_BFC05378 = cpu->gpr[2]; uint32_t psx_brB_BFC05378 = cpu->gpr[1]; - psx_taken_BFC05378 = (psx_brA_BFC05378 == psx_brB_BFC05378); - psx_delay_BFC05378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0537Cu); -#endif - /* 0xBFC0537C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0537Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0537Cu); -#endif - if (psx_delay_BFC05378) { - psx_delay_BFC05378 = 0; - if (psx_taken_BFC05378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05380u); - } -label_BFC05380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05380: 10000072 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05380 = cpu->gpr[0]; uint32_t psx_brB_BFC05380 = cpu->gpr[0]; - psx_taken_BFC05380 = (psx_brA_BFC05380 == psx_brB_BFC05380); - psx_delay_BFC05380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05384u); -#endif - /* 0xBFC05384: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05384u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05384u); -#endif - if (psx_delay_BFC05380) { - psx_delay_BFC05380 = 0; - if (psx_taken_BFC05380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05388u); - } -label_BFC05388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05388: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0538Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0538C: 1041FFBD beq $v0, $at, 0xBFC05284 */ - uint32_t psx_brA_BFC0538C = cpu->gpr[2]; uint32_t psx_brB_BFC0538C = cpu->gpr[1]; - psx_taken_BFC0538C = (psx_brA_BFC0538C == psx_brB_BFC0538C); - psx_delay_BFC0538C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05390: 2841000C slti $at, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0); - PGXP_ALU(0x2841000Cu, cpu->gpr[1], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05390u); -#endif - if (psx_delay_BFC0538C) { - psx_delay_BFC0538C = 0; - if (psx_taken_BFC0538C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05284u); - goto label_BFC05284; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05394u); - } -label_BFC05394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05394: 10200005 beq $at, $zero, 0xBFC053AC */ - uint32_t psx_brA_BFC05394 = cpu->gpr[1]; uint32_t psx_brB_BFC05394 = cpu->gpr[0]; - psx_taken_BFC05394 = (psx_brA_BFC05394 == psx_brB_BFC05394); - psx_delay_BFC05394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05398: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05398u); -#endif - if (psx_delay_BFC05394) { - psx_delay_BFC05394 = 0; - if (psx_taken_BFC05394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053ACu); - goto label_BFC053AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0539Cu); - } -label_BFC0539C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0539Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0539Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0539Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0539C: 1041006B beq $v0, $at, 0xBFC0554C */ - uint32_t psx_brA_BFC0539C = cpu->gpr[2]; uint32_t psx_brB_BFC0539C = cpu->gpr[1]; - psx_taken_BFC0539C = (psx_brA_BFC0539C == psx_brB_BFC0539C); - psx_delay_BFC0539C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053A0u); -#endif - /* 0xBFC053A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053A0u); -#endif - if (psx_delay_BFC0539C) { - psx_delay_BFC0539C = 0; - if (psx_taken_BFC0539C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053A4u); - } -label_BFC053A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053A4: 10000069 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC053A4 = cpu->gpr[0]; uint32_t psx_brB_BFC053A4 = cpu->gpr[0]; - psx_taken_BFC053A4 = (psx_brA_BFC053A4 == psx_brB_BFC053A4); - psx_delay_BFC053A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053A8u); -#endif - /* 0xBFC053A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053A8u); -#endif - if (psx_delay_BFC053A4) { - psx_delay_BFC053A4 = 0; - if (psx_taken_BFC053A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053ACu); - } -label_BFC053AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053AC: 2401000C addiu $at, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2401000Cu, cpu->gpr[1], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053B0: 1041FFB4 beq $v0, $at, 0xBFC05284 */ - uint32_t psx_brA_BFC053B0 = cpu->gpr[2]; uint32_t psx_brB_BFC053B0 = cpu->gpr[1]; - psx_taken_BFC053B0 = (psx_brA_BFC053B0 == psx_brB_BFC053B0); - psx_delay_BFC053B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC053B4u); -#endif - if (psx_delay_BFC053B0) { - psx_delay_BFC053B0 = 0; - if (psx_taken_BFC053B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05284u); - goto label_BFC05284; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053B8u); - } -label_BFC053B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053B8: 10000064 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC053B8 = cpu->gpr[0]; uint32_t psx_brB_BFC053B8 = cpu->gpr[0]; - psx_taken_BFC053B8 = (psx_brA_BFC053B8 == psx_brB_BFC053B8); - psx_delay_BFC053B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053BCu); -#endif - /* 0xBFC053BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053BCu); -#endif - if (psx_delay_BFC053B8) { - psx_delay_BFC053B8 = 0; - if (psx_taken_BFC053B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053C0u); - } -label_BFC053C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053C0: 24010014 addiu $at, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24010014u, cpu->gpr[1], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053C4: 1041FFB7 beq $v0, $at, 0xBFC052A4 */ - uint32_t psx_brA_BFC053C4 = cpu->gpr[2]; uint32_t psx_brB_BFC053C4 = cpu->gpr[1]; - psx_taken_BFC053C4 = (psx_brA_BFC053C4 == psx_brB_BFC053C4); - psx_delay_BFC053C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053C8: 28410015 slti $at, $v0, 21 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0); - PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053C8u); -#endif - if (psx_delay_BFC053C4) { - psx_delay_BFC053C4 = 0; - if (psx_taken_BFC053C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052A4u); - goto label_BFC052A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053CCu); - } -label_BFC053CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053CC: 1020000E beq $at, $zero, 0xBFC05408 */ - uint32_t psx_brA_BFC053CC = cpu->gpr[1]; uint32_t psx_brB_BFC053CC = cpu->gpr[0]; - psx_taken_BFC053CC = (psx_brA_BFC053CC == psx_brB_BFC053CC); - psx_delay_BFC053CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053D0: 24010012 addiu $at, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24010012u, cpu->gpr[1], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053D0u); -#endif - if (psx_delay_BFC053CC) { - psx_delay_BFC053CC = 0; - if (psx_taken_BFC053CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05408u); - goto label_BFC05408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053D4u); - } -label_BFC053D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053D4: 1041005C beq $v0, $at, 0xBFC05548 */ - uint32_t psx_brA_BFC053D4 = cpu->gpr[2]; uint32_t psx_brB_BFC053D4 = cpu->gpr[1]; - psx_taken_BFC053D4 = (psx_brA_BFC053D4 == psx_brB_BFC053D4); - psx_delay_BFC053D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053D8: 28410013 slti $at, $v0, 19 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0); - PGXP_ALU(0x28410013u, cpu->gpr[1], _pgx1, 0x0013u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053D8u); -#endif - if (psx_delay_BFC053D4) { - psx_delay_BFC053D4 = 0; - if (psx_taken_BFC053D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053DCu); - } -label_BFC053DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053DC: 10200005 beq $at, $zero, 0xBFC053F4 */ - uint32_t psx_brA_BFC053DC = cpu->gpr[1]; uint32_t psx_brB_BFC053DC = cpu->gpr[0]; - psx_taken_BFC053DC = (psx_brA_BFC053DC == psx_brB_BFC053DC); - psx_delay_BFC053DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053E0: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053E0u); -#endif - if (psx_delay_BFC053DC) { - psx_delay_BFC053DC = 0; - if (psx_taken_BFC053DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053F4u); - goto label_BFC053F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053E4u); - } -label_BFC053E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053E4: 1041FF9B beq $v0, $at, 0xBFC05254 */ - uint32_t psx_brA_BFC053E4 = cpu->gpr[2]; uint32_t psx_brB_BFC053E4 = cpu->gpr[1]; - psx_taken_BFC053E4 = (psx_brA_BFC053E4 == psx_brB_BFC053E4); - psx_delay_BFC053E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC053E8u); -#endif - if (psx_delay_BFC053E4) { - psx_delay_BFC053E4 = 0; - if (psx_taken_BFC053E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05254u); - goto label_BFC05254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053ECu); - } -label_BFC053EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053EC: 10000057 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC053EC = cpu->gpr[0]; uint32_t psx_brB_BFC053EC = cpu->gpr[0]; - psx_taken_BFC053EC = (psx_brA_BFC053EC == psx_brB_BFC053EC); - psx_delay_BFC053EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053F0u); -#endif - /* 0xBFC053F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053F0u); -#endif - if (psx_delay_BFC053EC) { - psx_delay_BFC053EC = 0; - if (psx_taken_BFC053EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC053F4u); - } -label_BFC053F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC053F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC053F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC053F4: 24010013 addiu $at, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24010013u, cpu->gpr[1], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC053F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC053F8: 1041FFB2 beq $v0, $at, 0xBFC052C4 */ - uint32_t psx_brA_BFC053F8 = cpu->gpr[2]; uint32_t psx_brB_BFC053F8 = cpu->gpr[1]; - psx_taken_BFC053F8 = (psx_brA_BFC053F8 == psx_brB_BFC053F8); - psx_delay_BFC053F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC053FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC053FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC053FCu); -#endif - if (psx_delay_BFC053F8) { - psx_delay_BFC053F8 = 0; - if (psx_taken_BFC053F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052C4u); - goto label_BFC052C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05400u); - } -label_BFC05400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05400: 10000052 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05400 = cpu->gpr[0]; uint32_t psx_brB_BFC05400 = cpu->gpr[0]; - psx_taken_BFC05400 = (psx_brA_BFC05400 == psx_brB_BFC05400); - psx_delay_BFC05400 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05404u); -#endif - /* 0xBFC05404: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05404u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05404u); -#endif - if (psx_delay_BFC05400) { - psx_delay_BFC05400 = 0; - if (psx_taken_BFC05400) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05408u); - } -label_BFC05408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05408: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0540Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0540C: 1041004E beq $v0, $at, 0xBFC05548 */ - uint32_t psx_brA_BFC0540C = cpu->gpr[2]; uint32_t psx_brB_BFC0540C = cpu->gpr[1]; - psx_taken_BFC0540C = (psx_brA_BFC0540C == psx_brB_BFC0540C); - psx_delay_BFC0540C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05410: 28410017 slti $at, $v0, 23 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0); - PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05410u); -#endif - if (psx_delay_BFC0540C) { - psx_delay_BFC0540C = 0; - if (psx_taken_BFC0540C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05414u); - } -label_BFC05414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05414: 10200005 beq $at, $zero, 0xBFC0542C */ - uint32_t psx_brA_BFC05414 = cpu->gpr[1]; uint32_t psx_brB_BFC05414 = cpu->gpr[0]; - psx_taken_BFC05414 = (psx_brA_BFC05414 == psx_brB_BFC05414); - psx_delay_BFC05414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05418: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05418u); -#endif - if (psx_delay_BFC05414) { - psx_delay_BFC05414 = 0; - if (psx_taken_BFC05414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0542Cu); - goto label_BFC0542C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0541Cu); - } -label_BFC0541C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0541Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0541C: 1041004B beq $v0, $at, 0xBFC0554C */ - uint32_t psx_brA_BFC0541C = cpu->gpr[2]; uint32_t psx_brB_BFC0541C = cpu->gpr[1]; - psx_taken_BFC0541C = (psx_brA_BFC0541C == psx_brB_BFC0541C); - psx_delay_BFC0541C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05420u); -#endif - /* 0xBFC05420: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05420u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05420u); -#endif - if (psx_delay_BFC0541C) { - psx_delay_BFC0541C = 0; - if (psx_taken_BFC0541C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05424u); - } -label_BFC05424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05424: 10000049 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05424 = cpu->gpr[0]; uint32_t psx_brB_BFC05424 = cpu->gpr[0]; - psx_taken_BFC05424 = (psx_brA_BFC05424 == psx_brB_BFC05424); - psx_delay_BFC05424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05428u); -#endif - /* 0xBFC05428: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05428u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05428u); -#endif - if (psx_delay_BFC05424) { - psx_delay_BFC05424 = 0; - if (psx_taken_BFC05424) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0542Cu); - } -label_BFC0542C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0542Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0542C: 24010017 addiu $at, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24010017u, cpu->gpr[1], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05430: 1041FFA0 beq $v0, $at, 0xBFC052B4 */ - uint32_t psx_brA_BFC05430 = cpu->gpr[2]; uint32_t psx_brB_BFC05430 = cpu->gpr[1]; - psx_taken_BFC05430 = (psx_brA_BFC05430 == psx_brB_BFC05430); - psx_delay_BFC05430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05434: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05434u); -#endif - if (psx_delay_BFC05430) { - psx_delay_BFC05430 = 0; - if (psx_taken_BFC05430) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052B4u); - goto label_BFC052B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05438u); - } -label_BFC05438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05438: 10000044 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05438 = cpu->gpr[0]; uint32_t psx_brB_BFC05438 = cpu->gpr[0]; - psx_taken_BFC05438 = (psx_brA_BFC05438 == psx_brB_BFC05438); - psx_delay_BFC05438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0543Cu); -#endif - /* 0xBFC0543C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0543Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0543Cu); -#endif - if (psx_delay_BFC05438) { - psx_delay_BFC05438 = 0; - if (psx_taken_BFC05438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05440u); - } -label_BFC05440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05440: 240100F6 addiu $at, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240100F6u, cpu->gpr[1], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05444: 1041FF72 beq $v0, $at, 0xBFC05210 */ - uint32_t psx_brA_BFC05444 = cpu->gpr[2]; uint32_t psx_brB_BFC05444 = cpu->gpr[1]; - psx_taken_BFC05444 = (psx_brA_BFC05444 == psx_brB_BFC05444); - psx_delay_BFC05444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05448: 284100F7 slti $at, $v0, 247 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0); - PGXP_ALU(0x284100F7u, cpu->gpr[1], _pgx1, 0x00F7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05448u); -#endif - if (psx_delay_BFC05444) { - psx_delay_BFC05444 = 0; - if (psx_taken_BFC05444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05210u); - goto label_BFC05210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0544Cu); - } -label_BFC0544C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0544Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0544Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0544Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0544C: 10200020 beq $at, $zero, 0xBFC054D0 */ - uint32_t psx_brA_BFC0544C = cpu->gpr[1]; uint32_t psx_brB_BFC0544C = cpu->gpr[0]; - psx_taken_BFC0544C = (psx_brA_BFC0544C == psx_brB_BFC0544C); - psx_delay_BFC0544C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05450: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05450u); -#endif - if (psx_delay_BFC0544C) { - psx_delay_BFC0544C = 0; - if (psx_taken_BFC0544C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054D0u); - goto label_BFC054D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05454u); - } -label_BFC05454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05454: 1041FF6E beq $v0, $at, 0xBFC05210 */ - uint32_t psx_brA_BFC05454 = cpu->gpr[2]; uint32_t psx_brB_BFC05454 = cpu->gpr[1]; - psx_taken_BFC05454 = (psx_brA_BFC05454 == psx_brB_BFC05454); - psx_delay_BFC05454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05458: 284100E7 slti $at, $v0, 231 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0); - PGXP_ALU(0x284100E7u, cpu->gpr[1], _pgx1, 0x00E7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05458u); -#endif - if (psx_delay_BFC05454) { - psx_delay_BFC05454 = 0; - if (psx_taken_BFC05454) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05210u); - goto label_BFC05210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0545Cu); - } -label_BFC0545C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0545Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0545Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0545Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0545C: 1020000E beq $at, $zero, 0xBFC05498 */ - uint32_t psx_brA_BFC0545C = cpu->gpr[1]; uint32_t psx_brB_BFC0545C = cpu->gpr[0]; - psx_taken_BFC0545C = (psx_brA_BFC0545C == psx_brB_BFC0545C); - psx_delay_BFC0545C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05460: 24010050 addiu $at, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24010050u, cpu->gpr[1], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05460u); -#endif - if (psx_delay_BFC0545C) { - psx_delay_BFC0545C = 0; - if (psx_taken_BFC0545C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05498u); - goto label_BFC05498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05464u); - } -label_BFC05464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05464: 1041FF83 beq $v0, $at, 0xBFC05274 */ - uint32_t psx_brA_BFC05464 = cpu->gpr[2]; uint32_t psx_brB_BFC05464 = cpu->gpr[1]; - psx_taken_BFC05464 = (psx_brA_BFC05464 == psx_brB_BFC05464); - psx_delay_BFC05464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05468: 28410051 slti $at, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28410051u, cpu->gpr[1], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05468u); -#endif - if (psx_delay_BFC05464) { - psx_delay_BFC05464 = 0; - if (psx_taken_BFC05464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05274u); - goto label_BFC05274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0546Cu); - } -label_BFC0546C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0546Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0546Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0546Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0546C: 10200005 beq $at, $zero, 0xBFC05484 */ - uint32_t psx_brA_BFC0546C = cpu->gpr[1]; uint32_t psx_brB_BFC0546C = cpu->gpr[0]; - psx_taken_BFC0546C = (psx_brA_BFC0546C == psx_brB_BFC0546C); - psx_delay_BFC0546C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05470: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05470u); -#endif - if (psx_delay_BFC0546C) { - psx_delay_BFC0546C = 0; - if (psx_taken_BFC0546C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05484u); - goto label_BFC05484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05474u); - } -label_BFC05474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05474: 10410035 beq $v0, $at, 0xBFC0554C */ - uint32_t psx_brA_BFC05474 = cpu->gpr[2]; uint32_t psx_brB_BFC05474 = cpu->gpr[1]; - psx_taken_BFC05474 = (psx_brA_BFC05474 == psx_brB_BFC05474); - psx_delay_BFC05474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05478u); -#endif - /* 0xBFC05478: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05478u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05478u); -#endif - if (psx_delay_BFC05474) { - psx_delay_BFC05474 = 0; - if (psx_taken_BFC05474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0547Cu); - } -label_BFC0547C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0547Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0547Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0547Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0547C: 10000033 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC0547C = cpu->gpr[0]; uint32_t psx_brB_BFC0547C = cpu->gpr[0]; - psx_taken_BFC0547C = (psx_brA_BFC0547C == psx_brB_BFC0547C); - psx_delay_BFC0547C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05480u); -#endif - /* 0xBFC05480: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05480u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05480u); -#endif - if (psx_delay_BFC0547C) { - psx_delay_BFC0547C = 0; - if (psx_taken_BFC0547C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05484u); - } -label_BFC05484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05484: 240100E2 addiu $at, $zero, 226 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (226)); - PGXP_ALU(0x240100E2u, cpu->gpr[1], _pgx1, 0x000000E2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05488: 1041FF5D beq $v0, $at, 0xBFC05200 */ - uint32_t psx_brA_BFC05488 = cpu->gpr[2]; uint32_t psx_brB_BFC05488 = cpu->gpr[1]; - psx_taken_BFC05488 = (psx_brA_BFC05488 == psx_brB_BFC05488); - psx_delay_BFC05488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0548Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0548C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0548Cu); -#endif - if (psx_delay_BFC05488) { - psx_delay_BFC05488 = 0; - if (psx_taken_BFC05488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05200u); - goto label_BFC05200; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05490u); - } -label_BFC05490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05490: 1000002E beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05490 = cpu->gpr[0]; uint32_t psx_brB_BFC05490 = cpu->gpr[0]; - psx_taken_BFC05490 = (psx_brA_BFC05490 == psx_brB_BFC05490); - psx_delay_BFC05490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05494u); -#endif - /* 0xBFC05494: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05494u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05494u); -#endif - if (psx_delay_BFC05490) { - psx_delay_BFC05490 = 0; - if (psx_taken_BFC05490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05498u); - } -label_BFC05498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05498: 240100EE addiu $at, $zero, 238 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (238)); - PGXP_ALU(0x240100EEu, cpu->gpr[1], _pgx1, 0x000000EEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0549Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0549C: 1041FF71 beq $v0, $at, 0xBFC05264 */ - uint32_t psx_brA_BFC0549C = cpu->gpr[2]; uint32_t psx_brB_BFC0549C = cpu->gpr[1]; - psx_taken_BFC0549C = (psx_brA_BFC0549C == psx_brB_BFC0549C); - psx_delay_BFC0549C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054A0: 284100EF slti $at, $v0, 239 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0); - PGXP_ALU(0x284100EFu, cpu->gpr[1], _pgx1, 0x00EFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054A0u); -#endif - if (psx_delay_BFC0549C) { - psx_delay_BFC0549C = 0; - if (psx_taken_BFC0549C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05264u); - goto label_BFC05264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054A4u); - } -label_BFC054A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054A4: 10200005 beq $at, $zero, 0xBFC054BC */ - uint32_t psx_brA_BFC054A4 = cpu->gpr[1]; uint32_t psx_brB_BFC054A4 = cpu->gpr[0]; - psx_taken_BFC054A4 = (psx_brA_BFC054A4 == psx_brB_BFC054A4); - psx_delay_BFC054A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054A8: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054A8u); -#endif - if (psx_delay_BFC054A4) { - psx_delay_BFC054A4 = 0; - if (psx_taken_BFC054A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054BCu); - goto label_BFC054BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054ACu); - } -label_BFC054AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054AC: 1041FF59 beq $v0, $at, 0xBFC05214 */ - uint32_t psx_brA_BFC054AC = cpu->gpr[2]; uint32_t psx_brB_BFC054AC = cpu->gpr[1]; - psx_taken_BFC054AC = (psx_brA_BFC054AC == psx_brB_BFC054AC); - psx_delay_BFC054AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC054B0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054B0u); -#endif - if (psx_delay_BFC054AC) { - psx_delay_BFC054AC = 0; - if (psx_taken_BFC054AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05214u); - goto label_BFC05214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054B4u); - } -label_BFC054B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC054B4: 10000025 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC054B4 = cpu->gpr[0]; uint32_t psx_brB_BFC054B4 = cpu->gpr[0]; - psx_taken_BFC054B4 = (psx_brA_BFC054B4 == psx_brB_BFC054B4); - psx_delay_BFC054B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054B8u); -#endif - /* 0xBFC054B8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC054B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054B8u); -#endif - if (psx_delay_BFC054B4) { - psx_delay_BFC054B4 = 0; - if (psx_taken_BFC054B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054BCu); - } -label_BFC054BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054BC: 240100F2 addiu $at, $zero, 242 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); - PGXP_ALU(0x240100F2u, cpu->gpr[1], _pgx1, 0x000000F2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054C0: 1041FF4B beq $v0, $at, 0xBFC051F0 */ - uint32_t psx_brA_BFC054C0 = cpu->gpr[2]; uint32_t psx_brB_BFC054C0 = cpu->gpr[1]; - psx_taken_BFC054C0 = (psx_brA_BFC054C0 == psx_brB_BFC054C0); - psx_delay_BFC054C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC054C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC054C4u); -#endif - if (psx_delay_BFC054C0) { - psx_delay_BFC054C0 = 0; - if (psx_taken_BFC054C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC051F0u); - goto label_BFC051F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054C8u); - } -label_BFC054C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC054C8: 10000020 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC054C8 = cpu->gpr[0]; uint32_t psx_brB_BFC054C8 = cpu->gpr[0]; - psx_taken_BFC054C8 = (psx_brA_BFC054C8 == psx_brB_BFC054C8); - psx_delay_BFC054C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054CCu); -#endif - /* 0xBFC054CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC054CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054CCu); -#endif - if (psx_delay_BFC054C8) { - psx_delay_BFC054C8 = 0; - if (psx_taken_BFC054C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054D0u); - } -label_BFC054D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054D0: 24010DDD addiu $at, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24010DDDu, cpu->gpr[1], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054D4: 1041001C beq $v0, $at, 0xBFC05548 */ - uint32_t psx_brA_BFC054D4 = cpu->gpr[2]; uint32_t psx_brB_BFC054D4 = cpu->gpr[1]; - psx_taken_BFC054D4 = (psx_brA_BFC054D4 == psx_brB_BFC054D4); - psx_delay_BFC054D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054D8: 28410DDE slti $at, $v0, 3550 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0); - PGXP_ALU(0x28410DDEu, cpu->gpr[1], _pgx1, 0x0DDEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054D8u); -#endif - if (psx_delay_BFC054D4) { - psx_delay_BFC054D4 = 0; - if (psx_taken_BFC054D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054DCu); - } -label_BFC054DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054DC: 1020000E beq $at, $zero, 0xBFC05518 */ - uint32_t psx_brA_BFC054DC = cpu->gpr[1]; uint32_t psx_brB_BFC054DC = cpu->gpr[0]; - psx_taken_BFC054DC = (psx_brA_BFC054DC == psx_brB_BFC054DC); - psx_delay_BFC054DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054E0: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054E0u); -#endif - if (psx_delay_BFC054DC) { - psx_delay_BFC054DC = 0; - if (psx_taken_BFC054DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05518u); - goto label_BFC05518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054E4u); - } -label_BFC054E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054E4: 1041FF5F beq $v0, $at, 0xBFC05264 */ - uint32_t psx_brA_BFC054E4 = cpu->gpr[2]; uint32_t psx_brB_BFC054E4 = cpu->gpr[1]; - psx_taken_BFC054E4 = (psx_brA_BFC054E4 == psx_brB_BFC054E4); - psx_delay_BFC054E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054E8: 284100FF slti $at, $v0, 255 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0); - PGXP_ALU(0x284100FFu, cpu->gpr[1], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054E8u); -#endif - if (psx_delay_BFC054E4) { - psx_delay_BFC054E4 = 0; - if (psx_taken_BFC054E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05264u); - goto label_BFC05264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054ECu); - } -label_BFC054EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054EC: 10200005 beq $at, $zero, 0xBFC05504 */ - uint32_t psx_brA_BFC054EC = cpu->gpr[1]; uint32_t psx_brB_BFC054EC = cpu->gpr[0]; - psx_taken_BFC054EC = (psx_brA_BFC054EC == psx_brB_BFC054EC); - psx_delay_BFC054EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC054F0: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054F0u); -#endif - if (psx_delay_BFC054EC) { - psx_delay_BFC054EC = 0; - if (psx_taken_BFC054EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05504u); - goto label_BFC05504; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054F4u); - } -label_BFC054F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC054F4: 1041FF47 beq $v0, $at, 0xBFC05214 */ - uint32_t psx_brA_BFC054F4 = cpu->gpr[2]; uint32_t psx_brB_BFC054F4 = cpu->gpr[1]; - psx_taken_BFC054F4 = (psx_brA_BFC054F4 == psx_brB_BFC054F4); - psx_delay_BFC054F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC054F8: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC054F8u); -#endif - if (psx_delay_BFC054F4) { - psx_delay_BFC054F4 = 0; - if (psx_taken_BFC054F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05214u); - goto label_BFC05214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC054FCu); - } -label_BFC054FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC054FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC054FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC054FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC054FC: 10000013 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC054FC = cpu->gpr[0]; uint32_t psx_brB_BFC054FC = cpu->gpr[0]; - psx_taken_BFC054FC = (psx_brA_BFC054FC == psx_brB_BFC054FC); - psx_delay_BFC054FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05500u); -#endif - /* 0xBFC05500: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05500u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05500u); -#endif - if (psx_delay_BFC054FC) { - psx_delay_BFC054FC = 0; - if (psx_taken_BFC054FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05504u); - } -label_BFC05504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05504: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05508: 10410010 beq $v0, $at, 0xBFC0554C */ - uint32_t psx_brA_BFC05508 = cpu->gpr[2]; uint32_t psx_brB_BFC05508 = cpu->gpr[1]; - psx_taken_BFC05508 = (psx_brA_BFC05508 == psx_brB_BFC05508); - psx_delay_BFC05508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0550Cu); -#endif - /* 0xBFC0550C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0550Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0550Cu); -#endif - if (psx_delay_BFC05508) { - psx_delay_BFC05508 = 0; - if (psx_taken_BFC05508) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05510u); - } -label_BFC05510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05510: 1000000E beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05510 = cpu->gpr[0]; uint32_t psx_brB_BFC05510 = cpu->gpr[0]; - psx_taken_BFC05510 = (psx_brA_BFC05510 == psx_brB_BFC05510); - psx_delay_BFC05510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05514u); -#endif - /* 0xBFC05514: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05514u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05514u); -#endif - if (psx_delay_BFC05510) { - psx_delay_BFC05510 = 0; - if (psx_taken_BFC05510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05518u); - } -label_BFC05518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05518: 24010FFF addiu $at, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x24010FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0551Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0551C: 1041000A beq $v0, $at, 0xBFC05548 */ - uint32_t psx_brA_BFC0551C = cpu->gpr[2]; uint32_t psx_brB_BFC0551C = cpu->gpr[1]; - psx_taken_BFC0551C = (psx_brA_BFC0551C == psx_brB_BFC0551C); - psx_delay_BFC0551C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05520: 28411000 slti $at, $v0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0); - PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05520u); -#endif - if (psx_delay_BFC0551C) { - psx_delay_BFC0551C = 0; - if (psx_taken_BFC0551C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - goto label_BFC05548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05524u); - } -label_BFC05524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05524: 10200005 beq $at, $zero, 0xBFC0553C */ - uint32_t psx_brA_BFC05524 = cpu->gpr[1]; uint32_t psx_brB_BFC05524 = cpu->gpr[0]; - psx_taken_BFC05524 = (psx_brA_BFC05524 == psx_brB_BFC05524); - psx_delay_BFC05524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05528: 24010F14 addiu $at, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x24010F14u, cpu->gpr[1], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05528u); -#endif - if (psx_delay_BFC05524) { - psx_delay_BFC05524 = 0; - if (psx_taken_BFC05524) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0553Cu); - goto label_BFC0553C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0552Cu); - } -label_BFC0552C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0552Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0552Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0552Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0552C: 1041FF59 beq $v0, $at, 0xBFC05294 */ - uint32_t psx_brA_BFC0552C = cpu->gpr[2]; uint32_t psx_brB_BFC0552C = cpu->gpr[1]; - psx_taken_BFC0552C = (psx_brA_BFC0552C == psx_brB_BFC0552C); - psx_delay_BFC0552C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05530u); -#endif - if (psx_delay_BFC0552C) { - psx_delay_BFC0552C = 0; - if (psx_taken_BFC0552C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05294u); - goto label_BFC05294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05534u); - } -label_BFC05534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05534: 10000005 beq $zero, $zero, 0xBFC0554C */ - uint32_t psx_brA_BFC05534 = cpu->gpr[0]; uint32_t psx_brB_BFC05534 = cpu->gpr[0]; - psx_taken_BFC05534 = (psx_brA_BFC05534 == psx_brB_BFC05534); - psx_delay_BFC05534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05538u); -#endif - /* 0xBFC05538: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05538u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05538u); -#endif - if (psx_delay_BFC05534) { - psx_delay_BFC05534 = 0; - if (psx_taken_BFC05534) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0554Cu); - goto label_BFC0554C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0553Cu); - } -label_BFC0553C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0553Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0553C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05540: 1041FF69 beq $v0, $at, 0xBFC052E8 */ - uint32_t psx_brA_BFC05540 = cpu->gpr[2]; uint32_t psx_brB_BFC05540 = cpu->gpr[1]; - psx_taken_BFC05540 = (psx_brA_BFC05540 == psx_brB_BFC05540); - psx_delay_BFC05540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05544: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05544u); -#endif - if (psx_delay_BFC05540) { - psx_delay_BFC05540 = 0; - if (psx_taken_BFC05540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC052E8u); - goto label_BFC052E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05548u); - } -label_BFC05548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05548u); -#endif - /* 0xBFC05548: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05548u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05548u); -#endif -label_BFC0554C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0554Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0554C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05550: 03E00008 jr $ra */ - psx_delay_BFC05550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05554u); -#endif - if (psx_delay_BFC05550) { - psx_delay_BFC05550 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05558(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05558u); - int psx_delay_BFC05578 = 0; - int psx_taken_BFC05578 = 0; - int psx_delay_BFC05580 = 0; - int psx_delay_BFC05588 = 0; - int psx_taken_BFC05588 = 0; - int psx_delay_BFC0559C = 0; - int psx_taken_BFC0559C = 0; - int psx_delay_BFC055A4 = 0; - int psx_taken_BFC055A4 = 0; - int psx_delay_BFC055AC = 0; - int psx_taken_BFC055AC = 0; - int psx_delay_BFC055B8 = 0; - int psx_taken_BFC055B8 = 0; - int psx_delay_BFC055C0 = 0; - int psx_taken_BFC055C0 = 0; - int psx_delay_BFC055E8 = 0; - int psx_delay_BFC055F0 = 0; - int psx_taken_BFC055F0 = 0; - int psx_delay_BFC0560C = 0; - int psx_delay_BFC05614 = 0; - int psx_taken_BFC05614 = 0; - int psx_delay_BFC05638 = 0; - int psx_delay_BFC05640 = 0; - int psx_taken_BFC05640 = 0; - int psx_delay_BFC0565C = 0; - int psx_taken_BFC0565C = 0; - int psx_delay_BFC0569C = 0; - int psx_taken_BFC0569C = 0; - int psx_delay_BFC056B8 = 0; - int psx_delay_BFC056C0 = 0; - int psx_taken_BFC056C0 = 0; - int psx_delay_BFC056D0 = 0; - int psx_delay_BFC056D8 = 0; - int psx_taken_BFC056D8 = 0; - int psx_delay_BFC056E4 = 0; - int psx_taken_BFC056E4 = 0; - int psx_delay_BFC056EC = 0; - int psx_taken_BFC056EC = 0; - int psx_delay_BFC056F4 = 0; - int psx_taken_BFC056F4 = 0; - int psx_delay_BFC056FC = 0; - int psx_taken_BFC056FC = 0; - int psx_delay_BFC05704 = 0; - int psx_taken_BFC05704 = 0; - int psx_delay_BFC0570C = 0; - int psx_taken_BFC0570C = 0; - int psx_delay_BFC05714 = 0; - int psx_taken_BFC05714 = 0; - int psx_delay_BFC0571C = 0; - int psx_taken_BFC0571C = 0; - int psx_delay_BFC05728 = 0; - int psx_taken_BFC05728 = 0; - int psx_delay_BFC05744 = 0; - int psx_delay_BFC0574C = 0; - int psx_taken_BFC0574C = 0; - int psx_delay_BFC05758 = 0; - int psx_taken_BFC05758 = 0; - int psx_delay_BFC05760 = 0; - int psx_taken_BFC05760 = 0; - int psx_delay_BFC0576C = 0; - int psx_taken_BFC0576C = 0; - int psx_delay_BFC05774 = 0; - int psx_taken_BFC05774 = 0; - int psx_delay_BFC0577C = 0; - int psx_taken_BFC0577C = 0; - int psx_delay_BFC05784 = 0; - int psx_taken_BFC05784 = 0; - int psx_delay_BFC05790 = 0; - int psx_taken_BFC05790 = 0; - int psx_delay_BFC05798 = 0; - int psx_taken_BFC05798 = 0; - int psx_delay_BFC057A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05580u: goto label_BFC05580; - case 0xBFC05588u: goto label_BFC05588; - case 0xBFC05590u: goto label_BFC05590; - case 0xBFC055A4u: goto label_BFC055A4; - case 0xBFC055ACu: goto label_BFC055AC; - case 0xBFC055B4u: goto label_BFC055B4; - case 0xBFC055C0u: goto label_BFC055C0; - case 0xBFC055C8u: goto label_BFC055C8; - case 0xBFC055D8u: goto label_BFC055D8; - case 0xBFC055F0u: goto label_BFC055F0; - case 0xBFC055F8u: goto label_BFC055F8; - case 0xBFC05614u: goto label_BFC05614; - case 0xBFC0561Cu: goto label_BFC0561C; - case 0xBFC05640u: goto label_BFC05640; - case 0xBFC05648u: goto label_BFC05648; - case 0xBFC05664u: goto label_BFC05664; - case 0xBFC05674u: goto label_BFC05674; - case 0xBFC056A4u: goto label_BFC056A4; - case 0xBFC056C0u: goto label_BFC056C0; - case 0xBFC056C8u: goto label_BFC056C8; - case 0xBFC056CCu: goto label_BFC056CC; - case 0xBFC056D8u: goto label_BFC056D8; - case 0xBFC056E0u: goto label_BFC056E0; - case 0xBFC056E4u: goto label_BFC056E4; - case 0xBFC056ECu: goto label_BFC056EC; - case 0xBFC056F4u: goto label_BFC056F4; - case 0xBFC056FCu: goto label_BFC056FC; - case 0xBFC05704u: goto label_BFC05704; - case 0xBFC0570Cu: goto label_BFC0570C; - case 0xBFC05714u: goto label_BFC05714; - case 0xBFC0571Cu: goto label_BFC0571C; - case 0xBFC05724u: goto label_BFC05724; - case 0xBFC05730u: goto label_BFC05730; - case 0xBFC05734u: goto label_BFC05734; - case 0xBFC0574Cu: goto label_BFC0574C; - case 0xBFC05754u: goto label_BFC05754; - case 0xBFC05760u: goto label_BFC05760; - case 0xBFC05768u: goto label_BFC05768; - case 0xBFC05774u: goto label_BFC05774; - case 0xBFC0577Cu: goto label_BFC0577C; - case 0xBFC05784u: goto label_BFC05784; - case 0xBFC0578Cu: goto label_BFC0578C; - case 0xBFC05798u: goto label_BFC05798; - case 0xBFC057A0u: goto label_BFC057A0; - case 0xBFC057A4u: goto label_BFC057A4; - default: break; - } - } -label_BFC05558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC05558: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0555Cu); -#endif - /* 0xBFC0555C: 8CA5DF5C lw $a1, -8356($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0555Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5DF5Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0555Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05560: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05564: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05568u); -#endif - /* 0xBFC05568: 8C429154 lw $v0, -28332($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05568u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0556C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0556Cu); return; } g_debug_last_store_pc = 0xBFC0556Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05570: 24010012 addiu $at, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24010012u, cpu->gpr[1], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05574u); -#endif - /* 0xBFC05574: 90A00000 lbu $zero, 0($a1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 0, 0x20u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05578: 1441005A bne $v0, $at, 0xBFC056E4 */ - uint32_t psx_brA_BFC05578 = cpu->gpr[2]; uint32_t psx_brB_BFC05578 = cpu->gpr[1]; - psx_taken_BFC05578 = (psx_brA_BFC05578 != psx_brB_BFC05578); - psx_delay_BFC05578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0557Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0557C: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0557Cu); -#endif - if (psx_delay_BFC05578) { - psx_delay_BFC05578 = 0; - if (psx_taken_BFC05578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056E4u); - goto label_BFC056E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05580u); - } -label_BFC05580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05580: 0FF01886 jal 0xBFC06218 */ - cpu->gpr[31] = 0xBFC05588u; /* jal link before delay slot */ - psx_delay_BFC05580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05584: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05584u); -#endif - if (psx_delay_BFC05580) { - psx_delay_BFC05580 = 0; - cpu->gpr[31] = 0xBFC05588u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06218u); - cpu->pc = 0xBFC06218u; return; - } -label_BFC05588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05588: 10000086 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC05588 = cpu->gpr[0]; uint32_t psx_brB_BFC05588 = cpu->gpr[0]; - psx_taken_BFC05588 = (psx_brA_BFC05588 == psx_brB_BFC05588); - psx_delay_BFC05588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0558Cu); -#endif - /* 0xBFC0558C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0558Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0558Cu); -#endif - if (psx_delay_BFC05588) { - psx_delay_BFC05588 = 0; - if (psx_taken_BFC05588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05590u); - } -label_BFC05590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05590: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05594u); -#endif - /* 0xBFC05594: 8C429158 lw $v0, -28328($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05594u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429158u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05598: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0559C: 1041000A beq $v0, $at, 0xBFC055C8 */ - uint32_t psx_brA_BFC0559C = cpu->gpr[2]; uint32_t psx_brB_BFC0559C = cpu->gpr[1]; - psx_taken_BFC0559C = (psx_brA_BFC0559C == psx_brB_BFC0559C); - psx_delay_BFC0559C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC055A0: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055A0u); -#endif - if (psx_delay_BFC0559C) { - psx_delay_BFC0559C = 0; - if (psx_taken_BFC0559C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C8u); - goto label_BFC055C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055A4u); - } -label_BFC055A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC055A4: 10410008 beq $v0, $at, 0xBFC055C8 */ - uint32_t psx_brA_BFC055A4 = cpu->gpr[2]; uint32_t psx_brB_BFC055A4 = cpu->gpr[1]; - psx_taken_BFC055A4 = (psx_brA_BFC055A4 == psx_brB_BFC055A4); - psx_delay_BFC055A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC055A8: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055A8u); -#endif - if (psx_delay_BFC055A4) { - psx_delay_BFC055A4 = 0; - if (psx_taken_BFC055A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C8u); - goto label_BFC055C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055ACu); - } -label_BFC055AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC055AC: 10410006 beq $v0, $at, 0xBFC055C8 */ - uint32_t psx_brA_BFC055AC = cpu->gpr[2]; uint32_t psx_brB_BFC055AC = cpu->gpr[1]; - psx_taken_BFC055AC = (psx_brA_BFC055AC == psx_brB_BFC055AC); - psx_delay_BFC055AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC055B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC055B0u); -#endif - if (psx_delay_BFC055AC) { - psx_delay_BFC055AC = 0; - if (psx_taken_BFC055AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C8u); - goto label_BFC055C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055B4u); - } -label_BFC055B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC055B4: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC055B8: 10440003 beq $v0, $a0, 0xBFC055C8 */ - uint32_t psx_brA_BFC055B8 = cpu->gpr[2]; uint32_t psx_brB_BFC055B8 = cpu->gpr[4]; - psx_taken_BFC055B8 = (psx_brA_BFC055B8 == psx_brB_BFC055B8); - psx_delay_BFC055B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC055BC: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055BCu); -#endif - if (psx_delay_BFC055B8) { - psx_delay_BFC055B8 = 0; - if (psx_taken_BFC055B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C8u); - goto label_BFC055C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C0u); - } -label_BFC055C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC055C0: 14410005 bne $v0, $at, 0xBFC055D8 */ - uint32_t psx_brA_BFC055C0 = cpu->gpr[2]; uint32_t psx_brB_BFC055C0 = cpu->gpr[1]; - psx_taken_BFC055C0 = (psx_brA_BFC055C0 != psx_brB_BFC055C0); - psx_delay_BFC055C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC055C4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055C4u); -#endif - if (psx_delay_BFC055C0) { - psx_delay_BFC055C0 = 0; - if (psx_taken_BFC055C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055D8u); - goto label_BFC055D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055C8u); - } -label_BFC055C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC055C8: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC055CC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC055CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC055D0: AC229158 sw $v0, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC055D0u); return; } g_debug_last_store_pc = 0xBFC055D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229158u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC055D4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055D4u); -#endif -label_BFC055D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC055D8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC055D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC055DC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC055DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC055E0: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC055E0u); return; } g_debug_last_store_pc = 0xBFC055E0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC055E4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC055E8: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC055F0u; /* jal link before delay slot */ - psx_delay_BFC055E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC055EC: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055ECu); -#endif - if (psx_delay_BFC055E8) { - psx_delay_BFC055E8 = 0; - cpu->gpr[31] = 0xBFC055F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC055F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC055F0: 1000006C beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC055F0 = cpu->gpr[0]; uint32_t psx_brB_BFC055F0 = cpu->gpr[0]; - psx_taken_BFC055F0 = (psx_brA_BFC055F0 == psx_brB_BFC055F0); - psx_delay_BFC055F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055F4u); -#endif - /* 0xBFC055F4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC055F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055F4u); -#endif - if (psx_delay_BFC055F0) { - psx_delay_BFC055F0 = 0; - if (psx_taken_BFC055F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055F8u); - } -label_BFC055F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC055F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC055F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC055F8: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC055F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC055FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC055FC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC055FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05600: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05604: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05604u); return; } g_debug_last_store_pc = 0xBFC05604u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05608: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0560Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0560C: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05614u; /* jal link before delay slot */ - psx_delay_BFC0560C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05610: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05610u); -#endif - if (psx_delay_BFC0560C) { - psx_delay_BFC0560C = 0; - cpu->gpr[31] = 0xBFC05614u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05614: 10000063 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC05614 = cpu->gpr[0]; uint32_t psx_brB_BFC05614 = cpu->gpr[0]; - psx_taken_BFC05614 = (psx_brA_BFC05614 == psx_brB_BFC05614); - psx_delay_BFC05614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05618u); -#endif - /* 0xBFC05618: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05618u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05618u); -#endif - if (psx_delay_BFC05614) { - psx_delay_BFC05614 = 0; - if (psx_taken_BFC05614) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0561Cu); - } -label_BFC0561C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0561Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0561C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05620: AC2091C8 sw $zero, -28216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05620u); return; } g_debug_last_store_pc = 0xBFC05620u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091C8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05624: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05628: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0562C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05630: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05634: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05634u); return; } g_debug_last_store_pc = 0xBFC05634u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05638: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05640u; /* jal link before delay slot */ - psx_delay_BFC05638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0563Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0563C: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0563Cu); -#endif - if (psx_delay_BFC05638) { - psx_delay_BFC05638 = 0; - cpu->gpr[31] = 0xBFC05640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05640: 10000058 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC05640 = cpu->gpr[0]; uint32_t psx_brB_BFC05640 = cpu->gpr[0]; - psx_taken_BFC05640 = (psx_brA_BFC05640 == psx_brB_BFC05640); - psx_delay_BFC05640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05644u); -#endif - /* 0xBFC05644: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05644u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05644u); -#endif - if (psx_delay_BFC05640) { - psx_delay_BFC05640 = 0; - if (psx_taken_BFC05640) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05648u); - } -label_BFC05648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05648: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0564C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC05650: AC2E91C4 sw $t6, -28220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05650u); return; } g_debug_last_store_pc = 0xBFC05650u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E91C4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05654: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05658: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0565C: 10000050 beq $zero, $zero, 0xBFC057A0 */ - uint32_t psx_brA_BFC0565C = cpu->gpr[0]; uint32_t psx_brB_BFC0565C = cpu->gpr[0]; - psx_taken_BFC0565C = (psx_brA_BFC0565C == psx_brB_BFC0565C); - psx_delay_BFC0565C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05660: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05660u); return; } g_debug_last_store_pc = 0xBFC05660u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05660u); -#endif - if (psx_delay_BFC0565C) { - psx_delay_BFC0565C = 0; - if (psx_taken_BFC0565C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A0u); - goto label_BFC057A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05664u); - } -label_BFC05664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05664: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05668u); -#endif - /* 0xBFC05668: 8C4291AC lw $v0, -28244($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05668u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0566C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05670: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05670u); -#endif -label_BFC05674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05674u); -#endif - /* 0xBFC05674: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05678: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0567Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0567C: A04F0000 sb $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0567Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0567Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05680u); -#endif - /* 0xBFC05680: 90B80000 lbu $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 24, 0x20u); - PGXP_LOAD(0x90B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05684: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC05688: A058FFFD sb $t8, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05688u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA058FFFDu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0568Cu); -#endif - /* 0xBFC0568C: 90B90000 lbu $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 25, 0x20u); - PGXP_LOAD(0x90B90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0568Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05690: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC05694: A059FFFE sb $t9, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05694u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA059FFFEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05698u); -#endif - /* 0xBFC05698: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0569Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0569C: 1464FFF5 bne $v1, $a0, 0xBFC05674 */ - uint32_t psx_brA_BFC0569C = cpu->gpr[3]; uint32_t psx_brB_BFC0569C = cpu->gpr[4]; - psx_taken_BFC0569C = (psx_brA_BFC0569C != psx_brB_BFC0569C); - psx_delay_BFC0569C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC056A0: A048FFFF sb $t0, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC056A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA048FFFFu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056A0u); -#endif - if (psx_delay_BFC0569C) { - psx_delay_BFC0569C = 0; - if (psx_taken_BFC0569C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05674u); - goto label_BFC05674; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056A4u); - } -label_BFC056A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC056A4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC056A8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC056A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC056AC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC056ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC056B0: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC056B0u); return; } g_debug_last_store_pc = 0xBFC056B0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC056B4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC056B8: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC056C0u; /* jal link before delay slot */ - psx_delay_BFC056B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC056BC: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056BCu); -#endif - if (psx_delay_BFC056B8) { - psx_delay_BFC056B8 = 0; - cpu->gpr[31] = 0xBFC056C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC056C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC056C0: 10000038 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC056C0 = cpu->gpr[0]; uint32_t psx_brB_BFC056C0 = cpu->gpr[0]; - psx_taken_BFC056C0 = (psx_brA_BFC056C0 == psx_brB_BFC056C0); - psx_delay_BFC056C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056C4u); -#endif - /* 0xBFC056C4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC056C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056C4u); -#endif - if (psx_delay_BFC056C0) { - psx_delay_BFC056C0 = 0; - if (psx_taken_BFC056C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056C8u); - } -label_BFC056C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC056C8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC056C8u); -#endif -label_BFC056CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC056CC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC056D0: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC056D8u; /* jal link before delay slot */ - psx_delay_BFC056D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC056D4: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056D4u); -#endif - if (psx_delay_BFC056D0) { - psx_delay_BFC056D0 = 0; - cpu->gpr[31] = 0xBFC056D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC056D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC056D8: 10000032 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC056D8 = cpu->gpr[0]; uint32_t psx_brB_BFC056D8 = cpu->gpr[0]; - psx_taken_BFC056D8 = (psx_brA_BFC056D8 == psx_brB_BFC056D8); - psx_delay_BFC056D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056DCu); -#endif - /* 0xBFC056DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC056DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056DCu); -#endif - if (psx_delay_BFC056D8) { - psx_delay_BFC056D8 = 0; - if (psx_taken_BFC056D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056E0u); - } -label_BFC056E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC056E0: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056E0u); -#endif -label_BFC056E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC056E4: 1041FFD8 beq $v0, $at, 0xBFC05648 */ - uint32_t psx_brA_BFC056E4 = cpu->gpr[2]; uint32_t psx_brB_BFC056E4 = cpu->gpr[1]; - psx_taken_BFC056E4 = (psx_brA_BFC056E4 == psx_brB_BFC056E4); - psx_delay_BFC056E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC056E8: 28410CCD slti $at, $v0, 3277 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0); - PGXP_ALU(0x28410CCDu, cpu->gpr[1], _pgx1, 0x0CCDu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056E8u); -#endif - if (psx_delay_BFC056E4) { - psx_delay_BFC056E4 = 0; - if (psx_taken_BFC056E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05648u); - goto label_BFC05648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056ECu); - } -label_BFC056EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC056EC: 1020001E beq $at, $zero, 0xBFC05768 */ - uint32_t psx_brA_BFC056EC = cpu->gpr[1]; uint32_t psx_brB_BFC056EC = cpu->gpr[0]; - psx_taken_BFC056EC = (psx_brA_BFC056EC == psx_brB_BFC056EC); - psx_delay_BFC056EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC056F0: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056F0u); -#endif - if (psx_delay_BFC056EC) { - psx_delay_BFC056EC = 0; - if (psx_taken_BFC056EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05768u); - goto label_BFC05768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056F4u); - } -label_BFC056F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC056F4: 1041FFA6 beq $v0, $at, 0xBFC05590 */ - uint32_t psx_brA_BFC056F4 = cpu->gpr[2]; uint32_t psx_brB_BFC056F4 = cpu->gpr[1]; - psx_taken_BFC056F4 = (psx_brA_BFC056F4 == psx_brB_BFC056F4); - psx_delay_BFC056F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC056F8: 28410017 slti $at, $v0, 23 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0); - PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC056F8u); -#endif - if (psx_delay_BFC056F4) { - psx_delay_BFC056F4 = 0; - if (psx_taken_BFC056F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05590u); - goto label_BFC05590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056FCu); - } -label_BFC056FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC056FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC056FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC056FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC056FC: 10200015 beq $at, $zero, 0xBFC05754 */ - uint32_t psx_brA_BFC056FC = cpu->gpr[1]; uint32_t psx_brB_BFC056FC = cpu->gpr[0]; - psx_taken_BFC056FC = (psx_brA_BFC056FC == psx_brB_BFC056FC); - psx_delay_BFC056FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05700: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05700u); -#endif - if (psx_delay_BFC056FC) { - psx_delay_BFC056FC = 0; - if (psx_taken_BFC056FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05754u); - goto label_BFC05754; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05704u); - } -label_BFC05704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05704: 1041FFA2 beq $v0, $at, 0xBFC05590 */ - uint32_t psx_brA_BFC05704 = cpu->gpr[2]; uint32_t psx_brB_BFC05704 = cpu->gpr[1]; - psx_taken_BFC05704 = (psx_brA_BFC05704 == psx_brB_BFC05704); - psx_delay_BFC05704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05708: 2841000A slti $at, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0); - PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05708u); -#endif - if (psx_delay_BFC05704) { - psx_delay_BFC05704 = 0; - if (psx_taken_BFC05704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05590u); - goto label_BFC05590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0570Cu); - } -label_BFC0570C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0570Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0570C: 10200005 beq $at, $zero, 0xBFC05724 */ - uint32_t psx_brA_BFC0570C = cpu->gpr[1]; uint32_t psx_brB_BFC0570C = cpu->gpr[0]; - psx_taken_BFC0570C = (psx_brA_BFC0570C == psx_brB_BFC0570C); - psx_delay_BFC0570C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05710: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05710u); -#endif - if (psx_delay_BFC0570C) { - psx_delay_BFC0570C = 0; - if (psx_taken_BFC0570C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05724u); - goto label_BFC05724; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05714u); - } -label_BFC05714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05714: 1041FF9E beq $v0, $at, 0xBFC05590 */ - uint32_t psx_brA_BFC05714 = cpu->gpr[2]; uint32_t psx_brB_BFC05714 = cpu->gpr[1]; - psx_taken_BFC05714 = (psx_brA_BFC05714 == psx_brB_BFC05714); - psx_delay_BFC05714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05718: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05718u); -#endif - if (psx_delay_BFC05714) { - psx_delay_BFC05714 = 0; - if (psx_taken_BFC05714) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05590u); - goto label_BFC05590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0571Cu); - } -label_BFC0571C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0571Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0571C: 10000005 beq $zero, $zero, 0xBFC05734 */ - uint32_t psx_brA_BFC0571C = cpu->gpr[0]; uint32_t psx_brB_BFC0571C = cpu->gpr[0]; - psx_taken_BFC0571C = (psx_brA_BFC0571C == psx_brB_BFC0571C); - psx_delay_BFC0571C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05720: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05720u); -#endif - if (psx_delay_BFC0571C) { - psx_delay_BFC0571C = 0; - if (psx_taken_BFC0571C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05734u); - goto label_BFC05734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05724u); - } -label_BFC05724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05724: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05728: 1041FF99 beq $v0, $at, 0xBFC05590 */ - uint32_t psx_brA_BFC05728 = cpu->gpr[2]; uint32_t psx_brB_BFC05728 = cpu->gpr[1]; - psx_taken_BFC05728 = (psx_brA_BFC05728 == psx_brB_BFC05728); - psx_delay_BFC05728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0572Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0572C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0572Cu); -#endif - if (psx_delay_BFC05728) { - psx_delay_BFC05728 = 0; - if (psx_taken_BFC05728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05590u); - goto label_BFC05590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05730u); - } -label_BFC05730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05730: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05730u); -#endif -label_BFC05734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05734: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05738: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0573Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0573C: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0573Cu); return; } g_debug_last_store_pc = 0xBFC0573Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0573Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05740: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05744: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0574Cu; /* jal link before delay slot */ - psx_delay_BFC05744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05748: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05748u); -#endif - if (psx_delay_BFC05744) { - psx_delay_BFC05744 = 0; - cpu->gpr[31] = 0xBFC0574Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0574C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0574Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0574Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0574Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0574C: 10000015 beq $zero, $zero, 0xBFC057A4 */ - uint32_t psx_brA_BFC0574C = cpu->gpr[0]; uint32_t psx_brB_BFC0574C = cpu->gpr[0]; - psx_taken_BFC0574C = (psx_brA_BFC0574C == psx_brB_BFC0574C); - psx_delay_BFC0574C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05750u); -#endif - /* 0xBFC05750: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05750u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05750u); -#endif - if (psx_delay_BFC0574C) { - psx_delay_BFC0574C = 0; - if (psx_taken_BFC0574C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A4u); - goto label_BFC057A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05754u); - } -label_BFC05754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05754: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05758: 1041FFC2 beq $v0, $at, 0xBFC05664 */ - uint32_t psx_brA_BFC05758 = cpu->gpr[2]; uint32_t psx_brB_BFC05758 = cpu->gpr[1]; - psx_taken_BFC05758 = (psx_brA_BFC05758 == psx_brB_BFC05758); - psx_delay_BFC05758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0575Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0575C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0575Cu); -#endif - if (psx_delay_BFC05758) { - psx_delay_BFC05758 = 0; - if (psx_taken_BFC05758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05664u); - goto label_BFC05664; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05760u); - } -label_BFC05760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05760: 1000FFF4 beq $zero, $zero, 0xBFC05734 */ - uint32_t psx_brA_BFC05760 = cpu->gpr[0]; uint32_t psx_brB_BFC05760 = cpu->gpr[0]; - psx_taken_BFC05760 = (psx_brA_BFC05760 == psx_brB_BFC05760); - psx_delay_BFC05760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05764: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05764u); -#endif - if (psx_delay_BFC05760) { - psx_delay_BFC05760 = 0; - if (psx_taken_BFC05760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05734u); - goto label_BFC05734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05768u); - } -label_BFC05768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05768: 24010FFF addiu $at, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x24010FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0576Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0576C: 1041FFA2 beq $v0, $at, 0xBFC055F8 */ - uint32_t psx_brA_BFC0576C = cpu->gpr[2]; uint32_t psx_brB_BFC0576C = cpu->gpr[1]; - psx_taken_BFC0576C = (psx_brA_BFC0576C == psx_brB_BFC0576C); - psx_delay_BFC0576C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05770: 28411000 slti $at, $v0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0); - PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05770u); -#endif - if (psx_delay_BFC0576C) { - psx_delay_BFC0576C = 0; - if (psx_taken_BFC0576C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC055F8u); - goto label_BFC055F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05774u); - } -label_BFC05774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05774: 10200005 beq $at, $zero, 0xBFC0578C */ - uint32_t psx_brA_BFC05774 = cpu->gpr[1]; uint32_t psx_brB_BFC05774 = cpu->gpr[0]; - psx_taken_BFC05774 = (psx_brA_BFC05774 == psx_brB_BFC05774); - psx_delay_BFC05774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05778: 24010DDD addiu $at, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24010DDDu, cpu->gpr[1], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05778u); -#endif - if (psx_delay_BFC05774) { - psx_delay_BFC05774 = 0; - if (psx_taken_BFC05774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0578Cu); - goto label_BFC0578C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0577Cu); - } -label_BFC0577C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0577Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0577C: 1041FFA7 beq $v0, $at, 0xBFC0561C */ - uint32_t psx_brA_BFC0577C = cpu->gpr[2]; uint32_t psx_brB_BFC0577C = cpu->gpr[1]; - psx_taken_BFC0577C = (psx_brA_BFC0577C == psx_brB_BFC0577C); - psx_delay_BFC0577C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05780u); -#endif - if (psx_delay_BFC0577C) { - psx_delay_BFC0577C = 0; - if (psx_taken_BFC0577C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0561Cu); - goto label_BFC0561C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05784u); - } -label_BFC05784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05784: 1000FFEB beq $zero, $zero, 0xBFC05734 */ - uint32_t psx_brA_BFC05784 = cpu->gpr[0]; uint32_t psx_brB_BFC05784 = cpu->gpr[0]; - psx_taken_BFC05784 = (psx_brA_BFC05784 == psx_brB_BFC05784); - psx_delay_BFC05784 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05788: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05788u); -#endif - if (psx_delay_BFC05784) { - psx_delay_BFC05784 = 0; - if (psx_taken_BFC05784) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05734u); - goto label_BFC05734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0578Cu); - } -label_BFC0578C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0578Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0578C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05790: 1041FFCE beq $v0, $at, 0xBFC056CC */ - uint32_t psx_brA_BFC05790 = cpu->gpr[2]; uint32_t psx_brB_BFC05790 = cpu->gpr[1]; - psx_taken_BFC05790 = (psx_brA_BFC05790 == psx_brB_BFC05790); - psx_delay_BFC05790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05794: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05794u); -#endif - if (psx_delay_BFC05790) { - psx_delay_BFC05790 = 0; - if (psx_taken_BFC05790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC056CCu); - goto label_BFC056CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05798u); - } -label_BFC05798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05798: 1000FFE6 beq $zero, $zero, 0xBFC05734 */ - uint32_t psx_brA_BFC05798 = cpu->gpr[0]; uint32_t psx_brB_BFC05798 = cpu->gpr[0]; - psx_taken_BFC05798 = (psx_brA_BFC05798 == psx_brB_BFC05798); - psx_delay_BFC05798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0579Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0579C: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0579Cu); -#endif - if (psx_delay_BFC05798) { - psx_delay_BFC05798 = 0; - if (psx_taken_BFC05798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05734u); - goto label_BFC05734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057A0u); - } -label_BFC057A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC057A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC057A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057A0u); -#endif - /* 0xBFC057A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC057A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057A0u); -#endif -label_BFC057A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC057A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC057A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC057A4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC057A8: 03E00008 jr $ra */ - psx_delay_BFC057A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC057AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC057ACu); -#endif - if (psx_delay_BFC057A8) { - psx_delay_BFC057A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC057B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC057B0u); - int psx_delay_BFC057E4 = 0; - int psx_taken_BFC057E4 = 0; - int psx_delay_BFC05820 = 0; - int psx_taken_BFC05820 = 0; - int psx_delay_BFC05858 = 0; - int psx_taken_BFC05858 = 0; - int psx_delay_BFC05880 = 0; - int psx_delay_BFC05888 = 0; - int psx_taken_BFC05888 = 0; - int psx_delay_BFC05894 = 0; - int psx_taken_BFC05894 = 0; - int psx_delay_BFC058A4 = 0; - int psx_taken_BFC058A4 = 0; - int psx_delay_BFC058B8 = 0; - int psx_taken_BFC058B8 = 0; - int psx_delay_BFC058E4 = 0; - int psx_delay_BFC058EC = 0; - int psx_taken_BFC058EC = 0; - int psx_delay_BFC05934 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC057ECu: goto label_BFC057EC; - case 0xBFC05828u: goto label_BFC05828; - case 0xBFC05860u: goto label_BFC05860; - case 0xBFC05864u: goto label_BFC05864; - case 0xBFC05888u: goto label_BFC05888; - case 0xBFC05890u: goto label_BFC05890; - case 0xBFC05894u: goto label_BFC05894; - case 0xBFC0589Cu: goto label_BFC0589C; - case 0xBFC058ACu: goto label_BFC058AC; - case 0xBFC058C0u: goto label_BFC058C0; - case 0xBFC058ECu: goto label_BFC058EC; - case 0xBFC058F4u: goto label_BFC058F4; - case 0xBFC0592Cu: goto label_BFC0592C; - case 0xBFC05930u: goto label_BFC05930; - default: break; - } - } -label_BFC057B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC057B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC057B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC057B0: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057B4u); -#endif - /* 0xBFC057B4: 8C63DF5C lw $v1, -8356($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC057B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC057B8: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC057BC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC057BCu); return; } g_debug_last_store_pc = 0xBFC057BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057C0u); -#endif - /* 0xBFC057C0: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC057C4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC057C8: A02E91B4 sb $t6, -28236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28236; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC057C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28236)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02E91B4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057CCu); -#endif - /* 0xBFC057CC: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC057D0: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC057D4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057D8u); -#endif - /* 0xBFC057D8: 8C429154 lw $v0, -28332($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC057D8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC057DC: A02F91B5 sb $t7, -28235($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28235; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC057DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28235)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02F91B5u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC057E0: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC057E4: 1441002B bne $v0, $at, 0xBFC05894 */ - uint32_t psx_brA_BFC057E4 = cpu->gpr[2]; uint32_t psx_brB_BFC057E4 = cpu->gpr[1]; - psx_taken_BFC057E4 = (psx_brA_BFC057E4 != psx_brB_BFC057E4); - psx_delay_BFC057E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC057E8: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057E8u); -#endif - if (psx_delay_BFC057E4) { - psx_delay_BFC057E4 = 0; - if (psx_taken_BFC057E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05894u); - goto label_BFC05894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC057ECu); - } -label_BFC057EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC057ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC057ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC057EC: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC057F0: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057F4u); -#endif - /* 0xBFC057F4: 8C4291B0 lw $v0, -28240($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC057F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291B0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057F8u); -#endif - /* 0xBFC057F8: 931891B4 lbu $t8, -28236($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -28236; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-28236)), 24, 0x1000000u); - PGXP_LOAD(0x931891B4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC057F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC057FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC057FC: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC057FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC05800: A0580000 sb $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05800u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05804u); -#endif - /* 0xBFC05804: 933991B5 lbu $t9, -28235($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28235; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-28235)), 25, 0x2000000u); - PGXP_LOAD(0x933991B5u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC05808: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0580Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0580C: A0590001 sb $t9, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0580Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0590001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0580Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC05810: AFA8001C sw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05810u); return; } g_debug_last_store_pc = 0xBFC05810u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05814u); -#endif - /* 0xBFC05814: 8FA9001C lw $t1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05814u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0581Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC0581C: 29210004 slti $at, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0); - PGXP_ALU(0x29210004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0581Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05820: 10200010 beq $at, $zero, 0xBFC05864 */ - uint32_t psx_brA_BFC05820 = cpu->gpr[1]; uint32_t psx_brB_BFC05820 = cpu->gpr[0]; - psx_taken_BFC05820 = (psx_brA_BFC05820 == psx_brB_BFC05820); - psx_delay_BFC05820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05824: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05824u); -#endif - if (psx_delay_BFC05820) { - psx_delay_BFC05820 = 0; - if (psx_taken_BFC05820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05864u); - goto label_BFC05864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05828u); - } -label_BFC05828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05828u); -#endif - /* 0xBFC05828: 906A0000 lbu $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 10, 0x8u); - PGXP_LOAD(0x906A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0582Cu); -#endif - /* 0xBFC0582C: 8FAB001C lw $t3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0582Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB001Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0582Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC05834: 004B6021 addu $t4, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[2] + cpu->gpr[11]; - PGXP_ALU(0x004B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC05838: A18A0000 sb $t2, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05838u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA18A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0583Cu); -#endif - /* 0xBFC0583C: 8FAD001C lw $t5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0583Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD001Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0583Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05840: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC05844: 25AE0001 addiu $t6, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); - PGXP_ALU(0x25AE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC05848: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05848u); return; } g_debug_last_store_pc = 0xBFC05848u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0584Cu); -#endif - /* 0xBFC0584C: 8FAF001C lw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0584Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0584Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC05854: 29E10004 slti $at, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0); - PGXP_ALU(0x29E10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05858: 1420FFF3 bne $at, $zero, 0xBFC05828 */ - uint32_t psx_brA_BFC05858 = cpu->gpr[1]; uint32_t psx_brB_BFC05858 = cpu->gpr[0]; - psx_taken_BFC05858 = (psx_brA_BFC05858 != psx_brB_BFC05858); - psx_delay_BFC05858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0585Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0585C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0585Cu); -#endif - if (psx_delay_BFC05858) { - psx_delay_BFC05858 = 0; - if (psx_taken_BFC05858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05828u); - goto label_BFC05828; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05860u); - } -label_BFC05860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05860: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05860u); -#endif -label_BFC05864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05864: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC05868: AC389158 sw $t8, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05868u); return; } g_debug_last_store_pc = 0xBFC05868u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389158u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0586Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0586C: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0586Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05870: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05874: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05878: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0587C: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0587Cu); return; } g_debug_last_store_pc = 0xBFC0587Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05880: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05888u; /* jal link before delay slot */ - psx_delay_BFC05880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05884: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05884u); -#endif - if (psx_delay_BFC05880) { - psx_delay_BFC05880 = 0; - cpu->gpr[31] = 0xBFC05888u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05888: 10000029 beq $zero, $zero, 0xBFC05930 */ - uint32_t psx_brA_BFC05888 = cpu->gpr[0]; uint32_t psx_brB_BFC05888 = cpu->gpr[0]; - psx_taken_BFC05888 = (psx_brA_BFC05888 == psx_brB_BFC05888); - psx_delay_BFC05888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0588Cu); -#endif - /* 0xBFC0588C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0588Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0588Cu); -#endif - if (psx_delay_BFC05888) { - psx_delay_BFC05888 = 0; - if (psx_taken_BFC05888) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05930u); - goto label_BFC05930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05890u); - } -label_BFC05890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05890: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05890u); -#endif -label_BFC05894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05894: 14410005 bne $v0, $at, 0xBFC058AC */ - uint32_t psx_brA_BFC05894 = cpu->gpr[2]; uint32_t psx_brB_BFC05894 = cpu->gpr[1]; - psx_taken_BFC05894 = (psx_brA_BFC05894 != psx_brB_BFC05894); - psx_delay_BFC05894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05898: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05898u); -#endif - if (psx_delay_BFC05894) { - psx_delay_BFC05894 = 0; - if (psx_taken_BFC05894) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC058ACu); - goto label_BFC058AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0589Cu); - } -label_BFC0589C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0589Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0589C: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC058A0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC058A4: 10000021 beq $zero, $zero, 0xBFC0592C */ - uint32_t psx_brA_BFC058A4 = cpu->gpr[0]; uint32_t psx_brB_BFC058A4 = cpu->gpr[0]; - psx_taken_BFC058A4 = (psx_brA_BFC058A4 == psx_brB_BFC058A4); - psx_delay_BFC058A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC058A8: AC3991C4 sw $t9, -28220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058A8u); return; } g_debug_last_store_pc = 0xBFC058A8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC3991C4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058A8u); -#endif - if (psx_delay_BFC058A4) { - psx_delay_BFC058A4 = 0; - if (psx_taken_BFC058A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0592Cu); - goto label_BFC0592C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC058ACu); - } -label_BFC058AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC058ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC058ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC058AC: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058B0u); -#endif - /* 0xBFC058B0: 8D0891C8 lw $t0, -28216($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058B0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0891C8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC058B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC058B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC058B8: 1100000E beq $t0, $zero, 0xBFC058F4 */ - uint32_t psx_brA_BFC058B8 = cpu->gpr[8]; uint32_t psx_brB_BFC058B8 = cpu->gpr[0]; - psx_taken_BFC058B8 = (psx_brA_BFC058B8 == psx_brB_BFC058B8); - psx_delay_BFC058B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC058BC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058BCu); -#endif - if (psx_delay_BFC058B8) { - psx_delay_BFC058B8 = 0; - if (psx_taken_BFC058B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC058F4u); - goto label_BFC058F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC058C0u); - } -label_BFC058C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC058C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC058C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC058C0: AC2091C8 sw $zero, -28216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058C0u); return; } g_debug_last_store_pc = 0xBFC058C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2091C8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC058C4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC058C8: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC058CC: AC299158 sw $t1, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058CCu); return; } g_debug_last_store_pc = 0xBFC058CCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299158u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC058D0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC058D4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC058D8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC058DC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC058E0: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058E0u); return; } g_debug_last_store_pc = 0xBFC058E0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC058E4: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC058ECu; /* jal link before delay slot */ - psx_delay_BFC058E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC058E8: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058E8u); -#endif - if (psx_delay_BFC058E4) { - psx_delay_BFC058E4 = 0; - cpu->gpr[31] = 0xBFC058ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC058EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC058ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC058ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC058EC: 10000010 beq $zero, $zero, 0xBFC05930 */ - uint32_t psx_brA_BFC058EC = cpu->gpr[0]; uint32_t psx_brB_BFC058EC = cpu->gpr[0]; - psx_taken_BFC058EC = (psx_brA_BFC058EC == psx_brB_BFC058EC); - psx_delay_BFC058EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058F0u); -#endif - /* 0xBFC058F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058F0u); -#endif - if (psx_delay_BFC058EC) { - psx_delay_BFC058EC = 0; - if (psx_taken_BFC058EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05930u); - goto label_BFC05930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC058F4u); - } -label_BFC058F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC058F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC058F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC058F4: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC058F8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC058F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC058FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC058FC: AC2B91C8 sw $t3, -28216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC058FCu); return; } g_debug_last_store_pc = 0xBFC058FCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B91C8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC058FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05900: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC05904: 340AFFFF ori $t2, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC05908: 3C0CBFC1 lui $t4, 0xBFC1 */ - cpu->gpr[12] = 0xBFC10000u; - PGXP_ALU(0x3C0CBFC1u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0590Cu); -#endif - /* 0xBFC0590C: 8D8CDF58 lw $t4, -8360($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0590Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CDF58u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0590Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC05910: AC2A9158 sw $t2, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05910u); return; } g_debug_last_store_pc = 0xBFC05910u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9158u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC05914: 240D000A addiu $t5, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x240D000Au, cpu->gpr[13], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC05918: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05918u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0591C: 24020DDD addiu $v0, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24020DDDu, cpu->gpr[2], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC05920: A06D0000 sb $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05920u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA06D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05924: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05928: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05928u); return; } g_debug_last_store_pc = 0xBFC05928u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05928u); -#endif -label_BFC0592C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0592Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0592Cu); -#endif - /* 0xBFC0592C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0592Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0592Cu); -#endif -label_BFC05930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05930: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05934: 03E00008 jr $ra */ - psx_delay_BFC05934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05938u); -#endif - if (psx_delay_BFC05934) { - psx_delay_BFC05934 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0593C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0593Cu); - int psx_delay_BFC0595C = 0; - int psx_taken_BFC0595C = 0; - int psx_delay_BFC05968 = 0; - int psx_taken_BFC05968 = 0; - int psx_delay_BFC0597C = 0; - int psx_taken_BFC0597C = 0; - int psx_delay_BFC05984 = 0; - int psx_taken_BFC05984 = 0; - int psx_delay_BFC0598C = 0; - int psx_delay_BFC05994 = 0; - int psx_taken_BFC05994 = 0; - int psx_delay_BFC059A0 = 0; - int psx_taken_BFC059A0 = 0; - int psx_delay_BFC059AC = 0; - int psx_taken_BFC059AC = 0; - int psx_delay_BFC059B4 = 0; - int psx_taken_BFC059B4 = 0; - int psx_delay_BFC059BC = 0; - int psx_taken_BFC059BC = 0; - int psx_delay_BFC059C4 = 0; - int psx_delay_BFC059CC = 0; - int psx_taken_BFC059CC = 0; - int psx_delay_BFC059D8 = 0; - int psx_taken_BFC059D8 = 0; - int psx_delay_BFC059E0 = 0; - int psx_taken_BFC059E0 = 0; - int psx_delay_BFC059E8 = 0; - int psx_taken_BFC059E8 = 0; - int psx_delay_BFC059F0 = 0; - int psx_delay_BFC059F8 = 0; - int psx_taken_BFC059F8 = 0; - int psx_delay_BFC05A04 = 0; - int psx_taken_BFC05A04 = 0; - int psx_delay_BFC05A14 = 0; - int psx_delay_BFC05A1C = 0; - int psx_taken_BFC05A1C = 0; - int psx_delay_BFC05A2C = 0; - int psx_delay_BFC05A3C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05964u: goto label_BFC05964; - case 0xBFC05970u: goto label_BFC05970; - case 0xBFC05984u: goto label_BFC05984; - case 0xBFC0598Cu: goto label_BFC0598C; - case 0xBFC05994u: goto label_BFC05994; - case 0xBFC0599Cu: goto label_BFC0599C; - case 0xBFC059A8u: goto label_BFC059A8; - case 0xBFC059B4u: goto label_BFC059B4; - case 0xBFC059BCu: goto label_BFC059BC; - case 0xBFC059C4u: goto label_BFC059C4; - case 0xBFC059CCu: goto label_BFC059CC; - case 0xBFC059D4u: goto label_BFC059D4; - case 0xBFC059D8u: goto label_BFC059D8; - case 0xBFC059E0u: goto label_BFC059E0; - case 0xBFC059E8u: goto label_BFC059E8; - case 0xBFC059F0u: goto label_BFC059F0; - case 0xBFC059F8u: goto label_BFC059F8; - case 0xBFC05A00u: goto label_BFC05A00; - case 0xBFC05A04u: goto label_BFC05A04; - case 0xBFC05A0Cu: goto label_BFC05A0C; - case 0xBFC05A1Cu: goto label_BFC05A1C; - case 0xBFC05A24u: goto label_BFC05A24; - case 0xBFC05A28u: goto label_BFC05A28; - case 0xBFC05A34u: goto label_BFC05A34; - case 0xBFC05A38u: goto label_BFC05A38; - default: break; - } - } -label_BFC0593C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0593Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0593C: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05940u); -#endif - /* 0xBFC05940: 8DCEDF5C lw $t6, -8356($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05940u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDF5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05944: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05948: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0594Cu); -#endif - /* 0xBFC0594C: 8C429154 lw $v0, -28332($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0594Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05950: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05950u); return; } g_debug_last_store_pc = 0xBFC05950u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05954: 240400F6 addiu $a0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240400F6u, cpu->gpr[4], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05958u); -#endif - /* 0xBFC05958: 91C60000 lbu $a2, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 6, 0x4000u); - PGXP_LOAD(0x91C60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0595Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0595C: 1044000B beq $v0, $a0, 0xBFC0598C */ - uint32_t psx_brA_BFC0595C = cpu->gpr[2]; uint32_t psx_brB_BFC0595C = cpu->gpr[4]; - psx_taken_BFC0595C = (psx_brA_BFC0595C == psx_brB_BFC0595C); - psx_delay_BFC0595C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05960: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05960u); -#endif - if (psx_delay_BFC0595C) { - psx_delay_BFC0595C = 0; - if (psx_taken_BFC0595C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0598Cu); - goto label_BFC0598C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05964u); - } -label_BFC05964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05964: 240500FB addiu $a1, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240500FBu, cpu->gpr[5], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC05968: 10450008 beq $v0, $a1, 0xBFC0598C */ - uint32_t psx_brA_BFC05968 = cpu->gpr[2]; uint32_t psx_brB_BFC05968 = cpu->gpr[5]; - psx_taken_BFC05968 = (psx_brA_BFC05968 == psx_brB_BFC05968); - psx_delay_BFC05968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0596Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0596C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0596Cu); -#endif - if (psx_delay_BFC05968) { - psx_delay_BFC05968 = 0; - if (psx_taken_BFC05968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0598Cu); - goto label_BFC0598C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05970u); - } -label_BFC05970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05970: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05974u); -#endif - /* 0xBFC05974: 8C639158 lw $v1, -28328($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05974u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639158u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05978: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0597Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0597C: 10640003 beq $v1, $a0, 0xBFC0598C */ - uint32_t psx_brA_BFC0597C = cpu->gpr[3]; uint32_t psx_brB_BFC0597C = cpu->gpr[4]; - psx_taken_BFC0597C = (psx_brA_BFC0597C == psx_brB_BFC0597C); - psx_delay_BFC0597C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05980: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05980u); -#endif - if (psx_delay_BFC0597C) { - psx_delay_BFC0597C = 0; - if (psx_taken_BFC0597C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0598Cu); - goto label_BFC0598C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05984u); - } -label_BFC05984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC05984: 14650005 bne $v1, $a1, 0xBFC0599C */ - uint32_t psx_brA_BFC05984 = cpu->gpr[3]; uint32_t psx_brB_BFC05984 = cpu->gpr[5]; - psx_taken_BFC05984 = (psx_brA_BFC05984 != psx_brB_BFC05984); - psx_delay_BFC05984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05988: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05988u); -#endif - if (psx_delay_BFC05984) { - psx_delay_BFC05984 = 0; - if (psx_taken_BFC05984) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0599Cu); - goto label_BFC0599C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0598Cu); - } -label_BFC0598C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0598Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0598Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0598Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0598C: 0FF017C2 jal 0xBFC05F08 */ - cpu->gpr[31] = 0xBFC05994u; /* jal link before delay slot */ - psx_delay_BFC0598C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05990u); -#endif - if (psx_delay_BFC0598C) { - psx_delay_BFC0598C = 0; - cpu->gpr[31] = 0xBFC05994u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05F08u); - cpu->pc = 0xBFC05F08u; return; - } -label_BFC05994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05994: 10000028 beq $zero, $zero, 0xBFC05A38 */ - uint32_t psx_brA_BFC05994 = cpu->gpr[0]; uint32_t psx_brB_BFC05994 = cpu->gpr[0]; - psx_taken_BFC05994 = (psx_brA_BFC05994 == psx_brB_BFC05994); - psx_delay_BFC05994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05998u); -#endif - /* 0xBFC05998: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05998u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05998u); -#endif - if (psx_delay_BFC05994) { - psx_delay_BFC05994 = 0; - if (psx_taken_BFC05994) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A38u); - goto label_BFC05A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0599Cu); - } -label_BFC0599C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0599Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0599C: 240400E6 addiu $a0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240400E6u, cpu->gpr[4], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC059A0: 10440008 beq $v0, $a0, 0xBFC059C4 */ - uint32_t psx_brA_BFC059A0 = cpu->gpr[2]; uint32_t psx_brB_BFC059A0 = cpu->gpr[4]; - psx_taken_BFC059A0 = (psx_brA_BFC059A0 == psx_brB_BFC059A0); - psx_delay_BFC059A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC059A4u); -#endif - if (psx_delay_BFC059A0) { - psx_delay_BFC059A0 = 0; - if (psx_taken_BFC059A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059C4u); - goto label_BFC059C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059A8u); - } -label_BFC059A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC059A8: 240500EB addiu $a1, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240500EBu, cpu->gpr[5], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC059AC: 10450005 beq $v0, $a1, 0xBFC059C4 */ - uint32_t psx_brA_BFC059AC = cpu->gpr[2]; uint32_t psx_brB_BFC059AC = cpu->gpr[5]; - psx_taken_BFC059AC = (psx_brA_BFC059AC == psx_brB_BFC059AC); - psx_delay_BFC059AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC059B0u); -#endif - if (psx_delay_BFC059AC) { - psx_delay_BFC059AC = 0; - if (psx_taken_BFC059AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059C4u); - goto label_BFC059C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059B4u); - } -label_BFC059B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC059B4: 10640003 beq $v1, $a0, 0xBFC059C4 */ - uint32_t psx_brA_BFC059B4 = cpu->gpr[3]; uint32_t psx_brB_BFC059B4 = cpu->gpr[4]; - psx_taken_BFC059B4 = (psx_brA_BFC059B4 == psx_brB_BFC059B4); - psx_delay_BFC059B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC059B8u); -#endif - if (psx_delay_BFC059B4) { - psx_delay_BFC059B4 = 0; - if (psx_taken_BFC059B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059C4u); - goto label_BFC059C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059BCu); - } -label_BFC059BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC059BC: 14650006 bne $v1, $a1, 0xBFC059D8 */ - uint32_t psx_brA_BFC059BC = cpu->gpr[3]; uint32_t psx_brB_BFC059BC = cpu->gpr[5]; - psx_taken_BFC059BC = (psx_brA_BFC059BC != psx_brB_BFC059BC); - psx_delay_BFC059BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC059C0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059C0u); -#endif - if (psx_delay_BFC059BC) { - psx_delay_BFC059BC = 0; - if (psx_taken_BFC059BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059D8u); - goto label_BFC059D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059C4u); - } -label_BFC059C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC059C4: 0FF01804 jal 0xBFC06010 */ - cpu->gpr[31] = 0xBFC059CCu; /* jal link before delay slot */ - psx_delay_BFC059C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC059C8u); -#endif - if (psx_delay_BFC059C4) { - psx_delay_BFC059C4 = 0; - cpu->gpr[31] = 0xBFC059CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06010u); - cpu->pc = 0xBFC06010u; return; - } -label_BFC059CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059CC: 1000001A beq $zero, $zero, 0xBFC05A38 */ - uint32_t psx_brA_BFC059CC = cpu->gpr[0]; uint32_t psx_brB_BFC059CC = cpu->gpr[0]; - psx_taken_BFC059CC = (psx_brA_BFC059CC == psx_brB_BFC059CC); - psx_delay_BFC059CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059D0u); -#endif - /* 0xBFC059D0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC059D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059D0u); -#endif - if (psx_delay_BFC059CC) { - psx_delay_BFC059CC = 0; - if (psx_taken_BFC059CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A38u); - goto label_BFC05A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059D4u); - } -label_BFC059D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC059D4: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059D4u); -#endif -label_BFC059D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC059D8: 10410005 beq $v0, $at, 0xBFC059F0 */ - uint32_t psx_brA_BFC059D8 = cpu->gpr[2]; uint32_t psx_brB_BFC059D8 = cpu->gpr[1]; - psx_taken_BFC059D8 = (psx_brA_BFC059D8 == psx_brB_BFC059D8); - psx_delay_BFC059D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC059DC: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059DCu); -#endif - if (psx_delay_BFC059D8) { - psx_delay_BFC059D8 = 0; - if (psx_taken_BFC059D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059F0u); - goto label_BFC059F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059E0u); - } -label_BFC059E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC059E0: 10410003 beq $v0, $at, 0xBFC059F0 */ - uint32_t psx_brA_BFC059E0 = cpu->gpr[2]; uint32_t psx_brB_BFC059E0 = cpu->gpr[1]; - psx_taken_BFC059E0 = (psx_brA_BFC059E0 == psx_brB_BFC059E0); - psx_delay_BFC059E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC059E4: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059E4u); -#endif - if (psx_delay_BFC059E0) { - psx_delay_BFC059E0 = 0; - if (psx_taken_BFC059E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059F0u); - goto label_BFC059F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059E8u); - } -label_BFC059E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC059E8: 14410006 bne $v0, $at, 0xBFC05A04 */ - uint32_t psx_brA_BFC059E8 = cpu->gpr[2]; uint32_t psx_brB_BFC059E8 = cpu->gpr[1]; - psx_taken_BFC059E8 = (psx_brA_BFC059E8 != psx_brB_BFC059E8); - psx_delay_BFC059E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC059EC: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059ECu); -#endif - if (psx_delay_BFC059E8) { - psx_delay_BFC059E8 = 0; - if (psx_taken_BFC059E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A04u); - goto label_BFC05A04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC059F0u); - } -label_BFC059F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC059F0: 0FF0180E jal 0xBFC06038 */ - cpu->gpr[31] = 0xBFC059F8u; /* jal link before delay slot */ - psx_delay_BFC059F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC059F4: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059F4u); -#endif - if (psx_delay_BFC059F0) { - psx_delay_BFC059F0 = 0; - cpu->gpr[31] = 0xBFC059F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06038u); - cpu->pc = 0xBFC06038u; return; - } -label_BFC059F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC059F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC059F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC059F8: 1000000F beq $zero, $zero, 0xBFC05A38 */ - uint32_t psx_brA_BFC059F8 = cpu->gpr[0]; uint32_t psx_brB_BFC059F8 = cpu->gpr[0]; - psx_taken_BFC059F8 = (psx_brA_BFC059F8 == psx_brB_BFC059F8); - psx_delay_BFC059F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC059FCu); -#endif - /* 0xBFC059FC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC059FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC059FCu); -#endif - if (psx_delay_BFC059F8) { - psx_delay_BFC059F8 = 0; - if (psx_taken_BFC059F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A38u); - goto label_BFC05A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A00u); - } -label_BFC05A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05A00: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A00u); -#endif -label_BFC05A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05A04: 14410008 bne $v0, $at, 0xBFC05A28 */ - uint32_t psx_brA_BFC05A04 = cpu->gpr[2]; uint32_t psx_brB_BFC05A04 = cpu->gpr[1]; - psx_taken_BFC05A04 = (psx_brA_BFC05A04 != psx_brB_BFC05A04); - psx_delay_BFC05A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A08: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A08u); -#endif - if (psx_delay_BFC05A04) { - psx_delay_BFC05A04 = 0; - if (psx_taken_BFC05A04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A28u); - goto label_BFC05A28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A0Cu); - } -label_BFC05A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A0C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A10: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05A14: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05A1Cu; /* jal link before delay slot */ - psx_delay_BFC05A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05A18: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A18u); -#endif - if (psx_delay_BFC05A14) { - psx_delay_BFC05A14 = 0; - cpu->gpr[31] = 0xBFC05A1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A1C: 10000006 beq $zero, $zero, 0xBFC05A38 */ - uint32_t psx_brA_BFC05A1C = cpu->gpr[0]; uint32_t psx_brB_BFC05A1C = cpu->gpr[0]; - psx_taken_BFC05A1C = (psx_brA_BFC05A1C == psx_brB_BFC05A1C); - psx_delay_BFC05A1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A20u); -#endif - /* 0xBFC05A20: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A20u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A20u); -#endif - if (psx_delay_BFC05A1C) { - psx_delay_BFC05A1C = 0; - if (psx_taken_BFC05A1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A38u); - goto label_BFC05A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A24u); - } -label_BFC05A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A24: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A24u); -#endif -label_BFC05A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A28: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05A2C: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05A34u; /* jal link before delay slot */ - psx_delay_BFC05A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05A30: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A30u); -#endif - if (psx_delay_BFC05A2C) { - psx_delay_BFC05A2C = 0; - cpu->gpr[31] = 0xBFC05A34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A34u); -#endif - /* 0xBFC05A34: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A34u); -#endif -label_BFC05A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05A38: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05A3C: 03E00008 jr $ra */ - psx_delay_BFC05A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A40u); -#endif - if (psx_delay_BFC05A3C) { - psx_delay_BFC05A3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05A44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05A44u); - int psx_delay_BFC05A54 = 0; - int psx_taken_BFC05A54 = 0; - int psx_delay_BFC05A60 = 0; - int psx_taken_BFC05A60 = 0; - int psx_delay_BFC05A74 = 0; - int psx_taken_BFC05A74 = 0; - int psx_delay_BFC05A7C = 0; - int psx_taken_BFC05A7C = 0; - int psx_delay_BFC05A90 = 0; - int psx_taken_BFC05A90 = 0; - int psx_delay_BFC05AA0 = 0; - int psx_delay_BFC05AB4 = 0; - int psx_taken_BFC05AB4 = 0; - int psx_delay_BFC05ABC = 0; - int psx_taken_BFC05ABC = 0; - int psx_delay_BFC05AC4 = 0; - int psx_taken_BFC05AC4 = 0; - int psx_delay_BFC05ADC = 0; - int psx_taken_BFC05ADC = 0; - int psx_delay_BFC05AE4 = 0; - int psx_taken_BFC05AE4 = 0; - int psx_delay_BFC05AF0 = 0; - int psx_taken_BFC05AF0 = 0; - int psx_delay_BFC05AF8 = 0; - int psx_taken_BFC05AF8 = 0; - int psx_delay_BFC05B0C = 0; - int psx_taken_BFC05B0C = 0; - int psx_delay_BFC05B14 = 0; - int psx_taken_BFC05B14 = 0; - int psx_delay_BFC05B28 = 0; - int psx_taken_BFC05B28 = 0; - int psx_delay_BFC05B3C = 0; - int psx_delay_BFC05B50 = 0; - int psx_taken_BFC05B50 = 0; - int psx_delay_BFC05B58 = 0; - int psx_taken_BFC05B58 = 0; - int psx_delay_BFC05B60 = 0; - int psx_taken_BFC05B60 = 0; - int psx_delay_BFC05B78 = 0; - int psx_taken_BFC05B78 = 0; - int psx_delay_BFC05B80 = 0; - int psx_taken_BFC05B80 = 0; - int psx_delay_BFC05B8C = 0; - int psx_taken_BFC05B8C = 0; - int psx_delay_BFC05B94 = 0; - int psx_taken_BFC05B94 = 0; - int psx_delay_BFC05BA0 = 0; - int psx_taken_BFC05BA0 = 0; - int psx_delay_BFC05BB4 = 0; - int psx_delay_BFC05BC4 = 0; - int psx_taken_BFC05BC4 = 0; - int psx_delay_BFC05BD8 = 0; - int psx_taken_BFC05BD8 = 0; - int psx_delay_BFC05BE8 = 0; - int psx_delay_BFC05BF0 = 0; - int psx_taken_BFC05BF0 = 0; - int psx_delay_BFC05C00 = 0; - int psx_delay_BFC05C10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05A5Cu: goto label_BFC05A5C; - case 0xBFC05A68u: goto label_BFC05A68; - case 0xBFC05A7Cu: goto label_BFC05A7C; - case 0xBFC05A84u: goto label_BFC05A84; - case 0xBFC05A98u: goto label_BFC05A98; - case 0xBFC05AA8u: goto label_BFC05AA8; - case 0xBFC05AB4u: goto label_BFC05AB4; - case 0xBFC05ABCu: goto label_BFC05ABC; - case 0xBFC05AC4u: goto label_BFC05AC4; - case 0xBFC05ACCu: goto label_BFC05ACC; - case 0xBFC05AD0u: goto label_BFC05AD0; - case 0xBFC05AD8u: goto label_BFC05AD8; - case 0xBFC05AE4u: goto label_BFC05AE4; - case 0xBFC05AECu: goto label_BFC05AEC; - case 0xBFC05AF8u: goto label_BFC05AF8; - case 0xBFC05B00u: goto label_BFC05B00; - case 0xBFC05B14u: goto label_BFC05B14; - case 0xBFC05B1Cu: goto label_BFC05B1C; - case 0xBFC05B30u: goto label_BFC05B30; - case 0xBFC05B34u: goto label_BFC05B34; - case 0xBFC05B44u: goto label_BFC05B44; - case 0xBFC05B58u: goto label_BFC05B58; - case 0xBFC05B60u: goto label_BFC05B60; - case 0xBFC05B68u: goto label_BFC05B68; - case 0xBFC05B6Cu: goto label_BFC05B6C; - case 0xBFC05B74u: goto label_BFC05B74; - case 0xBFC05B80u: goto label_BFC05B80; - case 0xBFC05B88u: goto label_BFC05B88; - case 0xBFC05B94u: goto label_BFC05B94; - case 0xBFC05B9Cu: goto label_BFC05B9C; - case 0xBFC05BA8u: goto label_BFC05BA8; - case 0xBFC05BACu: goto label_BFC05BAC; - case 0xBFC05BBCu: goto label_BFC05BBC; - case 0xBFC05BCCu: goto label_BFC05BCC; - case 0xBFC05BE0u: goto label_BFC05BE0; - case 0xBFC05BF0u: goto label_BFC05BF0; - case 0xBFC05BF8u: goto label_BFC05BF8; - case 0xBFC05BFCu: goto label_BFC05BFC; - case 0xBFC05C08u: goto label_BFC05C08; - case 0xBFC05C0Cu: goto label_BFC05C0C; - default: break; - } - } -label_BFC05A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05A44: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A48u); -#endif - /* 0xBFC05A48: 8C639154 lw $v1, -28332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05A4C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05A50: 240200F6 addiu $v0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240200F6u, cpu->gpr[2], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05A54: 1062000B beq $v1, $v0, 0xBFC05A84 */ - uint32_t psx_brA_BFC05A54 = cpu->gpr[3]; uint32_t psx_brB_BFC05A54 = cpu->gpr[2]; - psx_taken_BFC05A54 = (psx_brA_BFC05A54 == psx_brB_BFC05A54); - psx_delay_BFC05A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05A58: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A58u); return; } g_debug_last_store_pc = 0xBFC05A58u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A58u); -#endif - if (psx_delay_BFC05A54) { - psx_delay_BFC05A54 = 0; - if (psx_taken_BFC05A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A84u); - goto label_BFC05A84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A5Cu); - } -label_BFC05A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05A5C: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05A60: 10610008 beq $v1, $at, 0xBFC05A84 */ - uint32_t psx_brA_BFC05A60 = cpu->gpr[3]; uint32_t psx_brB_BFC05A60 = cpu->gpr[1]; - psx_taken_BFC05A60 = (psx_brA_BFC05A60 == psx_brB_BFC05A60); - psx_delay_BFC05A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A64u); -#endif - if (psx_delay_BFC05A60) { - psx_delay_BFC05A60 = 0; - if (psx_taken_BFC05A60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A84u); - goto label_BFC05A84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A68u); - } -label_BFC05A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC05A68: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A6Cu); -#endif - /* 0xBFC05A6C: 8DCE9158 lw $t6, -28328($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A6Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9158u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC05A74: 11C20003 beq $t6, $v0, 0xBFC05A84 */ - uint32_t psx_brA_BFC05A74 = cpu->gpr[14]; uint32_t psx_brB_BFC05A74 = cpu->gpr[2]; - psx_taken_BFC05A74 = (psx_brA_BFC05A74 == psx_brB_BFC05A74); - psx_delay_BFC05A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05A78: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A78u); -#endif - if (psx_delay_BFC05A74) { - psx_delay_BFC05A74 = 0; - if (psx_taken_BFC05A74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A84u); - goto label_BFC05A84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A7Cu); - } -label_BFC05A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC05A7C: 15C10016 bne $t6, $at, 0xBFC05AD8 */ - uint32_t psx_brA_BFC05A7C = cpu->gpr[14]; uint32_t psx_brB_BFC05A7C = cpu->gpr[1]; - psx_taken_BFC05A7C = (psx_brA_BFC05A7C != psx_brB_BFC05A7C); - psx_delay_BFC05A7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A80u); -#endif - if (psx_delay_BFC05A7C) { - psx_delay_BFC05A7C = 0; - if (psx_taken_BFC05A7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AD8u); - goto label_BFC05AD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A84u); - } -label_BFC05A84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05A84: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A88u); -#endif - /* 0xBFC05A88: 8DEF9180 lw $t7, -28288($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05A88u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9180u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05A90: 19E00008 blez $t7, 0xBFC05AB4 */ - uint32_t psx_brA_BFC05A90 = cpu->gpr[15]; - psx_taken_BFC05A90 = ((int32_t)psx_brA_BFC05A90 <= 0); - psx_delay_BFC05A90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05A94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05A94u); -#endif - if (psx_delay_BFC05A90) { - psx_delay_BFC05A90 = 0; - if (psx_taken_BFC05A90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AB4u); - goto label_BFC05AB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05A98u); - } -label_BFC05A98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A98: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05A9C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05AA0: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05AA8u; /* jal link before delay slot */ - psx_delay_BFC05AA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05AA4: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AA4u); -#endif - if (psx_delay_BFC05AA0) { - psx_delay_BFC05AA0 = 0; - cpu->gpr[31] = 0xBFC05AA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05AA8: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AACu); -#endif - /* 0xBFC05AAC: 8C639154 lw $v1, -28332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05AB0: 240200F6 addiu $v0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240200F6u, cpu->gpr[2], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AB0u); -#endif -label_BFC05AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05AB4: 10620003 beq $v1, $v0, 0xBFC05AC4 */ - uint32_t psx_brA_BFC05AB4 = cpu->gpr[3]; uint32_t psx_brB_BFC05AB4 = cpu->gpr[2]; - psx_taken_BFC05AB4 = (psx_brA_BFC05AB4 == psx_brB_BFC05AB4); - psx_delay_BFC05AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05AB8: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AB8u); -#endif - if (psx_delay_BFC05AB4) { - psx_delay_BFC05AB4 = 0; - if (psx_taken_BFC05AB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AC4u); - goto label_BFC05AC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05ABCu); - } -label_BFC05ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05ABC: 14610004 bne $v1, $at, 0xBFC05AD0 */ - uint32_t psx_brA_BFC05ABC = cpu->gpr[3]; uint32_t psx_brB_BFC05ABC = cpu->gpr[1]; - psx_taken_BFC05ABC = (psx_brA_BFC05ABC != psx_brB_BFC05ABC); - psx_delay_BFC05ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05AC0: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AC0u); -#endif - if (psx_delay_BFC05ABC) { - psx_delay_BFC05ABC = 0; - if (psx_taken_BFC05ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AD0u); - goto label_BFC05AD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AC4u); - } -label_BFC05AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05AC4: 10000004 beq $zero, $zero, 0xBFC05AD8 */ - uint32_t psx_brA_BFC05AC4 = cpu->gpr[0]; uint32_t psx_brB_BFC05AC4 = cpu->gpr[0]; - psx_taken_BFC05AC4 = (psx_brA_BFC05AC4 == psx_brB_BFC05AC4); - psx_delay_BFC05AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05AC8: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AC8u); -#endif - if (psx_delay_BFC05AC4) { - psx_delay_BFC05AC4 = 0; - if (psx_taken_BFC05AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AD8u); - goto label_BFC05AD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05ACCu); - } -label_BFC05ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05ACC: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05ACCu); -#endif -label_BFC05AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05AD0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC05AD4: AC389158 sw $t8, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AD4u); return; } g_debug_last_store_pc = 0xBFC05AD4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389158u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AD4u); -#endif -label_BFC05AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05AD8: 240200E6 addiu $v0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240200E6u, cpu->gpr[2], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05ADC: 14620003 bne $v1, $v0, 0xBFC05AEC */ - uint32_t psx_brA_BFC05ADC = cpu->gpr[3]; uint32_t psx_brB_BFC05ADC = cpu->gpr[2]; - psx_taken_BFC05ADC = (psx_brA_BFC05ADC != psx_brB_BFC05ADC); - psx_delay_BFC05ADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05AE0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05AE0u); -#endif - if (psx_delay_BFC05ADC) { - psx_delay_BFC05ADC = 0; - if (psx_taken_BFC05ADC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AECu); - goto label_BFC05AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AE4u); - } -label_BFC05AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05AE4: 10000013 beq $zero, $zero, 0xBFC05B34 */ - uint32_t psx_brA_BFC05AE4 = cpu->gpr[0]; uint32_t psx_brB_BFC05AE4 = cpu->gpr[0]; - psx_taken_BFC05AE4 = (psx_brA_BFC05AE4 == psx_brB_BFC05AE4); - psx_delay_BFC05AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05AE8: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AE8u); return; } g_debug_last_store_pc = 0xBFC05AE8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AE8u); -#endif - if (psx_delay_BFC05AE4) { - psx_delay_BFC05AE4 = 0; - if (psx_taken_BFC05AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B34u); - goto label_BFC05B34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AECu); - } -label_BFC05AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05AEC: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05AF0: 14610003 bne $v1, $at, 0xBFC05B00 */ - uint32_t psx_brA_BFC05AF0 = cpu->gpr[3]; uint32_t psx_brB_BFC05AF0 = cpu->gpr[1]; - psx_taken_BFC05AF0 = (psx_brA_BFC05AF0 != psx_brB_BFC05AF0); - psx_delay_BFC05AF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05AF4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05AF4u); -#endif - if (psx_delay_BFC05AF0) { - psx_delay_BFC05AF0 = 0; - if (psx_taken_BFC05AF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B00u); - goto label_BFC05B00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05AF8u); - } -label_BFC05AF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05AF8: 1000000E beq $zero, $zero, 0xBFC05B34 */ - uint32_t psx_brA_BFC05AF8 = cpu->gpr[0]; uint32_t psx_brB_BFC05AF8 = cpu->gpr[0]; - psx_taken_BFC05AF8 = (psx_brA_BFC05AF8 == psx_brB_BFC05AF8); - psx_delay_BFC05AF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05AFC: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AFCu); return; } g_debug_last_store_pc = 0xBFC05AFCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05AFCu); -#endif - if (psx_delay_BFC05AF8) { - psx_delay_BFC05AF8 = 0; - if (psx_taken_BFC05AF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B34u); - goto label_BFC05B34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B00u); - } -label_BFC05B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC05B00: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B04u); -#endif - /* 0xBFC05B04: 8F399158 lw $t9, -28328($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B04u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399158u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05B08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC05B0C: 17220003 bne $t9, $v0, 0xBFC05B1C */ - uint32_t psx_brA_BFC05B0C = cpu->gpr[25]; uint32_t psx_brB_BFC05B0C = cpu->gpr[2]; - psx_taken_BFC05B0C = (psx_brA_BFC05B0C != psx_brB_BFC05B0C); - psx_delay_BFC05B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05B10: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B10u); -#endif - if (psx_delay_BFC05B0C) { - psx_delay_BFC05B0C = 0; - if (psx_taken_BFC05B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B1Cu); - goto label_BFC05B1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B14u); - } -label_BFC05B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05B14: 10000007 beq $zero, $zero, 0xBFC05B34 */ - uint32_t psx_brA_BFC05B14 = cpu->gpr[0]; uint32_t psx_brB_BFC05B14 = cpu->gpr[0]; - psx_taken_BFC05B14 = (psx_brA_BFC05B14 == psx_brB_BFC05B14); - psx_delay_BFC05B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B18: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B18u); return; } g_debug_last_store_pc = 0xBFC05B18u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B18u); -#endif - if (psx_delay_BFC05B14) { - psx_delay_BFC05B14 = 0; - if (psx_taken_BFC05B14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B34u); - goto label_BFC05B34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B1Cu); - } -label_BFC05B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC05B1C: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B20u); -#endif - /* 0xBFC05B20: 8D089158 lw $t0, -28328($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B20u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089158u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05B24: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC05B28: 15010012 bne $t0, $at, 0xBFC05B74 */ - uint32_t psx_brA_BFC05B28 = cpu->gpr[8]; uint32_t psx_brB_BFC05B28 = cpu->gpr[1]; - psx_taken_BFC05B28 = (psx_brA_BFC05B28 != psx_brB_BFC05B28); - psx_delay_BFC05B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05B2C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B2Cu); -#endif - if (psx_delay_BFC05B28) { - psx_delay_BFC05B28 = 0; - if (psx_taken_BFC05B28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B74u); - goto label_BFC05B74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B30u); - } -label_BFC05B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B30: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B30u); return; } g_debug_last_store_pc = 0xBFC05B30u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B30u); -#endif -label_BFC05B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05B34: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05B38: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05B3C: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05B44u; /* jal link before delay slot */ - psx_delay_BFC05B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05B40: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B40u); -#endif - if (psx_delay_BFC05B3C) { - psx_delay_BFC05B3C = 0; - cpu->gpr[31] = 0xBFC05B44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05B44: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B48u); -#endif - /* 0xBFC05B48: 8C639154 lw $v1, -28332($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05B4C: 240200E6 addiu $v0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240200E6u, cpu->gpr[2], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05B50: 10620003 beq $v1, $v0, 0xBFC05B60 */ - uint32_t psx_brA_BFC05B50 = cpu->gpr[3]; uint32_t psx_brB_BFC05B50 = cpu->gpr[2]; - psx_taken_BFC05B50 = (psx_brA_BFC05B50 == psx_brB_BFC05B50); - psx_delay_BFC05B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05B54: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B54u); -#endif - if (psx_delay_BFC05B50) { - psx_delay_BFC05B50 = 0; - if (psx_taken_BFC05B50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B60u); - goto label_BFC05B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B58u); - } -label_BFC05B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B58: 14610004 bne $v1, $at, 0xBFC05B6C */ - uint32_t psx_brA_BFC05B58 = cpu->gpr[3]; uint32_t psx_brB_BFC05B58 = cpu->gpr[1]; - psx_taken_BFC05B58 = (psx_brA_BFC05B58 != psx_brB_BFC05B58); - psx_delay_BFC05B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC05B5C: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B5Cu); -#endif - if (psx_delay_BFC05B58) { - psx_delay_BFC05B58 = 0; - if (psx_taken_BFC05B58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B6Cu); - goto label_BFC05B6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B60u); - } -label_BFC05B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05B60: 10000004 beq $zero, $zero, 0xBFC05B74 */ - uint32_t psx_brA_BFC05B60 = cpu->gpr[0]; uint32_t psx_brB_BFC05B60 = cpu->gpr[0]; - psx_taken_BFC05B60 = (psx_brA_BFC05B60 == psx_brB_BFC05B60); - psx_delay_BFC05B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05B64: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B64u); -#endif - if (psx_delay_BFC05B60) { - psx_delay_BFC05B60 = 0; - if (psx_taken_BFC05B60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B74u); - goto label_BFC05B74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B68u); - } -label_BFC05B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC05B68: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B68u); -#endif -label_BFC05B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05B6C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC05B70: AC299158 sw $t1, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B70u); return; } g_debug_last_store_pc = 0xBFC05B70u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299158u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B70u); -#endif -label_BFC05B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05B74: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B78: 14610003 bne $v1, $at, 0xBFC05B88 */ - uint32_t psx_brA_BFC05B78 = cpu->gpr[3]; uint32_t psx_brB_BFC05B78 = cpu->gpr[1]; - psx_taken_BFC05B78 = (psx_brA_BFC05B78 != psx_brB_BFC05B78); - psx_delay_BFC05B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05B7C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B7Cu); -#endif - if (psx_delay_BFC05B78) { - psx_delay_BFC05B78 = 0; - if (psx_taken_BFC05B78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B88u); - goto label_BFC05B88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B80u); - } -label_BFC05B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05B80: 1000000A beq $zero, $zero, 0xBFC05BAC */ - uint32_t psx_brA_BFC05B80 = cpu->gpr[0]; uint32_t psx_brB_BFC05B80 = cpu->gpr[0]; - psx_taken_BFC05B80 = (psx_brA_BFC05B80 == psx_brB_BFC05B80); - psx_delay_BFC05B80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B84: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B84u); return; } g_debug_last_store_pc = 0xBFC05B84u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B84u); -#endif - if (psx_delay_BFC05B80) { - psx_delay_BFC05B80 = 0; - if (psx_taken_BFC05B80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BACu); - goto label_BFC05BAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B88u); - } -label_BFC05B88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05B88: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B8C: 14610003 bne $v1, $at, 0xBFC05B9C */ - uint32_t psx_brA_BFC05B8C = cpu->gpr[3]; uint32_t psx_brB_BFC05B8C = cpu->gpr[1]; - psx_taken_BFC05B8C = (psx_brA_BFC05B8C != psx_brB_BFC05B8C); - psx_delay_BFC05B8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05B90: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05B90u); -#endif - if (psx_delay_BFC05B8C) { - psx_delay_BFC05B8C = 0; - if (psx_taken_BFC05B8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B9Cu); - goto label_BFC05B9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B94u); - } -label_BFC05B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05B94: 10000005 beq $zero, $zero, 0xBFC05BAC */ - uint32_t psx_brA_BFC05B94 = cpu->gpr[0]; uint32_t psx_brB_BFC05B94 = cpu->gpr[0]; - psx_taken_BFC05B94 = (psx_brA_BFC05B94 == psx_brB_BFC05B94); - psx_delay_BFC05B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05B98: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B98u); return; } g_debug_last_store_pc = 0xBFC05B98u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B98u); -#endif - if (psx_delay_BFC05B94) { - psx_delay_BFC05B94 = 0; - if (psx_taken_BFC05B94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BACu); - goto label_BFC05BAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05B9Cu); - } -label_BFC05B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05B9C: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05BA0: 1461000A bne $v1, $at, 0xBFC05BCC */ - uint32_t psx_brA_BFC05BA0 = cpu->gpr[3]; uint32_t psx_brB_BFC05BA0 = cpu->gpr[1]; - psx_taken_BFC05BA0 = (psx_brA_BFC05BA0 != psx_brB_BFC05BA0); - psx_delay_BFC05BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05BA4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BA4u); -#endif - if (psx_delay_BFC05BA0) { - psx_delay_BFC05BA0 = 0; - if (psx_taken_BFC05BA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BCCu); - goto label_BFC05BCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BA8u); - } -label_BFC05BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05BA8: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BA8u); return; } g_debug_last_store_pc = 0xBFC05BA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BA8u); -#endif -label_BFC05BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BAC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BB0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05BB4: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05BBCu; /* jal link before delay slot */ - psx_delay_BFC05BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05BB8: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BB8u); -#endif - if (psx_delay_BFC05BB4) { - psx_delay_BFC05BB4 = 0; - cpu->gpr[31] = 0xBFC05BBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05BBC: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05BC0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05BC4: 10000010 beq $zero, $zero, 0xBFC05C08 */ - uint32_t psx_brA_BFC05BC4 = cpu->gpr[0]; uint32_t psx_brB_BFC05BC4 = cpu->gpr[0]; - psx_taken_BFC05BC4 = (psx_brA_BFC05BC4 == psx_brB_BFC05BC4); - psx_delay_BFC05BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05BC8: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BC8u); return; } g_debug_last_store_pc = 0xBFC05BC8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BC8u); -#endif - if (psx_delay_BFC05BC4) { - psx_delay_BFC05BC4 = 0; - if (psx_taken_BFC05BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C08u); - goto label_BFC05C08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BCCu); - } -label_BFC05BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05BCC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05BD0: AC239154 sw $v1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BD0u); return; } g_debug_last_store_pc = 0xBFC05BD0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239154u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05BD4: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC05BD8: 14610008 bne $v1, $at, 0xBFC05BFC */ - uint32_t psx_brA_BFC05BD8 = cpu->gpr[3]; uint32_t psx_brB_BFC05BD8 = cpu->gpr[1]; - psx_taken_BFC05BD8 = (psx_brA_BFC05BD8 != psx_brB_BFC05BD8); - psx_delay_BFC05BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BDC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BDCu); -#endif - if (psx_delay_BFC05BD8) { - psx_delay_BFC05BD8 = 0; - if (psx_taken_BFC05BD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BFCu); - goto label_BFC05BFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BE0u); - } -label_BFC05BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BE0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BE4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05BE8: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05BF0u; /* jal link before delay slot */ - psx_delay_BFC05BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05BEC: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BECu); -#endif - if (psx_delay_BFC05BE8) { - psx_delay_BFC05BE8 = 0; - cpu->gpr[31] = 0xBFC05BF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05BF0: 10000006 beq $zero, $zero, 0xBFC05C0C */ - uint32_t psx_brA_BFC05BF0 = cpu->gpr[0]; uint32_t psx_brB_BFC05BF0 = cpu->gpr[0]; - psx_taken_BFC05BF0 = (psx_brA_BFC05BF0 == psx_brB_BFC05BF0); - psx_delay_BFC05BF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BF4u); -#endif - /* 0xBFC05BF4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BF4u); -#endif - if (psx_delay_BFC05BF0) { - psx_delay_BFC05BF0 = 0; - if (psx_taken_BFC05BF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C0Cu); - goto label_BFC05C0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05BF8u); - } -label_BFC05BF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BF8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05BF8u); -#endif -label_BFC05BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05BFC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05C00: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05C08u; /* jal link before delay slot */ - psx_delay_BFC05C00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05C04: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C04u); -#endif - if (psx_delay_BFC05C00) { - psx_delay_BFC05C00 = 0; - cpu->gpr[31] = 0xBFC05C08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05C08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C08u); -#endif - /* 0xBFC05C08: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C08u); -#endif -label_BFC05C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05C0C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05C10: 03E00008 jr $ra */ - psx_delay_BFC05C10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05C14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05C14u); -#endif - if (psx_delay_BFC05C10) { - psx_delay_BFC05C10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05C18(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05C18u); - int psx_delay_BFC05C18 = 0; - int psx_taken_BFC05C18 = 0; - int psx_delay_BFC05C20 = 0; - int psx_taken_BFC05C20 = 0; - int psx_delay_BFC05C48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05C20u: goto label_BFC05C20; - case 0xBFC05C28u: goto label_BFC05C28; - case 0xBFC05C2Cu: goto label_BFC05C2C; - default: break; - } - } -label_BFC05C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05C18: 14800004 bne $a0, $zero, 0xBFC05C2C */ - uint32_t psx_brA_BFC05C18 = cpu->gpr[4]; uint32_t psx_brB_BFC05C18 = cpu->gpr[0]; - psx_taken_BFC05C18 = (psx_brA_BFC05C18 != psx_brB_BFC05C18); - psx_delay_BFC05C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05C1C: 24020016 addiu $v0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24020016u, cpu->gpr[2], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C1Cu); -#endif - if (psx_delay_BFC05C18) { - psx_delay_BFC05C18 = 0; - if (psx_taken_BFC05C18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C2Cu); - goto label_BFC05C2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C20u); - } -label_BFC05C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05C20: 10000002 beq $zero, $zero, 0xBFC05C2C */ - uint32_t psx_brA_BFC05C20 = cpu->gpr[0]; uint32_t psx_brB_BFC05C20 = cpu->gpr[0]; - psx_taken_BFC05C20 = (psx_brA_BFC05C20 == psx_brB_BFC05C20); - psx_delay_BFC05C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05C24: 24020015 addiu $v0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24020015u, cpu->gpr[2], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C24u); -#endif - if (psx_delay_BFC05C20) { - psx_delay_BFC05C20 = 0; - if (psx_taken_BFC05C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C2Cu); - goto label_BFC05C2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C28u); - } -label_BFC05C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05C28: 24020016 addiu $v0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24020016u, cpu->gpr[2], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C28u); -#endif -label_BFC05C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC05C2C: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C30u); -#endif - /* 0xBFC05C30: 8DCEDF58 lw $t6, -8360($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C30u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDF58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05C34: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05C38: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05C38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C3Cu); -#endif - /* 0xBFC05C3C: 8DEFDF5C lw $t7, -8356($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C3Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05C40: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC05C44: A1E20000 sb $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05C44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA1E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05C48: 03E00008 jr $ra */ - psx_delay_BFC05C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05C4C: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C4Cu); return; } g_debug_last_store_pc = 0xBFC05C4Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C4Cu); -#endif - if (psx_delay_BFC05C48) { - psx_delay_BFC05C48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05C50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05C50u); - int psx_delay_BFC05CA8 = 0; - int psx_taken_BFC05CA8 = 0; - int psx_delay_BFC05CBC = 0; - int psx_taken_BFC05CBC = 0; - int psx_delay_BFC05CD0 = 0; - int psx_taken_BFC05CD0 = 0; - int psx_delay_BFC05CEC = 0; - int psx_delay_BFC05CFC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05C94u: goto label_BFC05C94; - case 0xBFC05CB0u: goto label_BFC05CB0; - case 0xBFC05CC4u: goto label_BFC05CC4; - case 0xBFC05CD8u: goto label_BFC05CD8; - case 0xBFC05CE4u: goto label_BFC05CE4; - case 0xBFC05CF4u: goto label_BFC05CF4; - default: break; - } - } -label_BFC05C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05C50: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C54u); -#endif - /* 0xBFC05C54: 8C63DF5C lw $v1, -8356($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C54u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05C58: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05C5C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C5Cu); return; } g_debug_last_store_pc = 0xBFC05C5Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05C60: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C64u); -#endif - /* 0xBFC05C64: 8C4291A0 lw $v0, -28256($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291A0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C68u); -#endif - /* 0xBFC05C68: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05C6C: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC05C70: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05C70u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C74u); -#endif - /* 0xBFC05C74: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC05C7C: A04F0001 sb $t7, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05C7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C80u); -#endif - /* 0xBFC05C80: 90780000 lbu $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x90780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05C84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC05C88: A0580002 sb $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05C88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C8Cu); -#endif - /* 0xBFC05C8C: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05C90: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05C90u); -#endif -label_BFC05C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C94u); -#endif - /* 0xBFC05C94: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C98u); -#endif - /* 0xBFC05C98: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05C9Cu); -#endif - /* 0xBFC05C9C: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CA0u); -#endif - /* 0xBFC05CA0: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05CA4: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC05CA8: 1444FFFA bne $v0, $a0, 0xBFC05C94 */ - uint32_t psx_brA_BFC05CA8 = cpu->gpr[2]; uint32_t psx_brB_BFC05CA8 = cpu->gpr[4]; - psx_taken_BFC05CA8 = (psx_brA_BFC05CA8 != psx_brB_BFC05CA8); - psx_delay_BFC05CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05CACu); -#endif - if (psx_delay_BFC05CA8) { - psx_delay_BFC05CA8 = 0; - if (psx_taken_BFC05CA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05C94u); - goto label_BFC05C94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05CB0u); - } -label_BFC05CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05CB0: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CB4u); -#endif - /* 0xBFC05CB4: 8C429158 lw $v0, -28328($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429158u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05CB8: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05CBC: 10410006 beq $v0, $at, 0xBFC05CD8 */ - uint32_t psx_brA_BFC05CBC = cpu->gpr[2]; uint32_t psx_brB_BFC05CBC = cpu->gpr[1]; - psx_taken_BFC05CBC = (psx_brA_BFC05CBC == psx_brB_BFC05CBC); - psx_delay_BFC05CBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05CC0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CC0u); -#endif - if (psx_delay_BFC05CBC) { - psx_delay_BFC05CBC = 0; - if (psx_taken_BFC05CBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05CD8u); - goto label_BFC05CD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05CC4u); - } -label_BFC05CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05CC4: AC229154 sw $v0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CC4u); return; } g_debug_last_store_pc = 0xBFC05CC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229154u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05CC8: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05CCC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05CD0: 10000004 beq $zero, $zero, 0xBFC05CE4 */ - uint32_t psx_brA_BFC05CD0 = cpu->gpr[0]; uint32_t psx_brB_BFC05CD0 = cpu->gpr[0]; - psx_taken_BFC05CD0 = (psx_brA_BFC05CD0 == psx_brB_BFC05CD0); - psx_delay_BFC05CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC05CD4: AC229158 sw $v0, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CD4u); return; } g_debug_last_store_pc = 0xBFC05CD4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229158u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CD4u); -#endif - if (psx_delay_BFC05CD0) { - psx_delay_BFC05CD0 = 0; - if (psx_taken_BFC05CD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05CE4u); - goto label_BFC05CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05CD8u); - } -label_BFC05CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC05CD8: 3419FFFF ori $t9, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05CDC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC05CE0: AC399154 sw $t9, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CE0u); return; } g_debug_last_store_pc = 0xBFC05CE0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399154u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CE0u); -#endif -label_BFC05CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05CE4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05CE8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05CEC: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05CF4u; /* jal link before delay slot */ - psx_delay_BFC05CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05CF0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CF0u); -#endif - if (psx_delay_BFC05CEC) { - psx_delay_BFC05CEC = 0; - cpu->gpr[31] = 0xBFC05CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CF4u); -#endif - /* 0xBFC05CF4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05CF8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05CFC: 03E00008 jr $ra */ - psx_delay_BFC05CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05D00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05D00u); -#endif - if (psx_delay_BFC05CFC) { - psx_delay_BFC05CFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05D04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05D04u); - int psx_delay_BFC05D34 = 0; - int psx_taken_BFC05D34 = 0; - int psx_delay_BFC05D64 = 0; - int psx_taken_BFC05D64 = 0; - int psx_delay_BFC05D7C = 0; - int psx_taken_BFC05D7C = 0; - int psx_delay_BFC05D98 = 0; - int psx_delay_BFC05DA8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05D20u: goto label_BFC05D20; - case 0xBFC05D3Cu: goto label_BFC05D3C; - case 0xBFC05D6Cu: goto label_BFC05D6C; - case 0xBFC05D84u: goto label_BFC05D84; - case 0xBFC05D90u: goto label_BFC05D90; - case 0xBFC05DA0u: goto label_BFC05DA0; - default: break; - } - } -label_BFC05D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05D04: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D08u); -#endif - /* 0xBFC05D08: 8C63DF5C lw $v1, -8356($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D08u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05D0C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05D10: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D10u); return; } g_debug_last_store_pc = 0xBFC05D10u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D14u); -#endif - /* 0xBFC05D14: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05D18: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05D1C: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D1Cu); -#endif -label_BFC05D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D20u); -#endif - /* 0xBFC05D20: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D24u); -#endif - /* 0xBFC05D24: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D28u); -#endif - /* 0xBFC05D28: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D2Cu); -#endif - /* 0xBFC05D2C: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05D30: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC05D34: 1444FFFA bne $v0, $a0, 0xBFC05D20 */ - uint32_t psx_brA_BFC05D34 = cpu->gpr[2]; uint32_t psx_brB_BFC05D34 = cpu->gpr[4]; - psx_taken_BFC05D34 = (psx_brA_BFC05D34 != psx_brB_BFC05D34); - psx_delay_BFC05D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05D38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05D38u); -#endif - if (psx_delay_BFC05D34) { - psx_delay_BFC05D34 = 0; - if (psx_taken_BFC05D34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D20u); - goto label_BFC05D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D3Cu); - } -label_BFC05D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05D3C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D40u); -#endif - /* 0xBFC05D40: 8C4291A0 lw $v0, -28256($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291A0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D44u); -#endif - /* 0xBFC05D44: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05D48: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D4Cu); -#endif - /* 0xBFC05D4C: 8C849158 lw $a0, -28328($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D4Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849158u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC05D50: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05D50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D54u); -#endif - /* 0xBFC05D54: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05D58: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC05D5C: A04F0001 sb $t7, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05D5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D60u); -#endif - /* 0xBFC05D60: 90780000 lbu $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x90780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC05D64: 10810007 beq $a0, $at, 0xBFC05D84 */ - uint32_t psx_brA_BFC05D64 = cpu->gpr[4]; uint32_t psx_brB_BFC05D64 = cpu->gpr[1]; - psx_taken_BFC05D64 = (psx_brA_BFC05D64 == psx_brB_BFC05D64); - psx_delay_BFC05D64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC05D68: A0580002 sb $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05D68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D68u); -#endif - if (psx_delay_BFC05D64) { - psx_delay_BFC05D64 = 0; - if (psx_taken_BFC05D64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D84u); - goto label_BFC05D84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D6Cu); - } -label_BFC05D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05D6C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC05D70: AC249154 sw $a0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D70u); return; } g_debug_last_store_pc = 0xBFC05D70u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249154u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC05D74: 3404FFFF ori $a0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3404FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05D78: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05D7C: 10000004 beq $zero, $zero, 0xBFC05D90 */ - uint32_t psx_brA_BFC05D7C = cpu->gpr[0]; uint32_t psx_brB_BFC05D7C = cpu->gpr[0]; - psx_taken_BFC05D7C = (psx_brA_BFC05D7C == psx_brB_BFC05D7C); - psx_delay_BFC05D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC05D80: AC249158 sw $a0, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D80u); return; } g_debug_last_store_pc = 0xBFC05D80u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249158u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D80u); -#endif - if (psx_delay_BFC05D7C) { - psx_delay_BFC05D7C = 0; - if (psx_taken_BFC05D7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D90u); - goto label_BFC05D90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05D84u); - } -label_BFC05D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC05D84: 3419FFFF ori $t9, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05D88: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC05D8C: AC399154 sw $t9, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D8Cu); return; } g_debug_last_store_pc = 0xBFC05D8Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399154u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D8Cu); -#endif -label_BFC05D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05D90: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05D94: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05D98: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05DA0u; /* jal link before delay slot */ - psx_delay_BFC05D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05D9C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05D9Cu); -#endif - if (psx_delay_BFC05D98) { - psx_delay_BFC05D98 = 0; - cpu->gpr[31] = 0xBFC05DA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DA0u); -#endif - /* 0xBFC05DA0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05DA4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05DA8: 03E00008 jr $ra */ - psx_delay_BFC05DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05DACu); -#endif - if (psx_delay_BFC05DA8) { - psx_delay_BFC05DA8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05DB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05DB0u); - int psx_delay_BFC05DDC = 0; - int psx_delay_BFC05DEC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05DE4u: goto label_BFC05DE4; - default: break; - } - } -label_BFC05DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC05DB0: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DB4u); -#endif - /* 0xBFC05DB4: 8DCE9164 lw $t6, -28316($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28316; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DB4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9164u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05DB8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC05DBC: 308300FF andi $v1, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05DC0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DC0u); return; } g_debug_last_store_pc = 0xBFC05DC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC05DC4: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05DC8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05DCC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC05DD0: A1C30000 sb $v1, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05DD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA1C30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC05DD4: AC2F9154 sw $t7, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DD4u); return; } g_debug_last_store_pc = 0xBFC05DD4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9154u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05DD8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05DDC: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05DE4u; /* jal link before delay slot */ - psx_delay_BFC05DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05DE0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DE0u); -#endif - if (psx_delay_BFC05DDC) { - psx_delay_BFC05DDC = 0; - cpu->gpr[31] = 0xBFC05DE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DE4u); -#endif - /* 0xBFC05DE4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05DE8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05DEC: 03E00008 jr $ra */ - psx_delay_BFC05DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05DF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05DF0u); -#endif - if (psx_delay_BFC05DEC) { - psx_delay_BFC05DEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05DF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05DF4u); - int psx_delay_BFC05E24 = 0; - int psx_taken_BFC05E24 = 0; - int psx_delay_BFC05E40 = 0; - int psx_delay_BFC05E50 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05E1Cu: goto label_BFC05E1C; - case 0xBFC05E2Cu: goto label_BFC05E2C; - case 0xBFC05E48u: goto label_BFC05E48; - default: break; - } - } -label_BFC05DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05DF4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DF8u); -#endif - /* 0xBFC05DF8: 8C84DF5C lw $a0, -8356($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DF8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DF5Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05DFC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05E00: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E00u); return; } g_debug_last_store_pc = 0xBFC05E00u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05E04: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E08u); -#endif - /* 0xBFC05E08: 8DEF9168 lw $t7, -28312($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28312; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E08u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9168u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E0Cu); -#endif - /* 0xBFC05E0C: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05E10: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05E14: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC05E18: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05E18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E18u); -#endif -label_BFC05E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E1Cu); -#endif - /* 0xBFC05E1C: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05E20: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC05E24: 1443FFFD bne $v0, $v1, 0xBFC05E1C */ - uint32_t psx_brA_BFC05E24 = cpu->gpr[2]; uint32_t psx_brB_BFC05E24 = cpu->gpr[3]; - psx_taken_BFC05E24 = (psx_brA_BFC05E24 != psx_brB_BFC05E24); - psx_delay_BFC05E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05E28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05E28u); -#endif - if (psx_delay_BFC05E24) { - psx_delay_BFC05E24 = 0; - if (psx_taken_BFC05E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05E1Cu); - goto label_BFC05E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05E2Cu); - } -label_BFC05E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05E2C: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05E30: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05E34: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC05E38: AC389154 sw $t8, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E38u); return; } g_debug_last_store_pc = 0xBFC05E38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389154u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05E3C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05E40: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC05E48u; /* jal link before delay slot */ - psx_delay_BFC05E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC05E44: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E44u); -#endif - if (psx_delay_BFC05E40) { - psx_delay_BFC05E40 = 0; - cpu->gpr[31] = 0xBFC05E48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC05E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E48u); -#endif - /* 0xBFC05E48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05E4C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05E50: 03E00008 jr $ra */ - psx_delay_BFC05E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05E54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05E54u); -#endif - if (psx_delay_BFC05E50) { - psx_delay_BFC05E50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05E58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05E58u); - int psx_delay_BFC05E74 = 0; - int psx_taken_BFC05E74 = 0; - int psx_delay_BFC05E88 = 0; - int psx_taken_BFC05E88 = 0; - int psx_delay_BFC05E98 = 0; - int psx_taken_BFC05E98 = 0; - int psx_delay_BFC05EB8 = 0; - int psx_delay_BFC05ECC = 0; - int psx_taken_BFC05ECC = 0; - int psx_delay_BFC05EDC = 0; - int psx_taken_BFC05EDC = 0; - int psx_delay_BFC05F00 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05E7Cu: goto label_BFC05E7C; - case 0xBFC05E90u: goto label_BFC05E90; - case 0xBFC05EA0u: goto label_BFC05EA0; - case 0xBFC05EA4u: goto label_BFC05EA4; - case 0xBFC05EACu: goto label_BFC05EAC; - case 0xBFC05EC0u: goto label_BFC05EC0; - case 0xBFC05ED4u: goto label_BFC05ED4; - case 0xBFC05EE4u: goto label_BFC05EE4; - case 0xBFC05EE8u: goto label_BFC05EE8; - case 0xBFC05EF0u: goto label_BFC05EF0; - default: break; - } - } -label_BFC05E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC05E58: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E5Cu); -#endif - /* 0xBFC05E5C: 8DCEDF58 lw $t6, -8360($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E5Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDF58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05E60: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05E64: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05E64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E68u); -#endif - /* 0xBFC05E68: 8DEF9190 lw $t7, -28272($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E68u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9190u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC05E70: 31F80100 andi $t8, $t7, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x100u; - PGXP_ALU(0x31F80100u, cpu->gpr[24], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC05E74: 17000012 bne $t8, $zero, 0xBFC05EC0 */ - uint32_t psx_brA_BFC05E74 = cpu->gpr[24]; uint32_t psx_brB_BFC05E74 = cpu->gpr[0]; - psx_taken_BFC05E74 = (psx_brA_BFC05E74 != psx_brB_BFC05E74); - psx_delay_BFC05E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05E78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05E78u); -#endif - if (psx_delay_BFC05E74) { - psx_delay_BFC05E74 = 0; - if (psx_taken_BFC05E74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EC0u); - goto label_BFC05EC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05E7Cu); - } -label_BFC05E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC05E7C: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E80u); -#endif - /* 0xBFC05E80: 8F399154 lw $t9, -28332($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E80u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399154u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05E84: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC05E88: 17210006 bne $t9, $at, 0xBFC05EA4 */ - uint32_t psx_brA_BFC05E88 = cpu->gpr[25]; uint32_t psx_brB_BFC05E88 = cpu->gpr[1]; - psx_taken_BFC05E88 = (psx_brA_BFC05E88 != psx_brB_BFC05E88); - psx_delay_BFC05E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC05E8C: 240900E6 addiu $t1, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240900E6u, cpu->gpr[9], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E8Cu); -#endif - if (psx_delay_BFC05E88) { - psx_delay_BFC05E88 = 0; - if (psx_taken_BFC05E88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EA4u); - goto label_BFC05EA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05E90u); - } -label_BFC05E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC05E90: 240800F6 addiu $t0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240800F6u, cpu->gpr[8], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05E94: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05E98: 10000004 beq $zero, $zero, 0xBFC05EAC */ - uint32_t psx_brA_BFC05E98 = cpu->gpr[0]; uint32_t psx_brB_BFC05E98 = cpu->gpr[0]; - psx_taken_BFC05E98 = (psx_brA_BFC05E98 == psx_brB_BFC05E98); - psx_delay_BFC05E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC05E9C: AC289154 sw $t0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E9Cu); return; } g_debug_last_store_pc = 0xBFC05E9Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289154u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05E9Cu); -#endif - if (psx_delay_BFC05E98) { - psx_delay_BFC05E98 = 0; - if (psx_taken_BFC05E98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EACu); - goto label_BFC05EAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EA0u); - } -label_BFC05EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC05EA0: 240900E6 addiu $t1, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240900E6u, cpu->gpr[9], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EA0u); -#endif -label_BFC05EA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05EA4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC05EA8: AC299154 sw $t1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EA8u); return; } g_debug_last_store_pc = 0xBFC05EA8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299154u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EA8u); -#endif -label_BFC05EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC05EAC: 3C0BBFC1 lui $t3, 0xBFC1 */ - cpu->gpr[11] = 0xBFC10000u; - PGXP_ALU(0x3C0BBFC1u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EB0u); -#endif - /* 0xBFC05EB0: 8D6BDF5C lw $t3, -8356($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EB0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BDF5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC05EB4: 240A0006 addiu $t2, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x240A0006u, cpu->gpr[10], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05EB8: 03E00008 jr $ra */ - psx_delay_BFC05EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC05EBC: A16A0000 sb $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05EBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[11] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA16A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EBCu); -#endif - if (psx_delay_BFC05EB8) { - psx_delay_BFC05EB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC05EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC05EC0: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EC4u); -#endif - /* 0xBFC05EC4: 8D8C9154 lw $t4, -28332($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EC4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9154u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC05EC8: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC05ECC: 15810006 bne $t4, $at, 0xBFC05EE8 */ - uint32_t psx_brA_BFC05ECC = cpu->gpr[12]; uint32_t psx_brB_BFC05ECC = cpu->gpr[1]; - psx_taken_BFC05ECC = (psx_brA_BFC05ECC != psx_brB_BFC05ECC); - psx_delay_BFC05ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05ED0: 240E00EB addiu $t6, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240E00EBu, cpu->gpr[14], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05ED0u); -#endif - if (psx_delay_BFC05ECC) { - psx_delay_BFC05ECC = 0; - if (psx_taken_BFC05ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EE8u); - goto label_BFC05EE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05ED4u); - } -label_BFC05ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC05ED4: 240D00FB addiu $t5, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240D00FBu, cpu->gpr[13], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05ED8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05EDC: 10000004 beq $zero, $zero, 0xBFC05EF0 */ - uint32_t psx_brA_BFC05EDC = cpu->gpr[0]; uint32_t psx_brB_BFC05EDC = cpu->gpr[0]; - psx_taken_BFC05EDC = (psx_brA_BFC05EDC == psx_brB_BFC05EDC); - psx_delay_BFC05EDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC05EE0: AC2D9154 sw $t5, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EE0u); return; } g_debug_last_store_pc = 0xBFC05EE0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9154u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EE0u); -#endif - if (psx_delay_BFC05EDC) { - psx_delay_BFC05EDC = 0; - if (psx_taken_BFC05EDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EF0u); - goto label_BFC05EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05EE4u); - } -label_BFC05EE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05EE4: 240E00EB addiu $t6, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240E00EBu, cpu->gpr[14], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EE4u); -#endif -label_BFC05EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05EE8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC05EEC: AC2E9154 sw $t6, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EECu); return; } g_debug_last_store_pc = 0xBFC05EECu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EECu); -#endif -label_BFC05EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC05EF0: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EF4u); -#endif - /* 0xBFC05EF4: 8F18DF5C lw $t8, -8356($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EF4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC05EF8: 240F001B addiu $t7, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240F001Bu, cpu->gpr[15], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC05EFC: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05EFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC05F00: 03E00008 jr $ra */ - psx_delay_BFC05F00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05F04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC05F04u); -#endif - if (psx_delay_BFC05F00) { - psx_delay_BFC05F00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC05F08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC05F08u); - int psx_delay_BFC05F14 = 0; - int psx_taken_BFC05F14 = 0; - int psx_delay_BFC05F8C = 0; - int psx_delay_BFC05FC0 = 0; - int psx_taken_BFC05FC0 = 0; - int psx_delay_BFC05FE4 = 0; - int psx_taken_BFC05FE4 = 0; - int psx_delay_BFC05FEC = 0; - int psx_taken_BFC05FEC = 0; - int psx_delay_BFC06008 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC05F1Cu: goto label_BFC05F1C; - case 0xBFC05F94u: goto label_BFC05F94; - case 0xBFC05FC8u: goto label_BFC05FC8; - case 0xBFC05FECu: goto label_BFC05FEC; - case 0xBFC05FF4u: goto label_BFC05FF4; - case 0xBFC06000u: goto label_BFC06000; - case 0xBFC06004u: goto label_BFC06004; - default: break; - } - } -label_BFC05F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05F08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC05F08: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F0Cu); -#endif - /* 0xBFC05F0C: 8CC6917C lw $a2, -28292($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -28292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-28292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F0Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6917Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC05F10: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC05F14: 18C00035 blez $a2, 0xBFC05FEC */ - uint32_t psx_brA_BFC05F14 = cpu->gpr[6]; - psx_taken_BFC05F14 = ((int32_t)psx_brA_BFC05F14 <= 0); - psx_delay_BFC05F14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC05F18: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F18u); return; } g_debug_last_store_pc = 0xBFC05F18u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F18u); -#endif - if (psx_delay_BFC05F14) { - psx_delay_BFC05F14 = 0; - if (psx_taken_BFC05F14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05FECu); - goto label_BFC05FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05F1Cu); - } -label_BFC05F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC05F1C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F20u); -#endif - /* 0xBFC05F20: 8C849188 lw $a0, -28280($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F20u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849188u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05F24: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F28u); -#endif - /* 0xBFC05F28: 8C63DF58 lw $v1, -8360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F28u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC05F2C: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05F30: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F34u); -#endif - /* 0xBFC05F34: 8C42DF64 lw $v0, -8348($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42DF64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC05F38: AC24918C sw $a0, -28276($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F38u); return; } g_debug_last_store_pc = 0xBFC05F38u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24918Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05F3C: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05F3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F40u); -#endif - /* 0xBFC05F40: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC05F44: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05F44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F48u); -#endif - /* 0xBFC05F48: 90400000 lbu $zero, 0($v0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 0, 0x4u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05F4C: 240E0080 addiu $t6, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240E0080u, cpu->gpr[14], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05F50: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05F50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC05F54: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC05F58: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05F58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F5Cu); -#endif - /* 0xBFC05F5C: 8F18DF50 lw $t8, -8368($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8368; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F5Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF50u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05F60: 3C0F0002 lui $t7, 0x2 */ - cpu->gpr[15] = 0x00020000u; - PGXP_ALU(0x3C0F0002u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05F64: 35EF0943 ori $t7, $t7, 0x943 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] | 0x943u; - PGXP_ALU(0x35EF0943u, cpu->gpr[15], _pgx1, 0x0943u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC05F68: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC05F6C: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F6Cu); return; } g_debug_last_store_pc = 0xBFC05F6Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F70u); -#endif - /* 0xBFC05F70: 8D08DF54 lw $t0, -8364($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8364; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8364)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F70u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08DF54u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC05F74: 2419132C addiu $t9, $zero, 4908 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (4908)); - PGXP_ALU(0x2419132Cu, cpu->gpr[25], _pgx1, 0x0000132Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC05F78: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC05F7C: AD190000 sw $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F7Cu); return; } g_debug_last_store_pc = 0xBFC05F7Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC05F80: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F84u); -#endif - /* 0xBFC05F84: 8CA59198 lw $a1, -28264($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F84u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59198u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05F88: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC05F8C: 0FF01970 jal 0xBFC065C0 */ - cpu->gpr[31] = 0xBFC05F94u; /* jal link before delay slot */ - psx_delay_BFC05F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC05F90: AC26917C sw $a2, -28292($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F90u); return; } g_debug_last_store_pc = 0xBFC05F90u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26917Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F90u); -#endif - if (psx_delay_BFC05F8C) { - psx_delay_BFC05F8C = 0; - cpu->gpr[31] = 0xBFC05F94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC065C0u); - cpu->pc = 0xBFC065C0u; return; - } -label_BFC05F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC05F94: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F98u); -#endif - /* 0xBFC05F98: 8D4A9198 lw $t2, -28264($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05F98u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9198u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC05F9C: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FA0u); -#endif - /* 0xBFC05FA0: 8D299188 lw $t1, -28280($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -28280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-28280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FA0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299188u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC05FA4: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FA8u); -#endif - /* 0xBFC05FA8: 8CC6917C lw $a2, -28292($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -28292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-28292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FA8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6917Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC05FAC: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC05FB0: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FB4u); -#endif - /* 0xBFC05FB4: 8C63DF58 lw $v1, -8360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05FB8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1A00u); -#endif - /* 0xBFC05FBC: 012B6021 addu $t4, $t1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[9] + cpu->gpr[11]; - PGXP_ALU(0x012B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC05FC0: 14C0000F bne $a2, $zero, 0xBFC06000 */ - uint32_t psx_brA_BFC05FC0 = cpu->gpr[6]; uint32_t psx_brB_BFC05FC0 = cpu->gpr[0]; - psx_taken_BFC05FC0 = (psx_brA_BFC05FC0 != psx_brB_BFC05FC0); - psx_delay_BFC05FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC05FC4: AC2C9188 sw $t4, -28280($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FC4u); return; } g_debug_last_store_pc = 0xBFC05FC4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9188u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FC4u); -#endif - if (psx_delay_BFC05FC0) { - psx_delay_BFC05FC0 = 0; - if (psx_taken_BFC05FC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06000u); - goto label_BFC06000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05FC8u); - } -label_BFC05FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC05FC8: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05FC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC05FCC: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FD0u); -#endif - /* 0xBFC05FD0: 8DEFDF5C lw $t7, -8356($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FD0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC05FD4: 240D0FFF addiu $t5, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x240D0FFFu, cpu->gpr[13], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05FD8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC05FDC: AC2D9154 sw $t5, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FDCu); return; } g_debug_last_store_pc = 0xBFC05FDCu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9154u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC05FE0: 240E0009 addiu $t6, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240E0009u, cpu->gpr[14], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC05FE4: 10000006 beq $zero, $zero, 0xBFC06000 */ - uint32_t psx_brA_BFC05FE4 = cpu->gpr[0]; uint32_t psx_brB_BFC05FE4 = cpu->gpr[0]; - psx_taken_BFC05FE4 = (psx_brA_BFC05FE4 == psx_brB_BFC05FE4); - psx_delay_BFC05FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC05FE8: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05FE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FE8u); -#endif - if (psx_delay_BFC05FE4) { - psx_delay_BFC05FE4 = 0; - if (psx_taken_BFC05FE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06000u); - goto label_BFC06000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05FECu); - } -label_BFC05FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC05FEC: 14C00005 bne $a2, $zero, 0xBFC06004 */ - uint32_t psx_brA_BFC05FEC = cpu->gpr[6]; uint32_t psx_brB_BFC05FEC = cpu->gpr[0]; - psx_taken_BFC05FEC = (psx_brA_BFC05FEC != psx_brB_BFC05FEC); - psx_delay_BFC05FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FF0u); -#endif - /* 0xBFC05FF0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FF0u); -#endif - if (psx_delay_BFC05FEC) { - psx_delay_BFC05FEC = 0; - if (psx_taken_BFC05FEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06004u); - goto label_BFC06004; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC05FF4u); - } -label_BFC05FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC05FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC05FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC05FF4: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC05FF8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC05FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC05FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC05FFC: AC26917C sw $a2, -28292($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05FFCu); return; } g_debug_last_store_pc = 0xBFC05FFCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26917Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC05FFCu); -#endif -label_BFC06000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06000u); -#endif - /* 0xBFC06000: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06000u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06000u); -#endif -label_BFC06004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06004: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06008: 03E00008 jr $ra */ - psx_delay_BFC06008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0600Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0600C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0600Cu); -#endif - if (psx_delay_BFC06008) { - psx_delay_BFC06008 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06010(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06010u); - int psx_delay_BFC06020 = 0; - int psx_delay_BFC06030 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06028u: goto label_BFC06028; - default: break; - } - } -label_BFC06010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06010: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06014: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06014u); return; } g_debug_last_store_pc = 0xBFC06014u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06018: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0601Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0601C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0601Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06020: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC06028u; /* jal link before delay slot */ - psx_delay_BFC06020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06024: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06024u); -#endif - if (psx_delay_BFC06020) { - psx_delay_BFC06020 = 0; - cpu->gpr[31] = 0xBFC06028u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC06028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06028u); -#endif - /* 0xBFC06028: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06028u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0602C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06030: 03E00008 jr $ra */ - psx_delay_BFC06030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06034u); -#endif - if (psx_delay_BFC06030) { - psx_delay_BFC06030 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06038(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06038u); - int psx_delay_BFC060B4 = 0; - int psx_taken_BFC060B4 = 0; - int psx_delay_BFC060C4 = 0; - int psx_delay_BFC060D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0608Cu: goto label_BFC0608C; - case 0xBFC060BCu: goto label_BFC060BC; - case 0xBFC060CCu: goto label_BFC060CC; - default: break; - } - } -label_BFC06038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06038: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0603Cu); -#endif - /* 0xBFC0603C: 8C63DF5C lw $v1, -8356($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0603Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0603Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06040: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06044: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06048: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0604C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0604Cu); return; } g_debug_last_store_pc = 0xBFC0604Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC06050: A024B930 sb $a0, -18128($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18128; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06050u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-18128)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA024B930u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06054u); -#endif - /* 0xBFC06054: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06058: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0605C: A02EB931 sb $t6, -18127($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18127; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0605Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-18127)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EB931u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06060u); -#endif - /* 0xBFC06060: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06064: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC06068: A02FB932 sb $t7, -18126($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18126; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06068u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-18126)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FB932u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0606Cu); -#endif - /* 0xBFC0606C: 90780000 lbu $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x90780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0606Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06070: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06074: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06078: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0607C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06080: 2442B934 addiu $v0, $v0, -18124 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-18124)); - PGXP_ALU(0x2442B934u, cpu->gpr[2], _pgx1, 0xFFFFB934u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06084: 2484B938 addiu $a0, $a0, -18120 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18120)); - PGXP_ALU(0x2484B938u, cpu->gpr[4], _pgx1, 0xFFFFB938u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC06088: A038B933 sb $t8, -18125($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18125; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06088u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-18125)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038B933u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06088u); -#endif -label_BFC0608C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0608Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0608Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0608Cu); -#endif - /* 0xBFC0608C: 90790000 lbu $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 25, 0x8u); - PGXP_LOAD(0x90790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0608Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06090: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC06094: A059FFFC sb $t9, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06094u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-4)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA059FFFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06098u); -#endif - /* 0xBFC06098: 90680000 lbu $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 8, 0x8u); - PGXP_LOAD(0x90680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0609C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC060A0: A048FFFD sb $t0, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC060A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA048FFFDu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060A4u); -#endif - /* 0xBFC060A4: 90690000 lbu $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 9, 0x8u); - PGXP_LOAD(0x90690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC060A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC060A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC060AC: A049FFFE sb $t1, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC060ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FFFEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060B0u); -#endif - /* 0xBFC060B0: 906A0000 lbu $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 10, 0x8u); - PGXP_LOAD(0x906A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC060B4: 1444FFF5 bne $v0, $a0, 0xBFC0608C */ - uint32_t psx_brA_BFC060B4 = cpu->gpr[2]; uint32_t psx_brB_BFC060B4 = cpu->gpr[4]; - psx_taken_BFC060B4 = (psx_brA_BFC060B4 != psx_brB_BFC060B4); - psx_delay_BFC060B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC060B8: A04AFFFF sb $t2, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC060B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFFFFu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060B8u); -#endif - if (psx_delay_BFC060B4) { - psx_delay_BFC060B4 = 0; - if (psx_taken_BFC060B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0608Cu); - goto label_BFC0608C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC060BCu); - } -label_BFC060BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC060BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC060BC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC060C0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC060C4: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC060CCu; /* jal link before delay slot */ - psx_delay_BFC060C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC060C8: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060C8u); -#endif - if (psx_delay_BFC060C4) { - psx_delay_BFC060C4 = 0; - cpu->gpr[31] = 0xBFC060CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC060CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC060CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC060CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060CCu); -#endif - /* 0xBFC060CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC060CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC060D0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC060D4: 03E00008 jr $ra */ - psx_delay_BFC060D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC060D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC060D8u); -#endif - if (psx_delay_BFC060D4) { - psx_delay_BFC060D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC060DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC060DCu); - int psx_delay_BFC0610C = 0; - int psx_taken_BFC0610C = 0; - int psx_delay_BFC06128 = 0; - int psx_taken_BFC06128 = 0; - int psx_delay_BFC06144 = 0; - int psx_delay_BFC06154 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0610Cu: goto label_BFC0610C; - case 0xBFC06114u: goto label_BFC06114; - case 0xBFC06130u: goto label_BFC06130; - case 0xBFC06134u: goto label_BFC06134; - case 0xBFC0614Cu: goto label_BFC0614C; - default: break; - } - } -label_BFC060DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC060DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC060DC: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060E0u); -#endif - /* 0xBFC060E0: 8CA59174 lw $a1, -28300($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28300; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC060E0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59174u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC060E4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC060E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC060E8u); return; } g_debug_last_store_pc = 0xBFC060E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC060EC: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060F0u); -#endif - /* 0xBFC060F0: 90A20001 lbu $v0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 2, 0x20u); - PGXP_LOAD(0x90A20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC060F4: A0A40000 sb $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC060F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA0A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC060F8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC060F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC060FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC060FC: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC060FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06100u); -#endif - /* 0xBFC06100: 8C84DF5C lw $a0, -8356($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06100u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DF5Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06104: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC06108: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06108u); -#endif -label_BFC0610C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0610Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0610C: 10400009 beq $v0, $zero, 0xBFC06134 */ - uint32_t psx_brA_BFC0610C = cpu->gpr[2]; uint32_t psx_brB_BFC0610C = cpu->gpr[0]; - psx_taken_BFC0610C = (psx_brA_BFC0610C == psx_brB_BFC0610C); - psx_delay_BFC0610C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC06110: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06110u); -#endif - if (psx_delay_BFC0610C) { - psx_delay_BFC0610C = 0; - if (psx_taken_BFC0610C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06134u); - goto label_BFC06134; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06114u); - } -label_BFC06114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06114u); -#endif - /* 0xBFC06114: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8028u); -#endif - /* 0xBFC06118: 00A37821 addu $t7, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[3]; - PGXP_ALU(0x00A37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0611C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06120: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06124: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06128: 1000FFF8 beq $zero, $zero, 0xBFC0610C */ - uint32_t psx_brA_BFC06128 = cpu->gpr[0]; uint32_t psx_brB_BFC06128 = cpu->gpr[0]; - psx_taken_BFC06128 = (psx_brA_BFC06128 == psx_brB_BFC06128); - psx_delay_BFC06128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0612Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0612C: A1EE0002 sb $t6, 2($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0612Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (2)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0612Cu); -#endif - if (psx_delay_BFC06128) { - psx_delay_BFC06128 = 0; - if (psx_taken_BFC06128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0610Cu); - goto label_BFC0610C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06130u); - } -label_BFC06130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC06130: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06130u); -#endif -label_BFC06134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06134: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06138: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0613C: AC389154 sw $t8, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0613Cu); return; } g_debug_last_store_pc = 0xBFC0613Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389154u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06140: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06144: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0614Cu; /* jal link before delay slot */ - psx_delay_BFC06144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06148: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06148u); -#endif - if (psx_delay_BFC06144) { - psx_delay_BFC06144 = 0; - cpu->gpr[31] = 0xBFC0614Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0614C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0614Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0614Cu); -#endif - /* 0xBFC0614C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0614Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06150: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06154: 03E00008 jr $ra */ - psx_delay_BFC06154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06158u); -#endif - if (psx_delay_BFC06154) { - psx_delay_BFC06154 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0615C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0615Cu); - int psx_delay_BFC06188 = 0; - int psx_delay_BFC06198 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06190u: goto label_BFC06190; - default: break; - } - } -label_BFC0615C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0615Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0615C: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06160u); -#endif - /* 0xBFC06160: 8DCE9158 lw $t6, -28328($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06160u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9158u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06164: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06168: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0616Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0616C: AC2E9154 sw $t6, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0616Cu); return; } g_debug_last_store_pc = 0xBFC0616Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0616Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06170: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06170u); return; } g_debug_last_store_pc = 0xBFC06170u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06174: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC06178: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0617C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC06180: AC2F9158 sw $t7, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06180u); return; } g_debug_last_store_pc = 0xBFC06180u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9158u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06184: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06188: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC06190u; /* jal link before delay slot */ - psx_delay_BFC06188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0618C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0618Cu); -#endif - if (psx_delay_BFC06188) { - psx_delay_BFC06188 = 0; - cpu->gpr[31] = 0xBFC06190u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC06190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06190u); -#endif - /* 0xBFC06190: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06190u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06194: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06198: 03E00008 jr $ra */ - psx_delay_BFC06198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0619C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0619Cu); -#endif - if (psx_delay_BFC06198) { - psx_delay_BFC06198 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC061A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC061A0u); - int psx_delay_BFC061BC = 0; - int psx_delay_BFC061CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC061C4u: goto label_BFC061C4; - default: break; - } - } -label_BFC061A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC061A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC061A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC061A0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC061A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061A4u); return; } g_debug_last_store_pc = 0xBFC061A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC061A8: 340EFFFF ori $t6, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC061AC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC061B0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC061B4: AC2E9154 sw $t6, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061B4u); return; } g_debug_last_store_pc = 0xBFC061B4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC061B8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC061BC: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC061C4u; /* jal link before delay slot */ - psx_delay_BFC061BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC061C0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061C0u); -#endif - if (psx_delay_BFC061BC) { - psx_delay_BFC061BC = 0; - cpu->gpr[31] = 0xBFC061C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC061C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC061C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC061C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061C4u); -#endif - /* 0xBFC061C4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC061C8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC061CC: 03E00008 jr $ra */ - psx_delay_BFC061CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC061D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC061D0u); -#endif - if (psx_delay_BFC061CC) { - psx_delay_BFC061CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC061D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC061D4u); - int psx_delay_BFC06200 = 0; - int psx_delay_BFC06210 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06208u: goto label_BFC06208; - default: break; - } - } -label_BFC061D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC061D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC061D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC061D4: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061D8u); -#endif - /* 0xBFC061D8: 8DCE9158 lw $t6, -28328($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061D8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9158u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC061DC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC061E0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC061E4: AC2E9154 sw $t6, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061E4u); return; } g_debug_last_store_pc = 0xBFC061E4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9154u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC061E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061E8u); return; } g_debug_last_store_pc = 0xBFC061E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC061EC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC061F0: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC061F4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC061F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC061F8: AC2F9158 sw $t7, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC061F8u); return; } g_debug_last_store_pc = 0xBFC061F8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9158u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC061FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC061FC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC061FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06200: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC06208u; /* jal link before delay slot */ - psx_delay_BFC06200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06204: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06204u); -#endif - if (psx_delay_BFC06200) { - psx_delay_BFC06200 = 0; - cpu->gpr[31] = 0xBFC06208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC06208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06208u); -#endif - /* 0xBFC06208: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06208u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0620C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06210: 03E00008 jr $ra */ - psx_delay_BFC06210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06214: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06214u); -#endif - if (psx_delay_BFC06210) { - psx_delay_BFC06210 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06218(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06218u); - int psx_delay_BFC06234 = 0; - int psx_taken_BFC06234 = 0; - int psx_delay_BFC0623C = 0; - int psx_delay_BFC06244 = 0; - int psx_taken_BFC06244 = 0; - int psx_delay_BFC06280 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0623Cu: goto label_BFC0623C; - case 0xBFC06244u: goto label_BFC06244; - case 0xBFC0624Cu: goto label_BFC0624C; - case 0xBFC06250u: goto label_BFC06250; - case 0xBFC0627Cu: goto label_BFC0627C; - default: break; - } - } -label_BFC06218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06218: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0621Cu); -#endif - /* 0xBFC0621C: 8C63DF58 lw $v1, -8360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0621Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06220: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06224: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06224u); return; } g_debug_last_store_pc = 0xBFC06224u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06228u); -#endif - /* 0xBFC06228: 90620000 lbu $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x90620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0622C: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC06230: 304E0010 andi $t6, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC06234: 11C10006 beq $t6, $at, 0xBFC06250 */ - uint32_t psx_brA_BFC06234 = cpu->gpr[14]; uint32_t psx_brB_BFC06234 = cpu->gpr[1]; - psx_taken_BFC06234 = (psx_brA_BFC06234 == psx_brB_BFC06234); - psx_delay_BFC06234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC06238: 240F0F14 addiu $t7, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x240F0F14u, cpu->gpr[15], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06238u); -#endif - if (psx_delay_BFC06234) { - psx_delay_BFC06234 = 0; - if (psx_taken_BFC06234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06250u); - goto label_BFC06250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0623Cu); - } -label_BFC0623C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0623Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0623C: 0FF01987 jal 0xBFC0661C */ - cpu->gpr[31] = 0xBFC06244u; /* jal link before delay slot */ - psx_delay_BFC0623C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06240u); -#endif - if (psx_delay_BFC0623C) { - psx_delay_BFC0623C = 0; - cpu->gpr[31] = 0xBFC06244u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0661Cu); - cpu->pc = 0xBFC0661Cu; return; - } -label_BFC06244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06244: 1000000D beq $zero, $zero, 0xBFC0627C */ - uint32_t psx_brA_BFC06244 = cpu->gpr[0]; uint32_t psx_brB_BFC06244 = cpu->gpr[0]; - psx_taken_BFC06244 = (psx_brA_BFC06244 == psx_brB_BFC06244); - psx_delay_BFC06244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06248u); -#endif - /* 0xBFC06248: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06248u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06248u); -#endif - if (psx_delay_BFC06244) { - psx_delay_BFC06244 = 0; - if (psx_taken_BFC06244) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0627Cu); - goto label_BFC0627C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0624Cu); - } -label_BFC0624C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0624Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0624C: 240F0F14 addiu $t7, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x240F0F14u, cpu->gpr[15], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0624Cu); -#endif -label_BFC06250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06250: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC06254: AC2F9154 sw $t7, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06254u); return; } g_debug_last_store_pc = 0xBFC06254u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9154u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC06258: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06258u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0625C: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06260u); -#endif - /* 0xBFC06260: 8F18DF60 lw $t8, -8352($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06260u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF60u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC06264: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC06268: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06268u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0626Cu); -#endif - /* 0xBFC0626C: 8D08DF5C lw $t0, -8356($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0626Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08DF5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0626Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC06270: 24190014 addiu $t9, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24190014u, cpu->gpr[25], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC06274: A1190000 sb $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06274u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06278u); -#endif - /* 0xBFC06278: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06278u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06278u); -#endif -label_BFC0627C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0627Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0627C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06280: 03E00008 jr $ra */ - psx_delay_BFC06280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06284: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06284u); -#endif - if (psx_delay_BFC06280) { - psx_delay_BFC06280 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06288(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06288u); - int psx_delay_BFC062C4 = 0; -label_BFC06288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06288: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0628Cu); -#endif - /* 0xBFC0628C: 8C63DF5C lw $v1, -8356($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0628Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06290: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06294u); -#endif - /* 0xBFC06294: 8C4291A4 lw $v0, -28252($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06294u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06298u); -#endif - /* 0xBFC06298: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0629Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0629C: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0629Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC062A0: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC062A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062A4u); -#endif - /* 0xBFC062A4: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC062A8: 24190013 addiu $t9, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24190013u, cpu->gpr[25], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC062AC: A04F0001 sb $t7, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC062ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062B0u); -#endif - /* 0xBFC062B0: 8F18DF58 lw $t8, -8360($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062B0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18DF58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC062B4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC062B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC062B8: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC062B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC062BC: AC399154 sw $t9, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062BCu); return; } g_debug_last_store_pc = 0xBFC062BCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399154u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC062C0: 24080013 addiu $t0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24080013u, cpu->gpr[8], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC062C4: 03E00008 jr $ra */ - psx_delay_BFC062C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC062C8: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC062C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062C8u); -#endif - if (psx_delay_BFC062C4) { - psx_delay_BFC062C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC062CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC062CCu); - int psx_delay_BFC06350 = 0; - int psx_taken_BFC06350 = 0; - int psx_delay_BFC0635C = 0; - int psx_delay_BFC06364 = 0; - int psx_taken_BFC06364 = 0; - int psx_delay_BFC063C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06358u: goto label_BFC06358; - case 0xBFC06364u: goto label_BFC06364; - case 0xBFC0636Cu: goto label_BFC0636C; - case 0xBFC063C0u: goto label_BFC063C0; - default: break; - } - } -label_BFC062CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC062CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC062CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC062CC: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC062CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062D0u); -#endif - /* 0xBFC062D0: 8D08DF5C lw $t0, -8356($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062D0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08DF5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC062D4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC062D8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062D8u); return; } g_debug_last_store_pc = 0xBFC062D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062DCu); -#endif - /* 0xBFC062DC: 91020000 lbu $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 2, 0x100u); - PGXP_LOAD(0x91020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC062E0: 3C09BFC1 lui $t1, 0xBFC1 */ - cpu->gpr[9] = 0xBFC10000u; - PGXP_ALU(0x3C09BFC1u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC062E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC062E4: 00022102 srl $a0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00022102u, cpu->gpr[4], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC062E8: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC062EC: 00012080 sll $a0, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00012080u, cpu->gpr[4], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC062F0: 00812021 addu $a0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[1]; - PGXP_ALU(0x00812021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC062F4: 00042040 sll $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00042040u, cpu->gpr[4], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC062F8: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC062FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC062FC: 304E000F andi $t6, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x304E000Fu, cpu->gpr[14], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC062FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC06300: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06304: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06308: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0630C: A02491B6 sb $a0, -28234($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28234; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0630Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28234)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA02491B6u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06310u); -#endif - /* 0xBFC06310: 91030000 lbu $v1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 3, 0x100u); - PGXP_LOAD(0x91030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06314u); -#endif - /* 0xBFC06314: 8D29DF58 lw $t1, -8360($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06314u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29DF58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC06318: 00032902 srl $a1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] >> 4u; - PGXP_ALU(0x00032902u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0631Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC0631C: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0631Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06320: 00012880 sll $a1, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00012880u, cpu->gpr[5], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06324: 00A12821 addu $a1, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[1]; - PGXP_ALU(0x00A12821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06328: 00052840 sll $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00052840u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0632C: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC06330: 306F000F andi $t7, $v1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] & 0xFu; - PGXP_ALU(0x306F000Fu, cpu->gpr[15], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06334u); -#endif - /* 0xBFC06334: 91260000 lbu $a2, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (0)), 6, 0x200u); - PGXP_LOAD(0x91260000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC06338: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0633Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0633C: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0633Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06340: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06344: A02591B7 sb $a1, -28233($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28233; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06344u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28233)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA02591B7u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06348: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0634Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC0634C: 30D80010 andi $t8, $a2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0x10u; - PGXP_ALU(0x30D80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0634Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC06350: 13010006 beq $t8, $at, 0xBFC0636C */ - uint32_t psx_brA_BFC06350 = cpu->gpr[24]; uint32_t psx_brB_BFC06350 = cpu->gpr[1]; - psx_taken_BFC06350 = (psx_brA_BFC06350 == psx_brB_BFC06350); - psx_delay_BFC06350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC06354: 308700FF andi $a3, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06354u); -#endif - if (psx_delay_BFC06350) { - psx_delay_BFC06350 = 0; - if (psx_taken_BFC06350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0636Cu); - goto label_BFC0636C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06358u); - } -label_BFC06358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06358: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0635Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0635C: 0FF01987 jal 0xBFC0661C */ - cpu->gpr[31] = 0xBFC06364u; /* jal link before delay slot */ - psx_delay_BFC0635C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC06360: A02491B8 sb $a0, -28232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28232; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06360u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28232)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA02491B8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06360u); -#endif - if (psx_delay_BFC0635C) { - psx_delay_BFC0635C = 0; - cpu->gpr[31] = 0xBFC06364u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0661Cu); - cpu->pc = 0xBFC0661Cu; return; - } -label_BFC06364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06364: 10000016 beq $zero, $zero, 0xBFC063C0 */ - uint32_t psx_brA_BFC06364 = cpu->gpr[0]; uint32_t psx_brB_BFC06364 = cpu->gpr[0]; - psx_taken_BFC06364 = (psx_brA_BFC06364 == psx_brB_BFC06364); - psx_delay_BFC06364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06368u); -#endif - /* 0xBFC06368: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06368u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06368u); -#endif - if (psx_delay_BFC06364) { - psx_delay_BFC06364 = 0; - if (psx_taken_BFC06364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC063C0u); - goto label_BFC063C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0636Cu); - } -label_BFC0636C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0636Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0636Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0636Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0636C: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0636Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC06370: 00E1001B divu $a3, $at */ - { uint32_t psx_n = cpu->gpr[7]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00E1001Bu, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC06370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC06374: A1200000 sb $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06374u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC06378: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0637Cu); -#endif - /* 0xBFC0637C: 8DCEDF60 lw $t6, -8352($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0637Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEDF60u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0637Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06380: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC06384: 240F0014 addiu $t7, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x240F0014u, cpu->gpr[15], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06388: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0638Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0638C: 24180014 addiu $t8, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24180014u, cpu->gpr[24], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0638Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06390: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC06394: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC06398: 00195100 sll $t2, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[25] << 4u; - PGXP_ALU(0x00195100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0639Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0639C: 314B00FF andi $t3, $t2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFu; - PGXP_ALU(0x314B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0639Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC063A0: 00006010 mfhi $t4 */ - cpu->gpr[12] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006010u, cpu->gpr[12], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC063A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC063A4: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC063A8: A1CD0000 sb $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC063A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA1CD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC063AC: AC2F9154 sw $t7, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC063ACu); return; } g_debug_last_store_pc = 0xBFC063ACu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9154u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC063B0: A1180000 sb $t8, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC063B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA1180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC063B4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC063B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC063B8: A02491B8 sb $a0, -28232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28232; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC063B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28232)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA02491B8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063BCu); -#endif - /* 0xBFC063BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC063BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063BCu); -#endif -label_BFC063C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC063C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC063C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC063C0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC063C4: 03E00008 jr $ra */ - psx_delay_BFC063C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC063C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC063C8u); -#endif - if (psx_delay_BFC063C4) { - psx_delay_BFC063C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC063CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC063CCu); - int psx_delay_BFC06418 = 0; - int psx_taken_BFC06418 = 0; - int psx_delay_BFC06434 = 0; - int psx_delay_BFC0643C = 0; - int psx_taken_BFC0643C = 0; - int psx_delay_BFC0645C = 0; - int psx_taken_BFC0645C = 0; - int psx_delay_BFC06464 = 0; - int psx_delay_BFC0646C = 0; - int psx_taken_BFC0646C = 0; - int psx_delay_BFC064D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06420u: goto label_BFC06420; - case 0xBFC0643Cu: goto label_BFC0643C; - case 0xBFC06444u: goto label_BFC06444; - case 0xBFC06464u: goto label_BFC06464; - case 0xBFC0646Cu: goto label_BFC0646C; - case 0xBFC06474u: goto label_BFC06474; - case 0xBFC06478u: goto label_BFC06478; - case 0xBFC064CCu: goto label_BFC064CC; - default: break; - } - } -label_BFC063CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC063CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC063CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC063CC: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC063CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063D0u); -#endif - /* 0xBFC063D0: 906391B8 lbu $v1, -28232($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28232; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-28232)), 3, 0x8u); - PGXP_LOAD(0x906391B8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC063D4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC063D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063D8u); -#endif - /* 0xBFC063D8: 8C84DF5C lw $a0, -8356($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC063D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84DF5Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC063DC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC063E0: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC063E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063E4u); -#endif - /* 0xBFC063E4: 8DCE91A4 lw $t6, -28252($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC063E4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE91A4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC063E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC063E8u); return; } g_debug_last_store_pc = 0xBFC063E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC063EC: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063F0u); -#endif - /* 0xBFC063F0: 90980000 lbu $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 24, 0x10u); - PGXP_LOAD(0x90980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC063F4: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC063F8: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC063FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC063FC: A058FFFD sb $t8, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC063FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA058FFFDu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC063FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06400u); -#endif - /* 0xBFC06400: 90990000 lbu $t9, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 25, 0x10u); - PGXP_LOAD(0x90990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC06404: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC06408: A059FFFE sb $t9, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06408u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA059FFFEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0640Cu); -#endif - /* 0xBFC0640C: 910891B7 lbu $t0, -28233($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28233; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-28233)), 8, 0x100u); - PGXP_LOAD(0x910891B7u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0640Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC06414: 0103082B sltu $at, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06418: 1020000A beq $at, $zero, 0xBFC06444 */ - uint32_t psx_brA_BFC06418 = cpu->gpr[1]; uint32_t psx_brB_BFC06418 = cpu->gpr[0]; - psx_taken_BFC06418 = (psx_brA_BFC06418 == psx_brB_BFC06418); - psx_delay_BFC06418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0641C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0641Cu); -#endif - if (psx_delay_BFC06418) { - psx_delay_BFC06418 = 0; - if (psx_taken_BFC06418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06444u); - goto label_BFC06444; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06420u); - } -label_BFC06420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC06420: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06424: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06428: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0642Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC0642C: AC299154 sw $t1, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0642Cu); return; } g_debug_last_store_pc = 0xBFC0642Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299154u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0642Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06430: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06434: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0643Cu; /* jal link before delay slot */ - psx_delay_BFC06434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06438: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06438u); -#endif - if (psx_delay_BFC06434) { - psx_delay_BFC06434 = 0; - cpu->gpr[31] = 0xBFC0643Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0643C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0643Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0643Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0643Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0643C: 10000023 beq $zero, $zero, 0xBFC064CC */ - uint32_t psx_brA_BFC0643C = cpu->gpr[0]; uint32_t psx_brB_BFC0643C = cpu->gpr[0]; - psx_taken_BFC0643C = (psx_brA_BFC0643C == psx_brB_BFC0643C); - psx_delay_BFC0643C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06440u); -#endif - /* 0xBFC06440: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06440u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06440u); -#endif - if (psx_delay_BFC0643C) { - psx_delay_BFC0643C = 0; - if (psx_taken_BFC0643C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC064CCu); - goto label_BFC064CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06444u); - } -label_BFC06444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06444: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06448u); -#endif - /* 0xBFC06448: 8CA5DF58 lw $a1, -8360($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06448u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5DF58u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0644C: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06450u); -#endif - /* 0xBFC06450: 90A20000 lbu $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x90A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC06458: 304A0010 andi $t2, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304A0010u, cpu->gpr[10], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0645Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0645C: 11410006 beq $t2, $at, 0xBFC06478 */ - uint32_t psx_brA_BFC0645C = cpu->gpr[10]; uint32_t psx_brB_BFC0645C = cpu->gpr[1]; - psx_taken_BFC0645C = (psx_brA_BFC0645C == psx_brB_BFC0645C); - psx_delay_BFC0645C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06460: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06460u); -#endif - if (psx_delay_BFC0645C) { - psx_delay_BFC0645C = 0; - if (psx_taken_BFC0645C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06478u); - goto label_BFC06478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06464u); - } -label_BFC06464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06464: 0FF01987 jal 0xBFC0661C */ - cpu->gpr[31] = 0xBFC0646Cu; /* jal link before delay slot */ - psx_delay_BFC06464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06468: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06468u); -#endif - if (psx_delay_BFC06464) { - psx_delay_BFC06464 = 0; - cpu->gpr[31] = 0xBFC0646Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0661Cu); - cpu->pc = 0xBFC0661Cu; return; - } -label_BFC0646C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0646Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0646Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0646Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0646C: 10000017 beq $zero, $zero, 0xBFC064CC */ - uint32_t psx_brA_BFC0646C = cpu->gpr[0]; uint32_t psx_brB_BFC0646C = cpu->gpr[0]; - psx_taken_BFC0646C = (psx_brA_BFC0646C == psx_brB_BFC0646C); - psx_delay_BFC0646C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06470u); -#endif - /* 0xBFC06470: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06470u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06470u); -#endif - if (psx_delay_BFC0646C) { - psx_delay_BFC0646C = 0; - if (psx_taken_BFC0646C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC064CCu); - goto label_BFC064CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06474u); - } -label_BFC06474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06474: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06474u); -#endif -label_BFC06478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC06478: 0061001B divu $v1, $at */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0061001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC06478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0647C: A0A00000 sb $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0647Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC06480: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06484u); -#endif - /* 0xBFC06484: 8DEFDF60 lw $t7, -8352($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06484u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFDF60u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06488: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0648C: 24180014 addiu $t8, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24180014u, cpu->gpr[24], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06490: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC06494: 24190014 addiu $t9, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24190014u, cpu->gpr[25], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06498: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0649C: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC064A0: 000B6100 sll $t4, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC064A4: 318D00FF andi $t5, $t4, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFu; - PGXP_ALU(0x318D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC064A8: 00007010 mfhi $t6 */ - cpu->gpr[14] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007010u, cpu->gpr[14], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC064A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC064AC: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC064B0: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC064B4: A1E20000 sb $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC064B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA1E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC064B8: AC389154 sw $t8, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC064B8u); return; } g_debug_last_store_pc = 0xBFC064B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389154u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC064BC: A0990000 sb $t9, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC064BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC064C0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC064C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC064C4: A02391B8 sb $v1, -28232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28232; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC064C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28232)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA02391B8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064C8u); -#endif - /* 0xBFC064C8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC064C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064C8u); -#endif -label_BFC064CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC064CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC064CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC064CC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC064D0: 03E00008 jr $ra */ - psx_delay_BFC064D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC064D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC064D4u); -#endif - if (psx_delay_BFC064D0) { - psx_delay_BFC064D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC064D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC064D8u); - int psx_delay_BFC064E8 = 0; - int psx_delay_BFC064F8 = 0; - int psx_delay_BFC06508 = 0; - int psx_delay_BFC06518 = 0; - int psx_delay_BFC06528 = 0; - int psx_delay_BFC06538 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC064F0u: goto label_BFC064F0; - case 0xBFC06500u: goto label_BFC06500; - case 0xBFC06510u: goto label_BFC06510; - case 0xBFC06520u: goto label_BFC06520; - case 0xBFC06530u: goto label_BFC06530; - default: break; - } - } -label_BFC064D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC064D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC064D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC064D8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC064DC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC064DCu); return; } g_debug_last_store_pc = 0xBFC064DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC064E0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC064E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC064E4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC064E8: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC064F0u; /* jal link before delay slot */ - psx_delay_BFC064E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC064EC: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064ECu); -#endif - if (psx_delay_BFC064E8) { - psx_delay_BFC064E8 = 0; - cpu->gpr[31] = 0xBFC064F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC064F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC064F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC064F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC064F0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC064F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC064F4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC064F8: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06500u; /* jal link before delay slot */ - psx_delay_BFC064F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC064FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC064FC: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC064FCu); -#endif - if (psx_delay_BFC064F8) { - psx_delay_BFC064F8 = 0; - cpu->gpr[31] = 0xBFC06500u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06500: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06504: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06508: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06510u; /* jal link before delay slot */ - psx_delay_BFC06508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0650Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0650C: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0650Cu); -#endif - if (psx_delay_BFC06508) { - psx_delay_BFC06508 = 0; - cpu->gpr[31] = 0xBFC06510u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06510: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06514: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06518: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06520u; /* jal link before delay slot */ - psx_delay_BFC06518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0651Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0651C: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0651Cu); -#endif - if (psx_delay_BFC06518) { - psx_delay_BFC06518 = 0; - cpu->gpr[31] = 0xBFC06520u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06520: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06524: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06528: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06530u; /* jal link before delay slot */ - psx_delay_BFC06528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0652Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0652C: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0652Cu); -#endif - if (psx_delay_BFC06528) { - psx_delay_BFC06528 = 0; - cpu->gpr[31] = 0xBFC06530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06530u); -#endif - /* 0xBFC06530: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06530u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06534: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06538: 03E00008 jr $ra */ - psx_delay_BFC06538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0653Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0653C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0653Cu); -#endif - if (psx_delay_BFC06538) { - psx_delay_BFC06538 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06548(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06548u); - int psx_delay_BFC06560 = 0; - int psx_delay_BFC0656C = 0; - int psx_delay_BFC06578 = 0; - int psx_delay_BFC06584 = 0; - int psx_delay_BFC06590 = 0; - int psx_delay_BFC0659C = 0; - int psx_delay_BFC065A8 = 0; - int psx_delay_BFC065B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06568u: goto label_BFC06568; - case 0xBFC06574u: goto label_BFC06574; - case 0xBFC06580u: goto label_BFC06580; - case 0xBFC0658Cu: goto label_BFC0658C; - case 0xBFC06598u: goto label_BFC06598; - case 0xBFC065A4u: goto label_BFC065A4; - case 0xBFC065B0u: goto label_BFC065B0; - default: break; - } - } -label_BFC06548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06548: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0654C: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0654Cu); return; } g_debug_last_store_pc = 0xBFC0654Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC06550: 3C10F000 lui $s0, 0xF000 */ - cpu->gpr[16] = 0xF0000000u; - PGXP_ALU(0x3C10F000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC06554: 36100003 ori $s0, $s0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x3u; - PGXP_ALU(0x36100003u, cpu->gpr[16], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06558: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06558u); return; } g_debug_last_store_pc = 0xBFC06558u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0655C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06560: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06568u; /* jal link before delay slot */ - psx_delay_BFC06560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06564: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06564u); -#endif - if (psx_delay_BFC06560) { - psx_delay_BFC06560 = 0; - cpu->gpr[31] = 0xBFC06568u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC06568: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0656Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0656C: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06574u; /* jal link before delay slot */ - psx_delay_BFC0656C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06570: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06570u); -#endif - if (psx_delay_BFC0656C) { - psx_delay_BFC0656C = 0; - cpu->gpr[31] = 0xBFC06574u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC06574: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06578: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06580u; /* jal link before delay slot */ - psx_delay_BFC06578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0657Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0657C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0657Cu); -#endif - if (psx_delay_BFC06578) { - psx_delay_BFC06578 = 0; - cpu->gpr[31] = 0xBFC06580u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC06580: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06584: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC0658Cu; /* jal link before delay slot */ - psx_delay_BFC06584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06588: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06588u); -#endif - if (psx_delay_BFC06584) { - psx_delay_BFC06584 = 0; - cpu->gpr[31] = 0xBFC0658Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC0658C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0658Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0658C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06590: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC06598u; /* jal link before delay slot */ - psx_delay_BFC06590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06594: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06594u); -#endif - if (psx_delay_BFC06590) { - psx_delay_BFC06590 = 0; - cpu->gpr[31] = 0xBFC06598u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC06598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC06598: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0659Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0659C: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC065A4u; /* jal link before delay slot */ - psx_delay_BFC0659C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC065A0: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065A0u); -#endif - if (psx_delay_BFC0659C) { - psx_delay_BFC0659C = 0; - cpu->gpr[31] = 0xBFC065A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC065A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC065A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC065A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC065A4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC065A8: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC065B0u; /* jal link before delay slot */ - psx_delay_BFC065A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC065AC: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065ACu); -#endif - if (psx_delay_BFC065A8) { - psx_delay_BFC065A8 = 0; - cpu->gpr[31] = 0xBFC065B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC065B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC065B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC065B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065B0u); -#endif - /* 0xBFC065B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065B4u); -#endif - /* 0xBFC065B4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065B4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC065B8: 03E00008 jr $ra */ - psx_delay_BFC065B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC065BC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065BCu); -#endif - if (psx_delay_BFC065B8) { - psx_delay_BFC065B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC065C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC065C0u); - int psx_delay_BFC06614 = 0; -label_BFC065C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC065C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC065C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC065C0: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065C4u); -#endif - /* 0xBFC065C4: 8C63DF6C lw $v1, -8340($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63DF6Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC065C8: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065CCu); -#endif - /* 0xBFC065CC: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC065D0: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC065D4: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC065D8: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065DCu); -#endif - /* 0xBFC065DC: 8CC6DF68 lw $a2, -8344($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -8344; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-8344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065DCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6DF68u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC065E0: 3C07BFC1 lui $a3, 0xBFC1 */ - cpu->gpr[7] = 0xBFC10000u; - PGXP_ALU(0x3C07BFC1u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC065E4: 3C010088 lui $at, 0x88 */ - cpu->gpr[1] = 0x00880000u; - PGXP_ALU(0x3C010088u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065E8u); -#endif - /* 0xBFC065E8: 8CE7DF70 lw $a3, -8336($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -8336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-8336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065E8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE7DF70u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC065EC: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC065F0: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065F0u); return; } g_debug_last_store_pc = 0xBFC065F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065F4u); -#endif - /* 0xBFC065F4: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC065F8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC065F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC065FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC065FC: 34428000 ori $v0, $v0, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x8000u; - PGXP_ALU(0x34428000u, cpu->gpr[2], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC065FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC06600: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06600u); return; } g_debug_last_store_pc = 0xBFC06600u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4022u); -#endif - /* 0xBFC06604: 00A17025 or $t6, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[5] | cpu->gpr[1]; - PGXP_ALU(0x00A17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC06608: ACE40000 sw $a0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06608u); return; } g_debug_last_store_pc = 0xBFC06608u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0660Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0660C: 3C0F1100 lui $t7, 0x1100 */ - cpu->gpr[15] = 0x11000000u; - PGXP_ALU(0x3C0F1100u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0660Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC06610: ACEE0004 sw $t6, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06610u); return; } g_debug_last_store_pc = 0xBFC06610u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06614: 03E00008 jr $ra */ - psx_delay_BFC06614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC06618: ACEF0008 sw $t7, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06618u); return; } g_debug_last_store_pc = 0xBFC06618u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06618u); -#endif - if (psx_delay_BFC06614) { - psx_delay_BFC06614 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0661C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0661Cu); - int psx_delay_BFC06670 = 0; -label_BFC0661C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0661Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0661Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0661Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0661C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0661Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06620: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC06624: AC2E91C8 sw $t6, -28216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06624u); return; } g_debug_last_store_pc = 0xBFC06624u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E91C8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06628: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0662Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0662C: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0662Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC06630: A02F91B4 sb $t7, -28236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28236; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06630u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28236)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02F91B4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06634: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC06638: 24180080 addiu $t8, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24180080u, cpu->gpr[24], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0663Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0663C: A03891B5 sb $t8, -28235($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28235; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0663Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-28235)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA03891B5u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0663Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06640: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC06644: 3419FFFF ori $t9, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC06648: AC399158 sw $t9, -28328($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06648u); return; } g_debug_last_store_pc = 0xBFC06648u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399158u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0664Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0664C: 3C09BFC1 lui $t1, 0xBFC1 */ - cpu->gpr[9] = 0xBFC10000u; - PGXP_ALU(0x3C09BFC1u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0664Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06650u); -#endif - /* 0xBFC06650: 8D29DF58 lw $t1, -8360($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06650u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29DF58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06654: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC06658: 24080DDD addiu $t0, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24080DDDu, cpu->gpr[8], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0665C: AC289154 sw $t0, -28332($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0665Cu); return; } g_debug_last_store_pc = 0xBFC0665Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289154u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC06660: 3C0BBFC1 lui $t3, 0xBFC1 */ - cpu->gpr[11] = 0xBFC10000u; - PGXP_ALU(0x3C0BBFC1u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC06664: A1200000 sb $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06664u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06668u); -#endif - /* 0xBFC06668: 8D6BDF5C lw $t3, -8356($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8356; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06668u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BDF5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0666C: 240A000A addiu $t2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x240A000Au, cpu->gpr[10], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06670: 03E00008 jr $ra */ - psx_delay_BFC06670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC06674: A16A0000 sb $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06674u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[11] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA16A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06674u); -#endif - if (psx_delay_BFC06670) { - psx_delay_BFC06670 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06680(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06680u); - int psx_delay_BFC066A4 = 0; - int psx_taken_BFC066A4 = 0; - int psx_delay_BFC066AC = 0; - int psx_taken_BFC066AC = 0; - int psx_delay_BFC066B4 = 0; - int psx_taken_BFC066B4 = 0; - int psx_delay_BFC066BC = 0; - int psx_taken_BFC066BC = 0; - int psx_delay_BFC066D4 = 0; - int psx_delay_BFC066DC = 0; - int psx_taken_BFC066DC = 0; - int psx_delay_BFC066E8 = 0; - int psx_delay_BFC066F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC066ACu: goto label_BFC066AC; - case 0xBFC066B4u: goto label_BFC066B4; - case 0xBFC066BCu: goto label_BFC066BC; - case 0xBFC066C4u: goto label_BFC066C4; - case 0xBFC066C8u: goto label_BFC066C8; - case 0xBFC066CCu: goto label_BFC066CC; - case 0xBFC066DCu: goto label_BFC066DC; - case 0xBFC066E4u: goto label_BFC066E4; - case 0xBFC066F0u: goto label_BFC066F0; - case 0xBFC066F4u: goto label_BFC066F4; - default: break; - } - } -label_BFC06680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06680: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06684: 3C031F80 lui $v1, 0x1F80 */ - cpu->gpr[3] = 0x1F800000u; - PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06688: 34631060 ori $v1, $v1, 0x1060 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1060u; - PGXP_ALU(0x34631060u, cpu->gpr[3], _pgx1, 0x1060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0668C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0668Cu); return; } g_debug_last_store_pc = 0xBFC0668Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06690u); -#endif - /* 0xBFC06690: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06690u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06694: 2401F8FF addiu $at, $zero, -1793 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1793)); - PGXP_ALU(0x2401F8FFu, cpu->gpr[1], _pgx1, 0xFFFFF8FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC06698: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0669Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC0669C: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0669Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC066A0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC066A4: 10A10005 beq $a1, $at, 0xBFC066BC */ - uint32_t psx_brA_BFC066A4 = cpu->gpr[5]; uint32_t psx_brB_BFC066A4 = cpu->gpr[1]; - psx_taken_BFC066A4 = (psx_brA_BFC066A4 == psx_brB_BFC066A4); - psx_delay_BFC066A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC066A8: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066A8u); -#endif - if (psx_delay_BFC066A4) { - psx_delay_BFC066A4 = 0; - if (psx_taken_BFC066A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066BCu); - goto label_BFC066BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066ACu); - } -label_BFC066AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC066AC: 10A10006 beq $a1, $at, 0xBFC066C8 */ - uint32_t psx_brA_BFC066AC = cpu->gpr[5]; uint32_t psx_brB_BFC066AC = cpu->gpr[1]; - psx_taken_BFC066AC = (psx_brA_BFC066AC == psx_brB_BFC066AC); - psx_delay_BFC066AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC066B0: 344E0300 ori $t6, $v0, 0x300 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] | 0x300u; - PGXP_ALU(0x344E0300u, cpu->gpr[14], _pgx1, 0x0300u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066B0u); -#endif - if (psx_delay_BFC066AC) { - psx_delay_BFC066AC = 0; - if (psx_taken_BFC066AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066C8u); - goto label_BFC066C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066B4u); - } -label_BFC066B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC066B4: 1000000B beq $zero, $zero, 0xBFC066E4 */ - uint32_t psx_brA_BFC066B4 = cpu->gpr[0]; uint32_t psx_brB_BFC066B4 = cpu->gpr[0]; - psx_taken_BFC066B4 = (psx_brA_BFC066B4 == psx_brB_BFC066B4); - psx_delay_BFC066B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC066B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC066B8u); -#endif - if (psx_delay_BFC066B4) { - psx_delay_BFC066B4 = 0; - if (psx_taken_BFC066B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066E4u); - goto label_BFC066E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066BCu); - } -label_BFC066BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC066BC: 10000003 beq $zero, $zero, 0xBFC066CC */ - uint32_t psx_brA_BFC066BC = cpu->gpr[0]; uint32_t psx_brB_BFC066BC = cpu->gpr[0]; - psx_taken_BFC066BC = (psx_brA_BFC066BC == psx_brB_BFC066BC); - psx_delay_BFC066BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC066C0: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC066C0u); return; } g_debug_last_store_pc = 0xBFC066C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066C0u); -#endif - if (psx_delay_BFC066BC) { - psx_delay_BFC066BC = 0; - if (psx_taken_BFC066BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066CCu); - goto label_BFC066CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066C4u); - } -label_BFC066C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC066C4: 344E0300 ori $t6, $v0, 0x300 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] | 0x300u; - PGXP_ALU(0x344E0300u, cpu->gpr[14], _pgx1, 0x0300u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066C4u); -#endif -label_BFC066C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC066C8: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC066C8u); return; } g_debug_last_store_pc = 0xBFC066C8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066C8u); -#endif -label_BFC066CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC066CC: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC066CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC066D0: AC050060 sw $a1, 96($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC066D0u); return; } g_debug_last_store_pc = 0xBFC066D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC050060u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC066D4: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC066DCu; /* jal link before delay slot */ - psx_delay_BFC066D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC066D8: 2484E158 addiu $a0, $a0, -7848 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7848)); - PGXP_ALU(0x2484E158u, cpu->gpr[4], _pgx1, 0xFFFFE158u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066D8u); -#endif - if (psx_delay_BFC066D4) { - psx_delay_BFC066D4 = 0; - cpu->gpr[31] = 0xBFC066DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC066DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC066DC: 10000005 beq $zero, $zero, 0xBFC066F4 */ - uint32_t psx_brA_BFC066DC = cpu->gpr[0]; uint32_t psx_brB_BFC066DC = cpu->gpr[0]; - psx_taken_BFC066DC = (psx_brA_BFC066DC == psx_brB_BFC066DC); - psx_delay_BFC066DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066E0u); -#endif - /* 0xBFC066E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC066E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066E0u); -#endif - if (psx_delay_BFC066DC) { - psx_delay_BFC066DC = 0; - if (psx_taken_BFC066DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066F4u); - goto label_BFC066F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC066E4u); - } -label_BFC066E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC066E4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC066E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC066E8: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC066F0u; /* jal link before delay slot */ - psx_delay_BFC066E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC066EC: 2484E180 addiu $a0, $a0, -7808 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7808)); - PGXP_ALU(0x2484E180u, cpu->gpr[4], _pgx1, 0xFFFFE180u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066ECu); -#endif - if (psx_delay_BFC066E8) { - psx_delay_BFC066E8 = 0; - cpu->gpr[31] = 0xBFC066F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC066F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066F0u); -#endif - /* 0xBFC066F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC066F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066F0u); -#endif -label_BFC066F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC066F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC066F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC066F4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC066F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC066F8: 03E00008 jr $ra */ - psx_delay_BFC066F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC066FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC066FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC066FCu); -#endif - if (psx_delay_BFC066F8) { - psx_delay_BFC066F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06700(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06700u); - int psx_delay_BFC06710 = 0; - int psx_delay_BFC06720 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06718u: goto label_BFC06718; - default: break; - } - } -label_BFC06700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06700: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC06704: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06708: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06708u); return; } g_debug_last_store_pc = 0xBFC06708u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0670Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0670C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0670Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06710: 0FF0089F jal 0xBFC0227C */ - cpu->gpr[31] = 0xBFC06718u; /* jal link before delay slot */ - psx_delay_BFC06710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06714: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06714u); -#endif - if (psx_delay_BFC06710) { - psx_delay_BFC06710 = 0; - cpu->gpr[31] = 0xBFC06718u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0227Cu); - cpu->pc = 0xBFC0227Cu; return; - } -label_BFC06718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06718u); -#endif - /* 0xBFC06718: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06718u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0671Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0671C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0671Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06720: 03E00008 jr $ra */ - psx_delay_BFC06720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06724: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06724u); -#endif - if (psx_delay_BFC06720) { - psx_delay_BFC06720 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06728(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06728u); - int psx_delay_BFC06748 = 0; -label_BFC06728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC06728: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0672Cu); -#endif - /* 0xBFC0672C: 8DCEB948 lw $t6, -18104($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -18104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0672Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEB948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0672Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC06730: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC06734: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06734u); return; } g_debug_last_store_pc = 0xBFC06734u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06738u); -#endif - /* 0xBFC06738: 8DEFB944 lw $t7, -18108($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -18108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-18108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06738u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFB944u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0673C: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC06740: AC8F0000 sw $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06740u); return; } g_debug_last_store_pc = 0xBFC06740u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06744u); -#endif - /* 0xBFC06744: 8F18B940 lw $t8, -18112($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -18112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-18112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06744u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18B940u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06748: 03E00008 jr $ra */ - psx_delay_BFC06748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0674Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC0674C: ACB80000 sw $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0674Cu); return; } g_debug_last_store_pc = 0xBFC0674Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0674Cu); -#endif - if (psx_delay_BFC06748) { - psx_delay_BFC06748 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06750(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06750u); - int psx_delay_BFC0676C = 0; - int psx_delay_BFC0677C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06774u: goto label_BFC06774; - default: break; - } - } -label_BFC06750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06750: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC06754: AC26B948 sw $a2, -18104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06754u); return; } g_debug_last_store_pc = 0xBFC06754u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26B948u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06758: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0675C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC06760: AC24B944 sw $a0, -18108($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06760u); return; } g_debug_last_store_pc = 0xBFC06760u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24B944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06764: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06764u); return; } g_debug_last_store_pc = 0xBFC06764u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06768: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0676C: 0FF01BCA jal 0xBFC06F28 */ - cpu->gpr[31] = 0xBFC06774u; /* jal link before delay slot */ - psx_delay_BFC0676C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06770: AC25B940 sw $a1, -18112($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06770u); return; } g_debug_last_store_pc = 0xBFC06770u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25B940u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06770u); -#endif - if (psx_delay_BFC0676C) { - psx_delay_BFC0676C = 0; - cpu->gpr[31] = 0xBFC06774u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06F28u); - cpu->pc = 0xBFC06F28u; return; - } -label_BFC06774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06774u); -#endif - /* 0xBFC06774: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06774u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06778: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0677C: 03E00008 jr $ra */ - psx_delay_BFC0677C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06780u); -#endif - if (psx_delay_BFC0677C) { - psx_delay_BFC0677C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06784(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06784u); - int psx_delay_BFC06794 = 0; - int psx_delay_BFC067A4 = 0; - int psx_delay_BFC067B4 = 0; - int psx_delay_BFC067C4 = 0; - int psx_delay_BFC067D0 = 0; - int psx_delay_BFC067E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0679Cu: goto label_BFC0679C; - case 0xBFC067ACu: goto label_BFC067AC; - case 0xBFC067BCu: goto label_BFC067BC; - case 0xBFC067CCu: goto label_BFC067CC; - case 0xBFC067D8u: goto label_BFC067D8; - default: break; - } - } -label_BFC06784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06784: 27BDFF48 addiu $sp, $sp, -184 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-184)); - PGXP_ALU(0x27BDFF48u, cpu->gpr[29], _pgx1, 0xFFFFFF48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06788: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06788u); return; } g_debug_last_store_pc = 0xBFC06788u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0678C: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06790: 24A5E1A8 addiu $a1, $a1, -7768 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7768)); - PGXP_ALU(0x24A5E1A8u, cpu->gpr[5], _pgx1, 0xFFFFE1A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06794: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0679Cu; /* jal link before delay slot */ - psx_delay_BFC06794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC06798: 27A40068 addiu $a0, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27A40068u, cpu->gpr[4], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06798u); -#endif - if (psx_delay_BFC06794) { - psx_delay_BFC06794 = 0; - cpu->gpr[31] = 0xBFC0679Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0679C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0679Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0679Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0679Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0679C: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0679Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC067A0: 24A5E130 addiu $a1, $a1, -7888 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7888)); - PGXP_ALU(0x24A5E130u, cpu->gpr[5], _pgx1, 0xFFFFE130u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC067A4: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC067ACu; /* jal link before delay slot */ - psx_delay_BFC067A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC067A8: 27A40068 addiu $a0, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27A40068u, cpu->gpr[4], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067A8u); -#endif - if (psx_delay_BFC067A4) { - psx_delay_BFC067A4 = 0; - cpu->gpr[31] = 0xBFC067ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC067AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC067ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC067ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC067AC: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC067ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC067B0: 24A5E1B0 addiu $a1, $a1, -7760 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7760)); - PGXP_ALU(0x24A5E1B0u, cpu->gpr[5], _pgx1, 0xFFFFE1B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC067B4: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC067BCu; /* jal link before delay slot */ - psx_delay_BFC067B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC067B8: 27A40018 addiu $a0, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A40018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067B8u); -#endif - if (psx_delay_BFC067B4) { - psx_delay_BFC067B4 = 0; - cpu->gpr[31] = 0xBFC067BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC067BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC067BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC067BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC067BC: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC067BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC067C0: 24A5E140 addiu $a1, $a1, -7872 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7872)); - PGXP_ALU(0x24A5E140u, cpu->gpr[5], _pgx1, 0xFFFFE140u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC067C4: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC067CCu; /* jal link before delay slot */ - psx_delay_BFC067C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC067C8: 27A40018 addiu $a0, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A40018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067C8u); -#endif - if (psx_delay_BFC067C4) { - psx_delay_BFC067C4 = 0; - cpu->gpr[31] = 0xBFC067CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC067CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC067CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC067CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC067CC: 27A40068 addiu $a0, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27A40068u, cpu->gpr[4], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC067D0: 0FF019FA jal 0xBFC067E8 */ - cpu->gpr[31] = 0xBFC067D8u; /* jal link before delay slot */ - psx_delay_BFC067D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC067D4: 27A50018 addiu $a1, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A50018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067D4u); -#endif - if (psx_delay_BFC067D0) { - psx_delay_BFC067D0 = 0; - cpu->gpr[31] = 0xBFC067D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC067E8u); - cpu->pc = 0xBFC067E8u; return; - } -label_BFC067D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC067D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC067D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067D8u); -#endif - /* 0xBFC067D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC067D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC067DC: 27BD00B8 addiu $sp, $sp, 184 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (184)); - PGXP_ALU(0x27BD00B8u, cpu->gpr[29], _pgx1, 0x000000B8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC067E0: 03E00008 jr $ra */ - psx_delay_BFC067E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC067E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC067E4u); -#endif - if (psx_delay_BFC067E0) { - psx_delay_BFC067E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC067E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC067E8u); - int psx_delay_BFC067F8 = 0; - int psx_delay_BFC06800 = 0; - int psx_delay_BFC0680C = 0; - int psx_delay_BFC0682C = 0; - int psx_delay_BFC06834 = 0; - int psx_delay_BFC0683C = 0; - int psx_delay_BFC06844 = 0; - int psx_delay_BFC0684C = 0; - int psx_delay_BFC06854 = 0; - int psx_delay_BFC0685C = 0; - int psx_delay_BFC06864 = 0; - int psx_delay_BFC0686C = 0; - int psx_delay_BFC068A4 = 0; - int psx_delay_BFC068AC = 0; - int psx_delay_BFC068B8 = 0; - int psx_delay_BFC068C0 = 0; - int psx_delay_BFC068F0 = 0; - int psx_delay_BFC068FC = 0; - int psx_delay_BFC0690C = 0; - int psx_delay_BFC06914 = 0; - int psx_delay_BFC0691C = 0; - int psx_delay_BFC06924 = 0; - int psx_delay_BFC06934 = 0; - int psx_delay_BFC06944 = 0; - int psx_delay_BFC0694C = 0; - int psx_delay_BFC06970 = 0; - int psx_delay_BFC06978 = 0; - int psx_taken_BFC06978 = 0; - int psx_delay_BFC06980 = 0; - int psx_delay_BFC06988 = 0; - int psx_delay_BFC06990 = 0; - int psx_delay_BFC06998 = 0; - int psx_delay_BFC069AC = 0; - int psx_delay_BFC069B8 = 0; - int psx_delay_BFC069C0 = 0; - int psx_taken_BFC069C0 = 0; - int psx_delay_BFC069C8 = 0; - int psx_delay_BFC069D0 = 0; - int psx_delay_BFC069DC = 0; - int psx_taken_BFC069DC = 0; - int psx_delay_BFC069E4 = 0; - int psx_delay_BFC069F0 = 0; - int psx_delay_BFC069FC = 0; - int psx_delay_BFC06A04 = 0; - int psx_taken_BFC06A04 = 0; - int psx_delay_BFC06A0C = 0; - int psx_delay_BFC06A14 = 0; - int psx_delay_BFC06A20 = 0; - int psx_delay_BFC06A28 = 0; - int psx_taken_BFC06A28 = 0; - int psx_delay_BFC06A30 = 0; - int psx_delay_BFC06A3C = 0; - int psx_delay_BFC06A44 = 0; - int psx_taken_BFC06A44 = 0; - int psx_delay_BFC06A54 = 0; - int psx_delay_BFC06A60 = 0; - int psx_delay_BFC06A68 = 0; - int psx_taken_BFC06A68 = 0; - int psx_delay_BFC06A70 = 0; - int psx_delay_BFC06A84 = 0; - int psx_delay_BFC06A8C = 0; - int psx_taken_BFC06A8C = 0; - int psx_delay_BFC06AA4 = 0; - int psx_delay_BFC06AB4 = 0; - int psx_delay_BFC06ABC = 0; - int psx_taken_BFC06ABC = 0; - int psx_delay_BFC06AD0 = 0; - int psx_delay_BFC06ADC = 0; - int psx_delay_BFC06AE4 = 0; - int psx_taken_BFC06AE4 = 0; - int psx_delay_BFC06AEC = 0; - int psx_delay_BFC06B08 = 0; - int psx_delay_BFC06B10 = 0; - int psx_taken_BFC06B10 = 0; - int psx_delay_BFC06B1C = 0; - int psx_delay_BFC06B24 = 0; - int psx_taken_BFC06B24 = 0; - int psx_delay_BFC06B2C = 0; - int psx_delay_BFC06B48 = 0; - int psx_delay_BFC06B58 = 0; - int psx_delay_BFC06B64 = 0; - int psx_delay_BFC06B6C = 0; - int psx_taken_BFC06B6C = 0; - int psx_delay_BFC06B74 = 0; - int psx_delay_BFC06B7C = 0; - int psx_delay_BFC06B90 = 0; - int psx_delay_BFC06B9C = 0; - int psx_delay_BFC06BA4 = 0; - int psx_taken_BFC06BA4 = 0; - int psx_delay_BFC06BAC = 0; - int psx_delay_BFC06BB4 = 0; - int psx_delay_BFC06BC8 = 0; - int psx_delay_BFC06BD0 = 0; - int psx_taken_BFC06BD0 = 0; - int psx_delay_BFC06BD8 = 0; - int psx_delay_BFC06BFC = 0; - int psx_delay_BFC06C18 = 0; - int psx_delay_BFC06C40 = 0; - int psx_delay_BFC06C48 = 0; - int psx_delay_BFC06C54 = 0; - int psx_delay_BFC06C5C = 0; - int psx_taken_BFC06C5C = 0; - int psx_delay_BFC06C64 = 0; - int psx_delay_BFC06C78 = 0; - int psx_delay_BFC06C84 = 0; - int psx_delay_BFC06C8C = 0; - int psx_delay_BFC06C9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06800u: goto label_BFC06800; - case 0xBFC06808u: goto label_BFC06808; - case 0xBFC06814u: goto label_BFC06814; - case 0xBFC06834u: goto label_BFC06834; - case 0xBFC0683Cu: goto label_BFC0683C; - case 0xBFC06844u: goto label_BFC06844; - case 0xBFC0684Cu: goto label_BFC0684C; - case 0xBFC06854u: goto label_BFC06854; - case 0xBFC0685Cu: goto label_BFC0685C; - case 0xBFC06864u: goto label_BFC06864; - case 0xBFC0686Cu: goto label_BFC0686C; - case 0xBFC06874u: goto label_BFC06874; - case 0xBFC068ACu: goto label_BFC068AC; - case 0xBFC068B4u: goto label_BFC068B4; - case 0xBFC068C0u: goto label_BFC068C0; - case 0xBFC068C8u: goto label_BFC068C8; - case 0xBFC068F8u: goto label_BFC068F8; - case 0xBFC06904u: goto label_BFC06904; - case 0xBFC06914u: goto label_BFC06914; - case 0xBFC0691Cu: goto label_BFC0691C; - case 0xBFC06924u: goto label_BFC06924; - case 0xBFC0692Cu: goto label_BFC0692C; - case 0xBFC0693Cu: goto label_BFC0693C; - case 0xBFC0694Cu: goto label_BFC0694C; - case 0xBFC06954u: goto label_BFC06954; - case 0xBFC06978u: goto label_BFC06978; - case 0xBFC06980u: goto label_BFC06980; - case 0xBFC06988u: goto label_BFC06988; - case 0xBFC06990u: goto label_BFC06990; - case 0xBFC06998u: goto label_BFC06998; - case 0xBFC069A0u: goto label_BFC069A0; - case 0xBFC069B4u: goto label_BFC069B4; - case 0xBFC069C0u: goto label_BFC069C0; - case 0xBFC069C8u: goto label_BFC069C8; - case 0xBFC069D0u: goto label_BFC069D0; - case 0xBFC069D8u: goto label_BFC069D8; - case 0xBFC069E4u: goto label_BFC069E4; - case 0xBFC069ECu: goto label_BFC069EC; - case 0xBFC069F8u: goto label_BFC069F8; - case 0xBFC06A04u: goto label_BFC06A04; - case 0xBFC06A0Cu: goto label_BFC06A0C; - case 0xBFC06A14u: goto label_BFC06A14; - case 0xBFC06A1Cu: goto label_BFC06A1C; - case 0xBFC06A28u: goto label_BFC06A28; - case 0xBFC06A30u: goto label_BFC06A30; - case 0xBFC06A38u: goto label_BFC06A38; - case 0xBFC06A3Cu: goto label_BFC06A3C; - case 0xBFC06A44u: goto label_BFC06A44; - case 0xBFC06A4Cu: goto label_BFC06A4C; - case 0xBFC06A5Cu: goto label_BFC06A5C; - case 0xBFC06A68u: goto label_BFC06A68; - case 0xBFC06A70u: goto label_BFC06A70; - case 0xBFC06A78u: goto label_BFC06A78; - case 0xBFC06A7Cu: goto label_BFC06A7C; - case 0xBFC06A8Cu: goto label_BFC06A8C; - case 0xBFC06A94u: goto label_BFC06A94; - case 0xBFC06AACu: goto label_BFC06AAC; - case 0xBFC06ABCu: goto label_BFC06ABC; - case 0xBFC06AC4u: goto label_BFC06AC4; - case 0xBFC06AD8u: goto label_BFC06AD8; - case 0xBFC06AE4u: goto label_BFC06AE4; - case 0xBFC06AECu: goto label_BFC06AEC; - case 0xBFC06AF4u: goto label_BFC06AF4; - case 0xBFC06B10u: goto label_BFC06B10; - case 0xBFC06B18u: goto label_BFC06B18; - case 0xBFC06B24u: goto label_BFC06B24; - case 0xBFC06B2Cu: goto label_BFC06B2C; - case 0xBFC06B34u: goto label_BFC06B34; - case 0xBFC06B50u: goto label_BFC06B50; - case 0xBFC06B60u: goto label_BFC06B60; - case 0xBFC06B6Cu: goto label_BFC06B6C; - case 0xBFC06B74u: goto label_BFC06B74; - case 0xBFC06B7Cu: goto label_BFC06B7C; - case 0xBFC06B84u: goto label_BFC06B84; - case 0xBFC06B98u: goto label_BFC06B98; - case 0xBFC06BA4u: goto label_BFC06BA4; - case 0xBFC06BACu: goto label_BFC06BAC; - case 0xBFC06BB4u: goto label_BFC06BB4; - case 0xBFC06BBCu: goto label_BFC06BBC; - case 0xBFC06BD0u: goto label_BFC06BD0; - case 0xBFC06BD8u: goto label_BFC06BD8; - case 0xBFC06BE0u: goto label_BFC06BE0; - case 0xBFC06C04u: goto label_BFC06C04; - case 0xBFC06C20u: goto label_BFC06C20; - case 0xBFC06C48u: goto label_BFC06C48; - case 0xBFC06C50u: goto label_BFC06C50; - case 0xBFC06C5Cu: goto label_BFC06C5C; - case 0xBFC06C64u: goto label_BFC06C64; - case 0xBFC06C6Cu: goto label_BFC06C6C; - case 0xBFC06C80u: goto label_BFC06C80; - case 0xBFC06C8Cu: goto label_BFC06C8C; - case 0xBFC06C94u: goto label_BFC06C94; - default: break; - } - } -label_BFC067E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC067E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC067E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC067E8: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC067EC: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC067ECu); return; } g_debug_last_store_pc = 0xBFC067ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC067F0: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC067F0u); return; } g_debug_last_store_pc = 0xBFC067F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC067F4: AFA50034 sw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC067F4u); return; } g_debug_last_store_pc = 0xBFC067F4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC067F8: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06800u; /* jal link before delay slot */ - psx_delay_BFC067F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC067FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC067FC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC067FCu); -#endif - if (psx_delay_BFC067F8) { - psx_delay_BFC067F8 = 0; - cpu->gpr[31] = 0xBFC06800u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06800: 0FF00E5A jal 0xBFC03968 */ - cpu->gpr[31] = 0xBFC06808u; /* jal link before delay slot */ - psx_delay_BFC06800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06804: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06804u); -#endif - if (psx_delay_BFC06800) { - psx_delay_BFC06800 = 0; - cpu->gpr[31] = 0xBFC06808u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03968u); - cpu->pc = 0xBFC03968u; return; - } -label_BFC06808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06808: 2401FBFE addiu $at, $zero, -1026 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1026)); - PGXP_ALU(0x2401FBFEu, cpu->gpr[1], _pgx1, 0xFFFFFBFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0680C: 0FF00E5E jal 0xBFC03978 */ - cpu->gpr[31] = 0xBFC06814u; /* jal link before delay slot */ - psx_delay_BFC0680C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC06810: 00412024 and $a0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00412024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06810u); -#endif - if (psx_delay_BFC0680C) { - psx_delay_BFC0680C = 0; - cpu->gpr[31] = 0xBFC06814u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03978u); - cpu->pc = 0xBFC03978u; return; - } -label_BFC06814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06814: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06818: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0681Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0681C: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0681Cu); return; } g_debug_last_store_pc = 0xBFC0681Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0681Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06820: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06820u); return; } g_debug_last_store_pc = 0xBFC06820u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06824: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06824u); return; } g_debug_last_store_pc = 0xBFC06824u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06828: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06828u); return; } g_debug_last_store_pc = 0xBFC06828u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0682C: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06834u; /* jal link before delay slot */ - psx_delay_BFC0682C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06830: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06830u); -#endif - if (psx_delay_BFC0682C) { - psx_delay_BFC0682C = 0; - cpu->gpr[31] = 0xBFC06834u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06834: 0FF00108 jal 0xBFC00420 */ - cpu->gpr[31] = 0xBFC0683Cu; /* jal link before delay slot */ - psx_delay_BFC06834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06838u); -#endif - if (psx_delay_BFC06834) { - psx_delay_BFC06834 = 0; - cpu->gpr[31] = 0xBFC0683Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00420u); - cpu->pc = 0xBFC00420u; return; - } -label_BFC0683C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0683Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0683Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0683Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0683C: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06844u; /* jal link before delay slot */ - psx_delay_BFC0683C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06840: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06840u); -#endif - if (psx_delay_BFC0683C) { - psx_delay_BFC0683C = 0; - cpu->gpr[31] = 0xBFC06844u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06844: 0FF010B4 jal 0xBFC042D0 */ - cpu->gpr[31] = 0xBFC0684Cu; /* jal link before delay slot */ - psx_delay_BFC06844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06848u); -#endif - if (psx_delay_BFC06844) { - psx_delay_BFC06844 = 0; - cpu->gpr[31] = 0xBFC0684Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042D0u); - cpu->pc = 0xBFC042D0u; return; - } -label_BFC0684C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0684Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0684Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0684Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0684C: 0FF010A8 jal 0xBFC042A0 */ - cpu->gpr[31] = 0xBFC06854u; /* jal link before delay slot */ - psx_delay_BFC0684C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06850u); -#endif - if (psx_delay_BFC0684C) { - psx_delay_BFC0684C = 0; - cpu->gpr[31] = 0xBFC06854u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042A0u); - cpu->pc = 0xBFC042A0u; return; - } -label_BFC06854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06854: 0FF036C4 jal 0xBFC0DB10 */ - cpu->gpr[31] = 0xBFC0685Cu; /* jal link before delay slot */ - psx_delay_BFC06854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06858u); -#endif - if (psx_delay_BFC06854) { - psx_delay_BFC06854 = 0; - cpu->gpr[31] = 0xBFC0685Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB10u); - cpu->pc = 0xBFC0DB10u; return; - } -label_BFC0685C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0685Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0685Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0685Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0685C: 0FF036C8 jal 0xBFC0DB20 */ - cpu->gpr[31] = 0xBFC06864u; /* jal link before delay slot */ - psx_delay_BFC0685C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06860: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06860u); -#endif - if (psx_delay_BFC0685C) { - psx_delay_BFC0685C = 0; - cpu->gpr[31] = 0xBFC06864u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB20u); - cpu->pc = 0xBFC0DB20u; return; - } -label_BFC06864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06864: 0FF03668 jal 0xBFC0D9A0 */ - cpu->gpr[31] = 0xBFC0686Cu; /* jal link before delay slot */ - psx_delay_BFC06864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06868u); -#endif - if (psx_delay_BFC06864) { - psx_delay_BFC06864 = 0; - cpu->gpr[31] = 0xBFC0686Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9A0u); - cpu->pc = 0xBFC0D9A0u; return; - } -label_BFC0686C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0686Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0686Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0686Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0686C: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06874u; /* jal link before delay slot */ - psx_delay_BFC0686C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06870: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06870u); -#endif - if (psx_delay_BFC0686C) { - psx_delay_BFC0686C = 0; - cpu->gpr[31] = 0xBFC06874u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06874: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06878: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0687Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0687C: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0687Cu); return; } g_debug_last_store_pc = 0xBFC0687Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0687Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06880: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06880u); return; } g_debug_last_store_pc = 0xBFC06880u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC06884: 3C031F80 lui $v1, 0x1F80 */ - cpu->gpr[3] = 0x1F800000u; - PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06888: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06888u); return; } g_debug_last_store_pc = 0xBFC06888u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0688C: 34631070 ori $v1, $v1, 0x1070 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1070u; - PGXP_ALU(0x34631070u, cpu->gpr[3], _pgx1, 0x1070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06890: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06890u); return; } g_debug_last_store_pc = 0xBFC06890u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC06894: AC600004 sw $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06894u); return; } g_debug_last_store_pc = 0xBFC06894u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC06898: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06898u); return; } g_debug_last_store_pc = 0xBFC06898u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0689C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068A0u); -#endif - /* 0xBFC068A0: 8C84B9B0 lw $a0, -18000($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068A4: 0FF036CC jal 0xBFC0DB30 */ - cpu->gpr[31] = 0xBFC068ACu; /* jal link before delay slot */ - psx_delay_BFC068A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC068A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC068A8u); -#endif - if (psx_delay_BFC068A4) { - psx_delay_BFC068A4 = 0; - cpu->gpr[31] = 0xBFC068ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB30u); - cpu->pc = 0xBFC0DB30u; return; - } -label_BFC068AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC068ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC068ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068AC: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC068B4u; /* jal link before delay slot */ - psx_delay_BFC068AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC068B0: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068B0u); -#endif - if (psx_delay_BFC068AC) { - psx_delay_BFC068AC = 0; - cpu->gpr[31] = 0xBFC068B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC068B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC068B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC068B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC068B4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC068B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068B8: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC068C0u; /* jal link before delay slot */ - psx_delay_BFC068B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC068BC: 2484DFB0 addiu $a0, $a0, -8272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8272)); - PGXP_ALU(0x2484DFB0u, cpu->gpr[4], _pgx1, 0xFFFFDFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068BCu); -#endif - if (psx_delay_BFC068B8) { - psx_delay_BFC068B8 = 0; - cpu->gpr[31] = 0xBFC068C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC068C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC068C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC068C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068C0: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC068C8u; /* jal link before delay slot */ - psx_delay_BFC068C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC068C4: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068C4u); -#endif - if (psx_delay_BFC068C0) { - psx_delay_BFC068C0 = 0; - cpu->gpr[31] = 0xBFC068C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC068C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC068C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC068C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC068C8: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC068C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC068CC: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC068D0: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068D0u); return; } g_debug_last_store_pc = 0xBFC068D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC068D4: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068D4u); return; } g_debug_last_store_pc = 0xBFC068D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC068D8: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068D8u); return; } g_debug_last_store_pc = 0xBFC068D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC068DC: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC068DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC068E0: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC068E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC068E4: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068E4u); return; } g_debug_last_store_pc = 0xBFC068E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC068E8: 24A5E14C addiu $a1, $a1, -7860 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7860)); - PGXP_ALU(0x24A5E14Cu, cpu->gpr[5], _pgx1, 0xFFFFE14Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC068EC: 2484B940 addiu $a0, $a0, -18112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18112)); - PGXP_ALU(0x2484B940u, cpu->gpr[4], _pgx1, 0xFFFFB940u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068F0: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC068F8u; /* jal link before delay slot */ - psx_delay_BFC068F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC068F4: 2406000C addiu $a2, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2406000Cu, cpu->gpr[6], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC068F4u); -#endif - if (psx_delay_BFC068F0) { - psx_delay_BFC068F0 = 0; - cpu->gpr[31] = 0xBFC068F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC068F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC068F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC068F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC068F8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC068F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC068FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC068FC: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06904u; /* jal link before delay slot */ - psx_delay_BFC068FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06900: 2484E078 addiu $a0, $a0, -8072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8072)); - PGXP_ALU(0x2484E078u, cpu->gpr[4], _pgx1, 0xFFFFE078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06900u); -#endif - if (psx_delay_BFC068FC) { - psx_delay_BFC068FC = 0; - cpu->gpr[31] = 0xBFC06904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06904: 3C04A000 lui $a0, 0xA000 */ - cpu->gpr[4] = 0xA0000000u; - PGXP_ALU(0x3C04A000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06908: 3484E000 ori $a0, $a0, 0xE000 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xE000u; - PGXP_ALU(0x3484E000u, cpu->gpr[4], _pgx1, 0xE000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0690Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0690C: 0FF036D0 jal 0xBFC0DB40 */ - cpu->gpr[31] = 0xBFC06914u; /* jal link before delay slot */ - psx_delay_BFC0690C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06910: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06910u); -#endif - if (psx_delay_BFC0690C) { - psx_delay_BFC0690C = 0; - cpu->gpr[31] = 0xBFC06914u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB40u); - cpu->pc = 0xBFC0DB40u; return; - } -label_BFC06914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06914: 0FF01184 jal 0xBFC04610 */ - cpu->gpr[31] = 0xBFC0691Cu; /* jal link before delay slot */ - psx_delay_BFC06914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06918: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06918u); -#endif - if (psx_delay_BFC06914) { - psx_delay_BFC06914 = 0; - cpu->gpr[31] = 0xBFC0691Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04610u); - cpu->pc = 0xBFC04610u; return; - } -label_BFC0691C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0691Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0691C: 0FF036D4 jal 0xBFC0DB50 */ - cpu->gpr[31] = 0xBFC06924u; /* jal link before delay slot */ - psx_delay_BFC0691C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06920: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06920u); -#endif - if (psx_delay_BFC0691C) { - psx_delay_BFC0691C = 0; - cpu->gpr[31] = 0xBFC06924u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB50u); - cpu->pc = 0xBFC0DB50u; return; - } -label_BFC06924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06924: 0FF036D8 jal 0xBFC0DB60 */ - cpu->gpr[31] = 0xBFC0692Cu; /* jal link before delay slot */ - psx_delay_BFC06924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06928: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06928u); -#endif - if (psx_delay_BFC06924) { - psx_delay_BFC06924 = 0; - cpu->gpr[31] = 0xBFC0692Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB60u); - cpu->pc = 0xBFC0DB60u; return; - } -label_BFC0692C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0692Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0692C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06930u); -#endif - /* 0xBFC06930: 8C84B944 lw $a0, -18108($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06930u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06934: 0FF0119E jal 0xBFC04678 */ - cpu->gpr[31] = 0xBFC0693Cu; /* jal link before delay slot */ - psx_delay_BFC06934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06938u); -#endif - if (psx_delay_BFC06934) { - psx_delay_BFC06934 = 0; - cpu->gpr[31] = 0xBFC0693Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04678u); - cpu->pc = 0xBFC04678u; return; - } -label_BFC0693C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0693Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0693C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06940u); -#endif - /* 0xBFC06940: 8CA5B940 lw $a1, -18112($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06940u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B940u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06944: 0FF011CB jal 0xBFC0472C */ - cpu->gpr[31] = 0xBFC0694Cu; /* jal link before delay slot */ - psx_delay_BFC06944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06948: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06948u); -#endif - if (psx_delay_BFC06944) { - psx_delay_BFC06944 = 0; - cpu->gpr[31] = 0xBFC0694Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0472Cu); - cpu->pc = 0xBFC0472Cu; return; - } -label_BFC0694C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0694Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0694C: 0FF036DC jal 0xBFC0DB70 */ - cpu->gpr[31] = 0xBFC06954u; /* jal link before delay slot */ - psx_delay_BFC0694C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06950: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06950u); -#endif - if (psx_delay_BFC0694C) { - psx_delay_BFC0694C = 0; - cpu->gpr[31] = 0xBFC06954u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB70u); - cpu->pc = 0xBFC0DB70u; return; - } -label_BFC06954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06954: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06958: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0695C: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0695Cu); return; } g_debug_last_store_pc = 0xBFC0695Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06960: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06960u); return; } g_debug_last_store_pc = 0xBFC06960u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06964: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06964u); return; } g_debug_last_store_pc = 0xBFC06964u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06968: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0696C: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0696Cu); return; } g_debug_last_store_pc = 0xBFC0696Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06970: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06978u; /* jal link before delay slot */ - psx_delay_BFC06970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06974: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06974u); -#endif - if (psx_delay_BFC06970) { - psx_delay_BFC06970 = 0; - cpu->gpr[31] = 0xBFC06978u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06978: 10400003 beq $v0, $zero, 0xBFC06988 */ - uint32_t psx_brA_BFC06978 = cpu->gpr[2]; uint32_t psx_brB_BFC06978 = cpu->gpr[0]; - psx_taken_BFC06978 = (psx_brA_BFC06978 == psx_brB_BFC06978); - psx_delay_BFC06978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0697C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0697Cu); -#endif - if (psx_delay_BFC06978) { - psx_delay_BFC06978 = 0; - if (psx_taken_BFC06978) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06988u); - goto label_BFC06988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06980u); - } -label_BFC06980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06980: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06988u; /* jal link before delay slot */ - psx_delay_BFC06980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06984: 24040385 addiu $a0, $zero, 901 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (901)); - PGXP_ALU(0x24040385u, cpu->gpr[4], _pgx1, 0x00000385u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06984u); -#endif - if (psx_delay_BFC06980) { - psx_delay_BFC06980 = 0; - cpu->gpr[31] = 0xBFC06988u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06988: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06990u; /* jal link before delay slot */ - psx_delay_BFC06988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0698C: 24040007 addiu $a0, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24040007u, cpu->gpr[4], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0698Cu); -#endif - if (psx_delay_BFC06988) { - psx_delay_BFC06988 = 0; - cpu->gpr[31] = 0xBFC06990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06990: 0FF01BFC jal 0xBFC06FF0 */ - cpu->gpr[31] = 0xBFC06998u; /* jal link before delay slot */ - psx_delay_BFC06990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06994u); -#endif - if (psx_delay_BFC06990) { - psx_delay_BFC06990 = 0; - cpu->gpr[31] = 0xBFC06998u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FF0u); - cpu->pc = 0xBFC06FF0u; return; - } -label_BFC06998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06998: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC069A0u; /* jal link before delay slot */ - psx_delay_BFC06998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0699Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0699C: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0699Cu); -#endif - if (psx_delay_BFC06998) { - psx_delay_BFC06998 = 0; - cpu->gpr[31] = 0xBFC069A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC069A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC069A0: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC069A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC069A4: 34421070 ori $v0, $v0, 0x1070 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1070u; - PGXP_ALU(0x34421070u, cpu->gpr[2], _pgx1, 0x1070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC069A8: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC069A8u); return; } g_debug_last_store_pc = 0xBFC069A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069AC: 0FF01CE8 jal 0xBFC073A0 */ - cpu->gpr[31] = 0xBFC069B4u; /* jal link before delay slot */ - psx_delay_BFC069AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC069B0: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC069B0u); return; } g_debug_last_store_pc = 0xBFC069B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069B0u); -#endif - if (psx_delay_BFC069AC) { - psx_delay_BFC069AC = 0; - cpu->gpr[31] = 0xBFC069B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073A0u); - cpu->pc = 0xBFC073A0u; return; - } -label_BFC069B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC069B4: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC069B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069B8: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC069C0u; /* jal link before delay slot */ - psx_delay_BFC069B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC069BC: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069BCu); -#endif - if (psx_delay_BFC069B8) { - psx_delay_BFC069B8 = 0; - cpu->gpr[31] = 0xBFC069C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC069C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC069C0: 10400003 beq $v0, $zero, 0xBFC069D0 */ - uint32_t psx_brA_BFC069C0 = cpu->gpr[2]; uint32_t psx_brB_BFC069C0 = cpu->gpr[0]; - psx_taken_BFC069C0 = (psx_brA_BFC069C0 == psx_brB_BFC069C0); - psx_delay_BFC069C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC069C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC069C4u); -#endif - if (psx_delay_BFC069C0) { - psx_delay_BFC069C0 = 0; - if (psx_taken_BFC069C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC069D0u); - goto label_BFC069D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC069C8u); - } -label_BFC069C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069C8: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC069D0u; /* jal link before delay slot */ - psx_delay_BFC069C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC069CC: 24040399 addiu $a0, $zero, 921 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (921)); - PGXP_ALU(0x24040399u, cpu->gpr[4], _pgx1, 0x00000399u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069CCu); -#endif - if (psx_delay_BFC069C8) { - psx_delay_BFC069C8 = 0; - cpu->gpr[31] = 0xBFC069D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC069D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069D0: 0FF01C2B jal 0xBFC070AC */ - cpu->gpr[31] = 0xBFC069D8u; /* jal link before delay slot */ - psx_delay_BFC069D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC069D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC069D4u); -#endif - if (psx_delay_BFC069D0) { - psx_delay_BFC069D0 = 0; - cpu->gpr[31] = 0xBFC069D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070ACu); - cpu->pc = 0xBFC070ACu; return; - } -label_BFC069D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC069D8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC069DC: 14410003 bne $v0, $at, 0xBFC069EC */ - uint32_t psx_brA_BFC069DC = cpu->gpr[2]; uint32_t psx_brB_BFC069DC = cpu->gpr[1]; - psx_taken_BFC069DC = (psx_brA_BFC069DC != psx_brB_BFC069DC); - psx_delay_BFC069DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC069E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC069E0u); -#endif - if (psx_delay_BFC069DC) { - psx_delay_BFC069DC = 0; - if (psx_taken_BFC069DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC069ECu); - goto label_BFC069EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC069E4u); - } -label_BFC069E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069E4: 0FF01C52 jal 0xBFC07148 */ - cpu->gpr[31] = 0xBFC069ECu; /* jal link before delay slot */ - psx_delay_BFC069E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC069E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC069E8u); -#endif - if (psx_delay_BFC069E4) { - psx_delay_BFC069E4 = 0; - cpu->gpr[31] = 0xBFC069ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07148u); - cpu->pc = 0xBFC07148u; return; - } -label_BFC069EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC069EC: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC069ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069F0: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC069F8u; /* jal link before delay slot */ - psx_delay_BFC069F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC069F4: 2484E0C4 addiu $a0, $a0, -7996 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7996)); - PGXP_ALU(0x2484E0C4u, cpu->gpr[4], _pgx1, 0xFFFFE0C4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC069F4u); -#endif - if (psx_delay_BFC069F0) { - psx_delay_BFC069F0 = 0; - cpu->gpr[31] = 0xBFC069F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC069F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC069F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC069F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC069F8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC069F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC069FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC069FC: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06A04u; /* jal link before delay slot */ - psx_delay_BFC069FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A00: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A00u); -#endif - if (psx_delay_BFC069FC) { - psx_delay_BFC069FC = 0; - cpu->gpr[31] = 0xBFC06A04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06A04: 10400003 beq $v0, $zero, 0xBFC06A14 */ - uint32_t psx_brA_BFC06A04 = cpu->gpr[2]; uint32_t psx_brB_BFC06A04 = cpu->gpr[0]; - psx_taken_BFC06A04 = (psx_brA_BFC06A04 == psx_brB_BFC06A04); - psx_delay_BFC06A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06A08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06A08u); -#endif - if (psx_delay_BFC06A04) { - psx_delay_BFC06A04 = 0; - if (psx_taken_BFC06A04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A14u); - goto label_BFC06A14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A0Cu); - } -label_BFC06A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A0C: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06A14u; /* jal link before delay slot */ - psx_delay_BFC06A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06A10: 24040386 addiu $a0, $zero, 902 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (902)); - PGXP_ALU(0x24040386u, cpu->gpr[4], _pgx1, 0x00000386u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A10u); -#endif - if (psx_delay_BFC06A0C) { - psx_delay_BFC06A0C = 0; - cpu->gpr[31] = 0xBFC06A14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A14: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06A1Cu; /* jal link before delay slot */ - psx_delay_BFC06A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06A18: 24040009 addiu $a0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24040009u, cpu->gpr[4], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A18u); -#endif - if (psx_delay_BFC06A14) { - psx_delay_BFC06A14 = 0; - cpu->gpr[31] = 0xBFC06A1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A1C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A20: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06A28u; /* jal link before delay slot */ - psx_delay_BFC06A20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A24: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A24u); -#endif - if (psx_delay_BFC06A20) { - psx_delay_BFC06A20 = 0; - cpu->gpr[31] = 0xBFC06A28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06A28: 10400004 beq $v0, $zero, 0xBFC06A3C */ - uint32_t psx_brA_BFC06A28 = cpu->gpr[2]; uint32_t psx_brB_BFC06A28 = cpu->gpr[0]; - psx_taken_BFC06A28 = (psx_brA_BFC06A28 == psx_brB_BFC06A28); - psx_delay_BFC06A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A2Cu); -#endif - /* 0xBFC06A2C: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A2Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A2Cu); -#endif - if (psx_delay_BFC06A28) { - psx_delay_BFC06A28 = 0; - if (psx_taken_BFC06A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A3Cu); - goto label_BFC06A3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A30u); - } -label_BFC06A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A30: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06A38u; /* jal link before delay slot */ - psx_delay_BFC06A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06A34: 24040387 addiu $a0, $zero, 903 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (903)); - PGXP_ALU(0x24040387u, cpu->gpr[4], _pgx1, 0x00000387u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A34u); -#endif - if (psx_delay_BFC06A30) { - psx_delay_BFC06A30 = 0; - cpu->gpr[31] = 0xBFC06A38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A38u); -#endif - /* 0xBFC06A38: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A38u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A38u); -#endif -label_BFC06A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A3C: 0FF03624 jal 0xBFC0D890 */ - cpu->gpr[31] = 0xBFC06A44u; /* jal link before delay slot */ - psx_delay_BFC06A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06A40: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A40u); -#endif - if (psx_delay_BFC06A3C) { - psx_delay_BFC06A3C = 0; - cpu->gpr[31] = 0xBFC06A44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D890u); - cpu->pc = 0xBFC0D890u; return; - } -label_BFC06A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06A44: 04400034 bltz $v0, 0xBFC06B18 */ - uint32_t psx_brA_BFC06A44 = cpu->gpr[2]; - psx_taken_BFC06A44 = ((int32_t)psx_brA_BFC06A44 < 0); - psx_delay_BFC06A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC06A48: AFA2002C sw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A48u); return; } g_debug_last_store_pc = 0xBFC06A48u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A48u); -#endif - if (psx_delay_BFC06A44) { - psx_delay_BFC06A44 = 0; - if (psx_taken_BFC06A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B18u); - goto label_BFC06B18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A4Cu); - } -label_BFC06A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A4C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A50u); -#endif - /* 0xBFC06A50: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A50u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A54: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06A5Cu; /* jal link before delay slot */ - psx_delay_BFC06A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A58: 2484E064 addiu $a0, $a0, -8092 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8092)); - PGXP_ALU(0x2484E064u, cpu->gpr[4], _pgx1, 0xFFFFE064u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A58u); -#endif - if (psx_delay_BFC06A54) { - psx_delay_BFC06A54 = 0; - cpu->gpr[31] = 0xBFC06A5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A5C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A60: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06A68u; /* jal link before delay slot */ - psx_delay_BFC06A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A64: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A64u); -#endif - if (psx_delay_BFC06A60) { - psx_delay_BFC06A60 = 0; - cpu->gpr[31] = 0xBFC06A68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06A68: 10400004 beq $v0, $zero, 0xBFC06A7C */ - uint32_t psx_brA_BFC06A68 = cpu->gpr[2]; uint32_t psx_brB_BFC06A68 = cpu->gpr[0]; - psx_taken_BFC06A68 = (psx_brA_BFC06A68 == psx_brB_BFC06A68); - psx_delay_BFC06A68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A6Cu); -#endif - /* 0xBFC06A6C: 8FA4002C lw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A6Cu); -#endif - if (psx_delay_BFC06A68) { - psx_delay_BFC06A68 = 0; - if (psx_taken_BFC06A68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A7Cu); - goto label_BFC06A7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A70u); - } -label_BFC06A70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A70: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06A78u; /* jal link before delay slot */ - psx_delay_BFC06A70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06A74: 2404038F addiu $a0, $zero, 911 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (911)); - PGXP_ALU(0x2404038Fu, cpu->gpr[4], _pgx1, 0x0000038Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A74u); -#endif - if (psx_delay_BFC06A70) { - psx_delay_BFC06A70 = 0; - cpu->gpr[31] = 0xBFC06A78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A78u); -#endif - /* 0xBFC06A78: 8FA4002C lw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A78u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A78u); -#endif -label_BFC06A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06A7C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06A80: 24A5B070 addiu $a1, $a1, -20368 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20368)); - PGXP_ALU(0x24A5B070u, cpu->gpr[5], _pgx1, 0xFFFFB070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06A84: 0FF0362C jal 0xBFC0D8B0 */ - cpu->gpr[31] = 0xBFC06A8Cu; /* jal link before delay slot */ - psx_delay_BFC06A84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06A88: 24060800 addiu $a2, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24060800u, cpu->gpr[6], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A88u); -#endif - if (psx_delay_BFC06A84) { - psx_delay_BFC06A84 = 0; - cpu->gpr[31] = 0xBFC06A8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8B0u); - cpu->pc = 0xBFC0D8B0u; return; - } -label_BFC06A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06A8C: 1440000D bne $v0, $zero, 0xBFC06AC4 */ - uint32_t psx_brA_BFC06A8C = cpu->gpr[2]; uint32_t psx_brB_BFC06A8C = cpu->gpr[0]; - psx_taken_BFC06A8C = (psx_brA_BFC06A8C != psx_brB_BFC06A8C); - psx_delay_BFC06A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC06A90: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A90u); -#endif - if (psx_delay_BFC06A8C) { - psx_delay_BFC06A8C = 0; - if (psx_taken_BFC06A8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06AC4u); - goto label_BFC06AC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06A94u); - } -label_BFC06A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06A94: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06A98: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06A9C: 24A5E14C addiu $a1, $a1, -7860 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7860)); - PGXP_ALU(0x24A5E14Cu, cpu->gpr[5], _pgx1, 0xFFFFE14Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AA0: 2484B940 addiu $a0, $a0, -18112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18112)); - PGXP_ALU(0x2484B940u, cpu->gpr[4], _pgx1, 0xFFFFB940u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06AA4: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC06AACu; /* jal link before delay slot */ - psx_delay_BFC06AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06AA8: 2406000C addiu $a2, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2406000Cu, cpu->gpr[6], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AA8u); -#endif - if (psx_delay_BFC06AA4) { - psx_delay_BFC06AA4 = 0; - cpu->gpr[31] = 0xBFC06AACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC06AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AAC: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AB0u); -#endif - /* 0xBFC06AB0: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06AB0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06AB4: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC06ABCu; /* jal link before delay slot */ - psx_delay_BFC06AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AB8: 2484B8B0 addiu $a0, $a0, -18256 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18256)); - PGXP_ALU(0x2484B8B0u, cpu->gpr[4], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AB8u); -#endif - if (psx_delay_BFC06AB4) { - psx_delay_BFC06AB4 = 0; - cpu->gpr[31] = 0xBFC06ABCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC06ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06ABC: 10000028 beq $zero, $zero, 0xBFC06B60 */ - uint32_t psx_brA_BFC06ABC = cpu->gpr[0]; uint32_t psx_brB_BFC06ABC = cpu->gpr[0]; - psx_taken_BFC06ABC = (psx_brA_BFC06ABC == psx_brB_BFC06ABC); - psx_delay_BFC06ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06AC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06AC0u); -#endif - if (psx_delay_BFC06ABC) { - psx_delay_BFC06ABC = 0; - if (psx_taken_BFC06ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B60u); - goto label_BFC06B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06AC4u); - } -label_BFC06AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06AC4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC06AC8: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ACCu); -#endif - /* 0xBFC06ACC: 8FA4002C lw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06ACCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06AD0: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC06AD8u; /* jal link before delay slot */ - psx_delay_BFC06AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06AD4: A020B070 sb $zero, -20368($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20368; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06AD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-20368)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020B070u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AD4u); -#endif - if (psx_delay_BFC06AD0) { - psx_delay_BFC06AD0 = 0; - cpu->gpr[31] = 0xBFC06AD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC06AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AD8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06ADC: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06AE4u; /* jal link before delay slot */ - psx_delay_BFC06ADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AE0: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AE0u); -#endif - if (psx_delay_BFC06ADC) { - psx_delay_BFC06ADC = 0; - cpu->gpr[31] = 0xBFC06AE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06AE4: 10400003 beq $v0, $zero, 0xBFC06AF4 */ - uint32_t psx_brA_BFC06AE4 = cpu->gpr[2]; uint32_t psx_brB_BFC06AE4 = cpu->gpr[0]; - psx_taken_BFC06AE4 = (psx_brA_BFC06AE4 == psx_brB_BFC06AE4); - psx_delay_BFC06AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06AE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06AE8u); -#endif - if (psx_delay_BFC06AE4) { - psx_delay_BFC06AE4 = 0; - if (psx_taken_BFC06AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06AF4u); - goto label_BFC06AF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06AECu); - } -label_BFC06AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06AEC: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06AF4u; /* jal link before delay slot */ - psx_delay_BFC06AEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06AF0: 24040390 addiu $a0, $zero, 912 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (912)); - PGXP_ALU(0x24040390u, cpu->gpr[4], _pgx1, 0x00000390u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06AF0u); -#endif - if (psx_delay_BFC06AEC) { - psx_delay_BFC06AEC = 0; - cpu->gpr[31] = 0xBFC06AF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06AF4: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06AF8: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06AFC: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06B00: 24C6B8B0 addiu $a2, $a2, -18256 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-18256)); - PGXP_ALU(0x24C6B8B0u, cpu->gpr[6], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06B04: 24A5B940 addiu $a1, $a1, -18112 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-18112)); - PGXP_ALU(0x24A5B940u, cpu->gpr[5], _pgx1, 0xFFFFB940u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B08: 0FF00228 jal 0xBFC008A0 */ - cpu->gpr[31] = 0xBFC06B10u; /* jal link before delay slot */ - psx_delay_BFC06B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B0C: 2484B070 addiu $a0, $a0, -20368 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20368)); - PGXP_ALU(0x2484B070u, cpu->gpr[4], _pgx1, 0xFFFFB070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B0Cu); -#endif - if (psx_delay_BFC06B08) { - psx_delay_BFC06B08 = 0; - cpu->gpr[31] = 0xBFC06B10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC008A0u); - cpu->pc = 0xBFC008A0u; return; - } -label_BFC06B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B10: 10000013 beq $zero, $zero, 0xBFC06B60 */ - uint32_t psx_brA_BFC06B10 = cpu->gpr[0]; uint32_t psx_brB_BFC06B10 = cpu->gpr[0]; - psx_taken_BFC06B10 = (psx_brA_BFC06B10 == psx_brB_BFC06B10); - psx_delay_BFC06B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06B14u); -#endif - if (psx_delay_BFC06B10) { - psx_delay_BFC06B10 = 0; - if (psx_taken_BFC06B10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B60u); - goto label_BFC06B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B18u); - } -label_BFC06B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B18: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B1C: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06B24u; /* jal link before delay slot */ - psx_delay_BFC06B1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B20: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B20u); -#endif - if (psx_delay_BFC06B1C) { - psx_delay_BFC06B1C = 0; - cpu->gpr[31] = 0xBFC06B24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06B24: 10400003 beq $v0, $zero, 0xBFC06B34 */ - uint32_t psx_brA_BFC06B24 = cpu->gpr[2]; uint32_t psx_brB_BFC06B24 = cpu->gpr[0]; - psx_taken_BFC06B24 = (psx_brA_BFC06B24 == psx_brB_BFC06B24); - psx_delay_BFC06B24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06B28u); -#endif - if (psx_delay_BFC06B24) { - psx_delay_BFC06B24 = 0; - if (psx_taken_BFC06B24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B34u); - goto label_BFC06B34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B2Cu); - } -label_BFC06B2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B2C: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06B34u; /* jal link before delay slot */ - psx_delay_BFC06B2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06B30: 24040391 addiu $a0, $zero, 913 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (913)); - PGXP_ALU(0x24040391u, cpu->gpr[4], _pgx1, 0x00000391u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B30u); -#endif - if (psx_delay_BFC06B2C) { - psx_delay_BFC06B2C = 0; - cpu->gpr[31] = 0xBFC06B34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B34: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06B38: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B3C: A0000180 sb $zero, 384($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 384; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06B3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (384)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0000180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06B40: 24A5E14C addiu $a1, $a1, -7860 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7860)); - PGXP_ALU(0x24A5E14Cu, cpu->gpr[5], _pgx1, 0xFFFFE14Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B44: 2484B940 addiu $a0, $a0, -18112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18112)); - PGXP_ALU(0x2484B940u, cpu->gpr[4], _pgx1, 0xFFFFB940u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B48: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC06B50u; /* jal link before delay slot */ - psx_delay_BFC06B48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06B4C: 2406000C addiu $a2, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2406000Cu, cpu->gpr[6], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B4Cu); -#endif - if (psx_delay_BFC06B48) { - psx_delay_BFC06B48 = 0; - cpu->gpr[31] = 0xBFC06B50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC06B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B50: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B54u); -#endif - /* 0xBFC06B54: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06B54u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B58: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC06B60u; /* jal link before delay slot */ - psx_delay_BFC06B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B5C: 2484B8B0 addiu $a0, $a0, -18256 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18256)); - PGXP_ALU(0x2484B8B0u, cpu->gpr[4], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B5Cu); -#endif - if (psx_delay_BFC06B58) { - psx_delay_BFC06B58 = 0; - cpu->gpr[31] = 0xBFC06B60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC06B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B60: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B64: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06B6Cu; /* jal link before delay slot */ - psx_delay_BFC06B64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B68: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B68u); -#endif - if (psx_delay_BFC06B64) { - psx_delay_BFC06B64 = 0; - cpu->gpr[31] = 0xBFC06B6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06B6C: 10400003 beq $v0, $zero, 0xBFC06B7C */ - uint32_t psx_brA_BFC06B6C = cpu->gpr[2]; uint32_t psx_brB_BFC06B6C = cpu->gpr[0]; - psx_taken_BFC06B6C = (psx_brA_BFC06B6C == psx_brB_BFC06B6C); - psx_delay_BFC06B6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06B70u); -#endif - if (psx_delay_BFC06B6C) { - psx_delay_BFC06B6C = 0; - if (psx_taken_BFC06B6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B7Cu); - goto label_BFC06B7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06B74u); - } -label_BFC06B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B74: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06B7Cu; /* jal link before delay slot */ - psx_delay_BFC06B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06B78: 24040388 addiu $a0, $zero, 904 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (904)); - PGXP_ALU(0x24040388u, cpu->gpr[4], _pgx1, 0x00000388u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B78u); -#endif - if (psx_delay_BFC06B74) { - psx_delay_BFC06B74 = 0; - cpu->gpr[31] = 0xBFC06B7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B7C: 0FF01BCA jal 0xBFC06F28 */ - cpu->gpr[31] = 0xBFC06B84u; /* jal link before delay slot */ - psx_delay_BFC06B7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06B80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06B80u); -#endif - if (psx_delay_BFC06B7C) { - psx_delay_BFC06B7C = 0; - cpu->gpr[31] = 0xBFC06B84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06F28u); - cpu->pc = 0xBFC06F28u; return; - } -label_BFC06B84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B84: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06B88: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06B8C: 24A5B8B0 addiu $a1, $a1, -18256 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-18256)); - PGXP_ALU(0x24A5B8B0u, cpu->gpr[5], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B90: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06B98u; /* jal link before delay slot */ - psx_delay_BFC06B90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B94: 2484E088 addiu $a0, $a0, -8056 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8056)); - PGXP_ALU(0x2484E088u, cpu->gpr[4], _pgx1, 0xFFFFE088u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06B94u); -#endif - if (psx_delay_BFC06B90) { - psx_delay_BFC06B90 = 0; - cpu->gpr[31] = 0xBFC06B98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06B98: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06B9C: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06BA4u; /* jal link before delay slot */ - psx_delay_BFC06B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06BA0: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BA0u); -#endif - if (psx_delay_BFC06B9C) { - psx_delay_BFC06B9C = 0; - cpu->gpr[31] = 0xBFC06BA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06BA4: 10400003 beq $v0, $zero, 0xBFC06BB4 */ - uint32_t psx_brA_BFC06BA4 = cpu->gpr[2]; uint32_t psx_brB_BFC06BA4 = cpu->gpr[0]; - psx_taken_BFC06BA4 = (psx_brA_BFC06BA4 == psx_brB_BFC06BA4); - psx_delay_BFC06BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06BA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06BA8u); -#endif - if (psx_delay_BFC06BA4) { - psx_delay_BFC06BA4 = 0; - if (psx_taken_BFC06BA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06BB4u); - goto label_BFC06BB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06BACu); - } -label_BFC06BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06BAC: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06BB4u; /* jal link before delay slot */ - psx_delay_BFC06BAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06BB0: 24040389 addiu $a0, $zero, 905 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (905)); - PGXP_ALU(0x24040389u, cpu->gpr[4], _pgx1, 0x00000389u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BB0u); -#endif - if (psx_delay_BFC06BAC) { - psx_delay_BFC06BAC = 0; - cpu->gpr[31] = 0xBFC06BB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06BB4: 0FF03614 jal 0xBFC0D850 */ - cpu->gpr[31] = 0xBFC06BBCu; /* jal link before delay slot */ - psx_delay_BFC06BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06BB8u); -#endif - if (psx_delay_BFC06BB4) { - psx_delay_BFC06BB4 = 0; - cpu->gpr[31] = 0xBFC06BBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D850u); - cpu->pc = 0xBFC0D850u; return; - } -label_BFC06BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06BBC: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06BC0: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06BC4: 24A5B870 addiu $a1, $a1, -18320 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); - PGXP_ALU(0x24A5B870u, cpu->gpr[5], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06BC8: 0FF00E86 jal 0xBFC03A18 */ - cpu->gpr[31] = 0xBFC06BD0u; /* jal link before delay slot */ - psx_delay_BFC06BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06BCC: 2484B8B0 addiu $a0, $a0, -18256 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18256)); - PGXP_ALU(0x2484B8B0u, cpu->gpr[4], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BCCu); -#endif - if (psx_delay_BFC06BC8) { - psx_delay_BFC06BC8 = 0; - cpu->gpr[31] = 0xBFC06BD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A18u); - cpu->pc = 0xBFC03A18u; return; - } -label_BFC06BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06BD0: 14400003 bne $v0, $zero, 0xBFC06BE0 */ - uint32_t psx_brA_BFC06BD0 = cpu->gpr[2]; uint32_t psx_brB_BFC06BD0 = cpu->gpr[0]; - psx_taken_BFC06BD0 = (psx_brA_BFC06BD0 != psx_brB_BFC06BD0); - psx_delay_BFC06BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06BD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06BD4u); -#endif - if (psx_delay_BFC06BD0) { - psx_delay_BFC06BD0 = 0; - if (psx_taken_BFC06BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06BE0u); - goto label_BFC06BE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06BD8u); - } -label_BFC06BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06BD8: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06BE0u; /* jal link before delay slot */ - psx_delay_BFC06BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06BDC: 2404038A addiu $a0, $zero, 906 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (906)); - PGXP_ALU(0x2404038Au, cpu->gpr[4], _pgx1, 0x0000038Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BDCu); -#endif - if (psx_delay_BFC06BD8) { - psx_delay_BFC06BD8 = 0; - cpu->gpr[31] = 0xBFC06BE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06BE0: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06BE4: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC06BE8: 3C07A001 lui $a3, 0xA001 */ - cpu->gpr[7] = 0xA0010000u; - PGXP_ALU(0x3C07A001u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BECu); -#endif - /* 0xBFC06BEC: 8CE7B87C lw $a3, -18308($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -18308; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-18308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06BECu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE7B87Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BF0u); -#endif - /* 0xBFC06BF0: 8CC6B878 lw $a2, -18312($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -18312; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-18312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06BF0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6B878u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BF4u); -#endif - /* 0xBFC06BF4: 8CA5B870 lw $a1, -18320($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06BF4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B870u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06BF8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06BFC: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06C04u; /* jal link before delay slot */ - psx_delay_BFC06BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C00: 2484E1B8 addiu $a0, $a0, -7752 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7752)); - PGXP_ALU(0x2484E1B8u, cpu->gpr[4], _pgx1, 0xFFFFE1B8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C00u); -#endif - if (psx_delay_BFC06BFC) { - psx_delay_BFC06BFC = 0; - cpu->gpr[31] = 0xBFC06C04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06C04: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06C08: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C0Cu); -#endif - /* 0xBFC06C0C: 8CC6B948 lw $a2, -18104($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -18104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C0Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6B948u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C10u); -#endif - /* 0xBFC06C10: 8CA5B870 lw $a1, -18320($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C10u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B870u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C14: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C18: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06C20u; /* jal link before delay slot */ - psx_delay_BFC06C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C1C: 2484E09C addiu $a0, $a0, -8036 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8036)); - PGXP_ALU(0x2484E09Cu, cpu->gpr[4], _pgx1, 0xFFFFE09Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C1Cu); -#endif - if (psx_delay_BFC06C18) { - psx_delay_BFC06C18 = 0; - cpu->gpr[31] = 0xBFC06C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06C20: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C24u); -#endif - /* 0xBFC06C24: 8CA5B948 lw $a1, -18104($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C24u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B948u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06C28: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06C2C: AC25B890 sw $a1, -18288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C2Cu); return; } g_debug_last_store_pc = 0xBFC06C2Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25B890u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06C30: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C34: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06C38: AC20B894 sw $zero, -18284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C38u); return; } g_debug_last_store_pc = 0xBFC06C38u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B894u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C3C: 2484E1E4 addiu $a0, $a0, -7708 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7708)); - PGXP_ALU(0x2484E1E4u, cpu->gpr[4], _pgx1, 0xFFFFE1E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C40: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06C48u; /* jal link before delay slot */ - psx_delay_BFC06C40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06C44: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C44u); -#endif - if (psx_delay_BFC06C40) { - psx_delay_BFC06C40 = 0; - cpu->gpr[31] = 0xBFC06C48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C48: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC06C50u; /* jal link before delay slot */ - psx_delay_BFC06C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06C4Cu); -#endif - if (psx_delay_BFC06C48) { - psx_delay_BFC06C48 = 0; - cpu->gpr[31] = 0xBFC06C50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC06C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C50: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C54: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06C5Cu; /* jal link before delay slot */ - psx_delay_BFC06C54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C58: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C58u); -#endif - if (psx_delay_BFC06C54) { - psx_delay_BFC06C54 = 0; - cpu->gpr[31] = 0xBFC06C5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06C5C: 10400003 beq $v0, $zero, 0xBFC06C6C */ - uint32_t psx_brA_BFC06C5C = cpu->gpr[2]; uint32_t psx_brB_BFC06C5C = cpu->gpr[0]; - psx_taken_BFC06C5C = (psx_brA_BFC06C5C == psx_brB_BFC06C5C); - psx_delay_BFC06C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06C60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06C60u); -#endif - if (psx_delay_BFC06C5C) { - psx_delay_BFC06C5C = 0; - if (psx_taken_BFC06C5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06C6Cu); - goto label_BFC06C6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06C64u); - } -label_BFC06C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C64: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06C6Cu; /* jal link before delay slot */ - psx_delay_BFC06C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06C68: 2404038B addiu $a0, $zero, 907 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (907)); - PGXP_ALU(0x2404038Bu, cpu->gpr[4], _pgx1, 0x0000038Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C68u); -#endif - if (psx_delay_BFC06C64) { - psx_delay_BFC06C64 = 0; - cpu->gpr[31] = 0xBFC06C6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C6C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C70: 2484B870 addiu $a0, $a0, -18320 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18320)); - PGXP_ALU(0x2484B870u, cpu->gpr[4], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06C74: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C78: 0FF0355C jal 0xBFC0D570 */ - cpu->gpr[31] = 0xBFC06C80u; /* jal link before delay slot */ - psx_delay_BFC06C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06C7C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C7Cu); -#endif - if (psx_delay_BFC06C78) { - psx_delay_BFC06C78 = 0; - cpu->gpr[31] = 0xBFC06C80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D570u); - cpu->pc = 0xBFC0D570u; return; - } -label_BFC06C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C80: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C84: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06C8Cu; /* jal link before delay slot */ - psx_delay_BFC06C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06C88: 2484E210 addiu $a0, $a0, -7664 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7664)); - PGXP_ALU(0x2484E210u, cpu->gpr[4], _pgx1, 0xFFFFE210u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C88u); -#endif - if (psx_delay_BFC06C84) { - psx_delay_BFC06C84 = 0; - cpu->gpr[31] = 0xBFC06C8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06C8C: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06C94u; /* jal link before delay slot */ - psx_delay_BFC06C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06C90: 2404038C addiu $a0, $zero, 908 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (908)); - PGXP_ALU(0x2404038Cu, cpu->gpr[4], _pgx1, 0x0000038Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C90u); -#endif - if (psx_delay_BFC06C8C) { - psx_delay_BFC06C8C = 0; - cpu->gpr[31] = 0xBFC06C94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C94u); -#endif - /* 0xBFC06C94: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06C98: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06C9C: 03E00008 jr $ra */ - psx_delay_BFC06C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CA0u); -#endif - if (psx_delay_BFC06C9C) { - psx_delay_BFC06C9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06CA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06CA4u); - int psx_delay_BFC06CC0 = 0; - int psx_delay_BFC06CCC = 0; - int psx_delay_BFC06CD4 = 0; - int psx_delay_BFC06CDC = 0; - int psx_delay_BFC06CE4 = 0; - int psx_delay_BFC06CEC = 0; - int psx_delay_BFC06CF4 = 0; - int psx_delay_BFC06D14 = 0; - int psx_delay_BFC06D20 = 0; - int psx_delay_BFC06D28 = 0; - int psx_delay_BFC06D38 = 0; - int psx_delay_BFC06D40 = 0; - int psx_delay_BFC06D48 = 0; - int psx_delay_BFC06D50 = 0; - int psx_delay_BFC06D60 = 0; - int psx_delay_BFC06D70 = 0; - int psx_delay_BFC06D78 = 0; - int psx_delay_BFC06D8C = 0; - int psx_delay_BFC06D98 = 0; - int psx_delay_BFC06DA0 = 0; - int psx_taken_BFC06DA0 = 0; - int psx_delay_BFC06DA8 = 0; - int psx_delay_BFC06DB0 = 0; - int psx_delay_BFC06DBC = 0; - int psx_delay_BFC06DC4 = 0; - int psx_taken_BFC06DC4 = 0; - int psx_delay_BFC06DCC = 0; - int psx_delay_BFC06DD4 = 0; - int psx_delay_BFC06DE8 = 0; - int psx_delay_BFC06DF0 = 0; - int psx_taken_BFC06DF0 = 0; - int psx_delay_BFC06DF8 = 0; - int psx_delay_BFC06E1C = 0; - int psx_delay_BFC06E38 = 0; - int psx_delay_BFC06E60 = 0; - int psx_delay_BFC06E68 = 0; - int psx_delay_BFC06E74 = 0; - int psx_delay_BFC06E7C = 0; - int psx_taken_BFC06E7C = 0; - int psx_delay_BFC06E84 = 0; - int psx_delay_BFC06E98 = 0; - int psx_delay_BFC06EA4 = 0; - int psx_delay_BFC06EAC = 0; - int psx_delay_BFC06EBC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06CC8u: goto label_BFC06CC8; - case 0xBFC06CD4u: goto label_BFC06CD4; - case 0xBFC06CDCu: goto label_BFC06CDC; - case 0xBFC06CE4u: goto label_BFC06CE4; - case 0xBFC06CECu: goto label_BFC06CEC; - case 0xBFC06CF4u: goto label_BFC06CF4; - case 0xBFC06CFCu: goto label_BFC06CFC; - case 0xBFC06D1Cu: goto label_BFC06D1C; - case 0xBFC06D28u: goto label_BFC06D28; - case 0xBFC06D30u: goto label_BFC06D30; - case 0xBFC06D40u: goto label_BFC06D40; - case 0xBFC06D48u: goto label_BFC06D48; - case 0xBFC06D50u: goto label_BFC06D50; - case 0xBFC06D58u: goto label_BFC06D58; - case 0xBFC06D68u: goto label_BFC06D68; - case 0xBFC06D78u: goto label_BFC06D78; - case 0xBFC06D80u: goto label_BFC06D80; - case 0xBFC06D94u: goto label_BFC06D94; - case 0xBFC06DA0u: goto label_BFC06DA0; - case 0xBFC06DA8u: goto label_BFC06DA8; - case 0xBFC06DB0u: goto label_BFC06DB0; - case 0xBFC06DB8u: goto label_BFC06DB8; - case 0xBFC06DC4u: goto label_BFC06DC4; - case 0xBFC06DCCu: goto label_BFC06DCC; - case 0xBFC06DD4u: goto label_BFC06DD4; - case 0xBFC06DDCu: goto label_BFC06DDC; - case 0xBFC06DF0u: goto label_BFC06DF0; - case 0xBFC06DF8u: goto label_BFC06DF8; - case 0xBFC06E00u: goto label_BFC06E00; - case 0xBFC06E24u: goto label_BFC06E24; - case 0xBFC06E40u: goto label_BFC06E40; - case 0xBFC06E68u: goto label_BFC06E68; - case 0xBFC06E70u: goto label_BFC06E70; - case 0xBFC06E7Cu: goto label_BFC06E7C; - case 0xBFC06E84u: goto label_BFC06E84; - case 0xBFC06E8Cu: goto label_BFC06E8C; - case 0xBFC06EA0u: goto label_BFC06EA0; - case 0xBFC06EACu: goto label_BFC06EAC; - case 0xBFC06EB4u: goto label_BFC06EB4; - default: break; - } - } -label_BFC06CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06CA4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06CA8: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06CAC: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06CB0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06CB0u); return; } g_debug_last_store_pc = 0xBFC06CB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06CB4: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06CB4u); return; } g_debug_last_store_pc = 0xBFC06CB4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06CB8: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06CB8u); return; } g_debug_last_store_pc = 0xBFC06CB8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06CBC: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06CBCu); return; } g_debug_last_store_pc = 0xBFC06CBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CC0: 0FF00E5A jal 0xBFC03968 */ - cpu->gpr[31] = 0xBFC06CC8u; /* jal link before delay slot */ - psx_delay_BFC06CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06CC4: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06CC4u); return; } g_debug_last_store_pc = 0xBFC06CC4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CC4u); -#endif - if (psx_delay_BFC06CC0) { - psx_delay_BFC06CC0 = 0; - cpu->gpr[31] = 0xBFC06CC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03968u); - cpu->pc = 0xBFC03968u; return; - } -label_BFC06CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06CC8: 2401FBFE addiu $at, $zero, -1026 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1026)); - PGXP_ALU(0x2401FBFEu, cpu->gpr[1], _pgx1, 0xFFFFFBFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CCC: 0FF00E5E jal 0xBFC03978 */ - cpu->gpr[31] = 0xBFC06CD4u; /* jal link before delay slot */ - psx_delay_BFC06CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC06CD0: 00412024 and $a0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00412024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06CD0u); -#endif - if (psx_delay_BFC06CCC) { - psx_delay_BFC06CCC = 0; - cpu->gpr[31] = 0xBFC06CD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03978u); - cpu->pc = 0xBFC03978u; return; - } -label_BFC06CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CD4: 0FF00108 jal 0xBFC00420 */ - cpu->gpr[31] = 0xBFC06CDCu; /* jal link before delay slot */ - psx_delay_BFC06CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CD8u); -#endif - if (psx_delay_BFC06CD4) { - psx_delay_BFC06CD4 = 0; - cpu->gpr[31] = 0xBFC06CDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC00420u); - cpu->pc = 0xBFC00420u; return; - } -label_BFC06CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CDC: 0FF010B4 jal 0xBFC042D0 */ - cpu->gpr[31] = 0xBFC06CE4u; /* jal link before delay slot */ - psx_delay_BFC06CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CE0u); -#endif - if (psx_delay_BFC06CDC) { - psx_delay_BFC06CDC = 0; - cpu->gpr[31] = 0xBFC06CE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042D0u); - cpu->pc = 0xBFC042D0u; return; - } -label_BFC06CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CE4: 0FF010A8 jal 0xBFC042A0 */ - cpu->gpr[31] = 0xBFC06CECu; /* jal link before delay slot */ - psx_delay_BFC06CE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CE8u); -#endif - if (psx_delay_BFC06CE4) { - psx_delay_BFC06CE4 = 0; - cpu->gpr[31] = 0xBFC06CECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC042A0u); - cpu->pc = 0xBFC042A0u; return; - } -label_BFC06CEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CEC: 0FF036C4 jal 0xBFC0DB10 */ - cpu->gpr[31] = 0xBFC06CF4u; /* jal link before delay slot */ - psx_delay_BFC06CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CF0u); -#endif - if (psx_delay_BFC06CEC) { - psx_delay_BFC06CEC = 0; - cpu->gpr[31] = 0xBFC06CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB10u); - cpu->pc = 0xBFC0DB10u; return; - } -label_BFC06CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06CF4: 0FF036C8 jal 0xBFC0DB20 */ - cpu->gpr[31] = 0xBFC06CFCu; /* jal link before delay slot */ - psx_delay_BFC06CF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06CF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06CF8u); -#endif - if (psx_delay_BFC06CF4) { - psx_delay_BFC06CF4 = 0; - cpu->gpr[31] = 0xBFC06CFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB20u); - cpu->pc = 0xBFC0DB20u; return; - } -label_BFC06CFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06CFC: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06D00: 34421070 ori $v0, $v0, 0x1070 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1070u; - PGXP_ALU(0x34421070u, cpu->gpr[2], _pgx1, 0x1070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06D04: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D04u); return; } g_debug_last_store_pc = 0xBFC06D04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06D08: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D08u); return; } g_debug_last_store_pc = 0xBFC06D08u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D0C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D10u); -#endif - /* 0xBFC06D10: 8C84B9B0 lw $a0, -18000($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D10u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D14: 0FF036CC jal 0xBFC0DB30 */ - cpu->gpr[31] = 0xBFC06D1Cu; /* jal link before delay slot */ - psx_delay_BFC06D14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06D18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06D18u); -#endif - if (psx_delay_BFC06D14) { - psx_delay_BFC06D14 = 0; - cpu->gpr[31] = 0xBFC06D1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB30u); - cpu->pc = 0xBFC0DB30u; return; - } -label_BFC06D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D1C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D20: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06D28u; /* jal link before delay slot */ - psx_delay_BFC06D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D24: 2484DFB0 addiu $a0, $a0, -8272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8272)); - PGXP_ALU(0x2484DFB0u, cpu->gpr[4], _pgx1, 0xFFFFDFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D24u); -#endif - if (psx_delay_BFC06D20) { - psx_delay_BFC06D20 = 0; - cpu->gpr[31] = 0xBFC06D28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D28: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06D30u; /* jal link before delay slot */ - psx_delay_BFC06D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D2C: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D2Cu); -#endif - if (psx_delay_BFC06D28) { - psx_delay_BFC06D28 = 0; - cpu->gpr[31] = 0xBFC06D30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D30: 3C04A000 lui $a0, 0xA000 */ - cpu->gpr[4] = 0xA0000000u; - PGXP_ALU(0x3C04A000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D34: 3484E000 ori $a0, $a0, 0xE000 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xE000u; - PGXP_ALU(0x3484E000u, cpu->gpr[4], _pgx1, 0xE000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D38: 0FF036D0 jal 0xBFC0DB40 */ - cpu->gpr[31] = 0xBFC06D40u; /* jal link before delay slot */ - psx_delay_BFC06D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06D3C: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D3Cu); -#endif - if (psx_delay_BFC06D38) { - psx_delay_BFC06D38 = 0; - cpu->gpr[31] = 0xBFC06D40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB40u); - cpu->pc = 0xBFC0DB40u; return; - } -label_BFC06D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D40: 0FF01184 jal 0xBFC04610 */ - cpu->gpr[31] = 0xBFC06D48u; /* jal link before delay slot */ - psx_delay_BFC06D40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D44: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D44u); -#endif - if (psx_delay_BFC06D40) { - psx_delay_BFC06D40 = 0; - cpu->gpr[31] = 0xBFC06D48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04610u); - cpu->pc = 0xBFC04610u; return; - } -label_BFC06D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D48: 0FF036D4 jal 0xBFC0DB50 */ - cpu->gpr[31] = 0xBFC06D50u; /* jal link before delay slot */ - psx_delay_BFC06D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D4C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D4Cu); -#endif - if (psx_delay_BFC06D48) { - psx_delay_BFC06D48 = 0; - cpu->gpr[31] = 0xBFC06D50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB50u); - cpu->pc = 0xBFC0DB50u; return; - } -label_BFC06D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D50: 0FF036D8 jal 0xBFC0DB60 */ - cpu->gpr[31] = 0xBFC06D58u; /* jal link before delay slot */ - psx_delay_BFC06D50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D54: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D54u); -#endif - if (psx_delay_BFC06D50) { - psx_delay_BFC06D50 = 0; - cpu->gpr[31] = 0xBFC06D58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB60u); - cpu->pc = 0xBFC0DB60u; return; - } -label_BFC06D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D58: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D5Cu); -#endif - /* 0xBFC06D5C: 8C84B944 lw $a0, -18108($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D5Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D60: 0FF0119E jal 0xBFC04678 */ - cpu->gpr[31] = 0xBFC06D68u; /* jal link before delay slot */ - psx_delay_BFC06D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06D64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06D64u); -#endif - if (psx_delay_BFC06D60) { - psx_delay_BFC06D60 = 0; - cpu->gpr[31] = 0xBFC06D68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04678u); - cpu->pc = 0xBFC04678u; return; - } -label_BFC06D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06D68: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D6Cu); -#endif - /* 0xBFC06D6C: 8CA5B940 lw $a1, -18112($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B940u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D70: 0FF011CB jal 0xBFC0472C */ - cpu->gpr[31] = 0xBFC06D78u; /* jal link before delay slot */ - psx_delay_BFC06D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D74: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D74u); -#endif - if (psx_delay_BFC06D70) { - psx_delay_BFC06D70 = 0; - cpu->gpr[31] = 0xBFC06D78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0472Cu); - cpu->pc = 0xBFC0472Cu; return; - } -label_BFC06D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D78: 0FF036DC jal 0xBFC0DB70 */ - cpu->gpr[31] = 0xBFC06D80u; /* jal link before delay slot */ - psx_delay_BFC06D78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06D7C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D7Cu); -#endif - if (psx_delay_BFC06D78) { - psx_delay_BFC06D78 = 0; - cpu->gpr[31] = 0xBFC06D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB70u); - cpu->pc = 0xBFC0DB70u; return; - } -label_BFC06D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D80: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06D84: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06D88: 24A5B8B0 addiu $a1, $a1, -18256 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-18256)); - PGXP_ALU(0x24A5B8B0u, cpu->gpr[5], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D8C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06D94u; /* jal link before delay slot */ - psx_delay_BFC06D8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D90: 2484E088 addiu $a0, $a0, -8056 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8056)); - PGXP_ALU(0x2484E088u, cpu->gpr[4], _pgx1, 0xFFFFE088u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D90u); -#endif - if (psx_delay_BFC06D8C) { - psx_delay_BFC06D8C = 0; - cpu->gpr[31] = 0xBFC06D94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D94: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06D98: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06DA0u; /* jal link before delay slot */ - psx_delay_BFC06D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06D9C: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06D9Cu); -#endif - if (psx_delay_BFC06D98) { - psx_delay_BFC06D98 = 0; - cpu->gpr[31] = 0xBFC06DA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06DA0: 10400003 beq $v0, $zero, 0xBFC06DB0 */ - uint32_t psx_brA_BFC06DA0 = cpu->gpr[2]; uint32_t psx_brB_BFC06DA0 = cpu->gpr[0]; - psx_taken_BFC06DA0 = (psx_brA_BFC06DA0 == psx_brB_BFC06DA0); - psx_delay_BFC06DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06DA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06DA4u); -#endif - if (psx_delay_BFC06DA0) { - psx_delay_BFC06DA0 = 0; - if (psx_taken_BFC06DA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06DB0u); - goto label_BFC06DB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06DA8u); - } -label_BFC06DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DA8: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06DB0u; /* jal link before delay slot */ - psx_delay_BFC06DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06DAC: 24040386 addiu $a0, $zero, 902 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (902)); - PGXP_ALU(0x24040386u, cpu->gpr[4], _pgx1, 0x00000386u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DACu); -#endif - if (psx_delay_BFC06DA8) { - psx_delay_BFC06DA8 = 0; - cpu->gpr[31] = 0xBFC06DB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DB0: 0FF01CE8 jal 0xBFC073A0 */ - cpu->gpr[31] = 0xBFC06DB8u; /* jal link before delay slot */ - psx_delay_BFC06DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06DB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06DB4u); -#endif - if (psx_delay_BFC06DB0) { - psx_delay_BFC06DB0 = 0; - cpu->gpr[31] = 0xBFC06DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073A0u); - cpu->pc = 0xBFC073A0u; return; - } -label_BFC06DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06DB8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DBC: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06DC4u; /* jal link before delay slot */ - psx_delay_BFC06DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06DC0: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DC0u); -#endif - if (psx_delay_BFC06DBC) { - psx_delay_BFC06DBC = 0; - cpu->gpr[31] = 0xBFC06DC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06DC4: 10400003 beq $v0, $zero, 0xBFC06DD4 */ - uint32_t psx_brA_BFC06DC4 = cpu->gpr[2]; uint32_t psx_brB_BFC06DC4 = cpu->gpr[0]; - psx_taken_BFC06DC4 = (psx_brA_BFC06DC4 == psx_brB_BFC06DC4); - psx_delay_BFC06DC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06DC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06DC8u); -#endif - if (psx_delay_BFC06DC4) { - psx_delay_BFC06DC4 = 0; - if (psx_taken_BFC06DC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06DD4u); - goto label_BFC06DD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06DCCu); - } -label_BFC06DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DCC: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06DD4u; /* jal link before delay slot */ - psx_delay_BFC06DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06DD0: 24040389 addiu $a0, $zero, 905 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (905)); - PGXP_ALU(0x24040389u, cpu->gpr[4], _pgx1, 0x00000389u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DD0u); -#endif - if (psx_delay_BFC06DCC) { - psx_delay_BFC06DCC = 0; - cpu->gpr[31] = 0xBFC06DD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DD4: 0FF03614 jal 0xBFC0D850 */ - cpu->gpr[31] = 0xBFC06DDCu; /* jal link before delay slot */ - psx_delay_BFC06DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06DD8u); -#endif - if (psx_delay_BFC06DD4) { - psx_delay_BFC06DD4 = 0; - cpu->gpr[31] = 0xBFC06DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D850u); - cpu->pc = 0xBFC0D850u; return; - } -label_BFC06DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06DDC: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06DE0: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06DE4: 24A5B870 addiu $a1, $a1, -18320 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); - PGXP_ALU(0x24A5B870u, cpu->gpr[5], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DE8: 0FF00E86 jal 0xBFC03A18 */ - cpu->gpr[31] = 0xBFC06DF0u; /* jal link before delay slot */ - psx_delay_BFC06DE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06DEC: 2484B8B0 addiu $a0, $a0, -18256 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18256)); - PGXP_ALU(0x2484B8B0u, cpu->gpr[4], _pgx1, 0xFFFFB8B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DECu); -#endif - if (psx_delay_BFC06DE8) { - psx_delay_BFC06DE8 = 0; - cpu->gpr[31] = 0xBFC06DF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03A18u); - cpu->pc = 0xBFC03A18u; return; - } -label_BFC06DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06DF0: 14400003 bne $v0, $zero, 0xBFC06E00 */ - uint32_t psx_brA_BFC06DF0 = cpu->gpr[2]; uint32_t psx_brB_BFC06DF0 = cpu->gpr[0]; - psx_taken_BFC06DF0 = (psx_brA_BFC06DF0 != psx_brB_BFC06DF0); - psx_delay_BFC06DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06DF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06DF4u); -#endif - if (psx_delay_BFC06DF0) { - psx_delay_BFC06DF0 = 0; - if (psx_taken_BFC06DF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06E00u); - goto label_BFC06E00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06DF8u); - } -label_BFC06DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06DF8: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06E00u; /* jal link before delay slot */ - psx_delay_BFC06DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06DFC: 2404038A addiu $a0, $zero, 906 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (906)); - PGXP_ALU(0x2404038Au, cpu->gpr[4], _pgx1, 0x0000038Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06DFCu); -#endif - if (psx_delay_BFC06DF8) { - psx_delay_BFC06DF8 = 0; - cpu->gpr[31] = 0xBFC06E00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06E00: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06E04: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC06E08: 3C07A001 lui $a3, 0xA001 */ - cpu->gpr[7] = 0xA0010000u; - PGXP_ALU(0x3C07A001u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E0Cu); -#endif - /* 0xBFC06E0C: 8CE7B87C lw $a3, -18308($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -18308; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-18308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E0Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE7B87Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E10u); -#endif - /* 0xBFC06E10: 8CC6B878 lw $a2, -18312($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -18312; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-18312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E10u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6B878u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E14u); -#endif - /* 0xBFC06E14: 8CA5B870 lw $a1, -18320($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E14u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B870u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E18: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E1C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06E24u; /* jal link before delay slot */ - psx_delay_BFC06E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E20: 2484E220 addiu $a0, $a0, -7648 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7648)); - PGXP_ALU(0x2484E220u, cpu->gpr[4], _pgx1, 0xFFFFE220u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E20u); -#endif - if (psx_delay_BFC06E1C) { - psx_delay_BFC06E1C = 0; - cpu->gpr[31] = 0xBFC06E24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06E24: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC06E28: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E2Cu); -#endif - /* 0xBFC06E2C: 8CC6B948 lw $a2, -18104($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -18104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E2Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6B948u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E30u); -#endif - /* 0xBFC06E30: 8CA5B870 lw $a1, -18320($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E30u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B870u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E34: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E38: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06E40u; /* jal link before delay slot */ - psx_delay_BFC06E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E3C: 2484E09C addiu $a0, $a0, -8036 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8036)); - PGXP_ALU(0x2484E09Cu, cpu->gpr[4], _pgx1, 0xFFFFE09Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E3Cu); -#endif - if (psx_delay_BFC06E38) { - psx_delay_BFC06E38 = 0; - cpu->gpr[31] = 0xBFC06E40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06E40: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E44u); -#endif - /* 0xBFC06E44: 8CA5B948 lw $a1, -18104($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E44u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B948u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06E48: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC06E4C: AC25B890 sw $a1, -18288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E4Cu); return; } g_debug_last_store_pc = 0xBFC06E4Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25B890u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06E50: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E54: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06E58: AC20B894 sw $zero, -18284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E58u); return; } g_debug_last_store_pc = 0xBFC06E58u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B894u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E5C: 2484E24C addiu $a0, $a0, -7604 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7604)); - PGXP_ALU(0x2484E24Cu, cpu->gpr[4], _pgx1, 0xFFFFE24Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E60: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06E68u; /* jal link before delay slot */ - psx_delay_BFC06E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06E64: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E64u); -#endif - if (psx_delay_BFC06E60) { - psx_delay_BFC06E60 = 0; - cpu->gpr[31] = 0xBFC06E68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E68: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC06E70u; /* jal link before delay slot */ - psx_delay_BFC06E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06E6Cu); -#endif - if (psx_delay_BFC06E68) { - psx_delay_BFC06E68 = 0; - cpu->gpr[31] = 0xBFC06E70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC06E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E70: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E74: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC06E7Cu; /* jal link before delay slot */ - psx_delay_BFC06E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E78: 2484B980 addiu $a0, $a0, -18048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18048)); - PGXP_ALU(0x2484B980u, cpu->gpr[4], _pgx1, 0xFFFFB980u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E78u); -#endif - if (psx_delay_BFC06E74) { - psx_delay_BFC06E74 = 0; - cpu->gpr[31] = 0xBFC06E7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC06E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06E7C: 10400003 beq $v0, $zero, 0xBFC06E8C */ - uint32_t psx_brA_BFC06E7C = cpu->gpr[2]; uint32_t psx_brB_BFC06E7C = cpu->gpr[0]; - psx_taken_BFC06E7C = (psx_brA_BFC06E7C == psx_brB_BFC06E7C); - psx_delay_BFC06E7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06E80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06E80u); -#endif - if (psx_delay_BFC06E7C) { - psx_delay_BFC06E7C = 0; - if (psx_taken_BFC06E7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06E8Cu); - goto label_BFC06E8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06E84u); - } -label_BFC06E84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E84: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06E8Cu; /* jal link before delay slot */ - psx_delay_BFC06E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06E88: 2404038B addiu $a0, $zero, 907 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (907)); - PGXP_ALU(0x2404038Bu, cpu->gpr[4], _pgx1, 0x0000038Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E88u); -#endif - if (psx_delay_BFC06E84) { - psx_delay_BFC06E84 = 0; - cpu->gpr[31] = 0xBFC06E8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E8C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06E90: 2484B870 addiu $a0, $a0, -18320 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18320)); - PGXP_ALU(0x2484B870u, cpu->gpr[4], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06E94: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06E98: 0FF0355C jal 0xBFC0D570 */ - cpu->gpr[31] = 0xBFC06EA0u; /* jal link before delay slot */ - psx_delay_BFC06E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC06E9C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06E9Cu); -#endif - if (psx_delay_BFC06E98) { - psx_delay_BFC06E98 = 0; - cpu->gpr[31] = 0xBFC06EA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D570u); - cpu->pc = 0xBFC0D570u; return; - } -label_BFC06EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06EA0: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06EA4: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06EACu; /* jal link before delay slot */ - psx_delay_BFC06EA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06EA8: 2484E278 addiu $a0, $a0, -7560 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7560)); - PGXP_ALU(0x2484E278u, cpu->gpr[4], _pgx1, 0xFFFFE278u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EA8u); -#endif - if (psx_delay_BFC06EA4) { - psx_delay_BFC06EA4 = 0; - cpu->gpr[31] = 0xBFC06EACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06EAC: 0FF01BE9 jal 0xBFC06FA4 */ - cpu->gpr[31] = 0xBFC06EB4u; /* jal link before delay slot */ - psx_delay_BFC06EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06EB0: 2404038C addiu $a0, $zero, 908 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (908)); - PGXP_ALU(0x2404038Cu, cpu->gpr[4], _pgx1, 0x0000038Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EB0u); -#endif - if (psx_delay_BFC06EAC) { - psx_delay_BFC06EAC = 0; - cpu->gpr[31] = 0xBFC06EB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06FA4u); - cpu->pc = 0xBFC06FA4u; return; - } -label_BFC06EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EB4u); -#endif - /* 0xBFC06EB4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06EB8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06EBC: 03E00008 jr $ra */ - psx_delay_BFC06EBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06EC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06EC0u); -#endif - if (psx_delay_BFC06EBC) { - psx_delay_BFC06EBC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06EC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06EC4u); - int psx_delay_BFC06ECC = 0; - int psx_delay_BFC06EE8 = 0; - int psx_delay_BFC06EF4 = 0; - int psx_taken_BFC06EF4 = 0; - int psx_delay_BFC06EFC = 0; - int psx_delay_BFC06F04 = 0; - int psx_delay_BFC06F10 = 0; - int psx_delay_BFC06F20 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06ED4u: goto label_BFC06ED4; - case 0xBFC06EF0u: goto label_BFC06EF0; - case 0xBFC06EFCu: goto label_BFC06EFC; - case 0xBFC06F04u: goto label_BFC06F04; - case 0xBFC06F0Cu: goto label_BFC06F0C; - case 0xBFC06F18u: goto label_BFC06F18; - default: break; - } - } -label_BFC06EC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06EC4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06EC8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EC8u); return; } g_debug_last_store_pc = 0xBFC06EC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06ECC: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06ED4u; /* jal link before delay slot */ - psx_delay_BFC06ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06ED0: 2404000F addiu $a0, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2404000Fu, cpu->gpr[4], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06ED0u); -#endif - if (psx_delay_BFC06ECC) { - psx_delay_BFC06ECC = 0; - cpu->gpr[31] = 0xBFC06ED4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06ED4: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC06ED8: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06EDC: A4400186 sh $zero, 390($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EDCu); return; } g_debug_last_store_pc = 0xBFC06EDCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06EE0: A4400184 sh $zero, 388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EE0u); return; } g_debug_last_store_pc = 0xBFC06EE0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06EE4: A4400182 sh $zero, 386($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EE4u); return; } g_debug_last_store_pc = 0xBFC06EE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06EE8: 0FF01C0F jal 0xBFC0703C */ - cpu->gpr[31] = 0xBFC06EF0u; /* jal link before delay slot */ - psx_delay_BFC06EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06EEC: A4400180 sh $zero, 384($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EECu); return; } g_debug_last_store_pc = 0xBFC06EECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EECu); -#endif - if (psx_delay_BFC06EE8) { - psx_delay_BFC06EE8 = 0; - cpu->gpr[31] = 0xBFC06EF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0703Cu); - cpu->pc = 0xBFC0703Cu; return; - } -label_BFC06EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06EF0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC06EF4: 14410003 bne $v0, $at, 0xBFC06F04 */ - uint32_t psx_brA_BFC06EF4 = cpu->gpr[2]; uint32_t psx_brB_BFC06EF4 = cpu->gpr[1]; - psx_taken_BFC06EF4 = (psx_brA_BFC06EF4 != psx_brB_BFC06EF4); - psx_delay_BFC06EF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06EF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06EF8u); -#endif - if (psx_delay_BFC06EF4) { - psx_delay_BFC06EF4 = 0; - if (psx_taken_BFC06EF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06F04u); - goto label_BFC06F04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06EFCu); - } -label_BFC06EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06EFC: 0FF01C47 jal 0xBFC0711C */ - cpu->gpr[31] = 0xBFC06F04u; /* jal link before delay slot */ - psx_delay_BFC06EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06F00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06F00u); -#endif - if (psx_delay_BFC06EFC) { - psx_delay_BFC06EFC = 0; - cpu->gpr[31] = 0xBFC06F04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0711Cu); - cpu->pc = 0xBFC0711Cu; return; - } -label_BFC06F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F04: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06F0Cu; /* jal link before delay slot */ - psx_delay_BFC06F04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F08: 2404000E addiu $a0, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2404000Eu, cpu->gpr[4], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F08u); -#endif - if (psx_delay_BFC06F04) { - psx_delay_BFC06F04 = 0; - cpu->gpr[31] = 0xBFC06F0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06F0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC06F0C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F10: 0FF019E1 jal 0xBFC06784 */ - cpu->gpr[31] = 0xBFC06F18u; /* jal link before delay slot */ - psx_delay_BFC06F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC06F14: AC20B9B0 sw $zero, -18000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F14u); return; } g_debug_last_store_pc = 0xBFC06F14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9B0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F14u); -#endif - if (psx_delay_BFC06F10) { - psx_delay_BFC06F10 = 0; - cpu->gpr[31] = 0xBFC06F18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC06784u); - cpu->pc = 0xBFC06784u; return; - } -label_BFC06F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F18u); -#endif - /* 0xBFC06F18: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F18u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06F1C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06F20: 03E00008 jr $ra */ - psx_delay_BFC06F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06F24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06F24u); -#endif - if (psx_delay_BFC06F20) { - psx_delay_BFC06F20 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06F28(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06F28u); - int psx_delay_BFC06F34 = 0; - int psx_delay_BFC06F44 = 0; - int psx_delay_BFC06F4C = 0; - int psx_delay_BFC06F54 = 0; - int psx_delay_BFC06F5C = 0; - int psx_delay_BFC06F6C = 0; - int psx_delay_BFC06F7C = 0; - int psx_delay_BFC06F84 = 0; - int psx_delay_BFC06F8C = 0; - int psx_delay_BFC06F9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06F3Cu: goto label_BFC06F3C; - case 0xBFC06F4Cu: goto label_BFC06F4C; - case 0xBFC06F54u: goto label_BFC06F54; - case 0xBFC06F5Cu: goto label_BFC06F5C; - case 0xBFC06F64u: goto label_BFC06F64; - case 0xBFC06F74u: goto label_BFC06F74; - case 0xBFC06F84u: goto label_BFC06F84; - case 0xBFC06F8Cu: goto label_BFC06F8C; - case 0xBFC06F94u: goto label_BFC06F94; - default: break; - } - } -label_BFC06F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06F28: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06F2C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F2Cu); return; } g_debug_last_store_pc = 0xBFC06F2Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06F30: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F34: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC06F3Cu; /* jal link before delay slot */ - psx_delay_BFC06F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06F38: 2484E078 addiu $a0, $a0, -8072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8072)); - PGXP_ALU(0x2484E078u, cpu->gpr[4], _pgx1, 0xFFFFE078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F38u); -#endif - if (psx_delay_BFC06F34) { - psx_delay_BFC06F34 = 0; - cpu->gpr[31] = 0xBFC06F3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC06F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06F3C: 3C04A000 lui $a0, 0xA000 */ - cpu->gpr[4] = 0xA0000000u; - PGXP_ALU(0x3C04A000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06F40: 3484E000 ori $a0, $a0, 0xE000 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xE000u; - PGXP_ALU(0x3484E000u, cpu->gpr[4], _pgx1, 0xE000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F44: 0FF036D0 jal 0xBFC0DB40 */ - cpu->gpr[31] = 0xBFC06F4Cu; /* jal link before delay slot */ - psx_delay_BFC06F44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC06F48: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F48u); -#endif - if (psx_delay_BFC06F44) { - psx_delay_BFC06F44 = 0; - cpu->gpr[31] = 0xBFC06F4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB40u); - cpu->pc = 0xBFC0DB40u; return; - } -label_BFC06F4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F4C: 0FF01184 jal 0xBFC04610 */ - cpu->gpr[31] = 0xBFC06F54u; /* jal link before delay slot */ - psx_delay_BFC06F4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F50: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F50u); -#endif - if (psx_delay_BFC06F4C) { - psx_delay_BFC06F4C = 0; - cpu->gpr[31] = 0xBFC06F54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04610u); - cpu->pc = 0xBFC04610u; return; - } -label_BFC06F54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F54: 0FF036D4 jal 0xBFC0DB50 */ - cpu->gpr[31] = 0xBFC06F5Cu; /* jal link before delay slot */ - psx_delay_BFC06F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F58: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F58u); -#endif - if (psx_delay_BFC06F54) { - psx_delay_BFC06F54 = 0; - cpu->gpr[31] = 0xBFC06F5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB50u); - cpu->pc = 0xBFC0DB50u; return; - } -label_BFC06F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F5C: 0FF036D8 jal 0xBFC0DB60 */ - cpu->gpr[31] = 0xBFC06F64u; /* jal link before delay slot */ - psx_delay_BFC06F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F60: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F60u); -#endif - if (psx_delay_BFC06F5C) { - psx_delay_BFC06F5C = 0; - cpu->gpr[31] = 0xBFC06F64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB60u); - cpu->pc = 0xBFC0DB60u; return; - } -label_BFC06F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC06F64: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F68u); -#endif - /* 0xBFC06F68: 8C84B944 lw $a0, -18108($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -18108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-18108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F68u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F6C: 0FF0119E jal 0xBFC04678 */ - cpu->gpr[31] = 0xBFC06F74u; /* jal link before delay slot */ - psx_delay_BFC06F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06F70u); -#endif - if (psx_delay_BFC06F6C) { - psx_delay_BFC06F6C = 0; - cpu->gpr[31] = 0xBFC06F74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC04678u); - cpu->pc = 0xBFC04678u; return; - } -label_BFC06F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06F74: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F78u); -#endif - /* 0xBFC06F78: 8CA5B940 lw $a1, -18112($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -18112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-18112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F78u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5B940u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F7C: 0FF011CB jal 0xBFC0472C */ - cpu->gpr[31] = 0xBFC06F84u; /* jal link before delay slot */ - psx_delay_BFC06F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F80: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F80u); -#endif - if (psx_delay_BFC06F7C) { - psx_delay_BFC06F7C = 0; - cpu->gpr[31] = 0xBFC06F84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0472Cu); - cpu->pc = 0xBFC0472Cu; return; - } -label_BFC06F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F84: 0FF036DC jal 0xBFC0DB70 */ - cpu->gpr[31] = 0xBFC06F8Cu; /* jal link before delay slot */ - psx_delay_BFC06F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06F88: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F88u); -#endif - if (psx_delay_BFC06F84) { - psx_delay_BFC06F84 = 0; - cpu->gpr[31] = 0xBFC06F8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB70u); - cpu->pc = 0xBFC0DB70u; return; - } -label_BFC06F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06F8C: 0FF01C68 jal 0xBFC071A0 */ - cpu->gpr[31] = 0xBFC06F94u; /* jal link before delay slot */ - psx_delay_BFC06F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06F90u); -#endif - if (psx_delay_BFC06F8C) { - psx_delay_BFC06F8C = 0; - cpu->gpr[31] = 0xBFC06F94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC071A0u); - cpu->pc = 0xBFC071A0u; return; - } -label_BFC06F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F94u); -#endif - /* 0xBFC06F94: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06F98: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06F9C: 03E00008 jr $ra */ - psx_delay_BFC06F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06FA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06FA0u); -#endif - if (psx_delay_BFC06F9C) { - psx_delay_BFC06F9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06FA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06FA4u); - int psx_delay_BFC06FB0 = 0; - int psx_delay_BFC06FBC = 0; - int psx_delay_BFC06FCC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC06FB8u: goto label_BFC06FB8; - case 0xBFC06FC4u: goto label_BFC06FC4; - default: break; - } - } -label_BFC06FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06FA4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06FA8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FA8u); return; } g_debug_last_store_pc = 0xBFC06FA8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC06FAC: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FACu); return; } g_debug_last_store_pc = 0xBFC06FACu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06FB0: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC06FB8u; /* jal link before delay slot */ - psx_delay_BFC06FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06FB4: 2404000F addiu $a0, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2404000Fu, cpu->gpr[4], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FB4u); -#endif - if (psx_delay_BFC06FB0) { - psx_delay_BFC06FB0 = 0; - cpu->gpr[31] = 0xBFC06FB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC06FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FB8u); -#endif - /* 0xBFC06FB8: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FB8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC06FBC: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC06FC4u; /* jal link before delay slot */ - psx_delay_BFC06FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC06FC0: 24040042 addiu $a0, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24040042u, cpu->gpr[4], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FC0u); -#endif - if (psx_delay_BFC06FBC) { - psx_delay_BFC06FBC = 0; - cpu->gpr[31] = 0xBFC06FC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC06FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FC4u); -#endif - /* 0xBFC06FC4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06FC8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06FCC: 03E00008 jr $ra */ - psx_delay_BFC06FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC06FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC06FD0u); -#endif - if (psx_delay_BFC06FCC) { - psx_delay_BFC06FCC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06FDC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06FDCu); - int psx_delay_BFC06FDC = 0; -label_BFC06FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC06FDC: 03E00008 jr $ra */ - psx_delay_BFC06FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC06FE0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FE0u); -#endif - if (psx_delay_BFC06FDC) { - psx_delay_BFC06FDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC06FF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC06FF0u); - int psx_delay_BFC0700C = 0; - int psx_delay_BFC07014 = 0; - int psx_delay_BFC07024 = 0; - int psx_delay_BFC07034 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07014u: goto label_BFC07014; - case 0xBFC0701Cu: goto label_BFC0701C; - case 0xBFC0702Cu: goto label_BFC0702C; - default: break; - } - } -label_BFC06FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC06FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC06FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC06FF0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC06FF4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FF4u); return; } g_debug_last_store_pc = 0xBFC06FF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC06FF8: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06FF8u); return; } g_debug_last_store_pc = 0xBFC06FF8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC06FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC06FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC06FFC: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC06FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC07000: 3C060006 lui $a2, 0x6 */ - cpu->gpr[6] = 0x00060000u; - PGXP_ALU(0x3C060006u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC07004: 34C67FF0 ori $a2, $a2, 0x7FF0 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x7FF0u; - PGXP_ALU(0x34C67FF0u, cpu->gpr[6], _pgx1, 0x7FF0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07008: 34A58000 ori $a1, $a1, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x8000u; - PGXP_ALU(0x34A58000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0700Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0700C: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC07014u; /* jal link before delay slot */ - psx_delay_BFC0700C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07010: 3C048003 lui $a0, 0x8003 */ - cpu->gpr[4] = 0x80030000u; - PGXP_ALU(0x3C048003u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07010u); -#endif - if (psx_delay_BFC0700C) { - psx_delay_BFC0700C = 0; - cpu->gpr[31] = 0xBFC07014u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC07014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07014: 0FF00648 jal 0xBFC01920 */ - cpu->gpr[31] = 0xBFC0701Cu; /* jal link before delay slot */ - psx_delay_BFC07014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07018u); -#endif - if (psx_delay_BFC07014) { - psx_delay_BFC07014 = 0; - cpu->gpr[31] = 0xBFC0701Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01920u); - cpu->pc = 0xBFC01920u; return; - } -label_BFC0701C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0701Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0701Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0701Cu); -#endif - /* 0xBFC0701C: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0701Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0701Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07020: 3C0E8003 lui $t6, 0x8003 */ - cpu->gpr[14] = 0x80030000u; - PGXP_ALU(0x3C0E8003u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC07024: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0xBFC0702Cu; /* jalr link before delay slot */ - psx_delay_BFC07024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07028u); -#endif - if (psx_delay_BFC07024) { - psx_delay_BFC07024 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0xBFC0702Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC0702C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0702Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0702Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0702Cu); -#endif - /* 0xBFC0702C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0702Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0702Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07030: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07034: 03E00008 jr $ra */ - psx_delay_BFC07034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07038u); -#endif - if (psx_delay_BFC07034) { - psx_delay_BFC07034 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0703C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0703Cu); - int psx_delay_BFC07054 = 0; - int psx_taken_BFC07054 = 0; - int psx_delay_BFC07070 = 0; - int psx_taken_BFC07070 = 0; - int psx_delay_BFC07080 = 0; - int psx_taken_BFC07080 = 0; - int psx_delay_BFC07090 = 0; - int psx_taken_BFC07090 = 0; - int psx_delay_BFC07098 = 0; - int psx_delay_BFC070A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0705Cu: goto label_BFC0705C; - case 0xBFC07064u: goto label_BFC07064; - case 0xBFC07078u: goto label_BFC07078; - case 0xBFC07088u: goto label_BFC07088; - case 0xBFC07098u: goto label_BFC07098; - case 0xBFC070A4u: goto label_BFC070A4; - default: break; - } - } -label_BFC0703C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0703Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0703C: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07040u); -#endif - /* 0xBFC07040: 81EFE288 lb $t7, -7544($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -7544; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-7544)), 15, 0x8000u); - PGXP_LOAD(0x81EFE288u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07044: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07048: 3C021F00 lui $v0, 0x1F00 */ - cpu->gpr[2] = 0x1F000000u; - PGXP_ALU(0x3C021F00u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0704Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0704C: 25CEE288 addiu $t6, $t6, -7544 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-7544)); - PGXP_ALU(0x25CEE288u, cpu->gpr[14], _pgx1, 0xFFFFE288u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0704Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07050: 34420084 ori $v0, $v0, 0x84 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x84u; - PGXP_ALU(0x34420084u, cpu->gpr[2], _pgx1, 0x0084u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC07054: 11E0000C beq $t7, $zero, 0xBFC07088 */ - uint32_t psx_brA_BFC07054 = cpu->gpr[15]; uint32_t psx_brB_BFC07054 = cpu->gpr[0]; - psx_taken_BFC07054 = (psx_brA_BFC07054 == psx_brB_BFC07054); - psx_delay_BFC07054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC07058: 01C01821 addu $v1, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07058u); -#endif - if (psx_delay_BFC07054) { - psx_delay_BFC07054 = 0; - if (psx_taken_BFC07054) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07088u); - goto label_BFC07088; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0705Cu); - } -label_BFC0705C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0705Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0705Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0705Cu); -#endif - /* 0xBFC0705C: 81C60000 lb $a2, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 6, 0x4000u); - PGXP_LOAD(0x81C60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0705Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07060u); -#endif -label_BFC07064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07064u); -#endif - /* 0xBFC07064: 80440000 lb $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); - PGXP_LOAD(0x80440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC07068: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0706Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0706C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0706Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC07070: 14A40005 bne $a1, $a0, 0xBFC07088 */ - uint32_t psx_brA_BFC07070 = cpu->gpr[5]; uint32_t psx_brB_BFC07070 = cpu->gpr[4]; - psx_taken_BFC07070 = (psx_brA_BFC07070 != psx_brB_BFC07070); - psx_delay_BFC07070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC07074: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07074u); -#endif - if (psx_delay_BFC07070) { - psx_delay_BFC07070 = 0; - if (psx_taken_BFC07070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07088u); - goto label_BFC07088; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07078u); - } -label_BFC07078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07078u); -#endif - /* 0xBFC07078: 80660000 lb $a2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 6, 0x8u); - PGXP_LOAD(0x80660000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0707C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC07080: 14C0FFF8 bne $a2, $zero, 0xBFC07064 */ - uint32_t psx_brA_BFC07080 = cpu->gpr[6]; uint32_t psx_brB_BFC07080 = cpu->gpr[0]; - psx_taken_BFC07080 = (psx_brA_BFC07080 != psx_brB_BFC07080); - psx_delay_BFC07080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07084u); -#endif - if (psx_delay_BFC07080) { - psx_delay_BFC07080 = 0; - if (psx_taken_BFC07080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07064u); - goto label_BFC07064; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07088u); - } -label_BFC07088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07088u); -#endif - /* 0xBFC07088: 80780000 lb $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x80780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0708C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC07090: 17000004 bne $t8, $zero, 0xBFC070A4 */ - uint32_t psx_brA_BFC07090 = cpu->gpr[24]; uint32_t psx_brB_BFC07090 = cpu->gpr[0]; - psx_taken_BFC07090 = (psx_brA_BFC07090 != psx_brB_BFC07090); - psx_delay_BFC07090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07094: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07094u); -#endif - if (psx_delay_BFC07090) { - psx_delay_BFC07090 = 0; - if (psx_taken_BFC07090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070A4u); - goto label_BFC070A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07098u); - } -label_BFC07098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07098: 03E00008 jr $ra */ - psx_delay_BFC07098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0709Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0709C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0709Cu); -#endif - if (psx_delay_BFC07098) { - psx_delay_BFC07098 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC070A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC070A4: 03E00008 jr $ra */ - psx_delay_BFC070A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC070A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC070A8u); -#endif - if (psx_delay_BFC070A4) { - psx_delay_BFC070A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC070AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC070ACu); - int psx_delay_BFC070C4 = 0; - int psx_taken_BFC070C4 = 0; - int psx_delay_BFC070E0 = 0; - int psx_taken_BFC070E0 = 0; - int psx_delay_BFC070F0 = 0; - int psx_taken_BFC070F0 = 0; - int psx_delay_BFC07100 = 0; - int psx_taken_BFC07100 = 0; - int psx_delay_BFC07108 = 0; - int psx_delay_BFC07114 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC070CCu: goto label_BFC070CC; - case 0xBFC070D4u: goto label_BFC070D4; - case 0xBFC070E8u: goto label_BFC070E8; - case 0xBFC070F8u: goto label_BFC070F8; - case 0xBFC07108u: goto label_BFC07108; - case 0xBFC07114u: goto label_BFC07114; - default: break; - } - } -label_BFC070AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC070AC: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC070ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070B0u); -#endif - /* 0xBFC070B0: 81EFE288 lb $t7, -7544($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -7544; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-7544)), 15, 0x8000u); - PGXP_LOAD(0x81EFE288u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC070B4: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC070B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC070B8: 3C021F00 lui $v0, 0x1F00 */ - cpu->gpr[2] = 0x1F000000u; - PGXP_ALU(0x3C021F00u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC070B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC070BC: 25CEE288 addiu $t6, $t6, -7544 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-7544)); - PGXP_ALU(0x25CEE288u, cpu->gpr[14], _pgx1, 0xFFFFE288u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC070C0: 34420004 ori $v0, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x4u; - PGXP_ALU(0x34420004u, cpu->gpr[2], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC070C4: 11E0000C beq $t7, $zero, 0xBFC070F8 */ - uint32_t psx_brA_BFC070C4 = cpu->gpr[15]; uint32_t psx_brB_BFC070C4 = cpu->gpr[0]; - psx_taken_BFC070C4 = (psx_brA_BFC070C4 == psx_brB_BFC070C4); - psx_delay_BFC070C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC070C8: 01C01821 addu $v1, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070C8u); -#endif - if (psx_delay_BFC070C4) { - psx_delay_BFC070C4 = 0; - if (psx_taken_BFC070C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070F8u); - goto label_BFC070F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070CCu); - } -label_BFC070CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070CCu); -#endif - /* 0xBFC070CC: 81C60000 lb $a2, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 6, 0x4000u); - PGXP_LOAD(0x81C60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC070D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC070D0u); -#endif -label_BFC070D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070D4u); -#endif - /* 0xBFC070D4: 80440000 lb $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); - PGXP_LOAD(0x80440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC070D8: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC070DC: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC070E0: 14A40005 bne $a1, $a0, 0xBFC070F8 */ - uint32_t psx_brA_BFC070E0 = cpu->gpr[5]; uint32_t psx_brB_BFC070E0 = cpu->gpr[4]; - psx_taken_BFC070E0 = (psx_brA_BFC070E0 != psx_brB_BFC070E0); - psx_delay_BFC070E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC070E4: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070E4u); -#endif - if (psx_delay_BFC070E0) { - psx_delay_BFC070E0 = 0; - if (psx_taken_BFC070E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070F8u); - goto label_BFC070F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070E8u); - } -label_BFC070E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070E8u); -#endif - /* 0xBFC070E8: 80660000 lb $a2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 6, 0x8u); - PGXP_LOAD(0x80660000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC070EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC070ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC070F0: 14C0FFF8 bne $a2, $zero, 0xBFC070D4 */ - uint32_t psx_brA_BFC070F0 = cpu->gpr[6]; uint32_t psx_brB_BFC070F0 = cpu->gpr[0]; - psx_taken_BFC070F0 = (psx_brA_BFC070F0 != psx_brB_BFC070F0); - psx_delay_BFC070F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC070F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC070F4u); -#endif - if (psx_delay_BFC070F0) { - psx_delay_BFC070F0 = 0; - if (psx_taken_BFC070F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070D4u); - goto label_BFC070D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC070F8u); - } -label_BFC070F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC070F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC070F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070F8u); -#endif - /* 0xBFC070F8: 80780000 lb $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x80780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC070F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC070FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC070FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC070FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC07100: 17000004 bne $t8, $zero, 0xBFC07114 */ - uint32_t psx_brA_BFC07100 = cpu->gpr[24]; uint32_t psx_brB_BFC07100 = cpu->gpr[0]; - psx_taken_BFC07100 = (psx_brA_BFC07100 != psx_brB_BFC07100); - psx_delay_BFC07100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07104: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07104u); -#endif - if (psx_delay_BFC07100) { - psx_delay_BFC07100 = 0; - if (psx_taken_BFC07100) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07114u); - goto label_BFC07114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07108u); - } -label_BFC07108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07108: 03E00008 jr $ra */ - psx_delay_BFC07108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0710Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0710C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0710Cu); -#endif - if (psx_delay_BFC07108) { - psx_delay_BFC07108 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC07114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07114: 03E00008 jr $ra */ - psx_delay_BFC07114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07118u); -#endif - if (psx_delay_BFC07114) { - psx_delay_BFC07114 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0711C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0711Cu); - int psx_delay_BFC07130 = 0; - int psx_delay_BFC07140 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07138u: goto label_BFC07138; - default: break; - } - } -label_BFC0711C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0711Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0711Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0711Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0711C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0711Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07120: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07120u); return; } g_debug_last_store_pc = 0xBFC07120u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07124: 3C0E1F00 lui $t6, 0x1F00 */ - cpu->gpr[14] = 0x1F000000u; - PGXP_ALU(0x3C0E1F00u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07128u); -#endif - /* 0xBFC07128: 8DC20080 lw $v0, 128($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07128u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0712Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0712C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0712Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC07130: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0xBFC07138u; /* jalr link before delay slot */ - psx_delay_BFC07130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07134u); -#endif - if (psx_delay_BFC07130) { - psx_delay_BFC07130 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0xBFC07138u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC07138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07138u); -#endif - /* 0xBFC07138: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07138u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0713Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0713C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0713Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07140: 03E00008 jr $ra */ - psx_delay_BFC07140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07144u); -#endif - if (psx_delay_BFC07140) { - psx_delay_BFC07140 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07148(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07148u); - int psx_delay_BFC07154 = 0; - int psx_delay_BFC07168 = 0; - int psx_delay_BFC0717C = 0; - int psx_delay_BFC0718C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0715Cu: goto label_BFC0715C; - case 0xBFC07170u: goto label_BFC07170; - case 0xBFC07184u: goto label_BFC07184; - default: break; - } - } -label_BFC07148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07148: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0714Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0714C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0714Cu); return; } g_debug_last_store_pc = 0xBFC0714Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0714Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07150: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07154: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0715Cu; /* jal link before delay slot */ - psx_delay_BFC07154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07158: 2484E2B8 addiu $a0, $a0, -7496 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7496)); - PGXP_ALU(0x2484E2B8u, cpu->gpr[4], _pgx1, 0xFFFFE2B8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07158u); -#endif - if (psx_delay_BFC07154) { - psx_delay_BFC07154 = 0; - cpu->gpr[31] = 0xBFC0715Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0715C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0715Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0715C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07160: 3C051F00 lui $a1, 0x1F00 */ - cpu->gpr[5] = 0x1F000000u; - PGXP_ALU(0x3C051F00u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07164: 34A50004 ori $a1, $a1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x4u; - PGXP_ALU(0x34A50004u, cpu->gpr[5], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07168: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC07170u; /* jal link before delay slot */ - psx_delay_BFC07168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0716Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0716C: 2484E2D8 addiu $a0, $a0, -7464 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7464)); - PGXP_ALU(0x2484E2D8u, cpu->gpr[4], _pgx1, 0xFFFFE2D8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0716Cu); -#endif - if (psx_delay_BFC07168) { - psx_delay_BFC07168 = 0; - cpu->gpr[31] = 0xBFC07170u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC07170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07170: 3C0E1F00 lui $t6, 0x1F00 */ - cpu->gpr[14] = 0x1F000000u; - PGXP_ALU(0x3C0E1F00u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07174u); -#endif - /* 0xBFC07174: 8DC20000 lw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07174u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0717Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC0717C: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0xBFC07184u; /* jalr link before delay slot */ - psx_delay_BFC0717C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07180: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07180u); -#endif - if (psx_delay_BFC0717C) { - psx_delay_BFC0717C = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0xBFC07184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC07184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07184u); -#endif - /* 0xBFC07184: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07184u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07188: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0718Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0718C: 03E00008 jr $ra */ - psx_delay_BFC0718C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07190: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07190u); -#endif - if (psx_delay_BFC0718C) { - psx_delay_BFC0718C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC071A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC071A0u); - int psx_delay_BFC071A8 = 0; - int psx_delay_BFC071C0 = 0; - int psx_delay_BFC071E0 = 0; - int psx_delay_BFC07200 = 0; - int psx_delay_BFC07220 = 0; - int psx_delay_BFC07240 = 0; - int psx_delay_BFC07254 = 0; - int psx_delay_BFC07264 = 0; - int psx_delay_BFC07274 = 0; - int psx_delay_BFC07284 = 0; - int psx_delay_BFC07294 = 0; - int psx_delay_BFC0729C = 0; - int psx_delay_BFC072B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC071B0u: goto label_BFC071B0; - case 0xBFC071C8u: goto label_BFC071C8; - case 0xBFC071E8u: goto label_BFC071E8; - case 0xBFC07208u: goto label_BFC07208; - case 0xBFC07228u: goto label_BFC07228; - case 0xBFC07248u: goto label_BFC07248; - case 0xBFC0725Cu: goto label_BFC0725C; - case 0xBFC0726Cu: goto label_BFC0726C; - case 0xBFC0727Cu: goto label_BFC0727C; - case 0xBFC0728Cu: goto label_BFC0728C; - case 0xBFC0729Cu: goto label_BFC0729C; - case 0xBFC072A4u: goto label_BFC072A4; - default: break; - } - } -label_BFC071A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC071A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC071A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC071A0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC071A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC071A4u); return; } g_debug_last_store_pc = 0xBFC071A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC071A8: 0FF036FC jal 0xBFC0DBF0 */ - cpu->gpr[31] = 0xBFC071B0u; /* jal link before delay slot */ - psx_delay_BFC071A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC071AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC071ACu); -#endif - if (psx_delay_BFC071A8) { - psx_delay_BFC071A8 = 0; - cpu->gpr[31] = 0xBFC071B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBF0u); - cpu->pc = 0xBFC0DBF0u; return; - } -label_BFC071B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC071B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC071B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071B0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC071B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071B4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC071B8: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC071BC: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC071C0: 0FF0366C jal 0xBFC0D9B0 */ - cpu->gpr[31] = 0xBFC071C8u; /* jal link before delay slot */ - psx_delay_BFC071C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC071C4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071C4u); -#endif - if (psx_delay_BFC071C0) { - psx_delay_BFC071C0 = 0; - cpu->gpr[31] = 0xBFC071C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9B0u); - cpu->pc = 0xBFC0D9B0u; return; - } -label_BFC071C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC071C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC071C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC071C8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC071C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071CC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC071CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC071D0: AC22B9B8 sw $v0, -17992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC071D0u); return; } g_debug_last_store_pc = 0xBFC071D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B9B8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071D4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC071D8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC071DC: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC071E0: 0FF0366C jal 0xBFC0D9B0 */ - cpu->gpr[31] = 0xBFC071E8u; /* jal link before delay slot */ - psx_delay_BFC071E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC071E4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071E4u); -#endif - if (psx_delay_BFC071E0) { - psx_delay_BFC071E0 = 0; - cpu->gpr[31] = 0xBFC071E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9B0u); - cpu->pc = 0xBFC0D9B0u; return; - } -label_BFC071E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC071E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC071E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC071E8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC071E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071EC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC071ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC071F0: AC22B9BC sw $v0, -17988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC071F0u); return; } g_debug_last_store_pc = 0xBFC071F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B9BCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC071F4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC071F8: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC071FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC071FC: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC071FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07200: 0FF0366C jal 0xBFC0D9B0 */ - cpu->gpr[31] = 0xBFC07208u; /* jal link before delay slot */ - psx_delay_BFC07200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC07204: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07204u); -#endif - if (psx_delay_BFC07200) { - psx_delay_BFC07200 = 0; - cpu->gpr[31] = 0xBFC07208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9B0u); - cpu->pc = 0xBFC0D9B0u; return; - } -label_BFC07208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07208: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0720Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0720C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0720Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC07210: AC22B9C0 sw $v0, -17984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07210u); return; } g_debug_last_store_pc = 0xBFC07210u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B9C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07214: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07218: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0721Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0721C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0721Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07220: 0FF0366C jal 0xBFC0D9B0 */ - cpu->gpr[31] = 0xBFC07228u; /* jal link before delay slot */ - psx_delay_BFC07220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC07224: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07224u); -#endif - if (psx_delay_BFC07220) { - psx_delay_BFC07220 = 0; - cpu->gpr[31] = 0xBFC07228u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9B0u); - cpu->pc = 0xBFC0D9B0u; return; - } -label_BFC07228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07228: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0722Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0722C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0722Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC07230: AC22B9C4 sw $v0, -17980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07230u); return; } g_debug_last_store_pc = 0xBFC07230u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B9C4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07234: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07238: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0723Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0723C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0723Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07240: 0FF0366C jal 0xBFC0D9B0 */ - cpu->gpr[31] = 0xBFC07248u; /* jal link before delay slot */ - psx_delay_BFC07240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC07244: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07244u); -#endif - if (psx_delay_BFC07240) { - psx_delay_BFC07240 = 0; - cpu->gpr[31] = 0xBFC07248u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9B0u); - cpu->pc = 0xBFC0D9B0u; return; - } -label_BFC07248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07248: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0724Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0724C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0724Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07250u); -#endif - /* 0xBFC07250: 8C84B9B8 lw $a0, -17992($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07250u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9B8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07254: 0FF03670 jal 0xBFC0D9C0 */ - cpu->gpr[31] = 0xBFC0725Cu; /* jal link before delay slot */ - psx_delay_BFC07254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC07258: AC22B9C8 sw $v0, -17976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07258u); return; } g_debug_last_store_pc = 0xBFC07258u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22B9C8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07258u); -#endif - if (psx_delay_BFC07254) { - psx_delay_BFC07254 = 0; - cpu->gpr[31] = 0xBFC0725Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9C0u); - cpu->pc = 0xBFC0D9C0u; return; - } -label_BFC0725C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0725Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0725C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07260u); -#endif - /* 0xBFC07260: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07260u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07264: 0FF03670 jal 0xBFC0D9C0 */ - cpu->gpr[31] = 0xBFC0726Cu; /* jal link before delay slot */ - psx_delay_BFC07264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07268u); -#endif - if (psx_delay_BFC07264) { - psx_delay_BFC07264 = 0; - cpu->gpr[31] = 0xBFC0726Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9C0u); - cpu->pc = 0xBFC0D9C0u; return; - } -label_BFC0726C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0726Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0726C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07270u); -#endif - /* 0xBFC07270: 8C84B9C0 lw $a0, -17984($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07270u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07274: 0FF03670 jal 0xBFC0D9C0 */ - cpu->gpr[31] = 0xBFC0727Cu; /* jal link before delay slot */ - psx_delay_BFC07274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07278u); -#endif - if (psx_delay_BFC07274) { - psx_delay_BFC07274 = 0; - cpu->gpr[31] = 0xBFC0727Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9C0u); - cpu->pc = 0xBFC0D9C0u; return; - } -label_BFC0727C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0727Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0727C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07280u); -#endif - /* 0xBFC07280: 8C84B9C4 lw $a0, -17980($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07280u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07284: 0FF03670 jal 0xBFC0D9C0 */ - cpu->gpr[31] = 0xBFC0728Cu; /* jal link before delay slot */ - psx_delay_BFC07284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07288u); -#endif - if (psx_delay_BFC07284) { - psx_delay_BFC07284 = 0; - cpu->gpr[31] = 0xBFC0728Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9C0u); - cpu->pc = 0xBFC0D9C0u; return; - } -label_BFC0728C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0728Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0728Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0728Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0728C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0728Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07290u); -#endif - /* 0xBFC07290: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07290u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07294: 0FF03670 jal 0xBFC0D9C0 */ - cpu->gpr[31] = 0xBFC0729Cu; /* jal link before delay slot */ - psx_delay_BFC07294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07298: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07298u); -#endif - if (psx_delay_BFC07294) { - psx_delay_BFC07294 = 0; - cpu->gpr[31] = 0xBFC0729Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9C0u); - cpu->pc = 0xBFC0D9C0u; return; - } -label_BFC0729C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0729Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0729Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0729Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0729C: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC072A4u; /* jal link before delay slot */ - psx_delay_BFC0729C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC072A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC072A0u); -#endif - if (psx_delay_BFC0729C) { - psx_delay_BFC0729C = 0; - cpu->gpr[31] = 0xBFC072A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC072A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072A4u); -#endif - /* 0xBFC072A4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC072A8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC072A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC072AC: A0209D80 sb $zero, -25216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25216; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC072ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-25216)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209D80u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC072B0: 03E00008 jr $ra */ - psx_delay_BFC072B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC072B4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072B4u); -#endif - if (psx_delay_BFC072B0) { - psx_delay_BFC072B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC072B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC072B8u); - int psx_delay_BFC072C0 = 0; - int psx_delay_BFC072D0 = 0; - int psx_delay_BFC072E0 = 0; - int psx_delay_BFC072F0 = 0; - int psx_delay_BFC07300 = 0; - int psx_delay_BFC07310 = 0; - int psx_delay_BFC07318 = 0; - int psx_delay_BFC07328 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC072C8u: goto label_BFC072C8; - case 0xBFC072D8u: goto label_BFC072D8; - case 0xBFC072E8u: goto label_BFC072E8; - case 0xBFC072F8u: goto label_BFC072F8; - case 0xBFC07308u: goto label_BFC07308; - case 0xBFC07318u: goto label_BFC07318; - case 0xBFC07320u: goto label_BFC07320; - default: break; - } - } -label_BFC072B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC072B8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC072BC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072BCu); return; } g_debug_last_store_pc = 0xBFC072BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC072C0: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC072C8u; /* jal link before delay slot */ - psx_delay_BFC072C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC072C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC072C4u); -#endif - if (psx_delay_BFC072C0) { - psx_delay_BFC072C0 = 0; - cpu->gpr[31] = 0xBFC072C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC072C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC072C8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC072C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072CCu); -#endif - /* 0xBFC072CC: 8C84B9B8 lw $a0, -17992($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072CCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9B8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC072D0: 0FF03674 jal 0xBFC0D9D0 */ - cpu->gpr[31] = 0xBFC072D8u; /* jal link before delay slot */ - psx_delay_BFC072D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC072D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC072D4u); -#endif - if (psx_delay_BFC072D0) { - psx_delay_BFC072D0 = 0; - cpu->gpr[31] = 0xBFC072D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9D0u); - cpu->pc = 0xBFC0D9D0u; return; - } -label_BFC072D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC072D8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC072D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072DCu); -#endif - /* 0xBFC072DC: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC072E0: 0FF03674 jal 0xBFC0D9D0 */ - cpu->gpr[31] = 0xBFC072E8u; /* jal link before delay slot */ - psx_delay_BFC072E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC072E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC072E4u); -#endif - if (psx_delay_BFC072E0) { - psx_delay_BFC072E0 = 0; - cpu->gpr[31] = 0xBFC072E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9D0u); - cpu->pc = 0xBFC0D9D0u; return; - } -label_BFC072E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC072E8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC072E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072ECu); -#endif - /* 0xBFC072EC: 8C84B9C0 lw $a0, -17984($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072ECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC072F0: 0FF03674 jal 0xBFC0D9D0 */ - cpu->gpr[31] = 0xBFC072F8u; /* jal link before delay slot */ - psx_delay_BFC072F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC072F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC072F4u); -#endif - if (psx_delay_BFC072F0) { - psx_delay_BFC072F0 = 0; - cpu->gpr[31] = 0xBFC072F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9D0u); - cpu->pc = 0xBFC0D9D0u; return; - } -label_BFC072F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC072F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC072F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC072F8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC072F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC072FCu); -#endif - /* 0xBFC072FC: 8C84B9C4 lw $a0, -17980($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC072FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC072FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07300: 0FF03674 jal 0xBFC0D9D0 */ - cpu->gpr[31] = 0xBFC07308u; /* jal link before delay slot */ - psx_delay_BFC07300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07304u); -#endif - if (psx_delay_BFC07300) { - psx_delay_BFC07300 = 0; - cpu->gpr[31] = 0xBFC07308u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9D0u); - cpu->pc = 0xBFC0D9D0u; return; - } -label_BFC07308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07308: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0730Cu); -#endif - /* 0xBFC0730C: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0730Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0730Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07310: 0FF03674 jal 0xBFC0D9D0 */ - cpu->gpr[31] = 0xBFC07318u; /* jal link before delay slot */ - psx_delay_BFC07310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07314u); -#endif - if (psx_delay_BFC07310) { - psx_delay_BFC07310 = 0; - cpu->gpr[31] = 0xBFC07318u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9D0u); - cpu->pc = 0xBFC0D9D0u; return; - } -label_BFC07318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07318: 0FF03700 jal 0xBFC0DC00 */ - cpu->gpr[31] = 0xBFC07320u; /* jal link before delay slot */ - psx_delay_BFC07318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0731C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0731Cu); -#endif - if (psx_delay_BFC07318) { - psx_delay_BFC07318 = 0; - cpu->gpr[31] = 0xBFC07320u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC00u); - cpu->pc = 0xBFC0DC00u; return; - } -label_BFC07320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07320u); -#endif - /* 0xBFC07320: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07320u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07324: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07328: 03E00008 jr $ra */ - psx_delay_BFC07328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0732Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0732C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0732Cu); -#endif - if (psx_delay_BFC07328) { - psx_delay_BFC07328 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07330(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07330u); - int psx_delay_BFC07338 = 0; - int psx_delay_BFC07340 = 0; - int psx_delay_BFC07348 = 0; - int psx_taken_BFC07348 = 0; - int psx_delay_BFC07350 = 0; - int psx_delay_BFC07358 = 0; - int psx_taken_BFC07358 = 0; - int psx_delay_BFC07368 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07340u: goto label_BFC07340; - case 0xBFC07348u: goto label_BFC07348; - case 0xBFC07350u: goto label_BFC07350; - case 0xBFC07358u: goto label_BFC07358; - case 0xBFC07360u: goto label_BFC07360; - case 0xBFC07364u: goto label_BFC07364; - default: break; - } - } -label_BFC07330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07330: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07334: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07334u); return; } g_debug_last_store_pc = 0xBFC07334u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07338: 0FF01C68 jal 0xBFC071A0 */ - cpu->gpr[31] = 0xBFC07340u; /* jal link before delay slot */ - psx_delay_BFC07338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0733Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0733C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0733Cu); -#endif - if (psx_delay_BFC07338) { - psx_delay_BFC07338 = 0; - cpu->gpr[31] = 0xBFC07340u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC071A0u); - cpu->pc = 0xBFC071A0u; return; - } -label_BFC07340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07340: 0FF03704 jal 0xBFC0DC10 */ - cpu->gpr[31] = 0xBFC07348u; /* jal link before delay slot */ - psx_delay_BFC07340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07344: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07344u); -#endif - if (psx_delay_BFC07340) { - psx_delay_BFC07340 = 0; - cpu->gpr[31] = 0xBFC07348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC10u); - cpu->pc = 0xBFC0DC10u; return; - } -label_BFC07348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07348: 14400006 bne $v0, $zero, 0xBFC07364 */ - uint32_t psx_brA_BFC07348 = cpu->gpr[2]; uint32_t psx_brB_BFC07348 = cpu->gpr[0]; - psx_taken_BFC07348 = (psx_brA_BFC07348 != psx_brB_BFC07348); - psx_delay_BFC07348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0734Cu); -#endif - /* 0xBFC0734C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0734Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0734Cu); -#endif - if (psx_delay_BFC07348) { - psx_delay_BFC07348 = 0; - if (psx_taken_BFC07348) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07364u); - goto label_BFC07364; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07350u); - } -label_BFC07350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07350: 0FF03704 jal 0xBFC0DC10 */ - cpu->gpr[31] = 0xBFC07358u; /* jal link before delay slot */ - psx_delay_BFC07350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07354u); -#endif - if (psx_delay_BFC07350) { - psx_delay_BFC07350 = 0; - cpu->gpr[31] = 0xBFC07358u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC10u); - cpu->pc = 0xBFC0DC10u; return; - } -label_BFC07358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07358: 1040FFFD beq $v0, $zero, 0xBFC07350 */ - uint32_t psx_brA_BFC07358 = cpu->gpr[2]; uint32_t psx_brB_BFC07358 = cpu->gpr[0]; - psx_taken_BFC07358 = (psx_brA_BFC07358 == psx_brB_BFC07358); - psx_delay_BFC07358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0735Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0735C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0735Cu); -#endif - if (psx_delay_BFC07358) { - psx_delay_BFC07358 = 0; - if (psx_taken_BFC07358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07350u); - goto label_BFC07350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07360u); - } -label_BFC07360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07360u); -#endif - /* 0xBFC07360: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07360u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07360u); -#endif -label_BFC07364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07364: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07368: 03E00008 jr $ra */ - psx_delay_BFC07368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0736Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0736C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0736Cu); -#endif - if (psx_delay_BFC07368) { - psx_delay_BFC07368 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07370(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07370u); - int psx_delay_BFC07378 = 0; - int psx_delay_BFC07388 = 0; - int psx_delay_BFC07398 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07380u: goto label_BFC07380; - case 0xBFC07390u: goto label_BFC07390; - default: break; - } - } -label_BFC07370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07370: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07374: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07374u); return; } g_debug_last_store_pc = 0xBFC07374u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07378: 0FF01CCC jal 0xBFC07330 */ - cpu->gpr[31] = 0xBFC07380u; /* jal link before delay slot */ - psx_delay_BFC07378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0737Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0737C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0737Cu); -#endif - if (psx_delay_BFC07378) { - psx_delay_BFC07378 = 0; - cpu->gpr[31] = 0xBFC07380u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07330u); - cpu->pc = 0xBFC07330u; return; - } -label_BFC07380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07380: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07384: 24849D70 addiu $a0, $a0, -25232 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25232)); - PGXP_ALU(0x24849D70u, cpu->gpr[4], _pgx1, 0xFFFF9D70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07388: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC07390u; /* jal link before delay slot */ - psx_delay_BFC07388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0738Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0738C: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0738Cu); -#endif - if (psx_delay_BFC07388) { - psx_delay_BFC07388 = 0; - cpu->gpr[31] = 0xBFC07390u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC07390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07390u); -#endif - /* 0xBFC07390: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07390u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07394: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07398: 03E00008 jr $ra */ - psx_delay_BFC07398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0739Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0739C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0739Cu); -#endif - if (psx_delay_BFC07398) { - psx_delay_BFC07398 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC073A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC073A0u); - int psx_delay_BFC073A8 = 0; - int psx_delay_BFC073C0 = 0; - int psx_taken_BFC073C0 = 0; - int psx_delay_BFC073F0 = 0; - int psx_taken_BFC073F0 = 0; - int psx_delay_BFC073F8 = 0; - int psx_delay_BFC07408 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC073B0u: goto label_BFC073B0; - case 0xBFC073C8u: goto label_BFC073C8; - case 0xBFC073CCu: goto label_BFC073CC; - case 0xBFC073F8u: goto label_BFC073F8; - case 0xBFC07400u: goto label_BFC07400; - default: break; - } - } -label_BFC073A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC073A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC073A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC073A0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC073A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073A4u); return; } g_debug_last_store_pc = 0xBFC073A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC073A8: 0FF01CCC jal 0xBFC07330 */ - cpu->gpr[31] = 0xBFC073B0u; /* jal link before delay slot */ - psx_delay_BFC073A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073ACu); -#endif - if (psx_delay_BFC073A8) { - psx_delay_BFC073A8 = 0; - cpu->gpr[31] = 0xBFC073B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07330u); - cpu->pc = 0xBFC07330u; return; - } -label_BFC073B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC073B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC073B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC073B0: AFA0001C sw $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073B0u); return; } g_debug_last_store_pc = 0xBFC073B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073B4u); -#endif - /* 0xBFC073B4: 8FAE001C lw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC073B8: 3402C350 ori $v0, $zero, 0xC350 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xC350u; - PGXP_ALU(0x3402C350u, cpu->gpr[2], _pgx1, 0xC350u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC073BC: 01C2082A slt $at, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01C2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC073C0: 1020000D beq $at, $zero, 0xBFC073F8 */ - uint32_t psx_brA_BFC073C0 = cpu->gpr[1]; uint32_t psx_brB_BFC073C0 = cpu->gpr[0]; - psx_taken_BFC073C0 = (psx_brA_BFC073C0 == psx_brB_BFC073C0); - psx_delay_BFC073C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073C4u); -#endif - if (psx_delay_BFC073C0) { - psx_delay_BFC073C0 = 0; - if (psx_taken_BFC073C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073F8u); - goto label_BFC073F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073C8u); - } -label_BFC073C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC073C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC073C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073C8u); -#endif - /* 0xBFC073C8: 8FAF001C lw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073C8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073C8u); -#endif -label_BFC073CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC073CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC073CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC073D0: AFAF001C sw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073D0u); return; } g_debug_last_store_pc = 0xBFC073D0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073D4u); -#endif - /* 0xBFC073D4: 8FB8001C lw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073D4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC073DC: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC073E0: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073E0u); return; } g_debug_last_store_pc = 0xBFC073E0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073E4u); -#endif - /* 0xBFC073E4: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073E4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC073EC: 0102082A slt $at, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0102082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC073F0: 1420FFF6 bne $at, $zero, 0xBFC073CC */ - uint32_t psx_brA_BFC073F0 = cpu->gpr[1]; uint32_t psx_brB_BFC073F0 = cpu->gpr[0]; - psx_taken_BFC073F0 = (psx_brA_BFC073F0 != psx_brB_BFC073F0); - psx_delay_BFC073F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073F4u); -#endif - /* 0xBFC073F4: 8FAF001C lw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073F4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC073F4u); -#endif - if (psx_delay_BFC073F0) { - psx_delay_BFC073F0 = 0; - if (psx_taken_BFC073F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073CCu); - goto label_BFC073CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC073F8u); - } -label_BFC073F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC073F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC073F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC073F8: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC07400u; /* jal link before delay slot */ - psx_delay_BFC073F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC073FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC073FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC073FCu); -#endif - if (psx_delay_BFC073F8) { - psx_delay_BFC073F8 = 0; - cpu->gpr[31] = 0xBFC07400u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC07400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07400u); -#endif - /* 0xBFC07400: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07400u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07404: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07408: 03E00008 jr $ra */ - psx_delay_BFC07408 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0740Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0740C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0740Cu); -#endif - if (psx_delay_BFC07408) { - psx_delay_BFC07408 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07410(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07410u); - int psx_delay_BFC07430 = 0; - int psx_delay_BFC0743C = 0; - int psx_taken_BFC0743C = 0; - int psx_delay_BFC07444 = 0; - int psx_taken_BFC07444 = 0; - int psx_delay_BFC0745C = 0; - int psx_delay_BFC07464 = 0; - int psx_taken_BFC07464 = 0; - int psx_delay_BFC0746C = 0; - int psx_taken_BFC0746C = 0; - int psx_delay_BFC074E8 = 0; - int psx_delay_BFC074F0 = 0; - int psx_taken_BFC074F0 = 0; - int psx_delay_BFC074F8 = 0; - int psx_taken_BFC074F8 = 0; - int psx_delay_BFC07538 = 0; - int psx_taken_BFC07538 = 0; - int psx_delay_BFC07568 = 0; - int psx_taken_BFC07568 = 0; - int psx_delay_BFC07578 = 0; - int psx_taken_BFC07578 = 0; - int psx_delay_BFC075D4 = 0; - int psx_delay_BFC075F0 = 0; - int psx_taken_BFC075F0 = 0; - int psx_delay_BFC075FC = 0; - int psx_taken_BFC075FC = 0; - int psx_delay_BFC07610 = 0; - int psx_taken_BFC07610 = 0; - int psx_delay_BFC07618 = 0; - int psx_taken_BFC07618 = 0; - int psx_delay_BFC0765C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07438u: goto label_BFC07438; - case 0xBFC07444u: goto label_BFC07444; - case 0xBFC0744Cu: goto label_BFC0744C; - case 0xBFC07464u: goto label_BFC07464; - case 0xBFC0746Cu: goto label_BFC0746C; - case 0xBFC07474u: goto label_BFC07474; - case 0xBFC074F0u: goto label_BFC074F0; - case 0xBFC074F8u: goto label_BFC074F8; - case 0xBFC07500u: goto label_BFC07500; - case 0xBFC07518u: goto label_BFC07518; - case 0xBFC07540u: goto label_BFC07540; - case 0xBFC07560u: goto label_BFC07560; - case 0xBFC07570u: goto label_BFC07570; - case 0xBFC07580u: goto label_BFC07580; - case 0xBFC075DCu: goto label_BFC075DC; - case 0xBFC075F8u: goto label_BFC075F8; - case 0xBFC07604u: goto label_BFC07604; - case 0xBFC0760Cu: goto label_BFC0760C; - case 0xBFC07618u: goto label_BFC07618; - case 0xBFC07620u: goto label_BFC07620; - case 0xBFC07630u: goto label_BFC07630; - case 0xBFC07650u: goto label_BFC07650; - default: break; - } - } -label_BFC07410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07410: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC07414: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07414u); return; } g_debug_last_store_pc = 0xBFC07414u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07418: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0741Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0741C: 2631B070 addiu $s1, $s1, -20368 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-20368)); - PGXP_ALU(0x2631B070u, cpu->gpr[17], _pgx1, 0xFFFFB070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0741Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07420: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07420u); return; } g_debug_last_store_pc = 0xBFC07420u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC07424: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07424u); return; } g_debug_last_store_pc = 0xBFC07424u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC07428: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0742Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0742C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0742Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07430: 0FF01F07 jal 0xBFC07C1C */ - cpu->gpr[31] = 0xBFC07438u; /* jal link before delay slot */ - psx_delay_BFC07430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07434: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07434u); -#endif - if (psx_delay_BFC07430) { - psx_delay_BFC07430 = 0; - cpu->gpr[31] = 0xBFC07438u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C1Cu); - cpu->pc = 0xBFC07C1Cu; return; - } -label_BFC07438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC07438: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0743Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC0743C: 10500003 beq $v0, $s0, 0xBFC0744C */ - uint32_t psx_brA_BFC0743C = cpu->gpr[2]; uint32_t psx_brB_BFC0743C = cpu->gpr[16]; - psx_taken_BFC0743C = (psx_brA_BFC0743C == psx_brB_BFC0743C); - psx_delay_BFC0743C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07440: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07440u); -#endif - if (psx_delay_BFC0743C) { - psx_delay_BFC0743C = 0; - if (psx_taken_BFC0743C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0744Cu); - goto label_BFC0744C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07444u); - } -label_BFC07444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07444: 10000082 beq $zero, $zero, 0xBFC07650 */ - uint32_t psx_brA_BFC07444 = cpu->gpr[0]; uint32_t psx_brB_BFC07444 = cpu->gpr[0]; - psx_taken_BFC07444 = (psx_brA_BFC07444 == psx_brB_BFC07444); - psx_delay_BFC07444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07448: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07448u); -#endif - if (psx_delay_BFC07444) { - psx_delay_BFC07444 = 0; - if (psx_taken_BFC07444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07650u); - goto label_BFC07650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0744Cu); - } -label_BFC0744C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0744Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0744Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0744Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0744C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0744Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07450: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07454: 24A5E2E0 addiu $a1, $a1, -7456 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7456)); - PGXP_ALU(0x24A5E2E0u, cpu->gpr[5], _pgx1, 0xFFFFE2E0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07458: 2484B071 addiu $a0, $a0, -20367 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20367)); - PGXP_ALU(0x2484B071u, cpu->gpr[4], _pgx1, 0xFFFFB071u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0745Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0745C: 0FF00CC4 jal 0xBFC03310 */ - cpu->gpr[31] = 0xBFC07464u; /* jal link before delay slot */ - psx_delay_BFC0745C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC07460: 24060005 addiu $a2, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24060005u, cpu->gpr[6], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07460u); -#endif - if (psx_delay_BFC0745C) { - psx_delay_BFC0745C = 0; - cpu->gpr[31] = 0xBFC07464u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03310u); - cpu->pc = 0xBFC03310u; return; - } -label_BFC07464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07464: 10400003 beq $v0, $zero, 0xBFC07474 */ - uint32_t psx_brA_BFC07464 = cpu->gpr[2]; uint32_t psx_brB_BFC07464 = cpu->gpr[0]; - psx_taken_BFC07464 = (psx_brA_BFC07464 == psx_brB_BFC07464); - psx_delay_BFC07464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07468: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07468u); -#endif - if (psx_delay_BFC07464) { - psx_delay_BFC07464 = 0; - if (psx_taken_BFC07464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07474u); - goto label_BFC07474; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0746Cu); - } -label_BFC0746C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0746Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0746Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0746Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0746C: 10000078 beq $zero, $zero, 0xBFC07650 */ - uint32_t psx_brA_BFC0746C = cpu->gpr[0]; uint32_t psx_brB_BFC0746C = cpu->gpr[0]; - psx_taken_BFC0746C = (psx_brA_BFC0746C == psx_brB_BFC0746C); - psx_delay_BFC0746C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07470: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07470u); -#endif - if (psx_delay_BFC0746C) { - psx_delay_BFC0746C = 0; - if (psx_taken_BFC0746C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07650u); - goto label_BFC07650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07474u); - } -label_BFC07474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07474: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07478u); -#endif - /* 0xBFC07478: 9042B111 lbu $v0, -20207($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -20207; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-20207)), 2, 0x4u); - PGXP_LOAD(0x9042B111u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0747Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0747C: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0747Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07480u); -#endif - /* 0xBFC07480: 91EFB110 lbu $t7, -20208($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -20208; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-20208)), 15, 0x8000u); - PGXP_LOAD(0x91EFB110u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07484: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC07488: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0748Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0748C: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0748Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07490u); -#endif - /* 0xBFC07490: 8DCEB0F4 lw $t6, -20236($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -20236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-20236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07490u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEB0F4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07494u); -#endif - /* 0xBFC07494: 9318B10F lbu $t8, -20209($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -20209; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-20209)), 24, 0x1000000u); - PGXP_LOAD(0x9318B10Fu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC07498: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0749C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC074A0: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC074A4: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC074A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074A8u); -#endif - /* 0xBFC074A8: 9339B10E lbu $t9, -20210($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -20210; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-20210)), 25, 0x2000000u); - PGXP_LOAD(0x9339B10Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC074AC: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC074ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC074B0: AC2E9D70 sw $t6, -25232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074B0u); return; } g_debug_last_store_pc = 0xBFC074B0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9D70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC074B4: 00581021 addu $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x00581021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074B8u); -#endif - /* 0xBFC074B8: 8D08B0C0 lw $t0, -20288($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -20288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-20288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074B8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08B0C0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC074BC: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC074BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC074C0: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC074C4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC074C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074C8u); -#endif - /* 0xBFC074C8: 8C63B0FC lw $v1, -20228($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -20228; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20228)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63B0FCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC074CC: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC074D0: AC229D78 sw $v0, -25224($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25224; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25224)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074D0u); return; } g_debug_last_store_pc = 0xBFC074D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229D78u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC074D4: AC289D7C sw $t0, -25220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074D4u); return; } g_debug_last_store_pc = 0xBFC074D4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289D7Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC074D8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC074D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC074DC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC074E0: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC074E4: AC239D74 sw $v1, -25228($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25228; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25228)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC074E4u); return; } g_debug_last_store_pc = 0xBFC074E4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239D74u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC074E8: 0FF01F07 jal 0xBFC07C1C */ - cpu->gpr[31] = 0xBFC074F0u; /* jal link before delay slot */ - psx_delay_BFC074E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC074EC: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074ECu); -#endif - if (psx_delay_BFC074E8) { - psx_delay_BFC074E8 = 0; - cpu->gpr[31] = 0xBFC074F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C1Cu); - cpu->pc = 0xBFC07C1Cu; return; - } -label_BFC074F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC074F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC074F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC074F0: 10500003 beq $v0, $s0, 0xBFC07500 */ - uint32_t psx_brA_BFC074F0 = cpu->gpr[2]; uint32_t psx_brB_BFC074F0 = cpu->gpr[16]; - psx_taken_BFC074F0 = (psx_brA_BFC074F0 == psx_brB_BFC074F0); - psx_delay_BFC074F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC074F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC074F4u); -#endif - if (psx_delay_BFC074F0) { - psx_delay_BFC074F0 = 0; - if (psx_taken_BFC074F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07500u); - goto label_BFC07500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC074F8u); - } -label_BFC074F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC074F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC074F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC074F8: 10000055 beq $zero, $zero, 0xBFC07650 */ - uint32_t psx_brA_BFC074F8 = cpu->gpr[0]; uint32_t psx_brB_BFC074F8 = cpu->gpr[0]; - psx_taken_BFC074F8 = (psx_brA_BFC074F8 == psx_brB_BFC074F8); - psx_delay_BFC074F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC074FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC074FC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC074FCu); -#endif - if (psx_delay_BFC074F8) { - psx_delay_BFC074F8 = 0; - if (psx_taken_BFC074F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07650u); - goto label_BFC07650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07500u); - } -label_BFC07500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC07500: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07500u); return; } g_debug_last_store_pc = 0xBFC07500u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC07504: 3C14A001 lui $s4, 0xA001 */ - cpu->gpr[20] = 0xA0010000u; - PGXP_ALU(0x3C14A001u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC07508: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07508u); return; } g_debug_last_store_pc = 0xBFC07508u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0750C: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0750Cu); return; } g_debug_last_store_pc = 0xBFC0750Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC07510: 2694B870 addiu $s4, $s4, -18320 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-18320)); - PGXP_ALU(0x2694B870u, cpu->gpr[20], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC07514: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07514u); -#endif -label_BFC07518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC07518: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0751Cu); -#endif - /* 0xBFC0751C: 8D299D7C lw $t1, -25220($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0751Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299D7Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0751Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07520u); -#endif - /* 0xBFC07520: 8C4A0000 lw $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07520u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x8C4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07524: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC07528: 012A5826 xor $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10]; - PGXP_ALU(0x012A5826u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0752Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0752C: AC2B9D7C sw $t3, -25220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0752Cu); return; } g_debug_last_store_pc = 0xBFC0752Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9D7Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0752Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07530: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100006u); -#endif - /* 0xBFC07534: 0054082B sltu $at, $v0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[20] ? 1 : 0); - PGXP_ALU(0x0054082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07538: 1420FFF7 bne $at, $zero, 0xBFC07518 */ - uint32_t psx_brA_BFC07538 = cpu->gpr[1]; uint32_t psx_brB_BFC07538 = cpu->gpr[0]; - psx_taken_BFC07538 = (psx_brA_BFC07538 != psx_brB_BFC07538); - psx_delay_BFC07538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0753Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0753C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0753Cu); -#endif - if (psx_delay_BFC07538) { - psx_delay_BFC07538 = 0; - if (psx_taken_BFC07538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07518u); - goto label_BFC07518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07540u); - } -label_BFC07540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07540: 3C12A001 lui $s2, 0xA001 */ - cpu->gpr[18] = 0xA0010000u; - PGXP_ALU(0x3C12A001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC07544: AFB50024 sw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07544u); return; } g_debug_last_store_pc = 0xBFC07544u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC07548: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07548u); return; } g_debug_last_store_pc = 0xBFC07548u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0754Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC0754C: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0754Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07550: 265295B0 addiu $s2, $s2, -27216 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-27216)); - PGXP_ALU(0x265295B0u, cpu->gpr[18], _pgx1, 0xFFFF95B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC07554: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC07558: 2416002D addiu $s6, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2416002Du, cpu->gpr[22], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0755Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0755C: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0755Cu); -#endif -label_BFC07560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07560u); -#endif - /* 0xBFC07560: 920C0000 lbu $t4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 12, 0x10000u); - PGXP_LOAD(0x920C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07564: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC07568: 15800005 bne $t4, $zero, 0xBFC07580 */ - uint32_t psx_brA_BFC07568 = cpu->gpr[12]; uint32_t psx_brB_BFC07568 = cpu->gpr[0]; - psx_taken_BFC07568 = (psx_brA_BFC07568 != psx_brB_BFC07568); - psx_delay_BFC07568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0756Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0756C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0756Cu); -#endif - if (psx_delay_BFC07568) { - psx_delay_BFC07568 = 0; - if (psx_taken_BFC07568) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07580u); - goto label_BFC07580; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07570u); - } -label_BFC07570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07570u); -#endif - /* 0xBFC07570: 8FB50024 lw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07570u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07574u); -#endif - /* 0xBFC07574: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07574u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07578: 1000002D beq $zero, $zero, 0xBFC07630 */ - uint32_t psx_brA_BFC07578 = cpu->gpr[0]; uint32_t psx_brB_BFC07578 = cpu->gpr[0]; - psx_taken_BFC07578 = (psx_brA_BFC07578 == psx_brB_BFC07578); - psx_delay_BFC07578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0757Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200u); -#endif - /* 0xBFC0757C: 2669FFFF addiu $t1, $s3, -1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[19] + (-1)); - PGXP_ALU(0x2669FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0757Cu); -#endif - if (psx_delay_BFC07578) { - psx_delay_BFC07578 = 0; - if (psx_taken_BFC07578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07630u); - goto label_BFC07630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07580u); - } -label_BFC07580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07580u); -#endif - /* 0xBFC07580: 92020005 lbu $v0, 5($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (5)), 2, 0x10000u); - PGXP_LOAD(0x92020005u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07584u); -#endif - /* 0xBFC07584: 920D0004 lbu $t5, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (4)), 13, 0x10000u); - PGXP_LOAD(0x920D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07588: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0758Cu); -#endif - /* 0xBFC0758C: 920E0003 lbu $t6, 3($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 3; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (3)), 14, 0x10000u); - PGXP_LOAD(0x920E0003u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0758Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC07590: 004D1021 addu $v0, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[13]; - PGXP_ALU(0x004D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07594: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07598u); -#endif - /* 0xBFC07598: 920F0002 lbu $t7, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (2)), 15, 0x10000u); - PGXP_LOAD(0x920F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0759C: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC075A0: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC075A4: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC075A8: AE420008 sw $v0, 8($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC075A8u); return; } g_debug_last_store_pc = 0xBFC075A8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE420008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075ACu); -#endif - /* 0xBFC075AC: 92030006 lbu $v1, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (6)), 3, 0x10000u); - PGXP_LOAD(0x92030006u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075B0u); -#endif - /* 0xBFC075B0: 92180007 lbu $t8, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 24, 0x10000u); - PGXP_LOAD(0x92180007u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC075B4: AE530000 sw $s3, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC075B4u); return; } g_debug_last_store_pc = 0xBFC075B4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAE530000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC075B8: 00781821 addu $v1, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00781821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC075BC: 3063FFFF andi $v1, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008u); -#endif - /* 0xBFC075C0: AE430004 sw $v1, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC075C0u); return; } g_debug_last_store_pc = 0xBFC075C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075C4u); -#endif - /* 0xBFC075C4: 92110000 lbu $s1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 17, 0x10000u); - PGXP_LOAD(0x92110000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC075C8: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC075CC: 2644000C addiu $a0, $s2, 12 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[18] + (12)); - PGXP_ALU(0x2644000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC075D0: 26050008 addiu $a1, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (8)); - PGXP_ALU(0x26050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC075D4: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC075DCu; /* jal link before delay slot */ - psx_delay_BFC075D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC075D8: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075D8u); -#endif - if (psx_delay_BFC075D4) { - psx_delay_BFC075D4 = 0; - cpu->gpr[31] = 0xBFC075DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC075DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC075DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC075DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2060000u); -#endif - /* 0xBFC075DC: 0251C821 addu $t9, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[18] + cpu->gpr[17]; - PGXP_ALU(0x0251C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC075E0: A320000C sb $zero, 12($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC075E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (12)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA320000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075E4u); -#endif - /* 0xBFC075E4: 92020000 lbu $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 2, 0x10000u); - PGXP_LOAD(0x92020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC075E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC075E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC075EC: 30480001 andi $t0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC075F0: 16A80004 bne $s5, $t0, 0xBFC07604 */ - uint32_t psx_brA_BFC075F0 = cpu->gpr[21]; uint32_t psx_brB_BFC075F0 = cpu->gpr[8]; - psx_taken_BFC075F0 = (psx_brA_BFC075F0 != psx_brB_BFC075F0); - psx_delay_BFC075F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC075F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC075F4u); -#endif - if (psx_delay_BFC075F0) { - psx_delay_BFC075F0 = 0; - if (psx_taken_BFC075F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07604u); - goto label_BFC07604; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC075F8u); - } -label_BFC075F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC075F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC075F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC075F8: 02028021 addu $s0, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[2]; - PGXP_ALU(0x02028021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC075F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC075FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC075FC: 10000003 beq $zero, $zero, 0xBFC0760C */ - uint32_t psx_brA_BFC075FC = cpu->gpr[0]; uint32_t psx_brB_BFC075FC = cpu->gpr[0]; - psx_taken_BFC075FC = (psx_brA_BFC075FC == psx_brB_BFC075FC); - psx_delay_BFC075FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07600: 26100009 addiu $s0, $s0, 9 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (9)); - PGXP_ALU(0x26100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07600u); -#endif - if (psx_delay_BFC075FC) { - psx_delay_BFC075FC = 0; - if (psx_taken_BFC075FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0760Cu); - goto label_BFC0760C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07604u); - } -label_BFC07604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC07604: 02028021 addu $s0, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[2]; - PGXP_ALU(0x02028021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07608: 26100008 addiu $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (8)); - PGXP_ALU(0x26100008u, cpu->gpr[16], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07608u); -#endif -label_BFC0760C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0760Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110002u); -#endif - /* 0xBFC0760C: 0214082B sltu $at, $s0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0); - PGXP_ALU(0x0214082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07610: 10200003 beq $at, $zero, 0xBFC07620 */ - uint32_t psx_brA_BFC07610 = cpu->gpr[1]; uint32_t psx_brB_BFC07610 = cpu->gpr[0]; - psx_taken_BFC07610 = (psx_brA_BFC07610 == psx_brB_BFC07610); - psx_delay_BFC07610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07614: 2652002C addiu $s2, $s2, 44 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (44)); - PGXP_ALU(0x2652002Cu, cpu->gpr[18], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07614u); -#endif - if (psx_delay_BFC07610) { - psx_delay_BFC07610 = 0; - if (psx_taken_BFC07610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07620u); - goto label_BFC07620; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07618u); - } -label_BFC07618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC07618: 1676FFD1 bne $s3, $s6, 0xBFC07560 */ - uint32_t psx_brA_BFC07618 = cpu->gpr[19]; uint32_t psx_brB_BFC07618 = cpu->gpr[22]; - psx_taken_BFC07618 = (psx_brA_BFC07618 != psx_brB_BFC07618); - psx_delay_BFC07618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0761Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0761C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0761Cu); -#endif - if (psx_delay_BFC07618) { - psx_delay_BFC07618 = 0; - if (psx_taken_BFC07618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07560u); - goto label_BFC07560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07620u); - } -label_BFC07620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07620u); -#endif - /* 0xBFC07620: 8FB50024 lw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07620u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07624u); -#endif - /* 0xBFC07624: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07624u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0762Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200u); -#endif - /* 0xBFC0762C: 2669FFFF addiu $t1, $s3, -1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[19] + (-1)); - PGXP_ALU(0x2669FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0762Cu); -#endif -label_BFC07630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07630: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC07634: AC299E00 sw $t1, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07634u); return; } g_debug_last_store_pc = 0xBFC07634u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E00u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07638: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0763Cu); -#endif - /* 0xBFC0763C: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0763Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0763Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07640u); -#endif - /* 0xBFC07640: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07640u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07644u); -#endif - /* 0xBFC07644: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07644u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07648: AC209E08 sw $zero, -25080($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25080; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07648u); return; } g_debug_last_store_pc = 0xBFC07648u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E08u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0764Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0764C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0764Cu); -#endif -label_BFC07650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07650u); -#endif - /* 0xBFC07650: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07650u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07654u); -#endif - /* 0xBFC07654: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07654u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07658u); -#endif - /* 0xBFC07658: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07658u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0765Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0765C: 03E00008 jr $ra */ - psx_delay_BFC0765C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07660: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07660u); -#endif - if (psx_delay_BFC0765C) { - psx_delay_BFC0765C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07664(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07664u); - int psx_delay_BFC07694 = 0; - int psx_taken_BFC07694 = 0; - int psx_delay_BFC076A4 = 0; - int psx_taken_BFC076A4 = 0; - int psx_delay_BFC076B0 = 0; - int psx_delay_BFC076B8 = 0; - int psx_taken_BFC076B8 = 0; - int psx_delay_BFC076C0 = 0; - int psx_taken_BFC076C0 = 0; - int psx_delay_BFC076D8 = 0; - int psx_taken_BFC076D8 = 0; - int psx_delay_BFC076F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0769Cu: goto label_BFC0769C; - case 0xBFC076ACu: goto label_BFC076AC; - case 0xBFC076B8u: goto label_BFC076B8; - case 0xBFC076C0u: goto label_BFC076C0; - case 0xBFC076C8u: goto label_BFC076C8; - case 0xBFC076E0u: goto label_BFC076E0; - case 0xBFC076E4u: goto label_BFC076E4; - default: break; - } - } -label_BFC07664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07664: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07668: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0766Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0766C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0766Cu); return; } g_debug_last_store_pc = 0xBFC0766Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0766Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07670u); -#endif - /* 0xBFC07670: 8DCE9E00 lw $t6, -25088($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07670u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E00u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC07674: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07674u); return; } g_debug_last_store_pc = 0xBFC07674u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC07678: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07678u); return; } g_debug_last_store_pc = 0xBFC07678u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0767Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0767C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0767Cu); return; } g_debug_last_store_pc = 0xBFC0767Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0767Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07680: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC07684: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC07688: 00A09821 addu $s3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0768Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0768C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0768Cu); return; } g_debug_last_store_pc = 0xBFC0768Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0768Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07690: 261095B0 addiu $s0, $s0, -27216 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-27216)); - PGXP_ALU(0x261095B0u, cpu->gpr[16], _pgx1, 0xFFFF95B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07694: 19C00012 blez $t6, 0xBFC076E0 */ - uint32_t psx_brA_BFC07694 = cpu->gpr[14]; - psx_taken_BFC07694 = ((int32_t)psx_brA_BFC07694 <= 0); - psx_delay_BFC07694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC07698: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07698u); -#endif - if (psx_delay_BFC07694) { - psx_delay_BFC07694 = 0; - if (psx_taken_BFC07694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076E0u); - goto label_BFC076E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0769Cu); - } -label_BFC0769C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0769Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0769Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0769Cu); -#endif - /* 0xBFC0769C: 8E0F0004 lw $t7, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0769Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0769Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC076A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC076A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC076A4: 164F0008 bne $s2, $t7, 0xBFC076C8 */ - uint32_t psx_brA_BFC076A4 = cpu->gpr[18]; uint32_t psx_brB_BFC076A4 = cpu->gpr[15]; - psx_taken_BFC076A4 = (psx_brA_BFC076A4 != psx_brB_BFC076A4); - psx_delay_BFC076A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC076A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC076A8u); -#endif - if (psx_delay_BFC076A4) { - psx_delay_BFC076A4 = 0; - if (psx_taken_BFC076A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076C8u); - goto label_BFC076C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076ACu); - } -label_BFC076AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC076AC: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC076B0: 0FF00CA2 jal 0xBFC03288 */ - cpu->gpr[31] = 0xBFC076B8u; /* jal link before delay slot */ - psx_delay_BFC076B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC076B4: 2605000C addiu $a1, $s0, 12 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (12)); - PGXP_ALU(0x2605000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076B4u); -#endif - if (psx_delay_BFC076B0) { - psx_delay_BFC076B0 = 0; - cpu->gpr[31] = 0xBFC076B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03288u); - cpu->pc = 0xBFC03288u; return; - } -label_BFC076B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC076B8: 14400003 bne $v0, $zero, 0xBFC076C8 */ - uint32_t psx_brA_BFC076B8 = cpu->gpr[2]; uint32_t psx_brB_BFC076B8 = cpu->gpr[0]; - psx_taken_BFC076B8 = (psx_brA_BFC076B8 != psx_brB_BFC076B8); - psx_delay_BFC076B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC076BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC076BCu); -#endif - if (psx_delay_BFC076B8) { - psx_delay_BFC076B8 = 0; - if (psx_taken_BFC076B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076C8u); - goto label_BFC076C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076C0u); - } -label_BFC076C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC076C0: 10000008 beq $zero, $zero, 0xBFC076E4 */ - uint32_t psx_brA_BFC076C0 = cpu->gpr[0]; uint32_t psx_brB_BFC076C0 = cpu->gpr[0]; - psx_taken_BFC076C0 = (psx_brA_BFC076C0 == psx_brB_BFC076C0); - psx_delay_BFC076C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC076C4: 26220001 addiu $v0, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26220001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076C4u); -#endif - if (psx_delay_BFC076C0) { - psx_delay_BFC076C0 = 0; - if (psx_taken_BFC076C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076E4u); - goto label_BFC076E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076C8u); - } -label_BFC076C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC076C8: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC076C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076CCu); -#endif - /* 0xBFC076CC: 8F189E00 lw $t8, -25088($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076CCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E00u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC076D0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020002u); -#endif - /* 0xBFC076D4: 0238082A slt $at, $s1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0238082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC076D8: 1420FFF0 bne $at, $zero, 0xBFC0769C */ - uint32_t psx_brA_BFC076D8 = cpu->gpr[1]; uint32_t psx_brB_BFC076D8 = cpu->gpr[0]; - psx_taken_BFC076D8 = (psx_brA_BFC076D8 != psx_brB_BFC076D8); - psx_delay_BFC076D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC076DC: 2610002C addiu $s0, $s0, 44 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (44)); - PGXP_ALU(0x2610002Cu, cpu->gpr[16], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076DCu); -#endif - if (psx_delay_BFC076D8) { - psx_delay_BFC076D8 = 0; - if (psx_taken_BFC076D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0769Cu); - goto label_BFC0769C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC076E0u); - } -label_BFC076E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC076E0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076E0u); -#endif -label_BFC076E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC076E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC076E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076E4u); -#endif - /* 0xBFC076E4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076E8u); -#endif - /* 0xBFC076E8: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076ECu); -#endif - /* 0xBFC076EC: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076ECu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076F0u); -#endif - /* 0xBFC076F0: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076F0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076F4u); -#endif - /* 0xBFC076F4: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076F4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC076F8: 03E00008 jr $ra */ - psx_delay_BFC076F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC076FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC076FC: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC076FCu); -#endif - if (psx_delay_BFC076F8) { - psx_delay_BFC076F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07700(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07700u); - int psx_delay_BFC07710 = 0; - int psx_taken_BFC07710 = 0; - int psx_delay_BFC07718 = 0; - int psx_taken_BFC07718 = 0; - int psx_delay_BFC07754 = 0; - int psx_delay_BFC07760 = 0; - int psx_taken_BFC07760 = 0; - int psx_delay_BFC0776C = 0; - int psx_taken_BFC0776C = 0; - int psx_delay_BFC077B0 = 0; - int psx_taken_BFC077B0 = 0; - int psx_delay_BFC077C0 = 0; - int psx_taken_BFC077C0 = 0; - int psx_delay_BFC0782C = 0; - int psx_delay_BFC0784C = 0; - int psx_taken_BFC0784C = 0; - int psx_delay_BFC07858 = 0; - int psx_taken_BFC07858 = 0; - int psx_delay_BFC0789C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07718u: goto label_BFC07718; - case 0xBFC07720u: goto label_BFC07720; - case 0xBFC0775Cu: goto label_BFC0775C; - case 0xBFC07768u: goto label_BFC07768; - case 0xBFC07774u: goto label_BFC07774; - case 0xBFC077A8u: goto label_BFC077A8; - case 0xBFC077B8u: goto label_BFC077B8; - case 0xBFC077C8u: goto label_BFC077C8; - case 0xBFC07834u: goto label_BFC07834; - case 0xBFC07854u: goto label_BFC07854; - case 0xBFC07860u: goto label_BFC07860; - case 0xBFC07870u: goto label_BFC07870; - case 0xBFC07894u: goto label_BFC07894; - default: break; - } - } -label_BFC07700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07700: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07704u); -#endif - /* 0xBFC07704: 8DCE9E08 lw $t6, -25080($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07704u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E08u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07708: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0770Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0770C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0770Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC07710: 146E0003 bne $v1, $t6, 0xBFC07720 */ - uint32_t psx_brA_BFC07710 = cpu->gpr[3]; uint32_t psx_brB_BFC07710 = cpu->gpr[14]; - psx_taken_BFC07710 = (psx_brA_BFC07710 != psx_brB_BFC07710); - psx_delay_BFC07710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07714: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07714u); return; } g_debug_last_store_pc = 0xBFC07714u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07714u); -#endif - if (psx_delay_BFC07710) { - psx_delay_BFC07710 = 0; - if (psx_taken_BFC07710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07720u); - goto label_BFC07720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07718u); - } -label_BFC07718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07718: 1000005E beq $zero, $zero, 0xBFC07894 */ - uint32_t psx_brA_BFC07718 = cpu->gpr[0]; uint32_t psx_brB_BFC07718 = cpu->gpr[0]; - psx_taken_BFC07718 = (psx_brA_BFC07718 == psx_brB_BFC07718); - psx_delay_BFC07718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0771Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0771C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0771Cu); -#endif - if (psx_delay_BFC07718) { - psx_delay_BFC07718 = 0; - if (psx_taken_BFC07718) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07894u); - goto label_BFC07894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07720u); - } -label_BFC07720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC07720: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC07724: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC07728: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0772Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0772C: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0772Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC07730: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07730u); return; } g_debug_last_store_pc = 0xBFC07730u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC07734: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07738: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0773Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0773C: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0773Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC07740: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07744: 2610B070 addiu $s0, $s0, -20368 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-20368)); - PGXP_ALU(0x2610B070u, cpu->gpr[16], _pgx1, 0xFFFFB070u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07748u); -#endif - /* 0xBFC07748: 8CA5958C lw $a1, -27252($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -27252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-27252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07748u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5958Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0774Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC0774C: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0774Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07750: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07754: 0FF01F07 jal 0xBFC07C1C */ - cpu->gpr[31] = 0xBFC0775Cu; /* jal link before delay slot */ - psx_delay_BFC07754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC07758: AFA30058 sw $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07758u); return; } g_debug_last_store_pc = 0xBFC07758u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07758u); -#endif - if (psx_delay_BFC07754) { - psx_delay_BFC07754 = 0; - cpu->gpr[31] = 0xBFC0775Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C1Cu); - cpu->pc = 0xBFC07C1Cu; return; - } -label_BFC0775C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0775Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0775C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC07760: 10410004 beq $v0, $at, 0xBFC07774 */ - uint32_t psx_brA_BFC07760 = cpu->gpr[2]; uint32_t psx_brB_BFC07760 = cpu->gpr[1]; - psx_taken_BFC07760 = (psx_brA_BFC07760 == psx_brB_BFC07760); - psx_delay_BFC07760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07764: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07764u); -#endif - if (psx_delay_BFC07760) { - psx_delay_BFC07760 = 0; - if (psx_taken_BFC07760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07774u); - goto label_BFC07774; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07768u); - } -label_BFC07768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07768u); -#endif - /* 0xBFC07768: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07768u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0776Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0776C: 10000049 beq $zero, $zero, 0xBFC07894 */ - uint32_t psx_brA_BFC0776C = cpu->gpr[0]; uint32_t psx_brB_BFC0776C = cpu->gpr[0]; - psx_taken_BFC0776C = (psx_brA_BFC0776C == psx_brB_BFC0776C); - psx_delay_BFC0776C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07770: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07770u); -#endif - if (psx_delay_BFC0776C) { - psx_delay_BFC0776C = 0; - if (psx_taken_BFC0776C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07894u); - goto label_BFC07894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07774u); - } -label_BFC07774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC07774: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07774u); return; } g_debug_last_store_pc = 0xBFC07774u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC07778: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07778u); return; } g_debug_last_store_pc = 0xBFC07778u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0777C: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0777Cu); return; } g_debug_last_store_pc = 0xBFC0777Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC07780: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07780u); return; } g_debug_last_store_pc = 0xBFC07780u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC07784: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07784u); return; } g_debug_last_store_pc = 0xBFC07784u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07788: 3C12A001 lui $s2, 0xA001 */ - cpu->gpr[18] = 0xA0010000u; - PGXP_ALU(0x3C12A001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0778Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC0778C: 3C14A001 lui $s4, 0xA001 */ - cpu->gpr[20] = 0xA0010000u; - PGXP_ALU(0x3C14A001u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0778Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC07790: 3C13A001 lui $s3, 0xA001 */ - cpu->gpr[19] = 0xA0010000u; - PGXP_ALU(0x3C13A001u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07794: 265291F0 addiu $s2, $s2, -28176 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-28176)); - PGXP_ALU(0x265291F0u, cpu->gpr[18], _pgx1, 0xFFFF91F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC07798: 02008821 addu $s1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0779C: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC077A0: 2673B870 addiu $s3, $s3, -18320 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-18320)); - PGXP_ALU(0x2673B870u, cpu->gpr[19], _pgx1, 0xFFFFB870u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC077A4: 269495B0 addiu $s4, $s4, -27216 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-27216)); - PGXP_ALU(0x269495B0u, cpu->gpr[20], _pgx1, 0xFFFF95B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077A4u); -#endif -label_BFC077A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC077A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC077A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077A8u); -#endif - /* 0xBFC077A8: 92380000 lbu $t8, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 24, 0x20000u); - PGXP_LOAD(0x92380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC077AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC077ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC077B0: 17000005 bne $t8, $zero, 0xBFC077C8 */ - uint32_t psx_brA_BFC077B0 = cpu->gpr[24]; uint32_t psx_brB_BFC077B0 = cpu->gpr[0]; - psx_taken_BFC077B0 = (psx_brA_BFC077B0 != psx_brB_BFC077B0); - psx_delay_BFC077B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC077B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC077B4u); -#endif - if (psx_delay_BFC077B0) { - psx_delay_BFC077B0 = 0; - if (psx_taken_BFC077B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC077C8u); - goto label_BFC077C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC077B8u); - } -label_BFC077B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC077B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC077B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077B8u); -#endif - /* 0xBFC077B8: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC077B8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077BCu); -#endif - /* 0xBFC077BC: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC077BCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC077C0: 1000002B beq $zero, $zero, 0xBFC07870 */ - uint32_t psx_brA_BFC077C0 = cpu->gpr[0]; uint32_t psx_brB_BFC077C0 = cpu->gpr[0]; - psx_taken_BFC077C0 = (psx_brA_BFC077C0 == psx_brB_BFC077C0); - psx_delay_BFC077C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077C4u); -#endif - /* 0xBFC077C4: 8FAF0058 lw $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC077C4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077C4u); -#endif - if (psx_delay_BFC077C0) { - psx_delay_BFC077C0 = 0; - if (psx_taken_BFC077C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07870u); - goto label_BFC07870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC077C8u); - } -label_BFC077C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC077C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC077C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077C8u); -#endif - /* 0xBFC077C8: 92220005 lbu $v0, 5($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 5; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (5)), 2, 0x20000u); - PGXP_LOAD(0x92220005u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077CCu); -#endif - /* 0xBFC077CC: 92390004 lbu $t9, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (4)), 25, 0x20000u); - PGXP_LOAD(0x92390004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC077D0: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077D4u); -#endif - /* 0xBFC077D4: 92280003 lbu $t0, 3($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 3; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (3)), 8, 0x20000u); - PGXP_LOAD(0x92280003u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC077D8: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC077DC: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077E0u); -#endif - /* 0xBFC077E0: 92290002 lbu $t1, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (2)), 9, 0x20000u); - PGXP_LOAD(0x92290002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC077E4: 00481021 addu $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00481021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC077E8: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC077EC: 00491021 addu $v0, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[9]; - PGXP_ALU(0x00491021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC077F0: AE420004 sw $v0, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC077F0u); return; } g_debug_last_store_pc = 0xBFC077F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE420004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077F4u); -#endif - /* 0xBFC077F4: 9230000D lbu $s0, 13($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 13; cpu->gpr[16] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (13)), 16, 0x20000u); - PGXP_LOAD(0x9230000Du, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077F8u); -#endif - /* 0xBFC077F8: 922A000C lbu $t2, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (12)), 10, 0x20000u); - PGXP_LOAD(0x922A000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC077FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC077FC: 00108200 sll $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 8u; - PGXP_ALU(0x00108200u, cpu->gpr[16], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC077FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07800u); -#endif - /* 0xBFC07800: 922B000B lbu $t3, 11($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 11; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (11)), 11, 0x20000u); - PGXP_LOAD(0x922B000Bu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC07804: 020A8021 addu $s0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07808: 00108200 sll $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 8u; - PGXP_ALU(0x00108200u, cpu->gpr[16], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0780Cu); -#endif - /* 0xBFC0780C: 922C000A lbu $t4, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (10)), 12, 0x20000u); - PGXP_LOAD(0x922C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0780Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC07810: 020B8021 addu $s0, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[11]; - PGXP_ALU(0x020B8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07814: 00108200 sll $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 8u; - PGXP_ALU(0x00108200u, cpu->gpr[16], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC07818: 020C8021 addu $s0, $s0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[12]; - PGXP_ALU(0x020C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0781Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC0781C: AE500008 sw $s0, 8($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0781Cu); return; } g_debug_last_store_pc = 0xBFC0781Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAE500008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0781Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07820u); -#endif - /* 0xBFC07820: 92300020 lbu $s0, 32($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 32; cpu->gpr[16] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (32)), 16, 0x20000u); - PGXP_LOAD(0x92300020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC07824: 2644000C addiu $a0, $s2, 12 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[18] + (12)); - PGXP_ALU(0x2644000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC07828: 26250021 addiu $a1, $s1, 33 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[17] + (33)); - PGXP_ALU(0x26250021u, cpu->gpr[5], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0782Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0782C: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC07834u; /* jal link before delay slot */ - psx_delay_BFC0782C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC07830: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07830u); -#endif - if (psx_delay_BFC0782C) { - psx_delay_BFC0782C = 0; - cpu->gpr[31] = 0xBFC07834u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC07834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x52000u); -#endif - /* 0xBFC07834: 02506821 addu $t5, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[18] + cpu->gpr[16]; - PGXP_ALU(0x02506821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC07838: A1A0000C sb $zero, 12($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07838u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (12)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1A0000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0783Cu); -#endif - /* 0xBFC0783C: 922E0000 lbu $t6, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 14, 0x20000u); - PGXP_LOAD(0x922E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0783Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC07840: 26520018 addiu $s2, $s2, 24 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (24)); - PGXP_ALU(0x26520018u, cpu->gpr[18], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC07844: 022E8821 addu $s1, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0002u); -#endif - /* 0xBFC07848: 0233082B sltu $at, $s1, $s3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0233082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0784Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0784C: 10200004 beq $at, $zero, 0xBFC07860 */ - uint32_t psx_brA_BFC0784C = cpu->gpr[1]; uint32_t psx_brB_BFC0784C = cpu->gpr[0]; - psx_taken_BFC0784C = (psx_brA_BFC0784C == psx_brB_BFC0784C); - psx_delay_BFC0784C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC07850: 26B50001 addiu $s5, $s5, 1 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (1)); - PGXP_ALU(0x26B50001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07850u); -#endif - if (psx_delay_BFC0784C) { - psx_delay_BFC0784C = 0; - if (psx_taken_BFC0784C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07860u); - goto label_BFC07860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07854u); - } -label_BFC07854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140002u); -#endif - /* 0xBFC07854: 0254082B sltu $at, $s2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[20] ? 1 : 0); - PGXP_ALU(0x0254082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07858: 1420FFD3 bne $at, $zero, 0xBFC077A8 */ - uint32_t psx_brA_BFC07858 = cpu->gpr[1]; uint32_t psx_brB_BFC07858 = cpu->gpr[0]; - psx_taken_BFC07858 = (psx_brA_BFC07858 != psx_brB_BFC07858); - psx_delay_BFC07858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0785Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0785C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0785Cu); -#endif - if (psx_delay_BFC07858) { - psx_delay_BFC07858 = 0; - if (psx_taken_BFC07858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC077A8u); - goto label_BFC077A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07860u); - } -label_BFC07860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07860u); -#endif - /* 0xBFC07860: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07860u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07864u); -#endif - /* 0xBFC07864: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07864u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0786Cu); -#endif - /* 0xBFC0786C: 8FAF0058 lw $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0786Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0786Cu); -#endif -label_BFC07870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07870: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC07874: AC2F9E08 sw $t7, -25080($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25080; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07874u); return; } g_debug_last_store_pc = 0xBFC07874u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E08u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07878: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0787Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200002u); -#endif - /* 0xBFC0787C: AC359E04 sw $s5, -25084($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25084; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0787Cu); return; } g_debug_last_store_pc = 0xBFC0787Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAC359E04u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0787Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07880u); -#endif - /* 0xBFC07880: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07880u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07884u); -#endif - /* 0xBFC07884: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07884u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07888u); -#endif - /* 0xBFC07888: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07888u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0788Cu); -#endif - /* 0xBFC0788C: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0788Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0788Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07890: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07890u); -#endif -label_BFC07894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07894u); -#endif - /* 0xBFC07894: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07894u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07898: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0789Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0789C: 03E00008 jr $ra */ - psx_delay_BFC0789C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC078A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC078A0u); -#endif - if (psx_delay_BFC0789C) { - psx_delay_BFC0789C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC078A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC078A4u); - int psx_delay_BFC078C0 = 0; - int psx_delay_BFC078CC = 0; - int psx_taken_BFC078CC = 0; - int psx_delay_BFC078D4 = 0; - int psx_delay_BFC078DC = 0; - int psx_taken_BFC078DC = 0; - int psx_delay_BFC078EC = 0; - int psx_taken_BFC078EC = 0; - int psx_delay_BFC07900 = 0; - int psx_delay_BFC07908 = 0; - int psx_taken_BFC07908 = 0; - int psx_delay_BFC07918 = 0; - int psx_delay_BFC07920 = 0; - int psx_taken_BFC07920 = 0; - int psx_delay_BFC07930 = 0; - int psx_taken_BFC07930 = 0; - int psx_delay_BFC07940 = 0; - int psx_taken_BFC07940 = 0; - int psx_delay_BFC07950 = 0; - int psx_taken_BFC07950 = 0; - int psx_delay_BFC07960 = 0; - int psx_taken_BFC07960 = 0; - int psx_delay_BFC07970 = 0; - int psx_delay_BFC0797C = 0; - int psx_delay_BFC07988 = 0; - int psx_taken_BFC07988 = 0; - int psx_delay_BFC07998 = 0; - int psx_taken_BFC07998 = 0; - int psx_delay_BFC079F0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC078C8u: goto label_BFC078C8; - case 0xBFC078D4u: goto label_BFC078D4; - case 0xBFC078DCu: goto label_BFC078DC; - case 0xBFC078E4u: goto label_BFC078E4; - case 0xBFC078F4u: goto label_BFC078F4; - case 0xBFC078F8u: goto label_BFC078F8; - case 0xBFC07908u: goto label_BFC07908; - case 0xBFC07910u: goto label_BFC07910; - case 0xBFC07920u: goto label_BFC07920; - case 0xBFC07928u: goto label_BFC07928; - case 0xBFC07938u: goto label_BFC07938; - case 0xBFC07940u: goto label_BFC07940; - case 0xBFC07948u: goto label_BFC07948; - case 0xBFC07958u: goto label_BFC07958; - case 0xBFC07968u: goto label_BFC07968; - case 0xBFC07978u: goto label_BFC07978; - case 0xBFC0797Cu: goto label_BFC0797C; - case 0xBFC07984u: goto label_BFC07984; - case 0xBFC07990u: goto label_BFC07990; - case 0xBFC079A0u: goto label_BFC079A0; - case 0xBFC079E0u: goto label_BFC079E0; - default: break; - } - } -label_BFC078A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC078A4: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC078A8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078A8u); return; } g_debug_last_store_pc = 0xBFC078A8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC078AC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078ACu); return; } g_debug_last_store_pc = 0xBFC078ACu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC078B0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078B0u); return; } g_debug_last_store_pc = 0xBFC078B0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC078B4: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078B4u); return; } g_debug_last_store_pc = 0xBFC078B4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC078B8: AFA5005C sw $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078B8u); return; } g_debug_last_store_pc = 0xBFC078B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC078BC: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC078C0: 0FF01FCA jal 0xBFC07F28 */ - cpu->gpr[31] = 0xBFC078C8u; /* jal link before delay slot */ - psx_delay_BFC078C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC078C4: AFA60060 sw $a2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078C4u); return; } g_debug_last_store_pc = 0xBFC078C4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60060u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078C4u); -#endif - if (psx_delay_BFC078C0) { - psx_delay_BFC078C0 = 0; - cpu->gpr[31] = 0xBFC078C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F28u); - cpu->pc = 0xBFC07F28u; return; - } -label_BFC078C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC078C8: 304E0010 andi $t6, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC078CC: 11C0000A beq $t6, $zero, 0xBFC078F8 */ - uint32_t psx_brA_BFC078CC = cpu->gpr[14]; uint32_t psx_brB_BFC078CC = cpu->gpr[0]; - psx_taken_BFC078CC = (psx_brA_BFC078CC == psx_brB_BFC078CC); - psx_delay_BFC078CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078D0u); -#endif - /* 0xBFC078D0: 8FA2005C lw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078D0u); -#endif - if (psx_delay_BFC078CC) { - psx_delay_BFC078CC = 0; - if (psx_taken_BFC078CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC078F8u); - goto label_BFC078F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC078D4u); - } -label_BFC078D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC078D4: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC078DCu; /* jal link before delay slot */ - psx_delay_BFC078D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC078D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC078D8u); -#endif - if (psx_delay_BFC078D4) { - psx_delay_BFC078D4 = 0; - cpu->gpr[31] = 0xBFC078DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC078DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC078DC: 14400006 bne $v0, $zero, 0xBFC078F8 */ - uint32_t psx_brA_BFC078DC = cpu->gpr[2]; uint32_t psx_brB_BFC078DC = cpu->gpr[0]; - psx_taken_BFC078DC = (psx_brA_BFC078DC != psx_brB_BFC078DC); - psx_delay_BFC078DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078E0u); -#endif - /* 0xBFC078E0: 8FA2005C lw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078E0u); -#endif - if (psx_delay_BFC078DC) { - psx_delay_BFC078DC = 0; - if (psx_taken_BFC078DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC078F8u); - goto label_BFC078F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC078E4u); - } -label_BFC078E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC078E4: 240F0010 addiu $t7, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC078E8: AE4F0018 sw $t7, 24($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078E8u); return; } g_debug_last_store_pc = 0xBFC078E8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE4F0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC078EC: 1000003C beq $zero, $zero, 0xBFC079E0 */ - uint32_t psx_brA_BFC078EC = cpu->gpr[0]; uint32_t psx_brB_BFC078EC = cpu->gpr[0]; - psx_taken_BFC078EC = (psx_brA_BFC078EC == psx_brB_BFC078EC); - psx_delay_BFC078EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC078F0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078F0u); -#endif - if (psx_delay_BFC078EC) { - psx_delay_BFC078EC = 0; - if (psx_taken_BFC078EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC079E0u); - goto label_BFC079E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC078F4u); - } -label_BFC078F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078F4u); -#endif - /* 0xBFC078F4: 8FA2005C lw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078F4u); -#endif -label_BFC078F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC078F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC078F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC078F8: 27B00038 addiu $s0, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27B00038u, cpu->gpr[16], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC078FCu); -#endif - /* 0xBFC078FC: 80440000 lb $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); - PGXP_LOAD(0x80440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC078FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07900: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC07908u; /* jal link before delay slot */ - psx_delay_BFC07900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC07904: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07904u); -#endif - if (psx_delay_BFC07900) { - psx_delay_BFC07900 = 0; - cpu->gpr[31] = 0xBFC07908u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC07908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07908: 10400007 beq $v0, $zero, 0xBFC07928 */ - uint32_t psx_brA_BFC07908 = cpu->gpr[2]; uint32_t psx_brB_BFC07908 = cpu->gpr[0]; - psx_taken_BFC07908 = (psx_brA_BFC07908 == psx_brB_BFC07908); - psx_delay_BFC07908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0790Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0790C: A3A20038 sb $v0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0790Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (56)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA3A20038u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0790Cu); -#endif - if (psx_delay_BFC07908) { - psx_delay_BFC07908 = 0; - if (psx_taken_BFC07908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07928u); - goto label_BFC07928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07910u); - } -label_BFC07910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07910u); -#endif - /* 0xBFC07910: 82240001 lb $a0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 4, 0x20000u); - PGXP_LOAD(0x82240001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07914: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07918: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC07920u; /* jal link before delay slot */ - psx_delay_BFC07918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0791Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0791C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0791Cu); -#endif - if (psx_delay_BFC07918) { - psx_delay_BFC07918 = 0; - cpu->gpr[31] = 0xBFC07920u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC07920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07920: 1440FFFB bne $v0, $zero, 0xBFC07910 */ - uint32_t psx_brA_BFC07920 = cpu->gpr[2]; uint32_t psx_brB_BFC07920 = cpu->gpr[0]; - psx_taken_BFC07920 = (psx_brA_BFC07920 != psx_brB_BFC07920); - psx_delay_BFC07920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC07924: A2020000 sb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07924u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07924u); -#endif - if (psx_delay_BFC07920) { - psx_delay_BFC07920 = 0; - if (psx_taken_BFC07920) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07910u); - goto label_BFC07910; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07928u); - } -label_BFC07928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07928u); -#endif - /* 0xBFC07928: 83B90038 lb $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (56)), 25, 0x20000000u); - PGXP_LOAD(0x83B90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0792Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC0792C: 27B80038 addiu $t8, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27B80038u, cpu->gpr[24], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0792Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC07930: 13200009 beq $t9, $zero, 0xBFC07958 */ - uint32_t psx_brA_BFC07930 = cpu->gpr[25]; uint32_t psx_brB_BFC07930 = cpu->gpr[0]; - psx_taken_BFC07930 = (psx_brA_BFC07930 == psx_brB_BFC07930); - psx_delay_BFC07930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020001u); -#endif - /* 0xBFC07934: 03008821 addu $s1, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07934u); -#endif - if (psx_delay_BFC07930) { - psx_delay_BFC07930 = 0; - if (psx_taken_BFC07930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07958u); - goto label_BFC07958; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07938u); - } -label_BFC07938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07938u); -#endif - /* 0xBFC07938: 83020000 lb $v0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (0)), 2, 0x1000000u); - PGXP_LOAD(0x83020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0793Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0793C: 2403003B addiu $v1, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2403003Bu, cpu->gpr[3], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0793Cu); -#endif -label_BFC07940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC07940: 10620005 beq $v1, $v0, 0xBFC07958 */ - uint32_t psx_brA_BFC07940 = cpu->gpr[3]; uint32_t psx_brB_BFC07940 = cpu->gpr[2]; - psx_taken_BFC07940 = (psx_brA_BFC07940 == psx_brB_BFC07940); - psx_delay_BFC07940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07944: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07944u); -#endif - if (psx_delay_BFC07940) { - psx_delay_BFC07940 = 0; - if (psx_taken_BFC07940) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07958u); - goto label_BFC07958; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07948u); - } -label_BFC07948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07948u); -#endif - /* 0xBFC07948: 82220001 lb $v0, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 2, 0x20000u); - PGXP_LOAD(0x82220001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0794C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07950: 1440FFFB bne $v0, $zero, 0xBFC07940 */ - uint32_t psx_brA_BFC07950 = cpu->gpr[2]; uint32_t psx_brB_BFC07950 = cpu->gpr[0]; - psx_taken_BFC07950 = (psx_brA_BFC07950 != psx_brB_BFC07950); - psx_delay_BFC07950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07954u); -#endif - if (psx_delay_BFC07950) { - psx_delay_BFC07950 = 0; - if (psx_taken_BFC07950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07940u); - goto label_BFC07940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07958u); - } -label_BFC07958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07958u); -#endif - /* 0xBFC07958: 82280000 lb $t0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 8, 0x20000u); - PGXP_LOAD(0x82280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0795Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0795C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0795Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC07960: 15000006 bne $t0, $zero, 0xBFC0797C */ - uint32_t psx_brA_BFC07960 = cpu->gpr[8]; uint32_t psx_brB_BFC07960 = cpu->gpr[0]; - psx_taken_BFC07960 = (psx_brA_BFC07960 != psx_brB_BFC07960); - psx_delay_BFC07960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07964: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07964u); -#endif - if (psx_delay_BFC07960) { - psx_delay_BFC07960 = 0; - if (psx_taken_BFC07960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0797Cu); - goto label_BFC0797C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07968u); - } -label_BFC07968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC07968: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0796Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0796C: 24A5E2E8 addiu $a1, $a1, -7448 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7448)); - PGXP_ALU(0x24A5E2E8u, cpu->gpr[5], _pgx1, 0xFFFFE2E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0796Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07970: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC07978u; /* jal link before delay slot */ - psx_delay_BFC07970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07974: 27A40038 addiu $a0, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A40038u, cpu->gpr[4], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07974u); -#endif - if (psx_delay_BFC07970) { - psx_delay_BFC07970 = 0; - cpu->gpr[31] = 0xBFC07978u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC07978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07978: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07978u); -#endif -label_BFC0797C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0797Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0797Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0797Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0797C: 0FF020F3 jal 0xBFC083CC */ - cpu->gpr[31] = 0xBFC07984u; /* jal link before delay slot */ - psx_delay_BFC0797C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC07980: 27A50038 addiu $a1, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A50038u, cpu->gpr[5], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07980u); -#endif - if (psx_delay_BFC0797C) { - psx_delay_BFC0797C = 0; - cpu->gpr[31] = 0xBFC07984u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC083CCu); - cpu->pc = 0xBFC083CCu; return; - } -label_BFC07984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07984: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC07988: 14410005 bne $v0, $at, 0xBFC079A0 */ - uint32_t psx_brA_BFC07988 = cpu->gpr[2]; uint32_t psx_brB_BFC07988 = cpu->gpr[1]; - psx_taken_BFC07988 = (psx_brA_BFC07988 != psx_brB_BFC07988); - psx_delay_BFC07988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0798Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0798C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0798Cu); -#endif - if (psx_delay_BFC07988) { - psx_delay_BFC07988 = 0; - if (psx_taken_BFC07988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC079A0u); - goto label_BFC079A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07990u); - } -label_BFC07990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC07990: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC07994: AE490018 sw $t1, 24($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07994u); return; } g_debug_last_store_pc = 0xBFC07994u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAE490018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07998: 10000011 beq $zero, $zero, 0xBFC079E0 */ - uint32_t psx_brA_BFC07998 = cpu->gpr[0]; uint32_t psx_brB_BFC07998 = cpu->gpr[0]; - psx_taken_BFC07998 = (psx_brA_BFC07998 == psx_brB_BFC07998); - psx_delay_BFC07998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0799Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0799C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0799Cu); -#endif - if (psx_delay_BFC07998) { - psx_delay_BFC07998 = 0; - if (psx_taken_BFC07998) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC079E0u); - goto label_BFC079E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC079A0u); - } -label_BFC079A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC079A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC079A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC079A0: 00045080 sll $t2, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00045080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC079A4: 01445023 subu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[4]; - PGXP_ALU(0x01445023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC079A8: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC079A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC079AC: 256B91F0 addiu $t3, $t3, -28176 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-28176)); - PGXP_ALU(0x256B91F0u, cpu->gpr[11], _pgx1, 0xFFFF91F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC079B0: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC08u); -#endif - /* 0xBFC079B4: 014B1821 addu $v1, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079B8u); -#endif - /* 0xBFC079B8: 8C6C0004 lw $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079B8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC079BC: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC079BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC079C0: AE4C0024 sw $t4, 36($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079C0u); return; } g_debug_last_store_pc = 0xBFC079C0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE4C0024u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079C4u); -#endif - /* 0xBFC079C4: 8C6D0008 lw $t5, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079C4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC079C8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC079CC: AE4D0020 sw $t5, 32($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079CCu); return; } g_debug_last_store_pc = 0xBFC079CCu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE4D0020u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079D0u); -#endif - /* 0xBFC079D0: 8DCE9D7C lw $t6, -25220($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D7Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC079D4: AE400010 sw $zero, 16($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079D4u); return; } g_debug_last_store_pc = 0xBFC079D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC079D8: AE400018 sw $zero, 24($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079D8u); return; } g_debug_last_store_pc = 0xBFC079D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE400018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC079DC: AE4E0004 sw $t6, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079DCu); return; } g_debug_last_store_pc = 0xBFC079DCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079DCu); -#endif -label_BFC079E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC079E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC079E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079E0u); -#endif - /* 0xBFC079E0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079E4u); -#endif - /* 0xBFC079E4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079E4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079E8u); -#endif - /* 0xBFC079E8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079E8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079ECu); -#endif - /* 0xBFC079EC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079ECu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC079F0: 03E00008 jr $ra */ - psx_delay_BFC079F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC079F4: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079F4u); -#endif - if (psx_delay_BFC079F0) { - psx_delay_BFC079F0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC079F8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC079F8u); - int psx_delay_BFC079FC = 0; -label_BFC079F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC079F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC079F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC079F8: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC079F8u); return; } g_debug_last_store_pc = 0xBFC079F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC079F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC079FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC079FC: 03E00008 jr $ra */ - psx_delay_BFC079FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07A00: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A00u); -#endif - if (psx_delay_BFC079FC) { - psx_delay_BFC079FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07A04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07A04u); - int psx_delay_BFC07A20 = 0; - int psx_taken_BFC07A20 = 0; - int psx_delay_BFC07A28 = 0; - int psx_taken_BFC07A28 = 0; - int psx_delay_BFC07A34 = 0; - int psx_taken_BFC07A34 = 0; - int psx_delay_BFC07A48 = 0; - int psx_taken_BFC07A48 = 0; - int psx_delay_BFC07A58 = 0; - int psx_taken_BFC07A58 = 0; - int psx_delay_BFC07A6C = 0; - int psx_taken_BFC07A6C = 0; - int psx_delay_BFC07A7C = 0; - int psx_taken_BFC07A7C = 0; - int psx_delay_BFC07A84 = 0; - int psx_delay_BFC07A94 = 0; - int psx_taken_BFC07A94 = 0; - int psx_delay_BFC07A9C = 0; - int psx_delay_BFC07AA8 = 0; - int psx_taken_BFC07AA8 = 0; - int psx_delay_BFC07AB8 = 0; - int psx_taken_BFC07AB8 = 0; - int psx_delay_BFC07AD0 = 0; - int psx_taken_BFC07AD0 = 0; - int psx_delay_BFC07AE0 = 0; - int psx_taken_BFC07AE0 = 0; - int psx_delay_BFC07AFC = 0; - int psx_taken_BFC07AFC = 0; - int psx_delay_BFC07B18 = 0; - int psx_delay_BFC07B28 = 0; - int psx_taken_BFC07B28 = 0; - int psx_delay_BFC07B38 = 0; - int psx_taken_BFC07B38 = 0; - int psx_delay_BFC07B54 = 0; - int psx_taken_BFC07B54 = 0; - int psx_delay_BFC07B5C = 0; - int psx_taken_BFC07B5C = 0; - int psx_delay_BFC07B80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07A28u: goto label_BFC07A28; - case 0xBFC07A30u: goto label_BFC07A30; - case 0xBFC07A34u: goto label_BFC07A34; - case 0xBFC07A3Cu: goto label_BFC07A3C; - case 0xBFC07A50u: goto label_BFC07A50; - case 0xBFC07A54u: goto label_BFC07A54; - case 0xBFC07A60u: goto label_BFC07A60; - case 0xBFC07A74u: goto label_BFC07A74; - case 0xBFC07A84u: goto label_BFC07A84; - case 0xBFC07A8Cu: goto label_BFC07A8C; - case 0xBFC07A9Cu: goto label_BFC07A9C; - case 0xBFC07AA4u: goto label_BFC07AA4; - case 0xBFC07AB0u: goto label_BFC07AB0; - case 0xBFC07AC0u: goto label_BFC07AC0; - case 0xBFC07AD8u: goto label_BFC07AD8; - case 0xBFC07AE8u: goto label_BFC07AE8; - case 0xBFC07AECu: goto label_BFC07AEC; - case 0xBFC07B04u: goto label_BFC07B04; - case 0xBFC07B08u: goto label_BFC07B08; - case 0xBFC07B20u: goto label_BFC07B20; - case 0xBFC07B30u: goto label_BFC07B30; - case 0xBFC07B40u: goto label_BFC07B40; - case 0xBFC07B5Cu: goto label_BFC07B5C; - case 0xBFC07B64u: goto label_BFC07B64; - case 0xBFC07B68u: goto label_BFC07B68; - case 0xBFC07B6Cu: goto label_BFC07B6C; - case 0xBFC07B78u: goto label_BFC07B78; - default: break; - } - } -label_BFC07A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07A04: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC07A08: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A08u); return; } g_debug_last_store_pc = 0xBFC07A08u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A0Cu); -#endif - /* 0xBFC07A0C: 8FAE0040 lw $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A0Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07A10: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A10u); return; } g_debug_last_store_pc = 0xBFC07A10u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC07A14: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A14u); return; } g_debug_last_store_pc = 0xBFC07A14u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC07A18: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07A20: 05C10004 bgez $t6, 0xBFC07A34 */ - uint32_t psx_brA_BFC07A20 = cpu->gpr[14]; - psx_taken_BFC07A20 = ((int32_t)psx_brA_BFC07A20 >= 0); - psx_delay_BFC07A20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC07A24: 31CF07FF andi $t7, $t6, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu; - PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A24u); -#endif - if (psx_delay_BFC07A20) { - psx_delay_BFC07A20 = 0; - if (psx_taken_BFC07A20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A34u); - goto label_BFC07A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A28u); - } -label_BFC07A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC07A28: 11E00002 beq $t7, $zero, 0xBFC07A34 */ - uint32_t psx_brA_BFC07A28 = cpu->gpr[15]; uint32_t psx_brB_BFC07A28 = cpu->gpr[0]; - psx_taken_BFC07A28 = (psx_brA_BFC07A28 == psx_brB_BFC07A28); - psx_delay_BFC07A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A2Cu); -#endif - if (psx_delay_BFC07A28) { - psx_delay_BFC07A28 = 0; - if (psx_taken_BFC07A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A34u); - goto label_BFC07A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A30u); - } -label_BFC07A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC07A30: 25EFF800 addiu $t7, $t7, -2048 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-2048)); - PGXP_ALU(0x25EFF800u, cpu->gpr[15], _pgx1, 0xFFFFF800u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A30u); -#endif -label_BFC07A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC07A34: 15E00007 bne $t7, $zero, 0xBFC07A54 */ - uint32_t psx_brA_BFC07A34 = cpu->gpr[15]; uint32_t psx_brB_BFC07A34 = cpu->gpr[0]; - psx_taken_BFC07A34 = (psx_brA_BFC07A34 != psx_brB_BFC07A34); - psx_delay_BFC07A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC07A38: 24190016 addiu $t9, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24190016u, cpu->gpr[25], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A38u); -#endif - if (psx_delay_BFC07A34) { - psx_delay_BFC07A34 = 0; - if (psx_taken_BFC07A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A54u); - goto label_BFC07A54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A3Cu); - } -label_BFC07A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A3Cu); -#endif - /* 0xBFC07A3C: 8CE40010 lw $a0, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A3Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80u); } - PGXP_LOAD(0x8CE40010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC07A44: 309807FF andi $t8, $a0, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0x7FFu; - PGXP_ALU(0x309807FFu, cpu->gpr[24], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC07A48: 13000005 beq $t8, $zero, 0xBFC07A60 */ - uint32_t psx_brA_BFC07A48 = cpu->gpr[24]; uint32_t psx_brB_BFC07A48 = cpu->gpr[0]; - psx_taken_BFC07A48 = (psx_brA_BFC07A48 == psx_brB_BFC07A48); - psx_delay_BFC07A48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A4Cu); -#endif - if (psx_delay_BFC07A48) { - psx_delay_BFC07A48 = 0; - if (psx_taken_BFC07A48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A60u); - goto label_BFC07A60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A50u); - } -label_BFC07A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC07A50: 24190016 addiu $t9, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24190016u, cpu->gpr[25], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A50u); -#endif -label_BFC07A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC07A54: ACF90018 sw $t9, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A54u); return; } g_debug_last_store_pc = 0xBFC07A54u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A58: 10000047 beq $zero, $zero, 0xBFC07B78 */ - uint32_t psx_brA_BFC07A58 = cpu->gpr[0]; uint32_t psx_brB_BFC07A58 = cpu->gpr[0]; - psx_taken_BFC07A58 = (psx_brA_BFC07A58 == psx_brB_BFC07A58); - psx_delay_BFC07A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07A5C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A5Cu); -#endif - if (psx_delay_BFC07A58) { - psx_delay_BFC07A58 = 0; - if (psx_taken_BFC07A58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B78u); - goto label_BFC07B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A60u); - } -label_BFC07A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A60u); -#endif - /* 0xBFC07A60: 8CE80020 lw $t0, 32($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A60u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x80u); } - PGXP_LOAD(0x8CE80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x112u); -#endif - /* 0xBFC07A68: 0088082B sltu $at, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0088082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07A6C: 14200005 bne $at, $zero, 0xBFC07A84 */ - uint32_t psx_brA_BFC07A6C = cpu->gpr[1]; uint32_t psx_brB_BFC07A6C = cpu->gpr[0]; - psx_taken_BFC07A6C = (psx_brA_BFC07A6C != psx_brB_BFC07A6C); - psx_delay_BFC07A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A70u); -#endif - if (psx_delay_BFC07A6C) { - psx_delay_BFC07A6C = 0; - if (psx_taken_BFC07A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A84u); - goto label_BFC07A84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A74u); - } -label_BFC07A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC07A74: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC07A78: ACE90018 sw $t1, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A78u); return; } g_debug_last_store_pc = 0xBFC07A78u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A7C: 1000003E beq $zero, $zero, 0xBFC07B78 */ - uint32_t psx_brA_BFC07A7C = cpu->gpr[0]; uint32_t psx_brB_BFC07A7C = cpu->gpr[0]; - psx_taken_BFC07A7C = (psx_brA_BFC07A7C == psx_brB_BFC07A7C); - psx_delay_BFC07A7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07A80: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A80u); -#endif - if (psx_delay_BFC07A7C) { - psx_delay_BFC07A7C = 0; - if (psx_taken_BFC07A7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B78u); - goto label_BFC07B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A84u); - } -label_BFC07A84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07A84: 0FF01FCA jal 0xBFC07F28 */ - cpu->gpr[31] = 0xBFC07A8Cu; /* jal link before delay slot */ - psx_delay_BFC07A84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC07A88: AFA70038 sw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A88u); return; } g_debug_last_store_pc = 0xBFC07A88u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A88u); -#endif - if (psx_delay_BFC07A84) { - psx_delay_BFC07A84 = 0; - cpu->gpr[31] = 0xBFC07A8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F28u); - cpu->pc = 0xBFC07F28u; return; - } -label_BFC07A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A8Cu); -#endif - /* 0xBFC07A8C: 8FA70038 lw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A8Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC07A90: 304A0010 andi $t2, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304A0010u, cpu->gpr[10], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC07A94: 1140000A beq $t2, $zero, 0xBFC07AC0 */ - uint32_t psx_brA_BFC07A94 = cpu->gpr[10]; uint32_t psx_brB_BFC07A94 = cpu->gpr[0]; - psx_taken_BFC07A94 = (psx_brA_BFC07A94 == psx_brB_BFC07A94); - psx_delay_BFC07A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07A98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07A98u); -#endif - if (psx_delay_BFC07A94) { - psx_delay_BFC07A94 = 0; - if (psx_taken_BFC07A94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AC0u); - goto label_BFC07AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07A9Cu); - } -label_BFC07A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07A9C: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC07AA4u; /* jal link before delay slot */ - psx_delay_BFC07A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC07AA0: AFA70038 sw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AA0u); return; } g_debug_last_store_pc = 0xBFC07AA0u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AA0u); -#endif - if (psx_delay_BFC07A9C) { - psx_delay_BFC07A9C = 0; - cpu->gpr[31] = 0xBFC07AA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC07AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AA4u); -#endif - /* 0xBFC07AA4: 8FA70038 lw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07AA8: 14400005 bne $v0, $zero, 0xBFC07AC0 */ - uint32_t psx_brA_BFC07AA8 = cpu->gpr[2]; uint32_t psx_brB_BFC07AA8 = cpu->gpr[0]; - psx_taken_BFC07AA8 = (psx_brA_BFC07AA8 != psx_brB_BFC07AA8); - psx_delay_BFC07AA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07AAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07AACu); -#endif - if (psx_delay_BFC07AA8) { - psx_delay_BFC07AA8 = 0; - if (psx_taken_BFC07AA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AC0u); - goto label_BFC07AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AB0u); - } -label_BFC07AB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC07AB0: 240B0010 addiu $t3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240B0010u, cpu->gpr[11], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC07AB4: ACEB0018 sw $t3, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AB4u); return; } g_debug_last_store_pc = 0xBFC07AB4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACEB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07AB8: 1000002F beq $zero, $zero, 0xBFC07B78 */ - uint32_t psx_brA_BFC07AB8 = cpu->gpr[0]; uint32_t psx_brB_BFC07AB8 = cpu->gpr[0]; - psx_taken_BFC07AB8 = (psx_brA_BFC07AB8 == psx_brB_BFC07AB8); - psx_delay_BFC07AB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07ABC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07ABCu); -#endif - if (psx_delay_BFC07AB8) { - psx_delay_BFC07AB8 = 0; - if (psx_taken_BFC07AB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B78u); - goto label_BFC07B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AC0u); - } -label_BFC07AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC07AC0: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AC4u); -#endif - /* 0xBFC07AC4: 8D8C9D7C lw $t4, -25220($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AC4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9D7Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AC8u); -#endif - /* 0xBFC07AC8: 8CED0004 lw $t5, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AC8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80u); } - PGXP_LOAD(0x8CED0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07ACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC07AD0: 118D0006 beq $t4, $t5, 0xBFC07AEC */ - uint32_t psx_brA_BFC07AD0 = cpu->gpr[12]; uint32_t psx_brB_BFC07AD0 = cpu->gpr[13]; - psx_taken_BFC07AD0 = (psx_brA_BFC07AD0 == psx_brB_BFC07AD0); - psx_delay_BFC07AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AD4u); -#endif - /* 0xBFC07AD4: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AD4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AD4u); -#endif - if (psx_delay_BFC07AD0) { - psx_delay_BFC07AD0 = 0; - if (psx_taken_BFC07AD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AECu); - goto label_BFC07AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AD8u); - } -label_BFC07AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC07AD8: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC07ADC: ACEE0018 sw $t6, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07ADCu); return; } g_debug_last_store_pc = 0xBFC07ADCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07AE0: 10000025 beq $zero, $zero, 0xBFC07B78 */ - uint32_t psx_brA_BFC07AE0 = cpu->gpr[0]; uint32_t psx_brB_BFC07AE0 = cpu->gpr[0]; - psx_taken_BFC07AE0 = (psx_brA_BFC07AE0 == psx_brB_BFC07AE0); - psx_delay_BFC07AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07AE4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AE4u); -#endif - if (psx_delay_BFC07AE0) { - psx_delay_BFC07AE0 = 0; - if (psx_taken_BFC07AE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B78u); - goto label_BFC07B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07AE8u); - } -label_BFC07AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AE8u); -#endif - /* 0xBFC07AE8: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AE8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AE8u); -#endif -label_BFC07AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AECu); -#endif - /* 0xBFC07AEC: 8CEF0024 lw $t7, 36($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x8CEF0024u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AF0u); -#endif - /* 0xBFC07AF0: 8CF80010 lw $t8, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AF0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x80u); } - PGXP_LOAD(0x8CF80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AF4u); -#endif - /* 0xBFC07AF4: 8FA6003C lw $a2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07AF4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6003Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07AF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07AFC: 04810002 bgez $a0, 0xBFC07B08 */ - uint32_t psx_brA_BFC07AFC = cpu->gpr[4]; - psx_taken_BFC07AFC = ((int32_t)psx_brA_BFC07AFC >= 0); - psx_delay_BFC07AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC07B00: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B00u); -#endif - if (psx_delay_BFC07AFC) { - psx_delay_BFC07AFC = 0; - if (psx_taken_BFC07AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B08u); - goto label_BFC07B08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B04u); - } -label_BFC07B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07B04: 242107FF addiu $at, $at, 2047 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (2047)); - PGXP_ALU(0x242107FFu, cpu->gpr[1], _pgx1, 0x000007FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B04u); -#endif -label_BFC07B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC07B08: 000122C3 sra $a0, $at, 11 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[1] >> 11u); - PGXP_ALU(0x000122C3u, cpu->gpr[4], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC07B0C: 0018CAC2 srl $t9, $t8, 11 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 11u; - PGXP_ALU(0x0018CAC2u, cpu->gpr[25], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07B10: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B10u); return; } g_debug_last_store_pc = 0xBFC07B10u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC07B14: AFA70038 sw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B14u); return; } g_debug_last_store_pc = 0xBFC07B14u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07B18: 0FF01F07 jal 0xBFC07C1C */ - cpu->gpr[31] = 0xBFC07B20u; /* jal link before delay slot */ - psx_delay_BFC07B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008020u); -#endif - /* 0xBFC07B1C: 01F92821 addu $a1, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[25]; - PGXP_ALU(0x01F92821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B1Cu); -#endif - if (psx_delay_BFC07B18) { - psx_delay_BFC07B18 = 0; - cpu->gpr[31] = 0xBFC07B20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C1Cu); - cpu->pc = 0xBFC07C1Cu; return; - } -label_BFC07B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B20u); -#endif - /* 0xBFC07B20: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B20u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B24u); -#endif - /* 0xBFC07B24: 8FA70038 lw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B24u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC07B28: 10440005 beq $v0, $a0, 0xBFC07B40 */ - uint32_t psx_brA_BFC07B28 = cpu->gpr[2]; uint32_t psx_brB_BFC07B28 = cpu->gpr[4]; - psx_taken_BFC07B28 = (psx_brA_BFC07B28 == psx_brB_BFC07B28); - psx_delay_BFC07B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07B2Cu); -#endif - if (psx_delay_BFC07B28) { - psx_delay_BFC07B28 = 0; - if (psx_taken_BFC07B28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B40u); - goto label_BFC07B40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B30u); - } -label_BFC07B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC07B30: 24080010 addiu $t0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24080010u, cpu->gpr[8], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC07B34: ACE80018 sw $t0, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B34u); return; } g_debug_last_store_pc = 0xBFC07B34u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACE80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07B38: 1000000F beq $zero, $zero, 0xBFC07B78 */ - uint32_t psx_brA_BFC07B38 = cpu->gpr[0]; uint32_t psx_brB_BFC07B38 = cpu->gpr[0]; - psx_taken_BFC07B38 = (psx_brA_BFC07B38 == psx_brB_BFC07B38); - psx_delay_BFC07B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07B3C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B3Cu); -#endif - if (psx_delay_BFC07B38) { - psx_delay_BFC07B38 = 0; - if (psx_taken_BFC07B38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B78u); - goto label_BFC07B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B40u); - } -label_BFC07B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B40u); -#endif - /* 0xBFC07B40: 8CE40010 lw $a0, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80u); } - PGXP_LOAD(0x8CE40010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B44u); -#endif - /* 0xBFC07B44: 8FA90040 lw $t1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B44u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90040u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B48u); -#endif - /* 0xBFC07B48: 8CE20020 lw $v0, 32($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B48u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80u); } - PGXP_LOAD(0x8CE20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC07B4C: 00895021 addu $t2, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00895021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC07B50: 004A082B sltu $at, $v0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x004A082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07B54: 10200004 beq $at, $zero, 0xBFC07B68 */ - uint32_t psx_brA_BFC07B54 = cpu->gpr[1]; uint32_t psx_brB_BFC07B54 = cpu->gpr[0]; - psx_taken_BFC07B54 = (psx_brA_BFC07B54 == psx_brB_BFC07B54); - psx_delay_BFC07B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B58u); -#endif - /* 0xBFC07B58: 8FA30040 lw $v1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B58u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30040u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B58u); -#endif - if (psx_delay_BFC07B54) { - psx_delay_BFC07B54 = 0; - if (psx_taken_BFC07B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B68u); - goto label_BFC07B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B5Cu); - } -label_BFC07B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07B5C: 10000003 beq $zero, $zero, 0xBFC07B6C */ - uint32_t psx_brA_BFC07B5C = cpu->gpr[0]; uint32_t psx_brB_BFC07B5C = cpu->gpr[0]; - psx_taken_BFC07B5C = (psx_brA_BFC07B5C == psx_brB_BFC07B5C); - psx_delay_BFC07B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC07B60: 00441823 subu $v1, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[2] - cpu->gpr[4]; - PGXP_ALU(0x00441823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B60u); -#endif - if (psx_delay_BFC07B5C) { - psx_delay_BFC07B5C = 0; - if (psx_taken_BFC07B5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B6Cu); - goto label_BFC07B6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07B64u); - } -label_BFC07B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B64u); -#endif - /* 0xBFC07B64: 8FA30040 lw $v1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B64u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30040u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B64u); -#endif -label_BFC07B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07B68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07B68u); -#endif -label_BFC07B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x818u); -#endif - /* 0xBFC07B6C: 00835821 addu $t3, $a0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[4] + cpu->gpr[3]; - PGXP_ALU(0x00835821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC07B70: ACEB0010 sw $t3, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B70u); return; } g_debug_last_store_pc = 0xBFC07B70u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACEB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC07B74: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B74u); -#endif -label_BFC07B78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B78u); -#endif - /* 0xBFC07B78: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07B7C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07B80: 03E00008 jr $ra */ - psx_delay_BFC07B80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07B84u); -#endif - if (psx_delay_BFC07B80) { - psx_delay_BFC07B80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07B88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07B88u); - int psx_delay_BFC07B90 = 0; - int psx_delay_BFC07B9C = 0; - int psx_taken_BFC07B9C = 0; - int psx_delay_BFC07BA4 = 0; - int psx_delay_BFC07BAC = 0; - int psx_taken_BFC07BAC = 0; - int psx_delay_BFC07BC0 = 0; - int psx_taken_BFC07BC0 = 0; - int psx_delay_BFC07BCC = 0; - int psx_delay_BFC07BD4 = 0; - int psx_taken_BFC07BD4 = 0; - int psx_delay_BFC07BE8 = 0; - int psx_taken_BFC07BE8 = 0; - int psx_delay_BFC07C14 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07B98u: goto label_BFC07B98; - case 0xBFC07BA4u: goto label_BFC07BA4; - case 0xBFC07BACu: goto label_BFC07BAC; - case 0xBFC07BB4u: goto label_BFC07BB4; - case 0xBFC07BC8u: goto label_BFC07BC8; - case 0xBFC07BCCu: goto label_BFC07BCC; - case 0xBFC07BD4u: goto label_BFC07BD4; - case 0xBFC07BDCu: goto label_BFC07BDC; - case 0xBFC07BF0u: goto label_BFC07BF0; - case 0xBFC07C0Cu: goto label_BFC07C0C; - default: break; - } - } -label_BFC07B88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07B88: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07B8C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B8Cu); return; } g_debug_last_store_pc = 0xBFC07B8Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07B90: 0FF01FCA jal 0xBFC07F28 */ - cpu->gpr[31] = 0xBFC07B98u; /* jal link before delay slot */ - psx_delay_BFC07B90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07B94: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07B94u); return; } g_debug_last_store_pc = 0xBFC07B94u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B94u); -#endif - if (psx_delay_BFC07B90) { - psx_delay_BFC07B90 = 0; - cpu->gpr[31] = 0xBFC07B98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F28u); - cpu->pc = 0xBFC07F28u; return; - } -label_BFC07B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC07B98: 304E0010 andi $t6, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC07B9C: 11C0000A beq $t6, $zero, 0xBFC07BC8 */ - uint32_t psx_brA_BFC07B9C = cpu->gpr[14]; uint32_t psx_brB_BFC07B9C = cpu->gpr[0]; - psx_taken_BFC07B9C = (psx_brA_BFC07B9C == psx_brB_BFC07B9C); - psx_delay_BFC07B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07BA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07BA0u); -#endif - if (psx_delay_BFC07B9C) { - psx_delay_BFC07B9C = 0; - if (psx_taken_BFC07B9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BC8u); - goto label_BFC07BC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BA4u); - } -label_BFC07BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07BA4: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC07BACu; /* jal link before delay slot */ - psx_delay_BFC07BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07BA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07BA8u); -#endif - if (psx_delay_BFC07BA4) { - psx_delay_BFC07BA4 = 0; - cpu->gpr[31] = 0xBFC07BACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC07BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07BAC: 14400007 bne $v0, $zero, 0xBFC07BCC */ - uint32_t psx_brA_BFC07BAC = cpu->gpr[2]; uint32_t psx_brB_BFC07BAC = cpu->gpr[0]; - psx_taken_BFC07BAC = (psx_brA_BFC07BAC != psx_brB_BFC07BAC); - psx_delay_BFC07BAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BB0u); -#endif - /* 0xBFC07BB0: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07BB0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BB0u); -#endif - if (psx_delay_BFC07BAC) { - psx_delay_BFC07BAC = 0; - if (psx_taken_BFC07BAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BCCu); - goto label_BFC07BCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BB4u); - } -label_BFC07BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC07BB4: 240F0010 addiu $t7, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07BB8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC07BBC: AC2FB9B4 sw $t7, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07BBCu); return; } g_debug_last_store_pc = 0xBFC07BBCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FB9B4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07BC0: 10000012 beq $zero, $zero, 0xBFC07C0C */ - uint32_t psx_brA_BFC07BC0 = cpu->gpr[0]; uint32_t psx_brB_BFC07BC0 = cpu->gpr[0]; - psx_taken_BFC07BC0 = (psx_brA_BFC07BC0 == psx_brB_BFC07BC0); - psx_delay_BFC07BC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07BC4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BC4u); -#endif - if (psx_delay_BFC07BC0) { - psx_delay_BFC07BC0 = 0; - if (psx_taken_BFC07BC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C0Cu); - goto label_BFC07C0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BC8u); - } -label_BFC07BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BC8u); -#endif - /* 0xBFC07BC8: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07BC8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BC8u); -#endif -label_BFC07BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07BCC: 0FF020F3 jal 0xBFC083CC */ - cpu->gpr[31] = 0xBFC07BD4u; /* jal link before delay slot */ - psx_delay_BFC07BCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07BD0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BD0u); -#endif - if (psx_delay_BFC07BCC) { - psx_delay_BFC07BCC = 0; - cpu->gpr[31] = 0xBFC07BD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC083CCu); - cpu->pc = 0xBFC083CCu; return; - } -label_BFC07BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07BD4: 14400006 bne $v0, $zero, 0xBFC07BF0 */ - uint32_t psx_brA_BFC07BD4 = cpu->gpr[2]; uint32_t psx_brB_BFC07BD4 = cpu->gpr[0]; - psx_taken_BFC07BD4 = (psx_brA_BFC07BD4 != psx_brB_BFC07BD4); - psx_delay_BFC07BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC07BD8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BD8u); -#endif - if (psx_delay_BFC07BD4) { - psx_delay_BFC07BD4 = 0; - if (psx_taken_BFC07BD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BF0u); - goto label_BFC07BF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BDCu); - } -label_BFC07BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC07BDC: 24180002 addiu $t8, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24180002u, cpu->gpr[24], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC07BE0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC07BE4: AC38B9B4 sw $t8, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07BE4u); return; } g_debug_last_store_pc = 0xBFC07BE4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38B9B4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07BE8: 10000008 beq $zero, $zero, 0xBFC07C0C */ - uint32_t psx_brA_BFC07BE8 = cpu->gpr[0]; uint32_t psx_brB_BFC07BE8 = cpu->gpr[0]; - psx_taken_BFC07BE8 = (psx_brA_BFC07BE8 == psx_brB_BFC07BE8); - psx_delay_BFC07BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07BEC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BECu); -#endif - if (psx_delay_BFC07BE8) { - psx_delay_BFC07BE8 = 0; - if (psx_taken_BFC07BE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C0Cu); - goto label_BFC07C0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07BF0u); - } -label_BFC07BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC07BF0: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC07BF4: 0323C823 subu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[3]; - PGXP_ALU(0x0323C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC07BF8: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC07BFC: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC07C00: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C04u); -#endif - /* 0xBFC07C04: 8C4291F4 lw $v0, -28172($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4291F4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07C08u); -#endif -label_BFC07C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C0Cu); -#endif - /* 0xBFC07C0C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07C10: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07C14: 03E00008 jr $ra */ - psx_delay_BFC07C14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07C18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07C18u); -#endif - if (psx_delay_BFC07C14) { - psx_delay_BFC07C14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07C1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07C1Cu); - int psx_delay_BFC07C5C = 0; - int psx_taken_BFC07C5C = 0; - int psx_delay_BFC07C68 = 0; - int psx_delay_BFC07C70 = 0; - int psx_taken_BFC07C70 = 0; - int psx_delay_BFC07D84 = 0; - int psx_delay_BFC07D8C = 0; - int psx_taken_BFC07D8C = 0; - int psx_delay_BFC07D98 = 0; - int psx_taken_BFC07D98 = 0; - int psx_delay_BFC07DA0 = 0; - int psx_delay_BFC07DA8 = 0; - int psx_taken_BFC07DA8 = 0; - int psx_delay_BFC07DB0 = 0; - int psx_taken_BFC07DB0 = 0; - int psx_delay_BFC07DBC = 0; - int psx_delay_BFC07DC4 = 0; - int psx_taken_BFC07DC4 = 0; - int psx_delay_BFC07DD4 = 0; - int psx_delay_BFC07DDC = 0; - int psx_taken_BFC07DDC = 0; - int psx_delay_BFC07DE8 = 0; - int psx_taken_BFC07DE8 = 0; - int psx_delay_BFC07DF8 = 0; - int psx_delay_BFC07E00 = 0; - int psx_taken_BFC07E00 = 0; - int psx_delay_BFC07E0C = 0; - int psx_delay_BFC07E14 = 0; - int psx_taken_BFC07E14 = 0; - int psx_delay_BFC07E24 = 0; - int psx_delay_BFC07E2C = 0; - int psx_taken_BFC07E2C = 0; - int psx_delay_BFC07E38 = 0; - int psx_taken_BFC07E38 = 0; - int psx_delay_BFC07E48 = 0; - int psx_delay_BFC07E50 = 0; - int psx_taken_BFC07E50 = 0; - int psx_delay_BFC07E58 = 0; - int psx_taken_BFC07E58 = 0; - int psx_delay_BFC07E64 = 0; - int psx_delay_BFC07E6C = 0; - int psx_taken_BFC07E6C = 0; - int psx_delay_BFC07E74 = 0; - int psx_taken_BFC07E74 = 0; - int psx_delay_BFC07E84 = 0; - int psx_delay_BFC07E8C = 0; - int psx_taken_BFC07E8C = 0; - int psx_delay_BFC07E94 = 0; - int psx_taken_BFC07E94 = 0; - int psx_delay_BFC07EA4 = 0; - int psx_delay_BFC07EAC = 0; - int psx_taken_BFC07EAC = 0; - int psx_delay_BFC07EB8 = 0; - int psx_delay_BFC07EC0 = 0; - int psx_taken_BFC07EC0 = 0; - int psx_delay_BFC07ED0 = 0; - int psx_delay_BFC07ED8 = 0; - int psx_taken_BFC07ED8 = 0; - int psx_delay_BFC07EE4 = 0; - int psx_delay_BFC07EEC = 0; - int psx_taken_BFC07EEC = 0; - int psx_delay_BFC07EF4 = 0; - int psx_taken_BFC07EF4 = 0; - int psx_delay_BFC07F20 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07C5Cu: goto label_BFC07C5C; - case 0xBFC07C64u: goto label_BFC07C64; - case 0xBFC07C70u: goto label_BFC07C70; - case 0xBFC07C78u: goto label_BFC07C78; - case 0xBFC07D8Cu: goto label_BFC07D8C; - case 0xBFC07D94u: goto label_BFC07D94; - case 0xBFC07DA0u: goto label_BFC07DA0; - case 0xBFC07DA8u: goto label_BFC07DA8; - case 0xBFC07DB0u: goto label_BFC07DB0; - case 0xBFC07DB8u: goto label_BFC07DB8; - case 0xBFC07DC4u: goto label_BFC07DC4; - case 0xBFC07DCCu: goto label_BFC07DCC; - case 0xBFC07DDCu: goto label_BFC07DDC; - case 0xBFC07DE4u: goto label_BFC07DE4; - case 0xBFC07DF0u: goto label_BFC07DF0; - case 0xBFC07E00u: goto label_BFC07E00; - case 0xBFC07E08u: goto label_BFC07E08; - case 0xBFC07E14u: goto label_BFC07E14; - case 0xBFC07E1Cu: goto label_BFC07E1C; - case 0xBFC07E2Cu: goto label_BFC07E2C; - case 0xBFC07E34u: goto label_BFC07E34; - case 0xBFC07E40u: goto label_BFC07E40; - case 0xBFC07E50u: goto label_BFC07E50; - case 0xBFC07E58u: goto label_BFC07E58; - case 0xBFC07E60u: goto label_BFC07E60; - case 0xBFC07E6Cu: goto label_BFC07E6C; - case 0xBFC07E74u: goto label_BFC07E74; - case 0xBFC07E7Cu: goto label_BFC07E7C; - case 0xBFC07E8Cu: goto label_BFC07E8C; - case 0xBFC07E94u: goto label_BFC07E94; - case 0xBFC07E9Cu: goto label_BFC07E9C; - case 0xBFC07EACu: goto label_BFC07EAC; - case 0xBFC07EB4u: goto label_BFC07EB4; - case 0xBFC07EC0u: goto label_BFC07EC0; - case 0xBFC07EC8u: goto label_BFC07EC8; - case 0xBFC07ED8u: goto label_BFC07ED8; - case 0xBFC07EE0u: goto label_BFC07EE0; - case 0xBFC07EECu: goto label_BFC07EEC; - case 0xBFC07EF4u: goto label_BFC07EF4; - case 0xBFC07EFCu: goto label_BFC07EFC; - case 0xBFC07F00u: goto label_BFC07F00; - default: break; - } - } -label_BFC07C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07C1C: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC07C20: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C20u); return; } g_debug_last_store_pc = 0xBFC07C20u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC07C24: AFB60030 sw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C24u); return; } g_debug_last_store_pc = 0xBFC07C24u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC07C28: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C28u); return; } g_debug_last_store_pc = 0xBFC07C28u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC07C2C: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C2Cu); return; } g_debug_last_store_pc = 0xBFC07C2Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC07C30: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C30u); return; } g_debug_last_store_pc = 0xBFC07C30u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07C34: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C34u); return; } g_debug_last_store_pc = 0xBFC07C34u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC07C38: 00A0A821 addu $s5, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC07C3C: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C3Cu); return; } g_debug_last_store_pc = 0xBFC07C3Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC07C40: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC07C44: 00C0A021 addu $s4, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC07C48: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C48u); return; } g_debug_last_store_pc = 0xBFC07C48u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC07C4C: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC07C50: 26B50096 addiu $s5, $s5, 150 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (150)); - PGXP_ALU(0x26B50096u, cpu->gpr[21], _pgx1, 0x00000096u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC07C54: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC07C58: 2AC2000A slti $v0, $s6, 10 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0); - PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C58u); -#endif -label_BFC07C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07C5C: 14400006 bne $v0, $zero, 0xBFC07C78 */ - uint32_t psx_brA_BFC07C5C = cpu->gpr[2]; uint32_t psx_brB_BFC07C5C = cpu->gpr[0]; - psx_taken_BFC07C5C = (psx_brA_BFC07C5C != psx_brB_BFC07C5C); - psx_delay_BFC07C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC07C60: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C60u); -#endif - if (psx_delay_BFC07C5C) { - psx_delay_BFC07C5C = 0; - if (psx_taken_BFC07C5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C78u); - goto label_BFC07C78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C64u); - } -label_BFC07C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07C64: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07C68: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07C70u; /* jal link before delay slot */ - psx_delay_BFC07C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07C6C: 2405000C addiu $a1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2405000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C6Cu); -#endif - if (psx_delay_BFC07C68) { - psx_delay_BFC07C68 = 0; - cpu->gpr[31] = 0xBFC07C70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07C70: 100000A3 beq $zero, $zero, 0xBFC07F00 */ - uint32_t psx_brA_BFC07C70 = cpu->gpr[0]; uint32_t psx_brB_BFC07C70 = cpu->gpr[0]; - psx_taken_BFC07C70 = (psx_brA_BFC07C70 == psx_brB_BFC07C70); - psx_delay_BFC07C70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07C74: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C74u); -#endif - if (psx_delay_BFC07C70) { - psx_delay_BFC07C70 = 0; - if (psx_taken_BFC07C70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F00u); - goto label_BFC07F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C78u); - } -label_BFC07C78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07C78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07C78: 24011194 addiu $at, $zero, 4500 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4500)); - PGXP_ALU(0x24011194u, cpu->gpr[1], _pgx1, 0x00001194u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200002u); -#endif - /* 0xBFC07C7C: 02A1001A div $s5, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[21]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x02A1001Au, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07C80: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07C84: 3C100001 lui $s0, 0x1 */ - cpu->gpr[16] = 0x00010000u; - PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07C88: 3610869F ori $s0, $s0, 0x869F */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x869Fu; - PGXP_ALU(0x3610869Fu, cpu->gpr[16], _pgx1, 0x869Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07C8C: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07C90: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC07C94: AFAE003C sw $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C94u); return; } g_debug_last_store_pc = 0xBFC07C94u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C98u); -#endif - /* 0xBFC07C98: 8FAF003C lw $t7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C98u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07C9Cu); -#endif - /* 0xBFC07C9C: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C9Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC07CA0: 01E1001A div $t7, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CA4u); -#endif - /* 0xBFC07CA4: 8FAB003C lw $t3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07CA4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB003Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07CA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC07CAC: 000B60C0 sll $t4, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC07CB0: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC07CB4: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC07CB8: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC07CBC: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC07CC0: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC07CC4: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC07CC8: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC07CCC: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC07CD0: 02ACA823 subu $s5, $s5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[21] = cpu->gpr[21] - cpu->gpr[12]; - PGXP_ALU(0x02ACA823u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC07CD4: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07CD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07CDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC07CE0: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07CE4: 2401004B addiu $at, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2401004Bu, cpu->gpr[1], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC07CE8: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC07CEC: 00084900 sll $t1, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC07CF0: 03095021 addu $t2, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200002u); -#endif - /* 0xBFC07CF4: 02A1001A div $s5, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[21]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x02A1001Au, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC07CF8: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC07CFC: A3AA0050 sb $t2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07CFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (80)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0050u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC07D00: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC07D04: AFAD003C sw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D04u); return; } g_debug_last_store_pc = 0xBFC07D04u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D08u); -#endif - /* 0xBFC07D08: 8FAE003C lw $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D08u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D0Cu); -#endif - /* 0xBFC07D0C: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D0Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC07D10: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D14u); -#endif - /* 0xBFC07D14: 8FAA003C lw $t2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D14u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA003Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC07D1C: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC07D20: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC07D24: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC07D28: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC07D2C: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC07D30: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201800u); -#endif - /* 0xBFC07D34: 02AB6023 subu $t4, $s5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[21] - cpu->gpr[11]; - PGXP_ALU(0x02AB6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC07D38: AFAC003C sw $t4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D38u); return; } g_debug_last_store_pc = 0xBFC07D38u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC003Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D3Cu); -#endif - /* 0xBFC07D3C: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D3Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC07D40: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC07D4C: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D50u); -#endif - /* 0xBFC07D50: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D50u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC07D54: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC07D58: 0008C100 sll $t8, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 4u; - PGXP_ALU(0x0008C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008200u); -#endif - /* 0xBFC07D5C: 01F84821 addu $t1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[9] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F84821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC07D60: 01A1001A div $t5, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A1001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC07D64: A3A90051 sb $t1, 81($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 81; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07D64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (81)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90051u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC07D68: 00007010 mfhi $t6 */ - cpu->gpr[14] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007010u, cpu->gpr[14], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC07D74: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC07D78: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC07D7C: 00087900 sll $t7, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00087900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC07D80: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07D84: 0FF03708 jal 0xBFC0DC20 */ - cpu->gpr[31] = 0xBFC07D8Cu; /* jal link before delay slot */ - psx_delay_BFC07D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC07D88: A3B80052 sb $t8, 82($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 82; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07D88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (82)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80052u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D88u); -#endif - if (psx_delay_BFC07D84) { - psx_delay_BFC07D84 = 0; - cpu->gpr[31] = 0xBFC07D8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC20u); - cpu->pc = 0xBFC0DC20u; return; - } -label_BFC07D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07D8C: 14400008 bne $v0, $zero, 0xBFC07DB0 */ - uint32_t psx_brA_BFC07D8C = cpu->gpr[2]; uint32_t psx_brB_BFC07D8C = cpu->gpr[0]; - psx_taken_BFC07D8C = (psx_brA_BFC07D8C != psx_brB_BFC07D8C); - psx_delay_BFC07D8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D90u); -#endif - if (psx_delay_BFC07D8C) { - psx_delay_BFC07D8C = 0; - if (psx_taken_BFC07D8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DB0u); - goto label_BFC07DB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07D94u); - } -label_BFC07D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07D94: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07D98: 1A000005 blez $s0, 0xBFC07DB0 */ - uint32_t psx_brA_BFC07D98 = cpu->gpr[16]; - psx_taken_BFC07D98 = ((int32_t)psx_brA_BFC07D98 <= 0); - psx_delay_BFC07D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07D9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07D9Cu); -#endif - if (psx_delay_BFC07D98) { - psx_delay_BFC07D98 = 0; - if (psx_taken_BFC07D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DB0u); - goto label_BFC07DB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DA0u); - } -label_BFC07DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07DA0: 0FF03708 jal 0xBFC0DC20 */ - cpu->gpr[31] = 0xBFC07DA8u; /* jal link before delay slot */ - psx_delay_BFC07DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07DA4: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DA4u); -#endif - if (psx_delay_BFC07DA0) { - psx_delay_BFC07DA0 = 0; - cpu->gpr[31] = 0xBFC07DA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC20u); - cpu->pc = 0xBFC0DC20u; return; - } -label_BFC07DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07DA8: 1040FFFA beq $v0, $zero, 0xBFC07D94 */ - uint32_t psx_brA_BFC07DA8 = cpu->gpr[2]; uint32_t psx_brB_BFC07DA8 = cpu->gpr[0]; - psx_taken_BFC07DA8 = (psx_brA_BFC07DA8 == psx_brB_BFC07DA8); - psx_delay_BFC07DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07DACu); -#endif - if (psx_delay_BFC07DA8) { - psx_delay_BFC07DA8 = 0; - if (psx_taken_BFC07DA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07D94u); - goto label_BFC07D94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DB0u); - } -label_BFC07DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07DB0: 1E000006 bgtz $s0, 0xBFC07DCC */ - uint32_t psx_brA_BFC07DB0 = cpu->gpr[16]; - psx_taken_BFC07DB0 = ((int32_t)psx_brA_BFC07DB0 > 0); - psx_delay_BFC07DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07DB4u); -#endif - if (psx_delay_BFC07DB0) { - psx_delay_BFC07DB0 = 0; - if (psx_taken_BFC07DB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DCCu); - goto label_BFC07DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DB8u); - } -label_BFC07DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07DB8: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07DBC: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07DC4u; /* jal link before delay slot */ - psx_delay_BFC07DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07DC0: 2405000B addiu $a1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2405000Bu, cpu->gpr[5], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DC0u); -#endif - if (psx_delay_BFC07DBC) { - psx_delay_BFC07DBC = 0; - cpu->gpr[31] = 0xBFC07DC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DC4: 1000004E beq $zero, $zero, 0xBFC07F00 */ - uint32_t psx_brA_BFC07DC4 = cpu->gpr[0]; uint32_t psx_brB_BFC07DC4 = cpu->gpr[0]; - psx_taken_BFC07DC4 = (psx_brA_BFC07DC4 == psx_brB_BFC07DC4); - psx_delay_BFC07DC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07DC8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DC8u); -#endif - if (psx_delay_BFC07DC4) { - psx_delay_BFC07DC4 = 0; - if (psx_taken_BFC07DC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F00u); - goto label_BFC07F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DCCu); - } -label_BFC07DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07DCC: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DD0u); -#endif - /* 0xBFC07DD0: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07DD0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07DD4: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07DDCu; /* jal link before delay slot */ - psx_delay_BFC07DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07DD8u); -#endif - if (psx_delay_BFC07DD4) { - psx_delay_BFC07DD4 = 0; - cpu->gpr[31] = 0xBFC07DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC07DDC: 14510004 bne $v0, $s1, 0xBFC07DF0 */ - uint32_t psx_brA_BFC07DDC = cpu->gpr[2]; uint32_t psx_brB_BFC07DDC = cpu->gpr[17]; - psx_taken_BFC07DDC = (psx_brA_BFC07DDC != psx_brB_BFC07DDC); - psx_delay_BFC07DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07DE0u); -#endif - if (psx_delay_BFC07DDC) { - psx_delay_BFC07DDC = 0; - if (psx_taken_BFC07DDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DF0u); - goto label_BFC07DF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DE4u); - } -label_BFC07DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07DE4: 3C100001 lui $s0, 0x1 */ - cpu->gpr[16] = 0x00010000u; - PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DE8: 1000000C beq $zero, $zero, 0xBFC07E1C */ - uint32_t psx_brA_BFC07DE8 = cpu->gpr[0]; uint32_t psx_brB_BFC07DE8 = cpu->gpr[0]; - psx_taken_BFC07DE8 = (psx_brA_BFC07DE8 == psx_brB_BFC07DE8); - psx_delay_BFC07DE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07DEC: 3610869F ori $s0, $s0, 0x869F */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x869Fu; - PGXP_ALU(0x3610869Fu, cpu->gpr[16], _pgx1, 0x869Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DECu); -#endif - if (psx_delay_BFC07DE8) { - psx_delay_BFC07DE8 = 0; - if (psx_taken_BFC07DE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E1Cu); - goto label_BFC07E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DF0u); - } -label_BFC07DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07DF0: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DF4u); -#endif - /* 0xBFC07DF4: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07DF4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07DF8: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07E00u; /* jal link before delay slot */ - psx_delay_BFC07DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07DFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07DFCu); -#endif - if (psx_delay_BFC07DF8) { - psx_delay_BFC07DF8 = 0; - cpu->gpr[31] = 0xBFC07E00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC07E00: 1451FFF2 bne $v0, $s1, 0xBFC07DCC */ - uint32_t psx_brA_BFC07E00 = cpu->gpr[2]; uint32_t psx_brB_BFC07E00 = cpu->gpr[17]; - psx_taken_BFC07E00 = (psx_brA_BFC07E00 != psx_brB_BFC07E00); - psx_delay_BFC07E00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07E04u); -#endif - if (psx_delay_BFC07E00) { - psx_delay_BFC07E00 = 0; - if (psx_taken_BFC07E00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07DCCu); - goto label_BFC07DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E08u); - } -label_BFC07E08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07E08: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07E0C: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07E14u; /* jal link before delay slot */ - psx_delay_BFC07E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07E10: 2405000C addiu $a1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2405000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E10u); -#endif - if (psx_delay_BFC07E0C) { - psx_delay_BFC07E0C = 0; - cpu->gpr[31] = 0xBFC07E14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E14: 1000FF91 beq $zero, $zero, 0xBFC07C5C */ - uint32_t psx_brA_BFC07E14 = cpu->gpr[0]; uint32_t psx_brB_BFC07E14 = cpu->gpr[0]; - psx_taken_BFC07E14 = (psx_brA_BFC07E14 == psx_brB_BFC07E14); - psx_delay_BFC07E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC07E18: 2AC2000A slti $v0, $s6, 10 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0); - PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E18u); -#endif - if (psx_delay_BFC07E14) { - psx_delay_BFC07E14 = 0; - if (psx_taken_BFC07E14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C5Cu); - goto label_BFC07C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E1Cu); - } -label_BFC07E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC07E1C: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC07E20: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07E24: 0FF0370C jal 0xBFC0DC30 */ - cpu->gpr[31] = 0xBFC07E2Cu; /* jal link before delay slot */ - psx_delay_BFC07E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC07E28: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E28u); -#endif - if (psx_delay_BFC07E24) { - psx_delay_BFC07E24 = 0; - cpu->gpr[31] = 0xBFC07E2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC30u); - cpu->pc = 0xBFC0DC30u; return; - } -label_BFC07E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07E2C: 1440000A bne $v0, $zero, 0xBFC07E58 */ - uint32_t psx_brA_BFC07E2C = cpu->gpr[2]; uint32_t psx_brB_BFC07E2C = cpu->gpr[0]; - psx_taken_BFC07E2C = (psx_brA_BFC07E2C != psx_brB_BFC07E2C); - psx_delay_BFC07E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC07E30: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E30u); -#endif - if (psx_delay_BFC07E2C) { - psx_delay_BFC07E2C = 0; - if (psx_taken_BFC07E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E58u); - goto label_BFC07E58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E34u); - } -label_BFC07E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07E34: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07E38: 1A000007 blez $s0, 0xBFC07E58 */ - uint32_t psx_brA_BFC07E38 = cpu->gpr[16]; - psx_taken_BFC07E38 = ((int32_t)psx_brA_BFC07E38 <= 0); - psx_delay_BFC07E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07E3Cu); -#endif - if (psx_delay_BFC07E38) { - psx_delay_BFC07E38 = 0; - if (psx_taken_BFC07E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E58u); - goto label_BFC07E58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E40u); - } -label_BFC07E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC07E40: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC07E44: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07E48: 0FF0370C jal 0xBFC0DC30 */ - cpu->gpr[31] = 0xBFC07E50u; /* jal link before delay slot */ - psx_delay_BFC07E48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC07E4C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E4Cu); -#endif - if (psx_delay_BFC07E48) { - psx_delay_BFC07E48 = 0; - cpu->gpr[31] = 0xBFC07E50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC30u); - cpu->pc = 0xBFC0DC30u; return; - } -label_BFC07E50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07E50: 1040FFF8 beq $v0, $zero, 0xBFC07E34 */ - uint32_t psx_brA_BFC07E50 = cpu->gpr[2]; uint32_t psx_brB_BFC07E50 = cpu->gpr[0]; - psx_taken_BFC07E50 = (psx_brA_BFC07E50 == psx_brB_BFC07E50); - psx_delay_BFC07E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC07E54: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E54u); -#endif - if (psx_delay_BFC07E50) { - psx_delay_BFC07E50 = 0; - if (psx_taken_BFC07E50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E34u); - goto label_BFC07E34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E58u); - } -label_BFC07E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07E58: 1E000006 bgtz $s0, 0xBFC07E74 */ - uint32_t psx_brA_BFC07E58 = cpu->gpr[16]; - psx_taken_BFC07E58 = ((int32_t)psx_brA_BFC07E58 > 0); - psx_delay_BFC07E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07E5Cu); -#endif - if (psx_delay_BFC07E58) { - psx_delay_BFC07E58 = 0; - if (psx_taken_BFC07E58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E74u); - goto label_BFC07E74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E60u); - } -label_BFC07E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07E60: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07E64: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07E6Cu; /* jal link before delay slot */ - psx_delay_BFC07E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07E68: 2405000C addiu $a1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2405000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E68u); -#endif - if (psx_delay_BFC07E64) { - psx_delay_BFC07E64 = 0; - cpu->gpr[31] = 0xBFC07E6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E6C: 10000024 beq $zero, $zero, 0xBFC07F00 */ - uint32_t psx_brA_BFC07E6C = cpu->gpr[0]; uint32_t psx_brB_BFC07E6C = cpu->gpr[0]; - psx_taken_BFC07E6C = (psx_brA_BFC07E6C == psx_brB_BFC07E6C); - psx_delay_BFC07E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07E70: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E70u); -#endif - if (psx_delay_BFC07E6C) { - psx_delay_BFC07E6C = 0; - if (psx_taken_BFC07E6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F00u); - goto label_BFC07F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E74u); - } -label_BFC07E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07E74: 1A000022 blez $s0, 0xBFC07F00 */ - uint32_t psx_brA_BFC07E74 = cpu->gpr[16]; - psx_taken_BFC07E74 = ((int32_t)psx_brA_BFC07E74 <= 0); - psx_delay_BFC07E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC07E78: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E78u); -#endif - if (psx_delay_BFC07E74) { - psx_delay_BFC07E74 = 0; - if (psx_taken_BFC07E74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F00u); - goto label_BFC07F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E7Cu); - } -label_BFC07E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07E7C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E80u); -#endif - /* 0xBFC07E80: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07E80u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07E84: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07E8Cu; /* jal link before delay slot */ - psx_delay_BFC07E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07E88u); -#endif - if (psx_delay_BFC07E84) { - psx_delay_BFC07E84 = 0; - cpu->gpr[31] = 0xBFC07E8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC07E8C: 14510003 bne $v0, $s1, 0xBFC07E9C */ - uint32_t psx_brA_BFC07E8C = cpu->gpr[2]; uint32_t psx_brB_BFC07E8C = cpu->gpr[17]; - psx_taken_BFC07E8C = (psx_brA_BFC07E8C != psx_brB_BFC07E8C); - psx_delay_BFC07E8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07E90u); -#endif - if (psx_delay_BFC07E8C) { - psx_delay_BFC07E8C = 0; - if (psx_taken_BFC07E8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E9Cu); - goto label_BFC07E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E94u); - } -label_BFC07E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07E94: 10000019 beq $zero, $zero, 0xBFC07EFC */ - uint32_t psx_brA_BFC07E94 = cpu->gpr[0]; uint32_t psx_brB_BFC07E94 = cpu->gpr[0]; - psx_taken_BFC07E94 = (psx_brA_BFC07E94 == psx_brB_BFC07E94); - psx_delay_BFC07E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0001u); -#endif - /* 0xBFC07E98: 02609021 addu $s2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02609021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07E98u); -#endif - if (psx_delay_BFC07E94) { - psx_delay_BFC07E94 = 0; - if (psx_taken_BFC07E94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EFCu); - goto label_BFC07EFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E9Cu); - } -label_BFC07E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07E9C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EA0u); -#endif - /* 0xBFC07EA0: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07EA0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07EA4: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07EACu; /* jal link before delay slot */ - psx_delay_BFC07EA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07EA8u); -#endif - if (psx_delay_BFC07EA4) { - psx_delay_BFC07EA4 = 0; - cpu->gpr[31] = 0xBFC07EACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC07EAC: 14510006 bne $v0, $s1, 0xBFC07EC8 */ - uint32_t psx_brA_BFC07EAC = cpu->gpr[2]; uint32_t psx_brB_BFC07EAC = cpu->gpr[17]; - psx_taken_BFC07EAC = (psx_brA_BFC07EAC != psx_brB_BFC07EAC); - psx_delay_BFC07EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07EB0u); -#endif - if (psx_delay_BFC07EAC) { - psx_delay_BFC07EAC = 0; - if (psx_taken_BFC07EAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EC8u); - goto label_BFC07EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EB4u); - } -label_BFC07EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07EB4: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07EB8: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07EC0u; /* jal link before delay slot */ - psx_delay_BFC07EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07EBC: 24050016 addiu $a1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24050016u, cpu->gpr[5], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EBCu); -#endif - if (psx_delay_BFC07EB8) { - psx_delay_BFC07EB8 = 0; - cpu->gpr[31] = 0xBFC07EC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EC0: 1000FF66 beq $zero, $zero, 0xBFC07C5C */ - uint32_t psx_brA_BFC07EC0 = cpu->gpr[0]; uint32_t psx_brB_BFC07EC0 = cpu->gpr[0]; - psx_taken_BFC07EC0 = (psx_brA_BFC07EC0 == psx_brB_BFC07EC0); - psx_delay_BFC07EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC07EC4: 2AC2000A slti $v0, $s6, 10 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] < (10) ? 1 : 0); - PGXP_ALU(0x2AC2000Au, cpu->gpr[2], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EC4u); -#endif - if (psx_delay_BFC07EC0) { - psx_delay_BFC07EC0 = 0; - if (psx_taken_BFC07EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07C5Cu); - goto label_BFC07C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EC8u); - } -label_BFC07EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07EC8: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ECCu); -#endif - /* 0xBFC07ECC: 8C84B9C4 lw $a0, -17980($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07ECCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07ED0: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07ED8u; /* jal link before delay slot */ - psx_delay_BFC07ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07ED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07ED4u); -#endif - if (psx_delay_BFC07ED0) { - psx_delay_BFC07ED0 = 0; - cpu->gpr[31] = 0xBFC07ED8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC07ED8: 14510006 bne $v0, $s1, 0xBFC07EF4 */ - uint32_t psx_brA_BFC07ED8 = cpu->gpr[2]; uint32_t psx_brB_BFC07ED8 = cpu->gpr[17]; - psx_taken_BFC07ED8 = (psx_brA_BFC07ED8 != psx_brB_BFC07ED8); - psx_delay_BFC07ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07EDCu); -#endif - if (psx_delay_BFC07ED8) { - psx_delay_BFC07ED8 = 0; - if (psx_taken_BFC07ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EF4u); - goto label_BFC07EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EE0u); - } -label_BFC07EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07EE0: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07EE4: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07EECu; /* jal link before delay slot */ - psx_delay_BFC07EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07EE8: 24050017 addiu $a1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24050017u, cpu->gpr[5], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EE8u); -#endif - if (psx_delay_BFC07EE4) { - psx_delay_BFC07EE4 = 0; - cpu->gpr[31] = 0xBFC07EECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EEC: 10000004 beq $zero, $zero, 0xBFC07F00 */ - uint32_t psx_brA_BFC07EEC = cpu->gpr[0]; uint32_t psx_brB_BFC07EEC = cpu->gpr[0]; - psx_taken_BFC07EEC = (psx_brA_BFC07EEC == psx_brB_BFC07EEC); - psx_delay_BFC07EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07EF0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EF0u); -#endif - if (psx_delay_BFC07EEC) { - psx_delay_BFC07EEC = 0; - if (psx_taken_BFC07EEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F00u); - goto label_BFC07F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EF4u); - } -label_BFC07EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC07EF4: 1E00FFE1 bgtz $s0, 0xBFC07E7C */ - uint32_t psx_brA_BFC07EF4 = cpu->gpr[16]; - psx_taken_BFC07EF4 = ((int32_t)psx_brA_BFC07EF4 > 0); - psx_delay_BFC07EF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07EF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07EF8u); -#endif - if (psx_delay_BFC07EF4) { - psx_delay_BFC07EF4 = 0; - if (psx_taken_BFC07EF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07E7Cu); - goto label_BFC07E7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07EFCu); - } -label_BFC07EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC07EFC: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07EFCu); -#endif -label_BFC07F00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F00u); -#endif - /* 0xBFC07F00: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F04u); -#endif - /* 0xBFC07F04: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F04u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F08u); -#endif - /* 0xBFC07F08: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F08u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F0Cu); -#endif - /* 0xBFC07F0C: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F0Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F10u); -#endif - /* 0xBFC07F10: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F10u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F14u); -#endif - /* 0xBFC07F14: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F14u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F18u); -#endif - /* 0xBFC07F18: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F18u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F1Cu); -#endif - /* 0xBFC07F1C: 8FB60030 lw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F1Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC07F20: 03E00008 jr $ra */ - psx_delay_BFC07F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07F24: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F24u); -#endif - if (psx_delay_BFC07F20) { - psx_delay_BFC07F20 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC07F28(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC07F28u); - int psx_delay_BFC07F3C = 0; - int psx_delay_BFC07F48 = 0; - int psx_taken_BFC07F48 = 0; - int psx_delay_BFC07F54 = 0; - int psx_taken_BFC07F54 = 0; - int psx_delay_BFC07F5C = 0; - int psx_delay_BFC07F68 = 0; - int psx_taken_BFC07F68 = 0; - int psx_delay_BFC07F70 = 0; - int psx_taken_BFC07F70 = 0; - int psx_delay_BFC07F7C = 0; - int psx_delay_BFC07F84 = 0; - int psx_taken_BFC07F84 = 0; - int psx_delay_BFC07F8C = 0; - int psx_taken_BFC07F8C = 0; - int psx_delay_BFC07FA4 = 0; - int psx_delay_BFC07FB0 = 0; - int psx_taken_BFC07FB0 = 0; - int psx_delay_BFC07FBC = 0; - int psx_taken_BFC07FBC = 0; - int psx_delay_BFC07FCC = 0; - int psx_delay_BFC07FD8 = 0; - int psx_taken_BFC07FD8 = 0; - int psx_delay_BFC07FE4 = 0; - int psx_delay_BFC07FF0 = 0; - int psx_taken_BFC07FF0 = 0; - int psx_delay_BFC07FF8 = 0; - int psx_taken_BFC07FF8 = 0; - int psx_delay_BFC08018 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC07F44u: goto label_BFC07F44; - case 0xBFC07F50u: goto label_BFC07F50; - case 0xBFC07F5Cu: goto label_BFC07F5C; - case 0xBFC07F64u: goto label_BFC07F64; - case 0xBFC07F70u: goto label_BFC07F70; - case 0xBFC07F78u: goto label_BFC07F78; - case 0xBFC07F84u: goto label_BFC07F84; - case 0xBFC07F8Cu: goto label_BFC07F8C; - case 0xBFC07F94u: goto label_BFC07F94; - case 0xBFC07F9Cu: goto label_BFC07F9C; - case 0xBFC07FACu: goto label_BFC07FAC; - case 0xBFC07FB8u: goto label_BFC07FB8; - case 0xBFC07FC4u: goto label_BFC07FC4; - case 0xBFC07FD4u: goto label_BFC07FD4; - case 0xBFC07FE0u: goto label_BFC07FE0; - case 0xBFC07FECu: goto label_BFC07FEC; - case 0xBFC07FF8u: goto label_BFC07FF8; - case 0xBFC08000u: goto label_BFC08000; - case 0xBFC0800Cu: goto label_BFC0800C; - case 0xBFC08010u: goto label_BFC08010; - default: break; - } - } -label_BFC07F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC07F28: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC07F2C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F2Cu); return; } g_debug_last_store_pc = 0xBFC07F2Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC07F30: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F30u); return; } g_debug_last_store_pc = 0xBFC07F30u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC07F34: A3A00034 sb $zero, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07F34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (52)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC07F38: 24110009 addiu $s1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24110009u, cpu->gpr[17], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07F3C: 0FF03710 jal 0xBFC0DC40 */ - cpu->gpr[31] = 0xBFC07F44u; /* jal link before delay slot */ - psx_delay_BFC07F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07F40: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F40u); -#endif - if (psx_delay_BFC07F3C) { - psx_delay_BFC07F3C = 0; - cpu->gpr[31] = 0xBFC07F44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC40u); - cpu->pc = 0xBFC0DC40u; return; - } -label_BFC07F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC07F44: 304E00FF andi $t6, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC07F48: 15C00009 bne $t6, $zero, 0xBFC07F70 */ - uint32_t psx_brA_BFC07F48 = cpu->gpr[14]; uint32_t psx_brB_BFC07F48 = cpu->gpr[0]; - psx_taken_BFC07F48 = (psx_brA_BFC07F48 != psx_brB_BFC07F48); - psx_delay_BFC07F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07F4Cu); -#endif - if (psx_delay_BFC07F48) { - psx_delay_BFC07F48 = 0; - if (psx_taken_BFC07F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F70u); - goto label_BFC07F70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F50u); - } -label_BFC07F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07F50: 2631FFFF addiu $s1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2631FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07F54: 1A200006 blez $s1, 0xBFC07F70 */ - uint32_t psx_brA_BFC07F54 = cpu->gpr[17]; - psx_taken_BFC07F54 = ((int32_t)psx_brA_BFC07F54 <= 0); - psx_delay_BFC07F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07F58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07F58u); -#endif - if (psx_delay_BFC07F54) { - psx_delay_BFC07F54 = 0; - if (psx_taken_BFC07F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F70u); - goto label_BFC07F70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F5Cu); - } -label_BFC07F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07F5C: 0FF03710 jal 0xBFC0DC40 */ - cpu->gpr[31] = 0xBFC07F64u; /* jal link before delay slot */ - psx_delay_BFC07F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC07F60: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F60u); -#endif - if (psx_delay_BFC07F5C) { - psx_delay_BFC07F5C = 0; - cpu->gpr[31] = 0xBFC07F64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC40u); - cpu->pc = 0xBFC0DC40u; return; - } -label_BFC07F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC07F64: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC07F68: 11E0FFF9 beq $t7, $zero, 0xBFC07F50 */ - uint32_t psx_brA_BFC07F68 = cpu->gpr[15]; uint32_t psx_brB_BFC07F68 = cpu->gpr[0]; - psx_taken_BFC07F68 = (psx_brA_BFC07F68 == psx_brB_BFC07F68); - psx_delay_BFC07F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07F6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07F6Cu); -#endif - if (psx_delay_BFC07F68) { - psx_delay_BFC07F68 = 0; - if (psx_taken_BFC07F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F50u); - goto label_BFC07F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F70u); - } -label_BFC07F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07F70: 1E200006 bgtz $s1, 0xBFC07F8C */ - uint32_t psx_brA_BFC07F70 = cpu->gpr[17]; - psx_taken_BFC07F70 = ((int32_t)psx_brA_BFC07F70 > 0); - psx_delay_BFC07F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07F74u); -#endif - if (psx_delay_BFC07F70) { - psx_delay_BFC07F70 = 0; - if (psx_taken_BFC07F70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F8Cu); - goto label_BFC07F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F78u); - } -label_BFC07F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07F78: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07F7C: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07F84u; /* jal link before delay slot */ - psx_delay_BFC07F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07F80: 2405001F addiu $a1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2405001Fu, cpu->gpr[5], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F80u); -#endif - if (psx_delay_BFC07F7C) { - psx_delay_BFC07F7C = 0; - cpu->gpr[31] = 0xBFC07F84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07F84: 10000022 beq $zero, $zero, 0xBFC08010 */ - uint32_t psx_brA_BFC07F84 = cpu->gpr[0]; uint32_t psx_brB_BFC07F84 = cpu->gpr[0]; - psx_taken_BFC07F84 = (psx_brA_BFC07F84 == psx_brB_BFC07F84); - psx_delay_BFC07F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07F88: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F88u); -#endif - if (psx_delay_BFC07F84) { - psx_delay_BFC07F84 = 0; - if (psx_taken_BFC07F84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08010u); - goto label_BFC08010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F8Cu); - } -label_BFC07F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07F8C: 1A20001F blez $s1, 0xBFC0800C */ - uint32_t psx_brA_BFC07F8C = cpu->gpr[17]; - psx_taken_BFC07F8C = ((int32_t)psx_brA_BFC07F8C <= 0); - psx_delay_BFC07F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F90u); -#endif - /* 0xBFC07F90: 93A20034 lbu $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (52)), 2, 0x20000000u); - PGXP_LOAD(0x93A20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F90u); -#endif - if (psx_delay_BFC07F8C) { - psx_delay_BFC07F8C = 0; - if (psx_taken_BFC07F8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0800Cu); - goto label_BFC0800C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F94u); - } -label_BFC07F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC07F94: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F94u); return; } g_debug_last_store_pc = 0xBFC07F94u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC07F98: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07F98u); -#endif -label_BFC07F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07F9C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FA0u); -#endif - /* 0xBFC07FA0: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07FA0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07FA4: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07FACu; /* jal link before delay slot */ - psx_delay_BFC07FA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07FA8u); -#endif - if (psx_delay_BFC07FA4) { - psx_delay_BFC07FA4 = 0; - cpu->gpr[31] = 0xBFC07FACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC07FAC: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC07FB0: 16180004 bne $s0, $t8, 0xBFC07FC4 */ - uint32_t psx_brA_BFC07FB0 = cpu->gpr[16]; uint32_t psx_brB_BFC07FB0 = cpu->gpr[24]; - psx_taken_BFC07FB0 = (psx_brA_BFC07FB0 != psx_brB_BFC07FB0); - psx_delay_BFC07FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07FB4u); -#endif - if (psx_delay_BFC07FB0) { - psx_delay_BFC07FB0 = 0; - if (psx_taken_BFC07FB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FC4u); - goto label_BFC07FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FB8u); - } -label_BFC07FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FB8u); -#endif - /* 0xBFC07FB8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07FB8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FBC: 10000013 beq $zero, $zero, 0xBFC0800C */ - uint32_t psx_brA_BFC07FBC = cpu->gpr[0]; uint32_t psx_brB_BFC07FBC = cpu->gpr[0]; - psx_taken_BFC07FBC = (psx_brA_BFC07FBC == psx_brB_BFC07FBC); - psx_delay_BFC07FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FC0u); -#endif - /* 0xBFC07FC0: 93A20034 lbu $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (52)), 2, 0x20000000u); - PGXP_LOAD(0x93A20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FC0u); -#endif - if (psx_delay_BFC07FBC) { - psx_delay_BFC07FBC = 0; - if (psx_taken_BFC07FBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0800Cu); - goto label_BFC0800C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FC4u); - } -label_BFC07FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC07FC4: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC07FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FC8u); -#endif - /* 0xBFC07FC8: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07FC8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07FCC: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC07FD4u; /* jal link before delay slot */ - psx_delay_BFC07FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07FD0u); -#endif - if (psx_delay_BFC07FCC) { - psx_delay_BFC07FCC = 0; - cpu->gpr[31] = 0xBFC07FD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC07FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC07FD4: 305900FF andi $t9, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC07FD8: 16190007 bne $s0, $t9, 0xBFC07FF8 */ - uint32_t psx_brA_BFC07FD8 = cpu->gpr[16]; uint32_t psx_brB_BFC07FD8 = cpu->gpr[25]; - psx_taken_BFC07FD8 = (psx_brA_BFC07FD8 != psx_brB_BFC07FD8); - psx_delay_BFC07FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07FDCu); -#endif - if (psx_delay_BFC07FD8) { - psx_delay_BFC07FD8 = 0; - if (psx_taken_BFC07FD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FF8u); - goto label_BFC07FF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FE0u); - } -label_BFC07FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC07FE0: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC07FE4: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC07FECu; /* jal link before delay slot */ - psx_delay_BFC07FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC07FE8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FE8u); -#endif - if (psx_delay_BFC07FE4) { - psx_delay_BFC07FE4 = 0; - cpu->gpr[31] = 0xBFC07FECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC07FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FECu); -#endif - /* 0xBFC07FEC: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07FECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FF0: 10000007 beq $zero, $zero, 0xBFC08010 */ - uint32_t psx_brA_BFC07FF0 = cpu->gpr[0]; uint32_t psx_brB_BFC07FF0 = cpu->gpr[0]; - psx_taken_BFC07FF0 = (psx_brA_BFC07FF0 == psx_brB_BFC07FF0); - psx_delay_BFC07FF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC07FF4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC07FF4u); -#endif - if (psx_delay_BFC07FF0) { - psx_delay_BFC07FF0 = 0; - if (psx_taken_BFC07FF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08010u); - goto label_BFC08010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07FF8u); - } -label_BFC07FF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC07FF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC07FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC07FF8: 1E20FFE8 bgtz $s1, 0xBFC07F9C */ - uint32_t psx_brA_BFC07FF8 = cpu->gpr[17]; - psx_taken_BFC07FF8 = ((int32_t)psx_brA_BFC07FF8 > 0); - psx_delay_BFC07FF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC07FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC07FFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC07FFCu); -#endif - if (psx_delay_BFC07FF8) { - psx_delay_BFC07FF8 = 0; - if (psx_taken_BFC07FF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F9Cu); - goto label_BFC07F9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08000u); - } -label_BFC08000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08000u); -#endif - /* 0xBFC08000: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08000u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08004: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08008u); -#endif - /* 0xBFC08008: 93A20034 lbu $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (52)), 2, 0x20000000u); - PGXP_LOAD(0x93A20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08008u); -#endif -label_BFC0800C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0800Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0800Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0800Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0800C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0800Cu); -#endif -label_BFC08010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08010u); -#endif - /* 0xBFC08010: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08010u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08014u); -#endif - /* 0xBFC08014: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08014u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08018: 03E00008 jr $ra */ - psx_delay_BFC08018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0801Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0801C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0801Cu); -#endif - if (psx_delay_BFC08018) { - psx_delay_BFC08018 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08020(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08020u); - int psx_delay_BFC08028 = 0; - int psx_taken_BFC08028 = 0; - int psx_delay_BFC08030 = 0; - int psx_taken_BFC08030 = 0; - int psx_delay_BFC08044 = 0; - int psx_taken_BFC08044 = 0; - int psx_delay_BFC0804C = 0; - int psx_taken_BFC0804C = 0; - int psx_delay_BFC08054 = 0; - int psx_delay_BFC08064 = 0; - int psx_taken_BFC08064 = 0; - int psx_delay_BFC08074 = 0; - int psx_taken_BFC08074 = 0; - int psx_delay_BFC0807C = 0; - int psx_taken_BFC0807C = 0; - int psx_delay_BFC08084 = 0; - int psx_delay_BFC08090 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08030u: goto label_BFC08030; - case 0xBFC08038u: goto label_BFC08038; - case 0xBFC0803Cu: goto label_BFC0803C; - case 0xBFC0804Cu: goto label_BFC0804C; - case 0xBFC08054u: goto label_BFC08054; - case 0xBFC0805Cu: goto label_BFC0805C; - case 0xBFC0806Cu: goto label_BFC0806C; - case 0xBFC0807Cu: goto label_BFC0807C; - case 0xBFC08084u: goto label_BFC08084; - case 0xBFC08090u: goto label_BFC08090; - default: break; - } - } -label_BFC08020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08020u); -#endif - /* 0xBFC08020: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08028: 14400004 bne $v0, $zero, 0xBFC0803C */ - uint32_t psx_brA_BFC08028 = cpu->gpr[2]; uint32_t psx_brB_BFC08028 = cpu->gpr[0]; - psx_taken_BFC08028 = (psx_brA_BFC08028 != psx_brB_BFC08028); - psx_delay_BFC08028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0802Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0802C: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0802Cu); -#endif - if (psx_delay_BFC08028) { - psx_delay_BFC08028 = 0; - if (psx_taken_BFC08028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0803Cu); - goto label_BFC0803C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08030u); - } -label_BFC08030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08030: 1000000E beq $zero, $zero, 0xBFC0806C */ - uint32_t psx_brA_BFC08030 = cpu->gpr[0]; uint32_t psx_brB_BFC08030 = cpu->gpr[0]; - psx_taken_BFC08030 = (psx_brA_BFC08030 == psx_brB_BFC08030); - psx_delay_BFC08030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08034: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08034u); -#endif - if (psx_delay_BFC08030) { - psx_delay_BFC08030 = 0; - if (psx_taken_BFC08030) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0806Cu); - goto label_BFC0806C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08038u); - } -label_BFC08038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08038: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08038u); -#endif -label_BFC0803C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0803Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0803Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0803Cu); -#endif - /* 0xBFC0803C: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0803Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC08044: 10C30005 beq $a2, $v1, 0xBFC0805C */ - uint32_t psx_brA_BFC08044 = cpu->gpr[6]; uint32_t psx_brB_BFC08044 = cpu->gpr[3]; - psx_taken_BFC08044 = (psx_brA_BFC08044 == psx_brB_BFC08044); - psx_delay_BFC08044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08048u); -#endif - if (psx_delay_BFC08044) { - psx_delay_BFC08044 = 0; - if (psx_taken_BFC08044) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0805Cu); - goto label_BFC0805C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0804Cu); - } -label_BFC0804C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0804Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0804Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0804Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0804C: 10620003 beq $v1, $v0, 0xBFC0805C */ - uint32_t psx_brA_BFC0804C = cpu->gpr[3]; uint32_t psx_brB_BFC0804C = cpu->gpr[2]; - psx_taken_BFC0804C = (psx_brA_BFC0804C == psx_brB_BFC0804C); - psx_delay_BFC0804C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08050u); -#endif - if (psx_delay_BFC0804C) { - psx_delay_BFC0804C = 0; - if (psx_taken_BFC0804C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0805Cu); - goto label_BFC0805C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08054u); - } -label_BFC08054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08054: 03E00008 jr $ra */ - psx_delay_BFC08054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08058: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08058u); -#endif - if (psx_delay_BFC08054) { - psx_delay_BFC08054 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0805C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0805Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0805Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0805Cu); -#endif - /* 0xBFC0805C: 80820001 lb $v0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 2, 0x10u); - PGXP_LOAD(0x80820001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0805Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC08060: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08064: 1440FFF5 bne $v0, $zero, 0xBFC0803C */ - uint32_t psx_brA_BFC08064 = cpu->gpr[2]; uint32_t psx_brB_BFC08064 = cpu->gpr[0]; - psx_taken_BFC08064 = (psx_brA_BFC08064 != psx_brB_BFC08064); - psx_delay_BFC08064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08068: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08068u); -#endif - if (psx_delay_BFC08064) { - psx_delay_BFC08064 = 0; - if (psx_taken_BFC08064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0803Cu); - goto label_BFC0803C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0806Cu); - } -label_BFC0806C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0806Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0806Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0806Cu); -#endif - /* 0xBFC0806C: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0806Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08074: 10620003 beq $v1, $v0, 0xBFC08084 */ - uint32_t psx_brA_BFC08074 = cpu->gpr[3]; uint32_t psx_brB_BFC08074 = cpu->gpr[2]; - psx_taken_BFC08074 = (psx_brA_BFC08074 == psx_brB_BFC08074); - psx_delay_BFC08074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08078u); -#endif - if (psx_delay_BFC08074) { - psx_delay_BFC08074 = 0; - if (psx_taken_BFC08074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08084u); - goto label_BFC08084; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0807Cu); - } -label_BFC0807C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0807Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0807Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0807Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC0807C: 14C30004 bne $a2, $v1, 0xBFC08090 */ - uint32_t psx_brA_BFC0807C = cpu->gpr[6]; uint32_t psx_brB_BFC0807C = cpu->gpr[3]; - psx_taken_BFC0807C = (psx_brA_BFC0807C != psx_brB_BFC0807C); - psx_delay_BFC0807C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08080: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08080u); -#endif - if (psx_delay_BFC0807C) { - psx_delay_BFC0807C = 0; - if (psx_taken_BFC0807C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08090u); - goto label_BFC08090; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08084u); - } -label_BFC08084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08084: 03E00008 jr $ra */ - psx_delay_BFC08084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08088: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08088u); -#endif - if (psx_delay_BFC08084) { - psx_delay_BFC08084 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC08090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08090: 03E00008 jr $ra */ - psx_delay_BFC08090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08094u); -#endif - if (psx_delay_BFC08090) { - psx_delay_BFC08090 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08098(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08098u); - int psx_delay_BFC080A8 = 0; - int psx_delay_BFC080B4 = 0; - int psx_taken_BFC080B4 = 0; - int psx_delay_BFC080C4 = 0; - int psx_delay_BFC080D0 = 0; - int psx_taken_BFC080D0 = 0; - int psx_delay_BFC080E4 = 0; - int psx_taken_BFC080E4 = 0; - int psx_delay_BFC080F8 = 0; - int psx_taken_BFC080F8 = 0; - int psx_delay_BFC08114 = 0; - int psx_taken_BFC08114 = 0; - int psx_delay_BFC08128 = 0; - int psx_taken_BFC08128 = 0; - int psx_delay_BFC08144 = 0; - int psx_taken_BFC08144 = 0; - int psx_delay_BFC0814C = 0; - int psx_taken_BFC0814C = 0; - int psx_delay_BFC0816C = 0; - int psx_delay_BFC08178 = 0; - int psx_taken_BFC08178 = 0; - int psx_delay_BFC0818C = 0; - int psx_taken_BFC0818C = 0; - int psx_delay_BFC081E0 = 0; - int psx_delay_BFC081F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC080B0u: goto label_BFC080B0; - case 0xBFC080BCu: goto label_BFC080BC; - case 0xBFC080CCu: goto label_BFC080CC; - case 0xBFC080D8u: goto label_BFC080D8; - case 0xBFC080ECu: goto label_BFC080EC; - case 0xBFC08100u: goto label_BFC08100; - case 0xBFC0811Cu: goto label_BFC0811C; - case 0xBFC08130u: goto label_BFC08130; - case 0xBFC0814Cu: goto label_BFC0814C; - case 0xBFC08154u: goto label_BFC08154; - case 0xBFC08174u: goto label_BFC08174; - case 0xBFC08180u: goto label_BFC08180; - case 0xBFC08194u: goto label_BFC08194; - case 0xBFC081E8u: goto label_BFC081E8; - case 0xBFC081ECu: goto label_BFC081EC; - default: break; - } - } -label_BFC08098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08098: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0809Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0809C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0809Cu); return; } g_debug_last_store_pc = 0xBFC0809Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0809Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC080A0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080A0u); return; } g_debug_last_store_pc = 0xBFC080A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC080A4: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC080A8: 0FF01FCA jal 0xBFC07F28 */ - cpu->gpr[31] = 0xBFC080B0u; /* jal link before delay slot */ - psx_delay_BFC080A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC080AC: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080ACu); return; } g_debug_last_store_pc = 0xBFC080ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080ACu); -#endif - if (psx_delay_BFC080A8) { - psx_delay_BFC080A8 = 0; - cpu->gpr[31] = 0xBFC080B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07F28u); - cpu->pc = 0xBFC07F28u; return; - } -label_BFC080B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC080B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC080B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC080B0: 304E0010 andi $t6, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304E0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC080B4: 11C00019 beq $t6, $zero, 0xBFC0811C */ - uint32_t psx_brA_BFC080B4 = cpu->gpr[14]; uint32_t psx_brB_BFC080B4 = cpu->gpr[0]; - psx_taken_BFC080B4 = (psx_brA_BFC080B4 == psx_brB_BFC080B4); - psx_delay_BFC080B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC080B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC080B8u); -#endif - if (psx_delay_BFC080B4) { - psx_delay_BFC080B4 = 0; - if (psx_taken_BFC080B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0811Cu); - goto label_BFC0811C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC080BCu); - } -label_BFC080BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC080BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC080BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC080BC: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC080BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080C0u); -#endif - /* 0xBFC080C0: 8C639D7C lw $v1, -25220($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639D7Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC080C4: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC080CCu; /* jal link before delay slot */ - psx_delay_BFC080C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC080C8: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080C8u); return; } g_debug_last_store_pc = 0xBFC080C8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080C8u); -#endif - if (psx_delay_BFC080C4) { - psx_delay_BFC080C4 = 0; - cpu->gpr[31] = 0xBFC080CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC080CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC080CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC080CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080CCu); -#endif - /* 0xBFC080CC: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC080D0: 14400006 bne $v0, $zero, 0xBFC080EC */ - uint32_t psx_brA_BFC080D0 = cpu->gpr[2]; uint32_t psx_brB_BFC080D0 = cpu->gpr[0]; - psx_taken_BFC080D0 = (psx_brA_BFC080D0 != psx_brB_BFC080D0); - psx_delay_BFC080D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC080D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC080D4u); -#endif - if (psx_delay_BFC080D0) { - psx_delay_BFC080D0 = 0; - if (psx_taken_BFC080D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC080ECu); - goto label_BFC080EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC080D8u); - } -label_BFC080D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC080D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC080D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC080D8: 240F0010 addiu $t7, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC080DC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC080DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC080E0: AC2FB9B4 sw $t7, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080E0u); return; } g_debug_last_store_pc = 0xBFC080E0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FB9B4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC080E4: 10000041 beq $zero, $zero, 0xBFC081EC */ - uint32_t psx_brA_BFC080E4 = cpu->gpr[0]; uint32_t psx_brB_BFC080E4 = cpu->gpr[0]; - psx_taken_BFC080E4 = (psx_brA_BFC080E4 == psx_brB_BFC080E4); - psx_delay_BFC080E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC080E8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080E8u); -#endif - if (psx_delay_BFC080E4) { - psx_delay_BFC080E4 = 0; - if (psx_taken_BFC080E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC081ECu); - goto label_BFC081EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC080ECu); - } -label_BFC080EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC080ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC080ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC080EC: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC080ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080F0u); -#endif - /* 0xBFC080F0: 8F189D7C lw $t8, -25220($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080F0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189D7Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC080F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC080F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC080F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC080F8: 10780008 beq $v1, $t8, 0xBFC0811C */ - uint32_t psx_brA_BFC080F8 = cpu->gpr[3]; uint32_t psx_brB_BFC080F8 = cpu->gpr[24]; - psx_taken_BFC080F8 = (psx_brA_BFC080F8 == psx_brB_BFC080F8); - psx_delay_BFC080F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC080FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC080FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC080FCu); -#endif - if (psx_delay_BFC080F8) { - psx_delay_BFC080F8 = 0; - if (psx_taken_BFC080F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0811Cu); - goto label_BFC0811C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08100u); - } -label_BFC08100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC08100: 24190010 addiu $t9, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08104: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC08108: AC39B9B4 sw $t9, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08108u); return; } g_debug_last_store_pc = 0xBFC08108u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39B9B4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0810C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC08110: AC239D7C sw $v1, -25220($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08110u); return; } g_debug_last_store_pc = 0xBFC08110u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239D7Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08114: 10000035 beq $zero, $zero, 0xBFC081EC */ - uint32_t psx_brA_BFC08114 = cpu->gpr[0]; uint32_t psx_brB_BFC08114 = cpu->gpr[0]; - psx_taken_BFC08114 = (psx_brA_BFC08114 == psx_brB_BFC08114); - psx_delay_BFC08114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08118: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08118u); -#endif - if (psx_delay_BFC08114) { - psx_delay_BFC08114 = 0; - if (psx_taken_BFC08114) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC081ECu); - goto label_BFC081EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0811Cu); - } -label_BFC0811C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0811Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0811Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0811Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0811C: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0811Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08120u); -#endif - /* 0xBFC08120: 8D089E0C lw $t0, -25076($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08120u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E0Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC08128: 1500000A bne $t0, $zero, 0xBFC08154 */ - uint32_t psx_brA_BFC08128 = cpu->gpr[8]; uint32_t psx_brB_BFC08128 = cpu->gpr[0]; - psx_taken_BFC08128 = (psx_brA_BFC08128 != psx_brB_BFC08128); - psx_delay_BFC08128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0812Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0812C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0812Cu); -#endif - if (psx_delay_BFC08128) { - psx_delay_BFC08128 = 0; - if (psx_taken_BFC08128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08154u); - goto label_BFC08154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08130u); - } -label_BFC08130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC08130: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08134: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08138u); -#endif - /* 0xBFC08138: 8D4A9E14 lw $t2, -25068($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25068; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08138u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E14u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0813Cu); -#endif - /* 0xBFC0813C: 8D299E08 lw $t1, -25080($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0813Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E08u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0813Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC08144: 112A0003 beq $t1, $t2, 0xBFC08154 */ - uint32_t psx_brA_BFC08144 = cpu->gpr[9]; uint32_t psx_brB_BFC08144 = cpu->gpr[10]; - psx_taken_BFC08144 = (psx_brA_BFC08144 == psx_brB_BFC08144); - psx_delay_BFC08144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08148u); -#endif - if (psx_delay_BFC08144) { - psx_delay_BFC08144 = 0; - if (psx_taken_BFC08144) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08154u); - goto label_BFC08154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0814Cu); - } -label_BFC0814C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0814Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0814Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0814Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0814C: 10000027 beq $zero, $zero, 0xBFC081EC */ - uint32_t psx_brA_BFC0814C = cpu->gpr[0]; uint32_t psx_brB_BFC0814C = cpu->gpr[0]; - psx_taken_BFC0814C = (psx_brA_BFC0814C == psx_brB_BFC0814C); - psx_delay_BFC0814C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08150: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08150u); -#endif - if (psx_delay_BFC0814C) { - psx_delay_BFC0814C = 0; - if (psx_taken_BFC0814C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC081ECu); - goto label_BFC081EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08154u); - } -label_BFC08154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08154: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08158u); -#endif - /* 0xBFC08158: 8C849E10 lw $a0, -25072($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08158u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E10u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0815C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC08160: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08164: AC209E0C sw $zero, -25076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08164u); return; } g_debug_last_store_pc = 0xBFC08164u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E0Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC08168: 24A59E98 addiu $a1, $a1, -24936 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24936)); - PGXP_ALU(0x24A59E98u, cpu->gpr[5], _pgx1, 0xFFFF9E98u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0816Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0816C: 0FF020F3 jal 0xBFC083CC */ - cpu->gpr[31] = 0xBFC08174u; /* jal link before delay slot */ - psx_delay_BFC0816C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08170: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08170u); -#endif - if (psx_delay_BFC0816C) { - psx_delay_BFC0816C = 0; - cpu->gpr[31] = 0xBFC08174u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC083CCu); - cpu->pc = 0xBFC083CCu; return; - } -label_BFC08174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08174: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC08178: 14410006 bne $v0, $at, 0xBFC08194 */ - uint32_t psx_brA_BFC08178 = cpu->gpr[2]; uint32_t psx_brB_BFC08178 = cpu->gpr[1]; - psx_taken_BFC08178 = (psx_brA_BFC08178 != psx_brB_BFC08178); - psx_delay_BFC08178 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0817Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0817C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0817Cu); -#endif - if (psx_delay_BFC08178) { - psx_delay_BFC08178 = 0; - if (psx_taken_BFC08178) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08194u); - goto label_BFC08194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08180u); - } -label_BFC08180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC08180: 240B0002 addiu $t3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240B0002u, cpu->gpr[11], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08184: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC08188: AC2BB9B4 sw $t3, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08188u); return; } g_debug_last_store_pc = 0xBFC08188u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BB9B4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0818Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0818C: 10000017 beq $zero, $zero, 0xBFC081EC */ - uint32_t psx_brA_BFC0818C = cpu->gpr[0]; uint32_t psx_brB_BFC0818C = cpu->gpr[0]; - psx_taken_BFC0818C = (psx_brA_BFC0818C == psx_brB_BFC0818C); - psx_delay_BFC0818C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08190: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08190u); -#endif - if (psx_delay_BFC0818C) { - psx_delay_BFC0818C = 0; - if (psx_taken_BFC0818C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC081ECu); - goto label_BFC081EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08194u); - } -label_BFC08194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC08194: 00036080 sll $t4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08198: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC0819C: 01836023 subu $t4, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[3]; - PGXP_ALU(0x01836023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC081A0: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC081A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC081A4: AC239E10 sw $v1, -25072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081A4u); return; } g_debug_last_store_pc = 0xBFC081A4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E10u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC081A8: 25AD91F0 addiu $t5, $t5, -28176 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-28176)); - PGXP_ALU(0x25AD91F0u, cpu->gpr[13], _pgx1, 0xFFFF91F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC081AC: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC081B0: AE000014 sw $zero, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081B0u); return; } g_debug_last_store_pc = 0xBFC081B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC081B4: 018D1021 addu $v0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081B8u); -#endif - /* 0xBFC081B8: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC081BC: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC081C0: AE0E0020 sw $t6, 32($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081C0u); return; } g_debug_last_store_pc = 0xBFC081C0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE0E0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081C4u); -#endif - /* 0xBFC081C4: 8C4F0008 lw $t7, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081C4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC081C8: 0303C023 subu $t8, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[3]; - PGXP_ALU(0x0303C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC081CC: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC081CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC081D0: 273991FC addiu $t9, $t9, -28164 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-28164)); - PGXP_ALU(0x273991FCu, cpu->gpr[25], _pgx1, 0xFFFF91FCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC081D4: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC081D8: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC081DC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC081E0: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC081E8u; /* jal link before delay slot */ - psx_delay_BFC081E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC081E4: AE0F0018 sw $t7, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081E4u); return; } g_debug_last_store_pc = 0xBFC081E4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE0F0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081E4u); -#endif - if (psx_delay_BFC081E0) { - psx_delay_BFC081E0 = 0; - cpu->gpr[31] = 0xBFC081E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC081E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC081E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC081E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC081E8: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081E8u); -#endif -label_BFC081EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC081ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC081ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081ECu); -#endif - /* 0xBFC081EC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081F0u); -#endif - /* 0xBFC081F0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081F0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC081F4: 03E00008 jr $ra */ - psx_delay_BFC081F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC081F8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081F8u); -#endif - if (psx_delay_BFC081F4) { - psx_delay_BFC081F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC081FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC081FCu); - int psx_delay_BFC08210 = 0; - int psx_delay_BFC08218 = 0; - int psx_taken_BFC08218 = 0; - int psx_delay_BFC0822C = 0; - int psx_taken_BFC0822C = 0; - int psx_delay_BFC08248 = 0; - int psx_delay_BFC08250 = 0; - int psx_taken_BFC08250 = 0; - int psx_delay_BFC0826C = 0; - int psx_taken_BFC0826C = 0; - int psx_delay_BFC08274 = 0; - int psx_taken_BFC08274 = 0; - int psx_delay_BFC08288 = 0; - int psx_taken_BFC08288 = 0; - int psx_delay_BFC08290 = 0; - int psx_taken_BFC08290 = 0; - int psx_delay_BFC082A0 = 0; - int psx_taken_BFC082A0 = 0; - int psx_delay_BFC082AC = 0; - int psx_delay_BFC082C0 = 0; - int psx_taken_BFC082C0 = 0; - int psx_delay_BFC082D0 = 0; - int psx_taken_BFC082D0 = 0; - int psx_delay_BFC082E4 = 0; - int psx_taken_BFC082E4 = 0; - int psx_delay_BFC082F8 = 0; - int psx_taken_BFC082F8 = 0; - int psx_delay_BFC08324 = 0; - int psx_delay_BFC0834C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08218u: goto label_BFC08218; - case 0xBFC08220u: goto label_BFC08220; - case 0xBFC08234u: goto label_BFC08234; - case 0xBFC08250u: goto label_BFC08250; - case 0xBFC08258u: goto label_BFC08258; - case 0xBFC08264u: goto label_BFC08264; - case 0xBFC08274u: goto label_BFC08274; - case 0xBFC0827Cu: goto label_BFC0827C; - case 0xBFC08290u: goto label_BFC08290; - case 0xBFC08298u: goto label_BFC08298; - case 0xBFC082A0u: goto label_BFC082A0; - case 0xBFC082A8u: goto label_BFC082A8; - case 0xBFC082B4u: goto label_BFC082B4; - case 0xBFC082C8u: goto label_BFC082C8; - case 0xBFC082D8u: goto label_BFC082D8; - case 0xBFC082ECu: goto label_BFC082EC; - case 0xBFC082F0u: goto label_BFC082F0; - case 0xBFC08300u: goto label_BFC08300; - case 0xBFC08304u: goto label_BFC08304; - case 0xBFC0830Cu: goto label_BFC0830C; - case 0xBFC0832Cu: goto label_BFC0832C; - case 0xBFC08344u: goto label_BFC08344; - default: break; - } - } -label_BFC081FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC081FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC081FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC081FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC081FC: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC081FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC08200: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08200u); return; } g_debug_last_store_pc = 0xBFC08200u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC08204: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08204u); return; } g_debug_last_store_pc = 0xBFC08204u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC08208: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08208u); return; } g_debug_last_store_pc = 0xBFC08208u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0820Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0820C: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0820Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08210: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC08218u; /* jal link before delay slot */ - psx_delay_BFC08210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC08214: AFA60060 sw $a2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08214u); return; } g_debug_last_store_pc = 0xBFC08214u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60060u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08214u); -#endif - if (psx_delay_BFC08210) { - psx_delay_BFC08210 = 0; - cpu->gpr[31] = 0xBFC08218u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC08218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08218: 14400006 bne $v0, $zero, 0xBFC08234 */ - uint32_t psx_brA_BFC08218 = cpu->gpr[2]; uint32_t psx_brB_BFC08218 = cpu->gpr[0]; - psx_taken_BFC08218 = (psx_brA_BFC08218 != psx_brB_BFC08218); - psx_delay_BFC08218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0821Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0821C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0821Cu); -#endif - if (psx_delay_BFC08218) { - psx_delay_BFC08218 = 0; - if (psx_taken_BFC08218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08234u); - goto label_BFC08234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08220u); - } -label_BFC08220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC08220: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08224: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC08228: AC2EB9B4 sw $t6, -17996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08228u); return; } g_debug_last_store_pc = 0xBFC08228u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9B4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0822Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0822C: 10000045 beq $zero, $zero, 0xBFC08344 */ - uint32_t psx_brA_BFC0822C = cpu->gpr[0]; uint32_t psx_brB_BFC0822C = cpu->gpr[0]; - psx_taken_BFC0822C = (psx_brA_BFC0822C == psx_brB_BFC0822C); - psx_delay_BFC0822C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08230: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08230u); -#endif - if (psx_delay_BFC0822C) { - psx_delay_BFC0822C = 0; - if (psx_taken_BFC0822C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08344u); - goto label_BFC08344; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08234u); - } -label_BFC08234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC08234: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08234u); return; } g_debug_last_store_pc = 0xBFC08234u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC08238: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08238u); return; } g_debug_last_store_pc = 0xBFC08238u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0823Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0823C: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0823Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC08240: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08244: 26319E98 addiu $s1, $s1, -24936 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-24936)); - PGXP_ALU(0x26319E98u, cpu->gpr[17], _pgx1, 0xFFFF9E98u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08248: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC08250u; /* jal link before delay slot */ - psx_delay_BFC08248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0824Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0824C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0824Cu); -#endif - if (psx_delay_BFC08248) { - psx_delay_BFC08248 = 0; - cpu->gpr[31] = 0xBFC08250u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC08250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08250: 1440000A bne $v0, $zero, 0xBFC0827C */ - uint32_t psx_brA_BFC08250 = cpu->gpr[2]; uint32_t psx_brB_BFC08250 = cpu->gpr[0]; - psx_taken_BFC08250 = (psx_brA_BFC08250 != psx_brB_BFC08250); - psx_delay_BFC08250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08254u); -#endif - if (psx_delay_BFC08250) { - psx_delay_BFC08250 = 0; - if (psx_taken_BFC08250) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0827Cu); - goto label_BFC0827C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08258u); - } -label_BFC08258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08258: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0825Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0825C: 24639EAC addiu $v1, $v1, -24916 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24916)); - PGXP_ALU(0x24639EACu, cpu->gpr[3], _pgx1, 0xFFFF9EACu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0825Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08260: 2402003F addiu $v0, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2402003Fu, cpu->gpr[2], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08260u); -#endif -label_BFC08264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08264: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC08268: 0223082B sltu $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0826Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0826C: 1420FFFD bne $at, $zero, 0xBFC08264 */ - uint32_t psx_brA_BFC0826C = cpu->gpr[1]; uint32_t psx_brB_BFC0826C = cpu->gpr[0]; - psx_taken_BFC0826C = (psx_brA_BFC0826C != psx_brB_BFC0826C); - psx_delay_BFC0826C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC08270: A222FFFF sb $v0, -1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08270u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA222FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08270u); -#endif - if (psx_delay_BFC0826C) { - psx_delay_BFC0826C = 0; - if (psx_taken_BFC0826C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08264u); - goto label_BFC08264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08274u); - } -label_BFC08274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08274: 10000025 beq $zero, $zero, 0xBFC0830C */ - uint32_t psx_brA_BFC08274 = cpu->gpr[0]; uint32_t psx_brB_BFC08274 = cpu->gpr[0]; - psx_taken_BFC08274 = (psx_brA_BFC08274 == psx_brB_BFC08274); - psx_delay_BFC08274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC08278: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08278u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08278u); -#endif - if (psx_delay_BFC08274) { - psx_delay_BFC08274 = 0; - if (psx_taken_BFC08274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0830Cu); - goto label_BFC0830C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0827Cu); - } -label_BFC0827C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0827Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0827C: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0827Cu); return; } g_debug_last_store_pc = 0xBFC0827Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08280u); -#endif - /* 0xBFC08280: 820F0000 lb $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 15, 0x10000u); - PGXP_LOAD(0x820F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08284: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC08288: 15E00003 bne $t7, $zero, 0xBFC08298 */ - uint32_t psx_brA_BFC08288 = cpu->gpr[15]; uint32_t psx_brB_BFC08288 = cpu->gpr[0]; - psx_taken_BFC08288 = (psx_brA_BFC08288 != psx_brB_BFC08288); - psx_delay_BFC08288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0828Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0828C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0828Cu); -#endif - if (psx_delay_BFC08288) { - psx_delay_BFC08288 = 0; - if (psx_taken_BFC08288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08298u); - goto label_BFC08298; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08290u); - } -label_BFC08290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08290: 1000000D beq $zero, $zero, 0xBFC082C8 */ - uint32_t psx_brA_BFC08290 = cpu->gpr[0]; uint32_t psx_brB_BFC08290 = cpu->gpr[0]; - psx_taken_BFC08290 = (psx_brA_BFC08290 == psx_brB_BFC08290); - psx_delay_BFC08290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC08294: 2413002A addiu $s3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2413002Au, cpu->gpr[19], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08294u); -#endif - if (psx_delay_BFC08290) { - psx_delay_BFC08290 = 0; - if (psx_taken_BFC08290) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082C8u); - goto label_BFC082C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08298u); - } -label_BFC08298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08298u); -#endif - /* 0xBFC08298: 82500000 lb $s0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 16, 0x40000u); - PGXP_LOAD(0x82500000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0829Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0829C: 2413002A addiu $s3, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2413002Au, cpu->gpr[19], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0829Cu); -#endif -label_BFC082A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC082A0: 12700009 beq $s3, $s0, 0xBFC082C8 */ - uint32_t psx_brA_BFC082A0 = cpu->gpr[19]; uint32_t psx_brB_BFC082A0 = cpu->gpr[16]; - psx_taken_BFC082A0 = (psx_brA_BFC082A0 == psx_brB_BFC082A0); - psx_delay_BFC082A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC082A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC082A4u); -#endif - if (psx_delay_BFC082A0) { - psx_delay_BFC082A0 = 0; - if (psx_taken_BFC082A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082C8u); - goto label_BFC082C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082A8u); - } -label_BFC082A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC082A8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC082AC: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC082B4u; /* jal link before delay slot */ - psx_delay_BFC082AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC082B0: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082B0u); -#endif - if (psx_delay_BFC082AC) { - psx_delay_BFC082AC = 0; - cpu->gpr[31] = 0xBFC082B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC082B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC082B4: A2220000 sb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC082B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082B8u); -#endif - /* 0xBFC082B8: 82500000 lb $s0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 16, 0x40000u); - PGXP_LOAD(0x82500000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC082BC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC082C0: 1600FFF7 bne $s0, $zero, 0xBFC082A0 */ - uint32_t psx_brA_BFC082C0 = cpu->gpr[16]; uint32_t psx_brB_BFC082C0 = cpu->gpr[0]; - psx_taken_BFC082C0 = (psx_brA_BFC082C0 != psx_brB_BFC082C0); - psx_delay_BFC082C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC082C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC082C4u); -#endif - if (psx_delay_BFC082C0) { - psx_delay_BFC082C0 = 0; - if (psx_taken_BFC082C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082A0u); - goto label_BFC082A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082C8u); - } -label_BFC082C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082C8u); -#endif - /* 0xBFC082C8: 82580000 lb $t8, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 24, 0x40000u); - PGXP_LOAD(0x82580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC082CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC082CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC082D0: 1678000C bne $s3, $t8, 0xBFC08304 */ - uint32_t psx_brA_BFC082D0 = cpu->gpr[19]; uint32_t psx_brB_BFC082D0 = cpu->gpr[24]; - psx_taken_BFC082D0 = (psx_brA_BFC082D0 != psx_brB_BFC082D0); - psx_delay_BFC082D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082D4u); -#endif - /* 0xBFC082D4: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082D4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082D4u); -#endif - if (psx_delay_BFC082D0) { - psx_delay_BFC082D0 = 0; - if (psx_taken_BFC082D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08304u); - goto label_BFC08304; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082D8u); - } -label_BFC082D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC082D8: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC082D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC082DC: 24639EAC addiu $v1, $v1, -24916 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24916)); - PGXP_ALU(0x24639EACu, cpu->gpr[3], _pgx1, 0xFFFF9EACu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC082E0: 0223082B sltu $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC082E4: 10200007 beq $at, $zero, 0xBFC08304 */ - uint32_t psx_brA_BFC082E4 = cpu->gpr[1]; uint32_t psx_brB_BFC082E4 = cpu->gpr[0]; - psx_taken_BFC082E4 = (psx_brA_BFC082E4 == psx_brB_BFC082E4); - psx_delay_BFC082E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082E8u); -#endif - /* 0xBFC082E8: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082E8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082E8u); -#endif - if (psx_delay_BFC082E4) { - psx_delay_BFC082E4 = 0; - if (psx_taken_BFC082E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08304u); - goto label_BFC08304; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082ECu); - } -label_BFC082EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC082EC: 2402003F addiu $v0, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2402003Fu, cpu->gpr[2], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082ECu); -#endif -label_BFC082F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC082F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC082F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC082F0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC082F4: 0223082B sltu $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC082F8: 1420FFFD bne $at, $zero, 0xBFC082F0 */ - uint32_t psx_brA_BFC082F8 = cpu->gpr[1]; uint32_t psx_brB_BFC082F8 = cpu->gpr[0]; - psx_taken_BFC082F8 = (psx_brA_BFC082F8 != psx_brB_BFC082F8); - psx_delay_BFC082F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC082FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC082FC: A222FFFF sb $v0, -1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC082FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA222FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC082FCu); -#endif - if (psx_delay_BFC082F8) { - psx_delay_BFC082F8 = 0; - if (psx_taken_BFC082F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC082F0u); - goto label_BFC082F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08300u); - } -label_BFC08300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08300u); -#endif - /* 0xBFC08300: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08300u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08300u); -#endif -label_BFC08304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC08308: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08308u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08308u); -#endif -label_BFC0830C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0830Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0830Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0830Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0830C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0830Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08310: AC209E10 sw $zero, -25072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08310u); return; } g_debug_last_store_pc = 0xBFC08310u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E10u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08314: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC08318: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0831Cu); -#endif - /* 0xBFC0831C: 8FA50060 lw $a1, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0831Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50060u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0831Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08320u); -#endif - /* 0xBFC08320: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08320u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08324: 0FF02026 jal 0xBFC08098 */ - cpu->gpr[31] = 0xBFC0832Cu; /* jal link before delay slot */ - psx_delay_BFC08324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC08328: AC399E0C sw $t9, -25076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08328u); return; } g_debug_last_store_pc = 0xBFC08328u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E0Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08328u); -#endif - if (psx_delay_BFC08324) { - psx_delay_BFC08324 = 0; - cpu->gpr[31] = 0xBFC0832Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08098u); - cpu->pc = 0xBFC08098u; return; - } -label_BFC0832C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0832Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0832C: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08330u); -#endif - /* 0xBFC08330: 8D089E08 lw $t0, -25080($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08330u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E08u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08334: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08338u); -#endif - /* 0xBFC08338: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08338u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0833Cu); -#endif - /* 0xBFC0833C: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0833Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0833Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC08340: AC289E14 sw $t0, -25068($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25068; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08340u); return; } g_debug_last_store_pc = 0xBFC08340u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E14u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08340u); -#endif -label_BFC08344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08344u); -#endif - /* 0xBFC08344: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08344u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08348u); -#endif - /* 0xBFC08348: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08348u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0834Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0834C: 03E00008 jr $ra */ - psx_delay_BFC0834C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08350: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08350u); -#endif - if (psx_delay_BFC0834C) { - psx_delay_BFC0834C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08354(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08354u); - int psx_delay_BFC08374 = 0; - int psx_taken_BFC08374 = 0; - int psx_delay_BFC0838C = 0; - int psx_delay_BFC083A0 = 0; - int psx_taken_BFC083A0 = 0; - int psx_delay_BFC083B0 = 0; - int psx_delay_BFC083C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0837Cu: goto label_BFC0837C; - case 0xBFC08388u: goto label_BFC08388; - case 0xBFC08394u: goto label_BFC08394; - case 0xBFC083A8u: goto label_BFC083A8; - case 0xBFC083B0u: goto label_BFC083B0; - case 0xBFC083B8u: goto label_BFC083B8; - default: break; - } - } -label_BFC08354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08354: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC08358: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08358u); return; } g_debug_last_store_pc = 0xBFC08358u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0835Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0835C: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0835Cu); return; } g_debug_last_store_pc = 0xBFC0835Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0835Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC08360: AFB10014 sw $s1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08360u); return; } g_debug_last_store_pc = 0xBFC08360u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC08364: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08364u); return; } g_debug_last_store_pc = 0xBFC08364u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08368u); -#endif - /* 0xBFC08368: 80AE0000 lb $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x80AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0836Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0836C: 3C12A001 lui $s2, 0xA001 */ - cpu->gpr[18] = 0xA0010000u; - PGXP_ALU(0x3C12A001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0836Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC08370: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC08374: 11C0000E beq $t6, $zero, 0xBFC083B0 */ - uint32_t psx_brA_BFC08374 = cpu->gpr[14]; uint32_t psx_brB_BFC08374 = cpu->gpr[0]; - psx_taken_BFC08374 = (psx_brA_BFC08374 == psx_brB_BFC08374); - psx_delay_BFC08374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC08378: 26529D80 addiu $s2, $s2, -25216 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-25216)); - PGXP_ALU(0x26529D80u, cpu->gpr[18], _pgx1, 0xFFFF9D80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08378u); -#endif - if (psx_delay_BFC08374) { - psx_delay_BFC08374 = 0; - if (psx_taken_BFC08374) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC083B0u); - goto label_BFC083B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0837Cu); - } -label_BFC0837C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0837Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0837C: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0837Cu); return; } g_debug_last_store_pc = 0xBFC0837Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08380u); -#endif - /* 0xBFC08380: 82300000 lb $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 16, 0x20000u); - PGXP_LOAD(0x82300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08384u); -#endif -label_BFC08388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC08388: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0838Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0838C: 0FF00BA8 jal 0xBFC02EA0 */ - cpu->gpr[31] = 0xBFC08394u; /* jal link before delay slot */ - psx_delay_BFC0838C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08390: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08390u); -#endif - if (psx_delay_BFC0838C) { - psx_delay_BFC0838C = 0; - cpu->gpr[31] = 0xBFC08394u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02EA0u); - cpu->pc = 0xBFC02EA0u; return; - } -label_BFC08394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC08394: A2420000 sb $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08394u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08398u); -#endif - /* 0xBFC08398: 82300000 lb $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 16, 0x20000u); - PGXP_LOAD(0x82300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0839C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC083A0: 1600FFF9 bne $s0, $zero, 0xBFC08388 */ - uint32_t psx_brA_BFC083A0 = cpu->gpr[16]; uint32_t psx_brB_BFC083A0 = cpu->gpr[0]; - psx_taken_BFC083A0 = (psx_brA_BFC083A0 != psx_brB_BFC083A0); - psx_delay_BFC083A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC083A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC083A4u); -#endif - if (psx_delay_BFC083A0) { - psx_delay_BFC083A0 = 0; - if (psx_taken_BFC083A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08388u); - goto label_BFC08388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC083A8u); - } -label_BFC083A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC083A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC083A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083A8u); -#endif - /* 0xBFC083A8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083A8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC083AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC083ACu); -#endif -label_BFC083B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC083B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC083B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC083B0: 0FF01D04 jal 0xBFC07410 */ - cpu->gpr[31] = 0xBFC083B8u; /* jal link before delay slot */ - psx_delay_BFC083B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC083B4: A2400000 sb $zero, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC083B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083B4u); -#endif - if (psx_delay_BFC083B0) { - psx_delay_BFC083B0 = 0; - cpu->gpr[31] = 0xBFC083B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07410u); - cpu->pc = 0xBFC07410u; return; - } -label_BFC083B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC083B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC083B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083B8u); -#endif - /* 0xBFC083B8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083BCu); -#endif - /* 0xBFC083BC: 8FB10014 lw $s1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083BCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10014u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083C0u); -#endif - /* 0xBFC083C0: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083C0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC083C4: 03E00008 jr $ra */ - psx_delay_BFC083C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC083C8: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083C8u); -#endif - if (psx_delay_BFC083C4) { - psx_delay_BFC083C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC083CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC083CCu); - int psx_delay_BFC083FC = 0; - int psx_taken_BFC083FC = 0; - int psx_delay_BFC08414 = 0; - int psx_delay_BFC08424 = 0; - int psx_delay_BFC08430 = 0; - int psx_delay_BFC08438 = 0; - int psx_taken_BFC08438 = 0; - int psx_delay_BFC0844C = 0; - int psx_delay_BFC08474 = 0; - int psx_taken_BFC08474 = 0; - int psx_delay_BFC0847C = 0; - int psx_taken_BFC0847C = 0; - int psx_delay_BFC08490 = 0; - int psx_taken_BFC08490 = 0; - int psx_delay_BFC08498 = 0; - int psx_taken_BFC08498 = 0; - int psx_delay_BFC084A0 = 0; - int psx_taken_BFC084A0 = 0; - int psx_delay_BFC084B4 = 0; - int psx_delay_BFC084BC = 0; - int psx_taken_BFC084BC = 0; - int psx_delay_BFC084C4 = 0; - int psx_taken_BFC084C4 = 0; - int psx_delay_BFC084D4 = 0; - int psx_taken_BFC084D4 = 0; - int psx_delay_BFC084DC = 0; - int psx_taken_BFC084DC = 0; - int psx_delay_BFC084E4 = 0; - int psx_taken_BFC084E4 = 0; - int psx_delay_BFC084F4 = 0; - int psx_taken_BFC084F4 = 0; - int psx_delay_BFC084FC = 0; - int psx_taken_BFC084FC = 0; - int psx_delay_BFC08508 = 0; - int psx_delay_BFC08510 = 0; - int psx_taken_BFC08510 = 0; - int psx_delay_BFC08518 = 0; - int psx_taken_BFC08518 = 0; - int psx_delay_BFC08530 = 0; - int psx_taken_BFC08530 = 0; - int psx_delay_BFC08558 = 0; - int psx_delay_BFC08560 = 0; - int psx_taken_BFC08560 = 0; - int psx_delay_BFC0856C = 0; - int psx_taken_BFC0856C = 0; - int psx_delay_BFC0857C = 0; - int psx_taken_BFC0857C = 0; - int psx_delay_BFC085A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08404u: goto label_BFC08404; - case 0xBFC0841Cu: goto label_BFC0841C; - case 0xBFC0842Cu: goto label_BFC0842C; - case 0xBFC08438u: goto label_BFC08438; - case 0xBFC08440u: goto label_BFC08440; - case 0xBFC08454u: goto label_BFC08454; - case 0xBFC0846Cu: goto label_BFC0846C; - case 0xBFC0847Cu: goto label_BFC0847C; - case 0xBFC08484u: goto label_BFC08484; - case 0xBFC08498u: goto label_BFC08498; - case 0xBFC084A0u: goto label_BFC084A0; - case 0xBFC084A8u: goto label_BFC084A8; - case 0xBFC084BCu: goto label_BFC084BC; - case 0xBFC084C4u: goto label_BFC084C4; - case 0xBFC084CCu: goto label_BFC084CC; - case 0xBFC084D8u: goto label_BFC084D8; - case 0xBFC084DCu: goto label_BFC084DC; - case 0xBFC084E4u: goto label_BFC084E4; - case 0xBFC084ECu: goto label_BFC084EC; - case 0xBFC084F0u: goto label_BFC084F0; - case 0xBFC084FCu: goto label_BFC084FC; - case 0xBFC08504u: goto label_BFC08504; - case 0xBFC08510u: goto label_BFC08510; - case 0xBFC08518u: goto label_BFC08518; - case 0xBFC08520u: goto label_BFC08520; - case 0xBFC08538u: goto label_BFC08538; - case 0xBFC08554u: goto label_BFC08554; - case 0xBFC08560u: goto label_BFC08560; - case 0xBFC08568u: goto label_BFC08568; - case 0xBFC08574u: goto label_BFC08574; - case 0xBFC08584u: goto label_BFC08584; - case 0xBFC08588u: goto label_BFC08588; - default: break; - } - } -label_BFC083CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC083CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC083CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC083CC: 27BDFF88 addiu $sp, $sp, -120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-120)); - PGXP_ALU(0x27BDFF88u, cpu->gpr[29], _pgx1, 0xFFFFFF88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC083D0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083D0u); return; } g_debug_last_store_pc = 0xBFC083D0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC083D4: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083D4u); return; } g_debug_last_store_pc = 0xBFC083D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC083D8: AFB60030 sw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083D8u); return; } g_debug_last_store_pc = 0xBFC083D8u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC083DC: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC083E0: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083E0u); return; } g_debug_last_store_pc = 0xBFC083E0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC083E4: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083E4u); return; } g_debug_last_store_pc = 0xBFC083E4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC083E8: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083E8u); return; } g_debug_last_store_pc = 0xBFC083E8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC083EC: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083ECu); return; } g_debug_last_store_pc = 0xBFC083ECu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC083F0: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC083F0u); return; } g_debug_last_store_pc = 0xBFC083F0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083F4u); -#endif - /* 0xBFC083F4: 820E0000 lb $t6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 14, 0x10000u); - PGXP_LOAD(0x820E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC083F8: 2412005C addiu $s2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2412005Cu, cpu->gpr[18], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC083F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC083FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC083FC: 124E0010 beq $s2, $t6, 0xBFC08440 */ - uint32_t psx_brA_BFC083FC = cpu->gpr[18]; uint32_t psx_brB_BFC083FC = cpu->gpr[14]; - psx_taken_BFC083FC = (psx_brA_BFC083FC == psx_brB_BFC083FC); - psx_delay_BFC083FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC08400: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08400u); -#endif - if (psx_delay_BFC083FC) { - psx_delay_BFC083FC = 0; - if (psx_taken_BFC083FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08440u); - goto label_BFC08440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08404u); - } -label_BFC08404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08404: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08408: 26319E18 addiu $s1, $s1, -25064 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-25064)); - PGXP_ALU(0x26319E18u, cpu->gpr[17], _pgx1, 0xFFFF9E18u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0840Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0840C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0840Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC08410: 24A59D80 addiu $a1, $a1, -25216 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25216)); - PGXP_ALU(0x24A59D80u, cpu->gpr[5], _pgx1, 0xFFFF9D80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08414: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0841Cu; /* jal link before delay slot */ - psx_delay_BFC08414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08418: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08418u); -#endif - if (psx_delay_BFC08414) { - psx_delay_BFC08414 = 0; - cpu->gpr[31] = 0xBFC0841Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0841C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0841Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0841C: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC08420: 24A5E2EC addiu $a1, $a1, -7444 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7444)); - PGXP_ALU(0x24A5E2ECu, cpu->gpr[5], _pgx1, 0xFFFFE2ECu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08424: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC0842Cu; /* jal link before delay slot */ - psx_delay_BFC08424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08428: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08428u); -#endif - if (psx_delay_BFC08424) { - psx_delay_BFC08424 = 0; - cpu->gpr[31] = 0xBFC0842Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC0842C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0842Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0842Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0842Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0842C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0842Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08430: 0FF00C64 jal 0xBFC03190 */ - cpu->gpr[31] = 0xBFC08438u; /* jal link before delay slot */ - psx_delay_BFC08430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC08434: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08434u); -#endif - if (psx_delay_BFC08430) { - psx_delay_BFC08430 = 0; - cpu->gpr[31] = 0xBFC08438u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03190u); - cpu->pc = 0xBFC03190u; return; - } -label_BFC08438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08438: 10000006 beq $zero, $zero, 0xBFC08454 */ - uint32_t psx_brA_BFC08438 = cpu->gpr[0]; uint32_t psx_brB_BFC08438 = cpu->gpr[0]; - psx_taken_BFC08438 = (psx_brA_BFC08438 == psx_brB_BFC08438); - psx_delay_BFC08438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0843Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0843C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0843Cu); -#endif - if (psx_delay_BFC08438) { - psx_delay_BFC08438 = 0; - if (psx_taken_BFC08438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08454u); - goto label_BFC08454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08440u); - } -label_BFC08440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08440: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08444: 26319E18 addiu $s1, $s1, -25064 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-25064)); - PGXP_ALU(0x26319E18u, cpu->gpr[17], _pgx1, 0xFFFF9E18u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08448: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0844Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0844C: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC08454u; /* jal link before delay slot */ - psx_delay_BFC0844C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC08450: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08450u); -#endif - if (psx_delay_BFC0844C) { - psx_delay_BFC0844C = 0; - cpu->gpr[31] = 0xBFC08454u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC08454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08454: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC08458: A3A0004C sb $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08458u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (76)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0845C: 26109E19 addiu $s0, $s0, -25063 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-25063)); - PGXP_ALU(0x26109E19u, cpu->gpr[16], _pgx1, 0xFFFF9E19u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC08460: 24140001 addiu $s4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24140001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC08464: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC08468: 2415FFFF addiu $s5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2415FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08468u); -#endif -label_BFC0846C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0846Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0846Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0846Cu); -#endif - /* 0xBFC0846C: 82020000 lb $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 2, 0x10000u); - PGXP_LOAD(0x82020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0846Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC08470: 27B1004C addiu $s1, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27B1004Cu, cpu->gpr[17], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC08474: 1242000A beq $s2, $v0, 0xBFC084A0 */ - uint32_t psx_brA_BFC08474 = cpu->gpr[18]; uint32_t psx_brB_BFC08474 = cpu->gpr[2]; - psx_taken_BFC08474 = (psx_brA_BFC08474 == psx_brB_BFC08474); - psx_delay_BFC08474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08478: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08478u); -#endif - if (psx_delay_BFC08474) { - psx_delay_BFC08474 = 0; - if (psx_taken_BFC08474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084A0u); - goto label_BFC084A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0847Cu); - } -label_BFC0847C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0847Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0847Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0847Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0847C: 10400008 beq $v0, $zero, 0xBFC084A0 */ - uint32_t psx_brA_BFC0847C = cpu->gpr[2]; uint32_t psx_brB_BFC0847C = cpu->gpr[0]; - psx_taken_BFC0847C = (psx_brA_BFC0847C == psx_brB_BFC0847C); - psx_delay_BFC0847C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08480: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08480u); -#endif - if (psx_delay_BFC0847C) { - psx_delay_BFC0847C = 0; - if (psx_taken_BFC0847C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084A0u); - goto label_BFC084A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08484u); - } -label_BFC08484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC08484: A2220000 sb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08484u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08488u); -#endif - /* 0xBFC08488: 82020001 lb $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x82020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0848Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0848C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0848Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC08490: 12420003 beq $s2, $v0, 0xBFC084A0 */ - uint32_t psx_brA_BFC08490 = cpu->gpr[18]; uint32_t psx_brB_BFC08490 = cpu->gpr[2]; - psx_taken_BFC08490 = (psx_brA_BFC08490 == psx_brB_BFC08490); - psx_delay_BFC08490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08494: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08494u); -#endif - if (psx_delay_BFC08490) { - psx_delay_BFC08490 = 0; - if (psx_taken_BFC08490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084A0u); - goto label_BFC084A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08498u); - } -label_BFC08498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08498: 1440FFFA bne $v0, $zero, 0xBFC08484 */ - uint32_t psx_brA_BFC08498 = cpu->gpr[2]; uint32_t psx_brB_BFC08498 = cpu->gpr[0]; - psx_taken_BFC08498 = (psx_brA_BFC08498 != psx_brB_BFC08498); - psx_delay_BFC08498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0849Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0849C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0849Cu); -#endif - if (psx_delay_BFC08498) { - psx_delay_BFC08498 = 0; - if (psx_taken_BFC08498) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08484u); - goto label_BFC08484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084A0u); - } -label_BFC084A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC084A0: 1040000E beq $v0, $zero, 0xBFC084DC */ - uint32_t psx_brA_BFC084A0 = cpu->gpr[2]; uint32_t psx_brB_BFC084A0 = cpu->gpr[0]; - psx_taken_BFC084A0 = (psx_brA_BFC084A0 == psx_brB_BFC084A0); - psx_delay_BFC084A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC084A4: 2A610008 slti $at, $s3, 8 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0); - PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084A4u); -#endif - if (psx_delay_BFC084A0) { - psx_delay_BFC084A0 = 0; - if (psx_taken_BFC084A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084DCu); - goto label_BFC084DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084A8u); - } -label_BFC084A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC084A8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC084AC: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC084ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC084B0: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC084B4: 0FF01D99 jal 0xBFC07664 */ - cpu->gpr[31] = 0xBFC084BCu; /* jal link before delay slot */ - psx_delay_BFC084B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC084B8: 27A5004C addiu $a1, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A5004Cu, cpu->gpr[5], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084B8u); -#endif - if (psx_delay_BFC084B4) { - psx_delay_BFC084B4 = 0; - cpu->gpr[31] = 0xBFC084BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07664u); - cpu->pc = 0xBFC07664u; return; - } -label_BFC084BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC084BC: 14550003 bne $v0, $s5, 0xBFC084CC */ - uint32_t psx_brA_BFC084BC = cpu->gpr[2]; uint32_t psx_brB_BFC084BC = cpu->gpr[21]; - psx_taken_BFC084BC = (psx_brA_BFC084BC != psx_brB_BFC084BC); - psx_delay_BFC084BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100005u); -#endif - /* 0xBFC084C0: 0040A021 addu $s4, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084C0u); -#endif - if (psx_delay_BFC084BC) { - psx_delay_BFC084BC = 0; - if (psx_taken_BFC084BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084CCu); - goto label_BFC084CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084C4u); - } -label_BFC084C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC084C4: 10000004 beq $zero, $zero, 0xBFC084D8 */ - uint32_t psx_brA_BFC084C4 = cpu->gpr[0]; uint32_t psx_brB_BFC084C4 = cpu->gpr[0]; - psx_taken_BFC084C4 = (psx_brA_BFC084C4 == psx_brB_BFC084C4); - psx_delay_BFC084C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC084C8: A3A0004C sb $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC084C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (76)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084C8u); -#endif - if (psx_delay_BFC084C4) { - psx_delay_BFC084C4 = 0; - if (psx_taken_BFC084C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084D8u); - goto label_BFC084D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084CCu); - } -label_BFC084CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC084CC: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC084D0: 2A610008 slti $at, $s3, 8 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0); - PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC084D4: 1420FFE5 bne $at, $zero, 0xBFC0846C */ - uint32_t psx_brA_BFC084D4 = cpu->gpr[1]; uint32_t psx_brB_BFC084D4 = cpu->gpr[0]; - psx_taken_BFC084D4 = (psx_brA_BFC084D4 != psx_brB_BFC084D4); - psx_delay_BFC084D4 = 1; -label_BFC084D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC084D8: 2A610008 slti $at, $s3, 8 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (8) ? 1 : 0); - PGXP_ALU(0x2A610008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084D8u); -#endif - if (psx_delay_BFC084D4) { - psx_delay_BFC084D4 = 0; - if (psx_taken_BFC084D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0846Cu); - goto label_BFC0846C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084DCu); - } -label_BFC084DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC084DC: 14200004 bne $at, $zero, 0xBFC084F0 */ - uint32_t psx_brA_BFC084DC = cpu->gpr[1]; uint32_t psx_brB_BFC084DC = cpu->gpr[0]; - psx_taken_BFC084DC = (psx_brA_BFC084DC != psx_brB_BFC084DC); - psx_delay_BFC084DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084E0u); -#endif - /* 0xBFC084E0: 83AF004C lb $t7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (76)), 15, 0x20000000u); - PGXP_LOAD(0x83AF004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084E0u); -#endif - if (psx_delay_BFC084DC) { - psx_delay_BFC084DC = 0; - if (psx_taken_BFC084DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084F0u); - goto label_BFC084F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084E4u); - } -label_BFC084E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC084E4: 10000028 beq $zero, $zero, 0xBFC08588 */ - uint32_t psx_brA_BFC084E4 = cpu->gpr[0]; uint32_t psx_brB_BFC084E4 = cpu->gpr[0]; - psx_taken_BFC084E4 = (psx_brA_BFC084E4 == psx_brB_BFC084E4); - psx_delay_BFC084E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC084E8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084E8u); -#endif - if (psx_delay_BFC084E4) { - psx_delay_BFC084E4 = 0; - if (psx_taken_BFC084E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08588u); - goto label_BFC08588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084ECu); - } -label_BFC084EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084ECu); -#endif - /* 0xBFC084EC: 83AF004C lb $t7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (76)), 15, 0x20000000u); - PGXP_LOAD(0x83AF004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC084ECu); -#endif -label_BFC084F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC084F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC084F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC084F4: 15E00003 bne $t7, $zero, 0xBFC08504 */ - uint32_t psx_brA_BFC084F4 = cpu->gpr[15]; uint32_t psx_brB_BFC084F4 = cpu->gpr[0]; - psx_taken_BFC084F4 = (psx_brA_BFC084F4 != psx_brB_BFC084F4); - psx_delay_BFC084F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC084F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC084F8u); -#endif - if (psx_delay_BFC084F4) { - psx_delay_BFC084F4 = 0; - if (psx_taken_BFC084F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08504u); - goto label_BFC08504; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC084FCu); - } -label_BFC084FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC084FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC084FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC084FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC084FC: 10000022 beq $zero, $zero, 0xBFC08588 */ - uint32_t psx_brA_BFC084FC = cpu->gpr[0]; uint32_t psx_brB_BFC084FC = cpu->gpr[0]; - psx_taken_BFC084FC = (psx_brA_BFC084FC == psx_brB_BFC084FC); - psx_delay_BFC084FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08500: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08500u); -#endif - if (psx_delay_BFC084FC) { - psx_delay_BFC084FC = 0; - if (psx_taken_BFC084FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08588u); - goto label_BFC08588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08504u); - } -label_BFC08504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC08504: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08504u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08508: 0FF01DC0 jal 0xBFC07700 */ - cpu->gpr[31] = 0xBFC08510u; /* jal link before delay slot */ - psx_delay_BFC08508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0850Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC0850C: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0850Cu); -#endif - if (psx_delay_BFC08508) { - psx_delay_BFC08508 = 0; - cpu->gpr[31] = 0xBFC08510u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC07700u); - cpu->pc = 0xBFC07700u; return; - } -label_BFC08510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08510: 14400003 bne $v0, $zero, 0xBFC08520 */ - uint32_t psx_brA_BFC08510 = cpu->gpr[2]; uint32_t psx_brB_BFC08510 = cpu->gpr[0]; - psx_taken_BFC08510 = (psx_brA_BFC08510 != psx_brB_BFC08510); - psx_delay_BFC08510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08514u); -#endif - if (psx_delay_BFC08510) { - psx_delay_BFC08510 = 0; - if (psx_taken_BFC08510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08520u); - goto label_BFC08520; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08518u); - } -label_BFC08518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08518: 1000001B beq $zero, $zero, 0xBFC08588 */ - uint32_t psx_brA_BFC08518 = cpu->gpr[0]; uint32_t psx_brB_BFC08518 = cpu->gpr[0]; - psx_taken_BFC08518 = (psx_brA_BFC08518 == psx_brB_BFC08518); - psx_delay_BFC08518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0851C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0851Cu); -#endif - if (psx_delay_BFC08518) { - psx_delay_BFC08518 = 0; - if (psx_taken_BFC08518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08588u); - goto label_BFC08588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08520u); - } -label_BFC08520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08520: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08524u); -#endif - /* 0xBFC08524: 8E319E04 lw $s1, -25084($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -25084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-25084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08524u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E319E04u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480001u); -#endif - /* 0xBFC08528: 02C09821 addu $s3, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420002u); -#endif - /* 0xBFC0852C: 02D1082A slt $at, $s6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x02D1082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08530: 10200015 beq $at, $zero, 0xBFC08588 */ - uint32_t psx_brA_BFC08530 = cpu->gpr[1]; uint32_t psx_brB_BFC08530 = cpu->gpr[0]; - psx_taken_BFC08530 = (psx_brA_BFC08530 == psx_brB_BFC08530); - psx_delay_BFC08530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08534: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08534u); -#endif - if (psx_delay_BFC08530) { - psx_delay_BFC08530 = 0; - if (psx_taken_BFC08530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08588u); - goto label_BFC08588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08538u); - } -label_BFC08538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC08538: 0013C080 sll $t8, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC0853C: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08540: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC08544: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC08548: 250891F0 addiu $t0, $t0, -28176 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-28176)); - PGXP_ALU(0x250891F0u, cpu->gpr[8], _pgx1, 0xFFFF91F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0854Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0854C: 2719000C addiu $t9, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2719000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0854Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010100u); -#endif - /* 0xBFC08550: 03288021 addu $s0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03288021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08550u); -#endif -label_BFC08554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC08554: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08558: 0FF02008 jal 0xBFC08020 */ - cpu->gpr[31] = 0xBFC08560u; /* jal link before delay slot */ - psx_delay_BFC08558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0855Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0855C: 27A5004C addiu $a1, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A5004Cu, cpu->gpr[5], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0855Cu); -#endif - if (psx_delay_BFC08558) { - psx_delay_BFC08558 = 0; - cpu->gpr[31] = 0xBFC08560u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08020u); - cpu->pc = 0xBFC08020u; return; - } -label_BFC08560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08560: 10400004 beq $v0, $zero, 0xBFC08574 */ - uint32_t psx_brA_BFC08560 = cpu->gpr[2]; uint32_t psx_brB_BFC08560 = cpu->gpr[0]; - psx_taken_BFC08560 = (psx_brA_BFC08560 == psx_brB_BFC08560); - psx_delay_BFC08560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08564: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08564u); -#endif - if (psx_delay_BFC08560) { - psx_delay_BFC08560 = 0; - if (psx_taken_BFC08560) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08574u); - goto label_BFC08574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08568u); - } -label_BFC08568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC08568: AC339E10 sw $s3, -25072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08568u); return; } g_debug_last_store_pc = 0xBFC08568u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAC339E10u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0856C: 10000006 beq $zero, $zero, 0xBFC08588 */ - uint32_t psx_brA_BFC0856C = cpu->gpr[0]; uint32_t psx_brB_BFC0856C = cpu->gpr[0]; - psx_taken_BFC0856C = (psx_brA_BFC0856C == psx_brB_BFC0856C); - psx_delay_BFC0856C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC08570: 02601021 addu $v0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08570u); -#endif - if (psx_delay_BFC0856C) { - psx_delay_BFC0856C = 0; - if (psx_taken_BFC0856C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08588u); - goto label_BFC08588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08574u); - } -label_BFC08574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC08574: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0002u); -#endif - /* 0xBFC08578: 0271082A slt $at, $s3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0271082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0857Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0857C: 1420FFF5 bne $at, $zero, 0xBFC08554 */ - uint32_t psx_brA_BFC0857C = cpu->gpr[1]; uint32_t psx_brB_BFC0857C = cpu->gpr[0]; - psx_taken_BFC0857C = (psx_brA_BFC0857C != psx_brB_BFC0857C); - psx_delay_BFC0857C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08580: 26100018 addiu $s0, $s0, 24 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (24)); - PGXP_ALU(0x26100018u, cpu->gpr[16], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08580u); -#endif - if (psx_delay_BFC0857C) { - psx_delay_BFC0857C = 0; - if (psx_taken_BFC0857C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08554u); - goto label_BFC08554; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08584u); - } -label_BFC08584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08584: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08584u); -#endif -label_BFC08588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08588u); -#endif - /* 0xBFC08588: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08588u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0858Cu); -#endif - /* 0xBFC0858C: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0858Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0858Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08590u); -#endif - /* 0xBFC08590: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08590u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08594u); -#endif - /* 0xBFC08594: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08594u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08598u); -#endif - /* 0xBFC08598: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08598u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0859Cu); -#endif - /* 0xBFC0859C: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0859Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085A0u); -#endif - /* 0xBFC085A0: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085A0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085A4u); -#endif - /* 0xBFC085A4: 8FB60030 lw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085A4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC085A8: 03E00008 jr $ra */ - psx_delay_BFC085A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC085AC: 27BD0078 addiu $sp, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27BD0078u, cpu->gpr[29], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085ACu); -#endif - if (psx_delay_BFC085A8) { - psx_delay_BFC085A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC085B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC085B0u); - int psx_delay_BFC085BC = 0; - int psx_delay_BFC085CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC085C4u: goto label_BFC085C4; - default: break; - } - } -label_BFC085B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC085B0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC085B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085B4u); return; } g_debug_last_store_pc = 0xBFC085B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC085B8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC085B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC085BC: 0FF0367C jal 0xBFC0D9F0 */ - cpu->gpr[31] = 0xBFC085C4u; /* jal link before delay slot */ - psx_delay_BFC085BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC085C0: 2484E2F0 addiu $a0, $a0, -7440 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7440)); - PGXP_ALU(0x2484E2F0u, cpu->gpr[4], _pgx1, 0xFFFFE2F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085C0u); -#endif - if (psx_delay_BFC085BC) { - psx_delay_BFC085BC = 0; - cpu->gpr[31] = 0xBFC085C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9F0u); - cpu->pc = 0xBFC0D9F0u; return; - } -label_BFC085C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085C4u); -#endif - /* 0xBFC085C4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC085C8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC085CC: 03E00008 jr $ra */ - psx_delay_BFC085CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC085D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC085D0u); -#endif - if (psx_delay_BFC085CC) { - psx_delay_BFC085CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC085D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC085D4u); - int psx_delay_BFC085DC = 0; - int psx_delay_BFC085E4 = 0; - int psx_delay_BFC085EC = 0; - int psx_taken_BFC085EC = 0; - int psx_delay_BFC085F8 = 0; - int psx_taken_BFC085F8 = 0; - int psx_delay_BFC08600 = 0; - int psx_delay_BFC08608 = 0; - int psx_taken_BFC08608 = 0; - int psx_delay_BFC08610 = 0; - int psx_taken_BFC08610 = 0; - int psx_delay_BFC0861C = 0; - int psx_delay_BFC08624 = 0; - int psx_taken_BFC08624 = 0; - int psx_delay_BFC0862C = 0; - int psx_taken_BFC0862C = 0; - int psx_delay_BFC08644 = 0; - int psx_delay_BFC0864C = 0; - int psx_taken_BFC0864C = 0; - int psx_delay_BFC08658 = 0; - int psx_taken_BFC08658 = 0; - int psx_delay_BFC08668 = 0; - int psx_delay_BFC08670 = 0; - int psx_taken_BFC08670 = 0; - int psx_delay_BFC0867C = 0; - int psx_delay_BFC08688 = 0; - int psx_taken_BFC08688 = 0; - int psx_delay_BFC08690 = 0; - int psx_taken_BFC08690 = 0; - int psx_delay_BFC086A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC085E4u: goto label_BFC085E4; - case 0xBFC085ECu: goto label_BFC085EC; - case 0xBFC085F4u: goto label_BFC085F4; - case 0xBFC08600u: goto label_BFC08600; - case 0xBFC08608u: goto label_BFC08608; - case 0xBFC08610u: goto label_BFC08610; - case 0xBFC08618u: goto label_BFC08618; - case 0xBFC08624u: goto label_BFC08624; - case 0xBFC0862Cu: goto label_BFC0862C; - case 0xBFC08634u: goto label_BFC08634; - case 0xBFC0863Cu: goto label_BFC0863C; - case 0xBFC0864Cu: goto label_BFC0864C; - case 0xBFC08654u: goto label_BFC08654; - case 0xBFC08660u: goto label_BFC08660; - case 0xBFC08670u: goto label_BFC08670; - case 0xBFC08678u: goto label_BFC08678; - case 0xBFC08684u: goto label_BFC08684; - case 0xBFC08690u: goto label_BFC08690; - case 0xBFC08698u: goto label_BFC08698; - case 0xBFC086A0u: goto label_BFC086A0; - case 0xBFC086A4u: goto label_BFC086A4; - default: break; - } - } -label_BFC085D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC085D4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC085D8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085D8u); return; } g_debug_last_store_pc = 0xBFC085D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC085DC: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC085E4u; /* jal link before delay slot */ - psx_delay_BFC085DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC085E0: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC085E0u); return; } g_debug_last_store_pc = 0xBFC085E0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085E0u); -#endif - if (psx_delay_BFC085DC) { - psx_delay_BFC085DC = 0; - cpu->gpr[31] = 0xBFC085E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC085E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC085E4: 0FF03714 jal 0xBFC0DC50 */ - cpu->gpr[31] = 0xBFC085ECu; /* jal link before delay slot */ - psx_delay_BFC085E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC085E8: 24110009 addiu $s1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24110009u, cpu->gpr[17], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085E8u); -#endif - if (psx_delay_BFC085E4) { - psx_delay_BFC085E4 = 0; - cpu->gpr[31] = 0xBFC085ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC50u); - cpu->pc = 0xBFC0DC50u; return; - } -label_BFC085EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC085EC: 14400008 bne $v0, $zero, 0xBFC08610 */ - uint32_t psx_brA_BFC085EC = cpu->gpr[2]; uint32_t psx_brB_BFC085EC = cpu->gpr[0]; - psx_taken_BFC085EC = (psx_brA_BFC085EC != psx_brB_BFC085EC); - psx_delay_BFC085EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC085F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC085F0u); -#endif - if (psx_delay_BFC085EC) { - psx_delay_BFC085EC = 0; - if (psx_taken_BFC085EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08610u); - goto label_BFC08610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC085F4u); - } -label_BFC085F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC085F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC085F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC085F4: 2631FFFF addiu $s1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2631FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC085F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC085F8: 1A200005 blez $s1, 0xBFC08610 */ - uint32_t psx_brA_BFC085F8 = cpu->gpr[17]; - psx_taken_BFC085F8 = ((int32_t)psx_brA_BFC085F8 <= 0); - psx_delay_BFC085F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC085FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC085FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC085FCu); -#endif - if (psx_delay_BFC085F8) { - psx_delay_BFC085F8 = 0; - if (psx_taken_BFC085F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08610u); - goto label_BFC08610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08600u); - } -label_BFC08600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08600: 0FF03714 jal 0xBFC0DC50 */ - cpu->gpr[31] = 0xBFC08608u; /* jal link before delay slot */ - psx_delay_BFC08600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08604u); -#endif - if (psx_delay_BFC08600) { - psx_delay_BFC08600 = 0; - cpu->gpr[31] = 0xBFC08608u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DC50u); - cpu->pc = 0xBFC0DC50u; return; - } -label_BFC08608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08608: 1040FFFA beq $v0, $zero, 0xBFC085F4 */ - uint32_t psx_brA_BFC08608 = cpu->gpr[2]; uint32_t psx_brB_BFC08608 = cpu->gpr[0]; - psx_taken_BFC08608 = (psx_brA_BFC08608 == psx_brB_BFC08608); - psx_delay_BFC08608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0860Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0860C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0860Cu); -#endif - if (psx_delay_BFC08608) { - psx_delay_BFC08608 = 0; - if (psx_taken_BFC08608) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC085F4u); - goto label_BFC085F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08610u); - } -label_BFC08610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08610: 1E200006 bgtz $s1, 0xBFC0862C */ - uint32_t psx_brA_BFC08610 = cpu->gpr[17]; - psx_taken_BFC08610 = ((int32_t)psx_brA_BFC08610 > 0); - psx_delay_BFC08610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08614u); -#endif - if (psx_delay_BFC08610) { - psx_delay_BFC08610 = 0; - if (psx_taken_BFC08610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0862Cu); - goto label_BFC0862C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08618u); - } -label_BFC08618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC08618: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0861Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0861C: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC08624u; /* jal link before delay slot */ - psx_delay_BFC0861C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08620: 24050029 addiu $a1, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24050029u, cpu->gpr[5], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08620u); -#endif - if (psx_delay_BFC0861C) { - psx_delay_BFC0861C = 0; - cpu->gpr[31] = 0xBFC08624u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC08624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08624: 1000001E beq $zero, $zero, 0xBFC086A0 */ - uint32_t psx_brA_BFC08624 = cpu->gpr[0]; uint32_t psx_brB_BFC08624 = cpu->gpr[0]; - psx_taken_BFC08624 = (psx_brA_BFC08624 == psx_brB_BFC08624); - psx_delay_BFC08624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08628: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08628u); -#endif - if (psx_delay_BFC08624) { - psx_delay_BFC08624 = 0; - if (psx_taken_BFC08624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC086A0u); - goto label_BFC086A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0862Cu); - } -label_BFC0862C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0862Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0862Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0862Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0862C: 1A20001D blez $s1, 0xBFC086A4 */ - uint32_t psx_brA_BFC0862C = cpu->gpr[17]; - psx_taken_BFC0862C = ((int32_t)psx_brA_BFC0862C <= 0); - psx_delay_BFC0862C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08630u); -#endif - /* 0xBFC08630: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08630u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08630u); -#endif - if (psx_delay_BFC0862C) { - psx_delay_BFC0862C = 0; - if (psx_taken_BFC0862C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC086A4u); - goto label_BFC086A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08634u); - } -label_BFC08634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC08634: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08634u); return; } g_debug_last_store_pc = 0xBFC08634u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08638: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08638u); -#endif -label_BFC0863C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0863Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0863C: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08640u); -#endif - /* 0xBFC08640: 8C84B9BC lw $a0, -17988($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08640u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9BCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08644: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC0864Cu; /* jal link before delay slot */ - psx_delay_BFC08644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08648u); -#endif - if (psx_delay_BFC08644) { - psx_delay_BFC08644 = 0; - cpu->gpr[31] = 0xBFC0864Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC0864C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0864Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0864Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0864Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC0864C: 14500004 bne $v0, $s0, 0xBFC08660 */ - uint32_t psx_brA_BFC0864C = cpu->gpr[2]; uint32_t psx_brB_BFC0864C = cpu->gpr[16]; - psx_taken_BFC0864C = (psx_brA_BFC0864C != psx_brB_BFC0864C); - psx_delay_BFC0864C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08650u); -#endif - if (psx_delay_BFC0864C) { - psx_delay_BFC0864C = 0; - if (psx_taken_BFC0864C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08660u); - goto label_BFC08660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08654u); - } -label_BFC08654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08654u); -#endif - /* 0xBFC08654: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08654u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08658: 10000012 beq $zero, $zero, 0xBFC086A4 */ - uint32_t psx_brA_BFC08658 = cpu->gpr[0]; uint32_t psx_brB_BFC08658 = cpu->gpr[0]; - psx_taken_BFC08658 = (psx_brA_BFC08658 == psx_brB_BFC08658); - psx_delay_BFC08658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0865Cu); -#endif - /* 0xBFC0865C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0865Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0865Cu); -#endif - if (psx_delay_BFC08658) { - psx_delay_BFC08658 = 0; - if (psx_taken_BFC08658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC086A4u); - goto label_BFC086A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08660u); - } -label_BFC08660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08660: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08664u); -#endif - /* 0xBFC08664: 8C84B9C8 lw $a0, -17976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08664u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84B9C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08668: 0FF03678 jal 0xBFC0D9E0 */ - cpu->gpr[31] = 0xBFC08670u; /* jal link before delay slot */ - psx_delay_BFC08668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0866Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0866C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0866Cu); -#endif - if (psx_delay_BFC08668) { - psx_delay_BFC08668 = 0; - cpu->gpr[31] = 0xBFC08670u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9E0u); - cpu->pc = 0xBFC0D9E0u; return; - } -label_BFC08670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC08670: 14500007 bne $v0, $s0, 0xBFC08690 */ - uint32_t psx_brA_BFC08670 = cpu->gpr[2]; uint32_t psx_brB_BFC08670 = cpu->gpr[16]; - psx_taken_BFC08670 = (psx_brA_BFC08670 != psx_brB_BFC08670); - psx_delay_BFC08670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08674u); -#endif - if (psx_delay_BFC08670) { - psx_delay_BFC08670 = 0; - if (psx_taken_BFC08670) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08690u); - goto label_BFC08690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08678u); - } -label_BFC08678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC08678: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0867Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0867C: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC08684u; /* jal link before delay slot */ - psx_delay_BFC0867C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08680: 2405002A addiu $a1, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2405002Au, cpu->gpr[5], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08680u); -#endif - if (psx_delay_BFC0867C) { - psx_delay_BFC0867C = 0; - cpu->gpr[31] = 0xBFC08684u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC08684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08684u); -#endif - /* 0xBFC08684: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08684u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08688: 10000006 beq $zero, $zero, 0xBFC086A4 */ - uint32_t psx_brA_BFC08688 = cpu->gpr[0]; uint32_t psx_brB_BFC08688 = cpu->gpr[0]; - psx_taken_BFC08688 = (psx_brA_BFC08688 == psx_brB_BFC08688); - psx_delay_BFC08688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0868Cu); -#endif - /* 0xBFC0868C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0868Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0868Cu); -#endif - if (psx_delay_BFC08688) { - psx_delay_BFC08688 = 0; - if (psx_taken_BFC08688) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC086A4u); - goto label_BFC086A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08690u); - } -label_BFC08690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC08690: 1E20FFEA bgtz $s1, 0xBFC0863C */ - uint32_t psx_brA_BFC08690 = cpu->gpr[17]; - psx_taken_BFC08690 = ((int32_t)psx_brA_BFC08690 > 0); - psx_delay_BFC08690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08694u); -#endif - if (psx_delay_BFC08690) { - psx_delay_BFC08690 = 0; - if (psx_taken_BFC08690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0863Cu); - goto label_BFC0863C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08698u); - } -label_BFC08698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08698u); -#endif - /* 0xBFC08698: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08698u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0869Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0869C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0869Cu); -#endif -label_BFC086A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC086A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC086A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086A0u); -#endif - /* 0xBFC086A0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086A0u); -#endif -label_BFC086A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC086A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC086A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086A4u); -#endif - /* 0xBFC086A4: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086A4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC086A8: 03E00008 jr $ra */ - psx_delay_BFC086A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC086AC: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086ACu); -#endif - if (psx_delay_BFC086A8) { - psx_delay_BFC086A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC086B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC086B0u); - int psx_delay_BFC086BC = 0; - int psx_delay_BFC086CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC086C4u: goto label_BFC086C4; - default: break; - } - } -label_BFC086B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC086B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC086B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC086B0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC086B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086B4u); return; } g_debug_last_store_pc = 0xBFC086B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC086B8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC086B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC086BC: 0FF0367C jal 0xBFC0D9F0 */ - cpu->gpr[31] = 0xBFC086C4u; /* jal link before delay slot */ - psx_delay_BFC086BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC086C0: 2484E350 addiu $a0, $a0, -7344 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7344)); - PGXP_ALU(0x2484E350u, cpu->gpr[4], _pgx1, 0xFFFFE350u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086C0u); -#endif - if (psx_delay_BFC086BC) { - psx_delay_BFC086BC = 0; - cpu->gpr[31] = 0xBFC086C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9F0u); - cpu->pc = 0xBFC0D9F0u; return; - } -label_BFC086C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC086C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC086C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086C4u); -#endif - /* 0xBFC086C4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC086C8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC086CC: 03E00008 jr $ra */ - psx_delay_BFC086CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC086D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC086D0u); -#endif - if (psx_delay_BFC086CC) { - psx_delay_BFC086CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC086EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC086ECu); - int psx_delay_BFC08700 = 0; - int psx_delay_BFC08710 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08708u: goto label_BFC08708; - default: break; - } - } -label_BFC086EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC086ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC086ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC086EC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC086F0: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086F0u); return; } g_debug_last_store_pc = 0xBFC086F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC086F4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC086F4u); return; } g_debug_last_store_pc = 0xBFC086F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC086F8: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC086F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC086FCu); -#endif - /* 0xBFC086FC: 90050000 lbu $a1, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[0] + (0)), 5, 0x1u); - PGXP_LOAD(0x90050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC086FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08700: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC08708u; /* jal link before delay slot */ - psx_delay_BFC08700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08704: 2484E3B0 addiu $a0, $a0, -7248 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7248)); - PGXP_ALU(0x2484E3B0u, cpu->gpr[4], _pgx1, 0xFFFFE3B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08704u); -#endif - if (psx_delay_BFC08700) { - psx_delay_BFC08700 = 0; - cpu->gpr[31] = 0xBFC08708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC08708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08708u); -#endif - /* 0xBFC08708: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08708u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0870Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0870C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0870Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08710: 03E00008 jr $ra */ - psx_delay_BFC08710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08714u); -#endif - if (psx_delay_BFC08710) { - psx_delay_BFC08710 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08720(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08720u); - int psx_delay_BFC08798 = 0; - int psx_taken_BFC08798 = 0; - int psx_delay_BFC087A8 = 0; - int psx_taken_BFC087A8 = 0; - int psx_delay_BFC087B0 = 0; - int psx_delay_BFC087BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08758u: goto label_BFC08758; - case 0xBFC087A0u: goto label_BFC087A0; - case 0xBFC087B0u: goto label_BFC087B0; - case 0xBFC087BCu: goto label_BFC087BC; - default: break; - } - } -label_BFC08720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08720: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08724u); -#endif - /* 0xBFC08724: 90820000 lbu $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x90820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08728u); -#endif - /* 0xBFC08728: 908E0001 lbu $t6, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 14, 0x10u); - PGXP_LOAD(0x908E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0872Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0872C: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0872Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08730u); -#endif - /* 0xBFC08730: 908F0002 lbu $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 15, 0x10u); - PGXP_LOAD(0x908F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC08734: 004E1026 xor $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14]; - PGXP_ALU(0x004E1026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08738: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0873Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0873C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0873Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08740: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC08744: 004F1026 xor $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15]; - PGXP_ALU(0x004F1026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08748: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0874Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0874C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0874Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08750: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08754: 2405007F addiu $a1, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2405007Fu, cpu->gpr[5], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08754u); -#endif -label_BFC08758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08758u); -#endif - /* 0xBFC08758: 90980000 lbu $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 24, 0x10u); - PGXP_LOAD(0x90980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0875Cu); -#endif - /* 0xBFC0875C: 90990001 lbu $t9, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 25, 0x10u); - PGXP_LOAD(0x90990001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0875Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08760: 00581026 xor $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24]; - PGXP_ALU(0x00581026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08764: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08768u); -#endif - /* 0xBFC08768: 90880002 lbu $t0, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 8, 0x10u); - PGXP_LOAD(0x90880002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0876Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0876C: 00591026 xor $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25]; - PGXP_ALU(0x00591026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0876Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08770: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08774u); -#endif - /* 0xBFC08774: 90890003 lbu $t1, 3($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 3; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (3)), 9, 0x10u); - PGXP_LOAD(0x90890003u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08778: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0877Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0877C: 00481026 xor $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8]; - PGXP_ALU(0x00481026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0877Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08780: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08784: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08788: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0878Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0878C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0878Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC08790: 00491026 xor $v0, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9]; - PGXP_ALU(0x00491026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08794: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC08798: 1465FFEF bne $v1, $a1, 0xBFC08758 */ - uint32_t psx_brA_BFC08798 = cpu->gpr[3]; uint32_t psx_brB_BFC08798 = cpu->gpr[5]; - psx_taken_BFC08798 = (psx_brA_BFC08798 != psx_brB_BFC08798); - psx_delay_BFC08798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0879Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0879C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0879Cu); -#endif - if (psx_delay_BFC08798) { - psx_delay_BFC08798 = 0; - if (psx_taken_BFC08798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08758u); - goto label_BFC08758; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087A0u); - } -label_BFC087A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC087A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC087A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087A0u); -#endif - /* 0xBFC087A0: 908A0000 lbu $t2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 10, 0x10u); - PGXP_LOAD(0x908A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC087A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC087A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC087A8: 144A0004 bne $v0, $t2, 0xBFC087BC */ - uint32_t psx_brA_BFC087A8 = cpu->gpr[2]; uint32_t psx_brB_BFC087A8 = cpu->gpr[10]; - psx_taken_BFC087A8 = (psx_brA_BFC087A8 != psx_brB_BFC087A8); - psx_delay_BFC087A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC087AC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087ACu); -#endif - if (psx_delay_BFC087A8) { - psx_delay_BFC087A8 = 0; - if (psx_taken_BFC087A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087BCu); - goto label_BFC087BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087B0u); - } -label_BFC087B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC087B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC087B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC087B0: 03E00008 jr $ra */ - psx_delay_BFC087B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC087B4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087B4u); -#endif - if (psx_delay_BFC087B0) { - psx_delay_BFC087B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC087BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC087BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC087BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC087BC: 03E00008 jr $ra */ - psx_delay_BFC087BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC087C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC087C0u); -#endif - if (psx_delay_BFC087BC) { - psx_delay_BFC087BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC087C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC087C4u); - int psx_delay_BFC0883C = 0; - int psx_taken_BFC0883C = 0; - int psx_delay_BFC08844 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC087FCu: goto label_BFC087FC; - case 0xBFC08844u: goto label_BFC08844; - default: break; - } - } -label_BFC087C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC087C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC087C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC087C4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087C8u); -#endif - /* 0xBFC087C8: 90820000 lbu $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x90820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087CCu); -#endif - /* 0xBFC087CC: 908E0001 lbu $t6, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 14, 0x10u); - PGXP_LOAD(0x908E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC087D0: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087D4u); -#endif - /* 0xBFC087D4: 908F0002 lbu $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 15, 0x10u); - PGXP_LOAD(0x908F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC087D8: 004E1026 xor $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[14]; - PGXP_ALU(0x004E1026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC087DC: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC087E0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC087E4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC087E8: 004F1026 xor $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[15]; - PGXP_ALU(0x004F1026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC087EC: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC087F0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC087F4: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC087F8: 2405007F addiu $a1, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2405007Fu, cpu->gpr[5], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087F8u); -#endif -label_BFC087FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC087FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC087FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC087FCu); -#endif - /* 0xBFC087FC: 90980000 lbu $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 24, 0x10u); - PGXP_LOAD(0x90980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC087FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08800u); -#endif - /* 0xBFC08800: 90990001 lbu $t9, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 25, 0x10u); - PGXP_LOAD(0x90990001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08804: 00581026 xor $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[24]; - PGXP_ALU(0x00581026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08808: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0880Cu); -#endif - /* 0xBFC0880C: 90880002 lbu $t0, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 8, 0x10u); - PGXP_LOAD(0x90880002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0880Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC08810: 00591026 xor $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[25]; - PGXP_ALU(0x00591026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08814: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08818u); -#endif - /* 0xBFC08818: 90890003 lbu $t1, 3($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 3; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (3)), 9, 0x10u); - PGXP_LOAD(0x90890003u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0881C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC08820: 00481026 xor $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[8]; - PGXP_ALU(0x00481026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08824: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08828: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0882Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0882C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0882Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08830: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC08834: 00491026 xor $v0, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[9]; - PGXP_ALU(0x00491026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08838: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0883Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC0883C: 1465FFEF bne $v1, $a1, 0xBFC087FC */ - uint32_t psx_brA_BFC0883C = cpu->gpr[3]; uint32_t psx_brB_BFC0883C = cpu->gpr[5]; - psx_taken_BFC0883C = (psx_brA_BFC0883C != psx_brB_BFC0883C); - psx_delay_BFC0883C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08840: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08840u); -#endif - if (psx_delay_BFC0883C) { - psx_delay_BFC0883C = 0; - if (psx_taken_BFC0883C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087FCu); - goto label_BFC087FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08844u); - } -label_BFC08844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08844: 03E00008 jr $ra */ - psx_delay_BFC08844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC08848: A0820000 sb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08848u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08848u); -#endif - if (psx_delay_BFC08844) { - psx_delay_BFC08844 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0884C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0884Cu); - int psx_delay_BFC08880 = 0; - int psx_taken_BFC08880 = 0; - int psx_delay_BFC08888 = 0; - int psx_delay_BFC08898 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08870u: goto label_BFC08870; - case 0xBFC08888u: goto label_BFC08888; - case 0xBFC08890u: goto label_BFC08890; - default: break; - } - } -label_BFC0884C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0884Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0884Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0884Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0884C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0884Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08850: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08854: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08858: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0885C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC08860: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08860u); return; } g_debug_last_store_pc = 0xBFC08860u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08864: 2442B9D4 addiu $v0, $v0, -17964 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-17964)); - PGXP_ALU(0x2442B9D4u, cpu->gpr[2], _pgx1, 0xFFFFB9D4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08868: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08868u); return; } g_debug_last_store_pc = 0xBFC08868u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0886C: 2463B9E4 addiu $v1, $v1, -17948 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-17948)); - PGXP_ALU(0x2463B9E4u, cpu->gpr[3], _pgx1, 0xFFFFB9E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0886Cu); -#endif -label_BFC08870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08870: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08870u); return; } g_debug_last_store_pc = 0xBFC08870u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08874: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08874u); return; } g_debug_last_store_pc = 0xBFC08874u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08878: AC400008 sw $zero, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08878u); return; } g_debug_last_store_pc = 0xBFC08878u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0887C: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08880: 1443FFFB bne $v0, $v1, 0xBFC08870 */ - uint32_t psx_brA_BFC08880 = cpu->gpr[2]; uint32_t psx_brB_BFC08880 = cpu->gpr[3]; - psx_taken_BFC08880 = (psx_brA_BFC08880 != psx_brB_BFC08880); - psx_delay_BFC08880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08884: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08884u); return; } g_debug_last_store_pc = 0xBFC08884u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08884u); -#endif - if (psx_delay_BFC08880) { - psx_delay_BFC08880 = 0; - if (psx_taken_BFC08880) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08870u); - goto label_BFC08870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08888u); - } -label_BFC08888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08888: 0FF030D5 jal 0xBFC0C354 */ - cpu->gpr[31] = 0xBFC08890u; /* jal link before delay slot */ - psx_delay_BFC08888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0888Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0888C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0888Cu); -#endif - if (psx_delay_BFC08888) { - psx_delay_BFC08888 = 0; - cpu->gpr[31] = 0xBFC08890u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C354u); - cpu->pc = 0xBFC0C354u; return; - } -label_BFC08890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08890u); -#endif - /* 0xBFC08890: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08890u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08894: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08898: 03E00008 jr $ra */ - psx_delay_BFC08898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0889Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0889C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0889Cu); -#endif - if (psx_delay_BFC08898) { - psx_delay_BFC08898 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC088A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC088A0u); - int psx_delay_BFC088CC = 0; - int psx_delay_BFC088FC = 0; - int psx_delay_BFC08908 = 0; - int psx_delay_BFC0892C = 0; - int psx_taken_BFC0892C = 0; - int psx_delay_BFC0894C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC088D4u: goto label_BFC088D4; - case 0xBFC088F8u: goto label_BFC088F8; - case 0xBFC08904u: goto label_BFC08904; - case 0xBFC08910u: goto label_BFC08910; - case 0xBFC08934u: goto label_BFC08934; - default: break; - } - } -label_BFC088A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC088A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC088A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC088A0: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC088A4: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088A4u); return; } g_debug_last_store_pc = 0xBFC088A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC088A8: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088A8u); return; } g_debug_last_store_pc = 0xBFC088A8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC088AC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088ACu); return; } g_debug_last_store_pc = 0xBFC088ACu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC088B0: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088B0u); return; } g_debug_last_store_pc = 0xBFC088B0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC088B4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC088B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC088B8: AC209F24 sw $zero, -24796($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24796; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088B8u); return; } g_debug_last_store_pc = 0xBFC088B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC088BC: AC209F20 sw $zero, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088BCu); return; } g_debug_last_store_pc = 0xBFC088BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F20u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC088C0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC088C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC088C4: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088C4u); return; } g_debug_last_store_pc = 0xBFC088C4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC088C8: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088C8u); return; } g_debug_last_store_pc = 0xBFC088C8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC088CC: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC088D4u; /* jal link before delay slot */ - psx_delay_BFC088CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC088D0: AC209F90 sw $zero, -24688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC088D0u); return; } g_debug_last_store_pc = 0xBFC088D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F90u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088D0u); -#endif - if (psx_delay_BFC088CC) { - psx_delay_BFC088CC = 0; - cpu->gpr[31] = 0xBFC088D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC088D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC088D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC088D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC088D4: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC088D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC088D8: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC088D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC088DC: 3C14A001 lui $s4, 0xA001 */ - cpu->gpr[20] = 0xA0010000u; - PGXP_ALU(0x3C14A001u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC088DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC088E0: 2694BE48 addiu $s4, $s4, -16824 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-16824)); - PGXP_ALU(0x2694BE48u, cpu->gpr[20], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC088E4: 2631BC68 addiu $s1, $s1, -17304 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-17304)); - PGXP_ALU(0x2631BC68u, cpu->gpr[17], _pgx1, 0xFFFFBC68u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC088E8: 2610BA88 addiu $s0, $s0, -17784 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-17784)); - PGXP_ALU(0x2610BA88u, cpu->gpr[16], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC088EC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC088F0: 241200A0 addiu $s2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x241200A0u, cpu->gpr[18], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC088F4: 3413FFFF ori $s3, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3413FFFFu, cpu->gpr[19], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088F4u); -#endif -label_BFC088F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC088F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC088F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC088F8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC088F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC088FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC088FC: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC08904u; /* jal link before delay slot */ - psx_delay_BFC088FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08900: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08900u); -#endif - if (psx_delay_BFC088FC) { - psx_delay_BFC088FC = 0; - cpu->gpr[31] = 0xBFC08904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC08904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08904: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08908: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC08910u; /* jal link before delay slot */ - psx_delay_BFC08908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0890Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0890C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0890Cu); -#endif - if (psx_delay_BFC08908) { - psx_delay_BFC08908 = 0; - cpu->gpr[31] = 0xBFC08910u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC08910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC08910: AE120000 sw $s2, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08910u); return; } g_debug_last_store_pc = 0xBFC08910u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAE120000u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC08914: AE1201E0 sw $s2, 480($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 480; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (480)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08914u); return; } g_debug_last_store_pc = 0xBFC08914u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAE1201E0u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC08918: A6130008 sh $s3, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08918u); return; } g_debug_last_store_pc = 0xBFC08918u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA6130008u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0891Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0891C: 26310020 addiu $s1, $s1, 32 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (32)); - PGXP_ALU(0x26310020u, cpu->gpr[17], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0891Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC08920: A61301E8 sh $s3, 488($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (488)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08920u); return; } g_debug_last_store_pc = 0xBFC08920u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA61301E8u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08924: AE000004 sw $zero, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08924u); return; } g_debug_last_store_pc = 0xBFC08924u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08928: AE0001E4 sw $zero, 484($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 484; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08928u); return; } g_debug_last_store_pc = 0xBFC08928u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE0001E4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0892Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120000u); -#endif - /* 0xBFC0892C: 1634FFF2 bne $s1, $s4, 0xBFC088F8 */ - uint32_t psx_brA_BFC0892C = cpu->gpr[17]; uint32_t psx_brB_BFC0892C = cpu->gpr[20]; - psx_taken_BFC0892C = (psx_brA_BFC0892C != psx_brB_BFC0892C); - psx_delay_BFC0892C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08930: 26100020 addiu $s0, $s0, 32 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (32)); - PGXP_ALU(0x26100020u, cpu->gpr[16], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08930u); -#endif - if (psx_delay_BFC0892C) { - psx_delay_BFC0892C = 0; - if (psx_taken_BFC0892C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC088F8u); - goto label_BFC088F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08934u); - } -label_BFC08934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08934u); -#endif - /* 0xBFC08934: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08934u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08938u); -#endif - /* 0xBFC08938: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08938u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0893Cu); -#endif - /* 0xBFC0893C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0893Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0893Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08940u); -#endif - /* 0xBFC08940: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08940u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08944u); -#endif - /* 0xBFC08944: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08944u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08948u); -#endif - /* 0xBFC08948: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08948u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0894Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0894C: 03E00008 jr $ra */ - psx_delay_BFC0894C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08950: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08950u); -#endif - if (psx_delay_BFC0894C) { - psx_delay_BFC0894C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0895C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0895Cu); - int psx_delay_BFC08980 = 0; - int psx_taken_BFC08980 = 0; - int psx_delay_BFC08988 = 0; - int psx_delay_BFC08994 = 0; - int psx_taken_BFC08994 = 0; - int psx_delay_BFC089A0 = 0; - int psx_taken_BFC089A0 = 0; - int psx_delay_BFC089A8 = 0; - int psx_taken_BFC089A8 = 0; - int psx_delay_BFC089B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0896Cu: goto label_BFC0896C; - case 0xBFC08978u: goto label_BFC08978; - case 0xBFC08988u: goto label_BFC08988; - case 0xBFC08990u: goto label_BFC08990; - case 0xBFC0899Cu: goto label_BFC0899C; - case 0xBFC089A8u: goto label_BFC089A8; - case 0xBFC089B0u: goto label_BFC089B0; - default: break; - } - } -label_BFC0895C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0895Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0895Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0895Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0895C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0895Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC08960: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08960u); return; } g_debug_last_store_pc = 0xBFC08960u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC08964: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08968: 24050005 addiu $a1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24050005u, cpu->gpr[5], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08968u); -#endif -label_BFC0896C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0896Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0896Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0896Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0896C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0896Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC08970: 2442B9D0 addiu $v0, $v0, -17968 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-17968)); - PGXP_ALU(0x2442B9D0u, cpu->gpr[2], _pgx1, 0xFFFFB9D0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08974: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08974u); -#endif -label_BFC08978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08978u); -#endif - /* 0xBFC08978: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08978u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0897C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC08980: 148E0006 bne $a0, $t6, 0xBFC0899C */ - uint32_t psx_brA_BFC08980 = cpu->gpr[4]; uint32_t psx_brB_BFC08980 = cpu->gpr[14]; - psx_taken_BFC08980 = (psx_brA_BFC08980 != psx_brB_BFC08980); - psx_delay_BFC08980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08984u); -#endif - if (psx_delay_BFC08980) { - psx_delay_BFC08980 = 0; - if (psx_taken_BFC08980) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0899Cu); - goto label_BFC0899C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08988u); - } -label_BFC08988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08988: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC08990u; /* jal link before delay slot */ - psx_delay_BFC08988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0898Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0898C: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0898Cu); return; } g_debug_last_store_pc = 0xBFC0898Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0898Cu); -#endif - if (psx_delay_BFC08988) { - psx_delay_BFC08988 = 0; - cpu->gpr[31] = 0xBFC08990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC08990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08990u); -#endif - /* 0xBFC08990: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08990u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08994: 10000006 beq $zero, $zero, 0xBFC089B0 */ - uint32_t psx_brA_BFC08994 = cpu->gpr[0]; uint32_t psx_brB_BFC08994 = cpu->gpr[0]; - psx_taken_BFC08994 = (psx_brA_BFC08994 == psx_brB_BFC08994); - psx_delay_BFC08994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC08998: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08998u); -#endif - if (psx_delay_BFC08994) { - psx_delay_BFC08994 = 0; - if (psx_taken_BFC08994) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089B0u); - goto label_BFC089B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0899Cu); - } -label_BFC0899C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0899Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0899Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0899Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0899C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0899Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC089A0: 1465FFF5 bne $v1, $a1, 0xBFC08978 */ - uint32_t psx_brA_BFC089A0 = cpu->gpr[3]; uint32_t psx_brB_BFC089A0 = cpu->gpr[5]; - psx_taken_BFC089A0 = (psx_brA_BFC089A0 != psx_brB_BFC089A0); - psx_delay_BFC089A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC089A4: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089A4u); -#endif - if (psx_delay_BFC089A0) { - psx_delay_BFC089A0 = 0; - if (psx_taken_BFC089A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08978u); - goto label_BFC08978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089A8u); - } -label_BFC089A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC089A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC089A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC089A8: 1000FFF0 beq $zero, $zero, 0xBFC0896C */ - uint32_t psx_brA_BFC089A8 = cpu->gpr[0]; uint32_t psx_brB_BFC089A8 = cpu->gpr[0]; - psx_taken_BFC089A8 = (psx_brA_BFC089A8 == psx_brB_BFC089A8); - psx_delay_BFC089A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC089AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC089ACu); -#endif - if (psx_delay_BFC089A8) { - psx_delay_BFC089A8 = 0; - if (psx_taken_BFC089A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0896Cu); - goto label_BFC0896C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089B0u); - } -label_BFC089B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC089B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC089B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089B0u); -#endif - /* 0xBFC089B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC089B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC089B4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC089B8: 03E00008 jr $ra */ - psx_delay_BFC089B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC089BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC089BCu); -#endif - if (psx_delay_BFC089B8) { - psx_delay_BFC089B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC089C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC089C0u); - int psx_delay_BFC089E8 = 0; - int psx_taken_BFC089E8 = 0; - int psx_delay_BFC08A04 = 0; - int psx_delay_BFC08A10 = 0; - int psx_taken_BFC08A10 = 0; - int psx_delay_BFC08A18 = 0; - int psx_delay_BFC08A20 = 0; - int psx_taken_BFC08A20 = 0; - int psx_delay_BFC08A30 = 0; - int psx_taken_BFC08A30 = 0; - int psx_delay_BFC08A40 = 0; - int psx_taken_BFC08A40 = 0; - int psx_delay_BFC08A54 = 0; - int psx_taken_BFC08A54 = 0; - int psx_delay_BFC08A5C = 0; - int psx_delay_BFC08A64 = 0; - int psx_taken_BFC08A64 = 0; - int psx_delay_BFC08A6C = 0; - int psx_taken_BFC08A6C = 0; - int psx_delay_BFC08A78 = 0; - int psx_taken_BFC08A78 = 0; - int psx_delay_BFC08A80 = 0; - int psx_taken_BFC08A80 = 0; - int psx_delay_BFC08A88 = 0; - int psx_delay_BFC08A90 = 0; - int psx_taken_BFC08A90 = 0; - int psx_delay_BFC08AC4 = 0; - int psx_delay_BFC08AD0 = 0; - int psx_taken_BFC08AD0 = 0; - int psx_delay_BFC08B18 = 0; - int psx_taken_BFC08B18 = 0; - int psx_delay_BFC08B34 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC089F0u: goto label_BFC089F0; - case 0xBFC089F4u: goto label_BFC089F4; - case 0xBFC08A0Cu: goto label_BFC08A0C; - case 0xBFC08A18u: goto label_BFC08A18; - case 0xBFC08A20u: goto label_BFC08A20; - case 0xBFC08A28u: goto label_BFC08A28; - case 0xBFC08A38u: goto label_BFC08A38; - case 0xBFC08A48u: goto label_BFC08A48; - case 0xBFC08A5Cu: goto label_BFC08A5C; - case 0xBFC08A64u: goto label_BFC08A64; - case 0xBFC08A6Cu: goto label_BFC08A6C; - case 0xBFC08A74u: goto label_BFC08A74; - case 0xBFC08A78u: goto label_BFC08A78; - case 0xBFC08A80u: goto label_BFC08A80; - case 0xBFC08A88u: goto label_BFC08A88; - case 0xBFC08A90u: goto label_BFC08A90; - case 0xBFC08A98u: goto label_BFC08A98; - case 0xBFC08A9Cu: goto label_BFC08A9C; - case 0xBFC08AC0u: goto label_BFC08AC0; - case 0xBFC08ACCu: goto label_BFC08ACC; - case 0xBFC08AD8u: goto label_BFC08AD8; - case 0xBFC08B00u: goto label_BFC08B00; - case 0xBFC08B20u: goto label_BFC08B20; - case 0xBFC08B24u: goto label_BFC08B24; - case 0xBFC08B28u: goto label_BFC08B28; - default: break; - } - } -label_BFC089C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC089C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC089C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC089C0: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC089C4: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC089C4u); return; } g_debug_last_store_pc = 0xBFC089C4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC089C8: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC089CC: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC089CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC089D0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC089D0u); return; } g_debug_last_store_pc = 0xBFC089D0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC089D4: 25EFBE48 addiu $t7, $t7, -16824 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16824)); - PGXP_ALU(0x25EFBE48u, cpu->gpr[15], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC089D8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC089D8u); return; } g_debug_last_store_pc = 0xBFC089D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC089DC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC089DCu); return; } g_debug_last_store_pc = 0xBFC089DCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC089E0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC089E4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC089E8: 06210002 bgez $s1, 0xBFC089F4 */ - uint32_t psx_brA_BFC089E8 = cpu->gpr[17]; - psx_taken_BFC089E8 = ((int32_t)psx_brA_BFC089E8 >= 0); - psx_delay_BFC089E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC089EC: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089ECu); -#endif - if (psx_delay_BFC089E8) { - psx_delay_BFC089E8 = 0; - if (psx_taken_BFC089E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089F4u); - goto label_BFC089F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089F0u); - } -label_BFC089F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC089F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC089F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC089F0: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089F0u); -#endif -label_BFC089F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC089F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC089F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC089F4: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC089F8: 000271C0 sll $t6, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 7u; - PGXP_ALU(0x000271C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC089FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC089FC: 01CF8021 addu $s0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC089FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC08A00: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08A04: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC08A0Cu; /* jal link before delay slot */ - psx_delay_BFC08A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC08A08: AFA2002C sw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A08u); return; } g_debug_last_store_pc = 0xBFC08A08u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A08u); -#endif - if (psx_delay_BFC08A04) { - psx_delay_BFC08A04 = 0; - cpu->gpr[31] = 0xBFC08A0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC08A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC08A0C: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC08A10: 14520022 bne $v0, $s2, 0xBFC08A9C */ - uint32_t psx_brA_BFC08A10 = cpu->gpr[2]; uint32_t psx_brB_BFC08A10 = cpu->gpr[18]; - psx_taken_BFC08A10 = (psx_brA_BFC08A10 != psx_brB_BFC08A10); - psx_delay_BFC08A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A14u); -#endif - /* 0xBFC08A14: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A14u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A14u); -#endif - if (psx_delay_BFC08A10) { - psx_delay_BFC08A10 = 0; - if (psx_taken_BFC08A10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A9Cu); - goto label_BFC08A9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A18u); - } -label_BFC08A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08A18: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC08A20u; /* jal link before delay slot */ - psx_delay_BFC08A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08A1Cu); -#endif - if (psx_delay_BFC08A18) { - psx_delay_BFC08A18 = 0; - cpu->gpr[31] = 0xBFC08A20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC08A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08A20: 14400015 bne $v0, $zero, 0xBFC08A78 */ - uint32_t psx_brA_BFC08A20 = cpu->gpr[2]; uint32_t psx_brB_BFC08A20 = cpu->gpr[0]; - psx_taken_BFC08A20 = (psx_brA_BFC08A20 != psx_brB_BFC08A20); - psx_delay_BFC08A20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08A24: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A24u); -#endif - if (psx_delay_BFC08A20) { - psx_delay_BFC08A20 = 0; - if (psx_taken_BFC08A20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A78u); - goto label_BFC08A78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A28u); - } -label_BFC08A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A28u); -#endif - /* 0xBFC08A28: 92180000 lbu $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 24, 0x10000u); - PGXP_LOAD(0x92180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08A2C: 2401004D addiu $at, $zero, 77 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); - PGXP_ALU(0x2401004Du, cpu->gpr[1], _pgx1, 0x0000004Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC08A30: 17010005 bne $t8, $at, 0xBFC08A48 */ - uint32_t psx_brA_BFC08A30 = cpu->gpr[24]; uint32_t psx_brB_BFC08A30 = cpu->gpr[1]; - psx_taken_BFC08A30 = (psx_brA_BFC08A30 != psx_brB_BFC08A30); - psx_delay_BFC08A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08A34u); -#endif - if (psx_delay_BFC08A30) { - psx_delay_BFC08A30 = 0; - if (psx_taken_BFC08A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A48u); - goto label_BFC08A48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A38u); - } -label_BFC08A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A38u); -#endif - /* 0xBFC08A38: 92190001 lbu $t9, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 25, 0x10000u); - PGXP_LOAD(0x92190001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08A3C: 24010043 addiu $at, $zero, 67 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); - PGXP_ALU(0x24010043u, cpu->gpr[1], _pgx1, 0x00000043u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC08A40: 1321000A beq $t9, $at, 0xBFC08A6C */ - uint32_t psx_brA_BFC08A40 = cpu->gpr[25]; uint32_t psx_brB_BFC08A40 = cpu->gpr[1]; - psx_taken_BFC08A40 = (psx_brA_BFC08A40 == psx_brB_BFC08A40); - psx_delay_BFC08A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08A44u); -#endif - if (psx_delay_BFC08A40) { - psx_delay_BFC08A40 = 0; - if (psx_taken_BFC08A40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A6Cu); - goto label_BFC08A6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A48u); - } -label_BFC08A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC08A48: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A4Cu); -#endif - /* 0xBFC08A4C: 8D089F90 lw $t0, -24688($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A4Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089F90u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC08A54: 15120011 bne $t0, $s2, 0xBFC08A9C */ - uint32_t psx_brA_BFC08A54 = cpu->gpr[8]; uint32_t psx_brB_BFC08A54 = cpu->gpr[18]; - psx_taken_BFC08A54 = (psx_brA_BFC08A54 != psx_brB_BFC08A54); - psx_delay_BFC08A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A58u); -#endif - /* 0xBFC08A58: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A58u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A58u); -#endif - if (psx_delay_BFC08A54) { - psx_delay_BFC08A54 = 0; - if (psx_taken_BFC08A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A9Cu); - goto label_BFC08A9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A5Cu); - } -label_BFC08A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08A5C: 0FF02C5C jal 0xBFC0B170 */ - cpu->gpr[31] = 0xBFC08A64u; /* jal link before delay slot */ - psx_delay_BFC08A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08A60: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A60u); -#endif - if (psx_delay_BFC08A5C) { - psx_delay_BFC08A5C = 0; - cpu->gpr[31] = 0xBFC08A64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B170u); - cpu->pc = 0xBFC0B170u; return; - } -label_BFC08A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A64: 10000030 beq $zero, $zero, 0xBFC08B28 */ - uint32_t psx_brA_BFC08A64 = cpu->gpr[0]; uint32_t psx_brB_BFC08A64 = cpu->gpr[0]; - psx_taken_BFC08A64 = (psx_brA_BFC08A64 == psx_brB_BFC08A64); - psx_delay_BFC08A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A68u); -#endif - /* 0xBFC08A68: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A68u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A68u); -#endif - if (psx_delay_BFC08A64) { - psx_delay_BFC08A64 = 0; - if (psx_taken_BFC08A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B28u); - goto label_BFC08B28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A6Cu); - } -label_BFC08A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A6C: 1000002D beq $zero, $zero, 0xBFC08B24 */ - uint32_t psx_brA_BFC08A6C = cpu->gpr[0]; uint32_t psx_brB_BFC08A6C = cpu->gpr[0]; - psx_taken_BFC08A6C = (psx_brA_BFC08A6C == psx_brB_BFC08A6C); - psx_delay_BFC08A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08A70: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A70u); -#endif - if (psx_delay_BFC08A6C) { - psx_delay_BFC08A6C = 0; - if (psx_taken_BFC08A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B24u); - goto label_BFC08B24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A74u); - } -label_BFC08A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08A74: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A74u); -#endif -label_BFC08A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC08A78: 10410003 beq $v0, $at, 0xBFC08A88 */ - uint32_t psx_brA_BFC08A78 = cpu->gpr[2]; uint32_t psx_brB_BFC08A78 = cpu->gpr[1]; - psx_taken_BFC08A78 = (psx_brA_BFC08A78 == psx_brB_BFC08A78); - psx_delay_BFC08A78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08A7Cu); -#endif - if (psx_delay_BFC08A78) { - psx_delay_BFC08A78 = 0; - if (psx_taken_BFC08A78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A88u); - goto label_BFC08A88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A80u); - } -label_BFC08A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A80: 10000028 beq $zero, $zero, 0xBFC08B24 */ - uint32_t psx_brA_BFC08A80 = cpu->gpr[0]; uint32_t psx_brB_BFC08A80 = cpu->gpr[0]; - psx_taken_BFC08A80 = (psx_brA_BFC08A80 == psx_brB_BFC08A80); - psx_delay_BFC08A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08A84: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A84u); -#endif - if (psx_delay_BFC08A80) { - psx_delay_BFC08A80 = 0; - if (psx_taken_BFC08A80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B24u); - goto label_BFC08B24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A88u); - } -label_BFC08A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08A88: 0FF022CF jal 0xBFC08B3C */ - cpu->gpr[31] = 0xBFC08A90u; /* jal link before delay slot */ - psx_delay_BFC08A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC08A8C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A8Cu); -#endif - if (psx_delay_BFC08A88) { - psx_delay_BFC08A88 = 0; - cpu->gpr[31] = 0xBFC08A90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B3Cu); - cpu->pc = 0xBFC08B3Cu; return; - } -label_BFC08A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08A90: 10000025 beq $zero, $zero, 0xBFC08B28 */ - uint32_t psx_brA_BFC08A90 = cpu->gpr[0]; uint32_t psx_brB_BFC08A90 = cpu->gpr[0]; - psx_taken_BFC08A90 = (psx_brA_BFC08A90 == psx_brB_BFC08A90); - psx_delay_BFC08A90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A94u); -#endif - /* 0xBFC08A94: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A94u); -#endif - if (psx_delay_BFC08A90) { - psx_delay_BFC08A90 = 0; - if (psx_taken_BFC08A90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B28u); - goto label_BFC08B28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08A98u); - } -label_BFC08A98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A98u); -#endif - /* 0xBFC08A98: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08A98u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08A98u); -#endif -label_BFC08A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC08A9C: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC08AA0: 00095100 sll $t2, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00095100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC08AA4: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08AA8: 000A5140 sll $t2, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC08AAC: 256BBA88 addiu $t3, $t3, -17784 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-17784)); - PGXP_ALU(0x256BBA88u, cpu->gpr[11], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC08AB0: 014B9021 addu $s2, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[18] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08AB4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC08AB8: 2411000F addiu $s1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2411000Fu, cpu->gpr[17], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC08ABC: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08ABCu); -#endif -label_BFC08AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41010u); -#endif - /* 0xBFC08AC0: 024C2021 addu $a0, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08AC4: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC08ACCu; /* jal link before delay slot */ - psx_delay_BFC08AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08AC8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AC8u); -#endif - if (psx_delay_BFC08AC4) { - psx_delay_BFC08AC4 = 0; - cpu->gpr[31] = 0xBFC08ACCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC08ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08ACC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC08AD0: 1611FFFB bne $s0, $s1, 0xBFC08AC0 */ - uint32_t psx_brA_BFC08AD0 = cpu->gpr[16]; uint32_t psx_brB_BFC08AD0 = cpu->gpr[17]; - psx_taken_BFC08AD0 = (psx_brA_BFC08AD0 != psx_brB_BFC08AD0); - psx_delay_BFC08AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC08AD4: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AD4u); -#endif - if (psx_delay_BFC08AD0) { - psx_delay_BFC08AD0 = 0; - if (psx_taken_BFC08AD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08AC0u); - goto label_BFC08AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08AD8u); - } -label_BFC08AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AD8u); -#endif - /* 0xBFC08AD8: 8FAD002C lw $t5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08AD8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD002Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08ADC: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC08AE0: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC08AE4: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC08AE8: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08AEC: 25EFB9E8 addiu $t7, $t7, -17944 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17944)); - PGXP_ALU(0x25EFB9E8u, cpu->gpr[15], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC08AF0: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08AF4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08AF8: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC08AFC: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08AFCu); -#endif -label_BFC08B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC08B00: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000024u); -#endif - /* 0xBFC08B04: 00B81021 addu $v0, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08B08: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B08u); return; } g_debug_last_store_pc = 0xBFC08B08u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08B0C: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08B10: AC430004 sw $v1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B10u); return; } g_debug_last_store_pc = 0xBFC08B10u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08B14: AC430008 sw $v1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B14u); return; } g_debug_last_store_pc = 0xBFC08B14u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC08B18: 1604FFF9 bne $s0, $a0, 0xBFC08B00 */ - uint32_t psx_brA_BFC08B18 = cpu->gpr[16]; uint32_t psx_brB_BFC08B18 = cpu->gpr[4]; - psx_taken_BFC08B18 = (psx_brA_BFC08B18 != psx_brB_BFC08B18); - psx_delay_BFC08B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08B1C: AC43000C sw $v1, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B1Cu); return; } g_debug_last_store_pc = 0xBFC08B1Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B1Cu); -#endif - if (psx_delay_BFC08B18) { - psx_delay_BFC08B18 = 0; - if (psx_taken_BFC08B18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B00u); - goto label_BFC08B00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B20u); - } -label_BFC08B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08B20: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B20u); -#endif -label_BFC08B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B24u); -#endif - /* 0xBFC08B24: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B24u); -#endif -label_BFC08B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B28u); -#endif - /* 0xBFC08B28: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B28u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B2Cu); -#endif - /* 0xBFC08B2C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B2Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B30u); -#endif - /* 0xBFC08B30: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B30u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08B34: 03E00008 jr $ra */ - psx_delay_BFC08B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08B38: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B38u); -#endif - if (psx_delay_BFC08B34) { - psx_delay_BFC08B34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08B3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08B3Cu); - int psx_delay_BFC08B5C = 0; - int psx_delay_BFC08B74 = 0; - int psx_taken_BFC08B74 = 0; - int psx_delay_BFC08B90 = 0; - int psx_delay_BFC08B9C = 0; - int psx_taken_BFC08B9C = 0; - int psx_delay_BFC08BA4 = 0; - int psx_delay_BFC08BAC = 0; - int psx_taken_BFC08BAC = 0; - int psx_delay_BFC08BEC = 0; - int psx_taken_BFC08BEC = 0; - int psx_delay_BFC08BFC = 0; - int psx_taken_BFC08BFC = 0; - int psx_delay_BFC08C0C = 0; - int psx_taken_BFC08C0C = 0; - int psx_delay_BFC08C20 = 0; - int psx_taken_BFC08C20 = 0; - int psx_delay_BFC08C2C = 0; - int psx_delay_BFC08C34 = 0; - int psx_taken_BFC08C34 = 0; - int psx_delay_BFC08C74 = 0; - int psx_taken_BFC08C74 = 0; - int psx_delay_BFC08C7C = 0; - int psx_delay_BFC08C8C = 0; - int psx_delay_BFC08C94 = 0; - int psx_delay_BFC08CD0 = 0; - int psx_delay_BFC08CE8 = 0; - int psx_taken_BFC08CE8 = 0; - int psx_delay_BFC08D00 = 0; - int psx_delay_BFC08D08 = 0; - int psx_taken_BFC08D08 = 0; - int psx_delay_BFC08D10 = 0; - int psx_delay_BFC08D18 = 0; - int psx_taken_BFC08D18 = 0; - int psx_delay_BFC08D3C = 0; - int psx_taken_BFC08D3C = 0; - int psx_delay_BFC08D44 = 0; - int psx_delay_BFC08D4C = 0; - int psx_taken_BFC08D4C = 0; - int psx_delay_BFC08D70 = 0; - int psx_taken_BFC08D70 = 0; - int psx_delay_BFC08D84 = 0; - int psx_delay_BFC08D90 = 0; - int psx_taken_BFC08D90 = 0; - int psx_delay_BFC08DB0 = 0; - int psx_delay_BFC08DBC = 0; - int psx_taken_BFC08DBC = 0; - int psx_delay_BFC08DCC = 0; - int psx_taken_BFC08DCC = 0; - int psx_delay_BFC08DFC = 0; - int psx_taken_BFC08DFC = 0; - int psx_delay_BFC08E24 = 0; - int psx_taken_BFC08E24 = 0; - int psx_delay_BFC08E2C = 0; - int psx_taken_BFC08E2C = 0; - int psx_delay_BFC08E4C = 0; - int psx_taken_BFC08E4C = 0; - int psx_delay_BFC08E60 = 0; - int psx_taken_BFC08E60 = 0; - int psx_delay_BFC08E68 = 0; - int psx_taken_BFC08E68 = 0; - int psx_delay_BFC08E98 = 0; - int psx_taken_BFC08E98 = 0; - int psx_delay_BFC08EA0 = 0; - int psx_taken_BFC08EA0 = 0; - int psx_delay_BFC08EB0 = 0; - int psx_taken_BFC08EB0 = 0; - int psx_delay_BFC08ECC = 0; - int psx_taken_BFC08ECC = 0; - int psx_delay_BFC08EF0 = 0; - int psx_taken_BFC08EF0 = 0; - int psx_delay_BFC08F20 = 0; - int psx_delay_BFC08F28 = 0; - int psx_taken_BFC08F28 = 0; - int psx_delay_BFC08F30 = 0; - int psx_delay_BFC08F38 = 0; - int psx_taken_BFC08F38 = 0; - int psx_delay_BFC08F40 = 0; - int psx_taken_BFC08F40 = 0; - int psx_delay_BFC08F48 = 0; - int psx_delay_BFC08F50 = 0; - int psx_taken_BFC08F50 = 0; - int psx_delay_BFC08F58 = 0; - int psx_taken_BFC08F58 = 0; - int psx_delay_BFC08F6C = 0; - int psx_delay_BFC08F7C = 0; - int psx_taken_BFC08F7C = 0; - int psx_delay_BFC08F84 = 0; - int psx_taken_BFC08F84 = 0; - int psx_delay_BFC08F94 = 0; - int psx_delay_BFC08FA0 = 0; - int psx_taken_BFC08FA0 = 0; - int psx_delay_BFC08FCC = 0; - int psx_taken_BFC08FCC = 0; - int psx_delay_BFC08FF4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC08B64u: goto label_BFC08B64; - case 0xBFC08B7Cu: goto label_BFC08B7C; - case 0xBFC08B80u: goto label_BFC08B80; - case 0xBFC08B98u: goto label_BFC08B98; - case 0xBFC08BA4u: goto label_BFC08BA4; - case 0xBFC08BACu: goto label_BFC08BAC; - case 0xBFC08BB4u: goto label_BFC08BB4; - case 0xBFC08BB8u: goto label_BFC08BB8; - case 0xBFC08BF4u: goto label_BFC08BF4; - case 0xBFC08C04u: goto label_BFC08C04; - case 0xBFC08C14u: goto label_BFC08C14; - case 0xBFC08C28u: goto label_BFC08C28; - case 0xBFC08C34u: goto label_BFC08C34; - case 0xBFC08C3Cu: goto label_BFC08C3C; - case 0xBFC08C40u: goto label_BFC08C40; - case 0xBFC08C7Cu: goto label_BFC08C7C; - case 0xBFC08C84u: goto label_BFC08C84; - case 0xBFC08C94u: goto label_BFC08C94; - case 0xBFC08C9Cu: goto label_BFC08C9C; - case 0xBFC08CC0u: goto label_BFC08CC0; - case 0xBFC08CD8u: goto label_BFC08CD8; - case 0xBFC08CF0u: goto label_BFC08CF0; - case 0xBFC08CF8u: goto label_BFC08CF8; - case 0xBFC08D08u: goto label_BFC08D08; - case 0xBFC08D10u: goto label_BFC08D10; - case 0xBFC08D18u: goto label_BFC08D18; - case 0xBFC08D20u: goto label_BFC08D20; - case 0xBFC08D24u: goto label_BFC08D24; - case 0xBFC08D44u: goto label_BFC08D44; - case 0xBFC08D4Cu: goto label_BFC08D4C; - case 0xBFC08D54u: goto label_BFC08D54; - case 0xBFC08D78u: goto label_BFC08D78; - case 0xBFC08D7Cu: goto label_BFC08D7C; - case 0xBFC08D8Cu: goto label_BFC08D8C; - case 0xBFC08D98u: goto label_BFC08D98; - case 0xBFC08DA4u: goto label_BFC08DA4; - case 0xBFC08DB8u: goto label_BFC08DB8; - case 0xBFC08DC4u: goto label_BFC08DC4; - case 0xBFC08DC8u: goto label_BFC08DC8; - case 0xBFC08DD4u: goto label_BFC08DD4; - case 0xBFC08DECu: goto label_BFC08DEC; - case 0xBFC08E04u: goto label_BFC08E04; - case 0xBFC08E18u: goto label_BFC08E18; - case 0xBFC08E2Cu: goto label_BFC08E2C; - case 0xBFC08E34u: goto label_BFC08E34; - case 0xBFC08E38u: goto label_BFC08E38; - case 0xBFC08E54u: goto label_BFC08E54; - case 0xBFC08E58u: goto label_BFC08E58; - case 0xBFC08E68u: goto label_BFC08E68; - case 0xBFC08E70u: goto label_BFC08E70; - case 0xBFC08E74u: goto label_BFC08E74; - case 0xBFC08EA0u: goto label_BFC08EA0; - case 0xBFC08EA8u: goto label_BFC08EA8; - case 0xBFC08EB8u: goto label_BFC08EB8; - case 0xBFC08EC4u: goto label_BFC08EC4; - case 0xBFC08ED4u: goto label_BFC08ED4; - case 0xBFC08EECu: goto label_BFC08EEC; - case 0xBFC08EF8u: goto label_BFC08EF8; - case 0xBFC08F1Cu: goto label_BFC08F1C; - case 0xBFC08F28u: goto label_BFC08F28; - case 0xBFC08F30u: goto label_BFC08F30; - case 0xBFC08F38u: goto label_BFC08F38; - case 0xBFC08F40u: goto label_BFC08F40; - case 0xBFC08F48u: goto label_BFC08F48; - case 0xBFC08F50u: goto label_BFC08F50; - case 0xBFC08F58u: goto label_BFC08F58; - case 0xBFC08F60u: goto label_BFC08F60; - case 0xBFC08F64u: goto label_BFC08F64; - case 0xBFC08F74u: goto label_BFC08F74; - case 0xBFC08F84u: goto label_BFC08F84; - case 0xBFC08F8Cu: goto label_BFC08F8C; - case 0xBFC08F90u: goto label_BFC08F90; - case 0xBFC08F9Cu: goto label_BFC08F9C; - case 0xBFC08FA8u: goto label_BFC08FA8; - case 0xBFC08FB4u: goto label_BFC08FB4; - case 0xBFC08FD4u: goto label_BFC08FD4; - case 0xBFC08FD8u: goto label_BFC08FD8; - case 0xBFC08FDCu: goto label_BFC08FDC; - default: break; - } - } -label_BFC08B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08B3C: 27BDFF58 addiu $sp, $sp, -168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-168)); - PGXP_ALU(0x27BDFF58u, cpu->gpr[29], _pgx1, 0xFFFFFF58u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC08B40: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B40u); return; } g_debug_last_store_pc = 0xBFC08B40u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC08B44: AFB50030 sw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B44u); return; } g_debug_last_store_pc = 0xBFC08B44u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC08B48: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B48u); return; } g_debug_last_store_pc = 0xBFC08B48u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC08B4C: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B4Cu); return; } g_debug_last_store_pc = 0xBFC08B4Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC08B50: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B50u); return; } g_debug_last_store_pc = 0xBFC08B50u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC08B54: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B54u); return; } g_debug_last_store_pc = 0xBFC08B54u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC08B58: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B58u); return; } g_debug_last_store_pc = 0xBFC08B58u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08B5C: 0FF03684 jal 0xBFC0DA10 */ - cpu->gpr[31] = 0xBFC08B64u; /* jal link before delay slot */ - psx_delay_BFC08B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC08B60: AFA400A8 sw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B60u); return; } g_debug_last_store_pc = 0xBFC08B60u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B60u); -#endif - if (psx_delay_BFC08B5C) { - psx_delay_BFC08B5C = 0; - cpu->gpr[31] = 0xBFC08B64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA10u); - cpu->pc = 0xBFC0DA10u; return; - } -label_BFC08B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B64u); -#endif - /* 0xBFC08B64: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08B68: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08B6C: 25EFBE48 addiu $t7, $t7, -16824 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16824)); - PGXP_ALU(0x25EFBE48u, cpu->gpr[15], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08B70: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08B74: 04810002 bgez $a0, 0xBFC08B80 */ - uint32_t psx_brA_BFC08B74 = cpu->gpr[4]; - psx_taken_BFC08B74 = ((int32_t)psx_brA_BFC08B74 >= 0); - psx_delay_BFC08B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC08B78: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B78u); -#endif - if (psx_delay_BFC08B74) { - psx_delay_BFC08B74 = 0; - if (psx_taken_BFC08B74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B80u); - goto label_BFC08B80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B7Cu); - } -label_BFC08B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08B7C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B7Cu); -#endif -label_BFC08B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC08B80: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC08B84: 000271C0 sll $t6, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 7u; - PGXP_ALU(0x000271C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8C000u); -#endif - /* 0xBFC08B88: 01CF9821 addu $s3, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[19] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC08B8C: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08B90: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC08B98u; /* jal link before delay slot */ - psx_delay_BFC08B90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC08B94: AFA2004C sw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08B94u); return; } g_debug_last_store_pc = 0xBFC08B94u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B94u); -#endif - if (psx_delay_BFC08B90) { - psx_delay_BFC08B90 = 0; - cpu->gpr[31] = 0xBFC08B98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC08B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC08B98: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC08B9C: 14550006 bne $v0, $s5, 0xBFC08BB8 */ - uint32_t psx_brA_BFC08B9C = cpu->gpr[2]; uint32_t psx_brB_BFC08B9C = cpu->gpr[21]; - psx_taken_BFC08B9C = (psx_brA_BFC08B9C != psx_brB_BFC08B9C); - psx_delay_BFC08B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BA0u); -#endif - /* 0xBFC08BA0: 8FA2004C lw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08BA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BA0u); -#endif - if (psx_delay_BFC08B9C) { - psx_delay_BFC08B9C = 0; - if (psx_taken_BFC08B9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08BB8u); - goto label_BFC08BB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08BA4u); - } -label_BFC08BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08BA4: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC08BACu; /* jal link before delay slot */ - psx_delay_BFC08BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08BA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08BA8u); -#endif - if (psx_delay_BFC08BA4) { - psx_delay_BFC08BA4 = 0; - cpu->gpr[31] = 0xBFC08BACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC08BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08BAC: 14400011 bne $v0, $zero, 0xBFC08BF4 */ - uint32_t psx_brA_BFC08BAC = cpu->gpr[2]; uint32_t psx_brB_BFC08BAC = cpu->gpr[0]; - psx_taken_BFC08BAC = (psx_brA_BFC08BAC != psx_brB_BFC08BAC); - psx_delay_BFC08BAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08BB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08BB0u); -#endif - if (psx_delay_BFC08BAC) { - psx_delay_BFC08BAC = 0; - if (psx_taken_BFC08BAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08BF4u); - goto label_BFC08BF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08BB4u); - } -label_BFC08BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BB4u); -#endif - /* 0xBFC08BB4: 8FA2004C lw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08BB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BB4u); -#endif -label_BFC08BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08BB8: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08BBC: 0002C100 sll $t8, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 4u; - PGXP_ALU(0x0002C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC08BC0: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08BC4: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC08BC8: 01224821 addu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[2]; - PGXP_ALU(0x01224821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08BCC: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08BD0: 0018C140 sll $t8, $t8, 5 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 5u; - PGXP_ALU(0x0018C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC08BD4: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08BD8: 254AB9E8 addiu $t2, $t2, -17944 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-17944)); - PGXP_ALU(0x254AB9E8u, cpu->gpr[10], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08BDC: 2739BA88 addiu $t9, $t9, -17784 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-17784)); - PGXP_ALU(0x2739BA88u, cpu->gpr[25], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3040000u); -#endif - /* 0xBFC08BE0: 03199021 addu $s2, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[18] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03199021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC08BE4: 012A8821 addu $s1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[17] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08BE8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08BEC: 100000E7 beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08BEC = cpu->gpr[0]; uint32_t psx_brB_BFC08BEC = cpu->gpr[0]; - psx_taken_BFC08BEC = (psx_brA_BFC08BEC == psx_brB_BFC08BEC); - psx_delay_BFC08BEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC08BF0: 2414000F addiu $s4, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2414000Fu, cpu->gpr[20], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BF0u); -#endif - if (psx_delay_BFC08BEC) { - psx_delay_BFC08BEC = 0; - if (psx_taken_BFC08BEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08BF4u); - } -label_BFC08BF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08BF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BF4u); -#endif - /* 0xBFC08BF4: 926B0000 lbu $t3, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 11, 0x80000u); - PGXP_LOAD(0x926B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08BF8: 2401004D addiu $at, $zero, 77 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); - PGXP_ALU(0x2401004Du, cpu->gpr[1], _pgx1, 0x0000004Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC08BFC: 15610005 bne $t3, $at, 0xBFC08C14 */ - uint32_t psx_brA_BFC08BFC = cpu->gpr[11]; uint32_t psx_brB_BFC08BFC = cpu->gpr[1]; - psx_taken_BFC08BFC = (psx_brA_BFC08BFC != psx_brB_BFC08BFC); - psx_delay_BFC08BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C00u); -#endif - if (psx_delay_BFC08BFC) { - psx_delay_BFC08BFC = 0; - if (psx_taken_BFC08BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C14u); - goto label_BFC08C14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C04u); - } -label_BFC08C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C04u); -#endif - /* 0xBFC08C04: 926C0001 lbu $t4, 1($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 1; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (1)), 12, 0x80000u); - PGXP_LOAD(0x926C0001u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08C08: 24010043 addiu $at, $zero, 67 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); - PGXP_ALU(0x24010043u, cpu->gpr[1], _pgx1, 0x00000043u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC08C0C: 1181001B beq $t4, $at, 0xBFC08C7C */ - uint32_t psx_brA_BFC08C0C = cpu->gpr[12]; uint32_t psx_brB_BFC08C0C = cpu->gpr[1]; - psx_taken_BFC08C0C = (psx_brA_BFC08C0C == psx_brB_BFC08C0C); - psx_delay_BFC08C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C10u); -#endif - if (psx_delay_BFC08C0C) { - psx_delay_BFC08C0C = 0; - if (psx_taken_BFC08C0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C7Cu); - goto label_BFC08C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C14u); - } -label_BFC08C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC08C14: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C18u); -#endif - /* 0xBFC08C18: 8DAD9F90 lw $t5, -24688($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C18u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9F90u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC08C20: 15B50007 bne $t5, $s5, 0xBFC08C40 */ - uint32_t psx_brA_BFC08C20 = cpu->gpr[13]; uint32_t psx_brB_BFC08C20 = cpu->gpr[21]; - psx_taken_BFC08C20 = (psx_brA_BFC08C20 != psx_brB_BFC08C20); - psx_delay_BFC08C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C24u); -#endif - /* 0xBFC08C24: 8FA2004C lw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C24u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C24u); -#endif - if (psx_delay_BFC08C20) { - psx_delay_BFC08C20 = 0; - if (psx_taken_BFC08C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C40u); - goto label_BFC08C40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C28u); - } -label_BFC08C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C28u); -#endif - /* 0xBFC08C28: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C28u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08C2C: 0FF02C5C jal 0xBFC0B170 */ - cpu->gpr[31] = 0xBFC08C34u; /* jal link before delay slot */ - psx_delay_BFC08C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C30u); -#endif - if (psx_delay_BFC08C2C) { - psx_delay_BFC08C2C = 0; - cpu->gpr[31] = 0xBFC08C34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B170u); - cpu->pc = 0xBFC0B170u; return; - } -label_BFC08C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C34: 100000E9 beq $zero, $zero, 0xBFC08FDC */ - uint32_t psx_brA_BFC08C34 = cpu->gpr[0]; uint32_t psx_brB_BFC08C34 = cpu->gpr[0]; - psx_taken_BFC08C34 = (psx_brA_BFC08C34 == psx_brB_BFC08C34); - psx_delay_BFC08C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C38u); -#endif - /* 0xBFC08C38: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C38u); -#endif - if (psx_delay_BFC08C34) { - psx_delay_BFC08C34 = 0; - if (psx_taken_BFC08C34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FDCu); - goto label_BFC08FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C3Cu); - } -label_BFC08C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C3Cu); -#endif - /* 0xBFC08C3C: 8FA2004C lw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C3Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C3Cu); -#endif -label_BFC08C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08C40: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC08C44: 00027100 sll $t6, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 4u; - PGXP_ALU(0x00027100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08C48: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08C4C: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC08C50: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC08C54: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC08C58: 000E7140 sll $t6, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 5u; - PGXP_ALU(0x000E7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08C5C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08C60: 2739B9E8 addiu $t9, $t9, -17944 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-17944)); - PGXP_ALU(0x2739B9E8u, cpu->gpr[25], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08C64: 25EFBA88 addiu $t7, $t7, -17784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17784)); - PGXP_ALU(0x25EFBA88u, cpu->gpr[15], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C000u); -#endif - /* 0xBFC08C68: 01CF9021 addu $s2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[18] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC08C6C: 03198821 addu $s1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[17] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03198821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08C70: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C74: 100000C5 beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08C74 = cpu->gpr[0]; uint32_t psx_brB_BFC08C74 = cpu->gpr[0]; - psx_taken_BFC08C74 = (psx_brA_BFC08C74 == psx_brB_BFC08C74); - psx_delay_BFC08C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC08C78: 2414000F addiu $s4, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2414000Fu, cpu->gpr[20], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C78u); -#endif - if (psx_delay_BFC08C74) { - psx_delay_BFC08C74 = 0; - if (psx_taken_BFC08C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08C7Cu); - } -label_BFC08C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08C7C: 0FF03684 jal 0xBFC0DA10 */ - cpu->gpr[31] = 0xBFC08C84u; /* jal link before delay slot */ - psx_delay_BFC08C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C80u); -#endif - if (psx_delay_BFC08C7C) { - psx_delay_BFC08C7C = 0; - cpu->gpr[31] = 0xBFC08C84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA10u); - cpu->pc = 0xBFC0DA10u; return; - } -label_BFC08C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C84u); -#endif - /* 0xBFC08C84: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C84u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08C88: 2405003F addiu $a1, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2405003Fu, cpu->gpr[5], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08C8C: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC08C94u; /* jal link before delay slot */ - psx_delay_BFC08C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC08C90: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C90u); -#endif - if (psx_delay_BFC08C8C) { - psx_delay_BFC08C8C = 0; - cpu->gpr[31] = 0xBFC08C94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC08C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08C94: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC08C9Cu; /* jal link before delay slot */ - psx_delay_BFC08C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08C98u); -#endif - if (psx_delay_BFC08C94) { - psx_delay_BFC08C94 = 0; - cpu->gpr[31] = 0xBFC08C9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC08C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08C9Cu); -#endif - /* 0xBFC08C9C: 8FA9004C lw $t1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08C9Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC08CA0: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC08CA4: 00095100 sll $t2, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00095100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC08CA8: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08CAC: 000A5140 sll $t2, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC08CB0: 256BBA88 addiu $t3, $t3, -17784 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-17784)); - PGXP_ALU(0x256BBA88u, cpu->gpr[11], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC08CB4: 014B9021 addu $s2, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[18] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08CB8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC08CBC: 2414000F addiu $s4, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2414000Fu, cpu->gpr[20], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CBCu); -#endif -label_BFC08CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC08CC0: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41040u); -#endif - /* 0xBFC08CC4: 024C3021 addu $a2, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC08CC8: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC08CCC: AFA60048 sw $a2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CCCu); return; } g_debug_last_store_pc = 0xBFC08CCCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08CD0: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC08CD8u; /* jal link before delay slot */ - psx_delay_BFC08CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08CD4: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CD4u); -#endif - if (psx_delay_BFC08CD0) { - psx_delay_BFC08CD0 = 0; - cpu->gpr[31] = 0xBFC08CD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC08CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CD8u); -#endif - /* 0xBFC08CD8: 8FA60048 lw $a2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CD8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC08CDC: 240D00A0 addiu $t5, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240D00A0u, cpu->gpr[13], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08CE0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC08CE4: ACCD0000 sw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CE4u); return; } g_debug_last_store_pc = 0xBFC08CE4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xACCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC08CE8: 1614FFF5 bne $s0, $s4, 0xBFC08CC0 */ - uint32_t psx_brA_BFC08CE8 = cpu->gpr[16]; uint32_t psx_brB_BFC08CE8 = cpu->gpr[20]; - psx_taken_BFC08CE8 = (psx_brA_BFC08CE8 != psx_brB_BFC08CE8); - psx_delay_BFC08CE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08CEC: ACC00004 sw $zero, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CECu); return; } g_debug_last_store_pc = 0xBFC08CECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CECu); -#endif - if (psx_delay_BFC08CE8) { - psx_delay_BFC08CE8 = 0; - if (psx_taken_BFC08CE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08CC0u); - goto label_BFC08CC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08CF0u); - } -label_BFC08CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08CF0: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CF4u); -#endif - /* 0xBFC08CF4: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CF4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CF4u); -#endif -label_BFC08CF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC08CF8: 26110001 addiu $s1, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC08CFC: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08D00: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC08D08u; /* jal link before delay slot */ - psx_delay_BFC08D00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC08D04: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D04u); -#endif - if (psx_delay_BFC08D00) { - psx_delay_BFC08D00 = 0; - cpu->gpr[31] = 0xBFC08D08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC08D08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC08D08: 14550006 bne $v0, $s5, 0xBFC08D24 */ - uint32_t psx_brA_BFC08D08 = cpu->gpr[2]; uint32_t psx_brB_BFC08D08 = cpu->gpr[21]; - psx_taken_BFC08D08 = (psx_brA_BFC08D08 != psx_brB_BFC08D08); - psx_delay_BFC08D08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D0Cu); -#endif - /* 0xBFC08D0C: 8FAE004C lw $t6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08D0Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE004Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D0Cu); -#endif - if (psx_delay_BFC08D08) { - psx_delay_BFC08D08 = 0; - if (psx_taken_BFC08D08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D24u); - goto label_BFC08D24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D10u); - } -label_BFC08D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08D10: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC08D18u; /* jal link before delay slot */ - psx_delay_BFC08D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08D14u); -#endif - if (psx_delay_BFC08D10) { - psx_delay_BFC08D10 = 0; - cpu->gpr[31] = 0xBFC08D18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC08D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08D18: 1440000A bne $v0, $zero, 0xBFC08D44 */ - uint32_t psx_brA_BFC08D18 = cpu->gpr[2]; uint32_t psx_brB_BFC08D18 = cpu->gpr[0]; - psx_taken_BFC08D18 = (psx_brA_BFC08D18 != psx_brB_BFC08D18); - psx_delay_BFC08D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08D1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08D1Cu); -#endif - if (psx_delay_BFC08D18) { - psx_delay_BFC08D18 = 0; - if (psx_taken_BFC08D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D44u); - goto label_BFC08D44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D20u); - } -label_BFC08D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D20u); -#endif - /* 0xBFC08D20: 8FAE004C lw $t6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08D20u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE004Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D20u); -#endif -label_BFC08D24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08D24: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC08D28: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC08D2C: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC08D30: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08D34: 2718B9E8 addiu $t8, $t8, -17944 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-17944)); - PGXP_ALU(0x2718B9E8u, cpu->gpr[24], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC08D38: 01F88821 addu $s1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08D3C: 10000093 beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08D3C = cpu->gpr[0]; uint32_t psx_brB_BFC08D3C = cpu->gpr[0]; - psx_taken_BFC08D3C = (psx_brA_BFC08D3C == psx_brB_BFC08D3C); - psx_delay_BFC08D3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08D40: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D40u); -#endif - if (psx_delay_BFC08D3C) { - psx_delay_BFC08D3C = 0; - if (psx_taken_BFC08D3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D44u); - } -label_BFC08D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08D44: 0FF021C8 jal 0xBFC08720 */ - cpu->gpr[31] = 0xBFC08D4Cu; /* jal link before delay slot */ - psx_delay_BFC08D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC08D48: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D48u); -#endif - if (psx_delay_BFC08D44) { - psx_delay_BFC08D44 = 0; - cpu->gpr[31] = 0xBFC08D4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08720u); - cpu->pc = 0xBFC08720u; return; - } -label_BFC08D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08D4C: 1440000B bne $v0, $zero, 0xBFC08D7C */ - uint32_t psx_brA_BFC08D4C = cpu->gpr[2]; uint32_t psx_brB_BFC08D4C = cpu->gpr[0]; - psx_taken_BFC08D4C = (psx_brA_BFC08D4C != psx_brB_BFC08D4C); - psx_delay_BFC08D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC08D50: 00105940 sll $t3, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00105940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D50u); -#endif - if (psx_delay_BFC08D4C) { - psx_delay_BFC08D4C = 0; - if (psx_taken_BFC08D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D7Cu); - goto label_BFC08D7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D54u); - } -label_BFC08D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D54u); -#endif - /* 0xBFC08D54: 8FB9004C lw $t9, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08D54u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9004Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08D58: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC08D5C: 00194880 sll $t1, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC08D60: 01394821 addu $t1, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[25]; - PGXP_ALU(0x01394821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC08D64: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC08D68: 254AB9E8 addiu $t2, $t2, -17944 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-17944)); - PGXP_ALU(0x254AB9E8u, cpu->gpr[10], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC08D6C: 012A8821 addu $s1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[17] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08D70: 10000086 beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08D70 = cpu->gpr[0]; uint32_t psx_brB_BFC08D70 = cpu->gpr[0]; - psx_taken_BFC08D70 = (psx_brA_BFC08D70 == psx_brB_BFC08D70); - psx_delay_BFC08D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08D74: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D74u); -#endif - if (psx_delay_BFC08D70) { - psx_delay_BFC08D70 = 0; - if (psx_taken_BFC08D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D78u); - } -label_BFC08D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC08D78: 00105940 sll $t3, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00105940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D78u); -#endif -label_BFC08D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40810u); -#endif - /* 0xBFC08D7C: 024B2021 addu $a0, $s2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[11]; - PGXP_ALU(0x024B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC08D80: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08D84: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC08D8Cu; /* jal link before delay slot */ - psx_delay_BFC08D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08D88: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D88u); -#endif - if (psx_delay_BFC08D84) { - psx_delay_BFC08D84 = 0; - cpu->gpr[31] = 0xBFC08D8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC08D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC08D8C: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC08D90: 1614FFD9 bne $s0, $s4, 0xBFC08CF8 */ - uint32_t psx_brA_BFC08D90 = cpu->gpr[16]; uint32_t psx_brB_BFC08D90 = cpu->gpr[20]; - psx_taken_BFC08D90 = (psx_brA_BFC08D90 != psx_brB_BFC08D90); - psx_delay_BFC08D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D94u); -#endif - /* 0xBFC08D94: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08D94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D94u); -#endif - if (psx_delay_BFC08D90) { - psx_delay_BFC08D90 = 0; - if (psx_taken_BFC08D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08CF8u); - goto label_BFC08CF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08D98u); - } -label_BFC08D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08D98: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC08D9C: 27A300A8 addiu $v1, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27A300A8u, cpu->gpr[3], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC08DA0: 24110052 addiu $s1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24110052u, cpu->gpr[17], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DA0u); -#endif -label_BFC08DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08DA4: AC60FFB0 sw $zero, -80($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DA4u); return; } g_debug_last_store_pc = 0xBFC08DA4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DA8u); -#endif - /* 0xBFC08DA8: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DA8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC08DAC: AFA30048 sw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DACu); return; } g_debug_last_store_pc = 0xBFC08DACu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08DB0: 0FF023FF jal 0xBFC08FFC */ - cpu->gpr[31] = 0xBFC08DB8u; /* jal link before delay slot */ - psx_delay_BFC08DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC08DB4: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DB4u); -#endif - if (psx_delay_BFC08DB0) { - psx_delay_BFC08DB0 = 0; - cpu->gpr[31] = 0xBFC08DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FFCu); - cpu->pc = 0xBFC08FFCu; return; - } -label_BFC08DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DB8u); -#endif - /* 0xBFC08DB8: 8FA30048 lw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DB8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC08DBC: 14550002 bne $v0, $s5, 0xBFC08DC8 */ - uint32_t psx_brA_BFC08DBC = cpu->gpr[2]; uint32_t psx_brB_BFC08DBC = cpu->gpr[21]; - psx_taken_BFC08DBC = (psx_brA_BFC08DBC != psx_brB_BFC08DBC); - psx_delay_BFC08DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08DC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08DC0u); -#endif - if (psx_delay_BFC08DBC) { - psx_delay_BFC08DBC = 0; - if (psx_taken_BFC08DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08DC8u); - goto label_BFC08DC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08DC4u); - } -label_BFC08DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC08DC4: AC71FFB0 sw $s1, -80($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DC4u); return; } g_debug_last_store_pc = 0xBFC08DC4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAC71FFB0u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DC4u); -#endif -label_BFC08DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08DC8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC08DCC: 1614FFF5 bne $s0, $s4, 0xBFC08DA4 */ - uint32_t psx_brA_BFC08DCC = cpu->gpr[16]; uint32_t psx_brB_BFC08DCC = cpu->gpr[20]; - psx_taken_BFC08DCC = (psx_brA_BFC08DCC != psx_brB_BFC08DCC); - psx_delay_BFC08DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08DD0: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DD0u); -#endif - if (psx_delay_BFC08DCC) { - psx_delay_BFC08DCC = 0; - if (psx_taken_BFC08DCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08DA4u); - goto label_BFC08DA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08DD4u); - } -label_BFC08DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC08DD4: AFA00058 sw $zero, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DD4u); return; } g_debug_last_store_pc = 0xBFC08DD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00058u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC08DD8: AFA0005C sw $zero, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DD8u); return; } g_debug_last_store_pc = 0xBFC08DD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0005Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC08DDC: AFA00060 sw $zero, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DDCu); return; } g_debug_last_store_pc = 0xBFC08DDCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00060u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08DE0: 24100003 addiu $s0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24100003u, cpu->gpr[16], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC08DE4: 27A300B4 addiu $v1, $sp, 180 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (180)); - PGXP_ALU(0x27A300B4u, cpu->gpr[3], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC08DE8: 27A200E4 addiu $v0, $sp, 228 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (228)); - PGXP_ALU(0x27A200E4u, cpu->gpr[2], _pgx1, 0x000000E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DE8u); -#endif -label_BFC08DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08DEC: AC60FFB0 sw $zero, -80($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DECu); return; } g_debug_last_store_pc = 0xBFC08DECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08DF0: 24630010 addiu $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16)); - PGXP_ALU(0x24630010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08DF4: AC60FFA4 sw $zero, -92($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DF4u); return; } g_debug_last_store_pc = 0xBFC08DF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFA4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08DF8: AC60FFA8 sw $zero, -88($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08DF8u); return; } g_debug_last_store_pc = 0xBFC08DF8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFA8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08DFC: 1462FFFB bne $v1, $v0, 0xBFC08DEC */ - uint32_t psx_brA_BFC08DFC = cpu->gpr[3]; uint32_t psx_brB_BFC08DFC = cpu->gpr[2]; - psx_taken_BFC08DFC = (psx_brA_BFC08DFC != psx_brB_BFC08DFC); - psx_delay_BFC08DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08E00: AC60FFAC sw $zero, -84($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E00u); return; } g_debug_last_store_pc = 0xBFC08E00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E00u); -#endif - if (psx_delay_BFC08DFC) { - psx_delay_BFC08DFC = 0; - if (psx_taken_BFC08DFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08DECu); - goto label_BFC08DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E04u); - } -label_BFC08E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08E04: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08E08: 3405FFFF ori $a1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC08E0C: 24070051 addiu $a3, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24070051u, cpu->gpr[7], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC08E10: 240800A1 addiu $t0, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240800A1u, cpu->gpr[8], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC08E14: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E14u); -#endif -label_BFC08E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41040u); -#endif - /* 0xBFC08E18: 024C3021 addu $a2, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E1Cu); -#endif - /* 0xBFC08E1C: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E1Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC08E24: 10E20004 beq $a3, $v0, 0xBFC08E38 */ - uint32_t psx_brA_BFC08E24 = cpu->gpr[7]; uint32_t psx_brB_BFC08E24 = cpu->gpr[2]; - psx_taken_BFC08E24 = (psx_brA_BFC08E24 == psx_brB_BFC08E24); - psx_delay_BFC08E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC08E28: 00106880 sll $t5, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00106880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E28u); -#endif - if (psx_delay_BFC08E24) { - psx_delay_BFC08E24 = 0; - if (psx_taken_BFC08E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E38u); - goto label_BFC08E38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E2Cu); - } -label_BFC08E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC08E2C: 1502001E bne $t0, $v0, 0xBFC08EA8 */ - uint32_t psx_brA_BFC08E2C = cpu->gpr[8]; uint32_t psx_brB_BFC08E2C = cpu->gpr[2]; - psx_taken_BFC08E2C = (psx_brA_BFC08E2C != psx_brB_BFC08E2C); - psx_delay_BFC08E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E30u); -#endif - if (psx_delay_BFC08E2C) { - psx_delay_BFC08E2C = 0; - if (psx_taken_BFC08E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA8u); - goto label_BFC08EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E34u); - } -label_BFC08E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC08E34: 00106880 sll $t5, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00106880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E34u); -#endif -label_BFC08E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006000u); -#endif - /* 0xBFC08E38: 03AD7021 addu $t6, $sp, $t5 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[13]; - PGXP_ALU(0x03AD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC08E3C: ADD50058 sw $s5, 88($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E3Cu); return; } g_debug_last_store_pc = 0xBFC08E3Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xADD50058u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E40u); -#endif - /* 0xBFC08E40: 8CC40004 lw $a0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40u); } - PGXP_LOAD(0x8CC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E44u); -#endif - /* 0xBFC08E44: 94C30008 lhu $v1, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E44u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x94C30008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08E4C: 04810002 bgez $a0, 0xBFC08E58 */ - uint32_t psx_brA_BFC08E4C = cpu->gpr[4]; - psx_taken_BFC08E4C = ((int32_t)psx_brA_BFC08E4C >= 0); - psx_delay_BFC08E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC08E50: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E50u); -#endif - if (psx_delay_BFC08E4C) { - psx_delay_BFC08E4C = 0; - if (psx_taken_BFC08E4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E58u); - goto label_BFC08E58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E54u); - } -label_BFC08E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC08E54: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E54u); -#endif -label_BFC08E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC08E58: 00012343 sra $a0, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00012343u, cpu->gpr[4], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08E5C: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08E60: 18800011 blez $a0, 0xBFC08EA8 */ - uint32_t psx_brA_BFC08E60 = cpu->gpr[4]; - psx_taken_BFC08E60 = ((int32_t)psx_brA_BFC08E60 <= 0); - psx_delay_BFC08E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E64u); -#endif - if (psx_delay_BFC08E60) { - psx_delay_BFC08E60 = 0; - if (psx_taken_BFC08E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA8u); - goto label_BFC08EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E68u); - } -label_BFC08E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC08E68: 1065000F beq $v1, $a1, 0xBFC08EA8 */ - uint32_t psx_brA_BFC08E68 = cpu->gpr[3]; uint32_t psx_brB_BFC08E68 = cpu->gpr[5]; - psx_taken_BFC08E68 = (psx_brA_BFC08E68 == psx_brB_BFC08E68); - psx_delay_BFC08E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E6Cu); -#endif - if (psx_delay_BFC08E68) { - psx_delay_BFC08E68 = 0; - if (psx_taken_BFC08E68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA8u); - goto label_BFC08EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E70u); - } -label_BFC08E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC08E70: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E70u); -#endif -label_BFC08E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC08E74: 27B800A8 addiu $t8, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27B800A8u, cpu->gpr[24], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC08E78: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E7Cu); -#endif - /* 0xBFC08E7C: 8C59FFB0 lw $t9, -80($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E7Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C59FFB0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC08E80: 00035140 sll $t2, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00035140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC08E84: 27290001 addiu $t1, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC08E88: AC49FFB0 sw $t1, -80($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E88u); return; } g_debug_last_store_pc = 0xBFC08E88u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC49FFB0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC08E8C: 024A5821 addu $t3, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E90u); -#endif - /* 0xBFC08E90: 95630008 lhu $v1, 8($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E90u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x800u); } - PGXP_LOAD(0x95630008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08E94: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC08E98: 18800003 blez $a0, 0xBFC08EA8 */ - uint32_t psx_brA_BFC08E98 = cpu->gpr[4]; - psx_taken_BFC08E98 = ((int32_t)psx_brA_BFC08E98 <= 0); - psx_delay_BFC08E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08E9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08E9Cu); -#endif - if (psx_delay_BFC08E98) { - psx_delay_BFC08E98 = 0; - if (psx_taken_BFC08E98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA8u); - goto label_BFC08EA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA0u); - } -label_BFC08EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC08EA0: 1465FFF4 bne $v1, $a1, 0xBFC08E74 */ - uint32_t psx_brA_BFC08EA0 = cpu->gpr[3]; uint32_t psx_brB_BFC08EA0 = cpu->gpr[5]; - psx_taken_BFC08EA0 = (psx_brA_BFC08EA0 != psx_brB_BFC08EA0); - psx_delay_BFC08EA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC08EA4: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EA4u); -#endif - if (psx_delay_BFC08EA0) { - psx_delay_BFC08EA0 = 0; - if (psx_taken_BFC08EA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E74u); - goto label_BFC08E74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EA8u); - } -label_BFC08EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08EA8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC08EAC: 2A01000F slti $at, $s0, 15 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0); - PGXP_ALU(0x2A01000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08EB0: 1420FFD9 bne $at, $zero, 0xBFC08E18 */ - uint32_t psx_brA_BFC08EB0 = cpu->gpr[1]; uint32_t psx_brB_BFC08EB0 = cpu->gpr[0]; - psx_taken_BFC08EB0 = (psx_brA_BFC08EB0 != psx_brB_BFC08EB0); - psx_delay_BFC08EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC08EB4: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EB4u); -#endif - if (psx_delay_BFC08EB0) { - psx_delay_BFC08EB0 = 0; - if (psx_taken_BFC08EB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08E18u); - goto label_BFC08E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EB8u); - } -label_BFC08EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08EB8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC08EBC: 27A300A8 addiu $v1, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27A300A8u, cpu->gpr[3], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08EC0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EC0u); -#endif -label_BFC08EC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EC4u); -#endif - /* 0xBFC08EC4: 8C6CFFB0 lw $t4, -80($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08EC4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6CFFB0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08EC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC08ECC: 15800007 bne $t4, $zero, 0xBFC08EEC */ - uint32_t psx_brA_BFC08ECC = cpu->gpr[12]; uint32_t psx_brB_BFC08ECC = cpu->gpr[0]; - psx_taken_BFC08ECC = (psx_brA_BFC08ECC != psx_brB_BFC08ECC); - psx_delay_BFC08ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08ED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08ED0u); -#endif - if (psx_delay_BFC08ECC) { - psx_delay_BFC08ECC = 0; - if (psx_taken_BFC08ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EECu); - goto label_BFC08EEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08ED4u); - } -label_BFC08ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC08ED4: 00106940 sll $t5, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42040u); -#endif - /* 0xBFC08ED8: 024D3021 addu $a2, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[13]; - PGXP_ALU(0x024D3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08EDC: ACC00004 sw $zero, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08EDCu); return; } g_debug_last_store_pc = 0xBFC08EDCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC08EE0: 240E00A0 addiu $t6, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240E00A0u, cpu->gpr[14], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC08EE4: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08EE4u); return; } g_debug_last_store_pc = 0xBFC08EE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC08EE8: A4C20008 sh $v0, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08EE8u); return; } g_debug_last_store_pc = 0xBFC08EE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4C20008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EE8u); -#endif -label_BFC08EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08EEC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC08EF0: 1614FFF4 bne $s0, $s4, 0xBFC08EC4 */ - uint32_t psx_brA_BFC08EF0 = cpu->gpr[16]; uint32_t psx_brB_BFC08EF0 = cpu->gpr[20]; - psx_taken_BFC08EF0 = (psx_brA_BFC08EF0 != psx_brB_BFC08EF0); - psx_delay_BFC08EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC08EF4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EF4u); -#endif - if (psx_delay_BFC08EF0) { - psx_delay_BFC08EF0 = 0; - if (psx_taken_BFC08EF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EC4u); - goto label_BFC08EC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08EF8u); - } -label_BFC08EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08EF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EF8u); -#endif - /* 0xBFC08EF8: 8FAF004C lw $t7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08EF8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08EFC: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC08EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC08F00: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC08F04: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC08F08: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC08F0C: 2739B9E8 addiu $t9, $t9, -17944 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-17944)); - PGXP_ALU(0x2739B9E8u, cpu->gpr[25], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC08F10: 03198821 addu $s1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[17] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03198821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08F14: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F18u); -#endif - /* 0xBFC08F18: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08F18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F18u); -#endif -label_BFC08F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC08F1C: 26050010 addiu $a1, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (16)); - PGXP_ALU(0x26050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08F20: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC08F28u; /* jal link before delay slot */ - psx_delay_BFC08F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC08F24: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F24u); -#endif - if (psx_delay_BFC08F20) { - psx_delay_BFC08F20 = 0; - cpu->gpr[31] = 0xBFC08F28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC08F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC08F28: 14550005 bne $v0, $s5, 0xBFC08F40 */ - uint32_t psx_brA_BFC08F28 = cpu->gpr[2]; uint32_t psx_brB_BFC08F28 = cpu->gpr[21]; - psx_taken_BFC08F28 = (psx_brA_BFC08F28 != psx_brB_BFC08F28); - psx_delay_BFC08F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08F2Cu); -#endif - if (psx_delay_BFC08F28) { - psx_delay_BFC08F28 = 0; - if (psx_taken_BFC08F28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F40u); - goto label_BFC08F40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F30u); - } -label_BFC08F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08F30: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC08F38u; /* jal link before delay slot */ - psx_delay_BFC08F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08F34u); -#endif - if (psx_delay_BFC08F30) { - psx_delay_BFC08F30 = 0; - cpu->gpr[31] = 0xBFC08F38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC08F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08F38: 14400003 bne $v0, $zero, 0xBFC08F48 */ - uint32_t psx_brA_BFC08F38 = cpu->gpr[2]; uint32_t psx_brB_BFC08F38 = cpu->gpr[0]; - psx_taken_BFC08F38 = (psx_brA_BFC08F38 != psx_brB_BFC08F38); - psx_delay_BFC08F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC08F3Cu); -#endif - if (psx_delay_BFC08F38) { - psx_delay_BFC08F38 = 0; - if (psx_taken_BFC08F38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F48u); - goto label_BFC08F48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F40u); - } -label_BFC08F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F40: 10000012 beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08F40 = cpu->gpr[0]; uint32_t psx_brB_BFC08F40 = cpu->gpr[0]; - psx_taken_BFC08F40 = (psx_brA_BFC08F40 == psx_brB_BFC08F40); - psx_delay_BFC08F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08F44: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F44u); -#endif - if (psx_delay_BFC08F40) { - psx_delay_BFC08F40 = 0; - if (psx_taken_BFC08F40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F48u); - } -label_BFC08F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08F48: 0FF021C8 jal 0xBFC08720 */ - cpu->gpr[31] = 0xBFC08F50u; /* jal link before delay slot */ - psx_delay_BFC08F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC08F4C: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F4Cu); -#endif - if (psx_delay_BFC08F48) { - psx_delay_BFC08F48 = 0; - cpu->gpr[31] = 0xBFC08F50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08720u); - cpu->pc = 0xBFC08720u; return; - } -label_BFC08F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08F50: 14400004 bne $v0, $zero, 0xBFC08F64 */ - uint32_t psx_brA_BFC08F50 = cpu->gpr[2]; uint32_t psx_brB_BFC08F50 = cpu->gpr[0]; - psx_taken_BFC08F50 = (psx_brA_BFC08F50 != psx_brB_BFC08F50); - psx_delay_BFC08F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC08F54: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F54u); -#endif - if (psx_delay_BFC08F50) { - psx_delay_BFC08F50 = 0; - if (psx_taken_BFC08F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F64u); - goto label_BFC08F64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F58u); - } -label_BFC08F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F58: 1000000C beq $zero, $zero, 0xBFC08F8C */ - uint32_t psx_brA_BFC08F58 = cpu->gpr[0]; uint32_t psx_brB_BFC08F58 = cpu->gpr[0]; - psx_taken_BFC08F58 = (psx_brA_BFC08F58 == psx_brB_BFC08F58); - psx_delay_BFC08F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08F5C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F5Cu); -#endif - if (psx_delay_BFC08F58) { - psx_delay_BFC08F58 = 0; - if (psx_taken_BFC08F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - goto label_BFC08F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F60u); - } -label_BFC08F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC08F60: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F60u); -#endif -label_BFC08F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20210u); -#endif - /* 0xBFC08F64: 02292021 addu $a0, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02292021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC08F68: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08F6C: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC08F74u; /* jal link before delay slot */ - psx_delay_BFC08F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC08F70: 24060004 addiu $a2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24060004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F70u); -#endif - if (psx_delay_BFC08F6C) { - psx_delay_BFC08F6C = 0; - cpu->gpr[31] = 0xBFC08F74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC08F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08F74: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC08F78: 24010014 addiu $at, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24010014u, cpu->gpr[1], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC08F7C: 1601FFE7 bne $s0, $at, 0xBFC08F1C */ - uint32_t psx_brA_BFC08F7C = cpu->gpr[16]; uint32_t psx_brB_BFC08F7C = cpu->gpr[1]; - psx_taken_BFC08F7C = (psx_brA_BFC08F7C != psx_brB_BFC08F7C); - psx_delay_BFC08F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F80u); -#endif - /* 0xBFC08F80: 8FA400A8 lw $a0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08F80u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F80u); -#endif - if (psx_delay_BFC08F7C) { - psx_delay_BFC08F7C = 0; - if (psx_taken_BFC08F7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F1Cu); - goto label_BFC08F1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F84u); - } -label_BFC08F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC08F84: 10000014 beq $zero, $zero, 0xBFC08FD8 */ - uint32_t psx_brA_BFC08F84 = cpu->gpr[0]; uint32_t psx_brB_BFC08F84 = cpu->gpr[0]; - psx_taken_BFC08F84 = (psx_brA_BFC08F84 == psx_brB_BFC08F84); - psx_delay_BFC08F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08F88: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F88u); -#endif - if (psx_delay_BFC08F84) { - psx_delay_BFC08F84 = 0; - if (psx_taken_BFC08F84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FD8u); - goto label_BFC08FD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F8Cu); - } -label_BFC08F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC08F8C: 00105140 sll $t2, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[10] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00105140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F8Cu); -#endif -label_BFC08F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40410u); -#endif - /* 0xBFC08F90: 024A2021 addu $a0, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC08F94: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC08F9Cu; /* jal link before delay slot */ - psx_delay_BFC08F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC08F98: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F98u); -#endif - if (psx_delay_BFC08F94) { - psx_delay_BFC08F94 = 0; - cpu->gpr[31] = 0xBFC08F9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC08F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08F9C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC08FA0: 1614FFFB bne $s0, $s4, 0xBFC08F90 */ - uint32_t psx_brA_BFC08FA0 = cpu->gpr[16]; uint32_t psx_brB_BFC08FA0 = cpu->gpr[20]; - psx_taken_BFC08FA0 = (psx_brA_BFC08FA0 != psx_brB_BFC08FA0); - psx_delay_BFC08FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC08FA4: 00105140 sll $t2, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[10] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00105140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FA4u); -#endif - if (psx_delay_BFC08FA0) { - psx_delay_BFC08FA0 = 0; - if (psx_taken_BFC08FA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08F90u); - goto label_BFC08F90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FA8u); - } -label_BFC08FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC08FA8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC08FAC: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC08FB0: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FB0u); -#endif -label_BFC08FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC08FB4: 00105880 sll $t3, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20804u); -#endif - /* 0xBFC08FB8: 022B1021 addu $v0, $s1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[11]; - PGXP_ALU(0x022B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08FBC: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FBCu); return; } g_debug_last_store_pc = 0xBFC08FBCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC08FC0: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08FC4: AC430004 sw $v1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FC4u); return; } g_debug_last_store_pc = 0xBFC08FC4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08FC8: AC430008 sw $v1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FC8u); return; } g_debug_last_store_pc = 0xBFC08FC8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC08FCC: 1604FFF9 bne $s0, $a0, 0xBFC08FB4 */ - uint32_t psx_brA_BFC08FCC = cpu->gpr[16]; uint32_t psx_brB_BFC08FCC = cpu->gpr[4]; - psx_taken_BFC08FCC = (psx_brA_BFC08FCC != psx_brB_BFC08FCC); - psx_delay_BFC08FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC08FD0: AC43000C sw $v1, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FD0u); return; } g_debug_last_store_pc = 0xBFC08FD0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FD0u); -#endif - if (psx_delay_BFC08FCC) { - psx_delay_BFC08FCC = 0; - if (psx_taken_BFC08FCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FB4u); - goto label_BFC08FB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FD4u); - } -label_BFC08FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC08FD4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FD4u); -#endif -label_BFC08FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FD8u); -#endif - /* 0xBFC08FD8: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FD8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FD8u); -#endif -label_BFC08FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FDCu); -#endif - /* 0xBFC08FDC: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FDCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FE0u); -#endif - /* 0xBFC08FE0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FE0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FE4u); -#endif - /* 0xBFC08FE4: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FE4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FE8u); -#endif - /* 0xBFC08FE8: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FE8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FECu); -#endif - /* 0xBFC08FEC: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FECu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FF0u); -#endif - /* 0xBFC08FF0: 8FB50030 lw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08FF0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC08FF4: 03E00008 jr $ra */ - psx_delay_BFC08FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC08FF8: 27BD00A8 addiu $sp, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27BD00A8u, cpu->gpr[29], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FF8u); -#endif - if (psx_delay_BFC08FF4) { - psx_delay_BFC08FF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC08FFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC08FFCu); - int psx_delay_BFC09024 = 0; - int psx_taken_BFC09024 = 0; - int psx_delay_BFC0902C = 0; - int psx_taken_BFC0902C = 0; - int psx_delay_BFC09038 = 0; - int psx_taken_BFC09038 = 0; - int psx_delay_BFC09040 = 0; - int psx_taken_BFC09040 = 0; - int psx_delay_BFC09048 = 0; - int psx_delay_BFC09060 = 0; - int psx_taken_BFC09060 = 0; - int psx_delay_BFC09078 = 0; - int psx_taken_BFC09078 = 0; - int psx_delay_BFC09080 = 0; - int psx_taken_BFC09080 = 0; - int psx_delay_BFC0908C = 0; - int psx_taken_BFC0908C = 0; - int psx_delay_BFC090A8 = 0; - int psx_taken_BFC090A8 = 0; - int psx_delay_BFC090B0 = 0; - int psx_taken_BFC090B0 = 0; - int psx_delay_BFC090C0 = 0; - int psx_taken_BFC090C0 = 0; - int psx_delay_BFC090C8 = 0; - int psx_taken_BFC090C8 = 0; - int psx_delay_BFC090D0 = 0; - int psx_taken_BFC090D0 = 0; - int psx_delay_BFC090F4 = 0; - int psx_taken_BFC090F4 = 0; - int psx_delay_BFC090FC = 0; - int psx_taken_BFC090FC = 0; - int psx_delay_BFC09120 = 0; - int psx_taken_BFC09120 = 0; - int psx_delay_BFC09128 = 0; - int psx_taken_BFC09128 = 0; - int psx_delay_BFC09130 = 0; - int psx_delay_BFC0913C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0902Cu: goto label_BFC0902C; - case 0xBFC09034u: goto label_BFC09034; - case 0xBFC09038u: goto label_BFC09038; - case 0xBFC09040u: goto label_BFC09040; - case 0xBFC09048u: goto label_BFC09048; - case 0xBFC09050u: goto label_BFC09050; - case 0xBFC09068u: goto label_BFC09068; - case 0xBFC0906Cu: goto label_BFC0906C; - case 0xBFC09080u: goto label_BFC09080; - case 0xBFC09088u: goto label_BFC09088; - case 0xBFC09094u: goto label_BFC09094; - case 0xBFC09098u: goto label_BFC09098; - case 0xBFC090B0u: goto label_BFC090B0; - case 0xBFC090B8u: goto label_BFC090B8; - case 0xBFC090C8u: goto label_BFC090C8; - case 0xBFC090D0u: goto label_BFC090D0; - case 0xBFC090D8u: goto label_BFC090D8; - case 0xBFC090FCu: goto label_BFC090FC; - case 0xBFC09104u: goto label_BFC09104; - case 0xBFC09108u: goto label_BFC09108; - case 0xBFC09128u: goto label_BFC09128; - case 0xBFC09130u: goto label_BFC09130; - case 0xBFC0913Cu: goto label_BFC0913C; - default: break; - } - } -label_BFC08FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC08FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC08FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC08FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC08FFC: 00047100 sll $t6, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC08FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC09000: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09004: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09008: 25EFBA88 addiu $t7, $t7, -17784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17784)); - PGXP_ALU(0x25EFBA88u, cpu->gpr[15], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0900Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0900C: 000E7140 sll $t6, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 5u; - PGXP_ALU(0x000E7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0900Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC09010: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC09014: 0005C140 sll $t8, $a1, 5 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 5u; - PGXP_ALU(0x0005C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000048u); -#endif - /* 0xBFC09018: 00783021 addu $a2, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00783021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0901Cu); -#endif - /* 0xBFC0901C: 90C20000 lbu $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 2, 0x40u); - PGXP_LOAD(0x90C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0901Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09020: 24010051 addiu $at, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24010051u, cpu->gpr[1], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09024: 14410004 bne $v0, $at, 0xBFC09038 */ - uint32_t psx_brA_BFC09024 = cpu->gpr[2]; uint32_t psx_brB_BFC09024 = cpu->gpr[1]; - psx_taken_BFC09024 = (psx_brA_BFC09024 != psx_brB_BFC09024); - psx_delay_BFC09024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09028: 240100A1 addiu $at, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240100A1u, cpu->gpr[1], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09028u); -#endif - if (psx_delay_BFC09024) { - psx_delay_BFC09024 = 0; - if (psx_taken_BFC09024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09038u); - goto label_BFC09038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0902Cu); - } -label_BFC0902C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0902Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0902Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0902Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0902C: 10000008 beq $zero, $zero, 0xBFC09050 */ - uint32_t psx_brA_BFC0902C = cpu->gpr[0]; uint32_t psx_brB_BFC0902C = cpu->gpr[0]; - psx_taken_BFC0902C = (psx_brA_BFC0902C == psx_brB_BFC0902C); - psx_delay_BFC0902C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09030: 240200A0 addiu $v0, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240200A0u, cpu->gpr[2], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09030u); -#endif - if (psx_delay_BFC0902C) { - psx_delay_BFC0902C = 0; - if (psx_taken_BFC0902C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09050u); - goto label_BFC09050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09034u); - } -label_BFC09034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09034: 240100A1 addiu $at, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240100A1u, cpu->gpr[1], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09034u); -#endif -label_BFC09038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09038: 14410003 bne $v0, $at, 0xBFC09048 */ - uint32_t psx_brA_BFC09038 = cpu->gpr[2]; uint32_t psx_brB_BFC09038 = cpu->gpr[1]; - psx_taken_BFC09038 = (psx_brA_BFC09038 != psx_brB_BFC09038); - psx_delay_BFC09038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0903Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0903C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0903Cu); -#endif - if (psx_delay_BFC09038) { - psx_delay_BFC09038 = 0; - if (psx_taken_BFC09038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09048u); - goto label_BFC09048; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09040u); - } -label_BFC09040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09040: 10000003 beq $zero, $zero, 0xBFC09050 */ - uint32_t psx_brA_BFC09040 = cpu->gpr[0]; uint32_t psx_brB_BFC09040 = cpu->gpr[0]; - psx_taken_BFC09040 = (psx_brA_BFC09040 == psx_brB_BFC09040); - psx_delay_BFC09040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09044: 24020050 addiu $v0, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24020050u, cpu->gpr[2], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09044u); -#endif - if (psx_delay_BFC09040) { - psx_delay_BFC09040 = 0; - if (psx_taken_BFC09040) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09050u); - goto label_BFC09050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09048u); - } -label_BFC09048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09048: 03E00008 jr $ra */ - psx_delay_BFC09048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0904Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0904C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0904Cu); -#endif - if (psx_delay_BFC09048) { - psx_delay_BFC09048 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC09050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09050u); -#endif - /* 0xBFC09050: 8CC70004 lw $a3, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09050u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x40u); } - PGXP_LOAD(0x8CC70004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09054u); -#endif - /* 0xBFC09054: 94C90008 lhu $t1, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09054u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x94C90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09058: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0905Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0905C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0905Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC09060: 04E10002 bgez $a3, 0xBFC0906C */ - uint32_t psx_brA_BFC09060 = cpu->gpr[7]; - psx_taken_BFC09060 = ((int32_t)psx_brA_BFC09060 >= 0); - psx_delay_BFC09060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC09064: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09064u); -#endif - if (psx_delay_BFC09060) { - psx_delay_BFC09060 = 0; - if (psx_taken_BFC09060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0906Cu); - goto label_BFC0906C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09068u); - } -label_BFC09068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09068: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09068u); -#endif -label_BFC0906C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0906Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC0906C: 00013B43 sra $a3, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00013B43u, cpu->gpr[7], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC09070: 24E7FFFF addiu $a3, $a3, -1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-1)); - PGXP_ALU(0x24E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC09074: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC09078: 1CA00003 bgtz $a1, 0xBFC09088 */ - uint32_t psx_brA_BFC09078 = cpu->gpr[5]; - psx_taken_BFC09078 = ((int32_t)psx_brA_BFC09078 > 0); - psx_delay_BFC09078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0907Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC0907C: 01204021 addu $t0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01204021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0907Cu); -#endif - if (psx_delay_BFC09078) { - psx_delay_BFC09078 = 0; - if (psx_taken_BFC09078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09088u); - goto label_BFC09088; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09080u); - } -label_BFC09080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09080: 10000013 beq $zero, $zero, 0xBFC090D0 */ - uint32_t psx_brA_BFC09080 = cpu->gpr[0]; uint32_t psx_brB_BFC09080 = cpu->gpr[0]; - psx_taken_BFC09080 = (psx_brA_BFC09080 == psx_brB_BFC09080); - psx_delay_BFC09080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC09084: 340BFFFF ori $t3, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09084u); -#endif - if (psx_delay_BFC09080) { - psx_delay_BFC09080 = 0; - if (psx_taken_BFC09080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D0u); - goto label_BFC090D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09088u); - } -label_BFC09088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC09088: 340BFFFF ori $t3, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0908Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC0908C: 110B0010 beq $t0, $t3, 0xBFC090D0 */ - uint32_t psx_brA_BFC0908C = cpu->gpr[8]; uint32_t psx_brB_BFC0908C = cpu->gpr[11]; - psx_taken_BFC0908C = (psx_brA_BFC0908C == psx_brB_BFC0908C); - psx_delay_BFC0908C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09090: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09090u); -#endif - if (psx_delay_BFC0908C) { - psx_delay_BFC0908C = 0; - if (psx_taken_BFC0908C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D0u); - goto label_BFC090D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09094u); - } -label_BFC09094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC09094: 0008C940 sll $t9, $t0, 5 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 5u; - PGXP_ALU(0x0008C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09094u); -#endif -label_BFC09098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000408u); -#endif - /* 0xBFC09098: 00795021 addu $t2, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00795021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0909Cu); -#endif - /* 0xBFC0909C: 8D4D0000 lw $t5, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0909Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x400u); } - PGXP_LOAD(0x8D4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0909Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC090A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC090A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC090A4: 31AE00F0 andi $t6, $t5, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xF0u; - PGXP_ALU(0x31AE00F0u, cpu->gpr[14], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC090A8: 144E0003 bne $v0, $t6, 0xBFC090B8 */ - uint32_t psx_brA_BFC090A8 = cpu->gpr[2]; uint32_t psx_brB_BFC090A8 = cpu->gpr[14]; - psx_taken_BFC090A8 = (psx_brA_BFC090A8 != psx_brB_BFC090A8); - psx_delay_BFC090A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC090AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC090ACu); -#endif - if (psx_delay_BFC090A8) { - psx_delay_BFC090A8 = 0; - if (psx_taken_BFC090A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090B8u); - goto label_BFC090B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090B0u); - } -label_BFC090B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC090B0: 10000007 beq $zero, $zero, 0xBFC090D0 */ - uint32_t psx_brA_BFC090B0 = cpu->gpr[0]; uint32_t psx_brB_BFC090B0 = cpu->gpr[0]; - psx_taken_BFC090B0 = (psx_brA_BFC090B0 == psx_brB_BFC090B0); - psx_delay_BFC090B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC090B4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090B4u); -#endif - if (psx_delay_BFC090B0) { - psx_delay_BFC090B0 = 0; - if (psx_taken_BFC090B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D0u); - goto label_BFC090D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090B8u); - } -label_BFC090B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090B8u); -#endif - /* 0xBFC090B8: 95480008 lhu $t0, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC090B8u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x400u); } - PGXP_LOAD(0x95480008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC090BC: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC090C0: 18A00003 blez $a1, 0xBFC090D0 */ - uint32_t psx_brA_BFC090C0 = cpu->gpr[5]; - psx_taken_BFC090C0 = ((int32_t)psx_brA_BFC090C0 <= 0); - psx_delay_BFC090C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC090C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC090C4u); -#endif - if (psx_delay_BFC090C0) { - psx_delay_BFC090C0 = 0; - if (psx_taken_BFC090C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D0u); - goto label_BFC090D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090C8u); - } -label_BFC090C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC090C8: 150BFFF3 bne $t0, $t3, 0xBFC09098 */ - uint32_t psx_brA_BFC090C8 = cpu->gpr[8]; uint32_t psx_brB_BFC090C8 = cpu->gpr[11]; - psx_taken_BFC090C8 = (psx_brA_BFC090C8 != psx_brB_BFC090C8); - psx_delay_BFC090C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC090CC: 0008C940 sll $t9, $t0, 5 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 5u; - PGXP_ALU(0x0008C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090CCu); -#endif - if (psx_delay_BFC090C8) { - psx_delay_BFC090C8 = 0; - if (psx_taken_BFC090C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09098u); - goto label_BFC09098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D0u); - } -label_BFC090D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC090D0: 1480001A bne $a0, $zero, 0xBFC0913C */ - uint32_t psx_brA_BFC090D0 = cpu->gpr[4]; uint32_t psx_brB_BFC090D0 = cpu->gpr[0]; - psx_taken_BFC090D0 = (psx_brA_BFC090D0 != psx_brB_BFC090D0); - psx_delay_BFC090D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC090D4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090D4u); -#endif - if (psx_delay_BFC090D0) { - psx_delay_BFC090D0 = 0; - if (psx_taken_BFC090D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0913Cu); - goto label_BFC0913C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090D8u); - } -label_BFC090D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC090D8: A0C0000A sb $zero, 10($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC090D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (10)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0C0000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC090DC: 240200A0 addiu $v0, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240200A0u, cpu->gpr[2], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC090E0: 340CFFFF ori $t4, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC090E4: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC090E8: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC090E8u); return; } g_debug_last_store_pc = 0xBFC090E8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC090EC: ACC00004 sw $zero, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC090ECu); return; } g_debug_last_store_pc = 0xBFC090ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC090F0: 01204021 addu $t0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01204021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC090F4: 18A0000E blez $a1, 0xBFC09130 */ - uint32_t psx_brA_BFC090F4 = cpu->gpr[5]; - psx_taken_BFC090F4 = ((int32_t)psx_brA_BFC090F4 <= 0); - psx_delay_BFC090F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC090F8: A4CC0008 sh $t4, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC090F8u); return; } g_debug_last_store_pc = 0xBFC090F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4CC0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC090F8u); -#endif - if (psx_delay_BFC090F4) { - psx_delay_BFC090F4 = 0; - if (psx_taken_BFC090F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09130u); - goto label_BFC09130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC090FCu); - } -label_BFC090FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC090FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC090FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC090FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC090FC: 110B000C beq $t0, $t3, 0xBFC09130 */ - uint32_t psx_brA_BFC090FC = cpu->gpr[8]; uint32_t psx_brB_BFC090FC = cpu->gpr[11]; - psx_taken_BFC090FC = (psx_brA_BFC090FC == psx_brB_BFC090FC); - psx_delay_BFC090FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09100u); -#endif - if (psx_delay_BFC090FC) { - psx_delay_BFC090FC = 0; - if (psx_taken_BFC090FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09130u); - goto label_BFC09130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09104u); - } -label_BFC09104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC09104: 00087940 sll $t7, $t0, 5 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 5u; - PGXP_ALU(0x00087940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09104u); -#endif -label_BFC09108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8408u); -#endif - /* 0xBFC09108: 006F5021 addu $t2, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006F5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0910Cu); -#endif - /* 0xBFC0910C: 95440008 lhu $a0, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0910Cu); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x400u); } - PGXP_LOAD(0x95440008u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0910Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC09110: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC09114: AD420000 sw $v0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09114u); return; } g_debug_last_store_pc = 0xBFC09114u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC09118: AD400004 sw $zero, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09118u); return; } g_debug_last_store_pc = 0xBFC09118u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC0911C: A54C0008 sh $t4, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0911Cu); return; } g_debug_last_store_pc = 0xBFC0911Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA54C0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC09120: 18A00003 blez $a1, 0xBFC09130 */ - uint32_t psx_brA_BFC09120 = cpu->gpr[5]; - psx_taken_BFC09120 = ((int32_t)psx_brA_BFC09120 <= 0); - psx_delay_BFC09120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC09124: 00804021 addu $t0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09124u); -#endif - if (psx_delay_BFC09120) { - psx_delay_BFC09120 = 0; - if (psx_taken_BFC09120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09130u); - goto label_BFC09130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09128u); - } -label_BFC09128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC09128: 148BFFF7 bne $a0, $t3, 0xBFC09108 */ - uint32_t psx_brA_BFC09128 = cpu->gpr[4]; uint32_t psx_brB_BFC09128 = cpu->gpr[11]; - psx_taken_BFC09128 = (psx_brA_BFC09128 != psx_brB_BFC09128); - psx_delay_BFC09128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0912Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC0912C: 00087940 sll $t7, $t0, 5 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 5u; - PGXP_ALU(0x00087940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0912Cu); -#endif - if (psx_delay_BFC09128) { - psx_delay_BFC09128 = 0; - if (psx_taken_BFC09128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09108u); - goto label_BFC09108; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09130u); - } -label_BFC09130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09130: 03E00008 jr $ra */ - psx_delay_BFC09130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09134: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09134u); -#endif - if (psx_delay_BFC09130) { - psx_delay_BFC09130 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0913C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0913Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0913C: 03E00008 jr $ra */ - psx_delay_BFC0913C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09140u); -#endif - if (psx_delay_BFC0913C) { - psx_delay_BFC0913C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09144(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09144u); - int psx_delay_BFC09164 = 0; - int psx_taken_BFC09164 = 0; - int psx_delay_BFC0916C = 0; - int psx_delay_BFC09174 = 0; - int psx_taken_BFC09174 = 0; - int psx_delay_BFC09190 = 0; - int psx_taken_BFC09190 = 0; - int psx_delay_BFC09198 = 0; - int psx_delay_BFC091A0 = 0; - int psx_taken_BFC091A0 = 0; - int psx_delay_BFC091AC = 0; - int psx_taken_BFC091AC = 0; - int psx_delay_BFC091B4 = 0; - int psx_taken_BFC091B4 = 0; - int psx_delay_BFC091C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09158u: goto label_BFC09158; - case 0xBFC0916Cu: goto label_BFC0916C; - case 0xBFC09174u: goto label_BFC09174; - case 0xBFC0917Cu: goto label_BFC0917C; - case 0xBFC09188u: goto label_BFC09188; - case 0xBFC09198u: goto label_BFC09198; - case 0xBFC091A0u: goto label_BFC091A0; - case 0xBFC091A8u: goto label_BFC091A8; - case 0xBFC091ACu: goto label_BFC091AC; - case 0xBFC091B4u: goto label_BFC091B4; - case 0xBFC091BCu: goto label_BFC091BC; - default: break; - } - } -label_BFC09144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09144: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC09148: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0914Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0914C: 2484B9E4 addiu $a0, $a0, -17948 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17948)); - PGXP_ALU(0x2484B9E4u, cpu->gpr[4], _pgx1, 0xFFFFB9E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0914Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09150: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09150u); return; } g_debug_last_store_pc = 0xBFC09150u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC09154: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09154u); -#endif -label_BFC09158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09158: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0915Cu); -#endif - /* 0xBFC0915C: 8DCEB9D0 lw $t6, -17968($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -17968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0915Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEB9D0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0915Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC09164: 15C30005 bne $t6, $v1, 0xBFC0917C */ - uint32_t psx_brA_BFC09164 = cpu->gpr[14]; uint32_t psx_brB_BFC09164 = cpu->gpr[3]; - psx_taken_BFC09164 = (psx_brA_BFC09164 != psx_brB_BFC09164); - psx_delay_BFC09164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09168u); -#endif - if (psx_delay_BFC09164) { - psx_delay_BFC09164 = 0; - if (psx_taken_BFC09164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0917Cu); - goto label_BFC0917C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0916Cu); - } -label_BFC0916C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0916Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0916Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0916Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0916C: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC09174u; /* jal link before delay slot */ - psx_delay_BFC0916C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09170: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09170u); -#endif - if (psx_delay_BFC0916C) { - psx_delay_BFC0916C = 0; - cpu->gpr[31] = 0xBFC09174u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC09174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09174: 10000011 beq $zero, $zero, 0xBFC091BC */ - uint32_t psx_brA_BFC09174 = cpu->gpr[0]; uint32_t psx_brB_BFC09174 = cpu->gpr[0]; - psx_taken_BFC09174 = (psx_brA_BFC09174 == psx_brB_BFC09174); - psx_delay_BFC09174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09178: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09178u); -#endif - if (psx_delay_BFC09174) { - psx_delay_BFC09174 = 0; - if (psx_taken_BFC09174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091BCu); - goto label_BFC091BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0917Cu); - } -label_BFC0917C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0917Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0917Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0917Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0917C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0917Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09180: 2442B9D4 addiu $v0, $v0, -17964 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-17964)); - PGXP_ALU(0x2442B9D4u, cpu->gpr[2], _pgx1, 0xFFFFB9D4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC09184: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09184u); -#endif -label_BFC09188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09188u); -#endif - /* 0xBFC09188: 8C4F0000 lw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09188u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0918Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0918C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0918Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC09190: 146F0006 bne $v1, $t7, 0xBFC091AC */ - uint32_t psx_brA_BFC09190 = cpu->gpr[3]; uint32_t psx_brB_BFC09190 = cpu->gpr[15]; - psx_taken_BFC09190 = (psx_brA_BFC09190 != psx_brB_BFC09190); - psx_delay_BFC09190 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09194: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09194u); -#endif - if (psx_delay_BFC09190) { - psx_delay_BFC09190 = 0; - if (psx_taken_BFC09190) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091ACu); - goto label_BFC091AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09198u); - } -label_BFC09198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09198: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC091A0u; /* jal link before delay slot */ - psx_delay_BFC09198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0919Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0919C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0919Cu); -#endif - if (psx_delay_BFC09198) { - psx_delay_BFC09198 = 0; - cpu->gpr[31] = 0xBFC091A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC091A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC091A0: 10000006 beq $zero, $zero, 0xBFC091BC */ - uint32_t psx_brA_BFC091A0 = cpu->gpr[0]; uint32_t psx_brB_BFC091A0 = cpu->gpr[0]; - psx_taken_BFC091A0 = (psx_brA_BFC091A0 == psx_brB_BFC091A0); - psx_delay_BFC091A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC091A4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091A4u); -#endif - if (psx_delay_BFC091A0) { - psx_delay_BFC091A0 = 0; - if (psx_taken_BFC091A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091BCu); - goto label_BFC091BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091A8u); - } -label_BFC091A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC091A8: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091A8u); -#endif -label_BFC091AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC091AC: 1444FFF6 bne $v0, $a0, 0xBFC09188 */ - uint32_t psx_brA_BFC091AC = cpu->gpr[2]; uint32_t psx_brB_BFC091AC = cpu->gpr[4]; - psx_taken_BFC091AC = (psx_brA_BFC091AC != psx_brB_BFC091AC); - psx_delay_BFC091AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC091B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC091B0u); -#endif - if (psx_delay_BFC091AC) { - psx_delay_BFC091AC = 0; - if (psx_taken_BFC091AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09188u); - goto label_BFC09188; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091B4u); - } -label_BFC091B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC091B4: 1000FFE8 beq $zero, $zero, 0xBFC09158 */ - uint32_t psx_brA_BFC091B4 = cpu->gpr[0]; uint32_t psx_brB_BFC091B4 = cpu->gpr[0]; - psx_taken_BFC091B4 = (psx_brA_BFC091B4 == psx_brB_BFC091B4); - psx_delay_BFC091B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC091B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC091B8u); -#endif - if (psx_delay_BFC091B4) { - psx_delay_BFC091B4 = 0; - if (psx_taken_BFC091B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09158u); - goto label_BFC09158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091BCu); - } -label_BFC091BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091BCu); -#endif - /* 0xBFC091BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC091C0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC091C4: 03E00008 jr $ra */ - psx_delay_BFC091C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC091C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC091C8u); -#endif - if (psx_delay_BFC091C4) { - psx_delay_BFC091C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC091CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC091CCu); - int psx_delay_BFC09200 = 0; - int psx_taken_BFC09200 = 0; - int psx_delay_BFC0921C = 0; - int psx_taken_BFC0921C = 0; - int psx_delay_BFC09230 = 0; - int psx_delay_BFC09238 = 0; - int psx_taken_BFC09238 = 0; - int psx_delay_BFC09248 = 0; - int psx_delay_BFC09250 = 0; - int psx_taken_BFC09250 = 0; - int psx_delay_BFC09264 = 0; - int psx_taken_BFC09264 = 0; - int psx_delay_BFC0926C = 0; - int psx_delay_BFC09274 = 0; - int psx_taken_BFC09274 = 0; - int psx_delay_BFC09298 = 0; - int psx_taken_BFC09298 = 0; - int psx_delay_BFC092AC = 0; - int psx_taken_BFC092AC = 0; - int psx_delay_BFC092E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09208u: goto label_BFC09208; - case 0xBFC09224u: goto label_BFC09224; - case 0xBFC09228u: goto label_BFC09228; - case 0xBFC0922Cu: goto label_BFC0922C; - case 0xBFC09238u: goto label_BFC09238; - case 0xBFC09240u: goto label_BFC09240; - case 0xBFC09244u: goto label_BFC09244; - case 0xBFC09250u: goto label_BFC09250; - case 0xBFC09258u: goto label_BFC09258; - case 0xBFC0926Cu: goto label_BFC0926C; - case 0xBFC09274u: goto label_BFC09274; - case 0xBFC0927Cu: goto label_BFC0927C; - case 0xBFC092A0u: goto label_BFC092A0; - case 0xBFC092B4u: goto label_BFC092B4; - case 0xBFC092C4u: goto label_BFC092C4; - case 0xBFC092C8u: goto label_BFC092C8; - default: break; - } - } -label_BFC091CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC091CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC091CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC091CC: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC091D0: AFBE0028 sw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091D0u); return; } g_debug_last_store_pc = 0xBFC091D0u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC091D4: AFB70024 sw $s7, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091D4u); return; } g_debug_last_store_pc = 0xBFC091D4u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70024u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC091D8: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091D8u); return; } g_debug_last_store_pc = 0xBFC091D8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC091DC: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091DCu); return; } g_debug_last_store_pc = 0xBFC091DCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000041u); -#endif - /* 0xBFC091E0: 00C0F021 addu $fp, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC091E4: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091E4u); return; } g_debug_last_store_pc = 0xBFC091E4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC091E8: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091E8u); return; } g_debug_last_store_pc = 0xBFC091E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC091EC: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40081u); -#endif - /* 0xBFC091F0: 00E09021 addu $s2, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC091F4: 0080B821 addu $s7, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC091F8: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091F8u); return; } g_debug_last_store_pc = 0xBFC091F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC091FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC091FC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC091FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC09200: 1BC00030 blez $fp, 0xBFC092C4 */ - uint32_t psx_brA_BFC09200 = cpu->gpr[30]; - psx_taken_BFC09200 = ((int32_t)psx_brA_BFC09200 <= 0); - psx_delay_BFC09200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC09204: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09204u); -#endif - if (psx_delay_BFC09200) { - psx_delay_BFC09200 = 0; - if (psx_taken_BFC09200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092C4u); - goto label_BFC092C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09208u); - } -label_BFC09208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC09208: AFB60034 sw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09208u); return; } g_debug_last_store_pc = 0xBFC09208u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0920Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0920C: AFB4003C sw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0920Cu); return; } g_debug_last_store_pc = 0xBFC0920Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0920Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC09210: AFB50038 sw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09210u); return; } g_debug_last_store_pc = 0xBFC09210u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC09214: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC09218: 2414FFFF addiu $s4, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2414FFFFu, cpu->gpr[20], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0921Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC0921C: 06E10002 bgez $s7, 0xBFC09228 */ - uint32_t psx_brA_BFC0921C = cpu->gpr[23]; - psx_taken_BFC0921C = ((int32_t)psx_brA_BFC0921C >= 0); - psx_delay_BFC0921C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800003u); -#endif - /* 0xBFC09220: 02E00821 addu $at, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09220u); -#endif - if (psx_delay_BFC0921C) { - psx_delay_BFC0921C = 0; - if (psx_taken_BFC0921C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09228u); - goto label_BFC09228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09224u); - } -label_BFC09224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09224: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09224u); -#endif -label_BFC09228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC09228: 0001B103 sra $s6, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001B103u, cpu->gpr[22], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09228u); -#endif -label_BFC0922C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0922Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0922Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0922Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC0922C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0922Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09230: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC09238u; /* jal link before delay slot */ - psx_delay_BFC09230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC09234: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09234u); -#endif - if (psx_delay_BFC09230) { - psx_delay_BFC09230 = 0; - cpu->gpr[31] = 0xBFC09238u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC09238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC09238: 14540002 bne $v0, $s4, 0xBFC09244 */ - uint32_t psx_brA_BFC09238 = cpu->gpr[2]; uint32_t psx_brB_BFC09238 = cpu->gpr[20]; - psx_taken_BFC09238 = (psx_brA_BFC09238 != psx_brB_BFC09238); - psx_delay_BFC09238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0923Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0923C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0923Cu); -#endif - if (psx_delay_BFC09238) { - psx_delay_BFC09238 = 0; - if (psx_taken_BFC09238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09244u); - goto label_BFC09244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09240u); - } -label_BFC09240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC09240: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09240u); -#endif -label_BFC09244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09244: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09248: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC09250u; /* jal link before delay slot */ - psx_delay_BFC09248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0924Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC0924C: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0924Cu); -#endif - if (psx_delay_BFC09248) { - psx_delay_BFC09248 = 0; - cpu->gpr[31] = 0xBFC09250u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC09250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC09250: 10550006 beq $v0, $s5, 0xBFC0926C */ - uint32_t psx_brA_BFC09250 = cpu->gpr[2]; uint32_t psx_brB_BFC09250 = cpu->gpr[21]; - psx_taken_BFC09250 = (psx_brA_BFC09250 == psx_brB_BFC09250); - psx_delay_BFC09250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09254u); -#endif - if (psx_delay_BFC09250) { - psx_delay_BFC09250 = 0; - if (psx_taken_BFC09250) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0926Cu); - goto label_BFC0926C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09258u); - } -label_BFC09258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09258u); -#endif - /* 0xBFC09258: 8FB4003C lw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09258u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0925Cu); -#endif - /* 0xBFC0925C: 8FB50038 lw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0925Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0925Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09260u); -#endif - /* 0xBFC09260: 8FB60034 lw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09260u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09264: 10000018 beq $zero, $zero, 0xBFC092C8 */ - uint32_t psx_brA_BFC09264 = cpu->gpr[0]; uint32_t psx_brB_BFC09264 = cpu->gpr[0]; - psx_taken_BFC09264 = (psx_brA_BFC09264 == psx_brB_BFC09264); - psx_delay_BFC09264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09268: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09268u); -#endif - if (psx_delay_BFC09264) { - psx_delay_BFC09264 = 0; - if (psx_taken_BFC09264) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092C8u); - goto label_BFC092C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0926Cu); - } -label_BFC0926C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0926Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0926Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0926Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0926C: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC09274u; /* jal link before delay slot */ - psx_delay_BFC0926C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09270: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09270u); -#endif - if (psx_delay_BFC0926C) { - psx_delay_BFC0926C = 0; - cpu->gpr[31] = 0xBFC09274u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC09274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09274: 1040000A beq $v0, $zero, 0xBFC092A0 */ - uint32_t psx_brA_BFC09274 = cpu->gpr[2]; uint32_t psx_brB_BFC09274 = cpu->gpr[0]; - psx_taken_BFC09274 = (psx_brA_BFC09274 == psx_brB_BFC09274); - psx_delay_BFC09274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09278: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09278u); -#endif - if (psx_delay_BFC09274) { - psx_delay_BFC09274 = 0; - if (psx_taken_BFC09274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092A0u); - goto label_BFC092A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0927Cu); - } -label_BFC0927C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0927Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0927Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0927Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC0927C: 00167080 sll $t6, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00167080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0927Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09280: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC09284: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09288u); -#endif - /* 0xBFC09288: 8FB60034 lw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09288u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0928Cu); -#endif - /* 0xBFC0928C: 8FB4003C lw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0928Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0928Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09290u); -#endif - /* 0xBFC09290: 8FB50038 lw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09290u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC09294: AC259F80 sw $a1, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09294u); return; } g_debug_last_store_pc = 0xBFC09294u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259F80u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09298: 1000000B beq $zero, $zero, 0xBFC092C8 */ - uint32_t psx_brA_BFC09298 = cpu->gpr[0]; uint32_t psx_brB_BFC09298 = cpu->gpr[0]; - psx_taken_BFC09298 = (psx_brA_BFC09298 == psx_brB_BFC09298); - psx_delay_BFC09298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0929Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC0929C: 02601021 addu $v0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0929Cu); -#endif - if (psx_delay_BFC09298) { - psx_delay_BFC09298 = 0; - if (psx_taken_BFC09298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092C8u); - goto label_BFC092C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092A0u); - } -label_BFC092A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC092A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC092A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC092A0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC092A4: 26520080 addiu $s2, $s2, 128 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (128)); - PGXP_ALU(0x26520080u, cpu->gpr[18], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC092A8: 26730080 addiu $s3, $s3, 128 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (128)); - PGXP_ALU(0x26730080u, cpu->gpr[19], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020000u); -#endif - /* 0xBFC092AC: 163EFFDF bne $s1, $fp, 0xBFC0922C */ - uint32_t psx_brA_BFC092AC = cpu->gpr[17]; uint32_t psx_brB_BFC092AC = cpu->gpr[30]; - psx_taken_BFC092AC = (psx_brA_BFC092AC != psx_brB_BFC092AC); - psx_delay_BFC092AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC092B0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092B0u); -#endif - if (psx_delay_BFC092AC) { - psx_delay_BFC092AC = 0; - if (psx_taken_BFC092AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0922Cu); - goto label_BFC0922C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092B4u); - } -label_BFC092B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC092B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC092B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092B4u); -#endif - /* 0xBFC092B4: 8FB4003C lw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092B4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092B8u); -#endif - /* 0xBFC092B8: 8FB50038 lw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092B8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092BCu); -#endif - /* 0xBFC092BC: 8FB60034 lw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092BCu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC092C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC092C0u); -#endif -label_BFC092C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC092C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC092C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC092C4: 02601021 addu $v0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092C4u); -#endif -label_BFC092C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC092C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC092C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092C8u); -#endif - /* 0xBFC092C8: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092CCu); -#endif - /* 0xBFC092CC: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092CCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092D0u); -#endif - /* 0xBFC092D0: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092D0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092D4u); -#endif - /* 0xBFC092D4: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092D4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092D8u); -#endif - /* 0xBFC092D8: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092D8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092DCu); -#endif - /* 0xBFC092DC: 8FB70024 lw $s7, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092DCu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70024u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092E0u); -#endif - /* 0xBFC092E0: 8FBE0028 lw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092E0u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC092E4: 03E00008 jr $ra */ - psx_delay_BFC092E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC092E8: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092E8u); -#endif - if (psx_delay_BFC092E4) { - psx_delay_BFC092E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC092EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC092ECu); - int psx_delay_BFC09324 = 0; - int psx_taken_BFC09324 = 0; - int psx_delay_BFC0932C = 0; - int psx_taken_BFC0932C = 0; - int psx_delay_BFC09340 = 0; - int psx_taken_BFC09340 = 0; - int psx_delay_BFC09354 = 0; - int psx_delay_BFC0935C = 0; - int psx_taken_BFC0935C = 0; - int psx_delay_BFC0936C = 0; - int psx_delay_BFC09378 = 0; - int psx_taken_BFC09378 = 0; - int psx_delay_BFC09388 = 0; - int psx_taken_BFC09388 = 0; - int psx_delay_BFC09390 = 0; - int psx_delay_BFC0939C = 0; - int psx_taken_BFC0939C = 0; - int psx_delay_BFC093AC = 0; - int psx_delay_BFC093B4 = 0; - int psx_taken_BFC093B4 = 0; - int psx_delay_BFC093C4 = 0; - int psx_delay_BFC093CC = 0; - int psx_taken_BFC093CC = 0; - int psx_delay_BFC093F0 = 0; - int psx_taken_BFC093F0 = 0; - int psx_delay_BFC093F8 = 0; - int psx_taken_BFC093F8 = 0; - int psx_delay_BFC09418 = 0; - int psx_taken_BFC09418 = 0; - int psx_delay_BFC0942C = 0; - int psx_taken_BFC0942C = 0; - int psx_delay_BFC09440 = 0; - int psx_delay_BFC0944C = 0; - int psx_taken_BFC0944C = 0; - int psx_delay_BFC09454 = 0; - int psx_taken_BFC09454 = 0; - int psx_delay_BFC0945C = 0; - int psx_delay_BFC09468 = 0; - int psx_taken_BFC09468 = 0; - int psx_delay_BFC09474 = 0; - int psx_taken_BFC09474 = 0; - int psx_delay_BFC09488 = 0; - int psx_delay_BFC09490 = 0; - int psx_taken_BFC09490 = 0; - int psx_delay_BFC094A0 = 0; - int psx_delay_BFC094A8 = 0; - int psx_taken_BFC094A8 = 0; - int psx_delay_BFC094CC = 0; - int psx_taken_BFC094CC = 0; - int psx_delay_BFC094DC = 0; - int psx_taken_BFC094DC = 0; - int psx_delay_BFC094E4 = 0; - int psx_taken_BFC094E4 = 0; - int psx_delay_BFC09508 = 0; - int psx_taken_BFC09508 = 0; - int psx_delay_BFC09538 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0932Cu: goto label_BFC0932C; - case 0xBFC09334u: goto label_BFC09334; - case 0xBFC09348u: goto label_BFC09348; - case 0xBFC0934Cu: goto label_BFC0934C; - case 0xBFC09350u: goto label_BFC09350; - case 0xBFC0935Cu: goto label_BFC0935C; - case 0xBFC09364u: goto label_BFC09364; - case 0xBFC09368u: goto label_BFC09368; - case 0xBFC09374u: goto label_BFC09374; - case 0xBFC09380u: goto label_BFC09380; - case 0xBFC09390u: goto label_BFC09390; - case 0xBFC09398u: goto label_BFC09398; - case 0xBFC093A4u: goto label_BFC093A4; - case 0xBFC093B4u: goto label_BFC093B4; - case 0xBFC093BCu: goto label_BFC093BC; - case 0xBFC093C0u: goto label_BFC093C0; - case 0xBFC093CCu: goto label_BFC093CC; - case 0xBFC093D4u: goto label_BFC093D4; - case 0xBFC093F8u: goto label_BFC093F8; - case 0xBFC09400u: goto label_BFC09400; - case 0xBFC09420u: goto label_BFC09420; - case 0xBFC09424u: goto label_BFC09424; - case 0xBFC09434u: goto label_BFC09434; - case 0xBFC09440u: goto label_BFC09440; - case 0xBFC09448u: goto label_BFC09448; - case 0xBFC09454u: goto label_BFC09454; - case 0xBFC0945Cu: goto label_BFC0945C; - case 0xBFC09464u: goto label_BFC09464; - case 0xBFC09470u: goto label_BFC09470; - case 0xBFC0947Cu: goto label_BFC0947C; - case 0xBFC09480u: goto label_BFC09480; - case 0xBFC09490u: goto label_BFC09490; - case 0xBFC09498u: goto label_BFC09498; - case 0xBFC0949Cu: goto label_BFC0949C; - case 0xBFC094A8u: goto label_BFC094A8; - case 0xBFC094B0u: goto label_BFC094B0; - case 0xBFC094D4u: goto label_BFC094D4; - case 0xBFC094DCu: goto label_BFC094DC; - case 0xBFC094E4u: goto label_BFC094E4; - case 0xBFC094ECu: goto label_BFC094EC; - case 0xBFC094F0u: goto label_BFC094F0; - case 0xBFC09510u: goto label_BFC09510; - case 0xBFC09518u: goto label_BFC09518; - default: break; - } - } -label_BFC092EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC092ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC092ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC092EC: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC092F0: AFBE0030 sw $fp, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092F0u); return; } g_debug_last_store_pc = 0xBFC092F0u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0030u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC092F4: AFB60028 sw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092F4u); return; } g_debug_last_store_pc = 0xBFC092F4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC092F8: AFB7002C sw $s7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092F8u); return; } g_debug_last_store_pc = 0xBFC092F8u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7002Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC092FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC092FC: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC092FCu); return; } g_debug_last_store_pc = 0xBFC092FCu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC092FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC09300: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09300u); return; } g_debug_last_store_pc = 0xBFC09300u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000041u); -#endif - /* 0xBFC09304: 00C0F021 addu $fp, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC09308: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09308u); return; } g_debug_last_store_pc = 0xBFC09308u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0930Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0930C: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0930Cu); return; } g_debug_last_store_pc = 0xBFC0930Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0930Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC09310: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80081u); -#endif - /* 0xBFC09314: 00E09821 addu $s3, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC09318: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0931Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC0931C: AFB50024 sw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0931Cu); return; } g_debug_last_store_pc = 0xBFC0931Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0931Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC09320: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC09324: 1FC00003 bgtz $fp, 0xBFC09334 */ - uint32_t psx_brA_BFC09324 = cpu->gpr[30]; - psx_taken_BFC09324 = ((int32_t)psx_brA_BFC09324 > 0); - psx_delay_BFC09324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC09328: 0000B821 addu $s7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09328u); -#endif - if (psx_delay_BFC09324) { - psx_delay_BFC09324 = 0; - if (psx_taken_BFC09324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09334u); - goto label_BFC09334; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0932Cu); - } -label_BFC0932C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0932Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0932C: 10000044 beq $zero, $zero, 0xBFC09440 */ - uint32_t psx_brA_BFC0932C = cpu->gpr[0]; uint32_t psx_brB_BFC0932C = cpu->gpr[0]; - psx_taken_BFC0932C = (psx_brA_BFC0932C == psx_brB_BFC0932C); - psx_delay_BFC0932C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC09330: 2415FFFF addiu $s5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2415FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09330u); -#endif - if (psx_delay_BFC0932C) { - psx_delay_BFC0932C = 0; - if (psx_taken_BFC0932C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09440u); - goto label_BFC09440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09334u); - } -label_BFC09334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC09334: AFB40038 sw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09334u); return; } g_debug_last_store_pc = 0xBFC09334u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09338: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09338u); return; } g_debug_last_store_pc = 0xBFC09338u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0933C: 2415FFFF addiu $s5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2415FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC09340: 06C10002 bgez $s6, 0xBFC0934C */ - uint32_t psx_brA_BFC09340 = cpu->gpr[22]; - psx_taken_BFC09340 = ((int32_t)psx_brA_BFC09340 >= 0); - psx_delay_BFC09340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400003u); -#endif - /* 0xBFC09344: 02C00821 addu $at, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09344u); -#endif - if (psx_delay_BFC09340) { - psx_delay_BFC09340 = 0; - if (psx_taken_BFC09340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0934Cu); - goto label_BFC0934C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09348u); - } -label_BFC09348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09348: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09348u); -#endif -label_BFC0934C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0934Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC0934C: 0001A103 sra $s4, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001A103u, cpu->gpr[20], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0934Cu); -#endif -label_BFC09350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC09350: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09354: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC0935Cu; /* jal link before delay slot */ - psx_delay_BFC09354 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC09358: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09358u); -#endif - if (psx_delay_BFC09354) { - psx_delay_BFC09354 = 0; - cpu->gpr[31] = 0xBFC0935Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC0935C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0935Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0935Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0935Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC0935C: 14550002 bne $v0, $s5, 0xBFC09368 */ - uint32_t psx_brA_BFC0935C = cpu->gpr[2]; uint32_t psx_brB_BFC0935C = cpu->gpr[21]; - psx_taken_BFC0935C = (psx_brA_BFC0935C != psx_brB_BFC0935C); - psx_delay_BFC0935C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09360: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09360u); -#endif - if (psx_delay_BFC0935C) { - psx_delay_BFC0935C = 0; - if (psx_taken_BFC0935C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09368u); - goto label_BFC09368; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09364u); - } -label_BFC09364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC09364: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09364u); -#endif -label_BFC09368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC09368: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0936Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0936C: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC09374u; /* jal link before delay slot */ - psx_delay_BFC0936C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC09370: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09370u); -#endif - if (psx_delay_BFC0936C) { - psx_delay_BFC0936C = 0; - cpu->gpr[31] = 0xBFC09374u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC09374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09374: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09378: 10410005 beq $v0, $at, 0xBFC09390 */ - uint32_t psx_brA_BFC09378 = cpu->gpr[2]; uint32_t psx_brB_BFC09378 = cpu->gpr[1]; - psx_taken_BFC09378 = (psx_brA_BFC09378 == psx_brB_BFC09378); - psx_delay_BFC09378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0937Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0937C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0937Cu); -#endif - if (psx_delay_BFC09378) { - psx_delay_BFC09378 = 0; - if (psx_taken_BFC09378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09390u); - goto label_BFC09390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09380u); - } -label_BFC09380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09380u); -#endif - /* 0xBFC09380: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09380u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09384u); -#endif - /* 0xBFC09384: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09384u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09388: 10000063 beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC09388 = cpu->gpr[0]; uint32_t psx_brB_BFC09388 = cpu->gpr[0]; - psx_taken_BFC09388 = (psx_brA_BFC09388 == psx_brB_BFC09388); - psx_delay_BFC09388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0938Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0938C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0938Cu); -#endif - if (psx_delay_BFC09388) { - psx_delay_BFC09388 = 0; - if (psx_taken_BFC09388) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09390u); - } -label_BFC09390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09390: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC09398u; /* jal link before delay slot */ - psx_delay_BFC09390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09394: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09394u); -#endif - if (psx_delay_BFC09390) { - psx_delay_BFC09390 = 0; - cpu->gpr[31] = 0xBFC09398u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC09398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09398: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0939Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0939C: 14410016 bne $v0, $at, 0xBFC093F8 */ - uint32_t psx_brA_BFC0939C = cpu->gpr[2]; uint32_t psx_brB_BFC0939C = cpu->gpr[1]; - psx_taken_BFC0939C = (psx_brA_BFC0939C != psx_brB_BFC0939C); - psx_delay_BFC0939C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC093A0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093A0u); -#endif - if (psx_delay_BFC0939C) { - psx_delay_BFC0939C = 0; - if (psx_taken_BFC0939C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093F8u); - goto label_BFC093F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093A4u); - } -label_BFC093A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC093A4: 2630FFFF addiu $s0, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2630FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC093A8: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC093AC: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC093B4u; /* jal link before delay slot */ - psx_delay_BFC093AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC093B0: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093B0u); -#endif - if (psx_delay_BFC093AC) { - psx_delay_BFC093AC = 0; - cpu->gpr[31] = 0xBFC093B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC093B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC093B4: 14550002 bne $v0, $s5, 0xBFC093C0 */ - uint32_t psx_brA_BFC093B4 = cpu->gpr[2]; uint32_t psx_brB_BFC093B4 = cpu->gpr[21]; - psx_taken_BFC093B4 = (psx_brA_BFC093B4 != psx_brB_BFC093B4); - psx_delay_BFC093B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC093B8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093B8u); -#endif - if (psx_delay_BFC093B4) { - psx_delay_BFC093B4 = 0; - if (psx_taken_BFC093B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093C0u); - goto label_BFC093C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093BCu); - } -label_BFC093BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC093BC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093BCu); -#endif -label_BFC093C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC093C0: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC093C4: 0FF02566 jal 0xBFC09598 */ - cpu->gpr[31] = 0xBFC093CCu; /* jal link before delay slot */ - psx_delay_BFC093C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80040u); -#endif - /* 0xBFC093C8: 2666FF80 addiu $a2, $s3, -128 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[19] + (-128)); - PGXP_ALU(0x2666FF80u, cpu->gpr[6], _pgx1, 0xFFFFFF80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093C8u); -#endif - if (psx_delay_BFC093C4) { - psx_delay_BFC093C4 = 0; - cpu->gpr[31] = 0xBFC093CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09598u); - cpu->pc = 0xBFC09598u; return; - } -label_BFC093CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC093CC: 14400015 bne $v0, $zero, 0xBFC09424 */ - uint32_t psx_brA_BFC093CC = cpu->gpr[2]; uint32_t psx_brB_BFC093CC = cpu->gpr[0]; - psx_taken_BFC093CC = (psx_brA_BFC093CC != psx_brB_BFC093CC); - psx_delay_BFC093CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC093D0: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093D0u); -#endif - if (psx_delay_BFC093CC) { - psx_delay_BFC093CC = 0; - if (psx_taken_BFC093CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09424u); - goto label_BFC09424; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093D4u); - } -label_BFC093D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC093D4: 00147880 sll $t7, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC093D8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC093D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC093DC: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC093E0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093E4u); -#endif - /* 0xBFC093E4: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC093E4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093E8u); -#endif - /* 0xBFC093E8: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC093E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC093EC: AC2E9F80 sw $t6, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC093ECu); return; } g_debug_last_store_pc = 0xBFC093ECu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F80u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC093F0: 10000049 beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC093F0 = cpu->gpr[0]; uint32_t psx_brB_BFC093F0 = cpu->gpr[0]; - psx_taken_BFC093F0 = (psx_brA_BFC093F0 == psx_brB_BFC093F0); - psx_delay_BFC093F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC093F4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093F4u); -#endif - if (psx_delay_BFC093F0) { - psx_delay_BFC093F0 = 0; - if (psx_taken_BFC093F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC093F8u); - } -label_BFC093F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC093F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC093F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC093F8: 1840000A blez $v0, 0xBFC09424 */ - uint32_t psx_brA_BFC093F8 = cpu->gpr[2]; - psx_taken_BFC093F8 = ((int32_t)psx_brA_BFC093F8 <= 0); - psx_delay_BFC093F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC093FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC093FC: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC093FCu); -#endif - if (psx_delay_BFC093F8) { - psx_delay_BFC093F8 = 0; - if (psx_taken_BFC093F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09424u); - goto label_BFC09424; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09400u); - } -label_BFC09400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC09400: 0014C080 sll $t8, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09404: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC09408: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0940Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0940C: AC309F80 sw $s0, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0940Cu); return; } g_debug_last_store_pc = 0xBFC0940Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309F80u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0940Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09410u); -#endif - /* 0xBFC09410: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09410u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09414u); -#endif - /* 0xBFC09414: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09414u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09418: 1000003F beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC09418 = cpu->gpr[0]; uint32_t psx_brB_BFC09418 = cpu->gpr[0]; - psx_taken_BFC09418 = (psx_brA_BFC09418 == psx_brB_BFC09418); - psx_delay_BFC09418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0941Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0941C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0941Cu); -#endif - if (psx_delay_BFC09418) { - psx_delay_BFC09418 = 0; - if (psx_taken_BFC09418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09420u); - } -label_BFC09420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC09420: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09420u); -#endif -label_BFC09424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC09424: 26730080 addiu $s3, $s3, 128 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (128)); - PGXP_ALU(0x26730080u, cpu->gpr[19], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC09428: 26F70080 addiu $s7, $s7, 128 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (128)); - PGXP_ALU(0x26F70080u, cpu->gpr[23], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0942Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40040000u); -#endif - /* 0xBFC0942C: 165EFFC8 bne $s2, $fp, 0xBFC09350 */ - uint32_t psx_brA_BFC0942C = cpu->gpr[18]; uint32_t psx_brB_BFC0942C = cpu->gpr[30]; - psx_taken_BFC0942C = (psx_brA_BFC0942C != psx_brB_BFC0942C); - psx_delay_BFC0942C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC09430: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09430u); -#endif - if (psx_delay_BFC0942C) { - psx_delay_BFC0942C = 0; - if (psx_taken_BFC0942C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09350u); - goto label_BFC09350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09434u); - } -label_BFC09434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09434u); -#endif - /* 0xBFC09434: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09434u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09438u); -#endif - /* 0xBFC09438: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09438u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0943Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0943C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0943Cu); -#endif -label_BFC09440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09440: 0FF03037 jal 0xBFC0C0DC */ - cpu->gpr[31] = 0xBFC09448u; /* jal link before delay slot */ - psx_delay_BFC09440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC09444: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09444u); -#endif - if (psx_delay_BFC09440) { - psx_delay_BFC09440 = 0; - cpu->gpr[31] = 0xBFC09448u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0DCu); - cpu->pc = 0xBFC0C0DCu; return; - } -label_BFC09448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09448: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0944Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0944C: 10410003 beq $v0, $at, 0xBFC0945C */ - uint32_t psx_brA_BFC0944C = cpu->gpr[2]; uint32_t psx_brB_BFC0944C = cpu->gpr[1]; - psx_taken_BFC0944C = (psx_brA_BFC0944C == psx_brB_BFC0944C); - psx_delay_BFC0944C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09450u); -#endif - if (psx_delay_BFC0944C) { - psx_delay_BFC0944C = 0; - if (psx_taken_BFC0944C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0945Cu); - goto label_BFC0945C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09454u); - } -label_BFC09454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09454: 10000030 beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC09454 = cpu->gpr[0]; uint32_t psx_brB_BFC09454 = cpu->gpr[0]; - psx_taken_BFC09454 = (psx_brA_BFC09454 == psx_brB_BFC09454); - psx_delay_BFC09454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09458: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09458u); -#endif - if (psx_delay_BFC09454) { - psx_delay_BFC09454 = 0; - if (psx_taken_BFC09454) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0945Cu); - } -label_BFC0945C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0945Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0945Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0945Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0945C: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC09464u; /* jal link before delay slot */ - psx_delay_BFC0945C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09460: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09460u); return; } g_debug_last_store_pc = 0xBFC09460u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09460u); -#endif - if (psx_delay_BFC0945C) { - psx_delay_BFC0945C = 0; - cpu->gpr[31] = 0xBFC09464u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC09464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09464: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09468: 1441001C bne $v0, $at, 0xBFC094DC */ - uint32_t psx_brA_BFC09468 = cpu->gpr[2]; uint32_t psx_brB_BFC09468 = cpu->gpr[1]; - psx_taken_BFC09468 = (psx_brA_BFC09468 != psx_brB_BFC09468); - psx_delay_BFC09468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0946Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0946C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0946Cu); -#endif - if (psx_delay_BFC09468) { - psx_delay_BFC09468 = 0; - if (psx_taken_BFC09468) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094DCu); - goto label_BFC094DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09470u); - } -label_BFC09470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC09470: AFB40038 sw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09470u); return; } g_debug_last_store_pc = 0xBFC09470u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC09474: 06C10002 bgez $s6, 0xBFC09480 */ - uint32_t psx_brA_BFC09474 = cpu->gpr[22]; - psx_taken_BFC09474 = ((int32_t)psx_brA_BFC09474 >= 0); - psx_delay_BFC09474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400003u); -#endif - /* 0xBFC09478: 02C00821 addu $at, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09478u); -#endif - if (psx_delay_BFC09474) { - psx_delay_BFC09474 = 0; - if (psx_taken_BFC09474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09480u); - goto label_BFC09480; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0947Cu); - } -label_BFC0947C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0947Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0947C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0947Cu); -#endif -label_BFC09480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC09480: 0001A103 sra $s4, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001A103u, cpu->gpr[20], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC09484: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09488: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC09490u; /* jal link before delay slot */ - psx_delay_BFC09488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC0948C: 2625FFFF addiu $a1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2625FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0948Cu); -#endif - if (psx_delay_BFC09488) { - psx_delay_BFC09488 = 0; - cpu->gpr[31] = 0xBFC09490u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC09490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC09490: 14550002 bne $v0, $s5, 0xBFC0949C */ - uint32_t psx_brA_BFC09490 = cpu->gpr[2]; uint32_t psx_brB_BFC09490 = cpu->gpr[21]; - psx_taken_BFC09490 = (psx_brA_BFC09490 != psx_brB_BFC09490); - psx_delay_BFC09490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09494: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09494u); -#endif - if (psx_delay_BFC09490) { - psx_delay_BFC09490 = 0; - if (psx_taken_BFC09490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0949Cu); - goto label_BFC0949C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09498u); - } -label_BFC09498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC09498: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09498u); -#endif -label_BFC0949C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0949Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0949Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0949Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC0949C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0949Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC094A0: 0FF02566 jal 0xBFC09598 */ - cpu->gpr[31] = 0xBFC094A8u; /* jal link before delay slot */ - psx_delay_BFC094A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80040u); -#endif - /* 0xBFC094A4: 2666FF80 addiu $a2, $s3, -128 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[19] + (-128)); - PGXP_ALU(0x2666FF80u, cpu->gpr[6], _pgx1, 0xFFFFFF80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094A4u); -#endif - if (psx_delay_BFC094A0) { - psx_delay_BFC094A0 = 0; - cpu->gpr[31] = 0xBFC094A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09598u); - cpu->pc = 0xBFC09598u; return; - } -label_BFC094A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC094A8: 1440000A bne $v0, $zero, 0xBFC094D4 */ - uint32_t psx_brA_BFC094A8 = cpu->gpr[2]; uint32_t psx_brB_BFC094A8 = cpu->gpr[0]; - psx_taken_BFC094A8 = (psx_brA_BFC094A8 != psx_brB_BFC094A8); - psx_delay_BFC094A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC094AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC094ACu); -#endif - if (psx_delay_BFC094A8) { - psx_delay_BFC094A8 = 0; - if (psx_taken_BFC094A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094D4u); - goto label_BFC094D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094B0u); - } -label_BFC094B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC094B0: 00144080 sll $t0, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[8] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00144080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC094B4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC094B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC094B8: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC094BC: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094C0u); -#endif - /* 0xBFC094C0: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC094C0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094C4u); -#endif - /* 0xBFC094C4: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC094C4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC094C8: AC399F80 sw $t9, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC094C8u); return; } g_debug_last_store_pc = 0xBFC094C8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F80u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC094CC: 10000012 beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC094CC = cpu->gpr[0]; uint32_t psx_brB_BFC094CC = cpu->gpr[0]; - psx_taken_BFC094CC = (psx_brA_BFC094CC == psx_brB_BFC094CC); - psx_delay_BFC094CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC094D0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094D0u); -#endif - if (psx_delay_BFC094CC) { - psx_delay_BFC094CC = 0; - if (psx_taken_BFC094CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094D4u); - } -label_BFC094D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094D4u); -#endif - /* 0xBFC094D4: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC094D4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC094D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC094D8u); -#endif -label_BFC094DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC094DC: 1A00000C blez $s0, 0xBFC09510 */ - uint32_t psx_brA_BFC094DC = cpu->gpr[16]; - psx_taken_BFC094DC = ((int32_t)psx_brA_BFC094DC <= 0); - psx_delay_BFC094DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC094E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC094E0u); -#endif - if (psx_delay_BFC094DC) { - psx_delay_BFC094DC = 0; - if (psx_taken_BFC094DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09510u); - goto label_BFC09510; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094E4u); - } -label_BFC094E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC094E4: 06C10002 bgez $s6, 0xBFC094F0 */ - uint32_t psx_brA_BFC094E4 = cpu->gpr[22]; - psx_taken_BFC094E4 = ((int32_t)psx_brA_BFC094E4 >= 0); - psx_delay_BFC094E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400003u); -#endif - /* 0xBFC094E8: 02C00821 addu $at, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094E8u); -#endif - if (psx_delay_BFC094E4) { - psx_delay_BFC094E4 = 0; - if (psx_taken_BFC094E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094F0u); - goto label_BFC094F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC094ECu); - } -label_BFC094EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC094EC: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094ECu); -#endif -label_BFC094F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC094F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC094F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC094F0: 00014903 sra $t1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00014903u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC094F4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC094F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC094F8: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC094FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC094FC: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC094FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC09500: AC309F80 sw $s0, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09500u); return; } g_debug_last_store_pc = 0xBFC09500u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309F80u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09504u); -#endif - /* 0xBFC09504: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09504u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09508: 10000003 beq $zero, $zero, 0xBFC09518 */ - uint32_t psx_brA_BFC09508 = cpu->gpr[0]; uint32_t psx_brB_BFC09508 = cpu->gpr[0]; - psx_taken_BFC09508 = (psx_brA_BFC09508 == psx_brB_BFC09508); - psx_delay_BFC09508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0950Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0950C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0950Cu); -#endif - if (psx_delay_BFC09508) { - psx_delay_BFC09508 = 0; - if (psx_taken_BFC09508) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09518u); - goto label_BFC09518; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09510u); - } -label_BFC09510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09510u); -#endif - /* 0xBFC09510: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09510u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800005u); -#endif - /* 0xBFC09514: 02E01021 addu $v0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09514u); -#endif -label_BFC09518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09518u); -#endif - /* 0xBFC09518: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09518u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0951Cu); -#endif - /* 0xBFC0951C: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0951Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0951Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09520u); -#endif - /* 0xBFC09520: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09520u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09524u); -#endif - /* 0xBFC09524: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09524u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09528u); -#endif - /* 0xBFC09528: 8FB50024 lw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09528u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0952Cu); -#endif - /* 0xBFC0952C: 8FB60028 lw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0952Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0952Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09530u); -#endif - /* 0xBFC09530: 8FB7002C lw $s7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09530u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7002Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09534u); -#endif - /* 0xBFC09534: 8FBE0030 lw $fp, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09534u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0030u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09538: 03E00008 jr $ra */ - psx_delay_BFC09538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0953Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0953C: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0953Cu); -#endif - if (psx_delay_BFC09538) { - psx_delay_BFC09538 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09540(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09540u); - int psx_delay_BFC09570 = 0; - int psx_taken_BFC09570 = 0; - int psx_delay_BFC09578 = 0; - int psx_delay_BFC09584 = 0; - int psx_taken_BFC09584 = 0; - int psx_delay_BFC09590 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09568u: goto label_BFC09568; - case 0xBFC09578u: goto label_BFC09578; - case 0xBFC09580u: goto label_BFC09580; - case 0xBFC0958Cu: goto label_BFC0958C; - default: break; - } - } -label_BFC09540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC09540: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC09544: 01C47021 addu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[4]; - PGXP_ALU(0x01C47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09548: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0954Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0954C: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0954Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09550: 25EFB9E8 addiu $t7, $t7, -17944 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17944)); - PGXP_ALU(0x25EFB9E8u, cpu->gpr[15], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09554: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC09558: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC0955C: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09560: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC09564: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09564u); -#endif -label_BFC09568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09568u); -#endif - /* 0xBFC09568: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09568u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0956Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0956C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0956Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC09570: 14B80003 bne $a1, $t8, 0xBFC09580 */ - uint32_t psx_brA_BFC09570 = cpu->gpr[5]; uint32_t psx_brB_BFC09570 = cpu->gpr[24]; - psx_taken_BFC09570 = (psx_brA_BFC09570 != psx_brB_BFC09570); - psx_delay_BFC09570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09574: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09574u); -#endif - if (psx_delay_BFC09570) { - psx_delay_BFC09570 = 0; - if (psx_taken_BFC09570) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09580u); - goto label_BFC09580; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09578u); - } -label_BFC09578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09578: 03E00008 jr $ra */ - psx_delay_BFC09578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0957Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0957C: 24620024 addiu $v0, $v1, 36 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] + (36)); - PGXP_ALU(0x24620024u, cpu->gpr[2], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0957Cu); -#endif - if (psx_delay_BFC09578) { - psx_delay_BFC09578 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC09580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC09580: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC09584: 1464FFF8 bne $v1, $a0, 0xBFC09568 */ - uint32_t psx_brA_BFC09584 = cpu->gpr[3]; uint32_t psx_brB_BFC09584 = cpu->gpr[4]; - psx_taken_BFC09584 = (psx_brA_BFC09584 != psx_brB_BFC09584); - psx_delay_BFC09584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09588: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09588u); -#endif - if (psx_delay_BFC09584) { - psx_delay_BFC09584 = 0; - if (psx_taken_BFC09584) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09568u); - goto label_BFC09568; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0958Cu); - } -label_BFC0958C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0958Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0958C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09590: 03E00008 jr $ra */ - psx_delay_BFC09590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09594u); -#endif - if (psx_delay_BFC09590) { - psx_delay_BFC09590 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09598(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09598u); - int psx_delay_BFC095EC = 0; - int psx_taken_BFC095EC = 0; - int psx_delay_BFC09628 = 0; - int psx_taken_BFC09628 = 0; - int psx_delay_BFC09634 = 0; - int psx_taken_BFC09634 = 0; - int psx_delay_BFC0963C = 0; - int psx_taken_BFC0963C = 0; - int psx_delay_BFC09644 = 0; - int psx_taken_BFC09644 = 0; - int psx_delay_BFC09660 = 0; - int psx_delay_BFC09668 = 0; - int psx_taken_BFC09668 = 0; - int psx_delay_BFC09670 = 0; - int psx_delay_BFC09678 = 0; - int psx_taken_BFC09678 = 0; - int psx_delay_BFC09680 = 0; - int psx_taken_BFC09680 = 0; - int psx_delay_BFC096A8 = 0; - int psx_delay_BFC096B8 = 0; - int psx_delay_BFC096C0 = 0; - int psx_delay_BFC096D0 = 0; - int psx_delay_BFC096D8 = 0; - int psx_taken_BFC096D8 = 0; - int psx_delay_BFC096E0 = 0; - int psx_taken_BFC096E0 = 0; - int psx_delay_BFC096E8 = 0; - int psx_delay_BFC09718 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC095F4u: goto label_BFC095F4; - case 0xBFC095F8u: goto label_BFC095F8; - case 0xBFC09618u: goto label_BFC09618; - case 0xBFC09630u: goto label_BFC09630; - case 0xBFC0963Cu: goto label_BFC0963C; - case 0xBFC09644u: goto label_BFC09644; - case 0xBFC0964Cu: goto label_BFC0964C; - case 0xBFC09650u: goto label_BFC09650; - case 0xBFC09668u: goto label_BFC09668; - case 0xBFC09670u: goto label_BFC09670; - case 0xBFC09678u: goto label_BFC09678; - case 0xBFC09680u: goto label_BFC09680; - case 0xBFC09688u: goto label_BFC09688; - case 0xBFC0968Cu: goto label_BFC0968C; - case 0xBFC096B0u: goto label_BFC096B0; - case 0xBFC096C0u: goto label_BFC096C0; - case 0xBFC096C8u: goto label_BFC096C8; - case 0xBFC096D8u: goto label_BFC096D8; - case 0xBFC096E0u: goto label_BFC096E0; - case 0xBFC096E8u: goto label_BFC096E8; - case 0xBFC096F0u: goto label_BFC096F0; - default: break; - } - } -label_BFC09598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09598: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0959Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC0959C: AFB7003C sw $s7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0959Cu); return; } g_debug_last_store_pc = 0xBFC0959Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7003Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0959Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC095A0: AFBE0040 sw $fp, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095A0u); return; } g_debug_last_store_pc = 0xBFC095A0u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0040u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC095A4: AFB60038 sw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095A4u); return; } g_debug_last_store_pc = 0xBFC095A4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC095A8: AFB50034 sw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095A8u); return; } g_debug_last_store_pc = 0xBFC095A8u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC095AC: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095ACu); return; } g_debug_last_store_pc = 0xBFC095ACu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC095B0: 0080B821 addu $s7, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC095B4: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095B4u); return; } g_debug_last_store_pc = 0xBFC095B4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC095B8: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095B8u); return; } g_debug_last_store_pc = 0xBFC095B8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC095BC: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095BCu); return; } g_debug_last_store_pc = 0xBFC095BCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC095C0: AFBF0044 sw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095C0u); return; } g_debug_last_store_pc = 0xBFC095C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC095C4: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC095C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC095C8: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095C8u); return; } g_debug_last_store_pc = 0xBFC095C8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC095CC: 2739B9E8 addiu $t9, $t9, -17944 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-17944)); - PGXP_ALU(0x2739B9E8u, cpu->gpr[25], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC095D0: AFA50064 sw $a1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095D0u); return; } g_debug_last_store_pc = 0xBFC095D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50064u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC095D4: 00C0B021 addu $s6, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC095D8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC095DC: 24130014 addiu $s3, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24130014u, cpu->gpr[19], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC095E0: 2412FFFF addiu $s2, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2412FFFFu, cpu->gpr[18], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC095E4: 2415FFFE addiu $s5, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2415FFFEu, cpu->gpr[21], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC095E8: 241E0001 addiu $fp, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x241E0001u, cpu->gpr[30], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC095EC: 06E10002 bgez $s7, 0xBFC095F8 */ - uint32_t psx_brA_BFC095EC = cpu->gpr[23]; - psx_taken_BFC095EC = ((int32_t)psx_brA_BFC095EC >= 0); - psx_delay_BFC095EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800003u); -#endif - /* 0xBFC095F0: 02E00821 addu $at, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095F0u); -#endif - if (psx_delay_BFC095EC) { - psx_delay_BFC095EC = 0; - if (psx_taken_BFC095EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC095F8u); - goto label_BFC095F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC095F4u); - } -label_BFC095F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC095F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC095F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC095F4: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095F4u); -#endif -label_BFC095F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC095F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC095F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC095F8: 00017103 sra $t6, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017103u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC095FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC095FC: AFAE004C sw $t6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC095FCu); return; } g_debug_last_store_pc = 0xBFC095FCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE004Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC095FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09600u); -#endif - /* 0xBFC09600: 8FAF004C lw $t7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09600u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC09608: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0960Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0960C: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0960Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC09610: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC09614: 03198821 addu $s1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[17] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03198821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09614u); -#endif -label_BFC09618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC09618: 00104080 sll $t0, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0961Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20300u); -#endif - /* 0xBFC0961C: 02284821 addu $t1, $s1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[17] + cpu->gpr[8]; - PGXP_ALU(0x02284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0961Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09620u); -#endif - /* 0xBFC09620: 8D2A0000 lw $t2, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09620u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } - PGXP_LOAD(0x8D2A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC09628: 124A0004 beq $s2, $t2, 0xBFC0963C */ - uint32_t psx_brA_BFC09628 = cpu->gpr[18]; uint32_t psx_brB_BFC09628 = cpu->gpr[10]; - psx_taken_BFC09628 = (psx_brA_BFC09628 == psx_brB_BFC09628); - psx_delay_BFC09628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0962Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0962C: 2A010014 slti $at, $s0, 20 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0); - PGXP_ALU(0x2A010014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0962Cu); -#endif - if (psx_delay_BFC09628) { - psx_delay_BFC09628 = 0; - if (psx_taken_BFC09628) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0963Cu); - goto label_BFC0963C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09630u); - } -label_BFC09630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC09630: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC09634: 1613FFF8 bne $s0, $s3, 0xBFC09618 */ - uint32_t psx_brA_BFC09634 = cpu->gpr[16]; uint32_t psx_brB_BFC09634 = cpu->gpr[19]; - psx_taken_BFC09634 = (psx_brA_BFC09634 != psx_brB_BFC09634); - psx_delay_BFC09634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC09638: 2A010014 slti $at, $s0, 20 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (20) ? 1 : 0); - PGXP_ALU(0x2A010014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09638u); -#endif - if (psx_delay_BFC09634) { - psx_delay_BFC09634 = 0; - if (psx_taken_BFC09634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09618u); - goto label_BFC09618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0963Cu); - } -label_BFC0963C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0963Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0963C: 14200004 bne $at, $zero, 0xBFC09650 */ - uint32_t psx_brA_BFC0963C = cpu->gpr[1]; uint32_t psx_brB_BFC0963C = cpu->gpr[0]; - psx_taken_BFC0963C = (psx_brA_BFC0963C != psx_brB_BFC0963C); - psx_delay_BFC0963C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC09640: 00105880 sll $t3, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09640u); -#endif - if (psx_delay_BFC0963C) { - psx_delay_BFC0963C = 0; - if (psx_taken_BFC0963C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09650u); - goto label_BFC09650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09644u); - } -label_BFC09644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09644: 1000002A beq $zero, $zero, 0xBFC096F0 */ - uint32_t psx_brA_BFC09644 = cpu->gpr[0]; uint32_t psx_brB_BFC09644 = cpu->gpr[0]; - psx_taken_BFC09644 = (psx_brA_BFC09644 == psx_brB_BFC09644); - psx_delay_BFC09644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09648: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09648u); -#endif - if (psx_delay_BFC09644) { - psx_delay_BFC09644 = 0; - if (psx_taken_BFC09644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC096F0u); - goto label_BFC096F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0964Cu); - } -label_BFC0964C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0964Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC0964C: 00105880 sll $t3, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0964Cu); -#endif -label_BFC09650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120800u); -#endif - /* 0xBFC09650: 022BA021 addu $s4, $s1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[20] = cpu->gpr[17] + cpu->gpr[11]; - PGXP_ALU(0x022BA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300000u); -#endif - /* 0xBFC09654: AE950000 sw $s5, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09654u); return; } g_debug_last_store_pc = 0xBFC09654u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAE950000u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09658: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0965Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC0965C: 26050024 addiu $a1, $s0, 36 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (36)); - PGXP_ALU(0x26050024u, cpu->gpr[5], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0965Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09660: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC09668u; /* jal link before delay slot */ - psx_delay_BFC09660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC09664: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09664u); -#endif - if (psx_delay_BFC09660) { - psx_delay_BFC09660 = 0; - cpu->gpr[31] = 0xBFC09668u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC09668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC09668: 145E0005 bne $v0, $fp, 0xBFC09680 */ - uint32_t psx_brA_BFC09668 = cpu->gpr[2]; uint32_t psx_brB_BFC09668 = cpu->gpr[30]; - psx_taken_BFC09668 = (psx_brA_BFC09668 != psx_brB_BFC09668); - psx_delay_BFC09668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0966Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0966C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0966Cu); -#endif - if (psx_delay_BFC09668) { - psx_delay_BFC09668 = 0; - if (psx_taken_BFC09668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09680u); - goto label_BFC09680; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09670u); - } -label_BFC09670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09670: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC09678u; /* jal link before delay slot */ - psx_delay_BFC09670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09674u); -#endif - if (psx_delay_BFC09670) { - psx_delay_BFC09670 = 0; - cpu->gpr[31] = 0xBFC09678u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC09678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09678: 14400004 bne $v0, $zero, 0xBFC0968C */ - uint32_t psx_brA_BFC09678 = cpu->gpr[2]; uint32_t psx_brB_BFC09678 = cpu->gpr[0]; - psx_taken_BFC09678 = (psx_brA_BFC09678 != psx_brB_BFC09678); - psx_delay_BFC09678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0967Cu); -#endif - /* 0xBFC0967C: 8FAC0064 lw $t4, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0967Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0064u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0967Cu); -#endif - if (psx_delay_BFC09678) { - psx_delay_BFC09678 = 0; - if (psx_taken_BFC09678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0968Cu); - goto label_BFC0968C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09680u); - } -label_BFC09680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09680: 1000FFE5 beq $zero, $zero, 0xBFC09618 */ - uint32_t psx_brA_BFC09680 = cpu->gpr[0]; uint32_t psx_brB_BFC09680 = cpu->gpr[0]; - psx_taken_BFC09680 = (psx_brA_BFC09680 == psx_brB_BFC09680); - psx_delay_BFC09680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC09684: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09684u); -#endif - if (psx_delay_BFC09680) { - psx_delay_BFC09680 = 0; - if (psx_taken_BFC09680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09618u); - goto label_BFC09618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09688u); - } -label_BFC09688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09688u); -#endif - /* 0xBFC09688: 8FAC0064 lw $t4, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09688u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0064u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09688u); -#endif -label_BFC0968C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0968Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0968C: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC09690: AE8C0000 sw $t4, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09690u); return; } g_debug_last_store_pc = 0xBFC09690u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE8C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09694u); -#endif - /* 0xBFC09694: 8FAD004C lw $t5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09694u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD004Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09698: 25EFBE48 addiu $t7, $t7, -16824 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16824)); - PGXP_ALU(0x25EFBE48u, cpu->gpr[15], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0969Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0969C: 000D71C0 sll $t6, $t5, 7 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 7u; - PGXP_ALU(0x000D71C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0969Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C000u); -#endif - /* 0xBFC096A0: 01CF8821 addu $s1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC096A4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC096A8: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC096B0u; /* jal link before delay slot */ - psx_delay_BFC096A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC096AC: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096ACu); -#endif - if (psx_delay_BFC096A8) { - psx_delay_BFC096A8 = 0; - cpu->gpr[31] = 0xBFC096B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC096B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC096B0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC096B4: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC096B8: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC096C0u; /* jal link before delay slot */ - psx_delay_BFC096B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC096BC: 24060004 addiu $a2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24060004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096BCu); -#endif - if (psx_delay_BFC096B8) { - psx_delay_BFC096B8 = 0; - cpu->gpr[31] = 0xBFC096C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC096C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC096C0: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC096C8u; /* jal link before delay slot */ - psx_delay_BFC096C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC096C4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096C4u); -#endif - if (psx_delay_BFC096C0) { - psx_delay_BFC096C0 = 0; - cpu->gpr[31] = 0xBFC096C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC096C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC096C8: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC096CC: 26050010 addiu $a1, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (16)); - PGXP_ALU(0x26050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC096D0: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC096D8u; /* jal link before delay slot */ - psx_delay_BFC096D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC096D4: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096D4u); -#endif - if (psx_delay_BFC096D0) { - psx_delay_BFC096D0 = 0; - cpu->gpr[31] = 0xBFC096D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC096D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC096D8: 105E0003 beq $v0, $fp, 0xBFC096E8 */ - uint32_t psx_brA_BFC096D8 = cpu->gpr[2]; uint32_t psx_brB_BFC096D8 = cpu->gpr[30]; - psx_taken_BFC096D8 = (psx_brA_BFC096D8 == psx_brB_BFC096D8); - psx_delay_BFC096D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC096DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC096DCu); -#endif - if (psx_delay_BFC096D8) { - psx_delay_BFC096D8 = 0; - if (psx_taken_BFC096D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC096E8u); - goto label_BFC096E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC096E0u); - } -label_BFC096E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC096E0: 10000003 beq $zero, $zero, 0xBFC096F0 */ - uint32_t psx_brA_BFC096E0 = cpu->gpr[0]; uint32_t psx_brB_BFC096E0 = cpu->gpr[0]; - psx_taken_BFC096E0 = (psx_brA_BFC096E0 == psx_brB_BFC096E0); - psx_delay_BFC096E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC096E4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096E4u); -#endif - if (psx_delay_BFC096E0) { - psx_delay_BFC096E0 = 0; - if (psx_taken_BFC096E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC096F0u); - goto label_BFC096F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC096E8u); - } -label_BFC096E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC096E8: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC096F0u; /* jal link before delay slot */ - psx_delay_BFC096E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC096EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC096ECu); -#endif - if (psx_delay_BFC096E8) { - psx_delay_BFC096E8 = 0; - cpu->gpr[31] = 0xBFC096F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC096F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC096F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC096F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096F0u); -#endif - /* 0xBFC096F0: 8FBF0044 lw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC096F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096F4u); -#endif - /* 0xBFC096F4: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC096F4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096F8u); -#endif - /* 0xBFC096F8: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC096F8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC096FCu); -#endif - /* 0xBFC096FC: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC096FCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC096FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09700u); -#endif - /* 0xBFC09700: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09700u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09704u); -#endif - /* 0xBFC09704: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09704u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09708u); -#endif - /* 0xBFC09708: 8FB50034 lw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09708u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0970Cu); -#endif - /* 0xBFC0970C: 8FB60038 lw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0970Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0970Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09710u); -#endif - /* 0xBFC09710: 8FB7003C lw $s7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09710u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7003Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09714u); -#endif - /* 0xBFC09714: 8FBE0040 lw $fp, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09714u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0040u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09718: 03E00008 jr $ra */ - psx_delay_BFC09718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0971Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0971C: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0971Cu); -#endif - if (psx_delay_BFC09718) { - psx_delay_BFC09718 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09720(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09720u); - int psx_delay_BFC09774 = 0; - int psx_taken_BFC09774 = 0; - int psx_delay_BFC09788 = 0; - int psx_delay_BFC09790 = 0; - int psx_taken_BFC09790 = 0; - int psx_delay_BFC09798 = 0; - int psx_taken_BFC09798 = 0; - int psx_delay_BFC097A0 = 0; - int psx_taken_BFC097A0 = 0; - int psx_delay_BFC097D4 = 0; - int psx_delay_BFC097DC = 0; - int psx_delay_BFC097F0 = 0; - int psx_delay_BFC097FC = 0; - int psx_taken_BFC097FC = 0; - int psx_delay_BFC09804 = 0; - int psx_delay_BFC0980C = 0; - int psx_taken_BFC0980C = 0; - int psx_delay_BFC09818 = 0; - int psx_delay_BFC09824 = 0; - int psx_taken_BFC09824 = 0; - int psx_delay_BFC0982C = 0; - int psx_delay_BFC09838 = 0; - int psx_taken_BFC09838 = 0; - int psx_delay_BFC09840 = 0; - int psx_delay_BFC09848 = 0; - int psx_taken_BFC09848 = 0; - int psx_delay_BFC09854 = 0; - int psx_delay_BFC09888 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09774u: goto label_BFC09774; - case 0xBFC0977Cu: goto label_BFC0977C; - case 0xBFC09790u: goto label_BFC09790; - case 0xBFC09798u: goto label_BFC09798; - case 0xBFC097A0u: goto label_BFC097A0; - case 0xBFC097A8u: goto label_BFC097A8; - case 0xBFC097ACu: goto label_BFC097AC; - case 0xBFC097DCu: goto label_BFC097DC; - case 0xBFC097E4u: goto label_BFC097E4; - case 0xBFC097F8u: goto label_BFC097F8; - case 0xBFC09804u: goto label_BFC09804; - case 0xBFC0980Cu: goto label_BFC0980C; - case 0xBFC09814u: goto label_BFC09814; - case 0xBFC09820u: goto label_BFC09820; - case 0xBFC09824u: goto label_BFC09824; - case 0xBFC0982Cu: goto label_BFC0982C; - case 0xBFC09834u: goto label_BFC09834; - case 0xBFC09840u: goto label_BFC09840; - case 0xBFC09848u: goto label_BFC09848; - case 0xBFC09850u: goto label_BFC09850; - case 0xBFC0985Cu: goto label_BFC0985C; - case 0xBFC09860u: goto label_BFC09860; - default: break; - } - } -label_BFC09720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09720: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC09724: AFB60030 sw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09724u); return; } g_debug_last_store_pc = 0xBFC09724u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC09728: AFB70034 sw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09728u); return; } g_debug_last_store_pc = 0xBFC09728u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC0972C: AFBE0038 sw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0972Cu); return; } g_debug_last_store_pc = 0xBFC0972Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC09730: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09730u); return; } g_debug_last_store_pc = 0xBFC09730u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC09734: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09734u); return; } g_debug_last_store_pc = 0xBFC09734u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC09738: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09738u); return; } g_debug_last_store_pc = 0xBFC09738u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0973Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0973C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0973Cu); return; } g_debug_last_store_pc = 0xBFC0973Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0973Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09740: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09740u); return; } g_debug_last_store_pc = 0xBFC09740u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC09744: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09744u); return; } g_debug_last_store_pc = 0xBFC09744u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC09748: 3C17A001 lui $s7, 0xA001 */ - cpu->gpr[23] = 0xA0010000u; - PGXP_ALU(0x3C17A001u, cpu->gpr[23], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0974Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC0974C: 3C16A001 lui $s6, 0xA001 */ - cpu->gpr[22] = 0xA0010000u; - PGXP_ALU(0x3C16A001u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0974Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09750: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09750u); return; } g_debug_last_store_pc = 0xBFC09750u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC09754: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC09758: 0080A021 addu $s4, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000081u); -#endif - /* 0xBFC0975C: 00E0F021 addu $fp, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC09760: AFA50044 sw $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09760u); return; } g_debug_last_store_pc = 0xBFC09760u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC09764: 26D6BE48 addiu $s6, $s6, -16824 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-16824)); - PGXP_ALU(0x26D6BE48u, cpu->gpr[22], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC09768: 26F7BA88 addiu $s7, $s7, -17784 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (-17784)); - PGXP_ALU(0x26F7BA88u, cpu->gpr[23], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0976Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0976C: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0976Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC09770: 2415000F addiu $s5, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2415000Fu, cpu->gpr[21], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09770u); -#endif -label_BFC09774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC09774: 1260000A beq $s3, $zero, 0xBFC097A0 */ - uint32_t psx_brA_BFC09774 = cpu->gpr[19]; uint32_t psx_brB_BFC09774 = cpu->gpr[0]; - psx_taken_BFC09774 = (psx_brA_BFC09774 == psx_brB_BFC09774); - psx_delay_BFC09774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09778u); -#endif - if (psx_delay_BFC09774) { - psx_delay_BFC09774 = 0; - if (psx_taken_BFC09774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC097A0u); - goto label_BFC097A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0977Cu); - } -label_BFC0977C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0977Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0977Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0977Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0977C: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0977Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000C000u); -#endif - /* 0xBFC09780: 03CE7821 addu $t7, $fp, $t6 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[30] + cpu->gpr[14]; - PGXP_ALU(0x03CE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09784u); -#endif - /* 0xBFC09784: 8DE40000 lw $a0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09784u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000u); } - PGXP_LOAD(0x8DE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80080000u); -#endif - /* 0xBFC09788: 0260F809 jalr $ra, $s3 */ - cpu->gpr[31] = 0xBFC09790u; /* jalr link before delay slot */ - psx_delay_BFC09788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0978Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0978C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0978Cu); -#endif - if (psx_delay_BFC09788) { - psx_delay_BFC09788 = 0; - { uint32_t _t = cpu->gpr[19]; - cpu->gpr[31] = 0xBFC09790u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC09790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09790: 10400003 beq $v0, $zero, 0xBFC097A0 */ - uint32_t psx_brA_BFC09790 = cpu->gpr[2]; uint32_t psx_brB_BFC09790 = cpu->gpr[0]; - psx_taken_BFC09790 = (psx_brA_BFC09790 == psx_brB_BFC09790); - psx_delay_BFC09790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09794u); -#endif - if (psx_delay_BFC09790) { - psx_delay_BFC09790 = 0; - if (psx_taken_BFC09790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC097A0u); - goto label_BFC097A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09798u); - } -label_BFC09798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09798: 10000021 beq $zero, $zero, 0xBFC09820 */ - uint32_t psx_brA_BFC09798 = cpu->gpr[0]; uint32_t psx_brB_BFC09798 = cpu->gpr[0]; - psx_taken_BFC09798 = (psx_brA_BFC09798 == psx_brB_BFC09798); - psx_delay_BFC09798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC0979C: 26320001 addiu $s2, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26320001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0979Cu); -#endif - if (psx_delay_BFC09798) { - psx_delay_BFC09798 = 0; - if (psx_taken_BFC09798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09820u); - goto label_BFC09820; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC097A0u); - } -label_BFC097A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC097A0: 06810002 bgez $s4, 0xBFC097AC */ - uint32_t psx_brA_BFC097A0 = cpu->gpr[20]; - psx_taken_BFC097A0 = ((int32_t)psx_brA_BFC097A0 >= 0); - psx_delay_BFC097A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100003u); -#endif - /* 0xBFC097A4: 02800821 addu $at, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097A4u); -#endif - if (psx_delay_BFC097A0) { - psx_delay_BFC097A0 = 0; - if (psx_taken_BFC097A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC097ACu); - goto label_BFC097AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC097A8u); - } -label_BFC097A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC097A8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097A8u); -#endif -label_BFC097AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC097AC: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC097B0: 0002C900 sll $t9, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 4u; - PGXP_ALU(0x0002C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC097B4: 0322C823 subu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[2]; - PGXP_ALU(0x0322C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC097B8: 0019C940 sll $t9, $t9, 5 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 5u; - PGXP_ALU(0x0019C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC097BC: 0002C1C0 sll $t8, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 7u; - PGXP_ALU(0x0002C1C0u, cpu->gpr[24], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1410000u); -#endif - /* 0xBFC097C0: 02D88021 addu $s0, $s6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[22] + cpu->gpr[24]; - PGXP_ALU(0x02D88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800100u); -#endif - /* 0xBFC097C4: 02F94021 addu $t0, $s7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[23] + cpu->gpr[25]; - PGXP_ALU(0x02F94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC097C8: 00114940 sll $t1, $s1, 5 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[17] << 5u; - PGXP_ALU(0x00114940u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x320u); -#endif - /* 0xBFC097CC: 01092821 addu $a1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC097D0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC097D4: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC097DCu; /* jal link before delay slot */ - psx_delay_BFC097D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC097D8: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097D8u); -#endif - if (psx_delay_BFC097D4) { - psx_delay_BFC097D4 = 0; - cpu->gpr[31] = 0xBFC097DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC097DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC097DC: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC097E4u; /* jal link before delay slot */ - psx_delay_BFC097DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC097E0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097E0u); -#endif - if (psx_delay_BFC097DC) { - psx_delay_BFC097DC = 0; - cpu->gpr[31] = 0xBFC097E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC097E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC097E4: 26320001 addiu $s2, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26320001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC097E8: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC097EC: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC097F0: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC097F8u; /* jal link before delay slot */ - psx_delay_BFC097F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC097F4: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097F4u); -#endif - if (psx_delay_BFC097F0) { - psx_delay_BFC097F0 = 0; - cpu->gpr[31] = 0xBFC097F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC097F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC097F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC097F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC097F8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC097F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC097FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC097FC: 14410005 bne $v0, $at, 0xBFC09814 */ - uint32_t psx_brA_BFC097FC = cpu->gpr[2]; uint32_t psx_brB_BFC097FC = cpu->gpr[1]; - psx_taken_BFC097FC = (psx_brA_BFC097FC != psx_brB_BFC097FC); - psx_delay_BFC097FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09800u); -#endif - if (psx_delay_BFC097FC) { - psx_delay_BFC097FC = 0; - if (psx_taken_BFC097FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09814u); - goto label_BFC09814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09804u); - } -label_BFC09804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09804: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC0980Cu; /* jal link before delay slot */ - psx_delay_BFC09804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09808u); -#endif - if (psx_delay_BFC09804) { - psx_delay_BFC09804 = 0; - cpu->gpr[31] = 0xBFC0980Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC0980C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0980Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0980Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0980Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0980C: 14400005 bne $v0, $zero, 0xBFC09824 */ - uint32_t psx_brA_BFC0980C = cpu->gpr[2]; uint32_t psx_brB_BFC0980C = cpu->gpr[0]; - psx_taken_BFC0980C = (psx_brA_BFC0980C != psx_brB_BFC0980C); - psx_delay_BFC0980C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60001u); -#endif - /* 0xBFC09810: 02408821 addu $s1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09810u); -#endif - if (psx_delay_BFC0980C) { - psx_delay_BFC0980C = 0; - if (psx_taken_BFC0980C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09824u); - goto label_BFC09824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09814u); - } -label_BFC09814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09814u); -#endif - /* 0xBFC09814: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09814u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09818: 0FF0089F jal 0xBFC0227C */ - cpu->gpr[31] = 0xBFC09820u; /* jal link before delay slot */ - psx_delay_BFC09818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0981Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0981C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0981Cu); -#endif - if (psx_delay_BFC09818) { - psx_delay_BFC09818 = 0; - cpu->gpr[31] = 0xBFC09820u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0227Cu); - cpu->pc = 0xBFC0227Cu; return; - } -label_BFC09820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60001u); -#endif - /* 0xBFC09820: 02408821 addu $s1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09820u); -#endif -label_BFC09824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC09824: 1635FFD3 bne $s1, $s5, 0xBFC09774 */ - uint32_t psx_brA_BFC09824 = cpu->gpr[17]; uint32_t psx_brB_BFC09824 = cpu->gpr[21]; - psx_taken_BFC09824 = (psx_brA_BFC09824 != psx_brB_BFC09824); - psx_delay_BFC09824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09828u); -#endif - if (psx_delay_BFC09824) { - psx_delay_BFC09824 = 0; - if (psx_taken_BFC09824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09774u); - goto label_BFC09774; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0982Cu); - } -label_BFC0982C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0982Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0982Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0982Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0982C: 0FF03037 jal 0xBFC0C0DC */ - cpu->gpr[31] = 0xBFC09834u; /* jal link before delay slot */ - psx_delay_BFC0982C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC09830: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09830u); -#endif - if (psx_delay_BFC0982C) { - psx_delay_BFC0982C = 0; - cpu->gpr[31] = 0xBFC09834u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0DCu); - cpu->pc = 0xBFC0C0DCu; return; - } -label_BFC09834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09834: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09838: 14410005 bne $v0, $at, 0xBFC09850 */ - uint32_t psx_brA_BFC09838 = cpu->gpr[2]; uint32_t psx_brB_BFC09838 = cpu->gpr[1]; - psx_taken_BFC09838 = (psx_brA_BFC09838 != psx_brB_BFC09838); - psx_delay_BFC09838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0983Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0983C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0983Cu); -#endif - if (psx_delay_BFC09838) { - psx_delay_BFC09838 = 0; - if (psx_taken_BFC09838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09850u); - goto label_BFC09850; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09840u); - } -label_BFC09840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09840: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC09848u; /* jal link before delay slot */ - psx_delay_BFC09840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09844u); -#endif - if (psx_delay_BFC09840) { - psx_delay_BFC09840 = 0; - cpu->gpr[31] = 0xBFC09848u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC09848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09848: 14400005 bne $v0, $zero, 0xBFC09860 */ - uint32_t psx_brA_BFC09848 = cpu->gpr[2]; uint32_t psx_brB_BFC09848 = cpu->gpr[0]; - psx_taken_BFC09848 = (psx_brA_BFC09848 != psx_brB_BFC09848); - psx_delay_BFC09848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0984Cu); -#endif - /* 0xBFC0984C: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0984Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0984Cu); -#endif - if (psx_delay_BFC09848) { - psx_delay_BFC09848 = 0; - if (psx_taken_BFC09848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09860u); - goto label_BFC09860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09850u); - } -label_BFC09850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09850u); -#endif - /* 0xBFC09850: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09850u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09854: 0FF0089F jal 0xBFC0227C */ - cpu->gpr[31] = 0xBFC0985Cu; /* jal link before delay slot */ - psx_delay_BFC09854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC09858: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09858u); -#endif - if (psx_delay_BFC09854) { - psx_delay_BFC09854 = 0; - cpu->gpr[31] = 0xBFC0985Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0227Cu); - cpu->pc = 0xBFC0227Cu; return; - } -label_BFC0985C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0985Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0985Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0985Cu); -#endif - /* 0xBFC0985C: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0985Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0985Cu); -#endif -label_BFC09860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09860u); -#endif - /* 0xBFC09860: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09860u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09864u); -#endif - /* 0xBFC09864: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09864u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09868u); -#endif - /* 0xBFC09868: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09868u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0986Cu); -#endif - /* 0xBFC0986C: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0986Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0986Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09870u); -#endif - /* 0xBFC09870: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09870u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09874u); -#endif - /* 0xBFC09874: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09874u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09878u); -#endif - /* 0xBFC09878: 8FB60030 lw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09878u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0987Cu); -#endif - /* 0xBFC0987C: 8FB70034 lw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0987Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0987Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09880u); -#endif - /* 0xBFC09880: 8FBE0038 lw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09880u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09884: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09888: 03E00008 jr $ra */ - psx_delay_BFC09888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0988Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0988C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0988Cu); -#endif - if (psx_delay_BFC09888) { - psx_delay_BFC09888 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09890(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09890u); - int psx_delay_BFC09894 = 0; -label_BFC09890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC09890: 38820052 xori $v0, $a0, 0x52 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x52u; - PGXP_ALU(0x38820052u, cpu->gpr[2], _pgx1, 0x0052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09894: 03E00008 jr $ra */ - psx_delay_BFC09894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09898: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09898u); -#endif - if (psx_delay_BFC09894) { - psx_delay_BFC09894 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0989C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0989Cu); - int psx_delay_BFC098A0 = 0; -label_BFC0989C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0989Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0989C: 38820051 xori $v0, $a0, 0x51 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] ^ 0x51u; - PGXP_ALU(0x38820051u, cpu->gpr[2], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC098A0: 03E00008 jr $ra */ - psx_delay_BFC098A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC098A4: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098A4u); -#endif - if (psx_delay_BFC098A0) { - psx_delay_BFC098A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC098A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC098A8u); - int psx_delay_BFC098B8 = 0; - int psx_delay_BFC098C0 = 0; - int psx_taken_BFC098C0 = 0; - int psx_delay_BFC098D8 = 0; - int psx_delay_BFC098F0 = 0; - int psx_delay_BFC098F8 = 0; - int psx_taken_BFC098F8 = 0; - int psx_delay_BFC0990C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC098C0u: goto label_BFC098C0; - case 0xBFC098C8u: goto label_BFC098C8; - case 0xBFC098E0u: goto label_BFC098E0; - case 0xBFC098F8u: goto label_BFC098F8; - case 0xBFC09900u: goto label_BFC09900; - case 0xBFC09904u: goto label_BFC09904; - default: break; - } - } -label_BFC098A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC098A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC098A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC098A8: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC098AC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098ACu); return; } g_debug_last_store_pc = 0xBFC098ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC098B0: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098B0u); return; } g_debug_last_store_pc = 0xBFC098B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC098B4: AFA5005C sw $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098B4u); return; } g_debug_last_store_pc = 0xBFC098B4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC098B8: 0FF00890 jal 0xBFC02240 */ - cpu->gpr[31] = 0xBFC098C0u; /* jal link before delay slot */ - psx_delay_BFC098B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC098BC: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098BCu); -#endif - if (psx_delay_BFC098B8) { - psx_delay_BFC098B8 = 0; - cpu->gpr[31] = 0xBFC098C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02240u); - cpu->pc = 0xBFC02240u; return; - } -label_BFC098C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC098C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC098C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC098C0: 14400010 bne $v0, $zero, 0xBFC09904 */ - uint32_t psx_brA_BFC098C0 = cpu->gpr[2]; uint32_t psx_brB_BFC098C0 = cpu->gpr[0]; - psx_taken_BFC098C0 = (psx_brA_BFC098C0 != psx_brB_BFC098C0); - psx_delay_BFC098C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC098C4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098C4u); -#endif - if (psx_delay_BFC098C0) { - psx_delay_BFC098C0 = 0; - if (psx_taken_BFC098C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09904u); - goto label_BFC09904; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC098C8u); - } -label_BFC098C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC098C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC098C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098C8u); -#endif - /* 0xBFC098C8: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC098CC: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC098CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098D0u); -#endif - /* 0xBFC098D0: 8FA7005C lw $a3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098D0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7005Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC098D4: 24C69890 addiu $a2, $a2, -26480 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-26480)); - PGXP_ALU(0x24C69890u, cpu->gpr[6], _pgx1, 0xFFFF9890u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC098D8: 0FF025C8 jal 0xBFC09720 */ - cpu->gpr[31] = 0xBFC098E0u; /* jal link before delay slot */ - psx_delay_BFC098D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC098DC: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098DCu); -#endif - if (psx_delay_BFC098D8) { - psx_delay_BFC098D8 = 0; - cpu->gpr[31] = 0xBFC098E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09720u); - cpu->pc = 0xBFC09720u; return; - } -label_BFC098E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC098E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC098E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098E0u); -#endif - /* 0xBFC098E0: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC098E4: 3C06BFC1 lui $a2, 0xBFC1 */ - cpu->gpr[6] = 0xBFC10000u; - PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC098E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098E8u); -#endif - /* 0xBFC098E8: 8FA7005C lw $a3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC098E8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7005Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC098EC: 24C6989C addiu $a2, $a2, -26468 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-26468)); - PGXP_ALU(0x24C6989Cu, cpu->gpr[6], _pgx1, 0xFFFF989Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC098F0: 0FF025C8 jal 0xBFC09720 */ - cpu->gpr[31] = 0xBFC098F8u; /* jal link before delay slot */ - psx_delay_BFC098F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC098F4: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098F4u); -#endif - if (psx_delay_BFC098F0) { - psx_delay_BFC098F0 = 0; - cpu->gpr[31] = 0xBFC098F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09720u); - cpu->pc = 0xBFC09720u; return; - } -label_BFC098F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC098F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC098F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC098F8: 10000002 beq $zero, $zero, 0xBFC09904 */ - uint32_t psx_brA_BFC098F8 = cpu->gpr[0]; uint32_t psx_brB_BFC098F8 = cpu->gpr[0]; - psx_taken_BFC098F8 = (psx_brA_BFC098F8 == psx_brB_BFC098F8); - psx_delay_BFC098F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC098FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC098FC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC098FCu); -#endif - if (psx_delay_BFC098F8) { - psx_delay_BFC098F8 = 0; - if (psx_taken_BFC098F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09904u); - goto label_BFC09904; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09900u); - } -label_BFC09900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09900: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09900u); -#endif -label_BFC09904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09904u); -#endif - /* 0xBFC09904: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09904u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09908: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0990Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0990C: 03E00008 jr $ra */ - psx_delay_BFC0990C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09910: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09910u); -#endif - if (psx_delay_BFC0990C) { - psx_delay_BFC0990C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09914(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09914u); - int psx_delay_BFC09924 = 0; - int psx_delay_BFC0992C = 0; - int psx_delay_BFC09934 = 0; - int psx_delay_BFC09944 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0992Cu: goto label_BFC0992C; - case 0xBFC09934u: goto label_BFC09934; - case 0xBFC0993Cu: goto label_BFC0993C; - default: break; - } - } -label_BFC09914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09914: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09918: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09918u); return; } g_debug_last_store_pc = 0xBFC09918u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0991Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0991C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0991Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09920: AC209F24 sw $zero, -24796($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24796; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09920u); return; } g_debug_last_store_pc = 0xBFC09920u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09924: 0FF02228 jal 0xBFC088A0 */ - cpu->gpr[31] = 0xBFC0992Cu; /* jal link before delay slot */ - psx_delay_BFC09924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09928: AC209F20 sw $zero, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09928u); return; } g_debug_last_store_pc = 0xBFC09928u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F20u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09928u); -#endif - if (psx_delay_BFC09924) { - psx_delay_BFC09924 = 0; - cpu->gpr[31] = 0xBFC0992Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC088A0u); - cpu->pc = 0xBFC088A0u; return; - } -label_BFC0992C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0992Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0992Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0992Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0992C: 0FF022CF jal 0xBFC08B3C */ - cpu->gpr[31] = 0xBFC09934u; /* jal link before delay slot */ - psx_delay_BFC0992C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09930: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09930u); -#endif - if (psx_delay_BFC0992C) { - psx_delay_BFC0992C = 0; - cpu->gpr[31] = 0xBFC09934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B3Cu); - cpu->pc = 0xBFC08B3Cu; return; - } -label_BFC09934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09934: 0FF022CF jal 0xBFC08B3C */ - cpu->gpr[31] = 0xBFC0993Cu; /* jal link before delay slot */ - psx_delay_BFC09934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09938: 24040010 addiu $a0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24040010u, cpu->gpr[4], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09938u); -#endif - if (psx_delay_BFC09934) { - psx_delay_BFC09934 = 0; - cpu->gpr[31] = 0xBFC0993Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08B3Cu); - cpu->pc = 0xBFC08B3Cu; return; - } -label_BFC0993C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0993Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0993Cu); -#endif - /* 0xBFC0993C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0993Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09940: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09944: 03E00008 jr $ra */ - psx_delay_BFC09944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09948: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09948u); -#endif - if (psx_delay_BFC09944) { - psx_delay_BFC09944 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0994C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0994Cu); - int psx_delay_BFC09954 = 0; - int psx_delay_BFC09964 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0995Cu: goto label_BFC0995C; - default: break; - } - } -label_BFC0994C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0994Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0994C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09950: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09950u); return; } g_debug_last_store_pc = 0xBFC09950u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09954: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0995Cu; /* jal link before delay slot */ - psx_delay_BFC09954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09958: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09958u); -#endif - if (psx_delay_BFC09954) { - psx_delay_BFC09954 = 0; - cpu->gpr[31] = 0xBFC0995Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0995C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0995Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0995Cu); -#endif - /* 0xBFC0995C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0995Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09960: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09964: 03E00008 jr $ra */ - psx_delay_BFC09964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09968: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09968u); -#endif - if (psx_delay_BFC09964) { - psx_delay_BFC09964 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0996C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0996Cu); - int psx_delay_BFC099A0 = 0; - int psx_taken_BFC099A0 = 0; - int psx_delay_BFC099C0 = 0; - int psx_taken_BFC099C0 = 0; - int psx_delay_BFC099C8 = 0; - int psx_taken_BFC099C8 = 0; - int psx_delay_BFC099D0 = 0; - int psx_delay_BFC099E0 = 0; - int psx_taken_BFC099E0 = 0; - int psx_delay_BFC099EC = 0; - int psx_delay_BFC099F4 = 0; - int psx_taken_BFC099F4 = 0; - int psx_delay_BFC099FC = 0; - int psx_taken_BFC099FC = 0; - int psx_delay_BFC09A0C = 0; - int psx_taken_BFC09A0C = 0; - int psx_delay_BFC09A14 = 0; - int psx_delay_BFC09A24 = 0; - int psx_delay_BFC09A30 = 0; - int psx_taken_BFC09A30 = 0; - int psx_delay_BFC09A40 = 0; - int psx_taken_BFC09A40 = 0; - int psx_delay_BFC09A8C = 0; - int psx_taken_BFC09A8C = 0; - int psx_delay_BFC09A9C = 0; - int psx_taken_BFC09A9C = 0; - int psx_delay_BFC09AB8 = 0; - int psx_taken_BFC09AB8 = 0; - int psx_delay_BFC09ACC = 0; - int psx_taken_BFC09ACC = 0; - int psx_delay_BFC09AFC = 0; - int psx_taken_BFC09AFC = 0; - int psx_delay_BFC09B0C = 0; - int psx_taken_BFC09B0C = 0; - int psx_delay_BFC09B44 = 0; - int psx_delay_BFC09B68 = 0; - int psx_taken_BFC09B68 = 0; - int psx_delay_BFC09B88 = 0; - int psx_taken_BFC09B88 = 0; - int psx_delay_BFC09BA0 = 0; - int psx_taken_BFC09BA0 = 0; - int psx_delay_BFC09BB0 = 0; - int psx_taken_BFC09BB0 = 0; - int psx_delay_BFC09BCC = 0; - int psx_delay_BFC09BDC = 0; - int psx_taken_BFC09BDC = 0; - int psx_delay_BFC09BF8 = 0; - int psx_taken_BFC09BF8 = 0; - int psx_delay_BFC09C10 = 0; - int psx_taken_BFC09C10 = 0; - int psx_delay_BFC09C20 = 0; - int psx_taken_BFC09C20 = 0; - int psx_delay_BFC09C38 = 0; - int psx_taken_BFC09C38 = 0; - int psx_delay_BFC09C50 = 0; - int psx_taken_BFC09C50 = 0; - int psx_delay_BFC09C58 = 0; - int psx_delay_BFC09C68 = 0; - int psx_delay_BFC09C74 = 0; - int psx_taken_BFC09C74 = 0; - int psx_delay_BFC09C84 = 0; - int psx_taken_BFC09C84 = 0; - int psx_delay_BFC09CD4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC099A8u: goto label_BFC099A8; - case 0xBFC099ACu: goto label_BFC099AC; - case 0xBFC099C8u: goto label_BFC099C8; - case 0xBFC099D0u: goto label_BFC099D0; - case 0xBFC099D8u: goto label_BFC099D8; - case 0xBFC099E8u: goto label_BFC099E8; - case 0xBFC099F4u: goto label_BFC099F4; - case 0xBFC099FCu: goto label_BFC099FC; - case 0xBFC09A04u: goto label_BFC09A04; - case 0xBFC09A08u: goto label_BFC09A08; - case 0xBFC09A14u: goto label_BFC09A14; - case 0xBFC09A1Cu: goto label_BFC09A1C; - case 0xBFC09A2Cu: goto label_BFC09A2C; - case 0xBFC09A38u: goto label_BFC09A38; - case 0xBFC09A48u: goto label_BFC09A48; - case 0xBFC09A80u: goto label_BFC09A80; - case 0xBFC09A94u: goto label_BFC09A94; - case 0xBFC09A98u: goto label_BFC09A98; - case 0xBFC09AA4u: goto label_BFC09AA4; - case 0xBFC09AC0u: goto label_BFC09AC0; - case 0xBFC09AD4u: goto label_BFC09AD4; - case 0xBFC09AD8u: goto label_BFC09AD8; - case 0xBFC09AF0u: goto label_BFC09AF0; - case 0xBFC09B04u: goto label_BFC09B04; - case 0xBFC09B14u: goto label_BFC09B14; - case 0xBFC09B4Cu: goto label_BFC09B4C; - case 0xBFC09B70u: goto label_BFC09B70; - case 0xBFC09B90u: goto label_BFC09B90; - case 0xBFC09B98u: goto label_BFC09B98; - case 0xBFC09BA8u: goto label_BFC09BA8; - case 0xBFC09BB8u: goto label_BFC09BB8; - case 0xBFC09BC0u: goto label_BFC09BC0; - case 0xBFC09BD4u: goto label_BFC09BD4; - case 0xBFC09BE4u: goto label_BFC09BE4; - case 0xBFC09C00u: goto label_BFC09C00; - case 0xBFC09C18u: goto label_BFC09C18; - case 0xBFC09C1Cu: goto label_BFC09C1C; - case 0xBFC09C28u: goto label_BFC09C28; - case 0xBFC09C30u: goto label_BFC09C30; - case 0xBFC09C40u: goto label_BFC09C40; - case 0xBFC09C58u: goto label_BFC09C58; - case 0xBFC09C60u: goto label_BFC09C60; - case 0xBFC09C70u: goto label_BFC09C70; - case 0xBFC09C7Cu: goto label_BFC09C7C; - case 0xBFC09C8Cu: goto label_BFC09C8C; - case 0xBFC09CA8u: goto label_BFC09CA8; - case 0xBFC09CC4u: goto label_BFC09CC4; - default: break; - } - } -label_BFC0996C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0996Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0996C: 27BDFF60 addiu $sp, $sp, -160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-160)); - PGXP_ALU(0x27BDFF60u, cpu->gpr[29], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC09970: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09970u); return; } g_debug_last_store_pc = 0xBFC09970u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC09974: 0080A021 addu $s4, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09978: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09978u); return; } g_debug_last_store_pc = 0xBFC09978u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0997Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0997C: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0997Cu); return; } g_debug_last_store_pc = 0xBFC0997Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0997Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC09980: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09980u); return; } g_debug_last_store_pc = 0xBFC09980u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC09984: AFA500A4 sw $a1, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09984u); return; } g_debug_last_store_pc = 0xBFC09984u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA500A4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09988u); -#endif - /* 0xBFC09988: 8E920004 lw $s2, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09988u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x100000u); } - PGXP_LOAD(0x8E920004u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0998Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0998C: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0998Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC09990: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC09994: AE8E0018 sw $t6, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09994u); return; } g_debug_last_store_pc = 0xBFC09994u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE8E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC09998: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0999C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC099A0: 06410002 bgez $s2, 0xBFC099AC */ - uint32_t psx_brA_BFC099A0 = cpu->gpr[18]; - psx_taken_BFC099A0 = ((int32_t)psx_brA_BFC099A0 >= 0); - psx_delay_BFC099A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40003u); -#endif - /* 0xBFC099A4: 02400821 addu $at, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099A4u); -#endif - if (psx_delay_BFC099A0) { - psx_delay_BFC099A0 = 0; - if (psx_taken_BFC099A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099ACu); - goto label_BFC099AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099A8u); - } -label_BFC099A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC099A8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099A8u); -#endif -label_BFC099AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC099AC: 00019103 sra $s2, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00019103u, cpu->gpr[18], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC099B0: 00127880 sll $t7, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00127880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC099B4: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099B8u); -#endif - /* 0xBFC099B8: 8F189F20 lw $t8, -24800($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC099B8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F20u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC099BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC099C0: 13000003 beq $t8, $zero, 0xBFC099D0 */ - uint32_t psx_brA_BFC099C0 = cpu->gpr[24]; uint32_t psx_brB_BFC099C0 = cpu->gpr[0]; - psx_taken_BFC099C0 = (psx_brA_BFC099C0 == psx_brB_BFC099C0); - psx_delay_BFC099C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC099C4u); -#endif - if (psx_delay_BFC099C0) { - psx_delay_BFC099C0 = 0; - if (psx_taken_BFC099C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099D0u); - goto label_BFC099D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099C8u); - } -label_BFC099C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099C8: 100000BE beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC099C8 = cpu->gpr[0]; uint32_t psx_brB_BFC099C8 = cpu->gpr[0]; - psx_taken_BFC099C8 = (psx_brA_BFC099C8 == psx_brB_BFC099C8); - psx_delay_BFC099C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC099CC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099CCu); -#endif - if (psx_delay_BFC099C8) { - psx_delay_BFC099C8 = 0; - if (psx_taken_BFC099C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099D0u); - } -label_BFC099D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC099D0: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC099D8u; /* jal link before delay slot */ - psx_delay_BFC099D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC099D4u); -#endif - if (psx_delay_BFC099D0) { - psx_delay_BFC099D0 = 0; - cpu->gpr[31] = 0xBFC099D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC099D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC099D8: 32798000 andi $t9, $s3, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] & 0x8000u; - PGXP_ALU(0x32798000u, cpu->gpr[25], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC099DC: 34018000 ori $at, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34018000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC099E0: 13210009 beq $t9, $at, 0xBFC09A08 */ - uint32_t psx_brA_BFC099E0 = cpu->gpr[25]; uint32_t psx_brB_BFC099E0 = cpu->gpr[1]; - psx_taken_BFC099E0 = (psx_brA_BFC099E0 == psx_brB_BFC099E0); - psx_delay_BFC099E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800u); -#endif - /* 0xBFC099E4: 326B0200 andi $t3, $s3, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u; - PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099E4u); -#endif - if (psx_delay_BFC099E0) { - psx_delay_BFC099E0 = 0; - if (psx_taken_BFC099E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A08u); - goto label_BFC09A08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099E8u); - } -label_BFC099E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099E8u); -#endif - /* 0xBFC099E8: 8E840004 lw $a0, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC099E8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC099EC: 0FF02270 jal 0xBFC089C0 */ - cpu->gpr[31] = 0xBFC099F4u; /* jal link before delay slot */ - psx_delay_BFC099EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC099F0u); -#endif - if (psx_delay_BFC099EC) { - psx_delay_BFC099EC = 0; - cpu->gpr[31] = 0xBFC099F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089C0u); - cpu->pc = 0xBFC089C0u; return; - } -label_BFC099F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC099F4: 14400004 bne $v0, $zero, 0xBFC09A08 */ - uint32_t psx_brA_BFC099F4 = cpu->gpr[2]; uint32_t psx_brB_BFC099F4 = cpu->gpr[0]; - psx_taken_BFC099F4 = (psx_brA_BFC099F4 != psx_brB_BFC099F4); - psx_delay_BFC099F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800u); -#endif - /* 0xBFC099F8: 326B0200 andi $t3, $s3, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u; - PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC099F8u); -#endif - if (psx_delay_BFC099F4) { - psx_delay_BFC099F4 = 0; - if (psx_taken_BFC099F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A08u); - goto label_BFC09A08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC099FCu); - } -label_BFC099FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC099FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC099FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC099FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC099FC: 100000B1 beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC099FC = cpu->gpr[0]; uint32_t psx_brB_BFC099FC = cpu->gpr[0]; - psx_taken_BFC099FC = (psx_brA_BFC099FC == psx_brB_BFC099FC); - psx_delay_BFC099FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09A00: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A00u); -#endif - if (psx_delay_BFC099FC) { - psx_delay_BFC099FC = 0; - if (psx_taken_BFC099FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A04u); - } -label_BFC09A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800u); -#endif - /* 0xBFC09A04: 326B0200 andi $t3, $s3, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] & 0x200u; - PGXP_ALU(0x326B0200u, cpu->gpr[11], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A04u); -#endif -label_BFC09A08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09A08: 24010200 addiu $at, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24010200u, cpu->gpr[1], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC09A0C: 15610092 bne $t3, $at, 0xBFC09C58 */ - uint32_t psx_brA_BFC09A0C = cpu->gpr[11]; uint32_t psx_brB_BFC09A0C = cpu->gpr[1]; - psx_taken_BFC09A0C = (psx_brA_BFC09A0C != psx_brB_BFC09A0C); - psx_delay_BFC09A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09A10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09A10u); -#endif - if (psx_delay_BFC09A0C) { - psx_delay_BFC09A0C = 0; - if (psx_taken_BFC09A0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C58u); - goto label_BFC09C58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A14u); - } -label_BFC09A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09A14: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC09A1Cu; /* jal link before delay slot */ - psx_delay_BFC09A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09A18: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A18u); -#endif - if (psx_delay_BFC09A14) { - psx_delay_BFC09A14 = 0; - cpu->gpr[31] = 0xBFC09A1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC09A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A1Cu); -#endif - /* 0xBFC09A1C: 8E840004 lw $a0, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A1Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A20u); -#endif - /* 0xBFC09A20: 8FA600A4 lw $a2, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A20u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600A4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09A24: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC09A2Cu; /* jal link before delay slot */ - psx_delay_BFC09A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC09A28: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A28u); -#endif - if (psx_delay_BFC09A24) { - psx_delay_BFC09A24 = 0; - cpu->gpr[31] = 0xBFC09A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC09A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09A2C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09A30: 10410005 beq $v0, $at, 0xBFC09A48 */ - uint32_t psx_brA_BFC09A30 = cpu->gpr[2]; uint32_t psx_brB_BFC09A30 = cpu->gpr[1]; - psx_taken_BFC09A30 = (psx_brA_BFC09A30 == psx_brB_BFC09A30); - psx_delay_BFC09A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC09A34: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A34u); -#endif - if (psx_delay_BFC09A30) { - psx_delay_BFC09A30 = 0; - if (psx_taken_BFC09A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A48u); - goto label_BFC09A48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A38u); - } -label_BFC09A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC09A38: 240C0011 addiu $t4, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x240C0011u, cpu->gpr[12], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC09A3C: AE8C0018 sw $t4, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A3Cu); return; } g_debug_last_store_pc = 0xBFC09A3Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE8C0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09A40: 100000A0 beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC09A40 = cpu->gpr[0]; uint32_t psx_brB_BFC09A40 = cpu->gpr[0]; - psx_taken_BFC09A40 = (psx_brA_BFC09A40 == psx_brB_BFC09A40); - psx_delay_BFC09A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09A44: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A44u); -#endif - if (psx_delay_BFC09A40) { - psx_delay_BFC09A40 = 0; - if (psx_taken_BFC09A40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A48u); - } -label_BFC09A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC09A48: 00126900 sll $t5, $s2, 4 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[18] << 4u; - PGXP_ALU(0x00126900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC09A4C: 01B26823 subu $t5, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[18]; - PGXP_ALU(0x01B26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09A50: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09A54: 25CEBA88 addiu $t6, $t6, -17784 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-17784)); - PGXP_ALU(0x25CEBA88u, cpu->gpr[14], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC09A58: 000D6940 sll $t5, $t5, 5 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 5u; - PGXP_ALU(0x000D6940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09A5C: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A5Cu); return; } g_debug_last_store_pc = 0xBFC09A5Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC09A60: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A60u); return; } g_debug_last_store_pc = 0xBFC09A60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6400u); -#endif - /* 0xBFC09A64: 01AE5021 addu $t2, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[10] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20401u); -#endif - /* 0xBFC09A68: 01408821 addu $s1, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC09A6C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC09A70: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC09A74: 27A200A0 addiu $v0, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27A200A0u, cpu->gpr[2], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC09A78: 27A300DC addiu $v1, $sp, 220 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (220)); - PGXP_ALU(0x27A300DCu, cpu->gpr[3], _pgx1, 0x000000DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC09A7C: 240900A0 addiu $t1, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240900A0u, cpu->gpr[9], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A7Cu); -#endif -label_BFC09A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A80u); -#endif - /* 0xBFC09A80: 8E2F0000 lw $t7, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A80u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x8E2F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09A84: AC40FFAC sw $zero, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09A84u); return; } g_debug_last_store_pc = 0xBFC09A84u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC09A88: 31F800F0 andi $t8, $t7, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xF0u; - PGXP_ALU(0x31F800F0u, cpu->gpr[24], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC09A8C: 15380002 bne $t1, $t8, 0xBFC09A98 */ - uint32_t psx_brA_BFC09A8C = cpu->gpr[9]; uint32_t psx_brB_BFC09A8C = cpu->gpr[24]; - psx_taken_BFC09A8C = (psx_brA_BFC09A8C != psx_brB_BFC09A8C); - psx_delay_BFC09A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09A90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09A90u); -#endif - if (psx_delay_BFC09A8C) { - psx_delay_BFC09A8C = 0; - if (psx_taken_BFC09A8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A98u); - goto label_BFC09A98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A94u); - } -label_BFC09A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC09A94: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A94u); -#endif -label_BFC09A98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09A98: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC09A9C: 1443FFF8 bne $v0, $v1, 0xBFC09A80 */ - uint32_t psx_brA_BFC09A9C = cpu->gpr[2]; uint32_t psx_brB_BFC09A9C = cpu->gpr[3]; - psx_taken_BFC09A9C = (psx_brA_BFC09A9C != psx_brB_BFC09A9C); - psx_delay_BFC09A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC09AA0: 26310020 addiu $s1, $s1, 32 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (32)); - PGXP_ALU(0x26310020u, cpu->gpr[17], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AA0u); -#endif - if (psx_delay_BFC09A9C) { - psx_delay_BFC09A9C = 0; - if (psx_taken_BFC09A9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09A80u); - goto label_BFC09A80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09AA4u); - } -label_BFC09AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC09AA4: 00131403 sra $v0, $s3, 16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] >> 16u); - PGXP_ALU(0x00131403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09AA8: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC09AAC: 00021340 sll $v0, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 13u; - PGXP_ALU(0x00021340u, cpu->gpr[2], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC09AB0: 0008CB40 sll $t9, $t0, 13 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 13u; - PGXP_ALU(0x0008CB40u, cpu->gpr[25], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC09AB4: 0322082B sltu $at, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0322082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09AB8: 14200061 bne $at, $zero, 0xBFC09C40 */ - uint32_t psx_brA_BFC09AB8 = cpu->gpr[1]; uint32_t psx_brB_BFC09AB8 = cpu->gpr[0]; - psx_taken_BFC09AB8 = (psx_brA_BFC09AB8 != psx_brB_BFC09AB8); - psx_delay_BFC09AB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC09ABC: AE820020 sw $v0, 32($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09ABCu); return; } g_debug_last_store_pc = 0xBFC09ABCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09ABCu); -#endif - if (psx_delay_BFC09AB8) { - psx_delay_BFC09AB8 = 0; - if (psx_taken_BFC09AB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C40u); - goto label_BFC09C40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09AC0u); - } -label_BFC09AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AC0u); -#endif - /* 0xBFC09AC0: 8E820020 lw $v0, 32($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09AC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } - PGXP_LOAD(0x8E820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC09AC8: 304B1FFF andi $t3, $v0, 0x1FFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x1FFFu; - PGXP_ALU(0x304B1FFFu, cpu->gpr[11], _pgx1, 0x1FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC09ACC: 11600002 beq $t3, $zero, 0xBFC09AD8 */ - uint32_t psx_brA_BFC09ACC = cpu->gpr[11]; uint32_t psx_brB_BFC09ACC = cpu->gpr[0]; - psx_taken_BFC09ACC = (psx_brA_BFC09ACC == psx_brB_BFC09ACC); - psx_delay_BFC09ACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC09AD0: 00024342 srl $t0, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 13u; - PGXP_ALU(0x00024342u, cpu->gpr[8], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AD0u); -#endif - if (psx_delay_BFC09ACC) { - psx_delay_BFC09ACC = 0; - if (psx_taken_BFC09ACC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09AD8u); - goto label_BFC09AD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09AD4u); - } -label_BFC09AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC09AD4: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AD4u); -#endif -label_BFC09AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AD8u); -#endif - /* 0xBFC09AD8: 8FB20090 lw $s2, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09AD8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20090u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ADCu); -#endif - /* 0xBFC09ADC: 8FB30088 lw $s3, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09ADCu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30088u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC09AE0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC09AE4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20401u); -#endif - /* 0xBFC09AE8: 01408821 addu $s1, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC09AEC: 24070051 addiu $a3, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24070051u, cpu->gpr[7], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AECu); -#endif -label_BFC09AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AF0u); -#endif - /* 0xBFC09AF0: 8E2C0000 lw $t4, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09AF0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000u); } - PGXP_LOAD(0x8E2C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09AF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC09AF8: 318D00F0 andi $t5, $t4, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xF0u; - PGXP_ALU(0x318D00F0u, cpu->gpr[13], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC09AFC: 152D0046 bne $t1, $t5, 0xBFC09C18 */ - uint32_t psx_brA_BFC09AFC = cpu->gpr[9]; uint32_t psx_brB_BFC09AFC = cpu->gpr[13]; - psx_taken_BFC09AFC = (psx_brA_BFC09AFC != psx_brB_BFC09AFC); - psx_delay_BFC09AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09B00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09B00u); -#endif - if (psx_delay_BFC09AFC) { - psx_delay_BFC09AFC = 0; - if (psx_taken_BFC09AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C18u); - goto label_BFC09C18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B04u); - } -label_BFC09B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC09B04: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC09B08: 27AF00A0 addiu $t7, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27AF00A0u, cpu->gpr[15], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC09B0C: 14600018 bne $v1, $zero, 0xBFC09B70 */ - uint32_t psx_brA_BFC09B0C = cpu->gpr[3]; uint32_t psx_brB_BFC09B0C = cpu->gpr[0]; - psx_taken_BFC09B0C = (psx_brA_BFC09B0C != psx_brB_BFC09B0C); - psx_delay_BFC09B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC09B10: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B10u); -#endif - if (psx_delay_BFC09B0C) { - psx_delay_BFC09B0C = 0; - if (psx_taken_BFC09B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B70u); - goto label_BFC09B70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B14u); - } -label_BFC09B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC09B14: 24180051 addiu $t8, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24180051u, cpu->gpr[24], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC09B18: AE380000 sw $t8, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B18u); return; } g_debug_last_store_pc = 0xBFC09B18u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B1Cu); -#endif - /* 0xBFC09B1C: 8E990020 lw $t9, 32($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B1Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x100000u); } - PGXP_LOAD(0x8E990020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC09B20: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC09B24: AE390004 sw $t9, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B24u); return; } g_debug_last_store_pc = 0xBFC09B24u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE390004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC09B28: AFAA0034 sw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B28u); return; } g_debug_last_store_pc = 0xBFC09B28u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B2Cu); -#endif - /* 0xBFC09B2C: 8FA500A4 lw $a1, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500A4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC09B30: AFA80098 sw $t0, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B30u); return; } g_debug_last_store_pc = 0xBFC09B30u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80098u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC09B34: AFA30094 sw $v1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B34u); return; } g_debug_last_store_pc = 0xBFC09B34u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30094u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90001u); -#endif - /* 0xBFC09B38: 02009821 addu $s3, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC09B3C: AFA20038 sw $v0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B3Cu); return; } g_debug_last_store_pc = 0xBFC09B3Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20038u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC09B40: 2624000A addiu $a0, $s1, 10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (10)); - PGXP_ALU(0x2624000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09B44: 0FF00D06 jal 0xBFC03418 */ - cpu->gpr[31] = 0xBFC09B4Cu; /* jal link before delay slot */ - psx_delay_BFC09B44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC09B48: 24060014 addiu $a2, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24060014u, cpu->gpr[6], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B48u); -#endif - if (psx_delay_BFC09B44) { - psx_delay_BFC09B44 = 0; - cpu->gpr[31] = 0xBFC09B4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03418u); - cpu->pc = 0xBFC03418u; return; - } -label_BFC09B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B4Cu); -#endif - /* 0xBFC09B4C: 8FA20038 lw $v0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20038u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B50u); -#endif - /* 0xBFC09B50: 8FA30094 lw $v1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B50u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30094u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC09B54: 24070051 addiu $a3, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24070051u, cpu->gpr[7], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B58u); -#endif - /* 0xBFC09B58: 8FA80098 lw $t0, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B58u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80098u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B5Cu); -#endif - /* 0xBFC09B5C: 8FAA0034 lw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B5Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC09B60: 240900A0 addiu $t1, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240900A0u, cpu->gpr[9], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC09B64: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09B68: 1000000B beq $zero, $zero, 0xBFC09B98 */ - uint32_t psx_brA_BFC09B68 = cpu->gpr[0]; uint32_t psx_brB_BFC09B68 = cpu->gpr[0]; - psx_taken_BFC09B68 = (psx_brA_BFC09B68 == psx_brB_BFC09B68); - psx_delay_BFC09B68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC09B6C: AC47FFAC sw $a3, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B6Cu); return; } g_debug_last_store_pc = 0xBFC09B6Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC47FFACu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B6Cu); -#endif - if (psx_delay_BFC09B68) { - psx_delay_BFC09B68 = 0; - if (psx_taken_BFC09B68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B98u); - goto label_BFC09B98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B70u); - } -label_BFC09B70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40800u); -#endif - /* 0xBFC09B70: 00125940 sll $t3, $s2, 5 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[11] = cpu->gpr[18] << 5u; - PGXP_ALU(0x00125940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC09B74: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC09B78: A5900008 sh $s0, 8($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B78u); return; } g_debug_last_store_pc = 0xBFC09B78u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA5900008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B7Cu); -#endif - /* 0xBFC09B7C: 8C4EFFAC lw $t6, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B7Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4EFFACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC09B80: 240D0052 addiu $t5, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240D0052u, cpu->gpr[13], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC09B84: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC09B88: 10EE0003 beq $a3, $t6, 0xBFC09B98 */ - uint32_t psx_brA_BFC09B88 = cpu->gpr[7]; uint32_t psx_brB_BFC09B88 = cpu->gpr[14]; - psx_taken_BFC09B88 = (psx_brA_BFC09B88 == psx_brB_BFC09B88); - psx_delay_BFC09B88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC09B8C: AE2D0000 sw $t5, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B8Cu); return; } g_debug_last_store_pc = 0xBFC09B8Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE2D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B8Cu); -#endif - if (psx_delay_BFC09B88) { - psx_delay_BFC09B88 = 0; - if (psx_taken_BFC09B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B98u); - goto label_BFC09B98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09B90u); - } -label_BFC09B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC09B90: 240F0052 addiu $t7, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240F0052u, cpu->gpr[15], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC09B94: AC4FFFAC sw $t7, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09B94u); return; } g_debug_last_store_pc = 0xBFC09B94u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4FFFACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B94u); -#endif -label_BFC09B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC09B98: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC09B9C: 0068082A slt $at, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0068082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09BA0: 1420001E bne $at, $zero, 0xBFC09C1C */ - uint32_t psx_brA_BFC09BA0 = cpu->gpr[1]; uint32_t psx_brB_BFC09BA0 = cpu->gpr[0]; - psx_taken_BFC09BA0 = (psx_brA_BFC09BA0 != psx_brB_BFC09BA0); - psx_delay_BFC09BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC09BA4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BA4u); -#endif - if (psx_delay_BFC09BA0) { - psx_delay_BFC09BA0 = 0; - if (psx_taken_BFC09BA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C1Cu); - goto label_BFC09C1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09BA8u); - } -label_BFC09BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC09BA8: 3410FFFF ori $s0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC09BAC: 28610002 slti $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0); - PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09BB0: 14200003 bne $at, $zero, 0xBFC09BC0 */ - uint32_t psx_brA_BFC09BB0 = cpu->gpr[1]; uint32_t psx_brB_BFC09BB0 = cpu->gpr[0]; - psx_taken_BFC09BB0 = (psx_brA_BFC09BB0 != psx_brB_BFC09BB0); - psx_delay_BFC09BB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC09BB4: A6300008 sh $s0, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BB4u); return; } g_debug_last_store_pc = 0xBFC09BB4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA6300008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BB4u); -#endif - if (psx_delay_BFC09BB0) { - psx_delay_BFC09BB0 = 0; - if (psx_taken_BFC09BB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09BC0u); - goto label_BFC09BC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09BB8u); - } -label_BFC09BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC09BB8: 24180053 addiu $t8, $zero, 83 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); - PGXP_ALU(0x24180053u, cpu->gpr[24], _pgx1, 0x00000053u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC09BBC: AE380000 sw $t8, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BBCu); return; } g_debug_last_store_pc = 0xBFC09BBCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BBCu); -#endif -label_BFC09BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BC0u); -#endif - /* 0xBFC09BC0: 8E840004 lw $a0, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BC0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC09BC4: AFAA0034 sw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BC4u); return; } g_debug_last_store_pc = 0xBFC09BC4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC09BC8: AFA6008C sw $a2, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BC8u); return; } g_debug_last_store_pc = 0xBFC09BC8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6008Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09BCC: 0FF0262A jal 0xBFC098A8 */ - cpu->gpr[31] = 0xBFC09BD4u; /* jal link before delay slot */ - psx_delay_BFC09BCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC09BD0: 27A5004C addiu $a1, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A5004Cu, cpu->gpr[5], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BD0u); -#endif - if (psx_delay_BFC09BCC) { - psx_delay_BFC09BCC = 0; - cpu->gpr[31] = 0xBFC09BD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC098A8u); - cpu->pc = 0xBFC098A8u; return; - } -label_BFC09BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09BD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BD4u); -#endif - /* 0xBFC09BD4: 8FA6008C lw $a2, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BD4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6008Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BD8u); -#endif - /* 0xBFC09BD8: 8FAA0034 lw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BD8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09BDC: 10400014 beq $v0, $zero, 0xBFC09C30 */ - uint32_t psx_brA_BFC09BDC = cpu->gpr[2]; uint32_t psx_brB_BFC09BDC = cpu->gpr[0]; - psx_taken_BFC09BDC = (psx_brA_BFC09BDC == psx_brB_BFC09BDC); - psx_delay_BFC09BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC09BE0: 240900A0 addiu $t1, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240900A0u, cpu->gpr[9], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BE0u); -#endif - if (psx_delay_BFC09BDC) { - psx_delay_BFC09BDC = 0; - if (psx_taken_BFC09BDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C30u); - goto label_BFC09C30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09BE4u); - } -label_BFC09BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC09BE4: 0013C940 sll $t9, $s3, 5 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 5u; - PGXP_ALU(0x0013C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000404u); -#endif - /* 0xBFC09BE8: 01591021 addu $v0, $t2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[25]; - PGXP_ALU(0x01591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC09BEC: A4500008 sh $s0, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BECu); return; } g_debug_last_store_pc = 0xBFC09BECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA4500008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BF0u); -#endif - /* 0xBFC09BF0: 94530008 lhu $s3, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BF0u); return; } cpu->gpr[19] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 19, 0x4u); } - PGXP_LOAD(0x94530008u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC09BF4: AC490000 sw $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BF4u); return; } g_debug_last_store_pc = 0xBFC09BF4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC09BF8: 1660FFFA bne $s3, $zero, 0xBFC09BE4 */ - uint32_t psx_brA_BFC09BF8 = cpu->gpr[19]; uint32_t psx_brB_BFC09BF8 = cpu->gpr[0]; - psx_taken_BFC09BF8 = (psx_brA_BFC09BF8 != psx_brB_BFC09BF8); - psx_delay_BFC09BF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09BFC: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09BFCu); return; } g_debug_last_store_pc = 0xBFC09BFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09BFCu); -#endif - if (psx_delay_BFC09BF8) { - psx_delay_BFC09BF8 = 0; - if (psx_taken_BFC09BF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09BE4u); - goto label_BFC09BE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C00u); - } -label_BFC09C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC09C00: 240B0010 addiu $t3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240B0010u, cpu->gpr[11], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100800u); -#endif - /* 0xBFC09C04: AE8B0018 sw $t3, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C04u); return; } g_debug_last_store_pc = 0xBFC09C04u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAE8B0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C08u); -#endif - /* 0xBFC09C08: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C08u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C0Cu); -#endif - /* 0xBFC09C0C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C0Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09C10: 1000002C beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC09C10 = cpu->gpr[0]; uint32_t psx_brB_BFC09C10 = cpu->gpr[0]; - psx_taken_BFC09C10 = (psx_brA_BFC09C10 == psx_brB_BFC09C10); - psx_delay_BFC09C10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09C14: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C14u); -#endif - if (psx_delay_BFC09C10) { - psx_delay_BFC09C10 = 0; - if (psx_taken_BFC09C10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C18u); - } -label_BFC09C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC09C18: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C18u); -#endif -label_BFC09C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09C1C: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC09C20: 1601FFB3 bne $s0, $at, 0xBFC09AF0 */ - uint32_t psx_brA_BFC09C20 = cpu->gpr[16]; uint32_t psx_brB_BFC09C20 = cpu->gpr[1]; - psx_taken_BFC09C20 = (psx_brA_BFC09C20 != psx_brB_BFC09C20); - psx_delay_BFC09C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC09C24: 26310020 addiu $s1, $s1, 32 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (32)); - PGXP_ALU(0x26310020u, cpu->gpr[17], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C24u); -#endif - if (psx_delay_BFC09C20) { - psx_delay_BFC09C20 = 0; - if (psx_taken_BFC09C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09AF0u); - goto label_BFC09AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C28u); - } -label_BFC09C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC09C28: AFB30088 sw $s3, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C28u); return; } g_debug_last_store_pc = 0xBFC09C28u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30088u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC09C2C: AFB20090 sw $s2, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C2Cu); return; } g_debug_last_store_pc = 0xBFC09C2Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20090u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C2Cu); -#endif -label_BFC09C30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C30u); -#endif - /* 0xBFC09C30: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C30u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C34u); -#endif - /* 0xBFC09C34: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C34u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09C38: 1000001B beq $zero, $zero, 0xBFC09CA8 */ - uint32_t psx_brA_BFC09C38 = cpu->gpr[0]; uint32_t psx_brB_BFC09C38 = cpu->gpr[0]; - psx_taken_BFC09C38 = (psx_brA_BFC09C38 == psx_brB_BFC09C38); - psx_delay_BFC09C38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC09C3C: 0006C140 sll $t8, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 5u; - PGXP_ALU(0x0006C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C3Cu); -#endif - if (psx_delay_BFC09C38) { - psx_delay_BFC09C38 = 0; - if (psx_taken_BFC09C38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CA8u); - goto label_BFC09CA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C40u); - } -label_BFC09C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC09C40: 240C001C addiu $t4, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240C001Cu, cpu->gpr[12], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC09C44: AE8C0018 sw $t4, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C44u); return; } g_debug_last_store_pc = 0xBFC09C44u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE8C0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C48u); -#endif - /* 0xBFC09C48: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C48u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C4Cu); -#endif - /* 0xBFC09C4C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C4Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09C50: 1000001C beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC09C50 = cpu->gpr[0]; uint32_t psx_brB_BFC09C50 = cpu->gpr[0]; - psx_taken_BFC09C50 = (psx_brA_BFC09C50 == psx_brB_BFC09C50); - psx_delay_BFC09C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09C54: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C54u); -#endif - if (psx_delay_BFC09C50) { - psx_delay_BFC09C50 = 0; - if (psx_taken_BFC09C50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C58u); - } -label_BFC09C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09C58: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC09C60u; /* jal link before delay slot */ - psx_delay_BFC09C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC09C5C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C5Cu); -#endif - if (psx_delay_BFC09C58) { - psx_delay_BFC09C58 = 0; - cpu->gpr[31] = 0xBFC09C60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC09C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C60u); -#endif - /* 0xBFC09C60: 8E840004 lw $a0, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C64u); -#endif - /* 0xBFC09C64: 8FA600A4 lw $a2, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C64u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600A4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09C68: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC09C70u; /* jal link before delay slot */ - psx_delay_BFC09C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC09C6C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C6Cu); -#endif - if (psx_delay_BFC09C68) { - psx_delay_BFC09C68 = 0; - cpu->gpr[31] = 0xBFC09C70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC09C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09C70: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09C74: 14410005 bne $v0, $at, 0xBFC09C8C */ - uint32_t psx_brA_BFC09C74 = cpu->gpr[2]; uint32_t psx_brB_BFC09C74 = cpu->gpr[1]; - psx_taken_BFC09C74 = (psx_brA_BFC09C74 != psx_brB_BFC09C74); - psx_delay_BFC09C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC09C78: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C78u); -#endif - if (psx_delay_BFC09C74) { - psx_delay_BFC09C74 = 0; - if (psx_taken_BFC09C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C8Cu); - goto label_BFC09C8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C7Cu); - } -label_BFC09C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC09C7C: 240D0002 addiu $t5, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240D0002u, cpu->gpr[13], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC09C80: AE8D0018 sw $t5, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09C80u); return; } g_debug_last_store_pc = 0xBFC09C80u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE8D0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09C84: 1000000F beq $zero, $zero, 0xBFC09CC4 */ - uint32_t psx_brA_BFC09C84 = cpu->gpr[0]; uint32_t psx_brB_BFC09C84 = cpu->gpr[0]; - psx_taken_BFC09C84 = (psx_brA_BFC09C84 == psx_brB_BFC09C84); - psx_delay_BFC09C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09C88: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C88u); -#endif - if (psx_delay_BFC09C84) { - psx_delay_BFC09C84 = 0; - if (psx_taken_BFC09C84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CC4u); - goto label_BFC09CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09C8Cu); - } -label_BFC09C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC09C8C: 00127100 sll $t6, $s2, 4 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[18] << 4u; - PGXP_ALU(0x00127100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC09C90: 01D27023 subu $t6, $t6, $s2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[18]; - PGXP_ALU(0x01D27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09C94: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09C98: 25EFBA88 addiu $t7, $t7, -17784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17784)); - PGXP_ALU(0x25EFBA88u, cpu->gpr[15], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09C9C: 000E7140 sll $t6, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 5u; - PGXP_ALU(0x000E7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC400u); -#endif - /* 0xBFC09CA0: 01CF5021 addu $t2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[10] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC09CA4: 0006C140 sll $t8, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 5u; - PGXP_ALU(0x0006C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CA4u); -#endif -label_BFC09CA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100040u); -#endif - /* 0xBFC09CA8: AE860024 sw $a2, 36($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CA8u); return; } g_debug_last_store_pc = 0xBFC09CA8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAE860024u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000400u); -#endif - /* 0xBFC09CAC: 0158C821 addu $t9, $t2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[10] + cpu->gpr[24]; - PGXP_ALU(0x0158C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CB0u); -#endif - /* 0xBFC09CB0: 8F2B0004 lw $t3, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CB0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x2000000u); } - PGXP_LOAD(0x8F2B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC09CB4: AE800010 sw $zero, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CB4u); return; } g_debug_last_store_pc = 0xBFC09CB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE800010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC09CB8: AE800018 sw $zero, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CB8u); return; } g_debug_last_store_pc = 0xBFC09CB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE800018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09CBC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100800u); -#endif - /* 0xBFC09CC0: AE8B0020 sw $t3, 32($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CC0u); return; } g_debug_last_store_pc = 0xBFC09CC0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAE8B0020u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CC0u); -#endif -label_BFC09CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CC4u); -#endif - /* 0xBFC09CC4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CC8u); -#endif - /* 0xBFC09CC8: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CC8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CCCu); -#endif - /* 0xBFC09CCC: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CCCu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CD0u); -#endif - /* 0xBFC09CD0: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CD0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09CD4: 03E00008 jr $ra */ - psx_delay_BFC09CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09CD8: 27BD00A0 addiu $sp, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27BD00A0u, cpu->gpr[29], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CD8u); -#endif - if (psx_delay_BFC09CD4) { - psx_delay_BFC09CD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09CDC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09CDCu); - int psx_delay_BFC09CF0 = 0; - int psx_taken_BFC09CF0 = 0; - int psx_delay_BFC09D10 = 0; - int psx_taken_BFC09D10 = 0; - int psx_delay_BFC09D18 = 0; - int psx_taken_BFC09D18 = 0; - int psx_delay_BFC09D20 = 0; - int psx_delay_BFC09D34 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09CF8u: goto label_BFC09CF8; - case 0xBFC09CFCu: goto label_BFC09CFC; - case 0xBFC09D18u: goto label_BFC09D18; - case 0xBFC09D20u: goto label_BFC09D20; - case 0xBFC09D28u: goto label_BFC09D28; - case 0xBFC09D2Cu: goto label_BFC09D2C; - default: break; - } - } -label_BFC09CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09CDC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09CE0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CE0u); return; } g_debug_last_store_pc = 0xBFC09CE0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CE4u); -#endif - /* 0xBFC09CE4: 8C8E0004 lw $t6, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09CE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC09CE8: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09CEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC09CF0: 05C10002 bgez $t6, 0xBFC09CFC */ - uint32_t psx_brA_BFC09CF0 = cpu->gpr[14]; - psx_taken_BFC09CF0 = ((int32_t)psx_brA_BFC09CF0 >= 0); - psx_delay_BFC09CF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC09CF4: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CF4u); -#endif - if (psx_delay_BFC09CF0) { - psx_delay_BFC09CF0 = 0; - if (psx_taken_BFC09CF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CFCu); - goto label_BFC09CFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09CF8u); - } -label_BFC09CF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09CF8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CF8u); -#endif -label_BFC09CFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC09CFC: 00017903 sra $t7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC09D00: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC09D04: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D08u); -#endif - /* 0xBFC09D08: 8F399F20 lw $t9, -24800($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D08u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F20u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC09D10: 13200003 beq $t9, $zero, 0xBFC09D20 */ - uint32_t psx_brA_BFC09D10 = cpu->gpr[25]; uint32_t psx_brB_BFC09D10 = cpu->gpr[0]; - psx_taken_BFC09D10 = (psx_brA_BFC09D10 == psx_brB_BFC09D10); - psx_delay_BFC09D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D14u); -#endif - if (psx_delay_BFC09D10) { - psx_delay_BFC09D10 = 0; - if (psx_taken_BFC09D10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D20u); - goto label_BFC09D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D18u); - } -label_BFC09D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D18: 10000004 beq $zero, $zero, 0xBFC09D2C */ - uint32_t psx_brA_BFC09D18 = cpu->gpr[0]; uint32_t psx_brB_BFC09D18 = cpu->gpr[0]; - psx_taken_BFC09D18 = (psx_brA_BFC09D18 == psx_brB_BFC09D18); - psx_delay_BFC09D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09D1C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D1Cu); -#endif - if (psx_delay_BFC09D18) { - psx_delay_BFC09D18 = 0; - if (psx_taken_BFC09D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D2Cu); - goto label_BFC09D2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D20u); - } -label_BFC09D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09D20: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC09D28u; /* jal link before delay slot */ - psx_delay_BFC09D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D24u); -#endif - if (psx_delay_BFC09D20) { - psx_delay_BFC09D20 = 0; - cpu->gpr[31] = 0xBFC09D28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC09D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09D28: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D28u); -#endif -label_BFC09D2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D2Cu); -#endif - /* 0xBFC09D2C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D2Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09D30: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC09D34: 03E00008 jr $ra */ - psx_delay_BFC09D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D38u); -#endif - if (psx_delay_BFC09D34) { - psx_delay_BFC09D34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC09D3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC09D3Cu); - int psx_delay_BFC09D7C = 0; - int psx_taken_BFC09D7C = 0; - int psx_delay_BFC09D9C = 0; - int psx_taken_BFC09D9C = 0; - int psx_delay_BFC09DA4 = 0; - int psx_taken_BFC09DA4 = 0; - int psx_delay_BFC09DAC = 0; - int psx_delay_BFC09DC0 = 0; - int psx_taken_BFC09DC0 = 0; - int psx_delay_BFC09DD0 = 0; - int psx_taken_BFC09DD0 = 0; - int psx_delay_BFC09DE4 = 0; - int psx_taken_BFC09DE4 = 0; - int psx_delay_BFC09DF4 = 0; - int psx_taken_BFC09DF4 = 0; - int psx_delay_BFC09E18 = 0; - int psx_taken_BFC09E18 = 0; - int psx_delay_BFC09E2C = 0; - int psx_taken_BFC09E2C = 0; - int psx_delay_BFC09E44 = 0; - int psx_taken_BFC09E44 = 0; - int psx_delay_BFC09E54 = 0; - int psx_taken_BFC09E54 = 0; - int psx_delay_BFC09EAC = 0; - int psx_delay_BFC09EB4 = 0; - int psx_taken_BFC09EB4 = 0; - int psx_delay_BFC09ED0 = 0; - int psx_delay_BFC09EE4 = 0; - int psx_taken_BFC09EE4 = 0; - int psx_delay_BFC09EF8 = 0; - int psx_delay_BFC09F08 = 0; - int psx_delay_BFC09F14 = 0; - int psx_taken_BFC09F14 = 0; - int psx_delay_BFC09F28 = 0; - int psx_delay_BFC09F34 = 0; - int psx_taken_BFC09F34 = 0; - int psx_delay_BFC09F48 = 0; - int psx_taken_BFC09F48 = 0; - int psx_delay_BFC09F60 = 0; - int psx_taken_BFC09F60 = 0; - int psx_delay_BFC09F68 = 0; - int psx_taken_BFC09F68 = 0; - int psx_delay_BFC09F78 = 0; - int psx_taken_BFC09F78 = 0; - int psx_delay_BFC09F80 = 0; - int psx_taken_BFC09F80 = 0; - int psx_delay_BFC09F94 = 0; - int psx_taken_BFC09F94 = 0; - int psx_delay_BFC09F9C = 0; - int psx_taken_BFC09F9C = 0; - int psx_delay_BFC09FB0 = 0; - int psx_delay_BFC09FC4 = 0; - int psx_delay_BFC09FD0 = 0; - int psx_taken_BFC09FD0 = 0; - int psx_delay_BFC09FE0 = 0; - int psx_taken_BFC09FE0 = 0; - int psx_delay_BFC09FF4 = 0; - int psx_taken_BFC09FF4 = 0; - int psx_delay_BFC0A02C = 0; - int psx_taken_BFC0A02C = 0; - int psx_delay_BFC0A03C = 0; - int psx_taken_BFC0A03C = 0; - int psx_delay_BFC0A078 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC09D84u: goto label_BFC09D84; - case 0xBFC09D88u: goto label_BFC09D88; - case 0xBFC09DA4u: goto label_BFC09DA4; - case 0xBFC09DACu: goto label_BFC09DAC; - case 0xBFC09DB4u: goto label_BFC09DB4; - case 0xBFC09DC8u: goto label_BFC09DC8; - case 0xBFC09DD8u: goto label_BFC09DD8; - case 0xBFC09DECu: goto label_BFC09DEC; - case 0xBFC09DFCu: goto label_BFC09DFC; - case 0xBFC09E20u: goto label_BFC09E20; - case 0xBFC09E24u: goto label_BFC09E24; - case 0xBFC09E34u: goto label_BFC09E34; - case 0xBFC09E4Cu: goto label_BFC09E4C; - case 0xBFC09E5Cu: goto label_BFC09E5C; - case 0xBFC09EB4u: goto label_BFC09EB4; - case 0xBFC09EBCu: goto label_BFC09EBC; - case 0xBFC09ED8u: goto label_BFC09ED8; - case 0xBFC09EECu: goto label_BFC09EEC; - case 0xBFC09F00u: goto label_BFC09F00; - case 0xBFC09F10u: goto label_BFC09F10; - case 0xBFC09F1Cu: goto label_BFC09F1C; - case 0xBFC09F20u: goto label_BFC09F20; - case 0xBFC09F30u: goto label_BFC09F30; - case 0xBFC09F3Cu: goto label_BFC09F3C; - case 0xBFC09F50u: goto label_BFC09F50; - case 0xBFC09F68u: goto label_BFC09F68; - case 0xBFC09F70u: goto label_BFC09F70; - case 0xBFC09F78u: goto label_BFC09F78; - case 0xBFC09F80u: goto label_BFC09F80; - case 0xBFC09F88u: goto label_BFC09F88; - case 0xBFC09F8Cu: goto label_BFC09F8C; - case 0xBFC09F9Cu: goto label_BFC09F9C; - case 0xBFC09FA4u: goto label_BFC09FA4; - case 0xBFC09FA8u: goto label_BFC09FA8; - case 0xBFC09FB8u: goto label_BFC09FB8; - case 0xBFC09FCCu: goto label_BFC09FCC; - case 0xBFC09FD8u: goto label_BFC09FD8; - case 0xBFC09FE8u: goto label_BFC09FE8; - case 0xBFC09FECu: goto label_BFC09FEC; - case 0xBFC09FFCu: goto label_BFC09FFC; - case 0xBFC0A00Cu: goto label_BFC0A00C; - case 0xBFC0A034u: goto label_BFC0A034; - case 0xBFC0A044u: goto label_BFC0A044; - case 0xBFC0A048u: goto label_BFC0A048; - case 0xBFC0A060u: goto label_BFC0A060; - default: break; - } - } -label_BFC09D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC09D3C: 27BDFF88 addiu $sp, $sp, -120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-120)); - PGXP_ALU(0x27BDFF88u, cpu->gpr[29], _pgx1, 0xFFFFFF88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC09D40: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D40u); return; } g_debug_last_store_pc = 0xBFC09D40u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC09D44: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC09D48: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D48u); return; } g_debug_last_store_pc = 0xBFC09D48u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC09D4C: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D4Cu); return; } g_debug_last_store_pc = 0xBFC09D4Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC09D50: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D50u); return; } g_debug_last_store_pc = 0xBFC09D50u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC09D54: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D54u); return; } g_debug_last_store_pc = 0xBFC09D54u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC09D58: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D58u); return; } g_debug_last_store_pc = 0xBFC09D58u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D5Cu); -#endif - /* 0xBFC09D5C: 8ED70004 lw $s7, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D5Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x400000u); } - PGXP_LOAD(0x8ED70004u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09D60: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC09D64: 24150010 addiu $s5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24150010u, cpu->gpr[21], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC09D68: 25EF9F20 addiu $t7, $t7, -24800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); - PGXP_ALU(0x25EF9F20u, cpu->gpr[15], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600000u); -#endif - /* 0xBFC09D6C: AED50018 sw $s5, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D6Cu); return; } g_debug_last_store_pc = 0xBFC09D6Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAED50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC09D70: 00C09021 addu $s2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC09D74: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC09D7C: 06E10002 bgez $s7, 0xBFC09D88 */ - uint32_t psx_brA_BFC09D7C = cpu->gpr[23]; - psx_taken_BFC09D7C = ((int32_t)psx_brA_BFC09D7C >= 0); - psx_delay_BFC09D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800003u); -#endif - /* 0xBFC09D80: 02E00821 addu $at, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D80u); -#endif - if (psx_delay_BFC09D7C) { - psx_delay_BFC09D7C = 0; - if (psx_taken_BFC09D7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D88u); - goto label_BFC09D88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09D84u); - } -label_BFC09D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09D84: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D84u); -#endif -label_BFC09D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800002u); -#endif - /* 0xBFC09D88: 0001B903 sra $s7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001B903u, cpu->gpr[23], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804000u); -#endif - /* 0xBFC09D8C: 00177080 sll $t6, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[14] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00177080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC09D90: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D94u); -#endif - /* 0xBFC09D94: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09D94u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09D98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC09D9C: 13000003 beq $t8, $zero, 0xBFC09DAC */ - uint32_t psx_brA_BFC09D9C = cpu->gpr[24]; uint32_t psx_brB_BFC09D9C = cpu->gpr[0]; - psx_taken_BFC09D9C = (psx_brA_BFC09D9C == psx_brB_BFC09D9C); - psx_delay_BFC09D9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09DA0u); -#endif - if (psx_delay_BFC09D9C) { - psx_delay_BFC09D9C = 0; - if (psx_taken_BFC09D9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DACu); - goto label_BFC09DAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DA4u); - } -label_BFC09DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DA4: 100000AE beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09DA4 = cpu->gpr[0]; uint32_t psx_brB_BFC09DA4 = cpu->gpr[0]; - psx_taken_BFC09DA4 = (psx_brA_BFC09DA4 == psx_brB_BFC09DA4); - psx_delay_BFC09DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09DA8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DA8u); -#endif - if (psx_delay_BFC09DA4) { - psx_delay_BFC09DA4 = 0; - if (psx_taken_BFC09DA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DACu); - } -label_BFC09DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09DAC: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC09DB4u; /* jal link before delay slot */ - psx_delay_BFC09DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC09DB0: AFA20050 sw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DB0u); return; } g_debug_last_store_pc = 0xBFC09DB0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DB0u); -#endif - if (psx_delay_BFC09DAC) { - psx_delay_BFC09DAC = 0; - cpu->gpr[31] = 0xBFC09DB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC09DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DB4u); -#endif - /* 0xBFC09DB4: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC09DBC: 3079007F andi $t9, $v1, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x7Fu; - PGXP_ALU(0x3079007Fu, cpu->gpr[25], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC09DC0: 13200005 beq $t9, $zero, 0xBFC09DD8 */ - uint32_t psx_brA_BFC09DC0 = cpu->gpr[25]; uint32_t psx_brB_BFC09DC0 = cpu->gpr[0]; - psx_taken_BFC09DC0 = (psx_brA_BFC09DC0 == psx_brB_BFC09DC0); - psx_delay_BFC09DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09DC4u); -#endif - if (psx_delay_BFC09DC0) { - psx_delay_BFC09DC0 = 0; - if (psx_taken_BFC09DC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DD8u); - goto label_BFC09DD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DC8u); - } -label_BFC09DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC09DC8: 24080016 addiu $t0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24080016u, cpu->gpr[8], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400100u); -#endif - /* 0xBFC09DCC: AEC80018 sw $t0, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DCCu); return; } g_debug_last_store_pc = 0xBFC09DCCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAEC80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DD0: 100000A3 beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09DD0 = cpu->gpr[0]; uint32_t psx_brB_BFC09DD0 = cpu->gpr[0]; - psx_taken_BFC09DD0 = (psx_brA_BFC09DD0 == psx_brB_BFC09DD0); - psx_delay_BFC09DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09DD4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DD4u); -#endif - if (psx_delay_BFC09DD0) { - psx_delay_BFC09DD0 = 0; - if (psx_taken_BFC09DD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DD8u); - } -label_BFC09DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DD8u); -#endif - /* 0xBFC09DD8: 8EC90020 lw $t1, 32($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DD8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x400000u); } - PGXP_LOAD(0x8EC90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Au); -#endif - /* 0xBFC09DE0: 0069082B sltu $at, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0069082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09DE4: 14200005 bne $at, $zero, 0xBFC09DFC */ - uint32_t psx_brA_BFC09DE4 = cpu->gpr[1]; uint32_t psx_brB_BFC09DE4 = cpu->gpr[0]; - psx_taken_BFC09DE4 = (psx_brA_BFC09DE4 != psx_brB_BFC09DE4); - psx_delay_BFC09DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09DE8u); -#endif - if (psx_delay_BFC09DE4) { - psx_delay_BFC09DE4 = 0; - if (psx_taken_BFC09DE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DFCu); - goto label_BFC09DFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DECu); - } -label_BFC09DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC09DEC: 240A0016 addiu $t2, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240A0016u, cpu->gpr[10], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400400u); -#endif - /* 0xBFC09DF0: AECA0018 sw $t2, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DF0u); return; } g_debug_last_store_pc = 0xBFC09DF0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAECA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09DF4: 1000009A beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09DF4 = cpu->gpr[0]; uint32_t psx_brB_BFC09DF4 = cpu->gpr[0]; - psx_taken_BFC09DF4 = (psx_brA_BFC09DF4 == psx_brB_BFC09DF4); - psx_delay_BFC09DF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09DF8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DF8u); -#endif - if (psx_delay_BFC09DF4) { - psx_delay_BFC09DF4 = 0; - if (psx_taken_BFC09DF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09DFCu); - } -label_BFC09DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC09DFC: AFB20060 sw $s2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09DFCu); return; } g_debug_last_store_pc = 0xBFC09DFCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20060u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC09E00: AFB10044 sw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E00u); return; } g_debug_last_store_pc = 0xBFC09E00u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC09E04: AFB30040 sw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E04u); return; } g_debug_last_store_pc = 0xBFC09E04u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E08u); -#endif - /* 0xBFC09E08: 8ECB0000 lw $t3, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E08u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x400000u); } - PGXP_LOAD(0x8ECB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC09E0C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC09E10: 316C8000 andi $t4, $t3, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8000u; - PGXP_ALU(0x316C8000u, cpu->gpr[12], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC09E14: 000389C2 srl $s1, $v1, 7 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[3] >> 7u; - PGXP_ALU(0x000389C2u, cpu->gpr[17], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC09E18: 06410002 bgez $s2, 0xBFC09E24 */ - uint32_t psx_brA_BFC09E18 = cpu->gpr[18]; - psx_taken_BFC09E18 = ((int32_t)psx_brA_BFC09E18 >= 0); - psx_delay_BFC09E18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40003u); -#endif - /* 0xBFC09E1C: 02400821 addu $at, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E1Cu); -#endif - if (psx_delay_BFC09E18) { - psx_delay_BFC09E18 = 0; - if (psx_taken_BFC09E18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E24u); - goto label_BFC09E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E20u); - } -label_BFC09E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09E20: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E20u); -#endif -label_BFC09E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC09E24: 000191C3 sra $s2, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000191C3u, cpu->gpr[18], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09E28: 34018000 ori $at, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34018000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC09E2C: 1581004E bne $t4, $at, 0xBFC09F68 */ - uint32_t psx_brA_BFC09E2C = cpu->gpr[12]; uint32_t psx_brB_BFC09E2C = cpu->gpr[1]; - psx_taken_BFC09E2C = (psx_brA_BFC09E2C != psx_brB_BFC09E2C); - psx_delay_BFC09E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09E30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09E30u); -#endif - if (psx_delay_BFC09E2C) { - psx_delay_BFC09E2C = 0; - if (psx_taken_BFC09E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F68u); - goto label_BFC09F68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E34u); - } -label_BFC09E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E34u); -#endif - /* 0xBFC09E34: 8FA20050 lw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09E38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E3Cu); -#endif - /* 0xBFC09E3C: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E3Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09E40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC09E44: 11A00005 beq $t5, $zero, 0xBFC09E5C */ - uint32_t psx_brA_BFC09E44 = cpu->gpr[13]; uint32_t psx_brB_BFC09E44 = cpu->gpr[0]; - psx_taken_BFC09E44 = (psx_brA_BFC09E44 == psx_brB_BFC09E44); - psx_delay_BFC09E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09E48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09E48u); -#endif - if (psx_delay_BFC09E44) { - psx_delay_BFC09E44 = 0; - if (psx_taken_BFC09E44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E5Cu); - goto label_BFC09E5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E4Cu); - } -label_BFC09E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E4Cu); -#endif - /* 0xBFC09E4C: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E4Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E50u); -#endif - /* 0xBFC09E50: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E50u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09E54: 10000082 beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09E54 = cpu->gpr[0]; uint32_t psx_brB_BFC09E54 = cpu->gpr[0]; - psx_taken_BFC09E54 = (psx_brA_BFC09E54 == psx_brB_BFC09E54); - psx_delay_BFC09E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09E58: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E58u); -#endif - if (psx_delay_BFC09E54) { - psx_delay_BFC09E54 = 0; - if (psx_taken_BFC09E54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09E5Cu); - } -label_BFC09E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09E5C: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E5Cu); return; } g_debug_last_store_pc = 0xBFC09E5Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC09E60: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC09E64: 27189F50 addiu $t8, $t8, -24752 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24752)); - PGXP_ALU(0x27189F50u, cpu->gpr[24], _pgx1, 0xFFFF9F50u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808000u); -#endif - /* 0xBFC09E68: 00177880 sll $t7, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[15] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00177880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC09E6C: 240E0002 addiu $t6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240E0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC09E70: 01F88021 addu $s0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800000u); -#endif - /* 0xBFC09E74: 0017C880 sll $t9, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[25] = cpu->gpr[23] << 2u; - PGXP_ALU(0x0017C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09E78: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC09E7C: AC4E0000 sw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E7Cu); return; } g_debug_last_store_pc = 0xBFC09E7Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC09E80: AE110000 sw $s1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E80u); return; } g_debug_last_store_pc = 0xBFC09E80u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAE110000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC09E84: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC09E88: AC329F58 sw $s2, -24744($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09E88u); return; } g_debug_last_store_pc = 0xBFC09E88u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC329F58u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09E8C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800100u); -#endif - /* 0xBFC09E90: 00174080 sll $t0, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[8] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC09E94: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC09E98: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC09E9C: 254A9F70 addiu $t2, $t2, -24720 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-24720)); - PGXP_ALU(0x254A9F70u, cpu->gpr[10], _pgx1, 0xFFFF9F70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800200u); -#endif - /* 0xBFC09EA0: 00174880 sll $t1, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[9] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC09EA4: AC349F78 sw $s4, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EA4u); return; } g_debug_last_store_pc = 0xBFC09EA4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAC349F78u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80600u); -#endif - /* 0xBFC09EA8: 012A9821 addu $s3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[19] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09EAC: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC09EB4u; /* jal link before delay slot */ - psx_delay_BFC09EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC09EB0: AE760000 sw $s6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EB0u); return; } g_debug_last_store_pc = 0xBFC09EB0u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAE760000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EB0u); -#endif - if (psx_delay_BFC09EAC) { - psx_delay_BFC09EAC = 0; - cpu->gpr[31] = 0xBFC09EB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC09EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC09EB4: 1640000D bne $s2, $zero, 0xBFC09EEC */ - uint32_t psx_brA_BFC09EB4 = cpu->gpr[18]; uint32_t psx_brB_BFC09EB4 = cpu->gpr[0]; - psx_taken_BFC09EB4 = (psx_brA_BFC09EB4 != psx_brB_BFC09EB4); - psx_delay_BFC09EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09EB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09EB8u); -#endif - if (psx_delay_BFC09EB4) { - psx_delay_BFC09EB4 = 0; - if (psx_taken_BFC09EB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09EECu); - goto label_BFC09EEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09EBCu); - } -label_BFC09EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC09EBC: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EBCu); return; } g_debug_last_store_pc = 0xBFC09EBCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC09EC0: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC09EC4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC09EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC09EC8: AC2BB9D0 sw $t3, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EC8u); return; } g_debug_last_store_pc = 0xBFC09EC8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BB9D0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09ECC: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09ED0: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC09ED8u; /* jal link before delay slot */ - psx_delay_BFC09ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC09ED4: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09ED4u); -#endif - if (psx_delay_BFC09ED0) { - psx_delay_BFC09ED0 = 0; - cpu->gpr[31] = 0xBFC09ED8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC09ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09ED8u); -#endif - /* 0xBFC09ED8: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09ED8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EDCu); -#endif - /* 0xBFC09EDC: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EDCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EE0u); -#endif - /* 0xBFC09EE0: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EE0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09EE4: 1000005E beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09EE4 = cpu->gpr[0]; uint32_t psx_brB_BFC09EE4 = cpu->gpr[0]; - psx_taken_BFC09EE4 = (psx_brA_BFC09EE4 == psx_brB_BFC09EE4); - psx_delay_BFC09EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09EE8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EE8u); -#endif - if (psx_delay_BFC09EE4) { - psx_delay_BFC09EE4 = 0; - if (psx_taken_BFC09EE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09EECu); - } -label_BFC09EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EECu); -#endif - /* 0xBFC09EEC: 8E6C0000 lw $t4, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80000u); } - PGXP_LOAD(0x8E6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EF0u); -#endif - /* 0xBFC09EF0: 8E060000 lw $a2, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EF0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E060000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EF4u); -#endif - /* 0xBFC09EF4: 8D850024 lw $a1, 36($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09EF4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x1000u); } - PGXP_LOAD(0x8D850024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09EF8: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC09F00u; /* jal link before delay slot */ - psx_delay_BFC09EF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09EFC: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09EFCu); -#endif - if (psx_delay_BFC09EF8) { - psx_delay_BFC09EF8 = 0; - cpu->gpr[31] = 0xBFC09F00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC09F00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC09F00: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09F04: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09F08: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC09F10u; /* jal link before delay slot */ - psx_delay_BFC09F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09F0C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F0Cu); -#endif - if (psx_delay_BFC09F08) { - psx_delay_BFC09F08 = 0; - cpu->gpr[31] = 0xBFC09F10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC09F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09F10: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09F14: 14410002 bne $v0, $at, 0xBFC09F20 */ - uint32_t psx_brA_BFC09F14 = cpu->gpr[2]; uint32_t psx_brB_BFC09F14 = cpu->gpr[1]; - psx_taken_BFC09F14 = (psx_brA_BFC09F14 != psx_brB_BFC09F14); - psx_delay_BFC09F14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09F18: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F18u); -#endif - if (psx_delay_BFC09F14) { - psx_delay_BFC09F14 = 0; - if (psx_taken_BFC09F14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F20u); - goto label_BFC09F20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F1Cu); - } -label_BFC09F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC09F1C: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F1Cu); -#endif -label_BFC09F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F20u); -#endif - /* 0xBFC09F20: 8EC40004 lw $a0, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F20u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } - PGXP_LOAD(0x8EC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600000u); -#endif - /* 0xBFC09F24: AED50018 sw $s5, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F24u); return; } g_debug_last_store_pc = 0xBFC09F24u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAED50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09F28: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC09F30u; /* jal link before delay slot */ - psx_delay_BFC09F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC09F2C: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F2Cu); -#endif - if (psx_delay_BFC09F28) { - psx_delay_BFC09F28 = 0; - cpu->gpr[31] = 0xBFC09F30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC09F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09F30: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC09F34: 10410006 beq $v0, $at, 0xBFC09F50 */ - uint32_t psx_brA_BFC09F34 = cpu->gpr[2]; uint32_t psx_brB_BFC09F34 = cpu->gpr[1]; - psx_taken_BFC09F34 = (psx_brA_BFC09F34 == psx_brB_BFC09F34); - psx_delay_BFC09F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09F38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09F38u); -#endif - if (psx_delay_BFC09F34) { - psx_delay_BFC09F34 = 0; - if (psx_taken_BFC09F34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F50u); - goto label_BFC09F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F3Cu); - } -label_BFC09F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F3Cu); -#endif - /* 0xBFC09F3C: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F3Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F40u); -#endif - /* 0xBFC09F40: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F40u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F44u); -#endif - /* 0xBFC09F44: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F44u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09F48: 10000045 beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09F48 = cpu->gpr[0]; uint32_t psx_brB_BFC09F48 = cpu->gpr[0]; - psx_taken_BFC09F48 = (psx_brA_BFC09F48 == psx_brB_BFC09F48); - psx_delay_BFC09F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09F4C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F4Cu); -#endif - if (psx_delay_BFC09F48) { - psx_delay_BFC09F48 = 0; - if (psx_taken_BFC09F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F50u); - } -label_BFC09F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC09F50: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F50u); return; } g_debug_last_store_pc = 0xBFC09F50u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F54u); -#endif - /* 0xBFC09F54: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F54u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F58u); -#endif - /* 0xBFC09F58: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F58u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F5Cu); -#endif - /* 0xBFC09F5C: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F5Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09F60: 1000003F beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC09F60 = cpu->gpr[0]; uint32_t psx_brB_BFC09F60 = cpu->gpr[0]; - psx_taken_BFC09F60 = (psx_brA_BFC09F60 == psx_brB_BFC09F60); - psx_delay_BFC09F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC09F64: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F64u); -#endif - if (psx_delay_BFC09F60) { - psx_delay_BFC09F60 = 0; - if (psx_taken_BFC09F60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F68u); - } -label_BFC09F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC09F68: 1A400028 blez $s2, 0xBFC0A00C */ - uint32_t psx_brA_BFC09F68 = cpu->gpr[18]; - psx_taken_BFC09F68 = ((int32_t)psx_brA_BFC09F68 <= 0); - psx_delay_BFC09F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC09F6C: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F6Cu); -#endif - if (psx_delay_BFC09F68) { - psx_delay_BFC09F68 = 0; - if (psx_taken_BFC09F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A00Cu); - goto label_BFC0A00C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F70u); - } -label_BFC09F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC09F70: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09F70u); return; } g_debug_last_store_pc = 0xBFC09F70u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC09F74: 24150040 addiu $s5, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24150040u, cpu->gpr[21], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F74u); -#endif -label_BFC09F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC09F78: 06210004 bgez $s1, 0xBFC09F8C */ - uint32_t psx_brA_BFC09F78 = cpu->gpr[17]; - psx_taken_BFC09F78 = ((int32_t)psx_brA_BFC09F78 >= 0); - psx_delay_BFC09F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC09F7C: 322D003F andi $t5, $s1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] & 0x3Fu; - PGXP_ALU(0x322D003Fu, cpu->gpr[13], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F7Cu); -#endif - if (psx_delay_BFC09F78) { - psx_delay_BFC09F78 = 0; - if (psx_taken_BFC09F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F8Cu); - goto label_BFC09F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F80u); - } -label_BFC09F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC09F80: 11A00002 beq $t5, $zero, 0xBFC09F8C */ - uint32_t psx_brA_BFC09F80 = cpu->gpr[13]; uint32_t psx_brB_BFC09F80 = cpu->gpr[0]; - psx_taken_BFC09F80 = (psx_brA_BFC09F80 == psx_brB_BFC09F80); - psx_delay_BFC09F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09F84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC09F84u); -#endif - if (psx_delay_BFC09F80) { - psx_delay_BFC09F80 = 0; - if (psx_taken_BFC09F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F8Cu); - goto label_BFC09F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F88u); - } -label_BFC09F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC09F88: 25ADFFC0 addiu $t5, $t5, -64 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-64)); - PGXP_ALU(0x25ADFFC0u, cpu->gpr[13], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F88u); -#endif -label_BFC09F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202004u); -#endif - /* 0xBFC09F8C: 02AD1023 subu $v0, $s5, $t5 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[21] - cpu->gpr[13]; - PGXP_ALU(0x02AD1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40006u); -#endif - /* 0xBFC09F90: 0052082A slt $at, $v0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0052082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC09F94: 10200004 beq $at, $zero, 0xBFC09FA8 */ - uint32_t psx_brA_BFC09F94 = cpu->gpr[1]; uint32_t psx_brB_BFC09F94 = cpu->gpr[0]; - psx_taken_BFC09F94 = (psx_brA_BFC09F94 == psx_brB_BFC09F94); - psx_delay_BFC09F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC09F98: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09F98u); -#endif - if (psx_delay_BFC09F94) { - psx_delay_BFC09F94 = 0; - if (psx_taken_BFC09F94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FA8u); - goto label_BFC09FA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F9Cu); - } -label_BFC09F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09F9C: 10000002 beq $zero, $zero, 0xBFC09FA8 */ - uint32_t psx_brA_BFC09F9C = cpu->gpr[0]; uint32_t psx_brB_BFC09F9C = cpu->gpr[0]; - psx_taken_BFC09F9C = (psx_brA_BFC09F9C == psx_brB_BFC09F9C); - psx_delay_BFC09F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC09FA0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FA0u); -#endif - if (psx_delay_BFC09F9C) { - psx_delay_BFC09F9C = 0; - if (psx_taken_BFC09F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FA8u); - goto label_BFC09FA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FA4u); - } -label_BFC09FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC09FA4: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FA4u); -#endif -label_BFC09FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FA8u); -#endif - /* 0xBFC09FA8: 8EC50024 lw $a1, 36($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09FA8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x400000u); } - PGXP_LOAD(0x8EC50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC09FAC: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09FB0: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC09FB8u; /* jal link before delay slot */ - psx_delay_BFC09FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC09FB4: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FB4u); -#endif - if (psx_delay_BFC09FB0) { - psx_delay_BFC09FB0 = 0; - cpu->gpr[31] = 0xBFC09FB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC09FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FB8u); -#endif - /* 0xBFC09FB8: 8EC40004 lw $a0, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09FB8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } - PGXP_LOAD(0x8EC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC09FBC: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC09FC0: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC09FC4: 0FF02473 jal 0xBFC091CC */ - cpu->gpr[31] = 0xBFC09FCCu; /* jal link before delay slot */ - psx_delay_BFC09FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC09FC8: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FC8u); -#endif - if (psx_delay_BFC09FC4) { - psx_delay_BFC09FC4 = 0; - cpu->gpr[31] = 0xBFC09FCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC091CCu); - cpu->pc = 0xBFC091CCu; return; - } -label_BFC09FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC09FCC: 001019C0 sll $v1, $s0, 7 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[16] << 7u; - PGXP_ALU(0x001019C0u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC09FD0: 10430006 beq $v0, $v1, 0xBFC09FEC */ - uint32_t psx_brA_BFC09FD0 = cpu->gpr[2]; uint32_t psx_brB_BFC09FD0 = cpu->gpr[3]; - psx_taken_BFC09FD0 = (psx_brA_BFC09FD0 == psx_brB_BFC09FD0); - psx_delay_BFC09FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC09FD4: 02509023 subu $s2, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[16]; - PGXP_ALU(0x02509023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FD4u); -#endif - if (psx_delay_BFC09FD0) { - psx_delay_BFC09FD0 = 0; - if (psx_taken_BFC09FD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FECu); - goto label_BFC09FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FD8u); - } -label_BFC09FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FD8u); -#endif - /* 0xBFC09FD8: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09FD8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FDCu); -#endif - /* 0xBFC09FDC: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09FDCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC09FE0: 1000000A beq $zero, $zero, 0xBFC0A00C */ - uint32_t psx_brA_BFC09FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC09FE0 = cpu->gpr[0]; - psx_taken_BFC09FE0 = (psx_brA_BFC09FE0 == psx_brB_BFC09FE0); - psx_delay_BFC09FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC09FE4: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FE4u); -#endif - if (psx_delay_BFC09FE0) { - psx_delay_BFC09FE0 = 0; - if (psx_taken_BFC09FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A00Cu); - goto label_BFC0A00C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FE8u); - } -label_BFC09FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC09FE8: 02509023 subu $s2, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[16]; - PGXP_ALU(0x02509023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FE8u); -#endif -label_BFC09FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC09FEC: 02308821 addu $s1, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[16]; - PGXP_ALU(0x02308821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC09FF0: 0283A021 addu $s4, $s4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[3]; - PGXP_ALU(0x0283A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC09FF4: 1E40FFE0 bgtz $s2, 0xBFC09F78 */ - uint32_t psx_brA_BFC09FF4 = cpu->gpr[18]; - psx_taken_BFC09FF4 = ((int32_t)psx_brA_BFC09FF4 > 0); - psx_delay_BFC09FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC09FF8: 02709821 addu $s3, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02709821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FF8u); -#endif - if (psx_delay_BFC09FF4) { - psx_delay_BFC09FF4 = 0; - if (psx_taken_BFC09FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09F78u); - goto label_BFC09F78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09FFCu); - } -label_BFC09FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC09FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC09FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC09FFCu); -#endif - /* 0xBFC09FFC: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09FFCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC09FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A000u); -#endif - /* 0xBFC0A000: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A000u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A004: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC0A008: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A008u); -#endif -label_BFC0A00C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A00Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400Cu); -#endif - /* 0xBFC0A00C: 00627021 addu $t6, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00627021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC0A010: AECE0010 sw $t6, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A010u); return; } g_debug_last_store_pc = 0xBFC0A010u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAECE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0A014: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A014u); return; } g_debug_last_store_pc = 0xBFC0A014u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A018u); -#endif - /* 0xBFC0A018: 8FAF0050 lw $t7, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A018u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0050u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A01C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0A020: ADE00000 sw $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A020u); return; } g_debug_last_store_pc = 0xBFC0A020u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A024u); -#endif - /* 0xBFC0A024: 8FB80060 lw $t8, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A024u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80060u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC0A02C: 17020006 bne $t8, $v0, 0xBFC0A048 */ - uint32_t psx_brA_BFC0A02C = cpu->gpr[24]; uint32_t psx_brB_BFC0A02C = cpu->gpr[2]; - psx_taken_BFC0A02C = (psx_brA_BFC0A02C != psx_brB_BFC0A02C); - psx_delay_BFC0A02C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800000u); -#endif - /* 0xBFC0A030: 0017C880 sll $t9, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[25] = cpu->gpr[23] << 2u; - PGXP_ALU(0x0017C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A030u); -#endif - if (psx_delay_BFC0A02C) { - psx_delay_BFC0A02C = 0; - if (psx_taken_BFC0A02C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A048u); - goto label_BFC0A048; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A034u); - } -label_BFC0A034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A034u); -#endif - /* 0xBFC0A034: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A034u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A038u); -#endif - /* 0xBFC0A038: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A038u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A03C: 10000008 beq $zero, $zero, 0xBFC0A060 */ - uint32_t psx_brA_BFC0A03C = cpu->gpr[0]; uint32_t psx_brB_BFC0A03C = cpu->gpr[0]; - psx_taken_BFC0A03C = (psx_brA_BFC0A03C == psx_brB_BFC0A03C); - psx_delay_BFC0A03C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000005u); -#endif - /* 0xBFC0A040: 03001021 addu $v0, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A040u); -#endif - if (psx_delay_BFC0A03C) { - psx_delay_BFC0A03C = 0; - if (psx_taken_BFC0A03C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A060u); - goto label_BFC0A060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A044u); - } -label_BFC0A044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800000u); -#endif - /* 0xBFC0A044: 0017C880 sll $t9, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[25] = cpu->gpr[23] << 2u; - PGXP_ALU(0x0017C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A044u); -#endif -label_BFC0A048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0A048: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0A04C: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A050u); -#endif - /* 0xBFC0A050: 8C429F80 lw $v0, -24704($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24704; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A050u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A054u); -#endif - /* 0xBFC0A054: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A054u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A058u); -#endif - /* 0xBFC0A058: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A058u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A05C: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A05Cu); -#endif -label_BFC0A060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A060u); -#endif - /* 0xBFC0A060: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A060u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A064u); -#endif - /* 0xBFC0A064: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A064u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A068u); -#endif - /* 0xBFC0A068: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A068u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A06Cu); -#endif - /* 0xBFC0A06C: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A06Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A070u); -#endif - /* 0xBFC0A070: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A070u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A074u); -#endif - /* 0xBFC0A074: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A074u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A078: 03E00008 jr $ra */ - psx_delay_BFC0A078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A07C: 27BD0078 addiu $sp, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27BD0078u, cpu->gpr[29], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A07Cu); -#endif - if (psx_delay_BFC0A078) { - psx_delay_BFC0A078 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A080(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A080u); - int psx_delay_BFC0A0C0 = 0; - int psx_taken_BFC0A0C0 = 0; - int psx_delay_BFC0A0E0 = 0; - int psx_taken_BFC0A0E0 = 0; - int psx_delay_BFC0A0E8 = 0; - int psx_taken_BFC0A0E8 = 0; - int psx_delay_BFC0A0F0 = 0; - int psx_delay_BFC0A104 = 0; - int psx_taken_BFC0A104 = 0; - int psx_delay_BFC0A114 = 0; - int psx_taken_BFC0A114 = 0; - int psx_delay_BFC0A128 = 0; - int psx_taken_BFC0A128 = 0; - int psx_delay_BFC0A138 = 0; - int psx_taken_BFC0A138 = 0; - int psx_delay_BFC0A15C = 0; - int psx_taken_BFC0A15C = 0; - int psx_delay_BFC0A170 = 0; - int psx_taken_BFC0A170 = 0; - int psx_delay_BFC0A188 = 0; - int psx_taken_BFC0A188 = 0; - int psx_delay_BFC0A198 = 0; - int psx_taken_BFC0A198 = 0; - int psx_delay_BFC0A1F0 = 0; - int psx_delay_BFC0A1F8 = 0; - int psx_taken_BFC0A1F8 = 0; - int psx_delay_BFC0A214 = 0; - int psx_delay_BFC0A228 = 0; - int psx_taken_BFC0A228 = 0; - int psx_delay_BFC0A23C = 0; - int psx_delay_BFC0A24C = 0; - int psx_delay_BFC0A258 = 0; - int psx_taken_BFC0A258 = 0; - int psx_delay_BFC0A27C = 0; - int psx_delay_BFC0A288 = 0; - int psx_taken_BFC0A288 = 0; - int psx_delay_BFC0A29C = 0; - int psx_taken_BFC0A29C = 0; - int psx_delay_BFC0A2B4 = 0; - int psx_taken_BFC0A2B4 = 0; - int psx_delay_BFC0A2BC = 0; - int psx_taken_BFC0A2BC = 0; - int psx_delay_BFC0A2CC = 0; - int psx_taken_BFC0A2CC = 0; - int psx_delay_BFC0A2D4 = 0; - int psx_taken_BFC0A2D4 = 0; - int psx_delay_BFC0A2E8 = 0; - int psx_taken_BFC0A2E8 = 0; - int psx_delay_BFC0A2F0 = 0; - int psx_taken_BFC0A2F0 = 0; - int psx_delay_BFC0A304 = 0; - int psx_delay_BFC0A318 = 0; - int psx_delay_BFC0A324 = 0; - int psx_taken_BFC0A324 = 0; - int psx_delay_BFC0A334 = 0; - int psx_taken_BFC0A334 = 0; - int psx_delay_BFC0A348 = 0; - int psx_taken_BFC0A348 = 0; - int psx_delay_BFC0A380 = 0; - int psx_taken_BFC0A380 = 0; - int psx_delay_BFC0A390 = 0; - int psx_taken_BFC0A390 = 0; - int psx_delay_BFC0A3CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A0C8u: goto label_BFC0A0C8; - case 0xBFC0A0CCu: goto label_BFC0A0CC; - case 0xBFC0A0E8u: goto label_BFC0A0E8; - case 0xBFC0A0F0u: goto label_BFC0A0F0; - case 0xBFC0A0F8u: goto label_BFC0A0F8; - case 0xBFC0A10Cu: goto label_BFC0A10C; - case 0xBFC0A11Cu: goto label_BFC0A11C; - case 0xBFC0A130u: goto label_BFC0A130; - case 0xBFC0A140u: goto label_BFC0A140; - case 0xBFC0A164u: goto label_BFC0A164; - case 0xBFC0A168u: goto label_BFC0A168; - case 0xBFC0A178u: goto label_BFC0A178; - case 0xBFC0A190u: goto label_BFC0A190; - case 0xBFC0A1A0u: goto label_BFC0A1A0; - case 0xBFC0A1F8u: goto label_BFC0A1F8; - case 0xBFC0A200u: goto label_BFC0A200; - case 0xBFC0A21Cu: goto label_BFC0A21C; - case 0xBFC0A230u: goto label_BFC0A230; - case 0xBFC0A244u: goto label_BFC0A244; - case 0xBFC0A254u: goto label_BFC0A254; - case 0xBFC0A260u: goto label_BFC0A260; - case 0xBFC0A264u: goto label_BFC0A264; - case 0xBFC0A284u: goto label_BFC0A284; - case 0xBFC0A290u: goto label_BFC0A290; - case 0xBFC0A2A4u: goto label_BFC0A2A4; - case 0xBFC0A2BCu: goto label_BFC0A2BC; - case 0xBFC0A2C4u: goto label_BFC0A2C4; - case 0xBFC0A2CCu: goto label_BFC0A2CC; - case 0xBFC0A2D4u: goto label_BFC0A2D4; - case 0xBFC0A2DCu: goto label_BFC0A2DC; - case 0xBFC0A2E0u: goto label_BFC0A2E0; - case 0xBFC0A2F0u: goto label_BFC0A2F0; - case 0xBFC0A2F8u: goto label_BFC0A2F8; - case 0xBFC0A2FCu: goto label_BFC0A2FC; - case 0xBFC0A30Cu: goto label_BFC0A30C; - case 0xBFC0A320u: goto label_BFC0A320; - case 0xBFC0A32Cu: goto label_BFC0A32C; - case 0xBFC0A33Cu: goto label_BFC0A33C; - case 0xBFC0A340u: goto label_BFC0A340; - case 0xBFC0A350u: goto label_BFC0A350; - case 0xBFC0A360u: goto label_BFC0A360; - case 0xBFC0A388u: goto label_BFC0A388; - case 0xBFC0A398u: goto label_BFC0A398; - case 0xBFC0A39Cu: goto label_BFC0A39C; - case 0xBFC0A3B4u: goto label_BFC0A3B4; - default: break; - } - } -label_BFC0A080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A080: 27BDFF88 addiu $sp, $sp, -120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-120)); - PGXP_ALU(0x27BDFF88u, cpu->gpr[29], _pgx1, 0xFFFFFF88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC0A084: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A084u); return; } g_debug_last_store_pc = 0xBFC0A084u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC0A088: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0A08C: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A08Cu); return; } g_debug_last_store_pc = 0xBFC0A08Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC0A090: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A090u); return; } g_debug_last_store_pc = 0xBFC0A090u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC0A094: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A094u); return; } g_debug_last_store_pc = 0xBFC0A094u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0A098: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A098u); return; } g_debug_last_store_pc = 0xBFC0A098u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0A09C: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A09Cu); return; } g_debug_last_store_pc = 0xBFC0A09Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0A0u); -#endif - /* 0xBFC0A0A0: 8ED70004 lw $s7, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A0A0u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x400000u); } - PGXP_LOAD(0x8ED70004u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A0A4: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0A0A8: 24150010 addiu $s5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24150010u, cpu->gpr[21], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A0AC: 25EF9F20 addiu $t7, $t7, -24800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); - PGXP_ALU(0x25EF9F20u, cpu->gpr[15], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600000u); -#endif - /* 0xBFC0A0B0: AED50018 sw $s5, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A0B0u); return; } g_debug_last_store_pc = 0xBFC0A0B0u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAED50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC0A0B4: 00C09021 addu $s2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC0A0B8: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A0BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC0A0C0: 06E10002 bgez $s7, 0xBFC0A0CC */ - uint32_t psx_brA_BFC0A0C0 = cpu->gpr[23]; - psx_taken_BFC0A0C0 = ((int32_t)psx_brA_BFC0A0C0 >= 0); - psx_delay_BFC0A0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800003u); -#endif - /* 0xBFC0A0C4: 02E00821 addu $at, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0C4u); -#endif - if (psx_delay_BFC0A0C0) { - psx_delay_BFC0A0C0 = 0; - if (psx_taken_BFC0A0C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A0CCu); - goto label_BFC0A0CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A0C8u); - } -label_BFC0A0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A0C8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0C8u); -#endif -label_BFC0A0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800002u); -#endif - /* 0xBFC0A0CC: 0001B903 sra $s7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001B903u, cpu->gpr[23], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804000u); -#endif - /* 0xBFC0A0D0: 00177080 sll $t6, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[14] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00177080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC0A0D4: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0D8u); -#endif - /* 0xBFC0A0D8: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A0D8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A0DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0A0E0: 13000003 beq $t8, $zero, 0xBFC0A0F0 */ - uint32_t psx_brA_BFC0A0E0 = cpu->gpr[24]; uint32_t psx_brB_BFC0A0E0 = cpu->gpr[0]; - psx_taken_BFC0A0E0 = (psx_brA_BFC0A0E0 == psx_brB_BFC0A0E0); - psx_delay_BFC0A0E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A0E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0E4u); -#endif - if (psx_delay_BFC0A0E0) { - psx_delay_BFC0A0E0 = 0; - if (psx_taken_BFC0A0E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A0F0u); - goto label_BFC0A0F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A0E8u); - } -label_BFC0A0E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A0E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A0E8: 100000B2 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A0E8 = cpu->gpr[0]; uint32_t psx_brB_BFC0A0E8 = cpu->gpr[0]; - psx_taken_BFC0A0E8 = (psx_brA_BFC0A0E8 == psx_brB_BFC0A0E8); - psx_delay_BFC0A0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A0EC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0ECu); -#endif - if (psx_delay_BFC0A0E8) { - psx_delay_BFC0A0E8 = 0; - if (psx_taken_BFC0A0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A0F0u); - } -label_BFC0A0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A0F0: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0A0F8u; /* jal link before delay slot */ - psx_delay_BFC0A0F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0A0F4: AFA20050 sw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A0F4u); return; } g_debug_last_store_pc = 0xBFC0A0F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0F4u); -#endif - if (psx_delay_BFC0A0F0) { - psx_delay_BFC0A0F0 = 0; - cpu->gpr[31] = 0xBFC0A0F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0A0F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A0F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0F8u); -#endif - /* 0xBFC0A0F8: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A0F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A0FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0A100: 3079007F andi $t9, $v1, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x7Fu; - PGXP_ALU(0x3079007Fu, cpu->gpr[25], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0A104: 13200005 beq $t9, $zero, 0xBFC0A11C */ - uint32_t psx_brA_BFC0A104 = cpu->gpr[25]; uint32_t psx_brB_BFC0A104 = cpu->gpr[0]; - psx_taken_BFC0A104 = (psx_brA_BFC0A104 == psx_brB_BFC0A104); - psx_delay_BFC0A104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A108: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A108u); -#endif - if (psx_delay_BFC0A104) { - psx_delay_BFC0A104 = 0; - if (psx_taken_BFC0A104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A11Cu); - goto label_BFC0A11C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A10Cu); - } -label_BFC0A10C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A10Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0A10C: 24080016 addiu $t0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24080016u, cpu->gpr[8], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400100u); -#endif - /* 0xBFC0A110: AEC80018 sw $t0, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A110u); return; } g_debug_last_store_pc = 0xBFC0A110u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAEC80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A114: 100000A7 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A114 = cpu->gpr[0]; uint32_t psx_brB_BFC0A114 = cpu->gpr[0]; - psx_taken_BFC0A114 = (psx_brA_BFC0A114 == psx_brB_BFC0A114); - psx_delay_BFC0A114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A118: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A118u); -#endif - if (psx_delay_BFC0A114) { - psx_delay_BFC0A114 = 0; - if (psx_taken_BFC0A114) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A11Cu); - } -label_BFC0A11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A11Cu); -#endif - /* 0xBFC0A11C: 8EC90020 lw $t1, 32($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A11Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x400000u); } - PGXP_LOAD(0x8EC90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A120: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Au); -#endif - /* 0xBFC0A124: 0069082B sltu $at, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0069082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A128: 14200005 bne $at, $zero, 0xBFC0A140 */ - uint32_t psx_brA_BFC0A128 = cpu->gpr[1]; uint32_t psx_brB_BFC0A128 = cpu->gpr[0]; - psx_taken_BFC0A128 = (psx_brA_BFC0A128 != psx_brB_BFC0A128); - psx_delay_BFC0A128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A12C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A12Cu); -#endif - if (psx_delay_BFC0A128) { - psx_delay_BFC0A128 = 0; - if (psx_taken_BFC0A128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A140u); - goto label_BFC0A140; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A130u); - } -label_BFC0A130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0A130: 240A0016 addiu $t2, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240A0016u, cpu->gpr[10], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400400u); -#endif - /* 0xBFC0A134: AECA0018 sw $t2, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A134u); return; } g_debug_last_store_pc = 0xBFC0A134u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAECA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A138: 1000009E beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A138 = cpu->gpr[0]; uint32_t psx_brB_BFC0A138 = cpu->gpr[0]; - psx_taken_BFC0A138 = (psx_brA_BFC0A138 == psx_brB_BFC0A138); - psx_delay_BFC0A138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A13C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A13Cu); -#endif - if (psx_delay_BFC0A138) { - psx_delay_BFC0A138 = 0; - if (psx_taken_BFC0A138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A140u); - } -label_BFC0A140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0A140: AFB20060 sw $s2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A140u); return; } g_debug_last_store_pc = 0xBFC0A140u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20060u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0A144: AFB10044 sw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A144u); return; } g_debug_last_store_pc = 0xBFC0A144u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0A148: AFB30040 sw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A148u); return; } g_debug_last_store_pc = 0xBFC0A148u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A14Cu); -#endif - /* 0xBFC0A14C: 8ECB0000 lw $t3, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A14Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x400000u); } - PGXP_LOAD(0x8ECB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0A150: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0A154: 316C8000 andi $t4, $t3, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x8000u; - PGXP_ALU(0x316C8000u, cpu->gpr[12], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC0A158: 000389C2 srl $s1, $v1, 7 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[3] >> 7u; - PGXP_ALU(0x000389C2u, cpu->gpr[17], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0A15C: 06410002 bgez $s2, 0xBFC0A168 */ - uint32_t psx_brA_BFC0A15C = cpu->gpr[18]; - psx_taken_BFC0A15C = ((int32_t)psx_brA_BFC0A15C >= 0); - psx_delay_BFC0A15C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40003u); -#endif - /* 0xBFC0A160: 02400821 addu $at, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A160u); -#endif - if (psx_delay_BFC0A15C) { - psx_delay_BFC0A15C = 0; - if (psx_taken_BFC0A15C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A168u); - goto label_BFC0A168; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A164u); - } -label_BFC0A164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A164: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A164u); -#endif -label_BFC0A168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC0A168: 000191C3 sra $s2, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000191C3u, cpu->gpr[18], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A16C: 34018000 ori $at, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34018000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC0A170: 15810052 bne $t4, $at, 0xBFC0A2BC */ - uint32_t psx_brA_BFC0A170 = cpu->gpr[12]; uint32_t psx_brB_BFC0A170 = cpu->gpr[1]; - psx_taken_BFC0A170 = (psx_brA_BFC0A170 != psx_brB_BFC0A170); - psx_delay_BFC0A170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A174u); -#endif - if (psx_delay_BFC0A170) { - psx_delay_BFC0A170 = 0; - if (psx_taken_BFC0A170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2BCu); - goto label_BFC0A2BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A178u); - } -label_BFC0A178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A178u); -#endif - /* 0xBFC0A178: 8FA20050 lw $v0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A178u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20050u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A17C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A180u); -#endif - /* 0xBFC0A180: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A180u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0A188: 11A00005 beq $t5, $zero, 0xBFC0A1A0 */ - uint32_t psx_brA_BFC0A188 = cpu->gpr[13]; uint32_t psx_brB_BFC0A188 = cpu->gpr[0]; - psx_taken_BFC0A188 = (psx_brA_BFC0A188 == psx_brB_BFC0A188); - psx_delay_BFC0A188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A18C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A18Cu); -#endif - if (psx_delay_BFC0A188) { - psx_delay_BFC0A188 = 0; - if (psx_taken_BFC0A188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A1A0u); - goto label_BFC0A1A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A190u); - } -label_BFC0A190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A190u); -#endif - /* 0xBFC0A190: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A190u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A194u); -#endif - /* 0xBFC0A194: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A194u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A198: 10000086 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A198 = cpu->gpr[0]; uint32_t psx_brB_BFC0A198 = cpu->gpr[0]; - psx_taken_BFC0A198 = (psx_brA_BFC0A198 == psx_brB_BFC0A198); - psx_delay_BFC0A198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A19C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A19Cu); -#endif - if (psx_delay_BFC0A198) { - psx_delay_BFC0A198 = 0; - if (psx_taken_BFC0A198) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A1A0u); - } -label_BFC0A1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0A1A0: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1A0u); return; } g_debug_last_store_pc = 0xBFC0A1A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0A1A4: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0A1A8: 27189F50 addiu $t8, $t8, -24752 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24752)); - PGXP_ALU(0x27189F50u, cpu->gpr[24], _pgx1, 0xFFFF9F50u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808000u); -#endif - /* 0xBFC0A1AC: 00177880 sll $t7, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[15] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00177880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0A1B0: 240E0003 addiu $t6, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240E0003u, cpu->gpr[14], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC0A1B4: 01F88021 addu $s0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800000u); -#endif - /* 0xBFC0A1B8: 0017C880 sll $t9, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[25] = cpu->gpr[23] << 2u; - PGXP_ALU(0x0017C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A1BC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0A1C0: AC4E0000 sw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1C0u); return; } g_debug_last_store_pc = 0xBFC0A1C0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0A1C4: AE110000 sw $s1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1C4u); return; } g_debug_last_store_pc = 0xBFC0A1C4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAE110000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0A1C8: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC0A1CC: AC329F58 sw $s2, -24744($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1CCu); return; } g_debug_last_store_pc = 0xBFC0A1CCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC329F58u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A1D0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800100u); -#endif - /* 0xBFC0A1D4: 00174080 sll $t0, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[8] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0A1D8: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0A1DC: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0A1E0: 254A9F70 addiu $t2, $t2, -24720 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-24720)); - PGXP_ALU(0x254A9F70u, cpu->gpr[10], _pgx1, 0xFFFF9F70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800200u); -#endif - /* 0xBFC0A1E4: 00174880 sll $t1, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[9] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC0A1E8: AC349F78 sw $s4, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1E8u); return; } g_debug_last_store_pc = 0xBFC0A1E8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAC349F78u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80600u); -#endif - /* 0xBFC0A1EC: 012A9821 addu $s3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[19] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A1F0: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0A1F8u; /* jal link before delay slot */ - psx_delay_BFC0A1F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC0A1F4: AE760000 sw $s6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A1F4u); return; } g_debug_last_store_pc = 0xBFC0A1F4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAE760000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1F4u); -#endif - if (psx_delay_BFC0A1F0) { - psx_delay_BFC0A1F0 = 0; - cpu->gpr[31] = 0xBFC0A1F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0A1F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A1F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC0A1F8: 1640000D bne $s2, $zero, 0xBFC0A230 */ - uint32_t psx_brA_BFC0A1F8 = cpu->gpr[18]; uint32_t psx_brB_BFC0A1F8 = cpu->gpr[0]; - psx_taken_BFC0A1F8 = (psx_brA_BFC0A1F8 != psx_brB_BFC0A1F8); - psx_delay_BFC0A1F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A1FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A1FCu); -#endif - if (psx_delay_BFC0A1F8) { - psx_delay_BFC0A1F8 = 0; - if (psx_taken_BFC0A1F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A230u); - goto label_BFC0A230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A200u); - } -label_BFC0A200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0A200: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A200u); return; } g_debug_last_store_pc = 0xBFC0A200u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0A204: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A208: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0A20C: AC2BB9D0 sw $t3, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A20Cu); return; } g_debug_last_store_pc = 0xBFC0A20Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BB9D0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC0A210: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A214: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0A21Cu; /* jal link before delay slot */ - psx_delay_BFC0A214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0A218: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A218u); -#endif - if (psx_delay_BFC0A214) { - psx_delay_BFC0A214 = 0; - cpu->gpr[31] = 0xBFC0A21Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0A21C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A21Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A21Cu); -#endif - /* 0xBFC0A21C: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A21Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A220u); -#endif - /* 0xBFC0A220: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A220u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A224u); -#endif - /* 0xBFC0A224: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A224u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A228: 10000062 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A228 = cpu->gpr[0]; uint32_t psx_brB_BFC0A228 = cpu->gpr[0]; - psx_taken_BFC0A228 = (psx_brA_BFC0A228 == psx_brB_BFC0A228); - psx_delay_BFC0A228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A22C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A22Cu); -#endif - if (psx_delay_BFC0A228) { - psx_delay_BFC0A228 = 0; - if (psx_taken_BFC0A228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A230u); - } -label_BFC0A230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A230u); -#endif - /* 0xBFC0A230: 8E6C0000 lw $t4, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A230u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80000u); } - PGXP_LOAD(0x8E6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A234u); -#endif - /* 0xBFC0A234: 8E060000 lw $a2, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A234u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E060000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A238u); -#endif - /* 0xBFC0A238: 8D850024 lw $a1, 36($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A238u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x1000u); } - PGXP_LOAD(0x8D850024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A23C: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC0A244u; /* jal link before delay slot */ - psx_delay_BFC0A23C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC0A240: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A240u); -#endif - if (psx_delay_BFC0A23C) { - psx_delay_BFC0A23C = 0; - cpu->gpr[31] = 0xBFC0A244u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC0A244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0A244: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC0A248: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A24C: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC0A254u; /* jal link before delay slot */ - psx_delay_BFC0A24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0A250: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A250u); -#endif - if (psx_delay_BFC0A24C) { - psx_delay_BFC0A24C = 0; - cpu->gpr[31] = 0xBFC0A254u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC0A254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A254: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0A258: 14410002 bne $v0, $at, 0xBFC0A264 */ - uint32_t psx_brA_BFC0A258 = cpu->gpr[2]; uint32_t psx_brB_BFC0A258 = cpu->gpr[1]; - psx_taken_BFC0A258 = (psx_brA_BFC0A258 != psx_brB_BFC0A258); - psx_delay_BFC0A258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0A25C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A25Cu); -#endif - if (psx_delay_BFC0A258) { - psx_delay_BFC0A258 = 0; - if (psx_taken_BFC0A258) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A264u); - goto label_BFC0A264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A260u); - } -label_BFC0A260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0A260: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A260u); -#endif -label_BFC0A264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802000u); -#endif - /* 0xBFC0A264: 00176840 sll $t5, $s7, 1 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[13] = cpu->gpr[23] << 1u; - PGXP_ALU(0x00176840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A268: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0A26C: 002D0821 addu $at, $at, $t5 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[13]; - PGXP_ALU(0x002D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0A270: A4259F88 sh $a1, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A270u); return; } g_debug_last_store_pc = 0xBFC0A270u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4259F88u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A274u); -#endif - /* 0xBFC0A274: 8EC40004 lw $a0, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A274u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } - PGXP_LOAD(0x8EC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600000u); -#endif - /* 0xBFC0A278: AED50018 sw $s5, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A278u); return; } g_debug_last_store_pc = 0xBFC0A278u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAED50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A27C: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0A284u; /* jal link before delay slot */ - psx_delay_BFC0A27C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC0A280: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A280u); -#endif - if (psx_delay_BFC0A27C) { - psx_delay_BFC0A27C = 0; - cpu->gpr[31] = 0xBFC0A284u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0A284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A284: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0A288: 10410006 beq $v0, $at, 0xBFC0A2A4 */ - uint32_t psx_brA_BFC0A288 = cpu->gpr[2]; uint32_t psx_brB_BFC0A288 = cpu->gpr[1]; - psx_taken_BFC0A288 = (psx_brA_BFC0A288 == psx_brB_BFC0A288); - psx_delay_BFC0A288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A28C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A28Cu); -#endif - if (psx_delay_BFC0A288) { - psx_delay_BFC0A288 = 0; - if (psx_taken_BFC0A288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2A4u); - goto label_BFC0A2A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A290u); - } -label_BFC0A290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A290u); -#endif - /* 0xBFC0A290: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A290u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A294u); -#endif - /* 0xBFC0A294: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A294u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A298u); -#endif - /* 0xBFC0A298: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A298u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A29C: 10000045 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A29C = cpu->gpr[0]; uint32_t psx_brB_BFC0A29C = cpu->gpr[0]; - psx_taken_BFC0A29C = (psx_brA_BFC0A29C == psx_brB_BFC0A29C); - psx_delay_BFC0A29C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A2A0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2A0u); -#endif - if (psx_delay_BFC0A29C) { - psx_delay_BFC0A29C = 0; - if (psx_taken_BFC0A29C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2A4u); - } -label_BFC0A2A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0A2A4: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2A4u); return; } g_debug_last_store_pc = 0xBFC0A2A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2A8u); -#endif - /* 0xBFC0A2A8: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2A8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2ACu); -#endif - /* 0xBFC0A2AC: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2ACu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2B0u); -#endif - /* 0xBFC0A2B0: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A2B4: 1000003F beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A2B4 = cpu->gpr[0]; uint32_t psx_brB_BFC0A2B4 = cpu->gpr[0]; - psx_taken_BFC0A2B4 = (psx_brA_BFC0A2B4 == psx_brB_BFC0A2B4); - psx_delay_BFC0A2B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A2B8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2B8u); -#endif - if (psx_delay_BFC0A2B4) { - psx_delay_BFC0A2B4 = 0; - if (psx_taken_BFC0A2B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2BCu); - } -label_BFC0A2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0A2BC: 1A400028 blez $s2, 0xBFC0A360 */ - uint32_t psx_brA_BFC0A2BC = cpu->gpr[18]; - psx_taken_BFC0A2BC = ((int32_t)psx_brA_BFC0A2BC <= 0); - psx_delay_BFC0A2BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC0A2C0: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2C0u); -#endif - if (psx_delay_BFC0A2BC) { - psx_delay_BFC0A2BC = 0; - if (psx_taken_BFC0A2BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A360u); - goto label_BFC0A360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2C4u); - } -label_BFC0A2C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0A2C4: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2C4u); return; } g_debug_last_store_pc = 0xBFC0A2C4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0A2C8: 24150040 addiu $s5, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24150040u, cpu->gpr[21], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2C8u); -#endif -label_BFC0A2CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0A2CC: 06210004 bgez $s1, 0xBFC0A2E0 */ - uint32_t psx_brA_BFC0A2CC = cpu->gpr[17]; - psx_taken_BFC0A2CC = ((int32_t)psx_brA_BFC0A2CC >= 0); - psx_delay_BFC0A2CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0A2D0: 322E003F andi $t6, $s1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] & 0x3Fu; - PGXP_ALU(0x322E003Fu, cpu->gpr[14], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2D0u); -#endif - if (psx_delay_BFC0A2CC) { - psx_delay_BFC0A2CC = 0; - if (psx_taken_BFC0A2CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2E0u); - goto label_BFC0A2E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2D4u); - } -label_BFC0A2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0A2D4: 11C00002 beq $t6, $zero, 0xBFC0A2E0 */ - uint32_t psx_brA_BFC0A2D4 = cpu->gpr[14]; uint32_t psx_brB_BFC0A2D4 = cpu->gpr[0]; - psx_taken_BFC0A2D4 = (psx_brA_BFC0A2D4 == psx_brB_BFC0A2D4); - psx_delay_BFC0A2D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A2D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2D8u); -#endif - if (psx_delay_BFC0A2D4) { - psx_delay_BFC0A2D4 = 0; - if (psx_taken_BFC0A2D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2E0u); - goto label_BFC0A2E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2DCu); - } -label_BFC0A2DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0A2DC: 25CEFFC0 addiu $t6, $t6, -64 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-64)); - PGXP_ALU(0x25CEFFC0u, cpu->gpr[14], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2DCu); -#endif -label_BFC0A2E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204004u); -#endif - /* 0xBFC0A2E0: 02AE1023 subu $v0, $s5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[21] - cpu->gpr[14]; - PGXP_ALU(0x02AE1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40006u); -#endif - /* 0xBFC0A2E4: 0052082A slt $at, $v0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0052082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A2E8: 10200004 beq $at, $zero, 0xBFC0A2FC */ - uint32_t psx_brA_BFC0A2E8 = cpu->gpr[1]; uint32_t psx_brB_BFC0A2E8 = cpu->gpr[0]; - psx_taken_BFC0A2E8 = (psx_brA_BFC0A2E8 == psx_brB_BFC0A2E8); - psx_delay_BFC0A2E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC0A2EC: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2ECu); -#endif - if (psx_delay_BFC0A2E8) { - psx_delay_BFC0A2E8 = 0; - if (psx_taken_BFC0A2E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2FCu); - goto label_BFC0A2FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2F0u); - } -label_BFC0A2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A2F0: 10000002 beq $zero, $zero, 0xBFC0A2FC */ - uint32_t psx_brA_BFC0A2F0 = cpu->gpr[0]; uint32_t psx_brB_BFC0A2F0 = cpu->gpr[0]; - psx_taken_BFC0A2F0 = (psx_brA_BFC0A2F0 == psx_brB_BFC0A2F0); - psx_delay_BFC0A2F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0A2F4: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2F4u); -#endif - if (psx_delay_BFC0A2F0) { - psx_delay_BFC0A2F0 = 0; - if (psx_taken_BFC0A2F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2FCu); - goto label_BFC0A2FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2F8u); - } -label_BFC0A2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC0A2F8: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2F8u); -#endif -label_BFC0A2FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A2FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A2FCu); -#endif - /* 0xBFC0A2FC: 8EC50024 lw $a1, 36($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A2FCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x400000u); } - PGXP_LOAD(0x8EC50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC0A300: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A304: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC0A30Cu; /* jal link before delay slot */ - psx_delay_BFC0A304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC0A308: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A308u); -#endif - if (psx_delay_BFC0A304) { - psx_delay_BFC0A304 = 0; - cpu->gpr[31] = 0xBFC0A30Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC0A30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A30Cu); -#endif - /* 0xBFC0A30C: 8EC40004 lw $a0, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A30Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } - PGXP_LOAD(0x8EC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0A310: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC0A314: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A318: 0FF024BB jal 0xBFC092EC */ - cpu->gpr[31] = 0xBFC0A320u; /* jal link before delay slot */ - psx_delay_BFC0A318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC0A31C: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A31Cu); -#endif - if (psx_delay_BFC0A318) { - psx_delay_BFC0A318 = 0; - cpu->gpr[31] = 0xBFC0A320u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC092ECu); - cpu->pc = 0xBFC092ECu; return; - } -label_BFC0A320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC0A320: 001019C0 sll $v1, $s0, 7 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[16] << 7u; - PGXP_ALU(0x001019C0u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A324: 10430006 beq $v0, $v1, 0xBFC0A340 */ - uint32_t psx_brA_BFC0A324 = cpu->gpr[2]; uint32_t psx_brB_BFC0A324 = cpu->gpr[3]; - psx_taken_BFC0A324 = (psx_brA_BFC0A324 == psx_brB_BFC0A324); - psx_delay_BFC0A324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC0A328: 02509023 subu $s2, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[16]; - PGXP_ALU(0x02509023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A328u); -#endif - if (psx_delay_BFC0A324) { - psx_delay_BFC0A324 = 0; - if (psx_taken_BFC0A324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A340u); - goto label_BFC0A340; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A32Cu); - } -label_BFC0A32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A32Cu); -#endif - /* 0xBFC0A32C: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A32Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A330u); -#endif - /* 0xBFC0A330: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A330u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A334: 1000000A beq $zero, $zero, 0xBFC0A360 */ - uint32_t psx_brA_BFC0A334 = cpu->gpr[0]; uint32_t psx_brB_BFC0A334 = cpu->gpr[0]; - psx_taken_BFC0A334 = (psx_brA_BFC0A334 == psx_brB_BFC0A334); - psx_delay_BFC0A334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC0A338: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A338u); -#endif - if (psx_delay_BFC0A334) { - psx_delay_BFC0A334 = 0; - if (psx_taken_BFC0A334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A360u); - goto label_BFC0A360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A33Cu); - } -label_BFC0A33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC0A33C: 02509023 subu $s2, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[16]; - PGXP_ALU(0x02509023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A33Cu); -#endif -label_BFC0A340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0A340: 02308821 addu $s1, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[16]; - PGXP_ALU(0x02308821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC0A344: 0283A021 addu $s4, $s4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[3]; - PGXP_ALU(0x0283A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0A348: 1E40FFE0 bgtz $s2, 0xBFC0A2CC */ - uint32_t psx_brA_BFC0A348 = cpu->gpr[18]; - psx_taken_BFC0A348 = ((int32_t)psx_brA_BFC0A348 > 0); - psx_delay_BFC0A348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC0A34C: 02709821 addu $s3, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02709821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A34Cu); -#endif - if (psx_delay_BFC0A348) { - psx_delay_BFC0A348 = 0; - if (psx_taken_BFC0A348) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A2CCu); - goto label_BFC0A2CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A350u); - } -label_BFC0A350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A350u); -#endif - /* 0xBFC0A350: 8EC30010 lw $v1, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A350u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x8EC30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A354u); -#endif - /* 0xBFC0A354: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A354u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A358: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC0A35C: 001311C0 sll $v0, $s3, 7 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 7u; - PGXP_ALU(0x001311C0u, cpu->gpr[2], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A35Cu); -#endif -label_BFC0A360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Cu); -#endif - /* 0xBFC0A360: 00627821 addu $t7, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00627821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408000u); -#endif - /* 0xBFC0A364: AECF0010 sw $t7, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A364u); return; } g_debug_last_store_pc = 0xBFC0A364u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAECF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0A368: AEC00018 sw $zero, 24($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A368u); return; } g_debug_last_store_pc = 0xBFC0A368u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAEC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A36Cu); -#endif - /* 0xBFC0A36C: 8FB80050 lw $t8, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A36Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80050u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A370: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0A374: AF000000 sw $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A374u); return; } g_debug_last_store_pc = 0xBFC0A374u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAF000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A378u); -#endif - /* 0xBFC0A378: 8FB90060 lw $t9, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A378u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90060u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A37C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0A380: 17220006 bne $t9, $v0, 0xBFC0A39C */ - uint32_t psx_brA_BFC0A380 = cpu->gpr[25]; uint32_t psx_brB_BFC0A380 = cpu->gpr[2]; - psx_taken_BFC0A380 = (psx_brA_BFC0A380 != psx_brB_BFC0A380); - psx_delay_BFC0A380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800100u); -#endif - /* 0xBFC0A384: 00174080 sll $t0, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[8] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A384u); -#endif - if (psx_delay_BFC0A380) { - psx_delay_BFC0A380 = 0; - if (psx_taken_BFC0A380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A39Cu); - goto label_BFC0A39C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A388u); - } -label_BFC0A388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A388u); -#endif - /* 0xBFC0A388: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A388u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A38Cu); -#endif - /* 0xBFC0A38C: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A38Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A390: 10000008 beq $zero, $zero, 0xBFC0A3B4 */ - uint32_t psx_brA_BFC0A390 = cpu->gpr[0]; uint32_t psx_brB_BFC0A390 = cpu->gpr[0]; - psx_taken_BFC0A390 = (psx_brA_BFC0A390 == psx_brB_BFC0A390); - psx_delay_BFC0A390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000005u); -#endif - /* 0xBFC0A394: 03201021 addu $v0, $t9, $zero */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[0]; - PGXP_ALU(0x03201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A394u); -#endif - if (psx_delay_BFC0A390) { - psx_delay_BFC0A390 = 0; - if (psx_taken_BFC0A390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3B4u); - goto label_BFC0A3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A398u); - } -label_BFC0A398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800100u); -#endif - /* 0xBFC0A398: 00174080 sll $t0, $s7, 2 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[8] = cpu->gpr[23] << 2u; - PGXP_ALU(0x00174080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A398u); -#endif -label_BFC0A39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0A39C: 3C02A001 lui $v0, 0xA001 */ - cpu->gpr[2] = 0xA0010000u; - PGXP_ALU(0x3C02A001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0A3A0: 00481021 addu $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00481021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3A4u); -#endif - /* 0xBFC0A3A4: 8C429F80 lw $v0, -24704($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24704; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3A8u); -#endif - /* 0xBFC0A3A8: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3A8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3ACu); -#endif - /* 0xBFC0A3AC: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3ACu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A3B0: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3B0u); -#endif -label_BFC0A3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3B4u); -#endif - /* 0xBFC0A3B4: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3B8u); -#endif - /* 0xBFC0A3B8: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3B8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3BCu); -#endif - /* 0xBFC0A3BC: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3BCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3C0u); -#endif - /* 0xBFC0A3C0: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3C0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3C4u); -#endif - /* 0xBFC0A3C4: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3C4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3C8u); -#endif - /* 0xBFC0A3C8: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A3C8u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A3CC: 03E00008 jr $ra */ - psx_delay_BFC0A3CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A3D0: 27BD0078 addiu $sp, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27BD0078u, cpu->gpr[29], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3D0u); -#endif - if (psx_delay_BFC0A3CC) { - psx_delay_BFC0A3CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A3D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A3D4u); - int psx_delay_BFC0A3D8 = 0; - int psx_taken_BFC0A3D8 = 0; - int psx_delay_BFC0A40C = 0; - int psx_taken_BFC0A40C = 0; - int psx_delay_BFC0A414 = 0; - int psx_delay_BFC0A420 = 0; - int psx_taken_BFC0A420 = 0; - int psx_delay_BFC0A434 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A3E0u: goto label_BFC0A3E0; - case 0xBFC0A400u: goto label_BFC0A400; - case 0xBFC0A414u: goto label_BFC0A414; - case 0xBFC0A420u: goto label_BFC0A420; - case 0xBFC0A428u: goto label_BFC0A428; - case 0xBFC0A42Cu: goto label_BFC0A42C; - default: break; - } - } -label_BFC0A3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC0A3D4: 28C10040 slti $at, $a2, 64 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0); - PGXP_ALU(0x28C10040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A3D8: 14200014 bne $at, $zero, 0xBFC0A42C */ - uint32_t psx_brA_BFC0A3D8 = cpu->gpr[1]; uint32_t psx_brB_BFC0A3D8 = cpu->gpr[0]; - psx_taken_BFC0A3D8 = (psx_brA_BFC0A3D8 != psx_brB_BFC0A3D8); - psx_delay_BFC0A3D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC0A3DC: 00054180 sll $t0, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00054180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3DCu); -#endif - if (psx_delay_BFC0A3D8) { - psx_delay_BFC0A3D8 = 0; - if (psx_taken_BFC0A3D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A42Cu); - goto label_BFC0A42C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3E0u); - } -label_BFC0A3E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A3E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0A3E0: 00047100 sll $t6, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0A3E4: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A3E8: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A3EC: 25EFBA88 addiu $t7, $t7, -17784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17784)); - PGXP_ALU(0x25EFBA88u, cpu->gpr[15], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0A3F0: 000E7140 sll $t6, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 5u; - PGXP_ALU(0x000E7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC0A3F4: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A3F8: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC0A3FC: 0005C140 sll $t8, $a1, 5 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 5u; - PGXP_ALU(0x0005C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A3FCu); -#endif -label_BFC0A400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC0A400: 0058C821 addu $t9, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x0058C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A404u); -#endif - /* 0xBFC0A404: 97250008 lhu $a1, 8($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A404u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x2000000u); } - PGXP_LOAD(0x97250008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0A408: 24C6FFC0 addiu $a2, $a2, -64 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-64)); - PGXP_ALU(0x24C6FFC0u, cpu->gpr[6], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC0A40C: 14A30004 bne $a1, $v1, 0xBFC0A420 */ - uint32_t psx_brA_BFC0A40C = cpu->gpr[5]; uint32_t psx_brB_BFC0A40C = cpu->gpr[3]; - psx_taken_BFC0A40C = (psx_brA_BFC0A40C != psx_brB_BFC0A40C); - psx_delay_BFC0A40C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC0A410: 28C10040 slti $at, $a2, 64 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0); - PGXP_ALU(0x28C10040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A410u); -#endif - if (psx_delay_BFC0A40C) { - psx_delay_BFC0A40C = 0; - if (psx_taken_BFC0A40C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A420u); - goto label_BFC0A420; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A414u); - } -label_BFC0A414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A414: 03E00008 jr $ra */ - psx_delay_BFC0A414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A418: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A418u); -#endif - if (psx_delay_BFC0A414) { - psx_delay_BFC0A414 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0A420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A420: 1020FFF7 beq $at, $zero, 0xBFC0A400 */ - uint32_t psx_brA_BFC0A420 = cpu->gpr[1]; uint32_t psx_brB_BFC0A420 = cpu->gpr[0]; - psx_taken_BFC0A420 = (psx_brA_BFC0A420 == psx_brB_BFC0A420); - psx_delay_BFC0A420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC0A424: 0005C140 sll $t8, $a1, 5 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 5u; - PGXP_ALU(0x0005C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A424u); -#endif - if (psx_delay_BFC0A420) { - psx_delay_BFC0A420 = 0; - if (psx_taken_BFC0A420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A400u); - goto label_BFC0A400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A428u); - } -label_BFC0A428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC0A428: 00054180 sll $t0, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00054180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A428u); -#endif -label_BFC0A42C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A42Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x144u); -#endif - /* 0xBFC0A42C: 01061021 addu $v0, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[6]; - PGXP_ALU(0x01061021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0A430: 24420040 addiu $v0, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (64)); - PGXP_ALU(0x24420040u, cpu->gpr[2], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A434: 03E00008 jr $ra */ - psx_delay_BFC0A434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A438: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A438u); -#endif - if (psx_delay_BFC0A434) { - psx_delay_BFC0A434 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A43C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A43Cu); - int psx_delay_BFC0A444 = 0; - int psx_taken_BFC0A444 = 0; - int psx_delay_BFC0A44C = 0; - int psx_taken_BFC0A44C = 0; - int psx_delay_BFC0A460 = 0; - int psx_taken_BFC0A460 = 0; - int psx_delay_BFC0A468 = 0; - int psx_taken_BFC0A468 = 0; - int psx_delay_BFC0A470 = 0; - int psx_delay_BFC0A480 = 0; - int psx_taken_BFC0A480 = 0; - int psx_delay_BFC0A490 = 0; - int psx_taken_BFC0A490 = 0; - int psx_delay_BFC0A498 = 0; - int psx_taken_BFC0A498 = 0; - int psx_delay_BFC0A4A0 = 0; - int psx_delay_BFC0A4AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A44Cu: goto label_BFC0A44C; - case 0xBFC0A454u: goto label_BFC0A454; - case 0xBFC0A458u: goto label_BFC0A458; - case 0xBFC0A468u: goto label_BFC0A468; - case 0xBFC0A470u: goto label_BFC0A470; - case 0xBFC0A478u: goto label_BFC0A478; - case 0xBFC0A488u: goto label_BFC0A488; - case 0xBFC0A498u: goto label_BFC0A498; - case 0xBFC0A4A0u: goto label_BFC0A4A0; - case 0xBFC0A4ACu: goto label_BFC0A4AC; - default: break; - } - } -label_BFC0A43C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A43Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A43Cu); -#endif - /* 0xBFC0A43C: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A440: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A444: 14400004 bne $v0, $zero, 0xBFC0A458 */ - uint32_t psx_brA_BFC0A444 = cpu->gpr[2]; uint32_t psx_brB_BFC0A444 = cpu->gpr[0]; - psx_taken_BFC0A444 = (psx_brA_BFC0A444 != psx_brB_BFC0A444); - psx_delay_BFC0A444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0A448: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A448u); -#endif - if (psx_delay_BFC0A444) { - psx_delay_BFC0A444 = 0; - if (psx_taken_BFC0A444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A458u); - goto label_BFC0A458; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A44Cu); - } -label_BFC0A44C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A44Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A44C: 1000000E beq $zero, $zero, 0xBFC0A488 */ - uint32_t psx_brA_BFC0A44C = cpu->gpr[0]; uint32_t psx_brB_BFC0A44C = cpu->gpr[0]; - psx_taken_BFC0A44C = (psx_brA_BFC0A44C == psx_brB_BFC0A44C); - psx_delay_BFC0A44C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0A450: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A450u); -#endif - if (psx_delay_BFC0A44C) { - psx_delay_BFC0A44C = 0; - if (psx_taken_BFC0A44C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A488u); - goto label_BFC0A488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A454u); - } -label_BFC0A454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0A454: 2406003F addiu $a2, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2406003Fu, cpu->gpr[6], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A454u); -#endif -label_BFC0A458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A458u); -#endif - /* 0xBFC0A458: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A45C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC0A460: 10C30005 beq $a2, $v1, 0xBFC0A478 */ - uint32_t psx_brA_BFC0A460 = cpu->gpr[6]; uint32_t psx_brB_BFC0A460 = cpu->gpr[3]; - psx_taken_BFC0A460 = (psx_brA_BFC0A460 == psx_brB_BFC0A460); - psx_delay_BFC0A460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A464u); -#endif - if (psx_delay_BFC0A460) { - psx_delay_BFC0A460 = 0; - if (psx_taken_BFC0A460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A478u); - goto label_BFC0A478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A468u); - } -label_BFC0A468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A468: 10620003 beq $v1, $v0, 0xBFC0A478 */ - uint32_t psx_brA_BFC0A468 = cpu->gpr[3]; uint32_t psx_brB_BFC0A468 = cpu->gpr[2]; - psx_taken_BFC0A468 = (psx_brA_BFC0A468 == psx_brB_BFC0A468); - psx_delay_BFC0A468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A46C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A46Cu); -#endif - if (psx_delay_BFC0A468) { - psx_delay_BFC0A468 = 0; - if (psx_taken_BFC0A468) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A478u); - goto label_BFC0A478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A470u); - } -label_BFC0A470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A470: 03E00008 jr $ra */ - psx_delay_BFC0A470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A474: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A474u); -#endif - if (psx_delay_BFC0A470) { - psx_delay_BFC0A470 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0A478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A478u); -#endif - /* 0xBFC0A478: 80820001 lb $v0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 2, 0x10u); - PGXP_LOAD(0x80820001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A47C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A480: 1440FFF5 bne $v0, $zero, 0xBFC0A458 */ - uint32_t psx_brA_BFC0A480 = cpu->gpr[2]; uint32_t psx_brB_BFC0A480 = cpu->gpr[0]; - psx_taken_BFC0A480 = (psx_brA_BFC0A480 != psx_brB_BFC0A480); - psx_delay_BFC0A480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A484: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A484u); -#endif - if (psx_delay_BFC0A480) { - psx_delay_BFC0A480 = 0; - if (psx_taken_BFC0A480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A458u); - goto label_BFC0A458; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A488u); - } -label_BFC0A488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A488u); -#endif - /* 0xBFC0A488: 80A30000 lb $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x80A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A48C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A490: 10620003 beq $v1, $v0, 0xBFC0A4A0 */ - uint32_t psx_brA_BFC0A490 = cpu->gpr[3]; uint32_t psx_brB_BFC0A490 = cpu->gpr[2]; - psx_taken_BFC0A490 = (psx_brA_BFC0A490 == psx_brB_BFC0A490); - psx_delay_BFC0A490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A494: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A494u); -#endif - if (psx_delay_BFC0A490) { - psx_delay_BFC0A490 = 0; - if (psx_taken_BFC0A490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4A0u); - goto label_BFC0A4A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A498u); - } -label_BFC0A498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC0A498: 14C30004 bne $a2, $v1, 0xBFC0A4AC */ - uint32_t psx_brA_BFC0A498 = cpu->gpr[6]; uint32_t psx_brB_BFC0A498 = cpu->gpr[3]; - psx_taken_BFC0A498 = (psx_brA_BFC0A498 != psx_brB_BFC0A498); - psx_delay_BFC0A498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A49C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A49Cu); -#endif - if (psx_delay_BFC0A498) { - psx_delay_BFC0A498 = 0; - if (psx_taken_BFC0A498) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4ACu); - goto label_BFC0A4AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4A0u); - } -label_BFC0A4A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A4A0: 03E00008 jr $ra */ - psx_delay_BFC0A4A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A4A4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4A4u); -#endif - if (psx_delay_BFC0A4A0) { - psx_delay_BFC0A4A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0A4AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A4AC: 03E00008 jr $ra */ - psx_delay_BFC0A4AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A4B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4B0u); -#endif - if (psx_delay_BFC0A4AC) { - psx_delay_BFC0A4AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A4B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A4B4u); - int psx_delay_BFC0A4D0 = 0; - int psx_taken_BFC0A4D0 = 0; - int psx_delay_BFC0A4F0 = 0; - int psx_taken_BFC0A4F0 = 0; - int psx_delay_BFC0A500 = 0; - int psx_taken_BFC0A500 = 0; - int psx_delay_BFC0A514 = 0; - int psx_delay_BFC0A540 = 0; - int psx_delay_BFC0A558 = 0; - int psx_taken_BFC0A558 = 0; - int psx_delay_BFC0A568 = 0; - int psx_taken_BFC0A568 = 0; - int psx_delay_BFC0A5BC = 0; - int psx_delay_BFC0A5DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A4D8u: goto label_BFC0A4D8; - case 0xBFC0A4DCu: goto label_BFC0A4DC; - case 0xBFC0A4F8u: goto label_BFC0A4F8; - case 0xBFC0A508u: goto label_BFC0A508; - case 0xBFC0A51Cu: goto label_BFC0A51C; - case 0xBFC0A548u: goto label_BFC0A548; - case 0xBFC0A560u: goto label_BFC0A560; - case 0xBFC0A570u: goto label_BFC0A570; - case 0xBFC0A5C4u: goto label_BFC0A5C4; - case 0xBFC0A5D4u: goto label_BFC0A5D4; - default: break; - } - } -label_BFC0A4B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A4B4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0A4B8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A4B8u); return; } g_debug_last_store_pc = 0xBFC0A4B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC0A4BC: 00804821 addu $t1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4C0u); -#endif - /* 0xBFC0A4C0: 8D230004 lw $v1, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A4C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x200u); } - PGXP_LOAD(0x8D230004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A4C4: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC0A4C8: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A4CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A4D0: 04610002 bgez $v1, 0xBFC0A4DC */ - uint32_t psx_brA_BFC0A4D0 = cpu->gpr[3]; - psx_taken_BFC0A4D0 = ((int32_t)psx_brA_BFC0A4D0 >= 0); - psx_delay_BFC0A4D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC0A4D4: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4D4u); -#endif - if (psx_delay_BFC0A4D0) { - psx_delay_BFC0A4D0 = 0; - if (psx_taken_BFC0A4D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4DCu); - goto label_BFC0A4DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4D8u); - } -label_BFC0A4D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A4D8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4D8u); -#endif -label_BFC0A4DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0A4DC: 00014103 sra $t0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00014103u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC0A4E0: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0A4E4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4E8u); -#endif - /* 0xBFC0A4E8: 8DEF9F20 lw $t7, -24800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A4E8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F20u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A4EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0A4F0: 11E00005 beq $t7, $zero, 0xBFC0A508 */ - uint32_t psx_brA_BFC0A4F0 = cpu->gpr[15]; uint32_t psx_brB_BFC0A4F0 = cpu->gpr[0]; - psx_taken_BFC0A4F0 = (psx_brA_BFC0A4F0 == psx_brB_BFC0A4F0); - psx_delay_BFC0A4F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A4F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4F4u); -#endif - if (psx_delay_BFC0A4F0) { - psx_delay_BFC0A4F0 = 0; - if (psx_taken_BFC0A4F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A508u); - goto label_BFC0A508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4F8u); - } -label_BFC0A4F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A4F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0A4F8: 24180010 addiu $t8, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24180010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC0A4FC: AD380018 sw $t8, 24($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A4FCu); return; } g_debug_last_store_pc = 0xBFC0A4FCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD380018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A500: 10000034 beq $zero, $zero, 0xBFC0A5D4 */ - uint32_t psx_brA_BFC0A500 = cpu->gpr[0]; uint32_t psx_brB_BFC0A500 = cpu->gpr[0]; - psx_taken_BFC0A500 = (psx_brA_BFC0A500 == psx_brB_BFC0A500); - psx_delay_BFC0A500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A504: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A504u); -#endif - if (psx_delay_BFC0A500) { - psx_delay_BFC0A500 = 0; - if (psx_taken_BFC0A500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A5D4u); - goto label_BFC0A5D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A508u); - } -label_BFC0A508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0A508: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A508u); return; } g_debug_last_store_pc = 0xBFC0A508u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0A50C: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A50Cu); return; } g_debug_last_store_pc = 0xBFC0A50Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0A510: AFA8001C sw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A510u); return; } g_debug_last_store_pc = 0xBFC0A510u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A514: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0A51Cu; /* jal link before delay slot */ - psx_delay_BFC0A514 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0A518: AFA90028 sw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A518u); return; } g_debug_last_store_pc = 0xBFC0A518u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A518u); -#endif - if (psx_delay_BFC0A514) { - psx_delay_BFC0A514 = 0; - cpu->gpr[31] = 0xBFC0A51Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0A51C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A51Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A51C: 3C05A001 lui $a1, 0xA001 */ - cpu->gpr[5] = 0xA0010000u; - PGXP_ALU(0x3C05A001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A520u); -#endif - /* 0xBFC0A520: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A520u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A524u); -#endif - /* 0xBFC0A524: 8CA59F8C lw $a1, -24692($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24692; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A524u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59F8Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A528u); -#endif - /* 0xBFC0A528: 8FA7002C lw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A528u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A52Cu); -#endif - /* 0xBFC0A52C: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A52Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A530u); -#endif - /* 0xBFC0A530: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A530u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0A534: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0A538: 24C69F98 addiu $a2, $a2, -24680 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-24680)); - PGXP_ALU(0x24C69F98u, cpu->gpr[6], _pgx1, 0xFFFF9F98u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0A53C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A540: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0A548u; /* jal link before delay slot */ - psx_delay_BFC0A540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A544: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A544u); -#endif - if (psx_delay_BFC0A540) { - psx_delay_BFC0A540 = 0; - cpu->gpr[31] = 0xBFC0A548u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0A548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A548u); -#endif - /* 0xBFC0A548: 8FA7002C lw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A548u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A54Cu); -#endif - /* 0xBFC0A54C: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A54Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A550u); -#endif - /* 0xBFC0A550: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A550u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A554: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0A558: 14410005 bne $v0, $at, 0xBFC0A570 */ - uint32_t psx_brA_BFC0A558 = cpu->gpr[2]; uint32_t psx_brB_BFC0A558 = cpu->gpr[1]; - psx_taken_BFC0A558 = (psx_brA_BFC0A558 != psx_brB_BFC0A558); - psx_delay_BFC0A558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0A55C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A55Cu); -#endif - if (psx_delay_BFC0A558) { - psx_delay_BFC0A558 = 0; - if (psx_taken_BFC0A558) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A570u); - goto label_BFC0A570; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A560u); - } -label_BFC0A560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0A560: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC0A564: AD390018 sw $t9, 24($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A564u); return; } g_debug_last_store_pc = 0xBFC0A564u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD390018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A568: 1000001A beq $zero, $zero, 0xBFC0A5D4 */ - uint32_t psx_brA_BFC0A568 = cpu->gpr[0]; uint32_t psx_brB_BFC0A568 = cpu->gpr[0]; - psx_taken_BFC0A568 = (psx_brA_BFC0A568 == psx_brB_BFC0A568); - psx_delay_BFC0A568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A56C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A56Cu); -#endif - if (psx_delay_BFC0A568) { - psx_delay_BFC0A568 = 0; - if (psx_taken_BFC0A568) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A5D4u); - goto label_BFC0A5D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A570u); - } -label_BFC0A570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC0A570: 00085100 sll $t2, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00085100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC0A574: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0A578: 000A5140 sll $t2, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC0A57C: 00035940 sll $t3, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00035940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0A580: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0A584: 25ADBA88 addiu $t5, $t5, -17784 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-17784)); - PGXP_ALU(0x25ADBA88u, cpu->gpr[13], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC0A588: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC0A58C: 018D1021 addu $v0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A590u); -#endif - /* 0xBFC0A590: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A590u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0A594: 0003C980 sll $t9, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 6u; - PGXP_ALU(0x0003C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0A598: 31CF00F0 andi $t7, $t6, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xF0u; - PGXP_ALU(0x31CF00F0u, cpu->gpr[15], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC0A59C: ACEF0014 sw $t7, 20($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A59Cu); return; } g_debug_last_store_pc = 0xBFC0A59Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5A0u); -#endif - /* 0xBFC0A5A0: 8C580004 lw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5A0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC0A5A4: 272A0040 addiu $t2, $t9, 64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[25] + (64)); - PGXP_ALU(0x272A0040u, cpu->gpr[10], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC0A5A8: ACEA0020 sw $t2, 32($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5A8u); return; } g_debug_last_store_pc = 0xBFC0A5A8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACEA0020u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC0A5AC: ACF80018 sw $t8, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5ACu); return; } g_debug_last_store_pc = 0xBFC0A5ACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0A5B0: AFA90028 sw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5B0u); return; } g_debug_last_store_pc = 0xBFC0A5B0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0A5B4: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5B4u); return; } g_debug_last_store_pc = 0xBFC0A5B4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC0A5B8: 2445000A addiu $a1, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (10)); - PGXP_ALU(0x2445000Au, cpu->gpr[5], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A5BC: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0A5C4u; /* jal link before delay slot */ - psx_delay_BFC0A5BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC0A5C0: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5C0u); -#endif - if (psx_delay_BFC0A5BC) { - psx_delay_BFC0A5BC = 0; - cpu->gpr[31] = 0xBFC0A5C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0A5C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A5C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5C4u); -#endif - /* 0xBFC0A5C4: 8FA7002C lw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5C4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5C8u); -#endif - /* 0xBFC0A5C8: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5C8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC0A5CC: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0A5D0: AD200018 sw $zero, 24($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5D0u); return; } g_debug_last_store_pc = 0xBFC0A5D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD200018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5D0u); -#endif -label_BFC0A5D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A5D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5D4u); -#endif - /* 0xBFC0A5D4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A5D8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A5DC: 03E00008 jr $ra */ - psx_delay_BFC0A5DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A5E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5E0u); -#endif - if (psx_delay_BFC0A5DC) { - psx_delay_BFC0A5DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A5E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A5E4u); - int psx_delay_BFC0A604 = 0; - int psx_taken_BFC0A604 = 0; - int psx_delay_BFC0A624 = 0; - int psx_taken_BFC0A624 = 0; - int psx_delay_BFC0A62C = 0; - int psx_taken_BFC0A62C = 0; - int psx_delay_BFC0A638 = 0; - int psx_delay_BFC0A644 = 0; - int psx_delay_BFC0A64C = 0; - int psx_taken_BFC0A64C = 0; - int psx_delay_BFC0A654 = 0; - int psx_taken_BFC0A654 = 0; - int psx_delay_BFC0A670 = 0; - int psx_delay_BFC0A680 = 0; - int psx_taken_BFC0A680 = 0; - int psx_delay_BFC0A69C = 0; - int psx_taken_BFC0A69C = 0; - int psx_delay_BFC0A6A4 = 0; - int psx_taken_BFC0A6A4 = 0; - int psx_delay_BFC0A6BC = 0; - int psx_taken_BFC0A6BC = 0; - int psx_delay_BFC0A6C4 = 0; - int psx_taken_BFC0A6C4 = 0; - int psx_delay_BFC0A6D4 = 0; - int psx_taken_BFC0A6D4 = 0; - int psx_delay_BFC0A6E8 = 0; - int psx_taken_BFC0A6E8 = 0; - int psx_delay_BFC0A6F8 = 0; - int psx_taken_BFC0A6F8 = 0; - int psx_delay_BFC0A70C = 0; - int psx_taken_BFC0A70C = 0; - int psx_delay_BFC0A720 = 0; - int psx_taken_BFC0A720 = 0; - int psx_delay_BFC0A73C = 0; - int psx_delay_BFC0A74C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A60Cu: goto label_BFC0A60C; - case 0xBFC0A610u: goto label_BFC0A610; - case 0xBFC0A62Cu: goto label_BFC0A62C; - case 0xBFC0A634u: goto label_BFC0A634; - case 0xBFC0A640u: goto label_BFC0A640; - case 0xBFC0A64Cu: goto label_BFC0A64C; - case 0xBFC0A654u: goto label_BFC0A654; - case 0xBFC0A65Cu: goto label_BFC0A65C; - case 0xBFC0A660u: goto label_BFC0A660; - case 0xBFC0A678u: goto label_BFC0A678; - case 0xBFC0A688u: goto label_BFC0A688; - case 0xBFC0A694u: goto label_BFC0A694; - case 0xBFC0A6A4u: goto label_BFC0A6A4; - case 0xBFC0A6ACu: goto label_BFC0A6AC; - case 0xBFC0A6B0u: goto label_BFC0A6B0; - case 0xBFC0A6C4u: goto label_BFC0A6C4; - case 0xBFC0A6CCu: goto label_BFC0A6CC; - case 0xBFC0A6D4u: goto label_BFC0A6D4; - case 0xBFC0A6DCu: goto label_BFC0A6DC; - case 0xBFC0A6F0u: goto label_BFC0A6F0; - case 0xBFC0A700u: goto label_BFC0A700; - case 0xBFC0A714u: goto label_BFC0A714; - case 0xBFC0A718u: goto label_BFC0A718; - case 0xBFC0A728u: goto label_BFC0A728; - case 0xBFC0A72Cu: goto label_BFC0A72C; - case 0xBFC0A744u: goto label_BFC0A744; - default: break; - } - } -label_BFC0A5E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A5E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A5E4: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0A5E8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5E8u); return; } g_debug_last_store_pc = 0xBFC0A5E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0A5EC: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5ECu); return; } g_debug_last_store_pc = 0xBFC0A5ECu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0A5F0: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5F0u); return; } g_debug_last_store_pc = 0xBFC0A5F0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5F4u); -#endif - /* 0xBFC0A5F4: 8C830004 lw $v1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A5F4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0A5F8: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0A5FC: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0A600: AC8E0018 sw $t6, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A600u); return; } g_debug_last_store_pc = 0xBFC0A600u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A604: 04610002 bgez $v1, 0xBFC0A610 */ - uint32_t psx_brA_BFC0A604 = cpu->gpr[3]; - psx_taken_BFC0A604 = ((int32_t)psx_brA_BFC0A604 >= 0); - psx_delay_BFC0A604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC0A608: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A608u); -#endif - if (psx_delay_BFC0A604) { - psx_delay_BFC0A604 = 0; - if (psx_taken_BFC0A604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A610u); - goto label_BFC0A610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A60Cu); - } -label_BFC0A60C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A60Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A60C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A60Cu); -#endif -label_BFC0A610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0A610: 00017903 sra $t7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0A614: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0A618: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A61Cu); -#endif - /* 0xBFC0A61C: 8F399F20 lw $t9, -24800($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A61Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F20u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0A624: 13200003 beq $t9, $zero, 0xBFC0A634 */ - uint32_t psx_brA_BFC0A624 = cpu->gpr[25]; uint32_t psx_brB_BFC0A624 = cpu->gpr[0]; - psx_taken_BFC0A624 = (psx_brA_BFC0A624 == psx_brB_BFC0A624); - psx_delay_BFC0A624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A628u); -#endif - if (psx_delay_BFC0A624) { - psx_delay_BFC0A624 = 0; - if (psx_taken_BFC0A624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A634u); - goto label_BFC0A634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A62Cu); - } -label_BFC0A62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A62C: 10000045 beq $zero, $zero, 0xBFC0A744 */ - uint32_t psx_brA_BFC0A62C = cpu->gpr[0]; uint32_t psx_brB_BFC0A62C = cpu->gpr[0]; - psx_taken_BFC0A62C = (psx_brA_BFC0A62C == psx_brB_BFC0A62C); - psx_delay_BFC0A62C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A630: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A630u); -#endif - if (psx_delay_BFC0A62C) { - psx_delay_BFC0A62C = 0; - if (psx_taken_BFC0A62C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A744u); - goto label_BFC0A744; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A634u); - } -label_BFC0A634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0A634: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A634u); return; } g_debug_last_store_pc = 0xBFC0A634u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A638: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0A640u; /* jal link before delay slot */ - psx_delay_BFC0A638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0A63C: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A63Cu); return; } g_debug_last_store_pc = 0xBFC0A63Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A63Cu); -#endif - if (psx_delay_BFC0A638) { - psx_delay_BFC0A638 = 0; - cpu->gpr[31] = 0xBFC0A640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0A640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A640u); -#endif - /* 0xBFC0A640: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A640u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A644: 0FF02270 jal 0xBFC089C0 */ - cpu->gpr[31] = 0xBFC0A64Cu; /* jal link before delay slot */ - psx_delay_BFC0A644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0A648: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A648u); -#endif - if (psx_delay_BFC0A644) { - psx_delay_BFC0A644 = 0; - cpu->gpr[31] = 0xBFC0A64Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089C0u); - cpu->pc = 0xBFC089C0u; return; - } -label_BFC0A64C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A64Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A64C: 14400004 bne $v0, $zero, 0xBFC0A660 */ - uint32_t psx_brA_BFC0A64C = cpu->gpr[2]; uint32_t psx_brB_BFC0A64C = cpu->gpr[0]; - psx_taken_BFC0A64C = (psx_brA_BFC0A64C != psx_brB_BFC0A64C); - psx_delay_BFC0A64C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A650u); -#endif - /* 0xBFC0A650: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A650u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A650u); -#endif - if (psx_delay_BFC0A64C) { - psx_delay_BFC0A64C = 0; - if (psx_taken_BFC0A64C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A660u); - goto label_BFC0A660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A654u); - } -label_BFC0A654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A654: 1000003B beq $zero, $zero, 0xBFC0A744 */ - uint32_t psx_brA_BFC0A654 = cpu->gpr[0]; uint32_t psx_brB_BFC0A654 = cpu->gpr[0]; - psx_taken_BFC0A654 = (psx_brA_BFC0A654 == psx_brB_BFC0A654); - psx_delay_BFC0A654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A658: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A658u); -#endif - if (psx_delay_BFC0A654) { - psx_delay_BFC0A654 = 0; - if (psx_taken_BFC0A654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A744u); - goto label_BFC0A744; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A65Cu); - } -label_BFC0A65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A65Cu); -#endif - /* 0xBFC0A65C: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A65Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A65Cu); -#endif -label_BFC0A660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A660: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A664: 24639F98 addiu $v1, $v1, -24680 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24680)); - PGXP_ALU(0x24639F98u, cpu->gpr[3], _pgx1, 0xFFFF9F98u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC0A668: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0A66C: AFA50030 sw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A66Cu); return; } g_debug_last_store_pc = 0xBFC0A66Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A670: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC0A678u; /* jal link before delay slot */ - psx_delay_BFC0A670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0A674: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A674u); return; } g_debug_last_store_pc = 0xBFC0A674u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A674u); -#endif - if (psx_delay_BFC0A670) { - psx_delay_BFC0A670 = 0; - cpu->gpr[31] = 0xBFC0A678u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC0A678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A678u); -#endif - /* 0xBFC0A678: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A678u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A67Cu); -#endif - /* 0xBFC0A67C: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A67Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A680: 1440000B bne $v0, $zero, 0xBFC0A6B0 */ - uint32_t psx_brA_BFC0A680 = cpu->gpr[2]; uint32_t psx_brB_BFC0A680 = cpu->gpr[0]; - psx_taken_BFC0A680 = (psx_brA_BFC0A680 != psx_brB_BFC0A680); - psx_delay_BFC0A680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A684u); -#endif - /* 0xBFC0A684: 8FA8003C lw $t0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A684u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8003Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A684u); -#endif - if (psx_delay_BFC0A680) { - psx_delay_BFC0A680 = 0; - if (psx_taken_BFC0A680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6B0u); - goto label_BFC0A6B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A688u); - } -label_BFC0A688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A688: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A68C: 24849FAC addiu $a0, $a0, -24660 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24660)); - PGXP_ALU(0x24849FACu, cpu->gpr[4], _pgx1, 0xFFFF9FACu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A690: 2402003F addiu $v0, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2402003Fu, cpu->gpr[2], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A690u); -#endif -label_BFC0A694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A694: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC0A698: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A69C: 1420FFFD bne $at, $zero, 0xBFC0A694 */ - uint32_t psx_brA_BFC0A69C = cpu->gpr[1]; uint32_t psx_brB_BFC0A69C = cpu->gpr[0]; - psx_taken_BFC0A69C = (psx_brA_BFC0A69C != psx_brB_BFC0A69C); - psx_delay_BFC0A69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A6A0: A062FFFF sb $v0, -1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0A6A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6A0u); -#endif - if (psx_delay_BFC0A69C) { - psx_delay_BFC0A69C = 0; - if (psx_taken_BFC0A69C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A694u); - goto label_BFC0A694; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6A4u); - } -label_BFC0A6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6A4: 10000021 beq $zero, $zero, 0xBFC0A72C */ - uint32_t psx_brA_BFC0A6A4 = cpu->gpr[0]; uint32_t psx_brB_BFC0A6A4 = cpu->gpr[0]; - psx_taken_BFC0A6A4 = (psx_brA_BFC0A6A4 == psx_brB_BFC0A6A4); - psx_delay_BFC0A6A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A6A8: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0A6A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6A8u); -#endif - if (psx_delay_BFC0A6A4) { - psx_delay_BFC0A6A4 = 0; - if (psx_taken_BFC0A6A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A72Cu); - goto label_BFC0A72C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6ACu); - } -label_BFC0A6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6ACu); -#endif - /* 0xBFC0A6AC: 8FA8003C lw $t0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A6ACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8003Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6ACu); -#endif -label_BFC0A6B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6B4u); -#endif - /* 0xBFC0A6B4: 81090000 lb $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 9, 0x100u); - PGXP_LOAD(0x81090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0A6BC: 15200003 bne $t1, $zero, 0xBFC0A6CC */ - uint32_t psx_brA_BFC0A6BC = cpu->gpr[9]; uint32_t psx_brB_BFC0A6BC = cpu->gpr[0]; - psx_taken_BFC0A6BC = (psx_brA_BFC0A6BC != psx_brB_BFC0A6BC); - psx_delay_BFC0A6BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6C0u); -#endif - if (psx_delay_BFC0A6BC) { - psx_delay_BFC0A6BC = 0; - if (psx_taken_BFC0A6BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6CCu); - goto label_BFC0A6CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6C4u); - } -label_BFC0A6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6C4: 1000000A beq $zero, $zero, 0xBFC0A6F0 */ - uint32_t psx_brA_BFC0A6C4 = cpu->gpr[0]; uint32_t psx_brB_BFC0A6C4 = cpu->gpr[0]; - psx_taken_BFC0A6C4 = (psx_brA_BFC0A6C4 == psx_brB_BFC0A6C4); - psx_delay_BFC0A6C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0A6C8: 2404002A addiu $a0, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2404002Au, cpu->gpr[4], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6C8u); -#endif - if (psx_delay_BFC0A6C4) { - psx_delay_BFC0A6C4 = 0; - if (psx_taken_BFC0A6C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6F0u); - goto label_BFC0A6F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6CCu); - } -label_BFC0A6CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6CCu); -#endif - /* 0xBFC0A6CC: 80A20000 lb $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x80A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0A6D0: 2404002A addiu $a0, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2404002Au, cpu->gpr[4], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6D0u); -#endif -label_BFC0A6D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0A6D4: 10820006 beq $a0, $v0, 0xBFC0A6F0 */ - uint32_t psx_brA_BFC0A6D4 = cpu->gpr[4]; uint32_t psx_brB_BFC0A6D4 = cpu->gpr[2]; - psx_taken_BFC0A6D4 = (psx_brA_BFC0A6D4 == psx_brB_BFC0A6D4); - psx_delay_BFC0A6D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6D8u); -#endif - if (psx_delay_BFC0A6D4) { - psx_delay_BFC0A6D4 = 0; - if (psx_taken_BFC0A6D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6F0u); - goto label_BFC0A6F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6DCu); - } -label_BFC0A6DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A6DC: A0620000 sb $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0A6DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6E0u); -#endif - /* 0xBFC0A6E0: 80A20001 lb $v0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 2, 0x20u); - PGXP_LOAD(0x80A20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A6E4: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A6E8: 1440FFFA bne $v0, $zero, 0xBFC0A6D4 */ - uint32_t psx_brA_BFC0A6E8 = cpu->gpr[2]; uint32_t psx_brB_BFC0A6E8 = cpu->gpr[0]; - psx_taken_BFC0A6E8 = (psx_brA_BFC0A6E8 != psx_brB_BFC0A6E8); - psx_delay_BFC0A6E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A6EC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6ECu); -#endif - if (psx_delay_BFC0A6E8) { - psx_delay_BFC0A6E8 = 0; - if (psx_taken_BFC0A6E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6D4u); - goto label_BFC0A6D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A6F0u); - } -label_BFC0A6F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A6F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6F0u); -#endif - /* 0xBFC0A6F0: 80AA0000 lb $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 10, 0x20u); - PGXP_LOAD(0x80AA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC0A6F8: 148A000B bne $a0, $t2, 0xBFC0A728 */ - uint32_t psx_brA_BFC0A6F8 = cpu->gpr[4]; uint32_t psx_brB_BFC0A6F8 = cpu->gpr[10]; - psx_taken_BFC0A6F8 = (psx_brA_BFC0A6F8 != psx_brB_BFC0A6F8); - psx_delay_BFC0A6F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A6FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A6FCu); -#endif - if (psx_delay_BFC0A6F8) { - psx_delay_BFC0A6F8 = 0; - if (psx_taken_BFC0A6F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A728u); - goto label_BFC0A728; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A700u); - } -label_BFC0A700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A700: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A704: 24849FAC addiu $a0, $a0, -24660 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24660)); - PGXP_ALU(0x24849FACu, cpu->gpr[4], _pgx1, 0xFFFF9FACu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC0A708: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A70C: 10200006 beq $at, $zero, 0xBFC0A728 */ - uint32_t psx_brA_BFC0A70C = cpu->gpr[1]; uint32_t psx_brB_BFC0A70C = cpu->gpr[0]; - psx_taken_BFC0A70C = (psx_brA_BFC0A70C == psx_brB_BFC0A70C); - psx_delay_BFC0A70C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A710u); -#endif - if (psx_delay_BFC0A70C) { - psx_delay_BFC0A70C = 0; - if (psx_taken_BFC0A70C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A728u); - goto label_BFC0A728; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A714u); - } -label_BFC0A714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A714: 2402003F addiu $v0, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2402003Fu, cpu->gpr[2], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A714u); -#endif -label_BFC0A718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A718: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC0A71C: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A720: 1420FFFD bne $at, $zero, 0xBFC0A718 */ - uint32_t psx_brA_BFC0A720 = cpu->gpr[1]; uint32_t psx_brB_BFC0A720 = cpu->gpr[0]; - psx_taken_BFC0A720 = (psx_brA_BFC0A720 != psx_brB_BFC0A720); - psx_delay_BFC0A720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0A724: A062FFFF sb $v0, -1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0A724u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A724u); -#endif - if (psx_delay_BFC0A720) { - psx_delay_BFC0A720 = 0; - if (psx_taken_BFC0A720) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A718u); - goto label_BFC0A718; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A728u); - } -label_BFC0A728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A728: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0A728u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A728u); -#endif -label_BFC0A72C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A72Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0A72C: 240BFFFF addiu $t3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A730: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A734u); -#endif - /* 0xBFC0A734: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A734u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A738u); -#endif - /* 0xBFC0A738: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A738u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A73C: 0FF0292D jal 0xBFC0A4B4 */ - cpu->gpr[31] = 0xBFC0A744u; /* jal link before delay slot */ - psx_delay_BFC0A73C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0A740: AC2B9F8C sw $t3, -24692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A740u); return; } g_debug_last_store_pc = 0xBFC0A740u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9F8Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A740u); -#endif - if (psx_delay_BFC0A73C) { - psx_delay_BFC0A73C = 0; - cpu->gpr[31] = 0xBFC0A744u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A4B4u); - cpu->pc = 0xBFC0A4B4u; return; - } -label_BFC0A744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A744u); -#endif - /* 0xBFC0A744: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A744u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A748: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A74C: 03E00008 jr $ra */ - psx_delay_BFC0A74C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A750: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A750u); -#endif - if (psx_delay_BFC0A74C) { - psx_delay_BFC0A74C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A754(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A754u); - int psx_delay_BFC0A76C = 0; - int psx_taken_BFC0A76C = 0; - int psx_delay_BFC0A798 = 0; - int psx_taken_BFC0A798 = 0; - int psx_delay_BFC0A7BC = 0; - int psx_delay_BFC0A7C4 = 0; - int psx_taken_BFC0A7C4 = 0; - int psx_delay_BFC0A7D4 = 0; - int psx_taken_BFC0A7D4 = 0; - int psx_delay_BFC0A7E0 = 0; - int psx_delay_BFC0A7E8 = 0; - int psx_taken_BFC0A7E8 = 0; - int psx_delay_BFC0A7F4 = 0; - int psx_delay_BFC0A7FC = 0; - int psx_taken_BFC0A7FC = 0; - int psx_delay_BFC0A81C = 0; - int psx_taken_BFC0A81C = 0; - int psx_delay_BFC0A82C = 0; - int psx_taken_BFC0A82C = 0; - int psx_delay_BFC0A838 = 0; - int psx_delay_BFC0A840 = 0; - int psx_taken_BFC0A840 = 0; - int psx_delay_BFC0A84C = 0; - int psx_delay_BFC0A854 = 0; - int psx_taken_BFC0A854 = 0; - int psx_delay_BFC0A874 = 0; - int psx_taken_BFC0A874 = 0; - int psx_delay_BFC0A884 = 0; - int psx_taken_BFC0A884 = 0; - int psx_delay_BFC0A8B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A774u: goto label_BFC0A774; - case 0xBFC0A7A0u: goto label_BFC0A7A0; - case 0xBFC0A7A4u: goto label_BFC0A7A4; - case 0xBFC0A7BCu: goto label_BFC0A7BC; - case 0xBFC0A7C4u: goto label_BFC0A7C4; - case 0xBFC0A7CCu: goto label_BFC0A7CC; - case 0xBFC0A7DCu: goto label_BFC0A7DC; - case 0xBFC0A7E8u: goto label_BFC0A7E8; - case 0xBFC0A7F0u: goto label_BFC0A7F0; - case 0xBFC0A7FCu: goto label_BFC0A7FC; - case 0xBFC0A804u: goto label_BFC0A804; - case 0xBFC0A824u: goto label_BFC0A824; - case 0xBFC0A834u: goto label_BFC0A834; - case 0xBFC0A840u: goto label_BFC0A840; - case 0xBFC0A848u: goto label_BFC0A848; - case 0xBFC0A854u: goto label_BFC0A854; - case 0xBFC0A85Cu: goto label_BFC0A85C; - case 0xBFC0A87Cu: goto label_BFC0A87C; - case 0xBFC0A88Cu: goto label_BFC0A88C; - case 0xBFC0A8A4u: goto label_BFC0A8A4; - case 0xBFC0A8A8u: goto label_BFC0A8A8; - default: break; - } - } -label_BFC0A754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A754: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0A758: AFB30018 sw $s3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A758u); return; } g_debug_last_store_pc = 0xBFC0A758u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0A75C: AFB20014 sw $s2, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A75Cu); return; } g_debug_last_store_pc = 0xBFC0A75Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20014u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0A760: 28A1000F slti $at, $a1, 15 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (15) ? 1 : 0); - PGXP_ALU(0x28A1000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC0A764: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0A768: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A768u); return; } g_debug_last_store_pc = 0xBFC0A768u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A76C: 1020004D beq $at, $zero, 0xBFC0A8A4 */ - uint32_t psx_brA_BFC0A76C = cpu->gpr[1]; uint32_t psx_brB_BFC0A76C = cpu->gpr[0]; - psx_taken_BFC0A76C = (psx_brA_BFC0A76C == psx_brB_BFC0A76C); - psx_delay_BFC0A76C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC0A770: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A770u); -#endif - if (psx_delay_BFC0A76C) { - psx_delay_BFC0A76C = 0; - if (psx_taken_BFC0A76C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A8A4u); - goto label_BFC0A8A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A774u); - } -label_BFC0A774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0A774: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A774u); return; } g_debug_last_store_pc = 0xBFC0A774u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC0A778: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A778u); return; } g_debug_last_store_pc = 0xBFC0A778u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0A77C: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC0A780: AFB60024 sw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A780u); return; } g_debug_last_store_pc = 0xBFC0A780u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0A784: 2718BA88 addiu $t8, $t8, -17784 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-17784)); - PGXP_ALU(0x2718BA88u, cpu->gpr[24], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0A788: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A788u); return; } g_debug_last_store_pc = 0xBFC0A788u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC0A78C: 241600A1 addiu $s6, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x241600A1u, cpu->gpr[22], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0A790: 24150051 addiu $s5, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24150051u, cpu->gpr[21], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0A794: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A794u); return; } g_debug_last_store_pc = 0xBFC0A794u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0A798: 04810002 bgez $a0, 0xBFC0A7A4 */ - uint32_t psx_brA_BFC0A798 = cpu->gpr[4]; - psx_taken_BFC0A798 = ((int32_t)psx_brA_BFC0A798 >= 0); - psx_delay_BFC0A798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC0A79C: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A79Cu); -#endif - if (psx_delay_BFC0A798) { - psx_delay_BFC0A798 = 0; - if (psx_taken_BFC0A798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7A4u); - goto label_BFC0A7A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7A0u); - } -label_BFC0A7A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A7A0: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7A0u); -#endif -label_BFC0A7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0A7A4: 00017103 sra $t6, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017103u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0A7A8: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0A7AC: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0A7B0: 000F7940 sll $t7, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000F7940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1108000u); -#endif - /* 0xBFC0A7B4: 01F8A021 addu $s4, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[20] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC0A7B8: 0012C940 sll $t9, $s2, 5 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] << 5u; - PGXP_ALU(0x0012C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7B8u); -#endif -label_BFC0A7BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A7BC: 0FF036E4 jal 0xBFC0DB90 */ - cpu->gpr[31] = 0xBFC0A7C4u; /* jal link before delay slot */ - psx_delay_BFC0A7BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2120000u); -#endif - /* 0xBFC0A7C0: 02998821 addu $s1, $s4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[17] = cpu->gpr[20] + cpu->gpr[25]; - PGXP_ALU(0x02998821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7C0u); -#endif - if (psx_delay_BFC0A7BC) { - psx_delay_BFC0A7BC = 0; - cpu->gpr[31] = 0xBFC0A7C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB90u); - cpu->pc = 0xBFC0DB90u; return; - } -label_BFC0A7C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A7C4: 14400017 bne $v0, $zero, 0xBFC0A824 */ - uint32_t psx_brA_BFC0A7C4 = cpu->gpr[2]; uint32_t psx_brB_BFC0A7C4 = cpu->gpr[0]; - psx_taken_BFC0A7C4 = (psx_brA_BFC0A7C4 != psx_brB_BFC0A7C4); - psx_delay_BFC0A7C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A7C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7C8u); -#endif - if (psx_delay_BFC0A7C4) { - psx_delay_BFC0A7C4 = 0; - if (psx_taken_BFC0A7C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A824u); - goto label_BFC0A824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7CCu); - } -label_BFC0A7CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7CCu); -#endif - /* 0xBFC0A7CC: 8E280000 lw $t0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A7CCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x8E280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A7D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC0A7D4: 16A80029 bne $s5, $t0, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A7D4 = cpu->gpr[21]; uint32_t psx_brB_BFC0A7D4 = cpu->gpr[8]; - psx_taken_BFC0A7D4 = (psx_brA_BFC0A7D4 != psx_brB_BFC0A7D4); - psx_delay_BFC0A7D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A7D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7D8u); -#endif - if (psx_delay_BFC0A7D4) { - psx_delay_BFC0A7D4 = 0; - if (psx_taken_BFC0A7D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7DCu); - } -label_BFC0A7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0A7DC: 2630000A addiu $s0, $s1, 10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (10)); - PGXP_ALU(0x2630000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A7E0: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC0A7E8u; /* jal link before delay slot */ - psx_delay_BFC0A7E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0A7E4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7E4u); -#endif - if (psx_delay_BFC0A7E0) { - psx_delay_BFC0A7E0 = 0; - cpu->gpr[31] = 0xBFC0A7E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC0A7E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A7E8: 10400024 beq $v0, $zero, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A7E8 = cpu->gpr[2]; uint32_t psx_brB_BFC0A7E8 = cpu->gpr[0]; - psx_taken_BFC0A7E8 = (psx_brA_BFC0A7E8 == psx_brB_BFC0A7E8); - psx_delay_BFC0A7E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A7EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7ECu); -#endif - if (psx_delay_BFC0A7E8) { - psx_delay_BFC0A7E8 = 0; - if (psx_taken_BFC0A7E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7F0u); - } -label_BFC0A7F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0A7F0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A7F4: 0FF0290F jal 0xBFC0A43C */ - cpu->gpr[31] = 0xBFC0A7FCu; /* jal link before delay slot */ - psx_delay_BFC0A7F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC0A7F8: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A7F8u); -#endif - if (psx_delay_BFC0A7F4) { - psx_delay_BFC0A7F4 = 0; - cpu->gpr[31] = 0xBFC0A7FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A43Cu); - cpu->pc = 0xBFC0A43Cu; return; - } -label_BFC0A7FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A7FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A7FC: 1040001F beq $v0, $zero, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A7FC = cpu->gpr[2]; uint32_t psx_brB_BFC0A7FC = cpu->gpr[0]; - psx_taken_BFC0A7FC = (psx_brA_BFC0A7FC == psx_brB_BFC0A7FC); - psx_delay_BFC0A7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A800: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A800u); -#endif - if (psx_delay_BFC0A7FC) { - psx_delay_BFC0A7FC = 0; - if (psx_taken_BFC0A7FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A804u); - } -label_BFC0A804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A804u); -#endif - /* 0xBFC0A804: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A804u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A808u); -#endif - /* 0xBFC0A808: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A808u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A80Cu); -#endif - /* 0xBFC0A80C: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A80Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A810u); -#endif - /* 0xBFC0A810: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A810u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A814u); -#endif - /* 0xBFC0A814: 8FB60024 lw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A814u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC0A818: AC329F8C sw $s2, -24692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A818u); return; } g_debug_last_store_pc = 0xBFC0A818u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC329F8Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A81C: 10000022 beq $zero, $zero, 0xBFC0A8A8 */ - uint32_t psx_brA_BFC0A81C = cpu->gpr[0]; uint32_t psx_brB_BFC0A81C = cpu->gpr[0]; - psx_taken_BFC0A81C = (psx_brA_BFC0A81C == psx_brB_BFC0A81C); - psx_delay_BFC0A81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC0A820: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A820u); -#endif - if (psx_delay_BFC0A81C) { - psx_delay_BFC0A81C = 0; - if (psx_taken_BFC0A81C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A8A8u); - goto label_BFC0A8A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A824u); - } -label_BFC0A824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A824u); -#endif - /* 0xBFC0A824: 8E290000 lw $t1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A824u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x8E290000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC0A82C: 16C90013 bne $s6, $t1, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A82C = cpu->gpr[22]; uint32_t psx_brB_BFC0A82C = cpu->gpr[9]; - psx_taken_BFC0A82C = (psx_brA_BFC0A82C != psx_brB_BFC0A82C); - psx_delay_BFC0A82C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A830u); -#endif - if (psx_delay_BFC0A82C) { - psx_delay_BFC0A82C = 0; - if (psx_taken_BFC0A82C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A834u); - } -label_BFC0A834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0A834: 2630000A addiu $s0, $s1, 10 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (10)); - PGXP_ALU(0x2630000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A838: 0FF00D25 jal 0xBFC03494 */ - cpu->gpr[31] = 0xBFC0A840u; /* jal link before delay slot */ - psx_delay_BFC0A838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0A83C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A83Cu); -#endif - if (psx_delay_BFC0A838) { - psx_delay_BFC0A838 = 0; - cpu->gpr[31] = 0xBFC0A840u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03494u); - cpu->pc = 0xBFC03494u; return; - } -label_BFC0A840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A840: 1040000E beq $v0, $zero, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A840 = cpu->gpr[2]; uint32_t psx_brB_BFC0A840 = cpu->gpr[0]; - psx_taken_BFC0A840 = (psx_brA_BFC0A840 == psx_brB_BFC0A840); - psx_delay_BFC0A840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A844u); -#endif - if (psx_delay_BFC0A840) { - psx_delay_BFC0A840 = 0; - if (psx_taken_BFC0A840) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A848u); - } -label_BFC0A848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0A848: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A84C: 0FF0290F jal 0xBFC0A43C */ - cpu->gpr[31] = 0xBFC0A854u; /* jal link before delay slot */ - psx_delay_BFC0A84C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC0A850: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A850u); -#endif - if (psx_delay_BFC0A84C) { - psx_delay_BFC0A84C = 0; - cpu->gpr[31] = 0xBFC0A854u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A43Cu); - cpu->pc = 0xBFC0A43Cu; return; - } -label_BFC0A854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A854: 10400009 beq $v0, $zero, 0xBFC0A87C */ - uint32_t psx_brA_BFC0A854 = cpu->gpr[2]; uint32_t psx_brB_BFC0A854 = cpu->gpr[0]; - psx_taken_BFC0A854 = (psx_brA_BFC0A854 == psx_brB_BFC0A854); - psx_delay_BFC0A854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A858: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A858u); -#endif - if (psx_delay_BFC0A854) { - psx_delay_BFC0A854 = 0; - if (psx_taken_BFC0A854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - goto label_BFC0A87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A85Cu); - } -label_BFC0A85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A85Cu); -#endif - /* 0xBFC0A85C: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A85Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A860u); -#endif - /* 0xBFC0A860: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A860u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A864u); -#endif - /* 0xBFC0A864: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A864u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A868u); -#endif - /* 0xBFC0A868: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A868u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A86Cu); -#endif - /* 0xBFC0A86C: 8FB60024 lw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A86Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC0A870: AC329F8C sw $s2, -24692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A870u); return; } g_debug_last_store_pc = 0xBFC0A870u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC329F8Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A874: 1000000C beq $zero, $zero, 0xBFC0A8A8 */ - uint32_t psx_brA_BFC0A874 = cpu->gpr[0]; uint32_t psx_brB_BFC0A874 = cpu->gpr[0]; - psx_taken_BFC0A874 = (psx_brA_BFC0A874 == psx_brB_BFC0A874); - psx_delay_BFC0A874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC0A878: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A878u); -#endif - if (psx_delay_BFC0A874) { - psx_delay_BFC0A874 = 0; - if (psx_taken_BFC0A874) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A8A8u); - goto label_BFC0A8A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A87Cu); - } -label_BFC0A87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0A87C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC0A880: 2A41000F slti $at, $s2, 15 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0); - PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A884: 1420FFCD bne $at, $zero, 0xBFC0A7BC */ - uint32_t psx_brA_BFC0A884 = cpu->gpr[1]; uint32_t psx_brB_BFC0A884 = cpu->gpr[0]; - psx_taken_BFC0A884 = (psx_brA_BFC0A884 != psx_brB_BFC0A884); - psx_delay_BFC0A884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC0A888: 0012C940 sll $t9, $s2, 5 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] << 5u; - PGXP_ALU(0x0012C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A888u); -#endif - if (psx_delay_BFC0A884) { - psx_delay_BFC0A884 = 0; - if (psx_taken_BFC0A884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A7BCu); - goto label_BFC0A7BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A88Cu); - } -label_BFC0A88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A88Cu); -#endif - /* 0xBFC0A88C: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A88Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A890u); -#endif - /* 0xBFC0A890: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A890u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A894u); -#endif - /* 0xBFC0A894: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A894u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A898u); -#endif - /* 0xBFC0A898: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A898u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A89Cu); -#endif - /* 0xBFC0A89C: 8FB60024 lw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A89Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A8A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8A0u); -#endif -label_BFC0A8A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A8A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A8A4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8A4u); -#endif -label_BFC0A8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8A8u); -#endif - /* 0xBFC0A8A8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8ACu); -#endif - /* 0xBFC0A8AC: 8FB20014 lw $s2, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8ACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20014u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8B0u); -#endif - /* 0xBFC0A8B0: 8FB30018 lw $s3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8B0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0A8B4: 03E00008 jr $ra */ - psx_delay_BFC0A8B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A8B8: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8B8u); -#endif - if (psx_delay_BFC0A8B4) { - psx_delay_BFC0A8B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0A8BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0A8BCu); - int psx_delay_BFC0A8D8 = 0; - int psx_taken_BFC0A8D8 = 0; - int psx_delay_BFC0A8F8 = 0; - int psx_taken_BFC0A8F8 = 0; - int psx_delay_BFC0A900 = 0; - int psx_taken_BFC0A900 = 0; - int psx_delay_BFC0A910 = 0; - int psx_delay_BFC0A91C = 0; - int psx_delay_BFC0A924 = 0; - int psx_taken_BFC0A924 = 0; - int psx_delay_BFC0A92C = 0; - int psx_taken_BFC0A92C = 0; - int psx_delay_BFC0A934 = 0; - int psx_delay_BFC0A944 = 0; - int psx_delay_BFC0A950 = 0; - int psx_taken_BFC0A950 = 0; - int psx_delay_BFC0A964 = 0; - int psx_taken_BFC0A964 = 0; - int psx_delay_BFC0A994 = 0; - int psx_taken_BFC0A994 = 0; - int psx_delay_BFC0A9E4 = 0; - int psx_taken_BFC0A9E4 = 0; - int psx_delay_BFC0A9F8 = 0; - int psx_taken_BFC0A9F8 = 0; - int psx_delay_BFC0AA04 = 0; - int psx_taken_BFC0AA04 = 0; - int psx_delay_BFC0AA1C = 0; - int psx_taken_BFC0AA1C = 0; - int psx_delay_BFC0AA24 = 0; - int psx_taken_BFC0AA24 = 0; - int psx_delay_BFC0AA34 = 0; - int psx_taken_BFC0AA34 = 0; - int psx_delay_BFC0AA3C = 0; - int psx_taken_BFC0AA3C = 0; - int psx_delay_BFC0AA60 = 0; - int psx_taken_BFC0AA60 = 0; - int psx_delay_BFC0AA78 = 0; - int psx_taken_BFC0AA78 = 0; - int psx_delay_BFC0AA88 = 0; - int psx_taken_BFC0AA88 = 0; - int psx_delay_BFC0AA90 = 0; - int psx_taken_BFC0AA90 = 0; - int psx_delay_BFC0AAA8 = 0; - int psx_taken_BFC0AAA8 = 0; - int psx_delay_BFC0AAB8 = 0; - int psx_taken_BFC0AAB8 = 0; - int psx_delay_BFC0AADC = 0; - int psx_delay_BFC0AAE8 = 0; - int psx_taken_BFC0AAE8 = 0; - int psx_delay_BFC0AB08 = 0; - int psx_taken_BFC0AB08 = 0; - int psx_delay_BFC0AB28 = 0; - int psx_taken_BFC0AB28 = 0; - int psx_delay_BFC0AB3C = 0; - int psx_taken_BFC0AB3C = 0; - int psx_delay_BFC0AB58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0A8E0u: goto label_BFC0A8E0; - case 0xBFC0A8E4u: goto label_BFC0A8E4; - case 0xBFC0A900u: goto label_BFC0A900; - case 0xBFC0A908u: goto label_BFC0A908; - case 0xBFC0A918u: goto label_BFC0A918; - case 0xBFC0A924u: goto label_BFC0A924; - case 0xBFC0A92Cu: goto label_BFC0A92C; - case 0xBFC0A934u: goto label_BFC0A934; - case 0xBFC0A93Cu: goto label_BFC0A93C; - case 0xBFC0A94Cu: goto label_BFC0A94C; - case 0xBFC0A958u: goto label_BFC0A958; - case 0xBFC0A96Cu: goto label_BFC0A96C; - case 0xBFC0A984u: goto label_BFC0A984; - case 0xBFC0A99Cu: goto label_BFC0A99C; - case 0xBFC0A9ECu: goto label_BFC0A9EC; - case 0xBFC0A9F0u: goto label_BFC0A9F0; - case 0xBFC0AA00u: goto label_BFC0AA00; - case 0xBFC0AA0Cu: goto label_BFC0AA0C; - case 0xBFC0AA10u: goto label_BFC0AA10; - case 0xBFC0AA24u: goto label_BFC0AA24; - case 0xBFC0AA2Cu: goto label_BFC0AA2C; - case 0xBFC0AA3Cu: goto label_BFC0AA3C; - case 0xBFC0AA44u: goto label_BFC0AA44; - case 0xBFC0AA48u: goto label_BFC0AA48; - case 0xBFC0AA50u: goto label_BFC0AA50; - case 0xBFC0AA68u: goto label_BFC0AA68; - case 0xBFC0AA80u: goto label_BFC0AA80; - case 0xBFC0AA90u: goto label_BFC0AA90; - case 0xBFC0AA98u: goto label_BFC0AA98; - case 0xBFC0AAB0u: goto label_BFC0AAB0; - case 0xBFC0AAC0u: goto label_BFC0AAC0; - case 0xBFC0AAD8u: goto label_BFC0AAD8; - case 0xBFC0AAE4u: goto label_BFC0AAE4; - case 0xBFC0AAF0u: goto label_BFC0AAF0; - case 0xBFC0AB00u: goto label_BFC0AB00; - case 0xBFC0AB10u: goto label_BFC0AB10; - case 0xBFC0AB24u: goto label_BFC0AB24; - case 0xBFC0AB30u: goto label_BFC0AB30; - case 0xBFC0AB44u: goto label_BFC0AB44; - case 0xBFC0AB50u: goto label_BFC0AB50; - default: break; - } - } -label_BFC0A8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0A8BC: 27BDFF78 addiu $sp, $sp, -136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-136)); - PGXP_ALU(0x27BDFF78u, cpu->gpr[29], _pgx1, 0xFFFFFF78u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0A8C0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8C0u); return; } g_debug_last_store_pc = 0xBFC0A8C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0A8C4: AFA5008C sw $a1, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8C4u); return; } g_debug_last_store_pc = 0xBFC0A8C4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5008Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8C8u); -#endif - /* 0xBFC0A8C8: 8C830004 lw $v1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0A8CC: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0A8D0: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0A8D4: AC8E0018 sw $t6, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8D4u); return; } g_debug_last_store_pc = 0xBFC0A8D4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A8D8: 04610002 bgez $v1, 0xBFC0A8E4 */ - uint32_t psx_brA_BFC0A8D8 = cpu->gpr[3]; - psx_taken_BFC0A8D8 = ((int32_t)psx_brA_BFC0A8D8 >= 0); - psx_delay_BFC0A8D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC0A8DC: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8DCu); -#endif - if (psx_delay_BFC0A8D8) { - psx_delay_BFC0A8D8 = 0; - if (psx_taken_BFC0A8D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A8E4u); - goto label_BFC0A8E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A8E0u); - } -label_BFC0A8E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A8E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A8E0: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8E0u); -#endif -label_BFC0A8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0A8E4: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0A8E8: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0A8EC: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8F0u); -#endif - /* 0xBFC0A8F0: 8F189F20 lw $t8, -24800($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A8F0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F20u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A8F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0A8F8: 13000003 beq $t8, $zero, 0xBFC0A908 */ - uint32_t psx_brA_BFC0A8F8 = cpu->gpr[24]; uint32_t psx_brB_BFC0A8F8 = cpu->gpr[0]; - psx_taken_BFC0A8F8 = (psx_brA_BFC0A8F8 == psx_brB_BFC0A8F8); - psx_delay_BFC0A8F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A8FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A8FCu); -#endif - if (psx_delay_BFC0A8F8) { - psx_delay_BFC0A8F8 = 0; - if (psx_taken_BFC0A8F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A908u); - goto label_BFC0A908; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A900u); - } -label_BFC0A900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A900: 10000093 beq $zero, $zero, 0xBFC0AB50 */ - uint32_t psx_brA_BFC0A900 = cpu->gpr[0]; uint32_t psx_brB_BFC0A900 = cpu->gpr[0]; - psx_taken_BFC0A900 = (psx_brA_BFC0A900 == psx_brB_BFC0A900); - psx_delay_BFC0A900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A904: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A904u); -#endif - if (psx_delay_BFC0A900) { - psx_delay_BFC0A900 = 0; - if (psx_taken_BFC0A900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB50u); - goto label_BFC0AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A908u); - } -label_BFC0A908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0A908: AFA20030 sw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A908u); return; } g_debug_last_store_pc = 0xBFC0A908u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0A90C: AFA3003C sw $v1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A90Cu); return; } g_debug_last_store_pc = 0xBFC0A90Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3003Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A910: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0A918u; /* jal link before delay slot */ - psx_delay_BFC0A910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0A914: AFA40088 sw $a0, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A914u); return; } g_debug_last_store_pc = 0xBFC0A914u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40088u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A914u); -#endif - if (psx_delay_BFC0A910) { - psx_delay_BFC0A910 = 0; - cpu->gpr[31] = 0xBFC0A918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0A918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A918u); -#endif - /* 0xBFC0A918: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A918u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A91C: 0FF02270 jal 0xBFC089C0 */ - cpu->gpr[31] = 0xBFC0A924u; /* jal link before delay slot */ - psx_delay_BFC0A91C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A920u); -#endif - if (psx_delay_BFC0A91C) { - psx_delay_BFC0A91C = 0; - cpu->gpr[31] = 0xBFC0A924u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089C0u); - cpu->pc = 0xBFC089C0u; return; - } -label_BFC0A924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A924: 14400003 bne $v0, $zero, 0xBFC0A934 */ - uint32_t psx_brA_BFC0A924 = cpu->gpr[2]; uint32_t psx_brB_BFC0A924 = cpu->gpr[0]; - psx_taken_BFC0A924 = (psx_brA_BFC0A924 != psx_brB_BFC0A924); - psx_delay_BFC0A924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A928u); -#endif - if (psx_delay_BFC0A924) { - psx_delay_BFC0A924 = 0; - if (psx_taken_BFC0A924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A934u); - goto label_BFC0A934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A92Cu); - } -label_BFC0A92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A92C: 10000088 beq $zero, $zero, 0xBFC0AB50 */ - uint32_t psx_brA_BFC0A92C = cpu->gpr[0]; uint32_t psx_brB_BFC0A92C = cpu->gpr[0]; - psx_taken_BFC0A92C = (psx_brA_BFC0A92C == psx_brB_BFC0A92C); - psx_delay_BFC0A92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A930: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A930u); -#endif - if (psx_delay_BFC0A92C) { - psx_delay_BFC0A92C = 0; - if (psx_taken_BFC0A92C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB50u); - goto label_BFC0AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A934u); - } -label_BFC0A934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A934: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC0A93Cu; /* jal link before delay slot */ - psx_delay_BFC0A934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0A938: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A938u); -#endif - if (psx_delay_BFC0A934) { - psx_delay_BFC0A934 = 0; - cpu->gpr[31] = 0xBFC0A93Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC0A93C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A93Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A93Cu); -#endif - /* 0xBFC0A93C: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A93Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A940u); -#endif - /* 0xBFC0A940: 8FA6008C lw $a2, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A940u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6008Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0A944: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0A94Cu; /* jal link before delay slot */ - psx_delay_BFC0A944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0A948: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A948u); -#endif - if (psx_delay_BFC0A944) { - psx_delay_BFC0A944 = 0; - cpu->gpr[31] = 0xBFC0A94Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0A94C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A94Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0A94C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0A950: 14410006 bne $v0, $at, 0xBFC0A96C */ - uint32_t psx_brA_BFC0A950 = cpu->gpr[2]; uint32_t psx_brB_BFC0A950 = cpu->gpr[1]; - psx_taken_BFC0A950 = (psx_brA_BFC0A950 != psx_brB_BFC0A950); - psx_delay_BFC0A950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A954u); -#endif - if (psx_delay_BFC0A950) { - psx_delay_BFC0A950 = 0; - if (psx_taken_BFC0A950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A96Cu); - goto label_BFC0A96C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A958u); - } -label_BFC0A958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A958u); -#endif - /* 0xBFC0A958: 8FAB0088 lw $t3, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A958u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0088u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0A95C: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0A960: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A964: 1000007A beq $zero, $zero, 0xBFC0AB50 */ - uint32_t psx_brA_BFC0A964 = cpu->gpr[0]; uint32_t psx_brB_BFC0A964 = cpu->gpr[0]; - psx_taken_BFC0A964 = (psx_brA_BFC0A964 == psx_brB_BFC0A964); - psx_delay_BFC0A964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC0A968: AD790018 sw $t9, 24($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A968u); return; } g_debug_last_store_pc = 0xBFC0A968u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD790018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A968u); -#endif - if (psx_delay_BFC0A964) { - psx_delay_BFC0A964 = 0; - if (psx_taken_BFC0A964) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB50u); - goto label_BFC0AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A96Cu); - } -label_BFC0A96C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A96Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0A96C: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A96Cu); return; } g_debug_last_store_pc = 0xBFC0A96Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0A970: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0A974: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A974u); return; } g_debug_last_store_pc = 0xBFC0A974u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0A978: 27A400C4 addiu $a0, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A400C4u, cpu->gpr[4], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0A97C: AFA0004C sw $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A97Cu); return; } g_debug_last_store_pc = 0xBFC0A97Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0A980: 27A30094 addiu $v1, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A30094u, cpu->gpr[3], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A980u); -#endif -label_BFC0A984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A984: AC60FFBC sw $zero, -68($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A984u); return; } g_debug_last_store_pc = 0xBFC0A984u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0A988: 24630010 addiu $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16)); - PGXP_ALU(0x24630010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A98C: AC60FFB0 sw $zero, -80($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A98Cu); return; } g_debug_last_store_pc = 0xBFC0A98Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A990: AC60FFB4 sw $zero, -76($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A990u); return; } g_debug_last_store_pc = 0xBFC0A990u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFB4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0A994: 1464FFFB bne $v1, $a0, 0xBFC0A984 */ - uint32_t psx_brA_BFC0A994 = cpu->gpr[3]; uint32_t psx_brB_BFC0A994 = cpu->gpr[4]; - psx_taken_BFC0A994 = (psx_brA_BFC0A994 != psx_brB_BFC0A994); - psx_delay_BFC0A994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0A998: AC60FFB8 sw $zero, -72($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A998u); return; } g_debug_last_store_pc = 0xBFC0A998u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A998u); -#endif - if (psx_delay_BFC0A994) { - psx_delay_BFC0A994 = 0; - if (psx_taken_BFC0A994) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A984u); - goto label_BFC0A984; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A99Cu); - } -label_BFC0A99C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A99Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A99Cu); -#endif - /* 0xBFC0A99C: 8FAC0030 lw $t4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A99Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0A9A0: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC0A9A4: 000C6900 sll $t5, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC0A9A8: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0A9AC: 000D6940 sll $t5, $t5, 5 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 5u; - PGXP_ALU(0x000D6940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0A9B0: 25CEBA88 addiu $t6, $t6, -17784 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-17784)); - PGXP_ALU(0x25CEBA88u, cpu->gpr[14], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6100u); -#endif - /* 0xBFC0A9B4: 01AE4021 addu $t0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[8] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0A9B8: 00027940 sll $t7, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 5u; - PGXP_ALU(0x00027940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8108u); -#endif - /* 0xBFC0A9BC: 010F1821 addu $v1, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0A9C0: 241800A1 addiu $t8, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x241800A1u, cpu->gpr[24], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC0A9C4: 00025880 sll $t3, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0A9C8: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A9C8u); return; } g_debug_last_store_pc = 0xBFC0A9C8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001800u); -#endif - /* 0xBFC0A9CC: 03AB6021 addu $t4, $sp, $t3 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[29] + cpu->gpr[11]; - PGXP_ALU(0x03AB6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0A9D0: 24190051 addiu $t9, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24190051u, cpu->gpr[25], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC0A9D4: AD990044 sw $t9, 68($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A9D4u); return; } g_debug_last_store_pc = 0xBFC0A9D4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD990044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9D8u); -#endif - /* 0xBFC0A9D8: 8C650004 lw $a1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A9D8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x8C650004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9DCu); -#endif - /* 0xBFC0A9DC: 94660008 lhu $a2, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0A9DCu); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x94660008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0A9E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A9E4: 04A10002 bgez $a1, 0xBFC0A9F0 */ - uint32_t psx_brA_BFC0A9E4 = cpu->gpr[5]; - psx_taken_BFC0A9E4 = ((int32_t)psx_brA_BFC0A9E4 >= 0); - psx_delay_BFC0A9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC0A9E8: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9E8u); -#endif - if (psx_delay_BFC0A9E4) { - psx_delay_BFC0A9E4 = 0; - if (psx_taken_BFC0A9E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A9F0u); - goto label_BFC0A9F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A9ECu); - } -label_BFC0A9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0A9EC: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9ECu); -#endif -label_BFC0A9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0A9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0A9F0: 00012B43 sra $a1, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00012B43u, cpu->gpr[5], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A9F4: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0A9F8: 1CA00005 bgtz $a1, 0xBFC0AA10 */ - uint32_t psx_brA_BFC0A9F8 = cpu->gpr[5]; - psx_taken_BFC0A9F8 = ((int32_t)psx_brA_BFC0A9F8 > 0); - psx_delay_BFC0A9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0A9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC0A9FC: 00066940 sll $t5, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] << 5u; - PGXP_ALU(0x00066940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0A9FCu); -#endif - if (psx_delay_BFC0A9F8) { - psx_delay_BFC0A9F8 = 0; - if (psx_taken_BFC0A9F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA10u); - goto label_BFC0AA10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA00u); - } -label_BFC0AA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0AA00: 240A0052 addiu $t2, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240A0052u, cpu->gpr[10], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA04: 10000022 beq $zero, $zero, 0xBFC0AA90 */ - uint32_t psx_brA_BFC0AA04 = cpu->gpr[0]; uint32_t psx_brB_BFC0AA04 = cpu->gpr[0]; - psx_taken_BFC0AA04 = (psx_brA_BFC0AA04 == psx_brB_BFC0AA04); - psx_delay_BFC0AA04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AA08: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA08u); -#endif - if (psx_delay_BFC0AA04) { - psx_delay_BFC0AA04 = 0; - if (psx_taken_BFC0AA04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - goto label_BFC0AA90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA0Cu); - } -label_BFC0AA0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC0AA0C: 00066940 sll $t5, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] << 5u; - PGXP_ALU(0x00066940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA0Cu); -#endif -label_BFC0AA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2108u); -#endif - /* 0xBFC0AA10: 010D1821 addu $v1, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[13]; - PGXP_ALU(0x010D1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA14u); -#endif - /* 0xBFC0AA14: 94620008 lhu $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA14u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x94620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AA18: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC0AA1C: 15220003 bne $t1, $v0, 0xBFC0AA2C */ - uint32_t psx_brA_BFC0AA1C = cpu->gpr[9]; uint32_t psx_brB_BFC0AA1C = cpu->gpr[2]; - psx_taken_BFC0AA1C = (psx_brA_BFC0AA1C != psx_brB_BFC0AA1C); - psx_delay_BFC0AA1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA20u); -#endif - if (psx_delay_BFC0AA1C) { - psx_delay_BFC0AA1C = 0; - if (psx_taken_BFC0AA1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA2Cu); - goto label_BFC0AA2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA24u); - } -label_BFC0AA24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA24: 1000001A beq $zero, $zero, 0xBFC0AA90 */ - uint32_t psx_brA_BFC0AA24 = cpu->gpr[0]; uint32_t psx_brB_BFC0AA24 = cpu->gpr[0]; - psx_taken_BFC0AA24 = (psx_brA_BFC0AA24 == psx_brB_BFC0AA24); - psx_delay_BFC0AA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0AA28: 240A0052 addiu $t2, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240A0052u, cpu->gpr[10], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA28u); -#endif - if (psx_delay_BFC0AA24) { - psx_delay_BFC0AA24 = 0; - if (psx_taken_BFC0AA24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - goto label_BFC0AA90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA2Cu); - } -label_BFC0AA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA2Cu); -#endif - /* 0xBFC0AA2C: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA2Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0AA30: 24070052 addiu $a3, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24070052u, cpu->gpr[7], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC0AA34: 10EE0004 beq $a3, $t6, 0xBFC0AA48 */ - uint32_t psx_brA_BFC0AA34 = cpu->gpr[7]; uint32_t psx_brB_BFC0AA34 = cpu->gpr[14]; - psx_taken_BFC0AA34 = (psx_brA_BFC0AA34 == psx_brB_BFC0AA34); - psx_delay_BFC0AA34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AA38: 240400A2 addiu $a0, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240400A2u, cpu->gpr[4], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA38u); -#endif - if (psx_delay_BFC0AA34) { - psx_delay_BFC0AA34 = 0; - if (psx_taken_BFC0AA34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA48u); - goto label_BFC0AA48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA3Cu); - } -label_BFC0AA3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA3C: 10000014 beq $zero, $zero, 0xBFC0AA90 */ - uint32_t psx_brA_BFC0AA3C = cpu->gpr[0]; uint32_t psx_brB_BFC0AA3C = cpu->gpr[0]; - psx_taken_BFC0AA3C = (psx_brA_BFC0AA3C == psx_brB_BFC0AA3C); - psx_delay_BFC0AA3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0AA40: 240A0052 addiu $t2, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240A0052u, cpu->gpr[10], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA40u); -#endif - if (psx_delay_BFC0AA3C) { - psx_delay_BFC0AA3C = 0; - if (psx_taken_BFC0AA3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - goto label_BFC0AA90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA44u); - } -label_BFC0AA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AA44: 240400A2 addiu $a0, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240400A2u, cpu->gpr[4], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA44u); -#endif -label_BFC0AA48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0AA48: 240A0052 addiu $t2, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240A0052u, cpu->gpr[10], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC0AA4C: 00067880 sll $t7, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA4Cu); -#endif -label_BFC0AA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC0AA50: AC640000 sw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA50u); return; } g_debug_last_store_pc = 0xBFC0AA50u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21008000u); -#endif - /* 0xBFC0AA54: 03AFC021 addu $t8, $sp, $t7 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[15]; - PGXP_ALU(0x03AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AA58: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC0AA5C: AF0A0044 sw $t2, 68($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA5Cu); return; } g_debug_last_store_pc = 0xBFC0AA5Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAF0A0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AA60: 18A0000B blez $a1, 0xBFC0AA90 */ - uint32_t psx_brA_BFC0AA60 = cpu->gpr[5]; - psx_taken_BFC0AA60 = ((int32_t)psx_brA_BFC0AA60 <= 0); - psx_delay_BFC0AA60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC0AA64: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA64u); -#endif - if (psx_delay_BFC0AA60) { - psx_delay_BFC0AA60 = 0; - if (psx_taken_BFC0AA60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - goto label_BFC0AA90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA68u); - } -label_BFC0AA68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC0AA68: 0006C940 sll $t9, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] << 5u; - PGXP_ALU(0x0006C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC0AA6C: 01191821 addu $v1, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01191821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA70u); -#endif - /* 0xBFC0AA70: 94620008 lhu $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA70u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x94620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC0AA78: 11220005 beq $t1, $v0, 0xBFC0AA90 */ - uint32_t psx_brA_BFC0AA78 = cpu->gpr[9]; uint32_t psx_brB_BFC0AA78 = cpu->gpr[2]; - psx_taken_BFC0AA78 = (psx_brA_BFC0AA78 == psx_brB_BFC0AA78); - psx_delay_BFC0AA78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA7Cu); -#endif - if (psx_delay_BFC0AA78) { - psx_delay_BFC0AA78 = 0; - if (psx_taken_BFC0AA78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - goto label_BFC0AA90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA80u); - } -label_BFC0AA80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA80u); -#endif - /* 0xBFC0AA80: 8C6B0000 lw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA80u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AA84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC0AA88: 10EBFFF1 beq $a3, $t3, 0xBFC0AA50 */ - uint32_t psx_brA_BFC0AA88 = cpu->gpr[7]; uint32_t psx_brB_BFC0AA88 = cpu->gpr[11]; - psx_taken_BFC0AA88 = (psx_brA_BFC0AA88 == psx_brB_BFC0AA88); - psx_delay_BFC0AA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC0AA8C: 00067880 sll $t7, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA8Cu); -#endif - if (psx_delay_BFC0AA88) { - psx_delay_BFC0AA88 = 0; - if (psx_taken_BFC0AA88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA50u); - goto label_BFC0AA50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA90u); - } -label_BFC0AA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AA90: 18A00011 blez $a1, 0xBFC0AAD8 */ - uint32_t psx_brA_BFC0AA90 = cpu->gpr[5]; - psx_taken_BFC0AA90 = ((int32_t)psx_brA_BFC0AA90 <= 0); - psx_delay_BFC0AA90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA94u); -#endif - /* 0xBFC0AA94: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AA94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA94u); -#endif - if (psx_delay_BFC0AA90) { - psx_delay_BFC0AA90 = 0; - if (psx_taken_BFC0AA90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAD8u); - goto label_BFC0AAD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AA98u); - } -label_BFC0AA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC0AA98: 00066140 sll $t4, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] << 5u; - PGXP_ALU(0x00066140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1108u); -#endif - /* 0xBFC0AA9C: 010C1821 addu $v1, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[12]; - PGXP_ALU(0x010C1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAA0u); -#endif - /* 0xBFC0AAA0: 946D0008 lhu $t5, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAA0u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x946D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AAA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC0AAA8: 152D000B bne $t1, $t5, 0xBFC0AAD8 */ - uint32_t psx_brA_BFC0AAA8 = cpu->gpr[9]; uint32_t psx_brB_BFC0AAA8 = cpu->gpr[13]; - psx_taken_BFC0AAA8 = (psx_brA_BFC0AAA8 != psx_brB_BFC0AAA8); - psx_delay_BFC0AAA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAACu); -#endif - /* 0xBFC0AAAC: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAACu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAACu); -#endif - if (psx_delay_BFC0AAA8) { - psx_delay_BFC0AAA8 = 0; - if (psx_taken_BFC0AAA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAD8u); - goto label_BFC0AAD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAB0u); - } -label_BFC0AAB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AAB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAB0u); -#endif - /* 0xBFC0AAB0: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0AAB4: 24010053 addiu $at, $zero, 83 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); - PGXP_ALU(0x24010053u, cpu->gpr[1], _pgx1, 0x00000053u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0AAB8: 15C10007 bne $t6, $at, 0xBFC0AAD8 */ - uint32_t psx_brA_BFC0AAB8 = cpu->gpr[14]; uint32_t psx_brB_BFC0AAB8 = cpu->gpr[1]; - psx_taken_BFC0AAB8 = (psx_brA_BFC0AAB8 != psx_brB_BFC0AAB8); - psx_delay_BFC0AAB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AABCu); -#endif - /* 0xBFC0AABC: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AABCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AABCu); -#endif - if (psx_delay_BFC0AAB8) { - psx_delay_BFC0AAB8 = 0; - if (psx_taken_BFC0AAB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAD8u); - goto label_BFC0AAD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAC0u); - } -label_BFC0AAC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AAC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0AAC0: 240F00A3 addiu $t7, $zero, 163 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (163)); - PGXP_ALU(0x240F00A3u, cpu->gpr[15], _pgx1, 0x000000A3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC0AAC4: 0006C080 sll $t8, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 2u; - PGXP_ALU(0x0006C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0AAC8: AC6F0000 sw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAC8u); return; } g_debug_last_store_pc = 0xBFC0AAC8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23000000u); -#endif - /* 0xBFC0AACC: 03B8C821 addu $t9, $sp, $t8 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[29] + cpu->gpr[24]; - PGXP_ALU(0x03B8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC0AAD0: AF2A0044 sw $t2, 68($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAD0u); return; } g_debug_last_store_pc = 0xBFC0AAD0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAF2A0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAD4u); -#endif - /* 0xBFC0AAD4: 8FA4003C lw $a0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAD4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4003Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAD4u); -#endif -label_BFC0AAD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AAD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0AAD8: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AADC: 0FF0262A jal 0xBFC098A8 */ - cpu->gpr[31] = 0xBFC0AAE4u; /* jal link before delay slot */ - psx_delay_BFC0AADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0AAE0: AFA80028 sw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAE0u); return; } g_debug_last_store_pc = 0xBFC0AAE0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAE0u); -#endif - if (psx_delay_BFC0AADC) { - psx_delay_BFC0AADC = 0; - cpu->gpr[31] = 0xBFC0AAE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC098A8u); - cpu->pc = 0xBFC098A8u; return; - } -label_BFC0AAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAE4u); -#endif - /* 0xBFC0AAE4: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AAE4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AAE8: 10400016 beq $v0, $zero, 0xBFC0AB44 */ - uint32_t psx_brA_BFC0AAE8 = cpu->gpr[2]; uint32_t psx_brB_BFC0AAE8 = cpu->gpr[0]; - psx_taken_BFC0AAE8 = (psx_brA_BFC0AAE8 == psx_brB_BFC0AAE8); - psx_delay_BFC0AAE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AAEC: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAECu); -#endif - if (psx_delay_BFC0AAE8) { - psx_delay_BFC0AAE8 = 0; - if (psx_taken_BFC0AAE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB44u); - goto label_BFC0AB44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AAF0u); - } -label_BFC0AAF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AAF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AAF0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0AAF4: 27A30088 addiu $v1, $sp, 136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (136)); - PGXP_ALU(0x27A30088u, cpu->gpr[3], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0AAF8: 240500A0 addiu $a1, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240500A0u, cpu->gpr[5], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0AAFC: 2406000F addiu $a2, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2406000Fu, cpu->gpr[6], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AAFCu); -#endif -label_BFC0AB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB00u); -#endif - /* 0xBFC0AB00: 8C6BFFBC lw $t3, -68($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB00u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6BFFBCu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AB04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0AB08: 11600006 beq $t3, $zero, 0xBFC0AB24 */ - uint32_t psx_brA_BFC0AB08 = cpu->gpr[11]; uint32_t psx_brB_BFC0AB08 = cpu->gpr[0]; - psx_taken_BFC0AB08 = (psx_brA_BFC0AB08 == psx_brB_BFC0AB08); - psx_delay_BFC0AB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AB0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB0Cu); -#endif - if (psx_delay_BFC0AB08) { - psx_delay_BFC0AB08 = 0; - if (psx_taken_BFC0AB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB24u); - goto label_BFC0AB24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB10u); - } -label_BFC0AB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC0AB10: 00046140 sll $t4, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00046140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1104u); -#endif - /* 0xBFC0AB14: 010C1021 addu $v0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[12]; - PGXP_ALU(0x010C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AB18: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB18u); return; } g_debug_last_store_pc = 0xBFC0AB18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC0AB1C: A4490008 sh $t1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB1Cu); return; } g_debug_last_store_pc = 0xBFC0AB1Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4490008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC0AB20: AC450000 sw $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB20u); return; } g_debug_last_store_pc = 0xBFC0AB20u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB20u); -#endif -label_BFC0AB24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0AB24: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC0AB28: 1486FFF5 bne $a0, $a2, 0xBFC0AB00 */ - uint32_t psx_brA_BFC0AB28 = cpu->gpr[4]; uint32_t psx_brB_BFC0AB28 = cpu->gpr[6]; - psx_taken_BFC0AB28 = (psx_brA_BFC0AB28 != psx_brB_BFC0AB28); - psx_delay_BFC0AB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0AB2C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB2Cu); -#endif - if (psx_delay_BFC0AB28) { - psx_delay_BFC0AB28 = 0; - if (psx_taken_BFC0AB28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB00u); - goto label_BFC0AB00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB30u); - } -label_BFC0AB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB30u); -#endif - /* 0xBFC0AB30: 8FAE0088 lw $t6, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB30u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0088u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0AB34: 240D0010 addiu $t5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240D0010u, cpu->gpr[13], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AB38: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AB3C: 10000004 beq $zero, $zero, 0xBFC0AB50 */ - uint32_t psx_brA_BFC0AB3C = cpu->gpr[0]; uint32_t psx_brB_BFC0AB3C = cpu->gpr[0]; - psx_taken_BFC0AB3C = (psx_brA_BFC0AB3C == psx_brB_BFC0AB3C); - psx_delay_BFC0AB3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0AB40: ADCD0018 sw $t5, 24($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB40u); return; } g_debug_last_store_pc = 0xBFC0AB40u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB40u); -#endif - if (psx_delay_BFC0AB3C) { - psx_delay_BFC0AB3C = 0; - if (psx_taken_BFC0AB3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB50u); - goto label_BFC0AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB44u); - } -label_BFC0AB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB44u); -#endif - /* 0xBFC0AB44: 8FAF0088 lw $t7, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB44u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0088u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AB48: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0AB4C: ADE00018 sw $zero, 24($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB4Cu); return; } g_debug_last_store_pc = 0xBFC0AB4Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADE00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB4Cu); -#endif -label_BFC0AB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB50u); -#endif - /* 0xBFC0AB50: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0AB54: 27BD0088 addiu $sp, $sp, 136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (136)); - PGXP_ALU(0x27BD0088u, cpu->gpr[29], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0AB58: 03E00008 jr $ra */ - psx_delay_BFC0AB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AB5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB5Cu); -#endif - if (psx_delay_BFC0AB58) { - psx_delay_BFC0AB58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0AB60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0AB60u); - int psx_delay_BFC0AB8C = 0; - int psx_taken_BFC0AB8C = 0; - int psx_delay_BFC0ABAC = 0; - int psx_taken_BFC0ABAC = 0; - int psx_delay_BFC0ABB4 = 0; - int psx_taken_BFC0ABB4 = 0; - int psx_delay_BFC0ABC0 = 0; - int psx_delay_BFC0ABCC = 0; - int psx_delay_BFC0ABD4 = 0; - int psx_taken_BFC0ABD4 = 0; - int psx_delay_BFC0ABDC = 0; - int psx_taken_BFC0ABDC = 0; - int psx_delay_BFC0ABE4 = 0; - int psx_delay_BFC0ABF4 = 0; - int psx_delay_BFC0AC00 = 0; - int psx_taken_BFC0AC00 = 0; - int psx_delay_BFC0AC10 = 0; - int psx_taken_BFC0AC10 = 0; - int psx_delay_BFC0AC20 = 0; - int psx_delay_BFC0AC2C = 0; - int psx_taken_BFC0AC2C = 0; - int psx_delay_BFC0AC3C = 0; - int psx_taken_BFC0AC3C = 0; - int psx_delay_BFC0AC6C = 0; - int psx_taken_BFC0AC6C = 0; - int psx_delay_BFC0ACA0 = 0; - int psx_delay_BFC0ACC0 = 0; - int psx_delay_BFC0ACC8 = 0; - int psx_taken_BFC0ACC8 = 0; - int psx_delay_BFC0ACD8 = 0; - int psx_delay_BFC0ACE8 = 0; - int psx_taken_BFC0ACE8 = 0; - int psx_delay_BFC0AD00 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0AB94u: goto label_BFC0AB94; - case 0xBFC0AB98u: goto label_BFC0AB98; - case 0xBFC0ABB4u: goto label_BFC0ABB4; - case 0xBFC0ABBCu: goto label_BFC0ABBC; - case 0xBFC0ABC8u: goto label_BFC0ABC8; - case 0xBFC0ABD4u: goto label_BFC0ABD4; - case 0xBFC0ABDCu: goto label_BFC0ABDC; - case 0xBFC0ABE4u: goto label_BFC0ABE4; - case 0xBFC0ABECu: goto label_BFC0ABEC; - case 0xBFC0ABFCu: goto label_BFC0ABFC; - case 0xBFC0AC08u: goto label_BFC0AC08; - case 0xBFC0AC18u: goto label_BFC0AC18; - case 0xBFC0AC1Cu: goto label_BFC0AC1C; - case 0xBFC0AC28u: goto label_BFC0AC28; - case 0xBFC0AC34u: goto label_BFC0AC34; - case 0xBFC0AC44u: goto label_BFC0AC44; - case 0xBFC0AC5Cu: goto label_BFC0AC5C; - case 0xBFC0AC74u: goto label_BFC0AC74; - case 0xBFC0ACA8u: goto label_BFC0ACA8; - case 0xBFC0ACC8u: goto label_BFC0ACC8; - case 0xBFC0ACD0u: goto label_BFC0ACD0; - case 0xBFC0ACE0u: goto label_BFC0ACE0; - case 0xBFC0ACF0u: goto label_BFC0ACF0; - case 0xBFC0ACF8u: goto label_BFC0ACF8; - default: break; - } - } -label_BFC0AB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0AB60: 27BDFF78 addiu $sp, $sp, -136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-136)); - PGXP_ALU(0x27BDFF78u, cpu->gpr[29], _pgx1, 0xFFFFFF78u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0AB64: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB64u); return; } g_debug_last_store_pc = 0xBFC0AB64u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0AB68: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0AB6C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB6Cu); return; } g_debug_last_store_pc = 0xBFC0AB6Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0AB70: AFA5008C sw $a1, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB70u); return; } g_debug_last_store_pc = 0xBFC0AB70u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5008Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0AB74: AFA60090 sw $a2, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB74u); return; } g_debug_last_store_pc = 0xBFC0AB74u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60090u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0AB78: AFA70094 sw $a3, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB78u); return; } g_debug_last_store_pc = 0xBFC0AB78u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70094u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB7Cu); -#endif - /* 0xBFC0AB7C: 8E020004 lw $v0, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB7Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0AB80: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0AB84: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC0AB88: AE0E0018 sw $t6, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AB88u); return; } g_debug_last_store_pc = 0xBFC0AB88u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE0E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0AB8C: 04410002 bgez $v0, 0xBFC0AB98 */ - uint32_t psx_brA_BFC0AB8C = cpu->gpr[2]; - psx_taken_BFC0AB8C = ((int32_t)psx_brA_BFC0AB8C >= 0); - psx_delay_BFC0AB8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0AB90: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB90u); -#endif - if (psx_delay_BFC0AB8C) { - psx_delay_BFC0AB8C = 0; - if (psx_taken_BFC0AB8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB98u); - goto label_BFC0AB98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AB94u); - } -label_BFC0AB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0AB94: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB94u); -#endif -label_BFC0AB98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AB98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0AB98: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0AB9C: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0ABA0: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABA4u); -#endif - /* 0xBFC0ABA4: 8F189F20 lw $t8, -24800($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABA4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F20u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0ABAC: 13000003 beq $t8, $zero, 0xBFC0ABBC */ - uint32_t psx_brA_BFC0ABAC = cpu->gpr[24]; uint32_t psx_brB_BFC0ABAC = cpu->gpr[0]; - psx_taken_BFC0ABAC = (psx_brA_BFC0ABAC == psx_brB_BFC0ABAC); - psx_delay_BFC0ABAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABB0u); -#endif - if (psx_delay_BFC0ABAC) { - psx_delay_BFC0ABAC = 0; - if (psx_taken_BFC0ABAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABBCu); - goto label_BFC0ABBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABB4u); - } -label_BFC0ABB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABB4: 10000050 beq $zero, $zero, 0xBFC0ACF8 */ - uint32_t psx_brA_BFC0ABB4 = cpu->gpr[0]; uint32_t psx_brB_BFC0ABB4 = cpu->gpr[0]; - psx_taken_BFC0ABB4 = (psx_brA_BFC0ABB4 == psx_brB_BFC0ABB4); - psx_delay_BFC0ABB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ABB8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABB8u); -#endif - if (psx_delay_BFC0ABB4) { - psx_delay_BFC0ABB4 = 0; - if (psx_taken_BFC0ABB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF8u); - goto label_BFC0ACF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABBCu); - } -label_BFC0ABBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0ABBC: AFA20040 sw $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABBCu); return; } g_debug_last_store_pc = 0xBFC0ABBCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ABC0: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0ABC8u; /* jal link before delay slot */ - psx_delay_BFC0ABC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0ABC4: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABC4u); return; } g_debug_last_store_pc = 0xBFC0ABC4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABC4u); -#endif - if (psx_delay_BFC0ABC0) { - psx_delay_BFC0ABC0 = 0; - cpu->gpr[31] = 0xBFC0ABC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0ABC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABC8u); -#endif - /* 0xBFC0ABC8: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABC8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ABCC: 0FF02270 jal 0xBFC089C0 */ - cpu->gpr[31] = 0xBFC0ABD4u; /* jal link before delay slot */ - psx_delay_BFC0ABCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABD0u); -#endif - if (psx_delay_BFC0ABCC) { - psx_delay_BFC0ABCC = 0; - cpu->gpr[31] = 0xBFC0ABD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089C0u); - cpu->pc = 0xBFC089C0u; return; - } -label_BFC0ABD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ABD4: 14400003 bne $v0, $zero, 0xBFC0ABE4 */ - uint32_t psx_brA_BFC0ABD4 = cpu->gpr[2]; uint32_t psx_brB_BFC0ABD4 = cpu->gpr[0]; - psx_taken_BFC0ABD4 = (psx_brA_BFC0ABD4 != psx_brB_BFC0ABD4); - psx_delay_BFC0ABD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABD8u); -#endif - if (psx_delay_BFC0ABD4) { - psx_delay_BFC0ABD4 = 0; - if (psx_taken_BFC0ABD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABE4u); - goto label_BFC0ABE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABDCu); - } -label_BFC0ABDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ABDC: 10000046 beq $zero, $zero, 0xBFC0ACF8 */ - uint32_t psx_brA_BFC0ABDC = cpu->gpr[0]; uint32_t psx_brB_BFC0ABDC = cpu->gpr[0]; - psx_taken_BFC0ABDC = (psx_brA_BFC0ABDC == psx_brB_BFC0ABDC); - psx_delay_BFC0ABDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ABE0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABE0u); -#endif - if (psx_delay_BFC0ABDC) { - psx_delay_BFC0ABDC = 0; - if (psx_taken_BFC0ABDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF8u); - goto label_BFC0ACF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ABE4u); - } -label_BFC0ABE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ABE4: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC0ABECu; /* jal link before delay slot */ - psx_delay_BFC0ABE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0ABE8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABE8u); -#endif - if (psx_delay_BFC0ABE4) { - psx_delay_BFC0ABE4 = 0; - cpu->gpr[31] = 0xBFC0ABECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC0ABEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABECu); -#endif - /* 0xBFC0ABEC: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABF0u); -#endif - /* 0xBFC0ABF0: 8FA60094 lw $a2, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ABF0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60094u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ABF4: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0ABFCu; /* jal link before delay slot */ - psx_delay_BFC0ABF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0ABF8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABF8u); -#endif - if (psx_delay_BFC0ABF4) { - psx_delay_BFC0ABF4 = 0; - cpu->gpr[31] = 0xBFC0ABFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0ABFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ABFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ABFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ABFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0ABFC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ABFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0AC00: 10410006 beq $v0, $at, 0xBFC0AC1C */ - uint32_t psx_brA_BFC0AC00 = cpu->gpr[2]; uint32_t psx_brB_BFC0AC00 = cpu->gpr[1]; - psx_taken_BFC0AC00 = (psx_brA_BFC0AC00 == psx_brB_BFC0AC00); - psx_delay_BFC0AC00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC04u); -#endif - /* 0xBFC0AC04: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC04u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC04u); -#endif - if (psx_delay_BFC0AC00) { - psx_delay_BFC0AC00 = 0; - if (psx_taken_BFC0AC00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC1Cu); - goto label_BFC0AC1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC08u); - } -label_BFC0AC08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0AC08: 24190011 addiu $t9, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24190011u, cpu->gpr[25], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC0AC0C: AE190018 sw $t9, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC0Cu); return; } g_debug_last_store_pc = 0xBFC0AC0Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE190018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AC10: 10000039 beq $zero, $zero, 0xBFC0ACF8 */ - uint32_t psx_brA_BFC0AC10 = cpu->gpr[0]; uint32_t psx_brB_BFC0AC10 = cpu->gpr[0]; - psx_taken_BFC0AC10 = (psx_brA_BFC0AC10 == psx_brB_BFC0AC10); - psx_delay_BFC0AC10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC14: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC14u); -#endif - if (psx_delay_BFC0AC10) { - psx_delay_BFC0AC10 = 0; - if (psx_taken_BFC0AC10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF8u); - goto label_BFC0ACF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC18u); - } -label_BFC0AC18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC18u); -#endif - /* 0xBFC0AC18: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC18u); -#endif -label_BFC0AC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC1Cu); -#endif - /* 0xBFC0AC1C: 8FA6008C lw $a2, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC1Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6008Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AC20: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0AC28u; /* jal link before delay slot */ - psx_delay_BFC0AC20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0AC24: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC24u); -#endif - if (psx_delay_BFC0AC20) { - psx_delay_BFC0AC20 = 0; - cpu->gpr[31] = 0xBFC0AC28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0AC28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0AC28: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0AC2C: 14410005 bne $v0, $at, 0xBFC0AC44 */ - uint32_t psx_brA_BFC0AC2C = cpu->gpr[2]; uint32_t psx_brB_BFC0AC2C = cpu->gpr[1]; - psx_taken_BFC0AC2C = (psx_brA_BFC0AC2C != psx_brB_BFC0AC2C); - psx_delay_BFC0AC2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC0AC30: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC30u); -#endif - if (psx_delay_BFC0AC2C) { - psx_delay_BFC0AC2C = 0; - if (psx_taken_BFC0AC2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC44u); - goto label_BFC0AC44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC34u); - } -label_BFC0AC34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0AC34: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC0AC38: AE080018 sw $t0, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC38u); return; } g_debug_last_store_pc = 0xBFC0AC38u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAE080018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AC3C: 1000002E beq $zero, $zero, 0xBFC0ACF8 */ - uint32_t psx_brA_BFC0AC3C = cpu->gpr[0]; uint32_t psx_brB_BFC0AC3C = cpu->gpr[0]; - psx_taken_BFC0AC3C = (psx_brA_BFC0AC3C == psx_brB_BFC0AC3C); - psx_delay_BFC0AC3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC40: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC40u); -#endif - if (psx_delay_BFC0AC3C) { - psx_delay_BFC0AC3C = 0; - if (psx_taken_BFC0AC3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF8u); - goto label_BFC0ACF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC44u); - } -label_BFC0AC44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AC44: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC44u); return; } g_debug_last_store_pc = 0xBFC0AC44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0AC48: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AC4C: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC4Cu); return; } g_debug_last_store_pc = 0xBFC0AC4Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0AC50: 27A300C4 addiu $v1, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A300C4u, cpu->gpr[3], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AC54: AFA0004C sw $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC54u); return; } g_debug_last_store_pc = 0xBFC0AC54u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0AC58: 27A20094 addiu $v0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A20094u, cpu->gpr[2], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC58u); -#endif -label_BFC0AC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC5C: AC40FFBC sw $zero, -68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC5Cu); return; } g_debug_last_store_pc = 0xBFC0AC5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0AC60: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC64: AC40FFB0 sw $zero, -80($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC64u); return; } g_debug_last_store_pc = 0xBFC0AC64u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC68: AC40FFB4 sw $zero, -76($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC68u); return; } g_debug_last_store_pc = 0xBFC0AC68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0AC6C: 1443FFFB bne $v0, $v1, 0xBFC0AC5C */ - uint32_t psx_brA_BFC0AC6C = cpu->gpr[2]; uint32_t psx_brB_BFC0AC6C = cpu->gpr[3]; - psx_taken_BFC0AC6C = (psx_brA_BFC0AC6C != psx_brB_BFC0AC6C); - psx_delay_BFC0AC6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AC70: AC40FFB8 sw $zero, -72($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC70u); return; } g_debug_last_store_pc = 0xBFC0AC70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC70u); -#endif - if (psx_delay_BFC0AC6C) { - psx_delay_BFC0AC6C = 0; - if (psx_taken_BFC0AC6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC5Cu); - goto label_BFC0AC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AC74u); - } -label_BFC0AC74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AC74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC74u); -#endif - /* 0xBFC0AC74: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC74u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC0AC78: 00065940 sll $t3, $a2, 5 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[6] << 5u; - PGXP_ALU(0x00065940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0AC7C: 00095100 sll $t2, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00095100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0AC80: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0AC84: 000A5140 sll $t2, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0AC88: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0AC8C: 25ADBA92 addiu $t5, $t5, -17774 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-17774)); - PGXP_ALU(0x25ADBA92u, cpu->gpr[13], _pgx1, 0xFFFFBA92u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC0AC90: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC0AC94: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC98u); -#endif - /* 0xBFC0AC98: 8FA50094 lw $a1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC98u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50094u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0AC9C: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AC9Cu); return; } g_debug_last_store_pc = 0xBFC0AC9Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ACA0: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0ACA8u; /* jal link before delay slot */ - psx_delay_BFC0ACA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0ACA4: AFA60080 sw $a2, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACA4u); return; } g_debug_last_store_pc = 0xBFC0ACA4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60080u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACA4u); -#endif - if (psx_delay_BFC0ACA0) { - psx_delay_BFC0ACA0 = 0; - cpu->gpr[31] = 0xBFC0ACA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0ACA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACA8u); -#endif - /* 0xBFC0ACA8: 8FA60080 lw $a2, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACA8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60080u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0ACAC: 240E0051 addiu $t6, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x240E0051u, cpu->gpr[14], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC0ACB0: 00067880 sll $t7, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21008000u); -#endif - /* 0xBFC0ACB4: 03AFC021 addu $t8, $sp, $t7 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[15]; - PGXP_ALU(0x03AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC0ACB8: AF0E0044 sw $t6, 68($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACB8u); return; } g_debug_last_store_pc = 0xBFC0ACB8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF0E0044u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACBCu); -#endif - /* 0xBFC0ACBC: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACBCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ACC0: 0FF0262A jal 0xBFC098A8 */ - cpu->gpr[31] = 0xBFC0ACC8u; /* jal link before delay slot */ - psx_delay_BFC0ACC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0ACC4: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACC4u); -#endif - if (psx_delay_BFC0ACC0) { - psx_delay_BFC0ACC0 = 0; - cpu->gpr[31] = 0xBFC0ACC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC098A8u); - cpu->pc = 0xBFC098A8u; return; - } -label_BFC0ACC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ACC8: 10400009 beq $v0, $zero, 0xBFC0ACF0 */ - uint32_t psx_brA_BFC0ACC8 = cpu->gpr[2]; uint32_t psx_brB_BFC0ACC8 = cpu->gpr[0]; - psx_taken_BFC0ACC8 = (psx_brA_BFC0ACC8 == psx_brB_BFC0ACC8); - psx_delay_BFC0ACC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ACCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACCCu); -#endif - if (psx_delay_BFC0ACC8) { - psx_delay_BFC0ACC8 = 0; - if (psx_taken_BFC0ACC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF0u); - goto label_BFC0ACF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACD0u); - } -label_BFC0ACD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACD0u); -#endif - /* 0xBFC0ACD0: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACD0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACD4u); -#endif - /* 0xBFC0ACD4: 8FA5008C lw $a1, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACD4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5008Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ACD8: 0FF00CF2 jal 0xBFC033C8 */ - cpu->gpr[31] = 0xBFC0ACE0u; /* jal link before delay slot */ - psx_delay_BFC0ACD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ACDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACDCu); -#endif - if (psx_delay_BFC0ACD8) { - psx_delay_BFC0ACD8 = 0; - cpu->gpr[31] = 0xBFC0ACE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC033C8u); - cpu->pc = 0xBFC033C8u; return; - } -label_BFC0ACE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0ACE0: 24190010 addiu $t9, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC0ACE4: AE190018 sw $t9, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACE4u); return; } g_debug_last_store_pc = 0xBFC0ACE4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE190018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ACE8: 10000003 beq $zero, $zero, 0xBFC0ACF8 */ - uint32_t psx_brA_BFC0ACE8 = cpu->gpr[0]; uint32_t psx_brB_BFC0ACE8 = cpu->gpr[0]; - psx_taken_BFC0ACE8 = (psx_brA_BFC0ACE8 == psx_brB_BFC0ACE8); - psx_delay_BFC0ACE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ACEC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACECu); -#endif - if (psx_delay_BFC0ACE8) { - psx_delay_BFC0ACE8 = 0; - if (psx_taken_BFC0ACE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF8u); - goto label_BFC0ACF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ACF0u); - } -label_BFC0ACF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0ACF0: AE000018 sw $zero, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACF0u); return; } g_debug_last_store_pc = 0xBFC0ACF0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ACF4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACF4u); -#endif -label_BFC0ACF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ACF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ACF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACF8u); -#endif - /* 0xBFC0ACF8: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ACFCu); -#endif - /* 0xBFC0ACFC: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ACFCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ACFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0AD00: 03E00008 jr $ra */ - psx_delay_BFC0AD00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0AD04: 27BD0088 addiu $sp, $sp, 136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (136)); - PGXP_ALU(0x27BD0088u, cpu->gpr[29], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD04u); -#endif - if (psx_delay_BFC0AD00) { - psx_delay_BFC0AD00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0AD08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0AD08u); - int psx_delay_BFC0AD24 = 0; - int psx_taken_BFC0AD24 = 0; - int psx_delay_BFC0AD44 = 0; - int psx_taken_BFC0AD44 = 0; - int psx_delay_BFC0AD4C = 0; - int psx_taken_BFC0AD4C = 0; - int psx_delay_BFC0AD5C = 0; - int psx_delay_BFC0AD68 = 0; - int psx_delay_BFC0AD70 = 0; - int psx_taken_BFC0AD70 = 0; - int psx_delay_BFC0AD78 = 0; - int psx_taken_BFC0AD78 = 0; - int psx_delay_BFC0AD80 = 0; - int psx_delay_BFC0AD90 = 0; - int psx_delay_BFC0AD9C = 0; - int psx_taken_BFC0AD9C = 0; - int psx_delay_BFC0ADB0 = 0; - int psx_taken_BFC0ADB0 = 0; - int psx_delay_BFC0ADB8 = 0; - int psx_delay_BFC0ADC8 = 0; - int psx_delay_BFC0ADD8 = 0; - int psx_delay_BFC0ADE8 = 0; - int psx_taken_BFC0ADE8 = 0; - int psx_delay_BFC0AE1C = 0; - int psx_taken_BFC0AE1C = 0; - int psx_delay_BFC0AE2C = 0; - int psx_taken_BFC0AE2C = 0; - int psx_delay_BFC0AE34 = 0; - int psx_taken_BFC0AE34 = 0; - int psx_delay_BFC0AE48 = 0; - int psx_taken_BFC0AE48 = 0; - int psx_delay_BFC0AE5C = 0; - int psx_taken_BFC0AE5C = 0; - int psx_delay_BFC0AE64 = 0; - int psx_taken_BFC0AE64 = 0; - int psx_delay_BFC0AE7C = 0; - int psx_taken_BFC0AE7C = 0; - int psx_delay_BFC0AE84 = 0; - int psx_taken_BFC0AE84 = 0; - int psx_delay_BFC0AE94 = 0; - int psx_taken_BFC0AE94 = 0; - int psx_delay_BFC0AEA0 = 0; - int psx_taken_BFC0AEA0 = 0; - int psx_delay_BFC0AEB8 = 0; - int psx_taken_BFC0AEB8 = 0; - int psx_delay_BFC0AEC8 = 0; - int psx_taken_BFC0AEC8 = 0; - int psx_delay_BFC0AEE0 = 0; - int psx_taken_BFC0AEE0 = 0; - int psx_delay_BFC0AEE8 = 0; - int psx_taken_BFC0AEE8 = 0; - int psx_delay_BFC0AEFC = 0; - int psx_taken_BFC0AEFC = 0; - int psx_delay_BFC0AF38 = 0; - int psx_taken_BFC0AF38 = 0; - int psx_delay_BFC0AF58 = 0; - int psx_taken_BFC0AF58 = 0; - int psx_delay_BFC0AF64 = 0; - int psx_taken_BFC0AF64 = 0; - int psx_delay_BFC0AF70 = 0; - int psx_taken_BFC0AF70 = 0; - int psx_delay_BFC0AF78 = 0; - int psx_taken_BFC0AF78 = 0; - int psx_delay_BFC0AF90 = 0; - int psx_taken_BFC0AF90 = 0; - int psx_delay_BFC0AF98 = 0; - int psx_taken_BFC0AF98 = 0; - int psx_delay_BFC0AFC0 = 0; - int psx_taken_BFC0AFC0 = 0; - int psx_delay_BFC0AFC8 = 0; - int psx_taken_BFC0AFC8 = 0; - int psx_delay_BFC0AFE0 = 0; - int psx_taken_BFC0AFE0 = 0; - int psx_delay_BFC0AFE8 = 0; - int psx_taken_BFC0AFE8 = 0; - int psx_delay_BFC0AFF0 = 0; - int psx_taken_BFC0AFF0 = 0; - int psx_delay_BFC0B008 = 0; - int psx_taken_BFC0B008 = 0; - int psx_delay_BFC0B02C = 0; - int psx_delay_BFC0B038 = 0; - int psx_taken_BFC0B038 = 0; - int psx_delay_BFC0B058 = 0; - int psx_taken_BFC0B058 = 0; - int psx_delay_BFC0B078 = 0; - int psx_taken_BFC0B078 = 0; - int psx_delay_BFC0B08C = 0; - int psx_taken_BFC0B08C = 0; - int psx_delay_BFC0B09C = 0; - int psx_taken_BFC0B09C = 0; - int psx_delay_BFC0B0BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0AD2Cu: goto label_BFC0AD2C; - case 0xBFC0AD30u: goto label_BFC0AD30; - case 0xBFC0AD4Cu: goto label_BFC0AD4C; - case 0xBFC0AD54u: goto label_BFC0AD54; - case 0xBFC0AD64u: goto label_BFC0AD64; - case 0xBFC0AD70u: goto label_BFC0AD70; - case 0xBFC0AD78u: goto label_BFC0AD78; - case 0xBFC0AD80u: goto label_BFC0AD80; - case 0xBFC0AD88u: goto label_BFC0AD88; - case 0xBFC0AD98u: goto label_BFC0AD98; - case 0xBFC0ADA4u: goto label_BFC0ADA4; - case 0xBFC0ADB8u: goto label_BFC0ADB8; - case 0xBFC0ADC0u: goto label_BFC0ADC0; - case 0xBFC0ADD0u: goto label_BFC0ADD0; - case 0xBFC0ADE0u: goto label_BFC0ADE0; - case 0xBFC0ADF0u: goto label_BFC0ADF0; - case 0xBFC0AE24u: goto label_BFC0AE24; - case 0xBFC0AE34u: goto label_BFC0AE34; - case 0xBFC0AE3Cu: goto label_BFC0AE3C; - case 0xBFC0AE50u: goto label_BFC0AE50; - case 0xBFC0AE54u: goto label_BFC0AE54; - case 0xBFC0AE64u: goto label_BFC0AE64; - case 0xBFC0AE6Cu: goto label_BFC0AE6C; - case 0xBFC0AE70u: goto label_BFC0AE70; - case 0xBFC0AE84u: goto label_BFC0AE84; - case 0xBFC0AE8Cu: goto label_BFC0AE8C; - case 0xBFC0AE9Cu: goto label_BFC0AE9C; - case 0xBFC0AEA0u: goto label_BFC0AEA0; - case 0xBFC0AEA8u: goto label_BFC0AEA8; - case 0xBFC0AEC0u: goto label_BFC0AEC0; - case 0xBFC0AED0u: goto label_BFC0AED0; - case 0xBFC0AED4u: goto label_BFC0AED4; - case 0xBFC0AEE8u: goto label_BFC0AEE8; - case 0xBFC0AEF0u: goto label_BFC0AEF0; - case 0xBFC0AF04u: goto label_BFC0AF04; - case 0xBFC0AF08u: goto label_BFC0AF08; - case 0xBFC0AF28u: goto label_BFC0AF28; - case 0xBFC0AF40u: goto label_BFC0AF40; - case 0xBFC0AF60u: goto label_BFC0AF60; - case 0xBFC0AF6Cu: goto label_BFC0AF6C; - case 0xBFC0AF78u: goto label_BFC0AF78; - case 0xBFC0AF80u: goto label_BFC0AF80; - case 0xBFC0AF84u: goto label_BFC0AF84; - case 0xBFC0AF98u: goto label_BFC0AF98; - case 0xBFC0AFA0u: goto label_BFC0AFA0; - case 0xBFC0AFA4u: goto label_BFC0AFA4; - case 0xBFC0AFACu: goto label_BFC0AFAC; - case 0xBFC0AFC8u: goto label_BFC0AFC8; - case 0xBFC0AFD0u: goto label_BFC0AFD0; - case 0xBFC0AFE8u: goto label_BFC0AFE8; - case 0xBFC0AFF0u: goto label_BFC0AFF0; - case 0xBFC0AFF8u: goto label_BFC0AFF8; - case 0xBFC0B010u: goto label_BFC0B010; - case 0xBFC0B024u: goto label_BFC0B024; - case 0xBFC0B028u: goto label_BFC0B028; - case 0xBFC0B034u: goto label_BFC0B034; - case 0xBFC0B040u: goto label_BFC0B040; - case 0xBFC0B050u: goto label_BFC0B050; - case 0xBFC0B060u: goto label_BFC0B060; - case 0xBFC0B074u: goto label_BFC0B074; - case 0xBFC0B080u: goto label_BFC0B080; - case 0xBFC0B094u: goto label_BFC0B094; - case 0xBFC0B0A4u: goto label_BFC0B0A4; - case 0xBFC0B0A8u: goto label_BFC0B0A8; - case 0xBFC0B0B4u: goto label_BFC0B0B4; - default: break; - } - } -label_BFC0AD08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0AD08: 27BDFF70 addiu $sp, $sp, -144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-144)); - PGXP_ALU(0x27BDFF70u, cpu->gpr[29], _pgx1, 0xFFFFFF70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0AD0C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD0Cu); return; } g_debug_last_store_pc = 0xBFC0AD0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0AD10: AFA50094 sw $a1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD10u); return; } g_debug_last_store_pc = 0xBFC0AD10u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50094u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD14u); -#endif - /* 0xBFC0AD14: 8C830004 lw $v1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD14u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0AD18: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0AD1C: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0AD20: AC8E0018 sw $t6, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD20u); return; } g_debug_last_store_pc = 0xBFC0AD20u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0AD24: 04610002 bgez $v1, 0xBFC0AD30 */ - uint32_t psx_brA_BFC0AD24 = cpu->gpr[3]; - psx_taken_BFC0AD24 = ((int32_t)psx_brA_BFC0AD24 >= 0); - psx_delay_BFC0AD24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC0AD28: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD28u); -#endif - if (psx_delay_BFC0AD24) { - psx_delay_BFC0AD24 = 0; - if (psx_taken_BFC0AD24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD30u); - goto label_BFC0AD30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD2Cu); - } -label_BFC0AD2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0AD2C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD2Cu); -#endif -label_BFC0AD30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0AD30: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0AD34: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0AD38: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD3Cu); -#endif - /* 0xBFC0AD3C: 8F189F20 lw $t8, -24800($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD3Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F20u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0AD44: 13000003 beq $t8, $zero, 0xBFC0AD54 */ - uint32_t psx_brA_BFC0AD44 = cpu->gpr[24]; uint32_t psx_brB_BFC0AD44 = cpu->gpr[0]; - psx_taken_BFC0AD44 = (psx_brA_BFC0AD44 == psx_brB_BFC0AD44); - psx_delay_BFC0AD44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD48u); -#endif - if (psx_delay_BFC0AD44) { - psx_delay_BFC0AD44 = 0; - if (psx_taken_BFC0AD44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD54u); - goto label_BFC0AD54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD4Cu); - } -label_BFC0AD4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD4C: 100000D9 beq $zero, $zero, 0xBFC0B0B4 */ - uint32_t psx_brA_BFC0AD4C = cpu->gpr[0]; uint32_t psx_brB_BFC0AD4C = cpu->gpr[0]; - psx_taken_BFC0AD4C = (psx_brA_BFC0AD4C == psx_brB_BFC0AD4C); - psx_delay_BFC0AD4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AD50: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD50u); -#endif - if (psx_delay_BFC0AD4C) { - psx_delay_BFC0AD4C = 0; - if (psx_taken_BFC0AD4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0B4u); - goto label_BFC0B0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD54u); - } -label_BFC0AD54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0AD54: AFA20038 sw $v0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD54u); return; } g_debug_last_store_pc = 0xBFC0AD54u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20038u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0AD58: AFA30044 sw $v1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD58u); return; } g_debug_last_store_pc = 0xBFC0AD58u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30044u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AD5C: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0AD64u; /* jal link before delay slot */ - psx_delay_BFC0AD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0AD60: AFA40090 sw $a0, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD60u); return; } g_debug_last_store_pc = 0xBFC0AD60u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40090u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD60u); -#endif - if (psx_delay_BFC0AD5C) { - psx_delay_BFC0AD5C = 0; - cpu->gpr[31] = 0xBFC0AD64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0AD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD64u); -#endif - /* 0xBFC0AD64: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AD68: 0FF02270 jal 0xBFC089C0 */ - cpu->gpr[31] = 0xBFC0AD70u; /* jal link before delay slot */ - psx_delay_BFC0AD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD6Cu); -#endif - if (psx_delay_BFC0AD68) { - psx_delay_BFC0AD68 = 0; - cpu->gpr[31] = 0xBFC0AD70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC089C0u); - cpu->pc = 0xBFC089C0u; return; - } -label_BFC0AD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AD70: 14400003 bne $v0, $zero, 0xBFC0AD80 */ - uint32_t psx_brA_BFC0AD70 = cpu->gpr[2]; uint32_t psx_brB_BFC0AD70 = cpu->gpr[0]; - psx_taken_BFC0AD70 = (psx_brA_BFC0AD70 != psx_brB_BFC0AD70); - psx_delay_BFC0AD70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD74u); -#endif - if (psx_delay_BFC0AD70) { - psx_delay_BFC0AD70 = 0; - if (psx_taken_BFC0AD70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD80u); - goto label_BFC0AD80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD78u); - } -label_BFC0AD78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AD78: 100000CE beq $zero, $zero, 0xBFC0B0B4 */ - uint32_t psx_brA_BFC0AD78 = cpu->gpr[0]; uint32_t psx_brB_BFC0AD78 = cpu->gpr[0]; - psx_taken_BFC0AD78 = (psx_brA_BFC0AD78 == psx_brB_BFC0AD78); - psx_delay_BFC0AD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AD7C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD7Cu); -#endif - if (psx_delay_BFC0AD78) { - psx_delay_BFC0AD78 = 0; - if (psx_taken_BFC0AD78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0B4u); - goto label_BFC0B0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AD80u); - } -label_BFC0AD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AD80: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC0AD88u; /* jal link before delay slot */ - psx_delay_BFC0AD80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AD84: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD84u); -#endif - if (psx_delay_BFC0AD80) { - psx_delay_BFC0AD80 = 0; - cpu->gpr[31] = 0xBFC0AD88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC0AD88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD88u); -#endif - /* 0xBFC0AD88: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD88u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD8Cu); -#endif - /* 0xBFC0AD8C: 8FA60094 lw $a2, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AD8Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60094u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0AD90: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0AD98u; /* jal link before delay slot */ - psx_delay_BFC0AD90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0AD94: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD94u); -#endif - if (psx_delay_BFC0AD90) { - psx_delay_BFC0AD90 = 0; - cpu->gpr[31] = 0xBFC0AD98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0AD98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AD98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0AD98: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0AD9C: 10410006 beq $v0, $at, 0xBFC0ADB8 */ - uint32_t psx_brA_BFC0AD9C = cpu->gpr[2]; uint32_t psx_brB_BFC0AD9C = cpu->gpr[1]; - psx_taken_BFC0AD9C = (psx_brA_BFC0AD9C == psx_brB_BFC0AD9C); - psx_delay_BFC0AD9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ADA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADA0u); -#endif - if (psx_delay_BFC0AD9C) { - psx_delay_BFC0AD9C = 0; - if (psx_taken_BFC0AD9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ADB8u); - goto label_BFC0ADB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ADA4u); - } -label_BFC0ADA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADA4u); -#endif - /* 0xBFC0ADA4: 8FAD0090 lw $t5, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADA4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0090u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0ADA8: 24190011 addiu $t9, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24190011u, cpu->gpr[25], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0ADAC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0ADB0: 100000C0 beq $zero, $zero, 0xBFC0B0B4 */ - uint32_t psx_brA_BFC0ADB0 = cpu->gpr[0]; uint32_t psx_brB_BFC0ADB0 = cpu->gpr[0]; - psx_taken_BFC0ADB0 = (psx_brA_BFC0ADB0 == psx_brB_BFC0ADB0); - psx_delay_BFC0ADB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC0ADB4: ADB90018 sw $t9, 24($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADB4u); return; } g_debug_last_store_pc = 0xBFC0ADB4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xADB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADB4u); -#endif - if (psx_delay_BFC0ADB0) { - psx_delay_BFC0ADB0 = 0; - if (psx_taken_BFC0ADB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0B4u); - goto label_BFC0B0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ADB8u); - } -label_BFC0ADB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ADB8: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC0ADC0u; /* jal link before delay slot */ - psx_delay_BFC0ADB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0ADBC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADBCu); -#endif - if (psx_delay_BFC0ADB8) { - psx_delay_BFC0ADB8 = 0; - cpu->gpr[31] = 0xBFC0ADC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC0ADC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADC0u); -#endif - /* 0xBFC0ADC0: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADC0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADC4u); -#endif - /* 0xBFC0ADC4: 8FA60094 lw $a2, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADC4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60094u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ADC8: 0FF029D5 jal 0xBFC0A754 */ - cpu->gpr[31] = 0xBFC0ADD0u; /* jal link before delay slot */ - psx_delay_BFC0ADC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0ADCC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADCCu); -#endif - if (psx_delay_BFC0ADC8) { - psx_delay_BFC0ADC8 = 0; - cpu->gpr[31] = 0xBFC0ADD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A754u); - cpu->pc = 0xBFC0A754u; return; - } -label_BFC0ADD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC0ADD0: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0ADD4: AFA70088 sw $a3, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADD4u); return; } g_debug_last_store_pc = 0xBFC0ADD4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70088u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0ADD8: 0FF036E0 jal 0xBFC0DB80 */ - cpu->gpr[31] = 0xBFC0ADE0u; /* jal link before delay slot */ - psx_delay_BFC0ADD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0ADDC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADDCu); -#endif - if (psx_delay_BFC0ADD8) { - psx_delay_BFC0ADD8 = 0; - cpu->gpr[31] = 0xBFC0ADE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DB80u); - cpu->pc = 0xBFC0DB80u; return; - } -label_BFC0ADE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADE0u); -#endif - /* 0xBFC0ADE0: 8FA70088 lw $a3, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADE0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70088u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0ADE4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC0ADE8: 10E100AF beq $a3, $at, 0xBFC0B0A8 */ - uint32_t psx_brA_BFC0ADE8 = cpu->gpr[7]; uint32_t psx_brB_BFC0ADE8 = cpu->gpr[1]; - psx_taken_BFC0ADE8 = (psx_brA_BFC0ADE8 == psx_brB_BFC0ADE8); - psx_delay_BFC0ADE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADECu); -#endif - /* 0xBFC0ADEC: 8FB80090 lw $t8, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADECu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80090u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADECu); -#endif - if (psx_delay_BFC0ADE8) { - psx_delay_BFC0ADE8 = 0; - if (psx_taken_BFC0ADE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0A8u); - goto label_BFC0B0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0ADF0u); - } -label_BFC0ADF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0ADF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0ADF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADF0u); -#endif - /* 0xBFC0ADF0: 8FAE0038 lw $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0ADF0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0ADF4: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0ADF8: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0ADFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0ADFC: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0ADFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0AE00: 000F7940 sll $t7, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000F7940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0AE04: 2718BA88 addiu $t8, $t8, -17784 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-17784)); - PGXP_ALU(0x2718BA88u, cpu->gpr[24], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008100u); -#endif - /* 0xBFC0AE08: 01F84021 addu $t0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F84021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC0AE0C: 0007C940 sll $t9, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 5u; - PGXP_ALU(0x0007C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000140u); -#endif - /* 0xBFC0AE10: 01193021 addu $a2, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01193021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE14u); -#endif - /* 0xBFC0AE14: 8CCD0000 lw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE14u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x8CCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0AE18: 240B00A1 addiu $t3, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240B00A1u, cpu->gpr[11], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC0AE1C: 156D00A2 bne $t3, $t5, 0xBFC0B0A8 */ - uint32_t psx_brA_BFC0AE1C = cpu->gpr[11]; uint32_t psx_brB_BFC0AE1C = cpu->gpr[13]; - psx_taken_BFC0AE1C = (psx_brA_BFC0AE1C != psx_brB_BFC0AE1C); - psx_delay_BFC0AE1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE20u); -#endif - /* 0xBFC0AE20: 8FB80090 lw $t8, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE20u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80090u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE20u); -#endif - if (psx_delay_BFC0AE1C) { - psx_delay_BFC0AE1C = 0; - if (psx_taken_BFC0AE1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0A8u); - goto label_BFC0B0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE24u); - } -label_BFC0AE24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE24u); -#endif - /* 0xBFC0AE24: 94CC0008 lhu $t4, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE24u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x94CC0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0AE28: 340AFFFF ori $t2, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC0AE2C: 154C0003 bne $t2, $t4, 0xBFC0AE3C */ - uint32_t psx_brA_BFC0AE2C = cpu->gpr[10]; uint32_t psx_brB_BFC0AE2C = cpu->gpr[12]; - psx_taken_BFC0AE2C = (psx_brA_BFC0AE2C != psx_brB_BFC0AE2C); - psx_delay_BFC0AE2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC0AE30: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE30u); -#endif - if (psx_delay_BFC0AE2C) { - psx_delay_BFC0AE2C = 0; - if (psx_taken_BFC0AE2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE3Cu); - goto label_BFC0AE3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE34u); - } -label_BFC0AE34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE34: 10000026 beq $zero, $zero, 0xBFC0AED0 */ - uint32_t psx_brA_BFC0AE34 = cpu->gpr[0]; uint32_t psx_brB_BFC0AE34 = cpu->gpr[0]; - psx_taken_BFC0AE34 = (psx_brA_BFC0AE34 == psx_brB_BFC0AE34); - psx_delay_BFC0AE34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AE38: 240900A2 addiu $t1, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240900A2u, cpu->gpr[9], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE38u); -#endif - if (psx_delay_BFC0AE34) { - psx_delay_BFC0AE34 = 0; - if (psx_taken_BFC0AE34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED0u); - goto label_BFC0AED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE3Cu); - } -label_BFC0AE3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE3Cu); -#endif - /* 0xBFC0AE3C: 8CC50004 lw $a1, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE3Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40u); } - PGXP_LOAD(0x8CC50004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1011u); -#endif - /* 0xBFC0AE40: 01802021 addu $a0, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AE48: 04A10002 bgez $a1, 0xBFC0AE54 */ - uint32_t psx_brA_BFC0AE48 = cpu->gpr[5]; - psx_taken_BFC0AE48 = ((int32_t)psx_brA_BFC0AE48 >= 0); - psx_delay_BFC0AE48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC0AE4C: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE4Cu); -#endif - if (psx_delay_BFC0AE48) { - psx_delay_BFC0AE48 = 0; - if (psx_taken_BFC0AE48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE54u); - goto label_BFC0AE54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE50u); - } -label_BFC0AE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0AE50: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE50u); -#endif -label_BFC0AE54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0AE54: 00012B43 sra $a1, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00012B43u, cpu->gpr[5], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AE58: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AE5C: 1CA00004 bgtz $a1, 0xBFC0AE70 */ - uint32_t psx_brA_BFC0AE5C = cpu->gpr[5]; - psx_taken_BFC0AE5C = ((int32_t)psx_brA_BFC0AE5C > 0); - psx_delay_BFC0AE5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0AE60: 00047140 sll $t6, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00047140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE60u); -#endif - if (psx_delay_BFC0AE5C) { - psx_delay_BFC0AE5C = 0; - if (psx_taken_BFC0AE5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE70u); - goto label_BFC0AE70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE64u); - } -label_BFC0AE64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE64: 1000001A beq $zero, $zero, 0xBFC0AED0 */ - uint32_t psx_brA_BFC0AE64 = cpu->gpr[0]; uint32_t psx_brB_BFC0AE64 = cpu->gpr[0]; - psx_taken_BFC0AE64 = (psx_brA_BFC0AE64 == psx_brB_BFC0AE64); - psx_delay_BFC0AE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AE68: 240900A2 addiu $t1, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240900A2u, cpu->gpr[9], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE68u); -#endif - if (psx_delay_BFC0AE64) { - psx_delay_BFC0AE64 = 0; - if (psx_taken_BFC0AE64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED0u); - goto label_BFC0AED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE6Cu); - } -label_BFC0AE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0AE6C: 00047140 sll $t6, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00047140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE6Cu); -#endif -label_BFC0AE70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4108u); -#endif - /* 0xBFC0AE70: 010E1821 addu $v1, $t0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[14]; - PGXP_ALU(0x010E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE74u); -#endif - /* 0xBFC0AE74: 94620008 lhu $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE74u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x94620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC0AE7C: 15420003 bne $t2, $v0, 0xBFC0AE8C */ - uint32_t psx_brA_BFC0AE7C = cpu->gpr[10]; uint32_t psx_brB_BFC0AE7C = cpu->gpr[2]; - psx_taken_BFC0AE7C = (psx_brA_BFC0AE7C != psx_brB_BFC0AE7C); - psx_delay_BFC0AE7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE80u); -#endif - if (psx_delay_BFC0AE7C) { - psx_delay_BFC0AE7C = 0; - if (psx_taken_BFC0AE7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE8Cu); - goto label_BFC0AE8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE84u); - } -label_BFC0AE84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AE84: 10000012 beq $zero, $zero, 0xBFC0AED0 */ - uint32_t psx_brA_BFC0AE84 = cpu->gpr[0]; uint32_t psx_brB_BFC0AE84 = cpu->gpr[0]; - psx_taken_BFC0AE84 = (psx_brA_BFC0AE84 == psx_brB_BFC0AE84); - psx_delay_BFC0AE84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AE88: 240900A2 addiu $t1, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240900A2u, cpu->gpr[9], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE88u); -#endif - if (psx_delay_BFC0AE84) { - psx_delay_BFC0AE84 = 0; - if (psx_taken_BFC0AE84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED0u); - goto label_BFC0AED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE8Cu); - } -label_BFC0AE8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE8Cu); -#endif - /* 0xBFC0AE8C: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AE8Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0AE90: 240900A2 addiu $t1, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240900A2u, cpu->gpr[9], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC0AE94: 152F000F bne $t1, $t7, 0xBFC0AED4 */ - uint32_t psx_brA_BFC0AE94 = cpu->gpr[9]; uint32_t psx_brB_BFC0AE94 = cpu->gpr[15]; - psx_taken_BFC0AE94 = (psx_brA_BFC0AE94 != psx_brB_BFC0AE94); - psx_delay_BFC0AE94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC0AE98: 00046940 sll $t5, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00046940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE98u); -#endif - if (psx_delay_BFC0AE94) { - psx_delay_BFC0AE94 = 0; - if (psx_taken_BFC0AE94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED4u); - goto label_BFC0AED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AE9Cu); - } -label_BFC0AE9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AE9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AE9C: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AE9Cu); -#endif -label_BFC0AEA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AEA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AEA0: 18A0000B blez $a1, 0xBFC0AED0 */ - uint32_t psx_brA_BFC0AEA0 = cpu->gpr[5]; - psx_taken_BFC0AEA0 = ((int32_t)psx_brA_BFC0AEA0 <= 0); - psx_delay_BFC0AEA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0AEA4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEA4u); -#endif - if (psx_delay_BFC0AEA0) { - psx_delay_BFC0AEA0 = 0; - if (psx_taken_BFC0AEA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED0u); - goto label_BFC0AED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEA8u); - } -label_BFC0AEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC0AEA8: 0004C140 sll $t8, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 5u; - PGXP_ALU(0x0004C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000108u); -#endif - /* 0xBFC0AEAC: 01181821 addu $v1, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[24]; - PGXP_ALU(0x01181821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEB0u); -#endif - /* 0xBFC0AEB0: 94620008 lhu $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AEB0u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x94620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AEB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC0AEB8: 11420006 beq $t2, $v0, 0xBFC0AED4 */ - uint32_t psx_brA_BFC0AEB8 = cpu->gpr[10]; uint32_t psx_brB_BFC0AEB8 = cpu->gpr[2]; - psx_taken_BFC0AEB8 = (psx_brA_BFC0AEB8 == psx_brB_BFC0AEB8); - psx_delay_BFC0AEB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC0AEBC: 00046940 sll $t5, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00046940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEBCu); -#endif - if (psx_delay_BFC0AEB8) { - psx_delay_BFC0AEB8 = 0; - if (psx_taken_BFC0AEB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED4u); - goto label_BFC0AED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEC0u); - } -label_BFC0AEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEC0u); -#endif - /* 0xBFC0AEC0: 8C790000 lw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AEC0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AEC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC0AEC8: 1139FFF5 beq $t1, $t9, 0xBFC0AEA0 */ - uint32_t psx_brA_BFC0AEC8 = cpu->gpr[9]; uint32_t psx_brB_BFC0AEC8 = cpu->gpr[25]; - psx_taken_BFC0AEC8 = (psx_brA_BFC0AEC8 == psx_brB_BFC0AEC8); - psx_delay_BFC0AEC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AECC: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AECCu); -#endif - if (psx_delay_BFC0AEC8) { - psx_delay_BFC0AEC8 = 0; - if (psx_taken_BFC0AEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEA0u); - goto label_BFC0AEA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AED0u); - } -label_BFC0AED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC0AED0: 00046940 sll $t5, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00046940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AED0u); -#endif -label_BFC0AED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6100u); -#endif - /* 0xBFC0AED4: 010D7021 addu $t6, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[8] + cpu->gpr[13]; - PGXP_ALU(0x010D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AED8u); -#endif - /* 0xBFC0AED8: 8DC20000 lw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AED8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AEDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC0AEE0: 11620003 beq $t3, $v0, 0xBFC0AEF0 */ - uint32_t psx_brA_BFC0AEE0 = cpu->gpr[11]; uint32_t psx_brB_BFC0AEE0 = cpu->gpr[2]; - psx_taken_BFC0AEE0 = (psx_brA_BFC0AEE0 == psx_brB_BFC0AEE0); - psx_delay_BFC0AEE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0AEE4: 240100A3 addiu $at, $zero, 163 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (163)); - PGXP_ALU(0x240100A3u, cpu->gpr[1], _pgx1, 0x000000A3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEE4u); -#endif - if (psx_delay_BFC0AEE0) { - psx_delay_BFC0AEE0 = 0; - if (psx_taken_BFC0AEE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEF0u); - goto label_BFC0AEF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEE8u); - } -label_BFC0AEE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AEE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0AEE8: 1441006F bne $v0, $at, 0xBFC0B0A8 */ - uint32_t psx_brA_BFC0AEE8 = cpu->gpr[2]; uint32_t psx_brB_BFC0AEE8 = cpu->gpr[1]; - psx_taken_BFC0AEE8 = (psx_brA_BFC0AEE8 != psx_brB_BFC0AEE8); - psx_delay_BFC0AEE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEECu); -#endif - /* 0xBFC0AEEC: 8FB80090 lw $t8, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AEECu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80090u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEECu); -#endif - if (psx_delay_BFC0AEE8) { - psx_delay_BFC0AEE8 = 0; - if (psx_taken_BFC0AEE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0A8u); - goto label_BFC0B0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AEF0u); - } -label_BFC0AEF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AEF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEF0u); -#endif - /* 0xBFC0AEF0: 8CC50004 lw $a1, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AEF0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40u); } - PGXP_LOAD(0x8CC50004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AEF4: AFA00054 sw $zero, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AEF4u); return; } g_debug_last_store_pc = 0xBFC0AEF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AEF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AEFC: 04A10002 bgez $a1, 0xBFC0AF08 */ - uint32_t psx_brA_BFC0AEFC = cpu->gpr[5]; - psx_taken_BFC0AEFC = ((int32_t)psx_brA_BFC0AEFC >= 0); - psx_delay_BFC0AEFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC0AF00: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF00u); -#endif - if (psx_delay_BFC0AEFC) { - psx_delay_BFC0AEFC = 0; - if (psx_taken_BFC0AEFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF08u); - goto label_BFC0AF08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF04u); - } -label_BFC0AF04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0AF04: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF04u); -#endif -label_BFC0AF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0AF08: 00012B43 sra $a1, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00012B43u, cpu->gpr[5], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AF0C: AFA00050 sw $zero, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF0Cu); return; } g_debug_last_store_pc = 0xBFC0AF0Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AF10: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0AF14: AFA0004C sw $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF14u); return; } g_debug_last_store_pc = 0xBFC0AF14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC0AF18: 01805821 addu $t3, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AF1C: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0AF20: 27A2009C addiu $v0, $sp, 156 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (156)); - PGXP_ALU(0x27A2009Cu, cpu->gpr[2], _pgx1, 0x0000009Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0AF24: 27A300CC addiu $v1, $sp, 204 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (204)); - PGXP_ALU(0x27A300CCu, cpu->gpr[3], _pgx1, 0x000000CCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF24u); -#endif -label_BFC0AF28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AF28: AC40FFBC sw $zero, -68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF28u); return; } g_debug_last_store_pc = 0xBFC0AF28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0AF2C: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AF30: AC40FFB0 sw $zero, -80($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF30u); return; } g_debug_last_store_pc = 0xBFC0AF30u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AF34: AC40FFB4 sw $zero, -76($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF34u); return; } g_debug_last_store_pc = 0xBFC0AF34u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0AF38: 1443FFFB bne $v0, $v1, 0xBFC0AF28 */ - uint32_t psx_brA_BFC0AF38 = cpu->gpr[2]; uint32_t psx_brB_BFC0AF38 = cpu->gpr[3]; - psx_taken_BFC0AF38 = (psx_brA_BFC0AF38 != psx_brB_BFC0AF38); - psx_delay_BFC0AF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AF3C: AC40FFB8 sw $zero, -72($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF3Cu); return; } g_debug_last_store_pc = 0xBFC0AF3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF3Cu); -#endif - if (psx_delay_BFC0AF38) { - psx_delay_BFC0AF38 = 0; - if (psx_taken_BFC0AF38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF28u); - goto label_BFC0AF28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF40u); - } -label_BFC0AF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0AF40: 240F0051 addiu $t7, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x240F0051u, cpu->gpr[15], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC0AF44: 0007C880 sll $t9, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 2u; - PGXP_ALU(0x0007C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC0AF48: ACCF0000 sw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF48u); return; } g_debug_last_store_pc = 0xBFC0AF48u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22002000u); -#endif - /* 0xBFC0AF4C: 03B96821 addu $t5, $sp, $t9 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[29] + cpu->gpr[25]; - PGXP_ALU(0x03B96821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0AF50: 24180051 addiu $t8, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24180051u, cpu->gpr[24], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC0AF54: ADB8004C sw $t8, 76($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF54u); return; } g_debug_last_store_pc = 0xBFC0AF54u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xADB8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AF58: 1CA00004 bgtz $a1, 0xBFC0AF6C */ - uint32_t psx_brA_BFC0AF58 = cpu->gpr[5]; - psx_taken_BFC0AF58 = ((int32_t)psx_brA_BFC0AF58 > 0); - psx_delay_BFC0AF58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x881u); -#endif - /* 0xBFC0AF5C: 01603821 addu $a3, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01603821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF5Cu); -#endif - if (psx_delay_BFC0AF58) { - psx_delay_BFC0AF58 = 0; - if (psx_taken_BFC0AF58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF6Cu); - goto label_BFC0AF6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF60u); - } -label_BFC0AF60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AF60: 3404FFFF ori $a0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3404FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AF64: 10000020 beq $zero, $zero, 0xBFC0AFE8 */ - uint32_t psx_brA_BFC0AF64 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF64 = cpu->gpr[0]; - psx_taken_BFC0AF64 = (psx_brA_BFC0AF64 == psx_brB_BFC0AF64); - psx_delay_BFC0AF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0AF68: 24030052 addiu $v1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24030052u, cpu->gpr[3], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF68u); -#endif - if (psx_delay_BFC0AF64) { - psx_delay_BFC0AF64 = 0; - if (psx_taken_BFC0AF64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - goto label_BFC0AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF6Cu); - } -label_BFC0AF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0AF6C: 3404FFFF ori $a0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3404FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC0AF70: 14E40004 bne $a3, $a0, 0xBFC0AF84 */ - uint32_t psx_brA_BFC0AF70 = cpu->gpr[7]; uint32_t psx_brB_BFC0AF70 = cpu->gpr[4]; - psx_taken_BFC0AF70 = (psx_brA_BFC0AF70 != psx_brB_BFC0AF70); - psx_delay_BFC0AF70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC0AF74: 00077140 sll $t6, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 5u; - PGXP_ALU(0x00077140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF74u); -#endif - if (psx_delay_BFC0AF70) { - psx_delay_BFC0AF70 = 0; - if (psx_taken_BFC0AF70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF84u); - goto label_BFC0AF84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF78u); - } -label_BFC0AF78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AF78: 1000001B beq $zero, $zero, 0xBFC0AFE8 */ - uint32_t psx_brA_BFC0AF78 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF78 = cpu->gpr[0]; - psx_taken_BFC0AF78 = (psx_brA_BFC0AF78 == psx_brB_BFC0AF78); - psx_delay_BFC0AF78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0AF7C: 24030052 addiu $v1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24030052u, cpu->gpr[3], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF7Cu); -#endif - if (psx_delay_BFC0AF78) { - psx_delay_BFC0AF78 = 0; - if (psx_taken_BFC0AF78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - goto label_BFC0AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF80u); - } -label_BFC0AF80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC0AF80: 00077140 sll $t6, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 5u; - PGXP_ALU(0x00077140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF80u); -#endif -label_BFC0AF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4140u); -#endif - /* 0xBFC0AF84: 010E3021 addu $a2, $t0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[14]; - PGXP_ALU(0x010E3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF88u); -#endif - /* 0xBFC0AF88: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AF88u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AF8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC0AF90: 112F0004 beq $t1, $t7, 0xBFC0AFA4 */ - uint32_t psx_brA_BFC0AF90 = cpu->gpr[9]; uint32_t psx_brB_BFC0AF90 = cpu->gpr[15]; - psx_taken_BFC0AF90 = (psx_brA_BFC0AF90 == psx_brB_BFC0AF90); - psx_delay_BFC0AF90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AF94: 24020052 addiu $v0, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24020052u, cpu->gpr[2], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF94u); -#endif - if (psx_delay_BFC0AF90) { - psx_delay_BFC0AF90 = 0; - if (psx_taken_BFC0AF90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFA4u); - goto label_BFC0AFA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AF98u); - } -label_BFC0AF98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AF98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AF98: 10000013 beq $zero, $zero, 0xBFC0AFE8 */ - uint32_t psx_brA_BFC0AF98 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF98 = cpu->gpr[0]; - psx_taken_BFC0AF98 = (psx_brA_BFC0AF98 == psx_brB_BFC0AF98); - psx_delay_BFC0AF98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0AF9C: 24030052 addiu $v1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24030052u, cpu->gpr[3], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AF9Cu); -#endif - if (psx_delay_BFC0AF98) { - psx_delay_BFC0AF98 = 0; - if (psx_taken_BFC0AF98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - goto label_BFC0AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFA0u); - } -label_BFC0AFA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0AFA0: 24020052 addiu $v0, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24020052u, cpu->gpr[2], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFA0u); -#endif -label_BFC0AFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0AFA4: 24030052 addiu $v1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24030052u, cpu->gpr[3], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC0AFA8: 0007C080 sll $t8, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] << 2u; - PGXP_ALU(0x0007C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFA8u); -#endif -label_BFC0AFAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC0AFAC: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AFACu); return; } g_debug_last_store_pc = 0xBFC0AFACu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23000000u); -#endif - /* 0xBFC0AFB0: 03B8C821 addu $t9, $sp, $t8 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[29] + cpu->gpr[24]; - PGXP_ALU(0x03B8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0AFB4: AF23004C sw $v1, 76($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AFB4u); return; } g_debug_last_store_pc = 0xBFC0AFB4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAF23004Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFB8u); -#endif - /* 0xBFC0AFB8: 94C70008 lhu $a3, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AFB8u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x40u); } - PGXP_LOAD(0x94C70008u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AFBC: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AFC0: 18A00009 blez $a1, 0xBFC0AFE8 */ - uint32_t psx_brA_BFC0AFC0 = cpu->gpr[5]; - psx_taken_BFC0AFC0 = ((int32_t)psx_brA_BFC0AFC0 <= 0); - psx_delay_BFC0AFC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AFC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFC4u); -#endif - if (psx_delay_BFC0AFC0) { - psx_delay_BFC0AFC0 = 0; - if (psx_taken_BFC0AFC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - goto label_BFC0AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFC8u); - } -label_BFC0AFC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC0AFC8: 10E40007 beq $a3, $a0, 0xBFC0AFE8 */ - uint32_t psx_brA_BFC0AFC8 = cpu->gpr[7]; uint32_t psx_brB_BFC0AFC8 = cpu->gpr[4]; - psx_taken_BFC0AFC8 = (psx_brA_BFC0AFC8 == psx_brB_BFC0AFC8); - psx_delay_BFC0AFC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AFCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFCCu); -#endif - if (psx_delay_BFC0AFC8) { - psx_delay_BFC0AFC8 = 0; - if (psx_taken_BFC0AFC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - goto label_BFC0AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFD0u); - } -label_BFC0AFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080u); -#endif - /* 0xBFC0AFD0: 00076940 sll $t5, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[13] = cpu->gpr[7] << 5u; - PGXP_ALU(0x00076940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2140u); -#endif - /* 0xBFC0AFD4: 010D3021 addu $a2, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[13]; - PGXP_ALU(0x010D3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFD8u); -#endif - /* 0xBFC0AFD8: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AFD8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AFDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC0AFE0: 112EFFF2 beq $t1, $t6, 0xBFC0AFAC */ - uint32_t psx_brA_BFC0AFE0 = cpu->gpr[9]; uint32_t psx_brB_BFC0AFE0 = cpu->gpr[14]; - psx_taken_BFC0AFE0 = (psx_brA_BFC0AFE0 == psx_brB_BFC0AFE0); - psx_delay_BFC0AFE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC0AFE4: 0007C080 sll $t8, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] << 2u; - PGXP_ALU(0x0007C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFE4u); -#endif - if (psx_delay_BFC0AFE0) { - psx_delay_BFC0AFE0 = 0; - if (psx_taken_BFC0AFE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFACu); - goto label_BFC0AFAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFE8u); - } -label_BFC0AFE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0AFE8: 18A0000E blez $a1, 0xBFC0B024 */ - uint32_t psx_brA_BFC0AFE8 = cpu->gpr[5]; - psx_taken_BFC0AFE8 = ((int32_t)psx_brA_BFC0AFE8 <= 0); - psx_delay_BFC0AFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0AFEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFECu); -#endif - if (psx_delay_BFC0AFE8) { - psx_delay_BFC0AFE8 = 0; - if (psx_taken_BFC0AFE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B024u); - goto label_BFC0B024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFF0u); - } -label_BFC0AFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC0AFF0: 10E4000D beq $a3, $a0, 0xBFC0B028 */ - uint32_t psx_brA_BFC0AFF0 = cpu->gpr[7]; uint32_t psx_brB_BFC0AFF0 = cpu->gpr[4]; - psx_taken_BFC0AFF0 = (psx_brA_BFC0AFF0 == psx_brB_BFC0AFF0); - psx_delay_BFC0AFF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFF4u); -#endif - /* 0xBFC0AFF4: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0AFF4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFF4u); -#endif - if (psx_delay_BFC0AFF0) { - psx_delay_BFC0AFF0 = 0; - if (psx_taken_BFC0AFF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B028u); - goto label_BFC0B028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0AFF8u); - } -label_BFC0AFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0AFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0AFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC0AFF8: 00077940 sll $t7, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 5u; - PGXP_ALU(0x00077940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0AFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8140u); -#endif - /* 0xBFC0AFFC: 010F3021 addu $a2, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010F3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0AFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B000u); -#endif - /* 0xBFC0B000: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B000u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B004: 240100A3 addiu $at, $zero, 163 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (163)); - PGXP_ALU(0x240100A3u, cpu->gpr[1], _pgx1, 0x000000A3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0B008: 17010007 bne $t8, $at, 0xBFC0B028 */ - uint32_t psx_brA_BFC0B008 = cpu->gpr[24]; uint32_t psx_brB_BFC0B008 = cpu->gpr[1]; - psx_taken_BFC0B008 = (psx_brA_BFC0B008 != psx_brB_BFC0B008); - psx_delay_BFC0B008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B00Cu); -#endif - /* 0xBFC0B00C: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B00Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B00Cu); -#endif - if (psx_delay_BFC0B008) { - psx_delay_BFC0B008 = 0; - if (psx_taken_BFC0B008) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B028u); - goto label_BFC0B028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B010u); - } -label_BFC0B010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0B010: 24190053 addiu $t9, $zero, 83 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); - PGXP_ALU(0x24190053u, cpu->gpr[25], _pgx1, 0x00000053u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080u); -#endif - /* 0xBFC0B014: 00076880 sll $t5, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[13] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00076880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC0B018: ACD90000 sw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B018u); return; } g_debug_last_store_pc = 0xBFC0B018u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006000u); -#endif - /* 0xBFC0B01C: 03AD7021 addu $t6, $sp, $t5 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[13]; - PGXP_ALU(0x03AD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B020: ADC3004C sw $v1, 76($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B020u); return; } g_debug_last_store_pc = 0xBFC0B020u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xADC3004Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B020u); -#endif -label_BFC0B024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B024u); -#endif - /* 0xBFC0B024: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B024u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B024u); -#endif -label_BFC0B028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0B028: 27A5004C addiu $a1, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A5004Cu, cpu->gpr[5], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B02C: 0FF0262A jal 0xBFC098A8 */ - cpu->gpr[31] = 0xBFC0B034u; /* jal link before delay slot */ - psx_delay_BFC0B02C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0B030: AFA80034 sw $t0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B030u); return; } g_debug_last_store_pc = 0xBFC0B030u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80034u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B030u); -#endif - if (psx_delay_BFC0B02C) { - psx_delay_BFC0B02C = 0; - cpu->gpr[31] = 0xBFC0B034u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC098A8u); - cpu->pc = 0xBFC098A8u; return; - } -label_BFC0B034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B034u); -#endif - /* 0xBFC0B034: 8FA80034 lw $t0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B034u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80034u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B038: 10400016 beq $v0, $zero, 0xBFC0B094 */ - uint32_t psx_brA_BFC0B038 = cpu->gpr[2]; uint32_t psx_brB_BFC0B038 = cpu->gpr[0]; - psx_taken_BFC0B038 = (psx_brA_BFC0B038 == psx_brB_BFC0B038); - psx_delay_BFC0B038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0B03C: 340AFFFF ori $t2, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B03Cu); -#endif - if (psx_delay_BFC0B038) { - psx_delay_BFC0B038 = 0; - if (psx_taken_BFC0B038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B094u); - goto label_BFC0B094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B040u); - } -label_BFC0B040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0B040: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0B044: 27A20090 addiu $v0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A20090u, cpu->gpr[2], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B048: 240500A0 addiu $a1, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240500A0u, cpu->gpr[5], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0B04C: 2406000F addiu $a2, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2406000Fu, cpu->gpr[6], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B04Cu); -#endif -label_BFC0B050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B050u); -#endif - /* 0xBFC0B050: 8C4FFFBC lw $t7, -68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B050u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4FFFBCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B058: 11E00006 beq $t7, $zero, 0xBFC0B074 */ - uint32_t psx_brA_BFC0B058 = cpu->gpr[15]; uint32_t psx_brB_BFC0B058 = cpu->gpr[0]; - psx_taken_BFC0B058 = (psx_brA_BFC0B058 == psx_brB_BFC0B058); - psx_delay_BFC0B058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B05C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B05Cu); -#endif - if (psx_delay_BFC0B058) { - psx_delay_BFC0B058 = 0; - if (psx_taken_BFC0B058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B074u); - goto label_BFC0B074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B060u); - } -label_BFC0B060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC0B060: 0004C140 sll $t8, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 5u; - PGXP_ALU(0x0004C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000108u); -#endif - /* 0xBFC0B064: 01181821 addu $v1, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[24]; - PGXP_ALU(0x01181821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B068: AC600004 sw $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B068u); return; } g_debug_last_store_pc = 0xBFC0B068u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC0B06C: A46A0008 sh $t2, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B06Cu); return; } g_debug_last_store_pc = 0xBFC0B06Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC0B070: AC650000 sw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B070u); return; } g_debug_last_store_pc = 0xBFC0B070u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B070u); -#endif -label_BFC0B074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0B074: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC0B078: 1486FFF5 bne $a0, $a2, 0xBFC0B050 */ - uint32_t psx_brA_BFC0B078 = cpu->gpr[4]; uint32_t psx_brB_BFC0B078 = cpu->gpr[6]; - psx_taken_BFC0B078 = (psx_brA_BFC0B078 != psx_brB_BFC0B078); - psx_delay_BFC0B078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B07C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B07Cu); -#endif - if (psx_delay_BFC0B078) { - psx_delay_BFC0B078 = 0; - if (psx_taken_BFC0B078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B050u); - goto label_BFC0B050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B080u); - } -label_BFC0B080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B080u); -#endif - /* 0xBFC0B080: 8FAD0090 lw $t5, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B080u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0090u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0B084: 24190010 addiu $t9, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B088: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B08C: 10000009 beq $zero, $zero, 0xBFC0B0B4 */ - uint32_t psx_brA_BFC0B08C = cpu->gpr[0]; uint32_t psx_brB_BFC0B08C = cpu->gpr[0]; - psx_taken_BFC0B08C = (psx_brA_BFC0B08C == psx_brB_BFC0B08C); - psx_delay_BFC0B08C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC0B090: ADB90018 sw $t9, 24($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B090u); return; } g_debug_last_store_pc = 0xBFC0B090u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xADB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B090u); -#endif - if (psx_delay_BFC0B08C) { - psx_delay_BFC0B08C = 0; - if (psx_taken_BFC0B08C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0B4u); - goto label_BFC0B0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B094u); - } -label_BFC0B094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B094u); -#endif - /* 0xBFC0B094: 8FAE0090 lw $t6, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B094u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0090u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B098: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B09C: 10000005 beq $zero, $zero, 0xBFC0B0B4 */ - uint32_t psx_brA_BFC0B09C = cpu->gpr[0]; uint32_t psx_brB_BFC0B09C = cpu->gpr[0]; - psx_taken_BFC0B09C = (psx_brA_BFC0B09C == psx_brB_BFC0B09C); - psx_delay_BFC0B09C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0B0A0: ADC00018 sw $zero, 24($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0A0u); return; } g_debug_last_store_pc = 0xBFC0B0A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADC00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0A0u); -#endif - if (psx_delay_BFC0B09C) { - psx_delay_BFC0B09C = 0; - if (psx_taken_BFC0B09C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0B4u); - goto label_BFC0B0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0A4u); - } -label_BFC0B0A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0A4u); -#endif - /* 0xBFC0B0A4: 8FB80090 lw $t8, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0A4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80090u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0A4u); -#endif -label_BFC0B0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B0A8: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B0AC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0B0B0: AF0F0018 sw $t7, 24($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0B0u); return; } g_debug_last_store_pc = 0xBFC0B0B0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0B0u); -#endif -label_BFC0B0B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0B4u); -#endif - /* 0xBFC0B0B4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B0B8: 27BD0090 addiu $sp, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27BD0090u, cpu->gpr[29], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B0BC: 03E00008 jr $ra */ - psx_delay_BFC0B0BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B0C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0C0u); -#endif - if (psx_delay_BFC0B0BC) { - psx_delay_BFC0B0BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B0C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B0C4u); - int psx_delay_BFC0B0C8 = 0; -label_BFC0B0C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0B0C4: AC800018 sw $zero, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0C4u); return; } g_debug_last_store_pc = 0xBFC0B0C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B0C8: 03E00008 jr $ra */ - psx_delay_BFC0B0C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B0CC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0CCu); -#endif - if (psx_delay_BFC0B0C8) { - psx_delay_BFC0B0C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B0D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B0D0u); - int psx_delay_BFC0B0E8 = 0; - int psx_taken_BFC0B0E8 = 0; - int psx_delay_BFC0B108 = 0; - int psx_taken_BFC0B108 = 0; - int psx_delay_BFC0B118 = 0; - int psx_taken_BFC0B118 = 0; - int psx_delay_BFC0B120 = 0; - int psx_delay_BFC0B134 = 0; - int psx_delay_BFC0B140 = 0; - int psx_taken_BFC0B140 = 0; - int psx_delay_BFC0B150 = 0; - int psx_taken_BFC0B150 = 0; - int psx_delay_BFC0B168 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B0F0u: goto label_BFC0B0F0; - case 0xBFC0B0F4u: goto label_BFC0B0F4; - case 0xBFC0B110u: goto label_BFC0B110; - case 0xBFC0B120u: goto label_BFC0B120; - case 0xBFC0B128u: goto label_BFC0B128; - case 0xBFC0B13Cu: goto label_BFC0B13C; - case 0xBFC0B148u: goto label_BFC0B148; - case 0xBFC0B158u: goto label_BFC0B158; - case 0xBFC0B160u: goto label_BFC0B160; - default: break; - } - } -label_BFC0B0D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B0D0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B0D4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0D4u); return; } g_debug_last_store_pc = 0xBFC0B0D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0B0D8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0DCu); -#endif - /* 0xBFC0B0DC: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B0DCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0B0E0: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B0E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0B0E8: 05C10002 bgez $t6, 0xBFC0B0F4 */ - uint32_t psx_brA_BFC0B0E8 = cpu->gpr[14]; - psx_taken_BFC0B0E8 = ((int32_t)psx_brA_BFC0B0E8 >= 0); - psx_delay_BFC0B0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC0B0EC: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0ECu); -#endif - if (psx_delay_BFC0B0E8) { - psx_delay_BFC0B0E8 = 0; - if (psx_taken_BFC0B0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0F4u); - goto label_BFC0B0F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B0F0u); - } -label_BFC0B0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B0F0: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0F0u); -#endif -label_BFC0B0F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B0F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0B0F4: 00017903 sra $t7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0B0F8: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0B0FC: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B100u); -#endif - /* 0xBFC0B100: 8F399F20 lw $t9, -24800($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B100u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F20u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0B108: 13200005 beq $t9, $zero, 0xBFC0B120 */ - uint32_t psx_brA_BFC0B108 = cpu->gpr[25]; uint32_t psx_brB_BFC0B108 = cpu->gpr[0]; - psx_taken_BFC0B108 = (psx_brA_BFC0B108 == psx_brB_BFC0B108); - psx_delay_BFC0B108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B10C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B10Cu); -#endif - if (psx_delay_BFC0B108) { - psx_delay_BFC0B108 = 0; - if (psx_taken_BFC0B108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B120u); - goto label_BFC0B120; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B110u); - } -label_BFC0B110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0B110: 24080010 addiu $t0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24080010u, cpu->gpr[8], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC0B114: AC680018 sw $t0, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B114u); return; } g_debug_last_store_pc = 0xBFC0B114u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B118: 10000011 beq $zero, $zero, 0xBFC0B160 */ - uint32_t psx_brA_BFC0B118 = cpu->gpr[0]; uint32_t psx_brB_BFC0B118 = cpu->gpr[0]; - psx_taken_BFC0B118 = (psx_brA_BFC0B118 == psx_brB_BFC0B118); - psx_delay_BFC0B118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B11C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B11Cu); -#endif - if (psx_delay_BFC0B118) { - psx_delay_BFC0B118 = 0; - if (psx_taken_BFC0B118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B160u); - goto label_BFC0B160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B120u); - } -label_BFC0B120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B120: 0FF02213 jal 0xBFC0884C */ - cpu->gpr[31] = 0xBFC0B128u; /* jal link before delay slot */ - psx_delay_BFC0B120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0B124: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B124u); return; } g_debug_last_store_pc = 0xBFC0B124u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B124u); -#endif - if (psx_delay_BFC0B120) { - psx_delay_BFC0B120 = 0; - cpu->gpr[31] = 0xBFC0B128u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0884Cu); - cpu->pc = 0xBFC0884Cu; return; - } -label_BFC0B128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B128u); -#endif - /* 0xBFC0B128: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B128u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B12C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B130u); -#endif - /* 0xBFC0B130: 8C640004 lw $a0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B130u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x8C640004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B134: 0FF02C5C jal 0xBFC0B170 */ - cpu->gpr[31] = 0xBFC0B13Cu; /* jal link before delay slot */ - psx_delay_BFC0B134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B138u); -#endif - if (psx_delay_BFC0B134) { - psx_delay_BFC0B134 = 0; - cpu->gpr[31] = 0xBFC0B13Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B170u); - cpu->pc = 0xBFC0B170u; return; - } -label_BFC0B13C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B13Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B13Cu); -#endif - /* 0xBFC0B13C: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B13Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B140: 14400005 bne $v0, $zero, 0xBFC0B158 */ - uint32_t psx_brA_BFC0B140 = cpu->gpr[2]; uint32_t psx_brB_BFC0B140 = cpu->gpr[0]; - psx_taken_BFC0B140 = (psx_brA_BFC0B140 != psx_brB_BFC0B140); - psx_delay_BFC0B140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B144u); -#endif - if (psx_delay_BFC0B140) { - psx_delay_BFC0B140 = 0; - if (psx_taken_BFC0B140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B158u); - goto label_BFC0B158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B148u); - } -label_BFC0B148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0B148: 24090010 addiu $t1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24090010u, cpu->gpr[9], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC0B14C: AC690018 sw $t1, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B14Cu); return; } g_debug_last_store_pc = 0xBFC0B14Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B150: 10000003 beq $zero, $zero, 0xBFC0B160 */ - uint32_t psx_brA_BFC0B150 = cpu->gpr[0]; uint32_t psx_brB_BFC0B150 = cpu->gpr[0]; - psx_taken_BFC0B150 = (psx_brA_BFC0B150 == psx_brB_BFC0B150); - psx_delay_BFC0B150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B154: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B154u); -#endif - if (psx_delay_BFC0B150) { - psx_delay_BFC0B150 = 0; - if (psx_taken_BFC0B150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B160u); - goto label_BFC0B160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B158u); - } -label_BFC0B158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B158: AC600018 sw $zero, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B158u); return; } g_debug_last_store_pc = 0xBFC0B158u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B15C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B15Cu); -#endif -label_BFC0B160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B160u); -#endif - /* 0xBFC0B160: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B160u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B164: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B168: 03E00008 jr $ra */ - psx_delay_BFC0B168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B16C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B16Cu); -#endif - if (psx_delay_BFC0B168) { - psx_delay_BFC0B168 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B170(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B170u); - int psx_delay_BFC0B194 = 0; - int psx_taken_BFC0B194 = 0; - int psx_delay_BFC0B1B0 = 0; - int psx_delay_BFC0B1C8 = 0; - int psx_delay_BFC0B1D0 = 0; - int psx_delay_BFC0B1E0 = 0; - int psx_delay_BFC0B1EC = 0; - int psx_taken_BFC0B1EC = 0; - int psx_delay_BFC0B1F4 = 0; - int psx_taken_BFC0B1F4 = 0; - int psx_delay_BFC0B210 = 0; - int psx_delay_BFC0B250 = 0; - int psx_delay_BFC0B26C = 0; - int psx_delay_BFC0B274 = 0; - int psx_delay_BFC0B288 = 0; - int psx_delay_BFC0B290 = 0; - int psx_taken_BFC0B290 = 0; - int psx_delay_BFC0B2B0 = 0; - int psx_taken_BFC0B2B0 = 0; - int psx_delay_BFC0B2B8 = 0; - int psx_delay_BFC0B2C4 = 0; - int psx_taken_BFC0B2C4 = 0; - int psx_delay_BFC0B304 = 0; - int psx_delay_BFC0B30C = 0; - int psx_delay_BFC0B31C = 0; - int psx_delay_BFC0B324 = 0; - int psx_taken_BFC0B324 = 0; - int psx_delay_BFC0B344 = 0; - int psx_taken_BFC0B344 = 0; - int psx_delay_BFC0B34C = 0; - int psx_delay_BFC0B358 = 0; - int psx_taken_BFC0B358 = 0; - int psx_delay_BFC0B38C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B19Cu: goto label_BFC0B19C; - case 0xBFC0B1A0u: goto label_BFC0B1A0; - case 0xBFC0B1B8u: goto label_BFC0B1B8; - case 0xBFC0B1D0u: goto label_BFC0B1D0; - case 0xBFC0B1D8u: goto label_BFC0B1D8; - case 0xBFC0B1E8u: goto label_BFC0B1E8; - case 0xBFC0B1F4u: goto label_BFC0B1F4; - case 0xBFC0B1FCu: goto label_BFC0B1FC; - case 0xBFC0B218u: goto label_BFC0B218; - case 0xBFC0B248u: goto label_BFC0B248; - case 0xBFC0B258u: goto label_BFC0B258; - case 0xBFC0B274u: goto label_BFC0B274; - case 0xBFC0B27Cu: goto label_BFC0B27C; - case 0xBFC0B290u: goto label_BFC0B290; - case 0xBFC0B298u: goto label_BFC0B298; - case 0xBFC0B2B8u: goto label_BFC0B2B8; - case 0xBFC0B2C0u: goto label_BFC0B2C0; - case 0xBFC0B2CCu: goto label_BFC0B2CC; - case 0xBFC0B2F8u: goto label_BFC0B2F8; - case 0xBFC0B30Cu: goto label_BFC0B30C; - case 0xBFC0B314u: goto label_BFC0B314; - case 0xBFC0B324u: goto label_BFC0B324; - case 0xBFC0B32Cu: goto label_BFC0B32C; - case 0xBFC0B34Cu: goto label_BFC0B34C; - case 0xBFC0B354u: goto label_BFC0B354; - case 0xBFC0B360u: goto label_BFC0B360; - case 0xBFC0B37Cu: goto label_BFC0B37C; - default: break; - } - } -label_BFC0B170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B170: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC0B174: AFBE0020 sw $fp, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B174u); return; } g_debug_last_store_pc = 0xBFC0B174u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0020u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC0B178: 0080F021 addu $fp, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B17C: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0B180: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B180u); return; } g_debug_last_store_pc = 0xBFC0B180u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B184: 25EFBE48 addiu $t7, $t7, -16824 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16824)); - PGXP_ALU(0x25EFBE48u, cpu->gpr[15], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B188: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B188u); return; } g_debug_last_store_pc = 0xBFC0B188u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC0B18C: AFB7001C sw $s7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B18Cu); return; } g_debug_last_store_pc = 0xBFC0B18Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7001Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B190: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC0B194: 07C10002 bgez $fp, 0xBFC0B1A0 */ - uint32_t psx_brA_BFC0B194 = cpu->gpr[30]; - psx_taken_BFC0B194 = ((int32_t)psx_brA_BFC0B194 >= 0); - psx_delay_BFC0B194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000003u); -#endif - /* 0xBFC0B198: 03C00821 addu $at, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B198u); -#endif - if (psx_delay_BFC0B194) { - psx_delay_BFC0B194 = 0; - if (psx_taken_BFC0B194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B1A0u); - goto label_BFC0B1A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B19Cu); - } -label_BFC0B19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B19C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B19Cu); -#endif -label_BFC0B1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0B1A0: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0B1A4: 000271C0 sll $t6, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 7u; - PGXP_ALU(0x000271C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C000u); -#endif - /* 0xBFC0B1A8: 01CF9021 addu $s2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[18] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B1AC: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B1B0: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0B1B8u; /* jal link before delay slot */ - psx_delay_BFC0B1B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0B1B4: AFA2004C sw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B1B4u); return; } g_debug_last_store_pc = 0xBFC0B1B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1B4u); -#endif - if (psx_delay_BFC0B1B0) { - psx_delay_BFC0B1B0 = 0; - cpu->gpr[31] = 0xBFC0B1B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0B1B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0B1B8: 2418004D addiu $t8, $zero, 77 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); - PGXP_ALU(0x2418004Du, cpu->gpr[24], _pgx1, 0x0000004Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0B1BC: 24190043 addiu $t9, $zero, 67 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); - PGXP_ALU(0x24190043u, cpu->gpr[25], _pgx1, 0x00000043u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC0B1C0: A2580000 sb $t8, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0B1C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA2580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC0B1C4: A2590001 sb $t9, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0B1C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA2590001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B1C8: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC0B1D0u; /* jal link before delay slot */ - psx_delay_BFC0B1C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B1CC: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1CCu); -#endif - if (psx_delay_BFC0B1C8) { - psx_delay_BFC0B1C8 = 0; - cpu->gpr[31] = 0xBFC0B1D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC0B1D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B1D0: 0FF03684 jal 0xBFC0DA10 */ - cpu->gpr[31] = 0xBFC0B1D8u; /* jal link before delay slot */ - psx_delay_BFC0B1D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B1D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1D4u); -#endif - if (psx_delay_BFC0B1D0) { - psx_delay_BFC0B1D0 = 0; - cpu->gpr[31] = 0xBFC0B1D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA10u); - cpu->pc = 0xBFC0DA10u; return; - } -label_BFC0B1D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC0B1D8: 03C02021 addu $a0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B1DC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B1E0: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0B1E8u; /* jal link before delay slot */ - psx_delay_BFC0B1E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC0B1E4: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1E4u); -#endif - if (psx_delay_BFC0B1E0) { - psx_delay_BFC0B1E0 = 0; - cpu->gpr[31] = 0xBFC0B1E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0B1E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC0B1E8: 24170001 addiu $s7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24170001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800004u); -#endif - /* 0xBFC0B1EC: 10570003 beq $v0, $s7, 0xBFC0B1FC */ - uint32_t psx_brA_BFC0B1EC = cpu->gpr[2]; uint32_t psx_brB_BFC0B1EC = cpu->gpr[23]; - psx_taken_BFC0B1EC = (psx_brA_BFC0B1EC == psx_brB_BFC0B1EC); - psx_delay_BFC0B1EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B1F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1F0u); -#endif - if (psx_delay_BFC0B1EC) { - psx_delay_BFC0B1EC = 0; - if (psx_taken_BFC0B1EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B1FCu); - goto label_BFC0B1FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B1F4u); - } -label_BFC0B1F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B1F4: 10000061 beq $zero, $zero, 0xBFC0B37C */ - uint32_t psx_brA_BFC0B1F4 = cpu->gpr[0]; uint32_t psx_brB_BFC0B1F4 = cpu->gpr[0]; - psx_taken_BFC0B1F4 = (psx_brA_BFC0B1F4 == psx_brB_BFC0B1F4); - psx_delay_BFC0B1F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B1F8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1F8u); -#endif - if (psx_delay_BFC0B1F4) { - psx_delay_BFC0B1F4 = 0; - if (psx_taken_BFC0B1F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B37Cu); - goto label_BFC0B37C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B1FCu); - } -label_BFC0B1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0B1FC: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B1FCu); return; } g_debug_last_store_pc = 0xBFC0B1FCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0B200: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B200u); return; } g_debug_last_store_pc = 0xBFC0B200u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0B204: AFB30034 sw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B204u); return; } g_debug_last_store_pc = 0xBFC0B204u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0B208: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B208u); return; } g_debug_last_store_pc = 0xBFC0B208u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC0B20C: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B20Cu); return; } g_debug_last_store_pc = 0xBFC0B20Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B210: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC0B218u; /* jal link before delay slot */ - psx_delay_BFC0B210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC0B214: AFB60028 sw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B214u); return; } g_debug_last_store_pc = 0xBFC0B214u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B214u); -#endif - if (psx_delay_BFC0B210) { - psx_delay_BFC0B210 = 0; - cpu->gpr[31] = 0xBFC0B218u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC0B218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B218u); -#endif - /* 0xBFC0B218: 8FA8004C lw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B218u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0B21C: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0B220: 00084900 sll $t1, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0B224: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0B228: 00094940 sll $t1, $t1, 5 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 5u; - PGXP_ALU(0x00094940u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0B22C: 254ABA88 addiu $t2, $t2, -17784 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-17784)); - PGXP_ALU(0x254ABA88u, cpu->gpr[10], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400600u); -#endif - /* 0xBFC0B230: 012AB021 addu $s6, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[22] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012AB021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0B234: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0B238: 241300A0 addiu $s3, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x241300A0u, cpu->gpr[19], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC0B23C: 3414FFFF ori $s4, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3414FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC0B240: 2415000F addiu $s5, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2415000Fu, cpu->gpr[21], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0B244: 00115940 sll $t3, $s1, 5 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 5u; - PGXP_ALU(0x00115940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B244u); -#endif -label_BFC0B248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410800u); -#endif - /* 0xBFC0B248: 02CB8021 addu $s0, $s6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[16] = cpu->gpr[22] + cpu->gpr[11]; - PGXP_ALU(0x02CB8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0B24C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B250: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0B258u; /* jal link before delay slot */ - psx_delay_BFC0B250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B254: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B254u); -#endif - if (psx_delay_BFC0B250) { - psx_delay_BFC0B250 = 0; - cpu->gpr[31] = 0xBFC0B258u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0B258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC0B258: AE130000 sw $s3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B258u); return; } g_debug_last_store_pc = 0xBFC0B258u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAE130000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0B25C: AE000004 sw $zero, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B25Cu); return; } g_debug_last_store_pc = 0xBFC0B25Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC0B260: A6140008 sh $s4, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B260u); return; } g_debug_last_store_pc = 0xBFC0B260u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA6140008u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B264: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0B268: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B26C: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0B274u; /* jal link before delay slot */ - psx_delay_BFC0B26C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0B270: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B270u); -#endif - if (psx_delay_BFC0B26C) { - psx_delay_BFC0B26C = 0; - cpu->gpr[31] = 0xBFC0B274u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0B274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B274: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC0B27Cu; /* jal link before delay slot */ - psx_delay_BFC0B274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B278: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B278u); -#endif - if (psx_delay_BFC0B274) { - psx_delay_BFC0B274 = 0; - cpu->gpr[31] = 0xBFC0B27Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC0B27C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B27Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0B27C: 26300001 addiu $s0, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26300001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0B280: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC0B284: 03C02021 addu $a0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B288: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0B290u; /* jal link before delay slot */ - psx_delay_BFC0B288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC0B28C: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B28Cu); -#endif - if (psx_delay_BFC0B288) { - psx_delay_BFC0B288 = 0; - cpu->gpr[31] = 0xBFC0B290u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0B290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800004u); -#endif - /* 0xBFC0B290: 10570009 beq $v0, $s7, 0xBFC0B2B8 */ - uint32_t psx_brA_BFC0B290 = cpu->gpr[2]; uint32_t psx_brB_BFC0B290 = cpu->gpr[23]; - psx_taken_BFC0B290 = (psx_brA_BFC0B290 == psx_brB_BFC0B290); - psx_delay_BFC0B290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B294u); -#endif - if (psx_delay_BFC0B290) { - psx_delay_BFC0B290 = 0; - if (psx_taken_BFC0B290) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B2B8u); - goto label_BFC0B2B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B298u); - } -label_BFC0B298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B298u); -#endif - /* 0xBFC0B298: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B298u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B29Cu); -#endif - /* 0xBFC0B29C: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B29Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2A0u); -#endif - /* 0xBFC0B2A0: 8FB30034 lw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2A0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2A4u); -#endif - /* 0xBFC0B2A4: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2A4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2A8u); -#endif - /* 0xBFC0B2A8: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2A8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2ACu); -#endif - /* 0xBFC0B2AC: 8FB60028 lw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2ACu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B2B0: 10000032 beq $zero, $zero, 0xBFC0B37C */ - uint32_t psx_brA_BFC0B2B0 = cpu->gpr[0]; uint32_t psx_brB_BFC0B2B0 = cpu->gpr[0]; - psx_taken_BFC0B2B0 = (psx_brA_BFC0B2B0 == psx_brB_BFC0B2B0); - psx_delay_BFC0B2B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B2B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2B4u); -#endif - if (psx_delay_BFC0B2B0) { - psx_delay_BFC0B2B0 = 0; - if (psx_taken_BFC0B2B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B37Cu); - goto label_BFC0B37C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B2B8u); - } -label_BFC0B2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B2B8: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC0B2C0u; /* jal link before delay slot */ - psx_delay_BFC0B2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B2BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2BCu); -#endif - if (psx_delay_BFC0B2B8) { - psx_delay_BFC0B2B8 = 0; - cpu->gpr[31] = 0xBFC0B2C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC0B2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC0B2C0: 02008821 addu $s1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC0B2C4: 1635FFE0 bne $s1, $s5, 0xBFC0B248 */ - uint32_t psx_brA_BFC0B2C4 = cpu->gpr[17]; uint32_t psx_brB_BFC0B2C4 = cpu->gpr[21]; - psx_taken_BFC0B2C4 = (psx_brA_BFC0B2C4 != psx_brB_BFC0B2C4); - psx_delay_BFC0B2C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0B2C8: 00115940 sll $t3, $s1, 5 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 5u; - PGXP_ALU(0x00115940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2C8u); -#endif - if (psx_delay_BFC0B2C4) { - psx_delay_BFC0B2C4 = 0; - if (psx_taken_BFC0B2C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B248u); - goto label_BFC0B248; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B2CCu); - } -label_BFC0B2CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B2CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2CCu); -#endif - /* 0xBFC0B2CC: 8FAC004C lw $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2CCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0B2D0: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC0B2D4: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC0B2D8: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0B2DC: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0B2E0: 25CEB9E8 addiu $t6, $t6, -17944 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-17944)); - PGXP_ALU(0x25CEB9E8u, cpu->gpr[14], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106000u); -#endif - /* 0xBFC0B2E4: 01AEA021 addu $s4, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[20] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AEA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0B2E8: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0B2EC: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0B2F0: 24130014 addiu $s3, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24130014u, cpu->gpr[19], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B2F4: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2F4u); -#endif -label_BFC0B2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108020u); -#endif - /* 0xBFC0B2F8: 028F2821 addu $a1, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC0B2FC: ACB00000 sw $s0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B2FCu); return; } g_debug_last_store_pc = 0xBFC0B2FCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xACB00000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B300: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B304: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0B30Cu; /* jal link before delay slot */ - psx_delay_BFC0B304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0B308: 24060004 addiu $a2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24060004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B308u); -#endif - if (psx_delay_BFC0B304) { - psx_delay_BFC0B304 = 0; - cpu->gpr[31] = 0xBFC0B30Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0B30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B30C: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC0B314u; /* jal link before delay slot */ - psx_delay_BFC0B30C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0B310: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B310u); -#endif - if (psx_delay_BFC0B30C) { - psx_delay_BFC0B30C = 0; - cpu->gpr[31] = 0xBFC0B314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC0B314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC0B314: 03C02021 addu $a0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC0B318: 26250010 addiu $a1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[17] + (16)); - PGXP_ALU(0x26250010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B31C: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0B324u; /* jal link before delay slot */ - psx_delay_BFC0B31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC0B320: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B320u); -#endif - if (psx_delay_BFC0B31C) { - psx_delay_BFC0B31C = 0; - cpu->gpr[31] = 0xBFC0B324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0B324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800004u); -#endif - /* 0xBFC0B324: 10570009 beq $v0, $s7, 0xBFC0B34C */ - uint32_t psx_brA_BFC0B324 = cpu->gpr[2]; uint32_t psx_brB_BFC0B324 = cpu->gpr[23]; - psx_taken_BFC0B324 = (psx_brA_BFC0B324 == psx_brB_BFC0B324); - psx_delay_BFC0B324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B328: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B328u); -#endif - if (psx_delay_BFC0B324) { - psx_delay_BFC0B324 = 0; - if (psx_taken_BFC0B324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B34Cu); - goto label_BFC0B34C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B32Cu); - } -label_BFC0B32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B32Cu); -#endif - /* 0xBFC0B32C: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B32Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B330u); -#endif - /* 0xBFC0B330: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B330u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B334u); -#endif - /* 0xBFC0B334: 8FB30034 lw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B334u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B338u); -#endif - /* 0xBFC0B338: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B338u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B33Cu); -#endif - /* 0xBFC0B33C: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B33Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B340u); -#endif - /* 0xBFC0B340: 8FB60028 lw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B340u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B344: 1000000D beq $zero, $zero, 0xBFC0B37C */ - uint32_t psx_brA_BFC0B344 = cpu->gpr[0]; uint32_t psx_brB_BFC0B344 = cpu->gpr[0]; - psx_taken_BFC0B344 = (psx_brA_BFC0B344 == psx_brB_BFC0B344); - psx_delay_BFC0B344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B348: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B348u); -#endif - if (psx_delay_BFC0B344) { - psx_delay_BFC0B344 = 0; - if (psx_taken_BFC0B344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B37Cu); - goto label_BFC0B37C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B34Cu); - } -label_BFC0B34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B34C: 0FF02257 jal 0xBFC0895C */ - cpu->gpr[31] = 0xBFC0B354u; /* jal link before delay slot */ - psx_delay_BFC0B34C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B350: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B350u); -#endif - if (psx_delay_BFC0B34C) { - psx_delay_BFC0B34C = 0; - cpu->gpr[31] = 0xBFC0B354u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0895Cu); - cpu->pc = 0xBFC0895Cu; return; - } -label_BFC0B354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0B354: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC0B358: 1633FFE7 bne $s1, $s3, 0xBFC0B2F8 */ - uint32_t psx_brA_BFC0B358 = cpu->gpr[17]; uint32_t psx_brB_BFC0B358 = cpu->gpr[19]; - psx_taken_BFC0B358 = (psx_brA_BFC0B358 != psx_brB_BFC0B358); - psx_delay_BFC0B358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B35C: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B35Cu); -#endif - if (psx_delay_BFC0B358) { - psx_delay_BFC0B358 = 0; - if (psx_taken_BFC0B358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B2F8u); - goto label_BFC0B2F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B360u); - } -label_BFC0B360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B360u); -#endif - /* 0xBFC0B360: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B360u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B364u); -#endif - /* 0xBFC0B364: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B364u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B368u); -#endif - /* 0xBFC0B368: 8FB30034 lw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B368u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B36Cu); -#endif - /* 0xBFC0B36C: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B36Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B370u); -#endif - /* 0xBFC0B370: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B370u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B374u); -#endif - /* 0xBFC0B374: 8FB60028 lw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B374u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B378: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B378u); -#endif -label_BFC0B37C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B37Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B37Cu); -#endif - /* 0xBFC0B37C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B37Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B380u); -#endif - /* 0xBFC0B380: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B380u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B384u); -#endif - /* 0xBFC0B384: 8FB7001C lw $s7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B384u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7001Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B388u); -#endif - /* 0xBFC0B388: 8FBE0020 lw $fp, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B388u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0020u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B38C: 03E00008 jr $ra */ - psx_delay_BFC0B38C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B390: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B390u); -#endif - if (psx_delay_BFC0B38C) { - psx_delay_BFC0B38C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B394(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B394u); - int psx_delay_BFC0B39C = 0; - int psx_delay_BFC0B3B0 = 0; - int psx_taken_BFC0B3B0 = 0; - int psx_delay_BFC0B3D0 = 0; - int psx_taken_BFC0B3D0 = 0; - int psx_delay_BFC0B3DC = 0; - int psx_taken_BFC0B3DC = 0; - int psx_delay_BFC0B3E4 = 0; - int psx_taken_BFC0B3E4 = 0; - int psx_delay_BFC0B3EC = 0; - int psx_taken_BFC0B3EC = 0; - int psx_delay_BFC0B430 = 0; - int psx_delay_BFC0B448 = 0; - int psx_delay_BFC0B45C = 0; - int psx_taken_BFC0B45C = 0; - int psx_delay_BFC0B490 = 0; - int psx_taken_BFC0B490 = 0; - int psx_delay_BFC0B49C = 0; - int psx_taken_BFC0B49C = 0; - int psx_delay_BFC0B4A8 = 0; - int psx_taken_BFC0B4A8 = 0; - int psx_delay_BFC0B4D8 = 0; - int psx_delay_BFC0B4F4 = 0; - int psx_taken_BFC0B4F4 = 0; - int psx_delay_BFC0B528 = 0; - int psx_taken_BFC0B528 = 0; - int psx_delay_BFC0B534 = 0; - int psx_delay_BFC0B544 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B3A4u: goto label_BFC0B3A4; - case 0xBFC0B3B8u: goto label_BFC0B3B8; - case 0xBFC0B3BCu: goto label_BFC0B3BC; - case 0xBFC0B3D8u: goto label_BFC0B3D8; - case 0xBFC0B3E4u: goto label_BFC0B3E4; - case 0xBFC0B3ECu: goto label_BFC0B3EC; - case 0xBFC0B3F4u: goto label_BFC0B3F4; - case 0xBFC0B438u: goto label_BFC0B438; - case 0xBFC0B450u: goto label_BFC0B450; - case 0xBFC0B464u: goto label_BFC0B464; - case 0xBFC0B468u: goto label_BFC0B468; - case 0xBFC0B488u: goto label_BFC0B488; - case 0xBFC0B498u: goto label_BFC0B498; - case 0xBFC0B4A4u: goto label_BFC0B4A4; - case 0xBFC0B4A8u: goto label_BFC0B4A8; - case 0xBFC0B4B0u: goto label_BFC0B4B0; - case 0xBFC0B4E0u: goto label_BFC0B4E0; - case 0xBFC0B4FCu: goto label_BFC0B4FC; - case 0xBFC0B530u: goto label_BFC0B530; - case 0xBFC0B534u: goto label_BFC0B534; - case 0xBFC0B53Cu: goto label_BFC0B53C; - default: break; - } - } -label_BFC0B394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B394: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B398: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B398u); return; } g_debug_last_store_pc = 0xBFC0B398u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B39C: 0FF0368C jal 0xBFC0DA30 */ - cpu->gpr[31] = 0xBFC0B3A4u; /* jal link before delay slot */ - psx_delay_BFC0B39C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B3A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3A0u); -#endif - if (psx_delay_BFC0B39C) { - psx_delay_BFC0B39C = 0; - cpu->gpr[31] = 0xBFC0B3A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA30u); - cpu->pc = 0xBFC0DA30u; return; - } -label_BFC0B3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC0B3A4: 3C07A001 lui $a3, 0xA001 */ - cpu->gpr[7] = 0xA0010000u; - PGXP_ALU(0x3C07A001u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC0B3A8: 24E79F20 addiu $a3, $a3, -24800 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-24800)); - PGXP_ALU(0x24E79F20u, cpu->gpr[7], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0B3AC: AFA20034 sw $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B3ACu); return; } g_debug_last_store_pc = 0xBFC0B3ACu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B3B0: 04410002 bgez $v0, 0xBFC0B3BC */ - uint32_t psx_brA_BFC0B3B0 = cpu->gpr[2]; - psx_taken_BFC0B3B0 = ((int32_t)psx_brA_BFC0B3B0 >= 0); - psx_delay_BFC0B3B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0B3B4: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3B4u); -#endif - if (psx_delay_BFC0B3B0) { - psx_delay_BFC0B3B0 = 0; - if (psx_taken_BFC0B3B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3BCu); - goto label_BFC0B3BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3B8u); - } -label_BFC0B3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B3B8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3B8u); -#endif -label_BFC0B3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0B3BC: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B3C0: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC080u); -#endif - /* 0xBFC0B3C4: 00EE7821 addu $t7, $a3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[7] + cpu->gpr[14]; - PGXP_ALU(0x00EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3C8u); -#endif - /* 0xBFC0B3C8: 8DE40000 lw $a0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B3C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000u); } - PGXP_LOAD(0x8DE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B3CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0B3D0: 1080005A beq $a0, $zero, 0xBFC0B53C */ - uint32_t psx_brA_BFC0B3D0 = cpu->gpr[4]; uint32_t psx_brB_BFC0B3D0 = cpu->gpr[0]; - psx_taken_BFC0B3D0 = (psx_brA_BFC0B3D0 == psx_brB_BFC0B3D0); - psx_delay_BFC0B3D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC0B3D4: 00604021 addu $t0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00604021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3D4u); -#endif - if (psx_delay_BFC0B3D0) { - psx_delay_BFC0B3D0 = 0; - if (psx_taken_BFC0B3D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B53Cu); - goto label_BFC0B53C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3D8u); - } -label_BFC0B3D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B3D8: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0B3DC: 10810005 beq $a0, $at, 0xBFC0B3F4 */ - uint32_t psx_brA_BFC0B3DC = cpu->gpr[4]; uint32_t psx_brB_BFC0B3DC = cpu->gpr[1]; - psx_taken_BFC0B3DC = (psx_brA_BFC0B3DC == psx_brB_BFC0B3DC); - psx_delay_BFC0B3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B3E0: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3E0u); -#endif - if (psx_delay_BFC0B3DC) { - psx_delay_BFC0B3DC = 0; - if (psx_taken_BFC0B3DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3F4u); - goto label_BFC0B3F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3E4u); - } -label_BFC0B3E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0B3E4: 10810003 beq $a0, $at, 0xBFC0B3F4 */ - uint32_t psx_brA_BFC0B3E4 = cpu->gpr[4]; uint32_t psx_brB_BFC0B3E4 = cpu->gpr[1]; - psx_taken_BFC0B3E4 = (psx_brA_BFC0B3E4 == psx_brB_BFC0B3E4); - psx_delay_BFC0B3E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B3E8: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3E8u); -#endif - if (psx_delay_BFC0B3E4) { - psx_delay_BFC0B3E4 = 0; - if (psx_taken_BFC0B3E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3F4u); - goto label_BFC0B3F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3ECu); - } -label_BFC0B3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0B3EC: 14810051 bne $a0, $at, 0xBFC0B534 */ - uint32_t psx_brA_BFC0B3EC = cpu->gpr[4]; uint32_t psx_brB_BFC0B3EC = cpu->gpr[1]; - psx_taken_BFC0B3EC = (psx_brA_BFC0B3EC != psx_brB_BFC0B3EC); - psx_delay_BFC0B3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B3F0: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3F0u); -#endif - if (psx_delay_BFC0B3EC) { - psx_delay_BFC0B3EC = 0; - if (psx_taken_BFC0B3EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B534u); - goto label_BFC0B534; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B3F4u); - } -label_BFC0B3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0B3F4: 0008C880 sll $t9, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 2u; - PGXP_ALU(0x0008C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000480u); -#endif - /* 0xBFC0B3F8: 00F95021 addu $t2, $a3, $t9 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[7] + cpu->gpr[25]; - PGXP_ALU(0x00F95021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0B3FC: 24180005 addiu $t8, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24180005u, cpu->gpr[24], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC0B400: 00085880 sll $t3, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0B404: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC0B408: AD580000 sw $t8, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B408u); return; } g_debug_last_store_pc = 0xBFC0B408u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0B40C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC0B410: 00086880 sll $t5, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[13] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00086880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0B414: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B418u); -#endif - /* 0xBFC0B418: 8D8C9F70 lw $t4, -24720($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B418u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9F70u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC0B41C: 00CD3021 addu $a2, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[13]; - PGXP_ALU(0x00CD3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B420u); -#endif - /* 0xBFC0B420: 8CC69F50 lw $a2, -24752($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B420u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F50u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B424u); -#endif - /* 0xBFC0B424: 8D850024 lw $a1, 36($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B424u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x1000u); } - PGXP_LOAD(0x8D850024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0B428: AFA80030 sw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B428u); return; } g_debug_last_store_pc = 0xBFC0B428u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B42C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B430: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC0B438u; /* jal link before delay slot */ - psx_delay_BFC0B430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0B434: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B434u); -#endif - if (psx_delay_BFC0B430) { - psx_delay_BFC0B430 = 0; - cpu->gpr[31] = 0xBFC0B438u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC0B438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B438u); -#endif - /* 0xBFC0B438: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B438u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC0B43C: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0B440: AFA70028 sw $a3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B440u); return; } g_debug_last_store_pc = 0xBFC0B440u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70028u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0B444: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B448: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC0B450u; /* jal link before delay slot */ - psx_delay_BFC0B448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B44C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B44Cu); -#endif - if (psx_delay_BFC0B448) { - psx_delay_BFC0B448 = 0; - cpu->gpr[31] = 0xBFC0B450u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC0B450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0B450: 2404FFFF addiu $a0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2404FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B454u); -#endif - /* 0xBFC0B454: 8FA70028 lw $a3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B454u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70028u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B458u); -#endif - /* 0xBFC0B458: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B458u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0B45C: 14440002 bne $v0, $a0, 0xBFC0B468 */ - uint32_t psx_brA_BFC0B45C = cpu->gpr[2]; uint32_t psx_brB_BFC0B45C = cpu->gpr[4]; - psx_taken_BFC0B45C = (psx_brA_BFC0B45C != psx_brB_BFC0B45C); - psx_delay_BFC0B45C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x205u); -#endif - /* 0xBFC0B460: 00404821 addu $t1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B460u); -#endif - if (psx_delay_BFC0B45C) { - psx_delay_BFC0B45C = 0; - if (psx_taken_BFC0B45C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B468u); - goto label_BFC0B468; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B464u); - } -label_BFC0B464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x281u); -#endif - /* 0xBFC0B464: 00E04821 addu $t1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B464u); -#endif -label_BFC0B468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC0B468: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC0B46C: 01C87021 addu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[8]; - PGXP_ALU(0x01C87021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B470: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B474: 25EFB9E8 addiu $t7, $t7, -17944 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-17944)); - PGXP_ALU(0x25EFB9E8u, cpu->gpr[15], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0B478: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC0B47C: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0B480: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0B484: 24020014 addiu $v0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24020014u, cpu->gpr[2], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B484u); -#endif -label_BFC0B488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B488u); -#endif - /* 0xBFC0B488: 8C790000 lw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B488u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B48C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC0B490: 10990005 beq $a0, $t9, 0xBFC0B4A8 */ - uint32_t psx_brA_BFC0B490 = cpu->gpr[4]; uint32_t psx_brB_BFC0B490 = cpu->gpr[25]; - psx_taken_BFC0B490 = (psx_brA_BFC0B490 == psx_brB_BFC0B490); - psx_delay_BFC0B490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC0B494: 28E10014 slti $at, $a3, 20 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0); - PGXP_ALU(0x28E10014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B494u); -#endif - if (psx_delay_BFC0B490) { - psx_delay_BFC0B490 = 0; - if (psx_taken_BFC0B490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B4A8u); - goto label_BFC0B4A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B498u); - } -label_BFC0B498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC0B498: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC0B49C: 14E2FFFA bne $a3, $v0, 0xBFC0B488 */ - uint32_t psx_brA_BFC0B49C = cpu->gpr[7]; uint32_t psx_brB_BFC0B49C = cpu->gpr[2]; - psx_taken_BFC0B49C = (psx_brA_BFC0B49C != psx_brB_BFC0B49C); - psx_delay_BFC0B49C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0B4A0: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4A0u); -#endif - if (psx_delay_BFC0B49C) { - psx_delay_BFC0B49C = 0; - if (psx_taken_BFC0B49C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B488u); - goto label_BFC0B488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B4A4u); - } -label_BFC0B4A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B4A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC0B4A4: 28E10014 slti $at, $a3, 20 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (20) ? 1 : 0); - PGXP_ALU(0x28E10014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4A4u); -#endif -label_BFC0B4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B4A8: 10200022 beq $at, $zero, 0xBFC0B534 */ - uint32_t psx_brA_BFC0B4A8 = cpu->gpr[1]; uint32_t psx_brB_BFC0B4A8 = cpu->gpr[0]; - psx_taken_BFC0B4A8 = (psx_brA_BFC0B4A8 == psx_brB_BFC0B4A8); - psx_delay_BFC0B4A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B4AC: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4ACu); -#endif - if (psx_delay_BFC0B4A8) { - psx_delay_BFC0B4A8 = 0; - if (psx_taken_BFC0B4A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B534u); - goto label_BFC0B534; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B4B0u); - } -label_BFC0B4B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B4B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC0B4B0: 0008C080 sll $t8, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 2u; - PGXP_ALU(0x0008C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0B4B4: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC0B4B8: 00D83021 addu $a2, $a2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[24]; - PGXP_ALU(0x00D83021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4BCu); -#endif - /* 0xBFC0B4BC: 8CC69F78 lw $a2, -24712($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4BCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F78u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0B4C0: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4C0u); return; } g_debug_last_store_pc = 0xBFC0B4C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4C4u); -#endif - /* 0xBFC0B4C4: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0B4C8: AFA70028 sw $a3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4C8u); return; } g_debug_last_store_pc = 0xBFC0B4C8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70028u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0B4CC: AFA80030 sw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4CCu); return; } g_debug_last_store_pc = 0xBFC0B4CCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC0B4D0: 24E50024 addiu $a1, $a3, 36 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[7] + (36)); - PGXP_ALU(0x24E50024u, cpu->gpr[5], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0B4D4: AFA9002C sw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4D4u); return; } g_debug_last_store_pc = 0xBFC0B4D4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B4D8: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0B4E0u; /* jal link before delay slot */ - psx_delay_BFC0B4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0B4DC: 24C6FF80 addiu $a2, $a2, -128 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-128)); - PGXP_ALU(0x24C6FF80u, cpu->gpr[6], _pgx1, 0xFFFFFF80u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4DCu); -#endif - if (psx_delay_BFC0B4D8) { - psx_delay_BFC0B4D8 = 0; - cpu->gpr[31] = 0xBFC0B4E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0B4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4E0u); -#endif - /* 0xBFC0B4E0: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4E4u); -#endif - /* 0xBFC0B4E4: 8FA70028 lw $a3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4E4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70028u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4E8u); -#endif - /* 0xBFC0B4E8: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4E8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4ECu); -#endif - /* 0xBFC0B4EC: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B4ECu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B4F0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0B4F4: 1441000F bne $v0, $at, 0xBFC0B534 */ - uint32_t psx_brA_BFC0B4F4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B4F4 = cpu->gpr[1]; - psx_taken_BFC0B4F4 = (psx_brA_BFC0B4F4 != psx_brB_BFC0B4F4); - psx_delay_BFC0B4F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B4F8: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4F8u); -#endif - if (psx_delay_BFC0B4F4) { - psx_delay_BFC0B4F4 = 0; - if (psx_taken_BFC0B4F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B534u); - goto label_BFC0B534; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B4FCu); - } -label_BFC0B4FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B4FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0B4FC: 240AFFFE addiu $t2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240AFFFEu, cpu->gpr[10], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC0B500: 00085880 sll $t3, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B504: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC0B508: AC6A0000 sw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B508u); return; } g_debug_last_store_pc = 0xBFC0B508u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0B50C: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC0B510: AC279F60 sw $a3, -24736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B510u); return; } g_debug_last_store_pc = 0xBFC0B510u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279F60u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B514: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC0B518: 00086080 sll $t4, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00086080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC0B51C: 002C0821 addu $at, $at, $t4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[12]; - PGXP_ALU(0x002C0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC0B520: AC299F68 sw $t1, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B520u); return; } g_debug_last_store_pc = 0xBFC0B520u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299F68u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B524: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B528: 10000004 beq $zero, $zero, 0xBFC0B53C */ - uint32_t psx_brA_BFC0B528 = cpu->gpr[0]; uint32_t psx_brB_BFC0B528 = cpu->gpr[0]; - psx_taken_BFC0B528 = (psx_brA_BFC0B528 == psx_brB_BFC0B528); - psx_delay_BFC0B528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B52C: AC20B9E0 sw $zero, -17952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B52Cu); return; } g_debug_last_store_pc = 0xBFC0B52Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9E0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B52Cu); -#endif - if (psx_delay_BFC0B528) { - psx_delay_BFC0B528 = 0; - if (psx_taken_BFC0B528) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B53Cu); - goto label_BFC0B53C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B530u); - } -label_BFC0B530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC0B530: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B530u); -#endif -label_BFC0B534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B534: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B53Cu; /* jal link before delay slot */ - psx_delay_BFC0B534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B538: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B538u); -#endif - if (psx_delay_BFC0B534) { - psx_delay_BFC0B534 = 0; - cpu->gpr[31] = 0xBFC0B53Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B53C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B53Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B53Cu); -#endif - /* 0xBFC0B53C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B53Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B540: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B544: 03E00008 jr $ra */ - psx_delay_BFC0B544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B548: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B548u); -#endif - if (psx_delay_BFC0B544) { - psx_delay_BFC0B544 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B54C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B54Cu); - int psx_delay_BFC0B554 = 0; - int psx_delay_BFC0B55C = 0; - int psx_taken_BFC0B55C = 0; - int psx_delay_BFC0B580 = 0; - int psx_taken_BFC0B580 = 0; - int psx_delay_BFC0B588 = 0; - int psx_delay_BFC0B598 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B55Cu: goto label_BFC0B55C; - case 0xBFC0B564u: goto label_BFC0B564; - case 0xBFC0B568u: goto label_BFC0B568; - case 0xBFC0B588u: goto label_BFC0B588; - case 0xBFC0B590u: goto label_BFC0B590; - case 0xBFC0B594u: goto label_BFC0B594; - default: break; - } - } -label_BFC0B54C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B54Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B54C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B550: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B550u); return; } g_debug_last_store_pc = 0xBFC0B550u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B554: 0FF0368C jal 0xBFC0DA30 */ - cpu->gpr[31] = 0xBFC0B55Cu; /* jal link before delay slot */ - psx_delay_BFC0B554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B558: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B558u); -#endif - if (psx_delay_BFC0B554) { - psx_delay_BFC0B554 = 0; - cpu->gpr[31] = 0xBFC0B55Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA30u); - cpu->pc = 0xBFC0DA30u; return; - } -label_BFC0B55C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B55Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B55C: 04410002 bgez $v0, 0xBFC0B568 */ - uint32_t psx_brA_BFC0B55C = cpu->gpr[2]; - psx_taken_BFC0B55C = ((int32_t)psx_brA_BFC0B55C >= 0); - psx_delay_BFC0B55C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0B560: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B560u); -#endif - if (psx_delay_BFC0B55C) { - psx_delay_BFC0B55C = 0; - if (psx_taken_BFC0B55C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B568u); - goto label_BFC0B568; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B564u); - } -label_BFC0B564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B564: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B564u); -#endif -label_BFC0B568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0B568: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B56C: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B570: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0B574: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B578u); -#endif - /* 0xBFC0B578: 8DEF9F20 lw $t7, -24800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B578u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F20u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0B57C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B580: 11E00004 beq $t7, $zero, 0xBFC0B594 */ - uint32_t psx_brA_BFC0B580 = cpu->gpr[15]; uint32_t psx_brB_BFC0B580 = cpu->gpr[0]; - psx_taken_BFC0B580 = (psx_brA_BFC0B580 == psx_brB_BFC0B580); - psx_delay_BFC0B580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B584u); -#endif - /* 0xBFC0B584: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B584u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B584u); -#endif - if (psx_delay_BFC0B580) { - psx_delay_BFC0B580 = 0; - if (psx_taken_BFC0B580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B594u); - goto label_BFC0B594; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B588u); - } -label_BFC0B588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B588: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B590u; /* jal link before delay slot */ - psx_delay_BFC0B588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B58C: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B58Cu); -#endif - if (psx_delay_BFC0B588) { - psx_delay_BFC0B588 = 0; - cpu->gpr[31] = 0xBFC0B590u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B590u); -#endif - /* 0xBFC0B590: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B590u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B590u); -#endif -label_BFC0B594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B594: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B598: 03E00008 jr $ra */ - psx_delay_BFC0B598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B59C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B59Cu); -#endif - if (psx_delay_BFC0B598) { - psx_delay_BFC0B598 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B5A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B5A0u); - int psx_delay_BFC0B5A8 = 0; - int psx_delay_BFC0B5B0 = 0; - int psx_taken_BFC0B5B0 = 0; - int psx_delay_BFC0B5D4 = 0; - int psx_taken_BFC0B5D4 = 0; - int psx_delay_BFC0B5DC = 0; - int psx_delay_BFC0B5EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B5B0u: goto label_BFC0B5B0; - case 0xBFC0B5B8u: goto label_BFC0B5B8; - case 0xBFC0B5BCu: goto label_BFC0B5BC; - case 0xBFC0B5DCu: goto label_BFC0B5DC; - case 0xBFC0B5E4u: goto label_BFC0B5E4; - case 0xBFC0B5E8u: goto label_BFC0B5E8; - default: break; - } - } -label_BFC0B5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B5A0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B5A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B5A4u); return; } g_debug_last_store_pc = 0xBFC0B5A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B5A8: 0FF0368C jal 0xBFC0DA30 */ - cpu->gpr[31] = 0xBFC0B5B0u; /* jal link before delay slot */ - psx_delay_BFC0B5A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B5AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5ACu); -#endif - if (psx_delay_BFC0B5A8) { - psx_delay_BFC0B5A8 = 0; - cpu->gpr[31] = 0xBFC0B5B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA30u); - cpu->pc = 0xBFC0DA30u; return; - } -label_BFC0B5B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B5B0: 04410002 bgez $v0, 0xBFC0B5BC */ - uint32_t psx_brA_BFC0B5B0 = cpu->gpr[2]; - psx_taken_BFC0B5B0 = ((int32_t)psx_brA_BFC0B5B0 >= 0); - psx_delay_BFC0B5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0B5B4: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5B4u); -#endif - if (psx_delay_BFC0B5B0) { - psx_delay_BFC0B5B0 = 0; - if (psx_taken_BFC0B5B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5BCu); - goto label_BFC0B5BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5B8u); - } -label_BFC0B5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B5B8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5B8u); -#endif -label_BFC0B5BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0B5BC: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B5C0: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B5C4: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0B5C8: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5CCu); -#endif - /* 0xBFC0B5CC: 8DEF9F20 lw $t7, -24800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B5CCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F20u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0B5D0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B5D4: 11E00004 beq $t7, $zero, 0xBFC0B5E8 */ - uint32_t psx_brA_BFC0B5D4 = cpu->gpr[15]; uint32_t psx_brB_BFC0B5D4 = cpu->gpr[0]; - psx_taken_BFC0B5D4 = (psx_brA_BFC0B5D4 == psx_brB_BFC0B5D4); - psx_delay_BFC0B5D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5D8u); -#endif - /* 0xBFC0B5D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B5D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5D8u); -#endif - if (psx_delay_BFC0B5D4) { - psx_delay_BFC0B5D4 = 0; - if (psx_taken_BFC0B5D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5E8u); - goto label_BFC0B5E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5DCu); - } -label_BFC0B5DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B5DC: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B5E4u; /* jal link before delay slot */ - psx_delay_BFC0B5DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B5E0: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5E0u); -#endif - if (psx_delay_BFC0B5DC) { - psx_delay_BFC0B5DC = 0; - cpu->gpr[31] = 0xBFC0B5E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B5E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5E4u); -#endif - /* 0xBFC0B5E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B5E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5E4u); -#endif -label_BFC0B5E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B5E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B5EC: 03E00008 jr $ra */ - psx_delay_BFC0B5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B5F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5F0u); -#endif - if (psx_delay_BFC0B5EC) { - psx_delay_BFC0B5EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B5F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B5F4u); - int psx_delay_BFC0B5FC = 0; - int psx_delay_BFC0B604 = 0; - int psx_taken_BFC0B604 = 0; - int psx_delay_BFC0B628 = 0; - int psx_taken_BFC0B628 = 0; - int psx_delay_BFC0B630 = 0; - int psx_delay_BFC0B640 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B604u: goto label_BFC0B604; - case 0xBFC0B60Cu: goto label_BFC0B60C; - case 0xBFC0B610u: goto label_BFC0B610; - case 0xBFC0B630u: goto label_BFC0B630; - case 0xBFC0B638u: goto label_BFC0B638; - case 0xBFC0B63Cu: goto label_BFC0B63C; - default: break; - } - } -label_BFC0B5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B5F4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B5F8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B5F8u); return; } g_debug_last_store_pc = 0xBFC0B5F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B5FC: 0FF0368C jal 0xBFC0DA30 */ - cpu->gpr[31] = 0xBFC0B604u; /* jal link before delay slot */ - psx_delay_BFC0B5FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B600: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B600u); -#endif - if (psx_delay_BFC0B5FC) { - psx_delay_BFC0B5FC = 0; - cpu->gpr[31] = 0xBFC0B604u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA30u); - cpu->pc = 0xBFC0DA30u; return; - } -label_BFC0B604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B604: 04410002 bgez $v0, 0xBFC0B610 */ - uint32_t psx_brA_BFC0B604 = cpu->gpr[2]; - psx_taken_BFC0B604 = ((int32_t)psx_brA_BFC0B604 >= 0); - psx_delay_BFC0B604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0B608: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B608u); -#endif - if (psx_delay_BFC0B604) { - psx_delay_BFC0B604 = 0; - if (psx_taken_BFC0B604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B610u); - goto label_BFC0B610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B60Cu); - } -label_BFC0B60C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B60Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B60C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B60Cu); -#endif -label_BFC0B610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0B610: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B614: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B618: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0B61C: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B620u); -#endif - /* 0xBFC0B620: 8DEF9F20 lw $t7, -24800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B620u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F20u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0B624: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B628: 11E00004 beq $t7, $zero, 0xBFC0B63C */ - uint32_t psx_brA_BFC0B628 = cpu->gpr[15]; uint32_t psx_brB_BFC0B628 = cpu->gpr[0]; - psx_taken_BFC0B628 = (psx_brA_BFC0B628 == psx_brB_BFC0B628); - psx_delay_BFC0B628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B62Cu); -#endif - /* 0xBFC0B62C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B62Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B62Cu); -#endif - if (psx_delay_BFC0B628) { - psx_delay_BFC0B628 = 0; - if (psx_taken_BFC0B628) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B63Cu); - goto label_BFC0B63C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B630u); - } -label_BFC0B630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B630: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B638u; /* jal link before delay slot */ - psx_delay_BFC0B630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B634: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B634u); -#endif - if (psx_delay_BFC0B630) { - psx_delay_BFC0B630 = 0; - cpu->gpr[31] = 0xBFC0B638u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B638u); -#endif - /* 0xBFC0B638: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B638u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B638u); -#endif -label_BFC0B63C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B63Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B63C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0B640: 03E00008 jr $ra */ - psx_delay_BFC0B640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B644: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B644u); -#endif - if (psx_delay_BFC0B640) { - psx_delay_BFC0B640 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0B648(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0B648u); - int psx_delay_BFC0B650 = 0; - int psx_delay_BFC0B664 = 0; - int psx_taken_BFC0B664 = 0; - int psx_delay_BFC0B684 = 0; - int psx_taken_BFC0B684 = 0; - int psx_delay_BFC0B698 = 0; - int psx_taken_BFC0B698 = 0; - int psx_delay_BFC0B6B4 = 0; - int psx_delay_BFC0B6D8 = 0; - int psx_taken_BFC0B6D8 = 0; - int psx_delay_BFC0B6E4 = 0; - int psx_delay_BFC0B704 = 0; - int psx_delay_BFC0B70C = 0; - int psx_taken_BFC0B70C = 0; - int psx_delay_BFC0B780 = 0; - int psx_delay_BFC0B794 = 0; - int psx_delay_BFC0B7A4 = 0; - int psx_taken_BFC0B7A4 = 0; - int psx_delay_BFC0B7B8 = 0; - int psx_delay_BFC0B7C4 = 0; - int psx_taken_BFC0B7C4 = 0; - int psx_delay_BFC0B7E0 = 0; - int psx_delay_BFC0B7EC = 0; - int psx_taken_BFC0B7EC = 0; - int psx_delay_BFC0B810 = 0; - int psx_taken_BFC0B810 = 0; - int psx_delay_BFC0B820 = 0; - int psx_delay_BFC0B82C = 0; - int psx_taken_BFC0B82C = 0; - int psx_delay_BFC0B844 = 0; - int psx_delay_BFC0B85C = 0; - int psx_taken_BFC0B85C = 0; - int psx_delay_BFC0B8D0 = 0; - int psx_delay_BFC0B8E4 = 0; - int psx_delay_BFC0B8F4 = 0; - int psx_taken_BFC0B8F4 = 0; - int psx_delay_BFC0B918 = 0; - int psx_delay_BFC0B924 = 0; - int psx_taken_BFC0B924 = 0; - int psx_delay_BFC0B940 = 0; - int psx_delay_BFC0B94C = 0; - int psx_taken_BFC0B94C = 0; - int psx_delay_BFC0B9C8 = 0; - int psx_delay_BFC0B9D8 = 0; - int psx_delay_BFC0B9E4 = 0; - int psx_delay_BFC0B9FC = 0; - int psx_delay_BFC0BA08 = 0; - int psx_taken_BFC0BA08 = 0; - int psx_delay_BFC0BA24 = 0; - int psx_delay_BFC0BA30 = 0; - int psx_taken_BFC0BA30 = 0; - int psx_delay_BFC0BA3C = 0; - int psx_taken_BFC0BA3C = 0; - int psx_delay_BFC0BA64 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0B658u: goto label_BFC0B658; - case 0xBFC0B66Cu: goto label_BFC0B66C; - case 0xBFC0B670u: goto label_BFC0B670; - case 0xBFC0B68Cu: goto label_BFC0B68C; - case 0xBFC0B6A0u: goto label_BFC0B6A0; - case 0xBFC0B6BCu: goto label_BFC0B6BC; - case 0xBFC0B6E0u: goto label_BFC0B6E0; - case 0xBFC0B6ECu: goto label_BFC0B6EC; - case 0xBFC0B70Cu: goto label_BFC0B70C; - case 0xBFC0B714u: goto label_BFC0B714; - case 0xBFC0B788u: goto label_BFC0B788; - case 0xBFC0B79Cu: goto label_BFC0B79C; - case 0xBFC0B7ACu: goto label_BFC0B7AC; - case 0xBFC0B7B0u: goto label_BFC0B7B0; - case 0xBFC0B7C0u: goto label_BFC0B7C0; - case 0xBFC0B7CCu: goto label_BFC0B7CC; - case 0xBFC0B7E8u: goto label_BFC0B7E8; - case 0xBFC0B7F4u: goto label_BFC0B7F4; - case 0xBFC0B818u: goto label_BFC0B818; - case 0xBFC0B828u: goto label_BFC0B828; - case 0xBFC0B834u: goto label_BFC0B834; - case 0xBFC0B84Cu: goto label_BFC0B84C; - case 0xBFC0B850u: goto label_BFC0B850; - case 0xBFC0B864u: goto label_BFC0B864; - case 0xBFC0B8D8u: goto label_BFC0B8D8; - case 0xBFC0B8ECu: goto label_BFC0B8EC; - case 0xBFC0B8FCu: goto label_BFC0B8FC; - case 0xBFC0B900u: goto label_BFC0B900; - case 0xBFC0B920u: goto label_BFC0B920; - case 0xBFC0B92Cu: goto label_BFC0B92C; - case 0xBFC0B948u: goto label_BFC0B948; - case 0xBFC0B954u: goto label_BFC0B954; - case 0xBFC0B9D0u: goto label_BFC0B9D0; - case 0xBFC0B9E0u: goto label_BFC0B9E0; - case 0xBFC0B9ECu: goto label_BFC0B9EC; - case 0xBFC0BA04u: goto label_BFC0BA04; - case 0xBFC0BA10u: goto label_BFC0BA10; - case 0xBFC0BA2Cu: goto label_BFC0BA2C; - case 0xBFC0BA38u: goto label_BFC0BA38; - case 0xBFC0BA44u: goto label_BFC0BA44; - case 0xBFC0BA6Cu: goto label_BFC0BA6C; - default: break; - } - } -label_BFC0B648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0B648: 27BDFF58 addiu $sp, $sp, -168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-168)); - PGXP_ALU(0x27BDFF58u, cpu->gpr[29], _pgx1, 0xFFFFFF58u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0B64C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B64Cu); return; } g_debug_last_store_pc = 0xBFC0B64Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B650: 0FF0368C jal 0xBFC0DA30 */ - cpu->gpr[31] = 0xBFC0B658u; /* jal link before delay slot */ - psx_delay_BFC0B650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0B654: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B654u); return; } g_debug_last_store_pc = 0xBFC0B654u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B654u); -#endif - if (psx_delay_BFC0B650) { - psx_delay_BFC0B650 = 0; - cpu->gpr[31] = 0xBFC0B658u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA30u); - cpu->pc = 0xBFC0DA30u; return; - } -label_BFC0B658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC0B658: 3C07A001 lui $a3, 0xA001 */ - cpu->gpr[7] = 0xA0010000u; - PGXP_ALU(0x3C07A001u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC0B65C: 24E79F20 addiu $a3, $a3, -24800 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-24800)); - PGXP_ALU(0x24E79F20u, cpu->gpr[7], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0B660: AFA200A4 sw $v0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B660u); return; } g_debug_last_store_pc = 0xBFC0B660u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0B664: 04410002 bgez $v0, 0xBFC0B670 */ - uint32_t psx_brA_BFC0B664 = cpu->gpr[2]; - psx_taken_BFC0B664 = ((int32_t)psx_brA_BFC0B664 >= 0); - psx_delay_BFC0B664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0B668: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B668u); -#endif - if (psx_delay_BFC0B664) { - psx_delay_BFC0B664 = 0; - if (psx_taken_BFC0B664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B670u); - goto label_BFC0B670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B66Cu); - } -label_BFC0B66C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B66Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B66C: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B66Cu); -#endif -label_BFC0B670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC0B670: 00013103 sra $a2, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00013103u, cpu->gpr[6], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC0B674: 00067080 sll $t6, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40A0u); -#endif - /* 0xBFC0B678: 00EE2821 addu $a1, $a3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[14]; - PGXP_ALU(0x00EE2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B67Cu); -#endif - /* 0xBFC0B67C: 8CA40000 lw $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B67Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20u); } - PGXP_LOAD(0x8CA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0B684: 10800256 beq $a0, $zero, 0xBFC0BFE0 */ - uint32_t psx_brA_BFC0B684 = cpu->gpr[4]; uint32_t psx_brB_BFC0B684 = cpu->gpr[0]; - psx_taken_BFC0B684 = (psx_brA_BFC0B684 == psx_brB_BFC0B684); - psx_delay_BFC0B684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC0B688: 00C08821 addu $s1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B688u); -#endif - if (psx_delay_BFC0B684) { - psx_delay_BFC0B684 = 0; - if (psx_taken_BFC0B684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - cpu->pc = 0xBFC0BFE0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B68Cu); - } -label_BFC0B68C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B68Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0B68C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0B690: 246FFFFF addiu $t7, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x246FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0B694: 2DE10008 sltiu $at, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x00000008u ? 1 : 0); - PGXP_ALU(0x2DE10008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B698: 10200247 beq $at, $zero, 0xBFC0BFB8 */ - uint32_t psx_brA_BFC0B698 = cpu->gpr[1]; uint32_t psx_brB_BFC0B698 = cpu->gpr[0]; - psx_taken_BFC0B698 = (psx_brA_BFC0B698 == psx_brB_BFC0B698); - psx_delay_BFC0B698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B69C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B69Cu); -#endif - if (psx_delay_BFC0B698) { - psx_delay_BFC0B698 = 0; - if (psx_taken_BFC0B698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFB8u); - cpu->pc = 0xBFC0BFB8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B6A0u); - } -label_BFC0B6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B6A0: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B6A4: 3C01BFC1 lui $at, 0xBFC1 */ - cpu->gpr[1] = 0xBFC10000u; - PGXP_ALU(0x3C01BFC1u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0B6A8: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6ACu); -#endif - /* 0xBFC0B6AC: 8C2FDC90 lw $t7, -9072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -9072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-9072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B6ACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x2u); } - PGXP_LOAD(0x8C2FDC90u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B6B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0B6B4: 01E00008 jr $t7 */ - psx_delay_BFC0B6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B6B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6B8u); -#endif - if (psx_delay_BFC0B6B4) { - psx_delay_BFC0B6B4 = 0; - /* jump table at 0xBFC0DC90, 8 entries */ - switch (cpu->gpr[15]) { - case 0xBFC0B6BCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B6BCu); - goto label_BFC0B6BC; - case 0xBFC0B7F4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7F4u); - goto label_BFC0B7F4; - case 0xBFC0B954u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B954u); - goto label_BFC0B954; - case 0xBFC0BA38u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA38u); - goto label_BFC0BA38; - case 0xBFC0BA44u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA44u); - goto label_BFC0BA44; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[15]); - cpu->pc = cpu->gpr[15]; return; - } - } -label_BFC0B6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0B6BC: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0B6C0: 27399F58 addiu $t9, $t9, -24744 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-24744)); - PGXP_ALU(0x27399F58u, cpu->gpr[25], _pgx1, 0xFFFF9F58u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC0B6C4: 0006C080 sll $t8, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 2u; - PGXP_ALU(0x0006C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC0B6C8: 03191021 addu $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03191021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6CCu); -#endif - /* 0xBFC0B6CC: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B6CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B6D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0B6D4: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B6D8: 1460000E bne $v1, $zero, 0xBFC0B714 */ - uint32_t psx_brA_BFC0B6D8 = cpu->gpr[3]; uint32_t psx_brB_BFC0B6D8 = cpu->gpr[0]; - psx_taken_BFC0B6D8 = (psx_brA_BFC0B6D8 != psx_brB_BFC0B6D8); - psx_delay_BFC0B6D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0B6DC: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B6DCu); return; } g_debug_last_store_pc = 0xBFC0B6DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6DCu); -#endif - if (psx_delay_BFC0B6D8) { - psx_delay_BFC0B6D8 = 0; - if (psx_taken_BFC0B6D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B714u); - goto label_BFC0B714; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B6E0u); - } -label_BFC0B6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B6E0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B6E4: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B6ECu; /* jal link before delay slot */ - psx_delay_BFC0B6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B6E8: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6E8u); -#endif - if (psx_delay_BFC0B6E4) { - psx_delay_BFC0B6E4 = 0; - cpu->gpr[31] = 0xBFC0B6ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0B6EC: 00115080 sll $t2, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0B6F0: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0B6F4: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6F8u); -#endif - /* 0xBFC0B6F8: 8D6B9F70 lw $t3, -24720($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B6F8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F70u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B6FC: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B700u); -#endif - /* 0xBFC0B700: 8D640028 lw $a0, 40($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B700u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800u); } - PGXP_LOAD(0x8D640028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B704: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0B70Cu; /* jal link before delay slot */ - psx_delay_BFC0B704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B708: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B708u); -#endif - if (psx_delay_BFC0B704) { - psx_delay_BFC0B704 = 0; - cpu->gpr[31] = 0xBFC0B70Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0B70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B70C: 10000235 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0B70C = cpu->gpr[0]; uint32_t psx_brB_BFC0B70C = cpu->gpr[0]; - psx_taken_BFC0B70C = (psx_brA_BFC0B70C == psx_brB_BFC0B70C); - psx_delay_BFC0B70C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B710u); -#endif - /* 0xBFC0B710: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B710u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B710u); -#endif - if (psx_delay_BFC0B70C) { - psx_delay_BFC0B70C = 0; - if (psx_taken_BFC0B70C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - cpu->pc = 0xBFC0BFE4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B714u); - } -label_BFC0B714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0B714: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0B718: 25AD9F78 addiu $t5, $t5, -24712 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-24712)); - PGXP_ALU(0x25AD9F78u, cpu->gpr[13], _pgx1, 0xFFFF9F78u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC0B71C: 00116080 sll $t4, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0B720: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B720u); return; } g_debug_last_store_pc = 0xBFC0B720u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3080u); -#endif - /* 0xBFC0B724: 018D3821 addu $a3, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[7] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0B728: 3C19A001 lui $t9, 0xA001 */ - cpu->gpr[25] = 0xA0010000u; - PGXP_ALU(0x3C19A001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B72Cu); -#endif - /* 0xBFC0B72C: 8CEE0000 lw $t6, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B72Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x8CEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0B730: 27399F70 addiu $t9, $t9, -24720 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-24720)); - PGXP_ALU(0x27399F70u, cpu->gpr[25], _pgx1, 0xFFFF9F70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0B734: 0011C080 sll $t8, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC0B738: 03198021 addu $s0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03198021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B73Cu); -#endif - /* 0xBFC0B73C: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B73Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0B740: 25CF0080 addiu $t7, $t6, 128 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (128)); - PGXP_ALU(0x25CF0080u, cpu->gpr[15], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC0B744: ACEF0000 sw $t7, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B744u); return; } g_debug_last_store_pc = 0xBFC0B744u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B748u); -#endif - /* 0xBFC0B748: 8C6A0010 lw $t2, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B748u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0B74C: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0B750: 25AD9F50 addiu $t5, $t5, -24752 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-24752)); - PGXP_ALU(0x25AD9F50u, cpu->gpr[13], _pgx1, 0xFFFF9F50u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC0B754: 00116080 sll $t4, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0B758: 254B0080 addiu $t3, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (128)); - PGXP_ALU(0x254B0080u, cpu->gpr[11], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC0B75C: 018D1021 addu $v0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC0B760: AC6B0010 sw $t3, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B760u); return; } g_debug_last_store_pc = 0xBFC0B760u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B764u); -#endif - /* 0xBFC0B764: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B764u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B768u); -#endif - /* 0xBFC0B768: 8E180000 lw $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B768u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x8E180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0B76C: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0B770: AC4F0000 sw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B770u); return; } g_debug_last_store_pc = 0xBFC0B770u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B774u); -#endif - /* 0xBFC0B774: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B774u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B778u); -#endif - /* 0xBFC0B778: 8F050024 lw $a1, 36($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B778u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x1000000u); } - PGXP_LOAD(0x8F050024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0B77C: AFA70048 sw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B77Cu); return; } g_debug_last_store_pc = 0xBFC0B77Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B780: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC0B788u; /* jal link before delay slot */ - psx_delay_BFC0B780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B784: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B784u); -#endif - if (psx_delay_BFC0B780) { - psx_delay_BFC0B780 = 0; - cpu->gpr[31] = 0xBFC0B788u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC0B788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B788u); -#endif - /* 0xBFC0B788: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B788u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0B78C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B790: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B794: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC0B79Cu; /* jal link before delay slot */ - psx_delay_BFC0B794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0B798: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B798u); -#endif - if (psx_delay_BFC0B794) { - psx_delay_BFC0B794 = 0; - cpu->gpr[31] = 0xBFC0B79Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC0B79C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B79Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B79C: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7A0u); -#endif - /* 0xBFC0B7A0: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7A0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0B7A4: 14430002 bne $v0, $v1, 0xBFC0B7B0 */ - uint32_t psx_brA_BFC0B7A4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B7A4 = cpu->gpr[3]; - psx_taken_BFC0B7A4 = (psx_brA_BFC0B7A4 != psx_brB_BFC0B7A4); - psx_delay_BFC0B7A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0B7A8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7A8u); -#endif - if (psx_delay_BFC0B7A4) { - psx_delay_BFC0B7A4 = 0; - if (psx_taken_BFC0B7A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7B0u); - goto label_BFC0B7B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7ACu); - } -label_BFC0B7AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0B7AC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7ACu); -#endif -label_BFC0B7B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7B0u); -#endif - /* 0xBFC0B7B0: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7B0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7B4u); -#endif - /* 0xBFC0B7B4: 8CE60000 lw $a2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7B4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x80u); } - PGXP_LOAD(0x8CE60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B7B8: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0B7C0u; /* jal link before delay slot */ - psx_delay_BFC0B7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B7BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7BCu); -#endif - if (psx_delay_BFC0B7B8) { - psx_delay_BFC0B7B8 = 0; - cpu->gpr[31] = 0xBFC0B7C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0B7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B7C0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0B7C4: 10410008 beq $v0, $at, 0xBFC0B7E8 */ - uint32_t psx_brA_BFC0B7C4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B7C4 = cpu->gpr[1]; - psx_taken_BFC0B7C4 = (psx_brA_BFC0B7C4 == psx_brB_BFC0B7C4); - psx_delay_BFC0B7C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B7C8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7C8u); -#endif - if (psx_delay_BFC0B7C4) { - psx_delay_BFC0B7C4 = 0; - if (psx_taken_BFC0B7C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7E8u); - goto label_BFC0B7E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7CCu); - } -label_BFC0B7CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B7CC: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7CCu); return; } g_debug_last_store_pc = 0xBFC0B7CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B7D0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0B7D4: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0B7D8: AC39B9D4 sw $t9, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7D8u); return; } g_debug_last_store_pc = 0xBFC0B7D8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39B9D4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B7DC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B7E0: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B7E8u; /* jal link before delay slot */ - psx_delay_BFC0B7E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B7E4: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7E4u); -#endif - if (psx_delay_BFC0B7E0) { - psx_delay_BFC0B7E0 = 0; - cpu->gpr[31] = 0xBFC0B7E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B7E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7E8u); -#endif - /* 0xBFC0B7E8: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B7EC: 100001FD beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0B7EC = cpu->gpr[0]; uint32_t psx_brB_BFC0B7EC = cpu->gpr[0]; - psx_taken_BFC0B7EC = (psx_brA_BFC0B7EC == psx_brB_BFC0B7EC); - psx_delay_BFC0B7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7F0u); -#endif - /* 0xBFC0B7F0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B7F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7F0u); -#endif - if (psx_delay_BFC0B7EC) { - psx_delay_BFC0B7EC = 0; - if (psx_taken_BFC0B7EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - cpu->pc = 0xBFC0BFE4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7F4u); - } -label_BFC0B7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0B7F4: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0B7F8: 256B9F58 addiu $t3, $t3, -24744 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-24744)); - PGXP_ALU(0x256B9F58u, cpu->gpr[11], _pgx1, 0xFFFF9F58u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC0B7FC: 00065080 sll $t2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00065080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC0B800: 014B1021 addu $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B804u); -#endif - /* 0xBFC0B804: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B804u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0B80C: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B810: 14600014 bne $v1, $zero, 0xBFC0B864 */ - uint32_t psx_brA_BFC0B810 = cpu->gpr[3]; uint32_t psx_brB_BFC0B810 = cpu->gpr[0]; - psx_taken_BFC0B810 = (psx_brA_BFC0B810 != psx_brB_BFC0B810); - psx_delay_BFC0B810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0B814: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B814u); return; } g_debug_last_store_pc = 0xBFC0B814u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B814u); -#endif - if (psx_delay_BFC0B810) { - psx_delay_BFC0B810 = 0; - if (psx_taken_BFC0B810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B864u); - goto label_BFC0B864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B818u); - } -label_BFC0B818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B818: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B81Cu); -#endif - /* 0xBFC0B81C: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B81Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B820: 0FF03037 jal 0xBFC0C0DC */ - cpu->gpr[31] = 0xBFC0B828u; /* jal link before delay slot */ - psx_delay_BFC0B820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B824: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B824u); return; } g_debug_last_store_pc = 0xBFC0B824u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B824u); -#endif - if (psx_delay_BFC0B820) { - psx_delay_BFC0B820 = 0; - cpu->gpr[31] = 0xBFC0B828u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0DCu); - cpu->pc = 0xBFC0C0DCu; return; - } -label_BFC0B828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B828: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0B82C: 10410008 beq $v0, $at, 0xBFC0B850 */ - uint32_t psx_brA_BFC0B82C = cpu->gpr[2]; uint32_t psx_brB_BFC0B82C = cpu->gpr[1]; - psx_taken_BFC0B82C = (psx_brA_BFC0B82C == psx_brB_BFC0B82C); - psx_delay_BFC0B82C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0B830: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B830u); -#endif - if (psx_delay_BFC0B82C) { - psx_delay_BFC0B82C = 0; - if (psx_taken_BFC0B82C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B850u); - goto label_BFC0B850; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B834u); - } -label_BFC0B834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0B834: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B838: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC0B83C: AC2CB9D4 sw $t4, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B83Cu); return; } g_debug_last_store_pc = 0xBFC0B83Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CB9D4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B840: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B844: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B84Cu; /* jal link before delay slot */ - psx_delay_BFC0B844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B848: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B848u); -#endif - if (psx_delay_BFC0B844) { - psx_delay_BFC0B844 = 0; - cpu->gpr[31] = 0xBFC0B84Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0B84C: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B84Cu); -#endif -label_BFC0B850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B850: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0B854: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0B858: 240D0007 addiu $t5, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x240D0007u, cpu->gpr[13], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B85C: 100001E0 beq $zero, $zero, 0xBFC0BFE0 */ - uint32_t psx_brA_BFC0B85C = cpu->gpr[0]; uint32_t psx_brB_BFC0B85C = cpu->gpr[0]; - psx_taken_BFC0B85C = (psx_brA_BFC0B85C == psx_brB_BFC0B85C); - psx_delay_BFC0B85C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0B860: AC2D9F20 sw $t5, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B860u); return; } g_debug_last_store_pc = 0xBFC0B860u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9F20u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B860u); -#endif - if (psx_delay_BFC0B85C) { - psx_delay_BFC0B85C = 0; - if (psx_taken_BFC0B85C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - cpu->pc = 0xBFC0BFE0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B864u); - } -label_BFC0B864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0B864: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0B868: 27189F78 addiu $t8, $t8, -24712 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24712)); - PGXP_ALU(0x27189F78u, cpu->gpr[24], _pgx1, 0xFFFF9F78u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B86C: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0B870: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B870u); return; } g_debug_last_store_pc = 0xBFC0B870u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008080u); -#endif - /* 0xBFC0B874: 01F83821 addu $a3, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F83821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0B878: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B87Cu); -#endif - /* 0xBFC0B87C: 8CF90000 lw $t9, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B87Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x8CF90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0B880: 258C9F70 addiu $t4, $t4, -24720 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24720)); - PGXP_ALU(0x258C9F70u, cpu->gpr[12], _pgx1, 0xFFFF9F70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0B884: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC0B888: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B88Cu); -#endif - /* 0xBFC0B88C: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B88Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC0B890: 272A0080 addiu $t2, $t9, 128 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[25] + (128)); - PGXP_ALU(0x272A0080u, cpu->gpr[10], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC0B894: ACEA0000 sw $t2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B894u); return; } g_debug_last_store_pc = 0xBFC0B894u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACEA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B898u); -#endif - /* 0xBFC0B898: 8C6D0010 lw $t5, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B898u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0B89C: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0B8A0: 27189F50 addiu $t8, $t8, -24752 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24752)); - PGXP_ALU(0x27189F50u, cpu->gpr[24], _pgx1, 0xFFFF9F50u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B8A4: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0B8A8: 25AE0080 addiu $t6, $t5, 128 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (128)); - PGXP_ALU(0x25AE0080u, cpu->gpr[14], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC0B8AC: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0B8B0: AC6E0010 sw $t6, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8B0u); return; } g_debug_last_store_pc = 0xBFC0B8B0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8B4u); -#endif - /* 0xBFC0B8B4: 8C590000 lw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8B4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8B8u); -#endif - /* 0xBFC0B8B8: 8E0B0000 lw $t3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC0B8BC: 272A0001 addiu $t2, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x272A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC0B8C0: AC4A0000 sw $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8C0u); return; } g_debug_last_store_pc = 0xBFC0B8C0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8C4u); -#endif - /* 0xBFC0B8C4: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8C4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8C8u); -#endif - /* 0xBFC0B8C8: 8D650024 lw $a1, 36($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8C8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x800u); } - PGXP_LOAD(0x8D650024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0B8CC: AFA70048 sw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8CCu); return; } g_debug_last_store_pc = 0xBFC0B8CCu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B8D0: 0FF028F5 jal 0xBFC0A3D4 */ - cpu->gpr[31] = 0xBFC0B8D8u; /* jal link before delay slot */ - psx_delay_BFC0B8D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B8D4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8D4u); -#endif - if (psx_delay_BFC0B8D0) { - psx_delay_BFC0B8D0 = 0; - cpu->gpr[31] = 0xBFC0B8D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0A3D4u); - cpu->pc = 0xBFC0A3D4u; return; - } -label_BFC0B8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8D8u); -#endif - /* 0xBFC0B8D8: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8D8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0B8DC: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B8E0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B8E4: 0FF02550 jal 0xBFC09540 */ - cpu->gpr[31] = 0xBFC0B8ECu; /* jal link before delay slot */ - psx_delay_BFC0B8E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0B8E8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8E8u); -#endif - if (psx_delay_BFC0B8E4) { - psx_delay_BFC0B8E4 = 0; - cpu->gpr[31] = 0xBFC0B8ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09540u); - cpu->pc = 0xBFC09540u; return; - } -label_BFC0B8EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B8ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0B8EC: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8F0u); -#endif - /* 0xBFC0B8F0: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B8F0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0B8F4: 14430002 bne $v0, $v1, 0xBFC0B900 */ - uint32_t psx_brA_BFC0B8F4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B8F4 = cpu->gpr[3]; - psx_taken_BFC0B8F4 = (psx_brA_BFC0B8F4 != psx_brB_BFC0B8F4); - psx_delay_BFC0B8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0B8F8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8F8u); -#endif - if (psx_delay_BFC0B8F4) { - psx_delay_BFC0B8F4 = 0; - if (psx_taken_BFC0B8F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B900u); - goto label_BFC0B900; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B8FCu); - } -label_BFC0B8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0B8FC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B8FCu); -#endif -label_BFC0B900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC0B900: 00116040 sll $t4, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 1u; - PGXP_ALU(0x00116040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B904: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC0B908: 002C0821 addu $at, $at, $t4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[12]; - PGXP_ALU(0x002C0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0B90C: A4259F88 sh $a1, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B90Cu); return; } g_debug_last_store_pc = 0xBFC0B90Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4259F88u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B910u); -#endif - /* 0xBFC0B910: 8CE60000 lw $a2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B910u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x80u); } - PGXP_LOAD(0x8CE60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B914u); -#endif - /* 0xBFC0B914: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B914u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B918: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0B920u; /* jal link before delay slot */ - psx_delay_BFC0B918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B91C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B91Cu); -#endif - if (psx_delay_BFC0B918) { - psx_delay_BFC0B918 = 0; - cpu->gpr[31] = 0xBFC0B920u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0B920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B920: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0B924: 10410008 beq $v0, $at, 0xBFC0B948 */ - uint32_t psx_brA_BFC0B924 = cpu->gpr[2]; uint32_t psx_brB_BFC0B924 = cpu->gpr[1]; - psx_taken_BFC0B924 = (psx_brA_BFC0B924 == psx_brB_BFC0B924); - psx_delay_BFC0B924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B928: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B928u); -#endif - if (psx_delay_BFC0B924) { - psx_delay_BFC0B924 = 0; - if (psx_taken_BFC0B924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B948u); - goto label_BFC0B948; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B92Cu); - } -label_BFC0B92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0B92C: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B92Cu); return; } g_debug_last_store_pc = 0xBFC0B92Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B930: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0B934: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0B938: AC2DB9D4 sw $t5, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B938u); return; } g_debug_last_store_pc = 0xBFC0B938u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DB9D4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0B93C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B940: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0B948u; /* jal link before delay slot */ - psx_delay_BFC0B940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B944: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B944u); -#endif - if (psx_delay_BFC0B940) { - psx_delay_BFC0B940 = 0; - cpu->gpr[31] = 0xBFC0B948u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0B948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B948u); -#endif - /* 0xBFC0B948: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B948u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B94C: 100001A5 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0B94C = cpu->gpr[0]; uint32_t psx_brB_BFC0B94C = cpu->gpr[0]; - psx_taken_BFC0B94C = (psx_brA_BFC0B94C == psx_brB_BFC0B94C); - psx_delay_BFC0B94C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B950u); -#endif - /* 0xBFC0B950: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B950u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B950u); -#endif - if (psx_delay_BFC0B94C) { - psx_delay_BFC0B94C = 0; - if (psx_taken_BFC0B94C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - cpu->pc = 0xBFC0BFE4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B954u); - } -label_BFC0B954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0B954: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B954u); return; } g_debug_last_store_pc = 0xBFC0B954u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B958: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0B95C: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008080u); -#endif - /* 0xBFC0B960: 00EFC021 addu $t8, $a3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[7] + cpu->gpr[15]; - PGXP_ALU(0x00EFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0B964: 240E0006 addiu $t6, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x240E0006u, cpu->gpr[14], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0B968: 254A9F60 addiu $t2, $t2, -24736 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-24736)); - PGXP_ALU(0x254A9F60u, cpu->gpr[10], _pgx1, 0xFFFF9F60u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC0B96C: 0011C880 sll $t9, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0B970: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC0B974: AF0E0000 sw $t6, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B974u); return; } g_debug_last_store_pc = 0xBFC0B974u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF0E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0B978: 258C9F68 addiu $t4, $t4, -24728 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24728)); - PGXP_ALU(0x258C9F68u, cpu->gpr[12], _pgx1, 0xFFFF9F68u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000404u); -#endif - /* 0xBFC0B97C: 032A1021 addu $v0, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[10]; - PGXP_ALU(0x032A1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0B980: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B984u); -#endif - /* 0xBFC0B984: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B984u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC0B988: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B98C: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0B990: 01F17821 addu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[17]; - PGXP_ALU(0x01F17821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B994u); -#endif - /* 0xBFC0B994: 8E0D0000 lw $t5, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B994u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0B998: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0B99C: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC0B9A0: 000EC080 sll $t8, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000EC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC0B9A4: 01F8C821 addu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0B9A8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0B9AC: 256BBE48 addiu $t3, $t3, -16824 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-16824)); - PGXP_ALU(0x256BBE48u, cpu->gpr[11], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0B9B0: 001151C0 sll $t2, $s1, 7 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[17] << 7u; - PGXP_ALU(0x001151C0u, cpu->gpr[10], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0B9B4: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC0B9B8: 014B2021 addu $a0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0B9BC: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9BCu); return; } g_debug_last_store_pc = 0xBFC0B9BCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0B9C0: AFA20048 sw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9C0u); return; } g_debug_last_store_pc = 0xBFC0B9C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0B9C4: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B9C8: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0B9D0u; /* jal link before delay slot */ - psx_delay_BFC0B9C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0B9CC: AC2DB9E8 sw $t5, -17944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9CCu); return; } g_debug_last_store_pc = 0xBFC0B9CCu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DB9E8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9CCu); -#endif - if (psx_delay_BFC0B9C8) { - psx_delay_BFC0B9C8 = 0; - cpu->gpr[31] = 0xBFC0B9D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0B9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9D0u); -#endif - /* 0xBFC0B9D0: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0B9D4: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B9D8: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0B9E0u; /* jal link before delay slot */ - psx_delay_BFC0B9D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0B9DC: 24060004 addiu $a2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24060004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9DCu); -#endif - if (psx_delay_BFC0B9D8) { - psx_delay_BFC0B9D8 = 0; - cpu->gpr[31] = 0xBFC0B9E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0B9E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B9E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9E0u); -#endif - /* 0xBFC0B9E0: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B9E4: 0FF021F1 jal 0xBFC087C4 */ - cpu->gpr[31] = 0xBFC0B9ECu; /* jal link before delay slot */ - psx_delay_BFC0B9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0B9E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9E8u); -#endif - if (psx_delay_BFC0B9E4) { - psx_delay_BFC0B9E4 = 0; - cpu->gpr[31] = 0xBFC0B9ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC087C4u); - cpu->pc = 0xBFC087C4u; return; - } -label_BFC0B9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0B9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0B9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9ECu); -#endif - /* 0xBFC0B9EC: 8FAC0048 lw $t4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9ECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0048u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9F0u); -#endif - /* 0xBFC0B9F0: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9F0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9F4u); -#endif - /* 0xBFC0B9F4: 8D850000 lw $a1, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9F4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x1000u); } - PGXP_LOAD(0x8D850000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9F8u); -#endif - /* 0xBFC0B9F8: 8FA60040 lw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0B9F8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0B9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0B9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0B9FC: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0BA04u; /* jal link before delay slot */ - psx_delay_BFC0B9FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0BA00: 24A50010 addiu $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (16)); - PGXP_ALU(0x24A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA00u); -#endif - if (psx_delay_BFC0B9FC) { - psx_delay_BFC0B9FC = 0; - cpu->gpr[31] = 0xBFC0BA04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0BA04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BA04: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BA08: 10410008 beq $v0, $at, 0xBFC0BA2C */ - uint32_t psx_brA_BFC0BA08 = cpu->gpr[2]; uint32_t psx_brB_BFC0BA08 = cpu->gpr[1]; - psx_taken_BFC0BA08 = (psx_brA_BFC0BA08 == psx_brB_BFC0BA08); - psx_delay_BFC0BA08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BA0C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA0Cu); -#endif - if (psx_delay_BFC0BA08) { - psx_delay_BFC0BA08 = 0; - if (psx_taken_BFC0BA08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA2Cu); - goto label_BFC0BA2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA10u); - } -label_BFC0BA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BA10: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA10u); return; } g_debug_last_store_pc = 0xBFC0BA10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BA14: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0BA18: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0BA1C: AC2EB9D4 sw $t6, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA1Cu); return; } g_debug_last_store_pc = 0xBFC0BA1Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9D4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BA20: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BA24: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BA2Cu; /* jal link before delay slot */ - psx_delay_BFC0BA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BA28: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA28u); -#endif - if (psx_delay_BFC0BA24) { - psx_delay_BFC0BA24 = 0; - cpu->gpr[31] = 0xBFC0BA2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA2Cu); -#endif - /* 0xBFC0BA2C: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA2Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA30: 1000016C beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BA30 = cpu->gpr[0]; uint32_t psx_brB_BFC0BA30 = cpu->gpr[0]; - psx_taken_BFC0BA30 = (psx_brA_BFC0BA30 == psx_brB_BFC0BA30); - psx_delay_BFC0BA30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA34u); -#endif - /* 0xBFC0BA34: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA34u); -#endif - if (psx_delay_BFC0BA30) { - psx_delay_BFC0BA30 = 0; - if (psx_taken_BFC0BA30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - cpu->pc = 0xBFC0BFE4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA38u); - } -label_BFC0BA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0BA38: 240F0003 addiu $t7, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240F0003u, cpu->gpr[15], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA3C: 1000FF6D beq $zero, $zero, 0xBFC0B7F4 */ - uint32_t psx_brA_BFC0BA3C = cpu->gpr[0]; uint32_t psx_brB_BFC0BA3C = cpu->gpr[0]; - psx_taken_BFC0BA3C = (psx_brA_BFC0BA3C == psx_brB_BFC0BA3C); - psx_delay_BFC0BA3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC0BA40: ACAF0000 sw $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA40u); return; } g_debug_last_store_pc = 0xBFC0BA40u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA40u); -#endif - if (psx_delay_BFC0BA3C) { - psx_delay_BFC0BA3C = 0; - if (psx_taken_BFC0BA3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B7F4u); - goto label_BFC0B7F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA44u); - } -label_BFC0BA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0BA44: 3C0DA001 lui $t5, 0xA001 */ - cpu->gpr[13] = 0xA0010000u; - PGXP_ALU(0x3C0DA001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0BA48: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA48u); return; } g_debug_last_store_pc = 0xBFC0BA48u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0BA4C: 25AD9F70 addiu $t5, $t5, -24720 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-24720)); - PGXP_ALU(0x25AD9F70u, cpu->gpr[13], _pgx1, 0xFFFF9F70u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0BA50: 0011C080 sll $t8, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1012000u); -#endif - /* 0xBFC0BA54: 030D8021 addu $s0, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[16] = cpu->gpr[24] + cpu->gpr[13]; - PGXP_ALU(0x030D8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA58u); -#endif - /* 0xBFC0BA58: 8E190000 lw $t9, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA58u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BA5C: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA60u); -#endif - /* 0xBFC0BA60: 8F240028 lw $a0, 40($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000000u); } - PGXP_LOAD(0x8F240028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BA64: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0BA6Cu; /* jal link before delay slot */ - psx_delay_BFC0BA64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA68u); -#endif - if (psx_delay_BFC0BA64) { - psx_delay_BFC0BA64 = 0; - cpu->gpr[31] = 0xBFC0BA6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0BA6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA6Cu); -#endif - /* 0xBFC0BA6C: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA6Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA74u); -#endif - /* 0xBFC0BA74: 8C6A0010 lw $t2, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA74u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0BA7C: 254B0080 addiu $t3, $t2, 128 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (128)); - PGXP_ALU(0x254B0080u, cpu->gpr[11], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC0BA80: AC6B0010 sw $t3, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA80u); return; } g_debug_last_store_pc = 0xBFC0BA80u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA84u); -#endif - /* 0xBFC0BA84: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA84u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BA8Cu); - cpu->pc = 0xBFC0BA8Cu; return; /* fallthrough */ -} - -void SCPH1001_func_1FC0BA8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0BA8Cu); - int psx_delay_BFC0BA90 = 0; - int psx_delay_BFC0BA98 = 0; - int psx_taken_BFC0BA98 = 0; - int psx_delay_BFC0BAB4 = 0; - int psx_taken_BFC0BAB4 = 0; - int psx_delay_BFC0BABC = 0; - int psx_taken_BFC0BABC = 0; - int psx_delay_BFC0BAC4 = 0; - int psx_taken_BFC0BAC4 = 0; - int psx_delay_BFC0BACC = 0; - int psx_taken_BFC0BACC = 0; - int psx_delay_BFC0BAEC = 0; - int psx_taken_BFC0BAEC = 0; - int psx_delay_BFC0BAFC = 0; - int psx_taken_BFC0BAFC = 0; - int psx_delay_BFC0BB18 = 0; - int psx_delay_BFC0BB20 = 0; - int psx_taken_BFC0BB20 = 0; - int psx_delay_BFC0BB50 = 0; - int psx_delay_BFC0BB78 = 0; - int psx_taken_BFC0BB78 = 0; - int psx_delay_BFC0BB94 = 0; - int psx_delay_BFC0BBA0 = 0; - int psx_taken_BFC0BBA0 = 0; - int psx_delay_BFC0BBBC = 0; - int psx_delay_BFC0BBC4 = 0; - int psx_taken_BFC0BBC4 = 0; - int psx_delay_BFC0BBF4 = 0; - int psx_taken_BFC0BBF4 = 0; - int psx_delay_BFC0BC0C = 0; - int psx_delay_BFC0BC14 = 0; - int psx_taken_BFC0BC14 = 0; - int psx_delay_BFC0BC54 = 0; - int psx_delay_BFC0BC84 = 0; - int psx_taken_BFC0BC84 = 0; - int psx_delay_BFC0BC98 = 0; - int psx_delay_BFC0BCA4 = 0; - int psx_taken_BFC0BCA4 = 0; - int psx_delay_BFC0BCC0 = 0; - int psx_delay_BFC0BCC8 = 0; - int psx_taken_BFC0BCC8 = 0; - int psx_delay_BFC0BD10 = 0; - int psx_delay_BFC0BD24 = 0; - int psx_taken_BFC0BD24 = 0; - int psx_delay_BFC0BD3C = 0; - int psx_taken_BFC0BD3C = 0; - int psx_delay_BFC0BD6C = 0; - int psx_taken_BFC0BD6C = 0; - int psx_delay_BFC0BD8C = 0; - int psx_taken_BFC0BD8C = 0; - int psx_delay_BFC0BDB0 = 0; - int psx_taken_BFC0BDB0 = 0; - int psx_delay_BFC0BDC4 = 0; - int psx_taken_BFC0BDC4 = 0; - int psx_delay_BFC0BDCC = 0; - int psx_taken_BFC0BDCC = 0; - int psx_delay_BFC0BDFC = 0; - int psx_taken_BFC0BDFC = 0; - int psx_delay_BFC0BE04 = 0; - int psx_taken_BFC0BE04 = 0; - int psx_delay_BFC0BE14 = 0; - int psx_taken_BFC0BE14 = 0; - int psx_delay_BFC0BE30 = 0; - int psx_taken_BFC0BE30 = 0; - int psx_delay_BFC0BE48 = 0; - int psx_taken_BFC0BE48 = 0; - int psx_delay_BFC0BE88 = 0; - int psx_taken_BFC0BE88 = 0; - int psx_delay_BFC0BE98 = 0; - int psx_delay_BFC0BEA4 = 0; - int psx_taken_BFC0BEA4 = 0; - int psx_delay_BFC0BEB0 = 0; - int psx_delay_BFC0BED4 = 0; - int psx_taken_BFC0BED4 = 0; - int psx_delay_BFC0BEEC = 0; - int psx_delay_BFC0BEF4 = 0; - int psx_taken_BFC0BEF4 = 0; - int psx_delay_BFC0BF30 = 0; - int psx_delay_BFC0BF58 = 0; - int psx_taken_BFC0BF58 = 0; - int psx_delay_BFC0BF6C = 0; - int psx_delay_BFC0BF78 = 0; - int psx_taken_BFC0BF78 = 0; - int psx_delay_BFC0BF94 = 0; - int psx_delay_BFC0BF9C = 0; - int psx_taken_BFC0BF9C = 0; - int psx_delay_BFC0BFA8 = 0; - int psx_delay_BFC0BFB0 = 0; - int psx_taken_BFC0BFB0 = 0; - int psx_delay_BFC0BFD0 = 0; - int psx_delay_BFC0BFD8 = 0; - int psx_taken_BFC0BFD8 = 0; - int psx_delay_BFC0BFE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0BAA0u: goto label_BFC0BAA0; - case 0xBFC0BFB8u: goto label_BFC0BFB8; - case 0xBFC0BFE0u: goto label_BFC0BFE0; - case 0xBFC0BFE4u: goto label_BFC0BFE4; - case 0xBFC0BA98u: goto label_BFC0BA98; - case 0xBFC0BABCu: goto label_BFC0BABC; - case 0xBFC0BAC4u: goto label_BFC0BAC4; - case 0xBFC0BACCu: goto label_BFC0BACC; - case 0xBFC0BAD4u: goto label_BFC0BAD4; - case 0xBFC0BAF4u: goto label_BFC0BAF4; - case 0xBFC0BB00u: goto label_BFC0BB00; - case 0xBFC0BB04u: goto label_BFC0BB04; - case 0xBFC0BB20u: goto label_BFC0BB20; - case 0xBFC0BB28u: goto label_BFC0BB28; - case 0xBFC0BB48u: goto label_BFC0BB48; - case 0xBFC0BB58u: goto label_BFC0BB58; - case 0xBFC0BB80u: goto label_BFC0BB80; - case 0xBFC0BB9Cu: goto label_BFC0BB9C; - case 0xBFC0BBA8u: goto label_BFC0BBA8; - case 0xBFC0BBC4u: goto label_BFC0BBC4; - case 0xBFC0BBCCu: goto label_BFC0BBCC; - case 0xBFC0BBF4u: goto label_BFC0BBF4; - case 0xBFC0BBFCu: goto label_BFC0BBFC; - case 0xBFC0BC14u: goto label_BFC0BC14; - case 0xBFC0BC1Cu: goto label_BFC0BC1C; - case 0xBFC0BC5Cu: goto label_BFC0BC5C; - case 0xBFC0BC64u: goto label_BFC0BC64; - case 0xBFC0BC8Cu: goto label_BFC0BC8C; - case 0xBFC0BCA0u: goto label_BFC0BCA0; - case 0xBFC0BCACu: goto label_BFC0BCAC; - case 0xBFC0BCC8u: goto label_BFC0BCC8; - case 0xBFC0BCD0u: goto label_BFC0BCD0; - case 0xBFC0BCFCu: goto label_BFC0BCFC; - case 0xBFC0BD18u: goto label_BFC0BD18; - case 0xBFC0BD2Cu: goto label_BFC0BD2C; - case 0xBFC0BD38u: goto label_BFC0BD38; - case 0xBFC0BD44u: goto label_BFC0BD44; - case 0xBFC0BD5Cu: goto label_BFC0BD5C; - case 0xBFC0BD74u: goto label_BFC0BD74; - case 0xBFC0BD84u: goto label_BFC0BD84; - case 0xBFC0BD94u: goto label_BFC0BD94; - case 0xBFC0BDB8u: goto label_BFC0BDB8; - case 0xBFC0BDBCu: goto label_BFC0BDBC; - case 0xBFC0BDCCu: goto label_BFC0BDCC; - case 0xBFC0BDD4u: goto label_BFC0BDD4; - case 0xBFC0BDD8u: goto label_BFC0BDD8; - case 0xBFC0BE04u: goto label_BFC0BE04; - case 0xBFC0BE0Cu: goto label_BFC0BE0C; - case 0xBFC0BE1Cu: goto label_BFC0BE1C; - case 0xBFC0BE28u: goto label_BFC0BE28; - case 0xBFC0BE38u: goto label_BFC0BE38; - case 0xBFC0BE44u: goto label_BFC0BE44; - case 0xBFC0BE50u: goto label_BFC0BE50; - case 0xBFC0BE74u: goto label_BFC0BE74; - case 0xBFC0BE90u: goto label_BFC0BE90; - case 0xBFC0BEA0u: goto label_BFC0BEA0; - case 0xBFC0BEACu: goto label_BFC0BEAC; - case 0xBFC0BEB8u: goto label_BFC0BEB8; - case 0xBFC0BEBCu: goto label_BFC0BEBC; - case 0xBFC0BEDCu: goto label_BFC0BEDC; - case 0xBFC0BEF4u: goto label_BFC0BEF4; - case 0xBFC0BEFCu: goto label_BFC0BEFC; - case 0xBFC0BF38u: goto label_BFC0BF38; - case 0xBFC0BF60u: goto label_BFC0BF60; - case 0xBFC0BF74u: goto label_BFC0BF74; - case 0xBFC0BF80u: goto label_BFC0BF80; - case 0xBFC0BF9Cu: goto label_BFC0BF9C; - case 0xBFC0BFA4u: goto label_BFC0BFA4; - case 0xBFC0BFB0u: goto label_BFC0BFB0; - case 0xBFC0BFD8u: goto label_BFC0BFD8; - default: break; - } - } -label_BFC0BA8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BA8C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BA90: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BA98u; /* jal link before delay slot */ - psx_delay_BFC0BA90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BA94: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA94u); -#endif - if (psx_delay_BFC0BA90) { - psx_delay_BFC0BA90 = 0; - cpu->gpr[31] = 0xBFC0BA98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BA98: 10000152 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BA98 = cpu->gpr[0]; uint32_t psx_brB_BFC0BA98 = cpu->gpr[0]; - psx_taken_BFC0BA98 = (psx_brA_BFC0BA98 == psx_brB_BFC0BA98); - psx_delay_BFC0BA98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BA9Cu); -#endif - /* 0xBFC0BA9C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BA9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BA9Cu); -#endif - if (psx_delay_BFC0BA98) { - psx_delay_BFC0BA98 = 0; - if (psx_taken_BFC0BA98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BAA0u); - } -label_BFC0BAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC0BAA0: 00066080 sll $t4, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BAA4: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC0BAA8: 006C1821 addu $v1, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[12]; - PGXP_ALU(0x006C1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAACu); -#endif - /* 0xBFC0BAAC: 8C639F28 lw $v1, -24792($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BAACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639F28u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BAB0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0BAB4: 10610007 beq $v1, $at, 0xBFC0BAD4 */ - uint32_t psx_brA_BFC0BAB4 = cpu->gpr[3]; uint32_t psx_brB_BFC0BAB4 = cpu->gpr[1]; - psx_taken_BFC0BAB4 = (psx_brA_BFC0BAB4 == psx_brB_BFC0BAB4); - psx_delay_BFC0BAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BAB8: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAB8u); -#endif - if (psx_delay_BFC0BAB4) { - psx_delay_BFC0BAB4 = 0; - if (psx_taken_BFC0BAB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BAD4u); - goto label_BFC0BAD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BABCu); - } -label_BFC0BABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0BABC: 1061004F beq $v1, $at, 0xBFC0BBFC */ - uint32_t psx_brA_BFC0BABC = cpu->gpr[3]; uint32_t psx_brB_BFC0BABC = cpu->gpr[1]; - psx_taken_BFC0BABC = (psx_brA_BFC0BABC == psx_brB_BFC0BABC); - psx_delay_BFC0BABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BAC0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAC0u); -#endif - if (psx_delay_BFC0BABC) { - psx_delay_BFC0BABC = 0; - if (psx_taken_BFC0BABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBFCu); - goto label_BFC0BBFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BAC4u); - } -label_BFC0BAC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BAC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0BAC4: 10610105 beq $v1, $at, 0xBFC0BEDC */ - uint32_t psx_brA_BFC0BAC4 = cpu->gpr[3]; uint32_t psx_brB_BFC0BAC4 = cpu->gpr[1]; - psx_taken_BFC0BAC4 = (psx_brA_BFC0BAC4 == psx_brB_BFC0BAC4); - psx_delay_BFC0BAC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BAC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAC8u); -#endif - if (psx_delay_BFC0BAC4) { - psx_delay_BFC0BAC4 = 0; - if (psx_taken_BFC0BAC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BEDCu); - goto label_BFC0BEDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BACCu); - } -label_BFC0BACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BACC: 1000013A beq $zero, $zero, 0xBFC0BFB8 */ - uint32_t psx_brA_BFC0BACC = cpu->gpr[0]; uint32_t psx_brB_BFC0BACC = cpu->gpr[0]; - psx_taken_BFC0BACC = (psx_brA_BFC0BACC == psx_brB_BFC0BACC); - psx_delay_BFC0BACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BAD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAD0u); -#endif - if (psx_delay_BFC0BACC) { - psx_delay_BFC0BACC = 0; - if (psx_taken_BFC0BACC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFB8u); - goto label_BFC0BFB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BAD4u); - } -label_BFC0BAD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BAD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0BAD4: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0BAD8: 25EFBE48 addiu $t7, $t7, -16824 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16824)); - PGXP_ALU(0x25EFBE48u, cpu->gpr[15], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC0BADC: 000671C0 sll $t6, $a2, 7 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 7u; - PGXP_ALU(0x000671C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC0BAE0: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAE4u); -#endif - /* 0xBFC0BAE4: 90580000 lbu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 24, 0x4u); - PGXP_LOAD(0x90580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BAE8: 2401004D addiu $at, $zero, 77 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); - PGXP_ALU(0x2401004Du, cpu->gpr[1], _pgx1, 0x0000004Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0BAEC: 17010004 bne $t8, $at, 0xBFC0BB00 */ - uint32_t psx_brA_BFC0BAEC = cpu->gpr[24]; uint32_t psx_brB_BFC0BAEC = cpu->gpr[1]; - psx_taken_BFC0BAEC = (psx_brA_BFC0BAEC != psx_brB_BFC0BAEC); - psx_delay_BFC0BAEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BAF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAF0u); -#endif - if (psx_delay_BFC0BAEC) { - psx_delay_BFC0BAEC = 0; - if (psx_taken_BFC0BAEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB00u); - goto label_BFC0BB00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BAF4u); - } -label_BFC0BAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAF4u); -#endif - /* 0xBFC0BAF4: 904D0001 lbu $t5, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 13, 0x4u); - PGXP_LOAD(0x904D0001u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BAF8: 24010043 addiu $at, $zero, 67 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); - PGXP_ALU(0x24010043u, cpu->gpr[1], _pgx1, 0x00000043u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0BAFC: 11A1000A beq $t5, $at, 0xBFC0BB28 */ - uint32_t psx_brA_BFC0BAFC = cpu->gpr[13]; uint32_t psx_brB_BFC0BAFC = cpu->gpr[1]; - psx_taken_BFC0BAFC = (psx_brA_BFC0BAFC == psx_brB_BFC0BAFC); - psx_delay_BFC0BAFC = 1; -label_BFC0BB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BB00: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB00u); -#endif - if (psx_delay_BFC0BAFC) { - psx_delay_BFC0BAFC = 0; - if (psx_taken_BFC0BAFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB28u); - goto label_BFC0BB28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB04u); - } -label_BFC0BB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BB04: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB04u); return; } g_debug_last_store_pc = 0xBFC0BB04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BB08: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0BB0C: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0BB10: AC39B9DC sw $t9, -17956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB10u); return; } g_debug_last_store_pc = 0xBFC0BB10u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39B9DCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BB14: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BB18: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BB20u; /* jal link before delay slot */ - psx_delay_BFC0BB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BB1C: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB1Cu); -#endif - if (psx_delay_BFC0BB18) { - psx_delay_BFC0BB18 = 0; - cpu->gpr[31] = 0xBFC0BB20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BB20: 10000130 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BB20 = cpu->gpr[0]; uint32_t psx_brB_BFC0BB20 = cpu->gpr[0]; - psx_taken_BFC0BB20 = (psx_brA_BFC0BB20 == psx_brB_BFC0BB20); - psx_delay_BFC0BB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB24u); -#endif - /* 0xBFC0BB24: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB24u); -#endif - if (psx_delay_BFC0BB20) { - psx_delay_BFC0BB20 = 0; - if (psx_taken_BFC0BB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB28u); - } -label_BFC0BB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0BB28: 00115100 sll $t2, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00115100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0BB2C: 01515023 subu $t2, $t2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[17]; - PGXP_ALU(0x01515023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0BB30: 3C0BA001 lui $t3, 0xA001 */ - cpu->gpr[11] = 0xA0010000u; - PGXP_ALU(0x3C0BA001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0BB34: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB34u); return; } g_debug_last_store_pc = 0xBFC0BB34u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0BB38: 256BBA88 addiu $t3, $t3, -17784 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-17784)); - PGXP_ALU(0x256BBA88u, cpu->gpr[11], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0BB3C: 000A5140 sll $t2, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5140u, cpu->gpr[10], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC40u); -#endif - /* 0xBFC0BB40: 014B3021 addu $a2, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[6] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BB44: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB44u); -#endif -label_BFC0BB48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC0BB48: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BB4C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BB50: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0BB58u; /* jal link before delay slot */ - psx_delay_BFC0BB50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0BB54: AFA60044 sw $a2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB54u); return; } g_debug_last_store_pc = 0xBFC0BB54u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60044u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB54u); -#endif - if (psx_delay_BFC0BB50) { - psx_delay_BFC0BB50 = 0; - cpu->gpr[31] = 0xBFC0BB58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0BB58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB58u); -#endif - /* 0xBFC0BB58: 8FA60044 lw $a2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB58u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60044u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0BB5C: 340CFFFF ori $t4, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0BB60: 240E00A0 addiu $t6, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240E00A0u, cpu->gpr[14], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BB64: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BB68: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0BB6C: ACC00004 sw $zero, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB6Cu); return; } g_debug_last_store_pc = 0xBFC0BB6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC0BB70: A4CC0008 sh $t4, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB70u); return; } g_debug_last_store_pc = 0xBFC0BB70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4CC0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC0BB74: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB74u); return; } g_debug_last_store_pc = 0xBFC0BB74u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0BB78: 1601FFF3 bne $s0, $at, 0xBFC0BB48 */ - uint32_t psx_brA_BFC0BB78 = cpu->gpr[16]; uint32_t psx_brB_BFC0BB78 = cpu->gpr[1]; - psx_taken_BFC0BB78 = (psx_brA_BFC0BB78 != psx_brB_BFC0BB78); - psx_delay_BFC0BB78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0BB7C: 24C60020 addiu $a2, $a2, 32 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (32)); - PGXP_ALU(0x24C60020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB7Cu); -#endif - if (psx_delay_BFC0BB78) { - psx_delay_BFC0BB78 = 0; - if (psx_taken_BFC0BB78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB48u); - goto label_BFC0BB48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BB80u); - } -label_BFC0BB80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BB80: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BB84: 2718BE48 addiu $t8, $t8, -16824 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-16824)); - PGXP_ALU(0x2718BE48u, cpu->gpr[24], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB88u); -#endif - /* 0xBFC0BB88: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BB88u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BB8C: 001179C0 sll $t7, $s1, 7 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 7u; - PGXP_ALU(0x001179C0u, cpu->gpr[15], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008040u); -#endif - /* 0xBFC0BB90: 01F83021 addu $a2, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[6] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F83021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BB94: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0BB9Cu; /* jal link before delay slot */ - psx_delay_BFC0BB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BB98: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB98u); -#endif - if (psx_delay_BFC0BB94) { - psx_delay_BFC0BB94 = 0; - cpu->gpr[31] = 0xBFC0BB9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0BB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BB9C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BBA0: 1041000A beq $v0, $at, 0xBFC0BBCC */ - uint32_t psx_brA_BFC0BBA0 = cpu->gpr[2]; uint32_t psx_brB_BFC0BBA0 = cpu->gpr[1]; - psx_taken_BFC0BBA0 = (psx_brA_BFC0BBA0 == psx_brB_BFC0BBA0); - psx_delay_BFC0BBA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BBA4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBA4u); -#endif - if (psx_delay_BFC0BBA0) { - psx_delay_BFC0BBA0 = 0; - if (psx_taken_BFC0BBA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBCCu); - goto label_BFC0BBCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBA8u); - } -label_BFC0BBA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BBA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BBA8: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBA8u); return; } g_debug_last_store_pc = 0xBFC0BBA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BBAC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0BBB0: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0BBB4: AC2DB9D4 sw $t5, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBB4u); return; } g_debug_last_store_pc = 0xBFC0BBB4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DB9D4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BBB8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BBBC: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BBC4u; /* jal link before delay slot */ - psx_delay_BFC0BBBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BBC0: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBC0u); -#endif - if (psx_delay_BFC0BBBC) { - psx_delay_BFC0BBBC = 0; - cpu->gpr[31] = 0xBFC0BBC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BBC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BBC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BBC4: 1000000B beq $zero, $zero, 0xBFC0BBF4 */ - uint32_t psx_brA_BFC0BBC4 = cpu->gpr[0]; uint32_t psx_brB_BFC0BBC4 = cpu->gpr[0]; - psx_taken_BFC0BBC4 = (psx_brA_BFC0BBC4 == psx_brB_BFC0BBC4); - psx_delay_BFC0BBC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBC8u); -#endif - /* 0xBFC0BBC8: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBC8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBC8u); -#endif - if (psx_delay_BFC0BBC4) { - psx_delay_BFC0BBC4 = 0; - if (psx_taken_BFC0BBC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBF4u); - goto label_BFC0BBF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBCCu); - } -label_BFC0BBCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BBCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC0BBCC: 0011C880 sll $t9, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BBD0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0BBD4: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BBD8: AC209F30 sw $zero, -24784($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24784; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBD8u); return; } g_debug_last_store_pc = 0xBFC0BBD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BBDC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0BBE0: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0BBE4: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0BBE8: 240A0002 addiu $t2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240A0002u, cpu->gpr[10], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0BBEC: AC2A9F28 sw $t2, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBECu); return; } g_debug_last_store_pc = 0xBFC0BBECu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9F28u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBF0u); -#endif - /* 0xBFC0BBF0: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBF0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBF0u); -#endif -label_BFC0BBF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BBF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BBF4: 100000FB beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BBF4 = cpu->gpr[0]; uint32_t psx_brB_BFC0BBF4 = cpu->gpr[0]; - psx_taken_BFC0BBF4 = (psx_brA_BFC0BBF4 == psx_brB_BFC0BBF4); - psx_delay_BFC0BBF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBF8u); -#endif - /* 0xBFC0BBF8: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BBF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBF8u); -#endif - if (psx_delay_BFC0BBF4) { - psx_delay_BFC0BBF4 = 0; - if (psx_taken_BFC0BBF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BBFCu); - } -label_BFC0BBFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BBFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0BBFC: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0BC00: 25CEBE48 addiu $t6, $t6, -16824 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-16824)); - PGXP_ALU(0x25CEBE48u, cpu->gpr[14], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC0BC04: 001161C0 sll $t4, $s1, 7 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 7u; - PGXP_ALU(0x001161C0u, cpu->gpr[12], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5010u); -#endif - /* 0xBFC0BC08: 018E2021 addu $a0, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BC0C: 0FF021C8 jal 0xBFC08720 */ - cpu->gpr[31] = 0xBFC0BC14u; /* jal link before delay slot */ - psx_delay_BFC0BC0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0BC10: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC10u); return; } g_debug_last_store_pc = 0xBFC0BC10u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC10u); -#endif - if (psx_delay_BFC0BC0C) { - psx_delay_BFC0BC0C = 0; - cpu->gpr[31] = 0xBFC0BC14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08720u); - cpu->pc = 0xBFC08720u; return; - } -label_BFC0BC14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BC14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0BC14: 10400013 beq $v0, $zero, 0xBFC0BC64 */ - uint32_t psx_brA_BFC0BC14 = cpu->gpr[2]; uint32_t psx_brB_BFC0BC14 = cpu->gpr[0]; - psx_taken_BFC0BC14 = (psx_brA_BFC0BC14 == psx_brB_BFC0BC14); - psx_delay_BFC0BC14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BC18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC18u); -#endif - if (psx_delay_BFC0BC14) { - psx_delay_BFC0BC14 = 0; - if (psx_taken_BFC0BC14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BC64u); - goto label_BFC0BC64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BC1Cu); - } -label_BFC0BC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0BC1C: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC1Cu); return; } g_debug_last_store_pc = 0xBFC0BC1Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BC20: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BC24: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC0BC28: 020F8021 addu $s0, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[15]; - PGXP_ALU(0x020F8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC2Cu); -#endif - /* 0xBFC0BC2C: 8E109F30 lw $s0, -24784($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -24784; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-24784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC2Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E109F30u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0BC30: 0011C100 sll $t8, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 4u; - PGXP_ALU(0x0011C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0BC34: 0311C023 subu $t8, $t8, $s1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[17]; - PGXP_ALU(0x0311C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BC38: 0018C140 sll $t8, $t8, 5 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 5u; - PGXP_ALU(0x0018C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0BC3C: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC0BC40: 00106940 sll $t5, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002000u); -#endif - /* 0xBFC0BC44: 030DC821 addu $t9, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[13]; - PGXP_ALU(0x030DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0BC48: 254ABA88 addiu $t2, $t2, -17784 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-17784)); - PGXP_ALU(0x254ABA88u, cpu->gpr[10], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC4Cu); -#endif - /* 0xBFC0BC4C: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC4Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000410u); -#endif - /* 0xBFC0BC50: 032A2021 addu $a0, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[10]; - PGXP_ALU(0x032A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BC54: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0BC5Cu; /* jal link before delay slot */ - psx_delay_BFC0BC54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0BC58: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC58u); -#endif - if (psx_delay_BFC0BC54) { - psx_delay_BFC0BC54 = 0; - cpu->gpr[31] = 0xBFC0BC5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0BC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC5Cu); -#endif - /* 0xBFC0BC5C: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC5Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BC60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC60u); -#endif -label_BFC0BC64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BC64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BC64: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BC68: 258C9F30 addiu $t4, $t4, -24784 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24784)); - PGXP_ALU(0x258C9F30u, cpu->gpr[12], _pgx1, 0xFFFF9F30u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0BC6C: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC0BC70: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC74u); -#endif - /* 0xBFC0BC74: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC74u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BC78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BC7C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0BC80: 2861000F slti $at, $v1, 15 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (15) ? 1 : 0); - PGXP_ALU(0x2861000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BC84: 10200012 beq $at, $zero, 0xBFC0BCD0 */ - uint32_t psx_brA_BFC0BC84 = cpu->gpr[1]; uint32_t psx_brB_BFC0BC84 = cpu->gpr[0]; - psx_taken_BFC0BC84 = (psx_brA_BFC0BC84 == psx_brB_BFC0BC84); - psx_delay_BFC0BC84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BC88: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC88u); return; } g_debug_last_store_pc = 0xBFC0BC88u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC88u); -#endif - if (psx_delay_BFC0BC84) { - psx_delay_BFC0BC84 = 0; - if (psx_taken_BFC0BC84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BCD0u); - goto label_BFC0BCD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BC8Cu); - } -label_BFC0BC8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BC8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC8Cu); -#endif - /* 0xBFC0BC8C: 8C450000 lw $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC8Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x8C450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC90u); -#endif - /* 0xBFC0BC90: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC94u); -#endif - /* 0xBFC0BC94: 8FA60040 lw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BC94u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BC98: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0BCA0u; /* jal link before delay slot */ - psx_delay_BFC0BC98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0BC9C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BC9Cu); -#endif - if (psx_delay_BFC0BC98) { - psx_delay_BFC0BC98 = 0; - cpu->gpr[31] = 0xBFC0BCA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0BCA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BCA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BCA0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BCA4: 104100CE beq $v0, $at, 0xBFC0BFE0 */ - uint32_t psx_brA_BFC0BCA4 = cpu->gpr[2]; uint32_t psx_brB_BFC0BCA4 = cpu->gpr[1]; - psx_taken_BFC0BCA4 = (psx_brA_BFC0BCA4 == psx_brB_BFC0BCA4); - psx_delay_BFC0BCA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BCA8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCA8u); -#endif - if (psx_delay_BFC0BCA4) { - psx_delay_BFC0BCA4 = 0; - if (psx_taken_BFC0BCA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - goto label_BFC0BFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BCACu); - } -label_BFC0BCAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BCACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BCAC: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCACu); return; } g_debug_last_store_pc = 0xBFC0BCACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BCB0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0BCB4: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0BCB8: AC2EB9D4 sw $t6, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCB8u); return; } g_debug_last_store_pc = 0xBFC0BCB8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9D4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BCBC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BCC0: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BCC8u; /* jal link before delay slot */ - psx_delay_BFC0BCC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BCC4: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCC4u); -#endif - if (psx_delay_BFC0BCC0) { - psx_delay_BFC0BCC0 = 0; - cpu->gpr[31] = 0xBFC0BCC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BCC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BCC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BCC8: 100000C6 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BCC8 = cpu->gpr[0]; uint32_t psx_brB_BFC0BCC8 = cpu->gpr[0]; - psx_taken_BFC0BCC8 = (psx_brA_BFC0BCC8 == psx_brB_BFC0BCC8); - psx_delay_BFC0BCC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCCCu); -#endif - /* 0xBFC0BCCC: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCCCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCCCu); -#endif - if (psx_delay_BFC0BCC8) { - psx_delay_BFC0BCC8 = 0; - if (psx_taken_BFC0BCC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BCD0u); - } -label_BFC0BCD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BCD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BCD0: 00117900 sll $t7, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00117900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BCD4: 01F17823 subu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[17]; - PGXP_ALU(0x01F17823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BCD8: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0BCDC: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCDCu); return; } g_debug_last_store_pc = 0xBFC0BCDCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BCE0: 2718BA88 addiu $t8, $t8, -17784 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-17784)); - PGXP_ALU(0x2718BA88u, cpu->gpr[24], _pgx1, 0xFFFFBA88u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0BCE4: 000F7940 sll $t7, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000F7940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008080u); -#endif - /* 0xBFC0BCE8: 01F83821 addu $a3, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F83821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BCEC: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0BCF0: 27A300A8 addiu $v1, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27A300A8u, cpu->gpr[3], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0BCF4: AFA2003C sw $v0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCF4u); return; } g_debug_last_store_pc = 0xBFC0BCF4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2003Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0BCF8: 2409000F addiu $t1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2409000Fu, cpu->gpr[9], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCF8u); -#endif -label_BFC0BCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BCFCu); -#endif - /* 0xBFC0BCFC: 8FA2003C lw $v0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BCFCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2003Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BD00: AC60FFAC sw $zero, -84($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD00u); return; } g_debug_last_store_pc = 0xBFC0BD00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0BD04: AFA70048 sw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD04u); return; } g_debug_last_store_pc = 0xBFC0BD04u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0BD08: AFA30044 sw $v1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD08u); return; } g_debug_last_store_pc = 0xBFC0BD08u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30044u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BD0C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BD10: 0FF023FF jal 0xBFC08FFC */ - cpu->gpr[31] = 0xBFC0BD18u; /* jal link before delay slot */ - psx_delay_BFC0BD10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0BD14: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD14u); -#endif - if (psx_delay_BFC0BD10) { - psx_delay_BFC0BD10 = 0; - cpu->gpr[31] = 0xBFC0BD18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08FFCu); - cpu->pc = 0xBFC08FFCu; return; - } -label_BFC0BD18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD18u); -#endif - /* 0xBFC0BD18: 8FA30044 lw $v1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD18u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30044u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD1Cu); -#endif - /* 0xBFC0BD1C: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD1Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BD20: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BD24: 14410004 bne $v0, $at, 0xBFC0BD38 */ - uint32_t psx_brA_BFC0BD24 = cpu->gpr[2]; uint32_t psx_brB_BFC0BD24 = cpu->gpr[1]; - psx_taken_BFC0BD24 = (psx_brA_BFC0BD24 != psx_brB_BFC0BD24); - psx_delay_BFC0BD24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0BD28: 2409000F addiu $t1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2409000Fu, cpu->gpr[9], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD28u); -#endif - if (psx_delay_BFC0BD24) { - psx_delay_BFC0BD24 = 0; - if (psx_taken_BFC0BD24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD38u); - goto label_BFC0BD38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD2Cu); - } -label_BFC0BD2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0BD2C: 240D0052 addiu $t5, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x240D0052u, cpu->gpr[13], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC0BD30: AC6DFFAC sw $t5, -84($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD30u); return; } g_debug_last_store_pc = 0xBFC0BD30u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6DFFACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0BD34: 2409000F addiu $t1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2409000Fu, cpu->gpr[9], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD34u); -#endif -label_BFC0BD38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BD38: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0BD3C: 1609FFEF bne $s0, $t1, 0xBFC0BCFC */ - uint32_t psx_brA_BFC0BD3C = cpu->gpr[16]; uint32_t psx_brB_BFC0BD3C = cpu->gpr[9]; - psx_taken_BFC0BD3C = (psx_brA_BFC0BD3C != psx_brB_BFC0BD3C); - psx_delay_BFC0BD3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BD40: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD40u); -#endif - if (psx_delay_BFC0BD3C) { - psx_delay_BFC0BD3C = 0; - if (psx_taken_BFC0BD3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BCFCu); - goto label_BFC0BCFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD44u); - } -label_BFC0BD44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0BD44: AFA00054 sw $zero, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD44u); return; } g_debug_last_store_pc = 0xBFC0BD44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0BD48: AFA00058 sw $zero, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD48u); return; } g_debug_last_store_pc = 0xBFC0BD48u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00058u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0BD4C: AFA0005C sw $zero, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD4Cu); return; } g_debug_last_store_pc = 0xBFC0BD4Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0005Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BD50: 24100003 addiu $s0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24100003u, cpu->gpr[16], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0BD54: 27A300B4 addiu $v1, $sp, 180 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (180)); - PGXP_ALU(0x27A300B4u, cpu->gpr[3], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0BD58: 27A200E4 addiu $v0, $sp, 228 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (228)); - PGXP_ALU(0x27A200E4u, cpu->gpr[2], _pgx1, 0x000000E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD58u); -#endif -label_BFC0BD5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BD5C: AC60FFAC sw $zero, -84($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD5Cu); return; } g_debug_last_store_pc = 0xBFC0BD5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BD60: 24630010 addiu $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16)); - PGXP_ALU(0x24630010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BD64: AC60FFA0 sw $zero, -96($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD64u); return; } g_debug_last_store_pc = 0xBFC0BD64u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFA0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BD68: AC60FFA4 sw $zero, -92($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD68u); return; } g_debug_last_store_pc = 0xBFC0BD68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFA4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BD6C: 1462FFFB bne $v1, $v0, 0xBFC0BD5C */ - uint32_t psx_brA_BFC0BD6C = cpu->gpr[3]; uint32_t psx_brB_BFC0BD6C = cpu->gpr[2]; - psx_taken_BFC0BD6C = (psx_brA_BFC0BD6C != psx_brB_BFC0BD6C); - psx_delay_BFC0BD6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BD70: AC60FFA8 sw $zero, -88($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD70u); return; } g_debug_last_store_pc = 0xBFC0BD70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFA8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD70u); -#endif - if (psx_delay_BFC0BD6C) { - psx_delay_BFC0BD6C = 0; - if (psx_taken_BFC0BD6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD5Cu); - goto label_BFC0BD5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD74u); - } -label_BFC0BD74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BD74: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC0BD78: 00E03021 addu $a2, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BD7C: 3405FFFF ori $a1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0BD80: 24080051 addiu $t0, $zero, 81 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); - PGXP_ALU(0x24080051u, cpu->gpr[8], _pgx1, 0x00000051u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD80u); -#endif -label_BFC0BD84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD84u); -#endif - /* 0xBFC0BD84: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BD84u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BD88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0BD8C: 1519001F bne $t0, $t9, 0xBFC0BE0C */ - uint32_t psx_brA_BFC0BD8C = cpu->gpr[8]; uint32_t psx_brB_BFC0BD8C = cpu->gpr[25]; - psx_taken_BFC0BD8C = (psx_brA_BFC0BD8C != psx_brB_BFC0BD8C); - psx_delay_BFC0BD8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BD90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD90u); -#endif - if (psx_delay_BFC0BD8C) { - psx_delay_BFC0BD8C = 0; - if (psx_taken_BFC0BD8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE0Cu); - goto label_BFC0BE0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD94u); - } -label_BFC0BD94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BD94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC0BD94: 00105880 sll $t3, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001800u); -#endif - /* 0xBFC0BD98: 03AB6021 addu $t4, $sp, $t3 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[29] + cpu->gpr[11]; - PGXP_ALU(0x03AB6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0BD9C: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC0BDA0: AD8A0054 sw $t2, 84($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDA0u); return; } g_debug_last_store_pc = 0xBFC0BDA0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD8A0054u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDA4u); -#endif - /* 0xBFC0BDA4: 8CC40004 lw $a0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDA4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40u); } - PGXP_LOAD(0x8CC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDA8u); -#endif - /* 0xBFC0BDA8: 94C30008 lhu $v1, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDA8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x94C30008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BDAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0BDB0: 04810002 bgez $a0, 0xBFC0BDBC */ - uint32_t psx_brA_BFC0BDB0 = cpu->gpr[4]; - psx_taken_BFC0BDB0 = ((int32_t)psx_brA_BFC0BDB0 >= 0); - psx_delay_BFC0BDB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC0BDB4: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDB4u); -#endif - if (psx_delay_BFC0BDB0) { - psx_delay_BFC0BDB0 = 0; - if (psx_taken_BFC0BDB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BDBCu); - goto label_BFC0BDBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BDB8u); - } -label_BFC0BDB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BDB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BDB8: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDB8u); -#endif -label_BFC0BDBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BDBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0BDBC: 00012343 sra $a0, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00012343u, cpu->gpr[4], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0BDC0: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0BDC4: 18800011 blez $a0, 0xBFC0BE0C */ - uint32_t psx_brA_BFC0BDC4 = cpu->gpr[4]; - psx_taken_BFC0BDC4 = ((int32_t)psx_brA_BFC0BDC4 <= 0); - psx_delay_BFC0BDC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BDC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDC8u); -#endif - if (psx_delay_BFC0BDC4) { - psx_delay_BFC0BDC4 = 0; - if (psx_taken_BFC0BDC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE0Cu); - goto label_BFC0BE0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BDCCu); - } -label_BFC0BDCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BDCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC0BDCC: 1065000F beq $v1, $a1, 0xBFC0BE0C */ - uint32_t psx_brA_BFC0BDCC = cpu->gpr[3]; uint32_t psx_brB_BFC0BDCC = cpu->gpr[5]; - psx_taken_BFC0BDCC = (psx_brA_BFC0BDCC == psx_brB_BFC0BDCC); - psx_delay_BFC0BDCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BDD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDD0u); -#endif - if (psx_delay_BFC0BDCC) { - psx_delay_BFC0BDCC = 0; - if (psx_taken_BFC0BDCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE0Cu); - goto label_BFC0BE0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BDD4u); - } -label_BFC0BDD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BDD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0BDD4: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDD4u); -#endif -label_BFC0BDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0BDD8: 27AF00A8 addiu $t7, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27AF00A8u, cpu->gpr[15], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC0BDDC: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDE0u); -#endif - /* 0xBFC0BDE0: 8C58FFAC lw $t8, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDE0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C58FFACu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0BDE4: 0003C940 sll $t9, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 5u; - PGXP_ALU(0x0003C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC0BDE8: 270D0001 addiu $t5, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x270D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC0BDEC: AC4DFFAC sw $t5, -84($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDECu); return; } g_debug_last_store_pc = 0xBFC0BDECu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC4DFFACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000480u); -#endif - /* 0xBFC0BDF0: 00F95021 addu $t2, $a3, $t9 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[7] + cpu->gpr[25]; - PGXP_ALU(0x00F95021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDF4u); -#endif - /* 0xBFC0BDF4: 95430008 lhu $v1, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BDF4u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x400u); } - PGXP_LOAD(0x95430008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0BDF8: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0BDFC: 18800003 blez $a0, 0xBFC0BE0C */ - uint32_t psx_brA_BFC0BDFC = cpu->gpr[4]; - psx_taken_BFC0BDFC = ((int32_t)psx_brA_BFC0BDFC <= 0); - psx_delay_BFC0BDFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BE00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE00u); -#endif - if (psx_delay_BFC0BDFC) { - psx_delay_BFC0BDFC = 0; - if (psx_taken_BFC0BDFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE0Cu); - goto label_BFC0BE0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE04u); - } -label_BFC0BE04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC0BE04: 1465FFF4 bne $v1, $a1, 0xBFC0BDD8 */ - uint32_t psx_brA_BFC0BE04 = cpu->gpr[3]; uint32_t psx_brB_BFC0BE04 = cpu->gpr[5]; - psx_taken_BFC0BE04 = (psx_brA_BFC0BE04 != psx_brB_BFC0BE04); - psx_delay_BFC0BE04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0BE08: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE08u); -#endif - if (psx_delay_BFC0BE04) { - psx_delay_BFC0BE04 = 0; - if (psx_taken_BFC0BE04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BDD8u); - goto label_BFC0BDD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE0Cu); - } -label_BFC0BE0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BE0C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0BE10: 2A01000F slti $at, $s0, 15 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0); - PGXP_ALU(0x2A01000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BE14: 1420FFDB bne $at, $zero, 0xBFC0BD84 */ - uint32_t psx_brA_BFC0BE14 = cpu->gpr[1]; uint32_t psx_brB_BFC0BE14 = cpu->gpr[0]; - psx_taken_BFC0BE14 = (psx_brA_BFC0BE14 != psx_brB_BFC0BE14); - psx_delay_BFC0BE14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC0BE18: 24C60020 addiu $a2, $a2, 32 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (32)); - PGXP_ALU(0x24C60020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE18u); -#endif - if (psx_delay_BFC0BE14) { - psx_delay_BFC0BE14 = 0; - if (psx_taken_BFC0BE14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BD84u); - goto label_BFC0BD84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE1Cu); - } -label_BFC0BE1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BE1C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0BE20: 27A300A8 addiu $v1, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27A300A8u, cpu->gpr[3], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0BE24: 240200A0 addiu $v0, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240200A0u, cpu->gpr[2], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE24u); -#endif -label_BFC0BE28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE28u); -#endif - /* 0xBFC0BE28: 8C6BFFAC lw $t3, -84($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE28u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6BFFACu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BE2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0BE30: 15600004 bne $t3, $zero, 0xBFC0BE44 */ - uint32_t psx_brA_BFC0BE30 = cpu->gpr[11]; uint32_t psx_brB_BFC0BE30 = cpu->gpr[0]; - psx_taken_BFC0BE30 = (psx_brA_BFC0BE30 != psx_brB_BFC0BE30); - psx_delay_BFC0BE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BE34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE34u); -#endif - if (psx_delay_BFC0BE30) { - psx_delay_BFC0BE30 = 0; - if (psx_taken_BFC0BE30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE44u); - goto label_BFC0BE44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE38u); - } -label_BFC0BE38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC0BE38: 00106140 sll $t4, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 5u; - PGXP_ALU(0x00106140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5080u); -#endif - /* 0xBFC0BE3C: 00EC7021 addu $t6, $a3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[7] + cpu->gpr[12]; - PGXP_ALU(0x00EC7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0BE40: ADC20000 sw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE40u); return; } g_debug_last_store_pc = 0xBFC0BE40u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xADC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE40u); -#endif -label_BFC0BE44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BE44: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0BE48: 1609FFF7 bne $s0, $t1, 0xBFC0BE28 */ - uint32_t psx_brA_BFC0BE48 = cpu->gpr[16]; uint32_t psx_brB_BFC0BE48 = cpu->gpr[9]; - psx_taken_BFC0BE48 = (psx_brA_BFC0BE48 != psx_brB_BFC0BE48); - psx_delay_BFC0BE48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BE4C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE4Cu); -#endif - if (psx_delay_BFC0BE48) { - psx_delay_BFC0BE48 = 0; - if (psx_taken_BFC0BE48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE28u); - goto label_BFC0BE28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE50u); - } -label_BFC0BE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BE50: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BE54: 01F17821 addu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[17]; - PGXP_ALU(0x01F17821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BE58: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BE5C: 2718B9E8 addiu $t8, $t8, -17944 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-17944)); - PGXP_ALU(0x2718B9E8u, cpu->gpr[24], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0BE60: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC0BE64: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0BE68: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0BE6C: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0BE70: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE70u); -#endif -label_BFC0BE74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BE74: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE74u); return; } g_debug_last_store_pc = 0xBFC0BE74u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0BE78: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BE7C: AC430004 sw $v1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE7Cu); return; } g_debug_last_store_pc = 0xBFC0BE7Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BE80: AC430008 sw $v1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE80u); return; } g_debug_last_store_pc = 0xBFC0BE80u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BE84: AC43000C sw $v1, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE84u); return; } g_debug_last_store_pc = 0xBFC0BE84u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC0BE88: 1604FFFA bne $s0, $a0, 0xBFC0BE74 */ - uint32_t psx_brA_BFC0BE88 = cpu->gpr[16]; uint32_t psx_brB_BFC0BE88 = cpu->gpr[4]; - psx_taken_BFC0BE88 = (psx_brA_BFC0BE88 != psx_brB_BFC0BE88); - psx_delay_BFC0BE88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0BE8C: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE8Cu); -#endif - if (psx_delay_BFC0BE88) { - psx_delay_BFC0BE88 = 0; - if (psx_taken_BFC0BE88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE74u); - goto label_BFC0BE74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BE90u); - } -label_BFC0BE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE90u); -#endif - /* 0xBFC0BE90: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE94u); -#endif - /* 0xBFC0BE94: 8FA60040 lw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BE94u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BE98: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0BEA0u; /* jal link before delay slot */ - psx_delay_BFC0BE98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BE9C: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BE9Cu); -#endif - if (psx_delay_BFC0BE98) { - psx_delay_BFC0BE98 = 0; - cpu->gpr[31] = 0xBFC0BEA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0BEA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BEA0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BEA4: 10410005 beq $v0, $at, 0xBFC0BEBC */ - uint32_t psx_brA_BFC0BEA4 = cpu->gpr[2]; uint32_t psx_brB_BFC0BEA4 = cpu->gpr[1]; - psx_taken_BFC0BEA4 = (psx_brA_BFC0BEA4 == psx_brB_BFC0BEA4); - psx_delay_BFC0BEA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEA8u); -#endif - /* 0xBFC0BEA8: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BEA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEA8u); -#endif - if (psx_delay_BFC0BEA4) { - psx_delay_BFC0BEA4 = 0; - if (psx_taken_BFC0BEA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BEBCu); - goto label_BFC0BEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BEACu); - } -label_BFC0BEAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BEAC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BEB0: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BEB8u; /* jal link before delay slot */ - psx_delay_BFC0BEB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BEB4: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEB4u); -#endif - if (psx_delay_BFC0BEB0) { - psx_delay_BFC0BEB0 = 0; - cpu->gpr[31] = 0xBFC0BEB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BEB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEB8u); -#endif - /* 0xBFC0BEB8: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BEB8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEB8u); -#endif -label_BFC0BEBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0BEBC: 00115080 sll $t2, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BEC0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0BEC4: ADA00000 sw $zero, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BEC4u); return; } g_debug_last_store_pc = 0xBFC0BEC4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADA00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0BEC8: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0BECC: 24190003 addiu $t9, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24190003u, cpu->gpr[25], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BED0u); -#endif - /* 0xBFC0BED0: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BED0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BED4: 10000042 beq $zero, $zero, 0xBFC0BFE0 */ - uint32_t psx_brA_BFC0BED4 = cpu->gpr[0]; uint32_t psx_brB_BFC0BED4 = cpu->gpr[0]; - psx_taken_BFC0BED4 = (psx_brA_BFC0BED4 == psx_brB_BFC0BED4); - psx_delay_BFC0BED4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC0BED8: AC399F28 sw $t9, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BED8u); return; } g_debug_last_store_pc = 0xBFC0BED8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BED8u); -#endif - if (psx_delay_BFC0BED4) { - psx_delay_BFC0BED4 = 0; - if (psx_taken_BFC0BED4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - goto label_BFC0BFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BEDCu); - } -label_BFC0BEDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BEDC: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BEE0: 258CBE48 addiu $t4, $t4, -16824 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-16824)); - PGXP_ALU(0x258CBE48u, cpu->gpr[12], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0BEE4: 001159C0 sll $t3, $s1, 7 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 7u; - PGXP_ALU(0x001159C0u, cpu->gpr[11], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC0BEE8: 016C2021 addu $a0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BEEC: 0FF021C8 jal 0xBFC08720 */ - cpu->gpr[31] = 0xBFC0BEF4u; /* jal link before delay slot */ - psx_delay_BFC0BEEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0BEF0: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BEF0u); return; } g_debug_last_store_pc = 0xBFC0BEF0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEF0u); -#endif - if (psx_delay_BFC0BEEC) { - psx_delay_BFC0BEEC = 0; - cpu->gpr[31] = 0xBFC0BEF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC08720u); - cpu->pc = 0xBFC08720u; return; - } -label_BFC0BEF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0BEF4: 10400010 beq $v0, $zero, 0xBFC0BF38 */ - uint32_t psx_brA_BFC0BEF4 = cpu->gpr[2]; uint32_t psx_brB_BFC0BEF4 = cpu->gpr[0]; - psx_taken_BFC0BEF4 = (psx_brA_BFC0BEF4 == psx_brB_BFC0BEF4); - psx_delay_BFC0BEF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BEF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEF8u); -#endif - if (psx_delay_BFC0BEF4) { - psx_delay_BFC0BEF4 = 0; - if (psx_taken_BFC0BEF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BF38u); - goto label_BFC0BF38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BEFCu); - } -label_BFC0BEFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BEFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0BEFC: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0BF00: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0BF04: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF08u); -#endif - /* 0xBFC0BF08: 8F189F30 lw $t8, -24784($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24784; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF08u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F30u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0BF0C: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0BF10: 01D17021 addu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[17]; - PGXP_ALU(0x01D17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0BF14: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0BF18: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC0BF1C: 00186880 sll $t5, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[13] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00186880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006000u); -#endif - /* 0xBFC0BF20: 01CDC821 addu $t9, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CDC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0BF24: 254AB9E8 addiu $t2, $t2, -17944 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-17944)); - PGXP_ALU(0x254AB9E8u, cpu->gpr[10], _pgx1, 0xFFFFB9E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF28u); -#endif - /* 0xBFC0BF28: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF28u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000410u); -#endif - /* 0xBFC0BF2C: 032A2021 addu $a0, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[10]; - PGXP_ALU(0x032A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BF30: 0FF00AD4 jal 0xBFC02B50 */ - cpu->gpr[31] = 0xBFC0BF38u; /* jal link before delay slot */ - psx_delay_BFC0BF30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0BF34: 24060004 addiu $a2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24060004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF34u); -#endif - if (psx_delay_BFC0BF30) { - psx_delay_BFC0BF30 = 0; - cpu->gpr[31] = 0xBFC0BF38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC02B50u); - cpu->pc = 0xBFC02B50u; return; - } -label_BFC0BF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BF38: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0BF3C: 258C9F30 addiu $t4, $t4, -24784 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24784)); - PGXP_ALU(0x258C9F30u, cpu->gpr[12], _pgx1, 0xFFFF9F30u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0BF40: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC0BF44: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF48u); -#endif - /* 0xBFC0BF48: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BF4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0BF50: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0BF54: 28610014 slti $at, $v1, 20 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (20) ? 1 : 0); - PGXP_ALU(0x28610014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BF58: 10200012 beq $at, $zero, 0xBFC0BFA4 */ - uint32_t psx_brA_BFC0BF58 = cpu->gpr[1]; uint32_t psx_brB_BFC0BF58 = cpu->gpr[0]; - psx_taken_BFC0BF58 = (psx_brA_BFC0BF58 == psx_brB_BFC0BF58); - psx_delay_BFC0BF58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0BF5C: AC430000 sw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF5Cu); return; } g_debug_last_store_pc = 0xBFC0BF5Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF5Cu); -#endif - if (psx_delay_BFC0BF58) { - psx_delay_BFC0BF58 = 0; - if (psx_taken_BFC0BF58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFA4u); - goto label_BFC0BFA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BF60u); - } -label_BFC0BF60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BF60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF60u); -#endif - /* 0xBFC0BF60: 8C450000 lw $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF60u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x8C450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF64u); -#endif - /* 0xBFC0BF64: 8FA400A4 lw $a0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400A4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF68u); -#endif - /* 0xBFC0BF68: 8FA60040 lw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF68u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BF6C: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0BF74u; /* jal link before delay slot */ - psx_delay_BFC0BF6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0BF70: 24A50010 addiu $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (16)); - PGXP_ALU(0x24A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF70u); -#endif - if (psx_delay_BFC0BF6C) { - psx_delay_BFC0BF6C = 0; - cpu->gpr[31] = 0xBFC0BF74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0BF74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BF74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BF74: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0BF78: 10410019 beq $v0, $at, 0xBFC0BFE0 */ - uint32_t psx_brA_BFC0BF78 = cpu->gpr[2]; uint32_t psx_brB_BFC0BF78 = cpu->gpr[1]; - psx_taken_BFC0BF78 = (psx_brA_BFC0BF78 == psx_brB_BFC0BF78); - psx_delay_BFC0BF78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BF7C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF7Cu); -#endif - if (psx_delay_BFC0BF78) { - psx_delay_BFC0BF78 = 0; - if (psx_taken_BFC0BF78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - goto label_BFC0BFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BF80u); - } -label_BFC0BF80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BF80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BF80: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF80u); return; } g_debug_last_store_pc = 0xBFC0BF80u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BF84: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0BF88: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0BF8C: AC2FB9D4 sw $t7, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BF8Cu); return; } g_debug_last_store_pc = 0xBFC0BF8Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FB9D4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BF90: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BF94: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BF9Cu; /* jal link before delay slot */ - psx_delay_BFC0BF94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BF98: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BF98u); -#endif - if (psx_delay_BFC0BF94) { - psx_delay_BFC0BF94 = 0; - cpu->gpr[31] = 0xBFC0BF9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BF9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BF9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BF9C: 10000011 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BF9C = cpu->gpr[0]; uint32_t psx_brB_BFC0BF9C = cpu->gpr[0]; - psx_taken_BFC0BF9C = (psx_brA_BFC0BF9C == psx_brB_BFC0BF9C); - psx_delay_BFC0BF9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFA0u); -#endif - /* 0xBFC0BFA0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFA0u); -#endif - if (psx_delay_BFC0BF9C) { - psx_delay_BFC0BF9C = 0; - if (psx_taken_BFC0BF9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFA4u); - } -label_BFC0BFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BFA4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BFA8: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BFB0u; /* jal link before delay slot */ - psx_delay_BFC0BFA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BFAC: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFACu); -#endif - if (psx_delay_BFC0BFA8) { - psx_delay_BFC0BFA8 = 0; - cpu->gpr[31] = 0xBFC0BFB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BFB0: 1000000C beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BFB0 = cpu->gpr[0]; uint32_t psx_brB_BFC0BFB0 = cpu->gpr[0]; - psx_taken_BFC0BFB0 = (psx_brA_BFC0BFB0 == psx_brB_BFC0BFB0); - psx_delay_BFC0BFB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFB4u); -#endif - /* 0xBFC0BFB4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFB4u); -#endif - if (psx_delay_BFC0BFB0) { - psx_delay_BFC0BFB0 = 0; - if (psx_taken_BFC0BFB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFB8u); - } -label_BFC0BFB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BFB8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0BFBC: AC20B9D0 sw $zero, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFBCu); return; } g_debug_last_store_pc = 0xBFC0BFBCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20B9D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BFC0: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0BFC4: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0BFC8: AC38B9D4 sw $t8, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFC8u); return; } g_debug_last_store_pc = 0xBFC0BFC8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38B9D4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0BFCC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0BFD0: 0FF02FFC jal 0xBFC0BFF0 */ - cpu->gpr[31] = 0xBFC0BFD8u; /* jal link before delay slot */ - psx_delay_BFC0BFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0BFD4: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFD4u); -#endif - if (psx_delay_BFC0BFD0) { - psx_delay_BFC0BFD0 = 0; - cpu->gpr[31] = 0xBFC0BFD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFF0u); - cpu->pc = 0xBFC0BFF0u; return; - } -label_BFC0BFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0BFD8: 10000002 beq $zero, $zero, 0xBFC0BFE4 */ - uint32_t psx_brA_BFC0BFD8 = cpu->gpr[0]; uint32_t psx_brB_BFC0BFD8 = cpu->gpr[0]; - psx_taken_BFC0BFD8 = (psx_brA_BFC0BFD8 == psx_brB_BFC0BFD8); - psx_delay_BFC0BFD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFDCu); -#endif - /* 0xBFC0BFDC: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFDCu); -#endif - if (psx_delay_BFC0BFD8) { - psx_delay_BFC0BFD8 = 0; - if (psx_taken_BFC0BFD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE4u); - goto label_BFC0BFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0BFE0u); - } -label_BFC0BFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFE0u); -#endif - /* 0xBFC0BFE0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFE0u); -#endif -label_BFC0BFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFE4u); -#endif - /* 0xBFC0BFE4: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0BFE4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0BFE8: 03E00008 jr $ra */ - psx_delay_BFC0BFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0BFEC: 27BD00A8 addiu $sp, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27BD00A8u, cpu->gpr[29], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFECu); -#endif - if (psx_delay_BFC0BFE8) { - psx_delay_BFC0BFE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0BFF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0BFF0u); - int psx_delay_BFC0C030 = 0; - int psx_delay_BFC0C040 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C038u: goto label_BFC0C038; - default: break; - } - } -label_BFC0BFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0BFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0BFF0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0BFF4: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0BFF8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0BFFC: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C000: AC209F20 sw $zero, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C000u); return; } g_debug_last_store_pc = 0xBFC0C000u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F20u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C004: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0C008: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0C00C: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C010: AC209F28 sw $zero, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C010u); return; } g_debug_last_store_pc = 0xBFC0C010u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C014: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C018: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0C01C: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C020: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C020u); return; } g_debug_last_store_pc = 0xBFC0C020u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0C024: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C028: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C02C: AC209F30 sw $zero, -24784($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24784; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C02Cu); return; } g_debug_last_store_pc = 0xBFC0C02Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C030: 0FF0365C jal 0xBFC0D970 */ - cpu->gpr[31] = 0xBFC0C038u; /* jal link before delay slot */ - psx_delay_BFC0C030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C034: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C034u); -#endif - if (psx_delay_BFC0C030) { - psx_delay_BFC0C030 = 0; - cpu->gpr[31] = 0xBFC0C038u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D970u); - cpu->pc = 0xBFC0D970u; return; - } -label_BFC0C038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C038u); -#endif - /* 0xBFC0C038: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C038u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C03C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C040: 03E00008 jr $ra */ - psx_delay_BFC0C040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C044: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C044u); -#endif - if (psx_delay_BFC0C040) { - psx_delay_BFC0C040 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C048(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C048u); - int psx_delay_BFC0C068 = 0; - int psx_taken_BFC0C068 = 0; - int psx_delay_BFC0C088 = 0; - int psx_delay_BFC0C0A8 = 0; - int psx_delay_BFC0C0B0 = 0; - int psx_taken_BFC0C0B0 = 0; - int psx_delay_BFC0C0C0 = 0; - int psx_taken_BFC0C0C0 = 0; - int psx_delay_BFC0C0D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C070u: goto label_BFC0C070; - case 0xBFC0C074u: goto label_BFC0C074; - case 0xBFC0C090u: goto label_BFC0C090; - case 0xBFC0C0B0u: goto label_BFC0C0B0; - case 0xBFC0C0B8u: goto label_BFC0C0B8; - case 0xBFC0C0C8u: goto label_BFC0C0C8; - case 0xBFC0C0CCu: goto label_BFC0C0CC; - default: break; - } - } -label_BFC0C048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C048: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C04C: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C04Cu); return; } g_debug_last_store_pc = 0xBFC0C04Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C050u); -#endif - /* 0xBFC0C050: 8FA20030 lw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C050u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0C054: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0C058: 25EF9F20 addiu $t7, $t7, -24800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); - PGXP_ALU(0x25EF9F20u, cpu->gpr[15], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C05C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C05Cu); return; } g_debug_last_store_pc = 0xBFC0C05Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0C060: 24180008 addiu $t8, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24180008u, cpu->gpr[24], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0C068: 04410002 bgez $v0, 0xBFC0C074 */ - uint32_t psx_brA_BFC0C068 = cpu->gpr[2]; - psx_taken_BFC0C068 = ((int32_t)psx_brA_BFC0C068 >= 0); - psx_delay_BFC0C068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC0C06C: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C06Cu); -#endif - if (psx_delay_BFC0C068) { - psx_delay_BFC0C068 = 0; - if (psx_taken_BFC0C068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C074u); - goto label_BFC0C074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C070u); - } -label_BFC0C070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C070: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C070u); -#endif -label_BFC0C074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0C074: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0C078: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC0C07C: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0C080: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C080u); return; } g_debug_last_store_pc = 0xBFC0C080u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0C084: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C084u); return; } g_debug_last_store_pc = 0xBFC0C084u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C088: 0FF03684 jal 0xBFC0DA10 */ - cpu->gpr[31] = 0xBFC0C090u; /* jal link before delay slot */ - psx_delay_BFC0C088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0C08C: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C08Cu); return; } g_debug_last_store_pc = 0xBFC0C08Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C08Cu); -#endif - if (psx_delay_BFC0C088) { - psx_delay_BFC0C088 = 0; - cpu->gpr[31] = 0xBFC0C090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA10u); - cpu->pc = 0xBFC0DA10u; return; - } -label_BFC0C090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C090u); -#endif - /* 0xBFC0C090: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C090u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0C094: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0C098: 2508BE48 addiu $t0, $t0, -16824 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-16824)); - PGXP_ALU(0x2508BE48u, cpu->gpr[8], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C09Cu); -#endif - /* 0xBFC0C09C: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C09Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0C0A0: 0002C9C0 sll $t9, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 7u; - PGXP_ALU(0x0002C9C0u, cpu->gpr[25], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000140u); -#endif - /* 0xBFC0C0A4: 03283021 addu $a2, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03283021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C0A8: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0C0B0u; /* jal link before delay slot */ - psx_delay_BFC0C0A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C0AC: 2405003F addiu $a1, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2405003Fu, cpu->gpr[5], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0ACu); -#endif - if (psx_delay_BFC0C0A8) { - psx_delay_BFC0C0A8 = 0; - cpu->gpr[31] = 0xBFC0C0B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0C0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C0B0: 14400006 bne $v0, $zero, 0xBFC0C0CC */ - uint32_t psx_brA_BFC0C0B0 = cpu->gpr[2]; uint32_t psx_brB_BFC0C0B0 = cpu->gpr[0]; - psx_taken_BFC0C0B0 = (psx_brA_BFC0C0B0 != psx_brB_BFC0C0B0); - psx_delay_BFC0C0B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C0B4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0B4u); -#endif - if (psx_delay_BFC0C0B0) { - psx_delay_BFC0C0B0 = 0; - if (psx_taken_BFC0C0B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0CCu); - goto label_BFC0C0CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0B8u); - } -label_BFC0C0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0B8u); -#endif - /* 0xBFC0C0B8: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C0B8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C0BC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C0C0: 10000002 beq $zero, $zero, 0xBFC0C0CC */ - uint32_t psx_brA_BFC0C0C0 = cpu->gpr[0]; uint32_t psx_brB_BFC0C0C0 = cpu->gpr[0]; - psx_taken_BFC0C0C0 = (psx_brA_BFC0C0C0 == psx_brB_BFC0C0C0); - psx_delay_BFC0C0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0C0C4: AD200000 sw $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C0C4u); return; } g_debug_last_store_pc = 0xBFC0C0C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0C4u); -#endif - if (psx_delay_BFC0C0C0) { - psx_delay_BFC0C0C0 = 0; - if (psx_taken_BFC0C0C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0CCu); - goto label_BFC0C0CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0C8u); - } -label_BFC0C0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C0C8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0C8u); -#endif -label_BFC0C0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0CCu); -#endif - /* 0xBFC0C0CC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C0CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C0D0: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C0D4: 03E00008 jr $ra */ - psx_delay_BFC0C0D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C0D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0D8u); -#endif - if (psx_delay_BFC0C0D4) { - psx_delay_BFC0C0D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C0DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C0DCu); - int psx_delay_BFC0C0F0 = 0; - int psx_taken_BFC0C0F0 = 0; - int psx_delay_BFC0C10C = 0; - int psx_delay_BFC0C118 = 0; - int psx_taken_BFC0C118 = 0; - int psx_delay_BFC0C124 = 0; - int psx_taken_BFC0C124 = 0; - int psx_delay_BFC0C138 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C0F8u: goto label_BFC0C0F8; - case 0xBFC0C0FCu: goto label_BFC0C0FC; - case 0xBFC0C114u: goto label_BFC0C114; - case 0xBFC0C120u: goto label_BFC0C120; - case 0xBFC0C12Cu: goto label_BFC0C12C; - case 0xBFC0C130u: goto label_BFC0C130; - default: break; - } - } -label_BFC0C0DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0C0DC: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C0E0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0C0E4: 27189F20 addiu $t8, $t8, -24800 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24800)); - PGXP_ALU(0x27189F20u, cpu->gpr[24], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C0E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C0E8u); return; } g_debug_last_store_pc = 0xBFC0C0E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0C0EC: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C0F0: 04810002 bgez $a0, 0xBFC0C0FC */ - uint32_t psx_brA_BFC0C0F0 = cpu->gpr[4]; - psx_taken_BFC0C0F0 = ((int32_t)psx_brA_BFC0C0F0 >= 0); - psx_delay_BFC0C0F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC0C0F4: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0F4u); -#endif - if (psx_delay_BFC0C0F0) { - psx_delay_BFC0C0F0 = 0; - if (psx_taken_BFC0C0F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0FCu); - goto label_BFC0C0FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C0F8u); - } -label_BFC0C0F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C0F8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0F8u); -#endif -label_BFC0C0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C0FC: 00017103 sra $t6, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017103u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0C100: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC0C104: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0C108: AC790000 sw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C108u); return; } g_debug_last_store_pc = 0xBFC0C108u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C10C: 0FF03690 jal 0xBFC0DA40 */ - cpu->gpr[31] = 0xBFC0C114u; /* jal link before delay slot */ - psx_delay_BFC0C10C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0C110: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C110u); return; } g_debug_last_store_pc = 0xBFC0C110u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C110u); -#endif - if (psx_delay_BFC0C10C) { - psx_delay_BFC0C10C = 0; - cpu->gpr[31] = 0xBFC0C114u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA40u); - cpu->pc = 0xBFC0DA40u; return; - } -label_BFC0C114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C114u); -#endif - /* 0xBFC0C114: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C114u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C118: 14400005 bne $v0, $zero, 0xBFC0C130 */ - uint32_t psx_brA_BFC0C118 = cpu->gpr[2]; uint32_t psx_brB_BFC0C118 = cpu->gpr[0]; - psx_taken_BFC0C118 = (psx_brA_BFC0C118 != psx_brB_BFC0C118); - psx_delay_BFC0C118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C11C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C11Cu); -#endif - if (psx_delay_BFC0C118) { - psx_delay_BFC0C118 = 0; - if (psx_taken_BFC0C118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C130u); - goto label_BFC0C130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C120u); - } -label_BFC0C120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0C120: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C120u); return; } g_debug_last_store_pc = 0xBFC0C120u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C124: 10000002 beq $zero, $zero, 0xBFC0C130 */ - uint32_t psx_brA_BFC0C124 = cpu->gpr[0]; uint32_t psx_brB_BFC0C124 = cpu->gpr[0]; - psx_taken_BFC0C124 = (psx_brA_BFC0C124 == psx_brB_BFC0C124); - psx_delay_BFC0C124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C128: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C128u); -#endif - if (psx_delay_BFC0C124) { - psx_delay_BFC0C124 = 0; - if (psx_taken_BFC0C124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C130u); - goto label_BFC0C130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C12Cu); - } -label_BFC0C12C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C12Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C12C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C12Cu); -#endif -label_BFC0C130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C130u); -#endif - /* 0xBFC0C130: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C130u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C134: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C138: 03E00008 jr $ra */ - psx_delay_BFC0C138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C13C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C13Cu); -#endif - if (psx_delay_BFC0C138) { - psx_delay_BFC0C138 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C140(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C140u); - int psx_delay_BFC0C160 = 0; - int psx_taken_BFC0C160 = 0; - int psx_delay_BFC0C188 = 0; - int psx_delay_BFC0C198 = 0; - int psx_taken_BFC0C198 = 0; - int psx_delay_BFC0C1A4 = 0; - int psx_taken_BFC0C1A4 = 0; - int psx_delay_BFC0C1D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C168u: goto label_BFC0C168; - case 0xBFC0C16Cu: goto label_BFC0C16C; - case 0xBFC0C190u: goto label_BFC0C190; - case 0xBFC0C1A0u: goto label_BFC0C1A0; - case 0xBFC0C1ACu: goto label_BFC0C1AC; - case 0xBFC0C1B0u: goto label_BFC0C1B0; - case 0xBFC0C1CCu: goto label_BFC0C1CC; - default: break; - } - } -label_BFC0C140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0C140: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C144: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0C148: 25EF9F20 addiu $t7, $t7, -24800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-24800)); - PGXP_ALU(0x25EF9F20u, cpu->gpr[15], _pgx1, 0xFFFF9F20u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C14C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C14Cu); return; } g_debug_last_store_pc = 0xBFC0C14Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0C150: 24180004 addiu $t8, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24180004u, cpu->gpr[24], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0C154: 3C08A001 lui $t0, 0xA001 */ - cpu->gpr[8] = 0xA0010000u; - PGXP_ALU(0x3C08A001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0C158: 2508BE48 addiu $t0, $t0, -16824 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-16824)); - PGXP_ALU(0x2508BE48u, cpu->gpr[8], _pgx1, 0xFFFFBE48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C15C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C160: 04810002 bgez $a0, 0xBFC0C16C */ - uint32_t psx_brA_BFC0C160 = cpu->gpr[4]; - psx_taken_BFC0C160 = ((int32_t)psx_brA_BFC0C160 >= 0); - psx_delay_BFC0C160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC0C164: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C164u); -#endif - if (psx_delay_BFC0C160) { - psx_delay_BFC0C160 = 0; - if (psx_taken_BFC0C160) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C16Cu); - goto label_BFC0C16C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C168u); - } -label_BFC0C168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C168: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C168u); -#endif -label_BFC0C16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC0C16C: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0C170: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC080u); -#endif - /* 0xBFC0C174: 01CF3821 addu $a3, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[7] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC0C178: ACF80000 sw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C178u); return; } g_debug_last_store_pc = 0xBFC0C178u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0C17C: 0003C9C0 sll $t9, $v1, 7 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 7u; - PGXP_ALU(0x0003C9C0u, cpu->gpr[25], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC0C180: AFA7001C sw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C180u); return; } g_debug_last_store_pc = 0xBFC0C180u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000140u); -#endif - /* 0xBFC0C184: 03283021 addu $a2, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03283021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C188: 0FF03680 jal 0xBFC0DA00 */ - cpu->gpr[31] = 0xBFC0C190u; /* jal link before delay slot */ - psx_delay_BFC0C188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0C18C: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C18Cu); return; } g_debug_last_store_pc = 0xBFC0C18Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C18Cu); -#endif - if (psx_delay_BFC0C188) { - psx_delay_BFC0C188 = 0; - cpu->gpr[31] = 0xBFC0C190u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA00u); - cpu->pc = 0xBFC0DA00u; return; - } -label_BFC0C190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C190u); -#endif - /* 0xBFC0C190: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C190u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C194u); -#endif - /* 0xBFC0C194: 8FA7001C lw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C194u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C198: 14400005 bne $v0, $zero, 0xBFC0C1B0 */ - uint32_t psx_brA_BFC0C198 = cpu->gpr[2]; uint32_t psx_brB_BFC0C198 = cpu->gpr[0]; - psx_taken_BFC0C198 = (psx_brA_BFC0C198 != psx_brB_BFC0C198); - psx_delay_BFC0C198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0C19C: 24090004 addiu $t1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24090004u, cpu->gpr[9], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C19Cu); -#endif - if (psx_delay_BFC0C198) { - psx_delay_BFC0C198 = 0; - if (psx_taken_BFC0C198) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C1B0u); - goto label_BFC0C1B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C1A0u); - } -label_BFC0C1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0C1A0: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1A0u); return; } g_debug_last_store_pc = 0xBFC0C1A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C1A4: 10000009 beq $zero, $zero, 0xBFC0C1CC */ - uint32_t psx_brA_BFC0C1A4 = cpu->gpr[0]; uint32_t psx_brB_BFC0C1A4 = cpu->gpr[0]; - psx_taken_BFC0C1A4 = (psx_brA_BFC0C1A4 == psx_brB_BFC0C1A4); - psx_delay_BFC0C1A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C1A8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1A8u); -#endif - if (psx_delay_BFC0C1A4) { - psx_delay_BFC0C1A4 = 0; - if (psx_taken_BFC0C1A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C1CCu); - goto label_BFC0C1CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C1ACu); - } -label_BFC0C1AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0C1AC: 24090004 addiu $t1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24090004u, cpu->gpr[9], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1ACu); -#endif -label_BFC0C1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC0C1B0: 00035880 sll $t3, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C1B4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC0C1B8: ACE90000 sw $t1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1B8u); return; } g_debug_last_store_pc = 0xBFC0C1B8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC0C1BC: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0C1C0: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0C1C4: AC2A9F28 sw $t2, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1C4u); return; } g_debug_last_store_pc = 0xBFC0C1C4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9F28u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C1C8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1C8u); -#endif -label_BFC0C1CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1CCu); -#endif - /* 0xBFC0C1CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C1D0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C1D4: 03E00008 jr $ra */ - psx_delay_BFC0C1D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C1D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1D8u); -#endif - if (psx_delay_BFC0C1D4) { - psx_delay_BFC0C1D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C1DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C1DCu); - int psx_delay_BFC0C1EC = 0; -label_BFC0C1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0C1DC: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1E0u); -#endif - /* 0xBFC0C1E0: 8C639F90 lw $v1, -24688($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639F90u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C1E4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0C1E8: AC249F90 sw $a0, -24688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C1E8u); return; } g_debug_last_store_pc = 0xBFC0C1E8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249F90u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C1EC: 03E00008 jr $ra */ - psx_delay_BFC0C1EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0C1F0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1F0u); -#endif - if (psx_delay_BFC0C1EC) { - psx_delay_BFC0C1EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C1FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C1FCu); - int psx_delay_BFC0C208 = 0; - int psx_delay_BFC0C218 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C210u: goto label_BFC0C210; - default: break; - } - } -label_BFC0C1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C1FC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C200: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C200u); return; } g_debug_last_store_pc = 0xBFC0C200u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C204: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C208: 0FF0367C jal 0xBFC0D9F0 */ - cpu->gpr[31] = 0xBFC0C210u; /* jal link before delay slot */ - psx_delay_BFC0C208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C20C: 2484E3E4 addiu $a0, $a0, -7196 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7196)); - PGXP_ALU(0x2484E3E4u, cpu->gpr[4], _pgx1, 0xFFFFE3E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C20Cu); -#endif - if (psx_delay_BFC0C208) { - psx_delay_BFC0C208 = 0; - cpu->gpr[31] = 0xBFC0C210u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9F0u); - cpu->pc = 0xBFC0D9F0u; return; - } -label_BFC0C210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C210u); -#endif - /* 0xBFC0C210: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C210u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C214: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C218: 03E00008 jr $ra */ - psx_delay_BFC0C218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C21C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C21Cu); -#endif - if (psx_delay_BFC0C218) { - psx_delay_BFC0C218 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C220(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C220u); - int psx_delay_BFC0C230 = 0; - int psx_delay_BFC0C240 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C238u: goto label_BFC0C238; - default: break; - } - } -label_BFC0C220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C220: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C224: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C224u); return; } g_debug_last_store_pc = 0xBFC0C224u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C228: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C22C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C230: 0FF02D92 jal 0xBFC0B648 */ - cpu->gpr[31] = 0xBFC0C238u; /* jal link before delay slot */ - psx_delay_BFC0C230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C234: AC2EB9D0 sw $t6, -17968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C234u); return; } g_debug_last_store_pc = 0xBFC0C234u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9D0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C234u); -#endif - if (psx_delay_BFC0C230) { - psx_delay_BFC0C230 = 0; - cpu->gpr[31] = 0xBFC0C238u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B648u); - cpu->pc = 0xBFC0B648u; return; - } -label_BFC0C238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C238u); -#endif - /* 0xBFC0C238: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C238u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C23C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C240: 03E00008 jr $ra */ - psx_delay_BFC0C240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C244: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C244u); -#endif - if (psx_delay_BFC0C240) { - psx_delay_BFC0C240 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C248(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C248u); - int psx_delay_BFC0C258 = 0; - int psx_delay_BFC0C268 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C260u: goto label_BFC0C260; - default: break; - } - } -label_BFC0C248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C248: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C24C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C24Cu); return; } g_debug_last_store_pc = 0xBFC0C24Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C250: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C254: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C258: 0FF02D68 jal 0xBFC0B5A0 */ - cpu->gpr[31] = 0xBFC0C260u; /* jal link before delay slot */ - psx_delay_BFC0C258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C25C: AC2EB9D4 sw $t6, -17964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C25Cu); return; } g_debug_last_store_pc = 0xBFC0C25Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9D4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C25Cu); -#endif - if (psx_delay_BFC0C258) { - psx_delay_BFC0C258 = 0; - cpu->gpr[31] = 0xBFC0C260u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5A0u); - cpu->pc = 0xBFC0B5A0u; return; - } -label_BFC0C260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C260u); -#endif - /* 0xBFC0C260: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C260u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C264: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C268: 03E00008 jr $ra */ - psx_delay_BFC0C268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C26C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C26Cu); -#endif - if (psx_delay_BFC0C268) { - psx_delay_BFC0C268 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C270(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C270u); - int psx_delay_BFC0C280 = 0; - int psx_delay_BFC0C290 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C288u: goto label_BFC0C288; - default: break; - } - } -label_BFC0C270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C270: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C274: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C274u); return; } g_debug_last_store_pc = 0xBFC0C274u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C278: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C27C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C280: 0FF02D53 jal 0xBFC0B54C */ - cpu->gpr[31] = 0xBFC0C288u; /* jal link before delay slot */ - psx_delay_BFC0C280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C284: AC2EB9D8 sw $t6, -17960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C284u); return; } g_debug_last_store_pc = 0xBFC0C284u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9D8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C284u); -#endif - if (psx_delay_BFC0C280) { - psx_delay_BFC0C280 = 0; - cpu->gpr[31] = 0xBFC0C288u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B54Cu); - cpu->pc = 0xBFC0B54Cu; return; - } -label_BFC0C288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C288u); -#endif - /* 0xBFC0C288: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C288u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C28C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C290: 03E00008 jr $ra */ - psx_delay_BFC0C290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C294u); -#endif - if (psx_delay_BFC0C290) { - psx_delay_BFC0C290 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C298(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C298u); - int psx_delay_BFC0C2A8 = 0; - int psx_delay_BFC0C2B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C2B0u: goto label_BFC0C2B0; - default: break; - } - } -label_BFC0C298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C298: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C29C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C29Cu); return; } g_debug_last_store_pc = 0xBFC0C29Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C2A0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C2A4: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C2A8: 0FF02D7D jal 0xBFC0B5F4 */ - cpu->gpr[31] = 0xBFC0C2B0u; /* jal link before delay slot */ - psx_delay_BFC0C2A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C2AC: AC2EB9DC sw $t6, -17956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2ACu); return; } g_debug_last_store_pc = 0xBFC0C2ACu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9DCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2ACu); -#endif - if (psx_delay_BFC0C2A8) { - psx_delay_BFC0C2A8 = 0; - cpu->gpr[31] = 0xBFC0C2B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B5F4u); - cpu->pc = 0xBFC0B5F4u; return; - } -label_BFC0C2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2B0u); -#endif - /* 0xBFC0C2B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C2B4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C2B8: 03E00008 jr $ra */ - psx_delay_BFC0C2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C2BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2BCu); -#endif - if (psx_delay_BFC0C2B8) { - psx_delay_BFC0C2B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C2C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C2C0u); - int psx_delay_BFC0C2D0 = 0; - int psx_delay_BFC0C2E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C2D8u: goto label_BFC0C2D8; - default: break; - } - } -label_BFC0C2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C2C0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C2C4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2C4u); return; } g_debug_last_store_pc = 0xBFC0C2C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C2C8: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C2CC: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C2D0: 0FF02CE5 jal 0xBFC0B394 */ - cpu->gpr[31] = 0xBFC0C2D8u; /* jal link before delay slot */ - psx_delay_BFC0C2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C2D4: AC2EB9E0 sw $t6, -17952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2D4u); return; } g_debug_last_store_pc = 0xBFC0C2D4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EB9E0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2D4u); -#endif - if (psx_delay_BFC0C2D0) { - psx_delay_BFC0C2D0 = 0; - cpu->gpr[31] = 0xBFC0C2D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0B394u); - cpu->pc = 0xBFC0B394u; return; - } -label_BFC0C2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2D8u); -#endif - /* 0xBFC0C2D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C2DC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C2E0: 03E00008 jr $ra */ - psx_delay_BFC0C2E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C2E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2E4u); -#endif - if (psx_delay_BFC0C2E0) { - psx_delay_BFC0C2E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C2E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C2E8u); - int psx_delay_BFC0C2F0 = 0; - int psx_delay_BFC0C2F8 = 0; - int psx_delay_BFC0C300 = 0; - int psx_delay_BFC0C310 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C2F8u: goto label_BFC0C2F8; - case 0xBFC0C300u: goto label_BFC0C300; - case 0xBFC0C308u: goto label_BFC0C308; - default: break; - } - } -label_BFC0C2E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C2E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C2E8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C2EC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C2ECu); return; } g_debug_last_store_pc = 0xBFC0C2ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C2F0: 0FF03694 jal 0xBFC0DA50 */ - cpu->gpr[31] = 0xBFC0C2F8u; /* jal link before delay slot */ - psx_delay_BFC0C2F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0C2F4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2F4u); -#endif - if (psx_delay_BFC0C2F0) { - psx_delay_BFC0C2F0 = 0; - cpu->gpr[31] = 0xBFC0C2F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA50u); - cpu->pc = 0xBFC0DA50u; return; - } -label_BFC0C2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C2F8: 0FF03698 jal 0xBFC0DA60 */ - cpu->gpr[31] = 0xBFC0C300u; /* jal link before delay slot */ - psx_delay_BFC0C2F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C2FCu); -#endif - if (psx_delay_BFC0C2F8) { - psx_delay_BFC0C2F8 = 0; - cpu->gpr[31] = 0xBFC0C300u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA60u); - cpu->pc = 0xBFC0DA60u; return; - } -label_BFC0C300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C300: 0FF02645 jal 0xBFC09914 */ - cpu->gpr[31] = 0xBFC0C308u; /* jal link before delay slot */ - psx_delay_BFC0C300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C304u); -#endif - if (psx_delay_BFC0C300) { - psx_delay_BFC0C300 = 0; - cpu->gpr[31] = 0xBFC0C308u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09914u); - cpu->pc = 0xBFC09914u; return; - } -label_BFC0C308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C308u); -#endif - /* 0xBFC0C308: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C308u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C30C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C310: 03E00008 jr $ra */ - psx_delay_BFC0C310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C314u); -#endif - if (psx_delay_BFC0C310) { - psx_delay_BFC0C310 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C318(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C318u); - int psx_delay_BFC0C324 = 0; - int psx_delay_BFC0C334 = 0; - int psx_delay_BFC0C33C = 0; - int psx_delay_BFC0C34C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C32Cu: goto label_BFC0C32C; - case 0xBFC0C33Cu: goto label_BFC0C33C; - case 0xBFC0C344u: goto label_BFC0C344; - default: break; - } - } -label_BFC0C318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C318: 27BDFF68 addiu $sp, $sp, -152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-152)); - PGXP_ALU(0x27BDFF68u, cpu->gpr[29], _pgx1, 0xFFFFFF68u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C31C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C31Cu); return; } g_debug_last_store_pc = 0xBFC0C31Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C320: 27A40018 addiu $a0, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A40018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C324: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0C32Cu; /* jal link before delay slot */ - psx_delay_BFC0C324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C328: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C328u); -#endif - if (psx_delay_BFC0C324) { - psx_delay_BFC0C324 = 0; - cpu->gpr[31] = 0xBFC0C32Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0C32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0C32C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C330: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C334: 0FF03688 jal 0xBFC0DA20 */ - cpu->gpr[31] = 0xBFC0C33Cu; /* jal link before delay slot */ - psx_delay_BFC0C334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0C338: 27A60018 addiu $a2, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A60018u, cpu->gpr[6], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C338u); -#endif - if (psx_delay_BFC0C334) { - psx_delay_BFC0C334 = 0; - cpu->gpr[31] = 0xBFC0C33Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DA20u); - cpu->pc = 0xBFC0DA20u; return; - } -label_BFC0C33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C33C: 0FF02451 jal 0xBFC09144 */ - cpu->gpr[31] = 0xBFC0C344u; /* jal link before delay slot */ - psx_delay_BFC0C33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C340u); -#endif - if (psx_delay_BFC0C33C) { - psx_delay_BFC0C33C = 0; - cpu->gpr[31] = 0xBFC0C344u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC09144u); - cpu->pc = 0xBFC09144u; return; - } -label_BFC0C344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C344u); -#endif - /* 0xBFC0C344: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C344u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C348: 27BD0098 addiu $sp, $sp, 152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (152)); - PGXP_ALU(0x27BD0098u, cpu->gpr[29], _pgx1, 0x00000098u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C34C: 03E00008 jr $ra */ - psx_delay_BFC0C34C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C350: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C350u); -#endif - if (psx_delay_BFC0C34C) { - psx_delay_BFC0C34C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C354(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C354u); - int psx_delay_BFC0C364 = 0; - int psx_delay_BFC0C374 = 0; - int psx_delay_BFC0C384 = 0; - int psx_delay_BFC0C394 = 0; - int psx_delay_BFC0C3A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C36Cu: goto label_BFC0C36C; - case 0xBFC0C37Cu: goto label_BFC0C37C; - case 0xBFC0C38Cu: goto label_BFC0C38C; - case 0xBFC0C39Cu: goto label_BFC0C39C; - default: break; - } - } -label_BFC0C354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C354: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C358: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C358u); return; } g_debug_last_store_pc = 0xBFC0C358u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C35C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C360: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C364: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC0C36Cu; /* jal link before delay slot */ - psx_delay_BFC0C364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C368: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C368u); -#endif - if (psx_delay_BFC0C364) { - psx_delay_BFC0C364 = 0; - cpu->gpr[31] = 0xBFC0C36Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC0C36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C36C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C370: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C374: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC0C37Cu; /* jal link before delay slot */ - psx_delay_BFC0C374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C378: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C378u); -#endif - if (psx_delay_BFC0C374) { - psx_delay_BFC0C374 = 0; - cpu->gpr[31] = 0xBFC0C37Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC0C37C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C37Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C37C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C380: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C384: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC0C38Cu; /* jal link before delay slot */ - psx_delay_BFC0C384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C388: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C388u); -#endif - if (psx_delay_BFC0C384) { - psx_delay_BFC0C384 = 0; - cpu->gpr[31] = 0xBFC0C38Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC0C38C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C38Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C38C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C390: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C394: 0FF03664 jal 0xBFC0D990 */ - cpu->gpr[31] = 0xBFC0C39Cu; /* jal link before delay slot */ - psx_delay_BFC0C394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C398: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C398u); -#endif - if (psx_delay_BFC0C394) { - psx_delay_BFC0C394 = 0; - cpu->gpr[31] = 0xBFC0C39Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D990u); - cpu->pc = 0xBFC0D990u; return; - } -label_BFC0C39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C39Cu); -#endif - /* 0xBFC0C39C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C39Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C3A0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C3A4: 03E00008 jr $ra */ - psx_delay_BFC0C3A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C3A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C3A8u); -#endif - if (psx_delay_BFC0C3A4) { - psx_delay_BFC0C3A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C580(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C580u); - int psx_delay_BFC0C590 = 0; - int psx_delay_BFC0C5A4 = 0; - int psx_delay_BFC0C5AC = 0; - int psx_delay_BFC0C600 = 0; - int psx_taken_BFC0C600 = 0; - int psx_delay_BFC0C630 = 0; - int psx_taken_BFC0C630 = 0; - int psx_delay_BFC0C638 = 0; - int psx_delay_BFC0C640 = 0; - int psx_delay_BFC0C658 = 0; - int psx_taken_BFC0C658 = 0; - int psx_delay_BFC0C670 = 0; - int psx_delay_BFC0C694 = 0; - int psx_taken_BFC0C694 = 0; - int psx_delay_BFC0C69C = 0; - int psx_delay_BFC0C6B4 = 0; - int psx_taken_BFC0C6B4 = 0; - int psx_delay_BFC0C6CC = 0; - int psx_delay_BFC0C6F0 = 0; - int psx_taken_BFC0C6F0 = 0; - int psx_delay_BFC0C6F8 = 0; - int psx_delay_BFC0C700 = 0; - int psx_delay_BFC0C708 = 0; - int psx_taken_BFC0C708 = 0; - int psx_delay_BFC0C718 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C598u: goto label_BFC0C598; - case 0xBFC0C5ACu: goto label_BFC0C5AC; - case 0xBFC0C5B4u: goto label_BFC0C5B4; - case 0xBFC0C5F4u: goto label_BFC0C5F4; - case 0xBFC0C608u: goto label_BFC0C608; - case 0xBFC0C60Cu: goto label_BFC0C60C; - case 0xBFC0C638u: goto label_BFC0C638; - case 0xBFC0C640u: goto label_BFC0C640; - case 0xBFC0C648u: goto label_BFC0C648; - case 0xBFC0C660u: goto label_BFC0C660; - case 0xBFC0C664u: goto label_BFC0C664; - case 0xBFC0C678u: goto label_BFC0C678; - case 0xBFC0C69Cu: goto label_BFC0C69C; - case 0xBFC0C6A4u: goto label_BFC0C6A4; - case 0xBFC0C6BCu: goto label_BFC0C6BC; - case 0xBFC0C6C0u: goto label_BFC0C6C0; - case 0xBFC0C6D4u: goto label_BFC0C6D4; - case 0xBFC0C6F8u: goto label_BFC0C6F8; - case 0xBFC0C700u: goto label_BFC0C700; - case 0xBFC0C708u: goto label_BFC0C708; - case 0xBFC0C710u: goto label_BFC0C710; - default: break; - } - } -label_BFC0C580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C580: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C584: AFA40050 sw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C584u); return; } g_debug_last_store_pc = 0xBFC0C584u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C588: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C588u); return; } g_debug_last_store_pc = 0xBFC0C588u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C58C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C590: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C598u; /* jal link before delay slot */ - psx_delay_BFC0C590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C594: 2484E4B0 addiu $a0, $a0, -6992 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6992)); - PGXP_ALU(0x2484E4B0u, cpu->gpr[4], _pgx1, 0xFFFFE4B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C594u); -#endif - if (psx_delay_BFC0C590) { - psx_delay_BFC0C590 = 0; - cpu->gpr[31] = 0xBFC0C598u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C598: 27A40038 addiu $a0, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A40038u, cpu->gpr[4], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C59C: 2405000A addiu $a1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2405000Au, cpu->gpr[5], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0C5A0: 27A6002C addiu $a2, $sp, 44 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (44)); - PGXP_ALU(0x27A6002Cu, cpu->gpr[6], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C5A4: 0FF036A8 jal 0xBFC0DAA0 */ - cpu->gpr[31] = 0xBFC0C5ACu; /* jal link before delay slot */ - psx_delay_BFC0C5A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC0C5A8: 2407000A addiu $a3, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2407000Au, cpu->gpr[7], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5A8u); -#endif - if (psx_delay_BFC0C5A4) { - psx_delay_BFC0C5A4 = 0; - cpu->gpr[31] = 0xBFC0C5ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAA0u); - cpu->pc = 0xBFC0DAA0u; return; - } -label_BFC0C5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C5AC: 0FF036AC jal 0xBFC0DAB0 */ - cpu->gpr[31] = 0xBFC0C5B4u; /* jal link before delay slot */ - psx_delay_BFC0C5AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C5B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5B0u); -#endif - if (psx_delay_BFC0C5AC) { - psx_delay_BFC0C5AC = 0; - cpu->gpr[31] = 0xBFC0C5B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAB0u); - cpu->pc = 0xBFC0DAB0u; return; - } -label_BFC0C5B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C5B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0C5B4: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5B4u); return; } g_debug_last_store_pc = 0xBFC0C5B4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0C5B8: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5B8u); return; } g_debug_last_store_pc = 0xBFC0C5B8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0C5BC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5BCu); return; } g_debug_last_store_pc = 0xBFC0C5BCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0C5C0: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5C0u); return; } g_debug_last_store_pc = 0xBFC0C5C0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0C5C4: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5C4u); return; } g_debug_last_store_pc = 0xBFC0C5C4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC0C5C8: 3C14BFC1 lui $s4, 0xBFC1 */ - cpu->gpr[20] = 0xBFC10000u; - PGXP_ALU(0x3C14BFC1u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC0C5CC: 3C13BFC1 lui $s3, 0xBFC1 */ - cpu->gpr[19] = 0xBFC10000u; - PGXP_ALU(0x3C13BFC1u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0C5D0: 3C12BFC1 lui $s2, 0xBFC1 */ - cpu->gpr[18] = 0xBFC10000u; - PGXP_ALU(0x3C12BFC1u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0C5D4: 3C11BFC1 lui $s1, 0xBFC1 */ - cpu->gpr[17] = 0xBFC10000u; - PGXP_ALU(0x3C11BFC1u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0C5D8: 3C10BFC1 lui $s0, 0xBFC1 */ - cpu->gpr[16] = 0xBFC10000u; - PGXP_ALU(0x3C10BFC1u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0C5DC: 2610E4D4 addiu $s0, $s0, -6956 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-6956)); - PGXP_ALU(0x2610E4D4u, cpu->gpr[16], _pgx1, 0xFFFFE4D4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0C5E0: 2631E4E4 addiu $s1, $s1, -6940 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-6940)); - PGXP_ALU(0x2631E4E4u, cpu->gpr[17], _pgx1, 0xFFFFE4E4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0C5E4: 2652E4D0 addiu $s2, $s2, -6960 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-6960)); - PGXP_ALU(0x2652E4D0u, cpu->gpr[18], _pgx1, 0xFFFFE4D0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC0C5E8: 2673E4DC addiu $s3, $s3, -6948 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-6948)); - PGXP_ALU(0x2673E4DCu, cpu->gpr[19], _pgx1, 0xFFFFE4DCu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC0C5EC: 2694E4EC addiu $s4, $s4, -6932 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-6932)); - PGXP_ALU(0x2694E4ECu, cpu->gpr[20], _pgx1, 0xFFFFE4ECu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C5F0: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5F0u); return; } g_debug_last_store_pc = 0xBFC0C5F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5F0u); -#endif -label_BFC0C5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5F4u); -#endif - /* 0xBFC0C5F4: 8FAE0044 lw $t6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C5F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0044u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C5F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C5FC: 29C12710 slti $at, $t6, 10000 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10000) ? 1 : 0); - PGXP_ALU(0x29C12710u, cpu->gpr[1], _pgx1, 0x2710u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C600: 1020000D beq $at, $zero, 0xBFC0C638 */ - uint32_t psx_brA_BFC0C600 = cpu->gpr[1]; uint32_t psx_brB_BFC0C600 = cpu->gpr[0]; - psx_taken_BFC0C600 = (psx_brA_BFC0C600 == psx_brB_BFC0C600); - psx_delay_BFC0C600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C604u); -#endif - if (psx_delay_BFC0C600) { - psx_delay_BFC0C600 = 0; - if (psx_taken_BFC0C600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C638u); - goto label_BFC0C638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C608u); - } -label_BFC0C608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C608u); -#endif - /* 0xBFC0C608: 8FAF0044 lw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C608u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C608u); -#endif -label_BFC0C60C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C60Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C60C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0C610: AFAF0044 sw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C610u); return; } g_debug_last_store_pc = 0xBFC0C610u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C614u); -#endif - /* 0xBFC0C614: 8FB80044 lw $t8, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C614u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80044u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C618: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0C61C: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0C620: AFB90044 sw $t9, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C620u); return; } g_debug_last_store_pc = 0xBFC0C620u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C624u); -#endif - /* 0xBFC0C624: 8FA80044 lw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C624u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0C62C: 29012710 slti $at, $t0, 10000 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10000) ? 1 : 0); - PGXP_ALU(0x29012710u, cpu->gpr[1], _pgx1, 0x2710u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C630: 1420FFF6 bne $at, $zero, 0xBFC0C60C */ - uint32_t psx_brA_BFC0C630 = cpu->gpr[1]; uint32_t psx_brB_BFC0C630 = cpu->gpr[0]; - psx_taken_BFC0C630 = (psx_brA_BFC0C630 != psx_brB_BFC0C630); - psx_delay_BFC0C630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C634u); -#endif - /* 0xBFC0C634: 8FAF0044 lw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C634u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C634u); -#endif - if (psx_delay_BFC0C630) { - psx_delay_BFC0C630 = 0; - if (psx_taken_BFC0C630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C60Cu); - goto label_BFC0C60C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C638u); - } -label_BFC0C638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C638: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC0C640u; /* jal link before delay slot */ - psx_delay_BFC0C638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C63C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C63Cu); -#endif - if (psx_delay_BFC0C638) { - psx_delay_BFC0C638 = 0; - cpu->gpr[31] = 0xBFC0C640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC0C640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C640: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C648u; /* jal link before delay slot */ - psx_delay_BFC0C640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0C644: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C644u); -#endif - if (psx_delay_BFC0C640) { - psx_delay_BFC0C640 = 0; - cpu->gpr[31] = 0xBFC0C648u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C648: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C648u); return; } g_debug_last_store_pc = 0xBFC0C648u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C64Cu); -#endif - /* 0xBFC0C64C: 8FA90044 lw $t1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C64Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90044u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC0C654: 2921000A slti $at, $t1, 10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (10) ? 1 : 0); - PGXP_ALU(0x2921000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C658: 10200010 beq $at, $zero, 0xBFC0C69C */ - uint32_t psx_brA_BFC0C658 = cpu->gpr[1]; uint32_t psx_brB_BFC0C658 = cpu->gpr[0]; - psx_taken_BFC0C658 = (psx_brA_BFC0C658 == psx_brB_BFC0C658); - psx_delay_BFC0C658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C65C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C65Cu); -#endif - if (psx_delay_BFC0C658) { - psx_delay_BFC0C658 = 0; - if (psx_taken_BFC0C658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C69Cu); - goto label_BFC0C69C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C660u); - } -label_BFC0C660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C660u); -#endif - /* 0xBFC0C660: 8FAA0044 lw $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C660u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C660u); -#endif -label_BFC0C664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0C664: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000420u); -#endif - /* 0xBFC0C668: 03AA2821 addu $a1, $sp, $t2 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[29] + cpu->gpr[10]; - PGXP_ALU(0x03AA2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C66Cu); -#endif - /* 0xBFC0C66C: 90A50038 lbu $a1, 56($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 56; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (56)), 5, 0x20u); - PGXP_LOAD(0x90A50038u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C670: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C678u; /* jal link before delay slot */ - psx_delay_BFC0C670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C674u); -#endif - if (psx_delay_BFC0C670) { - psx_delay_BFC0C670 = 0; - cpu->gpr[31] = 0xBFC0C678u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C678u); -#endif - /* 0xBFC0C678: 8FAB0044 lw $t3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C678u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0044u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C67C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0C680: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0C684: AFAC0044 sw $t4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C684u); return; } g_debug_last_store_pc = 0xBFC0C684u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0044u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C688u); -#endif - /* 0xBFC0C688: 8FAD0044 lw $t5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C688u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0044u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C68C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC0C690: 29A1000A slti $at, $t5, 10 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (10) ? 1 : 0); - PGXP_ALU(0x29A1000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C694: 1420FFF3 bne $at, $zero, 0xBFC0C664 */ - uint32_t psx_brA_BFC0C694 = cpu->gpr[1]; uint32_t psx_brB_BFC0C694 = cpu->gpr[0]; - psx_taken_BFC0C694 = (psx_brA_BFC0C694 != psx_brB_BFC0C694); - psx_delay_BFC0C694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C698u); -#endif - /* 0xBFC0C698: 8FAA0044 lw $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C698u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C698u); -#endif - if (psx_delay_BFC0C694) { - psx_delay_BFC0C694 = 0; - if (psx_taken_BFC0C694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C664u); - goto label_BFC0C664; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C69Cu); - } -label_BFC0C69C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C69Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C69C: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C6A4u; /* jal link before delay slot */ - psx_delay_BFC0C69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC0C6A0: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6A0u); -#endif - if (psx_delay_BFC0C69C) { - psx_delay_BFC0C69C = 0; - cpu->gpr[31] = 0xBFC0C6A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C6A4: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6A4u); return; } g_debug_last_store_pc = 0xBFC0C6A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6A8u); -#endif - /* 0xBFC0C6A8: 8FAE0044 lw $t6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6A8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0044u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C6AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0C6B0: 29C1000A slti $at, $t6, 10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (10) ? 1 : 0); - PGXP_ALU(0x29C1000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C6B4: 10200010 beq $at, $zero, 0xBFC0C6F8 */ - uint32_t psx_brA_BFC0C6B4 = cpu->gpr[1]; uint32_t psx_brB_BFC0C6B4 = cpu->gpr[0]; - psx_taken_BFC0C6B4 = (psx_brA_BFC0C6B4 == psx_brB_BFC0C6B4); - psx_delay_BFC0C6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C6B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6B8u); -#endif - if (psx_delay_BFC0C6B4) { - psx_delay_BFC0C6B4 = 0; - if (psx_taken_BFC0C6B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C6F8u); - goto label_BFC0C6F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C6BCu); - } -label_BFC0C6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6BCu); -#endif - /* 0xBFC0C6BC: 8FAF0044 lw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6BCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6BCu); -#endif -label_BFC0C6C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C6C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0C6C0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008020u); -#endif - /* 0xBFC0C6C4: 03AF2821 addu $a1, $sp, $t7 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[29] + cpu->gpr[15]; - PGXP_ALU(0x03AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6C8u); -#endif - /* 0xBFC0C6C8: 90A5002C lbu $a1, 44($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 44; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (44)), 5, 0x20u); - PGXP_LOAD(0x90A5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C6CC: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C6D4u; /* jal link before delay slot */ - psx_delay_BFC0C6CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C6D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6D0u); -#endif - if (psx_delay_BFC0C6CC) { - psx_delay_BFC0C6CC = 0; - cpu->gpr[31] = 0xBFC0C6D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C6D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C6D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6D4u); -#endif - /* 0xBFC0C6D4: 8FB80044 lw $t8, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6D4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80044u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C6D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0C6DC: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0C6E0: AFB90044 sw $t9, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6E0u); return; } g_debug_last_store_pc = 0xBFC0C6E0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6E4u); -#endif - /* 0xBFC0C6E4: 8FA80044 lw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6E4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C6E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0C6EC: 2901000A slti $at, $t0, 10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (10) ? 1 : 0); - PGXP_ALU(0x2901000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C6F0: 1420FFF3 bne $at, $zero, 0xBFC0C6C0 */ - uint32_t psx_brA_BFC0C6F0 = cpu->gpr[1]; uint32_t psx_brB_BFC0C6F0 = cpu->gpr[0]; - psx_taken_BFC0C6F0 = (psx_brA_BFC0C6F0 != psx_brB_BFC0C6F0); - psx_delay_BFC0C6F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6F4u); -#endif - /* 0xBFC0C6F4: 8FAF0044 lw $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C6F4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6F4u); -#endif - if (psx_delay_BFC0C6F0) { - psx_delay_BFC0C6F0 = 0; - if (psx_taken_BFC0C6F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C6C0u); - goto label_BFC0C6C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C6F8u); - } -label_BFC0C6F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C6F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C6F8: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C700u; /* jal link before delay slot */ - psx_delay_BFC0C6F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC0C6FC: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C6FCu); -#endif - if (psx_delay_BFC0C6F8) { - psx_delay_BFC0C6F8 = 0; - cpu->gpr[31] = 0xBFC0C700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C700: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC0C708u; /* jal link before delay slot */ - psx_delay_BFC0C700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C704u); -#endif - if (psx_delay_BFC0C700) { - psx_delay_BFC0C700 = 0; - cpu->gpr[31] = 0xBFC0C708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC0C708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C708: 1000FFBA beq $zero, $zero, 0xBFC0C5F4 */ - uint32_t psx_brA_BFC0C708 = cpu->gpr[0]; uint32_t psx_brB_BFC0C708 = cpu->gpr[0]; - psx_taken_BFC0C708 = (psx_brA_BFC0C708 == psx_brB_BFC0C708); - psx_delay_BFC0C708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C70C: AFA00044 sw $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C70Cu); return; } g_debug_last_store_pc = 0xBFC0C70Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C70Cu); -#endif - if (psx_delay_BFC0C708) { - psx_delay_BFC0C708 = 0; - if (psx_taken_BFC0C708) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C5F4u); - goto label_BFC0C5F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C710u); - } -label_BFC0C710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C710u); -#endif - /* 0xBFC0C710: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C710u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C714: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C718: 03E00008 jr $ra */ - psx_delay_BFC0C718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C71C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C71Cu); -#endif - if (psx_delay_BFC0C718) { - psx_delay_BFC0C718 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C720(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C720u); - int psx_delay_BFC0C730 = 0; - int psx_delay_BFC0C748 = 0; - int psx_delay_BFC0C750 = 0; - int psx_taken_BFC0C750 = 0; - int psx_delay_BFC0C79C = 0; - int psx_taken_BFC0C79C = 0; - int psx_delay_BFC0C7CC = 0; - int psx_taken_BFC0C7CC = 0; - int psx_delay_BFC0C7D4 = 0; - int psx_delay_BFC0C7DC = 0; - int psx_delay_BFC0C7E8 = 0; - int psx_delay_BFC0C7F4 = 0; - int psx_delay_BFC0C7FC = 0; - int psx_delay_BFC0C804 = 0; - int psx_delay_BFC0C80C = 0; - int psx_taken_BFC0C80C = 0; - int psx_delay_BFC0C81C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C738u: goto label_BFC0C738; - case 0xBFC0C750u: goto label_BFC0C750; - case 0xBFC0C758u: goto label_BFC0C758; - case 0xBFC0C790u: goto label_BFC0C790; - case 0xBFC0C7A4u: goto label_BFC0C7A4; - case 0xBFC0C7A8u: goto label_BFC0C7A8; - case 0xBFC0C7D4u: goto label_BFC0C7D4; - case 0xBFC0C7DCu: goto label_BFC0C7DC; - case 0xBFC0C7E4u: goto label_BFC0C7E4; - case 0xBFC0C7F0u: goto label_BFC0C7F0; - case 0xBFC0C7FCu: goto label_BFC0C7FC; - case 0xBFC0C804u: goto label_BFC0C804; - case 0xBFC0C80Cu: goto label_BFC0C80C; - case 0xBFC0C814u: goto label_BFC0C814; - case 0xBFC0C818u: goto label_BFC0C818; - default: break; - } - } -label_BFC0C720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C720: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C724: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C724u); return; } g_debug_last_store_pc = 0xBFC0C724u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C728: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C728u); return; } g_debug_last_store_pc = 0xBFC0C728u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C72C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C730: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C738u; /* jal link before delay slot */ - psx_delay_BFC0C730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C734: 2484E4F0 addiu $a0, $a0, -6928 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6928)); - PGXP_ALU(0x2484E4F0u, cpu->gpr[4], _pgx1, 0xFFFFE4F0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C734u); -#endif - if (psx_delay_BFC0C730) { - psx_delay_BFC0C730 = 0; - cpu->gpr[31] = 0xBFC0C738u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C738: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C73C: 3C042000 lui $a0, 0x2000 */ - cpu->gpr[4] = 0x20000000u; - PGXP_ALU(0x3C042000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC0C740: AFAE0038 sw $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C740u); return; } g_debug_last_store_pc = 0xBFC0C740u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C744: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C748: 0FF036B0 jal 0xBFC0DAC0 */ - cpu->gpr[31] = 0xBFC0C750u; /* jal link before delay slot */ - psx_delay_BFC0C748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0C74C: 27A50038 addiu $a1, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A50038u, cpu->gpr[5], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C74Cu); -#endif - if (psx_delay_BFC0C748) { - psx_delay_BFC0C748 = 0; - cpu->gpr[31] = 0xBFC0C750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAC0u); - cpu->pc = 0xBFC0DAC0u; return; - } -label_BFC0C750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0C750: 10400031 beq $v0, $zero, 0xBFC0C818 */ - uint32_t psx_brA_BFC0C750 = cpu->gpr[2]; uint32_t psx_brB_BFC0C750 = cpu->gpr[0]; - psx_taken_BFC0C750 = (psx_brA_BFC0C750 == psx_brB_BFC0C750); - psx_delay_BFC0C750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C754u); -#endif - /* 0xBFC0C754: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C754u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C754u); -#endif - if (psx_delay_BFC0C750) { - psx_delay_BFC0C750 = 0; - if (psx_taken_BFC0C750) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C818u); - goto label_BFC0C818; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C758u); - } -label_BFC0C758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0C758: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C758u); return; } g_debug_last_store_pc = 0xBFC0C758u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0C75C: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C75Cu); return; } g_debug_last_store_pc = 0xBFC0C75Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0C760: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C760u); return; } g_debug_last_store_pc = 0xBFC0C760u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC0C764: AFB4001C sw $s4, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C764u); return; } g_debug_last_store_pc = 0xBFC0C764u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC0C768: 3C14BFC1 lui $s4, 0xBFC1 */ - cpu->gpr[20] = 0xBFC10000u; - PGXP_ALU(0x3C14BFC1u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC0C76C: 3C13BFC1 lui $s3, 0xBFC1 */ - cpu->gpr[19] = 0xBFC10000u; - PGXP_ALU(0x3C13BFC1u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0C770: 3C12BFC1 lui $s2, 0xBFC1 */ - cpu->gpr[18] = 0xBFC10000u; - PGXP_ALU(0x3C12BFC1u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0C774: 3C110001 lui $s1, 0x1 */ - cpu->gpr[17] = 0x00010000u; - PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0C778: 363186A0 ori $s1, $s1, 0x86A0 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x86A0u; - PGXP_ALU(0x363186A0u, cpu->gpr[17], _pgx1, 0x86A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0C77C: 2652E50C addiu $s2, $s2, -6900 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-6900)); - PGXP_ALU(0x2652E50Cu, cpu->gpr[18], _pgx1, 0xFFFFE50Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC0C780: 2673E520 addiu $s3, $s3, -6880 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-6880)); - PGXP_ALU(0x2673E520u, cpu->gpr[19], _pgx1, 0xFFFFE520u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC0C784: 2694E528 addiu $s4, $s4, -6872 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-6872)); - PGXP_ALU(0x2694E528u, cpu->gpr[20], _pgx1, 0xFFFFE528u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0C788: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C788u); return; } g_debug_last_store_pc = 0xBFC0C788u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C78C: AFA00034 sw $zero, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C78Cu); return; } g_debug_last_store_pc = 0xBFC0C78Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C78Cu); -#endif -label_BFC0C790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C790u); -#endif - /* 0xBFC0C790: 8FAF0034 lw $t7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C790u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0034u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28002u); -#endif - /* 0xBFC0C798: 01F1082A slt $at, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x01F1082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C79C: 1020000D beq $at, $zero, 0xBFC0C7D4 */ - uint32_t psx_brA_BFC0C79C = cpu->gpr[1]; uint32_t psx_brB_BFC0C79C = cpu->gpr[0]; - psx_taken_BFC0C79C = (psx_brA_BFC0C79C == psx_brB_BFC0C79C); - psx_delay_BFC0C79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C7A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7A0u); -#endif - if (psx_delay_BFC0C79C) { - psx_delay_BFC0C79C = 0; - if (psx_taken_BFC0C79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C7D4u); - goto label_BFC0C7D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C7A4u); - } -label_BFC0C7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7A4u); -#endif - /* 0xBFC0C7A4: 8FB80034 lw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7A4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7A4u); -#endif -label_BFC0C7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C7A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC0C7AC: AFB80034 sw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7ACu); return; } g_debug_last_store_pc = 0xBFC0C7ACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7B0u); -#endif - /* 0xBFC0C7B0: 8FB90034 lw $t9, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7B0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C7B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0C7B8: 27280001 addiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27280001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0C7BC: AFA80034 sw $t0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7BCu); return; } g_debug_last_store_pc = 0xBFC0C7BCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80034u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7C0u); -#endif - /* 0xBFC0C7C0: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7C0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C7C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20202u); -#endif - /* 0xBFC0C7C8: 0131082A slt $at, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0131082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C7CC: 1420FFF6 bne $at, $zero, 0xBFC0C7A8 */ - uint32_t psx_brA_BFC0C7CC = cpu->gpr[1]; uint32_t psx_brB_BFC0C7CC = cpu->gpr[0]; - psx_taken_BFC0C7CC = (psx_brA_BFC0C7CC != psx_brB_BFC0C7CC); - psx_delay_BFC0C7CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7D0u); -#endif - /* 0xBFC0C7D0: 8FB80034 lw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7D0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7D0u); -#endif - if (psx_delay_BFC0C7CC) { - psx_delay_BFC0C7CC = 0; - if (psx_taken_BFC0C7CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C7A8u); - goto label_BFC0C7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C7D4u); - } -label_BFC0C7D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C7D4: 0FF036B4 jal 0xBFC0DAD0 */ - cpu->gpr[31] = 0xBFC0C7DCu; /* jal link before delay slot */ - psx_delay_BFC0C7D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C7D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7D8u); -#endif - if (psx_delay_BFC0C7D4) { - psx_delay_BFC0C7D4 = 0; - cpu->gpr[31] = 0xBFC0C7DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DAD0u); - cpu->pc = 0xBFC0DAD0u; return; - } -label_BFC0C7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C7DC: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC0C7E4u; /* jal link before delay slot */ - psx_delay_BFC0C7DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC0C7E0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7E0u); -#endif - if (psx_delay_BFC0C7DC) { - psx_delay_BFC0C7DC = 0; - cpu->gpr[31] = 0xBFC0C7E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC0C7E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC0C7E4: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C7E8: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C7F0u; /* jal link before delay slot */ - psx_delay_BFC0C7E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC0C7EC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7ECu); -#endif - if (psx_delay_BFC0C7E8) { - psx_delay_BFC0C7E8 = 0; - cpu->gpr[31] = 0xBFC0C7F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C7F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7F0u); -#endif - /* 0xBFC0C7F0: 8FA50038 lw $a1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C7F0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50038u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C7F4: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C7FCu; /* jal link before delay slot */ - psx_delay_BFC0C7F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC0C7F8: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C7F8u); -#endif - if (psx_delay_BFC0C7F4) { - psx_delay_BFC0C7F4 = 0; - cpu->gpr[31] = 0xBFC0C7FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C7FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C7FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C7FC: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0C804u; /* jal link before delay slot */ - psx_delay_BFC0C7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC0C800: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C800u); -#endif - if (psx_delay_BFC0C7FC) { - psx_delay_BFC0C7FC = 0; - cpu->gpr[31] = 0xBFC0C804u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0C804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C804: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC0C80Cu; /* jal link before delay slot */ - psx_delay_BFC0C804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C808u); -#endif - if (psx_delay_BFC0C804) { - psx_delay_BFC0C804 = 0; - cpu->gpr[31] = 0xBFC0C80Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC0C80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C80C: 1000FFE0 beq $zero, $zero, 0xBFC0C790 */ - uint32_t psx_brA_BFC0C80C = cpu->gpr[0]; uint32_t psx_brB_BFC0C80C = cpu->gpr[0]; - psx_taken_BFC0C80C = (psx_brA_BFC0C80C == psx_brB_BFC0C80C); - psx_delay_BFC0C80C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0C810: AFA00034 sw $zero, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C810u); return; } g_debug_last_store_pc = 0xBFC0C810u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C810u); -#endif - if (psx_delay_BFC0C80C) { - psx_delay_BFC0C80C = 0; - if (psx_taken_BFC0C80C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C790u); - goto label_BFC0C790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C814u); - } -label_BFC0C814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C814u); -#endif - /* 0xBFC0C814: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C814u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C814u); -#endif -label_BFC0C818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C818: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C81C: 03E00008 jr $ra */ - psx_delay_BFC0C81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C820u); -#endif - if (psx_delay_BFC0C81C) { - psx_delay_BFC0C81C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C830(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C830u); - int psx_delay_BFC0C84C = 0; - int psx_delay_BFC0C858 = 0; - int psx_taken_BFC0C858 = 0; - int psx_delay_BFC0C860 = 0; - int psx_delay_BFC0C86C = 0; - int psx_delay_BFC0C880 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C84Cu: goto label_BFC0C84C; - case 0xBFC0C854u: goto label_BFC0C854; - case 0xBFC0C860u: goto label_BFC0C860; - case 0xBFC0C868u: goto label_BFC0C868; - case 0xBFC0C874u: goto label_BFC0C874; - default: break; - } - } -label_BFC0C830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C830: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0C834: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C834u); return; } g_debug_last_store_pc = 0xBFC0C834u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0C838: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C838u); return; } g_debug_last_store_pc = 0xBFC0C838u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C83C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C83Cu); return; } g_debug_last_store_pc = 0xBFC0C83Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0C840: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C840u); return; } g_debug_last_store_pc = 0xBFC0C840u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0C844: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0C848: 24110010 addiu $s1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24110010u, cpu->gpr[17], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C848u); -#endif -label_BFC0C84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C84C: 0FF03628 jal 0xBFC0D8A0 */ - cpu->gpr[31] = 0xBFC0C854u; /* jal link before delay slot */ - psx_delay_BFC0C84C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0C850: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C850u); -#endif - if (psx_delay_BFC0C84C) { - psx_delay_BFC0C84C = 0; - cpu->gpr[31] = 0xBFC0C854u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8A0u); - cpu->pc = 0xBFC0D8A0u; return; - } -label_BFC0C854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0C854: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0C858: 1611FFFC bne $s0, $s1, 0xBFC0C84C */ - uint32_t psx_brA_BFC0C858 = cpu->gpr[16]; uint32_t psx_brB_BFC0C858 = cpu->gpr[17]; - psx_taken_BFC0C858 = (psx_brA_BFC0C858 != psx_brB_BFC0C858); - psx_delay_BFC0C858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C85C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C85Cu); -#endif - if (psx_delay_BFC0C858) { - psx_delay_BFC0C858 = 0; - if (psx_taken_BFC0C858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C84Cu); - goto label_BFC0C84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C860u); - } -label_BFC0C860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C860: 0FF036E8 jal 0xBFC0DBA0 */ - cpu->gpr[31] = 0xBFC0C868u; /* jal link before delay slot */ - psx_delay_BFC0C860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0C864: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C864u); -#endif - if (psx_delay_BFC0C860) { - psx_delay_BFC0C860 = 0; - cpu->gpr[31] = 0xBFC0C868u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBA0u); - cpu->pc = 0xBFC0DBA0u; return; - } -label_BFC0C868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C868u); -#endif - /* 0xBFC0C868: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C868u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C86C: 0FF03634 jal 0xBFC0D8D0 */ - cpu->gpr[31] = 0xBFC0C874u; /* jal link before delay slot */ - psx_delay_BFC0C86C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C870u); -#endif - if (psx_delay_BFC0C86C) { - psx_delay_BFC0C86C = 0; - cpu->gpr[31] = 0xBFC0C874u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8D0u); - cpu->pc = 0xBFC0D8D0u; return; - } -label_BFC0C874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C874u); -#endif - /* 0xBFC0C874: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C874u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C878u); -#endif - /* 0xBFC0C878: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C878u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C87Cu); -#endif - /* 0xBFC0C87C: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C87Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C880: 03E00008 jr $ra */ - psx_delay_BFC0C880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C884: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C884u); -#endif - if (psx_delay_BFC0C880) { - psx_delay_BFC0C880 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C890(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C890u); - int psx_delay_BFC0C8A8 = 0; - int psx_delay_BFC0C8B8 = 0; - int psx_delay_BFC0C8C8 = 0; - int psx_delay_BFC0C8E8 = 0; - int psx_delay_BFC0C8F4 = 0; - int psx_delay_BFC0C900 = 0; - int psx_delay_BFC0C90C = 0; - int psx_delay_BFC0C918 = 0; - int psx_delay_BFC0C93C = 0; - int psx_delay_BFC0C948 = 0; - int psx_delay_BFC0C954 = 0; - int psx_delay_BFC0C960 = 0; - int psx_delay_BFC0C96C = 0; - int psx_delay_BFC0C98C = 0; - int psx_delay_BFC0C9AC = 0; - int psx_delay_BFC0C9C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C8B0u: goto label_BFC0C8B0; - case 0xBFC0C8C0u: goto label_BFC0C8C0; - case 0xBFC0C8D0u: goto label_BFC0C8D0; - case 0xBFC0C8F0u: goto label_BFC0C8F0; - case 0xBFC0C8FCu: goto label_BFC0C8FC; - case 0xBFC0C908u: goto label_BFC0C908; - case 0xBFC0C914u: goto label_BFC0C914; - case 0xBFC0C920u: goto label_BFC0C920; - case 0xBFC0C944u: goto label_BFC0C944; - case 0xBFC0C950u: goto label_BFC0C950; - case 0xBFC0C95Cu: goto label_BFC0C95C; - case 0xBFC0C968u: goto label_BFC0C968; - case 0xBFC0C974u: goto label_BFC0C974; - case 0xBFC0C994u: goto label_BFC0C994; - case 0xBFC0C9B4u: goto label_BFC0C9B4; - default: break; - } - } -label_BFC0C890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C890: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0C894: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C898u); -#endif - /* 0xBFC0C898: 8DEFE530 lw $t7, -6864($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C898u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE530u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C89C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C89Cu); return; } g_debug_last_store_pc = 0xBFC0C89Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0C8A0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C8A0u); return; } g_debug_last_store_pc = 0xBFC0C8A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C8A4: 240E0080 addiu $t6, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240E0080u, cpu->gpr[14], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C8A8: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C8B0u; /* jal link before delay slot */ - psx_delay_BFC0C8A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0C8AC: A1EE0004 sb $t6, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C8ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (4)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8ACu); -#endif - if (psx_delay_BFC0C8A8) { - psx_delay_BFC0C8A8 = 0; - cpu->gpr[31] = 0xBFC0C8B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0C8B0: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8B4u); -#endif - /* 0xBFC0C8B4: 8F18E530 lw $t8, -6864($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C8B4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E530u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C8B8: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C8C0u; /* jal link before delay slot */ - psx_delay_BFC0C8B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0C8BC: A300000D sb $zero, 13($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C8BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (13)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA300000Du, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8BCu); -#endif - if (psx_delay_BFC0C8B8) { - psx_delay_BFC0C8B8 = 0; - cpu->gpr[31] = 0xBFC0C8C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C8C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C8C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0C8C0: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8C4u); -#endif - /* 0xBFC0C8C4: 8F39E530 lw $t9, -6864($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C8C4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39E530u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C8C8: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C8D0u; /* jal link before delay slot */ - psx_delay_BFC0C8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0C8CC: A3200005 sb $zero, 5($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C8CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (5)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200005u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8CCu); -#endif - if (psx_delay_BFC0C8C8) { - psx_delay_BFC0C8C8 = 0; - cpu->gpr[31] = 0xBFC0C8D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0C8D0: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8D4u); -#endif - /* 0xBFC0C8D4: 8D08E530 lw $t0, -6864($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C8D4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08E530u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C8D8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0C8DC: 2409000A addiu $t1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2409000Au, cpu->gpr[9], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC0C8E0: AC28A028 sw $t0, -24536($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C8E0u); return; } g_debug_last_store_pc = 0xBFC0C8E0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28A028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10101u); -#endif - /* 0xBFC0C8E4: 01008021 addu $s0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C8E8: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C8F0u; /* jal link before delay slot */ - psx_delay_BFC0C8E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0C8EC: A1090002 sb $t1, 2($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C8ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1090002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8ECu); -#endif - if (psx_delay_BFC0C8E8) { - psx_delay_BFC0C8E8 = 0; - cpu->gpr[31] = 0xBFC0C8F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0C8F0: 240A0020 addiu $t2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240A0020u, cpu->gpr[10], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C8F4: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C8FCu; /* jal link before delay slot */ - psx_delay_BFC0C8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC0C8F8: A20A0002 sb $t2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C8F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8F8u); -#endif - if (psx_delay_BFC0C8F4) { - psx_delay_BFC0C8F4 = 0; - cpu->gpr[31] = 0xBFC0C8FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0C8FC: 240B0030 addiu $t3, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x240B0030u, cpu->gpr[11], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C900: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C908u; /* jal link before delay slot */ - psx_delay_BFC0C900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC0C904: A20B0002 sb $t3, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C904u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA20B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C904u); -#endif - if (psx_delay_BFC0C900) { - psx_delay_BFC0C900 = 0; - cpu->gpr[31] = 0xBFC0C908u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0C908: 240C0040 addiu $t4, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240C0040u, cpu->gpr[12], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C90C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C914u; /* jal link before delay slot */ - psx_delay_BFC0C90C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC0C910: A20C0002 sb $t4, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C910u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA20C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C910u); -#endif - if (psx_delay_BFC0C90C) { - psx_delay_BFC0C90C = 0; - cpu->gpr[31] = 0xBFC0C914u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0C914: 240D0050 addiu $t5, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240D0050u, cpu->gpr[13], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C918: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C920u; /* jal link before delay slot */ - psx_delay_BFC0C918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC0C91C: A20D0002 sb $t5, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C91Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA20D0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C91Cu); -#endif - if (psx_delay_BFC0C918) { - psx_delay_BFC0C918 = 0; - cpu->gpr[31] = 0xBFC0C920u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0C920: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C924u); -#endif - /* 0xBFC0C924: 8DCEE530 lw $t6, -6864($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C924u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEE530u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C928: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0C92C: 25CF0008 addiu $t7, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (8)); - PGXP_ALU(0x25CF0008u, cpu->gpr[15], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0C930: AC2FA02C sw $t7, -24532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C930u); return; } g_debug_last_store_pc = 0xBFC0C930u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FA02Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0C934: 2418000A addiu $t8, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2418000Au, cpu->gpr[24], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18001u); -#endif - /* 0xBFC0C938: 01E08021 addu $s0, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C93C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C944u; /* jal link before delay slot */ - psx_delay_BFC0C93C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC0C940: A1D8000A sb $t8, 10($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C940u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (10)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA1D8000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C940u); -#endif - if (psx_delay_BFC0C93C) { - psx_delay_BFC0C93C = 0; - cpu->gpr[31] = 0xBFC0C944u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0C944: 24190020 addiu $t9, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24190020u, cpu->gpr[25], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C948: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C950u; /* jal link before delay slot */ - psx_delay_BFC0C948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC0C94C: A2190002 sb $t9, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C94Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA2190002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C94Cu); -#endif - if (psx_delay_BFC0C948) { - psx_delay_BFC0C948 = 0; - cpu->gpr[31] = 0xBFC0C950u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0C950: 24090030 addiu $t1, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24090030u, cpu->gpr[9], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C954: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C95Cu; /* jal link before delay slot */ - psx_delay_BFC0C954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0C958: A2090002 sb $t1, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C958u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA2090002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C958u); -#endif - if (psx_delay_BFC0C954) { - psx_delay_BFC0C954 = 0; - cpu->gpr[31] = 0xBFC0C95Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C95C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C95Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0C95C: 24080040 addiu $t0, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24080040u, cpu->gpr[8], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C960: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C968u; /* jal link before delay slot */ - psx_delay_BFC0C960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC0C964: A2080002 sb $t0, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C964u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA2080002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C964u); -#endif - if (psx_delay_BFC0C960) { - psx_delay_BFC0C960 = 0; - cpu->gpr[31] = 0xBFC0C968u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0C968: 240A0050 addiu $t2, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240A0050u, cpu->gpr[10], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C96C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0C974u; /* jal link before delay slot */ - psx_delay_BFC0C96C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC0C970: A20A0002 sb $t2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0C970u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C970u); -#endif - if (psx_delay_BFC0C96C) { - psx_delay_BFC0C96C = 0; - cpu->gpr[31] = 0xBFC0C974u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0C974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C974: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C978: AC20BF50 sw $zero, -16560($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -16560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-16560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C978u); return; } g_debug_last_store_pc = 0xBFC0C978u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20BF50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C97C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C980: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C984: AC20BF4C sw $zero, -16564($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -16564; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-16564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C984u); return; } g_debug_last_store_pc = 0xBFC0C984u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20BF4Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C988: 2484BF54 addiu $a0, $a0, -16556 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-16556)); - PGXP_ALU(0x2484BF54u, cpu->gpr[4], _pgx1, 0xFFFFBF54u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C98C: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0C994u; /* jal link before delay slot */ - psx_delay_BFC0C98C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C990: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C990u); -#endif - if (psx_delay_BFC0C98C) { - psx_delay_BFC0C98C = 0; - cpu->gpr[31] = 0xBFC0C994u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0C994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C994: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C998: AC20C05C sw $zero, -16292($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -16292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-16292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C998u); return; } g_debug_last_store_pc = 0xBFC0C998u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20C05Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C99C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C9A0: 3C04A001 lui $a0, 0xA001 */ - cpu->gpr[4] = 0xA0010000u; - PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C9A4: AC20C058 sw $zero, -16296($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -16296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-16296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9A4u); return; } g_debug_last_store_pc = 0xBFC0C9A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20C058u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0C9A8: 2484C060 addiu $a0, $a0, -16288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-16288)); - PGXP_ALU(0x2484C060u, cpu->gpr[4], _pgx1, 0xFFFFC060u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C9AC: 0FF006B3 jal 0xBFC01ACC */ - cpu->gpr[31] = 0xBFC0C9B4u; /* jal link before delay slot */ - psx_delay_BFC0C9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0C9B0: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9B0u); -#endif - if (psx_delay_BFC0C9AC) { - psx_delay_BFC0C9AC = 0; - cpu->gpr[31] = 0xBFC0C9B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01ACCu); - cpu->pc = 0xBFC01ACCu; return; - } -label_BFC0C9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9B4u); -#endif - /* 0xBFC0C9B4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0C9B8: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9BCu); -#endif - /* 0xBFC0C9BC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9BCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C9C0: AC20A030 sw $zero, -24528($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9C0u); return; } g_debug_last_store_pc = 0xBFC0C9C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0C9C4: 03E00008 jr $ra */ - psx_delay_BFC0C9C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C9C8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9C8u); -#endif - if (psx_delay_BFC0C9C4) { - psx_delay_BFC0C9C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0C9CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0C9CCu); - int psx_delay_BFC0C9E4 = 0; - int psx_delay_BFC0C9F4 = 0; - int psx_taken_BFC0C9F4 = 0; - int psx_delay_BFC0CA04 = 0; - int psx_taken_BFC0CA04 = 0; - int psx_delay_BFC0CA30 = 0; - int psx_delay_BFC0CA3C = 0; - int psx_delay_BFC0CA48 = 0; - int psx_delay_BFC0CA54 = 0; - int psx_delay_BFC0CA60 = 0; - int psx_delay_BFC0CA6C = 0; - int psx_delay_BFC0CA88 = 0; - int psx_delay_BFC0CAAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0C9ECu: goto label_BFC0C9EC; - case 0xBFC0C9FCu: goto label_BFC0C9FC; - case 0xBFC0CA0Cu: goto label_BFC0CA0C; - case 0xBFC0CA38u: goto label_BFC0CA38; - case 0xBFC0CA44u: goto label_BFC0CA44; - case 0xBFC0CA50u: goto label_BFC0CA50; - case 0xBFC0CA5Cu: goto label_BFC0CA5C; - case 0xBFC0CA68u: goto label_BFC0CA68; - case 0xBFC0CA74u: goto label_BFC0CA74; - case 0xBFC0CA90u: goto label_BFC0CA90; - case 0xBFC0CAA4u: goto label_BFC0CAA4; - default: break; - } - } -label_BFC0C9CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C9CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0C9CC: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0C9D0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9D0u); return; } g_debug_last_store_pc = 0xBFC0C9D0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0C9D4: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9D4u); return; } g_debug_last_store_pc = 0xBFC0C9D4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0C9D8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9DCu); -#endif - /* 0xBFC0C9DC: 8C710004 lw $s1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9DCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x8u); } - PGXP_LOAD(0x8C710004u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0C9E0: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9E0u); return; } g_debug_last_store_pc = 0xBFC0C9E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0C9E4: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC0C9ECu; /* jal link before delay slot */ - psx_delay_BFC0C9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0C9E8: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9E8u); -#endif - if (psx_delay_BFC0C9E4) { - psx_delay_BFC0C9E4 = 0; - cpu->gpr[31] = 0xBFC0C9ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC0C9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9ECu); -#endif - /* 0xBFC0C9EC: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0C9ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC0C9F0: 2E210002 sltiu $at, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2E210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0C9F4: 14200005 bne $at, $zero, 0xBFC0CA0C */ - uint32_t psx_brA_BFC0C9F4 = cpu->gpr[1]; uint32_t psx_brB_BFC0C9F4 = cpu->gpr[0]; - psx_taken_BFC0C9F4 = (psx_brA_BFC0C9F4 != psx_brB_BFC0C9F4); - psx_delay_BFC0C9F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0C9F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9F8u); -#endif - if (psx_delay_BFC0C9F4) { - psx_delay_BFC0C9F4 = 0; - if (psx_taken_BFC0C9F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CA0Cu); - goto label_BFC0CA0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C9FCu); - } -label_BFC0C9FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0C9FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0C9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0C9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0C9FC: 240E0006 addiu $t6, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x240E0006u, cpu->gpr[14], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0C9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0CA00: AC6E0018 sw $t6, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA00u); return; } g_debug_last_store_pc = 0xBFC0CA00u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CA04: 10000027 beq $zero, $zero, 0xBFC0CAA4 */ - uint32_t psx_brA_BFC0CA04 = cpu->gpr[0]; uint32_t psx_brB_BFC0CA04 = cpu->gpr[0]; - psx_taken_BFC0CA04 = (psx_brA_BFC0CA04 == psx_brB_BFC0CA04); - psx_delay_BFC0CA04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CA08: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA08u); -#endif - if (psx_delay_BFC0CA04) { - psx_delay_BFC0CA04 = 0; - if (psx_taken_BFC0CA04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CAA4u); - goto label_BFC0CAA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CA0Cu); - } -label_BFC0CA0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0CA0C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA0Cu); return; } g_debug_last_store_pc = 0xBFC0CA0Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA10u); -#endif - /* 0xBFC0CA10: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA10u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0CA14: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC0CA18: 0011C880 sll $t9, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0CA1C: 35F81000 ori $t8, $t7, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x1000u; - PGXP_ALU(0x35F81000u, cpu->gpr[24], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0CA20: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA20u); return; } g_debug_last_store_pc = 0xBFC0CA20u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC0CA24: 02198021 addu $s0, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02198021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA28u); -#endif - /* 0xBFC0CA28: 8E10A028 lw $s0, -24536($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -24536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-24536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA28u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10A028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0CA2C: 2408000A addiu $t0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2408000Au, cpu->gpr[8], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA30: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA38u; /* jal link before delay slot */ - psx_delay_BFC0CA30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC0CA34: A2080002 sb $t0, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA2080002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA34u); -#endif - if (psx_delay_BFC0CA30) { - psx_delay_BFC0CA30 = 0; - cpu->gpr[31] = 0xBFC0CA38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0CA38: 24090020 addiu $t1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24090020u, cpu->gpr[9], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA3C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA44u; /* jal link before delay slot */ - psx_delay_BFC0CA3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0CA40: A2090002 sb $t1, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA2090002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA40u); -#endif - if (psx_delay_BFC0CA3C) { - psx_delay_BFC0CA3C = 0; - cpu->gpr[31] = 0xBFC0CA44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0CA44: 240A0030 addiu $t2, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x240A0030u, cpu->gpr[10], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA48: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA50u; /* jal link before delay slot */ - psx_delay_BFC0CA48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC0CA4C: A20A0002 sb $t2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA4Cu); -#endif - if (psx_delay_BFC0CA48) { - psx_delay_BFC0CA48 = 0; - cpu->gpr[31] = 0xBFC0CA50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0CA50: 240B0040 addiu $t3, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240B0040u, cpu->gpr[11], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA54: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA5Cu; /* jal link before delay slot */ - psx_delay_BFC0CA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC0CA58: A20B0002 sb $t3, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA20B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA58u); -#endif - if (psx_delay_BFC0CA54) { - psx_delay_BFC0CA54 = 0; - cpu->gpr[31] = 0xBFC0CA5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0CA5C: 240C0050 addiu $t4, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240C0050u, cpu->gpr[12], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA60: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA68u; /* jal link before delay slot */ - psx_delay_BFC0CA60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC0CA64: A20C0002 sb $t4, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA20C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA64u); -#endif - if (psx_delay_BFC0CA60) { - psx_delay_BFC0CA60 = 0; - cpu->gpr[31] = 0xBFC0CA68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0CA68: 240D0005 addiu $t5, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x240D0005u, cpu->gpr[13], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA6C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CA74u; /* jal link before delay slot */ - psx_delay_BFC0CA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC0CA70: A20D0002 sb $t5, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CA70u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA20D0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA70u); -#endif - if (psx_delay_BFC0CA6C) { - psx_delay_BFC0CA6C = 0; - cpu->gpr[31] = 0xBFC0CA74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0CA74: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0CA78: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC0CA7C: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0CA80: 240E2580 addiu $t6, $zero, 9600 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (9600)); - PGXP_ALU(0x240E2580u, cpu->gpr[14], _pgx1, 0x00002580u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0CA84: AC2EA020 sw $t6, -24544($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24544; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA84u); return; } g_debug_last_store_pc = 0xBFC0CA84u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EA020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CA88: 0FF03360 jal 0xBFC0CD80 */ - cpu->gpr[31] = 0xBFC0CA90u; /* jal link before delay slot */ - psx_delay_BFC0CA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0CA8C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA8Cu); -#endif - if (psx_delay_BFC0CA88) { - psx_delay_BFC0CA88 = 0; - cpu->gpr[31] = 0xBFC0CA90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD80u); - cpu->pc = 0xBFC0CD80u; return; - } -label_BFC0CA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0CA90: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0CA94: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA98u); -#endif - /* 0xBFC0CA98: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA98u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC0CA9C: AC38A030 sw $t8, -24528($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CA9Cu); return; } g_debug_last_store_pc = 0xBFC0CA9Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38A030u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CAA0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAA0u); -#endif -label_BFC0CAA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CAA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAA4u); -#endif - /* 0xBFC0CAA4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAA8u); -#endif - /* 0xBFC0CAA8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAA8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0CAAC: 03E00008 jr $ra */ - psx_delay_BFC0CAAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CAB0: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAB0u); -#endif - if (psx_delay_BFC0CAAC) { - psx_delay_BFC0CAAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0CAB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0CAB4u); - int psx_delay_BFC0CACC = 0; - int psx_taken_BFC0CACC = 0; - int psx_delay_BFC0CAF8 = 0; - int psx_taken_BFC0CAF8 = 0; - int psx_delay_BFC0CB04 = 0; - int psx_delay_BFC0CB0C = 0; - int psx_taken_BFC0CB0C = 0; - int psx_delay_BFC0CB14 = 0; - int psx_delay_BFC0CB20 = 0; - int psx_delay_BFC0CB28 = 0; - int psx_taken_BFC0CB28 = 0; - int psx_delay_BFC0CB3C = 0; - int psx_taken_BFC0CB3C = 0; - int psx_delay_BFC0CB50 = 0; - int psx_taken_BFC0CB50 = 0; - int psx_delay_BFC0CB58 = 0; - int psx_delay_BFC0CB6C = 0; - int psx_taken_BFC0CB6C = 0; - int psx_delay_BFC0CB80 = 0; - int psx_taken_BFC0CB80 = 0; - int psx_delay_BFC0CB94 = 0; - int psx_taken_BFC0CB94 = 0; - int psx_delay_BFC0CB9C = 0; - int psx_delay_BFC0CBC8 = 0; - int psx_taken_BFC0CBC8 = 0; - int psx_delay_BFC0CBD8 = 0; - int psx_taken_BFC0CBD8 = 0; - int psx_delay_BFC0CBE4 = 0; - int psx_taken_BFC0CBE4 = 0; - int psx_delay_BFC0CBF8 = 0; - int psx_taken_BFC0CBF8 = 0; - int psx_delay_BFC0CC08 = 0; - int psx_taken_BFC0CC08 = 0; - int psx_delay_BFC0CC20 = 0; - int psx_delay_BFC0CC38 = 0; - int psx_taken_BFC0CC38 = 0; - int psx_delay_BFC0CC44 = 0; - int psx_taken_BFC0CC44 = 0; - int psx_delay_BFC0CC50 = 0; - int psx_delay_BFC0CC60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0CAD4u: goto label_BFC0CAD4; - case 0xBFC0CB00u: goto label_BFC0CB00; - case 0xBFC0CB0Cu: goto label_BFC0CB0C; - case 0xBFC0CB14u: goto label_BFC0CB14; - case 0xBFC0CB1Cu: goto label_BFC0CB1C; - case 0xBFC0CB28u: goto label_BFC0CB28; - case 0xBFC0CB30u: goto label_BFC0CB30; - case 0xBFC0CB44u: goto label_BFC0CB44; - case 0xBFC0CB58u: goto label_BFC0CB58; - case 0xBFC0CB60u: goto label_BFC0CB60; - case 0xBFC0CB74u: goto label_BFC0CB74; - case 0xBFC0CB88u: goto label_BFC0CB88; - case 0xBFC0CB9Cu: goto label_BFC0CB9C; - case 0xBFC0CBA4u: goto label_BFC0CBA4; - case 0xBFC0CBD0u: goto label_BFC0CBD0; - case 0xBFC0CBE0u: goto label_BFC0CBE0; - case 0xBFC0CBECu: goto label_BFC0CBEC; - case 0xBFC0CC00u: goto label_BFC0CC00; - case 0xBFC0CC10u: goto label_BFC0CC10; - case 0xBFC0CC28u: goto label_BFC0CC28; - case 0xBFC0CC40u: goto label_BFC0CC40; - case 0xBFC0CC4Cu: goto label_BFC0CC4C; - case 0xBFC0CC58u: goto label_BFC0CC58; - case 0xBFC0CC5Cu: goto label_BFC0CC5C; - default: break; - } - } -label_BFC0CAB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CAB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CAB4: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0CAB8: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAB8u); return; } g_debug_last_store_pc = 0xBFC0CAB8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0CABC: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0CAC0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAC0u); return; } g_debug_last_store_pc = 0xBFC0CAC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAC4u); -#endif - /* 0xBFC0CAC4: 8E23000C lw $v1, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAC4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x8E23000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CAC8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CACC: 14A10044 bne $a1, $at, 0xBFC0CBE0 */ - uint32_t psx_brA_BFC0CACC = cpu->gpr[5]; uint32_t psx_brB_BFC0CACC = cpu->gpr[1]; - psx_taken_BFC0CACC = (psx_brA_BFC0CACC != psx_brB_BFC0CACC); - psx_delay_BFC0CACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0CAD0: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAD0u); return; } g_debug_last_store_pc = 0xBFC0CAD0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAD0u); -#endif - if (psx_delay_BFC0CACC) { - psx_delay_BFC0CACC = 0; - if (psx_taken_BFC0CACC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CBE0u); - goto label_BFC0CBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CAD4u); - } -label_BFC0CAD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CAD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0CAD4: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAD4u); return; } g_debug_last_store_pc = 0xBFC0CAD4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAD8u); -#endif - /* 0xBFC0CAD8: 8E2E0004 lw $t6, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CAD8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000u); } - PGXP_LOAD(0x8E2E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0CADC: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0CAE0: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0CAE4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0CAE8: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0CAEC: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0CAF0: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0CAF4: 2718BF48 addiu $t8, $t8, -16568 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-16568)); - PGXP_ALU(0x2718BF48u, cpu->gpr[24], _pgx1, 0xFFFFBF48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CAF8: 10600035 beq $v1, $zero, 0xBFC0CBD0 */ - uint32_t psx_brA_BFC0CAF8 = cpu->gpr[3]; uint32_t psx_brB_BFC0CAF8 = cpu->gpr[0]; - psx_taken_BFC0CAF8 = (psx_brA_BFC0CAF8 == psx_brB_BFC0CAF8); - psx_delay_BFC0CAF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC0CAFC: 01F88021 addu $s0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CAFCu); -#endif - if (psx_delay_BFC0CAF8) { - psx_delay_BFC0CAF8 = 0; - if (psx_taken_BFC0CAF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CBD0u); - goto label_BFC0CBD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB00u); - } -label_BFC0CB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB00u); -#endif - /* 0xBFC0CB00: 8E240004 lw $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB00u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x8E240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CB04: 0FF03447 jal 0xBFC0D11C */ - cpu->gpr[31] = 0xBFC0CB0Cu; /* jal link before delay slot */ - psx_delay_BFC0CB04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB08u); -#endif - if (psx_delay_BFC0CB04) { - psx_delay_BFC0CB04 = 0; - cpu->gpr[31] = 0xBFC0CB0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D11Cu); - cpu->pc = 0xBFC0D11Cu; return; - } -label_BFC0CB0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CB0C: 10400008 beq $v0, $zero, 0xBFC0CB30 */ - uint32_t psx_brA_BFC0CB0C = cpu->gpr[2]; uint32_t psx_brB_BFC0CB0C = cpu->gpr[0]; - psx_taken_BFC0CB0C = (psx_brA_BFC0CB0C == psx_brB_BFC0CB0C); - psx_delay_BFC0CB0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0CB10: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB10u); -#endif - if (psx_delay_BFC0CB0C) { - psx_delay_BFC0CB0C = 0; - if (psx_taken_BFC0CB0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB30u); - goto label_BFC0CB30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB14u); - } -label_BFC0CB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CB14: 0FF036EC jal 0xBFC0DBB0 */ - cpu->gpr[31] = 0xBFC0CB1Cu; /* jal link before delay slot */ - psx_delay_BFC0CB14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0CB18: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB18u); -#endif - if (psx_delay_BFC0CB14) { - psx_delay_BFC0CB14 = 0; - cpu->gpr[31] = 0xBFC0CB1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBB0u); - cpu->pc = 0xBFC0DBB0u; return; - } -label_BFC0CB1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB1Cu); -#endif - /* 0xBFC0CB1C: 8E240004 lw $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB1Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x8E240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CB20: 0FF03447 jal 0xBFC0D11C */ - cpu->gpr[31] = 0xBFC0CB28u; /* jal link before delay slot */ - psx_delay_BFC0CB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB24u); -#endif - if (psx_delay_BFC0CB20) { - psx_delay_BFC0CB20 = 0; - cpu->gpr[31] = 0xBFC0CB28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D11Cu); - cpu->pc = 0xBFC0D11Cu; return; - } -label_BFC0CB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CB28: 1440FFFA bne $v0, $zero, 0xBFC0CB14 */ - uint32_t psx_brA_BFC0CB28 = cpu->gpr[2]; uint32_t psx_brB_BFC0CB28 = cpu->gpr[0]; - psx_taken_BFC0CB28 = (psx_brA_BFC0CB28 != psx_brB_BFC0CB28); - psx_delay_BFC0CB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0CB2C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB2Cu); -#endif - if (psx_delay_BFC0CB28) { - psx_delay_BFC0CB28 = 0; - if (psx_taken_BFC0CB28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB14u); - goto label_BFC0CB14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB30u); - } -label_BFC0CB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB30u); -#endif - /* 0xBFC0CB30: 8E390000 lw $t9, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB30u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x8E390000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0CB38: 33280004 andi $t0, $t9, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x4u; - PGXP_ALU(0x33280004u, cpu->gpr[8], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0CB3C: 1500000D bne $t0, $zero, 0xBFC0CB74 */ - uint32_t psx_brA_BFC0CB3C = cpu->gpr[8]; uint32_t psx_brB_BFC0CB3C = cpu->gpr[0]; - psx_taken_BFC0CB3C = (psx_brA_BFC0CB3C != psx_brB_BFC0CB3C); - psx_delay_BFC0CB3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB40u); -#endif - if (psx_delay_BFC0CB3C) { - psx_delay_BFC0CB3C = 0; - if (psx_taken_BFC0CB3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB74u); - goto label_BFC0CB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB44u); - } -label_BFC0CB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB44u); -#endif - /* 0xBFC0CB44: 8E090008 lw $t1, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB44u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB48u); -#endif - /* 0xBFC0CB48: 8E0A0004 lw $t2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB48u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x8E0A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0CB50: 152A0008 bne $t1, $t2, 0xBFC0CB74 */ - uint32_t psx_brA_BFC0CB50 = cpu->gpr[9]; uint32_t psx_brB_BFC0CB50 = cpu->gpr[10]; - psx_taken_BFC0CB50 = (psx_brA_BFC0CB50 != psx_brB_BFC0CB50); - psx_delay_BFC0CB50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB54u); -#endif - if (psx_delay_BFC0CB50) { - psx_delay_BFC0CB50 = 0; - if (psx_taken_BFC0CB50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB74u); - goto label_BFC0CB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB58u); - } -label_BFC0CB58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CB58: 0FF036F0 jal 0xBFC0DBC0 */ - cpu->gpr[31] = 0xBFC0CB60u; /* jal link before delay slot */ - psx_delay_BFC0CB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB5Cu); -#endif - if (psx_delay_BFC0CB58) { - psx_delay_BFC0CB58 = 0; - cpu->gpr[31] = 0xBFC0CB60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBC0u); - cpu->pc = 0xBFC0DBC0u; return; - } -label_BFC0CB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB60u); -#endif - /* 0xBFC0CB60: 8E0B0008 lw $t3, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB60u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB64u); -#endif - /* 0xBFC0CB64: 8E0C0004 lw $t4, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB64u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x8E0C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0CB6C: 116CFFFA beq $t3, $t4, 0xBFC0CB58 */ - uint32_t psx_brA_BFC0CB6C = cpu->gpr[11]; uint32_t psx_brB_BFC0CB6C = cpu->gpr[12]; - psx_taken_BFC0CB6C = (psx_brA_BFC0CB6C == psx_brB_BFC0CB6C); - psx_delay_BFC0CB6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB70u); -#endif - if (psx_delay_BFC0CB6C) { - psx_delay_BFC0CB6C = 0; - if (psx_taken_BFC0CB6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB58u); - goto label_BFC0CB58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB74u); - } -label_BFC0CB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB74u); -#endif - /* 0xBFC0CB74: 8E0D0008 lw $t5, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB74u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB78u); -#endif - /* 0xBFC0CB78: 8E0E0004 lw $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB78u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0CB80: 15AE0006 bne $t5, $t6, 0xBFC0CB9C */ - uint32_t psx_brA_BFC0CB80 = cpu->gpr[13]; uint32_t psx_brB_BFC0CB80 = cpu->gpr[14]; - psx_taken_BFC0CB80 = (psx_brA_BFC0CB80 != psx_brB_BFC0CB80); - psx_delay_BFC0CB80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB84u); -#endif - if (psx_delay_BFC0CB80) { - psx_delay_BFC0CB80 = 0; - if (psx_taken_BFC0CB80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB9Cu); - goto label_BFC0CB9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB88u); - } -label_BFC0CB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB88u); -#endif - /* 0xBFC0CB88: 8FAF002C lw $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB88u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB8Cu); -#endif - /* 0xBFC0CB8C: 8E38000C lw $t8, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB8Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000u); } - PGXP_LOAD(0x8E38000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB90u); -#endif - /* 0xBFC0CB90: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CB90u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CB94: 10000030 beq $zero, $zero, 0xBFC0CC58 */ - uint32_t psx_brA_BFC0CB94 = cpu->gpr[0]; uint32_t psx_brB_BFC0CB94 = cpu->gpr[0]; - psx_taken_BFC0CB94 = (psx_brA_BFC0CB94 == psx_brB_BFC0CB94); - psx_delay_BFC0CB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC0CB98: 01F81023 subu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F81023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CB98u); -#endif - if (psx_delay_BFC0CB94) { - psx_delay_BFC0CB94 = 0; - if (psx_taken_BFC0CB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC58u); - goto label_BFC0CC58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB9Cu); - } -label_BFC0CB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CB9C: 0FF036F4 jal 0xBFC0DBD0 */ - cpu->gpr[31] = 0xBFC0CBA4u; /* jal link before delay slot */ - psx_delay_BFC0CB9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0CBA0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBA0u); -#endif - if (psx_delay_BFC0CB9C) { - psx_delay_BFC0CB9C = 0; - cpu->gpr[31] = 0xBFC0CBA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBD0u); - cpu->pc = 0xBFC0DBD0u; return; - } -label_BFC0CBA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CBA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBA4u); -#endif - /* 0xBFC0CBA4: 8E390008 lw $t9, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBA4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x8E390008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CBA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0CBAC: A3220000 sb $v0, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CBACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA3220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBB0u); -#endif - /* 0xBFC0CBB0: 8E2A000C lw $t2, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBB0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000u); } - PGXP_LOAD(0x8E2A000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBB4u); -#endif - /* 0xBFC0CBB4: 8E280008 lw $t0, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBB4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x8E280008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0CBB8: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC0CBBC: AE2B000C sw $t3, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBBCu); return; } g_debug_last_store_pc = 0xBFC0CBBCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAE2B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBC0u); -#endif - /* 0xBFC0CBC0: 8E2C000C lw $t4, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBC0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000u); } - PGXP_LOAD(0x8E2C000Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0CBC4: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0CBC8: 1580FFCD bne $t4, $zero, 0xBFC0CB00 */ - uint32_t psx_brA_BFC0CBC8 = cpu->gpr[12]; uint32_t psx_brB_BFC0CBC8 = cpu->gpr[0]; - psx_taken_BFC0CBC8 = (psx_brA_BFC0CBC8 != psx_brB_BFC0CBC8); - psx_delay_BFC0CBC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC0CBCC: AE290008 sw $t1, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBCCu); return; } g_debug_last_store_pc = 0xBFC0CBCCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAE290008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBCCu); -#endif - if (psx_delay_BFC0CBC8) { - psx_delay_BFC0CBC8 = 0; - if (psx_taken_BFC0CBC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CB00u); - goto label_BFC0CB00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CBD0u); - } -label_BFC0CBD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CBD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBD0u); -#endif - /* 0xBFC0CBD0: 8FA2002C lw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBD0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBD4u); -#endif - /* 0xBFC0CBD4: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBD4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CBD8: 10000020 beq $zero, $zero, 0xBFC0CC5C */ - uint32_t psx_brA_BFC0CBD8 = cpu->gpr[0]; uint32_t psx_brB_BFC0CBD8 = cpu->gpr[0]; - psx_taken_BFC0CBD8 = (psx_brA_BFC0CBD8 == psx_brB_BFC0CBD8); - psx_delay_BFC0CBD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBDCu); -#endif - /* 0xBFC0CBDC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBDCu); -#endif - if (psx_delay_BFC0CBD8) { - psx_delay_BFC0CBD8 = 0; - if (psx_taken_BFC0CBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC5Cu); - goto label_BFC0CC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CBE0u); - } -label_BFC0CBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CBE0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CBE4: 14A10019 bne $a1, $at, 0xBFC0CC4C */ - uint32_t psx_brA_BFC0CBE4 = cpu->gpr[5]; uint32_t psx_brB_BFC0CBE4 = cpu->gpr[1]; - psx_taken_BFC0CBE4 = (psx_brA_BFC0CBE4 != psx_brB_BFC0CBE4); - psx_delay_BFC0CBE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CBE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBE8u); -#endif - if (psx_delay_BFC0CBE4) { - psx_delay_BFC0CBE4 = 0; - if (psx_taken_BFC0CBE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC4Cu); - goto label_BFC0CC4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CBECu); - } -label_BFC0CBEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CBECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBECu); -#endif - /* 0xBFC0CBEC: 8E2D0000 lw $t5, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CBECu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x8E2D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CBF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0CBF4: 31AE0002 andi $t6, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u; - PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0CBF8: 11C00014 beq $t6, $zero, 0xBFC0CC4C */ - uint32_t psx_brA_BFC0CBF8 = cpu->gpr[14]; uint32_t psx_brB_BFC0CBF8 = cpu->gpr[0]; - psx_taken_BFC0CBF8 = (psx_brA_BFC0CBF8 == psx_brB_BFC0CBF8); - psx_delay_BFC0CBF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CBFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CBFCu); -#endif - if (psx_delay_BFC0CBF8) { - psx_delay_BFC0CBF8 = 0; - if (psx_taken_BFC0CBF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC4Cu); - goto label_BFC0CC4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC00u); - } -label_BFC0CC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0CC00: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0CC04: 246FFFFF addiu $t7, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x246FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CC08: 1040000D beq $v0, $zero, 0xBFC0CC40 */ - uint32_t psx_brA_BFC0CC08 = cpu->gpr[2]; uint32_t psx_brB_BFC0CC08 = cpu->gpr[0]; - psx_taken_BFC0CC08 = (psx_brA_BFC0CC08 == psx_brB_BFC0CC08); - psx_delay_BFC0CC08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC0CC0C: AE2F000C sw $t7, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC0Cu); return; } g_debug_last_store_pc = 0xBFC0CC0Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE2F000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC0Cu); -#endif - if (psx_delay_BFC0CC08) { - psx_delay_BFC0CC08 = 0; - if (psx_taken_BFC0CC08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC40u); - goto label_BFC0CC40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC10u); - } -label_BFC0CC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC10u); -#endif - /* 0xBFC0CC10: 8E220008 lw $v0, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC10u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x8E220008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC14u); -#endif - /* 0xBFC0CC14: 8E250004 lw $a1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC14u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } - PGXP_LOAD(0x8E250004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC18u); -#endif - /* 0xBFC0CC18: 80440000 lb $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); - PGXP_LOAD(0x80440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC0CC1C: 24580001 addiu $t8, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24580001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CC20: 0FF034D3 jal 0xBFC0D34C */ - cpu->gpr[31] = 0xBFC0CC28u; /* jal link before delay slot */ - psx_delay_BFC0CC20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC0CC24: AE380008 sw $t8, 8($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC24u); return; } g_debug_last_store_pc = 0xBFC0CC24u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE380008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC24u); -#endif - if (psx_delay_BFC0CC20) { - psx_delay_BFC0CC20 = 0; - cpu->gpr[31] = 0xBFC0CC28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D34Cu); - cpu->pc = 0xBFC0D34Cu; return; - } -label_BFC0CC28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC28u); -#endif - /* 0xBFC0CC28: 8E23000C lw $v1, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC28u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x8E23000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CC2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0CC30: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC0CC34: 2479FFFF addiu $t9, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2479FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CC38: 1440FFF5 bne $v0, $zero, 0xBFC0CC10 */ - uint32_t psx_brA_BFC0CC38 = cpu->gpr[2]; uint32_t psx_brB_BFC0CC38 = cpu->gpr[0]; - psx_taken_BFC0CC38 = (psx_brA_BFC0CC38 != psx_brB_BFC0CC38); - psx_delay_BFC0CC38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC0CC3C: AE39000C sw $t9, 12($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC3Cu); return; } g_debug_last_store_pc = 0xBFC0CC3Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE39000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC3Cu); -#endif - if (psx_delay_BFC0CC38) { - psx_delay_BFC0CC38 = 0; - if (psx_taken_BFC0CC38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC10u); - goto label_BFC0CC10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC40u); - } -label_BFC0CC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC40u); -#endif - /* 0xBFC0CC40: 8FA2002C lw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CC44: 10000005 beq $zero, $zero, 0xBFC0CC5C */ - uint32_t psx_brA_BFC0CC44 = cpu->gpr[0]; uint32_t psx_brB_BFC0CC44 = cpu->gpr[0]; - psx_taken_BFC0CC44 = (psx_brA_BFC0CC44 == psx_brB_BFC0CC44); - psx_delay_BFC0CC44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC48u); -#endif - /* 0xBFC0CC48: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC48u); -#endif - if (psx_delay_BFC0CC44) { - psx_delay_BFC0CC44 = 0; - if (psx_taken_BFC0CC44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC5Cu); - goto label_BFC0CC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CC4Cu); - } -label_BFC0CC4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0CC4C: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CC50: 0FF036F8 jal 0xBFC0DBE0 */ - cpu->gpr[31] = 0xBFC0CC58u; /* jal link before delay slot */ - psx_delay_BFC0CC50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0CC54: 2484E534 addiu $a0, $a0, -6860 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6860)); - PGXP_ALU(0x2484E534u, cpu->gpr[4], _pgx1, 0xFFFFE534u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC54u); -#endif - if (psx_delay_BFC0CC50) { - psx_delay_BFC0CC50 = 0; - cpu->gpr[31] = 0xBFC0CC58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBE0u); - cpu->pc = 0xBFC0DBE0u; return; - } -label_BFC0CC58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC58u); -#endif - /* 0xBFC0CC58: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC58u); -#endif -label_BFC0CC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC5Cu); -#endif - /* 0xBFC0CC5C: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC5Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0CC60: 03E00008 jr $ra */ - psx_delay_BFC0CC60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CC64: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC64u); -#endif - if (psx_delay_BFC0CC60) { - psx_delay_BFC0CC60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0CC68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0CC68u); - int psx_delay_BFC0CCA4 = 0; - int psx_taken_BFC0CCA4 = 0; - int psx_delay_BFC0CCB0 = 0; - int psx_taken_BFC0CCB0 = 0; - int psx_delay_BFC0CCB8 = 0; - int psx_taken_BFC0CCB8 = 0; - int psx_delay_BFC0CCC0 = 0; - int psx_taken_BFC0CCC0 = 0; - int psx_delay_BFC0CCC8 = 0; - int psx_taken_BFC0CCC8 = 0; - int psx_delay_BFC0CCD0 = 0; - int psx_delay_BFC0CCD8 = 0; - int psx_taken_BFC0CCD8 = 0; - int psx_delay_BFC0CCE0 = 0; - int psx_delay_BFC0CCEC = 0; - int psx_delay_BFC0CCF4 = 0; - int psx_taken_BFC0CCF4 = 0; - int psx_delay_BFC0CCFC = 0; - int psx_taken_BFC0CCFC = 0; - int psx_delay_BFC0CD04 = 0; - int psx_taken_BFC0CD04 = 0; - int psx_delay_BFC0CD18 = 0; - int psx_taken_BFC0CD18 = 0; - int psx_delay_BFC0CD2C = 0; - int psx_taken_BFC0CD2C = 0; - int psx_delay_BFC0CD3C = 0; - int psx_taken_BFC0CD3C = 0; - int psx_delay_BFC0CD44 = 0; - int psx_delay_BFC0CD4C = 0; - int psx_taken_BFC0CD4C = 0; - int psx_delay_BFC0CD5C = 0; - int psx_taken_BFC0CD5C = 0; - int psx_delay_BFC0CD78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0CCACu: goto label_BFC0CCAC; - case 0xBFC0CCB8u: goto label_BFC0CCB8; - case 0xBFC0CCC0u: goto label_BFC0CCC0; - case 0xBFC0CCC8u: goto label_BFC0CCC8; - case 0xBFC0CCD0u: goto label_BFC0CCD0; - case 0xBFC0CCD8u: goto label_BFC0CCD8; - case 0xBFC0CCE0u: goto label_BFC0CCE0; - case 0xBFC0CCE8u: goto label_BFC0CCE8; - case 0xBFC0CCF4u: goto label_BFC0CCF4; - case 0xBFC0CCFCu: goto label_BFC0CCFC; - case 0xBFC0CD04u: goto label_BFC0CD04; - case 0xBFC0CD0Cu: goto label_BFC0CD0C; - case 0xBFC0CD20u: goto label_BFC0CD20; - case 0xBFC0CD34u: goto label_BFC0CD34; - case 0xBFC0CD44u: goto label_BFC0CD44; - case 0xBFC0CD4Cu: goto label_BFC0CD4C; - case 0xBFC0CD54u: goto label_BFC0CD54; - case 0xBFC0CD58u: goto label_BFC0CD58; - case 0xBFC0CD64u: goto label_BFC0CD64; - case 0xBFC0CD68u: goto label_BFC0CD68; - case 0xBFC0CD6Cu: goto label_BFC0CD6C; - default: break; - } - } -label_BFC0CC68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CC68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CC68: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0CC6C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC6Cu); return; } g_debug_last_store_pc = 0xBFC0CC6Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0CC70: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0CC74: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC74u); return; } g_debug_last_store_pc = 0xBFC0CC74u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0CC78: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC78u); return; } g_debug_last_store_pc = 0xBFC0CC78u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC7Cu); -#endif - /* 0xBFC0CC7C: 8E230004 lw $v1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CC7Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x8E230004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0CC80: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0CC84: 00037100 sll $t6, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 4u; - PGXP_ALU(0x00037100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0CC88: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0CC8C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC0CC90: 01C37023 subu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[3]; - PGXP_ALU(0x01C37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0CC94: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0CC98: 25EFBF48 addiu $t7, $t7, -16568 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-16568)); - PGXP_ALU(0x25EFBF48u, cpu->gpr[15], _pgx1, 0xFFFFBF48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CC9C: 24016602 addiu $at, $zero, 26114 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26114)); - PGXP_ALU(0x24016602u, cpu->gpr[1], _pgx1, 0x00006602u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC0CCA0: 01CF8021 addu $s0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CCA4: 10A1000A beq $a1, $at, 0xBFC0CCD0 */ - uint32_t psx_brA_BFC0CCA4 = cpu->gpr[5]; uint32_t psx_brB_BFC0CCA4 = cpu->gpr[1]; - psx_taken_BFC0CCA4 = (psx_brA_BFC0CCA4 == psx_brB_BFC0CCA4); - psx_delay_BFC0CCA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC0CCA8: AFA0002C sw $zero, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CCA8u); return; } g_debug_last_store_pc = 0xBFC0CCA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0002Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCA8u); -#endif - if (psx_delay_BFC0CCA4) { - psx_delay_BFC0CCA4 = 0; - if (psx_taken_BFC0CCA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCD0u); - goto label_BFC0CCD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCACu); - } -label_BFC0CCAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CCAC: 24017401 addiu $at, $zero, 29697 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (29697)); - PGXP_ALU(0x24017401u, cpu->gpr[1], _pgx1, 0x00007401u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CCB0: 10A10014 beq $a1, $at, 0xBFC0CD04 */ - uint32_t psx_brA_BFC0CCB0 = cpu->gpr[5]; uint32_t psx_brB_BFC0CCB0 = cpu->gpr[1]; - psx_taken_BFC0CCB0 = (psx_brA_BFC0CCB0 == psx_brB_BFC0CCB0); - psx_delay_BFC0CCB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CCB4: 24017402 addiu $at, $zero, 29698 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (29698)); - PGXP_ALU(0x24017402u, cpu->gpr[1], _pgx1, 0x00007402u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCB4u); -#endif - if (psx_delay_BFC0CCB0) { - psx_delay_BFC0CCB0 = 0; - if (psx_taken_BFC0CCB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD04u); - goto label_BFC0CD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCB8u); - } -label_BFC0CCB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CCB8: 10A1001E beq $a1, $at, 0xBFC0CD34 */ - uint32_t psx_brA_BFC0CCB8 = cpu->gpr[5]; uint32_t psx_brB_BFC0CCB8 = cpu->gpr[1]; - psx_taken_BFC0CCB8 = (psx_brA_BFC0CCB8 == psx_brB_BFC0CCB8); - psx_delay_BFC0CCB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CCBC: 24017403 addiu $at, $zero, 29699 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (29699)); - PGXP_ALU(0x24017403u, cpu->gpr[1], _pgx1, 0x00007403u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCBCu); -#endif - if (psx_delay_BFC0CCB8) { - psx_delay_BFC0CCB8 = 0; - if (psx_taken_BFC0CCB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD34u); - goto label_BFC0CD34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCC0u); - } -label_BFC0CCC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC0CCC0: 10A10020 beq $a1, $at, 0xBFC0CD44 */ - uint32_t psx_brA_BFC0CCC0 = cpu->gpr[5]; uint32_t psx_brB_BFC0CCC0 = cpu->gpr[1]; - psx_taken_BFC0CCC0 = (psx_brA_BFC0CCC0 == psx_brB_BFC0CCC0); - psx_delay_BFC0CCC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CCC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCC4u); -#endif - if (psx_delay_BFC0CCC0) { - psx_delay_BFC0CCC0 = 0; - if (psx_taken_BFC0CCC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD44u); - goto label_BFC0CD44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCC8u); - } -label_BFC0CCC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CCC8: 10000023 beq $zero, $zero, 0xBFC0CD58 */ - uint32_t psx_brA_BFC0CCC8 = cpu->gpr[0]; uint32_t psx_brB_BFC0CCC8 = cpu->gpr[0]; - psx_taken_BFC0CCC8 = (psx_brA_BFC0CCC8 == psx_brB_BFC0CCC8); - psx_delay_BFC0CCC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0CCCC: 240A0016 addiu $t2, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240A0016u, cpu->gpr[10], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCCCu); -#endif - if (psx_delay_BFC0CCC8) { - psx_delay_BFC0CCC8 = 0; - if (psx_taken_BFC0CCC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD58u); - goto label_BFC0CD58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCD0u); - } -label_BFC0CCD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CCD0: 0FF03447 jal 0xBFC0D11C */ - cpu->gpr[31] = 0xBFC0CCD8u; /* jal link before delay slot */ - psx_delay_BFC0CCD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC0CCD4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCD4u); -#endif - if (psx_delay_BFC0CCD0) { - psx_delay_BFC0CCD0 = 0; - cpu->gpr[31] = 0xBFC0CCD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D11Cu); - cpu->pc = 0xBFC0D11Cu; return; - } -label_BFC0CCD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CCD8: 10400022 beq $v0, $zero, 0xBFC0CD64 */ - uint32_t psx_brA_BFC0CCD8 = cpu->gpr[2]; uint32_t psx_brB_BFC0CCD8 = cpu->gpr[0]; - psx_taken_BFC0CCD8 = (psx_brA_BFC0CCD8 == psx_brB_BFC0CCD8); - psx_delay_BFC0CCD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0CCDC: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCDCu); -#endif - if (psx_delay_BFC0CCD8) { - psx_delay_BFC0CCD8 = 0; - if (psx_taken_BFC0CCD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - goto label_BFC0CD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCE0u); - } -label_BFC0CCE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CCE0: 0FF036EC jal 0xBFC0DBB0 */ - cpu->gpr[31] = 0xBFC0CCE8u; /* jal link before delay slot */ - psx_delay_BFC0CCE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC0CCE4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCE4u); -#endif - if (psx_delay_BFC0CCE0) { - psx_delay_BFC0CCE0 = 0; - cpu->gpr[31] = 0xBFC0CCE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBB0u); - cpu->pc = 0xBFC0DBB0u; return; - } -label_BFC0CCE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCE8u); -#endif - /* 0xBFC0CCE8: 8E240004 lw $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CCE8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x8E240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CCEC: 0FF03447 jal 0xBFC0D11C */ - cpu->gpr[31] = 0xBFC0CCF4u; /* jal link before delay slot */ - psx_delay_BFC0CCEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CCF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCF0u); -#endif - if (psx_delay_BFC0CCEC) { - psx_delay_BFC0CCEC = 0; - cpu->gpr[31] = 0xBFC0CCF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D11Cu); - cpu->pc = 0xBFC0D11Cu; return; - } -label_BFC0CCF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CCF4: 1440FFFA bne $v0, $zero, 0xBFC0CCE0 */ - uint32_t psx_brA_BFC0CCF4 = cpu->gpr[2]; uint32_t psx_brB_BFC0CCF4 = cpu->gpr[0]; - psx_taken_BFC0CCF4 = (psx_brA_BFC0CCF4 != psx_brB_BFC0CCF4); - psx_delay_BFC0CCF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC0CCF8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CCF8u); -#endif - if (psx_delay_BFC0CCF4) { - psx_delay_BFC0CCF4 = 0; - if (psx_taken_BFC0CCF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCE0u); - goto label_BFC0CCE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CCFCu); - } -label_BFC0CCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CCFC: 1000001A beq $zero, $zero, 0xBFC0CD68 */ - uint32_t psx_brA_BFC0CCFC = cpu->gpr[0]; uint32_t psx_brB_BFC0CCFC = cpu->gpr[0]; - psx_taken_BFC0CCFC = (psx_brA_BFC0CCFC == psx_brB_BFC0CCFC); - psx_delay_BFC0CCFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD00u); -#endif - /* 0xBFC0CD00: 8FA2002C lw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD00u); -#endif - if (psx_delay_BFC0CCFC) { - psx_delay_BFC0CCFC = 0; - if (psx_taken_BFC0CCFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD68u); - goto label_BFC0CD68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD04u); - } -label_BFC0CD04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC0CD04: 10C00006 beq $a2, $zero, 0xBFC0CD20 */ - uint32_t psx_brA_BFC0CD04 = cpu->gpr[6]; uint32_t psx_brB_BFC0CD04 = cpu->gpr[0]; - psx_taken_BFC0CD04 = (psx_brA_BFC0CD04 == psx_brB_BFC0CD04); - psx_delay_BFC0CD04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD08u); -#endif - if (psx_delay_BFC0CD04) { - psx_delay_BFC0CD04 = 0; - if (psx_taken_BFC0CD04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD20u); - goto label_BFC0CD20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD0Cu); - } -label_BFC0CD0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD0Cu); -#endif - /* 0xBFC0CD0C: 8E180000 lw $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD0Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x8E180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0CD14: 37190001 ori $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x1u; - PGXP_ALU(0x37190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD18: 10000012 beq $zero, $zero, 0xBFC0CD64 */ - uint32_t psx_brA_BFC0CD18 = cpu->gpr[0]; uint32_t psx_brB_BFC0CD18 = cpu->gpr[0]; - psx_taken_BFC0CD18 = (psx_brA_BFC0CD18 == psx_brB_BFC0CD18); - psx_delay_BFC0CD18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC0CD1C: AE190000 sw $t9, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD1Cu); return; } g_debug_last_store_pc = 0xBFC0CD1Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD1Cu); -#endif - if (psx_delay_BFC0CD18) { - psx_delay_BFC0CD18 = 0; - if (psx_taken_BFC0CD18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - goto label_BFC0CD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD20u); - } -label_BFC0CD20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD20u); -#endif - /* 0xBFC0CD20: 8E080000 lw $t0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD20u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CD24: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC0CD28: 01014824 and $t1, $t0, $at */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[1]; - PGXP_ALU(0x01014824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD2C: 1000000D beq $zero, $zero, 0xBFC0CD64 */ - uint32_t psx_brA_BFC0CD2C = cpu->gpr[0]; uint32_t psx_brB_BFC0CD2C = cpu->gpr[0]; - psx_taken_BFC0CD2C = (psx_brA_BFC0CD2C == psx_brB_BFC0CD2C); - psx_delay_BFC0CD2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0CD30: AE090000 sw $t1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD30u); return; } g_debug_last_store_pc = 0xBFC0CD30u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAE090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD30u); -#endif - if (psx_delay_BFC0CD2C) { - psx_delay_BFC0CD2C = 0; - if (psx_taken_BFC0CD2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - goto label_BFC0CD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD34u); - } -label_BFC0CD34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC0CD34: 2602000C addiu $v0, $s0, 12 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] + (12)); - PGXP_ALU(0x2602000Cu, cpu->gpr[2], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC0CD38: AE020008 sw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD38u); return; } g_debug_last_store_pc = 0xBFC0CD38u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD3C: 10000009 beq $zero, $zero, 0xBFC0CD64 */ - uint32_t psx_brA_BFC0CD3C = cpu->gpr[0]; uint32_t psx_brB_BFC0CD3C = cpu->gpr[0]; - psx_taken_BFC0CD3C = (psx_brA_BFC0CD3C == psx_brB_BFC0CD3C); - psx_delay_BFC0CD3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC0CD40: AE020004 sw $v0, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD40u); return; } g_debug_last_store_pc = 0xBFC0CD40u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE020004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD40u); -#endif - if (psx_delay_BFC0CD3C) { - psx_delay_BFC0CD3C = 0; - if (psx_taken_BFC0CD3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - goto label_BFC0CD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD44u); - } -label_BFC0CD44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CD44: 0FF03273 jal 0xBFC0C9CC */ - cpu->gpr[31] = 0xBFC0CD4Cu; /* jal link before delay slot */ - psx_delay_BFC0CD44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC0CD48: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD48u); -#endif - if (psx_delay_BFC0CD44) { - psx_delay_BFC0CD44 = 0; - cpu->gpr[31] = 0xBFC0CD4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0C9CCu); - cpu->pc = 0xBFC0C9CCu; return; - } -label_BFC0CD4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD4C: 10000005 beq $zero, $zero, 0xBFC0CD64 */ - uint32_t psx_brA_BFC0CD4C = cpu->gpr[0]; uint32_t psx_brB_BFC0CD4C = cpu->gpr[0]; - psx_taken_BFC0CD4C = (psx_brA_BFC0CD4C == psx_brB_BFC0CD4C); - psx_delay_BFC0CD4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0CD50: AFA2002C sw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD50u); return; } g_debug_last_store_pc = 0xBFC0CD50u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD50u); -#endif - if (psx_delay_BFC0CD4C) { - psx_delay_BFC0CD4C = 0; - if (psx_taken_BFC0CD4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - goto label_BFC0CD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD54u); - } -label_BFC0CD54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0CD54: 240A0016 addiu $t2, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240A0016u, cpu->gpr[10], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD54u); -#endif -label_BFC0CD58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC0CD58: AE2A0018 sw $t2, 24($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD58u); return; } g_debug_last_store_pc = 0xBFC0CD58u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAE2A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD5C: 10000003 beq $zero, $zero, 0xBFC0CD6C */ - uint32_t psx_brA_BFC0CD5C = cpu->gpr[0]; uint32_t psx_brB_BFC0CD5C = cpu->gpr[0]; - psx_taken_BFC0CD5C = (psx_brA_BFC0CD5C == psx_brB_BFC0CD5C); - psx_delay_BFC0CD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0CD60: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD60u); -#endif - if (psx_delay_BFC0CD5C) { - psx_delay_BFC0CD5C = 0; - if (psx_taken_BFC0CD5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD6Cu); - goto label_BFC0CD6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD64u); - } -label_BFC0CD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD64u); -#endif - /* 0xBFC0CD64: 8FA2002C lw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD64u); -#endif -label_BFC0CD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CD68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD68u); -#endif -label_BFC0CD6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD6Cu); -#endif - /* 0xBFC0CD6C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD6Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD70u); -#endif - /* 0xBFC0CD70: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD70u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD74u); -#endif - /* 0xBFC0CD74: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD74u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0CD78: 03E00008 jr $ra */ - psx_delay_BFC0CD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CD7C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD7Cu); -#endif - if (psx_delay_BFC0CD78) { - psx_delay_BFC0CD78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0CD80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0CD80u); - int psx_delay_BFC0CDA4 = 0; - int psx_delay_BFC0CDB0 = 0; - int psx_taken_BFC0CDB0 = 0; - int psx_delay_BFC0CDDC = 0; - int psx_taken_BFC0CDDC = 0; - int psx_delay_BFC0CDE8 = 0; - int psx_taken_BFC0CDE8 = 0; - int psx_delay_BFC0CE00 = 0; - int psx_delay_BFC0CE0C = 0; - int psx_delay_BFC0CE18 = 0; - int psx_delay_BFC0CE24 = 0; - int psx_delay_BFC0CE38 = 0; - int psx_delay_BFC0CE44 = 0; - int psx_delay_BFC0CE6C = 0; - int psx_taken_BFC0CE6C = 0; - int psx_delay_BFC0CE8C = 0; - int psx_taken_BFC0CE8C = 0; - int psx_delay_BFC0CEA0 = 0; - int psx_taken_BFC0CEA0 = 0; - int psx_delay_BFC0CEC8 = 0; - int psx_taken_BFC0CEC8 = 0; - int psx_delay_BFC0CEE8 = 0; - int psx_taken_BFC0CEE8 = 0; - int psx_delay_BFC0CEF8 = 0; - int psx_taken_BFC0CEF8 = 0; - int psx_delay_BFC0CF0C = 0; - int psx_taken_BFC0CF0C = 0; - int psx_delay_BFC0CF18 = 0; - int psx_delay_BFC0CF24 = 0; - int psx_delay_BFC0CF64 = 0; - int psx_delay_BFC0CF7C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0CDACu: goto label_BFC0CDAC; - case 0xBFC0CDB8u: goto label_BFC0CDB8; - case 0xBFC0CDE4u: goto label_BFC0CDE4; - case 0xBFC0CDF0u: goto label_BFC0CDF0; - case 0xBFC0CDF8u: goto label_BFC0CDF8; - case 0xBFC0CE08u: goto label_BFC0CE08; - case 0xBFC0CE14u: goto label_BFC0CE14; - case 0xBFC0CE20u: goto label_BFC0CE20; - case 0xBFC0CE2Cu: goto label_BFC0CE2C; - case 0xBFC0CE40u: goto label_BFC0CE40; - case 0xBFC0CE4Cu: goto label_BFC0CE4C; - case 0xBFC0CE74u: goto label_BFC0CE74; - case 0xBFC0CE78u: goto label_BFC0CE78; - case 0xBFC0CE94u: goto label_BFC0CE94; - case 0xBFC0CEA8u: goto label_BFC0CEA8; - case 0xBFC0CEACu: goto label_BFC0CEAC; - case 0xBFC0CED0u: goto label_BFC0CED0; - case 0xBFC0CED4u: goto label_BFC0CED4; - case 0xBFC0CEF0u: goto label_BFC0CEF0; - case 0xBFC0CF00u: goto label_BFC0CF00; - case 0xBFC0CF14u: goto label_BFC0CF14; - case 0xBFC0CF18u: goto label_BFC0CF18; - case 0xBFC0CF20u: goto label_BFC0CF20; - case 0xBFC0CF2Cu: goto label_BFC0CF2C; - case 0xBFC0CF6Cu: goto label_BFC0CF6C; - case 0xBFC0CF78u: goto label_BFC0CF78; - default: break; - } - } -label_BFC0CD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CD80: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0CD84: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD84u); return; } g_debug_last_store_pc = 0xBFC0CD84u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD88u); -#endif - /* 0xBFC0CD88: 8FAE0058 lw $t6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD88u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0058u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0CD8C: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0CD90: 2718A020 addiu $t8, $t8, -24544 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24544)); - PGXP_ALU(0x2718A020u, cpu->gpr[24], _pgx1, 0xFFFFA020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0CD94: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0CD98: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CD98u); return; } g_debug_last_store_pc = 0xBFC0CD98u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC0CD9C: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDA0u); -#endif - /* 0xBFC0CDA0: 8C640000 lw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDA0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x8C640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CDA4: 0FF033E1 jal 0xBFC0CF84 */ - cpu->gpr[31] = 0xBFC0CDACu; /* jal link before delay slot */ - psx_delay_BFC0CDA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0CDA8: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDA8u); return; } g_debug_last_store_pc = 0xBFC0CDA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDA8u); -#endif - if (psx_delay_BFC0CDA4) { - psx_delay_BFC0CDA4 = 0; - cpu->gpr[31] = 0xBFC0CDACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF84u); - cpu->pc = 0xBFC0CF84u; return; - } -label_BFC0CDAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CDACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDACu); -#endif - /* 0xBFC0CDAC: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0CDB0: 04400071 bltz $v0, 0xBFC0CF78 */ - uint32_t psx_brA_BFC0CDB0 = cpu->gpr[2]; - psx_taken_BFC0CDB0 = ((int32_t)psx_brA_BFC0CDB0 < 0); - psx_delay_BFC0CDB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDB4u); -#endif - /* 0xBFC0CDB4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDB4u); -#endif - if (psx_delay_BFC0CDB0) { - psx_delay_BFC0CDB0 = 0; - if (psx_taken_BFC0CDB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF78u); - goto label_BFC0CF78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CDB8u); - } -label_BFC0CDB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CDB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDB8u); -#endif - /* 0xBFC0CDB8: 8FA80058 lw $t0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDB8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80058u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0CDBC: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDBCu); return; } g_debug_last_store_pc = 0xBFC0CDBCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0CDC0: 3C10A001 lui $s0, 0xA001 */ - cpu->gpr[16] = 0xA0010000u; - PGXP_ALU(0x3C10A001u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0CDC4: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDC8u); -#endif - /* 0xBFC0CDC8: 8C6A0000 lw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDC8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC0CDCC: 02098021 addu $s0, $s0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[9]; - PGXP_ALU(0x02098021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0CDD0: 0002C900 sll $t9, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 4u; - PGXP_ALU(0x0002C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDD4u); -#endif - /* 0xBFC0CDD4: 8E10A028 lw $s0, -24536($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -24536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-24536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CDD4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10A028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CDD8: 2401006E addiu $at, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2401006Eu, cpu->gpr[1], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0CDDC: 15410004 bne $t2, $at, 0xBFC0CDF0 */ - uint32_t psx_brA_BFC0CDDC = cpu->gpr[10]; uint32_t psx_brB_BFC0CDDC = cpu->gpr[1]; - psx_taken_BFC0CDDC = (psx_brA_BFC0CDDC != psx_brB_BFC0CDDC); - psx_delay_BFC0CDDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000014u); -#endif - /* 0xBFC0CDE0: 00592025 or $a0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[2] | cpu->gpr[25]; - PGXP_ALU(0x00592025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDE0u); -#endif - if (psx_delay_BFC0CDDC) { - psx_delay_BFC0CDDC = 0; - if (psx_taken_BFC0CDDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CDF0u); - goto label_BFC0CDF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CDE4u); - } -label_BFC0CDE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CDE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC0CDE4: 240B000F addiu $t3, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x240B000Fu, cpu->gpr[11], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CDE8: 10000003 beq $zero, $zero, 0xBFC0CDF8 */ - uint32_t psx_brA_BFC0CDE8 = cpu->gpr[0]; uint32_t psx_brB_BFC0CDE8 = cpu->gpr[0]; - psx_taken_BFC0CDE8 = (psx_brA_BFC0CDE8 == psx_brB_BFC0CDE8); - psx_delay_BFC0CDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC0CDEC: A3AB0040 sb $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CDECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (64)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDECu); -#endif - if (psx_delay_BFC0CDE8) { - psx_delay_BFC0CDE8 = 0; - if (psx_taken_BFC0CDE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CDF8u); - goto label_BFC0CDF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CDF0u); - } -label_BFC0CDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC0CDF0: 240C0007 addiu $t4, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x240C0007u, cpu->gpr[12], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0CDF4: A3AC0040 sb $t4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CDF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (64)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0040u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDF4u); -#endif -label_BFC0CDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC0CDF8: 240D0093 addiu $t5, $zero, 147 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (147)); - PGXP_ALU(0x240D0093u, cpu->gpr[13], _pgx1, 0x00000093u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC0CDFC: A3AD0044 sb $t5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CDFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (68)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0044u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE00: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CE08u; /* jal link before delay slot */ - psx_delay_BFC0CE00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC0CE04: A2040001 sb $a0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CE04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA2040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE04u); -#endif - if (psx_delay_BFC0CE00) { - psx_delay_BFC0CE00 = 0; - cpu->gpr[31] = 0xBFC0CE08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0CE08: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE0C: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CE14u; /* jal link before delay slot */ - psx_delay_BFC0CE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC0CE10: A20E0002 sb $t6, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CE10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA20E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE10u); -#endif - if (psx_delay_BFC0CE0C) { - psx_delay_BFC0CE0C = 0; - cpu->gpr[31] = 0xBFC0CE14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE14u); -#endif - /* 0xBFC0CE14: 93AF0044 lbu $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 15, 0x20000000u); - PGXP_LOAD(0x93AF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE18: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CE20u; /* jal link before delay slot */ - psx_delay_BFC0CE18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC0CE1C: A20F0000 sb $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CE1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA20F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE1Cu); -#endif - if (psx_delay_BFC0CE18) { - psx_delay_BFC0CE18 = 0; - cpu->gpr[31] = 0xBFC0CE20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CE20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE20u); -#endif - /* 0xBFC0CE20: 93B80040 lbu $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (64)), 24, 0x20000000u); - PGXP_LOAD(0x93B80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE24: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CE2Cu; /* jal link before delay slot */ - psx_delay_BFC0CE24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC0CE28: A2180000 sb $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CE28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA2180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE28u); -#endif - if (psx_delay_BFC0CE24) { - psx_delay_BFC0CE24 = 0; - cpu->gpr[31] = 0xBFC0CE2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CE2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0CE2C: 3C08BFC1 lui $t0, 0xBFC1 */ - cpu->gpr[8] = 0xBFC10000u; - PGXP_ALU(0x3C08BFC1u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE30u); -#endif - /* 0xBFC0CE30: 8D08E530 lw $t0, -6864($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -6864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-6864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08E530u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0CE34: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE38: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CE40u; /* jal link before delay slot */ - psx_delay_BFC0CE38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0CE3C: A119000E sb $t9, 14($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 14; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CE3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (14)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA119000Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE3Cu); -#endif - if (psx_delay_BFC0CE38) { - psx_delay_BFC0CE38 = 0; - cpu->gpr[31] = 0xBFC0CE40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CE40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE40u); -#endif - /* 0xBFC0CE40: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CE44: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC0CE4Cu; /* jal link before delay slot */ - psx_delay_BFC0CE44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0CE48: 2484000A addiu $a0, $a0, 10 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (10)); - PGXP_ALU(0x2484000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE48u); -#endif - if (psx_delay_BFC0CE44) { - psx_delay_BFC0CE44 = 0; - cpu->gpr[31] = 0xBFC0CE4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC0CE4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0CE4C: 24097530 addiu $t1, $zero, 30000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (30000)); - PGXP_ALU(0x24097530u, cpu->gpr[9], _pgx1, 0x00007530u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0CE50: AFA9003C sw $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE50u); return; } g_debug_last_store_pc = 0xBFC0CE50u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE54u); -#endif - /* 0xBFC0CE54: 8FAA003C lw $t2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE54u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA003Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CE58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0CE5C: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC0CE60: AFAB003C sw $t3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE60u); return; } g_debug_last_store_pc = 0xBFC0CE60u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB003Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE64u); -#endif - /* 0xBFC0CE64: 8FAC003C lw $t4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE64u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC003Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CE68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0CE6C: 19800009 blez $t4, 0xBFC0CE94 */ - uint32_t psx_brA_BFC0CE6C = cpu->gpr[12]; - psx_taken_BFC0CE6C = ((int32_t)psx_brA_BFC0CE6C <= 0); - psx_delay_BFC0CE6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CE70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE70u); -#endif - if (psx_delay_BFC0CE6C) { - psx_delay_BFC0CE6C = 0; - if (psx_taken_BFC0CE6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CE94u); - goto label_BFC0CE94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CE74u); - } -label_BFC0CE74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE74u); -#endif - /* 0xBFC0CE74: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE74u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE74u); -#endif -label_BFC0CE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CE78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0CE7C: 25AEFFFF addiu $t6, $t5, -1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); - PGXP_ALU(0x25AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC0CE80: AFAE003C sw $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE80u); return; } g_debug_last_store_pc = 0xBFC0CE80u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE84u); -#endif - /* 0xBFC0CE84: 8FAF003C lw $t7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE84u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CE88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0CE8C: 1DE0FFFA bgtz $t7, 0xBFC0CE78 */ - uint32_t psx_brA_BFC0CE8C = cpu->gpr[15]; - psx_taken_BFC0CE8C = ((int32_t)psx_brA_BFC0CE8C > 0); - psx_delay_BFC0CE8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE90u); -#endif - /* 0xBFC0CE90: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CE90u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE90u); -#endif - if (psx_delay_BFC0CE8C) { - psx_delay_BFC0CE8C = 0; - if (psx_taken_BFC0CE8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CE78u); - goto label_BFC0CE78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CE94u); - } -label_BFC0CE94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CE94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE94u); -#endif - /* 0xBFC0CE94: 92020001 lbu $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x92020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CE98: 240303E7 addiu $v1, $zero, 999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (999)); - PGXP_ALU(0x240303E7u, cpu->gpr[3], _pgx1, 0x000003E7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC0CE9C: 30580001 andi $t8, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30580001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0CEA0: 1300001D beq $t8, $zero, 0xBFC0CF18 */ - uint32_t psx_brA_BFC0CEA0 = cpu->gpr[24]; uint32_t psx_brB_BFC0CEA0 = cpu->gpr[0]; - psx_taken_BFC0CEA0 = (psx_brA_BFC0CEA0 == psx_brB_BFC0CEA0); - psx_delay_BFC0CEA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0CEA4: 240F0050 addiu $t7, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240F0050u, cpu->gpr[15], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEA4u); -#endif - if (psx_delay_BFC0CEA0) { - psx_delay_BFC0CEA0 = 0; - if (psx_taken_BFC0CEA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF18u); - goto label_BFC0CF18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CEA8u); - } -label_BFC0CEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0CEA8: 2419012C addiu $t9, $zero, 300 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (300)); - PGXP_ALU(0x2419012Cu, cpu->gpr[25], _pgx1, 0x0000012Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEA8u); -#endif -label_BFC0CEAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CEACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0CEAC: AFB90038 sw $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEACu); return; } g_debug_last_store_pc = 0xBFC0CEACu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEB0u); -#endif - /* 0xBFC0CEB0: 8FA80038 lw $t0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEB0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80038u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CEB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0CEB8: 2509FFFF addiu $t1, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2509FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0CEBC: AFA90038 sw $t1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEBCu); return; } g_debug_last_store_pc = 0xBFC0CEBCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEC0u); -#endif - /* 0xBFC0CEC0: 8FAA0038 lw $t2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEC0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0038u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CEC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0CEC8: 19400009 blez $t2, 0xBFC0CEF0 */ - uint32_t psx_brA_BFC0CEC8 = cpu->gpr[10]; - psx_taken_BFC0CEC8 = ((int32_t)psx_brA_BFC0CEC8 <= 0); - psx_delay_BFC0CEC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CECC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CECCu); -#endif - if (psx_delay_BFC0CEC8) { - psx_delay_BFC0CEC8 = 0; - if (psx_taken_BFC0CEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CEF0u); - goto label_BFC0CEF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CED0u); - } -label_BFC0CED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CED0u); -#endif - /* 0xBFC0CED0: 8FAB0038 lw $t3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CED0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0038u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CED0u); -#endif -label_BFC0CED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0CED8: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0CEDC: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEDCu); return; } g_debug_last_store_pc = 0xBFC0CEDCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEE0u); -#endif - /* 0xBFC0CEE0: 8FAD0038 lw $t5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEE0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0038u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CEE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0CEE8: 1DA0FFFA bgtz $t5, 0xBFC0CED4 */ - uint32_t psx_brA_BFC0CEE8 = cpu->gpr[13]; - psx_taken_BFC0CEE8 = ((int32_t)psx_brA_BFC0CEE8 > 0); - psx_delay_BFC0CEE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEECu); -#endif - /* 0xBFC0CEEC: 8FAB0038 lw $t3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CEECu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0038u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEECu); -#endif - if (psx_delay_BFC0CEE8) { - psx_delay_BFC0CEE8 = 0; - if (psx_taken_BFC0CEE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CED4u); - goto label_BFC0CED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CEF0u); - } -label_BFC0CEF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CEF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEF0u); -#endif - /* 0xBFC0CEF0: 92000003 lbu $zero, 3($s0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (3)), 0, 0x10000u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0CEF4: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0CEF8: 18600007 blez $v1, 0xBFC0CF18 */ - uint32_t psx_brA_BFC0CEF8 = cpu->gpr[3]; - psx_taken_BFC0CEF8 = ((int32_t)psx_brA_BFC0CEF8 <= 0); - psx_delay_BFC0CEF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0CEFC: 240F0050 addiu $t7, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240F0050u, cpu->gpr[15], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CEFCu); -#endif - if (psx_delay_BFC0CEF8) { - psx_delay_BFC0CEF8 = 0; - if (psx_taken_BFC0CEF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF18u); - goto label_BFC0CF18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF00u); - } -label_BFC0CF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF00u); -#endif - /* 0xBFC0CF00: 92020001 lbu $v0, 1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (1)), 2, 0x10000u); - PGXP_LOAD(0x92020001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0CF08: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0CF0C: 15C0FFE7 bne $t6, $zero, 0xBFC0CEAC */ - uint32_t psx_brA_BFC0CF0C = cpu->gpr[14]; uint32_t psx_brB_BFC0CF0C = cpu->gpr[0]; - psx_taken_BFC0CF0C = (psx_brA_BFC0CF0C != psx_brB_BFC0CF0C); - psx_delay_BFC0CF0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0CF10: 2419012C addiu $t9, $zero, 300 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (300)); - PGXP_ALU(0x2419012Cu, cpu->gpr[25], _pgx1, 0x0000012Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF10u); -#endif - if (psx_delay_BFC0CF0C) { - psx_delay_BFC0CF0C = 0; - if (psx_taken_BFC0CF0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CEACu); - goto label_BFC0CEAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF14u); - } -label_BFC0CF14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0CF14: 240F0050 addiu $t7, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240F0050u, cpu->gpr[15], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF14u); -#endif -label_BFC0CF18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CF18: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CF20u; /* jal link before delay slot */ - psx_delay_BFC0CF18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC0CF1C: A20F0002 sb $t7, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CF1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA20F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF1Cu); -#endif - if (psx_delay_BFC0CF18) { - psx_delay_BFC0CF18 = 0; - cpu->gpr[31] = 0xBFC0CF20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CF20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0CF20: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CF24: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0CF2Cu; /* jal link before delay slot */ - psx_delay_BFC0CF24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC0CF28: A2180002 sb $t8, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0CF28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA2180002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF28u); -#endif - if (psx_delay_BFC0CF24) { - psx_delay_BFC0CF24 = 0; - cpu->gpr[31] = 0xBFC0CF2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0CF2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF2Cu); -#endif - /* 0xBFC0CF2C: 8FB90058 lw $t9, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CF2Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90058u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0CF30: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0CF34: 00194100 sll $t0, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 4u; - PGXP_ALU(0x00194100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0CF38: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0CF3C: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0CF40: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0CF44: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0CF48: 3C0AA001 lui $t2, 0xA001 */ - cpu->gpr[10] = 0xA0010000u; - PGXP_ALU(0x3C0AA001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0CF4C: 254ABF54 addiu $t2, $t2, -16556 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-16556)); - PGXP_ALU(0x254ABF54u, cpu->gpr[10], _pgx1, 0xFFFFBF54u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0CF50: 2529BF48 addiu $t1, $t1, -16568 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-16568)); - PGXP_ALU(0x2529BF48u, cpu->gpr[9], _pgx1, 0xFFFFBF48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x308u); -#endif - /* 0xBFC0CF54: 01091821 addu $v1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x504u); -#endif - /* 0xBFC0CF58: 010A1021 addu $v0, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[10]; - PGXP_ALU(0x010A1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0CF5C: AC620008 sw $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CF5Cu); return; } g_debug_last_store_pc = 0xBFC0CF5Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0CF60: AC620004 sw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CF60u); return; } g_debug_last_store_pc = 0xBFC0CF60u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0CF64: 0FF00698 jal 0xBFC01A60 */ - cpu->gpr[31] = 0xBFC0CF6Cu; /* jal link before delay slot */ - psx_delay_BFC0CF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0CF68: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF68u); -#endif - if (psx_delay_BFC0CF64) { - psx_delay_BFC0CF64 = 0; - cpu->gpr[31] = 0xBFC0CF6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC01A60u); - cpu->pc = 0xBFC01A60u; return; - } -label_BFC0CF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF6Cu); -#endif - /* 0xBFC0CF6C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CF6Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF74u); -#endif - /* 0xBFC0CF74: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0CF74u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF74u); -#endif -label_BFC0CF78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0CF78: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0CF7C: 03E00008 jr $ra */ - psx_delay_BFC0CF7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF80u); -#endif - if (psx_delay_BFC0CF7C) { - psx_delay_BFC0CF7C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0CF84(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0CF84u); - int psx_delay_BFC0CF84 = 0; - int psx_taken_BFC0CF84 = 0; - int psx_delay_BFC0CF8C = 0; - int psx_taken_BFC0CF8C = 0; - int psx_delay_BFC0CF94 = 0; - int psx_taken_BFC0CF94 = 0; - int psx_delay_BFC0CF9C = 0; - int psx_taken_BFC0CF9C = 0; - int psx_delay_BFC0CFA4 = 0; - int psx_taken_BFC0CFA4 = 0; - int psx_delay_BFC0CFAC = 0; - int psx_taken_BFC0CFAC = 0; - int psx_delay_BFC0CFB4 = 0; - int psx_taken_BFC0CFB4 = 0; - int psx_delay_BFC0CFBC = 0; - int psx_taken_BFC0CFBC = 0; - int psx_delay_BFC0CFC4 = 0; - int psx_taken_BFC0CFC4 = 0; - int psx_delay_BFC0CFCC = 0; - int psx_taken_BFC0CFCC = 0; - int psx_delay_BFC0CFD4 = 0; - int psx_taken_BFC0CFD4 = 0; - int psx_delay_BFC0CFDC = 0; - int psx_taken_BFC0CFDC = 0; - int psx_delay_BFC0CFE4 = 0; - int psx_taken_BFC0CFE4 = 0; - int psx_delay_BFC0CFF0 = 0; - int psx_taken_BFC0CFF0 = 0; - int psx_delay_BFC0CFF8 = 0; - int psx_taken_BFC0CFF8 = 0; - int psx_delay_BFC0D000 = 0; - int psx_taken_BFC0D000 = 0; - int psx_delay_BFC0D008 = 0; - int psx_taken_BFC0D008 = 0; - int psx_delay_BFC0D010 = 0; - int psx_taken_BFC0D010 = 0; - int psx_delay_BFC0D018 = 0; - int psx_taken_BFC0D018 = 0; - int psx_delay_BFC0D020 = 0; - int psx_taken_BFC0D020 = 0; - int psx_delay_BFC0D028 = 0; - int psx_taken_BFC0D028 = 0; - int psx_delay_BFC0D034 = 0; - int psx_taken_BFC0D034 = 0; - int psx_delay_BFC0D03C = 0; - int psx_taken_BFC0D03C = 0; - int psx_delay_BFC0D048 = 0; - int psx_taken_BFC0D048 = 0; - int psx_delay_BFC0D050 = 0; - int psx_taken_BFC0D050 = 0; - int psx_delay_BFC0D058 = 0; - int psx_taken_BFC0D058 = 0; - int psx_delay_BFC0D060 = 0; - int psx_taken_BFC0D060 = 0; - int psx_delay_BFC0D06C = 0; - int psx_taken_BFC0D06C = 0; - int psx_delay_BFC0D074 = 0; - int psx_taken_BFC0D074 = 0; - int psx_delay_BFC0D080 = 0; - int psx_taken_BFC0D080 = 0; - int psx_delay_BFC0D088 = 0; - int psx_taken_BFC0D088 = 0; - int psx_delay_BFC0D090 = 0; - int psx_taken_BFC0D090 = 0; - int psx_delay_BFC0D098 = 0; - int psx_taken_BFC0D098 = 0; - int psx_delay_BFC0D0A0 = 0; - int psx_taken_BFC0D0A0 = 0; - int psx_delay_BFC0D0A8 = 0; - int psx_taken_BFC0D0A8 = 0; - int psx_delay_BFC0D0B4 = 0; - int psx_taken_BFC0D0B4 = 0; - int psx_delay_BFC0D0BC = 0; - int psx_taken_BFC0D0BC = 0; - int psx_delay_BFC0D0C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0CF8Cu: goto label_BFC0CF8C; - case 0xBFC0CF94u: goto label_BFC0CF94; - case 0xBFC0CF9Cu: goto label_BFC0CF9C; - case 0xBFC0CFA4u: goto label_BFC0CFA4; - case 0xBFC0CFACu: goto label_BFC0CFAC; - case 0xBFC0CFB4u: goto label_BFC0CFB4; - case 0xBFC0CFBCu: goto label_BFC0CFBC; - case 0xBFC0CFC4u: goto label_BFC0CFC4; - case 0xBFC0CFCCu: goto label_BFC0CFCC; - case 0xBFC0CFD4u: goto label_BFC0CFD4; - case 0xBFC0CFDCu: goto label_BFC0CFDC; - case 0xBFC0CFE4u: goto label_BFC0CFE4; - case 0xBFC0CFECu: goto label_BFC0CFEC; - case 0xBFC0CFF0u: goto label_BFC0CFF0; - case 0xBFC0CFF8u: goto label_BFC0CFF8; - case 0xBFC0D000u: goto label_BFC0D000; - case 0xBFC0D008u: goto label_BFC0D008; - case 0xBFC0D010u: goto label_BFC0D010; - case 0xBFC0D018u: goto label_BFC0D018; - case 0xBFC0D020u: goto label_BFC0D020; - case 0xBFC0D028u: goto label_BFC0D028; - case 0xBFC0D030u: goto label_BFC0D030; - case 0xBFC0D03Cu: goto label_BFC0D03C; - case 0xBFC0D044u: goto label_BFC0D044; - case 0xBFC0D050u: goto label_BFC0D050; - case 0xBFC0D058u: goto label_BFC0D058; - case 0xBFC0D060u: goto label_BFC0D060; - case 0xBFC0D068u: goto label_BFC0D068; - case 0xBFC0D074u: goto label_BFC0D074; - case 0xBFC0D07Cu: goto label_BFC0D07C; - case 0xBFC0D088u: goto label_BFC0D088; - case 0xBFC0D090u: goto label_BFC0D090; - case 0xBFC0D098u: goto label_BFC0D098; - case 0xBFC0D0A0u: goto label_BFC0D0A0; - case 0xBFC0D0A8u: goto label_BFC0D0A8; - case 0xBFC0D0B0u: goto label_BFC0D0B0; - case 0xBFC0D0BCu: goto label_BFC0D0BC; - case 0xBFC0D0C4u: goto label_BFC0D0C4; - default: break; - } - } -label_BFC0CF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF84: 1000001A beq $zero, $zero, 0xBFC0CFF0 */ - uint32_t psx_brA_BFC0CF84 = cpu->gpr[0]; uint32_t psx_brB_BFC0CF84 = cpu->gpr[0]; - psx_taken_BFC0CF84 = (psx_brA_BFC0CF84 == psx_brB_BFC0CF84); - psx_delay_BFC0CF84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CF88: 24010708 addiu $at, $zero, 1800 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1800)); - PGXP_ALU(0x24010708u, cpu->gpr[1], _pgx1, 0x00000708u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF88u); -#endif - if (psx_delay_BFC0CF84) { - psx_delay_BFC0CF84 = 0; - if (psx_taken_BFC0CF84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFF0u); - goto label_BFC0CFF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF8Cu); - } -label_BFC0CF8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF8C: 1000004D beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CF8C = cpu->gpr[0]; uint32_t psx_brB_BFC0CF8C = cpu->gpr[0]; - psx_taken_BFC0CF8C = (psx_brA_BFC0CF8C == psx_brB_BFC0CF8C); - psx_delay_BFC0CF8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CF90: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF90u); -#endif - if (psx_delay_BFC0CF8C) { - psx_delay_BFC0CF8C = 0; - if (psx_taken_BFC0CF8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF94u); - } -label_BFC0CF94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF94: 1000004B beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CF94 = cpu->gpr[0]; uint32_t psx_brB_BFC0CF94 = cpu->gpr[0]; - psx_taken_BFC0CF94 = (psx_brA_BFC0CF94 == psx_brB_BFC0CF94); - psx_delay_BFC0CF94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CF98: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CF98u); -#endif - if (psx_delay_BFC0CF94) { - psx_delay_BFC0CF94 = 0; - if (psx_taken_BFC0CF94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF9Cu); - } -label_BFC0CF9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CF9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CF9C: 10000049 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CF9C = cpu->gpr[0]; uint32_t psx_brB_BFC0CF9C = cpu->gpr[0]; - psx_taken_BFC0CF9C = (psx_brA_BFC0CF9C == psx_brB_BFC0CF9C); - psx_delay_BFC0CF9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFA0: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFA0u); -#endif - if (psx_delay_BFC0CF9C) { - psx_delay_BFC0CF9C = 0; - if (psx_taken_BFC0CF9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFA4u); - } -label_BFC0CFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFA4: 10000047 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFA4 = cpu->gpr[0]; uint32_t psx_brB_BFC0CFA4 = cpu->gpr[0]; - psx_taken_BFC0CFA4 = (psx_brA_BFC0CFA4 == psx_brB_BFC0CFA4); - psx_delay_BFC0CFA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFA8: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFA8u); -#endif - if (psx_delay_BFC0CFA4) { - psx_delay_BFC0CFA4 = 0; - if (psx_taken_BFC0CFA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFACu); - } -label_BFC0CFAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFAC: 10000045 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFAC = cpu->gpr[0]; uint32_t psx_brB_BFC0CFAC = cpu->gpr[0]; - psx_taken_BFC0CFAC = (psx_brA_BFC0CFAC == psx_brB_BFC0CFAC); - psx_delay_BFC0CFAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFB0: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFB0u); -#endif - if (psx_delay_BFC0CFAC) { - psx_delay_BFC0CFAC = 0; - if (psx_taken_BFC0CFAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFB4u); - } -label_BFC0CFB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFB4: 10000043 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFB4 = cpu->gpr[0]; uint32_t psx_brB_BFC0CFB4 = cpu->gpr[0]; - psx_taken_BFC0CFB4 = (psx_brA_BFC0CFB4 == psx_brB_BFC0CFB4); - psx_delay_BFC0CFB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFB8: 24030005 addiu $v1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24030005u, cpu->gpr[3], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFB8u); -#endif - if (psx_delay_BFC0CFB4) { - psx_delay_BFC0CFB4 = 0; - if (psx_taken_BFC0CFB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFBCu); - } -label_BFC0CFBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFBC: 10000041 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFBC = cpu->gpr[0]; uint32_t psx_brB_BFC0CFBC = cpu->gpr[0]; - psx_taken_BFC0CFBC = (psx_brA_BFC0CFBC == psx_brB_BFC0CFBC); - psx_delay_BFC0CFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFC0: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFC0u); -#endif - if (psx_delay_BFC0CFBC) { - psx_delay_BFC0CFBC = 0; - if (psx_taken_BFC0CFBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFC4u); - } -label_BFC0CFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFC4: 1000003F beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFC4 = cpu->gpr[0]; uint32_t psx_brB_BFC0CFC4 = cpu->gpr[0]; - psx_taken_BFC0CFC4 = (psx_brA_BFC0CFC4 == psx_brB_BFC0CFC4); - psx_delay_BFC0CFC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFC8: 24030008 addiu $v1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24030008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFC8u); -#endif - if (psx_delay_BFC0CFC4) { - psx_delay_BFC0CFC4 = 0; - if (psx_taken_BFC0CFC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFCCu); - } -label_BFC0CFCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFCC: 1000003D beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFCC = cpu->gpr[0]; uint32_t psx_brB_BFC0CFCC = cpu->gpr[0]; - psx_taken_BFC0CFCC = (psx_brA_BFC0CFCC == psx_brB_BFC0CFCC); - psx_delay_BFC0CFCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFD0: 24030009 addiu $v1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24030009u, cpu->gpr[3], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFD0u); -#endif - if (psx_delay_BFC0CFCC) { - psx_delay_BFC0CFCC = 0; - if (psx_taken_BFC0CFCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFD4u); - } -label_BFC0CFD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFD4: 1000003B beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFD4 = cpu->gpr[0]; uint32_t psx_brB_BFC0CFD4 = cpu->gpr[0]; - psx_taken_BFC0CFD4 = (psx_brA_BFC0CFD4 == psx_brB_BFC0CFD4); - psx_delay_BFC0CFD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFD8: 2403000A addiu $v1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2403000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFD8u); -#endif - if (psx_delay_BFC0CFD4) { - psx_delay_BFC0CFD4 = 0; - if (psx_taken_BFC0CFD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFDCu); - } -label_BFC0CFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFDC: 10000039 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFDC = cpu->gpr[0]; uint32_t psx_brB_BFC0CFDC = cpu->gpr[0]; - psx_taken_BFC0CFDC = (psx_brA_BFC0CFDC == psx_brB_BFC0CFDC); - psx_delay_BFC0CFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFE0: 2403000B addiu $v1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2403000Bu, cpu->gpr[3], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFE0u); -#endif - if (psx_delay_BFC0CFDC) { - psx_delay_BFC0CFDC = 0; - if (psx_taken_BFC0CFDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFE4u); - } -label_BFC0CFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0CFE4: 10000037 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0CFE4 = cpu->gpr[0]; uint32_t psx_brB_BFC0CFE4 = cpu->gpr[0]; - psx_taken_BFC0CFE4 = (psx_brA_BFC0CFE4 == psx_brB_BFC0CFE4); - psx_delay_BFC0CFE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0CFE8: 2403000C addiu $v1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2403000Cu, cpu->gpr[3], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFE8u); -#endif - if (psx_delay_BFC0CFE4) { - psx_delay_BFC0CFE4 = 0; - if (psx_taken_BFC0CFE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFECu); - } -label_BFC0CFEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CFEC: 24010708 addiu $at, $zero, 1800 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1800)); - PGXP_ALU(0x24010708u, cpu->gpr[1], _pgx1, 0x00000708u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFECu); -#endif -label_BFC0CFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0CFF0: 1081FFF8 beq $a0, $at, 0xBFC0CFD4 */ - uint32_t psx_brA_BFC0CFF0 = cpu->gpr[4]; uint32_t psx_brB_BFC0CFF0 = cpu->gpr[1]; - psx_taken_BFC0CFF0 = (psx_brA_BFC0CFF0 == psx_brB_BFC0CFF0); - psx_delay_BFC0CFF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0CFF4: 28810709 slti $at, $a0, 1801 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1801) ? 1 : 0); - PGXP_ALU(0x28810709u, cpu->gpr[1], _pgx1, 0x0709u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFF4u); -#endif - if (psx_delay_BFC0CFF0) { - psx_delay_BFC0CFF0 = 0; - if (psx_taken_BFC0CFF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFD4u); - goto label_BFC0CFD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFF8u); - } -label_BFC0CFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0CFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0CFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CFF8: 10200020 beq $at, $zero, 0xBFC0D07C */ - uint32_t psx_brA_BFC0CFF8 = cpu->gpr[1]; uint32_t psx_brB_BFC0CFF8 = cpu->gpr[0]; - psx_taken_BFC0CFF8 = (psx_brA_BFC0CFF8 == psx_brB_BFC0CFF8); - psx_delay_BFC0CFF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0CFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0CFFC: 24010096 addiu $at, $zero, 150 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (150)); - PGXP_ALU(0x24010096u, cpu->gpr[1], _pgx1, 0x00000096u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0CFFCu); -#endif - if (psx_delay_BFC0CFF8) { - psx_delay_BFC0CFF8 = 0; - if (psx_taken_BFC0CFF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D07Cu); - goto label_BFC0D07C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D000u); - } -label_BFC0D000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D000: 1081FFE8 beq $a0, $at, 0xBFC0CFA4 */ - uint32_t psx_brA_BFC0D000 = cpu->gpr[4]; uint32_t psx_brB_BFC0D000 = cpu->gpr[1]; - psx_taken_BFC0D000 = (psx_brA_BFC0D000 == psx_brB_BFC0D000); - psx_delay_BFC0D000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D004: 28810097 slti $at, $a0, 151 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (151) ? 1 : 0); - PGXP_ALU(0x28810097u, cpu->gpr[1], _pgx1, 0x0097u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D004u); -#endif - if (psx_delay_BFC0D000) { - psx_delay_BFC0D000 = 0; - if (psx_taken_BFC0D000) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFA4u); - goto label_BFC0CFA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D008u); - } -label_BFC0D008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D008: 1020000E beq $at, $zero, 0xBFC0D044 */ - uint32_t psx_brA_BFC0D008 = cpu->gpr[1]; uint32_t psx_brB_BFC0D008 = cpu->gpr[0]; - psx_taken_BFC0D008 = (psx_brA_BFC0D008 == psx_brB_BFC0D008); - psx_delay_BFC0D008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D00C: 2401006E addiu $at, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2401006Eu, cpu->gpr[1], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D00Cu); -#endif - if (psx_delay_BFC0D008) { - psx_delay_BFC0D008 = 0; - if (psx_taken_BFC0D008) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D044u); - goto label_BFC0D044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D010u); - } -label_BFC0D010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D010: 1081FFE0 beq $a0, $at, 0xBFC0CF94 */ - uint32_t psx_brA_BFC0D010 = cpu->gpr[4]; uint32_t psx_brB_BFC0D010 = cpu->gpr[1]; - psx_taken_BFC0D010 = (psx_brA_BFC0D010 == psx_brB_BFC0D010); - psx_delay_BFC0D010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D014: 2881006F slti $at, $a0, 111 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (111) ? 1 : 0); - PGXP_ALU(0x2881006Fu, cpu->gpr[1], _pgx1, 0x006Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D014u); -#endif - if (psx_delay_BFC0D010) { - psx_delay_BFC0D010 = 0; - if (psx_taken_BFC0D010) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF94u); - goto label_BFC0CF94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D018u); - } -label_BFC0D018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D018: 10200005 beq $at, $zero, 0xBFC0D030 */ - uint32_t psx_brA_BFC0D018 = cpu->gpr[1]; uint32_t psx_brB_BFC0D018 = cpu->gpr[0]; - psx_taken_BFC0D018 = (psx_brA_BFC0D018 == psx_brB_BFC0D018); - psx_delay_BFC0D018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D01C: 2401004B addiu $at, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2401004Bu, cpu->gpr[1], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D01Cu); -#endif - if (psx_delay_BFC0D018) { - psx_delay_BFC0D018 = 0; - if (psx_taken_BFC0D018) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D030u); - goto label_BFC0D030; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D020u); - } -label_BFC0D020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D020: 1081FFDA beq $a0, $at, 0xBFC0CF8C */ - uint32_t psx_brA_BFC0D020 = cpu->gpr[4]; uint32_t psx_brB_BFC0D020 = cpu->gpr[1]; - psx_taken_BFC0D020 = (psx_brA_BFC0D020 == psx_brB_BFC0D020); - psx_delay_BFC0D020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D024u); -#endif - if (psx_delay_BFC0D020) { - psx_delay_BFC0D020 = 0; - if (psx_taken_BFC0D020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF8Cu); - goto label_BFC0CF8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D028u); - } -label_BFC0D028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D028: 10000004 beq $zero, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D028 = cpu->gpr[0]; uint32_t psx_brB_BFC0D028 = cpu->gpr[0]; - psx_taken_BFC0D028 = (psx_brA_BFC0D028 == psx_brB_BFC0D028); - psx_delay_BFC0D028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D02C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D02Cu); -#endif - if (psx_delay_BFC0D028) { - psx_delay_BFC0D028 = 0; - if (psx_taken_BFC0D028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D030u); - } -label_BFC0D030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D030: 24010086 addiu $at, $zero, 134 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (134)); - PGXP_ALU(0x24010086u, cpu->gpr[1], _pgx1, 0x00000086u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D034: 1081FFD9 beq $a0, $at, 0xBFC0CF9C */ - uint32_t psx_brA_BFC0D034 = cpu->gpr[4]; uint32_t psx_brB_BFC0D034 = cpu->gpr[1]; - psx_taken_BFC0D034 = (psx_brA_BFC0D034 == psx_brB_BFC0D034); - psx_delay_BFC0D034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D038u); -#endif - if (psx_delay_BFC0D034) { - psx_delay_BFC0D034 = 0; - if (psx_taken_BFC0D034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CF9Cu); - goto label_BFC0CF9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - } -label_BFC0D03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D03C: 10000021 beq $zero, $zero, 0xBFC0D0C4 */ - uint32_t psx_brA_BFC0D03C = cpu->gpr[0]; uint32_t psx_brB_BFC0D03C = cpu->gpr[0]; - psx_taken_BFC0D03C = (psx_brA_BFC0D03C == psx_brB_BFC0D03C); - psx_delay_BFC0D03C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0D040: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D040u); -#endif - if (psx_delay_BFC0D03C) { - psx_delay_BFC0D03C = 0; - if (psx_taken_BFC0D03C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - goto label_BFC0D0C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D044u); - } -label_BFC0D044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D044: 24010258 addiu $at, $zero, 600 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (600)); - PGXP_ALU(0x24010258u, cpu->gpr[1], _pgx1, 0x00000258u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D048: 1081FFDA beq $a0, $at, 0xBFC0CFB4 */ - uint32_t psx_brA_BFC0D048 = cpu->gpr[4]; uint32_t psx_brB_BFC0D048 = cpu->gpr[1]; - psx_taken_BFC0D048 = (psx_brA_BFC0D048 == psx_brB_BFC0D048); - psx_delay_BFC0D048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D04C: 28810259 slti $at, $a0, 601 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (601) ? 1 : 0); - PGXP_ALU(0x28810259u, cpu->gpr[1], _pgx1, 0x0259u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D04Cu); -#endif - if (psx_delay_BFC0D048) { - psx_delay_BFC0D048 = 0; - if (psx_taken_BFC0D048) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFB4u); - goto label_BFC0CFB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D050u); - } -label_BFC0D050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D050: 10200005 beq $at, $zero, 0xBFC0D068 */ - uint32_t psx_brA_BFC0D050 = cpu->gpr[1]; uint32_t psx_brB_BFC0D050 = cpu->gpr[0]; - psx_taken_BFC0D050 = (psx_brA_BFC0D050 == psx_brB_BFC0D050); - psx_delay_BFC0D050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D054: 2401012C addiu $at, $zero, 300 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (300)); - PGXP_ALU(0x2401012Cu, cpu->gpr[1], _pgx1, 0x0000012Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D054u); -#endif - if (psx_delay_BFC0D050) { - psx_delay_BFC0D050 = 0; - if (psx_taken_BFC0D050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D068u); - goto label_BFC0D068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D058u); - } -label_BFC0D058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D058: 1081FFD4 beq $a0, $at, 0xBFC0CFAC */ - uint32_t psx_brA_BFC0D058 = cpu->gpr[4]; uint32_t psx_brB_BFC0D058 = cpu->gpr[1]; - psx_taken_BFC0D058 = (psx_brA_BFC0D058 == psx_brB_BFC0D058); - psx_delay_BFC0D058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D05C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D05Cu); -#endif - if (psx_delay_BFC0D058) { - psx_delay_BFC0D058 = 0; - if (psx_taken_BFC0D058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFACu); - goto label_BFC0CFAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D060u); - } -label_BFC0D060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D060: 1000FFF6 beq $zero, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D060 = cpu->gpr[0]; uint32_t psx_brB_BFC0D060 = cpu->gpr[0]; - psx_taken_BFC0D060 = (psx_brA_BFC0D060 == psx_brB_BFC0D060); - psx_delay_BFC0D060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D064u); -#endif - if (psx_delay_BFC0D060) { - psx_delay_BFC0D060 = 0; - if (psx_taken_BFC0D060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D068u); - } -label_BFC0D068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D068: 240104B0 addiu $at, $zero, 1200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1200)); - PGXP_ALU(0x240104B0u, cpu->gpr[1], _pgx1, 0x000004B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D06C: 1081FFD3 beq $a0, $at, 0xBFC0CFBC */ - uint32_t psx_brA_BFC0D06C = cpu->gpr[4]; uint32_t psx_brB_BFC0D06C = cpu->gpr[1]; - psx_taken_BFC0D06C = (psx_brA_BFC0D06C == psx_brB_BFC0D06C); - psx_delay_BFC0D06C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D070u); -#endif - if (psx_delay_BFC0D06C) { - psx_delay_BFC0D06C = 0; - if (psx_taken_BFC0D06C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFBCu); - goto label_BFC0CFBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D074u); - } -label_BFC0D074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D074: 1000FFF1 beq $zero, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D074 = cpu->gpr[0]; uint32_t psx_brB_BFC0D074 = cpu->gpr[0]; - psx_taken_BFC0D074 = (psx_brA_BFC0D074 == psx_brB_BFC0D074); - psx_delay_BFC0D074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D078u); -#endif - if (psx_delay_BFC0D074) { - psx_delay_BFC0D074 = 0; - if (psx_taken_BFC0D074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D07Cu); - } -label_BFC0D07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D07C: 24012580 addiu $at, $zero, 9600 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9600)); - PGXP_ALU(0x24012580u, cpu->gpr[1], _pgx1, 0x00002580u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D080: 1081FFD6 beq $a0, $at, 0xBFC0CFDC */ - uint32_t psx_brA_BFC0D080 = cpu->gpr[4]; uint32_t psx_brB_BFC0D080 = cpu->gpr[1]; - psx_taken_BFC0D080 = (psx_brA_BFC0D080 == psx_brB_BFC0D080); - psx_delay_BFC0D080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D084: 28812581 slti $at, $a0, 9601 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (9601) ? 1 : 0); - PGXP_ALU(0x28812581u, cpu->gpr[1], _pgx1, 0x2581u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D084u); -#endif - if (psx_delay_BFC0D080) { - psx_delay_BFC0D080 = 0; - if (psx_taken_BFC0D080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFDCu); - goto label_BFC0CFDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D088u); - } -label_BFC0D088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D088: 10200009 beq $at, $zero, 0xBFC0D0B0 */ - uint32_t psx_brA_BFC0D088 = cpu->gpr[1]; uint32_t psx_brB_BFC0D088 = cpu->gpr[0]; - psx_taken_BFC0D088 = (psx_brA_BFC0D088 == psx_brB_BFC0D088); - psx_delay_BFC0D088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D08C: 240112C0 addiu $at, $zero, 4800 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4800)); - PGXP_ALU(0x240112C0u, cpu->gpr[1], _pgx1, 0x000012C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D08Cu); -#endif - if (psx_delay_BFC0D088) { - psx_delay_BFC0D088 = 0; - if (psx_taken_BFC0D088) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0B0u); - goto label_BFC0D0B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D090u); - } -label_BFC0D090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D090: 1081FFCE beq $a0, $at, 0xBFC0CFCC */ - uint32_t psx_brA_BFC0D090 = cpu->gpr[4]; uint32_t psx_brB_BFC0D090 = cpu->gpr[1]; - psx_taken_BFC0D090 = (psx_brA_BFC0D090 == psx_brB_BFC0D090); - psx_delay_BFC0D090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D094: 288112C1 slti $at, $a0, 4801 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4801) ? 1 : 0); - PGXP_ALU(0x288112C1u, cpu->gpr[1], _pgx1, 0x12C1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D094u); -#endif - if (psx_delay_BFC0D090) { - psx_delay_BFC0D090 = 0; - if (psx_taken_BFC0D090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFCCu); - goto label_BFC0CFCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D098u); - } -label_BFC0D098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D098: 1020FFE8 beq $at, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D098 = cpu->gpr[1]; uint32_t psx_brB_BFC0D098 = cpu->gpr[0]; - psx_taken_BFC0D098 = (psx_brA_BFC0D098 == psx_brB_BFC0D098); - psx_delay_BFC0D098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D09C: 24010960 addiu $at, $zero, 2400 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2400)); - PGXP_ALU(0x24010960u, cpu->gpr[1], _pgx1, 0x00000960u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D09Cu); -#endif - if (psx_delay_BFC0D098) { - psx_delay_BFC0D098 = 0; - if (psx_taken_BFC0D098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0A0u); - } -label_BFC0D0A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D0A0: 1081FFC8 beq $a0, $at, 0xBFC0CFC4 */ - uint32_t psx_brA_BFC0D0A0 = cpu->gpr[4]; uint32_t psx_brB_BFC0D0A0 = cpu->gpr[1]; - psx_taken_BFC0D0A0 = (psx_brA_BFC0D0A0 == psx_brB_BFC0D0A0); - psx_delay_BFC0D0A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0A4u); -#endif - if (psx_delay_BFC0D0A0) { - psx_delay_BFC0D0A0 = 0; - if (psx_taken_BFC0D0A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFC4u); - goto label_BFC0CFC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0A8u); - } -label_BFC0D0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0A8: 1000FFE4 beq $zero, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D0A8 = cpu->gpr[0]; uint32_t psx_brB_BFC0D0A8 = cpu->gpr[0]; - psx_taken_BFC0D0A8 = (psx_brA_BFC0D0A8 == psx_brB_BFC0D0A8); - psx_delay_BFC0D0A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0ACu); -#endif - if (psx_delay_BFC0D0A8) { - psx_delay_BFC0D0A8 = 0; - if (psx_taken_BFC0D0A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0B0u); - } -label_BFC0D0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D0B0: 24014B00 addiu $at, $zero, 19200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (19200)); - PGXP_ALU(0x24014B00u, cpu->gpr[1], _pgx1, 0x00004B00u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC0D0B4: 1081FFCB beq $a0, $at, 0xBFC0CFE4 */ - uint32_t psx_brA_BFC0D0B4 = cpu->gpr[4]; uint32_t psx_brB_BFC0D0B4 = cpu->gpr[1]; - psx_taken_BFC0D0B4 = (psx_brA_BFC0D0B4 == psx_brB_BFC0D0B4); - psx_delay_BFC0D0B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0B8u); -#endif - if (psx_delay_BFC0D0B4) { - psx_delay_BFC0D0B4 = 0; - if (psx_taken_BFC0D0B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CFE4u); - goto label_BFC0CFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0BCu); - } -label_BFC0D0BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0BC: 1000FFDF beq $zero, $zero, 0xBFC0D03C */ - uint32_t psx_brA_BFC0D0BC = cpu->gpr[0]; uint32_t psx_brB_BFC0D0BC = cpu->gpr[0]; - psx_taken_BFC0D0BC = (psx_brA_BFC0D0BC == psx_brB_BFC0D0BC); - psx_delay_BFC0D0BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0C0u); -#endif - if (psx_delay_BFC0D0BC) { - psx_delay_BFC0D0BC = 0; - if (psx_taken_BFC0D0BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D03Cu); - goto label_BFC0D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0C4u); - } -label_BFC0D0C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D0C4: 03E00008 jr $ra */ - psx_delay_BFC0D0C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0D0C8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0C8u); -#endif - if (psx_delay_BFC0D0C4) { - psx_delay_BFC0D0C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D0CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D0CCu); - int psx_delay_BFC0D0E8 = 0; - int psx_taken_BFC0D0E8 = 0; - int psx_delay_BFC0D0F4 = 0; - int psx_delay_BFC0D100 = 0; - int psx_taken_BFC0D100 = 0; - int psx_delay_BFC0D114 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D0E0u: goto label_BFC0D0E0; - case 0xBFC0D0F0u: goto label_BFC0D0F0; - case 0xBFC0D0FCu: goto label_BFC0D0FC; - case 0xBFC0D108u: goto label_BFC0D108; - default: break; - } - } -label_BFC0D0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D0CC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D0D0: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D0D4: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D0D8: 2463E550 addiu $v1, $v1, -6832 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-6832)); - PGXP_ALU(0x2463E550u, cpu->gpr[3], _pgx1, 0xFFFFE550u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D0DC: 2442E568 addiu $v0, $v0, -6808 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-6808)); - PGXP_ALU(0x2442E568u, cpu->gpr[2], _pgx1, 0xFFFFE568u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0DCu); -#endif -label_BFC0D0E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0E0u); -#endif - /* 0xBFC0D0E0: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D0E0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC0D0E8: 148E0004 bne $a0, $t6, 0xBFC0D0FC */ - uint32_t psx_brA_BFC0D0E8 = cpu->gpr[4]; uint32_t psx_brB_BFC0D0E8 = cpu->gpr[14]; - psx_taken_BFC0D0E8 = (psx_brA_BFC0D0E8 != psx_brB_BFC0D0E8); - psx_delay_BFC0D0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0ECu); -#endif - if (psx_delay_BFC0D0E8) { - psx_delay_BFC0D0E8 = 0; - if (psx_taken_BFC0D0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0FCu); - goto label_BFC0D0FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0F0u); - } -label_BFC0D0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0F0u); -#endif - /* 0xBFC0D0F0: 8C62FFFC lw $v0, -4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D0F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C62FFFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D0F4: 03E00008 jr $ra */ - psx_delay_BFC0D0F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D0F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0F8u); -#endif - if (psx_delay_BFC0D0F4) { - psx_delay_BFC0D0F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC0D0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D0FC: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0D100: 1462FFF7 bne $v1, $v0, 0xBFC0D0E0 */ - uint32_t psx_brA_BFC0D100 = cpu->gpr[3]; uint32_t psx_brB_BFC0D100 = cpu->gpr[2]; - psx_taken_BFC0D100 = (psx_brA_BFC0D100 != psx_brB_BFC0D100); - psx_delay_BFC0D100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D104u); -#endif - if (psx_delay_BFC0D100) { - psx_delay_BFC0D100 = 0; - if (psx_taken_BFC0D100) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0E0u); - goto label_BFC0D0E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D108u); - } -label_BFC0D108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D108: 3C02BFC1 lui $v0, 0xBFC1 */ - cpu->gpr[2] = 0xBFC10000u; - PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D10Cu); -#endif - /* 0xBFC0D10C: 8C42E564 lw $v0, -6812($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -6812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-6812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D10Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42E564u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D110: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D114: 03E00008 jr $ra */ - psx_delay_BFC0D114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D118u); -#endif - if (psx_delay_BFC0D114) { - psx_delay_BFC0D114 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D11C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D11Cu); - int psx_delay_BFC0D148 = 0; - int psx_taken_BFC0D148 = 0; - int psx_delay_BFC0D150 = 0; - int psx_taken_BFC0D150 = 0; - int psx_delay_BFC0D15C = 0; - int psx_taken_BFC0D15C = 0; - int psx_delay_BFC0D170 = 0; - int psx_taken_BFC0D170 = 0; - int psx_delay_BFC0D198 = 0; - int psx_taken_BFC0D198 = 0; - int psx_delay_BFC0D1B8 = 0; - int psx_taken_BFC0D1B8 = 0; - int psx_delay_BFC0D1E4 = 0; - int psx_taken_BFC0D1E4 = 0; - int psx_delay_BFC0D204 = 0; - int psx_taken_BFC0D204 = 0; - int psx_delay_BFC0D210 = 0; - int psx_taken_BFC0D210 = 0; - int psx_delay_BFC0D224 = 0; - int psx_taken_BFC0D224 = 0; - int psx_delay_BFC0D230 = 0; - int psx_delay_BFC0D238 = 0; - int psx_taken_BFC0D238 = 0; - int psx_delay_BFC0D244 = 0; - int psx_taken_BFC0D244 = 0; - int psx_delay_BFC0D254 = 0; - int psx_delay_BFC0D264 = 0; - int psx_delay_BFC0D284 = 0; - int psx_delay_BFC0D290 = 0; - int psx_delay_BFC0D2A4 = 0; - int psx_delay_BFC0D2B8 = 0; - int psx_taken_BFC0D2B8 = 0; - int psx_delay_BFC0D2C4 = 0; - int psx_taken_BFC0D2C4 = 0; - int psx_delay_BFC0D2DC = 0; - int psx_delay_BFC0D2E4 = 0; - int psx_taken_BFC0D2E4 = 0; - int psx_delay_BFC0D310 = 0; - int psx_taken_BFC0D310 = 0; - int psx_delay_BFC0D330 = 0; - int psx_taken_BFC0D330 = 0; - int psx_delay_BFC0D344 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D150u: goto label_BFC0D150; - case 0xBFC0D158u: goto label_BFC0D158; - case 0xBFC0D15Cu: goto label_BFC0D15C; - case 0xBFC0D164u: goto label_BFC0D164; - case 0xBFC0D178u: goto label_BFC0D178; - case 0xBFC0D17Cu: goto label_BFC0D17C; - case 0xBFC0D1A0u: goto label_BFC0D1A0; - case 0xBFC0D1A4u: goto label_BFC0D1A4; - case 0xBFC0D1C0u: goto label_BFC0D1C0; - case 0xBFC0D1ECu: goto label_BFC0D1EC; - case 0xBFC0D1F0u: goto label_BFC0D1F0; - case 0xBFC0D20Cu: goto label_BFC0D20C; - case 0xBFC0D218u: goto label_BFC0D218; - case 0xBFC0D22Cu: goto label_BFC0D22C; - case 0xBFC0D230u: goto label_BFC0D230; - case 0xBFC0D238u: goto label_BFC0D238; - case 0xBFC0D240u: goto label_BFC0D240; - case 0xBFC0D244u: goto label_BFC0D244; - case 0xBFC0D24Cu: goto label_BFC0D24C; - case 0xBFC0D25Cu: goto label_BFC0D25C; - case 0xBFC0D26Cu: goto label_BFC0D26C; - case 0xBFC0D28Cu: goto label_BFC0D28C; - case 0xBFC0D298u: goto label_BFC0D298; - case 0xBFC0D2ACu: goto label_BFC0D2AC; - case 0xBFC0D2C0u: goto label_BFC0D2C0; - case 0xBFC0D2CCu: goto label_BFC0D2CC; - case 0xBFC0D2D4u: goto label_BFC0D2D4; - case 0xBFC0D2E4u: goto label_BFC0D2E4; - case 0xBFC0D2ECu: goto label_BFC0D2EC; - case 0xBFC0D318u: goto label_BFC0D318; - case 0xBFC0D31Cu: goto label_BFC0D31C; - case 0xBFC0D338u: goto label_BFC0D338; - case 0xBFC0D33Cu: goto label_BFC0D33C; - default: break; - } - } -label_BFC0D11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D11C: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0D120: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D120u); return; } g_debug_last_store_pc = 0xBFC0D120u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D124u); -#endif - /* 0xBFC0D124: 8FAE0048 lw $t6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D124u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D128: 3C03A001 lui $v1, 0xA001 */ - cpu->gpr[3] = 0xA0010000u; - PGXP_ALU(0x3C03A001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D12C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0D130: 006F1821 addu $v1, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D134u); -#endif - /* 0xBFC0D134: 8C63A028 lw $v1, -24536($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D134u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63A028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D138: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D138u); return; } g_debug_last_store_pc = 0xBFC0D138u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D13Cu); -#endif - /* 0xBFC0D13C: 90620001 lbu $v0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 2, 0x8u); - PGXP_LOAD(0x90620001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC0D144: 30580001 andi $t8, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30580001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D148: 17000004 bne $t8, $zero, 0xBFC0D15C */ - uint32_t psx_brA_BFC0D148 = cpu->gpr[24]; uint32_t psx_brB_BFC0D148 = cpu->gpr[0]; - psx_taken_BFC0D148 = (psx_brA_BFC0D148 != psx_brB_BFC0D148); - psx_delay_BFC0D148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D14C: 30590010 andi $t9, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D14Cu); -#endif - if (psx_delay_BFC0D148) { - psx_delay_BFC0D148 = 0; - if (psx_taken_BFC0D148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D15Cu); - goto label_BFC0D15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D150u); - } -label_BFC0D150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D150: 1000007A beq $zero, $zero, 0xBFC0D33C */ - uint32_t psx_brA_BFC0D150 = cpu->gpr[0]; uint32_t psx_brB_BFC0D150 = cpu->gpr[0]; - psx_taken_BFC0D150 = (psx_brA_BFC0D150 == psx_brB_BFC0D150); - psx_delay_BFC0D150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D154: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D154u); -#endif - if (psx_delay_BFC0D150) { - psx_delay_BFC0D150 = 0; - if (psx_taken_BFC0D150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D33Cu); - goto label_BFC0D33C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D158u); - } -label_BFC0D158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D158: 30590010 andi $t9, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D158u); -#endif -label_BFC0D15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D15C: 13200039 beq $t9, $zero, 0xBFC0D244 */ - uint32_t psx_brA_BFC0D15C = cpu->gpr[25]; uint32_t psx_brB_BFC0D15C = cpu->gpr[0]; - psx_taken_BFC0D15C = (psx_brA_BFC0D15C == psx_brB_BFC0D15C); - psx_delay_BFC0D15C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D160: 305900C0 andi $t9, $v0, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xC0u; - PGXP_ALU(0x305900C0u, cpu->gpr[25], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D160u); -#endif - if (psx_delay_BFC0D15C) { - psx_delay_BFC0D15C = 0; - if (psx_taken_BFC0D15C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D244u); - goto label_BFC0D244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D164u); - } -label_BFC0D164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D164u); -#endif - /* 0xBFC0D164: 90680001 lbu $t0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 8, 0x8u); - PGXP_LOAD(0x90680001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D168: 2402270F addiu $v0, $zero, 9999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (9999)); - PGXP_ALU(0x2402270Fu, cpu->gpr[2], _pgx1, 0x0000270Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0D16C: 31090001 andi $t1, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D170: 1120002F beq $t1, $zero, 0xBFC0D230 */ - uint32_t psx_brA_BFC0D170 = cpu->gpr[9]; uint32_t psx_brB_BFC0D170 = cpu->gpr[0]; - psx_taken_BFC0D170 = (psx_brA_BFC0D170 == psx_brB_BFC0D170); - psx_delay_BFC0D170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D174: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D174u); -#endif - if (psx_delay_BFC0D170) { - psx_delay_BFC0D170 = 0; - if (psx_taken_BFC0D170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D230u); - goto label_BFC0D230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D178u); - } -label_BFC0D178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D178: 240A001E addiu $t2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240A001Eu, cpu->gpr[10], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D178u); -#endif -label_BFC0D17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC0D17C: AFAA0034 sw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D17Cu); return; } g_debug_last_store_pc = 0xBFC0D17Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D180u); -#endif - /* 0xBFC0D180: 8FAB0034 lw $t3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D180u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0D188: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0D18C: AFAC0034 sw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D18Cu); return; } g_debug_last_store_pc = 0xBFC0D18Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D190u); -#endif - /* 0xBFC0D190: 8FAD0034 lw $t5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D190u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0D198: 19A00009 blez $t5, 0xBFC0D1C0 */ - uint32_t psx_brA_BFC0D198 = cpu->gpr[13]; - psx_taken_BFC0D198 = ((int32_t)psx_brA_BFC0D198 <= 0); - psx_delay_BFC0D198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D19C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D19Cu); -#endif - if (psx_delay_BFC0D198) { - psx_delay_BFC0D198 = 0; - if (psx_taken_BFC0D198) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1C0u); - goto label_BFC0D1C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1A0u); - } -label_BFC0D1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1A0u); -#endif - /* 0xBFC0D1A0: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1A0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1A0u); -#endif -label_BFC0D1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D1A8: 25CFFFFF addiu $t7, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0D1AC: AFAF0034 sw $t7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1ACu); return; } g_debug_last_store_pc = 0xBFC0D1ACu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0034u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1B0u); -#endif - /* 0xBFC0D1B0: 8FB80034 lw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1B0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0D1B8: 1F00FFFA bgtz $t8, 0xBFC0D1A4 */ - uint32_t psx_brA_BFC0D1B8 = cpu->gpr[24]; - psx_taken_BFC0D1B8 = ((int32_t)psx_brA_BFC0D1B8 > 0); - psx_delay_BFC0D1B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1BCu); -#endif - /* 0xBFC0D1BC: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1BCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1BCu); -#endif - if (psx_delay_BFC0D1B8) { - psx_delay_BFC0D1B8 = 0; - if (psx_taken_BFC0D1B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1A4u); - goto label_BFC0D1A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1C0u); - } -label_BFC0D1C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D1C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1C0u); -#endif - /* 0xBFC0D1C0: 90600003 lbu $zero, 3($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (3)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D1C4: 2419001E addiu $t9, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2419001Eu, cpu->gpr[25], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0D1C8: AFB90030 sw $t9, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1C8u); return; } g_debug_last_store_pc = 0xBFC0D1C8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90030u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1CCu); -#endif - /* 0xBFC0D1CC: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1CCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0D1D4: 2509FFFF addiu $t1, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2509FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0D1D8: AFA90030 sw $t1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1D8u); return; } g_debug_last_store_pc = 0xBFC0D1D8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90030u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1DCu); -#endif - /* 0xBFC0D1DC: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1DCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0D1E4: 19400009 blez $t2, 0xBFC0D20C */ - uint32_t psx_brA_BFC0D1E4 = cpu->gpr[10]; - psx_taken_BFC0D1E4 = ((int32_t)psx_brA_BFC0D1E4 <= 0); - psx_delay_BFC0D1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1E8u); -#endif - if (psx_delay_BFC0D1E4) { - psx_delay_BFC0D1E4 = 0; - if (psx_taken_BFC0D1E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D20Cu); - goto label_BFC0D20C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1ECu); - } -label_BFC0D1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1ECu); -#endif - /* 0xBFC0D1EC: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1ECu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1ECu); -#endif -label_BFC0D1F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D1F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D1F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0D1F4: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0D1F8: AFAC0030 sw $t4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1F8u); return; } g_debug_last_store_pc = 0xBFC0D1F8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D1FCu); -#endif - /* 0xBFC0D1FC: 8FAD0030 lw $t5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D1FCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0030u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D200: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0D204: 1DA0FFFA bgtz $t5, 0xBFC0D1F0 */ - uint32_t psx_brA_BFC0D204 = cpu->gpr[13]; - psx_taken_BFC0D204 = ((int32_t)psx_brA_BFC0D204 > 0); - psx_delay_BFC0D204 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D208u); -#endif - /* 0xBFC0D208: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D208u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D208u); -#endif - if (psx_delay_BFC0D204) { - psx_delay_BFC0D204 = 0; - if (psx_taken_BFC0D204) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D1F0u); - goto label_BFC0D1F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D20Cu); - } -label_BFC0D20C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D20Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D20C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D210: 18400007 blez $v0, 0xBFC0D230 */ - uint32_t psx_brA_BFC0D210 = cpu->gpr[2]; - psx_taken_BFC0D210 = ((int32_t)psx_brA_BFC0D210 <= 0); - psx_delay_BFC0D210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D214: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D214u); -#endif - if (psx_delay_BFC0D210) { - psx_delay_BFC0D210 = 0; - if (psx_taken_BFC0D210) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D230u); - goto label_BFC0D230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D218u); - } -label_BFC0D218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D218u); -#endif - /* 0xBFC0D218: 906E0001 lbu $t6, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 14, 0x8u); - PGXP_LOAD(0x906E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D21C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D220: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0D224: 15E0FFD5 bne $t7, $zero, 0xBFC0D17C */ - uint32_t psx_brA_BFC0D224 = cpu->gpr[15]; uint32_t psx_brB_BFC0D224 = cpu->gpr[0]; - psx_taken_BFC0D224 = (psx_brA_BFC0D224 != psx_brB_BFC0D224); - psx_delay_BFC0D224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D228: 240A001E addiu $t2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240A001Eu, cpu->gpr[10], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D228u); -#endif - if (psx_delay_BFC0D224) { - psx_delay_BFC0D224 = 0; - if (psx_taken_BFC0D224) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D17Cu); - goto label_BFC0D17C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D22Cu); - } -label_BFC0D22C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D22Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D22C: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D22Cu); -#endif -label_BFC0D230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D230: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0D238u; /* jal link before delay slot */ - psx_delay_BFC0D230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0D234: A0780002 sb $t8, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D234u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D234u); -#endif - if (psx_delay_BFC0D230) { - psx_delay_BFC0D230 = 0; - cpu->gpr[31] = 0xBFC0D238u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0D238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D238: 10000040 beq $zero, $zero, 0xBFC0D33C */ - uint32_t psx_brA_BFC0D238 = cpu->gpr[0]; uint32_t psx_brB_BFC0D238 = cpu->gpr[0]; - psx_taken_BFC0D238 = (psx_brA_BFC0D238 == psx_brB_BFC0D238); - psx_delay_BFC0D238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D23C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D23Cu); -#endif - if (psx_delay_BFC0D238) { - psx_delay_BFC0D238 = 0; - if (psx_taken_BFC0D238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D33Cu); - goto label_BFC0D33C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D240u); - } -label_BFC0D240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D240: 305900C0 andi $t9, $v0, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xC0u; - PGXP_ALU(0x305900C0u, cpu->gpr[25], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D240u); -#endif -label_BFC0D244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D244: 13200029 beq $t9, $zero, 0xBFC0D2EC */ - uint32_t psx_brA_BFC0D244 = cpu->gpr[25]; uint32_t psx_brB_BFC0D244 = cpu->gpr[0]; - psx_taken_BFC0D244 = (psx_brA_BFC0D244 == psx_brB_BFC0D244); - psx_delay_BFC0D244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D248u); -#endif - if (psx_delay_BFC0D244) { - psx_delay_BFC0D244 = 0; - if (psx_taken_BFC0D244) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2ECu); - goto label_BFC0D2EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D24Cu); - } -label_BFC0D24C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D24Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0D24C: 24080050 addiu $t0, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24080050u, cpu->gpr[8], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC0D250: A0680002 sb $t0, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D250u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D254: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0D25Cu; /* jal link before delay slot */ - psx_delay_BFC0D254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC0D258: AFA30044 sw $v1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D258u); return; } g_debug_last_store_pc = 0xBFC0D258u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30044u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D258u); -#endif - if (psx_delay_BFC0D254) { - psx_delay_BFC0D254 = 0; - cpu->gpr[31] = 0xBFC0D25Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0D25C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D25Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D25Cu); -#endif - /* 0xBFC0D25C: 8FA30044 lw $v1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D25Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30044u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D260: 24090040 addiu $t1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24090040u, cpu->gpr[9], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D264: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0D26Cu; /* jal link before delay slot */ - psx_delay_BFC0D264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC0D268: A0690002 sb $t1, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D268u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D268u); -#endif - if (psx_delay_BFC0D264) { - psx_delay_BFC0D264 = 0; - cpu->gpr[31] = 0xBFC0D26Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0D26C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D26Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D26Cu); -#endif - /* 0xBFC0D26C: 8FAA0048 lw $t2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D26Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0048u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0D270: 3C0CA001 lui $t4, 0xA001 */ - cpu->gpr[12] = 0xA0010000u; - PGXP_ALU(0x3C0CA001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0D274: 258CA020 addiu $t4, $t4, -24544 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24544)); - PGXP_ALU(0x258CA020u, cpu->gpr[12], _pgx1, 0xFFFFA020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0D278: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC0D27C: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D280u); -#endif - /* 0xBFC0D280: 8C440000 lw $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D280u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D284: 0FF03433 jal 0xBFC0D0CC */ - cpu->gpr[31] = 0xBFC0D28Cu; /* jal link before delay slot */ - psx_delay_BFC0D284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC0D288: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D288u); return; } g_debug_last_store_pc = 0xBFC0D288u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D288u); -#endif - if (psx_delay_BFC0D284) { - psx_delay_BFC0D284 = 0; - cpu->gpr[31] = 0xBFC0D28Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D0CCu); - cpu->pc = 0xBFC0D0CCu; return; - } -label_BFC0D28C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D28Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D28Cu); -#endif - /* 0xBFC0D28C: 8FAD0024 lw $t5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D28Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0024u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D290: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0D298u; /* jal link before delay slot */ - psx_delay_BFC0D290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC0D294: ADA20000 sw $v0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D294u); return; } g_debug_last_store_pc = 0xBFC0D294u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xADA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D294u); -#endif - if (psx_delay_BFC0D290) { - psx_delay_BFC0D290 = 0; - cpu->gpr[31] = 0xBFC0D298u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0D298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D298: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0D29C: 3C01A001 lui $at, 0xA001 */ - cpu->gpr[1] = 0xA0010000u; - PGXP_ALU(0x3C01A001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2A0u); -#endif - /* 0xBFC0D2A0: 8FA40048 lw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D2A4: 0FF03360 jal 0xBFC0CD80 */ - cpu->gpr[31] = 0xBFC0D2ACu; /* jal link before delay slot */ - psx_delay_BFC0D2A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0D2A8: AC2EA030 sw $t6, -24528($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2A8u); return; } g_debug_last_store_pc = 0xBFC0D2A8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EA030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2A8u); -#endif - if (psx_delay_BFC0D2A4) { - psx_delay_BFC0D2A4 = 0; - cpu->gpr[31] = 0xBFC0D2ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0CD80u); - cpu->pc = 0xBFC0CD80u; return; - } -label_BFC0D2AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2ACu); -#endif - /* 0xBFC0D2AC: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D2B0: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D2B4: 25EFA020 addiu $t7, $t7, -24544 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-24544)); - PGXP_ALU(0x25EFA020u, cpu->gpr[15], _pgx1, 0xFFFFA020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC0D2B8: 104F0004 beq $v0, $t7, 0xBFC0D2CC */ - uint32_t psx_brA_BFC0D2B8 = cpu->gpr[2]; uint32_t psx_brB_BFC0D2B8 = cpu->gpr[15]; - psx_taken_BFC0D2B8 = (psx_brA_BFC0D2B8 == psx_brB_BFC0D2B8); - psx_delay_BFC0D2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D2BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2BCu); -#endif - if (psx_delay_BFC0D2B8) { - psx_delay_BFC0D2B8 = 0; - if (psx_taken_BFC0D2B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2CCu); - goto label_BFC0D2CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2C0u); - } -label_BFC0D2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0D2C0: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D2C4: 10000003 beq $zero, $zero, 0xBFC0D2D4 */ - uint32_t psx_brA_BFC0D2C4 = cpu->gpr[0]; uint32_t psx_brB_BFC0D2C4 = cpu->gpr[0]; - psx_taken_BFC0D2C4 = (psx_brA_BFC0D2C4 == psx_brB_BFC0D2C4); - psx_delay_BFC0D2C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0D2C8: 24A5E584 addiu $a1, $a1, -6780 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-6780)); - PGXP_ALU(0x24A5E584u, cpu->gpr[5], _pgx1, 0xFFFFE584u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2C8u); -#endif - if (psx_delay_BFC0D2C4) { - psx_delay_BFC0D2C4 = 0; - if (psx_taken_BFC0D2C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2D4u); - goto label_BFC0D2D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2CCu); - } -label_BFC0D2CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0D2CC: 3C05BFC1 lui $a1, 0xBFC1 */ - cpu->gpr[5] = 0xBFC10000u; - PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC0D2D0: 24A5E590 addiu $a1, $a1, -6768 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-6768)); - PGXP_ALU(0x24A5E590u, cpu->gpr[5], _pgx1, 0xFFFFE590u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2D0u); -#endif -label_BFC0D2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0D2D4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2D8u); -#endif - /* 0xBFC0D2D8: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2D8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D2DC: 0FF00638 jal 0xBFC018E0 */ - cpu->gpr[31] = 0xBFC0D2E4u; /* jal link before delay slot */ - psx_delay_BFC0D2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0D2E0: 2484E568 addiu $a0, $a0, -6808 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6808)); - PGXP_ALU(0x2484E568u, cpu->gpr[4], _pgx1, 0xFFFFE568u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2E0u); -#endif - if (psx_delay_BFC0D2DC) { - psx_delay_BFC0D2DC = 0; - cpu->gpr[31] = 0xBFC0D2E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC018E0u); - cpu->pc = 0xBFC018E0u; return; - } -label_BFC0D2E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D2E4: 10000015 beq $zero, $zero, 0xBFC0D33C */ - uint32_t psx_brA_BFC0D2E4 = cpu->gpr[0]; uint32_t psx_brB_BFC0D2E4 = cpu->gpr[0]; - psx_taken_BFC0D2E4 = (psx_brA_BFC0D2E4 == psx_brB_BFC0D2E4); - psx_delay_BFC0D2E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D2E8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2E8u); -#endif - if (psx_delay_BFC0D2E4) { - psx_delay_BFC0D2E4 = 0; - if (psx_taken_BFC0D2E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D33Cu); - goto label_BFC0D33C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D2ECu); - } -label_BFC0D2EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D2ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2ECu); -#endif - /* 0xBFC0D2EC: 90640003 lbu $a0, 3($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 3; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (3)), 4, 0x8u); - PGXP_LOAD(0x90640003u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D2F0: 2418001E addiu $t8, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2418001Eu, cpu->gpr[24], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC0D2F4: AFB80028 sw $t8, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2F4u); return; } g_debug_last_store_pc = 0xBFC0D2F4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80028u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2F8u); -#endif - /* 0xBFC0D2F8: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D2F8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0D300: 2728FFFF addiu $t0, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x2728FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC0D304: AFA80028 sw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D304u); return; } g_debug_last_store_pc = 0xBFC0D304u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D308u); -#endif - /* 0xBFC0D308: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D308u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D30C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0D310: 1920000A blez $t1, 0xBFC0D33C */ - uint32_t psx_brA_BFC0D310 = cpu->gpr[9]; - psx_taken_BFC0D310 = ((int32_t)psx_brA_BFC0D310 <= 0); - psx_delay_BFC0D310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0D314: 34820100 ori $v0, $a0, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] | 0x100u; - PGXP_ALU(0x34820100u, cpu->gpr[2], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D314u); -#endif - if (psx_delay_BFC0D310) { - psx_delay_BFC0D310 = 0; - if (psx_taken_BFC0D310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D33Cu); - goto label_BFC0D33C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D318u); - } -label_BFC0D318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D318u); -#endif - /* 0xBFC0D318: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D318u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D318u); -#endif -label_BFC0D31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D31C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC0D320: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC0D324: AFAB0028 sw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D324u); return; } g_debug_last_store_pc = 0xBFC0D324u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D328u); -#endif - /* 0xBFC0D328: 8FAC0028 lw $t4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D328u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0028u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D32C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC0D330: 1D80FFFA bgtz $t4, 0xBFC0D31C */ - uint32_t psx_brA_BFC0D330 = cpu->gpr[12]; - psx_taken_BFC0D330 = ((int32_t)psx_brA_BFC0D330 > 0); - psx_delay_BFC0D330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D334u); -#endif - /* 0xBFC0D334: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D334u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D334u); -#endif - if (psx_delay_BFC0D330) { - psx_delay_BFC0D330 = 0; - if (psx_taken_BFC0D330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D31Cu); - goto label_BFC0D31C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D338u); - } -label_BFC0D338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC0D338: 34820100 ori $v0, $a0, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] | 0x100u; - PGXP_ALU(0x34820100u, cpu->gpr[2], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D338u); -#endif -label_BFC0D33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D33Cu); -#endif - /* 0xBFC0D33C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D33Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D340: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D344: 03E00008 jr $ra */ - psx_delay_BFC0D344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D348u); -#endif - if (psx_delay_BFC0D344) { - psx_delay_BFC0D344 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D34C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D34Cu); - int psx_delay_BFC0D394 = 0; - int psx_taken_BFC0D394 = 0; - int psx_delay_BFC0D39C = 0; - int psx_delay_BFC0D3B0 = 0; - int psx_taken_BFC0D3B0 = 0; - int psx_delay_BFC0D3D0 = 0; - int psx_taken_BFC0D3D0 = 0; - int psx_delay_BFC0D3E4 = 0; - int psx_taken_BFC0D3E4 = 0; - int psx_delay_BFC0D3EC = 0; - int psx_delay_BFC0D3F8 = 0; - int psx_taken_BFC0D3F8 = 0; - int psx_delay_BFC0D40C = 0; - int psx_taken_BFC0D40C = 0; - int psx_delay_BFC0D414 = 0; - int psx_taken_BFC0D414 = 0; - int psx_delay_BFC0D43C = 0; - int psx_taken_BFC0D43C = 0; - int psx_delay_BFC0D45C = 0; - int psx_taken_BFC0D45C = 0; - int psx_delay_BFC0D468 = 0; - int psx_delay_BFC0D490 = 0; - int psx_taken_BFC0D490 = 0; - int psx_delay_BFC0D4B0 = 0; - int psx_taken_BFC0D4B0 = 0; - int psx_delay_BFC0D4C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D39Cu: goto label_BFC0D39C; - case 0xBFC0D3A4u: goto label_BFC0D3A4; - case 0xBFC0D3B8u: goto label_BFC0D3B8; - case 0xBFC0D3BCu: goto label_BFC0D3BC; - case 0xBFC0D3D8u: goto label_BFC0D3D8; - case 0xBFC0D3ECu: goto label_BFC0D3EC; - case 0xBFC0D3F4u: goto label_BFC0D3F4; - case 0xBFC0D400u: goto label_BFC0D400; - case 0xBFC0D414u: goto label_BFC0D414; - case 0xBFC0D41Cu: goto label_BFC0D41C; - case 0xBFC0D444u: goto label_BFC0D444; - case 0xBFC0D448u: goto label_BFC0D448; - case 0xBFC0D464u: goto label_BFC0D464; - case 0xBFC0D468u: goto label_BFC0D468; - case 0xBFC0D470u: goto label_BFC0D470; - case 0xBFC0D498u: goto label_BFC0D498; - case 0xBFC0D49Cu: goto label_BFC0D49C; - case 0xBFC0D4B8u: goto label_BFC0D4B8; - case 0xBFC0D4BCu: goto label_BFC0D4BC; - default: break; - } - } -label_BFC0D34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D34C: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0D350: AFA50044 sw $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D350u); return; } g_debug_last_store_pc = 0xBFC0D350u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D354u); -#endif - /* 0xBFC0D354: 8FAE0044 lw $t6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D354u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0044u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0D358: 3C18A001 lui $t8, 0xA001 */ - cpu->gpr[24] = 0xA0010000u; - PGXP_ALU(0x3C18A001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D35C: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D360: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D364: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D368: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0D36C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D36Cu); return; } g_debug_last_store_pc = 0xBFC0D36Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D370: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0D374: 2718BF48 addiu $t8, $t8, -16568 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-16568)); - PGXP_ALU(0x2718BF48u, cpu->gpr[24], _pgx1, 0xFFFFBF48u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D378: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D378u); return; } g_debug_last_store_pc = 0xBFC0D378u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0D37C: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D37Cu); return; } g_debug_last_store_pc = 0xBFC0D37Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0D380: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D380u); return; } g_debug_last_store_pc = 0xBFC0D380u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC0D384: 01F88821 addu $s1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D388u); -#endif - /* 0xBFC0D388: 8E390000 lw $t9, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D388u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x8E390000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0D38C: 241003E8 addiu $s0, $zero, 1000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1000)); - PGXP_ALU(0x241003E8u, cpu->gpr[16], _pgx1, 0x000003E8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC0D390: 33280002 andi $t0, $t9, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u; - PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0D394: 11000009 beq $t0, $zero, 0xBFC0D3BC */ - uint32_t psx_brA_BFC0D394 = cpu->gpr[8]; uint32_t psx_brB_BFC0D394 = cpu->gpr[0]; - psx_taken_BFC0D394 = (psx_brA_BFC0D394 == psx_brB_BFC0D394); - psx_delay_BFC0D394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D398u); -#endif - /* 0xBFC0D398: 8FAB0044 lw $t3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D398u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0044u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D398u); -#endif - if (psx_delay_BFC0D394) { - psx_delay_BFC0D394 = 0; - if (psx_taken_BFC0D394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D3BCu); - goto label_BFC0D3BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D39Cu); - } -label_BFC0D39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D39C: 0FF036F0 jal 0xBFC0DBC0 */ - cpu->gpr[31] = 0xBFC0D3A4u; /* jal link before delay slot */ - psx_delay_BFC0D39C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3A0u); -#endif - if (psx_delay_BFC0D39C) { - psx_delay_BFC0D39C = 0; - cpu->gpr[31] = 0xBFC0D3A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBC0u); - cpu->pc = 0xBFC0DBC0u; return; - } -label_BFC0D3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3A4u); -#endif - /* 0xBFC0D3A4: 8E290000 lw $t1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D3A4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x8E290000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0D3AC: 312A0002 andi $t2, $t1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u; - PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D3B0: 1540FFFA bne $t2, $zero, 0xBFC0D39C */ - uint32_t psx_brA_BFC0D3B0 = cpu->gpr[10]; uint32_t psx_brB_BFC0D3B0 = cpu->gpr[0]; - psx_taken_BFC0D3B0 = (psx_brA_BFC0D3B0 != psx_brB_BFC0D3B0); - psx_delay_BFC0D3B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3B4u); -#endif - if (psx_delay_BFC0D3B0) { - psx_delay_BFC0D3B0 = 0; - if (psx_taken_BFC0D3B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D39Cu); - goto label_BFC0D39C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D3B8u); - } -label_BFC0D3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3B8u); -#endif - /* 0xBFC0D3B8: 8FAB0044 lw $t3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D3B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0044u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3B8u); -#endif -label_BFC0D3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC0D3BC: 3C11A001 lui $s1, 0xA001 */ - cpu->gpr[17] = 0xA0010000u; - PGXP_ALU(0x3C11A001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0D3C0: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC0D3C4: 022C8821 addu $s1, $s1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[12]; - PGXP_ALU(0x022C8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3C8u); -#endif - /* 0xBFC0D3C8: 8E31A028 lw $s1, -24536($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -24536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-24536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D3C8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E31A028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0D3CC: 241003E7 addiu $s0, $zero, 999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (999)); - PGXP_ALU(0x241003E7u, cpu->gpr[16], _pgx1, 0x000003E7u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0D3D0: 1A000010 blez $s0, 0xBFC0D414 */ - uint32_t psx_brA_BFC0D3D0 = cpu->gpr[16]; - psx_taken_BFC0D3D0 = ((int32_t)psx_brA_BFC0D3D0 <= 0); - psx_delay_BFC0D3D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3D4u); -#endif - if (psx_delay_BFC0D3D0) { - psx_delay_BFC0D3D0 = 0; - if (psx_taken_BFC0D3D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D414u); - goto label_BFC0D414; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D3D8u); - } -label_BFC0D3D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3D8u); -#endif - /* 0xBFC0D3D8: 922D0001 lbu $t5, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 13, 0x20000u); - PGXP_LOAD(0x922D0001u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC0D3E0: 31AE0004 andi $t6, $t5, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x4u; - PGXP_ALU(0x31AE0004u, cpu->gpr[14], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D3E4: 15C0000B bne $t6, $zero, 0xBFC0D414 */ - uint32_t psx_brA_BFC0D3E4 = cpu->gpr[14]; uint32_t psx_brB_BFC0D3E4 = cpu->gpr[0]; - psx_taken_BFC0D3E4 = (psx_brA_BFC0D3E4 != psx_brB_BFC0D3E4); - psx_delay_BFC0D3E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3E8u); -#endif - if (psx_delay_BFC0D3E4) { - psx_delay_BFC0D3E4 = 0; - if (psx_taken_BFC0D3E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D414u); - goto label_BFC0D414; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D3ECu); - } -label_BFC0D3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D3EC: 0FF036F0 jal 0xBFC0DBC0 */ - cpu->gpr[31] = 0xBFC0D3F4u; /* jal link before delay slot */ - psx_delay_BFC0D3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3F0u); -#endif - if (psx_delay_BFC0D3EC) { - psx_delay_BFC0D3EC = 0; - cpu->gpr[31] = 0xBFC0D3F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0DBC0u); - cpu->pc = 0xBFC0DBC0u; return; - } -label_BFC0D3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0D3F4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0D3F8: 1A000006 blez $s0, 0xBFC0D414 */ - uint32_t psx_brA_BFC0D3F8 = cpu->gpr[16]; - psx_taken_BFC0D3F8 = ((int32_t)psx_brA_BFC0D3F8 <= 0); - psx_delay_BFC0D3F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D3FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D3FCu); -#endif - if (psx_delay_BFC0D3F8) { - psx_delay_BFC0D3F8 = 0; - if (psx_taken_BFC0D3F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D414u); - goto label_BFC0D414; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D400u); - } -label_BFC0D400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D400u); -#endif - /* 0xBFC0D400: 922F0001 lbu $t7, 1($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 15, 0x20000u); - PGXP_LOAD(0x922F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D404: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0D408: 31F80004 andi $t8, $t7, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x4u; - PGXP_ALU(0x31F80004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D40C: 1300FFF7 beq $t8, $zero, 0xBFC0D3EC */ - uint32_t psx_brA_BFC0D40C = cpu->gpr[24]; uint32_t psx_brB_BFC0D40C = cpu->gpr[0]; - psx_taken_BFC0D40C = (psx_brA_BFC0D40C == psx_brB_BFC0D40C); - psx_delay_BFC0D40C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D410u); -#endif - if (psx_delay_BFC0D40C) { - psx_delay_BFC0D40C = 0; - if (psx_taken_BFC0D40C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D3ECu); - goto label_BFC0D3EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D414u); - } -label_BFC0D414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC0D414: 1A000029 blez $s0, 0xBFC0D4BC */ - uint32_t psx_brA_BFC0D414 = cpu->gpr[16]; - psx_taken_BFC0D414 = ((int32_t)psx_brA_BFC0D414 <= 0); - psx_delay_BFC0D414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D418u); -#endif - /* 0xBFC0D418: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D418u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D418u); -#endif - if (psx_delay_BFC0D414) { - psx_delay_BFC0D414 = 0; - if (psx_taken_BFC0D414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D4BCu); - goto label_BFC0D4BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D41Cu); - } -label_BFC0D41C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D41Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D41C: 2419001E addiu $t9, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2419001Eu, cpu->gpr[25], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0D420: AFB90030 sw $t9, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D420u); return; } g_debug_last_store_pc = 0xBFC0D420u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90030u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D424u); -#endif - /* 0xBFC0D424: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D424u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D428: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC0D42C: 2509FFFF addiu $t1, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2509FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC0D430: AFA90030 sw $t1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D430u); return; } g_debug_last_store_pc = 0xBFC0D430u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90030u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D434u); -#endif - /* 0xBFC0D434: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D434u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D438: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC0D43C: 1940000A blez $t2, 0xBFC0D468 */ - uint32_t psx_brA_BFC0D43C = cpu->gpr[10]; - psx_taken_BFC0D43C = ((int32_t)psx_brA_BFC0D43C <= 0); - psx_delay_BFC0D43C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D440u); -#endif - /* 0xBFC0D440: 83AE0040 lb $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (64)), 14, 0x20000000u); - PGXP_LOAD(0x83AE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D440u); -#endif - if (psx_delay_BFC0D43C) { - psx_delay_BFC0D43C = 0; - if (psx_taken_BFC0D43C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D468u); - goto label_BFC0D468; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D444u); - } -label_BFC0D444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D444u); -#endif - /* 0xBFC0D444: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D444u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D444u); -#endif -label_BFC0D448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D448: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC0D44C: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC0D450: AFAC0030 sw $t4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D450u); return; } g_debug_last_store_pc = 0xBFC0D450u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D454u); -#endif - /* 0xBFC0D454: 8FAD0030 lw $t5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D454u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0030u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC0D45C: 1DA0FFFA bgtz $t5, 0xBFC0D448 */ - uint32_t psx_brA_BFC0D45C = cpu->gpr[13]; - psx_taken_BFC0D45C = ((int32_t)psx_brA_BFC0D45C > 0); - psx_delay_BFC0D45C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D460u); -#endif - /* 0xBFC0D460: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D460u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D460u); -#endif - if (psx_delay_BFC0D45C) { - psx_delay_BFC0D45C = 0; - if (psx_taken_BFC0D45C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D448u); - goto label_BFC0D448; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D464u); - } -label_BFC0D464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D464u); -#endif - /* 0xBFC0D464: 83AE0040 lb $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (64)), 14, 0x20000000u); - PGXP_LOAD(0x83AE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D464u); -#endif -label_BFC0D468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D468: 0FF00E64 jal 0xBFC03990 */ - cpu->gpr[31] = 0xBFC0D470u; /* jal link before delay slot */ - psx_delay_BFC0D468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC0D46C: A22E0003 sb $t6, 3($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D46Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (3)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA22E0003u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D46Cu); -#endif - if (psx_delay_BFC0D468) { - psx_delay_BFC0D468 = 0; - cpu->gpr[31] = 0xBFC0D470u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03990u); - cpu->pc = 0xBFC03990u; return; - } -label_BFC0D470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0D470: 240F001E addiu $t7, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240F001Eu, cpu->gpr[15], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC0D474: AFAF002C sw $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D474u); return; } g_debug_last_store_pc = 0xBFC0D474u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D478u); -#endif - /* 0xBFC0D478: 8FB8002C lw $t8, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D478u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D47C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0D480: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC0D484: AFB9002C sw $t9, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D484u); return; } g_debug_last_store_pc = 0xBFC0D484u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9002Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D488u); -#endif - /* 0xBFC0D488: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D488u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D48C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC0D490: 1900000A blez $t0, 0xBFC0D4BC */ - uint32_t psx_brA_BFC0D490 = cpu->gpr[8]; - psx_taken_BFC0D490 = ((int32_t)psx_brA_BFC0D490 <= 0); - psx_delay_BFC0D490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D494u); -#endif - /* 0xBFC0D494: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D494u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D494u); -#endif - if (psx_delay_BFC0D490) { - psx_delay_BFC0D490 = 0; - if (psx_taken_BFC0D490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D4BCu); - goto label_BFC0D4BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D498u); - } -label_BFC0D498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D498u); -#endif - /* 0xBFC0D498: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D498u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D498u); -#endif -label_BFC0D49C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D49Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D49C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0D4A0: 252AFFFF addiu $t2, $t1, -1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (-1)); - PGXP_ALU(0x252AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC0D4A4: AFAA002C sw $t2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4A4u); return; } g_debug_last_store_pc = 0xBFC0D4A4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA002Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4A8u); -#endif - /* 0xBFC0D4A8: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4A8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC0D4B0: 1D60FFFA bgtz $t3, 0xBFC0D49C */ - uint32_t psx_brA_BFC0D4B0 = cpu->gpr[11]; - psx_taken_BFC0D4B0 = ((int32_t)psx_brA_BFC0D4B0 > 0); - psx_delay_BFC0D4B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4B4u); -#endif - /* 0xBFC0D4B4: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4B4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4B4u); -#endif - if (psx_delay_BFC0D4B0) { - psx_delay_BFC0D4B0 = 0; - if (psx_taken_BFC0D4B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D49Cu); - goto label_BFC0D49C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D4B8u); - } -label_BFC0D4B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D4B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4B8u); -#endif - /* 0xBFC0D4B8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4B8u); -#endif -label_BFC0D4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4BCu); -#endif - /* 0xBFC0D4BC: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4BCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4C0u); -#endif - /* 0xBFC0D4C0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4C0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D4C4: 03E00008 jr $ra */ - psx_delay_BFC0D4C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D4C8: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4C8u); -#endif - if (psx_delay_BFC0D4C4) { - psx_delay_BFC0D4C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D4CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D4CCu); - int psx_delay_BFC0D4D8 = 0; - int psx_delay_BFC0D4E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D4E0u: goto label_BFC0D4E0; - default: break; - } - } -label_BFC0D4CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D4CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D4CC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D4D0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4D0u); return; } g_debug_last_store_pc = 0xBFC0D4D0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0D4D4: 3C04BFC1 lui $a0, 0xBFC1 */ - cpu->gpr[4] = 0xBFC10000u; - PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D4D8: 0FF0367C jal 0xBFC0D9F0 */ - cpu->gpr[31] = 0xBFC0D4E0u; /* jal link before delay slot */ - psx_delay_BFC0D4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC0D4DC: 2484E59C addiu $a0, $a0, -6756 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6756)); - PGXP_ALU(0x2484E59Cu, cpu->gpr[4], _pgx1, 0xFFFFE59Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4DCu); -#endif - if (psx_delay_BFC0D4D8) { - psx_delay_BFC0D4D8 = 0; - cpu->gpr[31] = 0xBFC0D4E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D9F0u); - cpu->pc = 0xBFC0D9F0u; return; - } -label_BFC0D4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4E0u); -#endif - /* 0xBFC0D4E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D4E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D4E4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D4E8: 03E00008 jr $ra */ - psx_delay_BFC0D4E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D4EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4ECu); -#endif - if (psx_delay_BFC0D4E8) { - psx_delay_BFC0D4E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D4F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D4F0u); - int psx_delay_BFC0D4F8 = 0; - int psx_taken_BFC0D4F8 = 0; - int psx_delay_BFC0D514 = 0; - int psx_delay_BFC0D52C = 0; - int psx_taken_BFC0D52C = 0; - int psx_delay_BFC0D538 = 0; - int psx_taken_BFC0D538 = 0; - int psx_delay_BFC0D544 = 0; - int psx_taken_BFC0D544 = 0; - int psx_delay_BFC0D55C = 0; - int psx_taken_BFC0D55C = 0; - int psx_delay_BFC0D564 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D500u: goto label_BFC0D500; - case 0xBFC0D51Cu: goto label_BFC0D51C; - case 0xBFC0D534u: goto label_BFC0D534; - case 0xBFC0D540u: goto label_BFC0D540; - case 0xBFC0D54Cu: goto label_BFC0D54C; - case 0xBFC0D564u: goto label_BFC0D564; - default: break; - } - } -label_BFC0D4F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D4F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC0D4F0: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC0D4F4: 2C41000F sltiu $at, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000000Fu ? 1 : 0); - PGXP_ALU(0x2C41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D4F8: 1020001A beq $at, $zero, 0xBFC0D564 */ - uint32_t psx_brA_BFC0D4F8 = cpu->gpr[1]; uint32_t psx_brB_BFC0D4F8 = cpu->gpr[0]; - psx_taken_BFC0D4F8 = (psx_brA_BFC0D4F8 == psx_brB_BFC0D4F8); - psx_delay_BFC0D4F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0D4FC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D4FCu); -#endif - if (psx_delay_BFC0D4F8) { - psx_delay_BFC0D4F8 = 0; - if (psx_taken_BFC0D4F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - goto label_BFC0D564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D500u); - } -label_BFC0D500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC0D500: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0D504: 3C01BFC1 lui $at, 0xBFC1 */ - cpu->gpr[1] = 0xBFC10000u; - PGXP_ALU(0x3C01BFC1u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC0D508: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D50Cu); -#endif - /* 0xBFC0D50C: 8C2EDCB0 lw $t6, -9040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -9040; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-9040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D50Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EDCB0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D514: 01C00008 jr $t6 */ - psx_delay_BFC0D514 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D518: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D518u); -#endif - if (psx_delay_BFC0D514) { - psx_delay_BFC0D514 = 0; - /* jump table at 0xBFC0DCB0, 15 entries */ - switch (cpu->gpr[14]) { - case 0xBFC0D51Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D51Cu); - goto label_BFC0D51C; - case 0xBFC0D534u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D534u); - goto label_BFC0D534; - case 0xBFC0D54Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D54Cu); - goto label_BFC0D54C; - case 0xBFC0D540u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D540u); - goto label_BFC0D540; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } - } -label_BFC0D51C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D51Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC0D51C: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D520: 3C03BFC0 lui $v1, 0xBFC0 */ - cpu->gpr[3] = 0xBFC00000u; - PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC0D524: 006F1821 addu $v1, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D528u); -#endif - /* 0xBFC0D528: 8C630100 lw $v1, 256($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D528u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630100u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D52C: 1000000D beq $zero, $zero, 0xBFC0D564 */ - uint32_t psx_brA_BFC0D52C = cpu->gpr[0]; uint32_t psx_brB_BFC0D52C = cpu->gpr[0]; - psx_taken_BFC0D52C = (psx_brA_BFC0D52C == psx_brB_BFC0D52C); - psx_delay_BFC0D52C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D530u); -#endif - if (psx_delay_BFC0D52C) { - psx_delay_BFC0D52C = 0; - if (psx_taken_BFC0D52C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - goto label_BFC0D564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D534u); - } -label_BFC0D534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D534: 3C03BFC0 lui $v1, 0xBFC0 */ - cpu->gpr[3] = 0xBFC00000u; - PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D538: 1000000A beq $zero, $zero, 0xBFC0D564 */ - uint32_t psx_brA_BFC0D538 = cpu->gpr[0]; uint32_t psx_brB_BFC0D538 = cpu->gpr[0]; - psx_taken_BFC0D538 = (psx_brA_BFC0D538 == psx_brB_BFC0D538); - psx_delay_BFC0D538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D53C: 2463012C addiu $v1, $v1, 300 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (300)); - PGXP_ALU(0x2463012Cu, cpu->gpr[3], _pgx1, 0x0000012Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D53Cu); -#endif - if (psx_delay_BFC0D538) { - psx_delay_BFC0D538 = 0; - if (psx_taken_BFC0D538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - goto label_BFC0D564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D540u); - } -label_BFC0D540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D540u); -#endif - /* 0xBFC0D540: 8C030060 lw $v1, 96($zero) */ - { uint32_t _pgxa = cpu->gpr[0] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D540u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x1u); } - PGXP_LOAD(0x8C030060u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D544: 10000007 beq $zero, $zero, 0xBFC0D564 */ - uint32_t psx_brA_BFC0D544 = cpu->gpr[0]; uint32_t psx_brB_BFC0D544 = cpu->gpr[0]; - psx_taken_BFC0D544 = (psx_brA_BFC0D544 == psx_brB_BFC0D544); - psx_delay_BFC0D544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D548: 00031A80 sll $v1, $v1, 10 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 10u; - PGXP_ALU(0x00031A80u, cpu->gpr[3], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D548u); -#endif - if (psx_delay_BFC0D544) { - psx_delay_BFC0D544 = 0; - if (psx_taken_BFC0D544) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - goto label_BFC0D564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D54Cu); - } -label_BFC0D54C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D54Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC0D54C: 0004C040 sll $t8, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 1u; - PGXP_ALU(0x0004C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC0D550: 3C03BFC1 lui $v1, 0xBFC1 */ - cpu->gpr[3] = 0xBFC10000u; - PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC0D554: 00781821 addu $v1, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00781821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D558u); -#endif - /* 0xBFC0D558: 8463E600 lh $v1, -6656($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -6656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-6656)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D558u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8463E600u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D55C: 10000001 beq $zero, $zero, 0xBFC0D564 */ - uint32_t psx_brA_BFC0D55C = cpu->gpr[0]; uint32_t psx_brB_BFC0D55C = cpu->gpr[0]; - psx_taken_BFC0D55C = (psx_brA_BFC0D55C == psx_brB_BFC0D55C); - psx_delay_BFC0D55C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D560u); -#endif - if (psx_delay_BFC0D55C) { - psx_delay_BFC0D55C = 0; - if (psx_taken_BFC0D55C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - goto label_BFC0D564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D564u); - } -label_BFC0D564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D564: 03E00008 jr $ra */ - psx_delay_BFC0D564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0D568: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D568u); -#endif - if (psx_delay_BFC0D564) { - psx_delay_BFC0D564 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D570(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D570u); - int psx_delay_BFC0D580 = 0; - int psx_delay_BFC0D594 = 0; - int psx_taken_BFC0D594 = 0; - int psx_delay_BFC0D59C = 0; - int psx_delay_BFC0D5A4 = 0; - int psx_taken_BFC0D5A4 = 0; - int psx_delay_BFC0D5B0 = 0; - int psx_delay_BFC0D5B8 = 0; - int psx_delay_BFC0D5C0 = 0; - int psx_taken_BFC0D5C0 = 0; - int psx_delay_BFC0D5CC = 0; - int psx_delay_BFC0D5D4 = 0; - int psx_delay_BFC0D5E8 = 0; - int psx_delay_BFC0D5F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D588u: goto label_BFC0D588; - case 0xBFC0D59Cu: goto label_BFC0D59C; - case 0xBFC0D5A4u: goto label_BFC0D5A4; - case 0xBFC0D5ACu: goto label_BFC0D5AC; - case 0xBFC0D5B8u: goto label_BFC0D5B8; - case 0xBFC0D5C0u: goto label_BFC0D5C0; - case 0xBFC0D5C8u: goto label_BFC0D5C8; - case 0xBFC0D5D4u: goto label_BFC0D5D4; - case 0xBFC0D5DCu: goto label_BFC0D5DC; - case 0xBFC0D5F0u: goto label_BFC0D5F0; - default: break; - } - } -label_BFC0D570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D570: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D574: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D574u); return; } g_debug_last_store_pc = 0xBFC0D574u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC0D578: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D578u); return; } g_debug_last_store_pc = 0xBFC0D578u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC0D57C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D57Cu); return; } g_debug_last_store_pc = 0xBFC0D57Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D580: 0FF03630 jal 0xBFC0D8C0 */ - cpu->gpr[31] = 0xBFC0D588u; /* jal link before delay slot */ - psx_delay_BFC0D580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC0D584: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D584u); return; } g_debug_last_store_pc = 0xBFC0D584u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D584u); -#endif - if (psx_delay_BFC0D580) { - psx_delay_BFC0D580 = 0; - cpu->gpr[31] = 0xBFC0D588u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D8C0u); - cpu->pc = 0xBFC0D8C0u; return; - } -label_BFC0D588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0D588: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D58Cu); -#endif - /* 0xBFC0D58C: 8DCFDFFC lw $t7, -8196($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D58Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCFDFFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0D594: 11E0000F beq $t7, $zero, 0xBFC0D5D4 */ - uint32_t psx_brA_BFC0D594 = cpu->gpr[15]; uint32_t psx_brB_BFC0D594 = cpu->gpr[0]; - psx_taken_BFC0D594 = (psx_brA_BFC0D594 == psx_brB_BFC0D594); - psx_delay_BFC0D594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D598u); -#endif - if (psx_delay_BFC0D594) { - psx_delay_BFC0D594 = 0; - if (psx_taken_BFC0D594) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D5D4u); - goto label_BFC0D5D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D59Cu); - } -label_BFC0D59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D59C: 0FF035CB jal 0xBFC0D72C */ - cpu->gpr[31] = 0xBFC0D5A4u; /* jal link before delay slot */ - psx_delay_BFC0D59C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5A0u); -#endif - if (psx_delay_BFC0D59C) { - psx_delay_BFC0D59C = 0; - cpu->gpr[31] = 0xBFC0D5A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D72Cu); - cpu->pc = 0xBFC0D72Cu; return; - } -label_BFC0D5A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D5A4: 04410004 bgez $v0, 0xBFC0D5B8 */ - uint32_t psx_brA_BFC0D5A4 = cpu->gpr[2]; - psx_taken_BFC0D5A4 = ((int32_t)psx_brA_BFC0D5A4 >= 0); - psx_delay_BFC0D5A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5A8u); -#endif - if (psx_delay_BFC0D5A4) { - psx_delay_BFC0D5A4 = 0; - if (psx_taken_BFC0D5A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D5B8u); - goto label_BFC0D5B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D5ACu); - } -label_BFC0D5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0D5AC: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D5B0: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC0D5B8u; /* jal link before delay slot */ - psx_delay_BFC0D5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0D5B4: 2405038B addiu $a1, $zero, 907 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (907)); - PGXP_ALU(0x2405038Bu, cpu->gpr[5], _pgx1, 0x0000038Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5B4u); -#endif - if (psx_delay_BFC0D5B0) { - psx_delay_BFC0D5B0 = 0; - cpu->gpr[31] = 0xBFC0D5B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC0D5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D5B8: 0FF035EF jal 0xBFC0D7BC */ - cpu->gpr[31] = 0xBFC0D5C0u; /* jal link before delay slot */ - psx_delay_BFC0D5B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5BCu); -#endif - if (psx_delay_BFC0D5B8) { - psx_delay_BFC0D5B8 = 0; - cpu->gpr[31] = 0xBFC0D5C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D7BCu); - cpu->pc = 0xBFC0D7BCu; return; - } -label_BFC0D5C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D5C0: 04410004 bgez $v0, 0xBFC0D5D4 */ - uint32_t psx_brA_BFC0D5C0 = cpu->gpr[2]; - psx_taken_BFC0D5C0 = ((int32_t)psx_brA_BFC0D5C0 >= 0); - psx_delay_BFC0D5C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5C4u); -#endif - if (psx_delay_BFC0D5C0) { - psx_delay_BFC0D5C0 = 0; - if (psx_taken_BFC0D5C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D5D4u); - goto label_BFC0D5D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D5C8u); - } -label_BFC0D5C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0D5C8: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D5CC: 0FF03654 jal 0xBFC0D950 */ - cpu->gpr[31] = 0xBFC0D5D4u; /* jal link before delay slot */ - psx_delay_BFC0D5CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC0D5D0: 2405038B addiu $a1, $zero, 907 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (907)); - PGXP_ALU(0x2405038Bu, cpu->gpr[5], _pgx1, 0x0000038Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5D0u); -#endif - if (psx_delay_BFC0D5CC) { - psx_delay_BFC0D5CC = 0; - cpu->gpr[31] = 0xBFC0D5D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D950u); - cpu->pc = 0xBFC0D950u; return; - } -label_BFC0D5D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D5D4: 0FF03658 jal 0xBFC0D960 */ - cpu->gpr[31] = 0xBFC0D5DCu; /* jal link before delay slot */ - psx_delay_BFC0D5D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5D8u); -#endif - if (psx_delay_BFC0D5D4) { - psx_delay_BFC0D5D4 = 0; - cpu->gpr[31] = 0xBFC0D5DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D960u); - cpu->pc = 0xBFC0D960u; return; - } -label_BFC0D5DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5DCu); -#endif - /* 0xBFC0D5DC: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D5DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5E0u); -#endif - /* 0xBFC0D5E0: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D5E0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5E4u); -#endif - /* 0xBFC0D5E4: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D5E4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D5E8: 0FF00F3C jal 0xBFC03CF0 */ - cpu->gpr[31] = 0xBFC0D5F0u; /* jal link before delay slot */ - psx_delay_BFC0D5E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5ECu); -#endif - if (psx_delay_BFC0D5E8) { - psx_delay_BFC0D5E8 = 0; - cpu->gpr[31] = 0xBFC0D5F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC03CF0u); - cpu->pc = 0xBFC03CF0u; return; - } -label_BFC0D5F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D5F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5F0u); -#endif - /* 0xBFC0D5F0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D5F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D5F4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D5F8: 03E00008 jr $ra */ - psx_delay_BFC0D5F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D5FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D5FCu); -#endif - if (psx_delay_BFC0D5F8) { - psx_delay_BFC0D5F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D600(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D600u); - int psx_delay_BFC0D630 = 0; - int psx_taken_BFC0D630 = 0; - int psx_delay_BFC0D638 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D628u: goto label_BFC0D628; - case 0xBFC0D638u: goto label_BFC0D638; - default: break; - } - } -label_BFC0D600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D600: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D604u); -#endif - /* 0xBFC0D604: 8DEFE620 lw $t7, -6624($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D604u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE620u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D608: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0D60C: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D610: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D610u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D614u); -#endif - /* 0xBFC0D614: 8F39E62C lw $t9, -6612($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -6612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-6612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D614u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39E62Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D618: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D61C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC0D620: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0D624: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D624u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D624u); -#endif -label_BFC0D628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC0D628: 24480003 addiu $t0, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[2] + (3)); - PGXP_ALU(0x24480003u, cpu->gpr[8], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D62C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC0D630: 1443FFFD bne $v0, $v1, 0xBFC0D628 */ - uint32_t psx_brA_BFC0D630 = cpu->gpr[2]; uint32_t psx_brB_BFC0D630 = cpu->gpr[3]; - psx_taken_BFC0D630 = (psx_brA_BFC0D630 != psx_brB_BFC0D630); - psx_delay_BFC0D630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC0D634: AC080000 sw $t0, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D634u); return; } g_debug_last_store_pc = 0xBFC0D634u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D634u); -#endif - if (psx_delay_BFC0D630) { - psx_delay_BFC0D630 = 0; - if (psx_taken_BFC0D630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D628u); - goto label_BFC0D628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D638u); - } -label_BFC0D638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D638: 03E00008 jr $ra */ - psx_delay_BFC0D638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D63C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D63Cu); -#endif - if (psx_delay_BFC0D638) { - psx_delay_BFC0D638 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D640(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D640u); - int psx_delay_BFC0D65C = 0; -label_BFC0D640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D640: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D644u); -#endif - /* 0xBFC0D644: 8DEFE620 lw $t7, -6624($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D644u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE620u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D648: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0D64C: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D650: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D650u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D654u); -#endif - /* 0xBFC0D654: 8F39E628 lw $t9, -6616($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -6616; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-6616)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D654u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39E628u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D658: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D65C: 03E00008 jr $ra */ - psx_delay_BFC0D65C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0D660: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D660u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D660u); -#endif - if (psx_delay_BFC0D65C) { - psx_delay_BFC0D65C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D664(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D664u); - int psx_delay_BFC0D680 = 0; -label_BFC0D664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D664: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D668u); -#endif - /* 0xBFC0D668: 8DEFE620 lw $t7, -6624($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D668u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE620u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D66C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC0D670: 3C19BFC1 lui $t9, 0xBFC1 */ - cpu->gpr[25] = 0xBFC10000u; - PGXP_ALU(0x3C19BFC1u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC0D674: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D674u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D678u); -#endif - /* 0xBFC0D678: 8F39E628 lw $t9, -6616($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -6616; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-6616)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D678u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39E628u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC0D67C: 24180018 addiu $t8, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24180018u, cpu->gpr[24], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D680: 03E00008 jr $ra */ - psx_delay_BFC0D680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC0D684: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D684u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D684u); -#endif - if (psx_delay_BFC0D680) { - psx_delay_BFC0D680 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D688(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D688u); - int psx_delay_BFC0D6D8 = 0; - int psx_taken_BFC0D6D8 = 0; - int psx_delay_BFC0D6E0 = 0; - int psx_delay_BFC0D6F4 = 0; - int psx_taken_BFC0D6F4 = 0; - int psx_delay_BFC0D6FC = 0; - int psx_taken_BFC0D6FC = 0; - int psx_delay_BFC0D704 = 0; - int psx_taken_BFC0D704 = 0; - int psx_delay_BFC0D724 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D6B4u: goto label_BFC0D6B4; - case 0xBFC0D6E0u: goto label_BFC0D6E0; - case 0xBFC0D6E8u: goto label_BFC0D6E8; - case 0xBFC0D6F4u: goto label_BFC0D6F4; - case 0xBFC0D6FCu: goto label_BFC0D6FC; - case 0xBFC0D704u: goto label_BFC0D704; - case 0xBFC0D70Cu: goto label_BFC0D70C; - case 0xBFC0D710u: goto label_BFC0D710; - default: break; - } - } -label_BFC0D688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D688: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC0D68C: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D68Cu); return; } g_debug_last_store_pc = 0xBFC0D68Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC0D690: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D690u); return; } g_debug_last_store_pc = 0xBFC0D690u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC0D694: 3C12BFC1 lui $s2, 0xBFC1 */ - cpu->gpr[18] = 0xBFC10000u; - PGXP_ALU(0x3C12BFC1u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC0D698: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D698u); return; } g_debug_last_store_pc = 0xBFC0D698u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D69Cu); -#endif - /* 0xBFC0D69C: 8E52E624 lw $s2, -6620($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + -6620; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (-6620)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D69Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x40000u); } - PGXP_LOAD(0x8E52E624u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6A0u); -#endif - /* 0xBFC0D6A0: 93A3002C lbu $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (44)), 3, 0x20000000u); - PGXP_LOAD(0x93A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D6A4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D6A4u); return; } g_debug_last_store_pc = 0xBFC0D6A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC0D6A8: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D6A8u); return; } g_debug_last_store_pc = 0xBFC0D6A8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC0D6AC: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC0D6B0: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6B0u); -#endif -label_BFC0D6B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D6B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0D6B4: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6B8u); -#endif - /* 0xBFC0D6B8: 8DCEE620 lw $t6, -6624($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D6B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEE620u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC0D6BC: 3C0FBFC1 lui $t7, 0xBFC1 */ - cpu->gpr[15] = 0xBFC10000u; - PGXP_ALU(0x3C0FBFC1u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC0D6C0: A1D30000 sb $s3, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D6C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[19] & 0xFFu)); - PGXP_STORE(0xA1D30000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6C4u); -#endif - /* 0xBFC0D6C4: 8DEFE62C lw $t7, -6612($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -6612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-6612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D6C4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE62Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D6C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6CCu); -#endif - /* 0xBFC0D6CC: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D6D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC0D6D4: 30510007 andi $s1, $v0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[2] & 0x7u; - PGXP_ALU(0x30510007u, cpu->gpr[17], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC0D6D8: 12200006 beq $s1, $zero, 0xBFC0D6F4 */ - uint32_t psx_brA_BFC0D6D8 = cpu->gpr[17]; uint32_t psx_brB_BFC0D6D8 = cpu->gpr[0]; - psx_taken_BFC0D6D8 = (psx_brA_BFC0D6D8 == psx_brB_BFC0D6D8); - psx_delay_BFC0D6D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0D6DC: 2A010005 slti $at, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0); - PGXP_ALU(0x2A010005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6DCu); -#endif - if (psx_delay_BFC0D6D8) { - psx_delay_BFC0D6D8 = 0; - if (psx_taken_BFC0D6D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D6F4u); - goto label_BFC0D6F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D6E0u); - } -label_BFC0D6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D6E0: 0FF03580 jal 0xBFC0D600 */ - cpu->gpr[31] = 0xBFC0D6E8u; /* jal link before delay slot */ - psx_delay_BFC0D6E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC0D6E4: 02118021 addu $s0, $s0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[17]; - PGXP_ALU(0x02118021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6E4u); -#endif - if (psx_delay_BFC0D6E0) { - psx_delay_BFC0D6E0 = 0; - cpu->gpr[31] = 0xBFC0D6E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D600u); - cpu->pc = 0xBFC0D600u; return; - } -label_BFC0D6E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D6E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6E8u); -#endif - /* 0xBFC0D6E8: 92430000 lbu $v1, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 3, 0x40000u); - PGXP_LOAD(0x92430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D6EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC0D6F0: 2A010005 slti $at, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (5) ? 1 : 0); - PGXP_ALU(0x2A010005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6F0u); -#endif -label_BFC0D6F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D6F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D6F4: 1420FFEF bne $at, $zero, 0xBFC0D6B4 */ - uint32_t psx_brA_BFC0D6F4 = cpu->gpr[1]; uint32_t psx_brB_BFC0D6F4 = cpu->gpr[0]; - psx_taken_BFC0D6F4 = (psx_brA_BFC0D6F4 != psx_brB_BFC0D6F4); - psx_delay_BFC0D6F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC0D6F8: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D6F8u); -#endif - if (psx_delay_BFC0D6F4) { - psx_delay_BFC0D6F4 = 0; - if (psx_taken_BFC0D6F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D6B4u); - goto label_BFC0D6B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D6FCu); - } -label_BFC0D6FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D6FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC0D6FC: 16210004 bne $s1, $at, 0xBFC0D710 */ - uint32_t psx_brA_BFC0D6FC = cpu->gpr[17]; uint32_t psx_brB_BFC0D6FC = cpu->gpr[1]; - psx_taken_BFC0D6FC = (psx_brA_BFC0D6FC != psx_brB_BFC0D6FC); - psx_delay_BFC0D6FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0D700: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D700u); -#endif - if (psx_delay_BFC0D6FC) { - psx_delay_BFC0D6FC = 0; - if (psx_taken_BFC0D6FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D710u); - goto label_BFC0D710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D704u); - } -label_BFC0D704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D704: 10000002 beq $zero, $zero, 0xBFC0D710 */ - uint32_t psx_brA_BFC0D704 = cpu->gpr[0]; uint32_t psx_brB_BFC0D704 = cpu->gpr[0]; - psx_taken_BFC0D704 = (psx_brA_BFC0D704 == psx_brB_BFC0D704); - psx_delay_BFC0D704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D708: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D708u); -#endif - if (psx_delay_BFC0D704) { - psx_delay_BFC0D704 = 0; - if (psx_taken_BFC0D704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D710u); - goto label_BFC0D710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D70Cu); - } -label_BFC0D70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC0D70C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D70Cu); -#endif -label_BFC0D710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D710u); -#endif - /* 0xBFC0D710: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D710u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D714u); -#endif - /* 0xBFC0D714: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D714u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D718u); -#endif - /* 0xBFC0D718: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D718u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D71Cu); -#endif - /* 0xBFC0D71C: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D71Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D720u); -#endif - /* 0xBFC0D720: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D720u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D724: 03E00008 jr $ra */ - psx_delay_BFC0D724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D728: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D728u); -#endif - if (psx_delay_BFC0D724) { - psx_delay_BFC0D724 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D72C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D72Cu); - int psx_delay_BFC0D734 = 0; - int psx_delay_BFC0D73C = 0; - int psx_delay_BFC0D75C = 0; - int psx_delay_BFC0D764 = 0; - int psx_taken_BFC0D764 = 0; - int psx_delay_BFC0D76C = 0; - int psx_delay_BFC0D774 = 0; - int psx_taken_BFC0D774 = 0; - int psx_delay_BFC0D780 = 0; - int psx_taken_BFC0D780 = 0; - int psx_delay_BFC0D788 = 0; - int psx_delay_BFC0D790 = 0; - int psx_taken_BFC0D790 = 0; - int psx_delay_BFC0D798 = 0; - int psx_delay_BFC0D7A0 = 0; - int psx_delay_BFC0D7B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D73Cu: goto label_BFC0D73C; - case 0xBFC0D744u: goto label_BFC0D744; - case 0xBFC0D764u: goto label_BFC0D764; - case 0xBFC0D76Cu: goto label_BFC0D76C; - case 0xBFC0D774u: goto label_BFC0D774; - case 0xBFC0D77Cu: goto label_BFC0D77C; - case 0xBFC0D780u: goto label_BFC0D780; - case 0xBFC0D788u: goto label_BFC0D788; - case 0xBFC0D790u: goto label_BFC0D790; - case 0xBFC0D798u: goto label_BFC0D798; - case 0xBFC0D7A0u: goto label_BFC0D7A0; - case 0xBFC0D7A8u: goto label_BFC0D7A8; - case 0xBFC0D7ACu: goto label_BFC0D7AC; - default: break; - } - } -label_BFC0D72C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D72Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D72C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D730: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D730u); return; } g_debug_last_store_pc = 0xBFC0D730u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D734: 0FF03580 jal 0xBFC0D600 */ - cpu->gpr[31] = 0xBFC0D73Cu; /* jal link before delay slot */ - psx_delay_BFC0D734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D738: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D738u); -#endif - if (psx_delay_BFC0D734) { - psx_delay_BFC0D734 = 0; - cpu->gpr[31] = 0xBFC0D73Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D600u); - cpu->pc = 0xBFC0D600u; return; - } -label_BFC0D73C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D73Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D73C: 0FF03599 jal 0xBFC0D664 */ - cpu->gpr[31] = 0xBFC0D744u; /* jal link before delay slot */ - psx_delay_BFC0D73C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D740u); -#endif - if (psx_delay_BFC0D73C) { - psx_delay_BFC0D73C = 0; - cpu->gpr[31] = 0xBFC0D744u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D664u); - cpu->pc = 0xBFC0D664u; return; - } -label_BFC0D744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0D744: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D748u); -#endif - /* 0xBFC0D748: 8DCEE620 lw $t6, -6624($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D748u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEE620u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0D74C: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D750: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D750u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D754u); -#endif - /* 0xBFC0D754: 8F18E624 lw $t8, -6620($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -6620; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-6620)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D754u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E624u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0D758: 240F001E addiu $t7, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240F001Eu, cpu->gpr[15], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D75C: 0FF035A2 jal 0xBFC0D688 */ - cpu->gpr[31] = 0xBFC0D764u; /* jal link before delay slot */ - psx_delay_BFC0D75C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0D760: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D760u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D760u); -#endif - if (psx_delay_BFC0D75C) { - psx_delay_BFC0D75C = 0; - cpu->gpr[31] = 0xBFC0D764u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D688u); - cpu->pc = 0xBFC0D688u; return; - } -label_BFC0D764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D764: 04410006 bgez $v0, 0xBFC0D780 */ - uint32_t psx_brA_BFC0D764 = cpu->gpr[2]; - psx_taken_BFC0D764 = ((int32_t)psx_brA_BFC0D764 >= 0); - psx_delay_BFC0D764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D768: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D768u); -#endif - if (psx_delay_BFC0D764) { - psx_delay_BFC0D764 = 0; - if (psx_taken_BFC0D764) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D780u); - goto label_BFC0D780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D76Cu); - } -label_BFC0D76C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D76Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D76C: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D774u; /* jal link before delay slot */ - psx_delay_BFC0D76C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D770u); -#endif - if (psx_delay_BFC0D76C) { - psx_delay_BFC0D76C = 0; - cpu->gpr[31] = 0xBFC0D774u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D774: 1000000D beq $zero, $zero, 0xBFC0D7AC */ - uint32_t psx_brA_BFC0D774 = cpu->gpr[0]; uint32_t psx_brB_BFC0D774 = cpu->gpr[0]; - psx_taken_BFC0D774 = (psx_brA_BFC0D774 == psx_brB_BFC0D774); - psx_delay_BFC0D774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D778: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D778u); -#endif - if (psx_delay_BFC0D774) { - psx_delay_BFC0D774 = 0; - if (psx_taken_BFC0D774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D7ACu); - goto label_BFC0D7AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D77Cu); - } -label_BFC0D77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D77C: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D77Cu); -#endif -label_BFC0D780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D780: 13200005 beq $t9, $zero, 0xBFC0D798 */ - uint32_t psx_brA_BFC0D780 = cpu->gpr[25]; uint32_t psx_brB_BFC0D780 = cpu->gpr[0]; - psx_taken_BFC0D780 = (psx_brA_BFC0D780 == psx_brB_BFC0D780); - psx_delay_BFC0D780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D784u); -#endif - if (psx_delay_BFC0D780) { - psx_delay_BFC0D780 = 0; - if (psx_taken_BFC0D780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D798u); - goto label_BFC0D798; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D788u); - } -label_BFC0D788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D788: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D790u; /* jal link before delay slot */ - psx_delay_BFC0D788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D78C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D78Cu); -#endif - if (psx_delay_BFC0D788) { - psx_delay_BFC0D788 = 0; - cpu->gpr[31] = 0xBFC0D790u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D790: 10000006 beq $zero, $zero, 0xBFC0D7AC */ - uint32_t psx_brA_BFC0D790 = cpu->gpr[0]; uint32_t psx_brB_BFC0D790 = cpu->gpr[0]; - psx_taken_BFC0D790 = (psx_brA_BFC0D790 == psx_brB_BFC0D790); - psx_delay_BFC0D790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D794: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D794u); -#endif - if (psx_delay_BFC0D790) { - psx_delay_BFC0D790 = 0; - if (psx_taken_BFC0D790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D7ACu); - goto label_BFC0D7AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D798u); - } -label_BFC0D798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D798: 0FF03580 jal 0xBFC0D600 */ - cpu->gpr[31] = 0xBFC0D7A0u; /* jal link before delay slot */ - psx_delay_BFC0D798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D79C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D79Cu); -#endif - if (psx_delay_BFC0D798) { - psx_delay_BFC0D798 = 0; - cpu->gpr[31] = 0xBFC0D7A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D600u); - cpu->pc = 0xBFC0D600u; return; - } -label_BFC0D7A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D7A0: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D7A8u; /* jal link before delay slot */ - psx_delay_BFC0D7A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D7A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7A4u); -#endif - if (psx_delay_BFC0D7A0) { - psx_delay_BFC0D7A0 = 0; - cpu->gpr[31] = 0xBFC0D7A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D7A8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7A8u); -#endif -label_BFC0D7AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7ACu); -#endif - /* 0xBFC0D7AC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D7ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D7B0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D7B4: 03E00008 jr $ra */ - psx_delay_BFC0D7B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D7B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7B8u); -#endif - if (psx_delay_BFC0D7B4) { - psx_delay_BFC0D7B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D7BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D7BCu); - int psx_delay_BFC0D7C4 = 0; - int psx_delay_BFC0D7CC = 0; - int psx_delay_BFC0D7EC = 0; - int psx_delay_BFC0D7F4 = 0; - int psx_taken_BFC0D7F4 = 0; - int psx_delay_BFC0D7FC = 0; - int psx_delay_BFC0D804 = 0; - int psx_taken_BFC0D804 = 0; - int psx_delay_BFC0D810 = 0; - int psx_taken_BFC0D810 = 0; - int psx_delay_BFC0D818 = 0; - int psx_delay_BFC0D820 = 0; - int psx_taken_BFC0D820 = 0; - int psx_delay_BFC0D828 = 0; - int psx_delay_BFC0D830 = 0; - int psx_delay_BFC0D844 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D7CCu: goto label_BFC0D7CC; - case 0xBFC0D7D4u: goto label_BFC0D7D4; - case 0xBFC0D7F4u: goto label_BFC0D7F4; - case 0xBFC0D7FCu: goto label_BFC0D7FC; - case 0xBFC0D804u: goto label_BFC0D804; - case 0xBFC0D80Cu: goto label_BFC0D80C; - case 0xBFC0D810u: goto label_BFC0D810; - case 0xBFC0D818u: goto label_BFC0D818; - case 0xBFC0D820u: goto label_BFC0D820; - case 0xBFC0D828u: goto label_BFC0D828; - case 0xBFC0D830u: goto label_BFC0D830; - case 0xBFC0D838u: goto label_BFC0D838; - case 0xBFC0D83Cu: goto label_BFC0D83C; - default: break; - } - } -label_BFC0D7BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D7BC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC0D7C0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D7C0u); return; } g_debug_last_store_pc = 0xBFC0D7C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D7C4: 0FF03580 jal 0xBFC0D600 */ - cpu->gpr[31] = 0xBFC0D7CCu; /* jal link before delay slot */ - psx_delay_BFC0D7C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D7C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7C8u); -#endif - if (psx_delay_BFC0D7C4) { - psx_delay_BFC0D7C4 = 0; - cpu->gpr[31] = 0xBFC0D7CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D600u); - cpu->pc = 0xBFC0D600u; return; - } -label_BFC0D7CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D7CC: 0FF03599 jal 0xBFC0D664 */ - cpu->gpr[31] = 0xBFC0D7D4u; /* jal link before delay slot */ - psx_delay_BFC0D7CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D7D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7D0u); -#endif - if (psx_delay_BFC0D7CC) { - psx_delay_BFC0D7CC = 0; - cpu->gpr[31] = 0xBFC0D7D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D664u); - cpu->pc = 0xBFC0D664u; return; - } -label_BFC0D7D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC0D7D4: 3C0EBFC1 lui $t6, 0xBFC1 */ - cpu->gpr[14] = 0xBFC10000u; - PGXP_ALU(0x3C0EBFC1u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7D8u); -#endif - /* 0xBFC0D7D8: 8DCEE620 lw $t6, -6624($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -6624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-6624)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D7D8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEE620u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC0D7DC: 3C18BFC1 lui $t8, 0xBFC1 */ - cpu->gpr[24] = 0xBFC10000u; - PGXP_ALU(0x3C18BFC1u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC0D7E0: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D7E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7E4u); -#endif - /* 0xBFC0D7E4: 8F18E624 lw $t8, -6620($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -6620; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-6620)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D7E4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E624u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC0D7E8: 240F001A addiu $t7, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x240F001Au, cpu->gpr[15], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D7EC: 0FF035A2 jal 0xBFC0D688 */ - cpu->gpr[31] = 0xBFC0D7F4u; /* jal link before delay slot */ - psx_delay_BFC0D7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC0D7F0: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0D7F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7F0u); -#endif - if (psx_delay_BFC0D7EC) { - psx_delay_BFC0D7EC = 0; - cpu->gpr[31] = 0xBFC0D7F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D688u); - cpu->pc = 0xBFC0D688u; return; - } -label_BFC0D7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC0D7F4: 04410006 bgez $v0, 0xBFC0D810 */ - uint32_t psx_brA_BFC0D7F4 = cpu->gpr[2]; - psx_taken_BFC0D7F4 = ((int32_t)psx_brA_BFC0D7F4 >= 0); - psx_delay_BFC0D7F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D7F8: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D7F8u); -#endif - if (psx_delay_BFC0D7F4) { - psx_delay_BFC0D7F4 = 0; - if (psx_taken_BFC0D7F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D810u); - goto label_BFC0D810; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D7FCu); - } -label_BFC0D7FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D7FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D7FC: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D804u; /* jal link before delay slot */ - psx_delay_BFC0D7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D800u); -#endif - if (psx_delay_BFC0D7FC) { - psx_delay_BFC0D7FC = 0; - cpu->gpr[31] = 0xBFC0D804u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D804: 1000000D beq $zero, $zero, 0xBFC0D83C */ - uint32_t psx_brA_BFC0D804 = cpu->gpr[0]; uint32_t psx_brB_BFC0D804 = cpu->gpr[0]; - psx_taken_BFC0D804 = (psx_brA_BFC0D804 == psx_brB_BFC0D804); - psx_delay_BFC0D804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D808: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D808u); -#endif - if (psx_delay_BFC0D804) { - psx_delay_BFC0D804 = 0; - if (psx_taken_BFC0D804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D83Cu); - goto label_BFC0D83C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D80Cu); - } -label_BFC0D80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC0D80C: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D80Cu); -#endif -label_BFC0D810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC0D810: 13200005 beq $t9, $zero, 0xBFC0D828 */ - uint32_t psx_brA_BFC0D810 = cpu->gpr[25]; uint32_t psx_brB_BFC0D810 = cpu->gpr[0]; - psx_taken_BFC0D810 = (psx_brA_BFC0D810 == psx_brB_BFC0D810); - psx_delay_BFC0D810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D814u); -#endif - if (psx_delay_BFC0D810) { - psx_delay_BFC0D810 = 0; - if (psx_taken_BFC0D810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D828u); - goto label_BFC0D828; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D818u); - } -label_BFC0D818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D818: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D820u; /* jal link before delay slot */ - psx_delay_BFC0D818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D81C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D81Cu); -#endif - if (psx_delay_BFC0D818) { - psx_delay_BFC0D818 = 0; - cpu->gpr[31] = 0xBFC0D820u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D820: 10000006 beq $zero, $zero, 0xBFC0D83C */ - uint32_t psx_brA_BFC0D820 = cpu->gpr[0]; uint32_t psx_brB_BFC0D820 = cpu->gpr[0]; - psx_taken_BFC0D820 = (psx_brA_BFC0D820 == psx_brB_BFC0D820); - psx_delay_BFC0D820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D824: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D824u); -#endif - if (psx_delay_BFC0D820) { - psx_delay_BFC0D820 = 0; - if (psx_taken_BFC0D820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D83Cu); - goto label_BFC0D83C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D828u); - } -label_BFC0D828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D828: 0FF03580 jal 0xBFC0D600 */ - cpu->gpr[31] = 0xBFC0D830u; /* jal link before delay slot */ - psx_delay_BFC0D828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D82C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D82Cu); -#endif - if (psx_delay_BFC0D828) { - psx_delay_BFC0D828 = 0; - cpu->gpr[31] = 0xBFC0D830u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D600u); - cpu->pc = 0xBFC0D600u; return; - } -label_BFC0D830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC0D830: 0FF03590 jal 0xBFC0D640 */ - cpu->gpr[31] = 0xBFC0D838u; /* jal link before delay slot */ - psx_delay_BFC0D830 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D834: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D834u); -#endif - if (psx_delay_BFC0D830) { - psx_delay_BFC0D830 = 0; - cpu->gpr[31] = 0xBFC0D838u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D640u); - cpu->pc = 0xBFC0D640u; return; - } -label_BFC0D838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC0D838: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D838u); -#endif -label_BFC0D83C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D83Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D83Cu); -#endif - /* 0xBFC0D83C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D83Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC0D840: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D844: 03E00008 jr $ra */ - psx_delay_BFC0D844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D848u); -#endif - if (psx_delay_BFC0D844) { - psx_delay_BFC0D844 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D850(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D850u); - int psx_delay_BFC0D86C = 0; - int psx_taken_BFC0D86C = 0; - int psx_delay_BFC0D874 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC0D864u: goto label_BFC0D864; - case 0xBFC0D874u: goto label_BFC0D874; - default: break; - } - } -label_BFC0D850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0D850: 3C09A001 lui $t1, 0xA001 */ - cpu->gpr[9] = 0xA0010000u; - PGXP_ALU(0x3C09A001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0D854: 25290000 addiu $t1, $t1, 0 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (0)); - PGXP_ALU(0x25290000u, cpu->gpr[9], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000401u); -#endif - /* 0xBFC0D858: 03A05021 addu $t2, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A05021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC0D85C: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xBFC0D85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC0D860: 01415025 or $t2, $t2, $at */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[10] | cpu->gpr[1]; - PGXP_ALU(0x01415025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D860u); -#endif -label_BFC0D864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D864: AD200000 sw $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0D864u); return; } g_debug_last_store_pc = 0xBFC0D864u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC0D868: 21290004 addi $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[9]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[9] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x21290004u, cpu->gpr[9], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC0D86C: 152AFFFD bne $t1, $t2, 0xBFC0D864 */ - uint32_t psx_brA_BFC0D86C = cpu->gpr[9]; uint32_t psx_brB_BFC0D86C = cpu->gpr[10]; - psx_taken_BFC0D86C = (psx_brA_BFC0D86C != psx_brB_BFC0D86C); - psx_delay_BFC0D86C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D870u); -#endif - if (psx_delay_BFC0D86C) { - psx_delay_BFC0D86C = 0; - if (psx_taken_BFC0D86C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D864u); - goto label_BFC0D864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0xBFC0D874u); - } -label_BFC0D874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D874: 03E00008 jr $ra */ - psx_delay_BFC0D874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D878: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D878u); -#endif - if (psx_delay_BFC0D874) { - psx_delay_BFC0D874 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D880(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D880u); - int psx_delay_BFC0D884 = 0; -label_BFC0D880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D880: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D884: 01400008 jr $t2 */ - psx_delay_BFC0D884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D888: 2409003D addiu $t1, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2409003Du, cpu->gpr[9], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D888u); -#endif - if (psx_delay_BFC0D884) { - psx_delay_BFC0D884 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D890(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D890u); - int psx_delay_BFC0D894 = 0; -label_BFC0D890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D890: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D894: 01400008 jr $t2 */ - psx_delay_BFC0D894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D898: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D898u); -#endif - if (psx_delay_BFC0D894) { - psx_delay_BFC0D894 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D8A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8A0u); - int psx_delay_BFC0D8A4 = 0; -label_BFC0D8A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8A0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8A4: 01400008 jr $t2 */ - psx_delay_BFC0D8A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D8A8: 24090036 addiu $t1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24090036u, cpu->gpr[9], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8A8u); -#endif - if (psx_delay_BFC0D8A4) { - psx_delay_BFC0D8A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D8B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8B0u); - int psx_delay_BFC0D8B4 = 0; -label_BFC0D8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8B0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8B4: 01400008 jr $t2 */ - psx_delay_BFC0D8B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D8B8: 24090034 addiu $t1, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24090034u, cpu->gpr[9], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8B8u); -#endif - if (psx_delay_BFC0D8B4) { - psx_delay_BFC0D8B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D8C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8C0u); - int psx_delay_BFC0D8C8 = 0; -label_BFC0D8C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0D8C0: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0D8C4: 0000000C syscall */ - cpu->pc = 0xBFC0D8C4u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D8C8: 03E00008 jr $ra */ - psx_delay_BFC0D8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D8CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8CCu); -#endif - if (psx_delay_BFC0D8C8) { - psx_delay_BFC0D8C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D8D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8D0u); - int psx_delay_BFC0D8D4 = 0; -label_BFC0D8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8D0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8D4: 01400008 jr $t2 */ - psx_delay_BFC0D8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D8D8: 2409003A addiu $t1, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2409003Au, cpu->gpr[9], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8D8u); -#endif - if (psx_delay_BFC0D8D4) { - psx_delay_BFC0D8D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D8E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8E0u); - int psx_delay_BFC0D8E4 = 0; -label_BFC0D8E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8E0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8E4: 01400008 jr $t2 */ - psx_delay_BFC0D8E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D8E8: 24090040 addiu $t1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24090040u, cpu->gpr[9], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8E8u); -#endif - if (psx_delay_BFC0D8E4) { - psx_delay_BFC0D8E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D8F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D8F0u); - int psx_delay_BFC0D8F4 = 0; -label_BFC0D8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8F0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D8F4: 01400008 jr $t2 */ - psx_delay_BFC0D8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D8F8: 2409004F addiu $t1, $zero, 79 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (79)); - PGXP_ALU(0x2409004Fu, cpu->gpr[9], _pgx1, 0x0000004Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D8F8u); -#endif - if (psx_delay_BFC0D8F4) { - psx_delay_BFC0D8F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D900(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D900u); - int psx_delay_BFC0D904 = 0; -label_BFC0D900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D900: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D904: 01400008 jr $t2 */ - psx_delay_BFC0D904 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D908: 24090050 addiu $t1, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24090050u, cpu->gpr[9], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D908u); -#endif - if (psx_delay_BFC0D904) { - psx_delay_BFC0D904 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D910u); - int psx_delay_BFC0D914 = 0; -label_BFC0D910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D910: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D914: 01400008 jr $t2 */ - psx_delay_BFC0D914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D918: 24090052 addiu $t1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24090052u, cpu->gpr[9], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D918u); -#endif - if (psx_delay_BFC0D914) { - psx_delay_BFC0D914 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D920(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D920u); - int psx_delay_BFC0D924 = 0; -label_BFC0D920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D920: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D924: 01400008 jr $t2 */ - psx_delay_BFC0D924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D928: 24090053 addiu $t1, $zero, 83 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); - PGXP_ALU(0x24090053u, cpu->gpr[9], _pgx1, 0x00000053u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D928u); -#endif - if (psx_delay_BFC0D924) { - psx_delay_BFC0D924 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D930(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D930u); - int psx_delay_BFC0D934 = 0; -label_BFC0D930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D930: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D934: 01400008 jr $t2 */ - psx_delay_BFC0D934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D938: 2409009A addiu $t1, $zero, 154 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (154)); - PGXP_ALU(0x2409009Au, cpu->gpr[9], _pgx1, 0x0000009Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D938u); -#endif - if (psx_delay_BFC0D934) { - psx_delay_BFC0D934 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D940(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D940u); - int psx_delay_BFC0D944 = 0; -label_BFC0D940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D940: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D944: 01400008 jr $t2 */ - psx_delay_BFC0D944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D948: 2409009B addiu $t1, $zero, 155 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (155)); - PGXP_ALU(0x2409009Bu, cpu->gpr[9], _pgx1, 0x0000009Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D948u); -#endif - if (psx_delay_BFC0D944) { - psx_delay_BFC0D944 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D950(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D950u); - int psx_delay_BFC0D954 = 0; -label_BFC0D950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D950: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D954: 01400008 jr $t2 */ - psx_delay_BFC0D954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D958: 240900A1 addiu $t1, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240900A1u, cpu->gpr[9], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D958u); -#endif - if (psx_delay_BFC0D954) { - psx_delay_BFC0D954 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D960(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D960u); - int psx_delay_BFC0D968 = 0; -label_BFC0D960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC0D960: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC0D964: 0000000C syscall */ - cpu->pc = 0xBFC0D964u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0xBFC0D964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC0D968: 03E00008 jr $ra */ - psx_delay_BFC0D968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC0D96C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xBFC0D96Cu); -#endif - if (psx_delay_BFC0D968) { - psx_delay_BFC0D968 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC0D970(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D970u); - int psx_delay_BFC0D974 = 0; -label_BFC0D970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D970: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D974: 01400008 jr $t2 */ - psx_delay_BFC0D974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D978: 24090007 addiu $t1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24090007u, cpu->gpr[9], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D978u); -#endif - if (psx_delay_BFC0D974) { - psx_delay_BFC0D974 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D980u); - int psx_delay_BFC0D984 = 0; -label_BFC0D980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D980: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D984: 01400008 jr $t2 */ - psx_delay_BFC0D984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D988: 24090017 addiu $t1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24090017u, cpu->gpr[9], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D988u); -#endif - if (psx_delay_BFC0D984) { - psx_delay_BFC0D984 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D990u); - int psx_delay_BFC0D994 = 0; -label_BFC0D990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D990: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D994: 01400008 jr $t2 */ - psx_delay_BFC0D994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D998: 24090020 addiu $t1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24090020u, cpu->gpr[9], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D998u); -#endif - if (psx_delay_BFC0D994) { - psx_delay_BFC0D994 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9A0u); - int psx_delay_BFC0D9A4 = 0; -label_BFC0D9A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9A0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9A4: 01400008 jr $t2 */ - psx_delay_BFC0D9A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9A8: 24090018 addiu $t1, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24090018u, cpu->gpr[9], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9A8u); -#endif - if (psx_delay_BFC0D9A4) { - psx_delay_BFC0D9A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9B0u); - int psx_delay_BFC0D9B4 = 0; -label_BFC0D9B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9B0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9B4: 01400008 jr $t2 */ - psx_delay_BFC0D9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9B8: 24090008 addiu $t1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24090008u, cpu->gpr[9], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9B8u); -#endif - if (psx_delay_BFC0D9B4) { - psx_delay_BFC0D9B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9C0u); - int psx_delay_BFC0D9C4 = 0; -label_BFC0D9C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9C0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9C4: 01400008 jr $t2 */ - psx_delay_BFC0D9C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9C8: 2409000C addiu $t1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2409000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9C8u); -#endif - if (psx_delay_BFC0D9C4) { - psx_delay_BFC0D9C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9D0u); - int psx_delay_BFC0D9D4 = 0; -label_BFC0D9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9D0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9D4: 01400008 jr $t2 */ - psx_delay_BFC0D9D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9D8: 24090009 addiu $t1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24090009u, cpu->gpr[9], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9D8u); -#endif - if (psx_delay_BFC0D9D4) { - psx_delay_BFC0D9D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9E0u); - int psx_delay_BFC0D9E4 = 0; -label_BFC0D9E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9E0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9E4: 01400008 jr $t2 */ - psx_delay_BFC0D9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9E8: 2409000B addiu $t1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2409000Bu, cpu->gpr[9], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9E8u); -#endif - if (psx_delay_BFC0D9E4) { - psx_delay_BFC0D9E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0D9F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0D9F0u); - int psx_delay_BFC0D9F4 = 0; -label_BFC0D9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0D9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9F0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0D9F4: 01400008 jr $t2 */ - psx_delay_BFC0D9F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0D9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0D9F8: 24090047 addiu $t1, $zero, 71 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); - PGXP_ALU(0x24090047u, cpu->gpr[9], _pgx1, 0x00000047u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0D9F8u); -#endif - if (psx_delay_BFC0D9F4) { - psx_delay_BFC0D9F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA00u); - int psx_delay_BFC0DA04 = 0; -label_BFC0DA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA00: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA04: 01400008 jr $t2 */ - psx_delay_BFC0DA04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA08: 2409004F addiu $t1, $zero, 79 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (79)); - PGXP_ALU(0x2409004Fu, cpu->gpr[9], _pgx1, 0x0000004Fu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA08u); -#endif - if (psx_delay_BFC0DA04) { - psx_delay_BFC0DA04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA10u); - int psx_delay_BFC0DA14 = 0; -label_BFC0DA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA10: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA14: 01400008 jr $t2 */ - psx_delay_BFC0DA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA18: 24090050 addiu $t1, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24090050u, cpu->gpr[9], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA18u); -#endif - if (psx_delay_BFC0DA14) { - psx_delay_BFC0DA14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA20u); - int psx_delay_BFC0DA24 = 0; -label_BFC0DA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA20: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA24: 01400008 jr $t2 */ - psx_delay_BFC0DA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA28: 2409004E addiu $t1, $zero, 78 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (78)); - PGXP_ALU(0x2409004Eu, cpu->gpr[9], _pgx1, 0x0000004Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA28u); -#endif - if (psx_delay_BFC0DA24) { - psx_delay_BFC0DA24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA30u); - int psx_delay_BFC0DA34 = 0; -label_BFC0DA30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA30: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA34: 01400008 jr $t2 */ - psx_delay_BFC0DA34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA38: 24090058 addiu $t1, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24090058u, cpu->gpr[9], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA38u); -#endif - if (psx_delay_BFC0DA34) { - psx_delay_BFC0DA34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA40u); - int psx_delay_BFC0DA44 = 0; -label_BFC0DA40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA40: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA44: 01400008 jr $t2 */ - psx_delay_BFC0DA44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA48: 2409004D addiu $t1, $zero, 77 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); - PGXP_ALU(0x2409004Du, cpu->gpr[9], _pgx1, 0x0000004Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA48u); -#endif - if (psx_delay_BFC0DA44) { - psx_delay_BFC0DA44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA50u); - int psx_delay_BFC0DA54 = 0; -label_BFC0DA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA50: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA54: 01400008 jr $t2 */ - psx_delay_BFC0DA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA58: 2409004A addiu $t1, $zero, 74 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (74)); - PGXP_ALU(0x2409004Au, cpu->gpr[9], _pgx1, 0x0000004Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA58u); -#endif - if (psx_delay_BFC0DA54) { - psx_delay_BFC0DA54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA60u); - int psx_delay_BFC0DA64 = 0; -label_BFC0DA60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA60: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA64: 01400008 jr $t2 */ - psx_delay_BFC0DA64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA68: 2409004B addiu $t1, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2409004Bu, cpu->gpr[9], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA68u); -#endif - if (psx_delay_BFC0DA64) { - psx_delay_BFC0DA64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA70u); - int psx_delay_BFC0DA74 = 0; -label_BFC0DA70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA70: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA74: 01400008 jr $t2 */ - psx_delay_BFC0DA74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA78: 2409003C addiu $t1, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2409003Cu, cpu->gpr[9], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA78u); -#endif - if (psx_delay_BFC0DA74) { - psx_delay_BFC0DA74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA80u); - int psx_delay_BFC0DA84 = 0; -label_BFC0DA80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA80: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA84: 01400008 jr $t2 */ - psx_delay_BFC0DA84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA88: 24090035 addiu $t1, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x24090035u, cpu->gpr[9], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA88u); -#endif - if (psx_delay_BFC0DA84) { - psx_delay_BFC0DA84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DA90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DA90u); - int psx_delay_BFC0DA94 = 0; -label_BFC0DA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA90: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DA94: 01400008 jr $t2 */ - psx_delay_BFC0DA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DA98: 24090040 addiu $t1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24090040u, cpu->gpr[9], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DA98u); -#endif - if (psx_delay_BFC0DA94) { - psx_delay_BFC0DA94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAA0u); - int psx_delay_BFC0DAA4 = 0; -label_BFC0DAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAA0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAA4: 01400008 jr $t2 */ - psx_delay_BFC0DAA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAA8: 24090012 addiu $t1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24090012u, cpu->gpr[9], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAA8u); -#endif - if (psx_delay_BFC0DAA4) { - psx_delay_BFC0DAA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAB0u); - int psx_delay_BFC0DAB4 = 0; -label_BFC0DAB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAB0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAB4: 01400008 jr $t2 */ - psx_delay_BFC0DAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAB8: 24090013 addiu $t1, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24090013u, cpu->gpr[9], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAB8u); -#endif - if (psx_delay_BFC0DAB4) { - psx_delay_BFC0DAB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAC0u); - int psx_delay_BFC0DAC4 = 0; -label_BFC0DAC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAC0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAC4: 01400008 jr $t2 */ - psx_delay_BFC0DAC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAC8: 24090015 addiu $t1, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24090015u, cpu->gpr[9], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAC8u); -#endif - if (psx_delay_BFC0DAC4) { - psx_delay_BFC0DAC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAD0u); - int psx_delay_BFC0DAD4 = 0; -label_BFC0DAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAD0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAD4: 01400008 jr $t2 */ - psx_delay_BFC0DAD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAD8: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAD8u); -#endif - if (psx_delay_BFC0DAD4) { - psx_delay_BFC0DAD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAE0u); - int psx_delay_BFC0DAE4 = 0; -label_BFC0DAE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAE0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAE4: 01400008 jr $t2 */ - psx_delay_BFC0DAE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAE8: 24090000 addiu $t1, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24090000u, cpu->gpr[9], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAE8u); -#endif - if (psx_delay_BFC0DAE4) { - psx_delay_BFC0DAE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DAF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DAF0u); - int psx_delay_BFC0DAF4 = 0; -label_BFC0DAF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DAF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAF0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DAF4: 01400008 jr $t2 */ - psx_delay_BFC0DAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DAF8: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DAF8u); -#endif - if (psx_delay_BFC0DAF4) { - psx_delay_BFC0DAF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB00u); - int psx_delay_BFC0DB04 = 0; -label_BFC0DB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB00: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB04: 01400008 jr $t2 */ - psx_delay_BFC0DB04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB08: 24090003 addiu $t1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24090003u, cpu->gpr[9], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB08u); -#endif - if (psx_delay_BFC0DB04) { - psx_delay_BFC0DB04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB10u); - int psx_delay_BFC0DB14 = 0; -label_BFC0DB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB10: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB14: 01400008 jr $t2 */ - psx_delay_BFC0DB14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB18: 2409001C addiu $t1, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2409001Cu, cpu->gpr[9], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB18u); -#endif - if (psx_delay_BFC0DB14) { - psx_delay_BFC0DB14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB20u); - int psx_delay_BFC0DB24 = 0; -label_BFC0DB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB20: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB24: 01400008 jr $t2 */ - psx_delay_BFC0DB24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB28: 24090007 addiu $t1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24090007u, cpu->gpr[9], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB28u); -#endif - if (psx_delay_BFC0DB24) { - psx_delay_BFC0DB24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB30u); - int psx_delay_BFC0DB34 = 0; -label_BFC0DB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB30: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB34: 01400008 jr $t2 */ - psx_delay_BFC0DB34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB38: 24090012 addiu $t1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24090012u, cpu->gpr[9], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB38u); -#endif - if (psx_delay_BFC0DB34) { - psx_delay_BFC0DB34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB40u); - int psx_delay_BFC0DB44 = 0; -label_BFC0DB40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB40: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB44: 01400008 jr $t2 */ - psx_delay_BFC0DB44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB48: 24090008 addiu $t1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24090008u, cpu->gpr[9], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB48u); -#endif - if (psx_delay_BFC0DB44) { - psx_delay_BFC0DB44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB50u); - int psx_delay_BFC0DB54 = 0; -label_BFC0DB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB50: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB54: 01400008 jr $t2 */ - psx_delay_BFC0DB54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB58: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB58u); -#endif - if (psx_delay_BFC0DB54) { - psx_delay_BFC0DB54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB60u); - int psx_delay_BFC0DB64 = 0; -label_BFC0DB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB60: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB64: 01400008 jr $t2 */ - psx_delay_BFC0DB64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB68: 2409000C addiu $t1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2409000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB68u); -#endif - if (psx_delay_BFC0DB64) { - psx_delay_BFC0DB64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB70u); - int psx_delay_BFC0DB74 = 0; -label_BFC0DB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB70: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB74: 01400008 jr $t2 */ - psx_delay_BFC0DB74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB78: 24090000 addiu $t1, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24090000u, cpu->gpr[9], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB78u); -#endif - if (psx_delay_BFC0DB74) { - psx_delay_BFC0DB74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB80u); - int psx_delay_BFC0DB84 = 0; -label_BFC0DB80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB80: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB84: 01400008 jr $t2 */ - psx_delay_BFC0DB84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB88: 2409001A addiu $t1, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2409001Au, cpu->gpr[9], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB88u); -#endif - if (psx_delay_BFC0DB84) { - psx_delay_BFC0DB84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DB90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DB90u); - int psx_delay_BFC0DB94 = 0; -label_BFC0DB90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DB90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB90: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DB94: 01400008 jr $t2 */ - psx_delay_BFC0DB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DB98: 2409001D addiu $t1, $zero, 29 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (29)); - PGXP_ALU(0x2409001Du, cpu->gpr[9], _pgx1, 0x0000001Du); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DB98u); -#endif - if (psx_delay_BFC0DB94) { - psx_delay_BFC0DB94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBA0u); - int psx_delay_BFC0DBA4 = 0; -label_BFC0DBA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBA0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBA4: 01400008 jr $t2 */ - psx_delay_BFC0DBA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBA8: 2409001B addiu $t1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2409001Bu, cpu->gpr[9], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBA8u); -#endif - if (psx_delay_BFC0DBA4) { - psx_delay_BFC0DBA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBB0u); - int psx_delay_BFC0DBB4 = 0; -label_BFC0DBB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBB0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBB4: 01400008 jr $t2 */ - psx_delay_BFC0DBB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBB8: 24090015 addiu $t1, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24090015u, cpu->gpr[9], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBB8u); -#endif - if (psx_delay_BFC0DBB4) { - psx_delay_BFC0DBB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBC0u); - int psx_delay_BFC0DBC4 = 0; -label_BFC0DBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBC0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBC4: 01400008 jr $t2 */ - psx_delay_BFC0DBC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBC8: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBC8u); -#endif - if (psx_delay_BFC0DBC4) { - psx_delay_BFC0DBC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBD0u); - int psx_delay_BFC0DBD4 = 0; -label_BFC0DBD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBD0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBD4: 01400008 jr $t2 */ - psx_delay_BFC0DBD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBD8: 24090017 addiu $t1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24090017u, cpu->gpr[9], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBD8u); -#endif - if (psx_delay_BFC0DBD4) { - psx_delay_BFC0DBD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBE0u); - int psx_delay_BFC0DBE4 = 0; -label_BFC0DBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBE0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBE4: 01400008 jr $t2 */ - psx_delay_BFC0DBE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBE8: 24090019 addiu $t1, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24090019u, cpu->gpr[9], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBE8u); -#endif - if (psx_delay_BFC0DBE4) { - psx_delay_BFC0DBE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DBF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DBF0u); - int psx_delay_BFC0DBF4 = 0; -label_BFC0DBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBF0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DBF4: 01400008 jr $t2 */ - psx_delay_BFC0DBF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DBF8: 240900A2 addiu $t1, $zero, 162 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); - PGXP_ALU(0x240900A2u, cpu->gpr[9], _pgx1, 0x000000A2u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DBF8u); -#endif - if (psx_delay_BFC0DBF4) { - psx_delay_BFC0DBF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC00u); - int psx_delay_BFC0DC04 = 0; -label_BFC0DC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC00: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC04: 01400008 jr $t2 */ - psx_delay_BFC0DC04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC08: 240900A3 addiu $t1, $zero, 163 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (163)); - PGXP_ALU(0x240900A3u, cpu->gpr[9], _pgx1, 0x000000A3u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC08u); -#endif - if (psx_delay_BFC0DC04) { - psx_delay_BFC0DC04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC10u); - int psx_delay_BFC0DC14 = 0; -label_BFC0DC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC10: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC14: 01400008 jr $t2 */ - psx_delay_BFC0DC14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC18: 24090095 addiu $t1, $zero, 149 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (149)); - PGXP_ALU(0x24090095u, cpu->gpr[9], _pgx1, 0x00000095u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC18u); -#endif - if (psx_delay_BFC0DC14) { - psx_delay_BFC0DC14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC20u); - int psx_delay_BFC0DC24 = 0; -label_BFC0DC20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC20: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC24: 01400008 jr $t2 */ - psx_delay_BFC0DC24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC28: 24090078 addiu $t1, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24090078u, cpu->gpr[9], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC28u); -#endif - if (psx_delay_BFC0DC24) { - psx_delay_BFC0DC24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC30u); - int psx_delay_BFC0DC34 = 0; -label_BFC0DC30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC30: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC34: 01400008 jr $t2 */ - psx_delay_BFC0DC34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC38: 2409007E addiu $t1, $zero, 126 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (126)); - PGXP_ALU(0x2409007Eu, cpu->gpr[9], _pgx1, 0x0000007Eu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC38u); -#endif - if (psx_delay_BFC0DC34) { - psx_delay_BFC0DC34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC40u); - int psx_delay_BFC0DC44 = 0; -label_BFC0DC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC40: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC44: 01400008 jr $t2 */ - psx_delay_BFC0DC44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC48: 2409007C addiu $t1, $zero, 124 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (124)); - PGXP_ALU(0x2409007Cu, cpu->gpr[9], _pgx1, 0x0000007Cu); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC48u); -#endif - if (psx_delay_BFC0DC44) { - psx_delay_BFC0DC44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC0DC50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC0DC50u); - int psx_delay_BFC0DC54 = 0; -label_BFC0DC50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC0DC50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC0DC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC50: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC0DC54: 01400008 jr $t2 */ - psx_delay_BFC0DC54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xBFC0DC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC0DC58: 24090085 addiu $t1, $zero, 133 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (133)); - PGXP_ALU(0x24090085u, cpu->gpr[9], _pgx1, 0x00000085u); } -#ifdef PSX_COSIM - cosim_instr(0xBFC0DC58u); -#endif - if (psx_delay_BFC0DC54) { - psx_delay_BFC0DC54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00000500(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000500u); - int psx_delay_BFC10008 = 0; -label_BFC10000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10000: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10004: 25080598 addiu $t0, $t0, 1432 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1432)); - PGXP_ALU(0x25080598u, cpu->gpr[8], _pgx1, 0x00000598u); } -#ifdef PSX_COSIM - cosim_instr(0x00000504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10008: 01000008 jr $t0 */ - psx_delay_BFC10008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1000C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000050Cu); -#endif - if (psx_delay_BFC10008) { - psx_delay_BFC10008 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000510(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000510u); - int psx_delay_BFC10018 = 0; -label_BFC10010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10010: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10014: 250805C4 addiu $t0, $t0, 1476 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1476)); - PGXP_ALU(0x250805C4u, cpu->gpr[8], _pgx1, 0x000005C4u); } -#ifdef PSX_COSIM - cosim_instr(0x00000514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10018: 01000008 jr $t0 */ - psx_delay_BFC10018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1001C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000051Cu); -#endif - if (psx_delay_BFC10018) { - psx_delay_BFC10018 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000520(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000520u); - int psx_delay_BFC10028 = 0; -label_BFC10020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10020: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10024: 250805E0 addiu $t0, $t0, 1504 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1504)); - PGXP_ALU(0x250805E0u, cpu->gpr[8], _pgx1, 0x000005E0u); } -#ifdef PSX_COSIM - cosim_instr(0x00000524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10028: 01000008 jr $t0 */ - psx_delay_BFC10028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1002C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000052Cu); -#endif - if (psx_delay_BFC10028) { - psx_delay_BFC10028 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000530(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000530u); - int psx_delay_BFC10038 = 0; -label_BFC10030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10030: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10034: 25080600 addiu $t0, $t0, 1536 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1536)); - PGXP_ALU(0x25080600u, cpu->gpr[8], _pgx1, 0x00000600u); } -#ifdef PSX_COSIM - cosim_instr(0x00000534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10038: 01000008 jr $t0 */ - psx_delay_BFC10038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1003C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000053Cu); -#endif - if (psx_delay_BFC10038) { - psx_delay_BFC10038 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000540(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000540u); - int psx_delay_BFC10060 = 0; - int psx_taken_BFC10060 = 0; - int psx_delay_BFC10088 = 0; - int psx_taken_BFC10088 = 0; - int psx_delay_BFC10090 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10054u: goto label_BFC10054; - case 0xBFC10068u: goto label_BFC10068; - case 0xBFC1007Cu: goto label_BFC1007C; - case 0xBFC10090u: goto label_BFC10090; - default: break; - } - } -label_BFC10040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10040: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10044: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10048: 24A5093C addiu $a1, $a1, 2364 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (2364)); - PGXP_ALU(0x24A5093Cu, cpu->gpr[5], _pgx1, 0x0000093Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1004C: 24060200 addiu $a2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24060200u, cpu->gpr[6], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x0000054Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10050: 24840964 addiu $a0, $a0, 2404 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (2404)); - PGXP_ALU(0x24840964u, cpu->gpr[4], _pgx1, 0x00000964u); } -#ifdef PSX_COSIM - cosim_instr(0x00000550u); -#endif -label_BFC10054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000554u); -#endif - /* 0xBFC10054: 8CA20000 lw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000554u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10058: 20A50004 addi $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1005C: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x0000055Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC10060: 14A4FFFC bne $a1, $a0, 0xBFC10054 */ - uint32_t psx_brA_BFC10060 = cpu->gpr[5]; uint32_t psx_brB_BFC10060 = cpu->gpr[4]; - psx_taken_BFC10060 = (psx_brA_BFC10060 != psx_brB_BFC10060); - psx_delay_BFC10060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC10064: ACC2FFFC sw $v0, -4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000564u); return; } g_debug_last_store_pc = 0x00000564u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC2FFFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000564u); -#endif - if (psx_delay_BFC10060) { - psx_delay_BFC10060 = 0; - if (psx_taken_BFC10060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000554u); - goto label_BFC10054; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000568u); - } -label_BFC10068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10068: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1006C: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10070: 24A50964 addiu $a1, $a1, 2404 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (2404)); - PGXP_ALU(0x24A50964u, cpu->gpr[5], _pgx1, 0x00000964u); } -#ifdef PSX_COSIM - cosim_instr(0x00000570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC10074: 240602EC addiu $a2, $zero, 748 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (748)); - PGXP_ALU(0x240602ECu, cpu->gpr[6], _pgx1, 0x000002ECu); } -#ifdef PSX_COSIM - cosim_instr(0x00000574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10078: 24840974 addiu $a0, $a0, 2420 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (2420)); - PGXP_ALU(0x24840974u, cpu->gpr[4], _pgx1, 0x00000974u); } -#ifdef PSX_COSIM - cosim_instr(0x00000578u); -#endif -label_BFC1007C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000057Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000057Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000057Cu); -#endif - /* 0xBFC1007C: 8CA20000 lw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000057Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000057Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC10080: 20A50004 addi $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC10084: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC10088: 14A4FFFC bne $a1, $a0, 0xBFC1007C */ - uint32_t psx_brA_BFC10088 = cpu->gpr[5]; uint32_t psx_brB_BFC10088 = cpu->gpr[4]; - psx_taken_BFC10088 = (psx_brA_BFC10088 != psx_brB_BFC10088); - psx_delay_BFC10088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC1008C: ACC2FFFC sw $v0, -4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000058Cu); return; } g_debug_last_store_pc = 0x0000058Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC2FFFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000058Cu); -#endif - if (psx_delay_BFC10088) { - psx_delay_BFC10088 = 0; - if (psx_taken_BFC10088) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000057Cu); - goto label_BFC1007C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000590u); - } -label_BFC10090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10090: 03E00008 jr $ra */ - psx_delay_BFC10090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000594u); -#endif - if (psx_delay_BFC10090) { - psx_delay_BFC10090 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000598(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000598u); - int psx_delay_BFC100B4 = 0; - int psx_taken_BFC100B4 = 0; - int psx_delay_BFC100BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC100A8u: goto label_BFC100A8; - case 0xBFC100BCu: goto label_BFC100BC; - default: break; - } - } -label_BFC10098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10098: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1009C: 24427460 addiu $v0, $v0, 29792 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (29792)); - PGXP_ALU(0x24427460u, cpu->gpr[2], _pgx1, 0x00007460u); } -#ifdef PSX_COSIM - cosim_instr(0x0000059Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC100A0: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000005A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC100A4: 24638920 addiu $v1, $v1, -30432 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-30432)); - PGXP_ALU(0x24638920u, cpu->gpr[3], _pgx1, 0xFFFF8920u); } -#ifdef PSX_COSIM - cosim_instr(0x000005A4u); -#endif -label_BFC100A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000005A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000005A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC100A8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000005A8u); return; } g_debug_last_store_pc = 0x000005A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000005A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC100AC: 20420004 addi $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; { int32_t psx_a = (int32_t)cpu->gpr[2]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[2] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000005ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC100B0: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000005B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC100B4: 1420FFFC bne $at, $zero, 0xBFC100A8 */ - uint32_t psx_brA_BFC100B4 = cpu->gpr[1]; uint32_t psx_brB_BFC100B4 = cpu->gpr[0]; - psx_taken_BFC100B4 = (psx_brA_BFC100B4 != psx_brB_BFC100B4); - psx_delay_BFC100B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005B8u); -#endif - if (psx_delay_BFC100B4) { - psx_delay_BFC100B4 = 0; - if (psx_taken_BFC100B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000005A8u); - goto label_BFC100A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000005BCu); - } -label_BFC100BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000005BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000005BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC100BC: 03E00008 jr $ra */ - psx_delay_BFC100BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005C0u); -#endif - if (psx_delay_BFC100BC) { - psx_delay_BFC100BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000005C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000005C4u); - int psx_delay_BFC100D8 = 0; -label_BFC100C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000005C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000005C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC100C4: 24080200 addiu $t0, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24080200u, cpu->gpr[8], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x000005C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC100C8: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000005C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC100CC: 01094020 add $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (int32_t)cpu->gpr[9]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x01094020u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000005CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005D0u); -#endif - /* 0xBFC100D0: 8D080000 lw $t0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000005D0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000005D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC100D8: 01000008 jr $t0 */ - psx_delay_BFC100D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005DCu); -#endif - if (psx_delay_BFC100D8) { - psx_delay_BFC100D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_000005E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000005E0u); - int psx_delay_BFC100F8 = 0; -label_BFC100E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000005E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000005E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC100E0: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000005E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC100E4: 25080874 addiu $t0, $t0, 2164 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (2164)); - PGXP_ALU(0x25080874u, cpu->gpr[8], _pgx1, 0x00000874u); } -#ifdef PSX_COSIM - cosim_instr(0x000005E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC100E8: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000005E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC100EC: 01094020 add $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (int32_t)cpu->gpr[9]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x01094020u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000005ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000005F0u); -#endif - /* 0xBFC100F0: 8D080000 lw $t0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000005F0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000005F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC100F8: 01000008 jr $t0 */ - psx_delay_BFC100F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC100FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000005FCu); -#endif - if (psx_delay_BFC100F8) { - psx_delay_BFC100F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000600(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000600u); - int psx_delay_BFC10118 = 0; -label_BFC10100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10100: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10104: 25080674 addiu $t0, $t0, 1652 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1652)); - PGXP_ALU(0x25080674u, cpu->gpr[8], _pgx1, 0x00000674u); } -#ifdef PSX_COSIM - cosim_instr(0x00000604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC10108: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00000608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1010C: 01094020 add $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (int32_t)cpu->gpr[9]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x01094020u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000060Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000610u); -#endif - /* 0xBFC10110: 8D080000 lw $t0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000610u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00000610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10114: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10118: 01000008 jr $t0 */ - psx_delay_BFC10118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1011C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000061Cu); -#endif - if (psx_delay_BFC10118) { - psx_delay_BFC10118 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_00000620(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000620u); - int psx_delay_BFC10128 = 0; -label_BFC10120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10120: 40026800 mfc0 $v0, cop0[13] */ - cpu->gpr[2] = cpu->cop0[13]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; -#endif - PGXP_ALU(0x40026800u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10128: 03E00008 jr $ra */ - psx_delay_BFC10128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1012C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000062Cu); -#endif - if (psx_delay_BFC10128) { - psx_delay_BFC10128 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000630(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000630u); - int psx_delay_BFC10138 = 0; -label_BFC10130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10130: 40026000 mfc0 $v0, cop0[12] */ - cpu->gpr[2] = cpu->cop0[12]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; -#endif - PGXP_ALU(0x40026000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10138: 03E00008 jr $ra */ - psx_delay_BFC10138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1013C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000063Cu); -#endif - if (psx_delay_BFC10138) { - psx_delay_BFC10138 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000640(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000640u); - int psx_delay_BFC10148 = 0; -label_BFC10140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10140: 40846000 mtc0 $a0, cop0[12] */ - cpu->cop0[12] = cpu->gpr[4]; -#ifdef PSX_COSIM - cosim_instr(0x00000640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10148: 03E00008 jr $ra */ - psx_delay_BFC10148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1014C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000064Cu); -#endif - if (psx_delay_BFC10148) { - psx_delay_BFC10148 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000650(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000650u); - int psx_delay_BFC10154 = 0; -label_BFC10150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10150: 0000000C syscall */ - cpu->pc = 0x00000650u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0x00000650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10154: 03E00008 jr $ra */ - psx_delay_BFC10154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000658u); -#endif - if (psx_delay_BFC10154) { - psx_delay_BFC10154 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000065C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000065Cu); - int psx_delay_BFC10160 = 0; -label_BFC1015C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000065Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000065Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000065Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1015C: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000065Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10160: 03E00008 jr $ra */ - psx_delay_BFC10160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10164: 24420674 addiu $v0, $v0, 1652 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1652)); - PGXP_ALU(0x24420674u, cpu->gpr[2], _pgx1, 0x00000674u); } -#ifdef PSX_COSIM - cosim_instr(0x00000664u); -#endif - if (psx_delay_BFC10160) { - psx_delay_BFC10160 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000668(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000668u); - int psx_delay_BFC1016C = 0; -label_BFC10168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10168: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1016C: 03E00008 jr $ra */ - psx_delay_BFC1016C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10170: 24420874 addiu $v0, $v0, 2164 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2164)); - PGXP_ALU(0x24420874u, cpu->gpr[2], _pgx1, 0x00000874u); } -#ifdef PSX_COSIM - cosim_instr(0x00000670u); -#endif - if (psx_delay_BFC1016C) { - psx_delay_BFC1016C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000674(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000674u); - int psx_delay_BFC10174 = 0; -label_BFC10174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10174: 00001508 jr $zero */ - psx_delay_BFC10174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC10178: 00001B20 add $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; { int32_t psx_a = (int32_t)cpu->gpr[0]; int32_t psx_b = (int32_t)cpu->gpr[0]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[3] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x00001B20u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00000678u); -#endif - if (psx_delay_BFC10174) { - psx_delay_BFC10174 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[0]); - cpu->pc = cpu->gpr[0]; return; - } -} - -void SCPH1001_func_00000C80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000C80u); - int psx_delay_BFC107B8 = 0; - int psx_delay_BFC107C4 = 0; - int psx_taken_BFC107C4 = 0; - int psx_delay_BFC107E0 = 0; - int psx_taken_BFC107E0 = 0; - int psx_delay_BFC108F0 = 0; - int psx_taken_BFC108F0 = 0; - int psx_delay_BFC10900 = 0; - int psx_taken_BFC10900 = 0; - int psx_delay_BFC10908 = 0; - int psx_delay_BFC10910 = 0; - int psx_taken_BFC10910 = 0; - int psx_delay_BFC10918 = 0; - int psx_taken_BFC10918 = 0; - int psx_delay_BFC10920 = 0; - int psx_delay_BFC10930 = 0; - int psx_taken_BFC10930 = 0; - int psx_delay_BFC1093C = 0; - int psx_taken_BFC1093C = 0; - int psx_delay_BFC10998 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10788u: goto label_BFC10788; - case 0xBFC1078Cu: goto label_BFC1078C; - case 0xBFC10790u: goto label_BFC10790; - case 0xBFC10794u: goto label_BFC10794; - case 0xBFC10798u: goto label_BFC10798; - case 0xBFC1079Cu: goto label_BFC1079C; - case 0xBFC107A0u: goto label_BFC107A0; - case 0xBFC107A4u: goto label_BFC107A4; - case 0xBFC107A8u: goto label_BFC107A8; - case 0xBFC107ACu: goto label_BFC107AC; - case 0xBFC107B0u: goto label_BFC107B0; - case 0xBFC107B4u: goto label_BFC107B4; - case 0xBFC107B8u: goto label_BFC107B8; - case 0xBFC107C0u: goto label_BFC107C0; - case 0xBFC107CCu: goto label_BFC107CC; - case 0xBFC107E8u: goto label_BFC107E8; - case 0xBFC107ECu: goto label_BFC107EC; - case 0xBFC107F0u: goto label_BFC107F0; - case 0xBFC107F4u: goto label_BFC107F4; - case 0xBFC107F8u: goto label_BFC107F8; - case 0xBFC107FCu: goto label_BFC107FC; - case 0xBFC10800u: goto label_BFC10800; - case 0xBFC108E8u: goto label_BFC108E8; - case 0xBFC108F8u: goto label_BFC108F8; - case 0xBFC10908u: goto label_BFC10908; - case 0xBFC10910u: goto label_BFC10910; - case 0xBFC10918u: goto label_BFC10918; - case 0xBFC10920u: goto label_BFC10920; - case 0xBFC10928u: goto label_BFC10928; - case 0xBFC10938u: goto label_BFC10938; - case 0xBFC10944u: goto label_BFC10944; - default: break; - } - } -label_BFC10780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000C84u); -#endif -label_BFC10788: - /* 0xBFC10788: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C88u); - cpu->pc = 0x00000C88u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10788: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000C88u); -#endif -label_BFC1078C: - /* 0xBFC1078C: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C8Cu); - cpu->pc = 0x00000C8Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1078C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000C8Cu); -#endif -label_BFC10790: - /* 0xBFC10790: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C90u); - cpu->pc = 0x00000C90u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC10790: 241A0100 addiu $k0, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x241A0100u, cpu->gpr[26], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x00000C90u); -#endif -label_BFC10794: - /* 0xBFC10794: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C94u); - cpu->pc = 0x00000C94u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C94u); -#endif - /* 0xBFC10794: 8F5A0008 lw $k0, 8($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000C94u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0008u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000C94u); -#endif -label_BFC10798: - /* 0xBFC10798: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C98u); - cpu->pc = 0x00000C98u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10798: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000C98u); -#endif -label_BFC1079C: - /* 0xBFC1079C: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000C9Cu); - cpu->pc = 0x00000C9Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000C9Cu); -#endif - /* 0xBFC1079C: 8F5A0000 lw $k0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000C9Cu); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000C9Cu); -#endif -label_BFC107A0: - /* 0xBFC107A0: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CA0u); - cpu->pc = 0x00000CA0u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CA0u); -#endif -label_BFC107A4: - /* 0xBFC107A4: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CA4u); - cpu->pc = 0x00000CA4u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC107A4: 235A0008 addi $k0, $k0, 8 */ - { uint32_t _pgx1 = cpu->gpr[26]; { int32_t psx_a = (int32_t)cpu->gpr[26]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[26] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x235A0008u, cpu->gpr[26], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00000CA4u); -#endif -label_BFC107A8: - /* 0xBFC107A8: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CA8u); - cpu->pc = 0x00000CA8u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC107A8: AF410004 sw $at, 4($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CA8u); return; } g_debug_last_store_pc = 0x00000CA8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF410004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CA8u); -#endif -label_BFC107AC: - /* 0xBFC107AC: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CACu); - cpu->pc = 0x00000CACu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000004u); -#endif - /* 0xBFC107AC: AF420008 sw $v0, 8($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CACu); return; } g_debug_last_store_pc = 0x00000CACu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAF420008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CACu); -#endif -label_BFC107B0: - /* 0xBFC107B0: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CB0u); - cpu->pc = 0x00000CB0u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC107B0: AF43000C sw $v1, 12($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CB0u); return; } g_debug_last_store_pc = 0x00000CB0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAF43000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CB0u); -#endif -label_BFC107B4: - /* 0xBFC107B4: kernel patch-range hook (RAM [0x00000C88,0x00000CB8), - * resume RAM 0x00000CB8). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000C88u) != 0x00000000u || - cpu->read_word(0x00000C8Cu) != 0x00000000u || - cpu->read_word(0x00000C90u) != 0x241A0100u || - cpu->read_word(0x00000C94u) != 0x8F5A0008u || - cpu->read_word(0x00000C98u) != 0x00000000u || - cpu->read_word(0x00000C9Cu) != 0x8F5A0000u || - cpu->read_word(0x00000CA0u) != 0x00000000u || - cpu->read_word(0x00000CA4u) != 0x235A0008u || - cpu->read_word(0x00000CA8u) != 0xAF410004u || - cpu->read_word(0x00000CACu) != 0xAF420008u || - cpu->read_word(0x00000CB0u) != 0xAF43000Cu || - cpu->read_word(0x00000CB4u) != 0xAF5F007Cu) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CB4u); - cpu->pc = 0x00000CB4u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000000u); -#endif - /* 0xBFC107B4: AF5F007C sw $ra, 124($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CB4u); return; } g_debug_last_store_pc = 0x00000CB4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAF5F007Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CB4u); -#endif -label_BFC107B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC107B8: 0C0003A8 jal 0xB0000EA0 */ - cpu->gpr[31] = 0x00000CC0u; /* jal link before delay slot */ - psx_delay_BFC107B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CBCu); -#endif - if (psx_delay_BFC107B8) { - psx_delay_BFC107B8 = 0; - cpu->gpr[31] = 0x00000CC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000EA0u); - cpu->pc = 0x00000EA0u; return; - } -label_BFC107C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC107C0: 3042003C andi $v0, $v0, 0x3C */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Cu; - PGXP_ALU(0x3042003Cu, cpu->gpr[2], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC107C4: 14400009 bne $v0, $zero, 0xBFC107EC */ - uint32_t psx_brA_BFC107C4 = cpu->gpr[2]; uint32_t psx_brB_BFC107C4 = cpu->gpr[0]; - psx_taken_BFC107C4 = (psx_brA_BFC107C4 != psx_brB_BFC107C4); - psx_delay_BFC107C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CC8u); -#endif - if (psx_delay_BFC107C4) { - psx_delay_BFC107C4 = 0; - if (psx_taken_BFC107C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CECu); - goto label_BFC107EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CCCu); - } -label_BFC107CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CCCu); -#endif - /* 0xBFC107CC: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CCCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC107D4: 00021602 srl $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 24u; - PGXP_ALU(0x00021602u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00000CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC107D8: 304200FE andi $v0, $v0, 0xFE */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFEu; - PGXP_ALU(0x304200FEu, cpu->gpr[2], _pgx1, 0x00FEu); } -#ifdef PSX_COSIM - cosim_instr(0x00000CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC107DC: 2401004A addiu $at, $zero, 74 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (74)); - PGXP_ALU(0x2401004Au, cpu->gpr[1], _pgx1, 0x0000004Au); } -#ifdef PSX_COSIM - cosim_instr(0x00000CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC107E0: 14410002 bne $v0, $at, 0xBFC107EC */ - uint32_t psx_brA_BFC107E0 = cpu->gpr[2]; uint32_t psx_brB_BFC107E0 = cpu->gpr[1]; - psx_taken_BFC107E0 = (psx_brA_BFC107E0 != psx_brB_BFC107E0); - psx_delay_BFC107E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CE4u); -#endif - if (psx_delay_BFC107E0) { - psx_delay_BFC107E0 = 0; - if (psx_taken_BFC107E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CECu); - goto label_BFC107EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CE8u); - } -label_BFC107E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC107E8: 20630004 addi $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; { int32_t psx_a = (int32_t)cpu->gpr[3]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[3] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000CE8u); -#endif -label_BFC107EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC107EC: AF430080 sw $v1, 128($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000CECu); return; } g_debug_last_store_pc = 0x00000CECu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAF430080u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000CECu); -#endif -label_BFC107F0: - /* 0xBFC107F0: kernel patch-range hook (RAM [0x00000CF0,0x00000D00), - * resume RAM 0x00000D00). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000CF0u) != 0x00000000u || - cpu->read_word(0x00000CF4u) != 0x00000000u || - cpu->read_word(0x00000CF8u) != 0x00000000u || - cpu->read_word(0x00000CFCu) != 0x00000000u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CF0u); - cpu->pc = 0x00000CF0u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CF0u); -#endif -label_BFC107F4: - /* 0xBFC107F4: kernel patch-range hook (RAM [0x00000CF0,0x00000D00), - * resume RAM 0x00000D00). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000CF0u) != 0x00000000u || - cpu->read_word(0x00000CF4u) != 0x00000000u || - cpu->read_word(0x00000CF8u) != 0x00000000u || - cpu->read_word(0x00000CFCu) != 0x00000000u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CF4u); - cpu->pc = 0x00000CF4u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CF4u); -#endif -label_BFC107F8: - /* 0xBFC107F8: kernel patch-range hook (RAM [0x00000CF0,0x00000D00), - * resume RAM 0x00000D00). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000CF0u) != 0x00000000u || - cpu->read_word(0x00000CF4u) != 0x00000000u || - cpu->read_word(0x00000CF8u) != 0x00000000u || - cpu->read_word(0x00000CFCu) != 0x00000000u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CF8u); - cpu->pc = 0x00000CF8u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CF8u); -#endif -label_BFC107FC: - /* 0xBFC107FC: kernel patch-range hook (RAM [0x00000CF0,0x00000D00), - * resume RAM 0x00000D00). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00000CF0u) != 0x00000000u || - cpu->read_word(0x00000CF4u) != 0x00000000u || - cpu->read_word(0x00000CF8u) != 0x00000000u || - cpu->read_word(0x00000CFCu) != 0x00000000u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000CFCu); - cpu->pc = 0x00000CFCu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC107FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000CFCu); -#endif -label_BFC10800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10804: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1080C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10810: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1081C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1082C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000010u); -#endif - /* 0xBFC10830: AF440010 sw $a0, 16($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D30u); return; } g_debug_last_store_pc = 0x00000D30u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAF440010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000020u); -#endif - /* 0xBFC10834: AF450014 sw $a1, 20($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D34u); return; } g_debug_last_store_pc = 0x00000D34u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAF450014u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000040u); -#endif - /* 0xBFC10838: AF460018 sw $a2, 24($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D38u); return; } g_debug_last_store_pc = 0x00000D38u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAF460018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000080u); -#endif - /* 0xBFC1083C: AF47001C sw $a3, 28($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D3Cu); return; } g_debug_last_store_pc = 0x00000D3Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAF47001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10840: 40046000 mfc0 $a0, cop0[12] */ - cpu->gpr[4] = cpu->cop0[12]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 4u; -#endif - PGXP_ALU(0x40046000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000010u); -#endif - /* 0xBFC10848: AF44008C sw $a0, 140($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D48u); return; } g_debug_last_store_pc = 0x00000D48u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAF44008Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC1084C: 40056800 mfc0 $a1, cop0[13] */ - cpu->gpr[5] = cpu->cop0[13]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 5u; -#endif - PGXP_ALU(0x40056800u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000020u); -#endif - /* 0xBFC10854: AF450090 sw $a1, 144($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D54u); return; } g_debug_last_store_pc = 0x00000D54u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAF450090u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000000u); -#endif - /* 0xBFC10858: AF5B006C sw $k1, 108($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D58u); return; } g_debug_last_store_pc = 0x00000D58u; cpu->write_word(psx_addr, cpu->gpr[27]); } - PGXP_STORE(0xAF5B006Cu, _pgxa, cpu->gpr[27]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010000u); -#endif - /* 0xBFC1085C: AF500040 sw $s0, 64($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D5Cu); return; } g_debug_last_store_pc = 0x00000D5Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAF500040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020000u); -#endif - /* 0xBFC10860: AF510044 sw $s1, 68($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D60u); return; } g_debug_last_store_pc = 0x00000D60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAF510044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040000u); -#endif - /* 0xBFC10864: AF520048 sw $s2, 72($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D64u); return; } g_debug_last_store_pc = 0x00000D64u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAF520048u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080000u); -#endif - /* 0xBFC10868: AF53004C sw $s3, 76($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D68u); return; } g_debug_last_store_pc = 0x00000D68u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAF53004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100000u); -#endif - /* 0xBFC1086C: AF540050 sw $s4, 80($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D6Cu); return; } g_debug_last_store_pc = 0x00000D6Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAF540050u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200000u); -#endif - /* 0xBFC10870: AF550054 sw $s5, 84($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D70u); return; } g_debug_last_store_pc = 0x00000D70u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAF550054u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400000u); -#endif - /* 0xBFC10874: AF560058 sw $s6, 88($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D74u); return; } g_debug_last_store_pc = 0x00000D74u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAF560058u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800000u); -#endif - /* 0xBFC10878: AF57005C sw $s7, 92($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D78u); return; } g_debug_last_store_pc = 0x00000D78u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAF57005Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000100u); -#endif - /* 0xBFC1087C: AF480020 sw $t0, 32($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D7Cu); return; } g_debug_last_store_pc = 0x00000D7Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAF480020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000200u); -#endif - /* 0xBFC10880: AF490024 sw $t1, 36($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D80u); return; } g_debug_last_store_pc = 0x00000D80u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAF490024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000400u); -#endif - /* 0xBFC10884: AF4A0028 sw $t2, 40($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D84u); return; } g_debug_last_store_pc = 0x00000D84u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAF4A0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000800u); -#endif - /* 0xBFC10888: AF4B002C sw $t3, 44($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D88u); return; } g_debug_last_store_pc = 0x00000D88u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAF4B002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001000u); -#endif - /* 0xBFC1088C: AF4C0030 sw $t4, 48($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D8Cu); return; } g_debug_last_store_pc = 0x00000D8Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAF4C0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002000u); -#endif - /* 0xBFC10890: AF4D0034 sw $t5, 52($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D90u); return; } g_debug_last_store_pc = 0x00000D90u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAF4D0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004000u); -#endif - /* 0xBFC10894: AF4E0038 sw $t6, 56($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D94u); return; } g_debug_last_store_pc = 0x00000D94u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF4E0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008000u); -#endif - /* 0xBFC10898: AF4F003C sw $t7, 60($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D98u); return; } g_debug_last_store_pc = 0x00000D98u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF4F003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000000u); -#endif - /* 0xBFC1089C: AF580060 sw $t8, 96($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D9Cu); return; } g_debug_last_store_pc = 0x00000D9Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF580060u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00000D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000000u); -#endif - /* 0xBFC108A0: AF590064 sw $t9, 100($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DA0u); return; } g_debug_last_store_pc = 0x00000DA0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAF590064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000000u); -#endif - /* 0xBFC108A4: AF5C0070 sw $gp, 112($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DA4u); return; } g_debug_last_store_pc = 0x00000DA4u; cpu->write_word(psx_addr, cpu->gpr[28]); } - PGXP_STORE(0xAF5C0070u, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000000u); -#endif - /* 0xBFC108A8: AF5D0074 sw $sp, 116($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DA8u); return; } g_debug_last_store_pc = 0x00000DA8u; cpu->write_word(psx_addr, cpu->gpr[29]); } - PGXP_STORE(0xAF5D0074u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000000u); -#endif - /* 0xBFC108AC: AF5E0078 sw $fp, 120($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DACu); return; } g_debug_last_store_pc = 0x00000DACu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAF5E0078u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC108B0: 00002010 mfhi $a0 */ - cpu->gpr[4] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002010u, cpu->gpr[4], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC108B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000010u); -#endif - /* 0xBFC108B8: AF440084 sw $a0, 132($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DB8u); return; } g_debug_last_store_pc = 0x00000DB8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAF440084u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC108BC: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC108C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000010u); -#endif - /* 0xBFC108C4: AF440088 sw $a0, 136($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DC4u); return; } g_debug_last_store_pc = 0x00000DC4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAF440088u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC108C8: 3C1D0000 lui $sp, 0x0 */ - cpu->gpr[29] = 0x00000000u; - PGXP_ALU(0x3C1D0000u, cpu->gpr[29], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC108CC: 24130100 addiu $s3, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24130100u, cpu->gpr[19], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x00000DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DD0u); -#endif - /* 0xBFC108D0: 8FBD6CF0 lw $sp, 27888($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 27888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (27888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DD0u); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x20000000u); } - PGXP_LOAD(0x8FBD6CF0u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DD0u); -#endif - /* 0xBFC108D4: 8E730000 lw $s3, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DD4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E730000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000000u); -#endif - /* 0xBFC108D8: 3C1C0001 lui $gp, 0x1 */ - cpu->gpr[28] = 0x00010000u; - PGXP_ALU(0x3C1C0001u, cpu->gpr[28], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000000u); -#endif - /* 0xBFC108DC: 279CF450 addiu $gp, $gp, -2992 */ - { uint32_t _pgx1 = cpu->gpr[28]; cpu->gpr[28] = (uint32_t)((int32_t)cpu->gpr[28] + (-2992)); - PGXP_ALU(0x279CF450u, cpu->gpr[28], _pgx1, 0xFFFFF450u); } -#ifdef PSX_COSIM - cosim_instr(0x00000DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000001u); -#endif - /* 0xBFC108E0: 03A0F021 addu $fp, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00000DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC108E4: 22740020 addi $s4, $s3, 32 */ - { uint32_t _pgx1 = cpu->gpr[19]; { int32_t psx_a = (int32_t)cpu->gpr[19]; int32_t psx_b = (32); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[20] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x22740020u, cpu->gpr[20], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00000DE4u); -#endif -label_BFC108E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DE8u); -#endif - /* 0xBFC108E8: 8E760000 lw $s6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DE8u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x80000u); } - PGXP_LOAD(0x8E760000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC108EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC108F0: 12C00011 beq $s6, $zero, 0xBFC10938 */ - uint32_t psx_brA_BFC108F0 = cpu->gpr[22]; uint32_t psx_brB_BFC108F0 = cpu->gpr[0]; - psx_taken_BFC108F0 = (psx_brA_BFC108F0 == psx_brB_BFC108F0); - psx_delay_BFC108F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC108F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000DF4u); -#endif - if (psx_delay_BFC108F0) { - psx_delay_BFC108F0 = 0; - if (psx_taken_BFC108F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E38u); - goto label_BFC10938; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000DF8u); - } -label_BFC108F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000DF8u); -#endif - /* 0xBFC108F8: 8ED10008 lw $s1, 8($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DF8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x400000u); } - PGXP_LOAD(0x8ED10008u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DF8u); -#endif - /* 0xBFC108FC: 8ED00004 lw $s0, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DFCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x400000u); } - PGXP_LOAD(0x8ED00004u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00000DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC10900: 12200009 beq $s1, $zero, 0xBFC10928 */ - uint32_t psx_brA_BFC10900 = cpu->gpr[17]; uint32_t psx_brB_BFC10900 = cpu->gpr[0]; - psx_taken_BFC10900 = (psx_brA_BFC10900 == psx_brB_BFC10900); - psx_delay_BFC10900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E04u); -#endif - if (psx_delay_BFC10900) { - psx_delay_BFC10900 = 0; - if (psx_taken_BFC10900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E28u); - goto label_BFC10928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E08u); - } -label_BFC10908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80020000u); -#endif - /* 0xBFC10908: 0220F809 jalr $ra, $s1 */ - cpu->gpr[31] = 0x00000E10u; /* jalr link before delay slot */ - psx_delay_BFC10908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1090C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E0Cu); -#endif - if (psx_delay_BFC10908) { - psx_delay_BFC10908 = 0; - { uint32_t _t = cpu->gpr[17]; - cpu->gpr[31] = 0x00000E10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC10910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10910: 10400005 beq $v0, $zero, 0xBFC10928 */ - uint32_t psx_brA_BFC10910 = cpu->gpr[2]; uint32_t psx_brB_BFC10910 = cpu->gpr[0]; - psx_taken_BFC10910 = (psx_brA_BFC10910 == psx_brB_BFC10910); - psx_delay_BFC10910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E14u); -#endif - if (psx_delay_BFC10910) { - psx_delay_BFC10910 = 0; - if (psx_taken_BFC10910) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E28u); - goto label_BFC10928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E18u); - } -label_BFC10918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC10918: 12000003 beq $s0, $zero, 0xBFC10928 */ - uint32_t psx_brA_BFC10918 = cpu->gpr[16]; uint32_t psx_brB_BFC10918 = cpu->gpr[0]; - psx_taken_BFC10918 = (psx_brA_BFC10918 == psx_brB_BFC10918); - psx_delay_BFC10918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1091C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00000E1Cu); -#endif - if (psx_delay_BFC10918) { - psx_delay_BFC10918 = 0; - if (psx_taken_BFC10918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E28u); - goto label_BFC10928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E20u); - } -label_BFC10920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80010000u); -#endif - /* 0xBFC10920: 0200F809 jalr $ra, $s0 */ - cpu->gpr[31] = 0x00000E28u; /* jalr link before delay slot */ - psx_delay_BFC10920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E24u); -#endif - if (psx_delay_BFC10920) { - psx_delay_BFC10920 = 0; - { uint32_t _t = cpu->gpr[16]; - cpu->gpr[31] = 0x00000E28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC10928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E28u); -#endif - /* 0xBFC10928: 8ED60000 lw $s6, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E28u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x400000u); } - PGXP_LOAD(0x8ED60000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1092C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC10930: 16C0FFF1 bne $s6, $zero, 0xBFC108F8 */ - uint32_t psx_brA_BFC10930 = cpu->gpr[22]; uint32_t psx_brB_BFC10930 = cpu->gpr[0]; - psx_taken_BFC10930 = (psx_brA_BFC10930 != psx_brB_BFC10930); - psx_delay_BFC10930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10934: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E34u); -#endif - if (psx_delay_BFC10930) { - psx_delay_BFC10930 = 0; - if (psx_taken_BFC10930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000DF8u); - goto label_BFC108F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E38u); - } -label_BFC10938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC10938: 22730008 addi $s3, $s3, 8 */ - { uint32_t _pgx1 = cpu->gpr[19]; { int32_t psx_a = (int32_t)cpu->gpr[19]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[19] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x22730008u, cpu->gpr[19], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00000E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC1093C: 1693FFEA bne $s4, $s3, 0xBFC108E8 */ - uint32_t psx_brA_BFC1093C = cpu->gpr[20]; uint32_t psx_brB_BFC1093C = cpu->gpr[19]; - psx_taken_BFC1093C = (psx_brA_BFC1093C != psx_brB_BFC1093C); - psx_delay_BFC1093C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E40u); -#endif - if (psx_delay_BFC1093C) { - psx_delay_BFC1093C = 0; - if (psx_taken_BFC1093C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000DE8u); - goto label_BFC108E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000E44u); - } -label_BFC10944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC10944: 241A0100 addiu $k0, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x241A0100u, cpu->gpr[26], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x00000E44u); -#endif - /* 0xBFC10948: 8F5A0008 lw $k0, 8($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E48u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0008u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1094C: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E50u); -#endif - /* 0xBFC10950: 8F5A0000 lw $k0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E50u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10954: 248475D0 addiu $a0, $a0, 30160 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (30160)); - PGXP_ALU(0x248475D0u, cpu->gpr[4], _pgx1, 0x000075D0u); } -#ifdef PSX_COSIM - cosim_instr(0x00000E54u); -#endif - /* 0xBFC10958: 8C840000 lw $a0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E58u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C840000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1095C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00000E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC10960: 235A0008 addi $k0, $k0, 8 */ - { uint32_t _pgx1 = cpu->gpr[26]; { int32_t psx_a = (int32_t)cpu->gpr[26]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[26] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x235A0008u, cpu->gpr[26], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00000E60u); -#endif - /* 0xBFC10964: 8C9F0000 lw $ra, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x10u); } - PGXP_LOAD(0x8C9F0000u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E64u); -#endif - /* 0xBFC10968: 8C9C002C lw $gp, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E68u); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x10u); } - PGXP_LOAD(0x8C9C002Cu, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E68u); -#endif - /* 0xBFC1096C: 8C9D0004 lw $sp, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E6Cu); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x10u); } - PGXP_LOAD(0x8C9D0004u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E70u); -#endif - /* 0xBFC10970: 8C9E0008 lw $fp, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E70u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x10u); } - PGXP_LOAD(0x8C9E0008u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E70u); -#endif - /* 0xBFC10974: 8C90000C lw $s0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E74u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10u); } - PGXP_LOAD(0x8C90000Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E74u); -#endif - /* 0xBFC10978: 8C910010 lw $s1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E78u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } - PGXP_LOAD(0x8C910010u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E78u); -#endif - /* 0xBFC1097C: 8C920014 lw $s2, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E7Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } - PGXP_LOAD(0x8C920014u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E80u); -#endif - /* 0xBFC10980: 8C930018 lw $s3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E80u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x10u); } - PGXP_LOAD(0x8C930018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E80u); -#endif - /* 0xBFC10984: 8C94001C lw $s4, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E84u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x10u); } - PGXP_LOAD(0x8C94001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E84u); -#endif - /* 0xBFC10988: 8C950020 lw $s5, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E88u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } - PGXP_LOAD(0x8C950020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E88u); -#endif - /* 0xBFC1098C: 8C960024 lw $s6, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E8Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x10u); } - PGXP_LOAD(0x8C960024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000E90u); -#endif - /* 0xBFC10990: 8C970028 lw $s7, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E90u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x10u); } - PGXP_LOAD(0x8C970028u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x00000E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC10994: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00000E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10998: 03E00008 jr $ra */ - psx_delay_BFC10998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1099C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000E9Cu); -#endif - if (psx_delay_BFC10998) { - psx_delay_BFC10998 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; psx_restore_state_escape(); return; /* longjmp-return */ - } -} - -void SCPH1001_func_00000EA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000EA0u); - int psx_delay_BFC109A8 = 0; -label_BFC109A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC109A0: 40026800 mfc0 $v0, cop0[13] */ - cpu->gpr[2] = cpu->cop0[13]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; -#endif - PGXP_ALU(0x40026800u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC109A4: 40037000 mfc0 $v1, cop0[14] */ - cpu->gpr[3] = cpu->cop0[14]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 3u; -#endif - PGXP_ALU(0x40037000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC109A8: 03E00008 jr $ra */ - psx_delay_BFC109A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC109AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000EACu); -#endif - if (psx_delay_BFC109A8) { - psx_delay_BFC109A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000EB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000EB0u); - int psx_delay_BFC109D4 = 0; - int psx_taken_BFC109D4 = 0; - int psx_delay_BFC109FC = 0; - int psx_taken_BFC109FC = 0; - int psx_delay_BFC10A04 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC109C8u: goto label_BFC109C8; - case 0xBFC109DCu: goto label_BFC109DC; - case 0xBFC109F0u: goto label_BFC109F0; - case 0xBFC10A04u: goto label_BFC10A04; - default: break; - } - } -label_BFC109B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC109B0: 3C028000 lui $v0, 0x8000 */ - cpu->gpr[2] = 0x80000000u; - PGXP_ALU(0x3C028000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109B4: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC109B8: 3C1B0000 lui $k1, 0x0 */ - cpu->gpr[27] = 0x00000000u; - PGXP_ALU(0x3C1B0000u, cpu->gpr[27], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC109BC: 34420080 ori $v0, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x80u; - PGXP_ALU(0x34420080u, cpu->gpr[2], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00000EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109C0: 275A0F0C addiu $k0, $k0, 3852 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (3852)); - PGXP_ALU(0x275A0F0Cu, cpu->gpr[26], _pgx1, 0x00000F0Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC109C4: 277B0F1C addiu $k1, $k1, 3868 */ - { uint32_t _pgx1 = cpu->gpr[27]; cpu->gpr[27] = (uint32_t)((int32_t)cpu->gpr[27] + (3868)); - PGXP_ALU(0x277B0F1Cu, cpu->gpr[27], _pgx1, 0x00000F1Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000EC4u); -#endif -label_BFC109C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EC8u); -#endif - /* 0xBFC109C8: 8F430000 lw $v1, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000EC8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4000000u); } - PGXP_LOAD(0x8F430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109CC: 275A0004 addiu $k0, $k0, 4 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (4)); - PGXP_ALU(0x275A0004u, cpu->gpr[26], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC109D0: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000000u); -#endif - /* 0xBFC109D4: 175BFFFC bne $k0, $k1, 0xBFC109C8 */ - uint32_t psx_brA_BFC109D4 = cpu->gpr[26]; uint32_t psx_brB_BFC109D4 = cpu->gpr[27]; - psx_taken_BFC109D4 = (psx_brA_BFC109D4 != psx_brB_BFC109D4); - psx_delay_BFC109D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC109D8: AC43FFFC sw $v1, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000ED8u); return; } g_debug_last_store_pc = 0x00000ED8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43FFFCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000ED8u); -#endif - if (psx_delay_BFC109D4) { - psx_delay_BFC109D4 = 0; - if (psx_taken_BFC109D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000EC8u); - goto label_BFC109C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000EDCu); - } -label_BFC109DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109DC: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC109E0: 3C1B0000 lui $k1, 0x0 */ - cpu->gpr[27] = 0x00000000u; - PGXP_ALU(0x3C1B0000u, cpu->gpr[27], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC109E4: 3C028000 lui $v0, 0x8000 */ - cpu->gpr[2] = 0x80000000u; - PGXP_ALU(0x3C028000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109E8: 275A0F0C addiu $k0, $k0, 3852 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (3852)); - PGXP_ALU(0x275A0F0Cu, cpu->gpr[26], _pgx1, 0x00000F0Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC109EC: 277B0F1C addiu $k1, $k1, 3868 */ - { uint32_t _pgx1 = cpu->gpr[27]; cpu->gpr[27] = (uint32_t)((int32_t)cpu->gpr[27] + (3868)); - PGXP_ALU(0x277B0F1Cu, cpu->gpr[27], _pgx1, 0x00000F1Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00000EECu); -#endif -label_BFC109F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000EF0u); -#endif - /* 0xBFC109F0: 8F430000 lw $v1, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000EF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4000000u); } - PGXP_LOAD(0x8F430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC109F4: 275A0004 addiu $k0, $k0, 4 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (4)); - PGXP_ALU(0x275A0004u, cpu->gpr[26], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC109F8: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00000EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000000u); -#endif - /* 0xBFC109FC: 175BFFFC bne $k0, $k1, 0xBFC109F0 */ - uint32_t psx_brA_BFC109FC = cpu->gpr[26]; uint32_t psx_brB_BFC109FC = cpu->gpr[27]; - psx_taken_BFC109FC = (psx_brA_BFC109FC != psx_brB_BFC109FC); - psx_delay_BFC109FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC10A00: AC43FFFC sw $v1, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F00u); return; } g_debug_last_store_pc = 0x00000F00u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43FFFCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F00u); -#endif - if (psx_delay_BFC109FC) { - psx_delay_BFC109FC = 0; - if (psx_taken_BFC109FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000EF0u); - goto label_BFC109F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F04u); - } -label_BFC10A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10A04: 08001A9C j 0xB0006A70 */ - psx_delay_BFC10A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F08u); -#endif - if (psx_delay_BFC10A04) { - psx_delay_BFC10A04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A70u); - cpu->pc = 0x00006A70u; return; - } -} - -void SCPH1001_func_00000F20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000F20u); - int psx_delay_BFC10A24 = 0; -label_BFC10A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10A20: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10A24: 03E00008 jr $ra */ - psx_delay_BFC10A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC10A28: AC2475D0 sw $a0, 30160($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F28u); return; } g_debug_last_store_pc = 0x00000F28u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC2475D0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F28u); -#endif - if (psx_delay_BFC10A24) { - psx_delay_BFC10A24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000F2C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000F2Cu); - int psx_delay_BFC10A38 = 0; -label_BFC10A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000F2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10A2C: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10A30: 24426CF4 addiu $v0, $v0, 27892 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (27892)); - PGXP_ALU(0x24426CF4u, cpu->gpr[2], _pgx1, 0x00006CF4u); } -#ifdef PSX_COSIM - cosim_instr(0x00000F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10A34: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10A38: 03E00008 jr $ra */ - psx_delay_BFC10A38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC10A3C: AC2275D0 sw $v0, 30160($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F3Cu); return; } g_debug_last_store_pc = 0x00000F3Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC2275D0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F3Cu); -#endif - if (psx_delay_BFC10A38) { - psx_delay_BFC10A38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00000F40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00000F40u); - int psx_delay_BFC10B10 = 0; - int psx_delay_BFC10B14 = 0; -label_BFC10A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC10A40: 241A0100 addiu $k0, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x241A0100u, cpu->gpr[26], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x00000F40u); -#endif - /* 0xBFC10A44: 8F5A0008 lw $k0, 8($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F44u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0008u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F48u); -#endif - /* 0xBFC10A4C: 8F5A0000 lw $k0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F4Cu); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000010u); -#endif - /* 0xBFC10A54: 23440008 addi $a0, $k0, 8 */ - { uint32_t _pgx1 = cpu->gpr[26]; { int32_t psx_a = (int32_t)cpu->gpr[26]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x23440008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00000F54u); -#endif - /* 0xBFC10A58: 8C820088 lw $v0, 136($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F58u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820088u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10A60: 00400013 mtlo $v0 */ - cpu->lo = cpu->gpr[2]; - PGXP_ALU(0x00400013u, cpu->lo, cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F64u); -#endif - /* 0xBFC10A68: 8C820084 lw $v0, 132($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F68u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820084u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10A70: 00400011 mthi $v0 */ - cpu->hi = cpu->gpr[2]; - PGXP_ALU(0x00400011u, cpu->hi, cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00000F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F74u); -#endif - /* 0xBFC10A78: 8C82008C lw $v0, 140($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82008Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10A80: 40826000 mtc0 $v0, cop0[12] */ - cpu->cop0[12] = cpu->gpr[2]; -#ifdef PSX_COSIM - cosim_instr(0x00000F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000F84u); -#endif - /* 0xBFC10A88: 8C820008 lw $v0, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F88u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F88u); -#endif - /* 0xBFC10A8C: 8C83000C lw $v1, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F8Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C83000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000F90u); -#endif - /* 0xBFC10A90: 8C850014 lw $a1, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F90u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10u); } - PGXP_LOAD(0x8C850014u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F90u); -#endif - /* 0xBFC10A94: 8C860018 lw $a2, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F94u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x8C860018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F94u); -#endif - /* 0xBFC10A98: 8C87001C lw $a3, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F98u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C87001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F98u); -#endif - /* 0xBFC10A9C: 8C880020 lw $t0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F9Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00000F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FA0u); -#endif - /* 0xBFC10AA0: 8C890024 lw $t1, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FA0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FA0u); -#endif - /* 0xBFC10AA4: 8C8A0028 lw $t2, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FA4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FA4u); -#endif - /* 0xBFC10AA8: 8C8B002C lw $t3, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FA8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FA8u); -#endif - /* 0xBFC10AAC: 8C8C0030 lw $t4, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FACu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FB0u); -#endif - /* 0xBFC10AB0: 8C8D0034 lw $t5, 52($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FB0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FB0u); -#endif - /* 0xBFC10AB4: 8C8E0038 lw $t6, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FB4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FB4u); -#endif - /* 0xBFC10AB8: 8C8F003C lw $t7, 60($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FB8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x8C8F003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FB8u); -#endif - /* 0xBFC10ABC: 8C900040 lw $s0, 64($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FBCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10u); } - PGXP_LOAD(0x8C900040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FC0u); -#endif - /* 0xBFC10AC0: 8C910044 lw $s1, 68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FC0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } - PGXP_LOAD(0x8C910044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FC0u); -#endif - /* 0xBFC10AC4: 8C920048 lw $s2, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FC4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } - PGXP_LOAD(0x8C920048u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FC4u); -#endif - /* 0xBFC10AC8: 8C93004C lw $s3, 76($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FC8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x10u); } - PGXP_LOAD(0x8C93004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FC8u); -#endif - /* 0xBFC10ACC: 8C940050 lw $s4, 80($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FCCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x10u); } - PGXP_LOAD(0x8C940050u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FD0u); -#endif - /* 0xBFC10AD0: 8C950054 lw $s5, 84($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FD0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } - PGXP_LOAD(0x8C950054u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FD0u); -#endif - /* 0xBFC10AD4: 8C960058 lw $s6, 88($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FD4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x10u); } - PGXP_LOAD(0x8C960058u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FD4u); -#endif - /* 0xBFC10AD8: 8C97005C lw $s7, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FD8u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x10u); } - PGXP_LOAD(0x8C97005Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FD8u); -#endif - /* 0xBFC10ADC: 8C980060 lw $t8, 96($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FDCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C980060u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FE0u); -#endif - /* 0xBFC10AE0: 8C990064 lw $t9, 100($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FE0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C990064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FE0u); -#endif - /* 0xBFC10AE4: 8C9B006C lw $k1, 108($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FE4u); return; } cpu->gpr[27] = psx_cyc_load_word(cpu, psx_addr, 27, 0x10u); } - PGXP_LOAD(0x8C9B006Cu, _pgxa, cpu->gpr[27]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FE4u); -#endif - /* 0xBFC10AE8: 8C9C0070 lw $gp, 112($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FE8u); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x10u); } - PGXP_LOAD(0x8C9C0070u, _pgxa, cpu->gpr[28]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FE8u); -#endif - /* 0xBFC10AEC: 8C9D0074 lw $sp, 116($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FECu); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x10u); } - PGXP_LOAD(0x8C9D0074u, _pgxa, cpu->gpr[29]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00000FF0u); -#endif - /* 0xBFC10AF0: 8C9E0078 lw $fp, 120($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FF0u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x10u); } - PGXP_LOAD(0x8C9E0078u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FF0u); -#endif - /* 0xBFC10AF4: 8C9F007C lw $ra, 124($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x10u); } - PGXP_LOAD(0x8C9F007Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10AF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00000FF8u); -#endif - /* 0xBFC10AFC: 8C810004 lw $at, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FFCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x10u); } - PGXP_LOAD(0x8C810004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x00000FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001000u); -#endif - /* 0xBFC10B00: 8C9A0080 lw $k0, 128($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001000u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x10u); } - PGXP_LOAD(0x8C9A0080u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00001000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001004u); -#endif - /* 0xBFC10B08: 8C840010 lw $a0, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001008u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C840010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC10B10: 03400008 jr $k0 */ - psx_delay_BFC10B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC10B14: 42000010 rfe */ - { uint32_t sr = cpu->cop0[12]; cpu->cop0[12] = (sr & 0xFFFFFFC0u) | ((sr >> 2) & 0x0Fu); } /* rfe */ - psx_rfe_mark_escape(); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[26]); - cpu->pc = cpu->gpr[26]; return; -} - -void SCPH1001_func_00001030(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001030u); - int psx_delay_BFC10B30 = 0; - int psx_taken_BFC10B30 = 0; - int psx_delay_BFC10B48 = 0; - int psx_taken_BFC10B48 = 0; - int psx_delay_BFC10B54 = 0; - int psx_taken_BFC10B54 = 0; - int psx_delay_BFC10B8C = 0; - int psx_taken_BFC10B8C = 0; - int psx_delay_BFC10B94 = 0; - int psx_taken_BFC10B94 = 0; - int psx_delay_BFC10BA0 = 0; - int psx_taken_BFC10BA0 = 0; - int psx_delay_BFC10BA8 = 0; - int psx_taken_BFC10BA8 = 0; - int psx_delay_BFC10BB0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10B38u: goto label_BFC10B38; - case 0xBFC10B50u: goto label_BFC10B50; - case 0xBFC10B5Cu: goto label_BFC10B5C; - case 0xBFC10B60u: goto label_BFC10B60; - case 0xBFC10B64u: goto label_BFC10B64; - case 0xBFC10B94u: goto label_BFC10B94; - case 0xBFC10B9Cu: goto label_BFC10B9C; - case 0xBFC10BA0u: goto label_BFC10BA0; - case 0xBFC10BA8u: goto label_BFC10BA8; - case 0xBFC10BB0u: goto label_BFC10BB0; - default: break; - } - } -label_BFC10B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC10B30: 10800021 beq $a0, $zero, 0xBFC10BB8 */ - uint32_t psx_brA_BFC10B30 = cpu->gpr[4]; uint32_t psx_brB_BFC10B30 = cpu->gpr[0]; - psx_taken_BFC10B30 = (psx_brA_BFC10B30 == psx_brB_BFC10B30); - psx_delay_BFC10B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001034u); -#endif - if (psx_delay_BFC10B30) { - psx_delay_BFC10B30 = 0; - if (psx_taken_BFC10B30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010B8u); - cpu->pc = 0x000010B8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001038u); - } -label_BFC10B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10B38: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001038u); -#endif - /* 0xBFC10B3C: 8C427464 lw $v0, 29796($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29796; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000103Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427464u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC10B44: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10B48: 14200005 bne $at, $zero, 0xBFC10B60 */ - uint32_t psx_brA_BFC10B48 = cpu->gpr[1]; uint32_t psx_brB_BFC10B48 = cpu->gpr[0]; - psx_taken_BFC10B48 = (psx_brA_BFC10B48 != psx_brB_BFC10B48); - psx_delay_BFC10B48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC10B4C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000104Cu); -#endif - if (psx_delay_BFC10B48) { - psx_delay_BFC10B48 = 0; - if (psx_taken_BFC10B48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001060u); - goto label_BFC10B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001050u); - } -label_BFC10B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC10B50: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B54: 10000003 beq $zero, $zero, 0xBFC10B64 */ - uint32_t psx_brA_BFC10B54 = cpu->gpr[0]; uint32_t psx_brB_BFC10B54 = cpu->gpr[0]; - psx_taken_BFC10B54 = (psx_brA_BFC10B54 == psx_brB_BFC10B54); - psx_delay_BFC10B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC10B58: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001058u); -#endif - if (psx_delay_BFC10B54) { - psx_delay_BFC10B54 = 0; - if (psx_taken_BFC10B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001064u); - goto label_BFC10B64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000105Cu); - } -label_BFC10B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000105Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC10B5C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000105Cu); -#endif -label_BFC10B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC10B60: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001060u); -#endif -label_BFC10B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10B64: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC10B68: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001068u); -#endif - /* 0xBFC10B6C: 8C847460 lw $a0, 29792($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000106Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847460u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001070u); -#endif - /* 0xBFC10B70: 8DCE7468 lw $t6, 29800($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001070u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE7468u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC10B78: 01C41023 subu $v0, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C41023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10B7C: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000107Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10B80: 00021080 sll $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00021080u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10B84: 2442FFFC addiu $v0, $v0, -4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); - PGXP_ALU(0x2442FFFCu, cpu->gpr[2], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0x00001084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC10B88: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10B8C: 14200004 bne $at, $zero, 0xBFC10BA0 */ - uint32_t psx_brA_BFC10B8C = cpu->gpr[1]; uint32_t psx_brB_BFC10B8C = cpu->gpr[0]; - psx_taken_BFC10B8C = (psx_brA_BFC10B8C != psx_brB_BFC10B8C); - psx_delay_BFC10B8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC10B90: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001090u); -#endif - if (psx_delay_BFC10B8C) { - psx_delay_BFC10B8C = 0; - if (psx_taken_BFC10B8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010A0u); - goto label_BFC10BA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001094u); - } -label_BFC10B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10B94: 10000013 beq $zero, $zero, 0xBFC10BE4 */ - uint32_t psx_brA_BFC10B94 = cpu->gpr[0]; uint32_t psx_brB_BFC10B94 = cpu->gpr[0]; - psx_taken_BFC10B94 = (psx_brA_BFC10B94 == psx_brB_BFC10B94); - psx_delay_BFC10B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC10B98: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001098u); -#endif - if (psx_delay_BFC10B94) { - psx_delay_BFC10B94 = 0; - if (psx_taken_BFC10B94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010E4u); - cpu->pc = 0x000010E4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000109Cu); - } -label_BFC10B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000109Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC10B9C: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000109Cu); -#endif -label_BFC10BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10BA0: 14200003 bne $at, $zero, 0xBFC10BB0 */ - uint32_t psx_brA_BFC10BA0 = cpu->gpr[1]; uint32_t psx_brB_BFC10BA0 = cpu->gpr[0]; - psx_taken_BFC10BA0 = (psx_brA_BFC10BA0 != psx_brB_BFC10BA0); - psx_delay_BFC10BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10BA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000010A4u); -#endif - if (psx_delay_BFC10BA0) { - psx_delay_BFC10BA0 = 0; - if (psx_taken_BFC10BA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010B0u); - goto label_BFC10BB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010A8u); - } -label_BFC10BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10BA8: 1000000E beq $zero, $zero, 0xBFC10BE4 */ - uint32_t psx_brA_BFC10BA8 = cpu->gpr[0]; uint32_t psx_brB_BFC10BA8 = cpu->gpr[0]; - psx_taken_BFC10BA8 = (psx_brA_BFC10BA8 == psx_brB_BFC10BA8); - psx_delay_BFC10BA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC10BAC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010ACu); -#endif - if (psx_delay_BFC10BA8) { - psx_delay_BFC10BA8 = 0; - if (psx_taken_BFC10BA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010E4u); - cpu->pc = 0x000010E4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010B0u); - } -label_BFC10BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10BB0: 03E00008 jr $ra */ - psx_delay_BFC10BB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10BB4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000010B4u); -#endif - if (psx_delay_BFC10BB0) { - psx_delay_BFC10BB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000010B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000010B8u); - int psx_delay_BFC10BD0 = 0; - int psx_taken_BFC10BD0 = 0; - int psx_delay_BFC10BD8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10BD8u: goto label_BFC10BD8; - default: break; - } - } -label_BFC10BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC10BB8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000010B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC10BBC: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000010BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010C0u); -#endif - /* 0xBFC10BC0: 8C847460 lw $a0, 29792($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847460u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000010C0u); -#endif - /* 0xBFC10BC4: 8DEF7468 lw $t7, 29800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010C4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF7468u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000010C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000010C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC10BCC: 008F082B sltu $at, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x008F082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10BD0: 14200004 bne $at, $zero, 0xBFC10BE4 */ - uint32_t psx_brA_BFC10BD0 = cpu->gpr[1]; uint32_t psx_brB_BFC10BD0 = cpu->gpr[0]; - psx_taken_BFC10BD0 = (psx_brA_BFC10BD0 != psx_brB_BFC10BD0); - psx_delay_BFC10BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC10BD4: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010D4u); -#endif - if (psx_delay_BFC10BD0) { - psx_delay_BFC10BD0 = 0; - if (psx_taken_BFC10BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010E4u); - cpu->pc = 0x000010E4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010D8u); - } -label_BFC10BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10BD8: 03E00008 jr $ra */ - psx_delay_BFC10BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10BDC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000010DCu); -#endif - if (psx_delay_BFC10BD8) { - psx_delay_BFC10BD8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000010E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000010E0u); -label_BFC10BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC10BE0: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010E4u); - cpu->pc = 0x000010E4u; return; /* fallthrough */ -} - -void SCPH1001_func_000010E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000010E4u); - int psx_delay_BFC10BF4 = 0; - int psx_taken_BFC10BF4 = 0; - int psx_delay_BFC10C14 = 0; - int psx_taken_BFC10C14 = 0; - int psx_delay_BFC10C34 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10BFCu: goto label_BFC10BFC; - case 0xBFC10C00u: goto label_BFC10C00; - case 0xBFC10C1Cu: goto label_BFC10C1C; - case 0xBFC10C20u: goto label_BFC10C20; - default: break; - } - } -label_BFC10BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC10BE4: 24CB0004 addiu $t3, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[6] + (4)); - PGXP_ALU(0x24CB0004u, cpu->gpr[11], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000010E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC10BE8: 2418FFFE addiu $t8, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2418FFFEu, cpu->gpr[24], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x000010E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC10BEC: 34CA0001 ori $t2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] | 0x1u; - PGXP_ALU(0x34CA0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000010ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10BF0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC10BF4: 04C10002 bgez $a2, 0xBFC10C00 */ - uint32_t psx_brA_BFC10BF4 = cpu->gpr[6]; - psx_taken_BFC10BF4 = ((int32_t)psx_brA_BFC10BF4 >= 0); - psx_delay_BFC10BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC10BF8: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000010F8u); -#endif - if (psx_delay_BFC10BF4) { - psx_delay_BFC10BF4 = 0; - if (psx_taken_BFC10BF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001100u); - goto label_BFC10C00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000010FCu); - } -label_BFC10BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000010FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000010FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000010FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10BFC: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x000010FCu); -#endif -label_BFC10C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC10C00: 0001C883 sra $t9, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x0001C883u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC10C04: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC10C08: 00884821 addu $t1, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00884821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC10C0C: AD380000 sw $t8, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000110Cu); return; } g_debug_last_store_pc = 0x0000110Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC10C10: AC8AFFFC sw $t2, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001110u); return; } g_debug_last_store_pc = 0x00001110u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8AFFFCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00001110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC10C14: 05610002 bgez $t3, 0xBFC10C20 */ - uint32_t psx_brA_BFC10C14 = cpu->gpr[11]; - psx_taken_BFC10C14 = ((int32_t)psx_brA_BFC10C14 >= 0); - psx_delay_BFC10C14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC10C18: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001118u); -#endif - if (psx_delay_BFC10C14) { - psx_delay_BFC10C14 = 0; - if (psx_taken_BFC10C14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001120u); - goto label_BFC10C20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000111Cu); - } -label_BFC10C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000111Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C1C: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x0000111Cu); -#endif -label_BFC10C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC10C20: 00016083 sra $t4, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00016083u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC10C24: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC10C28: 008D2021 addu $a0, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C2C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000112Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC10C30: AC247460 sw $a0, 29792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001130u); return; } g_debug_last_store_pc = 0x00001130u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC247460u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10C34: 03E00008 jr $ra */ - psx_delay_BFC10C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10C38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001138u); -#endif - if (psx_delay_BFC10C34) { - psx_delay_BFC10C34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000113C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000113Cu); - int psx_delay_BFC10C6C = 0; -label_BFC10C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000113Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C3C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC10C40: 00057082 srl $t6, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] >> 2u; - PGXP_ALU(0x00057082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC10C44: AC247460 sw $a0, 29792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001144u); return; } g_debug_last_store_pc = 0x00001144u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC247460u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC10C48: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC10C4C: 008FC021 addu $t8, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000114Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC10C50: AC800000 sw $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001150u); return; } g_debug_last_store_pc = 0x00001150u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC10C54: 27190004 addiu $t9, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (4)); - PGXP_ALU(0x27190004u, cpu->gpr[25], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00001154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C58: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC10C5C: AC397468 sw $t9, 29800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000115Cu); return; } g_debug_last_store_pc = 0x0000115Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC397468u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C60: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC10C64: AC257464 sw $a1, 29796($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29796; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001164u); return; } g_debug_last_store_pc = 0x00001164u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC257464u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00001164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10C68: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10C6C: 03E00008 jr $ra */ - psx_delay_BFC10C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10C70: AC206D30 sw $zero, 27952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001170u); return; } g_debug_last_store_pc = 0x00001170u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206D30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001170u); -#endif - if (psx_delay_BFC10C6C) { - psx_delay_BFC10C6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001174(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001174u); - int psx_delay_BFC10CA8 = 0; - int psx_taken_BFC10CA8 = 0; - int psx_delay_BFC10CB0 = 0; - int psx_taken_BFC10CB0 = 0; - int psx_delay_BFC10CD0 = 0; - int psx_taken_BFC10CD0 = 0; - int psx_delay_BFC10CD8 = 0; - int psx_taken_BFC10CD8 = 0; - int psx_delay_BFC10CFC = 0; - int psx_delay_BFC10D04 = 0; - int psx_taken_BFC10D04 = 0; - int psx_delay_BFC10D0C = 0; - int psx_taken_BFC10D0C = 0; - int psx_delay_BFC10D48 = 0; - int psx_taken_BFC10D48 = 0; - int psx_delay_BFC10D54 = 0; - int psx_taken_BFC10D54 = 0; - int psx_delay_BFC10D68 = 0; - int psx_taken_BFC10D68 = 0; - int psx_delay_BFC10D74 = 0; - int psx_taken_BFC10D74 = 0; - int psx_delay_BFC10D90 = 0; - int psx_taken_BFC10D90 = 0; - int psx_delay_BFC10DB0 = 0; - int psx_taken_BFC10DB0 = 0; - int psx_delay_BFC10DBC = 0; - int psx_taken_BFC10DBC = 0; - int psx_delay_BFC10DE0 = 0; - int psx_taken_BFC10DE0 = 0; - int psx_delay_BFC10DEC = 0; - int psx_taken_BFC10DEC = 0; - int psx_delay_BFC10DF4 = 0; - int psx_delay_BFC10DFC = 0; - int psx_taken_BFC10DFC = 0; - int psx_delay_BFC10E04 = 0; - int psx_taken_BFC10E04 = 0; - int psx_delay_BFC10E18 = 0; - int psx_taken_BFC10E18 = 0; - int psx_delay_BFC10E24 = 0; - int psx_taken_BFC10E24 = 0; - int psx_delay_BFC10E40 = 0; - int psx_taken_BFC10E40 = 0; - int psx_delay_BFC10E60 = 0; - int psx_taken_BFC10E60 = 0; - int psx_delay_BFC10E68 = 0; - int psx_taken_BFC10E68 = 0; - int psx_delay_BFC10E8C = 0; - int psx_taken_BFC10E8C = 0; - int psx_delay_BFC10E98 = 0; - int psx_taken_BFC10E98 = 0; - int psx_delay_BFC10EA0 = 0; - int psx_delay_BFC10EA8 = 0; - int psx_taken_BFC10EA8 = 0; - int psx_delay_BFC10EB0 = 0; - int psx_taken_BFC10EB0 = 0; - int psx_delay_BFC10ED8 = 0; - int psx_taken_BFC10ED8 = 0; - int psx_delay_BFC10F00 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10CB0u: goto label_BFC10CB0; - case 0xBFC10CB8u: goto label_BFC10CB8; - case 0xBFC10CD8u: goto label_BFC10CD8; - case 0xBFC10CE0u: goto label_BFC10CE0; - case 0xBFC10CE4u: goto label_BFC10CE4; - case 0xBFC10D04u: goto label_BFC10D04; - case 0xBFC10D0Cu: goto label_BFC10D0C; - case 0xBFC10D14u: goto label_BFC10D14; - case 0xBFC10D30u: goto label_BFC10D30; - case 0xBFC10D48u: goto label_BFC10D48; - case 0xBFC10D50u: goto label_BFC10D50; - case 0xBFC10D5Cu: goto label_BFC10D5C; - case 0xBFC10D70u: goto label_BFC10D70; - case 0xBFC10D74u: goto label_BFC10D74; - case 0xBFC10D7Cu: goto label_BFC10D7C; - case 0xBFC10D98u: goto label_BFC10D98; - case 0xBFC10D9Cu: goto label_BFC10D9C; - case 0xBFC10DB8u: goto label_BFC10DB8; - case 0xBFC10DBCu: goto label_BFC10DBC; - case 0xBFC10DC4u: goto label_BFC10DC4; - case 0xBFC10DE8u: goto label_BFC10DE8; - case 0xBFC10DF4u: goto label_BFC10DF4; - case 0xBFC10DFCu: goto label_BFC10DFC; - case 0xBFC10E04u: goto label_BFC10E04; - case 0xBFC10E0Cu: goto label_BFC10E0C; - case 0xBFC10E20u: goto label_BFC10E20; - case 0xBFC10E24u: goto label_BFC10E24; - case 0xBFC10E2Cu: goto label_BFC10E2C; - case 0xBFC10E48u: goto label_BFC10E48; - case 0xBFC10E50u: goto label_BFC10E50; - case 0xBFC10E68u: goto label_BFC10E68; - case 0xBFC10E70u: goto label_BFC10E70; - case 0xBFC10E94u: goto label_BFC10E94; - case 0xBFC10EA0u: goto label_BFC10EA0; - case 0xBFC10EA8u: goto label_BFC10EA8; - case 0xBFC10EB0u: goto label_BFC10EB0; - case 0xBFC10EB8u: goto label_BFC10EB8; - case 0xBFC10EC8u: goto label_BFC10EC8; - case 0xBFC10EE0u: goto label_BFC10EE0; - case 0xBFC10EF0u: goto label_BFC10EF0; - default: break; - } - } -label_BFC10C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC10C74: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC10C78: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001178u); return; } g_debug_last_store_pc = 0x00001178u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00001178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC10C7C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC10C80: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC10C84: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001184u); -#endif - /* 0xBFC10C88: 8DCE6D30 lw $t6, 27952($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001188u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6D30u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC10C8C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000118Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC10C90: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001190u); return; } g_debug_last_store_pc = 0x00001190u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00001190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC10C94: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10C98: 2401FFFC addiu $at, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2401FFFCu, cpu->gpr[1], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0x00001198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC10C9C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000119Cu); return; } g_debug_last_store_pc = 0x0000119Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC10CA0: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011A0u); return; } g_debug_last_store_pc = 0x000011A0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000011A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC10CA4: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x000011A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC10CA8: 11C00003 beq $t6, $zero, 0xBFC10CB8 */ - uint32_t psx_brA_BFC10CA8 = cpu->gpr[14]; uint32_t psx_brB_BFC10CA8 = cpu->gpr[0]; - psx_taken_BFC10CA8 = (psx_brA_BFC10CA8 == psx_brB_BFC10CA8); - psx_delay_BFC10CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC10CAC: 02218824 and $s1, $s1, $at */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[17] = cpu->gpr[17] & cpu->gpr[1]; - PGXP_ALU(0x02218824u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000011ACu); -#endif - if (psx_delay_BFC10CA8) { - psx_delay_BFC10CA8 = 0; - if (psx_taken_BFC10CA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011B8u); - goto label_BFC10CB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011B0u); - } -label_BFC10CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000011B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000011B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10CB0: 1000001F beq $zero, $zero, 0xBFC10D30 */ - uint32_t psx_brA_BFC10CB0 = cpu->gpr[0]; uint32_t psx_brB_BFC10CB0 = cpu->gpr[0]; - psx_taken_BFC10CB0 = (psx_brA_BFC10CB0 == psx_brB_BFC10CB0); - psx_delay_BFC10CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC10CB4: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x000011B4u); -#endif - if (psx_delay_BFC10CB0) { - psx_delay_BFC10CB0 = 0; - if (psx_taken_BFC10CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001230u); - goto label_BFC10D30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011B8u); - } -label_BFC10CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000011B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000011B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10CB8: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000011B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC10CBC: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000011BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011C0u); -#endif - /* 0xBFC10CC0: 8C427460 lw $v0, 29792($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427460u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000011C0u); -#endif - /* 0xBFC10CC4: 8DEF7468 lw $t7, 29800($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011C4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF7468u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000011C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10CC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000011C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC10CCC: 004F082B sltu $at, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x004F082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000011CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10CD0: 14200004 bne $at, $zero, 0xBFC10CE4 */ - uint32_t psx_brA_BFC10CD0 = cpu->gpr[1]; uint32_t psx_brB_BFC10CD0 = cpu->gpr[0]; - psx_taken_BFC10CD0 = (psx_brA_BFC10CD0 != psx_brB_BFC10CD0); - psx_delay_BFC10CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC10CD4: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x000011D4u); -#endif - if (psx_delay_BFC10CD0) { - psx_delay_BFC10CD0 = 0; - if (psx_taken_BFC10CD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011E4u); - goto label_BFC10CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011D8u); - } -label_BFC10CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000011D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000011D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10CD8: 10000085 beq $zero, $zero, 0xBFC10EF0 */ - uint32_t psx_brA_BFC10CD8 = cpu->gpr[0]; uint32_t psx_brB_BFC10CD8 = cpu->gpr[0]; - psx_taken_BFC10CD8 = (psx_brA_BFC10CD8 == psx_brB_BFC10CD8); - psx_delay_BFC10CD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10CDC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000011DCu); -#endif - if (psx_delay_BFC10CD8) { - psx_delay_BFC10CD8 = 0; - if (psx_taken_BFC10CD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013F0u); - goto label_BFC10EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000011E0u); - } -label_BFC10CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000011E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000011E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC10CE0: 2412FFFE addiu $s2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2412FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x000011E0u); -#endif -label_BFC10CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000011E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000011E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC10CE4: AC520000 sw $s2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011E4u); return; } g_debug_last_store_pc = 0x000011E4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC520000u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000011E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10CE8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000011E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC10CEC: AC2285FC sw $v0, -31236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011ECu); return; } g_debug_last_store_pc = 0x000011ECu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC2285FCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000011ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000011F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10CF0: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000011F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10CF4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000011F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC10CF8: AC227460 sw $v0, 29792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011F8u); return; } g_debug_last_store_pc = 0x000011F8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC227460u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000011F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC10CFC: 0C00040C jal 0xB0001030 */ - cpu->gpr[31] = 0x00001204u; /* jal link before delay slot */ - psx_delay_BFC10CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC10D00: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001200u); -#endif - if (psx_delay_BFC10CFC) { - psx_delay_BFC10CFC = 0; - cpu->gpr[31] = 0x00001204u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001030u); - cpu->pc = 0x00001030u; return; - } -label_BFC10D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10D04: 10400003 beq $v0, $zero, 0xBFC10D14 */ - uint32_t psx_brA_BFC10D04 = cpu->gpr[2]; uint32_t psx_brB_BFC10D04 = cpu->gpr[0]; - psx_taken_BFC10D04 = (psx_brA_BFC10D04 == psx_brB_BFC10D04); - psx_delay_BFC10D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001208u); -#endif - if (psx_delay_BFC10D04) { - psx_delay_BFC10D04 = 0; - if (psx_taken_BFC10D04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001214u); - goto label_BFC10D14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000120Cu); - } -label_BFC10D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000120Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D0C: 10000078 beq $zero, $zero, 0xBFC10EF0 */ - uint32_t psx_brA_BFC10D0C = cpu->gpr[0]; uint32_t psx_brB_BFC10D0C = cpu->gpr[0]; - psx_taken_BFC10D0C = (psx_brA_BFC10D0C == psx_brB_BFC10D0C); - psx_delay_BFC10D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10D10: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001210u); -#endif - if (psx_delay_BFC10D0C) { - psx_delay_BFC10D0C = 0; - if (psx_taken_BFC10D0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013F0u); - goto label_BFC10EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001214u); - } -label_BFC10D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC10D14: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001214u); -#endif - /* 0xBFC10D18: 8F1885FC lw $t8, -31236($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001218u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1885FCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10D1C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000121Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC10D20: AC3885F8 sw $t8, -31240($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31240; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001220u); return; } g_debug_last_store_pc = 0x00001220u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC3885F8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10D24: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC10D28: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC10D2C: AC396D30 sw $t9, 27952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000122Cu); return; } g_debug_last_store_pc = 0x0000122Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396D30u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000122Cu); -#endif -label_BFC10D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10D30: 3C080001 lui $t0, 0x1 */ - cpu->gpr[8] = 0x00010000u; - PGXP_ALU(0x3C080001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001230u); -#endif - /* 0xBFC10D34: 8D0885FC lw $t0, -31236($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001234u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0885FCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001238u); -#endif - /* 0xBFC10D3C: 8D040000 lw $a0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000123Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100u); } - PGXP_LOAD(0x8D040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC10D44: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001244u); -#endif -label_BFC10D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC10D48: 10600047 beq $v1, $zero, 0xBFC10E68 */ - uint32_t psx_brA_BFC10D48 = cpu->gpr[3]; uint32_t psx_brB_BFC10D48 = cpu->gpr[0]; - psx_taken_BFC10D48 = (psx_brA_BFC10D48 == psx_brB_BFC10D48); - psx_delay_BFC10D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000124Cu); -#endif - if (psx_delay_BFC10D48) { - psx_delay_BFC10D48 = 0; - if (psx_taken_BFC10D48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001368u); - goto label_BFC10E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001250u); - } -label_BFC10D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC10D50: 36220001 ori $v0, $s1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] | 0x1u; - PGXP_ALU(0x36220001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC10D54: 14440007 bne $v0, $a0, 0xBFC10D74 */ - uint32_t psx_brA_BFC10D54 = cpu->gpr[2]; uint32_t psx_brB_BFC10D54 = cpu->gpr[4]; - psx_taken_BFC10D54 = (psx_brA_BFC10D54 != psx_brB_BFC10D54); - psx_delay_BFC10D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC10D58: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001258u); -#endif - if (psx_delay_BFC10D54) { - psx_delay_BFC10D54 = 0; - if (psx_taken_BFC10D54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001274u); - goto label_BFC10D74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000125Cu); - } -label_BFC10D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000125Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC10D5C: 3C0A0001 lui $t2, 0x1 */ - cpu->gpr[10] = 0x00010000u; - PGXP_ALU(0x3C0A0001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001260u); -#endif - /* 0xBFC10D60: 8D4A85FC lw $t2, -31236($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001260u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A85FCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00001260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40210u); -#endif - /* 0xBFC10D64: 00924824 and $t1, $a0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[18]; - PGXP_ALU(0x00924824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10D68: 1000005D beq $zero, $zero, 0xBFC10EE0 */ - uint32_t psx_brA_BFC10D68 = cpu->gpr[0]; uint32_t psx_brB_BFC10D68 = cpu->gpr[0]; - psx_taken_BFC10D68 = (psx_brA_BFC10D68 == psx_brB_BFC10D68); - psx_delay_BFC10D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC10D6C: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000126Cu); return; } g_debug_last_store_pc = 0x0000126Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x0000126Cu); -#endif - if (psx_delay_BFC10D68) { - psx_delay_BFC10D68 = 0; - if (psx_taken_BFC10D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013E0u); - goto label_BFC10EE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001270u); - } -label_BFC10D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC10D70: 0044082B sltu $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001270u); -#endif -label_BFC10D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10D74: 10200011 beq $at, $zero, 0xBFC10DBC */ - uint32_t psx_brA_BFC10D74 = cpu->gpr[1]; uint32_t psx_brB_BFC10D74 = cpu->gpr[0]; - psx_taken_BFC10D74 = (psx_brA_BFC10D74 == psx_brB_BFC10D74); - psx_delay_BFC10D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20012u); -#endif - /* 0xBFC10D78: 0091082B sltu $at, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001278u); -#endif - if (psx_delay_BFC10D74) { - psx_delay_BFC10D74 = 0; - if (psx_taken_BFC10D74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000012BCu); - goto label_BFC10DBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000127Cu); - } -label_BFC10D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000127Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC10D7C: 3C0D0001 lui $t5, 0x1 */ - cpu->gpr[13] = 0x00010000u; - PGXP_ALU(0x3C0D0001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001280u); -#endif - /* 0xBFC10D80: 8DAD85FC lw $t5, -31236($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001280u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD85FCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00001280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20810u); -#endif - /* 0xBFC10D84: 00915823 subu $t3, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[4] - cpu->gpr[17]; - PGXP_ALU(0x00915823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC10D88: 256CFFFC addiu $t4, $t3, -4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-4)); - PGXP_ALU(0x256CFFFCu, cpu->gpr[12], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0x00001288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC10D8C: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000128Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC10D90: 06210002 bgez $s1, 0xBFC10D9C */ - uint32_t psx_brA_BFC10D90 = cpu->gpr[17]; - psx_taken_BFC10D90 = ((int32_t)psx_brA_BFC10D90 >= 0); - psx_delay_BFC10D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC10D94: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001294u); -#endif - if (psx_delay_BFC10D90) { - psx_delay_BFC10D90 = 0; - if (psx_taken_BFC10D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000129Cu); - goto label_BFC10D9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001298u); - } -label_BFC10D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10D98: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00001298u); -#endif -label_BFC10D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000129Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC10D9C: 00017083 sra $t6, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00017083u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC10DA0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000012A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC10DA4: 01AFC021 addu $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] + cpu->gpr[15]; - PGXP_ALU(0x01AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000012A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC10DA8: AF0C0004 sw $t4, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012A8u); return; } g_debug_last_store_pc = 0x000012A8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAF0C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000012A8u); -#endif - /* 0xBFC10DAC: 8F3985FC lw $t9, -31236($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012ACu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3985FCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000012ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10DB0: 1000004B beq $zero, $zero, 0xBFC10EE0 */ - uint32_t psx_brA_BFC10DB0 = cpu->gpr[0]; uint32_t psx_brB_BFC10DB0 = cpu->gpr[0]; - psx_taken_BFC10DB0 = (psx_brA_BFC10DB0 == psx_brB_BFC10DB0); - psx_delay_BFC10DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC10DB4: AF310000 sw $s1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012B4u); return; } g_debug_last_store_pc = 0x000012B4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAF310000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000012B4u); -#endif - if (psx_delay_BFC10DB0) { - psx_delay_BFC10DB0 = 0; - if (psx_taken_BFC10DB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013E0u); - goto label_BFC10EE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000012B8u); - } -label_BFC10DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20012u); -#endif - /* 0xBFC10DB8: 0091082B sltu $at, $a0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0091082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000012B8u); -#endif -label_BFC10DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC10DBC: 1020FFE2 beq $at, $zero, 0xBFC10D48 */ - uint32_t psx_brA_BFC10DBC = cpu->gpr[1]; uint32_t psx_brB_BFC10DBC = cpu->gpr[0]; - psx_taken_BFC10DBC = (psx_brA_BFC10DBC == psx_brB_BFC10DBC); - psx_delay_BFC10DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10DC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000012C0u); -#endif - if (psx_delay_BFC10DBC) { - psx_delay_BFC10DBC = 0; - if (psx_taken_BFC10DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001248u); - goto label_BFC10D48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000012C4u); - } -label_BFC10DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10DC4: 3C080001 lui $t0, 0x1 */ - cpu->gpr[8] = 0x00010000u; - PGXP_ALU(0x3C080001u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000012C4u); -#endif - /* 0xBFC10DC8: 8D0885FC lw $t0, -31236($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012C8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0885FCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000012C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC10DCC: 00044882 srl $t1, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] >> 2u; - PGXP_ALU(0x00044882u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000012CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC10DD0: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000012D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x508u); -#endif - /* 0xBFC10DD4: 010A1821 addu $v1, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[10]; - PGXP_ALU(0x010A1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000012D4u); -#endif - /* 0xBFC10DD8: 8C620004 lw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012D8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000012D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC10DDC: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000012DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC10DE0: 16420010 bne $s2, $v0, 0xBFC10E24 */ - uint32_t psx_brA_BFC10DE0 = cpu->gpr[18]; uint32_t psx_brB_BFC10DE0 = cpu->gpr[2]; - psx_taken_BFC10DE0 = (psx_brA_BFC10DE0 != psx_brB_BFC10DE0); - psx_delay_BFC10DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC10DE4: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000012E4u); -#endif - if (psx_delay_BFC10DE0) { - psx_delay_BFC10DE0 = 0; - if (psx_taken_BFC10DE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001324u); - goto label_BFC10E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000012E8u); - } -label_BFC10DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC10DE8: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000012E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC10DEC: 1E000007 bgtz $s0, 0xBFC10E0C */ - uint32_t psx_brA_BFC10DEC = cpu->gpr[16]; - psx_taken_BFC10DEC = ((int32_t)psx_brA_BFC10DEC > 0); - psx_delay_BFC10DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10DF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000012F0u); -#endif - if (psx_delay_BFC10DEC) { - psx_delay_BFC10DEC = 0; - if (psx_taken_BFC10DEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000130Cu); - goto label_BFC10E0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000012F4u); - } -label_BFC10DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC10DF4: 0C00040C jal 0xB0001030 */ - cpu->gpr[31] = 0x000012FCu; /* jal link before delay slot */ - psx_delay_BFC10DF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC10DF8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000012F8u); -#endif - if (psx_delay_BFC10DF4) { - psx_delay_BFC10DF4 = 0; - cpu->gpr[31] = 0x000012FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001030u); - cpu->pc = 0x00001030u; return; - } -label_BFC10DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000012FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000012FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000012FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10DFC: 10400014 beq $v0, $zero, 0xBFC10E50 */ - uint32_t psx_brA_BFC10DFC = cpu->gpr[2]; uint32_t psx_brB_BFC10DFC = cpu->gpr[0]; - psx_taken_BFC10DFC = (psx_brA_BFC10DFC == psx_brB_BFC10DFC); - psx_delay_BFC10DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001300u); -#endif - if (psx_delay_BFC10DFC) { - psx_delay_BFC10DFC = 0; - if (psx_taken_BFC10DFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001350u); - goto label_BFC10E50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001304u); - } -label_BFC10E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E04: 1000003A beq $zero, $zero, 0xBFC10EF0 */ - uint32_t psx_brA_BFC10E04 = cpu->gpr[0]; uint32_t psx_brB_BFC10E04 = cpu->gpr[0]; - psx_taken_BFC10E04 = (psx_brA_BFC10E04 == psx_brB_BFC10E04); - psx_delay_BFC10E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10E08: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001308u); -#endif - if (psx_delay_BFC10E04) { - psx_delay_BFC10E04 = 0; - if (psx_taken_BFC10E04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013F0u); - goto label_BFC10EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000130Cu); - } -label_BFC10E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000130Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC10E0C: 3C0B0001 lui $t3, 0x1 */ - cpu->gpr[11] = 0x00010000u; - PGXP_ALU(0x3C0B0001u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001310u); -#endif - /* 0xBFC10E10: 8D6B85F8 lw $t3, -31240($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -31240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-31240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001310u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B85F8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00001310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10E14: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E18: 1000000D beq $zero, $zero, 0xBFC10E50 */ - uint32_t psx_brA_BFC10E18 = cpu->gpr[0]; uint32_t psx_brB_BFC10E18 = cpu->gpr[0]; - psx_taken_BFC10E18 = (psx_brA_BFC10E18 == psx_brB_BFC10E18); - psx_delay_BFC10E18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC10E1C: AC2B85FC sw $t3, -31236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000131Cu); return; } g_debug_last_store_pc = 0x0000131Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B85FCu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000131Cu); -#endif - if (psx_delay_BFC10E18) { - psx_delay_BFC10E18 = 0; - if (psx_taken_BFC10E18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001350u); - goto label_BFC10E50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001320u); - } -label_BFC10E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC10E20: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001320u); -#endif -label_BFC10E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC10E24: 11C00008 beq $t6, $zero, 0xBFC10E48 */ - uint32_t psx_brA_BFC10E24 = cpu->gpr[14]; uint32_t psx_brB_BFC10E24 = cpu->gpr[0]; - psx_taken_BFC10E24 = (psx_brA_BFC10E24 == psx_brB_BFC10E24); - psx_delay_BFC10E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001328u); -#endif - if (psx_delay_BFC10E24) { - psx_delay_BFC10E24 = 0; - if (psx_taken_BFC10E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001348u); - goto label_BFC10E48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000132Cu); - } -label_BFC10E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000132Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42004u); -#endif - /* 0xBFC10E2C: 00526824 and $t5, $v0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[2] & cpu->gpr[18]; - PGXP_ALU(0x00526824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC10E30: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001330u); -#endif - /* 0xBFC10E34: 8F1885FC lw $t8, -31236($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001334u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1885FCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA010u); -#endif - /* 0xBFC10E38: 008D7821 addu $t7, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9000u); -#endif - /* 0xBFC10E3C: 25EC0004 addiu $t4, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[15] + (4)); - PGXP_ALU(0x25EC0004u, cpu->gpr[12], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x0000133Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E40: 10000003 beq $zero, $zero, 0xBFC10E50 */ - uint32_t psx_brA_BFC10E40 = cpu->gpr[0]; uint32_t psx_brB_BFC10E40 = cpu->gpr[0]; - psx_taken_BFC10E40 = (psx_brA_BFC10E40 == psx_brB_BFC10E40); - psx_delay_BFC10E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC10E44: AF0C0000 sw $t4, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001344u); return; } g_debug_last_store_pc = 0x00001344u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAF0C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00001344u); -#endif - if (psx_delay_BFC10E40) { - psx_delay_BFC10E40 = 0; - if (psx_taken_BFC10E40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001350u); - goto label_BFC10E50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001348u); - } -label_BFC10E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10E48: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC10E4C: AC2385FC sw $v1, -31236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000134Cu); return; } g_debug_last_store_pc = 0x0000134Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC2385FCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000134Cu); -#endif -label_BFC10E50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC10E50: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001350u); -#endif - /* 0xBFC10E54: 8F3985FC lw $t9, -31236($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001354u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3985FCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001358u); -#endif - /* 0xBFC10E5C: 8F240000 lw $a0, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000135Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000000u); } - PGXP_LOAD(0x8F240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E60: 1000FFB9 beq $zero, $zero, 0xBFC10D48 */ - uint32_t psx_brA_BFC10E60 = cpu->gpr[0]; uint32_t psx_brB_BFC10E60 = cpu->gpr[0]; - psx_taken_BFC10E60 = (psx_brA_BFC10E60 == psx_brB_BFC10E60); - psx_delay_BFC10E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC10E64: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001364u); -#endif - if (psx_delay_BFC10E60) { - psx_delay_BFC10E60 = 0; - if (psx_taken_BFC10E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001248u); - goto label_BFC10D48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001368u); - } -label_BFC10E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC10E68: 1244000A beq $s2, $a0, 0xBFC10E94 */ - uint32_t psx_brA_BFC10E68 = cpu->gpr[18]; uint32_t psx_brB_BFC10E68 = cpu->gpr[4]; - psx_taken_BFC10E68 = (psx_brA_BFC10E68 == psx_brB_BFC10E68); - psx_delay_BFC10E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000136Cu); -#endif - if (psx_delay_BFC10E68) { - psx_delay_BFC10E68 = 0; - if (psx_taken_BFC10E68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001394u); - goto label_BFC10E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001370u); - } -label_BFC10E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC10E70: 3C090001 lui $t1, 0x1 */ - cpu->gpr[9] = 0x00010000u; - PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001370u); -#endif - /* 0xBFC10E74: 8D2985FC lw $t1, -31236($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001374u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2985FCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC10E78: 00044082 srl $t0, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] >> 2u; - PGXP_ALU(0x00044082u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC10E7C: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000137Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC10E80: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC10E84: 256E0004 addiu $t6, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); - PGXP_ALU(0x256E0004u, cpu->gpr[14], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00001384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10E88: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E8C: 1000000E beq $zero, $zero, 0xBFC10EC8 */ - uint32_t psx_brA_BFC10E8C = cpu->gpr[0]; uint32_t psx_brB_BFC10E8C = cpu->gpr[0]; - psx_taken_BFC10E8C = (psx_brA_BFC10E8C == psx_brB_BFC10E8C); - psx_delay_BFC10E8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC10E90: AC2E85FC sw $t6, -31236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001390u); return; } g_debug_last_store_pc = 0x00001390u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E85FCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001390u); -#endif - if (psx_delay_BFC10E8C) { - psx_delay_BFC10E8C = 0; - if (psx_taken_BFC10E8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013C8u); - goto label_BFC10EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001394u); - } -label_BFC10E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC10E94: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC10E98: 1E000007 bgtz $s0, 0xBFC10EB8 */ - uint32_t psx_brA_BFC10E98 = cpu->gpr[16]; - psx_taken_BFC10E98 = ((int32_t)psx_brA_BFC10E98 > 0); - psx_delay_BFC10E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10E9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000139Cu); -#endif - if (psx_delay_BFC10E98) { - psx_delay_BFC10E98 = 0; - if (psx_taken_BFC10E98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013B8u); - goto label_BFC10EB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013A0u); - } -label_BFC10EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC10EA0: 0C00040C jal 0xB0001030 */ - cpu->gpr[31] = 0x000013A8u; /* jal link before delay slot */ - psx_delay_BFC10EA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC10EA4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000013A4u); -#endif - if (psx_delay_BFC10EA0) { - psx_delay_BFC10EA0 = 0; - cpu->gpr[31] = 0x000013A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001030u); - cpu->pc = 0x00001030u; return; - } -label_BFC10EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10EA8: 10400007 beq $v0, $zero, 0xBFC10EC8 */ - uint32_t psx_brA_BFC10EA8 = cpu->gpr[2]; uint32_t psx_brB_BFC10EA8 = cpu->gpr[0]; - psx_taken_BFC10EA8 = (psx_brA_BFC10EA8 == psx_brB_BFC10EA8); - psx_delay_BFC10EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC10EAC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000013ACu); -#endif - if (psx_delay_BFC10EA8) { - psx_delay_BFC10EA8 = 0; - if (psx_taken_BFC10EA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013C8u); - goto label_BFC10EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013B0u); - } -label_BFC10EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10EB0: 1000000F beq $zero, $zero, 0xBFC10EF0 */ - uint32_t psx_brA_BFC10EB0 = cpu->gpr[0]; uint32_t psx_brB_BFC10EB0 = cpu->gpr[0]; - psx_taken_BFC10EB0 = (psx_brA_BFC10EB0 == psx_brB_BFC10EB0); - psx_delay_BFC10EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC10EB4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000013B4u); -#endif - if (psx_delay_BFC10EB0) { - psx_delay_BFC10EB0 = 0; - if (psx_taken_BFC10EB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013F0u); - goto label_BFC10EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013B8u); - } -label_BFC10EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC10EB8: 3C0D0001 lui $t5, 0x1 */ - cpu->gpr[13] = 0x00010000u; - PGXP_ALU(0x3C0D0001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000013B8u); -#endif - /* 0xBFC10EBC: 8DAD85F8 lw $t5, -31240($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013BCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD85F8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000013BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC10EC0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000013C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC10EC4: AC2D85FC sw $t5, -31236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013C4u); return; } g_debug_last_store_pc = 0x000013C4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D85FCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000013C4u); -#endif -label_BFC10EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC10EC8: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000013C8u); -#endif - /* 0xBFC10ECC: 8DEF85FC lw $t7, -31236($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013CCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF85FCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000013CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10ED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000013D0u); -#endif - /* 0xBFC10ED4: 8DE40000 lw $a0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000u); } - PGXP_LOAD(0x8DE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000013D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10ED8: 1000FF9B beq $zero, $zero, 0xBFC10D48 */ - uint32_t psx_brA_BFC10ED8 = cpu->gpr[0]; uint32_t psx_brB_BFC10ED8 = cpu->gpr[0]; - psx_taken_BFC10ED8 = (psx_brA_BFC10ED8 == psx_brB_BFC10ED8); - psx_delay_BFC10ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC10EDC: 30830001 andi $v1, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30830001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000013DCu); -#endif - if (psx_delay_BFC10ED8) { - psx_delay_BFC10ED8 = 0; - if (psx_taken_BFC10ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001248u); - goto label_BFC10D48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000013E0u); - } -label_BFC10EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10EE0: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000013E0u); -#endif - /* 0xBFC10EE4: 8C4285FC lw $v0, -31236($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4285FCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000013E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10EE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000013E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC10EEC: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000013ECu); -#endif -label_BFC10EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000013F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000013F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000013F0u); -#endif - /* 0xBFC10EF0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000013F0u); -#endif - /* 0xBFC10EF4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013F4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000013F4u); -#endif - /* 0xBFC10EF8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013F8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000013F8u); -#endif - /* 0xBFC10EFC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013FCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000013FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10F00: 03E00008 jr $ra */ - psx_delay_BFC10F00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC10F04: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00001404u); -#endif - if (psx_delay_BFC10F00) { - psx_delay_BFC10F00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001408(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001408u); - int psx_delay_BFC10F14 = 0; -label_BFC10F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001408u); -#endif - /* 0xBFC10F08: 8C8EFFFC lw $t6, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001408u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000140Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC10F10: 35CF0001 ori $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x1u; - PGXP_ALU(0x35CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10F14: 03E00008 jr $ra */ - psx_delay_BFC10F14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC10F18: AC8FFFFC sw $t7, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001418u); return; } g_debug_last_store_pc = 0x00001418u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8FFFFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001418u); -#endif - if (psx_delay_BFC10F14) { - psx_delay_BFC10F14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001420(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001420u); - int psx_delay_BFC10F3C = 0; -label_BFC10F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC10F20: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001420u); -#endif - /* 0xBFC10F24: 8DCE0100 lw $t6, 256($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001424u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0100u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC10F28: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC10F2C: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001430u); -#endif - /* 0xBFC10F30: 8C660000 lw $a2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001430u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x8C660000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00001430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC10F34: AC650000 sw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001434u); return; } g_debug_last_store_pc = 0x00001434u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00001434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10F38: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC10F3C: 03E00008 jr $ra */ - psx_delay_BFC10F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC10F40: ACA60000 sw $a2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001440u); return; } g_debug_last_store_pc = 0x00001440u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xACA60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00001440u); -#endif - if (psx_delay_BFC10F3C) { - psx_delay_BFC10F3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001444(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001444u); - int psx_delay_BFC10F5C = 0; - int psx_taken_BFC10F5C = 0; - int psx_delay_BFC10F64 = 0; - int psx_taken_BFC10F64 = 0; - int psx_delay_BFC10F6C = 0; - int psx_taken_BFC10F6C = 0; - int psx_delay_BFC10F7C = 0; - int psx_taken_BFC10F7C = 0; - int psx_delay_BFC10F8C = 0; - int psx_taken_BFC10F8C = 0; - int psx_delay_BFC10F94 = 0; - int psx_taken_BFC10F94 = 0; - int psx_delay_BFC10F9C = 0; - int psx_taken_BFC10F9C = 0; - int psx_delay_BFC10FA8 = 0; - int psx_taken_BFC10FA8 = 0; - int psx_delay_BFC10FB0 = 0; - int psx_taken_BFC10FB0 = 0; - int psx_delay_BFC10FBC = 0; - int psx_taken_BFC10FBC = 0; - int psx_delay_BFC10FCC = 0; - int psx_taken_BFC10FCC = 0; - int psx_delay_BFC10FDC = 0; - int psx_taken_BFC10FDC = 0; - int psx_delay_BFC10FE4 = 0; - int psx_taken_BFC10FE4 = 0; - int psx_delay_BFC10FF4 = 0; - int psx_taken_BFC10FF4 = 0; - int psx_delay_BFC11000 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC10F64u: goto label_BFC10F64; - case 0xBFC10F6Cu: goto label_BFC10F6C; - case 0xBFC10F74u: goto label_BFC10F74; - case 0xBFC10F84u: goto label_BFC10F84; - case 0xBFC10F94u: goto label_BFC10F94; - case 0xBFC10F9Cu: goto label_BFC10F9C; - case 0xBFC10FA4u: goto label_BFC10FA4; - case 0xBFC10FB0u: goto label_BFC10FB0; - case 0xBFC10FB8u: goto label_BFC10FB8; - case 0xBFC10FC4u: goto label_BFC10FC4; - case 0xBFC10FC8u: goto label_BFC10FC8; - case 0xBFC10FD4u: goto label_BFC10FD4; - case 0xBFC10FE4u: goto label_BFC10FE4; - case 0xBFC10FECu: goto label_BFC10FEC; - case 0xBFC10FFCu: goto label_BFC10FFC; - case 0xBFC11000u: goto label_BFC11000; - default: break; - } - } -label_BFC10F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC10F44: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001444u); -#endif - /* 0xBFC10F48: 8DCE0100 lw $t6, 256($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001448u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0100u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC10F4C: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x0000144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC10F50: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001450u); -#endif - /* 0xBFC10F54: 8C460000 lw $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001454u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00001454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC10F58: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC10F5C: 14C00003 bne $a2, $zero, 0xBFC10F6C */ - uint32_t psx_brA_BFC10F5C = cpu->gpr[6]; uint32_t psx_brB_BFC10F5C = cpu->gpr[0]; - psx_taken_BFC10F5C = (psx_brA_BFC10F5C != psx_brB_BFC10F5C); - psx_delay_BFC10F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC10F60: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001460u); -#endif - if (psx_delay_BFC10F5C) { - psx_delay_BFC10F5C = 0; - if (psx_taken_BFC10F5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000146Cu); - goto label_BFC10F6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001464u); - } -label_BFC10F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F64: 10000026 beq $zero, $zero, 0xBFC11000 */ - uint32_t psx_brA_BFC10F64 = cpu->gpr[0]; uint32_t psx_brB_BFC10F64 = cpu->gpr[0]; - psx_taken_BFC10F64 = (psx_brA_BFC10F64 == psx_brB_BFC10F64); - psx_delay_BFC10F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10F68: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001468u); -#endif - if (psx_delay_BFC10F64) { - psx_delay_BFC10F64 = 0; - if (psx_taken_BFC10F64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001500u); - goto label_BFC11000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000146Cu); - } -label_BFC10F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000146Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC10F6C: 14C50005 bne $a2, $a1, 0xBFC10F84 */ - uint32_t psx_brA_BFC10F6C = cpu->gpr[6]; uint32_t psx_brB_BFC10F6C = cpu->gpr[5]; - psx_taken_BFC10F6C = (psx_brA_BFC10F6C != psx_brB_BFC10F6C); - psx_delay_BFC10F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001470u); -#endif - if (psx_delay_BFC10F6C) { - psx_delay_BFC10F6C = 0; - if (psx_taken_BFC10F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001484u); - goto label_BFC10F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001474u); - } -label_BFC10F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001474u); -#endif - /* 0xBFC10F74: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001474u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC10F78: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F7C: 10000020 beq $zero, $zero, 0xBFC11000 */ - uint32_t psx_brA_BFC10F7C = cpu->gpr[0]; uint32_t psx_brB_BFC10F7C = cpu->gpr[0]; - psx_taken_BFC10F7C = (psx_brA_BFC10F7C == psx_brB_BFC10F7C); - psx_delay_BFC10F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC10F80: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001480u); return; } g_debug_last_store_pc = 0x00001480u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001480u); -#endif - if (psx_delay_BFC10F7C) { - psx_delay_BFC10F7C = 0; - if (psx_taken_BFC10F7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001500u); - goto label_BFC11000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001484u); - } -label_BFC10F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001484u); -#endif - /* 0xBFC10F84: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001484u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10F8C: 14400003 bne $v0, $zero, 0xBFC10F9C */ - uint32_t psx_brA_BFC10F8C = cpu->gpr[2]; uint32_t psx_brB_BFC10F8C = cpu->gpr[0]; - psx_taken_BFC10F8C = (psx_brA_BFC10F8C != psx_brB_BFC10F8C); - psx_delay_BFC10F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001490u); -#endif - if (psx_delay_BFC10F8C) { - psx_delay_BFC10F8C = 0; - if (psx_taken_BFC10F8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000149Cu); - goto label_BFC10F9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001494u); - } -label_BFC10F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10F94: 1000001A beq $zero, $zero, 0xBFC11000 */ - uint32_t psx_brA_BFC10F94 = cpu->gpr[0]; uint32_t psx_brB_BFC10F94 = cpu->gpr[0]; - psx_taken_BFC10F94 = (psx_brA_BFC10F94 == psx_brB_BFC10F94); - psx_delay_BFC10F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10F98: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001498u); -#endif - if (psx_delay_BFC10F94) { - psx_delay_BFC10F94 = 0; - if (psx_taken_BFC10F94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001500u); - goto label_BFC11000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000149Cu); - } -label_BFC10F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000149Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC10F9C: 14C50004 bne $a2, $a1, 0xBFC10FB0 */ - uint32_t psx_brA_BFC10F9C = cpu->gpr[6]; uint32_t psx_brB_BFC10F9C = cpu->gpr[5]; - psx_taken_BFC10F9C = (psx_brA_BFC10F9C != psx_brB_BFC10F9C); - psx_delay_BFC10F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014A0u); -#endif - if (psx_delay_BFC10F9C) { - psx_delay_BFC10F9C = 0; - if (psx_taken_BFC10F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014B0u); - goto label_BFC10FB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014A4u); - } -label_BFC10FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014A4u); -#endif - /* 0xBFC10FA4: 8FA30000 lw $v1, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000014A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FA8: 1000000E beq $zero, $zero, 0xBFC10FE4 */ - uint32_t psx_brA_BFC10FA8 = cpu->gpr[0]; uint32_t psx_brB_BFC10FA8 = cpu->gpr[0]; - psx_taken_BFC10FA8 = (psx_brA_BFC10FA8 == psx_brB_BFC10FA8); - psx_delay_BFC10FA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014ACu); -#endif - if (psx_delay_BFC10FA8) { - psx_delay_BFC10FA8 = 0; - if (psx_taken_BFC10FA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014E4u); - goto label_BFC10FE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014B0u); - } -label_BFC10FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10FB0: 14400005 bne $v0, $zero, 0xBFC10FC8 */ - uint32_t psx_brA_BFC10FB0 = cpu->gpr[2]; uint32_t psx_brB_BFC10FB0 = cpu->gpr[0]; - psx_taken_BFC10FB0 = (psx_brA_BFC10FB0 != psx_brB_BFC10FB0); - psx_delay_BFC10FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC10FB4: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014B4u); -#endif - if (psx_delay_BFC10FB0) { - psx_delay_BFC10FB0 = 0; - if (psx_taken_BFC10FB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014C8u); - goto label_BFC10FC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014B8u); - } -label_BFC10FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014B8u); -#endif - /* 0xBFC10FB8: 8FA30000 lw $v1, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014B8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000014B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FBC: 10000009 beq $zero, $zero, 0xBFC10FE4 */ - uint32_t psx_brA_BFC10FBC = cpu->gpr[0]; uint32_t psx_brB_BFC10FBC = cpu->gpr[0]; - psx_taken_BFC10FBC = (psx_brA_BFC10FBC == psx_brB_BFC10FBC); - psx_delay_BFC10FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014C0u); -#endif - if (psx_delay_BFC10FBC) { - psx_delay_BFC10FBC = 0; - if (psx_taken_BFC10FBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014E4u); - goto label_BFC10FE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014C4u); - } -label_BFC10FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC10FC4: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014C4u); -#endif -label_BFC10FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC10FC8: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC10FCC: 10C50005 beq $a2, $a1, 0xBFC10FE4 */ - uint32_t psx_brA_BFC10FCC = cpu->gpr[6]; uint32_t psx_brB_BFC10FCC = cpu->gpr[5]; - psx_taken_BFC10FCC = (psx_brA_BFC10FCC == psx_brB_BFC10FCC); - psx_delay_BFC10FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014D0u); -#endif - if (psx_delay_BFC10FCC) { - psx_delay_BFC10FCC = 0; - if (psx_taken_BFC10FCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014E4u); - goto label_BFC10FE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014D4u); - } -label_BFC10FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014D4u); -#endif - /* 0xBFC10FD4: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000014D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10FDC: 1440FFF9 bne $v0, $zero, 0xBFC10FC4 */ - uint32_t psx_brA_BFC10FDC = cpu->gpr[2]; uint32_t psx_brB_BFC10FDC = cpu->gpr[0]; - psx_taken_BFC10FDC = (psx_brA_BFC10FDC != psx_brB_BFC10FDC); - psx_delay_BFC10FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000014E0u); -#endif - if (psx_delay_BFC10FDC) { - psx_delay_BFC10FDC = 0; - if (psx_taken_BFC10FDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014C4u); - goto label_BFC10FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014E4u); - } -label_BFC10FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC10FE4: 14C50006 bne $a2, $a1, 0xBFC11000 */ - uint32_t psx_brA_BFC10FE4 = cpu->gpr[6]; uint32_t psx_brB_BFC10FE4 = cpu->gpr[5]; - psx_taken_BFC10FE4 = (psx_brA_BFC10FE4 != psx_brB_BFC10FE4); - psx_delay_BFC10FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10FE8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014E8u); -#endif - if (psx_delay_BFC10FE4) { - psx_delay_BFC10FE4 = 0; - if (psx_taken_BFC10FE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001500u); - goto label_BFC11000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014ECu); - } -label_BFC10FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014ECu); -#endif - /* 0xBFC10FEC: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014ECu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000014ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC10FF0: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC10FF4: 10000002 beq $zero, $zero, 0xBFC11000 */ - uint32_t psx_brA_BFC10FF4 = cpu->gpr[0]; uint32_t psx_brB_BFC10FF4 = cpu->gpr[0]; - psx_taken_BFC10FF4 = (psx_brA_BFC10FF4 == psx_brB_BFC10FF4); - psx_delay_BFC10FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC10FF8: AC790000 sw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014F8u); return; } g_debug_last_store_pc = 0x000014F8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000014F8u); -#endif - if (psx_delay_BFC10FF4) { - psx_delay_BFC10FF4 = 0; - if (psx_taken_BFC10FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001500u); - goto label_BFC11000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000014FCu); - } -label_BFC10FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000014FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000014FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000014FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC10FFC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000014FCu); -#endif -label_BFC11000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11000: 03E00008 jr $ra */ - psx_delay_BFC11000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11004: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00001504u); -#endif - if (psx_delay_BFC11000) { - psx_delay_BFC11000 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001508(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001508u); - int psx_delay_BFC11048 = 0; - int psx_delay_BFC11078 = 0; - int psx_delay_BFC11084 = 0; - int psx_taken_BFC11084 = 0; - int psx_delay_BFC11094 = 0; - int psx_delay_BFC110A0 = 0; - int psx_delay_BFC110AC = 0; - int psx_taken_BFC110AC = 0; - int psx_delay_BFC110D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11050u: goto label_BFC11050; - case 0xBFC11070u: goto label_BFC11070; - case 0xBFC11080u: goto label_BFC11080; - case 0xBFC1108Cu: goto label_BFC1108C; - case 0xBFC11094u: goto label_BFC11094; - case 0xBFC1109Cu: goto label_BFC1109C; - case 0xBFC110A8u: goto label_BFC110A8; - case 0xBFC110B4u: goto label_BFC110B4; - default: break; - } - } -label_BFC11008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11008: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1100C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000150Cu); return; } g_debug_last_store_pc = 0x0000150Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC11010: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001510u); return; } g_debug_last_store_pc = 0x00001510u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00001510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11014: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001514u); -#endif - /* 0xBFC11018: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001518u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC1101C: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000151Cu); return; } g_debug_last_store_pc = 0x0000151Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x0000151Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC11020: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001520u); return; } g_debug_last_store_pc = 0x00001520u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00001520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC11024: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001524u); return; } g_debug_last_store_pc = 0x00001524u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00001524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC11028: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001528u); return; } g_debug_last_store_pc = 0x00001528u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00001528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1102C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000152Cu); return; } g_debug_last_store_pc = 0x0000152Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x0000152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001530u); -#endif - /* 0xBFC11030: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001530u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC11034: 3C130000 lui $s3, 0x0 */ - cpu->gpr[19] = 0x00000000u; - PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11038: 2401FF8E addiu $at, $zero, -114 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-114)); - PGXP_ALU(0x2401FF8Eu, cpu->gpr[1], _pgx1, 0xFFFFFF8Eu); } -#ifdef PSX_COSIM - cosim_instr(0x00001538u); -#endif - /* 0xBFC1103C: 8E736D44 lw $s3, 27972($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000153Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E736D44u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x0000153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC11040: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC11044: 0080A821 addu $s5, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11048: 0C0009E8 jal 0xB00027A0 */ - cpu->gpr[31] = 0x00001550u; /* jal link before delay slot */ - psx_delay_BFC11048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1104C: AC4F0004 sw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000154Cu); return; } g_debug_last_store_pc = 0x0000154Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000154Cu); -#endif - if (psx_delay_BFC11048) { - psx_delay_BFC11048 = 0; - cpu->gpr[31] = 0x00001550u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000027A0u); - cpu->pc = 0x000027A0u; return; - } -label_BFC11050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC11050: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC11054: 3C110001 lui $s1, 0x1 */ - cpu->gpr[17] = 0x00010000u; - PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC11058: 3C100000 lui $s0, 0x0 */ - cpu->gpr[16] = 0x00000000u; - PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC1105C: 3C140000 lui $s4, 0x0 */ - cpu->gpr[20] = 0x00000000u; - PGXP_ALU(0x3C140000u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC11060: 26946D98 addiu $s4, $s4, 28056 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (28056)); - PGXP_ALU(0x26946D98u, cpu->gpr[20], _pgx1, 0x00006D98u); } -#ifdef PSX_COSIM - cosim_instr(0x00001560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC11064: 26106D58 addiu $s0, $s0, 27992 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (27992)); - PGXP_ALU(0x26106D58u, cpu->gpr[16], _pgx1, 0x00006D58u); } -#ifdef PSX_COSIM - cosim_instr(0x00001564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC11068: 26318600 addiu $s1, $s1, -31232 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-31232)); - PGXP_ALU(0x26318600u, cpu->gpr[17], _pgx1, 0xFFFF8600u); } -#ifdef PSX_COSIM - cosim_instr(0x00001568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC1106C: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000156Cu); -#endif -label_BFC11070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC11070: AE320000 sw $s2, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001570u); return; } g_debug_last_store_pc = 0x00001570u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAE320000u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00001570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC11074: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11078: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x00001580u; /* jal link before delay slot */ - psx_delay_BFC11078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC1107C: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000157Cu); -#endif - if (psx_delay_BFC11078) { - psx_delay_BFC11078 = 0; - cpu->gpr[31] = 0x00001580u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC11080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC11080: 26100010 addiu $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (16)); - PGXP_ALU(0x26100010u, cpu->gpr[16], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x00001580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC11084: 1614FFFA bne $s0, $s4, 0xBFC11070 */ - uint32_t psx_brA_BFC11084 = cpu->gpr[16]; uint32_t psx_brB_BFC11084 = cpu->gpr[20]; - psx_taken_BFC11084 = (psx_brA_BFC11084 != psx_brB_BFC11084); - psx_delay_BFC11084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC11088: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00001588u); -#endif - if (psx_delay_BFC11084) { - psx_delay_BFC11084 = 0; - if (psx_taken_BFC11084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001570u); - goto label_BFC11070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000158Cu); - } -label_BFC1108C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000158Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC1108C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC11090: 24100003 addiu $s0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24100003u, cpu->gpr[16], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00001590u); -#endif -label_BFC11094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11094: 0C0009E8 jal 0xB00027A0 */ - cpu->gpr[31] = 0x0000159Cu; /* jal link before delay slot */ - psx_delay_BFC11094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC11098: A6600004 sh $zero, 4($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001598u); return; } g_debug_last_store_pc = 0x00001598u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001598u); -#endif - if (psx_delay_BFC11094) { - psx_delay_BFC11094 = 0; - cpu->gpr[31] = 0x0000159Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000027A0u); - cpu->pc = 0x000027A0u; return; - } -label_BFC1109C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000159Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000159Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000159Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1109C: A6600008 sh $zero, 8($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000159Cu); return; } g_debug_last_store_pc = 0x0000159Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6600008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000159Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC110A0: 0C0009E8 jal 0xB00027A0 */ - cpu->gpr[31] = 0x000015A8u; /* jal link before delay slot */ - psx_delay_BFC110A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC110A4: A6600000 sh $zero, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000015A4u); return; } g_debug_last_store_pc = 0x000015A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000015A4u); -#endif - if (psx_delay_BFC110A0) { - psx_delay_BFC110A0 = 0; - cpu->gpr[31] = 0x000015A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000027A0u); - cpu->pc = 0x000027A0u; return; - } -label_BFC110A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000015A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000015A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC110A8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000015A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC110AC: 1650FFF9 bne $s2, $s0, 0xBFC11094 */ - uint32_t psx_brA_BFC110AC = cpu->gpr[18]; uint32_t psx_brB_BFC110AC = cpu->gpr[16]; - psx_taken_BFC110AC = (psx_brA_BFC110AC != psx_brB_BFC110AC); - psx_delay_BFC110AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC110B0: 26730010 addiu $s3, $s3, 16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (16)); - PGXP_ALU(0x26730010u, cpu->gpr[19], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x000015B0u); -#endif - if (psx_delay_BFC110AC) { - psx_delay_BFC110AC = 0; - if (psx_taken_BFC110AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001594u); - goto label_BFC11094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000015B4u); - } -label_BFC110B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000015B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000015B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015B4u); -#endif - /* 0xBFC110B4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000015B4u); -#endif - /* 0xBFC110B8: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015B8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000015B8u); -#endif - /* 0xBFC110BC: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015BCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000015BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015C0u); -#endif - /* 0xBFC110C0: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015C0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000015C0u); -#endif - /* 0xBFC110C4: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015C4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x000015C4u); -#endif - /* 0xBFC110C8: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015C8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000015C8u); -#endif - /* 0xBFC110CC: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015CCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x000015CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC110D0: 03E00008 jr $ra */ - psx_delay_BFC110D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC110D4: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x000015D4u); -#endif - if (psx_delay_BFC110D0) { - psx_delay_BFC110D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000015D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000015D8u); - int psx_delay_BFC110F0 = 0; -label_BFC110D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000015D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000015D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC110D8: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000015D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC110DC: 25EF8600 addiu $t7, $t7, -31232 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-31232)); - PGXP_ALU(0x25EF8600u, cpu->gpr[15], _pgx1, 0xFFFF8600u); } -#ifdef PSX_COSIM - cosim_instr(0x000015DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC110E0: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000015E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC110E4: 01CF3021 addu $a2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[6] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000015E4u); -#endif - /* 0xBFC110E8: 8CC30000 lw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x8CC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000015E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC110EC: ACC50000 sw $a1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015ECu); return; } g_debug_last_store_pc = 0x000015ECu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xACC50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000015ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC110F0: 03E00008 jr $ra */ - psx_delay_BFC110F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC110F4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000015F4u); -#endif - if (psx_delay_BFC110F0) { - psx_delay_BFC110F0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000015F8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000015F8u); - int psx_delay_BFC11104 = 0; - int psx_taken_BFC11104 = 0; - int psx_delay_BFC1110C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1110Cu: goto label_BFC1110C; - default: break; - } - } -label_BFC110F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000015F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000015F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000015F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC110F8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000015F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC110FC: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x000015FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11100: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11104: 14200003 bne $at, $zero, 0xBFC11114 */ - uint32_t psx_brA_BFC11104 = cpu->gpr[1]; uint32_t psx_brB_BFC11104 = cpu->gpr[0]; - psx_taken_BFC11104 = (psx_brA_BFC11104 != psx_brB_BFC11104); - psx_delay_BFC11104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC11108: 00C03821 addu $a3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001608u); -#endif - if (psx_delay_BFC11104) { - psx_delay_BFC11104 = 0; - if (psx_taken_BFC11104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001614u); - cpu->pc = 0x00001614u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000160Cu); - } -label_BFC1110C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000160Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1110C: 03E00008 jr $ra */ - psx_delay_BFC1110C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11110: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001610u); -#endif - if (psx_delay_BFC1110C) { - psx_delay_BFC1110C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001614(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001614u); - int psx_delay_BFC11138 = 0; - int psx_taken_BFC11138 = 0; - int psx_delay_BFC11144 = 0; - int psx_taken_BFC11144 = 0; - int psx_delay_BFC11150 = 0; - int psx_taken_BFC11150 = 0; - int psx_delay_BFC11160 = 0; - int psx_taken_BFC11160 = 0; - int psx_delay_BFC11168 = 0; - int psx_taken_BFC11168 = 0; - int psx_delay_BFC11174 = 0; - int psx_taken_BFC11174 = 0; - int psx_delay_BFC11180 = 0; - int psx_taken_BFC11180 = 0; - int psx_delay_BFC11190 = 0; - int psx_taken_BFC11190 = 0; - int psx_delay_BFC111A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11140u: goto label_BFC11140; - case 0xBFC1114Cu: goto label_BFC1114C; - case 0xBFC11158u: goto label_BFC11158; - case 0xBFC11160u: goto label_BFC11160; - case 0xBFC11168u: goto label_BFC11168; - case 0xBFC11170u: goto label_BFC11170; - case 0xBFC11174u: goto label_BFC11174; - case 0xBFC1117Cu: goto label_BFC1117C; - case 0xBFC11188u: goto label_BFC11188; - case 0xBFC1118Cu: goto label_BFC1118C; - case 0xBFC11190u: goto label_BFC11190; - case 0xBFC11198u: goto label_BFC11198; - case 0xBFC1119Cu: goto label_BFC1119C; - default: break; - } - } -label_BFC11114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11114: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001614u); -#endif - /* 0xBFC11118: 8DCE6D44 lw $t6, 27972($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001618u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC1111C: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x0000161Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC11120: 3C01F200 lui $at, 0xF200 */ - cpu->gpr[1] = 0xF2000000u; - PGXP_ALU(0x3C01F200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC11124: 00811026 xor $v0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[1]; - PGXP_ALU(0x00811026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC11128: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1112C: A4600004 sh $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000162Cu); return; } g_debug_last_store_pc = 0x0000162Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000162Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11130: 2C420001 sltiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2C420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC11134: A4650008 sh $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001634u); return; } g_debug_last_store_pc = 0x00001634u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00001634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11138: 14400004 bne $v0, $zero, 0xBFC1114C */ - uint32_t psx_brA_BFC11138 = cpu->gpr[2]; uint32_t psx_brB_BFC11138 = cpu->gpr[0]; - psx_taken_BFC11138 = (psx_brA_BFC11138 != psx_brB_BFC11138); - psx_delay_BFC11138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1113C: 24060048 addiu $a2, $zero, 72 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (72)); - PGXP_ALU(0x24060048u, cpu->gpr[6], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x0000163Cu); -#endif - if (psx_delay_BFC11138) { - psx_delay_BFC11138 = 0; - if (psx_taken_BFC11138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000164Cu); - goto label_BFC1114C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001640u); - } -label_BFC11140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC11140: 34580001 ori $t8, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] | 0x1u; - PGXP_ALU(0x34580001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11144: 1300000B beq $t8, $zero, 0xBFC11174 */ - uint32_t psx_brA_BFC11144 = cpu->gpr[24]; uint32_t psx_brB_BFC11144 = cpu->gpr[0]; - psx_taken_BFC11144 = (psx_brA_BFC11144 == psx_brB_BFC11144); - psx_delay_BFC11144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC11148: 34490002 ori $t1, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] | 0x2u; - PGXP_ALU(0x34490002u, cpu->gpr[9], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00001648u); -#endif - if (psx_delay_BFC11144) { - psx_delay_BFC11144 = 0; - if (psx_taken_BFC11144) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001674u); - goto label_BFC11174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000164Cu); - } -label_BFC1114C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000164Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC1114C: 30F90010 andi $t9, $a3, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x10u; - PGXP_ALU(0x30F90010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11150: 13200003 beq $t9, $zero, 0xBFC11160 */ - uint32_t psx_brA_BFC11150 = cpu->gpr[25]; uint32_t psx_brB_BFC11150 = cpu->gpr[0]; - psx_taken_BFC11150 = (psx_brA_BFC11150 == psx_brB_BFC11150); - psx_delay_BFC11150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC11154: 30E80001 andi $t0, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001654u); -#endif - if (psx_delay_BFC11150) { - psx_delay_BFC11150 = 0; - if (psx_taken_BFC11150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001660u); - goto label_BFC11160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001658u); - } -label_BFC11158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC11158: 24060049 addiu $a2, $zero, 73 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (73)); - PGXP_ALU(0x24060049u, cpu->gpr[6], _pgx1, 0x00000049u); } -#ifdef PSX_COSIM - cosim_instr(0x00001658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC1115C: 30E80001 andi $t0, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000165Cu); -#endif -label_BFC11160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC11160: 1500000B bne $t0, $zero, 0xBFC11190 */ - uint32_t psx_brA_BFC11160 = cpu->gpr[8]; uint32_t psx_brB_BFC11160 = cpu->gpr[0]; - psx_taken_BFC11160 = (psx_brA_BFC11160 != psx_brB_BFC11160); - psx_delay_BFC11160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC11164: 30EB1000 andi $t3, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001664u); -#endif - if (psx_delay_BFC11160) { - psx_delay_BFC11160 = 0; - if (psx_taken_BFC11160) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001690u); - goto label_BFC11190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001668u); - } -label_BFC11168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11168: 10000008 beq $zero, $zero, 0xBFC1118C */ - uint32_t psx_brA_BFC11168 = cpu->gpr[0]; uint32_t psx_brB_BFC11168 = cpu->gpr[0]; - psx_taken_BFC11168 = (psx_brA_BFC11168 == psx_brB_BFC11168); - psx_delay_BFC11168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1116C: 34C60100 ori $a2, $a2, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x100u; - PGXP_ALU(0x34C60100u, cpu->gpr[6], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x0000166Cu); -#endif - if (psx_delay_BFC11168) { - psx_delay_BFC11168 = 0; - if (psx_taken_BFC11168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000168Cu); - goto label_BFC1118C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001670u); - } -label_BFC11170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC11170: 34490002 ori $t1, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] | 0x2u; - PGXP_ALU(0x34490002u, cpu->gpr[9], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00001670u); -#endif -label_BFC11174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC11174: 11200006 beq $t1, $zero, 0xBFC11190 */ - uint32_t psx_brA_BFC11174 = cpu->gpr[9]; uint32_t psx_brB_BFC11174 = cpu->gpr[0]; - psx_taken_BFC11174 = (psx_brA_BFC11174 == psx_brB_BFC11174); - psx_delay_BFC11174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC11178: 30EB1000 andi $t3, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001678u); -#endif - if (psx_delay_BFC11174) { - psx_delay_BFC11174 = 0; - if (psx_taken_BFC11174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001690u); - goto label_BFC11190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000167Cu); - } -label_BFC1117C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000167Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC1117C: 30EA0001 andi $t2, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[10] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30EA0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC11180: 15400003 bne $t2, $zero, 0xBFC11190 */ - uint32_t psx_brA_BFC11180 = cpu->gpr[10]; uint32_t psx_brB_BFC11180 = cpu->gpr[0]; - psx_taken_BFC11180 = (psx_brA_BFC11180 != psx_brB_BFC11180); - psx_delay_BFC11180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC11184: 30EB1000 andi $t3, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001684u); -#endif - if (psx_delay_BFC11180) { - psx_delay_BFC11180 = 0; - if (psx_taken_BFC11180) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001690u); - goto label_BFC11190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001688u); - } -label_BFC11188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC11188: 24060248 addiu $a2, $zero, 584 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (584)); - PGXP_ALU(0x24060248u, cpu->gpr[6], _pgx1, 0x00000248u); } -#ifdef PSX_COSIM - cosim_instr(0x00001688u); -#endif -label_BFC1118C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000168Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC1118C: 30EB1000 andi $t3, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30EB1000u, cpu->gpr[11], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x0000168Cu); -#endif -label_BFC11190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC11190: 11600002 beq $t3, $zero, 0xBFC1119C */ - uint32_t psx_brA_BFC11190 = cpu->gpr[11]; uint32_t psx_brB_BFC11190 = cpu->gpr[0]; - psx_taken_BFC11190 = (psx_brA_BFC11190 == psx_brB_BFC11190); - psx_delay_BFC11190 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001694u); -#endif - if (psx_delay_BFC11190) { - psx_delay_BFC11190 = 0; - if (psx_taken_BFC11190) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000169Cu); - goto label_BFC1119C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001698u); - } -label_BFC11198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11198: 34C60010 ori $a2, $a2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x10u; - PGXP_ALU(0x34C60010u, cpu->gpr[6], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00001698u); -#endif -label_BFC1119C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000169Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC1119C: A4660004 sh $a2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000169Cu); return; } g_debug_last_store_pc = 0x0000169Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4660004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x0000169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC111A0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000016A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC111A4: 03E00008 jr $ra */ - psx_delay_BFC111A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC111A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000016A8u); -#endif - if (psx_delay_BFC111A4) { - psx_delay_BFC111A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000016AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000016ACu); - int psx_delay_BFC111B4 = 0; - int psx_taken_BFC111B4 = 0; - int psx_delay_BFC111BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC111BCu: goto label_BFC111BC; - default: break; - } - } -label_BFC111AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000016ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000016ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC111AC: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000016ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC111B0: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x000016B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC111B4: 14200003 bne $at, $zero, 0xBFC111C4 */ - uint32_t psx_brA_BFC111B4 = cpu->gpr[1]; uint32_t psx_brB_BFC111B4 = cpu->gpr[0]; - psx_taken_BFC111B4 = (psx_brA_BFC111B4 != psx_brB_BFC111B4); - psx_delay_BFC111B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC111B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000016B8u); -#endif - if (psx_delay_BFC111B4) { - psx_delay_BFC111B4 = 0; - if (psx_taken_BFC111B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000016C4u); - cpu->pc = 0x000016C4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000016BCu); - } -label_BFC111BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000016BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000016BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC111BC: 03E00008 jr $ra */ - psx_delay_BFC111BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC111C0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000016C0u); -#endif - if (psx_delay_BFC111BC) { - psx_delay_BFC111BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000016C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000016C4u); - int psx_delay_BFC111DC = 0; -label_BFC111C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000016C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000016C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC111C4: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000016C4u); -#endif - /* 0xBFC111C8: 8DCE6D44 lw $t6, 27972($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000016C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC111CC: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x000016CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC111D0: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000016D0u); -#endif - /* 0xBFC111D4: 97020000 lhu $v0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000016D4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x1000000u); } - PGXP_LOAD(0x97020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000016D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC111D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000016D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC111DC: 03E00008 jr $ra */ - psx_delay_BFC111DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC111E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000016E0u); -#endif - if (psx_delay_BFC111DC) { - psx_delay_BFC111DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000016E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000016E4u); - int psx_delay_BFC1120C = 0; - int psx_taken_BFC1120C = 0; - int psx_delay_BFC11214 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11214u: goto label_BFC11214; - default: break; - } - } -label_BFC111E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000016E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000016E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC111E4: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000016E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC111E8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000016E8u); -#endif - /* 0xBFC111EC: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000016ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000016F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC111F0: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000016F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC111F4: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000016F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC111F8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000016F8u); -#endif - /* 0xBFC111FC: 8F186D48 lw $t8, 27976($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016FCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D48u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000016FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001700u); -#endif - /* 0xBFC11200: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001700u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC11204: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x00001704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC11208: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1120C: 14200003 bne $at, $zero, 0xBFC1121C */ - uint32_t psx_brA_BFC1120C = cpu->gpr[1]; uint32_t psx_brB_BFC1120C = cpu->gpr[0]; - psx_taken_BFC1120C = (psx_brA_BFC1120C != psx_brB_BFC1120C); - psx_delay_BFC1120C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC11210: AC590004 sw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001710u); return; } g_debug_last_store_pc = 0x00001710u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001710u); -#endif - if (psx_delay_BFC1120C) { - psx_delay_BFC1120C = 0; - if (psx_taken_BFC1120C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000171Cu); - cpu->pc = 0x0000171Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001714u); - } -label_BFC11214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11214: 03E00008 jr $ra */ - psx_delay_BFC11214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11218: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001718u); -#endif - if (psx_delay_BFC11214) { - psx_delay_BFC11214 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000171C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000171Cu); - int psx_delay_BFC11220 = 0; -label_BFC1121C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000171Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1121C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11220: 03E00008 jr $ra */ - psx_delay_BFC11220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11224: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001724u); -#endif - if (psx_delay_BFC11220) { - psx_delay_BFC11220 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001728(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001728u); - int psx_delay_BFC11254 = 0; -label_BFC11228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11228: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1122C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11230: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11234: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001734u); -#endif - /* 0xBFC11238: 8C636D40 lw $v1, 27968($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001738u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636D40u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1123C: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000173Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001740u); -#endif - /* 0xBFC11240: 8F186D48 lw $t8, 27976($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001740u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D48u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001740u); -#endif - /* 0xBFC11244: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001744u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000001u); -#endif - /* 0xBFC11248: 0300C827 nor $t9, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]); - PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004100u); -#endif - /* 0xBFC1124C: 01D94024 and $t0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25]; - PGXP_ALU(0x01D94024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000174Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11250: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11254: 03E00008 jr $ra */ - psx_delay_BFC11254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC11258: AC680004 sw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001758u); return; } g_debug_last_store_pc = 0x00001758u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001758u); -#endif - if (psx_delay_BFC11254) { - psx_delay_BFC11254 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000175C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000175Cu); - int psx_delay_BFC11264 = 0; - int psx_taken_BFC11264 = 0; - int psx_delay_BFC1126C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1126Cu: goto label_BFC1126C; - default: break; - } - } -label_BFC1125C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000175Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1125C: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC11260: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x00001760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11264: 14200003 bne $at, $zero, 0xBFC11274 */ - uint32_t psx_brA_BFC11264 = cpu->gpr[1]; uint32_t psx_brB_BFC11264 = cpu->gpr[0]; - psx_taken_BFC11264 = (psx_brA_BFC11264 != psx_brB_BFC11264); - psx_delay_BFC11264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001768u); -#endif - if (psx_delay_BFC11264) { - psx_delay_BFC11264 = 0; - if (psx_taken_BFC11264) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001774u); - cpu->pc = 0x00001774u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000176Cu); - } -label_BFC1126C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000176Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000176Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000176Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1126C: 03E00008 jr $ra */ - psx_delay_BFC1126C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11270: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001770u); -#endif - if (psx_delay_BFC1126C) { - psx_delay_BFC1126C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001774(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001774u); - int psx_delay_BFC1128C = 0; -label_BFC11274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11274: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001774u); -#endif - /* 0xBFC11278: 8DCE6D44 lw $t6, 27972($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001778u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC1127C: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x0000177Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11280: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11284: A7000000 sh $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001784u); return; } g_debug_last_store_pc = 0x00001784u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11288: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1128C: 03E00008 jr $ra */ - psx_delay_BFC1128C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001790u); -#endif - if (psx_delay_BFC1128C) { - psx_delay_BFC1128C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001794(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001794u); - int psx_delay_BFC112B0 = 0; - int psx_taken_BFC112B0 = 0; - int psx_delay_BFC112C4 = 0; - int psx_taken_BFC112C4 = 0; - int psx_delay_BFC112CC = 0; - int psx_taken_BFC112CC = 0; - int psx_delay_BFC112D8 = 0; - int psx_delay_BFC112EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC112B8u: goto label_BFC112B8; - case 0xBFC112CCu: goto label_BFC112CC; - case 0xBFC112D4u: goto label_BFC112D4; - case 0xBFC112D8u: goto label_BFC112D8; - case 0xBFC112E0u: goto label_BFC112E0; - case 0xBFC112E4u: goto label_BFC112E4; - default: break; - } - } -label_BFC11294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11294: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001794u); -#endif - /* 0xBFC11298: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001798u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1129C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x0000179Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC112A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017A0u); return; } g_debug_last_store_pc = 0x000017A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000017A0u); -#endif - /* 0xBFC112A4: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017A4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000017A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC112A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000017A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC112AC: 31CF0010 andi $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x10u; - PGXP_ALU(0x31CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000017ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC112B0: 11E00006 beq $t7, $zero, 0xBFC112CC */ - uint32_t psx_brA_BFC112B0 = cpu->gpr[15]; uint32_t psx_brB_BFC112B0 = cpu->gpr[0]; - psx_taken_BFC112B0 = (psx_brA_BFC112B0 == psx_brB_BFC112B0); - psx_delay_BFC112B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC112B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000017B4u); -#endif - if (psx_delay_BFC112B0) { - psx_delay_BFC112B0 = 0; - if (psx_taken_BFC112B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017CCu); - goto label_BFC112CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017B8u); - } -label_BFC112B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017B8u); -#endif - /* 0xBFC112B8: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017B8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000017B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC112BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000017BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC112C0: 33190010 andi $t9, $t8, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u; - PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000017C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC112C4: 17200004 bne $t9, $zero, 0xBFC112D8 */ - uint32_t psx_brA_BFC112C4 = cpu->gpr[25]; uint32_t psx_brB_BFC112C4 = cpu->gpr[0]; - psx_taken_BFC112C4 = (psx_brA_BFC112C4 != psx_brB_BFC112C4); - psx_delay_BFC112C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC112C8: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000017C8u); -#endif - if (psx_delay_BFC112C4) { - psx_delay_BFC112C4 = 0; - if (psx_taken_BFC112C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017D8u); - goto label_BFC112D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017CCu); - } -label_BFC112CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC112CC: 10000005 beq $zero, $zero, 0xBFC112E4 */ - uint32_t psx_brA_BFC112CC = cpu->gpr[0]; uint32_t psx_brB_BFC112CC = cpu->gpr[0]; - psx_taken_BFC112CC = (psx_brA_BFC112CC == psx_brB_BFC112CC); - psx_delay_BFC112CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC112D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000017D0u); -#endif - if (psx_delay_BFC112CC) { - psx_delay_BFC112CC = 0; - if (psx_taken_BFC112CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017E4u); - goto label_BFC112E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000017D4u); - } -label_BFC112D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC112D4: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000017D4u); -#endif -label_BFC112D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC112D8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000017E0u; /* jal link before delay slot */ - psx_delay_BFC112D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC112DC: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x000017DCu); -#endif - if (psx_delay_BFC112D8) { - psx_delay_BFC112D8 = 0; - cpu->gpr[31] = 0x000017E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC112E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC112E0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000017E0u); -#endif -label_BFC112E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017E4u); -#endif - /* 0xBFC112E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000017E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC112E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000017E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC112EC: 03E00008 jr $ra */ - psx_delay_BFC112EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC112F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000017F0u); -#endif - if (psx_delay_BFC112EC) { - psx_delay_BFC112EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000017F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000017F4u); - int psx_delay_BFC11310 = 0; - int psx_taken_BFC11310 = 0; - int psx_delay_BFC11324 = 0; - int psx_taken_BFC11324 = 0; - int psx_delay_BFC1132C = 0; - int psx_taken_BFC1132C = 0; - int psx_delay_BFC1133C = 0; - int psx_delay_BFC11350 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11318u: goto label_BFC11318; - case 0xBFC1132Cu: goto label_BFC1132C; - case 0xBFC11334u: goto label_BFC11334; - case 0xBFC11338u: goto label_BFC11338; - case 0xBFC11344u: goto label_BFC11344; - case 0xBFC11348u: goto label_BFC11348; - default: break; - } - } -label_BFC112F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000017F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000017F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000017F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC112F4: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000017F4u); -#endif - /* 0xBFC112F8: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000017F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC112FC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000017FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11300: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001800u); return; } g_debug_last_store_pc = 0x00001800u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001800u); -#endif - /* 0xBFC11304: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001804u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11308: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1130C: 31CF0020 andi $t7, $t6, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u; - PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x0000180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11310: 11E00006 beq $t7, $zero, 0xBFC1132C */ - uint32_t psx_brA_BFC11310 = cpu->gpr[15]; uint32_t psx_brB_BFC11310 = cpu->gpr[0]; - psx_taken_BFC11310 = (psx_brA_BFC11310 == psx_brB_BFC11310); - psx_delay_BFC11310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001814u); -#endif - if (psx_delay_BFC11310) { - psx_delay_BFC11310 = 0; - if (psx_taken_BFC11310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000182Cu); - goto label_BFC1132C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001818u); - } -label_BFC11318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001818u); -#endif - /* 0xBFC11318: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001818u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1131C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11320: 33190020 andi $t9, $t8, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x20u; - PGXP_ALU(0x33190020u, cpu->gpr[25], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x00001820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11324: 17200004 bne $t9, $zero, 0xBFC11338 */ - uint32_t psx_brA_BFC11324 = cpu->gpr[25]; uint32_t psx_brB_BFC11324 = cpu->gpr[0]; - psx_taken_BFC11324 = (psx_brA_BFC11324 != psx_brB_BFC11324); - psx_delay_BFC11324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11328: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001828u); -#endif - if (psx_delay_BFC11324) { - psx_delay_BFC11324 = 0; - if (psx_taken_BFC11324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001838u); - goto label_BFC11338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000182Cu); - } -label_BFC1132C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000182Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000182Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000182Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1132C: 10000006 beq $zero, $zero, 0xBFC11348 */ - uint32_t psx_brA_BFC1132C = cpu->gpr[0]; uint32_t psx_brB_BFC1132C = cpu->gpr[0]; - psx_taken_BFC1132C = (psx_brA_BFC1132C == psx_brB_BFC1132C); - psx_delay_BFC1132C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11330: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001830u); -#endif - if (psx_delay_BFC1132C) { - psx_delay_BFC1132C = 0; - if (psx_taken_BFC1132C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001848u); - goto label_BFC11348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001834u); - } -label_BFC11334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11334: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001834u); -#endif -label_BFC11338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11338: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1133C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00001844u; /* jal link before delay slot */ - psx_delay_BFC1133C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11340: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00001840u); -#endif - if (psx_delay_BFC1133C) { - psx_delay_BFC1133C = 0; - cpu->gpr[31] = 0x00001844u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11344: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001844u); -#endif -label_BFC11348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001848u); -#endif - /* 0xBFC11348: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001848u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1134C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000184Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11350: 03E00008 jr $ra */ - psx_delay_BFC11350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001854u); -#endif - if (psx_delay_BFC11350) { - psx_delay_BFC11350 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001858(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001858u); - int psx_delay_BFC11374 = 0; - int psx_taken_BFC11374 = 0; - int psx_delay_BFC11388 = 0; - int psx_taken_BFC11388 = 0; - int psx_delay_BFC11390 = 0; - int psx_taken_BFC11390 = 0; - int psx_delay_BFC113A0 = 0; - int psx_delay_BFC113B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1137Cu: goto label_BFC1137C; - case 0xBFC11390u: goto label_BFC11390; - case 0xBFC11398u: goto label_BFC11398; - case 0xBFC1139Cu: goto label_BFC1139C; - case 0xBFC113A8u: goto label_BFC113A8; - case 0xBFC113ACu: goto label_BFC113AC; - default: break; - } - } -label_BFC11358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11358: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001858u); -#endif - /* 0xBFC1135C: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000185Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000185Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11360: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11364: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001864u); return; } g_debug_last_store_pc = 0x00001864u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001864u); -#endif - /* 0xBFC11368: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001868u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1136C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC11370: 31CF0040 andi $t7, $t6, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x40u; - PGXP_ALU(0x31CF0040u, cpu->gpr[15], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x00001870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11374: 11E00006 beq $t7, $zero, 0xBFC11390 */ - uint32_t psx_brA_BFC11374 = cpu->gpr[15]; uint32_t psx_brB_BFC11374 = cpu->gpr[0]; - psx_taken_BFC11374 = (psx_brA_BFC11374 == psx_brB_BFC11374); - psx_delay_BFC11374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001878u); -#endif - if (psx_delay_BFC11374) { - psx_delay_BFC11374 = 0; - if (psx_taken_BFC11374) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001890u); - goto label_BFC11390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000187Cu); - } -label_BFC1137C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000187Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000187Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000187Cu); -#endif - /* 0xBFC1137C: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000187Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000187Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11380: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11384: 33190040 andi $t9, $t8, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x40u; - PGXP_ALU(0x33190040u, cpu->gpr[25], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x00001884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11388: 17200004 bne $t9, $zero, 0xBFC1139C */ - uint32_t psx_brA_BFC11388 = cpu->gpr[25]; uint32_t psx_brB_BFC11388 = cpu->gpr[0]; - psx_taken_BFC11388 = (psx_brA_BFC11388 != psx_brB_BFC11388); - psx_delay_BFC11388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1138C: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000188Cu); -#endif - if (psx_delay_BFC11388) { - psx_delay_BFC11388 = 0; - if (psx_taken_BFC11388) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000189Cu); - goto label_BFC1139C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001890u); - } -label_BFC11390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11390: 10000006 beq $zero, $zero, 0xBFC113AC */ - uint32_t psx_brA_BFC11390 = cpu->gpr[0]; uint32_t psx_brB_BFC11390 = cpu->gpr[0]; - psx_taken_BFC11390 = (psx_brA_BFC11390 == psx_brB_BFC11390); - psx_delay_BFC11390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11394: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001894u); -#endif - if (psx_delay_BFC11390) { - psx_delay_BFC11390 = 0; - if (psx_taken_BFC11390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000018ACu); - goto label_BFC113AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001898u); - } -label_BFC11398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11398: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001898u); -#endif -label_BFC1139C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000189Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1139C: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC113A0: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000018A8u; /* jal link before delay slot */ - psx_delay_BFC113A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC113A4: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x000018A4u); -#endif - if (psx_delay_BFC113A0) { - psx_delay_BFC113A0 = 0; - cpu->gpr[31] = 0x000018A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC113A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC113A8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000018A8u); -#endif -label_BFC113AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018ACu); -#endif - /* 0xBFC113AC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000018ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC113B0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000018B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC113B4: 03E00008 jr $ra */ - psx_delay_BFC113B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC113B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000018B8u); -#endif - if (psx_delay_BFC113B4) { - psx_delay_BFC113B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000018BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000018BCu); - int psx_delay_BFC113D8 = 0; - int psx_taken_BFC113D8 = 0; - int psx_delay_BFC113EC = 0; - int psx_taken_BFC113EC = 0; - int psx_delay_BFC113F4 = 0; - int psx_taken_BFC113F4 = 0; - int psx_delay_BFC11404 = 0; - int psx_delay_BFC11418 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC113E0u: goto label_BFC113E0; - case 0xBFC113F4u: goto label_BFC113F4; - case 0xBFC113FCu: goto label_BFC113FC; - case 0xBFC11400u: goto label_BFC11400; - case 0xBFC1140Cu: goto label_BFC1140C; - case 0xBFC11410u: goto label_BFC11410; - default: break; - } - } -label_BFC113BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC113BC: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000018BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018C0u); -#endif - /* 0xBFC113C0: 8C426D40 lw $v0, 27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000018C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC113C4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000018C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC113C8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018C8u); return; } g_debug_last_store_pc = 0x000018C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000018C8u); -#endif - /* 0xBFC113CC: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000018CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC113D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000018D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC113D4: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000018D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC113D8: 11E00006 beq $t7, $zero, 0xBFC113F4 */ - uint32_t psx_brA_BFC113D8 = cpu->gpr[15]; uint32_t psx_brB_BFC113D8 = cpu->gpr[0]; - psx_taken_BFC113D8 = (psx_brA_BFC113D8 == psx_brB_BFC113D8); - psx_delay_BFC113D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC113DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000018DCu); -#endif - if (psx_delay_BFC113D8) { - psx_delay_BFC113D8 = 0; - if (psx_taken_BFC113D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000018F4u); - goto label_BFC113F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000018E0u); - } -label_BFC113E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018E0u); -#endif - /* 0xBFC113E0: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000018E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC113E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000018E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC113E8: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000018E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC113EC: 17200004 bne $t9, $zero, 0xBFC11400 */ - uint32_t psx_brA_BFC113EC = cpu->gpr[25]; uint32_t psx_brB_BFC113EC = cpu->gpr[0]; - psx_taken_BFC113EC = (psx_brA_BFC113EC != psx_brB_BFC113EC); - psx_delay_BFC113EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC113F0: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000018F0u); -#endif - if (psx_delay_BFC113EC) { - psx_delay_BFC113EC = 0; - if (psx_taken_BFC113EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001900u); - goto label_BFC11400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000018F4u); - } -label_BFC113F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC113F4: 10000006 beq $zero, $zero, 0xBFC11410 */ - uint32_t psx_brA_BFC113F4 = cpu->gpr[0]; uint32_t psx_brB_BFC113F4 = cpu->gpr[0]; - psx_taken_BFC113F4 = (psx_brA_BFC113F4 == psx_brB_BFC113F4); - psx_delay_BFC113F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC113F8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000018F8u); -#endif - if (psx_delay_BFC113F4) { - psx_delay_BFC113F4 = 0; - if (psx_taken_BFC113F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001910u); - goto label_BFC11410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000018FCu); - } -label_BFC113FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000018FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000018FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000018FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC113FC: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000018FCu); -#endif -label_BFC11400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11400: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x00001900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11404: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x0000190Cu; /* jal link before delay slot */ - psx_delay_BFC11404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11408: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00001908u); -#endif - if (psx_delay_BFC11404) { - psx_delay_BFC11404 = 0; - cpu->gpr[31] = 0x0000190Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC1140C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000190Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000190Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000190Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1140C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000190Cu); -#endif -label_BFC11410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001910u); -#endif - /* 0xBFC11410: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001910u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11414: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00001914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11418: 03E00008 jr $ra */ - psx_delay_BFC11418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1141C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000191Cu); -#endif - if (psx_delay_BFC11418) { - psx_delay_BFC11418 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001920(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001920u); - int psx_delay_BFC1142C = 0; - int psx_taken_BFC1142C = 0; - int psx_delay_BFC11440 = 0; - int psx_delay_BFC11450 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11434u: goto label_BFC11434; - case 0xBFC11448u: goto label_BFC11448; - default: break; - } - } -label_BFC11420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11420: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001920u); -#endif - /* 0xBFC11424: 8DCE8600 lw $t6, -31232($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001924u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8600u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11428: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1142C: 11C00006 beq $t6, $zero, 0xBFC11448 */ - uint32_t psx_brA_BFC1142C = cpu->gpr[14]; uint32_t psx_brB_BFC1142C = cpu->gpr[0]; - psx_taken_BFC1142C = (psx_brA_BFC1142C == psx_brB_BFC1142C); - psx_delay_BFC1142C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11430: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001930u); return; } g_debug_last_store_pc = 0x00001930u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001930u); -#endif - if (psx_delay_BFC1142C) { - psx_delay_BFC1142C = 0; - if (psx_taken_BFC1142C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001948u); - goto label_BFC11448; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001934u); - } -label_BFC11434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11434: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001934u); -#endif - /* 0xBFC11438: 8F186D40 lw $t8, 27968($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001938u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1143C: 240FFFEF addiu $t7, $zero, -17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-17)); - PGXP_ALU(0x240FFFEFu, cpu->gpr[15], _pgx1, 0xFFFFFFEFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11440: 0C0003D0 jal 0xB0000F40 */ - cpu->gpr[31] = 0x00001948u; /* jal link before delay slot */ - psx_delay_BFC11440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11444: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001944u); return; } g_debug_last_store_pc = 0x00001944u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001944u); -#endif - if (psx_delay_BFC11440) { - psx_delay_BFC11440 = 0; - cpu->gpr[31] = 0x00001948u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F40u); - cpu->pc = 0x00000F40u; return; - } -label_BFC11448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001948u); -#endif - /* 0xBFC11448: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001948u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1144C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11450: 03E00008 jr $ra */ - psx_delay_BFC11450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001954u); -#endif - if (psx_delay_BFC11450) { - psx_delay_BFC11450 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001958(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001958u); - int psx_delay_BFC11464 = 0; - int psx_taken_BFC11464 = 0; - int psx_delay_BFC11478 = 0; - int psx_delay_BFC11488 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1146Cu: goto label_BFC1146C; - case 0xBFC11480u: goto label_BFC11480; - default: break; - } - } -label_BFC11458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11458: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001958u); -#endif - /* 0xBFC1145C: 8DCE8604 lw $t6, -31228($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31228; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31228)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000195Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8604u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11460: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC11464: 11C00006 beq $t6, $zero, 0xBFC11480 */ - uint32_t psx_brA_BFC11464 = cpu->gpr[14]; uint32_t psx_brB_BFC11464 = cpu->gpr[0]; - psx_taken_BFC11464 = (psx_brA_BFC11464 == psx_brB_BFC11464); - psx_delay_BFC11464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11468: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001968u); return; } g_debug_last_store_pc = 0x00001968u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001968u); -#endif - if (psx_delay_BFC11464) { - psx_delay_BFC11464 = 0; - if (psx_taken_BFC11464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001980u); - goto label_BFC11480; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000196Cu); - } -label_BFC1146C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000196Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1146C: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001970u); -#endif - /* 0xBFC11470: 8F186D40 lw $t8, 27968($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001970u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11474: 240FFFDF addiu $t7, $zero, -33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); - PGXP_ALU(0x240FFFDFu, cpu->gpr[15], _pgx1, 0xFFFFFFDFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11478: 0C0003D0 jal 0xB0000F40 */ - cpu->gpr[31] = 0x00001980u; /* jal link before delay slot */ - psx_delay_BFC11478 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1147C: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000197Cu); return; } g_debug_last_store_pc = 0x0000197Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000197Cu); -#endif - if (psx_delay_BFC11478) { - psx_delay_BFC11478 = 0; - cpu->gpr[31] = 0x00001980u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F40u); - cpu->pc = 0x00000F40u; return; - } -label_BFC11480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001980u); -#endif - /* 0xBFC11480: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001980u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11484: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00001984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11488: 03E00008 jr $ra */ - psx_delay_BFC11488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1148C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000198Cu); -#endif - if (psx_delay_BFC11488) { - psx_delay_BFC11488 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001990u); - int psx_delay_BFC1149C = 0; - int psx_taken_BFC1149C = 0; - int psx_delay_BFC114B0 = 0; - int psx_delay_BFC114C0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC114A4u: goto label_BFC114A4; - case 0xBFC114B8u: goto label_BFC114B8; - default: break; - } - } -label_BFC11490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11490: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001990u); -#endif - /* 0xBFC11494: 8DCE8608 lw $t6, -31224($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31224; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31224)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001994u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8608u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11498: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1149C: 11C00006 beq $t6, $zero, 0xBFC114B8 */ - uint32_t psx_brA_BFC1149C = cpu->gpr[14]; uint32_t psx_brB_BFC1149C = cpu->gpr[0]; - psx_taken_BFC1149C = (psx_brA_BFC1149C == psx_brB_BFC1149C); - psx_delay_BFC1149C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC114A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019A0u); return; } g_debug_last_store_pc = 0x000019A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000019A0u); -#endif - if (psx_delay_BFC1149C) { - psx_delay_BFC1149C = 0; - if (psx_taken_BFC1149C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000019B8u); - goto label_BFC114B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000019A4u); - } -label_BFC114A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000019A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000019A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC114A4: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000019A4u); -#endif - /* 0xBFC114A8: 8F186D40 lw $t8, 27968($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019A8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000019A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC114AC: 240FFFBF addiu $t7, $zero, -65 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-65)); - PGXP_ALU(0x240FFFBFu, cpu->gpr[15], _pgx1, 0xFFFFFFBFu); } -#ifdef PSX_COSIM - cosim_instr(0x000019ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC114B0: 0C0003D0 jal 0xB0000F40 */ - cpu->gpr[31] = 0x000019B8u; /* jal link before delay slot */ - psx_delay_BFC114B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC114B4: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019B4u); return; } g_debug_last_store_pc = 0x000019B4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000019B4u); -#endif - if (psx_delay_BFC114B0) { - psx_delay_BFC114B0 = 0; - cpu->gpr[31] = 0x000019B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F40u); - cpu->pc = 0x00000F40u; return; - } -label_BFC114B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000019B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000019B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019B8u); -#endif - /* 0xBFC114B8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000019B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC114BC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000019BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC114C0: 03E00008 jr $ra */ - psx_delay_BFC114C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC114C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000019C4u); -#endif - if (psx_delay_BFC114C0) { - psx_delay_BFC114C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000019C8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000019C8u); - int psx_delay_BFC114D4 = 0; - int psx_taken_BFC114D4 = 0; - int psx_delay_BFC114E8 = 0; - int psx_delay_BFC114F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC114DCu: goto label_BFC114DC; - case 0xBFC114F0u: goto label_BFC114F0; - default: break; - } - } -label_BFC114C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000019C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000019C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC114C8: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000019C8u); -#endif - /* 0xBFC114CC: 8DCE860C lw $t6, -31220($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31220; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE860Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000019CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC114D0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000019D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC114D4: 11C00006 beq $t6, $zero, 0xBFC114F0 */ - uint32_t psx_brA_BFC114D4 = cpu->gpr[14]; uint32_t psx_brB_BFC114D4 = cpu->gpr[0]; - psx_taken_BFC114D4 = (psx_brA_BFC114D4 == psx_brB_BFC114D4); - psx_delay_BFC114D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC114D8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019D8u); return; } g_debug_last_store_pc = 0x000019D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000019D8u); -#endif - if (psx_delay_BFC114D4) { - psx_delay_BFC114D4 = 0; - if (psx_taken_BFC114D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000019F0u); - goto label_BFC114F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000019DCu); - } -label_BFC114DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000019DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000019DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC114DC: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000019DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019E0u); -#endif - /* 0xBFC114E0: 8F186D40 lw $t8, 27968($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186D40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000019E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC114E4: 240FFFFE addiu $t7, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240FFFFEu, cpu->gpr[15], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x000019E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC114E8: 0C0003D0 jal 0xB0000F40 */ - cpu->gpr[31] = 0x000019F0u; /* jal link before delay slot */ - psx_delay_BFC114E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC114EC: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019ECu); return; } g_debug_last_store_pc = 0x000019ECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000019ECu); -#endif - if (psx_delay_BFC114E8) { - psx_delay_BFC114E8 = 0; - cpu->gpr[31] = 0x000019F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F40u); - cpu->pc = 0x00000F40u; return; - } -label_BFC114F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000019F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000019F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000019F0u); -#endif - /* 0xBFC114F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000019F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC114F4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000019F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC114F8: 03E00008 jr $ra */ - psx_delay_BFC114F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC114FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000019FCu); -#endif - if (psx_delay_BFC114F8) { - psx_delay_BFC114F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001A00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001A00u); - int psx_delay_BFC1151C = 0; - int psx_taken_BFC1151C = 0; -label_BFC11500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11500: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001A00u); -#endif - /* 0xBFC11504: 8DCE0108 lw $t6, 264($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A04u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0108u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11508: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1150C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A0Cu); return; } g_debug_last_store_pc = 0x00001A0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A10u); -#endif - /* 0xBFC11510: 8DC20000 lw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A10u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4011u); -#endif - /* 0xBFC11514: 01C02021 addu $a0, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001A14u); -#endif - /* 0xBFC11518: 8C430098 lw $v1, 152($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A18u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430098u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1151C: 10000032 beq $zero, $zero, 0xBFC115E8 */ - uint32_t psx_brA_BFC1151C = cpu->gpr[0]; uint32_t psx_brB_BFC1151C = cpu->gpr[0]; - psx_taken_BFC1151C = (psx_brA_BFC1151C == psx_brB_BFC1151C); - psx_delay_BFC1151C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11520: 3063003C andi $v1, $v1, 0x3C */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x3Cu; - PGXP_ALU(0x3063003Cu, cpu->gpr[3], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001A20u); -#endif - if (psx_delay_BFC1151C) { - psx_delay_BFC1151C = 0; - if (psx_taken_BFC1151C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AE8u); - cpu->pc = 0x00001AE8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A24u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A24u); - cpu->pc = 0x00001A24u; return; /* fallthrough */ -} - -void SCPH1001_func_00001A24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001A24u); - int psx_delay_BFC11524 = 0; - int psx_taken_BFC11524 = 0; -label_BFC11524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11524: 1000003A beq $zero, $zero, 0xBFC11610 */ - uint32_t psx_brA_BFC11524 = cpu->gpr[0]; uint32_t psx_brB_BFC11524 = cpu->gpr[0]; - psx_taken_BFC11524 = (psx_brA_BFC11524 == psx_brB_BFC11524); - psx_delay_BFC11524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11528: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001A28u); -#endif - if (psx_delay_BFC11524) { - psx_delay_BFC11524 = 0; - if (psx_taken_BFC11524) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B10u); - cpu->pc = 0x00001B10u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A2Cu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A2Cu); - cpu->pc = 0x00001A2Cu; return; /* fallthrough */ -} - -void SCPH1001_func_00001A2C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001A2Cu); - int psx_delay_BFC1153C = 0; - int psx_taken_BFC1153C = 0; - int psx_delay_BFC11558 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11544u: goto label_BFC11544; - default: break; - } - } -label_BFC1152C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A2Cu); -#endif - /* 0xBFC1152C: 8C4F0088 lw $t7, 136($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A2Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0088u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A30u); -#endif - /* 0xBFC11530: 8C430018 lw $v1, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A30u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11534: 25F80004 addiu $t8, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (4)); - PGXP_ALU(0x25F80004u, cpu->gpr[24], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC11538: 2C610004 sltiu $at, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2C610004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1153C: 10200020 beq $at, $zero, 0xBFC115C0 */ - uint32_t psx_brA_BFC1153C = cpu->gpr[1]; uint32_t psx_brB_BFC1153C = cpu->gpr[0]; - psx_taken_BFC1153C = (psx_brA_BFC1153C == psx_brB_BFC1153C); - psx_delay_BFC1153C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC11540: AC580088 sw $t8, 136($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A40u); return; } g_debug_last_store_pc = 0x00001A40u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580088u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A40u); -#endif - if (psx_delay_BFC1153C) { - psx_delay_BFC1153C = 0; - if (psx_taken_BFC1153C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AC0u); - cpu->pc = 0x00001AC0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A44u); - } -label_BFC11544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC11544: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC11548: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1154C: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A50u); -#endif - /* 0xBFC11550: 8C396C60 lw $t9, 27744($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A50u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2u); } - PGXP_LOAD(0x8C396C60u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11558: 03200008 jr $t9 */ - psx_delay_BFC11558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1155C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001A5Cu); -#endif - if (psx_delay_BFC11558) { - psx_delay_BFC11558 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[25]); - cpu->pc = cpu->gpr[25]; return; - } -} - -void SCPH1001_func_00001A60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001A60u); - int psx_delay_BFC1156C = 0; - int psx_taken_BFC1156C = 0; - int psx_delay_BFC11578 = 0; - int psx_taken_BFC11578 = 0; - int psx_delay_BFC11590 = 0; - int psx_taken_BFC11590 = 0; - int psx_delay_BFC115A4 = 0; - int psx_taken_BFC115A4 = 0; - int psx_delay_BFC115B8 = 0; - int psx_taken_BFC115B8 = 0; - int psx_delay_BFC115C8 = 0; - int psx_delay_BFC115D0 = 0; - int psx_taken_BFC115D0 = 0; - int psx_delay_BFC115D8 = 0; - int psx_delay_BFC115E0 = 0; - int psx_taken_BFC115E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11598u: goto label_BFC11598; - case 0xBFC115ACu: goto label_BFC115AC; - case 0xBFC115C0u: goto label_BFC115C0; - case 0xBFC115D8u: goto label_BFC115D8; - case 0xBFC11574u: goto label_BFC11574; - case 0xBFC11580u: goto label_BFC11580; - case 0xBFC11584u: goto label_BFC11584; - case 0xBFC115D0u: goto label_BFC115D0; - case 0xBFC115E0u: goto label_BFC115E0; - default: break; - } - } -label_BFC11560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A60u); -#endif - /* 0xBFC11560: 8C480094 lw $t0, 148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A60u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480094u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11564: 24010404 addiu $at, $zero, 1028 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1028)); - PGXP_ALU(0x24010404u, cpu->gpr[1], _pgx1, 0x00000404u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC11568: 31090404 andi $t1, $t0, 0x404 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x404u; - PGXP_ALU(0x31090404u, cpu->gpr[9], _pgx1, 0x0404u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1156C: 15210004 bne $t1, $at, 0xBFC11580 */ - uint32_t psx_brA_BFC1156C = cpu->gpr[9]; uint32_t psx_brB_BFC1156C = cpu->gpr[1]; - psx_taken_BFC1156C = (psx_brA_BFC1156C != psx_brB_BFC1156C); - psx_delay_BFC1156C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11570: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001A70u); -#endif - if (psx_delay_BFC1156C) { - psx_delay_BFC1156C = 0; - if (psx_taken_BFC1156C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A80u); - goto label_BFC11580; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A74u); - } -label_BFC11574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC11574: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11578: 10000002 beq $zero, $zero, 0xBFC11584 */ - uint32_t psx_brA_BFC11578 = cpu->gpr[0]; uint32_t psx_brB_BFC11578 = cpu->gpr[0]; - psx_taken_BFC11578 = (psx_brA_BFC11578 == psx_brB_BFC11578); - psx_delay_BFC11578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1157C: AC4A0010 sw $t2, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A7Cu); return; } g_debug_last_store_pc = 0x00001A7Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A7Cu); -#endif - if (psx_delay_BFC11578) { - psx_delay_BFC11578 = 0; - if (psx_taken_BFC11578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A84u); - goto label_BFC11584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A80u); - } -label_BFC11580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11580: AC400010 sw $zero, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A80u); return; } g_debug_last_store_pc = 0x00001A80u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A80u); -#endif -label_BFC11584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A84u); -#endif - /* 0xBFC11584: 8C4B0094 lw $t3, 148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A84u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B0094u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11588: 2401FBFB addiu $at, $zero, -1029 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1029)); - PGXP_ALU(0x2401FBFBu, cpu->gpr[1], _pgx1, 0xFFFFFBFBu); } -#ifdef PSX_COSIM - cosim_instr(0x00001A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1802u); -#endif - /* 0xBFC1158C: 01616024 and $t4, $t3, $at */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1]; - PGXP_ALU(0x01616024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11590: 10000011 beq $zero, $zero, 0xBFC115D8 */ - uint32_t psx_brA_BFC11590 = cpu->gpr[0]; uint32_t psx_brB_BFC11590 = cpu->gpr[0]; - psx_taken_BFC11590 = (psx_brA_BFC11590 == psx_brB_BFC11590); - psx_delay_BFC11590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC11594: AC4C0094 sw $t4, 148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A94u); return; } g_debug_last_store_pc = 0x00001A94u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC4C0094u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A94u); -#endif - if (psx_delay_BFC11590) { - psx_delay_BFC11590 = 0; - if (psx_taken_BFC11590) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AD8u); - goto label_BFC115D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A98u); - } -label_BFC11598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001A98u); -#endif - /* 0xBFC11598: 8C4D0094 lw $t5, 148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A98u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0094u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00001A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1159C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC115A0: 35AE0404 ori $t6, $t5, 0x404 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x404u; - PGXP_ALU(0x35AE0404u, cpu->gpr[14], _pgx1, 0x0404u); } -#ifdef PSX_COSIM - cosim_instr(0x00001AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115A4: 1000000C beq $zero, $zero, 0xBFC115D8 */ - uint32_t psx_brA_BFC115A4 = cpu->gpr[0]; uint32_t psx_brB_BFC115A4 = cpu->gpr[0]; - psx_taken_BFC115A4 = (psx_brA_BFC115A4 == psx_brB_BFC115A4); - psx_delay_BFC115A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC115A8: AC4E0094 sw $t6, 148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001AA8u); return; } g_debug_last_store_pc = 0x00001AA8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0094u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001AA8u); -#endif - if (psx_delay_BFC115A4) { - psx_delay_BFC115A4 = 0; - if (psx_taken_BFC115A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AD8u); - goto label_BFC115D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AACu); - } -label_BFC115AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AACu); -#endif - /* 0xBFC115AC: 8C4F001C lw $t7, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001AACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC115B0: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC115B4: AC8F0000 sw $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001AB4u); return; } g_debug_last_store_pc = 0x00001AB4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115B8: 10000007 beq $zero, $zero, 0xBFC115D8 */ - uint32_t psx_brA_BFC115B8 = cpu->gpr[0]; uint32_t psx_brB_BFC115B8 = cpu->gpr[0]; - psx_taken_BFC115B8 = (psx_brA_BFC115B8 == psx_brB_BFC115B8); - psx_delay_BFC115B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC115BC: AC580010 sw $t8, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001ABCu); return; } g_debug_last_store_pc = 0x00001ABCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001ABCu); -#endif - if (psx_delay_BFC115B8) { - psx_delay_BFC115B8 = 0; - if (psx_taken_BFC115B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AD8u); - goto label_BFC115D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AC0u); - } -label_BFC115C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC115C0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC115C4: 34840010 ori $a0, $a0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x10u; - PGXP_ALU(0x34840010u, cpu->gpr[4], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00001AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC115C8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00001AD0u; /* jal link before delay slot */ - psx_delay_BFC115C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC115CC: 24054000 addiu $a1, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24054000u, cpu->gpr[5], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001ACCu); -#endif - if (psx_delay_BFC115C8) { - psx_delay_BFC115C8 = 0; - cpu->gpr[31] = 0x00001AD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC115D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115D0: 10000001 beq $zero, $zero, 0xBFC115D8 */ - uint32_t psx_brA_BFC115D0 = cpu->gpr[0]; uint32_t psx_brB_BFC115D0 = cpu->gpr[0]; - psx_taken_BFC115D0 = (psx_brA_BFC115D0 == psx_brB_BFC115D0); - psx_delay_BFC115D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001AD4u); -#endif - if (psx_delay_BFC115D0) { - psx_delay_BFC115D0 = 0; - if (psx_taken_BFC115D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AD8u); - goto label_BFC115D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AD8u); - } -label_BFC115D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC115D8: 0C0003D0 jal 0xB0000F40 */ - cpu->gpr[31] = 0x00001AE0u; /* jal link before delay slot */ - psx_delay_BFC115D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001ADCu); -#endif - if (psx_delay_BFC115D8) { - psx_delay_BFC115D8 = 0; - cpu->gpr[31] = 0x00001AE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000F40u); - cpu->pc = 0x00000F40u; return; - } -label_BFC115E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115E0: 10000006 beq $zero, $zero, 0xBFC115FC */ - uint32_t psx_brA_BFC115E0 = cpu->gpr[0]; uint32_t psx_brB_BFC115E0 = cpu->gpr[0]; - psx_taken_BFC115E0 = (psx_brA_BFC115E0 == psx_brB_BFC115E0); - psx_delay_BFC115E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC115E4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001AE4u); -#endif - if (psx_delay_BFC115E0) { - psx_delay_BFC115E0 = 0; - if (psx_taken_BFC115E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AFCu); - cpu->pc = 0x00001AFCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AE8u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AE8u); - cpu->pc = 0x00001AE8u; return; /* fallthrough */ -} - -void SCPH1001_func_00001AE8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001AE8u); - int psx_delay_BFC115E8 = 0; - int psx_taken_BFC115E8 = 0; - int psx_delay_BFC115F0 = 0; - int psx_taken_BFC115F0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC115F0u: goto label_BFC115F0; - case 0xBFC115F8u: goto label_BFC115F8; - default: break; - } - } -label_BFC115E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC115E8: 1060FFCE beq $v1, $zero, 0xBFC11524 */ - uint32_t psx_brA_BFC115E8 = cpu->gpr[3]; uint32_t psx_brB_BFC115E8 = cpu->gpr[0]; - psx_taken_BFC115E8 = (psx_brA_BFC115E8 == psx_brB_BFC115E8); - psx_delay_BFC115E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC115EC: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00001AECu); -#endif - if (psx_delay_BFC115E8) { - psx_delay_BFC115E8 = 0; - if (psx_taken_BFC115E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A24u); - cpu->pc = 0x00001A24u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AF0u); - } -label_BFC115F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC115F0: 1061FFCE beq $v1, $at, 0xBFC1152C */ - uint32_t psx_brA_BFC115F0 = cpu->gpr[3]; uint32_t psx_brB_BFC115F0 = cpu->gpr[1]; - psx_taken_BFC115F0 = (psx_brA_BFC115F0 == psx_brB_BFC115F0); - psx_delay_BFC115F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC115F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001AF4u); -#endif - if (psx_delay_BFC115F0) { - psx_delay_BFC115F0 = 0; - if (psx_taken_BFC115F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001A2Cu); - cpu->pc = 0x00001A2Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AF8u); - } -label_BFC115F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC115F8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001AFCu); - cpu->pc = 0x00001AFCu; return; /* fallthrough */ -} - -void SCPH1001_func_00001AFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001AFCu); - int psx_delay_BFC11600 = 0; - int psx_delay_BFC11608 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11608u: goto label_BFC11608; - default: break; - } - } -label_BFC115FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC115FC: 34840010 ori $a0, $a0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x10u; - PGXP_ALU(0x34840010u, cpu->gpr[4], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00001AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11600: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00001B08u; /* jal link before delay slot */ - psx_delay_BFC11600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11604: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B04u); -#endif - if (psx_delay_BFC11600) { - psx_delay_BFC11600 = 0; - cpu->gpr[31] = 0x00001B08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11608: 0C001AA0 jal 0xB0006A80 */ - cpu->gpr[31] = 0x00001B10u; /* jal link before delay slot */ - psx_delay_BFC11608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1160C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001B0Cu); -#endif - if (psx_delay_BFC11608) { - psx_delay_BFC11608 = 0; - cpu->gpr[31] = 0x00001B10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A80u); - cpu->pc = 0x00006A80u; return; - } -} - -void SCPH1001_func_00001B10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001B10u); - int psx_delay_BFC11618 = 0; -label_BFC11610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B10u); -#endif - /* 0xBFC11610: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11614: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11618: 03E00008 jr $ra */ - psx_delay_BFC11618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1161C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001B1Cu); -#endif - if (psx_delay_BFC11618) { - psx_delay_BFC11618 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001B20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001B20u); - int psx_delay_BFC1162C = 0; - int psx_delay_BFC1163C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11634u: goto label_BFC11634; - default: break; - } - } -label_BFC11620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11620: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11624: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B24u); return; } g_debug_last_store_pc = 0x00001B24u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11628: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1162C: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x00001B34u; /* jal link before delay slot */ - psx_delay_BFC1162C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11630: 24A56DA8 addiu $a1, $a1, 28072 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28072)); - PGXP_ALU(0x24A56DA8u, cpu->gpr[5], _pgx1, 0x00006DA8u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B30u); -#endif - if (psx_delay_BFC1162C) { - psx_delay_BFC1162C = 0; - cpu->gpr[31] = 0x00001B34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC11634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B34u); -#endif - /* 0xBFC11634: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11638: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1163C: 03E00008 jr $ra */ - psx_delay_BFC1163C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11640: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001B40u); -#endif - if (psx_delay_BFC1163C) { - psx_delay_BFC1163C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001B44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001B44u); - int psx_delay_BFC11698 = 0; - int psx_taken_BFC11698 = 0; - int psx_delay_BFC116C0 = 0; - int psx_taken_BFC116C0 = 0; - int psx_delay_BFC116D0 = 0; - int psx_taken_BFC116D0 = 0; - int psx_delay_BFC116E0 = 0; - int psx_taken_BFC116E0 = 0; - int psx_delay_BFC116F0 = 0; - int psx_taken_BFC116F0 = 0; - int psx_delay_BFC116F8 = 0; - int psx_taken_BFC116F8 = 0; - int psx_delay_BFC11700 = 0; - int psx_taken_BFC11700 = 0; - int psx_delay_BFC11710 = 0; - int psx_taken_BFC11710 = 0; - int psx_delay_BFC11718 = 0; - int psx_delay_BFC11728 = 0; - int psx_taken_BFC11728 = 0; - int psx_delay_BFC11754 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC116A0u: goto label_BFC116A0; - case 0xBFC116B8u: goto label_BFC116B8; - case 0xBFC116C8u: goto label_BFC116C8; - case 0xBFC116D8u: goto label_BFC116D8; - case 0xBFC116E8u: goto label_BFC116E8; - case 0xBFC116F8u: goto label_BFC116F8; - case 0xBFC11700u: goto label_BFC11700; - case 0xBFC11708u: goto label_BFC11708; - case 0xBFC11718u: goto label_BFC11718; - case 0xBFC11720u: goto label_BFC11720; - case 0xBFC11730u: goto label_BFC11730; - case 0xBFC11740u: goto label_BFC11740; - default: break; - } - } -label_BFC11644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11644: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001B44u); -#endif - /* 0xBFC11648: 8DCE0124 lw $t6, 292($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B48u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0124u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1164C: 2401001C addiu $at, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2401001Cu, cpu->gpr[1], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC11650: 01C1001B divu $t6, $at */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11654: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11658: 3C03A000 lui $v1, 0xA000 */ - cpu->gpr[3] = 0xA0000000u; - PGXP_ALU(0x3C03A000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001B58u); -#endif - /* 0xBFC1165C: 8C630120 lw $v1, 288($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B5Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630120u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC11660: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B60u); return; } g_debug_last_store_pc = 0x00001B60u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC11664: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B64u); return; } g_debug_last_store_pc = 0x00001B64u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC11668: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B68u); return; } g_debug_last_store_pc = 0x00001B68u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1166C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B6Cu); return; } g_debug_last_store_pc = 0x00001B6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC11670: 0080A821 addu $s5, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC11674: 00A0B021 addu $s6, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11678: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B78u); return; } g_debug_last_store_pc = 0x00001B78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC1167C: 00608021 addu $s0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11680: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11684: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11688: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1168C: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000Cu); -#endif - /* 0xBFC11690: 00781021 addu $v0, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00781021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC11694: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11698: 10200029 beq $at, $zero, 0xBFC11740 */ - uint32_t psx_brA_BFC11698 = cpu->gpr[1]; uint32_t psx_brB_BFC11698 = cpu->gpr[0]; - psx_taken_BFC11698 = (psx_brA_BFC11698 == psx_brB_BFC11698); - psx_delay_BFC11698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100005u); -#endif - /* 0xBFC1169C: 0040A021 addu $s4, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001B9Cu); -#endif - if (psx_delay_BFC11698) { - psx_delay_BFC11698 = 0; - if (psx_taken_BFC11698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C40u); - goto label_BFC11740; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BA0u); - } -label_BFC116A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC116A0: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BA0u); return; } g_debug_last_store_pc = 0x00001BA0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC116A4: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BA4u); return; } g_debug_last_store_pc = 0x00001BA4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC116A8: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BA8u); return; } g_debug_last_store_pc = 0x00001BA8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC116AC: 24131000 addiu $s3, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24131000u, cpu->gpr[19], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC116B0: 24124000 addiu $s2, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24124000u, cpu->gpr[18], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC116B4: 24112000 addiu $s1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24112000u, cpu->gpr[17], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001BB4u); -#endif -label_BFC116B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BB8u); -#endif - /* 0xBFC116B8: 8E190004 lw $t9, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BB8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC116C0: 16390017 bne $s1, $t9, 0xBFC11720 */ - uint32_t psx_brA_BFC116C0 = cpu->gpr[17]; uint32_t psx_brB_BFC116C0 = cpu->gpr[25]; - psx_taken_BFC116C0 = (psx_brA_BFC116C0 != psx_brB_BFC116C0); - psx_delay_BFC116C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BC4u); -#endif - if (psx_delay_BFC116C0) { - psx_delay_BFC116C0 = 0; - if (psx_taken_BFC116C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BC8u); - } -label_BFC116C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BC8u); -#endif - /* 0xBFC116C8: 8E080000 lw $t0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BC8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC116D0: 16A80013 bne $s5, $t0, 0xBFC11720 */ - uint32_t psx_brA_BFC116D0 = cpu->gpr[21]; uint32_t psx_brB_BFC116D0 = cpu->gpr[8]; - psx_taken_BFC116D0 = (psx_brA_BFC116D0 != psx_brB_BFC116D0); - psx_delay_BFC116D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BD4u); -#endif - if (psx_delay_BFC116D0) { - psx_delay_BFC116D0 = 0; - if (psx_taken_BFC116D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BD8u); - } -label_BFC116D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BD8u); -#endif - /* 0xBFC116D8: 8E090008 lw $t1, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BD8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC116E0: 16C9000F bne $s6, $t1, 0xBFC11720 */ - uint32_t psx_brA_BFC116E0 = cpu->gpr[22]; uint32_t psx_brB_BFC116E0 = cpu->gpr[9]; - psx_taken_BFC116E0 = (psx_brA_BFC116E0 != psx_brB_BFC116E0); - psx_delay_BFC116E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BE4u); -#endif - if (psx_delay_BFC116E0) { - psx_delay_BFC116E0 = 0; - if (psx_taken_BFC116E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BE8u); - } -label_BFC116E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BE8u); -#endif - /* 0xBFC116E8: 8E02000C lw $v0, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BE8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E02000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC116F0: 16220003 bne $s1, $v0, 0xBFC11700 */ - uint32_t psx_brA_BFC116F0 = cpu->gpr[17]; uint32_t psx_brB_BFC116F0 = cpu->gpr[2]; - psx_taken_BFC116F0 = (psx_brA_BFC116F0 != psx_brB_BFC116F0); - psx_delay_BFC116F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001BF4u); -#endif - if (psx_delay_BFC116F0) { - psx_delay_BFC116F0 = 0; - if (psx_taken_BFC116F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C00u); - goto label_BFC11700; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BF8u); - } -label_BFC116F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC116F8: 10000009 beq $zero, $zero, 0xBFC11720 */ - uint32_t psx_brA_BFC116F8 = cpu->gpr[0]; uint32_t psx_brB_BFC116F8 = cpu->gpr[0]; - psx_taken_BFC116F8 = (psx_brA_BFC116F8 == psx_brB_BFC116F8); - psx_delay_BFC116F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC116FC: AE120004 sw $s2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BFCu); return; } g_debug_last_store_pc = 0x00001BFCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAE120004u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00001BFCu); -#endif - if (psx_delay_BFC116F8) { - psx_delay_BFC116F8 = 0; - if (psx_taken_BFC116F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C00u); - } -label_BFC11700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC11700: 16620007 bne $s3, $v0, 0xBFC11720 */ - uint32_t psx_brA_BFC11700 = cpu->gpr[19]; uint32_t psx_brB_BFC11700 = cpu->gpr[2]; - psx_taken_BFC11700 = (psx_brA_BFC11700 != psx_brB_BFC11700); - psx_delay_BFC11700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C04u); -#endif - if (psx_delay_BFC11700) { - psx_delay_BFC11700 = 0; - if (psx_taken_BFC11700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C08u); - } -label_BFC11708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C08u); -#endif - /* 0xBFC11708: 8E020010 lw $v0, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1170C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11710: 10400003 beq $v0, $zero, 0xBFC11720 */ - uint32_t psx_brA_BFC11710 = cpu->gpr[2]; uint32_t psx_brB_BFC11710 = cpu->gpr[0]; - psx_taken_BFC11710 = (psx_brA_BFC11710 == psx_brB_BFC11710); - psx_delay_BFC11710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C14u); -#endif - if (psx_delay_BFC11710) { - psx_delay_BFC11710 = 0; - if (psx_taken_BFC11710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C20u); - goto label_BFC11720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C18u); - } -label_BFC11718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC11718: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x00001C20u; /* jalr link before delay slot */ - psx_delay_BFC11718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1171C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C1Cu); -#endif - if (psx_delay_BFC11718) { - psx_delay_BFC11718 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x00001C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC11720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC11720: 2610001C addiu $s0, $s0, 28 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (28)); - PGXP_ALU(0x2610001Cu, cpu->gpr[16], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110002u); -#endif - /* 0xBFC11724: 0214082B sltu $at, $s0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0); - PGXP_ALU(0x0214082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11728: 1420FFE3 bne $at, $zero, 0xBFC116B8 */ - uint32_t psx_brA_BFC11728 = cpu->gpr[1]; uint32_t psx_brB_BFC11728 = cpu->gpr[0]; - psx_taken_BFC11728 = (psx_brA_BFC11728 != psx_brB_BFC11728); - psx_delay_BFC11728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1172C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C2Cu); -#endif - if (psx_delay_BFC11728) { - psx_delay_BFC11728 = 0; - if (psx_taken_BFC11728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001BB8u); - goto label_BFC116B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C30u); - } -label_BFC11730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C30u); -#endif - /* 0xBFC11730: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C30u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C30u); -#endif - /* 0xBFC11734: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C34u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C34u); -#endif - /* 0xBFC11738: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C38u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1173C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C3Cu); -#endif -label_BFC11740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C40u); -#endif - /* 0xBFC11740: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C40u); -#endif - /* 0xBFC11744: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C44u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C44u); -#endif - /* 0xBFC11748: 8FB40018 lw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C48u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C48u); -#endif - /* 0xBFC1174C: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C4Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C50u); -#endif - /* 0xBFC11750: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C50u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11754: 03E00008 jr $ra */ - psx_delay_BFC11754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11758: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x00001C58u); -#endif - if (psx_delay_BFC11754) { - psx_delay_BFC11754 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001C5C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001C5Cu); - int psx_delay_BFC11794 = 0; - int psx_taken_BFC11794 = 0; - int psx_delay_BFC117AC = 0; - int psx_taken_BFC117AC = 0; - int psx_delay_BFC117BC = 0; - int psx_taken_BFC117BC = 0; - int psx_delay_BFC117CC = 0; - int psx_taken_BFC117CC = 0; - int psx_delay_BFC117DC = 0; - int psx_taken_BFC117DC = 0; - int psx_delay_BFC117F0 = 0; - int psx_taken_BFC117F0 = 0; - int psx_delay_BFC117F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1179Cu: goto label_BFC1179C; - case 0xBFC117A4u: goto label_BFC117A4; - case 0xBFC117B4u: goto label_BFC117B4; - case 0xBFC117C4u: goto label_BFC117C4; - case 0xBFC117D4u: goto label_BFC117D4; - case 0xBFC117E4u: goto label_BFC117E4; - case 0xBFC117E8u: goto label_BFC117E8; - case 0xBFC117F8u: goto label_BFC117F8; - default: break; - } - } -label_BFC1175C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1175C: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C60u); -#endif - /* 0xBFC11760: 8DCE0124 lw $t6, 292($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C60u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0124u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11764: 2401001C addiu $at, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2401001Cu, cpu->gpr[1], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC11768: 01C1001B divu $t6, $at */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1176C: 3C03A000 lui $v1, 0xA000 */ - cpu->gpr[3] = 0xA0000000u; - PGXP_ALU(0x3C03A000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C70u); -#endif - /* 0xBFC11770: 8C630120 lw $v1, 288($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C70u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630120u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC11778: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1177C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11780: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC11784: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11788: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000088u); -#endif - /* 0xBFC1178C: 00783821 addu $a3, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00783821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8Au); -#endif - /* 0xBFC11790: 0067082B sltu $at, $v1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x0067082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11794: 10200018 beq $at, $zero, 0xBFC117F8 */ - uint32_t psx_brA_BFC11794 = cpu->gpr[1]; uint32_t psx_brB_BFC11794 = cpu->gpr[0]; - psx_taken_BFC11794 = (psx_brA_BFC11794 == psx_brB_BFC11794); - psx_delay_BFC11794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC11798: 00E03021 addu $a2, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001C98u); -#endif - if (psx_delay_BFC11794) { - psx_delay_BFC11794 = 0; - if (psx_taken_BFC11794) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CF8u); - goto label_BFC117F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C9Cu); - } -label_BFC1179C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1179C: 24034000 addiu $v1, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24034000u, cpu->gpr[3], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC117A0: 24072000 addiu $a3, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24072000u, cpu->gpr[7], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001CA0u); -#endif -label_BFC117A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CA4u); -#endif - /* 0xBFC117A4: 8C590004 lw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CA4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC117AC: 1479000E bne $v1, $t9, 0xBFC117E8 */ - uint32_t psx_brA_BFC117AC = cpu->gpr[3]; uint32_t psx_brB_BFC117AC = cpu->gpr[25]; - psx_taken_BFC117AC = (psx_brA_BFC117AC != psx_brB_BFC117AC); - psx_delay_BFC117AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CB0u); -#endif - if (psx_delay_BFC117AC) { - psx_delay_BFC117AC = 0; - if (psx_taken_BFC117AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CE8u); - goto label_BFC117E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CB4u); - } -label_BFC117B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CB4u); -#endif - /* 0xBFC117B4: 8C480000 lw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CB4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC117BC: 1488000A bne $a0, $t0, 0xBFC117E8 */ - uint32_t psx_brA_BFC117BC = cpu->gpr[4]; uint32_t psx_brB_BFC117BC = cpu->gpr[8]; - psx_taken_BFC117BC = (psx_brA_BFC117BC != psx_brB_BFC117BC); - psx_delay_BFC117BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CC0u); -#endif - if (psx_delay_BFC117BC) { - psx_delay_BFC117BC = 0; - if (psx_taken_BFC117BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CE8u); - goto label_BFC117E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CC4u); - } -label_BFC117C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CC4u); -#endif - /* 0xBFC117C4: 8C490008 lw $t1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CC4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x8C490008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC117CC: 14A90006 bne $a1, $t1, 0xBFC117E8 */ - uint32_t psx_brA_BFC117CC = cpu->gpr[5]; uint32_t psx_brB_BFC117CC = cpu->gpr[9]; - psx_taken_BFC117CC = (psx_brA_BFC117CC != psx_brB_BFC117CC); - psx_delay_BFC117CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CD0u); -#endif - if (psx_delay_BFC117CC) { - psx_delay_BFC117CC = 0; - if (psx_taken_BFC117CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CE8u); - goto label_BFC117E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CD4u); - } -label_BFC117D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CD4u); -#endif - /* 0xBFC117D4: 8C4A000C lw $t2, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CD4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x8C4A000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00001CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC117DC: 14EA0002 bne $a3, $t2, 0xBFC117E8 */ - uint32_t psx_brA_BFC117DC = cpu->gpr[7]; uint32_t psx_brB_BFC117DC = cpu->gpr[10]; - psx_taken_BFC117DC = (psx_brA_BFC117DC != psx_brB_BFC117DC); - psx_delay_BFC117DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CE0u); -#endif - if (psx_delay_BFC117DC) { - psx_delay_BFC117DC = 0; - if (psx_taken_BFC117DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CE8u); - goto label_BFC117E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CE4u); - } -label_BFC117E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC117E4: AC470004 sw $a3, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CE4u); return; } g_debug_last_store_pc = 0x00001CE4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC470004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00001CE4u); -#endif -label_BFC117E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC117E8: 2442001C addiu $v0, $v0, 28 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (28)); - PGXP_ALU(0x2442001Cu, cpu->gpr[2], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46u); -#endif - /* 0xBFC117EC: 0046082B sltu $at, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0046082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC117F0: 1420FFEC bne $at, $zero, 0xBFC117A4 */ - uint32_t psx_brA_BFC117F0 = cpu->gpr[1]; uint32_t psx_brB_BFC117F0 = cpu->gpr[0]; - psx_taken_BFC117F0 = (psx_brA_BFC117F0 != psx_brB_BFC117F0); - psx_delay_BFC117F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CF4u); -#endif - if (psx_delay_BFC117F0) { - psx_delay_BFC117F0 = 0; - if (psx_taken_BFC117F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CA4u); - goto label_BFC117A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001CF8u); - } -label_BFC117F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC117F8: 03E00008 jr $ra */ - psx_delay_BFC117F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC117FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001CFCu); -#endif - if (psx_delay_BFC117F8) { - psx_delay_BFC117F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001D00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001D00u); - int psx_delay_BFC11838 = 0; - int psx_taken_BFC11838 = 0; -label_BFC11800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11800: 3C0FA000 lui $t7, 0xA000 */ - cpu->gpr[15] = 0xA0000000u; - PGXP_ALU(0x3C0FA000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D00u); -#endif - /* 0xBFC11804: 8DEF0124 lw $t7, 292($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D04u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF0124u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11808: 2401001C addiu $at, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2401001Cu, cpu->gpr[1], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1180C: 01E1001B divu $t7, $at */ - { uint32_t psx_n = cpu->gpr[15]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Bu, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11810: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D10u); -#endif - /* 0xBFC11814: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC1181C: 01C01821 addu $v1, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11820: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11824: 0018C8C0 sll $t9, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11828: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1182C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004004u); -#endif - /* 0xBFC11830: 01D91021 addu $v0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D91021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC11834: 01C2082B sltu $at, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01C2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11838: 10200011 beq $at, $zero, 0xBFC11880 */ - uint32_t psx_brA_BFC11838 = cpu->gpr[1]; uint32_t psx_brB_BFC11838 = cpu->gpr[0]; - psx_taken_BFC11838 = (psx_brA_BFC11838 == psx_brB_BFC11838); - psx_delay_BFC11838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1183C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D3Cu); -#endif - if (psx_delay_BFC11838) { - psx_delay_BFC11838 = 0; - if (psx_taken_BFC11838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D80u); - cpu->pc = 0x00001D80u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D40u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D40u); - cpu->pc = 0x00001D40u; return; /* fallthrough */ -} - -void SCPH1001_func_00001D40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001D40u); - int psx_delay_BFC11848 = 0; - int psx_taken_BFC11848 = 0; - int psx_delay_BFC11868 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11850u: goto label_BFC11850; - default: break; - } - } -label_BFC11840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D40u); -#endif - /* 0xBFC11840: 8C680004 lw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D40u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC11848: 15000009 bne $t0, $zero, 0xBFC11870 */ - uint32_t psx_brA_BFC11848 = cpu->gpr[8]; uint32_t psx_brB_BFC11848 = cpu->gpr[0]; - psx_taken_BFC11848 = (psx_brA_BFC11848 != psx_brB_BFC11848); - psx_delay_BFC11848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1184C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D4Cu); -#endif - if (psx_delay_BFC11848) { - psx_delay_BFC11848 = 0; - if (psx_taken_BFC11848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D70u); - cpu->pc = 0x00001D70u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D50u); - } -label_BFC11850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC11850: 3C09A000 lui $t1, 0xA000 */ - cpu->gpr[9] = 0xA0000000u; - PGXP_ALU(0x3C09A000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D50u); -#endif - /* 0xBFC11854: 8D290120 lw $t1, 288($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D54u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D290120u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11858: 2401001C addiu $at, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2401001Cu, cpu->gpr[1], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Cu); -#endif - /* 0xBFC1185C: 00691023 subu $v0, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[9]; - PGXP_ALU(0x00691023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC11860: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11864: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11868: 03E00008 jr $ra */ - psx_delay_BFC11868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1186C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D6Cu); -#endif - if (psx_delay_BFC11868) { - psx_delay_BFC11868 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001D70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001D70u); - int psx_delay_BFC11878 = 0; - int psx_taken_BFC11878 = 0; - int psx_delay_BFC11884 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11880u: goto label_BFC11880; - default: break; - } - } -label_BFC11870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11870: 2463001C addiu $v1, $v1, 28 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (28)); - PGXP_ALU(0x2463001Cu, cpu->gpr[3], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00001D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC11874: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11878: 1420FFF1 bne $at, $zero, 0xBFC11840 */ - uint32_t psx_brA_BFC11878 = cpu->gpr[1]; uint32_t psx_brB_BFC11878 = cpu->gpr[0]; - psx_taken_BFC11878 = (psx_brA_BFC11878 != psx_brB_BFC11878); - psx_delay_BFC11878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1187C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D7Cu); -#endif - if (psx_delay_BFC11878) { - psx_delay_BFC11878 = 0; - if (psx_taken_BFC11878) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D40u); - cpu->pc = 0x00001D40u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D80u); - } -label_BFC11880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11880: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11884: 03E00008 jr $ra */ - psx_delay_BFC11884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11888: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001D88u); -#endif - if (psx_delay_BFC11884) { - psx_delay_BFC11884 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001D8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001D8Cu); - int psx_delay_BFC118AC = 0; - int psx_delay_BFC118BC = 0; - int psx_taken_BFC118BC = 0; - int psx_delay_BFC118C4 = 0; - int psx_taken_BFC118C4 = 0; - int psx_delay_BFC11914 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC118B4u: goto label_BFC118B4; - case 0xBFC118C4u: goto label_BFC118C4; - case 0xBFC118CCu: goto label_BFC118CC; - case 0xBFC1190Cu: goto label_BFC1190C; - default: break; - } - } -label_BFC1188C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1188C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11890: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D90u); return; } g_debug_last_store_pc = 0x00001D90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11894: 3C03A000 lui $v1, 0xA000 */ - cpu->gpr[3] = 0xA0000000u; - PGXP_ALU(0x3C03A000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC11898: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D98u); return; } g_debug_last_store_pc = 0x00001D98u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D98u); -#endif - /* 0xBFC1189C: 8C630120 lw $v1, 288($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D9Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630120u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC118A0: AFA50034 sw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DA0u); return; } g_debug_last_store_pc = 0x00001DA0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC118A4: AFA60038 sw $a2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DA4u); return; } g_debug_last_store_pc = 0x00001DA4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60038u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC118A8: AFA7003C sw $a3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DA8u); return; } g_debug_last_store_pc = 0x00001DA8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7003Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC118AC: 0C000740 jal 0xB0001D00 */ - cpu->gpr[31] = 0x00001DB4u; /* jal link before delay slot */ - psx_delay_BFC118AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC118B0: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DB0u); return; } g_debug_last_store_pc = 0x00001DB0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DB0u); -#endif - if (psx_delay_BFC118AC) { - psx_delay_BFC118AC = 0; - cpu->gpr[31] = 0x00001DB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001D00u); - cpu->pc = 0x00001D00u; return; - } -label_BFC118B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DB4u); -#endif - /* 0xBFC118B4: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC118B8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC118BC: 14410003 bne $v0, $at, 0xBFC118CC */ - uint32_t psx_brA_BFC118BC = cpu->gpr[2]; uint32_t psx_brB_BFC118BC = cpu->gpr[1]; - psx_taken_BFC118BC = (psx_brA_BFC118BC != psx_brB_BFC118BC); - psx_delay_BFC118BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC118C0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001DC0u); -#endif - if (psx_delay_BFC118BC) { - psx_delay_BFC118BC = 0; - if (psx_taken_BFC118BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001DCCu); - goto label_BFC118CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001DC4u); - } -label_BFC118C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC118C4: 10000011 beq $zero, $zero, 0xBFC1190C */ - uint32_t psx_brA_BFC118C4 = cpu->gpr[0]; uint32_t psx_brB_BFC118C4 = cpu->gpr[0]; - psx_taken_BFC118C4 = (psx_brA_BFC118C4 == psx_brB_BFC118C4); - psx_delay_BFC118C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC118C8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001DC8u); -#endif - if (psx_delay_BFC118C4) { - psx_delay_BFC118C4 = 0; - if (psx_taken_BFC118C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001E0Cu); - goto label_BFC1190C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001DCCu); - } -label_BFC118CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC118CC: 000470C0 sll $t6, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000470C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC118D0: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001DD0u); -#endif - /* 0xBFC118D4: 8FAF0030 lw $t7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DD4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0030u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC118D8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC118DC: 006E1821 addu $v1, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC118E0: AC6F0000 sw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DE0u); return; } g_debug_last_store_pc = 0x00001DE0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DE0u); -#endif - /* 0xBFC118E4: 8FB80034 lw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DE4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC118E8: 24091000 addiu $t1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24091000u, cpu->gpr[9], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC118EC: AC780008 sw $t8, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DECu); return; } g_debug_last_store_pc = 0x00001DECu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001DF0u); -#endif - /* 0xBFC118F0: 8FB90038 lw $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DF0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC118F4: 3C01F100 lui $at, 0xF100 */ - cpu->gpr[1] = 0xF1000000u; - PGXP_ALU(0x3C01F100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC118F8: AC79000C sw $t9, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DF8u); return; } g_debug_last_store_pc = 0x00001DF8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DF8u); -#endif - /* 0xBFC118FC: 8FA8003C lw $t0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001DFCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8003Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC11900: AC690004 sw $t1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E00u); return; } g_debug_last_store_pc = 0x00001E00u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC11904: 00811025 or $v0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x00811025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC11908: AC680010 sw $t0, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E08u); return; } g_debug_last_store_pc = 0x00001E08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E08u); -#endif -label_BFC1190C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E0Cu); -#endif - /* 0xBFC1190C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11910: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11914: 03E00008 jr $ra */ - psx_delay_BFC11914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11918: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001E18u); -#endif - if (psx_delay_BFC11914) { - psx_delay_BFC11914 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001E1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001E1Cu); - int psx_delay_BFC1193C = 0; -label_BFC1191C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1191C: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11920: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11924: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001E24u); -#endif - /* 0xBFC11928: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E28u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC1192C: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11930: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11934: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11938: AF000004 sw $zero, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E38u); return; } g_debug_last_store_pc = 0x00001E38u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAF000004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1193C: 03E00008 jr $ra */ - psx_delay_BFC1193C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11940: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E40u); -#endif - if (psx_delay_BFC1193C) { - psx_delay_BFC1193C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001E44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001E44u); - int psx_delay_BFC11968 = 0; - int psx_taken_BFC11968 = 0; - int psx_delay_BFC11978 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11970u: goto label_BFC11970; - default: break; - } - } -label_BFC11944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11944: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11948: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1194C: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E50u); -#endif - /* 0xBFC11950: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11954: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11958: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC1195C: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E60u); -#endif - /* 0xBFC11960: 8C580004 lw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E60u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11964: 24054000 addiu $a1, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24054000u, cpu->gpr[5], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC11968: 14B80005 bne $a1, $t8, 0xBFC11980 */ - uint32_t psx_brA_BFC11968 = cpu->gpr[5]; uint32_t psx_brB_BFC11968 = cpu->gpr[24]; - psx_taken_BFC11968 = (psx_brA_BFC11968 != psx_brB_BFC11968); - psx_delay_BFC11968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1196C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E6Cu); -#endif - if (psx_delay_BFC11968) { - psx_delay_BFC11968 = 0; - if (psx_taken_BFC11968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001E80u); - cpu->pc = 0x00001E80u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001E70u); - } -label_BFC11970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11970: 24042000 addiu $a0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24042000u, cpu->gpr[4], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC11974: AC640004 sw $a0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E74u); return; } g_debug_last_store_pc = 0x00001E74u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11978: 03E00008 jr $ra */ - psx_delay_BFC11978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1197C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E7Cu); -#endif - if (psx_delay_BFC11978) { - psx_delay_BFC11978 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001E80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001E80u); - int psx_delay_BFC11988 = 0; - int psx_taken_BFC11988 = 0; - int psx_delay_BFC11990 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11990u: goto label_BFC11990; - default: break; - } - } -label_BFC11980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E80u); -#endif - /* 0xBFC11980: 8C590004 lw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E80u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11984: 24042000 addiu $a0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24042000u, cpu->gpr[4], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC11988: 10990003 beq $a0, $t9, 0xBFC11998 */ - uint32_t psx_brA_BFC11988 = cpu->gpr[4]; uint32_t psx_brB_BFC11988 = cpu->gpr[25]; - psx_taken_BFC11988 = (psx_brA_BFC11988 == psx_brB_BFC11988); - psx_delay_BFC11988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1198C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001E8Cu); -#endif - if (psx_delay_BFC11988) { - psx_delay_BFC11988 = 0; - if (psx_taken_BFC11988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001E98u); - cpu->pc = 0x00001E98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001E90u); - } -label_BFC11990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11990: 03E00008 jr $ra */ - psx_delay_BFC11990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11994: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001E94u); -#endif - if (psx_delay_BFC11990) { - psx_delay_BFC11990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001E98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001E98u); - int psx_delay_BFC119A0 = 0; - int psx_taken_BFC119A0 = 0; - int psx_delay_BFC119B0 = 0; - int psx_taken_BFC119B0 = 0; - int psx_delay_BFC119C0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC119A8u: goto label_BFC119A8; - case 0xBFC119B8u: goto label_BFC119B8; - default: break; - } - } -label_BFC11998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001E98u); -#endif - /* 0xBFC11998: 8C480004 lw $t0, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E98u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1199C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC119A0: 10A80005 beq $a1, $t0, 0xBFC119B8 */ - uint32_t psx_brA_BFC119A0 = cpu->gpr[5]; uint32_t psx_brB_BFC119A0 = cpu->gpr[8]; - psx_taken_BFC119A0 = (psx_brA_BFC119A0 == psx_brB_BFC119A0); - psx_delay_BFC119A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC119A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001EA4u); -#endif - if (psx_delay_BFC119A0) { - psx_delay_BFC119A0 = 0; - if (psx_taken_BFC119A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001EB8u); - goto label_BFC119B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001EA8u); - } -label_BFC119A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EA8u); -#endif - /* 0xBFC119A8: 8C490004 lw $t1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EA8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x8C490004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC119AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC119B0: 14A9FFFD bne $a1, $t1, 0xBFC119A8 */ - uint32_t psx_brA_BFC119B0 = cpu->gpr[5]; uint32_t psx_brB_BFC119B0 = cpu->gpr[9]; - psx_taken_BFC119B0 = (psx_brA_BFC119B0 != psx_brB_BFC119B0); - psx_delay_BFC119B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC119B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001EB4u); -#endif - if (psx_delay_BFC119B0) { - psx_delay_BFC119B0 = 0; - if (psx_taken_BFC119B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001EA8u); - goto label_BFC119A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001EB8u); - } -label_BFC119B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC119B8: AC640004 sw $a0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EB8u); return; } g_debug_last_store_pc = 0x00001EB8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00001EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC119BC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC119C0: 03E00008 jr $ra */ - psx_delay_BFC119C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC119C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001EC4u); -#endif - if (psx_delay_BFC119C0) { - psx_delay_BFC119C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001EC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001EC8u); - int psx_delay_BFC119EC = 0; - int psx_taken_BFC119EC = 0; - int psx_delay_BFC119FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC119F4u: goto label_BFC119F4; - default: break; - } - } -label_BFC119C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC119C8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC119CC: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC119D0: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001ED0u); -#endif - /* 0xBFC119D4: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001ED4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC119D8: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC119DC: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC119E0: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001EE0u); -#endif - /* 0xBFC119E4: 8C580004 lw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EE4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC119E8: 24014000 addiu $at, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x24014000u, cpu->gpr[1], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC119EC: 17010005 bne $t8, $at, 0xBFC11A04 */ - uint32_t psx_brA_BFC119EC = cpu->gpr[24]; uint32_t psx_brB_BFC119EC = cpu->gpr[1]; - psx_taken_BFC119EC = (psx_brA_BFC119EC != psx_brB_BFC119EC); - psx_delay_BFC119EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC119F0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001EF0u); -#endif - if (psx_delay_BFC119EC) { - psx_delay_BFC119EC = 0; - if (psx_taken_BFC119EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F04u); - cpu->pc = 0x00001F04u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001EF4u); - } -label_BFC119F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC119F4: 24192000 addiu $t9, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24192000u, cpu->gpr[25], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC119F8: AC790004 sw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EF8u); return; } g_debug_last_store_pc = 0x00001EF8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC119FC: 03E00008 jr $ra */ - psx_delay_BFC119FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11A00: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F00u); -#endif - if (psx_delay_BFC119FC) { - psx_delay_BFC119FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001F04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001F04u); - int psx_delay_BFC11A08 = 0; -label_BFC11A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11A04: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11A08: 03E00008 jr $ra */ - psx_delay_BFC11A08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11A0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001F0Cu); -#endif - if (psx_delay_BFC11A08) { - psx_delay_BFC11A08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001F10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001F10u); - int psx_delay_BFC11A34 = 0; - int psx_taken_BFC11A34 = 0; - int psx_delay_BFC11A44 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11A3Cu: goto label_BFC11A3C; - case 0xBFC11A44u: goto label_BFC11A44; - default: break; - } - } -label_BFC11A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11A10: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11A14: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11A18: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001F18u); -#endif - /* 0xBFC11A1C: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F1Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11A20: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11A24: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC11A28: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F28u); -#endif - /* 0xBFC11A2C: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F2Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC11A30: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11A34: 13000003 beq $t8, $zero, 0xBFC11A44 */ - uint32_t psx_brA_BFC11A34 = cpu->gpr[24]; uint32_t psx_brB_BFC11A34 = cpu->gpr[0]; - psx_taken_BFC11A34 = (psx_brA_BFC11A34 == psx_brB_BFC11A34); - psx_delay_BFC11A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11A38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001F38u); -#endif - if (psx_delay_BFC11A34) { - psx_delay_BFC11A34 = 0; - if (psx_taken_BFC11A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F44u); - goto label_BFC11A44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F3Cu); - } -label_BFC11A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11A3C: 24192000 addiu $t9, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24192000u, cpu->gpr[25], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC11A40: AC590004 sw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F40u); return; } g_debug_last_store_pc = 0x00001F40u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F40u); -#endif -label_BFC11A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11A44: 03E00008 jr $ra */ - psx_delay_BFC11A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11A48: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F48u); -#endif - if (psx_delay_BFC11A44) { - psx_delay_BFC11A44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001F4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001F4Cu); - int psx_delay_BFC11A70 = 0; - int psx_taken_BFC11A70 = 0; - int psx_delay_BFC11A80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11A78u: goto label_BFC11A78; - case 0xBFC11A80u: goto label_BFC11A80; - default: break; - } - } -label_BFC11A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11A4C: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00001F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11A50: 000478C0 sll $t7, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000478C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11A54: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001F54u); -#endif - /* 0xBFC11A58: 8DCE0120 lw $t6, 288($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F58u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0120u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC11A5C: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11A60: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC11A64: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F64u); -#endif - /* 0xBFC11A68: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F68u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC11A6C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11A70: 13000003 beq $t8, $zero, 0xBFC11A80 */ - uint32_t psx_brA_BFC11A70 = cpu->gpr[24]; uint32_t psx_brB_BFC11A70 = cpu->gpr[0]; - psx_taken_BFC11A70 = (psx_brA_BFC11A70 == psx_brB_BFC11A70); - psx_delay_BFC11A70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11A74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001F74u); -#endif - if (psx_delay_BFC11A70) { - psx_delay_BFC11A70 = 0; - if (psx_taken_BFC11A70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F80u); - goto label_BFC11A80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F78u); - } -label_BFC11A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11A78: 24191000 addiu $t9, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24191000u, cpu->gpr[25], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC11A7C: AC590004 sw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F7Cu); return; } g_debug_last_store_pc = 0x00001F7Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F7Cu); -#endif -label_BFC11A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11A80: 03E00008 jr $ra */ - psx_delay_BFC11A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11A84: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F84u); -#endif - if (psx_delay_BFC11A80) { - psx_delay_BFC11A80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001F88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001F88u); - int psx_delay_BFC11AC0 = 0; - int psx_taken_BFC11AC0 = 0; - int psx_delay_BFC11AD4 = 0; - int psx_taken_BFC11AD4 = 0; - int psx_delay_BFC11AF4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11ACCu: goto label_BFC11ACC; - case 0xBFC11AC8u: goto label_BFC11AC8; - case 0xBFC11ADCu: goto label_BFC11ADC; - default: break; - } - } -label_BFC11A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11A88: 3C0FA000 lui $t7, 0xA000 */ - cpu->gpr[15] = 0xA0000000u; - PGXP_ALU(0x3C0FA000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001F88u); -#endif - /* 0xBFC11A8C: 8DEF0114 lw $t7, 276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F8Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF0114u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11A90: 240100C0 addiu $at, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240100C0u, cpu->gpr[1], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC11A94: 01E1001B divu $t7, $at */ - { uint32_t psx_n = cpu->gpr[15]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Bu, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11A98: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001F98u); -#endif - /* 0xBFC11A9C: 8DCE0110 lw $t6, 272($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F9Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0110u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00001F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC11AA4: 01C01821 addu $v1, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11AA8: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11AAC: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00001FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11AB0: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC11AB4: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x00001FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004004u); -#endif - /* 0xBFC11AB8: 01D91021 addu $v0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D91021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC11ABC: 01C2082B sltu $at, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01C2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11AC0: 10200012 beq $at, $zero, 0xBFC11B0C */ - uint32_t psx_brA_BFC11AC0 = cpu->gpr[1]; uint32_t psx_brB_BFC11AC0 = cpu->gpr[0]; - psx_taken_BFC11AC0 = (psx_brA_BFC11AC0 == psx_brB_BFC11AC0); - psx_delay_BFC11AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001FC4u); -#endif - if (psx_delay_BFC11AC0) { - psx_delay_BFC11AC0 = 0; - if (psx_taken_BFC11AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000200Cu); - cpu->pc = 0x0000200Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001FC8u); - } -label_BFC11AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11AC8: 24041000 addiu $a0, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24041000u, cpu->gpr[4], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00001FC8u); -#endif -label_BFC11ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FCCu); -#endif - /* 0xBFC11ACC: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001FCCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00001FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC11AD4: 14880009 bne $a0, $t0, 0xBFC11AFC */ - uint32_t psx_brA_BFC11AD4 = cpu->gpr[4]; uint32_t psx_brB_BFC11AD4 = cpu->gpr[8]; - psx_taken_BFC11AD4 = (psx_brA_BFC11AD4 != psx_brB_BFC11AD4); - psx_delay_BFC11AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001FD8u); -#endif - if (psx_delay_BFC11AD4) { - psx_delay_BFC11AD4 = 0; - if (psx_taken_BFC11AD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001FFCu); - cpu->pc = 0x00001FFCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001FDCu); - } -label_BFC11ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC11ADC: 3C09A000 lui $t1, 0xA000 */ - cpu->gpr[9] = 0xA0000000u; - PGXP_ALU(0x3C09A000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FE0u); -#endif - /* 0xBFC11AE0: 8D290110 lw $t1, 272($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001FE0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D290110u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00001FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11AE4: 240100C0 addiu $at, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240100C0u, cpu->gpr[1], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Cu); -#endif - /* 0xBFC11AE8: 00691023 subu $v0, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[9]; - PGXP_ALU(0x00691023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00001FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC11AEC: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00001FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11AF0: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00001FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11AF4: 03E00008 jr $ra */ - psx_delay_BFC11AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11AF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00001FF8u); -#endif - if (psx_delay_BFC11AF4) { - psx_delay_BFC11AF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00001FFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00001FFCu); - int psx_delay_BFC11B04 = 0; - int psx_taken_BFC11B04 = 0; - int psx_delay_BFC11B10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11B0Cu: goto label_BFC11B0C; - default: break; - } - } -label_BFC11AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00001FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00001FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00001FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11AFC: 246300C0 addiu $v1, $v1, 192 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (192)); - PGXP_ALU(0x246300C0u, cpu->gpr[3], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x00001FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC11B00: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11B04: 1420FFF1 bne $at, $zero, 0xBFC11ACC */ - uint32_t psx_brA_BFC11B04 = cpu->gpr[1]; uint32_t psx_brB_BFC11B04 = cpu->gpr[0]; - psx_taken_BFC11B04 = (psx_brA_BFC11B04 != psx_brB_BFC11B04); - psx_delay_BFC11B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11B08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002008u); -#endif - if (psx_delay_BFC11B04) { - psx_delay_BFC11B04 = 0; - if (psx_taken_BFC11B04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001FCCu); - cpu->pc = 0x00001FCCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000200Cu); - } -label_BFC11B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000200Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11B0C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11B10: 03E00008 jr $ra */ - psx_delay_BFC11B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11B14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002014u); -#endif - if (psx_delay_BFC11B10) { - psx_delay_BFC11B10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002018(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002018u); - int psx_delay_BFC11B34 = 0; - int psx_delay_BFC11B48 = 0; - int psx_taken_BFC11B48 = 0; - int psx_delay_BFC11B50 = 0; - int psx_taken_BFC11B50 = 0; - int psx_delay_BFC11BA0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11B3Cu: goto label_BFC11B3C; - case 0xBFC11B50u: goto label_BFC11B50; - case 0xBFC11B58u: goto label_BFC11B58; - case 0xBFC11B98u: goto label_BFC11B98; - default: break; - } - } -label_BFC11B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11B18: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11B1C: 3C03A000 lui $v1, 0xA000 */ - cpu->gpr[3] = 0xA0000000u; - PGXP_ALU(0x3C03A000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000201Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11B20: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002020u); return; } g_debug_last_store_pc = 0x00002020u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002020u); -#endif - /* 0xBFC11B24: 8C630110 lw $v1, 272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002024u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630110u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC11B28: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002028u); return; } g_debug_last_store_pc = 0x00002028u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC11B2C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000202Cu); return; } g_debug_last_store_pc = 0x0000202Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x0000202Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC11B30: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002030u); return; } g_debug_last_store_pc = 0x00002030u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11B34: 0C0007E2 jal 0xB0001F88 */ - cpu->gpr[31] = 0x0000203Cu; /* jal link before delay slot */ - psx_delay_BFC11B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC11B38: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002038u); return; } g_debug_last_store_pc = 0x00002038u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002038u); -#endif - if (psx_delay_BFC11B34) { - psx_delay_BFC11B34 = 0; - cpu->gpr[31] = 0x0000203Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001F88u); - cpu->pc = 0x00001F88u; return; - } -label_BFC11B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000203Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000203Cu); -#endif - /* 0xBFC11B3C: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000203Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002040u); -#endif - /* 0xBFC11B40: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002040u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC11B44: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC11B48: 14410003 bne $v0, $at, 0xBFC11B58 */ - uint32_t psx_brA_BFC11B48 = cpu->gpr[2]; uint32_t psx_brB_BFC11B48 = cpu->gpr[1]; - psx_taken_BFC11B48 = (psx_brA_BFC11B48 != psx_brB_BFC11B48); - psx_delay_BFC11B48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC11B4C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000204Cu); -#endif - if (psx_delay_BFC11B48) { - psx_delay_BFC11B48 = 0; - if (psx_taken_BFC11B48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002058u); - goto label_BFC11B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002050u); - } -label_BFC11B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11B50: 10000011 beq $zero, $zero, 0xBFC11B98 */ - uint32_t psx_brA_BFC11B50 = cpu->gpr[0]; uint32_t psx_brB_BFC11B50 = cpu->gpr[0]; - psx_taken_BFC11B50 = (psx_brA_BFC11B50 == psx_brB_BFC11B50); - psx_delay_BFC11B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11B54: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002054u); -#endif - if (psx_delay_BFC11B50) { - psx_delay_BFC11B50 = 0; - if (psx_taken_BFC11B50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002098u); - goto label_BFC11B98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002058u); - } -label_BFC11B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC11B58: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00002058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC11B5C: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000205Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11B60: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x00002060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC11B64: 006E1821 addu $v1, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11B68: 240F4000 addiu $t7, $zero, 16384 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); - PGXP_ALU(0x240F4000u, cpu->gpr[15], _pgx1, 0x00004000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC11B6C: 24181000 addiu $t8, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24181000u, cpu->gpr[24], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x0000206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC11B70: AC6F0000 sw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002070u); return; } g_debug_last_store_pc = 0x00002070u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC11B74: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002074u); return; } g_debug_last_store_pc = 0x00002074u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002074u); -#endif - /* 0xBFC11B78: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002078u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC11B7C: AC65007C sw $a1, 124($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000207Cu); return; } g_debug_last_store_pc = 0x0000207Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC65007Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x0000207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC11B80: AC650080 sw $a1, 128($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002080u); return; } g_debug_last_store_pc = 0x00002080u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650080u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC11B84: AC790088 sw $t9, 136($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002084u); return; } g_debug_last_store_pc = 0x00002084u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790088u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002084u); -#endif - /* 0xBFC11B88: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002088u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC11B8C: 3C01FF00 lui $at, 0xFF00 */ - cpu->gpr[1] = 0xFF000000u; - PGXP_ALU(0x3C01FF00u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000208Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC11B90: 00811025 or $v0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x00811025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC11B94: AC680078 sw $t0, 120($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002094u); return; } g_debug_last_store_pc = 0x00002094u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680078u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002094u); -#endif -label_BFC11B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002098u); -#endif - /* 0xBFC11B98: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002098u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11B9C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x0000209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11BA0: 03E00008 jr $ra */ - psx_delay_BFC11BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11BA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000020A4u); -#endif - if (psx_delay_BFC11BA0) { - psx_delay_BFC11BA0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000020A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000020A8u); - int psx_delay_BFC11BCC = 0; -label_BFC11BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000020A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000020A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11BA8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000020A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC11BAC: 0004C080 sll $t8, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 2u; - PGXP_ALU(0x0004C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000020ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11BB0: 3C0FA000 lui $t7, 0xA000 */ - cpu->gpr[15] = 0xA0000000u; - PGXP_ALU(0x3C0FA000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000020B0u); -#endif - /* 0xBFC11BB4: 8DEF0110 lw $t7, 272($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000020B4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF0110u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000020B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC11BB8: 0304C023 subu $t8, $t8, $a0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[4]; - PGXP_ALU(0x0304C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000020B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC11BBC: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x000020BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC11BC0: 240E1000 addiu $t6, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240E1000u, cpu->gpr[14], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000020C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC11BC4: 01F8C821 addu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000020C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC11BC8: AF2E0000 sw $t6, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000020C8u); return; } g_debug_last_store_pc = 0x000020C8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF2E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000020C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11BCC: 03E00008 jr $ra */ - psx_delay_BFC11BCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11BD0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000020D0u); -#endif - if (psx_delay_BFC11BCC) { - psx_delay_BFC11BCC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000020D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000020D4u); - int psx_delay_BFC11BFC = 0; - int psx_delay_BFC11C0C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11C04u: goto label_BFC11C04; - default: break; - } - } -label_BFC11BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000020D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000020D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC11BD4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000020D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11BD8: 3063FFFF andi $v1, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000020D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC11BDC: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000020DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC11BE0: 3C0EA000 lui $t6, 0xA000 */ - cpu->gpr[14] = 0xA0000000u; - PGXP_ALU(0x3C0EA000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000020E0u); -#endif - /* 0xBFC11BE4: 8DCE0110 lw $t6, 272($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000020E4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE0110u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000020E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11BE8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000020E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC11BEC: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000020ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000020F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11BF0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000020F0u); return; } g_debug_last_store_pc = 0x000020F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000020F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC11BF4: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x000020F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11BF8: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x000020F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11BFC: 0C000194 jal 0xB0000650 */ - cpu->gpr[31] = 0x00002104u; /* jal link before delay slot */ - psx_delay_BFC11BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC11C00: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002100u); -#endif - if (psx_delay_BFC11BFC) { - psx_delay_BFC11BFC = 0; - cpu->gpr[31] = 0x00002104u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00000650u); - cpu->pc = 0x00000650u; return; - } -label_BFC11C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002104u); -#endif - /* 0xBFC11C04: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002104u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11C08: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11C0C: 03E00008 jr $ra */ - psx_delay_BFC11C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002110u); -#endif - if (psx_delay_BFC11C0C) { - psx_delay_BFC11C0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002114(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002114u); - int psx_delay_BFC11C14 = 0; - int psx_taken_BFC11C14 = 0; - int psx_delay_BFC11C1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11C1Cu: goto label_BFC11C1C; - default: break; - } - } -label_BFC11C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11C14: 14800003 bne $a0, $zero, 0xBFC11C24 */ - uint32_t psx_brA_BFC11C14 = cpu->gpr[4]; uint32_t psx_brB_BFC11C14 = cpu->gpr[0]; - psx_taken_BFC11C14 = (psx_brA_BFC11C14 != psx_brB_BFC11C14); - psx_delay_BFC11C14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002118u); -#endif - if (psx_delay_BFC11C14) { - psx_delay_BFC11C14 = 0; - if (psx_taken_BFC11C14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002124u); - cpu->pc = 0x00002124u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000211Cu); - } -label_BFC11C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000211Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11C1C: 03E00008 jr $ra */ - psx_delay_BFC11C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11C20: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002120u); -#endif - if (psx_delay_BFC11C1C) { - psx_delay_BFC11C1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002124(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002124u); - int psx_delay_BFC11C24 = 0; - int psx_taken_BFC11C24 = 0; - int psx_delay_BFC11C3C = 0; - int psx_taken_BFC11C3C = 0; - int psx_delay_BFC11C48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11C2Cu: goto label_BFC11C2C; - case 0xBFC11C44u: goto label_BFC11C44; - default: break; - } - } -label_BFC11C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11C24: 18C00007 blez $a2, 0xBFC11C44 */ - uint32_t psx_brA_BFC11C24 = cpu->gpr[6]; - psx_taken_BFC11C24 = ((int32_t)psx_brA_BFC11C24 <= 0); - psx_delay_BFC11C24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC11C28: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002128u); -#endif - if (psx_delay_BFC11C24) { - psx_delay_BFC11C24 = 0; - if (psx_taken_BFC11C24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002144u); - goto label_BFC11C44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000212Cu); - } -label_BFC11C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000212Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000212Cu); -#endif - /* 0xBFC11C2C: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11C30: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11C34: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11C38: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11C3C: 1CC0FFFB bgtz $a2, 0xBFC11C2C */ - uint32_t psx_brA_BFC11C3C = cpu->gpr[6]; - psx_taken_BFC11C3C = ((int32_t)psx_brA_BFC11C3C > 0); - psx_delay_BFC11C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC11C40: A0AEFFFF sb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002140u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA0AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002140u); -#endif - if (psx_delay_BFC11C3C) { - psx_delay_BFC11C3C = 0; - if (psx_taken_BFC11C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000212Cu); - goto label_BFC11C2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002144u); - } -label_BFC11C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC11C44: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11C48: 03E00008 jr $ra */ - psx_delay_BFC11C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000214Cu); -#endif - if (psx_delay_BFC11C48) { - psx_delay_BFC11C48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002150(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002150u); - int psx_delay_BFC11C50 = 0; - int psx_taken_BFC11C50 = 0; - int psx_delay_BFC11C58 = 0; - int psx_taken_BFC11C58 = 0; - int psx_delay_BFC11C60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11C58u: goto label_BFC11C58; - case 0xBFC11C60u: goto label_BFC11C60; - default: break; - } - } -label_BFC11C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11C50: 10800003 beq $a0, $zero, 0xBFC11C60 */ - uint32_t psx_brA_BFC11C50 = cpu->gpr[4]; uint32_t psx_brB_BFC11C50 = cpu->gpr[0]; - psx_taken_BFC11C50 = (psx_brA_BFC11C50 == psx_brB_BFC11C50); - psx_delay_BFC11C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002154u); -#endif - if (psx_delay_BFC11C50) { - psx_delay_BFC11C50 = 0; - if (psx_taken_BFC11C50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002160u); - goto label_BFC11C60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002158u); - } -label_BFC11C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11C58: 1CA00003 bgtz $a1, 0xBFC11C68 */ - uint32_t psx_brA_BFC11C58 = cpu->gpr[5]; - psx_taken_BFC11C58 = ((int32_t)psx_brA_BFC11C58 > 0); - psx_delay_BFC11C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000215Cu); -#endif - if (psx_delay_BFC11C58) { - psx_delay_BFC11C58 = 0; - if (psx_taken_BFC11C58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002168u); - cpu->pc = 0x00002168u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002160u); - } -label_BFC11C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11C60: 03E00008 jr $ra */ - psx_delay_BFC11C60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11C64: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002164u); -#endif - if (psx_delay_BFC11C60) { - psx_delay_BFC11C60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002168(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002168u); - int psx_delay_BFC11C68 = 0; - int psx_taken_BFC11C68 = 0; - int psx_delay_BFC11C78 = 0; - int psx_taken_BFC11C78 = 0; - int psx_delay_BFC11C84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11C70u: goto label_BFC11C70; - case 0xBFC11C80u: goto label_BFC11C80; - default: break; - } - } -label_BFC11C68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11C68: 18A00005 blez $a1, 0xBFC11C80 */ - uint32_t psx_brA_BFC11C68 = cpu->gpr[5]; - psx_taken_BFC11C68 = ((int32_t)psx_brA_BFC11C68 <= 0); - psx_delay_BFC11C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC11C6C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000216Cu); -#endif - if (psx_delay_BFC11C68) { - psx_delay_BFC11C68 = 0; - if (psx_taken_BFC11C68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002180u); - goto label_BFC11C80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002170u); - } -label_BFC11C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11C70: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11C74: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002174u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC11C78: 1CA0FFFD bgtz $a1, 0xBFC11C70 */ - uint32_t psx_brA_BFC11C78 = cpu->gpr[5]; - psx_taken_BFC11C78 = ((int32_t)psx_brA_BFC11C78 > 0); - psx_delay_BFC11C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11C7C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000217Cu); -#endif - if (psx_delay_BFC11C78) { - psx_delay_BFC11C78 = 0; - if (psx_taken_BFC11C78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002170u); - goto label_BFC11C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002180u); - } -label_BFC11C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC11C80: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11C84: 03E00008 jr $ra */ - psx_delay_BFC11C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11C88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002188u); -#endif - if (psx_delay_BFC11C84) { - psx_delay_BFC11C84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000218C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000218Cu); - int psx_delay_BFC11CB0 = 0; - int psx_taken_BFC11CB0 = 0; - int psx_delay_BFC11CC0 = 0; - int psx_delay_BFC11CE8 = 0; - int psx_taken_BFC11CE8 = 0; - int psx_delay_BFC11CF8 = 0; - int psx_delay_BFC11D20 = 0; - int psx_taken_BFC11D20 = 0; - int psx_delay_BFC11D30 = 0; - int psx_delay_BFC11D58 = 0; - int psx_taken_BFC11D58 = 0; - int psx_delay_BFC11D68 = 0; - int psx_delay_BFC11D90 = 0; - int psx_taken_BFC11D90 = 0; - int psx_delay_BFC11DA0 = 0; - int psx_delay_BFC11DC8 = 0; - int psx_taken_BFC11DC8 = 0; - int psx_delay_BFC11DD8 = 0; - int psx_delay_BFC11E00 = 0; - int psx_taken_BFC11E00 = 0; - int psx_delay_BFC11E10 = 0; - int psx_delay_BFC11E38 = 0; - int psx_taken_BFC11E38 = 0; - int psx_delay_BFC11E48 = 0; - int psx_delay_BFC11E70 = 0; - int psx_taken_BFC11E70 = 0; - int psx_delay_BFC11E80 = 0; - int psx_delay_BFC11EA8 = 0; - int psx_taken_BFC11EA8 = 0; - int psx_delay_BFC11EB8 = 0; - int psx_delay_BFC11EE0 = 0; - int psx_taken_BFC11EE0 = 0; - int psx_delay_BFC11EF0 = 0; - int psx_delay_BFC11F20 = 0; - int psx_taken_BFC11F20 = 0; - int psx_delay_BFC11F38 = 0; - int psx_taken_BFC11F38 = 0; - int psx_delay_BFC11F50 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11CB8u: goto label_BFC11CB8; - case 0xBFC11CC8u: goto label_BFC11CC8; - case 0xBFC11CD4u: goto label_BFC11CD4; - case 0xBFC11CF0u: goto label_BFC11CF0; - case 0xBFC11D00u: goto label_BFC11D00; - case 0xBFC11D0Cu: goto label_BFC11D0C; - case 0xBFC11D28u: goto label_BFC11D28; - case 0xBFC11D38u: goto label_BFC11D38; - case 0xBFC11D44u: goto label_BFC11D44; - case 0xBFC11D60u: goto label_BFC11D60; - case 0xBFC11D70u: goto label_BFC11D70; - case 0xBFC11D7Cu: goto label_BFC11D7C; - case 0xBFC11D98u: goto label_BFC11D98; - case 0xBFC11DA8u: goto label_BFC11DA8; - case 0xBFC11DB4u: goto label_BFC11DB4; - case 0xBFC11DD0u: goto label_BFC11DD0; - case 0xBFC11DE0u: goto label_BFC11DE0; - case 0xBFC11DECu: goto label_BFC11DEC; - case 0xBFC11E08u: goto label_BFC11E08; - case 0xBFC11E18u: goto label_BFC11E18; - case 0xBFC11E24u: goto label_BFC11E24; - case 0xBFC11E40u: goto label_BFC11E40; - case 0xBFC11E50u: goto label_BFC11E50; - case 0xBFC11E5Cu: goto label_BFC11E5C; - case 0xBFC11E78u: goto label_BFC11E78; - case 0xBFC11E88u: goto label_BFC11E88; - case 0xBFC11E94u: goto label_BFC11E94; - case 0xBFC11EB0u: goto label_BFC11EB0; - case 0xBFC11EC0u: goto label_BFC11EC0; - case 0xBFC11ECCu: goto label_BFC11ECC; - case 0xBFC11EE8u: goto label_BFC11EE8; - case 0xBFC11EF8u: goto label_BFC11EF8; - case 0xBFC11F04u: goto label_BFC11F04; - case 0xBFC11F18u: goto label_BFC11F18; - case 0xBFC11F28u: goto label_BFC11F28; - case 0xBFC11F34u: goto label_BFC11F34; - case 0xBFC11F40u: goto label_BFC11F40; - default: break; - } - } -label_BFC11C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000218Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11C8C: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002190u); -#endif - /* 0xBFC11C90: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002190u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11C94: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11C98: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002198u); return; } g_debug_last_store_pc = 0x00002198u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002198u); -#endif - /* 0xBFC11C9C: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000219Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021A0u); -#endif - /* 0xBFC11CA0: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021A0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000021A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11CA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000021A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11CA8: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000021A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11CAC: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x000021ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11CB0: 13200008 beq $t9, $zero, 0xBFC11CD4 */ - uint32_t psx_brA_BFC11CB0 = cpu->gpr[25]; uint32_t psx_brB_BFC11CB0 = cpu->gpr[0]; - psx_taken_BFC11CB0 = (psx_brA_BFC11CB0 == psx_brB_BFC11CB0); - psx_delay_BFC11CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11CB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000021B4u); -#endif - if (psx_delay_BFC11CB0) { - psx_delay_BFC11CB0 = 0; - if (psx_taken_BFC11CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000021D4u); - goto label_BFC11CD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000021B8u); - } -label_BFC11CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000021B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000021B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11CB8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000021B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11CBC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x000021BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11CC0: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000021C8u; /* jal link before delay slot */ - psx_delay_BFC11CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11CC4: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000021C4u); -#endif - if (psx_delay_BFC11CC0) { - psx_delay_BFC11CC0 = 0; - cpu->gpr[31] = 0x000021C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000021C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000021C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11CC8: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000021C8u); -#endif - /* 0xBFC11CCC: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021CCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000021CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11CD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000021D0u); -#endif -label_BFC11CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000021D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000021D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021D4u); -#endif - /* 0xBFC11CD4: 8CC80004 lw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021D4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x8CC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000021D4u); -#endif - /* 0xBFC11CD8: 8CC90000 lw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021D8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x8CC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000021D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11CDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000021DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC11CE0: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000021E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC11CE4: 314B0200 andi $t3, $t2, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x200u; - PGXP_ALU(0x314B0200u, cpu->gpr[11], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x000021E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC11CE8: 11600008 beq $t3, $zero, 0xBFC11D0C */ - uint32_t psx_brA_BFC11CE8 = cpu->gpr[11]; uint32_t psx_brB_BFC11CE8 = cpu->gpr[0]; - psx_taken_BFC11CE8 = (psx_brA_BFC11CE8 == psx_brB_BFC11CE8); - psx_delay_BFC11CE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11CEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000021ECu); -#endif - if (psx_delay_BFC11CE8) { - psx_delay_BFC11CE8 = 0; - if (psx_taken_BFC11CE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000220Cu); - goto label_BFC11D0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000021F0u); - } -label_BFC11CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000021F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000021F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000021F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11CF0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000021F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11CF4: 34840009 ori $a0, $a0, 0x9 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x9u; - PGXP_ALU(0x34840009u, cpu->gpr[4], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0x000021F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11CF8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002200u; /* jal link before delay slot */ - psx_delay_BFC11CF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11CFC: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000021FCu); -#endif - if (psx_delay_BFC11CF8) { - psx_delay_BFC11CF8 = 0; - cpu->gpr[31] = 0x00002200u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11D00: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002200u); -#endif - /* 0xBFC11D04: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002204u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002208u); -#endif -label_BFC11D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000220Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000220Cu); -#endif - /* 0xBFC11D0C: 8CCC0004 lw $t4, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000220Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002210u); -#endif - /* 0xBFC11D10: 8CCD0000 lw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002210u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x8CCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00002210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC11D18: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC11D1C: 31CF0002 andi $t7, $t6, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u; - PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11D20: 11E00008 beq $t7, $zero, 0xBFC11D44 */ - uint32_t psx_brA_BFC11D20 = cpu->gpr[15]; uint32_t psx_brB_BFC11D20 = cpu->gpr[0]; - psx_taken_BFC11D20 = (psx_brA_BFC11D20 == psx_brB_BFC11D20); - psx_delay_BFC11D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002224u); -#endif - if (psx_delay_BFC11D20) { - psx_delay_BFC11D20 = 0; - if (psx_taken_BFC11D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002244u); - goto label_BFC11D44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002228u); - } -label_BFC11D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D28: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D2C: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000222Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11D30: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002238u; /* jal link before delay slot */ - psx_delay_BFC11D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11D34: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002234u); -#endif - if (psx_delay_BFC11D30) { - psx_delay_BFC11D30 = 0; - cpu->gpr[31] = 0x00002238u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11D38: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002238u); -#endif - /* 0xBFC11D3C: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000223Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x0000223Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002240u); -#endif -label_BFC11D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002244u); -#endif - /* 0xBFC11D44: 8CD80004 lw $t8, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002244u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002244u); -#endif - /* 0xBFC11D48: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002248u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000224Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC11D50: 03194024 and $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25]; - PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC11D54: 31090400 andi $t1, $t0, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x400u; - PGXP_ALU(0x31090400u, cpu->gpr[9], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x00002254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC11D58: 11200008 beq $t1, $zero, 0xBFC11D7C */ - uint32_t psx_brA_BFC11D58 = cpu->gpr[9]; uint32_t psx_brB_BFC11D58 = cpu->gpr[0]; - psx_taken_BFC11D58 = (psx_brA_BFC11D58 == psx_brB_BFC11D58); - psx_delay_BFC11D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000225Cu); -#endif - if (psx_delay_BFC11D58) { - psx_delay_BFC11D58 = 0; - if (psx_taken_BFC11D58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000227Cu); - goto label_BFC11D7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002260u); - } -label_BFC11D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D60: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D64: 3484000A ori $a0, $a0, 0xA */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xAu; - PGXP_ALU(0x3484000Au, cpu->gpr[4], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00002264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11D68: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002270u; /* jal link before delay slot */ - psx_delay_BFC11D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11D6C: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x0000226Cu); -#endif - if (psx_delay_BFC11D68) { - psx_delay_BFC11D68 = 0; - cpu->gpr[31] = 0x00002270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11D70: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002270u); -#endif - /* 0xBFC11D74: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002274u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002278u); -#endif -label_BFC11D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000227Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000227Cu); -#endif - /* 0xBFC11D7C: 8CCA0004 lw $t2, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000227Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40u); } - PGXP_LOAD(0x8CCA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002280u); -#endif - /* 0xBFC11D80: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002280u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC11D88: 014B6024 and $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC11D8C: 318D0100 andi $t5, $t4, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x100u; - PGXP_ALU(0x318D0100u, cpu->gpr[13], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x0000228Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC11D90: 11A00008 beq $t5, $zero, 0xBFC11DB4 */ - uint32_t psx_brA_BFC11D90 = cpu->gpr[13]; uint32_t psx_brB_BFC11D90 = cpu->gpr[0]; - psx_taken_BFC11D90 = (psx_brA_BFC11D90 == psx_brB_BFC11D90); - psx_delay_BFC11D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11D94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002294u); -#endif - if (psx_delay_BFC11D90) { - psx_delay_BFC11D90 = 0; - if (psx_taken_BFC11D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000022B4u); - goto label_BFC11DB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002298u); - } -label_BFC11D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D98: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11D9C: 3484000B ori $a0, $a0, 0xB */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xBu; - PGXP_ALU(0x3484000Bu, cpu->gpr[4], _pgx1, 0x000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x0000229Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11DA0: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000022A8u; /* jal link before delay slot */ - psx_delay_BFC11DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11DA4: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000022A4u); -#endif - if (psx_delay_BFC11DA0) { - psx_delay_BFC11DA0 = 0; - cpu->gpr[31] = 0x000022A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000022A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000022A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11DA8: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000022A8u); -#endif - /* 0xBFC11DAC: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022ACu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000022ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11DB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000022B0u); -#endif -label_BFC11DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000022B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000022B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022B4u); -#endif - /* 0xBFC11DB4: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000022B4u); -#endif - /* 0xBFC11DB8: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022B8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000022B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11DBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000022BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11DC0: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000022C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11DC4: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000022C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11DC8: 13200008 beq $t9, $zero, 0xBFC11DEC */ - uint32_t psx_brA_BFC11DC8 = cpu->gpr[25]; uint32_t psx_brB_BFC11DC8 = cpu->gpr[0]; - psx_taken_BFC11DC8 = (psx_brA_BFC11DC8 == psx_brB_BFC11DC8); - psx_delay_BFC11DC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11DCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000022CCu); -#endif - if (psx_delay_BFC11DC8) { - psx_delay_BFC11DC8 = 0; - if (psx_taken_BFC11DC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000022ECu); - goto label_BFC11DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000022D0u); - } -label_BFC11DD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000022D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000022D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11DD0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000022D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11DD4: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000022D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11DD8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000022E0u; /* jal link before delay slot */ - psx_delay_BFC11DD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11DDC: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000022DCu); -#endif - if (psx_delay_BFC11DD8) { - psx_delay_BFC11DD8 = 0; - cpu->gpr[31] = 0x000022E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11DE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000022E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000022E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11DE0: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000022E0u); -#endif - /* 0xBFC11DE4: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022E4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000022E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000022E8u); -#endif -label_BFC11DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000022ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000022ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022ECu); -#endif - /* 0xBFC11DEC: 8CC80004 lw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022ECu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x8CC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000022ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000022F0u); -#endif - /* 0xBFC11DF0: 8CC90000 lw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000022F0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x8CC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000022F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11DF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000022F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC11DF8: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000022F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC11DFC: 314B0010 andi $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x10u; - PGXP_ALU(0x314B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000022FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC11E00: 11600008 beq $t3, $zero, 0xBFC11E24 */ - uint32_t psx_brA_BFC11E00 = cpu->gpr[11]; uint32_t psx_brB_BFC11E00 = cpu->gpr[0]; - psx_taken_BFC11E00 = (psx_brA_BFC11E00 == psx_brB_BFC11E00); - psx_delay_BFC11E00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002304u); -#endif - if (psx_delay_BFC11E00) { - psx_delay_BFC11E00 = 0; - if (psx_taken_BFC11E00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002324u); - goto label_BFC11E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002308u); - } -label_BFC11E08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E08: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E0C: 34840005 ori $a0, $a0, 0x5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x5u; - PGXP_ALU(0x34840005u, cpu->gpr[4], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x0000230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11E10: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002318u; /* jal link before delay slot */ - psx_delay_BFC11E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11E14: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002314u); -#endif - if (psx_delay_BFC11E10) { - psx_delay_BFC11E10 = 0; - cpu->gpr[31] = 0x00002318u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11E18: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002318u); -#endif - /* 0xBFC11E1C: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000231Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x0000231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002320u); -#endif -label_BFC11E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002324u); -#endif - /* 0xBFC11E24: 8CCC0004 lw $t4, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002324u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00002324u); -#endif - /* 0xBFC11E28: 8CCD0000 lw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002328u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x8CCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00002328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000232Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC11E30: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC11E34: 31CF0020 andi $t7, $t6, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u; - PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x00002334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11E38: 11E00008 beq $t7, $zero, 0xBFC11E5C */ - uint32_t psx_brA_BFC11E38 = cpu->gpr[15]; uint32_t psx_brB_BFC11E38 = cpu->gpr[0]; - psx_taken_BFC11E38 = (psx_brA_BFC11E38 == psx_brB_BFC11E38); - psx_delay_BFC11E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000233Cu); -#endif - if (psx_delay_BFC11E38) { - psx_delay_BFC11E38 = 0; - if (psx_taken_BFC11E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000235Cu); - goto label_BFC11E5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002340u); - } -label_BFC11E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E40: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E44: 34840006 ori $a0, $a0, 0x6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6u; - PGXP_ALU(0x34840006u, cpu->gpr[4], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x00002344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11E48: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002350u; /* jal link before delay slot */ - psx_delay_BFC11E48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11E4C: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x0000234Cu); -#endif - if (psx_delay_BFC11E48) { - psx_delay_BFC11E48 = 0; - cpu->gpr[31] = 0x00002350u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11E50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11E50: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002350u); -#endif - /* 0xBFC11E54: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002354u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002358u); -#endif -label_BFC11E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000235Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000235Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000235Cu); -#endif - /* 0xBFC11E5C: 8CD80004 lw $t8, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000235Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000235Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002360u); -#endif - /* 0xBFC11E60: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002360u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC11E68: 03194024 and $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25]; - PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC11E6C: 31090040 andi $t1, $t0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x40u; - PGXP_ALU(0x31090040u, cpu->gpr[9], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x0000236Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC11E70: 11200008 beq $t1, $zero, 0xBFC11E94 */ - uint32_t psx_brA_BFC11E70 = cpu->gpr[9]; uint32_t psx_brB_BFC11E70 = cpu->gpr[0]; - psx_taken_BFC11E70 = (psx_brA_BFC11E70 == psx_brB_BFC11E70); - psx_delay_BFC11E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002374u); -#endif - if (psx_delay_BFC11E70) { - psx_delay_BFC11E70 = 0; - if (psx_taken_BFC11E70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002394u); - goto label_BFC11E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002378u); - } -label_BFC11E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E78: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11E7C: 34840006 ori $a0, $a0, 0x6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6u; - PGXP_ALU(0x34840006u, cpu->gpr[4], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x0000237Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11E80: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002388u; /* jal link before delay slot */ - psx_delay_BFC11E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11E84: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002384u); -#endif - if (psx_delay_BFC11E80) { - psx_delay_BFC11E80 = 0; - cpu->gpr[31] = 0x00002388u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11E88: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002388u); -#endif - /* 0xBFC11E8C: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000238Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x0000238Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002390u); -#endif -label_BFC11E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002394u); -#endif - /* 0xBFC11E94: 8CCA0004 lw $t2, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002394u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40u); } - PGXP_LOAD(0x8CCA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002394u); -#endif - /* 0xBFC11E98: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002398u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11E9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000239Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC11EA0: 014B6024 and $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000023A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC11EA4: 318D0080 andi $t5, $t4, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x80u; - PGXP_ALU(0x318D0080u, cpu->gpr[13], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000023A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC11EA8: 11A00008 beq $t5, $zero, 0xBFC11ECC */ - uint32_t psx_brA_BFC11EA8 = cpu->gpr[13]; uint32_t psx_brB_BFC11EA8 = cpu->gpr[0]; - psx_taken_BFC11EA8 = (psx_brA_BFC11EA8 == psx_brB_BFC11EA8); - psx_delay_BFC11EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11EAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000023ACu); -#endif - if (psx_delay_BFC11EA8) { - psx_delay_BFC11EA8 = 0; - if (psx_taken_BFC11EA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000023CCu); - goto label_BFC11ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000023B0u); - } -label_BFC11EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000023B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000023B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11EB0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000023B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11EB4: 34840008 ori $a0, $a0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x8u; - PGXP_ALU(0x34840008u, cpu->gpr[4], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x000023B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11EB8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000023C0u; /* jal link before delay slot */ - psx_delay_BFC11EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11EBC: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000023BCu); -#endif - if (psx_delay_BFC11EB8) { - psx_delay_BFC11EB8 = 0; - cpu->gpr[31] = 0x000023C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000023C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000023C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11EC0: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000023C0u); -#endif - /* 0xBFC11EC4: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023C4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000023C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11EC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000023C8u); -#endif -label_BFC11ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000023CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000023CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023CCu); -#endif - /* 0xBFC11ECC: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000023CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023D0u); -#endif - /* 0xBFC11ED0: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023D0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000023D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11ED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000023D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11ED8: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000023D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11EDC: 33190008 andi $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u; - PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x000023DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11EE0: 13200008 beq $t9, $zero, 0xBFC11F04 */ - uint32_t psx_brA_BFC11EE0 = cpu->gpr[25]; uint32_t psx_brB_BFC11EE0 = cpu->gpr[0]; - psx_taken_BFC11EE0 = (psx_brA_BFC11EE0 == psx_brB_BFC11EE0); - psx_delay_BFC11EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11EE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000023E4u); -#endif - if (psx_delay_BFC11EE0) { - psx_delay_BFC11EE0 = 0; - if (psx_taken_BFC11EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002404u); - goto label_BFC11F04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000023E8u); - } -label_BFC11EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000023E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000023E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11EE8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000023E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11EEC: 34840004 ori $a0, $a0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x4u; - PGXP_ALU(0x34840004u, cpu->gpr[4], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x000023ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11EF0: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000023F8u; /* jal link before delay slot */ - psx_delay_BFC11EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11EF4: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000023F4u); -#endif - if (psx_delay_BFC11EF0) { - psx_delay_BFC11EF0 = 0; - cpu->gpr[31] = 0x000023F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000023F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000023F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000023F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11EF8: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000023F8u); -#endif - /* 0xBFC11EFC: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023FCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000023FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002400u); -#endif -label_BFC11F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11F04: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC11F08: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11F0C: 24638610 addiu $v1, $v1, -31216 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-31216)); - PGXP_ALU(0x24638610u, cpu->gpr[3], _pgx1, 0xFFFF8610u); } -#ifdef PSX_COSIM - cosim_instr(0x0000240Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11F10: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11F14: 2405000B addiu $a1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2405000Bu, cpu->gpr[5], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00002414u); -#endif -label_BFC11F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002418u); -#endif - /* 0xBFC11F18: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002418u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000241Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC11F20: 11000004 beq $t0, $zero, 0xBFC11F34 */ - uint32_t psx_brA_BFC11F20 = cpu->gpr[8]; uint32_t psx_brB_BFC11F20 = cpu->gpr[0]; - psx_taken_BFC11F20 = (psx_brA_BFC11F20 == psx_brB_BFC11F20); - psx_delay_BFC11F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002424u); -#endif - if (psx_delay_BFC11F20) { - psx_delay_BFC11F20 = 0; - if (psx_taken_BFC11F20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002434u); - goto label_BFC11F34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002428u); - } -label_BFC11F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC11F28: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC11F2C: 00495004 sllv $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] << (cpu->gpr[2] & 0x1Fu); - PGXP_ALU(0x00495004u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000242Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC11F30: 008A2025 or $a0, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[4] | cpu->gpr[10]; - PGXP_ALU(0x008A2025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002430u); -#endif -label_BFC11F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC11F34: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC11F38: 1445FFF7 bne $v0, $a1, 0xBFC11F18 */ - uint32_t psx_brA_BFC11F38 = cpu->gpr[2]; uint32_t psx_brB_BFC11F38 = cpu->gpr[5]; - psx_taken_BFC11F38 = (psx_brA_BFC11F38 != psx_brB_BFC11F38); - psx_delay_BFC11F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC11F3C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x0000243Cu); -#endif - if (psx_delay_BFC11F38) { - psx_delay_BFC11F38 = 0; - if (psx_taken_BFC11F38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002418u); - goto label_BFC11F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002440u); - } -label_BFC11F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC11F40: 00805827 nor $t3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]); - PGXP_ALU(0x00805827u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC11F44: ACCB0000 sw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002444u); return; } g_debug_last_store_pc = 0x00002444u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002444u); -#endif - /* 0xBFC11F48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002448u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11F4C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000244Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC11F50: 03E00008 jr $ra */ - psx_delay_BFC11F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC11F54: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002454u); -#endif - if (psx_delay_BFC11F50) { - psx_delay_BFC11F50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002458(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002458u); - int psx_delay_BFC11F7C = 0; - int psx_taken_BFC11F7C = 0; - int psx_delay_BFC11F8C = 0; - int psx_delay_BFC11FB4 = 0; - int psx_taken_BFC11FB4 = 0; - int psx_delay_BFC11FC4 = 0; - int psx_delay_BFC11FEC = 0; - int psx_taken_BFC11FEC = 0; - int psx_delay_BFC11FFC = 0; - int psx_delay_BFC12024 = 0; - int psx_taken_BFC12024 = 0; - int psx_delay_BFC12034 = 0; - int psx_delay_BFC1205C = 0; - int psx_taken_BFC1205C = 0; - int psx_delay_BFC1206C = 0; - int psx_delay_BFC12094 = 0; - int psx_taken_BFC12094 = 0; - int psx_delay_BFC120A4 = 0; - int psx_delay_BFC120CC = 0; - int psx_taken_BFC120CC = 0; - int psx_delay_BFC120DC = 0; - int psx_delay_BFC12104 = 0; - int psx_taken_BFC12104 = 0; - int psx_delay_BFC12114 = 0; - int psx_delay_BFC1213C = 0; - int psx_taken_BFC1213C = 0; - int psx_delay_BFC1214C = 0; - int psx_delay_BFC12174 = 0; - int psx_taken_BFC12174 = 0; - int psx_delay_BFC12184 = 0; - int psx_delay_BFC121AC = 0; - int psx_taken_BFC121AC = 0; - int psx_delay_BFC121BC = 0; - int psx_delay_BFC121EC = 0; - int psx_taken_BFC121EC = 0; - int psx_delay_BFC12204 = 0; - int psx_taken_BFC12204 = 0; - int psx_delay_BFC1221C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC11F84u: goto label_BFC11F84; - case 0xBFC11F94u: goto label_BFC11F94; - case 0xBFC11FA0u: goto label_BFC11FA0; - case 0xBFC11FBCu: goto label_BFC11FBC; - case 0xBFC11FCCu: goto label_BFC11FCC; - case 0xBFC11FD8u: goto label_BFC11FD8; - case 0xBFC11FF4u: goto label_BFC11FF4; - case 0xBFC12004u: goto label_BFC12004; - case 0xBFC12010u: goto label_BFC12010; - case 0xBFC1202Cu: goto label_BFC1202C; - case 0xBFC1203Cu: goto label_BFC1203C; - case 0xBFC12048u: goto label_BFC12048; - case 0xBFC12064u: goto label_BFC12064; - case 0xBFC12074u: goto label_BFC12074; - case 0xBFC12080u: goto label_BFC12080; - case 0xBFC1209Cu: goto label_BFC1209C; - case 0xBFC120ACu: goto label_BFC120AC; - case 0xBFC120B8u: goto label_BFC120B8; - case 0xBFC120D4u: goto label_BFC120D4; - case 0xBFC120E4u: goto label_BFC120E4; - case 0xBFC120F0u: goto label_BFC120F0; - case 0xBFC1210Cu: goto label_BFC1210C; - case 0xBFC1211Cu: goto label_BFC1211C; - case 0xBFC12128u: goto label_BFC12128; - case 0xBFC12144u: goto label_BFC12144; - case 0xBFC12154u: goto label_BFC12154; - case 0xBFC12160u: goto label_BFC12160; - case 0xBFC1217Cu: goto label_BFC1217C; - case 0xBFC1218Cu: goto label_BFC1218C; - case 0xBFC12198u: goto label_BFC12198; - case 0xBFC121B4u: goto label_BFC121B4; - case 0xBFC121C4u: goto label_BFC121C4; - case 0xBFC121D0u: goto label_BFC121D0; - case 0xBFC121E4u: goto label_BFC121E4; - case 0xBFC121F4u: goto label_BFC121F4; - case 0xBFC12200u: goto label_BFC12200; - case 0xBFC1220Cu: goto label_BFC1220C; - default: break; - } - } -label_BFC11F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11F58: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002458u); -#endif - /* 0xBFC11F5C: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000245Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x0000245Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC11F60: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC11F64: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002464u); return; } g_debug_last_store_pc = 0x00002464u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002464u); -#endif - /* 0xBFC11F68: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002468u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002468u); -#endif - /* 0xBFC11F6C: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000246Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000246Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC11F74: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC11F78: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00002478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC11F7C: 13200008 beq $t9, $zero, 0xBFC11FA0 */ - uint32_t psx_brA_BFC11F7C = cpu->gpr[25]; uint32_t psx_brB_BFC11F7C = cpu->gpr[0]; - psx_taken_BFC11F7C = (psx_brA_BFC11F7C == psx_brB_BFC11F7C); - psx_delay_BFC11F7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002480u); -#endif - if (psx_delay_BFC11F7C) { - psx_delay_BFC11F7C = 0; - if (psx_taken_BFC11F7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000024A0u); - goto label_BFC11FA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002484u); - } -label_BFC11F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11F84: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11F88: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x00002488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11F8C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002494u; /* jal link before delay slot */ - psx_delay_BFC11F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11F90: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002490u); -#endif - if (psx_delay_BFC11F8C) { - psx_delay_BFC11F8C = 0; - cpu->gpr[31] = 0x00002494u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11F94: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002494u); -#endif - /* 0xBFC11F98: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002498u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11F9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000249Cu); -#endif -label_BFC11FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000024A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000024A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024A0u); -#endif - /* 0xBFC11FA0: 8CC80004 lw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000024A0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x8CC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000024A0u); -#endif - /* 0xBFC11FA4: 8CC90000 lw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000024A4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x8CC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000024A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11FA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000024A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC11FAC: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000024ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC11FB0: 314B0200 andi $t3, $t2, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x200u; - PGXP_ALU(0x314B0200u, cpu->gpr[11], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x000024B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC11FB4: 11600008 beq $t3, $zero, 0xBFC11FD8 */ - uint32_t psx_brA_BFC11FB4 = cpu->gpr[11]; uint32_t psx_brB_BFC11FB4 = cpu->gpr[0]; - psx_taken_BFC11FB4 = (psx_brA_BFC11FB4 == psx_brB_BFC11FB4); - psx_delay_BFC11FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11FB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000024B8u); -#endif - if (psx_delay_BFC11FB4) { - psx_delay_BFC11FB4 = 0; - if (psx_taken_BFC11FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000024D8u); - goto label_BFC11FD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000024BCu); - } -label_BFC11FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000024BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000024BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11FBC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000024BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11FC0: 34840009 ori $a0, $a0, 0x9 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x9u; - PGXP_ALU(0x34840009u, cpu->gpr[4], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0x000024C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11FC4: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000024CCu; /* jal link before delay slot */ - psx_delay_BFC11FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC11FC8: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000024C8u); -#endif - if (psx_delay_BFC11FC4) { - psx_delay_BFC11FC4 = 0; - cpu->gpr[31] = 0x000024CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC11FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000024CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000024CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC11FCC: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000024CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024D0u); -#endif - /* 0xBFC11FD0: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000024D0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000024D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11FD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000024D4u); -#endif -label_BFC11FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000024D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000024D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024D8u); -#endif - /* 0xBFC11FD8: 8CCC0004 lw $t4, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000024D8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000024D8u); -#endif - /* 0xBFC11FDC: 8CCD0000 lw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000024DCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x8CCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000024DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000024E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC11FE4: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000024E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC11FE8: 31CF0002 andi $t7, $t6, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x2u; - PGXP_ALU(0x31CF0002u, cpu->gpr[15], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000024E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC11FEC: 11E00008 beq $t7, $zero, 0xBFC12010 */ - uint32_t psx_brA_BFC11FEC = cpu->gpr[15]; uint32_t psx_brB_BFC11FEC = cpu->gpr[0]; - psx_taken_BFC11FEC = (psx_brA_BFC11FEC == psx_brB_BFC11FEC); - psx_delay_BFC11FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC11FF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000024F0u); -#endif - if (psx_delay_BFC11FEC) { - psx_delay_BFC11FEC = 0; - if (psx_taken_BFC11FEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002510u); - goto label_BFC12010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000024F4u); - } -label_BFC11FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000024F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000024F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000024F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11FF4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000024F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC11FF8: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000024F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC11FFC: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002504u; /* jal link before delay slot */ - psx_delay_BFC11FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12000: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002500u); -#endif - if (psx_delay_BFC11FFC) { - psx_delay_BFC11FFC = 0; - cpu->gpr[31] = 0x00002504u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC12004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC12004: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002504u); -#endif - /* 0xBFC12008: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002508u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1200C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000250Cu); -#endif -label_BFC12010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002510u); -#endif - /* 0xBFC12010: 8CD80004 lw $t8, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002510u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002510u); -#endif - /* 0xBFC12014: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002514u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC1201C: 03194024 and $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25]; - PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000251Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC12020: 31090400 andi $t1, $t0, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x400u; - PGXP_ALU(0x31090400u, cpu->gpr[9], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x00002520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC12024: 11200008 beq $t1, $zero, 0xBFC12048 */ - uint32_t psx_brA_BFC12024 = cpu->gpr[9]; uint32_t psx_brB_BFC12024 = cpu->gpr[0]; - psx_taken_BFC12024 = (psx_brA_BFC12024 == psx_brB_BFC12024); - psx_delay_BFC12024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002528u); -#endif - if (psx_delay_BFC12024) { - psx_delay_BFC12024 = 0; - if (psx_taken_BFC12024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002548u); - goto label_BFC12048; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000252Cu); - } -label_BFC1202C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000252Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1202C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12030: 3484000A ori $a0, $a0, 0xA */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xAu; - PGXP_ALU(0x3484000Au, cpu->gpr[4], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00002530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12034: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x0000253Cu; /* jal link before delay slot */ - psx_delay_BFC12034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12038: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002538u); -#endif - if (psx_delay_BFC12034) { - psx_delay_BFC12034 = 0; - cpu->gpr[31] = 0x0000253Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC1203C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000253Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000253Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000253Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1203C: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000253Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002540u); -#endif - /* 0xBFC12040: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002540u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12044: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002544u); -#endif -label_BFC12048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002548u); -#endif - /* 0xBFC12048: 8CCA0004 lw $t2, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002548u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40u); } - PGXP_LOAD(0x8CCA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002548u); -#endif - /* 0xBFC1204C: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000254Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000254Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC12054: 014B6024 and $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC12058: 318D0100 andi $t5, $t4, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x100u; - PGXP_ALU(0x318D0100u, cpu->gpr[13], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x00002558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1205C: 11A00008 beq $t5, $zero, 0xBFC12080 */ - uint32_t psx_brA_BFC1205C = cpu->gpr[13]; uint32_t psx_brB_BFC1205C = cpu->gpr[0]; - psx_taken_BFC1205C = (psx_brA_BFC1205C == psx_brB_BFC1205C); - psx_delay_BFC1205C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002560u); -#endif - if (psx_delay_BFC1205C) { - psx_delay_BFC1205C = 0; - if (psx_taken_BFC1205C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002580u); - goto label_BFC12080; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002564u); - } -label_BFC12064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12064: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12068: 3484000B ori $a0, $a0, 0xB */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xBu; - PGXP_ALU(0x3484000Bu, cpu->gpr[4], _pgx1, 0x000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00002568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1206C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002574u; /* jal link before delay slot */ - psx_delay_BFC1206C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12070: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002570u); -#endif - if (psx_delay_BFC1206C) { - psx_delay_BFC1206C = 0; - cpu->gpr[31] = 0x00002574u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC12074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC12074: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002574u); -#endif - /* 0xBFC12078: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002578u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1207C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000257Cu); -#endif -label_BFC12080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002580u); -#endif - /* 0xBFC12080: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002580u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002580u); -#endif - /* 0xBFC12084: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002584u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC1208C: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC12090: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC12094: 13200008 beq $t9, $zero, 0xBFC120B8 */ - uint32_t psx_brA_BFC12094 = cpu->gpr[25]; uint32_t psx_brB_BFC12094 = cpu->gpr[0]; - psx_taken_BFC12094 = (psx_brA_BFC12094 == psx_brB_BFC12094); - psx_delay_BFC12094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12098: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002598u); -#endif - if (psx_delay_BFC12094) { - psx_delay_BFC12094 = 0; - if (psx_taken_BFC12094) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000025B8u); - goto label_BFC120B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000259Cu); - } -label_BFC1209C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000259Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000259Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000259Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1209C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000259Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC120A0: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000025A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC120A4: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000025ACu; /* jal link before delay slot */ - psx_delay_BFC120A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC120A8: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000025A8u); -#endif - if (psx_delay_BFC120A4) { - psx_delay_BFC120A4 = 0; - cpu->gpr[31] = 0x000025ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC120AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000025ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000025ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC120AC: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000025ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025B0u); -#endif - /* 0xBFC120B0: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025B0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000025B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC120B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000025B4u); -#endif -label_BFC120B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000025B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000025B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025B8u); -#endif - /* 0xBFC120B8: 8CC80004 lw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025B8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x8CC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000025B8u); -#endif - /* 0xBFC120BC: 8CC90000 lw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025BCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x8CC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000025BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC120C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000025C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC120C4: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000025C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC120C8: 314B0010 andi $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x10u; - PGXP_ALU(0x314B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000025C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC120CC: 11600008 beq $t3, $zero, 0xBFC120F0 */ - uint32_t psx_brA_BFC120CC = cpu->gpr[11]; uint32_t psx_brB_BFC120CC = cpu->gpr[0]; - psx_taken_BFC120CC = (psx_brA_BFC120CC == psx_brB_BFC120CC); - psx_delay_BFC120CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC120D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000025D0u); -#endif - if (psx_delay_BFC120CC) { - psx_delay_BFC120CC = 0; - if (psx_taken_BFC120CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000025F0u); - goto label_BFC120F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000025D4u); - } -label_BFC120D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000025D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000025D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC120D4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000025D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC120D8: 34840005 ori $a0, $a0, 0x5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x5u; - PGXP_ALU(0x34840005u, cpu->gpr[4], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x000025D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC120DC: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000025E4u; /* jal link before delay slot */ - psx_delay_BFC120DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC120E0: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000025E0u); -#endif - if (psx_delay_BFC120DC) { - psx_delay_BFC120DC = 0; - cpu->gpr[31] = 0x000025E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC120E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000025E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000025E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC120E4: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000025E4u); -#endif - /* 0xBFC120E8: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025E8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000025E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC120EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000025ECu); -#endif -label_BFC120F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000025F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000025F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000025F0u); -#endif - /* 0xBFC120F0: 8CCC0004 lw $t4, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025F0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000025F0u); -#endif - /* 0xBFC120F4: 8CCD0000 lw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025F4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x8CCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000025F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC120F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000025F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC120FC: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000025FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC12100: 31CF0020 andi $t7, $t6, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x20u; - PGXP_ALU(0x31CF0020u, cpu->gpr[15], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x00002600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC12104: 11E00008 beq $t7, $zero, 0xBFC12128 */ - uint32_t psx_brA_BFC12104 = cpu->gpr[15]; uint32_t psx_brB_BFC12104 = cpu->gpr[0]; - psx_taken_BFC12104 = (psx_brA_BFC12104 == psx_brB_BFC12104); - psx_delay_BFC12104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12108: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002608u); -#endif - if (psx_delay_BFC12104) { - psx_delay_BFC12104 = 0; - if (psx_taken_BFC12104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002628u); - goto label_BFC12128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000260Cu); - } -label_BFC1210C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000260Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1210C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12110: 34840006 ori $a0, $a0, 0x6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6u; - PGXP_ALU(0x34840006u, cpu->gpr[4], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x00002610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12114: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x0000261Cu; /* jal link before delay slot */ - psx_delay_BFC12114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12118: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002618u); -#endif - if (psx_delay_BFC12114) { - psx_delay_BFC12114 = 0; - cpu->gpr[31] = 0x0000261Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC1211C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000261Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1211C: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002620u); -#endif - /* 0xBFC12120: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002620u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002624u); -#endif -label_BFC12128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002628u); -#endif - /* 0xBFC12128: 8CD80004 lw $t8, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002628u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002628u); -#endif - /* 0xBFC1212C: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000262Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12130: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC12134: 03194024 and $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25]; - PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC12138: 31090040 andi $t1, $t0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x40u; - PGXP_ALU(0x31090040u, cpu->gpr[9], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x00002638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1213C: 11200008 beq $t1, $zero, 0xBFC12160 */ - uint32_t psx_brA_BFC1213C = cpu->gpr[9]; uint32_t psx_brB_BFC1213C = cpu->gpr[0]; - psx_taken_BFC1213C = (psx_brA_BFC1213C == psx_brB_BFC1213C); - psx_delay_BFC1213C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002640u); -#endif - if (psx_delay_BFC1213C) { - psx_delay_BFC1213C = 0; - if (psx_taken_BFC1213C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002660u); - goto label_BFC12160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002644u); - } -label_BFC12144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12144: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12148: 34840006 ori $a0, $a0, 0x6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6u; - PGXP_ALU(0x34840006u, cpu->gpr[4], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x00002648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1214C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00002654u; /* jal link before delay slot */ - psx_delay_BFC1214C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12150: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002650u); -#endif - if (psx_delay_BFC1214C) { - psx_delay_BFC1214C = 0; - cpu->gpr[31] = 0x00002654u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC12154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC12154: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002654u); -#endif - /* 0xBFC12158: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002658u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1215C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000265Cu); -#endif -label_BFC12160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002660u); -#endif - /* 0xBFC12160: 8CCA0004 lw $t2, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002660u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40u); } - PGXP_LOAD(0x8CCA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002660u); -#endif - /* 0xBFC12164: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002664u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC1216C: 014B6024 and $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC12170: 318D0080 andi $t5, $t4, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x80u; - PGXP_ALU(0x318D0080u, cpu->gpr[13], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00002670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC12174: 11A00008 beq $t5, $zero, 0xBFC12198 */ - uint32_t psx_brA_BFC12174 = cpu->gpr[13]; uint32_t psx_brB_BFC12174 = cpu->gpr[0]; - psx_taken_BFC12174 = (psx_brA_BFC12174 == psx_brB_BFC12174); - psx_delay_BFC12174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002678u); -#endif - if (psx_delay_BFC12174) { - psx_delay_BFC12174 = 0; - if (psx_taken_BFC12174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002698u); - goto label_BFC12198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000267Cu); - } -label_BFC1217C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000267Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1217C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12180: 34840008 ori $a0, $a0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x8u; - PGXP_ALU(0x34840008u, cpu->gpr[4], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x00002680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12184: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x0000268Cu; /* jal link before delay slot */ - psx_delay_BFC12184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12188: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x00002688u); -#endif - if (psx_delay_BFC12184) { - psx_delay_BFC12184 = 0; - cpu->gpr[31] = 0x0000268Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC1218C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000268Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1218C: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002690u); -#endif - /* 0xBFC12190: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002690u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002694u); -#endif -label_BFC12198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002698u); -#endif - /* 0xBFC12198: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002698u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002698u); -#endif - /* 0xBFC1219C: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000269Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC121A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000026A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC121A4: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000026A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC121A8: 33190008 andi $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x8u; - PGXP_ALU(0x33190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x000026A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC121AC: 13200008 beq $t9, $zero, 0xBFC121D0 */ - uint32_t psx_brA_BFC121AC = cpu->gpr[25]; uint32_t psx_brB_BFC121AC = cpu->gpr[0]; - psx_taken_BFC121AC = (psx_brA_BFC121AC == psx_brB_BFC121AC); - psx_delay_BFC121AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC121B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000026B0u); -#endif - if (psx_delay_BFC121AC) { - psx_delay_BFC121AC = 0; - if (psx_taken_BFC121AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000026D0u); - goto label_BFC121D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000026B4u); - } -label_BFC121B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000026B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC121B4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000026B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC121B8: 34840004 ori $a0, $a0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x4u; - PGXP_ALU(0x34840004u, cpu->gpr[4], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x000026B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC121BC: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000026C4u; /* jal link before delay slot */ - psx_delay_BFC121BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC121C0: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x000026C0u); -#endif - if (psx_delay_BFC121BC) { - psx_delay_BFC121BC = 0; - cpu->gpr[31] = 0x000026C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC121C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000026C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000026C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC121C4: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000026C4u); -#endif - /* 0xBFC121C8: 8CC66D40 lw $a2, 27968($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000026C8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC66D40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000026C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC121CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000026CCu); -#endif -label_BFC121D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000026D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000026D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC121D0: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000026D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC121D4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000026D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC121D8: 24638610 addiu $v1, $v1, -31216 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-31216)); - PGXP_ALU(0x24638610u, cpu->gpr[3], _pgx1, 0xFFFF8610u); } -#ifdef PSX_COSIM - cosim_instr(0x000026D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC121DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000026DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC121E0: 2405000B addiu $a1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2405000Bu, cpu->gpr[5], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x000026E0u); -#endif -label_BFC121E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000026E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000026E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026E4u); -#endif - /* 0xBFC121E4: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000026E4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000026E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC121E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000026E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC121EC: 11000004 beq $t0, $zero, 0xBFC12200 */ - uint32_t psx_brA_BFC121EC = cpu->gpr[8]; uint32_t psx_brB_BFC121EC = cpu->gpr[0]; - psx_taken_BFC121EC = (psx_brA_BFC121EC == psx_brB_BFC121EC); - psx_delay_BFC121EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC121F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000026F0u); -#endif - if (psx_delay_BFC121EC) { - psx_delay_BFC121EC = 0; - if (psx_taken_BFC121EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002700u); - goto label_BFC12200; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000026F4u); - } -label_BFC121F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000026F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000026F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000026F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC121F4: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000026F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC121F8: 00495004 sllv $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] << (cpu->gpr[2] & 0x1Fu); - PGXP_ALU(0x00495004u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000026F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC121FC: 008A2025 or $a0, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[4] | cpu->gpr[10]; - PGXP_ALU(0x008A2025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000026FCu); -#endif -label_BFC12200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12200: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC12204: 1445FFF7 bne $v0, $a1, 0xBFC121E4 */ - uint32_t psx_brA_BFC12204 = cpu->gpr[2]; uint32_t psx_brB_BFC12204 = cpu->gpr[5]; - psx_taken_BFC12204 = (psx_brA_BFC12204 != psx_brB_BFC12204); - psx_delay_BFC12204 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12208: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00002708u); -#endif - if (psx_delay_BFC12204) { - psx_delay_BFC12204 = 0; - if (psx_taken_BFC12204) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000026E4u); - goto label_BFC121E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000270Cu); - } -label_BFC1220C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000270Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC1220C: 00805827 nor $t3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[4] | cpu->gpr[0]); - PGXP_ALU(0x00805827u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC12210: ACCB0000 sw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002710u); return; } g_debug_last_store_pc = 0x00002710u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002710u); -#endif - /* 0xBFC12214: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002714u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12218: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1221C: 03E00008 jr $ra */ - psx_delay_BFC1221C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12220: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002720u); -#endif - if (psx_delay_BFC1221C) { - psx_delay_BFC1221C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002724(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002724u); - int psx_delay_BFC12268 = 0; - int psx_taken_BFC12268 = 0; - int psx_delay_BFC12274 = 0; - int psx_delay_BFC12284 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12258u: goto label_BFC12258; - case 0xBFC12270u: goto label_BFC12270; - case 0xBFC1227Cu: goto label_BFC1227C; - default: break; - } - } -label_BFC12224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12224: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12228: AC208610 sw $zero, -31216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002728u); return; } g_debug_last_store_pc = 0x00002728u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208610u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1222C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000272Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12230: AC208614 sw $zero, -31212($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002730u); return; } g_debug_last_store_pc = 0x00002730u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208614u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12234: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00002734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12238: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1223C: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12240: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12244: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12248: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002748u); return; } g_debug_last_store_pc = 0x00002748u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1224C: 2442861C addiu $v0, $v0, -31204 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-31204)); - PGXP_ALU(0x2442861Cu, cpu->gpr[2], _pgx1, 0xFFFF861Cu); } -#ifdef PSX_COSIM - cosim_instr(0x0000274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12250: AC208618 sw $zero, -31208($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002750u); return; } g_debug_last_store_pc = 0x00002750u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208618u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12254: 2463863C addiu $v1, $v1, -31172 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-31172)); - PGXP_ALU(0x2463863Cu, cpu->gpr[3], _pgx1, 0xFFFF863Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00002754u); -#endif -label_BFC12258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12258: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002758u); return; } g_debug_last_store_pc = 0x00002758u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1225C: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000275Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12260: AC40FFF4 sw $zero, -12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002760u); return; } g_debug_last_store_pc = 0x00002760u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12264: AC40FFF8 sw $zero, -8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002764u); return; } g_debug_last_store_pc = 0x00002764u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC12268: 1443FFFB bne $v0, $v1, 0xBFC12258 */ - uint32_t psx_brA_BFC12268 = cpu->gpr[2]; uint32_t psx_brB_BFC12268 = cpu->gpr[3]; - psx_taken_BFC12268 = (psx_brA_BFC12268 != psx_brB_BFC12268); - psx_delay_BFC12268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1226C: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000276Cu); return; } g_debug_last_store_pc = 0x0000276Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000276Cu); -#endif - if (psx_delay_BFC12268) { - psx_delay_BFC12268 = 0; - if (psx_taken_BFC12268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002758u); - goto label_BFC12258; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002770u); - } -label_BFC12270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12270: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12274: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x0000277Cu; /* jal link before delay slot */ - psx_delay_BFC12274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12278: 24A56D98 addiu $a1, $a1, 28056 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28056)); - PGXP_ALU(0x24A56D98u, cpu->gpr[5], _pgx1, 0x00006D98u); } -#ifdef PSX_COSIM - cosim_instr(0x00002778u); -#endif - if (psx_delay_BFC12274) { - psx_delay_BFC12274 = 0; - cpu->gpr[31] = 0x0000277Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC1227C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000277Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000277Cu); -#endif - /* 0xBFC1227C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000277Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12280: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12284: 03E00008 jr $ra */ - psx_delay_BFC12284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002788u); -#endif - if (psx_delay_BFC12284) { - psx_delay_BFC12284 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000278C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000278Cu); - int psx_delay_BFC12298 = 0; -label_BFC1228C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000278Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1228C: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12290: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC12294: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12298: 03E00008 jr $ra */ - psx_delay_BFC12298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1229C: AC258610 sw $a1, -31216($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000279Cu); return; } g_debug_last_store_pc = 0x0000279Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC258610u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x0000279Cu); -#endif - if (psx_delay_BFC12298) { - psx_delay_BFC12298 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000027A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000027A0u); - int psx_delay_BFC122B4 = 0; -label_BFC122A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000027A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000027A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC122A0: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC122A4: 2442863C addiu $v0, $v0, -31172 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-31172)); - PGXP_ALU(0x2442863Cu, cpu->gpr[2], _pgx1, 0xFFFF863Cu); } -#ifdef PSX_COSIM - cosim_instr(0x000027A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC122A8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027A8u); return; } g_debug_last_store_pc = 0x000027A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000027A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC122AC: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027ACu); return; } g_debug_last_store_pc = 0x000027ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000027ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC122B0: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027B0u); return; } g_debug_last_store_pc = 0x000027B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000027B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC122B4: 03E00008 jr $ra */ - psx_delay_BFC122B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC122B8: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027B8u); return; } g_debug_last_store_pc = 0x000027B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000027B8u); -#endif - if (psx_delay_BFC122B4) { - psx_delay_BFC122B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000027C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000027C0u); - int psx_delay_BFC12320 = 0; - int psx_delay_BFC12328 = 0; - int psx_delay_BFC12334 = 0; - int psx_delay_BFC1233C = 0; - int psx_delay_BFC12350 = 0; - int psx_delay_BFC12358 = 0; - int psx_delay_BFC12368 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12328u: goto label_BFC12328; - case 0xBFC12330u: goto label_BFC12330; - case 0xBFC1233Cu: goto label_BFC1233C; - case 0xBFC12344u: goto label_BFC12344; - case 0xBFC12358u: goto label_BFC12358; - case 0xBFC12360u: goto label_BFC12360; - default: break; - } - } -label_BFC122C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000027C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC122C0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x000027C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC122C4: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027C4u); return; } g_debug_last_store_pc = 0x000027C4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000027C4u); -#endif - /* 0xBFC122C8: 8FAE0020 lw $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000027C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC122CC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC122D0: 3C040001 lui $a0, 0x1 */ - cpu->gpr[4] = 0x00010000u; - PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC122D4: AC2E8908 sw $t6, -30456($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027D4u); return; } g_debug_last_store_pc = 0x000027D4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8908u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000027D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC122D8: 24848648 addiu $a0, $a0, -31160 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-31160)); - PGXP_ALU(0x24848648u, cpu->gpr[4], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x000027D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC122DC: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC122E0: AC240140 sw $a0, 320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027E0u); return; } g_debug_last_store_pc = 0x000027E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC240140u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000027E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC122E4: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027E4u); -#endif - /* 0xBFC122E8: 8F397200 lw $t9, 29184($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027E8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F397200u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000027E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC122EC: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000027F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC122F0: 240F02C0 addiu $t7, $zero, 704 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (704)); - PGXP_ALU(0x240F02C0u, cpu->gpr[15], _pgx1, 0x000002C0u); } -#ifdef PSX_COSIM - cosim_instr(0x000027F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC122F4: AC2F0144 sw $t7, 324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000027F4u); return; } g_debug_last_store_pc = 0x000027F4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F0144u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000027F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC122F8: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000027F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC122FC: 27186EE0 addiu $t8, $t8, 28384 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (28384)); - PGXP_ALU(0x27186EE0u, cpu->gpr[24], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x000027FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12300: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC12304: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00002804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC12308: AC380150 sw $t8, 336($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002808u); return; } g_debug_last_store_pc = 0x00002808u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC380150u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1230C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12310: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002810u); return; } g_debug_last_store_pc = 0x00002810u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC12314: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00002814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12318: 3C01A000 lui $at, 0xA000 */ - cpu->gpr[1] = 0xA0000000u; - PGXP_ALU(0x3C01A000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1231C: AC280154 sw $t0, 340($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000281Cu); return; } g_debug_last_store_pc = 0x0000281Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC280154u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000281Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12320: 0C000854 jal 0xB0002150 */ - cpu->gpr[31] = 0x00002828u; /* jal link before delay slot */ - psx_delay_BFC12320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12324: 240502C0 addiu $a1, $zero, 704 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (704)); - PGXP_ALU(0x240502C0u, cpu->gpr[5], _pgx1, 0x000002C0u); } -#ifdef PSX_COSIM - cosim_instr(0x00002824u); -#endif - if (psx_delay_BFC12320) { - psx_delay_BFC12320 = 0; - cpu->gpr[31] = 0x00002828u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002150u); - cpu->pc = 0x00002150u; return; - } -label_BFC12328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12328: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x00002830u; /* jal link before delay slot */ - psx_delay_BFC12328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1232C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000282Cu); -#endif - if (psx_delay_BFC12328) { - psx_delay_BFC12328 = 0; - cpu->gpr[31] = 0x00002830u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC12330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002830u); -#endif - /* 0xBFC12330: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002830u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12334: 0C000A1C jal 0xB0002870 */ - cpu->gpr[31] = 0x0000283Cu; /* jal link before delay slot */ - psx_delay_BFC12334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12338: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002838u); -#endif - if (psx_delay_BFC12334) { - psx_delay_BFC12334 = 0; - cpu->gpr[31] = 0x0000283Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002870u); - cpu->pc = 0x00002870u; return; - } -label_BFC1233C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000283Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1233C: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x00002844u; /* jal link before delay slot */ - psx_delay_BFC1233C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12340: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00002840u); -#endif - if (psx_delay_BFC1233C) { - psx_delay_BFC1233C = 0; - cpu->gpr[31] = 0x00002844u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC12344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12344: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12348: AC207480 sw $zero, 29824($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29824; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002848u); return; } g_debug_last_store_pc = 0x00002848u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207480u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1234C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000284Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12350: 0C001AA8 jal 0xB0006AA0 */ - cpu->gpr[31] = 0x00002858u; /* jal link before delay slot */ - psx_delay_BFC12350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12354: AC208644 sw $zero, -31164($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002854u); return; } g_debug_last_store_pc = 0x00002854u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208644u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002854u); -#endif - if (psx_delay_BFC12350) { - psx_delay_BFC12350 = 0; - cpu->gpr[31] = 0x00002858u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AA0u); - cpu->pc = 0x00006AA0u; return; - } -label_BFC12358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12358: 0C001AAC jal 0xB0006AB0 */ - cpu->gpr[31] = 0x00002860u; /* jal link before delay slot */ - psx_delay_BFC12358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1235C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000285Cu); -#endif - if (psx_delay_BFC12358) { - psx_delay_BFC12358 = 0; - cpu->gpr[31] = 0x00002860u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AB0u); - cpu->pc = 0x00006AB0u; return; - } -label_BFC12360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002860u); -#endif - /* 0xBFC12360: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002860u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12364: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00002864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12368: 03E00008 jr $ra */ - psx_delay_BFC12368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1236C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000286Cu); -#endif - if (psx_delay_BFC12368) { - psx_delay_BFC12368 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002870(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002870u); - int psx_delay_BFC1237C = 0; - int psx_delay_BFC12398 = 0; - int psx_delay_BFC123A0 = 0; - int psx_delay_BFC123B0 = 0; - int psx_taken_BFC123B0 = 0; - int psx_delay_BFC123B8 = 0; - int psx_taken_BFC123B8 = 0; - int psx_delay_BFC123C0 = 0; - int psx_taken_BFC123C0 = 0; - int psx_delay_BFC123C8 = 0; - int psx_delay_BFC123D0 = 0; - int psx_taken_BFC123D0 = 0; - int psx_delay_BFC123D8 = 0; - int psx_delay_BFC123E0 = 0; - int psx_delay_BFC123E8 = 0; - int psx_delay_BFC123F0 = 0; - int psx_delay_BFC12400 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12384u: goto label_BFC12384; - case 0xBFC123A0u: goto label_BFC123A0; - case 0xBFC123A8u: goto label_BFC123A8; - case 0xBFC123B8u: goto label_BFC123B8; - case 0xBFC123C0u: goto label_BFC123C0; - case 0xBFC123C8u: goto label_BFC123C8; - case 0xBFC123D0u: goto label_BFC123D0; - case 0xBFC123D8u: goto label_BFC123D8; - case 0xBFC123E0u: goto label_BFC123E0; - case 0xBFC123E8u: goto label_BFC123E8; - case 0xBFC123F0u: goto label_BFC123F0; - case 0xBFC123F8u: goto label_BFC123F8; - case 0xBFC123FCu: goto label_BFC123FC; - default: break; - } - } -label_BFC12370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12370: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12374: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002874u); return; } g_debug_last_store_pc = 0x00002874u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12378: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002878u); return; } g_debug_last_store_pc = 0x00002878u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1237C: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x00002884u; /* jal link before delay slot */ - psx_delay_BFC1237C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12380: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00002880u); -#endif - if (psx_delay_BFC1237C) { - psx_delay_BFC1237C = 0; - cpu->gpr[31] = 0x00002884u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC12384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12384: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12388: AC208910 sw $zero, -30448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002888u); return; } g_debug_last_store_pc = 0x00002888u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208910u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1238C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000288Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12390: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12394: AC20890C sw $zero, -30452($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002894u); return; } g_debug_last_store_pc = 0x00002894u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20890Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12398: 0C000F38 jal 0xB0003CE0 */ - cpu->gpr[31] = 0x000028A0u; /* jal link before delay slot */ - psx_delay_BFC12398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1239C: 24846DC0 addiu $a0, $a0, 28096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28096)); - PGXP_ALU(0x24846DC0u, cpu->gpr[4], _pgx1, 0x00006DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x0000289Cu); -#endif - if (psx_delay_BFC12398) { - psx_delay_BFC12398 = 0; - cpu->gpr[31] = 0x000028A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CE0u); - cpu->pc = 0x00003CE0u; return; - } -label_BFC123A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123A0: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x000028A8u; /* jal link before delay slot */ - psx_delay_BFC123A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC123A4: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000028A4u); -#endif - if (psx_delay_BFC123A0) { - psx_delay_BFC123A0 = 0; - cpu->gpr[31] = 0x000028A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC123A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028A8u); -#endif - /* 0xBFC123A8: 8FA20018 lw $v0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000028A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20018u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000028A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC123B0: 10400005 beq $v0, $zero, 0xBFC123C8 */ - uint32_t psx_brA_BFC123B0 = cpu->gpr[2]; uint32_t psx_brB_BFC123B0 = cpu->gpr[0]; - psx_taken_BFC123B0 = (psx_brA_BFC123B0 == psx_brB_BFC123B0); - psx_delay_BFC123B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC123B4: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000028B4u); -#endif - if (psx_delay_BFC123B0) { - psx_delay_BFC123B0 = 0; - if (psx_taken_BFC123B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028C8u); - goto label_BFC123C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028B8u); - } -label_BFC123B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC123B8: 10410007 beq $v0, $at, 0xBFC123D8 */ - uint32_t psx_brA_BFC123B8 = cpu->gpr[2]; uint32_t psx_brB_BFC123B8 = cpu->gpr[1]; - psx_taken_BFC123B8 = (psx_brA_BFC123B8 == psx_brB_BFC123B8); - psx_delay_BFC123B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028BCu); -#endif - if (psx_delay_BFC123B8) { - psx_delay_BFC123B8 = 0; - if (psx_taken_BFC123B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028D8u); - goto label_BFC123D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028C0u); - } -label_BFC123C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123C0: 1000000E beq $zero, $zero, 0xBFC123FC */ - uint32_t psx_brA_BFC123C0 = cpu->gpr[0]; uint32_t psx_brB_BFC123C0 = cpu->gpr[0]; - psx_taken_BFC123C0 = (psx_brA_BFC123C0 == psx_brB_BFC123C0); - psx_delay_BFC123C0 = 1; - /* 0xBFC123C4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000028C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000028C4u); -#endif - if (psx_delay_BFC123C0) { - psx_delay_BFC123C0 = 0; - if (psx_taken_BFC123C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028FCu); - goto label_BFC123FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028C8u); - } -label_BFC123C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123C8: 0C001AB0 jal 0xB0006AC0 */ - cpu->gpr[31] = 0x000028D0u; /* jal link before delay slot */ - psx_delay_BFC123C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028CCu); -#endif - if (psx_delay_BFC123C8) { - psx_delay_BFC123C8 = 0; - cpu->gpr[31] = 0x000028D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AC0u); - cpu->pc = 0x00006AC0u; return; - } -label_BFC123D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123D0: 10000003 beq $zero, $zero, 0xBFC123E0 */ - uint32_t psx_brA_BFC123D0 = cpu->gpr[0]; uint32_t psx_brB_BFC123D0 = cpu->gpr[0]; - psx_taken_BFC123D0 = (psx_brA_BFC123D0 == psx_brB_BFC123D0); - psx_delay_BFC123D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028D4u); -#endif - if (psx_delay_BFC123D0) { - psx_delay_BFC123D0 = 0; - if (psx_taken_BFC123D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028E0u); - goto label_BFC123E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000028D8u); - } -label_BFC123D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123D8: 0C001AB4 jal 0xB0006AD0 */ - cpu->gpr[31] = 0x000028E0u; /* jal link before delay slot */ - psx_delay_BFC123D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028DCu); -#endif - if (psx_delay_BFC123D8) { - psx_delay_BFC123D8 = 0; - cpu->gpr[31] = 0x000028E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AD0u); - cpu->pc = 0x00006AD0u; return; - } -label_BFC123E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123E0: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x000028E8u; /* jal link before delay slot */ - psx_delay_BFC123E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC123E4: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x000028E4u); -#endif - if (psx_delay_BFC123E0) { - psx_delay_BFC123E0 = 0; - cpu->gpr[31] = 0x000028E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC123E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123E8: 0C000A42 jal 0xB0002908 */ - cpu->gpr[31] = 0x000028F0u; /* jal link before delay slot */ - psx_delay_BFC123E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC123EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000028ECu); -#endif - if (psx_delay_BFC123E8) { - psx_delay_BFC123E8 = 0; - cpu->gpr[31] = 0x000028F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002908u); - cpu->pc = 0x00002908u; return; - } -label_BFC123F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC123F0: 0C0010D8 jal 0xB0004360 */ - cpu->gpr[31] = 0x000028F8u; /* jal link before delay slot */ - psx_delay_BFC123F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC123F4: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x000028F4u); -#endif - if (psx_delay_BFC123F0) { - psx_delay_BFC123F0 = 0; - cpu->gpr[31] = 0x000028F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004360u); - cpu->pc = 0x00004360u; return; - } -label_BFC123F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028F8u); -#endif - /* 0xBFC123F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000028F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000028F8u); -#endif -label_BFC123FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000028FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000028FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000028FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC123FC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000028FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12400: 03E00008 jr $ra */ - psx_delay_BFC12400 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12404: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002904u); -#endif - if (psx_delay_BFC12400) { - psx_delay_BFC12400 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002908(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002908u); - int psx_delay_BFC12410 = 0; - int psx_delay_BFC12418 = 0; - int psx_delay_BFC12428 = 0; - int psx_delay_BFC12430 = 0; - int psx_taken_BFC12430 = 0; - int psx_delay_BFC12440 = 0; - int psx_delay_BFC12450 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12418u: goto label_BFC12418; - case 0xBFC12420u: goto label_BFC12420; - case 0xBFC12430u: goto label_BFC12430; - case 0xBFC12438u: goto label_BFC12438; - case 0xBFC12448u: goto label_BFC12448; - case 0xBFC1244Cu: goto label_BFC1244C; - default: break; - } - } -label_BFC12408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12408: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1240C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000290Cu); return; } g_debug_last_store_pc = 0x0000290Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000290Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12410: 0C000B80 jal 0xB0002E00 */ - cpu->gpr[31] = 0x00002918u; /* jal link before delay slot */ - psx_delay_BFC12410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12414: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002914u); -#endif - if (psx_delay_BFC12410) { - psx_delay_BFC12410 = 0; - cpu->gpr[31] = 0x00002918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E00u); - cpu->pc = 0x00002E00u; return; - } -label_BFC12418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12418: 0C000B80 jal 0xB0002E00 */ - cpu->gpr[31] = 0x00002920u; /* jal link before delay slot */ - psx_delay_BFC12418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1241C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000291Cu); -#endif - if (psx_delay_BFC12418) { - psx_delay_BFC12418 = 0; - cpu->gpr[31] = 0x00002920u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E00u); - cpu->pc = 0x00002E00u; return; - } -label_BFC12420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12420: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12424: 24846DC4 addiu $a0, $a0, 28100 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28100)); - PGXP_ALU(0x24846DC4u, cpu->gpr[4], _pgx1, 0x00006DC4u); } -#ifdef PSX_COSIM - cosim_instr(0x00002924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12428: 0C000A56 jal 0xB0002958 */ - cpu->gpr[31] = 0x00002930u; /* jal link before delay slot */ - psx_delay_BFC12428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1242C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000292Cu); -#endif - if (psx_delay_BFC12428) { - psx_delay_BFC12428 = 0; - cpu->gpr[31] = 0x00002930u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002958u); - cpu->pc = 0x00002958u; return; - } -label_BFC12430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12430: 14400006 bne $v0, $zero, 0xBFC1244C */ - uint32_t psx_brA_BFC12430 = cpu->gpr[2]; uint32_t psx_brB_BFC12430 = cpu->gpr[0]; - psx_taken_BFC12430 = (psx_brA_BFC12430 != psx_brB_BFC12430); - psx_delay_BFC12430 = 1; - /* 0xBFC12434: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002934u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002934u); -#endif - if (psx_delay_BFC12430) { - psx_delay_BFC12430 = 0; - if (psx_taken_BFC12430) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000294Cu); - goto label_BFC1244C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002938u); - } -label_BFC12438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12438: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1243C: 24846DCC addiu $a0, $a0, 28108 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28108)); - PGXP_ALU(0x24846DCCu, cpu->gpr[4], _pgx1, 0x00006DCCu); } -#ifdef PSX_COSIM - cosim_instr(0x0000293Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12440: 0C000A56 jal 0xB0002958 */ - cpu->gpr[31] = 0x00002948u; /* jal link before delay slot */ - psx_delay_BFC12440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12444: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00002944u); -#endif - if (psx_delay_BFC12440) { - psx_delay_BFC12440 = 0; - cpu->gpr[31] = 0x00002948u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002958u); - cpu->pc = 0x00002958u; return; - } -label_BFC12448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002948u); -#endif - /* 0xBFC12448: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002948u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002948u); -#endif -label_BFC1244C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000294Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1244C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12450: 03E00008 jr $ra */ - psx_delay_BFC12450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002954u); -#endif - if (psx_delay_BFC12450) { - psx_delay_BFC12450 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002958(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002958u); - int psx_delay_BFC12464 = 0; - int psx_delay_BFC1246C = 0; - int psx_taken_BFC1246C = 0; - int psx_delay_BFC12480 = 0; - int psx_taken_BFC12480 = 0; - int psx_delay_BFC12494 = 0; - int psx_delay_BFC124A4 = 0; - int psx_taken_BFC124A4 = 0; - int psx_delay_BFC124BC = 0; - int psx_taken_BFC124BC = 0; - int psx_delay_BFC12504 = 0; - int psx_delay_BFC12510 = 0; - int psx_taken_BFC12510 = 0; - int psx_delay_BFC12528 = 0; - int psx_taken_BFC12528 = 0; - int psx_delay_BFC1255C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1246Cu: goto label_BFC1246C; - case 0xBFC12474u: goto label_BFC12474; - case 0xBFC12488u: goto label_BFC12488; - case 0xBFC1249Cu: goto label_BFC1249C; - case 0xBFC124ACu: goto label_BFC124AC; - case 0xBFC124C4u: goto label_BFC124C4; - case 0xBFC1250Cu: goto label_BFC1250C; - case 0xBFC12518u: goto label_BFC12518; - case 0xBFC12530u: goto label_BFC12530; - case 0xBFC12554u: goto label_BFC12554; - default: break; - } - } -label_BFC12458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12458: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1245C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000295Cu); return; } g_debug_last_store_pc = 0x0000295Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12460: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002960u); return; } g_debug_last_store_pc = 0x00002960u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12464: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x0000296Cu; /* jal link before delay slot */ - psx_delay_BFC12464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC12468: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002968u); return; } g_debug_last_store_pc = 0x00002968u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002968u); -#endif - if (psx_delay_BFC12464) { - psx_delay_BFC12464 = 0; - cpu->gpr[31] = 0x0000296Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC1246C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000296Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1246C: 14400006 bne $v0, $zero, 0xBFC12488 */ - uint32_t psx_brA_BFC1246C = cpu->gpr[2]; uint32_t psx_brB_BFC1246C = cpu->gpr[0]; - psx_taken_BFC1246C = (psx_brA_BFC1246C != psx_brB_BFC1246C); - psx_delay_BFC1246C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC12470: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002970u); -#endif - if (psx_delay_BFC1246C) { - psx_delay_BFC1246C = 0; - if (psx_taken_BFC1246C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002988u); - goto label_BFC12488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002974u); - } -label_BFC12474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC12474: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12478: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1247C: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000297Cu); return; } g_debug_last_store_pc = 0x0000297Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12480: 10000034 beq $zero, $zero, 0xBFC12554 */ - uint32_t psx_brA_BFC12480 = cpu->gpr[0]; uint32_t psx_brB_BFC12480 = cpu->gpr[0]; - psx_taken_BFC12480 = (psx_brA_BFC12480 == psx_brB_BFC12480); - psx_delay_BFC12480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12484: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002984u); -#endif - if (psx_delay_BFC12480) { - psx_delay_BFC12480 = 0; - if (psx_taken_BFC12480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A54u); - goto label_BFC12554; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002988u); - } -label_BFC12488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002988u); -#endif - /* 0xBFC12488: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002988u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1248C: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x0000298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC12490: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x00002990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12494: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x0000299Cu; /* jal link before delay slot */ - psx_delay_BFC12494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC12498: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002998u); return; } g_debug_last_store_pc = 0x00002998u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00002998u); -#endif - if (psx_delay_BFC12494) { - psx_delay_BFC12494 = 0; - cpu->gpr[31] = 0x0000299Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC1249C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000299Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000299Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000299Cu); -#endif - /* 0xBFC1249C: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000299Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x0000299Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC124A0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000029A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC124A4: 14410007 bne $v0, $at, 0xBFC124C4 */ - uint32_t psx_brA_BFC124A4 = cpu->gpr[2]; uint32_t psx_brB_BFC124A4 = cpu->gpr[1]; - psx_taken_BFC124A4 = (psx_brA_BFC124A4 != psx_brB_BFC124A4); - psx_delay_BFC124A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC124A8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000029A8u); -#endif - if (psx_delay_BFC124A4) { - psx_delay_BFC124A4 = 0; - if (psx_taken_BFC124A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000029C4u); - goto label_BFC124C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000029ACu); - } -label_BFC124AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000029ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000029ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC124AC: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x000029ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC124B0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000029B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC124B4: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029B4u); return; } g_debug_last_store_pc = 0x000029B4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000029B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC124B8: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029B8u); return; } g_debug_last_store_pc = 0x000029B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000029B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC124BC: 10000025 beq $zero, $zero, 0xBFC12554 */ - uint32_t psx_brA_BFC124BC = cpu->gpr[0]; uint32_t psx_brB_BFC124BC = cpu->gpr[0]; - psx_taken_BFC124BC = (psx_brA_BFC124BC == psx_brB_BFC124BC); - psx_delay_BFC124BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC124C0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000029C0u); -#endif - if (psx_delay_BFC124BC) { - psx_delay_BFC124BC = 0; - if (psx_taken_BFC124BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A54u); - goto label_BFC12554; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000029C4u); - } -label_BFC124C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000029C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000029C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029C4u); -#endif - /* 0xBFC124C4: 8FA6003C lw $a2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029C4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6003Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000029C4u); -#endif - /* 0xBFC124C8: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029C8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000029C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC124CC: ACE60000 sw $a2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029CCu); return; } g_debug_last_store_pc = 0x000029CCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xACE60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000029CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC124D0: ACF80004 sw $t8, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029D0u); return; } g_debug_last_store_pc = 0x000029D0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000029D0u); -#endif - /* 0xBFC124D4: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029D4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000029D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC124D8: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000029D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC124DC: ACF9001C sw $t9, 28($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029DCu); return; } g_debug_last_store_pc = 0x000029DCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000029DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029E0u); -#endif - /* 0xBFC124E0: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000029E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC124E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000029E4u); -#endif - /* 0xBFC124E8: 8D090004 lw $t1, 4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029E8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000029E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC124EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000029ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000029F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC124F0: ACE90014 sw $t1, 20($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029F0u); return; } g_debug_last_store_pc = 0x000029F0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000029F0u); -#endif - /* 0xBFC124F4: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029F4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000029F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC124F8: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029F8u); return; } g_debug_last_store_pc = 0x000029F8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x000029F8u); -#endif - /* 0xBFC124FC: 8D4B0014 lw $t3, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029FCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x8D4B0014u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000029FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12500: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC12504: 0160F809 jalr $ra, $t3 */ - cpu->gpr[31] = 0x00002A0Cu; /* jalr link before delay slot */ - psx_delay_BFC12504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12508: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A08u); -#endif - if (psx_delay_BFC12504) { - psx_delay_BFC12504 = 0; - { uint32_t _t = cpu->gpr[11]; - cpu->gpr[31] = 0x00002A0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC1250C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A0Cu); -#endif - /* 0xBFC1250C: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A0Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12510: 10400007 beq $v0, $zero, 0xBFC12530 */ - uint32_t psx_brA_BFC12510 = cpu->gpr[2]; uint32_t psx_brB_BFC12510 = cpu->gpr[0]; - psx_taken_BFC12510 = (psx_brA_BFC12510 == psx_brB_BFC12510); - psx_delay_BFC12510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A14u); -#endif - if (psx_delay_BFC12510) { - psx_delay_BFC12510 = 0; - if (psx_taken_BFC12510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A30u); - goto label_BFC12530; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A18u); - } -label_BFC12518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A18u); -#endif - /* 0xBFC12518: 8CEC0018 lw $t4, 24($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A18u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80u); } - PGXP_LOAD(0x8CEC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1251C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC12520: AC2C8640 sw $t4, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A20u); return; } g_debug_last_store_pc = 0x00002A20u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C8640u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC12524: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A24u); return; } g_debug_last_store_pc = 0x00002A24u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12528: 1000000A beq $zero, $zero, 0xBFC12554 */ - uint32_t psx_brA_BFC12528 = cpu->gpr[0]; uint32_t psx_brB_BFC12528 = cpu->gpr[0]; - psx_taken_BFC12528 = (psx_brA_BFC12528 == psx_brB_BFC12528); - psx_delay_BFC12528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1252C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002A2Cu); -#endif - if (psx_delay_BFC12528) { - psx_delay_BFC12528 = 0; - if (psx_taken_BFC12528) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A54u); - goto label_BFC12554; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A30u); - } -label_BFC12530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC12530: 3C0D0001 lui $t5, 0x1 */ - cpu->gpr[13] = 0x00010000u; - PGXP_ALU(0x3C0D0001u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC12534: 25AD8648 addiu $t5, $t5, -31160 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-31160)); - PGXP_ALU(0x25AD8648u, cpu->gpr[13], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x00002A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2088u); -#endif - /* 0xBFC12538: 00ED1823 subu $v1, $a3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[3] = cpu->gpr[7] - cpu->gpr[13]; - PGXP_ALU(0x00ED1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1253C: 2401002C addiu $at, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2401002Cu, cpu->gpr[1], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00002A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC12540: 0061001A div $v1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0061001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00002A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC12544: ACE00010 sw $zero, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A44u); return; } g_debug_last_store_pc = 0x00002A44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12548: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC1254C: ACE30028 sw $v1, 40($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A4Cu); return; } g_debug_last_store_pc = 0x00002A4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xACE30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12550: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002A50u); -#endif -label_BFC12554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A54u); -#endif - /* 0xBFC12554: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12558: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x00002A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1255C: 03E00008 jr $ra */ - psx_delay_BFC1255C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A60u); -#endif - if (psx_delay_BFC1255C) { - psx_delay_BFC1255C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002A64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002A64u); - int psx_delay_BFC12570 = 0; - int psx_delay_BFC12580 = 0; - int psx_taken_BFC12580 = 0; - int psx_delay_BFC12590 = 0; - int psx_taken_BFC12590 = 0; - int psx_delay_BFC125A4 = 0; - int psx_taken_BFC125A4 = 0; - int psx_delay_BFC125AC = 0; - int psx_taken_BFC125AC = 0; - int psx_delay_BFC125C0 = 0; - int psx_taken_BFC125C0 = 0; - int psx_delay_BFC125D0 = 0; - int psx_delay_BFC125F0 = 0; - int psx_taken_BFC125F0 = 0; - int psx_delay_BFC125F8 = 0; - int psx_taken_BFC125F8 = 0; - int psx_delay_BFC12600 = 0; - int psx_taken_BFC12600 = 0; - int psx_delay_BFC12608 = 0; - int psx_taken_BFC12608 = 0; - int psx_delay_BFC12620 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12578u: goto label_BFC12578; - case 0xBFC12588u: goto label_BFC12588; - case 0xBFC12598u: goto label_BFC12598; - case 0xBFC125ACu: goto label_BFC125AC; - case 0xBFC125B4u: goto label_BFC125B4; - case 0xBFC125C8u: goto label_BFC125C8; - case 0xBFC125D8u: goto label_BFC125D8; - case 0xBFC125F8u: goto label_BFC125F8; - case 0xBFC12600u: goto label_BFC12600; - case 0xBFC12608u: goto label_BFC12608; - case 0xBFC12610u: goto label_BFC12610; - case 0xBFC12618u: goto label_BFC12618; - default: break; - } - } -label_BFC12564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12564: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00002A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12568: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A68u); return; } g_debug_last_store_pc = 0x00002A68u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1256C: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A6Cu); return; } g_debug_last_store_pc = 0x00002A6Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12570: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002A78u; /* jal link before delay slot */ - psx_delay_BFC12570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC12574: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A74u); return; } g_debug_last_store_pc = 0x00002A74u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A74u); -#endif - if (psx_delay_BFC12570) { - psx_delay_BFC12570 = 0; - cpu->gpr[31] = 0x00002A78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC12578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A78u); -#endif - /* 0xBFC12578: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A78u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A78u); -#endif - /* 0xBFC1257C: 8FA60028 lw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A7Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12580: 10400005 beq $v0, $zero, 0xBFC12598 */ - uint32_t psx_brA_BFC12580 = cpu->gpr[2]; uint32_t psx_brB_BFC12580 = cpu->gpr[0]; - psx_taken_BFC12580 = (psx_brA_BFC12580 == psx_brB_BFC12580); - psx_delay_BFC12580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12584: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002A84u); -#endif - if (psx_delay_BFC12580) { - psx_delay_BFC12580 = 0; - if (psx_taken_BFC12580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A98u); - goto label_BFC12598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A88u); - } -label_BFC12588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A88u); -#endif - /* 0xBFC12588: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A88u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1258C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC12590: 15C00019 bne $t6, $zero, 0xBFC125F8 */ - uint32_t psx_brA_BFC12590 = cpu->gpr[14]; uint32_t psx_brB_BFC12590 = cpu->gpr[0]; - psx_taken_BFC12590 = (psx_brA_BFC12590 != psx_brB_BFC12590); - psx_delay_BFC12590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002A94u); -#endif - if (psx_delay_BFC12590) { - psx_delay_BFC12590 = 0; - if (psx_taken_BFC12590) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AF8u); - goto label_BFC125F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002A98u); - } -label_BFC12598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC12598: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1259C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC125A0: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AA0u); return; } g_debug_last_store_pc = 0x00002AA0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC125A4: 1000001C beq $zero, $zero, 0xBFC12618 */ - uint32_t psx_brA_BFC125A4 = cpu->gpr[0]; uint32_t psx_brB_BFC125A4 = cpu->gpr[0]; - psx_taken_BFC125A4 = (psx_brA_BFC125A4 == psx_brB_BFC125A4); - psx_delay_BFC125A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC125A8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002AA8u); -#endif - if (psx_delay_BFC125A4) { - psx_delay_BFC125A4 = 0; - if (psx_taken_BFC125A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B18u); - goto label_BFC12618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AACu); - } -label_BFC125AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC125AC: 10000018 beq $zero, $zero, 0xBFC12610 */ - uint32_t psx_brA_BFC125AC = cpu->gpr[0]; uint32_t psx_brB_BFC125AC = cpu->gpr[0]; - psx_taken_BFC125AC = (psx_brA_BFC125AC == psx_brB_BFC125AC); - psx_delay_BFC125AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC125B0: AC440010 sw $a0, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AB0u); return; } g_debug_last_store_pc = 0x00002AB0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC440010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AB0u); -#endif - if (psx_delay_BFC125AC) { - psx_delay_BFC125AC = 0; - if (psx_taken_BFC125AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B10u); - goto label_BFC12610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AB4u); - } -label_BFC125B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AB4u); -#endif - /* 0xBFC125B4: 8C580010 lw $t8, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AB4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC125B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC125BC: 0304C821 addu $t9, $t8, $a0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[4]; - PGXP_ALU(0x0304C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC125C0: 10000013 beq $zero, $zero, 0xBFC12610 */ - uint32_t psx_brA_BFC125C0 = cpu->gpr[0]; uint32_t psx_brB_BFC125C0 = cpu->gpr[0]; - psx_taken_BFC125C0 = (psx_brA_BFC125C0 == psx_brB_BFC125C0); - psx_delay_BFC125C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC125C4: AC590010 sw $t9, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AC4u); return; } g_debug_last_store_pc = 0x00002AC4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AC4u); -#endif - if (psx_delay_BFC125C0) { - psx_delay_BFC125C0 = 0; - if (psx_taken_BFC125C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B10u); - goto label_BFC12610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AC8u); - } -label_BFC125C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC125C8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC125CC: 24846DD4 addiu $a0, $a0, 28116 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28116)); - PGXP_ALU(0x24846DD4u, cpu->gpr[4], _pgx1, 0x00006DD4u); } -#ifdef PSX_COSIM - cosim_instr(0x00002ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC125D0: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00002AD8u; /* jal link before delay slot */ - psx_delay_BFC125D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC125D4: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AD4u); return; } g_debug_last_store_pc = 0x00002AD4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AD4u); -#endif - if (psx_delay_BFC125D0) { - psx_delay_BFC125D0 = 0; - cpu->gpr[31] = 0x00002AD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC125D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AD8u); -#endif - /* 0xBFC125D8: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AD8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC125DC: 24080016 addiu $t0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24080016u, cpu->gpr[8], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x00002ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC125E0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC125E4: AC288640 sw $t0, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AE4u); return; } g_debug_last_store_pc = 0x00002AE4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC288640u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC125E8: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x00002AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC125EC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC125F0: 10000009 beq $zero, $zero, 0xBFC12618 */ - uint32_t psx_brA_BFC125F0 = cpu->gpr[0]; uint32_t psx_brB_BFC125F0 = cpu->gpr[0]; - psx_taken_BFC125F0 = (psx_brA_BFC125F0 == psx_brB_BFC125F0); - psx_delay_BFC125F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC125F4: AC690018 sw $t1, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002AF4u); return; } g_debug_last_store_pc = 0x00002AF4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002AF4u); -#endif - if (psx_delay_BFC125F0) { - psx_delay_BFC125F0 = 0; - if (psx_taken_BFC125F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B18u); - goto label_BFC12618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AF8u); - } -label_BFC125F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC125F8: 10C0FFEC beq $a2, $zero, 0xBFC125AC */ - uint32_t psx_brA_BFC125F8 = cpu->gpr[6]; uint32_t psx_brB_BFC125F8 = cpu->gpr[0]; - psx_taken_BFC125F8 = (psx_brA_BFC125F8 == psx_brB_BFC125F8); - psx_delay_BFC125F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC125FC: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002AFCu); -#endif - if (psx_delay_BFC125F8) { - psx_delay_BFC125F8 = 0; - if (psx_taken_BFC125F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AACu); - goto label_BFC125AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B00u); - } -label_BFC12600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC12600: 10C1FFEC beq $a2, $at, 0xBFC125B4 */ - uint32_t psx_brA_BFC12600 = cpu->gpr[6]; uint32_t psx_brB_BFC12600 = cpu->gpr[1]; - psx_taken_BFC12600 = (psx_brA_BFC12600 == psx_brB_BFC12600); - psx_delay_BFC12600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12604: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00002B04u); -#endif - if (psx_delay_BFC12600) { - psx_delay_BFC12600 = 0; - if (psx_taken_BFC12600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AB4u); - goto label_BFC125B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B08u); - } -label_BFC12608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC12608: 14C1FFEF bne $a2, $at, 0xBFC125C8 */ - uint32_t psx_brA_BFC12608 = cpu->gpr[6]; uint32_t psx_brB_BFC12608 = cpu->gpr[1]; - psx_taken_BFC12608 = (psx_brA_BFC12608 != psx_brB_BFC12608); - psx_delay_BFC12608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1260C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B0Cu); -#endif - if (psx_delay_BFC12608) { - psx_delay_BFC12608 = 0; - if (psx_taken_BFC12608) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002AC8u); - goto label_BFC125C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B10u); - } -label_BFC12610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B10u); -#endif - /* 0xBFC12610: 8C620010 lw $v0, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B10u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B14u); -#endif -label_BFC12618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B18u); -#endif - /* 0xBFC12618: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B18u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1261C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00002B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12620: 03E00008 jr $ra */ - psx_delay_BFC12620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B24u); -#endif - if (psx_delay_BFC12620) { - psx_delay_BFC12620 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002B28(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002B28u); - int psx_delay_BFC12634 = 0; - int psx_delay_BFC1263C = 0; - int psx_taken_BFC1263C = 0; - int psx_delay_BFC1264C = 0; - int psx_taken_BFC1264C = 0; - int psx_delay_BFC12660 = 0; - int psx_taken_BFC12660 = 0; - int psx_delay_BFC12668 = 0; - int psx_delay_BFC12684 = 0; - int psx_taken_BFC12684 = 0; - int psx_delay_BFC126A0 = 0; - int psx_delay_BFC126AC = 0; - int psx_taken_BFC126AC = 0; - int psx_delay_BFC126D8 = 0; - int psx_taken_BFC126D8 = 0; - int psx_delay_BFC126F4 = 0; - int psx_taken_BFC126F4 = 0; - int psx_delay_BFC12700 = 0; - int psx_taken_BFC12700 = 0; - int psx_delay_BFC1270C = 0; - int psx_delay_BFC12714 = 0; - int psx_taken_BFC12714 = 0; - int psx_delay_BFC12730 = 0; - int psx_taken_BFC12730 = 0; - int psx_delay_BFC12748 = 0; - int psx_delay_BFC12754 = 0; - int psx_taken_BFC12754 = 0; - int psx_delay_BFC1276C = 0; - int psx_taken_BFC1276C = 0; - int psx_delay_BFC1278C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1263Cu: goto label_BFC1263C; - case 0xBFC12644u: goto label_BFC12644; - case 0xBFC12654u: goto label_BFC12654; - case 0xBFC12668u: goto label_BFC12668; - case 0xBFC12670u: goto label_BFC12670; - case 0xBFC1268Cu: goto label_BFC1268C; - case 0xBFC126A8u: goto label_BFC126A8; - case 0xBFC126B4u: goto label_BFC126B4; - case 0xBFC126B8u: goto label_BFC126B8; - case 0xBFC126E0u: goto label_BFC126E0; - case 0xBFC126FCu: goto label_BFC126FC; - case 0xBFC12700u: goto label_BFC12700; - case 0xBFC12708u: goto label_BFC12708; - case 0xBFC12714u: goto label_BFC12714; - case 0xBFC1271Cu: goto label_BFC1271C; - case 0xBFC12738u: goto label_BFC12738; - case 0xBFC1273Cu: goto label_BFC1273C; - case 0xBFC12750u: goto label_BFC12750; - case 0xBFC1275Cu: goto label_BFC1275C; - case 0xBFC1276Cu: goto label_BFC1276C; - case 0xBFC12774u: goto label_BFC12774; - case 0xBFC12784u: goto label_BFC12784; - default: break; - } - } -label_BFC12628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12628: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1262C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B2Cu); return; } g_debug_last_store_pc = 0x00002B2Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC12630: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B30u); return; } g_debug_last_store_pc = 0x00002B30u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12634: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002B3Cu; /* jal link before delay slot */ - psx_delay_BFC12634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC12638: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B38u); return; } g_debug_last_store_pc = 0x00002B38u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B38u); -#endif - if (psx_delay_BFC12634) { - psx_delay_BFC12634 = 0; - cpu->gpr[31] = 0x00002B3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC1263C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1263C: 10400005 beq $v0, $zero, 0xBFC12654 */ - uint32_t psx_brA_BFC1263C = cpu->gpr[2]; uint32_t psx_brB_BFC1263C = cpu->gpr[0]; - psx_taken_BFC1263C = (psx_brA_BFC1263C == psx_brB_BFC1263C); - psx_delay_BFC1263C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC12640: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002B40u); -#endif - if (psx_delay_BFC1263C) { - psx_delay_BFC1263C = 0; - if (psx_taken_BFC1263C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B54u); - goto label_BFC12654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B44u); - } -label_BFC12644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B44u); -#endif - /* 0xBFC12644: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1264C: 15C00006 bne $t6, $zero, 0xBFC12668 */ - uint32_t psx_brA_BFC1264C = cpu->gpr[14]; uint32_t psx_brB_BFC1264C = cpu->gpr[0]; - psx_taken_BFC1264C = (psx_brA_BFC1264C != psx_brB_BFC1264C); - psx_delay_BFC1264C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B50u); -#endif - if (psx_delay_BFC1264C) { - psx_delay_BFC1264C = 0; - if (psx_taken_BFC1264C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B68u); - goto label_BFC12668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B54u); - } -label_BFC12654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC12654: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12658: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1265C: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B5Cu); return; } g_debug_last_store_pc = 0x00002B5Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12660: 10000048 beq $zero, $zero, 0xBFC12784 */ - uint32_t psx_brA_BFC12660 = cpu->gpr[0]; uint32_t psx_brB_BFC12660 = cpu->gpr[0]; - psx_taken_BFC12660 = (psx_brA_BFC12660 == psx_brB_BFC12660); - psx_delay_BFC12660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12664: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002B64u); -#endif - if (psx_delay_BFC12660) { - psx_delay_BFC12660 = 0; - if (psx_taken_BFC12660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C84u); - goto label_BFC12784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B68u); - } -label_BFC12668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12668: 0C000FA0 jal 0xB0003E80 */ - cpu->gpr[31] = 0x00002B70u; /* jal link before delay slot */ - psx_delay_BFC12668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1266C: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B6Cu); return; } g_debug_last_store_pc = 0x00002B6Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B6Cu); -#endif - if (psx_delay_BFC12668) { - psx_delay_BFC12668 = 0; - cpu->gpr[31] = 0x00002B70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E80u); - cpu->pc = 0x00003E80u; return; - } -label_BFC12670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B70u); -#endif - /* 0xBFC12670: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B74u); -#endif - /* 0xBFC12678: 8C980014 lw $t8, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B78u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C980014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1267C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC12680: 33190010 andi $t9, $t8, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u; - PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00002B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC12684: 1320000C beq $t9, $zero, 0xBFC126B8 */ - uint32_t psx_brA_BFC12684 = cpu->gpr[25]; uint32_t psx_brB_BFC12684 = cpu->gpr[0]; - psx_taken_BFC12684 = (psx_brA_BFC12684 == psx_brB_BFC12684); - psx_delay_BFC12684 = 1; - /* 0xBFC12688: 8FAA002C lw $t2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B88u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA002Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B88u); -#endif - if (psx_delay_BFC12684) { - psx_delay_BFC12684 = 0; - if (psx_taken_BFC12684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002BB8u); - goto label_BFC126B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B8Cu); - } -label_BFC1268C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002B8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1268C: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B8Cu); return; } g_debug_last_store_pc = 0x00002B8Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002B90u); -#endif - /* 0xBFC12690: 8C88001C lw $t0, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B90u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C88001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B90u); -#endif - /* 0xBFC12694: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B94u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B94u); -#endif - /* 0xBFC12698: 8D090024 lw $t1, 36($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B98u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B98u); -#endif - /* 0xBFC1269C: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B9Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC126A0: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00002BA8u; /* jalr link before delay slot */ - psx_delay_BFC126A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BA4u); -#endif - if (psx_delay_BFC126A0) { - psx_delay_BFC126A0 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00002BA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC126A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BA8u); -#endif - /* 0xBFC126A8: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BA8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126AC: 1000002F beq $zero, $zero, 0xBFC1276C */ - uint32_t psx_brA_BFC126AC = cpu->gpr[0]; uint32_t psx_brB_BFC126AC = cpu->gpr[0]; - psx_taken_BFC126AC = (psx_brA_BFC126AC == psx_brB_BFC126AC); - psx_delay_BFC126AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC126B0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002BB0u); -#endif - if (psx_delay_BFC126AC) { - psx_delay_BFC126AC = 0; - if (psx_taken_BFC126AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C6Cu); - goto label_BFC1276C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002BB4u); - } -label_BFC126B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BB4u); -#endif - /* 0xBFC126B4: 8FAA002C lw $t2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BB4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA002Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BB4u); -#endif -label_BFC126B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BB8u); -#endif - /* 0xBFC126B8: 8C83001C lw $v1, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BB8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C83001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC126BC: AC8A0008 sw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BBCu); return; } g_debug_last_store_pc = 0x00002BBCu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BC0u); -#endif - /* 0xBFC126C0: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BC0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC126C8: AC8B000C sw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BC8u); return; } g_debug_last_store_pc = 0x00002BC8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BC8u); -#endif - /* 0xBFC126CC: 8C6C0004 lw $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BCCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC126D4: 318D0004 andi $t5, $t4, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u; - PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00002BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC126D8: 11A00018 beq $t5, $zero, 0xBFC1273C */ - uint32_t psx_brA_BFC126D8 = cpu->gpr[13]; uint32_t psx_brB_BFC126D8 = cpu->gpr[0]; - psx_taken_BFC126D8 = (psx_brA_BFC126D8 == psx_brB_BFC126D8); - psx_delay_BFC126D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BDCu); -#endif - if (psx_delay_BFC126D8) { - psx_delay_BFC126D8 = 0; - if (psx_taken_BFC126D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C3Cu); - goto label_BFC1273C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002BE0u); - } -label_BFC126E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BE0u); -#endif - /* 0xBFC126E0: 8C620008 lw $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BE0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BE0u); -#endif - /* 0xBFC126E4: 8C8E0010 lw $t6, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002BE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC126EC: 01C2001B divu $t6, $v0 */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[2]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C2001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x00002BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC126F0: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC126F4: 14400002 bne $v0, $zero, 0xBFC12700 */ - uint32_t psx_brA_BFC126F4 = cpu->gpr[2]; uint32_t psx_brB_BFC126F4 = cpu->gpr[0]; - psx_taken_BFC126F4 = (psx_brA_BFC126F4 != psx_brB_BFC126F4); - psx_delay_BFC126F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC126F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002BF8u); -#endif - if (psx_delay_BFC126F4) { - psx_delay_BFC126F4 = 0; - if (psx_taken_BFC126F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C00u); - goto label_BFC12700; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002BFCu); - } -label_BFC126FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC126FC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x00002BFCu); return; -#ifdef PSX_COSIM - cosim_instr(0x00002BFCu); -#endif -label_BFC12700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC12700: 11E00006 beq $t7, $zero, 0xBFC1271C */ - uint32_t psx_brA_BFC12700 = cpu->gpr[15]; uint32_t psx_brB_BFC12700 = cpu->gpr[0]; - psx_taken_BFC12700 = (psx_brA_BFC12700 == psx_brB_BFC12700); - psx_delay_BFC12700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C04u); -#endif - if (psx_delay_BFC12700) { - psx_delay_BFC12700 = 0; - if (psx_taken_BFC12700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C1Cu); - goto label_BFC1271C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C08u); - } -label_BFC12708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12708: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1270C: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00002C14u; /* jal link before delay slot */ - psx_delay_BFC1270C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12710: 24846DE8 addiu $a0, $a0, 28136 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28136)); - PGXP_ALU(0x24846DE8u, cpu->gpr[4], _pgx1, 0x00006DE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002C10u); -#endif - if (psx_delay_BFC1270C) { - psx_delay_BFC1270C = 0; - cpu->gpr[31] = 0x00002C14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC12714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12714: 1000001B beq $zero, $zero, 0xBFC12784 */ - uint32_t psx_brA_BFC12714 = cpu->gpr[0]; uint32_t psx_brB_BFC12714 = cpu->gpr[0]; - psx_taken_BFC12714 = (psx_brA_BFC12714 == psx_brB_BFC12714); - psx_delay_BFC12714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12718: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002C18u); -#endif - if (psx_delay_BFC12714) { - psx_delay_BFC12714 = 0; - if (psx_taken_BFC12714) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C84u); - goto label_BFC12784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C1Cu); - } -label_BFC1271C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C1Cu); -#endif - /* 0xBFC1271C: 8C98000C lw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C1Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12720: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC12724: 0302001B divu $t8, $v0 */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[2]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0302001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x00002C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC12728: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC1272C: AC99000C sw $t9, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C2Cu); return; } g_debug_last_store_pc = 0x00002C2Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC99000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12730: 14400002 bne $v0, $zero, 0xBFC1273C */ - uint32_t psx_brA_BFC12730 = cpu->gpr[2]; uint32_t psx_brB_BFC12730 = cpu->gpr[0]; - psx_taken_BFC12730 = (psx_brA_BFC12730 != psx_brB_BFC12730); - psx_delay_BFC12730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12734: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C34u); -#endif - if (psx_delay_BFC12730) { - psx_delay_BFC12730 = 0; - if (psx_taken_BFC12730) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C3Cu); - goto label_BFC1273C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C38u); - } -label_BFC12738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC12738: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x00002C38u); return; -#ifdef PSX_COSIM - cosim_instr(0x00002C38u); -#endif -label_BFC1273C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1273C: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C3Cu); return; } g_debug_last_store_pc = 0x00002C3Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C40u); -#endif - /* 0xBFC12740: 8C680018 lw $t0, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C40u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12744: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC12748: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x00002C50u; /* jalr link before delay slot */ - psx_delay_BFC12748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1274C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C4Cu); -#endif - if (psx_delay_BFC12748) { - psx_delay_BFC12748 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x00002C50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC12750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C50u); -#endif - /* 0xBFC12750: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C50u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12754: 18400005 blez $v0, 0xBFC1276C */ - uint32_t psx_brA_BFC12754 = cpu->gpr[2]; - psx_taken_BFC12754 = ((int32_t)psx_brA_BFC12754 <= 0); - psx_delay_BFC12754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12758: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002C58u); -#endif - if (psx_delay_BFC12754) { - psx_delay_BFC12754 = 0; - if (psx_taken_BFC12754) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C6Cu); - goto label_BFC1276C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C5Cu); - } -label_BFC1275C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C5Cu); -#endif - /* 0xBFC1275C: 8C890010 lw $t1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C5Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12760: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC12764: 01225021 addu $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[2]; - PGXP_ALU(0x01225021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC12768: AC8A0010 sw $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C68u); return; } g_debug_last_store_pc = 0x00002C68u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C68u); -#endif -label_BFC1276C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1276C: 04410005 bgez $v0, 0xBFC12784 */ - uint32_t psx_brA_BFC1276C = cpu->gpr[2]; - psx_taken_BFC1276C = ((int32_t)psx_brA_BFC1276C >= 0); - psx_delay_BFC1276C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12770: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002C70u); -#endif - if (psx_delay_BFC1276C) { - psx_delay_BFC1276C = 0; - if (psx_taken_BFC1276C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C84u); - goto label_BFC12784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C74u); - } -label_BFC12774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C74u); -#endif - /* 0xBFC12774: 8C8B0018 lw $t3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C74u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12778: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1277C: AC2B8640 sw $t3, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C7Cu); return; } g_debug_last_store_pc = 0x00002C7Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B8640u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12780: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002C80u); -#endif -label_BFC12784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C84u); -#endif - /* 0xBFC12784: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12788: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00002C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1278C: 03E00008 jr $ra */ - psx_delay_BFC1278C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12790: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002C90u); -#endif - if (psx_delay_BFC1278C) { - psx_delay_BFC1278C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002C94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002C94u); - int psx_delay_BFC127A0 = 0; - int psx_delay_BFC127A8 = 0; - int psx_taken_BFC127A8 = 0; - int psx_delay_BFC127B8 = 0; - int psx_taken_BFC127B8 = 0; - int psx_delay_BFC127CC = 0; - int psx_taken_BFC127CC = 0; - int psx_delay_BFC127D4 = 0; - int psx_delay_BFC127F0 = 0; - int psx_taken_BFC127F0 = 0; - int psx_delay_BFC1280C = 0; - int psx_delay_BFC12818 = 0; - int psx_taken_BFC12818 = 0; - int psx_delay_BFC12844 = 0; - int psx_taken_BFC12844 = 0; - int psx_delay_BFC12860 = 0; - int psx_taken_BFC12860 = 0; - int psx_delay_BFC1286C = 0; - int psx_taken_BFC1286C = 0; - int psx_delay_BFC12878 = 0; - int psx_delay_BFC12880 = 0; - int psx_taken_BFC12880 = 0; - int psx_delay_BFC1289C = 0; - int psx_taken_BFC1289C = 0; - int psx_delay_BFC128B4 = 0; - int psx_delay_BFC128C0 = 0; - int psx_taken_BFC128C0 = 0; - int psx_delay_BFC128D8 = 0; - int psx_taken_BFC128D8 = 0; - int psx_delay_BFC128F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC127A8u: goto label_BFC127A8; - case 0xBFC127B0u: goto label_BFC127B0; - case 0xBFC127C0u: goto label_BFC127C0; - case 0xBFC127D4u: goto label_BFC127D4; - case 0xBFC127DCu: goto label_BFC127DC; - case 0xBFC127F8u: goto label_BFC127F8; - case 0xBFC12814u: goto label_BFC12814; - case 0xBFC12820u: goto label_BFC12820; - case 0xBFC12824u: goto label_BFC12824; - case 0xBFC1284Cu: goto label_BFC1284C; - case 0xBFC12868u: goto label_BFC12868; - case 0xBFC1286Cu: goto label_BFC1286C; - case 0xBFC12874u: goto label_BFC12874; - case 0xBFC12880u: goto label_BFC12880; - case 0xBFC12888u: goto label_BFC12888; - case 0xBFC128A4u: goto label_BFC128A4; - case 0xBFC128A8u: goto label_BFC128A8; - case 0xBFC128BCu: goto label_BFC128BC; - case 0xBFC128C8u: goto label_BFC128C8; - case 0xBFC128D8u: goto label_BFC128D8; - case 0xBFC128E0u: goto label_BFC128E0; - case 0xBFC128F0u: goto label_BFC128F0; - default: break; - } - } -label_BFC12794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12794: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12798: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C98u); return; } g_debug_last_store_pc = 0x00002C98u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1279C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C9Cu); return; } g_debug_last_store_pc = 0x00002C9Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC127A0: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002CA8u; /* jal link before delay slot */ - psx_delay_BFC127A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC127A4: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CA4u); return; } g_debug_last_store_pc = 0x00002CA4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CA4u); -#endif - if (psx_delay_BFC127A0) { - psx_delay_BFC127A0 = 0; - cpu->gpr[31] = 0x00002CA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC127A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC127A8: 10400005 beq $v0, $zero, 0xBFC127C0 */ - uint32_t psx_brA_BFC127A8 = cpu->gpr[2]; uint32_t psx_brB_BFC127A8 = cpu->gpr[0]; - psx_taken_BFC127A8 = (psx_brA_BFC127A8 == psx_brB_BFC127A8); - psx_delay_BFC127A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC127AC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002CACu); -#endif - if (psx_delay_BFC127A8) { - psx_delay_BFC127A8 = 0; - if (psx_taken_BFC127A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CC0u); - goto label_BFC127C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CB0u); - } -label_BFC127B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CB0u); -#endif - /* 0xBFC127B0: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC127B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC127B8: 15C00006 bne $t6, $zero, 0xBFC127D4 */ - uint32_t psx_brA_BFC127B8 = cpu->gpr[14]; uint32_t psx_brB_BFC127B8 = cpu->gpr[0]; - psx_taken_BFC127B8 = (psx_brA_BFC127B8 != psx_brB_BFC127B8); - psx_delay_BFC127B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC127BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002CBCu); -#endif - if (psx_delay_BFC127B8) { - psx_delay_BFC127B8 = 0; - if (psx_taken_BFC127B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CD4u); - goto label_BFC127D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CC0u); - } -label_BFC127C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC127C0: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC127C4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC127C8: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CC8u); return; } g_debug_last_store_pc = 0x00002CC8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC127CC: 10000048 beq $zero, $zero, 0xBFC128F0 */ - uint32_t psx_brA_BFC127CC = cpu->gpr[0]; uint32_t psx_brB_BFC127CC = cpu->gpr[0]; - psx_taken_BFC127CC = (psx_brA_BFC127CC == psx_brB_BFC127CC); - psx_delay_BFC127CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC127D0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002CD0u); -#endif - if (psx_delay_BFC127CC) { - psx_delay_BFC127CC = 0; - if (psx_taken_BFC127CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DF0u); - goto label_BFC128F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CD4u); - } -label_BFC127D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC127D4: 0C000FA0 jal 0xB0003E80 */ - cpu->gpr[31] = 0x00002CDCu; /* jal link before delay slot */ - psx_delay_BFC127D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC127D8: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CD8u); return; } g_debug_last_store_pc = 0x00002CD8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CD8u); -#endif - if (psx_delay_BFC127D4) { - psx_delay_BFC127D4 = 0; - cpu->gpr[31] = 0x00002CDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E80u); - cpu->pc = 0x00003E80u; return; - } -label_BFC127DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CDCu); -#endif - /* 0xBFC127DC: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CDCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC127E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002CE0u); -#endif - /* 0xBFC127E4: 8C980014 lw $t8, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CE4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C980014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC127E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC127EC: 33190010 andi $t9, $t8, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x10u; - PGXP_ALU(0x33190010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00002CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC127F0: 1320000C beq $t9, $zero, 0xBFC12824 */ - uint32_t psx_brA_BFC127F0 = cpu->gpr[25]; uint32_t psx_brB_BFC127F0 = cpu->gpr[0]; - psx_taken_BFC127F0 = (psx_brA_BFC127F0 == psx_brB_BFC127F0); - psx_delay_BFC127F0 = 1; - /* 0xBFC127F4: 8FAA002C lw $t2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CF4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA002Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CF4u); -#endif - if (psx_delay_BFC127F0) { - psx_delay_BFC127F0 = 0; - if (psx_taken_BFC127F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D24u); - goto label_BFC12824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002CF8u); - } -label_BFC127F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC127F8: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CF8u); return; } g_debug_last_store_pc = 0x00002CF8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CF8u); -#endif - /* 0xBFC127FC: 8C88001C lw $t0, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CFCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C88001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D00u); -#endif - /* 0xBFC12800: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D00u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D00u); -#endif - /* 0xBFC12804: 8D090028 lw $t1, 40($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D04u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D04u); -#endif - /* 0xBFC12808: 8FA60030 lw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D08u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC1280C: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00002D14u; /* jalr link before delay slot */ - psx_delay_BFC1280C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12810: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D10u); -#endif - if (psx_delay_BFC1280C) { - psx_delay_BFC1280C = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00002D14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC12814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D14u); -#endif - /* 0xBFC12814: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D14u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12818: 1000002F beq $zero, $zero, 0xBFC128D8 */ - uint32_t psx_brA_BFC12818 = cpu->gpr[0]; uint32_t psx_brB_BFC12818 = cpu->gpr[0]; - psx_taken_BFC12818 = (psx_brA_BFC12818 == psx_brB_BFC12818); - psx_delay_BFC12818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1281C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002D1Cu); -#endif - if (psx_delay_BFC12818) { - psx_delay_BFC12818 = 0; - if (psx_taken_BFC12818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DD8u); - goto label_BFC128D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D20u); - } -label_BFC12820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D20u); -#endif - /* 0xBFC12820: 8FAA002C lw $t2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D20u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA002Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D20u); -#endif -label_BFC12824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D24u); -#endif - /* 0xBFC12824: 8C83001C lw $v1, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D24u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C83001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC12828: AC8A0008 sw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D28u); return; } g_debug_last_store_pc = 0x00002D28u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D28u); -#endif - /* 0xBFC1282C: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D2Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC12834: AC8B000C sw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D34u); return; } g_debug_last_store_pc = 0x00002D34u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D34u); -#endif - /* 0xBFC12838: 8C6C0004 lw $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D38u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1283C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC12840: 318D0004 andi $t5, $t4, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u; - PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00002D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC12844: 11A00018 beq $t5, $zero, 0xBFC128A8 */ - uint32_t psx_brA_BFC12844 = cpu->gpr[13]; uint32_t psx_brB_BFC12844 = cpu->gpr[0]; - psx_taken_BFC12844 = (psx_brA_BFC12844 == psx_brB_BFC12844); - psx_delay_BFC12844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D48u); -#endif - if (psx_delay_BFC12844) { - psx_delay_BFC12844 = 0; - if (psx_taken_BFC12844) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DA8u); - goto label_BFC128A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D4Cu); - } -label_BFC1284C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D4Cu); -#endif - /* 0xBFC1284C: 8C620008 lw $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D50u); -#endif - /* 0xBFC12850: 8C8E0010 lw $t6, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12854: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC12858: 01C2001B divu $t6, $v0 */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[2]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C2001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x00002D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1285C: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12860: 14400002 bne $v0, $zero, 0xBFC1286C */ - uint32_t psx_brA_BFC12860 = cpu->gpr[2]; uint32_t psx_brB_BFC12860 = cpu->gpr[0]; - psx_taken_BFC12860 = (psx_brA_BFC12860 != psx_brB_BFC12860); - psx_delay_BFC12860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12864: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D64u); -#endif - if (psx_delay_BFC12860) { - psx_delay_BFC12860 = 0; - if (psx_taken_BFC12860) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D6Cu); - goto label_BFC1286C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D68u); - } -label_BFC12868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC12868: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x00002D68u); return; -#ifdef PSX_COSIM - cosim_instr(0x00002D68u); -#endif -label_BFC1286C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1286C: 11E00006 beq $t7, $zero, 0xBFC12888 */ - uint32_t psx_brA_BFC1286C = cpu->gpr[15]; uint32_t psx_brB_BFC1286C = cpu->gpr[0]; - psx_taken_BFC1286C = (psx_brA_BFC1286C == psx_brB_BFC1286C); - psx_delay_BFC1286C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D70u); -#endif - if (psx_delay_BFC1286C) { - psx_delay_BFC1286C = 0; - if (psx_taken_BFC1286C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D88u); - goto label_BFC12888; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D74u); - } -label_BFC12874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12874: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12878: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00002D80u; /* jal link before delay slot */ - psx_delay_BFC12878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1287C: 24846E08 addiu $a0, $a0, 28168 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28168)); - PGXP_ALU(0x24846E08u, cpu->gpr[4], _pgx1, 0x00006E08u); } -#ifdef PSX_COSIM - cosim_instr(0x00002D7Cu); -#endif - if (psx_delay_BFC12878) { - psx_delay_BFC12878 = 0; - cpu->gpr[31] = 0x00002D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC12880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12880: 1000001B beq $zero, $zero, 0xBFC128F0 */ - uint32_t psx_brA_BFC12880 = cpu->gpr[0]; uint32_t psx_brB_BFC12880 = cpu->gpr[0]; - psx_taken_BFC12880 = (psx_brA_BFC12880 == psx_brB_BFC12880); - psx_delay_BFC12880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12884: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002D84u); -#endif - if (psx_delay_BFC12880) { - psx_delay_BFC12880 = 0; - if (psx_taken_BFC12880) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DF0u); - goto label_BFC128F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002D88u); - } -label_BFC12888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D88u); -#endif - /* 0xBFC12888: 8C98000C lw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D88u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1288C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC12890: 0302001B divu $t8, $v0 */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[2]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0302001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x00002D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC12894: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC12898: AC99000C sw $t9, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002D98u); return; } g_debug_last_store_pc = 0x00002D98u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC99000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1289C: 14400002 bne $v0, $zero, 0xBFC128A8 */ - uint32_t psx_brA_BFC1289C = cpu->gpr[2]; uint32_t psx_brB_BFC1289C = cpu->gpr[0]; - psx_taken_BFC1289C = (psx_brA_BFC1289C != psx_brB_BFC1289C); - psx_delay_BFC1289C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC128A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002DA0u); -#endif - if (psx_delay_BFC1289C) { - psx_delay_BFC1289C = 0; - if (psx_taken_BFC1289C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DA8u); - goto label_BFC128A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DA4u); - } -label_BFC128A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC128A4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x00002DA4u); return; -#ifdef PSX_COSIM - cosim_instr(0x00002DA4u); -#endif -label_BFC128A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC128A8: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DA8u); return; } g_debug_last_store_pc = 0x00002DA8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DA8u); -#endif - /* 0xBFC128AC: 8C680018 lw $t0, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC128B0: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00002DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC128B4: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x00002DBCu; /* jalr link before delay slot */ - psx_delay_BFC128B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC128B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002DB8u); -#endif - if (psx_delay_BFC128B4) { - psx_delay_BFC128B4 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x00002DBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC128BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DBCu); -#endif - /* 0xBFC128BC: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DBCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC128C0: 18400005 blez $v0, 0xBFC128D8 */ - uint32_t psx_brA_BFC128C0 = cpu->gpr[2]; - psx_taken_BFC128C0 = ((int32_t)psx_brA_BFC128C0 <= 0); - psx_delay_BFC128C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC128C4: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002DC4u); -#endif - if (psx_delay_BFC128C0) { - psx_delay_BFC128C0 = 0; - if (psx_taken_BFC128C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DD8u); - goto label_BFC128D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DC8u); - } -label_BFC128C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DC8u); -#endif - /* 0xBFC128C8: 8C890010 lw $t1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DC8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC128CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC128D0: 01225021 addu $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[2]; - PGXP_ALU(0x01225021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC128D4: AC8A0010 sw $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DD4u); return; } g_debug_last_store_pc = 0x00002DD4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DD4u); -#endif -label_BFC128D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC128D8: 04410005 bgez $v0, 0xBFC128F0 */ - uint32_t psx_brA_BFC128D8 = cpu->gpr[2]; - psx_taken_BFC128D8 = ((int32_t)psx_brA_BFC128D8 >= 0); - psx_delay_BFC128D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC128DC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002DDCu); -#endif - if (psx_delay_BFC128D8) { - psx_delay_BFC128D8 = 0; - if (psx_taken_BFC128D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DF0u); - goto label_BFC128F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002DE0u); - } -label_BFC128E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DE0u); -#endif - /* 0xBFC128E0: 8C8B0018 lw $t3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DE0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC128E4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC128E8: AC2B8640 sw $t3, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DE8u); return; } g_debug_last_store_pc = 0x00002DE8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B8640u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC128EC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002DECu); -#endif -label_BFC128F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002DF0u); -#endif - /* 0xBFC128F0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002DF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC128F4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00002DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC128F8: 03E00008 jr $ra */ - psx_delay_BFC128F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC128FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002DFCu); -#endif - if (psx_delay_BFC128F8) { - psx_delay_BFC128F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002E00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002E00u); - int psx_delay_BFC12910 = 0; - int psx_delay_BFC12918 = 0; - int psx_taken_BFC12918 = 0; - int psx_delay_BFC12928 = 0; - int psx_taken_BFC12928 = 0; - int psx_delay_BFC1293C = 0; - int psx_taken_BFC1293C = 0; - int psx_delay_BFC12958 = 0; - int psx_delay_BFC12964 = 0; - int psx_taken_BFC12964 = 0; - int psx_delay_BFC12978 = 0; - int psx_taken_BFC12978 = 0; - int psx_delay_BFC12990 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12918u: goto label_BFC12918; - case 0xBFC12920u: goto label_BFC12920; - case 0xBFC12930u: goto label_BFC12930; - case 0xBFC12944u: goto label_BFC12944; - case 0xBFC12960u: goto label_BFC12960; - case 0xBFC1296Cu: goto label_BFC1296C; - case 0xBFC12980u: goto label_BFC12980; - case 0xBFC12988u: goto label_BFC12988; - default: break; - } - } -label_BFC12900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12900: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12904: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E04u); return; } g_debug_last_store_pc = 0x00002E04u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12908: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E08u); return; } g_debug_last_store_pc = 0x00002E08u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E08u); -#endif - /* 0xBFC1290C: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12910: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002E18u; /* jal link before delay slot */ - psx_delay_BFC12910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E14u); -#endif - if (psx_delay_BFC12910) { - psx_delay_BFC12910 = 0; - cpu->gpr[31] = 0x00002E18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC12918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12918: 10400005 beq $v0, $zero, 0xBFC12930 */ - uint32_t psx_brA_BFC12918 = cpu->gpr[2]; uint32_t psx_brB_BFC12918 = cpu->gpr[0]; - psx_taken_BFC12918 = (psx_brA_BFC12918 == psx_brB_BFC12918); - psx_delay_BFC12918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1291C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002E1Cu); -#endif - if (psx_delay_BFC12918) { - psx_delay_BFC12918 = 0; - if (psx_taken_BFC12918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E30u); - goto label_BFC12930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E20u); - } -label_BFC12920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E20u); -#endif - /* 0xBFC12920: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E20u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC12928: 15C00006 bne $t6, $zero, 0xBFC12944 */ - uint32_t psx_brA_BFC12928 = cpu->gpr[14]; uint32_t psx_brB_BFC12928 = cpu->gpr[0]; - psx_taken_BFC12928 = (psx_brA_BFC12928 != psx_brB_BFC12928); - psx_delay_BFC12928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1292C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E2Cu); -#endif - if (psx_delay_BFC12928) { - psx_delay_BFC12928 = 0; - if (psx_taken_BFC12928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E44u); - goto label_BFC12944; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E30u); - } -label_BFC12930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC12930: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12934: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC12938: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E38u); return; } g_debug_last_store_pc = 0x00002E38u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1293C: 10000012 beq $zero, $zero, 0xBFC12988 */ - uint32_t psx_brA_BFC1293C = cpu->gpr[0]; uint32_t psx_brB_BFC1293C = cpu->gpr[0]; - psx_taken_BFC1293C = (psx_brA_BFC1293C == psx_brB_BFC1293C); - psx_delay_BFC1293C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12940: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002E40u); -#endif - if (psx_delay_BFC1293C) { - psx_delay_BFC1293C = 0; - if (psx_taken_BFC1293C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E88u); - goto label_BFC12988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E44u); - } -label_BFC12944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12944: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E44u); return; } g_debug_last_store_pc = 0x00002E44u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E44u); -#endif - /* 0xBFC12948: 8C98001C lw $t8, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E48u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1294C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E50u); -#endif - /* 0xBFC12950: 8F19001C lw $t9, 28($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E50u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F19001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC12958: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x00002E60u; /* jalr link before delay slot */ - psx_delay_BFC12958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1295C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E5Cu); -#endif - if (psx_delay_BFC12958) { - psx_delay_BFC12958 = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x00002E60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC12960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E60u); -#endif - /* 0xBFC12960: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12964: 10400006 beq $v0, $zero, 0xBFC12980 */ - uint32_t psx_brA_BFC12964 = cpu->gpr[2]; uint32_t psx_brB_BFC12964 = cpu->gpr[0]; - psx_taken_BFC12964 = (psx_brA_BFC12964 == psx_brB_BFC12964); - psx_delay_BFC12964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12968: AC800000 sw $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E68u); return; } g_debug_last_store_pc = 0x00002E68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E68u); -#endif - if (psx_delay_BFC12964) { - psx_delay_BFC12964 = 0; - if (psx_taken_BFC12964) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E80u); - goto label_BFC12980; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E6Cu); - } -label_BFC1296C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E6Cu); -#endif - /* 0xBFC1296C: 8C880018 lw $t0, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E6Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12970: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12974: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12978: 10000003 beq $zero, $zero, 0xBFC12988 */ - uint32_t psx_brA_BFC12978 = cpu->gpr[0]; uint32_t psx_brB_BFC12978 = cpu->gpr[0]; - psx_taken_BFC12978 = (psx_brA_BFC12978 == psx_brB_BFC12978); - psx_delay_BFC12978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1297C: AC288640 sw $t0, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E7Cu); return; } g_debug_last_store_pc = 0x00002E7Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC288640u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E7Cu); -#endif - if (psx_delay_BFC12978) { - psx_delay_BFC12978 = 0; - if (psx_taken_BFC12978) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E88u); - goto label_BFC12988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E80u); - } -label_BFC12980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E80u); -#endif - /* 0xBFC12980: 8FA20028 lw $v0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E80u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20028u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E84u); -#endif -label_BFC12988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E88u); -#endif - /* 0xBFC12988: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1298C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00002E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12990: 03E00008 jr $ra */ - psx_delay_BFC12990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002E94u); -#endif - if (psx_delay_BFC12990) { - psx_delay_BFC12990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002E98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002E98u); - int psx_delay_BFC129A0 = 0; - int psx_delay_BFC129A8 = 0; - int psx_taken_BFC129A8 = 0; - int psx_delay_BFC129B8 = 0; - int psx_taken_BFC129B8 = 0; - int psx_delay_BFC129CC = 0; - int psx_taken_BFC129CC = 0; - int psx_delay_BFC129E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC129A8u: goto label_BFC129A8; - case 0xBFC129B0u: goto label_BFC129B0; - case 0xBFC129C0u: goto label_BFC129C0; - case 0xBFC129D4u: goto label_BFC129D4; - case 0xBFC129DCu: goto label_BFC129DC; - default: break; - } - } -label_BFC12998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12998: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1299C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E9Cu); return; } g_debug_last_store_pc = 0x00002E9Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC129A0: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002EA8u; /* jal link before delay slot */ - psx_delay_BFC129A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002EA4u); -#endif - if (psx_delay_BFC129A0) { - psx_delay_BFC129A0 = 0; - cpu->gpr[31] = 0x00002EA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC129A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC129A8: 10400005 beq $v0, $zero, 0xBFC129C0 */ - uint32_t psx_brA_BFC129A8 = cpu->gpr[2]; uint32_t psx_brB_BFC129A8 = cpu->gpr[0]; - psx_taken_BFC129A8 = (psx_brA_BFC129A8 == psx_brB_BFC129A8); - psx_delay_BFC129A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC129AC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002EACu); -#endif - if (psx_delay_BFC129A8) { - psx_delay_BFC129A8 = 0; - if (psx_taken_BFC129A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002EC0u); - goto label_BFC129C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002EB0u); - } -label_BFC129B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EB0u); -#endif - /* 0xBFC129B0: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC129B8: 15C00006 bne $t6, $zero, 0xBFC129D4 */ - uint32_t psx_brA_BFC129B8 = cpu->gpr[14]; uint32_t psx_brB_BFC129B8 = cpu->gpr[0]; - psx_taken_BFC129B8 = (psx_brA_BFC129B8 != psx_brB_BFC129B8); - psx_delay_BFC129B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002EBCu); -#endif - if (psx_delay_BFC129B8) { - psx_delay_BFC129B8 = 0; - if (psx_taken_BFC129B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002ED4u); - goto label_BFC129D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002EC0u); - } -label_BFC129C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC129C0: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC129C4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC129C8: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EC8u); return; } g_debug_last_store_pc = 0x00002EC8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129CC: 10000003 beq $zero, $zero, 0xBFC129DC */ - uint32_t psx_brA_BFC129CC = cpu->gpr[0]; uint32_t psx_brB_BFC129CC = cpu->gpr[0]; - psx_taken_BFC129CC = (psx_brA_BFC129CC == psx_brB_BFC129CC); - psx_delay_BFC129CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC129D0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002ED0u); -#endif - if (psx_delay_BFC129CC) { - psx_delay_BFC129CC = 0; - if (psx_taken_BFC129CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002EDCu); - goto label_BFC129DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002ED4u); - } -label_BFC129D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002ED4u); -#endif - /* 0xBFC129D4: 8C620018 lw $v0, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002ED4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620018u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002ED8u); -#endif -label_BFC129DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EDCu); -#endif - /* 0xBFC129DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC129E0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC129E4: 03E00008 jr $ra */ - psx_delay_BFC129E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002EE8u); -#endif - if (psx_delay_BFC129E4) { - psx_delay_BFC129E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002EEC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002EECu); - int psx_delay_BFC129F4 = 0; -label_BFC129EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC129EC: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EF0u); -#endif - /* 0xBFC129F0: 8C428640 lw $v0, -31168($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EF0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428640u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00002EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC129F4: 03E00008 jr $ra */ - psx_delay_BFC129F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC129F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002EF8u); -#endif - if (psx_delay_BFC129F4) { - psx_delay_BFC129F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002EFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002EFCu); - int psx_delay_BFC12A08 = 0; - int psx_delay_BFC12A18 = 0; - int psx_taken_BFC12A18 = 0; - int psx_delay_BFC12A28 = 0; - int psx_taken_BFC12A28 = 0; - int psx_delay_BFC12A3C = 0; - int psx_taken_BFC12A3C = 0; - int psx_delay_BFC12A44 = 0; - int psx_taken_BFC12A44 = 0; - int psx_delay_BFC12A50 = 0; - int psx_taken_BFC12A50 = 0; - int psx_delay_BFC12A64 = 0; - int psx_taken_BFC12A64 = 0; - int psx_delay_BFC12A70 = 0; - int psx_taken_BFC12A70 = 0; - int psx_delay_BFC12A8C = 0; - int psx_delay_BFC12A98 = 0; - int psx_taken_BFC12A98 = 0; - int psx_delay_BFC12AAC = 0; - int psx_taken_BFC12AAC = 0; - int psx_delay_BFC12AC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12A10u: goto label_BFC12A10; - case 0xBFC12A20u: goto label_BFC12A20; - case 0xBFC12A30u: goto label_BFC12A30; - case 0xBFC12A44u: goto label_BFC12A44; - case 0xBFC12A4Cu: goto label_BFC12A4C; - case 0xBFC12A58u: goto label_BFC12A58; - case 0xBFC12A5Cu: goto label_BFC12A5C; - case 0xBFC12A64u: goto label_BFC12A64; - case 0xBFC12A6Cu: goto label_BFC12A6C; - case 0xBFC12A70u: goto label_BFC12A70; - case 0xBFC12A78u: goto label_BFC12A78; - case 0xBFC12A94u: goto label_BFC12A94; - case 0xBFC12AA0u: goto label_BFC12AA0; - case 0xBFC12AB4u: goto label_BFC12AB4; - case 0xBFC12AB8u: goto label_BFC12AB8; - default: break; - } - } -label_BFC129FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC129FC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00002EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12A00: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F00u); return; } g_debug_last_store_pc = 0x00002F00u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC12A04: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F04u); return; } g_debug_last_store_pc = 0x00002F04u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12A08: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x00002F10u; /* jal link before delay slot */ - psx_delay_BFC12A08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC12A0C: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F0Cu); return; } g_debug_last_store_pc = 0x00002F0Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F0Cu); -#endif - if (psx_delay_BFC12A08) { - psx_delay_BFC12A08 = 0; - cpu->gpr[31] = 0x00002F10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC12A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F10u); -#endif - /* 0xBFC12A10: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F10u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F10u); -#endif - /* 0xBFC12A14: 8FA60028 lw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F14u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12A18: 10400005 beq $v0, $zero, 0xBFC12A30 */ - uint32_t psx_brA_BFC12A18 = cpu->gpr[2]; uint32_t psx_brB_BFC12A18 = cpu->gpr[0]; - psx_taken_BFC12A18 = (psx_brA_BFC12A18 == psx_brB_BFC12A18); - psx_delay_BFC12A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC12A1C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002F1Cu); -#endif - if (psx_delay_BFC12A18) { - psx_delay_BFC12A18 = 0; - if (psx_taken_BFC12A18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F30u); - goto label_BFC12A30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F20u); - } -label_BFC12A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F20u); -#endif - /* 0xBFC12A20: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F20u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12A28: 14600011 bne $v1, $zero, 0xBFC12A70 */ - uint32_t psx_brA_BFC12A28 = cpu->gpr[3]; uint32_t psx_brB_BFC12A28 = cpu->gpr[0]; - psx_taken_BFC12A28 = (psx_brA_BFC12A28 != psx_brB_BFC12A28); - psx_delay_BFC12A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12A2C: 24016601 addiu $at, $zero, 26113 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26113)); - PGXP_ALU(0x24016601u, cpu->gpr[1], _pgx1, 0x00006601u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F2Cu); -#endif - if (psx_delay_BFC12A28) { - psx_delay_BFC12A28 = 0; - if (psx_taken_BFC12A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F70u); - goto label_BFC12A70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F30u); - } -label_BFC12A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC12A30: 240E0009 addiu $t6, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240E0009u, cpu->gpr[14], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12A34: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC12A38: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F38u); return; } g_debug_last_store_pc = 0x00002F38u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A3C: 1000001E beq $zero, $zero, 0xBFC12AB8 */ - uint32_t psx_brA_BFC12A3C = cpu->gpr[0]; uint32_t psx_brB_BFC12A3C = cpu->gpr[0]; - psx_taken_BFC12A3C = (psx_brA_BFC12A3C == psx_brB_BFC12A3C); - psx_delay_BFC12A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12A40: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00002F40u); -#endif - if (psx_delay_BFC12A3C) { - psx_delay_BFC12A3C = 0; - if (psx_taken_BFC12A3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FB8u); - goto label_BFC12AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F44u); - } -label_BFC12A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC12A44: 10C00005 beq $a2, $zero, 0xBFC12A5C */ - uint32_t psx_brA_BFC12A44 = cpu->gpr[6]; uint32_t psx_brB_BFC12A44 = cpu->gpr[0]; - psx_taken_BFC12A44 = (psx_brA_BFC12A44 == psx_brB_BFC12A44); - psx_delay_BFC12A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12A48: 2401FFFB addiu $at, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x2401FFFBu, cpu->gpr[1], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x00002F48u); -#endif - if (psx_delay_BFC12A44) { - psx_delay_BFC12A44 = 0; - if (psx_taken_BFC12A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F5Cu); - goto label_BFC12A5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F4Cu); - } -label_BFC12A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC12A4C: 346F0004 ori $t7, $v1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] | 0x4u; - PGXP_ALU(0x346F0004u, cpu->gpr[15], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A50: 10000004 beq $zero, $zero, 0xBFC12A64 */ - uint32_t psx_brA_BFC12A50 = cpu->gpr[0]; uint32_t psx_brB_BFC12A50 = cpu->gpr[0]; - psx_taken_BFC12A50 = (psx_brA_BFC12A50 == psx_brB_BFC12A50); - psx_delay_BFC12A50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC12A54: AC4F0000 sw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F54u); return; } g_debug_last_store_pc = 0x00002F54u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F54u); -#endif - if (psx_delay_BFC12A50) { - psx_delay_BFC12A50 = 0; - if (psx_taken_BFC12A50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F64u); - goto label_BFC12A64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F58u); - } -label_BFC12A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12A58: 2401FFFB addiu $at, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x2401FFFBu, cpu->gpr[1], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x00002F58u); -#endif -label_BFC12A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000Au); -#endif - /* 0xBFC12A5C: 0061C024 and $t8, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x0061C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC12A60: AC580000 sw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F60u); return; } g_debug_last_store_pc = 0x00002F60u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F60u); -#endif -label_BFC12A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A64: 10000014 beq $zero, $zero, 0xBFC12AB8 */ - uint32_t psx_brA_BFC12A64 = cpu->gpr[0]; uint32_t psx_brB_BFC12A64 = cpu->gpr[0]; - psx_taken_BFC12A64 = (psx_brA_BFC12A64 == psx_brB_BFC12A64); - psx_delay_BFC12A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12A68: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F68u); -#endif - if (psx_delay_BFC12A64) { - psx_delay_BFC12A64 = 0; - if (psx_taken_BFC12A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FB8u); - goto label_BFC12AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F6Cu); - } -label_BFC12A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12A6C: 24016601 addiu $at, $zero, 26113 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26113)); - PGXP_ALU(0x24016601u, cpu->gpr[1], _pgx1, 0x00006601u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F6Cu); -#endif -label_BFC12A70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC12A70: 10A1FFF4 beq $a1, $at, 0xBFC12A44 */ - uint32_t psx_brA_BFC12A70 = cpu->gpr[5]; uint32_t psx_brB_BFC12A70 = cpu->gpr[1]; - psx_taken_BFC12A70 = (psx_brA_BFC12A70 == psx_brB_BFC12A70); - psx_delay_BFC12A70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002F74u); -#endif - if (psx_delay_BFC12A70) { - psx_delay_BFC12A70 = 0; - if (psx_taken_BFC12A70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F44u); - goto label_BFC12A44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002F78u); - } -label_BFC12A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12A78: AFA4001C sw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F78u); return; } g_debug_last_store_pc = 0x00002F78u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F78u); -#endif - /* 0xBFC12A7C: 8C99001C lw $t9, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F7Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C99001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002F80u); -#endif - /* 0xBFC12A84: 8F280020 lw $t0, 32($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F84u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2000000u); } - PGXP_LOAD(0x8F280020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC12A8C: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x00002F94u; /* jalr link before delay slot */ - psx_delay_BFC12A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12A90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002F90u); -#endif - if (psx_delay_BFC12A8C) { - psx_delay_BFC12A8C = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x00002F94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC12A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002F94u); -#endif - /* 0xBFC12A94: 8FA4001C lw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12A98: 04410007 bgez $v0, 0xBFC12AB8 */ - uint32_t psx_brA_BFC12A98 = cpu->gpr[2]; - psx_taken_BFC12A98 = ((int32_t)psx_brA_BFC12A98 >= 0); - psx_delay_BFC12A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12A9C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002F9Cu); -#endif - if (psx_delay_BFC12A98) { - psx_delay_BFC12A98 = 0; - if (psx_taken_BFC12A98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FB8u); - goto label_BFC12AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FA0u); - } -label_BFC12AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FA0u); -#endif - /* 0xBFC12AA0: 8C890018 lw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FA0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12AA4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12AA8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12AAC: 10000002 beq $zero, $zero, 0xBFC12AB8 */ - uint32_t psx_brA_BFC12AAC = cpu->gpr[0]; uint32_t psx_brB_BFC12AAC = cpu->gpr[0]; - psx_taken_BFC12AAC = (psx_brA_BFC12AAC == psx_brB_BFC12AAC); - psx_delay_BFC12AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC12AB0: AC298640 sw $t1, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FB0u); return; } g_debug_last_store_pc = 0x00002FB0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC298640u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FB0u); -#endif - if (psx_delay_BFC12AAC) { - psx_delay_BFC12AAC = 0; - if (psx_taken_BFC12AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FB8u); - goto label_BFC12AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FB4u); - } -label_BFC12AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12AB4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FB4u); -#endif -label_BFC12AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FB8u); -#endif - /* 0xBFC12AB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12ABC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12AC0: 03E00008 jr $ra */ - psx_delay_BFC12AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002FC4u); -#endif - if (psx_delay_BFC12AC0) { - psx_delay_BFC12AC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00002FC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00002FC8u); - int psx_delay_BFC12AE0 = 0; - int psx_delay_BFC12AE8 = 0; - int psx_delay_BFC12AF8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12AE8u: goto label_BFC12AE8; - case 0xBFC12AF0u: goto label_BFC12AF0; - default: break; - } - } -label_BFC12AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12AC8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12ACC: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FCCu); return; } g_debug_last_store_pc = 0x00002FCCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC12AD0: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00002FD0u); -#endif - /* 0xBFC12AD4: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FD4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12AD8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FD8u); return; } g_debug_last_store_pc = 0x00002FD8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12ADC: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00002FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12AE0: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00002FE8u; /* jal link before delay slot */ - psx_delay_BFC12AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12AE4: 24846E28 addiu $a0, $a0, 28200 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28200)); - PGXP_ALU(0x24846E28u, cpu->gpr[4], _pgx1, 0x00006E28u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FE4u); -#endif - if (psx_delay_BFC12AE0) { - psx_delay_BFC12AE0 = 0; - cpu->gpr[31] = 0x00002FE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC12AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12AE8: 0C001ABC jal 0xB0006AF0 */ - cpu->gpr[31] = 0x00002FF0u; /* jal link before delay slot */ - psx_delay_BFC12AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12AEC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FECu); -#endif - if (psx_delay_BFC12AE8) { - psx_delay_BFC12AE8 = 0; - cpu->gpr[31] = 0x00002FF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AF0u); - cpu->pc = 0x00006AF0u; return; - } -label_BFC12AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00002FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00002FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00002FF0u); -#endif - /* 0xBFC12AF0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00002FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12AF4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00002FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12AF8: 03E00008 jr $ra */ - psx_delay_BFC12AF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12AFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00002FFCu); -#endif - if (psx_delay_BFC12AF8) { - psx_delay_BFC12AF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003000(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003000u); - int psx_delay_BFC12B1C = 0; - int psx_delay_BFC12B28 = 0; - int psx_taken_BFC12B28 = 0; - int psx_delay_BFC12B38 = 0; - int psx_delay_BFC12B44 = 0; - int psx_delay_BFC12B58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12B1Cu: goto label_BFC12B1C; - case 0xBFC12B24u: goto label_BFC12B24; - case 0xBFC12B30u: goto label_BFC12B30; - case 0xBFC12B40u: goto label_BFC12B40; - case 0xBFC12B4Cu: goto label_BFC12B4C; - default: break; - } - } -label_BFC12B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12B00: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC12B04: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003004u); return; } g_debug_last_store_pc = 0x00003004u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC12B08: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003008u); return; } g_debug_last_store_pc = 0x00003008u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12B0C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000300Cu); return; } g_debug_last_store_pc = 0x0000300Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000300Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12B10: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003010u); return; } g_debug_last_store_pc = 0x00003010u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC12B14: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC12B18: 24110010 addiu $s1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24110010u, cpu->gpr[17], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x00003018u); -#endif -label_BFC12B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000301Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12B1C: 0C000B80 jal 0xB0002E00 */ - cpu->gpr[31] = 0x00003024u; /* jal link before delay slot */ - psx_delay_BFC12B1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC12B20: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003020u); -#endif - if (psx_delay_BFC12B1C) { - psx_delay_BFC12B1C = 0; - cpu->gpr[31] = 0x00003024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002E00u); - cpu->pc = 0x00002E00u; return; - } -label_BFC12B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12B24: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC12B28: 1611FFFC bne $s0, $s1, 0xBFC12B1C */ - uint32_t psx_brA_BFC12B28 = cpu->gpr[16]; uint32_t psx_brB_BFC12B28 = cpu->gpr[17]; - psx_taken_BFC12B28 = (psx_brA_BFC12B28 != psx_brB_BFC12B28); - psx_delay_BFC12B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000302Cu); -#endif - if (psx_delay_BFC12B28) { - psx_delay_BFC12B28 = 0; - if (psx_taken_BFC12B28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000301Cu); - goto label_BFC12B1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003030u); - } -label_BFC12B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12B30: 3C040001 lui $a0, 0x1 */ - cpu->gpr[4] = 0x00010000u; - PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003030u); -#endif - /* 0xBFC12B34: 8C848908 lw $a0, -30456($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -30456; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-30456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003034u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C848908u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12B38: 0C000A1C jal 0xB0002870 */ - cpu->gpr[31] = 0x00003040u; /* jal link before delay slot */ - psx_delay_BFC12B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000303Cu); -#endif - if (psx_delay_BFC12B38) { - psx_delay_BFC12B38 = 0; - cpu->gpr[31] = 0x00003040u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002870u); - cpu->pc = 0x00002870u; return; - } -label_BFC12B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003040u); -#endif - /* 0xBFC12B40: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003040u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12B44: 0C001AC0 jal 0xB0006B00 */ - cpu->gpr[31] = 0x0000304Cu; /* jal link before delay slot */ - psx_delay_BFC12B44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003048u); -#endif - if (psx_delay_BFC12B44) { - psx_delay_BFC12B44 = 0; - cpu->gpr[31] = 0x0000304Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B00u); - cpu->pc = 0x00006B00u; return; - } -label_BFC12B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000304Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000304Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000304Cu); -#endif - /* 0xBFC12B4C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000304Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000304Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003050u); -#endif - /* 0xBFC12B50: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003050u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003050u); -#endif - /* 0xBFC12B54: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003054u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12B58: 03E00008 jr $ra */ - psx_delay_BFC12B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12B5C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x0000305Cu); -#endif - if (psx_delay_BFC12B58) { - psx_delay_BFC12B58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003060(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003060u); - int psx_delay_BFC12B80 = 0; - int psx_taken_BFC12B80 = 0; - int psx_delay_BFC12B88 = 0; - int psx_taken_BFC12B88 = 0; - int psx_delay_BFC12B98 = 0; - int psx_taken_BFC12B98 = 0; - int psx_delay_BFC12BAC = 0; - int psx_delay_BFC12BC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12B78u: goto label_BFC12B78; - case 0xBFC12B88u: goto label_BFC12B88; - case 0xBFC12B90u: goto label_BFC12B90; - case 0xBFC12BA0u: goto label_BFC12BA0; - case 0xBFC12BB4u: goto label_BFC12BB4; - case 0xBFC12BB8u: goto label_BFC12BB8; - default: break; - } - } -label_BFC12B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12B60: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12B64: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12B68: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12B6C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000306Cu); return; } g_debug_last_store_pc = 0x0000306Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12B70: 24428908 addiu $v0, $v0, -30456 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-30456)); - PGXP_ALU(0x24428908u, cpu->gpr[2], _pgx1, 0xFFFF8908u); } -#ifdef PSX_COSIM - cosim_instr(0x00003070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12B74: 24638648 addiu $v1, $v1, -31160 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-31160)); - PGXP_ALU(0x24638648u, cpu->gpr[3], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x00003074u); -#endif -label_BFC12B78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003078u); -#endif - /* 0xBFC12B78: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003078u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000307Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC12B80: 15C00003 bne $t6, $zero, 0xBFC12B90 */ - uint32_t psx_brA_BFC12B80 = cpu->gpr[14]; uint32_t psx_brB_BFC12B80 = cpu->gpr[0]; - psx_taken_BFC12B80 = (psx_brA_BFC12B80 != psx_brB_BFC12B80); - psx_delay_BFC12B80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003084u); -#endif - if (psx_delay_BFC12B80) { - psx_delay_BFC12B80 = 0; - if (psx_taken_BFC12B80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003090u); - goto label_BFC12B90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003088u); - } -label_BFC12B88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B88: 1000000B beq $zero, $zero, 0xBFC12BB8 */ - uint32_t psx_brA_BFC12B88 = cpu->gpr[0]; uint32_t psx_brB_BFC12B88 = cpu->gpr[0]; - psx_taken_BFC12B88 = (psx_brA_BFC12B88 == psx_brB_BFC12B88); - psx_delay_BFC12B88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12B8C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000308Cu); -#endif - if (psx_delay_BFC12B88) { - psx_delay_BFC12B88 = 0; - if (psx_taken_BFC12B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030B8u); - goto label_BFC12BB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003090u); - } -label_BFC12B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12B90: 2463002C addiu $v1, $v1, 44 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (44)); - PGXP_ALU(0x2463002Cu, cpu->gpr[3], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC12B94: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12B98: 1420FFF7 bne $at, $zero, 0xBFC12B78 */ - uint32_t psx_brA_BFC12B98 = cpu->gpr[1]; uint32_t psx_brB_BFC12B98 = cpu->gpr[0]; - psx_taken_BFC12B98 = (psx_brA_BFC12B98 != psx_brB_BFC12B98); - psx_delay_BFC12B98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12B9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000309Cu); -#endif - if (psx_delay_BFC12B98) { - psx_delay_BFC12B98 = 0; - if (psx_taken_BFC12B98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003078u); - goto label_BFC12B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030A0u); - } -label_BFC12BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12BA0: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000030A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12BA4: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000030A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12BA8: 24A56E54 addiu $a1, $a1, 28244 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28244)); - PGXP_ALU(0x24A56E54u, cpu->gpr[5], _pgx1, 0x00006E54u); } -#ifdef PSX_COSIM - cosim_instr(0x000030A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12BAC: 0C000BF2 jal 0xB0002FC8 */ - cpu->gpr[31] = 0x000030B4u; /* jal link before delay slot */ - psx_delay_BFC12BAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12BB0: 24846E3C addiu $a0, $a0, 28220 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28220)); - PGXP_ALU(0x24846E3Cu, cpu->gpr[4], _pgx1, 0x00006E3Cu); } -#ifdef PSX_COSIM - cosim_instr(0x000030B0u); -#endif - if (psx_delay_BFC12BAC) { - psx_delay_BFC12BAC = 0; - cpu->gpr[31] = 0x000030B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FC8u); - cpu->pc = 0x00002FC8u; return; - } -label_BFC12BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12BB4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000030B4u); -#endif -label_BFC12BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030B8u); -#endif - /* 0xBFC12BB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000030B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000030B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12BBC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000030BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12BC0: 03E00008 jr $ra */ - psx_delay_BFC12BC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000030C4u); -#endif - if (psx_delay_BFC12BC0) { - psx_delay_BFC12BC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000030C8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000030C8u); - int psx_delay_BFC12BC8 = 0; - int psx_taken_BFC12BC8 = 0; - int psx_delay_BFC12BD0 = 0; - int psx_taken_BFC12BD0 = 0; - int psx_delay_BFC12BD8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12BD0u: goto label_BFC12BD0; - case 0xBFC12BD8u: goto label_BFC12BD8; - default: break; - } - } -label_BFC12BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12BC8: 04800003 bltz $a0, 0xBFC12BD8 */ - uint32_t psx_brA_BFC12BC8 = cpu->gpr[4]; - psx_taken_BFC12BC8 = ((int32_t)psx_brA_BFC12BC8 < 0); - psx_delay_BFC12BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC12BCC: 28810010 slti $at, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0); - PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000030CCu); -#endif - if (psx_delay_BFC12BC8) { - psx_delay_BFC12BC8 = 0; - if (psx_taken_BFC12BC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030D8u); - goto label_BFC12BD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030D0u); - } -label_BFC12BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12BD0: 14200004 bne $at, $zero, 0xBFC12BE4 */ - uint32_t psx_brA_BFC12BD0 = cpu->gpr[1]; uint32_t psx_brB_BFC12BD0 = cpu->gpr[0]; - psx_taken_BFC12BD0 = (psx_brA_BFC12BD0 != psx_brB_BFC12BD0); - psx_delay_BFC12BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC12BD4: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000030D4u); -#endif - if (psx_delay_BFC12BD0) { - psx_delay_BFC12BD0 = 0; - if (psx_taken_BFC12BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030E4u); - cpu->pc = 0x000030E4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030D8u); - } -label_BFC12BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12BD8: 03E00008 jr $ra */ - psx_delay_BFC12BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12BDC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000030DCu); -#endif - if (psx_delay_BFC12BD8) { - psx_delay_BFC12BD8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000030E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000030E0u); -label_BFC12BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC12BE0: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000030E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030E4u); - cpu->pc = 0x000030E4u; return; /* fallthrough */ -} - -void SCPH1001_func_000030E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000030E4u); - int psx_delay_BFC12C00 = 0; -label_BFC12BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000030E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC12BE4: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000030E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC12BE8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000030E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC12BEC: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000030ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000030F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC12BF0: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000030F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC12BF4: 25EF8648 addiu $t7, $t7, -31160 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-31160)); - PGXP_ALU(0x25EF8648u, cpu->gpr[15], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x000030F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC12BF8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000030F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC12BFC: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000030FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12C00: 03E00008 jr $ra */ - psx_delay_BFC12C00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12C04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003104u); -#endif - if (psx_delay_BFC12C00) { - psx_delay_BFC12C00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003108(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003108u); - int psx_delay_BFC12C4C = 0; - int psx_taken_BFC12C4C = 0; - int psx_delay_BFC12C5C = 0; - int psx_taken_BFC12C5C = 0; - int psx_delay_BFC12C64 = 0; - int psx_delay_BFC12C6C = 0; - int psx_taken_BFC12C6C = 0; - int psx_delay_BFC12C74 = 0; - int psx_taken_BFC12C74 = 0; - int psx_delay_BFC12C9C = 0; - int psx_taken_BFC12C9C = 0; - int psx_delay_BFC12CB0 = 0; - int psx_delay_BFC12CBC = 0; - int psx_delay_BFC12CC4 = 0; - int psx_delay_BFC12CE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12C54u: goto label_BFC12C54; - case 0xBFC12C64u: goto label_BFC12C64; - case 0xBFC12C6Cu: goto label_BFC12C6C; - case 0xBFC12C74u: goto label_BFC12C74; - case 0xBFC12C7Cu: goto label_BFC12C7C; - case 0xBFC12CA0u: goto label_BFC12CA0; - case 0xBFC12CA4u: goto label_BFC12CA4; - case 0xBFC12CB8u: goto label_BFC12CB8; - case 0xBFC12CC4u: goto label_BFC12CC4; - case 0xBFC12CCCu: goto label_BFC12CCC; - case 0xBFC12CD0u: goto label_BFC12CD0; - default: break; - } - } -label_BFC12C08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC12C08: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003108u); -#endif - /* 0xBFC12C0C: 8DCE7200 lw $t6, 29184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000310Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE7200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000310Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12C10: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC12C14: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003114u); return; } g_debug_last_store_pc = 0x00003114u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC12C18: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC12C1C: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC12C20: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC12C24: 26316EE0 addiu $s1, $s1, 28384 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (28384)); - PGXP_ALU(0x26316EE0u, cpu->gpr[17], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC12C28: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC12C2C: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000312Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC12C30: 27396EE1 addiu $t9, $t9, 28385 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (28385)); - PGXP_ALU(0x27396EE1u, cpu->gpr[25], _pgx1, 0x00006EE1u); } -#ifdef PSX_COSIM - cosim_instr(0x00003130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC12C34: 022FC021 addu $t8, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC12C38: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003138u); return; } g_debug_last_store_pc = 0x00003138u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC12C3C: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000313Cu); return; } g_debug_last_store_pc = 0x0000313Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x0000313Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC12C40: 0319082B sltu $at, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC12C44: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12C48: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003148u); return; } g_debug_last_store_pc = 0x00003148u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12C4C: 14200014 bne $at, $zero, 0xBFC12CA0 */ - uint32_t psx_brA_BFC12C4C = cpu->gpr[1]; uint32_t psx_brB_BFC12C4C = cpu->gpr[0]; - psx_taken_BFC12C4C = (psx_brA_BFC12C4C != psx_brB_BFC12C4C); - psx_delay_BFC12C4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC12C50: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003150u); -#endif - if (psx_delay_BFC12C4C) { - psx_delay_BFC12C4C = 0; - if (psx_taken_BFC12C4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031A0u); - goto label_BFC12CA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003154u); - } -label_BFC12C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003154u); -#endif - /* 0xBFC12C54: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003154u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12C58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12C5C: 10800007 beq $a0, $zero, 0xBFC12C7C */ - uint32_t psx_brA_BFC12C5C = cpu->gpr[4]; uint32_t psx_brB_BFC12C5C = cpu->gpr[0]; - psx_taken_BFC12C5C = (psx_brA_BFC12C5C == psx_brB_BFC12C5C); - psx_delay_BFC12C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12C60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003160u); -#endif - if (psx_delay_BFC12C5C) { - psx_delay_BFC12C5C = 0; - if (psx_taken_BFC12C5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000317Cu); - goto label_BFC12C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003164u); - } -label_BFC12C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12C64: 0C001AC4 jal 0xB0006B10 */ - cpu->gpr[31] = 0x0000316Cu; /* jal link before delay slot */ - psx_delay_BFC12C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC12C68: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003168u); -#endif - if (psx_delay_BFC12C64) { - psx_delay_BFC12C64 = 0; - cpu->gpr[31] = 0x0000316Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B10u); - cpu->pc = 0x00006B10u; return; - } -label_BFC12C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000316Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000316Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000316Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12C6C: 14400003 bne $v0, $zero, 0xBFC12C7C */ - uint32_t psx_brA_BFC12C6C = cpu->gpr[2]; uint32_t psx_brB_BFC12C6C = cpu->gpr[0]; - psx_taken_BFC12C6C = (psx_brA_BFC12C6C != psx_brB_BFC12C6C); - psx_delay_BFC12C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12C70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003170u); -#endif - if (psx_delay_BFC12C6C) { - psx_delay_BFC12C6C = 0; - if (psx_taken_BFC12C6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000317Cu); - goto label_BFC12C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003174u); - } -label_BFC12C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12C74: 10000016 beq $zero, $zero, 0xBFC12CD0 */ - uint32_t psx_brA_BFC12C74 = cpu->gpr[0]; uint32_t psx_brB_BFC12C74 = cpu->gpr[0]; - psx_taken_BFC12C74 = (psx_brA_BFC12C74 == psx_brB_BFC12C74); - psx_delay_BFC12C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC12C78: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003178u); -#endif - if (psx_delay_BFC12C74) { - psx_delay_BFC12C74 = 0; - if (psx_taken_BFC12C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031D0u); - goto label_BFC12CD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000317Cu); - } -label_BFC12C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000317Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC12C7C: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003180u); -#endif - /* 0xBFC12C80: 8D087200 lw $t0, 29184($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003180u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D087200u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12C84: 26100050 addiu $s0, $s0, 80 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (80)); - PGXP_ALU(0x26100050u, cpu->gpr[16], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC12C88: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC12C8C: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000318Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC12C90: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC12C94: 02295021 addu $t2, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02295021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10402u); -#endif - /* 0xBFC12C98: 020A082B sltu $at, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x020A082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12C9C: 1420FFED bne $at, $zero, 0xBFC12C54 */ - uint32_t psx_brA_BFC12C9C = cpu->gpr[1]; uint32_t psx_brB_BFC12C9C = cpu->gpr[0]; - psx_taken_BFC12C9C = (psx_brA_BFC12C9C != psx_brB_BFC12C9C); - psx_delay_BFC12C9C = 1; -label_BFC12CA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC12CA0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000031A0u); -#endif - if (psx_delay_BFC12C9C) { - psx_delay_BFC12C9C = 0; - if (psx_taken_BFC12C9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003154u); - goto label_BFC12C54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031A4u); - } -label_BFC12CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12CA4: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000031A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12CA8: AC20890C sw $zero, -30452($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031A8u); return; } g_debug_last_store_pc = 0x000031A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20890Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000031A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12CAC: 24846E58 addiu $a0, $a0, 28248 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28248)); - PGXP_ALU(0x24846E58u, cpu->gpr[4], _pgx1, 0x00006E58u); } -#ifdef PSX_COSIM - cosim_instr(0x000031ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12CB0: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x000031B8u; /* jal link before delay slot */ - psx_delay_BFC12CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC12CB4: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000031B4u); -#endif - if (psx_delay_BFC12CB0) { - psx_delay_BFC12CB0 = 0; - cpu->gpr[31] = 0x000031B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC12CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12CB8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000031B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12CBC: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x000031C4u; /* jal link before delay slot */ - psx_delay_BFC12CBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12CC0: 24846E70 addiu $a0, $a0, 28272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28272)); - PGXP_ALU(0x24846E70u, cpu->gpr[4], _pgx1, 0x00006E70u); } -#ifdef PSX_COSIM - cosim_instr(0x000031C0u); -#endif - if (psx_delay_BFC12CBC) { - psx_delay_BFC12CBC = 0; - cpu->gpr[31] = 0x000031C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC12CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12CC4: 0C000F6B jal 0xB0003DAC */ - cpu->gpr[31] = 0x000031CCu; /* jal link before delay slot */ - psx_delay_BFC12CC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12CC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000031C8u); -#endif - if (psx_delay_BFC12CC4) { - psx_delay_BFC12CC4 = 0; - cpu->gpr[31] = 0x000031CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003DACu); - cpu->pc = 0x00003DACu; return; - } -label_BFC12CCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12CCC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000031CCu); -#endif -label_BFC12CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031D0u); -#endif - /* 0xBFC12CD0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000031D0u); -#endif - /* 0xBFC12CD4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031D4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000031D4u); -#endif - /* 0xBFC12CD8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031D8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000031D8u); -#endif - /* 0xBFC12CDC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031DCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000031DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12CE0: 03E00008 jr $ra */ - psx_delay_BFC12CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12CE4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x000031E4u); -#endif - if (psx_delay_BFC12CE0) { - psx_delay_BFC12CE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000031E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000031E8u); - int psx_delay_BFC12D08 = 0; - int psx_taken_BFC12D08 = 0; - int psx_delay_BFC12D18 = 0; - int psx_taken_BFC12D18 = 0; - int psx_delay_BFC12D34 = 0; - int psx_taken_BFC12D34 = 0; - int psx_delay_BFC12D3C = 0; - int psx_taken_BFC12D3C = 0; - int psx_delay_BFC12D60 = 0; - int psx_taken_BFC12D60 = 0; - int psx_delay_BFC12D68 = 0; - int psx_taken_BFC12D68 = 0; - int psx_delay_BFC12D84 = 0; - int psx_taken_BFC12D84 = 0; - int psx_delay_BFC12DB4 = 0; - int psx_taken_BFC12DB4 = 0; - int psx_delay_BFC12DD4 = 0; - int psx_taken_BFC12DD4 = 0; - int psx_delay_BFC12DF4 = 0; - int psx_taken_BFC12DF4 = 0; - int psx_delay_BFC12DFC = 0; - int psx_delay_BFC12E1C = 0; - int psx_taken_BFC12E1C = 0; - int psx_delay_BFC12E24 = 0; - int psx_taken_BFC12E24 = 0; - int psx_delay_BFC12E50 = 0; - int psx_taken_BFC12E50 = 0; - int psx_delay_BFC12E6C = 0; - int psx_delay_BFC12E78 = 0; - int psx_taken_BFC12E78 = 0; - int psx_delay_BFC12E80 = 0; - int psx_taken_BFC12E80 = 0; - int psx_delay_BFC12E9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12D10u: goto label_BFC12D10; - case 0xBFC12D20u: goto label_BFC12D20; - case 0xBFC12D3Cu: goto label_BFC12D3C; - case 0xBFC12D44u: goto label_BFC12D44; - case 0xBFC12D50u: goto label_BFC12D50; - case 0xBFC12D68u: goto label_BFC12D68; - case 0xBFC12D70u: goto label_BFC12D70; - case 0xBFC12D74u: goto label_BFC12D74; - case 0xBFC12D8Cu: goto label_BFC12D8C; - case 0xBFC12DBCu: goto label_BFC12DBC; - case 0xBFC12DDCu: goto label_BFC12DDC; - case 0xBFC12DFCu: goto label_BFC12DFC; - case 0xBFC12E04u: goto label_BFC12E04; - case 0xBFC12E24u: goto label_BFC12E24; - case 0xBFC12E2Cu: goto label_BFC12E2C; - case 0xBFC12E30u: goto label_BFC12E30; - case 0xBFC12E58u: goto label_BFC12E58; - case 0xBFC12E5Cu: goto label_BFC12E5C; - case 0xBFC12E6Cu: goto label_BFC12E6C; - case 0xBFC12E74u: goto label_BFC12E74; - case 0xBFC12E80u: goto label_BFC12E80; - case 0xBFC12E88u: goto label_BFC12E88; - case 0xBFC12E8Cu: goto label_BFC12E8C; - default: break; - } - } -label_BFC12CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000031E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000031E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12CE8: 27BDFF90 addiu $sp, $sp, -112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-112)); - PGXP_ALU(0x27BDFF90u, cpu->gpr[29], _pgx1, 0xFFFFFF90u); } -#ifdef PSX_COSIM - cosim_instr(0x000031E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12CEC: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031ECu); return; } g_debug_last_store_pc = 0x000031ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000031ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000031F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC12CF0: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031F0u); return; } g_debug_last_store_pc = 0x000031F0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x000031F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC12CF4: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031F4u); return; } g_debug_last_store_pc = 0x000031F4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000031F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC12CF8: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031F8u); return; } g_debug_last_store_pc = 0x000031F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000031F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC12CFC: AFA50074 sw $a1, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031FCu); return; } g_debug_last_store_pc = 0x000031FCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50074u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000031FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003200u); -#endif - /* 0xBFC12D00: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12D04: 24020020 addiu $v0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24020020u, cpu->gpr[2], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00003204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC12D08: 144E0005 bne $v0, $t6, 0xBFC12D20 */ - uint32_t psx_brA_BFC12D08 = cpu->gpr[2]; uint32_t psx_brB_BFC12D08 = cpu->gpr[14]; - psx_taken_BFC12D08 = (psx_brA_BFC12D08 != psx_brB_BFC12D08); - psx_delay_BFC12D08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC12D0C: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000320Cu); -#endif - if (psx_delay_BFC12D08) { - psx_delay_BFC12D08 = 0; - if (psx_taken_BFC12D08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003220u); - goto label_BFC12D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003210u); - } -label_BFC12D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003210u); -#endif - /* 0xBFC12D10: 808F0001 lb $t7, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 15, 0x10u); - PGXP_LOAD(0x808F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12D14: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC12D18: 104FFFFD beq $v0, $t7, 0xBFC12D10 */ - uint32_t psx_brA_BFC12D18 = cpu->gpr[2]; uint32_t psx_brB_BFC12D18 = cpu->gpr[15]; - psx_taken_BFC12D18 = (psx_brA_BFC12D18 == psx_brB_BFC12D18); - psx_delay_BFC12D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12D1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000321Cu); -#endif - if (psx_delay_BFC12D18) { - psx_delay_BFC12D18 = 0; - if (psx_taken_BFC12D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003210u); - goto label_BFC12D10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003220u); - } -label_BFC12D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC12D20: AE600000 sw $zero, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003220u); return; } g_debug_last_store_pc = 0x00003220u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC12D24: A3A00044 sb $zero, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003224u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (68)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003224u); -#endif - /* 0xBFC12D28: 80820000 lb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 2, 0x10u); - PGXP_LOAD(0x80820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC12D2C: 2405003A addiu $a1, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2405003Au, cpu->gpr[5], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC12D30: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC12D34: 10A2000E beq $a1, $v0, 0xBFC12D70 */ - uint32_t psx_brA_BFC12D34 = cpu->gpr[5]; uint32_t psx_brB_BFC12D34 = cpu->gpr[2]; - psx_taken_BFC12D34 = (psx_brA_BFC12D34 == psx_brB_BFC12D34); - psx_delay_BFC12D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12D38: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003238u); -#endif - if (psx_delay_BFC12D34) { - psx_delay_BFC12D34 = 0; - if (psx_taken_BFC12D34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003270u); - goto label_BFC12D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000323Cu); - } -label_BFC12D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000323Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12D3C: 1040000D beq $v0, $zero, 0xBFC12D74 */ - uint32_t psx_brA_BFC12D3C = cpu->gpr[2]; uint32_t psx_brB_BFC12D3C = cpu->gpr[0]; - psx_taken_BFC12D3C = (psx_brA_BFC12D3C == psx_brB_BFC12D3C); - psx_delay_BFC12D3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC12D40: 27B90070 addiu $t9, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27B90070u, cpu->gpr[25], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x00003240u); -#endif - if (psx_delay_BFC12D3C) { - psx_delay_BFC12D3C = 0; - if (psx_taken_BFC12D3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003274u); - goto label_BFC12D74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003244u); - } -label_BFC12D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC12D44: 27B80070 addiu $t8, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27B80070u, cpu->gpr[24], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x00003244u); -#endif - /* 0xBFC12D48: 82420000 lb $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 2, 0x40000u); - PGXP_LOAD(0x82420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010008u); -#endif - /* 0xBFC12D4C: 00788021 addu $s0, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x00788021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000324Cu); -#endif -label_BFC12D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC12D50: A202FFD4 sb $v0, -44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -44; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003250u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-44)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202FFD4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003250u); -#endif - /* 0xBFC12D54: 82420001 lb $v0, 1($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (1)), 2, 0x40000u); - PGXP_LOAD(0x82420001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC12D58: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12D5C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC12D60: 10A20003 beq $a1, $v0, 0xBFC12D70 */ - uint32_t psx_brA_BFC12D60 = cpu->gpr[5]; uint32_t psx_brB_BFC12D60 = cpu->gpr[2]; - psx_taken_BFC12D60 = (psx_brA_BFC12D60 == psx_brB_BFC12D60); - psx_delay_BFC12D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12D64: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003264u); -#endif - if (psx_delay_BFC12D60) { - psx_delay_BFC12D60 = 0; - if (psx_taken_BFC12D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003270u); - goto label_BFC12D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003268u); - } -label_BFC12D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12D68: 1440FFF9 bne $v0, $zero, 0xBFC12D50 */ - uint32_t psx_brA_BFC12D68 = cpu->gpr[2]; uint32_t psx_brB_BFC12D68 = cpu->gpr[0]; - psx_taken_BFC12D68 = (psx_brA_BFC12D68 != psx_brB_BFC12D68); - psx_delay_BFC12D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12D6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000326Cu); -#endif - if (psx_delay_BFC12D68) { - psx_delay_BFC12D68 = 0; - if (psx_taken_BFC12D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003250u); - goto label_BFC12D50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003270u); - } -label_BFC12D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC12D70: 27B90070 addiu $t9, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27B90070u, cpu->gpr[25], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x00003270u); -#endif -label_BFC12D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010008u); -#endif - /* 0xBFC12D74: 00798021 addu $s0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00798021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC12D78: A200FFD4 sb $zero, -44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -44; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003278u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-44)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA200FFD4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003278u); -#endif - /* 0xBFC12D7C: 82480000 lb $t0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 8, 0x40000u); - PGXP_LOAD(0x82480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12D80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC12D84: 11000039 beq $t0, $zero, 0xBFC12E6C */ - uint32_t psx_brA_BFC12D84 = cpu->gpr[8]; uint32_t psx_brB_BFC12D84 = cpu->gpr[0]; - psx_taken_BFC12D84 = (psx_brA_BFC12D84 == psx_brB_BFC12D84); - psx_delay_BFC12D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003288u); -#endif - if (psx_delay_BFC12D84) { - psx_delay_BFC12D84 = 0; - if (psx_taken_BFC12D84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000336Cu); - goto label_BFC12E6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000328Cu); - } -label_BFC12D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000328Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC12D8C: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000328Cu); return; } g_debug_last_store_pc = 0x0000328Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x0000328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC12D90: AE600000 sw $zero, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003290u); return; } g_debug_last_store_pc = 0x00003290u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003290u); -#endif - /* 0xBFC12D94: 9209FFD3 lbu $t1, -45($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -45; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (-45)), 9, 0x10000u); - PGXP_LOAD(0x9209FFD3u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC12D98: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC12D9C: 263173D0 addiu $s1, $s1, 29648 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (29648)); - PGXP_ALU(0x263173D0u, cpu->gpr[17], _pgx1, 0x000073D0u); } -#ifdef PSX_COSIM - cosim_instr(0x0000329Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC12DA0: 02295021 addu $t2, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02295021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000032A0u); -#endif - /* 0xBFC12DA4: 814B0001 lb $t3, 1($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 1; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (1)), 11, 0x400u); - PGXP_LOAD(0x814B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000032A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC12DA8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000032A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC12DAC: 316C0044 andi $t4, $t3, 0x44 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x44u; - PGXP_ALU(0x316C0044u, cpu->gpr[12], _pgx1, 0x0044u); } -#ifdef PSX_COSIM - cosim_instr(0x000032ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12DB0: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000032B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC12DB4: 11800009 beq $t4, $zero, 0xBFC12DDC */ - uint32_t psx_brA_BFC12DB4 = cpu->gpr[12]; uint32_t psx_brB_BFC12DB4 = cpu->gpr[0]; - psx_taken_BFC12DB4 = (psx_brA_BFC12DB4 == psx_brB_BFC12DB4); - psx_delay_BFC12DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12DB8: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000032B8u); -#endif - if (psx_delay_BFC12DB4) { - psx_delay_BFC12DB4 = 0; - if (psx_taken_BFC12DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032DCu); - goto label_BFC12DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032BCu); - } -label_BFC12DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000032BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000032BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032BCu); -#endif - /* 0xBFC12DBC: 920DFFD3 lbu $t5, -45($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -45; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (-45)), 13, 0x10000u); - PGXP_LOAD(0x920DFFD3u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000032BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12DC0: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000032C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26000u); -#endif - /* 0xBFC12DC4: 022D7021 addu $t6, $s1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[17] + cpu->gpr[13]; - PGXP_ALU(0x022D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000032C4u); -#endif - /* 0xBFC12DC8: 81CF0001 lb $t7, 1($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 1; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (1)), 15, 0x4000u); - PGXP_LOAD(0x81CF0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000032C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12DCC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000032CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC12DD0: 31F80044 andi $t8, $t7, 0x44 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x44u; - PGXP_ALU(0x31F80044u, cpu->gpr[24], _pgx1, 0x0044u); } -#ifdef PSX_COSIM - cosim_instr(0x000032D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC12DD4: 1700FFF9 bne $t8, $zero, 0xBFC12DBC */ - uint32_t psx_brA_BFC12DD4 = cpu->gpr[24]; uint32_t psx_brB_BFC12DD4 = cpu->gpr[0]; - psx_taken_BFC12DD4 = (psx_brA_BFC12DD4 != psx_brB_BFC12DD4); - psx_delay_BFC12DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000032D8u); -#endif - if (psx_delay_BFC12DD4) { - psx_delay_BFC12DD4 = 0; - if (psx_taken_BFC12DD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032BCu); - goto label_BFC12DBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032DCu); - } -label_BFC12DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000032DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000032DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC12DDC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000032DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC12DE0: 27B90044 addiu $t9, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27B90044u, cpu->gpr[25], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x000032E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC12DE4: 00794021 addu $t0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00794021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000032E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC12DE8: AFA80068 sw $t0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000032E8u); return; } g_debug_last_store_pc = 0x000032E8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80068u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000032E8u); -#endif - /* 0xBFC12DEC: 8204FFD5 lb $a0, -43($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -43; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (-43)), 4, 0x10000u); - PGXP_LOAD(0x8204FFD5u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000032ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12DF0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000032F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12DF4: 10800019 beq $a0, $zero, 0xBFC12E5C */ - uint32_t psx_brA_BFC12DF4 = cpu->gpr[4]; uint32_t psx_brB_BFC12DF4 = cpu->gpr[0]; - psx_taken_BFC12DF4 = (psx_brA_BFC12DF4 == psx_brB_BFC12DF4); - psx_delay_BFC12DF4 = 1; - /* 0xBFC12DF8: 8FB90068 lw $t9, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000032F8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90068u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000032F8u); -#endif - if (psx_delay_BFC12DF4) { - psx_delay_BFC12DF4 = 0; - if (psx_taken_BFC12DF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000335Cu); - goto label_BFC12E5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032FCu); - } -label_BFC12DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000032FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000032FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000032FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12DFC: 0C001AA4 jal 0xB0006A90 */ - cpu->gpr[31] = 0x00003304u; /* jal link before delay slot */ - psx_delay_BFC12DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003300u); -#endif - if (psx_delay_BFC12DFC) { - psx_delay_BFC12DFC = 0; - cpu->gpr[31] = 0x00003304u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A90u); - cpu->pc = 0x00006A90u; return; - } -label_BFC12E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003304u); -#endif - /* 0xBFC12E04: 9209FFD4 lbu $t1, -44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -44; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (-44)), 9, 0x10000u); - PGXP_LOAD(0x9209FFD4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC12E0C: 02295021 addu $t2, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02295021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003310u); -#endif - /* 0xBFC12E10: 814B0001 lb $t3, 1($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 1; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (1)), 11, 0x400u); - PGXP_LOAD(0x814B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00003310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC12E18: 316C0004 andi $t4, $t3, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x4u; - PGXP_ALU(0x316C0004u, cpu->gpr[12], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00003318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC12E1C: 11800004 beq $t4, $zero, 0xBFC12E30 */ - uint32_t psx_brA_BFC12E1C = cpu->gpr[12]; uint32_t psx_brB_BFC12E1C = cpu->gpr[0]; - psx_taken_BFC12E1C = (psx_brA_BFC12E1C == psx_brB_BFC12E1C); - psx_delay_BFC12E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12E20: 24030037 addiu $v1, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24030037u, cpu->gpr[3], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x00003320u); -#endif - if (psx_delay_BFC12E1C) { - psx_delay_BFC12E1C = 0; - if (psx_taken_BFC12E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003330u); - goto label_BFC12E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003324u); - } -label_BFC12E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E24: 10000002 beq $zero, $zero, 0xBFC12E30 */ - uint32_t psx_brA_BFC12E24 = cpu->gpr[0]; uint32_t psx_brB_BFC12E24 = cpu->gpr[0]; - psx_taken_BFC12E24 = (psx_brA_BFC12E24 == psx_brB_BFC12E24); - psx_delay_BFC12E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12E28: 24030030 addiu $v1, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24030030u, cpu->gpr[3], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x00003328u); -#endif - if (psx_delay_BFC12E24) { - psx_delay_BFC12E24 = 0; - if (psx_taken_BFC12E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003330u); - goto label_BFC12E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000332Cu); - } -label_BFC12E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000332Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC12E2C: 24030037 addiu $v1, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24030037u, cpu->gpr[3], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x0000332Cu); -#endif -label_BFC12E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003330u); -#endif - /* 0xBFC12E30: 8E6D0000 lw $t5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003330u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80000u); } - PGXP_LOAD(0x8E6D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00003330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC12E34: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC12E38: 000D7100 sll $t6, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC12E3C: 01C27821 addu $t7, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000333Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC12E40: 01E3C023 subu $t8, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E3C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC12E44: AE780000 sw $t8, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003344u); return; } g_debug_last_store_pc = 0x00003344u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003344u); -#endif - /* 0xBFC12E48: 8204FFD4 lb $a0, -44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -44; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (-44)), 4, 0x10000u); - PGXP_LOAD(0x8204FFD4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000334Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC12E50: 1480FFEA bne $a0, $zero, 0xBFC12DFC */ - uint32_t psx_brA_BFC12E50 = cpu->gpr[4]; uint32_t psx_brB_BFC12E50 = cpu->gpr[0]; - psx_taken_BFC12E50 = (psx_brA_BFC12E50 != psx_brB_BFC12E50); - psx_delay_BFC12E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003354u); -#endif - if (psx_delay_BFC12E50) { - psx_delay_BFC12E50 = 0; - if (psx_taken_BFC12E50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000032FCu); - goto label_BFC12DFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003358u); - } -label_BFC12E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003358u); -#endif - /* 0xBFC12E58: 8FB90068 lw $t9, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003358u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90068u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003358u); -#endif -label_BFC12E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000335Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC12E60: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003360u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003360u); -#endif - /* 0xBFC12E64: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003364u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003368u); -#endif -label_BFC12E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000336Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12E6C: 0C000C42 jal 0xB0003108 */ - cpu->gpr[31] = 0x00003374u; /* jal link before delay slot */ - psx_delay_BFC12E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC12E70: 27A40044 addiu $a0, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A40044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x00003370u); -#endif - if (psx_delay_BFC12E6C) { - psx_delay_BFC12E6C = 0; - cpu->gpr[31] = 0x00003374u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003108u); - cpu->pc = 0x00003108u; return; - } -label_BFC12E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003374u); -#endif - /* 0xBFC12E74: 8FA80074 lw $t0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003374u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80074u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12E78: 14400003 bne $v0, $zero, 0xBFC12E88 */ - uint32_t psx_brA_BFC12E78 = cpu->gpr[2]; uint32_t psx_brB_BFC12E78 = cpu->gpr[0]; - psx_taken_BFC12E78 = (psx_brA_BFC12E78 != psx_brB_BFC12E78); - psx_delay_BFC12E78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC12E7C: AD020000 sw $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000337Cu); return; } g_debug_last_store_pc = 0x0000337Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000337Cu); -#endif - if (psx_delay_BFC12E78) { - psx_delay_BFC12E78 = 0; - if (psx_taken_BFC12E78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003388u); - goto label_BFC12E88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003380u); - } -label_BFC12E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12E80: 10000002 beq $zero, $zero, 0xBFC12E8C */ - uint32_t psx_brA_BFC12E80 = cpu->gpr[0]; uint32_t psx_brB_BFC12E80 = cpu->gpr[0]; - psx_taken_BFC12E80 = (psx_brA_BFC12E80 == psx_brB_BFC12E80); - psx_delay_BFC12E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12E84: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003384u); -#endif - if (psx_delay_BFC12E80) { - psx_delay_BFC12E80 = 0; - if (psx_taken_BFC12E80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000338Cu); - goto label_BFC12E8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003388u); - } -label_BFC12E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC12E88: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003388u); -#endif -label_BFC12E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000338Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000338Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000338Cu); -#endif - /* 0xBFC12E8C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000338Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000338Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003390u); -#endif - /* 0xBFC12E90: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003390u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003390u); -#endif - /* 0xBFC12E94: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003394u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003394u); -#endif - /* 0xBFC12E98: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003398u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00003398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12E9C: 03E00008 jr $ra */ - psx_delay_BFC12E9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12EA0: 27BD0070 addiu $sp, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27BD0070u, cpu->gpr[29], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x000033A0u); -#endif - if (psx_delay_BFC12E9C) { - psx_delay_BFC12E9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000033A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000033A4u); - int psx_delay_BFC12EB4 = 0; - int psx_taken_BFC12EB4 = 0; - int psx_delay_BFC12EC0 = 0; - int psx_taken_BFC12EC0 = 0; - int psx_delay_BFC12EDC = 0; - int psx_delay_BFC12F34 = 0; - int psx_taken_BFC12F34 = 0; - int psx_delay_BFC12F48 = 0; - int psx_taken_BFC12F48 = 0; - int psx_delay_BFC12F50 = 0; - int psx_taken_BFC12F50 = 0; - int psx_delay_BFC12F64 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12EBCu: goto label_BFC12EBC; - case 0xBFC12EC8u: goto label_BFC12EC8; - case 0xBFC12EE4u: goto label_BFC12EE4; - case 0xBFC12EF4u: goto label_BFC12EF4; - case 0xBFC12F3Cu: goto label_BFC12F3C; - case 0xBFC12F50u: goto label_BFC12F50; - case 0xBFC12F58u: goto label_BFC12F58; - case 0xBFC12F5Cu: goto label_BFC12F5C; - default: break; - } - } -label_BFC12EA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000033A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000033A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC12EA4: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000033A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12EA8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000033A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC12EAC: 2CC10010 sltiu $at, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000010u ? 1 : 0); - PGXP_ALU(0x2CC10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000033ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12EB0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000033B0u); return; } g_debug_last_store_pc = 0x000033B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000033B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12EB4: 10200004 beq $at, $zero, 0xBFC12EC8 */ - uint32_t psx_brA_BFC12EB4 = cpu->gpr[1]; uint32_t psx_brB_BFC12EB4 = cpu->gpr[0]; - psx_taken_BFC12EB4 = (psx_brA_BFC12EB4 == psx_brB_BFC12EB4); - psx_delay_BFC12EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC12EB8: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000033B8u); -#endif - if (psx_delay_BFC12EB4) { - psx_delay_BFC12EB4 = 0; - if (psx_taken_BFC12EB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000033C8u); - goto label_BFC12EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000033BCu); - } -label_BFC12EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000033BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC12EBC: 2CE10010 sltiu $at, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < 0x00000010u ? 1 : 0); - PGXP_ALU(0x2CE10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000033BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC12EC0: 1420000C bne $at, $zero, 0xBFC12EF4 */ - uint32_t psx_brA_BFC12EC0 = cpu->gpr[1]; uint32_t psx_brB_BFC12EC0 = cpu->gpr[0]; - psx_taken_BFC12EC0 = (psx_brA_BFC12EC0 != psx_brB_BFC12EC0); - psx_delay_BFC12EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC12EC4: 00077080 sll $t6, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000033C4u); -#endif - if (psx_delay_BFC12EC0) { - psx_delay_BFC12EC0 = 0; - if (psx_taken_BFC12EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000033F4u); - goto label_BFC12EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000033C8u); - } -label_BFC12EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000033C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000033C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12EC8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000033C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12ECC: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000033CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC12ED0: AFA60018 sw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000033D0u); return; } g_debug_last_store_pc = 0x000033D0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000033D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC12ED4: 24A56E90 addiu $a1, $a1, 28304 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28304)); - PGXP_ALU(0x24A56E90u, cpu->gpr[5], _pgx1, 0x00006E90u); } -#ifdef PSX_COSIM - cosim_instr(0x000033D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12ED8: 24846E84 addiu $a0, $a0, 28292 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28292)); - PGXP_ALU(0x24846E84u, cpu->gpr[4], _pgx1, 0x00006E84u); } -#ifdef PSX_COSIM - cosim_instr(0x000033D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12EDC: 0C000BF2 jal 0xB0002FC8 */ - cpu->gpr[31] = 0x000033E4u; /* jal link before delay slot */ - psx_delay_BFC12EDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC12EE0: AFA7001C sw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000033E0u); return; } g_debug_last_store_pc = 0x000033E0u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x000033E0u); -#endif - if (psx_delay_BFC12EDC) { - psx_delay_BFC12EDC = 0; - cpu->gpr[31] = 0x000033E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FC8u); - cpu->pc = 0x00002FC8u; return; - } -label_BFC12EE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000033E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000033E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033E4u); -#endif - /* 0xBFC12EE4: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000033E4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000033E4u); -#endif - /* 0xBFC12EE8: 8FA7001C lw $a3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000033E8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7001Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x000033E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12EEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000033ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC12EF0: 00077080 sll $t6, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000033F0u); -#endif -label_BFC12EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000033F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000033F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000033F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC12EF4: 00067880 sll $t7, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000033F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC12EF8: 01E67823 subu $t7, $t7, $a2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[6]; - PGXP_ALU(0x01E67823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000033F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC12EFC: 01C77023 subu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[7]; - PGXP_ALU(0x01C77023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000033FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12F00: 3C040001 lui $a0, 0x1 */ - cpu->gpr[4] = 0x00010000u; - PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC12F04: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC12F08: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12F0C: 24848648 addiu $a0, $a0, -31160 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-31160)); - PGXP_ALU(0x24848648u, cpu->gpr[4], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x0000340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC12F10: 01E67823 subu $t7, $t7, $a2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[6]; - PGXP_ALU(0x01E67823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC12F14: 01C77023 subu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[7]; - PGXP_ALU(0x01C77023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC12F18: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC12F1C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000341Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8014u); -#endif - /* 0xBFC12F20: 008F1021 addu $v0, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4018u); -#endif - /* 0xBFC12F24: 008E1821 addu $v1, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003424u); -#endif - /* 0xBFC12F28: 8C78001C lw $t8, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003428u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C78001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003428u); -#endif - /* 0xBFC12F2C: 8C59001C lw $t9, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000342Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C59001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000342Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC12F34: 17190008 bne $t8, $t9, 0xBFC12F58 */ - uint32_t psx_brA_BFC12F34 = cpu->gpr[24]; uint32_t psx_brB_BFC12F34 = cpu->gpr[25]; - psx_taken_BFC12F34 = (psx_brA_BFC12F34 != psx_brB_BFC12F34); - psx_delay_BFC12F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003438u); -#endif - if (psx_delay_BFC12F34) { - psx_delay_BFC12F34 = 0; - if (psx_taken_BFC12F34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003458u); - goto label_BFC12F58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000343Cu); - } -label_BFC12F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000343Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000343Cu); -#endif - /* 0xBFC12F3C: 8C680004 lw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000343Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003440u); -#endif - /* 0xBFC12F40: 8C490004 lw $t1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003440u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x8C490004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC12F48: 15090004 bne $t0, $t1, 0xBFC12F5C */ - uint32_t psx_brA_BFC12F48 = cpu->gpr[8]; uint32_t psx_brB_BFC12F48 = cpu->gpr[9]; - psx_taken_BFC12F48 = (psx_brA_BFC12F48 != psx_brB_BFC12F48); - psx_delay_BFC12F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12F4C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000344Cu); -#endif - if (psx_delay_BFC12F48) { - psx_delay_BFC12F48 = 0; - if (psx_taken_BFC12F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000345Cu); - goto label_BFC12F5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003450u); - } -label_BFC12F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F50: 10000002 beq $zero, $zero, 0xBFC12F5C */ - uint32_t psx_brA_BFC12F50 = cpu->gpr[0]; uint32_t psx_brB_BFC12F50 = cpu->gpr[0]; - psx_taken_BFC12F50 = (psx_brA_BFC12F50 == psx_brB_BFC12F50); - psx_delay_BFC12F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12F54: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003454u); -#endif - if (psx_delay_BFC12F50) { - psx_delay_BFC12F50 = 0; - if (psx_taken_BFC12F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000345Cu); - goto label_BFC12F5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003458u); - } -label_BFC12F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12F58: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003458u); -#endif -label_BFC12F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000345Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000345Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000345Cu); -#endif - /* 0xBFC12F5C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000345Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000345Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12F60: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12F64: 03E00008 jr $ra */ - psx_delay_BFC12F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003468u); -#endif - if (psx_delay_BFC12F64) { - psx_delay_BFC12F64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000346C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000346Cu); - int psx_delay_BFC12F74 = 0; - int psx_delay_BFC12F84 = 0; - int psx_taken_BFC12F84 = 0; - int psx_delay_BFC12FAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12F7Cu: goto label_BFC12F7C; - case 0xBFC12F8Cu: goto label_BFC12F8C; - case 0xBFC12FA8u: goto label_BFC12FA8; - default: break; - } - } -label_BFC12F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000346Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12F6C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x0000346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12F70: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003470u); return; } g_debug_last_store_pc = 0x00003470u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12F74: 0C000C32 jal 0xB00030C8 */ - cpu->gpr[31] = 0x0000347Cu; /* jal link before delay slot */ - psx_delay_BFC12F74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003478u); -#endif - if (psx_delay_BFC12F74) { - psx_delay_BFC12F74 = 0; - cpu->gpr[31] = 0x0000347Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000030C8u); - cpu->pc = 0x000030C8u; return; - } -label_BFC12F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000347Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC12F7C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12F80: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12F84: 10400008 beq $v0, $zero, 0xBFC12FA8 */ - uint32_t psx_brA_BFC12F84 = cpu->gpr[2]; uint32_t psx_brB_BFC12F84 = cpu->gpr[0]; - psx_taken_BFC12F84 = (psx_brA_BFC12F84 == psx_brB_BFC12F84); - psx_delay_BFC12F84 = 1; - /* 0xBFC12F88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003488u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003488u); -#endif - if (psx_delay_BFC12F84) { - psx_delay_BFC12F84 = 0; - if (psx_taken_BFC12F84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000034A8u); - goto label_BFC12FA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000348Cu); - } -label_BFC12F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000348Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000348Cu); -#endif - /* 0xBFC12F8C: 8C6E001C lw $t6, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000348Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003490u); -#endif - /* 0xBFC12F94: 8DC20004 lw $v0, 4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003494u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000u); } - PGXP_LOAD(0x8DC20004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12F98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC12F9C: 30420002 andi $v0, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x2u; - PGXP_ALU(0x30420002u, cpu->gpr[2], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000349Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC12FA0: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000034A0u); -#endif - /* 0xBFC12FA4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000034A4u); -#endif -label_BFC12FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000034A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000034A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12FA8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000034A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC12FAC: 03E00008 jr $ra */ - psx_delay_BFC12FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000034B0u); -#endif - if (psx_delay_BFC12FAC) { - psx_delay_BFC12FAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000034B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000034B4u); - int psx_delay_BFC12FCC = 0; - int psx_taken_BFC12FCC = 0; - int psx_delay_BFC12FDC = 0; - int psx_delay_BFC1300C = 0; - int psx_taken_BFC1300C = 0; - int psx_delay_BFC13024 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC12FD4u: goto label_BFC12FD4; - case 0xBFC12FE4u: goto label_BFC12FE4; - case 0xBFC12FF4u: goto label_BFC12FF4; - case 0xBFC13014u: goto label_BFC13014; - case 0xBFC1301Cu: goto label_BFC1301C; - default: break; - } - } -label_BFC12FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000034B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000034B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC12FB4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000034B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC12FB8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034B8u); return; } g_debug_last_store_pc = 0x000034B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000034B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC12FBC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000034BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034C0u); -#endif - /* 0xBFC12FC0: 8C620008 lw $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000034C0u); -#endif - /* 0xBFC12FC4: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000034C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12FC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000034C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC12FCC: 144E0009 bne $v0, $t6, 0xBFC12FF4 */ - uint32_t psx_brA_BFC12FCC = cpu->gpr[2]; uint32_t psx_brB_BFC12FCC = cpu->gpr[14]; - psx_taken_BFC12FCC = (psx_brA_BFC12FCC != psx_brB_BFC12FCC); - psx_delay_BFC12FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000034D0u); -#endif - if (psx_delay_BFC12FCC) { - psx_delay_BFC12FCC = 0; - if (psx_taken_BFC12FCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000034F4u); - goto label_BFC12FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000034D4u); - } -label_BFC12FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000034D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000034D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12FD4: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000034D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC12FD8: 24846E94 addiu $a0, $a0, 28308 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28308)); - PGXP_ALU(0x24846E94u, cpu->gpr[4], _pgx1, 0x00006E94u); } -#ifdef PSX_COSIM - cosim_instr(0x000034D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC12FDC: 0C000BF2 jal 0xB0002FC8 */ - cpu->gpr[31] = 0x000034E4u; /* jal link before delay slot */ - psx_delay_BFC12FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC12FE0: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034E0u); return; } g_debug_last_store_pc = 0x000034E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000034E0u); -#endif - if (psx_delay_BFC12FDC) { - psx_delay_BFC12FDC = 0; - cpu->gpr[31] = 0x000034E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002FC8u); - cpu->pc = 0x00002FC8u; return; - } -label_BFC12FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000034E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000034E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034E4u); -#endif - /* 0xBFC12FE4: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000034E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12FE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000034E8u); -#endif - /* 0xBFC12FEC: 8C620008 lw $v0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000034ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC12FF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000034F0u); -#endif -label_BFC12FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000034F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000034F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000034F4u); -#endif - /* 0xBFC12FF4: 80440000 lb $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); - PGXP_LOAD(0x80440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000034F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC12FF8: 244F0001 addiu $t7, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x244F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000034F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC12FFC: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034FCu); return; } g_debug_last_store_pc = 0x000034FCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000034FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003500u); -#endif - /* 0xBFC13000: 8C780008 lw $t8, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003500u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC13004: 2479010C addiu $t9, $v1, 268 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[3] + (268)); - PGXP_ALU(0x2479010Cu, cpu->gpr[25], _pgx1, 0x0000010Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC13008: 0319082B sltu $at, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1300C: 14200003 bne $at, $zero, 0xBFC1301C */ - uint32_t psx_brA_BFC1300C = cpu->gpr[1]; uint32_t psx_brB_BFC1300C = cpu->gpr[0]; - psx_taken_BFC1300C = (psx_brA_BFC1300C != psx_brB_BFC1300C); - psx_delay_BFC1300C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13010: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003510u); -#endif - if (psx_delay_BFC1300C) { - psx_delay_BFC1300C = 0; - if (psx_taken_BFC1300C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000351Cu); - goto label_BFC1301C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003514u); - } -label_BFC13014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC13014: 2468000C addiu $t0, $v1, 12 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[3] + (12)); - PGXP_ALU(0x2468000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC13018: AC680008 sw $t0, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003518u); return; } g_debug_last_store_pc = 0x00003518u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003518u); -#endif -label_BFC1301C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000351Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000351Cu); -#endif - /* 0xBFC1301C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000351Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13020: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13024: 03E00008 jr $ra */ - psx_delay_BFC13024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC13028: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003528u); -#endif - if (psx_delay_BFC13024) { - psx_delay_BFC13024 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000352C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000352Cu); - int psx_delay_BFC1303C = 0; - int psx_taken_BFC1303C = 0; - int psx_delay_BFC13044 = 0; - int psx_taken_BFC13044 = 0; - int psx_delay_BFC13058 = 0; - int psx_taken_BFC13058 = 0; - int psx_delay_BFC13068 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13044u: goto label_BFC13044; - case 0xBFC1304Cu: goto label_BFC1304C; - case 0xBFC13050u: goto label_BFC13050; - case 0xBFC13060u: goto label_BFC13060; - case 0xBFC13068u: goto label_BFC13068; - default: break; - } - } -label_BFC1302C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000352Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000352Cu); -#endif - /* 0xBFC1302C: 8CA20004 lw $v0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000352Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC13030: 24AE010C addiu $t6, $a1, 268 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[5] + (268)); - PGXP_ALU(0x24AE010Cu, cpu->gpr[14], _pgx1, 0x0000010Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC13034: 24430001 addiu $v1, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24430001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400Au); -#endif - /* 0xBFC13038: 006E082B sltu $at, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x006E082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1303C: 14200003 bne $at, $zero, 0xBFC1304C */ - uint32_t psx_brA_BFC1303C = cpu->gpr[1]; uint32_t psx_brB_BFC1303C = cpu->gpr[0]; - psx_taken_BFC1303C = (psx_brA_BFC1303C != psx_brB_BFC1303C); - psx_delay_BFC1303C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC13040: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003540u); -#endif - if (psx_delay_BFC1303C) { - psx_delay_BFC1303C = 0; - if (psx_taken_BFC1303C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000354Cu); - goto label_BFC1304C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003544u); - } -label_BFC13044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13044: 10000002 beq $zero, $zero, 0xBFC13050 */ - uint32_t psx_brA_BFC13044 = cpu->gpr[0]; uint32_t psx_brB_BFC13044 = cpu->gpr[0]; - psx_taken_BFC13044 = (psx_brA_BFC13044 == psx_brB_BFC13044); - psx_delay_BFC13044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC13048: 24A4000C addiu $a0, $a1, 12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[5] + (12)); - PGXP_ALU(0x24A4000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003548u); -#endif - if (psx_delay_BFC13044) { - psx_delay_BFC13044 = 0; - if (psx_taken_BFC13044) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003550u); - goto label_BFC13050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000354Cu); - } -label_BFC1304C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000354Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1304C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000354Cu); -#endif -label_BFC13050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003550u); -#endif - /* 0xBFC13050: 8CAF0008 lw $t7, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003550u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20u); } - PGXP_LOAD(0x8CAF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC13058: 108F0003 beq $a0, $t7, 0xBFC13068 */ - uint32_t psx_brA_BFC13058 = cpu->gpr[4]; uint32_t psx_brB_BFC13058 = cpu->gpr[15]; - psx_taken_BFC13058 = (psx_brA_BFC13058 == psx_brB_BFC13058); - psx_delay_BFC13058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1305C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000355Cu); -#endif - if (psx_delay_BFC13058) { - psx_delay_BFC13058 = 0; - if (psx_taken_BFC13058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003568u); - goto label_BFC13068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003560u); - } -label_BFC13060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC13060: A0460000 sb $a2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003560u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0460000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00003560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC13064: ACA40004 sw $a0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003564u); return; } g_debug_last_store_pc = 0x00003564u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACA40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003564u); -#endif -label_BFC13068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13068: 03E00008 jr $ra */ - psx_delay_BFC13068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1306C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000356Cu); -#endif - if (psx_delay_BFC13068) { - psx_delay_BFC13068 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003570(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003570u); - int psx_delay_BFC13080 = 0; - int psx_delay_BFC1309C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13088u: goto label_BFC13088; - default: break; - } - } -label_BFC13070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13070: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13074: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003574u); return; } g_debug_last_store_pc = 0x00003574u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13078: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003578u); return; } g_debug_last_store_pc = 0x00003578u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1307C: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13080: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00003588u; /* jal link before delay slot */ - psx_delay_BFC13080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13084: 24846EA0 addiu $a0, $a0, 28320 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28320)); - PGXP_ALU(0x24846EA0u, cpu->gpr[4], _pgx1, 0x00006EA0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003584u); -#endif - if (psx_delay_BFC13080) { - psx_delay_BFC13080 = 0; - cpu->gpr[31] = 0x00003588u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC13088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003588u); -#endif - /* 0xBFC13088: 8FAF0020 lw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003588u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1308C: 240E0006 addiu $t6, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x240E0006u, cpu->gpr[14], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x0000358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC13090: ADEE0018 sw $t6, 24($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003590u); return; } g_debug_last_store_pc = 0x00003590u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003590u); -#endif - /* 0xBFC13094: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003594u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13098: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00003598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1309C: 03E00008 jr $ra */ - psx_delay_BFC1309C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC130A0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000035A0u); -#endif - if (psx_delay_BFC1309C) { - psx_delay_BFC1309C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000035A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000035A4u); - int psx_delay_BFC130A4 = 0; -label_BFC130A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC130A4: 03E00008 jr $ra */ - psx_delay_BFC130A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC130A8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000035A8u); -#endif - if (psx_delay_BFC130A4) { - psx_delay_BFC130A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000035AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000035ACu); - int psx_delay_BFC130B4 = 0; - int psx_delay_BFC130BC = 0; - int psx_taken_BFC130BC = 0; - int psx_delay_BFC130D0 = 0; - int psx_taken_BFC130D0 = 0; - int psx_delay_BFC130E4 = 0; - int psx_delay_BFC130F4 = 0; - int psx_taken_BFC130F4 = 0; - int psx_delay_BFC1310C = 0; - int psx_taken_BFC1310C = 0; - int psx_delay_BFC1313C = 0; - int psx_delay_BFC13148 = 0; - int psx_taken_BFC13148 = 0; - int psx_delay_BFC1315C = 0; - int psx_taken_BFC1315C = 0; - int psx_delay_BFC13170 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC130BCu: goto label_BFC130BC; - case 0xBFC130C4u: goto label_BFC130C4; - case 0xBFC130D8u: goto label_BFC130D8; - case 0xBFC130ECu: goto label_BFC130EC; - case 0xBFC130FCu: goto label_BFC130FC; - case 0xBFC13114u: goto label_BFC13114; - case 0xBFC13144u: goto label_BFC13144; - case 0xBFC13150u: goto label_BFC13150; - case 0xBFC13164u: goto label_BFC13164; - case 0xBFC13168u: goto label_BFC13168; - default: break; - } - } -label_BFC130AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC130AC: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x000035ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC130B0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035B0u); return; } g_debug_last_store_pc = 0x000035B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000035B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC130B4: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x000035BCu; /* jal link before delay slot */ - psx_delay_BFC130B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC130B8: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035B8u); return; } g_debug_last_store_pc = 0x000035B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000035B8u); -#endif - if (psx_delay_BFC130B4) { - psx_delay_BFC130B4 = 0; - cpu->gpr[31] = 0x000035BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC130BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC130BC: 14400006 bne $v0, $zero, 0xBFC130D8 */ - uint32_t psx_brA_BFC130BC = cpu->gpr[2]; uint32_t psx_brB_BFC130BC = cpu->gpr[0]; - psx_taken_BFC130BC = (psx_brA_BFC130BC != psx_brB_BFC130BC); - psx_delay_BFC130BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC130C0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000035C0u); -#endif - if (psx_delay_BFC130BC) { - psx_delay_BFC130BC = 0; - if (psx_taken_BFC130BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000035D8u); - goto label_BFC130D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000035C4u); - } -label_BFC130C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC130C4: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000035C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC130C8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000035C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC130CC: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035CCu); return; } g_debug_last_store_pc = 0x000035CCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000035CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC130D0: 10000025 beq $zero, $zero, 0xBFC13168 */ - uint32_t psx_brA_BFC130D0 = cpu->gpr[0]; uint32_t psx_brB_BFC130D0 = cpu->gpr[0]; - psx_taken_BFC130D0 = (psx_brA_BFC130D0 == psx_brB_BFC130D0); - psx_delay_BFC130D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC130D4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000035D4u); -#endif - if (psx_delay_BFC130D0) { - psx_delay_BFC130D0 = 0; - if (psx_taken_BFC130D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003668u); - goto label_BFC13168; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000035D8u); - } -label_BFC130D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035D8u); -#endif - /* 0xBFC130D8: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000035D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC130DC: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x000035DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC130E0: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x000035E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC130E4: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x000035ECu; /* jal link before delay slot */ - psx_delay_BFC130E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC130E8: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035E8u); return; } g_debug_last_store_pc = 0x000035E8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000035E8u); -#endif - if (psx_delay_BFC130E4) { - psx_delay_BFC130E4 = 0; - cpu->gpr[31] = 0x000035ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC130EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035ECu); -#endif - /* 0xBFC130EC: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000035ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC130F0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000035F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC130F4: 14410007 bne $v0, $at, 0xBFC13114 */ - uint32_t psx_brA_BFC130F4 = cpu->gpr[2]; uint32_t psx_brB_BFC130F4 = cpu->gpr[1]; - psx_taken_BFC130F4 = (psx_brA_BFC130F4 != psx_brB_BFC130F4); - psx_delay_BFC130F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC130F8: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000035F8u); -#endif - if (psx_delay_BFC130F4) { - psx_delay_BFC130F4 = 0; - if (psx_taken_BFC130F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003614u); - goto label_BFC13114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000035FCu); - } -label_BFC130FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000035FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000035FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000035FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC130FC: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035FCu); return; } g_debug_last_store_pc = 0x000035FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000035FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13100: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13104: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC13108: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003608u); return; } g_debug_last_store_pc = 0x00003608u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1310C: 10000016 beq $zero, $zero, 0xBFC13168 */ - uint32_t psx_brA_BFC1310C = cpu->gpr[0]; uint32_t psx_brB_BFC1310C = cpu->gpr[0]; - psx_taken_BFC1310C = (psx_brA_BFC1310C == psx_brB_BFC1310C); - psx_delay_BFC1310C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13110: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003610u); -#endif - if (psx_delay_BFC1310C) { - psx_delay_BFC1310C = 0; - if (psx_taken_BFC1310C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003668u); - goto label_BFC13168; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003614u); - } -label_BFC13114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003614u); -#endif - /* 0xBFC13114: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003614u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC13118: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC1311C: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000361Cu); return; } g_debug_last_store_pc = 0x0000361Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003620u); -#endif - /* 0xBFC13120: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003620u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC13128: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003628u); return; } g_debug_last_store_pc = 0x00003628u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003628u); -#endif - /* 0xBFC1312C: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000362Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13130: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003630u); return; } g_debug_last_store_pc = 0x00003630u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003630u); -#endif - /* 0xBFC13134: 8D090040 lw $t1, 64($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003634u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090040u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC1313C: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00003644u; /* jalr link before delay slot */ - psx_delay_BFC1313C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003640u); -#endif - if (psx_delay_BFC1313C) { - psx_delay_BFC1313C = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00003644u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC13144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003644u); -#endif - /* 0xBFC13144: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003644u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13148: 10400006 beq $v0, $zero, 0xBFC13164 */ - uint32_t psx_brA_BFC13148 = cpu->gpr[2]; uint32_t psx_brB_BFC13148 = cpu->gpr[0]; - psx_taken_BFC13148 = (psx_brA_BFC13148 == psx_brB_BFC13148); - psx_delay_BFC13148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1314C: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000364Cu); return; } g_debug_last_store_pc = 0x0000364Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000364Cu); -#endif - if (psx_delay_BFC13148) { - psx_delay_BFC13148 = 0; - if (psx_taken_BFC13148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003664u); - goto label_BFC13164; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003650u); - } -label_BFC13150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003650u); -#endif - /* 0xBFC13150: 8C6A0018 lw $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003650u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00003650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13154: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13158: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1315C: 10000002 beq $zero, $zero, 0xBFC13168 */ - uint32_t psx_brA_BFC1315C = cpu->gpr[0]; uint32_t psx_brB_BFC1315C = cpu->gpr[0]; - psx_taken_BFC1315C = (psx_brA_BFC1315C == psx_brB_BFC1315C); - psx_delay_BFC1315C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC13160: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003660u); return; } g_debug_last_store_pc = 0x00003660u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00003660u); -#endif - if (psx_delay_BFC1315C) { - psx_delay_BFC1315C = 0; - if (psx_taken_BFC1315C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003668u); - goto label_BFC13168; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003664u); - } -label_BFC13164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13164: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003664u); -#endif -label_BFC13168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003668u); -#endif - /* 0xBFC13168: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003668u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1316C: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x0000366Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13170: 03E00008 jr $ra */ - psx_delay_BFC13170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003674u); -#endif - if (psx_delay_BFC13170) { - psx_delay_BFC13170 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003678(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003678u); - int psx_delay_BFC13180 = 0; - int psx_delay_BFC13188 = 0; - int psx_taken_BFC13188 = 0; - int psx_delay_BFC1319C = 0; - int psx_taken_BFC1319C = 0; - int psx_delay_BFC131B0 = 0; - int psx_delay_BFC131C0 = 0; - int psx_taken_BFC131C0 = 0; - int psx_delay_BFC131D8 = 0; - int psx_taken_BFC131D8 = 0; - int psx_delay_BFC13208 = 0; - int psx_delay_BFC13214 = 0; - int psx_taken_BFC13214 = 0; - int psx_delay_BFC13228 = 0; - int psx_taken_BFC13228 = 0; - int psx_delay_BFC1323C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13188u: goto label_BFC13188; - case 0xBFC13190u: goto label_BFC13190; - case 0xBFC131A4u: goto label_BFC131A4; - case 0xBFC131B8u: goto label_BFC131B8; - case 0xBFC131C8u: goto label_BFC131C8; - case 0xBFC131E0u: goto label_BFC131E0; - case 0xBFC13210u: goto label_BFC13210; - case 0xBFC1321Cu: goto label_BFC1321C; - case 0xBFC13230u: goto label_BFC13230; - case 0xBFC13234u: goto label_BFC13234; - default: break; - } - } -label_BFC13178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13178: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1317C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000367Cu); return; } g_debug_last_store_pc = 0x0000367Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000367Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13180: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x00003688u; /* jal link before delay slot */ - psx_delay_BFC13180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13184: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003684u); return; } g_debug_last_store_pc = 0x00003684u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003684u); -#endif - if (psx_delay_BFC13180) { - psx_delay_BFC13180 = 0; - cpu->gpr[31] = 0x00003688u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC13188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13188: 14400006 bne $v0, $zero, 0xBFC131A4 */ - uint32_t psx_brA_BFC13188 = cpu->gpr[2]; uint32_t psx_brB_BFC13188 = cpu->gpr[0]; - psx_taken_BFC13188 = (psx_brA_BFC13188 != psx_brB_BFC13188); - psx_delay_BFC13188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1318C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000368Cu); -#endif - if (psx_delay_BFC13188) { - psx_delay_BFC13188 = 0; - if (psx_taken_BFC13188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000036A4u); - goto label_BFC131A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003690u); - } -label_BFC13190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC13190: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13194: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC13198: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003698u); return; } g_debug_last_store_pc = 0x00003698u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1319C: 10000025 beq $zero, $zero, 0xBFC13234 */ - uint32_t psx_brA_BFC1319C = cpu->gpr[0]; uint32_t psx_brB_BFC1319C = cpu->gpr[0]; - psx_taken_BFC1319C = (psx_brA_BFC1319C == psx_brB_BFC1319C); - psx_delay_BFC1319C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC131A0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000036A0u); -#endif - if (psx_delay_BFC1319C) { - psx_delay_BFC1319C = 0; - if (psx_taken_BFC1319C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003734u); - goto label_BFC13234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000036A4u); - } -label_BFC131A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000036A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000036A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036A4u); -#endif - /* 0xBFC131A4: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000036A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC131A8: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x000036A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC131AC: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x000036ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC131B0: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x000036B8u; /* jal link before delay slot */ - psx_delay_BFC131B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC131B4: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036B4u); return; } g_debug_last_store_pc = 0x000036B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000036B4u); -#endif - if (psx_delay_BFC131B0) { - psx_delay_BFC131B0 = 0; - cpu->gpr[31] = 0x000036B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC131B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000036B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000036B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036B8u); -#endif - /* 0xBFC131B8: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036B8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000036B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC131BC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000036BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC131C0: 14410007 bne $v0, $at, 0xBFC131E0 */ - uint32_t psx_brA_BFC131C0 = cpu->gpr[2]; uint32_t psx_brB_BFC131C0 = cpu->gpr[1]; - psx_taken_BFC131C0 = (psx_brA_BFC131C0 != psx_brB_BFC131C0); - psx_delay_BFC131C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC131C4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000036C4u); -#endif - if (psx_delay_BFC131C0) { - psx_delay_BFC131C0 = 0; - if (psx_taken_BFC131C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000036E0u); - goto label_BFC131E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000036C8u); - } -label_BFC131C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000036C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000036C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC131C8: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036C8u); return; } g_debug_last_store_pc = 0x000036C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000036C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC131CC: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x000036CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC131D0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000036D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC131D4: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036D4u); return; } g_debug_last_store_pc = 0x000036D4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000036D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC131D8: 10000016 beq $zero, $zero, 0xBFC13234 */ - uint32_t psx_brA_BFC131D8 = cpu->gpr[0]; uint32_t psx_brB_BFC131D8 = cpu->gpr[0]; - psx_taken_BFC131D8 = (psx_brA_BFC131D8 == psx_brB_BFC131D8); - psx_delay_BFC131D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC131DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000036DCu); -#endif - if (psx_delay_BFC131D8) { - psx_delay_BFC131D8 = 0; - if (psx_taken_BFC131D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003734u); - goto label_BFC13234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000036E0u); - } -label_BFC131E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000036E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000036E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036E0u); -#endif - /* 0xBFC131E0: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000036E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC131E4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000036E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC131E8: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036E8u); return; } g_debug_last_store_pc = 0x000036E8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000036E8u); -#endif - /* 0xBFC131EC: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036ECu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000036ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000036F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC131F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000036F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC131F4: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036F4u); return; } g_debug_last_store_pc = 0x000036F4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000036F4u); -#endif - /* 0xBFC131F8: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036F8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000036F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC131FC: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036FCu); return; } g_debug_last_store_pc = 0x000036FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000036FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003700u); -#endif - /* 0xBFC13200: 8D09004C lw $t1, 76($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003700u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D09004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC13208: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00003710u; /* jalr link before delay slot */ - psx_delay_BFC13208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1320C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000370Cu); -#endif - if (psx_delay_BFC13208) { - psx_delay_BFC13208 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00003710u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC13210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003710u); -#endif - /* 0xBFC13210: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003710u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13214: 10400006 beq $v0, $zero, 0xBFC13230 */ - uint32_t psx_brA_BFC13214 = cpu->gpr[2]; uint32_t psx_brB_BFC13214 = cpu->gpr[0]; - psx_taken_BFC13214 = (psx_brA_BFC13214 == psx_brB_BFC13214); - psx_delay_BFC13214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13218: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003718u); return; } g_debug_last_store_pc = 0x00003718u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003718u); -#endif - if (psx_delay_BFC13214) { - psx_delay_BFC13214 = 0; - if (psx_taken_BFC13214) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003730u); - goto label_BFC13230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000371Cu); - } -label_BFC1321C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000371Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000371Cu); -#endif - /* 0xBFC1321C: 8C6A0018 lw $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000371Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13220: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13224: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13228: 10000002 beq $zero, $zero, 0xBFC13234 */ - uint32_t psx_brA_BFC13228 = cpu->gpr[0]; uint32_t psx_brB_BFC13228 = cpu->gpr[0]; - psx_taken_BFC13228 = (psx_brA_BFC13228 == psx_brB_BFC13228); - psx_delay_BFC13228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1322C: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000372Cu); return; } g_debug_last_store_pc = 0x0000372Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000372Cu); -#endif - if (psx_delay_BFC13228) { - psx_delay_BFC13228 = 0; - if (psx_taken_BFC13228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003734u); - goto label_BFC13234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003730u); - } -label_BFC13230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13230: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003730u); -#endif -label_BFC13234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003734u); -#endif - /* 0xBFC13234: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003734u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13238: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x00003738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1323C: 03E00008 jr $ra */ - psx_delay_BFC1323C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003740u); -#endif - if (psx_delay_BFC1323C) { - psx_delay_BFC1323C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003744(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003744u); - int psx_delay_BFC1324C = 0; - int psx_delay_BFC13254 = 0; - int psx_taken_BFC13254 = 0; - int psx_delay_BFC13268 = 0; - int psx_taken_BFC13268 = 0; - int psx_delay_BFC1327C = 0; - int psx_delay_BFC1328C = 0; - int psx_taken_BFC1328C = 0; - int psx_delay_BFC132A4 = 0; - int psx_taken_BFC132A4 = 0; - int psx_delay_BFC132D4 = 0; - int psx_delay_BFC132E0 = 0; - int psx_taken_BFC132E0 = 0; - int psx_delay_BFC132F4 = 0; - int psx_taken_BFC132F4 = 0; - int psx_delay_BFC13308 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13254u: goto label_BFC13254; - case 0xBFC1325Cu: goto label_BFC1325C; - case 0xBFC13270u: goto label_BFC13270; - case 0xBFC13284u: goto label_BFC13284; - case 0xBFC13294u: goto label_BFC13294; - case 0xBFC132ACu: goto label_BFC132AC; - case 0xBFC132DCu: goto label_BFC132DC; - case 0xBFC132E8u: goto label_BFC132E8; - case 0xBFC132FCu: goto label_BFC132FC; - case 0xBFC13300u: goto label_BFC13300; - default: break; - } - } -label_BFC13244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13244: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13248: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003748u); return; } g_debug_last_store_pc = 0x00003748u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1324C: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x00003754u; /* jal link before delay slot */ - psx_delay_BFC1324C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13250: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003750u); return; } g_debug_last_store_pc = 0x00003750u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003750u); -#endif - if (psx_delay_BFC1324C) { - psx_delay_BFC1324C = 0; - cpu->gpr[31] = 0x00003754u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC13254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13254: 14400006 bne $v0, $zero, 0xBFC13270 */ - uint32_t psx_brA_BFC13254 = cpu->gpr[2]; uint32_t psx_brB_BFC13254 = cpu->gpr[0]; - psx_taken_BFC13254 = (psx_brA_BFC13254 != psx_brB_BFC13254); - psx_delay_BFC13254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC13258: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003758u); -#endif - if (psx_delay_BFC13254) { - psx_delay_BFC13254 = 0; - if (psx_taken_BFC13254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003770u); - goto label_BFC13270; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000375Cu); - } -label_BFC1325C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000375Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1325C: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13260: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC13264: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003764u); return; } g_debug_last_store_pc = 0x00003764u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13268: 10000025 beq $zero, $zero, 0xBFC13300 */ - uint32_t psx_brA_BFC13268 = cpu->gpr[0]; uint32_t psx_brB_BFC13268 = cpu->gpr[0]; - psx_taken_BFC13268 = (psx_brA_BFC13268 == psx_brB_BFC13268); - psx_delay_BFC13268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1326C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000376Cu); -#endif - if (psx_delay_BFC13268) { - psx_delay_BFC13268 = 0; - if (psx_taken_BFC13268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003800u); - goto label_BFC13300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003770u); - } -label_BFC13270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003770u); -#endif - /* 0xBFC13270: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003770u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13274: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00003774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC13278: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x00003778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1327C: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x00003784u; /* jal link before delay slot */ - psx_delay_BFC1327C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13280: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003780u); return; } g_debug_last_store_pc = 0x00003780u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003780u); -#endif - if (psx_delay_BFC1327C) { - psx_delay_BFC1327C = 0; - cpu->gpr[31] = 0x00003784u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC13284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003784u); -#endif - /* 0xBFC13284: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003784u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13288: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1328C: 14410007 bne $v0, $at, 0xBFC132AC */ - uint32_t psx_brA_BFC1328C = cpu->gpr[2]; uint32_t psx_brB_BFC1328C = cpu->gpr[1]; - psx_taken_BFC1328C = (psx_brA_BFC1328C != psx_brB_BFC1328C); - psx_delay_BFC1328C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC13290: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003790u); -#endif - if (psx_delay_BFC1328C) { - psx_delay_BFC1328C = 0; - if (psx_taken_BFC1328C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000037ACu); - goto label_BFC132AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003794u); - } -label_BFC13294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13294: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003794u); return; } g_debug_last_store_pc = 0x00003794u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13298: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1329C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC132A0: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037A0u); return; } g_debug_last_store_pc = 0x000037A0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000037A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC132A4: 10000016 beq $zero, $zero, 0xBFC13300 */ - uint32_t psx_brA_BFC132A4 = cpu->gpr[0]; uint32_t psx_brB_BFC132A4 = cpu->gpr[0]; - psx_taken_BFC132A4 = (psx_brA_BFC132A4 == psx_brB_BFC132A4); - psx_delay_BFC132A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC132A8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000037A8u); -#endif - if (psx_delay_BFC132A4) { - psx_delay_BFC132A4 = 0; - if (psx_taken_BFC132A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003800u); - goto label_BFC13300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000037ACu); - } -label_BFC132AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000037ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000037ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037ACu); -#endif - /* 0xBFC132AC: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037ACu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000037ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC132B0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000037B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC132B4: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037B4u); return; } g_debug_last_store_pc = 0x000037B4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000037B4u); -#endif - /* 0xBFC132B8: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037B8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000037B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC132BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000037BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC132C0: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037C0u); return; } g_debug_last_store_pc = 0x000037C0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000037C0u); -#endif - /* 0xBFC132C4: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037C4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000037C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC132C8: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037C8u); return; } g_debug_last_store_pc = 0x000037C8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000037C8u); -#endif - /* 0xBFC132CC: 8D09002C lw $t1, 44($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037CCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D09002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000037CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC132D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000037D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC132D4: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x000037DCu; /* jalr link before delay slot */ - psx_delay_BFC132D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC132D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000037D8u); -#endif - if (psx_delay_BFC132D4) { - psx_delay_BFC132D4 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x000037DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC132DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000037DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000037DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037DCu); -#endif - /* 0xBFC132DC: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037DCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000037DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC132E0: 10400006 beq $v0, $zero, 0xBFC132FC */ - uint32_t psx_brA_BFC132E0 = cpu->gpr[2]; uint32_t psx_brB_BFC132E0 = cpu->gpr[0]; - psx_taken_BFC132E0 = (psx_brA_BFC132E0 == psx_brB_BFC132E0); - psx_delay_BFC132E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC132E4: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037E4u); return; } g_debug_last_store_pc = 0x000037E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000037E4u); -#endif - if (psx_delay_BFC132E0) { - psx_delay_BFC132E0 = 0; - if (psx_taken_BFC132E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000037FCu); - goto label_BFC132FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000037E8u); - } -label_BFC132E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000037E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000037E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037E8u); -#endif - /* 0xBFC132E8: 8C6A0018 lw $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037E8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000037E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC132EC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000037ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC132F0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000037F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC132F4: 10000002 beq $zero, $zero, 0xBFC13300 */ - uint32_t psx_brA_BFC132F4 = cpu->gpr[0]; uint32_t psx_brB_BFC132F4 = cpu->gpr[0]; - psx_taken_BFC132F4 = (psx_brA_BFC132F4 == psx_brB_BFC132F4); - psx_delay_BFC132F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC132F8: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037F8u); return; } g_debug_last_store_pc = 0x000037F8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000037F8u); -#endif - if (psx_delay_BFC132F4) { - psx_delay_BFC132F4 = 0; - if (psx_taken_BFC132F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003800u); - goto label_BFC13300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000037FCu); - } -label_BFC132FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000037FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000037FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000037FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC132FC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000037FCu); -#endif -label_BFC13300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003800u); -#endif - /* 0xBFC13300: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003800u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13304: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x00003804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13308: 03E00008 jr $ra */ - psx_delay_BFC13308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1330C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000380Cu); -#endif - if (psx_delay_BFC13308) { - psx_delay_BFC13308 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003810(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003810u); - int psx_delay_BFC13318 = 0; - int psx_delay_BFC13320 = 0; - int psx_taken_BFC13320 = 0; - int psx_delay_BFC13334 = 0; - int psx_taken_BFC13334 = 0; - int psx_delay_BFC13348 = 0; - int psx_delay_BFC13358 = 0; - int psx_taken_BFC13358 = 0; - int psx_delay_BFC1336C = 0; - int psx_taken_BFC1336C = 0; - int psx_delay_BFC1339C = 0; - int psx_delay_BFC133A8 = 0; - int psx_taken_BFC133A8 = 0; - int psx_delay_BFC133BC = 0; - int psx_taken_BFC133BC = 0; - int psx_delay_BFC133D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13320u: goto label_BFC13320; - case 0xBFC13328u: goto label_BFC13328; - case 0xBFC1333Cu: goto label_BFC1333C; - case 0xBFC13350u: goto label_BFC13350; - case 0xBFC13360u: goto label_BFC13360; - case 0xBFC13374u: goto label_BFC13374; - case 0xBFC133A4u: goto label_BFC133A4; - case 0xBFC133B0u: goto label_BFC133B0; - case 0xBFC133C4u: goto label_BFC133C4; - case 0xBFC133C8u: goto label_BFC133C8; - default: break; - } - } -label_BFC13310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13310: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13314: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003814u); return; } g_debug_last_store_pc = 0x00003814u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13318: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x00003820u; /* jal link before delay slot */ - psx_delay_BFC13318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1331C: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000381Cu); return; } g_debug_last_store_pc = 0x0000381Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000381Cu); -#endif - if (psx_delay_BFC13318) { - psx_delay_BFC13318 = 0; - cpu->gpr[31] = 0x00003820u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC13320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13320: 14400006 bne $v0, $zero, 0xBFC1333C */ - uint32_t psx_brA_BFC13320 = cpu->gpr[2]; uint32_t psx_brB_BFC13320 = cpu->gpr[0]; - psx_taken_BFC13320 = (psx_brA_BFC13320 != psx_brB_BFC13320); - psx_delay_BFC13320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC13324: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003824u); -#endif - if (psx_delay_BFC13320) { - psx_delay_BFC13320 = 0; - if (psx_taken_BFC13320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000383Cu); - goto label_BFC1333C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003828u); - } -label_BFC13328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC13328: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1332C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC13330: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003830u); return; } g_debug_last_store_pc = 0x00003830u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13334: 10000024 beq $zero, $zero, 0xBFC133C8 */ - uint32_t psx_brA_BFC13334 = cpu->gpr[0]; uint32_t psx_brB_BFC13334 = cpu->gpr[0]; - psx_taken_BFC13334 = (psx_brA_BFC13334 == psx_brB_BFC13334); - psx_delay_BFC13334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13338: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003838u); -#endif - if (psx_delay_BFC13334) { - psx_delay_BFC13334 = 0; - if (psx_taken_BFC13334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038C8u); - goto label_BFC133C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000383Cu); - } -label_BFC1333C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000383Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000383Cu); -#endif - /* 0xBFC1333C: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000383Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13340: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00003840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC13344: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x00003844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13348: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x00003850u; /* jal link before delay slot */ - psx_delay_BFC13348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1334C: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000384Cu); return; } g_debug_last_store_pc = 0x0000384Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000384Cu); -#endif - if (psx_delay_BFC13348) { - psx_delay_BFC13348 = 0; - cpu->gpr[31] = 0x00003850u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC13350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003850u); -#endif - /* 0xBFC13350: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003850u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13354: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13358: 14410006 bne $v0, $at, 0xBFC13374 */ - uint32_t psx_brA_BFC13358 = cpu->gpr[2]; uint32_t psx_brB_BFC13358 = cpu->gpr[1]; - psx_taken_BFC13358 = (psx_brA_BFC13358 != psx_brB_BFC13358); - psx_delay_BFC13358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC1335C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000385Cu); -#endif - if (psx_delay_BFC13358) { - psx_delay_BFC13358 = 0; - if (psx_taken_BFC13358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003874u); - goto label_BFC13374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003860u); - } -label_BFC13360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13360: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13364: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC13368: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003868u); return; } g_debug_last_store_pc = 0x00003868u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1336C: 10000016 beq $zero, $zero, 0xBFC133C8 */ - uint32_t psx_brA_BFC1336C = cpu->gpr[0]; uint32_t psx_brB_BFC1336C = cpu->gpr[0]; - psx_taken_BFC1336C = (psx_brA_BFC1336C == psx_brB_BFC1336C); - psx_delay_BFC1336C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13370: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003870u); -#endif - if (psx_delay_BFC1336C) { - psx_delay_BFC1336C = 0; - if (psx_taken_BFC1336C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038C8u); - goto label_BFC133C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003874u); - } -label_BFC13374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003874u); -#endif - /* 0xBFC13374: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003874u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC13378: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC1337C: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000387Cu); return; } g_debug_last_store_pc = 0x0000387Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003880u); -#endif - /* 0xBFC13380: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003880u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC13388: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003888u); return; } g_debug_last_store_pc = 0x00003888u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003888u); -#endif - /* 0xBFC1338C: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000388Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13390: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003890u); return; } g_debug_last_store_pc = 0x00003890u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003890u); -#endif - /* 0xBFC13394: 8D090030 lw $t1, 48($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003894u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090030u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC1339C: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x000038A4u; /* jalr link before delay slot */ - psx_delay_BFC1339C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC133A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000038A0u); -#endif - if (psx_delay_BFC1339C) { - psx_delay_BFC1339C = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x000038A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC133A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038A4u); -#endif - /* 0xBFC133A4: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000038A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC133A8: 10400006 beq $v0, $zero, 0xBFC133C4 */ - uint32_t psx_brA_BFC133A8 = cpu->gpr[2]; uint32_t psx_brB_BFC133A8 = cpu->gpr[0]; - psx_taken_BFC133A8 = (psx_brA_BFC133A8 == psx_brB_BFC133A8); - psx_delay_BFC133A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC133AC: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038ACu); return; } g_debug_last_store_pc = 0x000038ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000038ACu); -#endif - if (psx_delay_BFC133A8) { - psx_delay_BFC133A8 = 0; - if (psx_taken_BFC133A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038C4u); - goto label_BFC133C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038B0u); - } -label_BFC133B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038B0u); -#endif - /* 0xBFC133B0: 8C6A0018 lw $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038B0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000038B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC133B4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000038B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC133B8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000038B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC133BC: 10000002 beq $zero, $zero, 0xBFC133C8 */ - uint32_t psx_brA_BFC133BC = cpu->gpr[0]; uint32_t psx_brB_BFC133BC = cpu->gpr[0]; - psx_taken_BFC133BC = (psx_brA_BFC133BC == psx_brB_BFC133BC); - psx_delay_BFC133BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC133C0: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038C0u); return; } g_debug_last_store_pc = 0x000038C0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000038C0u); -#endif - if (psx_delay_BFC133BC) { - psx_delay_BFC133BC = 0; - if (psx_taken_BFC133BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038C8u); - goto label_BFC133C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038C4u); - } -label_BFC133C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC133C4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000038C4u); -#endif -label_BFC133C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038C8u); -#endif - /* 0xBFC133C8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000038C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC133CC: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x000038CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC133D0: 03E00008 jr $ra */ - psx_delay_BFC133D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC133D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000038D4u); -#endif - if (psx_delay_BFC133D0) { - psx_delay_BFC133D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000038D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000038D8u); - int psx_delay_BFC133E0 = 0; - int psx_delay_BFC133E8 = 0; - int psx_taken_BFC133E8 = 0; - int psx_delay_BFC133FC = 0; - int psx_taken_BFC133FC = 0; - int psx_delay_BFC13410 = 0; - int psx_delay_BFC13420 = 0; - int psx_taken_BFC13420 = 0; - int psx_delay_BFC13438 = 0; - int psx_taken_BFC13438 = 0; - int psx_delay_BFC13468 = 0; - int psx_delay_BFC13474 = 0; - int psx_taken_BFC13474 = 0; - int psx_delay_BFC13488 = 0; - int psx_taken_BFC13488 = 0; - int psx_delay_BFC1349C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC133E8u: goto label_BFC133E8; - case 0xBFC133F0u: goto label_BFC133F0; - case 0xBFC13404u: goto label_BFC13404; - case 0xBFC13418u: goto label_BFC13418; - case 0xBFC13428u: goto label_BFC13428; - case 0xBFC13440u: goto label_BFC13440; - case 0xBFC13444u: goto label_BFC13444; - case 0xBFC13470u: goto label_BFC13470; - case 0xBFC1347Cu: goto label_BFC1347C; - case 0xBFC13490u: goto label_BFC13490; - case 0xBFC13494u: goto label_BFC13494; - default: break; - } - } -label_BFC133D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC133D8: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x000038D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC133DC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038DCu); return; } g_debug_last_store_pc = 0x000038DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000038DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC133E0: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x000038E8u; /* jal link before delay slot */ - psx_delay_BFC133E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC133E4: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038E4u); return; } g_debug_last_store_pc = 0x000038E4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000038E4u); -#endif - if (psx_delay_BFC133E0) { - psx_delay_BFC133E0 = 0; - cpu->gpr[31] = 0x000038E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC133E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC133E8: 14400006 bne $v0, $zero, 0xBFC13404 */ - uint32_t psx_brA_BFC133E8 = cpu->gpr[2]; uint32_t psx_brB_BFC133E8 = cpu->gpr[0]; - psx_taken_BFC133E8 = (psx_brA_BFC133E8 != psx_brB_BFC133E8); - psx_delay_BFC133E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC133EC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000038ECu); -#endif - if (psx_delay_BFC133E8) { - psx_delay_BFC133E8 = 0; - if (psx_taken_BFC133E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003904u); - goto label_BFC13404; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000038F0u); - } -label_BFC133F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000038F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000038F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000038F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC133F0: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000038F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC133F4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000038F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC133F8: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038F8u); return; } g_debug_last_store_pc = 0x000038F8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000038F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC133FC: 10000025 beq $zero, $zero, 0xBFC13494 */ - uint32_t psx_brA_BFC133FC = cpu->gpr[0]; uint32_t psx_brB_BFC133FC = cpu->gpr[0]; - psx_taken_BFC133FC = (psx_brA_BFC133FC == psx_brB_BFC133FC); - psx_delay_BFC133FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13400: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003900u); -#endif - if (psx_delay_BFC133FC) { - psx_delay_BFC133FC = 0; - if (psx_taken_BFC133FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003994u); - goto label_BFC13494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003904u); - } -label_BFC13404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003904u); -#endif - /* 0xBFC13404: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003904u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13408: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00003908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC1340C: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x0000390Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13410: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x00003918u; /* jal link before delay slot */ - psx_delay_BFC13410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13414: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003914u); return; } g_debug_last_store_pc = 0x00003914u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003914u); -#endif - if (psx_delay_BFC13410) { - psx_delay_BFC13410 = 0; - cpu->gpr[31] = 0x00003918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC13418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003918u); -#endif - /* 0xBFC13418: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003918u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1341C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000391Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13420: 14410008 bne $v0, $at, 0xBFC13444 */ - uint32_t psx_brA_BFC13420 = cpu->gpr[2]; uint32_t psx_brB_BFC13420 = cpu->gpr[1]; - psx_taken_BFC13420 = (psx_brA_BFC13420 != psx_brB_BFC13420); - psx_delay_BFC13420 = 1; - /* 0xBFC13424: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003924u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003924u); -#endif - if (psx_delay_BFC13420) { - psx_delay_BFC13420 = 0; - if (psx_taken_BFC13420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003944u); - goto label_BFC13444; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003928u); - } -label_BFC13428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13428: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1342C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000392Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC13430: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003930u); return; } g_debug_last_store_pc = 0x00003930u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13434: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003934u); return; } g_debug_last_store_pc = 0x00003934u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13438: 10000016 beq $zero, $zero, 0xBFC13494 */ - uint32_t psx_brA_BFC13438 = cpu->gpr[0]; uint32_t psx_brB_BFC13438 = cpu->gpr[0]; - psx_taken_BFC13438 = (psx_brA_BFC13438 == psx_brB_BFC13438); - psx_delay_BFC13438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1343C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000393Cu); -#endif - if (psx_delay_BFC13438) { - psx_delay_BFC13438 = 0; - if (psx_taken_BFC13438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003994u); - goto label_BFC13494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003940u); - } -label_BFC13440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003940u); -#endif - /* 0xBFC13440: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003940u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003940u); -#endif -label_BFC13444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC13444: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC13448: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003948u); return; } g_debug_last_store_pc = 0x00003948u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003948u); -#endif - /* 0xBFC1344C: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000394Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000394Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC13454: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003954u); return; } g_debug_last_store_pc = 0x00003954u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003954u); -#endif - /* 0xBFC13458: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003958u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1345C: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000395Cu); return; } g_debug_last_store_pc = 0x0000395Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000395Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003960u); -#endif - /* 0xBFC13460: 8D09003C lw $t1, 60($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003960u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D09003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC13468: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00003970u; /* jalr link before delay slot */ - psx_delay_BFC13468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1346C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000396Cu); -#endif - if (psx_delay_BFC13468) { - psx_delay_BFC13468 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00003970u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC13470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003970u); -#endif - /* 0xBFC13470: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003970u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13474: 10400006 beq $v0, $zero, 0xBFC13490 */ - uint32_t psx_brA_BFC13474 = cpu->gpr[2]; uint32_t psx_brB_BFC13474 = cpu->gpr[0]; - psx_taken_BFC13474 = (psx_brA_BFC13474 == psx_brB_BFC13474); - psx_delay_BFC13474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13478: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003978u); return; } g_debug_last_store_pc = 0x00003978u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003978u); -#endif - if (psx_delay_BFC13474) { - psx_delay_BFC13474 = 0; - if (psx_taken_BFC13474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003990u); - goto label_BFC13490; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000397Cu); - } -label_BFC1347C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000397Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000397Cu); -#endif - /* 0xBFC1347C: 8C6A0018 lw $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000397Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13480: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13484: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13488: 10000002 beq $zero, $zero, 0xBFC13494 */ - uint32_t psx_brA_BFC13488 = cpu->gpr[0]; uint32_t psx_brB_BFC13488 = cpu->gpr[0]; - psx_taken_BFC13488 = (psx_brA_BFC13488 == psx_brB_BFC13488); - psx_delay_BFC13488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1348C: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000398Cu); return; } g_debug_last_store_pc = 0x0000398Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000398Cu); -#endif - if (psx_delay_BFC13488) { - psx_delay_BFC13488 = 0; - if (psx_taken_BFC13488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003994u); - goto label_BFC13494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003990u); - } -label_BFC13490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13490: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003990u); -#endif -label_BFC13494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003994u); -#endif - /* 0xBFC13494: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003994u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13498: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x00003998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1349C: 03E00008 jr $ra */ - psx_delay_BFC1349C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC134A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000039A0u); -#endif - if (psx_delay_BFC1349C) { - psx_delay_BFC1349C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000039A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000039A4u); - int psx_delay_BFC134B8 = 0; - int psx_taken_BFC134B8 = 0; - int psx_delay_BFC134C0 = 0; - int psx_delay_BFC134D0 = 0; - int psx_taken_BFC134D0 = 0; - int psx_delay_BFC134E4 = 0; - int psx_taken_BFC134E4 = 0; - int psx_delay_BFC134F4 = 0; - int psx_delay_BFC13500 = 0; - int psx_taken_BFC13500 = 0; - int psx_delay_BFC13520 = 0; - int psx_taken_BFC13520 = 0; - int psx_delay_BFC13558 = 0; - int psx_delay_BFC13568 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC134C0u: goto label_BFC134C0; - case 0xBFC134C8u: goto label_BFC134C8; - case 0xBFC134D8u: goto label_BFC134D8; - case 0xBFC134ECu: goto label_BFC134EC; - case 0xBFC134FCu: goto label_BFC134FC; - case 0xBFC13508u: goto label_BFC13508; - case 0xBFC13528u: goto label_BFC13528; - case 0xBFC13560u: goto label_BFC13560; - default: break; - } - } -label_BFC134A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC134A4: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000039A4u); -#endif - /* 0xBFC134A8: 8C637480 lw $v1, 29824($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29824; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039A8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637480u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000039A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC134AC: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x000039ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC134B0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039B0u); return; } g_debug_last_store_pc = 0x000039B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000039B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC134B4: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039B4u); return; } g_debug_last_store_pc = 0x000039B4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000039B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC134B8: 1460000C bne $v1, $zero, 0xBFC134EC */ - uint32_t psx_brA_BFC134B8 = cpu->gpr[3]; uint32_t psx_brB_BFC134B8 = cpu->gpr[0]; - psx_taken_BFC134B8 = (psx_brA_BFC134B8 != psx_brB_BFC134B8); - psx_delay_BFC134B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC134BC: AFA50034 sw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039BCu); return; } g_debug_last_store_pc = 0x000039BCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000039BCu); -#endif - if (psx_delay_BFC134B8) { - psx_delay_BFC134B8 = 0; - if (psx_taken_BFC134B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000039ECu); - goto label_BFC134EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000039C0u); - } -label_BFC134C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC134C0: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x000039C8u; /* jal link before delay slot */ - psx_delay_BFC134C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC134C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000039C4u); -#endif - if (psx_delay_BFC134C0) { - psx_delay_BFC134C0 = 0; - cpu->gpr[31] = 0x000039C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC134C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC134C8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000039C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC134CC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000039CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC134D0: 14400006 bne $v0, $zero, 0xBFC134EC */ - uint32_t psx_brA_BFC134D0 = cpu->gpr[2]; uint32_t psx_brB_BFC134D0 = cpu->gpr[0]; - psx_taken_BFC134D0 = (psx_brA_BFC134D0 != psx_brB_BFC134D0); - psx_delay_BFC134D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC134D4: AC237480 sw $v1, 29824($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29824; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039D4u); return; } g_debug_last_store_pc = 0x000039D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC237480u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000039D4u); -#endif - if (psx_delay_BFC134D0) { - psx_delay_BFC134D0 = 0; - if (psx_taken_BFC134D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000039ECu); - goto label_BFC134EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000039D8u); - } -label_BFC134D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC134D8: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000039D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC134DC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000039DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC134E0: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039E0u); return; } g_debug_last_store_pc = 0x000039E0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000039E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC134E4: 1000001E beq $zero, $zero, 0xBFC13560 */ - uint32_t psx_brA_BFC134E4 = cpu->gpr[0]; uint32_t psx_brB_BFC134E4 = cpu->gpr[0]; - psx_taken_BFC134E4 = (psx_brA_BFC134E4 == psx_brB_BFC134E4); - psx_delay_BFC134E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC134E8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000039E8u); -#endif - if (psx_delay_BFC134E4) { - psx_delay_BFC134E4 = 0; - if (psx_taken_BFC134E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003A60u); - goto label_BFC13560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000039ECu); - } -label_BFC134EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039ECu); -#endif - /* 0xBFC134EC: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039ECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000039ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC134F0: 27A50028 addiu $a1, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A50028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x000039F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC134F4: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x000039FCu; /* jal link before delay slot */ - psx_delay_BFC134F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC134F8: 27A60024 addiu $a2, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A60024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x000039F8u); -#endif - if (psx_delay_BFC134F4) { - psx_delay_BFC134F4 = 0; - cpu->gpr[31] = 0x000039FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC134FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000039FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000039FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000039FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC134FC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000039FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13500: 14410009 bne $v0, $at, 0xBFC13528 */ - uint32_t psx_brA_BFC13500 = cpu->gpr[2]; uint32_t psx_brB_BFC13500 = cpu->gpr[1]; - psx_taken_BFC13500 = (psx_brA_BFC13500 != psx_brB_BFC13500); - psx_delay_BFC13500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC13504: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003A04u); -#endif - if (psx_delay_BFC13500) { - psx_delay_BFC13500 = 0; - if (psx_taken_BFC13500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003A28u); - goto label_BFC13528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003A08u); - } -label_BFC13508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC13508: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003A08u); -#endif - /* 0xBFC1350C: 8C637480 lw $v1, 29824($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29824; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A0Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637480u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13510: 240F0013 addiu $t7, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240F0013u, cpu->gpr[15], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13514: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC13518: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A18u); return; } g_debug_last_store_pc = 0x00003A18u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1351C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13520: 1000000F beq $zero, $zero, 0xBFC13560 */ - uint32_t psx_brA_BFC13520 = cpu->gpr[0]; uint32_t psx_brB_BFC13520 = cpu->gpr[0]; - psx_taken_BFC13520 = (psx_brA_BFC13520 == psx_brB_BFC13520); - psx_delay_BFC13520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13524: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A24u); return; } g_debug_last_store_pc = 0x00003A24u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A24u); -#endif - if (psx_delay_BFC13520) { - psx_delay_BFC13520 = 0; - if (psx_taken_BFC13520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003A60u); - goto label_BFC13560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003A28u); - } -label_BFC13528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC13528: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003A28u); -#endif - /* 0xBFC1352C: 8C637480 lw $v1, 29824($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29824; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A2Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637480u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A30u); -#endif - /* 0xBFC13530: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A30u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC13534: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC13538: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A38u); return; } g_debug_last_store_pc = 0x00003A38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A38u); -#endif - /* 0xBFC1353C: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A3Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13540: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC13544: AC79001C sw $t9, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A44u); return; } g_debug_last_store_pc = 0x00003A44u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A44u); -#endif - /* 0xBFC13548: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A48u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A48u); -#endif - /* 0xBFC1354C: 8FA60034 lw $a2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A4Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60034u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A50u); -#endif - /* 0xBFC13550: 8D090034 lw $t1, 52($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A50u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC13558: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x00003A60u; /* jalr link before delay slot */ - psx_delay_BFC13558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1355C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A5Cu); -#endif - if (psx_delay_BFC13558) { - psx_delay_BFC13558 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x00003A60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC13560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A60u); -#endif - /* 0xBFC13560: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13564: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x00003A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13568: 03E00008 jr $ra */ - psx_delay_BFC13568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1356C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A6Cu); -#endif - if (psx_delay_BFC13568) { - psx_delay_BFC13568 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003A70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003A70u); - int psx_delay_BFC13594 = 0; - int psx_delay_BFC135A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1359Cu: goto label_BFC1359C; - default: break; - } - } -label_BFC13570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC13570: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13574: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003A74u); -#endif - /* 0xBFC13578: 8C847480 lw $a0, 29824($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29824; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29824)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A78u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847480u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1357C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13580: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A80u); return; } g_debug_last_store_pc = 0x00003A80u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A80u); -#endif - /* 0xBFC13584: 8C8E001C lw $t6, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A84u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13588: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A88u); -#endif - /* 0xBFC1358C: 8DCF0038 lw $t7, 56($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A8Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC13594: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x00003A9Cu; /* jalr link before delay slot */ - psx_delay_BFC13594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003A98u); -#endif - if (psx_delay_BFC13594) { - psx_delay_BFC13594 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x00003A9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC1359C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003A9Cu); -#endif - /* 0xBFC1359C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC135A0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC135A4: 03E00008 jr $ra */ - psx_delay_BFC135A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC135A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003AA8u); -#endif - if (psx_delay_BFC135A4) { - psx_delay_BFC135A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003AAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003AACu); - int psx_delay_BFC135BC = 0; - int psx_delay_BFC135C4 = 0; - int psx_taken_BFC135C4 = 0; - int psx_delay_BFC135D8 = 0; - int psx_taken_BFC135D8 = 0; - int psx_delay_BFC135E0 = 0; - int psx_delay_BFC135E8 = 0; - int psx_taken_BFC135E8 = 0; - int psx_delay_BFC13600 = 0; - int psx_taken_BFC13600 = 0; - int psx_delay_BFC13614 = 0; - int psx_delay_BFC13624 = 0; - int psx_taken_BFC13624 = 0; - int psx_delay_BFC13634 = 0; - int psx_taken_BFC13634 = 0; - int psx_delay_BFC1364C = 0; - int psx_delay_BFC13664 = 0; - int psx_taken_BFC13664 = 0; - int psx_delay_BFC13674 = 0; - int psx_taken_BFC13674 = 0; - int psx_delay_BFC13680 = 0; - int psx_taken_BFC13680 = 0; - int psx_delay_BFC13690 = 0; - int psx_taken_BFC13690 = 0; - int psx_delay_BFC136D8 = 0; - int psx_delay_BFC136EC = 0; - int psx_taken_BFC136EC = 0; - int psx_delay_BFC13700 = 0; - int psx_taken_BFC13700 = 0; - int psx_delay_BFC13708 = 0; - int psx_taken_BFC13708 = 0; - int psx_delay_BFC13724 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC135C4u: goto label_BFC135C4; - case 0xBFC135CCu: goto label_BFC135CC; - case 0xBFC135E0u: goto label_BFC135E0; - case 0xBFC135E8u: goto label_BFC135E8; - case 0xBFC135F0u: goto label_BFC135F0; - case 0xBFC13608u: goto label_BFC13608; - case 0xBFC1361Cu: goto label_BFC1361C; - case 0xBFC1362Cu: goto label_BFC1362C; - case 0xBFC1363Cu: goto label_BFC1363C; - case 0xBFC13654u: goto label_BFC13654; - case 0xBFC1366Cu: goto label_BFC1366C; - case 0xBFC1367Cu: goto label_BFC1367C; - case 0xBFC13688u: goto label_BFC13688; - case 0xBFC13698u: goto label_BFC13698; - case 0xBFC1369Cu: goto label_BFC1369C; - case 0xBFC136E0u: goto label_BFC136E0; - case 0xBFC136F4u: goto label_BFC136F4; - case 0xBFC13708u: goto label_BFC13708; - case 0xBFC13710u: goto label_BFC13710; - case 0xBFC1371Cu: goto label_BFC1371C; - default: break; - } - } -label_BFC135AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC135AC: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC135B0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AB0u); return; } g_debug_last_store_pc = 0x00003AB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC135B4: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AB4u); return; } g_debug_last_store_pc = 0x00003AB4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC135B8: AFA40050 sw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AB8u); return; } g_debug_last_store_pc = 0x00003AB8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC135BC: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x00003AC4u; /* jal link before delay slot */ - psx_delay_BFC135BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC135C0: AFA50054 sw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AC0u); return; } g_debug_last_store_pc = 0x00003AC0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AC0u); -#endif - if (psx_delay_BFC135BC) { - psx_delay_BFC135BC = 0; - cpu->gpr[31] = 0x00003AC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC135C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC135C4: 14400006 bne $v0, $zero, 0xBFC135E0 */ - uint32_t psx_brA_BFC135C4 = cpu->gpr[2]; uint32_t psx_brB_BFC135C4 = cpu->gpr[0]; - psx_taken_BFC135C4 = (psx_brA_BFC135C4 != psx_brB_BFC135C4); - psx_delay_BFC135C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC135C8: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003AC8u); -#endif - if (psx_delay_BFC135C4) { - psx_delay_BFC135C4 = 0; - if (psx_taken_BFC135C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003AE0u); - goto label_BFC135E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003ACCu); - } -label_BFC135CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC135CC: 240E0018 addiu $t6, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240E0018u, cpu->gpr[14], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC135D0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC135D4: AC2E8640 sw $t6, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AD4u); return; } g_debug_last_store_pc = 0x00003AD4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8640u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC135D8: 10000050 beq $zero, $zero, 0xBFC1371C */ - uint32_t psx_brA_BFC135D8 = cpu->gpr[0]; uint32_t psx_brB_BFC135D8 = cpu->gpr[0]; - psx_taken_BFC135D8 = (psx_brA_BFC135D8 == psx_brB_BFC135D8); - psx_delay_BFC135D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC135DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003ADCu); -#endif - if (psx_delay_BFC135D8) { - psx_delay_BFC135D8 = 0; - if (psx_taken_BFC135D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C1Cu); - goto label_BFC1371C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003AE0u); - } -label_BFC135E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC135E0: 0C000C18 jal 0xB0003060 */ - cpu->gpr[31] = 0x00003AE8u; /* jal link before delay slot */ - psx_delay_BFC135E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC135E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003AE4u); -#endif - if (psx_delay_BFC135E0) { - psx_delay_BFC135E0 = 0; - cpu->gpr[31] = 0x00003AE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003060u); - cpu->pc = 0x00003060u; return; - } -label_BFC135E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC135E8: 14400007 bne $v0, $zero, 0xBFC13608 */ - uint32_t psx_brA_BFC135E8 = cpu->gpr[2]; uint32_t psx_brB_BFC135E8 = cpu->gpr[0]; - psx_taken_BFC135E8 = (psx_brA_BFC135E8 != psx_brB_BFC135E8); - psx_delay_BFC135E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC135EC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003AECu); -#endif - if (psx_delay_BFC135E8) { - psx_delay_BFC135E8 = 0; - if (psx_taken_BFC135E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B08u); - goto label_BFC13608; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003AF0u); - } -label_BFC135F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC135F0: 240F0018 addiu $t7, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240F0018u, cpu->gpr[15], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC135F4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC135F8: AC2F8640 sw $t7, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AF8u); return; } g_debug_last_store_pc = 0x00003AF8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8640u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC135FC: AE000000 sw $zero, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003AFCu); return; } g_debug_last_store_pc = 0x00003AFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13600: 10000046 beq $zero, $zero, 0xBFC1371C */ - uint32_t psx_brA_BFC13600 = cpu->gpr[0]; uint32_t psx_brB_BFC13600 = cpu->gpr[0]; - psx_taken_BFC13600 = (psx_brA_BFC13600 == psx_brB_BFC13600); - psx_delay_BFC13600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13604: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003B04u); -#endif - if (psx_delay_BFC13600) { - psx_delay_BFC13600 = 0; - if (psx_taken_BFC13600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C1Cu); - goto label_BFC1371C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B08u); - } -label_BFC13608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B08u); -#endif - /* 0xBFC13608: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B08u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1360C: 27A5003C addiu $a1, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A5003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC13610: 27A60034 addiu $a2, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A60034u, cpu->gpr[6], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13614: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x00003B1Cu; /* jal link before delay slot */ - psx_delay_BFC13614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13618: AFA30048 sw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B18u); return; } g_debug_last_store_pc = 0x00003B18u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B18u); -#endif - if (psx_delay_BFC13614) { - psx_delay_BFC13614 = 0; - cpu->gpr[31] = 0x00003B1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC1361C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B1Cu); -#endif - /* 0xBFC1361C: 8FA30048 lw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B1Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13620: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13624: 14410005 bne $v0, $at, 0xBFC1363C */ - uint32_t psx_brA_BFC13624 = cpu->gpr[2]; uint32_t psx_brB_BFC13624 = cpu->gpr[1]; - psx_taken_BFC13624 = (psx_brA_BFC13624 != psx_brB_BFC13624); - psx_delay_BFC13624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC13628: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003B28u); -#endif - if (psx_delay_BFC13624) { - psx_delay_BFC13624 = 0; - if (psx_taken_BFC13624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B3Cu); - goto label_BFC1363C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B2Cu); - } -label_BFC1362C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1362C: 24180013 addiu $t8, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24180013u, cpu->gpr[24], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13630: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13634: 10000036 beq $zero, $zero, 0xBFC13710 */ - uint32_t psx_brA_BFC13634 = cpu->gpr[0]; uint32_t psx_brB_BFC13634 = cpu->gpr[0]; - psx_taken_BFC13634 = (psx_brA_BFC13634 == psx_brB_BFC13634); - psx_delay_BFC13634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC13638: AC388640 sw $t8, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B38u); return; } g_debug_last_store_pc = 0x00003B38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC388640u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B38u); -#endif - if (psx_delay_BFC13634) { - psx_delay_BFC13634 = 0; - if (psx_taken_BFC13634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C10u); - goto label_BFC13710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B3Cu); - } -label_BFC1363C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B3Cu); -#endif - /* 0xBFC1363C: 8FA40054 lw $a0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B3Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40054u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13640: AFA30048 sw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B40u); return; } g_debug_last_store_pc = 0x00003B40u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13644: 27A50038 addiu $a1, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A50038u, cpu->gpr[5], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC13648: 27A60030 addiu $a2, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27A60030u, cpu->gpr[6], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1364C: 0C000C7A jal 0xB00031E8 */ - cpu->gpr[31] = 0x00003B54u; /* jal link before delay slot */ - psx_delay_BFC1364C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC13650: AFA80044 sw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B50u); return; } g_debug_last_store_pc = 0x00003B50u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B50u); -#endif - if (psx_delay_BFC1364C) { - psx_delay_BFC1364C = 0; - cpu->gpr[31] = 0x00003B54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000031E8u); - cpu->pc = 0x000031E8u; return; - } -label_BFC13654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B54u); -#endif - /* 0xBFC13654: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B54u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B54u); -#endif - /* 0xBFC13658: 8FA90038 lw $t1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B58u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B58u); -#endif - /* 0xBFC1365C: 8FA30048 lw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B5Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B60u); -#endif - /* 0xBFC13660: 8FA80044 lw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B60u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC13664: 13290005 beq $t9, $t1, 0xBFC1367C */ - uint32_t psx_brA_BFC13664 = cpu->gpr[25]; uint32_t psx_brB_BFC13664 = cpu->gpr[9]; - psx_taken_BFC13664 = (psx_brA_BFC13664 == psx_brB_BFC13664); - psx_delay_BFC13664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC13668: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003B68u); -#endif - if (psx_delay_BFC13664) { - psx_delay_BFC13664 = 0; - if (psx_taken_BFC13664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B7Cu); - goto label_BFC1367C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B6Cu); - } -label_BFC1366C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1366C: 240A0012 addiu $t2, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x240A0012u, cpu->gpr[10], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13670: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13674: 10000026 beq $zero, $zero, 0xBFC13710 */ - uint32_t psx_brA_BFC13674 = cpu->gpr[0]; uint32_t psx_brB_BFC13674 = cpu->gpr[0]; - psx_taken_BFC13674 = (psx_brA_BFC13674 == psx_brB_BFC13674); - psx_delay_BFC13674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC13678: AC2A8640 sw $t2, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B78u); return; } g_debug_last_store_pc = 0x00003B78u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8640u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B78u); -#endif - if (psx_delay_BFC13674) { - psx_delay_BFC13674 = 0; - if (psx_taken_BFC13674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C10u); - goto label_BFC13710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B7Cu); - } -label_BFC1367C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1367C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13680: 14410006 bne $v0, $at, 0xBFC1369C */ - uint32_t psx_brA_BFC13680 = cpu->gpr[2]; uint32_t psx_brB_BFC13680 = cpu->gpr[1]; - psx_taken_BFC13680 = (psx_brA_BFC13680 != psx_brB_BFC13680); - psx_delay_BFC13680 = 1; - /* 0xBFC13684: 8FAC0034 lw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B84u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B84u); -#endif - if (psx_delay_BFC13680) { - psx_delay_BFC13680 = 0; - if (psx_taken_BFC13680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B9Cu); - goto label_BFC1369C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B88u); - } -label_BFC13688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC13688: 240B0013 addiu $t3, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x240B0013u, cpu->gpr[11], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1368C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13690: 1000001F beq $zero, $zero, 0xBFC13710 */ - uint32_t psx_brA_BFC13690 = cpu->gpr[0]; uint32_t psx_brB_BFC13690 = cpu->gpr[0]; - psx_taken_BFC13690 = (psx_brA_BFC13690 == psx_brB_BFC13690); - psx_delay_BFC13690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC13694: AC2B8640 sw $t3, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B94u); return; } g_debug_last_store_pc = 0x00003B94u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B8640u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B94u); -#endif - if (psx_delay_BFC13690) { - psx_delay_BFC13690 = 0; - if (psx_taken_BFC13690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C10u); - goto label_BFC13710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003B98u); - } -label_BFC13698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B98u); -#endif - /* 0xBFC13698: 8FAC0034 lw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B98u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00003B98u); -#endif -label_BFC1369C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1369C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC136A0: AE0C0004 sw $t4, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BA0u); return; } g_debug_last_store_pc = 0x00003BA0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE0C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BA0u); -#endif - /* 0xBFC136A4: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BA4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC136A8: 01002821 addu $a1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC136AC: AE0D001C sw $t5, 28($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BACu); return; } g_debug_last_store_pc = 0x00003BACu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE0D001Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BB0u); -#endif - /* 0xBFC136B0: 8FAE0030 lw $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC136B4: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC136B8: AC6E0004 sw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BB8u); return; } g_debug_last_store_pc = 0x00003BB8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BB8u); -#endif - /* 0xBFC136BC: 8FAF0038 lw $t7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BBCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC136C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC136C4: AC6F001C sw $t7, 28($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BC4u); return; } g_debug_last_store_pc = 0x00003BC4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BC4u); -#endif - /* 0xBFC136C8: 8FB8003C lw $t8, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BC8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8003Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC136CC: AFA30048 sw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BCCu); return; } g_debug_last_store_pc = 0x00003BCCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BD0u); -#endif - /* 0xBFC136D0: 8F190044 lw $t9, 68($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BD0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC136D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC136D8: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x00003BE0u; /* jalr link before delay slot */ - psx_delay_BFC136D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC136DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003BDCu); -#endif - if (psx_delay_BFC136D8) { - psx_delay_BFC136D8 = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x00003BE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC136E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BE0u); -#endif - /* 0xBFC136E0: 8FA30048 lw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BE0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC136E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC136E8: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BE8u); return; } g_debug_last_store_pc = 0x00003BE8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC136EC: 10400006 beq $v0, $zero, 0xBFC13708 */ - uint32_t psx_brA_BFC136EC = cpu->gpr[2]; uint32_t psx_brB_BFC136EC = cpu->gpr[0]; - psx_taken_BFC136EC = (psx_brA_BFC136EC == psx_brB_BFC136EC); - psx_delay_BFC136EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC136F0: AE000000 sw $zero, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BF0u); return; } g_debug_last_store_pc = 0x00003BF0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BF0u); -#endif - if (psx_delay_BFC136EC) { - psx_delay_BFC136EC = 0; - if (psx_taken_BFC136EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C08u); - goto label_BFC13708; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003BF4u); - } -label_BFC136F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003BF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003BF4u); -#endif - /* 0xBFC136F4: 8E090018 lw $t1, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BF4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC136F8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC136FC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13700: 10000006 beq $zero, $zero, 0xBFC1371C */ - uint32_t psx_brA_BFC13700 = cpu->gpr[0]; uint32_t psx_brB_BFC13700 = cpu->gpr[0]; - psx_taken_BFC13700 = (psx_brA_BFC13700 == psx_brB_BFC13700); - psx_delay_BFC13700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC13704: AC298640 sw $t1, -31168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C04u); return; } g_debug_last_store_pc = 0x00003C04u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC298640u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C04u); -#endif - if (psx_delay_BFC13700) { - psx_delay_BFC13700 = 0; - if (psx_taken_BFC13700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C1Cu); - goto label_BFC1371C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C08u); - } -label_BFC13708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13708: 10000004 beq $zero, $zero, 0xBFC1371C */ - uint32_t psx_brA_BFC13708 = cpu->gpr[0]; uint32_t psx_brB_BFC13708 = cpu->gpr[0]; - psx_taken_BFC13708 = (psx_brA_BFC13708 == psx_brB_BFC13708); - psx_delay_BFC13708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1370C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C0Cu); -#endif - if (psx_delay_BFC13708) { - psx_delay_BFC13708 = 0; - if (psx_taken_BFC13708) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C1Cu); - goto label_BFC1371C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C10u); - } -label_BFC13710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC13710: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C10u); return; } g_debug_last_store_pc = 0x00003C10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13714: AE000000 sw $zero, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C14u); return; } g_debug_last_store_pc = 0x00003C14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13718: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C18u); -#endif -label_BFC1371C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C1Cu); -#endif - /* 0xBFC1371C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C20u); -#endif - /* 0xBFC13720: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C20u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13724: 03E00008 jr $ra */ - psx_delay_BFC13724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13728: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C28u); -#endif - if (psx_delay_BFC13724) { - psx_delay_BFC13724 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003C2C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003C2Cu); - int psx_delay_BFC13764 = 0; - int psx_taken_BFC13764 = 0; -label_BFC1372C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1372C: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C30u); -#endif - /* 0xBFC13730: 8DCE7200 lw $t6, 29184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C30u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE7200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC13734: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC13738: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1373C: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC13740: 24A56EE0 addiu $a1, $a1, 28384 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28384)); - PGXP_ALU(0x24A56EE0u, cpu->gpr[5], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13744: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC13748: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1374C: 27186EE1 addiu $t8, $t8, 28385 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (28385)); - PGXP_ALU(0x27186EE1u, cpu->gpr[24], _pgx1, 0x00006EE1u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8024u); -#endif - /* 0xBFC13750: 00AF1021 addu $v0, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13754: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC13758: 0058082B sltu $at, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0058082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1375C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C5Cu); return; } g_debug_last_store_pc = 0x00003C5Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC13760: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13764: 14200019 bne $at, $zero, 0xBFC137CC */ - uint32_t psx_brA_BFC13764 = cpu->gpr[1]; uint32_t psx_brB_BFC13764 = cpu->gpr[0]; - psx_taken_BFC13764 = (psx_brA_BFC13764 != psx_brB_BFC13764); - psx_delay_BFC13764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC13768: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C68u); -#endif - if (psx_delay_BFC13764) { - psx_delay_BFC13764 = 0; - if (psx_taken_BFC13764) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CCCu); - cpu->pc = 0x00003CCCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C6Cu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C6Cu); - cpu->pc = 0x00003C6Cu; return; /* fallthrough */ -} - -void SCPH1001_func_00003C6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003C6Cu); - int psx_delay_BFC13774 = 0; - int psx_taken_BFC13774 = 0; - int psx_delay_BFC13788 = 0; - int psx_delay_BFC13794 = 0; - int psx_delay_BFC137AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1377Cu: goto label_BFC1377C; - case 0xBFC13790u: goto label_BFC13790; - case 0xBFC1379Cu: goto label_BFC1379C; - default: break; - } - } -label_BFC1376C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C6Cu); -#endif - /* 0xBFC1376C: 8C790000 lw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C6Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC13774: 17200011 bne $t9, $zero, 0xBFC137BC */ - uint32_t psx_brA_BFC13774 = cpu->gpr[25]; uint32_t psx_brB_BFC13774 = cpu->gpr[0]; - psx_taken_BFC13774 = (psx_brA_BFC13774 != psx_brB_BFC13774); - psx_delay_BFC13774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003C78u); -#endif - if (psx_delay_BFC13774) { - psx_delay_BFC13774 = 0; - if (psx_taken_BFC13774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CBCu); - cpu->pc = 0x00003CBCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C7Cu); - } -label_BFC1377C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1377C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC13780: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13784: 24060050 addiu $a2, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24060050u, cpu->gpr[6], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13788: 0C001AC8 jal 0xB0006B20 */ - cpu->gpr[31] = 0x00003C90u; /* jal link before delay slot */ - psx_delay_BFC13788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1378C: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C8Cu); return; } g_debug_last_store_pc = 0x00003C8Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C8Cu); -#endif - if (psx_delay_BFC13788) { - psx_delay_BFC13788 = 0; - cpu->gpr[31] = 0x00003C90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B20u); - cpu->pc = 0x00006B20u; return; - } -label_BFC13790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C90u); -#endif - /* 0xBFC13790: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C90u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13794: 0C001A9C jal 0xB0006A70 */ - cpu->gpr[31] = 0x00003C9Cu; /* jal link before delay slot */ - psx_delay_BFC13794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13798: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003C98u); -#endif - if (psx_delay_BFC13794) { - psx_delay_BFC13794 = 0; - cpu->gpr[31] = 0x00003C9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A70u); - cpu->pc = 0x00006A70u; return; - } -label_BFC1379C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003C9Cu); -#endif - /* 0xBFC1379C: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C9Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003CA0u); -#endif - /* 0xBFC137A4: 8C680010 lw $t0, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CA4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC137AC: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x00003CB4u; /* jalr link before delay slot */ - psx_delay_BFC137AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003CB0u); -#endif - if (psx_delay_BFC137AC) { - psx_delay_BFC137AC = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x00003CB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -} - -void SCPH1001_func_00003CB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003CB4u); - int psx_delay_BFC137B4 = 0; - int psx_taken_BFC137B4 = 0; -label_BFC137B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137B4: 10000006 beq $zero, $zero, 0xBFC137D0 */ - uint32_t psx_brA_BFC137B4 = cpu->gpr[0]; uint32_t psx_brB_BFC137B4 = cpu->gpr[0]; - psx_taken_BFC137B4 = (psx_brA_BFC137B4 == psx_brB_BFC137B4); - psx_delay_BFC137B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC137B8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CB8u); -#endif - if (psx_delay_BFC137B4) { - psx_delay_BFC137B4 = 0; - if (psx_taken_BFC137B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CD0u); - cpu->pc = 0x00003CD0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CBCu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CBCu); - cpu->pc = 0x00003CBCu; return; /* fallthrough */ -} - -void SCPH1001_func_00003CBC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003CBCu); - int psx_delay_BFC137C4 = 0; - int psx_taken_BFC137C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC137CCu: goto label_BFC137CC; - default: break; - } - } -label_BFC137BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC137BC: 24630050 addiu $v1, $v1, 80 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (80)); - PGXP_ALU(0x24630050u, cpu->gpr[3], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC137C0: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC137C4: 1420FFE9 bne $at, $zero, 0xBFC1376C */ - uint32_t psx_brA_BFC137C4 = cpu->gpr[1]; uint32_t psx_brB_BFC137C4 = cpu->gpr[0]; - psx_taken_BFC137C4 = (psx_brA_BFC137C4 != psx_brB_BFC137C4); - psx_delay_BFC137C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003CC8u); -#endif - if (psx_delay_BFC137C4) { - psx_delay_BFC137C4 = 0; - if (psx_taken_BFC137C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003C6Cu); - cpu->pc = 0x00003C6Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CCCu); - } -label_BFC137CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC137CC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003CD0u); - cpu->pc = 0x00003CD0u; return; /* fallthrough */ -} - -void SCPH1001_func_00003CD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003CD0u); - int psx_delay_BFC137D8 = 0; -label_BFC137D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CD0u); -#endif - /* 0xBFC137D0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC137D4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC137D8: 03E00008 jr $ra */ - psx_delay_BFC137D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC137DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003CDCu); -#endif - if (psx_delay_BFC137D8) { - psx_delay_BFC137D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003CE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003CE0u); - int psx_delay_BFC13824 = 0; - int psx_taken_BFC13824 = 0; - int psx_delay_BFC13834 = 0; - int psx_taken_BFC13834 = 0; - int psx_delay_BFC1383C = 0; - int psx_delay_BFC13844 = 0; - int psx_taken_BFC13844 = 0; - int psx_delay_BFC13854 = 0; - int psx_delay_BFC13860 = 0; - int psx_taken_BFC13860 = 0; - int psx_delay_BFC13888 = 0; - int psx_taken_BFC13888 = 0; - int psx_delay_BFC138A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1382Cu: goto label_BFC1382C; - case 0xBFC1383Cu: goto label_BFC1383C; - case 0xBFC13844u: goto label_BFC13844; - case 0xBFC1384Cu: goto label_BFC1384C; - case 0xBFC1385Cu: goto label_BFC1385C; - case 0xBFC13868u: goto label_BFC13868; - case 0xBFC13890u: goto label_BFC13890; - case 0xBFC13894u: goto label_BFC13894; - default: break; - } - } -label_BFC137E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC137E0: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003CE0u); -#endif - /* 0xBFC137E4: 8DCE7200 lw $t6, 29184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE7200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC137E8: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC137EC: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CECu); return; } g_debug_last_store_pc = 0x00003CECu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC137F0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC137F4: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC137F8: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC137FC: 26316EE0 addiu $s1, $s1, 28384 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (28384)); - PGXP_ALU(0x26316EE0u, cpu->gpr[17], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13800: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC13804: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC13808: 27396EE1 addiu $t9, $t9, 28385 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (28385)); - PGXP_ALU(0x27396EE1u, cpu->gpr[25], _pgx1, 0x00006EE1u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC1380C: 022FC021 addu $t8, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC13810: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D10u); return; } g_debug_last_store_pc = 0x00003D10u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13814: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D14u); return; } g_debug_last_store_pc = 0x00003D14u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC13818: 0319082B sltu $at, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0319082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC1381C: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13820: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D20u); return; } g_debug_last_store_pc = 0x00003D20u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13824: 1420001A bne $at, $zero, 0xBFC13890 */ - uint32_t psx_brA_BFC13824 = cpu->gpr[1]; uint32_t psx_brB_BFC13824 = cpu->gpr[0]; - psx_taken_BFC13824 = (psx_brA_BFC13824 != psx_brB_BFC13824); - psx_delay_BFC13824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30001u); -#endif - /* 0xBFC13828: 02208021 addu $s0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02208021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D28u); -#endif - if (psx_delay_BFC13824) { - psx_delay_BFC13824 = 0; - if (psx_taken_BFC13824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D90u); - goto label_BFC13890; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D2Cu); - } -label_BFC1382C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D2Cu); -#endif - /* 0xBFC1382C: 8E050000 lw $a1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC13834: 10A0000C beq $a1, $zero, 0xBFC13868 */ - uint32_t psx_brA_BFC13834 = cpu->gpr[5]; uint32_t psx_brB_BFC13834 = cpu->gpr[0]; - psx_taken_BFC13834 = (psx_brA_BFC13834 == psx_brB_BFC13834); - psx_delay_BFC13834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D38u); -#endif - if (psx_delay_BFC13834) { - psx_delay_BFC13834 = 0; - if (psx_taken_BFC13834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D68u); - goto label_BFC13868; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D3Cu); - } -label_BFC1383C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1383C: 0C001AC4 jal 0xB0006B10 */ - cpu->gpr[31] = 0x00003D44u; /* jal link before delay slot */ - psx_delay_BFC1383C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC13840: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D40u); -#endif - if (psx_delay_BFC1383C) { - psx_delay_BFC1383C = 0; - cpu->gpr[31] = 0x00003D44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B10u); - cpu->pc = 0x00006B10u; return; - } -label_BFC13844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13844: 14400008 bne $v0, $zero, 0xBFC13868 */ - uint32_t psx_brA_BFC13844 = cpu->gpr[2]; uint32_t psx_brB_BFC13844 = cpu->gpr[0]; - psx_taken_BFC13844 = (psx_brA_BFC13844 != psx_brB_BFC13844); - psx_delay_BFC13844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D48u); -#endif - if (psx_delay_BFC13844) { - psx_delay_BFC13844 = 0; - if (psx_taken_BFC13844) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D68u); - goto label_BFC13868; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D4Cu); - } -label_BFC1384C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D4Cu); -#endif - /* 0xBFC1384C: 8E080048 lw $t0, 72($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D4Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080048u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC13854: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x00003D5Cu; /* jalr link before delay slot */ - psx_delay_BFC13854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D58u); -#endif - if (psx_delay_BFC13854) { - psx_delay_BFC13854 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x00003D5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC1385C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1385C: AE000000 sw $zero, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D5Cu); return; } g_debug_last_store_pc = 0x00003D5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13860: 1000000C beq $zero, $zero, 0xBFC13894 */ - uint32_t psx_brA_BFC13860 = cpu->gpr[0]; uint32_t psx_brB_BFC13860 = cpu->gpr[0]; - psx_taken_BFC13860 = (psx_brA_BFC13860 == psx_brB_BFC13860); - psx_delay_BFC13860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13864: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D64u); -#endif - if (psx_delay_BFC13860) { - psx_delay_BFC13860 = 0; - if (psx_taken_BFC13860) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D94u); - goto label_BFC13894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D68u); - } -label_BFC13868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC13868: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003D68u); -#endif - /* 0xBFC1386C: 8D297200 lw $t1, 29184($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D6Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D297200u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC13870: 26100050 addiu $s0, $s0, 80 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (80)); - PGXP_ALU(0x26100050u, cpu->gpr[16], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC13874: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC13878: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1387C: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20C00u); -#endif - /* 0xBFC13880: 022A5821 addu $t3, $s1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[17] + cpu->gpr[10]; - PGXP_ALU(0x022A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10802u); -#endif - /* 0xBFC13884: 020B082B sltu $at, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x020B082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13888: 1420FFE8 bne $at, $zero, 0xBFC1382C */ - uint32_t psx_brA_BFC13888 = cpu->gpr[1]; uint32_t psx_brB_BFC13888 = cpu->gpr[0]; - psx_taken_BFC13888 = (psx_brA_BFC13888 != psx_brB_BFC13888); - psx_delay_BFC13888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1388C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003D8Cu); -#endif - if (psx_delay_BFC13888) { - psx_delay_BFC13888 = 0; - if (psx_taken_BFC13888) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D2Cu); - goto label_BFC1382C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003D90u); - } -label_BFC13890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13890: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003D90u); -#endif -label_BFC13894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003D94u); -#endif - /* 0xBFC13894: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D94u); -#endif - /* 0xBFC13898: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D98u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D98u); -#endif - /* 0xBFC1389C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D9Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DA0u); -#endif - /* 0xBFC138A0: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DA0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC138A4: 03E00008 jr $ra */ - psx_delay_BFC138A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC138A8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DA8u); -#endif - if (psx_delay_BFC138A4) { - psx_delay_BFC138A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003DAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003DACu); - int psx_delay_BFC138E4 = 0; - int psx_taken_BFC138E4 = 0; - int psx_delay_BFC13900 = 0; - int psx_taken_BFC13900 = 0; - int psx_delay_BFC1390C = 0; - int psx_delay_BFC1393C = 0; - int psx_taken_BFC1393C = 0; - int psx_delay_BFC13954 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC138ECu: goto label_BFC138EC; - case 0xBFC138F8u: goto label_BFC138F8; - case 0xBFC13908u: goto label_BFC13908; - case 0xBFC13914u: goto label_BFC13914; - case 0xBFC13934u: goto label_BFC13934; - case 0xBFC13944u: goto label_BFC13944; - case 0xBFC1394Cu: goto label_BFC1394C; - default: break; - } - } -label_BFC138AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC138AC: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DB0u); -#endif - /* 0xBFC138B0: 8DCE7200 lw $t6, 29184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE7200u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC138B4: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC138B8: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC138BC: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC138C0: 24636EE0 addiu $v1, $v1, 28384 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (28384)); - PGXP_ALU(0x24636EE0u, cpu->gpr[3], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC138C4: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC138C8: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC138CC: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC138D0: 27186EE1 addiu $t8, $t8, 28385 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (28385)); - PGXP_ALU(0x27186EE1u, cpu->gpr[24], _pgx1, 0x00006EE1u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Cu); -#endif - /* 0xBFC138D4: 006F1021 addu $v0, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC138D8: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DD8u); return; } g_debug_last_store_pc = 0x00003DD8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC138DC: 0058082B sltu $at, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0058082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC138E0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DE0u); return; } g_debug_last_store_pc = 0x00003DE0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC138E4: 14200019 bne $at, $zero, 0xBFC1394C */ - uint32_t psx_brA_BFC138E4 = cpu->gpr[1]; uint32_t psx_brB_BFC138E4 = cpu->gpr[0]; - psx_taken_BFC138E4 = (psx_brA_BFC138E4 != psx_brB_BFC138E4); - psx_delay_BFC138E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC138E8: 00608021 addu $s0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003DE8u); -#endif - if (psx_delay_BFC138E4) { - psx_delay_BFC138E4 = 0; - if (psx_taken_BFC138E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E4Cu); - goto label_BFC1394C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003DECu); - } -label_BFC138EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC138EC: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DECu); return; } g_debug_last_store_pc = 0x00003DECu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC138F0: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC138F4: 26316EC8 addiu $s1, $s1, 28360 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (28360)); - PGXP_ALU(0x26316EC8u, cpu->gpr[17], _pgx1, 0x00006EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003DF4u); -#endif -label_BFC138F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003DF8u); -#endif - /* 0xBFC138F8: 8E050000 lw $a1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003DF8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00003DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC138FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC13900: 10A0000C beq $a1, $zero, 0xBFC13934 */ - uint32_t psx_brA_BFC13900 = cpu->gpr[5]; uint32_t psx_brB_BFC13900 = cpu->gpr[0]; - psx_taken_BFC13900 = (psx_brA_BFC13900 == psx_brB_BFC13900); - psx_delay_BFC13900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003E04u); -#endif - if (psx_delay_BFC13900) { - psx_delay_BFC13900 = 0; - if (psx_taken_BFC13900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E34u); - goto label_BFC13934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E08u); - } -label_BFC13908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E08u); -#endif - /* 0xBFC13908: 8E06000C lw $a2, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E08u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E06000Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1390C: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00003E14u; /* jal link before delay slot */ - psx_delay_BFC1390C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC13910: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003E10u); -#endif - if (psx_delay_BFC1390C) { - psx_delay_BFC1390C = 0; - cpu->gpr[31] = 0x00003E14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC13914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC13914: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E14u); -#endif - /* 0xBFC13918: 8F397200 lw $t9, 29184($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E18u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F397200u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1391C: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC13920: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC13924: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC13928: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1392C: 25296EE0 addiu $t1, $t1, 28384 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (28384)); - PGXP_ALU(0x25296EE0u, cpu->gpr[9], _pgx1, 0x00006EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC13930: 01091021 addu $v0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003E30u); -#endif -label_BFC13934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC13934: 26100050 addiu $s0, $s0, 80 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (80)); - PGXP_ALU(0x26100050u, cpu->gpr[16], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC13938: 0202082B sltu $at, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0202082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1393C: 1420FFEE bne $at, $zero, 0xBFC138F8 */ - uint32_t psx_brA_BFC1393C = cpu->gpr[1]; uint32_t psx_brB_BFC1393C = cpu->gpr[0]; - psx_taken_BFC1393C = (psx_brA_BFC1393C != psx_brB_BFC1393C); - psx_delay_BFC1393C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003E40u); -#endif - if (psx_delay_BFC1393C) { - psx_delay_BFC1393C = 0; - if (psx_taken_BFC1393C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003DF8u); - goto label_BFC138F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003E44u); - } -label_BFC13944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E44u); -#endif - /* 0xBFC13944: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E44u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003E48u); -#endif -label_BFC1394C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E4Cu); -#endif - /* 0xBFC1394C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E50u); -#endif - /* 0xBFC13950: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E50u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13954: 03E00008 jr $ra */ - psx_delay_BFC13954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13958: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E58u); -#endif - if (psx_delay_BFC13954) { - psx_delay_BFC13954 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003E5C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003E5Cu); - int psx_delay_BFC13960 = 0; -label_BFC1395C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1395C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13960: 03E00008 jr $ra */ - psx_delay_BFC13960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC13964: AC248644 sw $a0, -31164($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E64u); return; } g_debug_last_store_pc = 0x00003E64u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC248644u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E64u); -#endif - if (psx_delay_BFC13960) { - psx_delay_BFC13960 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003E68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003E68u); - int psx_delay_BFC13970 = 0; -label_BFC13968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13968: 3C020001 lui $v0, 0x1 */ - cpu->gpr[2] = 0x00010000u; - PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E68u); -#endif - /* 0xBFC1396C: 8C428644 lw $v0, -31164($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E6Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428644u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13970: 03E00008 jr $ra */ - psx_delay_BFC13970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13974: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003E74u); -#endif - if (psx_delay_BFC13970) { - psx_delay_BFC13970 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003E80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003E80u); - int psx_delay_BFC139B4 = 0; - int psx_taken_BFC139B4 = 0; - int psx_delay_BFC139D4 = 0; - int psx_delay_BFC139E4 = 0; - int psx_taken_BFC139E4 = 0; - int psx_delay_BFC139FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC139A8u: goto label_BFC139A8; - case 0xBFC139BCu: goto label_BFC139BC; - case 0xBFC139DCu: goto label_BFC139DC; - case 0xBFC139ECu: goto label_BFC139EC; - default: break; - } - } -label_BFC13980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13980: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC13984: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E84u); return; } g_debug_last_store_pc = 0x00003E84u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC13988: 3C120001 lui $s2, 0x1 */ - cpu->gpr[18] = 0x00010000u; - PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1398C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E8Cu); return; } g_debug_last_store_pc = 0x00003E8Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC13990: 26528648 addiu $s2, $s2, -31160 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-31160)); - PGXP_ALU(0x26528648u, cpu->gpr[18], _pgx1, 0xFFFF8648u); } -#ifdef PSX_COSIM - cosim_instr(0x00003E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13994: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E94u); return; } g_debug_last_store_pc = 0x00003E94u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13998: 3C110001 lui $s1, 0x1 */ - cpu->gpr[17] = 0x00010000u; - PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1399C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E9Cu); return; } g_debug_last_store_pc = 0x00003E9Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC139A0: 26318908 addiu $s1, $s1, -30456 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-30456)); - PGXP_ALU(0x26318908u, cpu->gpr[17], _pgx1, 0xFFFF8908u); } -#ifdef PSX_COSIM - cosim_instr(0x00003EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC139A4: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003EA4u); -#endif -label_BFC139A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EA8u); -#endif - /* 0xBFC139A8: 8E0E0000 lw $t6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EA8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00003EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC139AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC139B0: 31CF1000 andi $t7, $t6, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1000u; - PGXP_ALU(0x31CF1000u, cpu->gpr[15], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x00003EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC139B4: 11E00009 beq $t7, $zero, 0xBFC139DC */ - uint32_t psx_brA_BFC139B4 = cpu->gpr[15]; uint32_t psx_brB_BFC139B4 = cpu->gpr[0]; - psx_taken_BFC139B4 = (psx_brA_BFC139B4 == psx_brB_BFC139B4); - psx_delay_BFC139B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC139B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003EB8u); -#endif - if (psx_delay_BFC139B4) { - psx_delay_BFC139B4 = 0; - if (psx_taken_BFC139B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003EDCu); - goto label_BFC139DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003EBCu); - } -label_BFC139BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50010u); -#endif - /* 0xBFC139BC: 02122023 subu $a0, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[4] = cpu->gpr[16] - cpu->gpr[18]; - PGXP_ALU(0x02122023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC139C0: 2401002C addiu $at, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2401002Cu, cpu->gpr[1], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC139C4: 0081001A div $a0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[4]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0081001Au, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x00003EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC139C8: 24056602 addiu $a1, $zero, 26114 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (26114)); - PGXP_ALU(0x24056602u, cpu->gpr[5], _pgx1, 0x00006602u); } -#ifdef PSX_COSIM - cosim_instr(0x00003EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC139CC: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC139D0: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC139D4: 0C000BBF jal 0xB0002EFC */ - cpu->gpr[31] = 0x00003EDCu; /* jal link before delay slot */ - psx_delay_BFC139D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC139D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003ED8u); -#endif - if (psx_delay_BFC139D4) { - psx_delay_BFC139D4 = 0; - cpu->gpr[31] = 0x00003EDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002EFCu); - cpu->pc = 0x00002EFCu; return; - } -label_BFC139DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC139DC: 2610002C addiu $s0, $s0, 44 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (44)); - PGXP_ALU(0x2610002Cu, cpu->gpr[16], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC139E0: 0211082B sltu $at, $s0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0211082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC139E4: 1420FFF0 bne $at, $zero, 0xBFC139A8 */ - uint32_t psx_brA_BFC139E4 = cpu->gpr[1]; uint32_t psx_brB_BFC139E4 = cpu->gpr[0]; - psx_taken_BFC139E4 = (psx_brA_BFC139E4 != psx_brB_BFC139E4); - psx_delay_BFC139E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC139E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003EE8u); -#endif - if (psx_delay_BFC139E4) { - psx_delay_BFC139E4 = 0; - if (psx_taken_BFC139E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003EA8u); - goto label_BFC139A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003EECu); - } -label_BFC139EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EECu); -#endif - /* 0xBFC139EC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003EF0u); -#endif - /* 0xBFC139F0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EF0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00003EF0u); -#endif - /* 0xBFC139F4: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EF4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00003EF4u); -#endif - /* 0xBFC139F8: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EF8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00003EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC139FC: 03E00008 jr $ra */ - psx_delay_BFC139FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13A00: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F00u); -#endif - if (psx_delay_BFC139FC) { - psx_delay_BFC139FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003F04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003F04u); - int psx_delay_BFC13A14 = 0; - int psx_taken_BFC13A14 = 0; - int psx_delay_BFC13A28 = 0; - int psx_taken_BFC13A28 = 0; - int psx_delay_BFC13A38 = 0; - int psx_taken_BFC13A38 = 0; - int psx_delay_BFC13A44 = 0; - int psx_taken_BFC13A44 = 0; - int psx_delay_BFC13A54 = 0; - int psx_delay_BFC13A70 = 0; - int psx_taken_BFC13A70 = 0; - int psx_delay_BFC13A84 = 0; - int psx_taken_BFC13A84 = 0; - int psx_delay_BFC13A98 = 0; - int psx_taken_BFC13A98 = 0; - int psx_delay_BFC13AA4 = 0; - int psx_taken_BFC13AA4 = 0; - int psx_delay_BFC13AB8 = 0; - int psx_taken_BFC13AB8 = 0; - int psx_delay_BFC13ACC = 0; - int psx_taken_BFC13ACC = 0; - int psx_delay_BFC13AD8 = 0; - int psx_delay_BFC13AE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13A1Cu: goto label_BFC13A1C; - case 0xBFC13A30u: goto label_BFC13A30; - case 0xBFC13A40u: goto label_BFC13A40; - case 0xBFC13A4Cu: goto label_BFC13A4C; - case 0xBFC13A5Cu: goto label_BFC13A5C; - case 0xBFC13A68u: goto label_BFC13A68; - case 0xBFC13A6Cu: goto label_BFC13A6C; - case 0xBFC13A78u: goto label_BFC13A78; - case 0xBFC13A8Cu: goto label_BFC13A8C; - case 0xBFC13AA0u: goto label_BFC13AA0; - case 0xBFC13AA4u: goto label_BFC13AA4; - case 0xBFC13AACu: goto label_BFC13AAC; - case 0xBFC13AC0u: goto label_BFC13AC0; - case 0xBFC13AD4u: goto label_BFC13AD4; - case 0xBFC13AE0u: goto label_BFC13AE0; - case 0xBFC13AE4u: goto label_BFC13AE4; - default: break; - } - } -label_BFC13A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC13A04: 00053600 sll $a2, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[6] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00053600u, cpu->gpr[6], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC13A08: 00063603 sra $a2, $a2, 24 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 24u); - PGXP_ALU(0x00063603u, cpu->gpr[6], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13A0C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13A10: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F10u); return; } g_debug_last_store_pc = 0x00003F10u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13A14: 10C0002A beq $a2, $zero, 0xBFC13AC0 */ - uint32_t psx_brA_BFC13A14 = cpu->gpr[6]; uint32_t psx_brB_BFC13A14 = cpu->gpr[0]; - psx_taken_BFC13A14 = (psx_brA_BFC13A14 == psx_brB_BFC13A14); - psx_delay_BFC13A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC13A18: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003F18u); -#endif - if (psx_delay_BFC13A14) { - psx_delay_BFC13A14 = 0; - if (psx_taken_BFC13A14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FC0u); - goto label_BFC13AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F1Cu); - } -label_BFC13A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F1Cu); -#endif - /* 0xBFC13A1C: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F1Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC13A24: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC13A28: 15C00025 bne $t6, $zero, 0xBFC13AC0 */ - uint32_t psx_brA_BFC13A28 = cpu->gpr[14]; uint32_t psx_brB_BFC13A28 = cpu->gpr[0]; - psx_taken_BFC13A28 = (psx_brA_BFC13A28 != psx_brB_BFC13A28); - psx_delay_BFC13A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F2Cu); -#endif - if (psx_delay_BFC13A28) { - psx_delay_BFC13A28 = 0; - if (psx_taken_BFC13A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FC0u); - goto label_BFC13AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F30u); - } -label_BFC13A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC13A30: 30CF00FF andi $t7, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00003F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13A34: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC13A38: 15E1000B bne $t7, $at, 0xBFC13A68 */ - uint32_t psx_brA_BFC13A38 = cpu->gpr[15]; uint32_t psx_brB_BFC13A38 = cpu->gpr[1]; - psx_taken_BFC13A38 = (psx_brA_BFC13A38 != psx_brB_BFC13A38); - psx_delay_BFC13A38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F3Cu); -#endif - if (psx_delay_BFC13A38) { - psx_delay_BFC13A38 = 0; - if (psx_taken_BFC13A38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F68u); - goto label_BFC13A68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F40u); - } -label_BFC13A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC13A40: 30580004 andi $t8, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13A44: 13000009 beq $t8, $zero, 0xBFC13A6C */ - uint32_t psx_brA_BFC13A44 = cpu->gpr[24]; uint32_t psx_brB_BFC13A44 = cpu->gpr[0]; - psx_taken_BFC13A44 = (psx_brA_BFC13A44 == psx_brB_BFC13A44); - psx_delay_BFC13A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC13A48: 30C2007F andi $v0, $a2, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7Fu; - PGXP_ALU(0x30C2007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00003F48u); -#endif - if (psx_delay_BFC13A44) { - psx_delay_BFC13A44 = 0; - if (psx_taken_BFC13A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F6Cu); - goto label_BFC13A6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F4Cu); - } -label_BFC13A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC13A4C: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F4Cu); return; } g_debug_last_store_pc = 0x00003F4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13A50: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13A54: 0C001ABC jal 0xB0006AF0 */ - cpu->gpr[31] = 0x00003F5Cu; /* jal link before delay slot */ - psx_delay_BFC13A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC13A58: A3A6001C sb $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003F58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (28)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA3A6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F58u); -#endif - if (psx_delay_BFC13A54) { - psx_delay_BFC13A54 = 0; - cpu->gpr[31] = 0x00003F5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AF0u); - cpu->pc = 0x00006AF0u; return; - } -label_BFC13A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F5Cu); -#endif - /* 0xBFC13A5C: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F5Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F60u); -#endif - /* 0xBFC13A60: 83A6001C lb $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 6, 0x20000000u); - PGXP_LOAD(0x83A6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F64u); -#endif -label_BFC13A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC13A68: 30C2007F andi $v0, $a2, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7Fu; - PGXP_ALU(0x30C2007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00003F68u); -#endif -label_BFC13A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13A6C: 24010013 addiu $at, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24010013u, cpu->gpr[1], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13A70: 1441000C bne $v0, $at, 0xBFC13AA4 */ - uint32_t psx_brA_BFC13A70 = cpu->gpr[2]; uint32_t psx_brB_BFC13A70 = cpu->gpr[1]; - psx_taken_BFC13A70 = (psx_brA_BFC13A70 != psx_brB_BFC13A70); - psx_delay_BFC13A70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13A74: 24010011 addiu $at, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24010011u, cpu->gpr[1], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F74u); -#endif - if (psx_delay_BFC13A70) { - psx_delay_BFC13A70 = 0; - if (psx_taken_BFC13A70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FA4u); - goto label_BFC13AA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F78u); - } -label_BFC13A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC13A78: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00003F78u); -#endif - /* 0xBFC13A7C: 8F39890C lw $t9, -30452($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -30452; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-30452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F7Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39890Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC13A84: 17200017 bne $t9, $zero, 0xBFC13AE4 */ - uint32_t psx_brA_BFC13A84 = cpu->gpr[25]; uint32_t psx_brB_BFC13A84 = cpu->gpr[0]; - psx_taken_BFC13A84 = (psx_brA_BFC13A84 != psx_brB_BFC13A84); - psx_delay_BFC13A84 = 1; - /* 0xBFC13A88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F88u); -#endif - if (psx_delay_BFC13A84) { - psx_delay_BFC13A84 = 0; - if (psx_taken_BFC13A84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FE4u); - goto label_BFC13AE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003F8Cu); - } -label_BFC13A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F8Cu); -#endif - /* 0xBFC13A8C: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F8Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC13A94: 35090002 ori $t1, $t0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x2u; - PGXP_ALU(0x35090002u, cpu->gpr[9], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00003F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13A98: 10000011 beq $zero, $zero, 0xBFC13AE0 */ - uint32_t psx_brA_BFC13A98 = cpu->gpr[0]; uint32_t psx_brB_BFC13A98 = cpu->gpr[0]; - psx_taken_BFC13A98 = (psx_brA_BFC13A98 == psx_brB_BFC13A98); - psx_delay_BFC13A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC13A9C: AC690000 sw $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F9Cu); return; } g_debug_last_store_pc = 0x00003F9Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00003F9Cu); -#endif - if (psx_delay_BFC13A98) { - psx_delay_BFC13A98 = 0; - if (psx_taken_BFC13A98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FE0u); - goto label_BFC13AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FA0u); - } -label_BFC13AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13AA0: 24010011 addiu $at, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24010011u, cpu->gpr[1], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x00003FA0u); -#endif -label_BFC13AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC13AA4: 14410006 bne $v0, $at, 0xBFC13AC0 */ - uint32_t psx_brA_BFC13AA4 = cpu->gpr[2]; uint32_t psx_brB_BFC13AA4 = cpu->gpr[1]; - psx_taken_BFC13AA4 = (psx_brA_BFC13AA4 != psx_brB_BFC13AA4); - psx_delay_BFC13AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13AA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003FA8u); -#endif - if (psx_delay_BFC13AA4) { - psx_delay_BFC13AA4 = 0; - if (psx_taken_BFC13AA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FC0u); - goto label_BFC13AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FACu); - } -label_BFC13AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FACu); -#endif - /* 0xBFC13AAC: 8C6A0000 lw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FACu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13AB0: 2401FFFD addiu $at, $zero, -3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-3)); - PGXP_ALU(0x2401FFFDu, cpu->gpr[1], _pgx1, 0xFFFFFFFDu); } -#ifdef PSX_COSIM - cosim_instr(0x00003FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC02u); -#endif - /* 0xBFC13AB4: 01415824 and $t3, $t2, $at */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[1]; - PGXP_ALU(0x01415824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13AB8: 10000009 beq $zero, $zero, 0xBFC13AE0 */ - uint32_t psx_brA_BFC13AB8 = cpu->gpr[0]; uint32_t psx_brB_BFC13AB8 = cpu->gpr[0]; - psx_taken_BFC13AB8 = (psx_brA_BFC13AB8 == psx_brB_BFC13AB8); - psx_delay_BFC13AB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC13ABC: AC6B0000 sw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FBCu); return; } g_debug_last_store_pc = 0x00003FBCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FBCu); -#endif - if (psx_delay_BFC13AB8) { - psx_delay_BFC13AB8 = 0; - if (psx_taken_BFC13AB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FE0u); - goto label_BFC13AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FC0u); - } -label_BFC13AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FC0u); -#endif - /* 0xBFC13AC0: 8C6C0000 lw $t4, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FC0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC13AC8: 318D0002 andi $t5, $t4, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u; - PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00003FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC13ACC: 15A00005 bne $t5, $zero, 0xBFC13AE4 */ - uint32_t psx_brA_BFC13ACC = cpu->gpr[13]; uint32_t psx_brB_BFC13ACC = cpu->gpr[0]; - psx_taken_BFC13ACC = (psx_brA_BFC13ACC != psx_brB_BFC13ACC); - psx_delay_BFC13ACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FD0u); -#endif - /* 0xBFC13AD0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FD0u); -#endif - if (psx_delay_BFC13ACC) { - psx_delay_BFC13ACC = 0; - if (psx_taken_BFC13ACC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FE4u); - goto label_BFC13AE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FD4u); - } -label_BFC13AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC13AD4: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13AD8: 0C000D4B jal 0xB000352C */ - cpu->gpr[31] = 0x00003FE0u; /* jal link before delay slot */ - psx_delay_BFC13AD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC13ADC: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003FDCu); -#endif - if (psx_delay_BFC13AD8) { - psx_delay_BFC13AD8 = 0; - cpu->gpr[31] = 0x00003FE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000352Cu); - cpu->pc = 0x0000352Cu; return; - } -label_BFC13AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FE0u); -#endif - /* 0xBFC13AE0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FE0u); -#endif -label_BFC13AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13AE4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00003FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13AE8: 03E00008 jr $ra */ - psx_delay_BFC13AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00003FECu); -#endif - if (psx_delay_BFC13AE8) { - psx_delay_BFC13AE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00003FF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00003FF0u); - int psx_delay_BFC13B00 = 0; - int psx_delay_BFC13B1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13B08u: goto label_BFC13B08; - default: break; - } - } -label_BFC13AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00003FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00003FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00003FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13AF0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00003FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13AF4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FF4u); return; } g_debug_last_store_pc = 0x00003FF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00003FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13AF8: 27A5001C addiu $a1, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A5001Cu, cpu->gpr[5], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00003FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13AFC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00003FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13B00: 0C000ACA jal 0xB0002B28 */ - cpu->gpr[31] = 0x00004008u; /* jal link before delay slot */ - psx_delay_BFC13B00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13B04: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004004u); -#endif - if (psx_delay_BFC13B00) { - psx_delay_BFC13B00 = 0; - cpu->gpr[31] = 0x00004008u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B28u); - cpu->pc = 0x00002B28u; return; - } -label_BFC13B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004008u); -#endif - /* 0xBFC13B08: 83A2001C lb $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 2, 0x20000000u); - PGXP_LOAD(0x83A2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004008u); -#endif - /* 0xBFC13B0C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000400Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000400Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B10: 3042007F andi $v0, $v0, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7Fu; - PGXP_ALU(0x3042007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00004010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B14: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B18: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13B1C: 03E00008 jr $ra */ - psx_delay_BFC13B1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13B20: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00004020u); -#endif - if (psx_delay_BFC13B1C) { - psx_delay_BFC13B1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004024(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004024u); - int psx_delay_BFC13B30 = 0; - int psx_delay_BFC13B38 = 0; - int psx_taken_BFC13B38 = 0; - int psx_delay_BFC13B40 = 0; - int psx_taken_BFC13B40 = 0; - int psx_delay_BFC13B64 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13B38u: goto label_BFC13B38; - case 0xBFC13B40u: goto label_BFC13B40; - case 0xBFC13B48u: goto label_BFC13B48; - case 0xBFC13B4Cu: goto label_BFC13B4C; - case 0xBFC13B5Cu: goto label_BFC13B5C; - default: break; - } - } -label_BFC13B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13B24: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13B28: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004028u); return; } g_debug_last_store_pc = 0x00004028u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13B2C: 27A50024 addiu $a1, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A50024u, cpu->gpr[5], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x0000402Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13B30: 0C000ACA jal 0xB0002B28 */ - cpu->gpr[31] = 0x00004038u; /* jal link before delay slot */ - psx_delay_BFC13B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13B34: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004034u); -#endif - if (psx_delay_BFC13B30) { - psx_delay_BFC13B30 = 0; - cpu->gpr[31] = 0x00004038u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002B28u); - cpu->pc = 0x00002B28u; return; - } -label_BFC13B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B38: 1C400004 bgtz $v0, 0xBFC13B4C */ - uint32_t psx_brA_BFC13B38 = cpu->gpr[2]; - psx_taken_BFC13B38 = ((int32_t)psx_brA_BFC13B38 > 0); - psx_delay_BFC13B38 = 1; - /* 0xBFC13B3C: 83A20024 lb $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (36)), 2, 0x20000000u); - PGXP_LOAD(0x83A20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000403Cu); -#endif - if (psx_delay_BFC13B38) { - psx_delay_BFC13B38 = 0; - if (psx_taken_BFC13B38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000404Cu); - goto label_BFC13B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004040u); - } -label_BFC13B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13B40: 10000006 beq $zero, $zero, 0xBFC13B5C */ - uint32_t psx_brA_BFC13B40 = cpu->gpr[0]; uint32_t psx_brB_BFC13B40 = cpu->gpr[0]; - psx_taken_BFC13B40 = (psx_brA_BFC13B40 == psx_brB_BFC13B40); - psx_delay_BFC13B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13B44: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004044u); -#endif - if (psx_delay_BFC13B40) { - psx_delay_BFC13B40 = 0; - if (psx_taken_BFC13B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000405Cu); - goto label_BFC13B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004048u); - } -label_BFC13B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004048u); -#endif - /* 0xBFC13B48: 83A20024 lb $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (36)), 2, 0x20000000u); - PGXP_LOAD(0x83A20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004048u); -#endif -label_BFC13B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000404Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13B4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B50: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B54: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC13B58: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004058u); -#endif -label_BFC13B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000405Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000405Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000405Cu); -#endif - /* 0xBFC13B5C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000405Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000405Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13B60: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00004060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13B64: 03E00008 jr $ra */ - psx_delay_BFC13B64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13B68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004068u); -#endif - if (psx_delay_BFC13B64) { - psx_delay_BFC13B64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000406C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000406Cu); - int psx_delay_BFC13B7C = 0; - int psx_taken_BFC13B7C = 0; - int psx_delay_BFC13B88 = 0; - int psx_taken_BFC13B88 = 0; - int psx_delay_BFC13B90 = 0; - int psx_delay_BFC13B9C = 0; - int psx_taken_BFC13B9C = 0; - int psx_delay_BFC13BA4 = 0; - int psx_delay_BFC13BBC = 0; - int psx_taken_BFC13BBC = 0; - int psx_delay_BFC13BC4 = 0; - int psx_taken_BFC13BC4 = 0; - int psx_delay_BFC13BD0 = 0; - int psx_taken_BFC13BD0 = 0; - int psx_delay_BFC13BD8 = 0; - int psx_taken_BFC13BD8 = 0; - int psx_delay_BFC13BF8 = 0; - int psx_taken_BFC13BF8 = 0; - int psx_delay_BFC13C1C = 0; - int psx_delay_BFC13C2C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13B84u: goto label_BFC13B84; - case 0xBFC13B90u: goto label_BFC13B90; - case 0xBFC13B98u: goto label_BFC13B98; - case 0xBFC13BA4u: goto label_BFC13BA4; - case 0xBFC13BACu: goto label_BFC13BAC; - case 0xBFC13BC4u: goto label_BFC13BC4; - case 0xBFC13BCCu: goto label_BFC13BCC; - case 0xBFC13BD0u: goto label_BFC13BD0; - case 0xBFC13BD8u: goto label_BFC13BD8; - case 0xBFC13BE0u: goto label_BFC13BE0; - case 0xBFC13BE4u: goto label_BFC13BE4; - case 0xBFC13C00u: goto label_BFC13C00; - case 0xBFC13C14u: goto label_BFC13C14; - case 0xBFC13C18u: goto label_BFC13C18; - case 0xBFC13C24u: goto label_BFC13C24; - case 0xBFC13C28u: goto label_BFC13C28; - default: break; - } - } -label_BFC13B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000406Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000406Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000406Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13B6C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x0000406Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13B70: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004070u); return; } g_debug_last_store_pc = 0x00004070u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004070u); -#endif - /* 0xBFC13B74: 83AE0018 lb $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 14, 0x20000000u); - PGXP_LOAD(0x83AE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13B78: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00004078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC13B7C: 11C10009 beq $t6, $at, 0xBFC13BA4 */ - uint32_t psx_brA_BFC13B7C = cpu->gpr[14]; uint32_t psx_brB_BFC13B7C = cpu->gpr[1]; - psx_taken_BFC13B7C = (psx_brA_BFC13B7C == psx_brB_BFC13B7C); - psx_delay_BFC13B7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13B80: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004080u); return; } g_debug_last_store_pc = 0x00004080u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004080u); -#endif - if (psx_delay_BFC13B7C) { - psx_delay_BFC13B7C = 0; - if (psx_taken_BFC13B7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040A4u); - goto label_BFC13BA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004084u); - } -label_BFC13B84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13B84: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00004084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC13B88: 15C10016 bne $t6, $at, 0xBFC13BE4 */ - uint32_t psx_brA_BFC13B88 = cpu->gpr[14]; uint32_t psx_brB_BFC13B88 = cpu->gpr[1]; - psx_taken_BFC13B88 = (psx_brA_BFC13B88 != psx_brB_BFC13B88); - psx_delay_BFC13B88 = 1; - /* 0xBFC13B8C: 93B90018 lbu $t9, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 25, 0x20000000u); - PGXP_LOAD(0x93B90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000408Cu); -#endif - if (psx_delay_BFC13B88) { - psx_delay_BFC13B88 = 0; - if (psx_taken_BFC13B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040E4u); - goto label_BFC13BE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004090u); - } -label_BFC13B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13B90: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004098u; /* jal link before delay slot */ - psx_delay_BFC13B90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13B94: 2404000D addiu $a0, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2404000Du, cpu->gpr[4], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x00004094u); -#endif - if (psx_delay_BFC13B90) { - psx_delay_BFC13B90 = 0; - cpu->gpr[31] = 0x00004098u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13B98: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13B9C: 1000001D beq $zero, $zero, 0xBFC13C14 */ - uint32_t psx_brA_BFC13B9C = cpu->gpr[0]; uint32_t psx_brB_BFC13B9C = cpu->gpr[0]; - psx_taken_BFC13B9C = (psx_brA_BFC13B9C == psx_brB_BFC13B9C); - psx_delay_BFC13B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13BA0: AC208910 sw $zero, -30448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040A0u); return; } g_debug_last_store_pc = 0x000040A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208910u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000040A0u); -#endif - if (psx_delay_BFC13B9C) { - psx_delay_BFC13B9C = 0; - if (psx_taken_BFC13B9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004114u); - goto label_BFC13C14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040A4u); - } -label_BFC13BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13BA4: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x000040ACu; /* jal link before delay slot */ - psx_delay_BFC13BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13BA8: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x000040A8u); -#endif - if (psx_delay_BFC13BA4) { - psx_delay_BFC13BA4 = 0; - cpu->gpr[31] = 0x000040ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13BAC: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000040ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040B0u); -#endif - /* 0xBFC13BB0: 8DEF8910 lw $t7, -30448($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -30448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-30448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040B0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF8910u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000040B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000040B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000040B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13BBC: 05E10004 bgez $t7, 0xBFC13BD0 */ - uint32_t psx_brA_BFC13BBC = cpu->gpr[15]; - psx_taken_BFC13BBC = ((int32_t)psx_brA_BFC13BBC >= 0); - psx_delay_BFC13BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC13BC0: 31F80007 andi $t8, $t7, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7u; - PGXP_ALU(0x31F80007u, cpu->gpr[24], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x000040C0u); -#endif - if (psx_delay_BFC13BBC) { - psx_delay_BFC13BBC = 0; - if (psx_taken_BFC13BBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040D0u); - goto label_BFC13BD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040C4u); - } -label_BFC13BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13BC4: 13000002 beq $t8, $zero, 0xBFC13BD0 */ - uint32_t psx_brA_BFC13BC4 = cpu->gpr[24]; uint32_t psx_brB_BFC13BC4 = cpu->gpr[0]; - psx_taken_BFC13BC4 = (psx_brA_BFC13BC4 == psx_brB_BFC13BC4); - psx_delay_BFC13BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000040C8u); -#endif - if (psx_delay_BFC13BC4) { - psx_delay_BFC13BC4 = 0; - if (psx_taken_BFC13BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040D0u); - goto label_BFC13BD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040CCu); - } -label_BFC13BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC13BCC: 2718FFF8 addiu $t8, $t8, -8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-8)); - PGXP_ALU(0x2718FFF8u, cpu->gpr[24], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x000040CCu); -#endif -label_BFC13BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13BD0: 1700FFF4 bne $t8, $zero, 0xBFC13BA4 */ - uint32_t psx_brA_BFC13BD0 = cpu->gpr[24]; uint32_t psx_brB_BFC13BD0 = cpu->gpr[0]; - psx_taken_BFC13BD0 = (psx_brA_BFC13BD0 != psx_brB_BFC13BD0); - psx_delay_BFC13BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000040D4u); -#endif - if (psx_delay_BFC13BD0) { - psx_delay_BFC13BD0 = 0; - if (psx_taken_BFC13BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040A4u); - goto label_BFC13BA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040D8u); - } -label_BFC13BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BD8: 10000013 beq $zero, $zero, 0xBFC13C28 */ - uint32_t psx_brA_BFC13BD8 = cpu->gpr[0]; uint32_t psx_brB_BFC13BD8 = cpu->gpr[0]; - psx_taken_BFC13BD8 = (psx_brA_BFC13BD8 == psx_brB_BFC13BD8); - psx_delay_BFC13BD8 = 1; - /* 0xBFC13BDC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000040DCu); -#endif - if (psx_delay_BFC13BD8) { - psx_delay_BFC13BD8 = 0; - if (psx_taken_BFC13BD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004128u); - goto label_BFC13C28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000040E0u); - } -label_BFC13BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040E0u); -#endif - /* 0xBFC13BE0: 93B90018 lbu $t9, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 25, 0x20000000u); - PGXP_LOAD(0x93B90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000040E0u); -#endif -label_BFC13BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000040E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000040E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC13BE4: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000040E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC13BE8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000040E8u); -#endif - /* 0xBFC13BEC: 810873D1 lb $t0, 29649($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29649; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (29649)), 8, 0x100u); - PGXP_LOAD(0x810873D1u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000040ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000040F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13BF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000040F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC13BF4: 31090097 andi $t1, $t0, 0x97 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x97u; - PGXP_ALU(0x31090097u, cpu->gpr[9], _pgx1, 0x0097u); } -#ifdef PSX_COSIM - cosim_instr(0x000040F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC13BF8: 11200007 beq $t1, $zero, 0xBFC13C18 */ - uint32_t psx_brA_BFC13BF8 = cpu->gpr[9]; uint32_t psx_brB_BFC13BF8 = cpu->gpr[0]; - psx_taken_BFC13BF8 = (psx_brA_BFC13BF8 == psx_brB_BFC13BF8); - psx_delay_BFC13BF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13BFC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000040FCu); -#endif - if (psx_delay_BFC13BF8) { - psx_delay_BFC13BF8 = 0; - if (psx_taken_BFC13BF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004118u); - goto label_BFC13C18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004100u); - } -label_BFC13C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC13C00: 3C0A0001 lui $t2, 0x1 */ - cpu->gpr[10] = 0x00010000u; - PGXP_ALU(0x3C0A0001u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004100u); -#endif - /* 0xBFC13C04: 8D4A8910 lw $t2, -30448($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -30448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-30448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004104u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A8910u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00004104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13C08: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC13C0C: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC13C10: AC2B8910 sw $t3, -30448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004110u); return; } g_debug_last_store_pc = 0x00004110u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B8910u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004110u); -#endif -label_BFC13C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13C14: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004114u); -#endif -label_BFC13C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13C18: 27A50018 addiu $a1, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A50018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13C1C: 0C000B25 jal 0xB0002C94 */ - cpu->gpr[31] = 0x00004124u; /* jal link before delay slot */ - psx_delay_BFC13C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13C20: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004120u); -#endif - if (psx_delay_BFC13C1C) { - psx_delay_BFC13C1C = 0; - cpu->gpr[31] = 0x00004124u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C94u); - cpu->pc = 0x00002C94u; return; - } -label_BFC13C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004124u); -#endif - /* 0xBFC13C24: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004124u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004124u); -#endif -label_BFC13C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13C28: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13C2C: 03E00008 jr $ra */ - psx_delay_BFC13C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004130u); -#endif - if (psx_delay_BFC13C2C) { - psx_delay_BFC13C2C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004134(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004134u); - int psx_delay_BFC13C4C = 0; - int psx_delay_BFC13C5C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13C54u: goto label_BFC13C54; - default: break; - } - } -label_BFC13C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13C34: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13C38: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004138u); return; } g_debug_last_store_pc = 0x00004138u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13C3C: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000413Cu); return; } g_debug_last_store_pc = 0x0000413Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x0000413Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13C40: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004140u); return; } g_debug_last_store_pc = 0x00004140u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004140u); -#endif - /* 0xBFC13C44: 8FA4001C lw $a0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004144u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC13C48: 27A50018 addiu $a1, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A50018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13C4C: 0C000B25 jal 0xB0002C94 */ - cpu->gpr[31] = 0x00004154u; /* jal link before delay slot */ - psx_delay_BFC13C4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC13C50: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004150u); -#endif - if (psx_delay_BFC13C4C) { - psx_delay_BFC13C4C = 0; - cpu->gpr[31] = 0x00004154u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002C94u); - cpu->pc = 0x00002C94u; return; - } -label_BFC13C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004154u); -#endif - /* 0xBFC13C54: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004154u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13C58: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13C5C: 03E00008 jr $ra */ - psx_delay_BFC13C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13C60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004160u); -#endif - if (psx_delay_BFC13C5C) { - psx_delay_BFC13C5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004164(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004164u); - int psx_delay_BFC13CB0 = 0; - int psx_delay_BFC13CC4 = 0; - int psx_taken_BFC13CC4 = 0; - int psx_delay_BFC13CCC = 0; - int psx_taken_BFC13CCC = 0; - int psx_delay_BFC13CD4 = 0; - int psx_taken_BFC13CD4 = 0; - int psx_delay_BFC13CDC = 0; - int psx_taken_BFC13CDC = 0; - int psx_delay_BFC13CE4 = 0; - int psx_taken_BFC13CE4 = 0; - int psx_delay_BFC13CEC = 0; - int psx_taken_BFC13CEC = 0; - int psx_delay_BFC13CF4 = 0; - int psx_taken_BFC13CF4 = 0; - int psx_delay_BFC13CFC = 0; - int psx_delay_BFC13D0C = 0; - int psx_taken_BFC13D0C = 0; - int psx_delay_BFC13D18 = 0; - int psx_delay_BFC13D20 = 0; - int psx_taken_BFC13D20 = 0; - int psx_delay_BFC13D28 = 0; - int psx_delay_BFC13D30 = 0; - int psx_taken_BFC13D30 = 0; - int psx_delay_BFC13D38 = 0; - int psx_delay_BFC13D44 = 0; - int psx_taken_BFC13D44 = 0; - int psx_delay_BFC13D50 = 0; - int psx_taken_BFC13D50 = 0; - int psx_delay_BFC13D5C = 0; - int psx_delay_BFC13D64 = 0; - int psx_delay_BFC13D6C = 0; - int psx_delay_BFC13D74 = 0; - int psx_taken_BFC13D74 = 0; - int psx_delay_BFC13D98 = 0; - int psx_taken_BFC13D98 = 0; - int psx_delay_BFC13DA8 = 0; - int psx_taken_BFC13DA8 = 0; - int psx_delay_BFC13DB4 = 0; - int psx_delay_BFC13DBC = 0; - int psx_taken_BFC13DBC = 0; - int psx_delay_BFC13DC4 = 0; - int psx_delay_BFC13DCC = 0; - int psx_taken_BFC13DCC = 0; - int psx_delay_BFC13DFC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13CB0u: goto label_BFC13CB0; - case 0xBFC13CB8u: goto label_BFC13CB8; - case 0xBFC13CCCu: goto label_BFC13CCC; - case 0xBFC13CD4u: goto label_BFC13CD4; - case 0xBFC13CDCu: goto label_BFC13CDC; - case 0xBFC13CE4u: goto label_BFC13CE4; - case 0xBFC13CECu: goto label_BFC13CEC; - case 0xBFC13CF4u: goto label_BFC13CF4; - case 0xBFC13CFCu: goto label_BFC13CFC; - case 0xBFC13D04u: goto label_BFC13D04; - case 0xBFC13D14u: goto label_BFC13D14; - case 0xBFC13D20u: goto label_BFC13D20; - case 0xBFC13D28u: goto label_BFC13D28; - case 0xBFC13D30u: goto label_BFC13D30; - case 0xBFC13D38u: goto label_BFC13D38; - case 0xBFC13D40u: goto label_BFC13D40; - case 0xBFC13D4Cu: goto label_BFC13D4C; - case 0xBFC13D50u: goto label_BFC13D50; - case 0xBFC13D58u: goto label_BFC13D58; - case 0xBFC13D64u: goto label_BFC13D64; - case 0xBFC13D6Cu: goto label_BFC13D6C; - case 0xBFC13D74u: goto label_BFC13D74; - case 0xBFC13D7Cu: goto label_BFC13D7C; - case 0xBFC13D84u: goto label_BFC13D84; - case 0xBFC13DA0u: goto label_BFC13DA0; - case 0xBFC13DB0u: goto label_BFC13DB0; - case 0xBFC13DBCu: goto label_BFC13DBC; - case 0xBFC13DC4u: goto label_BFC13DC4; - case 0xBFC13DCCu: goto label_BFC13DCC; - case 0xBFC13DD4u: goto label_BFC13DD4; - default: break; - } - } -label_BFC13C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13C64: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x00004164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC13C68: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004168u); return; } g_debug_last_store_pc = 0x00004168u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x00004168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC13C6C: AFBE0038 sw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000416Cu); return; } g_debug_last_store_pc = 0x0000416Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x0000416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC13C70: AFB60030 sw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004170u); return; } g_debug_last_store_pc = 0x00004170u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x00004170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC13C74: AFB70034 sw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004174u); return; } g_debug_last_store_pc = 0x00004174u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x00004174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC13C78: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004178u); return; } g_debug_last_store_pc = 0x00004178u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00004178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC13C7C: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000417Cu); return; } g_debug_last_store_pc = 0x0000417Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x0000417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC13C80: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004180u); return; } g_debug_last_store_pc = 0x00004180u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00004180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC13C84: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004184u); return; } g_debug_last_store_pc = 0x00004184u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00004184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC13C88: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13C8C: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000418Cu); return; } g_debug_last_store_pc = 0x0000418Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000418Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13C90: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004190u); return; } g_debug_last_store_pc = 0x00004190u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60001u); -#endif - /* 0xBFC13C94: 02408821 addu $s1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC13C98: 24130008 addiu $s3, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24130008u, cpu->gpr[19], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00004198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC13C9C: 2415000A addiu $s5, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2415000Au, cpu->gpr[21], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000419Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC13CA0: 24140009 addiu $s4, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24140009u, cpu->gpr[20], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x000041A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC13CA4: 24170016 addiu $s7, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24170016u, cpu->gpr[23], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x000041A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC13CA8: 2416000D addiu $s6, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2416000Du, cpu->gpr[22], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x000041A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC13CAC: 241E007F addiu $fp, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x241E007Fu, cpu->gpr[30], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000041ACu); -#endif -label_BFC13CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13CB0: 0C000FFC jal 0xB0003FF0 */ - cpu->gpr[31] = 0x000041B8u; /* jal link before delay slot */ - psx_delay_BFC13CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000041B4u); -#endif - if (psx_delay_BFC13CB0) { - psx_delay_BFC13CB0 = 0; - cpu->gpr[31] = 0x000041B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FF0u); - cpu->pc = 0x00003FF0u; return; - } -label_BFC13CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC13CB8: 00021E00 sll $v1, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021E00u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x000041B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC13CBC: 00022600 sll $a0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00022600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x000041BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC13CC0: 00031E03 sra $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 24u); - PGXP_ALU(0x00031E03u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x000041C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008u); -#endif - /* 0xBFC13CC4: 10730021 beq $v1, $s3, 0xBFC13D4C */ - uint32_t psx_brA_BFC13CC4 = cpu->gpr[3]; uint32_t psx_brB_BFC13CC4 = cpu->gpr[19]; - psx_taken_BFC13CC4 = (psx_brA_BFC13CC4 == psx_brB_BFC13CC4); - psx_delay_BFC13CC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13CC8: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x000041C8u); -#endif - if (psx_delay_BFC13CC4) { - psx_delay_BFC13CC4 = 0; - if (psx_taken_BFC13CC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000424Cu); - goto label_BFC13D4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041CCu); - } -label_BFC13CCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC13CCC: 1074002B beq $v1, $s4, 0xBFC13D7C */ - uint32_t psx_brA_BFC13CCC = cpu->gpr[3]; uint32_t psx_brB_BFC13CCC = cpu->gpr[20]; - psx_taken_BFC13CCC = (psx_brA_BFC13CCC == psx_brB_BFC13CCC); - psx_delay_BFC13CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000041D0u); -#endif - if (psx_delay_BFC13CCC) { - psx_delay_BFC13CCC = 0; - if (psx_taken_BFC13CCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000427Cu); - goto label_BFC13D7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041D4u); - } -label_BFC13CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200008u); -#endif - /* 0xBFC13CD4: 10750018 beq $v1, $s5, 0xBFC13D38 */ - uint32_t psx_brA_BFC13CD4 = cpu->gpr[3]; uint32_t psx_brB_BFC13CD4 = cpu->gpr[21]; - psx_taken_BFC13CD4 = (psx_brA_BFC13CD4 == psx_brB_BFC13CD4); - psx_delay_BFC13CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000041D8u); -#endif - if (psx_delay_BFC13CD4) { - psx_delay_BFC13CD4 = 0; - if (psx_taken_BFC13CD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004238u); - goto label_BFC13D38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041DCu); - } -label_BFC13CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400008u); -#endif - /* 0xBFC13CDC: 10760016 beq $v1, $s6, 0xBFC13D38 */ - uint32_t psx_brA_BFC13CDC = cpu->gpr[3]; uint32_t psx_brB_BFC13CDC = cpu->gpr[22]; - psx_taken_BFC13CDC = (psx_brA_BFC13CDC == psx_brB_BFC13CDC); - psx_delay_BFC13CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000041E0u); -#endif - if (psx_delay_BFC13CDC) { - psx_delay_BFC13CDC = 0; - if (psx_taken_BFC13CDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004238u); - goto label_BFC13D38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041E4u); - } -label_BFC13CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800008u); -#endif - /* 0xBFC13CE4: 10770005 beq $v1, $s7, 0xBFC13CFC */ - uint32_t psx_brA_BFC13CE4 = cpu->gpr[3]; uint32_t psx_brB_BFC13CE4 = cpu->gpr[23]; - psx_taken_BFC13CE4 = (psx_brA_BFC13CE4 == psx_brB_BFC13CE4); - psx_delay_BFC13CE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000041E8u); -#endif - if (psx_delay_BFC13CE4) { - psx_delay_BFC13CE4 = 0; - if (psx_taken_BFC13CE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041FCu); - goto label_BFC13CFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041ECu); - } -label_BFC13CEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000008u); -#endif - /* 0xBFC13CEC: 107E0018 beq $v1, $fp, 0xBFC13D50 */ - uint32_t psx_brA_BFC13CEC = cpu->gpr[3]; uint32_t psx_brB_BFC13CEC = cpu->gpr[30]; - psx_taken_BFC13CEC = (psx_brA_BFC13CEC == psx_brB_BFC13CEC); - psx_delay_BFC13CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60002u); -#endif - /* 0xBFC13CF0: 0251082B sltu $at, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0251082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000041F0u); -#endif - if (psx_delay_BFC13CEC) { - psx_delay_BFC13CEC = 0; - if (psx_taken_BFC13CEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004250u); - goto label_BFC13D50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041F4u); - } -label_BFC13CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13CF4: 10000023 beq $zero, $zero, 0xBFC13D84 */ - uint32_t psx_brA_BFC13CF4 = cpu->gpr[0]; uint32_t psx_brB_BFC13CF4 = cpu->gpr[0]; - psx_taken_BFC13CF4 = (psx_brA_BFC13CF4 == psx_brB_BFC13CF4); - psx_delay_BFC13CF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC13CF8: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000041F8u); -#endif - if (psx_delay_BFC13CF4) { - psx_delay_BFC13CF4 = 0; - if (psx_taken_BFC13CF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004284u); - goto label_BFC13D84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041FCu); - } -label_BFC13CFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000041FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000041FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000041FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13CFC: 0C000FFC jal 0xB0003FF0 */ - cpu->gpr[31] = 0x00004204u; /* jal link before delay slot */ - psx_delay_BFC13CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC13D00: 2650007D addiu $s0, $s2, 125 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[18] + (125)); - PGXP_ALU(0x2650007Du, cpu->gpr[16], _pgx1, 0x0000007Du); } -#ifdef PSX_COSIM - cosim_instr(0x00004200u); -#endif - if (psx_delay_BFC13CFC) { - psx_delay_BFC13CFC = 0; - cpu->gpr[31] = 0x00004204u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00003FF0u); - cpu->pc = 0x00003FF0u; return; - } -label_BFC13D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC13D04: 00022600 sll $a0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00022600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC13D08: 0230082B sltu $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13D0C: 10200006 beq $at, $zero, 0xBFC13D28 */ - uint32_t psx_brA_BFC13D0C = cpu->gpr[1]; uint32_t psx_brB_BFC13D0C = cpu->gpr[0]; - psx_taken_BFC13D0C = (psx_brA_BFC13D0C == psx_brB_BFC13D0C); - psx_delay_BFC13D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13D10: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004210u); -#endif - if (psx_delay_BFC13D0C) { - psx_delay_BFC13D0C = 0; - if (psx_taken_BFC13D0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004228u); - goto label_BFC13D28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004214u); - } -label_BFC13D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC13D14: A2240000 sb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004214u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA2240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D18: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004220u; /* jal link before delay slot */ - psx_delay_BFC13D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13D1C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000421Cu); -#endif - if (psx_delay_BFC13D18) { - psx_delay_BFC13D18 = 0; - cpu->gpr[31] = 0x00004220u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D20: 1000FFE3 beq $zero, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13D20 = cpu->gpr[0]; uint32_t psx_brB_BFC13D20 = cpu->gpr[0]; - psx_taken_BFC13D20 = (psx_brA_BFC13D20 == psx_brB_BFC13D20); - psx_delay_BFC13D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004224u); -#endif - if (psx_delay_BFC13D20) { - psx_delay_BFC13D20 = 0; - if (psx_taken_BFC13D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004228u); - } -label_BFC13D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D28: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004230u; /* jal link before delay slot */ - psx_delay_BFC13D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13D2C: 24040007 addiu $a0, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24040007u, cpu->gpr[4], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x0000422Cu); -#endif - if (psx_delay_BFC13D28) { - psx_delay_BFC13D28 = 0; - cpu->gpr[31] = 0x00004230u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D30: 1000FFDF beq $zero, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13D30 = cpu->gpr[0]; uint32_t psx_brB_BFC13D30 = cpu->gpr[0]; - psx_taken_BFC13D30 = (psx_brA_BFC13D30 == psx_brB_BFC13D30); - psx_delay_BFC13D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004234u); -#endif - if (psx_delay_BFC13D30) { - psx_delay_BFC13D30 = 0; - if (psx_taken_BFC13D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004238u); - } -label_BFC13D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D38: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004240u; /* jal link before delay slot */ - psx_delay_BFC13D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13D3C: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000423Cu); -#endif - if (psx_delay_BFC13D38) { - psx_delay_BFC13D38 = 0; - cpu->gpr[31] = 0x00004240u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC13D40: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004240u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D44: 10000023 beq $zero, $zero, 0xBFC13DD4 */ - uint32_t psx_brA_BFC13D44 = cpu->gpr[0]; uint32_t psx_brB_BFC13D44 = cpu->gpr[0]; - psx_taken_BFC13D44 = (psx_brA_BFC13D44 == psx_brB_BFC13D44); - psx_delay_BFC13D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC13D48: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004248u); -#endif - if (psx_delay_BFC13D44) { - psx_delay_BFC13D44 = 0; - if (psx_taken_BFC13D44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042D4u); - goto label_BFC13DD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000424Cu); - } -label_BFC13D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000424Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000424Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000424Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60002u); -#endif - /* 0xBFC13D4C: 0251082B sltu $at, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[18] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0251082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000424Cu); -#endif -label_BFC13D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13D50: 1020FFD7 beq $at, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13D50 = cpu->gpr[1]; uint32_t psx_brB_BFC13D50 = cpu->gpr[0]; - psx_taken_BFC13D50 = (psx_brA_BFC13D50 == psx_brB_BFC13D50); - psx_delay_BFC13D50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004254u); -#endif - if (psx_delay_BFC13D50) { - psx_delay_BFC13D50 = 0; - if (psx_taken_BFC13D50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004258u); - } -label_BFC13D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13D58: 2631FFFF addiu $s1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2631FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D5C: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004264u; /* jal link before delay slot */ - psx_delay_BFC13D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC13D60: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004260u); -#endif - if (psx_delay_BFC13D5C) { - psx_delay_BFC13D5C = 0; - cpu->gpr[31] = 0x00004264u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D64: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x0000426Cu; /* jal link before delay slot */ - psx_delay_BFC13D64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13D68: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00004268u); -#endif - if (psx_delay_BFC13D64) { - psx_delay_BFC13D64 = 0; - cpu->gpr[31] = 0x0000426Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000426Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13D6C: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x00004274u; /* jal link before delay slot */ - psx_delay_BFC13D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC13D70: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004270u); -#endif - if (psx_delay_BFC13D6C) { - psx_delay_BFC13D6C = 0; - cpu->gpr[31] = 0x00004274u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D74: 1000FFCE beq $zero, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13D74 = cpu->gpr[0]; uint32_t psx_brB_BFC13D74 = cpu->gpr[0]; - psx_taken_BFC13D74 = (psx_brA_BFC13D74 == psx_brB_BFC13D74); - psx_delay_BFC13D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004278u); -#endif - if (psx_delay_BFC13D74) { - psx_delay_BFC13D74 = 0; - if (psx_taken_BFC13D74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000427Cu); - } -label_BFC13D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000427Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13D7C: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x0000427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC13D80: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004280u); -#endif -label_BFC13D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13D84: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC13D88: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004288u); -#endif - /* 0xBFC13D8C: 81EF73D1 lb $t7, 29649($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29649; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (29649)), 15, 0x8000u); - PGXP_LOAD(0x81EF73D1u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000428Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC13D94: 31F80097 andi $t8, $t7, 0x97 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x97u; - PGXP_ALU(0x31F80097u, cpu->gpr[24], _pgx1, 0x0097u); } -#ifdef PSX_COSIM - cosim_instr(0x00004294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13D98: 1300000A beq $t8, $zero, 0xBFC13DC4 */ - uint32_t psx_brA_BFC13D98 = cpu->gpr[24]; uint32_t psx_brB_BFC13D98 = cpu->gpr[0]; - psx_taken_BFC13D98 = (psx_brA_BFC13D98 == psx_brB_BFC13D98); - psx_delay_BFC13D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13D9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000429Cu); -#endif - if (psx_delay_BFC13D98) { - psx_delay_BFC13D98 = 0; - if (psx_taken_BFC13D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042C4u); - goto label_BFC13DC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042A0u); - } -label_BFC13DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC13DA0: 2659007D addiu $t9, $s2, 125 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[18] + (125)); - PGXP_ALU(0x2659007Du, cpu->gpr[25], _pgx1, 0x0000007Du); } -#ifdef PSX_COSIM - cosim_instr(0x000042A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020002u); -#endif - /* 0xBFC13DA4: 0239082B sltu $at, $s1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0239082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000042A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13DA8: 10200006 beq $at, $zero, 0xBFC13DC4 */ - uint32_t psx_brA_BFC13DA8 = cpu->gpr[1]; uint32_t psx_brB_BFC13DA8 = cpu->gpr[0]; - psx_taken_BFC13DA8 = (psx_brA_BFC13DA8 == psx_brB_BFC13DA8); - psx_delay_BFC13DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000042ACu); -#endif - if (psx_delay_BFC13DA8) { - psx_delay_BFC13DA8 = 0; - if (psx_taken_BFC13DA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042C4u); - goto label_BFC13DC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042B0u); - } -label_BFC13DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC13DB0: A2240000 sb $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000042B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA2240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000042B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13DB4: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x000042BCu; /* jal link before delay slot */ - psx_delay_BFC13DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13DB8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000042B8u); -#endif - if (psx_delay_BFC13DB4) { - psx_delay_BFC13DB4 = 0; - cpu->gpr[31] = 0x000042BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13DBC: 1000FFBC beq $zero, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13DBC = cpu->gpr[0]; uint32_t psx_brB_BFC13DBC = cpu->gpr[0]; - psx_taken_BFC13DBC = (psx_brA_BFC13DBC == psx_brB_BFC13DBC); - psx_delay_BFC13DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13DC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000042C0u); -#endif - if (psx_delay_BFC13DBC) { - psx_delay_BFC13DBC = 0; - if (psx_taken_BFC13DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042C4u); - } -label_BFC13DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13DC4: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x000042CCu; /* jal link before delay slot */ - psx_delay_BFC13DC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13DC8: 24040007 addiu $a0, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24040007u, cpu->gpr[4], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x000042C8u); -#endif - if (psx_delay_BFC13DC4) { - psx_delay_BFC13DC4 = 0; - cpu->gpr[31] = 0x000042CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13DCC: 1000FFB8 beq $zero, $zero, 0xBFC13CB0 */ - uint32_t psx_brA_BFC13DCC = cpu->gpr[0]; uint32_t psx_brB_BFC13DCC = cpu->gpr[0]; - psx_taken_BFC13DCC = (psx_brA_BFC13DCC == psx_brB_BFC13DCC); - psx_delay_BFC13DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13DD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000042D0u); -#endif - if (psx_delay_BFC13DCC) { - psx_delay_BFC13DCC = 0; - if (psx_taken_BFC13DCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000041B0u); - goto label_BFC13CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000042D4u); - } -label_BFC13DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000042D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000042D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042D4u); -#endif - /* 0xBFC13DD4: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000042D4u); -#endif - /* 0xBFC13DD8: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042D8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000042D8u); -#endif - /* 0xBFC13DDC: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042DCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000042DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042E0u); -#endif - /* 0xBFC13DE0: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042E0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000042E0u); -#endif - /* 0xBFC13DE4: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042E4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x000042E4u); -#endif - /* 0xBFC13DE8: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042E8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000042E8u); -#endif - /* 0xBFC13DEC: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042ECu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x000042ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000042F0u); -#endif - /* 0xBFC13DF0: 8FB60030 lw $s6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042F0u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60030u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x000042F0u); -#endif - /* 0xBFC13DF4: 8FB70034 lw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042F4u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x000042F4u); -#endif - /* 0xBFC13DF8: 8FBE0038 lw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042F8u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x000042F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13DFC: 03E00008 jr $ra */ - psx_delay_BFC13DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13E00: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x00004300u); -#endif - if (psx_delay_BFC13DFC) { - psx_delay_BFC13DFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004304(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004304u); - int psx_delay_BFC13E14 = 0; - int psx_taken_BFC13E14 = 0; - int psx_delay_BFC13E2C = 0; - int psx_taken_BFC13E2C = 0; - int psx_delay_BFC13E34 = 0; - int psx_delay_BFC13E44 = 0; - int psx_taken_BFC13E44 = 0; - int psx_delay_BFC13E58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13E1Cu: goto label_BFC13E1C; - case 0xBFC13E24u: goto label_BFC13E24; - case 0xBFC13E34u: goto label_BFC13E34; - case 0xBFC13E3Cu: goto label_BFC13E3C; - case 0xBFC13E4Cu: goto label_BFC13E4C; - case 0xBFC13E50u: goto label_BFC13E50; - default: break; - } - } -label_BFC13E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13E04: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00004304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC13E08: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004308u); return; } g_debug_last_store_pc = 0x00004308u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00004308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC13E0C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000430Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13E10: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004310u); return; } g_debug_last_store_pc = 0x00004310u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC13E14: 16200003 bne $s1, $zero, 0xBFC13E24 */ - uint32_t psx_brA_BFC13E14 = cpu->gpr[17]; uint32_t psx_brB_BFC13E14 = cpu->gpr[0]; - psx_taken_BFC13E14 = (psx_brA_BFC13E14 != psx_brB_BFC13E14); - psx_delay_BFC13E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13E18: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004318u); return; } g_debug_last_store_pc = 0x00004318u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004318u); -#endif - if (psx_delay_BFC13E14) { - psx_delay_BFC13E14 = 0; - if (psx_taken_BFC13E14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004324u); - goto label_BFC13E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000431Cu); - } -label_BFC13E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000431Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13E1C: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13E20: 26317210 addiu $s1, $s1, 29200 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (29200)); - PGXP_ALU(0x26317210u, cpu->gpr[17], _pgx1, 0x00007210u); } -#ifdef PSX_COSIM - cosim_instr(0x00004320u); -#endif -label_BFC13E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004324u); -#endif - /* 0xBFC13E24: 82300000 lb $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 16, 0x20000u); - PGXP_LOAD(0x82300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13E28: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13E2C: 12000008 beq $s0, $zero, 0xBFC13E50 */ - uint32_t psx_brA_BFC13E2C = cpu->gpr[16]; uint32_t psx_brB_BFC13E2C = cpu->gpr[0]; - psx_taken_BFC13E2C = (psx_brA_BFC13E2C == psx_brB_BFC13E2C); - psx_delay_BFC13E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004330u); -#endif - /* 0xBFC13E30: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004330u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004330u); -#endif - if (psx_delay_BFC13E2C) { - psx_delay_BFC13E2C = 0; - if (psx_taken_BFC13E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004350u); - goto label_BFC13E50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004334u); - } -label_BFC13E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13E34: 0C00101B jal 0xB000406C */ - cpu->gpr[31] = 0x0000433Cu; /* jal link before delay slot */ - psx_delay_BFC13E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC13E38: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004338u); -#endif - if (psx_delay_BFC13E34) { - psx_delay_BFC13E34 = 0; - cpu->gpr[31] = 0x0000433Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000406Cu); - cpu->pc = 0x0000406Cu; return; - } -label_BFC13E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000433Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000433Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000433Cu); -#endif - /* 0xBFC13E3C: 82300000 lb $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 16, 0x20000u); - PGXP_LOAD(0x82300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x0000433Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13E40: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13E44: 1600FFFB bne $s0, $zero, 0xBFC13E34 */ - uint32_t psx_brA_BFC13E44 = cpu->gpr[16]; uint32_t psx_brB_BFC13E44 = cpu->gpr[0]; - psx_taken_BFC13E44 = (psx_brA_BFC13E44 != psx_brB_BFC13E44); - psx_delay_BFC13E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13E48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004348u); -#endif - if (psx_delay_BFC13E44) { - psx_delay_BFC13E44 = 0; - if (psx_taken_BFC13E44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004334u); - goto label_BFC13E34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000434Cu); - } -label_BFC13E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000434Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000434Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000434Cu); -#endif - /* 0xBFC13E4C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000434Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000434Cu); -#endif -label_BFC13E50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004350u); -#endif - /* 0xBFC13E50: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004350u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004350u); -#endif - /* 0xBFC13E54: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004354u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x00004354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13E58: 03E00008 jr $ra */ - psx_delay_BFC13E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13E5C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x0000435Cu); -#endif - if (psx_delay_BFC13E58) { - psx_delay_BFC13E58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004360(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004360u); - int psx_delay_BFC13E70 = 0; - int psx_delay_BFC13E80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13E78u: goto label_BFC13E78; - default: break; - } - } -label_BFC13E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13E60: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13E64: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004364u); return; } g_debug_last_store_pc = 0x00004364u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC13E68: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC13E6C: 3C0E1F80 lui $t6, 0x1F80 */ - cpu->gpr[14] = 0x1F800000u; - PGXP_ALU(0x3C0E1F80u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000436Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13E70: 0C0009E8 jal 0xB00027A0 */ - cpu->gpr[31] = 0x00004378u; /* jal link before delay slot */ - psx_delay_BFC13E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC13E74: A1C42041 sb $a0, 8257($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004374u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (8257)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA1C42041u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004374u); -#endif - if (psx_delay_BFC13E70) { - psx_delay_BFC13E70 = 0; - cpu->gpr[31] = 0x00004378u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000027A0u); - cpu->pc = 0x000027A0u; return; - } -label_BFC13E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004378u); -#endif - /* 0xBFC13E78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004378u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13E7C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x0000437Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13E80: 03E00008 jr $ra */ - psx_delay_BFC13E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13E84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004384u); -#endif - if (psx_delay_BFC13E80) { - psx_delay_BFC13E80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000043D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000043D0u); - int psx_delay_BFC13EE0 = 0; -label_BFC13ED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000043D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000043D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000043D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC13ED0: 3C030001 lui $v1, 0x1 */ - cpu->gpr[3] = 0x00010000u; - PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000043D0u); -#endif - /* 0xBFC13ED4: 8C638914 lw $v1, -30444($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -30444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-30444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638914u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000043D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13ED8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000043D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC13EDC: AC248914 sw $a0, -30444($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -30444; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-30444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043DCu); return; } g_debug_last_store_pc = 0x000043DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC248914u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000043DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000043E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13EE0: 03E00008 jr $ra */ - psx_delay_BFC13EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC13EE4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000043E4u); -#endif - if (psx_delay_BFC13EE0) { - psx_delay_BFC13EE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000043E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000043E8u); - int psx_delay_BFC13F18 = 0; - int psx_delay_BFC13F28 = 0; - int psx_delay_BFC13F38 = 0; - int psx_delay_BFC13F54 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13F20u: goto label_BFC13F20; - case 0xBFC13F30u: goto label_BFC13F30; - case 0xBFC13F40u: goto label_BFC13F40; - default: break; - } - } -label_BFC13EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000043E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000043E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000043E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13EE8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x000043E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13EEC: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043ECu); return; } g_debug_last_store_pc = 0x000043ECu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000043ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000043F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC13EF0: 3C100000 lui $s0, 0x0 */ - cpu->gpr[16] = 0x00000000u; - PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000043F0u); -#endif - /* 0xBFC13EF4: 8E107258 lw $s0, 29272($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043F4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E107258u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000043F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13EF8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043F8u); return; } g_debug_last_store_pc = 0x000043F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000043F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC13EFC: 240E0040 addiu $t6, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240E0040u, cpu->gpr[14], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x000043FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC13F00: 240F0088 addiu $t7, $zero, 136 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (136)); - PGXP_ALU(0x240F0088u, cpu->gpr[15], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0x00004400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC13F04: A60E000A sh $t6, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004404u); return; } g_debug_last_store_pc = 0x00004404u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13F08: 2418000D addiu $t8, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2418000Du, cpu->gpr[24], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x00004408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC13F0C: A60F000E sh $t7, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000440Cu); return; } g_debug_last_store_pc = 0x0000440Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000440Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC13F10: A6180008 sh $t8, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004410u); return; } g_debug_last_store_pc = 0x00004410u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13F14: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00004414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13F18: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004420u; /* jal link before delay slot */ - psx_delay_BFC13F18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13F1C: A600000A sh $zero, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000441Cu); return; } g_debug_last_store_pc = 0x0000441Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000441Cu); -#endif - if (psx_delay_BFC13F18) { - psx_delay_BFC13F18 = 0; - cpu->gpr[31] = 0x00004420u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC13F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC13F20: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC13F24: A619000A sh $t9, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004424u); return; } g_debug_last_store_pc = 0x00004424u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA619000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13F28: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004430u; /* jal link before delay slot */ - psx_delay_BFC13F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13F2C: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000442Cu); -#endif - if (psx_delay_BFC13F28) { - psx_delay_BFC13F28 = 0; - cpu->gpr[31] = 0x00004430u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC13F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC13F30: 24082002 addiu $t0, $zero, 8194 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (8194)); - PGXP_ALU(0x24082002u, cpu->gpr[8], _pgx1, 0x00002002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC13F34: A608000A sh $t0, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004434u); return; } g_debug_last_store_pc = 0x00004434u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC13F38: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004440u; /* jal link before delay slot */ - psx_delay_BFC13F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13F3C: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000443Cu); -#endif - if (psx_delay_BFC13F38) { - psx_delay_BFC13F38 = 0; - cpu->gpr[31] = 0x00004440u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC13F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13F40: A600000A sh $zero, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004440u); return; } g_debug_last_store_pc = 0x00004440u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004440u); -#endif - /* 0xBFC13F44: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004444u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC13F48: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004448u); -#endif - /* 0xBFC13F4C: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000444Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x0000444Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC13F50: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004450u); return; } g_debug_last_store_pc = 0x00004450u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13F54: 03E00008 jr $ra */ - psx_delay_BFC13F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13F58: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00004458u); -#endif - if (psx_delay_BFC13F54) { - psx_delay_BFC13F54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000445C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000445Cu); - int psx_delay_BFC13F70 = 0; - int psx_taken_BFC13F70 = 0; - int psx_delay_BFC13F88 = 0; - int psx_taken_BFC13F88 = 0; - int psx_delay_BFC13F90 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13F78u: goto label_BFC13F78; - case 0xBFC13F90u: goto label_BFC13F90; - default: break; - } - } -label_BFC13F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000445Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000445Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000445Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC13F5C: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000445Cu); return; } g_debug_last_store_pc = 0x0000445Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000445Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004460u); -#endif - /* 0xBFC13F60: 8FA20000 lw $v0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004460u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004460u); -#endif - /* 0xBFC13F64: 8FAE0000 lw $t6, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004464u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC13F6C: 25CFFFFF addiu $t7, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000446Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13F70: 10400007 beq $v0, $zero, 0xBFC13F90 */ - uint32_t psx_brA_BFC13F70 = cpu->gpr[2]; uint32_t psx_brB_BFC13F70 = cpu->gpr[0]; - psx_taken_BFC13F70 = (psx_brA_BFC13F70 == psx_brB_BFC13F70); - psx_delay_BFC13F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC13F74: AFAF0000 sw $t7, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004474u); return; } g_debug_last_store_pc = 0x00004474u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004474u); -#endif - if (psx_delay_BFC13F70) { - psx_delay_BFC13F70 = 0; - if (psx_taken_BFC13F70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004490u); - goto label_BFC13F90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004478u); - } -label_BFC13F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004478u); -#endif - /* 0xBFC13F78: 8FA20000 lw $v0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004478u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004478u); -#endif - /* 0xBFC13F7C: 8FB80000 lw $t8, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000447Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13F80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC13F84: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC13F88: 1440FFFB bne $v0, $zero, 0xBFC13F78 */ - uint32_t psx_brA_BFC13F88 = cpu->gpr[2]; uint32_t psx_brB_BFC13F88 = cpu->gpr[0]; - psx_taken_BFC13F88 = (psx_brA_BFC13F88 != psx_brB_BFC13F88); - psx_delay_BFC13F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC13F8C: AFB90000 sw $t9, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000448Cu); return; } g_debug_last_store_pc = 0x0000448Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000448Cu); -#endif - if (psx_delay_BFC13F88) { - psx_delay_BFC13F88 = 0; - if (psx_taken_BFC13F88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004478u); - goto label_BFC13F78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004490u); - } -label_BFC13F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC13F90: 03E00008 jr $ra */ - psx_delay_BFC13F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13F94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004494u); -#endif - if (psx_delay_BFC13F90) { - psx_delay_BFC13F90 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004498(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004498u); - int psx_delay_BFC13FD8 = 0; - int psx_taken_BFC13FD8 = 0; - int psx_delay_BFC13FE0 = 0; - int psx_taken_BFC13FE0 = 0; - int psx_delay_BFC1401C = 0; - int psx_taken_BFC1401C = 0; - int psx_delay_BFC14024 = 0; - int psx_taken_BFC14024 = 0; - int psx_delay_BFC14040 = 0; - int psx_delay_BFC14064 = 0; - int psx_taken_BFC14064 = 0; - int psx_delay_BFC14078 = 0; - int psx_taken_BFC14078 = 0; - int psx_delay_BFC14088 = 0; - int psx_delay_BFC140BC = 0; - int psx_taken_BFC140BC = 0; - int psx_delay_BFC140D0 = 0; - int psx_taken_BFC140D0 = 0; - int psx_delay_BFC140DC = 0; - int psx_delay_BFC140F0 = 0; - int psx_taken_BFC140F0 = 0; - int psx_delay_BFC1410C = 0; - int psx_taken_BFC1410C = 0; - int psx_delay_BFC14120 = 0; - int psx_taken_BFC14120 = 0; - int psx_delay_BFC14130 = 0; - int psx_delay_BFC1415C = 0; - int psx_taken_BFC1415C = 0; - int psx_delay_BFC14170 = 0; - int psx_taken_BFC14170 = 0; - int psx_delay_BFC1419C = 0; - int psx_taken_BFC1419C = 0; - int psx_delay_BFC141B4 = 0; - int psx_taken_BFC141B4 = 0; - int psx_delay_BFC141D0 = 0; - int psx_taken_BFC141D0 = 0; - int psx_delay_BFC141E4 = 0; - int psx_taken_BFC141E4 = 0; - int psx_delay_BFC141F4 = 0; - int psx_delay_BFC14220 = 0; - int psx_taken_BFC14220 = 0; - int psx_delay_BFC14234 = 0; - int psx_taken_BFC14234 = 0; - int psx_delay_BFC1424C = 0; - int psx_taken_BFC1424C = 0; - int psx_delay_BFC14254 = 0; - int psx_taken_BFC14254 = 0; - int psx_delay_BFC14268 = 0; - int psx_taken_BFC14268 = 0; - int psx_delay_BFC14284 = 0; - int psx_taken_BFC14284 = 0; - int psx_delay_BFC14298 = 0; - int psx_taken_BFC14298 = 0; - int psx_delay_BFC142AC = 0; - int psx_taken_BFC142AC = 0; - int psx_delay_BFC142C0 = 0; - int psx_delay_BFC142EC = 0; - int psx_taken_BFC142EC = 0; - int psx_delay_BFC14300 = 0; - int psx_taken_BFC14300 = 0; - int psx_delay_BFC14314 = 0; - int psx_taken_BFC14314 = 0; - int psx_delay_BFC14328 = 0; - int psx_taken_BFC14328 = 0; - int psx_delay_BFC14334 = 0; - int psx_taken_BFC14334 = 0; - int psx_delay_BFC14348 = 0; - int psx_taken_BFC14348 = 0; - int psx_delay_BFC14370 = 0; - int psx_taken_BFC14370 = 0; - int psx_delay_BFC1438C = 0; - int psx_taken_BFC1438C = 0; - int psx_delay_BFC143A0 = 0; - int psx_taken_BFC143A0 = 0; - int psx_delay_BFC143B4 = 0; - int psx_taken_BFC143B4 = 0; - int psx_delay_BFC143C8 = 0; - int psx_delay_BFC143F4 = 0; - int psx_taken_BFC143F4 = 0; - int psx_delay_BFC14408 = 0; - int psx_taken_BFC14408 = 0; - int psx_delay_BFC1442C = 0; - int psx_taken_BFC1442C = 0; - int psx_delay_BFC14448 = 0; - int psx_taken_BFC14448 = 0; - int psx_delay_BFC1446C = 0; - int psx_taken_BFC1446C = 0; - int psx_delay_BFC14478 = 0; - int psx_taken_BFC14478 = 0; - int psx_delay_BFC14488 = 0; - int psx_delay_BFC144B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC13FE0u: goto label_BFC13FE0; - case 0xBFC13FE8u: goto label_BFC13FE8; - case 0xBFC13FECu: goto label_BFC13FEC; - case 0xBFC14024u: goto label_BFC14024; - case 0xBFC1402Cu: goto label_BFC1402C; - case 0xBFC14030u: goto label_BFC14030; - case 0xBFC14048u: goto label_BFC14048; - case 0xBFC1406Cu: goto label_BFC1406C; - case 0xBFC14080u: goto label_BFC14080; - case 0xBFC14084u: goto label_BFC14084; - case 0xBFC14090u: goto label_BFC14090; - case 0xBFC140C4u: goto label_BFC140C4; - case 0xBFC140D8u: goto label_BFC140D8; - case 0xBFC140E4u: goto label_BFC140E4; - case 0xBFC140F8u: goto label_BFC140F8; - case 0xBFC140FCu: goto label_BFC140FC; - case 0xBFC14114u: goto label_BFC14114; - case 0xBFC14128u: goto label_BFC14128; - case 0xBFC1412Cu: goto label_BFC1412C; - case 0xBFC14138u: goto label_BFC14138; - case 0xBFC14164u: goto label_BFC14164; - case 0xBFC14178u: goto label_BFC14178; - case 0xBFC141A4u: goto label_BFC141A4; - case 0xBFC141A8u: goto label_BFC141A8; - case 0xBFC141BCu: goto label_BFC141BC; - case 0xBFC141C0u: goto label_BFC141C0; - case 0xBFC141D8u: goto label_BFC141D8; - case 0xBFC141ECu: goto label_BFC141EC; - case 0xBFC141FCu: goto label_BFC141FC; - case 0xBFC14228u: goto label_BFC14228; - case 0xBFC1423Cu: goto label_BFC1423C; - case 0xBFC14254u: goto label_BFC14254; - case 0xBFC1425Cu: goto label_BFC1425C; - case 0xBFC14270u: goto label_BFC14270; - case 0xBFC14274u: goto label_BFC14274; - case 0xBFC1428Cu: goto label_BFC1428C; - case 0xBFC142A0u: goto label_BFC142A0; - case 0xBFC142B4u: goto label_BFC142B4; - case 0xBFC142B8u: goto label_BFC142B8; - case 0xBFC142C8u: goto label_BFC142C8; - case 0xBFC142F4u: goto label_BFC142F4; - case 0xBFC14308u: goto label_BFC14308; - case 0xBFC1431Cu: goto label_BFC1431C; - case 0xBFC14330u: goto label_BFC14330; - case 0xBFC1433Cu: goto label_BFC1433C; - case 0xBFC14350u: goto label_BFC14350; - case 0xBFC14378u: goto label_BFC14378; - case 0xBFC1437Cu: goto label_BFC1437C; - case 0xBFC14394u: goto label_BFC14394; - case 0xBFC143A8u: goto label_BFC143A8; - case 0xBFC143BCu: goto label_BFC143BC; - case 0xBFC143C0u: goto label_BFC143C0; - case 0xBFC143D0u: goto label_BFC143D0; - case 0xBFC143FCu: goto label_BFC143FC; - case 0xBFC14410u: goto label_BFC14410; - case 0xBFC14434u: goto label_BFC14434; - case 0xBFC14438u: goto label_BFC14438; - case 0xBFC14450u: goto label_BFC14450; - case 0xBFC14454u: goto label_BFC14454; - case 0xBFC14464u: goto label_BFC14464; - case 0xBFC14468u: goto label_BFC14468; - case 0xBFC1446Cu: goto label_BFC1446C; - case 0xBFC14470u: goto label_BFC14470; - case 0xBFC14474u: goto label_BFC14474; - case 0xBFC14478u: goto label_BFC14478; - case 0xBFC1447Cu: goto label_BFC1447C; - case 0xBFC14480u: goto label_BFC14480; - case 0xBFC14484u: goto label_BFC14484; - case 0xBFC14488u: goto label_BFC14488; - case 0xBFC1448Cu: goto label_BFC1448C; - case 0xBFC14490u: goto label_BFC14490; - case 0xBFC14498u: goto label_BFC14498; - default: break; - } - } -label_BFC13F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC13F98: 27BDFF98 addiu $sp, $sp, -104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-104)); - PGXP_ALU(0x27BDFF98u, cpu->gpr[29], _pgx1, 0xFFFFFF98u); } -#ifdef PSX_COSIM - cosim_instr(0x00004498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC13F9C: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000449Cu); return; } g_debug_last_store_pc = 0x0000449Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x0000449Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC13FA0: AFB50030 sw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044A0u); return; } g_debug_last_store_pc = 0x000044A0u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x000044A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC13FA4: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044A4u); return; } g_debug_last_store_pc = 0x000044A4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000044A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13FA8: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000044A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC13FAC: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044ACu); return; } g_debug_last_store_pc = 0x000044ACu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x000044ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC13FB0: 25EF74C8 addiu $t7, $t7, 29896 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (29896)); - PGXP_ALU(0x25EF74C8u, cpu->gpr[15], _pgx1, 0x000074C8u); } -#ifdef PSX_COSIM - cosim_instr(0x000044B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC13FB4: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000044B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC13FB8: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044B8u); return; } g_debug_last_store_pc = 0x000044B8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000044B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC13FBC: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044BCu); return; } g_debug_last_store_pc = 0x000044BCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000044BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC13FC0: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044C0u); return; } g_debug_last_store_pc = 0x000044C0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x000044C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC13FC4: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044C4u); return; } g_debug_last_store_pc = 0x000044C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000044C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC13FC8: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000044C8u); -#endif - /* 0xBFC13FCC: 8C590000 lw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044CCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000044CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC13FD0: 241800FF addiu $t8, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x241800FFu, cpu->gpr[24], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000044D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC13FD4: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000044D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC13FD8: 14800003 bne $a0, $zero, 0xBFC13FE8 */ - uint32_t psx_brA_BFC13FD8 = cpu->gpr[4]; uint32_t psx_brB_BFC13FD8 = cpu->gpr[0]; - psx_taken_BFC13FD8 = (psx_brA_BFC13FD8 != psx_brB_BFC13FD8); - psx_delay_BFC13FD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC13FDC: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000044DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000044DCu); -#endif - if (psx_delay_BFC13FD8) { - psx_delay_BFC13FD8 = 0; - if (psx_taken_BFC13FD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000044E8u); - goto label_BFC13FE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000044E0u); - } -label_BFC13FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000044E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000044E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC13FE0: 10000002 beq $zero, $zero, 0xBFC13FEC */ - uint32_t psx_brA_BFC13FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC13FE0 = cpu->gpr[0]; - psx_taken_BFC13FE0 = (psx_brA_BFC13FE0 == psx_brB_BFC13FE0); - psx_delay_BFC13FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13FE4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000044E4u); -#endif - if (psx_delay_BFC13FE0) { - psx_delay_BFC13FE0 = 0; - if (psx_taken_BFC13FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000044ECu); - goto label_BFC13FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000044E8u); - } -label_BFC13FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000044E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000044E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC13FE8: 24102000 addiu $s0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24102000u, cpu->gpr[16], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x000044E8u); -#endif -label_BFC13FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000044ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000044ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC13FEC: 3C110000 lui $s1, 0x0 */ - cpu->gpr[17] = 0x00000000u; - PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000044ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000044F0u); -#endif - /* 0xBFC13FF0: 8E317258 lw $s1, 29272($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000044F0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E317258u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000044F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC13FF4: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000044F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC13FF8: 36080002 ori $t0, $s0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[16] | 0x2u; - PGXP_ALU(0x36080002u, cpu->gpr[8], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000044F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC13FFC: 254A74D0 addiu $t2, $t2, 29904 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (29904)); - PGXP_ALU(0x254A74D0u, cpu->gpr[10], _pgx1, 0x000074D0u); } -#ifdef PSX_COSIM - cosim_instr(0x000044FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC14000: 00044880 sll $t1, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00044880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00004500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC14004: 012A1821 addu $v1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC14008: A628000A sh $t0, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004508u); return; } g_debug_last_store_pc = 0x00004508u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA628000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004508u); -#endif - /* 0xBFC1400C: 8C720000 lw $s2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000450Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x8u); } - PGXP_LOAD(0x8C720000u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x0000450Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004510u); -#endif - /* 0xBFC14010: 8C530000 lw $s3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004510u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x4u); } - PGXP_LOAD(0x8C530000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x00004510u); -#endif - /* 0xBFC14014: 824B0000 lb $t3, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 11, 0x40000u); - PGXP_LOAD(0x824B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC14018: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1401C: 11600004 beq $t3, $zero, 0xBFC14030 */ - uint32_t psx_brA_BFC1401C = cpu->gpr[11]; uint32_t psx_brB_BFC1401C = cpu->gpr[0]; - psx_taken_BFC1401C = (psx_brA_BFC1401C == psx_brB_BFC1401C); - psx_delay_BFC1401C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004520u); -#endif - if (psx_delay_BFC1401C) { - psx_delay_BFC1401C = 0; - if (psx_taken_BFC1401C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004530u); - goto label_BFC14030; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004524u); - } -label_BFC14024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC14024: 12400002 beq $s2, $zero, 0xBFC14030 */ - uint32_t psx_brA_BFC14024 = cpu->gpr[18]; uint32_t psx_brB_BFC14024 = cpu->gpr[0]; - psx_taken_BFC14024 = (psx_brA_BFC14024 == psx_brB_BFC14024); - psx_delay_BFC14024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004528u); -#endif - if (psx_delay_BFC14024) { - psx_delay_BFC14024 = 0; - if (psx_taken_BFC14024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004530u); - goto label_BFC14030; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000452Cu); - } -label_BFC1402C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000452Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000452Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000452Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC1402C: 2415FFFF addiu $s5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2415FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000452Cu); -#endif -label_BFC14030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004530u); -#endif - /* 0xBFC14030: 92200000 lbu $zero, 0($s1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 0, 0x20000u); -#ifdef PSX_COSIM - cosim_instr(0x00004530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC14034: AFA3003C sw $v1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004534u); return; } g_debug_last_store_pc = 0x00004534u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3003Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC14038: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1403C: AFA20040 sw $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000453Cu); return; } g_debug_last_store_pc = 0x0000453Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000453Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14040: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004548u; /* jal link before delay slot */ - psx_delay_BFC14040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14044: 24040028 addiu $a0, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24040028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00004544u); -#endif - if (psx_delay_BFC14040) { - psx_delay_BFC14040 = 0; - cpu->gpr[31] = 0x00004548u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC14048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC14048: 360C1003 ori $t4, $s0, 0x1003 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] | 0x1003u; - PGXP_ALU(0x360C1003u, cpu->gpr[12], _pgx1, 0x1003u); } -#ifdef PSX_COSIM - cosim_instr(0x00004548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC1404C: A62C000A sh $t4, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000454Cu); return; } g_debug_last_store_pc = 0x0000454Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA62C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000454Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14050: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC14054: AC3074A0 sw $s0, 29856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004554u); return; } g_debug_last_store_pc = 0x00004554u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC3074A0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004554u); -#endif - /* 0xBFC14058: 962D0004 lhu $t5, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004558u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x962D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1405C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000455Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14060: 31AE0001 andi $t6, $t5, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x1u; - PGXP_ALU(0x31AE0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14064: 15C00007 bne $t6, $zero, 0xBFC14084 */ - uint32_t psx_brA_BFC14064 = cpu->gpr[14]; uint32_t psx_brB_BFC14064 = cpu->gpr[0]; - psx_taken_BFC14064 = (psx_brA_BFC14064 != psx_brB_BFC14064); - psx_delay_BFC14064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14068: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004568u); -#endif - if (psx_delay_BFC14064) { - psx_delay_BFC14064 = 0; - if (psx_taken_BFC14064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004584u); - goto label_BFC14084; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000456Cu); - } -label_BFC1406C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000456Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000456Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000456Cu); -#endif - /* 0xBFC1406C: 962F0004 lhu $t7, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000456Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000456Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14074: 31F80001 andi $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14078: 1300FFFC beq $t8, $zero, 0xBFC1406C */ - uint32_t psx_brA_BFC14078 = cpu->gpr[24]; uint32_t psx_brB_BFC14078 = cpu->gpr[0]; - psx_taken_BFC14078 = (psx_brA_BFC14078 == psx_brB_BFC14078); - psx_delay_BFC14078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1407C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000457Cu); -#endif - if (psx_delay_BFC14078) { - psx_delay_BFC14078 = 0; - if (psx_taken_BFC14078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000456Cu); - goto label_BFC1406C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004580u); - } -label_BFC14080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14080: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004580u); -#endif -label_BFC14084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC14084: A2390000 sb $t9, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004584u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA2390000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14088: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004590u; /* jal link before delay slot */ - psx_delay_BFC14088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1408C: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x0000458Cu); -#endif - if (psx_delay_BFC14088) { - psx_delay_BFC14088 = 0; - cpu->gpr[31] = 0x00004590u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC14090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004590u); -#endif - /* 0xBFC14090: 9628000A lhu $t0, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004590u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x9628000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC14094: 3C100000 lui $s0, 0x0 */ - cpu->gpr[16] = 0x00000000u; - PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004594u); -#endif - /* 0xBFC14098: 8E10725C lw $s0, 29276($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004598u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10725Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x00004598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1409C: 35090010 ori $t1, $t0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x10u; - PGXP_ALU(0x35090010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000459Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC140A0: 2414FF7F addiu $s4, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2414FF7Fu, cpu->gpr[20], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000045A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC140A4: A629000A sh $t1, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000045A4u); return; } g_debug_last_store_pc = 0x000045A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA629000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000045A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC140A8: AE140000 sw $s4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045A8u); return; } g_debug_last_store_pc = 0x000045A8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAE140000u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000045A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC140AC: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045ACu); return; } g_debug_last_store_pc = 0x000045ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000045ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045B0u); -#endif - /* 0xBFC140B0: 962A0004 lhu $t2, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000045B0u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000u); } - PGXP_LOAD(0x962A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000045B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC140B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000045B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC140B8: 314B0002 andi $t3, $t2, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u; - PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000045B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC140BC: 15600006 bne $t3, $zero, 0xBFC140D8 */ - uint32_t psx_brA_BFC140BC = cpu->gpr[11]; uint32_t psx_brB_BFC140BC = cpu->gpr[0]; - psx_taken_BFC140BC = (psx_brA_BFC140BC != psx_brB_BFC140BC); - psx_delay_BFC140BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC140C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000045C0u); -#endif - if (psx_delay_BFC140BC) { - psx_delay_BFC140BC = 0; - if (psx_taken_BFC140BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045D8u); - goto label_BFC140D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045C4u); - } -label_BFC140C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000045C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000045C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045C4u); -#endif - /* 0xBFC140C4: 962C0004 lhu $t4, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000045C4u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000u); } - PGXP_LOAD(0x962C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000045C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC140C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000045C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC140CC: 318D0002 andi $t5, $t4, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u; - PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000045CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC140D0: 11A0FFFC beq $t5, $zero, 0xBFC140C4 */ - uint32_t psx_brA_BFC140D0 = cpu->gpr[13]; uint32_t psx_brB_BFC140D0 = cpu->gpr[0]; - psx_taken_BFC140D0 = (psx_brA_BFC140D0 == psx_brB_BFC140D0); - psx_delay_BFC140D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC140D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000045D4u); -#endif - if (psx_delay_BFC140D0) { - psx_delay_BFC140D0 = 0; - if (psx_taken_BFC140D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045C4u); - goto label_BFC140C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045D8u); - } -label_BFC140D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000045D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000045D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045D8u); -#endif - /* 0xBFC140D8: 92200000 lbu $zero, 0($s1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 0, 0x20000u); -#ifdef PSX_COSIM - cosim_instr(0x000045D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC140DC: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x000045E4u; /* jal link before delay slot */ - psx_delay_BFC140DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC140E0: 24040028 addiu $a0, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24040028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x000045E0u); -#endif - if (psx_delay_BFC140DC) { - psx_delay_BFC140DC = 0; - cpu->gpr[31] = 0x000045E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC140E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000045E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000045E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045E4u); -#endif - /* 0xBFC140E4: 8E0E0000 lw $t6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045E4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000045E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC140E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000045E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC140EC: 31CF0080 andi $t7, $t6, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x80u; - PGXP_ALU(0x31CF0080u, cpu->gpr[15], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000045ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC140F0: 15E0000E bne $t7, $zero, 0xBFC1412C */ - uint32_t psx_brA_BFC140F0 = cpu->gpr[15]; uint32_t psx_brB_BFC140F0 = cpu->gpr[0]; - psx_taken_BFC140F0 = (psx_brA_BFC140F0 != psx_brB_BFC140F0); - psx_delay_BFC140F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC140F4: 240A0042 addiu $t2, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x240A0042u, cpu->gpr[10], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0x000045F4u); -#endif - if (psx_delay_BFC140F0) { - psx_delay_BFC140F0 = 0; - if (psx_taken_BFC140F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000462Cu); - goto label_BFC1412C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045F8u); - } -label_BFC140F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000045F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000045F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045F8u); -#endif - /* 0xBFC140F8: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000045F8u); -#endif -label_BFC140FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000045FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000045FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000045FCu); -#endif - /* 0xBFC140FC: 8FB80048 lw $t8, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045FCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80048u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000045FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14100: 28420051 slti $v0, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0x00004600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14104: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC14108: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1410C: 144000D0 bne $v0, $zero, 0xBFC14450 */ - uint32_t psx_brA_BFC1410C = cpu->gpr[2]; uint32_t psx_brB_BFC1410C = cpu->gpr[0]; - psx_taken_BFC1410C = (psx_brA_BFC1410C != psx_brB_BFC1410C); - psx_delay_BFC1410C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC14110: AFB90048 sw $t9, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004610u); return; } g_debug_last_store_pc = 0x00004610u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90048u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004610u); -#endif - if (psx_delay_BFC1410C) { - psx_delay_BFC1410C = 0; - if (psx_taken_BFC1410C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004950u); - goto label_BFC14450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004614u); - } -label_BFC14114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004614u); -#endif - /* 0xBFC14114: 8E080000 lw $t0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004614u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1411C: 31090080 andi $t1, $t0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x80u; - PGXP_ALU(0x31090080u, cpu->gpr[9], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x0000461Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC14120: 1120FFF6 beq $t1, $zero, 0xBFC140FC */ - uint32_t psx_brA_BFC14120 = cpu->gpr[9]; uint32_t psx_brB_BFC14120 = cpu->gpr[0]; - psx_taken_BFC14120 = (psx_brA_BFC14120 == psx_brB_BFC14120); - psx_delay_BFC14120 = 1; - /* 0xBFC14124: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004624u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004624u); -#endif - if (psx_delay_BFC14120) { - psx_delay_BFC14120 = 0; - if (psx_taken_BFC14120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000045FCu); - goto label_BFC140FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004628u); - } -label_BFC14128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14128: 240A0042 addiu $t2, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x240A0042u, cpu->gpr[10], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0x00004628u); -#endif -label_BFC1412C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000462Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC1412C: A22A0000 sb $t2, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000462Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA22A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14130: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004638u; /* jal link before delay slot */ - psx_delay_BFC14130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14134: 24040019 addiu $a0, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24040019u, cpu->gpr[4], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x00004634u); -#endif - if (psx_delay_BFC14130) { - psx_delay_BFC14130 = 0; - cpu->gpr[31] = 0x00004638u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC14138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004638u); -#endif - /* 0xBFC14138: 962B000A lhu $t3, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004638u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000u); } - PGXP_LOAD(0x962B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1413C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000463Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14140: 356C0010 ori $t4, $t3, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] | 0x10u; - PGXP_ALU(0x356C0010u, cpu->gpr[12], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00004640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC14144: A62C000A sh $t4, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004644u); return; } g_debug_last_store_pc = 0x00004644u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA62C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00004644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC14148: AE140000 sw $s4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004648u); return; } g_debug_last_store_pc = 0x00004648u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAE140000u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x00004648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC1414C: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000464Cu); return; } g_debug_last_store_pc = 0x0000464Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004650u); -#endif - /* 0xBFC14150: 962D0004 lhu $t5, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004650u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x962D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14158: 31AE0002 andi $t6, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u; - PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1415C: 15C00006 bne $t6, $zero, 0xBFC14178 */ - uint32_t psx_brA_BFC1415C = cpu->gpr[14]; uint32_t psx_brB_BFC1415C = cpu->gpr[0]; - psx_taken_BFC1415C = (psx_brA_BFC1415C != psx_brB_BFC1415C); - psx_delay_BFC1415C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004660u); -#endif - if (psx_delay_BFC1415C) { - psx_delay_BFC1415C = 0; - if (psx_taken_BFC1415C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004678u); - goto label_BFC14178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004664u); - } -label_BFC14164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004664u); -#endif - /* 0xBFC14164: 962F0004 lhu $t7, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004664u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1416C: 31F80002 andi $t8, $t7, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x2u; - PGXP_ALU(0x31F80002u, cpu->gpr[24], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000466Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14170: 1300FFFC beq $t8, $zero, 0xBFC14164 */ - uint32_t psx_brA_BFC14170 = cpu->gpr[24]; uint32_t psx_brB_BFC14170 = cpu->gpr[0]; - psx_taken_BFC14170 = (psx_brA_BFC14170 == psx_brB_BFC14170); - psx_delay_BFC14170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004674u); -#endif - if (psx_delay_BFC14170) { - psx_delay_BFC14170 = 0; - if (psx_taken_BFC14170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004664u); - goto label_BFC14164; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004678u); - } -label_BFC14178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004678u); -#endif - /* 0xBFC14178: 92220000 lbu $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x92220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1417C: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14180: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14184: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC14188: 3043000F andi $v1, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3043000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00004688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1418C: 0003CE00 sll $t9, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 24u; - PGXP_ALU(0x0003CE00u, cpu->gpr[25], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x0000468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC14190: 00032E00 sll $a1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00032E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC14194: 00194603 sra $t0, $t9, 24 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] >> 24u); - PGXP_ALU(0x00194603u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC14198: A262FFFF sb $v0, -1($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004698u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA262FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1419C: 15000002 bne $t0, $zero, 0xBFC141A8 */ - uint32_t psx_brA_BFC1419C = cpu->gpr[8]; uint32_t psx_brB_BFC1419C = cpu->gpr[0]; - psx_taken_BFC1419C = (psx_brA_BFC1419C != psx_brB_BFC1419C); - psx_delay_BFC1419C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC141A0: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x000046A0u); -#endif - if (psx_delay_BFC1419C) { - psx_delay_BFC1419C = 0; - if (psx_taken_BFC1419C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046A8u); - goto label_BFC141A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046A4u); - } -label_BFC141A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC141A4: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x000046A4u); -#endif -label_BFC141A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046A8u); -#endif - /* 0xBFC141A8: 8E090000 lw $t1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046A8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000046A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC141AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000046ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC141B0: 312A0080 andi $t2, $t1, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x80u; - PGXP_ALU(0x312A0080u, cpu->gpr[10], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000046B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC141B4: 1540000D bne $t2, $zero, 0xBFC141EC */ - uint32_t psx_brA_BFC141B4 = cpu->gpr[10]; uint32_t psx_brB_BFC141B4 = cpu->gpr[0]; - psx_taken_BFC141B4 = (psx_brA_BFC141B4 != psx_brB_BFC141B4); - psx_delay_BFC141B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC141B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000046B8u); -#endif - if (psx_delay_BFC141B4) { - psx_delay_BFC141B4 = 0; - if (psx_taken_BFC141B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046ECu); - goto label_BFC141EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046BCu); - } -label_BFC141BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046BCu); -#endif - /* 0xBFC141BC: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046BCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000046BCu); -#endif -label_BFC141C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046C0u); -#endif - /* 0xBFC141C0: 8FAB0048 lw $t3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046C0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0048u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000046C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC141C4: 28420051 slti $v0, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0x000046C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC141C8: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000046C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC141CC: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000046CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC141D0: 1440009F bne $v0, $zero, 0xBFC14450 */ - uint32_t psx_brA_BFC141D0 = cpu->gpr[2]; uint32_t psx_brB_BFC141D0 = cpu->gpr[0]; - psx_taken_BFC141D0 = (psx_brA_BFC141D0 != psx_brB_BFC141D0); - psx_delay_BFC141D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC141D4: AFAC0048 sw $t4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046D4u); return; } g_debug_last_store_pc = 0x000046D4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0048u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000046D4u); -#endif - if (psx_delay_BFC141D0) { - psx_delay_BFC141D0 = 0; - if (psx_taken_BFC141D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004950u); - goto label_BFC14450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046D8u); - } -label_BFC141D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046D8u); -#endif - /* 0xBFC141D8: 8E0D0000 lw $t5, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046D8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000046D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC141DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000046DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC141E0: 31AE0080 andi $t6, $t5, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x80u; - PGXP_ALU(0x31AE0080u, cpu->gpr[14], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000046E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC141E4: 11C0FFF6 beq $t6, $zero, 0xBFC141C0 */ - uint32_t psx_brA_BFC141E4 = cpu->gpr[14]; uint32_t psx_brB_BFC141E4 = cpu->gpr[0]; - psx_taken_BFC141E4 = (psx_brA_BFC141E4 == psx_brB_BFC141E4); - psx_delay_BFC141E4 = 1; - /* 0xBFC141E8: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000046E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000046E8u); -#endif - if (psx_delay_BFC141E4) { - psx_delay_BFC141E4 = 0; - if (psx_taken_BFC141E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046C0u); - goto label_BFC141C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000046ECu); - } -label_BFC141EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC141EC: A2200000 sb $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000046ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000046ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC141F0: A3A5005C sb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000046F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (92)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA3A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000046F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC141F4: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x000046FCu; /* jal link before delay slot */ - psx_delay_BFC141F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC141F8: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x000046F8u); -#endif - if (psx_delay_BFC141F4) { - psx_delay_BFC141F4 = 0; - cpu->gpr[31] = 0x000046FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC141FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000046FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000046FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000046FCu); -#endif - /* 0xBFC141FC: 962F000A lhu $t7, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000046FCu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000046FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004700u); -#endif - /* 0xBFC14200: 83A5005C lb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (92)), 5, 0x20000000u); - PGXP_LOAD(0x83A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14204: 35F80010 ori $t8, $t7, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x10u; - PGXP_ALU(0x35F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00004704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC14208: A638000A sh $t8, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004708u); return; } g_debug_last_store_pc = 0x00004708u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA638000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC1420C: AE140000 sw $s4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000470Cu); return; } g_debug_last_store_pc = 0x0000470Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAE140000u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x0000470Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC14210: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004710u); return; } g_debug_last_store_pc = 0x00004710u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004710u); -#endif - /* 0xBFC14214: 96390004 lhu $t9, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004714u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x96390004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14218: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1421C: 33280002 andi $t0, $t9, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u; - PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000471Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14220: 15000006 bne $t0, $zero, 0xBFC1423C */ - uint32_t psx_brA_BFC14220 = cpu->gpr[8]; uint32_t psx_brB_BFC14220 = cpu->gpr[0]; - psx_taken_BFC14220 = (psx_brA_BFC14220 != psx_brB_BFC14220); - psx_delay_BFC14220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14224: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004724u); -#endif - if (psx_delay_BFC14220) { - psx_delay_BFC14220 = 0; - if (psx_taken_BFC14220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000473Cu); - goto label_BFC1423C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004728u); - } -label_BFC14228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004728u); -#endif - /* 0xBFC14228: 96290004 lhu $t1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004728u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x96290004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1422C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14230: 312A0002 andi $t2, $t1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u; - PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14234: 1140FFFC beq $t2, $zero, 0xBFC14228 */ - uint32_t psx_brA_BFC14234 = cpu->gpr[10]; uint32_t psx_brB_BFC14234 = cpu->gpr[0]; - psx_taken_BFC14234 = (psx_brA_BFC14234 == psx_brB_BFC14234); - psx_delay_BFC14234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14238: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004738u); -#endif - if (psx_delay_BFC14234) { - psx_delay_BFC14234 = 0; - if (psx_taken_BFC14234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004728u); - goto label_BFC14228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000473Cu); - } -label_BFC1423C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000473Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000473Cu); -#endif - /* 0xBFC1423C: 92220000 lbu $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x92220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14240: 2401005A addiu $at, $zero, 90 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); - PGXP_ALU(0x2401005Au, cpu->gpr[1], _pgx1, 0x0000005Au); } -#ifdef PSX_COSIM - cosim_instr(0x00004740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14244: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14248: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1424C: 14410081 bne $v0, $at, 0xBFC14454 */ - uint32_t psx_brA_BFC1424C = cpu->gpr[2]; uint32_t psx_brB_BFC1424C = cpu->gpr[1]; - psx_taken_BFC1424C = (psx_brA_BFC1424C != psx_brB_BFC1424C); - psx_delay_BFC1424C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004750u); -#endif - /* 0xBFC14250: 8FAE0040 lw $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004750u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004750u); -#endif - if (psx_delay_BFC1424C) { - psx_delay_BFC1424C = 0; - if (psx_taken_BFC1424C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004954u); - goto label_BFC14454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004754u); - } -label_BFC14254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14254: 18A00078 blez $a1, 0xBFC14438 */ - uint32_t psx_brA_BFC14254 = cpu->gpr[5]; - psx_taken_BFC14254 = ((int32_t)psx_brA_BFC14254 <= 0); - psx_delay_BFC14254 = 1; - /* 0xBFC14258: 8FAB0040 lw $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004758u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004758u); -#endif - if (psx_delay_BFC14254) { - psx_delay_BFC14254 = 0; - if (psx_taken_BFC14254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004938u); - goto label_BFC14438; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000475Cu); - } -label_BFC1425C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000475Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000475Cu); -#endif - /* 0xBFC1425C: 8E0B0000 lw $t3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000475Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14260: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14264: 316C0080 andi $t4, $t3, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u; - PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00004764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC14268: 1580000D bne $t4, $zero, 0xBFC142A0 */ - uint32_t psx_brA_BFC14268 = cpu->gpr[12]; uint32_t psx_brB_BFC14268 = cpu->gpr[0]; - psx_taken_BFC14268 = (psx_brA_BFC14268 != psx_brB_BFC14268); - psx_delay_BFC14268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1426C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000476Cu); -#endif - if (psx_delay_BFC14268) { - psx_delay_BFC14268 = 0; - if (psx_taken_BFC14268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047A0u); - goto label_BFC142A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004770u); - } -label_BFC14270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004770u); -#endif - /* 0xBFC14270: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004770u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004770u); -#endif -label_BFC14274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004774u); -#endif - /* 0xBFC14274: 8FAD0048 lw $t5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004774u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0048u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14278: 28420051 slti $v0, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0x00004778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1427C: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000477Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14280: 25AE0001 addiu $t6, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); - PGXP_ALU(0x25AE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14284: 14400072 bne $v0, $zero, 0xBFC14450 */ - uint32_t psx_brA_BFC14284 = cpu->gpr[2]; uint32_t psx_brB_BFC14284 = cpu->gpr[0]; - psx_taken_BFC14284 = (psx_brA_BFC14284 != psx_brB_BFC14284); - psx_delay_BFC14284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC14288: AFAE0048 sw $t6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004788u); return; } g_debug_last_store_pc = 0x00004788u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004788u); -#endif - if (psx_delay_BFC14284) { - psx_delay_BFC14284 = 0; - if (psx_taken_BFC14284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004950u); - goto label_BFC14450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000478Cu); - } -label_BFC1428C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000478Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000478Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000478Cu); -#endif - /* 0xBFC1428C: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000478Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000478Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14294: 31F80080 andi $t8, $t7, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x80u; - PGXP_ALU(0x31F80080u, cpu->gpr[24], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00004794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14298: 1300FFF6 beq $t8, $zero, 0xBFC14274 */ - uint32_t psx_brA_BFC14298 = cpu->gpr[24]; uint32_t psx_brB_BFC14298 = cpu->gpr[0]; - psx_taken_BFC14298 = (psx_brA_BFC14298 == psx_brB_BFC14298); - psx_delay_BFC14298 = 1; - /* 0xBFC1429C: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000479Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000479Cu); -#endif - if (psx_delay_BFC14298) { - psx_delay_BFC14298 = 0; - if (psx_taken_BFC14298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004774u); - goto label_BFC14274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047A0u); - } -label_BFC142A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000047A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000047A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047A0u); -#endif - /* 0xBFC142A0: 82420000 lb $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 2, 0x40000u); - PGXP_LOAD(0x82420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000047A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC142A4: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000047A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC142A8: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000047A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC142AC: 10400002 beq $v0, $zero, 0xBFC142B8 */ - uint32_t psx_brA_BFC142AC = cpu->gpr[2]; uint32_t psx_brB_BFC142AC = cpu->gpr[0]; - psx_taken_BFC142AC = (psx_brA_BFC142AC == psx_brB_BFC142AC); - psx_delay_BFC142AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC142B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000047B0u); -#endif - if (psx_delay_BFC142AC) { - psx_delay_BFC142AC = 0; - if (psx_taken_BFC142AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047B8u); - goto label_BFC142B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047B4u); - } -label_BFC142B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000047B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000047B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200005u); -#endif - /* 0xBFC142B4: 0015102B sltu $v0, $zero, $s5 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0015102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000047B4u); -#endif -label_BFC142B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000047B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000047B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC142B8: A2220000 sb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000047B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000047B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC142BC: A3A5005C sb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000047BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (92)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA3A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000047BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC142C0: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x000047C8u; /* jal link before delay slot */ - psx_delay_BFC142C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC142C4: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x000047C4u); -#endif - if (psx_delay_BFC142C0) { - psx_delay_BFC142C0 = 0; - cpu->gpr[31] = 0x000047C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC142C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000047C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000047C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047C8u); -#endif - /* 0xBFC142C8: 9639000A lhu $t9, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000047C8u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x9639000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000047C8u); -#endif - /* 0xBFC142CC: 83A5005C lb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (92)), 5, 0x20000000u); - PGXP_LOAD(0x83A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000047CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC142D0: 37280010 ori $t0, $t9, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] | 0x10u; - PGXP_ALU(0x37280010u, cpu->gpr[8], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000047D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC142D4: A628000A sh $t0, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000047D4u); return; } g_debug_last_store_pc = 0x000047D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA628000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000047D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC142D8: AE140000 sw $s4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000047D8u); return; } g_debug_last_store_pc = 0x000047D8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAE140000u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000047D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC142DC: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000047DCu); return; } g_debug_last_store_pc = 0x000047DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000047DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047E0u); -#endif - /* 0xBFC142E0: 96290004 lhu $t1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000047E0u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x96290004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000047E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC142E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000047E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC142E8: 312A0002 andi $t2, $t1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u; - PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000047E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC142EC: 15400018 bne $t2, $zero, 0xBFC14350 */ - uint32_t psx_brA_BFC142EC = cpu->gpr[10]; uint32_t psx_brB_BFC142EC = cpu->gpr[0]; - psx_taken_BFC142EC = (psx_brA_BFC142EC != psx_brB_BFC142EC); - psx_delay_BFC142EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC142F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000047F0u); -#endif - if (psx_delay_BFC142EC) { - psx_delay_BFC142EC = 0; - if (psx_taken_BFC142EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004850u); - goto label_BFC14350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047F4u); - } -label_BFC142F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000047F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000047F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000047F4u); -#endif - /* 0xBFC142F4: 8E0B0000 lw $t3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000047F4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000047F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC142F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000047F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC142FC: 316C0080 andi $t4, $t3, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u; - PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000047FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC14300: 1180000E beq $t4, $zero, 0xBFC1433C */ - uint32_t psx_brA_BFC14300 = cpu->gpr[12]; uint32_t psx_brB_BFC14300 = cpu->gpr[0]; - psx_taken_BFC14300 = (psx_brA_BFC14300 == psx_brB_BFC14300); - psx_delay_BFC14300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004804u); -#endif - if (psx_delay_BFC14300) { - psx_delay_BFC14300 = 0; - if (psx_taken_BFC14300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000483Cu); - goto label_BFC1433C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004808u); - } -label_BFC14308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004808u); -#endif - /* 0xBFC14308: 962D0004 lhu $t5, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004808u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x962D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1430C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14310: 31AE0002 andi $t6, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u; - PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14314: 15C00006 bne $t6, $zero, 0xBFC14330 */ - uint32_t psx_brA_BFC14314 = cpu->gpr[14]; uint32_t psx_brB_BFC14314 = cpu->gpr[0]; - psx_taken_BFC14314 = (psx_brA_BFC14314 != psx_brB_BFC14314); - psx_delay_BFC14314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14318: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004818u); -#endif - if (psx_delay_BFC14314) { - psx_delay_BFC14314 = 0; - if (psx_taken_BFC14314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004830u); - goto label_BFC14330; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000481Cu); - } -label_BFC1431C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000481Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000481Cu); -#endif - /* 0xBFC1431C: 962F0004 lhu $t7, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000481Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14324: 31F80002 andi $t8, $t7, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x2u; - PGXP_ALU(0x31F80002u, cpu->gpr[24], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14328: 1300FFFC beq $t8, $zero, 0xBFC1431C */ - uint32_t psx_brA_BFC14328 = cpu->gpr[24]; uint32_t psx_brB_BFC14328 = cpu->gpr[0]; - psx_taken_BFC14328 = (psx_brA_BFC14328 == psx_brB_BFC14328); - psx_delay_BFC14328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1432C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000482Cu); -#endif - if (psx_delay_BFC14328) { - psx_delay_BFC14328 = 0; - if (psx_taken_BFC14328) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000481Cu); - goto label_BFC1431C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004830u); - } -label_BFC14330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004830u); -#endif - /* 0xBFC14330: 92200000 lbu $zero, 0($s1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 0, 0x20000u); -#ifdef PSX_COSIM - cosim_instr(0x00004830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14334: 10000047 beq $zero, $zero, 0xBFC14454 */ - uint32_t psx_brA_BFC14334 = cpu->gpr[0]; uint32_t psx_brB_BFC14334 = cpu->gpr[0]; - psx_taken_BFC14334 = (psx_brA_BFC14334 == psx_brB_BFC14334); - psx_delay_BFC14334 = 1; - /* 0xBFC14338: 8FAE0040 lw $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004838u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004838u); -#endif - if (psx_delay_BFC14334) { - psx_delay_BFC14334 = 0; - if (psx_taken_BFC14334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004954u); - goto label_BFC14454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000483Cu); - } -label_BFC1433C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000483Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000483Cu); -#endif - /* 0xBFC1433C: 96390004 lhu $t9, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000483Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x96390004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC14344: 33280002 andi $t0, $t9, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u; - PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14348: 1100FFEA beq $t0, $zero, 0xBFC142F4 */ - uint32_t psx_brA_BFC14348 = cpu->gpr[8]; uint32_t psx_brB_BFC14348 = cpu->gpr[0]; - psx_taken_BFC14348 = (psx_brA_BFC14348 == psx_brB_BFC14348); - psx_delay_BFC14348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1434C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000484Cu); -#endif - if (psx_delay_BFC14348) { - psx_delay_BFC14348 = 0; - if (psx_taken_BFC14348) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000047F4u); - goto label_BFC142F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004850u); - } -label_BFC14350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004850u); -#endif - /* 0xBFC14350: 92220000 lbu $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x92220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC14354: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14358: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1435C: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x0000485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC14360: A262FFFF sb $v0, -1($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004860u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA262FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004860u); -#endif - /* 0xBFC14364: 8E090000 lw $t1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004864u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1436C: 312A0080 andi $t2, $t1, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x80u; - PGXP_ALU(0x312A0080u, cpu->gpr[10], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x0000486Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14370: 1540000D bne $t2, $zero, 0xBFC143A8 */ - uint32_t psx_brA_BFC14370 = cpu->gpr[10]; uint32_t psx_brB_BFC14370 = cpu->gpr[0]; - psx_taken_BFC14370 = (psx_brA_BFC14370 != psx_brB_BFC14370); - psx_delay_BFC14370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14374: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004874u); -#endif - if (psx_delay_BFC14370) { - psx_delay_BFC14370 = 0; - if (psx_taken_BFC14370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048A8u); - goto label_BFC143A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004878u); - } -label_BFC14378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004878u); -#endif - /* 0xBFC14378: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004878u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004878u); -#endif -label_BFC1437C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000487Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000487Cu); -#endif - /* 0xBFC1437C: 8FAB0048 lw $t3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000487Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0048u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14380: 28420051 slti $v0, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28420051u, cpu->gpr[2], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0x00004880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14384: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14388: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1438C: 14400030 bne $v0, $zero, 0xBFC14450 */ - uint32_t psx_brA_BFC1438C = cpu->gpr[2]; uint32_t psx_brB_BFC1438C = cpu->gpr[0]; - psx_taken_BFC1438C = (psx_brA_BFC1438C != psx_brB_BFC1438C); - psx_delay_BFC1438C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC14390: AFAC0048 sw $t4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004890u); return; } g_debug_last_store_pc = 0x00004890u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0048u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00004890u); -#endif - if (psx_delay_BFC1438C) { - psx_delay_BFC1438C = 0; - if (psx_taken_BFC1438C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004950u); - goto label_BFC14450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004894u); - } -label_BFC14394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004894u); -#endif - /* 0xBFC14394: 8E0D0000 lw $t5, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004894u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1439C: 31AE0080 andi $t6, $t5, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x80u; - PGXP_ALU(0x31AE0080u, cpu->gpr[14], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x0000489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC143A0: 11C0FFF6 beq $t6, $zero, 0xBFC1437C */ - uint32_t psx_brA_BFC143A0 = cpu->gpr[14]; uint32_t psx_brB_BFC143A0 = cpu->gpr[0]; - psx_taken_BFC143A0 = (psx_brA_BFC143A0 == psx_brB_BFC143A0); - psx_delay_BFC143A0 = 1; - /* 0xBFC143A4: 8FA20048 lw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000048A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000048A4u); -#endif - if (psx_delay_BFC143A0) { - psx_delay_BFC143A0 = 0; - if (psx_taken_BFC143A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000487Cu); - goto label_BFC1437C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048A8u); - } -label_BFC143A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000048A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000048A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048A8u); -#endif - /* 0xBFC143A8: 82420000 lb $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (0)), 2, 0x40000u); - PGXP_LOAD(0x82420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000048A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC143AC: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000048ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC143B0: 0002102B sltu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0002102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000048B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC143B4: 10400002 beq $v0, $zero, 0xBFC143C0 */ - uint32_t psx_brA_BFC143B4 = cpu->gpr[2]; uint32_t psx_brB_BFC143B4 = cpu->gpr[0]; - psx_taken_BFC143B4 = (psx_brA_BFC143B4 == psx_brB_BFC143B4); - psx_delay_BFC143B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC143B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000048B8u); -#endif - if (psx_delay_BFC143B4) { - psx_delay_BFC143B4 = 0; - if (psx_taken_BFC143B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048C0u); - goto label_BFC143C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048BCu); - } -label_BFC143BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000048BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000048BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200005u); -#endif - /* 0xBFC143BC: 0015102B sltu $v0, $zero, $s5 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[0] < cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x0015102Bu, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000048BCu); -#endif -label_BFC143C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000048C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000048C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC143C0: A2220000 sb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000048C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000048C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC143C4: A3A5005C sb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000048C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (92)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA3A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000048C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC143C8: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x000048D0u; /* jal link before delay slot */ - psx_delay_BFC143C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC143CC: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x000048CCu); -#endif - if (psx_delay_BFC143C8) { - psx_delay_BFC143C8 = 0; - cpu->gpr[31] = 0x000048D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC143D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000048D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000048D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048D0u); -#endif - /* 0xBFC143D0: 962F000A lhu $t7, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000048D0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000048D0u); -#endif - /* 0xBFC143D4: 83A5005C lb $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (92)), 5, 0x20000000u); - PGXP_LOAD(0x83A5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000048D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC143D8: 35F80010 ori $t8, $t7, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x10u; - PGXP_ALU(0x35F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000048D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC143DC: A638000A sh $t8, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000048DCu); return; } g_debug_last_store_pc = 0x000048DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA638000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000048DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC143E0: AE140000 sw $s4, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000048E0u); return; } g_debug_last_store_pc = 0x000048E0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAE140000u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000048E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC143E4: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000048E4u); return; } g_debug_last_store_pc = 0x000048E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000048E4u); -#endif - /* 0xBFC143E8: 96390004 lhu $t9, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000048E8u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x96390004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000048E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC143EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000048ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC143F0: 33280002 andi $t0, $t9, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x2u; - PGXP_ALU(0x33280002u, cpu->gpr[8], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x000048F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC143F4: 15000006 bne $t0, $zero, 0xBFC14410 */ - uint32_t psx_brA_BFC143F4 = cpu->gpr[8]; uint32_t psx_brB_BFC143F4 = cpu->gpr[0]; - psx_taken_BFC143F4 = (psx_brA_BFC143F4 != psx_brB_BFC143F4); - psx_delay_BFC143F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC143F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000048F8u); -#endif - if (psx_delay_BFC143F4) { - psx_delay_BFC143F4 = 0; - if (psx_taken_BFC143F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004910u); - goto label_BFC14410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048FCu); - } -label_BFC143FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000048FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000048FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000048FCu); -#endif - /* 0xBFC143FC: 96290004 lhu $t1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000048FCu); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x96290004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000048FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14400: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14404: 312A0002 andi $t2, $t1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x2u; - PGXP_ALU(0x312A0002u, cpu->gpr[10], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14408: 1140FFFC beq $t2, $zero, 0xBFC143FC */ - uint32_t psx_brA_BFC14408 = cpu->gpr[10]; uint32_t psx_brB_BFC14408 = cpu->gpr[0]; - psx_taken_BFC14408 = (psx_brA_BFC14408 == psx_brB_BFC14408); - psx_delay_BFC14408 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1440C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000490Cu); -#endif - if (psx_delay_BFC14408) { - psx_delay_BFC14408 = 0; - if (psx_taken_BFC14408) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000048FCu); - goto label_BFC143FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004910u); - } -label_BFC14410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004910u); -#endif - /* 0xBFC14410: 92220000 lbu $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x92220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14414: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14418: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1441C: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x0000491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14420: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14424: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00004924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC14428: A2620000 sb $v0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004928u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1442C: 1CA0FF8B bgtz $a1, 0xBFC1425C */ - uint32_t psx_brA_BFC1442C = cpu->gpr[5]; - psx_taken_BFC1442C = ((int32_t)psx_brA_BFC1442C > 0); - psx_delay_BFC1442C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC14430: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004930u); -#endif - if (psx_delay_BFC1442C) { - psx_delay_BFC1442C = 0; - if (psx_taken_BFC1442C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000475Cu); - goto label_BFC1425C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004934u); - } -label_BFC14434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004934u); -#endif - /* 0xBFC14434: 8FAB0040 lw $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004934u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004934u); -#endif -label_BFC14438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14438: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004938u); -#endif - /* 0xBFC1443C: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000493Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14440: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC14444: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004944u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14448: 10000013 beq $zero, $zero, 0xBFC14498 */ - uint32_t psx_brA_BFC14448 = cpu->gpr[0]; uint32_t psx_brB_BFC14448 = cpu->gpr[0]; - psx_taken_BFC14448 = (psx_brA_BFC14448 == psx_brB_BFC14448); - psx_delay_BFC14448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1444C: A620000A sh $zero, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000494Cu); return; } g_debug_last_store_pc = 0x0000494Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA620000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000494Cu); -#endif - if (psx_delay_BFC14448) { - psx_delay_BFC14448 = 0; - if (psx_taken_BFC14448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004998u); - goto label_BFC14498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004950u); - } -label_BFC14450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004950u); -#endif - /* 0xBFC14450: 8FAE0040 lw $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004950u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004950u); -#endif -label_BFC14454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC14454: 240D00FF addiu $t5, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240D00FFu, cpu->gpr[13], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004954u); -#endif - /* 0xBFC14458: 8DCF0000 lw $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004958u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1445C: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000495Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC14460: A1ED0000 sb $t5, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004960u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA1ED0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004960u); -#endif -label_BFC14464: - /* 0xBFC14464: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004964u); - cpu->pc = 0x00004964u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004964u); -#endif - /* 0xBFC14464: 8FB8003C lw $t8, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004964u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8003Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004964u); -#endif -label_BFC14468: - /* 0xBFC14468: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004968u); - cpu->pc = 0x00004968u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC14468: 273974D0 addiu $t9, $t9, 29904 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (29904)); - PGXP_ALU(0x273974D0u, cpu->gpr[25], _pgx1, 0x000074D0u); } -#ifdef PSX_COSIM - cosim_instr(0x00004968u); -#endif -label_BFC1446C: - /* 0xBFC1446C: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000496Cu); - cpu->pc = 0x0000496Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000496Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1446C: 13190005 beq $t8, $t9, 0xBFC14484 */ - uint32_t psx_brA_BFC1446C = cpu->gpr[24]; uint32_t psx_brB_BFC1446C = cpu->gpr[25]; - psx_taken_BFC1446C = (psx_brA_BFC1446C == psx_brB_BFC1446C); - psx_delay_BFC1446C = 1; -label_BFC14470: - /* 0xBFC14470: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (!psx_delay_BFC1446C && (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au)) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004970u); - cpu->pc = 0x00004970u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC14470: 24092002 addiu $t1, $zero, 8194 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (8194)); - PGXP_ALU(0x24092002u, cpu->gpr[9], _pgx1, 0x00002002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004970u); -#endif - if (psx_delay_BFC1446C) { - psx_delay_BFC1446C = 0; - if (psx_taken_BFC1446C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004984u); - goto label_BFC14484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004974u); - } -label_BFC14474: - /* 0xBFC14474: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004974u); - cpu->pc = 0x00004974u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14474: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004974u); -#endif -label_BFC14478: - /* 0xBFC14478: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004978u); - cpu->pc = 0x00004978u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14478: 10000003 beq $zero, $zero, 0xBFC14488 */ - uint32_t psx_brA_BFC14478 = cpu->gpr[0]; uint32_t psx_brB_BFC14478 = cpu->gpr[0]; - psx_taken_BFC14478 = (psx_brA_BFC14478 == psx_brB_BFC14478); - psx_delay_BFC14478 = 1; -label_BFC1447C: - /* 0xBFC1447C: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (!psx_delay_BFC14478 && (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au)) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000497Cu); - cpu->pc = 0x0000497Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000497Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC1447C: A628000A sh $t0, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000497Cu); return; } g_debug_last_store_pc = 0x0000497Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA628000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000497Cu); -#endif - if (psx_delay_BFC14478) { - psx_delay_BFC14478 = 0; - if (psx_taken_BFC14478) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004988u); - goto label_BFC14488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004980u); - } -label_BFC14480: - /* 0xBFC14480: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004980u); - cpu->pc = 0x00004980u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC14480: 24092002 addiu $t1, $zero, 8194 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (8194)); - PGXP_ALU(0x24092002u, cpu->gpr[9], _pgx1, 0x00002002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004980u); -#endif -label_BFC14484: - /* 0xBFC14484: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004984u); - cpu->pc = 0x00004984u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC14484: A629000A sh $t1, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004984u); return; } g_debug_last_store_pc = 0x00004984u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA629000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004984u); -#endif -label_BFC14488: - /* 0xBFC14488: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004988u); - cpu->pc = 0x00004988u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14488: 0C001117 jal 0xB000445C */ - cpu->gpr[31] = 0x00004990u; /* jal link before delay slot */ - psx_delay_BFC14488 = 1; -label_BFC1448C: - /* 0xBFC1448C: kernel patch-range hook (RAM [0x00004964,0x00004990), - * resume RAM 0x00004990). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (!psx_delay_BFC14488 && (cpu->read_word(0x00004964u) != 0x8FB8003Cu || - cpu->read_word(0x00004968u) != 0x273974D0u || - cpu->read_word(0x0000496Cu) != 0x13190005u || - cpu->read_word(0x00004970u) != 0x24092002u || - cpu->read_word(0x00004974u) != 0x24080002u || - cpu->read_word(0x00004978u) != 0x10000003u || - cpu->read_word(0x0000497Cu) != 0xA628000Au || - cpu->read_word(0x00004980u) != 0x24092002u || - cpu->read_word(0x00004984u) != 0xA629000Au || - cpu->read_word(0x00004988u) != 0x0C001117u || - cpu->read_word(0x0000498Cu) != 0x2404000Au)) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000498Cu); - cpu->pc = 0x0000498Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000498Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1448C: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000498Cu); -#endif - if (psx_delay_BFC14488) { - psx_delay_BFC14488 = 0; - cpu->gpr[31] = 0x00004990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000445Cu); - cpu->pc = 0x0000445Cu; return; - } -label_BFC14490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC14490: A620000A sh $zero, 10($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004990u); return; } g_debug_last_store_pc = 0x00004990u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA620000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14494: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004994u); -#endif -label_BFC14498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004998u); -#endif - /* 0xBFC14498: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004998u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004998u); -#endif - /* 0xBFC1449C: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000499Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x0000499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049A0u); -#endif - /* 0xBFC144A0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049A0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x000049A0u); -#endif - /* 0xBFC144A4: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049A4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x000049A4u); -#endif - /* 0xBFC144A8: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049A8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x000049A8u); -#endif - /* 0xBFC144AC: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049ACu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x000049ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049B0u); -#endif - /* 0xBFC144B0: 8FB50030 lw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049B0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x000049B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC144B4: 03E00008 jr $ra */ - psx_delay_BFC144B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC144B8: 27BD0068 addiu $sp, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27BD0068u, cpu->gpr[29], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x000049B8u); -#endif - if (psx_delay_BFC144B4) { - psx_delay_BFC144B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000049BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000049BCu); - int psx_delay_BFC144C8 = 0; - int psx_taken_BFC144C8 = 0; - int psx_delay_BFC144D0 = 0; - int psx_delay_BFC144D8 = 0; - int psx_delay_BFC144EC = 0; - int psx_taken_BFC144EC = 0; - int psx_delay_BFC144F4 = 0; - int psx_delay_BFC14508 = 0; - int psx_taken_BFC14508 = 0; - int psx_delay_BFC1452C = 0; - int psx_taken_BFC1452C = 0; - int psx_delay_BFC14534 = 0; - int psx_delay_BFC14544 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC144D0u: goto label_BFC144D0; - case 0xBFC144D8u: goto label_BFC144D8; - case 0xBFC144E0u: goto label_BFC144E0; - case 0xBFC144F4u: goto label_BFC144F4; - case 0xBFC144FCu: goto label_BFC144FC; - case 0xBFC14510u: goto label_BFC14510; - case 0xBFC14520u: goto label_BFC14520; - case 0xBFC14534u: goto label_BFC14534; - case 0xBFC1453Cu: goto label_BFC1453C; - case 0xBFC14540u: goto label_BFC14540; - default: break; - } - } -label_BFC144BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC144BC: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000049BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049C0u); -#endif - /* 0xBFC144C0: 8DCE74B8 lw $t6, 29880($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049C0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE74B8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000049C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC144C4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000049C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC144C8: 11C0000C beq $t6, $zero, 0xBFC144FC */ - uint32_t psx_brA_BFC144C8 = cpu->gpr[14]; uint32_t psx_brB_BFC144C8 = cpu->gpr[0]; - psx_taken_BFC144C8 = (psx_brA_BFC144C8 == psx_brB_BFC144C8); - psx_delay_BFC144C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC144CC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049CCu); return; } g_debug_last_store_pc = 0x000049CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000049CCu); -#endif - if (psx_delay_BFC144C8) { - psx_delay_BFC144C8 = 0; - if (psx_taken_BFC144C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000049FCu); - goto label_BFC144FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000049D0u); - } -label_BFC144D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC144D0: 0C001126 jal 0xB0004498 */ - cpu->gpr[31] = 0x000049D8u; /* jal link before delay slot */ - psx_delay_BFC144D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC144D4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000049D4u); -#endif - if (psx_delay_BFC144D0) { - psx_delay_BFC144D0 = 0; - cpu->gpr[31] = 0x000049D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004498u); - cpu->pc = 0x00004498u; return; - } -label_BFC144D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC144D8: 0C001126 jal 0xB0004498 */ - cpu->gpr[31] = 0x000049E0u; /* jal link before delay slot */ - psx_delay_BFC144D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC144DC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000049DCu); -#endif - if (psx_delay_BFC144D8) { - psx_delay_BFC144D8 = 0; - cpu->gpr[31] = 0x000049E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004498u); - cpu->pc = 0x00004498u; return; - } -label_BFC144E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC144E0: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000049E0u); -#endif - /* 0xBFC144E4: 8DEF74C4 lw $t7, 29892($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000049E4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF74C4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000049E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC144E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000049E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC144EC: 11E00003 beq $t7, $zero, 0xBFC144FC */ - uint32_t psx_brA_BFC144EC = cpu->gpr[15]; uint32_t psx_brB_BFC144EC = cpu->gpr[0]; - psx_taken_BFC144EC = (psx_brA_BFC144EC == psx_brB_BFC144EC); - psx_delay_BFC144EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC144F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000049F0u); -#endif - if (psx_delay_BFC144EC) { - psx_delay_BFC144EC = 0; - if (psx_taken_BFC144EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000049FCu); - goto label_BFC144FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000049F4u); - } -label_BFC144F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC144F4: 0C001871 jal 0xB00061C4 */ - cpu->gpr[31] = 0x000049FCu; /* jal link before delay slot */ - psx_delay_BFC144F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC144F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000049F8u); -#endif - if (psx_delay_BFC144F4) { - psx_delay_BFC144F4 = 0; - cpu->gpr[31] = 0x000049FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061C4u); - cpu->pc = 0x000061C4u; return; - } -label_BFC144FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000049FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000049FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000049FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC144FC: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000049FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A00u); -#endif - /* 0xBFC14500: 8F188914 lw $t8, -30444($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -30444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-30444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A00u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F188914u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14508: 13000005 beq $t8, $zero, 0xBFC14520 */ - uint32_t psx_brA_BFC14508 = cpu->gpr[24]; uint32_t psx_brB_BFC14508 = cpu->gpr[0]; - psx_taken_BFC14508 = (psx_brA_BFC14508 == psx_brB_BFC14508); - psx_delay_BFC14508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1450C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A0Cu); -#endif - if (psx_delay_BFC14508) { - psx_delay_BFC14508 = 0; - if (psx_taken_BFC14508) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A20u); - goto label_BFC14520; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A10u); - } -label_BFC14510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC14510: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004A10u); -#endif - /* 0xBFC14514: 8D08725C lw $t0, 29276($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A14u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08725Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14518: 2419FFFE addiu $t9, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2419FFFEu, cpu->gpr[25], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x00004A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1451C: AD190000 sw $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A1Cu); return; } g_debug_last_store_pc = 0x00004A1Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A1Cu); -#endif -label_BFC14520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC14520: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004A20u); -#endif - /* 0xBFC14524: 8D2974BC lw $t1, 29884($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A24u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2974BCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1452C: 11200004 beq $t1, $zero, 0xBFC14540 */ - uint32_t psx_brA_BFC1452C = cpu->gpr[9]; uint32_t psx_brB_BFC1452C = cpu->gpr[0]; - psx_taken_BFC1452C = (psx_brA_BFC1452C == psx_brB_BFC1452C); - psx_delay_BFC1452C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A30u); -#endif - /* 0xBFC14530: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A30u); -#endif - if (psx_delay_BFC1452C) { - psx_delay_BFC1452C = 0; - if (psx_taken_BFC1452C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A40u); - goto label_BFC14540; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A34u); - } -label_BFC14534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14534: 0C001400 jal 0xB0005000 */ - cpu->gpr[31] = 0x00004A3Cu; /* jal link before delay slot */ - psx_delay_BFC14534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A38u); -#endif - if (psx_delay_BFC14534) { - psx_delay_BFC14534 = 0; - cpu->gpr[31] = 0x00004A3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005000u); - cpu->pc = 0x00005000u; return; - } -label_BFC1453C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A3Cu); -#endif - /* 0xBFC1453C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A3Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A3Cu); -#endif -label_BFC14540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14540: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14544: 03E00008 jr $ra */ - psx_delay_BFC14544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14548: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004A48u); -#endif - if (psx_delay_BFC14544) { - psx_delay_BFC14544 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004A4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004A4Cu); - int psx_delay_BFC14564 = 0; - int psx_taken_BFC14564 = 0; - int psx_delay_BFC14578 = 0; - int psx_taken_BFC14578 = 0; - int psx_delay_BFC14580 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1456Cu: goto label_BFC1456C; - case 0xBFC14580u: goto label_BFC14580; - default: break; - } - } -label_BFC1454C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1454C: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A50u); -#endif - /* 0xBFC14550: 8C42725C lw $v0, 29276($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42725Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A54u); -#endif - /* 0xBFC14558: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A58u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1455C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14560: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14564: 11E00006 beq $t7, $zero, 0xBFC14580 */ - uint32_t psx_brA_BFC14564 = cpu->gpr[15]; uint32_t psx_brB_BFC14564 = cpu->gpr[0]; - psx_taken_BFC14564 = (psx_brA_BFC14564 == psx_brB_BFC14564); - psx_delay_BFC14564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14568: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A68u); -#endif - if (psx_delay_BFC14564) { - psx_delay_BFC14564 = 0; - if (psx_taken_BFC14564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A80u); - goto label_BFC14580; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A6Cu); - } -label_BFC1456C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A6Cu); -#endif - /* 0xBFC1456C: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004A6Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14570: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC14574: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14578: 17200004 bne $t9, $zero, 0xBFC1458C */ - uint32_t psx_brA_BFC14578 = cpu->gpr[25]; uint32_t psx_brB_BFC14578 = cpu->gpr[0]; - psx_taken_BFC14578 = (psx_brA_BFC14578 != psx_brB_BFC14578); - psx_delay_BFC14578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1457C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004A7Cu); -#endif - if (psx_delay_BFC14578) { - psx_delay_BFC14578 = 0; - if (psx_taken_BFC14578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A8Cu); - cpu->pc = 0x00004A8Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A80u); - } -label_BFC14580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14580: 03E00008 jr $ra */ - psx_delay_BFC14580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14584: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004A84u); -#endif - if (psx_delay_BFC14580) { - psx_delay_BFC14580 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004A88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004A88u); - int psx_delay_BFC1458C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1458Cu: goto label_BFC1458C; - default: break; - } - } -label_BFC14588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14588: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004A88u); -#endif -label_BFC1458C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1458C: 03E00008 jr $ra */ - psx_delay_BFC1458C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004A90u); -#endif - if (psx_delay_BFC1458C) { - psx_delay_BFC1458C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004A94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004A94u); - int psx_delay_BFC145C0 = 0; -label_BFC14594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC14594: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC14598: 25CE49BC addiu $t6, $t6, 18876 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (18876)); - PGXP_ALU(0x25CE49BCu, cpu->gpr[14], _pgx1, 0x000049BCu); } -#ifdef PSX_COSIM - cosim_instr(0x00004A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1459C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC145A0: AC2E74AC sw $t6, 29868($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29868; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AA0u); return; } g_debug_last_store_pc = 0x00004AA0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E74ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC145A4: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC145A8: 25EF4A4C addiu $t7, $t7, 19020 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (19020)); - PGXP_ALU(0x25EF4A4Cu, cpu->gpr[15], _pgx1, 0x00004A4Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00004AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC145AC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC145B0: AC2F74B0 sw $t7, 29872($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29872; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AB0u); return; } g_debug_last_store_pc = 0x00004AB0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F74B0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC145B4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC145B8: AC2074A8 sw $zero, 29864($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29864; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AB8u); return; } g_debug_last_store_pc = 0x00004AB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC145BC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC145C0: 03E00008 jr $ra */ - psx_delay_BFC145C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC145C4: AC2074B4 sw $zero, 29876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AC4u); return; } g_debug_last_store_pc = 0x00004AC4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074B4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AC4u); -#endif - if (psx_delay_BFC145C0) { - psx_delay_BFC145C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004AC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004AC8u); - int psx_delay_BFC145EC = 0; - int psx_delay_BFC145F8 = 0; - int psx_delay_BFC1460C = 0; - int psx_delay_BFC14638 = 0; - int psx_delay_BFC14648 = 0; - int psx_delay_BFC14650 = 0; - int psx_delay_BFC14658 = 0; - int psx_delay_BFC14668 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC145F4u: goto label_BFC145F4; - case 0xBFC14600u: goto label_BFC14600; - case 0xBFC14614u: goto label_BFC14614; - case 0xBFC14640u: goto label_BFC14640; - case 0xBFC14650u: goto label_BFC14650; - case 0xBFC14658u: goto label_BFC14658; - case 0xBFC14660u: goto label_BFC14660; - default: break; - } - } -label_BFC145C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC145C8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00004AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC145CC: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004ACCu); return; } g_debug_last_store_pc = 0x00004ACCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC145D0: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AD0u); return; } g_debug_last_store_pc = 0x00004AD0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC145D4: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC145D8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AD8u); return; } g_debug_last_store_pc = 0x00004AD8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AD8u); -#endif - /* 0xBFC145DC: 8CA57230 lw $a1, 29232($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 29232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (29232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004ADCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA57230u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC145E0: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC145E4: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AE4u); return; } g_debug_last_store_pc = 0x00004AE4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC145E8: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AE8u); return; } g_debug_last_store_pc = 0x00004AE8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC145EC: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x00004AF4u; /* jal link before delay slot */ - psx_delay_BFC145EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC145F0: 24847260 addiu $a0, $a0, 29280 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (29280)); - PGXP_ALU(0x24847260u, cpu->gpr[4], _pgx1, 0x00007260u); } -#ifdef PSX_COSIM - cosim_instr(0x00004AF0u); -#endif - if (psx_delay_BFC145EC) { - psx_delay_BFC145EC = 0; - cpu->gpr[31] = 0x00004AF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC145F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC145F4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC145F8: 0C001319 jal 0xB0004C64 */ - cpu->gpr[31] = 0x00004B00u; /* jal link before delay slot */ - psx_delay_BFC145F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC145FC: AC2074C4 sw $zero, 29892($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004AFCu); return; } g_debug_last_store_pc = 0x00004AFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004AFCu); -#endif - if (psx_delay_BFC145F8) { - psx_delay_BFC145F8 = 0; - cpu->gpr[31] = 0x00004B00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004C64u); - cpu->pc = 0x00004C64u; return; - } -label_BFC14600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14600: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14604: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC14608: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1460C: 0C0012DC jal 0xB0004B70 */ - cpu->gpr[31] = 0x00004B14u; /* jal link before delay slot */ - psx_delay_BFC1460C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC14610: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004B10u); -#endif - if (psx_delay_BFC1460C) { - psx_delay_BFC1460C = 0; - cpu->gpr[31] = 0x00004B14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004B70u); - cpu->pc = 0x00004B70u; return; - } -label_BFC14614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B14u); -#endif - /* 0xBFC14614: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B14u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B14u); -#endif - /* 0xBFC14618: 8FAE0028 lw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B18u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1461C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B20u); -#endif - /* 0xBFC14620: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B20u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B20u); -#endif - /* 0xBFC14624: 8FAF002C lw $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B24u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC14628: AC2474C8 sw $a0, 29896($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B28u); return; } g_debug_last_store_pc = 0x00004B28u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC2474C8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1462C: AC2E74CC sw $t6, 29900($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B2Cu); return; } g_debug_last_store_pc = 0x00004B2Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E74CCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14630: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC14634: AC2574D8 sw $a1, 29912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B34u); return; } g_debug_last_store_pc = 0x00004B34u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC2574D8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14638: 0C000854 jal 0xB0002150 */ - cpu->gpr[31] = 0x00004B40u; /* jal link before delay slot */ - psx_delay_BFC14638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1463C: AC2F74DC sw $t7, 29916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B3Cu); return; } g_debug_last_store_pc = 0x00004B3Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F74DCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B3Cu); -#endif - if (psx_delay_BFC14638) { - psx_delay_BFC14638 = 0; - cpu->gpr[31] = 0x00004B40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002150u); - cpu->pc = 0x00002150u; return; - } -label_BFC14640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B40u); -#endif - /* 0xBFC14640: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B40u); -#endif - /* 0xBFC14644: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B44u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14648: 0C000854 jal 0xB0002150 */ - cpu->gpr[31] = 0x00004B50u; /* jal link before delay slot */ - psx_delay_BFC14648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1464C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004B4Cu); -#endif - if (psx_delay_BFC14648) { - psx_delay_BFC14648 = 0; - cpu->gpr[31] = 0x00004B50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002150u); - cpu->pc = 0x00002150u; return; - } -label_BFC14650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14650: 0C0012A5 jal 0xB0004A94 */ - cpu->gpr[31] = 0x00004B58u; /* jal link before delay slot */ - psx_delay_BFC14650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004B54u); -#endif - if (psx_delay_BFC14650) { - psx_delay_BFC14650 = 0; - cpu->gpr[31] = 0x00004B58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A94u); - cpu->pc = 0x00004A94u; return; - } -label_BFC14658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14658: 0C001315 jal 0xB0004C54 */ - cpu->gpr[31] = 0x00004B60u; /* jal link before delay slot */ - psx_delay_BFC14658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1465C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004B5Cu); -#endif - if (psx_delay_BFC14658) { - psx_delay_BFC14658 = 0; - cpu->gpr[31] = 0x00004B60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004C54u); - cpu->pc = 0x00004C54u; return; - } -label_BFC14660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B60u); -#endif - /* 0xBFC14660: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14664: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00004B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14668: 03E00008 jr $ra */ - psx_delay_BFC14668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1466C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004B6Cu); -#endif - if (psx_delay_BFC14668) { - psx_delay_BFC14668 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004B70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004B70u); - int psx_delay_BFC14688 = 0; -label_BFC14670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14670: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC14674: AC2474D0 sw $a0, 29904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B74u); return; } g_debug_last_store_pc = 0x00004B74u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC2474D0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC14678: AC2674D4 sw $a2, 29908($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29908; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B78u); return; } g_debug_last_store_pc = 0x00004B78u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC2674D4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1467C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC14680: AC2574E0 sw $a1, 29920($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B80u); return; } g_debug_last_store_pc = 0x00004B80u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC2574E0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC14684: AC2774E4 sw $a3, 29924($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B84u); return; } g_debug_last_store_pc = 0x00004B84u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC2774E4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14688: 03E00008 jr $ra */ - psx_delay_BFC14688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1468C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004B8Cu); -#endif - if (psx_delay_BFC14688) { - psx_delay_BFC14688 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004B90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004B90u); - int psx_delay_BFC14698 = 0; - int psx_delay_BFC146A0 = 0; - int psx_delay_BFC146B0 = 0; - int psx_delay_BFC146C0 = 0; - int psx_delay_BFC146E4 = 0; - int psx_delay_BFC146F0 = 0; - int psx_delay_BFC146F8 = 0; - int psx_delay_BFC14708 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC146A0u: goto label_BFC146A0; - case 0xBFC146A8u: goto label_BFC146A8; - case 0xBFC146B8u: goto label_BFC146B8; - case 0xBFC146C8u: goto label_BFC146C8; - case 0xBFC146ECu: goto label_BFC146EC; - case 0xBFC146F8u: goto label_BFC146F8; - case 0xBFC14700u: goto label_BFC14700; - default: break; - } - } -label_BFC14690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14690: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14694: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004B94u); return; } g_debug_last_store_pc = 0x00004B94u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14698: 0C0010FA jal 0xB00043E8 */ - cpu->gpr[31] = 0x00004BA0u; /* jal link before delay slot */ - psx_delay_BFC14698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1469C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004B9Cu); -#endif - if (psx_delay_BFC14698) { - psx_delay_BFC14698 = 0; - cpu->gpr[31] = 0x00004BA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000043E8u); - cpu->pc = 0x000043E8u; return; - } -label_BFC146A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146A0: 0C001AE0 jal 0xB0006B80 */ - cpu->gpr[31] = 0x00004BA8u; /* jal link before delay slot */ - psx_delay_BFC146A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC146A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004BA4u); -#endif - if (psx_delay_BFC146A0) { - psx_delay_BFC146A0 = 0; - cpu->gpr[31] = 0x00004BA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B80u); - cpu->pc = 0x00006B80u; return; - } -label_BFC146A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC146A8: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC146AC: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146B0: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004BB8u; /* jal link before delay slot */ - psx_delay_BFC146B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC146B4: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BB4u); -#endif - if (psx_delay_BFC146B0) { - psx_delay_BFC146B0 = 0; - cpu->gpr[31] = 0x00004BB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC146B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC146B8: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC146BC: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146C0: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x00004BC8u; /* jal link before delay slot */ - psx_delay_BFC146C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC146C4: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BC4u); -#endif - if (psx_delay_BFC146C0) { - psx_delay_BFC146C0 = 0; - cpu->gpr[31] = 0x00004BC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC146C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC146C8: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004BC8u); -#endif - /* 0xBFC146CC: 8C42725C lw $v0, 29276($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004BCCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42725Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC146D0: 240EFFFE addiu $t6, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240EFFFEu, cpu->gpr[14], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x00004BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC146D4: AC4E0000 sw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004BD4u); return; } g_debug_last_store_pc = 0x00004BD4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004BD4u); -#endif - /* 0xBFC146D8: 8C4F0004 lw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004BD8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC146DC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC146E0: 35F80001 ori $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x1u; - PGXP_ALU(0x35F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146E4: 0C0010F4 jal 0xB00043D0 */ - cpu->gpr[31] = 0x00004BECu; /* jal link before delay slot */ - psx_delay_BFC146E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC146E8: AC580004 sw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004BE8u); return; } g_debug_last_store_pc = 0x00004BE8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004BE8u); -#endif - if (psx_delay_BFC146E4) { - psx_delay_BFC146E4 = 0; - cpu->gpr[31] = 0x00004BECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000043D0u); - cpu->pc = 0x000043D0u; return; - } -label_BFC146EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC146EC: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00004BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146F0: 0C000576 jal 0xB00015D8 */ - cpu->gpr[31] = 0x00004BF8u; /* jal link before delay slot */ - psx_delay_BFC146F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC146F4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004BF4u); -#endif - if (psx_delay_BFC146F0) { - psx_delay_BFC146F0 = 0; - cpu->gpr[31] = 0x00004BF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000015D8u); - cpu->pc = 0x000015D8u; return; - } -label_BFC146F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC146F8: 0C001AE4 jal 0xB0006B90 */ - cpu->gpr[31] = 0x00004C00u; /* jal link before delay slot */ - psx_delay_BFC146F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC146FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004BFCu); -#endif - if (psx_delay_BFC146F8) { - psx_delay_BFC146F8 = 0; - cpu->gpr[31] = 0x00004C00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B90u); - cpu->pc = 0x00006B90u; return; - } -label_BFC14700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C00u); -#endif - /* 0xBFC14700: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14704: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14708: 03E00008 jr $ra */ - psx_delay_BFC14708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1470C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C0Cu); -#endif - if (psx_delay_BFC14708) { - psx_delay_BFC14708 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004C10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004C10u); - int psx_delay_BFC14718 = 0; - int psx_delay_BFC14724 = 0; - int psx_delay_BFC14734 = 0; - int psx_delay_BFC1473C = 0; - int psx_delay_BFC1474C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14720u: goto label_BFC14720; - case 0xBFC1472Cu: goto label_BFC1472C; - case 0xBFC1473Cu: goto label_BFC1473C; - case 0xBFC14744u: goto label_BFC14744; - default: break; - } - } -label_BFC14710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14710: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14714: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C14u); return; } g_debug_last_store_pc = 0x00004C14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14718: 0C001AE0 jal 0xB0006B80 */ - cpu->gpr[31] = 0x00004C20u; /* jal link before delay slot */ - psx_delay_BFC14718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1471C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004C1Cu); -#endif - if (psx_delay_BFC14718) { - psx_delay_BFC14718 = 0; - cpu->gpr[31] = 0x00004C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B80u); - cpu->pc = 0x00006B80u; return; - } -label_BFC14720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14720: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14724: 0C000576 jal 0xB00015D8 */ - cpu->gpr[31] = 0x00004C2Cu; /* jal link before delay slot */ - psx_delay_BFC14724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14728: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C28u); -#endif - if (psx_delay_BFC14724) { - psx_delay_BFC14724 = 0; - cpu->gpr[31] = 0x00004C2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000015D8u); - cpu->pc = 0x000015D8u; return; - } -label_BFC1472C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1472C: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14730: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14734: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004C3Cu; /* jal link before delay slot */ - psx_delay_BFC14734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14738: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C38u); -#endif - if (psx_delay_BFC14734) { - psx_delay_BFC14734 = 0; - cpu->gpr[31] = 0x00004C3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC1473C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1473C: 0C001AE4 jal 0xB0006B90 */ - cpu->gpr[31] = 0x00004C44u; /* jal link before delay slot */ - psx_delay_BFC1473C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004C40u); -#endif - if (psx_delay_BFC1473C) { - psx_delay_BFC1473C = 0; - cpu->gpr[31] = 0x00004C44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B90u); - cpu->pc = 0x00006B90u; return; - } -label_BFC14744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C44u); -#endif - /* 0xBFC14744: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C44u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14748: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1474C: 03E00008 jr $ra */ - psx_delay_BFC1474C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14750: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004C50u); -#endif - if (psx_delay_BFC1474C) { - psx_delay_BFC1474C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004C54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004C54u); - int psx_delay_BFC1475C = 0; -label_BFC14754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14754: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14758: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1475C: 03E00008 jr $ra */ - psx_delay_BFC1475C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC14760: AC2E74B8 sw $t6, 29880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C60u); return; } g_debug_last_store_pc = 0x00004C60u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E74B8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C60u); -#endif - if (psx_delay_BFC1475C) { - psx_delay_BFC1475C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004C64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004C64u); - int psx_delay_BFC14768 = 0; -label_BFC14764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14764: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14768: 03E00008 jr $ra */ - psx_delay_BFC14768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1476C: AC2074B8 sw $zero, 29880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C6Cu); return; } g_debug_last_store_pc = 0x00004C6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074B8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C6Cu); -#endif - if (psx_delay_BFC14768) { - psx_delay_BFC14768 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004C70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004C70u); - int psx_delay_BFC14778 = 0; - int psx_delay_BFC14780 = 0; - int psx_delay_BFC14790 = 0; - int psx_delay_BFC147A0 = 0; - int psx_delay_BFC147C0 = 0; - int psx_delay_BFC147CC = 0; - int psx_delay_BFC147DC = 0; - int psx_delay_BFC147EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14780u: goto label_BFC14780; - case 0xBFC14788u: goto label_BFC14788; - case 0xBFC14798u: goto label_BFC14798; - case 0xBFC147A8u: goto label_BFC147A8; - case 0xBFC147C8u: goto label_BFC147C8; - case 0xBFC147D4u: goto label_BFC147D4; - case 0xBFC147E4u: goto label_BFC147E4; - default: break; - } - } -label_BFC14770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14770: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14774: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004C74u); return; } g_debug_last_store_pc = 0x00004C74u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14778: 0C0010FA jal 0xB00043E8 */ - cpu->gpr[31] = 0x00004C80u; /* jal link before delay slot */ - psx_delay_BFC14778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1477C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004C7Cu); -#endif - if (psx_delay_BFC14778) { - psx_delay_BFC14778 = 0; - cpu->gpr[31] = 0x00004C80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000043E8u); - cpu->pc = 0x000043E8u; return; - } -label_BFC14780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14780: 0C001AE0 jal 0xB0006B80 */ - cpu->gpr[31] = 0x00004C88u; /* jal link before delay slot */ - psx_delay_BFC14780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004C84u); -#endif - if (psx_delay_BFC14780) { - psx_delay_BFC14780 = 0; - cpu->gpr[31] = 0x00004C88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B80u); - cpu->pc = 0x00006B80u; return; - } -label_BFC14788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14788: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1478C: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14790: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004C98u; /* jal link before delay slot */ - psx_delay_BFC14790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14794: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C94u); -#endif - if (psx_delay_BFC14790) { - psx_delay_BFC14790 = 0; - cpu->gpr[31] = 0x00004C98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC14798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14798: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1479C: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC147A0: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x00004CA8u; /* jal link before delay slot */ - psx_delay_BFC147A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC147A4: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CA4u); -#endif - if (psx_delay_BFC147A0) { - psx_delay_BFC147A0 = 0; - cpu->gpr[31] = 0x00004CA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC147A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC147A8: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004CA8u); -#endif - /* 0xBFC147AC: 8C42725C lw $v0, 29276($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42725Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC147B0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CB0u); -#endif - /* 0xBFC147B4: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CB4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC147B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC147BC: 35CF0001 ori $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x1u; - PGXP_ALU(0x35CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC147C0: 0C0010F4 jal 0xB00043D0 */ - cpu->gpr[31] = 0x00004CC8u; /* jal link before delay slot */ - psx_delay_BFC147C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC147C4: AC4F0004 sw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CC4u); return; } g_debug_last_store_pc = 0x00004CC4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CC4u); -#endif - if (psx_delay_BFC147C0) { - psx_delay_BFC147C0 = 0; - cpu->gpr[31] = 0x00004CC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000043D0u); - cpu->pc = 0x000043D0u; return; - } -label_BFC147C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC147C8: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC147CC: 0C000576 jal 0xB00015D8 */ - cpu->gpr[31] = 0x00004CD4u; /* jal link before delay slot */ - psx_delay_BFC147CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC147D0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004CD0u); -#endif - if (psx_delay_BFC147CC) { - psx_delay_BFC147CC = 0; - cpu->gpr[31] = 0x00004CD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000015D8u); - cpu->pc = 0x000015D8u; return; - } -label_BFC147D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC147D4: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC147D8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC147DC: 0C001AE4 jal 0xB0006B90 */ - cpu->gpr[31] = 0x00004CE4u; /* jal link before delay slot */ - psx_delay_BFC147DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC147E0: AC3874BC sw $t8, 29884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CE0u); return; } g_debug_last_store_pc = 0x00004CE0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC3874BCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CE0u); -#endif - if (psx_delay_BFC147DC) { - psx_delay_BFC147DC = 0; - cpu->gpr[31] = 0x00004CE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B90u); - cpu->pc = 0x00006B90u; return; - } -label_BFC147E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CE4u); -#endif - /* 0xBFC147E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC147E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC147EC: 03E00008 jr $ra */ - psx_delay_BFC147EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC147F0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CF0u); -#endif - if (psx_delay_BFC147EC) { - psx_delay_BFC147EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004CF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004CF4u); - int psx_delay_BFC147FC = 0; - int psx_delay_BFC14808 = 0; - int psx_delay_BFC14818 = 0; - int psx_delay_BFC14824 = 0; - int psx_delay_BFC14834 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14804u: goto label_BFC14804; - case 0xBFC14810u: goto label_BFC14810; - case 0xBFC14820u: goto label_BFC14820; - case 0xBFC1482Cu: goto label_BFC1482C; - default: break; - } - } -label_BFC147F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC147F4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC147F8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004CF8u); return; } g_debug_last_store_pc = 0x00004CF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC147FC: 0C001AE0 jal 0xB0006B80 */ - cpu->gpr[31] = 0x00004D04u; /* jal link before delay slot */ - psx_delay_BFC147FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004D00u); -#endif - if (psx_delay_BFC147FC) { - psx_delay_BFC147FC = 0; - cpu->gpr[31] = 0x00004D04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B80u); - cpu->pc = 0x00006B80u; return; - } -label_BFC14804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14804: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14808: 0C000576 jal 0xB00015D8 */ - cpu->gpr[31] = 0x00004D10u; /* jal link before delay slot */ - psx_delay_BFC14808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1480C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D0Cu); -#endif - if (psx_delay_BFC14808) { - psx_delay_BFC14808 = 0; - cpu->gpr[31] = 0x00004D10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000015D8u); - cpu->pc = 0x000015D8u; return; - } -label_BFC14810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14810: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14814: 24A574A8 addiu $a1, $a1, 29864 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (29864)); - PGXP_ALU(0x24A574A8u, cpu->gpr[5], _pgx1, 0x000074A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14818: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004D20u; /* jal link before delay slot */ - psx_delay_BFC14818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1481C: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D1Cu); -#endif - if (psx_delay_BFC14818) { - psx_delay_BFC14818 = 0; - cpu->gpr[31] = 0x00004D20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC14820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14820: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14824: 0C001AE4 jal 0xB0006B90 */ - cpu->gpr[31] = 0x00004D2Cu; /* jal link before delay slot */ - psx_delay_BFC14824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14828: AC2074BC sw $zero, 29884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D28u); return; } g_debug_last_store_pc = 0x00004D28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074BCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D28u); -#endif - if (psx_delay_BFC14824) { - psx_delay_BFC14824 = 0; - cpu->gpr[31] = 0x00004D2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B90u); - cpu->pc = 0x00006B90u; return; - } -label_BFC1482C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D2Cu); -#endif - /* 0xBFC1482C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D2Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14830: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14834: 03E00008 jr $ra */ - psx_delay_BFC14834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14838: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D38u); -#endif - if (psx_delay_BFC14834) { - psx_delay_BFC14834 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004D3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004D3Cu); - int psx_delay_BFC14844 = 0; -label_BFC1483C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1483C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14840: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14844: 03E00008 jr $ra */ - psx_delay_BFC14844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC14848: AC2E74C0 sw $t6, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D48u); return; } g_debug_last_store_pc = 0x00004D48u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E74C0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D48u); -#endif - if (psx_delay_BFC14844) { - psx_delay_BFC14844 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004D4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004D4Cu); - int psx_delay_BFC1485C = 0; -label_BFC1484C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1484C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D50u); -#endif - /* 0xBFC14850: 8C63756C lw $v1, 30060($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 30060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (30060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D50u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63756Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14854: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC14858: AC24756C sw $a0, 30060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D58u); return; } g_debug_last_store_pc = 0x00004D58u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24756Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1485C: 03E00008 jr $ra */ - psx_delay_BFC1485C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC14860: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004D60u); -#endif - if (psx_delay_BFC1485C) { - psx_delay_BFC1485C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004D64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004D64u); - int psx_delay_BFC14864 = 0; -label_BFC14864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14864: 03E00008 jr $ra */ - psx_delay_BFC14864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004D68u); -#endif - if (psx_delay_BFC14864) { - psx_delay_BFC14864 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004D6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004D6Cu); - int psx_delay_BFC14878 = 0; - int psx_taken_BFC14878 = 0; - int psx_delay_BFC14880 = 0; - int psx_taken_BFC14880 = 0; - int psx_delay_BFC148D4 = 0; - int psx_delay_BFC148DC = 0; - int psx_taken_BFC148DC = 0; - int psx_delay_BFC148E8 = 0; - int psx_taken_BFC148E8 = 0; - int psx_delay_BFC148F0 = 0; - int psx_taken_BFC148F0 = 0; - int psx_delay_BFC148F8 = 0; - int psx_taken_BFC148F8 = 0; - int psx_delay_BFC14900 = 0; - int psx_taken_BFC14900 = 0; - int psx_delay_BFC14908 = 0; - int psx_taken_BFC14908 = 0; - int psx_delay_BFC1492C = 0; - int psx_taken_BFC1492C = 0; - int psx_delay_BFC14954 = 0; - int psx_taken_BFC14954 = 0; - int psx_delay_BFC14984 = 0; - int psx_delay_BFC14994 = 0; - int psx_delay_BFC149B4 = 0; - int psx_delay_BFC149D8 = 0; - int psx_taken_BFC149D8 = 0; - int psx_delay_BFC14A04 = 0; - int psx_delay_BFC14A34 = 0; - int psx_taken_BFC14A34 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14880u: goto label_BFC14880; - case 0xBFC14888u: goto label_BFC14888; - case 0xBFC1488Cu: goto label_BFC1488C; - case 0xBFC14898u: goto label_BFC14898; - case 0xBFC1489Cu: goto label_BFC1489C; - case 0xBFC148A0u: goto label_BFC148A0; - case 0xBFC148A4u: goto label_BFC148A4; - case 0xBFC148A8u: goto label_BFC148A8; - case 0xBFC148ACu: goto label_BFC148AC; - case 0xBFC148DCu: goto label_BFC148DC; - case 0xBFC148E4u: goto label_BFC148E4; - case 0xBFC148F0u: goto label_BFC148F0; - case 0xBFC148F8u: goto label_BFC148F8; - case 0xBFC14900u: goto label_BFC14900; - case 0xBFC14908u: goto label_BFC14908; - case 0xBFC14910u: goto label_BFC14910; - case 0xBFC14934u: goto label_BFC14934; - case 0xBFC1495Cu: goto label_BFC1495C; - case 0xBFC1498Cu: goto label_BFC1498C; - case 0xBFC1499Cu: goto label_BFC1499C; - case 0xBFC149BCu: goto label_BFC149BC; - case 0xBFC149E0u: goto label_BFC149E0; - case 0xBFC14A0Cu: goto label_BFC14A0C; - case 0xBFC14A3Cu: goto label_BFC14A3C; - default: break; - } - } -label_BFC1486C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1486C: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D70u); -#endif - /* 0xBFC14870: 91CE7264 lbu $t6, 29284($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29284; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (29284)), 14, 0x4000u); - PGXP_LOAD(0x91CE7264u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14874: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14878: 15C00003 bne $t6, $zero, 0xBFC14888 */ - uint32_t psx_brA_BFC14878 = cpu->gpr[14]; uint32_t psx_brB_BFC14878 = cpu->gpr[0]; - psx_taken_BFC14878 = (psx_brA_BFC14878 != psx_brB_BFC14878); - psx_delay_BFC14878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1487C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D7Cu); return; } g_debug_last_store_pc = 0x00004D7Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D7Cu); -#endif - if (psx_delay_BFC14878) { - psx_delay_BFC14878 = 0; - if (psx_taken_BFC14878) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D88u); - goto label_BFC14888; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D80u); - } -label_BFC14880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14880: 10000002 beq $zero, $zero, 0xBFC1488C */ - uint32_t psx_brA_BFC14880 = cpu->gpr[0]; uint32_t psx_brB_BFC14880 = cpu->gpr[0]; - psx_taken_BFC14880 = (psx_brA_BFC14880 == psx_brB_BFC14880); - psx_delay_BFC14880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14884: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004D84u); -#endif - if (psx_delay_BFC14880) { - psx_delay_BFC14880 = 0; - if (psx_taken_BFC14880) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D8Cu); - goto label_BFC1488C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D88u); - } -label_BFC14888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14888: 24022000 addiu $v0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24022000u, cpu->gpr[2], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00004D88u); -#endif -label_BFC1488C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1488C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D90u); -#endif - /* 0xBFC14890: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004D90u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC14894: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D94u); -#endif -label_BFC14898: - /* 0xBFC14898: kernel patch-range hook (RAM [0x00004D98,0x00004DAC), - * resume RAM 0x00004DAC). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004D98u) != 0x946F000Au || - cpu->read_word(0x00004D9Cu) != 0x3C080000u || - cpu->read_word(0x00004DA0u) != 0x01E2C025u || - cpu->read_word(0x00004DA4u) != 0x37190012u || - cpu->read_word(0x00004DA8u) != 0xA479000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D98u); - cpu->pc = 0x00004D98u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D98u); -#endif - /* 0xBFC14898: 946F000A lhu $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004D98u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x946F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004D98u); -#endif -label_BFC1489C: - /* 0xBFC1489C: kernel patch-range hook (RAM [0x00004D98,0x00004DAC), - * resume RAM 0x00004DAC). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004D98u) != 0x946F000Au || - cpu->read_word(0x00004D9Cu) != 0x3C080000u || - cpu->read_word(0x00004DA0u) != 0x01E2C025u || - cpu->read_word(0x00004DA4u) != 0x37190012u || - cpu->read_word(0x00004DA8u) != 0xA479000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D9Cu); - cpu->pc = 0x00004D9Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1489C: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004D9Cu); -#endif -label_BFC148A0: - /* 0xBFC148A0: kernel patch-range hook (RAM [0x00004D98,0x00004DAC), - * resume RAM 0x00004DAC). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004D98u) != 0x946F000Au || - cpu->read_word(0x00004D9Cu) != 0x3C080000u || - cpu->read_word(0x00004DA0u) != 0x01E2C025u || - cpu->read_word(0x00004DA4u) != 0x37190012u || - cpu->read_word(0x00004DA8u) != 0xA479000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DA0u); - cpu->pc = 0x00004DA0u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC148A0: 01E2C025 or $t8, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[2]; - PGXP_ALU(0x01E2C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004DA0u); -#endif -label_BFC148A4: - /* 0xBFC148A4: kernel patch-range hook (RAM [0x00004D98,0x00004DAC), - * resume RAM 0x00004DAC). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004D98u) != 0x946F000Au || - cpu->read_word(0x00004D9Cu) != 0x3C080000u || - cpu->read_word(0x00004DA0u) != 0x01E2C025u || - cpu->read_word(0x00004DA4u) != 0x37190012u || - cpu->read_word(0x00004DA8u) != 0xA479000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DA4u); - cpu->pc = 0x00004DA4u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC148A4: 37190012 ori $t9, $t8, 0x12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x12u; - PGXP_ALU(0x37190012u, cpu->gpr[25], _pgx1, 0x0012u); } -#ifdef PSX_COSIM - cosim_instr(0x00004DA4u); -#endif -label_BFC148A8: - /* 0xBFC148A8: kernel patch-range hook (RAM [0x00004D98,0x00004DAC), - * resume RAM 0x00004DAC). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00004D98u) != 0x946F000Au || - cpu->read_word(0x00004D9Cu) != 0x3C080000u || - cpu->read_word(0x00004DA0u) != 0x01E2C025u || - cpu->read_word(0x00004DA4u) != 0x37190012u || - cpu->read_word(0x00004DA8u) != 0xA479000Au) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DA8u); - cpu->pc = 0x00004DA8u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC148A8: A479000A sh $t9, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004DA8u); return; } g_debug_last_store_pc = 0x00004DA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DA8u); -#endif -label_BFC148AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DACu); -#endif - /* 0xBFC148AC: 914A7264 lbu $t2, 29284($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 29284; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (29284)), 10, 0x400u); - PGXP_LOAD(0x914A7264u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DB0u); -#endif - /* 0xBFC148B0: 8D087514 lw $t0, 29972($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004DB0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D087514u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC148B4: 3C0C0000 lui $t4, 0x0 */ - cpu->gpr[12] = 0x00000000u; - PGXP_ALU(0x3C0C0000u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC148B8: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00004DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC148BC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC148C0: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC148C4: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004DC4u); -#endif - /* 0xBFC148C8: 8D8C7528 lw $t4, 29992($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 29992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (29992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004DC8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C7528u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC148CC: AC297514 sw $t1, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004DCCu); return; } g_debug_last_store_pc = 0x00004DCCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC297514u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC148D0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001000u); -#endif - /* 0xBFC148D4: 0180F809 jalr $ra, $t4 */ - cpu->gpr[31] = 0x00004DDCu; /* jalr link before delay slot */ - psx_delay_BFC148D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC148D8: AC2274A0 sw $v0, 29856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004DD8u); return; } g_debug_last_store_pc = 0x00004DD8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC2274A0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DD8u); -#endif - if (psx_delay_BFC148D4) { - psx_delay_BFC148D4 = 0; - { uint32_t _t = cpu->gpr[12]; - cpu->gpr[31] = 0x00004DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC148DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DDCu); -#endif - debug_server_log_probe(0xBFC148DCu, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC148DC: 10000004 beq $zero, $zero, 0xBFC148F0 */ - uint32_t psx_brA_BFC148DC = cpu->gpr[0]; uint32_t psx_brB_BFC148DC = cpu->gpr[0]; - psx_taken_BFC148DC = (psx_brA_BFC148DC == psx_brB_BFC148DC); - psx_delay_BFC148DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC148E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004DE0u); -#endif - if (psx_delay_BFC148DC) { - psx_delay_BFC148DC = 0; - if (psx_taken_BFC148DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DF0u); - goto label_BFC148F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DE4u); - } -label_BFC148E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC148E4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC148E8: 1000003D beq $zero, $zero, 0xBFC149E0 */ - uint32_t psx_brA_BFC148E8 = cpu->gpr[0]; uint32_t psx_brB_BFC148E8 = cpu->gpr[0]; - psx_taken_BFC148E8 = (psx_brA_BFC148E8 == psx_brB_BFC148E8); - psx_delay_BFC148E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC148EC: AC2074A4 sw $zero, 29860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004DECu); return; } g_debug_last_store_pc = 0x00004DECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004DECu); -#endif - if (psx_delay_BFC148E8) { - psx_delay_BFC148E8 = 0; - if (psx_taken_BFC148E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004EE0u); - goto label_BFC149E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DF0u); - } -label_BFC148F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DF0u); -#endif - debug_server_log_probe(0xBFC148F0u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC148F0: 10400007 beq $v0, $zero, 0xBFC14910 */ - uint32_t psx_brA_BFC148F0 = cpu->gpr[2]; uint32_t psx_brB_BFC148F0 = cpu->gpr[0]; - psx_taken_BFC148F0 = (psx_brA_BFC148F0 == psx_brB_BFC148F0); - psx_delay_BFC148F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC148F4: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004DF4u); -#endif - if (psx_delay_BFC148F0) { - psx_delay_BFC148F0 = 0; - if (psx_taken_BFC148F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E10u); - goto label_BFC14910; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DF8u); - } -label_BFC148F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004DF8u); -#endif - debug_server_log_probe(0xBFC148F8u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC148F8: 1041FFFA beq $v0, $at, 0xBFC148E4 */ - uint32_t psx_brA_BFC148F8 = cpu->gpr[2]; uint32_t psx_brB_BFC148F8 = cpu->gpr[1]; - psx_taken_BFC148F8 = (psx_brA_BFC148F8 == psx_brB_BFC148F8); - psx_delay_BFC148F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC148FC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00004DFCu); -#endif - if (psx_delay_BFC148F8) { - psx_delay_BFC148F8 = 0; - if (psx_taken_BFC148F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004DE4u); - goto label_BFC148E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E00u); - } -label_BFC14900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E00u); -#endif - debug_server_log_probe(0xBFC14900u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC14900: 1041000C beq $v0, $at, 0xBFC14934 */ - uint32_t psx_brA_BFC14900 = cpu->gpr[2]; uint32_t psx_brB_BFC14900 = cpu->gpr[1]; - psx_taken_BFC14900 = (psx_brA_BFC14900 == psx_brB_BFC14900); - psx_delay_BFC14900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004E04u); -#endif - if (psx_delay_BFC14900) { - psx_delay_BFC14900 = 0; - if (psx_taken_BFC14900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E34u); - goto label_BFC14934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E08u); - } -label_BFC14908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E08u); -#endif - debug_server_log_probe(0xBFC14908u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14908: 1000000A beq $zero, $zero, 0xBFC14934 */ - uint32_t psx_brA_BFC14908 = cpu->gpr[0]; uint32_t psx_brB_BFC14908 = cpu->gpr[0]; - psx_taken_BFC14908 = (psx_brA_BFC14908 == psx_brB_BFC14908); - psx_delay_BFC14908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1490C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004E0Cu); -#endif - if (psx_delay_BFC14908) { - psx_delay_BFC14908 = 0; - if (psx_taken_BFC14908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E34u); - goto label_BFC14934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E10u); - } -label_BFC14910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC14910: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E10u); -#endif - /* 0xBFC14914: 8C63725C lw $v1, 29276($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E14u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63725Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14918: 2404FF7F addiu $a0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2404FF7Fu, cpu->gpr[4], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00004E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC1491C: AC640000 sw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E1Cu); return; } g_debug_last_store_pc = 0x00004E1Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E20u); -#endif - /* 0xBFC14920: 8C6D0004 lw $t5, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E20u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14924: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14928: 35AE0080 ori $t6, $t5, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x80u; - PGXP_ALU(0x35AE0080u, cpu->gpr[14], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00004E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1492C: 10000054 beq $zero, $zero, 0xBFC14A80 */ - uint32_t psx_brA_BFC1492C = cpu->gpr[0]; uint32_t psx_brB_BFC1492C = cpu->gpr[0]; - psx_taken_BFC1492C = (psx_brA_BFC1492C == psx_brB_BFC1492C); - psx_delay_BFC1492C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC14930: AC6E0004 sw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E30u); return; } g_debug_last_store_pc = 0x00004E30u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E30u); -#endif - if (psx_delay_BFC1492C) { - psx_delay_BFC1492C = 0; - if (psx_taken_BFC1492C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004F80u); - cpu->pc = 0x00004F80u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E34u); - } -label_BFC14934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E34u); -#endif - debug_server_log_probe(0xBFC14934u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC14934: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E34u); -#endif - /* 0xBFC14938: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E38u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1493C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14940: A020755A sb $zero, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004E40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020755Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14944: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC14948: A460000A sh $zero, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004E48u); return; } g_debug_last_store_pc = 0x00004E48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E48u); -#endif - /* 0xBFC1494C: 8DEF7520 lw $t7, 29984($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E4Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF7520u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14954: 15E00011 bne $t7, $zero, 0xBFC1499C */ - uint32_t psx_brA_BFC14954 = cpu->gpr[15]; uint32_t psx_brB_BFC14954 = cpu->gpr[0]; - psx_taken_BFC14954 = (psx_brA_BFC14954 != psx_brB_BFC14954); - psx_delay_BFC14954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14958: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E58u); -#endif - if (psx_delay_BFC14954) { - psx_delay_BFC14954 = 0; - if (psx_taken_BFC14954) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E9Cu); - goto label_BFC1499C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004E5Cu); - } -label_BFC1495C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1495C: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E60u); -#endif - /* 0xBFC14960: 93397264 lbu $t9, 29284($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29284; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (29284)), 25, 0x2000000u); - PGXP_LOAD(0x93397264u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14964: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E64u); return; } g_debug_last_store_pc = 0x00004E64u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14968: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1496C: 24180021 addiu $t8, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24180021u, cpu->gpr[24], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x00004E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC14970: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC14974: A0387568 sb $t8, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004E74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0387568u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC14978: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E78u); -#endif - /* 0xBFC1497C: 91087264 lbu $t0, 29284($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29284; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (29284)), 8, 0x100u); - PGXP_LOAD(0x91087264u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14980: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14984: 0C001AD0 jal 0xB0006B40 */ - cpu->gpr[31] = 0x00004E8Cu; /* jal link before delay slot */ - psx_delay_BFC14984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC14988: AC28751C sw $t0, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004E88u); return; } g_debug_last_store_pc = 0x00004E88u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28751Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00004E88u); -#endif - if (psx_delay_BFC14984) { - psx_delay_BFC14984 = 0; - cpu->gpr[31] = 0x00004E8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B40u); - cpu->pc = 0x00006B40u; return; - } -label_BFC1498C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1498C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14990: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00004E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14994: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00004E9Cu; /* jal link before delay slot */ - psx_delay_BFC14994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14998: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x00004E98u); -#endif - if (psx_delay_BFC14994) { - psx_delay_BFC14994 = 0; - cpu->gpr[31] = 0x00004E9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC1499C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1499C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC149A0: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EA0u); return; } g_debug_last_store_pc = 0x00004EA0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC149A4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC149A8: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC149AC: AC207520 sw $zero, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EACu); return; } g_debug_last_store_pc = 0x00004EACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207520u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC149B0: 24A57540 addiu $a1, $a1, 30016 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30016)); - PGXP_ALU(0x24A57540u, cpu->gpr[5], _pgx1, 0x00007540u); } -#ifdef PSX_COSIM - cosim_instr(0x00004EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC149B4: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004EBCu; /* jal link before delay slot */ - psx_delay_BFC149B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC149B8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004EB8u); -#endif - if (psx_delay_BFC149B4) { - psx_delay_BFC149B4 = 0; - cpu->gpr[31] = 0x00004EBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC149BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC149BC: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EC0u); -#endif - /* 0xBFC149C0: 8C63725C lw $v1, 29276($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EC0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63725Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC149C4: 2404FF7F addiu $a0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2404FF7Fu, cpu->gpr[4], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00004EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC149C8: AC640000 sw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EC8u); return; } g_debug_last_store_pc = 0x00004EC8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EC8u); -#endif - /* 0xBFC149CC: 8C690004 lw $t1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004ECCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8u); } - PGXP_LOAD(0x8C690004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00004ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC149D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC149D4: 01245024 and $t2, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[4]; - PGXP_ALU(0x01245024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC149D8: 10000029 beq $zero, $zero, 0xBFC14A80 */ - uint32_t psx_brA_BFC149D8 = cpu->gpr[0]; uint32_t psx_brB_BFC149D8 = cpu->gpr[0]; - psx_taken_BFC149D8 = (psx_brA_BFC149D8 == psx_brB_BFC149D8); - psx_delay_BFC149D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC149DC: AC6A0004 sw $t2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EDCu); return; } g_debug_last_store_pc = 0x00004EDCu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EDCu); -#endif - if (psx_delay_BFC149D8) { - psx_delay_BFC149D8 = 0; - if (psx_taken_BFC149D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004F80u); - cpu->pc = 0x00004F80u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004EE0u); - } -label_BFC149E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC149E0: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC149E4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EE4u); -#endif - /* 0xBFC149E8: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EE8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC149EC: A020755A sb $zero, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004EECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020755Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC149F0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC149F4: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC149F8: A460000A sh $zero, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00004EF8u); return; } g_debug_last_store_pc = 0x00004EF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC149FC: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004EFCu); return; } g_debug_last_store_pc = 0x00004EFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14A00: 24A57540 addiu $a1, $a1, 30016 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30016)); - PGXP_ALU(0x24A57540u, cpu->gpr[5], _pgx1, 0x00007540u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14A04: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00004F0Cu; /* jal link before delay slot */ - psx_delay_BFC14A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14A08: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F08u); -#endif - if (psx_delay_BFC14A04) { - psx_delay_BFC14A04 = 0; - cpu->gpr[31] = 0x00004F0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC14A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC14A0C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F10u); -#endif - /* 0xBFC14A10: 8C63725C lw $v1, 29276($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F10u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63725Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14A14: 2404FF7F addiu $a0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2404FF7Fu, cpu->gpr[4], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00004F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC14A18: AC640000 sw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F18u); return; } g_debug_last_store_pc = 0x00004F18u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F18u); -#endif - /* 0xBFC14A1C: 8C6B0004 lw $t3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F1Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC14A20: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC14A24: 01646024 and $t4, $t3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[4]; - PGXP_ALU(0x01646024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC14A28: AC6C0004 sw $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F28u); return; } g_debug_last_store_pc = 0x00004F28u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC6C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F28u); -#endif - /* 0xBFC14A2C: 8DAD7520 lw $t5, 29984($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F2Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD7520u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14A30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC14A34: 15A00011 bne $t5, $zero, 0xBFC14A7C */ - uint32_t psx_brA_BFC14A34 = cpu->gpr[13]; uint32_t psx_brB_BFC14A34 = cpu->gpr[0]; - psx_taken_BFC14A34 = (psx_brA_BFC14A34 != psx_brB_BFC14A34); - psx_delay_BFC14A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14A38: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F38u); -#endif - if (psx_delay_BFC14A34) { - psx_delay_BFC14A34 = 0; - if (psx_taken_BFC14A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004F7Cu); - cpu->pc = 0x00004F7Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004F3Cu); - } -label_BFC14A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14A3C: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F40u); -#endif - /* 0xBFC14A40: 91EF7264 lbu $t7, 29284($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29284; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (29284)), 15, 0x8000u); - PGXP_LOAD(0x91EF7264u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14A44: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F44u); return; } g_debug_last_store_pc = 0x00004F44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14A48: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14A4C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC14A50: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004F54u); - cpu->pc = 0x00004F54u; return; /* fallthrough */ -} - -void SCPH1001_func_00004F54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004F54u); - int psx_delay_BFC14A64 = 0; - int psx_delay_BFC14A74 = 0; - int psx_delay_BFC14A88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14A7Cu: goto label_BFC14A7C; - case 0xBFC14A80u: goto label_BFC14A80; - case 0xBFC14A6Cu: goto label_BFC14A6C; - default: break; - } - } -label_BFC14A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC14A54: A02E7568 sb $t6, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004F54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02E7568u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC14A58: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F58u); -#endif - /* 0xBFC14A5C: 93187264 lbu $t8, 29284($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 29284; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (29284)), 24, 0x1000000u); - PGXP_LOAD(0x93187264u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14A60: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14A64: 0C001ACC jal 0xB0006B30 */ - cpu->gpr[31] = 0x00004F6Cu; /* jal link before delay slot */ - psx_delay_BFC14A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC14A68: AC38751C sw $t8, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F68u); return; } g_debug_last_store_pc = 0x00004F68u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38751Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F68u); -#endif - if (psx_delay_BFC14A64) { - psx_delay_BFC14A64 = 0; - cpu->gpr[31] = 0x00004F6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B30u); - cpu->pc = 0x00006B30u; return; - } -label_BFC14A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14A6C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14A70: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14A74: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00004F7Cu; /* jal link before delay slot */ - psx_delay_BFC14A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14A78: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F78u); -#endif - if (psx_delay_BFC14A74) { - psx_delay_BFC14A74 = 0; - cpu->gpr[31] = 0x00004F7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC14A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14A7C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004F7Cu); -#endif -label_BFC14A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F80u); -#endif - /* 0xBFC14A80: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14A84: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14A88: 03E00008 jr $ra */ - psx_delay_BFC14A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004F8Cu); -#endif - if (psx_delay_BFC14A88) { - psx_delay_BFC14A88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00004F90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00004F90u); - int psx_delay_BFC14AAC = 0; - int psx_taken_BFC14AAC = 0; - int psx_delay_BFC14AC0 = 0; - int psx_taken_BFC14AC0 = 0; - int psx_delay_BFC14AC8 = 0; - int psx_taken_BFC14AC8 = 0; - int psx_delay_BFC14AD0 = 0; - int psx_delay_BFC14ADC = 0; - int psx_taken_BFC14ADC = 0; - int psx_delay_BFC14AE4 = 0; - int psx_taken_BFC14AE4 = 0; - int psx_delay_BFC14AF8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14AB4u: goto label_BFC14AB4; - case 0xBFC14AC8u: goto label_BFC14AC8; - case 0xBFC14AD0u: goto label_BFC14AD0; - case 0xBFC14AD8u: goto label_BFC14AD8; - case 0xBFC14AE4u: goto label_BFC14AE4; - case 0xBFC14AECu: goto label_BFC14AEC; - case 0xBFC14AF0u: goto label_BFC14AF0; - default: break; - } - } -label_BFC14A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14A90: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00004F90u); -#endif - /* 0xBFC14A94: 8C42725C lw $v0, 29276($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F94u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42725Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14A98: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00004F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14A9C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004F9Cu); return; } g_debug_last_store_pc = 0x00004F9Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FA0u); -#endif - /* 0xBFC14AA0: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004FA0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00004FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14AA8: 31CF0080 andi $t7, $t6, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x80u; - PGXP_ALU(0x31CF0080u, cpu->gpr[15], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14AAC: 11E00006 beq $t7, $zero, 0xBFC14AC8 */ - uint32_t psx_brA_BFC14AAC = cpu->gpr[15]; uint32_t psx_brB_BFC14AAC = cpu->gpr[0]; - psx_taken_BFC14AAC = (psx_brA_BFC14AAC == psx_brB_BFC14AAC); - psx_delay_BFC14AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FB0u); -#endif - if (psx_delay_BFC14AAC) { - psx_delay_BFC14AAC = 0; - if (psx_taken_BFC14AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FC8u); - goto label_BFC14AC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FB4u); - } -label_BFC14AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FB4u); -#endif - /* 0xBFC14AB4: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004FB4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00004FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC14ABC: 33190080 andi $t9, $t8, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x80u; - PGXP_ALU(0x33190080u, cpu->gpr[25], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14AC0: 17200003 bne $t9, $zero, 0xBFC14AD0 */ - uint32_t psx_brA_BFC14AC0 = cpu->gpr[25]; uint32_t psx_brB_BFC14AC0 = cpu->gpr[0]; - psx_taken_BFC14AC0 = (psx_brA_BFC14AC0 != psx_brB_BFC14AC0); - psx_delay_BFC14AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FC4u); -#endif - if (psx_delay_BFC14AC0) { - psx_delay_BFC14AC0 = 0; - if (psx_taken_BFC14AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FD0u); - goto label_BFC14AD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FC8u); - } -label_BFC14AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AC8: 10000009 beq $zero, $zero, 0xBFC14AF0 */ - uint32_t psx_brA_BFC14AC8 = cpu->gpr[0]; uint32_t psx_brB_BFC14AC8 = cpu->gpr[0]; - psx_taken_BFC14AC8 = (psx_brA_BFC14AC8 == psx_brB_BFC14AC8); - psx_delay_BFC14AC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14ACC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004FCCu); -#endif - if (psx_delay_BFC14AC8) { - psx_delay_BFC14AC8 = 0; - if (psx_taken_BFC14AC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FF0u); - goto label_BFC14AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FD0u); - } -label_BFC14AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14AD0: 0C0018FE jal 0xB00063F8 */ - cpu->gpr[31] = 0x00004FD8u; /* jal link before delay slot */ - psx_delay_BFC14AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FD4u); -#endif - if (psx_delay_BFC14AD0) { - psx_delay_BFC14AD0 = 0; - cpu->gpr[31] = 0x00004FD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000063F8u); - cpu->pc = 0x000063F8u; return; - } -label_BFC14AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC14AD8: 30480001 andi $t0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14ADC: 11000004 beq $t0, $zero, 0xBFC14AF0 */ - uint32_t psx_brA_BFC14ADC = cpu->gpr[8]; uint32_t psx_brB_BFC14ADC = cpu->gpr[0]; - psx_taken_BFC14ADC = (psx_brA_BFC14ADC == psx_brB_BFC14ADC); - psx_delay_BFC14ADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14AE0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FE0u); -#endif - if (psx_delay_BFC14ADC) { - psx_delay_BFC14ADC = 0; - if (psx_taken_BFC14ADC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FF0u); - goto label_BFC14AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FE4u); - } -label_BFC14AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AE4: 10000002 beq $zero, $zero, 0xBFC14AF0 */ - uint32_t psx_brA_BFC14AE4 = cpu->gpr[0]; uint32_t psx_brB_BFC14AE4 = cpu->gpr[0]; - psx_taken_BFC14AE4 = (psx_brA_BFC14AE4 == psx_brB_BFC14AE4); - psx_delay_BFC14AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14AE8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00004FE8u); -#endif - if (psx_delay_BFC14AE4) { - psx_delay_BFC14AE4 = 0; - if (psx_taken_BFC14AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FF0u); - goto label_BFC14AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004FECu); - } -label_BFC14AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14AEC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FECu); -#endif -label_BFC14AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00004FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00004FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00004FF0u); -#endif - /* 0xBFC14AF0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004FF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00004FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14AF4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00004FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14AF8: 03E00008 jr $ra */ - psx_delay_BFC14AF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14AFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00004FFCu); -#endif - if (psx_delay_BFC14AF8) { - psx_delay_BFC14AF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005000(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005000u); - int psx_delay_BFC14B10 = 0; - int psx_delay_BFC14B20 = 0; - int psx_delay_BFC14B30 = 0; - int psx_delay_BFC14B40 = 0; - int psx_delay_BFC14B50 = 0; - int psx_delay_BFC14B64 = 0; - int psx_taken_BFC14B64 = 0; - int psx_delay_BFC14BD8 = 0; - int psx_delay_BFC14BE8 = 0; - int psx_delay_BFC14BF8 = 0; - int psx_delay_BFC14C20 = 0; - int psx_taken_BFC14C20 = 0; - int psx_delay_BFC14C60 = 0; - int psx_taken_BFC14C60 = 0; - int psx_delay_BFC14C68 = 0; - int psx_taken_BFC14C68 = 0; - int psx_delay_BFC14CA8 = 0; - int psx_delay_BFC14CB8 = 0; - int psx_delay_BFC14CC8 = 0; - int psx_delay_BFC14CDC = 0; - int psx_delay_BFC14CEC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14B18u: goto label_BFC14B18; - case 0xBFC14B28u: goto label_BFC14B28; - case 0xBFC14B38u: goto label_BFC14B38; - case 0xBFC14B48u: goto label_BFC14B48; - case 0xBFC14B58u: goto label_BFC14B58; - case 0xBFC14B6Cu: goto label_BFC14B6C; - case 0xBFC14BE0u: goto label_BFC14BE0; - case 0xBFC14BF0u: goto label_BFC14BF0; - case 0xBFC14C00u: goto label_BFC14C00; - case 0xBFC14C28u: goto label_BFC14C28; - case 0xBFC14C68u: goto label_BFC14C68; - case 0xBFC14C70u: goto label_BFC14C70; - case 0xBFC14CB0u: goto label_BFC14CB0; - case 0xBFC14CC0u: goto label_BFC14CC0; - case 0xBFC14CD0u: goto label_BFC14CD0; - case 0xBFC14CE4u: goto label_BFC14CE4; - default: break; - } - } -label_BFC14B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14B00: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00005000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14B04: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005004u); return; } g_debug_last_store_pc = 0x00005004u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B08: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B0C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000500Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14B10: 0C000717 jal 0xB0001C5C */ - cpu->gpr[31] = 0x00005018u; /* jal link before delay slot */ - psx_delay_BFC14B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14B14: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00005014u); -#endif - if (psx_delay_BFC14B10) { - psx_delay_BFC14B10 = 0; - cpu->gpr[31] = 0x00005018u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C5Cu); - cpu->pc = 0x00001C5Cu; return; - } -label_BFC14B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B18: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B1C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14B20: 0C000717 jal 0xB0001C5C */ - cpu->gpr[31] = 0x00005028u; /* jal link before delay slot */ - psx_delay_BFC14B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14B24: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005024u); -#endif - if (psx_delay_BFC14B20) { - psx_delay_BFC14B20 = 0; - cpu->gpr[31] = 0x00005028u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C5Cu); - cpu->pc = 0x00001C5Cu; return; - } -label_BFC14B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B28: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B2C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14B30: 0C000717 jal 0xB0001C5C */ - cpu->gpr[31] = 0x00005038u; /* jal link before delay slot */ - psx_delay_BFC14B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14B34: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x00005034u); -#endif - if (psx_delay_BFC14B30) { - psx_delay_BFC14B30 = 0; - cpu->gpr[31] = 0x00005038u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C5Cu); - cpu->pc = 0x00001C5Cu; return; - } -label_BFC14B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B38: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B3C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14B40: 0C000717 jal 0xB0001C5C */ - cpu->gpr[31] = 0x00005048u; /* jal link before delay slot */ - psx_delay_BFC14B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14B44: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x00005044u); -#endif - if (psx_delay_BFC14B40) { - psx_delay_BFC14B40 = 0; - cpu->gpr[31] = 0x00005048u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C5Cu); - cpu->pc = 0x00001C5Cu; return; - } -label_BFC14B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B48: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14B4C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000504Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14B50: 0C000717 jal 0xB0001C5C */ - cpu->gpr[31] = 0x00005058u; /* jal link before delay slot */ - psx_delay_BFC14B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14B54: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005054u); -#endif - if (psx_delay_BFC14B50) { - psx_delay_BFC14B50 = 0; - cpu->gpr[31] = 0x00005058u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001C5Cu); - cpu->pc = 0x00001C5Cu; return; - } -label_BFC14B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC14B58: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005058u); -#endif - /* 0xBFC14B5C: 91CE755A lbu $t6, 30042($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 30042; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (30042)), 14, 0x4000u); - PGXP_LOAD(0x91CE755Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14B60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14B64: 11C00030 beq $t6, $zero, 0xBFC14C28 */ - uint32_t psx_brA_BFC14B64 = cpu->gpr[14]; uint32_t psx_brB_BFC14B64 = cpu->gpr[0]; - psx_taken_BFC14B64 = (psx_brA_BFC14B64 == psx_brB_BFC14B64); - psx_delay_BFC14B64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14B68: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005068u); -#endif - if (psx_delay_BFC14B64) { - psx_delay_BFC14B64 = 0; - if (psx_taken_BFC14B64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005128u); - goto label_BFC14C28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000506Cu); - } -label_BFC14B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000506Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14B6C: A020755A sb $zero, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000506Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020755Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14B70: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14B74: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14B78: AC2074A4 sw $zero, 29860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005078u); return; } g_debug_last_store_pc = 0x00005078u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005078u); -#endif - /* 0xBFC14B7C: 8C42725C lw $v0, 29276($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000507Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42725Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000507Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC14B80: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14B84: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005084u); -#endif - /* 0xBFC14B88: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005088u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14B8C: 2404FF7F addiu $a0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2404FF7Fu, cpu->gpr[4], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000508Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14B90: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005090u); return; } g_debug_last_store_pc = 0x00005090u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC14B94: AC440000 sw $a0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005094u); return; } g_debug_last_store_pc = 0x00005094u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC440000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005094u); -#endif - /* 0xBFC14B98: 8C4F0004 lw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005098u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC14B9C: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000509Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC14BA0: 01E4C024 and $t8, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[4]; - PGXP_ALU(0x01E4C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000050A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC14BA4: AC580004 sw $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000050A4u); return; } g_debug_last_store_pc = 0x000050A4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000050A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC14BA8: A460000A sh $zero, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000050A8u); return; } g_debug_last_store_pc = 0x000050A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000050A8u); -#endif - /* 0xBFC14BAC: 91087264 lbu $t0, 29284($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29284; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (29284)), 8, 0x100u); - PGXP_LOAD(0x91087264u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000050ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC14BB0: 3C070000 lui $a3, 0x0 */ - cpu->gpr[7] = 0x00000000u; - PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC14BB4: 24E77568 addiu $a3, $a3, 30056 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (30056)); - PGXP_ALU(0x24E77568u, cpu->gpr[7], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x000050B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14BB8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14BBC: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000050BCu); return; } g_debug_last_store_pc = 0x000050BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000050BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14BC0: 24190011 addiu $t9, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24190011u, cpu->gpr[25], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x000050C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x380u); -#endif - /* 0xBFC14BC4: 00E84821 addu $t1, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[7] + cpu->gpr[8]; - PGXP_ALU(0x00E84821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000050C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC14BC8: A1390000 sb $t9, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000050C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1390000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000050C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC14BCC: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050D0u); -#endif - /* 0xBFC14BD0: 914A7264 lbu $t2, 29284($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 29284; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (29284)), 10, 0x400u); - PGXP_LOAD(0x914A7264u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000050D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14BD4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14BD8: 0C001AD4 jal 0xB0006B50 */ - cpu->gpr[31] = 0x000050E0u; /* jal link before delay slot */ - psx_delay_BFC14BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC14BDC: AC2A751C sw $t2, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000050DCu); return; } g_debug_last_store_pc = 0x000050DCu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A751Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000050DCu); -#endif - if (psx_delay_BFC14BD8) { - psx_delay_BFC14BD8 = 0; - cpu->gpr[31] = 0x000050E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B50u); - cpu->pc = 0x00006B50u; return; - } -label_BFC14BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000050E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000050E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14BE0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14BE4: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x000050E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14BE8: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x000050F0u; /* jal link before delay slot */ - psx_delay_BFC14BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14BEC: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x000050ECu); -#endif - if (psx_delay_BFC14BE8) { - psx_delay_BFC14BE8 = 0; - cpu->gpr[31] = 0x000050F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC14BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000050F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000050F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000050F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14BF0: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000050F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14BF4: 24A57540 addiu $a1, $a1, 30016 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30016)); - PGXP_ALU(0x24A57540u, cpu->gpr[5], _pgx1, 0x00007540u); } -#ifdef PSX_COSIM - cosim_instr(0x000050F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14BF8: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x00005100u; /* jal link before delay slot */ - psx_delay_BFC14BF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14BFC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000050FCu); -#endif - if (psx_delay_BFC14BF8) { - psx_delay_BFC14BF8 = 0; - cpu->gpr[31] = 0x00005100u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC14C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC14C00: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005100u); -#endif - /* 0xBFC14C04: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005104u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC14C08: 240B0040 addiu $t3, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240B0040u, cpu->gpr[11], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x00005108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC14C0C: 240C0088 addiu $t4, $zero, 136 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (136)); - PGXP_ALU(0x240C0088u, cpu->gpr[12], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0x0000510Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC14C10: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005110u); return; } g_debug_last_store_pc = 0x00005110u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC14C14: 240D000D addiu $t5, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x240D000Du, cpu->gpr[13], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x00005114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC14C18: A46C000E sh $t4, 14($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005118u); return; } g_debug_last_store_pc = 0x00005118u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA46C000Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC14C1C: A46D0008 sh $t5, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000511Cu); return; } g_debug_last_store_pc = 0x0000511Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000511Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14C20: 10000030 beq $zero, $zero, 0xBFC14CE4 */ - uint32_t psx_brA_BFC14C20 = cpu->gpr[0]; uint32_t psx_brB_BFC14C20 = cpu->gpr[0]; - psx_taken_BFC14C20 = (psx_brA_BFC14C20 == psx_brB_BFC14C20); - psx_delay_BFC14C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC14C24: A460000A sh $zero, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005124u); return; } g_debug_last_store_pc = 0x00005124u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005124u); -#endif - if (psx_delay_BFC14C20) { - psx_delay_BFC14C20 = 0; - if (psx_taken_BFC14C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000051E4u); - goto label_BFC14CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005128u); - } -label_BFC14C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC14C28: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005128u); -#endif - /* 0xBFC14C2C: 91CE7264 lbu $t6, 29284($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29284; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (29284)), 14, 0x4000u); - PGXP_LOAD(0x91CE7264u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000512Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14C30: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14C34: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC14C38: 01EEC023 subu $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EEC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC14C3C: A0387264 sb $t8, 29284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29284; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000513Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (29284)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0387264u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000513Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC14C40: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005140u); -#endif - /* 0xBFC14C44: 91087264 lbu $t0, 29284($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29284; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (29284)), 8, 0x100u); - PGXP_LOAD(0x91087264u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC14C48: 3C070000 lui $a3, 0x0 */ - cpu->gpr[7] = 0x00000000u; - PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC14C4C: 24E77568 addiu $a3, $a3, 30056 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (30056)); - PGXP_ALU(0x24E77568u, cpu->gpr[7], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x0000514Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000180u); -#endif - /* 0xBFC14C50: 00E8C821 addu $t9, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[7] + cpu->gpr[8]; - PGXP_ALU(0x00E8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005150u); -#endif - /* 0xBFC14C54: 93290000 lbu $t1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (0)), 9, 0x2000000u); - PGXP_LOAD(0x93290000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14C58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14C5C: 312A0001 andi $t2, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x312A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14C60: 11400003 beq $t2, $zero, 0xBFC14C70 */ - uint32_t psx_brA_BFC14C60 = cpu->gpr[10]; uint32_t psx_brB_BFC14C60 = cpu->gpr[0]; - psx_taken_BFC14C60 = (psx_brA_BFC14C60 == psx_brB_BFC14C60); - psx_delay_BFC14C60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14C64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005164u); -#endif - if (psx_delay_BFC14C60) { - psx_delay_BFC14C60 = 0; - if (psx_taken_BFC14C60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005170u); - goto label_BFC14C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005168u); - } -label_BFC14C68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14C68: 1000001E beq $zero, $zero, 0xBFC14CE4 */ - uint32_t psx_brA_BFC14C68 = cpu->gpr[0]; uint32_t psx_brB_BFC14C68 = cpu->gpr[0]; - psx_taken_BFC14C68 = (psx_brA_BFC14C68 == psx_brB_BFC14C68); - psx_delay_BFC14C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14C6C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000516Cu); -#endif - if (psx_delay_BFC14C68) { - psx_delay_BFC14C68 = 0; - if (psx_taken_BFC14C68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000051E4u); - goto label_BFC14CE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005170u); - } -label_BFC14C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC14C70: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005170u); -#endif - /* 0xBFC14C74: 916B7264 lbu $t3, 29284($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 29284; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (29284)), 11, 0x800u); - PGXP_LOAD(0x916B7264u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC14C78: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005178u); -#endif - /* 0xBFC14C7C: 91AD7264 lbu $t5, 29284($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29284; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (29284)), 13, 0x2000u); - PGXP_LOAD(0x91AD7264u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14C80: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005180u); -#endif - /* 0xBFC14C84: 91EF7264 lbu $t7, 29284($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29284; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (29284)), 15, 0x8000u); - PGXP_LOAD(0x91EF7264u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14C88: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14C8C: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000518Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC14C90: 008C2021 addu $a0, $a0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[12]; - PGXP_ALU(0x008C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC14C94: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC14C98: 27187560 addiu $t8, $t8, 30048 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (30048)); - PGXP_ALU(0x27187560u, cpu->gpr[24], _pgx1, 0x00007560u); } -#ifdef PSX_COSIM - cosim_instr(0x00005198u); -#endif - /* 0xBFC14C9C: 8C847550 lw $a0, 30032($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 30032; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (30032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000519Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847550u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000519Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14CA0: 000F7080 sll $t6, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000051A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004040u); -#endif - /* 0xBFC14CA4: 01D83021 addu $a2, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[6] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D83021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000051A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14CA8: 0C0018E4 jal 0xB0006390 */ - cpu->gpr[31] = 0x000051B0u; /* jal link before delay slot */ - psx_delay_BFC14CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20A0u); -#endif - /* 0xBFC14CAC: 00ED2821 addu $a1, $a3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[13]; - PGXP_ALU(0x00ED2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000051ACu); -#endif - if (psx_delay_BFC14CA8) { - psx_delay_BFC14CA8 = 0; - cpu->gpr[31] = 0x000051B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006390u); - cpu->pc = 0x00006390u; return; - } -label_BFC14CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000051B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000051B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14CB0: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14CB4: 24A57540 addiu $a1, $a1, 30016 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30016)); - PGXP_ALU(0x24A57540u, cpu->gpr[5], _pgx1, 0x00007540u); } -#ifdef PSX_COSIM - cosim_instr(0x000051B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14CB8: 0C000511 jal 0xB0001444 */ - cpu->gpr[31] = 0x000051C0u; /* jal link before delay slot */ - psx_delay_BFC14CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14CBC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000051BCu); -#endif - if (psx_delay_BFC14CB8) { - psx_delay_BFC14CB8 = 0; - cpu->gpr[31] = 0x000051C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001444u); - cpu->pc = 0x00001444u; return; - } -label_BFC14CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000051C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000051C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14CC0: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14CC4: 24A57540 addiu $a1, $a1, 30016 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30016)); - PGXP_ALU(0x24A57540u, cpu->gpr[5], _pgx1, 0x00007540u); } -#ifdef PSX_COSIM - cosim_instr(0x000051C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14CC8: 0C000508 jal 0xB0001420 */ - cpu->gpr[31] = 0x000051D0u; /* jal link before delay slot */ - psx_delay_BFC14CC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14CCC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000051CCu); -#endif - if (psx_delay_BFC14CC8) { - psx_delay_BFC14CC8 = 0; - cpu->gpr[31] = 0x000051D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001420u); - cpu->pc = 0x00001420u; return; - } -label_BFC14CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000051D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000051D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14CD0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14CD4: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000051D4u); return; } g_debug_last_store_pc = 0x000051D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000051D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14CD8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14CDC: 0C00135B jal 0xB0004D6C */ - cpu->gpr[31] = 0x000051E4u; /* jal link before delay slot */ - psx_delay_BFC14CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14CE0: AC207520 sw $zero, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000051E0u); return; } g_debug_last_store_pc = 0x000051E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207520u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000051E0u); -#endif - if (psx_delay_BFC14CDC) { - psx_delay_BFC14CDC = 0; - cpu->gpr[31] = 0x000051E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D6Cu); - cpu->pc = 0x00004D6Cu; return; - } -label_BFC14CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000051E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000051E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051E4u); -#endif - /* 0xBFC14CE4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000051E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000051E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14CE8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x000051E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC14CEC: 03E00008 jr $ra */ - psx_delay_BFC14CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14CF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000051F0u); -#endif - if (psx_delay_BFC14CEC) { - psx_delay_BFC14CEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000051F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000051F4u); - int psx_delay_BFC14D20 = 0; - int psx_taken_BFC14D20 = 0; - int psx_delay_BFC14D3C = 0; - int psx_delay_BFC14D44 = 0; - int psx_taken_BFC14D44 = 0; - int psx_delay_BFC14D4C = 0; - int psx_taken_BFC14D4C = 0; - int psx_delay_BFC14DBC = 0; - int psx_taken_BFC14DBC = 0; - int psx_delay_BFC14DF0 = 0; - int psx_taken_BFC14DF0 = 0; - int psx_delay_BFC14E38 = 0; - int psx_taken_BFC14E38 = 0; - int psx_delay_BFC14E44 = 0; - int psx_taken_BFC14E44 = 0; - int psx_delay_BFC14E6C = 0; - int psx_delay_BFC14E7C = 0; - int psx_delay_BFC14E90 = 0; - int psx_taken_BFC14E90 = 0; - int psx_delay_BFC14EC4 = 0; - int psx_taken_BFC14EC4 = 0; - int psx_delay_BFC14ECC = 0; - int psx_taken_BFC14ECC = 0; - int psx_delay_BFC14F08 = 0; - int psx_taken_BFC14F08 = 0; - int psx_delay_BFC14F10 = 0; - int psx_taken_BFC14F10 = 0; - int psx_delay_BFC14F24 = 0; - int psx_taken_BFC14F24 = 0; - int psx_delay_BFC14F78 = 0; - int psx_delay_BFC14F80 = 0; - int psx_taken_BFC14F80 = 0; - int psx_delay_BFC14FC4 = 0; - int psx_taken_BFC14FC4 = 0; - int psx_delay_BFC14FF4 = 0; - int psx_taken_BFC14FF4 = 0; - int psx_delay_BFC15028 = 0; - int psx_taken_BFC15028 = 0; - int psx_delay_BFC15030 = 0; - int psx_taken_BFC15030 = 0; - int psx_delay_BFC15064 = 0; - int psx_taken_BFC15064 = 0; - int psx_delay_BFC1506C = 0; - int psx_taken_BFC1506C = 0; - int psx_delay_BFC15080 = 0; - int psx_taken_BFC15080 = 0; - int psx_delay_BFC15094 = 0; - int psx_taken_BFC15094 = 0; - int psx_delay_BFC150A8 = 0; - int psx_taken_BFC150A8 = 0; - int psx_delay_BFC150C8 = 0; - int psx_taken_BFC150C8 = 0; - int psx_delay_BFC150FC = 0; - int psx_delay_BFC15110 = 0; - int psx_delay_BFC1512C = 0; - int psx_taken_BFC1512C = 0; - int psx_delay_BFC15134 = 0; - int psx_taken_BFC15134 = 0; - int psx_delay_BFC1513C = 0; - int psx_taken_BFC1513C = 0; - int psx_delay_BFC15144 = 0; - int psx_taken_BFC15144 = 0; - int psx_delay_BFC1514C = 0; - int psx_taken_BFC1514C = 0; - int psx_delay_BFC15154 = 0; - int psx_taken_BFC15154 = 0; - int psx_delay_BFC1515C = 0; - int psx_taken_BFC1515C = 0; - int psx_delay_BFC15164 = 0; - int psx_taken_BFC15164 = 0; - int psx_delay_BFC1516C = 0; - int psx_taken_BFC1516C = 0; - int psx_delay_BFC15180 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC14D28u: goto label_BFC14D28; - case 0xBFC14D44u: goto label_BFC14D44; - case 0xBFC14D4Cu: goto label_BFC14D4C; - case 0xBFC14D54u: goto label_BFC14D54; - case 0xBFC14D58u: goto label_BFC14D58; - case 0xBFC14DC4u: goto label_BFC14DC4; - case 0xBFC14DF8u: goto label_BFC14DF8; - case 0xBFC14E40u: goto label_BFC14E40; - case 0xBFC14E4Cu: goto label_BFC14E4C; - case 0xBFC14E74u: goto label_BFC14E74; - case 0xBFC14E84u: goto label_BFC14E84; - case 0xBFC14E98u: goto label_BFC14E98; - case 0xBFC14ECCu: goto label_BFC14ECC; - case 0xBFC14ED4u: goto label_BFC14ED4; - case 0xBFC14F10u: goto label_BFC14F10; - case 0xBFC14F18u: goto label_BFC14F18; - case 0xBFC14F2Cu: goto label_BFC14F2C; - case 0xBFC14F80u: goto label_BFC14F80; - case 0xBFC14F88u: goto label_BFC14F88; - case 0xBFC14FCCu: goto label_BFC14FCC; - case 0xBFC14FFCu: goto label_BFC14FFC; - case 0xBFC15030u: goto label_BFC15030; - case 0xBFC15038u: goto label_BFC15038; - case 0xBFC1506Cu: goto label_BFC1506C; - case 0xBFC15074u: goto label_BFC15074; - case 0xBFC15088u: goto label_BFC15088; - case 0xBFC1509Cu: goto label_BFC1509C; - case 0xBFC150B0u: goto label_BFC150B0; - case 0xBFC150D0u: goto label_BFC150D0; - case 0xBFC15104u: goto label_BFC15104; - case 0xBFC15118u: goto label_BFC15118; - case 0xBFC15128u: goto label_BFC15128; - case 0xBFC1512Cu: goto label_BFC1512C; - case 0xBFC15134u: goto label_BFC15134; - case 0xBFC1513Cu: goto label_BFC1513C; - case 0xBFC15144u: goto label_BFC15144; - case 0xBFC1514Cu: goto label_BFC1514C; - case 0xBFC15154u: goto label_BFC15154; - case 0xBFC1515Cu: goto label_BFC1515C; - case 0xBFC15164u: goto label_BFC15164; - case 0xBFC1516Cu: goto label_BFC1516C; - case 0xBFC15174u: goto label_BFC15174; - case 0xBFC15178u: goto label_BFC15178; - default: break; - } - } -label_BFC14CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000051F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000051F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000051F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC14CF4: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051F4u); -#endif - /* 0xBFC14CF8: 90C67264 lbu $a2, 29284($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 29284; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (29284)), 6, 0x40u); - PGXP_LOAD(0x90C67264u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000051F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14CFC: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000051FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005200u); -#endif - /* 0xBFC14D00: 8C427514 lw $v0, 29972($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005200u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427514u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC14D04: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC14D08: 00067080 sll $t6, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC14D0C: 00AE2821 addu $a1, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[14]; - PGXP_ALU(0x00AE2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000520Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC14D10: 244FFFFF addiu $t7, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x244FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC14D14: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00005214u); -#endif - /* 0xBFC14D18: 94A57508 lhu $a1, 29960($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 29960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (29960)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005218u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x94A57508u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00005218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC14D1C: 2DE1000A sltiu $at, $t7, 10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0); - PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000521Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14D20: 10200112 beq $at, $zero, 0xBFC1516C */ - uint32_t psx_brA_BFC14D20 = cpu->gpr[1]; uint32_t psx_brB_BFC14D20 = cpu->gpr[0]; - psx_taken_BFC14D20 = (psx_brA_BFC14D20 == psx_brB_BFC14D20); - psx_delay_BFC14D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC14D24: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005224u); return; } g_debug_last_store_pc = 0x00005224u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005224u); -#endif - if (psx_delay_BFC14D20) { - psx_delay_BFC14D20 = 0; - if (psx_taken_BFC14D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000566Cu); - goto label_BFC1516C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005228u); - } -label_BFC14D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14D28: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14D2C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000522Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC14D30: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005230u); -#endif - /* 0xBFC14D34: 8C2F6C70 lw $t7, 27760($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27760; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005234u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x2u); } - PGXP_LOAD(0x8C2F6C70u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14D38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14D3C: 01E00008 jr $t7 */ - psx_delay_BFC14D3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005240u); -#endif - if (psx_delay_BFC14D3C) { - psx_delay_BFC14D3C = 0; - /* jump table at 0x00006C70, 10 entries */ - switch (cpu->gpr[15]) { - case 0x00005244u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005244u); - goto label_BFC14D44; - case 0x000052C4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000052C4u); - goto label_BFC14DC4; - case 0x000052F8u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000052F8u); - goto label_BFC14DF8; - case 0x00005398u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005398u); - goto label_BFC14E98; - case 0x000053D4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000053D4u); - goto label_BFC14ED4; - case 0x0000542Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000542Cu); - goto label_BFC14F2C; - case 0x00005488u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005488u); - goto label_BFC14F88; - case 0x000054CCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000054CCu); - goto label_BFC14FCC; - case 0x000054FCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000054FCu); - goto label_BFC14FFC; - case 0x00005538u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005538u); - goto label_BFC15038; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[15]); - cpu->pc = cpu->gpr[15]; return; - } - } -label_BFC14D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC14D44: 14C00004 bne $a2, $zero, 0xBFC14D58 */ - uint32_t psx_brA_BFC14D44 = cpu->gpr[6]; uint32_t psx_brB_BFC14D44 = cpu->gpr[0]; - psx_taken_BFC14D44 = (psx_brA_BFC14D44 != psx_brB_BFC14D44); - psx_delay_BFC14D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14D48: 24022000 addiu $v0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24022000u, cpu->gpr[2], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005248u); -#endif - if (psx_delay_BFC14D44) { - psx_delay_BFC14D44 = 0; - if (psx_taken_BFC14D44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005258u); - goto label_BFC14D58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000524Cu); - } -label_BFC14D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000524Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14D4C: 10000002 beq $zero, $zero, 0xBFC14D58 */ - uint32_t psx_brA_BFC14D4C = cpu->gpr[0]; uint32_t psx_brB_BFC14D4C = cpu->gpr[0]; - psx_taken_BFC14D4C = (psx_brA_BFC14D4C == psx_brB_BFC14D4C); - psx_delay_BFC14D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14D50: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005250u); -#endif - if (psx_delay_BFC14D4C) { - psx_delay_BFC14D4C = 0; - if (psx_taken_BFC14D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005258u); - goto label_BFC14D58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005254u); - } -label_BFC14D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14D54: 24022000 addiu $v0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24022000u, cpu->gpr[2], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005254u); -#endif -label_BFC14D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14D58: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005258u); -#endif - /* 0xBFC14D5C: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000525Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000525Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC14D60: 34581003 ori $t8, $v0, 0x1003 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] | 0x1003u; - PGXP_ALU(0x34581003u, cpu->gpr[24], _pgx1, 0x1003u); } -#ifdef PSX_COSIM - cosim_instr(0x00005260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC14D64: 00064080 sll $t0, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00064080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC14D68: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC14D6C: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000526Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC14D70: A498000A sh $t8, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005270u); return; } g_debug_last_store_pc = 0x00005270u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA498000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005270u); -#endif - /* 0xBFC14D74: 8D297500 lw $t1, 29952($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005274u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D297500u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC14D78: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14D7C: 312A000F andi $t2, $t1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFu; - PGXP_ALU(0x312A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC14D80: 000A5E00 sll $t3, $t2, 24 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 24u; - PGXP_ALU(0x000A5E00u, cpu->gpr[11], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14D84: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14D88: 000B6603 sra $t4, $t3, 24 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 24u); - PGXP_ALU(0x000B6603u, cpu->gpr[12], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005288u); -#endif - /* 0xBFC14D8C: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x0000528Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC14D90: A039755A sb $t9, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005290u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA039755Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC14D94: 258D0081 addiu $t5, $t4, 129 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (129)); - PGXP_ALU(0x258D0081u, cpu->gpr[13], _pgx1, 0x00000081u); } -#ifdef PSX_COSIM - cosim_instr(0x00005294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC14D98: A08D0000 sb $t5, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005298u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA08D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005298u); -#endif - /* 0xBFC14D9C: 948E000A lhu $t6, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000529Cu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x948E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC14DA0: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000052A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14DA4: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000052A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC14DA8: A48F000A sh $t7, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000052A8u); return; } g_debug_last_store_pc = 0x000052A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000052A8u); -#endif - /* 0xBFC14DAC: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052ACu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000052ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC14DB0: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000052B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14DB4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000052B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC14DB8: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052B8u); return; } g_debug_last_store_pc = 0x000052B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000052B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14DBC: 100000ED beq $zero, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14DBC = cpu->gpr[0]; uint32_t psx_brB_BFC14DBC = cpu->gpr[0]; - psx_taken_BFC14DBC = (psx_brA_BFC14DBC == psx_brB_BFC14DBC); - psx_delay_BFC14DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC14DC0: AC2274A0 sw $v0, 29856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052C0u); return; } g_debug_last_store_pc = 0x000052C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC2274A0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000052C0u); -#endif - if (psx_delay_BFC14DBC) { - psx_delay_BFC14DBC = 0; - if (psx_taken_BFC14DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000052C4u); - } -label_BFC14DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000052C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000052C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14DC4: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000052C4u); -#endif - /* 0xBFC14DC8: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000052C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14DCC: 24080057 addiu $t0, $zero, 87 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (87)); - PGXP_ALU(0x24080057u, cpu->gpr[8], _pgx1, 0x00000057u); } -#ifdef PSX_COSIM - cosim_instr(0x000052CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052D0u); -#endif - /* 0xBFC14DD0: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x000052D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC14DD4: A0880000 sb $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000052D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000052D4u); -#endif - /* 0xBFC14DD8: 9489000A lhu $t1, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000052D8u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x9489000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000052D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC14DDC: 3C0C0000 lui $t4, 0x0 */ - cpu->gpr[12] = 0x00000000u; - PGXP_ALU(0x3C0C0000u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000052DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14DE0: 352A0010 ori $t2, $t1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] | 0x10u; - PGXP_ALU(0x352A0010u, cpu->gpr[10], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000052E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC14DE4: A48A000A sh $t2, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000052E4u); return; } g_debug_last_store_pc = 0x000052E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000052E4u); -#endif - /* 0xBFC14DE8: 8D8C725C lw $t4, 29276($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052E8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C725Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000052E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC14DEC: 240BFF7F addiu $t3, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240BFF7Fu, cpu->gpr[11], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000052ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14DF0: 100000E0 beq $zero, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14DF0 = cpu->gpr[0]; uint32_t psx_brB_BFC14DF0 = cpu->gpr[0]; - psx_taken_BFC14DF0 = (psx_brA_BFC14DF0 == psx_brB_BFC14DF0); - psx_delay_BFC14DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC14DF4: AD8B0000 sw $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052F4u); return; } g_debug_last_store_pc = 0x000052F4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000052F4u); -#endif - if (psx_delay_BFC14DF0) { - psx_delay_BFC14DF0 = 0; - if (psx_taken_BFC14DF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000052F8u); - } -label_BFC14DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000052F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000052F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000052F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14DF8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000052F8u); -#endif - /* 0xBFC14DFC: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000052FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000052FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC14E00: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005300u); -#endif - /* 0xBFC14E04: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14E08: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005308u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005308u); -#endif - /* 0xBFC14E0C: 948D000A lhu $t5, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000530Cu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000530Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14E10: 240FFF7F addiu $t7, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240FFF7Fu, cpu->gpr[15], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14E14: 35AE0010 ori $t6, $t5, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x10u; - PGXP_ALU(0x35AE0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC14E18: A48E000A sh $t6, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005318u); return; } g_debug_last_store_pc = 0x00005318u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005318u); -#endif - /* 0xBFC14E1C: 8F18725C lw $t8, 29276($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000531Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18725Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000531Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC14E20: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14E24: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005324u); return; } g_debug_last_store_pc = 0x00005324u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005324u); -#endif - /* 0xBFC14E28: 8D0874C0 lw $t0, 29888($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005328u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0874C0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC14E2C: 0006C880 sll $t9, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] << 2u; - PGXP_ALU(0x0006C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000532Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14E30: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC14E34: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14E38: 150000CE bne $t0, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14E38 = cpu->gpr[8]; uint32_t psx_brB_BFC14E38 = cpu->gpr[0]; - psx_taken_BFC14E38 = (psx_brA_BFC14E38 != psx_brB_BFC14E38); - psx_delay_BFC14E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC14E3C: AC2374F8 sw $v1, 29944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000533Cu); return; } g_debug_last_store_pc = 0x0000533Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC2374F8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000533Cu); -#endif - if (psx_delay_BFC14E38) { - psx_delay_BFC14E38 = 0; - if (psx_taken_BFC14E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005340u); - } -label_BFC14E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC14E40: 30690008 andi $t1, $v1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] & 0x8u; - PGXP_ALU(0x30690008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x00005340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC14E44: 112000CB beq $t1, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14E44 = cpu->gpr[9]; uint32_t psx_brB_BFC14E44 = cpu->gpr[0]; - psx_taken_BFC14E44 = (psx_brA_BFC14E44 == psx_brB_BFC14E44); - psx_delay_BFC14E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14E48: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005348u); -#endif - if (psx_delay_BFC14E44) { - psx_delay_BFC14E44 = 0; - if (psx_taken_BFC14E44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000534Cu); - } -label_BFC14E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000534Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14E4C: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000534Cu); return; } g_debug_last_store_pc = 0x0000534Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14E50: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC14E54: 00260821 addu $at, $at, $a2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[6]; - PGXP_ALU(0x00260821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC14E58: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC14E5C: A02A7568 sb $t2, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000535Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA02A7568u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000535Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC14E60: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005360u); -#endif - /* 0xBFC14E64: 916B7264 lbu $t3, 29284($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 29284; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (29284)), 11, 0x800u); - PGXP_LOAD(0x916B7264u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14E68: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14E6C: 0C001AD8 jal 0xB0006B60 */ - cpu->gpr[31] = 0x00005374u; /* jal link before delay slot */ - psx_delay_BFC14E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC14E70: AC2B751C sw $t3, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005370u); return; } g_debug_last_store_pc = 0x00005370u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B751Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005370u); -#endif - if (psx_delay_BFC14E6C) { - psx_delay_BFC14E6C = 0; - cpu->gpr[31] = 0x00005374u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B60u); - cpu->pc = 0x00006B60u; return; - } -label_BFC14E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14E74: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14E78: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00005378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14E7C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00005384u; /* jal link before delay slot */ - psx_delay_BFC14E7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC14E80: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005380u); -#endif - if (psx_delay_BFC14E7C) { - psx_delay_BFC14E7C = 0; - cpu->gpr[31] = 0x00005384u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC14E84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC14E84: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14E88: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC14E8C: AC2C7520 sw $t4, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000538Cu); return; } g_debug_last_store_pc = 0x0000538Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C7520u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000538Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14E90: 100000B9 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC14E90 = cpu->gpr[0]; uint32_t psx_brB_BFC14E90 = cpu->gpr[0]; - psx_taken_BFC14E90 = (psx_brA_BFC14E90 == psx_brB_BFC14E90); - psx_delay_BFC14E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14E94: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005394u); -#endif - if (psx_delay_BFC14E90) { - psx_delay_BFC14E90 = 0; - if (psx_taken_BFC14E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005398u); - } -label_BFC14E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14E98: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005398u); -#endif - /* 0xBFC14E9C: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000539Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000539Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC14EA0: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000053A0u); -#endif - /* 0xBFC14EA4: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000053A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14EA8: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000053A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000053A8u); -#endif - /* 0xBFC14EAC: 948D000A lhu $t5, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000053ACu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000053ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC14EB0: 240FFF7F addiu $t7, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240FFF7Fu, cpu->gpr[15], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000053B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC14EB4: 35AE0010 ori $t6, $t5, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x10u; - PGXP_ALU(0x35AE0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000053B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC14EB8: A48E000A sh $t6, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000053B8u); return; } g_debug_last_store_pc = 0x000053B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000053B8u); -#endif - /* 0xBFC14EBC: 8F18725C lw $t8, 29276($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000053BCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18725Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000053BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14EC0: 2401005A addiu $at, $zero, 90 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); - PGXP_ALU(0x2401005Au, cpu->gpr[1], _pgx1, 0x0000005Au); } -#ifdef PSX_COSIM - cosim_instr(0x000053C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC14EC4: 106100AB beq $v1, $at, 0xBFC15174 */ - uint32_t psx_brA_BFC14EC4 = cpu->gpr[3]; uint32_t psx_brB_BFC14EC4 = cpu->gpr[1]; - psx_taken_BFC14EC4 = (psx_brA_BFC14EC4 == psx_brB_BFC14EC4); - psx_delay_BFC14EC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC14EC8: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000053C8u); return; } g_debug_last_store_pc = 0x000053C8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000053C8u); -#endif - if (psx_delay_BFC14EC4) { - psx_delay_BFC14EC4 = 0; - if (psx_taken_BFC14EC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000053CCu); - } -label_BFC14ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000053CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000053CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14ECC: 100000AA beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC14ECC = cpu->gpr[0]; uint32_t psx_brB_BFC14ECC = cpu->gpr[0]; - psx_taken_BFC14ECC = (psx_brA_BFC14ECC == psx_brB_BFC14ECC); - psx_delay_BFC14ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14ED0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000053D0u); -#endif - if (psx_delay_BFC14ECC) { - psx_delay_BFC14ECC = 0; - if (psx_taken_BFC14ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000053D4u); - } -label_BFC14ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000053D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000053D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14ED4: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000053D4u); -#endif - /* 0xBFC14ED8: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000053D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000053D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC14EDC: 00051202 srl $v0, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] >> 8u; - PGXP_ALU(0x00051202u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x000053DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053E0u); -#endif - /* 0xBFC14EE0: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000053E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC14EE4: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000053E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC14EE8: A0820000 sb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000053E8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000053E8u); -#endif - /* 0xBFC14EEC: 9499000A lhu $t9, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000053ECu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x9499000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000053ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000053F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC14EF0: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000053F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC14EF4: 37280010 ori $t0, $t9, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] | 0x10u; - PGXP_ALU(0x37280010u, cpu->gpr[8], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000053F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC14EF8: A488000A sh $t0, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000053F8u); return; } g_debug_last_store_pc = 0x000053F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA488000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000053F8u); -#endif - /* 0xBFC14EFC: 8D4A725C lw $t2, 29276($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000053FCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A725Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000053FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC14F00: 2409FF7F addiu $t1, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2409FF7Fu, cpu->gpr[9], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC14F04: 2401005D addiu $at, $zero, 93 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); - PGXP_ALU(0x2401005Du, cpu->gpr[1], _pgx1, 0x0000005Du); } -#ifdef PSX_COSIM - cosim_instr(0x00005404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC14F08: 10610003 beq $v1, $at, 0xBFC14F18 */ - uint32_t psx_brA_BFC14F08 = cpu->gpr[3]; uint32_t psx_brB_BFC14F08 = cpu->gpr[1]; - psx_taken_BFC14F08 = (psx_brA_BFC14F08 == psx_brB_BFC14F08); - psx_delay_BFC14F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC14F0C: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000540Cu); return; } g_debug_last_store_pc = 0x0000540Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x0000540Cu); -#endif - if (psx_delay_BFC14F08) { - psx_delay_BFC14F08 = 0; - if (psx_taken_BFC14F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005418u); - goto label_BFC14F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005410u); - } -label_BFC14F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14F10: 10000099 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC14F10 = cpu->gpr[0]; uint32_t psx_brB_BFC14F10 = cpu->gpr[0]; - psx_taken_BFC14F10 = (psx_brA_BFC14F10 == psx_brB_BFC14F10); - psx_delay_BFC14F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14F14: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005414u); -#endif - if (psx_delay_BFC14F10) { - psx_delay_BFC14F10 = 0; - if (psx_taken_BFC14F10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005418u); - } -label_BFC14F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC14F18: 00065880 sll $t3, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00065880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC14F1C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC14F20: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14F24: 10000093 beq $zero, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14F24 = cpu->gpr[0]; uint32_t psx_brB_BFC14F24 = cpu->gpr[0]; - psx_taken_BFC14F24 = (psx_brA_BFC14F24 == psx_brB_BFC14F24); - psx_delay_BFC14F24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC14F28: AC227560 sw $v0, 30048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005428u); return; } g_debug_last_store_pc = 0x00005428u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC227560u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005428u); -#endif - if (psx_delay_BFC14F24) { - psx_delay_BFC14F24 = 0; - if (psx_taken_BFC14F24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000542Cu); - } -label_BFC14F2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000542Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14F2C: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005430u); -#endif - /* 0xBFC14F30: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005430u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC14F34: 30A300FF andi $v1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005434u); -#endif - /* 0xBFC14F38: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x00005438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC14F3C: A0830000 sb $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000543Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA0830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000543Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005440u); -#endif - /* 0xBFC14F40: 948C000A lhu $t4, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005440u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x948C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14F44: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC14F48: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC14F4C: A48D000A sh $t5, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000544Cu); return; } g_debug_last_store_pc = 0x0000544Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000544Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005450u); -#endif - /* 0xBFC14F50: 8DEF725C lw $t7, 29276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005450u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF725Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC14F54: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14F58: 240EFF7F addiu $t6, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC14F5C: 27397560 addiu $t9, $t9, 30048 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (30048)); - PGXP_ALU(0x27397560u, cpu->gpr[25], _pgx1, 0x00007560u); } -#ifdef PSX_COSIM - cosim_instr(0x0000545Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC14F60: 0006C080 sll $t8, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 2u; - PGXP_ALU(0x0006C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC14F64: 03191021 addu $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03191021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14F68: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005468u); return; } g_debug_last_store_pc = 0x00005468u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005468u); -#endif - /* 0xBFC14F6C: 8C480000 lw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000546Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000546Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x308u); -#endif - /* 0xBFC14F74: 01034826 xor $t1, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[3]; - PGXP_ALU(0x01034826u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC14F78: 0C0018E0 jal 0xB0006380 */ - cpu->gpr[31] = 0x00005480u; /* jal link before delay slot */ - psx_delay_BFC14F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC14F7C: AC490000 sw $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000547Cu); return; } g_debug_last_store_pc = 0x0000547Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x0000547Cu); -#endif - if (psx_delay_BFC14F78) { - psx_delay_BFC14F78 = 0; - debug_server_log_probe(0xBFC14F78u, cpu); - cpu->gpr[31] = 0x00005480u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006380u); - cpu->pc = 0x00006380u; return; - } -label_BFC14F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005480u); -#endif - debug_server_log_probe(0xBFC14F80u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14F80: 1000007D beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC14F80 = cpu->gpr[0]; uint32_t psx_brB_BFC14F80 = cpu->gpr[0]; - psx_taken_BFC14F80 = (psx_brA_BFC14F80 == psx_brB_BFC14F80); - psx_delay_BFC14F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC14F84: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005484u); -#endif - if (psx_delay_BFC14F80) { - psx_delay_BFC14F80 = 0; - if (psx_taken_BFC14F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005488u); - } -label_BFC14F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14F88: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005488u); -#endif - /* 0xBFC14F8C: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000548Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000548Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC14F90: 00065080 sll $t2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00065080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC14F94: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC14F98: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005498u); -#endif - /* 0xBFC14F9C: 8D6B7560 lw $t3, 30048($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 30048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (30048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000549Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B7560u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000549Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054A0u); -#endif - /* 0xBFC14FA0: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x000054A0u); -#endif - /* 0xBFC14FA4: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x000054A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC14FA8: A08B0000 sb $t3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000054A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA08B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000054A8u); -#endif - /* 0xBFC14FAC: 948C000A lhu $t4, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000054ACu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x948C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000054ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC14FB0: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000054B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC14FB4: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000054B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC14FB8: A48D000A sh $t5, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000054B8u); return; } g_debug_last_store_pc = 0x000054B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000054B8u); -#endif - /* 0xBFC14FBC: 8DEF725C lw $t7, 29276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000054BCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF725Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000054BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC14FC0: 240EFF7F addiu $t6, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000054C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14FC4: 1000006B beq $zero, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14FC4 = cpu->gpr[0]; uint32_t psx_brB_BFC14FC4 = cpu->gpr[0]; - psx_taken_BFC14FC4 = (psx_brA_BFC14FC4 == psx_brB_BFC14FC4); - psx_delay_BFC14FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC14FC8: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000054C8u); return; } g_debug_last_store_pc = 0x000054C8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000054C8u); -#endif - if (psx_delay_BFC14FC4) { - psx_delay_BFC14FC4 = 0; - if (psx_taken_BFC14FC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000054CCu); - } -label_BFC14FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000054CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000054CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14FCC: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000054CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054D0u); -#endif - /* 0xBFC14FD0: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000054D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000054D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC14FD4: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000054D4u); -#endif - /* 0xBFC14FD8: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x000054D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC14FDC: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000054DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000054DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054E0u); -#endif - /* 0xBFC14FE0: 9498000A lhu $t8, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000054E0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x9498000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000054E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC14FE4: 2408FF7F addiu $t0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2408FF7Fu, cpu->gpr[8], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000054E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC14FE8: 37190010 ori $t9, $t8, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x10u; - PGXP_ALU(0x37190010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000054E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC14FEC: A499000A sh $t9, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000054ECu); return; } g_debug_last_store_pc = 0x000054ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA499000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000054ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054F0u); -#endif - /* 0xBFC14FF0: 8D29725C lw $t1, 29276($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000054F0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29725Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000054F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC14FF4: 1000005F beq $zero, $zero, 0xBFC15174 */ - uint32_t psx_brA_BFC14FF4 = cpu->gpr[0]; uint32_t psx_brB_BFC14FF4 = cpu->gpr[0]; - psx_taken_BFC14FF4 = (psx_brA_BFC14FF4 == psx_brB_BFC14FF4); - psx_delay_BFC14FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC14FF8: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000054F8u); return; } g_debug_last_store_pc = 0x000054F8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000054F8u); -#endif - if (psx_delay_BFC14FF4) { - psx_delay_BFC14FF4 = 0; - if (psx_taken_BFC14FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000054FCu); - } -label_BFC14FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000054FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000054FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000054FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC14FFC: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000054FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005500u); -#endif - /* 0xBFC15000: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005500u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15004: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005504u); -#endif - /* 0xBFC15008: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1500C: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000550Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000550Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005510u); -#endif - /* 0xBFC15010: 948A000A lhu $t2, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005510u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x948A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC15014: 240CFF7F addiu $t4, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240CFF7Fu, cpu->gpr[12], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15018: 354B0010 ori $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0x10u; - PGXP_ALU(0x354B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC1501C: A48B000A sh $t3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000551Cu); return; } g_debug_last_store_pc = 0x0000551Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000551Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005520u); -#endif - /* 0xBFC15020: 8DAD725C lw $t5, 29276($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005520u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD725Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15024: 2401005C addiu $at, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2401005Cu, cpu->gpr[1], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00005524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15028: 10610052 beq $v1, $at, 0xBFC15174 */ - uint32_t psx_brA_BFC15028 = cpu->gpr[3]; uint32_t psx_brB_BFC15028 = cpu->gpr[1]; - psx_taken_BFC15028 = (psx_brA_BFC15028 == psx_brB_BFC15028); - psx_delay_BFC15028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1502C: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000552Cu); return; } g_debug_last_store_pc = 0x0000552Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000552Cu); -#endif - if (psx_delay_BFC15028) { - psx_delay_BFC15028 = 0; - if (psx_taken_BFC15028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - goto label_BFC15174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005530u); - } -label_BFC15030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15030: 10000051 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC15030 = cpu->gpr[0]; uint32_t psx_brB_BFC15030 = cpu->gpr[0]; - psx_taken_BFC15030 = (psx_brA_BFC15030 == psx_brB_BFC15030); - psx_delay_BFC15030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15034: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005534u); -#endif - if (psx_delay_BFC15030) { - psx_delay_BFC15030 = 0; - if (psx_taken_BFC15030) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005538u); - } -label_BFC15038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15038: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005538u); -#endif - /* 0xBFC1503C: 8C847258 lw $a0, 29272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000553Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C847258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC15040: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005540u); -#endif - /* 0xBFC15044: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15048: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005548u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005548u); -#endif - /* 0xBFC1504C: 948E000A lhu $t6, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000554Cu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x948E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC15050: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC15054: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC15058: A48F000A sh $t7, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005558u); return; } g_debug_last_store_pc = 0x00005558u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005558u); -#endif - /* 0xBFC1505C: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000555Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x0000555Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15060: 2401005D addiu $at, $zero, 93 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); - PGXP_ALU(0x2401005Du, cpu->gpr[1], _pgx1, 0x0000005Du); } -#ifdef PSX_COSIM - cosim_instr(0x00005560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15064: 10610003 beq $v1, $at, 0xBFC15074 */ - uint32_t psx_brA_BFC15064 = cpu->gpr[3]; uint32_t psx_brB_BFC15064 = cpu->gpr[1]; - psx_taken_BFC15064 = (psx_brA_BFC15064 == psx_brB_BFC15064); - psx_delay_BFC15064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC15068: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005568u); return; } g_debug_last_store_pc = 0x00005568u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005568u); -#endif - if (psx_delay_BFC15064) { - psx_delay_BFC15064 = 0; - if (psx_taken_BFC15064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005574u); - goto label_BFC15074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000556Cu); - } -label_BFC1506C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000556Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1506C: 10000042 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC1506C = cpu->gpr[0]; uint32_t psx_brB_BFC1506C = cpu->gpr[0]; - psx_taken_BFC1506C = (psx_brA_BFC1506C == psx_brB_BFC1506C); - psx_delay_BFC1506C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15070: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005570u); -#endif - if (psx_delay_BFC1506C) { - psx_delay_BFC1506C = 0; - if (psx_taken_BFC1506C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005574u); - } -label_BFC15074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005574u); -#endif - /* 0xBFC15074: 94880004 lhu $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005574u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1507C: 31090002 andi $t1, $t0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x2u; - PGXP_ALU(0x31090002u, cpu->gpr[9], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000557Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC15080: 15200006 bne $t1, $zero, 0xBFC1509C */ - uint32_t psx_brA_BFC15080 = cpu->gpr[9]; uint32_t psx_brB_BFC15080 = cpu->gpr[0]; - psx_taken_BFC15080 = (psx_brA_BFC15080 != psx_brB_BFC15080); - psx_delay_BFC15080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005584u); -#endif - if (psx_delay_BFC15080) { - psx_delay_BFC15080 = 0; - if (psx_taken_BFC15080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000559Cu); - goto label_BFC1509C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005588u); - } -label_BFC15088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005588u); -#endif - /* 0xBFC15088: 948A0004 lhu $t2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005588u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x948A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1508C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000558Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15090: 314B0002 andi $t3, $t2, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u; - PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00005590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC15094: 1160FFFC beq $t3, $zero, 0xBFC15088 */ - uint32_t psx_brA_BFC15094 = cpu->gpr[11]; uint32_t psx_brB_BFC15094 = cpu->gpr[0]; - psx_taken_BFC15094 = (psx_brA_BFC15094 == psx_brB_BFC15094); - psx_delay_BFC15094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15098: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005598u); -#endif - if (psx_delay_BFC15094) { - psx_delay_BFC15094 = 0; - if (psx_taken_BFC15094) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005588u); - goto label_BFC15088; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000559Cu); - } -label_BFC1509C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000559Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1509C: 3C0C0000 lui $t4, 0x0 */ - cpu->gpr[12] = 0x00000000u; - PGXP_ALU(0x3C0C0000u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055A0u); -#endif - /* 0xBFC150A0: 8D8C74C0 lw $t4, 29888($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 29888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000055A0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C74C0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000055A0u); -#endif - /* 0xBFC150A4: 90830000 lbu $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 3, 0x10u); - PGXP_LOAD(0x90830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000055A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC150A8: 15800020 bne $t4, $zero, 0xBFC1512C */ - uint32_t psx_brA_BFC150A8 = cpu->gpr[12]; uint32_t psx_brB_BFC150A8 = cpu->gpr[0]; - psx_taken_BFC150A8 = (psx_brA_BFC150A8 != psx_brB_BFC150A8); - psx_delay_BFC150A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC150AC: 24010047 addiu $at, $zero, 71 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); - PGXP_ALU(0x24010047u, cpu->gpr[1], _pgx1, 0x00000047u); } -#ifdef PSX_COSIM - cosim_instr(0x000055ACu); -#endif - if (psx_delay_BFC150A8) { - psx_delay_BFC150A8 = 0; - if (psx_taken_BFC150A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000562Cu); - goto label_BFC1512C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000055B0u); - } -label_BFC150B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000055B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000055B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC150B0: 00066880 sll $t5, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000055B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC150B4: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC150B8: 004D1021 addu $v0, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[13]; - PGXP_ALU(0x004D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000055B8u); -#endif - /* 0xBFC150BC: 904274F8 lbu $v0, 29944($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29944; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (29944)), 2, 0x4u); - PGXP_LOAD(0x904274F8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000055BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC150C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000055C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC150C4: 304E0004 andi $t6, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x304E0004u, cpu->gpr[14], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x000055C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC150C8: 11C00017 beq $t6, $zero, 0xBFC15128 */ - uint32_t psx_brA_BFC150C8 = cpu->gpr[14]; uint32_t psx_brB_BFC150C8 = cpu->gpr[0]; - psx_taken_BFC150C8 = (psx_brA_BFC150C8 == psx_brB_BFC150C8); - psx_delay_BFC150C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC150CC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055CCu); -#endif - if (psx_delay_BFC150C8) { - psx_delay_BFC150C8 = 0; - if (psx_taken_BFC150C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005628u); - goto label_BFC15128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000055D0u); - } -label_BFC150D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000055D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000055D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC150D0: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055D0u); -#endif - /* 0xBFC150D4: 91EF7264 lbu $t7, 29284($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29284; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (29284)), 15, 0x8000u); - PGXP_LOAD(0x91EF7264u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000055D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC150D8: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000055D8u); return; } g_debug_last_store_pc = 0x000055D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000055D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC150DC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC150E0: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055E0u); -#endif - /* 0xBFC150E4: 93397264 lbu $t9, 29284($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29284; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (29284)), 25, 0x2000000u); - PGXP_LOAD(0x93397264u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000055E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC150E8: AC2F751C sw $t7, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000055E8u); return; } g_debug_last_store_pc = 0x000055E8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F751Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000055E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC150EC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000055ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000055F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC150F0: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000055F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC150F4: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000055F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC150F8: A0387568 sb $t8, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000055F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0387568u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000055F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC150FC: 0C001ADC jal 0xB0006B70 */ - cpu->gpr[31] = 0x00005604u; /* jal link before delay slot */ - psx_delay_BFC150FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC15100: A3A30018 sb $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005600u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (24)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA3A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005600u); -#endif - if (psx_delay_BFC150FC) { - psx_delay_BFC150FC = 0; - cpu->gpr[31] = 0x00005604u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B70u); - cpu->pc = 0x00006B70u; return; - } -label_BFC15104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005604u); -#endif - /* 0xBFC15104: 93A30018 lbu $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 3, 0x20000000u); - PGXP_LOAD(0x93A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15108: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1510C: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000560Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15110: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00005618u; /* jal link before delay slot */ - psx_delay_BFC15110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC15114: 34058001 ori $a1, $zero, 0x8001 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8001u; - PGXP_ALU(0x34058001u, cpu->gpr[5], _pgx1, 0x8001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005614u); -#endif - if (psx_delay_BFC15110) { - psx_delay_BFC15110 = 0; - cpu->gpr[31] = 0x00005618u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC15118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC15118: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1511C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005620u); -#endif - /* 0xBFC15120: 93A30018 lbu $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 3, 0x20000000u); - PGXP_LOAD(0x93A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15124: AC287520 sw $t0, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005624u); return; } g_debug_last_store_pc = 0x00005624u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC287520u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005624u); -#endif -label_BFC15128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15128: 24010047 addiu $at, $zero, 71 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); - PGXP_ALU(0x24010047u, cpu->gpr[1], _pgx1, 0x00000047u); } -#ifdef PSX_COSIM - cosim_instr(0x00005628u); -#endif -label_BFC1512C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000562Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1512C: 10610007 beq $v1, $at, 0xBFC1514C */ - uint32_t psx_brA_BFC1512C = cpu->gpr[3]; uint32_t psx_brB_BFC1512C = cpu->gpr[1]; - psx_taken_BFC1512C = (psx_brA_BFC1512C == psx_brB_BFC1512C); - psx_delay_BFC1512C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15130: 2401004E addiu $at, $zero, 78 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (78)); - PGXP_ALU(0x2401004Eu, cpu->gpr[1], _pgx1, 0x0000004Eu); } -#ifdef PSX_COSIM - cosim_instr(0x00005630u); -#endif - if (psx_delay_BFC1512C) { - psx_delay_BFC1512C = 0; - if (psx_taken_BFC1512C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000564Cu); - goto label_BFC1514C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005634u); - } -label_BFC15134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15134: 10610007 beq $v1, $at, 0xBFC15154 */ - uint32_t psx_brA_BFC15134 = cpu->gpr[3]; uint32_t psx_brB_BFC15134 = cpu->gpr[1]; - psx_taken_BFC15134 = (psx_brA_BFC15134 == psx_brB_BFC15134); - psx_delay_BFC15134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15138: 240100FF addiu $at, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240100FFu, cpu->gpr[1], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005638u); -#endif - if (psx_delay_BFC15134) { - psx_delay_BFC15134 = 0; - if (psx_taken_BFC15134) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005654u); - goto label_BFC15154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000563Cu); - } -label_BFC1513C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000563Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000563Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000563Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1513C: 10610007 beq $v1, $at, 0xBFC1515C */ - uint32_t psx_brA_BFC1513C = cpu->gpr[3]; uint32_t psx_brB_BFC1513C = cpu->gpr[1]; - psx_taken_BFC1513C = (psx_brA_BFC1513C == psx_brB_BFC1513C); - psx_delay_BFC1513C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005640u); -#endif - if (psx_delay_BFC1513C) { - psx_delay_BFC1513C = 0; - if (psx_taken_BFC1513C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000565Cu); - goto label_BFC1515C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005644u); - } -label_BFC15144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15144: 10000007 beq $zero, $zero, 0xBFC15164 */ - uint32_t psx_brA_BFC15144 = cpu->gpr[0]; uint32_t psx_brB_BFC15144 = cpu->gpr[0]; - psx_taken_BFC15144 = (psx_brA_BFC15144 == psx_brB_BFC15144); - psx_delay_BFC15144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005648u); -#endif - if (psx_delay_BFC15144) { - psx_delay_BFC15144 = 0; - if (psx_taken_BFC15144) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005664u); - goto label_BFC15164; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000564Cu); - } -label_BFC1514C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000564Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1514C: 1000000A beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC1514C = cpu->gpr[0]; uint32_t psx_brB_BFC1514C = cpu->gpr[0]; - psx_taken_BFC1514C = (psx_brA_BFC1514C == psx_brB_BFC1514C); - psx_delay_BFC1514C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15150: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005650u); -#endif - if (psx_delay_BFC1514C) { - psx_delay_BFC1514C = 0; - if (psx_taken_BFC1514C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005654u); - } -label_BFC15154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15154: 10000008 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC15154 = cpu->gpr[0]; uint32_t psx_brB_BFC15154 = cpu->gpr[0]; - psx_taken_BFC15154 = (psx_brA_BFC15154 == psx_brB_BFC15154); - psx_delay_BFC15154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15158: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005658u); -#endif - if (psx_delay_BFC15154) { - psx_delay_BFC15154 = 0; - if (psx_taken_BFC15154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000565Cu); - } -label_BFC1515C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000565Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1515C: 10000006 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC1515C = cpu->gpr[0]; uint32_t psx_brB_BFC1515C = cpu->gpr[0]; - psx_taken_BFC1515C = (psx_brA_BFC1515C == psx_brB_BFC1515C); - psx_delay_BFC1515C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15160: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005660u); -#endif - if (psx_delay_BFC1515C) { - psx_delay_BFC1515C = 0; - if (psx_taken_BFC1515C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005664u); - } -label_BFC15164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15164: 10000004 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC15164 = cpu->gpr[0]; uint32_t psx_brB_BFC15164 = cpu->gpr[0]; - psx_taken_BFC15164 = (psx_brA_BFC15164 == psx_brB_BFC15164); - psx_delay_BFC15164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15168: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005668u); -#endif - if (psx_delay_BFC15164) { - psx_delay_BFC15164 = 0; - if (psx_taken_BFC15164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000566Cu); - } -label_BFC1516C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000566Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1516C: 10000002 beq $zero, $zero, 0xBFC15178 */ - uint32_t psx_brA_BFC1516C = cpu->gpr[0]; uint32_t psx_brB_BFC1516C = cpu->gpr[0]; - psx_taken_BFC1516C = (psx_brA_BFC1516C == psx_brB_BFC1516C); - psx_delay_BFC1516C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15170: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005670u); -#endif - if (psx_delay_BFC1516C) { - psx_delay_BFC1516C = 0; - if (psx_taken_BFC1516C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005678u); - goto label_BFC15178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005674u); - } -label_BFC15174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005674u); -#endif - debug_server_log_probe(0xBFC15174u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15174: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005674u); -#endif -label_BFC15178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005678u); -#endif - debug_server_log_probe(0xBFC15178u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005678u); -#endif - /* 0xBFC15178: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005678u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1517C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x0000567Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15180: 03E00008 jr $ra */ - psx_delay_BFC15180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005684u); -#endif - if (psx_delay_BFC15180) { - psx_delay_BFC15180 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005688(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005688u); - int psx_delay_BFC151C4 = 0; - int psx_taken_BFC151C4 = 0; - int psx_delay_BFC151E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC151CCu: goto label_BFC151CC; - default: break; - } - } -label_BFC15188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC15188: 3C070000 lui $a3, 0x0 */ - cpu->gpr[7] = 0x00000000u; - PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005688u); -#endif - /* 0xBFC1518C: 90E77264 lbu $a3, 29284($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 29284; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (29284)), 7, 0x80u); - PGXP_LOAD(0x90E77264u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x0000568Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15190: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005690u); -#endif - /* 0xBFC15194: 8C427514 lw $v0, 29972($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005694u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427514u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC15198: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1519C: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000569Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC151A0: 00077080 sll $t6, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000056A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC151A4: 00077880 sll $t7, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000056A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC151A8: 00CE3021 addu $a2, $a2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[14]; - PGXP_ALU(0x00CE3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000056A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC151AC: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000056ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC151B0: 2458FFFF addiu $t8, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2458FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000056B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC151B4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x000056B4u); -#endif - /* 0xBFC151B8: 94C67508 lhu $a2, 29960($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 29960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (29960)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000056B8u); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x94C67508u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000056B8u); -#endif - /* 0xBFC151BC: 8CA57550 lw $a1, 30032($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 30032; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (30032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000056BCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA57550u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000056BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC151C0: 2F01000D sltiu $at, $t8, 13 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0); - PGXP_ALU(0x2F01000Du, cpu->gpr[1], _pgx1, 0x000Du); } -#ifdef PSX_COSIM - cosim_instr(0x000056C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC151C4: 10200120 beq $at, $zero, 0xBFC15648 */ - uint32_t psx_brA_BFC151C4 = cpu->gpr[1]; uint32_t psx_brB_BFC151C4 = cpu->gpr[0]; - psx_taken_BFC151C4 = (psx_brA_BFC151C4 == psx_brB_BFC151C4); - psx_delay_BFC151C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC151C8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000056C8u); return; } g_debug_last_store_pc = 0x000056C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000056C8u); -#endif - if (psx_delay_BFC151C4) { - psx_delay_BFC151C4 = 0; - if (psx_taken_BFC151C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B48u); - cpu->pc = 0x00005B48u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000056CCu); - } -label_BFC151CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000056CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC151CC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000056CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC151D0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000056D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC151D4: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000056D4u); -#endif - /* 0xBFC151D8: 8C386C98 lw $t8, 27800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27800; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000056D8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x2u); } - PGXP_LOAD(0x8C386C98u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000056D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC151DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000056DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC151E0: 03000008 jr $t8 */ - psx_delay_BFC151E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC151E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000056E4u); -#endif - if (psx_delay_BFC151E0) { - psx_delay_BFC151E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[24]); - cpu->pc = cpu->gpr[24]; return; - } -} - -void SCPH1001_func_000056E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000056E8u); - int psx_delay_BFC151E8 = 0; - int psx_taken_BFC151E8 = 0; - int psx_delay_BFC151F0 = 0; - int psx_taken_BFC151F0 = 0; - int psx_delay_BFC15260 = 0; - int psx_taken_BFC15260 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC151F0u: goto label_BFC151F0; - case 0xBFC151F8u: goto label_BFC151F8; - case 0xBFC151FCu: goto label_BFC151FC; - default: break; - } - } -label_BFC151E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000056E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000056E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC151E8: 14E00004 bne $a3, $zero, 0xBFC151FC */ - uint32_t psx_brA_BFC151E8 = cpu->gpr[7]; uint32_t psx_brB_BFC151E8 = cpu->gpr[0]; - psx_taken_BFC151E8 = (psx_brA_BFC151E8 != psx_brB_BFC151E8); - psx_delay_BFC151E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC151EC: 24022000 addiu $v0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24022000u, cpu->gpr[2], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x000056ECu); -#endif - if (psx_delay_BFC151E8) { - psx_delay_BFC151E8 = 0; - if (psx_taken_BFC151E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000056FCu); - goto label_BFC151FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000056F0u); - } -label_BFC151F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000056F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000056F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC151F0: 10000002 beq $zero, $zero, 0xBFC151FC */ - uint32_t psx_brA_BFC151F0 = cpu->gpr[0]; uint32_t psx_brB_BFC151F0 = cpu->gpr[0]; - psx_taken_BFC151F0 = (psx_brA_BFC151F0 == psx_brB_BFC151F0); - psx_delay_BFC151F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC151F4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000056F4u); -#endif - if (psx_delay_BFC151F0) { - psx_delay_BFC151F0 = 0; - if (psx_taken_BFC151F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000056FCu); - goto label_BFC151FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000056F8u); - } -label_BFC151F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000056F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000056F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC151F8: 24022000 addiu $v0, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24022000u, cpu->gpr[2], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x000056F8u); -#endif -label_BFC151FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000056FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000056FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000056FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC151FC: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000056FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005700u); -#endif - /* 0xBFC15200: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005700u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC15204: 34591003 ori $t9, $v0, 0x1003 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] | 0x1003u; - PGXP_ALU(0x34591003u, cpu->gpr[25], _pgx1, 0x1003u); } -#ifdef PSX_COSIM - cosim_instr(0x00005704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC15208: 00074080 sll $t0, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00074080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1520C: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC15210: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15214: A479000A sh $t9, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005714u); return; } g_debug_last_store_pc = 0x00005714u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005714u); -#endif - /* 0xBFC15218: 8D297500 lw $t1, 29952($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005718u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D297500u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005718u); -#endif - /* 0xBFC1521C: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x0000571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC15220: 312A000F andi $t2, $t1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFu; - PGXP_ALU(0x312A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15224: 000A5E00 sll $t3, $t2, 24 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 24u; - PGXP_ALU(0x000A5E00u, cpu->gpr[11], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC15228: 000B6603 sra $t4, $t3, 24 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 24u); - PGXP_ALU(0x000B6603u, cpu->gpr[12], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1522C: 258D0081 addiu $t5, $t4, 129 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (129)); - PGXP_ALU(0x258D0081u, cpu->gpr[13], _pgx1, 0x00000081u); } -#ifdef PSX_COSIM - cosim_instr(0x0000572Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC15230: A06D0000 sb $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005730u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA06D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005730u); -#endif - /* 0xBFC15234: 946E000A lhu $t6, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005734u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC15238: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1523C: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000573Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC15240: A46F000A sh $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005740u); return; } g_debug_last_store_pc = 0x00005740u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005740u); -#endif - /* 0xBFC15244: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005744u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC15248: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1524C: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000574Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15250: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC15254: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005754u); return; } g_debug_last_store_pc = 0x00005754u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15258: A028755A sb $t0, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005758u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA028755Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1525C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000575Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15260: 100000FB beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC15260 = cpu->gpr[0]; uint32_t psx_brB_BFC15260 = cpu->gpr[0]; - psx_taken_BFC15260 = (psx_brA_BFC15260 == psx_brB_BFC15260); - psx_delay_BFC15260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC15264: AC2274A0 sw $v0, 29856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005764u); return; } g_debug_last_store_pc = 0x00005764u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC2274A0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005764u); -#endif - if (psx_delay_BFC15260) { - psx_delay_BFC15260 = 0; - if (psx_taken_BFC15260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005768u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005768u); - cpu->pc = 0x00005768u; return; /* fallthrough */ -} - -void SCPH1001_func_00005768(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005768u); - int psx_delay_BFC15294 = 0; - int psx_taken_BFC15294 = 0; -label_BFC15268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15268: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005768u); -#endif - /* 0xBFC1526C: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000576Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000576Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC15270: 24090052 addiu $t1, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24090052u, cpu->gpr[9], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0x00005770u); -#endif - /* 0xBFC15274: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x00005774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15278: A0690000 sb $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005778u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005778u); -#endif - /* 0xBFC1527C: 946A000A lhu $t2, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000577Cu); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x0000577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15280: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15284: 354B0010 ori $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0x10u; - PGXP_ALU(0x354B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC15288: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005788u); return; } g_debug_last_store_pc = 0x00005788u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005788u); -#endif - /* 0xBFC1528C: 8DAD725C lw $t5, 29276($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000578Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD725Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC15290: 240CFF7F addiu $t4, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240CFF7Fu, cpu->gpr[12], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15294: 100000EE beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC15294 = cpu->gpr[0]; uint32_t psx_brB_BFC15294 = cpu->gpr[0]; - psx_taken_BFC15294 = (psx_brA_BFC15294 == psx_brB_BFC15294); - psx_delay_BFC15294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC15298: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005798u); return; } g_debug_last_store_pc = 0x00005798u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005798u); -#endif - if (psx_delay_BFC15294) { - psx_delay_BFC15294 = 0; - if (psx_taken_BFC15294) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000579Cu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000579Cu); - cpu->pc = 0x0000579Cu; return; /* fallthrough */ -} - -void SCPH1001_func_0000579C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000579Cu); - int psx_delay_BFC152D4 = 0; - int psx_taken_BFC152D4 = 0; - int psx_delay_BFC152E0 = 0; - int psx_taken_BFC152E0 = 0; - int psx_delay_BFC15308 = 0; - int psx_delay_BFC15318 = 0; - int psx_delay_BFC1532C = 0; - int psx_taken_BFC1532C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC152DCu: goto label_BFC152DC; - case 0xBFC152E8u: goto label_BFC152E8; - case 0xBFC15310u: goto label_BFC15310; - case 0xBFC15320u: goto label_BFC15320; - default: break; - } - } -label_BFC1529C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000579Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000579Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000579Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1529C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000579Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057A0u); -#endif - /* 0xBFC152A0: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000057A0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000057A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC152A4: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000057A4u); -#endif - /* 0xBFC152A8: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000057A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC152AC: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000057ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000057ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057B0u); -#endif - /* 0xBFC152B0: 946E000A lhu $t6, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000057B0u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000057B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC152B4: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000057B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC152B8: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000057B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC152BC: A46F000A sh $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000057BCu); return; } g_debug_last_store_pc = 0x000057BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000057BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057C0u); -#endif - /* 0xBFC152C0: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000057C0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000057C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC152C4: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000057C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC152C8: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000057C8u); return; } g_debug_last_store_pc = 0x000057C8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000057C8u); -#endif - /* 0xBFC152CC: 8D0874C0 lw $t0, 29888($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000057CCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0874C0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000057CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC152D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000057D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC152D4: 150000DF bne $t0, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC152D4 = cpu->gpr[8]; uint32_t psx_brB_BFC152D4 = cpu->gpr[0]; - psx_taken_BFC152D4 = (psx_brA_BFC152D4 != psx_brB_BFC152D4); - psx_delay_BFC152D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC152D8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000057D8u); -#endif - if (psx_delay_BFC152D4) { - psx_delay_BFC152D4 = 0; - if (psx_taken_BFC152D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000057DCu); - } -label_BFC152DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000057DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000057DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC152DC: 30890008 andi $t1, $a0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] & 0x8u; - PGXP_ALU(0x30890008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x000057DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC152E0: 112000DB beq $t1, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC152E0 = cpu->gpr[9]; uint32_t psx_brB_BFC152E0 = cpu->gpr[0]; - psx_taken_BFC152E0 = (psx_brA_BFC152E0 == psx_brB_BFC152E0); - psx_delay_BFC152E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC152E4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000057E4u); -#endif - if (psx_delay_BFC152E0) { - psx_delay_BFC152E0 = 0; - if (psx_taken_BFC152E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000057E8u); - } -label_BFC152E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000057E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000057E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC152E8: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000057E8u); return; } g_debug_last_store_pc = 0x000057E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000057E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC152EC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000057ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000057F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC152F0: 00270821 addu $at, $at, $a3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[7]; - PGXP_ALU(0x00270821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000057F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC152F4: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000057F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC152F8: A02A7568 sb $t2, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000057F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA02A7568u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000057F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC152FC: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000057FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005800u); -#endif - /* 0xBFC15300: 916B7264 lbu $t3, 29284($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 29284; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (29284)), 11, 0x800u); - PGXP_LOAD(0x916B7264u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15304: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15308: 0C001AD8 jal 0xB0006B60 */ - cpu->gpr[31] = 0x00005810u; /* jal link before delay slot */ - psx_delay_BFC15308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1530C: AC2B751C sw $t3, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000580Cu); return; } g_debug_last_store_pc = 0x0000580Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B751Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000580Cu); -#endif - if (psx_delay_BFC15308) { - psx_delay_BFC15308 = 0; - cpu->gpr[31] = 0x00005810u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B60u); - cpu->pc = 0x00006B60u; return; - } -label_BFC15310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15310: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15314: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00005814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15318: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00005820u; /* jal link before delay slot */ - psx_delay_BFC15318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1531C: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x0000581Cu); -#endif - if (psx_delay_BFC15318) { - psx_delay_BFC15318 = 0; - cpu->gpr[31] = 0x00005820u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC15320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC15320: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15324: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC15328: AC2C7520 sw $t4, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005828u); return; } g_debug_last_store_pc = 0x00005828u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C7520u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1532C: 100000C9 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC1532C = cpu->gpr[0]; uint32_t psx_brB_BFC1532C = cpu->gpr[0]; - psx_taken_BFC1532C = (psx_brA_BFC1532C == psx_brB_BFC1532C); - psx_delay_BFC1532C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15330: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005830u); -#endif - if (psx_delay_BFC1532C) { - psx_delay_BFC1532C = 0; - if (psx_taken_BFC1532C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005834u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005834u); - cpu->pc = 0x00005834u; return; /* fallthrough */ -} - -void SCPH1001_func_00005834(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005834u); - int psx_delay_BFC15360 = 0; - int psx_taken_BFC15360 = 0; - int psx_delay_BFC15368 = 0; - int psx_taken_BFC15368 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15368u: goto label_BFC15368; - default: break; - } - } -label_BFC15334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15334: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005834u); -#endif - /* 0xBFC15338: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005838u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1533C: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000583Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005840u); -#endif - /* 0xBFC15340: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC15344: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005844u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005844u); -#endif - /* 0xBFC15348: 946D000A lhu $t5, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005848u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x946D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1534C: 240FFF7F addiu $t7, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240FFF7Fu, cpu->gpr[15], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000584Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC15350: 35AE0010 ori $t6, $t5, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x10u; - PGXP_ALU(0x35AE0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC15354: A46E000A sh $t6, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005854u); return; } g_debug_last_store_pc = 0x00005854u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005854u); -#endif - /* 0xBFC15358: 8F18725C lw $t8, 29276($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005858u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18725Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1535C: 2401005A addiu $at, $zero, 90 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); - PGXP_ALU(0x2401005Au, cpu->gpr[1], _pgx1, 0x0000005Au); } -#ifdef PSX_COSIM - cosim_instr(0x0000585Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15360: 108100BB beq $a0, $at, 0xBFC15650 */ - uint32_t psx_brA_BFC15360 = cpu->gpr[4]; uint32_t psx_brB_BFC15360 = cpu->gpr[1]; - psx_taken_BFC15360 = (psx_brA_BFC15360 == psx_brB_BFC15360); - psx_delay_BFC15360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC15364: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005864u); return; } g_debug_last_store_pc = 0x00005864u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005864u); -#endif - if (psx_delay_BFC15360) { - psx_delay_BFC15360 = 0; - if (psx_taken_BFC15360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005868u); - } -label_BFC15368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15368: 100000BA beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15368 = cpu->gpr[0]; uint32_t psx_brB_BFC15368 = cpu->gpr[0]; - psx_taken_BFC15368 = (psx_brA_BFC15368 == psx_brB_BFC15368); - psx_delay_BFC15368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1536C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000586Cu); -#endif - if (psx_delay_BFC15368) { - psx_delay_BFC15368 = 0; - if (psx_taken_BFC15368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005870u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005870u); - cpu->pc = 0x00005870u; return; /* fallthrough */ -} - -void SCPH1001_func_00005870(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005870u); - int psx_delay_BFC153A4 = 0; - int psx_taken_BFC153A4 = 0; - int psx_delay_BFC153AC = 0; - int psx_taken_BFC153AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC153ACu: goto label_BFC153AC; - default: break; - } - } -label_BFC15370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15370: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005870u); -#endif - /* 0xBFC15374: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005874u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC15378: 0006CA02 srl $t9, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x0006CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x00005878u); -#endif - /* 0xBFC1537C: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC15380: 332800FF andi $t0, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x332800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC15384: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005884u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005884u); -#endif - /* 0xBFC15388: 9469000A lhu $t1, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005888u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x8u); } - PGXP_LOAD(0x9469000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1538C: 3C0C0000 lui $t4, 0x0 */ - cpu->gpr[12] = 0x00000000u; - PGXP_ALU(0x3C0C0000u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000588Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC15390: 352A0010 ori $t2, $t1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] | 0x10u; - PGXP_ALU(0x352A0010u, cpu->gpr[10], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC15394: A46A000A sh $t2, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005894u); return; } g_debug_last_store_pc = 0x00005894u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005894u); -#endif - /* 0xBFC15398: 8D8C725C lw $t4, 29276($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005898u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C725Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1539C: 240BFF7F addiu $t3, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240BFF7Fu, cpu->gpr[11], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC153A0: 2401005D addiu $at, $zero, 93 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); - PGXP_ALU(0x2401005Du, cpu->gpr[1], _pgx1, 0x0000005Du); } -#ifdef PSX_COSIM - cosim_instr(0x000058A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC153A4: 108100AA beq $a0, $at, 0xBFC15650 */ - uint32_t psx_brA_BFC153A4 = cpu->gpr[4]; uint32_t psx_brB_BFC153A4 = cpu->gpr[1]; - psx_taken_BFC153A4 = (psx_brA_BFC153A4 == psx_brB_BFC153A4); - psx_delay_BFC153A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC153A8: AD8B0000 sw $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000058A8u); return; } g_debug_last_store_pc = 0x000058A8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000058A8u); -#endif - if (psx_delay_BFC153A4) { - psx_delay_BFC153A4 = 0; - if (psx_taken_BFC153A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000058ACu); - } -label_BFC153AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000058ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000058ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC153AC: 100000A9 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC153AC = cpu->gpr[0]; uint32_t psx_brB_BFC153AC = cpu->gpr[0]; - psx_taken_BFC153AC = (psx_brA_BFC153AC == psx_brB_BFC153AC); - psx_delay_BFC153AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC153B0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000058B0u); -#endif - if (psx_delay_BFC153AC) { - psx_delay_BFC153AC = 0; - if (psx_taken_BFC153AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000058B4u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000058B4u); - cpu->pc = 0x000058B4u; return; /* fallthrough */ -} - -void SCPH1001_func_000058B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000058B4u); - int psx_delay_BFC153E0 = 0; - int psx_taken_BFC153E0 = 0; -label_BFC153B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000058B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000058B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC153B4: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000058B4u); -#endif - /* 0xBFC153B8: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000058B8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000058B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC153BC: 30CD00FF andi $t5, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CD00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000058BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058C0u); -#endif - /* 0xBFC153C0: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x000058C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC153C4: A06D0000 sb $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000058C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA06D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000058C4u); -#endif - /* 0xBFC153C8: 946E000A lhu $t6, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000058C8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000058C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC153CC: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000058CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC153D0: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000058D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC153D4: A46F000A sh $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000058D4u); return; } g_debug_last_store_pc = 0x000058D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000058D4u); -#endif - /* 0xBFC153D8: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000058D8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000058D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC153DC: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000058DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC153E0: 1000009B beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC153E0 = cpu->gpr[0]; uint32_t psx_brB_BFC153E0 = cpu->gpr[0]; - psx_taken_BFC153E0 = (psx_brA_BFC153E0 == psx_brB_BFC153E0); - psx_delay_BFC153E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC153E4: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000058E4u); return; } g_debug_last_store_pc = 0x000058E4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000058E4u); -#endif - if (psx_delay_BFC153E0) { - psx_delay_BFC153E0 = 0; - if (psx_taken_BFC153E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000058E8u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000058E8u); - cpu->pc = 0x000058E8u; return; /* fallthrough */ -} - -void SCPH1001_func_000058E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000058E8u); - int psx_delay_BFC15410 = 0; - int psx_taken_BFC15410 = 0; -label_BFC153E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000058E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000058E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC153E8: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000058E8u); -#endif - /* 0xBFC153EC: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000058ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000058ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000058F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC153F0: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000058F0u); -#endif - /* 0xBFC153F4: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x000058F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC153F8: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000058F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000058F8u); -#endif - /* 0xBFC153FC: 9468000A lhu $t0, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000058FCu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x9468000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000058FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC15400: 240AFF7F addiu $t2, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240AFF7Fu, cpu->gpr[10], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC15404: 35090010 ori $t1, $t0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x10u; - PGXP_ALU(0x35090010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15408: A469000A sh $t1, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005908u); return; } g_debug_last_store_pc = 0x00005908u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA469000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005908u); -#endif - /* 0xBFC1540C: 8D6B725C lw $t3, 29276($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000590Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B725Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000590Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15410: 1000008F beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC15410 = cpu->gpr[0]; uint32_t psx_brB_BFC15410 = cpu->gpr[0]; - psx_taken_BFC15410 = (psx_brA_BFC15410 == psx_brB_BFC15410); - psx_delay_BFC15410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15414: AD6A0000 sw $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005914u); return; } g_debug_last_store_pc = 0x00005914u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005914u); -#endif - if (psx_delay_BFC15410) { - psx_delay_BFC15410 = 0; - if (psx_taken_BFC15410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005918u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005918u); - cpu->pc = 0x00005918u; return; /* fallthrough */ -} - -void SCPH1001_func_00005918(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005918u); - int psx_delay_BFC15444 = 0; - int psx_taken_BFC15444 = 0; - int psx_delay_BFC1544C = 0; - int psx_taken_BFC1544C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1544Cu: goto label_BFC1544C; - default: break; - } - } -label_BFC15418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15418: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005918u); -#endif - /* 0xBFC1541C: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000591Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x0000591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC15420: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005920u); -#endif - /* 0xBFC15424: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC15428: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005928u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005928u); -#endif - /* 0xBFC1542C: 946C000A lhu $t4, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000592Cu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15430: 240EFF7F addiu $t6, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC15434: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC15438: A46D000A sh $t5, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005938u); return; } g_debug_last_store_pc = 0x00005938u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005938u); -#endif - /* 0xBFC1543C: 8DEF725C lw $t7, 29276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000593Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF725Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x0000593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15440: 2401005C addiu $at, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2401005Cu, cpu->gpr[1], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00005940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15444: 10810082 beq $a0, $at, 0xBFC15650 */ - uint32_t psx_brA_BFC15444 = cpu->gpr[4]; uint32_t psx_brB_BFC15444 = cpu->gpr[1]; - psx_taken_BFC15444 = (psx_brA_BFC15444 == psx_brB_BFC15444); - psx_delay_BFC15444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC15448: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005948u); return; } g_debug_last_store_pc = 0x00005948u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005948u); -#endif - if (psx_delay_BFC15444) { - psx_delay_BFC15444 = 0; - if (psx_taken_BFC15444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000594Cu); - } -label_BFC1544C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000594Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1544C: 10000081 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC1544C = cpu->gpr[0]; uint32_t psx_brB_BFC1544C = cpu->gpr[0]; - psx_taken_BFC1544C = (psx_brA_BFC1544C == psx_brB_BFC1544C); - psx_delay_BFC1544C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15450: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005950u); -#endif - if (psx_delay_BFC1544C) { - psx_delay_BFC1544C = 0; - if (psx_taken_BFC1544C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005954u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005954u); - cpu->pc = 0x00005954u; return; /* fallthrough */ -} - -void SCPH1001_func_00005954(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005954u); - int psx_delay_BFC15480 = 0; - int psx_taken_BFC15480 = 0; - int psx_delay_BFC15488 = 0; - int psx_taken_BFC15488 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15488u: goto label_BFC15488; - default: break; - } - } -label_BFC15454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15454: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005954u); -#endif - /* 0xBFC15458: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005958u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1545C: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000595Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005960u); -#endif - /* 0xBFC15460: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC15464: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005964u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005964u); -#endif - /* 0xBFC15468: 9478000A lhu $t8, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005968u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x9478000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1546C: 2408FF7F addiu $t0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2408FF7Fu, cpu->gpr[8], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000596Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC15470: 37190010 ori $t9, $t8, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x10u; - PGXP_ALU(0x37190010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15474: A479000A sh $t9, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005974u); return; } g_debug_last_store_pc = 0x00005974u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005974u); -#endif - /* 0xBFC15478: 8D29725C lw $t1, 29276($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005978u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29725Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1547C: 2401005D addiu $at, $zero, 93 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); - PGXP_ALU(0x2401005Du, cpu->gpr[1], _pgx1, 0x0000005Du); } -#ifdef PSX_COSIM - cosim_instr(0x0000597Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15480: 10810073 beq $a0, $at, 0xBFC15650 */ - uint32_t psx_brA_BFC15480 = cpu->gpr[4]; uint32_t psx_brB_BFC15480 = cpu->gpr[1]; - psx_taken_BFC15480 = (psx_brA_BFC15480 == psx_brB_BFC15480); - psx_delay_BFC15480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC15484: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005984u); return; } g_debug_last_store_pc = 0x00005984u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005984u); -#endif - if (psx_delay_BFC15480) { - psx_delay_BFC15480 = 0; - if (psx_taken_BFC15480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005988u); - } -label_BFC15488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15488: 10000072 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15488 = cpu->gpr[0]; uint32_t psx_brB_BFC15488 = cpu->gpr[0]; - psx_taken_BFC15488 = (psx_brA_BFC15488 == psx_brB_BFC15488); - psx_delay_BFC15488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1548C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000598Cu); -#endif - if (psx_delay_BFC15488) { - psx_delay_BFC15488 = 0; - if (psx_taken_BFC15488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005990u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005990u); - cpu->pc = 0x00005990u; return; /* fallthrough */ -} - -void SCPH1001_func_00005990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005990u); - int psx_delay_BFC154C0 = 0; - int psx_taken_BFC154C0 = 0; - int psx_delay_BFC154C8 = 0; - int psx_taken_BFC154C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC154C8u: goto label_BFC154C8; - default: break; - } - } -label_BFC15490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15490: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005990u); -#endif - /* 0xBFC15494: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005994u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15498: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005998u); -#endif - /* 0xBFC1549C: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC154A0: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000059A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000059A0u); -#endif - /* 0xBFC154A4: 946A000A lhu $t2, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000059A4u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000059A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC154A8: 00061202 srl $v0, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x00061202u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x000059A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC154AC: 354B0010 ori $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0x10u; - PGXP_ALU(0x354B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x000059ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC154B0: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000059B0u); return; } g_debug_last_store_pc = 0x000059B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000059B0u); -#endif - /* 0xBFC154B4: 8DAD725C lw $t5, 29276($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000059B4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD725Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000059B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC154B8: 240CFF7F addiu $t4, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240CFF7Fu, cpu->gpr[12], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000059B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC154BC: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000059BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC154C0: 10820003 beq $a0, $v0, 0xBFC154D0 */ - uint32_t psx_brA_BFC154C0 = cpu->gpr[4]; uint32_t psx_brB_BFC154C0 = cpu->gpr[2]; - psx_taken_BFC154C0 = (psx_brA_BFC154C0 == psx_brB_BFC154C0); - psx_delay_BFC154C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC154C4: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000059C4u); return; } g_debug_last_store_pc = 0x000059C4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x000059C4u); -#endif - if (psx_delay_BFC154C0) { - psx_delay_BFC154C0 = 0; - if (psx_taken_BFC154C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000059D0u); - cpu->pc = 0x000059D0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000059C8u); - } -label_BFC154C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000059C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000059C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC154C8: 10000062 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC154C8 = cpu->gpr[0]; uint32_t psx_brB_BFC154C8 = cpu->gpr[0]; - psx_taken_BFC154C8 = (psx_brA_BFC154C8 == psx_brB_BFC154C8); - /* DELAY (orphaned) 0xBFC154CC: 2402FFFF addiu $v0, $zero, -1 */ -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } - if (psx_taken_BFC154C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000059D0u); - cpu->pc = 0x000059D0u; return; -} - -void SCPH1001_func_000059CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000059CCu); - int psx_delay_BFC154F8 = 0; - int psx_taken_BFC154F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC154D0u: goto label_BFC154D0; - default: break; - } - } -label_BFC154CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000059CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000059CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC154CC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000059CCu); -#endif -label_BFC154D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000059D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000059D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC154D0: 30CE00FF andi $t6, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000059D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC154D4: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000059D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC154D8: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000059D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC154DC: 00074080 sll $t0, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00074080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000059DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC154E0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000059E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC154E4: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000059E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC154E8: 01F8C826 xor $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] ^ cpu->gpr[24]; - PGXP_ALU(0x01F8C826u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000059E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC154EC: AC397560 sw $t9, 30048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000059ECu); return; } g_debug_last_store_pc = 0x000059ECu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC397560u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000059ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000059F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC154F0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000059F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC154F4: 00270821 addu $at, $at, $a3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[7]; - PGXP_ALU(0x00270821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000059F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC154F8: 10000055 beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC154F8 = cpu->gpr[0]; uint32_t psx_brB_BFC154F8 = cpu->gpr[0]; - psx_taken_BFC154F8 = (psx_brA_BFC154F8 == psx_brB_BFC154F8); - psx_delay_BFC154F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC154FC: A0207558 sb $zero, 30040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30040; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000059FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30040)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0207558u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000059FCu); -#endif - if (psx_delay_BFC154F8) { - psx_delay_BFC154F8 = 0; - if (psx_taken_BFC154F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A00u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A00u); - cpu->pc = 0x00005A00u; return; /* fallthrough */ -} - -void SCPH1001_func_00005A00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005A00u); -label_BFC15500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15500: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC15504: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A08u); - cpu->pc = 0x00005A08u; return; /* fallthrough */ -} - -void SCPH1001_func_00005A08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005A08u); - int psx_delay_BFC15538 = 0; - int psx_taken_BFC15538 = 0; - int psx_delay_BFC15540 = 0; - int psx_taken_BFC15540 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15540u: goto label_BFC15540; - default: break; - } - } -label_BFC15508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A08u); -#endif - /* 0xBFC15508: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A08u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC1550C: 01274821 addu $t1, $t1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[7]; - PGXP_ALU(0x01274821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A10u); -#endif - /* 0xBFC15510: 91297558 lbu $t1, 30040($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 30040; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (30040)), 9, 0x200u); - PGXP_LOAD(0x91297558u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A10u); -#endif - /* 0xBFC15514: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15518: A0690000 sb $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005A18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A18u); -#endif - /* 0xBFC1551C: 946A000A lhu $t2, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005A1Cu); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15520: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15524: 354B0010 ori $t3, $t2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0x10u; - PGXP_ALU(0x354B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC15528: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005A28u); return; } g_debug_last_store_pc = 0x00005A28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A28u); -#endif - /* 0xBFC1552C: 8DAD725C lw $t5, 29276($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A2Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD725Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC15530: 240CFF7F addiu $t4, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240CFF7Fu, cpu->gpr[12], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC15534: 30CE00FF andi $t6, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC15538: 108E0003 beq $a0, $t6, 0xBFC15548 */ - uint32_t psx_brA_BFC15538 = cpu->gpr[4]; uint32_t psx_brB_BFC15538 = cpu->gpr[14]; - psx_taken_BFC15538 = (psx_brA_BFC15538 == psx_brB_BFC15538); - psx_delay_BFC15538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1553C: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A3Cu); return; } g_debug_last_store_pc = 0x00005A3Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A3Cu); -#endif - if (psx_delay_BFC15538) { - psx_delay_BFC15538 = 0; - if (psx_taken_BFC15538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A48u); - cpu->pc = 0x00005A48u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A40u); - } -label_BFC15540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15540: 10000044 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15540 = cpu->gpr[0]; uint32_t psx_brB_BFC15540 = cpu->gpr[0]; - psx_taken_BFC15540 = (psx_brA_BFC15540 == psx_brB_BFC15540); - /* DELAY (orphaned) 0xBFC15544: 2402FFFF addiu $v0, $zero, -1 */ -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } - if (psx_taken_BFC15540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A48u); - cpu->pc = 0x00005A48u; return; -} - -void SCPH1001_func_00005A44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005A44u); - int psx_delay_BFC15548 = 0; - int psx_delay_BFC15550 = 0; - int psx_taken_BFC15550 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15548u: goto label_BFC15548; - case 0xBFC15550u: goto label_BFC15550; - default: break; - } - } -label_BFC15544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15544: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005A44u); -#endif -label_BFC15548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15548: 0C0018E0 jal 0xB0006380 */ - cpu->gpr[31] = 0x00005A50u; /* jal link before delay slot */ - psx_delay_BFC15548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1554C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005A4Cu); -#endif - if (psx_delay_BFC15548) { - psx_delay_BFC15548 = 0; - debug_server_log_probe(0xBFC15548u, cpu); - cpu->gpr[31] = 0x00005A50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006380u); - cpu->pc = 0x00006380u; return; - } -label_BFC15550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15550: 10000040 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15550 = cpu->gpr[0]; uint32_t psx_brB_BFC15550 = cpu->gpr[0]; - psx_taken_BFC15550 = (psx_brA_BFC15550 == psx_brB_BFC15550); - psx_delay_BFC15550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15554: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005A54u); -#endif - if (psx_delay_BFC15550) { - psx_delay_BFC15550 = 0; - if (psx_taken_BFC15550) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A58u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A58u); - cpu->pc = 0x00005A58u; return; /* fallthrough */ -} - -void SCPH1001_func_00005A58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005A58u); -label_BFC15558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15558: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A58u); -#endif - /* 0xBFC1555C: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A5Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15560: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A60u); -#endif - /* 0xBFC15564: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC15568: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005A68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A68u); -#endif - /* 0xBFC1556C: 946F000A lhu $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005A6Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x946F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC15570: 2419FF7F addiu $t9, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2419FF7Fu, cpu->gpr[25], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC15574: 35F80010 ori $t8, $t7, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x10u; - PGXP_ALU(0x35F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC15578: A478000A sh $t8, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005A78u); return; } g_debug_last_store_pc = 0x00005A78u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA478000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A78u); -#endif - /* 0xBFC1557C: 8D08725C lw $t0, 29276($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A7Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08725Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005A80u); - cpu->pc = 0x00005A80u; return; /* fallthrough */ -} - -void SCPH1001_func_00005A80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005A80u); - int psx_delay_BFC155A8 = 0; - int psx_taken_BFC155A8 = 0; -label_BFC15580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC15580: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC15584: AD190000 sw $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A84u); return; } g_debug_last_store_pc = 0x00005A84u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC15588: 254A7560 addiu $t2, $t2, 30048 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (30048)); - PGXP_ALU(0x254A7560u, cpu->gpr[10], _pgx1, 0x00007560u); } -#ifdef PSX_COSIM - cosim_instr(0x00005A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC1558C: 00074880 sll $t1, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00074880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC15590: A0A4007F sb $a0, 127($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 127; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005A90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (127)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA0A4007Fu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC15594: 012A1021 addu $v0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005A94u); -#endif - /* 0xBFC15598: 8C4B0000 lw $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005A98u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A98u); -#endif - /* 0xBFC1559C: 90AC007F lbu $t4, 127($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 127; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (127)), 12, 0x20u); - PGXP_LOAD(0x90AC007Fu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC155A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC155A4: 016C6826 xor $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] ^ cpu->gpr[12]; - PGXP_ALU(0x016C6826u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC155A8: 10000029 beq $zero, $zero, 0xBFC15650 */ - uint32_t psx_brA_BFC155A8 = cpu->gpr[0]; uint32_t psx_brB_BFC155A8 = cpu->gpr[0]; - psx_taken_BFC155A8 = (psx_brA_BFC155A8 == psx_brB_BFC155A8); - psx_delay_BFC155A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC155AC: AC4D0000 sw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005AACu); return; } g_debug_last_store_pc = 0x00005AACu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AACu); -#endif - if (psx_delay_BFC155A8) { - psx_delay_BFC155A8 = 0; - if (psx_taken_BFC155A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005AB0u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005AB0u); - cpu->pc = 0x00005AB0u; return; /* fallthrough */ -} - -void SCPH1001_func_00005AB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005AB0u); -label_BFC155B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC155B0: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005AB0u); -#endif - /* 0xBFC155B4: 8C637258 lw $v1, 29272($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005AB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C637258u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC155B8: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005ABCu); - cpu->pc = 0x00005ABCu; return; /* fallthrough */ -} - -void SCPH1001_func_00005ABC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005ABCu); - int psx_delay_BFC155F0 = 0; - int psx_taken_BFC155F0 = 0; -label_BFC155BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005ABCu); -#endif - /* 0xBFC155BC: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC155C0: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005AC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AC0u); -#endif - /* 0xBFC155C4: 946E000A lhu $t6, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005AC4u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC155C8: 2418FF7F addiu $t8, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2418FF7Fu, cpu->gpr[24], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC155CC: 35CF0010 ori $t7, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC155D0: A46F000A sh $t7, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005AD0u); return; } g_debug_last_store_pc = 0x00005AD0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AD0u); -#endif - /* 0xBFC155D4: 8F39725C lw $t9, 29276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005AD4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39725Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC155D8: 00074080 sll $t0, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00074080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC155DC: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC155E0: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC155E4: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005AE4u); return; } g_debug_last_store_pc = 0x00005AE4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AE4u); -#endif - /* 0xBFC155E8: 8D297560 lw $t1, 30048($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 30048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (30048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005AE8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D297560u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC155EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC155F0: 10890003 beq $a0, $t1, 0xBFC15600 */ - uint32_t psx_brA_BFC155F0 = cpu->gpr[4]; uint32_t psx_brB_BFC155F0 = cpu->gpr[9]; - psx_taken_BFC155F0 = (psx_brA_BFC155F0 == psx_brB_BFC155F0); - psx_delay_BFC155F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC155F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005AF4u); -#endif - if (psx_delay_BFC155F0) { - psx_delay_BFC155F0 = 0; - if (psx_taken_BFC155F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B00u); - cpu->pc = 0x00005B00u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005AF8u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005AF8u); - cpu->pc = 0x00005AF8u; return; /* fallthrough */ -} - -void SCPH1001_func_00005AF8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005AF8u); - int psx_delay_BFC155F8 = 0; - int psx_taken_BFC155F8 = 0; - int psx_delay_BFC1560C = 0; - int psx_taken_BFC1560C = 0; - int psx_delay_BFC15620 = 0; - int psx_taken_BFC15620 = 0; - int psx_delay_BFC15630 = 0; - int psx_taken_BFC15630 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15600u: goto label_BFC15600; - case 0xBFC15614u: goto label_BFC15614; - case 0xBFC15628u: goto label_BFC15628; - default: break; - } - } -label_BFC155F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC155F8: 10000016 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC155F8 = cpu->gpr[0]; uint32_t psx_brB_BFC155F8 = cpu->gpr[0]; - psx_taken_BFC155F8 = (psx_brA_BFC155F8 == psx_brB_BFC155F8); - psx_delay_BFC155F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC155FC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005AFCu); -#endif - if (psx_delay_BFC155F8) { - psx_delay_BFC155F8 = 0; - if (psx_taken_BFC155F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B00u); - } -label_BFC15600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B00u); -#endif - /* 0xBFC15600: 946A0004 lhu $t2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005B00u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15608: 314B0002 andi $t3, $t2, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x2u; - PGXP_ALU(0x314B0002u, cpu->gpr[11], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1560C: 15600006 bne $t3, $zero, 0xBFC15628 */ - uint32_t psx_brA_BFC1560C = cpu->gpr[11]; uint32_t psx_brB_BFC1560C = cpu->gpr[0]; - psx_taken_BFC1560C = (psx_brA_BFC1560C != psx_brB_BFC1560C); - psx_delay_BFC1560C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B10u); -#endif - if (psx_delay_BFC1560C) { - psx_delay_BFC1560C = 0; - if (psx_taken_BFC1560C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B28u); - goto label_BFC15628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B14u); - } -label_BFC15614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B14u); -#endif - /* 0xBFC15614: 946C0004 lhu $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005B14u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15618: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1561C: 318D0002 andi $t5, $t4, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x2u; - PGXP_ALU(0x318D0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC15620: 11A0FFFC beq $t5, $zero, 0xBFC15614 */ - uint32_t psx_brA_BFC15620 = cpu->gpr[13]; uint32_t psx_brB_BFC15620 = cpu->gpr[0]; - psx_taken_BFC15620 = (psx_brA_BFC15620 == psx_brB_BFC15620); - psx_delay_BFC15620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B24u); -#endif - if (psx_delay_BFC15620) { - psx_delay_BFC15620 = 0; - if (psx_taken_BFC15620) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B14u); - goto label_BFC15614; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B28u); - } -label_BFC15628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B28u); -#endif - /* 0xBFC15628: 90640000 lbu $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); - PGXP_LOAD(0x90640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1562C: 24010047 addiu $at, $zero, 71 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); - PGXP_ALU(0x24010047u, cpu->gpr[1], _pgx1, 0x00000047u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15630: 10810003 beq $a0, $at, 0xBFC15640 */ - uint32_t psx_brA_BFC15630 = cpu->gpr[4]; uint32_t psx_brB_BFC15630 = cpu->gpr[1]; - psx_taken_BFC15630 = (psx_brA_BFC15630 == psx_brB_BFC15630); - /* DELAY (orphaned) 0xBFC15634: 00000000 nop */ -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* nop */ - if (psx_taken_BFC15630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B40u); - cpu->pc = 0x00005B40u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B38u); - cpu->pc = 0x00005B38u; return; -} - -void SCPH1001_func_00005B34(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005B34u); - int psx_delay_BFC15638 = 0; - int psx_taken_BFC15638 = 0; - int psx_delay_BFC15640 = 0; - int psx_taken_BFC15640 = 0; - int psx_delay_BFC15648 = 0; - int psx_taken_BFC15648 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15638u: goto label_BFC15638; - case 0xBFC15640u: goto label_BFC15640; - case 0xBFC15648u: goto label_BFC15648; - default: break; - } - } -label_BFC15634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B34u); -#endif -label_BFC15638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15638: 10000006 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15638 = cpu->gpr[0]; uint32_t psx_brB_BFC15638 = cpu->gpr[0]; - psx_taken_BFC15638 = (psx_brA_BFC15638 == psx_brB_BFC15638); - psx_delay_BFC15638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1563C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005B3Cu); -#endif - if (psx_delay_BFC15638) { - psx_delay_BFC15638 = 0; - if (psx_taken_BFC15638) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B40u); - } -label_BFC15640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15640: 10000004 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15640 = cpu->gpr[0]; uint32_t psx_brB_BFC15640 = cpu->gpr[0]; - psx_taken_BFC15640 = (psx_brA_BFC15640 == psx_brB_BFC15640); - psx_delay_BFC15640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15644: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B44u); -#endif - if (psx_delay_BFC15640) { - psx_delay_BFC15640 = 0; - if (psx_taken_BFC15640) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B48u); - } -label_BFC15648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15648: 10000002 beq $zero, $zero, 0xBFC15654 */ - uint32_t psx_brA_BFC15648 = cpu->gpr[0]; uint32_t psx_brB_BFC15648 = cpu->gpr[0]; - psx_taken_BFC15648 = (psx_brA_BFC15648 == psx_brB_BFC15648); - psx_delay_BFC15648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1564C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005B4Cu); -#endif - if (psx_delay_BFC15648) { - psx_delay_BFC15648 = 0; - if (psx_taken_BFC15648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B50u); - cpu->pc = 0x00005B50u; return; /* fallthrough */ -} - -void SCPH1001_func_00005B50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005B50u); -label_BFC15650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15650: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B54u); - cpu->pc = 0x00005B54u; return; /* fallthrough */ -} - -void SCPH1001_func_00005B54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005B54u); - int psx_delay_BFC1565C = 0; -label_BFC15654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B54u); -#endif - /* 0xBFC15654: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005B54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC15658: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1565C: 03E00008 jr $ra */ - psx_delay_BFC1565C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15660: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B60u); -#endif - if (psx_delay_BFC1565C) { - psx_delay_BFC1565C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005B64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005B64u); - int psx_delay_BFC15680 = 0; - int psx_taken_BFC15680 = 0; - int psx_delay_BFC1569C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15688u: goto label_BFC15688; - default: break; - } - } -label_BFC15664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15664: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005B64u); -#endif - /* 0xBFC15668: 8C427514 lw $v0, 29972($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005B68u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427514u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1566C: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC15670: 244EFFFF addiu $t6, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x244EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC15674: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B74u); -#endif - /* 0xBFC15678: 90847264 lbu $a0, 29284($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29284; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (29284)), 4, 0x10u); - PGXP_LOAD(0x90847264u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1567C: 2DC10004 sltiu $at, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15680: 10200082 beq $at, $zero, 0xBFC1588C */ - uint32_t psx_brA_BFC15680 = cpu->gpr[1]; uint32_t psx_brB_BFC15680 = cpu->gpr[0]; - psx_taken_BFC15680 = (psx_brA_BFC15680 == psx_brB_BFC15680); - psx_delay_BFC15680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC15684: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005B84u); return; } g_debug_last_store_pc = 0x00005B84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B84u); -#endif - if (psx_delay_BFC15680) { - psx_delay_BFC15680 = 0; - if (psx_taken_BFC15680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D8Cu); - cpu->pc = 0x00005D8Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005B88u); - } -label_BFC15688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15688: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1568C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC15690: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005B90u); -#endif - /* 0xBFC15694: 8C2E6CCC lw $t6, 27852($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27852; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27852)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005B94u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2E6CCCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1569C: 01C00008 jr $t6 */ - psx_delay_BFC1569C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC156A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005BA0u); -#endif - if (psx_delay_BFC1569C) { - psx_delay_BFC1569C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } -} - -void SCPH1001_func_00005BA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005BA4u); - int psx_delay_BFC156A4 = 0; - int psx_taken_BFC156A4 = 0; - int psx_delay_BFC156AC = 0; - int psx_taken_BFC156AC = 0; - int psx_delay_BFC1571C = 0; - int psx_taken_BFC1571C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC156ACu: goto label_BFC156AC; - case 0xBFC156B4u: goto label_BFC156B4; - case 0xBFC156B8u: goto label_BFC156B8; - default: break; - } - } -label_BFC156A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC156A4: 14800004 bne $a0, $zero, 0xBFC156B8 */ - uint32_t psx_brA_BFC156A4 = cpu->gpr[4]; uint32_t psx_brB_BFC156A4 = cpu->gpr[0]; - psx_taken_BFC156A4 = (psx_brA_BFC156A4 != psx_brB_BFC156A4); - psx_delay_BFC156A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC156A8: 24032000 addiu $v1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24032000u, cpu->gpr[3], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BA8u); -#endif - if (psx_delay_BFC156A4) { - psx_delay_BFC156A4 = 0; - if (psx_taken_BFC156A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005BB8u); - goto label_BFC156B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005BACu); - } -label_BFC156AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC156AC: 10000002 beq $zero, $zero, 0xBFC156B8 */ - uint32_t psx_brA_BFC156AC = cpu->gpr[0]; uint32_t psx_brB_BFC156AC = cpu->gpr[0]; - psx_taken_BFC156AC = (psx_brA_BFC156AC == psx_brB_BFC156AC); - psx_delay_BFC156AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC156B0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005BB0u); -#endif - if (psx_delay_BFC156AC) { - psx_delay_BFC156AC = 0; - if (psx_taken_BFC156AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005BB8u); - goto label_BFC156B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005BB4u); - } -label_BFC156B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC156B4: 24032000 addiu $v1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24032000u, cpu->gpr[3], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BB4u); -#endif -label_BFC156B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC156B8: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005BB8u); -#endif - /* 0xBFC156BC: 8C427258 lw $v0, 29272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005BBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427258u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC156C0: 346F1003 ori $t7, $v1, 0x1003 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] | 0x1003u; - PGXP_ALU(0x346F1003u, cpu->gpr[15], _pgx1, 0x1003u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC156C4: 0004C080 sll $t8, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 2u; - PGXP_ALU(0x0004C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC156C8: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC156CC: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC156D0: A44F000A sh $t7, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005BD0u); return; } g_debug_last_store_pc = 0x00005BD0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BD0u); -#endif - /* 0xBFC156D4: 8F397500 lw $t9, 29952($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 29952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005BD4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F397500u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BD4u); -#endif - /* 0xBFC156D8: 90400000 lbu $zero, 0($v0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 0, 0x4u); -#ifdef PSX_COSIM - cosim_instr(0x00005BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC156DC: 3328000F andi $t0, $t9, 0xF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0xFu; - PGXP_ALU(0x3328000Fu, cpu->gpr[8], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC156E0: 00084E00 sll $t1, $t0, 24 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 24u; - PGXP_ALU(0x00084E00u, cpu->gpr[9], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC156E4: 00095603 sra $t2, $t1, 24 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] >> 24u); - PGXP_ALU(0x00095603u, cpu->gpr[10], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC156E8: 254B0081 addiu $t3, $t2, 129 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (129)); - PGXP_ALU(0x254B0081u, cpu->gpr[11], _pgx1, 0x00000081u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC156EC: A04B0000 sb $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005BECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA04B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005BF0u); -#endif - /* 0xBFC156F0: 944C000A lhu $t4, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005BF0u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x944C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC156F4: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC156F8: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC156FC: A44D000A sh $t5, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005BFCu); return; } g_debug_last_store_pc = 0x00005BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA44D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C00u); -#endif - /* 0xBFC15700: 8DEF725C lw $t7, 29276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C00u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF725Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15704: 240EFF7F addiu $t6, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC15708: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1570C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC15710: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C10u); return; } g_debug_last_store_pc = 0x00005C10u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC15714: A038755A sb $t8, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005C14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038755Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15718: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1571C: 1000005D beq $zero, $zero, 0xBFC15894 */ - uint32_t psx_brA_BFC1571C = cpu->gpr[0]; uint32_t psx_brB_BFC1571C = cpu->gpr[0]; - psx_taken_BFC1571C = (psx_brA_BFC1571C == psx_brB_BFC1571C); - psx_delay_BFC1571C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15720: AC2374A0 sw $v1, 29856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C20u); return; } g_debug_last_store_pc = 0x00005C20u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC2374A0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C20u); -#endif - if (psx_delay_BFC1571C) { - psx_delay_BFC1571C = 0; - if (psx_taken_BFC1571C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D94u); - cpu->pc = 0x00005D94u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005C24u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005C24u); - cpu->pc = 0x00005C24u; return; /* fallthrough */ -} - -void SCPH1001_func_00005C24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005C24u); - int psx_delay_BFC15750 = 0; - int psx_taken_BFC15750 = 0; -label_BFC15724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15724: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C24u); -#endif - /* 0xBFC15728: 8C427258 lw $v0, 29272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C28u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427258u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1572C: 24190052 addiu $t9, $zero, 82 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); - PGXP_ALU(0x24190052u, cpu->gpr[25], _pgx1, 0x00000052u); } -#ifdef PSX_COSIM - cosim_instr(0x00005C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C30u); -#endif - /* 0xBFC15730: 90400000 lbu $zero, 0($v0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 0, 0x4u); -#ifdef PSX_COSIM - cosim_instr(0x00005C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC15734: A0590000 sb $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005C34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C34u); -#endif - /* 0xBFC15738: 9448000A lhu $t0, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005C38u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x9448000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1573C: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC15740: 35090010 ori $t1, $t0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x10u; - PGXP_ALU(0x35090010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC15744: A449000A sh $t1, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005C44u); return; } g_debug_last_store_pc = 0x00005C44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA449000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C44u); -#endif - /* 0xBFC15748: 8D6B725C lw $t3, 29276($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C48u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B725Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1574C: 240AFF7F addiu $t2, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240AFF7Fu, cpu->gpr[10], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15750: 10000050 beq $zero, $zero, 0xBFC15894 */ - uint32_t psx_brA_BFC15750 = cpu->gpr[0]; uint32_t psx_brB_BFC15750 = cpu->gpr[0]; - psx_taken_BFC15750 = (psx_brA_BFC15750 == psx_brB_BFC15750); - psx_delay_BFC15750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15754: AD6A0000 sw $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C54u); return; } g_debug_last_store_pc = 0x00005C54u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C54u); -#endif - if (psx_delay_BFC15750) { - psx_delay_BFC15750 = 0; - if (psx_taken_BFC15750) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D94u); - cpu->pc = 0x00005D94u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005C58u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005C58u); - cpu->pc = 0x00005C58u; return; /* fallthrough */ -} - -void SCPH1001_func_00005C58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005C58u); - int psx_delay_BFC15790 = 0; - int psx_taken_BFC15790 = 0; - int psx_delay_BFC1579C = 0; - int psx_taken_BFC1579C = 0; - int psx_delay_BFC157C4 = 0; - int psx_delay_BFC157D4 = 0; - int psx_delay_BFC157E8 = 0; - int psx_taken_BFC157E8 = 0; - int psx_delay_BFC157F4 = 0; - int psx_taken_BFC157F4 = 0; - int psx_delay_BFC1581C = 0; - int psx_delay_BFC1582C = 0; - int psx_delay_BFC15840 = 0; - int psx_taken_BFC15840 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15798u: goto label_BFC15798; - case 0xBFC157A4u: goto label_BFC157A4; - case 0xBFC157CCu: goto label_BFC157CC; - case 0xBFC157DCu: goto label_BFC157DC; - case 0xBFC157F0u: goto label_BFC157F0; - case 0xBFC157FCu: goto label_BFC157FC; - case 0xBFC15824u: goto label_BFC15824; - case 0xBFC15834u: goto label_BFC15834; - default: break; - } - } -label_BFC15758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15758: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C58u); -#endif - /* 0xBFC1575C: 8C427258 lw $v0, 29272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427258u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC15760: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C60u); -#endif - /* 0xBFC15764: 90430000 lbu $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); - PGXP_LOAD(0x90430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15768: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005C68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C68u); -#endif - /* 0xBFC1576C: 944C000A lhu $t4, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005C6Cu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x944C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15770: 240EFF7F addiu $t6, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x240EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC15774: 358D0010 ori $t5, $t4, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x10u; - PGXP_ALU(0x358D0010u, cpu->gpr[13], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC15778: A44D000A sh $t5, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005C78u); return; } g_debug_last_store_pc = 0x00005C78u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA44D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C78u); -#endif - /* 0xBFC1577C: 8DEF725C lw $t7, 29276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C7Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF725Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC15780: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC15784: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C84u); return; } g_debug_last_store_pc = 0x00005C84u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C84u); -#endif - /* 0xBFC15788: 8F1874C0 lw $t8, 29888($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 29888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005C88u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1874C0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1578C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC15790: 17000041 bne $t8, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC15790 = cpu->gpr[24]; uint32_t psx_brB_BFC15790 = cpu->gpr[0]; - psx_taken_BFC15790 = (psx_brA_BFC15790 != psx_brB_BFC15790); - psx_delay_BFC15790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15794: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005C94u); -#endif - if (psx_delay_BFC15790) { - psx_delay_BFC15790 = 0; - if (psx_taken_BFC15790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005C98u); - } -label_BFC15798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15798: 30790004 andi $t9, $v1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0x4u; - PGXP_ALU(0x30790004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x00005C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1579C: 13200014 beq $t9, $zero, 0xBFC157F0 */ - uint32_t psx_brA_BFC1579C = cpu->gpr[25]; uint32_t psx_brB_BFC1579C = cpu->gpr[0]; - psx_taken_BFC1579C = (psx_brA_BFC1579C == psx_brB_BFC1579C); - psx_delay_BFC1579C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC157A0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CA0u); -#endif - if (psx_delay_BFC1579C) { - psx_delay_BFC1579C = 0; - if (psx_taken_BFC1579C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005CF0u); - goto label_BFC157F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005CA4u); - } -label_BFC157A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC157A4: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005CA4u); return; } g_debug_last_store_pc = 0x00005CA4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC157A8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC157AC: 00240821 addu $at, $at, $a0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[4]; - PGXP_ALU(0x00240821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC157B0: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC157B4: A0287568 sb $t0, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005CB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0287568u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC157B8: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CB8u); -#endif - /* 0xBFC157BC: 91297264 lbu $t1, 29284($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 29284; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (29284)), 9, 0x200u); - PGXP_LOAD(0x91297264u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC157C0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC157C4: 0C001AD0 jal 0xB0006B40 */ - cpu->gpr[31] = 0x00005CCCu; /* jal link before delay slot */ - psx_delay_BFC157C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC157C8: AC29751C sw $t1, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005CC8u); return; } g_debug_last_store_pc = 0x00005CC8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29751Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CC8u); -#endif - if (psx_delay_BFC157C4) { - psx_delay_BFC157C4 = 0; - cpu->gpr[31] = 0x00005CCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B40u); - cpu->pc = 0x00006B40u; return; - } -label_BFC157CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC157CC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC157D0: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00005CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC157D4: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00005CDCu; /* jal link before delay slot */ - psx_delay_BFC157D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC157D8: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005CD8u); -#endif - if (psx_delay_BFC157D4) { - psx_delay_BFC157D4 = 0; - cpu->gpr[31] = 0x00005CDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC157DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC157DC: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC157E0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC157E4: AC2A7520 sw $t2, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005CE4u); return; } g_debug_last_store_pc = 0x00005CE4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A7520u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC157E8: 1000002B beq $zero, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC157E8 = cpu->gpr[0]; uint32_t psx_brB_BFC157E8 = cpu->gpr[0]; - psx_taken_BFC157E8 = (psx_brA_BFC157E8 == psx_brB_BFC157E8); - psx_delay_BFC157E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC157EC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005CECu); -#endif - if (psx_delay_BFC157E8) { - psx_delay_BFC157E8 = 0; - if (psx_taken_BFC157E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005CF0u); - } -label_BFC157F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC157F0: 306B0008 andi $t3, $v1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0x8u; - PGXP_ALU(0x306B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x00005CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC157F4: 11600027 beq $t3, $zero, 0xBFC15894 */ - uint32_t psx_brA_BFC157F4 = cpu->gpr[11]; uint32_t psx_brB_BFC157F4 = cpu->gpr[0]; - psx_taken_BFC157F4 = (psx_brA_BFC157F4 == psx_brB_BFC157F4); - psx_delay_BFC157F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC157F8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005CF8u); -#endif - if (psx_delay_BFC157F4) { - psx_delay_BFC157F4 = 0; - if (psx_taken_BFC157F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D94u); - cpu->pc = 0x00005D94u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005CFCu); - } -label_BFC157FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC157FC: AC2074C0 sw $zero, 29888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005CFCu); return; } g_debug_last_store_pc = 0x00005CFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15800: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15804: 00240821 addu $at, $at, $a0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[4]; - PGXP_ALU(0x00240821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC15808: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1580C: A02C7568 sb $t4, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005D0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA02C7568u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15810: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D10u); -#endif - /* 0xBFC15814: 91AD7264 lbu $t5, 29284($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 29284; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (29284)), 13, 0x2000u); - PGXP_LOAD(0x91AD7264u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15818: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1581C: 0C001AD8 jal 0xB0006B60 */ - cpu->gpr[31] = 0x00005D24u; /* jal link before delay slot */ - psx_delay_BFC1581C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC15820: AC2D751C sw $t5, 29980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D20u); return; } g_debug_last_store_pc = 0x00005D20u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D751Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D20u); -#endif - if (psx_delay_BFC1581C) { - psx_delay_BFC1581C = 0; - cpu->gpr[31] = 0x00005D24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006B60u); - cpu->pc = 0x00006B60u; return; - } -label_BFC15824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15824: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15828: 34840011 ori $a0, $a0, 0x11 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x11u; - PGXP_ALU(0x34840011u, cpu->gpr[4], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1582C: 0C0006D1 jal 0xB0001B44 */ - cpu->gpr[31] = 0x00005D34u; /* jal link before delay slot */ - psx_delay_BFC1582C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC15830: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D30u); -#endif - if (psx_delay_BFC1582C) { - psx_delay_BFC1582C = 0; - cpu->gpr[31] = 0x00005D34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00001B44u); - cpu->pc = 0x00001B44u; return; - } -label_BFC15834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15834: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15838: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1583C: AC2E7520 sw $t6, 29984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D3Cu); return; } g_debug_last_store_pc = 0x00005D3Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E7520u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15840: 10000015 beq $zero, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC15840 = cpu->gpr[0]; uint32_t psx_brB_BFC15840 = cpu->gpr[0]; - psx_taken_BFC15840 = (psx_brA_BFC15840 == psx_brB_BFC15840); - psx_delay_BFC15840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15844: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005D44u); -#endif - if (psx_delay_BFC15840) { - psx_delay_BFC15840 = 0; - if (psx_taken_BFC15840) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D48u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D48u); - cpu->pc = 0x00005D48u; return; /* fallthrough */ -} - -void SCPH1001_func_00005D48(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005D48u); - int psx_delay_BFC15874 = 0; - int psx_taken_BFC15874 = 0; - int psx_delay_BFC1587C = 0; - int psx_taken_BFC1587C = 0; - int psx_delay_BFC15884 = 0; - int psx_taken_BFC15884 = 0; - int psx_delay_BFC1588C = 0; - int psx_taken_BFC1588C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1588Cu: goto label_BFC1588C; - case 0xBFC1587Cu: goto label_BFC1587C; - case 0xBFC15884u: goto label_BFC15884; - default: break; - } - } -label_BFC15848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15848: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D48u); -#endif - /* 0xBFC1584C: 8C427258 lw $v0, 29272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427258u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15850: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005D50u); -#endif - /* 0xBFC15854: 90430000 lbu $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); - PGXP_LOAD(0x90430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15858: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005D58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D58u); -#endif - /* 0xBFC1585C: 944F000A lhu $t7, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005D5Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x944F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC15860: 2419FF7F addiu $t9, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x2419FF7Fu, cpu->gpr[25], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC15864: 35F80010 ori $t8, $t7, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x10u; - PGXP_ALU(0x35F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC15868: A458000A sh $t8, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00005D68u); return; } g_debug_last_store_pc = 0x00005D68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA458000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D68u); -#endif - /* 0xBFC1586C: 8D08725C lw $t0, 29276($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 29276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (29276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D6Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08725Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15870: 2401005A addiu $at, $zero, 90 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); - PGXP_ALU(0x2401005Au, cpu->gpr[1], _pgx1, 0x0000005Au); } -#ifdef PSX_COSIM - cosim_instr(0x00005D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15874: 10610003 beq $v1, $at, 0xBFC15884 */ - uint32_t psx_brA_BFC15874 = cpu->gpr[3]; uint32_t psx_brB_BFC15874 = cpu->gpr[1]; - psx_taken_BFC15874 = (psx_brA_BFC15874 == psx_brB_BFC15874); - psx_delay_BFC15874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC15878: AD190000 sw $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D78u); return; } g_debug_last_store_pc = 0x00005D78u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D78u); -#endif - if (psx_delay_BFC15874) { - psx_delay_BFC15874 = 0; - if (psx_taken_BFC15874) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D84u); - goto label_BFC15884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D7Cu); - } -label_BFC1587C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1587C: 10000006 beq $zero, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC1587C = cpu->gpr[0]; uint32_t psx_brB_BFC1587C = cpu->gpr[0]; - psx_taken_BFC1587C = (psx_brA_BFC1587C == psx_brB_BFC1587C); - psx_delay_BFC1587C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15880: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005D80u); -#endif - if (psx_delay_BFC1587C) { - psx_delay_BFC1587C = 0; - if (psx_taken_BFC1587C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D84u); - } -label_BFC15884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15884: 10000004 beq $zero, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC15884 = cpu->gpr[0]; uint32_t psx_brB_BFC15884 = cpu->gpr[0]; - psx_taken_BFC15884 = (psx_brA_BFC15884 == psx_brB_BFC15884); - psx_delay_BFC15884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15888: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D88u); -#endif - if (psx_delay_BFC15884) { - psx_delay_BFC15884 = 0; - if (psx_taken_BFC15884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D8Cu); - } -label_BFC1588C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1588C: 10000002 beq $zero, $zero, 0xBFC15898 */ - uint32_t psx_brA_BFC1588C = cpu->gpr[0]; uint32_t psx_brB_BFC1588C = cpu->gpr[0]; - psx_taken_BFC1588C = (psx_brA_BFC1588C == psx_brB_BFC1588C); - psx_delay_BFC1588C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15890: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x00005D90u); -#endif - if (psx_delay_BFC1588C) { - psx_delay_BFC1588C = 0; - if (psx_taken_BFC1588C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D94u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D94u); - cpu->pc = 0x00005D94u; return; /* fallthrough */ -} - -void SCPH1001_func_00005D94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005D94u); -label_BFC15894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15894: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005D98u); - cpu->pc = 0x00005D98u; return; /* fallthrough */ -} - -void SCPH1001_func_00005D98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005D98u); - int psx_delay_BFC158A0 = 0; -label_BFC15898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005D98u); -#endif - /* 0xBFC15898: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005D98u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1589C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x00005D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC158A0: 03E00008 jr $ra */ - psx_delay_BFC158A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC158A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005DA4u); -#endif - if (psx_delay_BFC158A0) { - psx_delay_BFC158A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005DA8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005DA8u); - int psx_delay_BFC158B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC158B8u: goto label_BFC158B8; - default: break; - } - } -label_BFC158A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC158A8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x00005DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC158AC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005DACu); return; } g_debug_last_store_pc = 0x00005DACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC158B0: 0C0012A5 jal 0xB0004A94 */ - cpu->gpr[31] = 0x00005DB8u; /* jal link before delay slot */ - psx_delay_BFC158B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC158B4: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005DB4u); return; } g_debug_last_store_pc = 0x00005DB4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DB4u); -#endif - if (psx_delay_BFC158B0) { - psx_delay_BFC158B0 = 0; - cpu->gpr[31] = 0x00005DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004A94u); - cpu->pc = 0x00004A94u; return; - } -label_BFC158B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158B8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC158BC: A020755A sb $zero, 30042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30042; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005DBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30042)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020755Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158C0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC158C4: A0207264 sb $zero, 29284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29284; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005DC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (29284)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0207264u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158C8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC158CC: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005DD0u); - cpu->pc = 0x00005DD0u; return; /* fallthrough */ -} - -void SCPH1001_func_00005DD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005DD0u); -label_BFC158D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005DD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC158D0: A02E7568 sb $t6, 30056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30056; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005DD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30056)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02E7568u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC158D4: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005DD8u); - cpu->pc = 0x00005DD8u; return; /* fallthrough */ -} - -void SCPH1001_func_00005DD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005DD8u); - int psx_delay_BFC15908 = 0; - int psx_delay_BFC15910 = 0; - int psx_delay_BFC15928 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15910u: goto label_BFC15910; - case 0xBFC15918u: goto label_BFC15918; - default: break; - } - } -label_BFC158D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC158D8: A02F7569 sb $t7, 30057($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30057; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005DD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30057)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02F7569u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC158DC: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC158E0: 27184D6C addiu $t8, $t8, 19820 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (19820)); - PGXP_ALU(0x27184D6Cu, cpu->gpr[24], _pgx1, 0x00004D6Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00005DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158E4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC158E8: AC387544 sw $t8, 30020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005DE8u); return; } g_debug_last_store_pc = 0x00005DE8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC387544u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC158EC: 3C190000 lui $t9, 0x0 */ - cpu->gpr[25] = 0x00000000u; - PGXP_ALU(0x3C190000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC158F0: 27394F90 addiu $t9, $t9, 20368 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (20368)); - PGXP_ALU(0x27394F90u, cpu->gpr[25], _pgx1, 0x00004F90u); } -#ifdef PSX_COSIM - cosim_instr(0x00005DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158F4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC158F8: AC397548 sw $t9, 30024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005DF8u); return; } g_debug_last_store_pc = 0x00005DF8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC397548u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00005DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC158FC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15900: AC207540 sw $zero, 30016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E00u); return; } g_debug_last_store_pc = 0x00005E00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207540u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15904: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15908: 0C0018EF jal 0xB00063BC */ - cpu->gpr[31] = 0x00005E10u; /* jal link before delay slot */ - psx_delay_BFC15908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1590C: AC20754C sw $zero, 30028($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30028; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30028)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E0Cu); return; } g_debug_last_store_pc = 0x00005E0Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20754Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E0Cu); -#endif - if (psx_delay_BFC15908) { - psx_delay_BFC15908 = 0; - cpu->gpr[31] = 0x00005E10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000063BCu); - cpu->pc = 0x000063BCu; return; - } -label_BFC15910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15910: 0C001353 jal 0xB0004D4C */ - cpu->gpr[31] = 0x00005E18u; /* jal link before delay slot */ - psx_delay_BFC15910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15914: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E14u); -#endif - if (psx_delay_BFC15910) { - psx_delay_BFC15910 = 0; - cpu->gpr[31] = 0x00005E18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004D4Cu); - cpu->pc = 0x00004D4Cu; return; - } -label_BFC15918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E18u); -#endif - /* 0xBFC15918: 8FA80020 lw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E18u); -#endif - /* 0xBFC1591C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15920: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC15924: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15928: 03E00008 jr $ra */ - psx_delay_BFC15928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1592C: AC2874B8 sw $t0, 29880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E2Cu); return; } g_debug_last_store_pc = 0x00005E2Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC2874B8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E2Cu); -#endif - if (psx_delay_BFC15928) { - psx_delay_BFC15928 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005E30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005E30u); - int psx_delay_BFC15948 = 0; -label_BFC15930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15930: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E30u); -#endif - /* 0xBFC15934: 8DCE751C lw $t6, 29980($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 29980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (29980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E34u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE751Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15938: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1593C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC15940: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005E40u); -#endif - /* 0xBFC15944: 8C427500 lw $v0, 29952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 29952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E44u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C427500u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15948: 03E00008 jr $ra */ - psx_delay_BFC15948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1594C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005E4Cu); -#endif - if (psx_delay_BFC15948) { - psx_delay_BFC15948 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005E50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005E50u); - int psx_delay_BFC15958 = 0; - int psx_taken_BFC15958 = 0; - int psx_delay_BFC15978 = 0; - int psx_taken_BFC15978 = 0; - int psx_delay_BFC15980 = 0; - int psx_taken_BFC15980 = 0; - int psx_delay_BFC15988 = 0; - int psx_taken_BFC15988 = 0; - int psx_delay_BFC15990 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15960u: goto label_BFC15960; - case 0xBFC15964u: goto label_BFC15964; - case 0xBFC15980u: goto label_BFC15980; - case 0xBFC15988u: goto label_BFC15988; - case 0xBFC15990u: goto label_BFC15990; - default: break; - } - } -label_BFC15950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15950: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15954: 25CE7568 addiu $t6, $t6, 30056 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (30056)); - PGXP_ALU(0x25CE7568u, cpu->gpr[14], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15958: 04810002 bgez $a0, 0xBFC15964 */ - uint32_t psx_brA_BFC15958 = cpu->gpr[4]; - psx_taken_BFC15958 = ((int32_t)psx_brA_BFC15958 >= 0); - psx_delay_BFC15958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC1595C: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005E5Cu); -#endif - if (psx_delay_BFC15958) { - psx_delay_BFC15958 = 0; - if (psx_taken_BFC15958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E64u); - goto label_BFC15964; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E60u); - } -label_BFC15960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15960: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005E60u); -#endif -label_BFC15964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15964: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4088u); -#endif - /* 0xBFC15968: 006E3821 addu $a3, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005E68u); -#endif - /* 0xBFC1596C: 90E20000 lbu $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x90E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC15974: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15978: 11E00005 beq $t7, $zero, 0xBFC15990 */ - uint32_t psx_brA_BFC15978 = cpu->gpr[15]; uint32_t psx_brB_BFC15978 = cpu->gpr[0]; - psx_taken_BFC15978 = (psx_brA_BFC15978 == psx_brB_BFC15978); - psx_delay_BFC15978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1597C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005E7Cu); -#endif - if (psx_delay_BFC15978) { - psx_delay_BFC15978 = 0; - if (psx_taken_BFC15978) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E90u); - goto label_BFC15990; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E80u); - } -label_BFC15980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC15980: 04A00003 bltz $a1, 0xBFC15990 */ - uint32_t psx_brA_BFC15980 = cpu->gpr[5]; - psx_taken_BFC15980 = ((int32_t)psx_brA_BFC15980 < 0); - psx_delay_BFC15980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC15984: 28A10401 slti $at, $a1, 1025 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0); - PGXP_ALU(0x28A10401u, cpu->gpr[1], _pgx1, 0x0401u); } -#ifdef PSX_COSIM - cosim_instr(0x00005E84u); -#endif - if (psx_delay_BFC15980) { - psx_delay_BFC15980 = 0; - if (psx_taken_BFC15980) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E90u); - goto label_BFC15990; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E88u); - } -label_BFC15988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15988: 14200003 bne $at, $zero, 0xBFC15998 */ - uint32_t psx_brA_BFC15988 = cpu->gpr[1]; uint32_t psx_brB_BFC15988 = cpu->gpr[0]; - psx_taken_BFC15988 = (psx_brA_BFC15988 != psx_brB_BFC15988); - psx_delay_BFC15988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1598C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005E8Cu); -#endif - if (psx_delay_BFC15988) { - psx_delay_BFC15988 = 0; - if (psx_taken_BFC15988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E98u); - cpu->pc = 0x00005E98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005E90u); - } -label_BFC15990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15990: 03E00008 jr $ra */ - psx_delay_BFC15990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15994: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005E94u); -#endif - if (psx_delay_BFC15990) { - psx_delay_BFC15990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005E98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005E98u); -label_BFC15998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15998: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1599C: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005E9Cu); return; } g_debug_last_store_pc = 0x00005E9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC159A0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC159A4: AC2074A4 sw $zero, 29860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005EA4u); return; } g_debug_last_store_pc = 0x00005EA4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC159A8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC159AC: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC159B0: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC159B4: AC247500 sw $a0, 29952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005EB4u); return; } g_debug_last_store_pc = 0x00005EB4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC247500u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC159B8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC159BC: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC159C0: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC159C4: AC267550 sw $a2, 30032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005EC4u); return; } g_debug_last_store_pc = 0x00005EC4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC267550u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC159C8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC159CC: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC159D0: 00034880 sll $t1, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC159D4: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC159D8: 25085688 addiu $t0, $t0, 22152 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (22152)); - PGXP_ALU(0x25085688u, cpu->gpr[8], _pgx1, 0x00005688u); } -#ifdef PSX_COSIM - cosim_instr(0x00005ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC159DC: AC287528 sw $t0, 29992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005EDCu); return; } g_debug_last_store_pc = 0x00005EDCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC287528u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC159E0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC159E4: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC159E8: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC159EC: AC257508 sw $a1, 29960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005EECu); return; } g_debug_last_store_pc = 0x00005EECu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC257508u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC159F0: 240B0002 addiu $t3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240B0002u, cpu->gpr[11], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00005EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005EF4u); - cpu->pc = 0x00005EF4u; return; /* fallthrough */ -} - -void SCPH1001_func_00005EF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005EF4u); - int psx_delay_BFC159FC = 0; -label_BFC159F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC159F4: A0EB0000 sb $t3, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005EF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA0EB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC159F8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC159FC: 03E00008 jr $ra */ - psx_delay_BFC159FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005F00u); -#endif - if (psx_delay_BFC159FC) { - psx_delay_BFC159FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005F04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005F04u); - int psx_delay_BFC15A0C = 0; - int psx_taken_BFC15A0C = 0; - int psx_delay_BFC15A2C = 0; - int psx_taken_BFC15A2C = 0; - int psx_delay_BFC15A34 = 0; - int psx_taken_BFC15A34 = 0; - int psx_delay_BFC15A3C = 0; - int psx_taken_BFC15A3C = 0; - int psx_delay_BFC15A44 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15A14u: goto label_BFC15A14; - case 0xBFC15A18u: goto label_BFC15A18; - case 0xBFC15A34u: goto label_BFC15A34; - case 0xBFC15A3Cu: goto label_BFC15A3C; - case 0xBFC15A44u: goto label_BFC15A44; - default: break; - } - } -label_BFC15A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15A04: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15A08: 25CE7568 addiu $t6, $t6, 30056 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (30056)); - PGXP_ALU(0x25CE7568u, cpu->gpr[14], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15A0C: 04810002 bgez $a0, 0xBFC15A18 */ - uint32_t psx_brA_BFC15A0C = cpu->gpr[4]; - psx_taken_BFC15A0C = ((int32_t)psx_brA_BFC15A0C >= 0); - psx_delay_BFC15A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC15A10: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F10u); -#endif - if (psx_delay_BFC15A0C) { - psx_delay_BFC15A0C = 0; - if (psx_taken_BFC15A0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F18u); - goto label_BFC15A18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F14u); - } -label_BFC15A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A14: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005F14u); -#endif -label_BFC15A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15A18: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4088u); -#endif - /* 0xBFC15A1C: 006E3821 addu $a3, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F20u); -#endif - /* 0xBFC15A20: 90E20000 lbu $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x90E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15A24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC15A28: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15A2C: 11E00005 beq $t7, $zero, 0xBFC15A44 */ - uint32_t psx_brA_BFC15A2C = cpu->gpr[15]; uint32_t psx_brB_BFC15A2C = cpu->gpr[0]; - psx_taken_BFC15A2C = (psx_brA_BFC15A2C == psx_brB_BFC15A2C); - psx_delay_BFC15A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15A30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005F30u); -#endif - if (psx_delay_BFC15A2C) { - psx_delay_BFC15A2C = 0; - if (psx_taken_BFC15A2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F44u); - goto label_BFC15A44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F34u); - } -label_BFC15A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC15A34: 04A00003 bltz $a1, 0xBFC15A44 */ - uint32_t psx_brA_BFC15A34 = cpu->gpr[5]; - psx_taken_BFC15A34 = ((int32_t)psx_brA_BFC15A34 < 0); - psx_delay_BFC15A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC15A38: 28A10401 slti $at, $a1, 1025 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (1025) ? 1 : 0); - PGXP_ALU(0x28A10401u, cpu->gpr[1], _pgx1, 0x0401u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F38u); -#endif - if (psx_delay_BFC15A34) { - psx_delay_BFC15A34 = 0; - if (psx_taken_BFC15A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F44u); - goto label_BFC15A44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F3Cu); - } -label_BFC15A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15A3C: 14200003 bne $at, $zero, 0xBFC15A4C */ - uint32_t psx_brA_BFC15A3C = cpu->gpr[1]; uint32_t psx_brB_BFC15A3C = cpu->gpr[0]; - psx_taken_BFC15A3C = (psx_brA_BFC15A3C != psx_brB_BFC15A3C); - psx_delay_BFC15A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005F40u); -#endif - if (psx_delay_BFC15A3C) { - psx_delay_BFC15A3C = 0; - if (psx_taken_BFC15A3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F4Cu); - cpu->pc = 0x00005F4Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005F44u); - } -label_BFC15A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15A44: 03E00008 jr $ra */ - psx_delay_BFC15A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15A48: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F48u); -#endif - if (psx_delay_BFC15A44) { - psx_delay_BFC15A44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005F4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005F4Cu); -label_BFC15A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A4C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15A50: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005F50u); return; } g_debug_last_store_pc = 0x00005F50u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A54: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15A58: AC2074A4 sw $zero, 29860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005F58u); return; } g_debug_last_store_pc = 0x00005F58u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A5C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC15A60: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC15A64: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15A68: AC247500 sw $a0, 29952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005F68u); return; } g_debug_last_store_pc = 0x00005F68u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC247500u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A6C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15A70: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC15A74: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC15A78: AC267550 sw $a2, 30032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005F78u); return; } g_debug_last_store_pc = 0x00005F78u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC267550u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A7C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15A80: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15A84: 00034880 sll $t1, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC15A88: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15A8C: 250851F4 addiu $t0, $t0, 20980 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (20980)); - PGXP_ALU(0x250851F4u, cpu->gpr[8], _pgx1, 0x000051F4u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15A90: AC287528 sw $t0, 29992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005F90u); return; } g_debug_last_store_pc = 0x00005F90u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC287528u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00005F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15A94: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC15A98: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00005F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC15A9C: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC15AA0: AC257508 sw $a1, 29960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005FA0u); return; } g_debug_last_store_pc = 0x00005FA0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC257508u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x00005FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC15AA4: 240B0004 addiu $t3, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240B0004u, cpu->gpr[11], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00005FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005FA8u); - cpu->pc = 0x00005FA8u; return; /* fallthrough */ -} - -void SCPH1001_func_00005FA8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005FA8u); - int psx_delay_BFC15AB0 = 0; -label_BFC15AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC15AA8: A0EB0000 sb $t3, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00005FA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA0EB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x00005FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15AAC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15AB0: 03E00008 jr $ra */ - psx_delay_BFC15AB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15AB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005FB4u); -#endif - if (psx_delay_BFC15AB0) { - psx_delay_BFC15AB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005FB8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005FB8u); - int psx_delay_BFC15AC0 = 0; - int psx_taken_BFC15AC0 = 0; - int psx_delay_BFC15AE0 = 0; - int psx_taken_BFC15AE0 = 0; - int psx_delay_BFC15AE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15AC8u: goto label_BFC15AC8; - case 0xBFC15ACCu: goto label_BFC15ACC; - case 0xBFC15AE8u: goto label_BFC15AE8; - default: break; - } - } -label_BFC15AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15AB8: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15ABC: 25CE7568 addiu $t6, $t6, 30056 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (30056)); - PGXP_ALU(0x25CE7568u, cpu->gpr[14], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x00005FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15AC0: 04810002 bgez $a0, 0xBFC15ACC */ - uint32_t psx_brA_BFC15AC0 = cpu->gpr[4]; - psx_taken_BFC15AC0 = ((int32_t)psx_brA_BFC15AC0 >= 0); - psx_delay_BFC15AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC15AC4: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005FC4u); -#endif - if (psx_delay_BFC15AC0) { - psx_delay_BFC15AC0 = 0; - if (psx_taken_BFC15AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005FCCu); - goto label_BFC15ACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005FC8u); - } -label_BFC15AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15AC8: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00005FC8u); -#endif -label_BFC15ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC15ACC: 00011903 sra $v1, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011903u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x00005FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4028u); -#endif - /* 0xBFC15AD0: 006E2821 addu $a1, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005FD0u); -#endif - /* 0xBFC15AD4: 90A20000 lbu $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x90A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00005FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC15ADC: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00005FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15AE0: 15E00003 bne $t7, $zero, 0xBFC15AF0 */ - uint32_t psx_brA_BFC15AE0 = cpu->gpr[15]; uint32_t psx_brB_BFC15AE0 = cpu->gpr[0]; - psx_taken_BFC15AE0 = (psx_brA_BFC15AE0 != psx_brB_BFC15AE0); - psx_delay_BFC15AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15AE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00005FE4u); -#endif - if (psx_delay_BFC15AE0) { - psx_delay_BFC15AE0 = 0; - if (psx_taken_BFC15AE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005FF0u); - cpu->pc = 0x00005FF0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00005FE8u); - } -label_BFC15AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15AE8: 03E00008 jr $ra */ - psx_delay_BFC15AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15AEC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00005FECu); -#endif - if (psx_delay_BFC15AE8) { - psx_delay_BFC15AE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00005FF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00005FF0u); - int psx_delay_BFC15B54 = 0; -label_BFC15AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00005FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00005FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00005FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15AF0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15AF4: AC207514 sw $zero, 29972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005FF4u); return; } g_debug_last_store_pc = 0x00005FF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207514u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15AF8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00005FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15AFC: AC2074A4 sw $zero, 29860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00005FFCu); return; } g_debug_last_store_pc = 0x00005FFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2074A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00005FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15B00: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC15B04: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC15B08: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15B0C: AC247500 sw $a0, 29952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000600Cu); return; } g_debug_last_store_pc = 0x0000600Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC247500u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x0000600Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15B10: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15B14: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC15B18: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15B1C: AC207550 sw $zero, 30032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000601Cu); return; } g_debug_last_store_pc = 0x0000601Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207550u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000601Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15B20: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15B24: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15B28: 00034880 sll $t1, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC15B2C: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15B30: 25085B64 addiu $t0, $t0, 23396 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (23396)); - PGXP_ALU(0x25085B64u, cpu->gpr[8], _pgx1, 0x00005B64u); } -#ifdef PSX_COSIM - cosim_instr(0x00006030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15B34: AC287528 sw $t0, 29992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006034u); return; } g_debug_last_store_pc = 0x00006034u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC287528u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00006034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15B38: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC15B3C: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000603Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC15B40: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15B44: AC207508 sw $zero, 29960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006044u); return; } g_debug_last_store_pc = 0x00006044u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC207508u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00006044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC15B48: 240B0008 addiu $t3, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x240B0008u, cpu->gpr[11], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x00006048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC15B4C: A0AB0000 sb $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000604Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA0AB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15B50: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15B54: 03E00008 jr $ra */ - psx_delay_BFC15B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15B58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006058u); -#endif - if (psx_delay_BFC15B54) { - psx_delay_BFC15B54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000605C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000605Cu); - int psx_delay_BFC15B68 = 0; -label_BFC15B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000605Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15B5C: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15B60: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006060u); -#endif - /* 0xBFC15B64: 90427568 lbu $v0, 30056($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30056; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (30056)), 2, 0x4u); - PGXP_LOAD(0x90427568u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15B68: 03E00008 jr $ra */ - psx_delay_BFC15B68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15B6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000606Cu); -#endif - if (psx_delay_BFC15B68) { - psx_delay_BFC15B68 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006070(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006070u); - int psx_delay_BFC15B88 = 0; - int psx_taken_BFC15B88 = 0; - int psx_delay_BFC15B94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15B7Cu: goto label_BFC15B7C; - case 0xBFC15B90u: goto label_BFC15B90; - default: break; - } - } -label_BFC15B70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15B70: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15B74: 25CE7568 addiu $t6, $t6, 30056 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (30056)); - PGXP_ALU(0x25CE7568u, cpu->gpr[14], _pgx1, 0x00007568u); } -#ifdef PSX_COSIM - cosim_instr(0x00006074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4018u); -#endif - /* 0xBFC15B78: 008E1821 addu $v1, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006078u); -#endif -label_BFC15B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000607Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000607Cu); -#endif - /* 0xBFC15B7C: 90620000 lbu $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x90620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15B80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC15B84: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15B88: 11E0FFFC beq $t7, $zero, 0xBFC15B7C */ - uint32_t psx_brA_BFC15B88 = cpu->gpr[15]; uint32_t psx_brB_BFC15B88 = cpu->gpr[0]; - psx_taken_BFC15B88 = (psx_brA_BFC15B88 == psx_brB_BFC15B88); - psx_delay_BFC15B88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15B8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000608Cu); -#endif - if (psx_delay_BFC15B88) { - psx_delay_BFC15B88 = 0; - if (psx_taken_BFC15B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000607Cu); - goto label_BFC15B7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006090u); - } -label_BFC15B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006090u); -#endif - /* 0xBFC15B90: 90620000 lbu $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x90620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15B94: 03E00008 jr $ra */ - psx_delay_BFC15B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15B98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006098u); -#endif - if (psx_delay_BFC15B94) { - psx_delay_BFC15B94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000609C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000609Cu); - int psx_delay_BFC15BB4 = 0; - int psx_taken_BFC15BB4 = 0; - int psx_delay_BFC15BC0 = 0; - int psx_delay_BFC15BC8 = 0; - int psx_taken_BFC15BC8 = 0; - int psx_delay_BFC15BD4 = 0; - int psx_taken_BFC15BD4 = 0; - int psx_delay_BFC15BE0 = 0; - int psx_taken_BFC15BE0 = 0; - int psx_delay_BFC15BEC = 0; - int psx_delay_BFC15C68 = 0; - int psx_taken_BFC15C68 = 0; - int psx_delay_BFC15C84 = 0; - int psx_delay_BFC15C94 = 0; - int psx_delay_BFC15C9C = 0; - int psx_taken_BFC15C9C = 0; - int psx_delay_BFC15CA8 = 0; - int psx_delay_BFC15CBC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15BBCu: goto label_BFC15BBC; - case 0xBFC15BC8u: goto label_BFC15BC8; - case 0xBFC15BD0u: goto label_BFC15BD0; - case 0xBFC15BDCu: goto label_BFC15BDC; - case 0xBFC15BE8u: goto label_BFC15BE8; - case 0xBFC15BF4u: goto label_BFC15BF4; - case 0xBFC15C44u: goto label_BFC15C44; - case 0xBFC15C70u: goto label_BFC15C70; - case 0xBFC15C8Cu: goto label_BFC15C8C; - case 0xBFC15C9Cu: goto label_BFC15C9C; - case 0xBFC15CA4u: goto label_BFC15CA4; - case 0xBFC15CB0u: goto label_BFC15CB0; - case 0xBFC15CB4u: goto label_BFC15CB4; - default: break; - } - } -label_BFC15B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000609Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC15B9C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x0000609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BA0: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC15BA4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000060A4u); return; } g_debug_last_store_pc = 0x000060A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000060A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BA8: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000060A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC15BAC: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000060ACu); return; } g_debug_last_store_pc = 0x000060ACu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000060ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC15BB0: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000060B0u); return; } g_debug_last_store_pc = 0x000060B0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000060B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15BB4: 14810006 bne $a0, $at, 0xBFC15BD0 */ - uint32_t psx_brA_BFC15BB4 = cpu->gpr[4]; uint32_t psx_brB_BFC15BB4 = cpu->gpr[1]; - psx_taken_BFC15BB4 = (psx_brA_BFC15BB4 != psx_brB_BFC15BB4); - psx_delay_BFC15BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC15BB8: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000060B8u); return; } g_debug_last_store_pc = 0x000060B8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x000060B8u); -#endif - if (psx_delay_BFC15BB4) { - psx_delay_BFC15BB4 = 0; - if (psx_taken_BFC15BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060D0u); - goto label_BFC15BD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060BCu); - } -label_BFC15BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15BBC: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15BC0: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x000060C8u; /* jal link before delay slot */ - psx_delay_BFC15BC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15BC4: 24847268 addiu $a0, $a0, 29288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (29288)); - PGXP_ALU(0x24847268u, cpu->gpr[4], _pgx1, 0x00007268u); } -#ifdef PSX_COSIM - cosim_instr(0x000060C4u); -#endif - if (psx_delay_BFC15BC0) { - psx_delay_BFC15BC0 = 0; - cpu->gpr[31] = 0x000060C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC15BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15BC8: 1000003A beq $zero, $zero, 0xBFC15CB4 */ - uint32_t psx_brA_BFC15BC8 = cpu->gpr[0]; uint32_t psx_brB_BFC15BC8 = cpu->gpr[0]; - psx_taken_BFC15BC8 = (psx_brA_BFC15BC8 == psx_brB_BFC15BC8); - psx_delay_BFC15BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15BCC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000060CCu); -#endif - if (psx_delay_BFC15BC8) { - psx_delay_BFC15BC8 = 0; - if (psx_taken_BFC15BC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061B4u); - goto label_BFC15CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060D0u); - } -label_BFC15BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BD0: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15BD4: 10810004 beq $a0, $at, 0xBFC15BE8 */ - uint32_t psx_brA_BFC15BD4 = cpu->gpr[4]; uint32_t psx_brB_BFC15BD4 = cpu->gpr[1]; - psx_taken_BFC15BD4 = (psx_brA_BFC15BD4 == psx_brB_BFC15BD4); - psx_delay_BFC15BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BD8: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060D8u); -#endif - if (psx_delay_BFC15BD4) { - psx_delay_BFC15BD4 = 0; - if (psx_taken_BFC15BD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060E8u); - goto label_BFC15BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060DCu); - } -label_BFC15BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BDC: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x000060DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15BE0: 14810030 bne $a0, $at, 0xBFC15CA4 */ - uint32_t psx_brA_BFC15BE0 = cpu->gpr[4]; uint32_t psx_brB_BFC15BE0 = cpu->gpr[1]; - psx_taken_BFC15BE0 = (psx_brA_BFC15BE0 != psx_brB_BFC15BE0); - psx_delay_BFC15BE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15BE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000060E4u); -#endif - if (psx_delay_BFC15BE0) { - psx_delay_BFC15BE0 = 0; - if (psx_taken_BFC15BE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061A4u); - goto label_BFC15CA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000060E8u); - } -label_BFC15BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15BE8: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15BEC: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x000060F4u; /* jal link before delay slot */ - psx_delay_BFC15BEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15BF0: 24847294 addiu $a0, $a0, 29332 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (29332)); - PGXP_ALU(0x24847294u, cpu->gpr[4], _pgx1, 0x00007294u); } -#ifdef PSX_COSIM - cosim_instr(0x000060F0u); -#endif - if (psx_delay_BFC15BEC) { - psx_delay_BFC15BEC = 0; - cpu->gpr[31] = 0x000060F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC15BF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000060F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000060F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000060F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15BF4: 240E00FF addiu $t6, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240E00FFu, cpu->gpr[14], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000060F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15BF8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000060F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC15BFC: A02E7598 sb $t6, 30104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30104; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000060FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30104)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02E7598u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000060FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15C00: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15C04: 240F00FF addiu $t7, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240F00FFu, cpu->gpr[15], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC15C08: A02F7570 sb $t7, 30064($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30064; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006108u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30064)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02F7570u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00006108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15C0C: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC15C10: 241800FF addiu $t8, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x241800FFu, cpu->gpr[24], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC15C14: A0387599 sb $t8, 30105($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30105; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006114u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30105)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0387599u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00006114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15C18: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC15C1C: 241900FF addiu $t9, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x241900FFu, cpu->gpr[25], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15C20: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00006120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15C24: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15C28: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC15C2C: 3C050000 lui $a1, 0x0 */ - cpu->gpr[5] = 0x00000000u; - PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000612Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC15C30: 24A57592 addiu $a1, $a1, 30098 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (30098)); - PGXP_ALU(0x24A57592u, cpu->gpr[5], _pgx1, 0x00007592u); } -#ifdef PSX_COSIM - cosim_instr(0x00006130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15C34: 24637572 addiu $v1, $v1, 30066 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30066)); - PGXP_ALU(0x24637572u, cpu->gpr[3], _pgx1, 0x00007572u); } -#ifdef PSX_COSIM - cosim_instr(0x00006134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15C38: 2484759A addiu $a0, $a0, 30106 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (30106)); - PGXP_ALU(0x2484759Au, cpu->gpr[4], _pgx1, 0x0000759Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15C3C: 240200FF addiu $v0, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240200FFu, cpu->gpr[2], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC15C40: A0397571 sb $t9, 30065($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30065; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006140u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (30065)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0397571u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00006140u); -#endif -label_BFC15C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15C44: A0820000 sb $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006144u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15C48: A0620000 sb $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006148u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15C4C: A0820001 sb $v0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000614Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15C50: A0620001 sb $v0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006150u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0620001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15C54: A0820002 sb $v0, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006154u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (2)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820002u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15C58: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00006158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15C5C: A062FFFE sb $v0, -2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000615Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-2)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FFFEu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15C60: A0820003 sb $v0, 3($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006160u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (3)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820003u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15C64: A062FFFF sb $v0, -1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006164u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC15C68: 1465FFF6 bne $v1, $a1, 0xBFC15C44 */ - uint32_t psx_brA_BFC15C68 = cpu->gpr[3]; uint32_t psx_brB_BFC15C68 = cpu->gpr[5]; - psx_taken_BFC15C68 = (psx_brA_BFC15C68 != psx_brB_BFC15C68); - psx_delay_BFC15C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15C6C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x0000616Cu); -#endif - if (psx_delay_BFC15C68) { - psx_delay_BFC15C68 = 0; - if (psx_taken_BFC15C68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006144u); - goto label_BFC15C44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006170u); - } -label_BFC15C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15C70: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC15C74: 3C060000 lui $a2, 0x0 */ - cpu->gpr[6] = 0x00000000u; - PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC15C78: 24C67598 addiu $a2, $a2, 30104 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (30104)); - PGXP_ALU(0x24C67598u, cpu->gpr[6], _pgx1, 0x00007598u); } -#ifdef PSX_COSIM - cosim_instr(0x00006178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15C7C: 24847570 addiu $a0, $a0, 30064 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (30064)); - PGXP_ALU(0x24847570u, cpu->gpr[4], _pgx1, 0x00007570u); } -#ifdef PSX_COSIM - cosim_instr(0x0000617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC15C80: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x00006180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15C84: 0C0012B2 jal 0xB0004AC8 */ - cpu->gpr[31] = 0x0000618Cu; /* jal link before delay slot */ - psx_delay_BFC15C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC15C88: 24070022 addiu $a3, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24070022u, cpu->gpr[7], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x00006188u); -#endif - if (psx_delay_BFC15C84) { - psx_delay_BFC15C84 = 0; - cpu->gpr[31] = 0x0000618Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004AC8u); - cpu->pc = 0x00004AC8u; return; - } -label_BFC15C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000618Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000618Cu); -#endif - /* 0xBFC15C8C: 8FA80024 lw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000618Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15C90: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15C94: 0C0012E4 jal 0xB0004B90 */ - cpu->gpr[31] = 0x0000619Cu; /* jal link before delay slot */ - psx_delay_BFC15C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15C98: AC2874C4 sw $t0, 29892($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006198u); return; } g_debug_last_store_pc = 0x00006198u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC2874C4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00006198u); -#endif - if (psx_delay_BFC15C94) { - psx_delay_BFC15C94 = 0; - cpu->gpr[31] = 0x0000619Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00004B90u); - cpu->pc = 0x00004B90u; return; - } -label_BFC15C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000619Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15C9C: 10000005 beq $zero, $zero, 0xBFC15CB4 */ - uint32_t psx_brA_BFC15C9C = cpu->gpr[0]; uint32_t psx_brB_BFC15C9C = cpu->gpr[0]; - psx_taken_BFC15C9C = (psx_brA_BFC15C9C == psx_brB_BFC15C9C); - psx_delay_BFC15C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15CA0: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x000061A0u); -#endif - if (psx_delay_BFC15C9C) { - psx_delay_BFC15C9C = 0; - if (psx_taken_BFC15C9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061B4u); - goto label_BFC15CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061A4u); - } -label_BFC15CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15CA4: 3C040000 lui $a0, 0x0 */ - cpu->gpr[4] = 0x00000000u; - PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000061A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC15CA8: 0C001AB8 jal 0xB0006AE0 */ - cpu->gpr[31] = 0x000061B0u; /* jal link before delay slot */ - psx_delay_BFC15CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC15CAC: 248472BC addiu $a0, $a0, 29372 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (29372)); - PGXP_ALU(0x248472BCu, cpu->gpr[4], _pgx1, 0x000072BCu); } -#ifdef PSX_COSIM - cosim_instr(0x000061ACu); -#endif - if (psx_delay_BFC15CA8) { - psx_delay_BFC15CA8 = 0; - cpu->gpr[31] = 0x000061B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006AE0u); - cpu->pc = 0x00006AE0u; return; - } -label_BFC15CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15CB0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000061B0u); -#endif -label_BFC15CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061B4u); -#endif - /* 0xBFC15CB4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000061B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000061B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC15CB8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x000061B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15CBC: 03E00008 jr $ra */ - psx_delay_BFC15CBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15CC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000061C0u); -#endif - if (psx_delay_BFC15CBC) { - psx_delay_BFC15CBC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000061C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000061C4u); - int psx_delay_BFC15CE0 = 0; - int psx_taken_BFC15CE0 = 0; - int psx_delay_BFC15CE8 = 0; - int psx_taken_BFC15CE8 = 0; - int psx_delay_BFC15CFC = 0; - int psx_taken_BFC15CFC = 0; - int psx_delay_BFC15D04 = 0; - int psx_taken_BFC15D04 = 0; - int psx_delay_BFC15D10 = 0; - int psx_taken_BFC15D10 = 0; - int psx_delay_BFC15D44 = 0; - int psx_taken_BFC15D44 = 0; - int psx_delay_BFC15D68 = 0; - int psx_taken_BFC15D68 = 0; - int psx_delay_BFC15D90 = 0; - int psx_taken_BFC15D90 = 0; - int psx_delay_BFC15DB4 = 0; - int psx_taken_BFC15DB4 = 0; - int psx_delay_BFC15DC8 = 0; - int psx_taken_BFC15DC8 = 0; - int psx_delay_BFC15DD0 = 0; - int psx_taken_BFC15DD0 = 0; - int psx_delay_BFC15E04 = 0; - int psx_taken_BFC15E04 = 0; - int psx_delay_BFC15E28 = 0; - int psx_taken_BFC15E28 = 0; - int psx_delay_BFC15E50 = 0; - int psx_taken_BFC15E50 = 0; - int psx_delay_BFC15E6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15CE8u: goto label_BFC15CE8; - case 0xBFC15CF0u: goto label_BFC15CF0; - case 0xBFC15D04u: goto label_BFC15D04; - case 0xBFC15D0Cu: goto label_BFC15D0C; - case 0xBFC15D10u: goto label_BFC15D10; - case 0xBFC15D18u: goto label_BFC15D18; - case 0xBFC15D4Cu: goto label_BFC15D4C; - case 0xBFC15D70u: goto label_BFC15D70; - case 0xBFC15D80u: goto label_BFC15D80; - case 0xBFC15D98u: goto label_BFC15D98; - case 0xBFC15DA8u: goto label_BFC15DA8; - case 0xBFC15DBCu: goto label_BFC15DBC; - case 0xBFC15DD0u: goto label_BFC15DD0; - case 0xBFC15DD8u: goto label_BFC15DD8; - case 0xBFC15E0Cu: goto label_BFC15E0C; - case 0xBFC15E30u: goto label_BFC15E30; - case 0xBFC15E40u: goto label_BFC15E40; - case 0xBFC15E58u: goto label_BFC15E58; - case 0xBFC15E68u: goto label_BFC15E68; - default: break; - } - } -label_BFC15CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15CC4: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000061C4u); -#endif - /* 0xBFC15CC8: 8C6374C4 lw $v1, 29892($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 29892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (29892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000061C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6374C4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000061C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15CCC: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x000061CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC15CD0: 3C0F0000 lui $t7, 0x0 */ - cpu->gpr[15] = 0x00000000u; - PGXP_ALU(0x3C0F0000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000061D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC15CD4: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000061D4u); return; } g_debug_last_store_pc = 0x000061D4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000061D4u); -#endif - /* 0xBFC15CD8: 91EF7570 lbu $t7, 30064($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 30064; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (30064)), 15, 0x8000u); - PGXP_LOAD(0x91EF7570u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000061D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15CDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000061DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC15CE0: 11E00003 beq $t7, $zero, 0xBFC15CF0 */ - uint32_t psx_brA_BFC15CE0 = cpu->gpr[15]; uint32_t psx_brB_BFC15CE0 = cpu->gpr[0]; - psx_taken_BFC15CE0 = (psx_brA_BFC15CE0 == psx_brB_BFC15CE0); - psx_delay_BFC15CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15CE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000061E4u); -#endif - if (psx_delay_BFC15CE0) { - psx_delay_BFC15CE0 = 0; - if (psx_taken_BFC15CE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061F0u); - goto label_BFC15CF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061E8u); - } -label_BFC15CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15CE8: 1000002F beq $zero, $zero, 0xBFC15DA8 */ - uint32_t psx_brA_BFC15CE8 = cpu->gpr[0]; uint32_t psx_brB_BFC15CE8 = cpu->gpr[0]; - psx_taken_BFC15CE8 = (psx_brA_BFC15CE8 == psx_brB_BFC15CE8); - psx_delay_BFC15CE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15CEC: 24040023 addiu $a0, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24040023u, cpu->gpr[4], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x000061ECu); -#endif - if (psx_delay_BFC15CE8) { - psx_delay_BFC15CE8 = 0; - if (psx_taken_BFC15CE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062A8u); - goto label_BFC15DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000061F0u); - } -label_BFC15CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000061F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000061F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000061F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15CF0: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000061F0u); -#endif - /* 0xBFC15CF4: 90427571 lbu $v0, 30065($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30065; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (30065)), 2, 0x4u); - PGXP_LOAD(0x90427571u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000061F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15CF8: 24010041 addiu $at, $zero, 65 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (65)); - PGXP_ALU(0x24010041u, cpu->gpr[1], _pgx1, 0x00000041u); } -#ifdef PSX_COSIM - cosim_instr(0x000061F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC15CFC: 14410004 bne $v0, $at, 0xBFC15D10 */ - uint32_t psx_brA_BFC15CFC = cpu->gpr[2]; uint32_t psx_brB_BFC15CFC = cpu->gpr[1]; - psx_taken_BFC15CFC = (psx_brA_BFC15CFC != psx_brB_BFC15CFC); - psx_delay_BFC15CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15D00: 24040023 addiu $a0, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24040023u, cpu->gpr[4], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x00006200u); -#endif - if (psx_delay_BFC15CFC) { - psx_delay_BFC15CFC = 0; - if (psx_taken_BFC15CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006210u); - goto label_BFC15D10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006204u); - } -label_BFC15D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D04: 10000004 beq $zero, $zero, 0xBFC15D18 */ - uint32_t psx_brA_BFC15D04 = cpu->gpr[0]; uint32_t psx_brB_BFC15D04 = cpu->gpr[0]; - psx_taken_BFC15D04 = (psx_brA_BFC15D04 == psx_brB_BFC15D04); - psx_delay_BFC15D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15D08: 24040023 addiu $a0, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24040023u, cpu->gpr[4], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x00006208u); -#endif - if (psx_delay_BFC15D04) { - psx_delay_BFC15D04 = 0; - if (psx_taken_BFC15D04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006218u); - goto label_BFC15D18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000620Cu); - } -label_BFC15D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000620Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC15D0C: 24040023 addiu $a0, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24040023u, cpu->gpr[4], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x0000620Cu); -#endif -label_BFC15D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15D10: 14440025 bne $v0, $a0, 0xBFC15DA8 */ - uint32_t psx_brA_BFC15D10 = cpu->gpr[2]; uint32_t psx_brB_BFC15D10 = cpu->gpr[4]; - psx_taken_BFC15D10 = (psx_brA_BFC15D10 != psx_brB_BFC15D10); - psx_delay_BFC15D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006214u); -#endif - if (psx_delay_BFC15D10) { - psx_delay_BFC15D10 = 0; - if (psx_taken_BFC15D10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062A8u); - goto label_BFC15DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006218u); - } -label_BFC15D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC15D18: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15D1C: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006220u); -#endif - /* 0xBFC15D20: 91087573 lbu $t0, 30067($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 30067; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (30067)), 8, 0x100u); - PGXP_LOAD(0x91087573u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00006220u); -#endif - /* 0xBFC15D24: 93187572 lbu $t8, 30066($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 30066; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (30066)), 24, 0x1000000u); - PGXP_LOAD(0x93187572u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00006224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC15D28: 310900FF andi $t1, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC15D2C: 0018CA00 sll $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 8u; - PGXP_ALU(0x0018CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x0000622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC15D30: 03295025 or $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] | cpu->gpr[9]; - PGXP_ALU(0x03295025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC15D34: A46A0000 sh $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006234u); return; } g_debug_last_store_pc = 0x00006234u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00006234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC15D38: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006238u); -#endif - /* 0xBFC15D3C: 916B7571 lbu $t3, 30065($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 30065; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (30065)), 11, 0x800u); - PGXP_LOAD(0x916B7571u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC15D44: 15640018 bne $t3, $a0, 0xBFC15DA8 */ - uint32_t psx_brA_BFC15D44 = cpu->gpr[11]; uint32_t psx_brB_BFC15D44 = cpu->gpr[4]; - psx_taken_BFC15D44 = (psx_brA_BFC15D44 != psx_brB_BFC15D44); - psx_delay_BFC15D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006248u); -#endif - if (psx_delay_BFC15D44) { - psx_delay_BFC15D44 = 0; - if (psx_taken_BFC15D44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062A8u); - goto label_BFC15DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000624Cu); - } -label_BFC15D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000624Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000624Cu); -#endif - /* 0xBFC15D4C: 946C0000 lhu $t4, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000624Cu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x0000624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC15D50: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC15D54: 358D07C7 ori $t5, $t4, 0x7C7 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x7C7u; - PGXP_ALU(0x358D07C7u, cpu->gpr[13], _pgx1, 0x07C7u); } -#ifdef PSX_COSIM - cosim_instr(0x00006254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC15D58: A46D0000 sh $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006258u); return; } g_debug_last_store_pc = 0x00006258u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00006258u); -#endif - /* 0xBFC15D5C: 91CE7575 lbu $t6, 30069($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 30069; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (30069)), 14, 0x4000u); - PGXP_LOAD(0x91CE7575u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC15D64: 2DC10011 sltiu $at, $t6, 17 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000011u ? 1 : 0); - PGXP_ALU(0x2DC10011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00006264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15D68: 14200005 bne $at, $zero, 0xBFC15D80 */ - uint32_t psx_brA_BFC15D68 = cpu->gpr[1]; uint32_t psx_brB_BFC15D68 = cpu->gpr[0]; - psx_taken_BFC15D68 = (psx_brA_BFC15D68 != psx_brB_BFC15D68); - psx_delay_BFC15D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000626Cu); -#endif - if (psx_delay_BFC15D68) { - psx_delay_BFC15D68 = 0; - if (psx_taken_BFC15D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006280u); - goto label_BFC15D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006270u); - } -label_BFC15D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006270u); -#endif - /* 0xBFC15D70: 946F0000 lhu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006270u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x946F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00006270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC15D78: 31F8FFBF andi $t8, $t7, 0xFFBF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFBFu; - PGXP_ALU(0x31F8FFBFu, cpu->gpr[24], _pgx1, 0xFFBFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC15D7C: A4780000 sh $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000627Cu); return; } g_debug_last_store_pc = 0x0000627Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x0000627Cu); -#endif -label_BFC15D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC15D80: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006280u); -#endif - /* 0xBFC15D84: 91087576 lbu $t0, 30070($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 30070; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (30070)), 8, 0x100u); - PGXP_LOAD(0x91087576u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00006284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC15D8C: 2D010011 sltiu $at, $t0, 17 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000011u ? 1 : 0); - PGXP_ALU(0x2D010011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15D90: 14200005 bne $at, $zero, 0xBFC15DA8 */ - uint32_t psx_brA_BFC15D90 = cpu->gpr[1]; uint32_t psx_brB_BFC15D90 = cpu->gpr[0]; - psx_taken_BFC15D90 = (psx_brA_BFC15D90 != psx_brB_BFC15D90); - psx_delay_BFC15D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006294u); -#endif - if (psx_delay_BFC15D90) { - psx_delay_BFC15D90 = 0; - if (psx_taken_BFC15D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062A8u); - goto label_BFC15DA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006298u); - } -label_BFC15D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006298u); -#endif - /* 0xBFC15D98: 94790000 lhu $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006298u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x94790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00006298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15D9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000629Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC15DA0: 3329FF7F andi $t1, $t9, 0xFF7F */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFF7Fu; - PGXP_ALU(0x3329FF7Fu, cpu->gpr[9], _pgx1, 0xFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000062A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC15DA4: A4690000 sh $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000062A4u); return; } g_debug_last_store_pc = 0x000062A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x000062A4u); -#endif -label_BFC15DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000062A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000062A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC15DA8: 3C0A0000 lui $t2, 0x0 */ - cpu->gpr[10] = 0x00000000u; - PGXP_ALU(0x3C0A0000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000062A8u); -#endif - /* 0xBFC15DAC: 914A7598 lbu $t2, 30104($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 30104; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (30104)), 10, 0x400u); - PGXP_LOAD(0x914A7598u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000062ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15DB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000062B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC15DB4: 1540002C bne $t2, $zero, 0xBFC15E68 */ - uint32_t psx_brA_BFC15DB4 = cpu->gpr[10]; uint32_t psx_brB_BFC15DB4 = cpu->gpr[0]; - psx_taken_BFC15DB4 = (psx_brA_BFC15DB4 != psx_brB_BFC15DB4); - psx_delay_BFC15DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15DB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000062B8u); -#endif - if (psx_delay_BFC15DB4) { - psx_delay_BFC15DB4 = 0; - if (psx_taken_BFC15DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006368u); - goto label_BFC15E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062BCu); - } -label_BFC15DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000062BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000062BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15DBC: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000062BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062C0u); -#endif - /* 0xBFC15DC0: 90427599 lbu $v0, 30105($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30105; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (30105)), 2, 0x4u); - PGXP_LOAD(0x90427599u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000062C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15DC4: 24010041 addiu $at, $zero, 65 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (65)); - PGXP_ALU(0x24010041u, cpu->gpr[1], _pgx1, 0x00000041u); } -#ifdef PSX_COSIM - cosim_instr(0x000062C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC15DC8: 10410003 beq $v0, $at, 0xBFC15DD8 */ - uint32_t psx_brA_BFC15DC8 = cpu->gpr[2]; uint32_t psx_brB_BFC15DC8 = cpu->gpr[1]; - psx_taken_BFC15DC8 = (psx_brA_BFC15DC8 == psx_brB_BFC15DC8); - psx_delay_BFC15DC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15DCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000062CCu); -#endif - if (psx_delay_BFC15DC8) { - psx_delay_BFC15DC8 = 0; - if (psx_taken_BFC15DC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062D8u); - goto label_BFC15DD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062D0u); - } -label_BFC15DD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000062D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000062D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC15DD0: 14440025 bne $v0, $a0, 0xBFC15E68 */ - uint32_t psx_brA_BFC15DD0 = cpu->gpr[2]; uint32_t psx_brB_BFC15DD0 = cpu->gpr[4]; - psx_taken_BFC15DD0 = (psx_brA_BFC15DD0 != psx_brB_BFC15DD0); - psx_delay_BFC15DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15DD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000062D4u); -#endif - if (psx_delay_BFC15DD0) { - psx_delay_BFC15DD0 = 0; - if (psx_taken_BFC15DD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006368u); - goto label_BFC15E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000062D8u); - } -label_BFC15DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000062D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000062D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC15DD8: 3C0B0000 lui $t3, 0x0 */ - cpu->gpr[11] = 0x00000000u; - PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000062D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15DDC: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000062DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062E0u); -#endif - /* 0xBFC15DE0: 91AD759B lbu $t5, 30107($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 30107; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (30107)), 13, 0x2000u); - PGXP_LOAD(0x91AD759Bu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x000062E0u); -#endif - /* 0xBFC15DE4: 916B759A lbu $t3, 30106($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 30106; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (30106)), 11, 0x800u); - PGXP_LOAD(0x916B759Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x000062E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC15DE8: 31AE00FF andi $t6, $t5, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFu; - PGXP_ALU(0x31AE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x000062E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC15DEC: 000B6200 sll $t4, $t3, 8 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 8u; - PGXP_ALU(0x000B6200u, cpu->gpr[12], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x000062ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000062F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC15DF0: 018E7825 or $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] | cpu->gpr[14]; - PGXP_ALU(0x018E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000062F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC15DF4: A46F0002 sh $t7, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000062F4u); return; } g_debug_last_store_pc = 0x000062F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000062F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC15DF8: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000062F8u); -#endif - /* 0xBFC15DFC: 93187599 lbu $t8, 30105($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 30105; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (30105)), 24, 0x1000000u); - PGXP_LOAD(0x93187599u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000062FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC15E04: 17040018 bne $t8, $a0, 0xBFC15E68 */ - uint32_t psx_brA_BFC15E04 = cpu->gpr[24]; uint32_t psx_brB_BFC15E04 = cpu->gpr[4]; - psx_taken_BFC15E04 = (psx_brA_BFC15E04 != psx_brB_BFC15E04); - psx_delay_BFC15E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006308u); -#endif - if (psx_delay_BFC15E04) { - psx_delay_BFC15E04 = 0; - if (psx_taken_BFC15E04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006368u); - goto label_BFC15E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000630Cu); - } -label_BFC15E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000630Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000630Cu); -#endif - /* 0xBFC15E0C: 94680002 lhu $t0, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000630Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x94680002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x0000630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC15E10: 3C090000 lui $t1, 0x0 */ - cpu->gpr[9] = 0x00000000u; - PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC15E14: 351907C7 ori $t9, $t0, 0x7C7 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] | 0x7C7u; - PGXP_ALU(0x351907C7u, cpu->gpr[25], _pgx1, 0x07C7u); } -#ifdef PSX_COSIM - cosim_instr(0x00006314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC15E18: A4790002 sh $t9, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006318u); return; } g_debug_last_store_pc = 0x00006318u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4790002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x00006318u); -#endif - /* 0xBFC15E1C: 9129759D lbu $t1, 30109($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 30109; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (30109)), 9, 0x200u); - PGXP_LOAD(0x9129759Du, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x0000631Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC15E24: 2D210011 sltiu $at, $t1, 17 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000011u ? 1 : 0); - PGXP_ALU(0x2D210011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x00006324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15E28: 14200005 bne $at, $zero, 0xBFC15E40 */ - uint32_t psx_brA_BFC15E28 = cpu->gpr[1]; uint32_t psx_brB_BFC15E28 = cpu->gpr[0]; - psx_taken_BFC15E28 = (psx_brA_BFC15E28 != psx_brB_BFC15E28); - psx_delay_BFC15E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000632Cu); -#endif - if (psx_delay_BFC15E28) { - psx_delay_BFC15E28 = 0; - if (psx_taken_BFC15E28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006340u); - goto label_BFC15E40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006330u); - } -label_BFC15E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006330u); -#endif - /* 0xBFC15E30: 946A0002 lhu $t2, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006330u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00006330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC15E38: 314BFFBF andi $t3, $t2, 0xFFBF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFBFu; - PGXP_ALU(0x314BFFBFu, cpu->gpr[11], _pgx1, 0xFFBFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC15E3C: A46B0002 sh $t3, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000633Cu); return; } g_debug_last_store_pc = 0x0000633Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x0000633Cu); -#endif -label_BFC15E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC15E40: 3C0D0000 lui $t5, 0x0 */ - cpu->gpr[13] = 0x00000000u; - PGXP_ALU(0x3C0D0000u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006340u); -#endif - /* 0xBFC15E44: 91AD759E lbu $t5, 30110($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 30110; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (30110)), 13, 0x2000u); - PGXP_LOAD(0x91AD759Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x00006344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC15E4C: 2DA10011 sltiu $at, $t5, 17 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000011u ? 1 : 0); - PGXP_ALU(0x2DA10011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x0000634Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15E50: 14200005 bne $at, $zero, 0xBFC15E68 */ - uint32_t psx_brA_BFC15E50 = cpu->gpr[1]; uint32_t psx_brB_BFC15E50 = cpu->gpr[0]; - psx_taken_BFC15E50 = (psx_brA_BFC15E50 != psx_brB_BFC15E50); - psx_delay_BFC15E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006354u); -#endif - if (psx_delay_BFC15E50) { - psx_delay_BFC15E50 = 0; - if (psx_taken_BFC15E50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006368u); - goto label_BFC15E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006358u); - } -label_BFC15E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006358u); -#endif - /* 0xBFC15E58: 946C0002 lhu $t4, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006358u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00006358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000635Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC15E60: 318EFF7F andi $t6, $t4, 0xFF7F */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] & 0xFF7Fu; - PGXP_ALU(0x318EFF7Fu, cpu->gpr[14], _pgx1, 0xFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC15E64: A46E0002 sh $t6, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006364u); return; } g_debug_last_store_pc = 0x00006364u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00006364u); -#endif -label_BFC15E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006368u); -#endif - /* 0xBFC15E68: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006368u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15E6C: 03E00008 jr $ra */ - psx_delay_BFC15E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15E70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006370u); -#endif - if (psx_delay_BFC15E6C) { - psx_delay_BFC15E6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006380(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006380u); - int psx_delay_BFC15E88 = 0; -label_BFC15E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006380u); -#endif - debug_server_log_probe(0xBFC15E80u, cpu); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC15E80: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15E84: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15E88: 03E00008 jr $ra */ - psx_delay_BFC15E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC15E8C: AC2E75C0 sw $t6, 30144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000638Cu); return; } g_debug_last_store_pc = 0x0000638Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E75C0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x0000638Cu); -#endif - if (psx_delay_BFC15E88) { - psx_delay_BFC15E88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006390(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006390u); - int psx_delay_BFC15EB4 = 0; -label_BFC15E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15E90: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15E94: AC2072F0 sw $zero, 29424($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29424; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006394u); return; } g_debug_last_store_pc = 0x00006394u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2072F0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00006394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15E98: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15E9C: AC2075C0 sw $zero, 30144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000639Cu); return; } g_debug_last_store_pc = 0x0000639Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2075C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x0000639Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15EA0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC15EA4: AC2475C4 sw $a0, 30148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063A4u); return; } g_debug_last_store_pc = 0x000063A4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC2475C4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x000063A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15EA8: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC15EAC: AC2575C8 sw $a1, 30152($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063ACu); return; } g_debug_last_store_pc = 0x000063ACu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC2575C8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x000063ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15EB0: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15EB4: 03E00008 jr $ra */ - psx_delay_BFC15EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC15EB8: AC2675CC sw $a2, 30156($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063B8u); return; } g_debug_last_store_pc = 0x000063B8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC2675CCu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x000063B8u); -#endif - if (psx_delay_BFC15EB4) { - psx_delay_BFC15EB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_000063BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000063BCu); - int psx_delay_BFC15EE8 = 0; - int psx_taken_BFC15EE8 = 0; - int psx_delay_BFC15EF0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15EDCu: goto label_BFC15EDC; - case 0xBFC15EF0u: goto label_BFC15EF0; - default: break; - } - } -label_BFC15EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000063BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000063BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15EBC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15EC0: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15EC4: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC15EC8: 3C1B0000 lui $k1, 0x0 */ - cpu->gpr[27] = 0x00000000u; - PGXP_ALU(0x3C1B0000u, cpu->gpr[27], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15ECC: AC2075C0 sw $zero, 30144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063CCu); return; } g_debug_last_store_pc = 0x000063CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2075C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000063CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15ED0: 24420CF0 addiu $v0, $v0, 3312 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (3312)); - PGXP_ALU(0x24420CF0u, cpu->gpr[2], _pgx1, 0x00000CF0u); } -#ifdef PSX_COSIM - cosim_instr(0x000063D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15ED4: 275A6408 addiu $k0, $k0, 25608 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (25608)); - PGXP_ALU(0x275A6408u, cpu->gpr[26], _pgx1, 0x00006408u); } -#ifdef PSX_COSIM - cosim_instr(0x000063D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000000u); -#endif - /* 0xBFC15ED8: 277B6418 addiu $k1, $k1, 25624 */ - { uint32_t _pgx1 = cpu->gpr[27]; cpu->gpr[27] = (uint32_t)((int32_t)cpu->gpr[27] + (25624)); - PGXP_ALU(0x277B6418u, cpu->gpr[27], _pgx1, 0x00006418u); } -#ifdef PSX_COSIM - cosim_instr(0x000063D8u); -#endif -label_BFC15EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000063DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000063DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063DCu); -#endif - /* 0xBFC15EDC: 8F430000 lw $v1, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063DCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4000000u); } - PGXP_LOAD(0x8F430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000063DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15EE0: 275A0004 addiu $k0, $k0, 4 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (4)); - PGXP_ALU(0x275A0004u, cpu->gpr[26], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000063E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15EE4: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x000063E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000000u); -#endif - /* 0xBFC15EE8: 175BFFFC bne $k0, $k1, 0xBFC15EDC */ - uint32_t psx_brA_BFC15EE8 = cpu->gpr[26]; uint32_t psx_brB_BFC15EE8 = cpu->gpr[27]; - psx_taken_BFC15EE8 = (psx_brA_BFC15EE8 != psx_brB_BFC15EE8); - psx_delay_BFC15EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15EEC: AC43FFFC sw $v1, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063ECu); return; } g_debug_last_store_pc = 0x000063ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC43FFFCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000063ECu); -#endif - if (psx_delay_BFC15EE8) { - psx_delay_BFC15EE8 = 0; - if (psx_taken_BFC15EE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000063DCu); - goto label_BFC15EDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000063F0u); - } -label_BFC15EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000063F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000063F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC15EF0: 08001A9C j 0xB0006A70 */ - psx_delay_BFC15EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15EF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000063F4u); -#endif - if (psx_delay_BFC15EF0) { - psx_delay_BFC15EF0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A70u); - cpu->pc = 0x00006A70u; return; - } -} - -void SCPH1001_func_000063F8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x000063F8u); - int psx_delay_BFC15F00 = 0; -label_BFC15EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000063F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000063F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000063F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15EF8: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000063F8u); -#endif - /* 0xBFC15EFC: 8C4275C0 lw $v0, 30144($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (30144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000063FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4275C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000063FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC15F00: 03E00008 jr $ra */ - psx_delay_BFC15F00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006404u); -#endif - if (psx_delay_BFC15F00) { - psx_delay_BFC15F00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006408(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006408u); - int psx_delay_BFC15F10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15F18u: goto label_BFC15F18; - default: break; - } - } -label_BFC15F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F08: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F0C: 2442641C addiu $v0, $v0, 25628 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25628)); - PGXP_ALU(0x2442641Cu, cpu->gpr[2], _pgx1, 0x0000641Cu); } -#ifdef PSX_COSIM - cosim_instr(0x0000640Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC15F10: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x00006418u; /* jalr link before delay slot */ - psx_delay_BFC15F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006414u); -#endif - if (psx_delay_BFC15F10) { - psx_delay_BFC15F10 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x00006418u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC15F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000641Cu); - cpu->pc = 0x0000641Cu; return; /* fallthrough */ -} - -void SCPH1001_func_0000641C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000641Cu); - int psx_delay_BFC15F28 = 0; - int psx_taken_BFC15F28 = 0; - int psx_delay_BFC15F3C = 0; - int psx_taken_BFC15F3C = 0; - int psx_delay_BFC15F50 = 0; - int psx_taken_BFC15F50 = 0; - int psx_delay_BFC15F6C = 0; - int psx_taken_BFC15F6C = 0; - int psx_delay_BFC15FE0 = 0; - int psx_taken_BFC15FE0 = 0; - int psx_delay_BFC15FEC = 0; - int psx_delay_BFC1600C = 0; - int psx_taken_BFC1600C = 0; - int psx_delay_BFC16080 = 0; - int psx_taken_BFC16080 = 0; - int psx_delay_BFC1608C = 0; - int psx_delay_BFC16094 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC15F30u: goto label_BFC15F30; - case 0xBFC15F44u: goto label_BFC15F44; - case 0xBFC15F48u: goto label_BFC15F48; - case 0xBFC15F4Cu: goto label_BFC15F4C; - case 0xBFC15F50u: goto label_BFC15F50; - case 0xBFC15F58u: goto label_BFC15F58; - case 0xBFC15F74u: goto label_BFC15F74; - case 0xBFC15FE8u: goto label_BFC15FE8; - case 0xBFC15FECu: goto label_BFC15FEC; - case 0xBFC1600Cu: goto label_BFC1600C; - case 0xBFC16014u: goto label_BFC16014; - case 0xBFC16088u: goto label_BFC16088; - case 0xBFC1608Cu: goto label_BFC1608C; - case 0xBFC16094u: goto label_BFC16094; - default: break; - } - } -label_BFC15F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000641Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F1C: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006420u); -#endif - /* 0xBFC15F20: 8C4275C0 lw $v0, 30144($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (30144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006420u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4275C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15F24: 3C031F80 lui $v1, 0x1F80 */ - cpu->gpr[3] = 0x1F800000u; - PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15F28: 1040005A beq $v0, $zero, 0xBFC16094 */ - uint32_t psx_brA_BFC15F28 = cpu->gpr[2]; uint32_t psx_brB_BFC15F28 = cpu->gpr[0]; - psx_taken_BFC15F28 = (psx_brA_BFC15F28 == psx_brB_BFC15F28); - psx_delay_BFC15F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000642Cu); -#endif - if (psx_delay_BFC15F28) { - psx_delay_BFC15F28 = 0; - if (psx_taken_BFC15F28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006594u); - goto label_BFC16094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006430u); - } -label_BFC15F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006430u); -#endif - /* 0xBFC15F30: 8C621070 lw $v0, 4208($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006430u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C621070u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F38: 30420080 andi $v0, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00006438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15F3C: 10400055 beq $v0, $zero, 0xBFC16094 */ - uint32_t psx_brA_BFC15F3C = cpu->gpr[2]; uint32_t psx_brB_BFC15F3C = cpu->gpr[0]; - psx_taken_BFC15F3C = (psx_brA_BFC15F3C == psx_brB_BFC15F3C); - psx_delay_BFC15F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006440u); -#endif - if (psx_delay_BFC15F3C) { - psx_delay_BFC15F3C = 0; - if (psx_taken_BFC15F3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006594u); - goto label_BFC16094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006444u); - } -label_BFC15F44: - /* 0xBFC15F44: kernel patch-range hook (RAM [0x00006444,0x00006454), - * resume RAM 0x00000000). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00006444u) != 0x8C621074u || - cpu->read_word(0x00006448u) != 0x00000000u || - cpu->read_word(0x0000644Cu) != 0x30420080u || - cpu->read_word(0x00006450u) != 0x10400050u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006444u); - cpu->pc = 0x00006444u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006444u); -#endif - /* 0xBFC15F44: 8C621074 lw $v0, 4212($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006444u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C621074u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006444u); -#endif -label_BFC15F48: - /* 0xBFC15F48: kernel patch-range hook (RAM [0x00006444,0x00006454), - * resume RAM 0x00000000). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00006444u) != 0x8C621074u || - cpu->read_word(0x00006448u) != 0x00000000u || - cpu->read_word(0x0000644Cu) != 0x30420080u || - cpu->read_word(0x00006450u) != 0x10400050u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006448u); - cpu->pc = 0x00006448u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006448u); -#endif -label_BFC15F4C: - /* 0xBFC15F4C: kernel patch-range hook (RAM [0x00006444,0x00006454), - * resume RAM 0x00000000). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00006444u) != 0x8C621074u || - cpu->read_word(0x00006448u) != 0x00000000u || - cpu->read_word(0x0000644Cu) != 0x30420080u || - cpu->read_word(0x00006450u) != 0x10400050u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000644Cu); - cpu->pc = 0x0000644Cu; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000644Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F4C: 30420080 andi $v0, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x0000644Cu); -#endif -label_BFC15F50: - /* 0xBFC15F50: kernel patch-range hook (RAM [0x00006444,0x00006454), - * resume RAM 0x00000000). If the guest has overwritten any word - * of this range, dispatch into RAM so its own instructions run; - * otherwise fall through to the statically compiled ROM code. */ - if (cpu->read_word(0x00006444u) != 0x8C621074u || - cpu->read_word(0x00006448u) != 0x00000000u || - cpu->read_word(0x0000644Cu) != 0x30420080u || - cpu->read_word(0x00006450u) != 0x10400050u) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006450u); - cpu->pc = 0x00006450u; return; - } -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC15F50: 10400050 beq $v0, $zero, 0xBFC16094 */ - uint32_t psx_brA_BFC15F50 = cpu->gpr[2]; uint32_t psx_brB_BFC15F50 = cpu->gpr[0]; - psx_taken_BFC15F50 = (psx_brA_BFC15F50 == psx_brB_BFC15F50); - psx_delay_BFC15F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006454u); -#endif - if (psx_delay_BFC15F50) { - psx_delay_BFC15F50 = 0; - if (psx_taken_BFC15F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006594u); - goto label_BFC16094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006458u); - } -label_BFC15F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC15F58: 3C020000 lui $v0, 0x0 */ - cpu->gpr[2] = 0x00000000u; - PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006458u); -#endif - /* 0xBFC15F5C: 8C4275C8 lw $v0, 30152($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (30152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000645Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4275C8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000645Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15F60: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00006460u); -#endif - /* 0xBFC15F64: 90420000 lbu $v0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); - PGXP_LOAD(0x90420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC15F6C: 14410027 bne $v0, $at, 0xBFC1600C */ - uint32_t psx_brA_BFC15F6C = cpu->gpr[2]; uint32_t psx_brB_BFC15F6C = cpu->gpr[1]; - psx_taken_BFC15F6C = (psx_brA_BFC15F6C != psx_brB_BFC15F6C); - psx_delay_BFC15F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15F70: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00006470u); -#endif - if (psx_delay_BFC15F6C) { - psx_delay_BFC15F6C = 0; - if (psx_taken_BFC15F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000650Cu); - goto label_BFC1600C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006474u); - } -label_BFC15F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15F74: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006474u); -#endif - /* 0xBFC15F78: 8F5A75C4 lw $k0, 30148($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 30148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (30148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006478u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A75C4u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006478u); -#endif - /* 0xBFC15F7C: 90601040 lbu $zero, 4160($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (4160)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x0000647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006480u); -#endif - /* 0xBFC15F80: 93420000 lbu $v0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[26] + (0)), 2, 0x4000000u); - PGXP_LOAD(0x93420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15F84: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15F88: 275A0001 addiu $k0, $k0, 1 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (1)); - PGXP_ALU(0x275A0001u, cpu->gpr[26], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC15F8C: A0621040 sb $v0, 4160($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000648Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0621040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC15F90: AC3A75C4 sw $k0, 30148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006490u); return; } g_debug_last_store_pc = 0x00006490u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC3A75C4u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006490u); -#endif - /* 0xBFC15F94: 947A104A lhu $k0, 4170($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006494u); return; } cpu->gpr[26] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 26, 0x8u); } - PGXP_LOAD(0x947A104Au, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15F98: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15F9C: 375A0010 ori $k0, $k0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = cpu->gpr[26] | 0x10u; - PGXP_ALU(0x375A0010u, cpu->gpr[26], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC15FA0: A47A104A sh $k0, 4170($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000064A0u); return; } g_debug_last_store_pc = 0x000064A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } - PGXP_STORE(0xA47A104Au, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC15FA4: 241AFF7F addiu $k0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x241AFF7Fu, cpu->gpr[26], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000064A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC15FA8: AC7A1070 sw $k0, 4208($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000064A8u); return; } g_debug_last_store_pc = 0x000064A8u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC7A1070u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC15FAC: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000064ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064B0u); -#endif - /* 0xBFC15FB0: 8C6375CC lw $v1, 30156($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 30156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (30156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000064B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6375CCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000064B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15FB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000064B4u); -#endif - /* 0xBFC15FB8: 8C7A0000 lw $k0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000064B8u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x8u); } - PGXP_LOAD(0x8C7A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15FBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000064BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000004u); -#endif - /* 0xBFC15FC0: 0342D026 xor $k0, $k0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2]; - PGXP_ALU(0x0342D026u, cpu->gpr[26], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000064C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC15FC4: AC7A0000 sw $k0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000064C4u); return; } g_debug_last_store_pc = 0x000064C4u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC7A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15FC8: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000064C8u); -#endif - /* 0xBFC15FCC: 975A72F0 lhu $k0, 29424($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 29424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (29424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000064CCu); return; } cpu->gpr[26] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x975A72F0u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000064D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC15FD4: 275A0001 addiu $k0, $k0, 1 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (1)); - PGXP_ALU(0x275A0001u, cpu->gpr[26], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000064D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC15FD8: A43A72F0 sh $k0, 29424($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29424; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000064D8u); return; } g_debug_last_store_pc = 0x000064D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } - PGXP_STORE(0xA43A72F0u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000064D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC15FDC: 2F410080 sltiu $at, $k0, 128 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2F410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000064DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15FE0: 14200002 bne $at, $zero, 0xBFC15FEC */ - uint32_t psx_brA_BFC15FE0 = cpu->gpr[1]; uint32_t psx_brB_BFC15FE0 = cpu->gpr[0]; - psx_taken_BFC15FE0 = (psx_brA_BFC15FE0 != psx_brB_BFC15FE0); - psx_delay_BFC15FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC15FE4: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000064E4u); -#endif - if (psx_delay_BFC15FE0) { - psx_delay_BFC15FE0 = 0; - if (psx_taken_BFC15FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000064ECu); - goto label_BFC15FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000064E8u); - } -label_BFC15FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000064E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000064E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC15FE8: A42075C0 sh $zero, 30144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30144)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000064E8u); return; } g_debug_last_store_pc = 0x000064E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA42075C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x000064E8u); -#endif -label_BFC15FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000064ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000064ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC15FEC: 08001967 j 0xB000659C */ - psx_delay_BFC15FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000064F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC15FF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000064F0u); -#endif - if (psx_delay_BFC15FEC) { - psx_delay_BFC15FEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000659Cu); - cpu->pc = 0x0000659Cu; return; - } -label_BFC1600C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000650Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000650Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000650Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1600C: 14410021 bne $v0, $at, 0xBFC16094 */ - uint32_t psx_brA_BFC1600C = cpu->gpr[2]; uint32_t psx_brB_BFC1600C = cpu->gpr[1]; - psx_taken_BFC1600C = (psx_brA_BFC1600C != psx_brB_BFC1600C); - psx_delay_BFC1600C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006510u); -#endif - if (psx_delay_BFC1600C) { - psx_delay_BFC1600C = 0; - if (psx_taken_BFC1600C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006594u); - goto label_BFC16094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006514u); - } -label_BFC16014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC16014: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006514u); -#endif - /* 0xBFC16018: 8F5A75C4 lw $k0, 30148($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 30148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (30148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006518u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A75C4u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006518u); -#endif - /* 0xBFC1601C: 90621040 lbu $v0, 4160($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (4160)), 2, 0x8u); - PGXP_LOAD(0x90621040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x0000651Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC16020: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000004u); -#endif - /* 0xBFC16024: A3420000 sb $v0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006524u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[26] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA3420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16028: A0601040 sb $zero, 4160($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00006528u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0601040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00006528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC1602C: 275A0001 addiu $k0, $k0, 1 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (1)); - PGXP_ALU(0x275A0001u, cpu->gpr[26], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x0000652Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC16030: AC3A75C4 sw $k0, 30148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006530u); return; } g_debug_last_store_pc = 0x00006530u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC3A75C4u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006530u); -#endif - /* 0xBFC16034: 947A104A lhu $k0, 4170($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006534u); return; } cpu->gpr[26] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 26, 0x8u); } - PGXP_LOAD(0x947A104Au, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC1603C: 375A0010 ori $k0, $k0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = cpu->gpr[26] | 0x10u; - PGXP_ALU(0x375A0010u, cpu->gpr[26], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x0000653Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC16040: A47A104A sh $k0, 4170($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006540u); return; } g_debug_last_store_pc = 0x00006540u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } - PGXP_STORE(0xA47A104Au, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC16044: 241AFF7F addiu $k0, $zero, -129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); - PGXP_ALU(0x241AFF7Fu, cpu->gpr[26], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC16048: AC7A1070 sw $k0, 4208($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006548u); return; } g_debug_last_store_pc = 0x00006548u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC7A1070u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1604C: 3C030000 lui $v1, 0x0 */ - cpu->gpr[3] = 0x00000000u; - PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x0000654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006550u); -#endif - /* 0xBFC16050: 8C6375CC lw $v1, 30156($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 30156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (30156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006550u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6375CCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00006550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC16054: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006554u); -#endif - /* 0xBFC16058: 8C7A0000 lw $k0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006558u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x8u); } - PGXP_LOAD(0x8C7A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1605C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000004u); -#endif - /* 0xBFC16060: 0342D026 xor $k0, $k0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[26] = cpu->gpr[26] ^ cpu->gpr[2]; - PGXP_ALU(0x0342D026u, cpu->gpr[26], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000008u); -#endif - /* 0xBFC16064: AC7A0000 sw $k0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006564u); return; } g_debug_last_store_pc = 0x00006564u; cpu->write_word(psx_addr, cpu->gpr[26]); } - PGXP_STORE(0xAC7A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC16068: 3C1A0000 lui $k0, 0x0 */ - cpu->gpr[26] = 0x00000000u; - PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006568u); -#endif - /* 0xBFC1606C: 975A72F0 lhu $k0, 29424($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 29424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (29424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000656Cu); return; } cpu->gpr[26] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x975A72F0u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x0000656Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC16074: 275A0001 addiu $k0, $k0, 1 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (1)); - PGXP_ALU(0x275A0001u, cpu->gpr[26], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC16078: A43A72F0 sh $k0, 29424($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 29424; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (29424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006578u); return; } g_debug_last_store_pc = 0x00006578u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } - PGXP_STORE(0xA43A72F0u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x00006578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000002u); -#endif - /* 0xBFC1607C: 2F41007F sltiu $at, $k0, 127 */ - { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[1] = (uint32_t)(cpu->gpr[26] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2F41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x0000657Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16080: 14200002 bne $at, $zero, 0xBFC1608C */ - uint32_t psx_brA_BFC16080 = cpu->gpr[1]; uint32_t psx_brB_BFC16080 = cpu->gpr[0]; - psx_taken_BFC16080 = (psx_brA_BFC16080 != psx_brB_BFC16080); - psx_delay_BFC16080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC16084: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006584u); -#endif - if (psx_delay_BFC16080) { - psx_delay_BFC16080 = 0; - if (psx_taken_BFC16080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000658Cu); - goto label_BFC1608C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006588u); - } -label_BFC16088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16088: A42075C0 sh $zero, 30144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 30144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (30144)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006588u); return; } g_debug_last_store_pc = 0x00006588u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA42075C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x00006588u); -#endif -label_BFC1608C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000658Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC1608C: 08001967 j 0xB000659C */ - psx_delay_BFC1608C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16090: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006590u); -#endif - if (psx_delay_BFC1608C) { - psx_delay_BFC1608C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000659Cu); - cpu->pc = 0x0000659Cu; return; - } -label_BFC16094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC16094: 03E00008 jr $ra */ - psx_delay_BFC16094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16098: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006598u); -#endif - if (psx_delay_BFC16094) { - psx_delay_BFC16094 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_0000659C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x0000659Cu); - int psx_delay_BFC160CC = 0; - int psx_delay_BFC160D0 = 0; -label_BFC1609C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000659Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000659Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000659Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC1609C: 241A0100 addiu $k0, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x241A0100u, cpu->gpr[26], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x0000659Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000065A0u); -#endif - /* 0xBFC160A0: 8F5A0008 lw $k0, 8($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065A0u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0008u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000065A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC160A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000065A4u); -#endif - /* 0xBFC160A8: 8F5A0000 lw $k0, 0($k0) */ - { uint32_t _pgxa = cpu->gpr[26]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065A8u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0000u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000065A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC160AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000065ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000065B0u); -#endif - /* 0xBFC160B0: 8F420010 lw $v0, 16($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4000000u); } - PGXP_LOAD(0x8F420010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000065B0u); -#endif - /* 0xBFC160B4: 8F430014 lw $v1, 20($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4000000u); } - PGXP_LOAD(0x8F430014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000065B4u); -#endif - /* 0xBFC160B8: 8F5F0084 lw $ra, 132($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x4000000u); } - PGXP_LOAD(0x8F5F0084u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x000065B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000000u); -#endif - /* 0xBFC160BC: 235A0008 addi $k0, $k0, 8 */ - { uint32_t _pgx1 = cpu->gpr[26]; { int32_t psx_a = (int32_t)cpu->gpr[26]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[26] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x235A0008u, cpu->gpr[26], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x000065BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000065C0u); -#endif - /* 0xBFC160C0: 8F410004 lw $at, 4($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065C0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000000u); } - PGXP_LOAD(0x8F410004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x000065C0u); -#endif - /* 0xBFC160C4: 8F5A0080 lw $k0, 128($k0) */ - { uint32_t _pgxa = cpu->gpr[26] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000065C4u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } - PGXP_LOAD(0x8F5A0080u, _pgxa, cpu->gpr[26]); } -#ifdef PSX_COSIM - cosim_instr(0x000065C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC160C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000065C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000001u); -#endif - /* 0xBFC160CC: 03400008 jr $k0 */ - psx_delay_BFC160CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000065D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC160D0: 42000010 rfe */ - { uint32_t sr = cpu->cop0[12]; cpu->cop0[12] = (sr & 0xFFFFFFC0u) | ((sr >> 2) & 0x0Fu); } /* rfe */ - psx_rfe_mark_escape(); -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[26]); - cpu->pc = cpu->gpr[26]; return; -} - -void SCPH1001_func_00006670(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006670u); - int psx_delay_BFC16184 = 0; - int psx_delay_BFC161A0 = 0; - int psx_taken_BFC161A0 = 0; - int psx_delay_BFC161BC = 0; - int psx_delay_BFC161D0 = 0; - int psx_taken_BFC161D0 = 0; - int psx_delay_BFC161D8 = 0; - int psx_taken_BFC161D8 = 0; - int psx_delay_BFC161E0 = 0; - int psx_taken_BFC161E0 = 0; - int psx_delay_BFC161EC = 0; - int psx_taken_BFC161EC = 0; - int psx_delay_BFC161F4 = 0; - int psx_taken_BFC161F4 = 0; - int psx_delay_BFC161FC = 0; - int psx_taken_BFC161FC = 0; - int psx_delay_BFC16208 = 0; - int psx_taken_BFC16208 = 0; - int psx_delay_BFC16210 = 0; - int psx_taken_BFC16210 = 0; - int psx_delay_BFC16218 = 0; - int psx_taken_BFC16218 = 0; - int psx_delay_BFC16224 = 0; - int psx_taken_BFC16224 = 0; - int psx_delay_BFC1622C = 0; - int psx_taken_BFC1622C = 0; - int psx_delay_BFC16234 = 0; - int psx_taken_BFC16234 = 0; - int psx_delay_BFC16240 = 0; - int psx_taken_BFC16240 = 0; - int psx_delay_BFC16248 = 0; - int psx_taken_BFC16248 = 0; - int psx_delay_BFC16250 = 0; - int psx_taken_BFC16250 = 0; - int psx_delay_BFC1625C = 0; - int psx_taken_BFC1625C = 0; - int psx_delay_BFC16264 = 0; - int psx_taken_BFC16264 = 0; - int psx_delay_BFC1626C = 0; - int psx_taken_BFC1626C = 0; - int psx_delay_BFC16278 = 0; - int psx_taken_BFC16278 = 0; - int psx_delay_BFC16284 = 0; - int psx_taken_BFC16284 = 0; - int psx_delay_BFC162B0 = 0; - int psx_taken_BFC162B0 = 0; - int psx_delay_BFC162C4 = 0; - int psx_taken_BFC162C4 = 0; - int psx_delay_BFC162CC = 0; - int psx_taken_BFC162CC = 0; - int psx_delay_BFC162D4 = 0; - int psx_taken_BFC162D4 = 0; - int psx_delay_BFC162E0 = 0; - int psx_taken_BFC162E0 = 0; - int psx_delay_BFC162E8 = 0; - int psx_taken_BFC162E8 = 0; - int psx_delay_BFC162F0 = 0; - int psx_taken_BFC162F0 = 0; - int psx_delay_BFC162FC = 0; - int psx_taken_BFC162FC = 0; - int psx_delay_BFC16304 = 0; - int psx_taken_BFC16304 = 0; - int psx_delay_BFC1630C = 0; - int psx_taken_BFC1630C = 0; - int psx_delay_BFC16318 = 0; - int psx_taken_BFC16318 = 0; - int psx_delay_BFC16324 = 0; - int psx_taken_BFC16324 = 0; - int psx_delay_BFC16330 = 0; - int psx_taken_BFC16330 = 0; - int psx_delay_BFC1633C = 0; - int psx_taken_BFC1633C = 0; - int psx_delay_BFC16368 = 0; - int psx_taken_BFC16368 = 0; - int psx_delay_BFC1637C = 0; - int psx_taken_BFC1637C = 0; - int psx_delay_BFC16384 = 0; - int psx_taken_BFC16384 = 0; - int psx_delay_BFC1638C = 0; - int psx_taken_BFC1638C = 0; - int psx_delay_BFC16398 = 0; - int psx_taken_BFC16398 = 0; - int psx_delay_BFC163A0 = 0; - int psx_taken_BFC163A0 = 0; - int psx_delay_BFC163A8 = 0; - int psx_taken_BFC163A8 = 0; - int psx_delay_BFC163B4 = 0; - int psx_taken_BFC163B4 = 0; - int psx_delay_BFC163BC = 0; - int psx_taken_BFC163BC = 0; - int psx_delay_BFC163C4 = 0; - int psx_taken_BFC163C4 = 0; - int psx_delay_BFC163D0 = 0; - int psx_taken_BFC163D0 = 0; - int psx_delay_BFC163DC = 0; - int psx_taken_BFC163DC = 0; - int psx_delay_BFC163E8 = 0; - int psx_taken_BFC163E8 = 0; - int psx_delay_BFC163F4 = 0; - int psx_taken_BFC163F4 = 0; - int psx_delay_BFC16420 = 0; - int psx_taken_BFC16420 = 0; - int psx_delay_BFC16434 = 0; - int psx_taken_BFC16434 = 0; - int psx_delay_BFC1643C = 0; - int psx_taken_BFC1643C = 0; - int psx_delay_BFC16444 = 0; - int psx_taken_BFC16444 = 0; - int psx_delay_BFC16450 = 0; - int psx_taken_BFC16450 = 0; - int psx_delay_BFC16458 = 0; - int psx_taken_BFC16458 = 0; - int psx_delay_BFC16460 = 0; - int psx_taken_BFC16460 = 0; - int psx_delay_BFC1646C = 0; - int psx_taken_BFC1646C = 0; - int psx_delay_BFC16474 = 0; - int psx_taken_BFC16474 = 0; - int psx_delay_BFC1647C = 0; - int psx_taken_BFC1647C = 0; - int psx_delay_BFC16488 = 0; - int psx_taken_BFC16488 = 0; - int psx_delay_BFC16494 = 0; - int psx_taken_BFC16494 = 0; - int psx_delay_BFC164A0 = 0; - int psx_taken_BFC164A0 = 0; - int psx_delay_BFC164AC = 0; - int psx_taken_BFC164AC = 0; - int psx_delay_BFC164D8 = 0; - int psx_taken_BFC164D8 = 0; - int psx_delay_BFC164EC = 0; - int psx_taken_BFC164EC = 0; - int psx_delay_BFC164F4 = 0; - int psx_taken_BFC164F4 = 0; - int psx_delay_BFC16530 = 0; - int psx_taken_BFC16530 = 0; - int psx_delay_BFC16540 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1618Cu: goto label_BFC1618C; - case 0xBFC161A8u: goto label_BFC161A8; - case 0xBFC161C4u: goto label_BFC161C4; - case 0xBFC161D8u: goto label_BFC161D8; - case 0xBFC161E0u: goto label_BFC161E0; - case 0xBFC161E8u: goto label_BFC161E8; - case 0xBFC161ECu: goto label_BFC161EC; - case 0xBFC161F4u: goto label_BFC161F4; - case 0xBFC161FCu: goto label_BFC161FC; - case 0xBFC16204u: goto label_BFC16204; - case 0xBFC16208u: goto label_BFC16208; - case 0xBFC16210u: goto label_BFC16210; - case 0xBFC16218u: goto label_BFC16218; - case 0xBFC16220u: goto label_BFC16220; - case 0xBFC16224u: goto label_BFC16224; - case 0xBFC1622Cu: goto label_BFC1622C; - case 0xBFC16234u: goto label_BFC16234; - case 0xBFC1623Cu: goto label_BFC1623C; - case 0xBFC16240u: goto label_BFC16240; - case 0xBFC16248u: goto label_BFC16248; - case 0xBFC16250u: goto label_BFC16250; - case 0xBFC16258u: goto label_BFC16258; - case 0xBFC1625Cu: goto label_BFC1625C; - case 0xBFC16264u: goto label_BFC16264; - case 0xBFC1626Cu: goto label_BFC1626C; - case 0xBFC16274u: goto label_BFC16274; - case 0xBFC16278u: goto label_BFC16278; - case 0xBFC16280u: goto label_BFC16280; - case 0xBFC1628Cu: goto label_BFC1628C; - case 0xBFC16290u: goto label_BFC16290; - case 0xBFC162B8u: goto label_BFC162B8; - case 0xBFC162CCu: goto label_BFC162CC; - case 0xBFC162D4u: goto label_BFC162D4; - case 0xBFC162DCu: goto label_BFC162DC; - case 0xBFC162E0u: goto label_BFC162E0; - case 0xBFC162E8u: goto label_BFC162E8; - case 0xBFC162F0u: goto label_BFC162F0; - case 0xBFC162F8u: goto label_BFC162F8; - case 0xBFC162FCu: goto label_BFC162FC; - case 0xBFC16304u: goto label_BFC16304; - case 0xBFC1630Cu: goto label_BFC1630C; - case 0xBFC16314u: goto label_BFC16314; - case 0xBFC16318u: goto label_BFC16318; - case 0xBFC16320u: goto label_BFC16320; - case 0xBFC1632Cu: goto label_BFC1632C; - case 0xBFC16330u: goto label_BFC16330; - case 0xBFC16338u: goto label_BFC16338; - case 0xBFC16344u: goto label_BFC16344; - case 0xBFC16348u: goto label_BFC16348; - case 0xBFC16370u: goto label_BFC16370; - case 0xBFC16384u: goto label_BFC16384; - case 0xBFC1638Cu: goto label_BFC1638C; - case 0xBFC16394u: goto label_BFC16394; - case 0xBFC16398u: goto label_BFC16398; - case 0xBFC163A0u: goto label_BFC163A0; - case 0xBFC163A8u: goto label_BFC163A8; - case 0xBFC163B0u: goto label_BFC163B0; - case 0xBFC163B4u: goto label_BFC163B4; - case 0xBFC163BCu: goto label_BFC163BC; - case 0xBFC163C4u: goto label_BFC163C4; - case 0xBFC163CCu: goto label_BFC163CC; - case 0xBFC163D0u: goto label_BFC163D0; - case 0xBFC163D8u: goto label_BFC163D8; - case 0xBFC163E4u: goto label_BFC163E4; - case 0xBFC163E8u: goto label_BFC163E8; - case 0xBFC163F0u: goto label_BFC163F0; - case 0xBFC163FCu: goto label_BFC163FC; - case 0xBFC16400u: goto label_BFC16400; - case 0xBFC16428u: goto label_BFC16428; - case 0xBFC1643Cu: goto label_BFC1643C; - case 0xBFC16444u: goto label_BFC16444; - case 0xBFC1644Cu: goto label_BFC1644C; - case 0xBFC16450u: goto label_BFC16450; - case 0xBFC16458u: goto label_BFC16458; - case 0xBFC16460u: goto label_BFC16460; - case 0xBFC16468u: goto label_BFC16468; - case 0xBFC1646Cu: goto label_BFC1646C; - case 0xBFC16474u: goto label_BFC16474; - case 0xBFC1647Cu: goto label_BFC1647C; - case 0xBFC16484u: goto label_BFC16484; - case 0xBFC16488u: goto label_BFC16488; - case 0xBFC16490u: goto label_BFC16490; - case 0xBFC1649Cu: goto label_BFC1649C; - case 0xBFC164A0u: goto label_BFC164A0; - case 0xBFC164A8u: goto label_BFC164A8; - case 0xBFC164B4u: goto label_BFC164B4; - case 0xBFC164B8u: goto label_BFC164B8; - case 0xBFC164E0u: goto label_BFC164E0; - case 0xBFC164F4u: goto label_BFC164F4; - case 0xBFC164FCu: goto label_BFC164FC; - case 0xBFC16500u: goto label_BFC16500; - case 0xBFC16538u: goto label_BFC16538; - default: break; - } - } -label_BFC16170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC16170: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC16174: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006674u); return; } g_debug_last_store_pc = 0x00006674u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00006674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC16178: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006678u); return; } g_debug_last_store_pc = 0x00006678u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x00006678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1617C: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x0000667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC16180: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x00006680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC16184: 0C000845 jal 0xB0002114 */ - cpu->gpr[31] = 0x0000668Cu; /* jal link before delay slot */ - psx_delay_BFC16184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC16188: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00006688u); -#endif - if (psx_delay_BFC16184) { - psx_delay_BFC16184 = 0; - cpu->gpr[31] = 0x0000668Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00002114u); - cpu->pc = 0x00002114u; return; - } -label_BFC1618C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000668Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000668Cu); -#endif - /* 0xBFC1618C: 93A50021 lbu $a1, 33($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 33; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (33)), 5, 0x20000000u); - PGXP_LOAD(0x93A50021u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x0000668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16190: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC16194: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC16198: 246EFF7F addiu $t6, $v1, -129 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[3] + (-129)); - PGXP_ALU(0x246EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1619C: 2DC10004 sltiu $at, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x0000669Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC161A0: 102000CF beq $at, $zero, 0xBFC164E0 */ - uint32_t psx_brA_BFC161A0 = cpu->gpr[1]; uint32_t psx_brB_BFC161A0 = cpu->gpr[0]; - psx_taken_BFC161A0 = (psx_brA_BFC161A0 == psx_brB_BFC161A0); - psx_delay_BFC161A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000066A4u); -#endif - if (psx_delay_BFC161A0) { - psx_delay_BFC161A0 = 0; - if (psx_taken_BFC161A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069E0u); - goto label_BFC164E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066A8u); - } -label_BFC161A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC161A8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000066A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC161AC: 3C010000 lui $at, 0x0 */ - cpu->gpr[1] = 0x00000000u; - PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000066ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC161B0: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000066B0u); -#endif - /* 0xBFC161B4: 8C2E6CE0 lw $t6, 27872($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000066B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2E6CE0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x000066B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000066B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC161BC: 01C00008 jr $t6 */ - psx_delay_BFC161BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000066C0u); -#endif - if (psx_delay_BFC161BC) { - psx_delay_BFC161BC = 0; - /* jump table at 0x00006CE0, 4 entries */ - switch (cpu->gpr[14]) { - case 0x000066C4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066C4u); - goto label_BFC161C4; - case 0x000067B8u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067B8u); - goto label_BFC162B8; - case 0x00006870u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006870u); - goto label_BFC16370; - case 0x00006928u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006928u); - goto label_BFC16428; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } - } -label_BFC161C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066C4u); -#endif - /* 0xBFC161C4: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000066C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000066C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161CC: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x000066CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC161D0: 14200005 bne $at, $zero, 0xBFC161E8 */ - uint32_t psx_brA_BFC161D0 = cpu->gpr[1]; uint32_t psx_brB_BFC161D0 = cpu->gpr[0]; - psx_taken_BFC161D0 = (psx_brA_BFC161D0 != psx_brB_BFC161D0); - psx_delay_BFC161D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161D4: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000066D4u); -#endif - if (psx_delay_BFC161D0) { - psx_delay_BFC161D0 = 0; - if (psx_taken_BFC161D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066E8u); - goto label_BFC161E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066D8u); - } -label_BFC161D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC161D8: 10200004 beq $at, $zero, 0xBFC161EC */ - uint32_t psx_brA_BFC161D8 = cpu->gpr[1]; uint32_t psx_brB_BFC161D8 = cpu->gpr[0]; - psx_taken_BFC161D8 = (psx_brA_BFC161D8 == psx_brB_BFC161D8); - psx_delay_BFC161D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161DC: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000066DCu); -#endif - if (psx_delay_BFC161D8) { - psx_delay_BFC161D8 = 0; - if (psx_taken_BFC161D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066ECu); - goto label_BFC161EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066E0u); - } -label_BFC161E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161E0: 1000002B beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC161E0 = cpu->gpr[0]; uint32_t psx_brB_BFC161E0 = cpu->gpr[0]; - psx_taken_BFC161E0 = (psx_brA_BFC161E0 == psx_brB_BFC161E0); - psx_delay_BFC161E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC161E4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000066E4u); -#endif - if (psx_delay_BFC161E0) { - psx_delay_BFC161E0 = 0; - if (psx_taken_BFC161E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066E8u); - } -label_BFC161E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161E8: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x000066E8u); -#endif -label_BFC161EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC161EC: 14200005 bne $at, $zero, 0xBFC16204 */ - uint32_t psx_brA_BFC161EC = cpu->gpr[1]; uint32_t psx_brB_BFC161EC = cpu->gpr[0]; - psx_taken_BFC161EC = (psx_brA_BFC161EC != psx_brB_BFC161EC); - psx_delay_BFC161EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161F0: 2C4100AD sltiu $at, $v0, 173 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0); - PGXP_ALU(0x2C4100ADu, cpu->gpr[1], _pgx1, 0x00ADu); } -#ifdef PSX_COSIM - cosim_instr(0x000066F0u); -#endif - if (psx_delay_BFC161EC) { - psx_delay_BFC161EC = 0; - if (psx_taken_BFC161EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006704u); - goto label_BFC16204; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066F4u); - } -label_BFC161F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC161F4: 10200004 beq $at, $zero, 0xBFC16208 */ - uint32_t psx_brA_BFC161F4 = cpu->gpr[1]; uint32_t psx_brB_BFC161F4 = cpu->gpr[0]; - psx_taken_BFC161F4 = (psx_brA_BFC161F4 == psx_brB_BFC161F4); - psx_delay_BFC161F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC161F8: 2C4100B8 sltiu $at, $v0, 184 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0); - PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); } -#ifdef PSX_COSIM - cosim_instr(0x000066F8u); -#endif - if (psx_delay_BFC161F4) { - psx_delay_BFC161F4 = 0; - if (psx_taken_BFC161F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006708u); - goto label_BFC16208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000066FCu); - } -label_BFC161FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000066FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000066FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000066FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC161FC: 10000024 beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC161FC = cpu->gpr[0]; uint32_t psx_brB_BFC161FC = cpu->gpr[0]; - psx_taken_BFC161FC = (psx_brA_BFC161FC == psx_brB_BFC161FC); - psx_delay_BFC161FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16200: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006700u); -#endif - if (psx_delay_BFC161FC) { - psx_delay_BFC161FC = 0; - if (psx_taken_BFC161FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006704u); - } -label_BFC16204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16204: 2C4100B8 sltiu $at, $v0, 184 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0); - PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006704u); -#endif -label_BFC16208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16208: 14200005 bne $at, $zero, 0xBFC16220 */ - uint32_t psx_brA_BFC16208 = cpu->gpr[1]; uint32_t psx_brB_BFC16208 = cpu->gpr[0]; - psx_taken_BFC16208 = (psx_brA_BFC16208 != psx_brB_BFC16208); - psx_delay_BFC16208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1620C: 2C4100C0 sltiu $at, $v0, 192 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0); - PGXP_ALU(0x2C4100C0u, cpu->gpr[1], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x0000670Cu); -#endif - if (psx_delay_BFC16208) { - psx_delay_BFC16208 = 0; - if (psx_taken_BFC16208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006720u); - goto label_BFC16220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006710u); - } -label_BFC16210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16210: 10200004 beq $at, $zero, 0xBFC16224 */ - uint32_t psx_brA_BFC16210 = cpu->gpr[1]; uint32_t psx_brB_BFC16210 = cpu->gpr[0]; - psx_taken_BFC16210 = (psx_brA_BFC16210 == psx_brB_BFC16210); - psx_delay_BFC16210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16214: 2C4100C8 sltiu $at, $v0, 200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0); - PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006714u); -#endif - if (psx_delay_BFC16210) { - psx_delay_BFC16210 = 0; - if (psx_taken_BFC16210) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006724u); - goto label_BFC16224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006718u); - } -label_BFC16218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16218: 1000001D beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC16218 = cpu->gpr[0]; uint32_t psx_brB_BFC16218 = cpu->gpr[0]; - psx_taken_BFC16218 = (psx_brA_BFC16218 == psx_brB_BFC16218); - psx_delay_BFC16218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1621C: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x0000671Cu); -#endif - if (psx_delay_BFC16218) { - psx_delay_BFC16218 = 0; - if (psx_taken_BFC16218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006720u); - } -label_BFC16220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16220: 2C4100C8 sltiu $at, $v0, 200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0); - PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006720u); -#endif -label_BFC16224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16224: 14200005 bne $at, $zero, 0xBFC1623C */ - uint32_t psx_brA_BFC16224 = cpu->gpr[1]; uint32_t psx_brB_BFC16224 = cpu->gpr[0]; - psx_taken_BFC16224 = (psx_brA_BFC16224 != psx_brB_BFC16224); - psx_delay_BFC16224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16228: 2C4100CF sltiu $at, $v0, 207 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0); - PGXP_ALU(0x2C4100CFu, cpu->gpr[1], _pgx1, 0x00CFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006728u); -#endif - if (psx_delay_BFC16224) { - psx_delay_BFC16224 = 0; - if (psx_taken_BFC16224) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000673Cu); - goto label_BFC1623C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000672Cu); - } -label_BFC1622C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000672Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000672Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000672Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1622C: 10200004 beq $at, $zero, 0xBFC16240 */ - uint32_t psx_brA_BFC1622C = cpu->gpr[1]; uint32_t psx_brB_BFC1622C = cpu->gpr[0]; - psx_taken_BFC1622C = (psx_brA_BFC1622C == psx_brB_BFC1622C); - psx_delay_BFC1622C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16230: 2C4100DA sltiu $at, $v0, 218 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0); - PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); } -#ifdef PSX_COSIM - cosim_instr(0x00006730u); -#endif - if (psx_delay_BFC1622C) { - psx_delay_BFC1622C = 0; - if (psx_taken_BFC1622C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006740u); - goto label_BFC16240; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006734u); - } -label_BFC16234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16234: 10000016 beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC16234 = cpu->gpr[0]; uint32_t psx_brB_BFC16234 = cpu->gpr[0]; - psx_taken_BFC16234 = (psx_brA_BFC16234 == psx_brB_BFC16234); - psx_delay_BFC16234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16238: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x00006738u); -#endif - if (psx_delay_BFC16234) { - psx_delay_BFC16234 = 0; - if (psx_taken_BFC16234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000673Cu); - } -label_BFC1623C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000673Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1623C: 2C4100DA sltiu $at, $v0, 218 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0); - PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); } -#ifdef PSX_COSIM - cosim_instr(0x0000673Cu); -#endif -label_BFC16240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16240: 14200005 bne $at, $zero, 0xBFC16258 */ - uint32_t psx_brA_BFC16240 = cpu->gpr[1]; uint32_t psx_brB_BFC16240 = cpu->gpr[0]; - psx_taken_BFC16240 = (psx_brA_BFC16240 != psx_brB_BFC16240); - psx_delay_BFC16240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16244: 2C4100E9 sltiu $at, $v0, 233 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0); - PGXP_ALU(0x2C4100E9u, cpu->gpr[1], _pgx1, 0x00E9u); } -#ifdef PSX_COSIM - cosim_instr(0x00006744u); -#endif - if (psx_delay_BFC16240) { - psx_delay_BFC16240 = 0; - if (psx_taken_BFC16240) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006758u); - goto label_BFC16258; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006748u); - } -label_BFC16248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16248: 10200004 beq $at, $zero, 0xBFC1625C */ - uint32_t psx_brA_BFC16248 = cpu->gpr[1]; uint32_t psx_brB_BFC16248 = cpu->gpr[0]; - psx_taken_BFC16248 = (psx_brA_BFC16248 == psx_brB_BFC16248); - psx_delay_BFC16248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1624C: 2C4100F0 sltiu $at, $v0, 240 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0); - PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x0000674Cu); -#endif - if (psx_delay_BFC16248) { - psx_delay_BFC16248 = 0; - if (psx_taken_BFC16248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000675Cu); - goto label_BFC1625C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006750u); - } -label_BFC16250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16250: 1000000F beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC16250 = cpu->gpr[0]; uint32_t psx_brB_BFC16250 = cpu->gpr[0]; - psx_taken_BFC16250 = (psx_brA_BFC16250 == psx_brB_BFC16250); - psx_delay_BFC16250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16254: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x00006754u); -#endif - if (psx_delay_BFC16250) { - psx_delay_BFC16250 = 0; - if (psx_taken_BFC16250) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006758u); - } -label_BFC16258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16258: 2C4100F0 sltiu $at, $v0, 240 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0); - PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006758u); -#endif -label_BFC1625C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000675Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1625C: 14200005 bne $at, $zero, 0xBFC16274 */ - uint32_t psx_brA_BFC1625C = cpu->gpr[1]; uint32_t psx_brB_BFC1625C = cpu->gpr[0]; - psx_taken_BFC1625C = (psx_brA_BFC1625C != psx_brB_BFC1625C); - psx_delay_BFC1625C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16260: 2C4100F8 sltiu $at, $v0, 248 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0); - PGXP_ALU(0x2C4100F8u, cpu->gpr[1], _pgx1, 0x00F8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006760u); -#endif - if (psx_delay_BFC1625C) { - psx_delay_BFC1625C = 0; - if (psx_taken_BFC1625C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006774u); - goto label_BFC16274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006764u); - } -label_BFC16264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16264: 10200004 beq $at, $zero, 0xBFC16278 */ - uint32_t psx_brA_BFC16264 = cpu->gpr[1]; uint32_t psx_brB_BFC16264 = cpu->gpr[0]; - psx_taken_BFC16264 = (psx_brA_BFC16264 == psx_brB_BFC16264); - psx_delay_BFC16264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16268: 240100FC addiu $at, $zero, 252 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (252)); - PGXP_ALU(0x240100FCu, cpu->gpr[1], _pgx1, 0x000000FCu); } -#ifdef PSX_COSIM - cosim_instr(0x00006768u); -#endif - if (psx_delay_BFC16264) { - psx_delay_BFC16264 = 0; - if (psx_taken_BFC16264) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006778u); - goto label_BFC16278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000676Cu); - } -label_BFC1626C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000676Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1626C: 10000008 beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC1626C = cpu->gpr[0]; uint32_t psx_brB_BFC1626C = cpu->gpr[0]; - psx_taken_BFC1626C = (psx_brA_BFC1626C == psx_brB_BFC1626C); - psx_delay_BFC1626C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16270: 24030005 addiu $v1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24030005u, cpu->gpr[3], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x00006770u); -#endif - if (psx_delay_BFC1626C) { - psx_delay_BFC1626C = 0; - if (psx_taken_BFC1626C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006774u); - } -label_BFC16274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16274: 240100FC addiu $at, $zero, 252 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (252)); - PGXP_ALU(0x240100FCu, cpu->gpr[1], _pgx1, 0x000000FCu); } -#ifdef PSX_COSIM - cosim_instr(0x00006774u); -#endif -label_BFC16278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16278: 10410005 beq $v0, $at, 0xBFC16290 */ - uint32_t psx_brA_BFC16278 = cpu->gpr[2]; uint32_t psx_brB_BFC16278 = cpu->gpr[1]; - psx_taken_BFC16278 = (psx_brA_BFC16278 == psx_brB_BFC16278); - psx_delay_BFC16278 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1627C: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x0000677Cu); -#endif - if (psx_delay_BFC16278) { - psx_delay_BFC16278 = 0; - if (psx_taken_BFC16278) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006780u); - } -label_BFC16280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006780u); -#endif - /* 0xBFC16280: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00006780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16284: 10000002 beq $zero, $zero, 0xBFC16290 */ - uint32_t psx_brA_BFC16284 = cpu->gpr[0]; uint32_t psx_brB_BFC16284 = cpu->gpr[0]; - psx_taken_BFC16284 = (psx_brA_BFC16284 == psx_brB_BFC16284); - psx_delay_BFC16284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006788u); -#endif - if (psx_delay_BFC16284) { - psx_delay_BFC16284 = 0; - if (psx_taken_BFC16284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006790u); - goto label_BFC16290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000678Cu); - } -label_BFC1628C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000678Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1628C: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x0000678Cu); -#endif -label_BFC16290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC16290: 3C180000 lui $t8, 0x0 */ - cpu->gpr[24] = 0x00000000u; - PGXP_ALU(0x3C180000u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC16294: 27187300 addiu $t8, $t8, 29440 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (29440)); - PGXP_ALU(0x27187300u, cpu->gpr[24], _pgx1, 0x00007300u); } -#ifdef PSX_COSIM - cosim_instr(0x00006794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC16298: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC1629C: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000679Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067A0u); -#endif - /* 0xBFC162A0: 94480000 lhu $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000067A0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000067A0u); -#endif - /* 0xBFC162A4: 97B90028 lhu $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000067A4u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x97B90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x000067A4u); -#endif - /* 0xBFC162A8: 944A0002 lhu $t2, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000067A8u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x944A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x000067A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC162AC: 03284823 subu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x03284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000067ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC162B0: 100000A1 beq $zero, $zero, 0xBFC16538 */ - uint32_t psx_brA_BFC162B0 = cpu->gpr[0]; uint32_t psx_brB_BFC162B0 = cpu->gpr[0]; - psx_taken_BFC162B0 = (psx_brA_BFC162B0 == psx_brB_BFC162B0); - psx_delay_BFC162B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC162B4: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000067B4u); -#endif - if (psx_delay_BFC162B0) { - psx_delay_BFC162B0 = 0; - if (psx_taken_BFC162B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - goto label_BFC16538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067B8u); - } -label_BFC162B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067B8u); -#endif - /* 0xBFC162B8: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000067B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC162BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000067BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162C0: 2C41004F sltiu $at, $v0, 79 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0); - PGXP_ALU(0x2C41004Fu, cpu->gpr[1], _pgx1, 0x004Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000067C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC162C4: 14200005 bne $at, $zero, 0xBFC162DC */ - uint32_t psx_brA_BFC162C4 = cpu->gpr[1]; uint32_t psx_brB_BFC162C4 = cpu->gpr[0]; - psx_taken_BFC162C4 = (psx_brA_BFC162C4 != psx_brB_BFC162C4); - psx_delay_BFC162C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162C8: 2C410059 sltiu $at, $v0, 89 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0); - PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); } -#ifdef PSX_COSIM - cosim_instr(0x000067C8u); -#endif - if (psx_delay_BFC162C4) { - psx_delay_BFC162C4 = 0; - if (psx_taken_BFC162C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067DCu); - goto label_BFC162DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067CCu); - } -label_BFC162CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC162CC: 10200004 beq $at, $zero, 0xBFC162E0 */ - uint32_t psx_brA_BFC162CC = cpu->gpr[1]; uint32_t psx_brB_BFC162CC = cpu->gpr[0]; - psx_taken_BFC162CC = (psx_brA_BFC162CC == psx_brB_BFC162CC); - psx_delay_BFC162CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162D0: 2C410060 sltiu $at, $v0, 96 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0); - PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); } -#ifdef PSX_COSIM - cosim_instr(0x000067D0u); -#endif - if (psx_delay_BFC162CC) { - psx_delay_BFC162CC = 0; - if (psx_taken_BFC162CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067E0u); - goto label_BFC162E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067D4u); - } -label_BFC162D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC162D4: 1000001C beq $zero, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC162D4 = cpu->gpr[0]; uint32_t psx_brB_BFC162D4 = cpu->gpr[0]; - psx_taken_BFC162D4 = (psx_brA_BFC162D4 == psx_brB_BFC162D4); - psx_delay_BFC162D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC162D8: 24030007 addiu $v1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24030007u, cpu->gpr[3], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x000067D8u); -#endif - if (psx_delay_BFC162D4) { - psx_delay_BFC162D4 = 0; - if (psx_taken_BFC162D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067DCu); - } -label_BFC162DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162DC: 2C410060 sltiu $at, $v0, 96 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0); - PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); } -#ifdef PSX_COSIM - cosim_instr(0x000067DCu); -#endif -label_BFC162E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC162E0: 14200005 bne $at, $zero, 0xBFC162F8 */ - uint32_t psx_brA_BFC162E0 = cpu->gpr[1]; uint32_t psx_brB_BFC162E0 = cpu->gpr[0]; - psx_taken_BFC162E0 = (psx_brA_BFC162E0 != psx_brB_BFC162E0); - psx_delay_BFC162E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162E4: 2C41007A sltiu $at, $v0, 122 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0); - PGXP_ALU(0x2C41007Au, cpu->gpr[1], _pgx1, 0x007Au); } -#ifdef PSX_COSIM - cosim_instr(0x000067E4u); -#endif - if (psx_delay_BFC162E0) { - psx_delay_BFC162E0 = 0; - if (psx_taken_BFC162E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067F8u); - goto label_BFC162F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067E8u); - } -label_BFC162E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC162E8: 10200004 beq $at, $zero, 0xBFC162FC */ - uint32_t psx_brA_BFC162E8 = cpu->gpr[1]; uint32_t psx_brB_BFC162E8 = cpu->gpr[0]; - psx_taken_BFC162E8 = (psx_brA_BFC162E8 == psx_brB_BFC162E8); - psx_delay_BFC162E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162EC: 2C410081 sltiu $at, $v0, 129 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x000067ECu); -#endif - if (psx_delay_BFC162E8) { - psx_delay_BFC162E8 = 0; - if (psx_taken_BFC162E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067FCu); - goto label_BFC162FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067F0u); - } -label_BFC162F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC162F0: 10000015 beq $zero, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC162F0 = cpu->gpr[0]; uint32_t psx_brB_BFC162F0 = cpu->gpr[0]; - psx_taken_BFC162F0 = (psx_brA_BFC162F0 == psx_brB_BFC162F0); - psx_delay_BFC162F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC162F4: 24030008 addiu $v1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24030008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x000067F4u); -#endif - if (psx_delay_BFC162F0) { - psx_delay_BFC162F0 = 0; - if (psx_taken_BFC162F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000067F8u); - } -label_BFC162F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC162F8: 2C410081 sltiu $at, $v0, 129 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x000067F8u); -#endif -label_BFC162FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000067FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000067FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000067FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC162FC: 14200005 bne $at, $zero, 0xBFC16314 */ - uint32_t psx_brA_BFC162FC = cpu->gpr[1]; uint32_t psx_brB_BFC162FC = cpu->gpr[0]; - psx_taken_BFC162FC = (psx_brA_BFC162FC != psx_brB_BFC162FC); - psx_delay_BFC162FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16300: 2C41009B sltiu $at, $v0, 155 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0); - PGXP_ALU(0x2C41009Bu, cpu->gpr[1], _pgx1, 0x009Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00006800u); -#endif - if (psx_delay_BFC162FC) { - psx_delay_BFC162FC = 0; - if (psx_taken_BFC162FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006814u); - goto label_BFC16314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006804u); - } -label_BFC16304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16304: 10200004 beq $at, $zero, 0xBFC16318 */ - uint32_t psx_brA_BFC16304 = cpu->gpr[1]; uint32_t psx_brB_BFC16304 = cpu->gpr[0]; - psx_taken_BFC16304 = (psx_brA_BFC16304 == psx_brB_BFC16304); - psx_delay_BFC16304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16308: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006808u); -#endif - if (psx_delay_BFC16304) { - psx_delay_BFC16304 = 0; - if (psx_taken_BFC16304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006818u); - goto label_BFC16318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000680Cu); - } -label_BFC1630C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000680Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1630C: 1000000E beq $zero, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC1630C = cpu->gpr[0]; uint32_t psx_brB_BFC1630C = cpu->gpr[0]; - psx_taken_BFC1630C = (psx_brA_BFC1630C == psx_brB_BFC1630C); - psx_delay_BFC1630C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16310: 24030009 addiu $v1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24030009u, cpu->gpr[3], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x00006810u); -#endif - if (psx_delay_BFC1630C) { - psx_delay_BFC1630C = 0; - if (psx_taken_BFC1630C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006814u); - } -label_BFC16314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16314: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006814u); -#endif -label_BFC16318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16318: 10200005 beq $at, $zero, 0xBFC16330 */ - uint32_t psx_brA_BFC16318 = cpu->gpr[1]; uint32_t psx_brB_BFC16318 = cpu->gpr[0]; - psx_taken_BFC16318 = (psx_brA_BFC16318 == psx_brB_BFC16318); - psx_delay_BFC16318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1631C: 2C4100F2 sltiu $at, $v0, 242 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0); - PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000681Cu); -#endif - if (psx_delay_BFC16318) { - psx_delay_BFC16318 = 0; - if (psx_taken_BFC16318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006830u); - goto label_BFC16330; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006820u); - } -label_BFC16320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006820u); -#endif - /* 0xBFC16320: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00006820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16324: 10000008 beq $zero, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC16324 = cpu->gpr[0]; uint32_t psx_brB_BFC16324 = cpu->gpr[0]; - psx_taken_BFC16324 = (psx_brA_BFC16324 == psx_brB_BFC16324); - psx_delay_BFC16324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16328: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006828u); -#endif - if (psx_delay_BFC16324) { - psx_delay_BFC16324 = 0; - if (psx_taken_BFC16324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000682Cu); - } -label_BFC1632C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000682Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1632C: 2C4100F2 sltiu $at, $v0, 242 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0); - PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); } -#ifdef PSX_COSIM - cosim_instr(0x0000682Cu); -#endif -label_BFC16330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16330: 14200005 bne $at, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC16330 = cpu->gpr[1]; uint32_t psx_brB_BFC16330 = cpu->gpr[0]; - psx_taken_BFC16330 = (psx_brA_BFC16330 != psx_brB_BFC16330); - psx_delay_BFC16330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16334: 2403000A addiu $v1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2403000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006834u); -#endif - if (psx_delay_BFC16330) { - psx_delay_BFC16330 = 0; - if (psx_taken_BFC16330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006838u); - } -label_BFC16338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006838u); -#endif - /* 0xBFC16338: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00006838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1633C: 10000002 beq $zero, $zero, 0xBFC16348 */ - uint32_t psx_brA_BFC1633C = cpu->gpr[0]; uint32_t psx_brB_BFC1633C = cpu->gpr[0]; - psx_taken_BFC1633C = (psx_brA_BFC1633C == psx_brB_BFC1633C); - psx_delay_BFC1633C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006840u); -#endif - if (psx_delay_BFC1633C) { - psx_delay_BFC1633C = 0; - if (psx_taken_BFC1633C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006848u); - goto label_BFC16348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006844u); - } -label_BFC16344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16344: 2403000A addiu $v1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2403000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006844u); -#endif -label_BFC16348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC16348: 3C0C0000 lui $t4, 0x0 */ - cpu->gpr[12] = 0x00000000u; - PGXP_ALU(0x3C0C0000u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1634C: 258C7300 addiu $t4, $t4, 29440 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (29440)); - PGXP_ALU(0x258C7300u, cpu->gpr[12], _pgx1, 0x00007300u); } -#ifdef PSX_COSIM - cosim_instr(0x0000684Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC16350: 00035880 sll $t3, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC16354: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006854u); -#endif - /* 0xBFC16358: 944E0000 lhu $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006858u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x944E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x00006858u); -#endif - /* 0xBFC1635C: 97AD0028 lhu $t5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000685Cu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x97AD0028u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x0000685Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006860u); -#endif - /* 0xBFC16360: 94580002 lhu $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006860u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00006860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC16364: 01AE7823 subu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16368: 10000073 beq $zero, $zero, 0xBFC16538 */ - uint32_t psx_brA_BFC16368 = cpu->gpr[0]; uint32_t psx_brB_BFC16368 = cpu->gpr[0]; - psx_taken_BFC16368 = (psx_brA_BFC16368 == psx_brB_BFC16368); - psx_delay_BFC16368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC1636C: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000686Cu); -#endif - if (psx_delay_BFC16368) { - psx_delay_BFC16368 = 0; - if (psx_taken_BFC16368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - goto label_BFC16538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006870u); - } -label_BFC16370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006870u); -#endif - /* 0xBFC16370: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16374: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16378: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x00006878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1637C: 14200005 bne $at, $zero, 0xBFC16394 */ - uint32_t psx_brA_BFC1637C = cpu->gpr[1]; uint32_t psx_brB_BFC1637C = cpu->gpr[0]; - psx_taken_BFC1637C = (psx_brA_BFC1637C != psx_brB_BFC1637C); - psx_delay_BFC1637C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16380: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006880u); -#endif - if (psx_delay_BFC1637C) { - psx_delay_BFC1637C = 0; - if (psx_taken_BFC1637C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006894u); - goto label_BFC16394; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006884u); - } -label_BFC16384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16384: 10200004 beq $at, $zero, 0xBFC16398 */ - uint32_t psx_brA_BFC16384 = cpu->gpr[1]; uint32_t psx_brB_BFC16384 = cpu->gpr[0]; - psx_taken_BFC16384 = (psx_brA_BFC16384 == psx_brB_BFC16384); - psx_delay_BFC16384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16388: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00006888u); -#endif - if (psx_delay_BFC16384) { - psx_delay_BFC16384 = 0; - if (psx_taken_BFC16384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006898u); - goto label_BFC16398; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000688Cu); - } -label_BFC1638C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000688Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1638C: 1000001C beq $zero, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC1638C = cpu->gpr[0]; uint32_t psx_brB_BFC1638C = cpu->gpr[0]; - psx_taken_BFC1638C = (psx_brA_BFC1638C == psx_brB_BFC1638C); - psx_delay_BFC1638C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16390: 2403000B addiu $v1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2403000Bu, cpu->gpr[3], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00006890u); -#endif - if (psx_delay_BFC1638C) { - psx_delay_BFC1638C = 0; - if (psx_taken_BFC1638C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006894u); - } -label_BFC16394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16394: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00006894u); -#endif -label_BFC16398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16398: 14200005 bne $at, $zero, 0xBFC163B0 */ - uint32_t psx_brA_BFC16398 = cpu->gpr[1]; uint32_t psx_brB_BFC16398 = cpu->gpr[0]; - psx_taken_BFC16398 = (psx_brA_BFC16398 != psx_brB_BFC16398); - psx_delay_BFC16398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1639C: 2C410097 sltiu $at, $v0, 151 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0); - PGXP_ALU(0x2C410097u, cpu->gpr[1], _pgx1, 0x0097u); } -#ifdef PSX_COSIM - cosim_instr(0x0000689Cu); -#endif - if (psx_delay_BFC16398) { - psx_delay_BFC16398 = 0; - if (psx_taken_BFC16398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068B0u); - goto label_BFC163B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068A0u); - } -label_BFC163A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC163A0: 10200004 beq $at, $zero, 0xBFC163B4 */ - uint32_t psx_brA_BFC163A0 = cpu->gpr[1]; uint32_t psx_brB_BFC163A0 = cpu->gpr[0]; - psx_taken_BFC163A0 = (psx_brA_BFC163A0 == psx_brB_BFC163A0); - psx_delay_BFC163A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163A4: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000068A4u); -#endif - if (psx_delay_BFC163A0) { - psx_delay_BFC163A0 = 0; - if (psx_taken_BFC163A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068B4u); - goto label_BFC163B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068A8u); - } -label_BFC163A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163A8: 10000015 beq $zero, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC163A8 = cpu->gpr[0]; uint32_t psx_brB_BFC163A8 = cpu->gpr[0]; - psx_taken_BFC163A8 = (psx_brA_BFC163A8 == psx_brB_BFC163A8); - psx_delay_BFC163A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC163AC: 2403000C addiu $v1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2403000Cu, cpu->gpr[3], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x000068ACu); -#endif - if (psx_delay_BFC163A8) { - psx_delay_BFC163A8 = 0; - if (psx_taken_BFC163A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068B0u); - } -label_BFC163B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163B0: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000068B0u); -#endif -label_BFC163B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC163B4: 14200005 bne $at, $zero, 0xBFC163CC */ - uint32_t psx_brA_BFC163B4 = cpu->gpr[1]; uint32_t psx_brB_BFC163B4 = cpu->gpr[0]; - psx_taken_BFC163B4 = (psx_brA_BFC163B4 != psx_brB_BFC163B4); - psx_delay_BFC163B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163B8: 2C4100B7 sltiu $at, $v0, 183 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0); - PGXP_ALU(0x2C4100B7u, cpu->gpr[1], _pgx1, 0x00B7u); } -#ifdef PSX_COSIM - cosim_instr(0x000068B8u); -#endif - if (psx_delay_BFC163B4) { - psx_delay_BFC163B4 = 0; - if (psx_taken_BFC163B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068CCu); - goto label_BFC163CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068BCu); - } -label_BFC163BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC163BC: 10200004 beq $at, $zero, 0xBFC163D0 */ - uint32_t psx_brA_BFC163BC = cpu->gpr[1]; uint32_t psx_brB_BFC163BC = cpu->gpr[0]; - psx_taken_BFC163BC = (psx_brA_BFC163BC == psx_brB_BFC163BC); - psx_delay_BFC163BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163C0: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x000068C0u); -#endif - if (psx_delay_BFC163BC) { - psx_delay_BFC163BC = 0; - if (psx_taken_BFC163BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068D0u); - goto label_BFC163D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068C4u); - } -label_BFC163C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163C4: 1000000E beq $zero, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC163C4 = cpu->gpr[0]; uint32_t psx_brB_BFC163C4 = cpu->gpr[0]; - psx_taken_BFC163C4 = (psx_brA_BFC163C4 == psx_brB_BFC163C4); - psx_delay_BFC163C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC163C8: 2403000D addiu $v1, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2403000Du, cpu->gpr[3], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x000068C8u); -#endif - if (psx_delay_BFC163C4) { - psx_delay_BFC163C4 = 0; - if (psx_taken_BFC163C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068CCu); - } -label_BFC163CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163CC: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x000068CCu); -#endif -label_BFC163D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC163D0: 10200005 beq $at, $zero, 0xBFC163E8 */ - uint32_t psx_brA_BFC163D0 = cpu->gpr[1]; uint32_t psx_brB_BFC163D0 = cpu->gpr[0]; - psx_taken_BFC163D0 = (psx_brA_BFC163D0 == psx_brB_BFC163D0); - psx_delay_BFC163D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163D4: 2C4100D7 sltiu $at, $v0, 215 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0); - PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); } -#ifdef PSX_COSIM - cosim_instr(0x000068D4u); -#endif - if (psx_delay_BFC163D0) { - psx_delay_BFC163D0 = 0; - if (psx_taken_BFC163D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068E8u); - goto label_BFC163E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068D8u); - } -label_BFC163D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068D8u); -#endif - /* 0xBFC163D8: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000068D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163DC: 10000008 beq $zero, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC163DC = cpu->gpr[0]; uint32_t psx_brB_BFC163DC = cpu->gpr[0]; - psx_taken_BFC163DC = (psx_brA_BFC163DC == psx_brB_BFC163DC); - psx_delay_BFC163DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000068E0u); -#endif - if (psx_delay_BFC163DC) { - psx_delay_BFC163DC = 0; - if (psx_taken_BFC163DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068E4u); - } -label_BFC163E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC163E4: 2C4100D7 sltiu $at, $v0, 215 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0); - PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); } -#ifdef PSX_COSIM - cosim_instr(0x000068E4u); -#endif -label_BFC163E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC163E8: 14200005 bne $at, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC163E8 = cpu->gpr[1]; uint32_t psx_brB_BFC163E8 = cpu->gpr[0]; - psx_taken_BFC163E8 = (psx_brA_BFC163E8 != psx_brB_BFC163E8); - psx_delay_BFC163E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC163EC: 2403000E addiu $v1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2403000Eu, cpu->gpr[3], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x000068ECu); -#endif - if (psx_delay_BFC163E8) { - psx_delay_BFC163E8 = 0; - if (psx_taken_BFC163E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068F0u); - } -label_BFC163F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068F0u); -#endif - /* 0xBFC163F0: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000068F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163F4: 10000002 beq $zero, $zero, 0xBFC16400 */ - uint32_t psx_brA_BFC163F4 = cpu->gpr[0]; uint32_t psx_brB_BFC163F4 = cpu->gpr[0]; - psx_taken_BFC163F4 = (psx_brA_BFC163F4 == psx_brB_BFC163F4); - psx_delay_BFC163F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC163F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000068F8u); -#endif - if (psx_delay_BFC163F4) { - psx_delay_BFC163F4 = 0; - if (psx_taken_BFC163F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006900u); - goto label_BFC16400; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000068FCu); - } -label_BFC163FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000068FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000068FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000068FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC163FC: 2403000E addiu $v1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2403000Eu, cpu->gpr[3], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x000068FCu); -#endif -label_BFC16400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC16400: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC16404: 25087300 addiu $t0, $t0, 29440 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (29440)); - PGXP_ALU(0x25087300u, cpu->gpr[8], _pgx1, 0x00007300u); } -#ifdef PSX_COSIM - cosim_instr(0x00006904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC16408: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC1640C: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000690Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006910u); -#endif - /* 0xBFC16410: 944A0000 lhu $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006910u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x944A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x00006910u); -#endif - /* 0xBFC16414: 97A90028 lhu $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006914u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x97A90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x00006914u); -#endif - /* 0xBFC16418: 944C0002 lhu $t4, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006918u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x944C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x00006918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC1641C: 012A5823 subu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x0000691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16420: 10000045 beq $zero, $zero, 0xBFC16538 */ - uint32_t psx_brA_BFC16420 = cpu->gpr[0]; uint32_t psx_brB_BFC16420 = cpu->gpr[0]; - psx_taken_BFC16420 = (psx_brA_BFC16420 == psx_brB_BFC16420); - psx_delay_BFC16420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC16424: 016C2021 addu $a0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006924u); -#endif - if (psx_delay_BFC16420) { - psx_delay_BFC16420 = 0; - if (psx_taken_BFC16420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - goto label_BFC16538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006928u); - } -label_BFC16428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006928u); -#endif - /* 0xBFC16428: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x00006928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1642C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x0000692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16430: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x00006930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16434: 14200005 bne $at, $zero, 0xBFC1644C */ - uint32_t psx_brA_BFC16434 = cpu->gpr[1]; uint32_t psx_brB_BFC16434 = cpu->gpr[0]; - psx_taken_BFC16434 = (psx_brA_BFC16434 != psx_brB_BFC16434); - psx_delay_BFC16434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16438: 2C410061 sltiu $at, $v0, 97 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0); - PGXP_ALU(0x2C410061u, cpu->gpr[1], _pgx1, 0x0061u); } -#ifdef PSX_COSIM - cosim_instr(0x00006938u); -#endif - if (psx_delay_BFC16434) { - psx_delay_BFC16434 = 0; - if (psx_taken_BFC16434) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000694Cu); - goto label_BFC1644C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000693Cu); - } -label_BFC1643C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000693Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1643C: 10200004 beq $at, $zero, 0xBFC16450 */ - uint32_t psx_brA_BFC1643C = cpu->gpr[1]; uint32_t psx_brB_BFC1643C = cpu->gpr[0]; - psx_taken_BFC1643C = (psx_brA_BFC1643C == psx_brB_BFC1643C); - psx_delay_BFC1643C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16440: 2C410070 sltiu $at, $v0, 112 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0); - PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); } -#ifdef PSX_COSIM - cosim_instr(0x00006940u); -#endif - if (psx_delay_BFC1643C) { - psx_delay_BFC1643C = 0; - if (psx_taken_BFC1643C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006950u); - goto label_BFC16450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006944u); - } -label_BFC16444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16444: 1000001C beq $zero, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC16444 = cpu->gpr[0]; uint32_t psx_brB_BFC16444 = cpu->gpr[0]; - psx_taken_BFC16444 = (psx_brA_BFC16444 == psx_brB_BFC16444); - psx_delay_BFC16444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16448: 2403000F addiu $v1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2403000Fu, cpu->gpr[3], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006948u); -#endif - if (psx_delay_BFC16444) { - psx_delay_BFC16444 = 0; - if (psx_taken_BFC16444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000694Cu); - } -label_BFC1644C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000694Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1644C: 2C410070 sltiu $at, $v0, 112 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0); - PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); } -#ifdef PSX_COSIM - cosim_instr(0x0000694Cu); -#endif -label_BFC16450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16450: 14200005 bne $at, $zero, 0xBFC16468 */ - uint32_t psx_brA_BFC16450 = cpu->gpr[1]; uint32_t psx_brB_BFC16450 = cpu->gpr[0]; - psx_taken_BFC16450 = (psx_brA_BFC16450 != psx_brB_BFC16450); - psx_delay_BFC16450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16454: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006954u); -#endif - if (psx_delay_BFC16450) { - psx_delay_BFC16450 = 0; - if (psx_taken_BFC16450) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006968u); - goto label_BFC16468; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006958u); - } -label_BFC16458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16458: 10200004 beq $at, $zero, 0xBFC1646C */ - uint32_t psx_brA_BFC16458 = cpu->gpr[1]; uint32_t psx_brB_BFC16458 = cpu->gpr[0]; - psx_taken_BFC16458 = (psx_brA_BFC16458 == psx_brB_BFC16458); - psx_delay_BFC16458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1645C: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x0000695Cu); -#endif - if (psx_delay_BFC16458) { - psx_delay_BFC16458 = 0; - if (psx_taken_BFC16458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000696Cu); - goto label_BFC1646C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006960u); - } -label_BFC16460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16460: 10000015 beq $zero, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC16460 = cpu->gpr[0]; uint32_t psx_brB_BFC16460 = cpu->gpr[0]; - psx_taken_BFC16460 = (psx_brA_BFC16460 == psx_brB_BFC16460); - psx_delay_BFC16460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16464: 24030010 addiu $v1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24030010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x00006964u); -#endif - if (psx_delay_BFC16460) { - psx_delay_BFC16460 = 0; - if (psx_taken_BFC16460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006968u); - } -label_BFC16468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16468: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x00006968u); -#endif -label_BFC1646C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000696Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1646C: 14200005 bne $at, $zero, 0xBFC16484 */ - uint32_t psx_brA_BFC1646C = cpu->gpr[1]; uint32_t psx_brB_BFC1646C = cpu->gpr[0]; - psx_taken_BFC1646C = (psx_brA_BFC1646C != psx_brB_BFC1646C); - psx_delay_BFC1646C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16470: 2C410092 sltiu $at, $v0, 146 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0); - PGXP_ALU(0x2C410092u, cpu->gpr[1], _pgx1, 0x0092u); } -#ifdef PSX_COSIM - cosim_instr(0x00006970u); -#endif - if (psx_delay_BFC1646C) { - psx_delay_BFC1646C = 0; - if (psx_taken_BFC1646C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006984u); - goto label_BFC16484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006974u); - } -label_BFC16474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16474: 10200004 beq $at, $zero, 0xBFC16488 */ - uint32_t psx_brA_BFC16474 = cpu->gpr[1]; uint32_t psx_brB_BFC16474 = cpu->gpr[0]; - psx_taken_BFC16474 = (psx_brA_BFC16474 == psx_brB_BFC16474); - psx_delay_BFC16474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16478: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006978u); -#endif - if (psx_delay_BFC16474) { - psx_delay_BFC16474 = 0; - if (psx_taken_BFC16474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006988u); - goto label_BFC16488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000697Cu); - } -label_BFC1647C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000697Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1647C: 1000000E beq $zero, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC1647C = cpu->gpr[0]; uint32_t psx_brB_BFC1647C = cpu->gpr[0]; - psx_taken_BFC1647C = (psx_brA_BFC1647C == psx_brB_BFC1647C); - psx_delay_BFC1647C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC16480: 24030011 addiu $v1, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24030011u, cpu->gpr[3], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x00006980u); -#endif - if (psx_delay_BFC1647C) { - psx_delay_BFC1647C = 0; - if (psx_taken_BFC1647C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006984u); - } -label_BFC16484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC16484: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006984u); -#endif -label_BFC16488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC16488: 10200005 beq $at, $zero, 0xBFC164A0 */ - uint32_t psx_brA_BFC16488 = cpu->gpr[1]; uint32_t psx_brB_BFC16488 = cpu->gpr[0]; - psx_taken_BFC16488 = (psx_brA_BFC16488 == psx_brB_BFC16488); - psx_delay_BFC16488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1648C: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000698Cu); -#endif - if (psx_delay_BFC16488) { - psx_delay_BFC16488 = 0; - if (psx_taken_BFC16488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069A0u); - goto label_BFC164A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006990u); - } -label_BFC16490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006990u); -#endif - /* 0xBFC16490: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x00006990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16494: 10000008 beq $zero, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC16494 = cpu->gpr[0]; uint32_t psx_brB_BFC16494 = cpu->gpr[0]; - psx_taken_BFC16494 = (psx_brA_BFC16494 == psx_brB_BFC16494); - psx_delay_BFC16494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16498: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006998u); -#endif - if (psx_delay_BFC16494) { - psx_delay_BFC16494 = 0; - if (psx_taken_BFC16494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x0000699Cu); - } -label_BFC1649C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x0000699Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x0000699Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x0000699Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1649C: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x0000699Cu); -#endif -label_BFC164A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC164A0: 14200005 bne $at, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC164A0 = cpu->gpr[1]; uint32_t psx_brB_BFC164A0 = cpu->gpr[0]; - psx_taken_BFC164A0 = (psx_brA_BFC164A0 != psx_brB_BFC164A0); - psx_delay_BFC164A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC164A4: 24030012 addiu $v1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24030012u, cpu->gpr[3], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x000069A4u); -#endif - if (psx_delay_BFC164A0) { - psx_delay_BFC164A0 = 0; - if (psx_taken_BFC164A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069A8u); - } -label_BFC164A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069A8u); -#endif - /* 0xBFC164A8: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x000069A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC164AC: 10000002 beq $zero, $zero, 0xBFC164B8 */ - uint32_t psx_brA_BFC164AC = cpu->gpr[0]; uint32_t psx_brB_BFC164AC = cpu->gpr[0]; - psx_taken_BFC164AC = (psx_brA_BFC164AC == psx_brB_BFC164AC); - psx_delay_BFC164AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC164B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000069B0u); -#endif - if (psx_delay_BFC164AC) { - psx_delay_BFC164AC = 0; - if (psx_taken_BFC164AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B8u); - goto label_BFC164B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069B4u); - } -label_BFC164B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC164B4: 24030012 addiu $v1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24030012u, cpu->gpr[3], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x000069B4u); -#endif -label_BFC164B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC164B8: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x000069B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC164BC: 25CE7300 addiu $t6, $t6, 29440 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (29440)); - PGXP_ALU(0x25CE7300u, cpu->gpr[14], _pgx1, 0x00007300u); } -#ifdef PSX_COSIM - cosim_instr(0x000069BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC164C0: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x000069C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC164C4: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000069C4u); -#endif - /* 0xBFC164C8: 94580000 lhu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000069C8u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x000069C8u); -#endif - /* 0xBFC164CC: 97AF0028 lhu $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000069CCu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x000069CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069D0u); -#endif - /* 0xBFC164D0: 94480002 lhu $t0, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000069D0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x000069D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC164D4: 01F8C823 subu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F8C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000069D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC164D8: 10000017 beq $zero, $zero, 0xBFC16538 */ - uint32_t psx_brA_BFC164D8 = cpu->gpr[0]; uint32_t psx_brB_BFC164D8 = cpu->gpr[0]; - psx_taken_BFC164D8 = (psx_brA_BFC164D8 == psx_brB_BFC164D8); - psx_delay_BFC164D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC164DC: 03282021 addu $a0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000069DCu); -#endif - if (psx_delay_BFC164D8) { - psx_delay_BFC164D8 = 0; - if (psx_taken_BFC164D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - goto label_BFC16538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069E0u); - } -label_BFC164E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069E0u); -#endif - /* 0xBFC164E0: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x000069E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC164E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x000069E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC164E8: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x000069E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC164EC: 10200004 beq $at, $zero, 0xBFC16500 */ - uint32_t psx_brA_BFC164EC = cpu->gpr[1]; uint32_t psx_brB_BFC164EC = cpu->gpr[0]; - psx_taken_BFC164EC = (psx_brA_BFC164EC == psx_brB_BFC164EC); - psx_delay_BFC164EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC164F0: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000069F0u); -#endif - if (psx_delay_BFC164EC) { - psx_delay_BFC164EC = 0; - if (psx_taken_BFC164EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A00u); - goto label_BFC16500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069F4u); - } -label_BFC164F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC164F4: 10000002 beq $zero, $zero, 0xBFC16500 */ - uint32_t psx_brA_BFC164F4 = cpu->gpr[0]; uint32_t psx_brB_BFC164F4 = cpu->gpr[0]; - psx_taken_BFC164F4 = (psx_brA_BFC164F4 == psx_brB_BFC164F4); - psx_delay_BFC164F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC164F8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x000069F8u); -#endif - if (psx_delay_BFC164F4) { - psx_delay_BFC164F4 = 0; - if (psx_taken_BFC164F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A00u); - goto label_BFC16500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x000069FCu); - } -label_BFC164FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x000069FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x000069FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x000069FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC164FC: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x000069FCu); -#endif -label_BFC16500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC16500: 00054840 sll $t1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00054840u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC16504: 01235021 addu $t2, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[3]; - PGXP_ALU(0x01235021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC16508: 254BFEEF addiu $t3, $t2, -273 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-273)); - PGXP_ALU(0x254BFEEFu, cpu->gpr[11], _pgx1, 0xFFFFFEEFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1650C: 316C00FF andi $t4, $t3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu; - PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x00006A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC16510: 3C0E0000 lui $t6, 0x0 */ - cpu->gpr[14] = 0x00000000u; - PGXP_ALU(0x3C0E0000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x00006A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC16514: 25CE734C addiu $t6, $t6, 29516 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (29516)); - PGXP_ALU(0x25CE734Cu, cpu->gpr[14], _pgx1, 0x0000734Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00006A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC16518: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC1651C: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A20u); -#endif - /* 0xBFC16520: 94580000 lhu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006A20u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x00006A20u); -#endif - /* 0xBFC16524: 97AF0028 lhu $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006A24u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x00006A24u); -#endif - /* 0xBFC16528: 94480002 lhu $t0, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00006A28u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x00006A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC1652C: 01F8C823 subu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F8C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC16530: 10000001 beq $zero, $zero, 0xBFC16538 */ - uint32_t psx_brA_BFC16530 = cpu->gpr[0]; uint32_t psx_brB_BFC16530 = cpu->gpr[0]; - psx_taken_BFC16530 = (psx_brA_BFC16530 == psx_brB_BFC16530); - psx_delay_BFC16530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC16534: 03282021 addu $a0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006A34u); -#endif - if (psx_delay_BFC16530) { - psx_delay_BFC16530 = 0; - if (psx_taken_BFC16530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - goto label_BFC16538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x00006A38u); - } -label_BFC16538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A38u); -#endif - /* 0xBFC16538: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00006A38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x00006A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1653C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC16540: 03E00008 jr $ra */ - psx_delay_BFC16540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC16544: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x00006A44u); -#endif - if (psx_delay_BFC16540) { - psx_delay_BFC16540 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006A70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006A70u); - int psx_delay_BFC16574 = 0; -label_BFC16570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16570: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16574: 01400008 jr $t2 */ - psx_delay_BFC16574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16578: 24090044 addiu $t1, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24090044u, cpu->gpr[9], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A78u); -#endif - if (psx_delay_BFC16574) { - psx_delay_BFC16574 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006A80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006A80u); - int psx_delay_BFC16584 = 0; -label_BFC16580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16580: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16584: 01400008 jr $t2 */ - psx_delay_BFC16584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16588: 24090040 addiu $t1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24090040u, cpu->gpr[9], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A88u); -#endif - if (psx_delay_BFC16584) { - psx_delay_BFC16584 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006A90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006A90u); - int psx_delay_BFC16594 = 0; -label_BFC16590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16590: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16594: 01400008 jr $t2 */ - psx_delay_BFC16594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16598: 24090025 addiu $t1, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24090025u, cpu->gpr[9], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x00006A98u); -#endif - if (psx_delay_BFC16594) { - psx_delay_BFC16594 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AA0u); - int psx_delay_BFC165A4 = 0; -label_BFC165A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165A0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165A4: 01400008 jr $t2 */ - psx_delay_BFC165A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165A8: 24090096 addiu $t1, $zero, 150 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (150)); - PGXP_ALU(0x24090096u, cpu->gpr[9], _pgx1, 0x00000096u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AA8u); -#endif - if (psx_delay_BFC165A4) { - psx_delay_BFC165A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AB0u); - int psx_delay_BFC165B4 = 0; -label_BFC165B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165B0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165B4: 01400008 jr $t2 */ - psx_delay_BFC165B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165B8: 24090097 addiu $t1, $zero, 151 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (151)); - PGXP_ALU(0x24090097u, cpu->gpr[9], _pgx1, 0x00000097u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AB8u); -#endif - if (psx_delay_BFC165B4) { - psx_delay_BFC165B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AC0u); - int psx_delay_BFC165C4 = 0; -label_BFC165C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165C0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165C4: 01400008 jr $t2 */ - psx_delay_BFC165C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165C8: 24090099 addiu $t1, $zero, 153 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (153)); - PGXP_ALU(0x24090099u, cpu->gpr[9], _pgx1, 0x00000099u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AC8u); -#endif - if (psx_delay_BFC165C4) { - psx_delay_BFC165C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AD0u); - int psx_delay_BFC165D4 = 0; -label_BFC165D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165D0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165D4: 01400008 jr $t2 */ - psx_delay_BFC165D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165D8: 24090098 addiu $t1, $zero, 152 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (152)); - PGXP_ALU(0x24090098u, cpu->gpr[9], _pgx1, 0x00000098u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AD8u); -#endif - if (psx_delay_BFC165D4) { - psx_delay_BFC165D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AE0u); - int psx_delay_BFC165E4 = 0; -label_BFC165E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165E0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165E4: 01400008 jr $t2 */ - psx_delay_BFC165E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165E8: 2409003F addiu $t1, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2409003Fu, cpu->gpr[9], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006AE8u); -#endif - if (psx_delay_BFC165E4) { - psx_delay_BFC165E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006AF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006AF0u); - int psx_delay_BFC165F4 = 0; -label_BFC165F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165F0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC165F4: 01400008 jr $t2 */ - psx_delay_BFC165F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC165F8: 240900B2 addiu $t1, $zero, 178 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (178)); - PGXP_ALU(0x240900B2u, cpu->gpr[9], _pgx1, 0x000000B2u); } -#ifdef PSX_COSIM - cosim_instr(0x00006AF8u); -#endif - if (psx_delay_BFC165F4) { - psx_delay_BFC165F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B00u); - int psx_delay_BFC16604 = 0; -label_BFC16600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16600: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16604: 01400008 jr $t2 */ - psx_delay_BFC16604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16608: 2409003A addiu $t1, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2409003Au, cpu->gpr[9], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006B08u); -#endif - if (psx_delay_BFC16604) { - psx_delay_BFC16604 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B10u); - int psx_delay_BFC16614 = 0; -label_BFC16610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16610: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16614: 01400008 jr $t2 */ - psx_delay_BFC16614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16618: 24090017 addiu $t1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24090017u, cpu->gpr[9], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B18u); -#endif - if (psx_delay_BFC16614) { - psx_delay_BFC16614 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B20u); - int psx_delay_BFC16624 = 0; -label_BFC16620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16620: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16624: 01400008 jr $t2 */ - psx_delay_BFC16624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16628: 2409002A addiu $t1, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2409002Au, cpu->gpr[9], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006B28u); -#endif - if (psx_delay_BFC16624) { - psx_delay_BFC16624 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B30u); - int psx_delay_BFC16634 = 0; -label_BFC16630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16630: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16634: 01400008 jr $t2 */ - psx_delay_BFC16634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16638: 240900A7 addiu $t1, $zero, 167 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (167)); - PGXP_ALU(0x240900A7u, cpu->gpr[9], _pgx1, 0x000000A7u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B38u); -#endif - if (psx_delay_BFC16634) { - psx_delay_BFC16634 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B40u); - int psx_delay_BFC16644 = 0; -label_BFC16640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16640: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16644: 01400008 jr $t2 */ - psx_delay_BFC16644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16648: 240900A8 addiu $t1, $zero, 168 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (168)); - PGXP_ALU(0x240900A8u, cpu->gpr[9], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B48u); -#endif - if (psx_delay_BFC16644) { - psx_delay_BFC16644 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B50u); - int psx_delay_BFC16654 = 0; -label_BFC16650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16650: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16654: 01400008 jr $t2 */ - psx_delay_BFC16654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16658: 240900A9 addiu $t1, $zero, 169 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (169)); - PGXP_ALU(0x240900A9u, cpu->gpr[9], _pgx1, 0x000000A9u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B58u); -#endif - if (psx_delay_BFC16654) { - psx_delay_BFC16654 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B60u); - int psx_delay_BFC16664 = 0; -label_BFC16660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16660: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16664: 01400008 jr $t2 */ - psx_delay_BFC16664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16668: 240900AA addiu $t1, $zero, 170 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (170)); - PGXP_ALU(0x240900AAu, cpu->gpr[9], _pgx1, 0x000000AAu); } -#ifdef PSX_COSIM - cosim_instr(0x00006B68u); -#endif - if (psx_delay_BFC16664) { - psx_delay_BFC16664 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B70u); - int psx_delay_BFC16674 = 0; -label_BFC16670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16670: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16674: 01400008 jr $t2 */ - psx_delay_BFC16674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16678: 240900AE addiu $t1, $zero, 174 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (174)); - PGXP_ALU(0x240900AEu, cpu->gpr[9], _pgx1, 0x000000AEu); } -#ifdef PSX_COSIM - cosim_instr(0x00006B78u); -#endif - if (psx_delay_BFC16674) { - psx_delay_BFC16674 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B80u); - int psx_delay_BFC16688 = 0; -label_BFC16680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC16680: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC16684: 0000000C syscall */ - cpu->pc = 0x00006B84u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0x00006B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC16688: 03E00008 jr $ra */ - psx_delay_BFC16688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1668C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006B8Cu); -#endif - if (psx_delay_BFC16688) { - psx_delay_BFC16688 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006B90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006B90u); - int psx_delay_BFC16698 = 0; -label_BFC16690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC16690: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x00006B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC16694: 0000000C syscall */ - cpu->pc = 0x00006B94u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0x00006B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC16698: 03E00008 jr $ra */ - psx_delay_BFC16698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1669C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x00006B9Cu); -#endif - if (psx_delay_BFC16698) { - psx_delay_BFC16698 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_00006BA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BA0u); - int psx_delay_BFC166A4 = 0; -label_BFC166A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166A0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166A4: 01400008 jr $t2 */ - psx_delay_BFC166A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166A8: 2409000B addiu $t1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2409000Bu, cpu->gpr[9], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00006BA8u); -#endif - if (psx_delay_BFC166A4) { - psx_delay_BFC166A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006BB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BB0u); - int psx_delay_BFC166B4 = 0; -label_BFC166B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166B0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166B4: 01400008 jr $t2 */ - psx_delay_BFC166B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166B8: 2409001A addiu $t1, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2409001Au, cpu->gpr[9], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x00006BB8u); -#endif - if (psx_delay_BFC166B4) { - psx_delay_BFC166B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006BC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BC0u); - int psx_delay_BFC166C4 = 0; -label_BFC166C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166C0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166C4: 01400008 jr $t2 */ - psx_delay_BFC166C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166C8: 2409001B addiu $t1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2409001Bu, cpu->gpr[9], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x00006BC8u); -#endif - if (psx_delay_BFC166C4) { - psx_delay_BFC166C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006BD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BD0u); - int psx_delay_BFC166D4 = 0; -label_BFC166D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166D0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166D4: 01400008 jr $t2 */ - psx_delay_BFC166D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166D8: 2409001C addiu $t1, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2409001Cu, cpu->gpr[9], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x00006BD8u); -#endif - if (psx_delay_BFC166D4) { - psx_delay_BFC166D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006BE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BE0u); - int psx_delay_BFC166E4 = 0; -label_BFC166E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166E0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166E4: 01400008 jr $t2 */ - psx_delay_BFC166E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166E8: 2409001D addiu $t1, $zero, 29 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (29)); - PGXP_ALU(0x2409001Du, cpu->gpr[9], _pgx1, 0x0000001Du); } -#ifdef PSX_COSIM - cosim_instr(0x00006BE8u); -#endif - if (psx_delay_BFC166E4) { - psx_delay_BFC166E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006BF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006BF0u); - int psx_delay_BFC166F4 = 0; -label_BFC166F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166F0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC166F4: 01400008 jr $t2 */ - psx_delay_BFC166F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC166F8: 2409001E addiu $t1, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2409001Eu, cpu->gpr[9], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x00006BF8u); -#endif - if (psx_delay_BFC166F4) { - psx_delay_BFC166F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006C00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006C00u); - int psx_delay_BFC16704 = 0; -label_BFC16700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16700: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16704: 01400008 jr $t2 */ - psx_delay_BFC16704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16708: 2409001F addiu $t1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2409001Fu, cpu->gpr[9], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x00006C08u); -#endif - if (psx_delay_BFC16704) { - psx_delay_BFC16704 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006C10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006C10u); - int psx_delay_BFC16714 = 0; -label_BFC16710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006C10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16710: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16714: 01400008 jr $t2 */ - psx_delay_BFC16714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16718: 24090021 addiu $t1, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24090021u, cpu->gpr[9], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x00006C18u); -#endif - if (psx_delay_BFC16714) { - psx_delay_BFC16714 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_00006C20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x00006C20u); - int psx_delay_BFC16724 = 0; -label_BFC16720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00006C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00006C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x00006C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16720: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x00006C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC16724: 01400008 jr $t2 */ - psx_delay_BFC16724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC16728: 24090022 addiu $t1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24090022u, cpu->gpr[9], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x00006C28u); -#endif - if (psx_delay_BFC16724) { - psx_delay_BFC16724 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC18000(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18000u); - int psx_delay_BFC18008 = 0; - int psx_delay_BFC18024 = 0; - int psx_delay_BFC1802C = 0; - int psx_delay_BFC18058 = 0; - int psx_delay_BFC18060 = 0; - int psx_delay_BFC18068 = 0; - int psx_delay_BFC18070 = 0; - int psx_delay_BFC18080 = 0; - int psx_delay_BFC18088 = 0; - int psx_delay_BFC18090 = 0; - int psx_delay_BFC18098 = 0; - int psx_delay_BFC180A0 = 0; - int psx_delay_BFC180A8 = 0; - int psx_delay_BFC180B0 = 0; - int psx_delay_BFC180B8 = 0; - int psx_delay_BFC180F4 = 0; - int psx_delay_BFC180FC = 0; - int psx_taken_BFC180FC = 0; - int psx_delay_BFC18104 = 0; - int psx_taken_BFC18104 = 0; - int psx_delay_BFC18118 = 0; - int psx_delay_BFC18120 = 0; - int psx_delay_BFC18128 = 0; - int psx_taken_BFC18128 = 0; - int psx_delay_BFC1813C = 0; - int psx_taken_BFC1813C = 0; - int psx_delay_BFC18150 = 0; - int psx_taken_BFC18150 = 0; - int psx_delay_BFC18158 = 0; - int psx_delay_BFC18160 = 0; - int psx_delay_BFC18168 = 0; - int psx_taken_BFC18168 = 0; - int psx_delay_BFC1817C = 0; - int psx_taken_BFC1817C = 0; - int psx_delay_BFC18184 = 0; - int psx_delay_BFC1818C = 0; - int psx_delay_BFC18194 = 0; - int psx_taken_BFC18194 = 0; - int psx_delay_BFC181BC = 0; - int psx_taken_BFC181BC = 0; - int psx_delay_BFC181C4 = 0; - int psx_delay_BFC181CC = 0; - int psx_delay_BFC181D4 = 0; - int psx_delay_BFC181DC = 0; - int psx_taken_BFC181DC = 0; - int psx_delay_BFC18200 = 0; - int psx_delay_BFC18214 = 0; - int psx_delay_BFC18220 = 0; - int psx_delay_BFC18228 = 0; - int psx_delay_BFC1823C = 0; - int psx_delay_BFC1824C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC18010u: goto label_BFC18010; - case 0xBFC1802Cu: goto label_BFC1802C; - case 0xBFC18034u: goto label_BFC18034; - case 0xBFC18060u: goto label_BFC18060; - case 0xBFC18068u: goto label_BFC18068; - case 0xBFC18070u: goto label_BFC18070; - case 0xBFC18078u: goto label_BFC18078; - case 0xBFC18088u: goto label_BFC18088; - case 0xBFC18090u: goto label_BFC18090; - case 0xBFC18098u: goto label_BFC18098; - case 0xBFC180A0u: goto label_BFC180A0; - case 0xBFC180A8u: goto label_BFC180A8; - case 0xBFC180B0u: goto label_BFC180B0; - case 0xBFC180B8u: goto label_BFC180B8; - case 0xBFC180C0u: goto label_BFC180C0; - case 0xBFC180FCu: goto label_BFC180FC; - case 0xBFC18104u: goto label_BFC18104; - case 0xBFC1810Cu: goto label_BFC1810C; - case 0xBFC18118u: goto label_BFC18118; - case 0xBFC18120u: goto label_BFC18120; - case 0xBFC18128u: goto label_BFC18128; - case 0xBFC18130u: goto label_BFC18130; - case 0xBFC18144u: goto label_BFC18144; - case 0xBFC18158u: goto label_BFC18158; - case 0xBFC18160u: goto label_BFC18160; - case 0xBFC18168u: goto label_BFC18168; - case 0xBFC18170u: goto label_BFC18170; - case 0xBFC18184u: goto label_BFC18184; - case 0xBFC1818Cu: goto label_BFC1818C; - case 0xBFC18194u: goto label_BFC18194; - case 0xBFC1819Cu: goto label_BFC1819C; - case 0xBFC181C4u: goto label_BFC181C4; - case 0xBFC181CCu: goto label_BFC181CC; - case 0xBFC181D4u: goto label_BFC181D4; - case 0xBFC181DCu: goto label_BFC181DC; - case 0xBFC181E4u: goto label_BFC181E4; - case 0xBFC181E8u: goto label_BFC181E8; - case 0xBFC18208u: goto label_BFC18208; - case 0xBFC1821Cu: goto label_BFC1821C; - case 0xBFC18228u: goto label_BFC18228; - case 0xBFC18230u: goto label_BFC18230; - case 0xBFC18244u: goto label_BFC18244; - case 0xBFC18248u: goto label_BFC18248; - default: break; - } - } -label_BFC18000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18000: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80030000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC18004: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030004u); return; } g_debug_last_store_pc = 0x80030004u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18008: 0C016A34 jal 0xB005A8D0 */ - cpu->gpr[31] = 0x80030010u; /* jal link before delay slot */ - psx_delay_BFC18008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1800C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003000Cu); -#endif - if (psx_delay_BFC18008) { - psx_delay_BFC18008 = 0; - cpu->gpr[31] = 0x80030010u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8D0u); - cpu->pc = 0x8005A8D0u; return; - } -label_BFC18010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18010: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18014: AC209E28 sw $zero, -25048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030014u); return; } g_debug_last_store_pc = 0x80030014u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18018: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1801C: AC20AE28 sw $zero, -20952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003001Cu); return; } g_debug_last_store_pc = 0x8003001Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20AE28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18020: 3C048014 lui $a0, 0x8014 */ - cpu->gpr[4] = 0x80140000u; - PGXP_ALU(0x3C048014u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18024: 0C016A38 jal 0xB005A8E0 */ - cpu->gpr[31] = 0x8003002Cu; /* jal link before delay slot */ - psx_delay_BFC18024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC18028: 3C050002 lui $a1, 0x2 */ - cpu->gpr[5] = 0x00020000u; - PGXP_ALU(0x3C050002u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030028u); -#endif - if (psx_delay_BFC18024) { - psx_delay_BFC18024 = 0; - cpu->gpr[31] = 0x8003002Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8E0u); - cpu->pc = 0x8005A8E0u; return; - } -label_BFC1802C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1802Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1802Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1802C: 0C00C1E6 jal 0xB0030798 */ - cpu->gpr[31] = 0x80030034u; /* jal link before delay slot */ - psx_delay_BFC1802C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030030u); -#endif - if (psx_delay_BFC1802C) { - psx_delay_BFC1802C = 0; - cpu->gpr[31] = 0x80030034u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030798u); - cpu->pc = 0x80030798u; return; - } -label_BFC18034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18034: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC18038: AC229DE0 sw $v0, -25120($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030038u); return; } g_debug_last_store_pc = 0x80030038u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229DE0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1803C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18040: 240E0004 addiu $t6, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240E0004u, cpu->gpr[14], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80030040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC18044: AC2E9DE4 sw $t6, -25116($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030044u); return; } g_debug_last_store_pc = 0x80030044u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9DE4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18048: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1804C: AC209DE8 sw $zero, -25112($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003004Cu); return; } g_debug_last_store_pc = 0x8003004Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003004Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18050: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18054: AC209DEC sw $zero, -25108($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030054u); return; } g_debug_last_store_pc = 0x80030054u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DECu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18058: 0C0100FC jal 0xB00403F0 */ - cpu->gpr[31] = 0x80030060u; /* jal link before delay slot */ - psx_delay_BFC18058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1805C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003005Cu); -#endif - if (psx_delay_BFC18058) { - psx_delay_BFC18058 = 0; - cpu->gpr[31] = 0x80030060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800403F0u); - cpu->pc = 0x800403F0u; return; - } -label_BFC18060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18060: 0C013BE4 jal 0xB004EF90 */ - cpu->gpr[31] = 0x80030068u; /* jal link before delay slot */ - psx_delay_BFC18060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18064: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030064u); -#endif - if (psx_delay_BFC18060) { - psx_delay_BFC18060 = 0; - cpu->gpr[31] = 0x80030068u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF90u); - cpu->pc = 0x8004EF90u; return; - } -label_BFC18068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18068: 0C00FF6C jal 0xB003FDB0 */ - cpu->gpr[31] = 0x80030070u; /* jal link before delay slot */ - psx_delay_BFC18068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1806C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003006Cu); -#endif - if (psx_delay_BFC18068) { - psx_delay_BFC18068 = 0; - cpu->gpr[31] = 0x80030070u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FDB0u); - cpu->pc = 0x8003FDB0u; return; - } -label_BFC18070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18070: 0C00FFA2 jal 0xB003FE88 */ - cpu->gpr[31] = 0x80030078u; /* jal link before delay slot */ - psx_delay_BFC18070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030074u); -#endif - if (psx_delay_BFC18070) { - psx_delay_BFC18070 = 0; - cpu->gpr[31] = 0x80030078u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FE88u); - cpu->pc = 0x8003FE88u; return; - } -label_BFC18078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18078: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030078u); -#endif - /* 0xBFC1807C: 8C849DE0 lw $a0, -25120($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003007Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849DE0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003007Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18080: 0C00FE44 jal 0xB003F910 */ - cpu->gpr[31] = 0x80030088u; /* jal link before delay slot */ - psx_delay_BFC18080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030084u); -#endif - if (psx_delay_BFC18080) { - psx_delay_BFC18080 = 0; - cpu->gpr[31] = 0x80030088u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F910u); - cpu->pc = 0x8003F910u; return; - } -label_BFC18088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18088: 0C010124 jal 0xB0040490 */ - cpu->gpr[31] = 0x80030090u; /* jal link before delay slot */ - psx_delay_BFC18088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1808C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003008Cu); -#endif - if (psx_delay_BFC18088) { - psx_delay_BFC18088 = 0; - cpu->gpr[31] = 0x80030090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040490u); - cpu->pc = 0x80040490u; return; - } -label_BFC18090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18090: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x80030098u; /* jal link before delay slot */ - psx_delay_BFC18090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18094: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030094u); -#endif - if (psx_delay_BFC18090) { - psx_delay_BFC18090 = 0; - cpu->gpr[31] = 0x80030098u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC18098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18098: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x800300A0u; /* jal link before delay slot */ - psx_delay_BFC18098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1809C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003009Cu); -#endif - if (psx_delay_BFC18098) { - psx_delay_BFC18098 = 0; - cpu->gpr[31] = 0x800300A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC180A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC180A0: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x800300A8u; /* jal link before delay slot */ - psx_delay_BFC180A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC180A4: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800300A4u); -#endif - if (psx_delay_BFC180A0) { - psx_delay_BFC180A0 = 0; - cpu->gpr[31] = 0x800300A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC180A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC180A8: 0C00D6FD jal 0xB0035BF4 */ - cpu->gpr[31] = 0x800300B0u; /* jal link before delay slot */ - psx_delay_BFC180A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC180AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800300ACu); -#endif - if (psx_delay_BFC180A8) { - psx_delay_BFC180A8 = 0; - cpu->gpr[31] = 0x800300B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BF4u); - cpu->pc = 0x80035BF4u; return; - } -label_BFC180B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC180B0: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x800300B8u; /* jal link before delay slot */ - psx_delay_BFC180B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC180B4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800300B4u); -#endif - if (psx_delay_BFC180B0) { - psx_delay_BFC180B0 = 0; - cpu->gpr[31] = 0x800300B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC180B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC180B8: 0C00D776 jal 0xB0035DD8 */ - cpu->gpr[31] = 0x800300C0u; /* jal link before delay slot */ - psx_delay_BFC180B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC180BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800300BCu); -#endif - if (psx_delay_BFC180B8) { - psx_delay_BFC180B8 = 0; - cpu->gpr[31] = 0x800300C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035DD8u); - cpu->pc = 0x80035DD8u; return; - } -label_BFC180C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC180C0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800300C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC180C8: AC2F9DF4 sw $t7, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300C8u); return; } g_debug_last_store_pc = 0x800300C8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9DF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800300C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180CC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC180D0: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800300D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC180D4: AC389DF8 sw $t8, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300D4u); return; } g_debug_last_store_pc = 0x800300D4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389DF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800300D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC180DC: AC209DFC sw $zero, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300DCu); return; } g_debug_last_store_pc = 0x800300DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800300DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180E0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC180E4: AC209E00 sw $zero, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300E4u); return; } g_debug_last_store_pc = 0x800300E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E00u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800300E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC180EC: AC209E28 sw $zero, -25048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300ECu); return; } g_debug_last_store_pc = 0x800300ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800300ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC180F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800300F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC180F4: 0C00D7D4 jal 0xB0035F50 */ - cpu->gpr[31] = 0x800300FCu; /* jal link before delay slot */ - psx_delay_BFC180F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC180F8: AC209E18 sw $zero, -25064($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25064; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300F8u); return; } g_debug_last_store_pc = 0x800300F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E18u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800300F8u); -#endif - if (psx_delay_BFC180F4) { - psx_delay_BFC180F4 = 0; - cpu->gpr[31] = 0x800300FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035F50u); - cpu->pc = 0x80035F50u; return; - } -label_BFC180FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC180FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC180FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800300FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC180FC: 04410003 bgez $v0, 0xBFC1810C */ - uint32_t psx_brA_BFC180FC = cpu->gpr[2]; - psx_taken_BFC180FC = ((int32_t)psx_brA_BFC180FC >= 0); - psx_delay_BFC180FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18100: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030100u); -#endif - if (psx_delay_BFC180FC) { - psx_delay_BFC180FC = 0; - if (psx_taken_BFC180FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003010Cu); - goto label_BFC1810C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030104u); - } -label_BFC18104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18104: 10000004 beq $zero, $zero, 0xBFC18118 */ - uint32_t psx_brA_BFC18104 = cpu->gpr[0]; uint32_t psx_brB_BFC18104 = cpu->gpr[0]; - psx_taken_BFC18104 = (psx_brA_BFC18104 == psx_brB_BFC18104); - psx_delay_BFC18104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18108: AC209DF0 sw $zero, -25104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030108u); return; } g_debug_last_store_pc = 0x80030108u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030108u); -#endif - if (psx_delay_BFC18104) { - psx_delay_BFC18104 = 0; - if (psx_taken_BFC18104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030118u); - goto label_BFC18118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003010Cu); - } -label_BFC1810C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1810Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003010Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1810C: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003010Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18110: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC18114: AC399DF0 sw $t9, -25104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030114u); return; } g_debug_last_store_pc = 0x80030114u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399DF0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030114u); -#endif -label_BFC18118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18118: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x80030120u; /* jal link before delay slot */ - psx_delay_BFC18118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1811C: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003011Cu); -#endif - if (psx_delay_BFC18118) { - psx_delay_BFC18118 = 0; - cpu->gpr[31] = 0x80030120u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC18120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18120: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030128u; /* jal link before delay slot */ - psx_delay_BFC18120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18124: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030124u); -#endif - if (psx_delay_BFC18120) { - psx_delay_BFC18120 = 0; - cpu->gpr[31] = 0x80030128u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18128: 0440002F bltz $v0, 0xBFC181E8 */ - uint32_t psx_brA_BFC18128 = cpu->gpr[2]; - psx_taken_BFC18128 = ((int32_t)psx_brA_BFC18128 < 0); - psx_delay_BFC18128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1812C: 3C0D0200 lui $t5, 0x200 */ - cpu->gpr[13] = 0x02000000u; - PGXP_ALU(0x3C0D0200u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003012Cu); -#endif - if (psx_delay_BFC18128) { - psx_delay_BFC18128 = 0; - if (psx_taken_BFC18128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E8u); - goto label_BFC181E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030130u); - } -label_BFC18130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18130: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030130u); -#endif - /* 0xBFC18134: 8D089DFC lw $t0, -25092($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030134u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DFCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1813C: 1100002A beq $t0, $zero, 0xBFC181E8 */ - uint32_t psx_brA_BFC1813C = cpu->gpr[8]; uint32_t psx_brB_BFC1813C = cpu->gpr[0]; - psx_taken_BFC1813C = (psx_brA_BFC1813C == psx_brB_BFC1813C); - psx_delay_BFC1813C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18140: 3C0D0200 lui $t5, 0x200 */ - cpu->gpr[13] = 0x02000000u; - PGXP_ALU(0x3C0D0200u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030140u); -#endif - if (psx_delay_BFC1813C) { - psx_delay_BFC1813C = 0; - if (psx_taken_BFC1813C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E8u); - goto label_BFC181E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030144u); - } -label_BFC18144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC18144: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030144u); -#endif - /* 0xBFC18148: 8D299DF0 lw $t1, -25104($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030148u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299DF0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1814C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003014Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18150: 11200003 beq $t1, $zero, 0xBFC18160 */ - uint32_t psx_brA_BFC18150 = cpu->gpr[9]; uint32_t psx_brB_BFC18150 = cpu->gpr[0]; - psx_taken_BFC18150 = (psx_brA_BFC18150 == psx_brB_BFC18150); - psx_delay_BFC18150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030154u); -#endif - if (psx_delay_BFC18150) { - psx_delay_BFC18150 = 0; - if (psx_taken_BFC18150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030160u); - goto label_BFC18160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030158u); - } -label_BFC18158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18158: 0C015BFC jal 0xB0056FF0 */ - cpu->gpr[31] = 0x80030160u; /* jal link before delay slot */ - psx_delay_BFC18158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1815C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003015Cu); -#endif - if (psx_delay_BFC18158) { - psx_delay_BFC18158 = 0; - cpu->gpr[31] = 0x80030160u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FF0u); - cpu->pc = 0x80056FF0u; return; - } -label_BFC18160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18160: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030168u; /* jal link before delay slot */ - psx_delay_BFC18160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18164: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030164u); -#endif - if (psx_delay_BFC18160) { - psx_delay_BFC18160 = 0; - cpu->gpr[31] = 0x80030168u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18168: 0440001F bltz $v0, 0xBFC181E8 */ - uint32_t psx_brA_BFC18168 = cpu->gpr[2]; - psx_taken_BFC18168 = ((int32_t)psx_brA_BFC18168 < 0); - psx_delay_BFC18168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1816C: 3C0D0200 lui $t5, 0x200 */ - cpu->gpr[13] = 0x02000000u; - PGXP_ALU(0x3C0D0200u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003016Cu); -#endif - if (psx_delay_BFC18168) { - psx_delay_BFC18168 = 0; - if (psx_taken_BFC18168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E8u); - goto label_BFC181E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030170u); - } -label_BFC18170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18170: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030170u); -#endif - /* 0xBFC18174: 8D4A9DFC lw $t2, -25092($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030174u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DFCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1817C: 1140001A beq $t2, $zero, 0xBFC181E8 */ - uint32_t psx_brA_BFC1817C = cpu->gpr[10]; uint32_t psx_brB_BFC1817C = cpu->gpr[0]; - psx_taken_BFC1817C = (psx_brA_BFC1817C == psx_brB_BFC1817C); - psx_delay_BFC1817C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18180: 3C0D0200 lui $t5, 0x200 */ - cpu->gpr[13] = 0x02000000u; - PGXP_ALU(0x3C0D0200u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030180u); -#endif - if (psx_delay_BFC1817C) { - psx_delay_BFC1817C = 0; - if (psx_taken_BFC1817C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E8u); - goto label_BFC181E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030184u); - } -label_BFC18184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18184: 0C00FEC9 jal 0xB003FB24 */ - cpu->gpr[31] = 0x8003018Cu; /* jal link before delay slot */ - psx_delay_BFC18184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18188: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030188u); -#endif - if (psx_delay_BFC18184) { - psx_delay_BFC18184 = 0; - cpu->gpr[31] = 0x8003018Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FB24u); - cpu->pc = 0x8003FB24u; return; - } -label_BFC1818C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1818Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1818Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003018Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1818C: 0C00C1A1 jal 0xB0030684 */ - cpu->gpr[31] = 0x80030194u; /* jal link before delay slot */ - psx_delay_BFC1818C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18190: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030190u); -#endif - if (psx_delay_BFC1818C) { - psx_delay_BFC1818C = 0; - cpu->gpr[31] = 0x80030194u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030684u); - cpu->pc = 0x80030684u; return; - } -label_BFC18194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18194: 0441000B bgez $v0, 0xBFC181C4 */ - uint32_t psx_brA_BFC18194 = cpu->gpr[2]; - psx_taken_BFC18194 = ((int32_t)psx_brA_BFC18194 >= 0); - psx_delay_BFC18194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18198: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030198u); -#endif - if (psx_delay_BFC18194) { - psx_delay_BFC18194 = 0; - if (psx_taken_BFC18194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301C4u); - goto label_BFC181C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003019Cu); - } -label_BFC1819C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1819Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003019Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1819C: AC209DFC sw $zero, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003019Cu); return; } g_debug_last_store_pc = 0x8003019Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003019Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC181A0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC181A4: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800301A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC181A8: AC2B9DF8 sw $t3, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301A8u); return; } g_debug_last_store_pc = 0x800301A8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9DF8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800301A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC181AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC181B0: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800301B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC181B4: AC2C9DF4 sw $t4, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301B4u); return; } g_debug_last_store_pc = 0x800301B4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9DF4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800301B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC181B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC181BC: 10000009 beq $zero, $zero, 0xBFC181E4 */ - uint32_t psx_brA_BFC181BC = cpu->gpr[0]; uint32_t psx_brB_BFC181BC = cpu->gpr[0]; - psx_taken_BFC181BC = (psx_brA_BFC181BC == psx_brB_BFC181BC); - psx_delay_BFC181BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC181C0: AC209E00 sw $zero, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301C0u); return; } g_debug_last_store_pc = 0x800301C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E00u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800301C0u); -#endif - if (psx_delay_BFC181BC) { - psx_delay_BFC181BC = 0; - if (psx_taken_BFC181BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E4u); - goto label_BFC181E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301C4u); - } -label_BFC181C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC181C4: 0C00D831 jal 0xB00360C4 */ - cpu->gpr[31] = 0x800301CCu; /* jal link before delay slot */ - psx_delay_BFC181C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC181C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800301C8u); -#endif - if (psx_delay_BFC181C4) { - psx_delay_BFC181C4 = 0; - cpu->gpr[31] = 0x800301CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360C4u); - cpu->pc = 0x800360C4u; return; - } -label_BFC181CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC181CC: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x800301D4u; /* jal link before delay slot */ - psx_delay_BFC181CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC181D0: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800301D0u); -#endif - if (psx_delay_BFC181CC) { - psx_delay_BFC181CC = 0; - cpu->gpr[31] = 0x800301D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC181D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC181D4: 0C00F556 jal 0xB003D558 */ - cpu->gpr[31] = 0x800301DCu; /* jal link before delay slot */ - psx_delay_BFC181D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC181D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800301D8u); -#endif - if (psx_delay_BFC181D4) { - psx_delay_BFC181D4 = 0; - cpu->gpr[31] = 0x800301DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D558u); - cpu->pc = 0x8003D558u; return; - } -label_BFC181DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC181DC: 1000001A beq $zero, $zero, 0xBFC18248 */ - uint32_t psx_brA_BFC181DC = cpu->gpr[0]; uint32_t psx_brB_BFC181DC = cpu->gpr[0]; - psx_taken_BFC181DC = (psx_brA_BFC181DC == psx_brB_BFC181DC); - psx_delay_BFC181DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301E0u); -#endif - /* 0xBFC181E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800301E0u); -#endif - if (psx_delay_BFC181DC) { - psx_delay_BFC181DC = 0; - if (psx_taken_BFC181DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030248u); - goto label_BFC18248; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800301E4u); - } -label_BFC181E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC181E4: 3C0D0200 lui $t5, 0x200 */ - cpu->gpr[13] = 0x02000000u; - PGXP_ALU(0x3C0D0200u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301E4u); -#endif -label_BFC181E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC181E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC181E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC181E8: 35AD0200 ori $t5, $t5, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] | 0x200u; - PGXP_ALU(0x35AD0200u, cpu->gpr[13], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x800301E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC181EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800301F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC181F0: AC2D9E1C sw $t5, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301F0u); return; } g_debug_last_store_pc = 0x800301F0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E1Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800301F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC181F4: 3C0E0400 lui $t6, 0x400 */ - cpu->gpr[14] = 0x04000000u; - PGXP_ALU(0x3C0E0400u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC181F8: 35CE0400 ori $t6, $t6, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x400u; - PGXP_ALU(0x35CE0400u, cpu->gpr[14], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x800301F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC181FC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800301FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18200: 0C00F7A3 jal 0xB003DE8C */ - cpu->gpr[31] = 0x80030208u; /* jal link before delay slot */ - psx_delay_BFC18200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC18204: AC2EAE20 sw $t6, -20960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030204u); return; } g_debug_last_store_pc = 0x80030204u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EAE20u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030204u); -#endif - if (psx_delay_BFC18200) { - psx_delay_BFC18200 = 0; - cpu->gpr[31] = 0x80030208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE8Cu); - cpu->pc = 0x8003DE8Cu; return; - } -label_BFC18208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18208: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1820C: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003020Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18210: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80030210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18214: 0C01678C jal 0xB0059E30 */ - cpu->gpr[31] = 0x8003021Cu; /* jal link before delay slot */ - psx_delay_BFC18214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18218: 24061000 addiu $a2, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24061000u, cpu->gpr[6], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80030218u); -#endif - if (psx_delay_BFC18214) { - psx_delay_BFC18214 = 0; - cpu->gpr[31] = 0x8003021Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E30u); - cpu->pc = 0x80059E30u; return; - } -label_BFC1821C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1821Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1821Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1821C: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18220: 0C0167C4 jal 0xB0059F10 */ - cpu->gpr[31] = 0x80030228u; /* jal link before delay slot */ - psx_delay_BFC18220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18224: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80030224u); -#endif - if (psx_delay_BFC18220) { - psx_delay_BFC18220 = 0; - cpu->gpr[31] = 0x80030228u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F10u); - cpu->pc = 0x80059F10u; return; - } -label_BFC18228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18228: 0C012DBC jal 0xB004B6F0 */ - cpu->gpr[31] = 0x80030230u; /* jal link before delay slot */ - psx_delay_BFC18228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1822C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003022Cu); -#endif - if (psx_delay_BFC18228) { - psx_delay_BFC18228 = 0; - cpu->gpr[31] = 0x80030230u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6F0u); - cpu->pc = 0x8004B6F0u; return; - } -label_BFC18230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18230: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18234: AC209E10 sw $zero, -25072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030234u); return; } g_debug_last_store_pc = 0x80030234u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E10u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18238: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1823C: 0C00C095 jal 0xB0030254 */ - cpu->gpr[31] = 0x80030244u; /* jal link before delay slot */ - psx_delay_BFC1823C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18240: AC209E14 sw $zero, -25068($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25068; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030240u); return; } g_debug_last_store_pc = 0x80030240u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E14u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030240u); -#endif - if (psx_delay_BFC1823C) { - psx_delay_BFC1823C = 0; - cpu->gpr[31] = 0x80030244u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030254u); - cpu->pc = 0x80030254u; return; - } -label_BFC18244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030244u); -#endif - /* 0xBFC18244: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030244u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030244u); -#endif -label_BFC18248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18248: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80030248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1824C: 03E00008 jr $ra */ - psx_delay_BFC1824C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030250u); -#endif - if (psx_delay_BFC1824C) { - psx_delay_BFC1824C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18254(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18254u); - int psx_delay_BFC18264 = 0; - int psx_delay_BFC18274 = 0; - int psx_delay_BFC1827C = 0; - int psx_taken_BFC1827C = 0; - int psx_delay_BFC18284 = 0; - int psx_delay_BFC18290 = 0; - int psx_taken_BFC18290 = 0; - int psx_delay_BFC182A0 = 0; - int psx_delay_BFC182A8 = 0; - int psx_delay_BFC182B8 = 0; - int psx_delay_BFC182CC = 0; - int psx_taken_BFC182CC = 0; - int psx_delay_BFC182E0 = 0; - int psx_taken_BFC182E0 = 0; - int psx_delay_BFC182F4 = 0; - int psx_taken_BFC182F4 = 0; - int psx_delay_BFC18314 = 0; - int psx_taken_BFC18314 = 0; - int psx_delay_BFC18328 = 0; - int psx_taken_BFC18328 = 0; - int psx_delay_BFC1833C = 0; - int psx_taken_BFC1833C = 0; - int psx_delay_BFC18358 = 0; - int psx_taken_BFC18358 = 0; - int psx_delay_BFC1836C = 0; - int psx_taken_BFC1836C = 0; - int psx_delay_BFC18374 = 0; - int psx_delay_BFC1837C = 0; - int psx_taken_BFC1837C = 0; - int psx_delay_BFC18398 = 0; - int psx_taken_BFC18398 = 0; - int psx_delay_BFC183B4 = 0; - int psx_taken_BFC183B4 = 0; - int psx_delay_BFC183D4 = 0; - int psx_delay_BFC183DC = 0; - int psx_delay_BFC183E4 = 0; - int psx_delay_BFC183EC = 0; - int psx_delay_BFC183F4 = 0; - int psx_delay_BFC183FC = 0; - int psx_taken_BFC183FC = 0; - int psx_delay_BFC18410 = 0; - int psx_taken_BFC18410 = 0; - int psx_delay_BFC1844C = 0; - int psx_taken_BFC1844C = 0; - int psx_delay_BFC18454 = 0; - int psx_delay_BFC1845C = 0; - int psx_taken_BFC1845C = 0; - int psx_delay_BFC1846C = 0; - int psx_delay_BFC1847C = 0; - int psx_delay_BFC1848C = 0; - int psx_delay_BFC1849C = 0; - int psx_delay_BFC184AC = 0; - int psx_delay_BFC184C0 = 0; - int psx_delay_BFC184C8 = 0; - int psx_taken_BFC184C8 = 0; - int psx_delay_BFC184DC = 0; - int psx_taken_BFC184DC = 0; - int psx_delay_BFC184E4 = 0; - int psx_delay_BFC184EC = 0; - int psx_taken_BFC184EC = 0; - int psx_delay_BFC184F4 = 0; - int psx_delay_BFC18504 = 0; - int psx_taken_BFC18504 = 0; - int psx_delay_BFC18514 = 0; - int psx_delay_BFC18524 = 0; - int psx_delay_BFC1852C = 0; - int psx_delay_BFC18540 = 0; - int psx_taken_BFC18540 = 0; - int psx_delay_BFC18558 = 0; - int psx_delay_BFC18560 = 0; - int psx_delay_BFC18570 = 0; - int psx_delay_BFC18584 = 0; - int psx_taken_BFC18584 = 0; - int psx_delay_BFC185C0 = 0; - int psx_taken_BFC185C0 = 0; - int psx_delay_BFC185EC = 0; - int psx_delay_BFC18610 = 0; - int psx_taken_BFC18610 = 0; - int psx_delay_BFC18620 = 0; - int psx_delay_BFC18630 = 0; - int psx_delay_BFC18638 = 0; - int psx_delay_BFC18640 = 0; - int psx_taken_BFC18640 = 0; - int psx_delay_BFC18654 = 0; - int psx_taken_BFC18654 = 0; - int psx_delay_BFC1867C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1826Cu: goto label_BFC1826C; - case 0xBFC1827Cu: goto label_BFC1827C; - case 0xBFC18284u: goto label_BFC18284; - case 0xBFC1828Cu: goto label_BFC1828C; - case 0xBFC18298u: goto label_BFC18298; - case 0xBFC182A8u: goto label_BFC182A8; - case 0xBFC182B0u: goto label_BFC182B0; - case 0xBFC182C0u: goto label_BFC182C0; - case 0xBFC182D4u: goto label_BFC182D4; - case 0xBFC182E8u: goto label_BFC182E8; - case 0xBFC182FCu: goto label_BFC182FC; - case 0xBFC18300u: goto label_BFC18300; - case 0xBFC1831Cu: goto label_BFC1831C; - case 0xBFC18330u: goto label_BFC18330; - case 0xBFC18344u: goto label_BFC18344; - case 0xBFC18360u: goto label_BFC18360; - case 0xBFC18374u: goto label_BFC18374; - case 0xBFC1837Cu: goto label_BFC1837C; - case 0xBFC18384u: goto label_BFC18384; - case 0xBFC183A0u: goto label_BFC183A0; - case 0xBFC183BCu: goto label_BFC183BC; - case 0xBFC183D4u: goto label_BFC183D4; - case 0xBFC183DCu: goto label_BFC183DC; - case 0xBFC183E4u: goto label_BFC183E4; - case 0xBFC183ECu: goto label_BFC183EC; - case 0xBFC183F4u: goto label_BFC183F4; - case 0xBFC183FCu: goto label_BFC183FC; - case 0xBFC18404u: goto label_BFC18404; - case 0xBFC18418u: goto label_BFC18418; - case 0xBFC18440u: goto label_BFC18440; - case 0xBFC18454u: goto label_BFC18454; - case 0xBFC1845Cu: goto label_BFC1845C; - case 0xBFC18464u: goto label_BFC18464; - case 0xBFC18474u: goto label_BFC18474; - case 0xBFC18484u: goto label_BFC18484; - case 0xBFC18494u: goto label_BFC18494; - case 0xBFC184A4u: goto label_BFC184A4; - case 0xBFC184B4u: goto label_BFC184B4; - case 0xBFC184C8u: goto label_BFC184C8; - case 0xBFC184D0u: goto label_BFC184D0; - case 0xBFC184E4u: goto label_BFC184E4; - case 0xBFC184ECu: goto label_BFC184EC; - case 0xBFC184F4u: goto label_BFC184F4; - case 0xBFC184FCu: goto label_BFC184FC; - case 0xBFC1850Cu: goto label_BFC1850C; - case 0xBFC1851Cu: goto label_BFC1851C; - case 0xBFC1852Cu: goto label_BFC1852C; - case 0xBFC18534u: goto label_BFC18534; - case 0xBFC18548u: goto label_BFC18548; - case 0xBFC18560u: goto label_BFC18560; - case 0xBFC18568u: goto label_BFC18568; - case 0xBFC18578u: goto label_BFC18578; - case 0xBFC1858Cu: goto label_BFC1858C; - case 0xBFC1859Cu: goto label_BFC1859C; - case 0xBFC185C8u: goto label_BFC185C8; - case 0xBFC185F4u: goto label_BFC185F4; - case 0xBFC18600u: goto label_BFC18600; - case 0xBFC18618u: goto label_BFC18618; - case 0xBFC18628u: goto label_BFC18628; - case 0xBFC18638u: goto label_BFC18638; - case 0xBFC18640u: goto label_BFC18640; - case 0xBFC18648u: goto label_BFC18648; - case 0xBFC1865Cu: goto label_BFC1865C; - case 0xBFC18670u: goto label_BFC18670; - default: break; - } - } -label_BFC18254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18254: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x80030254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC18258: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030258u); return; } g_debug_last_store_pc = 0x80030258u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC1825C: AFB50020 sw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003025Cu); return; } g_debug_last_store_pc = 0x8003025Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003025Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC18260: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030260u); return; } g_debug_last_store_pc = 0x80030260u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80030260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18264: 0C010FC7 jal 0xB0043F1C */ - cpu->gpr[31] = 0x8003026Cu; /* jal link before delay slot */ - psx_delay_BFC18264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC18268: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030268u); return; } g_debug_last_store_pc = 0x80030268u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80030268u); -#endif - if (psx_delay_BFC18264) { - psx_delay_BFC18264 = 0; - cpu->gpr[31] = 0x8003026Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F1Cu); - cpu->pc = 0x80043F1Cu; return; - } -label_BFC1826C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1826Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1826Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003026Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1826C: 3C11F200 lui $s1, 0xF200 */ - cpu->gpr[17] = 0xF2000000u; - PGXP_ALU(0x3C11F200u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003026Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC18270: 36310002 ori $s1, $s1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x2u; - PGXP_ALU(0x36310002u, cpu->gpr[17], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80030270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18274: 0C0167B6 jal 0xB0059ED8 */ - cpu->gpr[31] = 0x8003027Cu; /* jal link before delay slot */ - psx_delay_BFC18274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC18278: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030278u); -#endif - if (psx_delay_BFC18274) { - psx_delay_BFC18274 = 0; - cpu->gpr[31] = 0x8003027Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059ED8u); - cpu->pc = 0x80059ED8u; return; - } -label_BFC1827C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1827Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003027Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1827C: 10400006 beq $v0, $zero, 0xBFC18298 */ - uint32_t psx_brA_BFC1827C = cpu->gpr[2]; uint32_t psx_brB_BFC1827C = cpu->gpr[0]; - psx_taken_BFC1827C = (psx_brA_BFC1827C == psx_brB_BFC1827C); - psx_delay_BFC1827C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18280: 2450FFFF addiu $s0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2450FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030280u); -#endif - if (psx_delay_BFC1827C) { - psx_delay_BFC1827C = 0; - if (psx_taken_BFC1827C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030298u); - goto label_BFC18298; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030284u); - } -label_BFC18284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18284: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8003028Cu; /* jal link before delay slot */ - psx_delay_BFC18284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030288u); -#endif - if (psx_delay_BFC18284) { - psx_delay_BFC18284 = 0; - cpu->gpr[31] = 0x8003028Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC1828C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1828Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1828Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1828C: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18290: 1440FFFC bne $v0, $zero, 0xBFC18284 */ - uint32_t psx_brA_BFC18290 = cpu->gpr[2]; uint32_t psx_brB_BFC18290 = cpu->gpr[0]; - psx_taken_BFC18290 = (psx_brA_BFC18290 != psx_brB_BFC18290); - psx_delay_BFC18290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC18294: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030294u); -#endif - if (psx_delay_BFC18290) { - psx_delay_BFC18290 = 0; - if (psx_taken_BFC18290) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030284u); - goto label_BFC18284; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030298u); - } -label_BFC18298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC18298: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1829C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003029Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC182A0: 0C01678C jal 0xB0059E30 */ - cpu->gpr[31] = 0x800302A8u; /* jal link before delay slot */ - psx_delay_BFC182A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC182A4: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x800302A4u); -#endif - if (psx_delay_BFC182A0) { - psx_delay_BFC182A0 = 0; - cpu->gpr[31] = 0x800302A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E30u); - cpu->pc = 0x80059E30u; return; - } -label_BFC182A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC182A8: 0C0167D5 jal 0xB0059F54 */ - cpu->gpr[31] = 0x800302B0u; /* jal link before delay slot */ - psx_delay_BFC182A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC182AC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800302ACu); -#endif - if (psx_delay_BFC182A8) { - psx_delay_BFC182A8 = 0; - cpu->gpr[31] = 0x800302B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F54u); - cpu->pc = 0x80059F54u; return; - } -label_BFC182B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC182B0: 3C15800F lui $s5, 0x800F */ - cpu->gpr[21] = 0x800F0000u; - PGXP_ALU(0x3C15800Fu, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800302B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC182B4: 26B5A868 addiu $s5, $s5, -22424 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-22424)); - PGXP_ALU(0x26B5A868u, cpu->gpr[21], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x800302B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC182B8: 0C00C344 jal 0xB0030D10 */ - cpu->gpr[31] = 0x800302C0u; /* jal link before delay slot */ - psx_delay_BFC182B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC182BC: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800302BCu); -#endif - if (psx_delay_BFC182B8) { - psx_delay_BFC182B8 = 0; - cpu->gpr[31] = 0x800302C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D10u); - cpu->pc = 0x80030D10u; return; - } -label_BFC182C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC182C0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800302C0u); -#endif - /* 0xBFC182C4: 8DCE9DF4 lw $t6, -25100($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DF4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800302C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC182C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800302C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC182CC: 15C00006 bne $t6, $zero, 0xBFC182E8 */ - uint32_t psx_brA_BFC182CC = cpu->gpr[14]; uint32_t psx_brB_BFC182CC = cpu->gpr[0]; - psx_taken_BFC182CC = (psx_brA_BFC182CC != psx_brB_BFC182CC); - psx_delay_BFC182CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC182D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800302D0u); -#endif - if (psx_delay_BFC182CC) { - psx_delay_BFC182CC = 0; - if (psx_taken_BFC182CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800302E8u); - goto label_BFC182E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800302D4u); - } -label_BFC182D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC182D4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800302D4u); -#endif - /* 0xBFC182D8: 8DEF9DF8 lw $t7, -25096($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302D8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800302D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC182DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800302DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC182E0: 11E0000E beq $t7, $zero, 0xBFC1831C */ - uint32_t psx_brA_BFC182E0 = cpu->gpr[15]; uint32_t psx_brB_BFC182E0 = cpu->gpr[0]; - psx_taken_BFC182E0 = (psx_brA_BFC182E0 == psx_brB_BFC182E0); - psx_delay_BFC182E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC182E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800302E4u); -#endif - if (psx_delay_BFC182E0) { - psx_delay_BFC182E0 = 0; - if (psx_taken_BFC182E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003031Cu); - goto label_BFC1831C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800302E8u); - } -label_BFC182E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC182E8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800302E8u); -#endif - /* 0xBFC182EC: 8F189DF8 lw $t8, -25096($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302ECu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800302ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC182F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800302F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC182F4: 13000002 beq $t8, $zero, 0xBFC18300 */ - uint32_t psx_brA_BFC182F4 = cpu->gpr[24]; uint32_t psx_brB_BFC182F4 = cpu->gpr[0]; - psx_taken_BFC182F4 = (psx_brA_BFC182F4 == psx_brB_BFC182F4); - psx_delay_BFC182F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC182F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800302F8u); -#endif - if (psx_delay_BFC182F4) { - psx_delay_BFC182F4 = 0; - if (psx_taken_BFC182F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030300u); - goto label_BFC18300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800302FCu); - } -label_BFC182FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC182FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC182FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800302FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC182FC: AC209E04 sw $zero, -25084($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25084; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302FCu); return; } g_debug_last_store_pc = 0x800302FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E04u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800302FCu); -#endif -label_BFC18300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18300: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18304: AC20FF70 sw $zero, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030304u); return; } g_debug_last_store_pc = 0x80030304u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18308: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1830C: AC206F74 sw $zero, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003030Cu); return; } g_debug_last_store_pc = 0x8003030Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18310: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18314: 1000002F beq $zero, $zero, 0xBFC183D4 */ - uint32_t psx_brA_BFC18314 = cpu->gpr[0]; uint32_t psx_brB_BFC18314 = cpu->gpr[0]; - psx_taken_BFC18314 = (psx_brA_BFC18314 == psx_brB_BFC18314); - psx_delay_BFC18314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18318: AC20A780 sw $zero, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030318u); return; } g_debug_last_store_pc = 0x80030318u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030318u); -#endif - if (psx_delay_BFC18314) { - psx_delay_BFC18314 = 0; - if (psx_taken_BFC18314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303D4u); - goto label_BFC183D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003031Cu); - } -label_BFC1831C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1831Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1831Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003031Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1831C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003031Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030320u); -#endif - /* 0xBFC18320: 8F399DFC lw $t9, -25092($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030320u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18324: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC18328: 1720000D bne $t9, $zero, 0xBFC18360 */ - uint32_t psx_brA_BFC18328 = cpu->gpr[25]; uint32_t psx_brB_BFC18328 = cpu->gpr[0]; - psx_taken_BFC18328 = (psx_brA_BFC18328 != psx_brB_BFC18328); - psx_delay_BFC18328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1832C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003032Cu); -#endif - if (psx_delay_BFC18328) { - psx_delay_BFC18328 = 0; - if (psx_taken_BFC18328) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030360u); - goto label_BFC18360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030330u); - } -label_BFC18330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18330: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030330u); -#endif - /* 0xBFC18334: 8D089E00 lw $t0, -25088($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030334u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E00u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18338: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1833C: 15000008 bne $t0, $zero, 0xBFC18360 */ - uint32_t psx_brA_BFC1833C = cpu->gpr[8]; uint32_t psx_brB_BFC1833C = cpu->gpr[0]; - psx_taken_BFC1833C = (psx_brA_BFC1833C != psx_brB_BFC1833C); - psx_delay_BFC1833C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18340: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030340u); -#endif - if (psx_delay_BFC1833C) { - psx_delay_BFC1833C = 0; - if (psx_taken_BFC1833C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030360u); - goto label_BFC18360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030344u); - } -label_BFC18344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18344: AC20FF70 sw $zero, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030344u); return; } g_debug_last_store_pc = 0x80030344u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18348: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1834C: AC206F74 sw $zero, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003034Cu); return; } g_debug_last_store_pc = 0x8003034Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003034Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18350: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18354: 24090004 addiu $t1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24090004u, cpu->gpr[9], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80030354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18358: 1000001E beq $zero, $zero, 0xBFC183D4 */ - uint32_t psx_brA_BFC18358 = cpu->gpr[0]; uint32_t psx_brB_BFC18358 = cpu->gpr[0]; - psx_taken_BFC18358 = (psx_brA_BFC18358 == psx_brB_BFC18358); - psx_delay_BFC18358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1835C: AC29A780 sw $t1, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003035Cu); return; } g_debug_last_store_pc = 0x8003035Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29A780u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003035Cu); -#endif - if (psx_delay_BFC18358) { - psx_delay_BFC18358 = 0; - if (psx_taken_BFC18358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303D4u); - goto label_BFC183D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030360u); - } -label_BFC18360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18360: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030360u); -#endif - /* 0xBFC18364: 8D4A9E00 lw $t2, -25088($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030364u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E00u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1836C: 11400013 beq $t2, $zero, 0xBFC183BC */ - uint32_t psx_brA_BFC1836C = cpu->gpr[10]; uint32_t psx_brB_BFC1836C = cpu->gpr[0]; - psx_taken_BFC1836C = (psx_brA_BFC1836C == psx_brB_BFC1836C); - psx_delay_BFC1836C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18370: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030370u); -#endif - if (psx_delay_BFC1836C) { - psx_delay_BFC1836C = 0; - if (psx_taken_BFC1836C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303BCu); - goto label_BFC183BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030374u); - } -label_BFC18374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18374: 0C00DDDE jal 0xB0037778 */ - cpu->gpr[31] = 0x8003037Cu; /* jal link before delay slot */ - psx_delay_BFC18374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030378u); -#endif - if (psx_delay_BFC18374) { - psx_delay_BFC18374 = 0; - cpu->gpr[31] = 0x8003037Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037778u); - cpu->pc = 0x80037778u; return; - } -label_BFC1837C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1837Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003037Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1837C: 10400008 beq $v0, $zero, 0xBFC183A0 */ - uint32_t psx_brA_BFC1837C = cpu->gpr[2]; uint32_t psx_brB_BFC1837C = cpu->gpr[0]; - psx_taken_BFC1837C = (psx_brA_BFC1837C == psx_brB_BFC1837C); - psx_delay_BFC1837C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18380: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030380u); -#endif - if (psx_delay_BFC1837C) { - psx_delay_BFC1837C = 0; - if (psx_taken_BFC1837C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303A0u); - goto label_BFC183A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030384u); - } -label_BFC18384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18384: AC20FF70 sw $zero, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030384u); return; } g_debug_last_store_pc = 0x80030384u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18388: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1838C: AC206F74 sw $zero, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003038Cu); return; } g_debug_last_store_pc = 0x8003038Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003038Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18390: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18394: 240B0003 addiu $t3, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240B0003u, cpu->gpr[11], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18398: 1000000E beq $zero, $zero, 0xBFC183D4 */ - uint32_t psx_brA_BFC18398 = cpu->gpr[0]; uint32_t psx_brB_BFC18398 = cpu->gpr[0]; - psx_taken_BFC18398 = (psx_brA_BFC18398 == psx_brB_BFC18398); - psx_delay_BFC18398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1839C: AC2BA780 sw $t3, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003039Cu); return; } g_debug_last_store_pc = 0x8003039Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BA780u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003039Cu); -#endif - if (psx_delay_BFC18398) { - psx_delay_BFC18398 = 0; - if (psx_taken_BFC18398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303D4u); - goto label_BFC183D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303A0u); - } -label_BFC183A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183A4: AC20FF70 sw $zero, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303A4u); return; } g_debug_last_store_pc = 0x800303A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183A8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183AC: AC206F74 sw $zero, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303ACu); return; } g_debug_last_store_pc = 0x800303ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183B0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC183B4: 10000007 beq $zero, $zero, 0xBFC183D4 */ - uint32_t psx_brA_BFC183B4 = cpu->gpr[0]; uint32_t psx_brB_BFC183B4 = cpu->gpr[0]; - psx_taken_BFC183B4 = (psx_brA_BFC183B4 == psx_brB_BFC183B4); - psx_delay_BFC183B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183B8: AC20A780 sw $zero, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303B8u); return; } g_debug_last_store_pc = 0x800303B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303B8u); -#endif - if (psx_delay_BFC183B4) { - psx_delay_BFC183B4 = 0; - if (psx_taken_BFC183B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303D4u); - goto label_BFC183D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800303BCu); - } -label_BFC183BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183BC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183C0: AC20FF70 sw $zero, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303C0u); return; } g_debug_last_store_pc = 0x800303C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183C8: AC206F74 sw $zero, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303C8u); return; } g_debug_last_store_pc = 0x800303C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC183CC: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800303CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC183D0: AC20A780 sw $zero, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800303D0u); return; } g_debug_last_store_pc = 0x800303D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800303D0u); -#endif -label_BFC183D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC183D4: 0C00FEC9 jal 0xB003FB24 */ - cpu->gpr[31] = 0x800303DCu; /* jal link before delay slot */ - psx_delay_BFC183D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC183D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800303D8u); -#endif - if (psx_delay_BFC183D4) { - psx_delay_BFC183D4 = 0; - cpu->gpr[31] = 0x800303DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FB24u); - cpu->pc = 0x8003FB24u; return; - } -label_BFC183DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC183DC: 0C00FF9A jal 0xB003FE68 */ - cpu->gpr[31] = 0x800303E4u; /* jal link before delay slot */ - psx_delay_BFC183DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC183E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800303E0u); -#endif - if (psx_delay_BFC183DC) { - psx_delay_BFC183DC = 0; - cpu->gpr[31] = 0x800303E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FE68u); - cpu->pc = 0x8003FE68u; return; - } -label_BFC183E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC183E4: 0C013C0A jal 0xB004F028 */ - cpu->gpr[31] = 0x800303ECu; /* jal link before delay slot */ - psx_delay_BFC183E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC183E8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800303E8u); -#endif - if (psx_delay_BFC183E4) { - psx_delay_BFC183E4 = 0; - cpu->gpr[31] = 0x800303ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F028u); - cpu->pc = 0x8004F028u; return; - } -label_BFC183EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC183EC: 0C00F52C jal 0xB003D4B0 */ - cpu->gpr[31] = 0x800303F4u; /* jal link before delay slot */ - psx_delay_BFC183EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC183F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800303F0u); -#endif - if (psx_delay_BFC183EC) { - psx_delay_BFC183EC = 0; - cpu->gpr[31] = 0x800303F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D4B0u); - cpu->pc = 0x8003D4B0u; return; - } -label_BFC183F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC183F4: 0C00C23C jal 0xB00308F0 */ - cpu->gpr[31] = 0x800303FCu; /* jal link before delay slot */ - psx_delay_BFC183F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC183F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800303F8u); -#endif - if (psx_delay_BFC183F4) { - psx_delay_BFC183F4 = 0; - cpu->gpr[31] = 0x800303FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308F0u); - cpu->pc = 0x800308F0u; return; - } -label_BFC183FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC183FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC183FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800303FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC183FC: 1440009C bne $v0, $zero, 0xBFC18670 */ - uint32_t psx_brA_BFC183FC = cpu->gpr[2]; uint32_t psx_brB_BFC183FC = cpu->gpr[0]; - psx_taken_BFC183FC = (psx_brA_BFC183FC != psx_brB_BFC183FC); - psx_delay_BFC183FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030400u); -#endif - /* 0xBFC18400: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030400u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030400u); -#endif - if (psx_delay_BFC183FC) { - psx_delay_BFC183FC = 0; - if (psx_taken_BFC183FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030670u); - goto label_BFC18670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030404u); - } -label_BFC18404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC18404: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030404u); -#endif - /* 0xBFC18408: 8D8C9E28 lw $t4, -25048($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030408u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E28u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1840C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18410: 15800097 bne $t4, $zero, 0xBFC18670 */ - uint32_t psx_brA_BFC18410 = cpu->gpr[12]; uint32_t psx_brB_BFC18410 = cpu->gpr[0]; - psx_taken_BFC18410 = (psx_brA_BFC18410 != psx_brB_BFC18410); - psx_delay_BFC18410 = 1; - /* 0xBFC18414: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030414u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030414u); -#endif - if (psx_delay_BFC18410) { - psx_delay_BFC18410 = 0; - if (psx_taken_BFC18410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030670u); - goto label_BFC18670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030418u); - } -label_BFC18418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC18418: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030418u); return; } g_debug_last_store_pc = 0x80030418u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80030418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC1841C: AFB30030 sw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003041Cu); return; } g_debug_last_store_pc = 0x8003041Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003041Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC18420: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030420u); return; } g_debug_last_store_pc = 0x80030420u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80030420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC18424: 3C148006 lui $s4, 0x8006 */ - cpu->gpr[20] = 0x80060000u; - PGXP_ALU(0x3C148006u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC18428: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1842C: 3C12800E lui $s2, 0x800E */ - cpu->gpr[18] = 0x800E0000u; - PGXP_ALU(0x3C12800Eu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003042Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC18430: 2652FF70 addiu $s2, $s2, -144 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-144)); - PGXP_ALU(0x2652FF70u, cpu->gpr[18], _pgx1, 0xFFFFFF70u); } -#ifdef PSX_COSIM - cosim_instr(0x80030430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC18434: 2673FF74 addiu $s3, $s3, -140 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-140)); - PGXP_ALU(0x2673FF74u, cpu->gpr[19], _pgx1, 0xFFFFFF74u); } -#ifdef PSX_COSIM - cosim_instr(0x80030434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC18438: 2694AE2C addiu $s4, $s4, -20948 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-20948)); - PGXP_ALU(0x2694AE2Cu, cpu->gpr[20], _pgx1, 0xFFFFAE2Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1843C: 241103FE addiu $s1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x241103FEu, cpu->gpr[17], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003043Cu); -#endif -label_BFC18440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18440: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030440u); -#endif - /* 0xBFC18444: 8DADA780 lw $t5, -22656($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -22656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030444u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADA780u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18448: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1844C: 05A00020 bltz $t5, 0xBFC184D0 */ - uint32_t psx_brA_BFC1844C = cpu->gpr[13]; - psx_taken_BFC1844C = ((int32_t)psx_brA_BFC1844C < 0); - psx_delay_BFC1844C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030450u); -#endif - if (psx_delay_BFC1844C) { - psx_delay_BFC1844C = 0; - if (psx_taken_BFC1844C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800304D0u); - goto label_BFC184D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030454u); - } -label_BFC18454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18454: 0C00F998 jal 0xB003E660 */ - cpu->gpr[31] = 0x8003045Cu; /* jal link before delay slot */ - psx_delay_BFC18454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030458u); -#endif - if (psx_delay_BFC18454) { - psx_delay_BFC18454 = 0; - cpu->gpr[31] = 0x8003045Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E660u); - cpu->pc = 0x8003E660u; return; - } -label_BFC1845C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1845Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1845C: 1440001C bne $v0, $zero, 0xBFC184D0 */ - uint32_t psx_brA_BFC1845C = cpu->gpr[2]; uint32_t psx_brB_BFC1845C = cpu->gpr[0]; - psx_taken_BFC1845C = (psx_brA_BFC1845C != psx_brB_BFC1845C); - psx_delay_BFC1845C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18460: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030460u); -#endif - if (psx_delay_BFC1845C) { - psx_delay_BFC1845C = 0; - if (psx_taken_BFC1845C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800304D0u); - goto label_BFC184D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030464u); - } -label_BFC18464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC18464: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC18468: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1846C: 0C00C4F0 jal 0xB00313C0 */ - cpu->gpr[31] = 0x80030474u; /* jal link before delay slot */ - psx_delay_BFC1846C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18470: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030470u); -#endif - if (psx_delay_BFC1846C) { - psx_delay_BFC1846C = 0; - cpu->gpr[31] = 0x80030474u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313C0u); - cpu->pc = 0x800313C0u; return; - } -label_BFC18474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18474: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030474u); -#endif - /* 0xBFC18478: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030478u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1847C: 0C00C54B jal 0xB003152C */ - cpu->gpr[31] = 0x80030484u; /* jal link before delay slot */ - psx_delay_BFC1847C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18480: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030480u); -#endif - if (psx_delay_BFC1847C) { - psx_delay_BFC1847C = 0; - cpu->gpr[31] = 0x80030484u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003152Cu); - cpu->pc = 0x8003152Cu; return; - } -label_BFC18484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC18484: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC18488: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1848C: 0C00C4F0 jal 0xB00313C0 */ - cpu->gpr[31] = 0x80030494u; /* jal link before delay slot */ - psx_delay_BFC1848C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18490: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030490u); -#endif - if (psx_delay_BFC1848C) { - psx_delay_BFC1848C = 0; - cpu->gpr[31] = 0x80030494u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313C0u); - cpu->pc = 0x800313C0u; return; - } -label_BFC18494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18494: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030494u); -#endif - /* 0xBFC18498: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030498u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1849C: 0C00C54B jal 0xB003152C */ - cpu->gpr[31] = 0x800304A4u; /* jal link before delay slot */ - psx_delay_BFC1849C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304A0u); -#endif - if (psx_delay_BFC1849C) { - psx_delay_BFC1849C = 0; - cpu->gpr[31] = 0x800304A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003152Cu); - cpu->pc = 0x8003152Cu; return; - } -label_BFC184A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC184A4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800304A4u); -#endif - /* 0xBFC184A8: 8C84A780 lw $a0, -22656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -22656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304A8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A780u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800304A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC184AC: 0C00C696 jal 0xB0031A58 */ - cpu->gpr[31] = 0x800304B4u; /* jal link before delay slot */ - psx_delay_BFC184AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304B0u); -#endif - if (psx_delay_BFC184AC) { - psx_delay_BFC184AC = 0; - cpu->gpr[31] = 0x800304B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031A58u); - cpu->pc = 0x80031A58u; return; - } -label_BFC184B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC184B4: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800304B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC184B8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800304B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC184BC: AC2EA780 sw $t6, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304BCu); return; } g_debug_last_store_pc = 0x800304BCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EA780u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800304BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC184C0: 0C010019 jal 0xB0040064 */ - cpu->gpr[31] = 0x800304C8u; /* jal link before delay slot */ - psx_delay_BFC184C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC184C4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800304C4u); -#endif - if (psx_delay_BFC184C0) { - psx_delay_BFC184C0 = 0; - cpu->gpr[31] = 0x800304C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040064u); - cpu->pc = 0x80040064u; return; - } -label_BFC184C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184C8: 1000005B beq $zero, $zero, 0xBFC18638 */ - uint32_t psx_brA_BFC184C8 = cpu->gpr[0]; uint32_t psx_brB_BFC184C8 = cpu->gpr[0]; - psx_taken_BFC184C8 = (psx_brA_BFC184C8 == psx_brB_BFC184C8); - psx_delay_BFC184C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304CCu); -#endif - if (psx_delay_BFC184C8) { - psx_delay_BFC184C8 = 0; - if (psx_taken_BFC184C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030638u); - goto label_BFC18638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800304D0u); - } -label_BFC184D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC184D0: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800304D0u); -#endif - /* 0xBFC184D4: 8DEFA780 lw $t7, -22656($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -22656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304D4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFA780u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800304D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC184D8: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x800304D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC184DC: 15E1000B bne $t7, $at, 0xBFC1850C */ - uint32_t psx_brA_BFC184DC = cpu->gpr[15]; uint32_t psx_brB_BFC184DC = cpu->gpr[1]; - psx_taken_BFC184DC = (psx_brA_BFC184DC != psx_brB_BFC184DC); - psx_delay_BFC184DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304E0u); -#endif - if (psx_delay_BFC184DC) { - psx_delay_BFC184DC = 0; - if (psx_taken_BFC184DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003050Cu); - goto label_BFC1850C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800304E4u); - } -label_BFC184E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC184E4: 0C00F998 jal 0xB003E660 */ - cpu->gpr[31] = 0x800304ECu; /* jal link before delay slot */ - psx_delay_BFC184E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304E8u); -#endif - if (psx_delay_BFC184E4) { - psx_delay_BFC184E4 = 0; - cpu->gpr[31] = 0x800304ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E660u); - cpu->pc = 0x8003E660u; return; - } -label_BFC184EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC184EC: 14400007 bne $v0, $zero, 0xBFC1850C */ - uint32_t psx_brA_BFC184EC = cpu->gpr[2]; uint32_t psx_brB_BFC184EC = cpu->gpr[0]; - psx_taken_BFC184EC = (psx_brA_BFC184EC != psx_brB_BFC184EC); - psx_delay_BFC184EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC184F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800304F0u); -#endif - if (psx_delay_BFC184EC) { - psx_delay_BFC184EC = 0; - if (psx_taken_BFC184EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003050Cu); - goto label_BFC1850C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800304F4u); - } -label_BFC184F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC184F4: 0C00C696 jal 0xB0031A58 */ - cpu->gpr[31] = 0x800304FCu; /* jal link before delay slot */ - psx_delay_BFC184F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC184F8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800304F8u); -#endif - if (psx_delay_BFC184F4) { - psx_delay_BFC184F4 = 0; - cpu->gpr[31] = 0x800304FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031A58u); - cpu->pc = 0x80031A58u; return; - } -label_BFC184FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC184FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC184FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800304FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC184FC: 2418FFFF addiu $t8, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800304FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18500: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18504: 1000004C beq $zero, $zero, 0xBFC18638 */ - uint32_t psx_brA_BFC18504 = cpu->gpr[0]; uint32_t psx_brB_BFC18504 = cpu->gpr[0]; - psx_taken_BFC18504 = (psx_brA_BFC18504 == psx_brB_BFC18504); - psx_delay_BFC18504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC18508: AC38A780 sw $t8, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030508u); return; } g_debug_last_store_pc = 0x80030508u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38A780u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030508u); -#endif - if (psx_delay_BFC18504) { - psx_delay_BFC18504 = 0; - if (psx_taken_BFC18504) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030638u); - goto label_BFC18638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003050Cu); - } -label_BFC1850C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1850Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1850Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003050Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1850C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003050Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030510u); -#endif - /* 0xBFC18510: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030510u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18514: 0C00F9AC jal 0xB003E6B0 */ - cpu->gpr[31] = 0x8003051Cu; /* jal link before delay slot */ - psx_delay_BFC18514 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC18518: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030518u); -#endif - if (psx_delay_BFC18514) { - psx_delay_BFC18514 = 0; - cpu->gpr[31] = 0x8003051Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E6B0u); - cpu->pc = 0x8003E6B0u; return; - } -label_BFC1851C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1851Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003051Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC1851C: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003051Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC18520: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18524: 0C00C4F0 jal 0xB00313C0 */ - cpu->gpr[31] = 0x8003052Cu; /* jal link before delay slot */ - psx_delay_BFC18524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18528: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030528u); -#endif - if (psx_delay_BFC18524) { - psx_delay_BFC18524 = 0; - cpu->gpr[31] = 0x8003052Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313C0u); - cpu->pc = 0x800313C0u; return; - } -label_BFC1852C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1852Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003052Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1852C: 0C00D8F3 jal 0xB00363CC */ - cpu->gpr[31] = 0x80030534u; /* jal link before delay slot */ - psx_delay_BFC1852C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030530u); -#endif - if (psx_delay_BFC1852C) { - psx_delay_BFC1852C = 0; - cpu->gpr[31] = 0x80030534u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363CCu); - cpu->pc = 0x800363CCu; return; - } -label_BFC18534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC18534: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030534u); -#endif - /* 0xBFC18538: 8F399E2C lw $t9, -25044($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030538u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1853C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003053Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC18540: 17210009 bne $t9, $at, 0xBFC18568 */ - uint32_t psx_brA_BFC18540 = cpu->gpr[25]; uint32_t psx_brB_BFC18540 = cpu->gpr[1]; - psx_taken_BFC18540 = (psx_brA_BFC18540 != psx_brB_BFC18540); - psx_delay_BFC18540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18544: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030544u); -#endif - if (psx_delay_BFC18540) { - psx_delay_BFC18540 = 0; - if (psx_taken_BFC18540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030568u); - goto label_BFC18568; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030548u); - } -label_BFC18548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18548: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1854C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003054Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030550u); -#endif - /* 0xBFC18550: 8CA5AE2C lw $a1, -20948($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030550u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5AE2Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80030550u); -#endif - /* 0xBFC18554: 8C849E1C lw $a0, -25060($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030554u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E1Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18558: 0C00E52C jal 0xB00394B0 */ - cpu->gpr[31] = 0x80030560u; /* jal link before delay slot */ - psx_delay_BFC18558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1855C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003055Cu); -#endif - if (psx_delay_BFC18558) { - psx_delay_BFC18558 = 0; - cpu->gpr[31] = 0x80030560u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800394B0u); - cpu->pc = 0x800394B0u; return; - } -label_BFC18560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18560: 0C00F0A2 jal 0xB003C288 */ - cpu->gpr[31] = 0x80030568u; /* jal link before delay slot */ - psx_delay_BFC18560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18564: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030564u); -#endif - if (psx_delay_BFC18560) { - psx_delay_BFC18560 = 0; - cpu->gpr[31] = 0x80030568u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C288u); - cpu->pc = 0x8003C288u; return; - } -label_BFC18568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18568: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030568u); -#endif - /* 0xBFC1856C: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003056Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18570: 0C011438 jal 0xB00450E0 */ - cpu->gpr[31] = 0x80030578u; /* jal link before delay slot */ - psx_delay_BFC18570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18574: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030574u); -#endif - if (psx_delay_BFC18570) { - psx_delay_BFC18570 = 0; - cpu->gpr[31] = 0x80030578u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450E0u); - cpu->pc = 0x800450E0u; return; - } -label_BFC18578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18578: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030578u); -#endif - /* 0xBFC1857C: 8D08FF70 lw $t0, -144($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003057Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08FF70u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003057Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18584: 19000024 blez $t0, 0xBFC18618 */ - uint32_t psx_brA_BFC18584 = cpu->gpr[8]; - psx_taken_BFC18584 = ((int32_t)psx_brA_BFC18584 <= 0); - psx_delay_BFC18584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18588: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030588u); -#endif - if (psx_delay_BFC18584) { - psx_delay_BFC18584 = 0; - if (psx_taken_BFC18584) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030618u); - goto label_BFC18618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003058Cu); - } -label_BFC1858C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1858Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1858Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003058Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1858C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003058Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030590u); -#endif - /* 0xBFC18590: 8C429E24 lw $v0, -25052($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030590u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC18598: 000248C0 sll $t1, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000248C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80030598u); -#endif -label_BFC1859C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1859Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003059Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1859C: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003059Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC185A0: 001058C0 sll $t3, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 3u; - PGXP_ALU(0x001058C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800305A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC185A4: 01705823 subu $t3, $t3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[16]; - PGXP_ALU(0x01705823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC185A8: 00094AC0 sll $t1, $t1, 11 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 11u; - PGXP_ALU(0x00094AC0u, cpu->gpr[9], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x800305A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC185AC: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC185B0: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800305B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC185B4: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305B4u); -#endif - /* 0xBFC185B8: 8D8D0070 lw $t5, 112($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800305B8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x8D8D0070u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800305B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC185BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800305BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC185C0: 122D000F beq $s1, $t5, 0xBFC18600 */ - uint32_t psx_brA_BFC185C0 = cpu->gpr[17]; uint32_t psx_brB_BFC185C0 = cpu->gpr[13]; - psx_taken_BFC185C0 = (psx_brA_BFC185C0 == psx_brB_BFC185C0); - psx_delay_BFC185C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC185C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800305C4u); -#endif - if (psx_delay_BFC185C0) { - psx_delay_BFC185C0 = 0; - if (psx_taken_BFC185C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030600u); - goto label_BFC18600; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800305C8u); - } -label_BFC185C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC185C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC185C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC185C8: 000270C0 sll $t6, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000270C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800305C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC185CC: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC185D0: 0010C0C0 sll $t8, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 3u; - PGXP_ALU(0x0010C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800305D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC185D4: 0310C023 subu $t8, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[16]; - PGXP_ALU(0x0310C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC185D8: 000E72C0 sll $t6, $t6, 11 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 11u; - PGXP_ALU(0x000E72C0u, cpu->gpr[14], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x800305D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC185DC: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800305DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305E0u); -#endif - /* 0xBFC185E0: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800305E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800305E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8C000u); -#endif - /* 0xBFC185E4: 026E7821 addu $t7, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC185E8: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800305E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC185EC: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x800305F4u; /* jal link before delay slot */ - psx_delay_BFC185EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC185F0: 01F82821 addu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800305F0u); -#endif - if (psx_delay_BFC185EC) { - psx_delay_BFC185EC = 0; - cpu->gpr[31] = 0x800305F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC185F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC185F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC185F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800305F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC185F4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800305F4u); -#endif - /* 0xBFC185F8: 8C429E24 lw $v0, -25052($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800305F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800305F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC185FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800305FCu); -#endif -label_BFC18600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC18600: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030600u); -#endif - /* 0xBFC18604: 8F39FF70 lw $t9, -144($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030604u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39FF70u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC18608: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010002u); -#endif - /* 0xBFC1860C: 0219082A slt $at, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0219082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003060Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18610: 1420FFE2 bne $at, $zero, 0xBFC1859C */ - uint32_t psx_brA_BFC18610 = cpu->gpr[1]; uint32_t psx_brB_BFC18610 = cpu->gpr[0]; - psx_taken_BFC18610 = (psx_brA_BFC18610 != psx_brB_BFC18610); - psx_delay_BFC18610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC18614: 000248C0 sll $t1, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000248C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80030614u); -#endif - if (psx_delay_BFC18610) { - psx_delay_BFC18610 = 0; - if (psx_taken_BFC18610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003059Cu); - goto label_BFC1859C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030618u); - } -label_BFC18618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18618: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030618u); -#endif - /* 0xBFC1861C: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003061Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003061Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18620: 0C00FA3B jal 0xB003E8EC */ - cpu->gpr[31] = 0x80030628u; /* jal link before delay slot */ - psx_delay_BFC18620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030624u); -#endif - if (psx_delay_BFC18620) { - psx_delay_BFC18620 = 0; - cpu->gpr[31] = 0x80030628u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8ECu); - cpu->pc = 0x8003E8ECu; return; - } -label_BFC18628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18628: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030628u); -#endif - /* 0xBFC1862C: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003062Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003062Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18630: 0C00C54B jal 0xB003152C */ - cpu->gpr[31] = 0x80030638u; /* jal link before delay slot */ - psx_delay_BFC18630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030634u); -#endif - if (psx_delay_BFC18630) { - psx_delay_BFC18630 = 0; - cpu->gpr[31] = 0x80030638u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003152Cu); - cpu->pc = 0x8003152Cu; return; - } -label_BFC18638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18638: 0C00C23C jal 0xB00308F0 */ - cpu->gpr[31] = 0x80030640u; /* jal link before delay slot */ - psx_delay_BFC18638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1863C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003063Cu); -#endif - if (psx_delay_BFC18638) { - psx_delay_BFC18638 = 0; - cpu->gpr[31] = 0x80030640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308F0u); - cpu->pc = 0x800308F0u; return; - } -label_BFC18640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18640: 14400006 bne $v0, $zero, 0xBFC1865C */ - uint32_t psx_brA_BFC18640 = cpu->gpr[2]; uint32_t psx_brB_BFC18640 = cpu->gpr[0]; - psx_taken_BFC18640 = (psx_brA_BFC18640 != psx_brB_BFC18640); - psx_delay_BFC18640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18644: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030644u); -#endif - if (psx_delay_BFC18640) { - psx_delay_BFC18640 = 0; - if (psx_taken_BFC18640) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003065Cu); - goto label_BFC1865C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030648u); - } -label_BFC18648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18648: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030648u); -#endif - /* 0xBFC1864C: 8D089E28 lw $t0, -25048($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003064Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E28u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003064Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18654: 1100FF7A beq $t0, $zero, 0xBFC18440 */ - uint32_t psx_brA_BFC18654 = cpu->gpr[8]; uint32_t psx_brB_BFC18654 = cpu->gpr[0]; - psx_taken_BFC18654 = (psx_brA_BFC18654 == psx_brB_BFC18654); - psx_delay_BFC18654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030658u); -#endif - if (psx_delay_BFC18654) { - psx_delay_BFC18654 = 0; - if (psx_taken_BFC18654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030440u); - goto label_BFC18440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003065Cu); - } -label_BFC1865C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1865Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1865Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003065Cu); -#endif - /* 0xBFC1865C: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003065Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003065Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030660u); -#endif - /* 0xBFC18660: 8FB30030 lw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030660u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80030660u); -#endif - /* 0xBFC18664: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030664u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80030664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18668: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030668u); -#endif - /* 0xBFC1866C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003066Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003066Cu); -#endif -label_BFC18670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030670u); -#endif - /* 0xBFC18670: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030670u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80030670u); -#endif - /* 0xBFC18674: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030674u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80030674u); -#endif - /* 0xBFC18678: 8FB50020 lw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030678u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80030678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1867C: 03E00008 jr $ra */ - psx_delay_BFC1867C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18680: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80030680u); -#endif - if (psx_delay_BFC1867C) { - psx_delay_BFC1867C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18684(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18684u); - int psx_delay_BFC18698 = 0; - int psx_delay_BFC186A0 = 0; - int psx_taken_BFC186A0 = 0; - int psx_delay_BFC186A8 = 0; - int psx_taken_BFC186A8 = 0; - int psx_delay_BFC186BC = 0; - int psx_taken_BFC186BC = 0; - int psx_delay_BFC186D0 = 0; - int psx_delay_BFC186D8 = 0; - int psx_taken_BFC186D8 = 0; - int psx_delay_BFC186E0 = 0; - int psx_delay_BFC186E8 = 0; - int psx_taken_BFC186E8 = 0; - int psx_delay_BFC186F0 = 0; - int psx_taken_BFC186F0 = 0; - int psx_delay_BFC186F8 = 0; - int psx_delay_BFC18700 = 0; - int psx_delay_BFC18708 = 0; - int psx_delay_BFC18710 = 0; - int psx_taken_BFC18710 = 0; - int psx_delay_BFC18718 = 0; - int psx_delay_BFC18720 = 0; - int psx_delay_BFC18728 = 0; - int psx_delay_BFC18730 = 0; - int psx_delay_BFC18738 = 0; - int psx_delay_BFC18744 = 0; - int psx_taken_BFC18744 = 0; - int psx_delay_BFC1874C = 0; - int psx_delay_BFC18754 = 0; - int psx_delay_BFC1875C = 0; - int psx_taken_BFC1875C = 0; - int psx_delay_BFC18764 = 0; - int psx_delay_BFC1876C = 0; - int psx_delay_BFC18780 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC186A0u: goto label_BFC186A0; - case 0xBFC186A8u: goto label_BFC186A8; - case 0xBFC186B0u: goto label_BFC186B0; - case 0xBFC186C4u: goto label_BFC186C4; - case 0xBFC186D8u: goto label_BFC186D8; - case 0xBFC186E0u: goto label_BFC186E0; - case 0xBFC186E8u: goto label_BFC186E8; - case 0xBFC186F0u: goto label_BFC186F0; - case 0xBFC186F8u: goto label_BFC186F8; - case 0xBFC18700u: goto label_BFC18700; - case 0xBFC18708u: goto label_BFC18708; - case 0xBFC18710u: goto label_BFC18710; - case 0xBFC18718u: goto label_BFC18718; - case 0xBFC18720u: goto label_BFC18720; - case 0xBFC18728u: goto label_BFC18728; - case 0xBFC18730u: goto label_BFC18730; - case 0xBFC18738u: goto label_BFC18738; - case 0xBFC18740u: goto label_BFC18740; - case 0xBFC1874Cu: goto label_BFC1874C; - case 0xBFC18754u: goto label_BFC18754; - case 0xBFC1875Cu: goto label_BFC1875C; - case 0xBFC18764u: goto label_BFC18764; - case 0xBFC1876Cu: goto label_BFC1876C; - case 0xBFC18774u: goto label_BFC18774; - case 0xBFC18778u: goto label_BFC18778; - default: break; - } - } -label_BFC18684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18684: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC18688: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030688u); return; } g_debug_last_store_pc = 0x80030688u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80030688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1868C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003068Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC18690: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030690u); return; } g_debug_last_store_pc = 0x80030690u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18694: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18698: 0C00FB04 jal 0xB003EC10 */ - cpu->gpr[31] = 0x800306A0u; /* jal link before delay slot */ - psx_delay_BFC18698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1869C: 2484AE28 addiu $a0, $a0, -20952 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20952)); - PGXP_ALU(0x2484AE28u, cpu->gpr[4], _pgx1, 0xFFFFAE28u); } -#ifdef PSX_COSIM - cosim_instr(0x8003069Cu); -#endif - if (psx_delay_BFC18698) { - psx_delay_BFC18698 = 0; - cpu->gpr[31] = 0x800306A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC10u); - cpu->pc = 0x8003EC10u; return; - } -label_BFC186A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC186A0: 04410003 bgez $v0, 0xBFC186B0 */ - uint32_t psx_brA_BFC186A0 = cpu->gpr[2]; - psx_taken_BFC186A0 = ((int32_t)psx_brA_BFC186A0 >= 0); - psx_delay_BFC186A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800306A4u); -#endif - if (psx_delay_BFC186A0) { - psx_delay_BFC186A0 = 0; - if (psx_taken_BFC186A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306B0u); - goto label_BFC186B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306A8u); - } -label_BFC186A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186A8: 10000033 beq $zero, $zero, 0xBFC18778 */ - uint32_t psx_brA_BFC186A8 = cpu->gpr[0]; uint32_t psx_brB_BFC186A8 = cpu->gpr[0]; - psx_taken_BFC186A8 = (psx_brA_BFC186A8 == psx_brB_BFC186A8); - psx_delay_BFC186A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC186AC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800306ACu); -#endif - if (psx_delay_BFC186A8) { - psx_delay_BFC186A8 = 0; - if (psx_taken_BFC186A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030778u); - goto label_BFC18778; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306B0u); - } -label_BFC186B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC186B0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800306B0u); -#endif - /* 0xBFC186B4: 8DCE9DEC lw $t6, -25108($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800306B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DECu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800306B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800306B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC186BC: 11C0000E beq $t6, $zero, 0xBFC186F8 */ - uint32_t psx_brA_BFC186BC = cpu->gpr[14]; uint32_t psx_brB_BFC186BC = cpu->gpr[0]; - psx_taken_BFC186BC = (psx_brA_BFC186BC == psx_brB_BFC186BC); - psx_delay_BFC186BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800306C0u); -#endif - if (psx_delay_BFC186BC) { - psx_delay_BFC186BC = 0; - if (psx_taken_BFC186BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306F8u); - goto label_BFC186F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306C4u); - } -label_BFC186C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC186C4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800306C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC186C8: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800306C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC186CC: 24A5AE30 addiu $a1, $a1, -20944 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20944)); - PGXP_ALU(0x24A5AE30u, cpu->gpr[5], _pgx1, 0xFFFFAE30u); } -#ifdef PSX_COSIM - cosim_instr(0x800306CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC186D0: 0C016A40 jal 0xB005A900 */ - cpu->gpr[31] = 0x800306D8u; /* jal link before delay slot */ - psx_delay_BFC186D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC186D4: 2484D0A8 addiu $a0, $a0, -12120 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-12120)); - PGXP_ALU(0x2484D0A8u, cpu->gpr[4], _pgx1, 0xFFFFD0A8u); } -#ifdef PSX_COSIM - cosim_instr(0x800306D4u); -#endif - if (psx_delay_BFC186D0) { - psx_delay_BFC186D0 = 0; - cpu->gpr[31] = 0x800306D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A900u); - cpu->pc = 0x8005A900u; return; - } -label_BFC186D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC186D8: 14400005 bne $v0, $zero, 0xBFC186F0 */ - uint32_t psx_brA_BFC186D8 = cpu->gpr[2]; uint32_t psx_brB_BFC186D8 = cpu->gpr[0]; - psx_taken_BFC186D8 = (psx_brA_BFC186D8 != psx_brB_BFC186D8); - psx_delay_BFC186D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800306DCu); -#endif - if (psx_delay_BFC186D8) { - psx_delay_BFC186D8 = 0; - if (psx_taken_BFC186D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306F0u); - goto label_BFC186F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306E0u); - } -label_BFC186E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC186E0: 0C00FCF9 jal 0xB003F3E4 */ - cpu->gpr[31] = 0x800306E8u; /* jal link before delay slot */ - psx_delay_BFC186E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC186E4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800306E4u); -#endif - if (psx_delay_BFC186E0) { - psx_delay_BFC186E0 = 0; - cpu->gpr[31] = 0x800306E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F3E4u); - cpu->pc = 0x8003F3E4u; return; - } -label_BFC186E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186E8: 10000005 beq $zero, $zero, 0xBFC18700 */ - uint32_t psx_brA_BFC186E8 = cpu->gpr[0]; uint32_t psx_brB_BFC186E8 = cpu->gpr[0]; - psx_taken_BFC186E8 = (psx_brA_BFC186E8 == psx_brB_BFC186E8); - psx_delay_BFC186E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800306ECu); -#endif - if (psx_delay_BFC186E8) { - psx_delay_BFC186E8 = 0; - if (psx_taken_BFC186E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030700u); - goto label_BFC18700; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306F0u); - } -label_BFC186F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC186F0: 10000021 beq $zero, $zero, 0xBFC18778 */ - uint32_t psx_brA_BFC186F0 = cpu->gpr[0]; uint32_t psx_brB_BFC186F0 = cpu->gpr[0]; - psx_taken_BFC186F0 = (psx_brA_BFC186F0 == psx_brB_BFC186F0); - psx_delay_BFC186F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC186F4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800306F4u); -#endif - if (psx_delay_BFC186F0) { - psx_delay_BFC186F0 = 0; - if (psx_taken_BFC186F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030778u); - goto label_BFC18778; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800306F8u); - } -label_BFC186F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC186F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC186F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800306F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC186F8: 0C00FCF9 jal 0xB003F3E4 */ - cpu->gpr[31] = 0x80030700u; /* jal link before delay slot */ - psx_delay_BFC186F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC186FC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800306FCu); -#endif - if (psx_delay_BFC186F8) { - psx_delay_BFC186F8 = 0; - cpu->gpr[31] = 0x80030700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F3E4u); - cpu->pc = 0x8003F3E4u; return; - } -label_BFC18700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18700: 0C00F556 jal 0xB003D558 */ - cpu->gpr[31] = 0x80030708u; /* jal link before delay slot */ - psx_delay_BFC18700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030704u); -#endif - if (psx_delay_BFC18700) { - psx_delay_BFC18700 = 0; - cpu->gpr[31] = 0x80030708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D558u); - cpu->pc = 0x8003D558u; return; - } -label_BFC18708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18708: 0C013BE4 jal 0xB004EF90 */ - cpu->gpr[31] = 0x80030710u; /* jal link before delay slot */ - psx_delay_BFC18708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1870C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003070Cu); -#endif - if (psx_delay_BFC18708) { - psx_delay_BFC18708 = 0; - cpu->gpr[31] = 0x80030710u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF90u); - cpu->pc = 0x8004EF90u; return; - } -label_BFC18710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC18710: 16000005 bne $s0, $zero, 0xBFC18728 */ - uint32_t psx_brA_BFC18710 = cpu->gpr[16]; uint32_t psx_brB_BFC18710 = cpu->gpr[0]; - psx_taken_BFC18710 = (psx_brA_BFC18710 != psx_brB_BFC18710); - psx_delay_BFC18710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030714u); -#endif - if (psx_delay_BFC18710) { - psx_delay_BFC18710 = 0; - if (psx_taken_BFC18710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030728u); - goto label_BFC18728; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030718u); - } -label_BFC18718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18718: 0C00FF6C jal 0xB003FDB0 */ - cpu->gpr[31] = 0x80030720u; /* jal link before delay slot */ - psx_delay_BFC18718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1871C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003071Cu); -#endif - if (psx_delay_BFC18718) { - psx_delay_BFC18718 = 0; - cpu->gpr[31] = 0x80030720u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FDB0u); - cpu->pc = 0x8003FDB0u; return; - } -label_BFC18720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18720: 0C010019 jal 0xB0040064 */ - cpu->gpr[31] = 0x80030728u; /* jal link before delay slot */ - psx_delay_BFC18720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18724: 2404005E addiu $a0, $zero, 94 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); - PGXP_ALU(0x2404005Eu, cpu->gpr[4], _pgx1, 0x0000005Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80030724u); -#endif - if (psx_delay_BFC18720) { - psx_delay_BFC18720 = 0; - cpu->gpr[31] = 0x80030728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040064u); - cpu->pc = 0x80040064u; return; - } -label_BFC18728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18728: 0C0106B8 jal 0xB0041AE0 */ - cpu->gpr[31] = 0x80030730u; /* jal link before delay slot */ - psx_delay_BFC18728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1872C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003072Cu); -#endif - if (psx_delay_BFC18728) { - psx_delay_BFC18728 = 0; - cpu->gpr[31] = 0x80030730u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041AE0u); - cpu->pc = 0x80041AE0u; return; - } -label_BFC18730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18730: 0C00FC64 jal 0xB003F190 */ - cpu->gpr[31] = 0x80030738u; /* jal link before delay slot */ - psx_delay_BFC18730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18734: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030734u); -#endif - if (psx_delay_BFC18730) { - psx_delay_BFC18730 = 0; - cpu->gpr[31] = 0x80030738u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F190u); - cpu->pc = 0x8003F190u; return; - } -label_BFC18738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18738: 0C00FEF7 jal 0xB003FBDC */ - cpu->gpr[31] = 0x80030740u; /* jal link before delay slot */ - psx_delay_BFC18738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1873C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003073Cu); -#endif - if (psx_delay_BFC18738) { - psx_delay_BFC18738 = 0; - cpu->gpr[31] = 0x80030740u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FBDCu); - cpu->pc = 0x8003FBDCu; return; - } -label_BFC18740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC18740: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18744: 14500007 bne $v0, $s0, 0xBFC18764 */ - uint32_t psx_brA_BFC18744 = cpu->gpr[2]; uint32_t psx_brB_BFC18744 = cpu->gpr[16]; - psx_taken_BFC18744 = (psx_brA_BFC18744 != psx_brB_BFC18744); - psx_delay_BFC18744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18748: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030748u); -#endif - if (psx_delay_BFC18744) { - psx_delay_BFC18744 = 0; - if (psx_taken_BFC18744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030764u); - goto label_BFC18764; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003074Cu); - } -label_BFC1874C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1874Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1874Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003074Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1874C: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80030754u; /* jal link before delay slot */ - psx_delay_BFC1874C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18750: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030750u); -#endif - if (psx_delay_BFC1874C) { - psx_delay_BFC1874C = 0; - cpu->gpr[31] = 0x80030754u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC18754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18754: 0C00FEF7 jal 0xB003FBDC */ - cpu->gpr[31] = 0x8003075Cu; /* jal link before delay slot */ - psx_delay_BFC18754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18758: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030758u); -#endif - if (psx_delay_BFC18754) { - psx_delay_BFC18754 = 0; - cpu->gpr[31] = 0x8003075Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FBDCu); - cpu->pc = 0x8003FBDCu; return; - } -label_BFC1875C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1875Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1875Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003075Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1875C: 1050FFFB beq $v0, $s0, 0xBFC1874C */ - uint32_t psx_brA_BFC1875C = cpu->gpr[2]; uint32_t psx_brB_BFC1875C = cpu->gpr[16]; - psx_taken_BFC1875C = (psx_brA_BFC1875C == psx_brB_BFC1875C); - psx_delay_BFC1875C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18760: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030760u); -#endif - if (psx_delay_BFC1875C) { - psx_delay_BFC1875C = 0; - if (psx_taken_BFC1875C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003074Cu); - goto label_BFC1874C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030764u); - } -label_BFC18764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18764: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x8003076Cu; /* jal link before delay slot */ - psx_delay_BFC18764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18768: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030768u); -#endif - if (psx_delay_BFC18764) { - psx_delay_BFC18764 = 0; - cpu->gpr[31] = 0x8003076Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC1876C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1876Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1876Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003076Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1876C: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80030774u; /* jal link before delay slot */ - psx_delay_BFC1876C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18770: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030770u); -#endif - if (psx_delay_BFC1876C) { - psx_delay_BFC1876C = 0; - cpu->gpr[31] = 0x80030774u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC18774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18774: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030774u); -#endif -label_BFC18778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030778u); -#endif - /* 0xBFC18778: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030778u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030778u); -#endif - /* 0xBFC1877C: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003077Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC18780: 03E00008 jr $ra */ - psx_delay_BFC18780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18784: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80030784u); -#endif - if (psx_delay_BFC18780) { - psx_delay_BFC18780 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18788(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18788u); - int psx_delay_BFC18790 = 0; -label_BFC18788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18788: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1878C: 3C0E1F80 lui $t6, 0x1F80 */ - cpu->gpr[14] = 0x1F800000u; - PGXP_ALU(0x3C0E1F80u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC18790: 03E00008 jr $ra */ - psx_delay_BFC18790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC18794: A1C42041 sb $a0, 8257($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030794u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (8257)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA1C42041u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030794u); -#endif - if (psx_delay_BFC18790) { - psx_delay_BFC18790 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18798(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18798u); - int psx_delay_BFC187B0 = 0; - int psx_delay_BFC187C0 = 0; - int psx_delay_BFC187DC = 0; - int psx_taken_BFC187DC = 0; - int psx_delay_BFC187F0 = 0; - int psx_taken_BFC187F0 = 0; - int psx_delay_BFC18810 = 0; - int psx_taken_BFC18810 = 0; - int psx_delay_BFC18820 = 0; - int psx_taken_BFC18820 = 0; - int psx_delay_BFC18834 = 0; - int psx_taken_BFC18834 = 0; - int psx_delay_BFC18840 = 0; - int psx_delay_BFC1884C = 0; - int psx_delay_BFC18854 = 0; - int psx_taken_BFC18854 = 0; - int psx_delay_BFC18864 = 0; - int psx_delay_BFC18874 = 0; - int psx_delay_BFC1887C = 0; - int psx_delay_BFC18890 = 0; - int psx_taken_BFC18890 = 0; - int psx_delay_BFC18898 = 0; - int psx_taken_BFC18898 = 0; - int psx_delay_BFC188AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC187B8u: goto label_BFC187B8; - case 0xBFC187C8u: goto label_BFC187C8; - case 0xBFC187D4u: goto label_BFC187D4; - case 0xBFC187E4u: goto label_BFC187E4; - case 0xBFC187F8u: goto label_BFC187F8; - case 0xBFC18808u: goto label_BFC18808; - case 0xBFC18818u: goto label_BFC18818; - case 0xBFC18828u: goto label_BFC18828; - case 0xBFC1883Cu: goto label_BFC1883C; - case 0xBFC18848u: goto label_BFC18848; - case 0xBFC18854u: goto label_BFC18854; - case 0xBFC1885Cu: goto label_BFC1885C; - case 0xBFC1886Cu: goto label_BFC1886C; - case 0xBFC1887Cu: goto label_BFC1887C; - case 0xBFC18884u: goto label_BFC18884; - case 0xBFC18898u: goto label_BFC18898; - case 0xBFC188A0u: goto label_BFC188A0; - case 0xBFC188A4u: goto label_BFC188A4; - default: break; - } - } -label_BFC18798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18798: 27BDFF50 addiu $sp, $sp, -176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-176)); - PGXP_ALU(0x27BDFF50u, cpu->gpr[29], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x80030798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1879C: 3C06BFC7 lui $a2, 0xBFC7 */ - cpu->gpr[6] = 0xBFC70000u; - PGXP_ALU(0x3C06BFC7u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003079Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC187A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307A0u); return; } g_debug_last_store_pc = 0x800307A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800307A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC187A4: 34C6FF32 ori $a2, $a2, 0xFF32 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0xFF32u; - PGXP_ALU(0x34C6FF32u, cpu->gpr[6], _pgx1, 0xFF32u); } -#ifdef PSX_COSIM - cosim_instr(0x800307A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC187A8: AFA600AC sw $a2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307A8u); return; } g_debug_last_store_pc = 0x800307A8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA600ACu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800307A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC187AC: 27A4006C addiu $a0, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A4006Cu, cpu->gpr[4], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800307ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC187B0: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x800307B8u; /* jal link before delay slot */ - psx_delay_BFC187B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC187B4: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800307B4u); -#endif - if (psx_delay_BFC187B0) { - psx_delay_BFC187B0 = 0; - cpu->gpr[31] = 0x800307B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC187B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC187B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC187B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307B8u); -#endif - /* 0xBFC187B8: 8FA600AC lw $a2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307B8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600ACu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800307B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC187BC: 27A4002C addiu $a0, $sp, 44 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (44)); - PGXP_ALU(0x27A4002Cu, cpu->gpr[4], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800307BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC187C0: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x800307C8u; /* jal link before delay slot */ - psx_delay_BFC187C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC187C4: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800307C4u); -#endif - if (psx_delay_BFC187C0) { - psx_delay_BFC187C0 = 0; - cpu->gpr[31] = 0x800307C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC187C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC187C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC187C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307C8u); -#endif - /* 0xBFC187C8: 8FA600AC lw $a2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307C8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600ACu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800307C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC187CC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800307CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC187D0: 27A300B0 addiu $v1, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27A300B0u, cpu->gpr[3], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x800307D0u); -#endif -label_BFC187D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC187D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC187D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307D4u); -#endif - /* 0xBFC187D4: 90C20000 lbu $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 2, 0x40u); - PGXP_LOAD(0x90C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800307D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC187D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800307D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC187DC: 10400006 beq $v0, $zero, 0xBFC187F8 */ - uint32_t psx_brA_BFC187DC = cpu->gpr[2]; uint32_t psx_brB_BFC187DC = cpu->gpr[0]; - psx_taken_BFC187DC = (psx_brA_BFC187DC == psx_brB_BFC187DC); - psx_delay_BFC187DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC187E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800307E0u); -#endif - if (psx_delay_BFC187DC) { - psx_delay_BFC187DC = 0; - if (psx_taken_BFC187DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800307F8u); - goto label_BFC187F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800307E4u); - } -label_BFC187E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC187E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC187E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC187E4: A062FFBC sb $v0, -68($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800307E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-68)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FFBCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800307E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC187E8: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800307E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC187EC: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800307ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC187F0: 1000FFF8 beq $zero, $zero, 0xBFC187D4 */ - uint32_t psx_brA_BFC187F0 = cpu->gpr[0]; uint32_t psx_brB_BFC187F0 = cpu->gpr[0]; - psx_taken_BFC187F0 = (psx_brA_BFC187F0 == psx_brB_BFC187F0); - psx_delay_BFC187F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC187F4: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800307F4u); -#endif - if (psx_delay_BFC187F0) { - psx_delay_BFC187F0 = 0; - if (psx_taken_BFC187F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800307D4u); - goto label_BFC187D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800307F8u); - } -label_BFC187F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC187F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC187F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800307F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC187F8: A060FFBC sb $zero, -68($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800307F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-68)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA060FFBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800307F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC187FC: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800307FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC18800: 27A300B0 addiu $v1, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27A300B0u, cpu->gpr[3], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18804: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030804u); -#endif -label_BFC18808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030808u); -#endif - /* 0xBFC18808: 90C20000 lbu $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 2, 0x40u); - PGXP_LOAD(0x90C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1880C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003080Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18810: 10400005 beq $v0, $zero, 0xBFC18828 */ - uint32_t psx_brA_BFC18810 = cpu->gpr[2]; uint32_t psx_brB_BFC18810 = cpu->gpr[0]; - psx_taken_BFC18810 = (psx_brA_BFC18810 == psx_brB_BFC18810); - psx_delay_BFC18810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030814u); -#endif - if (psx_delay_BFC18810) { - psx_delay_BFC18810 = 0; - if (psx_taken_BFC18810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030828u); - goto label_BFC18828; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030818u); - } -label_BFC18818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC18818: A062FF7C sb $v0, -132($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -132; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030818u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-132)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA062FF7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1881C: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003081Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18820: 1000FFF9 beq $zero, $zero, 0xBFC18808 */ - uint32_t psx_brA_BFC18820 = cpu->gpr[0]; uint32_t psx_brB_BFC18820 = cpu->gpr[0]; - psx_taken_BFC18820 = (psx_brA_BFC18820 == psx_brB_BFC18820); - psx_delay_BFC18820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC18824: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030824u); -#endif - if (psx_delay_BFC18820) { - psx_delay_BFC18820 = 0; - if (psx_taken_BFC18820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030808u); - goto label_BFC18808; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030828u); - } -label_BFC18828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC18828: A060FF7C sb $zero, -132($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -132; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030828u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-132)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA060FF7Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030828u); -#endif - /* 0xBFC1882C: 93AE006C lbu $t6, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (108)), 14, 0x20000000u); - PGXP_LOAD(0x93AE006Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003082Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18834: 15C00009 bne $t6, $zero, 0xBFC1885C */ - uint32_t psx_brA_BFC18834 = cpu->gpr[14]; uint32_t psx_brB_BFC18834 = cpu->gpr[0]; - psx_taken_BFC18834 = (psx_brA_BFC18834 != psx_brB_BFC18834); - psx_delay_BFC18834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030838u); -#endif - if (psx_delay_BFC18834) { - psx_delay_BFC18834 = 0; - if (psx_taken_BFC18834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003085Cu); - goto label_BFC1885C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003083Cu); - } -label_BFC1883C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1883Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1883Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003083Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1883C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003083Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18840: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80030848u; /* jal link before delay slot */ - psx_delay_BFC18840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18844: 2484AE74 addiu $a0, $a0, -20876 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20876)); - PGXP_ALU(0x2484AE74u, cpu->gpr[4], _pgx1, 0xFFFFAE74u); } -#ifdef PSX_COSIM - cosim_instr(0x80030844u); -#endif - if (psx_delay_BFC18840) { - psx_delay_BFC18840 = 0; - cpu->gpr[31] = 0x80030848u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC18848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18848: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1884C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80030854u; /* jal link before delay slot */ - psx_delay_BFC1884C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18850: 2484AE8C addiu $a0, $a0, -20852 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20852)); - PGXP_ALU(0x2484AE8Cu, cpu->gpr[4], _pgx1, 0xFFFFAE8Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030850u); -#endif - if (psx_delay_BFC1884C) { - psx_delay_BFC1884C = 0; - cpu->gpr[31] = 0x80030854u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC18854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18854: 10000009 beq $zero, $zero, 0xBFC1887C */ - uint32_t psx_brA_BFC18854 = cpu->gpr[0]; uint32_t psx_brB_BFC18854 = cpu->gpr[0]; - psx_taken_BFC18854 = (psx_brA_BFC18854 == psx_brB_BFC18854); - psx_delay_BFC18854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030858u); -#endif - if (psx_delay_BFC18854) { - psx_delay_BFC18854 = 0; - if (psx_taken_BFC18854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003087Cu); - goto label_BFC1887C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003085Cu); - } -label_BFC1885C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1885Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003085Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1885C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003085Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18860: 2484AEC8 addiu $a0, $a0, -20792 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20792)); - PGXP_ALU(0x2484AEC8u, cpu->gpr[4], _pgx1, 0xFFFFAEC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80030860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18864: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003086Cu; /* jal link before delay slot */ - psx_delay_BFC18864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC18868: 27A5006C addiu $a1, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A5006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030868u); -#endif - if (psx_delay_BFC18864) { - psx_delay_BFC18864 = 0; - cpu->gpr[31] = 0x8003086Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC1886C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1886Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1886C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18870: 2484AECC addiu $a0, $a0, -20788 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20788)); - PGXP_ALU(0x2484AECCu, cpu->gpr[4], _pgx1, 0xFFFFAECCu); } -#ifdef PSX_COSIM - cosim_instr(0x80030870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18874: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003087Cu; /* jal link before delay slot */ - psx_delay_BFC18874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC18878: 27A5002C addiu $a1, $sp, 44 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (44)); - PGXP_ALU(0x27A5002Cu, cpu->gpr[5], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030878u); -#endif - if (psx_delay_BFC18874) { - psx_delay_BFC18874 = 0; - cpu->gpr[31] = 0x8003087Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC1887C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1887Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1887C: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x80030884u; /* jal link before delay slot */ - psx_delay_BFC1887C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC18880: 27A4006C addiu $a0, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A4006Cu, cpu->gpr[4], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030880u); -#endif - if (psx_delay_BFC1887C) { - psx_delay_BFC1887C = 0; - cpu->gpr[31] = 0x80030884u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC18884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008004u); -#endif - /* 0xBFC18884: 03A27821 addu $t7, $sp, $v0 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[29] + cpu->gpr[2]; - PGXP_ALU(0x03A27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030884u); -#endif - /* 0xBFC18888: 91EF006B lbu $t7, 107($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 107; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (107)), 15, 0x8000u); - PGXP_LOAD(0x91EF006Bu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1888C: 24010045 addiu $at, $zero, 69 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (69)); - PGXP_ALU(0x24010045u, cpu->gpr[1], _pgx1, 0x00000045u); } -#ifdef PSX_COSIM - cosim_instr(0x8003088Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC18890: 15E10004 bne $t7, $at, 0xBFC188A4 */ - uint32_t psx_brA_BFC18890 = cpu->gpr[15]; uint32_t psx_brB_BFC18890 = cpu->gpr[1]; - psx_taken_BFC18890 = (psx_brA_BFC18890 != psx_brB_BFC18890); - psx_delay_BFC18890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18894: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030894u); -#endif - if (psx_delay_BFC18890) { - psx_delay_BFC18890 = 0; - if (psx_taken_BFC18890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308A4u); - goto label_BFC188A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030898u); - } -label_BFC18898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18898: 10000002 beq $zero, $zero, 0xBFC188A4 */ - uint32_t psx_brA_BFC18898 = cpu->gpr[0]; uint32_t psx_brB_BFC18898 = cpu->gpr[0]; - psx_taken_BFC18898 = (psx_brA_BFC18898 == psx_brB_BFC18898); - psx_delay_BFC18898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1889C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003089Cu); -#endif - if (psx_delay_BFC18898) { - psx_delay_BFC18898 = 0; - if (psx_taken_BFC18898) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308A4u); - goto label_BFC188A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308A0u); - } -label_BFC188A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC188A0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800308A0u); -#endif -label_BFC188A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308A4u); -#endif - /* 0xBFC188A4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800308A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC188A8: 27BD00B0 addiu $sp, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27BD00B0u, cpu->gpr[29], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x800308A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC188AC: 03E00008 jr $ra */ - psx_delay_BFC188AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC188B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800308B0u); -#endif - if (psx_delay_BFC188AC) { - psx_delay_BFC188AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC188B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC188B4u); - int psx_delay_BFC188B8 = 0; - int psx_taken_BFC188B8 = 0; - int psx_delay_BFC188D4 = 0; - int psx_taken_BFC188D4 = 0; - int psx_delay_BFC188DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC188C0u: goto label_BFC188C0; - case 0xBFC188DCu: goto label_BFC188DC; - default: break; - } - } -label_BFC188B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC188B4: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800308B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC188B8: 10400008 beq $v0, $zero, 0xBFC188DC */ - uint32_t psx_brA_BFC188B8 = cpu->gpr[2]; uint32_t psx_brB_BFC188B8 = cpu->gpr[0]; - psx_taken_BFC188B8 = (psx_brA_BFC188B8 == psx_brB_BFC188B8); - psx_delay_BFC188B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC188BC: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800308BCu); -#endif - if (psx_delay_BFC188B8) { - psx_delay_BFC188B8 = 0; - if (psx_taken_BFC188B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308DCu); - goto label_BFC188DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308C0u); - } -label_BFC188C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308C0u); -#endif - /* 0xBFC188C0: 80AE0000 lb $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x80AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800308C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC188C4: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800308C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC188C8: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800308C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC188CC: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800308CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC188D0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800308D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC188D4: 1440FFFA bne $v0, $zero, 0xBFC188C0 */ - uint32_t psx_brA_BFC188D4 = cpu->gpr[2]; uint32_t psx_brB_BFC188D4 = cpu->gpr[0]; - psx_taken_BFC188D4 = (psx_brA_BFC188D4 != psx_brB_BFC188D4); - psx_delay_BFC188D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC188D8: A08EFFFF sb $t6, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800308D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08EFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800308D8u); -#endif - if (psx_delay_BFC188D4) { - psx_delay_BFC188D4 = 0; - if (psx_taken_BFC188D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308C0u); - goto label_BFC188C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308DCu); - } -label_BFC188DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC188DC: 03E00008 jr $ra */ - psx_delay_BFC188DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC188E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800308E0u); -#endif - if (psx_delay_BFC188DC) { - psx_delay_BFC188DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC188F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC188F0u); - int psx_delay_BFC188F8 = 0; - int psx_delay_BFC18914 = 0; - int psx_taken_BFC18914 = 0; - int psx_delay_BFC18928 = 0; - int psx_taken_BFC18928 = 0; - int psx_delay_BFC18938 = 0; - int psx_taken_BFC18938 = 0; - int psx_delay_BFC18940 = 0; - int psx_delay_BFC18950 = 0; - int psx_taken_BFC18950 = 0; - int psx_delay_BFC18958 = 0; - int psx_taken_BFC18958 = 0; - int psx_delay_BFC18960 = 0; - int psx_delay_BFC18988 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC18900u: goto label_BFC18900; - case 0xBFC1891Cu: goto label_BFC1891C; - case 0xBFC18930u: goto label_BFC18930; - case 0xBFC18940u: goto label_BFC18940; - case 0xBFC18948u: goto label_BFC18948; - case 0xBFC18958u: goto label_BFC18958; - case 0xBFC18960u: goto label_BFC18960; - case 0xBFC18968u: goto label_BFC18968; - case 0xBFC18974u: goto label_BFC18974; - case 0xBFC18978u: goto label_BFC18978; - default: break; - } - } -label_BFC188F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC188F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC188F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800308F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC188F0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800308F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC188F4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308F4u); return; } g_debug_last_store_pc = 0x800308F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800308F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC188F8: 0C00C264 jal 0xB0030990 */ - cpu->gpr[31] = 0x80030900u; /* jal link before delay slot */ - psx_delay_BFC188F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC188FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800308FCu); -#endif - if (psx_delay_BFC188F8) { - psx_delay_BFC188F8 = 0; - cpu->gpr[31] = 0x80030900u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030990u); - cpu->pc = 0x80030990u; return; - } -label_BFC18900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC18900: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18904: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030904u); -#endif - /* 0xBFC18908: 8C849E1C lw $a0, -25060($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030908u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E1Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030908u); -#endif - /* 0xBFC1890C: 8C63AE20 lw $v1, -20960($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -20960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003090Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63AE20u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003090Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18910: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC18914: 14830010 bne $a0, $v1, 0xBFC18958 */ - uint32_t psx_brA_BFC18914 = cpu->gpr[4]; uint32_t psx_brB_BFC18914 = cpu->gpr[3]; - psx_taken_BFC18914 = (psx_brA_BFC18914 != psx_brB_BFC18914); - psx_delay_BFC18914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18918: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030918u); -#endif - if (psx_delay_BFC18914) { - psx_delay_BFC18914 = 0; - if (psx_taken_BFC18914) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030958u); - goto label_BFC18958; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003091Cu); - } -label_BFC1891C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1891Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1891Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1891C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030920u); -#endif - /* 0xBFC18920: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030920u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18924: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC18928: 11C10012 beq $t6, $at, 0xBFC18974 */ - uint32_t psx_brA_BFC18928 = cpu->gpr[14]; uint32_t psx_brB_BFC18928 = cpu->gpr[1]; - psx_taken_BFC18928 = (psx_brA_BFC18928 == psx_brB_BFC18928); - psx_delay_BFC18928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1892C: 3C015000 lui $at, 0x5000 */ - cpu->gpr[1] = 0x50000000u; - PGXP_ALU(0x3C015000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003092Cu); -#endif - if (psx_delay_BFC18928) { - psx_delay_BFC18928 = 0; - if (psx_taken_BFC18928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030974u); - goto label_BFC18974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030930u); - } -label_BFC18930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18930: 34215000 ori $at, $at, 0x5000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x5000u; - PGXP_ALU(0x34215000u, cpu->gpr[1], _pgx1, 0x5000u); } -#ifdef PSX_COSIM - cosim_instr(0x80030930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC18934: 00817824 and $t7, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18938: 15E0000F bne $t7, $zero, 0xBFC18978 */ - uint32_t psx_brA_BFC18938 = cpu->gpr[15]; uint32_t psx_brB_BFC18938 = cpu->gpr[0]; - psx_taken_BFC18938 = (psx_brA_BFC18938 != psx_brB_BFC18938); - psx_delay_BFC18938 = 1; - /* 0xBFC1893C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003093Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003093Cu); -#endif - if (psx_delay_BFC18938) { - psx_delay_BFC18938 = 0; - if (psx_taken_BFC18938) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030978u); - goto label_BFC18978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030940u); - } -label_BFC18940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18940: 0C0119AE jal 0xB00466B8 */ - cpu->gpr[31] = 0x80030948u; /* jal link before delay slot */ - psx_delay_BFC18940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18944: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030944u); -#endif - if (psx_delay_BFC18940) { - psx_delay_BFC18940 = 0; - cpu->gpr[31] = 0x80030948u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800466B8u); - cpu->pc = 0x800466B8u; return; - } -label_BFC18948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18948: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030948u); -#endif - /* 0xBFC1894C: 8C849E1C lw $a0, -25060($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003094Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E1Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18950: 10000009 beq $zero, $zero, 0xBFC18978 */ - uint32_t psx_brA_BFC18950 = cpu->gpr[0]; uint32_t psx_brB_BFC18950 = cpu->gpr[0]; - psx_taken_BFC18950 = (psx_brA_BFC18950 == psx_brB_BFC18950); - psx_delay_BFC18950 = 1; - /* 0xBFC18954: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030954u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030954u); -#endif - if (psx_delay_BFC18950) { - psx_delay_BFC18950 = 0; - if (psx_taken_BFC18950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030978u); - goto label_BFC18978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030958u); - } -label_BFC18958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC18958: 14600007 bne $v1, $zero, 0xBFC18978 */ - uint32_t psx_brA_BFC18958 = cpu->gpr[3]; uint32_t psx_brB_BFC18958 = cpu->gpr[0]; - psx_taken_BFC18958 = (psx_brA_BFC18958 != psx_brB_BFC18958); - psx_delay_BFC18958 = 1; - /* 0xBFC1895C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003095Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003095Cu); -#endif - if (psx_delay_BFC18958) { - psx_delay_BFC18958 = 0; - if (psx_taken_BFC18958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030978u); - goto label_BFC18978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030960u); - } -label_BFC18960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18960: 0C0119AE jal 0xB00466B8 */ - cpu->gpr[31] = 0x80030968u; /* jal link before delay slot */ - psx_delay_BFC18960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030964u); -#endif - if (psx_delay_BFC18960) { - psx_delay_BFC18960 = 0; - cpu->gpr[31] = 0x80030968u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800466B8u); - cpu->pc = 0x800466B8u; return; - } -label_BFC18968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18968: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030968u); -#endif - /* 0xBFC1896C: 8C849E1C lw $a0, -25060($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003096Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E1Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003096Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030970u); -#endif -label_BFC18974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030974u); -#endif - /* 0xBFC18974: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030974u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030974u); -#endif -label_BFC18978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC18978: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1897C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC18980: AC23AE20 sw $v1, -20960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030980u); return; } g_debug_last_store_pc = 0x80030980u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23AE20u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80030980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18984: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80030984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC18988: 03E00008 jr $ra */ - psx_delay_BFC18988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1898C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003098Cu); -#endif - if (psx_delay_BFC18988) { - psx_delay_BFC18988 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18990u); - int psx_delay_BFC1899C = 0; - int psx_taken_BFC1899C = 0; - int psx_delay_BFC189A8 = 0; - int psx_taken_BFC189A8 = 0; - int psx_delay_BFC189C8 = 0; - int psx_taken_BFC189C8 = 0; - int psx_delay_BFC189DC = 0; - int psx_taken_BFC189DC = 0; - int psx_delay_BFC189F0 = 0; - int psx_taken_BFC189F0 = 0; - int psx_delay_BFC189F8 = 0; - int psx_taken_BFC189F8 = 0; - int psx_delay_BFC18A0C = 0; - int psx_delay_BFC18A20 = 0; - int psx_taken_BFC18A20 = 0; - int psx_delay_BFC18A34 = 0; - int psx_taken_BFC18A34 = 0; - int psx_delay_BFC18A3C = 0; - int psx_delay_BFC18A54 = 0; - int psx_taken_BFC18A54 = 0; - int psx_delay_BFC18A68 = 0; - int psx_taken_BFC18A68 = 0; - int psx_delay_BFC18A74 = 0; - int psx_delay_BFC18A88 = 0; - int psx_taken_BFC18A88 = 0; - int psx_delay_BFC18A9C = 0; - int psx_taken_BFC18A9C = 0; - int psx_delay_BFC18AB0 = 0; - int psx_taken_BFC18AB0 = 0; - int psx_delay_BFC18AB8 = 0; - int psx_delay_BFC18AC0 = 0; - int psx_taken_BFC18AC0 = 0; - int psx_delay_BFC18AD4 = 0; - int psx_taken_BFC18AD4 = 0; - int psx_delay_BFC18AE8 = 0; - int psx_taken_BFC18AE8 = 0; - int psx_delay_BFC18AFC = 0; - int psx_taken_BFC18AFC = 0; - int psx_delay_BFC18B04 = 0; - int psx_delay_BFC18B0C = 0; - int psx_delay_BFC18B14 = 0; - int psx_taken_BFC18B14 = 0; - int psx_delay_BFC18B28 = 0; - int psx_taken_BFC18B28 = 0; - int psx_delay_BFC18B30 = 0; - int psx_delay_BFC18B38 = 0; - int psx_delay_BFC18B40 = 0; - int psx_delay_BFC18B48 = 0; - int psx_taken_BFC18B48 = 0; - int psx_delay_BFC18B50 = 0; - int psx_delay_BFC18B74 = 0; - int psx_delay_BFC18B7C = 0; - int psx_delay_BFC18B84 = 0; - int psx_delay_BFC18B8C = 0; - int psx_delay_BFC18B9C = 0; - int psx_taken_BFC18B9C = 0; - int psx_delay_BFC18BB0 = 0; - int psx_taken_BFC18BB0 = 0; - int psx_delay_BFC18BC4 = 0; - int psx_taken_BFC18BC4 = 0; - int psx_delay_BFC18BD4 = 0; - int psx_taken_BFC18BD4 = 0; - int psx_delay_BFC18BE8 = 0; - int psx_taken_BFC18BE8 = 0; - int psx_delay_BFC18BFC = 0; - int psx_taken_BFC18BFC = 0; - int psx_delay_BFC18C04 = 0; - int psx_delay_BFC18C0C = 0; - int psx_taken_BFC18C0C = 0; - int psx_delay_BFC18C24 = 0; - int psx_delay_BFC18C34 = 0; - int psx_taken_BFC18C34 = 0; - int psx_delay_BFC18C48 = 0; - int psx_taken_BFC18C48 = 0; - int psx_delay_BFC18C50 = 0; - int psx_delay_BFC18C58 = 0; - int psx_taken_BFC18C58 = 0; - int psx_delay_BFC18C64 = 0; - int psx_delay_BFC18C74 = 0; - int psx_taken_BFC18C74 = 0; - int psx_delay_BFC18C88 = 0; - int psx_taken_BFC18C88 = 0; - int psx_delay_BFC18C9C = 0; - int psx_taken_BFC18C9C = 0; - int psx_delay_BFC18CB0 = 0; - int psx_taken_BFC18CB0 = 0; - int psx_delay_BFC18CC4 = 0; - int psx_taken_BFC18CC4 = 0; - int psx_delay_BFC18CD8 = 0; - int psx_taken_BFC18CD8 = 0; - int psx_delay_BFC18CEC = 0; - int psx_taken_BFC18CEC = 0; - int psx_delay_BFC18D08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC189A4u: goto label_BFC189A4; - case 0xBFC189B0u: goto label_BFC189B0; - case 0xBFC189D0u: goto label_BFC189D0; - case 0xBFC189E4u: goto label_BFC189E4; - case 0xBFC189F8u: goto label_BFC189F8; - case 0xBFC18A00u: goto label_BFC18A00; - case 0xBFC18A14u: goto label_BFC18A14; - case 0xBFC18A28u: goto label_BFC18A28; - case 0xBFC18A3Cu: goto label_BFC18A3C; - case 0xBFC18A44u: goto label_BFC18A44; - case 0xBFC18A5Cu: goto label_BFC18A5C; - case 0xBFC18A70u: goto label_BFC18A70; - case 0xBFC18A7Cu: goto label_BFC18A7C; - case 0xBFC18A90u: goto label_BFC18A90; - case 0xBFC18AA4u: goto label_BFC18AA4; - case 0xBFC18AB8u: goto label_BFC18AB8; - case 0xBFC18AC0u: goto label_BFC18AC0; - case 0xBFC18AC8u: goto label_BFC18AC8; - case 0xBFC18ADCu: goto label_BFC18ADC; - case 0xBFC18AF0u: goto label_BFC18AF0; - case 0xBFC18B04u: goto label_BFC18B04; - case 0xBFC18B0Cu: goto label_BFC18B0C; - case 0xBFC18B14u: goto label_BFC18B14; - case 0xBFC18B1Cu: goto label_BFC18B1C; - case 0xBFC18B30u: goto label_BFC18B30; - case 0xBFC18B38u: goto label_BFC18B38; - case 0xBFC18B40u: goto label_BFC18B40; - case 0xBFC18B48u: goto label_BFC18B48; - case 0xBFC18B50u: goto label_BFC18B50; - case 0xBFC18B58u: goto label_BFC18B58; - case 0xBFC18B7Cu: goto label_BFC18B7C; - case 0xBFC18B84u: goto label_BFC18B84; - case 0xBFC18B8Cu: goto label_BFC18B8C; - case 0xBFC18B94u: goto label_BFC18B94; - case 0xBFC18BA4u: goto label_BFC18BA4; - case 0xBFC18BB8u: goto label_BFC18BB8; - case 0xBFC18BCCu: goto label_BFC18BCC; - case 0xBFC18BDCu: goto label_BFC18BDC; - case 0xBFC18BF0u: goto label_BFC18BF0; - case 0xBFC18C04u: goto label_BFC18C04; - case 0xBFC18C0Cu: goto label_BFC18C0C; - case 0xBFC18C14u: goto label_BFC18C14; - case 0xBFC18C2Cu: goto label_BFC18C2C; - case 0xBFC18C3Cu: goto label_BFC18C3C; - case 0xBFC18C50u: goto label_BFC18C50; - case 0xBFC18C58u: goto label_BFC18C58; - case 0xBFC18C60u: goto label_BFC18C60; - case 0xBFC18C6Cu: goto label_BFC18C6C; - case 0xBFC18C7Cu: goto label_BFC18C7C; - case 0xBFC18C90u: goto label_BFC18C90; - case 0xBFC18CA4u: goto label_BFC18CA4; - case 0xBFC18CB8u: goto label_BFC18CB8; - case 0xBFC18CCCu: goto label_BFC18CCC; - case 0xBFC18CE0u: goto label_BFC18CE0; - case 0xBFC18CF4u: goto label_BFC18CF4; - case 0xBFC18D00u: goto label_BFC18D00; - case 0xBFC18D04u: goto label_BFC18D04; - default: break; - } - } -label_BFC18990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18990: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030990u); -#endif - /* 0xBFC18994: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030994u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18998: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80030998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1899C: 11C00004 beq $t6, $zero, 0xBFC189B0 */ - uint32_t psx_brA_BFC1899C = cpu->gpr[14]; uint32_t psx_brB_BFC1899C = cpu->gpr[0]; - psx_taken_BFC1899C = (psx_brA_BFC1899C == psx_brB_BFC1899C); - psx_delay_BFC1899C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC189A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309A0u); return; } g_debug_last_store_pc = 0x800309A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800309A0u); -#endif - if (psx_delay_BFC1899C) { - psx_delay_BFC1899C = 0; - if (psx_taken_BFC1899C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309B0u); - goto label_BFC189B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309A4u); - } -label_BFC189A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC189A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC189A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC189A4: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800309A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC189A8: 15C100B4 bne $t6, $at, 0xBFC18C7C */ - uint32_t psx_brA_BFC189A8 = cpu->gpr[14]; uint32_t psx_brB_BFC189A8 = cpu->gpr[1]; - psx_taken_BFC189A8 = (psx_brA_BFC189A8 != psx_brB_BFC189A8); - psx_delay_BFC189A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC189AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800309ACu); -#endif - if (psx_delay_BFC189A8) { - psx_delay_BFC189A8 = 0; - if (psx_taken_BFC189A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309B0u); - } -label_BFC189B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC189B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC189B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC189B0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800309B0u); -#endif - /* 0xBFC189B4: 8C639E34 lw $v1, -25036($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25036; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25036)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E34u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800309B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC189B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800309B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC189BC: 2862003D slti $v0, $v1, 61 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (61) ? 1 : 0); - PGXP_ALU(0x2862003Du, cpu->gpr[2], _pgx1, 0x003Du); } -#ifdef PSX_COSIM - cosim_instr(0x800309BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC189C0: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800309C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC189C4: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800309C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC189C8: 104000AC beq $v0, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC189C8 = cpu->gpr[2]; uint32_t psx_brB_BFC189C8 = cpu->gpr[0]; - psx_taken_BFC189C8 = (psx_brA_BFC189C8 == psx_brB_BFC189C8); - psx_delay_BFC189C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC189CC: AC239E34 sw $v1, -25036($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25036; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25036)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309CCu); return; } g_debug_last_store_pc = 0x800309CCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E34u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800309CCu); -#endif - if (psx_delay_BFC189C8) { - psx_delay_BFC189C8 = 0; - if (psx_taken_BFC189C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309D0u); - } -label_BFC189D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC189D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC189D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC189D0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800309D0u); -#endif - /* 0xBFC189D4: 8DEF9E2C lw $t7, -25044($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309D4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800309D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC189D8: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800309D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC189DC: 15E10008 bne $t7, $at, 0xBFC18A00 */ - uint32_t psx_brA_BFC189DC = cpu->gpr[15]; uint32_t psx_brB_BFC189DC = cpu->gpr[1]; - psx_taken_BFC189DC = (psx_brA_BFC189DC != psx_brB_BFC189DC); - psx_delay_BFC189DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC189E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800309E0u); -#endif - if (psx_delay_BFC189DC) { - psx_delay_BFC189DC = 0; - if (psx_taken_BFC189DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A00u); - goto label_BFC18A00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309E4u); - } -label_BFC189E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC189E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC189E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC189E4: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800309E4u); -#endif - /* 0xBFC189E8: 8F186948 lw $t8, 26952($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309E8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800309E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC189EC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800309ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC189F0: 13010003 beq $t8, $at, 0xBFC18A00 */ - uint32_t psx_brA_BFC189F0 = cpu->gpr[24]; uint32_t psx_brB_BFC189F0 = cpu->gpr[1]; - psx_taken_BFC189F0 = (psx_brA_BFC189F0 == psx_brB_BFC189F0); - psx_delay_BFC189F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC189F4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800309F4u); -#endif - if (psx_delay_BFC189F0) { - psx_delay_BFC189F0 = 0; - if (psx_taken_BFC189F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A00u); - goto label_BFC18A00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800309F8u); - } -label_BFC189F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC189F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC189F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800309F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC189F8: 100000C1 beq $zero, $zero, 0xBFC18D00 */ - uint32_t psx_brA_BFC189F8 = cpu->gpr[0]; uint32_t psx_brB_BFC189F8 = cpu->gpr[0]; - psx_taken_BFC189F8 = (psx_brA_BFC189F8 == psx_brB_BFC189F8); - psx_delay_BFC189F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC189FC: AC20AED4 sw $zero, -20780($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20780; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20780)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309FCu); return; } g_debug_last_store_pc = 0x800309FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20AED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800309FCu); -#endif - if (psx_delay_BFC189F8) { - psx_delay_BFC189F8 = 0; - if (psx_taken_BFC189F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D00u); - goto label_BFC18D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A00u); - } -label_BFC18A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC18A00: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18A04: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC18A08: AC239E34 sw $v1, -25036($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25036; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25036)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A08u); return; } g_debug_last_store_pc = 0x80030A08u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E34u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18A0C: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030A14u; /* jal link before delay slot */ - psx_delay_BFC18A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18A10: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030A10u); -#endif - if (psx_delay_BFC18A0C) { - psx_delay_BFC18A0C = 0; - cpu->gpr[31] = 0x80030A14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC18A14: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A14u); -#endif - /* 0xBFC18A18: 8F399DF8 lw $t9, -25096($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A18u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC18A20: 1320000E beq $t9, $zero, 0xBFC18A5C */ - uint32_t psx_brA_BFC18A20 = cpu->gpr[25]; uint32_t psx_brB_BFC18A20 = cpu->gpr[0]; - psx_taken_BFC18A20 = (psx_brA_BFC18A20 == psx_brB_BFC18A20); - psx_delay_BFC18A20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A24u); -#endif - if (psx_delay_BFC18A20) { - psx_delay_BFC18A20 = 0; - if (psx_taken_BFC18A20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A5Cu); - goto label_BFC18A5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A28u); - } -label_BFC18A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18A28: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A28u); -#endif - /* 0xBFC18A2C: 8D08AED4 lw $t0, -20780($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -20780; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-20780)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A2Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08AED4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18A34: 15000009 bne $t0, $zero, 0xBFC18A5C */ - uint32_t psx_brA_BFC18A34 = cpu->gpr[8]; uint32_t psx_brB_BFC18A34 = cpu->gpr[0]; - psx_taken_BFC18A34 = (psx_brA_BFC18A34 != psx_brB_BFC18A34); - psx_delay_BFC18A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A38u); -#endif - if (psx_delay_BFC18A34) { - psx_delay_BFC18A34 = 0; - if (psx_taken_BFC18A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A5Cu); - goto label_BFC18A5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A3Cu); - } -label_BFC18A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18A3C: 0C00D2BC jal 0xB0034AF0 */ - cpu->gpr[31] = 0x80030A44u; /* jal link before delay slot */ - psx_delay_BFC18A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A40u); -#endif - if (psx_delay_BFC18A3C) { - psx_delay_BFC18A3C = 0; - cpu->gpr[31] = 0x80030A44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AF0u); - cpu->pc = 0x80034AF0u; return; - } -label_BFC18A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18A44: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18A48: AC209E38 sw $zero, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A48u); return; } g_debug_last_store_pc = 0x80030A48u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E38u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18A4C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18A50: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A54: 10000009 beq $zero, $zero, 0xBFC18A7C */ - uint32_t psx_brA_BFC18A54 = cpu->gpr[0]; uint32_t psx_brB_BFC18A54 = cpu->gpr[0]; - psx_taken_BFC18A54 = (psx_brA_BFC18A54 == psx_brB_BFC18A54); - psx_delay_BFC18A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC18A58: AC29AED4 sw $t1, -20780($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20780; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20780)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A58u); return; } g_debug_last_store_pc = 0x80030A58u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29AED4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A58u); -#endif - if (psx_delay_BFC18A54) { - psx_delay_BFC18A54 = 0; - if (psx_taken_BFC18A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A7Cu); - goto label_BFC18A7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A5Cu); - } -label_BFC18A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18A5C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A60u); -#endif - /* 0xBFC18A60: 8D4A9DF4 lw $t2, -25100($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A60u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DF4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18A68: 11400004 beq $t2, $zero, 0xBFC18A7C */ - uint32_t psx_brA_BFC18A68 = cpu->gpr[10]; uint32_t psx_brB_BFC18A68 = cpu->gpr[0]; - psx_taken_BFC18A68 = (psx_brA_BFC18A68 == psx_brB_BFC18A68); - psx_delay_BFC18A68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18A6C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A6Cu); -#endif - if (psx_delay_BFC18A68) { - psx_delay_BFC18A68 = 0; - if (psx_taken_BFC18A68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A7Cu); - goto label_BFC18A7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A70u); - } -label_BFC18A70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18A70: AC20AED4 sw $zero, -20780($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20780; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20780)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A70u); return; } g_debug_last_store_pc = 0x80030A70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20AED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18A74: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030A7Cu; /* jal link before delay slot */ - psx_delay_BFC18A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18A78: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030A78u); -#endif - if (psx_delay_BFC18A74) { - psx_delay_BFC18A74 = 0; - cpu->gpr[31] = 0x80030A7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC18A7C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A80u); -#endif - /* 0xBFC18A80: 8D6B9DF8 lw $t3, -25096($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A80u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9DF8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18A88: 1560007C bne $t3, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18A88 = cpu->gpr[11]; uint32_t psx_brB_BFC18A88 = cpu->gpr[0]; - psx_taken_BFC18A88 = (psx_brA_BFC18A88 != psx_brB_BFC18A88); - psx_delay_BFC18A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A8Cu); -#endif - if (psx_delay_BFC18A88) { - psx_delay_BFC18A88 = 0; - if (psx_taken_BFC18A88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030A90u); - } -label_BFC18A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC18A90: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030A90u); -#endif - /* 0xBFC18A94: 8D8C9DF4 lw $t4, -25100($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A94u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9DF4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18A98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18A9C: 15800077 bne $t4, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18A9C = cpu->gpr[12]; uint32_t psx_brB_BFC18A9C = cpu->gpr[0]; - psx_taken_BFC18A9C = (psx_brA_BFC18A9C != psx_brB_BFC18A9C); - psx_delay_BFC18A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AA0u); -#endif - if (psx_delay_BFC18A9C) { - psx_delay_BFC18A9C = 0; - if (psx_taken_BFC18A9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030AA4u); - } -label_BFC18AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18AA4: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030AA4u); -#endif - /* 0xBFC18AA8: 8DAD9E38 lw $t5, -25032($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25032; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030AA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E38u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18AB0: 15A00072 bne $t5, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18AB0 = cpu->gpr[13]; uint32_t psx_brB_BFC18AB0 = cpu->gpr[0]; - psx_taken_BFC18AB0 = (psx_brA_BFC18AB0 != psx_brB_BFC18AB0); - psx_delay_BFC18AB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AB4u); -#endif - if (psx_delay_BFC18AB0) { - psx_delay_BFC18AB0 = 0; - if (psx_taken_BFC18AB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030AB8u); - } -label_BFC18AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18AB8: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030AC0u; /* jal link before delay slot */ - psx_delay_BFC18AB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18ABC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030ABCu); -#endif - if (psx_delay_BFC18AB8) { - psx_delay_BFC18AB8 = 0; - cpu->gpr[31] = 0x80030AC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18AC0: 1840006E blez $v0, 0xBFC18C7C */ - uint32_t psx_brA_BFC18AC0 = cpu->gpr[2]; - psx_taken_BFC18AC0 = ((int32_t)psx_brA_BFC18AC0 <= 0); - psx_delay_BFC18AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AC4u); -#endif - if (psx_delay_BFC18AC0) { - psx_delay_BFC18AC0 = 0; - if (psx_taken_BFC18AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030AC8u); - } -label_BFC18AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18AC8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030AC8u); -#endif - /* 0xBFC18ACC: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030ACCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18AD4: 15C00059 bne $t6, $zero, 0xBFC18C3C */ - uint32_t psx_brA_BFC18AD4 = cpu->gpr[14]; uint32_t psx_brB_BFC18AD4 = cpu->gpr[0]; - psx_taken_BFC18AD4 = (psx_brA_BFC18AD4 != psx_brB_BFC18AD4); - psx_delay_BFC18AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AD8u); -#endif - if (psx_delay_BFC18AD4) { - psx_delay_BFC18AD4 = 0; - if (psx_taken_BFC18AD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C3Cu); - goto label_BFC18C3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030ADCu); - } -label_BFC18ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC18ADC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AE0u); -#endif - /* 0xBFC18AE0: 8DEF9DFC lw $t7, -25092($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030AE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18AE8: 11E0002E beq $t7, $zero, 0xBFC18BA4 */ - uint32_t psx_brA_BFC18AE8 = cpu->gpr[15]; uint32_t psx_brB_BFC18AE8 = cpu->gpr[0]; - psx_taken_BFC18AE8 = (psx_brA_BFC18AE8 == psx_brB_BFC18AE8); - psx_delay_BFC18AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AECu); -#endif - if (psx_delay_BFC18AE8) { - psx_delay_BFC18AE8 = 0; - if (psx_taken_BFC18AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BA4u); - goto label_BFC18BA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030AF0u); - } -label_BFC18AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC18AF0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030AF0u); -#endif - /* 0xBFC18AF4: 8F189DF0 lw $t8, -25104($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030AF4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18AF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC18AFC: 13000003 beq $t8, $zero, 0xBFC18B0C */ - uint32_t psx_brA_BFC18AFC = cpu->gpr[24]; uint32_t psx_brB_BFC18AFC = cpu->gpr[0]; - psx_taken_BFC18AFC = (psx_brA_BFC18AFC == psx_brB_BFC18AFC); - psx_delay_BFC18AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B00u); -#endif - if (psx_delay_BFC18AFC) { - psx_delay_BFC18AFC = 0; - if (psx_taken_BFC18AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030B0Cu); - goto label_BFC18B0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030B04u); - } -label_BFC18B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B04: 0C015BFC jal 0xB0056FF0 */ - cpu->gpr[31] = 0x80030B0Cu; /* jal link before delay slot */ - psx_delay_BFC18B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B08u); -#endif - if (psx_delay_BFC18B04) { - psx_delay_BFC18B04 = 0; - cpu->gpr[31] = 0x80030B0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FF0u); - cpu->pc = 0x80056FF0u; return; - } -label_BFC18B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B0C: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80030B14u; /* jal link before delay slot */ - psx_delay_BFC18B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B10: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030B10u); -#endif - if (psx_delay_BFC18B0C) { - psx_delay_BFC18B0C = 0; - cpu->gpr[31] = 0x80030B14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC18B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18B14: 18400059 blez $v0, 0xBFC18C7C */ - uint32_t psx_brA_BFC18B14 = cpu->gpr[2]; - psx_taken_BFC18B14 = ((int32_t)psx_brA_BFC18B14 <= 0); - psx_delay_BFC18B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B18u); -#endif - if (psx_delay_BFC18B14) { - psx_delay_BFC18B14 = 0; - if (psx_taken_BFC18B14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030B1Cu); - } -label_BFC18B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC18B1C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B20u); -#endif - /* 0xBFC18B20: 8F399DFC lw $t9, -25092($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B20u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC18B28: 13200054 beq $t9, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18B28 = cpu->gpr[25]; uint32_t psx_brB_BFC18B28 = cpu->gpr[0]; - psx_taken_BFC18B28 = (psx_brA_BFC18B28 == psx_brB_BFC18B28); - psx_delay_BFC18B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B2Cu); -#endif - if (psx_delay_BFC18B28) { - psx_delay_BFC18B28 = 0; - if (psx_taken_BFC18B28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030B30u); - } -label_BFC18B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B30: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80030B38u; /* jal link before delay slot */ - psx_delay_BFC18B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B34: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030B34u); -#endif - if (psx_delay_BFC18B30) { - psx_delay_BFC18B30 = 0; - cpu->gpr[31] = 0x80030B38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC18B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B38: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80030B40u; /* jal link before delay slot */ - psx_delay_BFC18B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B3C: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030B3Cu); -#endif - if (psx_delay_BFC18B38) { - psx_delay_BFC18B38 = 0; - cpu->gpr[31] = 0x80030B40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC18B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B40: 0C00C1A1 jal 0xB0030684 */ - cpu->gpr[31] = 0x80030B48u; /* jal link before delay slot */ - psx_delay_BFC18B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B44: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030B44u); -#endif - if (psx_delay_BFC18B40) { - psx_delay_BFC18B40 = 0; - cpu->gpr[31] = 0x80030B48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030684u); - cpu->pc = 0x80030684u; return; - } -label_BFC18B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC18B48: 1840004C blez $v0, 0xBFC18C7C */ - uint32_t psx_brA_BFC18B48 = cpu->gpr[2]; - psx_taken_BFC18B48 = ((int32_t)psx_brA_BFC18B48 <= 0); - psx_delay_BFC18B48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B4Cu); -#endif - if (psx_delay_BFC18B48) { - psx_delay_BFC18B48 = 0; - if (psx_taken_BFC18B48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030B50u); - } -label_BFC18B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B50: 0C01680F jal 0xB005A03C */ - cpu->gpr[31] = 0x80030B58u; /* jal link before delay slot */ - psx_delay_BFC18B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B54u); -#endif - if (psx_delay_BFC18B50) { - psx_delay_BFC18B50 = 0; - cpu->gpr[31] = 0x80030B58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A03Cu); - cpu->pc = 0x8005A03Cu; return; - } -label_BFC18B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18B58: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18B5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC18B60: AC289E38 sw $t0, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B60u); return; } g_debug_last_store_pc = 0x80030B60u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E38u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18B64: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18B68: AC209DF8 sw $zero, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B68u); return; } g_debug_last_store_pc = 0x80030B68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18B6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18B70: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B70u); return; } g_debug_last_store_pc = 0x80030B70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B74: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80030B7Cu; /* jal link before delay slot */ - psx_delay_BFC18B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B78: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030B78u); -#endif - if (psx_delay_BFC18B74) { - psx_delay_BFC18B74 = 0; - cpu->gpr[31] = 0x80030B7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC18B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B7C: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80030B84u; /* jal link before delay slot */ - psx_delay_BFC18B7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18B80: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030B80u); -#endif - if (psx_delay_BFC18B7C) { - psx_delay_BFC18B7C = 0; - cpu->gpr[31] = 0x80030B84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC18B84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B84: 0C00D831 jal 0xB00360C4 */ - cpu->gpr[31] = 0x80030B8Cu; /* jal link before delay slot */ - psx_delay_BFC18B84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B88u); -#endif - if (psx_delay_BFC18B84) { - psx_delay_BFC18B84 = 0; - cpu->gpr[31] = 0x80030B8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360C4u); - cpu->pc = 0x800360C4u; return; - } -label_BFC18B8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18B8C: 0C00F556 jal 0xB003D558 */ - cpu->gpr[31] = 0x80030B94u; /* jal link before delay slot */ - psx_delay_BFC18B8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030B90u); -#endif - if (psx_delay_BFC18B8C) { - psx_delay_BFC18B8C = 0; - cpu->gpr[31] = 0x80030B94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D558u); - cpu->pc = 0x8003D558u; return; - } -label_BFC18B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18B94: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18B98: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18B9C: 10000058 beq $zero, $zero, 0xBFC18D00 */ - uint32_t psx_brA_BFC18B9C = cpu->gpr[0]; uint32_t psx_brB_BFC18B9C = cpu->gpr[0]; - psx_taken_BFC18B9C = (psx_brA_BFC18B9C == psx_brB_BFC18B9C); - psx_delay_BFC18B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC18BA0: AC299E28 sw $t1, -25048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BA0u); return; } g_debug_last_store_pc = 0x80030BA0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E28u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BA0u); -#endif - if (psx_delay_BFC18B9C) { - psx_delay_BFC18B9C = 0; - if (psx_taken_BFC18B9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D00u); - goto label_BFC18D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BA4u); - } -label_BFC18BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18BA4: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030BA4u); -#endif - /* 0xBFC18BA8: 8D4A9DFC lw $t2, -25092($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BA8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DFCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18BB0: 1540000A bne $t2, $zero, 0xBFC18BDC */ - uint32_t psx_brA_BFC18BB0 = cpu->gpr[10]; uint32_t psx_brB_BFC18BB0 = cpu->gpr[0]; - psx_taken_BFC18BB0 = (psx_brA_BFC18BB0 != psx_brB_BFC18BB0); - psx_delay_BFC18BB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BB4u); -#endif - if (psx_delay_BFC18BB0) { - psx_delay_BFC18BB0 = 0; - if (psx_taken_BFC18BB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BDCu); - goto label_BFC18BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BB8u); - } -label_BFC18BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC18BB8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030BB8u); -#endif - /* 0xBFC18BBC: 8D6B9E00 lw $t3, -25088($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BBCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E00u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18BC4: 15600005 bne $t3, $zero, 0xBFC18BDC */ - uint32_t psx_brA_BFC18BC4 = cpu->gpr[11]; uint32_t psx_brB_BFC18BC4 = cpu->gpr[0]; - psx_taken_BFC18BC4 = (psx_brA_BFC18BC4 != psx_brB_BFC18BC4); - psx_delay_BFC18BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BC8u); -#endif - if (psx_delay_BFC18BC4) { - psx_delay_BFC18BC4 = 0; - if (psx_taken_BFC18BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BDCu); - goto label_BFC18BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BCCu); - } -label_BFC18BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18BCC: 240C0004 addiu $t4, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240C0004u, cpu->gpr[12], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80030BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18BD0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BD4: 1000004A beq $zero, $zero, 0xBFC18D00 */ - uint32_t psx_brA_BFC18BD4 = cpu->gpr[0]; uint32_t psx_brB_BFC18BD4 = cpu->gpr[0]; - psx_taken_BFC18BD4 = (psx_brA_BFC18BD4 == psx_brB_BFC18BD4); - psx_delay_BFC18BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC18BD8: AC2CA780 sw $t4, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BD8u); return; } g_debug_last_store_pc = 0x80030BD8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CA780u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BD8u); -#endif - if (psx_delay_BFC18BD4) { - psx_delay_BFC18BD4 = 0; - if (psx_taken_BFC18BD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D00u); - goto label_BFC18D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BDCu); - } -label_BFC18BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18BDC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BE0u); -#endif - /* 0xBFC18BE0: 8DAD9E00 lw $t5, -25088($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BE0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E00u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18BE8: 11A00024 beq $t5, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18BE8 = cpu->gpr[13]; uint32_t psx_brB_BFC18BE8 = cpu->gpr[0]; - psx_taken_BFC18BE8 = (psx_brA_BFC18BE8 == psx_brB_BFC18BE8); - psx_delay_BFC18BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BECu); -#endif - if (psx_delay_BFC18BE8) { - psx_delay_BFC18BE8 = 0; - if (psx_taken_BFC18BE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030BF0u); - } -label_BFC18BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18BF0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030BF0u); -#endif - /* 0xBFC18BF4: 8DCE9E18 lw $t6, -25064($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25064; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030BF4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E18u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18BF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18BFC: 15C0001F bne $t6, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18BFC = cpu->gpr[14]; uint32_t psx_brB_BFC18BFC = cpu->gpr[0]; - psx_taken_BFC18BFC = (psx_brA_BFC18BFC != psx_brB_BFC18BFC); - psx_delay_BFC18BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C00u); -#endif - if (psx_delay_BFC18BFC) { - psx_delay_BFC18BFC = 0; - if (psx_taken_BFC18BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C04u); - } -label_BFC18C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18C04: 0C00DDDE jal 0xB0037778 */ - cpu->gpr[31] = 0x80030C0Cu; /* jal link before delay slot */ - psx_delay_BFC18C04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C08u); -#endif - if (psx_delay_BFC18C04) { - psx_delay_BFC18C04 = 0; - cpu->gpr[31] = 0x80030C0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037778u); - cpu->pc = 0x80037778u; return; - } -label_BFC18C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18C0C: 1040001B beq $v0, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18C0C = cpu->gpr[2]; uint32_t psx_brB_BFC18C0C = cpu->gpr[0]; - psx_taken_BFC18C0C = (psx_brA_BFC18C0C == psx_brB_BFC18C0C); - psx_delay_BFC18C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18C10: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C10u); -#endif - if (psx_delay_BFC18C0C) { - psx_delay_BFC18C0C = 0; - if (psx_taken_BFC18C0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C14u); - } -label_BFC18C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18C14: AC209E04 sw $zero, -25084($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25084; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C14u); return; } g_debug_last_store_pc = 0x80030C14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E04u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18C18: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18C1C: 240F0003 addiu $t7, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240F0003u, cpu->gpr[15], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC18C20: AC2FA780 sw $t7, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C20u); return; } g_debug_last_store_pc = 0x80030C20u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FA780u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18C24: 0C00CF4F jal 0xB0033D3C */ - cpu->gpr[31] = 0x80030C2Cu; /* jal link before delay slot */ - psx_delay_BFC18C24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18C28: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030C28u); -#endif - if (psx_delay_BFC18C24) { - psx_delay_BFC18C24 = 0; - cpu->gpr[31] = 0x80030C2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D3Cu); - cpu->pc = 0x80033D3Cu; return; - } -label_BFC18C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC18C2C: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18C30: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C34: 10000032 beq $zero, $zero, 0xBFC18D00 */ - uint32_t psx_brA_BFC18C34 = cpu->gpr[0]; uint32_t psx_brB_BFC18C34 = cpu->gpr[0]; - psx_taken_BFC18C34 = (psx_brA_BFC18C34 == psx_brB_BFC18C34); - psx_delay_BFC18C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC18C38: AC389E30 sw $t8, -25040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25040; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C38u); return; } g_debug_last_store_pc = 0x80030C38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E30u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C38u); -#endif - if (psx_delay_BFC18C34) { - psx_delay_BFC18C34 = 0; - if (psx_taken_BFC18C34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D00u); - goto label_BFC18D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C3Cu); - } -label_BFC18C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC18C3C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C40u); -#endif - /* 0xBFC18C40: 8F399E2C lw $t9, -25044($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C40u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18C44: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC18C48: 1721000C bne $t9, $at, 0xBFC18C7C */ - uint32_t psx_brA_BFC18C48 = cpu->gpr[25]; uint32_t psx_brB_BFC18C48 = cpu->gpr[1]; - psx_taken_BFC18C48 = (psx_brA_BFC18C48 != psx_brB_BFC18C48); - psx_delay_BFC18C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C4Cu); -#endif - if (psx_delay_BFC18C48) { - psx_delay_BFC18C48 = 0; - if (psx_taken_BFC18C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C50u); - } -label_BFC18C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18C50: 0C00DDDE jal 0xB0037778 */ - cpu->gpr[31] = 0x80030C58u; /* jal link before delay slot */ - psx_delay_BFC18C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C54u); -#endif - if (psx_delay_BFC18C50) { - psx_delay_BFC18C50 = 0; - cpu->gpr[31] = 0x80030C58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037778u); - cpu->pc = 0x80037778u; return; - } -label_BFC18C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18C58: 10400008 beq $v0, $zero, 0xBFC18C7C */ - uint32_t psx_brA_BFC18C58 = cpu->gpr[2]; uint32_t psx_brB_BFC18C58 = cpu->gpr[0]; - psx_taken_BFC18C58 = (psx_brA_BFC18C58 == psx_brB_BFC18C58); - psx_delay_BFC18C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18C5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C5Cu); -#endif - if (psx_delay_BFC18C58) { - psx_delay_BFC18C58 = 0; - if (psx_taken_BFC18C58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - goto label_BFC18C7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C60u); - } -label_BFC18C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC18C60: AC209E04 sw $zero, -25084($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25084; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C60u); return; } g_debug_last_store_pc = 0x80030C60u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E04u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18C64: 0C00CF4F jal 0xB0033D3C */ - cpu->gpr[31] = 0x80030C6Cu; /* jal link before delay slot */ - psx_delay_BFC18C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18C68: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030C68u); -#endif - if (psx_delay_BFC18C64) { - psx_delay_BFC18C64 = 0; - cpu->gpr[31] = 0x80030C6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D3Cu); - cpu->pc = 0x80033D3Cu; return; - } -label_BFC18C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18C6C: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18C70: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C74: 10000022 beq $zero, $zero, 0xBFC18D00 */ - uint32_t psx_brA_BFC18C74 = cpu->gpr[0]; uint32_t psx_brB_BFC18C74 = cpu->gpr[0]; - psx_taken_BFC18C74 = (psx_brA_BFC18C74 == psx_brB_BFC18C74); - psx_delay_BFC18C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC18C78: AC289E30 sw $t0, -25040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25040; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C78u); return; } g_debug_last_store_pc = 0x80030C78u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E30u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C78u); -#endif - if (psx_delay_BFC18C74) { - psx_delay_BFC18C74 = 0; - if (psx_taken_BFC18C74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D00u); - goto label_BFC18D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C7Cu); - } -label_BFC18C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC18C7C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C80u); -#endif - /* 0xBFC18C80: 8D299E2C lw $t1, -25044($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C80u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E2Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18C88: 1520001E bne $t1, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18C88 = cpu->gpr[9]; uint32_t psx_brB_BFC18C88 = cpu->gpr[0]; - psx_taken_BFC18C88 = (psx_brA_BFC18C88 != psx_brB_BFC18C88); - psx_delay_BFC18C88 = 1; - /* 0xBFC18C8C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C8Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C8Cu); -#endif - if (psx_delay_BFC18C88) { - psx_delay_BFC18C88 = 0; - if (psx_taken_BFC18C88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030C90u); - } -label_BFC18C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18C90: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030C90u); -#endif - /* 0xBFC18C94: 8D4A9DFC lw $t2, -25092($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25092; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C94u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DFCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18C9C: 15400019 bne $t2, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18C9C = cpu->gpr[10]; uint32_t psx_brB_BFC18C9C = cpu->gpr[0]; - psx_taken_BFC18C9C = (psx_brA_BFC18C9C != psx_brB_BFC18C9C); - psx_delay_BFC18C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CA0u); -#endif - /* 0xBFC18CA0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CA0u); -#endif - if (psx_delay_BFC18C9C) { - psx_delay_BFC18C9C = 0; - if (psx_taken_BFC18C9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030CA4u); - } -label_BFC18CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC18CA4: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030CA4u); -#endif - /* 0xBFC18CA8: 8D6B9E00 lw $t3, -25088($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CA8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E00u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18CB0: 15600014 bne $t3, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18CB0 = cpu->gpr[11]; uint32_t psx_brB_BFC18CB0 = cpu->gpr[0]; - psx_taken_BFC18CB0 = (psx_brA_BFC18CB0 != psx_brB_BFC18CB0); - psx_delay_BFC18CB0 = 1; - /* 0xBFC18CB4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CB4u); -#endif - if (psx_delay_BFC18CB0) { - psx_delay_BFC18CB0 = 0; - if (psx_taken_BFC18CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030CB8u); - } -label_BFC18CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC18CB8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030CB8u); -#endif - /* 0xBFC18CBC: 8D8C9DF8 lw $t4, -25096($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CBCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9DF8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18CC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18CC4: 1580000F bne $t4, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18CC4 = cpu->gpr[12]; uint32_t psx_brB_BFC18CC4 = cpu->gpr[0]; - psx_taken_BFC18CC4 = (psx_brA_BFC18CC4 != psx_brB_BFC18CC4); - psx_delay_BFC18CC4 = 1; - /* 0xBFC18CC8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CC8u); -#endif - if (psx_delay_BFC18CC4) { - psx_delay_BFC18CC4 = 0; - if (psx_taken_BFC18CC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030CCCu); - } -label_BFC18CCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC18CCC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CD0u); -#endif - /* 0xBFC18CD0: 8DAD9DF4 lw $t5, -25100($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CD0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9DF4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18CD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18CD8: 15A0000A bne $t5, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18CD8 = cpu->gpr[13]; uint32_t psx_brB_BFC18CD8 = cpu->gpr[0]; - psx_taken_BFC18CD8 = (psx_brA_BFC18CD8 != psx_brB_BFC18CD8); - psx_delay_BFC18CD8 = 1; - /* 0xBFC18CDC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CDCu); -#endif - if (psx_delay_BFC18CD8) { - psx_delay_BFC18CD8 = 0; - if (psx_taken_BFC18CD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030CE0u); - } -label_BFC18CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18CE0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030CE0u); -#endif - /* 0xBFC18CE4: 8DCE9E18 lw $t6, -25064($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25064; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E18u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18CE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18CEC: 11C00005 beq $t6, $zero, 0xBFC18D04 */ - uint32_t psx_brA_BFC18CEC = cpu->gpr[14]; uint32_t psx_brB_BFC18CEC = cpu->gpr[0]; - psx_taken_BFC18CEC = (psx_brA_BFC18CEC == psx_brB_BFC18CEC); - psx_delay_BFC18CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CF0u); -#endif - /* 0xBFC18CF0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CF0u); -#endif - if (psx_delay_BFC18CEC) { - psx_delay_BFC18CEC = 0; - if (psx_taken_BFC18CEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030D04u); - goto label_BFC18D04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030CF4u); - } -label_BFC18CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18CF4: 240F0004 addiu $t7, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240F0004u, cpu->gpr[15], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80030CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC18CF8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC18CFC: AC2FA780 sw $t7, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CFCu); return; } g_debug_last_store_pc = 0x80030CFCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FA780u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030CFCu); -#endif -label_BFC18D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D00u); -#endif - /* 0xBFC18D00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D00u); -#endif -label_BFC18D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18D04: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC18D08: 03E00008 jr $ra */ - psx_delay_BFC18D08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18D0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030D0Cu); -#endif - if (psx_delay_BFC18D08) { - psx_delay_BFC18D08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC18D10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC18D10u); - int psx_delay_BFC18D24 = 0; - int psx_delay_BFC18D2C = 0; - int psx_delay_BFC18D3C = 0; - int psx_delay_BFC18D4C = 0; - int psx_delay_BFC18D54 = 0; - int psx_delay_BFC18D70 = 0; - int psx_delay_BFC18D90 = 0; - int psx_delay_BFC18DB0 = 0; - int psx_delay_BFC18DD0 = 0; - int psx_delay_BFC18DE4 = 0; - int psx_taken_BFC18DE4 = 0; - int psx_delay_BFC18DEC = 0; - int psx_taken_BFC18DEC = 0; - int psx_delay_BFC18E34 = 0; - int psx_delay_BFC18E40 = 0; - int psx_delay_BFC18E4C = 0; - int psx_delay_BFC18E58 = 0; - int psx_delay_BFC18E70 = 0; - int psx_delay_BFC18E88 = 0; - int psx_delay_BFC18EA0 = 0; - int psx_delay_BFC18EB8 = 0; - int psx_delay_BFC18ED0 = 0; - int psx_delay_BFC18EE8 = 0; - int psx_delay_BFC18F40 = 0; - int psx_delay_BFC18FC0 = 0; - int psx_delay_BFC19048 = 0; - int psx_delay_BFC190C8 = 0; - int psx_delay_BFC19148 = 0; - int psx_delay_BFC191C8 = 0; - int psx_delay_BFC19248 = 0; - int psx_delay_BFC19278 = 0; - int psx_delay_BFC19280 = 0; - int psx_delay_BFC1928C = 0; - int psx_delay_BFC19294 = 0; - int psx_delay_BFC1929C = 0; - int psx_delay_BFC192A8 = 0; - int psx_delay_BFC192B0 = 0; - int psx_delay_BFC192C0 = 0; - int psx_delay_BFC192CC = 0; - int psx_delay_BFC192DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC18D2Cu: goto label_BFC18D2C; - case 0xBFC18D34u: goto label_BFC18D34; - case 0xBFC18D44u: goto label_BFC18D44; - case 0xBFC18D54u: goto label_BFC18D54; - case 0xBFC18D5Cu: goto label_BFC18D5C; - case 0xBFC18D78u: goto label_BFC18D78; - case 0xBFC18D98u: goto label_BFC18D98; - case 0xBFC18DB8u: goto label_BFC18DB8; - case 0xBFC18DD8u: goto label_BFC18DD8; - case 0xBFC18DECu: goto label_BFC18DEC; - case 0xBFC18DF4u: goto label_BFC18DF4; - case 0xBFC18E20u: goto label_BFC18E20; - case 0xBFC18E3Cu: goto label_BFC18E3C; - case 0xBFC18E48u: goto label_BFC18E48; - case 0xBFC18E54u: goto label_BFC18E54; - case 0xBFC18E60u: goto label_BFC18E60; - case 0xBFC18E78u: goto label_BFC18E78; - case 0xBFC18E90u: goto label_BFC18E90; - case 0xBFC18EA8u: goto label_BFC18EA8; - case 0xBFC18EC0u: goto label_BFC18EC0; - case 0xBFC18ED8u: goto label_BFC18ED8; - case 0xBFC18EF0u: goto label_BFC18EF0; - case 0xBFC18F48u: goto label_BFC18F48; - case 0xBFC18FC8u: goto label_BFC18FC8; - case 0xBFC19050u: goto label_BFC19050; - case 0xBFC190D0u: goto label_BFC190D0; - case 0xBFC19150u: goto label_BFC19150; - case 0xBFC191D0u: goto label_BFC191D0; - case 0xBFC19250u: goto label_BFC19250; - case 0xBFC19280u: goto label_BFC19280; - case 0xBFC19288u: goto label_BFC19288; - case 0xBFC19294u: goto label_BFC19294; - case 0xBFC1929Cu: goto label_BFC1929C; - case 0xBFC192A4u: goto label_BFC192A4; - case 0xBFC192B0u: goto label_BFC192B0; - case 0xBFC192B8u: goto label_BFC192B8; - case 0xBFC192C8u: goto label_BFC192C8; - case 0xBFC192D4u: goto label_BFC192D4; - default: break; - } - } -label_BFC18D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC18D10: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC18D14: AFB00040 sw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D14u); return; } g_debug_last_store_pc = 0x80030D14u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC18D18: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC18D1C: AFBF0044 sw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D1Cu); return; } g_debug_last_store_pc = 0x80030D1Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18D20: 24040140 addiu $a0, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24040140u, cpu->gpr[4], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D24: 0C012FED jal 0xB004BFB4 */ - cpu->gpr[31] = 0x80030D2Cu; /* jal link before delay slot */ - psx_delay_BFC18D24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18D28: 240500F0 addiu $a1, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240500F0u, cpu->gpr[5], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D28u); -#endif - if (psx_delay_BFC18D24) { - psx_delay_BFC18D24 = 0; - cpu->gpr[31] = 0x80030D2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFB4u); - cpu->pc = 0x8004BFB4u; return; - } -label_BFC18D2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D2C: 0C012FF3 jal 0xB004BFCC */ - cpu->gpr[31] = 0x80030D34u; /* jal link before delay slot */ - psx_delay_BFC18D2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18D30: 24040200 addiu $a0, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24040200u, cpu->gpr[4], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D30u); -#endif - if (psx_delay_BFC18D2C) { - psx_delay_BFC18D2C = 0; - cpu->gpr[31] = 0x80030D34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFCCu); - cpu->pc = 0x8004BFCCu; return; - } -label_BFC18D34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18D34: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18D38: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D3C: 0C012FC0 jal 0xB004BF00 */ - cpu->gpr[31] = 0x80030D44u; /* jal link before delay slot */ - psx_delay_BFC18D3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18D40: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D40u); -#endif - if (psx_delay_BFC18D3C) { - psx_delay_BFC18D3C = 0; - cpu->gpr[31] = 0x80030D44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BF00u); - cpu->pc = 0x8004BF00u; return; - } -label_BFC18D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18D44: 24040080 addiu $a0, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24040080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18D48: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D4C: 0C012FC8 jal 0xB004BF20 */ - cpu->gpr[31] = 0x80030D54u; /* jal link before delay slot */ - psx_delay_BFC18D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18D50: 240600FF addiu $a2, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240600FFu, cpu->gpr[6], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030D50u); -#endif - if (psx_delay_BFC18D4C) { - psx_delay_BFC18D4C = 0; - cpu->gpr[31] = 0x80030D54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BF20u); - cpu->pc = 0x8004BF20u; return; - } -label_BFC18D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D54: 0C010FC4 jal 0xB0043F10 */ - cpu->gpr[31] = 0x80030D5Cu; /* jal link before delay slot */ - psx_delay_BFC18D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC18D58: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D58u); -#endif - if (psx_delay_BFC18D54) { - psx_delay_BFC18D54 = 0; - cpu->gpr[31] = 0x80030D5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F10u); - cpu->pc = 0x80043F10u; return; - } -label_BFC18D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18D5C: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC18D60: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D60u); return; } g_debug_last_store_pc = 0x80030D60u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC18D64: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18D68: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18D6C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D70: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80030D78u; /* jal link before delay slot */ - psx_delay_BFC18D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18D74: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D74u); -#endif - if (psx_delay_BFC18D70) { - psx_delay_BFC18D70 = 0; - cpu->gpr[31] = 0x80030D78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC18D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC18D78: 26041420 addiu $a0, $s0, 5152 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (5152)); - PGXP_ALU(0x26041420u, cpu->gpr[4], _pgx1, 0x00001420u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18D7C: 240F01E0 addiu $t7, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240F01E0u, cpu->gpr[15], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC18D80: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D80u); return; } g_debug_last_store_pc = 0x80030D80u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC18D84: AFA40050 sw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D84u); return; } g_debug_last_store_pc = 0x80030D84u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18D88: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18D8C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18D90: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80030D98u; /* jal link before delay slot */ - psx_delay_BFC18D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18D94: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80030D94u); -#endif - if (psx_delay_BFC18D90) { - psx_delay_BFC18D90 = 0; - cpu->gpr[31] = 0x80030D98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC18D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC18D98: 2604005C addiu $a0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2604005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC18D9C: 241801DE addiu $t8, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241801DEu, cpu->gpr[24], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x80030D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC18DA0: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DA0u); return; } g_debug_last_store_pc = 0x80030DA0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC18DA4: AFA4004C sw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DA4u); return; } g_debug_last_store_pc = 0x80030DA4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18DA8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18DAC: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18DB0: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x80030DB8u; /* jal link before delay slot */ - psx_delay_BFC18DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18DB4: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DB4u); -#endif - if (psx_delay_BFC18DB0) { - psx_delay_BFC18DB0 = 0; - cpu->gpr[31] = 0x80030DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC18DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC18DB8: 2604147C addiu $a0, $s0, 5244 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (5244)); - PGXP_ALU(0x2604147Cu, cpu->gpr[4], _pgx1, 0x0000147Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC18DBC: 241901DE addiu $t9, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241901DEu, cpu->gpr[25], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x80030DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC18DC0: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DC0u); return; } g_debug_last_store_pc = 0x80030DC0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC18DC4: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DC4u); return; } g_debug_last_store_pc = 0x80030DC4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18DC8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18DCC: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18DD0: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x80030DD8u; /* jal link before delay slot */ - psx_delay_BFC18DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18DD4: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DD4u); -#endif - if (psx_delay_BFC18DD0) { - psx_delay_BFC18DD0 = 0; - cpu->gpr[31] = 0x80030DD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC18DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC18DD8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030DD8u); -#endif - /* 0xBFC18DDC: 8D089DE0 lw $t0, -25120($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DDCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18DE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18DE4: 15000003 bne $t0, $zero, 0xBFC18DF4 */ - uint32_t psx_brA_BFC18DE4 = cpu->gpr[8]; uint32_t psx_brB_BFC18DE4 = cpu->gpr[0]; - psx_taken_BFC18DE4 = (psx_brA_BFC18DE4 != psx_brB_BFC18DE4); - psx_delay_BFC18DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030DE8u); -#endif - if (psx_delay_BFC18DE4) { - psx_delay_BFC18DE4 = 0; - if (psx_taken_BFC18DE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030DF4u); - goto label_BFC18DF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030DECu); - } -label_BFC18DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18DEC: 1000000C beq $zero, $zero, 0xBFC18E20 */ - uint32_t psx_brA_BFC18DEC = cpu->gpr[0]; uint32_t psx_brB_BFC18DEC = cpu->gpr[0]; - psx_taken_BFC18DEC = (psx_brA_BFC18DEC == psx_brB_BFC18DEC); - psx_delay_BFC18DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18DF0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DF0u); -#endif - if (psx_delay_BFC18DEC) { - psx_delay_BFC18DEC = 0; - if (psx_taken_BFC18DEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030E20u); - goto label_BFC18E20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030DF4u); - } -label_BFC18DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC18DF4: A6001488 sh $zero, 5256($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (5256)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030DF4u); return; } g_debug_last_store_pc = 0x80030DF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6001488u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC18DF8: A6000068 sh $zero, 104($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (104)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030DF8u); return; } g_debug_last_store_pc = 0x80030DF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000068u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80030DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18DFC: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80030DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18E00: A6021484 sh $v0, 5252($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5252; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (5252)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E00u); return; } g_debug_last_store_pc = 0x80030E00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6021484u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18E04: A6020064 sh $v0, 100($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E04u); return; } g_debug_last_store_pc = 0x80030E04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6020064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC18E08: 2403001B addiu $v1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2403001Bu, cpu->gpr[3], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC18E0C: A6031486 sh $v1, 5254($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5254; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (5254)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E0Cu); return; } g_debug_last_store_pc = 0x80030E0Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA6031486u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18E10: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC18E14: A6030066 sh $v1, 102($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 102; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (102)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E14u); return; } g_debug_last_store_pc = 0x80030E14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA6030066u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC18E18: A205148E sb $a1, 5262($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5262; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030E18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (5262)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205148Eu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC18E1C: A205006E sb $a1, 110($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 110; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030E1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (110)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205006Eu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E1Cu); -#endif -label_BFC18E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC18E20: A2051437 sb $a1, 5175($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5175; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030E20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (5175)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA2051437u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC18E24: 240200EF addiu $v0, $zero, 239 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (239)); - PGXP_ALU(0x240200EFu, cpu->gpr[2], _pgx1, 0x000000EFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18E28: A602148A sh $v0, 5258($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5258; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (5258)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E28u); return; } g_debug_last_store_pc = 0x80030E28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602148Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC18E2C: A602006A sh $v0, 106($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 106; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (106)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80030E2Cu); return; } g_debug_last_store_pc = 0x80030E2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602006Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC18E30: A2050017 sb $a1, 23($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030E30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (23)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA2050017u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E34: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80030E3Cu; /* jal link before delay slot */ - psx_delay_BFC18E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC18E38: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80030E38u); -#endif - if (psx_delay_BFC18E34) { - psx_delay_BFC18E34 = 0; - cpu->gpr[31] = 0x80030E3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC18E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E3Cu); -#endif - /* 0xBFC18E3C: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E3Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E40: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80030E48u; /* jal link before delay slot */ - psx_delay_BFC18E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18E44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030E44u); -#endif - if (psx_delay_BFC18E40) { - psx_delay_BFC18E40 = 0; - cpu->gpr[31] = 0x80030E48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC18E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E48u); -#endif - /* 0xBFC18E48: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E48u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E4C: 0C013D3B jal 0xB004F4EC */ - cpu->gpr[31] = 0x80030E54u; /* jal link before delay slot */ - psx_delay_BFC18E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030E50u); -#endif - if (psx_delay_BFC18E4C) { - psx_delay_BFC18E4C = 0; - cpu->gpr[31] = 0x80030E54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F4ECu); - cpu->pc = 0x8004F4ECu; return; - } -label_BFC18E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E54u); -#endif - /* 0xBFC18E54: 8FA40048 lw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E54u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80030E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E58: 0C013D3B jal 0xB004F4EC */ - cpu->gpr[31] = 0x80030E60u; /* jal link before delay slot */ - psx_delay_BFC18E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC18E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80030E5Cu); -#endif - if (psx_delay_BFC18E58) { - psx_delay_BFC18E58 = 0; - cpu->gpr[31] = 0x80030E60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F4ECu); - cpu->pc = 0x8004F4ECu; return; - } -label_BFC18E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E60: 3C04801A lui $a0, 0x801A */ - cpu->gpr[4] = 0x801A0000u; - PGXP_ALU(0x3C04801Au, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E64: 34848800 ori $a0, $a0, 0x8800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x8800u; - PGXP_ALU(0x34848800u, cpu->gpr[4], _pgx1, 0x8800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18E68: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18E6C: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E70: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030E78u; /* jal link before delay slot */ - psx_delay_BFC18E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18E74: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E74u); -#endif - if (psx_delay_BFC18E70) { - psx_delay_BFC18E70 = 0; - cpu->gpr[31] = 0x80030E78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E78: 3C04801A lui $a0, 0x801A */ - cpu->gpr[4] = 0x801A0000u; - PGXP_ALU(0x3C04801Au, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E7C: 3484A800 ori $a0, $a0, 0xA800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xA800u; - PGXP_ALU(0x3484A800u, cpu->gpr[4], _pgx1, 0xA800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18E80: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18E84: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18E88: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030E90u; /* jal link before delay slot */ - psx_delay_BFC18E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18E8C: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E8Cu); -#endif - if (psx_delay_BFC18E88) { - psx_delay_BFC18E88 = 0; - cpu->gpr[31] = 0x80030E90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E90: 3C04801A lui $a0, 0x801A */ - cpu->gpr[4] = 0x801A0000u; - PGXP_ALU(0x3C04801Au, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18E94: 3484C800 ori $a0, $a0, 0xC800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xC800u; - PGXP_ALU(0x3484C800u, cpu->gpr[4], _pgx1, 0xC800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18E98: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18E9C: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18EA0: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030EA8u; /* jal link before delay slot */ - psx_delay_BFC18EA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18EA4: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EA4u); -#endif - if (psx_delay_BFC18EA0) { - psx_delay_BFC18EA0 = 0; - cpu->gpr[31] = 0x80030EA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18EA8: 3C04801A lui $a0, 0x801A */ - cpu->gpr[4] = 0x801A0000u; - PGXP_ALU(0x3C04801Au, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18EAC: 3484E800 ori $a0, $a0, 0xE800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xE800u; - PGXP_ALU(0x3484E800u, cpu->gpr[4], _pgx1, 0xE800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18EB0: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18EB4: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18EB8: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030EC0u; /* jal link before delay slot */ - psx_delay_BFC18EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18EBC: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EBCu); -#endif - if (psx_delay_BFC18EB8) { - psx_delay_BFC18EB8 = 0; - cpu->gpr[31] = 0x80030EC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18EC0: 3C04801B lui $a0, 0x801B */ - cpu->gpr[4] = 0x801B0000u; - PGXP_ALU(0x3C04801Bu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18EC4: 34840800 ori $a0, $a0, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x800u; - PGXP_ALU(0x34840800u, cpu->gpr[4], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18EC8: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18ECC: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18ED0: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030ED8u; /* jal link before delay slot */ - psx_delay_BFC18ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18ED4: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030ED4u); -#endif - if (psx_delay_BFC18ED0) { - psx_delay_BFC18ED0 = 0; - cpu->gpr[31] = 0x80030ED8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18ED8: 3C04801B lui $a0, 0x801B */ - cpu->gpr[4] = 0x801B0000u; - PGXP_ALU(0x3C04801Bu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18EDC: 34842800 ori $a0, $a0, 0x2800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2800u; - PGXP_ALU(0x34842800u, cpu->gpr[4], _pgx1, 0x2800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18EE0: 2405006C addiu $a1, $zero, 108 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); - PGXP_ALU(0x2405006Cu, cpu->gpr[5], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18EE4: 24060023 addiu $a2, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x24060023u, cpu->gpr[6], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18EE8: 0C01237C jal 0xB0048DF0 */ - cpu->gpr[31] = 0x80030EF0u; /* jal link before delay slot */ - psx_delay_BFC18EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18EEC: 240700EC addiu $a3, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240700ECu, cpu->gpr[7], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80030EECu); -#endif - if (psx_delay_BFC18EE8) { - psx_delay_BFC18EE8 = 0; - cpu->gpr[31] = 0x80030EF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048DF0u); - cpu->pc = 0x80048DF0u; return; - } -label_BFC18EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18EF0: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC18EF4: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC18EF8: 25EFAEE4 addiu $t7, $t7, -20764 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-20764)); - PGXP_ALU(0x25EFAEE4u, cpu->gpr[15], _pgx1, 0xFFFFAEE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80030EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC18EFC: AFAF0028 sw $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030EFCu); return; } g_debug_last_store_pc = 0x80030EFCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC18F00: 25CEAEE0 addiu $t6, $t6, -20768 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-20768)); - PGXP_ALU(0x25CEAEE0u, cpu->gpr[14], _pgx1, 0xFFFFAEE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC18F04: AFAE0024 sw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F04u); return; } g_debug_last_store_pc = 0x80030F04u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18F08: 3C04801B lui $a0, 0x801B */ - cpu->gpr[4] = 0x801B0000u; - PGXP_ALU(0x3C04801Bu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18F0C: 2409003C addiu $t1, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2409003Cu, cpu->gpr[9], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC18F10: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F10u); return; } g_debug_last_store_pc = 0x80030F10u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18F14: 240A003C addiu $t2, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x240A003Cu, cpu->gpr[10], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC18F18: AFAA0014 sw $t2, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F18u); return; } g_debug_last_store_pc = 0x80030F18u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0014u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18F1C: 240B003B addiu $t3, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x240B003Bu, cpu->gpr[11], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18F20: 240CFFF4 addiu $t4, $zero, -12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-12)); - PGXP_ALU(0x240CFFF4u, cpu->gpr[12], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18F24: 240DFFF4 addiu $t5, $zero, -12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (-12)); - PGXP_ALU(0x240DFFF4u, cpu->gpr[13], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC18F28: AFAD0020 sw $t5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F28u); return; } g_debug_last_store_pc = 0x80030F28u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0020u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC18F2C: AFAC001C sw $t4, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F2Cu); return; } g_debug_last_store_pc = 0x80030F2Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC001Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC18F30: AFAB0018 sw $t3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F30u); return; } g_debug_last_store_pc = 0x80030F30u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18F34: 34846800 ori $a0, $a0, 0x6800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6800u; - PGXP_ALU(0x34846800u, cpu->gpr[4], _pgx1, 0x6800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18F38: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18F3C: 24060078 addiu $a2, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24060078u, cpu->gpr[6], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18F40: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x80030F48u; /* jal link before delay slot */ - psx_delay_BFC18F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18F44: 24070078 addiu $a3, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24070078u, cpu->gpr[7], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F44u); -#endif - if (psx_delay_BFC18F40) { - psx_delay_BFC18F40 = 0; - cpu->gpr[31] = 0x80030F48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC18F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC18F48: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC18F4C: A3B80058 sb $t8, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80058u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC18F50: 2419001A addiu $t9, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2419001Au, cpu->gpr[25], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80030F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC18F54: A3B90059 sb $t9, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA3B90059u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC18F58: 2408000D addiu $t0, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2408000Du, cpu->gpr[8], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80030F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC18F5C: A3A8005A sb $t0, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA3A8005Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18F60: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC18F64: A3A90054 sb $t1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90054u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18F68: 240A00FF addiu $t2, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240A00FFu, cpu->gpr[10], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC18F6C: A3AA0055 sb $t2, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F6Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0055u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18F70: 240B008F addiu $t3, $zero, 143 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (143)); - PGXP_ALU(0x240B008Fu, cpu->gpr[11], _pgx1, 0x0000008Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC18F74: A3AB0056 sb $t3, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB0056u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC18F78: 27A80054 addiu $t0, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27A80054u, cpu->gpr[8], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC18F7C: AFA80028 sw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F7Cu); return; } g_debug_last_store_pc = 0x80030F7Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC18F80: 27B90058 addiu $t9, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27B90058u, cpu->gpr[25], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC18F84: AFB90024 sw $t9, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F84u); return; } g_debug_last_store_pc = 0x80030F84u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90024u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC18F88: 2418FFF6 addiu $t8, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x2418FFF6u, cpu->gpr[24], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80030F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC18F8C: AFB80020 sw $t8, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F8Cu); return; } g_debug_last_store_pc = 0x80030F8Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80020u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18F90: 3C04801B lui $a0, 0x801B */ - cpu->gpr[4] = 0x801B0000u; - PGXP_ALU(0x3C04801Bu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18F94: 240C001C addiu $t4, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240C001Cu, cpu->gpr[12], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC18F98: AFAC0010 sw $t4, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F98u); return; } g_debug_last_store_pc = 0x80030F98u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18F9C: 240D001C addiu $t5, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240D001Cu, cpu->gpr[13], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18FA0: 240E001A addiu $t6, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x240E001Au, cpu->gpr[14], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80030FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC18FA4: 240FFFF6 addiu $t7, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x240FFFF6u, cpu->gpr[15], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC18FA8: AFAF001C sw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030FA8u); return; } g_debug_last_store_pc = 0x80030FA8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC18FAC: AFAE0018 sw $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030FACu); return; } g_debug_last_store_pc = 0x80030FACu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC18FB0: AFAD0014 sw $t5, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030FB0u); return; } g_debug_last_store_pc = 0x80030FB0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0014u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC18FB4: 3484E800 ori $a0, $a0, 0xE800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xE800u; - PGXP_ALU(0x3484E800u, cpu->gpr[4], _pgx1, 0xE800u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC18FB8: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC18FBC: 24060038 addiu $a2, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24060038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC18FC0: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x80030FC8u; /* jal link before delay slot */ - psx_delay_BFC18FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC18FC4: 24070038 addiu $a3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24070038u, cpu->gpr[7], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FC4u); -#endif - if (psx_delay_BFC18FC0) { - psx_delay_BFC18FC0 = 0; - cpu->gpr[31] = 0x80030FC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC18FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC18FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC18FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC18FC8: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC18FCC: A3AA0059 sb $t2, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0059u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC18FD0: 240B008C addiu $t3, $zero, 140 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (140)); - PGXP_ALU(0x240B008Cu, cpu->gpr[11], _pgx1, 0x0000008Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80030FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC18FD4: A3AB005A sb $t3, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB005Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC18FD8: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC18FDC: A3A90058 sb $t1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FDCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90058u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC18FE0: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC18FE4: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80030FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC18FE8: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC18FEC: A3AC0054 sb $t4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0054u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80030FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC18FF0: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80030FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC18FF4: A3AD0055 sb $t5, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0055u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC18FF8: 240E00FF addiu $t6, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240E00FFu, cpu->gpr[14], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80030FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC18FFC: A3AE0056 sb $t6, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0056u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80030FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC19000: 254AAEE0 addiu $t2, $t2, -20768 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-20768)); - PGXP_ALU(0x254AAEE0u, cpu->gpr[10], _pgx1, 0xFFFFAEE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19004: AFAA0024 sw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031004u); return; } g_debug_last_store_pc = 0x80031004u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC19008: 256BAEE4 addiu $t3, $t3, -20764 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-20764)); - PGXP_ALU(0x256BAEE4u, cpu->gpr[11], _pgx1, 0xFFFFAEE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC1900C: AFAB0028 sw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003100Cu); return; } g_debug_last_store_pc = 0x8003100Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC19010: 2409FFF6 addiu $t1, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x2409FFF6u, cpu->gpr[9], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80031010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC19014: AFA90020 sw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031014u); return; } g_debug_last_store_pc = 0x80031014u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19018: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1901C: 240F001C addiu $t7, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240F001Cu, cpu->gpr[15], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC19020: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031020u); return; } g_debug_last_store_pc = 0x80031020u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC19024: 2418001C addiu $t8, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2418001Cu, cpu->gpr[24], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC19028: 2419001A addiu $t9, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2419001Au, cpu->gpr[25], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80031028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1902C: 2408FFF6 addiu $t0, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x2408FFF6u, cpu->gpr[8], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC19030: AFA8001C sw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031030u); return; } g_debug_last_store_pc = 0x80031030u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19034: AFB90018 sw $t9, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031034u); return; } g_debug_last_store_pc = 0x80031034u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19038: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031038u); return; } g_debug_last_store_pc = 0x80031038u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1903C: 34840800 ori $a0, $a0, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x800u; - PGXP_ALU(0x34840800u, cpu->gpr[4], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8003103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19040: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80031040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19044: 24060038 addiu $a2, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24060038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80031044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19048: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x80031050u; /* jal link before delay slot */ - psx_delay_BFC19048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1904C: 24070038 addiu $a3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24070038u, cpu->gpr[7], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003104Cu); -#endif - if (psx_delay_BFC19048) { - psx_delay_BFC19048 = 0; - cpu->gpr[31] = 0x80031050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC19050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC19050: 240C002D addiu $t4, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240C002Du, cpu->gpr[12], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80031050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19054: A3AC0058 sb $t4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031054u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0058u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC19058: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1905C: A3AD0059 sb $t5, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003105Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0059u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC19060: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19064: A3AE005A sb $t6, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031064u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE005Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC19068: 240F00FF addiu $t7, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240F00FFu, cpu->gpr[15], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC1906C: A3AF0054 sb $t7, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003106Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0054u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC19070: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19074: A3B80055 sb $t8, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031074u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80055u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC19078: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC1907C: A3B90056 sb $t9, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003107Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA3B90056u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003107Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19080: 27AE0054 addiu $t6, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27AE0054u, cpu->gpr[14], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80031080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19084: AFAE0028 sw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031084u); return; } g_debug_last_store_pc = 0x80031084u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC19088: 27AD0058 addiu $t5, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27AD0058u, cpu->gpr[13], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80031088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1908C: AFAD0024 sw $t5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003108Cu); return; } g_debug_last_store_pc = 0x8003108Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0024u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC19090: 240CFFF6 addiu $t4, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x240CFFF6u, cpu->gpr[12], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80031090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19094: AFAC0020 sw $t4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031094u); return; } g_debug_last_store_pc = 0x80031094u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0020u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19098: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1909C: 2408001C addiu $t0, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2408001Cu, cpu->gpr[8], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC190A0: AFA80010 sw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800310A0u); return; } g_debug_last_store_pc = 0x800310A0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800310A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC190A4: 2409001C addiu $t1, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2409001Cu, cpu->gpr[9], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800310A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC190A8: 240A001A addiu $t2, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x240A001Au, cpu->gpr[10], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x800310A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC190AC: 240BFFF6 addiu $t3, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x240BFFF6u, cpu->gpr[11], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x800310ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC190B0: AFAB001C sw $t3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800310B0u); return; } g_debug_last_store_pc = 0x800310B0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB001Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800310B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC190B4: AFAA0018 sw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800310B4u); return; } g_debug_last_store_pc = 0x800310B4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800310B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC190B8: AFA90014 sw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800310B8u); return; } g_debug_last_store_pc = 0x800310B8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800310B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC190BC: 34842800 ori $a0, $a0, 0x2800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2800u; - PGXP_ALU(0x34842800u, cpu->gpr[4], _pgx1, 0x2800u); } -#ifdef PSX_COSIM - cosim_instr(0x800310BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC190C0: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x800310C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC190C4: 24060038 addiu $a2, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24060038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800310C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC190C8: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x800310D0u; /* jal link before delay slot */ - psx_delay_BFC190C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC190CC: 24070038 addiu $a3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24070038u, cpu->gpr[7], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800310CCu); -#endif - if (psx_delay_BFC190C8) { - psx_delay_BFC190C8 = 0; - cpu->gpr[31] = 0x800310D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC190D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC190D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC190D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC190D0: 240F002D addiu $t7, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240F002Du, cpu->gpr[15], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x800310D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC190D4: A3AF0058 sb $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800310D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC190D8: 2418001E addiu $t8, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2418001Eu, cpu->gpr[24], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800310D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC190DC: A3B80059 sb $t8, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80059u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800310DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC190E0: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800310E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC190E4: A3B9005A sb $t9, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA3B9005Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800310E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC190E8: 240800FF addiu $t0, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240800FFu, cpu->gpr[8], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800310E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC190EC: A3A80054 sb $t0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA3A80054u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800310ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800310F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC190F0: 240900CC addiu $t1, $zero, 204 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (204)); - PGXP_ALU(0x240900CCu, cpu->gpr[9], _pgx1, 0x000000CCu); } -#ifdef PSX_COSIM - cosim_instr(0x800310F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC190F4: A3A90055 sb $t1, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90055u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800310F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC190F8: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800310F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC190FC: A3AA0056 sb $t2, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800310FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0056u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800310FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19100: 27B90054 addiu $t9, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27B90054u, cpu->gpr[25], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80031100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19104: AFB90028 sw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031104u); return; } g_debug_last_store_pc = 0x80031104u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19108: 27B80058 addiu $t8, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27B80058u, cpu->gpr[24], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80031108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC1910C: AFB80024 sw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003110Cu); return; } g_debug_last_store_pc = 0x8003110Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC19110: 240FFFF6 addiu $t7, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x240FFFF6u, cpu->gpr[15], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80031110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC19114: AFAF0020 sw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031114u); return; } g_debug_last_store_pc = 0x80031114u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19118: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1911C: 240B001C addiu $t3, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240B001Cu, cpu->gpr[11], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC19120: AFAB0010 sw $t3, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031120u); return; } g_debug_last_store_pc = 0x80031120u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC19124: 240C001C addiu $t4, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240C001Cu, cpu->gpr[12], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC19128: 240D001A addiu $t5, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x240D001Au, cpu->gpr[13], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80031128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1912C: 240EFFF6 addiu $t6, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x240EFFF6u, cpu->gpr[14], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003112Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19130: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031130u); return; } g_debug_last_store_pc = 0x80031130u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC19134: AFAD0018 sw $t5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031134u); return; } g_debug_last_store_pc = 0x80031134u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19138: AFAC0014 sw $t4, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031138u); return; } g_debug_last_store_pc = 0x80031138u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0014u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1913C: 34844800 ori $a0, $a0, 0x4800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x4800u; - PGXP_ALU(0x34844800u, cpu->gpr[4], _pgx1, 0x4800u); } -#ifdef PSX_COSIM - cosim_instr(0x8003113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19140: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80031140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19144: 24060038 addiu $a2, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24060038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80031144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19148: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x80031150u; /* jal link before delay slot */ - psx_delay_BFC19148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1914C: 24070038 addiu $a3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24070038u, cpu->gpr[7], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003114Cu); -#endif - if (psx_delay_BFC19148) { - psx_delay_BFC19148 = 0; - cpu->gpr[31] = 0x80031150u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC19150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC19150: 2408002D addiu $t0, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2408002Du, cpu->gpr[8], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80031150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC19154: A3A80058 sb $t0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031154u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA3A80058u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC19158: 2409002D addiu $t1, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2409002Du, cpu->gpr[9], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80031158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC1915C: A3A90059 sb $t1, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003115Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90059u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC19160: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19164: A3AA005A sb $t2, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031164u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA005Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC19168: 240B00FF addiu $t3, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240B00FFu, cpu->gpr[11], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC1916C: A3AB0054 sb $t3, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003116Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB0054u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003116Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC19170: 240C00FF addiu $t4, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240C00FFu, cpu->gpr[12], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19174: A3AC0055 sb $t4, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031174u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0055u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC19178: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1917C: A3AD0056 sb $t5, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003117Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0056u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19180: 27AA0054 addiu $t2, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27AA0054u, cpu->gpr[10], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80031180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19184: AFAA0028 sw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031184u); return; } g_debug_last_store_pc = 0x80031184u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC19188: 27A90058 addiu $t1, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A90058u, cpu->gpr[9], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80031188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC1918C: AFA90024 sw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003118Cu); return; } g_debug_last_store_pc = 0x8003118Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003118Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC19190: 2408FFF6 addiu $t0, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x2408FFF6u, cpu->gpr[8], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x80031190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC19194: AFA80020 sw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031194u); return; } g_debug_last_store_pc = 0x80031194u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19198: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1919C: 240E001C addiu $t6, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240E001Cu, cpu->gpr[14], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC191A0: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800311A0u); return; } g_debug_last_store_pc = 0x800311A0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800311A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC191A4: 240F001C addiu $t7, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x240F001Cu, cpu->gpr[15], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800311A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC191A8: 2418001A addiu $t8, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2418001Au, cpu->gpr[24], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x800311A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC191AC: 2419FFF6 addiu $t9, $zero, -10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-10)); - PGXP_ALU(0x2419FFF6u, cpu->gpr[25], _pgx1, 0xFFFFFFF6u); } -#ifdef PSX_COSIM - cosim_instr(0x800311ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC191B0: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800311B0u); return; } g_debug_last_store_pc = 0x800311B0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800311B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC191B4: AFB80018 sw $t8, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800311B4u); return; } g_debug_last_store_pc = 0x800311B4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800311B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC191B8: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800311B8u); return; } g_debug_last_store_pc = 0x800311B8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800311B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC191BC: 34846800 ori $a0, $a0, 0x6800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x6800u; - PGXP_ALU(0x34846800u, cpu->gpr[4], _pgx1, 0x6800u); } -#ifdef PSX_COSIM - cosim_instr(0x800311BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC191C0: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x800311C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC191C4: 24060038 addiu $a2, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24060038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800311C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC191C8: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x800311D0u; /* jal link before delay slot */ - psx_delay_BFC191C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC191CC: 24070038 addiu $a3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24070038u, cpu->gpr[7], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800311CCu); -#endif - if (psx_delay_BFC191C8) { - psx_delay_BFC191C8 = 0; - cpu->gpr[31] = 0x800311D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC191D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC191D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC191D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC191D0: 240B0017 addiu $t3, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x240B0017u, cpu->gpr[11], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0x800311D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC191D4: A3AB0058 sb $t3, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB0058u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800311D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC191D8: 240C0005 addiu $t4, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x240C0005u, cpu->gpr[12], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800311D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC191DC: A3AC0059 sb $t4, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0059u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800311DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC191E0: 240D002D addiu $t5, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240D002Du, cpu->gpr[13], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x800311E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC191E4: A3AD005A sb $t5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD005Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800311E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC191E8: 240E0099 addiu $t6, $zero, 153 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (153)); - PGXP_ALU(0x240E0099u, cpu->gpr[14], _pgx1, 0x00000099u); } -#ifdef PSX_COSIM - cosim_instr(0x800311E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC191EC: A3AE0054 sb $t6, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0054u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800311ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800311F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC191F0: 240F0025 addiu $t7, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x240F0025u, cpu->gpr[15], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x800311F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC191F4: A3AF0055 sb $t7, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0055u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800311F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC191F8: 241800FF addiu $t8, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x241800FFu, cpu->gpr[24], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800311F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC191FC: A3B80056 sb $t8, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80056u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800311FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC19200: 27AD0054 addiu $t5, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27AD0054u, cpu->gpr[13], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80031200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC19204: AFAD0028 sw $t5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031204u); return; } g_debug_last_store_pc = 0x80031204u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0028u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19208: 27AC0058 addiu $t4, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27AC0058u, cpu->gpr[12], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80031208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC1920C: AFAC0024 sw $t4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003120Cu); return; } g_debug_last_store_pc = 0x8003120Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0024u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC19210: 240BFFF4 addiu $t3, $zero, -12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-12)); - PGXP_ALU(0x240BFFF4u, cpu->gpr[11], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC19214: AFAB0020 sw $t3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031214u); return; } g_debug_last_store_pc = 0x80031214u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0020u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19218: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1921C: 2419002C addiu $t9, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2419002Cu, cpu->gpr[25], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003121Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19220: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031220u); return; } g_debug_last_store_pc = 0x80031220u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC19224: 2408002C addiu $t0, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2408002Cu, cpu->gpr[8], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC19228: 2409002B addiu $t1, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2409002Bu, cpu->gpr[9], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80031228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1922C: 240AFFF4 addiu $t2, $zero, -12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-12)); - PGXP_ALU(0x240AFFF4u, cpu->gpr[10], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003122Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19230: AFAA001C sw $t2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031230u); return; } g_debug_last_store_pc = 0x80031230u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC19234: AFA90018 sw $t1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031234u); return; } g_debug_last_store_pc = 0x80031234u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC19238: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031238u); return; } g_debug_last_store_pc = 0x80031238u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1923C: 34848800 ori $a0, $a0, 0x8800 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x8800u; - PGXP_ALU(0x34848800u, cpu->gpr[4], _pgx1, 0x8800u); } -#ifdef PSX_COSIM - cosim_instr(0x8003123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19240: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80031240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19244: 24060058 addiu $a2, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24060058u, cpu->gpr[6], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80031244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19248: 0C012465 jal 0xB0049194 */ - cpu->gpr[31] = 0x80031250u; /* jal link before delay slot */ - psx_delay_BFC19248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1924C: 24070058 addiu $a3, $zero, 88 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (88)); - PGXP_ALU(0x24070058u, cpu->gpr[7], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8003124Cu); -#endif - if (psx_delay_BFC19248) { - psx_delay_BFC19248 = 0; - cpu->gpr[31] = 0x80031250u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049194u); - cpu->pc = 0x80049194u; return; - } -label_BFC19250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC19250: 240E003E addiu $t6, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x240E003Eu, cpu->gpr[14], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80031250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC19254: 240F003E addiu $t7, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x240F003Eu, cpu->gpr[15], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80031254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC19258: 2418008C addiu $t8, $zero, 140 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (140)); - PGXP_ALU(0x2418008Cu, cpu->gpr[24], _pgx1, 0x0000008Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1925C: 3C04801C lui $a0, 0x801C */ - cpu->gpr[4] = 0x801C0000u; - PGXP_ALU(0x3C04801Cu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19260: A3B8005A sb $t8, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031260u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B8005Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC19264: A3AF0059 sb $t7, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031264u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0059u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19268: A3AE0058 sb $t6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031268u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0058u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1926C: 3484CA00 ori $a0, $a0, 0xCA00 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xCA00u; - PGXP_ALU(0x3484CA00u, cpu->gpr[4], _pgx1, 0xCA00u); } -#ifdef PSX_COSIM - cosim_instr(0x8003126Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19270: 2405008C addiu $a1, $zero, 140 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (140)); - PGXP_ALU(0x2405008Cu, cpu->gpr[5], _pgx1, 0x0000008Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19274: 2406001C addiu $a2, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2406001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19278: 0C012258 jal 0xB0048960 */ - cpu->gpr[31] = 0x80031280u; /* jal link before delay slot */ - psx_delay_BFC19278 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC1927C: 27A70058 addiu $a3, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A70058u, cpu->gpr[7], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8003127Cu); -#endif - if (psx_delay_BFC19278) { - psx_delay_BFC19278 = 0; - cpu->gpr[31] = 0x80031280u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048960u); - cpu->pc = 0x80048960u; return; - } -label_BFC19280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19280: 0C00C4B9 jal 0xB00312E4 */ - cpu->gpr[31] = 0x80031288u; /* jal link before delay slot */ - psx_delay_BFC19280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC19284: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031284u); -#endif - if (psx_delay_BFC19280) { - psx_delay_BFC19280 = 0; - cpu->gpr[31] = 0x80031288u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800312E4u); - cpu->pc = 0x800312E4u; return; - } -label_BFC19288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031288u); -#endif - /* 0xBFC19288: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031288u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1928C: 0C00C4B9 jal 0xB00312E4 */ - cpu->gpr[31] = 0x80031294u; /* jal link before delay slot */ - psx_delay_BFC1928C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031290u); -#endif - if (psx_delay_BFC1928C) { - psx_delay_BFC1928C = 0; - cpu->gpr[31] = 0x80031294u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800312E4u); - cpu->pc = 0x800312E4u; return; - } -label_BFC19294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19294: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x8003129Cu; /* jal link before delay slot */ - psx_delay_BFC19294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC19298: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031298u); -#endif - if (psx_delay_BFC19294) { - psx_delay_BFC19294 = 0; - cpu->gpr[31] = 0x8003129Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC1929C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1929Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1929Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1929C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x800312A4u; /* jal link before delay slot */ - psx_delay_BFC1929C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC192A0: 26041070 addiu $a0, $s0, 4208 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); - PGXP_ALU(0x26041070u, cpu->gpr[4], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x800312A0u); -#endif - if (psx_delay_BFC1929C) { - psx_delay_BFC1929C = 0; - cpu->gpr[31] = 0x800312A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC192A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312A4u); -#endif - /* 0xBFC192A4: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800312A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC192A8: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x800312B0u; /* jal link before delay slot */ - psx_delay_BFC192A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC192AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800312ACu); -#endif - if (psx_delay_BFC192A8) { - psx_delay_BFC192A8 = 0; - cpu->gpr[31] = 0x800312B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC192B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC192B0: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x800312B8u; /* jal link before delay slot */ - psx_delay_BFC192B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC192B4: 26042490 addiu $a0, $s0, 9360 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (9360)); - PGXP_ALU(0x26042490u, cpu->gpr[4], _pgx1, 0x00002490u); } -#ifdef PSX_COSIM - cosim_instr(0x800312B4u); -#endif - if (psx_delay_BFC192B0) { - psx_delay_BFC192B0 = 0; - cpu->gpr[31] = 0x800312B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC192B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC192B8: A2001437 sb $zero, 5175($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5175; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800312B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (5175)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2001437u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800312B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC192BC: A2000017 sb $zero, 23($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800312BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (23)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2000017u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800312BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC192C0: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x800312C8u; /* jal link before delay slot */ - psx_delay_BFC192C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC192C4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800312C4u); -#endif - if (psx_delay_BFC192C0) { - psx_delay_BFC192C0 = 0; - cpu->gpr[31] = 0x800312C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC192C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312C8u); -#endif - /* 0xBFC192C8: 8FA40050 lw $a0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40050u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800312C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC192CC: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x800312D4u; /* jal link before delay slot */ - psx_delay_BFC192CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC192D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800312D0u); -#endif - if (psx_delay_BFC192CC) { - psx_delay_BFC192CC = 0; - cpu->gpr[31] = 0x800312D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC192D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312D4u); -#endif - /* 0xBFC192D4: 8FBF0044 lw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800312D4u); -#endif - /* 0xBFC192D8: 8FB00040 lw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312D8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800312D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC192DC: 03E00008 jr $ra */ - psx_delay_BFC192DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC192E0: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x800312E0u); -#endif - if (psx_delay_BFC192DC) { - psx_delay_BFC192DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC192E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC192E4u); - int psx_delay_BFC192F4 = 0; - int psx_delay_BFC1939C = 0; - int psx_delay_BFC193AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC192FCu: goto label_BFC192FC; - case 0xBFC193A4u: goto label_BFC193A4; - default: break; - } - } -label_BFC192E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC192E4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x800312E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC192E8: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312E8u); return; } g_debug_last_store_pc = 0x800312E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800312E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC192EC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800312ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC192F0: 24641070 addiu $a0, $v1, 4208 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4208)); - PGXP_ALU(0x24641070u, cpu->gpr[4], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x800312F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC192F4: 0C01467B jal 0xB00519EC */ - cpu->gpr[31] = 0x800312FCu; /* jal link before delay slot */ - psx_delay_BFC192F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC192F8: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312F8u); return; } g_debug_last_store_pc = 0x800312F8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800312F8u); -#endif - if (psx_delay_BFC192F4) { - psx_delay_BFC192F4 = 0; - cpu->gpr[31] = 0x800312FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800519ECu); - cpu->pc = 0x800519ECu; return; - } -label_BFC192FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC192FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC192FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800312FCu); -#endif - /* 0xBFC192FC: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312FCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800312FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC19300: 240E0020 addiu $t6, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240E0020u, cpu->gpr[14], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80031300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC19304: A06E1076 sb $t6, 4214($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4214; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031304u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4214)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA06E1076u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC19308: A0601074 sb $zero, 4212($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4212; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031308u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4212)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0601074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1930C: A0601075 sb $zero, 4213($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4213; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003130Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4213)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0601075u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031310u); -#endif - /* 0xBFC19310: 84680002 lh $t0, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031310u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x84680002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031310u); -#endif - /* 0xBFC19314: 84620000 lh $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031314u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x84620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC19318: A468107E sh $t0, 4222($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4222; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4222)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031318u); return; } g_debug_last_store_pc = 0x80031318u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA468107Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1931C: A4621078 sh $v0, 4216($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4216)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003131Cu); return; } g_debug_last_store_pc = 0x8003131Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4621078u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003131Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC19320: 250A01E0 addiu $t2, $t0, 480 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] + (480)); - PGXP_ALU(0x250A01E0u, cpu->gpr[10], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC19324: A46A1086 sh $t2, 4230($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4230; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4230)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031324u); return; } g_debug_last_store_pc = 0x80031324u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A1086u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC19328: 000AFC00 sll $ra, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[31] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000AFC00u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1932C: 24490280 addiu $t1, $v0, 640 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[2] + (640)); - PGXP_ALU(0x24490280u, cpu->gpr[9], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC19330: A4691084 sh $t1, 4228($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4228; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4228)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031330u); return; } g_debug_last_store_pc = 0x80031330u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4691084u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC19334: 00096400 sll $t4, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[12] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00096400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19338: 001FFC03 sra $ra, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] >> 16u); - PGXP_ALU(0x001FFC03u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000008u); -#endif - /* 0xBFC1933C: A47F1082 sh $ra, 4226($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4226; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4226)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003133Cu); return; } g_debug_last_store_pc = 0x8003133Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[31] & 0xFFFFu)); } - PGXP_STORE(0xA47F1082u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003133Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC19340: 00085C00 sll $t3, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[8] << 16u; - PGXP_ALU(0x00085C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC19344: 00026C00 sll $t5, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00026C00u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC19348: 000D6C03 sra $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 16u); - PGXP_ALU(0x000D6C03u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC1934C: A46D1080 sh $t5, 4224($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4224; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4224)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003134Cu); return; } g_debug_last_store_pc = 0x8003134Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D1080u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003134Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC19350: 000B5C03 sra $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 16u); - PGXP_ALU(0x000B5C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC19354: A46B107A sh $t3, 4218($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4218; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4218)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031354u); return; } g_debug_last_store_pc = 0x80031354u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B107Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC19358: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80031358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC1935C: A46C107C sh $t4, 4220($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4220)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003135Cu); return; } g_debug_last_store_pc = 0x8003135Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA46C107Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC19360: AFA0001C sw $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031360u); return; } g_debug_last_store_pc = 0x80031360u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC19364: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031364u); return; } g_debug_last_store_pc = 0x80031364u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19368: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1936C: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19370: 2739AEE0 addiu $t9, $t9, -20768 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-20768)); - PGXP_ALU(0x2739AEE0u, cpu->gpr[25], _pgx1, 0xFFFFAEE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19374: AFB90020 sw $t9, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031374u); return; } g_debug_last_store_pc = 0x80031374u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19378: 25CEAEE4 addiu $t6, $t6, -20764 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-20764)); - PGXP_ALU(0x25CEAEE4u, cpu->gpr[14], _pgx1, 0xFFFFAEE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1937C: 240F0122 addiu $t7, $zero, 290 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (290)); - PGXP_ALU(0x240F0122u, cpu->gpr[15], _pgx1, 0x00000122u); } -#ifdef PSX_COSIM - cosim_instr(0x8003137Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC19380: 24180122 addiu $t8, $zero, 290 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (290)); - PGXP_ALU(0x24180122u, cpu->gpr[24], _pgx1, 0x00000122u); } -#ifdef PSX_COSIM - cosim_instr(0x80031380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19384: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031384u); return; } g_debug_last_store_pc = 0x80031384u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC19388: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031388u); return; } g_debug_last_store_pc = 0x80031388u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC1938C: AFAE0024 sw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003138Cu); return; } g_debug_last_store_pc = 0x8003138Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19390: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80031390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19394: 24060140 addiu $a2, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24060140u, cpu->gpr[6], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80031394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC19398: 240700F0 addiu $a3, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240700F0u, cpu->gpr[7], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1939C: 0C012512 jal 0xB0049448 */ - cpu->gpr[31] = 0x800313A4u; /* jal link before delay slot */ - psx_delay_BFC1939C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC193A0: 24641088 addiu $a0, $v1, 4232 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4232)); - PGXP_ALU(0x24641088u, cpu->gpr[4], _pgx1, 0x00001088u); } -#ifdef PSX_COSIM - cosim_instr(0x800313A0u); -#endif - if (psx_delay_BFC1939C) { - psx_delay_BFC1939C = 0; - cpu->gpr[31] = 0x800313A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049448u); - cpu->pc = 0x80049448u; return; - } -label_BFC193A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC193A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC193A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313A4u); -#endif - /* 0xBFC193A4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800313A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC193A8: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800313A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC193AC: 03E00008 jr $ra */ - psx_delay_BFC193AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC193B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800313B0u); -#endif - if (psx_delay_BFC193AC) { - psx_delay_BFC193AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC193C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC193C0u); - int psx_delay_BFC193E0 = 0; - int psx_taken_BFC193E0 = 0; - int psx_delay_BFC193F4 = 0; - int psx_taken_BFC193F4 = 0; - int psx_delay_BFC19410 = 0; - int psx_delay_BFC19424 = 0; - int psx_delay_BFC19438 = 0; - int psx_delay_BFC1944C = 0; - int psx_taken_BFC1944C = 0; - int psx_delay_BFC19460 = 0; - int psx_taken_BFC19460 = 0; - int psx_delay_BFC194B8 = 0; - int psx_taken_BFC194B8 = 0; - int psx_delay_BFC194E8 = 0; - int psx_delay_BFC19500 = 0; - int psx_taken_BFC19500 = 0; - int psx_delay_BFC19524 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC193E8u: goto label_BFC193E8; - case 0xBFC193FCu: goto label_BFC193FC; - case 0xBFC19408u: goto label_BFC19408; - case 0xBFC19418u: goto label_BFC19418; - case 0xBFC1942Cu: goto label_BFC1942C; - case 0xBFC19440u: goto label_BFC19440; - case 0xBFC19454u: goto label_BFC19454; - case 0xBFC19468u: goto label_BFC19468; - case 0xBFC19488u: goto label_BFC19488; - case 0xBFC194C0u: goto label_BFC194C0; - case 0xBFC194F0u: goto label_BFC194F0; - case 0xBFC19508u: goto label_BFC19508; - case 0xBFC1951Cu: goto label_BFC1951C; - default: break; - } - } -label_BFC193C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC193C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC193C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC193C0: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800313C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC193C4: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313C4u); return; } g_debug_last_store_pc = 0x800313C4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800313C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC193C8: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800313C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC193CC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313CCu); return; } g_debug_last_store_pc = 0x800313CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800313CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC193D0: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313D0u); return; } g_debug_last_store_pc = 0x800313D0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800313D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC193D4: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313D4u); return; } g_debug_last_store_pc = 0x800313D4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800313D4u); -#endif - /* 0xBFC193D8: 8E8E0000 lw $t6, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313D8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x100000u); } - PGXP_LOAD(0x8E8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800313D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC193DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800313DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC193E0: 148E0006 bne $a0, $t6, 0xBFC193FC */ - uint32_t psx_brA_BFC193E0 = cpu->gpr[4]; uint32_t psx_brB_BFC193E0 = cpu->gpr[14]; - psx_taken_BFC193E0 = (psx_brA_BFC193E0 != psx_brB_BFC193E0); - psx_delay_BFC193E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC193E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800313E4u); -#endif - if (psx_delay_BFC193E0) { - psx_delay_BFC193E0 = 0; - if (psx_taken_BFC193E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313FCu); - goto label_BFC193FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313E8u); - } -label_BFC193E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC193E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC193E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC193E8: 248F1420 addiu $t7, $a0, 5152 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[4] + (5152)); - PGXP_ALU(0x248F1420u, cpu->gpr[15], _pgx1, 0x00001420u); } -#ifdef PSX_COSIM - cosim_instr(0x800313E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC193EC: AE8F0000 sw $t7, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313ECu); return; } g_debug_last_store_pc = 0x800313ECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800313ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC193F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800313F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC193F4: 10000004 beq $zero, $zero, 0xBFC19408 */ - uint32_t psx_brA_BFC193F4 = cpu->gpr[0]; uint32_t psx_brB_BFC193F4 = cpu->gpr[0]; - psx_taken_BFC193F4 = (psx_brA_BFC193F4 == psx_brB_BFC193F4); - psx_delay_BFC193F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC193F8: AC209E24 sw $zero, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313F8u); return; } g_debug_last_store_pc = 0x800313F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800313F8u); -#endif - if (psx_delay_BFC193F4) { - psx_delay_BFC193F4 = 0; - if (psx_taken_BFC193F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031408u); - goto label_BFC19408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800313FCu); - } -label_BFC193FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC193FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC193FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800313FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100010u); -#endif - /* 0xBFC193FC: AE840000 sw $a0, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313FCu); return; } g_debug_last_store_pc = 0x800313FCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAE840000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800313FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19400: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19404: AC209E24 sw $zero, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031404u); return; } g_debug_last_store_pc = 0x80031404u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031404u); -#endif -label_BFC19408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031408u); -#endif - /* 0xBFC19408: 8E840000 lw $a0, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031408u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1940C: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x8003140Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19410: 0C013CCD jal 0xB004F334 */ - cpu->gpr[31] = 0x80031418u; /* jal link before delay slot */ - psx_delay_BFC19410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19414: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031414u); -#endif - if (psx_delay_BFC19410) { - psx_delay_BFC19410 = 0; - cpu->gpr[31] = 0x80031418u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F334u); - cpu->pc = 0x8004F334u; return; - } -label_BFC19418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031418u); -#endif - /* 0xBFC19418: 8E900000 lw $s0, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031418u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x100000u); } - PGXP_LOAD(0x8E900000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80031418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1941C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC19420: 2604106C addiu $a0, $s0, 4204 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4204)); - PGXP_ALU(0x2604106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19424: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x8003142Cu; /* jal link before delay slot */ - psx_delay_BFC19424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC19428: 26051070 addiu $a1, $s0, 4208 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); - PGXP_ALU(0x26051070u, cpu->gpr[5], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031428u); -#endif - if (psx_delay_BFC19424) { - psx_delay_BFC19424 = 0; - cpu->gpr[31] = 0x8003142Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC1942C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1942Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1942Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003142Cu); -#endif - /* 0xBFC1942C: 8E900000 lw $s0, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003142Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x100000u); } - PGXP_LOAD(0x8E900000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19430: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC19434: 26041088 addiu $a0, $s0, 4232 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4232)); - PGXP_ALU(0x26041088u, cpu->gpr[4], _pgx1, 0x00001088u); } -#ifdef PSX_COSIM - cosim_instr(0x80031434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19438: 0C0124E0 jal 0xB0049380 */ - cpu->gpr[31] = 0x80031440u; /* jal link before delay slot */ - psx_delay_BFC19438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC1943C: 26051064 addiu $a1, $s0, 4196 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (4196)); - PGXP_ALU(0x26051064u, cpu->gpr[5], _pgx1, 0x00001064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003143Cu); -#endif - if (psx_delay_BFC19438) { - psx_delay_BFC19438 = 0; - cpu->gpr[31] = 0x80031440u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049380u); - cpu->pc = 0x80049380u; return; - } -label_BFC19440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19440: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031440u); -#endif - /* 0xBFC19444: 8F18A780 lw $t8, -22656($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -22656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031444u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18A780u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19448: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1944C: 17010033 bne $t8, $at, 0xBFC1951C */ - uint32_t psx_brA_BFC1944C = cpu->gpr[24]; uint32_t psx_brB_BFC1944C = cpu->gpr[1]; - psx_taken_BFC1944C = (psx_brA_BFC1944C != psx_brB_BFC1944C); - psx_delay_BFC1944C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031450u); -#endif - /* 0xBFC19450: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031450u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031450u); -#endif - if (psx_delay_BFC1944C) { - psx_delay_BFC1944C = 0; - if (psx_taken_BFC1944C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003151Cu); - goto label_BFC1951C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031454u); - } -label_BFC19454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19454: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031454u); -#endif - /* 0xBFC19458: 8F396F74 lw $t9, 28532($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 28532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031458u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396F74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1945C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003145Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19460: 1B20002E blez $t9, 0xBFC1951C */ - uint32_t psx_brA_BFC19460 = cpu->gpr[25]; - psx_taken_BFC19460 = ((int32_t)psx_brA_BFC19460 <= 0); - psx_delay_BFC19460 = 1; - /* 0xBFC19464: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031464u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031464u); -#endif - if (psx_delay_BFC19460) { - psx_delay_BFC19460 = 0; - if (psx_taken_BFC19460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003151Cu); - goto label_BFC1951C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031468u); - } -label_BFC19468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC19468: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031468u); return; } g_debug_last_store_pc = 0x80031468u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80031468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC1946C: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003146Cu); return; } g_debug_last_store_pc = 0x8003146Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC19470: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC19474: 3C12800E lui $s2, 0x800E */ - cpu->gpr[18] = 0x800E0000u; - PGXP_ALU(0x3C12800Eu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC19478: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031478u); return; } g_debug_last_store_pc = 0x80031478u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1947C: 241103FE addiu $s1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x241103FEu, cpu->gpr[17], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC19480: 2652FF70 addiu $s2, $s2, -144 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-144)); - PGXP_ALU(0x2652FF70u, cpu->gpr[18], _pgx1, 0xFFFFFF70u); } -#ifdef PSX_COSIM - cosim_instr(0x80031480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC19484: 26736F78 addiu $s3, $s3, 28536 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (28536)); - PGXP_ALU(0x26736F78u, cpu->gpr[19], _pgx1, 0x00006F78u); } -#ifdef PSX_COSIM - cosim_instr(0x80031484u); -#endif -label_BFC19488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC19488: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031488u); -#endif - /* 0xBFC1948C: 8D089E24 lw $t0, -25052($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003148Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E24u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC19490: 001058C0 sll $t3, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 3u; - PGXP_ALU(0x001058C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC19494: 000848C0 sll $t1, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000848C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC19498: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1949C: 00094A80 sll $t1, $t1, 10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 10u; - PGXP_ALU(0x00094A80u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8003149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC194A0: 01705823 subu $t3, $t3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[16]; - PGXP_ALU(0x01705823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC194A4: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800314A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC194A8: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC194AC: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314B0u); -#endif - /* 0xBFC194B0: 8D8D7074 lw $t5, 28788($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 28788; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (28788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314B0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x8D8D7074u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800314B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC194B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800314B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC194B8: 122D000D beq $s1, $t5, 0xBFC194F0 */ - uint32_t psx_brA_BFC194B8 = cpu->gpr[17]; uint32_t psx_brB_BFC194B8 = cpu->gpr[13]; - psx_taken_BFC194B8 = (psx_brA_BFC194B8 == psx_brB_BFC194B8); - psx_delay_BFC194B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC194BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800314BCu); -#endif - if (psx_delay_BFC194B8) { - psx_delay_BFC194B8 = 0; - if (psx_taken_BFC194B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800314F0u); - goto label_BFC194F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800314C0u); - } -label_BFC194C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC194C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC194C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC194C0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800314C0u); -#endif - /* 0xBFC194C4: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800314C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC194C8: 0010C8C0 sll $t9, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[16] << 3u; - PGXP_ALU(0x0010C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800314C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC194CC: 000E78C0 sll $t7, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800314CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC194D0: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC194D4: 000F7A80 sll $t7, $t7, 10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 10u; - PGXP_ALU(0x000F7A80u, cpu->gpr[15], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x800314D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC194D8: 0330C823 subu $t9, $t9, $s0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[16]; - PGXP_ALU(0x0330C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC194DC: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800314DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1088000u); -#endif - /* 0xBFC194E0: 026FC021 addu $t8, $s3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[19] + cpu->gpr[15]; - PGXP_ALU(0x026FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314E0u); -#endif - /* 0xBFC194E4: 8E840000 lw $a0, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314E4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } - PGXP_LOAD(0x8E840000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800314E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC194E8: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x800314F0u; /* jal link before delay slot */ - psx_delay_BFC194E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC194EC: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314ECu); -#endif - if (psx_delay_BFC194E8) { - psx_delay_BFC194E8 = 0; - cpu->gpr[31] = 0x800314F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC194F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC194F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC194F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800314F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC194F0: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800314F0u); -#endif - /* 0xBFC194F4: 8D086F74 lw $t0, 28532($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 28532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314F4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086F74u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800314F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC194F8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800314F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10102u); -#endif - /* 0xBFC194FC: 0208082A slt $at, $s0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0208082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800314FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19500: 1420FFE1 bne $at, $zero, 0xBFC19488 */ - uint32_t psx_brA_BFC19500 = cpu->gpr[1]; uint32_t psx_brB_BFC19500 = cpu->gpr[0]; - psx_taken_BFC19500 = (psx_brA_BFC19500 != psx_brB_BFC19500); - psx_delay_BFC19500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031504u); -#endif - if (psx_delay_BFC19500) { - psx_delay_BFC19500 = 0; - if (psx_taken_BFC19500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031488u); - goto label_BFC19488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031508u); - } -label_BFC19508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031508u); -#endif - /* 0xBFC19508: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031508u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031508u); -#endif - /* 0xBFC1950C: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003150Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031510u); -#endif - /* 0xBFC19510: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031510u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80031510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031514u); -#endif - /* 0xBFC19518: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031518u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031518u); -#endif -label_BFC1951C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1951Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1951Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003151Cu); -#endif - /* 0xBFC1951C: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003151Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003151Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031520u); -#endif - /* 0xBFC19520: 8FB40018 lw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031520u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80031520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC19524: 03E00008 jr $ra */ - psx_delay_BFC19524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19528: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80031528u); -#endif - if (psx_delay_BFC19524) { - psx_delay_BFC19524 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1952C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1952Cu); - int psx_delay_BFC1953C = 0; - int psx_delay_BFC19574 = 0; - int psx_taken_BFC19574 = 0; - int psx_delay_BFC195D0 = 0; - int psx_taken_BFC195D0 = 0; - int psx_delay_BFC1960C = 0; - int psx_delay_BFC1961C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC19544u: goto label_BFC19544; - case 0xBFC19558u: goto label_BFC19558; - case 0xBFC1957Cu: goto label_BFC1957C; - case 0xBFC19598u: goto label_BFC19598; - case 0xBFC195D8u: goto label_BFC195D8; - case 0xBFC19614u: goto label_BFC19614; - default: break; - } - } -label_BFC1952C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1952Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1952Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1952C: 27BDFF80 addiu $sp, $sp, -128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-128)); - PGXP_ALU(0x27BDFF80u, cpu->gpr[29], _pgx1, 0xFFFFFF80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC19530: AFBF007C sw $ra, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031530u); return; } g_debug_last_store_pc = 0x80031530u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF007Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC19534: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC19538: AFA30080 sw $v1, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031538u); return; } g_debug_last_store_pc = 0x80031538u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30080u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80031538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1953C: 0C00F5B6 jal 0xB003D6D8 */ - cpu->gpr[31] = 0x80031544u; /* jal link before delay slot */ - psx_delay_BFC1953C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC19540: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031540u); -#endif - if (psx_delay_BFC1953C) { - psx_delay_BFC1953C = 0; - cpu->gpr[31] = 0x80031544u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D6D8u); - cpu->pc = 0x8003D6D8u; return; - } -label_BFC19544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031544u); -#endif - /* 0xBFC19544: 8FA30080 lw $v1, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031544u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30080u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80031544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000001u); -#endif - /* 0xBFC19548: 03A0C021 addu $t8, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A0C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8009u); -#endif - /* 0xBFC1954C: 00607821 addu $t7, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00607821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC19550: 25EE0054 addiu $t6, $t7, 84 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[15] + (84)); - PGXP_ALU(0x25EE0054u, cpu->gpr[14], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80031550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC19554: 2464106C addiu $a0, $v1, 4204 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4204)); - PGXP_ALU(0x2464106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031554u); -#endif -label_BFC19558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031558u); -#endif - /* 0xBFC19558: 8DE10000 lw $at, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031558u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1955C: 25EF000C addiu $t7, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (12)); - PGXP_ALU(0x25EF000Cu, cpu->gpr[15], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC19560: AF010004 sw $at, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031560u); return; } g_debug_last_store_pc = 0x80031560u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF010004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031560u); -#endif - /* 0xBFC19564: 8DE1FFF8 lw $at, -8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031564u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19568: 2718000C addiu $t8, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2718000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1956C: AF01FFFC sw $at, -4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003156Cu); return; } g_debug_last_store_pc = 0x8003156Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003156Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031570u); -#endif - /* 0xBFC19570: 8DE1FFFC lw $at, -4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031570u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC19574: 15EEFFF8 bne $t7, $t6, 0xBFC19558 */ - uint32_t psx_brA_BFC19574 = cpu->gpr[15]; uint32_t psx_brB_BFC19574 = cpu->gpr[14]; - psx_taken_BFC19574 = (psx_brA_BFC19574 != psx_brB_BFC19574); - psx_delay_BFC19574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC19578: AF010000 sw $at, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031578u); return; } g_debug_last_store_pc = 0x80031578u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031578u); -#endif - if (psx_delay_BFC19574) { - psx_delay_BFC19574 = 0; - if (psx_taken_BFC19574) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031558u); - goto label_BFC19558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003157Cu); - } -label_BFC1957C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1957Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1957Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003157Cu); -#endif - /* 0xBFC1957C: 8DE10000 lw $at, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003157Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003157Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC19580: 00604021 addu $t0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00604021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC19584: AF010004 sw $at, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031584u); return; } g_debug_last_store_pc = 0x80031584u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF010004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031584u); -#endif - /* 0xBFC19588: 8DEE0004 lw $t6, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031588u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8000u); } - PGXP_LOAD(0x8DEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1958C: 2519000C addiu $t9, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2519000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000201u); -#endif - /* 0xBFC19590: 03A04821 addu $t1, $sp, $zero */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[29] + cpu->gpr[0]; - PGXP_ALU(0x03A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC19594: AF0E0008 sw $t6, 8($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031594u); return; } g_debug_last_store_pc = 0x80031594u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF0E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031594u); -#endif -label_BFC19598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031598u); -#endif - /* 0xBFC19598: 8901005F lwl $at, 95($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 95; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (95)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x8901005Fu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80031598u); -#endif - /* 0xBFC1959C: 9901005C lwr $at, 92($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (92)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x9901005Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003159Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC195A0: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800315A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195A4: A9210063 swl $at, 99($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 99; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (99)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x800315A4u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9210063u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195A8: B9210060 swr $at, 96($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (96)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x800315A8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9210060u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315A8u); -#endif - /* 0xBFC195AC: 89010057 lwl $at, 87($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 87; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (87)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89010057u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315B0u); -#endif - /* 0xBFC195B0: 99010054 lwr $at, 84($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (84)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99010054u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC195B4: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800315B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195B8: A921005B swl $at, 91($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 91; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (91)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x800315B8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA921005Bu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195BC: B9210058 swr $at, 88($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (88)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x800315BCu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9210058u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315C0u); -#endif - /* 0xBFC195C0: 8901005B lwl $at, 91($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 91; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (91)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x8901005Bu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315C0u); -#endif - /* 0xBFC195C4: 99010058 lwr $at, 88($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (88)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99010058u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC195C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800315C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195CC: A921005F swl $at, 95($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 95; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (95)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x800315CCu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA921005Fu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC195D0: 1519FFF1 bne $t0, $t9, 0xBFC19598 */ - uint32_t psx_brA_BFC195D0 = cpu->gpr[8]; uint32_t psx_brB_BFC195D0 = cpu->gpr[25]; - psx_taken_BFC195D0 = (psx_brA_BFC195D0 != psx_brB_BFC195D0); - psx_delay_BFC195D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195D4: B921005C swr $at, 92($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (92)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x800315D4u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB921005Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315D4u); -#endif - if (psx_delay_BFC195D0) { - psx_delay_BFC195D0 = 0; - if (psx_taken_BFC195D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031598u); - goto label_BFC19598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800315D8u); - } -label_BFC195D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC195D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC195D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315D8u); -#endif - /* 0xBFC195D8: 8901005F lwl $at, 95($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 95; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (95)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x8901005Fu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315D8u); -#endif - /* 0xBFC195DC: 9901005C lwr $at, 92($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (92)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x100u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x9901005Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC195E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800315E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195E4: A9210063 swl $at, 99($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 99; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (99)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x800315E4u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9210063u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC195E8: B9210060 swr $at, 96($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (96)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x800315E8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9210060u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800315E8u); -#endif - /* 0xBFC195EC: 89190063 lwl $t9, 99($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 99; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (99)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 25, 0x100u); uint32_t psx_old_rt = cpu->gpr[25]; cpu->gpr[25] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89190063u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800315ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800315F0u); -#endif - /* 0xBFC195F0: 99190060 lwr $t9, 96($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (96)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 25, 0x100u); uint32_t psx_old_rt = cpu->gpr[25]; cpu->gpr[25] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99190060u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800315F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC195F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800315F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC195F8: A9390067 swl $t9, 103($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 103; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (103)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[25] >> psx_shift_bits); g_debug_last_store_pc = 0x800315F8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9390067u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800315F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC195FC: B9390064 swr $t9, 100($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (100)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[25] << psx_shift_bits); g_debug_last_store_pc = 0x800315FCu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9390064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800315FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031600u); -#endif - /* 0xBFC19600: 8FA7000C lw $a3, 12($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031600u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7000Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80031600u); -#endif - /* 0xBFC19604: 8FA60008 lw $a2, 8($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031604u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80031604u); -#endif - /* 0xBFC19608: 8FA50004 lw $a1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031608u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1960C: 0C00F568 jal 0xB003D5A0 */ - cpu->gpr[31] = 0x80031614u; /* jal link before delay slot */ - psx_delay_BFC1960C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031610u); -#endif - if (psx_delay_BFC1960C) { - psx_delay_BFC1960C = 0; - cpu->gpr[31] = 0x80031614u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D5A0u); - cpu->pc = 0x8003D5A0u; return; - } -label_BFC19614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031614u); -#endif - /* 0xBFC19614: 8FBF007C lw $ra, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031614u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF007Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19618: 27BD0080 addiu $sp, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27BD0080u, cpu->gpr[29], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80031618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1961C: 03E00008 jr $ra */ - psx_delay_BFC1961C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031620u); -#endif - if (psx_delay_BFC1961C) { - psx_delay_BFC1961C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC19630(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC19630u); - int psx_delay_BFC19648 = 0; - int psx_taken_BFC19648 = 0; - int psx_delay_BFC19650 = 0; - int psx_delay_BFC19658 = 0; - int psx_delay_BFC1967C = 0; - int psx_taken_BFC1967C = 0; - int psx_delay_BFC19690 = 0; - int psx_taken_BFC19690 = 0; - int psx_delay_BFC196A0 = 0; - int psx_delay_BFC196B0 = 0; - int psx_delay_BFC196C0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC19650u: goto label_BFC19650; - case 0xBFC19658u: goto label_BFC19658; - case 0xBFC19660u: goto label_BFC19660; - case 0xBFC19684u: goto label_BFC19684; - case 0xBFC19688u: goto label_BFC19688; - case 0xBFC19698u: goto label_BFC19698; - case 0xBFC1969Cu: goto label_BFC1969C; - case 0xBFC196A8u: goto label_BFC196A8; - case 0xBFC196B8u: goto label_BFC196B8; - default: break; - } - } -label_BFC19630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19630: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031630u); -#endif - /* 0xBFC19634: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031634u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19638: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1963C: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003163Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC19640: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031640u); return; } g_debug_last_store_pc = 0x80031640u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19644: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031644u); return; } g_debug_last_store_pc = 0x80031644u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC19648: 11C1001B beq $t6, $at, 0xBFC196B8 */ - uint32_t psx_brA_BFC19648 = cpu->gpr[14]; uint32_t psx_brB_BFC19648 = cpu->gpr[1]; - psx_taken_BFC19648 = (psx_brA_BFC19648 == psx_brB_BFC19648); - psx_delay_BFC19648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1964C: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003164Cu); return; } g_debug_last_store_pc = 0x8003164Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003164Cu); -#endif - if (psx_delay_BFC19648) { - psx_delay_BFC19648 = 0; - if (psx_taken_BFC19648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316B8u); - goto label_BFC196B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031650u); - } -label_BFC19650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19650: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x80031658u; /* jal link before delay slot */ - psx_delay_BFC19650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031654u); -#endif - if (psx_delay_BFC19650) { - psx_delay_BFC19650 = 0; - cpu->gpr[31] = 0x80031658u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC19658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19658: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80031660u; /* jal link before delay slot */ - psx_delay_BFC19658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1965C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003165Cu); -#endif - if (psx_delay_BFC19658) { - psx_delay_BFC19658 = 0; - cpu->gpr[31] = 0x80031660u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC19660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031660u); -#endif - /* 0xBFC19660: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031660u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031660u); -#endif - /* 0xBFC19664: 844F0042 lh $t7, 66($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031664u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x844F0042u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031664u); -#endif - /* 0xBFC19668: 84980046 lh $t8, 70($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031668u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980046u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031668u); -#endif - /* 0xBFC1966C: 84890048 lh $t1, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003166Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x84890048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003166Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031670u); -#endif - /* 0xBFC19670: 84480044 lh $t0, 68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031670u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x84480044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC19674: 00095040 sll $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 1u; - PGXP_ALU(0x00095040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80031674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19678: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1967C: 07010002 bgez $t8, 0xBFC19688 */ - uint32_t psx_brA_BFC1967C = cpu->gpr[24]; - psx_taken_BFC1967C = ((int32_t)psx_brA_BFC1967C >= 0); - psx_delay_BFC1967C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000003u); -#endif - /* 0xBFC19680: 03000821 addu $at, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031680u); -#endif - if (psx_delay_BFC1967C) { - psx_delay_BFC1967C = 0; - if (psx_taken_BFC1967C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031688u); - goto label_BFC19688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031684u); - } -label_BFC19684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19684: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031684u); -#endif -label_BFC19688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC19688: 0001C843 sra $t9, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C843u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80031688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008020u); -#endif - /* 0xBFC1968C: 01F92821 addu $a1, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[25]; - PGXP_ALU(0x01F92821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC19690: 05410002 bgez $t2, 0xBFC1969C */ - uint32_t psx_brA_BFC19690 = cpu->gpr[10]; - psx_taken_BFC19690 = ((int32_t)psx_brA_BFC19690 >= 0); - psx_delay_BFC19690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC19694: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031694u); -#endif - if (psx_delay_BFC19690) { - psx_delay_BFC19690 = 0; - if (psx_taken_BFC19690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003169Cu); - goto label_BFC1969C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031698u); - } -label_BFC19698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19698: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031698u); -#endif -label_BFC1969C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1969Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1969Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1969C: 00015883 sra $t3, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00015883u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC196A0: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x800316A8u; /* jal link before delay slot */ - psx_delay_BFC196A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x940u); -#endif - /* 0xBFC196A4: 010B3021 addu $a2, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[11]; - PGXP_ALU(0x010B3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800316A4u); -#endif - if (psx_delay_BFC196A0) { - psx_delay_BFC196A0 = 0; - cpu->gpr[31] = 0x800316A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC196A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC196A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC196A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316A8u); -#endif - /* 0xBFC196A8: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316A8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800316A8u); -#endif - /* 0xBFC196AC: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316ACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800316ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC196B0: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x800316B8u; /* jal link before delay slot */ - psx_delay_BFC196B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC196B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800316B4u); -#endif - if (psx_delay_BFC196B0) { - psx_delay_BFC196B0 = 0; - cpu->gpr[31] = 0x800316B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC196B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC196B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC196B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316B8u); -#endif - /* 0xBFC196B8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800316B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC196BC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800316BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC196C0: 03E00008 jr $ra */ - psx_delay_BFC196C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC196C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800316C4u); -#endif - if (psx_delay_BFC196C0) { - psx_delay_BFC196C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC196C8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC196C8u); - int psx_delay_BFC196CC = 0; -label_BFC196C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC196C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC196C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC196C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800316C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC196CC: 03E00008 jr $ra */ - psx_delay_BFC196CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC196D0: AC249E2C sw $a0, -25044($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25044; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316D0u); return; } g_debug_last_store_pc = 0x800316D0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249E2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800316D0u); -#endif - if (psx_delay_BFC196CC) { - psx_delay_BFC196CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC196D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC196D4u); - int psx_delay_BFC196EC = 0; - int psx_taken_BFC196EC = 0; - int psx_delay_BFC196FC = 0; - int psx_taken_BFC196FC = 0; - int psx_delay_BFC19704 = 0; - int psx_taken_BFC19704 = 0; - int psx_delay_BFC19724 = 0; - int psx_delay_BFC19734 = 0; - int psx_taken_BFC19734 = 0; - int psx_delay_BFC1974C = 0; - int psx_delay_BFC19768 = 0; - int psx_delay_BFC19778 = 0; - int psx_taken_BFC19778 = 0; - int psx_delay_BFC19794 = 0; - int psx_delay_BFC197B4 = 0; - int psx_taken_BFC197B4 = 0; - int psx_delay_BFC197C0 = 0; - int psx_taken_BFC197C0 = 0; - int psx_delay_BFC197D0 = 0; - int psx_taken_BFC197D0 = 0; - int psx_delay_BFC197DC = 0; - int psx_taken_BFC197DC = 0; - int psx_delay_BFC1982C = 0; - int psx_taken_BFC1982C = 0; - int psx_delay_BFC19834 = 0; - int psx_taken_BFC19834 = 0; - int psx_delay_BFC19934 = 0; - int psx_taken_BFC19934 = 0; - int psx_delay_BFC1993C = 0; - int psx_taken_BFC1993C = 0; - int psx_delay_BFC19950 = 0; - int psx_taken_BFC19950 = 0; - int psx_delay_BFC19960 = 0; - int psx_taken_BFC19960 = 0; - int psx_delay_BFC1997C = 0; - int psx_taken_BFC1997C = 0; - int psx_delay_BFC19990 = 0; - int psx_taken_BFC19990 = 0; - int psx_delay_BFC199BC = 0; - int psx_taken_BFC199BC = 0; - int psx_delay_BFC199D0 = 0; - int psx_taken_BFC199D0 = 0; - int psx_delay_BFC199DC = 0; - int psx_taken_BFC199DC = 0; - int psx_delay_BFC199F4 = 0; - int psx_delay_BFC19A10 = 0; - int psx_delay_BFC19A24 = 0; - int psx_delay_BFC19A30 = 0; - int psx_delay_BFC19A3C = 0; - int psx_delay_BFC19A50 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC196F4u: goto label_BFC196F4; - case 0xBFC19704u: goto label_BFC19704; - case 0xBFC1970Cu: goto label_BFC1970C; - case 0xBFC1972Cu: goto label_BFC1972C; - case 0xBFC1973Cu: goto label_BFC1973C; - case 0xBFC19754u: goto label_BFC19754; - case 0xBFC19760u: goto label_BFC19760; - case 0xBFC19770u: goto label_BFC19770; - case 0xBFC19780u: goto label_BFC19780; - case 0xBFC1979Cu: goto label_BFC1979C; - case 0xBFC197ACu: goto label_BFC197AC; - case 0xBFC197BCu: goto label_BFC197BC; - case 0xBFC197C8u: goto label_BFC197C8; - case 0xBFC197CCu: goto label_BFC197CC; - case 0xBFC197D8u: goto label_BFC197D8; - case 0xBFC197E4u: goto label_BFC197E4; - case 0xBFC197F0u: goto label_BFC197F0; - case 0xBFC19834u: goto label_BFC19834; - case 0xBFC1983Cu: goto label_BFC1983C; - case 0xBFC19840u: goto label_BFC19840; - case 0xBFC19848u: goto label_BFC19848; - case 0xBFC1993Cu: goto label_BFC1993C; - case 0xBFC19944u: goto label_BFC19944; - case 0xBFC19958u: goto label_BFC19958; - case 0xBFC19960u: goto label_BFC19960; - case 0xBFC19968u: goto label_BFC19968; - case 0xBFC19970u: goto label_BFC19970; - case 0xBFC19984u: goto label_BFC19984; - case 0xBFC19998u: goto label_BFC19998; - case 0xBFC1999Cu: goto label_BFC1999C; - case 0xBFC199C4u: goto label_BFC199C4; - case 0xBFC199D8u: goto label_BFC199D8; - case 0xBFC199DCu: goto label_BFC199DC; - case 0xBFC199E4u: goto label_BFC199E4; - case 0xBFC199E8u: goto label_BFC199E8; - case 0xBFC199FCu: goto label_BFC199FC; - case 0xBFC19A18u: goto label_BFC19A18; - case 0xBFC19A2Cu: goto label_BFC19A2C; - case 0xBFC19A38u: goto label_BFC19A38; - case 0xBFC19A44u: goto label_BFC19A44; - case 0xBFC19A48u: goto label_BFC19A48; - default: break; - } - } -label_BFC196D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC196D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC196D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC196D4: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x800316D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC196D8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316D8u); return; } g_debug_last_store_pc = 0x800316D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800316D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC196DC: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316DCu); return; } g_debug_last_store_pc = 0x800316DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800316DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC196E0: AFA60050 sw $a2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316E0u); return; } g_debug_last_store_pc = 0x800316E0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60050u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800316E0u); -#endif - /* 0xBFC196E4: 84AE0010 lh $t6, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800316E4u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x84AE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800316E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC196E8: 24020008 addiu $v0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24020008u, cpu->gpr[2], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800316E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC196EC: 144E0007 bne $v0, $t6, 0xBFC1970C */ - uint32_t psx_brA_BFC196EC = cpu->gpr[2]; uint32_t psx_brB_BFC196EC = cpu->gpr[14]; - psx_taken_BFC196EC = (psx_brA_BFC196EC != psx_brB_BFC196EC); - psx_delay_BFC196EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC196F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800316F0u); -#endif - if (psx_delay_BFC196EC) { - psx_delay_BFC196EC = 0; - if (psx_taken_BFC196EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003170Cu); - goto label_BFC1970C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316F4u); - } -label_BFC196F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC196F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC196F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800316F4u); -#endif - /* 0xBFC196F4: 84AF0012 lh $t7, 18($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800316F4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20u); } - PGXP_LOAD(0x84AF0012u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800316F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC196F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800316F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC196FC: 144F0003 bne $v0, $t7, 0xBFC1970C */ - uint32_t psx_brA_BFC196FC = cpu->gpr[2]; uint32_t psx_brB_BFC196FC = cpu->gpr[15]; - psx_taken_BFC196FC = (psx_brA_BFC196FC != psx_brB_BFC196FC); - psx_delay_BFC196FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19700: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031700u); -#endif - if (psx_delay_BFC196FC) { - psx_delay_BFC196FC = 0; - if (psx_taken_BFC196FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003170Cu); - goto label_BFC1970C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031704u); - } -label_BFC19704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19704: 100000D0 beq $zero, $zero, 0xBFC19A48 */ - uint32_t psx_brA_BFC19704 = cpu->gpr[0]; uint32_t psx_brB_BFC19704 = cpu->gpr[0]; - psx_taken_BFC19704 = (psx_brA_BFC19704 == psx_brB_BFC19704); - psx_delay_BFC19704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19708: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031708u); -#endif - if (psx_delay_BFC19704) { - psx_delay_BFC19704 = 0; - if (psx_taken_BFC19704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031A48u); - goto label_BFC19A48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003170Cu); - } -label_BFC1970C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1970Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1970Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003170Cu); -#endif - /* 0xBFC1970C: 8CAC0034 lw $t4, 52($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003170Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x8CAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003170Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC19710: 24AA0040 addiu $t2, $a1, 64 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[5] + (64)); - PGXP_ALU(0x24AA0040u, cpu->gpr[10], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80031710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC19714: 318CFFF3 andi $t4, $t4, 0xFFF3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] & 0xFFF3u; - PGXP_ALU(0x318CFFF3u, cpu->gpr[12], _pgx1, 0xFFF3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19718: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031718u); return; } g_debug_last_store_pc = 0x80031718u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC1971C: AFAA0028 sw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003171Cu); return; } g_debug_last_store_pc = 0x8003171Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC19720: AFA5004C sw $a1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031720u); return; } g_debug_last_store_pc = 0x80031720u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5004Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19724: 0C016A4C jal 0xB005A930 */ - cpu->gpr[31] = 0x8003172Cu; /* jal link before delay slot */ - psx_delay_BFC19724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC19728: 24040044 addiu $a0, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24040044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80031728u); -#endif - if (psx_delay_BFC19724) { - psx_delay_BFC19724 = 0; - cpu->gpr[31] = 0x8003172Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A930u); - cpu->pc = 0x8005A930u; return; - } -label_BFC1972C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1972Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003172Cu); -#endif - /* 0xBFC1972C: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003172Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031730u); -#endif - /* 0xBFC19730: 8FAC0038 lw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031730u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19734: 1440000A bne $v0, $zero, 0xBFC19760 */ - uint32_t psx_brA_BFC19734 = cpu->gpr[2]; uint32_t psx_brB_BFC19734 = cpu->gpr[0]; - psx_taken_BFC19734 = (psx_brA_BFC19734 != psx_brB_BFC19734); - psx_delay_BFC19734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC19738: AFA20034 sw $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031738u); return; } g_debug_last_store_pc = 0x80031738u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031738u); -#endif - if (psx_delay_BFC19734) { - psx_delay_BFC19734 = 0; - if (psx_taken_BFC19734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031760u); - goto label_BFC19760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003173Cu); - } -label_BFC1973C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1973Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1973Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003173Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1973C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003173Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19740: AFAA0028 sw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031740u); return; } g_debug_last_store_pc = 0x80031740u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19744: 2484668C addiu $a0, $a0, 26252 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26252)); - PGXP_ALU(0x2484668Cu, cpu->gpr[4], _pgx1, 0x0000668Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19748: 24050044 addiu $a1, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24050044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80031748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1974C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80031754u; /* jal link before delay slot */ - psx_delay_BFC1974C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19750: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031750u); return; } g_debug_last_store_pc = 0x80031750u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031750u); -#endif - if (psx_delay_BFC1974C) { - psx_delay_BFC1974C = 0; - cpu->gpr[31] = 0x80031754u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC19754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031754u); -#endif - /* 0xBFC19754: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031754u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031754u); -#endif - /* 0xBFC19758: 8FAC0038 lw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031758u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1975C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003175Cu); -#endif -label_BFC19760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19760: AFAA0028 sw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031760u); return; } g_debug_last_store_pc = 0x80031760u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1011u); -#endif - /* 0xBFC19764: 01802021 addu $a0, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19768: 0C016A4C jal 0xB005A930 */ - cpu->gpr[31] = 0x80031770u; /* jal link before delay slot */ - psx_delay_BFC19768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC1976C: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003176Cu); return; } g_debug_last_store_pc = 0x8003176Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003176Cu); -#endif - if (psx_delay_BFC19768) { - psx_delay_BFC19768 = 0; - cpu->gpr[31] = 0x80031770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A930u); - cpu->pc = 0x8005A930u; return; - } -label_BFC19770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031770u); -#endif - /* 0xBFC19770: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031770u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031770u); -#endif - /* 0xBFC19774: 8FAC0038 lw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031774u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19778: 1440000C bne $v0, $zero, 0xBFC197AC */ - uint32_t psx_brA_BFC19778 = cpu->gpr[2]; uint32_t psx_brB_BFC19778 = cpu->gpr[0]; - psx_taken_BFC19778 = (psx_brA_BFC19778 != psx_brB_BFC19778); - psx_delay_BFC19778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x805u); -#endif - /* 0xBFC1977C: 00405821 addu $t3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00405821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003177Cu); -#endif - if (psx_delay_BFC19778) { - psx_delay_BFC19778 = 0; - if (psx_taken_BFC19778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317ACu); - goto label_BFC197AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031780u); - } -label_BFC19780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19780: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19784: AFAA0028 sw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031784u); return; } g_debug_last_store_pc = 0x80031784u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC19788: AFAB002C sw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031788u); return; } g_debug_last_store_pc = 0x80031788u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1978C: 248466A4 addiu $a0, $a0, 26276 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26276)); - PGXP_ALU(0x248466A4u, cpu->gpr[4], _pgx1, 0x000066A4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003178Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1021u); -#endif - /* 0xBFC19790: 01802821 addu $a1, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19794: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003179Cu; /* jal link before delay slot */ - psx_delay_BFC19794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19798: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031798u); return; } g_debug_last_store_pc = 0x80031798u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031798u); -#endif - if (psx_delay_BFC19794) { - psx_delay_BFC19794 = 0; - cpu->gpr[31] = 0x8003179Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC1979C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1979Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003179Cu); -#endif - /* 0xBFC1979C: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003179Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003179Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317A0u); -#endif - /* 0xBFC197A0: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800317A0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800317A0u); -#endif - /* 0xBFC197A4: 8FAC0038 lw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800317A4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800317A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC197A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800317A8u); -#endif -label_BFC197AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317ACu); -#endif - /* 0xBFC197AC: 8FB80050 lw $t8, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800317ACu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80050u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800317ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC197B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800317B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC197B4: 13000063 beq $t8, $zero, 0xBFC19944 */ - uint32_t psx_brA_BFC197B4 = cpu->gpr[24]; uint32_t psx_brB_BFC197B4 = cpu->gpr[0]; - psx_taken_BFC197B4 = (psx_brA_BFC197B4 == psx_brB_BFC197B4); - psx_delay_BFC197B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC197B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800317B8u); -#endif - if (psx_delay_BFC197B4) { - psx_delay_BFC197B4 = 0; - if (psx_taken_BFC197B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031944u); - goto label_BFC19944; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317BCu); - } -label_BFC197BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC197BC: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800317BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC197C0: 05810002 bgez $t4, 0xBFC197CC */ - uint32_t psx_brA_BFC197C0 = cpu->gpr[12]; - psx_taken_BFC197C0 = ((int32_t)psx_brA_BFC197C0 >= 0); - psx_delay_BFC197C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1003u); -#endif - /* 0xBFC197C4: 01800821 addu $at, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800317C4u); -#endif - if (psx_delay_BFC197C0) { - psx_delay_BFC197C0 = 0; - if (psx_taken_BFC197C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317CCu); - goto label_BFC197CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317C8u); - } -label_BFC197C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC197C8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800317C8u); -#endif -label_BFC197CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC197CC: 00014843 sra $t1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00014843u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800317CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC197D0: 19200085 blez $t1, 0xBFC199E8 */ - uint32_t psx_brA_BFC197D0 = cpu->gpr[9]; - psx_taken_BFC197D0 = ((int32_t)psx_brA_BFC197D0 <= 0); - psx_delay_BFC197D0 = 1; - /* 0xBFC197D4: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800317D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800317D4u); -#endif - if (psx_delay_BFC197D0) { - psx_delay_BFC197D0 = 0; - if (psx_taken_BFC197D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319E8u); - goto label_BFC199E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317D8u); - } -label_BFC197D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC197D8: 31230003 andi $v1, $t1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] & 0x3u; - PGXP_ALU(0x31230003u, cpu->gpr[3], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800317D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC197DC: 10600018 beq $v1, $zero, 0xBFC19840 */ - uint32_t psx_brA_BFC197DC = cpu->gpr[3]; uint32_t psx_brB_BFC197DC = cpu->gpr[0]; - psx_taken_BFC197DC = (psx_brA_BFC197DC == psx_brB_BFC197DC); - psx_delay_BFC197DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC197E0: 0008C840 sll $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 1u; - PGXP_ALU(0x0008C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800317E0u); -#endif - if (psx_delay_BFC197DC) { - psx_delay_BFC197DC = 0; - if (psx_taken_BFC197DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031840u); - goto label_BFC19840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317E4u); - } -label_BFC197E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC197E4: 0008C840 sll $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 1u; - PGXP_ALU(0x0008C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800317E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000840u); -#endif - /* 0xBFC197E8: 01793021 addu $a2, $t3, $t9 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[11] + cpu->gpr[25]; - PGXP_ALU(0x01793021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800317E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x580u); -#endif - /* 0xBFC197EC: 01483821 addu $a3, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01483821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800317ECu); -#endif -label_BFC197F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC197F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC197F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800317F0u); -#endif - /* 0xBFC197F0: 80E20000 lb $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x80E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800317F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC197F4: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800317F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC197F8: 304D00C0 andi $t5, $v0, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xC0u; - PGXP_ALU(0x304D00C0u, cpu->gpr[13], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x800317F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC197FC: 304F0030 andi $t7, $v0, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x30u; - PGXP_ALU(0x304F0030u, cpu->gpr[15], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x800317FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC19800: 000FC103 sra $t8, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] >> 4u); - PGXP_ALU(0x000FC103u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC19804: 000D7083 sra $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] >> 2u); - PGXP_ALU(0x000D7083u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC19808: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC1980C: A0D90000 sb $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003180Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031810u); -#endif - /* 0xBFC19810: 80E20000 lb $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x80E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC19814: 24C60002 addiu $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (2)); - PGXP_ALU(0x24C60002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80031814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC19818: 304D000C andi $t5, $v0, 0xC */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xCu; - PGXP_ALU(0x304D000Cu, cpu->gpr[13], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC1981C: 000D7880 sll $t7, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC19820: 304E0003 andi $t6, $v0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x3u; - PGXP_ALU(0x304E0003u, cpu->gpr[14], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC19824: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC19828: A0D8FFFF sb $t8, -1($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031828u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-1)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0D8FFFFu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC1982C: 1468FFF0 bne $v1, $t0, 0xBFC197F0 */ - uint32_t psx_brA_BFC1982C = cpu->gpr[3]; uint32_t psx_brB_BFC1982C = cpu->gpr[8]; - psx_taken_BFC1982C = (psx_brA_BFC1982C != psx_brB_BFC1982C); - psx_delay_BFC1982C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC19830: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031830u); -#endif - if (psx_delay_BFC1982C) { - psx_delay_BFC1982C = 0; - if (psx_taken_BFC1982C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800317F0u); - goto label_BFC197F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031834u); - } -label_BFC19834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC19834: 1109006C beq $t0, $t1, 0xBFC199E8 */ - uint32_t psx_brA_BFC19834 = cpu->gpr[8]; uint32_t psx_brB_BFC19834 = cpu->gpr[9]; - psx_taken_BFC19834 = (psx_brA_BFC19834 == psx_brB_BFC19834); - psx_delay_BFC19834 = 1; - /* 0xBFC19838: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031838u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031838u); -#endif - if (psx_delay_BFC19834) { - psx_delay_BFC19834 = 0; - if (psx_taken_BFC19834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319E8u); - goto label_BFC199E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003183Cu); - } -label_BFC1983C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1983Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1983Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1983C: 0008C840 sll $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 1u; - PGXP_ALU(0x0008C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003183Cu); -#endif -label_BFC19840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000840u); -#endif - /* 0xBFC19840: 01793021 addu $a2, $t3, $t9 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[11] + cpu->gpr[25]; - PGXP_ALU(0x01793021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x580u); -#endif - /* 0xBFC19844: 01483821 addu $a3, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01483821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031844u); -#endif -label_BFC19848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031848u); -#endif - /* 0xBFC19848: 80E20000 lb $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x80E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1984C: 25080004 addiu $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (4)); - PGXP_ALU(0x25080004u, cpu->gpr[8], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003184Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC19850: 304D00C0 andi $t5, $v0, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xC0u; - PGXP_ALU(0x304D00C0u, cpu->gpr[13], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC19854: 304E0030 andi $t6, $v0, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x30u; - PGXP_ALU(0x304E0030u, cpu->gpr[14], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x80031854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC19858: 000EC103 sra $t8, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[14] >> 4u); - PGXP_ALU(0x000EC103u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC1985C: 000D7883 sra $t7, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[13] >> 2u); - PGXP_ALU(0x000D7883u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003185Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC19860: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC19864: A0D90000 sb $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031864u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031864u); -#endif - /* 0xBFC19868: 80E20000 lb $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x80E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1986C: 24C60008 addiu $a2, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (8)); - PGXP_ALU(0x24C60008u, cpu->gpr[6], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC19870: 304D000C andi $t5, $v0, 0xC */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0xCu; - PGXP_ALU(0x304D000Cu, cpu->gpr[13], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC19874: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC19878: 304F0003 andi $t7, $v0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x3u; - PGXP_ALU(0x304F0003u, cpu->gpr[15], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC1987C: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003187Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC19880: A0D8FFF9 sb $t8, -7($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031880u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-7)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0D8FFF9u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031880u); -#endif - /* 0xBFC19884: 80E30001 lb $v1, 1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (1)), 3, 0x80u); - PGXP_LOAD(0x80E30001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80031884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC19888: 24E70004 addiu $a3, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (4)); - PGXP_ALU(0x24E70004u, cpu->gpr[7], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80031888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1988C: 307900C0 andi $t9, $v1, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xC0u; - PGXP_ALU(0x307900C0u, cpu->gpr[25], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC19890: 306E0030 andi $t6, $v1, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0x30u; - PGXP_ALU(0x306E0030u, cpu->gpr[14], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x80031890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC19894: 000E7903 sra $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 4u); - PGXP_ALU(0x000E7903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC19898: 00196883 sra $t5, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[25] >> 2u); - PGXP_ALU(0x00196883u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC1989C: 01AFC025 or $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] | cpu->gpr[15]; - PGXP_ALU(0x01AFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC198A0: A0D8FFFA sb $t8, -6($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800318A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-6)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0D8FFFAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800318A0u); -#endif - /* 0xBFC198A4: 80E3FFFD lb $v1, -3($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -3; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-3)), 3, 0x80u); - PGXP_LOAD(0x80E3FFFDu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800318A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC198A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800318A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC198AC: 3079000C andi $t9, $v1, 0xC */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] & 0xCu; - PGXP_ALU(0x3079000Cu, cpu->gpr[25], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800318ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC198B0: 00197080 sll $t6, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00197080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800318B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC198B4: 306D0003 andi $t5, $v1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] & 0x3u; - PGXP_ALU(0x306D0003u, cpu->gpr[13], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800318B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC198B8: 01CD7825 or $t7, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[13]; - PGXP_ALU(0x01CD7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800318B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC198BC: A0CFFFFB sb $t7, -5($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800318BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-5)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA0CFFFFBu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800318BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318C0u); -#endif - /* 0xBFC198C0: 80E4FFFE lb $a0, -2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -2; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-2)), 4, 0x80u); - PGXP_LOAD(0x80E4FFFEu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800318C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC198C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800318C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC198C8: 309800C0 andi $t8, $a0, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xC0u; - PGXP_ALU(0x309800C0u, cpu->gpr[24], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x800318C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC198CC: 308E0030 andi $t6, $a0, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x30u; - PGXP_ALU(0x308E0030u, cpu->gpr[14], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x800318CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC198D0: 000E6903 sra $t5, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[14] >> 4u); - PGXP_ALU(0x000E6903u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800318D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC198D4: 0018C883 sra $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] >> 2u); - PGXP_ALU(0x0018C883u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800318D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200A000u); -#endif - /* 0xBFC198D8: 032D7825 or $t7, $t9, $t5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[13]; - PGXP_ALU(0x032D7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800318D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC198DC: A0CFFFFC sb $t7, -4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800318DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-4)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA0CFFFFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800318DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318E0u); -#endif - /* 0xBFC198E0: 80E4FFFE lb $a0, -2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -2; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-2)), 4, 0x80u); - PGXP_LOAD(0x80E4FFFEu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800318E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC198E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800318E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC198E8: 3098000C andi $t8, $a0, 0xC */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] & 0xCu; - PGXP_ALU(0x3098000Cu, cpu->gpr[24], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800318E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC198EC: 00187080 sll $t6, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00187080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800318ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800318F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC198F0: 30990003 andi $t9, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x3u; - PGXP_ALU(0x30990003u, cpu->gpr[25], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800318F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006000u); -#endif - /* 0xBFC198F4: 01D96825 or $t5, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D96825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800318F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC198F8: A0CDFFFD sb $t5, -3($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800318F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-3)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA0CDFFFDu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800318F8u); -#endif - /* 0xBFC198FC: 80E5FFFF lb $a1, -1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -1; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-1)), 5, 0x80u); - PGXP_LOAD(0x80E5FFFFu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800318FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19900: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC19904: 30AF00C0 andi $t7, $a1, 0xC0 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xC0u; - PGXP_ALU(0x30AF00C0u, cpu->gpr[15], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC19908: 30AE0030 andi $t6, $a1, 0x30 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0x30u; - PGXP_ALU(0x30AE0030u, cpu->gpr[14], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x80031908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC1990C: 000EC903 sra $t9, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[14] >> 4u); - PGXP_ALU(0x000EC903u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003190Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC19910: 000FC083 sra $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] >> 2u); - PGXP_ALU(0x000FC083u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002000u); -#endif - /* 0xBFC19914: 03196825 or $t5, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03196825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC19918: A0CDFFFE sb $t5, -2($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031918u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-2)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA0CDFFFEu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031918u); -#endif - /* 0xBFC1991C: 80E5FFFF lb $a1, -1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -1; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-1)), 5, 0x80u); - PGXP_LOAD(0x80E5FFFFu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003191Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC19924: 30AF000C andi $t7, $a1, 0xC */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xCu; - PGXP_ALU(0x30AF000Cu, cpu->gpr[15], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC19928: 000F7080 sll $t6, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC1992C: 30B80003 andi $t8, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30B80003u, cpu->gpr[24], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC19930: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC19934: 1509FFC4 bne $t0, $t1, 0xBFC19848 */ - uint32_t psx_brA_BFC19934 = cpu->gpr[8]; uint32_t psx_brB_BFC19934 = cpu->gpr[9]; - psx_taken_BFC19934 = (psx_brA_BFC19934 != psx_brB_BFC19934); - psx_delay_BFC19934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC19938: A0D9FFFF sb $t9, -1($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031938u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0D9FFFFu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031938u); -#endif - if (psx_delay_BFC19934) { - psx_delay_BFC19934 = 0; - if (psx_taken_BFC19934) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031848u); - goto label_BFC19848; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003193Cu); - } -label_BFC1993C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1993Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1993C: 1000002A beq $zero, $zero, 0xBFC199E8 */ - uint32_t psx_brA_BFC1993C = cpu->gpr[0]; uint32_t psx_brB_BFC1993C = cpu->gpr[0]; - psx_taken_BFC1993C = (psx_brA_BFC1993C == psx_brB_BFC1993C); - psx_delay_BFC1993C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031940u); -#endif - /* 0xBFC19940: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031940u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031940u); -#endif - if (psx_delay_BFC1993C) { - psx_delay_BFC1993C = 0; - if (psx_taken_BFC1993C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319E8u); - goto label_BFC199E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031944u); - } -label_BFC19944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031944u); -#endif - /* 0xBFC19944: 81420000 lb $v0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (0)), 2, 0x400u); - PGXP_LOAD(0x81420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1994C: 3042000F andi $v0, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19950: 14400003 bne $v0, $zero, 0xBFC19960 */ - uint32_t psx_brA_BFC19950 = cpu->gpr[2]; uint32_t psx_brB_BFC19950 = cpu->gpr[0]; - psx_taken_BFC19950 = (psx_brA_BFC19950 != psx_brB_BFC19950); - psx_delay_BFC19950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC19954: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031954u); -#endif - if (psx_delay_BFC19950) { - psx_delay_BFC19950 = 0; - if (psx_taken_BFC19950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031960u); - goto label_BFC19960; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031958u); - } -label_BFC19958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19958: 24020010 addiu $v0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24020010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80031958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1995C: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003195Cu); -#endif -label_BFC19960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC19960: 19800020 blez $t4, 0xBFC199E4 */ - uint32_t psx_brA_BFC19960 = cpu->gpr[12]; - psx_taken_BFC19960 = ((int32_t)psx_brA_BFC19960 <= 0); - psx_delay_BFC19960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC19964: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031964u); -#endif - if (psx_delay_BFC19960) { - psx_delay_BFC19960 = 0; - if (psx_taken_BFC19960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319E4u); - goto label_BFC199E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031968u); - } -label_BFC19968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x481u); -#endif - /* 0xBFC19968: 01403821 addu $a3, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x809u); -#endif - /* 0xBFC1996C: 01601821 addu $v1, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01601821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003196Cu); -#endif -label_BFC19970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031970u); -#endif - /* 0xBFC19970: 80ED0000 lb $t5, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 13, 0x80u); - PGXP_LOAD(0x80ED0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC19974: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC19978: 31AF00F0 andi $t7, $t5, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] & 0xF0u; - PGXP_ALU(0x31AF00F0u, cpu->gpr[15], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1997C: 1C400007 bgtz $v0, 0xBFC1999C */ - uint32_t psx_brA_BFC1997C = cpu->gpr[2]; - psx_taken_BFC1997C = ((int32_t)psx_brA_BFC1997C > 0); - psx_delay_BFC1997C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC19980: A06F0000 sb $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031980u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031980u); -#endif - if (psx_delay_BFC1997C) { - psx_delay_BFC1997C = 0; - if (psx_taken_BFC1997C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003199Cu); - goto label_BFC1999C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031984u); - } -label_BFC19984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031984u); -#endif - /* 0xBFC19984: 80E20001 lb $v0, 1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (1)), 2, 0x80u); - PGXP_LOAD(0x80E20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC19988: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1998C: 3042000F andi $v0, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003198Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19990: 14400002 bne $v0, $zero, 0xBFC1999C */ - uint32_t psx_brA_BFC19990 = cpu->gpr[2]; uint32_t psx_brB_BFC19990 = cpu->gpr[0]; - psx_taken_BFC19990 = (psx_brA_BFC19990 != psx_brB_BFC19990); - psx_delay_BFC19990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031994u); -#endif - if (psx_delay_BFC19990) { - psx_delay_BFC19990 = 0; - if (psx_taken_BFC19990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003199Cu); - goto label_BFC1999C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031998u); - } -label_BFC19998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19998: 24020010 addiu $v0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24020010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80031998u); -#endif -label_BFC1999C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1999Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003199Cu); -#endif - /* 0xBFC1999C: 80F80000 lb $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 24, 0x80u); - PGXP_LOAD(0x80F80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003199Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319A0u); -#endif - /* 0xBFC199A0: 806E0000 lb $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x806E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800319A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC199A4: 331900F0 andi $t9, $t8, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xF0u; - PGXP_ALU(0x331900F0u, cpu->gpr[25], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800319A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC199A8: 00196903 sra $t5, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[25] >> 4u); - PGXP_ALU(0x00196903u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800319A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC199AC: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800319ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC199B0: 01CD7825 or $t7, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[13]; - PGXP_ALU(0x01CD7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800319B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC199B4: A06F0000 sb $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800319B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800319B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC199B8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800319B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC199BC: 1C400007 bgtz $v0, 0xBFC199DC */ - uint32_t psx_brA_BFC199BC = cpu->gpr[2]; - psx_taken_BFC199BC = ((int32_t)psx_brA_BFC199BC > 0); - psx_delay_BFC199BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC199C0: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800319C0u); -#endif - if (psx_delay_BFC199BC) { - psx_delay_BFC199BC = 0; - if (psx_taken_BFC199BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319DCu); - goto label_BFC199DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319C4u); - } -label_BFC199C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319C4u); -#endif - /* 0xBFC199C4: 80E20001 lb $v0, 1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 1; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (1)), 2, 0x80u); - PGXP_LOAD(0x80E20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800319C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC199C8: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800319C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC199CC: 3042000F andi $v0, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800319CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC199D0: 14400002 bne $v0, $zero, 0xBFC199DC */ - uint32_t psx_brA_BFC199D0 = cpu->gpr[2]; uint32_t psx_brB_BFC199D0 = cpu->gpr[0]; - psx_taken_BFC199D0 = (psx_brA_BFC199D0 != psx_brB_BFC199D0); - psx_delay_BFC199D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC199D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800319D4u); -#endif - if (psx_delay_BFC199D0) { - psx_delay_BFC199D0 = 0; - if (psx_taken_BFC199D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319DCu); - goto label_BFC199DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319D8u); - } -label_BFC199D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC199D8: 24020010 addiu $v0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24020010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800319D8u); -#endif -label_BFC199DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC199DC: 148CFFE4 bne $a0, $t4, 0xBFC19970 */ - uint32_t psx_brA_BFC199DC = cpu->gpr[4]; uint32_t psx_brB_BFC199DC = cpu->gpr[12]; - psx_taken_BFC199DC = (psx_brA_BFC199DC != psx_brB_BFC199DC); - psx_delay_BFC199DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC199E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800319E0u); -#endif - if (psx_delay_BFC199DC) { - psx_delay_BFC199DC = 0; - if (psx_taken_BFC199DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031970u); - goto label_BFC19970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800319E4u); - } -label_BFC199E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319E4u); -#endif - /* 0xBFC199E4: 8FA4004C lw $a0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319E4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4004Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800319E4u); -#endif -label_BFC199E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319E8u); -#endif - /* 0xBFC199E8: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319E8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800319E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC199EC: AFAB002C sw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319ECu); return; } g_debug_last_store_pc = 0x800319ECu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800319ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC199F0: 24060044 addiu $a2, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24060044u, cpu->gpr[6], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x800319F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC199F4: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x800319FCu; /* jal link before delay slot */ - psx_delay_BFC199F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC199F8: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319F8u); return; } g_debug_last_store_pc = 0x800319F8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800319F8u); -#endif - if (psx_delay_BFC199F4) { - psx_delay_BFC199F4 = 0; - cpu->gpr[31] = 0x800319FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC199FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC199FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC199FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800319FCu); -#endif - /* 0xBFC199FC: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319FCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800319FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A00u); -#endif - /* 0xBFC19A00: 8FAC0038 lw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A00u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A00u); -#endif - /* 0xBFC19A04: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A04u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC19A08: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1041u); -#endif - /* 0xBFC19A0C: 01803021 addu $a2, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19A10: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x80031A18u; /* jal link before delay slot */ - psx_delay_BFC19A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19A14: 24A50040 addiu $a1, $a1, 64 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (64)); - PGXP_ALU(0x24A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A14u); -#endif - if (psx_delay_BFC19A10) { - psx_delay_BFC19A10 = 0; - cpu->gpr[31] = 0x80031A18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC19A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A18u); -#endif - /* 0xBFC19A18: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A18u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A18u); -#endif - /* 0xBFC19A1C: 8FA40048 lw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A1Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A20u); -#endif - /* 0xBFC19A20: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A20u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19A24: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x80031A2Cu; /* jal link before delay slot */ - psx_delay_BFC19A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19A28: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A28u); -#endif - if (psx_delay_BFC19A24) { - psx_delay_BFC19A24 = 0; - cpu->gpr[31] = 0x80031A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC19A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A2Cu); -#endif - /* 0xBFC19A2C: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A2Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19A30: 0C016A50 jal 0xB005A940 */ - cpu->gpr[31] = 0x80031A38u; /* jal link before delay slot */ - psx_delay_BFC19A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC19A34: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A34u); -#endif - if (psx_delay_BFC19A30) { - psx_delay_BFC19A30 = 0; - cpu->gpr[31] = 0x80031A38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A940u); - cpu->pc = 0x8005A940u; return; - } -label_BFC19A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A38u); -#endif - /* 0xBFC19A38: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A38u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19A3C: 0C016A50 jal 0xB005A940 */ - cpu->gpr[31] = 0x80031A44u; /* jal link before delay slot */ - psx_delay_BFC19A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031A40u); -#endif - if (psx_delay_BFC19A3C) { - psx_delay_BFC19A3C = 0; - cpu->gpr[31] = 0x80031A44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A940u); - cpu->pc = 0x8005A940u; return; - } -label_BFC19A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19A44: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A44u); -#endif -label_BFC19A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A48u); -#endif - /* 0xBFC19A48: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19A4C: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC19A50: 03E00008 jr $ra */ - psx_delay_BFC19A50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031A54u); -#endif - if (psx_delay_BFC19A50) { - psx_delay_BFC19A50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC19A58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC19A58u); - int psx_delay_BFC19A6C = 0; - int psx_delay_BFC19AA4 = 0; - int psx_delay_BFC19AAC = 0; - int psx_delay_BFC19ABC = 0; - int psx_taken_BFC19ABC = 0; - int psx_delay_BFC19AD0 = 0; - int psx_delay_BFC19AD8 = 0; - int psx_taken_BFC19AD8 = 0; - int psx_delay_BFC19AE8 = 0; - int psx_taken_BFC19AE8 = 0; - int psx_delay_BFC19AFC = 0; - int psx_delay_BFC19B04 = 0; - int psx_taken_BFC19B04 = 0; - int psx_delay_BFC19B14 = 0; - int psx_taken_BFC19B14 = 0; - int psx_delay_BFC19B28 = 0; - int psx_delay_BFC19B30 = 0; - int psx_taken_BFC19B30 = 0; - int psx_delay_BFC19B40 = 0; - int psx_taken_BFC19B40 = 0; - int psx_delay_BFC19B54 = 0; - int psx_delay_BFC19B88 = 0; - int psx_taken_BFC19B88 = 0; - int psx_delay_BFC19BE4 = 0; - int psx_taken_BFC19BE4 = 0; - int psx_delay_BFC19C28 = 0; - int psx_delay_BFC19C4C = 0; - int psx_taken_BFC19C4C = 0; - int psx_delay_BFC19C6C = 0; - int psx_delay_BFC19C78 = 0; - int psx_delay_BFC19CAC = 0; - int psx_delay_BFC19CB8 = 0; - int psx_delay_BFC19CDC = 0; - int psx_taken_BFC19CDC = 0; - int psx_delay_BFC19CEC = 0; - int psx_taken_BFC19CEC = 0; - int psx_delay_BFC19CF4 = 0; - int psx_delay_BFC19CFC = 0; - int psx_delay_BFC19D04 = 0; - int psx_delay_BFC19D10 = 0; - int psx_delay_BFC19D18 = 0; - int psx_delay_BFC19D20 = 0; - int psx_delay_BFC19D34 = 0; - int psx_delay_BFC19D4C = 0; - int psx_taken_BFC19D4C = 0; - int psx_delay_BFC19D6C = 0; - int psx_delay_BFC19D8C = 0; - int psx_delay_BFC19DB4 = 0; - int psx_delay_BFC19DC0 = 0; - int psx_delay_BFC19DCC = 0; - int psx_delay_BFC19DD4 = 0; - int psx_delay_BFC19DEC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC19A74u: goto label_BFC19A74; - case 0xBFC19AACu: goto label_BFC19AAC; - case 0xBFC19AB4u: goto label_BFC19AB4; - case 0xBFC19AC4u: goto label_BFC19AC4; - case 0xBFC19AD8u: goto label_BFC19AD8; - case 0xBFC19AE0u: goto label_BFC19AE0; - case 0xBFC19AE4u: goto label_BFC19AE4; - case 0xBFC19AF0u: goto label_BFC19AF0; - case 0xBFC19B04u: goto label_BFC19B04; - case 0xBFC19B0Cu: goto label_BFC19B0C; - case 0xBFC19B10u: goto label_BFC19B10; - case 0xBFC19B1Cu: goto label_BFC19B1C; - case 0xBFC19B30u: goto label_BFC19B30; - case 0xBFC19B38u: goto label_BFC19B38; - case 0xBFC19B3Cu: goto label_BFC19B3C; - case 0xBFC19B48u: goto label_BFC19B48; - case 0xBFC19B5Cu: goto label_BFC19B5C; - case 0xBFC19B60u: goto label_BFC19B60; - case 0xBFC19B90u: goto label_BFC19B90; - case 0xBFC19B94u: goto label_BFC19B94; - case 0xBFC19BECu: goto label_BFC19BEC; - case 0xBFC19BF0u: goto label_BFC19BF0; - case 0xBFC19C30u: goto label_BFC19C30; - case 0xBFC19C54u: goto label_BFC19C54; - case 0xBFC19C74u: goto label_BFC19C74; - case 0xBFC19C80u: goto label_BFC19C80; - case 0xBFC19CB4u: goto label_BFC19CB4; - case 0xBFC19CC0u: goto label_BFC19CC0; - case 0xBFC19CD4u: goto label_BFC19CD4; - case 0xBFC19CE4u: goto label_BFC19CE4; - case 0xBFC19CE8u: goto label_BFC19CE8; - case 0xBFC19CF4u: goto label_BFC19CF4; - case 0xBFC19CFCu: goto label_BFC19CFC; - case 0xBFC19D04u: goto label_BFC19D04; - case 0xBFC19D0Cu: goto label_BFC19D0C; - case 0xBFC19D18u: goto label_BFC19D18; - case 0xBFC19D20u: goto label_BFC19D20; - case 0xBFC19D28u: goto label_BFC19D28; - case 0xBFC19D3Cu: goto label_BFC19D3C; - case 0xBFC19D54u: goto label_BFC19D54; - case 0xBFC19D5Cu: goto label_BFC19D5C; - case 0xBFC19D74u: goto label_BFC19D74; - case 0xBFC19D94u: goto label_BFC19D94; - case 0xBFC19DBCu: goto label_BFC19DBC; - case 0xBFC19DC8u: goto label_BFC19DC8; - case 0xBFC19DD4u: goto label_BFC19DD4; - case 0xBFC19DDCu: goto label_BFC19DDC; - default: break; - } - } -label_BFC19A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19A58: 27BDFF28 addiu $sp, $sp, -216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-216)); - PGXP_ALU(0x27BDFF28u, cpu->gpr[29], _pgx1, 0xFFFFFF28u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC19A5C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A5Cu); return; } g_debug_last_store_pc = 0x80031A5Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC19A60: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A60u); return; } g_debug_last_store_pc = 0x80031A60u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC19A64: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A64u); return; } g_debug_last_store_pc = 0x80031A64u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC19A68: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A68u); return; } g_debug_last_store_pc = 0x80031A68u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19A6C: 0C00F913 jal 0xB003E44C */ - cpu->gpr[31] = 0x80031A74u; /* jal link before delay slot */ - psx_delay_BFC19A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19A70: AFA400D8 sw $a0, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A70u); return; } g_debug_last_store_pc = 0x80031A70u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA400D8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A70u); -#endif - if (psx_delay_BFC19A6C) { - psx_delay_BFC19A6C = 0; - cpu->gpr[31] = 0x80031A74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E44Cu); - cpu->pc = 0x8003E44Cu; return; - } -label_BFC19A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A74u); -#endif - /* 0xBFC19A74: 8FA200D8 lw $v0, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A74u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC19A78: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC19A7C: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC19A80: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19A84: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC19A88: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC19A8C: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19A90: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19A94: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19A98: 273965E0 addiu $t9, $t9, 26080 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (26080)); - PGXP_ALU(0x273965E0u, cpu->gpr[25], _pgx1, 0x000065E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC19A9C: 25EF65D8 addiu $t7, $t7, 26072 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (26072)); - PGXP_ALU(0x25EF65D8u, cpu->gpr[15], _pgx1, 0x000065D8u); } -#ifdef PSX_COSIM - cosim_instr(0x80031A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC19AA0: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19AA4: 0C0125F4 jal 0xB00497D0 */ - cpu->gpr[31] = 0x80031AACu; /* jal link before delay slot */ - psx_delay_BFC19AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC19AA8: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031AA8u); -#endif - if (psx_delay_BFC19AA4) { - psx_delay_BFC19AA4 = 0; - cpu->gpr[31] = 0x80031AACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800497D0u); - cpu->pc = 0x800497D0u; return; - } -label_BFC19AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19AAC: 0C011304 jal 0xB0044C10 */ - cpu->gpr[31] = 0x80031AB4u; /* jal link before delay slot */ - psx_delay_BFC19AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19AB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031AB0u); -#endif - if (psx_delay_BFC19AAC) { - psx_delay_BFC19AAC = 0; - cpu->gpr[31] = 0x80031AB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C10u); - cpu->pc = 0x80044C10u; return; - } -label_BFC19AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AB4u); -#endif - /* 0xBFC19AB4: 8FA800D8 lw $t0, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031AB4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800D8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19AB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC19ABC: 15000009 bne $t0, $zero, 0xBFC19AE4 */ - uint32_t psx_brA_BFC19ABC = cpu->gpr[8]; uint32_t psx_brB_BFC19ABC = cpu->gpr[0]; - psx_taken_BFC19ABC = (psx_brA_BFC19ABC != psx_brB_BFC19ABC); - psx_delay_BFC19ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AC0u); -#endif - /* 0xBFC19AC0: 8FA900D8 lw $t1, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031AC0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900D8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031AC0u); -#endif - if (psx_delay_BFC19ABC) { - psx_delay_BFC19ABC = 0; - if (psx_taken_BFC19ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031AE4u); - goto label_BFC19AE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031AC4u); - } -label_BFC19AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19AC4: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19AC8: 24A5BF58 addiu $a1, $a1, -16552 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-16552)); - PGXP_ALU(0x24A5BF58u, cpu->gpr[5], _pgx1, 0xFFFFBF58u); } -#ifdef PSX_COSIM - cosim_instr(0x80031AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19ACC: 27A40064 addiu $a0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A40064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80031ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19AD0: 0C00C5B5 jal 0xB00316D4 */ - cpu->gpr[31] = 0x80031AD8u; /* jal link before delay slot */ - psx_delay_BFC19AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19AD4: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031AD4u); -#endif - if (psx_delay_BFC19AD0) { - psx_delay_BFC19AD0 = 0; - cpu->gpr[31] = 0x80031AD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316D4u); - cpu->pc = 0x800316D4u; return; - } -label_BFC19AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19AD8: 10000021 beq $zero, $zero, 0xBFC19B60 */ - uint32_t psx_brA_BFC19AD8 = cpu->gpr[0]; uint32_t psx_brB_BFC19AD8 = cpu->gpr[0]; - psx_taken_BFC19AD8 = (psx_brA_BFC19AD8 == psx_brB_BFC19AD8); - psx_delay_BFC19AD8 = 1; - /* 0xBFC19ADC: 8FAC00D8 lw $t4, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031ADCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031ADCu); -#endif - if (psx_delay_BFC19AD8) { - psx_delay_BFC19AD8 = 0; - if (psx_taken_BFC19AD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B60u); - goto label_BFC19B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031AE0u); - } -label_BFC19AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AE0u); -#endif - /* 0xBFC19AE0: 8FA900D8 lw $t1, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031AE0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900D8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031AE0u); -#endif -label_BFC19AE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19AE4: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC19AE8: 15210009 bne $t1, $at, 0xBFC19B10 */ - uint32_t psx_brA_BFC19AE8 = cpu->gpr[9]; uint32_t psx_brB_BFC19AE8 = cpu->gpr[1]; - psx_taken_BFC19AE8 = (psx_brA_BFC19AE8 != psx_brB_BFC19AE8); - psx_delay_BFC19AE8 = 1; - /* 0xBFC19AEC: 8FAA00D8 lw $t2, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031AECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00D8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031AECu); -#endif - if (psx_delay_BFC19AE8) { - psx_delay_BFC19AE8 = 0; - if (psx_taken_BFC19AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B10u); - goto label_BFC19B10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031AF0u); - } -label_BFC19AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19AF0: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19AF4: 24A5085C addiu $a1, $a1, 2140 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (2140)); - PGXP_ALU(0x24A5085Cu, cpu->gpr[5], _pgx1, 0x0000085Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19AF8: 27A40064 addiu $a0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A40064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80031AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19AFC: 0C00C5B5 jal 0xB00316D4 */ - cpu->gpr[31] = 0x80031B04u; /* jal link before delay slot */ - psx_delay_BFC19AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19B00: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B00u); -#endif - if (psx_delay_BFC19AFC) { - psx_delay_BFC19AFC = 0; - cpu->gpr[31] = 0x80031B04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316D4u); - cpu->pc = 0x800316D4u; return; - } -label_BFC19B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19B04: 10000016 beq $zero, $zero, 0xBFC19B60 */ - uint32_t psx_brA_BFC19B04 = cpu->gpr[0]; uint32_t psx_brB_BFC19B04 = cpu->gpr[0]; - psx_taken_BFC19B04 = (psx_brA_BFC19B04 == psx_brB_BFC19B04); - psx_delay_BFC19B04 = 1; - /* 0xBFC19B08: 8FAC00D8 lw $t4, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B08u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B08u); -#endif - if (psx_delay_BFC19B04) { - psx_delay_BFC19B04 = 0; - if (psx_taken_BFC19B04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B60u); - goto label_BFC19B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B0Cu); - } -label_BFC19B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B0Cu); -#endif - /* 0xBFC19B0C: 8FAA00D8 lw $t2, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B0Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00D8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B0Cu); -#endif -label_BFC19B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19B10: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC19B14: 15410009 bne $t2, $at, 0xBFC19B3C */ - uint32_t psx_brA_BFC19B14 = cpu->gpr[10]; uint32_t psx_brB_BFC19B14 = cpu->gpr[1]; - psx_taken_BFC19B14 = (psx_brA_BFC19B14 != psx_brB_BFC19B14); - psx_delay_BFC19B14 = 1; - /* 0xBFC19B18: 8FAB00D8 lw $t3, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B18u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00D8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B18u); -#endif - if (psx_delay_BFC19B14) { - psx_delay_BFC19B14 = 0; - if (psx_taken_BFC19B14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B3Cu); - goto label_BFC19B3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B1Cu); - } -label_BFC19B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19B1C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19B20: 24A5D838 addiu $a1, $a1, -10184 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-10184)); - PGXP_ALU(0x24A5D838u, cpu->gpr[5], _pgx1, 0xFFFFD838u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19B24: 27A40064 addiu $a0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A40064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19B28: 0C00C5B5 jal 0xB00316D4 */ - cpu->gpr[31] = 0x80031B30u; /* jal link before delay slot */ - psx_delay_BFC19B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19B2C: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B2Cu); -#endif - if (psx_delay_BFC19B28) { - psx_delay_BFC19B28 = 0; - cpu->gpr[31] = 0x80031B30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316D4u); - cpu->pc = 0x800316D4u; return; - } -label_BFC19B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19B30: 1000000B beq $zero, $zero, 0xBFC19B60 */ - uint32_t psx_brA_BFC19B30 = cpu->gpr[0]; uint32_t psx_brB_BFC19B30 = cpu->gpr[0]; - psx_taken_BFC19B30 = (psx_brA_BFC19B30 == psx_brB_BFC19B30); - psx_delay_BFC19B30 = 1; - /* 0xBFC19B34: 8FAC00D8 lw $t4, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B34u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B34u); -#endif - if (psx_delay_BFC19B30) { - psx_delay_BFC19B30 = 0; - if (psx_taken_BFC19B30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B60u); - goto label_BFC19B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B38u); - } -label_BFC19B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B38u); -#endif - /* 0xBFC19B38: 8FAB00D8 lw $t3, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B38u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00D8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B38u); -#endif -label_BFC19B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19B3C: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC19B40: 15610007 bne $t3, $at, 0xBFC19B60 */ - uint32_t psx_brA_BFC19B40 = cpu->gpr[11]; uint32_t psx_brB_BFC19B40 = cpu->gpr[1]; - psx_taken_BFC19B40 = (psx_brA_BFC19B40 != psx_brB_BFC19B40); - psx_delay_BFC19B40 = 1; - /* 0xBFC19B44: 8FAC00D8 lw $t4, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B44u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B44u); -#endif - if (psx_delay_BFC19B40) { - psx_delay_BFC19B40 = 0; - if (psx_taken_BFC19B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B60u); - goto label_BFC19B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B48u); - } -label_BFC19B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19B48: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19B4C: 24A5239C addiu $a1, $a1, 9116 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (9116)); - PGXP_ALU(0x24A5239Cu, cpu->gpr[5], _pgx1, 0x0000239Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC19B50: 27A40064 addiu $a0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A40064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19B54: 0C00C5B5 jal 0xB00316D4 */ - cpu->gpr[31] = 0x80031B5Cu; /* jal link before delay slot */ - psx_delay_BFC19B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19B58: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B58u); -#endif - if (psx_delay_BFC19B54) { - psx_delay_BFC19B54 = 0; - cpu->gpr[31] = 0x80031B5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316D4u); - cpu->pc = 0x800316D4u; return; - } -label_BFC19B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B5Cu); -#endif - /* 0xBFC19B5C: 8FAC00D8 lw $t4, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B5Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B5Cu); -#endif -label_BFC19B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19B60: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC19B64: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC19B68: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC19B6C: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19B70: 25CE65C4 addiu $t6, $t6, 26052 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (26052)); - PGXP_ALU(0x25CE65C4u, cpu->gpr[14], _pgx1, 0x000065C4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46000u); -#endif - /* 0xBFC19B74: 01AE9021 addu $s2, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[18] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031B74u); -#endif - /* 0xBFC19B78: 8E420000 lw $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } - PGXP_LOAD(0x8E420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC19B7C: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B80u); -#endif - /* 0xBFC19B80: 8C4F0004 lw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B80u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC19B88: 11E00057 beq $t7, $zero, 0xBFC19CE8 */ - uint32_t psx_brA_BFC19B88 = cpu->gpr[15]; uint32_t psx_brB_BFC19B88 = cpu->gpr[0]; - psx_taken_BFC19B88 = (psx_brA_BFC19B88 == psx_brB_BFC19B88); - psx_delay_BFC19B88 = 1; - /* 0xBFC19B8C: 8FAE00D8 lw $t6, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B8Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00D8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B8Cu); -#endif - if (psx_delay_BFC19B88) { - psx_delay_BFC19B88 = 0; - if (psx_taken_BFC19B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031CE8u); - goto label_BFC19CE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B90u); - } -label_BFC19B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC19B90: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031B90u); -#endif -label_BFC19B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC19B94: AFA00048 sw $zero, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B94u); return; } g_debug_last_store_pc = 0x80031B94u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00048u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC19B98: 0011C880 sll $t9, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031B98u); -#endif - /* 0xBFC19B9C: 8E580024 lw $t8, 36($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B9Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC19BA0: 0331C823 subu $t9, $t9, $s1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[17]; - PGXP_ALU(0x0331C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19BA4: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC19BA8: 03191021 addu $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03191021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031BA8u); -#endif - /* 0xBFC19BAC: 84480000 lh $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BACu); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x84480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BB0u); -#endif - /* 0xBFC19BB0: 87AD00AE lh $t5, 174($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 174; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (174)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BB0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD00AEu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC19BB4: A7A8004C sh $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BB4u); return; } g_debug_last_store_pc = 0x80031BB4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BB4u); -#endif - /* 0xBFC19BB8: 84490002 lh $t1, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BB8u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x84490002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BB8u); -#endif - /* 0xBFC19BBC: 87AE00B0 lh $t6, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BBCu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE00B0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC19BC0: A7A9004E sh $t1, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BC0u); return; } g_debug_last_store_pc = 0x80031BC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9004Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BC0u); -#endif - /* 0xBFC19BC4: 844A0004 lh $t2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BC4u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x844A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BC4u); -#endif - /* 0xBFC19BC8: 87AF00B2 lh $t7, 178($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 178; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (178)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BC8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF00B2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BC8u); -#endif - /* 0xBFC19BCC: 87B800B4 lh $t8, 180($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 180; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (180)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BCCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B800B4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BD0u); -#endif - /* 0xBFC19BD0: 87B900A4 lh $t9, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BD0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B900A4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC19BD4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC19BD8: 27A50048 addiu $a1, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27A50048u, cpu->gpr[5], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80031BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC19BDC: 27A60040 addiu $a2, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A60040u, cpu->gpr[6], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80031BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19BE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC19BE4: 05410002 bgez $t2, 0xBFC19BF0 */ - uint32_t psx_brA_BFC19BE4 = cpu->gpr[10]; - psx_taken_BFC19BE4 = ((int32_t)psx_brA_BFC19BE4 >= 0); - psx_delay_BFC19BE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC19BE8: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031BE8u); -#endif - if (psx_delay_BFC19BE4) { - psx_delay_BFC19BE4 = 0; - if (psx_taken_BFC19BE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031BF0u); - goto label_BFC19BF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031BECu); - } -label_BFC19BEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19BEC: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031BECu); -#endif -label_BFC19BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC19BF0: 00015883 sra $t3, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00015883u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC19BF4: A7AB0050 sh $t3, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BF4u); return; } g_debug_last_store_pc = 0x80031BF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0050u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BF4u); -#endif - /* 0xBFC19BF8: 844C0006 lh $t4, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BF8u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x844C0006u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC19BFC: A7AD0058 sh $t5, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031BFCu); return; } g_debug_last_store_pc = 0x80031BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0058u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC19C00: A7AE005A sh $t6, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C00u); return; } g_debug_last_store_pc = 0x80031C00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE005Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC19C04: A7AF005C sh $t7, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C04u); return; } g_debug_last_store_pc = 0x80031C04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF005Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC19C08: A7B8005E sh $t8, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C08u); return; } g_debug_last_store_pc = 0x80031C08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8005Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC19C0C: A7B90040 sh $t9, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C0Cu); return; } g_debug_last_store_pc = 0x80031C0Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90040u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC19C10: A7AC0052 sh $t4, 82($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 82; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (82)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C10u); return; } g_debug_last_store_pc = 0x80031C10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC0052u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C10u); -#endif - /* 0xBFC19C14: 84480008 lh $t0, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C14u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x84480008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19C18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC19C1C: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC19C20: A7A90042 sh $t1, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C20u); return; } g_debug_last_store_pc = 0x80031C20u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90042u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C20u); -#endif - /* 0xBFC19C24: 844A000A lh $t2, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C24u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x844A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19C28: 0C011382 jal 0xB0044E08 */ - cpu->gpr[31] = 0x80031C30u; /* jal link before delay slot */ - psx_delay_BFC19C28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC19C2C: A7AA0044 sh $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031C2Cu); return; } g_debug_last_store_pc = 0x80031C2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C2Cu); -#endif - if (psx_delay_BFC19C28) { - psx_delay_BFC19C28 = 0; - cpu->gpr[31] = 0x80031C30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E08u); - cpu->pc = 0x80044E08u; return; - } -label_BFC19C30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19C30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC19C30: 00116100 sll $t4, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00116100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C30u); -#endif - /* 0xBFC19C34: 8E4B0000 lw $t3, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C34u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40000u); } - PGXP_LOAD(0x8E4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC19C38: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC19C3C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC19C40: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031C40u); -#endif - /* 0xBFC19C44: 8E0D0000 lw $t5, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C44u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19C48: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC19C4C: 15A10021 bne $t5, $at, 0xBFC19CD4 */ - uint32_t psx_brA_BFC19C4C = cpu->gpr[13]; uint32_t psx_brB_BFC19C4C = cpu->gpr[1]; - psx_taken_BFC19C4C = (psx_brA_BFC19C4C != psx_brB_BFC19C4C); - psx_delay_BFC19C4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19C50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031C50u); -#endif - if (psx_delay_BFC19C4C) { - psx_delay_BFC19C4C = 0; - if (psx_taken_BFC19C4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031CD4u); - goto label_BFC19CD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031C54u); - } -label_BFC19C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19C54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC19C54: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031C54u); -#endif - /* 0xBFC19C58: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C58u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19C5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC19C60: 2DCF0001 sltiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2DCF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC19C64: AC2F9E24 sw $t7, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C64u); return; } g_debug_last_store_pc = 0x80031C64u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C64u); -#endif - /* 0xBFC19C68: 8E040004 lw $a0, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C68u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19C6C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80031C74u; /* jal link before delay slot */ - psx_delay_BFC19C6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19C70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031C70u); -#endif - if (psx_delay_BFC19C6C) { - psx_delay_BFC19C6C = 0; - cpu->gpr[31] = 0x80031C74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC19C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC19C74: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19C78: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80031C80u; /* jal link before delay slot */ - psx_delay_BFC19C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19C7C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80031C7Cu); -#endif - if (psx_delay_BFC19C78) { - psx_delay_BFC19C78 = 0; - cpu->gpr[31] = 0x80031C80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC19C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19C80: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031C80u); -#endif - /* 0xBFC19C84: 8F189E24 lw $t8, -25052($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C84u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E24u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19C88: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC19C8C: 2F190001 sltiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2F190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC19C90: AC399E24 sw $t9, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C90u); return; } g_debug_last_store_pc = 0x80031C90u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC19C94: 00114900 sll $t1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00114900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031C94u); -#endif - /* 0xBFC19C98: 8E480000 lw $t0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C98u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40000u); } - PGXP_LOAD(0x8E480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC19C9C: 01314823 subu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[17]; - PGXP_ALU(0x01314823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC19CA0: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC19CA4: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031CA4u); -#endif - /* 0xBFC19CA8: 8D440004 lw $a0, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CA8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400u); } - PGXP_LOAD(0x8D440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19CAC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80031CB4u; /* jal link before delay slot */ - psx_delay_BFC19CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19CB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031CB0u); -#endif - if (psx_delay_BFC19CAC) { - psx_delay_BFC19CAC = 0; - cpu->gpr[31] = 0x80031CB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC19CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC19CB4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19CB8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80031CC0u; /* jal link before delay slot */ - psx_delay_BFC19CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19CBC: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80031CBCu); -#endif - if (psx_delay_BFC19CB8) { - psx_delay_BFC19CB8 = 0; - cpu->gpr[31] = 0x80031CC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC19CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC19CC0: 00116100 sll $t4, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 4u; - PGXP_ALU(0x00116100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031CC0u); -#endif - /* 0xBFC19CC4: 8E4B0000 lw $t3, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CC4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40000u); } - PGXP_LOAD(0x8E4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC19CC8: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC19CCC: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80031CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC19CD0: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031CD0u); -#endif -label_BFC19CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CD4u); -#endif - /* 0xBFC19CD4: 8E0D0040 lw $t5, 64($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CD4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80031CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC19CD8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC19CDC: 15A0FFAD bne $t5, $zero, 0xBFC19B94 */ - uint32_t psx_brA_BFC19CDC = cpu->gpr[13]; uint32_t psx_brB_BFC19CDC = cpu->gpr[0]; - psx_taken_BFC19CDC = (psx_brA_BFC19CDC != psx_brB_BFC19CDC); - psx_delay_BFC19CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC19CE0: 2610003C addiu $s0, $s0, 60 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (60)); - PGXP_ALU(0x2610003Cu, cpu->gpr[16], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031CE0u); -#endif - if (psx_delay_BFC19CDC) { - psx_delay_BFC19CDC = 0; - if (psx_taken_BFC19CDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031B94u); - goto label_BFC19B94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031CE4u); - } -label_BFC19CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CE4u); -#endif - /* 0xBFC19CE4: 8FAE00D8 lw $t6, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00D8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031CE4u); -#endif -label_BFC19CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19CE8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC19CEC: 15C10007 bne $t6, $at, 0xBFC19D0C */ - uint32_t psx_brA_BFC19CEC = cpu->gpr[14]; uint32_t psx_brB_BFC19CEC = cpu->gpr[1]; - psx_taken_BFC19CEC = (psx_brA_BFC19CEC != psx_brB_BFC19CEC); - psx_delay_BFC19CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19CF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031CF0u); -#endif - if (psx_delay_BFC19CEC) { - psx_delay_BFC19CEC = 0; - if (psx_taken_BFC19CEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031D0Cu); - goto label_BFC19D0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031CF4u); - } -label_BFC19CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19CF4: 0C00EA36 jal 0xB003A8D8 */ - cpu->gpr[31] = 0x80031CFCu; /* jal link before delay slot */ - psx_delay_BFC19CF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC19CF8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031CF8u); -#endif - if (psx_delay_BFC19CF4) { - psx_delay_BFC19CF4 = 0; - cpu->gpr[31] = 0x80031CFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8D8u); - cpu->pc = 0x8003A8D8u; return; - } -label_BFC19CFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19CFC: 0C00EA36 jal 0xB003A8D8 */ - cpu->gpr[31] = 0x80031D04u; /* jal link before delay slot */ - psx_delay_BFC19CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC19D00: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D00u); -#endif - if (psx_delay_BFC19CFC) { - psx_delay_BFC19CFC = 0; - cpu->gpr[31] = 0x80031D04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8D8u); - cpu->pc = 0x8003A8D8u; return; - } -label_BFC19D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D04: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x80031D0Cu; /* jal link before delay slot */ - psx_delay_BFC19D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19D08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031D08u); -#endif - if (psx_delay_BFC19D04) { - psx_delay_BFC19D04 = 0; - cpu->gpr[31] = 0x80031D0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC19D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D0Cu); -#endif - /* 0xBFC19D0C: 8E440010 lw $a0, 16($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } - PGXP_LOAD(0x8E440010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D10: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80031D18u; /* jal link before delay slot */ - psx_delay_BFC19D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031D14u); -#endif - if (psx_delay_BFC19D10) { - psx_delay_BFC19D10 = 0; - cpu->gpr[31] = 0x80031D18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC19D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D18: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x80031D20u; /* jal link before delay slot */ - psx_delay_BFC19D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19D1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031D1Cu); -#endif - if (psx_delay_BFC19D18) { - psx_delay_BFC19D18 = 0; - cpu->gpr[31] = 0x80031D20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC19D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D20: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80031D28u; /* jal link before delay slot */ - psx_delay_BFC19D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC19D24: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031D24u); -#endif - if (psx_delay_BFC19D20) { - psx_delay_BFC19D20 = 0; - cpu->gpr[31] = 0x80031D28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC19D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D28u); -#endif - /* 0xBFC19D28: 84440042 lh $a0, 66($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031D28u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x84440042u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D28u); -#endif - /* 0xBFC19D2C: 84450044 lh $a1, 68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031D2Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x84450044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19D30: 2484FFF4 addiu $a0, $a0, -12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-12)); - PGXP_ALU(0x2484FFF4u, cpu->gpr[4], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D34: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x80031D3Cu; /* jal link before delay slot */ - psx_delay_BFC19D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19D38: 24A5FFF4 addiu $a1, $a1, -12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12)); - PGXP_ALU(0x24A5FFF4u, cpu->gpr[5], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D38u); -#endif - if (psx_delay_BFC19D34) { - psx_delay_BFC19D34 = 0; - cpu->gpr[31] = 0x80031D3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC19D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D3Cu); -#endif - /* 0xBFC19D3C: 8FAF00D8 lw $t7, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D3Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00D8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19D40: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19D44: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC19D48: 2718663C addiu $t8, $t8, 26172 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (26172)); - PGXP_ALU(0x2718663Cu, cpu->gpr[24], _pgx1, 0x0000663Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80031D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC19D4C: 16580003 bne $s2, $t8, 0xBFC19D5C */ - uint32_t psx_brA_BFC19D4C = cpu->gpr[18]; uint32_t psx_brB_BFC19D4C = cpu->gpr[24]; - psx_taken_BFC19D4C = (psx_brA_BFC19D4C != psx_brB_BFC19D4C); - psx_delay_BFC19D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC19D50: AC2F9E2C sw $t7, -25044($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25044; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D50u); return; } g_debug_last_store_pc = 0x80031D50u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D50u); -#endif - if (psx_delay_BFC19D4C) { - psx_delay_BFC19D4C = 0; - if (psx_taken_BFC19D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031D5Cu); - goto label_BFC19D5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031D54u); - } -label_BFC19D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19D54: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC19D58: AC209E78 sw $zero, -24968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D58u); return; } g_debug_last_store_pc = 0x80031D58u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E78u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D58u); -#endif -label_BFC19D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D5Cu); -#endif - /* 0xBFC19D5C: 8E440004 lw $a0, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D5Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } - PGXP_LOAD(0x8E440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19D60: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC19D64: 3C06800F lui $a2, 0x800F */ - cpu->gpr[6] = 0x800F0000u; - PGXP_ALU(0x3C06800Fu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC19D68: 24C68B78 addiu $a2, $a2, -29832 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-29832)); - PGXP_ALU(0x24C68B78u, cpu->gpr[6], _pgx1, 0xFFFF8B78u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D6C: 0C00C77D jal 0xB0031DF4 */ - cpu->gpr[31] = 0x80031D74u; /* jal link before delay slot */ - psx_delay_BFC19D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19D70: 24A56F78 addiu $a1, $a1, 28536 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (28536)); - PGXP_ALU(0x24A56F78u, cpu->gpr[5], _pgx1, 0x00006F78u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D70u); -#endif - if (psx_delay_BFC19D6C) { - psx_delay_BFC19D6C = 0; - cpu->gpr[31] = 0x80031D74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031DF4u); - cpu->pc = 0x80031DF4u; return; - } -label_BFC19D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19D74: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC19D78: AC226F74 sw $v0, 28532($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D78u); return; } g_debug_last_store_pc = 0x80031D78u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC226F74u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D78u); -#endif - /* 0xBFC19D7C: 8E440008 lw $a0, 8($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D7Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } - PGXP_LOAD(0x8E440008u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19D80: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC19D84: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC19D88: 24C63774 addiu $a2, $a2, 14196 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (14196)); - PGXP_ALU(0x24C63774u, cpu->gpr[6], _pgx1, 0x00003774u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19D8C: 0C00C77D jal 0xB0031DF4 */ - cpu->gpr[31] = 0x80031D94u; /* jal link before delay slot */ - psx_delay_BFC19D8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC19D90: 24A5FF74 addiu $a1, $a1, -140 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-140)); - PGXP_ALU(0x24A5FF74u, cpu->gpr[5], _pgx1, 0xFFFFFF74u); } -#ifdef PSX_COSIM - cosim_instr(0x80031D90u); -#endif - if (psx_delay_BFC19D8C) { - psx_delay_BFC19D8C = 0; - cpu->gpr[31] = 0x80031D94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031DF4u); - cpu->pc = 0x80031DF4u; return; - } -label_BFC19D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19D94: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC19D98: AC22FF70 sw $v0, -144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D98u); return; } g_debug_last_store_pc = 0x80031D98u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22FF70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC19D9C: 3C10800F lui $s0, 0x800F */ - cpu->gpr[16] = 0x800F0000u; - PGXP_ALU(0x3C10800Fu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC19DA0: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC19DA4: 2631A7F4 addiu $s1, $s1, -22540 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-22540)); - PGXP_ALU(0x2631A7F4u, cpu->gpr[17], _pgx1, 0xFFFFA7F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC19DA8: 2610A784 addiu $s0, $s0, -22652 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-22652)); - PGXP_ALU(0x2610A784u, cpu->gpr[16], _pgx1, 0xFFFFA784u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DA8u); -#endif - /* 0xBFC19DAC: 8E44000C lw $a0, 12($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DACu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } - PGXP_LOAD(0x8E44000Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC19DB0: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19DB4: 0C00C77D jal 0xB0031DF4 */ - cpu->gpr[31] = 0x80031DBCu; /* jal link before delay slot */ - psx_delay_BFC19DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC19DB8: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031DB8u); -#endif - if (psx_delay_BFC19DB4) { - psx_delay_BFC19DB4 = 0; - cpu->gpr[31] = 0x80031DBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031DF4u); - cpu->pc = 0x80031DF4u; return; - } -label_BFC19DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC19DBC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19DC0: 0C0112A7 jal 0xB0044A9C */ - cpu->gpr[31] = 0x80031DC8u; /* jal link before delay slot */ - psx_delay_BFC19DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19DC4: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DC4u); -#endif - if (psx_delay_BFC19DC0) { - psx_delay_BFC19DC0 = 0; - cpu->gpr[31] = 0x80031DC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A9Cu); - cpu->pc = 0x80044A9Cu; return; - } -label_BFC19DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19DC8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19DCC: 0C0112A7 jal 0xB0044A9C */ - cpu->gpr[31] = 0x80031DD4u; /* jal link before delay slot */ - psx_delay_BFC19DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19DD0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DD0u); -#endif - if (psx_delay_BFC19DCC) { - psx_delay_BFC19DCC = 0; - cpu->gpr[31] = 0x80031DD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A9Cu); - cpu->pc = 0x80044A9Cu; return; - } -label_BFC19DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19DD4: 0C00F763 jal 0xB003DD8C */ - cpu->gpr[31] = 0x80031DDCu; /* jal link before delay slot */ - psx_delay_BFC19DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031DD8u); -#endif - if (psx_delay_BFC19DD4) { - psx_delay_BFC19DD4 = 0; - cpu->gpr[31] = 0x80031DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD8Cu); - cpu->pc = 0x8003DD8Cu; return; - } -label_BFC19DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DDCu); -#endif - /* 0xBFC19DDC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DE0u); -#endif - /* 0xBFC19DE0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DE0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DE0u); -#endif - /* 0xBFC19DE4: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DE4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DE4u); -#endif - /* 0xBFC19DE8: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DE8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC19DEC: 03E00008 jr $ra */ - psx_delay_BFC19DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19DF0: 27BD00D8 addiu $sp, $sp, 216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (216)); - PGXP_ALU(0x27BD00D8u, cpu->gpr[29], _pgx1, 0x000000D8u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DF0u); -#endif - if (psx_delay_BFC19DEC) { - psx_delay_BFC19DEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC19DF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC19DF4u); - int psx_delay_BFC19E1C = 0; - int psx_taken_BFC19E1C = 0; - int psx_delay_BFC19E54 = 0; - int psx_taken_BFC19E54 = 0; - int psx_delay_BFC19E64 = 0; - int psx_delay_BFC19E6C = 0; - int psx_taken_BFC19E6C = 0; - int psx_delay_BFC19E88 = 0; - int psx_delay_BFC19E98 = 0; - int psx_delay_BFC19EA4 = 0; - int psx_delay_BFC19EB0 = 0; - int psx_delay_BFC19EC0 = 0; - int psx_taken_BFC19EC0 = 0; - int psx_delay_BFC19ECC = 0; - int psx_delay_BFC19EDC = 0; - int psx_taken_BFC19EDC = 0; - int psx_delay_BFC19EEC = 0; - int psx_taken_BFC19EEC = 0; - int psx_delay_BFC19EFC = 0; - int psx_delay_BFC19F08 = 0; - int psx_taken_BFC19F08 = 0; - int psx_delay_BFC19F18 = 0; - int psx_taken_BFC19F18 = 0; - int psx_delay_BFC19F28 = 0; - int psx_taken_BFC19F28 = 0; - int psx_delay_BFC19F44 = 0; - int psx_delay_BFC19F54 = 0; - int psx_delay_BFC19F6C = 0; - int psx_taken_BFC19F6C = 0; - int psx_delay_BFC19F9C = 0; - int psx_taken_BFC19F9C = 0; - int psx_delay_BFC19FA4 = 0; - int psx_taken_BFC19FA4 = 0; - int psx_delay_BFC19FC8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC19E24u: goto label_BFC19E24; - case 0xBFC19E4Cu: goto label_BFC19E4C; - case 0xBFC19E5Cu: goto label_BFC19E5C; - case 0xBFC19E6Cu: goto label_BFC19E6C; - case 0xBFC19E74u: goto label_BFC19E74; - case 0xBFC19E78u: goto label_BFC19E78; - case 0xBFC19E90u: goto label_BFC19E90; - case 0xBFC19E94u: goto label_BFC19E94; - case 0xBFC19EA0u: goto label_BFC19EA0; - case 0xBFC19EACu: goto label_BFC19EAC; - case 0xBFC19EB8u: goto label_BFC19EB8; - case 0xBFC19EC8u: goto label_BFC19EC8; - case 0xBFC19ED4u: goto label_BFC19ED4; - case 0xBFC19EDCu: goto label_BFC19EDC; - case 0xBFC19EE4u: goto label_BFC19EE4; - case 0xBFC19EF4u: goto label_BFC19EF4; - case 0xBFC19F04u: goto label_BFC19F04; - case 0xBFC19F10u: goto label_BFC19F10; - case 0xBFC19F20u: goto label_BFC19F20; - case 0xBFC19F28u: goto label_BFC19F28; - case 0xBFC19F30u: goto label_BFC19F30; - case 0xBFC19F4Cu: goto label_BFC19F4C; - case 0xBFC19F50u: goto label_BFC19F50; - case 0xBFC19F5Cu: goto label_BFC19F5C; - case 0xBFC19F74u: goto label_BFC19F74; - case 0xBFC19F8Cu: goto label_BFC19F8C; - case 0xBFC19FA4u: goto label_BFC19FA4; - case 0xBFC19FACu: goto label_BFC19FAC; - case 0xBFC19FB0u: goto label_BFC19FB0; - default: break; - } - } -label_BFC19DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19DF4: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC19DF8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DF8u); return; } g_debug_last_store_pc = 0x80031DF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC19DFC: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DFCu); return; } g_debug_last_store_pc = 0x80031DFCu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80031DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC19E00: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E00u); return; } g_debug_last_store_pc = 0x80031E00u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC19E04: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E04u); return; } g_debug_last_store_pc = 0x80031E04u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC19E08: AFB30014 sw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E08u); return; } g_debug_last_store_pc = 0x80031E08u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E08u); -#endif - /* 0xBFC19E0C: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E0Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC19E10: 00A0B021 addu $s6, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC19E14: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC19E18: 2415FFFF addiu $s5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2415FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC19E1C: 11C0005B beq $t6, $zero, 0xBFC19F8C */ - uint32_t psx_brA_BFC19E1C = cpu->gpr[14]; uint32_t psx_brB_BFC19E1C = cpu->gpr[0]; - psx_taken_BFC19E1C = (psx_brA_BFC19E1C == psx_brB_BFC19E1C); - psx_delay_BFC19E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC19E20: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E20u); -#endif - if (psx_delay_BFC19E1C) { - psx_delay_BFC19E1C = 0; - if (psx_taken_BFC19E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F8Cu); - goto label_BFC19F8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E24u); - } -label_BFC19E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC19E24: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E24u); return; } g_debug_last_store_pc = 0x80031E24u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC19E28: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E28u); return; } g_debug_last_store_pc = 0x80031E28u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC19E2C: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E2Cu); return; } g_debug_last_store_pc = 0x80031E2Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC19E30: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E30u); return; } g_debug_last_store_pc = 0x80031E30u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC19E34: AFBE002C sw $fp, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E34u); return; } g_debug_last_store_pc = 0x80031E34u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE002Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC19E38: 241E0002 addiu $fp, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x241E0002u, cpu->gpr[30], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80031E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC19E3C: 2417FFFF addiu $s7, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2417FFFFu, cpu->gpr[23], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80031E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC19E40: 00C09021 addu $s2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420001u); -#endif - /* 0xBFC19E44: 02C08821 addu $s1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC19E48: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E48u); -#endif -label_BFC19E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E4Cu); -#endif - /* 0xBFC19E4C: 8E020010 lw $v0, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800004u); -#endif - /* 0xBFC19E54: 16E20008 bne $s7, $v0, 0xBFC19E78 */ - uint32_t psx_brA_BFC19E54 = cpu->gpr[23]; uint32_t psx_brB_BFC19E54 = cpu->gpr[2]; - psx_taken_BFC19E54 = (psx_brA_BFC19E54 != psx_brB_BFC19E54); - psx_delay_BFC19E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC19E58: 000278C0 sll $t7, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000278C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031E58u); -#endif - if (psx_delay_BFC19E54) { - psx_delay_BFC19E54 = 0; - if (psx_taken_BFC19E54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E78u); - goto label_BFC19E78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E5Cu); - } -label_BFC19E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E5Cu); -#endif - /* 0xBFC19E5C: 8E050000 lw $a1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E5Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E60u); -#endif - /* 0xBFC19E60: 8E060014 lw $a2, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E60u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E060014u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19E64: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x80031E6Cu; /* jal link before delay slot */ - psx_delay_BFC19E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19E68: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E68u); -#endif - if (psx_delay_BFC19E64) { - psx_delay_BFC19E64 = 0; - cpu->gpr[31] = 0x80031E6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC19E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19E6C: 10000009 beq $zero, $zero, 0xBFC19E94 */ - uint32_t psx_brA_BFC19E6C = cpu->gpr[0]; uint32_t psx_brB_BFC19E6C = cpu->gpr[0]; - psx_taken_BFC19E6C = (psx_brA_BFC19E6C == psx_brB_BFC19E6C); - psx_delay_BFC19E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E70u); -#endif - /* 0xBFC19E70: 8E050004 lw $a1, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E70u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E70u); -#endif - if (psx_delay_BFC19E6C) { - psx_delay_BFC19E6C = 0; - if (psx_taken_BFC19E6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E94u); - goto label_BFC19E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E74u); - } -label_BFC19E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC19E74: 000278C0 sll $t7, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000278C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80031E74u); -#endif -label_BFC19E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC19E78: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC19E7C: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80031E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408020u); -#endif - /* 0xBFC19E80: 02CF2821 addu $a1, $s6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[15]; - PGXP_ALU(0x02CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19E84: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19E88: 0C016A54 jal 0xB005A950 */ - cpu->gpr[31] = 0x80031E90u; /* jal link before delay slot */ - psx_delay_BFC19E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19E8C: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031E8Cu); -#endif - if (psx_delay_BFC19E88) { - psx_delay_BFC19E88 = 0; - cpu->gpr[31] = 0x80031E90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A950u); - cpu->pc = 0x8005A950u; return; - } -label_BFC19E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E90u); -#endif - /* 0xBFC19E90: 8E050004 lw $a1, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E90u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E90u); -#endif -label_BFC19E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031E94u); -#endif - /* 0xBFC19E94: 8E060008 lw $a2, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031E94u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E060008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80031E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19E98: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80031EA0u; /* jal link before delay slot */ - psx_delay_BFC19E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19E9C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031E9Cu); -#endif - if (psx_delay_BFC19E98) { - psx_delay_BFC19E98 = 0; - cpu->gpr[31] = 0x80031EA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC19EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19EA0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19EA4: 0C0112A7 jal 0xB0044A9C */ - cpu->gpr[31] = 0x80031EACu; /* jal link before delay slot */ - psx_delay_BFC19EA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19EA8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031EA8u); -#endif - if (psx_delay_BFC19EA4) { - psx_delay_BFC19EA4 = 0; - cpu->gpr[31] = 0x80031EACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A9Cu); - cpu->pc = 0x80044A9Cu; return; - } -label_BFC19EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19EAC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19EB0: 0C0112B8 jal 0xB0044AE0 */ - cpu->gpr[31] = 0x80031EB8u; /* jal link before delay slot */ - psx_delay_BFC19EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19EB4: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031EB4u); -#endif - if (psx_delay_BFC19EB0) { - psx_delay_BFC19EB0 = 0; - cpu->gpr[31] = 0x80031EB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AE0u); - cpu->pc = 0x80044AE0u; return; - } -label_BFC19EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EB8u); -#endif - /* 0xBFC19EB8: 8E020014 lw $v0, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031EB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC19EC0: 17C20006 bne $fp, $v0, 0xBFC19EDC */ - uint32_t psx_brA_BFC19EC0 = cpu->gpr[30]; uint32_t psx_brB_BFC19EC0 = cpu->gpr[2]; - psx_taken_BFC19EC0 = (psx_brA_BFC19EC0 != psx_brB_BFC19EC0); - psx_delay_BFC19EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19EC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031EC4u); -#endif - if (psx_delay_BFC19EC0) { - psx_delay_BFC19EC0 = 0; - if (psx_taken_BFC19EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031EDCu); - goto label_BFC19EDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031EC8u); - } -label_BFC19EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19EC8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19ECC: 0C0112A7 jal 0xB0044A9C */ - cpu->gpr[31] = 0x80031ED4u; /* jal link before delay slot */ - psx_delay_BFC19ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC19ED0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031ED0u); -#endif - if (psx_delay_BFC19ECC) { - psx_delay_BFC19ECC = 0; - cpu->gpr[31] = 0x80031ED4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A9Cu); - cpu->pc = 0x80044A9Cu; return; - } -label_BFC19ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031ED4u); -#endif - /* 0xBFC19ED4: 8E020014 lw $v0, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031ED4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80031ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19ED8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031ED8u); -#endif -label_BFC19EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC19EDC: 14400005 bne $v0, $zero, 0xBFC19EF4 */ - uint32_t psx_brA_BFC19EDC = cpu->gpr[2]; uint32_t psx_brB_BFC19EDC = cpu->gpr[0]; - psx_taken_BFC19EDC = (psx_brA_BFC19EDC != psx_brB_BFC19EDC); - psx_delay_BFC19EDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19EE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031EE0u); -#endif - if (psx_delay_BFC19EDC) { - psx_delay_BFC19EDC = 0; - if (psx_taken_BFC19EDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031EF4u); - goto label_BFC19EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031EE4u); - } -label_BFC19EE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EE4u); -#endif - /* 0xBFC19EE4: 8E180018 lw $t8, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031EE4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x8E180018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80031EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19EE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC19EEC: 13000005 beq $t8, $zero, 0xBFC19F04 */ - uint32_t psx_brA_BFC19EEC = cpu->gpr[24]; uint32_t psx_brB_BFC19EEC = cpu->gpr[0]; - psx_taken_BFC19EEC = (psx_brA_BFC19EEC == psx_brB_BFC19EEC); - psx_delay_BFC19EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19EF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031EF0u); -#endif - if (psx_delay_BFC19EEC) { - psx_delay_BFC19EEC = 0; - if (psx_taken_BFC19EEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F04u); - goto label_BFC19F04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031EF4u); - } -label_BFC19EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031EF4u); -#endif - /* 0xBFC19EF4: 8E050018 lw $a1, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031EF4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80031EF4u); -#endif - /* 0xBFC19EF8: 8E06001C lw $a2, 28($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031EF8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E06001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80031EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19EFC: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80031F04u; /* jal link before delay slot */ - psx_delay_BFC19EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19F00: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F00u); -#endif - if (psx_delay_BFC19EFC) { - psx_delay_BFC19EFC = 0; - cpu->gpr[31] = 0x80031F04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC19F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F04u); -#endif - /* 0xBFC19F04: 8E19000C lw $t9, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F04u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E19000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC19F08: 16600007 bne $s3, $zero, 0xBFC19F28 */ - uint32_t psx_brA_BFC19F08 = cpu->gpr[19]; uint32_t psx_brB_BFC19F08 = cpu->gpr[0]; - psx_taken_BFC19F08 = (psx_brA_BFC19F08 != psx_brB_BFC19F08); - psx_delay_BFC19F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC19F0C: AE39006C sw $t9, 108($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F0Cu); return; } g_debug_last_store_pc = 0x80031F0Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE39006Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F0Cu); -#endif - if (psx_delay_BFC19F08) { - psx_delay_BFC19F08 = 0; - if (psx_taken_BFC19F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F28u); - goto label_BFC19F28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F10u); - } -label_BFC19F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F10u); -#endif - /* 0xBFC19F10: 8E080020 lw $t0, 32($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F10u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC19F18: 05000003 bltz $t0, 0xBFC19F28 */ - uint32_t psx_brA_BFC19F18 = cpu->gpr[8]; - psx_taken_BFC19F18 = ((int32_t)psx_brA_BFC19F18 < 0); - psx_delay_BFC19F18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19F1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031F1Cu); -#endif - if (psx_delay_BFC19F18) { - psx_delay_BFC19F18 = 0; - if (psx_taken_BFC19F18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F28u); - goto label_BFC19F28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F20u); - } -label_BFC19F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300001u); -#endif - /* 0xBFC19F20: 0280A821 addu $s5, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x0280A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC19F24: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F24u); -#endif -label_BFC19F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC19F28: 12600009 beq $s3, $zero, 0xBFC19F50 */ - uint32_t psx_brA_BFC19F28 = cpu->gpr[19]; uint32_t psx_brB_BFC19F28 = cpu->gpr[0]; - psx_taken_BFC19F28 = (psx_brA_BFC19F28 == psx_brB_BFC19F28); - psx_delay_BFC19F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19F2C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F2Cu); -#endif - if (psx_delay_BFC19F28) { - psx_delay_BFC19F28 = 0; - if (psx_taken_BFC19F28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F50u); - goto label_BFC19F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F30u); - } -label_BFC19F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F30u); -#endif - /* 0xBFC19F30: 8E090020 lw $t1, 32($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F30u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19F34: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19F38: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC19F3C: 248466BC addiu $a0, $a0, 26300 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26300)); - PGXP_ALU(0x248466BCu, cpu->gpr[4], _pgx1, 0x000066BCu); } -#ifdef PSX_COSIM - cosim_instr(0x80031F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC19F40: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19F44: 0C0113D5 jal 0xB0044F54 */ - cpu->gpr[31] = 0x80031F4Cu; /* jal link before delay slot */ - psx_delay_BFC19F44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC19F48: AC2966C0 sw $t1, 26304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F48u); return; } g_debug_last_store_pc = 0x80031F48u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC2966C0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F48u); -#endif - if (psx_delay_BFC19F44) { - psx_delay_BFC19F44 = 0; - cpu->gpr[31] = 0x80031F4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F54u); - cpu->pc = 0x80044F54u; return; - } -label_BFC19F4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC19F4C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F4Cu); -#endif -label_BFC19F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC19F50: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC19F54: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x80031F5Cu; /* jal link before delay slot */ - psx_delay_BFC19F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC19F58: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F58u); -#endif - if (psx_delay_BFC19F54) { - psx_delay_BFC19F54 = 0; - cpu->gpr[31] = 0x80031F5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC19F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F5Cu); -#endif - /* 0xBFC19F5C: 8E0A0024 lw $t2, 36($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F5Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x8E0A0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC19F60: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC19F64: 26100024 addiu $s0, $s0, 36 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (36)); - PGXP_ALU(0x26100024u, cpu->gpr[16], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC19F68: 26310070 addiu $s1, $s1, 112 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (112)); - PGXP_ALU(0x26310070u, cpu->gpr[17], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC19F6C: 1540FFB7 bne $t2, $zero, 0xBFC19E4C */ - uint32_t psx_brA_BFC19F6C = cpu->gpr[10]; uint32_t psx_brB_BFC19F6C = cpu->gpr[0]; - psx_taken_BFC19F6C = (psx_brA_BFC19F6C != psx_brB_BFC19F6C); - psx_delay_BFC19F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC19F70: 26520070 addiu $s2, $s2, 112 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (112)); - PGXP_ALU(0x26520070u, cpu->gpr[18], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80031F70u); -#endif - if (psx_delay_BFC19F6C) { - psx_delay_BFC19F6C = 0; - if (psx_taken_BFC19F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031E4Cu); - goto label_BFC19E4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031F74u); - } -label_BFC19F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F74u); -#endif - /* 0xBFC19F74: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F74u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F74u); -#endif - /* 0xBFC19F78: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F78u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F78u); -#endif - /* 0xBFC19F7C: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F7Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F80u); -#endif - /* 0xBFC19F80: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F80u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F80u); -#endif - /* 0xBFC19F84: 8FBE002C lw $fp, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F84u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE002Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19F88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80031F88u); -#endif -label_BFC19F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19F8C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200002u); -#endif - /* 0xBFC19F90: AC35A778 sw $s5, -22664($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F90u); return; } g_debug_last_store_pc = 0x80031F90u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAC35A778u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80031F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19F94: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300800u); -#endif - /* 0xBFC19F98: 02955823 subu $t3, $s4, $s5 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[20] - cpu->gpr[21]; - PGXP_ALU(0x02955823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC19F9C: 06A00003 bltz $s5, 0xBFC19FAC */ - uint32_t psx_brA_BFC19F9C = cpu->gpr[21]; - psx_taken_BFC19F9C = ((int32_t)psx_brA_BFC19F9C < 0); - psx_delay_BFC19F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC19FA0: AC2BA77C sw $t3, -22660($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FA0u); return; } g_debug_last_store_pc = 0x80031FA0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BA77Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FA0u); -#endif - if (psx_delay_BFC19F9C) { - psx_delay_BFC19F9C = 0; - if (psx_taken_BFC19F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031FACu); - goto label_BFC19FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031FA4u); - } -label_BFC19FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC19FA4: 10000002 beq $zero, $zero, 0xBFC19FB0 */ - uint32_t psx_brA_BFC19FA4 = cpu->gpr[0]; uint32_t psx_brB_BFC19FA4 = cpu->gpr[0]; - psx_taken_BFC19FA4 = (psx_brA_BFC19FA4 == psx_brB_BFC19FA4); - psx_delay_BFC19FA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200009u); -#endif - /* 0xBFC19FA8: 02A01821 addu $v1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031FA8u); -#endif - if (psx_delay_BFC19FA4) { - psx_delay_BFC19FA4 = 0; - if (psx_taken_BFC19FA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031FB0u); - goto label_BFC19FB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031FACu); - } -label_BFC19FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100009u); -#endif - /* 0xBFC19FAC: 02801821 addu $v1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031FACu); -#endif -label_BFC19FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19FB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FB0u); -#endif - /* 0xBFC19FB0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FB0u); -#endif - /* 0xBFC19FB4: 8FB30014 lw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FB4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FB4u); -#endif - /* 0xBFC19FB8: 8FB40018 lw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FB8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FB8u); -#endif - /* 0xBFC19FBC: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FBCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FC0u); -#endif - /* 0xBFC19FC0: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FC0u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19FC4: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80031FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC19FC8: 03E00008 jr $ra */ - psx_delay_BFC19FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC19FCC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031FCCu); -#endif - if (psx_delay_BFC19FC8) { - psx_delay_BFC19FC8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC19FD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC19FD0u); - int psx_delay_BFC19FE0 = 0; - int psx_taken_BFC19FE0 = 0; - int psx_delay_BFC1A004 = 0; - int psx_taken_BFC1A004 = 0; - int psx_delay_BFC1A00C = 0; - int psx_delay_BFC1A014 = 0; - int psx_delay_BFC1A01C = 0; - int psx_delay_BFC1A024 = 0; - int psx_delay_BFC1A02C = 0; - int psx_delay_BFC1A048 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC19FE8u: goto label_BFC19FE8; - case 0xBFC1A00Cu: goto label_BFC1A00C; - case 0xBFC1A014u: goto label_BFC1A014; - case 0xBFC1A01Cu: goto label_BFC1A01C; - case 0xBFC1A024u: goto label_BFC1A024; - case 0xBFC1A02Cu: goto label_BFC1A02C; - case 0xBFC1A034u: goto label_BFC1A034; - case 0xBFC1A040u: goto label_BFC1A040; - default: break; - } - } -label_BFC19FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19FD0: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19FD4: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80031FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC19FD8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80031FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC19FDC: 00817024 and $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80031FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC19FE0: 11C00017 beq $t6, $zero, 0xBFC1A040 */ - uint32_t psx_brA_BFC19FE0 = cpu->gpr[14]; uint32_t psx_brB_BFC19FE0 = cpu->gpr[0]; - psx_taken_BFC19FE0 = (psx_brA_BFC19FE0 == psx_brB_BFC19FE0); - psx_delay_BFC19FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC19FE4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FE4u); return; } g_debug_last_store_pc = 0x80031FE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FE4u); -#endif - if (psx_delay_BFC19FE0) { - psx_delay_BFC19FE0 = 0; - if (psx_taken_BFC19FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032040u); - goto label_BFC1A040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031FE8u); - } -label_BFC19FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC19FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC19FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC19FE8: 240F0003 addiu $t7, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240F0003u, cpu->gpr[15], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80031FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19FEC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80031FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC19FF0: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031FF0u); -#endif - /* 0xBFC19FF4: 8F3966F8 lw $t9, 26360($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FF4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3966F8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC19FF8: AC2F65FC sw $t7, 26108($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FF8u); return; } g_debug_last_store_pc = 0x80031FF8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F65FCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80031FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC19FFC: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80031FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1A000: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1A004: 1720000E bne $t9, $zero, 0xBFC1A040 */ - uint32_t psx_brA_BFC1A004 = cpu->gpr[25]; uint32_t psx_brB_BFC1A004 = cpu->gpr[0]; - psx_taken_BFC1A004 = (psx_brA_BFC1A004 != psx_brB_BFC1A004); - psx_delay_BFC1A004 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1A008: AC38A780 sw $t8, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032008u); return; } g_debug_last_store_pc = 0x80032008u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38A780u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032008u); -#endif - if (psx_delay_BFC1A004) { - psx_delay_BFC1A004 = 0; - if (psx_taken_BFC1A004) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032040u); - goto label_BFC1A040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003200Cu); - } -label_BFC1A00C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A00Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A00C: 0C016A58 jal 0xB005A960 */ - cpu->gpr[31] = 0x80032014u; /* jal link before delay slot */ - psx_delay_BFC1A00C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A010: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032010u); -#endif - if (psx_delay_BFC1A00C) { - psx_delay_BFC1A00C = 0; - cpu->gpr[31] = 0x80032014u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A960u); - cpu->pc = 0x8005A960u; return; - } -label_BFC1A014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A014: 0C016A5C jal 0xB005A970 */ - cpu->gpr[31] = 0x8003201Cu; /* jal link before delay slot */ - psx_delay_BFC1A014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032018u); -#endif - if (psx_delay_BFC1A014) { - psx_delay_BFC1A014 = 0; - cpu->gpr[31] = 0x8003201Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A970u); - cpu->pc = 0x8005A970u; return; - } -label_BFC1A01C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A01Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003201Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A01C: 0C016A60 jal 0xB005A980 */ - cpu->gpr[31] = 0x80032024u; /* jal link before delay slot */ - psx_delay_BFC1A01C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A020: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032020u); -#endif - if (psx_delay_BFC1A01C) { - psx_delay_BFC1A01C = 0; - cpu->gpr[31] = 0x80032024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A980u); - cpu->pc = 0x8005A980u; return; - } -label_BFC1A024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A024: 0C016A64 jal 0xB005A990 */ - cpu->gpr[31] = 0x8003202Cu; /* jal link before delay slot */ - psx_delay_BFC1A024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032028u); -#endif - if (psx_delay_BFC1A024) { - psx_delay_BFC1A024 = 0; - cpu->gpr[31] = 0x8003202Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A990u); - cpu->pc = 0x8005A990u; return; - } -label_BFC1A02C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A02Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003202Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A02C: 0C016A68 jal 0xB005A9A0 */ - cpu->gpr[31] = 0x80032034u; /* jal link before delay slot */ - psx_delay_BFC1A02C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A030: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032030u); -#endif - if (psx_delay_BFC1A02C) { - psx_delay_BFC1A02C = 0; - cpu->gpr[31] = 0x80032034u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9A0u); - cpu->pc = 0x8005A9A0u; return; - } -label_BFC1A034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1A034: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A038: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A03C: AC2866F8 sw $t0, 26360($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26360; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003203Cu); return; } g_debug_last_store_pc = 0x8003203Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC2866F8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003203Cu); -#endif -label_BFC1A040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032040u); -#endif - /* 0xBFC1A040: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032040u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A044: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80032044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A048: 03E00008 jr $ra */ - psx_delay_BFC1A048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A04C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003204Cu); -#endif - if (psx_delay_BFC1A048) { - psx_delay_BFC1A048 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A050(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A050u); - int psx_delay_BFC1A060 = 0; - int psx_taken_BFC1A060 = 0; - int psx_delay_BFC1A068 = 0; - int psx_delay_BFC1A07C = 0; - int psx_taken_BFC1A07C = 0; - int psx_delay_BFC1A090 = 0; - int psx_taken_BFC1A090 = 0; - int psx_delay_BFC1A0A4 = 0; - int psx_taken_BFC1A0A4 = 0; - int psx_delay_BFC1A0AC = 0; - int psx_delay_BFC1A0B4 = 0; - int psx_taken_BFC1A0B4 = 0; - int psx_delay_BFC1A0EC = 0; - int psx_delay_BFC1A114 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A068u: goto label_BFC1A068; - case 0xBFC1A070u: goto label_BFC1A070; - case 0xBFC1A084u: goto label_BFC1A084; - case 0xBFC1A098u: goto label_BFC1A098; - case 0xBFC1A0ACu: goto label_BFC1A0AC; - case 0xBFC1A0B4u: goto label_BFC1A0B4; - case 0xBFC1A0BCu: goto label_BFC1A0BC; - case 0xBFC1A0D4u: goto label_BFC1A0D4; - case 0xBFC1A0F4u: goto label_BFC1A0F4; - case 0xBFC1A10Cu: goto label_BFC1A10C; - default: break; - } - } -label_BFC1A050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A050: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A054: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A058: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC1A05C: 00817024 and $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003205Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1A060: 11C0002A beq $t6, $zero, 0xBFC1A10C */ - uint32_t psx_brA_BFC1A060 = cpu->gpr[14]; uint32_t psx_brB_BFC1A060 = cpu->gpr[0]; - psx_taken_BFC1A060 = (psx_brA_BFC1A060 == psx_brB_BFC1A060); - psx_delay_BFC1A060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A064: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032064u); return; } g_debug_last_store_pc = 0x80032064u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032064u); -#endif - if (psx_delay_BFC1A060) { - psx_delay_BFC1A060 = 0; - if (psx_taken_BFC1A060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003210Cu); - goto label_BFC1A10C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032068u); - } -label_BFC1A068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A068: 0C00D671 jal 0xB00359C4 */ - cpu->gpr[31] = 0x80032070u; /* jal link before delay slot */ - psx_delay_BFC1A068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A06C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003206Cu); -#endif - if (psx_delay_BFC1A068) { - psx_delay_BFC1A068 = 0; - cpu->gpr[31] = 0x80032070u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800359C4u); - cpu->pc = 0x800359C4u; return; - } -label_BFC1A070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A070: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032070u); -#endif - /* 0xBFC1A074: 8DEF9E00 lw $t7, -25088($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032074u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E00u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1A07C: 11E0000F beq $t7, $zero, 0xBFC1A0BC */ - uint32_t psx_brA_BFC1A07C = cpu->gpr[15]; uint32_t psx_brB_BFC1A07C = cpu->gpr[0]; - psx_taken_BFC1A07C = (psx_brA_BFC1A07C == psx_brB_BFC1A07C); - psx_delay_BFC1A07C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032080u); -#endif - if (psx_delay_BFC1A07C) { - psx_delay_BFC1A07C = 0; - if (psx_taken_BFC1A07C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320BCu); - goto label_BFC1A0BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032084u); - } -label_BFC1A084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1A084: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032084u); -#endif - /* 0xBFC1A088: 8F189DF8 lw $t8, -25096($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032088u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A08C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003208Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1A090: 17000010 bne $t8, $zero, 0xBFC1A0D4 */ - uint32_t psx_brA_BFC1A090 = cpu->gpr[24]; uint32_t psx_brB_BFC1A090 = cpu->gpr[0]; - psx_taken_BFC1A090 = (psx_brA_BFC1A090 != psx_brB_BFC1A090); - psx_delay_BFC1A090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032094u); -#endif - if (psx_delay_BFC1A090) { - psx_delay_BFC1A090 = 0; - if (psx_taken_BFC1A090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320D4u); - goto label_BFC1A0D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032098u); - } -label_BFC1A098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A098: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032098u); -#endif - /* 0xBFC1A09C: 8F399DF4 lw $t9, -25100($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003209Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A0A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800320A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1A0A4: 1720000B bne $t9, $zero, 0xBFC1A0D4 */ - uint32_t psx_brA_BFC1A0A4 = cpu->gpr[25]; uint32_t psx_brB_BFC1A0A4 = cpu->gpr[0]; - psx_taken_BFC1A0A4 = (psx_brA_BFC1A0A4 != psx_brB_BFC1A0A4); - psx_delay_BFC1A0A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A0A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800320A8u); -#endif - if (psx_delay_BFC1A0A4) { - psx_delay_BFC1A0A4 = 0; - if (psx_taken_BFC1A0A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320D4u); - goto label_BFC1A0D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320ACu); - } -label_BFC1A0AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A0ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A0AC: 0C00DDDE jal 0xB0037778 */ - cpu->gpr[31] = 0x800320B4u; /* jal link before delay slot */ - psx_delay_BFC1A0AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A0B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800320B0u); -#endif - if (psx_delay_BFC1A0AC) { - psx_delay_BFC1A0AC = 0; - cpu->gpr[31] = 0x800320B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037778u); - cpu->pc = 0x80037778u; return; - } -label_BFC1A0B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A0B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A0B4: 10000007 beq $zero, $zero, 0xBFC1A0D4 */ - uint32_t psx_brA_BFC1A0B4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A0B4 = cpu->gpr[0]; - psx_taken_BFC1A0B4 = (psx_brA_BFC1A0B4 == psx_brB_BFC1A0B4); - psx_delay_BFC1A0B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A0B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800320B8u); -#endif - if (psx_delay_BFC1A0B4) { - psx_delay_BFC1A0B4 = 0; - if (psx_taken_BFC1A0B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320D4u); - goto label_BFC1A0D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800320BCu); - } -label_BFC1A0BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A0BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0BC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A0C0: A0209E71 sb $zero, -24975($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24975; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800320C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24975)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E71u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800320C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A0C8: A0209E70 sb $zero, -24976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24976; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800320C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24976)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800320C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0CC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A0D0: AC209E50 sw $zero, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800320D0u); return; } g_debug_last_store_pc = 0x800320D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800320D0u); -#endif -label_BFC1A0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A0D8: AC209E78 sw $zero, -24968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800320D8u); return; } g_debug_last_store_pc = 0x800320D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E78u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800320D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1A0E0: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800320E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A0E4: AC289E30 sw $t0, -25040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25040; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800320E4u); return; } g_debug_last_store_pc = 0x800320E4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E30u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800320E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A0EC: 0C00C8EE jal 0xB00323B8 */ - cpu->gpr[31] = 0x800320F4u; /* jal link before delay slot */ - psx_delay_BFC1A0EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A0F0: AC209E18 sw $zero, -25064($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25064; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800320F0u); return; } g_debug_last_store_pc = 0x800320F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E18u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800320F0u); -#endif - if (psx_delay_BFC1A0EC) { - psx_delay_BFC1A0EC = 0; - cpu->gpr[31] = 0x800320F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323B8u); - cpu->pc = 0x800323B8u; return; - } -label_BFC1A0F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A0F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800320F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1A0F4: 240900CB addiu $t1, $zero, 203 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (203)); - PGXP_ALU(0x240900CBu, cpu->gpr[9], _pgx1, 0x000000CBu); } -#ifdef PSX_COSIM - cosim_instr(0x800320F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A0F8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800320F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A0FC: AC29664C sw $t1, 26188($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800320FCu); return; } g_debug_last_store_pc = 0x800320FCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29664Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800320FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A100: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1A104: 240A0003 addiu $t2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240A0003u, cpu->gpr[10], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A108: AC2AA780 sw $t2, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032108u); return; } g_debug_last_store_pc = 0x80032108u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AA780u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80032108u); -#endif -label_BFC1A10C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A10Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003210Cu); -#endif - /* 0xBFC1A10C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003210Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003210Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A110: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80032110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A114: 03E00008 jr $ra */ - psx_delay_BFC1A114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032118u); -#endif - if (psx_delay_BFC1A114) { - psx_delay_BFC1A114 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A11C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A11Cu); - int psx_delay_BFC1A12C = 0; - int psx_taken_BFC1A12C = 0; - int psx_delay_BFC1A144 = 0; - int psx_delay_BFC1A154 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A134u: goto label_BFC1A134; - case 0xBFC1A14Cu: goto label_BFC1A14C; - default: break; - } - } -label_BFC1A11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A11C: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A120: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A124: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC1A128: 00817024 and $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1A12C: 11C00007 beq $t6, $zero, 0xBFC1A14C */ - uint32_t psx_brA_BFC1A12C = cpu->gpr[14]; uint32_t psx_brB_BFC1A12C = cpu->gpr[0]; - psx_taken_BFC1A12C = (psx_brA_BFC1A12C == psx_brB_BFC1A12C); - psx_delay_BFC1A12C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A130: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032130u); return; } g_debug_last_store_pc = 0x80032130u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032130u); -#endif - if (psx_delay_BFC1A12C) { - psx_delay_BFC1A12C = 0; - if (psx_taken_BFC1A12C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003214Cu); - goto label_BFC1A14C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032134u); - } -label_BFC1A134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1A134: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A138: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1A13C: AC2F65D4 sw $t7, 26068($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26068; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003213Cu); return; } g_debug_last_store_pc = 0x8003213Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F65D4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A140: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A144: 0C00F4C5 jal 0xB003D314 */ - cpu->gpr[31] = 0x8003214Cu; /* jal link before delay slot */ - psx_delay_BFC1A144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A148: AC20A780 sw $zero, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032148u); return; } g_debug_last_store_pc = 0x80032148u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80032148u); -#endif - if (psx_delay_BFC1A144) { - psx_delay_BFC1A144 = 0; - cpu->gpr[31] = 0x8003214Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D314u); - cpu->pc = 0x8003D314u; return; - } -label_BFC1A14C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A14Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003214Cu); -#endif - /* 0xBFC1A14C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003214Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003214Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A150: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80032150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A154: 03E00008 jr $ra */ - psx_delay_BFC1A154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032158u); -#endif - if (psx_delay_BFC1A154) { - psx_delay_BFC1A154 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A15C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A15Cu); - int psx_delay_BFC1A164 = 0; - int psx_delay_BFC1A174 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A16Cu: goto label_BFC1A16C; - default: break; - } - } -label_BFC1A15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003215Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A15C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003215Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A160: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032160u); return; } g_debug_last_store_pc = 0x80032160u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A164: 0C00F190 jal 0xB003C640 */ - cpu->gpr[31] = 0x8003216Cu; /* jal link before delay slot */ - psx_delay_BFC1A164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032168u); -#endif - if (psx_delay_BFC1A164) { - psx_delay_BFC1A164 = 0; - cpu->gpr[31] = 0x8003216Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C640u); - cpu->pc = 0x8003C640u; return; - } -label_BFC1A16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003216Cu); -#endif - /* 0xBFC1A16C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003216Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A170: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80032170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A174: 03E00008 jr $ra */ - psx_delay_BFC1A174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032178u); -#endif - if (psx_delay_BFC1A174) { - psx_delay_BFC1A174 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A17C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A17Cu); - int psx_delay_BFC1A184 = 0; - int psx_delay_BFC1A194 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A18Cu: goto label_BFC1A18C; - default: break; - } - } -label_BFC1A17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003217Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A17C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003217Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A180: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032180u); return; } g_debug_last_store_pc = 0x80032180u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A184: 0C00F292 jal 0xB003CA48 */ - cpu->gpr[31] = 0x8003218Cu; /* jal link before delay slot */ - psx_delay_BFC1A184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A188: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032188u); -#endif - if (psx_delay_BFC1A184) { - psx_delay_BFC1A184 = 0; - cpu->gpr[31] = 0x8003218Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA48u); - cpu->pc = 0x8003CA48u; return; - } -label_BFC1A18C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A18Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003218Cu); -#endif - /* 0xBFC1A18C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003218Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A190: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80032190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A194: 03E00008 jr $ra */ - psx_delay_BFC1A194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A198: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032198u); -#endif - if (psx_delay_BFC1A194) { - psx_delay_BFC1A194 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A19C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A19Cu); - int psx_delay_BFC1A1A4 = 0; - int psx_delay_BFC1A1B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A1ACu: goto label_BFC1A1AC; - default: break; - } - } -label_BFC1A19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A19C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A1A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800321A0u); return; } g_debug_last_store_pc = 0x800321A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800321A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1A4: 0C00F106 jal 0xB003C418 */ - cpu->gpr[31] = 0x800321ACu; /* jal link before delay slot */ - psx_delay_BFC1A1A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A1A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800321A8u); -#endif - if (psx_delay_BFC1A1A4) { - psx_delay_BFC1A1A4 = 0; - cpu->gpr[31] = 0x800321ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C418u); - cpu->pc = 0x8003C418u; return; - } -label_BFC1A1AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321ACu); -#endif - /* 0xBFC1A1AC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800321ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800321ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A1B0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800321B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A1B4: 03E00008 jr $ra */ - psx_delay_BFC1A1B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A1B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800321B8u); -#endif - if (psx_delay_BFC1A1B4) { - psx_delay_BFC1A1B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A1BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A1BCu); - int psx_delay_BFC1A1CC = 0; - int psx_taken_BFC1A1CC = 0; - int psx_delay_BFC1A1D4 = 0; - int psx_delay_BFC1A1DC = 0; - int psx_delay_BFC1A1E8 = 0; - int psx_delay_BFC1A1F0 = 0; - int psx_delay_BFC1A1FC = 0; - int psx_delay_BFC1A204 = 0; - int psx_delay_BFC1A210 = 0; - int psx_delay_BFC1A218 = 0; - int psx_delay_BFC1A224 = 0; - int psx_delay_BFC1A22C = 0; - int psx_delay_BFC1A238 = 0; - int psx_delay_BFC1A240 = 0; - int psx_delay_BFC1A24C = 0; - int psx_delay_BFC1A254 = 0; - int psx_delay_BFC1A260 = 0; - int psx_delay_BFC1A268 = 0; - int psx_delay_BFC1A274 = 0; - int psx_delay_BFC1A27C = 0; - int psx_delay_BFC1A288 = 0; - int psx_delay_BFC1A2B0 = 0; - int psx_delay_BFC1A2B8 = 0; - int psx_delay_BFC1A2C4 = 0; - int psx_delay_BFC1A2CC = 0; - int psx_delay_BFC1A2D8 = 0; - int psx_delay_BFC1A2E0 = 0; - int psx_delay_BFC1A2E8 = 0; - int psx_delay_BFC1A2F0 = 0; - int psx_taken_BFC1A2F0 = 0; - int psx_delay_BFC1A2F8 = 0; - int psx_delay_BFC1A300 = 0; - int psx_taken_BFC1A300 = 0; - int psx_delay_BFC1A308 = 0; - int psx_delay_BFC1A310 = 0; - int psx_taken_BFC1A310 = 0; - int psx_delay_BFC1A318 = 0; - int psx_delay_BFC1A320 = 0; - int psx_taken_BFC1A320 = 0; - int psx_delay_BFC1A334 = 0; - int psx_taken_BFC1A334 = 0; - int psx_delay_BFC1A33C = 0; - int psx_taken_BFC1A33C = 0; - int psx_delay_BFC1A344 = 0; - int psx_taken_BFC1A344 = 0; - int psx_delay_BFC1A34C = 0; - int psx_taken_BFC1A34C = 0; - int psx_delay_BFC1A358 = 0; - int psx_taken_BFC1A358 = 0; - int psx_delay_BFC1A360 = 0; - int psx_taken_BFC1A360 = 0; - int psx_delay_BFC1A370 = 0; - int psx_delay_BFC1A378 = 0; - int psx_delay_BFC1A384 = 0; - int psx_taken_BFC1A384 = 0; - int psx_delay_BFC1A38C = 0; - int psx_delay_BFC1A398 = 0; - int psx_taken_BFC1A398 = 0; - int psx_delay_BFC1A3A0 = 0; - int psx_delay_BFC1A3B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A1D4u: goto label_BFC1A1D4; - case 0xBFC1A1DCu: goto label_BFC1A1DC; - case 0xBFC1A1E4u: goto label_BFC1A1E4; - case 0xBFC1A1F0u: goto label_BFC1A1F0; - case 0xBFC1A1F8u: goto label_BFC1A1F8; - case 0xBFC1A204u: goto label_BFC1A204; - case 0xBFC1A20Cu: goto label_BFC1A20C; - case 0xBFC1A218u: goto label_BFC1A218; - case 0xBFC1A220u: goto label_BFC1A220; - case 0xBFC1A22Cu: goto label_BFC1A22C; - case 0xBFC1A234u: goto label_BFC1A234; - case 0xBFC1A240u: goto label_BFC1A240; - case 0xBFC1A248u: goto label_BFC1A248; - case 0xBFC1A254u: goto label_BFC1A254; - case 0xBFC1A25Cu: goto label_BFC1A25C; - case 0xBFC1A268u: goto label_BFC1A268; - case 0xBFC1A270u: goto label_BFC1A270; - case 0xBFC1A27Cu: goto label_BFC1A27C; - case 0xBFC1A284u: goto label_BFC1A284; - case 0xBFC1A290u: goto label_BFC1A290; - case 0xBFC1A2B8u: goto label_BFC1A2B8; - case 0xBFC1A2C0u: goto label_BFC1A2C0; - case 0xBFC1A2CCu: goto label_BFC1A2CC; - case 0xBFC1A2D4u: goto label_BFC1A2D4; - case 0xBFC1A2E0u: goto label_BFC1A2E0; - case 0xBFC1A2E8u: goto label_BFC1A2E8; - case 0xBFC1A2F0u: goto label_BFC1A2F0; - case 0xBFC1A2F8u: goto label_BFC1A2F8; - case 0xBFC1A300u: goto label_BFC1A300; - case 0xBFC1A308u: goto label_BFC1A308; - case 0xBFC1A310u: goto label_BFC1A310; - case 0xBFC1A318u: goto label_BFC1A318; - case 0xBFC1A320u: goto label_BFC1A320; - case 0xBFC1A328u: goto label_BFC1A328; - case 0xBFC1A33Cu: goto label_BFC1A33C; - case 0xBFC1A344u: goto label_BFC1A344; - case 0xBFC1A348u: goto label_BFC1A348; - case 0xBFC1A34Cu: goto label_BFC1A34C; - case 0xBFC1A354u: goto label_BFC1A354; - case 0xBFC1A358u: goto label_BFC1A358; - case 0xBFC1A360u: goto label_BFC1A360; - case 0xBFC1A368u: goto label_BFC1A368; - case 0xBFC1A378u: goto label_BFC1A378; - case 0xBFC1A380u: goto label_BFC1A380; - case 0xBFC1A38Cu: goto label_BFC1A38C; - case 0xBFC1A394u: goto label_BFC1A394; - case 0xBFC1A3A0u: goto label_BFC1A3A0; - case 0xBFC1A3A8u: goto label_BFC1A3A8; - default: break; - } - } -label_BFC1A1BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A1BC: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800321BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A1C0: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800321C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A1C4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800321C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC1A1C8: 00817024 and $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800321C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1A1CC: 11C00076 beq $t6, $zero, 0xBFC1A3A8 */ - uint32_t psx_brA_BFC1A1CC = cpu->gpr[14]; uint32_t psx_brB_BFC1A1CC = cpu->gpr[0]; - psx_taken_BFC1A1CC = (psx_brA_BFC1A1CC == psx_brB_BFC1A1CC); - psx_delay_BFC1A1CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A1D0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800321D0u); return; } g_debug_last_store_pc = 0x800321D0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800321D0u); -#endif - if (psx_delay_BFC1A1CC) { - psx_delay_BFC1A1CC = 0; - if (psx_taken_BFC1A1CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323A8u); - goto label_BFC1A3A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800321D4u); - } -label_BFC1A1D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1D4: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x800321DCu; /* jal link before delay slot */ - psx_delay_BFC1A1D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A1D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800321D8u); -#endif - if (psx_delay_BFC1A1D4) { - psx_delay_BFC1A1D4 = 0; - cpu->gpr[31] = 0x800321DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC1A1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1DC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800321E4u; /* jal link before delay slot */ - psx_delay_BFC1A1DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A1E0: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800321E0u); -#endif - if (psx_delay_BFC1A1DC) { - psx_delay_BFC1A1DC = 0; - cpu->gpr[31] = 0x800321E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A1E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A1E4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800321E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1E8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800321F0u; /* jal link before delay slot */ - psx_delay_BFC1A1E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A1EC: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800321ECu); -#endif - if (psx_delay_BFC1A1E8) { - psx_delay_BFC1A1E8 = 0; - cpu->gpr[31] = 0x800321F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A1F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1F0: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800321F8u; /* jal link before delay slot */ - psx_delay_BFC1A1F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A1F4: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800321F4u); -#endif - if (psx_delay_BFC1A1F0) { - psx_delay_BFC1A1F0 = 0; - cpu->gpr[31] = 0x800321F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A1F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A1F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800321F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A1F8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800321F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A1FC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032204u; /* jal link before delay slot */ - psx_delay_BFC1A1FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A200: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032200u); -#endif - if (psx_delay_BFC1A1FC) { - psx_delay_BFC1A1FC = 0; - cpu->gpr[31] = 0x80032204u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A204: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003220Cu; /* jal link before delay slot */ - psx_delay_BFC1A204 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A208: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032208u); -#endif - if (psx_delay_BFC1A204) { - psx_delay_BFC1A204 = 0; - cpu->gpr[31] = 0x8003220Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A20C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A20Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A20C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A210: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032218u; /* jal link before delay slot */ - psx_delay_BFC1A210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A214: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032214u); -#endif - if (psx_delay_BFC1A210) { - psx_delay_BFC1A210 = 0; - cpu->gpr[31] = 0x80032218u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A218: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032220u; /* jal link before delay slot */ - psx_delay_BFC1A218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A21C: 2404000D addiu $a0, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2404000Du, cpu->gpr[4], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003221Cu); -#endif - if (psx_delay_BFC1A218) { - psx_delay_BFC1A218 = 0; - cpu->gpr[31] = 0x80032220u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A220: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A224: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003222Cu; /* jal link before delay slot */ - psx_delay_BFC1A224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A228: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032228u); -#endif - if (psx_delay_BFC1A224) { - psx_delay_BFC1A224 = 0; - cpu->gpr[31] = 0x8003222Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A22C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A22Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003222Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A22C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032234u; /* jal link before delay slot */ - psx_delay_BFC1A22C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A230: 2404006E addiu $a0, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2404006Eu, cpu->gpr[4], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80032230u); -#endif - if (psx_delay_BFC1A22C) { - psx_delay_BFC1A22C = 0; - cpu->gpr[31] = 0x80032234u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A234: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A238: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032240u; /* jal link before delay slot */ - psx_delay_BFC1A238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A23C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003223Cu); -#endif - if (psx_delay_BFC1A238) { - psx_delay_BFC1A238 = 0; - cpu->gpr[31] = 0x80032240u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A240: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032248u; /* jal link before delay slot */ - psx_delay_BFC1A240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A244: 2404006F addiu $a0, $zero, 111 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (111)); - PGXP_ALU(0x2404006Fu, cpu->gpr[4], _pgx1, 0x0000006Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032244u); -#endif - if (psx_delay_BFC1A240) { - psx_delay_BFC1A240 = 0; - cpu->gpr[31] = 0x80032248u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A248: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A24C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032254u; /* jal link before delay slot */ - psx_delay_BFC1A24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A250: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032250u); -#endif - if (psx_delay_BFC1A24C) { - psx_delay_BFC1A24C = 0; - cpu->gpr[31] = 0x80032254u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A254: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003225Cu; /* jal link before delay slot */ - psx_delay_BFC1A254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A258: 24040011 addiu $a0, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24040011u, cpu->gpr[4], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x80032258u); -#endif - if (psx_delay_BFC1A254) { - psx_delay_BFC1A254 = 0; - cpu->gpr[31] = 0x8003225Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A25C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A25Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A25C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A260: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032268u; /* jal link before delay slot */ - psx_delay_BFC1A260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A264: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032264u); -#endif - if (psx_delay_BFC1A260) { - psx_delay_BFC1A260 = 0; - cpu->gpr[31] = 0x80032268u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A268: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032270u; /* jal link before delay slot */ - psx_delay_BFC1A268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A26C: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x8003226Cu); -#endif - if (psx_delay_BFC1A268) { - psx_delay_BFC1A268 = 0; - cpu->gpr[31] = 0x80032270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A270: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A274: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003227Cu; /* jal link before delay slot */ - psx_delay_BFC1A274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A278: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032278u); -#endif - if (psx_delay_BFC1A274) { - psx_delay_BFC1A274 = 0; - cpu->gpr[31] = 0x8003227Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A27C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A27Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A27C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032284u; /* jal link before delay slot */ - psx_delay_BFC1A27C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A280: 24040013 addiu $a0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24040013u, cpu->gpr[4], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80032280u); -#endif - if (psx_delay_BFC1A27C) { - psx_delay_BFC1A27C = 0; - cpu->gpr[31] = 0x80032284u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A284: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A288: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032290u; /* jal link before delay slot */ - psx_delay_BFC1A288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A28C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003228Cu); -#endif - if (psx_delay_BFC1A288) { - psx_delay_BFC1A288 = 0; - cpu->gpr[31] = 0x80032290u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A290: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032290u); -#endif - /* 0xBFC1A294: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032294u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A298: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1A29C: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003229Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1A2A0: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800322A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1A2A4: 0018C280 sll $t8, $t8, 10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 10u; - PGXP_ALU(0x0018C280u, cpu->gpr[24], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x800322A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A2A8: 273986A8 addiu $t9, $t9, -31064 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-31064)); - PGXP_ALU(0x273986A8u, cpu->gpr[25], _pgx1, 0xFFFF86A8u); } -#ifdef PSX_COSIM - cosim_instr(0x800322A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC1A2AC: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800322ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2B0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800322B8u; /* jal link before delay slot */ - psx_delay_BFC1A2B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A2B4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800322B4u); -#endif - if (psx_delay_BFC1A2B0) { - psx_delay_BFC1A2B0 = 0; - cpu->gpr[31] = 0x800322B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2B8: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800322C0u; /* jal link before delay slot */ - psx_delay_BFC1A2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A2BC: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800322BCu); -#endif - if (psx_delay_BFC1A2B8) { - psx_delay_BFC1A2B8 = 0; - cpu->gpr[31] = 0x800322C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A2C0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800322C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2C4: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800322CCu; /* jal link before delay slot */ - psx_delay_BFC1A2C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A2C8: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800322C8u); -#endif - if (psx_delay_BFC1A2C4) { - psx_delay_BFC1A2C4 = 0; - cpu->gpr[31] = 0x800322CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A2CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2CC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800322D4u; /* jal link before delay slot */ - psx_delay_BFC1A2CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A2D0: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800322D0u); -#endif - if (psx_delay_BFC1A2CC) { - psx_delay_BFC1A2CC = 0; - cpu->gpr[31] = 0x800322D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A2D4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800322D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2D8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800322E0u; /* jal link before delay slot */ - psx_delay_BFC1A2D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A2DC: 24050005 addiu $a1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24050005u, cpu->gpr[5], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800322DCu); -#endif - if (psx_delay_BFC1A2D8) { - psx_delay_BFC1A2D8 = 0; - cpu->gpr[31] = 0x800322E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A2E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2E0: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x800322E8u; /* jal link before delay slot */ - psx_delay_BFC1A2E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A2E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800322E4u); -#endif - if (psx_delay_BFC1A2E0) { - psx_delay_BFC1A2E0 = 0; - cpu->gpr[31] = 0x800322E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC1A2E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2E8: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x800322F0u; /* jal link before delay slot */ - psx_delay_BFC1A2E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A2EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800322ECu); -#endif - if (psx_delay_BFC1A2E8) { - psx_delay_BFC1A2E8 = 0; - cpu->gpr[31] = 0x800322F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC1A2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A2F0: 10000019 beq $zero, $zero, 0xBFC1A358 */ - uint32_t psx_brA_BFC1A2F0 = cpu->gpr[0]; uint32_t psx_brB_BFC1A2F0 = cpu->gpr[0]; - psx_taken_BFC1A2F0 = (psx_brA_BFC1A2F0 == psx_brB_BFC1A2F0); - psx_delay_BFC1A2F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A2F4: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800322F4u); -#endif - if (psx_delay_BFC1A2F0) { - psx_delay_BFC1A2F0 = 0; - if (psx_taken_BFC1A2F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032358u); - goto label_BFC1A358; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800322F8u); - } -label_BFC1A2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800322F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A2F8: 0C00C857 jal 0xB003215C */ - cpu->gpr[31] = 0x80032300u; /* jal link before delay slot */ - psx_delay_BFC1A2F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800322FCu); -#endif - if (psx_delay_BFC1A2F8) { - psx_delay_BFC1A2F8 = 0; - cpu->gpr[31] = 0x80032300u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003215Cu); - cpu->pc = 0x8003215Cu; return; - } -label_BFC1A300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A300: 10000011 beq $zero, $zero, 0xBFC1A348 */ - uint32_t psx_brA_BFC1A300 = cpu->gpr[0]; uint32_t psx_brB_BFC1A300 = cpu->gpr[0]; - psx_taken_BFC1A300 = (psx_brA_BFC1A300 == psx_brB_BFC1A300); - psx_delay_BFC1A300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032304u); -#endif - if (psx_delay_BFC1A300) { - psx_delay_BFC1A300 = 0; - if (psx_taken_BFC1A300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032348u); - goto label_BFC1A348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032308u); - } -label_BFC1A308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A308: 0C00C85F jal 0xB003217C */ - cpu->gpr[31] = 0x80032310u; /* jal link before delay slot */ - psx_delay_BFC1A308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A30C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003230Cu); -#endif - if (psx_delay_BFC1A308) { - psx_delay_BFC1A308 = 0; - cpu->gpr[31] = 0x80032310u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003217Cu); - cpu->pc = 0x8003217Cu; return; - } -label_BFC1A310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A310: 1000000D beq $zero, $zero, 0xBFC1A348 */ - uint32_t psx_brA_BFC1A310 = cpu->gpr[0]; uint32_t psx_brB_BFC1A310 = cpu->gpr[0]; - psx_taken_BFC1A310 = (psx_brA_BFC1A310 == psx_brB_BFC1A310); - psx_delay_BFC1A310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032314u); -#endif - if (psx_delay_BFC1A310) { - psx_delay_BFC1A310 = 0; - if (psx_taken_BFC1A310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032348u); - goto label_BFC1A348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032318u); - } -label_BFC1A318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A318: 0C00C867 jal 0xB003219C */ - cpu->gpr[31] = 0x80032320u; /* jal link before delay slot */ - psx_delay_BFC1A318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A31C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003231Cu); -#endif - if (psx_delay_BFC1A318) { - psx_delay_BFC1A318 = 0; - cpu->gpr[31] = 0x80032320u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003219Cu); - cpu->pc = 0x8003219Cu; return; - } -label_BFC1A320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A320: 10000009 beq $zero, $zero, 0xBFC1A348 */ - uint32_t psx_brA_BFC1A320 = cpu->gpr[0]; uint32_t psx_brB_BFC1A320 = cpu->gpr[0]; - psx_taken_BFC1A320 = (psx_brA_BFC1A320 == psx_brB_BFC1A320); - psx_delay_BFC1A320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A324: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032324u); -#endif - if (psx_delay_BFC1A320) { - psx_delay_BFC1A320 = 0; - if (psx_taken_BFC1A320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032348u); - goto label_BFC1A348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032328u); - } -label_BFC1A328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1A328: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032328u); -#endif - /* 0xBFC1A32C: 8D086BB8 lw $t0, 27576($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 27576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003232Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086BB8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003232Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A330: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80032330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A334: 1101FFF0 beq $t0, $at, 0xBFC1A2F8 */ - uint32_t psx_brA_BFC1A334 = cpu->gpr[8]; uint32_t psx_brB_BFC1A334 = cpu->gpr[1]; - psx_taken_BFC1A334 = (psx_brA_BFC1A334 == psx_brB_BFC1A334); - psx_delay_BFC1A334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A338: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80032338u); -#endif - if (psx_delay_BFC1A334) { - psx_delay_BFC1A334 = 0; - if (psx_taken_BFC1A334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800322F8u); - goto label_BFC1A2F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003233Cu); - } -label_BFC1A33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003233Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A33C: 1101FFF2 beq $t0, $at, 0xBFC1A308 */ - uint32_t psx_brA_BFC1A33C = cpu->gpr[8]; uint32_t psx_brB_BFC1A33C = cpu->gpr[1]; - psx_taken_BFC1A33C = (psx_brA_BFC1A33C == psx_brB_BFC1A33C); - psx_delay_BFC1A33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A340: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80032340u); -#endif - if (psx_delay_BFC1A33C) { - psx_delay_BFC1A33C = 0; - if (psx_taken_BFC1A33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032308u); - goto label_BFC1A308; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032344u); - } -label_BFC1A344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A344: 1101FFF4 beq $t0, $at, 0xBFC1A318 */ - uint32_t psx_brA_BFC1A344 = cpu->gpr[8]; uint32_t psx_brB_BFC1A344 = cpu->gpr[1]; - psx_taken_BFC1A344 = (psx_brA_BFC1A344 == psx_brB_BFC1A344); - psx_delay_BFC1A344 = 1; -label_BFC1A348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A348: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032348u); -#endif - if (psx_delay_BFC1A344) { - psx_delay_BFC1A344 = 0; - if (psx_taken_BFC1A344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032318u); - goto label_BFC1A318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003234Cu); - } -label_BFC1A34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003234Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A34C: 10000006 beq $zero, $zero, 0xBFC1A368 */ - uint32_t psx_brA_BFC1A34C = cpu->gpr[0]; uint32_t psx_brB_BFC1A34C = cpu->gpr[0]; - psx_taken_BFC1A34C = (psx_brA_BFC1A34C == psx_brB_BFC1A34C); - psx_delay_BFC1A34C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A350: AC206BBC sw $zero, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032350u); return; } g_debug_last_store_pc = 0x80032350u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80032350u); -#endif - if (psx_delay_BFC1A34C) { - psx_delay_BFC1A34C = 0; - if (psx_taken_BFC1A34C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032368u); - goto label_BFC1A368; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032354u); - } -label_BFC1A354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A354: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032354u); -#endif -label_BFC1A358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1A358: 1041FFF3 beq $v0, $at, 0xBFC1A328 */ - uint32_t psx_brA_BFC1A358 = cpu->gpr[2]; uint32_t psx_brB_BFC1A358 = cpu->gpr[1]; - psx_taken_BFC1A358 = (psx_brA_BFC1A358 == psx_brB_BFC1A358); - psx_delay_BFC1A358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A35C: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003235Cu); -#endif - if (psx_delay_BFC1A358) { - psx_delay_BFC1A358 = 0; - if (psx_taken_BFC1A358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032328u); - goto label_BFC1A328; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032360u); - } -label_BFC1A360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1A360: 1041FFF9 beq $v0, $at, 0xBFC1A348 */ - uint32_t psx_brA_BFC1A360 = cpu->gpr[2]; uint32_t psx_brB_BFC1A360 = cpu->gpr[1]; - psx_taken_BFC1A360 = (psx_brA_BFC1A360 == psx_brB_BFC1A360); - psx_delay_BFC1A360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A364: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032364u); -#endif - if (psx_delay_BFC1A360) { - psx_delay_BFC1A360 = 0; - if (psx_taken_BFC1A360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032348u); - goto label_BFC1A348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032368u); - } -label_BFC1A368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1A368: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032368u); -#endif - /* 0xBFC1A36C: 8C846BB8 lw $a0, 27576($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003236Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003236Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A370: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80032378u; /* jal link before delay slot */ - psx_delay_BFC1A370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A374: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032374u); -#endif - if (psx_delay_BFC1A370) { - psx_delay_BFC1A370 = 0; - cpu->gpr[31] = 0x80032378u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC1A378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A378: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x80032380u; /* jal link before delay slot */ - psx_delay_BFC1A378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A37C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003237Cu); -#endif - if (psx_delay_BFC1A378) { - psx_delay_BFC1A378 = 0; - cpu->gpr[31] = 0x80032380u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC1A380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A380: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1A384: 10410006 beq $v0, $at, 0xBFC1A3A0 */ - uint32_t psx_brA_BFC1A384 = cpu->gpr[2]; uint32_t psx_brB_BFC1A384 = cpu->gpr[1]; - psx_taken_BFC1A384 = (psx_brA_BFC1A384 == psx_brB_BFC1A384); - psx_delay_BFC1A384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032388u); -#endif - if (psx_delay_BFC1A384) { - psx_delay_BFC1A384 = 0; - if (psx_taken_BFC1A384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323A0u); - goto label_BFC1A3A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003238Cu); - } -label_BFC1A38C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A38Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003238Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A38C: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x80032394u; /* jal link before delay slot */ - psx_delay_BFC1A38C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032390u); -#endif - if (psx_delay_BFC1A38C) { - psx_delay_BFC1A38C = 0; - cpu->gpr[31] = 0x80032394u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC1A394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A394: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1A398: 1441FFFC bne $v0, $at, 0xBFC1A38C */ - uint32_t psx_brA_BFC1A398 = cpu->gpr[2]; uint32_t psx_brB_BFC1A398 = cpu->gpr[1]; - psx_taken_BFC1A398 = (psx_brA_BFC1A398 != psx_brB_BFC1A398); - psx_delay_BFC1A398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A39C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003239Cu); -#endif - if (psx_delay_BFC1A398) { - psx_delay_BFC1A398 = 0; - if (psx_taken_BFC1A398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003238Cu); - goto label_BFC1A38C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323A0u); - } -label_BFC1A3A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A3A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A3A0: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x800323A8u; /* jal link before delay slot */ - psx_delay_BFC1A3A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A3A4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800323A4u); -#endif - if (psx_delay_BFC1A3A0) { - psx_delay_BFC1A3A0 = 0; - cpu->gpr[31] = 0x800323A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC1A3A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A3A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323A8u); -#endif - /* 0xBFC1A3A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800323A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A3AC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800323ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A3B0: 03E00008 jr $ra */ - psx_delay_BFC1A3B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A3B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800323B4u); -#endif - if (psx_delay_BFC1A3B0) { - psx_delay_BFC1A3B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A3B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A3B8u); - int psx_delay_BFC1A3F8 = 0; - int psx_taken_BFC1A3F8 = 0; - int psx_delay_BFC1A40C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A400u: goto label_BFC1A400; - case 0xBFC1A40Cu: goto label_BFC1A40C; - default: break; - } - } -label_BFC1A3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3BC: AC209F64 sw $zero, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323BCu); return; } g_debug_last_store_pc = 0x800323BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3C0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3C4: AC209F68 sw $zero, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323C4u); return; } g_debug_last_store_pc = 0x800323C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1A3CC: 240E0023 addiu $t6, $zero, 35 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); - PGXP_ALU(0x240E0023u, cpu->gpr[14], _pgx1, 0x00000023u); } -#ifdef PSX_COSIM - cosim_instr(0x800323CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1A3D0: AC2E9F6C sw $t6, -24724($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24724; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24724)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323D0u); return; } g_debug_last_store_pc = 0x800323D0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F6Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800323D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3D8: AC209F70 sw $zero, -24720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323D8u); return; } g_debug_last_store_pc = 0x800323D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3E0: AC209F74 sw $zero, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323E0u); return; } g_debug_last_store_pc = 0x800323E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A3E8: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323E8u); -#endif - /* 0xBFC1A3EC: 8DEF6948 lw $t7, 26952($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323ECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800323ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800323F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3F0: AC209F78 sw $zero, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323F0u); return; } g_debug_last_store_pc = 0x800323F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F78u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A3F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800323F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1A3F8: 15E00004 bne $t7, $zero, 0xBFC1A40C */ - uint32_t psx_brA_BFC1A3F8 = cpu->gpr[15]; uint32_t psx_brB_BFC1A3F8 = cpu->gpr[0]; - psx_taken_BFC1A3F8 = (psx_brA_BFC1A3F8 != psx_brB_BFC1A3F8); - psx_delay_BFC1A3F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A3FC: AC209E6C sw $zero, -24980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800323FCu); return; } g_debug_last_store_pc = 0x800323FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E6Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800323FCu); -#endif - if (psx_delay_BFC1A3F8) { - psx_delay_BFC1A3F8 = 0; - if (psx_taken_BFC1A3F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003240Cu); - goto label_BFC1A40C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032400u); - } -label_BFC1A400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1A400: 24180032 addiu $t8, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24180032u, cpu->gpr[24], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80032400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A404: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1A408: AC386948 sw $t8, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032408u); return; } g_debug_last_store_pc = 0x80032408u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032408u); -#endif -label_BFC1A40C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A40Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003240Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A40C: 03E00008 jr $ra */ - psx_delay_BFC1A40C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032410u); -#endif - if (psx_delay_BFC1A40C) { - psx_delay_BFC1A40C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A414(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A414u); - int psx_delay_BFC1A418 = 0; -label_BFC1A414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A414: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A418: 03E00008 jr $ra */ - psx_delay_BFC1A418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1A41C: AC249F64 sw $a0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003241Cu); return; } g_debug_last_store_pc = 0x8003241Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249F64u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003241Cu); -#endif - if (psx_delay_BFC1A418) { - psx_delay_BFC1A418 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A420(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A420u); - int psx_delay_BFC1A428 = 0; -label_BFC1A420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1A420: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032420u); -#endif - /* 0xBFC1A424: 8C429F64 lw $v0, -24732($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032424u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A428: 03E00008 jr $ra */ - psx_delay_BFC1A428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A42C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003242Cu); -#endif - if (psx_delay_BFC1A428) { - psx_delay_BFC1A428 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A430(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A430u); - int psx_delay_BFC1A448 = 0; - int psx_taken_BFC1A448 = 0; - int psx_delay_BFC1A454 = 0; - int psx_taken_BFC1A454 = 0; - int psx_delay_BFC1A460 = 0; - int psx_taken_BFC1A460 = 0; - int psx_delay_BFC1A468 = 0; - int psx_delay_BFC1A47C = 0; - int psx_delay_BFC1A484 = 0; - int psx_delay_BFC1A494 = 0; - int psx_delay_BFC1A4A4 = 0; - int psx_taken_BFC1A4A4 = 0; - int psx_delay_BFC1A4AC = 0; - int psx_delay_BFC1A4C0 = 0; - int psx_delay_BFC1A4CC = 0; - int psx_delay_BFC1A4DC = 0; - int psx_delay_BFC1A4FC = 0; - int psx_taken_BFC1A4FC = 0; - int psx_delay_BFC1A504 = 0; - int psx_delay_BFC1A518 = 0; - int psx_delay_BFC1A520 = 0; - int psx_delay_BFC1A530 = 0; - int psx_delay_BFC1A540 = 0; - int psx_taken_BFC1A540 = 0; - int psx_delay_BFC1A548 = 0; - int psx_delay_BFC1A55C = 0; - int psx_delay_BFC1A568 = 0; - int psx_delay_BFC1A578 = 0; - int psx_delay_BFC1A5A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A450u: goto label_BFC1A450; - case 0xBFC1A45Cu: goto label_BFC1A45C; - case 0xBFC1A460u: goto label_BFC1A460; - case 0xBFC1A468u: goto label_BFC1A468; - case 0xBFC1A470u: goto label_BFC1A470; - case 0xBFC1A484u: goto label_BFC1A484; - case 0xBFC1A48Cu: goto label_BFC1A48C; - case 0xBFC1A49Cu: goto label_BFC1A49C; - case 0xBFC1A4ACu: goto label_BFC1A4AC; - case 0xBFC1A4B4u: goto label_BFC1A4B4; - case 0xBFC1A4C8u: goto label_BFC1A4C8; - case 0xBFC1A4D4u: goto label_BFC1A4D4; - case 0xBFC1A4E4u: goto label_BFC1A4E4; - case 0xBFC1A4FCu: goto label_BFC1A4FC; - case 0xBFC1A504u: goto label_BFC1A504; - case 0xBFC1A50Cu: goto label_BFC1A50C; - case 0xBFC1A520u: goto label_BFC1A520; - case 0xBFC1A528u: goto label_BFC1A528; - case 0xBFC1A538u: goto label_BFC1A538; - case 0xBFC1A548u: goto label_BFC1A548; - case 0xBFC1A550u: goto label_BFC1A550; - case 0xBFC1A564u: goto label_BFC1A564; - case 0xBFC1A570u: goto label_BFC1A570; - case 0xBFC1A580u: goto label_BFC1A580; - case 0xBFC1A5A0u: goto label_BFC1A5A0; - default: break; - } - } -label_BFC1A430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A430: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1A434: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032434u); -#endif - /* 0xBFC1A438: 8DCE9F80 lw $t6, -24704($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24704; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032438u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F80u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1A43C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003243Cu); return; } g_debug_last_store_pc = 0x8003243Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003243Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1A440: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A444: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032444u); return; } g_debug_last_store_pc = 0x80032444u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC1A448: 162E0004 bne $s1, $t6, 0xBFC1A45C */ - uint32_t psx_brA_BFC1A448 = cpu->gpr[17]; uint32_t psx_brB_BFC1A448 = cpu->gpr[14]; - psx_taken_BFC1A448 = (psx_brA_BFC1A448 != psx_brB_BFC1A448); - psx_delay_BFC1A448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1A44C: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003244Cu); return; } g_debug_last_store_pc = 0x8003244Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003244Cu); -#endif - if (psx_delay_BFC1A448) { - psx_delay_BFC1A448 = 0; - if (psx_taken_BFC1A448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003245Cu); - goto label_BFC1A45C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032450u); - } -label_BFC1A450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A450: 240100CC addiu $at, $zero, 204 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (204)); - PGXP_ALU(0x240100CCu, cpu->gpr[1], _pgx1, 0x000000CCu); } -#ifdef PSX_COSIM - cosim_instr(0x80032450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC1A454: 16210052 bne $s1, $at, 0xBFC1A5A0 */ - uint32_t psx_brA_BFC1A454 = cpu->gpr[17]; uint32_t psx_brB_BFC1A454 = cpu->gpr[1]; - psx_taken_BFC1A454 = (psx_brA_BFC1A454 != psx_brB_BFC1A454); - psx_delay_BFC1A454 = 1; - /* 0xBFC1A458: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032458u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032458u); -#endif - if (psx_delay_BFC1A454) { - psx_delay_BFC1A454 = 0; - if (psx_taken_BFC1A454) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800325A0u); - goto label_BFC1A5A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003245Cu); - } -label_BFC1A45C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A45Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003245Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1A45C: 241000C9 addiu $s0, $zero, 201 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (201)); - PGXP_ALU(0x241000C9u, cpu->gpr[16], _pgx1, 0x000000C9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003245Cu); -#endif -label_BFC1A460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1A460: 1211000E beq $s0, $s1, 0xBFC1A49C */ - uint32_t psx_brA_BFC1A460 = cpu->gpr[16]; uint32_t psx_brB_BFC1A460 = cpu->gpr[17]; - psx_taken_BFC1A460 = (psx_brA_BFC1A460 == psx_brB_BFC1A460); - psx_delay_BFC1A460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032464u); -#endif - if (psx_delay_BFC1A460) { - psx_delay_BFC1A460 = 0; - if (psx_taken_BFC1A460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003249Cu); - goto label_BFC1A49C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032468u); - } -label_BFC1A468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A468: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032470u; /* jal link before delay slot */ - psx_delay_BFC1A468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1A46C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003246Cu); -#endif - if (psx_delay_BFC1A468) { - psx_delay_BFC1A468 = 0; - cpu->gpr[31] = 0x80032470u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A470: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A474: 2405000A addiu $a1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2405000Au, cpu->gpr[5], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A478: 2406000A addiu $a2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2406000Au, cpu->gpr[6], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A47C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80032484u; /* jal link before delay slot */ - psx_delay_BFC1A47C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1A480: 2407000A addiu $a3, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2407000Au, cpu->gpr[7], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032480u); -#endif - if (psx_delay_BFC1A47C) { - psx_delay_BFC1A47C = 0; - cpu->gpr[31] = 0x80032484u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC1A484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A484: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003248Cu; /* jal link before delay slot */ - psx_delay_BFC1A484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC1A488: 26040064 addiu $a0, $s0, 100 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (100)); - PGXP_ALU(0x26040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80032488u); -#endif - if (psx_delay_BFC1A484) { - psx_delay_BFC1A484 = 0; - cpu->gpr[31] = 0x8003248Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A48C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A48Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003248Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A48C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003248Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A490: 24050030 addiu $a1, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24050030u, cpu->gpr[5], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80032490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A494: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003249Cu; /* jal link before delay slot */ - psx_delay_BFC1A494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A498: 24060030 addiu $a2, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24060030u, cpu->gpr[6], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80032498u); -#endif - if (psx_delay_BFC1A494) { - psx_delay_BFC1A494 = 0; - cpu->gpr[31] = 0x8003249Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1A49C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A49Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003249Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1A49C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003249Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1A4A0: 2A0100D0 slti $at, $s0, 208 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0); - PGXP_ALU(0x2A0100D0u, cpu->gpr[1], _pgx1, 0x00D0u); } -#ifdef PSX_COSIM - cosim_instr(0x800324A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A4A4: 1420FFEE bne $at, $zero, 0xBFC1A460 */ - uint32_t psx_brA_BFC1A4A4 = cpu->gpr[1]; uint32_t psx_brB_BFC1A4A4 = cpu->gpr[0]; - psx_taken_BFC1A4A4 = (psx_brA_BFC1A4A4 != psx_brB_BFC1A4A4); - psx_delay_BFC1A4A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A4A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800324A8u); -#endif - if (psx_delay_BFC1A4A4) { - psx_delay_BFC1A4A4 = 0; - if (psx_taken_BFC1A4A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032460u); - goto label_BFC1A460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800324ACu); - } -label_BFC1A4AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A4AC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800324B4u; /* jal link before delay slot */ - psx_delay_BFC1A4AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1A4B0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800324B0u); -#endif - if (psx_delay_BFC1A4AC) { - psx_delay_BFC1A4AC = 0; - cpu->gpr[31] = 0x800324B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A4B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A4B4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800324B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A4B8: 240500C8 addiu $a1, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240500C8u, cpu->gpr[5], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800324B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A4BC: 240600C8 addiu $a2, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240600C8u, cpu->gpr[6], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800324BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A4C0: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x800324C8u; /* jal link before delay slot */ - psx_delay_BFC1A4C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1A4C4: 240700C8 addiu $a3, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240700C8u, cpu->gpr[7], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800324C4u); -#endif - if (psx_delay_BFC1A4C0) { - psx_delay_BFC1A4C0 = 0; - cpu->gpr[31] = 0x800324C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC1A4C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC1A4C8: 26240064 addiu $a0, $s1, 100 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (100)); - PGXP_ALU(0x26240064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800324C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A4CC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800324D4u; /* jal link before delay slot */ - psx_delay_BFC1A4CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1A4D0: AFA4002C sw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800324D0u); return; } g_debug_last_store_pc = 0x800324D0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800324D0u); -#endif - if (psx_delay_BFC1A4CC) { - psx_delay_BFC1A4CC = 0; - cpu->gpr[31] = 0x800324D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A4D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A4D4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800324D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A4D8: 2405003C addiu $a1, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2405003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800324D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A4DC: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x800324E4u; /* jal link before delay slot */ - psx_delay_BFC1A4DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A4E0: 2406003C addiu $a2, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2406003Cu, cpu->gpr[6], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800324E0u); -#endif - if (psx_delay_BFC1A4DC) { - psx_delay_BFC1A4DC = 0; - cpu->gpr[31] = 0x800324E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1A4E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A4E4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800324E4u); -#endif - /* 0xBFC1A4E8: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800324E8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800324E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A4EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800324ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1A4F0: 2DF80001 sltiu $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2DF80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800324F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1A4F4: AC389E24 sw $t8, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800324F4u); return; } g_debug_last_store_pc = 0x800324F4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E24u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800324F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1A4F8: 241000C9 addiu $s0, $zero, 201 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (201)); - PGXP_ALU(0x241000C9u, cpu->gpr[16], _pgx1, 0x000000C9u); } -#ifdef PSX_COSIM - cosim_instr(0x800324F8u); -#endif -label_BFC1A4FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A4FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800324FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1A4FC: 1211000E beq $s0, $s1, 0xBFC1A538 */ - uint32_t psx_brA_BFC1A4FC = cpu->gpr[16]; uint32_t psx_brB_BFC1A4FC = cpu->gpr[17]; - psx_taken_BFC1A4FC = (psx_brA_BFC1A4FC == psx_brB_BFC1A4FC); - psx_delay_BFC1A4FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A500: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032500u); -#endif - if (psx_delay_BFC1A4FC) { - psx_delay_BFC1A4FC = 0; - if (psx_taken_BFC1A4FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032538u); - goto label_BFC1A538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032504u); - } -label_BFC1A504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A504: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003250Cu; /* jal link before delay slot */ - psx_delay_BFC1A504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1A508: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032508u); -#endif - if (psx_delay_BFC1A504) { - psx_delay_BFC1A504 = 0; - cpu->gpr[31] = 0x8003250Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A50C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A50Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003250Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A50C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003250Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A510: 2405000A addiu $a1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2405000Au, cpu->gpr[5], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A514: 2406000A addiu $a2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2406000Au, cpu->gpr[6], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A518: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80032520u; /* jal link before delay slot */ - psx_delay_BFC1A518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1A51C: 2407000A addiu $a3, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2407000Au, cpu->gpr[7], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003251Cu); -#endif - if (psx_delay_BFC1A518) { - psx_delay_BFC1A518 = 0; - cpu->gpr[31] = 0x80032520u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC1A520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A520: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032528u; /* jal link before delay slot */ - psx_delay_BFC1A520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC1A524: 26040064 addiu $a0, $s0, 100 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (100)); - PGXP_ALU(0x26040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80032524u); -#endif - if (psx_delay_BFC1A520) { - psx_delay_BFC1A520 = 0; - cpu->gpr[31] = 0x80032528u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A528: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A52C: 24050030 addiu $a1, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24050030u, cpu->gpr[5], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A530: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80032538u; /* jal link before delay slot */ - psx_delay_BFC1A530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A534: 24060030 addiu $a2, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24060030u, cpu->gpr[6], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80032534u); -#endif - if (psx_delay_BFC1A530) { - psx_delay_BFC1A530 = 0; - cpu->gpr[31] = 0x80032538u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1A538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1A538: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1A53C: 2A0100D0 slti $at, $s0, 208 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (208) ? 1 : 0); - PGXP_ALU(0x2A0100D0u, cpu->gpr[1], _pgx1, 0x00D0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003253Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A540: 1420FFEE bne $at, $zero, 0xBFC1A4FC */ - uint32_t psx_brA_BFC1A540 = cpu->gpr[1]; uint32_t psx_brB_BFC1A540 = cpu->gpr[0]; - psx_taken_BFC1A540 = (psx_brA_BFC1A540 != psx_brB_BFC1A540); - psx_delay_BFC1A540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A544: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032544u); -#endif - if (psx_delay_BFC1A540) { - psx_delay_BFC1A540 = 0; - if (psx_taken_BFC1A540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800324FCu); - goto label_BFC1A4FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032548u); - } -label_BFC1A548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A548: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032550u; /* jal link before delay slot */ - psx_delay_BFC1A548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1A54C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003254Cu); -#endif - if (psx_delay_BFC1A548) { - psx_delay_BFC1A548 = 0; - cpu->gpr[31] = 0x80032550u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A550: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A554: 240500C8 addiu $a1, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240500C8u, cpu->gpr[5], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A558: 240600C8 addiu $a2, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240600C8u, cpu->gpr[6], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A55C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80032564u; /* jal link before delay slot */ - psx_delay_BFC1A55C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1A560: 240700C8 addiu $a3, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240700C8u, cpu->gpr[7], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032560u); -#endif - if (psx_delay_BFC1A55C) { - psx_delay_BFC1A55C = 0; - cpu->gpr[31] = 0x80032564u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC1A564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032564u); -#endif - /* 0xBFC1A564: 8FA4002C lw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032564u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A568: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80032570u; /* jal link before delay slot */ - psx_delay_BFC1A568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A56C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003256Cu); -#endif - if (psx_delay_BFC1A568) { - psx_delay_BFC1A568 = 0; - cpu->gpr[31] = 0x80032570u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A570: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A574: 2405003C addiu $a1, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2405003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A578: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80032580u; /* jal link before delay slot */ - psx_delay_BFC1A578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1A57C: 2406003C addiu $a2, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2406003Cu, cpu->gpr[6], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003257Cu); -#endif - if (psx_delay_BFC1A578) { - psx_delay_BFC1A578 = 0; - cpu->gpr[31] = 0x80032580u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1A580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A580: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032580u); -#endif - /* 0xBFC1A584: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032584u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80032584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A588: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1A58C: 2F280001 sltiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2F280001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1A590: AC289E24 sw $t0, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032590u); return; } g_debug_last_store_pc = 0x80032590u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E24u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A594: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC1A598: AC319F80 sw $s1, -24704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032598u); return; } g_debug_last_store_pc = 0x80032598u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAC319F80u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80032598u); -#endif - /* 0xBFC1A59C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003259Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003259Cu); -#endif -label_BFC1A5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325A0u); -#endif - /* 0xBFC1A5A0: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325A0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800325A0u); -#endif - /* 0xBFC1A5A4: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325A4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800325A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A5A8: 03E00008 jr $ra */ - psx_delay_BFC1A5A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A5AC: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800325ACu); -#endif - if (psx_delay_BFC1A5A8) { - psx_delay_BFC1A5A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A5B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A5B0u); - int psx_delay_BFC1A5C0 = 0; - int psx_delay_BFC1A5D8 = 0; - int psx_taken_BFC1A5D8 = 0; - int psx_delay_BFC1A5EC = 0; - int psx_taken_BFC1A5EC = 0; - int psx_delay_BFC1A600 = 0; - int psx_taken_BFC1A600 = 0; - int psx_delay_BFC1A614 = 0; - int psx_taken_BFC1A614 = 0; - int psx_delay_BFC1A61C = 0; - int psx_delay_BFC1A628 = 0; - int psx_delay_BFC1A648 = 0; - int psx_taken_BFC1A648 = 0; - int psx_delay_BFC1A664 = 0; - int psx_delay_BFC1A66C = 0; - int psx_delay_BFC1A674 = 0; - int psx_taken_BFC1A674 = 0; - int psx_delay_BFC1A67C = 0; - int psx_delay_BFC1A684 = 0; - int psx_taken_BFC1A684 = 0; - int psx_delay_BFC1A68C = 0; - int psx_delay_BFC1A694 = 0; - int psx_taken_BFC1A694 = 0; - int psx_delay_BFC1A69C = 0; - int psx_delay_BFC1A6A4 = 0; - int psx_taken_BFC1A6A4 = 0; - int psx_delay_BFC1A6AC = 0; - int psx_delay_BFC1A6B4 = 0; - int psx_taken_BFC1A6B4 = 0; - int psx_delay_BFC1A6BC = 0; - int psx_delay_BFC1A6C4 = 0; - int psx_taken_BFC1A6C4 = 0; - int psx_delay_BFC1A6CC = 0; - int psx_delay_BFC1A6D4 = 0; - int psx_taken_BFC1A6D4 = 0; - int psx_delay_BFC1A6E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A5C8u: goto label_BFC1A5C8; - case 0xBFC1A5E0u: goto label_BFC1A5E0; - case 0xBFC1A5F4u: goto label_BFC1A5F4; - case 0xBFC1A608u: goto label_BFC1A608; - case 0xBFC1A61Cu: goto label_BFC1A61C; - case 0xBFC1A624u: goto label_BFC1A624; - case 0xBFC1A630u: goto label_BFC1A630; - case 0xBFC1A650u: goto label_BFC1A650; - case 0xBFC1A66Cu: goto label_BFC1A66C; - case 0xBFC1A674u: goto label_BFC1A674; - case 0xBFC1A67Cu: goto label_BFC1A67C; - case 0xBFC1A684u: goto label_BFC1A684; - case 0xBFC1A68Cu: goto label_BFC1A68C; - case 0xBFC1A694u: goto label_BFC1A694; - case 0xBFC1A69Cu: goto label_BFC1A69C; - case 0xBFC1A6A4u: goto label_BFC1A6A4; - case 0xBFC1A6ACu: goto label_BFC1A6AC; - case 0xBFC1A6B4u: goto label_BFC1A6B4; - case 0xBFC1A6BCu: goto label_BFC1A6BC; - case 0xBFC1A6C4u: goto label_BFC1A6C4; - case 0xBFC1A6CCu: goto label_BFC1A6CC; - case 0xBFC1A6D4u: goto label_BFC1A6D4; - case 0xBFC1A6DCu: goto label_BFC1A6DC; - case 0xBFC1A6E0u: goto label_BFC1A6E0; - default: break; - } - } -label_BFC1A5B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A5B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A5B0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800325B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1A5B4: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325B4u); return; } g_debug_last_store_pc = 0x800325B4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800325B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A5B8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325B8u); return; } g_debug_last_store_pc = 0x800325B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800325B8u); -#endif - /* 0xBFC1A5BC: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800325BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A5C0: 0C00D26D jal 0xB00349B4 */ - cpu->gpr[31] = 0x800325C8u; /* jal link before delay slot */ - psx_delay_BFC1A5C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A5C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800325C4u); -#endif - if (psx_delay_BFC1A5C0) { - psx_delay_BFC1A5C0 = 0; - cpu->gpr[31] = 0x800325C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349B4u); - cpu->pc = 0x800349B4u; return; - } -label_BFC1A5C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A5C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325C8u); -#endif - /* 0xBFC1A5C8: 8FAE0028 lw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800325C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A5CC: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800325CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A5D0: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800325D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC1A5D4: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800325D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1A5D8: 11E00041 beq $t7, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A5D8 = cpu->gpr[15]; uint32_t psx_brB_BFC1A5D8 = cpu->gpr[0]; - psx_taken_BFC1A5D8 = (psx_brA_BFC1A5D8 == psx_brB_BFC1A5D8); - psx_delay_BFC1A5D8 = 1; - /* 0xBFC1A5DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800325DCu); -#endif - if (psx_delay_BFC1A5D8) { - psx_delay_BFC1A5D8 = 0; - if (psx_taken_BFC1A5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800325E0u); - } -label_BFC1A5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1A5E0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800325E0u); -#endif - /* 0xBFC1A5E4: 8F189DF8 lw $t8, -25096($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325E4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800325E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A5E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800325E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1A5EC: 1700003C bne $t8, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A5EC = cpu->gpr[24]; uint32_t psx_brB_BFC1A5EC = cpu->gpr[0]; - psx_taken_BFC1A5EC = (psx_brA_BFC1A5EC != psx_brB_BFC1A5EC); - psx_delay_BFC1A5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325F0u); -#endif - /* 0xBFC1A5F0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800325F0u); -#endif - if (psx_delay_BFC1A5EC) { - psx_delay_BFC1A5EC = 0; - if (psx_taken_BFC1A5EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800325F4u); - } -label_BFC1A5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800325F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A5F4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800325F4u); -#endif - /* 0xBFC1A5F8: 8F399DF4 lw $t9, -25100($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800325F8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800325F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A5FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800325FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1A600: 17200037 bne $t9, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A600 = cpu->gpr[25]; uint32_t psx_brB_BFC1A600 = cpu->gpr[0]; - psx_taken_BFC1A600 = (psx_brA_BFC1A600 != psx_brB_BFC1A600); - psx_delay_BFC1A600 = 1; - /* 0xBFC1A604: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032604u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032604u); -#endif - if (psx_delay_BFC1A600) { - psx_delay_BFC1A600 = 0; - if (psx_taken_BFC1A600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032608u); - } -label_BFC1A608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1A608: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032608u); -#endif - /* 0xBFC1A60C: 8D089E78 lw $t0, -24968($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003260Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1A614: 11000032 beq $t0, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A614 = cpu->gpr[8]; uint32_t psx_brB_BFC1A614 = cpu->gpr[0]; - psx_taken_BFC1A614 = (psx_brA_BFC1A614 == psx_brB_BFC1A614); - psx_delay_BFC1A614 = 1; - /* 0xBFC1A618: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032618u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032618u); -#endif - if (psx_delay_BFC1A614) { - psx_delay_BFC1A614 = 0; - if (psx_taken_BFC1A614) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003261Cu); - } -label_BFC1A61C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A61Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A61C: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x80032624u; /* jal link before delay slot */ - psx_delay_BFC1A61C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032620u); -#endif - if (psx_delay_BFC1A61C) { - psx_delay_BFC1A61C = 0; - cpu->gpr[31] = 0x80032624u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC1A624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1A624: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032624u); return; } g_debug_last_store_pc = 0x80032624u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A628: 0C00C90C jal 0xB0032430 */ - cpu->gpr[31] = 0x80032630u; /* jal link before delay slot */ - psx_delay_BFC1A628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A62C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003262Cu); -#endif - if (psx_delay_BFC1A628) { - psx_delay_BFC1A628 = 0; - cpu->gpr[31] = 0x80032630u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032430u); - cpu->pc = 0x80032430u; return; - } -label_BFC1A630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032630u); -#endif - /* 0xBFC1A630: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032630u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A634: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80032634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1A638: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80032638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1A63C: 00001010 mfhi $v0 */ - cpu->gpr[2] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001010u, cpu->gpr[2], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003263Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1A640: 2449FFFF addiu $t1, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2449FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A644: 2D210007 sltiu $at, $t1, 7 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000007u ? 1 : 0); - PGXP_ALU(0x2D210007u, cpu->gpr[1], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80032644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A648: 10200024 beq $at, $zero, 0xBFC1A6DC */ - uint32_t psx_brA_BFC1A648 = cpu->gpr[1]; uint32_t psx_brB_BFC1A648 = cpu->gpr[0]; - psx_taken_BFC1A648 = (psx_brA_BFC1A648 == psx_brB_BFC1A648); - psx_delay_BFC1A648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A64C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003264Cu); -#endif - if (psx_delay_BFC1A648) { - psx_delay_BFC1A648 = 0; - if (psx_taken_BFC1A648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326DCu); - goto label_BFC1A6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032650u); - } -label_BFC1A650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1A650: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80032650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A654: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A658: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032658u); -#endif - /* 0xBFC1A65C: 8C29AC10 lw $t1, -21488($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003265Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x2u); } - PGXP_LOAD(0x8C29AC10u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A660: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1A664: 01200008 jr $t1 */ - psx_delay_BFC1A664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A668: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032668u); -#endif - if (psx_delay_BFC1A664) { - psx_delay_BFC1A664 = 0; - /* jump table at 0x8005AC10, 7 entries */ - switch (cpu->gpr[9]) { - case 0x8003266Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003266Cu); - goto label_BFC1A66C; - case 0x8003267Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003267Cu); - goto label_BFC1A67C; - case 0x8003268Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003268Cu); - goto label_BFC1A68C; - case 0x8003269Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003269Cu); - goto label_BFC1A69C; - case 0x800326ACu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ACu); - goto label_BFC1A6AC; - case 0x800326BCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326BCu); - goto label_BFC1A6BC; - case 0x800326CCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326CCu); - goto label_BFC1A6CC; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[9]); - cpu->pc = cpu->gpr[9]; return; - } - } -label_BFC1A66C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A66Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A66C: 0C00E1A7 jal 0xB003869C */ - cpu->gpr[31] = 0x80032674u; /* jal link before delay slot */ - psx_delay_BFC1A66C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A670: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032670u); -#endif - if (psx_delay_BFC1A66C) { - psx_delay_BFC1A66C = 0; - cpu->gpr[31] = 0x80032674u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003869Cu); - cpu->pc = 0x8003869Cu; return; - } -label_BFC1A674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A674: 1000001A beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A674 = cpu->gpr[0]; uint32_t psx_brB_BFC1A674 = cpu->gpr[0]; - psx_taken_BFC1A674 = (psx_brA_BFC1A674 == psx_brB_BFC1A674); - psx_delay_BFC1A674 = 1; - /* 0xBFC1A678: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032678u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032678u); -#endif - if (psx_delay_BFC1A674) { - psx_delay_BFC1A674 = 0; - if (psx_taken_BFC1A674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003267Cu); - } -label_BFC1A67C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A67Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A67C: 0C00E2D8 jal 0xB0038B60 */ - cpu->gpr[31] = 0x80032684u; /* jal link before delay slot */ - psx_delay_BFC1A67C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032680u); -#endif - if (psx_delay_BFC1A67C) { - psx_delay_BFC1A67C = 0; - cpu->gpr[31] = 0x80032684u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B60u); - cpu->pc = 0x80038B60u; return; - } -label_BFC1A684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A684: 10000016 beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A684 = cpu->gpr[0]; uint32_t psx_brB_BFC1A684 = cpu->gpr[0]; - psx_taken_BFC1A684 = (psx_brA_BFC1A684 == psx_brB_BFC1A684); - psx_delay_BFC1A684 = 1; - /* 0xBFC1A688: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032688u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032688u); -#endif - if (psx_delay_BFC1A684) { - psx_delay_BFC1A684 = 0; - if (psx_taken_BFC1A684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003268Cu); - } -label_BFC1A68C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A68Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A68C: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80032694u; /* jal link before delay slot */ - psx_delay_BFC1A68C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1A690: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032690u); -#endif - if (psx_delay_BFC1A68C) { - psx_delay_BFC1A68C = 0; - cpu->gpr[31] = 0x80032694u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1A694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A694: 10000012 beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A694 = cpu->gpr[0]; uint32_t psx_brB_BFC1A694 = cpu->gpr[0]; - psx_taken_BFC1A694 = (psx_brA_BFC1A694 == psx_brB_BFC1A694); - psx_delay_BFC1A694 = 1; - /* 0xBFC1A698: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032698u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032698u); -#endif - if (psx_delay_BFC1A694) { - psx_delay_BFC1A694 = 0; - if (psx_taken_BFC1A694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003269Cu); - } -label_BFC1A69C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A69Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A69C: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x800326A4u; /* jal link before delay slot */ - psx_delay_BFC1A69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800326A0u); -#endif - if (psx_delay_BFC1A69C) { - psx_delay_BFC1A69C = 0; - cpu->gpr[31] = 0x800326A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1A6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6A4: 1000000E beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A6A4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A6A4 = cpu->gpr[0]; - psx_taken_BFC1A6A4 = (psx_brA_BFC1A6A4 == psx_brB_BFC1A6A4); - psx_delay_BFC1A6A4 = 1; - /* 0xBFC1A6A8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326A8u); -#endif - if (psx_delay_BFC1A6A4) { - psx_delay_BFC1A6A4 = 0; - if (psx_taken_BFC1A6A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ACu); - } -label_BFC1A6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A6AC: 0C00DE60 jal 0xB0037980 */ - cpu->gpr[31] = 0x800326B4u; /* jal link before delay slot */ - psx_delay_BFC1A6AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800326B0u); -#endif - if (psx_delay_BFC1A6AC) { - psx_delay_BFC1A6AC = 0; - cpu->gpr[31] = 0x800326B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037980u); - cpu->pc = 0x80037980u; return; - } -label_BFC1A6B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6B4: 1000000A beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A6B4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A6B4 = cpu->gpr[0]; - psx_taken_BFC1A6B4 = (psx_brA_BFC1A6B4 == psx_brB_BFC1A6B4); - psx_delay_BFC1A6B4 = 1; - /* 0xBFC1A6B8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326B8u); -#endif - if (psx_delay_BFC1A6B4) { - psx_delay_BFC1A6B4 = 0; - if (psx_taken_BFC1A6B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326BCu); - } -label_BFC1A6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A6BC: 0C00E2E7 jal 0xB0038B9C */ - cpu->gpr[31] = 0x800326C4u; /* jal link before delay slot */ - psx_delay_BFC1A6BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800326C0u); -#endif - if (psx_delay_BFC1A6BC) { - psx_delay_BFC1A6BC = 0; - cpu->gpr[31] = 0x800326C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B9Cu); - cpu->pc = 0x80038B9Cu; return; - } -label_BFC1A6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6C4: 10000006 beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A6C4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A6C4 = cpu->gpr[0]; - psx_taken_BFC1A6C4 = (psx_brA_BFC1A6C4 == psx_brB_BFC1A6C4); - psx_delay_BFC1A6C4 = 1; - /* 0xBFC1A6C8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326C8u); -#endif - if (psx_delay_BFC1A6C4) { - psx_delay_BFC1A6C4 = 0; - if (psx_taken_BFC1A6C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326CCu); - } -label_BFC1A6CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A6CC: 0C00E0CE jal 0xB0038338 */ - cpu->gpr[31] = 0x800326D4u; /* jal link before delay slot */ - psx_delay_BFC1A6CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800326D0u); -#endif - if (psx_delay_BFC1A6CC) { - psx_delay_BFC1A6CC = 0; - cpu->gpr[31] = 0x800326D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038338u); - cpu->pc = 0x80038338u; return; - } -label_BFC1A6D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6D4: 10000002 beq $zero, $zero, 0xBFC1A6E0 */ - uint32_t psx_brA_BFC1A6D4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A6D4 = cpu->gpr[0]; - psx_taken_BFC1A6D4 = (psx_brA_BFC1A6D4 == psx_brB_BFC1A6D4); - psx_delay_BFC1A6D4 = 1; - /* 0xBFC1A6D8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326D8u); -#endif - if (psx_delay_BFC1A6D4) { - psx_delay_BFC1A6D4 = 0; - if (psx_taken_BFC1A6D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326E0u); - goto label_BFC1A6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326DCu); - } -label_BFC1A6DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326DCu); -#endif - /* 0xBFC1A6DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326DCu); -#endif -label_BFC1A6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A6E0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800326E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1A6E4: 03E00008 jr $ra */ - psx_delay_BFC1A6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A6E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800326E8u); -#endif - if (psx_delay_BFC1A6E4) { - psx_delay_BFC1A6E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1A6EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1A6ECu); - int psx_delay_BFC1A714 = 0; - int psx_delay_BFC1A720 = 0; - int psx_delay_BFC1A748 = 0; - int psx_delay_BFC1A758 = 0; - int psx_delay_BFC1A76C = 0; - int psx_taken_BFC1A76C = 0; - int psx_delay_BFC1A778 = 0; - int psx_taken_BFC1A778 = 0; - int psx_delay_BFC1A78C = 0; - int psx_taken_BFC1A78C = 0; - int psx_delay_BFC1A7A0 = 0; - int psx_taken_BFC1A7A0 = 0; - int psx_delay_BFC1A7B4 = 0; - int psx_taken_BFC1A7B4 = 0; - int psx_delay_BFC1A7C0 = 0; - int psx_delay_BFC1A7CC = 0; - int psx_delay_BFC1A7D4 = 0; - int psx_taken_BFC1A7D4 = 0; - int psx_delay_BFC1A7E4 = 0; - int psx_taken_BFC1A7E4 = 0; - int psx_delay_BFC1A7EC = 0; - int psx_taken_BFC1A7EC = 0; - int psx_delay_BFC1A804 = 0; - int psx_taken_BFC1A804 = 0; - int psx_delay_BFC1A810 = 0; - int psx_taken_BFC1A810 = 0; - int psx_delay_BFC1A818 = 0; - int psx_taken_BFC1A818 = 0; - int psx_delay_BFC1A824 = 0; - int psx_delay_BFC1A830 = 0; - int psx_delay_BFC1A838 = 0; - int psx_taken_BFC1A838 = 0; - int psx_delay_BFC1A84C = 0; - int psx_taken_BFC1A84C = 0; - int psx_delay_BFC1A854 = 0; - int psx_taken_BFC1A854 = 0; - int psx_delay_BFC1A85C = 0; - int psx_taken_BFC1A85C = 0; - int psx_delay_BFC1A868 = 0; - int psx_delay_BFC1A874 = 0; - int psx_delay_BFC1A87C = 0; - int psx_taken_BFC1A87C = 0; - int psx_delay_BFC1A890 = 0; - int psx_taken_BFC1A890 = 0; - int psx_delay_BFC1A8A4 = 0; - int psx_taken_BFC1A8A4 = 0; - int psx_delay_BFC1A8AC = 0; - int psx_taken_BFC1A8AC = 0; - int psx_delay_BFC1A8B8 = 0; - int psx_delay_BFC1A8C4 = 0; - int psx_delay_BFC1A8CC = 0; - int psx_taken_BFC1A8CC = 0; - int psx_delay_BFC1A8D8 = 0; - int psx_delay_BFC1A8F0 = 0; - int psx_taken_BFC1A8F0 = 0; - int psx_delay_BFC1A924 = 0; - int psx_taken_BFC1A924 = 0; - int psx_delay_BFC1A95C = 0; - int psx_taken_BFC1A95C = 0; - int psx_delay_BFC1A968 = 0; - int psx_taken_BFC1A968 = 0; - int psx_delay_BFC1A99C = 0; - int psx_taken_BFC1A99C = 0; - int psx_delay_BFC1A9E0 = 0; - int psx_taken_BFC1A9E0 = 0; - int psx_delay_BFC1AA10 = 0; - int psx_delay_BFC1AA28 = 0; - int psx_delay_BFC1AA3C = 0; - int psx_delay_BFC1AA54 = 0; - int psx_delay_BFC1AA6C = 0; - int psx_delay_BFC1AA78 = 0; - int psx_delay_BFC1AA88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1A71Cu: goto label_BFC1A71C; - case 0xBFC1A728u: goto label_BFC1A728; - case 0xBFC1A750u: goto label_BFC1A750; - case 0xBFC1A760u: goto label_BFC1A760; - case 0xBFC1A774u: goto label_BFC1A774; - case 0xBFC1A780u: goto label_BFC1A780; - case 0xBFC1A794u: goto label_BFC1A794; - case 0xBFC1A7A8u: goto label_BFC1A7A8; - case 0xBFC1A7BCu: goto label_BFC1A7BC; - case 0xBFC1A7C0u: goto label_BFC1A7C0; - case 0xBFC1A7C8u: goto label_BFC1A7C8; - case 0xBFC1A7D4u: goto label_BFC1A7D4; - case 0xBFC1A7DCu: goto label_BFC1A7DC; - case 0xBFC1A7E0u: goto label_BFC1A7E0; - case 0xBFC1A7ECu: goto label_BFC1A7EC; - case 0xBFC1A7F4u: goto label_BFC1A7F4; - case 0xBFC1A80Cu: goto label_BFC1A80C; - case 0xBFC1A814u: goto label_BFC1A814; - case 0xBFC1A818u: goto label_BFC1A818; - case 0xBFC1A820u: goto label_BFC1A820; - case 0xBFC1A82Cu: goto label_BFC1A82C; - case 0xBFC1A838u: goto label_BFC1A838; - case 0xBFC1A840u: goto label_BFC1A840; - case 0xBFC1A854u: goto label_BFC1A854; - case 0xBFC1A85Cu: goto label_BFC1A85C; - case 0xBFC1A864u: goto label_BFC1A864; - case 0xBFC1A870u: goto label_BFC1A870; - case 0xBFC1A87Cu: goto label_BFC1A87C; - case 0xBFC1A884u: goto label_BFC1A884; - case 0xBFC1A898u: goto label_BFC1A898; - case 0xBFC1A8ACu: goto label_BFC1A8AC; - case 0xBFC1A8B4u: goto label_BFC1A8B4; - case 0xBFC1A8C0u: goto label_BFC1A8C0; - case 0xBFC1A8CCu: goto label_BFC1A8CC; - case 0xBFC1A8D4u: goto label_BFC1A8D4; - case 0xBFC1A8D8u: goto label_BFC1A8D8; - case 0xBFC1A8E0u: goto label_BFC1A8E0; - case 0xBFC1A8F8u: goto label_BFC1A8F8; - case 0xBFC1A908u: goto label_BFC1A908; - case 0xBFC1A92Cu: goto label_BFC1A92C; - case 0xBFC1A940u: goto label_BFC1A940; - case 0xBFC1A964u: goto label_BFC1A964; - case 0xBFC1A970u: goto label_BFC1A970; - case 0xBFC1A974u: goto label_BFC1A974; - case 0xBFC1A980u: goto label_BFC1A980; - case 0xBFC1A9A4u: goto label_BFC1A9A4; - case 0xBFC1A9C4u: goto label_BFC1A9C4; - case 0xBFC1A9E8u: goto label_BFC1A9E8; - case 0xBFC1AA00u: goto label_BFC1AA00; - case 0xBFC1AA18u: goto label_BFC1AA18; - case 0xBFC1AA30u: goto label_BFC1AA30; - case 0xBFC1AA44u: goto label_BFC1AA44; - case 0xBFC1AA5Cu: goto label_BFC1AA5C; - case 0xBFC1AA74u: goto label_BFC1AA74; - case 0xBFC1AA80u: goto label_BFC1AA80; - case 0xBFC1AA84u: goto label_BFC1AA84; - default: break; - } - } -label_BFC1A6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1A6EC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800326ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800326F0u); -#endif - /* 0xBFC1A6F0: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800326F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1A6F4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x800326F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1A6F8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800326F8u); return; } g_debug_last_store_pc = 0x800326F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800326F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1A6FC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800326FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A700: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1A704: 2DCF0001 sltiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)(cpu->gpr[14] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2DCF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1A708: AFA50034 sw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032708u); return; } g_debug_last_store_pc = 0x80032708u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1A70C: AC2F9E24 sw $t7, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003270Cu); return; } g_debug_last_store_pc = 0x8003270Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1A710: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A714: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x8003271Cu; /* jal link before delay slot */ - psx_delay_BFC1A714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1A718: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032718u); return; } g_debug_last_store_pc = 0x80032718u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032718u); -#endif - if (psx_delay_BFC1A714) { - psx_delay_BFC1A714 = 0; - cpu->gpr[31] = 0x8003271Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC1A71C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A71Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003271Cu); -#endif - /* 0xBFC1A71C: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003271Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003271Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A720: 0C011B36 jal 0xB0046CD8 */ - cpu->gpr[31] = 0x80032728u; /* jal link before delay slot */ - psx_delay_BFC1A720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A724: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032724u); -#endif - if (psx_delay_BFC1A720) { - psx_delay_BFC1A720 = 0; - cpu->gpr[31] = 0x80032728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CD8u); - cpu->pc = 0x80046CD8u; return; - } -label_BFC1A728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1A728: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032728u); -#endif - /* 0xBFC1A72C: 8F189E24 lw $t8, -25052($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003272Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E24u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003272Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032730u); -#endif - /* 0xBFC1A730: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032730u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC1A734: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1A738: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1A73C: 2F190001 sltiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)(cpu->gpr[24] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2F190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1A740: AC399E24 sw $t9, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032740u); return; } g_debug_last_store_pc = 0x80032740u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80032740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC1A744: AFA8002C sw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032744u); return; } g_debug_last_store_pc = 0x80032744u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A748: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80032750u; /* jal link before delay slot */ - psx_delay_BFC1A748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1A74C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003274Cu); -#endif - if (psx_delay_BFC1A748) { - psx_delay_BFC1A748 = 0; - cpu->gpr[31] = 0x80032750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC1A750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032750u); -#endif - /* 0xBFC1A750: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032750u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032750u); -#endif - /* 0xBFC1A754: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032754u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A758: 0C011B36 jal 0xB0046CD8 */ - cpu->gpr[31] = 0x80032760u; /* jal link before delay slot */ - psx_delay_BFC1A758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1A75C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003275Cu); -#endif - if (psx_delay_BFC1A758) { - psx_delay_BFC1A758 = 0; - cpu->gpr[31] = 0x80032760u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CD8u); - cpu->pc = 0x80046CD8u; return; - } -label_BFC1A760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032760u); -#endif - /* 0xBFC1A760: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032760u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032760u); -#endif - /* 0xBFC1A764: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032764u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A768: 2861002B slti $at, $v1, 43 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (43) ? 1 : 0); - PGXP_ALU(0x2861002Bu, cpu->gpr[1], _pgx1, 0x002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A76C: 1420001B bne $at, $zero, 0xBFC1A7DC */ - uint32_t psx_brA_BFC1A76C = cpu->gpr[1]; uint32_t psx_brB_BFC1A76C = cpu->gpr[0]; - psx_taken_BFC1A76C = (psx_brA_BFC1A76C != psx_brB_BFC1A76C); - psx_delay_BFC1A76C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1A770: AFA20028 sw $v0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032770u); return; } g_debug_last_store_pc = 0x80032770u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20028u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032770u); -#endif - if (psx_delay_BFC1A76C) { - psx_delay_BFC1A76C = 0; - if (psx_taken_BFC1A76C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327DCu); - goto label_BFC1A7DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032774u); - } -label_BFC1A774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A774: 2861002F slti $at, $v1, 47 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (47) ? 1 : 0); - PGXP_ALU(0x2861002Fu, cpu->gpr[1], _pgx1, 0x002Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A778: 10200019 beq $at, $zero, 0xBFC1A7E0 */ - uint32_t psx_brA_BFC1A778 = cpu->gpr[1]; uint32_t psx_brB_BFC1A778 = cpu->gpr[0]; - psx_taken_BFC1A778 = (psx_brA_BFC1A778 == psx_brB_BFC1A778); - psx_delay_BFC1A778 = 1; - /* 0xBFC1A77C: 8FAC0034 lw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003277Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003277Cu); -#endif - if (psx_delay_BFC1A778) { - psx_delay_BFC1A778 = 0; - if (psx_taken_BFC1A778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327E0u); - goto label_BFC1A7E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032780u); - } -label_BFC1A780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1A780: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032780u); -#endif - /* 0xBFC1A784: 8D296948 lw $t1, 26952($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032784u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296948u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80032784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A788: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80032788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A78C: 15210006 bne $t1, $at, 0xBFC1A7A8 */ - uint32_t psx_brA_BFC1A78C = cpu->gpr[9]; uint32_t psx_brB_BFC1A78C = cpu->gpr[1]; - psx_taken_BFC1A78C = (psx_brA_BFC1A78C != psx_brB_BFC1A78C); - psx_delay_BFC1A78C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A790: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032790u); -#endif - if (psx_delay_BFC1A78C) { - psx_delay_BFC1A78C = 0; - if (psx_taken_BFC1A78C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327A8u); - goto label_BFC1A7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032794u); - } -label_BFC1A794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1A794: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032794u); -#endif - /* 0xBFC1A798: 8D4A9F64 lw $t2, -24732($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032798u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F64u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80032798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A79C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003279Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A7A0: 15410007 bne $t2, $at, 0xBFC1A7C0 */ - uint32_t psx_brA_BFC1A7A0 = cpu->gpr[10]; uint32_t psx_brB_BFC1A7A0 = cpu->gpr[1]; - psx_taken_BFC1A7A0 = (psx_brA_BFC1A7A0 != psx_brB_BFC1A7A0); - psx_delay_BFC1A7A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1A7A4: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800327A4u); -#endif - if (psx_delay_BFC1A7A0) { - psx_delay_BFC1A7A0 = 0; - if (psx_taken_BFC1A7A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327C0u); - goto label_BFC1A7C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327A8u); - } -label_BFC1A7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1A7A8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800327A8u); -#endif - /* 0xBFC1A7AC: 8D6B9E74 lw $t3, -24972($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327ACu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E74u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800327ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A7B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800327B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1A7B4: 1160000A beq $t3, $zero, 0xBFC1A7E0 */ - uint32_t psx_brA_BFC1A7B4 = cpu->gpr[11]; uint32_t psx_brB_BFC1A7B4 = cpu->gpr[0]; - psx_taken_BFC1A7B4 = (psx_brA_BFC1A7B4 == psx_brB_BFC1A7B4); - psx_delay_BFC1A7B4 = 1; - /* 0xBFC1A7B8: 8FAC0034 lw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327B8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800327B8u); -#endif - if (psx_delay_BFC1A7B4) { - psx_delay_BFC1A7B4 = 0; - if (psx_taken_BFC1A7B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327E0u); - goto label_BFC1A7E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327BCu); - } -label_BFC1A7BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1A7BC: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800327BCu); -#endif -label_BFC1A7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A7C0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800327C8u; /* jal link before delay slot */ - psx_delay_BFC1A7C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A7C4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800327C4u); -#endif - if (psx_delay_BFC1A7C0) { - psx_delay_BFC1A7C0 = 0; - cpu->gpr[31] = 0x800327C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A7C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327C8u); -#endif - /* 0xBFC1A7C8: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800327C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A7CC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800327D4u; /* jal link before delay slot */ - psx_delay_BFC1A7CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A7D0: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800327D0u); -#endif - if (psx_delay_BFC1A7CC) { - psx_delay_BFC1A7CC = 0; - cpu->gpr[31] = 0x800327D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A7D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A7D4: 100000AB beq $zero, $zero, 0xBFC1AA84 */ - uint32_t psx_brA_BFC1A7D4 = cpu->gpr[0]; uint32_t psx_brB_BFC1A7D4 = cpu->gpr[0]; - psx_taken_BFC1A7D4 = (psx_brA_BFC1A7D4 == psx_brB_BFC1A7D4); - psx_delay_BFC1A7D4 = 1; - /* 0xBFC1A7D8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800327D8u); -#endif - if (psx_delay_BFC1A7D4) { - psx_delay_BFC1A7D4 = 0; - if (psx_taken_BFC1A7D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A84u); - goto label_BFC1AA84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327DCu); - } -label_BFC1A7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327DCu); -#endif - /* 0xBFC1A7DC: 8FAC0034 lw $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327DCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800327DCu); -#endif -label_BFC1A7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A7E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800327E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1A7E4: 11800003 beq $t4, $zero, 0xBFC1A7F4 */ - uint32_t psx_brA_BFC1A7E4 = cpu->gpr[12]; uint32_t psx_brB_BFC1A7E4 = cpu->gpr[0]; - psx_taken_BFC1A7E4 = (psx_brA_BFC1A7E4 == psx_brB_BFC1A7E4); - psx_delay_BFC1A7E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A7E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800327E8u); -#endif - if (psx_delay_BFC1A7E4) { - psx_delay_BFC1A7E4 = 0; - if (psx_taken_BFC1A7E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327F4u); - goto label_BFC1A7F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327ECu); - } -label_BFC1A7EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A7EC: 10000014 beq $zero, $zero, 0xBFC1A840 */ - uint32_t psx_brA_BFC1A7EC = cpu->gpr[0]; uint32_t psx_brB_BFC1A7EC = cpu->gpr[0]; - psx_taken_BFC1A7EC = (psx_brA_BFC1A7EC == psx_brB_BFC1A7EC); - psx_delay_BFC1A7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1A7F0: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800327F0u); -#endif - if (psx_delay_BFC1A7EC) { - psx_delay_BFC1A7EC = 0; - if (psx_taken_BFC1A7EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032840u); - goto label_BFC1A840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800327F4u); - } -label_BFC1A7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800327F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1A7F4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800327F4u); -#endif - /* 0xBFC1A7F8: 8DCE9F74 lw $t6, -24716($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327F8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F74u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800327F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1A7FC: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800327FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1A800: 240D0016 addiu $t5, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240D0016u, cpu->gpr[13], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80032800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1A804: 11C20003 beq $t6, $v0, 0xBFC1A814 */ - uint32_t psx_brA_BFC1A804 = cpu->gpr[14]; uint32_t psx_brB_BFC1A804 = cpu->gpr[2]; - psx_taken_BFC1A804 = (psx_brA_BFC1A804 == psx_brB_BFC1A804); - psx_delay_BFC1A804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1A808: AFAD0034 sw $t5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032808u); return; } g_debug_last_store_pc = 0x80032808u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80032808u); -#endif - if (psx_delay_BFC1A804) { - psx_delay_BFC1A804 = 0; - if (psx_taken_BFC1A804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032814u); - goto label_BFC1A814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003280Cu); - } -label_BFC1A80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A80C: 24010029 addiu $at, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24010029u, cpu->gpr[1], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x8003280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A810: 10610003 beq $v1, $at, 0xBFC1A820 */ - uint32_t psx_brA_BFC1A810 = cpu->gpr[3]; uint32_t psx_brB_BFC1A810 = cpu->gpr[1]; - psx_taken_BFC1A810 = (psx_brA_BFC1A810 == psx_brB_BFC1A810); - psx_delay_BFC1A810 = 1; -label_BFC1A814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A814: 2401002B addiu $at, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2401002Bu, cpu->gpr[1], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032814u); -#endif - if (psx_delay_BFC1A810) { - psx_delay_BFC1A810 = 0; - if (psx_taken_BFC1A810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032820u); - goto label_BFC1A820; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032818u); - } -label_BFC1A818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A818: 14610009 bne $v1, $at, 0xBFC1A840 */ - uint32_t psx_brA_BFC1A818 = cpu->gpr[3]; uint32_t psx_brB_BFC1A818 = cpu->gpr[1]; - psx_taken_BFC1A818 = (psx_brA_BFC1A818 != psx_brB_BFC1A818); - psx_delay_BFC1A818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A81C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003281Cu); -#endif - if (psx_delay_BFC1A818) { - psx_delay_BFC1A818 = 0; - if (psx_taken_BFC1A818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032840u); - goto label_BFC1A840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032820u); - } -label_BFC1A820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1A820: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A824: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003282Cu; /* jal link before delay slot */ - psx_delay_BFC1A824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A828: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032828u); -#endif - if (psx_delay_BFC1A824) { - psx_delay_BFC1A824 = 0; - cpu->gpr[31] = 0x8003282Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A82C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A82Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003282Cu); -#endif - /* 0xBFC1A82C: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003282Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003282Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A830: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032838u; /* jal link before delay slot */ - psx_delay_BFC1A830 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A834: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032834u); -#endif - if (psx_delay_BFC1A830) { - psx_delay_BFC1A830 = 0; - cpu->gpr[31] = 0x80032838u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A838: 10000092 beq $zero, $zero, 0xBFC1AA84 */ - uint32_t psx_brA_BFC1A838 = cpu->gpr[0]; uint32_t psx_brB_BFC1A838 = cpu->gpr[0]; - psx_taken_BFC1A838 = (psx_brA_BFC1A838 == psx_brB_BFC1A838); - psx_delay_BFC1A838 = 1; - /* 0xBFC1A83C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003283Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003283Cu); -#endif - if (psx_delay_BFC1A838) { - psx_delay_BFC1A838 = 0; - if (psx_taken_BFC1A838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A84u); - goto label_BFC1AA84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032840u); - } -label_BFC1A840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A840: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032840u); -#endif - /* 0xBFC1A844: 8DEF9F64 lw $t7, -24732($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032844u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F64u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1A84C: 15E2000D bne $t7, $v0, 0xBFC1A884 */ - uint32_t psx_brA_BFC1A84C = cpu->gpr[15]; uint32_t psx_brB_BFC1A84C = cpu->gpr[2]; - psx_taken_BFC1A84C = (psx_brA_BFC1A84C != psx_brB_BFC1A84C); - psx_delay_BFC1A84C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A850: 24010029 addiu $at, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24010029u, cpu->gpr[1], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x80032850u); -#endif - if (psx_delay_BFC1A84C) { - psx_delay_BFC1A84C = 0; - if (psx_taken_BFC1A84C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032884u); - goto label_BFC1A884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032854u); - } -label_BFC1A854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A854: 10610003 beq $v1, $at, 0xBFC1A864 */ - uint32_t psx_brA_BFC1A854 = cpu->gpr[3]; uint32_t psx_brB_BFC1A854 = cpu->gpr[1]; - psx_taken_BFC1A854 = (psx_brA_BFC1A854 == psx_brB_BFC1A854); - psx_delay_BFC1A854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A858: 2401002A addiu $at, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2401002Au, cpu->gpr[1], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032858u); -#endif - if (psx_delay_BFC1A854) { - psx_delay_BFC1A854 = 0; - if (psx_taken_BFC1A854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032864u); - goto label_BFC1A864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003285Cu); - } -label_BFC1A85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A85C: 14610009 bne $v1, $at, 0xBFC1A884 */ - uint32_t psx_brA_BFC1A85C = cpu->gpr[3]; uint32_t psx_brB_BFC1A85C = cpu->gpr[1]; - psx_taken_BFC1A85C = (psx_brA_BFC1A85C != psx_brB_BFC1A85C); - psx_delay_BFC1A85C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A860: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032860u); -#endif - if (psx_delay_BFC1A85C) { - psx_delay_BFC1A85C = 0; - if (psx_taken_BFC1A85C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032884u); - goto label_BFC1A884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032864u); - } -label_BFC1A864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1A864: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A868: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032870u; /* jal link before delay slot */ - psx_delay_BFC1A868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A86C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003286Cu); -#endif - if (psx_delay_BFC1A868) { - psx_delay_BFC1A868 = 0; - cpu->gpr[31] = 0x80032870u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032870u); -#endif - /* 0xBFC1A870: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032870u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A874: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003287Cu; /* jal link before delay slot */ - psx_delay_BFC1A874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A878: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032878u); -#endif - if (psx_delay_BFC1A874) { - psx_delay_BFC1A874 = 0; - cpu->gpr[31] = 0x8003287Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003287Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A87C: 10000081 beq $zero, $zero, 0xBFC1AA84 */ - uint32_t psx_brA_BFC1A87C = cpu->gpr[0]; uint32_t psx_brB_BFC1A87C = cpu->gpr[0]; - psx_taken_BFC1A87C = (psx_brA_BFC1A87C == psx_brB_BFC1A87C); - psx_delay_BFC1A87C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032880u); -#endif - /* 0xBFC1A880: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032880u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032880u); -#endif - if (psx_delay_BFC1A87C) { - psx_delay_BFC1A87C = 0; - if (psx_taken_BFC1A87C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A84u); - goto label_BFC1AA84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032884u); - } -label_BFC1A884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1A884: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032884u); -#endif - /* 0xBFC1A888: 8F189F64 lw $t8, -24732($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032888u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F64u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A88C: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003288Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1A890: 17010011 bne $t8, $at, 0xBFC1A8D8 */ - uint32_t psx_brA_BFC1A890 = cpu->gpr[24]; uint32_t psx_brB_BFC1A890 = cpu->gpr[1]; - psx_taken_BFC1A890 = (psx_brA_BFC1A890 != psx_brB_BFC1A890); - psx_delay_BFC1A890 = 1; - /* 0xBFC1A894: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032894u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032894u); -#endif - if (psx_delay_BFC1A890) { - psx_delay_BFC1A890 = 0; - if (psx_taken_BFC1A890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328D8u); - goto label_BFC1A8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032898u); - } -label_BFC1A898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A898: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032898u); -#endif - /* 0xBFC1A89C: 8F399F74 lw $t9, -24716($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003289Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A8A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800328A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1A8A4: 1722000B bne $t9, $v0, 0xBFC1A8D4 */ - uint32_t psx_brA_BFC1A8A4 = cpu->gpr[25]; uint32_t psx_brB_BFC1A8A4 = cpu->gpr[2]; - psx_taken_BFC1A8A4 = (psx_brA_BFC1A8A4 != psx_brB_BFC1A8A4); - psx_delay_BFC1A8A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1A8A8: 2401002A addiu $at, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2401002Au, cpu->gpr[1], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x800328A8u); -#endif - if (psx_delay_BFC1A8A4) { - psx_delay_BFC1A8A4 = 0; - if (psx_taken_BFC1A8A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328D4u); - goto label_BFC1A8D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328ACu); - } -label_BFC1A8AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1A8AC: 1461000A bne $v1, $at, 0xBFC1A8D8 */ - uint32_t psx_brA_BFC1A8AC = cpu->gpr[3]; uint32_t psx_brB_BFC1A8AC = cpu->gpr[1]; - psx_taken_BFC1A8AC = (psx_brA_BFC1A8AC != psx_brB_BFC1A8AC); - psx_delay_BFC1A8AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328B0u); -#endif - /* 0xBFC1A8B0: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328B0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800328B0u); -#endif - if (psx_delay_BFC1A8AC) { - psx_delay_BFC1A8AC = 0; - if (psx_taken_BFC1A8AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328D8u); - goto label_BFC1A8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328B4u); - } -label_BFC1A8B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1A8B4: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800328B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A8B8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800328C0u; /* jal link before delay slot */ - psx_delay_BFC1A8B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A8BC: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800328BCu); -#endif - if (psx_delay_BFC1A8B8) { - psx_delay_BFC1A8B8 = 0; - cpu->gpr[31] = 0x800328C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A8C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328C0u); -#endif - /* 0xBFC1A8C0: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800328C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A8C4: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800328CCu; /* jal link before delay slot */ - psx_delay_BFC1A8C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1A8C8: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800328C8u); -#endif - if (psx_delay_BFC1A8C4) { - psx_delay_BFC1A8C4 = 0; - cpu->gpr[31] = 0x800328CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1A8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A8CC: 1000006D beq $zero, $zero, 0xBFC1AA84 */ - uint32_t psx_brA_BFC1A8CC = cpu->gpr[0]; uint32_t psx_brB_BFC1A8CC = cpu->gpr[0]; - psx_taken_BFC1A8CC = (psx_brA_BFC1A8CC == psx_brB_BFC1A8CC); - psx_delay_BFC1A8CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328D0u); -#endif - /* 0xBFC1A8D0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800328D0u); -#endif - if (psx_delay_BFC1A8CC) { - psx_delay_BFC1A8CC = 0; - if (psx_taken_BFC1A8CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A84u); - goto label_BFC1AA84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328D4u); - } -label_BFC1A8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328D4u); -#endif - /* 0xBFC1A8D4: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800328D4u); -#endif -label_BFC1A8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1A8D8: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800328E0u; /* jal link before delay slot */ - psx_delay_BFC1A8D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC1A8DC: AFA8002C sw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328DCu); return; } g_debug_last_store_pc = 0x800328DCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800328DCu); -#endif - if (psx_delay_BFC1A8D8) { - psx_delay_BFC1A8D8 = 0; - cpu->gpr[31] = 0x800328E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1A8E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328E0u); -#endif - /* 0xBFC1A8E0: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800328E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC1A8E4: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800328E4u); -#endif - /* 0xBFC1A8E8: 85090000 lh $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800328E8u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x85090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800328E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A8EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800328ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1A8F0: 11200020 beq $t1, $zero, 0xBFC1A974 */ - uint32_t psx_brA_BFC1A8F0 = cpu->gpr[9]; uint32_t psx_brB_BFC1A8F0 = cpu->gpr[0]; - psx_taken_BFC1A8F0 = (psx_brA_BFC1A8F0 == psx_brB_BFC1A8F0); - psx_delay_BFC1A8F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1A8F4: 24430004 addiu $v1, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24430004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800328F4u); -#endif - if (psx_delay_BFC1A8F0) { - psx_delay_BFC1A8F0 = 0; - if (psx_taken_BFC1A8F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032974u); - goto label_BFC1A974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800328F8u); - } -label_BFC1A8F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A8F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800328F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1A8F8: 24430018 addiu $v1, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (24)); - PGXP_ALU(0x24430018u, cpu->gpr[3], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800328F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x809u); -#endif - /* 0xBFC1A8FC: 00605821 addu $t3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00605821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800328FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1A900: 256A0024 addiu $t2, $t3, 36 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[11] + (36)); - PGXP_ALU(0x256A0024u, cpu->gpr[10], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80032900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1101u); -#endif - /* 0xBFC1A904: 01006021 addu $t4, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01006021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032904u); -#endif -label_BFC1A908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032908u); -#endif - /* 0xBFC1A908: 8D610000 lw $at, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032908u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D610000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1A90C: 256B000C addiu $t3, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (12)); - PGXP_ALU(0x256B000Cu, cpu->gpr[11], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003290Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1A910: AD810018 sw $at, 24($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032910u); return; } g_debug_last_store_pc = 0x80032910u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD810018u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032910u); -#endif - /* 0xBFC1A914: 8D61FFF8 lw $at, -8($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032914u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D61FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1A918: 258C000C addiu $t4, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (12)); - PGXP_ALU(0x258C000Cu, cpu->gpr[12], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1A91C: AD810010 sw $at, 16($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003291Cu); return; } g_debug_last_store_pc = 0x8003291Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD810010u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003291Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032920u); -#endif - /* 0xBFC1A920: 8D61FFFC lw $at, -4($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032920u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D61FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1A924: 156AFFF8 bne $t3, $t2, 0xBFC1A908 */ - uint32_t psx_brA_BFC1A924 = cpu->gpr[11]; uint32_t psx_brB_BFC1A924 = cpu->gpr[10]; - psx_taken_BFC1A924 = (psx_brA_BFC1A924 != psx_brB_BFC1A924); - psx_delay_BFC1A924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1A928: AD810014 sw $at, 20($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032928u); return; } g_debug_last_store_pc = 0x80032928u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD810014u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032928u); -#endif - if (psx_delay_BFC1A924) { - psx_delay_BFC1A924 = 0; - if (psx_taken_BFC1A924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032908u); - goto label_BFC1A908; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003292Cu); - } -label_BFC1A92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003292Cu); -#endif - /* 0xBFC1A92C: 8D610000 lw $at, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003292Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D610000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003292Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8009u); -#endif - /* 0xBFC1A930: 00607821 addu $t7, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00607821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1A934: AD810018 sw $at, 24($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032934u); return; } g_debug_last_store_pc = 0x80032934u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD810018u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032934u); -#endif - /* 0xBFC1A938: 8FAD0028 lw $t5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032938u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0028u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80032938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1A93C: 25EE0024 addiu $t6, $t7, 36 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[15] + (36)); - PGXP_ALU(0x25EE0024u, cpu->gpr[14], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x8003293Cu); -#endif -label_BFC1A940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032940u); -#endif - /* 0xBFC1A940: 8DE10000 lw $at, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032940u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1A944: 25EF000C addiu $t7, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (12)); - PGXP_ALU(0x25EF000Cu, cpu->gpr[15], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1A948: ADA10018 sw $at, 24($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032948u); return; } g_debug_last_store_pc = 0x80032948u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADA10018u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032948u); -#endif - /* 0xBFC1A94C: 8DE1FFF8 lw $at, -8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003294Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1A950: 25AD000C addiu $t5, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (12)); - PGXP_ALU(0x25AD000Cu, cpu->gpr[13], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1A954: ADA10010 sw $at, 16($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032954u); return; } g_debug_last_store_pc = 0x80032954u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADA10010u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032954u); -#endif - /* 0xBFC1A958: 8DE1FFFC lw $at, -4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032958u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1A95C: 15EEFFF8 bne $t7, $t6, 0xBFC1A940 */ - uint32_t psx_brA_BFC1A95C = cpu->gpr[15]; uint32_t psx_brB_BFC1A95C = cpu->gpr[14]; - psx_taken_BFC1A95C = (psx_brA_BFC1A95C != psx_brB_BFC1A95C); - psx_delay_BFC1A95C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1A960: ADA10014 sw $at, 20($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032960u); return; } g_debug_last_store_pc = 0x80032960u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADA10014u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032960u); -#endif - if (psx_delay_BFC1A95C) { - psx_delay_BFC1A95C = 0; - if (psx_taken_BFC1A95C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032940u); - goto label_BFC1A940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032964u); - } -label_BFC1A964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032964u); -#endif - /* 0xBFC1A964: 8DE10000 lw $at, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032964u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000u); } - PGXP_LOAD(0x8DE10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A968: 10000025 beq $zero, $zero, 0xBFC1AA00 */ - uint32_t psx_brA_BFC1A968 = cpu->gpr[0]; uint32_t psx_brB_BFC1A968 = cpu->gpr[0]; - psx_taken_BFC1A968 = (psx_brA_BFC1A968 == psx_brB_BFC1A968); - psx_delay_BFC1A968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1A96C: ADA10018 sw $at, 24($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003296Cu); return; } g_debug_last_store_pc = 0x8003296Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADA10018u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003296Cu); -#endif - if (psx_delay_BFC1A968) { - psx_delay_BFC1A968 = 0; - if (psx_taken_BFC1A968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A00u); - goto label_BFC1AA00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032970u); - } -label_BFC1A970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1A970: 24430004 addiu $v1, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24430004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80032970u); -#endif -label_BFC1A974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000009u); -#endif - /* 0xBFC1A974: 0060C821 addu $t9, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x0060C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1A978: 2738000C addiu $t8, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[25] + (12)); - PGXP_ALU(0x2738000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC1A97C: 01004821 addu $t1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01004821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003297Cu); -#endif -label_BFC1A980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032980u); -#endif - /* 0xBFC1A980: 8F210000 lw $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032980u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1A984: 2739000C addiu $t9, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (12)); - PGXP_ALU(0x2739000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A988: AD210004 sw $at, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032988u); return; } g_debug_last_store_pc = 0x80032988u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032988u); -#endif - /* 0xBFC1A98C: 8F21FFF8 lw $at, -8($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003298Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1A990: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A994: AD21FFFC sw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032994u); return; } g_debug_last_store_pc = 0x80032994u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032994u); -#endif - /* 0xBFC1A998: 8F21FFFC lw $at, -4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032998u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80032998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1A99C: 1738FFF8 bne $t9, $t8, 0xBFC1A980 */ - uint32_t psx_brA_BFC1A99C = cpu->gpr[25]; uint32_t psx_brB_BFC1A99C = cpu->gpr[24]; - psx_taken_BFC1A99C = (psx_brA_BFC1A99C != psx_brB_BFC1A99C); - psx_delay_BFC1A99C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A9A0: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329A0u); return; } g_debug_last_store_pc = 0x800329A0u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329A0u); -#endif - if (psx_delay_BFC1A99C) { - psx_delay_BFC1A99C = 0; - if (psx_taken_BFC1A99C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032980u); - goto label_BFC1A980; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800329A4u); - } -label_BFC1A9A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A9A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329A4u); -#endif - /* 0xBFC1A9A4: 8F210000 lw $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329A4u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1009u); -#endif - /* 0xBFC1A9A8: 00606021 addu $t4, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00606021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800329A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1A9AC: AD210004 sw $at, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329ACu); return; } g_debug_last_store_pc = 0x800329ACu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329B0u); -#endif - /* 0xBFC1A9B0: 8F380004 lw $t8, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329B0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x2000000u); } - PGXP_LOAD(0x8F380004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800329B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1A9B4: 258B000C addiu $t3, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[12] + (12)); - PGXP_ALU(0x258B000Cu, cpu->gpr[11], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800329B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC1A9B8: AD380008 sw $t8, 8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329B8u); return; } g_debug_last_store_pc = 0x800329B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD380008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800329B8u); -#endif - /* 0xBFC1A9BC: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329BCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800329BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A9C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800329C0u); -#endif -label_BFC1A9C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A9C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329C4u); -#endif - /* 0xBFC1A9C4: 8D810000 lw $at, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329C4u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000u); } - PGXP_LOAD(0x8D810000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1A9C8: 258C000C addiu $t4, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (12)); - PGXP_ALU(0x258C000Cu, cpu->gpr[12], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800329C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A9CC: AD410004 sw $at, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329CCu); return; } g_debug_last_store_pc = 0x800329CCu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD410004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329D0u); -#endif - /* 0xBFC1A9D0: 8D81FFF8 lw $at, -8($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329D0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000u); } - PGXP_LOAD(0x8D81FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1A9D4: 254A000C addiu $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (12)); - PGXP_ALU(0x254A000Cu, cpu->gpr[10], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800329D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A9D8: AD41FFFC sw $at, -4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329D8u); return; } g_debug_last_store_pc = 0x800329D8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD41FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329D8u); -#endif - /* 0xBFC1A9DC: 8D81FFFC lw $at, -4($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329DCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000u); } - PGXP_LOAD(0x8D81FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1A9E0: 158BFFF8 bne $t4, $t3, 0xBFC1A9C4 */ - uint32_t psx_brA_BFC1A9E0 = cpu->gpr[12]; uint32_t psx_brB_BFC1A9E0 = cpu->gpr[11]; - psx_taken_BFC1A9E0 = (psx_brA_BFC1A9E0 != psx_brB_BFC1A9E0); - psx_delay_BFC1A9E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A9E4: AD410000 sw $at, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329E4u); return; } g_debug_last_store_pc = 0x800329E4u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD410000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329E4u); -#endif - if (psx_delay_BFC1A9E0) { - psx_delay_BFC1A9E0 = 0; - if (psx_taken_BFC1A9E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800329C4u); - goto label_BFC1A9C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800329E8u); - } -label_BFC1A9E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1A9E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1A9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329E8u); -#endif - /* 0xBFC1A9E8: 8D810000 lw $at, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329E8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000u); } - PGXP_LOAD(0x8D810000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A9EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800329ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800329F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1A9F0: AD410004 sw $at, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329F0u); return; } g_debug_last_store_pc = 0x800329F0u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD410004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800329F0u); -#endif - /* 0xBFC1A9F4: 8D8B0004 lw $t3, 4($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329F4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x1000u); } - PGXP_LOAD(0x8D8B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800329F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1A9F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800329F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1A9FC: AD4B0008 sw $t3, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329FCu); return; } g_debug_last_store_pc = 0x800329FCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD4B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800329FCu); -#endif -label_BFC1AA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A00u); -#endif - /* 0xBFC1AA00: 84E50046 lh $a1, 70($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A00u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x80u); } - PGXP_LOAD(0x84E50046u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A00u); -#endif - /* 0xBFC1AA04: 84E60048 lh $a2, 72($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A04u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x80u); } - PGXP_LOAD(0x84E60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC1AA08: AFA8002C sw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A08u); return; } g_debug_last_store_pc = 0x80032A08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC1AA0C: AFA70024 sw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A0Cu); return; } g_debug_last_store_pc = 0x80032A0Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA10: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80032A18u; /* jal link before delay slot */ - psx_delay_BFC1AA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1AA14: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032A14u); -#endif - if (psx_delay_BFC1AA10) { - psx_delay_BFC1AA10 = 0; - cpu->gpr[31] = 0x80032A18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1AA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A18u); -#endif - /* 0xBFC1AA18: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A18u); -#endif - /* 0xBFC1AA1C: 8FA70024 lw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A1Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A20u); -#endif - /* 0xBFC1AA20: 85050042 lh $a1, 66($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A20u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x100u); } - PGXP_LOAD(0x85050042u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A20u); -#endif - /* 0xBFC1AA24: 85060044 lh $a2, 68($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A24u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x100u); } - PGXP_LOAD(0x85060044u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA28: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80032A30u; /* jal link before delay slot */ - psx_delay_BFC1AA28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1AA2C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032A2Cu); -#endif - if (psx_delay_BFC1AA28) { - psx_delay_BFC1AA28 = 0; - cpu->gpr[31] = 0x80032A30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC1AA30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A30u); -#endif - /* 0xBFC1AA30: 8FA8002C lw $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A30u); -#endif - /* 0xBFC1AA34: 8FA70024 lw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A34u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1AA38: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA3C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032A44u; /* jal link before delay slot */ - psx_delay_BFC1AA3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC1AA40: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032A40u); -#endif - if (psx_delay_BFC1AA3C) { - psx_delay_BFC1AA3C = 0; - cpu->gpr[31] = 0x80032A44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1AA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A44u); -#endif - /* 0xBFC1AA44: 8FA70024 lw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A44u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A44u); -#endif - /* 0xBFC1AA48: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A48u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A48u); -#endif - /* 0xBFC1AA4C: 84E50046 lh $a1, 70($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A4Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x80u); } - PGXP_LOAD(0x84E50046u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A50u); -#endif - /* 0xBFC1AA50: 84E60048 lh $a2, 72($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A50u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x80u); } - PGXP_LOAD(0x84E60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA54: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80032A5Cu; /* jal link before delay slot */ - psx_delay_BFC1AA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AA58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032A58u); -#endif - if (psx_delay_BFC1AA54) { - psx_delay_BFC1AA54 = 0; - cpu->gpr[31] = 0x80032A5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1AA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A5Cu); -#endif - /* 0xBFC1AA5C: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A5Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AA60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032A60u); -#endif - /* 0xBFC1AA64: 84850042 lh $a1, 66($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A64u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10u); } - PGXP_LOAD(0x84850042u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A64u); -#endif - /* 0xBFC1AA68: 84860044 lh $a2, 68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A68u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x84860044u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA6C: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80032A74u; /* jal link before delay slot */ - psx_delay_BFC1AA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AA70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032A70u); -#endif - if (psx_delay_BFC1AA6C) { - psx_delay_BFC1AA6C = 0; - cpu->gpr[31] = 0x80032A74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC1AA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A74u); -#endif - /* 0xBFC1AA74: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A74u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AA78: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80032A80u; /* jal link before delay slot */ - psx_delay_BFC1AA78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1AA7C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032A7Cu); -#endif - if (psx_delay_BFC1AA78) { - psx_delay_BFC1AA78 = 0; - cpu->gpr[31] = 0x80032A80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1AA80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A80u); -#endif - /* 0xBFC1AA80: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A80u); -#endif -label_BFC1AA84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AA84: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80032A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1AA88: 03E00008 jr $ra */ - psx_delay_BFC1AA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AA8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032A8Cu); -#endif - if (psx_delay_BFC1AA88) { - psx_delay_BFC1AA88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1AA90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1AA90u); - int psx_delay_BFC1AAA0 = 0; - int psx_taken_BFC1AAA0 = 0; - int psx_delay_BFC1AAB0 = 0; - int psx_delay_BFC1AAC8 = 0; - int psx_taken_BFC1AAC8 = 0; - int psx_delay_BFC1AAE0 = 0; - int psx_taken_BFC1AAE0 = 0; - int psx_delay_BFC1AAF8 = 0; - int psx_delay_BFC1AB08 = 0; - int psx_delay_BFC1AB18 = 0; - int psx_delay_BFC1AB28 = 0; - int psx_delay_BFC1AB38 = 0; - int psx_delay_BFC1AB48 = 0; - int psx_delay_BFC1AB5C = 0; - int psx_taken_BFC1AB5C = 0; - int psx_delay_BFC1AB68 = 0; - int psx_taken_BFC1AB68 = 0; - int psx_delay_BFC1AB7C = 0; - int psx_taken_BFC1AB7C = 0; - int psx_delay_BFC1ABB8 = 0; - int psx_delay_BFC1ABC0 = 0; - int psx_taken_BFC1ABC0 = 0; - int psx_delay_BFC1ABD0 = 0; - int psx_taken_BFC1ABD0 = 0; - int psx_delay_BFC1AC0C = 0; - int psx_delay_BFC1AC14 = 0; - int psx_taken_BFC1AC14 = 0; - int psx_delay_BFC1AC50 = 0; - int psx_delay_BFC1AC60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1AAA8u: goto label_BFC1AAA8; - case 0xBFC1AAB8u: goto label_BFC1AAB8; - case 0xBFC1AAD0u: goto label_BFC1AAD0; - case 0xBFC1AADCu: goto label_BFC1AADC; - case 0xBFC1AAE8u: goto label_BFC1AAE8; - case 0xBFC1AAF4u: goto label_BFC1AAF4; - case 0xBFC1AB00u: goto label_BFC1AB00; - case 0xBFC1AB10u: goto label_BFC1AB10; - case 0xBFC1AB20u: goto label_BFC1AB20; - case 0xBFC1AB30u: goto label_BFC1AB30; - case 0xBFC1AB40u: goto label_BFC1AB40; - case 0xBFC1AB50u: goto label_BFC1AB50; - case 0xBFC1AB64u: goto label_BFC1AB64; - case 0xBFC1AB70u: goto label_BFC1AB70; - case 0xBFC1AB74u: goto label_BFC1AB74; - case 0xBFC1AB78u: goto label_BFC1AB78; - case 0xBFC1AB84u: goto label_BFC1AB84; - case 0xBFC1ABC0u: goto label_BFC1ABC0; - case 0xBFC1ABC8u: goto label_BFC1ABC8; - case 0xBFC1ABCCu: goto label_BFC1ABCC; - case 0xBFC1ABD8u: goto label_BFC1ABD8; - case 0xBFC1AC14u: goto label_BFC1AC14; - case 0xBFC1AC1Cu: goto label_BFC1AC1C; - case 0xBFC1AC58u: goto label_BFC1AC58; - case 0xBFC1AC5Cu: goto label_BFC1AC5C; - default: break; - } - } -label_BFC1AA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1AA90: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032A90u); -#endif - /* 0xBFC1AA94: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032A94u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AA98: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AA9C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1AAA0: 15C1006D bne $t6, $at, 0xBFC1AC58 */ - uint32_t psx_brA_BFC1AAA0 = cpu->gpr[14]; uint32_t psx_brB_BFC1AAA0 = cpu->gpr[1]; - psx_taken_BFC1AAA0 = (psx_brA_BFC1AAA0 != psx_brB_BFC1AAA0); - psx_delay_BFC1AAA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1AAA4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032AA4u); return; } g_debug_last_store_pc = 0x80032AA4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032AA4u); -#endif - if (psx_delay_BFC1AAA0) { - psx_delay_BFC1AAA0 = 0; - if (psx_taken_BFC1AAA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C58u); - goto label_BFC1AC58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032AA8u); - } -label_BFC1AAA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AAA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AAA8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032AA8u); -#endif - /* 0xBFC1AAAC: 8CA59F64 lw $a1, -24732($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032AACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59F64u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AAB0: 0C00D376 jal 0xB0034DD8 */ - cpu->gpr[31] = 0x80032AB8u; /* jal link before delay slot */ - psx_delay_BFC1AAB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1AAB4: 27A4001C addiu $a0, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A4001Cu, cpu->gpr[4], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032AB4u); -#endif - if (psx_delay_BFC1AAB0) { - psx_delay_BFC1AAB0 = 0; - cpu->gpr[31] = 0x80032AB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034DD8u); - cpu->pc = 0x80034DD8u; return; - } -label_BFC1AAB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AAB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AB8u); -#endif - /* 0xBFC1AAB8: 93A2001D lbu $v0, 29($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 29; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (29)), 2, 0x20000000u); - PGXP_LOAD(0x93A2001Du, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AABC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1AAC0: 00027902 srl $t7, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00027902u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1AAC4: 2DE1000A sltiu $at, $t7, 10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0); - PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AAC8: 14200004 bne $at, $zero, 0xBFC1AADC */ - uint32_t psx_brA_BFC1AAC8 = cpu->gpr[1]; uint32_t psx_brB_BFC1AAC8 = cpu->gpr[0]; - psx_taken_BFC1AAC8 = (psx_brA_BFC1AAC8 != psx_brB_BFC1AAC8); - psx_delay_BFC1AAC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1AACC: 3058000F andi $t8, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3058000Fu, cpu->gpr[24], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032ACCu); -#endif - if (psx_delay_BFC1AAC8) { - psx_delay_BFC1AAC8 = 0; - if (psx_taken_BFC1AAC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032ADCu); - goto label_BFC1AADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032AD0u); - } -label_BFC1AAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1AAD0: 3042000F andi $v0, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3042000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1AAD4: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1AAD8: 3058000F andi $t8, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3058000Fu, cpu->gpr[24], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032AD8u); -#endif -label_BFC1AADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1AADC: 2F01000A sltiu $at, $t8, 10 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < 0x0000000Au ? 1 : 0); - PGXP_ALU(0x2F01000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AAE0: 14200004 bne $at, $zero, 0xBFC1AAF4 */ - uint32_t psx_brA_BFC1AAE0 = cpu->gpr[1]; uint32_t psx_brB_BFC1AAE0 = cpu->gpr[0]; - psx_taken_BFC1AAE0 = (psx_brA_BFC1AAE0 != psx_brB_BFC1AAE0); - psx_delay_BFC1AAE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AAE4: 24040029 addiu $a0, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24040029u, cpu->gpr[4], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x80032AE4u); -#endif - if (psx_delay_BFC1AAE0) { - psx_delay_BFC1AAE0 = 0; - if (psx_taken_BFC1AAE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032AF4u); - goto label_BFC1AAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032AE8u); - } -label_BFC1AAE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AAE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1AAE8: 304200F0 andi $v0, $v0, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xF0u; - PGXP_ALU(0x304200F0u, cpu->gpr[2], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1AAEC: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AAF0: 24040029 addiu $a0, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24040029u, cpu->gpr[4], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x80032AF0u); -#endif -label_BFC1AAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC1AAF4: 00022902 srl $a1, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00022902u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AAF8: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B00u; /* jal link before delay slot */ - psx_delay_BFC1AAF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1AAFC: A3A2001D sb $v0, 29($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 29; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032AFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (29)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA3A2001Du, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032AFCu); -#endif - if (psx_delay_BFC1AAF8) { - psx_delay_BFC1AAF8 = 0; - cpu->gpr[31] = 0x80032B00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B00u); -#endif - /* 0xBFC1AB00: 93A2001D lbu $v0, 29($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 29; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (29)), 2, 0x20000000u); - PGXP_LOAD(0x93A2001Du, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AB04: 2404002A addiu $a0, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2404002Au, cpu->gpr[4], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AB08: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B10u; /* jal link before delay slot */ - psx_delay_BFC1AB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC1AB0C: 3045000F andi $a1, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x3045000Fu, cpu->gpr[5], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B0Cu); -#endif - if (psx_delay_BFC1AB08) { - psx_delay_BFC1AB08 = 0; - cpu->gpr[31] = 0x80032B10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B10u); -#endif - /* 0xBFC1AB10: 93A5001F lbu $a1, 31($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 31; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (31)), 5, 0x20000000u); - PGXP_LOAD(0x93A5001Fu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AB14: 2404002B addiu $a0, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2404002Bu, cpu->gpr[4], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AB18: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B20u; /* jal link before delay slot */ - psx_delay_BFC1AB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AB1C: 00052902 srl $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] >> 4u; - PGXP_ALU(0x00052902u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B1Cu); -#endif - if (psx_delay_BFC1AB18) { - psx_delay_BFC1AB18 = 0; - cpu->gpr[31] = 0x80032B20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B20u); -#endif - /* 0xBFC1AB20: 93A5001F lbu $a1, 31($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 31; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (31)), 5, 0x20000000u); - PGXP_LOAD(0x93A5001Fu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AB24: 2404002C addiu $a0, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2404002Cu, cpu->gpr[4], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AB28: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B30u; /* jal link before delay slot */ - psx_delay_BFC1AB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AB2C: 30A5000F andi $a1, $a1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFu; - PGXP_ALU(0x30A5000Fu, cpu->gpr[5], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B2Cu); -#endif - if (psx_delay_BFC1AB28) { - psx_delay_BFC1AB28 = 0; - cpu->gpr[31] = 0x80032B30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B30u); -#endif - /* 0xBFC1AB30: 93A50020 lbu $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 5, 0x20000000u); - PGXP_LOAD(0x93A50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AB34: 2404002D addiu $a0, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2404002Du, cpu->gpr[4], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80032B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AB38: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B40u; /* jal link before delay slot */ - psx_delay_BFC1AB38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AB3C: 00052902 srl $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] >> 4u; - PGXP_ALU(0x00052902u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B3Cu); -#endif - if (psx_delay_BFC1AB38) { - psx_delay_BFC1AB38 = 0; - cpu->gpr[31] = 0x80032B40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B40u); -#endif - /* 0xBFC1AB40: 93A50020 lbu $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 5, 0x20000000u); - PGXP_LOAD(0x93A50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1AB44: 2404002E addiu $a0, $zero, 46 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (46)); - PGXP_ALU(0x2404002Eu, cpu->gpr[4], _pgx1, 0x0000002Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AB48: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80032B50u; /* jal link before delay slot */ - psx_delay_BFC1AB48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AB4C: 30A5000F andi $a1, $a1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFu; - PGXP_ALU(0x30A5000Fu, cpu->gpr[5], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80032B4Cu); -#endif - if (psx_delay_BFC1AB48) { - psx_delay_BFC1AB48 = 0; - cpu->gpr[31] = 0x80032B50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1AB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1AB50: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032B50u); -#endif - /* 0xBFC1AB54: 8F399E2C lw $t9, -25044($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B54u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AB58: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1AB5C: 13210005 beq $t9, $at, 0xBFC1AB74 */ - uint32_t psx_brA_BFC1AB5C = cpu->gpr[25]; uint32_t psx_brB_BFC1AB5C = cpu->gpr[1]; - psx_taken_BFC1AB5C = (psx_brA_BFC1AB5C == psx_brB_BFC1AB5C); - psx_delay_BFC1AB5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1AB60: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B60u); -#endif - if (psx_delay_BFC1AB5C) { - psx_delay_BFC1AB5C = 0; - if (psx_taken_BFC1AB5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032B74u); - goto label_BFC1AB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032B64u); - } -label_BFC1AB64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B64u); -#endif - /* 0xBFC1AB64: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AB68: 10000003 beq $zero, $zero, 0xBFC1AB78 */ - uint32_t psx_brA_BFC1AB68 = cpu->gpr[0]; uint32_t psx_brB_BFC1AB68 = cpu->gpr[0]; - psx_taken_BFC1AB68 = (psx_brA_BFC1AB68 == psx_brB_BFC1AB68); - psx_delay_BFC1AB68 = 1; - /* 0xBFC1AB6C: 93A8001E lbu $t0, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (30)), 8, 0x20000000u); - PGXP_LOAD(0x93A8001Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B6Cu); -#endif - if (psx_delay_BFC1AB68) { - psx_delay_BFC1AB68 = 0; - if (psx_taken_BFC1AB68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032B78u); - goto label_BFC1AB78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032B70u); - } -label_BFC1AB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1AB70: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B70u); -#endif -label_BFC1AB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B74u); -#endif - /* 0xBFC1AB74: 93A8001E lbu $t0, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (30)), 8, 0x20000000u); - PGXP_LOAD(0x93A8001Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B74u); -#endif -label_BFC1AB78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AB78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1AB7C: 15000013 bne $t0, $zero, 0xBFC1ABCC */ - uint32_t psx_brA_BFC1AB7C = cpu->gpr[8]; uint32_t psx_brB_BFC1AB7C = cpu->gpr[0]; - psx_taken_BFC1AB7C = (psx_brA_BFC1AB7C != psx_brB_BFC1AB7C); - psx_delay_BFC1AB7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B80u); -#endif - /* 0xBFC1AB80: 93AE001C lbu $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 14, 0x20000000u); - PGXP_LOAD(0x93AE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B80u); -#endif - if (psx_delay_BFC1AB7C) { - psx_delay_BFC1AB7C = 0; - if (psx_taken_BFC1AB7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032BCCu); - goto label_BFC1ABCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032B84u); - } -label_BFC1AB84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AB84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1AB84: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032B84u); -#endif - /* 0xBFC1AB88: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B88u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80032B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1AB8C: 000258C0 sll $t3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000258C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1AB90: 000950C0 sll $t2, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000950C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1AB94: 01625823 subu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01625823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1AB98: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1AB9C: 000A52C0 sll $t2, $t2, 11 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 11u; - PGXP_ALU(0x000A52C0u, cpu->gpr[10], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80032B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1ABA0: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1ABA4: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1ABA8: 25ADFF74 addiu $t5, $t5, -140 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-140)); - PGXP_ALU(0x25ADFF74u, cpu->gpr[13], _pgx1, 0xFFFFFF74u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC1ABAC: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC1ABB0: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1ABB4: 240500B8 addiu $a1, $zero, 184 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (184)); - PGXP_ALU(0x240500B8u, cpu->gpr[5], _pgx1, 0x000000B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ABB8: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80032BC0u; /* jal link before delay slot */ - psx_delay_BFC1ABB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1ABBC: 2406005E addiu $a2, $zero, 94 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); - PGXP_ALU(0x2406005Eu, cpu->gpr[6], _pgx1, 0x0000005Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80032BBCu); -#endif - if (psx_delay_BFC1ABB8) { - psx_delay_BFC1ABB8 = 0; - cpu->gpr[31] = 0x80032BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC1ABC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ABC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ABC0: 10000026 beq $zero, $zero, 0xBFC1AC5C */ - uint32_t psx_brA_BFC1ABC0 = cpu->gpr[0]; uint32_t psx_brB_BFC1ABC0 = cpu->gpr[0]; - psx_taken_BFC1ABC0 = (psx_brA_BFC1ABC0 == psx_brB_BFC1ABC0); - psx_delay_BFC1ABC0 = 1; - /* 0xBFC1ABC4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032BC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032BC4u); -#endif - if (psx_delay_BFC1ABC0) { - psx_delay_BFC1ABC0 = 0; - if (psx_taken_BFC1ABC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C5Cu); - goto label_BFC1AC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032BC8u); - } -label_BFC1ABC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ABC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ABC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BC8u); -#endif - /* 0xBFC1ABC8: 93AE001C lbu $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 14, 0x20000000u); - PGXP_LOAD(0x93AE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032BC8u); -#endif -label_BFC1ABCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ABCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ABCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ABCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1ABD0: 11C00012 beq $t6, $zero, 0xBFC1AC1C */ - uint32_t psx_brA_BFC1ABD0 = cpu->gpr[14]; uint32_t psx_brB_BFC1ABD0 = cpu->gpr[0]; - psx_taken_BFC1ABD0 = (psx_brA_BFC1ABD0 == psx_brB_BFC1ABD0); - psx_delay_BFC1ABD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ABD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032BD4u); -#endif - if (psx_delay_BFC1ABD0) { - psx_delay_BFC1ABD0 = 0; - if (psx_taken_BFC1ABD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C1Cu); - goto label_BFC1AC1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032BD8u); - } -label_BFC1ABD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ABD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ABD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1ABD8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032BD8u); -#endif - /* 0xBFC1ABDC: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032BDCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1ABE0: 0002C8C0 sll $t9, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 3u; - PGXP_ALU(0x0002C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1ABE4: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1ABE8: 0322C823 subu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[2]; - PGXP_ALU(0x0322C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1ABEC: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1ABF0: 0018C2C0 sll $t8, $t8, 11 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 11u; - PGXP_ALU(0x0018C2C0u, cpu->gpr[24], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1ABF4: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1ABF8: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1ABFC: 2529FF74 addiu $t1, $t1, -140 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-140)); - PGXP_ALU(0x2529FF74u, cpu->gpr[9], _pgx1, 0xFFFFFF74u); } -#ifdef PSX_COSIM - cosim_instr(0x80032BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC1AC00: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC1AC04: 01092021 addu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1AC08: 240500B8 addiu $a1, $zero, 184 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (184)); - PGXP_ALU(0x240500B8u, cpu->gpr[5], _pgx1, 0x000000B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AC0C: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80032C14u; /* jal link before delay slot */ - psx_delay_BFC1AC0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1AC10: 2406005E addiu $a2, $zero, 94 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); - PGXP_ALU(0x2406005Eu, cpu->gpr[6], _pgx1, 0x0000005Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80032C10u); -#endif - if (psx_delay_BFC1AC0C) { - psx_delay_BFC1AC0C = 0; - cpu->gpr[31] = 0x80032C14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC1AC14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AC14: 10000011 beq $zero, $zero, 0xBFC1AC5C */ - uint32_t psx_brA_BFC1AC14 = cpu->gpr[0]; uint32_t psx_brB_BFC1AC14 = cpu->gpr[0]; - psx_taken_BFC1AC14 = (psx_brA_BFC1AC14 == psx_brB_BFC1AC14); - psx_delay_BFC1AC14 = 1; - /* 0xBFC1AC18: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C18u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C18u); -#endif - if (psx_delay_BFC1AC14) { - psx_delay_BFC1AC14 = 0; - if (psx_taken_BFC1AC14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C5Cu); - goto label_BFC1AC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C1Cu); - } -label_BFC1AC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1AC1C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C20u); -#endif - /* 0xBFC1AC20: 8D4A9E24 lw $t2, -25052($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C20u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E24u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1AC24: 000260C0 sll $t4, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000260C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1AC28: 000A58C0 sll $t3, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1AC2C: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1AC30: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1AC34: 000B5AC0 sll $t3, $t3, 11 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 11u; - PGXP_ALU(0x000B5AC0u, cpu->gpr[11], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1AC38: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1AC3C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1AC40: 25CEFF74 addiu $t6, $t6, -140 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-140)); - PGXP_ALU(0x25CEFF74u, cpu->gpr[14], _pgx1, 0xFFFFFF74u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC1AC44: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6010u); -#endif - /* 0xBFC1AC48: 01AE2021 addu $a0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1AC4C: 240500DA addiu $a1, $zero, 218 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (218)); - PGXP_ALU(0x240500DAu, cpu->gpr[5], _pgx1, 0x000000DAu); } -#ifdef PSX_COSIM - cosim_instr(0x80032C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AC50: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80032C58u; /* jal link before delay slot */ - psx_delay_BFC1AC50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1AC54: 2406005E addiu $a2, $zero, 94 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); - PGXP_ALU(0x2406005Eu, cpu->gpr[6], _pgx1, 0x0000005Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80032C54u); -#endif - if (psx_delay_BFC1AC50) { - psx_delay_BFC1AC50 = 0; - cpu->gpr[31] = 0x80032C58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC1AC58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C58u); -#endif - /* 0xBFC1AC58: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C58u); -#endif -label_BFC1AC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AC5C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1AC60: 03E00008 jr $ra */ - psx_delay_BFC1AC60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AC64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032C64u); -#endif - if (psx_delay_BFC1AC60) { - psx_delay_BFC1AC60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1AC68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1AC68u); - int psx_delay_BFC1AC78 = 0; - int psx_taken_BFC1AC78 = 0; - int psx_delay_BFC1AC98 = 0; - int psx_taken_BFC1AC98 = 0; - int psx_delay_BFC1ACB4 = 0; - int psx_delay_BFC1ACBC = 0; - int psx_taken_BFC1ACBC = 0; - int psx_delay_BFC1ACC4 = 0; - int psx_taken_BFC1ACC4 = 0; - int psx_delay_BFC1ACCC = 0; - int psx_taken_BFC1ACCC = 0; - int psx_delay_BFC1ACE0 = 0; - int psx_taken_BFC1ACE0 = 0; - int psx_delay_BFC1ACE8 = 0; - int psx_taken_BFC1ACE8 = 0; - int psx_delay_BFC1ACF4 = 0; - int psx_taken_BFC1ACF4 = 0; - int psx_delay_BFC1ACFC = 0; - int psx_taken_BFC1ACFC = 0; - int psx_delay_BFC1AD08 = 0; - int psx_taken_BFC1AD08 = 0; - int psx_delay_BFC1AD14 = 0; - int psx_taken_BFC1AD14 = 0; - int psx_delay_BFC1AD2C = 0; - int psx_delay_BFC1AD48 = 0; - int psx_taken_BFC1AD48 = 0; - int psx_delay_BFC1AD54 = 0; - int psx_taken_BFC1AD54 = 0; - int psx_delay_BFC1AD6C = 0; - int psx_taken_BFC1AD6C = 0; - int psx_delay_BFC1AD7C = 0; - int psx_taken_BFC1AD7C = 0; - int psx_delay_BFC1AD8C = 0; - int psx_taken_BFC1AD8C = 0; - int psx_delay_BFC1AD9C = 0; - int psx_taken_BFC1AD9C = 0; - int psx_delay_BFC1ADAC = 0; - int psx_taken_BFC1ADAC = 0; - int psx_delay_BFC1ADB8 = 0; - int psx_taken_BFC1ADB8 = 0; - int psx_delay_BFC1ADCC = 0; - int psx_taken_BFC1ADCC = 0; - int psx_delay_BFC1ADE8 = 0; - int psx_delay_BFC1ADFC = 0; - int psx_taken_BFC1ADFC = 0; - int psx_delay_BFC1AE04 = 0; - int psx_taken_BFC1AE04 = 0; - int psx_delay_BFC1AE0C = 0; - int psx_delay_BFC1AE1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1AC80u: goto label_BFC1AC80; - case 0xBFC1ACA0u: goto label_BFC1ACA0; - case 0xBFC1ACBCu: goto label_BFC1ACBC; - case 0xBFC1ACC4u: goto label_BFC1ACC4; - case 0xBFC1ACCCu: goto label_BFC1ACCC; - case 0xBFC1ACD4u: goto label_BFC1ACD4; - case 0xBFC1ACE8u: goto label_BFC1ACE8; - case 0xBFC1ACF0u: goto label_BFC1ACF0; - case 0xBFC1ACF4u: goto label_BFC1ACF4; - case 0xBFC1ACFCu: goto label_BFC1ACFC; - case 0xBFC1AD04u: goto label_BFC1AD04; - case 0xBFC1AD08u: goto label_BFC1AD08; - case 0xBFC1AD10u: goto label_BFC1AD10; - case 0xBFC1AD1Cu: goto label_BFC1AD1C; - case 0xBFC1AD34u: goto label_BFC1AD34; - case 0xBFC1AD50u: goto label_BFC1AD50; - case 0xBFC1AD5Cu: goto label_BFC1AD5C; - case 0xBFC1AD60u: goto label_BFC1AD60; - case 0xBFC1AD74u: goto label_BFC1AD74; - case 0xBFC1AD84u: goto label_BFC1AD84; - case 0xBFC1AD88u: goto label_BFC1AD88; - case 0xBFC1AD8Cu: goto label_BFC1AD8C; - case 0xBFC1AD94u: goto label_BFC1AD94; - case 0xBFC1ADA4u: goto label_BFC1ADA4; - case 0xBFC1ADB4u: goto label_BFC1ADB4; - case 0xBFC1ADB8u: goto label_BFC1ADB8; - case 0xBFC1ADC0u: goto label_BFC1ADC0; - case 0xBFC1ADD4u: goto label_BFC1ADD4; - case 0xBFC1ADF0u: goto label_BFC1ADF0; - case 0xBFC1ADFCu: goto label_BFC1ADFC; - case 0xBFC1AE04u: goto label_BFC1AE04; - case 0xBFC1AE0Cu: goto label_BFC1AE0C; - case 0xBFC1AE14u: goto label_BFC1AE14; - case 0xBFC1AE18u: goto label_BFC1AE18; - default: break; - } - } -label_BFC1AC68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1AC68: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032C68u); -#endif - /* 0xBFC1AC6C: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C6Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AC70: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AC74: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80032C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1AC78: 15C10066 bne $t6, $at, 0xBFC1AE14 */ - uint32_t psx_brA_BFC1AC78 = cpu->gpr[14]; uint32_t psx_brB_BFC1AC78 = cpu->gpr[1]; - psx_taken_BFC1AC78 = (psx_brA_BFC1AC78 != psx_brB_BFC1AC78); - psx_delay_BFC1AC78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1AC7C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C7Cu); return; } g_debug_last_store_pc = 0x80032C7Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C7Cu); -#endif - if (psx_delay_BFC1AC78) { - psx_delay_BFC1AC78 = 0; - if (psx_taken_BFC1AC78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E14u); - goto label_BFC1AE14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C80u); - } -label_BFC1AC80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AC80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AC80: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032C80u); -#endif - /* 0xBFC1AC84: 8CA56948 lw $a1, 26952($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C84u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA56948u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1AC88: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC1AC8C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1AC90: 244FFFCE addiu $t7, $v0, -50 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[2] + (-50)); - PGXP_ALU(0x244FFFCEu, cpu->gpr[15], _pgx1, 0xFFFFFFCEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1AC94: 2DE1000A sltiu $at, $t7, 10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < 0x0000000Au ? 1 : 0); - PGXP_ALU(0x2DE1000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AC98: 1020001B beq $at, $zero, 0xBFC1AD08 */ - uint32_t psx_brA_BFC1AC98 = cpu->gpr[1]; uint32_t psx_brB_BFC1AC98 = cpu->gpr[0]; - psx_taken_BFC1AC98 = (psx_brA_BFC1AC98 == psx_brB_BFC1AC98); - psx_delay_BFC1AC98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AC9C: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032C9Cu); -#endif - if (psx_delay_BFC1AC98) { - psx_delay_BFC1AC98 = 0; - if (psx_taken_BFC1AC98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D08u); - goto label_BFC1AD08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CA0u); - } -label_BFC1ACA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1ACA0: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80032CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1ACA4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1ACA8: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032CA8u); -#endif - /* 0xBFC1ACAC: 8C2FAC2C lw $t7, -21460($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21460; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032CACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x2u); } - PGXP_LOAD(0x8C2FAC2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1ACB4: 01E00008 jr $t7 */ - psx_delay_BFC1ACB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032CB8u); -#endif - if (psx_delay_BFC1ACB4) { - psx_delay_BFC1ACB4 = 0; - /* jump table at 0x8005AC2C, 10 entries */ - switch (cpu->gpr[15]) { - case 0x80032CC4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CC4u); - goto label_BFC1ACC4; - case 0x80032CBCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CBCu); - goto label_BFC1ACBC; - case 0x80032CCCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CCCu); - goto label_BFC1ACCC; - case 0x80032D04u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - case 0x80032CD4u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CD4u); - goto label_BFC1ACD4; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[15]); - cpu->pc = cpu->gpr[15]; return; - } - } -label_BFC1ACBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACBC: 10000011 beq $zero, $zero, 0xBFC1AD04 */ - uint32_t psx_brA_BFC1ACBC = cpu->gpr[0]; uint32_t psx_brB_BFC1ACBC = cpu->gpr[0]; - psx_taken_BFC1ACBC = (psx_brA_BFC1ACBC == psx_brB_BFC1ACBC); - psx_delay_BFC1ACBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1ACC0: 240700CB addiu $a3, $zero, 203 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (203)); - PGXP_ALU(0x240700CBu, cpu->gpr[7], _pgx1, 0x000000CBu); } -#ifdef PSX_COSIM - cosim_instr(0x80032CC0u); -#endif - if (psx_delay_BFC1ACBC) { - psx_delay_BFC1ACBC = 0; - if (psx_taken_BFC1ACBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CC4u); - } -label_BFC1ACC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACC4: 1000000F beq $zero, $zero, 0xBFC1AD04 */ - uint32_t psx_brA_BFC1ACC4 = cpu->gpr[0]; uint32_t psx_brB_BFC1ACC4 = cpu->gpr[0]; - psx_taken_BFC1ACC4 = (psx_brA_BFC1ACC4 == psx_brB_BFC1ACC4); - psx_delay_BFC1ACC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1ACC8: 240700CC addiu $a3, $zero, 204 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (204)); - PGXP_ALU(0x240700CCu, cpu->gpr[7], _pgx1, 0x000000CCu); } -#ifdef PSX_COSIM - cosim_instr(0x80032CC8u); -#endif - if (psx_delay_BFC1ACC4) { - psx_delay_BFC1ACC4 = 0; - if (psx_taken_BFC1ACC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CCCu); - } -label_BFC1ACCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACCC: 1000000D beq $zero, $zero, 0xBFC1AD04 */ - uint32_t psx_brA_BFC1ACCC = cpu->gpr[0]; uint32_t psx_brB_BFC1ACCC = cpu->gpr[0]; - psx_taken_BFC1ACCC = (psx_brA_BFC1ACCC == psx_brB_BFC1ACCC); - psx_delay_BFC1ACCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1ACD0: 240700CD addiu $a3, $zero, 205 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (205)); - PGXP_ALU(0x240700CDu, cpu->gpr[7], _pgx1, 0x000000CDu); } -#ifdef PSX_COSIM - cosim_instr(0x80032CD0u); -#endif - if (psx_delay_BFC1ACCC) { - psx_delay_BFC1ACCC = 0; - if (psx_taken_BFC1ACCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CD4u); - } -label_BFC1ACD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1ACD4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032CD4u); -#endif - /* 0xBFC1ACD8: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032CD8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ACDC: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1ACE0: 14410004 bne $v0, $at, 0xBFC1ACF4 */ - uint32_t psx_brA_BFC1ACE0 = cpu->gpr[2]; uint32_t psx_brB_BFC1ACE0 = cpu->gpr[1]; - psx_taken_BFC1ACE0 = (psx_brA_BFC1ACE0 != psx_brB_BFC1ACE0); - psx_delay_BFC1ACE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ACE4: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032CE4u); -#endif - if (psx_delay_BFC1ACE0) { - psx_delay_BFC1ACE0 = 0; - if (psx_taken_BFC1ACE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CF4u); - goto label_BFC1ACF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CE8u); - } -label_BFC1ACE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACE8: 10000006 beq $zero, $zero, 0xBFC1AD04 */ - uint32_t psx_brA_BFC1ACE8 = cpu->gpr[0]; uint32_t psx_brB_BFC1ACE8 = cpu->gpr[0]; - psx_taken_BFC1ACE8 = (psx_brA_BFC1ACE8 == psx_brB_BFC1ACE8); - psx_delay_BFC1ACE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1ACEC: 240700CA addiu $a3, $zero, 202 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (202)); - PGXP_ALU(0x240700CAu, cpu->gpr[7], _pgx1, 0x000000CAu); } -#ifdef PSX_COSIM - cosim_instr(0x80032CECu); -#endif - if (psx_delay_BFC1ACE8) { - psx_delay_BFC1ACE8 = 0; - if (psx_taken_BFC1ACE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CF0u); - } -label_BFC1ACF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ACF0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032CF0u); -#endif -label_BFC1ACF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1ACF4: 14410004 bne $v0, $at, 0xBFC1AD08 */ - uint32_t psx_brA_BFC1ACF4 = cpu->gpr[2]; uint32_t psx_brB_BFC1ACF4 = cpu->gpr[1]; - psx_taken_BFC1ACF4 = (psx_brA_BFC1ACF4 != psx_brB_BFC1ACF4); - psx_delay_BFC1ACF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ACF8: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032CF8u); -#endif - if (psx_delay_BFC1ACF4) { - psx_delay_BFC1ACF4 = 0; - if (psx_taken_BFC1ACF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D08u); - goto label_BFC1AD08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032CFCu); - } -label_BFC1ACFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ACFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ACFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ACFC: 10000001 beq $zero, $zero, 0xBFC1AD04 */ - uint32_t psx_brA_BFC1ACFC = cpu->gpr[0]; uint32_t psx_brB_BFC1ACFC = cpu->gpr[0]; - psx_taken_BFC1ACFC = (psx_brA_BFC1ACFC == psx_brB_BFC1ACFC); - psx_delay_BFC1ACFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1AD00: 240700CE addiu $a3, $zero, 206 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (206)); - PGXP_ALU(0x240700CEu, cpu->gpr[7], _pgx1, 0x000000CEu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D00u); -#endif - if (psx_delay_BFC1ACFC) { - psx_delay_BFC1ACFC = 0; - if (psx_taken_BFC1ACFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - goto label_BFC1AD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D04u); - } -label_BFC1AD04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD04: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032D04u); -#endif -label_BFC1AD08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1AD08: 10A10004 beq $a1, $at, 0xBFC1AD1C */ - uint32_t psx_brA_BFC1AD08 = cpu->gpr[5]; uint32_t psx_brB_BFC1AD08 = cpu->gpr[1]; - psx_taken_BFC1AD08 = (psx_brA_BFC1AD08 == psx_brB_BFC1AD08); - psx_delay_BFC1AD08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1AD0C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032D0Cu); -#endif - if (psx_delay_BFC1AD08) { - psx_delay_BFC1AD08 = 0; - if (psx_taken_BFC1AD08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D1Cu); - goto label_BFC1AD1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D10u); - } -label_BFC1AD10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD10: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1AD14: 14A10039 bne $a1, $at, 0xBFC1ADFC */ - uint32_t psx_brA_BFC1AD14 = cpu->gpr[5]; uint32_t psx_brB_BFC1AD14 = cpu->gpr[1]; - psx_taken_BFC1AD14 = (psx_brA_BFC1AD14 != psx_brB_BFC1AD14); - psx_delay_BFC1AD14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AD18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032D18u); -#endif - if (psx_delay_BFC1AD14) { - psx_delay_BFC1AD14 = 0; - if (psx_taken_BFC1AD14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DFCu); - goto label_BFC1ADFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D1Cu); - } -label_BFC1AD1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1AD1C: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D1Cu); return; } g_debug_last_store_pc = 0x80032D1Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1AD20: 27A40024 addiu $a0, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A40024u, cpu->gpr[4], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1AD24: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC1AD28: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AD2C: 0C00F6DD jal 0xB003DB74 */ - cpu->gpr[31] = 0x80032D34u; /* jal link before delay slot */ - psx_delay_BFC1AD2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC1AD30: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D30u); return; } g_debug_last_store_pc = 0x80032D30u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D30u); -#endif - if (psx_delay_BFC1AD2C) { - psx_delay_BFC1AD2C = 0; - cpu->gpr[31] = 0x80032D34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB74u); - cpu->pc = 0x8003DB74u; return; - } -label_BFC1AD34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AD34: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032D34u); -#endif - /* 0xBFC1AD38: 8CA56948 lw $a1, 26952($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D38u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA56948u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D38u); -#endif - /* 0xBFC1AD3C: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D3Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D40u); -#endif - /* 0xBFC1AD40: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D40u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD44: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1AD48: 10A10005 beq $a1, $at, 0xBFC1AD60 */ - uint32_t psx_brA_BFC1AD48 = cpu->gpr[5]; uint32_t psx_brB_BFC1AD48 = cpu->gpr[1]; - psx_taken_BFC1AD48 = (psx_brA_BFC1AD48 == psx_brB_BFC1AD48); - psx_delay_BFC1AD48 = 1; - /* 0xBFC1AD4C: 8FA2001C lw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D4Cu); -#endif - if (psx_delay_BFC1AD48) { - psx_delay_BFC1AD48 = 0; - if (psx_taken_BFC1AD48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D60u); - goto label_BFC1AD60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D50u); - } -label_BFC1AD50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D50u); -#endif - /* 0xBFC1AD50: 8FA2001C lw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AD54: 1000000D beq $zero, $zero, 0xBFC1AD8C */ - uint32_t psx_brA_BFC1AD54 = cpu->gpr[0]; uint32_t psx_brB_BFC1AD54 = cpu->gpr[0]; - psx_taken_BFC1AD54 = (psx_brA_BFC1AD54 == psx_brB_BFC1AD54); - psx_delay_BFC1AD54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD58: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D58u); -#endif - if (psx_delay_BFC1AD54) { - psx_delay_BFC1AD54 = 0; - if (psx_taken_BFC1AD54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D8Cu); - goto label_BFC1AD8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D5Cu); - } -label_BFC1AD5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D5Cu); -#endif - /* 0xBFC1AD5C: 8FA2001C lw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032D5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032D5Cu); -#endif -label_BFC1AD60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD60: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD64: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC1AD68: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1AD6C: 17000006 bne $t8, $zero, 0xBFC1AD88 */ - uint32_t psx_brA_BFC1AD6C = cpu->gpr[24]; uint32_t psx_brB_BFC1AD6C = cpu->gpr[0]; - psx_taken_BFC1AD6C = (psx_brA_BFC1AD6C != psx_brB_BFC1AD6C); - psx_delay_BFC1AD6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD70: 3C010002 lui $at, 0x2 */ - cpu->gpr[1] = 0x00020000u; - PGXP_ALU(0x3C010002u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032D70u); -#endif - if (psx_delay_BFC1AD6C) { - psx_delay_BFC1AD6C = 0; - if (psx_taken_BFC1AD6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D88u); - goto label_BFC1AD88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D74u); - } -label_BFC1AD74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD74: 34210002 ori $at, $at, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2u; - PGXP_ALU(0x34210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC1AD78: 0041C824 and $t9, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1AD7C: 17200003 bne $t9, $zero, 0xBFC1AD8C */ - uint32_t psx_brA_BFC1AD7C = cpu->gpr[25]; uint32_t psx_brB_BFC1AD7C = cpu->gpr[0]; - psx_taken_BFC1AD7C = (psx_brA_BFC1AD7C != psx_brB_BFC1AD7C); - psx_delay_BFC1AD7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD80: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D80u); -#endif - if (psx_delay_BFC1AD7C) { - psx_delay_BFC1AD7C = 0; - if (psx_taken_BFC1AD7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D8Cu); - goto label_BFC1AD8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D84u); - } -label_BFC1AD84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1AD84: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D84u); -#endif -label_BFC1AD88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AD88: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032D88u); -#endif -label_BFC1AD8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1AD8C: 14A1000A bne $a1, $at, 0xBFC1ADB8 */ - uint32_t psx_brA_BFC1AD8C = cpu->gpr[5]; uint32_t psx_brB_BFC1AD8C = cpu->gpr[1]; - psx_taken_BFC1AD8C = (psx_brA_BFC1AD8C != psx_brB_BFC1AD8C); - psx_delay_BFC1AD8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD90: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032D90u); -#endif - if (psx_delay_BFC1AD8C) { - psx_delay_BFC1AD8C = 0; - if (psx_taken_BFC1AD8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DB8u); - goto label_BFC1ADB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032D94u); - } -label_BFC1AD94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AD94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AD94: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC1AD98: 00414024 and $t0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1AD9C: 15000006 bne $t0, $zero, 0xBFC1ADB8 */ - uint32_t psx_brA_BFC1AD9C = cpu->gpr[8]; uint32_t psx_brB_BFC1AD9C = cpu->gpr[0]; - psx_taken_BFC1AD9C = (psx_brA_BFC1AD9C != psx_brB_BFC1AD9C); - psx_delay_BFC1AD9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1ADA0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032DA0u); -#endif - if (psx_delay_BFC1AD9C) { - psx_delay_BFC1AD9C = 0; - if (psx_taken_BFC1AD9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DB8u); - goto label_BFC1ADB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DA4u); - } -label_BFC1ADA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1ADA4: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x206u); -#endif - /* 0xBFC1ADA8: 00414824 and $t1, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00414824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1ADAC: 15200002 bne $t1, $zero, 0xBFC1ADB8 */ - uint32_t psx_brA_BFC1ADAC = cpu->gpr[9]; uint32_t psx_brB_BFC1ADAC = cpu->gpr[0]; - psx_taken_BFC1ADAC = (psx_brA_BFC1ADAC != psx_brB_BFC1ADAC); - psx_delay_BFC1ADAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ADB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032DB0u); -#endif - if (psx_delay_BFC1ADAC) { - psx_delay_BFC1ADAC = 0; - if (psx_taken_BFC1ADAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DB8u); - goto label_BFC1ADB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DB4u); - } -label_BFC1ADB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1ADB4: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032DB4u); -#endif -label_BFC1ADB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1ADB8: 10600010 beq $v1, $zero, 0xBFC1ADFC */ - uint32_t psx_brA_BFC1ADB8 = cpu->gpr[3]; uint32_t psx_brB_BFC1ADB8 = cpu->gpr[0]; - psx_taken_BFC1ADB8 = (psx_brA_BFC1ADB8 == psx_brB_BFC1ADB8); - psx_delay_BFC1ADB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ADBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032DBCu); -#endif - if (psx_delay_BFC1ADB8) { - psx_delay_BFC1ADB8 = 0; - if (psx_taken_BFC1ADB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DFCu); - goto label_BFC1ADFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DC0u); - } -label_BFC1ADC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1ADC0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032DC0u); -#endif - /* 0xBFC1ADC4: 8D4A9E4C lw $t2, -25012($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E4Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ADC8: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80032DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1ADCC: 1541000B bne $t2, $at, 0xBFC1ADFC */ - uint32_t psx_brA_BFC1ADCC = cpu->gpr[10]; uint32_t psx_brB_BFC1ADCC = cpu->gpr[1]; - psx_taken_BFC1ADCC = (psx_brA_BFC1ADCC != psx_brB_BFC1ADCC); - psx_delay_BFC1ADCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ADD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032DD0u); -#endif - if (psx_delay_BFC1ADCC) { - psx_delay_BFC1ADCC = 0; - if (psx_taken_BFC1ADCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DFCu); - goto label_BFC1ADFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032DD4u); - } -label_BFC1ADD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1ADD4: 24050033 addiu $a1, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24050033u, cpu->gpr[5], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80032DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1ADD8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1ADDC: AC256948 sw $a1, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DDCu); return; } g_debug_last_store_pc = 0x80032DDCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC256948u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1ADE0: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DE0u); return; } g_debug_last_store_pc = 0x80032DE0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1ADE4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ADE8: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80032DF0u; /* jal link before delay slot */ - psx_delay_BFC1ADE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC1ADEC: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DECu); return; } g_debug_last_store_pc = 0x80032DECu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DECu); -#endif - if (psx_delay_BFC1ADE8) { - psx_delay_BFC1ADE8 = 0; - cpu->gpr[31] = 0x80032DF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1ADF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DF0u); -#endif - /* 0xBFC1ADF0: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DF0u); -#endif - /* 0xBFC1ADF4: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032DF4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80032DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ADF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032DF8u); -#endif -label_BFC1ADFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ADFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ADFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1ADFC: 14600006 bne $v1, $zero, 0xBFC1AE18 */ - uint32_t psx_brA_BFC1ADFC = cpu->gpr[3]; uint32_t psx_brB_BFC1ADFC = cpu->gpr[0]; - psx_taken_BFC1ADFC = (psx_brA_BFC1ADFC != psx_brB_BFC1ADFC); - psx_delay_BFC1ADFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E00u); -#endif - /* 0xBFC1AE00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E00u); -#endif - if (psx_delay_BFC1ADFC) { - psx_delay_BFC1ADFC = 0; - if (psx_taken_BFC1ADFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E18u); - goto label_BFC1AE18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E04u); - } -label_BFC1AE04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1AE04: 10E00004 beq $a3, $zero, 0xBFC1AE18 */ - uint32_t psx_brA_BFC1AE04 = cpu->gpr[7]; uint32_t psx_brB_BFC1AE04 = cpu->gpr[0]; - psx_taken_BFC1AE04 = (psx_brA_BFC1AE04 == psx_brB_BFC1AE04); - psx_delay_BFC1AE04 = 1; - /* 0xBFC1AE08: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E08u); -#endif - if (psx_delay_BFC1AE04) { - psx_delay_BFC1AE04 = 0; - if (psx_taken_BFC1AE04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E18u); - goto label_BFC1AE18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E0Cu); - } -label_BFC1AE0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AE0C: 0C00C90C jal 0xB0032430 */ - cpu->gpr[31] = 0x80032E14u; /* jal link before delay slot */ - psx_delay_BFC1AE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC1AE10: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032E10u); -#endif - if (psx_delay_BFC1AE0C) { - psx_delay_BFC1AE0C = 0; - cpu->gpr[31] = 0x80032E14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032430u); - cpu->pc = 0x80032430u; return; - } -label_BFC1AE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E14u); -#endif - /* 0xBFC1AE14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E14u); -#endif -label_BFC1AE18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AE18: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80032E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1AE1C: 03E00008 jr $ra */ - psx_delay_BFC1AE1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AE20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032E20u); -#endif - if (psx_delay_BFC1AE1C) { - psx_delay_BFC1AE1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1AE24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1AE24u); - int psx_delay_BFC1AE2C = 0; -label_BFC1AE24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1AE24: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E24u); -#endif - /* 0xBFC1AE28: 8C429F68 lw $v0, -24728($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E28u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1AE2C: 03E00008 jr $ra */ - psx_delay_BFC1AE2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AE30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032E30u); -#endif - if (psx_delay_BFC1AE2C) { - psx_delay_BFC1AE2C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1AE34(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1AE34u); - int psx_delay_BFC1AE40 = 0; - int psx_taken_BFC1AE40 = 0; - int psx_delay_BFC1AE60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1AE48u: goto label_BFC1AE48; - case 0xBFC1AE60u: goto label_BFC1AE60; - default: break; - } - } -label_BFC1AE34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1AE34: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E34u); -#endif - /* 0xBFC1AE38: 8DCE9F74 lw $t6, -24716($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E38u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F74u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AE3C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80032E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1AE40: 15C10007 bne $t6, $at, 0xBFC1AE60 */ - uint32_t psx_brA_BFC1AE40 = cpu->gpr[14]; uint32_t psx_brB_BFC1AE40 = cpu->gpr[1]; - psx_taken_BFC1AE40 = (psx_brA_BFC1AE40 != psx_brB_BFC1AE40); - psx_delay_BFC1AE40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AE44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032E44u); -#endif - if (psx_delay_BFC1AE40) { - psx_delay_BFC1AE40 = 0; - if (psx_taken_BFC1AE40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E60u); - goto label_BFC1AE60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E48u); - } -label_BFC1AE48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1AE48: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80032E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AE4C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1AE50: AC2F9F74 sw $t7, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E50u); return; } g_debug_last_store_pc = 0x80032E50u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9F74u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AE54: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1AE58: 2418FFFF addiu $t8, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1AE5C: AC389F88 sw $t8, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E5Cu); return; } g_debug_last_store_pc = 0x80032E5Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389F88u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E5Cu); -#endif -label_BFC1AE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1AE60: 03E00008 jr $ra */ - psx_delay_BFC1AE60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AE64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032E64u); -#endif - if (psx_delay_BFC1AE60) { - psx_delay_BFC1AE60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1AE68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1AE68u); - int psx_delay_BFC1AE78 = 0; - int psx_delay_BFC1AE8C = 0; - int psx_taken_BFC1AE8C = 0; - int psx_delay_BFC1AEA0 = 0; - int psx_taken_BFC1AEA0 = 0; - int psx_delay_BFC1AEB4 = 0; - int psx_taken_BFC1AEB4 = 0; - int psx_delay_BFC1AEBC = 0; - int psx_delay_BFC1AEC8 = 0; - int psx_taken_BFC1AEC8 = 0; - int psx_delay_BFC1AEDC = 0; - int psx_taken_BFC1AEDC = 0; - int psx_delay_BFC1AEFC = 0; - int psx_taken_BFC1AEFC = 0; - int psx_delay_BFC1AF10 = 0; - int psx_taken_BFC1AF10 = 0; - int psx_delay_BFC1AF20 = 0; - int psx_taken_BFC1AF20 = 0; - int psx_delay_BFC1AF34 = 0; - int psx_taken_BFC1AF34 = 0; - int psx_delay_BFC1AF3C = 0; - int psx_taken_BFC1AF3C = 0; - int psx_delay_BFC1AF44 = 0; - int psx_taken_BFC1AF44 = 0; - int psx_delay_BFC1AF5C = 0; - int psx_taken_BFC1AF5C = 0; - int psx_delay_BFC1AF88 = 0; - int psx_taken_BFC1AF88 = 0; - int psx_delay_BFC1AF98 = 0; - int psx_taken_BFC1AF98 = 0; - int psx_delay_BFC1AFB0 = 0; - int psx_taken_BFC1AFB0 = 0; - int psx_delay_BFC1AFC4 = 0; - int psx_taken_BFC1AFC4 = 0; - int psx_delay_BFC1AFD8 = 0; - int psx_taken_BFC1AFD8 = 0; - int psx_delay_BFC1AFE0 = 0; - int psx_taken_BFC1AFE0 = 0; - int psx_delay_BFC1B008 = 0; - int psx_taken_BFC1B008 = 0; - int psx_delay_BFC1B014 = 0; - int psx_taken_BFC1B014 = 0; - int psx_delay_BFC1B04C = 0; - int psx_delay_BFC1B084 = 0; - int psx_taken_BFC1B084 = 0; - int psx_delay_BFC1B098 = 0; - int psx_taken_BFC1B098 = 0; - int psx_delay_BFC1B0A0 = 0; - int psx_taken_BFC1B0A0 = 0; - int psx_delay_BFC1B0A8 = 0; - int psx_taken_BFC1B0A8 = 0; - int psx_delay_BFC1B0B0 = 0; - int psx_taken_BFC1B0B0 = 0; - int psx_delay_BFC1B0C0 = 0; - int psx_taken_BFC1B0C0 = 0; - int psx_delay_BFC1B0CC = 0; - int psx_taken_BFC1B0CC = 0; - int psx_delay_BFC1B0DC = 0; - int psx_delay_BFC1B0F8 = 0; - int psx_taken_BFC1B0F8 = 0; - int psx_delay_BFC1B108 = 0; - int psx_taken_BFC1B108 = 0; - int psx_delay_BFC1B120 = 0; - int psx_taken_BFC1B120 = 0; - int psx_delay_BFC1B128 = 0; - int psx_taken_BFC1B128 = 0; - int psx_delay_BFC1B138 = 0; - int psx_delay_BFC1B16C = 0; - int psx_delay_BFC1B174 = 0; - int psx_taken_BFC1B174 = 0; - int psx_delay_BFC1B188 = 0; - int psx_taken_BFC1B188 = 0; - int psx_delay_BFC1B19C = 0; - int psx_taken_BFC1B19C = 0; - int psx_delay_BFC1B1A4 = 0; - int psx_taken_BFC1B1A4 = 0; - int psx_delay_BFC1B1AC = 0; - int psx_taken_BFC1B1AC = 0; - int psx_delay_BFC1B1D4 = 0; - int psx_delay_BFC1B1EC = 0; - int psx_taken_BFC1B1EC = 0; - int psx_delay_BFC1B218 = 0; - int psx_delay_BFC1B220 = 0; - int psx_taken_BFC1B220 = 0; - int psx_delay_BFC1B234 = 0; - int psx_taken_BFC1B234 = 0; - int psx_delay_BFC1B23C = 0; - int psx_taken_BFC1B23C = 0; - int psx_delay_BFC1B244 = 0; - int psx_taken_BFC1B244 = 0; - int psx_delay_BFC1B258 = 0; - int psx_taken_BFC1B258 = 0; - int psx_delay_BFC1B268 = 0; - int psx_taken_BFC1B268 = 0; - int psx_delay_BFC1B278 = 0; - int psx_delay_BFC1B28C = 0; - int psx_taken_BFC1B28C = 0; - int psx_delay_BFC1B2A4 = 0; - int psx_taken_BFC1B2A4 = 0; - int psx_delay_BFC1B2B0 = 0; - int psx_taken_BFC1B2B0 = 0; - int psx_delay_BFC1B2C0 = 0; - int psx_delay_BFC1B2DC = 0; - int psx_taken_BFC1B2DC = 0; - int psx_delay_BFC1B2E8 = 0; - int psx_delay_BFC1B300 = 0; - int psx_taken_BFC1B300 = 0; - int psx_delay_BFC1B314 = 0; - int psx_delay_BFC1B31C = 0; - int psx_taken_BFC1B31C = 0; - int psx_delay_BFC1B334 = 0; - int psx_delay_BFC1B33C = 0; - int psx_taken_BFC1B33C = 0; - int psx_delay_BFC1B350 = 0; - int psx_taken_BFC1B350 = 0; - int psx_delay_BFC1B364 = 0; - int psx_taken_BFC1B364 = 0; - int psx_delay_BFC1B370 = 0; - int psx_delay_BFC1B3AC = 0; - int psx_taken_BFC1B3AC = 0; - int psx_delay_BFC1B3C0 = 0; - int psx_delay_BFC1B3C8 = 0; - int psx_taken_BFC1B3C8 = 0; - int psx_delay_BFC1B3E0 = 0; - int psx_delay_BFC1B3E8 = 0; - int psx_taken_BFC1B3E8 = 0; - int psx_delay_BFC1B3F4 = 0; - int psx_taken_BFC1B3F4 = 0; - int psx_delay_BFC1B408 = 0; - int psx_taken_BFC1B408 = 0; - int psx_delay_BFC1B420 = 0; - int psx_taken_BFC1B420 = 0; - int psx_delay_BFC1B434 = 0; - int psx_taken_BFC1B434 = 0; - int psx_delay_BFC1B460 = 0; - int psx_taken_BFC1B460 = 0; - int psx_delay_BFC1B46C = 0; - int psx_delay_BFC1B474 = 0; - int psx_delay_BFC1B480 = 0; - int psx_delay_BFC1B49C = 0; - int psx_taken_BFC1B49C = 0; - int psx_delay_BFC1B4B4 = 0; - int psx_taken_BFC1B4B4 = 0; - int psx_delay_BFC1B4BC = 0; - int psx_delay_BFC1B4C8 = 0; - int psx_delay_BFC1B4E0 = 0; - int psx_taken_BFC1B4E0 = 0; - int psx_delay_BFC1B500 = 0; - int psx_taken_BFC1B500 = 0; - int psx_delay_BFC1B520 = 0; - int psx_taken_BFC1B520 = 0; - int psx_delay_BFC1B544 = 0; - int psx_taken_BFC1B544 = 0; - int psx_delay_BFC1B558 = 0; - int psx_taken_BFC1B558 = 0; - int psx_delay_BFC1B564 = 0; - int psx_delay_BFC1B594 = 0; - int psx_taken_BFC1B594 = 0; - int psx_delay_BFC1B59C = 0; - int psx_taken_BFC1B59C = 0; - int psx_delay_BFC1B5B4 = 0; - int psx_taken_BFC1B5B4 = 0; - int psx_delay_BFC1B5C0 = 0; - int psx_taken_BFC1B5C0 = 0; - int psx_delay_BFC1B5D8 = 0; - int psx_delay_BFC1B5F4 = 0; - int psx_taken_BFC1B5F4 = 0; - int psx_delay_BFC1B5FC = 0; - int psx_delay_BFC1B608 = 0; - int psx_delay_BFC1B610 = 0; - int psx_delay_BFC1B61C = 0; - int psx_delay_BFC1B624 = 0; - int psx_taken_BFC1B624 = 0; - int psx_delay_BFC1B654 = 0; - int psx_delay_BFC1B65C = 0; - int psx_delay_BFC1B668 = 0; - int psx_delay_BFC1B678 = 0; - int psx_taken_BFC1B678 = 0; - int psx_delay_BFC1B688 = 0; - int psx_delay_BFC1B690 = 0; - int psx_delay_BFC1B69C = 0; - int psx_delay_BFC1B6AC = 0; - int psx_taken_BFC1B6AC = 0; - int psx_delay_BFC1B6B4 = 0; - int psx_delay_BFC1B6C0 = 0; - int psx_delay_BFC1B6C8 = 0; - int psx_delay_BFC1B6D4 = 0; - int psx_delay_BFC1B6E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1AE80u: goto label_BFC1AE80; - case 0xBFC1AE94u: goto label_BFC1AE94; - case 0xBFC1AEA8u: goto label_BFC1AEA8; - case 0xBFC1AEBCu: goto label_BFC1AEBC; - case 0xBFC1AEC4u: goto label_BFC1AEC4; - case 0xBFC1AED0u: goto label_BFC1AED0; - case 0xBFC1AEE4u: goto label_BFC1AEE4; - case 0xBFC1AF04u: goto label_BFC1AF04; - case 0xBFC1AF18u: goto label_BFC1AF18; - case 0xBFC1AF28u: goto label_BFC1AF28; - case 0xBFC1AF3Cu: goto label_BFC1AF3C; - case 0xBFC1AF44u: goto label_BFC1AF44; - case 0xBFC1AF4Cu: goto label_BFC1AF4C; - case 0xBFC1AF50u: goto label_BFC1AF50; - case 0xBFC1AF64u: goto label_BFC1AF64; - case 0xBFC1AF90u: goto label_BFC1AF90; - case 0xBFC1AFA0u: goto label_BFC1AFA0; - case 0xBFC1AFB8u: goto label_BFC1AFB8; - case 0xBFC1AFCCu: goto label_BFC1AFCC; - case 0xBFC1AFDCu: goto label_BFC1AFDC; - case 0xBFC1AFE0u: goto label_BFC1AFE0; - case 0xBFC1AFE8u: goto label_BFC1AFE8; - case 0xBFC1B010u: goto label_BFC1B010; - case 0xBFC1B01Cu: goto label_BFC1B01C; - case 0xBFC1B054u: goto label_BFC1B054; - case 0xBFC1B06Cu: goto label_BFC1B06C; - case 0xBFC1B078u: goto label_BFC1B078; - case 0xBFC1B08Cu: goto label_BFC1B08C; - case 0xBFC1B0A0u: goto label_BFC1B0A0; - case 0xBFC1B0A8u: goto label_BFC1B0A8; - case 0xBFC1B0B0u: goto label_BFC1B0B0; - case 0xBFC1B0B8u: goto label_BFC1B0B8; - case 0xBFC1B0C8u: goto label_BFC1B0C8; - case 0xBFC1B0CCu: goto label_BFC1B0CC; - case 0xBFC1B0D4u: goto label_BFC1B0D4; - case 0xBFC1B0E4u: goto label_BFC1B0E4; - case 0xBFC1B100u: goto label_BFC1B100; - case 0xBFC1B110u: goto label_BFC1B110; - case 0xBFC1B11Cu: goto label_BFC1B11C; - case 0xBFC1B120u: goto label_BFC1B120; - case 0xBFC1B128u: goto label_BFC1B128; - case 0xBFC1B130u: goto label_BFC1B130; - case 0xBFC1B140u: goto label_BFC1B140; - case 0xBFC1B150u: goto label_BFC1B150; - case 0xBFC1B174u: goto label_BFC1B174; - case 0xBFC1B17Cu: goto label_BFC1B17C; - case 0xBFC1B190u: goto label_BFC1B190; - case 0xBFC1B1A4u: goto label_BFC1B1A4; - case 0xBFC1B1ACu: goto label_BFC1B1AC; - case 0xBFC1B1B4u: goto label_BFC1B1B4; - case 0xBFC1B1DCu: goto label_BFC1B1DC; - case 0xBFC1B1F4u: goto label_BFC1B1F4; - case 0xBFC1B200u: goto label_BFC1B200; - case 0xBFC1B220u: goto label_BFC1B220; - case 0xBFC1B228u: goto label_BFC1B228; - case 0xBFC1B23Cu: goto label_BFC1B23C; - case 0xBFC1B244u: goto label_BFC1B244; - case 0xBFC1B24Cu: goto label_BFC1B24C; - case 0xBFC1B260u: goto label_BFC1B260; - case 0xBFC1B270u: goto label_BFC1B270; - case 0xBFC1B274u: goto label_BFC1B274; - case 0xBFC1B280u: goto label_BFC1B280; - case 0xBFC1B294u: goto label_BFC1B294; - case 0xBFC1B2A0u: goto label_BFC1B2A0; - case 0xBFC1B2ACu: goto label_BFC1B2AC; - case 0xBFC1B2B0u: goto label_BFC1B2B0; - case 0xBFC1B2B8u: goto label_BFC1B2B8; - case 0xBFC1B2C8u: goto label_BFC1B2C8; - case 0xBFC1B2E4u: goto label_BFC1B2E4; - case 0xBFC1B2E8u: goto label_BFC1B2E8; - case 0xBFC1B2F0u: goto label_BFC1B2F0; - case 0xBFC1B308u: goto label_BFC1B308; - case 0xBFC1B31Cu: goto label_BFC1B31C; - case 0xBFC1B324u: goto label_BFC1B324; - case 0xBFC1B328u: goto label_BFC1B328; - case 0xBFC1B33Cu: goto label_BFC1B33C; - case 0xBFC1B344u: goto label_BFC1B344; - case 0xBFC1B358u: goto label_BFC1B358; - case 0xBFC1B36Cu: goto label_BFC1B36C; - case 0xBFC1B378u: goto label_BFC1B378; - case 0xBFC1B3B4u: goto label_BFC1B3B4; - case 0xBFC1B3C8u: goto label_BFC1B3C8; - case 0xBFC1B3D0u: goto label_BFC1B3D0; - case 0xBFC1B3D4u: goto label_BFC1B3D4; - case 0xBFC1B3E8u: goto label_BFC1B3E8; - case 0xBFC1B3F0u: goto label_BFC1B3F0; - case 0xBFC1B3FCu: goto label_BFC1B3FC; - case 0xBFC1B410u: goto label_BFC1B410; - case 0xBFC1B428u: goto label_BFC1B428; - case 0xBFC1B43Cu: goto label_BFC1B43C; - case 0xBFC1B460u: goto label_BFC1B460; - case 0xBFC1B468u: goto label_BFC1B468; - case 0xBFC1B474u: goto label_BFC1B474; - case 0xBFC1B47Cu: goto label_BFC1B47C; - case 0xBFC1B488u: goto label_BFC1B488; - case 0xBFC1B494u: goto label_BFC1B494; - case 0xBFC1B4A4u: goto label_BFC1B4A4; - case 0xBFC1B4BCu: goto label_BFC1B4BC; - case 0xBFC1B4C4u: goto label_BFC1B4C4; - case 0xBFC1B4D0u: goto label_BFC1B4D0; - case 0xBFC1B4E8u: goto label_BFC1B4E8; - case 0xBFC1B4F4u: goto label_BFC1B4F4; - case 0xBFC1B508u: goto label_BFC1B508; - case 0xBFC1B528u: goto label_BFC1B528; - case 0xBFC1B538u: goto label_BFC1B538; - case 0xBFC1B54Cu: goto label_BFC1B54C; - case 0xBFC1B560u: goto label_BFC1B560; - case 0xBFC1B56Cu: goto label_BFC1B56C; - case 0xBFC1B58Cu: goto label_BFC1B58C; - case 0xBFC1B59Cu: goto label_BFC1B59C; - case 0xBFC1B5A4u: goto label_BFC1B5A4; - case 0xBFC1B5BCu: goto label_BFC1B5BC; - case 0xBFC1B5C0u: goto label_BFC1B5C0; - case 0xBFC1B5C8u: goto label_BFC1B5C8; - case 0xBFC1B5E0u: goto label_BFC1B5E0; - case 0xBFC1B5ECu: goto label_BFC1B5EC; - case 0xBFC1B5FCu: goto label_BFC1B5FC; - case 0xBFC1B604u: goto label_BFC1B604; - case 0xBFC1B610u: goto label_BFC1B610; - case 0xBFC1B618u: goto label_BFC1B618; - case 0xBFC1B624u: goto label_BFC1B624; - case 0xBFC1B62Cu: goto label_BFC1B62C; - case 0xBFC1B654u: goto label_BFC1B654; - case 0xBFC1B65Cu: goto label_BFC1B65C; - case 0xBFC1B664u: goto label_BFC1B664; - case 0xBFC1B670u: goto label_BFC1B670; - case 0xBFC1B680u: goto label_BFC1B680; - case 0xBFC1B688u: goto label_BFC1B688; - case 0xBFC1B690u: goto label_BFC1B690; - case 0xBFC1B698u: goto label_BFC1B698; - case 0xBFC1B6A4u: goto label_BFC1B6A4; - case 0xBFC1B6B4u: goto label_BFC1B6B4; - case 0xBFC1B6BCu: goto label_BFC1B6BC; - case 0xBFC1B6C8u: goto label_BFC1B6C8; - case 0xBFC1B6D0u: goto label_BFC1B6D0; - case 0xBFC1B6DCu: goto label_BFC1B6DC; - case 0xBFC1B6E0u: goto label_BFC1B6E0; - default: break; - } - } -label_BFC1AE68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1AE68: 27BDFF50 addiu $sp, $sp, -176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-176)); - PGXP_ALU(0x27BDFF50u, cpu->gpr[29], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x80032E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1AE6C: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E6Cu); return; } g_debug_last_store_pc = 0x80032E6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1AE70: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1AE74: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E74u); return; } g_debug_last_store_pc = 0x80032E74u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AE78: 0C00D26D jal 0xB00349B4 */ - cpu->gpr[31] = 0x80032E80u; /* jal link before delay slot */ - psx_delay_BFC1AE78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1AE7C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032E7Cu); -#endif - if (psx_delay_BFC1AE78) { - psx_delay_BFC1AE78 = 0; - cpu->gpr[31] = 0x80032E80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349B4u); - cpu->pc = 0x800349B4u; return; - } -label_BFC1AE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AE80: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AE84: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80032E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14002u); -#endif - /* 0xBFC1AE88: 02017024 and $t6, $s0, $at */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[16] & cpu->gpr[1]; - PGXP_ALU(0x02017024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1AE8C: 11C00214 beq $t6, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1AE8C = cpu->gpr[14]; uint32_t psx_brB_BFC1AE8C = cpu->gpr[0]; - psx_taken_BFC1AE8C = (psx_brA_BFC1AE8C == psx_brB_BFC1AE8C); - psx_delay_BFC1AE8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E90u); -#endif - /* 0xBFC1AE90: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E90u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E90u); -#endif - if (psx_delay_BFC1AE8C) { - psx_delay_BFC1AE8C = 0; - if (psx_taken_BFC1AE8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E94u); - } -label_BFC1AE94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AE94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1AE94: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032E94u); -#endif - /* 0xBFC1AE98: 8DEF9DF8 lw $t7, -25096($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032E98u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80032E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AE9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1AEA0: 15E0020F bne $t7, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1AEA0 = cpu->gpr[15]; uint32_t psx_brB_BFC1AEA0 = cpu->gpr[0]; - psx_taken_BFC1AEA0 = (psx_brA_BFC1AEA0 != psx_brB_BFC1AEA0); - psx_delay_BFC1AEA0 = 1; - /* 0xBFC1AEA4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032EA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EA4u); -#endif - if (psx_delay_BFC1AEA0) { - psx_delay_BFC1AEA0 = 0; - if (psx_taken_BFC1AEA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032EA8u); - } -label_BFC1AEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1AEA8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032EA8u); -#endif - /* 0xBFC1AEAC: 8F189DF4 lw $t8, -25100($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032EACu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AEB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1AEB4: 1700020A bne $t8, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1AEB4 = cpu->gpr[24]; uint32_t psx_brB_BFC1AEB4 = cpu->gpr[0]; - psx_taken_BFC1AEB4 = (psx_brA_BFC1AEB4 != psx_brB_BFC1AEB4); - psx_delay_BFC1AEB4 = 1; - /* 0xBFC1AEB8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032EB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EB8u); -#endif - if (psx_delay_BFC1AEB4) { - psx_delay_BFC1AEB4 = 0; - if (psx_taken_BFC1AEB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032EBCu); - } -label_BFC1AEBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AEBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1AEBC: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x80032EC4u; /* jal link before delay slot */ - psx_delay_BFC1AEBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AEC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032EC0u); -#endif - if (psx_delay_BFC1AEBC) { - psx_delay_BFC1AEBC = 0; - cpu->gpr[31] = 0x80032EC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC1AEC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AEC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1AEC4: 28410015 slti $at, $v0, 21 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0); - PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80032EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AEC8: 10200149 beq $at, $zero, 0xBFC1B3F0 */ - uint32_t psx_brA_BFC1AEC8 = cpu->gpr[1]; uint32_t psx_brB_BFC1AEC8 = cpu->gpr[0]; - psx_taken_BFC1AEC8 = (psx_brA_BFC1AEC8 == psx_brB_BFC1AEC8); - psx_delay_BFC1AEC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1AECC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032ECCu); -#endif - if (psx_delay_BFC1AEC8) { - psx_delay_BFC1AEC8 = 0; - if (psx_taken_BFC1AEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333F0u); - goto label_BFC1B3F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032ED0u); - } -label_BFC1AED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1AED0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032ED0u); -#endif - /* 0xBFC1AED4: 8F399F74 lw $t9, -24716($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032ED4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80032ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AED8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1AEDC: 17200009 bne $t9, $zero, 0xBFC1AF04 */ - uint32_t psx_brA_BFC1AEDC = cpu->gpr[25]; uint32_t psx_brB_BFC1AEDC = cpu->gpr[0]; - psx_taken_BFC1AEDC = (psx_brA_BFC1AEDC != psx_brB_BFC1AEDC); - psx_delay_BFC1AEDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AEE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032EE0u); -#endif - if (psx_delay_BFC1AEDC) { - psx_delay_BFC1AEDC = 0; - if (psx_taken_BFC1AEDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F04u); - goto label_BFC1AF04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032EE4u); - } -label_BFC1AEE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AEE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1AEE4: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AEE8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1AEEC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032EF0u); -#endif - /* 0xBFC1AEF0: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EF0u); -#endif - /* 0xBFC1AEF4: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EF4u); -#endif - /* 0xBFC1AEF8: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032EF8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AEFC: 1000005E beq $zero, $zero, 0xBFC1B078 */ - uint32_t psx_brA_BFC1AEFC = cpu->gpr[0]; uint32_t psx_brB_BFC1AEFC = cpu->gpr[0]; - psx_taken_BFC1AEFC = (psx_brA_BFC1AEFC == psx_brB_BFC1AEFC); - psx_delay_BFC1AEFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1AF00: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032F00u); -#endif - if (psx_delay_BFC1AEFC) { - psx_delay_BFC1AEFC = 0; - if (psx_taken_BFC1AEFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033078u); - goto label_BFC1B078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F04u); - } -label_BFC1AF04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1AF04: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F04u); -#endif - /* 0xBFC1AF08: 8D089F78 lw $t0, -24712($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032F08u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089F78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1AF10: 15000005 bne $t0, $zero, 0xBFC1AF28 */ - uint32_t psx_brA_BFC1AF10 = cpu->gpr[8]; uint32_t psx_brB_BFC1AF10 = cpu->gpr[0]; - psx_taken_BFC1AF10 = (psx_brA_BFC1AF10 != psx_brB_BFC1AF10); - psx_delay_BFC1AF10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F14u); -#endif - if (psx_delay_BFC1AF10) { - psx_delay_BFC1AF10 = 0; - if (psx_taken_BFC1AF10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F28u); - goto label_BFC1AF28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F18u); - } -label_BFC1AF18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1AF18: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F18u); -#endif - /* 0xBFC1AF1C: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032F1Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF20: 10000006 beq $zero, $zero, 0xBFC1AF3C */ - uint32_t psx_brA_BFC1AF20 = cpu->gpr[0]; uint32_t psx_brB_BFC1AF20 = cpu->gpr[0]; - psx_taken_BFC1AF20 = (psx_brA_BFC1AF20 == psx_brB_BFC1AF20); - psx_delay_BFC1AF20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1AF24: 2841000B slti $at, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0); - PGXP_ALU(0x2841000Bu, cpu->gpr[1], _pgx1, 0x000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032F24u); -#endif - if (psx_delay_BFC1AF20) { - psx_delay_BFC1AF20 = 0; - if (psx_taken_BFC1AF20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F3Cu); - goto label_BFC1AF3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F28u); - } -label_BFC1AF28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1AF28: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F28u); -#endif - /* 0xBFC1AF2C: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032F2Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AF30: 24010063 addiu $at, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24010063u, cpu->gpr[1], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80032F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1AF34: 10C101E9 beq $a2, $at, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1AF34 = cpu->gpr[6]; uint32_t psx_brB_BFC1AF34 = cpu->gpr[1]; - psx_taken_BFC1AF34 = (psx_brA_BFC1AF34 == psx_brB_BFC1AF34); - psx_delay_BFC1AF34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1AF38: 2841000B slti $at, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (11) ? 1 : 0); - PGXP_ALU(0x2841000Bu, cpu->gpr[1], _pgx1, 0x000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80032F38u); -#endif - if (psx_delay_BFC1AF34) { - psx_delay_BFC1AF34 = 0; - if (psx_taken_BFC1AF34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F3Cu); - } -label_BFC1AF3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AF3C: 102001E7 beq $at, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1AF3C = cpu->gpr[1]; uint32_t psx_brB_BFC1AF3C = cpu->gpr[0]; - psx_taken_BFC1AF3C = (psx_brA_BFC1AF3C == psx_brB_BFC1AF3C); - psx_delay_BFC1AF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AF40: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80032F40u); -#endif - if (psx_delay_BFC1AF3C) { - psx_delay_BFC1AF3C = 0; - if (psx_taken_BFC1AF3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F44u); - } -label_BFC1AF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1AF44: 14410002 bne $v0, $at, 0xBFC1AF50 */ - uint32_t psx_brA_BFC1AF44 = cpu->gpr[2]; uint32_t psx_brB_BFC1AF44 = cpu->gpr[1]; - psx_taken_BFC1AF44 = (psx_brA_BFC1AF44 != psx_brB_BFC1AF44); - psx_delay_BFC1AF44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F48u); -#endif - if (psx_delay_BFC1AF44) { - psx_delay_BFC1AF44 = 0; - if (psx_taken_BFC1AF44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F50u); - goto label_BFC1AF50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F4Cu); - } -label_BFC1AF4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1AF4C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032F4Cu); -#endif -label_BFC1AF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1AF50: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F50u); -#endif - /* 0xBFC1AF54: 8D299F88 lw $t1, -24696($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24696; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032F54u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299F88u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1AF58: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80032F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC1AF5C: 11300022 beq $t1, $s0, 0xBFC1AFE8 */ - uint32_t psx_brA_BFC1AF5C = cpu->gpr[9]; uint32_t psx_brB_BFC1AF5C = cpu->gpr[16]; - psx_taken_BFC1AF5C = (psx_brA_BFC1AF5C == psx_brB_BFC1AF5C); - psx_delay_BFC1AF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F60u); -#endif - if (psx_delay_BFC1AF5C) { - psx_delay_BFC1AF5C = 0; - if (psx_taken_BFC1AF5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FE8u); - goto label_BFC1AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F64u); - } -label_BFC1AF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1AF64: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80032F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AF68: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AF6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1AF70: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032F70u); -#endif - /* 0xBFC1AF74: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1AF78: AC239F8C sw $v1, -24692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032F78u); return; } g_debug_last_store_pc = 0x80032F78u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239F8Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1AF7C: 000A5040 sll $t2, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 1u; - PGXP_ALU(0x000A5040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80032F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1AF80: 01431821 addu $v1, $t2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[10] + cpu->gpr[3]; - PGXP_ALU(0x01431821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC1AF84: 00A3082B sltu $at, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AF88: 10200005 beq $at, $zero, 0xBFC1AFA0 */ - uint32_t psx_brA_BFC1AF88 = cpu->gpr[1]; uint32_t psx_brB_BFC1AF88 = cpu->gpr[0]; - psx_taken_BFC1AF88 = (psx_brA_BFC1AF88 == psx_brB_BFC1AF88); - psx_delay_BFC1AF88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F8Cu); -#endif - if (psx_delay_BFC1AF88) { - psx_delay_BFC1AF88 = 0; - if (psx_taken_BFC1AF88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FA0u); - goto label_BFC1AFA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032F90u); - } -label_BFC1AF90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AF90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1AF90: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032F90u); -#endif - /* 0xBFC1AF94: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF98: 10000037 beq $zero, $zero, 0xBFC1B078 */ - uint32_t psx_brA_BFC1AF98 = cpu->gpr[0]; uint32_t psx_brB_BFC1AF98 = cpu->gpr[0]; - psx_taken_BFC1AF98 = (psx_brA_BFC1AF98 == psx_brB_BFC1AF98); - psx_delay_BFC1AF98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AF9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032F9Cu); -#endif - if (psx_delay_BFC1AF98) { - psx_delay_BFC1AF98 = 0; - if (psx_taken_BFC1AF98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033078u); - goto label_BFC1B078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FA0u); - } -label_BFC1AFA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1AFA0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FA0u); -#endif - /* 0xBFC1AFA4: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC1AFAC: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1AFB0: 14200031 bne $at, $zero, 0xBFC1B078 */ - uint32_t psx_brA_BFC1AFB0 = cpu->gpr[1]; uint32_t psx_brB_BFC1AFB0 = cpu->gpr[0]; - psx_taken_BFC1AFB0 = (psx_brA_BFC1AFB0 != psx_brB_BFC1AFB0); - psx_delay_BFC1AFB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032FB4u); -#endif - if (psx_delay_BFC1AFB0) { - psx_delay_BFC1AFB0 = 0; - if (psx_taken_BFC1AFB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033078u); - goto label_BFC1B078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FB8u); - } -label_BFC1AFB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1AFB8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FB8u); -#endif - /* 0xBFC1AFBC: 8D6B9F88 lw $t3, -24696($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24696; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032FBCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F88u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1AFC4: 15600005 bne $t3, $zero, 0xBFC1AFDC */ - uint32_t psx_brA_BFC1AFC4 = cpu->gpr[11]; uint32_t psx_brB_BFC1AFC4 = cpu->gpr[0]; - psx_taken_BFC1AFC4 = (psx_brA_BFC1AFC4 != psx_brB_BFC1AFC4); - psx_delay_BFC1AFC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032FC8u); -#endif - if (psx_delay_BFC1AFC4) { - psx_delay_BFC1AFC4 = 0; - if (psx_taken_BFC1AFC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FDCu); - goto label_BFC1AFDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FCCu); - } -label_BFC1AFCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1AFCC: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FD0u); -#endif - /* 0xBFC1AFD0: 8D8C9F8C lw $t4, -24692($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24692; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032FD0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9F8Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80032FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1AFD8: 11800027 beq $t4, $zero, 0xBFC1B078 */ - uint32_t psx_brA_BFC1AFD8 = cpu->gpr[12]; uint32_t psx_brB_BFC1AFD8 = cpu->gpr[0]; - psx_taken_BFC1AFD8 = (psx_brA_BFC1AFD8 == psx_brB_BFC1AFD8); - psx_delay_BFC1AFD8 = 1; -label_BFC1AFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AFDC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FDCu); -#endif - if (psx_delay_BFC1AFD8) { - psx_delay_BFC1AFD8 = 0; - if (psx_taken_BFC1AFD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033078u); - goto label_BFC1B078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FE0u); - } -label_BFC1AFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1AFE0: 10000025 beq $zero, $zero, 0xBFC1B078 */ - uint32_t psx_brA_BFC1AFE0 = cpu->gpr[0]; uint32_t psx_brB_BFC1AFE0 = cpu->gpr[0]; - psx_taken_BFC1AFE0 = (psx_brA_BFC1AFE0 == psx_brB_BFC1AFE0); - psx_delay_BFC1AFE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1AFE4: AC309F88 sw $s0, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032FE4u); return; } g_debug_last_store_pc = 0x80032FE4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309F88u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FE4u); -#endif - if (psx_delay_BFC1AFE0) { - psx_delay_BFC1AFE0 = 0; - if (psx_taken_BFC1AFE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033078u); - goto label_BFC1B078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032FE8u); - } -label_BFC1AFE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1AFE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1AFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1AFE8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1AFEC: 00031080 sll $v0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00031080u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80032FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80032FF0u); -#endif - /* 0xBFC1AFF0: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1AFF4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80032FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1AFF8: 00431021 addu $v0, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[3]; - PGXP_ALU(0x00431021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80032FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1AFFC: AC239F88 sw $v1, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032FFCu); return; } g_debug_last_store_pc = 0x80032FFCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239F88u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80032FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1B000: 00021040 sll $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00021040u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80033000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC1B004: 00A2082B sltu $at, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B008: 10200004 beq $at, $zero, 0xBFC1B01C */ - uint32_t psx_brA_BFC1B008 = cpu->gpr[1]; uint32_t psx_brB_BFC1B008 = cpu->gpr[0]; - psx_taken_BFC1B008 = (psx_brA_BFC1B008 == psx_brB_BFC1B008); - psx_delay_BFC1B008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B00C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003300Cu); -#endif - if (psx_delay_BFC1B008) { - psx_delay_BFC1B008 = 0; - if (psx_taken_BFC1B008) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003301Cu); - goto label_BFC1B01C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033010u); - } -label_BFC1B010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B010: AC309F88 sw $s0, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033010u); return; } g_debug_last_store_pc = 0x80033010u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309F88u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B014: 10000015 beq $zero, $zero, 0xBFC1B06C */ - uint32_t psx_brA_BFC1B014 = cpu->gpr[0]; uint32_t psx_brB_BFC1B014 = cpu->gpr[0]; - psx_taken_BFC1B014 = (psx_brA_BFC1B014 == psx_brB_BFC1B014); - psx_delay_BFC1B014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1B018: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033018u); -#endif - if (psx_delay_BFC1B014) { - psx_delay_BFC1B014 = 0; - if (psx_taken_BFC1B014) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003306Cu); - goto label_BFC1B06C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003301Cu); - } -label_BFC1B01C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B01Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1B01C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033020u); -#endif - /* 0xBFC1B020: 8DAD9F64 lw $t5, -24732($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033020u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9F64u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80033020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B024: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1B028: AC2D9E6C sw $t5, -24980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033028u); return; } g_debug_last_store_pc = 0x80033028u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E6Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80033028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B02C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003302Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1B030: 240E0004 addiu $t6, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240E0004u, cpu->gpr[14], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1B034: AC2E9F64 sw $t6, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033034u); return; } g_debug_last_store_pc = 0x80033034u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F64u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B038: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1B03C: AC229E68 sw $v0, -24984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003303Cu); return; } g_debug_last_store_pc = 0x8003303Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003303Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B040: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1B044: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1B048: AC2F9F74 sw $t7, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033048u); return; } g_debug_last_store_pc = 0x80033048u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9F74u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B04C: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80033054u; /* jal link before delay slot */ - psx_delay_BFC1B04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B050: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033050u); return; } g_debug_last_store_pc = 0x80033050u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033050u); -#endif - if (psx_delay_BFC1B04C) { - psx_delay_BFC1B04C = 0; - cpu->gpr[31] = 0x80033054u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1B054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B054: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B058: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033058u); -#endif - /* 0xBFC1B05C: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003305Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003305Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033060u); -#endif - /* 0xBFC1B060: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033060u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033060u); -#endif - /* 0xBFC1B064: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033068u); -#endif -label_BFC1B06C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B06Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B06C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033070u); -#endif - /* 0xBFC1B070: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033074u); -#endif -label_BFC1B078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1B078: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033078u); -#endif - /* 0xBFC1B07C: 8F189F78 lw $t8, -24712($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003307Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F78u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003307Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1B084: 13000068 beq $t8, $zero, 0xBFC1B228 */ - uint32_t psx_brA_BFC1B084 = cpu->gpr[24]; uint32_t psx_brB_BFC1B084 = cpu->gpr[0]; - psx_taken_BFC1B084 = (psx_brA_BFC1B084 == psx_brB_BFC1B084); - psx_delay_BFC1B084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033088u); -#endif - if (psx_delay_BFC1B084) { - psx_delay_BFC1B084 = 0; - if (psx_taken_BFC1B084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033228u); - goto label_BFC1B228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003308Cu); - } -label_BFC1B08C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B08Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1B08C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033090u); -#endif - /* 0xBFC1B090: 8F399F74 lw $t9, -24716($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033090u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1B098: 17200038 bne $t9, $zero, 0xBFC1B17C */ - uint32_t psx_brA_BFC1B098 = cpu->gpr[25]; uint32_t psx_brB_BFC1B098 = cpu->gpr[0]; - psx_taken_BFC1B098 = (psx_brA_BFC1B098 != psx_brB_BFC1B098); - psx_delay_BFC1B098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC1B09C: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003309Cu); -#endif - if (psx_delay_BFC1B098) { - psx_delay_BFC1B098 = 0; - if (psx_taken_BFC1B098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003317Cu); - goto label_BFC1B17C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330A0u); - } -label_BFC1B0A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B0A0: 1420018E bne $at, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1B0A0 = cpu->gpr[1]; uint32_t psx_brB_BFC1B0A0 = cpu->gpr[0]; - psx_taken_BFC1B0A0 = (psx_brA_BFC1B0A0 != psx_brB_BFC1B0A0); - psx_delay_BFC1B0A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC1B0A4: 00A3082B sltu $at, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330A4u); -#endif - if (psx_delay_BFC1B0A0) { - psx_delay_BFC1B0A0 = 0; - if (psx_taken_BFC1B0A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330A8u); - } -label_BFC1B0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B0A8: 1420018D bne $at, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B0A8 = cpu->gpr[1]; uint32_t psx_brB_BFC1B0A8 = cpu->gpr[0]; - psx_taken_BFC1B0A8 = (psx_brA_BFC1B0A8 != psx_brB_BFC1B0A8); - psx_delay_BFC1B0A8 = 1; - /* 0xBFC1B0AC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800330ACu); -#endif - if (psx_delay_BFC1B0A8) { - psx_delay_BFC1B0A8 = 0; - if (psx_taken_BFC1B0A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330B0u); - } -label_BFC1B0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1B0B0: 14C0001B bne $a2, $zero, 0xBFC1B120 */ - uint32_t psx_brA_BFC1B0B0 = cpu->gpr[6]; uint32_t psx_brB_BFC1B0B0 = cpu->gpr[0]; - psx_taken_BFC1B0B0 = (psx_brA_BFC1B0B0 != psx_brB_BFC1B0B0); - psx_delay_BFC1B0B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B0B4: 28C10063 slti $at, $a2, 99 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0); - PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); } -#ifdef PSX_COSIM - cosim_instr(0x800330B4u); -#endif - if (psx_delay_BFC1B0B0) { - psx_delay_BFC1B0B0 = 0; - if (psx_taken_BFC1B0B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033120u); - goto label_BFC1B120; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330B8u); - } -label_BFC1B0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B0B8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC1B0BC: 00A2082B sltu $at, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B0C0: 14200016 bne $at, $zero, 0xBFC1B11C */ - uint32_t psx_brA_BFC1B0C0 = cpu->gpr[1]; uint32_t psx_brB_BFC1B0C0 = cpu->gpr[0]; - psx_taken_BFC1B0C0 = (psx_brA_BFC1B0C0 != psx_brB_BFC1B0C0); - psx_delay_BFC1B0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1B0C4: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330C4u); -#endif - if (psx_delay_BFC1B0C0) { - psx_delay_BFC1B0C0 = 0; - if (psx_taken_BFC1B0C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003311Cu); - goto label_BFC1B11C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330C8u); - } -label_BFC1B0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B0C8: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800330C8u); -#endif -label_BFC1B0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B0CC: 10200014 beq $at, $zero, 0xBFC1B120 */ - uint32_t psx_brA_BFC1B0CC = cpu->gpr[1]; uint32_t psx_brB_BFC1B0CC = cpu->gpr[0]; - psx_taken_BFC1B0CC = (psx_brA_BFC1B0CC == psx_brB_BFC1B0CC); - psx_delay_BFC1B0CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B0D0: 28C10063 slti $at, $a2, 99 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0); - PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); } -#ifdef PSX_COSIM - cosim_instr(0x800330D0u); -#endif - if (psx_delay_BFC1B0CC) { - psx_delay_BFC1B0CC = 0; - if (psx_taken_BFC1B0CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033120u); - goto label_BFC1B120; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330D4u); - } -label_BFC1B0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B0D4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B0D8: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800330D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B0DC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800330E4u; /* jal link before delay slot */ - psx_delay_BFC1B0DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B0E0: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330E0u); return; } g_debug_last_store_pc = 0x800330E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800330E0u); -#endif - if (psx_delay_BFC1B0DC) { - psx_delay_BFC1B0DC = 0; - cpu->gpr[31] = 0x800330E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B0E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B0E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B0E4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800330E4u); -#endif - /* 0xBFC1B0E8: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800330E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B0EC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800330ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800330F0u); -#endif - /* 0xBFC1B0F0: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800330F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC1B0F4: 00B0082B sltu $at, $a1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800330F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B0F8: 14200005 bne $at, $zero, 0xBFC1B110 */ - uint32_t psx_brA_BFC1B0F8 = cpu->gpr[1]; uint32_t psx_brB_BFC1B0F8 = cpu->gpr[0]; - psx_taken_BFC1B0F8 = (psx_brA_BFC1B0F8 != psx_brB_BFC1B0F8); - psx_delay_BFC1B0F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B0FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800330FCu); -#endif - if (psx_delay_BFC1B0F8) { - psx_delay_BFC1B0F8 = 0; - if (psx_taken_BFC1B0F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033110u); - goto label_BFC1B110; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033100u); - } -label_BFC1B100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B100: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033100u); -#endif - /* 0xBFC1B104: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033104u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B108: 1000FFF0 beq $zero, $zero, 0xBFC1B0CC */ - uint32_t psx_brA_BFC1B108 = cpu->gpr[0]; uint32_t psx_brB_BFC1B108 = cpu->gpr[0]; - psx_taken_BFC1B108 = (psx_brA_BFC1B108 == psx_brB_BFC1B108); - psx_delay_BFC1B108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B10C: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x8003310Cu); -#endif - if (psx_delay_BFC1B108) { - psx_delay_BFC1B108 = 0; - if (psx_taken_BFC1B108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800330CCu); - goto label_BFC1B0CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033110u); - } -label_BFC1B110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B110: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033110u); -#endif - /* 0xBFC1B114: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033114u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033118u); -#endif -label_BFC1B11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B11C: 28C10063 slti $at, $a2, 99 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0); - PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); } -#ifdef PSX_COSIM - cosim_instr(0x8003311Cu); -#endif -label_BFC1B120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B120: 1020016E beq $at, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1B120 = cpu->gpr[1]; uint32_t psx_brB_BFC1B120 = cpu->gpr[0]; - psx_taken_BFC1B120 = (psx_brA_BFC1B120 == psx_brB_BFC1B120); - psx_delay_BFC1B120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B124: 28610015 slti $at, $v1, 21 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0); - PGXP_ALU(0x28610015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033124u); -#endif - if (psx_delay_BFC1B120) { - psx_delay_BFC1B120 = 0; - if (psx_taken_BFC1B120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033128u); - } -label_BFC1B128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B128: 10200009 beq $at, $zero, 0xBFC1B150 */ - uint32_t psx_brA_BFC1B128 = cpu->gpr[1]; uint32_t psx_brB_BFC1B128 = cpu->gpr[0]; - psx_taken_BFC1B128 = (psx_brA_BFC1B128 == psx_brB_BFC1B128); - psx_delay_BFC1B128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B12C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003312Cu); -#endif - if (psx_delay_BFC1B128) { - psx_delay_BFC1B128 = 0; - if (psx_taken_BFC1B128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033150u); - goto label_BFC1B150; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033130u); - } -label_BFC1B130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B130: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B134: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B138: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033140u; /* jal link before delay slot */ - psx_delay_BFC1B138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B13C: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003313Cu); return; } g_debug_last_store_pc = 0x8003313Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003313Cu); -#endif - if (psx_delay_BFC1B138) { - psx_delay_BFC1B138 = 0; - cpu->gpr[31] = 0x80033140u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B140: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033140u); -#endif - /* 0xBFC1B144: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033144u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033144u); -#endif - /* 0xBFC1B148: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033148u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B14C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003314Cu); -#endif -label_BFC1B150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B150: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC1B154: 00064080 sll $t0, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00064080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B158: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1B15C: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003315Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B160: AC23D0F0 sw $v1, -12048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -12048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033160u); return; } g_debug_last_store_pc = 0x80033160u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23D0F0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B164: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B168: AC269F7C sw $a2, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033168u); return; } g_debug_last_store_pc = 0x80033168u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC269F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B16C: 0C00D2EB jal 0xB0034BAC */ - cpu->gpr[31] = 0x80033174u; /* jal link before delay slot */ - psx_delay_BFC1B16C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B170: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033170u); -#endif - if (psx_delay_BFC1B16C) { - psx_delay_BFC1B16C = 0; - cpu->gpr[31] = 0x80033174u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BACu); - cpu->pc = 0x80034BACu; return; - } -label_BFC1B174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B174: 1000015A beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B174 = cpu->gpr[0]; uint32_t psx_brB_BFC1B174 = cpu->gpr[0]; - psx_taken_BFC1B174 = (psx_brA_BFC1B174 == psx_brB_BFC1B174); - psx_delay_BFC1B174 = 1; - /* 0xBFC1B178: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033178u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033178u); -#endif - if (psx_delay_BFC1B174) { - psx_delay_BFC1B174 = 0; - if (psx_taken_BFC1B174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003317Cu); - } -label_BFC1B17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1B17C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033180u); -#endif - /* 0xBFC1B180: 8D299F74 lw $t1, -24716($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033180u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299F74u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80033180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1B188: 11200155 beq $t1, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B188 = cpu->gpr[9]; uint32_t psx_brB_BFC1B188 = cpu->gpr[0]; - psx_taken_BFC1B188 = (psx_brA_BFC1B188 == psx_brB_BFC1B188); - psx_delay_BFC1B188 = 1; - /* 0xBFC1B18C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003318Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003318Cu); -#endif - if (psx_delay_BFC1B188) { - psx_delay_BFC1B188 = 0; - if (psx_taken_BFC1B188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033190u); - } -label_BFC1B190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1B190: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033190u); -#endif - /* 0xBFC1B194: 8D4A9F88 lw $t2, -24696($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24696; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033194u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F88u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80033194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B198: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC1B19C: 15500150 bne $t2, $s0, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B19C = cpu->gpr[10]; uint32_t psx_brB_BFC1B19C = cpu->gpr[16]; - psx_taken_BFC1B19C = (psx_brA_BFC1B19C != psx_brB_BFC1B19C); - psx_delay_BFC1B19C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331A0u); -#endif - /* 0xBFC1B1A0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800331A0u); -#endif - if (psx_delay_BFC1B19C) { - psx_delay_BFC1B19C = 0; - if (psx_taken_BFC1B19C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800331A4u); - } -label_BFC1B1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1B1A4: 1060014D beq $v1, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1B1A4 = cpu->gpr[3]; uint32_t psx_brB_BFC1B1A4 = cpu->gpr[0]; - psx_taken_BFC1B1A4 = (psx_brA_BFC1B1A4 == psx_brB_BFC1B1A4); - psx_delay_BFC1B1A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B1A8: 28C10063 slti $at, $a2, 99 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (99) ? 1 : 0); - PGXP_ALU(0x28C10063u, cpu->gpr[1], _pgx1, 0x0063u); } -#ifdef PSX_COSIM - cosim_instr(0x800331A8u); -#endif - if (psx_delay_BFC1B1A4) { - psx_delay_BFC1B1A4 = 0; - if (psx_taken_BFC1B1A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800331ACu); - } -label_BFC1B1AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B1ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B1AC: 1020014C beq $at, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B1AC = cpu->gpr[1]; uint32_t psx_brB_BFC1B1AC = cpu->gpr[0]; - psx_taken_BFC1B1AC = (psx_brA_BFC1B1AC == psx_brB_BFC1B1AC); - psx_delay_BFC1B1AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331B0u); -#endif - /* 0xBFC1B1B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800331B0u); -#endif - if (psx_delay_BFC1B1AC) { - psx_delay_BFC1B1AC = 0; - if (psx_taken_BFC1B1AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800331B4u); - } -label_BFC1B1B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B1B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B1B4: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800331B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC1B1B8: 00065880 sll $t3, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00065880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800331B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B1BC: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800331BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1B1C0: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800331C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B1C4: AC23D0F0 sw $v1, -12048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -12048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331C4u); return; } g_debug_last_store_pc = 0x800331C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23D0F0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800331C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B1C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800331C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1B1CC: AC269F7C sw $a2, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331CCu); return; } g_debug_last_store_pc = 0x800331CCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC269F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800331CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B1D0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800331D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B1D4: 0C00D2EB jal 0xB0034BAC */ - cpu->gpr[31] = 0x800331DCu; /* jal link before delay slot */ - psx_delay_BFC1B1D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B1D8: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331D8u); return; } g_debug_last_store_pc = 0x800331D8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800331D8u); -#endif - if (psx_delay_BFC1B1D4) { - psx_delay_BFC1B1D4 = 0; - cpu->gpr[31] = 0x800331DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BACu); - cpu->pc = 0x80034BACu; return; - } -label_BFC1B1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1B1DC: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800331DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331E0u); -#endif - /* 0xBFC1B1E0: 8D8C6948 lw $t4, 26952($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331E0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800331E0u); -#endif - /* 0xBFC1B1E4: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800331E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B1E8: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800331E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1B1EC: 11810004 beq $t4, $at, 0xBFC1B200 */ - uint32_t psx_brA_BFC1B1EC = cpu->gpr[12]; uint32_t psx_brB_BFC1B1EC = cpu->gpr[1]; - psx_taken_BFC1B1EC = (psx_brA_BFC1B1EC == psx_brB_BFC1B1EC); - psx_delay_BFC1B1EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B1F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800331F0u); -#endif - if (psx_delay_BFC1B1EC) { - psx_delay_BFC1B1EC = 0; - if (psx_taken_BFC1B1EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033200u); - goto label_BFC1B200; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800331F4u); - } -label_BFC1B1F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B1F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800331F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B1F4: AC239E68 sw $v1, -24984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331F4u); return; } g_debug_last_store_pc = 0x800331F4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E68u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800331F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B1F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800331F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B1FC: AC239E50 sw $v1, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331FCu); return; } g_debug_last_store_pc = 0x800331FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800331FCu); -#endif -label_BFC1B200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1B200: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B204: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B208: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033208u); -#endif - /* 0xBFC1B20C: 8DCE9E6C lw $t6, -24980($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003320Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E6Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003320Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1B210: AC2D9F74 sw $t5, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033210u); return; } g_debug_last_store_pc = 0x80033210u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9F74u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80033210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B214: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B218: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80033220u; /* jal link before delay slot */ - psx_delay_BFC1B218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1B21C: AC2E9F64 sw $t6, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003321Cu); return; } g_debug_last_store_pc = 0x8003321Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F64u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003321Cu); -#endif - if (psx_delay_BFC1B218) { - psx_delay_BFC1B218 = 0; - cpu->gpr[31] = 0x80033220u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1B220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B220: 1000012F beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B220 = cpu->gpr[0]; uint32_t psx_brB_BFC1B220 = cpu->gpr[0]; - psx_taken_BFC1B220 = (psx_brA_BFC1B220 == psx_brB_BFC1B220); - psx_delay_BFC1B220 = 1; - /* 0xBFC1B224: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033224u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033224u); -#endif - if (psx_delay_BFC1B220) { - psx_delay_BFC1B220 = 0; - if (psx_taken_BFC1B220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033228u); - } -label_BFC1B228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B228: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033228u); -#endif - /* 0xBFC1B22C: 8DEF9F70 lw $t7, -24720($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003322Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F70u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B230: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1B234: 15E00129 bne $t7, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1B234 = cpu->gpr[15]; uint32_t psx_brB_BFC1B234 = cpu->gpr[0]; - psx_taken_BFC1B234 = (psx_brA_BFC1B234 != psx_brB_BFC1B234); - psx_delay_BFC1B234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC1B238: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033238u); -#endif - if (psx_delay_BFC1B234) { - psx_delay_BFC1B234 = 0; - if (psx_taken_BFC1B234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003323Cu); - } -label_BFC1B23C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B23Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B23C: 14200127 bne $at, $zero, 0xBFC1B6DC */ - uint32_t psx_brA_BFC1B23C = cpu->gpr[1]; uint32_t psx_brB_BFC1B23C = cpu->gpr[0]; - psx_taken_BFC1B23C = (psx_brA_BFC1B23C != psx_brB_BFC1B23C); - psx_delay_BFC1B23C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC1B240: 00A3082B sltu $at, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033240u); -#endif - if (psx_delay_BFC1B23C) { - psx_delay_BFC1B23C = 0; - if (psx_taken_BFC1B23C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336DCu); - goto label_BFC1B6DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033244u); - } -label_BFC1B244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B244: 14200126 bne $at, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B244 = cpu->gpr[1]; uint32_t psx_brB_BFC1B244 = cpu->gpr[0]; - psx_taken_BFC1B244 = (psx_brA_BFC1B244 != psx_brB_BFC1B244); - psx_delay_BFC1B244 = 1; - /* 0xBFC1B248: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033248u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033248u); -#endif - if (psx_delay_BFC1B244) { - psx_delay_BFC1B244 = 0; - if (psx_taken_BFC1B244) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003324Cu); - } -label_BFC1B24C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B24Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1B24C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033250u); -#endif - /* 0xBFC1B250: 8F189F74 lw $t8, -24716($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033250u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1B258: 1700003A bne $t8, $zero, 0xBFC1B344 */ - uint32_t psx_brA_BFC1B258 = cpu->gpr[24]; uint32_t psx_brB_BFC1B258 = cpu->gpr[0]; - psx_taken_BFC1B258 = (psx_brA_BFC1B258 != psx_brB_BFC1B258); - psx_delay_BFC1B258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B25C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003325Cu); -#endif - if (psx_delay_BFC1B258) { - psx_delay_BFC1B258 = 0; - if (psx_taken_BFC1B258) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033344u); - goto label_BFC1B344; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033260u); - } -label_BFC1B260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B260: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC1B264: 0043082A slt $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B268: 1020000D beq $at, $zero, 0xBFC1B2A0 */ - uint32_t psx_brA_BFC1B268 = cpu->gpr[1]; uint32_t psx_brB_BFC1B268 = cpu->gpr[0]; - psx_taken_BFC1B268 = (psx_brA_BFC1B268 == psx_brB_BFC1B268); - psx_delay_BFC1B268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1B26C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003326Cu); -#endif - if (psx_delay_BFC1B268) { - psx_delay_BFC1B268 = 0; - if (psx_taken_BFC1B268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332A0u); - goto label_BFC1B2A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033270u); - } -label_BFC1B270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B270: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033270u); -#endif -label_BFC1B274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B274: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B278: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033280u; /* jal link before delay slot */ - psx_delay_BFC1B278 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B27C: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003327Cu); return; } g_debug_last_store_pc = 0x8003327Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003327Cu); -#endif - if (psx_delay_BFC1B278) { - psx_delay_BFC1B278 = 0; - cpu->gpr[31] = 0x80033280u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033280u); -#endif - /* 0xBFC1B280: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033280u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B284: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000Au); -#endif - /* 0xBFC1B288: 0203082A slt $at, $s0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0203082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B28C: 1420FFF9 bne $at, $zero, 0xBFC1B274 */ - uint32_t psx_brA_BFC1B28C = cpu->gpr[1]; uint32_t psx_brB_BFC1B28C = cpu->gpr[0]; - psx_taken_BFC1B28C = (psx_brA_BFC1B28C != psx_brB_BFC1B28C); - psx_delay_BFC1B28C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B290: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033290u); -#endif - if (psx_delay_BFC1B28C) { - psx_delay_BFC1B28C = 0; - if (psx_taken_BFC1B28C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033274u); - goto label_BFC1B274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033294u); - } -label_BFC1B294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B294: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033294u); -#endif - /* 0xBFC1B298: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B29C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003329Cu); -#endif -label_BFC1B2A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC1B2A0: 00A3082B sltu $at, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00A3082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B2A4: 1420000F bne $at, $zero, 0xBFC1B2E4 */ - uint32_t psx_brA_BFC1B2A4 = cpu->gpr[1]; uint32_t psx_brB_BFC1B2A4 = cpu->gpr[0]; - psx_taken_BFC1B2A4 = (psx_brA_BFC1B2A4 != psx_brB_BFC1B2A4); - psx_delay_BFC1B2A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC1B2A8: 00608021 addu $s0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332A8u); -#endif - if (psx_delay_BFC1B2A4) { - psx_delay_BFC1B2A4 = 0; - if (psx_taken_BFC1B2A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332E4u); - goto label_BFC1B2E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332ACu); - } -label_BFC1B2AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B2AC: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800332ACu); -#endif -label_BFC1B2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B2B0: 1020000D beq $at, $zero, 0xBFC1B2E8 */ - uint32_t psx_brA_BFC1B2B0 = cpu->gpr[1]; uint32_t psx_brB_BFC1B2B0 = cpu->gpr[0]; - psx_taken_BFC1B2B0 = (psx_brA_BFC1B2B0 == psx_brB_BFC1B2B0); - psx_delay_BFC1B2B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B2B4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332B4u); -#endif - if (psx_delay_BFC1B2B0) { - psx_delay_BFC1B2B0 = 0; - if (psx_taken_BFC1B2B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332E8u); - goto label_BFC1B2E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332B8u); - } -label_BFC1B2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B2B8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B2BC: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800332BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B2C0: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800332C8u; /* jal link before delay slot */ - psx_delay_BFC1B2C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B2C4: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332C4u); return; } g_debug_last_store_pc = 0x800332C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800332C4u); -#endif - if (psx_delay_BFC1B2C0) { - psx_delay_BFC1B2C0 = 0; - cpu->gpr[31] = 0x800332C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B2C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B2C8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800332C8u); -#endif - /* 0xBFC1B2CC: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800332CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B2D0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800332D0u); -#endif - /* 0xBFC1B2D4: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800332D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC1B2D8: 00B0082B sltu $at, $a1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B2DC: 1020FFF4 beq $at, $zero, 0xBFC1B2B0 */ - uint32_t psx_brA_BFC1B2DC = cpu->gpr[1]; uint32_t psx_brB_BFC1B2DC = cpu->gpr[0]; - psx_taken_BFC1B2DC = (psx_brA_BFC1B2DC == psx_brB_BFC1B2DC); - psx_delay_BFC1B2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B2E0: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800332E0u); -#endif - if (psx_delay_BFC1B2DC) { - psx_delay_BFC1B2DC = 0; - if (psx_taken_BFC1B2DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332B0u); - goto label_BFC1B2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800332E4u); - } -label_BFC1B2E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B2E4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800332E4u); -#endif -label_BFC1B2E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B2E8: 0C00CDE1 jal 0xB0033784 */ - cpu->gpr[31] = 0x800332F0u; /* jal link before delay slot */ - psx_delay_BFC1B2E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B2EC: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332ECu); return; } g_debug_last_store_pc = 0x800332ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800332ECu); -#endif - if (psx_delay_BFC1B2E8) { - psx_delay_BFC1B2E8 = 0; - cpu->gpr[31] = 0x800332F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033784u); - cpu->pc = 0x80033784u; return; - } -label_BFC1B2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800332F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1B2F0: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800332F0u); -#endif - /* 0xBFC1B2F4: 8F396948 lw $t9, 26952($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332F4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396948u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800332F4u); -#endif - /* 0xBFC1B2F8: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800332F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B2FC: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800332FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1B300: 17210009 bne $t9, $at, 0xBFC1B328 */ - uint32_t psx_brA_BFC1B300 = cpu->gpr[25]; uint32_t psx_brB_BFC1B300 = cpu->gpr[1]; - psx_taken_BFC1B300 = (psx_brA_BFC1B300 != psx_brB_BFC1B300); - psx_delay_BFC1B300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC1B304: 00034080 sll $t0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033304u); -#endif - if (psx_delay_BFC1B300) { - psx_delay_BFC1B300 = 0; - if (psx_taken_BFC1B300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033328u); - goto label_BFC1B328; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033308u); - } -label_BFC1B308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1B308: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B30C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1B310: AC229E5C sw $v0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033310u); return; } g_debug_last_store_pc = 0x80033310u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B314: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x8003331Cu; /* jal link before delay slot */ - psx_delay_BFC1B314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B318: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033318u); -#endif - if (psx_delay_BFC1B314) { - psx_delay_BFC1B314 = 0; - cpu->gpr[31] = 0x8003331Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1B31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003331Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B31C: 100000F0 beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B31C = cpu->gpr[0]; uint32_t psx_brB_BFC1B31C = cpu->gpr[0]; - psx_taken_BFC1B31C = (psx_brA_BFC1B31C == psx_brB_BFC1B31C); - psx_delay_BFC1B31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033320u); -#endif - /* 0xBFC1B320: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033320u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033320u); -#endif - if (psx_delay_BFC1B31C) { - psx_delay_BFC1B31C = 0; - if (psx_taken_BFC1B31C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033324u); - } -label_BFC1B324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC1B324: 00034080 sll $t0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033324u); -#endif -label_BFC1B328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B328: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC1B32C: 00882021 addu $a0, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00882021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033330u); -#endif - /* 0xBFC1B330: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033330u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B334: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x8003333Cu; /* jal link before delay slot */ - psx_delay_BFC1B334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B338: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033338u); -#endif - if (psx_delay_BFC1B334) { - psx_delay_BFC1B334 = 0; - cpu->gpr[31] = 0x8003333Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1B33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003333Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B33C: 100000E8 beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B33C = cpu->gpr[0]; uint32_t psx_brB_BFC1B33C = cpu->gpr[0]; - psx_taken_BFC1B33C = (psx_brA_BFC1B33C == psx_brB_BFC1B33C); - psx_delay_BFC1B33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033340u); -#endif - /* 0xBFC1B340: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033340u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033340u); -#endif - if (psx_delay_BFC1B33C) { - psx_delay_BFC1B33C = 0; - if (psx_taken_BFC1B33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033344u); - } -label_BFC1B344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1B344: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033344u); -#endif - /* 0xBFC1B348: 8D299F74 lw $t1, -24716($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033348u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299F74u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80033348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B34C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003334Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1B350: 112000E3 beq $t1, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B350 = cpu->gpr[9]; uint32_t psx_brB_BFC1B350 = cpu->gpr[0]; - psx_taken_BFC1B350 = (psx_brA_BFC1B350 == psx_brB_BFC1B350); - psx_delay_BFC1B350 = 1; - /* 0xBFC1B354: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033354u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033354u); -#endif - if (psx_delay_BFC1B350) { - psx_delay_BFC1B350 = 0; - if (psx_taken_BFC1B350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033358u); - } -label_BFC1B358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1B358: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033358u); -#endif - /* 0xBFC1B35C: 8D4A9F88 lw $t2, -24696($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24696; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003335Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F88u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B360: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC1B364: 155000DE bne $t2, $s0, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B364 = cpu->gpr[10]; uint32_t psx_brB_BFC1B364 = cpu->gpr[16]; - psx_taken_BFC1B364 = (psx_brA_BFC1B364 != psx_brB_BFC1B364); - psx_delay_BFC1B364 = 1; - /* 0xBFC1B368: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033368u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033368u); -#endif - if (psx_delay_BFC1B364) { - psx_delay_BFC1B364 = 0; - if (psx_taken_BFC1B364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003336Cu); - } -label_BFC1B36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B36C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B370: 0C00CDE1 jal 0xB0033784 */ - cpu->gpr[31] = 0x80033378u; /* jal link before delay slot */ - psx_delay_BFC1B370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B374: AFA300A8 sw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033374u); return; } g_debug_last_store_pc = 0x80033374u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033374u); -#endif - if (psx_delay_BFC1B370) { - psx_delay_BFC1B370 = 0; - cpu->gpr[31] = 0x80033378u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033784u); - cpu->pc = 0x80033784u; return; - } -label_BFC1B378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033378u); -#endif - /* 0xBFC1B378: 8FA300A8 lw $v1, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033378u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B37C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B380: AC239E68 sw $v1, -24984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033380u); return; } g_debug_last_store_pc = 0x80033380u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E68u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B384: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1B388: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1B38C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003338Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033390u); -#endif - /* 0xBFC1B390: 8D8C9E6C lw $t4, -24980($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033390u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E6Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80033390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1B394: AC2B9F74 sw $t3, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033394u); return; } g_debug_last_store_pc = 0x80033394u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9F74u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80033394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B398: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1B39C: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003339Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333A0u); -#endif - /* 0xBFC1B3A0: 8DAD6948 lw $t5, 26952($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333A0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD6948u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800333A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1B3A4: AC2C9F64 sw $t4, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333A4u); return; } g_debug_last_store_pc = 0x800333A4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9F64u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800333A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B3A8: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800333A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1B3AC: 15A10009 bne $t5, $at, 0xBFC1B3D4 */ - uint32_t psx_brA_BFC1B3AC = cpu->gpr[13]; uint32_t psx_brB_BFC1B3AC = cpu->gpr[1]; - psx_taken_BFC1B3AC = (psx_brA_BFC1B3AC != psx_brB_BFC1B3AC); - psx_delay_BFC1B3AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC1B3B0: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800333B0u); -#endif - if (psx_delay_BFC1B3AC) { - psx_delay_BFC1B3AC = 0; - if (psx_taken_BFC1B3AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333D4u); - goto label_BFC1B3D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333B4u); - } -label_BFC1B3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1B3B4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800333B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B3B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800333B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1B3BC: AC229E5C sw $v0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333BCu); return; } g_debug_last_store_pc = 0x800333BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800333BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B3C0: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x800333C8u; /* jal link before delay slot */ - psx_delay_BFC1B3C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B3C4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800333C4u); -#endif - if (psx_delay_BFC1B3C0) { - psx_delay_BFC1B3C0 = 0; - cpu->gpr[31] = 0x800333C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1B3C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B3C8: 100000C5 beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B3C8 = cpu->gpr[0]; uint32_t psx_brB_BFC1B3C8 = cpu->gpr[0]; - psx_taken_BFC1B3C8 = (psx_brA_BFC1B3C8 == psx_brB_BFC1B3C8); - psx_delay_BFC1B3C8 = 1; - /* 0xBFC1B3CC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800333CCu); -#endif - if (psx_delay_BFC1B3C8) { - psx_delay_BFC1B3C8 = 0; - if (psx_taken_BFC1B3C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333D0u); - } -label_BFC1B3D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC1B3D0: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800333D0u); -#endif -label_BFC1B3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B3D4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800333D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1B3D8: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800333D8u); -#endif - /* 0xBFC1B3DC: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800333DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B3E0: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x800333E8u; /* jal link before delay slot */ - psx_delay_BFC1B3E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B3E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800333E4u); -#endif - if (psx_delay_BFC1B3E0) { - psx_delay_BFC1B3E0 = 0; - cpu->gpr[31] = 0x800333E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1B3E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B3E8: 100000BD beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B3E8 = cpu->gpr[0]; uint32_t psx_brB_BFC1B3E8 = cpu->gpr[0]; - psx_taken_BFC1B3E8 = (psx_brA_BFC1B3E8 == psx_brB_BFC1B3E8); - psx_delay_BFC1B3E8 = 1; - /* 0xBFC1B3EC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800333ECu); -#endif - if (psx_delay_BFC1B3E8) { - psx_delay_BFC1B3E8 = 0; - if (psx_taken_BFC1B3E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333F0u); - } -label_BFC1B3F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B3F0: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x800333F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1B3F4: 144100BA bne $v0, $at, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B3F4 = cpu->gpr[2]; uint32_t psx_brB_BFC1B3F4 = cpu->gpr[1]; - psx_taken_BFC1B3F4 = (psx_brA_BFC1B3F4 != psx_brB_BFC1B3F4); - psx_delay_BFC1B3F4 = 1; - /* 0xBFC1B3F8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800333F8u); -#endif - if (psx_delay_BFC1B3F4) { - psx_delay_BFC1B3F4 = 0; - if (psx_taken_BFC1B3F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800333FCu); - } -label_BFC1B3FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B3FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800333FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B3FC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800333FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033400u); -#endif - /* 0xBFC1B400: 8DEF9F70 lw $t7, -24720($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033400u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F70u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B404: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1B408: 15E000B5 bne $t7, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B408 = cpu->gpr[15]; uint32_t psx_brB_BFC1B408 = cpu->gpr[0]; - psx_taken_BFC1B408 = (psx_brA_BFC1B408 != psx_brB_BFC1B408); - psx_delay_BFC1B408 = 1; - /* 0xBFC1B40C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003340Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003340Cu); -#endif - if (psx_delay_BFC1B408) { - psx_delay_BFC1B408 = 0; - if (psx_taken_BFC1B408) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033410u); - } -label_BFC1B410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B410: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033410u); -#endif - /* 0xBFC1B414: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B418: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1B41C: 2CA10015 sltiu $at, $a1, 21 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000015u ? 1 : 0); - PGXP_ALU(0x2CA10015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x8003341Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B420: 142000AF bne $at, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B420 = cpu->gpr[1]; uint32_t psx_brB_BFC1B420 = cpu->gpr[0]; - psx_taken_BFC1B420 = (psx_brA_BFC1B420 != psx_brB_BFC1B420); - psx_delay_BFC1B420 = 1; - /* 0xBFC1B424: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033424u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033424u); -#endif - if (psx_delay_BFC1B420) { - psx_delay_BFC1B420 = 0; - if (psx_taken_BFC1B420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033428u); - } -label_BFC1B428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1B428: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033428u); -#endif - /* 0xBFC1B42C: 8F189F74 lw $t8, -24716($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003342Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003342Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B430: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1B434: 1300007D beq $t8, $zero, 0xBFC1B62C */ - uint32_t psx_brA_BFC1B434 = cpu->gpr[24]; uint32_t psx_brB_BFC1B434 = cpu->gpr[0]; - psx_taken_BFC1B434 = (psx_brA_BFC1B434 == psx_brB_BFC1B434); - psx_delay_BFC1B434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B438: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033438u); -#endif - if (psx_delay_BFC1B434) { - psx_delay_BFC1B434 = 0; - if (psx_taken_BFC1B434) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003362Cu); - goto label_BFC1B62C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003343Cu); - } -label_BFC1B43C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B43Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1B43C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033440u); -#endif - /* 0xBFC1B440: 8F399E6C lw $t9, -24980($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033440u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E6Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B444: AC209F74 sw $zero, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033444u); return; } g_debug_last_store_pc = 0x80033444u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B448: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1B44C: AC399F64 sw $t9, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003344Cu); return; } g_debug_last_store_pc = 0x8003344Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F64u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003344Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B450: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B454: AC209E68 sw $zero, -24984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033454u); return; } g_debug_last_store_pc = 0x80033454u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1B458: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC1B45C: 00B0082B sltu $at, $a1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003345Cu); -#endif -label_BFC1B460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B460: 1420000C bne $at, $zero, 0xBFC1B494 */ - uint32_t psx_brA_BFC1B460 = cpu->gpr[1]; uint32_t psx_brB_BFC1B460 = cpu->gpr[0]; - psx_taken_BFC1B460 = (psx_brA_BFC1B460 != psx_brB_BFC1B460); - psx_delay_BFC1B460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033464u); -#endif - if (psx_delay_BFC1B460) { - psx_delay_BFC1B460 = 0; - if (psx_taken_BFC1B460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033494u); - goto label_BFC1B494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033468u); - } -label_BFC1B468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B468: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B46C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033474u; /* jal link before delay slot */ - psx_delay_BFC1B46C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B470: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033470u); -#endif - if (psx_delay_BFC1B46C) { - psx_delay_BFC1B46C = 0; - cpu->gpr[31] = 0x80033474u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B474: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003347Cu; /* jal link before delay slot */ - psx_delay_BFC1B474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B478: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033478u); -#endif - if (psx_delay_BFC1B474) { - psx_delay_BFC1B474 = 0; - cpu->gpr[31] = 0x8003347Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B47C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B47Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B47C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B480: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033488u; /* jal link before delay slot */ - psx_delay_BFC1B480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B484: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80033484u); -#endif - if (psx_delay_BFC1B480) { - psx_delay_BFC1B480 = 0; - cpu->gpr[31] = 0x80033488u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B488: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033488u); -#endif - /* 0xBFC1B48C: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B490: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033490u); -#endif -label_BFC1B494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B494: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B498: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B49C: 1601FFF0 bne $s0, $at, 0xBFC1B460 */ - uint32_t psx_brA_BFC1B49C = cpu->gpr[16]; uint32_t psx_brB_BFC1B49C = cpu->gpr[1]; - psx_taken_BFC1B49C = (psx_brA_BFC1B49C != psx_brB_BFC1B49C); - psx_delay_BFC1B49C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC1B4A0: 00B0082B sltu $at, $a1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x00B0082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800334A0u); -#endif - if (psx_delay_BFC1B49C) { - psx_delay_BFC1B49C = 0; - if (psx_taken_BFC1B49C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033460u); - goto label_BFC1B460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800334A4u); - } -label_BFC1B4A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B4A4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800334A4u); -#endif - /* 0xBFC1B4A8: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800334A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1B4AC: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800334ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B4B0: 2C810002 sltiu $at, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2C810002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800334B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B4B4: 1420000F bne $at, $zero, 0xBFC1B4F4 */ - uint32_t psx_brA_BFC1B4B4 = cpu->gpr[1]; uint32_t psx_brB_BFC1B4B4 = cpu->gpr[0]; - psx_taken_BFC1B4B4 = (psx_brA_BFC1B4B4 != psx_brB_BFC1B4B4); - psx_delay_BFC1B4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B4B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800334B8u); -#endif - if (psx_delay_BFC1B4B4) { - psx_delay_BFC1B4B4 = 0; - if (psx_taken_BFC1B4B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800334F4u); - goto label_BFC1B4F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800334BCu); - } -label_BFC1B4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B4BC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800334C4u; /* jal link before delay slot */ - psx_delay_BFC1B4BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B4C0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800334C0u); -#endif - if (psx_delay_BFC1B4BC) { - psx_delay_BFC1B4BC = 0; - cpu->gpr[31] = 0x800334C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B4C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B4C4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800334C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B4C8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800334D0u; /* jal link before delay slot */ - psx_delay_BFC1B4C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B4CC: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800334CCu); -#endif - if (psx_delay_BFC1B4C8) { - psx_delay_BFC1B4C8 = 0; - cpu->gpr[31] = 0x800334D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B4D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B4D0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800334D0u); -#endif - /* 0xBFC1B4D4: 90849E70 lbu $a0, -24976($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24976; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24976)), 4, 0x10u); - PGXP_LOAD(0x90849E70u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800334D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B4D8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800334D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10012u); -#endif - /* 0xBFC1B4DC: 0204082B sltu $at, $s0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800334DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B4E0: 1420FFF6 bne $at, $zero, 0xBFC1B4BC */ - uint32_t psx_brA_BFC1B4E0 = cpu->gpr[1]; uint32_t psx_brB_BFC1B4E0 = cpu->gpr[0]; - psx_taken_BFC1B4E0 = (psx_brA_BFC1B4E0 != psx_brB_BFC1B4E0); - psx_delay_BFC1B4E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B4E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800334E4u); -#endif - if (psx_delay_BFC1B4E0) { - psx_delay_BFC1B4E0 = 0; - if (psx_taken_BFC1B4E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800334BCu); - goto label_BFC1B4BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800334E8u); - } -label_BFC1B4E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B4E8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800334E8u); -#endif - /* 0xBFC1B4EC: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800334ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B4F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800334F0u); -#endif -label_BFC1B4F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B4F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800334F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1B4F4: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800334F4u); -#endif - /* 0xBFC1B4F8: 8D089F78 lw $t0, -24712($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334F8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089F78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800334F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B4FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800334FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1B500: 11000028 beq $t0, $zero, 0xBFC1B5A4 */ - uint32_t psx_brA_BFC1B500 = cpu->gpr[8]; uint32_t psx_brB_BFC1B500 = cpu->gpr[0]; - psx_taken_BFC1B500 = (psx_brA_BFC1B500 == psx_brB_BFC1B500); - psx_delay_BFC1B500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033504u); -#endif - if (psx_delay_BFC1B500) { - psx_delay_BFC1B500 = 0; - if (psx_taken_BFC1B500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335A4u); - goto label_BFC1B5A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033508u); - } -label_BFC1B508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B508: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033508u); -#endif - /* 0xBFC1B50C: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003350Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1B510: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033510u); -#endif - /* 0xBFC1B514: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033514u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC1B518: 24C50001 addiu $a1, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC1B51C: 0045082A slt $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B520: 10200036 beq $at, $zero, 0xBFC1B5FC */ - uint32_t psx_brA_BFC1B520 = cpu->gpr[1]; uint32_t psx_brB_BFC1B520 = cpu->gpr[0]; - psx_taken_BFC1B520 = (psx_brA_BFC1B520 == psx_brB_BFC1B520); - psx_delay_BFC1B520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1B524: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033524u); -#endif - if (psx_delay_BFC1B520) { - psx_delay_BFC1B520 = 0; - if (psx_taken_BFC1B520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335FCu); - goto label_BFC1B5FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033528u); - } -label_BFC1B528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1B528: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1B52C: 254AD0F0 addiu $t2, $t2, -12048 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-12048)); - PGXP_ALU(0x254AD0F0u, cpu->gpr[10], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC1B530: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC1B534: 012A1821 addu $v1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033534u); -#endif -label_BFC1B538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033538u); -#endif - /* 0xBFC1B538: 8C640000 lw $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033538u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x8C640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B53C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003353Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B540: 28810015 slti $at, $a0, 21 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0); - PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B544: 14200006 bne $at, $zero, 0xBFC1B560 */ - uint32_t psx_brA_BFC1B544 = cpu->gpr[1]; uint32_t psx_brB_BFC1B544 = cpu->gpr[0]; - psx_taken_BFC1B544 = (psx_brA_BFC1B544 != psx_brB_BFC1B544); - psx_delay_BFC1B544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B548: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033548u); -#endif - if (psx_delay_BFC1B544) { - psx_delay_BFC1B544 = 0; - if (psx_taken_BFC1B544) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033560u); - goto label_BFC1B560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003354Cu); - } -label_BFC1B54C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B54Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1B54C: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1B550: 258CD0F0 addiu $t4, $t4, -12048 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-12048)); - PGXP_ALU(0x258CD0F0u, cpu->gpr[12], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC1B554: 00055880 sll $t3, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00055880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B558: 1000000C beq $zero, $zero, 0xBFC1B58C */ - uint32_t psx_brA_BFC1B558 = cpu->gpr[0]; uint32_t psx_brB_BFC1B558 = cpu->gpr[0]; - psx_taken_BFC1B558 = (psx_brA_BFC1B558 == psx_brB_BFC1B558); - psx_delay_BFC1B558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC1B55C: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003355Cu); -#endif - if (psx_delay_BFC1B558) { - psx_delay_BFC1B558 = 0; - if (psx_taken_BFC1B558) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003358Cu); - goto label_BFC1B58C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033560u); - } -label_BFC1B560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B560: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B564: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003356Cu; /* jal link before delay slot */ - psx_delay_BFC1B564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1B568: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033568u); return; } g_debug_last_store_pc = 0x80033568u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033568u); -#endif - if (psx_delay_BFC1B564) { - psx_delay_BFC1B564 = 0; - cpu->gpr[31] = 0x8003356Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B56C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B56Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1B56C: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033570u); -#endif - /* 0xBFC1B570: 8CC69F7C lw $a2, -24708($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033570u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69F7Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80033570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B574: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC1B578: 24C50001 addiu $a1, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC1B57C: 00056880 sll $t5, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00056880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B580: 25CED0F0 addiu $t6, $t6, -12048 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-12048)); - PGXP_ALU(0x25CED0F0u, cpu->gpr[14], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033580u); -#endif - /* 0xBFC1B584: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033584u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC1B588: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033588u); -#endif -label_BFC1B58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1B58C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC1B590: 0062082B sltu $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B594: 1420FFE8 bne $at, $zero, 0xBFC1B538 */ - uint32_t psx_brA_BFC1B594 = cpu->gpr[1]; uint32_t psx_brB_BFC1B594 = cpu->gpr[0]; - psx_taken_BFC1B594 = (psx_brA_BFC1B594 != psx_brB_BFC1B594); - psx_delay_BFC1B594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033598u); -#endif - if (psx_delay_BFC1B594) { - psx_delay_BFC1B594 = 0; - if (psx_taken_BFC1B594) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033538u); - goto label_BFC1B538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003359Cu); - } -label_BFC1B59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003359Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B59C: 10000017 beq $zero, $zero, 0xBFC1B5FC */ - uint32_t psx_brA_BFC1B59C = cpu->gpr[0]; uint32_t psx_brB_BFC1B59C = cpu->gpr[0]; - psx_taken_BFC1B59C = (psx_brA_BFC1B59C == psx_brB_BFC1B59C); - psx_delay_BFC1B59C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B5A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800335A0u); -#endif - if (psx_delay_BFC1B59C) { - psx_delay_BFC1B59C = 0; - if (psx_taken_BFC1B59C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335FCu); - goto label_BFC1B5FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335A4u); - } -label_BFC1B5A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1B5A4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800335A4u); -#endif - /* 0xBFC1B5A8: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800335A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800335A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B5AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800335ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC1B5B0: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800335B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B5B4: 10200011 beq $at, $zero, 0xBFC1B5FC */ - uint32_t psx_brA_BFC1B5B4 = cpu->gpr[1]; uint32_t psx_brB_BFC1B5B4 = cpu->gpr[0]; - psx_taken_BFC1B5B4 = (psx_brA_BFC1B5B4 == psx_brB_BFC1B5B4); - psx_delay_BFC1B5B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1B5B8: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800335B8u); -#endif - if (psx_delay_BFC1B5B4) { - psx_delay_BFC1B5B4 = 0; - if (psx_taken_BFC1B5B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335FCu); - goto label_BFC1B5FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335BCu); - } -label_BFC1B5BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B5BC: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800335BCu); -#endif -label_BFC1B5C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B5C0: 1020000A beq $at, $zero, 0xBFC1B5EC */ - uint32_t psx_brA_BFC1B5C0 = cpu->gpr[1]; uint32_t psx_brB_BFC1B5C0 = cpu->gpr[0]; - psx_taken_BFC1B5C0 = (psx_brA_BFC1B5C0 == psx_brB_BFC1B5C0); - psx_delay_BFC1B5C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B5C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800335C4u); -#endif - if (psx_delay_BFC1B5C0) { - psx_delay_BFC1B5C0 = 0; - if (psx_taken_BFC1B5C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335ECu); - goto label_BFC1B5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335C8u); - } -label_BFC1B5C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC1B5C8: 00107880 sll $t7, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800335C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B5CC: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800335CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC1B5D0: 008F2021 addu $a0, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800335D0u); -#endif - /* 0xBFC1B5D4: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800335D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800335D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B5D8: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800335E0u; /* jal link before delay slot */ - psx_delay_BFC1B5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B5DC: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800335DCu); -#endif - if (psx_delay_BFC1B5D8) { - psx_delay_BFC1B5D8 = 0; - cpu->gpr[31] = 0x800335E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1B5E0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800335E0u); -#endif - /* 0xBFC1B5E4: 90A59E71 lbu $a1, -24975($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24975; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24975)), 5, 0x20u); - PGXP_LOAD(0x90A59E71u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800335E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B5E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800335E8u); -#endif -label_BFC1B5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B5EC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800335ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC1B5F0: 0205082B sltu $at, $s0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0205082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800335F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B5F4: 1420FFF2 bne $at, $zero, 0xBFC1B5C0 */ - uint32_t psx_brA_BFC1B5F4 = cpu->gpr[1]; uint32_t psx_brB_BFC1B5F4 = cpu->gpr[0]; - psx_taken_BFC1B5F4 = (psx_brA_BFC1B5F4 != psx_brB_BFC1B5F4); - psx_delay_BFC1B5F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B5F8: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800335F8u); -#endif - if (psx_delay_BFC1B5F4) { - psx_delay_BFC1B5F4 = 0; - if (psx_taken_BFC1B5F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335C0u); - goto label_BFC1B5C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800335FCu); - } -label_BFC1B5FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B5FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800335FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B5FC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033604u; /* jal link before delay slot */ - psx_delay_BFC1B5FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B600: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80033600u); -#endif - if (psx_delay_BFC1B5FC) { - psx_delay_BFC1B5FC = 0; - cpu->gpr[31] = 0x80033604u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B604: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B608: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033610u; /* jal link before delay slot */ - psx_delay_BFC1B608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B60C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003360Cu); -#endif - if (psx_delay_BFC1B608) { - psx_delay_BFC1B608 = 0; - cpu->gpr[31] = 0x80033610u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B610: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033618u; /* jal link before delay slot */ - psx_delay_BFC1B610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B614: 24040016 addiu $a0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24040016u, cpu->gpr[4], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80033614u); -#endif - if (psx_delay_BFC1B610) { - psx_delay_BFC1B610 = 0; - cpu->gpr[31] = 0x80033618u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B618: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B61C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033624u; /* jal link before delay slot */ - psx_delay_BFC1B61C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B620: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80033620u); -#endif - if (psx_delay_BFC1B61C) { - psx_delay_BFC1B61C = 0; - cpu->gpr[31] = 0x80033624u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B624: 1000002E beq $zero, $zero, 0xBFC1B6E0 */ - uint32_t psx_brA_BFC1B624 = cpu->gpr[0]; uint32_t psx_brB_BFC1B624 = cpu->gpr[0]; - psx_taken_BFC1B624 = (psx_brA_BFC1B624 == psx_brB_BFC1B624); - psx_delay_BFC1B624 = 1; - /* 0xBFC1B628: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033628u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033628u); -#endif - if (psx_delay_BFC1B624) { - psx_delay_BFC1B624 = 0; - if (psx_taken_BFC1B624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336E0u); - goto label_BFC1B6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003362Cu); - } -label_BFC1B62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1B62C: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B630: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1B634: AC389F74 sw $t8, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033634u); return; } g_debug_last_store_pc = 0x80033634u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389F74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B638: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1B63C: 2419FFFF addiu $t9, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003363Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1B640: AC399F88 sw $t9, -24696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033640u); return; } g_debug_last_store_pc = 0x80033640u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F88u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B644: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B648: AC209F8C sw $zero, -24692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033648u); return; } g_debug_last_store_pc = 0x80033648u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F8Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1B64C: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B650: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033650u); -#endif -label_BFC1B654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B654: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003365Cu; /* jal link before delay slot */ - psx_delay_BFC1B654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B658: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033658u); -#endif - if (psx_delay_BFC1B654) { - psx_delay_BFC1B654 = 0; - cpu->gpr[31] = 0x8003365Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003365Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B65C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033664u; /* jal link before delay slot */ - psx_delay_BFC1B65C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B660: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033660u); -#endif - if (psx_delay_BFC1B65C) { - psx_delay_BFC1B65C = 0; - cpu->gpr[31] = 0x80033664u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B664: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B668: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033670u; /* jal link before delay slot */ - psx_delay_BFC1B668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B66C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003366Cu); -#endif - if (psx_delay_BFC1B668) { - psx_delay_BFC1B668 = 0; - cpu->gpr[31] = 0x80033670u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B670: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B674: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80033674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B678: 1601FFF6 bne $s0, $at, 0xBFC1B654 */ - uint32_t psx_brA_BFC1B678 = cpu->gpr[16]; uint32_t psx_brB_BFC1B678 = cpu->gpr[1]; - psx_taken_BFC1B678 = (psx_brA_BFC1B678 != psx_brB_BFC1B678); - psx_delay_BFC1B678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B67C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003367Cu); -#endif - if (psx_delay_BFC1B678) { - psx_delay_BFC1B678 = 0; - if (psx_taken_BFC1B678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033654u); - goto label_BFC1B654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033680u); - } -label_BFC1B680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1B680: 2410000B addiu $s0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2410000Bu, cpu->gpr[16], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80033680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B684: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033684u); -#endif -label_BFC1B688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B688: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033690u; /* jal link before delay slot */ - psx_delay_BFC1B688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B68C: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003368Cu); -#endif - if (psx_delay_BFC1B688) { - psx_delay_BFC1B688 = 0; - cpu->gpr[31] = 0x80033690u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1B690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B690: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033698u; /* jal link before delay slot */ - psx_delay_BFC1B690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B694: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033694u); -#endif - if (psx_delay_BFC1B690) { - psx_delay_BFC1B690 = 0; - cpu->gpr[31] = 0x80033698u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B698: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B69C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800336A4u; /* jal link before delay slot */ - psx_delay_BFC1B69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B6A0: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800336A0u); -#endif - if (psx_delay_BFC1B69C) { - psx_delay_BFC1B69C = 0; - cpu->gpr[31] = 0x800336A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1B6A4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800336A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B6A8: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x800336A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1B6AC: 1601FFF6 bne $s0, $at, 0xBFC1B688 */ - uint32_t psx_brA_BFC1B6AC = cpu->gpr[16]; uint32_t psx_brB_BFC1B6AC = cpu->gpr[1]; - psx_taken_BFC1B6AC = (psx_brA_BFC1B6AC != psx_brB_BFC1B6AC); - psx_delay_BFC1B6AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1B6B0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800336B0u); -#endif - if (psx_delay_BFC1B6AC) { - psx_delay_BFC1B6AC = 0; - if (psx_taken_BFC1B6AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033688u); - goto label_BFC1B688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336B4u); - } -label_BFC1B6B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B6B4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800336BCu; /* jal link before delay slot */ - psx_delay_BFC1B6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B6B8: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800336B8u); -#endif - if (psx_delay_BFC1B6B4) { - psx_delay_BFC1B6B4 = 0; - cpu->gpr[31] = 0x800336BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B6BC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800336BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B6C0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800336C8u; /* jal link before delay slot */ - psx_delay_BFC1B6C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B6C4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800336C4u); -#endif - if (psx_delay_BFC1B6C0) { - psx_delay_BFC1B6C0 = 0; - cpu->gpr[31] = 0x800336C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B6C8: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800336D0u; /* jal link before delay slot */ - psx_delay_BFC1B6C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B6CC: 24040016 addiu $a0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24040016u, cpu->gpr[4], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x800336CCu); -#endif - if (psx_delay_BFC1B6C8) { - psx_delay_BFC1B6C8 = 0; - cpu->gpr[31] = 0x800336D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B6D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B6D0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800336D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B6D4: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800336DCu; /* jal link before delay slot */ - psx_delay_BFC1B6D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B6D8: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800336D8u); -#endif - if (psx_delay_BFC1B6D4) { - psx_delay_BFC1B6D4 = 0; - cpu->gpr[31] = 0x800336DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1B6DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336DCu); -#endif - /* 0xBFC1B6DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800336DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800336DCu); -#endif -label_BFC1B6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336E0u); -#endif - /* 0xBFC1B6E0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800336E0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800336E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1B6E4: 03E00008 jr $ra */ - psx_delay_BFC1B6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1B6E8: 27BD00B0 addiu $sp, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27BD00B0u, cpu->gpr[29], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x800336E8u); -#endif - if (psx_delay_BFC1B6E4) { - psx_delay_BFC1B6E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1B6EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1B6ECu); - int psx_delay_BFC1B6FC = 0; - int psx_taken_BFC1B6FC = 0; - int psx_delay_BFC1B710 = 0; - int psx_taken_BFC1B710 = 0; - int psx_delay_BFC1B730 = 0; - int psx_delay_BFC1B740 = 0; - int psx_delay_BFC1B75C = 0; - int psx_delay_BFC1B76C = 0; - int psx_delay_BFC1B77C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1B704u: goto label_BFC1B704; - case 0xBFC1B718u: goto label_BFC1B718; - case 0xBFC1B738u: goto label_BFC1B738; - case 0xBFC1B748u: goto label_BFC1B748; - case 0xBFC1B764u: goto label_BFC1B764; - case 0xBFC1B774u: goto label_BFC1B774; - case 0xBFC1B778u: goto label_BFC1B778; - default: break; - } - } -label_BFC1B6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC1B6EC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800336ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800336F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1B6F0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800336F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B6F4: 28610015 slti $at, $v1, 21 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (21) ? 1 : 0); - PGXP_ALU(0x28610015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800336F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1B6F8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800336F8u); return; } g_debug_last_store_pc = 0x800336F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800336F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B6FC: 1020001D beq $at, $zero, 0xBFC1B774 */ - uint32_t psx_brA_BFC1B6FC = cpu->gpr[1]; uint32_t psx_brB_BFC1B6FC = cpu->gpr[0]; - psx_taken_BFC1B6FC = (psx_brA_BFC1B6FC == psx_brB_BFC1B6FC); - psx_delay_BFC1B6FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1B700: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033700u); return; } g_debug_last_store_pc = 0x80033700u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033700u); -#endif - if (psx_delay_BFC1B6FC) { - psx_delay_BFC1B6FC = 0; - if (psx_taken_BFC1B6FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033774u); - goto label_BFC1B774; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033704u); - } -label_BFC1B704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B704: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033704u); -#endif - /* 0xBFC1B708: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033708u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B70C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1B710: 15C10019 bne $t6, $at, 0xBFC1B778 */ - uint32_t psx_brA_BFC1B710 = cpu->gpr[14]; uint32_t psx_brB_BFC1B710 = cpu->gpr[1]; - psx_taken_BFC1B710 = (psx_brA_BFC1B710 != psx_brB_BFC1B710); - psx_delay_BFC1B710 = 1; - /* 0xBFC1B714: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033714u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033714u); -#endif - if (psx_delay_BFC1B710) { - psx_delay_BFC1B710 = 0; - if (psx_taken_BFC1B710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033778u); - goto label_BFC1B778; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033718u); - } -label_BFC1B718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B718: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033718u); -#endif - /* 0xBFC1B71C: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003371Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B720: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC1B724: 24640064 addiu $a0, $v1, 100 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (100)); - PGXP_ALU(0x24640064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80033724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1B728: 2DF80001 sltiu $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)(cpu->gpr[15] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2DF80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1B72C: AC389E24 sw $t8, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003372Cu); return; } g_debug_last_store_pc = 0x8003372Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E24u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003372Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B730: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033738u; /* jal link before delay slot */ - psx_delay_BFC1B730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1B734: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033734u); return; } g_debug_last_store_pc = 0x80033734u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033734u); -#endif - if (psx_delay_BFC1B730) { - psx_delay_BFC1B730 = 0; - cpu->gpr[31] = 0x80033738u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033738u); -#endif - /* 0xBFC1B738: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033738u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B73C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003373Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B740: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80033748u; /* jal link before delay slot */ - psx_delay_BFC1B740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC1B744: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033744u); -#endif - if (psx_delay_BFC1B740) { - psx_delay_BFC1B740 = 0; - cpu->gpr[31] = 0x80033748u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1B748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1B748: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033748u); -#endif - /* 0xBFC1B74C: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003374Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003374Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B750: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033750u); -#endif - /* 0xBFC1B754: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033754u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1B758: 2F280001 sltiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)(cpu->gpr[25] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2F280001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B75C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033764u; /* jal link before delay slot */ - psx_delay_BFC1B75C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1B760: AC289E24 sw $t0, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033760u); return; } g_debug_last_store_pc = 0x80033760u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E24u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80033760u); -#endif - if (psx_delay_BFC1B75C) { - psx_delay_BFC1B75C = 0; - cpu->gpr[31] = 0x80033764u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1B764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033764u); -#endif - /* 0xBFC1B764: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033764u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1B768: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B76C: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x80033774u; /* jal link before delay slot */ - psx_delay_BFC1B76C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC1B770: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033770u); -#endif - if (psx_delay_BFC1B76C) { - psx_delay_BFC1B76C = 0; - cpu->gpr[31] = 0x80033774u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC1B774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033774u); -#endif - /* 0xBFC1B774: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033774u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033774u); -#endif -label_BFC1B778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1B778: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1B77C: 03E00008 jr $ra */ - psx_delay_BFC1B77C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033780u); -#endif - if (psx_delay_BFC1B77C) { - psx_delay_BFC1B77C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1B784(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1B784u); - int psx_delay_BFC1B7D8 = 0; -label_BFC1B784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1B784: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B788: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B78C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003378Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1B790: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033790u); -#endif - /* 0xBFC1B794: 8DEFD0F0 lw $t7, -12048($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033794u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFD0F0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B798: AC249E5C sw $a0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033798u); return; } g_debug_last_store_pc = 0x80033798u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249E5Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B79C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1B7A0: AC2F9E50 sw $t7, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337A0u); return; } g_debug_last_store_pc = 0x800337A0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E50u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800337A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7A8: AC209E54 sw $zero, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337A8u); return; } g_debug_last_store_pc = 0x800337A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7B0: AC209E58 sw $zero, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337B0u); return; } g_debug_last_store_pc = 0x800337B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7B4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7B8: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337B8u); return; } g_debug_last_store_pc = 0x800337B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7BC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7C0: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337C0u); return; } g_debug_last_store_pc = 0x800337C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7C8: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337C8u); return; } g_debug_last_store_pc = 0x800337C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7CC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7D0: AC209E44 sw $zero, -25020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337D0u); return; } g_debug_last_store_pc = 0x800337D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E44u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B7D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1B7D8: 03E00008 jr $ra */ - psx_delay_BFC1B7D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7DC: AC209E48 sw $zero, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337DCu); return; } g_debug_last_store_pc = 0x800337DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800337DCu); -#endif - if (psx_delay_BFC1B7D8) { - psx_delay_BFC1B7D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1B7E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1B7E0u); - int psx_delay_BFC1B7F0 = 0; - int psx_taken_BFC1B7F0 = 0; - int psx_delay_BFC1B804 = 0; - int psx_taken_BFC1B804 = 0; - int psx_delay_BFC1B818 = 0; - int psx_taken_BFC1B818 = 0; - int psx_delay_BFC1B824 = 0; - int psx_delay_BFC1B82C = 0; - int psx_taken_BFC1B82C = 0; - int psx_delay_BFC1B840 = 0; - int psx_taken_BFC1B840 = 0; - int psx_delay_BFC1B854 = 0; - int psx_taken_BFC1B854 = 0; - int psx_delay_BFC1B860 = 0; - int psx_delay_BFC1B868 = 0; - int psx_taken_BFC1B868 = 0; - int psx_delay_BFC1B884 = 0; - int psx_taken_BFC1B884 = 0; - int psx_delay_BFC1B8A0 = 0; - int psx_taken_BFC1B8A0 = 0; - int psx_delay_BFC1B8AC = 0; - int psx_delay_BFC1B8C8 = 0; - int psx_taken_BFC1B8C8 = 0; - int psx_delay_BFC1B8D0 = 0; - int psx_taken_BFC1B8D0 = 0; - int psx_delay_BFC1B8DC = 0; - int psx_delay_BFC1B8E8 = 0; - int psx_delay_BFC1B8F8 = 0; - int psx_taken_BFC1B8F8 = 0; - int psx_delay_BFC1B904 = 0; - int psx_delay_BFC1B910 = 0; - int psx_delay_BFC1B920 = 0; - int psx_taken_BFC1B920 = 0; - int psx_delay_BFC1B92C = 0; - int psx_delay_BFC1B938 = 0; - int psx_delay_BFC1B948 = 0; - int psx_taken_BFC1B948 = 0; - int psx_delay_BFC1B950 = 0; - int psx_taken_BFC1B950 = 0; - int psx_delay_BFC1B958 = 0; - int psx_taken_BFC1B958 = 0; - int psx_delay_BFC1B960 = 0; - int psx_taken_BFC1B960 = 0; - int psx_delay_BFC1B9AC = 0; - int psx_taken_BFC1B9AC = 0; - int psx_delay_BFC1B9C0 = 0; - int psx_taken_BFC1B9C0 = 0; - int psx_delay_BFC1B9D0 = 0; - int psx_delay_BFC1B9E4 = 0; - int psx_taken_BFC1B9E4 = 0; - int psx_delay_BFC1B9FC = 0; - int psx_taken_BFC1B9FC = 0; - int psx_delay_BFC1BA04 = 0; - int psx_delay_BFC1BA10 = 0; - int psx_delay_BFC1BA18 = 0; - int psx_taken_BFC1BA18 = 0; - int psx_delay_BFC1BA20 = 0; - int psx_delay_BFC1BA2C = 0; - int psx_delay_BFC1BA40 = 0; - int psx_taken_BFC1BA40 = 0; - int psx_delay_BFC1BA50 = 0; - int psx_delay_BFC1BA58 = 0; - int psx_delay_BFC1BA60 = 0; - int psx_delay_BFC1BA74 = 0; - int psx_delay_BFC1BA88 = 0; - int psx_taken_BFC1BA88 = 0; - int psx_delay_BFC1BAE0 = 0; - int psx_delay_BFC1BB04 = 0; - int psx_taken_BFC1BB04 = 0; - int psx_delay_BFC1BB10 = 0; - int psx_delay_BFC1BB18 = 0; - int psx_delay_BFC1BB24 = 0; - int psx_delay_BFC1BB3C = 0; - int psx_taken_BFC1BB3C = 0; - int psx_delay_BFC1BB54 = 0; - int psx_taken_BFC1BB54 = 0; - int psx_delay_BFC1BB60 = 0; - int psx_taken_BFC1BB60 = 0; - int psx_delay_BFC1BB6C = 0; - int psx_delay_BFC1BB74 = 0; - int psx_delay_BFC1BB80 = 0; - int psx_delay_BFC1BB98 = 0; - int psx_taken_BFC1BB98 = 0; - int psx_delay_BFC1BBB0 = 0; - int psx_taken_BFC1BBB0 = 0; - int psx_delay_BFC1BBC8 = 0; - int psx_delay_BFC1BBE0 = 0; - int psx_taken_BFC1BBE0 = 0; - int psx_delay_BFC1BC04 = 0; - int psx_taken_BFC1BC04 = 0; - int psx_delay_BFC1BC10 = 0; - int psx_delay_BFC1BC18 = 0; - int psx_delay_BFC1BC24 = 0; - int psx_delay_BFC1BC34 = 0; - int psx_taken_BFC1BC34 = 0; - int psx_delay_BFC1BC48 = 0; - int psx_taken_BFC1BC48 = 0; - int psx_delay_BFC1BC60 = 0; - int psx_delay_BFC1BC6C = 0; - int psx_taken_BFC1BC6C = 0; - int psx_delay_BFC1BC88 = 0; - int psx_taken_BFC1BC88 = 0; - int psx_delay_BFC1BC9C = 0; - int psx_delay_BFC1BCB8 = 0; - int psx_taken_BFC1BCB8 = 0; - int psx_delay_BFC1BCD0 = 0; - int psx_taken_BFC1BCD0 = 0; - int psx_delay_BFC1BCEC = 0; - int psx_delay_BFC1BD04 = 0; - int psx_taken_BFC1BD04 = 0; - int psx_delay_BFC1BD24 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1B7F8u: goto label_BFC1B7F8; - case 0xBFC1B80Cu: goto label_BFC1B80C; - case 0xBFC1B820u: goto label_BFC1B820; - case 0xBFC1B82Cu: goto label_BFC1B82C; - case 0xBFC1B834u: goto label_BFC1B834; - case 0xBFC1B848u: goto label_BFC1B848; - case 0xBFC1B85Cu: goto label_BFC1B85C; - case 0xBFC1B868u: goto label_BFC1B868; - case 0xBFC1B870u: goto label_BFC1B870; - case 0xBFC1B88Cu: goto label_BFC1B88C; - case 0xBFC1B8A8u: goto label_BFC1B8A8; - case 0xBFC1B8ACu: goto label_BFC1B8AC; - case 0xBFC1B8B4u: goto label_BFC1B8B4; - case 0xBFC1B8D0u: goto label_BFC1B8D0; - case 0xBFC1B8D8u: goto label_BFC1B8D8; - case 0xBFC1B8E4u: goto label_BFC1B8E4; - case 0xBFC1B8F0u: goto label_BFC1B8F0; - case 0xBFC1B900u: goto label_BFC1B900; - case 0xBFC1B90Cu: goto label_BFC1B90C; - case 0xBFC1B918u: goto label_BFC1B918; - case 0xBFC1B928u: goto label_BFC1B928; - case 0xBFC1B934u: goto label_BFC1B934; - case 0xBFC1B940u: goto label_BFC1B940; - case 0xBFC1B950u: goto label_BFC1B950; - case 0xBFC1B958u: goto label_BFC1B958; - case 0xBFC1B960u: goto label_BFC1B960; - case 0xBFC1B968u: goto label_BFC1B968; - case 0xBFC1B9B4u: goto label_BFC1B9B4; - case 0xBFC1B9C8u: goto label_BFC1B9C8; - case 0xBFC1B9D8u: goto label_BFC1B9D8; - case 0xBFC1B9ECu: goto label_BFC1B9EC; - case 0xBFC1BA04u: goto label_BFC1BA04; - case 0xBFC1BA0Cu: goto label_BFC1BA0C; - case 0xBFC1BA18u: goto label_BFC1BA18; - case 0xBFC1BA20u: goto label_BFC1BA20; - case 0xBFC1BA28u: goto label_BFC1BA28; - case 0xBFC1BA34u: goto label_BFC1BA34; - case 0xBFC1BA48u: goto label_BFC1BA48; - case 0xBFC1BA4Cu: goto label_BFC1BA4C; - case 0xBFC1BA58u: goto label_BFC1BA58; - case 0xBFC1BA60u: goto label_BFC1BA60; - case 0xBFC1BA68u: goto label_BFC1BA68; - case 0xBFC1BA7Cu: goto label_BFC1BA7C; - case 0xBFC1BA90u: goto label_BFC1BA90; - case 0xBFC1BAE8u: goto label_BFC1BAE8; - case 0xBFC1BAF4u: goto label_BFC1BAF4; - case 0xBFC1BB0Cu: goto label_BFC1BB0C; - case 0xBFC1BB10u: goto label_BFC1BB10; - case 0xBFC1BB18u: goto label_BFC1BB18; - case 0xBFC1BB20u: goto label_BFC1BB20; - case 0xBFC1BB2Cu: goto label_BFC1BB2C; - case 0xBFC1BB44u: goto label_BFC1BB44; - case 0xBFC1BB5Cu: goto label_BFC1BB5C; - case 0xBFC1BB60u: goto label_BFC1BB60; - case 0xBFC1BB68u: goto label_BFC1BB68; - case 0xBFC1BB74u: goto label_BFC1BB74; - case 0xBFC1BB7Cu: goto label_BFC1BB7C; - case 0xBFC1BB88u: goto label_BFC1BB88; - case 0xBFC1BBA0u: goto label_BFC1BBA0; - case 0xBFC1BBB8u: goto label_BFC1BBB8; - case 0xBFC1BBC4u: goto label_BFC1BBC4; - case 0xBFC1BBD0u: goto label_BFC1BBD0; - case 0xBFC1BBE8u: goto label_BFC1BBE8; - case 0xBFC1BBF0u: goto label_BFC1BBF0; - case 0xBFC1BC0Cu: goto label_BFC1BC0C; - case 0xBFC1BC10u: goto label_BFC1BC10; - case 0xBFC1BC18u: goto label_BFC1BC18; - case 0xBFC1BC20u: goto label_BFC1BC20; - case 0xBFC1BC2Cu: goto label_BFC1BC2C; - case 0xBFC1BC3Cu: goto label_BFC1BC3C; - case 0xBFC1BC50u: goto label_BFC1BC50; - case 0xBFC1BC60u: goto label_BFC1BC60; - case 0xBFC1BC68u: goto label_BFC1BC68; - case 0xBFC1BC74u: goto label_BFC1BC74; - case 0xBFC1BC90u: goto label_BFC1BC90; - case 0xBFC1BC98u: goto label_BFC1BC98; - case 0xBFC1BCA4u: goto label_BFC1BCA4; - case 0xBFC1BCC0u: goto label_BFC1BCC0; - case 0xBFC1BCD8u: goto label_BFC1BCD8; - case 0xBFC1BCE8u: goto label_BFC1BCE8; - case 0xBFC1BCF4u: goto label_BFC1BCF4; - case 0xBFC1BD0Cu: goto label_BFC1BD0C; - case 0xBFC1BD18u: goto label_BFC1BD18; - case 0xBFC1BD1Cu: goto label_BFC1BD1C; - case 0xBFC1BD20u: goto label_BFC1BD20; - default: break; - } - } -label_BFC1B7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B7E0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337E0u); -#endif - /* 0xBFC1B7E4: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337E4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800337E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1B7E8: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800337E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B7EC: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800337ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1B7F0: 15C1014A bne $t6, $at, 0xBFC1BD1C */ - uint32_t psx_brA_BFC1B7F0 = cpu->gpr[14]; uint32_t psx_brB_BFC1B7F0 = cpu->gpr[1]; - psx_taken_BFC1B7F0 = (psx_brA_BFC1B7F0 != psx_brB_BFC1B7F0); - psx_delay_BFC1B7F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1B7F4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337F4u); return; } g_debug_last_store_pc = 0x800337F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800337F4u); -#endif - if (psx_delay_BFC1B7F0) { - psx_delay_BFC1B7F0 = 0; - if (psx_taken_BFC1B7F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D1Cu); - goto label_BFC1BD1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800337F8u); - } -label_BFC1B7F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B7F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800337F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B7F8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800337F8u); -#endif - /* 0xBFC1B7FC: 8DEF9F70 lw $t7, -24720($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800337FCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F70u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800337FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1B804: 11E0000B beq $t7, $zero, 0xBFC1B834 */ - uint32_t psx_brA_BFC1B804 = cpu->gpr[15]; uint32_t psx_brB_BFC1B804 = cpu->gpr[0]; - psx_taken_BFC1B804 = (psx_brA_BFC1B804 == psx_brB_BFC1B804); - psx_delay_BFC1B804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033808u); -#endif - if (psx_delay_BFC1B804) { - psx_delay_BFC1B804 = 0; - if (psx_taken_BFC1B804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033834u); - goto label_BFC1B834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003380Cu); - } -label_BFC1B80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1B80C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033810u); -#endif - /* 0xBFC1B810: 8F189F94 lw $t8, -24684($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033810u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F94u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1B818: 11F80026 beq $t7, $t8, 0xBFC1B8B4 */ - uint32_t psx_brA_BFC1B818 = cpu->gpr[15]; uint32_t psx_brB_BFC1B818 = cpu->gpr[24]; - psx_taken_BFC1B818 = (psx_brA_BFC1B818 == psx_brB_BFC1B818); - psx_delay_BFC1B818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B81C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003381Cu); -#endif - if (psx_delay_BFC1B818) { - psx_delay_BFC1B818 = 0; - if (psx_taken_BFC1B818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338B4u); - goto label_BFC1B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033820u); - } -label_BFC1B820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B820: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B824: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x8003382Cu; /* jal link before delay slot */ - psx_delay_BFC1B824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B828: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80033828u); -#endif - if (psx_delay_BFC1B824) { - psx_delay_BFC1B824 = 0; - cpu->gpr[31] = 0x8003382Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B82C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B82Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B82C: 10000021 beq $zero, $zero, 0xBFC1B8B4 */ - uint32_t psx_brA_BFC1B82C = cpu->gpr[0]; uint32_t psx_brB_BFC1B82C = cpu->gpr[0]; - psx_taken_BFC1B82C = (psx_brA_BFC1B82C == psx_brB_BFC1B82C); - psx_delay_BFC1B82C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033830u); -#endif - if (psx_delay_BFC1B82C) { - psx_delay_BFC1B82C = 0; - if (psx_taken_BFC1B82C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338B4u); - goto label_BFC1B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033834u); - } -label_BFC1B834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1B834: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033834u); -#endif - /* 0xBFC1B838: 8F399F78 lw $t9, -24712($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033838u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F78u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B83C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1B840: 1320000B beq $t9, $zero, 0xBFC1B870 */ - uint32_t psx_brA_BFC1B840 = cpu->gpr[25]; uint32_t psx_brB_BFC1B840 = cpu->gpr[0]; - psx_taken_BFC1B840 = (psx_brA_BFC1B840 == psx_brB_BFC1B840); - psx_delay_BFC1B840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033844u); -#endif - if (psx_delay_BFC1B840) { - psx_delay_BFC1B840 = 0; - if (psx_taken_BFC1B840) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033870u); - goto label_BFC1B870; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033848u); - } -label_BFC1B848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1B848: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033848u); -#endif - /* 0xBFC1B84C: 8D089F98 lw $t0, -24680($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24680; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003384Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089F98u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003384Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1B854: 13280017 beq $t9, $t0, 0xBFC1B8B4 */ - uint32_t psx_brA_BFC1B854 = cpu->gpr[25]; uint32_t psx_brB_BFC1B854 = cpu->gpr[8]; - psx_taken_BFC1B854 = (psx_brA_BFC1B854 == psx_brB_BFC1B854); - psx_delay_BFC1B854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033858u); -#endif - if (psx_delay_BFC1B854) { - psx_delay_BFC1B854 = 0; - if (psx_taken_BFC1B854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338B4u); - goto label_BFC1B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003385Cu); - } -label_BFC1B85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B85C: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x8003385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B860: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033868u; /* jal link before delay slot */ - psx_delay_BFC1B860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B864: 24050021 addiu $a1, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24050021u, cpu->gpr[5], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x80033864u); -#endif - if (psx_delay_BFC1B860) { - psx_delay_BFC1B860 = 0; - cpu->gpr[31] = 0x80033868u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B868: 10000012 beq $zero, $zero, 0xBFC1B8B4 */ - uint32_t psx_brA_BFC1B868 = cpu->gpr[0]; uint32_t psx_brB_BFC1B868 = cpu->gpr[0]; - psx_taken_BFC1B868 = (psx_brA_BFC1B868 == psx_brB_BFC1B868); - psx_delay_BFC1B868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B86C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003386Cu); -#endif - if (psx_delay_BFC1B868) { - psx_delay_BFC1B868 = 0; - if (psx_taken_BFC1B868) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338B4u); - goto label_BFC1B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033870u); - } -label_BFC1B870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1B870: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1B874: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033874u); -#endif - /* 0xBFC1B878: 8D4A9F94 lw $t2, -24684($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033878u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F94u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80033878u); -#endif - /* 0xBFC1B87C: 8D299F70 lw $t1, -24720($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003387Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299F70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B880: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1B884: 152A0009 bne $t1, $t2, 0xBFC1B8AC */ - uint32_t psx_brA_BFC1B884 = cpu->gpr[9]; uint32_t psx_brB_BFC1B884 = cpu->gpr[10]; - psx_taken_BFC1B884 = (psx_brA_BFC1B884 != psx_brB_BFC1B884); - psx_delay_BFC1B884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B888: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033888u); -#endif - if (psx_delay_BFC1B884) { - psx_delay_BFC1B884 = 0; - if (psx_taken_BFC1B884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338ACu); - goto label_BFC1B8AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003388Cu); - } -label_BFC1B88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1B88C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1B890: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033890u); -#endif - /* 0xBFC1B894: 8D8C9F98 lw $t4, -24680($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24680; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033894u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9F98u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80033894u); -#endif - /* 0xBFC1B898: 8D6B9F78 lw $t3, -24712($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033898u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F78u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80033898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B89C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003389Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1B8A0: 116C0004 beq $t3, $t4, 0xBFC1B8B4 */ - uint32_t psx_brA_BFC1B8A0 = cpu->gpr[11]; uint32_t psx_brB_BFC1B8A0 = cpu->gpr[12]; - psx_taken_BFC1B8A0 = (psx_brA_BFC1B8A0 == psx_brB_BFC1B8A0); - psx_delay_BFC1B8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800338A4u); -#endif - if (psx_delay_BFC1B8A0) { - psx_delay_BFC1B8A0 = 0; - if (psx_taken_BFC1B8A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338B4u); - goto label_BFC1B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338A8u); - } -label_BFC1B8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B8A8: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800338A8u); -#endif -label_BFC1B8AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B8AC: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800338B4u; /* jal link before delay slot */ - psx_delay_BFC1B8AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B8B0: 2405001F addiu $a1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2405001Fu, cpu->gpr[5], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800338B0u); -#endif - if (psx_delay_BFC1B8AC) { - psx_delay_BFC1B8AC = 0; - cpu->gpr[31] = 0x800338B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B8B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B8B4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800338B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1B8B8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800338B8u); -#endif - /* 0xBFC1B8BC: 8C849F68 lw $a0, -24728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F68u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800338BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338C0u); -#endif - /* 0xBFC1B8C0: 8DAD9F9C lw $t5, -24676($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24676; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338C0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9F9Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800338C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800338C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC1B8C8: 108D0027 beq $a0, $t5, 0xBFC1B968 */ - uint32_t psx_brA_BFC1B8C8 = cpu->gpr[4]; uint32_t psx_brB_BFC1B8C8 = cpu->gpr[13]; - psx_taken_BFC1B8C8 = (psx_brA_BFC1B8C8 == psx_brB_BFC1B8C8); - psx_delay_BFC1B8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800338CCu); -#endif - if (psx_delay_BFC1B8C8) { - psx_delay_BFC1B8C8 = 0; - if (psx_taken_BFC1B8C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033968u); - goto label_BFC1B968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338D0u); - } -label_BFC1B8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8D0: 1000001F beq $zero, $zero, 0xBFC1B950 */ - uint32_t psx_brA_BFC1B8D0 = cpu->gpr[0]; uint32_t psx_brB_BFC1B8D0 = cpu->gpr[0]; - psx_taken_BFC1B8D0 = (psx_brA_BFC1B8D0 == psx_brB_BFC1B8D0); - psx_delay_BFC1B8D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800338D4u); -#endif - if (psx_delay_BFC1B8D0) { - psx_delay_BFC1B8D0 = 0; - if (psx_taken_BFC1B8D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033950u); - goto label_BFC1B950; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338D8u); - } -label_BFC1B8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B8D8: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800338D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B8DC: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800338E4u; /* jal link before delay slot */ - psx_delay_BFC1B8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B8E0: 24050035 addiu $a1, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x24050035u, cpu->gpr[5], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0x800338E0u); -#endif - if (psx_delay_BFC1B8DC) { - psx_delay_BFC1B8DC = 0; - cpu->gpr[31] = 0x800338E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B8E4: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x800338E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B8E8: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800338F0u; /* jal link before delay slot */ - psx_delay_BFC1B8E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B8EC: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x800338ECu); -#endif - if (psx_delay_BFC1B8E8) { - psx_delay_BFC1B8E8 = 0; - cpu->gpr[31] = 0x800338F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800338F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B8F0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800338F0u); -#endif - /* 0xBFC1B8F4: 8C849F68 lw $a0, -24728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338F4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F68u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800338F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8F8: 1000001B beq $zero, $zero, 0xBFC1B968 */ - uint32_t psx_brA_BFC1B8F8 = cpu->gpr[0]; uint32_t psx_brB_BFC1B8F8 = cpu->gpr[0]; - psx_taken_BFC1B8F8 = (psx_brA_BFC1B8F8 == psx_brB_BFC1B8F8); - psx_delay_BFC1B8F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B8FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800338FCu); -#endif - if (psx_delay_BFC1B8F8) { - psx_delay_BFC1B8F8 = 0; - if (psx_taken_BFC1B8F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033968u); - goto label_BFC1B968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033900u); - } -label_BFC1B900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B900: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80033900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B904: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x8003390Cu; /* jal link before delay slot */ - psx_delay_BFC1B904 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B908: 24050036 addiu $a1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24050036u, cpu->gpr[5], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x80033908u); -#endif - if (psx_delay_BFC1B904) { - psx_delay_BFC1B904 = 0; - cpu->gpr[31] = 0x8003390Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B90C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B90Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003390Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B90C: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x8003390Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B910: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033918u; /* jal link before delay slot */ - psx_delay_BFC1B910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B914: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x80033914u); -#endif - if (psx_delay_BFC1B910) { - psx_delay_BFC1B910 = 0; - cpu->gpr[31] = 0x80033918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B918: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033918u); -#endif - /* 0xBFC1B91C: 8C849F68 lw $a0, -24728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003391Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F68u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003391Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B920: 10000011 beq $zero, $zero, 0xBFC1B968 */ - uint32_t psx_brA_BFC1B920 = cpu->gpr[0]; uint32_t psx_brB_BFC1B920 = cpu->gpr[0]; - psx_taken_BFC1B920 = (psx_brA_BFC1B920 == psx_brB_BFC1B920); - psx_delay_BFC1B920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033924u); -#endif - if (psx_delay_BFC1B920) { - psx_delay_BFC1B920 = 0; - if (psx_taken_BFC1B920) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033968u); - goto label_BFC1B968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033928u); - } -label_BFC1B928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B928: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80033928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B92C: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033934u; /* jal link before delay slot */ - psx_delay_BFC1B92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B930: 24050032 addiu $a1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24050032u, cpu->gpr[5], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80033930u); -#endif - if (psx_delay_BFC1B92C) { - psx_delay_BFC1B92C = 0; - cpu->gpr[31] = 0x80033934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B934: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x80033934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B938: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033940u; /* jal link before delay slot */ - psx_delay_BFC1B938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1B93C: 24050032 addiu $a1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24050032u, cpu->gpr[5], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003393Cu); -#endif - if (psx_delay_BFC1B938) { - psx_delay_BFC1B938 = 0; - cpu->gpr[31] = 0x80033940u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1B940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1B940: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033940u); -#endif - /* 0xBFC1B944: 8C849F68 lw $a0, -24728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033944u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F68u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B948: 10000007 beq $zero, $zero, 0xBFC1B968 */ - uint32_t psx_brA_BFC1B948 = cpu->gpr[0]; uint32_t psx_brB_BFC1B948 = cpu->gpr[0]; - psx_taken_BFC1B948 = (psx_brA_BFC1B948 == psx_brB_BFC1B948); - psx_delay_BFC1B948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B94C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003394Cu); -#endif - if (psx_delay_BFC1B948) { - psx_delay_BFC1B948 = 0; - if (psx_taken_BFC1B948) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033968u); - goto label_BFC1B968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033950u); - } -label_BFC1B950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1B950: 1080FFF5 beq $a0, $zero, 0xBFC1B928 */ - uint32_t psx_brA_BFC1B950 = cpu->gpr[4]; uint32_t psx_brB_BFC1B950 = cpu->gpr[0]; - psx_taken_BFC1B950 = (psx_brA_BFC1B950 == psx_brB_BFC1B950); - psx_delay_BFC1B950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B954: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033954u); -#endif - if (psx_delay_BFC1B950) { - psx_delay_BFC1B950 = 0; - if (psx_taken_BFC1B950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033928u); - goto label_BFC1B928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033958u); - } -label_BFC1B958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B958: 1081FFDF beq $a0, $at, 0xBFC1B8D8 */ - uint32_t psx_brA_BFC1B958 = cpu->gpr[4]; uint32_t psx_brB_BFC1B958 = cpu->gpr[1]; - psx_taken_BFC1B958 = (psx_brA_BFC1B958 == psx_brB_BFC1B958); - psx_delay_BFC1B958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B95C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003395Cu); -#endif - if (psx_delay_BFC1B958) { - psx_delay_BFC1B958 = 0; - if (psx_taken_BFC1B958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800338D8u); - goto label_BFC1B8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033960u); - } -label_BFC1B960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B960: 1081FFE7 beq $a0, $at, 0xBFC1B900 */ - uint32_t psx_brA_BFC1B960 = cpu->gpr[4]; uint32_t psx_brB_BFC1B960 = cpu->gpr[1]; - psx_taken_BFC1B960 = (psx_brA_BFC1B960 == psx_brB_BFC1B960); - psx_delay_BFC1B960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033964u); -#endif - if (psx_delay_BFC1B960) { - psx_delay_BFC1B960 = 0; - if (psx_taken_BFC1B960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033900u); - goto label_BFC1B900; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033968u); - } -label_BFC1B968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1B968: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033968u); -#endif - /* 0xBFC1B96C: 8DCE9F70 lw $t6, -24720($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003396Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003396Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B970: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1B974: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033974u); -#endif - /* 0xBFC1B978: 8DEF9F78 lw $t7, -24712($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033978u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1B97C: AC2E9F94 sw $t6, -24684($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003397Cu); return; } g_debug_last_store_pc = 0x8003397Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F94u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1B980: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B984: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033984u); -#endif - /* 0xBFC1B988: 8C639E3C lw $v1, -25028($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25028; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25028)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033988u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E3Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1B98C: AC2F9F98 sw $t7, -24680($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24680; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003398Cu); return; } g_debug_last_store_pc = 0x8003398Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9F98u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003398Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B990: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1B994: AC249F9C sw $a0, -24676($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24676; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033994u); return; } g_debug_last_store_pc = 0x80033994u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249F9Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1B998: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B99C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003399Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1B9A0: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800339A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1B9A4: AC239E3C sw $v1, -25028($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25028; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25028)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339A4u); return; } g_debug_last_store_pc = 0x800339A4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E3Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800339A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B9A8: 240100B4 addiu $at, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240100B4u, cpu->gpr[1], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800339A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1B9AC: 1441000A bne $v0, $at, 0xBFC1B9D8 */ - uint32_t psx_brA_BFC1B9AC = cpu->gpr[2]; uint32_t psx_brB_BFC1B9AC = cpu->gpr[1]; - psx_taken_BFC1B9AC = (psx_brA_BFC1B9AC != psx_brB_BFC1B9AC); - psx_delay_BFC1B9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B9B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800339B0u); -#endif - if (psx_delay_BFC1B9AC) { - psx_delay_BFC1B9AC = 0; - if (psx_taken_BFC1B9AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800339D8u); - goto label_BFC1B9D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800339B4u); - } -label_BFC1B9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1B9B4: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800339B4u); -#endif - /* 0xBFC1B9B8: 8F186948 lw $t8, 26952($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339B8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800339B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B9BC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800339BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1B9C0: 17010005 bne $t8, $at, 0xBFC1B9D8 */ - uint32_t psx_brA_BFC1B9C0 = cpu->gpr[24]; uint32_t psx_brB_BFC1B9C0 = cpu->gpr[1]; - psx_taken_BFC1B9C0 = (psx_brA_BFC1B9C0 != psx_brB_BFC1B9C0); - psx_delay_BFC1B9C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B9C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800339C4u); -#endif - if (psx_delay_BFC1B9C0) { - psx_delay_BFC1B9C0 = 0; - if (psx_taken_BFC1B9C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800339D8u); - goto label_BFC1B9D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800339C8u); - } -label_BFC1B9C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B9C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1B9C8: 24190003 addiu $t9, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24190003u, cpu->gpr[25], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800339C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1B9CC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800339CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1B9D0: 0C00D130 jal 0xB00344C0 */ - cpu->gpr[31] = 0x800339D8u; /* jal link before delay slot */ - psx_delay_BFC1B9D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1B9D4: AC399F64 sw $t9, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339D4u); return; } g_debug_last_store_pc = 0x800339D4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F64u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800339D4u); -#endif - if (psx_delay_BFC1B9D0) { - psx_delay_BFC1B9D0 = 0; - cpu->gpr[31] = 0x800339D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344C0u); - cpu->pc = 0x800344C0u; return; - } -label_BFC1B9D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B9D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1B9D8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800339D8u); -#endif - /* 0xBFC1B9DC: 8D089E78 lw $t0, -24968($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339DCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800339DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1B9E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800339E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1B9E4: 150000CE bne $t0, $zero, 0xBFC1BD20 */ - uint32_t psx_brA_BFC1B9E4 = cpu->gpr[8]; uint32_t psx_brB_BFC1B9E4 = cpu->gpr[0]; - psx_taken_BFC1B9E4 = (psx_brA_BFC1B9E4 != psx_brB_BFC1B9E4); - psx_delay_BFC1B9E4 = 1; - /* 0xBFC1B9E8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339E8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800339E8u); -#endif - if (psx_delay_BFC1B9E4) { - psx_delay_BFC1B9E4 = 0; - if (psx_taken_BFC1B9E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D20u); - goto label_BFC1BD20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800339ECu); - } -label_BFC1B9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1B9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1B9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1B9EC: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800339ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800339F0u); -#endif - /* 0xBFC1B9F0: 91299E71 lbu $t1, -24975($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24975; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24975)), 9, 0x200u); - PGXP_LOAD(0x91299E71u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800339F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1B9F4: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800339F4u); return; } g_debug_last_store_pc = 0x800339F4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800339F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1B9F8: 2D210015 sltiu $at, $t1, 21 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000015u ? 1 : 0); - PGXP_ALU(0x2D210015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800339F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1B9FC: 10200008 beq $at, $zero, 0xBFC1BA20 */ - uint32_t psx_brA_BFC1B9FC = cpu->gpr[1]; uint32_t psx_brB_BFC1B9FC = cpu->gpr[0]; - psx_taken_BFC1B9FC = (psx_brA_BFC1B9FC == psx_brB_BFC1B9FC); - psx_delay_BFC1B9FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A00u); -#endif - if (psx_delay_BFC1B9FC) { - psx_delay_BFC1B9FC = 0; - if (psx_taken_BFC1B9FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A20u); - goto label_BFC1BA20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A04u); - } -label_BFC1BA04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA04: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033A0Cu; /* jal link before delay slot */ - psx_delay_BFC1BA04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BA08: 24040015 addiu $a0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24040015u, cpu->gpr[4], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A08u); -#endif - if (psx_delay_BFC1BA04) { - psx_delay_BFC1BA04 = 0; - cpu->gpr[31] = 0x80033A0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BA0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BA0C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA10: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033A18u; /* jal link before delay slot */ - psx_delay_BFC1BA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BA14: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80033A14u); -#endif - if (psx_delay_BFC1BA10) { - psx_delay_BFC1BA10 = 0; - cpu->gpr[31] = 0x80033A18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA18: 10000006 beq $zero, $zero, 0xBFC1BA34 */ - uint32_t psx_brA_BFC1BA18 = cpu->gpr[0]; uint32_t psx_brB_BFC1BA18 = cpu->gpr[0]; - psx_taken_BFC1BA18 = (psx_brA_BFC1BA18 == psx_brB_BFC1BA18); - psx_delay_BFC1BA18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A1Cu); -#endif - if (psx_delay_BFC1BA18) { - psx_delay_BFC1BA18 = 0; - if (psx_taken_BFC1BA18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A34u); - goto label_BFC1BA34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A20u); - } -label_BFC1BA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA20: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033A28u; /* jal link before delay slot */ - psx_delay_BFC1BA20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BA24: 24040015 addiu $a0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24040015u, cpu->gpr[4], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A24u); -#endif - if (psx_delay_BFC1BA20) { - psx_delay_BFC1BA20 = 0; - cpu->gpr[31] = 0x80033A28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BA28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BA28: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA2C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033A34u; /* jal link before delay slot */ - psx_delay_BFC1BA2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BA30: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A30u); -#endif - if (psx_delay_BFC1BA2C) { - psx_delay_BFC1BA2C = 0; - cpu->gpr[31] = 0x80033A34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BA34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1BA34: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A34u); -#endif - /* 0xBFC1BA38: 8D4A9E30 lw $t2, -25040($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25040; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A38u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E30u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80033A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1BA40: 11400002 beq $t2, $zero, 0xBFC1BA4C */ - uint32_t psx_brA_BFC1BA40 = cpu->gpr[10]; uint32_t psx_brB_BFC1BA40 = cpu->gpr[0]; - psx_taken_BFC1BA40 = (psx_brA_BFC1BA40 == psx_brB_BFC1BA40); - psx_delay_BFC1BA40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BA44: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A44u); -#endif - if (psx_delay_BFC1BA40) { - psx_delay_BFC1BA40 = 0; - if (psx_taken_BFC1BA40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A4Cu); - goto label_BFC1BA4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A48u); - } -label_BFC1BA48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BA48: AC209E30 sw $zero, -25040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25040; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A48u); return; } g_debug_last_store_pc = 0x80033A48u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033A48u); -#endif -label_BFC1BA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BA4C: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA50: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033A58u; /* jal link before delay slot */ - psx_delay_BFC1BA50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BA54: 2405001F addiu $a1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2405001Fu, cpu->gpr[5], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80033A54u); -#endif - if (psx_delay_BFC1BA50) { - psx_delay_BFC1BA50 = 0; - cpu->gpr[31] = 0x80033A58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1BA58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA58: 0C00C90C jal 0xB0032430 */ - cpu->gpr[31] = 0x80033A60u; /* jal link before delay slot */ - psx_delay_BFC1BA58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BA5C: 240400CC addiu $a0, $zero, 204 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (204)); - PGXP_ALU(0x240400CCu, cpu->gpr[4], _pgx1, 0x000000CCu); } -#ifdef PSX_COSIM - cosim_instr(0x80033A5Cu); -#endif - if (psx_delay_BFC1BA58) { - psx_delay_BFC1BA58 = 0; - cpu->gpr[31] = 0x80033A60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032430u); - cpu->pc = 0x80032430u; return; - } -label_BFC1BA60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA60: 0C00CB1A jal 0xB0032C68 */ - cpu->gpr[31] = 0x80033A68u; /* jal link before delay slot */ - psx_delay_BFC1BA60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A64u); -#endif - if (psx_delay_BFC1BA60) { - psx_delay_BFC1BA60 = 0; - cpu->gpr[31] = 0x80033A68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C68u); - cpu->pc = 0x80032C68u; return; - } -label_BFC1BA68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1BA68: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BA6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1BA70: AC2B9E78 sw $t3, -24968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A70u); return; } g_debug_last_store_pc = 0x80033A70u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9E78u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80033A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BA74: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80033A7Cu; /* jal link before delay slot */ - psx_delay_BFC1BA74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BA78: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A78u); -#endif - if (psx_delay_BFC1BA74) { - psx_delay_BFC1BA74 = 0; - cpu->gpr[31] = 0x80033A7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1BA7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1BA7C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A80u); -#endif - /* 0xBFC1BA80: 8D8C9DF8 lw $t4, -25096($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A80u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9DF8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80033A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1BA88: 1580001A bne $t4, $zero, 0xBFC1BAF4 */ - uint32_t psx_brA_BFC1BA88 = cpu->gpr[12]; uint32_t psx_brB_BFC1BA88 = cpu->gpr[0]; - psx_taken_BFC1BA88 = (psx_brA_BFC1BA88 != psx_brB_BFC1BA88); - psx_delay_BFC1BA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BA8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033A8Cu); -#endif - if (psx_delay_BFC1BA88) { - psx_delay_BFC1BA88 = 0; - if (psx_taken_BFC1BA88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033AF4u); - goto label_BFC1BAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033A90u); - } -label_BFC1BA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1BA90: 240D0032 addiu $t5, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240D0032u, cpu->gpr[13], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80033A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BA94: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1BA98: AC2D6948 sw $t5, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A98u); return; } g_debug_last_store_pc = 0x80033A98u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6948u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80033A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BA9C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAA0: AC209E50 sw $zero, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AA0u); return; } g_debug_last_store_pc = 0x80033AA0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAA4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAA8: AC209E54 sw $zero, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AA8u); return; } g_debug_last_store_pc = 0x80033AA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAAC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAB0: AC209E58 sw $zero, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AB0u); return; } g_debug_last_store_pc = 0x80033AB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAB8: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AB8u); return; } g_debug_last_store_pc = 0x80033AB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BABC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAC0: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AC0u); return; } g_debug_last_store_pc = 0x80033AC0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAC4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1BAC8: 240E0003 addiu $t6, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240E0003u, cpu->gpr[14], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80033AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1BACC: AC2E9F64 sw $t6, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033ACCu); return; } g_debug_last_store_pc = 0x80033ACCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F64u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAD0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BAD4: AC209F7C sw $zero, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AD4u); return; } g_debug_last_store_pc = 0x80033AD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F7Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1BAD8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BADC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BAE0: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80033AE8u; /* jal link before delay slot */ - psx_delay_BFC1BAE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1BAE4: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AE4u); return; } g_debug_last_store_pc = 0x80033AE4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AE4u); -#endif - if (psx_delay_BFC1BAE0) { - psx_delay_BFC1BAE0 = 0; - cpu->gpr[31] = 0x80033AE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1BAE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BAE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1BAE8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BAEC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1BAF0: AC239E3C sw $v1, -25028($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25028; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25028)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033AF0u); return; } g_debug_last_store_pc = 0x80033AF0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E3Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AF0u); -#endif -label_BFC1BAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BAF4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033AF4u); -#endif - /* 0xBFC1BAF8: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1BAFC: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1BB00: 2C610002 sltiu $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2C610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BB04: 1420000F bne $at, $zero, 0xBFC1BB44 */ - uint32_t psx_brA_BFC1BB04 = cpu->gpr[1]; uint32_t psx_brB_BFC1BB04 = cpu->gpr[0]; - psx_taken_BFC1BB04 = (psx_brA_BFC1BB04 != psx_brB_BFC1BB04); - psx_delay_BFC1BB04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BB08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033B08u); -#endif - if (psx_delay_BFC1BB04) { - psx_delay_BFC1BB04 = 0; - if (psx_taken_BFC1BB04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B44u); - goto label_BFC1BB44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B0Cu); - } -label_BFC1BB0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BB0C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B0Cu); -#endif -label_BFC1BB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB10: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033B18u; /* jal link before delay slot */ - psx_delay_BFC1BB10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BB14: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B14u); -#endif - if (psx_delay_BFC1BB10) { - psx_delay_BFC1BB10 = 0; - cpu->gpr[31] = 0x80033B18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB18: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033B20u; /* jal link before delay slot */ - psx_delay_BFC1BB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BB1C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B1Cu); -#endif - if (psx_delay_BFC1BB18) { - psx_delay_BFC1BB18 = 0; - cpu->gpr[31] = 0x80033B20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BB20: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB24: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033B2Cu; /* jal link before delay slot */ - psx_delay_BFC1BB24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BB28: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80033B28u); -#endif - if (psx_delay_BFC1BB24) { - psx_delay_BFC1BB24 = 0; - cpu->gpr[31] = 0x80033B2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BB2C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B30u); -#endif - /* 0xBFC1BB30: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BB34: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC1BB38: 0223082B sltu $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BB3C: 1420FFF4 bne $at, $zero, 0xBFC1BB10 */ - uint32_t psx_brA_BFC1BB3C = cpu->gpr[1]; uint32_t psx_brB_BFC1BB3C = cpu->gpr[0]; - psx_taken_BFC1BB3C = (psx_brA_BFC1BB3C != psx_brB_BFC1BB3C); - psx_delay_BFC1BB3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BB40: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B40u); -#endif - if (psx_delay_BFC1BB3C) { - psx_delay_BFC1BB3C = 0; - if (psx_taken_BFC1BB3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B10u); - goto label_BFC1BB10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B44u); - } -label_BFC1BB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1BB44: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033B44u); -#endif - /* 0xBFC1BB48: 91EF9E71 lbu $t7, -24975($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24975; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-24975)), 15, 0x8000u); - PGXP_LOAD(0x91EF9E71u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1BB4C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC1BB50: 01E2082B sltu $at, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[15] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01E2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BB54: 14200012 bne $at, $zero, 0xBFC1BBA0 */ - uint32_t psx_brA_BFC1BB54 = cpu->gpr[1]; uint32_t psx_brB_BFC1BB54 = cpu->gpr[0]; - psx_taken_BFC1BB54 = (psx_brA_BFC1BB54 != psx_brB_BFC1BB54); - psx_delay_BFC1BB54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC1BB58: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B58u); -#endif - if (psx_delay_BFC1BB54) { - psx_delay_BFC1BB54 = 0; - if (psx_taken_BFC1BB54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BA0u); - goto label_BFC1BBA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B5Cu); - } -label_BFC1BB5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC1BB5C: 2A210015 slti $at, $s1, 21 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0); - PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B5Cu); -#endif -label_BFC1BB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BB60: 1020000F beq $at, $zero, 0xBFC1BBA0 */ - uint32_t psx_brA_BFC1BB60 = cpu->gpr[1]; uint32_t psx_brB_BFC1BB60 = cpu->gpr[0]; - psx_taken_BFC1BB60 = (psx_brA_BFC1BB60 == psx_brB_BFC1BB60); - psx_delay_BFC1BB60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BB64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033B64u); -#endif - if (psx_delay_BFC1BB60) { - psx_delay_BFC1BB60 = 0; - if (psx_taken_BFC1BB60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BA0u); - goto label_BFC1BBA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B68u); - } -label_BFC1BB68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BB68: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB6C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033B74u; /* jal link before delay slot */ - psx_delay_BFC1BB6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BB70: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B70u); -#endif - if (psx_delay_BFC1BB6C) { - psx_delay_BFC1BB6C = 0; - cpu->gpr[31] = 0x80033B74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB74: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033B7Cu; /* jal link before delay slot */ - psx_delay_BFC1BB74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BB78: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B78u); -#endif - if (psx_delay_BFC1BB74) { - psx_delay_BFC1BB74 = 0; - cpu->gpr[31] = 0x80033B7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BB7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BB7C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BB80: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033B88u; /* jal link before delay slot */ - psx_delay_BFC1BB80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BB84: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B84u); -#endif - if (psx_delay_BFC1BB80) { - psx_delay_BFC1BB80 = 0; - cpu->gpr[31] = 0x80033B88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1BB88: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033B88u); -#endif - /* 0xBFC1BB8C: 93189E71 lbu $t8, -24975($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24975; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-24975)), 24, 0x1000000u); - PGXP_LOAD(0x93189E71u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BB90: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020002u); -#endif - /* 0xBFC1BB94: 0311082B sltu $at, $t8, $s1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0311082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BB98: 1020FFF1 beq $at, $zero, 0xBFC1BB60 */ - uint32_t psx_brA_BFC1BB98 = cpu->gpr[1]; uint32_t psx_brB_BFC1BB98 = cpu->gpr[0]; - psx_taken_BFC1BB98 = (psx_brA_BFC1BB98 == psx_brB_BFC1BB98); - psx_delay_BFC1BB98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC1BB9C: 2A210015 slti $at, $s1, 21 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0); - PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033B9Cu); -#endif - if (psx_delay_BFC1BB98) { - psx_delay_BFC1BB98 = 0; - if (psx_taken_BFC1BB98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033B60u); - goto label_BFC1BB60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BA0u); - } -label_BFC1BBA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BBA0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033BA0u); -#endif - /* 0xBFC1BBA4: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033BA4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1BBA8: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1BBAC: 28610002 slti $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0); - PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BBB0: 1420000F bne $at, $zero, 0xBFC1BBF0 */ - uint32_t psx_brA_BFC1BBB0 = cpu->gpr[1]; uint32_t psx_brB_BFC1BBB0 = cpu->gpr[0]; - psx_taken_BFC1BBB0 = (psx_brA_BFC1BBB0 != psx_brB_BFC1BBB0); - psx_delay_BFC1BBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BBB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033BB4u); -#endif - if (psx_delay_BFC1BBB0) { - psx_delay_BFC1BBB0 = 0; - if (psx_taken_BFC1BBB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BF0u); - goto label_BFC1BBF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BB8u); - } -label_BFC1BBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1BBB8: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033BB8u); return; } g_debug_last_store_pc = 0x80033BB8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BBBC: 3C10800F lui $s0, 0x800F */ - cpu->gpr[16] = 0x800F0000u; - PGXP_ALU(0x3C10800Fu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BBC0: 2610D0F4 addiu $s0, $s0, -12044 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-12044)); - PGXP_ALU(0x2610D0F4u, cpu->gpr[16], _pgx1, 0xFFFFD0F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BC0u); -#endif -label_BFC1BBC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BC4u); -#endif - /* 0xBFC1BBC4: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033BC4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BBC8: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033BD0u; /* jal link before delay slot */ - psx_delay_BFC1BBC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BBCC: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BCCu); -#endif - if (psx_delay_BFC1BBC8) { - psx_delay_BFC1BBC8 = 0; - cpu->gpr[31] = 0x80033BD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BBD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BBD0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033BD0u); -#endif - /* 0xBFC1BBD4: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033BD4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BBD8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC1BBDC: 0223082A slt $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BBE0: 1420FFF8 bne $at, $zero, 0xBFC1BBC4 */ - uint32_t psx_brA_BFC1BBE0 = cpu->gpr[1]; uint32_t psx_brB_BFC1BBE0 = cpu->gpr[0]; - psx_taken_BFC1BBE0 = (psx_brA_BFC1BBE0 != psx_brB_BFC1BBE0); - psx_delay_BFC1BBE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BBE4: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BE4u); -#endif - if (psx_delay_BFC1BBE0) { - psx_delay_BFC1BBE0 = 0; - if (psx_taken_BFC1BBE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BC4u); - goto label_BFC1BBC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033BE8u); - } -label_BFC1BBE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BE8u); -#endif - /* 0xBFC1BBE8: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033BE8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BBEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033BECu); -#endif -label_BFC1BBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BBF0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033BF0u); -#endif - /* 0xBFC1BBF4: 90429E71 lbu $v0, -24975($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24975; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24975)), 2, 0x4u); - PGXP_LOAD(0x90429E71u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BBF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BBFC: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1BC00: 28410015 slti $at, $v0, 21 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0); - PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BC04: 1020000D beq $at, $zero, 0xBFC1BC3C */ - uint32_t psx_brA_BFC1BC04 = cpu->gpr[1]; uint32_t psx_brB_BFC1BC04 = cpu->gpr[0]; - psx_taken_BFC1BC04 = (psx_brA_BFC1BC04 == psx_brB_BFC1BC04); - psx_delay_BFC1BC04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC1BC08: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C08u); -#endif - if (psx_delay_BFC1BC04) { - psx_delay_BFC1BC04 = 0; - if (psx_taken_BFC1BC04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C3Cu); - goto label_BFC1BC3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C0Cu); - } -label_BFC1BC0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BC0C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C0Cu); -#endif -label_BFC1BC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BC10: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033C18u; /* jal link before delay slot */ - psx_delay_BFC1BC10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BC14: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C14u); -#endif - if (psx_delay_BFC1BC10) { - psx_delay_BFC1BC10 = 0; - cpu->gpr[31] = 0x80033C18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BC18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BC18: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033C20u; /* jal link before delay slot */ - psx_delay_BFC1BC18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BC1C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C1Cu); -#endif - if (psx_delay_BFC1BC18) { - psx_delay_BFC1BC18 = 0; - cpu->gpr[31] = 0x80033C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BC20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BC20: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BC24: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033C2Cu; /* jal link before delay slot */ - psx_delay_BFC1BC24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BC28: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80033C28u); -#endif - if (psx_delay_BFC1BC24) { - psx_delay_BFC1BC24 = 0; - cpu->gpr[31] = 0x80033C2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BC2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BC2C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC1BC30: 2A210015 slti $at, $s1, 21 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (21) ? 1 : 0); - PGXP_ALU(0x2A210015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BC34: 1420FFF6 bne $at, $zero, 0xBFC1BC10 */ - uint32_t psx_brA_BFC1BC34 = cpu->gpr[1]; uint32_t psx_brB_BFC1BC34 = cpu->gpr[0]; - psx_taken_BFC1BC34 = (psx_brA_BFC1BC34 != psx_brB_BFC1BC34); - psx_delay_BFC1BC34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BC38: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C38u); -#endif - if (psx_delay_BFC1BC34) { - psx_delay_BFC1BC34 = 0; - if (psx_taken_BFC1BC34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C10u); - goto label_BFC1BC10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C3Cu); - } -label_BFC1BC3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1BC3C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C40u); -#endif - /* 0xBFC1BC40: 8F399F78 lw $t9, -24712($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033C40u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F78u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BC44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1BC48: 13200033 beq $t9, $zero, 0xBFC1BD18 */ - uint32_t psx_brA_BFC1BC48 = cpu->gpr[25]; uint32_t psx_brB_BFC1BC48 = cpu->gpr[0]; - psx_taken_BFC1BC48 = (psx_brA_BFC1BC48 == psx_brB_BFC1BC48); - psx_delay_BFC1BC48 = 1; - /* 0xBFC1BC4C: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033C4Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80033C4Cu); -#endif - if (psx_delay_BFC1BC48) { - psx_delay_BFC1BC48 = 0; - if (psx_taken_BFC1BC48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D18u); - goto label_BFC1BD18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C50u); - } -label_BFC1BC50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1BC50: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033C50u); return; } g_debug_last_store_pc = 0x80033C50u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1BC54: 24100015 addiu $s0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24100015u, cpu->gpr[16], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1BC58: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BC5C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C5Cu); -#endif -label_BFC1BC60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BC60: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033C68u; /* jal link before delay slot */ - psx_delay_BFC1BC60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BC64: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C64u); -#endif - if (psx_delay_BFC1BC60) { - psx_delay_BFC1BC60 = 0; - cpu->gpr[31] = 0x80033C68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BC68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BC68: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1BC6C: 1630FFFC bne $s1, $s0, 0xBFC1BC60 */ - uint32_t psx_brA_BFC1BC6C = cpu->gpr[17]; uint32_t psx_brB_BFC1BC6C = cpu->gpr[16]; - psx_taken_BFC1BC6C = (psx_brA_BFC1BC6C != psx_brB_BFC1BC6C); - psx_delay_BFC1BC6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1BC70: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033C70u); -#endif - if (psx_delay_BFC1BC6C) { - psx_delay_BFC1BC6C = 0; - if (psx_taken_BFC1BC6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C60u); - goto label_BFC1BC60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C74u); - } -label_BFC1BC74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BC74: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033C74u); -#endif - /* 0xBFC1BC78: 8C429F7C lw $v0, -24708($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033C78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1BC7C: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BC80: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1BC84: 28410002 slti $at, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0); - PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BC88: 1420000D bne $at, $zero, 0xBFC1BCC0 */ - uint32_t psx_brA_BFC1BC88 = cpu->gpr[1]; uint32_t psx_brB_BFC1BC88 = cpu->gpr[0]; - psx_taken_BFC1BC88 = (psx_brA_BFC1BC88 != psx_brB_BFC1BC88); - psx_delay_BFC1BC88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BC8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033C8Cu); -#endif - if (psx_delay_BFC1BC88) { - psx_delay_BFC1BC88 = 0; - if (psx_taken_BFC1BC88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033CC0u); - goto label_BFC1BCC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C90u); - } -label_BFC1BC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BC90: 3C10800F lui $s0, 0x800F */ - cpu->gpr[16] = 0x800F0000u; - PGXP_ALU(0x3C10800Fu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BC94: 2610D0F4 addiu $s0, $s0, -12044 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-12044)); - PGXP_ALU(0x2610D0F4u, cpu->gpr[16], _pgx1, 0xFFFFD0F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80033C94u); -#endif -label_BFC1BC98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BC98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033C98u); -#endif - /* 0xBFC1BC98: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033C98u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BC9C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033CA4u; /* jal link before delay slot */ - psx_delay_BFC1BC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BCA0: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CA0u); -#endif - if (psx_delay_BFC1BC9C) { - psx_delay_BFC1BC9C = 0; - cpu->gpr[31] = 0x80033CA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BCA4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033CA4u); -#endif - /* 0xBFC1BCA8: 8C429F7C lw $v0, -24708($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033CA8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BCAC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BCB0: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC1BCB4: 0222082A slt $at, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BCB8: 1420FFF7 bne $at, $zero, 0xBFC1BC98 */ - uint32_t psx_brA_BFC1BCB8 = cpu->gpr[1]; uint32_t psx_brB_BFC1BCB8 = cpu->gpr[0]; - psx_taken_BFC1BCB8 = (psx_brA_BFC1BCB8 != psx_brB_BFC1BCB8); - psx_delay_BFC1BCB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BCBC: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CBCu); -#endif - if (psx_delay_BFC1BCB8) { - psx_delay_BFC1BCB8 = 0; - if (psx_taken_BFC1BCB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033C98u); - goto label_BFC1BC98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033CC0u); - } -label_BFC1BCC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BCC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BCC0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033CC0u); -#endif - /* 0xBFC1BCC4: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033CC4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BCC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC1BCCC: 0062082A slt $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BCD0: 1020000E beq $at, $zero, 0xBFC1BD0C */ - uint32_t psx_brA_BFC1BCD0 = cpu->gpr[1]; uint32_t psx_brB_BFC1BCD0 = cpu->gpr[0]; - psx_taken_BFC1BCD0 = (psx_brA_BFC1BCD0 == psx_brB_BFC1BCD0); - psx_delay_BFC1BCD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20009u); -#endif - /* 0xBFC1BCD4: 00608821 addu $s1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033CD4u); -#endif - if (psx_delay_BFC1BCD0) { - psx_delay_BFC1BCD0 = 0; - if (psx_taken_BFC1BCD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D0Cu); - goto label_BFC1BD0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033CD8u); - } -label_BFC1BCD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BCD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1BCD8: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1BCDC: 2529D0F0 addiu $t1, $t1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-12048)); - PGXP_ALU(0x2529D0F0u, cpu->gpr[9], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC1BCE0: 00114080 sll $t0, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10300u); -#endif - /* 0xBFC1BCE4: 01098021 addu $s0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01098021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033CE4u); -#endif -label_BFC1BCE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BCE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CE8u); -#endif - /* 0xBFC1BCE8: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033CE8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BCEC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033CF4u; /* jal link before delay slot */ - psx_delay_BFC1BCEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BCF0: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CF0u); -#endif - if (psx_delay_BFC1BCEC) { - psx_delay_BFC1BCEC = 0; - cpu->gpr[31] = 0x80033CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BCF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BCF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1BCF4: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033CF4u); -#endif - /* 0xBFC1BCF8: 8D4A9F7C lw $t2, -24708($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033CF8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F7Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80033CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BCFC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20402u); -#endif - /* 0xBFC1BD00: 0151082A slt $at, $t2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0151082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BD04: 1020FFF8 beq $at, $zero, 0xBFC1BCE8 */ - uint32_t psx_brA_BFC1BD04 = cpu->gpr[1]; uint32_t psx_brB_BFC1BD04 = cpu->gpr[0]; - psx_taken_BFC1BD04 = (psx_brA_BFC1BD04 == psx_brB_BFC1BD04); - psx_delay_BFC1BD04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1BD08: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033D08u); -#endif - if (psx_delay_BFC1BD04) { - psx_delay_BFC1BD04 = 0; - if (psx_taken_BFC1BD04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033CE8u); - goto label_BFC1BCE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D0Cu); - } -label_BFC1BD0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D0Cu); -#endif - /* 0xBFC1BD0C: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D0Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BD10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033D10u); -#endif - /* 0xBFC1BD14: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D14u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D14u); -#endif -label_BFC1BD18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BD18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033D18u); -#endif -label_BFC1BD1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D1Cu); -#endif - /* 0xBFC1BD1C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D1Cu); -#endif -label_BFC1BD20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BD20: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80033D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1BD24: 03E00008 jr $ra */ - psx_delay_BFC1BD24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BD28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033D28u); -#endif - if (psx_delay_BFC1BD24) { - psx_delay_BFC1BD24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1BD3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1BD3Cu); - int psx_delay_BFC1BD40 = 0; -label_BFC1BD3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BD3C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1BD40: 03E00008 jr $ra */ - psx_delay_BFC1BD40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1BD44: AC249E78 sw $a0, -24968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D44u); return; } g_debug_last_store_pc = 0x80033D44u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249E78u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D44u); -#endif - if (psx_delay_BFC1BD40) { - psx_delay_BFC1BD40 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1BD58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1BD58u); - int psx_delay_BFC1BD60 = 0; -label_BFC1BD58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1BD58: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033D58u); -#endif - /* 0xBFC1BD5C: 8C429F74 lw $v0, -24716($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F74u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1BD60: 03E00008 jr $ra */ - psx_delay_BFC1BD60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BD64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033D64u); -#endif - if (psx_delay_BFC1BD60) { - psx_delay_BFC1BD60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1BD68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1BD68u); - int psx_delay_BFC1BD78 = 0; - int psx_delay_BFC1BD90 = 0; - int psx_taken_BFC1BD90 = 0; - int psx_delay_BFC1BDA4 = 0; - int psx_taken_BFC1BDA4 = 0; - int psx_delay_BFC1BDB8 = 0; - int psx_taken_BFC1BDB8 = 0; - int psx_delay_BFC1BDCC = 0; - int psx_taken_BFC1BDCC = 0; - int psx_delay_BFC1BDD4 = 0; - int psx_delay_BFC1BDF0 = 0; - int psx_taken_BFC1BDF0 = 0; - int psx_delay_BFC1BE0C = 0; - int psx_delay_BFC1BE14 = 0; - int psx_delay_BFC1BE1C = 0; - int psx_taken_BFC1BE1C = 0; - int psx_delay_BFC1BE30 = 0; - int psx_taken_BFC1BE30 = 0; - int psx_delay_BFC1BE48 = 0; - int psx_taken_BFC1BE48 = 0; - int psx_delay_BFC1BE64 = 0; - int psx_delay_BFC1BE70 = 0; - int psx_delay_BFC1BE78 = 0; - int psx_delay_BFC1BE80 = 0; - int psx_taken_BFC1BE80 = 0; - int psx_delay_BFC1BE88 = 0; - int psx_delay_BFC1BE90 = 0; - int psx_taken_BFC1BE90 = 0; - int psx_delay_BFC1BE9C = 0; - int psx_delay_BFC1BEA8 = 0; - int psx_delay_BFC1BEB0 = 0; - int psx_delay_BFC1BEB8 = 0; - int psx_taken_BFC1BEB8 = 0; - int psx_delay_BFC1BEC0 = 0; - int psx_delay_BFC1BEC8 = 0; - int psx_taken_BFC1BEC8 = 0; - int psx_delay_BFC1BED8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1BD80u: goto label_BFC1BD80; - case 0xBFC1BD98u: goto label_BFC1BD98; - case 0xBFC1BDACu: goto label_BFC1BDAC; - case 0xBFC1BDC0u: goto label_BFC1BDC0; - case 0xBFC1BDD4u: goto label_BFC1BDD4; - case 0xBFC1BDDCu: goto label_BFC1BDDC; - case 0xBFC1BDF8u: goto label_BFC1BDF8; - case 0xBFC1BE14u: goto label_BFC1BE14; - case 0xBFC1BE1Cu: goto label_BFC1BE1C; - case 0xBFC1BE24u: goto label_BFC1BE24; - case 0xBFC1BE38u: goto label_BFC1BE38; - case 0xBFC1BE50u: goto label_BFC1BE50; - case 0xBFC1BE64u: goto label_BFC1BE64; - case 0xBFC1BE6Cu: goto label_BFC1BE6C; - case 0xBFC1BE78u: goto label_BFC1BE78; - case 0xBFC1BE80u: goto label_BFC1BE80; - case 0xBFC1BE88u: goto label_BFC1BE88; - case 0xBFC1BE90u: goto label_BFC1BE90; - case 0xBFC1BE98u: goto label_BFC1BE98; - case 0xBFC1BEA4u: goto label_BFC1BEA4; - case 0xBFC1BEB0u: goto label_BFC1BEB0; - case 0xBFC1BEB8u: goto label_BFC1BEB8; - case 0xBFC1BEC0u: goto label_BFC1BEC0; - case 0xBFC1BEC8u: goto label_BFC1BEC8; - case 0xBFC1BED0u: goto label_BFC1BED0; - case 0xBFC1BED4u: goto label_BFC1BED4; - default: break; - } - } -label_BFC1BD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BD68: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80033D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1BD6C: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D6Cu); return; } g_debug_last_store_pc = 0x80033D6Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1BD70: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D70u); return; } g_debug_last_store_pc = 0x80033D70u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D70u); -#endif - /* 0xBFC1BD74: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D74u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BD78: 0C00D26D jal 0xB00349B4 */ - cpu->gpr[31] = 0x80033D80u; /* jal link before delay slot */ - psx_delay_BFC1BD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BD7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033D7Cu); -#endif - if (psx_delay_BFC1BD78) { - psx_delay_BFC1BD78 = 0; - cpu->gpr[31] = 0x80033D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349B4u); - cpu->pc = 0x800349B4u; return; - } -label_BFC1BD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D80u); -#endif - /* 0xBFC1BD80: 8FAE0028 lw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D80u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BD84: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BD88: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC1BD8C: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1BD90: 11E00050 beq $t7, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BD90 = cpu->gpr[15]; uint32_t psx_brB_BFC1BD90 = cpu->gpr[0]; - psx_taken_BFC1BD90 = (psx_brA_BFC1BD90 == psx_brB_BFC1BD90); - psx_delay_BFC1BD90 = 1; - /* 0xBFC1BD94: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D94u); -#endif - if (psx_delay_BFC1BD90) { - psx_delay_BFC1BD90 = 0; - if (psx_taken_BFC1BD90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D98u); - } -label_BFC1BD98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BD98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1BD98: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033D98u); -#endif - /* 0xBFC1BD9C: 8F189DF8 lw $t8, -25096($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033D9Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BDA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1BDA4: 1700004B bne $t8, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BDA4 = cpu->gpr[24]; uint32_t psx_brB_BFC1BDA4 = cpu->gpr[0]; - psx_taken_BFC1BDA4 = (psx_brA_BFC1BDA4 != psx_brB_BFC1BDA4); - psx_delay_BFC1BDA4 = 1; - /* 0xBFC1BDA8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DA8u); -#endif - if (psx_delay_BFC1BDA4) { - psx_delay_BFC1BDA4 = 0; - if (psx_taken_BFC1BDA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033DACu); - } -label_BFC1BDAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BDACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1BDAC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DB0u); -#endif - /* 0xBFC1BDB0: 8F399DF4 lw $t9, -25100($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DB0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BDB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1BDB8: 17200046 bne $t9, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BDB8 = cpu->gpr[25]; uint32_t psx_brB_BFC1BDB8 = cpu->gpr[0]; - psx_taken_BFC1BDB8 = (psx_brA_BFC1BDB8 != psx_brB_BFC1BDB8); - psx_delay_BFC1BDB8 = 1; - /* 0xBFC1BDBC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DBCu); -#endif - if (psx_delay_BFC1BDB8) { - psx_delay_BFC1BDB8 = 0; - if (psx_taken_BFC1BDB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033DC0u); - } -label_BFC1BDC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BDC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1BDC0: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033DC0u); -#endif - /* 0xBFC1BDC4: 8D089E78 lw $t0, -24968($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DC4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BDC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1BDCC: 11000041 beq $t0, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BDCC = cpu->gpr[8]; uint32_t psx_brB_BFC1BDCC = cpu->gpr[0]; - psx_taken_BFC1BDCC = (psx_brA_BFC1BDCC == psx_brB_BFC1BDCC); - psx_delay_BFC1BDCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DD0u); -#endif - /* 0xBFC1BDD0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DD0u); -#endif - if (psx_delay_BFC1BDCC) { - psx_delay_BFC1BDCC = 0; - if (psx_taken_BFC1BDCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033DD4u); - } -label_BFC1BDD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BDD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BDD4: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x80033DDCu; /* jal link before delay slot */ - psx_delay_BFC1BDD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BDD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033DD8u); -#endif - if (psx_delay_BFC1BDD4) { - psx_delay_BFC1BDD4 = 0; - cpu->gpr[31] = 0x80033DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC1BDDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BDDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BDDC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1BDE0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1BDE4: AC229F6C sw $v0, -24724($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24724; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24724)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033DE4u); return; } g_debug_last_store_pc = 0x80033DE4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80033DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC1BDE8: 2469FFE1 addiu $t1, $v1, -31 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[3] + (-31)); - PGXP_ALU(0x2469FFE1u, cpu->gpr[9], _pgx1, 0xFFFFFFE1u); } -#ifdef PSX_COSIM - cosim_instr(0x80033DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1BDEC: 2D210005 sltiu $at, $t1, 5 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000005u ? 1 : 0); - PGXP_ALU(0x2D210005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x80033DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BDF0: 10200037 beq $at, $zero, 0xBFC1BED0 */ - uint32_t psx_brA_BFC1BDF0 = cpu->gpr[1]; uint32_t psx_brB_BFC1BDF0 = cpu->gpr[0]; - psx_taken_BFC1BDF0 = (psx_brA_BFC1BDF0 == psx_brB_BFC1BDF0); - psx_delay_BFC1BDF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC1BDF4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033DF4u); -#endif - if (psx_delay_BFC1BDF0) { - psx_delay_BFC1BDF0 = 0; - if (psx_taken_BFC1BDF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED0u); - goto label_BFC1BED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033DF8u); - } -label_BFC1BDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1BDF8: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BDFC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1BE00: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033E00u); -#endif - /* 0xBFC1BE04: 8C29AC54 lw $t1, -21420($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E04u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x2u); } - PGXP_LOAD(0x8C29AC54u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1BE0C: 01200008 jr $t1 */ - psx_delay_BFC1BE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E10u); -#endif - if (psx_delay_BFC1BE0C) { - psx_delay_BFC1BE0C = 0; - /* jump table at 0x8005AC54, 5 entries */ - switch (cpu->gpr[9]) { - case 0x80033E14u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E14u); - goto label_BFC1BE14; - case 0x80033E24u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E24u); - goto label_BFC1BE24; - case 0x80033E98u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E98u); - goto label_BFC1BE98; - case 0x80033EC0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033EC0u); - goto label_BFC1BEC0; - case 0x80033E88u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E88u); - goto label_BFC1BE88; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[9]); - cpu->pc = cpu->gpr[9]; return; - } - } -label_BFC1BE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE14: 0C00CFB8 jal 0xB0033EE0 */ - cpu->gpr[31] = 0x80033E1Cu; /* jal link before delay slot */ - psx_delay_BFC1BE14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E18u); -#endif - if (psx_delay_BFC1BE14) { - psx_delay_BFC1BE14 = 0; - cpu->gpr[31] = 0x80033E1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033EE0u); - cpu->pc = 0x80033EE0u; return; - } -label_BFC1BE1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE1C: 1000002D beq $zero, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BE1C = cpu->gpr[0]; uint32_t psx_brB_BFC1BE1C = cpu->gpr[0]; - psx_taken_BFC1BE1C = (psx_brA_BFC1BE1C == psx_brB_BFC1BE1C); - psx_delay_BFC1BE1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E20u); -#endif - /* 0xBFC1BE20: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E20u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E20u); -#endif - if (psx_delay_BFC1BE1C) { - psx_delay_BFC1BE1C = 0; - if (psx_taken_BFC1BE1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E24u); - } -label_BFC1BE24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1BE24: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033E24u); -#endif - /* 0xBFC1BE28: 8D4A9F70 lw $t2, -24720($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E28u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9F70u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1BE30: 15400027 bne $t2, $zero, 0xBFC1BED0 */ - uint32_t psx_brA_BFC1BE30 = cpu->gpr[10]; uint32_t psx_brB_BFC1BE30 = cpu->gpr[0]; - psx_taken_BFC1BE30 = (psx_brA_BFC1BE30 != psx_brB_BFC1BE30); - psx_delay_BFC1BE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BE34: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033E34u); -#endif - if (psx_delay_BFC1BE30) { - psx_delay_BFC1BE30 = 0; - if (psx_taken_BFC1BE30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED0u); - goto label_BFC1BED0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E38u); - } -label_BFC1BE38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1BE38: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033E38u); -#endif - /* 0xBFC1BE3C: 8D6B9F64 lw $t3, -24732($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E3Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F64u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BE40: AC209F74 sw $zero, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E40u); return; } g_debug_last_store_pc = 0x80033E40u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BE44: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1BE48: 15610006 bne $t3, $at, 0xBFC1BE64 */ - uint32_t psx_brA_BFC1BE48 = cpu->gpr[11]; uint32_t psx_brB_BFC1BE48 = cpu->gpr[1]; - psx_taken_BFC1BE48 = (psx_brA_BFC1BE48 != psx_brB_BFC1BE48); - psx_delay_BFC1BE48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BE4C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033E4Cu); -#endif - if (psx_delay_BFC1BE48) { - psx_delay_BFC1BE48 = 0; - if (psx_taken_BFC1BE48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E64u); - goto label_BFC1BE64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E50u); - } -label_BFC1BE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1BE50: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033E50u); -#endif - /* 0xBFC1BE54: 8D8C9E6C lw $t4, -24980($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E54u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E6Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BE58: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1BE5C: AC2C9F64 sw $t4, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E5Cu); return; } g_debug_last_store_pc = 0x80033E5Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9F64u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BE60: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033E60u); -#endif -label_BFC1BE64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE64: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80033E6Cu; /* jal link before delay slot */ - psx_delay_BFC1BE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1BE68: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E68u); return; } g_debug_last_store_pc = 0x80033E68u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E68u); -#endif - if (psx_delay_BFC1BE64) { - psx_delay_BFC1BE64 = 0; - cpu->gpr[31] = 0x80033E6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1BE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E6Cu); -#endif - /* 0xBFC1BE6C: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE70: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033E78u; /* jal link before delay slot */ - psx_delay_BFC1BE70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BE74: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033E74u); -#endif - if (psx_delay_BFC1BE70) { - psx_delay_BFC1BE70 = 0; - cpu->gpr[31] = 0x80033E78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1BE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE78: 0C00D04C jal 0xB0034130 */ - cpu->gpr[31] = 0x80033E80u; /* jal link before delay slot */ - psx_delay_BFC1BE78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E7Cu); -#endif - if (psx_delay_BFC1BE78) { - psx_delay_BFC1BE78 = 0; - cpu->gpr[31] = 0x80033E80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034130u); - cpu->pc = 0x80034130u; return; - } -label_BFC1BE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE80: 10000014 beq $zero, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BE80 = cpu->gpr[0]; uint32_t psx_brB_BFC1BE80 = cpu->gpr[0]; - psx_taken_BFC1BE80 = (psx_brA_BFC1BE80 == psx_brB_BFC1BE80); - psx_delay_BFC1BE80 = 1; - /* 0xBFC1BE84: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E84u); -#endif - if (psx_delay_BFC1BE80) { - psx_delay_BFC1BE80 = 0; - if (psx_taken_BFC1BE80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E88u); - } -label_BFC1BE88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE88: 0C00D130 jal 0xB00344C0 */ - cpu->gpr[31] = 0x80033E90u; /* jal link before delay slot */ - psx_delay_BFC1BE88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033E8Cu); -#endif - if (psx_delay_BFC1BE88) { - psx_delay_BFC1BE88 = 0; - cpu->gpr[31] = 0x80033E90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344C0u); - cpu->pc = 0x800344C0u; return; - } -label_BFC1BE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BE90: 10000010 beq $zero, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BE90 = cpu->gpr[0]; uint32_t psx_brB_BFC1BE90 = cpu->gpr[0]; - psx_taken_BFC1BE90 = (psx_brA_BFC1BE90 == psx_brB_BFC1BE90); - psx_delay_BFC1BE90 = 1; - /* 0xBFC1BE94: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033E94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033E94u); -#endif - if (psx_delay_BFC1BE90) { - psx_delay_BFC1BE90 = 0; - if (psx_taken_BFC1BE90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033E98u); - } -label_BFC1BE98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BE98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BE98: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BE9C: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80033EA4u; /* jal link before delay slot */ - psx_delay_BFC1BE9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1BEA0: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EA0u); return; } g_debug_last_store_pc = 0x80033EA0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EA0u); -#endif - if (psx_delay_BFC1BE9C) { - psx_delay_BFC1BE9C = 0; - cpu->gpr[31] = 0x80033EA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1BEA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EA4u); -#endif - /* 0xBFC1BEA4: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EA4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BEA8: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033EB0u; /* jal link before delay slot */ - psx_delay_BFC1BEA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BEAC: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033EACu); -#endif - if (psx_delay_BFC1BEA8) { - psx_delay_BFC1BEA8 = 0; - cpu->gpr[31] = 0x80033EB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1BEB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BEB0: 0C00D16E jal 0xB00345B8 */ - cpu->gpr[31] = 0x80033EB8u; /* jal link before delay slot */ - psx_delay_BFC1BEB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033EB4u); -#endif - if (psx_delay_BFC1BEB0) { - psx_delay_BFC1BEB0 = 0; - cpu->gpr[31] = 0x80033EB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345B8u); - cpu->pc = 0x800345B8u; return; - } -label_BFC1BEB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEB8: 10000006 beq $zero, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BEB8 = cpu->gpr[0]; uint32_t psx_brB_BFC1BEB8 = cpu->gpr[0]; - psx_taken_BFC1BEB8 = (psx_brA_BFC1BEB8 == psx_brB_BFC1BEB8); - psx_delay_BFC1BEB8 = 1; - /* 0xBFC1BEBC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EBCu); -#endif - if (psx_delay_BFC1BEB8) { - psx_delay_BFC1BEB8 = 0; - if (psx_taken_BFC1BEB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033EC0u); - } -label_BFC1BEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BEC0: 0C00D1E3 jal 0xB003478C */ - cpu->gpr[31] = 0x80033EC8u; /* jal link before delay slot */ - psx_delay_BFC1BEC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033EC4u); -#endif - if (psx_delay_BFC1BEC0) { - psx_delay_BFC1BEC0 = 0; - cpu->gpr[31] = 0x80033EC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003478Cu); - cpu->pc = 0x8003478Cu; return; - } -label_BFC1BEC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEC8: 10000002 beq $zero, $zero, 0xBFC1BED4 */ - uint32_t psx_brA_BFC1BEC8 = cpu->gpr[0]; uint32_t psx_brB_BFC1BEC8 = cpu->gpr[0]; - psx_taken_BFC1BEC8 = (psx_brA_BFC1BEC8 == psx_brB_BFC1BEC8); - psx_delay_BFC1BEC8 = 1; - /* 0xBFC1BECC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033ECCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033ECCu); -#endif - if (psx_delay_BFC1BEC8) { - psx_delay_BFC1BEC8 = 0; - if (psx_taken_BFC1BEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED4u); - goto label_BFC1BED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033ED0u); - } -label_BFC1BED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033ED0u); -#endif - /* 0xBFC1BED0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033ED0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033ED0u); -#endif -label_BFC1BED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BED4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80033ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1BED8: 03E00008 jr $ra */ - psx_delay_BFC1BED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033EDCu); -#endif - if (psx_delay_BFC1BED8) { - psx_delay_BFC1BED8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1BEE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1BEE0u); - int psx_delay_BFC1BEEC = 0; - int psx_taken_BFC1BEEC = 0; - int psx_delay_BFC1BF00 = 0; - int psx_taken_BFC1BF00 = 0; - int psx_delay_BFC1BF14 = 0; - int psx_taken_BFC1BF14 = 0; - int psx_delay_BFC1BF2C = 0; - int psx_delay_BFC1BF3C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1BEF4u: goto label_BFC1BEF4; - case 0xBFC1BF08u: goto label_BFC1BF08; - case 0xBFC1BF1Cu: goto label_BFC1BF1C; - case 0xBFC1BF2Cu: goto label_BFC1BF2C; - case 0xBFC1BF34u: goto label_BFC1BF34; - case 0xBFC1BF38u: goto label_BFC1BF38; - default: break; - } - } -label_BFC1BEE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1BEE0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033EE0u); -#endif - /* 0xBFC1BEE4: 8DCE9F70 lw $t6, -24720($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EE4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BEE8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80033EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1BEEC: 15C00006 bne $t6, $zero, 0xBFC1BF08 */ - uint32_t psx_brA_BFC1BEEC = cpu->gpr[14]; uint32_t psx_brB_BFC1BEEC = cpu->gpr[0]; - psx_taken_BFC1BEEC = (psx_brA_BFC1BEEC != psx_brB_BFC1BEEC); - psx_delay_BFC1BEEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1BEF0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EF0u); return; } g_debug_last_store_pc = 0x80033EF0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EF0u); -#endif - if (psx_delay_BFC1BEEC) { - psx_delay_BFC1BEEC = 0; - if (psx_taken_BFC1BEEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F08u); - goto label_BFC1BF08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033EF4u); - } -label_BFC1BEF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BEF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1BEF4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033EF4u); -#endif - /* 0xBFC1BEF8: 8DEF9F78 lw $t7, -24712($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033EF8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80033EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BEFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1BF00: 11E0000D beq $t7, $zero, 0xBFC1BF38 */ - uint32_t psx_brA_BFC1BF00 = cpu->gpr[15]; uint32_t psx_brB_BFC1BF00 = cpu->gpr[0]; - psx_taken_BFC1BF00 = (psx_brA_BFC1BF00 == psx_brB_BFC1BF00); - psx_delay_BFC1BF00 = 1; - /* 0xBFC1BF04: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F04u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F04u); -#endif - if (psx_delay_BFC1BF00) { - psx_delay_BFC1BF00 = 0; - if (psx_taken_BFC1BF00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F38u); - goto label_BFC1BF38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F08u); - } -label_BFC1BF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1BF08: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F08u); -#endif - /* 0xBFC1BF0C: 8F189F64 lw $t8, -24732($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F0Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F64u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BF10: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80033F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1BF14: 17010005 bne $t8, $at, 0xBFC1BF2C */ - uint32_t psx_brA_BFC1BF14 = cpu->gpr[24]; uint32_t psx_brB_BFC1BF14 = cpu->gpr[1]; - psx_taken_BFC1BF14 = (psx_brA_BFC1BF14 != psx_brB_BFC1BF14); - psx_delay_BFC1BF14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BF18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033F18u); -#endif - if (psx_delay_BFC1BF14) { - psx_delay_BFC1BF14 = 0; - if (psx_taken_BFC1BF14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F2Cu); - goto label_BFC1BF2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F1Cu); - } -label_BFC1BF1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1BF1C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F20u); -#endif - /* 0xBFC1BF20: 8F399E6C lw $t9, -24980($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F20u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E6Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BF24: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1BF28: AC399F64 sw $t9, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F28u); return; } g_debug_last_store_pc = 0x80033F28u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F64u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F28u); -#endif -label_BFC1BF2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BF2C: 0C00CFD1 jal 0xB0033F44 */ - cpu->gpr[31] = 0x80033F34u; /* jal link before delay slot */ - psx_delay_BFC1BF2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BF30: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033F30u); -#endif - if (psx_delay_BFC1BF2C) { - psx_delay_BFC1BF2C = 0; - cpu->gpr[31] = 0x80033F34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F44u); - cpu->pc = 0x80033F44u; return; - } -label_BFC1BF34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F34u); -#endif - /* 0xBFC1BF34: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F34u); -#endif -label_BFC1BF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BF38: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80033F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1BF3C: 03E00008 jr $ra */ - psx_delay_BFC1BF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1BF40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80033F40u); -#endif - if (psx_delay_BFC1BF3C) { - psx_delay_BFC1BF3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1BF44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1BF44u); - int psx_delay_BFC1BF5C = 0; - int psx_delay_BFC1BF78 = 0; - int psx_delay_BFC1BF88 = 0; - int psx_delay_BFC1BFC0 = 0; - int psx_taken_BFC1BFC0 = 0; - int psx_delay_BFC1BFDC = 0; - int psx_delay_BFC1BFE4 = 0; - int psx_delay_BFC1BFF0 = 0; - int psx_delay_BFC1C008 = 0; - int psx_taken_BFC1C008 = 0; - int psx_delay_BFC1C028 = 0; - int psx_taken_BFC1C028 = 0; - int psx_delay_BFC1C040 = 0; - int psx_taken_BFC1C040 = 0; - int psx_delay_BFC1C04C = 0; - int psx_delay_BFC1C054 = 0; - int psx_delay_BFC1C060 = 0; - int psx_delay_BFC1C068 = 0; - int psx_delay_BFC1C074 = 0; - int psx_delay_BFC1C08C = 0; - int psx_taken_BFC1C08C = 0; - int psx_delay_BFC1C0A8 = 0; - int psx_taken_BFC1C0A8 = 0; - int psx_delay_BFC1C0B0 = 0; - int psx_taken_BFC1C0B0 = 0; - int psx_delay_BFC1C0C8 = 0; - int psx_taken_BFC1C0C8 = 0; - int psx_delay_BFC1C0D0 = 0; - int psx_taken_BFC1C0D0 = 0; - int psx_delay_BFC1C0E4 = 0; - int psx_delay_BFC1C0FC = 0; - int psx_taken_BFC1C0FC = 0; - int psx_delay_BFC1C104 = 0; - int psx_taken_BFC1C104 = 0; - int psx_delay_BFC1C114 = 0; - int psx_delay_BFC1C128 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1BF64u: goto label_BFC1BF64; - case 0xBFC1BF80u: goto label_BFC1BF80; - case 0xBFC1BF90u: goto label_BFC1BF90; - case 0xBFC1BFC8u: goto label_BFC1BFC8; - case 0xBFC1BFD4u: goto label_BFC1BFD4; - case 0xBFC1BFE4u: goto label_BFC1BFE4; - case 0xBFC1BFECu: goto label_BFC1BFEC; - case 0xBFC1BFF8u: goto label_BFC1BFF8; - case 0xBFC1C010u: goto label_BFC1C010; - case 0xBFC1C018u: goto label_BFC1C018; - case 0xBFC1C030u: goto label_BFC1C030; - case 0xBFC1C03Cu: goto label_BFC1C03C; - case 0xBFC1C048u: goto label_BFC1C048; - case 0xBFC1C054u: goto label_BFC1C054; - case 0xBFC1C05Cu: goto label_BFC1C05C; - case 0xBFC1C068u: goto label_BFC1C068; - case 0xBFC1C070u: goto label_BFC1C070; - case 0xBFC1C07Cu: goto label_BFC1C07C; - case 0xBFC1C094u: goto label_BFC1C094; - case 0xBFC1C09Cu: goto label_BFC1C09C; - case 0xBFC1C0B0u: goto label_BFC1C0B0; - case 0xBFC1C0B8u: goto label_BFC1C0B8; - case 0xBFC1C0D0u: goto label_BFC1C0D0; - case 0xBFC1C0D8u: goto label_BFC1C0D8; - case 0xBFC1C0ECu: goto label_BFC1C0EC; - case 0xBFC1C104u: goto label_BFC1C104; - case 0xBFC1C10Cu: goto label_BFC1C10C; - case 0xBFC1C114u: goto label_BFC1C114; - case 0xBFC1C11Cu: goto label_BFC1C11C; - default: break; - } - } -label_BFC1BF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1BF44: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1BF48: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F48u); return; } g_debug_last_store_pc = 0x80033F48u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1BF4C: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F4Cu); return; } g_debug_last_store_pc = 0x80033F4Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1BF50: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F50u); return; } g_debug_last_store_pc = 0x80033F50u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1BF54: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F54u); return; } g_debug_last_store_pc = 0x80033F54u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BF58: 24040033 addiu $a0, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24040033u, cpu->gpr[4], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80033F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BF5C: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80033F64u; /* jal link before delay slot */ - psx_delay_BFC1BF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BF60: 2405001F addiu $a1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2405001Fu, cpu->gpr[5], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80033F60u); -#endif - if (psx_delay_BFC1BF5C) { - psx_delay_BFC1BF5C = 0; - cpu->gpr[31] = 0x80033F64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1BF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BF64: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BF68: AC209F70 sw $zero, -24720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F68u); return; } g_debug_last_store_pc = 0x80033F68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BF6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BF70: AC209F78 sw $zero, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F70u); return; } g_debug_last_store_pc = 0x80033F70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F78u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BF74: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BF78: 0C00D350 jal 0xB0034D40 */ - cpu->gpr[31] = 0x80033F80u; /* jal link before delay slot */ - psx_delay_BFC1BF78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BF7C: AC209F7C sw $zero, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F7Cu); return; } g_debug_last_store_pc = 0x80033F7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F7Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F7Cu); -#endif - if (psx_delay_BFC1BF78) { - psx_delay_BFC1BF78 = 0; - cpu->gpr[31] = 0x80033F80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D40u); - cpu->pc = 0x80034D40u; return; - } -label_BFC1BF80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BF80: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BF84: AC209F74 sw $zero, -24716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F84u); return; } g_debug_last_store_pc = 0x80033F84u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BF88: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80033F90u; /* jal link before delay slot */ - psx_delay_BFC1BF88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1BF8C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033F8Cu); -#endif - if (psx_delay_BFC1BF88) { - psx_delay_BFC1BF88 = 0; - cpu->gpr[31] = 0x80033F90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1BF90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BF90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1BF90: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F90u); -#endif - /* 0xBFC1BF94: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033F94u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80033F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1BF98: 3C12800F lui $s2, 0x800F */ - cpu->gpr[18] = 0x800F0000u; - PGXP_ALU(0x3C12800Fu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1BF9C: 2652D0F0 addiu $s2, $s2, -12048 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-12048)); - PGXP_ALU(0x2652D0F0u, cpu->gpr[18], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80033F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1BFA0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80033FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1048000u); -#endif - /* 0xBFC1BFA4: 024FC021 addu $t8, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033FA4u); -#endif - /* 0xBFC1BFA8: 8F190000 lw $t9, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033FA8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BFAC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FB0u); -#endif - /* 0xBFC1BFB0: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1BFB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1BFB8: AC399E5C sw $t9, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033FB8u); return; } g_debug_last_store_pc = 0x80033FB8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E5Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1BFBC: 2C610002 sltiu $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2C610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80033FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1BFC0: 14200015 bne $at, $zero, 0xBFC1C018 */ - uint32_t psx_brA_BFC1BFC0 = cpu->gpr[1]; uint32_t psx_brB_BFC1BFC0 = cpu->gpr[0]; - psx_taken_BFC1BFC0 = (psx_brA_BFC1BFC0 != psx_brB_BFC1BFC0); - psx_delay_BFC1BFC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1BFC4: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80033FC4u); -#endif - if (psx_delay_BFC1BFC0) { - psx_delay_BFC1BFC0 = 0; - if (psx_taken_BFC1BFC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034018u); - goto label_BFC1C018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033FC8u); - } -label_BFC1BFC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BFC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1BFC8: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033FC8u); return; } g_debug_last_store_pc = 0x80033FC8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BFCC: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1BFD0: 2631D0F4 addiu $s1, $s1, -12044 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12044)); - PGXP_ALU(0x2631D0F4u, cpu->gpr[17], _pgx1, 0xFFFFD0F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80033FD0u); -#endif -label_BFC1BFD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BFD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1BFD4: AE200000 sw $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033FD4u); return; } g_debug_last_store_pc = 0x80033FD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1BFD8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BFDC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80033FE4u; /* jal link before delay slot */ - psx_delay_BFC1BFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BFE0: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80033FE0u); -#endif - if (psx_delay_BFC1BFDC) { - psx_delay_BFC1BFDC = 0; - cpu->gpr[31] = 0x80033FE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1BFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BFE4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80033FECu; /* jal link before delay slot */ - psx_delay_BFC1BFE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1BFE8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033FE8u); -#endif - if (psx_delay_BFC1BFE4) { - psx_delay_BFC1BFE4 = 0; - cpu->gpr[31] = 0x80033FECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1BFEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BFECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1BFEC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80033FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1BFF0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80033FF8u; /* jal link before delay slot */ - psx_delay_BFC1BFF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1BFF4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80033FF4u); -#endif - if (psx_delay_BFC1BFF0) { - psx_delay_BFC1BFF0 = 0; - cpu->gpr[31] = 0x80033FF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1BFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1BFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1BFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80033FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1BFF8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80033FF8u); -#endif - /* 0xBFC1BFFC: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80033FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C000: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000Au); -#endif - /* 0xBFC1C004: 0203082B sltu $at, $s0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0203082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C008: 1420FFF2 bne $at, $zero, 0xBFC1BFD4 */ - uint32_t psx_brA_BFC1C008 = cpu->gpr[1]; uint32_t psx_brB_BFC1C008 = cpu->gpr[0]; - psx_taken_BFC1C008 = (psx_brA_BFC1C008 != psx_brB_BFC1C008); - psx_delay_BFC1C008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C00C: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003400Cu); -#endif - if (psx_delay_BFC1C008) { - psx_delay_BFC1C008 = 0; - if (psx_taken_BFC1C008) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033FD4u); - goto label_BFC1BFD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034010u); - } -label_BFC1C010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034010u); -#endif - /* 0xBFC1C010: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034010u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C014: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034014u); -#endif -label_BFC1C018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C018: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034018u); -#endif - /* 0xBFC1C01C: 91089E71 lbu $t0, -24975($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24975; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24975)), 8, 0x100u); - PGXP_LOAD(0x91089E71u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003401Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1C020: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC1C024: 0102082B sltu $at, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0102082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C028: 1420001C bne $at, $zero, 0xBFC1C09C */ - uint32_t psx_brA_BFC1C028 = cpu->gpr[1]; uint32_t psx_brB_BFC1C028 = cpu->gpr[0]; - psx_taken_BFC1C028 = (psx_brA_BFC1C028 != psx_brB_BFC1C028); - psx_delay_BFC1C028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1C02C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003402Cu); -#endif - if (psx_delay_BFC1C028) { - psx_delay_BFC1C028 = 0; - if (psx_taken_BFC1C028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003409Cu); - goto label_BFC1C09C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034030u); - } -label_BFC1C030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1C030: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034030u); return; } g_debug_last_store_pc = 0x80034030u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC1C034: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60200u); -#endif - /* 0xBFC1C038: 02498821 addu $s1, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[17] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02498821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034038u); -#endif -label_BFC1C03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C03C: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x8003403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C040: 10200009 beq $at, $zero, 0xBFC1C068 */ - uint32_t psx_brA_BFC1C040 = cpu->gpr[1]; uint32_t psx_brB_BFC1C040 = cpu->gpr[0]; - psx_taken_BFC1C040 = (psx_brA_BFC1C040 == psx_brB_BFC1C040); - psx_delay_BFC1C040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1C044: AE300000 sw $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034044u); return; } g_debug_last_store_pc = 0x80034044u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAE300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80034044u); -#endif - if (psx_delay_BFC1C040) { - psx_delay_BFC1C040 = 0; - if (psx_taken_BFC1C040) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034068u); - goto label_BFC1C068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034048u); - } -label_BFC1C048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C048: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C04C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80034054u; /* jal link before delay slot */ - psx_delay_BFC1C04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C050: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034050u); -#endif - if (psx_delay_BFC1C04C) { - psx_delay_BFC1C04C = 0; - cpu->gpr[31] = 0x80034054u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C054: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003405Cu; /* jal link before delay slot */ - psx_delay_BFC1C054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C058: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034058u); -#endif - if (psx_delay_BFC1C054) { - psx_delay_BFC1C054 = 0; - cpu->gpr[31] = 0x8003405Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1C05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003405Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1C05C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003405Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C060: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80034068u; /* jal link before delay slot */ - psx_delay_BFC1C060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C064: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80034064u); -#endif - if (psx_delay_BFC1C060) { - psx_delay_BFC1C060 = 0; - cpu->gpr[31] = 0x80034068u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1C068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C068: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80034070u; /* jal link before delay slot */ - psx_delay_BFC1C068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C06C: 24040016 addiu $a0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24040016u, cpu->gpr[4], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8003406Cu); -#endif - if (psx_delay_BFC1C068) { - psx_delay_BFC1C068 = 0; - cpu->gpr[31] = 0x80034070u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1C070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1C070: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C074: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003407Cu; /* jal link before delay slot */ - psx_delay_BFC1C074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C078: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80034078u); -#endif - if (psx_delay_BFC1C074) { - psx_delay_BFC1C074 = 0; - cpu->gpr[31] = 0x8003407Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1C07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1C07C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034080u); -#endif - /* 0xBFC1C080: 914A9E71 lbu $t2, -24975($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24975; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (-24975)), 10, 0x400u); - PGXP_LOAD(0x914A9E71u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C084: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10402u); -#endif - /* 0xBFC1C088: 0150082B sltu $at, $t2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0150082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C08C: 1020FFEB beq $at, $zero, 0xBFC1C03C */ - uint32_t psx_brA_BFC1C08C = cpu->gpr[1]; uint32_t psx_brB_BFC1C08C = cpu->gpr[0]; - psx_taken_BFC1C08C = (psx_brA_BFC1C08C == psx_brB_BFC1C08C); - psx_delay_BFC1C08C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C090: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034090u); -#endif - if (psx_delay_BFC1C08C) { - psx_delay_BFC1C08C = 0; - if (psx_taken_BFC1C08C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003403Cu); - goto label_BFC1C03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034094u); - } -label_BFC1C094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034094u); -#endif - /* 0xBFC1C094: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034094u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C098: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034098u); -#endif -label_BFC1C09C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C09Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C09C: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340A0u); -#endif - /* 0xBFC1C0A0: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800340A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800340A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C0A4: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800340A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C0A8: 10410003 beq $v0, $at, 0xBFC1C0B8 */ - uint32_t psx_brA_BFC1C0A8 = cpu->gpr[2]; uint32_t psx_brB_BFC1C0A8 = cpu->gpr[1]; - psx_taken_BFC1C0A8 = (psx_brA_BFC1C0A8 == psx_brB_BFC1C0A8); - psx_delay_BFC1C0A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C0AC: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800340ACu); -#endif - if (psx_delay_BFC1C0A8) { - psx_delay_BFC1C0A8 = 0; - if (psx_taken_BFC1C0A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340B8u); - goto label_BFC1C0B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340B0u); - } -label_BFC1C0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C0B0: 14410016 bne $v0, $at, 0xBFC1C10C */ - uint32_t psx_brA_BFC1C0B0 = cpu->gpr[2]; uint32_t psx_brB_BFC1C0B0 = cpu->gpr[1]; - psx_taken_BFC1C0B0 = (psx_brA_BFC1C0B0 != psx_brB_BFC1C0B0); - psx_delay_BFC1C0B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C0B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800340B4u); -#endif - if (psx_delay_BFC1C0B0) { - psx_delay_BFC1C0B0 = 0; - if (psx_taken_BFC1C0B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003410Cu); - goto label_BFC1C10C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340B8u); - } -label_BFC1C0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1C0B8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800340B8u); -#endif - /* 0xBFC1C0BC: 8D6B9E5C lw $t3, -24996($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800340BCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800340BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1C0C0: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800340C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1C0C4: 29610002 slti $at, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (2) ? 1 : 0); - PGXP_ALU(0x29610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800340C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C0C8: 14200012 bne $at, $zero, 0xBFC1C114 */ - uint32_t psx_brA_BFC1C0C8 = cpu->gpr[1]; uint32_t psx_brB_BFC1C0C8 = cpu->gpr[0]; - psx_taken_BFC1C0C8 = (psx_brA_BFC1C0C8 != psx_brB_BFC1C0C8); - psx_delay_BFC1C0C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C0CC: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800340CCu); -#endif - if (psx_delay_BFC1C0C8) { - psx_delay_BFC1C0C8 = 0; - if (psx_taken_BFC1C0C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034114u); - goto label_BFC1C114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340D0u); - } -label_BFC1C0D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C0D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C0D0: 10200010 beq $at, $zero, 0xBFC1C114 */ - uint32_t psx_brA_BFC1C0D0 = cpu->gpr[1]; uint32_t psx_brB_BFC1C0D0 = cpu->gpr[0]; - psx_taken_BFC1C0D0 = (psx_brA_BFC1C0D0 == psx_brB_BFC1C0D0); - psx_delay_BFC1C0D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C0D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800340D4u); -#endif - if (psx_delay_BFC1C0D0) { - psx_delay_BFC1C0D0 = 0; - if (psx_taken_BFC1C0D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034114u); - goto label_BFC1C114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340D8u); - } -label_BFC1C0D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C0D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC1C0D8: 00106080 sll $t4, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00106080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800340D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43000u); -#endif - /* 0xBFC1C0DC: 024C6821 addu $t5, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800340DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340E0u); -#endif - /* 0xBFC1C0E0: 8DA40000 lw $a0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800340E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000u); } - PGXP_LOAD(0x8DA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800340E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C0E4: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800340ECu; /* jal link before delay slot */ - psx_delay_BFC1C0E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C0E8: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800340E8u); -#endif - if (psx_delay_BFC1C0E4) { - psx_delay_BFC1C0E4 = 0; - cpu->gpr[31] = 0x800340ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C0EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C0ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C0EC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800340ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800340F0u); -#endif - /* 0xBFC1C0F0: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800340F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800340F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C0F4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800340F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14002u); -#endif - /* 0xBFC1C0F8: 020E082A slt $at, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x020E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800340F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C0FC: 1420FFF4 bne $at, $zero, 0xBFC1C0D0 */ - uint32_t psx_brA_BFC1C0FC = cpu->gpr[1]; uint32_t psx_brB_BFC1C0FC = cpu->gpr[0]; - psx_taken_BFC1C0FC = (psx_brA_BFC1C0FC != psx_brB_BFC1C0FC); - psx_delay_BFC1C0FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C100: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034100u); -#endif - if (psx_delay_BFC1C0FC) { - psx_delay_BFC1C0FC = 0; - if (psx_taken_BFC1C0FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800340D0u); - goto label_BFC1C0D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034104u); - } -label_BFC1C104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C104: 10000003 beq $zero, $zero, 0xBFC1C114 */ - uint32_t psx_brA_BFC1C104 = cpu->gpr[0]; uint32_t psx_brB_BFC1C104 = cpu->gpr[0]; - psx_taken_BFC1C104 = (psx_brA_BFC1C104 == psx_brB_BFC1C104); - psx_delay_BFC1C104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C108: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034108u); -#endif - if (psx_delay_BFC1C104) { - psx_delay_BFC1C104 = 0; - if (psx_taken_BFC1C104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034114u); - goto label_BFC1C114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003410Cu); - } -label_BFC1C10C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C10Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C10C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C110: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034110u); return; } g_debug_last_store_pc = 0x80034110u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034110u); -#endif -label_BFC1C114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C114: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x8003411Cu; /* jal link before delay slot */ - psx_delay_BFC1C114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034118u); -#endif - if (psx_delay_BFC1C114) { - psx_delay_BFC1C114 = 0; - cpu->gpr[31] = 0x8003411Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003411Cu); -#endif - /* 0xBFC1C11C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003411Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003411Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034120u); -#endif - /* 0xBFC1C120: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034120u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80034120u); -#endif - /* 0xBFC1C124: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034124u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80034124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C128: 03E00008 jr $ra */ - psx_delay_BFC1C128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C12C: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003412Cu); -#endif - if (psx_delay_BFC1C128) { - psx_delay_BFC1C128 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C130(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C130u); - int psx_delay_BFC1C14C = 0; - int psx_taken_BFC1C14C = 0; - int psx_delay_BFC1C168 = 0; - int psx_taken_BFC1C168 = 0; - int psx_delay_BFC1C180 = 0; - int psx_taken_BFC1C180 = 0; - int psx_delay_BFC1C18C = 0; - int psx_delay_BFC1C19C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C154u: goto label_BFC1C154; - case 0xBFC1C15Cu: goto label_BFC1C15C; - case 0xBFC1C170u: goto label_BFC1C170; - case 0xBFC1C174u: goto label_BFC1C174; - case 0xBFC1C188u: goto label_BFC1C188; - case 0xBFC1C18Cu: goto label_BFC1C18C; - case 0xBFC1C194u: goto label_BFC1C194; - default: break; - } - } -label_BFC1C130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C130: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034130u); -#endif - /* 0xBFC1C134: 8DEF9F68 lw $t7, -24728($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034134u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F68u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C138: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80034138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C13C: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003413Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1C140: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C144: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C148: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034148u); return; } g_debug_last_store_pc = 0x80034148u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1C14C: 11E20003 beq $t7, $v0, 0xBFC1C15C */ - uint32_t psx_brA_BFC1C14C = cpu->gpr[15]; uint32_t psx_brB_BFC1C14C = cpu->gpr[2]; - psx_taken_BFC1C14C = (psx_brA_BFC1C14C == psx_brB_BFC1C14C); - psx_delay_BFC1C14C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1C150: AC2E9F70 sw $t6, -24720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034150u); return; } g_debug_last_store_pc = 0x80034150u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034150u); -#endif - if (psx_delay_BFC1C14C) { - psx_delay_BFC1C14C = 0; - if (psx_taken_BFC1C14C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003415Cu); - goto label_BFC1C15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034154u); - } -label_BFC1C154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C154: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C158: AC209F68 sw $zero, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034158u); return; } g_debug_last_store_pc = 0x80034158u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034158u); -#endif -label_BFC1C15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003415Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1C15C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003415Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034160u); -#endif - /* 0xBFC1C160: 8F189F64 lw $t8, -24732($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034160u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F64u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80034160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C164: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1C168: 17020002 bne $t8, $v0, 0xBFC1C174 */ - uint32_t psx_brA_BFC1C168 = cpu->gpr[24]; uint32_t psx_brB_BFC1C168 = cpu->gpr[2]; - psx_taken_BFC1C168 = (psx_brA_BFC1C168 != psx_brB_BFC1C168); - psx_delay_BFC1C168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C16C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003416Cu); -#endif - if (psx_delay_BFC1C168) { - psx_delay_BFC1C168 = 0; - if (psx_taken_BFC1C168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034174u); - goto label_BFC1C174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034170u); - } -label_BFC1C170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C170: AC209F64 sw $zero, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034170u); return; } g_debug_last_store_pc = 0x80034170u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034170u); -#endif -label_BFC1C174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1C174: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034174u); -#endif - /* 0xBFC1C178: 8F399F78 lw $t9, -24712($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034178u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F78u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C17C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C180: 13200002 beq $t9, $zero, 0xBFC1C18C */ - uint32_t psx_brA_BFC1C180 = cpu->gpr[25]; uint32_t psx_brB_BFC1C180 = cpu->gpr[0]; - psx_taken_BFC1C180 = (psx_brA_BFC1C180 == psx_brB_BFC1C180); - psx_delay_BFC1C180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C184: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034184u); -#endif - if (psx_delay_BFC1C180) { - psx_delay_BFC1C180 = 0; - if (psx_taken_BFC1C180) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003418Cu); - goto label_BFC1C18C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034188u); - } -label_BFC1C188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C188: AC209F78 sw $zero, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034188u); return; } g_debug_last_store_pc = 0x80034188u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F78u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034188u); -#endif -label_BFC1C18C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C18Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003418Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C18C: 0C00D069 jal 0xB00341A4 */ - cpu->gpr[31] = 0x80034194u; /* jal link before delay slot */ - psx_delay_BFC1C18C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C190: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034190u); -#endif - if (psx_delay_BFC1C18C) { - psx_delay_BFC1C18C = 0; - cpu->gpr[31] = 0x80034194u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800341A4u); - cpu->pc = 0x800341A4u; return; - } -label_BFC1C194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034194u); -#endif - /* 0xBFC1C194: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034194u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C198: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80034198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C19C: 03E00008 jr $ra */ - psx_delay_BFC1C19C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C1A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800341A0u); -#endif - if (psx_delay_BFC1C19C) { - psx_delay_BFC1C19C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C1A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C1A4u); - int psx_delay_BFC1C1C0 = 0; - int psx_taken_BFC1C1C0 = 0; - int psx_delay_BFC1C1DC = 0; - int psx_delay_BFC1C1E4 = 0; - int psx_delay_BFC1C1F0 = 0; - int psx_delay_BFC1C208 = 0; - int psx_taken_BFC1C208 = 0; - int psx_delay_BFC1C228 = 0; - int psx_taken_BFC1C228 = 0; - int psx_delay_BFC1C248 = 0; - int psx_taken_BFC1C248 = 0; - int psx_delay_BFC1C254 = 0; - int psx_delay_BFC1C25C = 0; - int psx_delay_BFC1C268 = 0; - int psx_delay_BFC1C284 = 0; - int psx_taken_BFC1C284 = 0; - int psx_delay_BFC1C294 = 0; - int psx_delay_BFC1C2A0 = 0; - int psx_delay_BFC1C2C4 = 0; - int psx_taken_BFC1C2C4 = 0; - int psx_delay_BFC1C2D0 = 0; - int psx_delay_BFC1C300 = 0; - int psx_taken_BFC1C300 = 0; - int psx_delay_BFC1C314 = 0; - int psx_taken_BFC1C314 = 0; - int psx_delay_BFC1C340 = 0; - int psx_taken_BFC1C340 = 0; - int psx_delay_BFC1C364 = 0; - int psx_taken_BFC1C364 = 0; - int psx_delay_BFC1C378 = 0; - int psx_taken_BFC1C378 = 0; - int psx_delay_BFC1C3A8 = 0; - int psx_taken_BFC1C3A8 = 0; - int psx_delay_BFC1C3B8 = 0; - int psx_taken_BFC1C3B8 = 0; - int psx_delay_BFC1C3CC = 0; - int psx_taken_BFC1C3CC = 0; - int psx_delay_BFC1C3D4 = 0; - int psx_taken_BFC1C3D4 = 0; - int psx_delay_BFC1C3DC = 0; - int psx_taken_BFC1C3DC = 0; - int psx_delay_BFC1C400 = 0; - int psx_taken_BFC1C400 = 0; - int psx_delay_BFC1C420 = 0; - int psx_taken_BFC1C420 = 0; - int psx_delay_BFC1C430 = 0; - int psx_taken_BFC1C430 = 0; - int psx_delay_BFC1C440 = 0; - int psx_taken_BFC1C440 = 0; - int psx_delay_BFC1C458 = 0; - int psx_taken_BFC1C458 = 0; - int psx_delay_BFC1C498 = 0; - int psx_taken_BFC1C498 = 0; - int psx_delay_BFC1C4A8 = 0; - int psx_delay_BFC1C4B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C1C8u: goto label_BFC1C1C8; - case 0xBFC1C1D4u: goto label_BFC1C1D4; - case 0xBFC1C1E4u: goto label_BFC1C1E4; - case 0xBFC1C1ECu: goto label_BFC1C1EC; - case 0xBFC1C1F8u: goto label_BFC1C1F8; - case 0xBFC1C210u: goto label_BFC1C210; - case 0xBFC1C218u: goto label_BFC1C218; - case 0xBFC1C230u: goto label_BFC1C230; - case 0xBFC1C244u: goto label_BFC1C244; - case 0xBFC1C250u: goto label_BFC1C250; - case 0xBFC1C25Cu: goto label_BFC1C25C; - case 0xBFC1C264u: goto label_BFC1C264; - case 0xBFC1C270u: goto label_BFC1C270; - case 0xBFC1C27Cu: goto label_BFC1C27C; - case 0xBFC1C28Cu: goto label_BFC1C28C; - case 0xBFC1C294u: goto label_BFC1C294; - case 0xBFC1C29Cu: goto label_BFC1C29C; - case 0xBFC1C2A8u: goto label_BFC1C2A8; - case 0xBFC1C2CCu: goto label_BFC1C2CC; - case 0xBFC1C2D0u: goto label_BFC1C2D0; - case 0xBFC1C2D8u: goto label_BFC1C2D8; - case 0xBFC1C308u: goto label_BFC1C308; - case 0xBFC1C30Cu: goto label_BFC1C30C; - case 0xBFC1C31Cu: goto label_BFC1C31C; - case 0xBFC1C338u: goto label_BFC1C338; - case 0xBFC1C348u: goto label_BFC1C348; - case 0xBFC1C34Cu: goto label_BFC1C34C; - case 0xBFC1C36Cu: goto label_BFC1C36C; - case 0xBFC1C370u: goto label_BFC1C370; - case 0xBFC1C380u: goto label_BFC1C380; - case 0xBFC1C3B0u: goto label_BFC1C3B0; - case 0xBFC1C3C0u: goto label_BFC1C3C0; - case 0xBFC1C3D4u: goto label_BFC1C3D4; - case 0xBFC1C3D8u: goto label_BFC1C3D8; - case 0xBFC1C3DCu: goto label_BFC1C3DC; - case 0xBFC1C3E4u: goto label_BFC1C3E4; - case 0xBFC1C3F8u: goto label_BFC1C3F8; - case 0xBFC1C408u: goto label_BFC1C408; - case 0xBFC1C428u: goto label_BFC1C428; - case 0xBFC1C42Cu: goto label_BFC1C42C; - case 0xBFC1C438u: goto label_BFC1C438; - case 0xBFC1C43Cu: goto label_BFC1C43C; - case 0xBFC1C448u: goto label_BFC1C448; - case 0xBFC1C454u: goto label_BFC1C454; - case 0xBFC1C460u: goto label_BFC1C460; - case 0xBFC1C488u: goto label_BFC1C488; - case 0xBFC1C4A0u: goto label_BFC1C4A0; - case 0xBFC1C4A8u: goto label_BFC1C4A8; - case 0xBFC1C4B0u: goto label_BFC1C4B0; - default: break; - } - } -label_BFC1C1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C1A4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800341A4u); -#endif - /* 0xBFC1C1A8: 91299E70 lbu $t1, -24976($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24976; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24976)), 9, 0x200u); - PGXP_LOAD(0x91299E70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800341A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C1AC: 27BDFC88 addiu $sp, $sp, -888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-888)); - PGXP_ALU(0x27BDFC88u, cpu->gpr[29], _pgx1, 0xFFFFFC88u); } -#ifdef PSX_COSIM - cosim_instr(0x800341ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1C1B0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800341B0u); return; } g_debug_last_store_pc = 0x800341B0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800341B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1C1B4: 2D210002 sltiu $at, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2D210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800341B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C1B8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800341B8u); return; } g_debug_last_store_pc = 0x800341B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800341B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1C1BC: AFA40378 sw $a0, 888($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800341BCu); return; } g_debug_last_store_pc = 0x800341BCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40378u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800341BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C1C0: 14200015 bne $at, $zero, 0xBFC1C218 */ - uint32_t psx_brA_BFC1C1C0 = cpu->gpr[1]; uint32_t psx_brB_BFC1C1C0 = cpu->gpr[0]; - psx_taken_BFC1C1C0 = (psx_brA_BFC1C1C0 != psx_brB_BFC1C1C0); - psx_delay_BFC1C1C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1C1C4: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800341C4u); -#endif - if (psx_delay_BFC1C1C0) { - psx_delay_BFC1C1C0 = 0; - if (psx_taken_BFC1C1C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034218u); - goto label_BFC1C218; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800341C8u); - } -label_BFC1C1C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1C1C8: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800341C8u); return; } g_debug_last_store_pc = 0x800341C8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800341C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C1CC: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800341CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C1D0: 2631D0F4 addiu $s1, $s1, -12044 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12044)); - PGXP_ALU(0x2631D0F4u, cpu->gpr[17], _pgx1, 0xFFFFD0F4u); } -#ifdef PSX_COSIM - cosim_instr(0x800341D0u); -#endif -label_BFC1C1D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1C1D4: AE200000 sw $zero, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800341D4u); return; } g_debug_last_store_pc = 0x800341D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800341D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C1D8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800341D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C1DC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800341E4u; /* jal link before delay slot */ - psx_delay_BFC1C1DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C1E0: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800341E0u); -#endif - if (psx_delay_BFC1C1DC) { - psx_delay_BFC1C1DC = 0; - cpu->gpr[31] = 0x800341E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C1E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C1E4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800341ECu; /* jal link before delay slot */ - psx_delay_BFC1C1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C1E8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800341E8u); -#endif - if (psx_delay_BFC1C1E4) { - psx_delay_BFC1C1E4 = 0; - cpu->gpr[31] = 0x800341ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1C1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1C1EC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800341ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C1F0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800341F8u; /* jal link before delay slot */ - psx_delay_BFC1C1F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C1F4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800341F4u); -#endif - if (psx_delay_BFC1C1F0) { - psx_delay_BFC1C1F0 = 0; - cpu->gpr[31] = 0x800341F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1C1F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C1F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800341F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C1F8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800341F8u); -#endif - /* 0xBFC1C1FC: 91299E70 lbu $t1, -24976($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24976; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24976)), 9, 0x200u); - PGXP_LOAD(0x91299E70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800341FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C200: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10202u); -#endif - /* 0xBFC1C204: 0209082B sltu $at, $s0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0209082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C208: 1420FFF2 bne $at, $zero, 0xBFC1C1D4 */ - uint32_t psx_brA_BFC1C208 = cpu->gpr[1]; uint32_t psx_brB_BFC1C208 = cpu->gpr[0]; - psx_taken_BFC1C208 = (psx_brA_BFC1C208 != psx_brB_BFC1C208); - psx_delay_BFC1C208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C20C: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003420Cu); -#endif - if (psx_delay_BFC1C208) { - psx_delay_BFC1C208 = 0; - if (psx_taken_BFC1C208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800341D4u); - goto label_BFC1C1D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034210u); - } -label_BFC1C210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034210u); -#endif - /* 0xBFC1C210: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034210u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C214: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034214u); -#endif -label_BFC1C218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C218: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034218u); -#endif - /* 0xBFC1C21C: 91089E71 lbu $t0, -24975($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24975; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24975)), 8, 0x100u); - PGXP_LOAD(0x91089E71u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003421Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC1C220: 01205021 addu $t2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01205021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x502u); -#endif - /* 0xBFC1C224: 010A082B sltu $at, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x010A082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C228: 1420001A bne $at, $zero, 0xBFC1C294 */ - uint32_t psx_brA_BFC1C228 = cpu->gpr[1]; uint32_t psx_brB_BFC1C228 = cpu->gpr[0]; - psx_taken_BFC1C228 = (psx_brA_BFC1C228 != psx_brB_BFC1C228); - psx_delay_BFC1C228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10401u); -#endif - /* 0xBFC1C22C: 01408021 addu $s0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003422Cu); -#endif - if (psx_delay_BFC1C228) { - psx_delay_BFC1C228 = 0; - if (psx_taken_BFC1C228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034294u); - goto label_BFC1C294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034230u); - } -label_BFC1C230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C230: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C234: 25EFD0F0 addiu $t7, $t7, -12048 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-12048)); - PGXP_ALU(0x25EFD0F0u, cpu->gpr[15], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1C238: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034238u); return; } g_debug_last_store_pc = 0x80034238u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC1C23C: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003423Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C000u); -#endif - /* 0xBFC1C240: 01CF8821 addu $s1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034240u); -#endif -label_BFC1C244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C244: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C248: 1020000C beq $at, $zero, 0xBFC1C27C */ - uint32_t psx_brA_BFC1C248 = cpu->gpr[1]; uint32_t psx_brB_BFC1C248 = cpu->gpr[0]; - psx_taken_BFC1C248 = (psx_brA_BFC1C248 == psx_brB_BFC1C248); - psx_delay_BFC1C248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1C24C: AE300000 sw $s0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003424Cu); return; } g_debug_last_store_pc = 0x8003424Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAE300000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003424Cu); -#endif - if (psx_delay_BFC1C248) { - psx_delay_BFC1C248 = 0; - if (psx_taken_BFC1C248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003427Cu); - goto label_BFC1C27C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034250u); - } -label_BFC1C250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C250: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C254: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003425Cu; /* jal link before delay slot */ - psx_delay_BFC1C254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C258: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034258u); -#endif - if (psx_delay_BFC1C254) { - psx_delay_BFC1C254 = 0; - cpu->gpr[31] = 0x8003425Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C25C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C25Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C25C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80034264u; /* jal link before delay slot */ - psx_delay_BFC1C25C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C260: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034260u); -#endif - if (psx_delay_BFC1C25C) { - psx_delay_BFC1C25C = 0; - cpu->gpr[31] = 0x80034264u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1C264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1C264: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C268: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80034270u; /* jal link before delay slot */ - psx_delay_BFC1C268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C26C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003426Cu); -#endif - if (psx_delay_BFC1C268) { - psx_delay_BFC1C268 = 0; - cpu->gpr[31] = 0x80034270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1C270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C270: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034270u); -#endif - /* 0xBFC1C274: 91089E71 lbu $t0, -24975($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24975; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24975)), 8, 0x100u); - PGXP_LOAD(0x91089E71u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034278u); -#endif -label_BFC1C27C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C27Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C27C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10102u); -#endif - /* 0xBFC1C280: 0110082B sltu $at, $t0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0110082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C284: 1020FFEF beq $at, $zero, 0xBFC1C244 */ - uint32_t psx_brA_BFC1C284 = cpu->gpr[1]; uint32_t psx_brB_BFC1C284 = cpu->gpr[0]; - psx_taken_BFC1C284 = (psx_brA_BFC1C284 == psx_brB_BFC1C284); - psx_delay_BFC1C284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C288: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034288u); -#endif - if (psx_delay_BFC1C284) { - psx_delay_BFC1C284 = 0; - if (psx_taken_BFC1C284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034244u); - goto label_BFC1C244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003428Cu); - } -label_BFC1C28C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C28Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003428Cu); -#endif - /* 0xBFC1C28C: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003428Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003428Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034290u); -#endif -label_BFC1C294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C294: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003429Cu; /* jal link before delay slot */ - psx_delay_BFC1C294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C298: 24040016 addiu $a0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24040016u, cpu->gpr[4], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80034298u); -#endif - if (psx_delay_BFC1C294) { - psx_delay_BFC1C294 = 0; - cpu->gpr[31] = 0x8003429Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1C29C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C29Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003429Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1C29C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003429Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C2A0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800342A8u; /* jal link before delay slot */ - psx_delay_BFC1C2A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C2A4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800342A4u); -#endif - if (psx_delay_BFC1C2A0) { - psx_delay_BFC1C2A0 = 0; - cpu->gpr[31] = 0x800342A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1C2A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C2A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C2A8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800342A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C2AC: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800342ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342B0u); -#endif - /* 0xBFC1C2B0: 91299E70 lbu $t1, -24976($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24976; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24976)), 9, 0x200u); - PGXP_LOAD(0x91299E70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800342B0u); -#endif - /* 0xBFC1C2B4: 91089E71 lbu $t0, -24975($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24975; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24975)), 8, 0x100u); - PGXP_LOAD(0x91089E71u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800342B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1C2B8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800342B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC1C2BC: 01092023 subu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] - cpu->gpr[9]; - PGXP_ALU(0x01092023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800342BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1C2C0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800342C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C2C4: 10800011 beq $a0, $zero, 0xBFC1C30C */ - uint32_t psx_brA_BFC1C2C4 = cpu->gpr[4]; uint32_t psx_brB_BFC1C2C4 = cpu->gpr[0]; - psx_taken_BFC1C2C4 = (psx_brA_BFC1C2C4 == psx_brB_BFC1C2C4); - psx_delay_BFC1C2C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC1C2C8: 01205021 addu $t2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01205021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800342C8u); -#endif - if (psx_delay_BFC1C2C4) { - psx_delay_BFC1C2C4 = 0; - if (psx_taken_BFC1C2C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003430Cu); - goto label_BFC1C30C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800342CCu); - } -label_BFC1C2CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C2CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1C2CC: 27A30378 addiu $v1, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27A30378u, cpu->gpr[3], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x800342CCu); -#endif -label_BFC1C2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C2D0: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x800342D8u; /* jal link before delay slot */ - psx_delay_BFC1C2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1C2D4: AFA30030 sw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800342D4u); return; } g_debug_last_store_pc = 0x800342D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800342D4u); -#endif - if (psx_delay_BFC1C2D0) { - psx_delay_BFC1C2D0 = 0; - cpu->gpr[31] = 0x800342D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC1C2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C2D8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800342D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C2DC: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800342DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342E0u); -#endif - /* 0xBFC1C2E0: 91299E70 lbu $t1, -24976($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24976; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24976)), 9, 0x200u); - PGXP_LOAD(0x91299E70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800342E0u); -#endif - /* 0xBFC1C2E4: 91089E71 lbu $t0, -24975($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24975; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24975)), 8, 0x100u); - PGXP_LOAD(0x91089E71u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800342E4u); -#endif - /* 0xBFC1C2E8: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800342E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800342E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC1C2EC: 01092023 subu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] - cpu->gpr[9]; - PGXP_ALU(0x01092023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800342ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800342F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1C2F0: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800342F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C2F4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800342F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10012u); -#endif - /* 0xBFC1C2F8: 0204082B sltu $at, $s0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800342F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1C2FC: AC62FE64 sw $v0, -412($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -412; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800342FCu); return; } g_debug_last_store_pc = 0x800342FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC62FE64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800342FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C300: 1420FFF3 bne $at, $zero, 0xBFC1C2D0 */ - uint32_t psx_brA_BFC1C300 = cpu->gpr[1]; uint32_t psx_brB_BFC1C300 = cpu->gpr[0]; - psx_taken_BFC1C300 = (psx_brA_BFC1C300 != psx_brB_BFC1C300); - psx_delay_BFC1C300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C304: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034304u); -#endif - if (psx_delay_BFC1C300) { - psx_delay_BFC1C300 = 0; - if (psx_taken_BFC1C300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800342D0u); - goto label_BFC1C2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034308u); - } -label_BFC1C308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC1C308: 01205021 addu $t2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01205021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034308u); -#endif -label_BFC1C30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003430Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC01u); -#endif - /* 0xBFC1C30C: 01405821 addu $t3, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01405821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003430Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x902u); -#endif - /* 0xBFC1C310: 010B082B sltu $at, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C314: 14200026 bne $at, $zero, 0xBFC1C3B0 */ - uint32_t psx_brA_BFC1C314 = cpu->gpr[1]; uint32_t psx_brB_BFC1C314 = cpu->gpr[0]; - psx_taken_BFC1C314 = (psx_brA_BFC1C314 != psx_brB_BFC1C314); - psx_delay_BFC1C314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x405u); -#endif - /* 0xBFC1C318: 01401021 addu $v0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034318u); -#endif - if (psx_delay_BFC1C314) { - psx_delay_BFC1C314 = 0; - if (psx_taken_BFC1C314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343B0u); - goto label_BFC1C3B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003431Cu); - } -label_BFC1C31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC1C31C: 27B90378 addiu $t9, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27B90378u, cpu->gpr[25], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x8003431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1C320: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC1C324: 00086080 sll $t4, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00086080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1C328: 3C06800F lui $a2, 0x800F */ - cpu->gpr[6] = 0x800F0000u; - PGXP_ALU(0x3C06800Fu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1C32C: 24C6D0F0 addiu $a2, $a2, -12048 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-12048)); - PGXP_ALU(0x24C6D0F0u, cpu->gpr[6], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003432Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001080u); -#endif - /* 0xBFC1C330: 01993821 addu $a3, $t4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[7] = cpu->gpr[12] + cpu->gpr[25]; - PGXP_ALU(0x01993821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC1C334: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034334u); -#endif -label_BFC1C338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1C338: 2C810002 sltiu $at, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2C810002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80034338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1C33C: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003433Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C340: 1420000F bne $at, $zero, 0xBFC1C380 */ - uint32_t psx_brA_BFC1C340 = cpu->gpr[1]; uint32_t psx_brB_BFC1C340 = cpu->gpr[0]; - psx_taken_BFC1C340 = (psx_brA_BFC1C340 != psx_brB_BFC1C340); - psx_delay_BFC1C340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C344: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034344u); -#endif - if (psx_delay_BFC1C340) { - psx_delay_BFC1C340 = 0; - if (psx_taken_BFC1C340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034380u); - goto label_BFC1C380; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034348u); - } -label_BFC1C348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1C348: 27A3037C addiu $v1, $sp, 892 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (892)); - PGXP_ALU(0x27A3037Cu, cpu->gpr[3], _pgx1, 0x0000037Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80034348u); -#endif -label_BFC1C34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003434Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1C34C: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003434Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000C000u); -#endif - /* 0xBFC1C350: 03AE7821 addu $t7, $sp, $t6 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[29] + cpu->gpr[14]; - PGXP_ALU(0x03AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034350u); -#endif - /* 0xBFC1C354: 8DEF01DC lw $t7, 476($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034354u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF01DCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034354u); -#endif - /* 0xBFC1C358: 8C6DFE64 lw $t5, -412($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034358u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6DFE64u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80034358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C35C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003435Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC1C360: 01AFC023 subu $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] - cpu->gpr[15]; - PGXP_ALU(0x01AFC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1C364: 1B000002 blez $t8, 0xBFC1C370 */ - uint32_t psx_brA_BFC1C364 = cpu->gpr[24]; - psx_taken_BFC1C364 = ((int32_t)psx_brA_BFC1C364 <= 0); - psx_delay_BFC1C364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034368u); -#endif - if (psx_delay_BFC1C364) { - psx_delay_BFC1C364 = 0; - if (psx_taken_BFC1C364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034370u); - goto label_BFC1C370; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003436Cu); - } -label_BFC1C36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003436Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1C36C: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003436Cu); -#endif -label_BFC1C370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C370: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10012u); -#endif - /* 0xBFC1C374: 0204082B sltu $at, $s0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0204082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C378: 1420FFF4 bne $at, $zero, 0xBFC1C34C */ - uint32_t psx_brA_BFC1C378 = cpu->gpr[1]; uint32_t psx_brB_BFC1C378 = cpu->gpr[0]; - psx_taken_BFC1C378 = (psx_brA_BFC1C378 != psx_brB_BFC1C378); - psx_delay_BFC1C378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C37C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003437Cu); -#endif - if (psx_delay_BFC1C378) { - psx_delay_BFC1C378 = 0; - if (psx_taken_BFC1C378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003434Cu); - goto label_BFC1C34C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034380u); - } -label_BFC1C380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1C380: 00026080 sll $t4, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00026080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001040u); -#endif - /* 0xBFC1C384: 00CCC821 addu $t9, $a2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[25] = cpu->gpr[6] + cpu->gpr[12]; - PGXP_ALU(0x00CCC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC1C388: 00097080 sll $t6, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00097080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006000u); -#endif - /* 0xBFC1C38C: 032E6821 addu $t5, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[13] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003438Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034390u); -#endif - /* 0xBFC1C390: 8DAF0000 lw $t7, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034390u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x2000u); } - PGXP_LOAD(0x8DAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1C394: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1C398: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21001000u); -#endif - /* 0xBFC1C39C: 03B86021 addu $t4, $sp, $t8 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[12] = cpu->gpr[29] + cpu->gpr[24]; - PGXP_ALU(0x03B86021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003439Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA2u); -#endif - /* 0xBFC1C3A0: 00E5082B sltu $at, $a3, $a1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x00E5082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800343A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC1C3A4: ACAFFCD0 sw $t7, -816($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-816)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343A4u); return; } g_debug_last_store_pc = 0x800343A4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAFFCD0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800343A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C3A8: 1020FFE3 beq $at, $zero, 0xBFC1C338 */ - uint32_t psx_brA_BFC1C3A8 = cpu->gpr[1]; uint32_t psx_brB_BFC1C3A8 = cpu->gpr[0]; - psx_taken_BFC1C3A8 = (psx_brA_BFC1C3A8 == psx_brB_BFC1C3A8); - psx_delay_BFC1C3A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1C3AC: AD8001DC sw $zero, 476($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343ACu); return; } g_debug_last_store_pc = 0x800343ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD8001DCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800343ACu); -#endif - if (psx_delay_BFC1C3A8) { - psx_delay_BFC1C3A8 = 0; - if (psx_taken_BFC1C3A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034338u); - goto label_BFC1C338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343B0u); - } -label_BFC1C3B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343B0u); -#endif - /* 0xBFC1C3B0: 8FB90378 lw $t9, 888($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343B0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90378u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800343B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C3B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800343B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C3B8: 17200023 bne $t9, $zero, 0xBFC1C448 */ - uint32_t psx_brA_BFC1C3B8 = cpu->gpr[25]; uint32_t psx_brB_BFC1C3B8 = cpu->gpr[0]; - psx_taken_BFC1C3B8 = (psx_brA_BFC1C3B8 != psx_brB_BFC1C3B8); - psx_delay_BFC1C3B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C3BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800343BCu); -#endif - if (psx_delay_BFC1C3B8) { - psx_delay_BFC1C3B8 = 0; - if (psx_taken_BFC1C3B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034448u); - goto label_BFC1C448; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343C0u); - } -label_BFC1C3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C3C0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800343C0u); -#endif - /* 0xBFC1C3C4: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800343C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C3C8: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800343C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C3CC: 10410002 beq $v0, $at, 0xBFC1C3D8 */ - uint32_t psx_brA_BFC1C3CC = cpu->gpr[2]; uint32_t psx_brB_BFC1C3CC = cpu->gpr[1]; - psx_taken_BFC1C3CC = (psx_brA_BFC1C3CC == psx_brB_BFC1C3CC); - psx_delay_BFC1C3CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C3D0: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800343D0u); -#endif - if (psx_delay_BFC1C3CC) { - psx_delay_BFC1C3CC = 0; - if (psx_taken_BFC1C3CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343D8u); - goto label_BFC1C3D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343D4u); - } -label_BFC1C3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C3D4: 1441001C bne $v0, $at, 0xBFC1C448 */ - uint32_t psx_brA_BFC1C3D4 = cpu->gpr[2]; uint32_t psx_brB_BFC1C3D4 = cpu->gpr[1]; - psx_taken_BFC1C3D4 = (psx_brA_BFC1C3D4 != psx_brB_BFC1C3D4); - psx_delay_BFC1C3D4 = 1; -label_BFC1C3D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x902u); -#endif - /* 0xBFC1C3D8: 010B082B sltu $at, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800343D8u); -#endif - if (psx_delay_BFC1C3D4) { - psx_delay_BFC1C3D4 = 0; - if (psx_taken_BFC1C3D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034448u); - goto label_BFC1C448; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343DCu); - } -label_BFC1C3DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C3DC: 14200017 bne $at, $zero, 0xBFC1C43C */ - uint32_t psx_brA_BFC1C3DC = cpu->gpr[1]; uint32_t psx_brB_BFC1C3DC = cpu->gpr[0]; - psx_taken_BFC1C3DC = (psx_brA_BFC1C3DC != psx_brB_BFC1C3DC); - psx_delay_BFC1C3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10401u); -#endif - /* 0xBFC1C3E0: 01408021 addu $s0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800343E0u); -#endif - if (psx_delay_BFC1C3DC) { - psx_delay_BFC1C3DC = 0; - if (psx_taken_BFC1C3DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003443Cu); - goto label_BFC1C43C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343E4u); - } -label_BFC1C3E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C3E4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800343E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC1C3E8: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800343E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1C3EC: 27AD0378 addiu $t5, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27AD0378u, cpu->gpr[13], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x800343ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343F0u); -#endif - /* 0xBFC1C3F0: 8C429E50 lw $v0, -25008($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E50u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800343F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6008u); -#endif - /* 0xBFC1C3F4: 01CD1821 addu $v1, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800343F4u); -#endif -label_BFC1C3F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C3F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800343F8u); -#endif - /* 0xBFC1C3F8: 8C6FFCD4 lw $t7, -812($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800343F8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6FFCD4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800343F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C3FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800343FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1C400: 144F000A bne $v0, $t7, 0xBFC1C42C */ - uint32_t psx_brA_BFC1C400 = cpu->gpr[2]; uint32_t psx_brB_BFC1C400 = cpu->gpr[15]; - psx_taken_BFC1C400 = (psx_brA_BFC1C400 != psx_brB_BFC1C400); - psx_delay_BFC1C400 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C404: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034404u); -#endif - if (psx_delay_BFC1C400) { - psx_delay_BFC1C400 = 0; - if (psx_taken_BFC1C400) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003442Cu); - goto label_BFC1C42C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034408u); - } -label_BFC1C408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC1C408: 0009C080 sll $t8, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 2u; - PGXP_ALU(0x0009C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC1C40C: 27AC0378 addiu $t4, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27AC0378u, cpu->gpr[12], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x8003440Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001010u); -#endif - /* 0xBFC1C410: 030C2021 addu $a0, $t8, $t4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[12]; - PGXP_ALU(0x030C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034410u); -#endif - /* 0xBFC1C414: 8C99FCD4 lw $t9, -812($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034414u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C99FCD4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10401u); -#endif - /* 0xBFC1C418: 01408021 addu $s0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1C41C: AC79FCD4 sw $t9, -812($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003441Cu); return; } g_debug_last_store_pc = 0x8003441Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79FCD4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003441Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C420: 10000006 beq $zero, $zero, 0xBFC1C43C */ - uint32_t psx_brA_BFC1C420 = cpu->gpr[0]; uint32_t psx_brB_BFC1C420 = cpu->gpr[0]; - psx_taken_BFC1C420 = (psx_brA_BFC1C420 == psx_brB_BFC1C420); - psx_delay_BFC1C420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC1C424: AC82FCD4 sw $v0, -812($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034424u); return; } g_debug_last_store_pc = 0x80034424u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC82FCD4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034424u); -#endif - if (psx_delay_BFC1C420) { - psx_delay_BFC1C420 = 0; - if (psx_taken_BFC1C420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003443Cu); - goto label_BFC1C43C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034428u); - } -label_BFC1C428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C428: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034428u); -#endif -label_BFC1C42C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C42Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003442Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10102u); -#endif - /* 0xBFC1C42C: 0110082B sltu $at, $t0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0110082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003442Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C430: 1020FFF1 beq $at, $zero, 0xBFC1C3F8 */ - uint32_t psx_brA_BFC1C430 = cpu->gpr[1]; uint32_t psx_brB_BFC1C430 = cpu->gpr[0]; - psx_taken_BFC1C430 = (psx_brA_BFC1C430 == psx_brB_BFC1C430); - psx_delay_BFC1C430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C434: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034434u); -#endif - if (psx_delay_BFC1C430) { - psx_delay_BFC1C430 = 0; - if (psx_taken_BFC1C430) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800343F8u); - goto label_BFC1C3F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034438u); - } -label_BFC1C438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10401u); -#endif - /* 0xBFC1C438: 01408021 addu $s0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034438u); -#endif -label_BFC1C43C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C43Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003443Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C43C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003443Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C440: 10000004 beq $zero, $zero, 0xBFC1C454 */ - uint32_t psx_brA_BFC1C440 = cpu->gpr[0]; uint32_t psx_brB_BFC1C440 = cpu->gpr[0]; - psx_taken_BFC1C440 = (psx_brA_BFC1C440 == psx_brB_BFC1C440); - psx_delay_BFC1C440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1C444: AC2A9E5C sw $t2, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034444u); return; } g_debug_last_store_pc = 0x80034444u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034444u); -#endif - if (psx_delay_BFC1C440) { - psx_delay_BFC1C440 = 0; - if (psx_taken_BFC1C440) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034454u); - goto label_BFC1C454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034448u); - } -label_BFC1C448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C448: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C44C: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003444Cu); return; } g_debug_last_store_pc = 0x8003444Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003444Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10401u); -#endif - /* 0xBFC1C450: 01408021 addu $s0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034450u); -#endif -label_BFC1C454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x902u); -#endif - /* 0xBFC1C454: 010B082B sltu $at, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x010B082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C458: 14200013 bne $at, $zero, 0xBFC1C4A8 */ - uint32_t psx_brA_BFC1C458 = cpu->gpr[1]; uint32_t psx_brB_BFC1C458 = cpu->gpr[0]; - psx_taken_BFC1C458 = (psx_brA_BFC1C458 != psx_brB_BFC1C458); - psx_delay_BFC1C458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C45C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003445Cu); -#endif - if (psx_delay_BFC1C458) { - psx_delay_BFC1C458 = 0; - if (psx_taken_BFC1C458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344A8u); - goto label_BFC1C4A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034460u); - } -label_BFC1C460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1C460: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC1C464: 27B80378 addiu $t8, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27B80378u, cpu->gpr[24], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x80034464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1C468: 25ADD0F0 addiu $t5, $t5, -12048 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-12048)); - PGXP_ALU(0x25ADD0F0u, cpu->gpr[13], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1C46C: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003446Cu); return; } g_debug_last_store_pc = 0x8003446Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003446Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC1C470: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC1C474: 00107880 sll $t7, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC1C478: 00086080 sll $t4, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00086080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001004u); -#endif - /* 0xBFC1C47C: 01981021 addu $v0, $t4, $t8 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[12] + cpu->gpr[24]; - PGXP_ALU(0x01981021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC1C480: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26000u); -#endif - /* 0xBFC1C484: 01CD8821 addu $s1, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034484u); -#endif -label_BFC1C488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034488u); -#endif - /* 0xBFC1C488: 8C79FCD4 lw $t9, -812($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034488u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C79FCD4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C48C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003448Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC1C490: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1C494: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C498: 1020FFFB beq $at, $zero, 0xBFC1C488 */ - uint32_t psx_brA_BFC1C498 = cpu->gpr[1]; uint32_t psx_brB_BFC1C498 = cpu->gpr[0]; - psx_taken_BFC1C498 = (psx_brA_BFC1C498 == psx_brB_BFC1C498); - psx_delay_BFC1C498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC1C49C: AE39FFFC sw $t9, -4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003449Cu); return; } g_debug_last_store_pc = 0x8003449Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE39FFFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003449Cu); -#endif - if (psx_delay_BFC1C498) { - psx_delay_BFC1C498 = 0; - if (psx_taken_BFC1C498) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034488u); - goto label_BFC1C488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344A0u); - } -label_BFC1C4A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344A0u); -#endif - /* 0xBFC1C4A0: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344A0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800344A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C4A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800344A4u); -#endif -label_BFC1C4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C4A8: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x800344B0u; /* jal link before delay slot */ - psx_delay_BFC1C4A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800344ACu); -#endif - if (psx_delay_BFC1C4A8) { - psx_delay_BFC1C4A8 = 0; - cpu->gpr[31] = 0x800344B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C4B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344B0u); -#endif - /* 0xBFC1C4B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800344B0u); -#endif - /* 0xBFC1C4B4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344B4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800344B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C4B8: 03E00008 jr $ra */ - psx_delay_BFC1C4B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C4BC: 27BD0378 addiu $sp, $sp, 888 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (888)); - PGXP_ALU(0x27BD0378u, cpu->gpr[29], _pgx1, 0x00000378u); } -#ifdef PSX_COSIM - cosim_instr(0x800344BCu); -#endif - if (psx_delay_BFC1C4B8) { - psx_delay_BFC1C4B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C4C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C4C0u); - int psx_delay_BFC1C4D0 = 0; - int psx_taken_BFC1C4D0 = 0; - int psx_delay_BFC1C4E4 = 0; - int psx_taken_BFC1C4E4 = 0; - int psx_delay_BFC1C4F8 = 0; - int psx_delay_BFC1C500 = 0; - int psx_taken_BFC1C500 = 0; - int psx_delay_BFC1C510 = 0; - int psx_delay_BFC1C518 = 0; - int psx_taken_BFC1C518 = 0; - int psx_delay_BFC1C530 = 0; - int psx_taken_BFC1C530 = 0; - int psx_delay_BFC1C538 = 0; - int psx_taken_BFC1C538 = 0; - int psx_delay_BFC1C548 = 0; - int psx_taken_BFC1C548 = 0; - int psx_delay_BFC1C550 = 0; - int psx_taken_BFC1C550 = 0; - int psx_delay_BFC1C55C = 0; - int psx_taken_BFC1C55C = 0; - int psx_delay_BFC1C570 = 0; - int psx_taken_BFC1C570 = 0; - int psx_delay_BFC1C580 = 0; - int psx_taken_BFC1C580 = 0; - int psx_delay_BFC1C598 = 0; - int psx_taken_BFC1C598 = 0; - int psx_delay_BFC1C5A0 = 0; - int psx_delay_BFC1C5B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C4D8u: goto label_BFC1C4D8; - case 0xBFC1C4ECu: goto label_BFC1C4EC; - case 0xBFC1C500u: goto label_BFC1C500; - case 0xBFC1C508u: goto label_BFC1C508; - case 0xBFC1C518u: goto label_BFC1C518; - case 0xBFC1C520u: goto label_BFC1C520; - case 0xBFC1C538u: goto label_BFC1C538; - case 0xBFC1C540u: goto label_BFC1C540; - case 0xBFC1C550u: goto label_BFC1C550; - case 0xBFC1C558u: goto label_BFC1C558; - case 0xBFC1C564u: goto label_BFC1C564; - case 0xBFC1C578u: goto label_BFC1C578; - case 0xBFC1C588u: goto label_BFC1C588; - case 0xBFC1C58Cu: goto label_BFC1C58C; - case 0xBFC1C594u: goto label_BFC1C594; - case 0xBFC1C598u: goto label_BFC1C598; - case 0xBFC1C5A0u: goto label_BFC1C5A0; - case 0xBFC1C5A8u: goto label_BFC1C5A8; - case 0xBFC1C5ACu: goto label_BFC1C5AC; - default: break; - } - } -label_BFC1C4C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C4C0: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800344C0u); -#endif - /* 0xBFC1C4C4: 8C636948 lw $v1, 26952($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636948u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800344C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C4C8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800344C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C4CC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800344CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1C4D0: 14610013 bne $v1, $at, 0xBFC1C520 */ - uint32_t psx_brA_BFC1C4D0 = cpu->gpr[3]; uint32_t psx_brB_BFC1C4D0 = cpu->gpr[1]; - psx_taken_BFC1C4D0 = (psx_brA_BFC1C4D0 != psx_brB_BFC1C4D0); - psx_delay_BFC1C4D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C4D4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344D4u); return; } g_debug_last_store_pc = 0x800344D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800344D4u); -#endif - if (psx_delay_BFC1C4D0) { - psx_delay_BFC1C4D0 = 0; - if (psx_taken_BFC1C4D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034520u); - goto label_BFC1C520; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344D8u); - } -label_BFC1C4D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C4D8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800344D8u); -#endif - /* 0xBFC1C4DC: 8C429F64 lw $v0, -24732($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800344DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C4E0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800344E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C4E4: 14410008 bne $v0, $at, 0xBFC1C508 */ - uint32_t psx_brA_BFC1C4E4 = cpu->gpr[2]; uint32_t psx_brB_BFC1C4E4 = cpu->gpr[1]; - psx_taken_BFC1C4E4 = (psx_brA_BFC1C4E4 != psx_brB_BFC1C4E4); - psx_delay_BFC1C4E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C4E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800344E8u); -#endif - if (psx_delay_BFC1C4E4) { - psx_delay_BFC1C4E4 = 0; - if (psx_taken_BFC1C4E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034508u); - goto label_BFC1C508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800344ECu); - } -label_BFC1C4EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C4ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C4EC: AC209E50 sw $zero, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344ECu); return; } g_debug_last_store_pc = 0x800344ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800344ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800344F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C4F0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800344F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C4F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800344F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C4F8: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80034500u; /* jal link before delay slot */ - psx_delay_BFC1C4F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C4FC: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800344FCu); return; } g_debug_last_store_pc = 0x800344FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800344FCu); -#endif - if (psx_delay_BFC1C4F8) { - psx_delay_BFC1C4F8 = 0; - cpu->gpr[31] = 0x80034500u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C500: 1000002A beq $zero, $zero, 0xBFC1C5AC */ - uint32_t psx_brA_BFC1C500 = cpu->gpr[0]; uint32_t psx_brB_BFC1C500 = cpu->gpr[0]; - psx_taken_BFC1C500 = (psx_brA_BFC1C500 == psx_brB_BFC1C500); - psx_delay_BFC1C500 = 1; - /* 0xBFC1C504: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034504u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034504u); -#endif - if (psx_delay_BFC1C500) { - psx_delay_BFC1C500 = 0; - if (psx_taken_BFC1C500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345ACu); - goto label_BFC1C5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034508u); - } -label_BFC1C508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C508: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80034508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C50C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003450Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C510: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80034518u; /* jal link before delay slot */ - psx_delay_BFC1C510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C514: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034514u); return; } g_debug_last_store_pc = 0x80034514u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034514u); -#endif - if (psx_delay_BFC1C510) { - psx_delay_BFC1C510 = 0; - cpu->gpr[31] = 0x80034518u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C518: 10000024 beq $zero, $zero, 0xBFC1C5AC */ - uint32_t psx_brA_BFC1C518 = cpu->gpr[0]; uint32_t psx_brB_BFC1C518 = cpu->gpr[0]; - psx_taken_BFC1C518 = (psx_brA_BFC1C518 == psx_brB_BFC1C518); - psx_delay_BFC1C518 = 1; - /* 0xBFC1C51C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003451Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003451Cu); -#endif - if (psx_delay_BFC1C518) { - psx_delay_BFC1C518 = 0; - if (psx_taken_BFC1C518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345ACu); - goto label_BFC1C5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034520u); - } -label_BFC1C520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C520: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034520u); -#endif - /* 0xBFC1C524: 8C429F64 lw $v0, -24732($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034524u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C52C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003452Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C530: 10400015 beq $v0, $zero, 0xBFC1C588 */ - uint32_t psx_brA_BFC1C530 = cpu->gpr[2]; uint32_t psx_brB_BFC1C530 = cpu->gpr[0]; - psx_taken_BFC1C530 = (psx_brA_BFC1C530 == psx_brB_BFC1C530); - psx_delay_BFC1C530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C534: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034534u); -#endif - if (psx_delay_BFC1C530) { - psx_delay_BFC1C530 = 0; - if (psx_taken_BFC1C530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034588u); - goto label_BFC1C588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034538u); - } -label_BFC1C538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C538: 10410007 beq $v0, $at, 0xBFC1C558 */ - uint32_t psx_brA_BFC1C538 = cpu->gpr[2]; uint32_t psx_brB_BFC1C538 = cpu->gpr[1]; - psx_taken_BFC1C538 = (psx_brA_BFC1C538 == psx_brB_BFC1C538); - psx_delay_BFC1C538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C53C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003453Cu); -#endif - if (psx_delay_BFC1C538) { - psx_delay_BFC1C538 = 0; - if (psx_taken_BFC1C538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034558u); - goto label_BFC1C558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034540u); - } -label_BFC1C540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C540: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034540u); return; } g_debug_last_store_pc = 0x80034540u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C544: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80034544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C548: 10410006 beq $v0, $at, 0xBFC1C564 */ - uint32_t psx_brA_BFC1C548 = cpu->gpr[2]; uint32_t psx_brB_BFC1C548 = cpu->gpr[1]; - psx_taken_BFC1C548 = (psx_brA_BFC1C548 == psx_brB_BFC1C548); - psx_delay_BFC1C548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C54C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003454Cu); -#endif - if (psx_delay_BFC1C548) { - psx_delay_BFC1C548 = 0; - if (psx_taken_BFC1C548) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034564u); - goto label_BFC1C564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034550u); - } -label_BFC1C550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C550: 1000000E beq $zero, $zero, 0xBFC1C58C */ - uint32_t psx_brA_BFC1C550 = cpu->gpr[0]; uint32_t psx_brB_BFC1C550 = cpu->gpr[0]; - psx_taken_BFC1C550 = (psx_brA_BFC1C550 == psx_brB_BFC1C550); - psx_delay_BFC1C550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C554: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034554u); -#endif - if (psx_delay_BFC1C550) { - psx_delay_BFC1C550 = 0; - if (psx_taken_BFC1C550) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003458Cu); - goto label_BFC1C58C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034558u); - } -label_BFC1C558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C558: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C55C: 1000000D beq $zero, $zero, 0xBFC1C594 */ - uint32_t psx_brA_BFC1C55C = cpu->gpr[0]; uint32_t psx_brB_BFC1C55C = cpu->gpr[0]; - psx_taken_BFC1C55C = (psx_brA_BFC1C55C == psx_brB_BFC1C55C); - psx_delay_BFC1C55C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C560: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034560u); return; } g_debug_last_store_pc = 0x80034560u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034560u); -#endif - if (psx_delay_BFC1C55C) { - psx_delay_BFC1C55C = 0; - if (psx_taken_BFC1C55C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034594u); - goto label_BFC1C594; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034564u); - } -label_BFC1C564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C564: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034564u); -#endif - /* 0xBFC1C568: 8DCE9F70 lw $t6, -24720($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034568u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C56C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003456Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1C570: 11C00009 beq $t6, $zero, 0xBFC1C598 */ - uint32_t psx_brA_BFC1C570 = cpu->gpr[14]; uint32_t psx_brB_BFC1C570 = cpu->gpr[0]; - psx_taken_BFC1C570 = (psx_brA_BFC1C570 == psx_brB_BFC1C570); - psx_delay_BFC1C570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C574: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034574u); -#endif - if (psx_delay_BFC1C570) { - psx_delay_BFC1C570 = 0; - if (psx_taken_BFC1C570) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034598u); - goto label_BFC1C598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034578u); - } -label_BFC1C578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C578: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C57C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003457Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C580: 10000004 beq $zero, $zero, 0xBFC1C594 */ - uint32_t psx_brA_BFC1C580 = cpu->gpr[0]; uint32_t psx_brB_BFC1C580 = cpu->gpr[0]; - psx_taken_BFC1C580 = (psx_brA_BFC1C580 == psx_brB_BFC1C580); - psx_delay_BFC1C580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C584: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034584u); return; } g_debug_last_store_pc = 0x80034584u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034584u); -#endif - if (psx_delay_BFC1C580) { - psx_delay_BFC1C580 = 0; - if (psx_taken_BFC1C580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034594u); - goto label_BFC1C594; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034588u); - } -label_BFC1C588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C588: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034588u); -#endif -label_BFC1C58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003458Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C58C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003458Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C590: AC229F64 sw $v0, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034590u); return; } g_debug_last_store_pc = 0x80034590u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034590u); -#endif -label_BFC1C594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C594: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034594u); -#endif -label_BFC1C598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1C598: 14610004 bne $v1, $at, 0xBFC1C5AC */ - uint32_t psx_brA_BFC1C598 = cpu->gpr[3]; uint32_t psx_brB_BFC1C598 = cpu->gpr[1]; - psx_taken_BFC1C598 = (psx_brA_BFC1C598 != psx_brB_BFC1C598); - psx_delay_BFC1C598 = 1; - /* 0xBFC1C59C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003459Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003459Cu); -#endif - if (psx_delay_BFC1C598) { - psx_delay_BFC1C598 = 0; - if (psx_taken_BFC1C598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345ACu); - goto label_BFC1C5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345A0u); - } -label_BFC1C5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C5A0: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x800345A8u; /* jal link before delay slot */ - psx_delay_BFC1C5A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C5A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800345A4u); -#endif - if (psx_delay_BFC1C5A0) { - psx_delay_BFC1C5A0 = 0; - cpu->gpr[31] = 0x800345A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C5A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345A8u); -#endif - /* 0xBFC1C5A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800345A8u); -#endif -label_BFC1C5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C5AC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800345ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C5B0: 03E00008 jr $ra */ - psx_delay_BFC1C5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C5B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800345B4u); -#endif - if (psx_delay_BFC1C5B0) { - psx_delay_BFC1C5B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C5B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C5B8u); - int psx_delay_BFC1C5D0 = 0; - int psx_taken_BFC1C5D0 = 0; - int psx_delay_BFC1C5EC = 0; - int psx_taken_BFC1C5EC = 0; - int psx_delay_BFC1C610 = 0; - int psx_taken_BFC1C610 = 0; - int psx_delay_BFC1C630 = 0; - int psx_delay_BFC1C644 = 0; - int psx_taken_BFC1C644 = 0; - int psx_delay_BFC1C654 = 0; - int psx_taken_BFC1C654 = 0; - int psx_delay_BFC1C6A4 = 0; - int psx_taken_BFC1C6A4 = 0; - int psx_delay_BFC1C6B8 = 0; - int psx_taken_BFC1C6B8 = 0; - int psx_delay_BFC1C6C0 = 0; - int psx_taken_BFC1C6C0 = 0; - int psx_delay_BFC1C6CC = 0; - int psx_delay_BFC1C6E0 = 0; - int psx_taken_BFC1C6E0 = 0; - int psx_delay_BFC1C700 = 0; - int psx_taken_BFC1C700 = 0; - int psx_delay_BFC1C70C = 0; - int psx_taken_BFC1C70C = 0; - int psx_delay_BFC1C718 = 0; - int psx_delay_BFC1C730 = 0; - int psx_taken_BFC1C730 = 0; - int psx_delay_BFC1C73C = 0; - int psx_delay_BFC1C774 = 0; - int psx_delay_BFC1C784 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C5D8u: goto label_BFC1C5D8; - case 0xBFC1C5E0u: goto label_BFC1C5E0; - case 0xBFC1C5F4u: goto label_BFC1C5F4; - case 0xBFC1C604u: goto label_BFC1C604; - case 0xBFC1C618u: goto label_BFC1C618; - case 0xBFC1C638u: goto label_BFC1C638; - case 0xBFC1C64Cu: goto label_BFC1C64C; - case 0xBFC1C65Cu: goto label_BFC1C65C; - case 0xBFC1C660u: goto label_BFC1C660; - case 0xBFC1C674u: goto label_BFC1C674; - case 0xBFC1C694u: goto label_BFC1C694; - case 0xBFC1C6ACu: goto label_BFC1C6AC; - case 0xBFC1C6C0u: goto label_BFC1C6C0; - case 0xBFC1C6C8u: goto label_BFC1C6C8; - case 0xBFC1C6D4u: goto label_BFC1C6D4; - case 0xBFC1C6E8u: goto label_BFC1C6E8; - case 0xBFC1C708u: goto label_BFC1C708; - case 0xBFC1C70Cu: goto label_BFC1C70C; - case 0xBFC1C714u: goto label_BFC1C714; - case 0xBFC1C720u: goto label_BFC1C720; - case 0xBFC1C738u: goto label_BFC1C738; - case 0xBFC1C73Cu: goto label_BFC1C73C; - case 0xBFC1C744u: goto label_BFC1C744; - case 0xBFC1C770u: goto label_BFC1C770; - case 0xBFC1C774u: goto label_BFC1C774; - case 0xBFC1C77Cu: goto label_BFC1C77C; - default: break; - } - } -label_BFC1C5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C5B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C5BC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345C0u); -#endif - /* 0xBFC1C5C0: 8DCE9F68 lw $t6, -24728($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345C0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F68u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800345C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C5C4: AC209F70 sw $zero, -24720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345C4u); return; } g_debug_last_store_pc = 0x800345C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800345C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C5C8: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x800345C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C5CC: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800345CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1C5D0: 11C10003 beq $t6, $at, 0xBFC1C5E0 */ - uint32_t psx_brA_BFC1C5D0 = cpu->gpr[14]; uint32_t psx_brB_BFC1C5D0 = cpu->gpr[1]; - psx_taken_BFC1C5D0 = (psx_brA_BFC1C5D0 == psx_brB_BFC1C5D0); - psx_delay_BFC1C5D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C5D4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345D4u); return; } g_debug_last_store_pc = 0x800345D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800345D4u); -#endif - if (psx_delay_BFC1C5D0) { - psx_delay_BFC1C5D0 = 0; - if (psx_taken_BFC1C5D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345E0u); - goto label_BFC1C5E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345D8u); - } -label_BFC1C5D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C5D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C5DC: AC209F68 sw $zero, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345DCu); return; } g_debug_last_store_pc = 0x800345DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800345DCu); -#endif -label_BFC1C5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C5E0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345E0u); -#endif - /* 0xBFC1C5E4: 8DEF9F64 lw $t7, -24732($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345E4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F64u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800345E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C5E8: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800345E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1C5EC: 15E10005 bne $t7, $at, 0xBFC1C604 */ - uint32_t psx_brA_BFC1C5EC = cpu->gpr[15]; uint32_t psx_brB_BFC1C5EC = cpu->gpr[1]; - psx_taken_BFC1C5EC = (psx_brA_BFC1C5EC != psx_brB_BFC1C5EC); - psx_delay_BFC1C5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C5F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800345F0u); -#endif - if (psx_delay_BFC1C5EC) { - psx_delay_BFC1C5EC = 0; - if (psx_taken_BFC1C5EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034604u); - goto label_BFC1C604; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800345F4u); - } -label_BFC1C5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800345F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1C5F4: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345F4u); -#endif - /* 0xBFC1C5F8: 8F189E6C lw $t8, -24980($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800345F8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E6Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800345F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C5FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800345FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1C600: AC389F64 sw $t8, -24732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034600u); return; } g_debug_last_store_pc = 0x80034600u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389F64u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80034600u); -#endif -label_BFC1C604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1C604: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034604u); -#endif - /* 0xBFC1C608: 8F399F78 lw $t9, -24712($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034608u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F78u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C60C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003460Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C610: 17200058 bne $t9, $zero, 0xBFC1C774 */ - uint32_t psx_brA_BFC1C610 = cpu->gpr[25]; uint32_t psx_brB_BFC1C610 = cpu->gpr[0]; - psx_taken_BFC1C610 = (psx_brA_BFC1C610 != psx_brB_BFC1C610); - psx_delay_BFC1C610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034614u); -#endif - if (psx_delay_BFC1C610) { - psx_delay_BFC1C610 = 0; - if (psx_taken_BFC1C610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034774u); - goto label_BFC1C774; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034618u); - } -label_BFC1C618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1C618: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C61C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003461Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1C620: AC289F78 sw $t0, -24712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034620u); return; } g_debug_last_store_pc = 0x80034620u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289F78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C624: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C628: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1C62C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003462Cu); return; } g_debug_last_store_pc = 0x8003462Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C630: 0C00D350 jal 0xB0034D40 */ - cpu->gpr[31] = 0x80034638u; /* jal link before delay slot */ - psx_delay_BFC1C630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C634: AC229F7C sw $v0, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034634u); return; } g_debug_last_store_pc = 0x80034634u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034634u); -#endif - if (psx_delay_BFC1C630) { - psx_delay_BFC1C630 = 0; - cpu->gpr[31] = 0x80034638u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D40u); - cpu->pc = 0x80034D40u; return; - } -label_BFC1C638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C638: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034638u); -#endif - /* 0xBFC1C63C: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003463Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003463Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C640: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1C644: 14600006 bne $v1, $zero, 0xBFC1C660 */ - uint32_t psx_brA_BFC1C644 = cpu->gpr[3]; uint32_t psx_brB_BFC1C644 = cpu->gpr[0]; - psx_taken_BFC1C644 = (psx_brA_BFC1C644 != psx_brB_BFC1C644); - psx_delay_BFC1C644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1C648: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034648u); -#endif - if (psx_delay_BFC1C644) { - psx_delay_BFC1C644 = 0; - if (psx_taken_BFC1C644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034660u); - goto label_BFC1C660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003464Cu); - } -label_BFC1C64C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C64Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C64C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034650u); -#endif - /* 0xBFC1C650: 91299E70 lbu $t1, -24976($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24976; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24976)), 9, 0x200u); - PGXP_LOAD(0x91299E70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80034650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C654: 10000007 beq $zero, $zero, 0xBFC1C674 */ - uint32_t psx_brA_BFC1C654 = cpu->gpr[0]; uint32_t psx_brB_BFC1C654 = cpu->gpr[0]; - psx_taken_BFC1C654 = (psx_brA_BFC1C654 == psx_brB_BFC1C654); - psx_delay_BFC1C654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC1C658: AFA90028 sw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034658u); return; } g_debug_last_store_pc = 0x80034658u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80034658u); -#endif - if (psx_delay_BFC1C654) { - psx_delay_BFC1C654 = 0; - if (psx_taken_BFC1C654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034674u); - goto label_BFC1C674; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003465Cu); - } -label_BFC1C65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003465Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1C65C: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003465Cu); -#endif -label_BFC1C660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1C660: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1C664: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034664u); -#endif - /* 0xBFC1C668: 8D6BD0F0 lw $t3, -12048($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034668u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BD0F0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80034668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C66C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003466Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC1C670: AFAB0028 sw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034670u); return; } g_debug_last_store_pc = 0x80034670u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80034670u); -#endif -label_BFC1C674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1C674: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C678: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1C67C: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003467Cu); return; } g_debug_last_store_pc = 0x8003467Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C680: 3C03800F lui $v1, 0x800F */ - cpu->gpr[3] = 0x800F0000u; - PGXP_ALU(0x3C03800Fu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C684: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C688: 2442D0F0 addiu $v0, $v0, -12048 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-12048)); - PGXP_ALU(0x2442D0F0u, cpu->gpr[2], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1C68C: 2463D280 addiu $v1, $v1, -11648 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-11648)); - PGXP_ALU(0x2463D280u, cpu->gpr[3], _pgx1, 0xFFFFD280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1C690: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034690u); -#endif -label_BFC1C694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C694: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034694u); return; } g_debug_last_store_pc = 0x80034694u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C698: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80034698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C69C: AC40FFF4 sw $zero, -12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003469Cu); return; } g_debug_last_store_pc = 0x8003469Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003469Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C6A0: AC40FFF8 sw $zero, -8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346A0u); return; } g_debug_last_store_pc = 0x800346A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800346A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1C6A4: 1443FFFB bne $v0, $v1, 0xBFC1C694 */ - uint32_t psx_brA_BFC1C6A4 = cpu->gpr[2]; uint32_t psx_brB_BFC1C6A4 = cpu->gpr[3]; - psx_taken_BFC1C6A4 = (psx_brA_BFC1C6A4 != psx_brB_BFC1C6A4); - psx_delay_BFC1C6A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C6A8: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346A8u); return; } g_debug_last_store_pc = 0x800346A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800346A8u); -#endif - if (psx_delay_BFC1C6A4) { - psx_delay_BFC1C6A4 = 0; - if (psx_taken_BFC1C6A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034694u); - goto label_BFC1C694; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800346ACu); - } -label_BFC1C6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C6AC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800346ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346B0u); -#endif - /* 0xBFC1C6B0: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800346B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C6B4: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800346B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C6B8: 10410003 beq $v0, $at, 0xBFC1C6C8 */ - uint32_t psx_brA_BFC1C6B8 = cpu->gpr[2]; uint32_t psx_brB_BFC1C6B8 = cpu->gpr[1]; - psx_taken_BFC1C6B8 = (psx_brA_BFC1C6B8 == psx_brB_BFC1C6B8); - psx_delay_BFC1C6B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C6BC: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800346BCu); -#endif - if (psx_delay_BFC1C6B8) { - psx_delay_BFC1C6B8 = 0; - if (psx_taken_BFC1C6B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800346C8u); - goto label_BFC1C6C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800346C0u); - } -label_BFC1C6C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C6C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C6C0: 1441002B bne $v0, $at, 0xBFC1C770 */ - uint32_t psx_brA_BFC1C6C0 = cpu->gpr[2]; uint32_t psx_brB_BFC1C6C0 = cpu->gpr[1]; - psx_taken_BFC1C6C0 = (psx_brA_BFC1C6C0 != psx_brB_BFC1C6C0); - psx_delay_BFC1C6C0 = 1; - /* 0xBFC1C6C4: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346C4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800346C4u); -#endif - if (psx_delay_BFC1C6C0) { - psx_delay_BFC1C6C0 = 0; - if (psx_taken_BFC1C6C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034770u); - goto label_BFC1C770; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800346C8u); - } -label_BFC1C6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346C8u); -#endif - /* 0xBFC1C6C8: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800346C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C6CC: 0C00D2EB jal 0xB0034BAC */ - cpu->gpr[31] = 0x800346D4u; /* jal link before delay slot */ - psx_delay_BFC1C6CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C6D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800346D0u); -#endif - if (psx_delay_BFC1C6CC) { - psx_delay_BFC1C6CC = 0; - cpu->gpr[31] = 0x800346D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BACu); - cpu->pc = 0x80034BACu; return; - } -label_BFC1C6D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C6D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1C6D4: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800346D4u); -#endif - /* 0xBFC1C6D8: 8D8C9F74 lw $t4, -24716($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800346D8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9F74u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800346D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C6DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800346DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1C6E0: 15800018 bne $t4, $zero, 0xBFC1C744 */ - uint32_t psx_brA_BFC1C6E0 = cpu->gpr[12]; uint32_t psx_brB_BFC1C6E0 = cpu->gpr[0]; - psx_taken_BFC1C6E0 = (psx_brA_BFC1C6E0 != psx_brB_BFC1C6E0); - psx_delay_BFC1C6E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C6E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800346E4u); -#endif - if (psx_delay_BFC1C6E0) { - psx_delay_BFC1C6E0 = 0; - if (psx_taken_BFC1C6E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034744u); - goto label_BFC1C744; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800346E8u); - } -label_BFC1C6E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C6E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C6E8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800346E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1C6EC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800346ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800346F0u); -#endif - /* 0xBFC1C6F0: 91AD9E71 lbu $t5, -24975($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24975; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-24975)), 13, 0x2000u); - PGXP_LOAD(0x91AD9E71u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800346F0u); -#endif - /* 0xBFC1C6F4: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800346F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C6F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800346F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006u); -#endif - /* 0xBFC1C6FC: 01A2082B sltu $at, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01A2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800346FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C700: 1420000D bne $at, $zero, 0xBFC1C738 */ - uint32_t psx_brA_BFC1C700 = cpu->gpr[1]; uint32_t psx_brB_BFC1C700 = cpu->gpr[0]; - psx_taken_BFC1C700 = (psx_brA_BFC1C700 != psx_brB_BFC1C700); - psx_delay_BFC1C700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1C704: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034704u); -#endif - if (psx_delay_BFC1C700) { - psx_delay_BFC1C700 = 0; - if (psx_taken_BFC1C700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034738u); - goto label_BFC1C738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034708u); - } -label_BFC1C708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C708: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034708u); -#endif -label_BFC1C70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003470Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C70C: 1020000B beq $at, $zero, 0xBFC1C73C */ - uint32_t psx_brA_BFC1C70C = cpu->gpr[1]; uint32_t psx_brB_BFC1C70C = cpu->gpr[0]; - psx_taken_BFC1C70C = (psx_brA_BFC1C70C == psx_brB_BFC1C70C); - psx_delay_BFC1C70C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034710u); -#endif - /* 0xBFC1C710: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034710u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034710u); -#endif - if (psx_delay_BFC1C70C) { - psx_delay_BFC1C70C = 0; - if (psx_taken_BFC1C70C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003473Cu); - goto label_BFC1C73C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034714u); - } -label_BFC1C714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1C714: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C718: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80034720u; /* jal link before delay slot */ - psx_delay_BFC1C718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C71C: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003471Cu); -#endif - if (psx_delay_BFC1C718) { - psx_delay_BFC1C718 = 0; - cpu->gpr[31] = 0x80034720u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C720: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034720u); -#endif - /* 0xBFC1C724: 91CE9E71 lbu $t6, -24975($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24975; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-24975)), 14, 0x4000u); - PGXP_LOAD(0x91CE9E71u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1C728: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14002u); -#endif - /* 0xBFC1C72C: 01D0082B sltu $at, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x01D0082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C730: 1020FFF6 beq $at, $zero, 0xBFC1C70C */ - uint32_t psx_brA_BFC1C730 = cpu->gpr[1]; uint32_t psx_brB_BFC1C730 = cpu->gpr[0]; - psx_taken_BFC1C730 = (psx_brA_BFC1C730 == psx_brB_BFC1C730); - psx_delay_BFC1C730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1C734: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034734u); -#endif - if (psx_delay_BFC1C730) { - psx_delay_BFC1C730 = 0; - if (psx_taken_BFC1C730) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003470Cu); - goto label_BFC1C70C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034738u); - } -label_BFC1C738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034738u); -#endif - /* 0xBFC1C738: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034738u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034738u); -#endif -label_BFC1C73C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C73Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C73C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80034744u; /* jal link before delay slot */ - psx_delay_BFC1C73C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C740: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034740u); -#endif - if (psx_delay_BFC1C73C) { - psx_delay_BFC1C73C = 0; - cpu->gpr[31] = 0x80034744u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1C744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C744: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034744u); -#endif - /* 0xBFC1C748: 8C429F7C lw $v0, -24708($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034748u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034748u); -#endif - /* 0xBFC1C74C: 8FAF0028 lw $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003474Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003474Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C750: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1C754: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C758: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1C75C: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1C760: AC2FD0F0 sw $t7, -12048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -12048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034760u); return; } g_debug_last_store_pc = 0x80034760u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FD0F0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C764: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C768: AC229F7C sw $v0, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034768u); return; } g_debug_last_store_pc = 0x80034768u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034768u); -#endif - /* 0xBFC1C76C: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003476Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003476Cu); -#endif -label_BFC1C770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034770u); -#endif -label_BFC1C774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C774: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x8003477Cu; /* jal link before delay slot */ - psx_delay_BFC1C774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034778u); -#endif - if (psx_delay_BFC1C774) { - psx_delay_BFC1C774 = 0; - cpu->gpr[31] = 0x8003477Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1C77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003477Cu); -#endif - /* 0xBFC1C77C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003477Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003477Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C780: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80034780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C784: 03E00008 jr $ra */ - psx_delay_BFC1C784 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C788: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034788u); -#endif - if (psx_delay_BFC1C784) { - psx_delay_BFC1C784 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C78C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C78Cu); - int psx_delay_BFC1C79C = 0; - int psx_taken_BFC1C79C = 0; - int psx_delay_BFC1C7A8 = 0; - int psx_taken_BFC1C7A8 = 0; - int psx_delay_BFC1C7B8 = 0; - int psx_taken_BFC1C7B8 = 0; - int psx_delay_BFC1C7C0 = 0; - int psx_taken_BFC1C7C0 = 0; - int psx_delay_BFC1C7D4 = 0; - int psx_taken_BFC1C7D4 = 0; - int psx_delay_BFC1C7E8 = 0; - int psx_taken_BFC1C7E8 = 0; - int psx_delay_BFC1C7F4 = 0; - int psx_delay_BFC1C800 = 0; - int psx_delay_BFC1C810 = 0; - int psx_taken_BFC1C810 = 0; - int psx_delay_BFC1C81C = 0; - int psx_delay_BFC1C828 = 0; - int psx_delay_BFC1C830 = 0; - int psx_delay_BFC1C838 = 0; - int psx_taken_BFC1C838 = 0; - int psx_delay_BFC1C84C = 0; - int psx_taken_BFC1C84C = 0; - int psx_delay_BFC1C860 = 0; - int psx_taken_BFC1C860 = 0; - int psx_delay_BFC1C868 = 0; - int psx_delay_BFC1C874 = 0; - int psx_delay_BFC1C880 = 0; - int psx_delay_BFC1C888 = 0; - int psx_taken_BFC1C888 = 0; - int psx_delay_BFC1C8A0 = 0; - int psx_taken_BFC1C8A0 = 0; - int psx_delay_BFC1C8B4 = 0; - int psx_taken_BFC1C8B4 = 0; - int psx_delay_BFC1C8BC = 0; - int psx_delay_BFC1C8C8 = 0; - int psx_delay_BFC1C8D4 = 0; - int psx_delay_BFC1C8E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C7A4u: goto label_BFC1C7A4; - case 0xBFC1C7B0u: goto label_BFC1C7B0; - case 0xBFC1C7C0u: goto label_BFC1C7C0; - case 0xBFC1C7C8u: goto label_BFC1C7C8; - case 0xBFC1C7DCu: goto label_BFC1C7DC; - case 0xBFC1C7F0u: goto label_BFC1C7F0; - case 0xBFC1C7FCu: goto label_BFC1C7FC; - case 0xBFC1C808u: goto label_BFC1C808; - case 0xBFC1C818u: goto label_BFC1C818; - case 0xBFC1C81Cu: goto label_BFC1C81C; - case 0xBFC1C824u: goto label_BFC1C824; - case 0xBFC1C830u: goto label_BFC1C830; - case 0xBFC1C838u: goto label_BFC1C838; - case 0xBFC1C840u: goto label_BFC1C840; - case 0xBFC1C854u: goto label_BFC1C854; - case 0xBFC1C868u: goto label_BFC1C868; - case 0xBFC1C870u: goto label_BFC1C870; - case 0xBFC1C874u: goto label_BFC1C874; - case 0xBFC1C87Cu: goto label_BFC1C87C; - case 0xBFC1C888u: goto label_BFC1C888; - case 0xBFC1C890u: goto label_BFC1C890; - case 0xBFC1C8A8u: goto label_BFC1C8A8; - case 0xBFC1C8BCu: goto label_BFC1C8BC; - case 0xBFC1C8C4u: goto label_BFC1C8C4; - case 0xBFC1C8C8u: goto label_BFC1C8C8; - case 0xBFC1C8D0u: goto label_BFC1C8D0; - case 0xBFC1C8DCu: goto label_BFC1C8DC; - case 0xBFC1C8E0u: goto label_BFC1C8E0; - default: break; - } - } -label_BFC1C78C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C78Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003478Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C78C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003478Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034790u); -#endif - /* 0xBFC1C790: 8C429F68 lw $v0, -24728($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034790u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C794: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80034794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C798: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C79C: 1040003C beq $v0, $zero, 0xBFC1C890 */ - uint32_t psx_brA_BFC1C79C = cpu->gpr[2]; uint32_t psx_brB_BFC1C79C = cpu->gpr[0]; - psx_taken_BFC1C79C = (psx_brA_BFC1C79C == psx_brB_BFC1C79C); - psx_delay_BFC1C79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C7A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800347A0u); return; } g_debug_last_store_pc = 0x800347A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800347A0u); -#endif - if (psx_delay_BFC1C79C) { - psx_delay_BFC1C79C = 0; - if (psx_taken_BFC1C79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034890u); - goto label_BFC1C890; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347A4u); - } -label_BFC1C7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C7A4: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800347A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C7A8: 10410007 beq $v0, $at, 0xBFC1C7C8 */ - uint32_t psx_brA_BFC1C7A8 = cpu->gpr[2]; uint32_t psx_brB_BFC1C7A8 = cpu->gpr[1]; - psx_taken_BFC1C7A8 = (psx_brA_BFC1C7A8 == psx_brB_BFC1C7A8); - psx_delay_BFC1C7A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C7AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800347ACu); -#endif - if (psx_delay_BFC1C7A8) { - psx_delay_BFC1C7A8 = 0; - if (psx_taken_BFC1C7A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347C8u); - goto label_BFC1C7C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347B0u); - } -label_BFC1C7B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C7B0: AC229F68 sw $v0, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800347B0u); return; } g_debug_last_store_pc = 0x800347B0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800347B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C7B4: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800347B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C7B8: 10410021 beq $v0, $at, 0xBFC1C840 */ - uint32_t psx_brA_BFC1C7B8 = cpu->gpr[2]; uint32_t psx_brB_BFC1C7B8 = cpu->gpr[1]; - psx_taken_BFC1C7B8 = (psx_brA_BFC1C7B8 == psx_brB_BFC1C7B8); - psx_delay_BFC1C7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C7BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800347BCu); -#endif - if (psx_delay_BFC1C7B8) { - psx_delay_BFC1C7B8 = 0; - if (psx_taken_BFC1C7B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034840u); - goto label_BFC1C840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347C0u); - } -label_BFC1C7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C7C0: 10000033 beq $zero, $zero, 0xBFC1C890 */ - uint32_t psx_brA_BFC1C7C0 = cpu->gpr[0]; uint32_t psx_brB_BFC1C7C0 = cpu->gpr[0]; - psx_taken_BFC1C7C0 = (psx_brA_BFC1C7C0 == psx_brB_BFC1C7C0); - psx_delay_BFC1C7C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C7C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800347C4u); -#endif - if (psx_delay_BFC1C7C0) { - psx_delay_BFC1C7C0 = 0; - if (psx_taken_BFC1C7C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034890u); - goto label_BFC1C890; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347C8u); - } -label_BFC1C7C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C7C8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800347C8u); -#endif - /* 0xBFC1C7CC: 8DCE9F70 lw $t6, -24720($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800347CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800347CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C7D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800347D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1C7D4: 15C00006 bne $t6, $zero, 0xBFC1C7F0 */ - uint32_t psx_brA_BFC1C7D4 = cpu->gpr[14]; uint32_t psx_brB_BFC1C7D4 = cpu->gpr[0]; - psx_taken_BFC1C7D4 = (psx_brA_BFC1C7D4 != psx_brB_BFC1C7D4); - psx_delay_BFC1C7D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C7D8: AC229F68 sw $v0, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800347D8u); return; } g_debug_last_store_pc = 0x800347D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800347D8u); -#endif - if (psx_delay_BFC1C7D4) { - psx_delay_BFC1C7D4 = 0; - if (psx_taken_BFC1C7D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347F0u); - goto label_BFC1C7F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347DCu); - } -label_BFC1C7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C7DC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800347DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347E0u); -#endif - /* 0xBFC1C7E0: 8DEF9F78 lw $t7, -24712($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800347E0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800347E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C7E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800347E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1C7E8: 11E0000C beq $t7, $zero, 0xBFC1C81C */ - uint32_t psx_brA_BFC1C7E8 = cpu->gpr[15]; uint32_t psx_brB_BFC1C7E8 = cpu->gpr[0]; - psx_taken_BFC1C7E8 = (psx_brA_BFC1C7E8 == psx_brB_BFC1C7E8); - psx_delay_BFC1C7E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C7EC: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800347ECu); -#endif - if (psx_delay_BFC1C7E8) { - psx_delay_BFC1C7E8 = 0; - if (psx_taken_BFC1C7E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003481Cu); - goto label_BFC1C81C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800347F0u); - } -label_BFC1C7F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C7F0: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800347F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C7F4: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800347FCu; /* jal link before delay slot */ - psx_delay_BFC1C7F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C7F8: 24050036 addiu $a1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24050036u, cpu->gpr[5], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x800347F8u); -#endif - if (psx_delay_BFC1C7F4) { - psx_delay_BFC1C7F4 = 0; - cpu->gpr[31] = 0x800347FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C7FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C7FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800347FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C7FC: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x800347FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C800: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80034808u; /* jal link before delay slot */ - psx_delay_BFC1C800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C804: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x80034804u); -#endif - if (psx_delay_BFC1C800) { - psx_delay_BFC1C800 = 0; - cpu->gpr[31] = 0x80034808u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C808: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80034808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C80C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C810: 10000007 beq $zero, $zero, 0xBFC1C830 */ - uint32_t psx_brA_BFC1C810 = cpu->gpr[0]; uint32_t psx_brB_BFC1C810 = cpu->gpr[0]; - psx_taken_BFC1C810 = (psx_brA_BFC1C810 == psx_brB_BFC1C810); - psx_delay_BFC1C810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C814: AC229F68 sw $v0, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034814u); return; } g_debug_last_store_pc = 0x80034814u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034814u); -#endif - if (psx_delay_BFC1C810) { - psx_delay_BFC1C810 = 0; - if (psx_taken_BFC1C810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034830u); - goto label_BFC1C830; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034818u); - } -label_BFC1C818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C818: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034818u); -#endif -label_BFC1C81C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C81Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C81C: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80034824u; /* jal link before delay slot */ - psx_delay_BFC1C81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C820: 24050035 addiu $a1, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x24050035u, cpu->gpr[5], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0x80034820u); -#endif - if (psx_delay_BFC1C81C) { - psx_delay_BFC1C81C = 0; - cpu->gpr[31] = 0x80034824u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C824: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x80034824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C828: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80034830u; /* jal link before delay slot */ - psx_delay_BFC1C828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C82C: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x8003482Cu); -#endif - if (psx_delay_BFC1C828) { - psx_delay_BFC1C828 = 0; - cpu->gpr[31] = 0x80034830u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C830: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80034838u; /* jal link before delay slot */ - psx_delay_BFC1C830 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C834: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034834u); -#endif - if (psx_delay_BFC1C830) { - psx_delay_BFC1C830 = 0; - cpu->gpr[31] = 0x80034838u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1C838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C838: 10000029 beq $zero, $zero, 0xBFC1C8E0 */ - uint32_t psx_brA_BFC1C838 = cpu->gpr[0]; uint32_t psx_brB_BFC1C838 = cpu->gpr[0]; - psx_taken_BFC1C838 = (psx_brA_BFC1C838 == psx_brB_BFC1C838); - psx_delay_BFC1C838 = 1; - /* 0xBFC1C83C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003483Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003483Cu); -#endif - if (psx_delay_BFC1C838) { - psx_delay_BFC1C838 = 0; - if (psx_taken_BFC1C838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348E0u); - goto label_BFC1C8E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034840u); - } -label_BFC1C840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1C840: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034840u); -#endif - /* 0xBFC1C844: 8F189F78 lw $t8, -24712($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034844u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F78u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80034844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1C84C: 17000009 bne $t8, $zero, 0xBFC1C874 */ - uint32_t psx_brA_BFC1C84C = cpu->gpr[24]; uint32_t psx_brB_BFC1C84C = cpu->gpr[0]; - psx_taken_BFC1C84C = (psx_brA_BFC1C84C != psx_brB_BFC1C84C); - psx_delay_BFC1C84C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C850: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034850u); -#endif - if (psx_delay_BFC1C84C) { - psx_delay_BFC1C84C = 0; - if (psx_taken_BFC1C84C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034874u); - goto label_BFC1C874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034854u); - } -label_BFC1C854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1C854: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034854u); -#endif - /* 0xBFC1C858: 8F399F70 lw $t9, -24720($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034858u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F70u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C85C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C860: 17200004 bne $t9, $zero, 0xBFC1C874 */ - uint32_t psx_brA_BFC1C860 = cpu->gpr[25]; uint32_t psx_brB_BFC1C860 = cpu->gpr[0]; - psx_taken_BFC1C860 = (psx_brA_BFC1C860 != psx_brB_BFC1C860); - psx_delay_BFC1C860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C864: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034864u); -#endif - if (psx_delay_BFC1C860) { - psx_delay_BFC1C860 = 0; - if (psx_taken_BFC1C860) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034874u); - goto label_BFC1C874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034868u); - } -label_BFC1C868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C868: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x80034870u; /* jal link before delay slot */ - psx_delay_BFC1C868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C86C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003486Cu); -#endif - if (psx_delay_BFC1C868) { - psx_delay_BFC1C868 = 0; - cpu->gpr[31] = 0x80034870u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1C870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C870: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034870u); -#endif -label_BFC1C874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C874: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x8003487Cu; /* jal link before delay slot */ - psx_delay_BFC1C874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C878: 24050036 addiu $a1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24050036u, cpu->gpr[5], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x80034878u); -#endif - if (psx_delay_BFC1C874) { - psx_delay_BFC1C874 = 0; - cpu->gpr[31] = 0x8003487Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C87C: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x8003487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C880: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x80034888u; /* jal link before delay slot */ - psx_delay_BFC1C880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C884: 24050022 addiu $a1, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24050022u, cpu->gpr[5], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x80034884u); -#endif - if (psx_delay_BFC1C880) { - psx_delay_BFC1C880 = 0; - cpu->gpr[31] = 0x80034888u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C888: 10000015 beq $zero, $zero, 0xBFC1C8E0 */ - uint32_t psx_brA_BFC1C888 = cpu->gpr[0]; uint32_t psx_brB_BFC1C888 = cpu->gpr[0]; - psx_taken_BFC1C888 = (psx_brA_BFC1C888 == psx_brB_BFC1C888); - psx_delay_BFC1C888 = 1; - /* 0xBFC1C88C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003488Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003488Cu); -#endif - if (psx_delay_BFC1C888) { - psx_delay_BFC1C888 = 0; - if (psx_taken_BFC1C888) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348E0u); - goto label_BFC1C8E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034890u); - } -label_BFC1C890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1C890: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034890u); -#endif - /* 0xBFC1C894: 8D089F78 lw $t0, -24712($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034894u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089F78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1C898: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C89C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1C8A0: 15000008 bne $t0, $zero, 0xBFC1C8C4 */ - uint32_t psx_brA_BFC1C8A0 = cpu->gpr[8]; uint32_t psx_brB_BFC1C8A0 = cpu->gpr[0]; - psx_taken_BFC1C8A0 = (psx_brA_BFC1C8A0 != psx_brB_BFC1C8A0); - psx_delay_BFC1C8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1C8A4: AC229F68 sw $v0, -24728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348A4u); return; } g_debug_last_store_pc = 0x800348A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800348A4u); -#endif - if (psx_delay_BFC1C8A0) { - psx_delay_BFC1C8A0 = 0; - if (psx_taken_BFC1C8A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348C4u); - goto label_BFC1C8C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348A8u); - } -label_BFC1C8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1C8A8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800348A8u); -#endif - /* 0xBFC1C8AC: 8D299F70 lw $t1, -24720($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348ACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299F70u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800348ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C8B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800348B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1C8B4: 15200004 bne $t1, $zero, 0xBFC1C8C8 */ - uint32_t psx_brA_BFC1C8B4 = cpu->gpr[9]; uint32_t psx_brB_BFC1C8B4 = cpu->gpr[0]; - psx_taken_BFC1C8B4 = (psx_brA_BFC1C8B4 != psx_brB_BFC1C8B4); - psx_delay_BFC1C8B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C8B8: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800348B8u); -#endif - if (psx_delay_BFC1C8B4) { - psx_delay_BFC1C8B4 = 0; - if (psx_taken_BFC1C8B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348C8u); - goto label_BFC1C8C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800348BCu); - } -label_BFC1C8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C8BC: 0C00D843 jal 0xB003610C */ - cpu->gpr[31] = 0x800348C4u; /* jal link before delay slot */ - psx_delay_BFC1C8BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C8C0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800348C0u); -#endif - if (psx_delay_BFC1C8BC) { - psx_delay_BFC1C8BC = 0; - cpu->gpr[31] = 0x800348C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003610Cu); - cpu->pc = 0x8003610Cu; return; - } -label_BFC1C8C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C8C4: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800348C4u); -#endif -label_BFC1C8C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C8C8: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800348D0u; /* jal link before delay slot */ - psx_delay_BFC1C8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C8CC: 24050032 addiu $a1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24050032u, cpu->gpr[5], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800348CCu); -#endif - if (psx_delay_BFC1C8C8) { - psx_delay_BFC1C8C8 = 0; - cpu->gpr[31] = 0x800348D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1C8D0: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x800348D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C8D4: 0C00C9BB jal 0xB00326EC */ - cpu->gpr[31] = 0x800348DCu; /* jal link before delay slot */ - psx_delay_BFC1C8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1C8D8: 24050032 addiu $a1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24050032u, cpu->gpr[5], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800348D8u); -#endif - if (psx_delay_BFC1C8D4) { - psx_delay_BFC1C8D4 = 0; - cpu->gpr[31] = 0x800348DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800326ECu); - cpu->pc = 0x800326ECu; return; - } -label_BFC1C8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348DCu); -#endif - /* 0xBFC1C8DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800348DCu); -#endif -label_BFC1C8E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C8E0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800348E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C8E4: 03E00008 jr $ra */ - psx_delay_BFC1C8E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C8E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800348E8u); -#endif - if (psx_delay_BFC1C8E4) { - psx_delay_BFC1C8E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C8EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C8ECu); - int psx_delay_BFC1C8FC = 0; - int psx_delay_BFC1C914 = 0; - int psx_taken_BFC1C914 = 0; - int psx_delay_BFC1C92C = 0; - int psx_delay_BFC1C934 = 0; - int psx_delay_BFC1C970 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C904u: goto label_BFC1C904; - case 0xBFC1C91Cu: goto label_BFC1C91C; - case 0xBFC1C934u: goto label_BFC1C934; - case 0xBFC1C93Cu: goto label_BFC1C93C; - case 0xBFC1C96Cu: goto label_BFC1C96C; - default: break; - } - } -label_BFC1C8EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C8ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C8EC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800348ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800348F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1C8F0: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348F0u); return; } g_debug_last_store_pc = 0x800348F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800348F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C8F4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348F4u); return; } g_debug_last_store_pc = 0x800348F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800348F4u); -#endif - /* 0xBFC1C8F8: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800348F8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800348F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C8FC: 0C00D26D jal 0xB00349B4 */ - cpu->gpr[31] = 0x80034904u; /* jal link before delay slot */ - psx_delay_BFC1C8FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C900: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034900u); -#endif - if (psx_delay_BFC1C8FC) { - psx_delay_BFC1C8FC = 0; - cpu->gpr[31] = 0x80034904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349B4u); - cpu->pc = 0x800349B4u; return; - } -label_BFC1C904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034904u); -#endif - /* 0xBFC1C904: 8FAE0020 lw $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034904u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C908: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C90C: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC1C910: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1C914: 11E00015 beq $t7, $zero, 0xBFC1C96C */ - uint32_t psx_brA_BFC1C914 = cpu->gpr[15]; uint32_t psx_brB_BFC1C914 = cpu->gpr[0]; - psx_taken_BFC1C914 = (psx_brA_BFC1C914 == psx_brB_BFC1C914); - psx_delay_BFC1C914 = 1; - /* 0xBFC1C918: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034918u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034918u); -#endif - if (psx_delay_BFC1C914) { - psx_delay_BFC1C914 = 0; - if (psx_taken_BFC1C914) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003496Cu); - goto label_BFC1C96C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003491Cu); - } -label_BFC1C91C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C91Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1C91C: 24180003 addiu $t8, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24180003u, cpu->gpr[24], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C920: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1C924: AC3865D4 sw $t8, 26068($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26068; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034924u); return; } g_debug_last_store_pc = 0x80034924u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC3865D4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80034924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C928: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C92C: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80034934u; /* jal link before delay slot */ - psx_delay_BFC1C92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C930: AC20A780 sw $zero, -22656($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034930u); return; } g_debug_last_store_pc = 0x80034930u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034930u); -#endif - if (psx_delay_BFC1C92C) { - psx_delay_BFC1C92C = 0; - cpu->gpr[31] = 0x80034934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1C934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1C934: 0C00D8F3 jal 0xB00363CC */ - cpu->gpr[31] = 0x8003493Cu; /* jal link before delay slot */ - psx_delay_BFC1C934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034938u); -#endif - if (psx_delay_BFC1C934) { - psx_delay_BFC1C934 = 0; - cpu->gpr[31] = 0x8003493Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363CCu); - cpu->pc = 0x800363CCu; return; - } -label_BFC1C93C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C93Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C93C: 24190032 addiu $t9, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24190032u, cpu->gpr[25], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C940: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1C944: AC396940 sw $t9, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034944u); return; } g_debug_last_store_pc = 0x80034944u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396940u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C948: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1C94C: 24080032 addiu $t0, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24080032u, cpu->gpr[8], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003494Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1C950: AC286948 sw $t0, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034950u); return; } g_debug_last_store_pc = 0x80034950u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286948u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C954: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1C958: AC209E38 sw $zero, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034958u); return; } g_debug_last_store_pc = 0x80034958u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E38u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C95C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003495Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1C960: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1C964: AC299E18 sw $t1, -25064($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25064; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034964u); return; } g_debug_last_store_pc = 0x80034964u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E18u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80034964u); -#endif - /* 0xBFC1C968: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034968u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034968u); -#endif -label_BFC1C96C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C96Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C96C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C970: 03E00008 jr $ra */ - psx_delay_BFC1C970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C974: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034974u); -#endif - if (psx_delay_BFC1C970) { - psx_delay_BFC1C970 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C978(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C978u); - int psx_delay_BFC1C980 = 0; -label_BFC1C978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C978: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034978u); -#endif - /* 0xBFC1C97C: 8C429F70 lw $v0, -24720($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003497Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C980: 03E00008 jr $ra */ - psx_delay_BFC1C980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034984u); -#endif - if (psx_delay_BFC1C980) { - psx_delay_BFC1C980 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C988(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C988u); - int psx_delay_BFC1C990 = 0; -label_BFC1C988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C988: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034988u); -#endif - /* 0xBFC1C98C: 8C429F78 lw $v0, -24712($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003498Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F78u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C990: 03E00008 jr $ra */ - psx_delay_BFC1C990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034994u); -#endif - if (psx_delay_BFC1C990) { - psx_delay_BFC1C990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C998(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C998u); - int psx_delay_BFC1C9A0 = 0; -label_BFC1C998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1C998: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034998u); -#endif - /* 0xBFC1C99C: 8C429F7C lw $v0, -24708($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003499Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C9A0: 03E00008 jr $ra */ - psx_delay_BFC1C9A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C9A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800349A4u); -#endif - if (psx_delay_BFC1C9A0) { - psx_delay_BFC1C9A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C9A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C9A8u); - int psx_delay_BFC1C9AC = 0; -label_BFC1C9A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C9A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C9A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1C9AC: 03E00008 jr $ra */ - psx_delay_BFC1C9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1C9B0: AC249F7C sw $a0, -24708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349B0u); return; } g_debug_last_store_pc = 0x800349B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249F7Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800349B0u); -#endif - if (psx_delay_BFC1C9AC) { - psx_delay_BFC1C9AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1C9B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1C9B4u); - int psx_delay_BFC1C9C0 = 0; - int psx_taken_BFC1C9C0 = 0; - int psx_delay_BFC1C9D4 = 0; - int psx_taken_BFC1C9D4 = 0; - int psx_delay_BFC1C9E8 = 0; - int psx_taken_BFC1C9E8 = 0; - int psx_delay_BFC1C9F8 = 0; - int psx_taken_BFC1C9F8 = 0; - int psx_delay_BFC1CA0C = 0; - int psx_taken_BFC1CA0C = 0; - int psx_delay_BFC1CA14 = 0; - int psx_delay_BFC1CA1C = 0; - int psx_taken_BFC1CA1C = 0; - int psx_delay_BFC1CA24 = 0; - int psx_delay_BFC1CA2C = 0; - int psx_taken_BFC1CA2C = 0; - int psx_delay_BFC1CA40 = 0; - int psx_taken_BFC1CA40 = 0; - int psx_delay_BFC1CA48 = 0; - int psx_delay_BFC1CA50 = 0; - int psx_taken_BFC1CA50 = 0; - int psx_delay_BFC1CA64 = 0; - int psx_taken_BFC1CA64 = 0; - int psx_delay_BFC1CA6C = 0; - int psx_delay_BFC1CA74 = 0; - int psx_taken_BFC1CA74 = 0; - int psx_delay_BFC1CA88 = 0; - int psx_taken_BFC1CA88 = 0; - int psx_delay_BFC1CA90 = 0; - int psx_delay_BFC1CA98 = 0; - int psx_taken_BFC1CA98 = 0; - int psx_delay_BFC1CAAC = 0; - int psx_taken_BFC1CAAC = 0; - int psx_delay_BFC1CAB4 = 0; - int psx_delay_BFC1CABC = 0; - int psx_taken_BFC1CABC = 0; - int psx_delay_BFC1CAD0 = 0; - int psx_taken_BFC1CAD0 = 0; - int psx_delay_BFC1CAD8 = 0; - int psx_delay_BFC1CAE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1C9C8u: goto label_BFC1C9C8; - case 0xBFC1C9DCu: goto label_BFC1C9DC; - case 0xBFC1C9F0u: goto label_BFC1C9F0; - case 0xBFC1CA00u: goto label_BFC1CA00; - case 0xBFC1CA14u: goto label_BFC1CA14; - case 0xBFC1CA1Cu: goto label_BFC1CA1C; - case 0xBFC1CA24u: goto label_BFC1CA24; - case 0xBFC1CA2Cu: goto label_BFC1CA2C; - case 0xBFC1CA34u: goto label_BFC1CA34; - case 0xBFC1CA38u: goto label_BFC1CA38; - case 0xBFC1CA48u: goto label_BFC1CA48; - case 0xBFC1CA50u: goto label_BFC1CA50; - case 0xBFC1CA58u: goto label_BFC1CA58; - case 0xBFC1CA5Cu: goto label_BFC1CA5C; - case 0xBFC1CA6Cu: goto label_BFC1CA6C; - case 0xBFC1CA74u: goto label_BFC1CA74; - case 0xBFC1CA7Cu: goto label_BFC1CA7C; - case 0xBFC1CA80u: goto label_BFC1CA80; - case 0xBFC1CA90u: goto label_BFC1CA90; - case 0xBFC1CA98u: goto label_BFC1CA98; - case 0xBFC1CAA0u: goto label_BFC1CAA0; - case 0xBFC1CAA4u: goto label_BFC1CAA4; - case 0xBFC1CAB4u: goto label_BFC1CAB4; - case 0xBFC1CABCu: goto label_BFC1CABC; - case 0xBFC1CAC4u: goto label_BFC1CAC4; - case 0xBFC1CAC8u: goto label_BFC1CAC8; - case 0xBFC1CAD8u: goto label_BFC1CAD8; - case 0xBFC1CAE0u: goto label_BFC1CAE0; - case 0xBFC1CAE4u: goto label_BFC1CAE4; - default: break; - } - } -label_BFC1C9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1C9B4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349B4u); -#endif - /* 0xBFC1C9B8: 8DCE9DF8 lw $t6, -25096($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800349B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1C9BC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800349BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1C9C0: 15C00047 bne $t6, $zero, 0xBFC1CAE0 */ - uint32_t psx_brA_BFC1C9C0 = cpu->gpr[14]; uint32_t psx_brB_BFC1C9C0 = cpu->gpr[0]; - psx_taken_BFC1C9C0 = (psx_brA_BFC1C9C0 != psx_brB_BFC1C9C0); - psx_delay_BFC1C9C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1C9C4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349C4u); return; } g_debug_last_store_pc = 0x800349C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800349C4u); -#endif - if (psx_delay_BFC1C9C0) { - psx_delay_BFC1C9C0 = 0; - if (psx_taken_BFC1C9C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE0u); - goto label_BFC1CAE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349C8u); - } -label_BFC1C9C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C9C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1C9C8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349C8u); -#endif - /* 0xBFC1C9CC: 8DEF9DF4 lw $t7, -25100($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349CCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800349CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C9D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800349D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1C9D4: 15E00043 bne $t7, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1C9D4 = cpu->gpr[15]; uint32_t psx_brB_BFC1C9D4 = cpu->gpr[0]; - psx_taken_BFC1C9D4 = (psx_brA_BFC1C9D4 != psx_brB_BFC1C9D4); - psx_delay_BFC1C9D4 = 1; - /* 0xBFC1C9D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800349D8u); -#endif - if (psx_delay_BFC1C9D4) { - psx_delay_BFC1C9D4 = 0; - if (psx_taken_BFC1C9D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349DCu); - } -label_BFC1C9DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C9DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1C9DC: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349E0u); -#endif - /* 0xBFC1C9E0: 8F189E78 lw $t8, -24968($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800349E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E78u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800349E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1C9E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800349E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1C9E8: 1300003D beq $t8, $zero, 0xBFC1CAE0 */ - uint32_t psx_brA_BFC1C9E8 = cpu->gpr[24]; uint32_t psx_brB_BFC1C9E8 = cpu->gpr[0]; - psx_taken_BFC1C9E8 = (psx_brA_BFC1C9E8 == psx_brB_BFC1C9E8); - psx_delay_BFC1C9E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C9EC: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349ECu); -#endif - if (psx_delay_BFC1C9E8) { - psx_delay_BFC1C9E8 = 0; - if (psx_taken_BFC1C9E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE0u); - goto label_BFC1CAE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349F0u); - } -label_BFC1C9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1C9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800349F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C9F0: 34210800 ori $at, $at, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x800u; - PGXP_ALU(0x34210800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x800349F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC1C9F4: 0081C824 and $t9, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800349F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1C9F8: 1320000F beq $t9, $zero, 0xBFC1CA38 */ - uint32_t psx_brA_BFC1C9F8 = cpu->gpr[25]; uint32_t psx_brB_BFC1C9F8 = cpu->gpr[0]; - psx_taken_BFC1C9F8 = (psx_brA_BFC1C9F8 == psx_brB_BFC1C9F8); - psx_delay_BFC1C9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1C9FC: 3C010100 lui $at, 0x100 */ - cpu->gpr[1] = 0x01000000u; - PGXP_ALU(0x3C010100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800349FCu); -#endif - if (psx_delay_BFC1C9F8) { - psx_delay_BFC1C9F8 = 0; - if (psx_taken_BFC1C9F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A38u); - goto label_BFC1CA38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A00u); - } -label_BFC1CA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1CA00: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A00u); -#endif - /* 0xBFC1CA04: 8D086948 lw $t0, 26952($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A04u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086948u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CA08: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80034A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1CA0C: 15010005 bne $t0, $at, 0xBFC1CA24 */ - uint32_t psx_brA_BFC1CA0C = cpu->gpr[8]; uint32_t psx_brB_BFC1CA0C = cpu->gpr[1]; - psx_taken_BFC1CA0C = (psx_brA_BFC1CA0C != psx_brB_BFC1CA0C); - psx_delay_BFC1CA0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034A10u); -#endif - if (psx_delay_BFC1CA0C) { - psx_delay_BFC1CA0C = 0; - if (psx_taken_BFC1CA0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A24u); - goto label_BFC1CA24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A14u); - } -label_BFC1CA14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CA14: 0C00DE60 jal 0xB0037980 */ - cpu->gpr[31] = 0x80034A1Cu; /* jal link before delay slot */ - psx_delay_BFC1CA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034A18u); -#endif - if (psx_delay_BFC1CA14) { - psx_delay_BFC1CA14 = 0; - cpu->gpr[31] = 0x80034A1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037980u); - cpu->pc = 0x80037980u; return; - } -label_BFC1CA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA1C: 10000031 beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CA1C = cpu->gpr[0]; uint32_t psx_brB_BFC1CA1C = cpu->gpr[0]; - psx_taken_BFC1CA1C = (psx_brA_BFC1CA1C == psx_brB_BFC1CA1C); - psx_delay_BFC1CA1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A20u); -#endif - /* 0xBFC1CA20: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A20u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A20u); -#endif - if (psx_delay_BFC1CA1C) { - psx_delay_BFC1CA1C = 0; - if (psx_taken_BFC1CA1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A24u); - } -label_BFC1CA24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CA24: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80034A2Cu; /* jal link before delay slot */ - psx_delay_BFC1CA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1CA28: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034A28u); -#endif - if (psx_delay_BFC1CA24) { - psx_delay_BFC1CA24 = 0; - cpu->gpr[31] = 0x80034A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1CA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA2C: 1000002D beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CA2C = cpu->gpr[0]; uint32_t psx_brB_BFC1CA2C = cpu->gpr[0]; - psx_taken_BFC1CA2C = (psx_brA_BFC1CA2C == psx_brB_BFC1CA2C); - psx_delay_BFC1CA2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A30u); -#endif - /* 0xBFC1CA30: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A30u); -#endif - if (psx_delay_BFC1CA2C) { - psx_delay_BFC1CA2C = 0; - if (psx_taken_BFC1CA2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A34u); - } -label_BFC1CA34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA34: 3C010100 lui $at, 0x100 */ - cpu->gpr[1] = 0x01000000u; - PGXP_ALU(0x3C010100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A34u); -#endif -label_BFC1CA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA38: 34210100 ori $at, $at, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x100u; - PGXP_ALU(0x34210100u, cpu->gpr[1], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80034A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x212u); -#endif - /* 0xBFC1CA3C: 00814824 and $t1, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00814824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1CA40: 11200006 beq $t1, $zero, 0xBFC1CA5C */ - uint32_t psx_brA_BFC1CA40 = cpu->gpr[9]; uint32_t psx_brB_BFC1CA40 = cpu->gpr[0]; - psx_taken_BFC1CA40 = (psx_brA_BFC1CA40 == psx_brB_BFC1CA40); - psx_delay_BFC1CA40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA44: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A44u); -#endif - if (psx_delay_BFC1CA40) { - psx_delay_BFC1CA40 = 0; - if (psx_taken_BFC1CA40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A5Cu); - goto label_BFC1CA5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A48u); - } -label_BFC1CA48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CA48: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80034A50u; /* jal link before delay slot */ - psx_delay_BFC1CA48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034A4Cu); -#endif - if (psx_delay_BFC1CA48) { - psx_delay_BFC1CA48 = 0; - cpu->gpr[31] = 0x80034A50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1CA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA50: 10000024 beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CA50 = cpu->gpr[0]; uint32_t psx_brB_BFC1CA50 = cpu->gpr[0]; - psx_taken_BFC1CA50 = (psx_brA_BFC1CA50 == psx_brB_BFC1CA50); - psx_delay_BFC1CA50 = 1; - /* 0xBFC1CA54: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A54u); -#endif - if (psx_delay_BFC1CA50) { - psx_delay_BFC1CA50 = 0; - if (psx_taken_BFC1CA50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A58u); - } -label_BFC1CA58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA58: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A58u); -#endif -label_BFC1CA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA5C: 34210008 ori $at, $at, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x8u; - PGXP_ALU(0x34210008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80034A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x412u); -#endif - /* 0xBFC1CA60: 00815024 and $t2, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1CA64: 11400006 beq $t2, $zero, 0xBFC1CA80 */ - uint32_t psx_brA_BFC1CA64 = cpu->gpr[10]; uint32_t psx_brB_BFC1CA64 = cpu->gpr[0]; - psx_taken_BFC1CA64 = (psx_brA_BFC1CA64 == psx_brB_BFC1CA64); - psx_delay_BFC1CA64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA68: 3C010004 lui $at, 0x4 */ - cpu->gpr[1] = 0x00040000u; - PGXP_ALU(0x3C010004u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A68u); -#endif - if (psx_delay_BFC1CA64) { - psx_delay_BFC1CA64 = 0; - if (psx_taken_BFC1CA64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A80u); - goto label_BFC1CA80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A6Cu); - } -label_BFC1CA6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CA6C: 0C00E1A7 jal 0xB003869C */ - cpu->gpr[31] = 0x80034A74u; /* jal link before delay slot */ - psx_delay_BFC1CA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034A70u); -#endif - if (psx_delay_BFC1CA6C) { - psx_delay_BFC1CA6C = 0; - cpu->gpr[31] = 0x80034A74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003869Cu); - cpu->pc = 0x8003869Cu; return; - } -label_BFC1CA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA74: 1000001B beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CA74 = cpu->gpr[0]; uint32_t psx_brB_BFC1CA74 = cpu->gpr[0]; - psx_taken_BFC1CA74 = (psx_brA_BFC1CA74 == psx_brB_BFC1CA74); - psx_delay_BFC1CA74 = 1; - /* 0xBFC1CA78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A78u); -#endif - if (psx_delay_BFC1CA74) { - psx_delay_BFC1CA74 = 0; - if (psx_taken_BFC1CA74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A7Cu); - } -label_BFC1CA7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA7C: 3C010004 lui $at, 0x4 */ - cpu->gpr[1] = 0x00040000u; - PGXP_ALU(0x3C010004u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A7Cu); -#endif -label_BFC1CA80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA80: 34210004 ori $at, $at, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4u; - PGXP_ALU(0x34210004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80034A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x812u); -#endif - /* 0xBFC1CA84: 00815824 and $t3, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1CA88: 11600006 beq $t3, $zero, 0xBFC1CAA4 */ - uint32_t psx_brA_BFC1CA88 = cpu->gpr[11]; uint32_t psx_brB_BFC1CA88 = cpu->gpr[0]; - psx_taken_BFC1CA88 = (psx_brA_BFC1CA88 == psx_brB_BFC1CA88); - psx_delay_BFC1CA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CA8C: 3C010002 lui $at, 0x2 */ - cpu->gpr[1] = 0x00020000u; - PGXP_ALU(0x3C010002u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034A8Cu); -#endif - if (psx_delay_BFC1CA88) { - psx_delay_BFC1CA88 = 0; - if (psx_taken_BFC1CA88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AA4u); - goto label_BFC1CAA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034A90u); - } -label_BFC1CA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CA90: 0C00E0CE jal 0xB0038338 */ - cpu->gpr[31] = 0x80034A98u; /* jal link before delay slot */ - psx_delay_BFC1CA90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034A94u); -#endif - if (psx_delay_BFC1CA90) { - psx_delay_BFC1CA90 = 0; - cpu->gpr[31] = 0x80034A98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038338u); - cpu->pc = 0x80038338u; return; - } -label_BFC1CA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CA98: 10000012 beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CA98 = cpu->gpr[0]; uint32_t psx_brB_BFC1CA98 = cpu->gpr[0]; - psx_taken_BFC1CA98 = (psx_brA_BFC1CA98 == psx_brB_BFC1CA98); - psx_delay_BFC1CA98 = 1; - /* 0xBFC1CA9C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034A9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034A9Cu); -#endif - if (psx_delay_BFC1CA98) { - psx_delay_BFC1CA98 = 0; - if (psx_taken_BFC1CA98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AA0u); - } -label_BFC1CAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CAA0: 3C010002 lui $at, 0x2 */ - cpu->gpr[1] = 0x00020000u; - PGXP_ALU(0x3C010002u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034AA0u); -#endif -label_BFC1CAA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CAA4: 34210002 ori $at, $at, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2u; - PGXP_ALU(0x34210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80034AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1012u); -#endif - /* 0xBFC1CAA8: 00816024 and $t4, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00816024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1CAAC: 11800006 beq $t4, $zero, 0xBFC1CAC8 */ - uint32_t psx_brA_BFC1CAAC = cpu->gpr[12]; uint32_t psx_brB_BFC1CAAC = cpu->gpr[0]; - psx_taken_BFC1CAAC = (psx_brA_BFC1CAAC == psx_brB_BFC1CAAC); - psx_delay_BFC1CAAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CAB0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034AB0u); -#endif - if (psx_delay_BFC1CAAC) { - psx_delay_BFC1CAAC = 0; - if (psx_taken_BFC1CAAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AC8u); - goto label_BFC1CAC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AB4u); - } -label_BFC1CAB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CAB4: 0C00E2D8 jal 0xB0038B60 */ - cpu->gpr[31] = 0x80034ABCu; /* jal link before delay slot */ - psx_delay_BFC1CAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CAB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034AB8u); -#endif - if (psx_delay_BFC1CAB4) { - psx_delay_BFC1CAB4 = 0; - cpu->gpr[31] = 0x80034ABCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B60u); - cpu->pc = 0x80038B60u; return; - } -label_BFC1CABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CABC: 10000009 beq $zero, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CABC = cpu->gpr[0]; uint32_t psx_brB_BFC1CABC = cpu->gpr[0]; - psx_taken_BFC1CABC = (psx_brA_BFC1CABC == psx_brB_BFC1CABC); - psx_delay_BFC1CABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AC0u); -#endif - /* 0xBFC1CAC0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034AC0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034AC0u); -#endif - if (psx_delay_BFC1CABC) { - psx_delay_BFC1CABC = 0; - if (psx_taken_BFC1CABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AC4u); - } -label_BFC1CAC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CAC4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034AC4u); -#endif -label_BFC1CAC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CAC8: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2012u); -#endif - /* 0xBFC1CACC: 00816824 and $t5, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00816824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1CAD0: 11A00004 beq $t5, $zero, 0xBFC1CAE4 */ - uint32_t psx_brA_BFC1CAD0 = cpu->gpr[13]; uint32_t psx_brB_BFC1CAD0 = cpu->gpr[0]; - psx_taken_BFC1CAD0 = (psx_brA_BFC1CAD0 == psx_brB_BFC1CAD0); - psx_delay_BFC1CAD0 = 1; - /* 0xBFC1CAD4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034AD4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034AD4u); -#endif - if (psx_delay_BFC1CAD0) { - psx_delay_BFC1CAD0 = 0; - if (psx_taken_BFC1CAD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AE4u); - goto label_BFC1CAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AD8u); - } -label_BFC1CAD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CAD8: 0C00E2E7 jal 0xB0038B9C */ - cpu->gpr[31] = 0x80034AE0u; /* jal link before delay slot */ - psx_delay_BFC1CAD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CADC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034ADCu); -#endif - if (psx_delay_BFC1CAD8) { - psx_delay_BFC1CAD8 = 0; - cpu->gpr[31] = 0x80034AE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B9Cu); - cpu->pc = 0x80038B9Cu; return; - } -label_BFC1CAE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AE0u); -#endif - /* 0xBFC1CAE0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034AE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034AE0u); -#endif -label_BFC1CAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CAE4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80034AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CAE8: 03E00008 jr $ra */ - psx_delay_BFC1CAE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CAEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034AECu); -#endif - if (psx_delay_BFC1CAE8) { - psx_delay_BFC1CAE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CAF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CAF0u); - int psx_delay_BFC1CB00 = 0; - int psx_taken_BFC1CB00 = 0; - int psx_delay_BFC1CB2C = 0; - int psx_delay_BFC1CB34 = 0; - int psx_delay_BFC1CB40 = 0; - int psx_delay_BFC1CB4C = 0; - int psx_taken_BFC1CB4C = 0; - int psx_delay_BFC1CB54 = 0; - int psx_delay_BFC1CB60 = 0; - int psx_delay_BFC1CB68 = 0; - int psx_delay_BFC1CB74 = 0; - int psx_delay_BFC1CB80 = 0; - int psx_delay_BFC1CB88 = 0; - int psx_delay_BFC1CBA4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1CB08u: goto label_BFC1CB08; - case 0xBFC1CB2Cu: goto label_BFC1CB2C; - case 0xBFC1CB34u: goto label_BFC1CB34; - case 0xBFC1CB3Cu: goto label_BFC1CB3C; - case 0xBFC1CB48u: goto label_BFC1CB48; - case 0xBFC1CB54u: goto label_BFC1CB54; - case 0xBFC1CB5Cu: goto label_BFC1CB5C; - case 0xBFC1CB68u: goto label_BFC1CB68; - case 0xBFC1CB70u: goto label_BFC1CB70; - case 0xBFC1CB7Cu: goto label_BFC1CB7C; - case 0xBFC1CB88u: goto label_BFC1CB88; - case 0xBFC1CB90u: goto label_BFC1CB90; - case 0xBFC1CB9Cu: goto label_BFC1CB9C; - default: break; - } - } -label_BFC1CAF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CAF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1CAF0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034AF0u); -#endif - /* 0xBFC1CAF4: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034AF4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CAF8: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80034AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CAFC: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80034AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1CB00: 15C10026 bne $t6, $at, 0xBFC1CB9C */ - uint32_t psx_brA_BFC1CB00 = cpu->gpr[14]; uint32_t psx_brB_BFC1CB00 = cpu->gpr[1]; - psx_taken_BFC1CB00 = (psx_brA_BFC1CB00 != psx_brB_BFC1CB00); - psx_delay_BFC1CB00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1CB04: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B04u); return; } g_debug_last_store_pc = 0x80034B04u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B04u); -#endif - if (psx_delay_BFC1CB00) { - psx_delay_BFC1CB00 = 0; - if (psx_taken_BFC1CB00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034B9Cu); - goto label_BFC1CB9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034B08u); - } -label_BFC1CB08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CB08: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CB0C: A0209E71 sb $zero, -24975($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24975; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034B0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24975)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E71u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1CB10: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B10u); return; } g_debug_last_store_pc = 0x80034B10u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1CB14: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B14u); return; } g_debug_last_store_pc = 0x80034B14u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CB18: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CB1C: A0209E70 sb $zero, -24976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24976; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034B1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24976)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1CB20: 24110015 addiu $s1, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24110015u, cpu->gpr[17], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1CB24: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1CB28: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B28u); -#endif -label_BFC1CB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB2C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80034B34u; /* jal link before delay slot */ - psx_delay_BFC1CB2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CB30: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B30u); -#endif - if (psx_delay_BFC1CB2C) { - psx_delay_BFC1CB2C = 0; - cpu->gpr[31] = 0x80034B34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1CB34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB34: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80034B3Cu; /* jal link before delay slot */ - psx_delay_BFC1CB34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1CB38: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B38u); -#endif - if (psx_delay_BFC1CB34) { - psx_delay_BFC1CB34 = 0; - cpu->gpr[31] = 0x80034B3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1CB3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1CB3C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB40: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80034B48u; /* jal link before delay slot */ - psx_delay_BFC1CB40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CB44: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80034B44u); -#endif - if (psx_delay_BFC1CB40) { - psx_delay_BFC1CB40 = 0; - cpu->gpr[31] = 0x80034B48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1CB48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1CB48: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC1CB4C: 1611FFF7 bne $s0, $s1, 0xBFC1CB2C */ - uint32_t psx_brA_BFC1CB4C = cpu->gpr[16]; uint32_t psx_brB_BFC1CB4C = cpu->gpr[17]; - psx_taken_BFC1CB4C = (psx_brA_BFC1CB4C != psx_brB_BFC1CB4C); - psx_delay_BFC1CB4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC1CB50: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B50u); -#endif - if (psx_delay_BFC1CB4C) { - psx_delay_BFC1CB4C = 0; - if (psx_taken_BFC1CB4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034B2Cu); - goto label_BFC1CB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034B54u); - } -label_BFC1CB54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB54: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80034B5Cu; /* jal link before delay slot */ - psx_delay_BFC1CB54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1CB58: 24040015 addiu $a0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24040015u, cpu->gpr[4], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B58u); -#endif - if (psx_delay_BFC1CB54) { - psx_delay_BFC1CB54 = 0; - cpu->gpr[31] = 0x80034B5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1CB5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1CB5C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB60: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80034B68u; /* jal link before delay slot */ - psx_delay_BFC1CB60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CB64: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80034B64u); -#endif - if (psx_delay_BFC1CB60) { - psx_delay_BFC1CB60 = 0; - cpu->gpr[31] = 0x80034B68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1CB68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB68: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80034B70u; /* jal link before delay slot */ - psx_delay_BFC1CB68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1CB6C: 24040016 addiu $a0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24040016u, cpu->gpr[4], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80034B6Cu); -#endif - if (psx_delay_BFC1CB68) { - psx_delay_BFC1CB68 = 0; - cpu->gpr[31] = 0x80034B70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC1CB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1CB70: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB74: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80034B7Cu; /* jal link before delay slot */ - psx_delay_BFC1CB74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CB78: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80034B78u); -#endif - if (psx_delay_BFC1CB74) { - psx_delay_BFC1CB74 = 0; - cpu->gpr[31] = 0x80034B7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC1CB7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CB7C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB80: 0C00C8EE jal 0xB00323B8 */ - cpu->gpr[31] = 0x80034B88u; /* jal link before delay slot */ - psx_delay_BFC1CB80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CB84: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B84u); return; } g_debug_last_store_pc = 0x80034B84u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B84u); -#endif - if (psx_delay_BFC1CB80) { - psx_delay_BFC1CB80 = 0; - cpu->gpr[31] = 0x80034B88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323B8u); - cpu->pc = 0x800323B8u; return; - } -label_BFC1CB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CB88: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80034B90u; /* jal link before delay slot */ - psx_delay_BFC1CB88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CB8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034B8Cu); -#endif - if (psx_delay_BFC1CB88) { - psx_delay_BFC1CB88 = 0; - cpu->gpr[31] = 0x80034B90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1CB90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B90u); -#endif - /* 0xBFC1CB90: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B90u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B90u); -#endif - /* 0xBFC1CB94: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B94u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CB98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034B98u); -#endif -label_BFC1CB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034B9Cu); -#endif - /* 0xBFC1CB9C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034B9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CBA0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CBA4: 03E00008 jr $ra */ - psx_delay_BFC1CBA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CBA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034BA8u); -#endif - if (psx_delay_BFC1CBA4) { - psx_delay_BFC1CBA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CBAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CBACu); - int psx_delay_BFC1CBC4 = 0; - int psx_taken_BFC1CBC4 = 0; - int psx_delay_BFC1CBD0 = 0; - int psx_delay_BFC1CBD8 = 0; - int psx_taken_BFC1CBD8 = 0; - int psx_delay_BFC1CBE8 = 0; - int psx_delay_BFC1CC34 = 0; - int psx_delay_BFC1CC80 = 0; - int psx_taken_BFC1CC80 = 0; - int psx_delay_BFC1CCA8 = 0; - int psx_taken_BFC1CCA8 = 0; - int psx_delay_BFC1CCC4 = 0; - int psx_taken_BFC1CCC4 = 0; - int psx_delay_BFC1CCD4 = 0; - int psx_taken_BFC1CCD4 = 0; - int psx_delay_BFC1CCE8 = 0; - int psx_taken_BFC1CCE8 = 0; - int psx_delay_BFC1CCF8 = 0; - int psx_taken_BFC1CCF8 = 0; - int psx_delay_BFC1CD28 = 0; - int psx_delay_BFC1CD38 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1CBCCu: goto label_BFC1CBCC; - case 0xBFC1CBD8u: goto label_BFC1CBD8; - case 0xBFC1CBE0u: goto label_BFC1CBE0; - case 0xBFC1CBE4u: goto label_BFC1CBE4; - case 0xBFC1CBF0u: goto label_BFC1CBF0; - case 0xBFC1CBF4u: goto label_BFC1CBF4; - case 0xBFC1CC3Cu: goto label_BFC1CC3C; - case 0xBFC1CC88u: goto label_BFC1CC88; - case 0xBFC1CC90u: goto label_BFC1CC90; - case 0xBFC1CCB0u: goto label_BFC1CCB0; - case 0xBFC1CCB8u: goto label_BFC1CCB8; - case 0xBFC1CCCCu: goto label_BFC1CCCC; - case 0xBFC1CCDCu: goto label_BFC1CCDC; - case 0xBFC1CCF0u: goto label_BFC1CCF0; - case 0xBFC1CD00u: goto label_BFC1CD00; - case 0xBFC1CD30u: goto label_BFC1CD30; - default: break; - } - } -label_BFC1CBAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CBAC: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1CBB0: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034BB0u); return; } g_debug_last_store_pc = 0x80034BB0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1CBB4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034BB4u); -#endif - /* 0xBFC1CBB8: 91EF9E71 lbu $t7, -24975($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24975; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-24975)), 15, 0x8000u); - PGXP_LOAD(0x91EF9E71u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BB8u); -#endif - /* 0xBFC1CBBC: 8FAE0030 lw $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034BBCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1CBC0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034BC0u); return; } g_debug_last_store_pc = 0x80034BC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1CBC4: 15CF0007 bne $t6, $t7, 0xBFC1CBE4 */ - uint32_t psx_brA_BFC1CBC4 = cpu->gpr[14]; uint32_t psx_brB_BFC1CBC4 = cpu->gpr[15]; - psx_taken_BFC1CBC4 = (psx_brA_BFC1CBC4 != psx_brB_BFC1CBC4); - psx_delay_BFC1CBC4 = 1; - /* 0xBFC1CBC8: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034BC8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BC8u); -#endif - if (psx_delay_BFC1CBC4) { - psx_delay_BFC1CBC4 = 0; - if (psx_taken_BFC1CBC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BE4u); - goto label_BFC1CBE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BCCu); - } -label_BFC1CBCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1CBCC: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CBD0: 0C00D364 jal 0xB0034D90 */ - cpu->gpr[31] = 0x80034BD8u; /* jal link before delay slot */ - psx_delay_BFC1CBD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CBD4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034BD4u); -#endif - if (psx_delay_BFC1CBD0) { - psx_delay_BFC1CBD0 = 0; - cpu->gpr[31] = 0x80034BD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D90u); - cpu->pc = 0x80034D90u; return; - } -label_BFC1CBD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CBD8: 10000006 beq $zero, $zero, 0xBFC1CBF4 */ - uint32_t psx_brA_BFC1CBD8 = cpu->gpr[0]; uint32_t psx_brB_BFC1CBD8 = cpu->gpr[0]; - psx_taken_BFC1CBD8 = (psx_brA_BFC1CBD8 == psx_brB_BFC1CBD8); - psx_delay_BFC1CBD8 = 1; - /* 0xBFC1CBDC: 93A6002B lbu $a2, 43($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 43; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (43)), 6, 0x20000000u); - PGXP_LOAD(0x93A6002Bu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BDCu); -#endif - if (psx_delay_BFC1CBD8) { - psx_delay_BFC1CBD8 = 0; - if (psx_taken_BFC1CBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BF4u); - goto label_BFC1CBF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034BE0u); - } -label_BFC1CBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BE0u); -#endif - /* 0xBFC1CBE0: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034BE0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BE0u); -#endif -label_BFC1CBE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1CBE4: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CBE8: 0C00D364 jal 0xB0034D90 */ - cpu->gpr[31] = 0x80034BF0u; /* jal link before delay slot */ - psx_delay_BFC1CBE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1CBEC: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BECu); -#endif - if (psx_delay_BFC1CBE8) { - psx_delay_BFC1CBE8 = 0; - cpu->gpr[31] = 0x80034BF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D90u); - cpu->pc = 0x80034D90u; return; - } -label_BFC1CBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BF0u); -#endif - /* 0xBFC1CBF0: 93A6002B lbu $a2, 43($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 43; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (43)), 6, 0x20000000u); - PGXP_LOAD(0x93A6002Bu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BF0u); -#endif -label_BFC1CBF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CBF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034BF4u); -#endif - /* 0xBFC1CBF4: 93A7002C lbu $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (44)), 7, 0x20000000u); - PGXP_LOAD(0x93A7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80034BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC1CBF8: 0006C102 srl $t8, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] >> 4u; - PGXP_ALU(0x0006C102u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC1CBFC: 00074902 srl $t1, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] >> 4u; - PGXP_ALU(0x00074902u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1CC00: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1CC04: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1CC08: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1CC0C: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1CC10: 0019C840 sll $t9, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 1u; - PGXP_ALU(0x0019C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1CC14: 000A5040 sll $t2, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 1u; - PGXP_ALU(0x000A5040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC1CC18: 30C8000F andi $t0, $a2, 0xF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0xFu; - PGXP_ALU(0x30C8000Fu, cpu->gpr[8], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC1CC1C: 30EB000F andi $t3, $a3, 0xF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0xFu; - PGXP_ALU(0x30EB000Fu, cpu->gpr[11], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC1CC20: 03281821 addu $v1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC1CC24: 014B1021 addu $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C24u); -#endif - /* 0xBFC1CC28: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C28u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1CC2C: AFA20020 sw $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C2Cu); return; } g_debug_last_store_pc = 0x80034C2Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1CC30: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C30u); return; } g_debug_last_store_pc = 0x80034C30u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CC34: 0C00D364 jal 0xB0034D90 */ - cpu->gpr[31] = 0x80034C3Cu; /* jal link before delay slot */ - psx_delay_BFC1CC34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1CC38: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C38u); -#endif - if (psx_delay_BFC1CC34) { - psx_delay_BFC1CC34 = 0; - cpu->gpr[31] = 0x80034C3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D90u); - cpu->pc = 0x80034D90u; return; - } -label_BFC1CC3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CC3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C3Cu); -#endif - /* 0xBFC1CC3C: 93A7002C lbu $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (44)), 7, 0x20000000u); - PGXP_LOAD(0x93A7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C40u); -#endif - /* 0xBFC1CC40: 93A6002B lbu $a2, 43($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 43; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (43)), 6, 0x20000000u); - PGXP_LOAD(0x93A6002Bu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC1CC44: 0007C102 srl $t8, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] >> 4u; - PGXP_ALU(0x0007C102u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1CC48: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC1CC4C: 00066102 srl $t4, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] >> 4u; - PGXP_ALU(0x00066102u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1CC50: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1CC54: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C54u); -#endif - /* 0xBFC1CC58: 8FA20020 lw $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C58u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1CC5C: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1CC60: 0019C840 sll $t9, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 1u; - PGXP_ALU(0x0019C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC1CC64: 30E8000F andi $t0, $a3, 0xF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0xFu; - PGXP_ALU(0x30E8000Fu, cpu->gpr[8], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C64u); -#endif - /* 0xBFC1CC68: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1CC6C: 000D6840 sll $t5, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 1u; - PGXP_ALU(0x000D6840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80034C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC1CC70: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC1CC74: 30CE000F andi $t6, $a2, 0xF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0xFu; - PGXP_ALU(0x30CE000Fu, cpu->gpr[14], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC1CC78: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1CC7C: 00491023 subu $v0, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[9]; - PGXP_ALU(0x00491023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CC80: 04410003 bgez $v0, 0xBFC1CC90 */ - uint32_t psx_brA_BFC1CC80 = cpu->gpr[2]; - psx_taken_BFC1CC80 = ((int32_t)psx_brA_BFC1CC80 >= 0); - psx_delay_BFC1CC80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC1CC84: 006F1823 subu $v1, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[15]; - PGXP_ALU(0x006F1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034C84u); -#endif - if (psx_delay_BFC1CC80) { - psx_delay_BFC1CC80 = 0; - if (psx_taken_BFC1CC80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034C90u); - goto label_BFC1CC90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034C88u); - } -label_BFC1CC88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CC88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CC88: 2442003C addiu $v0, $v0, 60 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (60)); - PGXP_ALU(0x2442003Cu, cpu->gpr[2], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1CC8C: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80034C8Cu); -#endif -label_BFC1CC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1CC90: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034C90u); -#endif - /* 0xBFC1CC94: 8C849FA4 lw $a0, -24668($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849FA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1CC98: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034C98u); -#endif - /* 0xBFC1CC9C: 8CA59FA0 lw $a1, -24672($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034C9Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59FA0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC1CCA0: 00822021 addu $a0, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[2]; - PGXP_ALU(0x00822021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1CCA4: 2881003C slti $at, $a0, 60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0); - PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80034CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CCA8: 14200003 bne $at, $zero, 0xBFC1CCB8 */ - uint32_t psx_brA_BFC1CCA8 = cpu->gpr[1]; uint32_t psx_brB_BFC1CCA8 = cpu->gpr[0]; - psx_taken_BFC1CCA8 = (psx_brA_BFC1CCA8 != psx_brB_BFC1CCA8); - psx_delay_BFC1CCA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC1CCAC: 00A32821 addu $a1, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[3]; - PGXP_ALU(0x00A32821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034CACu); -#endif - if (psx_delay_BFC1CCA8) { - psx_delay_BFC1CCA8 = 0; - if (psx_taken_BFC1CCA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CB8u); - goto label_BFC1CCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CB0u); - } -label_BFC1CCB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CCB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1CCB0: 2484FFC4 addiu $a0, $a0, -60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-60)); - PGXP_ALU(0x2484FFC4u, cpu->gpr[4], _pgx1, 0xFFFFFFC4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1CCB4: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034CB4u); -#endif -label_BFC1CCB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CCB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1CCB8: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CB8u); -#endif - /* 0xBFC1CCBC: 8D4A6948 lw $t2, 26952($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CBCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6948u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CCC0: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80034CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1CCC4: 11410005 beq $t2, $at, 0xBFC1CCDC */ - uint32_t psx_brA_BFC1CCC4 = cpu->gpr[10]; uint32_t psx_brB_BFC1CCC4 = cpu->gpr[1]; - psx_taken_BFC1CCC4 = (psx_brA_BFC1CCC4 == psx_brB_BFC1CCC4); - psx_delay_BFC1CCC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CCC8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CC8u); -#endif - if (psx_delay_BFC1CCC4) { - psx_delay_BFC1CCC4 = 0; - if (psx_taken_BFC1CCC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CDCu); - goto label_BFC1CCDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CCCu); - } -label_BFC1CCCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CCCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CCCC: AC259FA0 sw $a1, -24672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CCCu); return; } g_debug_last_store_pc = 0x80034CCCu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259FA0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CCD0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CCD4: 10000016 beq $zero, $zero, 0xBFC1CD30 */ - uint32_t psx_brA_BFC1CCD4 = cpu->gpr[0]; uint32_t psx_brB_BFC1CCD4 = cpu->gpr[0]; - psx_taken_BFC1CCD4 = (psx_brA_BFC1CCD4 == psx_brB_BFC1CCD4); - psx_delay_BFC1CCD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1CCD8: AC249FA4 sw $a0, -24668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CD8u); return; } g_debug_last_store_pc = 0x80034CD8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249FA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CD8u); -#endif - if (psx_delay_BFC1CCD4) { - psx_delay_BFC1CCD4 = 0; - if (psx_taken_BFC1CCD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D30u); - goto label_BFC1CD30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CDCu); - } -label_BFC1CCDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CCDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1CCDC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CE0u); -#endif - /* 0xBFC1CCE0: 8D6B9F74 lw $t3, -24716($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CE0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F74u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CCE4: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80034CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1CCE8: 15610005 bne $t3, $at, 0xBFC1CD00 */ - uint32_t psx_brA_BFC1CCE8 = cpu->gpr[11]; uint32_t psx_brB_BFC1CCE8 = cpu->gpr[1]; - psx_taken_BFC1CCE8 = (psx_brA_BFC1CCE8 != psx_brB_BFC1CCE8); - psx_delay_BFC1CCE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CCEC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CECu); -#endif - if (psx_delay_BFC1CCE8) { - psx_delay_BFC1CCE8 = 0; - if (psx_taken_BFC1CCE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D00u); - goto label_BFC1CD00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034CF0u); - } -label_BFC1CCF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CCF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CCF0: AC259FA0 sw $a1, -24672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CF0u); return; } g_debug_last_store_pc = 0x80034CF0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259FA0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CCF4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CCF8: 1000000D beq $zero, $zero, 0xBFC1CD30 */ - uint32_t psx_brA_BFC1CCF8 = cpu->gpr[0]; uint32_t psx_brB_BFC1CCF8 = cpu->gpr[0]; - psx_taken_BFC1CCF8 = (psx_brA_BFC1CCF8 == psx_brB_BFC1CCF8); - psx_delay_BFC1CCF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1CCFC: AC249FA4 sw $a0, -24668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034CFCu); return; } g_debug_last_store_pc = 0x80034CFCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249FA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034CFCu); -#endif - if (psx_delay_BFC1CCF8) { - psx_delay_BFC1CCF8 = 0; - if (psx_taken_BFC1CCF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D30u); - goto label_BFC1CD30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D00u); - } -label_BFC1CD00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D00u); -#endif - /* 0xBFC1CD00: 8FAC0030 lw $t4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D00u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0030u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD04: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1CD08: AC2C9E50 sw $t4, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D08u); return; } g_debug_last_store_pc = 0x80034D08u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9E50u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD0C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CD10: AC259E60 sw $a1, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D10u); return; } g_debug_last_store_pc = 0x80034D10u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259E60u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD14: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1CD18: AC249E64 sw $a0, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D18u); return; } g_debug_last_store_pc = 0x80034D18u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249E64u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD1C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1CD20: AC249FA4 sw $a0, -24668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D20u); return; } g_debug_last_store_pc = 0x80034D20u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249FA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD24: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CD28: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80034D30u; /* jal link before delay slot */ - psx_delay_BFC1CD28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CD2C: AC259FA0 sw $a1, -24672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D2Cu); return; } g_debug_last_store_pc = 0x80034D2Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259FA0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D2Cu); -#endif - if (psx_delay_BFC1CD28) { - psx_delay_BFC1CD28 = 0; - cpu->gpr[31] = 0x80034D30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1CD30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D30u); -#endif - /* 0xBFC1CD30: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CD34: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80034D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CD38: 03E00008 jr $ra */ - psx_delay_BFC1CD38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CD3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034D3Cu); -#endif - if (psx_delay_BFC1CD38) { - psx_delay_BFC1CD38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CD40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CD40u); - int psx_delay_BFC1CD5C = 0; - int psx_taken_BFC1CD5C = 0; - int psx_delay_BFC1CD68 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1CD64u: goto label_BFC1CD64; - case 0xBFC1CD68u: goto label_BFC1CD68; - default: break; - } - } -label_BFC1CD40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD40: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CD44: AC209FA0 sw $zero, -24672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D44u); return; } g_debug_last_store_pc = 0x80034D44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209FA0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD48: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1CD4C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D50u); -#endif - /* 0xBFC1CD50: 8DCE6948 lw $t6, 26952($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CD54: AC209FA4 sw $zero, -24668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D54u); return; } g_debug_last_store_pc = 0x80034D54u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209FA4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CD58: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1CD5C: 11C10002 beq $t6, $at, 0xBFC1CD68 */ - uint32_t psx_brA_BFC1CD5C = cpu->gpr[14]; uint32_t psx_brB_BFC1CD5C = cpu->gpr[1]; - psx_taken_BFC1CD5C = (psx_brA_BFC1CD5C == psx_brB_BFC1CD5C); - psx_delay_BFC1CD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CD60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D60u); -#endif - if (psx_delay_BFC1CD5C) { - psx_delay_BFC1CD5C = 0; - if (psx_taken_BFC1CD5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D68u); - goto label_BFC1CD68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D64u); - } -label_BFC1CD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CD64: AC209E50 sw $zero, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D64u); return; } g_debug_last_store_pc = 0x80034D64u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D64u); -#endif -label_BFC1CD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CD68: 03E00008 jr $ra */ - psx_delay_BFC1CD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CD6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034D6Cu); -#endif - if (psx_delay_BFC1CD68) { - psx_delay_BFC1CD68 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CD70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CD70u); - int psx_delay_BFC1CD78 = 0; -label_BFC1CD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CD70: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D70u); -#endif - /* 0xBFC1CD74: 8C429FA0 lw $v0, -24672($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D74u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429FA0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CD78: 03E00008 jr $ra */ - psx_delay_BFC1CD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CD7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034D7Cu); -#endif - if (psx_delay_BFC1CD78) { - psx_delay_BFC1CD78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CD80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CD80u); - int psx_delay_BFC1CD88 = 0; -label_BFC1CD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CD80: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D80u); -#endif - /* 0xBFC1CD84: 8C429FA4 lw $v0, -24668($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034D84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429FA4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CD88: 03E00008 jr $ra */ - psx_delay_BFC1CD88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CD8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034D8Cu); -#endif - if (psx_delay_BFC1CD88) { - psx_delay_BFC1CD88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CD90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CD90u); - int psx_delay_BFC1CDD0 = 0; -label_BFC1CD90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CD90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CD90: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80034D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CD94: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80034D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC1CD98: 00054080 sll $t0, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00054080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1CD9C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1CDA0: 25299FB0 addiu $t1, $t1, -24656 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-24656)); - PGXP_ALU(0x25299FB0u, cpu->gpr[9], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC1CDA4: 01054023 subu $t0, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[5]; - PGXP_ALU(0x01054023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC1CDA8: 01091021 addu $v0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1CDAC: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1CDB0: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80034DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1CDB4: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC1CDB8: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC1CDBC: A0990001 sb $t9, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034DBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DC0u); -#endif - /* 0xBFC1CDC0: 904A0000 lbu $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 10, 0x4u); - PGXP_LOAD(0x904A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CDC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC1CDC8: A08A0003 sb $t2, 3($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034DC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (3)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA08A0003u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DC8u); -#endif - /* 0xBFC1CDCC: 904B0001 lbu $t3, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 11, 0x4u); - PGXP_LOAD(0x904B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1CDD0: 03E00008 jr $ra */ - psx_delay_BFC1CDD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC1CDD4: A08B0004 sb $t3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034DD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA08B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DD4u); -#endif - if (psx_delay_BFC1CDD0) { - psx_delay_BFC1CDD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1CDD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1CDD8u); - int psx_delay_BFC1CDE8 = 0; - int psx_taken_BFC1CDE8 = 0; - int psx_delay_BFC1CDFC = 0; - int psx_taken_BFC1CDFC = 0; - int psx_delay_BFC1CE1C = 0; - int psx_taken_BFC1CE1C = 0; - int psx_delay_BFC1CE34 = 0; - int psx_taken_BFC1CE34 = 0; - int psx_delay_BFC1CE50 = 0; - int psx_delay_BFC1CE64 = 0; - int psx_taken_BFC1CE64 = 0; - int psx_delay_BFC1CE6C = 0; - int psx_taken_BFC1CE6C = 0; - int psx_delay_BFC1CE74 = 0; - int psx_taken_BFC1CE74 = 0; - int psx_delay_BFC1CE7C = 0; - int psx_taken_BFC1CE7C = 0; - int psx_delay_BFC1CE84 = 0; - int psx_taken_BFC1CE84 = 0; - int psx_delay_BFC1CEA8 = 0; - int psx_taken_BFC1CEA8 = 0; - int psx_delay_BFC1CEB8 = 0; - int psx_taken_BFC1CEB8 = 0; - int psx_delay_BFC1CECC = 0; - int psx_taken_BFC1CECC = 0; - int psx_delay_BFC1CEE8 = 0; - int psx_taken_BFC1CEE8 = 0; - int psx_delay_BFC1CEF0 = 0; - int psx_taken_BFC1CEF0 = 0; - int psx_delay_BFC1CEF8 = 0; - int psx_delay_BFC1CF00 = 0; - int psx_taken_BFC1CF00 = 0; - int psx_delay_BFC1CF14 = 0; - int psx_taken_BFC1CF14 = 0; - int psx_delay_BFC1CF40 = 0; - int psx_taken_BFC1CF40 = 0; - int psx_delay_BFC1CF48 = 0; - int psx_delay_BFC1CF50 = 0; - int psx_taken_BFC1CF50 = 0; - int psx_delay_BFC1CF64 = 0; - int psx_taken_BFC1CF64 = 0; - int psx_delay_BFC1CFA0 = 0; - int psx_taken_BFC1CFA0 = 0; - int psx_delay_BFC1CFB4 = 0; - int psx_taken_BFC1CFB4 = 0; - int psx_delay_BFC1CFBC = 0; - int psx_taken_BFC1CFBC = 0; - int psx_delay_BFC1CFF8 = 0; - int psx_taken_BFC1CFF8 = 0; - int psx_delay_BFC1D020 = 0; - int psx_taken_BFC1D020 = 0; - int psx_delay_BFC1D034 = 0; - int psx_taken_BFC1D034 = 0; - int psx_delay_BFC1D04C = 0; - int psx_taken_BFC1D04C = 0; - int psx_delay_BFC1D060 = 0; - int psx_taken_BFC1D060 = 0; - int psx_delay_BFC1D070 = 0; - int psx_delay_BFC1D088 = 0; - int psx_delay_BFC1D098 = 0; - int psx_taken_BFC1D098 = 0; - int psx_delay_BFC1D0DC = 0; - int psx_delay_BFC1D110 = 0; - int psx_delay_BFC1D128 = 0; - int psx_taken_BFC1D128 = 0; - int psx_delay_BFC1D13C = 0; - int psx_taken_BFC1D13C = 0; - int psx_delay_BFC1D14C = 0; - int psx_delay_BFC1D164 = 0; - int psx_delay_BFC1D174 = 0; - int psx_taken_BFC1D174 = 0; - int psx_delay_BFC1D188 = 0; - int psx_taken_BFC1D188 = 0; - int psx_delay_BFC1D19C = 0; - int psx_taken_BFC1D19C = 0; - int psx_delay_BFC1D1A8 = 0; - int psx_taken_BFC1D1A8 = 0; - int psx_delay_BFC1D1E4 = 0; - int psx_delay_BFC1D218 = 0; - int psx_delay_BFC1D23C = 0; - int psx_taken_BFC1D23C = 0; - int psx_delay_BFC1D258 = 0; - int psx_delay_BFC1D260 = 0; - int psx_taken_BFC1D260 = 0; - int psx_delay_BFC1D280 = 0; - int psx_taken_BFC1D280 = 0; - int psx_delay_BFC1D28C = 0; - int psx_taken_BFC1D28C = 0; - int psx_delay_BFC1D2B4 = 0; - int psx_taken_BFC1D2B4 = 0; - int psx_delay_BFC1D2C0 = 0; - int psx_taken_BFC1D2C0 = 0; - int psx_delay_BFC1D2EC = 0; - int psx_taken_BFC1D2EC = 0; - int psx_delay_BFC1D2FC = 0; - int psx_delay_BFC1D31C = 0; - int psx_delay_BFC1D340 = 0; - int psx_delay_BFC1D360 = 0; - int psx_delay_BFC1D37C = 0; - int psx_taken_BFC1D37C = 0; - int psx_delay_BFC1D394 = 0; - int psx_delay_BFC1D3B4 = 0; - int psx_delay_BFC1D3EC = 0; - int psx_delay_BFC1D40C = 0; - int psx_delay_BFC1D444 = 0; - int psx_taken_BFC1D444 = 0; - int psx_delay_BFC1D460 = 0; - int psx_taken_BFC1D460 = 0; - int psx_delay_BFC1D468 = 0; - int psx_delay_BFC1D478 = 0; - int psx_delay_BFC1D4B4 = 0; - int psx_delay_BFC1D4EC = 0; - int psx_delay_BFC1D50C = 0; - int psx_taken_BFC1D50C = 0; - int psx_delay_BFC1D520 = 0; - int psx_taken_BFC1D520 = 0; - int psx_delay_BFC1D534 = 0; - int psx_taken_BFC1D534 = 0; - int psx_delay_BFC1D548 = 0; - int psx_delay_BFC1D584 = 0; - int psx_delay_BFC1D594 = 0; - int psx_delay_BFC1D5C8 = 0; - int psx_delay_BFC1D5D8 = 0; - int psx_taken_BFC1D5D8 = 0; - int psx_delay_BFC1D5E8 = 0; - int psx_delay_BFC1D600 = 0; - int psx_delay_BFC1D620 = 0; - int psx_taken_BFC1D620 = 0; - int psx_delay_BFC1D628 = 0; - int psx_delay_BFC1D630 = 0; - int psx_taken_BFC1D630 = 0; - int psx_delay_BFC1D638 = 0; - int psx_delay_BFC1D65C = 0; - int psx_delay_BFC1D664 = 0; - int psx_taken_BFC1D664 = 0; - int psx_delay_BFC1D6A0 = 0; - int psx_taken_BFC1D6A0 = 0; - int psx_delay_BFC1D6B0 = 0; - int psx_delay_BFC1D6D0 = 0; - int psx_delay_BFC1D6E4 = 0; - int psx_delay_BFC1D704 = 0; - int psx_delay_BFC1D710 = 0; - int psx_taken_BFC1D710 = 0; - int psx_delay_BFC1D728 = 0; - int psx_delay_BFC1D748 = 0; - int psx_delay_BFC1D768 = 0; - int psx_delay_BFC1D788 = 0; - int psx_delay_BFC1D7A4 = 0; - int psx_delay_BFC1D7B8 = 0; - int psx_taken_BFC1D7B8 = 0; - int psx_delay_BFC1D7C8 = 0; - int psx_taken_BFC1D7C8 = 0; - int psx_delay_BFC1D7FC = 0; - int psx_delay_BFC1D80C = 0; - int psx_delay_BFC1D81C = 0; - int psx_taken_BFC1D81C = 0; - int psx_delay_BFC1D848 = 0; - int psx_taken_BFC1D848 = 0; - int psx_delay_BFC1D864 = 0; - int psx_taken_BFC1D864 = 0; - int psx_delay_BFC1D86C = 0; - int psx_taken_BFC1D86C = 0; - int psx_delay_BFC1D874 = 0; - int psx_delay_BFC1D8A8 = 0; - int psx_taken_BFC1D8A8 = 0; - int psx_delay_BFC1D8C4 = 0; - int psx_taken_BFC1D8C4 = 0; - int psx_delay_BFC1D8D4 = 0; - int psx_taken_BFC1D8D4 = 0; - int psx_delay_BFC1D978 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1CDF0u: goto label_BFC1CDF0; - case 0xBFC1CE04u: goto label_BFC1CE04; - case 0xBFC1CE24u: goto label_BFC1CE24; - case 0xBFC1CE3Cu: goto label_BFC1CE3C; - case 0xBFC1CE58u: goto label_BFC1CE58; - case 0xBFC1CE6Cu: goto label_BFC1CE6C; - case 0xBFC1CE74u: goto label_BFC1CE74; - case 0xBFC1CE7Cu: goto label_BFC1CE7C; - case 0xBFC1CE84u: goto label_BFC1CE84; - case 0xBFC1CE8Cu: goto label_BFC1CE8C; - case 0xBFC1CEB0u: goto label_BFC1CEB0; - case 0xBFC1CEC0u: goto label_BFC1CEC0; - case 0xBFC1CED4u: goto label_BFC1CED4; - case 0xBFC1CEE8u: goto label_BFC1CEE8; - case 0xBFC1CEF0u: goto label_BFC1CEF0; - case 0xBFC1CEF8u: goto label_BFC1CEF8; - case 0xBFC1CF00u: goto label_BFC1CF00; - case 0xBFC1CF08u: goto label_BFC1CF08; - case 0xBFC1CF1Cu: goto label_BFC1CF1C; - case 0xBFC1CF48u: goto label_BFC1CF48; - case 0xBFC1CF50u: goto label_BFC1CF50; - case 0xBFC1CF58u: goto label_BFC1CF58; - case 0xBFC1CF6Cu: goto label_BFC1CF6C; - case 0xBFC1CFA8u: goto label_BFC1CFA8; - case 0xBFC1CFBCu: goto label_BFC1CFBC; - case 0xBFC1CFC4u: goto label_BFC1CFC4; - case 0xBFC1CFE4u: goto label_BFC1CFE4; - case 0xBFC1CFF4u: goto label_BFC1CFF4; - case 0xBFC1CFF8u: goto label_BFC1CFF8; - case 0xBFC1D000u: goto label_BFC1D000; - case 0xBFC1D028u: goto label_BFC1D028; - case 0xBFC1D03Cu: goto label_BFC1D03C; - case 0xBFC1D054u: goto label_BFC1D054; - case 0xBFC1D068u: goto label_BFC1D068; - case 0xBFC1D078u: goto label_BFC1D078; - case 0xBFC1D090u: goto label_BFC1D090; - case 0xBFC1D0A0u: goto label_BFC1D0A0; - case 0xBFC1D0E4u: goto label_BFC1D0E4; - case 0xBFC1D118u: goto label_BFC1D118; - case 0xBFC1D130u: goto label_BFC1D130; - case 0xBFC1D144u: goto label_BFC1D144; - case 0xBFC1D154u: goto label_BFC1D154; - case 0xBFC1D16Cu: goto label_BFC1D16C; - case 0xBFC1D17Cu: goto label_BFC1D17C; - case 0xBFC1D190u: goto label_BFC1D190; - case 0xBFC1D1A4u: goto label_BFC1D1A4; - case 0xBFC1D1A8u: goto label_BFC1D1A8; - case 0xBFC1D1B0u: goto label_BFC1D1B0; - case 0xBFC1D1ECu: goto label_BFC1D1EC; - case 0xBFC1D220u: goto label_BFC1D220; - case 0xBFC1D234u: goto label_BFC1D234; - case 0xBFC1D244u: goto label_BFC1D244; - case 0xBFC1D260u: goto label_BFC1D260; - case 0xBFC1D268u: goto label_BFC1D268; - case 0xBFC1D288u: goto label_BFC1D288; - case 0xBFC1D294u: goto label_BFC1D294; - case 0xBFC1D2BCu: goto label_BFC1D2BC; - case 0xBFC1D2C8u: goto label_BFC1D2C8; - case 0xBFC1D2DCu: goto label_BFC1D2DC; - case 0xBFC1D2F4u: goto label_BFC1D2F4; - case 0xBFC1D304u: goto label_BFC1D304; - case 0xBFC1D324u: goto label_BFC1D324; - case 0xBFC1D348u: goto label_BFC1D348; - case 0xBFC1D368u: goto label_BFC1D368; - case 0xBFC1D384u: goto label_BFC1D384; - case 0xBFC1D388u: goto label_BFC1D388; - case 0xBFC1D39Cu: goto label_BFC1D39C; - case 0xBFC1D3BCu: goto label_BFC1D3BC; - case 0xBFC1D3F4u: goto label_BFC1D3F4; - case 0xBFC1D414u: goto label_BFC1D414; - case 0xBFC1D42Cu: goto label_BFC1D42C; - case 0xBFC1D44Cu: goto label_BFC1D44C; - case 0xBFC1D454u: goto label_BFC1D454; - case 0xBFC1D468u: goto label_BFC1D468; - case 0xBFC1D470u: goto label_BFC1D470; - case 0xBFC1D480u: goto label_BFC1D480; - case 0xBFC1D4BCu: goto label_BFC1D4BC; - case 0xBFC1D4F4u: goto label_BFC1D4F4; - case 0xBFC1D508u: goto label_BFC1D508; - case 0xBFC1D514u: goto label_BFC1D514; - case 0xBFC1D528u: goto label_BFC1D528; - case 0xBFC1D53Cu: goto label_BFC1D53C; - case 0xBFC1D550u: goto label_BFC1D550; - case 0xBFC1D58Cu: goto label_BFC1D58C; - case 0xBFC1D59Cu: goto label_BFC1D59C; - case 0xBFC1D5D0u: goto label_BFC1D5D0; - case 0xBFC1D5E0u: goto label_BFC1D5E0; - case 0xBFC1D5F0u: goto label_BFC1D5F0; - case 0xBFC1D608u: goto label_BFC1D608; - case 0xBFC1D618u: goto label_BFC1D618; - case 0xBFC1D61Cu: goto label_BFC1D61C; - case 0xBFC1D628u: goto label_BFC1D628; - case 0xBFC1D630u: goto label_BFC1D630; - case 0xBFC1D638u: goto label_BFC1D638; - case 0xBFC1D640u: goto label_BFC1D640; - case 0xBFC1D664u: goto label_BFC1D664; - case 0xBFC1D66Cu: goto label_BFC1D66C; - case 0xBFC1D690u: goto label_BFC1D690; - case 0xBFC1D6A8u: goto label_BFC1D6A8; - case 0xBFC1D6B8u: goto label_BFC1D6B8; - case 0xBFC1D6D8u: goto label_BFC1D6D8; - case 0xBFC1D6ECu: goto label_BFC1D6EC; - case 0xBFC1D70Cu: goto label_BFC1D70C; - case 0xBFC1D718u: goto label_BFC1D718; - case 0xBFC1D71Cu: goto label_BFC1D71C; - case 0xBFC1D730u: goto label_BFC1D730; - case 0xBFC1D750u: goto label_BFC1D750; - case 0xBFC1D770u: goto label_BFC1D770; - case 0xBFC1D790u: goto label_BFC1D790; - case 0xBFC1D798u: goto label_BFC1D798; - case 0xBFC1D7ACu: goto label_BFC1D7AC; - case 0xBFC1D7C0u: goto label_BFC1D7C0; - case 0xBFC1D7D0u: goto label_BFC1D7D0; - case 0xBFC1D804u: goto label_BFC1D804; - case 0xBFC1D814u: goto label_BFC1D814; - case 0xBFC1D81Cu: goto label_BFC1D81C; - case 0xBFC1D824u: goto label_BFC1D824; - case 0xBFC1D850u: goto label_BFC1D850; - case 0xBFC1D86Cu: goto label_BFC1D86C; - case 0xBFC1D874u: goto label_BFC1D874; - case 0xBFC1D87Cu: goto label_BFC1D87C; - case 0xBFC1D8A8u: goto label_BFC1D8A8; - case 0xBFC1D8B0u: goto label_BFC1D8B0; - case 0xBFC1D8C4u: goto label_BFC1D8C4; - case 0xBFC1D8CCu: goto label_BFC1D8CC; - case 0xBFC1D8D4u: goto label_BFC1D8D4; - case 0xBFC1D8DCu: goto label_BFC1D8DC; - case 0xBFC1D8ECu: goto label_BFC1D8EC; - case 0xBFC1D970u: goto label_BFC1D970; - default: break; - } - } -label_BFC1CDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1CDD8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034DD8u); -#endif - /* 0xBFC1CDDC: 8DCE9DF8 lw $t6, -25096($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034DDCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1CDE0: 27BDFF88 addiu $sp, $sp, -120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-120)); - PGXP_ALU(0x27BDFF88u, cpu->gpr[29], _pgx1, 0xFFFFFF88u); } -#ifdef PSX_COSIM - cosim_instr(0x80034DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1CDE4: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034DE4u); return; } g_debug_last_store_pc = 0x80034DE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1CDE8: 15C00006 bne $t6, $zero, 0xBFC1CE04 */ - uint32_t psx_brA_BFC1CDE8 = cpu->gpr[14]; uint32_t psx_brB_BFC1CDE8 = cpu->gpr[0]; - psx_taken_BFC1CDE8 = (psx_brA_BFC1CDE8 != psx_brB_BFC1CDE8); - psx_delay_BFC1CDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1CDEC: AFA40078 sw $a0, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034DECu); return; } g_debug_last_store_pc = 0x80034DECu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40078u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DECu); -#endif - if (psx_delay_BFC1CDE8) { - psx_delay_BFC1CDE8 = 0; - if (psx_taken_BFC1CDE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E04u); - goto label_BFC1CE04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034DF0u); - } -label_BFC1CDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1CDF0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034DF0u); -#endif - /* 0xBFC1CDF4: 8DEF9DF4 lw $t7, -25100($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034DF4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CDF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1CDFC: 11E00009 beq $t7, $zero, 0xBFC1CE24 */ - uint32_t psx_brA_BFC1CDFC = cpu->gpr[15]; uint32_t psx_brB_BFC1CDFC = cpu->gpr[0]; - psx_taken_BFC1CDFC = (psx_brA_BFC1CDFC == psx_brB_BFC1CDFC); - psx_delay_BFC1CDFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CE00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034E00u); -#endif - if (psx_delay_BFC1CDFC) { - psx_delay_BFC1CDFC = 0; - if (psx_taken_BFC1CDFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E24u); - goto label_BFC1CE24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E04u); - } -label_BFC1CE04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E04u); -#endif - /* 0xBFC1CE04: 8FB80078 lw $t8, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E04u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80078u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1CE08: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1CE0C: A3000001 sb $zero, 1($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034E0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000001u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1CE10: A3190002 sb $t9, 2($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034E10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA3190002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1CE14: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034E14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1CE18: A3000003 sb $zero, 3($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034E18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000003u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CE1C: 100002D4 beq $zero, $zero, 0xBFC1D970 */ - uint32_t psx_brA_BFC1CE1C = cpu->gpr[0]; uint32_t psx_brB_BFC1CE1C = cpu->gpr[0]; - psx_taken_BFC1CE1C = (psx_brA_BFC1CE1C == psx_brB_BFC1CE1C); - psx_delay_BFC1CE1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1CE20: A3000004 sb $zero, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034E20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (4)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E20u); -#endif - if (psx_delay_BFC1CE1C) { - psx_delay_BFC1CE1C = 0; - if (psx_taken_BFC1CE1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035970u); - goto label_BFC1D970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E24u); - } -label_BFC1CE24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1CE24: AFB0004C sw $s0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E24u); return; } g_debug_last_store_pc = 0x80034E24u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0004Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC1CE28: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1CE2C: 2E010005 sltiu $at, $s0, 5 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < 0x00000005u ? 1 : 0); - PGXP_ALU(0x2E010005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x80034E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC1CE30: AFB30048 sw $s3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E30u); return; } g_debug_last_store_pc = 0x80034E30u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30048u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE34: 10200286 beq $at, $zero, 0xBFC1D850 */ - uint32_t psx_brA_BFC1CE34 = cpu->gpr[1]; uint32_t psx_brB_BFC1CE34 = cpu->gpr[0]; - psx_taken_BFC1CE34 = (psx_brA_BFC1CE34 == psx_brB_BFC1CE34); - psx_delay_BFC1CE34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC1CE38: AFB40044 sw $s4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E38u); return; } g_debug_last_store_pc = 0x80034E38u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40044u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E38u); -#endif - if (psx_delay_BFC1CE34) { - psx_delay_BFC1CE34 = 0; - if (psx_taken_BFC1CE34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035850u); - goto label_BFC1D850; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E3Cu); - } -label_BFC1CE3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC1CE3C: 00104080 sll $t0, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CE40: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1CE44: 00280821 addu $at, $at, $t0 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[8]; - PGXP_ALU(0x00280821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034E44u); -#endif - /* 0xBFC1CE48: 8C28AC70 lw $t0, -21392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E48u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2u); } - PGXP_LOAD(0x8C28AC70u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CE4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1CE50: 01000008 jr $t0 */ - psx_delay_BFC1CE50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CE54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034E54u); -#endif - if (psx_delay_BFC1CE50) { - psx_delay_BFC1CE50 = 0; - /* jump table at 0x8005AC70, 5 entries */ - switch (cpu->gpr[8]) { - case 0x80034E58u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E58u); - goto label_BFC1CE58; - case 0x80035000u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035000u); - goto label_BFC1D000; - case 0x80035244u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035244u); - goto label_BFC1D244; - case 0x80035628u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035628u); - goto label_BFC1D628; - case 0x80035824u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035824u); - goto label_BFC1D824; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } - } -label_BFC1CE58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CE58: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034E58u); -#endif - /* 0xBFC1CE5C: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE60: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80034E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CE64: 10410009 beq $v0, $at, 0xBFC1CE8C */ - uint32_t psx_brA_BFC1CE64 = cpu->gpr[2]; uint32_t psx_brB_BFC1CE64 = cpu->gpr[1]; - psx_taken_BFC1CE64 = (psx_brA_BFC1CE64 == psx_brB_BFC1CE64); - psx_delay_BFC1CE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE68: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80034E68u); -#endif - if (psx_delay_BFC1CE64) { - psx_delay_BFC1CE64 = 0; - if (psx_taken_BFC1CE64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E8Cu); - goto label_BFC1CE8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E6Cu); - } -label_BFC1CE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CE6C: 10410007 beq $v0, $at, 0xBFC1CE8C */ - uint32_t psx_brA_BFC1CE6C = cpu->gpr[2]; uint32_t psx_brB_BFC1CE6C = cpu->gpr[1]; - psx_taken_BFC1CE6C = (psx_brA_BFC1CE6C == psx_brB_BFC1CE6C); - psx_delay_BFC1CE6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE70: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80034E70u); -#endif - if (psx_delay_BFC1CE6C) { - psx_delay_BFC1CE6C = 0; - if (psx_taken_BFC1CE6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E8Cu); - goto label_BFC1CE8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E74u); - } -label_BFC1CE74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CE74: 10410005 beq $v0, $at, 0xBFC1CE8C */ - uint32_t psx_brA_BFC1CE74 = cpu->gpr[2]; uint32_t psx_brB_BFC1CE74 = cpu->gpr[1]; - psx_taken_BFC1CE74 = (psx_brA_BFC1CE74 == psx_brB_BFC1CE74); - psx_delay_BFC1CE74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE78: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034E78u); -#endif - if (psx_delay_BFC1CE74) { - psx_delay_BFC1CE74 = 0; - if (psx_taken_BFC1CE74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E8Cu); - goto label_BFC1CE8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E7Cu); - } -label_BFC1CE7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CE7C: 10410003 beq $v0, $at, 0xBFC1CE8C */ - uint32_t psx_brA_BFC1CE7C = cpu->gpr[2]; uint32_t psx_brB_BFC1CE7C = cpu->gpr[1]; - psx_taken_BFC1CE7C = (psx_brA_BFC1CE7C == psx_brB_BFC1CE7C); - psx_delay_BFC1CE7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CE80: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80034E80u); -#endif - if (psx_delay_BFC1CE7C) { - psx_delay_BFC1CE7C = 0; - if (psx_taken_BFC1CE7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E8Cu); - goto label_BFC1CE8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E84u); - } -label_BFC1CE84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CE84: 1441001C bne $v0, $at, 0xBFC1CEF8 */ - uint32_t psx_brA_BFC1CE84 = cpu->gpr[2]; uint32_t psx_brB_BFC1CE84 = cpu->gpr[1]; - psx_taken_BFC1CE84 = (psx_brA_BFC1CE84 != psx_brB_BFC1CE84); - psx_delay_BFC1CE84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CE88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034E88u); -#endif - if (psx_delay_BFC1CE84) { - psx_delay_BFC1CE84 = 0; - if (psx_taken_BFC1CE84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EF8u); - goto label_BFC1CEF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034E8Cu); - } -label_BFC1CE8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CE8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1CE8C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1CE90: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1CE94: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034E94u); -#endif - /* 0xBFC1CE98: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E98u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E98u); -#endif - /* 0xBFC1CE9C: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034E9Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EA0u); -#endif - /* 0xBFC1CEA0: 8D299E40 lw $t1, -25024($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EA0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E40u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1CEA4: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EA4u); return; } g_debug_last_store_pc = 0x80034EA4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1CEA8: 1120000A beq $t1, $zero, 0xBFC1CED4 */ - uint32_t psx_brA_BFC1CEA8 = cpu->gpr[9]; uint32_t psx_brB_BFC1CEA8 = cpu->gpr[0]; - psx_taken_BFC1CEA8 = (psx_brA_BFC1CEA8 == psx_brB_BFC1CEA8); - psx_delay_BFC1CEA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1CEAC: AFA30074 sw $v1, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EACu); return; } g_debug_last_store_pc = 0x80034EACu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30074u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EACu); -#endif - if (psx_delay_BFC1CEA8) { - psx_delay_BFC1CEA8 = 0; - if (psx_taken_BFC1CEA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034ED4u); - goto label_BFC1CED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EB0u); - } -label_BFC1CEB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CEB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CEB0: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80034EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1CEB4: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CEB8: 1441000B bne $v0, $at, 0xBFC1CEE8 */ - uint32_t psx_brA_BFC1CEB8 = cpu->gpr[2]; uint32_t psx_brB_BFC1CEB8 = cpu->gpr[1]; - psx_taken_BFC1CEB8 = (psx_brA_BFC1CEB8 != psx_brB_BFC1CEB8); - psx_delay_BFC1CEB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1CEBC: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034EBCu); -#endif - if (psx_delay_BFC1CEB8) { - psx_delay_BFC1CEB8 = 0; - if (psx_taken_BFC1CEB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EE8u); - goto label_BFC1CEE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EC0u); - } -label_BFC1CEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CEC0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CEC4: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EC4u); return; } g_debug_last_store_pc = 0x80034EC4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CEC8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CECC: 10000006 beq $zero, $zero, 0xBFC1CEE8 */ - uint32_t psx_brA_BFC1CECC = cpu->gpr[0]; uint32_t psx_brB_BFC1CECC = cpu->gpr[0]; - psx_taken_BFC1CECC = (psx_brA_BFC1CECC == psx_brB_BFC1CECC); - psx_delay_BFC1CECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CED0: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034ED0u); return; } g_debug_last_store_pc = 0x80034ED0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034ED0u); -#endif - if (psx_delay_BFC1CECC) { - psx_delay_BFC1CECC = 0; - if (psx_taken_BFC1CECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EE8u); - goto label_BFC1CEE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034ED4u); - } -label_BFC1CED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC1CED4: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1CED8: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034ED8u); -#endif - /* 0xBFC1CEDC: 8E949E60 lw $s4, -24992($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -24992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EDCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E60u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EE0u); -#endif - /* 0xBFC1CEE0: 8E739E64 lw $s3, -24988($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -24988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EE0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E64u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CEE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034EE4u); -#endif -label_BFC1CEE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CEE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CEE8: 14A00043 bne $a1, $zero, 0xBFC1CFF8 */ - uint32_t psx_brA_BFC1CEE8 = cpu->gpr[5]; uint32_t psx_brB_BFC1CEE8 = cpu->gpr[0]; - psx_taken_BFC1CEE8 = (psx_brA_BFC1CEE8 != psx_brB_BFC1CEE8); - psx_delay_BFC1CEE8 = 1; - /* 0xBFC1CEEC: 8FAF0078 lw $t7, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034EECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0078u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034EECu); -#endif - if (psx_delay_BFC1CEE8) { - psx_delay_BFC1CEE8 = 0; - if (psx_taken_BFC1CEE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FF8u); - goto label_BFC1CFF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EF0u); - } -label_BFC1CEF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CEF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CEF0: 10000040 beq $zero, $zero, 0xBFC1CFF4 */ - uint32_t psx_brA_BFC1CEF0 = cpu->gpr[0]; uint32_t psx_brB_BFC1CEF0 = cpu->gpr[0]; - psx_taken_BFC1CEF0 = (psx_brA_BFC1CEF0 == psx_brB_BFC1CEF0); - psx_delay_BFC1CEF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1CEF4: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034EF4u); -#endif - if (psx_delay_BFC1CEF0) { - psx_delay_BFC1CEF0 = 0; - if (psx_taken_BFC1CEF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FF4u); - goto label_BFC1CFF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034EF8u); - } -label_BFC1CEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CEF8: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80034F00u; /* jal link before delay slot */ - psx_delay_BFC1CEF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CEFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034EFCu); -#endif - if (psx_delay_BFC1CEF8) { - psx_delay_BFC1CEF8 = 0; - cpu->gpr[31] = 0x80034F00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1CF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1CF00: 10400011 beq $v0, $zero, 0xBFC1CF48 */ - uint32_t psx_brA_BFC1CF00 = cpu->gpr[2]; uint32_t psx_brB_BFC1CF00 = cpu->gpr[0]; - psx_taken_BFC1CF00 = (psx_brA_BFC1CF00 == psx_brB_BFC1CF00); - psx_delay_BFC1CF00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CF04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034F04u); -#endif - if (psx_delay_BFC1CF00) { - psx_delay_BFC1CF00 = 0; - if (psx_taken_BFC1CF00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F48u); - goto label_BFC1CF48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F08u); - } -label_BFC1CF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CF08: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F08u); -#endif - /* 0xBFC1CF0C: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F0Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CF10: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80034F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CF14: 1441000C bne $v0, $at, 0xBFC1CF48 */ - uint32_t psx_brA_BFC1CF14 = cpu->gpr[2]; uint32_t psx_brB_BFC1CF14 = cpu->gpr[1]; - psx_taken_BFC1CF14 = (psx_brA_BFC1CF14 != psx_brB_BFC1CF14); - psx_delay_BFC1CF14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CF18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034F18u); -#endif - if (psx_delay_BFC1CF14) { - psx_delay_BFC1CF14 = 0; - if (psx_taken_BFC1CF14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F48u); - goto label_BFC1CF48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F1Cu); - } -label_BFC1CF1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1CF1C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1CF20: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F20u); -#endif - /* 0xBFC1CF24: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F24u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F24u); -#endif - /* 0xBFC1CF28: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F28u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC1CF2C: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1CF30: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F30u); -#endif - /* 0xBFC1CF34: 8E949E60 lw $s4, -24992($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -24992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F34u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E60u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F34u); -#endif - /* 0xBFC1CF38: 8E739E64 lw $s3, -24988($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -24988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F38u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E64u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1CF3C: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F3Cu); return; } g_debug_last_store_pc = 0x80034F3Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CF40: 1000002C beq $zero, $zero, 0xBFC1CFF4 */ - uint32_t psx_brA_BFC1CF40 = cpu->gpr[0]; uint32_t psx_brB_BFC1CF40 = cpu->gpr[0]; - psx_taken_BFC1CF40 = (psx_brA_BFC1CF40 == psx_brB_BFC1CF40); - psx_delay_BFC1CF40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1CF44: AFA30074 sw $v1, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F44u); return; } g_debug_last_store_pc = 0x80034F44u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30074u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F44u); -#endif - if (psx_delay_BFC1CF40) { - psx_delay_BFC1CF40 = 0; - if (psx_taken_BFC1CF40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FF4u); - goto label_BFC1CFF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F48u); - } -label_BFC1CF48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1CF48: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80034F50u; /* jal link before delay slot */ - psx_delay_BFC1CF48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CF4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034F4Cu); -#endif - if (psx_delay_BFC1CF48) { - psx_delay_BFC1CF48 = 0; - cpu->gpr[31] = 0x80034F50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1CF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1CF50: 10400015 beq $v0, $zero, 0xBFC1CFA8 */ - uint32_t psx_brA_BFC1CF50 = cpu->gpr[2]; uint32_t psx_brB_BFC1CF50 = cpu->gpr[0]; - psx_taken_BFC1CF50 = (psx_brA_BFC1CF50 == psx_brB_BFC1CF50); - psx_delay_BFC1CF50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CF54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034F54u); -#endif - if (psx_delay_BFC1CF50) { - psx_delay_BFC1CF50 = 0; - if (psx_taken_BFC1CF50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FA8u); - goto label_BFC1CFA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F58u); - } -label_BFC1CF58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1CF58: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F58u); -#endif - /* 0xBFC1CF5C: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CF60: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80034F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1CF64: 14410010 bne $v0, $at, 0xBFC1CFA8 */ - uint32_t psx_brA_BFC1CF64 = cpu->gpr[2]; uint32_t psx_brB_BFC1CF64 = cpu->gpr[1]; - psx_taken_BFC1CF64 = (psx_brA_BFC1CF64 != psx_brB_BFC1CF64); - psx_delay_BFC1CF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CF68: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F68u); -#endif - if (psx_delay_BFC1CF64) { - psx_delay_BFC1CF64 = 0; - if (psx_taken_BFC1CF64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FA8u); - goto label_BFC1CFA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034F6Cu); - } -label_BFC1CF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CF6C: AC209E54 sw $zero, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F6Cu); return; } g_debug_last_store_pc = 0x80034F6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CF70: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1CF74: AC209E58 sw $zero, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F74u); return; } g_debug_last_store_pc = 0x80034F74u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1CF78: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CF7C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1CF80: AC239E50 sw $v1, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F80u); return; } g_debug_last_store_pc = 0x80034F80u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1CF84: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1CF88: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1CF8C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC1CF90: AFA00074 sw $zero, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F90u); return; } g_debug_last_store_pc = 0x80034F90u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC1CF94: AFAA0070 sw $t2, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034F94u); return; } g_debug_last_store_pc = 0x80034F94u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0070u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80034F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1CF98: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1CF9C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CFA0: 10000014 beq $zero, $zero, 0xBFC1CFF4 */ - uint32_t psx_brA_BFC1CFA0 = cpu->gpr[0]; uint32_t psx_brB_BFC1CFA0 = cpu->gpr[0]; - psx_taken_BFC1CFA0 = (psx_brA_BFC1CFA0 == psx_brB_BFC1CFA0); - psx_delay_BFC1CFA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1CFA4: AC259EAC sw $a1, -24916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FA4u); return; } g_debug_last_store_pc = 0x80034FA4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FA4u); -#endif - if (psx_delay_BFC1CFA0) { - psx_delay_BFC1CFA0 = 0; - if (psx_taken_BFC1CFA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FF4u); - goto label_BFC1CFF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FA8u); - } -label_BFC1CFA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1CFA8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034FA8u); -#endif - /* 0xBFC1CFAC: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CFB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1CFB4: 14600003 bne $v1, $zero, 0xBFC1CFC4 */ - uint32_t psx_brA_BFC1CFB4 = cpu->gpr[3]; uint32_t psx_brB_BFC1CFB4 = cpu->gpr[0]; - psx_taken_BFC1CFB4 = (psx_brA_BFC1CFB4 != psx_brB_BFC1CFB4); - psx_delay_BFC1CFB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CFB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80034FB8u); -#endif - if (psx_delay_BFC1CFB4) { - psx_delay_BFC1CFB4 = 0; - if (psx_taken_BFC1CFB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FC4u); - goto label_BFC1CFC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FBCu); - } -label_BFC1CFBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CFBC: 10000009 beq $zero, $zero, 0xBFC1CFE4 */ - uint32_t psx_brA_BFC1CFBC = cpu->gpr[0]; uint32_t psx_brB_BFC1CFBC = cpu->gpr[0]; - psx_taken_BFC1CFBC = (psx_brA_BFC1CFBC == psx_brB_BFC1CFBC); - psx_delay_BFC1CFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC1CFC0: AFA00074 sw $zero, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FC0u); return; } g_debug_last_store_pc = 0x80034FC0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FC0u); -#endif - if (psx_delay_BFC1CFBC) { - psx_delay_BFC1CFBC = 0; - if (psx_taken_BFC1CFBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FE4u); - goto label_BFC1CFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034FC4u); - } -label_BFC1CFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1CFC4: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FC4u); return; } g_debug_last_store_pc = 0x80034FC4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1CFC8: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80034FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1CFCC: 2631D0F0 addiu $s1, $s1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12048)); - PGXP_ALU(0x2631D0F0u, cpu->gpr[17], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80034FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC1CFD0: 00035880 sll $t3, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80034FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21800u); -#endif - /* 0xBFC1CFD4: 022B6021 addu $t4, $s1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[17] + cpu->gpr[11]; - PGXP_ALU(0x022B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034FD4u); -#endif - /* 0xBFC1CFD8: 8D8D0000 lw $t5, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FD8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x8D8D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FD8u); -#endif - /* 0xBFC1CFDC: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FDCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1CFE0: AFAD0074 sw $t5, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FE0u); return; } g_debug_last_store_pc = 0x80034FE0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0074u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FE0u); -#endif -label_BFC1CFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1CFE4: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80034FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC1CFE8: AFAE0070 sw $t6, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FE8u); return; } g_debug_last_store_pc = 0x80034FE8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0070u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1CFEC: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1CFF0: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80034FF0u); -#endif -label_BFC1CFF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FF4u); -#endif - /* 0xBFC1CFF4: 8FAF0078 lw $t7, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80034FF4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0078u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FF4u); -#endif -label_BFC1CFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1CFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1CFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80034FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1CFF8: 1000021C beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1CFF8 = cpu->gpr[0]; uint32_t psx_brB_BFC1CFF8 = cpu->gpr[0]; - psx_taken_BFC1CFF8 = (psx_brA_BFC1CFF8 == psx_brB_BFC1CFF8); - psx_delay_BFC1CFF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1CFFC: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80034FFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80034FFCu); -#endif - if (psx_delay_BFC1CFF8) { - psx_delay_BFC1CFF8 = 0; - if (psx_taken_BFC1CFF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035000u); - } -label_BFC1D000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1D000: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D004: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1D008: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035008u); -#endif - /* 0xBFC1D00C: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003500Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003500Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035010u); -#endif - /* 0xBFC1D010: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035010u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035010u); -#endif - /* 0xBFC1D014: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035014u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D018: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80035018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1D01C: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003501Cu); return; } g_debug_last_store_pc = 0x8003501Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1D020: 14410043 bne $v0, $at, 0xBFC1D130 */ - uint32_t psx_brA_BFC1D020 = cpu->gpr[2]; uint32_t psx_brB_BFC1D020 = cpu->gpr[1]; - psx_taken_BFC1D020 = (psx_brA_BFC1D020 != psx_brB_BFC1D020); - psx_delay_BFC1D020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1D024: AFA30074 sw $v1, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035024u); return; } g_debug_last_store_pc = 0x80035024u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30074u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035024u); -#endif - if (psx_delay_BFC1D020) { - psx_delay_BFC1D020 = 0; - if (psx_taken_BFC1D020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035130u); - goto label_BFC1D130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035028u); - } -label_BFC1D028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D028: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035028u); -#endif - /* 0xBFC1D02C: 8F399E40 lw $t9, -25024($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003502Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E40u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1D034: 13200007 beq $t9, $zero, 0xBFC1D054 */ - uint32_t psx_brA_BFC1D034 = cpu->gpr[25]; uint32_t psx_brB_BFC1D034 = cpu->gpr[0]; - psx_taken_BFC1D034 = (psx_brA_BFC1D034 == psx_brB_BFC1D034); - psx_delay_BFC1D034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D038: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035038u); -#endif - if (psx_delay_BFC1D034) { - psx_delay_BFC1D034 = 0; - if (psx_taken_BFC1D034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035054u); - goto label_BFC1D054; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003503Cu); - } -label_BFC1D03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D03C: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003503Cu); return; } g_debug_last_store_pc = 0x8003503Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D040: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D044: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1D048: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D04C: 10000079 beq $zero, $zero, 0xBFC1D234 */ - uint32_t psx_brA_BFC1D04C = cpu->gpr[0]; uint32_t psx_brB_BFC1D04C = cpu->gpr[0]; - psx_taken_BFC1D04C = (psx_brA_BFC1D04C == psx_brB_BFC1D04C); - psx_delay_BFC1D04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D050: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035050u); return; } g_debug_last_store_pc = 0x80035050u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035050u); -#endif - if (psx_delay_BFC1D04C) { - psx_delay_BFC1D04C = 0; - if (psx_taken_BFC1D04C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035234u); - goto label_BFC1D234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035054u); - } -label_BFC1D054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1D054: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035054u); -#endif - /* 0xBFC1D058: 93189E71 lbu $t8, -24975($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24975; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-24975)), 24, 0x1000000u); - PGXP_LOAD(0x93189E71u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D05C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC1D060: 1478000F bne $v1, $t8, 0xBFC1D0A0 */ - uint32_t psx_brA_BFC1D060 = cpu->gpr[3]; uint32_t psx_brB_BFC1D060 = cpu->gpr[24]; - psx_taken_BFC1D060 = (psx_brA_BFC1D060 != psx_brB_BFC1D060); - psx_delay_BFC1D060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035064u); -#endif - if (psx_delay_BFC1D060) { - psx_delay_BFC1D060 = 0; - if (psx_taken_BFC1D060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800350A0u); - goto label_BFC1D0A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035068u); - } -label_BFC1D068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D068: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035068u); -#endif - /* 0xBFC1D06C: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D070: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035078u; /* jal link before delay slot */ - psx_delay_BFC1D070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035074u); -#endif - if (psx_delay_BFC1D070) { - psx_delay_BFC1D070 = 0; - cpu->gpr[31] = 0x80035078u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1D078: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035078u); -#endif - /* 0xBFC1D07C: 8D089E54 lw $t0, -25004($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003507Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E54u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003507Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D080: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035080u); -#endif - /* 0xBFC1D084: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D088: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035090u; /* jal link before delay slot */ - psx_delay_BFC1D088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100104u); -#endif - /* 0xBFC1D08C: 0048A023 subu $s4, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[8]; - PGXP_ALU(0x0048A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003508Cu); -#endif - if (psx_delay_BFC1D088) { - psx_delay_BFC1D088 = 0; - cpu->gpr[31] = 0x80035090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1D090: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035090u); -#endif - /* 0xBFC1D094: 8D299E58 lw $t1, -25000($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035094u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D098: 10000066 beq $zero, $zero, 0xBFC1D234 */ - uint32_t psx_brA_BFC1D098 = cpu->gpr[0]; uint32_t psx_brB_BFC1D098 = cpu->gpr[0]; - psx_taken_BFC1D098 = (psx_brA_BFC1D098 == psx_brB_BFC1D098); - psx_delay_BFC1D098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80204u); -#endif - /* 0xBFC1D09C: 00499823 subu $s3, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[9]; - PGXP_ALU(0x00499823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003509Cu); -#endif - if (psx_delay_BFC1D098) { - psx_delay_BFC1D098 = 0; - if (psx_taken_BFC1D098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035234u); - goto label_BFC1D234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800350A0u); - } -label_BFC1D0A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D0A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D0A0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800350A0u); -#endif - /* 0xBFC1D0A4: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800350A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D0A8: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350A8u); return; } g_debug_last_store_pc = 0x800350A8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800350A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D0AC: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800350ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D0B0: 2631D0F0 addiu $s1, $s1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12048)); - PGXP_ALU(0x2631D0F0u, cpu->gpr[17], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800350B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1D0B4: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800350B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1D0B8: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350B8u); return; } g_debug_last_store_pc = 0x800350B8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800350B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20C00u); -#endif - /* 0xBFC1D0BC: 022A5821 addu $t3, $s1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[17] + cpu->gpr[10]; - PGXP_ALU(0x022A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800350BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350C0u); -#endif - /* 0xBFC1D0C0: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350C0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800350C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D0C4: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800350C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1D0C8: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800350C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D0CC: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x800350CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1D0D0: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800350D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46000u); -#endif - /* 0xBFC1D0D4: 024D7021 addu $t6, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[18] + cpu->gpr[13]; - PGXP_ALU(0x024D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800350D4u); -#endif - /* 0xBFC1D0D8: 91C40003 lbu $a0, 3($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 3; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (3)), 4, 0x4000u); - PGXP_LOAD(0x91C40003u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800350D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D0DC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800350E4u; /* jal link before delay slot */ - psx_delay_BFC1D0DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D0E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800350E0u); -#endif - if (psx_delay_BFC1D0DC) { - psx_delay_BFC1D0DC = 0; - cpu->gpr[31] = 0x800350E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D0E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D0E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D0E4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800350E4u); -#endif - /* 0xBFC1D0E8: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800350E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D0EC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800350ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800350F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1D0F0: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800350F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC1D0F4: 0239C021 addu $t8, $s1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[17] + cpu->gpr[25]; - PGXP_ALU(0x0239C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800350F4u); -#endif - /* 0xBFC1D0F8: 8F080000 lw $t0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350F8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x1000000u); } - PGXP_LOAD(0x8F080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800350F8u); -#endif - /* 0xBFC1D0FC: 8DEF9E54 lw $t7, -25004($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800350FCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E54u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800350FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D100: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D104: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC1D108: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035108u); -#endif - /* 0xBFC1D10C: 91440004 lbu $a0, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (4)), 4, 0x400u); - PGXP_LOAD(0x91440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003510Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D110: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035118u; /* jal link before delay slot */ - psx_delay_BFC1D110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108004u); -#endif - /* 0xBFC1D114: 004FA023 subu $s4, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[15]; - PGXP_ALU(0x004FA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035114u); -#endif - if (psx_delay_BFC1D110) { - psx_delay_BFC1D110 = 0; - cpu->gpr[31] = 0x80035118u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1D118: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035118u); -#endif - /* 0xBFC1D11C: 8D6B9E58 lw $t3, -25000($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003511Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E58u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003511Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035120u); -#endif - /* 0xBFC1D120: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035120u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80035120u); -#endif - /* 0xBFC1D124: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035124u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80035124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D128: 10000042 beq $zero, $zero, 0xBFC1D234 */ - uint32_t psx_brA_BFC1D128 = cpu->gpr[0]; uint32_t psx_brB_BFC1D128 = cpu->gpr[0]; - psx_taken_BFC1D128 = (psx_brA_BFC1D128 == psx_brB_BFC1D128); - psx_delay_BFC1D128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80804u); -#endif - /* 0xBFC1D12C: 004B9823 subu $s3, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[11]; - PGXP_ALU(0x004B9823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003512Cu); -#endif - if (psx_delay_BFC1D128) { - psx_delay_BFC1D128 = 0; - if (psx_taken_BFC1D128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035234u); - goto label_BFC1D234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035130u); - } -label_BFC1D130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1D130: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035130u); -#endif - /* 0xBFC1D134: 918C9E71 lbu $t4, -24975($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24975; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-24975)), 12, 0x1000u); - PGXP_LOAD(0x918C9E71u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80035134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC1D13C: 146C000F bne $v1, $t4, 0xBFC1D17C */ - uint32_t psx_brA_BFC1D13C = cpu->gpr[3]; uint32_t psx_brB_BFC1D13C = cpu->gpr[12]; - psx_taken_BFC1D13C = (psx_brA_BFC1D13C != psx_brB_BFC1D13C); - psx_delay_BFC1D13C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035140u); -#endif - if (psx_delay_BFC1D13C) { - psx_delay_BFC1D13C = 0; - if (psx_taken_BFC1D13C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003517Cu); - goto label_BFC1D17C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035144u); - } -label_BFC1D144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D144: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035144u); -#endif - /* 0xBFC1D148: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D14C: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035154u; /* jal link before delay slot */ - psx_delay_BFC1D14C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D150: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035150u); -#endif - if (psx_delay_BFC1D14C) { - psx_delay_BFC1D14C = 0; - cpu->gpr[31] = 0x80035154u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1D154: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035154u); -#endif - /* 0xBFC1D158: 8DAD9E54 lw $t5, -25004($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035158u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E54u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D15C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035160u); -#endif - /* 0xBFC1D160: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D164: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003516Cu; /* jal link before delay slot */ - psx_delay_BFC1D164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102004u); -#endif - /* 0xBFC1D168: 004DA023 subu $s4, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[13]; - PGXP_ALU(0x004DA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035168u); -#endif - if (psx_delay_BFC1D164) { - psx_delay_BFC1D164 = 0; - cpu->gpr[31] = 0x8003516Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003516Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1D16C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003516Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035170u); -#endif - /* 0xBFC1D170: 8DCE9E58 lw $t6, -25000($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035170u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D174: 1000002F beq $zero, $zero, 0xBFC1D234 */ - uint32_t psx_brA_BFC1D174 = cpu->gpr[0]; uint32_t psx_brB_BFC1D174 = cpu->gpr[0]; - psx_taken_BFC1D174 = (psx_brA_BFC1D174 == psx_brB_BFC1D174); - psx_delay_BFC1D174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84004u); -#endif - /* 0xBFC1D178: 004E9823 subu $s3, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[14]; - PGXP_ALU(0x004E9823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035178u); -#endif - if (psx_delay_BFC1D174) { - psx_delay_BFC1D174 = 0; - if (psx_taken_BFC1D174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035234u); - goto label_BFC1D234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003517Cu); - } -label_BFC1D17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D17C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035180u); -#endif - /* 0xBFC1D180: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035180u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1D188: 10600007 beq $v1, $zero, 0xBFC1D1A8 */ - uint32_t psx_brA_BFC1D188 = cpu->gpr[3]; uint32_t psx_brB_BFC1D188 = cpu->gpr[0]; - psx_taken_BFC1D188 = (psx_brA_BFC1D188 == psx_brB_BFC1D188); - psx_delay_BFC1D188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D18C: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003518Cu); -#endif - if (psx_delay_BFC1D188) { - psx_delay_BFC1D188 = 0; - if (psx_taken_BFC1D188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800351A8u); - goto label_BFC1D1A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035190u); - } -label_BFC1D190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D190: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035190u); -#endif - /* 0xBFC1D194: 8DEF9E74 lw $t7, -24972($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035194u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E74u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D198: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1D19C: 11E00004 beq $t7, $zero, 0xBFC1D1B0 */ - uint32_t psx_brA_BFC1D19C = cpu->gpr[15]; uint32_t psx_brB_BFC1D19C = cpu->gpr[0]; - psx_taken_BFC1D19C = (psx_brA_BFC1D19C == psx_brB_BFC1D19C); - psx_delay_BFC1D19C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D1A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800351A0u); -#endif - if (psx_delay_BFC1D19C) { - psx_delay_BFC1D19C = 0; - if (psx_taken_BFC1D19C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800351B0u); - goto label_BFC1D1B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800351A4u); - } -label_BFC1D1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D1A4: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351A4u); -#endif -label_BFC1D1A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D1A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D1A8: 10000022 beq $zero, $zero, 0xBFC1D234 */ - uint32_t psx_brA_BFC1D1A8 = cpu->gpr[0]; uint32_t psx_brB_BFC1D1A8 = cpu->gpr[0]; - psx_taken_BFC1D1A8 = (psx_brA_BFC1D1A8 == psx_brB_BFC1D1A8); - psx_delay_BFC1D1A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1D1AC: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351ACu); -#endif - if (psx_delay_BFC1D1A8) { - psx_delay_BFC1D1A8 = 0; - if (psx_taken_BFC1D1A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035234u); - goto label_BFC1D234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800351B0u); - } -label_BFC1D1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D1B0: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800351B0u); return; } g_debug_last_store_pc = 0x800351B0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800351B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D1B4: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800351B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D1B8: 2631D0F0 addiu $s1, $s1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12048)); - PGXP_ALU(0x2631D0F0u, cpu->gpr[17], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800351B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1D1BC: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800351BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1D1C0: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800351C0u); return; } g_debug_last_store_pc = 0x800351C0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800351C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC1D1C4: 0239C021 addu $t8, $s1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[17] + cpu->gpr[25]; - PGXP_ALU(0x0239C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351C4u); -#endif - /* 0xBFC1D1C8: 8F080000 lw $t0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800351C8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x1000000u); } - PGXP_LOAD(0x8F080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800351C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D1CC: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800351CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D1D0: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800351D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D1D4: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x800351D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D1D8: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC1D1DC: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351E0u); -#endif - /* 0xBFC1D1E0: 91440003 lbu $a0, 3($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 3; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (3)), 4, 0x400u); - PGXP_LOAD(0x91440003u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800351E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D1E4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800351ECu; /* jal link before delay slot */ - psx_delay_BFC1D1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D1E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800351E8u); -#endif - if (psx_delay_BFC1D1E4) { - psx_delay_BFC1D1E4 = 0; - cpu->gpr[31] = 0x800351ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D1EC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800351ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800351F0u); -#endif - /* 0xBFC1D1F0: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800351F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800351F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1D1F4: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800351F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC1D1F8: 00036080 sll $t4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800351F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23000u); -#endif - /* 0xBFC1D1FC: 022C6821 addu $t5, $s1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[17] + cpu->gpr[12]; - PGXP_ALU(0x022C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800351FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035200u); -#endif - /* 0xBFC1D200: 8DAE0000 lw $t6, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035200u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x8DAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035200u); -#endif - /* 0xBFC1D204: 8D6B9E54 lw $t3, -25004($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035204u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E54u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D208: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D20C: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003520Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2048000u); -#endif - /* 0xBFC1D210: 024FC821 addu $t9, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024FC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035210u); -#endif - /* 0xBFC1D214: 93240004 lbu $a0, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (4)), 4, 0x2000000u); - PGXP_LOAD(0x93240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D218: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035220u; /* jal link before delay slot */ - psx_delay_BFC1D218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100804u); -#endif - /* 0xBFC1D21C: 004BA023 subu $s4, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[11]; - PGXP_ALU(0x004BA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003521Cu); -#endif - if (psx_delay_BFC1D218) { - psx_delay_BFC1D218 = 0; - cpu->gpr[31] = 0x80035220u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1D220: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035220u); -#endif - /* 0xBFC1D224: 8F189E58 lw $t8, -25000($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035224u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035224u); -#endif - /* 0xBFC1D228: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035228u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80035228u); -#endif - /* 0xBFC1D22C: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003522Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003522Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080004u); -#endif - /* 0xBFC1D230: 00589823 subu $s3, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[24]; - PGXP_ALU(0x00589823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035230u); -#endif -label_BFC1D234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035234u); -#endif - /* 0xBFC1D234: 8FA90078 lw $t1, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035234u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90078u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1D238: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D23C: 1000018B beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1D23C = cpu->gpr[0]; uint32_t psx_brB_BFC1D23C = cpu->gpr[0]; - psx_taken_BFC1D23C = (psx_brA_BFC1D23C == psx_brB_BFC1D23C); - psx_delay_BFC1D23C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D240: A1280000 sb $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035240u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035240u); -#endif - if (psx_delay_BFC1D23C) { - psx_delay_BFC1D23C = 0; - if (psx_taken_BFC1D23C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035244u); - } -label_BFC1D244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D244: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1D248: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035248u); -#endif - /* 0xBFC1D24C: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003524Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035250u); -#endif - /* 0xBFC1D250: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035250u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1D254: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035254u); return; } g_debug_last_store_pc = 0x80035254u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D258: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80035260u; /* jal link before delay slot */ - psx_delay_BFC1D258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1D25C: AFA30074 sw $v1, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003525Cu); return; } g_debug_last_store_pc = 0x8003525Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30074u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003525Cu); -#endif - if (psx_delay_BFC1D258) { - psx_delay_BFC1D258 = 0; - cpu->gpr[31] = 0x80035260u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1D260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1D260: 104000AC beq $v0, $zero, 0xBFC1D514 */ - uint32_t psx_brA_BFC1D260 = cpu->gpr[2]; uint32_t psx_brB_BFC1D260 = cpu->gpr[0]; - psx_taken_BFC1D260 = (psx_brA_BFC1D260 == psx_brB_BFC1D260); - psx_delay_BFC1D260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D264: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035264u); -#endif - if (psx_delay_BFC1D260) { - psx_delay_BFC1D260 = 0; - if (psx_taken_BFC1D260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035514u); - goto label_BFC1D514; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035268u); - } -label_BFC1D268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D268: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D26C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003526Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035270u); -#endif - /* 0xBFC1D270: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035270u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035270u); -#endif - /* 0xBFC1D274: 8D4AA10C lw $t2, -24308($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24308; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035274u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AA10Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1D278: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035278u); return; } g_debug_last_store_pc = 0x80035278u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80035278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1D27C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1D280: 15430004 bne $t2, $v1, 0xBFC1D294 */ - uint32_t psx_brA_BFC1D280 = cpu->gpr[10]; uint32_t psx_brB_BFC1D280 = cpu->gpr[3]; - psx_taken_BFC1D280 = (psx_brA_BFC1D280 != psx_brB_BFC1D280); - psx_delay_BFC1D280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D284: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035284u); -#endif - if (psx_delay_BFC1D280) { - psx_delay_BFC1D280 = 0; - if (psx_taken_BFC1D280) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035294u); - goto label_BFC1D294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035288u); - } -label_BFC1D288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D288: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D28C: 10000071 beq $zero, $zero, 0xBFC1D454 */ - uint32_t psx_brA_BFC1D28C = cpu->gpr[0]; uint32_t psx_brB_BFC1D28C = cpu->gpr[0]; - psx_taken_BFC1D28C = (psx_brA_BFC1D28C == psx_brB_BFC1D28C); - psx_delay_BFC1D28C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D290: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035290u); -#endif - if (psx_delay_BFC1D28C) { - psx_delay_BFC1D28C = 0; - if (psx_taken_BFC1D28C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035454u); - goto label_BFC1D454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035294u); - } -label_BFC1D294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D294: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1D298: AC23A10C sw $v1, -24308($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24308; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035298u); return; } g_debug_last_store_pc = 0x80035298u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23A10Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D29C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D2A0: AC20A114 sw $zero, -24300($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24300; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800352A0u); return; } g_debug_last_store_pc = 0x800352A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A114u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800352A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D2A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D2A8: AC20A110 sw $zero, -24304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800352A8u); return; } g_debug_last_store_pc = 0x800352A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A110u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800352A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1D2AC: 28610002 slti $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0); - PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800352ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1D2B0: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800352B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D2B4: 10200004 beq $at, $zero, 0xBFC1D2C8 */ - uint32_t psx_brA_BFC1D2B4 = cpu->gpr[1]; uint32_t psx_brB_BFC1D2B4 = cpu->gpr[0]; - psx_taken_BFC1D2B4 = (psx_brA_BFC1D2B4 == psx_brB_BFC1D2B4); - psx_delay_BFC1D2B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC1D2B8: AFAB0060 sw $t3, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800352B8u); return; } g_debug_last_store_pc = 0x800352B8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0060u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800352B8u); -#endif - if (psx_delay_BFC1D2B4) { - psx_delay_BFC1D2B4 = 0; - if (psx_taken_BFC1D2B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800352C8u); - goto label_BFC1D2C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800352BCu); - } -label_BFC1D2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D2BC: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D2C0: 10000064 beq $zero, $zero, 0xBFC1D454 */ - uint32_t psx_brA_BFC1D2C0 = cpu->gpr[0]; uint32_t psx_brB_BFC1D2C0 = cpu->gpr[0]; - psx_taken_BFC1D2C0 = (psx_brA_BFC1D2C0 == psx_brB_BFC1D2C0); - psx_delay_BFC1D2C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D2C4: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x800352C4u); -#endif - if (psx_delay_BFC1D2C0) { - psx_delay_BFC1D2C0 = 0; - if (psx_taken_BFC1D2C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035454u); - goto label_BFC1D454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800352C8u); - } -label_BFC1D2C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D2C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D2C8: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800352C8u); return; } g_debug_last_store_pc = 0x800352C8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800352C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D2CC: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D2D0: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D2D4: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x800352D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D2D8: 2631D0F4 addiu $s1, $s1, -12044 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12044)); - PGXP_ALU(0x2631D0F4u, cpu->gpr[17], _pgx1, 0xFFFFD0F4u); } -#ifdef PSX_COSIM - cosim_instr(0x800352D8u); -#endif -label_BFC1D2DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D2DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1D2DC: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352E0u); -#endif - /* 0xBFC1D2E0: 918C9E71 lbu $t4, -24975($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24975; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-24975)), 12, 0x1000u); - PGXP_LOAD(0x918C9E71u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800352E0u); -#endif - /* 0xBFC1D2E4: 8E220000 lw $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800352E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x8E220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800352E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D2E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800352E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1D2EC: 15820026 bne $t4, $v0, 0xBFC1D388 */ - uint32_t psx_brA_BFC1D2EC = cpu->gpr[12]; uint32_t psx_brB_BFC1D2EC = cpu->gpr[2]; - psx_taken_BFC1D2EC = (psx_brA_BFC1D2EC != psx_brB_BFC1D2EC); - psx_delay_BFC1D2EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1D2F0: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800352F0u); -#endif - if (psx_delay_BFC1D2EC) { - psx_delay_BFC1D2EC = 0; - if (psx_taken_BFC1D2EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035388u); - goto label_BFC1D388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800352F4u); - } -label_BFC1D2F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D2F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800352F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D2F4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800352F4u); -#endif - /* 0xBFC1D2F8: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800352F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D2FC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035304u; /* jal link before delay slot */ - psx_delay_BFC1D2FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D300: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035300u); -#endif - if (psx_delay_BFC1D2FC) { - psx_delay_BFC1D2FC = 0; - cpu->gpr[31] = 0x80035304u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035304u); -#endif - /* 0xBFC1D304: 8E2D0000 lw $t5, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035304u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x8E2D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D308: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1D30C: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003530Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1D310: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C000u); -#endif - /* 0xBFC1D314: 024E7821 addu $t7, $s2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[18] + cpu->gpr[14]; - PGXP_ALU(0x024E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035314u); -#endif - /* 0xBFC1D318: 91E40000 lbu $a0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 4, 0x8000u); - PGXP_LOAD(0x91E40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D31C: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035324u; /* jal link before delay slot */ - psx_delay_BFC1D31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035320u); -#endif - if (psx_delay_BFC1D31C) { - psx_delay_BFC1D31C = 0; - cpu->gpr[31] = 0x80035324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D324: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035324u); -#endif - /* 0xBFC1D328: 8F39A110 lw $t9, -24304($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24304; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035328u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39A110u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D32C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003532Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC1D330: 0330C021 addu $t8, $t9, $s0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[25] + cpu->gpr[16]; - PGXP_ALU(0x0330C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000104u); -#endif - /* 0xBFC1D334: 03024023 subu $t0, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x03024023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D338: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035338u); -#endif - /* 0xBFC1D33C: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003533Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D340: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035348u; /* jal link before delay slot */ - psx_delay_BFC1D340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1D344: AC28A110 sw $t0, -24304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035344u); return; } g_debug_last_store_pc = 0x80035344u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28A110u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035344u); -#endif - if (psx_delay_BFC1D340) { - psx_delay_BFC1D340 = 0; - cpu->gpr[31] = 0x80035348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035348u); -#endif - /* 0xBFC1D348: 8E290000 lw $t1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035348u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x8E290000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D34C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D350: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D354: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC1D358: 024A5821 addu $t3, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035358u); -#endif - /* 0xBFC1D35C: 91640001 lbu $a0, 1($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (1)), 4, 0x800u); - PGXP_LOAD(0x91640001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003535Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D360: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035368u; /* jal link before delay slot */ - psx_delay_BFC1D360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D364: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035364u); -#endif - if (psx_delay_BFC1D360) { - psx_delay_BFC1D360 = 0; - cpu->gpr[31] = 0x80035368u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1D368: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035368u); -#endif - /* 0xBFC1D36C: 8D8CA114 lw $t4, -24300($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24300; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003536Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CA114u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003536Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D370: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13000u); -#endif - /* 0xBFC1D374: 01906821 addu $t5, $t4, $s0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[16]; - PGXP_ALU(0x01906821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC1D378: 01A27023 subu $t6, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] - cpu->gpr[2]; - PGXP_ALU(0x01A27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D37C: 1000002B beq $zero, $zero, 0xBFC1D42C */ - uint32_t psx_brA_BFC1D37C = cpu->gpr[0]; uint32_t psx_brB_BFC1D37C = cpu->gpr[0]; - psx_taken_BFC1D37C = (psx_brA_BFC1D37C == psx_brB_BFC1D37C); - psx_delay_BFC1D37C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1D380: AC2EA114 sw $t6, -24300($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24300; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035380u); return; } g_debug_last_store_pc = 0x80035380u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EA114u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035380u); -#endif - if (psx_delay_BFC1D37C) { - psx_delay_BFC1D37C = 0; - if (psx_taken_BFC1D37C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003542Cu); - goto label_BFC1D42C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035384u); - } -label_BFC1D384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1D384: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035384u); -#endif -label_BFC1D388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1D388: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2048000u); -#endif - /* 0xBFC1D38C: 024FC821 addu $t9, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024FC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003538Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035390u); -#endif - /* 0xBFC1D390: 93240003 lbu $a0, 3($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 3; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (3)), 4, 0x2000000u); - PGXP_LOAD(0x93240003u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D394: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003539Cu; /* jal link before delay slot */ - psx_delay_BFC1D394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035398u); -#endif - if (psx_delay_BFC1D394) { - psx_delay_BFC1D394 = 0; - cpu->gpr[31] = 0x8003539Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003539Cu); -#endif - /* 0xBFC1D39C: 8E380000 lw $t8, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003539Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000u); } - PGXP_LOAD(0x8E380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003539Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D3A0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1D3A4: 00184080 sll $t0, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00184080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800353A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1D3A8: 01184023 subu $t0, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[24]; - PGXP_ALU(0x01184023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40300u); -#endif - /* 0xBFC1D3AC: 02484821 addu $t1, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[18] + cpu->gpr[8]; - PGXP_ALU(0x02484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353B0u); -#endif - /* 0xBFC1D3B0: 91240000 lbu $a0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (0)), 4, 0x200u); - PGXP_LOAD(0x91240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800353B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D3B4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800353BCu; /* jal link before delay slot */ - psx_delay_BFC1D3B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D3B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800353B8u); -#endif - if (psx_delay_BFC1D3B4) { - psx_delay_BFC1D3B4 = 0; - cpu->gpr[31] = 0x800353BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D3BC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800353BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353C0u); -#endif - /* 0xBFC1D3C0: 8D4AA110 lw $t2, -24304($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24304; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800353C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AA110u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800353C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D3C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800353C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C00u); -#endif - /* 0xBFC1D3C8: 01505821 addu $t3, $t2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[10] + cpu->gpr[16]; - PGXP_ALU(0x01505821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC1D3CC: 01626023 subu $t4, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01626023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1D3D0: AC2CA110 sw $t4, -24304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800353D0u); return; } g_debug_last_store_pc = 0x800353D0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CA110u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800353D0u); -#endif - /* 0xBFC1D3D4: 8E2D0000 lw $t5, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800353D4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x8E2D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800353D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D3D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800353D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1D3DC: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800353DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1D3E0: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C000u); -#endif - /* 0xBFC1D3E4: 024E7821 addu $t7, $s2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[18] + cpu->gpr[14]; - PGXP_ALU(0x024E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353E4u); -#endif - /* 0xBFC1D3E8: 91E40004 lbu $a0, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (4)), 4, 0x8000u); - PGXP_LOAD(0x91E40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800353E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D3EC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800353F4u; /* jal link before delay slot */ - psx_delay_BFC1D3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D3F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800353F0u); -#endif - if (psx_delay_BFC1D3EC) { - psx_delay_BFC1D3EC = 0; - cpu->gpr[31] = 0x800353F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800353F4u); -#endif - /* 0xBFC1D3F4: 8E390000 lw $t9, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800353F4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x8E390000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800353F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D3F8: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800353F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1D3FC: 0019C080 sll $t8, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800353FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1D400: 0319C023 subu $t8, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x0319C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040100u); -#endif - /* 0xBFC1D404: 02584021 addu $t0, $s2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[18] + cpu->gpr[24]; - PGXP_ALU(0x02584021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035404u); -#endif - /* 0xBFC1D408: 91040001 lbu $a0, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 4, 0x100u); - PGXP_LOAD(0x91040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D40C: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035414u; /* jal link before delay slot */ - psx_delay_BFC1D40C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035410u); -#endif - if (psx_delay_BFC1D40C) { - psx_delay_BFC1D40C = 0; - cpu->gpr[31] = 0x80035414u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1D414: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035414u); -#endif - /* 0xBFC1D418: 8D29A114 lw $t1, -24300($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24300; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035418u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29A114u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D41C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10600u); -#endif - /* 0xBFC1D420: 01305021 addu $t2, $t1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[16]; - PGXP_ALU(0x01305021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC1D424: 01425823 subu $t3, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[10] - cpu->gpr[2]; - PGXP_ALU(0x01425823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1D428: AC2BA114 sw $t3, -24300($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24300; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035428u); return; } g_debug_last_store_pc = 0x80035428u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BA114u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035428u); -#endif -label_BFC1D42C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D42Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003542Cu); -#endif - /* 0xBFC1D42C: 8FAC0060 lw $t4, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003542Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0060u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D430: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035430u); -#endif - /* 0xBFC1D434: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035434u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1D438: 258D0001 addiu $t5, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); - PGXP_ALU(0x258D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200Au); -#endif - /* 0xBFC1D43C: 01A3082A slt $at, $t5, $v1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x01A3082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003543Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1D440: AFAD0060 sw $t5, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035440u); return; } g_debug_last_store_pc = 0x80035440u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0060u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D444: 1420FFA5 bne $at, $zero, 0xBFC1D2DC */ - uint32_t psx_brA_BFC1D444 = cpu->gpr[1]; uint32_t psx_brB_BFC1D444 = cpu->gpr[0]; - psx_taken_BFC1D444 = (psx_brA_BFC1D444 != psx_brB_BFC1D444); - psx_delay_BFC1D444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D448: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80035448u); -#endif - if (psx_delay_BFC1D444) { - psx_delay_BFC1D444 = 0; - if (psx_taken_BFC1D444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800352DCu); - goto label_BFC1D2DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003544Cu); - } -label_BFC1D44C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D44Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003544Cu); -#endif - /* 0xBFC1D44C: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003544Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003544Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035450u); -#endif -label_BFC1D454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1D454: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035454u); -#endif - /* 0xBFC1D458: 8DCE9E40 lw $t6, -25024($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035458u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E40u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D45C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003545Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1D460: 15C00029 bne $t6, $zero, 0xBFC1D508 */ - uint32_t psx_brA_BFC1D460 = cpu->gpr[14]; uint32_t psx_brB_BFC1D460 = cpu->gpr[0]; - psx_taken_BFC1D460 = (psx_brA_BFC1D460 != psx_brB_BFC1D460); - psx_delay_BFC1D460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035464u); -#endif - if (psx_delay_BFC1D460) { - psx_delay_BFC1D460 = 0; - if (psx_taken_BFC1D460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035508u); - goto label_BFC1D508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035468u); - } -label_BFC1D468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D468: 0C00D35C jal 0xB0034D70 */ - cpu->gpr[31] = 0x80035470u; /* jal link before delay slot */ - psx_delay_BFC1D468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D46C: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003546Cu); return; } g_debug_last_store_pc = 0x8003546Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003546Cu); -#endif - if (psx_delay_BFC1D468) { - psx_delay_BFC1D468 = 0; - cpu->gpr[31] = 0x80035470u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D70u); - cpu->pc = 0x80034D70u; return; - } -label_BFC1D470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D470: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035470u); -#endif - /* 0xBFC1D474: 8DEFA110 lw $t7, -24304($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24304; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035474u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFA110u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D478: 0C00D360 jal 0xB0034D80 */ - cpu->gpr[31] = 0x80035480u; /* jal link before delay slot */ - psx_delay_BFC1D478 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108004u); -#endif - /* 0xBFC1D47C: 004FA023 subu $s4, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[15]; - PGXP_ALU(0x004FA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003547Cu); -#endif - if (psx_delay_BFC1D478) { - psx_delay_BFC1D478 = 0; - cpu->gpr[31] = 0x80035480u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034D80u); - cpu->pc = 0x80034D80u; return; - } -label_BFC1D480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D480: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035480u); -#endif - /* 0xBFC1D484: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035484u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D488: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D48C: 2631D0F0 addiu $s1, $s1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12048)); - PGXP_ALU(0x2631D0F0u, cpu->gpr[17], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003548Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC1D490: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020100u); -#endif - /* 0xBFC1D494: 02384021 addu $t0, $s1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[17] + cpu->gpr[24]; - PGXP_ALU(0x02384021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035494u); -#endif - /* 0xBFC1D498: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035498u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D49C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003549Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D4A0: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800354A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D4A4: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354A4u); -#endif - /* 0xBFC1D4A8: 8F39A114 lw $t9, -24300($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24300; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354A8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39A114u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800354A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC1D4AC: 024A5821 addu $t3, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354B0u); -#endif - /* 0xBFC1D4B0: 91640000 lbu $a0, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (0)), 4, 0x800u); - PGXP_LOAD(0x91640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800354B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D4B4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800354BCu; /* jal link before delay slot */ - psx_delay_BFC1D4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080004u); -#endif - /* 0xBFC1D4B8: 00599823 subu $s3, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[25]; - PGXP_ALU(0x00599823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354B8u); -#endif - if (psx_delay_BFC1D4B4) { - psx_delay_BFC1D4B4 = 0; - cpu->gpr[31] = 0x800354BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D4BC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800354BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354C0u); -#endif - /* 0xBFC1D4C0: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800354C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1D4C4: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800354C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC1D4C8: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800354C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C000u); -#endif - /* 0xBFC1D4CC: 022E7821 addu $t7, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354D0u); -#endif - /* 0xBFC1D4D0: 8DF90000 lw $t9, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354D0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8000u); } - PGXP_LOAD(0x8DF90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800354D0u); -#endif - /* 0xBFC1D4D4: 8D8C9E54 lw $t4, -25004($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354D4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E54u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800354D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1D4D8: 0019C080 sll $t8, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800354D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1D4DC: 0319C023 subu $t8, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x0319C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040100u); -#endif - /* 0xBFC1D4E0: 02584021 addu $t0, $s2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[18] + cpu->gpr[24]; - PGXP_ALU(0x02584021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354E0u); -#endif - /* 0xBFC1D4E4: 91040001 lbu $a0, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 4, 0x100u); - PGXP_LOAD(0x91040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800354E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103000u); -#endif - /* 0xBFC1D4E8: 028C6823 subu $t5, $s4, $t4 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[20] - cpu->gpr[12]; - PGXP_ALU(0x028C6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D4EC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800354F4u; /* jal link before delay slot */ - psx_delay_BFC1D4EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102004u); -#endif - /* 0xBFC1D4F0: 01A2A021 addu $s4, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[13] + cpu->gpr[2]; - PGXP_ALU(0x01A2A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800354F0u); -#endif - if (psx_delay_BFC1D4EC) { - psx_delay_BFC1D4EC = 0; - cpu->gpr[31] = 0x800354F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D4F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D4F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800354F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1D4F4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800354F4u); -#endif - /* 0xBFC1D4F8: 8D299E58 lw $t1, -25000($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354F8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800354F8u); -#endif - /* 0xBFC1D4FC: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800354FCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800354FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80600u); -#endif - /* 0xBFC1D500: 02695023 subu $t2, $s3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[19] - cpu->gpr[9]; - PGXP_ALU(0x02695023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80404u); -#endif - /* 0xBFC1D504: 01429821 addu $s3, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[10] + cpu->gpr[2]; - PGXP_ALU(0x01429821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035504u); -#endif -label_BFC1D508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035508u); -#endif - /* 0xBFC1D508: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035508u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80035508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D50C: 10000043 beq $zero, $zero, 0xBFC1D61C */ - uint32_t psx_brA_BFC1D50C = cpu->gpr[0]; uint32_t psx_brB_BFC1D50C = cpu->gpr[0]; - psx_taken_BFC1D50C = (psx_brA_BFC1D50C == psx_brB_BFC1D50C); - psx_delay_BFC1D50C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035510u); -#endif - /* 0xBFC1D510: 8FAF0078 lw $t7, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035510u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0078u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035510u); -#endif - if (psx_delay_BFC1D50C) { - psx_delay_BFC1D50C = 0; - if (psx_taken_BFC1D50C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003561Cu); - goto label_BFC1D61C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035514u); - } -label_BFC1D514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1D514: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035514u); -#endif - /* 0xBFC1D518: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035518u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D51C: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8003551Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1D520: 1441002F bne $v0, $at, 0xBFC1D5E0 */ - uint32_t psx_brA_BFC1D520 = cpu->gpr[2]; uint32_t psx_brB_BFC1D520 = cpu->gpr[1]; - psx_taken_BFC1D520 = (psx_brA_BFC1D520 != psx_brB_BFC1D520); - psx_delay_BFC1D520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D524: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035524u); -#endif - if (psx_delay_BFC1D520) { - psx_delay_BFC1D520 = 0; - if (psx_taken_BFC1D520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800355E0u); - goto label_BFC1D5E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035528u); - } -label_BFC1D528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1D528: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035528u); -#endif - /* 0xBFC1D52C: 8D6B9E40 lw $t3, -25024($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003552Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E40u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003552Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1D534: 1160002A beq $t3, $zero, 0xBFC1D5E0 */ - uint32_t psx_brA_BFC1D534 = cpu->gpr[11]; uint32_t psx_brB_BFC1D534 = cpu->gpr[0]; - psx_taken_BFC1D534 = (psx_brA_BFC1D534 == psx_brB_BFC1D534); - psx_delay_BFC1D534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035538u); -#endif - if (psx_delay_BFC1D534) { - psx_delay_BFC1D534 = 0; - if (psx_taken_BFC1D534) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800355E0u); - goto label_BFC1D5E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003553Cu); - } -label_BFC1D53C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D53Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D53C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035540u); -#endif - /* 0xBFC1D540: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D544: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035544u); return; } g_debug_last_store_pc = 0x80035544u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80035544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D548: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035550u; /* jal link before delay slot */ - psx_delay_BFC1D548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1D54C: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003554Cu); return; } g_debug_last_store_pc = 0x8003554Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003554Cu); -#endif - if (psx_delay_BFC1D548) { - psx_delay_BFC1D548 = 0; - cpu->gpr[31] = 0x80035550u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D550: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035550u); -#endif - /* 0xBFC1D554: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035554u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80035554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D558: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D55C: 2631D0F0 addiu $s1, $s1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-12048)); - PGXP_ALU(0x2631D0F0u, cpu->gpr[17], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003555Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC1D560: 00036080 sll $t4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23000u); -#endif - /* 0xBFC1D564: 022C6821 addu $t5, $s1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[17] + cpu->gpr[12]; - PGXP_ALU(0x022C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035564u); -#endif - /* 0xBFC1D568: 8DAE0000 lw $t6, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035568u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x8DAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D56C: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D570: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D574: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D578: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2048000u); -#endif - /* 0xBFC1D57C: 024FC821 addu $t9, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024FC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003557Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035580u); -#endif - /* 0xBFC1D580: 93240000 lbu $a0, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (0)), 4, 0x2000000u); - PGXP_LOAD(0x93240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D584: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003558Cu; /* jal link before delay slot */ - psx_delay_BFC1D584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D588: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035588u); -#endif - if (psx_delay_BFC1D584) { - psx_delay_BFC1D584 = 0; - cpu->gpr[31] = 0x8003558Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003558Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D58C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003558Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035590u); -#endif - /* 0xBFC1D590: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D594: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003559Cu; /* jal link before delay slot */ - psx_delay_BFC1D594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110004u); -#endif - /* 0xBFC1D598: 0202A023 subu $s4, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[16] - cpu->gpr[2]; - PGXP_ALU(0x0202A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035598u); -#endif - if (psx_delay_BFC1D594) { - psx_delay_BFC1D594 = 0; - cpu->gpr[31] = 0x8003559Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1D59C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355A0u); -#endif - /* 0xBFC1D5A0: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800355A0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800355A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D5A4: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800355A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC1D5A8: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800355A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020100u); -#endif - /* 0xBFC1D5AC: 02384021 addu $t0, $s1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[17] + cpu->gpr[24]; - PGXP_ALU(0x02384021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800355ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355B0u); -#endif - /* 0xBFC1D5B0: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800355B0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800355B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D5B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800355B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D5B8: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800355B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1D5BC: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800355BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C00u); -#endif - /* 0xBFC1D5C0: 024A5821 addu $t3, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800355C0u); -#endif - /* 0xBFC1D5C4: 91640001 lbu $a0, 1($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (1)), 4, 0x800u); - PGXP_LOAD(0x91640001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800355C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D5C8: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800355D0u; /* jal link before delay slot */ - psx_delay_BFC1D5C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D5CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800355CCu); -#endif - if (psx_delay_BFC1D5C8) { - psx_delay_BFC1D5C8 = 0; - cpu->gpr[31] = 0x800355D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D5D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D5D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355D0u); -#endif - /* 0xBFC1D5D0: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800355D0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800355D0u); -#endif - /* 0xBFC1D5D4: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800355D4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800355D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D5D8: 1000000F beq $zero, $zero, 0xBFC1D618 */ - uint32_t psx_brA_BFC1D5D8 = cpu->gpr[0]; uint32_t psx_brB_BFC1D5D8 = cpu->gpr[0]; - psx_taken_BFC1D5D8 = (psx_brA_BFC1D5D8 == psx_brB_BFC1D5D8); - psx_delay_BFC1D5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90004u); -#endif - /* 0xBFC1D5DC: 02029823 subu $s3, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[16] - cpu->gpr[2]; - PGXP_ALU(0x02029823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800355DCu); -#endif - if (psx_delay_BFC1D5D8) { - psx_delay_BFC1D5D8 = 0; - if (psx_taken_BFC1D5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035618u); - goto label_BFC1D618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800355E0u); - } -label_BFC1D5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D5E0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800355E0u); -#endif - /* 0xBFC1D5E4: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800355E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D5E8: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800355F0u; /* jal link before delay slot */ - psx_delay_BFC1D5E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D5EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800355ECu); -#endif - if (psx_delay_BFC1D5E8) { - psx_delay_BFC1D5E8 = 0; - cpu->gpr[31] = 0x800355F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D5F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D5F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800355F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1D5F0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800355F0u); -#endif - /* 0xBFC1D5F4: 8D8C9E54 lw $t4, -25004($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800355F4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E54u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800355F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D5F8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800355F8u); -#endif - /* 0xBFC1D5FC: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800355FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D600: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035608u; /* jal link before delay slot */ - psx_delay_BFC1D600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101004u); -#endif - /* 0xBFC1D604: 004CA023 subu $s4, $v0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[20] = cpu->gpr[2] - cpu->gpr[12]; - PGXP_ALU(0x004CA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035604u); -#endif - if (psx_delay_BFC1D600) { - psx_delay_BFC1D600 = 0; - cpu->gpr[31] = 0x80035608u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1D608: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035608u); -#endif - /* 0xBFC1D60C: 8DAD9E58 lw $t5, -25000($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003560Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E58u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003560Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82004u); -#endif - /* 0xBFC1D614: 004D9823 subu $s3, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[19] = cpu->gpr[2] - cpu->gpr[13]; - PGXP_ALU(0x004D9823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035614u); -#endif -label_BFC1D618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035618u); -#endif - /* 0xBFC1D618: 8FAF0078 lw $t7, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035618u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0078u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035618u); -#endif -label_BFC1D61C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D61Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1D61C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D620: 10000092 beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1D620 = cpu->gpr[0]; uint32_t psx_brB_BFC1D620 = cpu->gpr[0]; - psx_taken_BFC1D620 = (psx_brA_BFC1D620 == psx_brB_BFC1D620); - psx_delay_BFC1D620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D624: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035624u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035624u); -#endif - if (psx_delay_BFC1D620) { - psx_delay_BFC1D620 = 0; - if (psx_taken_BFC1D620) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035628u); - } -label_BFC1D628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D628: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80035630u; /* jal link before delay slot */ - psx_delay_BFC1D628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D62C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003562Cu); -#endif - if (psx_delay_BFC1D628) { - psx_delay_BFC1D628 = 0; - cpu->gpr[31] = 0x80035630u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1D630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1D630: 10400067 beq $v0, $zero, 0xBFC1D7D0 */ - uint32_t psx_brA_BFC1D630 = cpu->gpr[2]; uint32_t psx_brB_BFC1D630 = cpu->gpr[0]; - psx_taken_BFC1D630 = (psx_brA_BFC1D630 == psx_brB_BFC1D630); - psx_delay_BFC1D630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035634u); -#endif - if (psx_delay_BFC1D630) { - psx_delay_BFC1D630 = 0; - if (psx_taken_BFC1D630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800357D0u); - goto label_BFC1D7D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035638u); - } -label_BFC1D638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D638: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80035640u; /* jal link before delay slot */ - psx_delay_BFC1D638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D63C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003563Cu); -#endif - if (psx_delay_BFC1D638) { - psx_delay_BFC1D638 = 0; - cpu->gpr[31] = 0x80035640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1D640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1D640: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035640u); -#endif - /* 0xBFC1D644: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035644u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1D648: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1D64C: AFA20074 sw $v0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003564Cu); return; } g_debug_last_store_pc = 0x8003564Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20074u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC1D650: AFB90058 sw $t9, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035650u); return; } g_debug_last_store_pc = 0x80035650u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90058u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1D654: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D658: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D65C: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80035664u; /* jal link before delay slot */ - psx_delay_BFC1D65C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1D660: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035660u); return; } g_debug_last_store_pc = 0x80035660u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035660u); -#endif - if (psx_delay_BFC1D65C) { - psx_delay_BFC1D65C = 0; - cpu->gpr[31] = 0x80035664u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1D664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1D664: 1840006D blez $v0, 0xBFC1D81C */ - uint32_t psx_brA_BFC1D664 = cpu->gpr[2]; - psx_taken_BFC1D664 = ((int32_t)psx_brA_BFC1D664 <= 0); - psx_delay_BFC1D664 = 1; - /* 0xBFC1D668: 8FA90078 lw $t1, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035668u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90078u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035668u); -#endif - if (psx_delay_BFC1D664) { - psx_delay_BFC1D664 = 0; - if (psx_taken_BFC1D664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003581Cu); - goto label_BFC1D81C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003566Cu); - } -label_BFC1D66C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D66Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003566Cu); -#endif - /* 0xBFC1D66C: 8FB80058 lw $t8, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003566Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80058u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC1D670: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035670u); return; } g_debug_last_store_pc = 0x80035670u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80035670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1D674: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1D678: 2529D0F0 addiu $t1, $t1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-12048)); - PGXP_ALU(0x2529D0F0u, cpu->gpr[9], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D67C: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003567Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1D680: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035680u); return; } g_debug_last_store_pc = 0x80035680u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80035680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1D684: 00184080 sll $t0, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00184080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20300u); -#endif - /* 0xBFC1D688: 01098821 addu $s1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[17] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01098821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC1D68C: 26529FB0 addiu $s2, $s2, -24656 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24656)); - PGXP_ALU(0x26529FB0u, cpu->gpr[18], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003568Cu); -#endif -label_BFC1D690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D690: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035690u); -#endif - /* 0xBFC1D694: 914A9E71 lbu $t2, -24975($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24975; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (-24975)), 10, 0x400u); - PGXP_LOAD(0x914A9E71u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035694u); -#endif - /* 0xBFC1D698: 8E220000 lw $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035698u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x8E220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D69C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003569Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1D6A0: 1542001E bne $t2, $v0, 0xBFC1D71C */ - uint32_t psx_brA_BFC1D6A0 = cpu->gpr[10]; uint32_t psx_brB_BFC1D6A0 = cpu->gpr[2]; - psx_taken_BFC1D6A0 = (psx_brA_BFC1D6A0 != psx_brB_BFC1D6A0); - psx_delay_BFC1D6A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1D6A4: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800356A4u); -#endif - if (psx_delay_BFC1D6A0) { - psx_delay_BFC1D6A0 = 0; - if (psx_taken_BFC1D6A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003571Cu); - goto label_BFC1D71C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800356A8u); - } -label_BFC1D6A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D6A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D6A8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800356A8u); -#endif - /* 0xBFC1D6AC: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800356ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D6B0: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800356B8u; /* jal link before delay slot */ - psx_delay_BFC1D6B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D6B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800356B4u); -#endif - if (psx_delay_BFC1D6B0) { - psx_delay_BFC1D6B0 = 0; - cpu->gpr[31] = 0x800356B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D6B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D6B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356B8u); -#endif - /* 0xBFC1D6B8: 8E2B0000 lw $t3, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800356B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000u); } - PGXP_LOAD(0x8E2B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800356B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D6BC: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D6C0: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800356C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D6C4: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43000u); -#endif - /* 0xBFC1D6C8: 024C6821 addu $t5, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356C8u); -#endif - /* 0xBFC1D6CC: 91A40000 lbu $a0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (0)), 4, 0x2000u); - PGXP_LOAD(0x91A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800356CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D6D0: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800356D8u; /* jal link before delay slot */ - psx_delay_BFC1D6D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D6D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800356D4u); -#endif - if (psx_delay_BFC1D6D0) { - psx_delay_BFC1D6D0 = 0; - cpu->gpr[31] = 0x800356D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D6D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D6D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D6D8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800356D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x114000u); -#endif - /* 0xBFC1D6DC: 02907021 addu $t6, $s4, $s0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[20] + cpu->gpr[16]; - PGXP_ALU(0x02907021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356E0u); -#endif - /* 0xBFC1D6E0: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800356E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D6E4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800356ECu; /* jal link before delay slot */ - psx_delay_BFC1D6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104004u); -#endif - /* 0xBFC1D6E8: 01C2A023 subu $s4, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C2A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356E8u); -#endif - if (psx_delay_BFC1D6E4) { - psx_delay_BFC1D6E4 = 0; - cpu->gpr[31] = 0x800356ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356ECu); -#endif - /* 0xBFC1D6EC: 8E2F0000 lw $t7, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800356ECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x8E2F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800356ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800356F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D6F0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1D6F4: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800356F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1D6F8: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3040000u); -#endif - /* 0xBFC1D6FC: 0259C021 addu $t8, $s2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[18] + cpu->gpr[25]; - PGXP_ALU(0x0259C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800356FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035700u); -#endif - /* 0xBFC1D700: 93040001 lbu $a0, 1($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (1)), 4, 0x1000000u); - PGXP_LOAD(0x93040001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D704: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003570Cu; /* jal link before delay slot */ - psx_delay_BFC1D704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D708: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035708u); -#endif - if (psx_delay_BFC1D704) { - psx_delay_BFC1D704 = 0; - cpu->gpr[31] = 0x8003570Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90100u); -#endif - /* 0xBFC1D70C: 02704021 addu $t0, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02704021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D710: 10000021 beq $zero, $zero, 0xBFC1D798 */ - uint32_t psx_brA_BFC1D710 = cpu->gpr[0]; uint32_t psx_brB_BFC1D710 = cpu->gpr[0]; - psx_taken_BFC1D710 = (psx_brA_BFC1D710 == psx_brB_BFC1D710); - psx_delay_BFC1D710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80104u); -#endif - /* 0xBFC1D714: 01029823 subu $s3, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[8] - cpu->gpr[2]; - PGXP_ALU(0x01029823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035714u); -#endif - if (psx_delay_BFC1D710) { - psx_delay_BFC1D710 = 0; - if (psx_taken_BFC1D710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035798u); - goto label_BFC1D798; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035718u); - } -label_BFC1D718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1D718: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035718u); -#endif -label_BFC1D71C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D71Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1D71C: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC1D720: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035720u); -#endif - /* 0xBFC1D724: 91440003 lbu $a0, 3($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 3; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (3)), 4, 0x400u); - PGXP_LOAD(0x91440003u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D728: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035730u; /* jal link before delay slot */ - psx_delay_BFC1D728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D72C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003572Cu); -#endif - if (psx_delay_BFC1D728) { - psx_delay_BFC1D728 = 0; - cpu->gpr[31] = 0x80035730u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035730u); -#endif - /* 0xBFC1D730: 8E2B0000 lw $t3, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035730u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000u); } - PGXP_LOAD(0x8E2B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D734: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D738: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D73C: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003573Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43000u); -#endif - /* 0xBFC1D740: 024C6821 addu $t5, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035740u); -#endif - /* 0xBFC1D744: 91A40000 lbu $a0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (0)), 4, 0x2000u); - PGXP_LOAD(0x91A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D748: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035750u; /* jal link before delay slot */ - psx_delay_BFC1D748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D74C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003574Cu); -#endif - if (psx_delay_BFC1D748) { - psx_delay_BFC1D748 = 0; - cpu->gpr[31] = 0x80035750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035750u); -#endif - /* 0xBFC1D750: 8E2F0000 lw $t7, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035750u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x8E2F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x114000u); -#endif - /* 0xBFC1D754: 02907021 addu $t6, $s4, $s0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[20] + cpu->gpr[16]; - PGXP_ALU(0x02907021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1D758: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1D75C: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003575Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3040000u); -#endif - /* 0xBFC1D760: 0259C021 addu $t8, $s2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[18] + cpu->gpr[25]; - PGXP_ALU(0x0259C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035760u); -#endif - /* 0xBFC1D764: 93040004 lbu $a0, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (4)), 4, 0x1000000u); - PGXP_LOAD(0x93040004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D768: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035770u; /* jal link before delay slot */ - psx_delay_BFC1D768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104004u); -#endif - /* 0xBFC1D76C: 01C2A023 subu $s4, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C2A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003576Cu); -#endif - if (psx_delay_BFC1D768) { - psx_delay_BFC1D768 = 0; - cpu->gpr[31] = 0x80035770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035770u); -#endif - /* 0xBFC1D770: 8E280000 lw $t0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035770u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x8E280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC1D774: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D778: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80035778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D77C: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40600u); -#endif - /* 0xBFC1D780: 02495021 addu $t2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035780u); -#endif - /* 0xBFC1D784: 91440001 lbu $a0, 1($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (1)), 4, 0x400u); - PGXP_LOAD(0x91440001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D788: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035790u; /* jal link before delay slot */ - psx_delay_BFC1D788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D78C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003578Cu); -#endif - if (psx_delay_BFC1D788) { - psx_delay_BFC1D788 = 0; - cpu->gpr[31] = 0x80035790u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90800u); -#endif - /* 0xBFC1D790: 02705821 addu $t3, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02705821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80804u); -#endif - /* 0xBFC1D794: 01629823 subu $s3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01629823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035794u); -#endif -label_BFC1D798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035798u); -#endif - /* 0xBFC1D798: 8FAC0058 lw $t4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035798u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0058u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80035798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1D79C: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003579Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1D7A0: 258D0001 addiu $t5, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); - PGXP_ALU(0x258D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800357A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D7A4: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800357ACu; /* jal link before delay slot */ - psx_delay_BFC1D7A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC1D7A8: AFAD0058 sw $t5, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357A8u); return; } g_debug_last_store_pc = 0x800357A8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0058u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800357A8u); -#endif - if (psx_delay_BFC1D7A4) { - psx_delay_BFC1D7A4 = 0; - cpu->gpr[31] = 0x800357ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1D7AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D7ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357ACu); -#endif - /* 0xBFC1D7AC: 8FAE0058 lw $t6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0058u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800357ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D7B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800357B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC1D7B4: 004E082A slt $at, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800357B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D7B8: 1020FFB5 beq $at, $zero, 0xBFC1D690 */ - uint32_t psx_brA_BFC1D7B8 = cpu->gpr[1]; uint32_t psx_brB_BFC1D7B8 = cpu->gpr[0]; - psx_taken_BFC1D7B8 = (psx_brA_BFC1D7B8 == psx_brB_BFC1D7B8); - psx_delay_BFC1D7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D7BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800357BCu); -#endif - if (psx_delay_BFC1D7B8) { - psx_delay_BFC1D7B8 = 0; - if (psx_taken_BFC1D7B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035690u); - goto label_BFC1D690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800357C0u); - } -label_BFC1D7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357C0u); -#endif - /* 0xBFC1D7C0: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357C0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800357C0u); -#endif - /* 0xBFC1D7C4: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357C4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800357C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D7C8: 10000014 beq $zero, $zero, 0xBFC1D81C */ - uint32_t psx_brA_BFC1D7C8 = cpu->gpr[0]; uint32_t psx_brB_BFC1D7C8 = cpu->gpr[0]; - psx_taken_BFC1D7C8 = (psx_brA_BFC1D7C8 == psx_brB_BFC1D7C8); - psx_delay_BFC1D7C8 = 1; - /* 0xBFC1D7CC: 8FA90078 lw $t1, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357CCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90078u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800357CCu); -#endif - if (psx_delay_BFC1D7C8) { - psx_delay_BFC1D7C8 = 0; - if (psx_taken_BFC1D7C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003581Cu); - goto label_BFC1D81C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800357D0u); - } -label_BFC1D7D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D7D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D7D0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800357D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D7D4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800357D4u); -#endif - /* 0xBFC1D7D8: 93399E70 lbu $t9, -24976($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24976; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-24976)), 25, 0x2000000u); - PGXP_LOAD(0x93399E70u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800357D8u); -#endif - /* 0xBFC1D7DC: 91EF9E71 lbu $t7, -24975($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24975; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-24975)), 15, 0x8000u); - PGXP_LOAD(0x91EF9E71u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800357DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1D7E0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800357E0u); -#endif - /* 0xBFC1D7E4: 8CA59EAC lw $a1, -24916($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357E4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800357E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D7E8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800357E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC1D7EC: 01F9C023 subu $t8, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[15] - cpu->gpr[25]; - PGXP_ALU(0x01F9C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800357ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800357F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1D7F0: 27080001 addiu $t0, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800357F0u); -#endif - /* 0xBFC1D7F4: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800357F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC1D7F8: AFA80074 sw $t0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800357F8u); return; } g_debug_last_store_pc = 0x800357F8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80074u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800357F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D7FC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035804u; /* jal link before delay slot */ - psx_delay_BFC1D7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1D800: AFA50070 sw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035800u); return; } g_debug_last_store_pc = 0x80035800u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035800u); -#endif - if (psx_delay_BFC1D7FC) { - psx_delay_BFC1D7FC = 0; - cpu->gpr[31] = 0x80035804u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1D804: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035804u); -#endif - /* 0xBFC1D808: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D80C: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80035814u; /* jal link before delay slot */ - psx_delay_BFC1D80C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100005u); -#endif - /* 0xBFC1D810: 0040A021 addu $s4, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035810u); -#endif - if (psx_delay_BFC1D80C) { - psx_delay_BFC1D80C = 0; - cpu->gpr[31] = 0x80035814u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1D814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC1D814: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035814u); -#endif - /* 0xBFC1D818: 8FA90078 lw $t1, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035818u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90078u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035818u); -#endif -label_BFC1D81C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D81Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003581Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D81C: 10000013 beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1D81C = cpu->gpr[0]; uint32_t psx_brB_BFC1D81C = cpu->gpr[0]; - psx_taken_BFC1D81C = (psx_brA_BFC1D81C == psx_brB_BFC1D81C); - psx_delay_BFC1D81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1D820: A1200000 sb $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035820u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035820u); -#endif - if (psx_delay_BFC1D81C) { - psx_delay_BFC1D81C = 0; - if (psx_taken_BFC1D81C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035824u); - } -label_BFC1D824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D824: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1D828: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035828u); -#endif - /* 0xBFC1D82C: 8D4A9E68 lw $t2, -24984($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003582Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E68u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003582Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035830u); -#endif - /* 0xBFC1D830: 8D6B9EAC lw $t3, -24916($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035830u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9EACu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035830u); -#endif - /* 0xBFC1D834: 8FAC0078 lw $t4, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035834u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0078u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80035834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC1D838: AFAA0074 sw $t2, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035838u); return; } g_debug_last_store_pc = 0x80035838u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0074u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC1D83C: AFAB0070 sw $t3, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003583Cu); return; } g_debug_last_store_pc = 0x8003583Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0070u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003583Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D840: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC1D844: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D848: 10000008 beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1D848 = cpu->gpr[0]; uint32_t psx_brB_BFC1D848 = cpu->gpr[0]; - psx_taken_BFC1D848 = (psx_brA_BFC1D848 == psx_brB_BFC1D848); - psx_delay_BFC1D848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1D84C: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003584Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003584Cu); -#endif - if (psx_delay_BFC1D848) { - psx_delay_BFC1D848 = 0; - if (psx_taken_BFC1D848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035850u); - } -label_BFC1D850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035850u); -#endif - /* 0xBFC1D850: 8FAD0078 lw $t5, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035850u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0078u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D854: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1D858: A1A00000 sb $zero, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035858u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035858u); -#endif - /* 0xBFC1D85C: 8FB4006C lw $s4, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003585Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4006Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003585Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035860u); -#endif - /* 0xBFC1D860: 8FB30068 lw $s3, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035860u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30068u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80035860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D864: 10000001 beq $zero, $zero, 0xBFC1D86C */ - uint32_t psx_brA_BFC1D864 = cpu->gpr[0]; uint32_t psx_brB_BFC1D864 = cpu->gpr[0]; - psx_taken_BFC1D864 = (psx_brA_BFC1D864 == psx_brB_BFC1D864); - psx_delay_BFC1D864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035868u); -#endif - if (psx_delay_BFC1D864) { - psx_delay_BFC1D864 = 0; - if (psx_taken_BFC1D864) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - goto label_BFC1D86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003586Cu); - } -label_BFC1D86C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D86Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003586Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1D86C: 0661000E bgez $s3, 0xBFC1D8A8 */ - uint32_t psx_brA_BFC1D86C = cpu->gpr[19]; - psx_taken_BFC1D86C = ((int32_t)psx_brA_BFC1D86C >= 0); - psx_delay_BFC1D86C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC1D870: 2A61003C slti $at, $s3, 60 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0); - PGXP_ALU(0x2A61003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80035870u); -#endif - if (psx_delay_BFC1D86C) { - psx_delay_BFC1D86C = 0; - if (psx_taken_BFC1D86C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358A8u); - goto label_BFC1D8A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035874u); - } -label_BFC1D874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D874: 0C016A6C jal 0xB005A9B0 */ - cpu->gpr[31] = 0x8003587Cu; /* jal link before delay slot */ - psx_delay_BFC1D874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC1D878: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035878u); -#endif - if (psx_delay_BFC1D874) { - psx_delay_BFC1D874 = 0; - cpu->gpr[31] = 0x8003587Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9B0u); - cpu->pc = 0x8005A9B0u; return; - } -label_BFC1D87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1D87C: 244E003C addiu $t6, $v0, 60 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (60)); - PGXP_ALU(0x244E003Cu, cpu->gpr[14], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D880: 2401003C addiu $at, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2401003Cu, cpu->gpr[1], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80035880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1D884: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80035884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D888: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC1D88C: 028FA023 subu $s4, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[20] - cpu->gpr[15]; - PGXP_ALU(0x028FA023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003588Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D890: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC1D894: 0261001A div $s3, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[19]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0261001Au, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80035894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1D898: 00009810 mfhi $s3 */ - cpu->gpr[19] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009810u, cpu->gpr[19], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1D89C: 2673003C addiu $s3, $s3, 60 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (60)); - PGXP_ALU(0x2673003Cu, cpu->gpr[19], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D8A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800358A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC1D8A4: 2A61003C slti $at, $s3, 60 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (60) ? 1 : 0); - PGXP_ALU(0x2A61003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800358A4u); -#endif -label_BFC1D8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D8A8: 14200006 bne $at, $zero, 0xBFC1D8C4 */ - uint32_t psx_brA_BFC1D8A8 = cpu->gpr[1]; uint32_t psx_brB_BFC1D8A8 = cpu->gpr[0]; - psx_taken_BFC1D8A8 = (psx_brA_BFC1D8A8 != psx_brB_BFC1D8A8); - psx_delay_BFC1D8A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D8AC: 2401003C addiu $at, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2401003Cu, cpu->gpr[1], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800358ACu); -#endif - if (psx_delay_BFC1D8A8) { - psx_delay_BFC1D8A8 = 0; - if (psx_taken_BFC1D8A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358C4u); - goto label_BFC1D8C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358B0u); - } -label_BFC1D8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC1D8B0: 0261001A div $s3, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[19]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0261001Au, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800358B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D8B4: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800358B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC1D8B8: 00009810 mfhi $s3 */ - cpu->gpr[19] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009810u, cpu->gpr[19], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800358B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC1D8BC: 0299A021 addu $s4, $s4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[25]; - PGXP_ALU(0x0299A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800358BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D8C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800358C0u); -#endif -label_BFC1D8C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC1D8C4: 06810003 bgez $s4, 0xBFC1D8D4 */ - uint32_t psx_brA_BFC1D8C4 = cpu->gpr[20]; - psx_taken_BFC1D8C4 = ((int32_t)psx_brA_BFC1D8C4 >= 0); - psx_delay_BFC1D8C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC1D8C8: 2A810064 slti $at, $s4, 100 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0); - PGXP_ALU(0x2A810064u, cpu->gpr[1], _pgx1, 0x0064u); } -#ifdef PSX_COSIM - cosim_instr(0x800358C8u); -#endif - if (psx_delay_BFC1D8C4) { - psx_delay_BFC1D8C4 = 0; - if (psx_taken_BFC1D8C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358D4u); - goto label_BFC1D8D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358CCu); - } -label_BFC1D8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC1D8CC: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800358CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC1D8D0: 2A810064 slti $at, $s4, 100 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (100) ? 1 : 0); - PGXP_ALU(0x2A810064u, cpu->gpr[1], _pgx1, 0x0064u); } -#ifdef PSX_COSIM - cosim_instr(0x800358D0u); -#endif -label_BFC1D8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D8D4: 14200005 bne $at, $zero, 0xBFC1D8EC */ - uint32_t psx_brA_BFC1D8D4 = cpu->gpr[1]; uint32_t psx_brB_BFC1D8D4 = cpu->gpr[0]; - psx_taken_BFC1D8D4 = (psx_brA_BFC1D8D4 != psx_brB_BFC1D8D4); - psx_delay_BFC1D8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D8D8: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800358D8u); -#endif - if (psx_delay_BFC1D8D4) { - psx_delay_BFC1D8D4 = 0; - if (psx_taken_BFC1D8D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358ECu); - goto label_BFC1D8EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800358DCu); - } -label_BFC1D8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC1D8DC: 0281001A div $s4, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[20]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0281001Au, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800358DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC1D8E0: 0000A010 mfhi $s4 */ - cpu->gpr[20] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A010u, cpu->gpr[20], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800358E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D8E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800358E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D8E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800358E8u); -#endif -label_BFC1D8EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D8ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358ECu); -#endif - /* 0xBFC1D8EC: 8FB80074 lw $t8, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800358ECu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80074u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800358ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800358F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D8F0: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800358F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1D8F4: 0301001A div $t8, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[24]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0301001Au, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800358F4u); -#endif - /* 0xBFC1D8F8: 8FAC0078 lw $t4, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800358F8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0078u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800358F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1D8FC: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800358FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D900: 00005010 mfhi $t2 */ - cpu->gpr[10] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005010u, cpu->gpr[10], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1D904: 00084900 sll $t1, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80035904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC1D908: 012A5825 or $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A5825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D90C: A18B0001 sb $t3, 1($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003590Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (1)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0001u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003590Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035910u); -#endif - /* 0xBFC1D910: 8FAD0070 lw $t5, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035910u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0070u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1D918: 01A1001A div $t5, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A1001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80035918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1D91C: 0000C810 mfhi $t9 */ - cpu->gpr[25] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C810u, cpu->gpr[25], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1D920: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1D924: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80035924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC1D928: 01F94025 or $t0, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[15] | cpu->gpr[25]; - PGXP_ALU(0x01F94025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC1D92C: 0281001A div $s4, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[20]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0281001Au, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC1D930: A1880002 sb $t0, 2($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035930u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (2)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1880002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1D934: 00005010 mfhi $t2 */ - cpu->gpr[10] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005010u, cpu->gpr[10], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1D938: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC1D93C: 00184900 sll $t1, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[9] = cpu->gpr[24] << 4u; - PGXP_ALU(0x00184900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC1D940: 012A5825 or $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A5825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC1D944: 0261001A div $s3, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[19]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0261001Au, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80035944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1D948: A18B0003 sb $t3, 3($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035948u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (3)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0003u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1D94C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1D950: 000E6900 sll $t5, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[13] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80035950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1D954: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200A000u); -#endif - /* 0xBFC1D958: 01AFC825 or $t9, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[13] | cpu->gpr[15]; - PGXP_ALU(0x01AFC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC1D95C: A1990004 sb $t9, 4($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003595Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (4)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1990004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003595Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035960u); -#endif - /* 0xBFC1D960: 8FB40044 lw $s4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035960u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40044u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80035960u); -#endif - /* 0xBFC1D964: 8FB30048 lw $s3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035964u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30048u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80035964u); -#endif - /* 0xBFC1D968: 8FB0004C lw $s0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035968u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0004Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80035968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D96C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003596Cu); -#endif -label_BFC1D970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035970u); -#endif - /* 0xBFC1D970: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035970u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1D974: 27BD0078 addiu $sp, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27BD0078u, cpu->gpr[29], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80035974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1D978: 03E00008 jr $ra */ - psx_delay_BFC1D978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D97C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003597Cu); -#endif - if (psx_delay_BFC1D978) { - psx_delay_BFC1D978 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1D980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1D980u); - int psx_delay_BFC1D9BC = 0; -label_BFC1D980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1D980: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D984: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1D988: AC2E9DF8 sw $t6, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035988u); return; } g_debug_last_store_pc = 0x80035988u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9DF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D98C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003598Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1D990: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1D994: AC2F9DF4 sw $t7, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035994u); return; } g_debug_last_store_pc = 0x80035994u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9DF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D998: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D99C: AC209DFC sw $zero, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003599Cu); return; } g_debug_last_store_pc = 0x8003599Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9A0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9A4: AC209E00 sw $zero, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359A4u); return; } g_debug_last_store_pc = 0x800359A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E00u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9AC: AC209E38 sw $zero, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359ACu); return; } g_debug_last_store_pc = 0x800359ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E38u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9B0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9B4: AC209E18 sw $zero, -25064($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25064; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25064)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359B4u); return; } g_debug_last_store_pc = 0x800359B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E18u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1D9BC: 03E00008 jr $ra */ - psx_delay_BFC1D9BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9C0: AC209EC0 sw $zero, -24896($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359C0u); return; } g_debug_last_store_pc = 0x800359C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359C0u); -#endif - if (psx_delay_BFC1D9BC) { - psx_delay_BFC1D9BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1D9C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1D9C4u); - int psx_delay_BFC1D9F0 = 0; - int psx_delay_BFC1D9F8 = 0; - int psx_taken_BFC1D9F8 = 0; - int psx_delay_BFC1DA00 = 0; - int psx_delay_BFC1DA08 = 0; - int psx_delay_BFC1DA10 = 0; - int psx_taken_BFC1DA10 = 0; - int psx_delay_BFC1DA28 = 0; - int psx_taken_BFC1DA28 = 0; - int psx_delay_BFC1DA30 = 0; - int psx_delay_BFC1DA38 = 0; - int psx_delay_BFC1DA58 = 0; - int psx_delay_BFC1DA60 = 0; - int psx_taken_BFC1DA60 = 0; - int psx_delay_BFC1DA68 = 0; - int psx_delay_BFC1DA70 = 0; - int psx_taken_BFC1DA70 = 0; - int psx_delay_BFC1DA88 = 0; - int psx_taken_BFC1DA88 = 0; - int psx_delay_BFC1DA90 = 0; - int psx_delay_BFC1DA98 = 0; - int psx_taken_BFC1DA98 = 0; - int psx_delay_BFC1DAA4 = 0; - int psx_taken_BFC1DAA4 = 0; - int psx_delay_BFC1DABC = 0; - int psx_taken_BFC1DABC = 0; - int psx_delay_BFC1DAD0 = 0; - int psx_taken_BFC1DAD0 = 0; - int psx_delay_BFC1DAEC = 0; - int psx_delay_BFC1DAF4 = 0; - int psx_taken_BFC1DAF4 = 0; - int psx_delay_BFC1DAFC = 0; - int psx_delay_BFC1DB04 = 0; - int psx_taken_BFC1DB04 = 0; - int psx_delay_BFC1DB18 = 0; - int psx_taken_BFC1DB18 = 0; - int psx_delay_BFC1DB28 = 0; - int psx_taken_BFC1DB28 = 0; - int psx_delay_BFC1DB40 = 0; - int psx_taken_BFC1DB40 = 0; - int psx_delay_BFC1DB58 = 0; - int psx_taken_BFC1DB58 = 0; - int psx_delay_BFC1DB6C = 0; - int psx_taken_BFC1DB6C = 0; - int psx_delay_BFC1DB88 = 0; - int psx_taken_BFC1DB88 = 0; - int psx_delay_BFC1DB94 = 0; - int psx_taken_BFC1DB94 = 0; - int psx_delay_BFC1DBA4 = 0; - int psx_taken_BFC1DBA4 = 0; - int psx_delay_BFC1DBB0 = 0; - int psx_taken_BFC1DBB0 = 0; - int psx_delay_BFC1DBC8 = 0; - int psx_taken_BFC1DBC8 = 0; - int psx_delay_BFC1DBEC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1D9F8u: goto label_BFC1D9F8; - case 0xBFC1DA00u: goto label_BFC1DA00; - case 0xBFC1DA08u: goto label_BFC1DA08; - case 0xBFC1DA10u: goto label_BFC1DA10; - case 0xBFC1DA18u: goto label_BFC1DA18; - case 0xBFC1DA30u: goto label_BFC1DA30; - case 0xBFC1DA38u: goto label_BFC1DA38; - case 0xBFC1DA40u: goto label_BFC1DA40; - case 0xBFC1DA60u: goto label_BFC1DA60; - case 0xBFC1DA68u: goto label_BFC1DA68; - case 0xBFC1DA70u: goto label_BFC1DA70; - case 0xBFC1DA78u: goto label_BFC1DA78; - case 0xBFC1DA90u: goto label_BFC1DA90; - case 0xBFC1DA98u: goto label_BFC1DA98; - case 0xBFC1DAA0u: goto label_BFC1DAA0; - case 0xBFC1DAACu: goto label_BFC1DAAC; - case 0xBFC1DAB4u: goto label_BFC1DAB4; - case 0xBFC1DAB8u: goto label_BFC1DAB8; - case 0xBFC1DAC4u: goto label_BFC1DAC4; - case 0xBFC1DAD8u: goto label_BFC1DAD8; - case 0xBFC1DAF4u: goto label_BFC1DAF4; - case 0xBFC1DAFCu: goto label_BFC1DAFC; - case 0xBFC1DB04u: goto label_BFC1DB04; - case 0xBFC1DB0Cu: goto label_BFC1DB0C; - case 0xBFC1DB20u: goto label_BFC1DB20; - case 0xBFC1DB30u: goto label_BFC1DB30; - case 0xBFC1DB48u: goto label_BFC1DB48; - case 0xBFC1DB60u: goto label_BFC1DB60; - case 0xBFC1DB74u: goto label_BFC1DB74; - case 0xBFC1DB78u: goto label_BFC1DB78; - case 0xBFC1DB90u: goto label_BFC1DB90; - case 0xBFC1DB9Cu: goto label_BFC1DB9C; - case 0xBFC1DBACu: goto label_BFC1DBAC; - case 0xBFC1DBB0u: goto label_BFC1DBB0; - case 0xBFC1DBB8u: goto label_BFC1DBB8; - case 0xBFC1DBC4u: goto label_BFC1DBC4; - case 0xBFC1DBD0u: goto label_BFC1DBD0; - case 0xBFC1DBE0u: goto label_BFC1DBE0; - case 0xBFC1DBE4u: goto label_BFC1DBE4; - default: break; - } - } -label_BFC1D9C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D9C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9C8: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359C8u); return; } g_debug_last_store_pc = 0x800359C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1D9CC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800359CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9D0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1D9D4: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359D4u); return; } g_debug_last_store_pc = 0x800359D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800359D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1D9D8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359D8u); return; } g_debug_last_store_pc = 0x800359D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800359D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1D9DC: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359DCu); return; } g_debug_last_store_pc = 0x800359DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800359DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1D9E0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800359E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1D9E4: 240E0005 addiu $t6, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x240E0005u, cpu->gpr[14], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800359E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1D9E8: AC2E6944 sw $t6, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800359E8u); return; } g_debug_last_store_pc = 0x800359E8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6944u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800359E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1D9EC: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x800359ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1D9F0: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x800359F8u; /* jal link before delay slot */ - psx_delay_BFC1D9F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1D9F4: 24050006 addiu $a1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24050006u, cpu->gpr[5], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x800359F4u); -#endif - if (psx_delay_BFC1D9F0) { - psx_delay_BFC1D9F0 = 0; - cpu->gpr[31] = 0x800359F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1D9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1D9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1D9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800359F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1D9F8: 14400007 bne $v0, $zero, 0xBFC1DA18 */ - uint32_t psx_brA_BFC1D9F8 = cpu->gpr[2]; uint32_t psx_brB_BFC1D9F8 = cpu->gpr[0]; - psx_taken_BFC1D9F8 = (psx_brA_BFC1D9F8 != psx_brB_BFC1D9F8); - psx_delay_BFC1D9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1D9FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800359FCu); -#endif - if (psx_delay_BFC1D9F8) { - psx_delay_BFC1D9F8 = 0; - if (psx_taken_BFC1D9F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A18u); - goto label_BFC1DA18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A00u); - } -label_BFC1DA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA00: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80035A08u; /* jal link before delay slot */ - psx_delay_BFC1DA00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A04u); -#endif - if (psx_delay_BFC1DA00) { - psx_delay_BFC1DA00 = 0; - cpu->gpr[31] = 0x80035A08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1DA08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA08: 0C00D2BC jal 0xB0034AF0 */ - cpu->gpr[31] = 0x80035A10u; /* jal link before delay slot */ - psx_delay_BFC1DA08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A0Cu); -#endif - if (psx_delay_BFC1DA08) { - psx_delay_BFC1DA08 = 0; - cpu->gpr[31] = 0x80035A10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AF0u); - cpu->pc = 0x80034AF0u; return; - } -label_BFC1DA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA10: 10000074 beq $zero, $zero, 0xBFC1DBE4 */ - uint32_t psx_brA_BFC1DA10 = cpu->gpr[0]; uint32_t psx_brB_BFC1DA10 = cpu->gpr[0]; - psx_taken_BFC1DA10 = (psx_brA_BFC1DA10 == psx_brB_BFC1DA10); - psx_delay_BFC1DA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DA14: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035A14u); -#endif - if (psx_delay_BFC1DA10) { - psx_delay_BFC1DA10 = 0; - if (psx_taken_BFC1DA10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE4u); - goto label_BFC1DBE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A18u); - } -label_BFC1DA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1DA18: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035A18u); -#endif - /* 0xBFC1DA1C: 91EF9EB4 lbu $t7, -24908($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24908; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-24908)), 15, 0x8000u); - PGXP_LOAD(0x91EF9EB4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1DA24: 31F80010 andi $t8, $t7, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x10u; - PGXP_ALU(0x31F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80035A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1DA28: 13000020 beq $t8, $zero, 0xBFC1DAAC */ - uint32_t psx_brA_BFC1DA28 = cpu->gpr[24]; uint32_t psx_brB_BFC1DA28 = cpu->gpr[0]; - psx_taken_BFC1DA28 = (psx_brA_BFC1DA28 == psx_brB_BFC1DA28); - psx_delay_BFC1DA28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A2Cu); -#endif - if (psx_delay_BFC1DA28) { - psx_delay_BFC1DA28 = 0; - if (psx_taken_BFC1DA28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AACu); - goto label_BFC1DAAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A30u); - } -label_BFC1DA30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA30: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80035A38u; /* jal link before delay slot */ - psx_delay_BFC1DA30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A34u); -#endif - if (psx_delay_BFC1DA30) { - psx_delay_BFC1DA30 = 0; - cpu->gpr[31] = 0x80035A38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1DA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA38: 0C00D2BC jal 0xB0034AF0 */ - cpu->gpr[31] = 0x80035A40u; /* jal link before delay slot */ - psx_delay_BFC1DA38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A3Cu); -#endif - if (psx_delay_BFC1DA38) { - psx_delay_BFC1DA38 = 0; - cpu->gpr[31] = 0x80035A40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AF0u); - cpu->pc = 0x80034AF0u; return; - } -label_BFC1DA40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DA40: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DA44: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035A44u); return; } g_debug_last_store_pc = 0x80035A44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DA48: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1DA4C: 24190005 addiu $t9, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24190005u, cpu->gpr[25], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80035A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1DA50: AC396944 sw $t9, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035A50u); return; } g_debug_last_store_pc = 0x80035A50u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396944u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DA54: 24040037 addiu $a0, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x24040037u, cpu->gpr[4], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x80035A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA58: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x80035A60u; /* jal link before delay slot */ - psx_delay_BFC1DA58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DA5C: 24050006 addiu $a1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24050006u, cpu->gpr[5], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80035A5Cu); -#endif - if (psx_delay_BFC1DA58) { - psx_delay_BFC1DA58 = 0; - cpu->gpr[31] = 0x80035A60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1DA60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DA60: 14400005 bne $v0, $zero, 0xBFC1DA78 */ - uint32_t psx_brA_BFC1DA60 = cpu->gpr[2]; uint32_t psx_brB_BFC1DA60 = cpu->gpr[0]; - psx_taken_BFC1DA60 = (psx_brA_BFC1DA60 != psx_brB_BFC1DA60); - psx_delay_BFC1DA60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A64u); -#endif - if (psx_delay_BFC1DA60) { - psx_delay_BFC1DA60 = 0; - if (psx_taken_BFC1DA60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A78u); - goto label_BFC1DA78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A68u); - } -label_BFC1DA68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA68: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80035A70u; /* jal link before delay slot */ - psx_delay_BFC1DA68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A6Cu); -#endif - if (psx_delay_BFC1DA68) { - psx_delay_BFC1DA68 = 0; - cpu->gpr[31] = 0x80035A70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1DA70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA70: 1000005C beq $zero, $zero, 0xBFC1DBE4 */ - uint32_t psx_brA_BFC1DA70 = cpu->gpr[0]; uint32_t psx_brB_BFC1DA70 = cpu->gpr[0]; - psx_taken_BFC1DA70 = (psx_brA_BFC1DA70 == psx_brB_BFC1DA70); - psx_delay_BFC1DA70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DA74: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035A74u); -#endif - if (psx_delay_BFC1DA70) { - psx_delay_BFC1DA70 = 0; - if (psx_taken_BFC1DA70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE4u); - goto label_BFC1DBE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A78u); - } -label_BFC1DA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1DA78: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035A78u); -#endif - /* 0xBFC1DA7C: 91089EB4 lbu $t0, -24908($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24908; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24908)), 8, 0x100u); - PGXP_LOAD(0x91089EB4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1DA84: 31090010 andi $t1, $t0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x10u; - PGXP_ALU(0x31090010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80035A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1DA88: 11200005 beq $t1, $zero, 0xBFC1DAA0 */ - uint32_t psx_brA_BFC1DA88 = cpu->gpr[9]; uint32_t psx_brB_BFC1DA88 = cpu->gpr[0]; - psx_taken_BFC1DA88 = (psx_brA_BFC1DA88 == psx_brB_BFC1DA88); - psx_delay_BFC1DA88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A8Cu); -#endif - if (psx_delay_BFC1DA88) { - psx_delay_BFC1DA88 = 0; - if (psx_taken_BFC1DA88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AA0u); - goto label_BFC1DAA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035A90u); - } -label_BFC1DA90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DA90: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80035A98u; /* jal link before delay slot */ - psx_delay_BFC1DA90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035A94u); -#endif - if (psx_delay_BFC1DA90) { - psx_delay_BFC1DA90 = 0; - cpu->gpr[31] = 0x80035A98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1DA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DA98: 10000007 beq $zero, $zero, 0xBFC1DAB8 */ - uint32_t psx_brA_BFC1DA98 = cpu->gpr[0]; uint32_t psx_brB_BFC1DA98 = cpu->gpr[0]; - psx_taken_BFC1DA98 = (psx_brA_BFC1DA98 == psx_brB_BFC1DA98); - psx_delay_BFC1DA98 = 1; - /* 0xBFC1DA9C: 8FAA0020 lw $t2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035A9Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0020u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035A9Cu); -#endif - if (psx_delay_BFC1DA98) { - psx_delay_BFC1DA98 = 0; - if (psx_taken_BFC1DA98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AB8u); - goto label_BFC1DAB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AA0u); - } -label_BFC1DAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DAA0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DAA4: 10000003 beq $zero, $zero, 0xBFC1DAB4 */ - uint32_t psx_brA_BFC1DAA4 = cpu->gpr[0]; uint32_t psx_brB_BFC1DAA4 = cpu->gpr[0]; - psx_taken_BFC1DAA4 = (psx_brA_BFC1DAA4 == psx_brB_BFC1DAA4); - psx_delay_BFC1DAA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DAA8: AC209DF8 sw $zero, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AA8u); return; } g_debug_last_store_pc = 0x80035AA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AA8u); -#endif - if (psx_delay_BFC1DAA4) { - psx_delay_BFC1DAA4 = 0; - if (psx_taken_BFC1DAA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AB4u); - goto label_BFC1DAB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AACu); - } -label_BFC1DAAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DAAC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DAB0: AC209DF8 sw $zero, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AB0u); return; } g_debug_last_store_pc = 0x80035AB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AB0u); -#endif -label_BFC1DAB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AB4u); -#endif - /* 0xBFC1DAB4: 8FAA0020 lw $t2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AB4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0020u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AB4u); -#endif -label_BFC1DAB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DAB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1DABC: 11400049 beq $t2, $zero, 0xBFC1DBE4 */ - uint32_t psx_brA_BFC1DABC = cpu->gpr[10]; uint32_t psx_brB_BFC1DABC = cpu->gpr[0]; - psx_taken_BFC1DABC = (psx_brA_BFC1DABC == psx_brB_BFC1DABC); - psx_delay_BFC1DABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DAC0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035AC0u); -#endif - if (psx_delay_BFC1DABC) { - psx_delay_BFC1DABC = 0; - if (psx_taken_BFC1DABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE4u); - goto label_BFC1DBE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AC4u); - } -label_BFC1DAC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1DAC4: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035AC4u); -#endif - /* 0xBFC1DAC8: 8D6B9DF8 lw $t3, -25096($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AC8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9DF8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1DAD0: 15600043 bne $t3, $zero, 0xBFC1DBE0 */ - uint32_t psx_brA_BFC1DAD0 = cpu->gpr[11]; uint32_t psx_brB_BFC1DAD0 = cpu->gpr[0]; - psx_taken_BFC1DAD0 = (psx_brA_BFC1DAD0 != psx_brB_BFC1DAD0); - psx_delay_BFC1DAD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DAD4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035AD4u); -#endif - if (psx_delay_BFC1DAD0) { - psx_delay_BFC1DAD0 = 0; - if (psx_taken_BFC1DAD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE0u); - goto label_BFC1DBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AD8u); - } -label_BFC1DAD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DAD8: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AD8u); return; } g_debug_last_store_pc = 0x80035AD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DADC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1DAE0: 240C0016 addiu $t4, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x240C0016u, cpu->gpr[12], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80035AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1DAE4: AC2C6944 sw $t4, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035AE4u); return; } g_debug_last_store_pc = 0x80035AE4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6944u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80035AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DAE8: 24040038 addiu $a0, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24040038u, cpu->gpr[4], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80035AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DAEC: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x80035AF4u; /* jal link before delay slot */ - psx_delay_BFC1DAEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DAF0: 240502D0 addiu $a1, $zero, 720 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (720)); - PGXP_ALU(0x240502D0u, cpu->gpr[5], _pgx1, 0x000002D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035AF0u); -#endif - if (psx_delay_BFC1DAEC) { - psx_delay_BFC1DAEC = 0; - cpu->gpr[31] = 0x80035AF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1DAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DAF4: 14400005 bne $v0, $zero, 0xBFC1DB0C */ - uint32_t psx_brA_BFC1DAF4 = cpu->gpr[2]; uint32_t psx_brB_BFC1DAF4 = cpu->gpr[0]; - psx_taken_BFC1DAF4 = (psx_brA_BFC1DAF4 != psx_brB_BFC1DAF4); - psx_delay_BFC1DAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DAF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035AF8u); -#endif - if (psx_delay_BFC1DAF4) { - psx_delay_BFC1DAF4 = 0; - if (psx_taken_BFC1DAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B0Cu); - goto label_BFC1DB0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035AFCu); - } -label_BFC1DAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DAFC: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80035B04u; /* jal link before delay slot */ - psx_delay_BFC1DAFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B00u); -#endif - if (psx_delay_BFC1DAFC) { - psx_delay_BFC1DAFC = 0; - cpu->gpr[31] = 0x80035B04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1DB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB04: 10000037 beq $zero, $zero, 0xBFC1DBE4 */ - uint32_t psx_brA_BFC1DB04 = cpu->gpr[0]; uint32_t psx_brB_BFC1DB04 = cpu->gpr[0]; - psx_taken_BFC1DB04 = (psx_brA_BFC1DB04 == psx_brB_BFC1DB04); - psx_delay_BFC1DB04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DB08: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035B08u); -#endif - if (psx_delay_BFC1DB04) { - psx_delay_BFC1DB04 = 0; - if (psx_taken_BFC1DB04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE4u); - goto label_BFC1DBE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B0Cu); - } -label_BFC1DB0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1DB0C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B10u); -#endif - /* 0xBFC1DB10: 8DAD9EB0 lw $t5, -24912($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035B10u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9EB0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1DB18: 11A00005 beq $t5, $zero, 0xBFC1DB30 */ - uint32_t psx_brA_BFC1DB18 = cpu->gpr[13]; uint32_t psx_brB_BFC1DB18 = cpu->gpr[0]; - psx_taken_BFC1DB18 = (psx_brA_BFC1DB18 == psx_brB_BFC1DB18); - psx_delay_BFC1DB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B1Cu); -#endif - if (psx_delay_BFC1DB18) { - psx_delay_BFC1DB18 = 0; - if (psx_taken_BFC1DB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B30u); - goto label_BFC1DB30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B20u); - } -label_BFC1DB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DB20: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B20u); -#endif - /* 0xBFC1DB24: 9042A101 lbu $v0, -24319($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24319; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24319)), 2, 0x4u); - PGXP_LOAD(0x9042A101u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB28: 1000000D beq $zero, $zero, 0xBFC1DB60 */ - uint32_t psx_brA_BFC1DB28 = cpu->gpr[0]; uint32_t psx_brB_BFC1DB28 = cpu->gpr[0]; - psx_taken_BFC1DB28 = (psx_brA_BFC1DB28 == psx_brB_BFC1DB28); - psx_delay_BFC1DB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B2Cu); -#endif - if (psx_delay_BFC1DB28) { - psx_delay_BFC1DB28 = 0; - if (psx_taken_BFC1DB28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B60u); - goto label_BFC1DB60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B30u); - } -label_BFC1DB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DB30: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B30u); -#endif - /* 0xBFC1DB34: 9042A101 lbu $v0, -24319($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24319; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24319)), 2, 0x4u); - PGXP_LOAD(0x9042A101u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1DB3C: 304E0080 andi $t6, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304E0080u, cpu->gpr[14], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1DB40: 15C00007 bne $t6, $zero, 0xBFC1DB60 */ - uint32_t psx_brA_BFC1DB40 = cpu->gpr[14]; uint32_t psx_brB_BFC1DB40 = cpu->gpr[0]; - psx_taken_BFC1DB40 = (psx_brA_BFC1DB40 != psx_brB_BFC1DB40); - psx_delay_BFC1DB40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B44u); -#endif - if (psx_delay_BFC1DB40) { - psx_delay_BFC1DB40 = 0; - if (psx_taken_BFC1DB40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B60u); - goto label_BFC1DB60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B48u); - } -label_BFC1DB48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1DB48: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DB4C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1DB50: AC2F9DFC sw $t7, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035B50u); return; } g_debug_last_store_pc = 0x80035B50u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9DFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DB54: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB58: 10000007 beq $zero, $zero, 0xBFC1DB78 */ - uint32_t psx_brA_BFC1DB58 = cpu->gpr[0]; uint32_t psx_brB_BFC1DB58 = cpu->gpr[0]; - psx_taken_BFC1DB58 = (psx_brA_BFC1DB58 == psx_brB_BFC1DB58); - psx_delay_BFC1DB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DB5C: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035B5Cu); return; } g_debug_last_store_pc = 0x80035B5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B5Cu); -#endif - if (psx_delay_BFC1DB58) { - psx_delay_BFC1DB58 = 0; - if (psx_taken_BFC1DB58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B78u); - goto label_BFC1DB78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B60u); - } -label_BFC1DB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1DB60: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B60u); -#endif - /* 0xBFC1DB64: 8F189EB0 lw $t8, -24912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035B64u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189EB0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1DB6C: 13000002 beq $t8, $zero, 0xBFC1DB78 */ - uint32_t psx_brA_BFC1DB6C = cpu->gpr[24]; uint32_t psx_brB_BFC1DB6C = cpu->gpr[0]; - psx_taken_BFC1DB6C = (psx_brA_BFC1DB6C == psx_brB_BFC1DB6C); - psx_delay_BFC1DB6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DB70: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B70u); -#endif - if (psx_delay_BFC1DB6C) { - psx_delay_BFC1DB6C = 0; - if (psx_taken_BFC1DB6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B78u); - goto label_BFC1DB78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B74u); - } -label_BFC1DB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DB74: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035B74u); return; } g_debug_last_store_pc = 0x80035B74u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B74u); -#endif -label_BFC1DB78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1DB78: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035B78u); -#endif - /* 0xBFC1DB7C: 9339A100 lbu $t9, -24320($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24320; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-24320)), 25, 0x2000000u); - PGXP_LOAD(0x9339A100u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1DB84: 33280008 andi $t0, $t9, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u; - PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1DB88: 11000015 beq $t0, $zero, 0xBFC1DBE0 */ - uint32_t psx_brA_BFC1DB88 = cpu->gpr[8]; uint32_t psx_brB_BFC1DB88 = cpu->gpr[0]; - psx_taken_BFC1DB88 = (psx_brA_BFC1DB88 == psx_brB_BFC1DB88); - psx_delay_BFC1DB88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DB8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035B8Cu); -#endif - if (psx_delay_BFC1DB88) { - psx_delay_BFC1DB88 = 0; - if (psx_taken_BFC1DB88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE0u); - goto label_BFC1DBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B90u); - } -label_BFC1DB90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1DB90: 30490040 andi $t1, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x30490040u, cpu->gpr[9], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1DB94: 11200006 beq $t1, $zero, 0xBFC1DBB0 */ - uint32_t psx_brA_BFC1DB94 = cpu->gpr[9]; uint32_t psx_brB_BFC1DB94 = cpu->gpr[0]; - psx_taken_BFC1DB94 = (psx_brA_BFC1DB94 == psx_brB_BFC1DB94); - psx_delay_BFC1DB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1DB98: 304B0080 andi $t3, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B98u); -#endif - if (psx_delay_BFC1DB94) { - psx_delay_BFC1DB94 = 0; - if (psx_taken_BFC1DB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BB0u); - goto label_BFC1DBB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035B9Cu); - } -label_BFC1DB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1DB9C: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DBA0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DBA4: 10000007 beq $zero, $zero, 0xBFC1DBC4 */ - uint32_t psx_brA_BFC1DBA4 = cpu->gpr[0]; uint32_t psx_brB_BFC1DBA4 = cpu->gpr[0]; - psx_taken_BFC1DBA4 = (psx_brA_BFC1DBA4 == psx_brB_BFC1DBA4); - psx_delay_BFC1DBA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1DBA8: AC2A9DF4 sw $t2, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BA8u); return; } g_debug_last_store_pc = 0x80035BA8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9DF4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BA8u); -#endif - if (psx_delay_BFC1DBA4) { - psx_delay_BFC1DBA4 = 0; - if (psx_taken_BFC1DBA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BC4u); - goto label_BFC1DBC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BACu); - } -label_BFC1DBAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1DBAC: 304B0080 andi $t3, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BACu); -#endif -label_BFC1DBB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1DBB0: 11600004 beq $t3, $zero, 0xBFC1DBC4 */ - uint32_t psx_brA_BFC1DBB0 = cpu->gpr[11]; uint32_t psx_brB_BFC1DBB0 = cpu->gpr[0]; - psx_taken_BFC1DBB0 = (psx_brA_BFC1DBB0 == psx_brB_BFC1DBB0); - psx_delay_BFC1DBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DBB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035BB4u); -#endif - if (psx_delay_BFC1DBB0) { - psx_delay_BFC1DBB0 = 0; - if (psx_taken_BFC1DBB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BC4u); - goto label_BFC1DBC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BB8u); - } -label_BFC1DBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DBB8: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BB8u); return; } g_debug_last_store_pc = 0x80035BB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DBBC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DBC0: AC209DFC sw $zero, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BC0u); return; } g_debug_last_store_pc = 0x80035BC0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BC0u); -#endif -label_BFC1DBC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1DBC4: 304C0010 andi $t4, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1DBC8: 11800005 beq $t4, $zero, 0xBFC1DBE0 */ - uint32_t psx_brA_BFC1DBC8 = cpu->gpr[12]; uint32_t psx_brB_BFC1DBC8 = cpu->gpr[0]; - psx_taken_BFC1DBC8 = (psx_brA_BFC1DBC8 == psx_brB_BFC1DBC8); - psx_delay_BFC1DBC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DBCC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035BCCu); -#endif - if (psx_delay_BFC1DBC8) { - psx_delay_BFC1DBC8 = 0; - if (psx_taken_BFC1DBC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BE0u); - goto label_BFC1DBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035BD0u); - } -label_BFC1DBD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DBD0: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BD0u); return; } g_debug_last_store_pc = 0x80035BD0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DBD4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1DBD8: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1DBDC: AC2D9E00 sw $t5, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BDCu); return; } g_debug_last_store_pc = 0x80035BDCu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E00u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BDCu); -#endif -label_BFC1DBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DBE0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BE0u); -#endif -label_BFC1DBE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BE4u); -#endif - /* 0xBFC1DBE4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DBE8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1DBEC: 03E00008 jr $ra */ - psx_delay_BFC1DBEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DBF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035BF0u); -#endif - if (psx_delay_BFC1DBEC) { - psx_delay_BFC1DBEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1DBF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1DBF4u); - int psx_delay_BFC1DBFC = 0; - int psx_delay_BFC1DC08 = 0; - int psx_taken_BFC1DC08 = 0; - int psx_delay_BFC1DC4C = 0; - int psx_delay_BFC1DC9C = 0; - int psx_delay_BFC1DCB4 = 0; - int psx_delay_BFC1DCD4 = 0; - int psx_delay_BFC1DCF4 = 0; - int psx_delay_BFC1DD14 = 0; - int psx_delay_BFC1DD34 = 0; - int psx_delay_BFC1DD54 = 0; - int psx_delay_BFC1DD68 = 0; - int psx_delay_BFC1DD78 = 0; - int psx_delay_BFC1DD88 = 0; - int psx_delay_BFC1DD98 = 0; - int psx_delay_BFC1DDA8 = 0; - int psx_delay_BFC1DDB8 = 0; - int psx_delay_BFC1DDC0 = 0; - int psx_delay_BFC1DDD0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1DC04u: goto label_BFC1DC04; - case 0xBFC1DC10u: goto label_BFC1DC10; - case 0xBFC1DC54u: goto label_BFC1DC54; - case 0xBFC1DCA4u: goto label_BFC1DCA4; - case 0xBFC1DCBCu: goto label_BFC1DCBC; - case 0xBFC1DCDCu: goto label_BFC1DCDC; - case 0xBFC1DCFCu: goto label_BFC1DCFC; - case 0xBFC1DD1Cu: goto label_BFC1DD1C; - case 0xBFC1DD3Cu: goto label_BFC1DD3C; - case 0xBFC1DD5Cu: goto label_BFC1DD5C; - case 0xBFC1DD70u: goto label_BFC1DD70; - case 0xBFC1DD80u: goto label_BFC1DD80; - case 0xBFC1DD90u: goto label_BFC1DD90; - case 0xBFC1DDA0u: goto label_BFC1DDA0; - case 0xBFC1DDB0u: goto label_BFC1DDB0; - case 0xBFC1DDC0u: goto label_BFC1DDC0; - case 0xBFC1DDC8u: goto label_BFC1DDC8; - default: break; - } - } -label_BFC1DBF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DBF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DBF4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80035BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1DBF8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035BF8u); return; } g_debug_last_store_pc = 0x80035BF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DBFC: 0C016A4C jal 0xB005A930 */ - cpu->gpr[31] = 0x80035C04u; /* jal link before delay slot */ - psx_delay_BFC1DBFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DC00: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C00u); -#endif - if (psx_delay_BFC1DBFC) { - psx_delay_BFC1DBFC = 0; - cpu->gpr[31] = 0x80035C04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A930u); - cpu->pc = 0x8005A930u; return; - } -label_BFC1DC04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DC04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DC04: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DC08: 1040006F beq $v0, $zero, 0xBFC1DDC8 */ - uint32_t psx_brA_BFC1DC08 = cpu->gpr[2]; uint32_t psx_brB_BFC1DC08 = cpu->gpr[0]; - psx_taken_BFC1DC08 = (psx_brA_BFC1DC08 == psx_brB_BFC1DC08); - psx_delay_BFC1DC08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DC0C: AC229EC4 sw $v0, -24892($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C0Cu); return; } g_debug_last_store_pc = 0x80035C0Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229EC4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C0Cu); -#endif - if (psx_delay_BFC1DC08) { - psx_delay_BFC1DC08 = 0; - if (psx_taken_BFC1DC08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035DC8u); - goto label_BFC1DDC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035C10u); - } -label_BFC1DC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1DC10: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C10u); -#endif - /* 0xBFC1DC14: 8DCE9EC4 lw $t6, -24892($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EC4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1DC18: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1DC1C: ADC00000 sw $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C1Cu); return; } g_debug_last_store_pc = 0x80035C1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C20u); -#endif - /* 0xBFC1DC20: 8F189EC4 lw $t8, -24892($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C20u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189EC4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1DC24: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1DC28: 25EF86E0 addiu $t7, $t7, -31008 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-31008)); - PGXP_ALU(0x25EF86E0u, cpu->gpr[15], _pgx1, 0xFFFF86E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1DC2C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC1DC30: AF0F0004 sw $t7, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C30u); return; } g_debug_last_store_pc = 0x80035C30u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C30u); -#endif - /* 0xBFC1DC34: 8D089EC4 lw $t0, -24892($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C34u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089EC4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1DC38: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1DC3C: 27398484 addiu $t9, $t9, -31612 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-31612)); - PGXP_ALU(0x27398484u, cpu->gpr[25], _pgx1, 0xFFFF8484u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1DC40: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1DC44: AD190008 sw $t9, 8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C44u); return; } g_debug_last_store_pc = 0x80035C44u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C44u); -#endif - /* 0xBFC1DC48: 8CA59EC4 lw $a1, -24892($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C48u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EC4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DC4C: 0C016A70 jal 0xB005A9C0 */ - cpu->gpr[31] = 0x80035C54u; /* jal link before delay slot */ - psx_delay_BFC1DC4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DC50: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035C50u); -#endif - if (psx_delay_BFC1DC4C) { - psx_delay_BFC1DC4C = 0; - cpu->gpr[31] = 0x80035C54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9C0u); - cpu->pc = 0x8005A9C0u; return; - } -label_BFC1DC54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DC54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1DC54: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C54u); -#endif - /* 0xBFC1DC58: 8D299EC4 lw $t1, -24892($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C58u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299EC4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DC5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC1DC60: 252A0010 addiu $t2, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (16)); - PGXP_ALU(0x252A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1DC64: AC2A9EC4 sw $t2, -24892($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C64u); return; } g_debug_last_store_pc = 0x80035C64u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9EC4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1DC68: AD400000 sw $zero, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C68u); return; } g_debug_last_store_pc = 0x80035C68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1DC6C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C70u); -#endif - /* 0xBFC1DC70: 8D8C9EC4 lw $t4, -24892($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C70u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EC4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1DC74: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1DC78: 256B8700 addiu $t3, $t3, -30976 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-30976)); - PGXP_ALU(0x256B8700u, cpu->gpr[11], _pgx1, 0xFFFF8700u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1DC7C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1DC80: AD8B0004 sw $t3, 4($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C80u); return; } g_debug_last_store_pc = 0x80035C80u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD8B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C80u); -#endif - /* 0xBFC1DC84: 8DCE9EC4 lw $t6, -24892($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C84u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EC4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1DC88: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1DC8C: 25AD8628 addiu $t5, $t5, -31192 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-31192)); - PGXP_ALU(0x25AD8628u, cpu->gpr[13], _pgx1, 0xFFFF8628u); } -#ifdef PSX_COSIM - cosim_instr(0x80035C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1DC90: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1DC94: ADCD0008 sw $t5, 8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C94u); return; } g_debug_last_store_pc = 0x80035C94u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C94u); -#endif - /* 0xBFC1DC98: 8CA59EC4 lw $a1, -24892($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035C98u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EC4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80035C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DC9C: 0C016A70 jal 0xB005A9C0 */ - cpu->gpr[31] = 0x80035CA4u; /* jal link before delay slot */ - psx_delay_BFC1DC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DCA0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035CA0u); -#endif - if (psx_delay_BFC1DC9C) { - psx_delay_BFC1DC9C = 0; - cpu->gpr[31] = 0x80035CA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9C0u); - cpu->pc = 0x8005A9C0u; return; - } -label_BFC1DCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCA4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCA8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DCAC: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DCB0: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DCB4: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035CBCu; /* jal link before delay slot */ - psx_delay_BFC1DCB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DCB8: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035CB8u); -#endif - if (psx_delay_BFC1DCB4) { - psx_delay_BFC1DCB4 = 0; - cpu->gpr[31] = 0x80035CBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DCBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DCBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DCBC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCC0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DCC4: AC229E7C sw $v0, -24964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035CC4u); return; } g_debug_last_store_pc = 0x80035CC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCC8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DCCC: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DCD0: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DCD4: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035CDCu; /* jal link before delay slot */ - psx_delay_BFC1DCD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DCD8: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035CD8u); -#endif - if (psx_delay_BFC1DCD4) { - psx_delay_BFC1DCD4 = 0; - cpu->gpr[31] = 0x80035CDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DCDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DCDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DCDC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCE0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DCE4: AC229E80 sw $v0, -24960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035CE4u); return; } g_debug_last_store_pc = 0x80035CE4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DCE8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DCEC: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DCF0: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DCF4: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035CFCu; /* jal link before delay slot */ - psx_delay_BFC1DCF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DCF8: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035CF8u); -#endif - if (psx_delay_BFC1DCF4) { - psx_delay_BFC1DCF4 = 0; - cpu->gpr[31] = 0x80035CFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DCFC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD00: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DD04: AC229E84 sw $v0, -24956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D04u); return; } g_debug_last_store_pc = 0x80035D04u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E84u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD08: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DD0C: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DD10: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD14: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035D1Cu; /* jal link before delay slot */ - psx_delay_BFC1DD14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DD18: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035D18u); -#endif - if (psx_delay_BFC1DD14) { - psx_delay_BFC1DD14 = 0; - cpu->gpr[31] = 0x80035D1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DD1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DD1C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD20: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DD24: AC229E88 sw $v0, -24952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D24u); return; } g_debug_last_store_pc = 0x80035D24u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E88u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD28: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DD2C: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DD30: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD34: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035D3Cu; /* jal link before delay slot */ - psx_delay_BFC1DD34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DD38: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035D38u); -#endif - if (psx_delay_BFC1DD34) { - psx_delay_BFC1DD34 = 0; - cpu->gpr[31] = 0x80035D3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DD3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DD3C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD40: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DD44: AC229E8C sw $v0, -24948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D44u); return; } g_debug_last_store_pc = 0x80035D44u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E8Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD48: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DD4C: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC1DD50: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x80035D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD54: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80035D5Cu; /* jal link before delay slot */ - psx_delay_BFC1DD54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC1DD58: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035D58u); -#endif - if (psx_delay_BFC1DD54) { - psx_delay_BFC1DD54 = 0; - cpu->gpr[31] = 0x80035D5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC1DD5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD5C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DD60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D60u); -#endif - /* 0xBFC1DD64: 8C849E7C lw $a0, -24964($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E7Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD68: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035D70u; /* jal link before delay slot */ - psx_delay_BFC1DD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1DD6C: AC229E90 sw $v0, -24944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D6Cu); return; } g_debug_last_store_pc = 0x80035D6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E90u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D6Cu); -#endif - if (psx_delay_BFC1DD68) { - psx_delay_BFC1DD68 = 0; - cpu->gpr[31] = 0x80035D70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD70: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D70u); -#endif - /* 0xBFC1DD74: 8C849E80 lw $a0, -24960($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D74u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E80u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD78: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035D80u; /* jal link before delay slot */ - psx_delay_BFC1DD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DD7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035D7Cu); -#endif - if (psx_delay_BFC1DD78) { - psx_delay_BFC1DD78 = 0; - cpu->gpr[31] = 0x80035D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD80: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D80u); -#endif - /* 0xBFC1DD84: 8C849E84 lw $a0, -24956($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D84u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E84u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD88: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035D90u; /* jal link before delay slot */ - psx_delay_BFC1DD88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DD8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035D8Cu); -#endif - if (psx_delay_BFC1DD88) { - psx_delay_BFC1DD88 = 0; - cpu->gpr[31] = 0x80035D90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DD90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DD90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DD90: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035D90u); -#endif - /* 0xBFC1DD94: 8C849E88 lw $a0, -24952($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035D94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E88u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DD98: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035DA0u; /* jal link before delay slot */ - psx_delay_BFC1DD98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DD9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035D9Cu); -#endif - if (psx_delay_BFC1DD98) { - psx_delay_BFC1DD98 = 0; - cpu->gpr[31] = 0x80035DA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DDA0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035DA0u); -#endif - /* 0xBFC1DDA4: 8C849E8C lw $a0, -24948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DA4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E8Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DDA8: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035DB0u; /* jal link before delay slot */ - psx_delay_BFC1DDA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DDAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035DACu); -#endif - if (psx_delay_BFC1DDA8) { - psx_delay_BFC1DDA8 = 0; - cpu->gpr[31] = 0x80035DB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DDB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1DDB0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035DB0u); -#endif - /* 0xBFC1DDB4: 8C849E90 lw $a0, -24944($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DB4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E90u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DDB8: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80035DC0u; /* jal link before delay slot */ - psx_delay_BFC1DDB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DDBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035DBCu); -#endif - if (psx_delay_BFC1DDB8) { - psx_delay_BFC1DDB8 = 0; - cpu->gpr[31] = 0x80035DC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC1DDC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DDC0: 0C015C24 jal 0xB0057090 */ - cpu->gpr[31] = 0x80035DC8u; /* jal link before delay slot */ - psx_delay_BFC1DDC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DDC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035DC4u); -#endif - if (psx_delay_BFC1DDC0) { - psx_delay_BFC1DDC0 = 0; - cpu->gpr[31] = 0x80035DC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057090u); - cpu->pc = 0x80057090u; return; - } -label_BFC1DDC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DC8u); -#endif - /* 0xBFC1DDC8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DDCC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80035DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1DDD0: 03E00008 jr $ra */ - psx_delay_BFC1DDD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DDD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035DD4u); -#endif - if (psx_delay_BFC1DDD0) { - psx_delay_BFC1DDD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1DDD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1DDD8u); - int psx_delay_BFC1DDEC = 0; - int psx_delay_BFC1DE3C = 0; - int psx_delay_BFC1DE88 = 0; - int psx_taken_BFC1DE88 = 0; - int psx_delay_BFC1DEBC = 0; - int psx_taken_BFC1DEBC = 0; - int psx_delay_BFC1DEE8 = 0; - int psx_taken_BFC1DEE8 = 0; - int psx_delay_BFC1DF48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1DDF4u: goto label_BFC1DDF4; - case 0xBFC1DE44u: goto label_BFC1DE44; - case 0xBFC1DE78u: goto label_BFC1DE78; - case 0xBFC1DE90u: goto label_BFC1DE90; - case 0xBFC1DEACu: goto label_BFC1DEAC; - case 0xBFC1DEC4u: goto label_BFC1DEC4; - case 0xBFC1DED8u: goto label_BFC1DED8; - case 0xBFC1DEF0u: goto label_BFC1DEF0; - default: break; - } - } -label_BFC1DDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DDD8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80035DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1DDDC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DDCu); return; } g_debug_last_store_pc = 0x80035DDCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1DDE0: 240E0025 addiu $t6, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x240E0025u, cpu->gpr[14], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x80035DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DDE4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1DDE8: AC2E9EA8 sw $t6, -24920($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DE8u); return; } g_debug_last_store_pc = 0x80035DE8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9EA8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DDEC: 0C00C5B2 jal 0xB00316C8 */ - cpu->gpr[31] = 0x80035DF4u; /* jal link before delay slot */ - psx_delay_BFC1DDEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DDF0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035DF0u); -#endif - if (psx_delay_BFC1DDEC) { - psx_delay_BFC1DDEC = 0; - cpu->gpr[31] = 0x80035DF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800316C8u); - cpu->pc = 0x800316C8u; return; - } -label_BFC1DDF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DDF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DDF4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DDF8: AC209E74 sw $zero, -24972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035DF8u); return; } g_debug_last_store_pc = 0x80035DF8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DDFC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE00: AC209EBC sw $zero, -24900($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E00u); return; } g_debug_last_store_pc = 0x80035E00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE04: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE08: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E08u); return; } g_debug_last_store_pc = 0x80035E08u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE0C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE10: AC209E30 sw $zero, -25040($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25040; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25040)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E10u); return; } g_debug_last_store_pc = 0x80035E10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE14: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE18: AC209E34 sw $zero, -25036($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25036; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25036)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E18u); return; } g_debug_last_store_pc = 0x80035E18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E34u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE1C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE20: AC209E38 sw $zero, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E20u); return; } g_debug_last_store_pc = 0x80035E20u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E38u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE24: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE28: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E28u); return; } g_debug_last_store_pc = 0x80035E28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE2C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE30: A0209E70 sb $zero, -24976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24976; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24976)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE34: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE38: A0209E71 sb $zero, -24975($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24975; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24975)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209E71u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DE3C: 0C00D26A jal 0xB00349A8 */ - cpu->gpr[31] = 0x80035E44u; /* jal link before delay slot */ - psx_delay_BFC1DE3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DE40: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035E40u); -#endif - if (psx_delay_BFC1DE3C) { - psx_delay_BFC1DE3C = 0; - cpu->gpr[31] = 0x80035E44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800349A8u); - cpu->pc = 0x800349A8u; return; - } -label_BFC1DE44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DE44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE44: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DE48: AC20695C sw $zero, 26972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E48u); return; } g_debug_last_store_pc = 0x80035E48u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20695Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE4C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1DE50: 240F0032 addiu $t7, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240F0032u, cpu->gpr[15], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80035E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1DE54: AC2F6940 sw $t7, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E54u); return; } g_debug_last_store_pc = 0x80035E54u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6940u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1DE58: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE5C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1DE60: 24180032 addiu $t8, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24180032u, cpu->gpr[24], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80035E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DE64: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DE68: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1DE6C: AC386948 sw $t8, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035E6Cu); return; } g_debug_last_store_pc = 0x80035E6Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DE70: 24429EA0 addiu $v0, $v0, -24928 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-24928)); - PGXP_ALU(0x24429EA0u, cpu->gpr[2], _pgx1, 0xFFFF9EA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DE74: 24639EA8 addiu $v1, $v1, -24920 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24920)); - PGXP_ALU(0x24639EA8u, cpu->gpr[3], _pgx1, 0xFFFF9EA8u); } -#ifdef PSX_COSIM - cosim_instr(0x80035E74u); -#endif -label_BFC1DE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DE78: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DE7C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80035E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DE80: A040FFFD sb $zero, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFDu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DE84: A040FFFE sb $zero, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E84u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFEu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1DE88: 1443FFFB bne $v0, $v1, 0xBFC1DE78 */ - uint32_t psx_brA_BFC1DE88 = cpu->gpr[2]; uint32_t psx_brB_BFC1DE88 = cpu->gpr[3]; - psx_taken_BFC1DE88 = (psx_brA_BFC1DE88 != psx_brB_BFC1DE88); - psx_delay_BFC1DE88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DE8C: A040FFFF sb $zero, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035E8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFFu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035E8Cu); -#endif - if (psx_delay_BFC1DE88) { - psx_delay_BFC1DE88 = 0; - if (psx_taken_BFC1DE88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035E78u); - goto label_BFC1DE78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035E90u); - } -label_BFC1DE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1DE90: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DE94: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DE98: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DE9C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DEA0: AC20694C sw $zero, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035EA0u); return; } g_debug_last_store_pc = 0x80035EA0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20694Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DEA4: 2442A0E0 addiu $v0, $v0, -24352 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-24352)); - PGXP_ALU(0x2442A0E0u, cpu->gpr[2], _pgx1, 0xFFFFA0E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DEA8: 2463A100 addiu $v1, $v1, -24320 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24320)); - PGXP_ALU(0x2463A100u, cpu->gpr[3], _pgx1, 0xFFFFA100u); } -#ifdef PSX_COSIM - cosim_instr(0x80035EA8u); -#endif -label_BFC1DEAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DEACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEAC: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DEB0: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80035EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEB4: A040FFFD sb $zero, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFDu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEB8: A040FFFE sb $zero, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFEu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1DEBC: 1443FFFB bne $v0, $v1, 0xBFC1DEAC */ - uint32_t psx_brA_BFC1DEBC = cpu->gpr[2]; uint32_t psx_brB_BFC1DEBC = cpu->gpr[3]; - psx_taken_BFC1DEBC = (psx_brA_BFC1DEBC != psx_brB_BFC1DEBC); - psx_delay_BFC1DEBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEC0: A040FFFF sb $zero, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFFu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EC0u); -#endif - if (psx_delay_BFC1DEBC) { - psx_delay_BFC1DEBC = 0; - if (psx_taken_BFC1DEBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035EACu); - goto label_BFC1DEAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035EC4u); - } -label_BFC1DEC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DEC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1DEC4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DEC8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DECC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DED0: 2442A100 addiu $v0, $v0, -24320 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-24320)); - PGXP_ALU(0x2442A100u, cpu->gpr[2], _pgx1, 0xFFFFA100u); } -#ifdef PSX_COSIM - cosim_instr(0x80035ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DED4: 2463A108 addiu $v1, $v1, -24312 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24312)); - PGXP_ALU(0x2463A108u, cpu->gpr[3], _pgx1, 0xFFFFA108u); } -#ifdef PSX_COSIM - cosim_instr(0x80035ED4u); -#endif -label_BFC1DED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DED8: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035ED8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DEDC: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80035EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEE0: A040FFFD sb $zero, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFDu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEE4: A040FFFE sb $zero, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EE4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFEu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1DEE8: 1443FFFB bne $v0, $v1, 0xBFC1DED8 */ - uint32_t psx_brA_BFC1DEE8 = cpu->gpr[2]; uint32_t psx_brB_BFC1DEE8 = cpu->gpr[3]; - psx_taken_BFC1DEE8 = (psx_brA_BFC1DEE8 != psx_brB_BFC1DEE8); - psx_delay_BFC1DEE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DEEC: A040FFFF sb $zero, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFFFu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EECu); -#endif - if (psx_delay_BFC1DEE8) { - psx_delay_BFC1DEE8 = 0; - if (psx_taken_BFC1DEE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035ED8u); - goto label_BFC1DED8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035EF0u); - } -label_BFC1DEF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DEF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DEF0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DEF4: A020A109 sb $zero, -24311($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24311; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24311)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020A109u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DEF8: A020A108 sb $zero, -24312($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24312; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035EF8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24312)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020A108u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DEFC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF00: AC206954 sw $zero, 26964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F00u); return; } g_debug_last_store_pc = 0x80035F00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206954u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF04: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF08: AC209E54 sw $zero, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F08u); return; } g_debug_last_store_pc = 0x80035F08u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF0C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF10: AC209E58 sw $zero, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F10u); return; } g_debug_last_store_pc = 0x80035F10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF14: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF18: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F18u); return; } g_debug_last_store_pc = 0x80035F18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF1C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF20: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F20u); return; } g_debug_last_store_pc = 0x80035F20u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF24: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF28: AC20A114 sw $zero, -24300($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24300; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24300)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F28u); return; } g_debug_last_store_pc = 0x80035F28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A114u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF2C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF30: AC20A110 sw $zero, -24304($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F30u); return; } g_debug_last_store_pc = 0x80035F30u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A110u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF34: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F34u); -#endif - /* 0xBFC1DF38: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF3C: AC20A10C sw $zero, -24308($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24308; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F3Cu); return; } g_debug_last_store_pc = 0x80035F3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A10Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF40: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF44: AC209EC0 sw $zero, -24896($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F44u); return; } g_debug_last_store_pc = 0x80035F44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1DF48: 03E00008 jr $ra */ - psx_delay_BFC1DF48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DF4C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80035F4Cu); -#endif - if (psx_delay_BFC1DF48) { - psx_delay_BFC1DF48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1DF50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1DF50u); - int psx_delay_BFC1DFA8 = 0; - int psx_taken_BFC1DFA8 = 0; - int psx_delay_BFC1DFC8 = 0; - int psx_delay_BFC1DFD0 = 0; - int psx_taken_BFC1DFD0 = 0; - int psx_delay_BFC1DFE4 = 0; - int psx_taken_BFC1DFE4 = 0; - int psx_delay_BFC1DFEC = 0; - int psx_taken_BFC1DFEC = 0; - int psx_delay_BFC1E01C = 0; - int psx_delay_BFC1E034 = 0; - int psx_taken_BFC1E034 = 0; - int psx_delay_BFC1E03C = 0; - int psx_taken_BFC1E03C = 0; - int psx_delay_BFC1E050 = 0; - int psx_taken_BFC1E050 = 0; - int psx_delay_BFC1E068 = 0; - int psx_taken_BFC1E068 = 0; - int psx_delay_BFC1E070 = 0; - int psx_taken_BFC1E070 = 0; - int psx_delay_BFC1E07C = 0; - int psx_taken_BFC1E07C = 0; - int psx_delay_BFC1E094 = 0; - int psx_taken_BFC1E094 = 0; - int psx_delay_BFC1E09C = 0; - int psx_taken_BFC1E09C = 0; - int psx_delay_BFC1E0BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1DF94u: goto label_BFC1DF94; - case 0xBFC1DFB0u: goto label_BFC1DFB0; - case 0xBFC1DFD0u: goto label_BFC1DFD0; - case 0xBFC1DFD8u: goto label_BFC1DFD8; - case 0xBFC1DFECu: goto label_BFC1DFEC; - case 0xBFC1DFF4u: goto label_BFC1DFF4; - case 0xBFC1E024u: goto label_BFC1E024; - case 0xBFC1E03Cu: goto label_BFC1E03C; - case 0xBFC1E044u: goto label_BFC1E044; - case 0xBFC1E058u: goto label_BFC1E058; - case 0xBFC1E070u: goto label_BFC1E070; - case 0xBFC1E078u: goto label_BFC1E078; - case 0xBFC1E07Cu: goto label_BFC1E07C; - case 0xBFC1E084u: goto label_BFC1E084; - case 0xBFC1E09Cu: goto label_BFC1E09C; - case 0xBFC1E0A4u: goto label_BFC1E0A4; - case 0xBFC1E0A8u: goto label_BFC1E0A8; - case 0xBFC1E0B4u: goto label_BFC1E0B4; - default: break; - } - } -label_BFC1DF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1DF50: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80035F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1DF54: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F54u); return; } g_debug_last_store_pc = 0x80035F54u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1DF58: 3C0EA001 lui $t6, 0xA001 */ - cpu->gpr[14] = 0xA0010000u; - PGXP_ALU(0x3C0EA001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1DF5C: ADC0DFFC sw $zero, -8196($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035F5Cu); return; } g_debug_last_store_pc = 0x80035F5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADC0DFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1DF60: 240F0020 addiu $t7, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240F0020u, cpu->gpr[15], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80035F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF64: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1DF68: A02FD280 sb $t7, -11648($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -11648; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035F68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-11648)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FD280u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF6C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF70: A020D281 sb $zero, -11647($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -11647; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035F70u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-11647)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020D281u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF74: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DF78: A020D290 sb $zero, -11632($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -11632; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035F78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-11632)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020D290u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DF7C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1DF80: 24180004 addiu $t8, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24180004u, cpu->gpr[24], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80035F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DF84: 3C03800F lui $v1, 0x800F */ - cpu->gpr[3] = 0x800F0000u; - PGXP_ALU(0x3C03800Fu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1DF88: A038D291 sb $t8, -11631($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -11631; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035F88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-11631)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038D291u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DF8C: 2463D290 addiu $v1, $v1, -11632 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-11632)); - PGXP_ALU(0x2463D290u, cpu->gpr[3], _pgx1, 0xFFFFD290u); } -#ifdef PSX_COSIM - cosim_instr(0x80035F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DF90: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035F90u); -#endif -label_BFC1DF94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DF94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1DF94: A0600002 sb $zero, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80035F94u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1DF98: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035F98u); -#endif - /* 0xBFC1DF9C: 9339D291 lbu $t9, -11631($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -11631; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-11631)), 25, 0x2000000u); - PGXP_LOAD(0x9339D291u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80035F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1DFA0: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC1DFA4: 0059082B sltu $at, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0059082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80035FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DFA8: 1420FFFA bne $at, $zero, 0xBFC1DF94 */ - uint32_t psx_brA_BFC1DFA8 = cpu->gpr[1]; uint32_t psx_brB_BFC1DFA8 = cpu->gpr[0]; - psx_taken_BFC1DFA8 = (psx_brA_BFC1DFA8 != psx_brB_BFC1DFA8); - psx_delay_BFC1DFA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1DFAC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80035FACu); -#endif - if (psx_delay_BFC1DFA8) { - psx_delay_BFC1DFA8 = 0; - if (psx_taken_BFC1DFA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035F94u); - goto label_BFC1DF94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FB0u); - } -label_BFC1DFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DFB0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DFB4: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035FB4u); return; } g_debug_last_store_pc = 0x80035FB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DFB8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1DFBC: 24080019 addiu $t0, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24080019u, cpu->gpr[8], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x80035FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1DFC0: AC286944 sw $t0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035FC0u); return; } g_debug_last_store_pc = 0x80035FC0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286944u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80035FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1DFC4: 2404003D addiu $a0, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2404003Du, cpu->gpr[4], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0x80035FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1DFC8: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x80035FD0u; /* jal link before delay slot */ - psx_delay_BFC1DFC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1DFCC: 2405003C addiu $a1, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2405003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80035FCCu); -#endif - if (psx_delay_BFC1DFC8) { - psx_delay_BFC1DFC8 = 0; - cpu->gpr[31] = 0x80035FD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1DFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1DFD0: 1040FFF7 beq $v0, $zero, 0xBFC1DFB0 */ - uint32_t psx_brA_BFC1DFD0 = cpu->gpr[2]; uint32_t psx_brB_BFC1DFD0 = cpu->gpr[0]; - psx_taken_BFC1DFD0 = (psx_brA_BFC1DFD0 == psx_brB_BFC1DFD0); - psx_delay_BFC1DFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DFD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035FD4u); -#endif - if (psx_delay_BFC1DFD0) { - psx_delay_BFC1DFD0 = 0; - if (psx_taken_BFC1DFD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FB0u); - goto label_BFC1DFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FD8u); - } -label_BFC1DFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1DFD8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FD8u); -#endif - /* 0xBFC1DFDC: 8D299EB0 lw $t1, -24912($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035FDCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299EB0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80035FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DFE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80035FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1DFE4: 11200003 beq $t1, $zero, 0xBFC1DFF4 */ - uint32_t psx_brA_BFC1DFE4 = cpu->gpr[9]; uint32_t psx_brB_BFC1DFE4 = cpu->gpr[0]; - psx_taken_BFC1DFE4 = (psx_brA_BFC1DFE4 == psx_brB_BFC1DFE4); - psx_delay_BFC1DFE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1DFE8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FE8u); -#endif - if (psx_delay_BFC1DFE4) { - psx_delay_BFC1DFE4 = 0; - if (psx_taken_BFC1DFE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FF4u); - goto label_BFC1DFF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FECu); - } -label_BFC1DFEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DFECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1DFEC: 1000FFF0 beq $zero, $zero, 0xBFC1DFB0 */ - uint32_t psx_brA_BFC1DFEC = cpu->gpr[0]; uint32_t psx_brB_BFC1DFEC = cpu->gpr[0]; - psx_taken_BFC1DFEC = (psx_brA_BFC1DFEC == psx_brB_BFC1DFEC); - psx_delay_BFC1DFEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1DFF0: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80035FF0u); return; } g_debug_last_store_pc = 0x80035FF0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80035FF0u); -#endif - if (psx_delay_BFC1DFEC) { - psx_delay_BFC1DFEC = 0; - if (psx_taken_BFC1DFEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FB0u); - goto label_BFC1DFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035FF4u); - } -label_BFC1DFF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1DFF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1DFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80035FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1DFF4: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FF4u); -#endif - /* 0xBFC1DFF8: 914AD294 lbu $t2, -11628($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -11628; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (-11628)), 10, 0x400u); - PGXP_LOAD(0x914AD294u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80035FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1DFFC: 3C06800F lui $a2, 0x800F */ - cpu->gpr[6] = 0x800F0000u; - PGXP_ALU(0x3C06800Fu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80035FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E000: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC1E004: 3C07800F lui $a3, 0x800F */ - cpu->gpr[7] = 0x800F0000u; - PGXP_ALU(0x3C07800Fu, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036004u); -#endif - /* 0xBFC1E008: 90C6D292 lbu $a2, -11630($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -11630; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (-11630)), 6, 0x40u); - PGXP_LOAD(0x90C6D292u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80036008u); -#endif - /* 0xBFC1E00C: 90E7D293 lbu $a3, -11629($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -11629; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-11629)), 7, 0x80u); - PGXP_LOAD(0x90E7D293u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003600Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036010u); -#endif - /* 0xBFC1E010: 90A5D290 lbu $a1, -11632($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -11632; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-11632)), 5, 0x20u); - PGXP_LOAD(0x90A5D290u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80036010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E014: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E018: 24846960 addiu $a0, $a0, 26976 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26976)); - PGXP_ALU(0x24846960u, cpu->gpr[4], _pgx1, 0x00006960u); } -#ifdef PSX_COSIM - cosim_instr(0x80036018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E01C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80036024u; /* jal link before delay slot */ - psx_delay_BFC1E01C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC1E020: AFAA0010 sw $t2, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036020u); return; } g_debug_last_store_pc = 0x80036020u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036020u); -#endif - if (psx_delay_BFC1E01C) { - psx_delay_BFC1E01C = 0; - cpu->gpr[31] = 0x80036024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC1E024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E024: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036024u); -#endif - /* 0xBFC1E028: 916BD290 lbu $t3, -11632($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -11632; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (-11632)), 11, 0x800u); - PGXP_LOAD(0x916BD290u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80036028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E02C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E030: 2D610095 sltiu $at, $t3, 149 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x00000095u ? 1 : 0); - PGXP_ALU(0x2D610095u, cpu->gpr[1], _pgx1, 0x0095u); } -#ifdef PSX_COSIM - cosim_instr(0x80036030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E034: 10200003 beq $at, $zero, 0xBFC1E044 */ - uint32_t psx_brA_BFC1E034 = cpu->gpr[1]; uint32_t psx_brB_BFC1E034 = cpu->gpr[0]; - psx_taken_BFC1E034 = (psx_brA_BFC1E034 == psx_brB_BFC1E034); - psx_delay_BFC1E034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036038u); -#endif - if (psx_delay_BFC1E034) { - psx_delay_BFC1E034 = 0; - if (psx_taken_BFC1E034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036044u); - goto label_BFC1E044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003603Cu); - } -label_BFC1E03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003603Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E03C: 1000001D beq $zero, $zero, 0xBFC1E0B4 */ - uint32_t psx_brA_BFC1E03C = cpu->gpr[0]; uint32_t psx_brB_BFC1E03C = cpu->gpr[0]; - psx_taken_BFC1E03C = (psx_brA_BFC1E03C == psx_brB_BFC1E03C); - psx_delay_BFC1E03C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E040: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80036040u); -#endif - if (psx_delay_BFC1E03C) { - psx_delay_BFC1E03C = 0; - if (psx_taken_BFC1E03C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360B4u); - goto label_BFC1E0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036044u); - } -label_BFC1E044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1E044: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036044u); -#endif - /* 0xBFC1E048: 918CD290 lbu $t4, -11632($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -11632; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-11632)), 12, 0x1000u); - PGXP_LOAD(0x918CD290u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80036048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E04C: 24010095 addiu $at, $zero, 149 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (149)); - PGXP_ALU(0x24010095u, cpu->gpr[1], _pgx1, 0x00000095u); } -#ifdef PSX_COSIM - cosim_instr(0x8003604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1E050: 15810015 bne $t4, $at, 0xBFC1E0A8 */ - uint32_t psx_brA_BFC1E050 = cpu->gpr[12]; uint32_t psx_brB_BFC1E050 = cpu->gpr[1]; - psx_taken_BFC1E050 = (psx_brA_BFC1E050 != psx_brB_BFC1E050); - psx_delay_BFC1E050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E054: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036054u); -#endif - if (psx_delay_BFC1E050) { - psx_delay_BFC1E050 = 0; - if (psx_taken_BFC1E050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360A8u); - goto label_BFC1E0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036058u); - } -label_BFC1E058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC1E058: 3C06800F lui $a2, 0x800F */ - cpu->gpr[6] = 0x800F0000u; - PGXP_ALU(0x3C06800Fu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036058u); -#endif - /* 0xBFC1E05C: 90C6D292 lbu $a2, -11630($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -11630; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (-11630)), 6, 0x40u); - PGXP_LOAD(0x90C6D292u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003605Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1E064: 2CC10007 sltiu $at, $a2, 7 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < 0x00000007u ? 1 : 0); - PGXP_ALU(0x2CC10007u, cpu->gpr[1], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80036064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E068: 10200004 beq $at, $zero, 0xBFC1E07C */ - uint32_t psx_brA_BFC1E068 = cpu->gpr[1]; uint32_t psx_brB_BFC1E068 = cpu->gpr[0]; - psx_taken_BFC1E068 = (psx_brA_BFC1E068 == psx_brB_BFC1E068); - psx_delay_BFC1E068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E06C: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003606Cu); -#endif - if (psx_delay_BFC1E068) { - psx_delay_BFC1E068 = 0; - if (psx_taken_BFC1E068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003607Cu); - goto label_BFC1E07C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036070u); - } -label_BFC1E070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E070: 10000010 beq $zero, $zero, 0xBFC1E0B4 */ - uint32_t psx_brA_BFC1E070 = cpu->gpr[0]; uint32_t psx_brB_BFC1E070 = cpu->gpr[0]; - psx_taken_BFC1E070 = (psx_brA_BFC1E070 == psx_brB_BFC1E070); - psx_delay_BFC1E070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E074: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80036074u); -#endif - if (psx_delay_BFC1E070) { - psx_delay_BFC1E070 = 0; - if (psx_taken_BFC1E070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360B4u); - goto label_BFC1E0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036078u); - } -label_BFC1E078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E078: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80036078u); -#endif -label_BFC1E07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1E07C: 14C1000A bne $a2, $at, 0xBFC1E0A8 */ - uint32_t psx_brA_BFC1E07C = cpu->gpr[6]; uint32_t psx_brB_BFC1E07C = cpu->gpr[1]; - psx_taken_BFC1E07C = (psx_brA_BFC1E07C != psx_brB_BFC1E07C); - psx_delay_BFC1E07C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E080: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036080u); -#endif - if (psx_delay_BFC1E07C) { - psx_delay_BFC1E07C = 0; - if (psx_taken_BFC1E07C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360A8u); - goto label_BFC1E0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036084u); - } -label_BFC1E084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1E084: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036084u); -#endif - /* 0xBFC1E088: 91ADD293 lbu $t5, -11629($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -11629; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-11629)), 13, 0x2000u); - PGXP_LOAD(0x91ADD293u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E08C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003608Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1E090: 2DA10006 sltiu $at, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < 0x00000006u ? 1 : 0); - PGXP_ALU(0x2DA10006u, cpu->gpr[1], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x80036090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E094: 10200004 beq $at, $zero, 0xBFC1E0A8 */ - uint32_t psx_brA_BFC1E094 = cpu->gpr[1]; uint32_t psx_brB_BFC1E094 = cpu->gpr[0]; - psx_taken_BFC1E094 = (psx_brA_BFC1E094 == psx_brB_BFC1E094); - psx_delay_BFC1E094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E098: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036098u); -#endif - if (psx_delay_BFC1E094) { - psx_delay_BFC1E094 = 0; - if (psx_taken_BFC1E094) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360A8u); - goto label_BFC1E0A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003609Cu); - } -label_BFC1E09C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E09Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E09C: 10000005 beq $zero, $zero, 0xBFC1E0B4 */ - uint32_t psx_brA_BFC1E09C = cpu->gpr[0]; uint32_t psx_brB_BFC1E09C = cpu->gpr[0]; - psx_taken_BFC1E09C = (psx_brA_BFC1E09C == psx_brB_BFC1E09C); - psx_delay_BFC1E09C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E0A0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800360A0u); -#endif - if (psx_delay_BFC1E09C) { - psx_delay_BFC1E09C = 0; - if (psx_taken_BFC1E09C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360B4u); - goto label_BFC1E0B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800360A4u); - } -label_BFC1E0A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E0A4: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800360A4u); -#endif -label_BFC1E0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1E0A8: 3C0FA001 lui $t7, 0xA001 */ - cpu->gpr[15] = 0xA0010000u; - PGXP_ALU(0x3C0FA001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800360A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1E0AC: ADEEDFFC sw $t6, -8196($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360ACu); return; } g_debug_last_store_pc = 0x800360ACu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEEDFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800360ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E0B0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800360B0u); -#endif -label_BFC1E0B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360B4u); -#endif - /* 0xBFC1E0B4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800360B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E0B8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800360B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1E0BC: 03E00008 jr $ra */ - psx_delay_BFC1E0BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E0C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800360C0u); -#endif - if (psx_delay_BFC1E0BC) { - psx_delay_BFC1E0BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1E0C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E0C4u); - int psx_delay_BFC1E0D4 = 0; - int psx_delay_BFC1E0F4 = 0; - int psx_delay_BFC1E104 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1E0DCu: goto label_BFC1E0DC; - case 0xBFC1E0FCu: goto label_BFC1E0FC; - default: break; - } - } -label_BFC1E0C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E0C4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800360C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E0C8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800360C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1E0CC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360CCu); return; } g_debug_last_store_pc = 0x800360CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800360CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360D0u); -#endif - /* 0xBFC1E0D0: 8CA59EC4 lw $a1, -24892($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360D0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59EC4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800360D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E0D4: 0C016A7C jal 0xB005A9F0 */ - cpu->gpr[31] = 0x800360DCu; /* jal link before delay slot */ - psx_delay_BFC1E0D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E0D8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800360D8u); -#endif - if (psx_delay_BFC1E0D4) { - psx_delay_BFC1E0D4 = 0; - cpu->gpr[31] = 0x800360DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9F0u); - cpu->pc = 0x8005A9F0u; return; - } -label_BFC1E0DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E0DC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800360DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360E0u); -#endif - /* 0xBFC1E0E0: 8C429EC4 lw $v0, -24892($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429EC4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800360E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E0E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800360E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E0E8: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800360E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC1E0EC: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800360ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E0F0: AC229EC4 sw $v0, -24892($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360F0u); return; } g_debug_last_store_pc = 0x800360F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229EC4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800360F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E0F4: 0C016A7C jal 0xB005A9F0 */ - cpu->gpr[31] = 0x800360FCu; /* jal link before delay slot */ - psx_delay_BFC1E0F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E0F8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800360F8u); -#endif - if (psx_delay_BFC1E0F4) { - psx_delay_BFC1E0F4 = 0; - cpu->gpr[31] = 0x800360FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9F0u); - cpu->pc = 0x8005A9F0u; return; - } -label_BFC1E0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800360FCu); -#endif - /* 0xBFC1E0FC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800360FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800360FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E100: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80036100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1E104: 03E00008 jr $ra */ - psx_delay_BFC1E104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E108: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036108u); -#endif - if (psx_delay_BFC1E104) { - psx_delay_BFC1E104 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1E10C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E10Cu); - int psx_delay_BFC1E110 = 0; - int psx_taken_BFC1E110 = 0; - int psx_delay_BFC1E128 = 0; - int psx_taken_BFC1E128 = 0; - int psx_delay_BFC1E134 = 0; - int psx_taken_BFC1E134 = 0; - int psx_delay_BFC1E184 = 0; - int psx_delay_BFC1E18C = 0; - int psx_taken_BFC1E18C = 0; - int psx_delay_BFC1E194 = 0; - int psx_delay_BFC1E1A8 = 0; - int psx_taken_BFC1E1A8 = 0; - int psx_delay_BFC1E1C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1E118u: goto label_BFC1E118; - case 0xBFC1E130u: goto label_BFC1E130; - case 0xBFC1E13Cu: goto label_BFC1E13C; - case 0xBFC1E160u: goto label_BFC1E160; - case 0xBFC1E18Cu: goto label_BFC1E18C; - case 0xBFC1E194u: goto label_BFC1E194; - case 0xBFC1E19Cu: goto label_BFC1E19C; - case 0xBFC1E1B0u: goto label_BFC1E1B0; - case 0xBFC1E1B4u: goto label_BFC1E1B4; - default: break; - } - } -label_BFC1E10C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E10Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E10C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E110: 14800007 bne $a0, $zero, 0xBFC1E130 */ - uint32_t psx_brA_BFC1E110 = cpu->gpr[4]; uint32_t psx_brB_BFC1E110 = cpu->gpr[0]; - psx_taken_BFC1E110 = (psx_brA_BFC1E110 != psx_brB_BFC1E110); - psx_delay_BFC1E110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1E114: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036114u); return; } g_debug_last_store_pc = 0x80036114u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036114u); -#endif - if (psx_delay_BFC1E110) { - psx_delay_BFC1E110 = 0; - if (psx_taken_BFC1E110) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036130u); - goto label_BFC1E130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036118u); - } -label_BFC1E118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E118: 240E0025 addiu $t6, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x240E0025u, cpu->gpr[14], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x80036118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E11C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E120: AC2E9EA8 sw $t6, -24920($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036120u); return; } g_debug_last_store_pc = 0x80036120u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9EA8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E124: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E128: 1000000D beq $zero, $zero, 0xBFC1E160 */ - uint32_t psx_brA_BFC1E128 = cpu->gpr[0]; uint32_t psx_brB_BFC1E128 = cpu->gpr[0]; - psx_taken_BFC1E128 = (psx_brA_BFC1E128 == psx_brB_BFC1E128); - psx_delay_BFC1E128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E12C: AC206954 sw $zero, 26964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003612Cu); return; } g_debug_last_store_pc = 0x8003612Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206954u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003612Cu); -#endif - if (psx_delay_BFC1E128) { - psx_delay_BFC1E128 = 0; - if (psx_taken_BFC1E128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036160u); - goto label_BFC1E160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036130u); - } -label_BFC1E130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E130: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E134: 1481000A bne $a0, $at, 0xBFC1E160 */ - uint32_t psx_brA_BFC1E134 = cpu->gpr[4]; uint32_t psx_brB_BFC1E134 = cpu->gpr[1]; - psx_taken_BFC1E134 = (psx_brA_BFC1E134 != psx_brB_BFC1E134); - psx_delay_BFC1E134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036138u); -#endif - if (psx_delay_BFC1E134) { - psx_delay_BFC1E134 = 0; - if (psx_taken_BFC1E134) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036160u); - goto label_BFC1E160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003613Cu); - } -label_BFC1E13C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E13Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1E13C: 240F0027 addiu $t7, $zero, 39 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (39)); - PGXP_ALU(0x240F0027u, cpu->gpr[15], _pgx1, 0x00000027u); } -#ifdef PSX_COSIM - cosim_instr(0x8003613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E140: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1E144: AC2F9EA8 sw $t7, -24920($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036144u); return; } g_debug_last_store_pc = 0x80036144u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9EA8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E148: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1E14C: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E150: AC386954 sw $t8, 26964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036150u); return; } g_debug_last_store_pc = 0x80036150u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386954u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E154: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1E158: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1E15C: AC39695C sw $t9, 26972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003615Cu); return; } g_debug_last_store_pc = 0x8003615Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39695Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003615Cu); -#endif -label_BFC1E160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1E160: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036160u); -#endif - /* 0xBFC1E164: 8D086940 lw $t0, 26944($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036164u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086940u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E168: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E16C: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003616Cu); return; } g_debug_last_store_pc = 0x8003616Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003616Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E170: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E174: 24090011 addiu $t1, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24090011u, cpu->gpr[9], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x80036174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1E178: AC296944 sw $t1, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036178u); return; } g_debug_last_store_pc = 0x80036178u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296944u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E17C: 2404003E addiu $a0, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x2404003Eu, cpu->gpr[4], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1E180: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80036180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E184: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x8003618Cu; /* jal link before delay slot */ - psx_delay_BFC1E184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC1E188: AFA80024 sw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036188u); return; } g_debug_last_store_pc = 0x80036188u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036188u); -#endif - if (psx_delay_BFC1E184) { - psx_delay_BFC1E184 = 0; - cpu->gpr[31] = 0x8003618Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1E18C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E18Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E18C: 14400003 bne $v0, $zero, 0xBFC1E19C */ - uint32_t psx_brA_BFC1E18C = cpu->gpr[2]; uint32_t psx_brB_BFC1E18C = cpu->gpr[0]; - psx_taken_BFC1E18C = (psx_brA_BFC1E18C != psx_brB_BFC1E18C); - psx_delay_BFC1E18C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E190: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036190u); -#endif - if (psx_delay_BFC1E18C) { - psx_delay_BFC1E18C = 0; - if (psx_taken_BFC1E18C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003619Cu); - goto label_BFC1E19C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036194u); - } -label_BFC1E194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E194: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x8003619Cu; /* jal link before delay slot */ - psx_delay_BFC1E194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E198: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036198u); -#endif - if (psx_delay_BFC1E194) { - psx_delay_BFC1E194 = 0; - cpu->gpr[31] = 0x8003619Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1E19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1E19C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361A0u); -#endif - /* 0xBFC1E1A0: 8D4A9EB0 lw $t2, -24912($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361A0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9EB0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800361A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E1A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800361A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1E1A8: 11400002 beq $t2, $zero, 0xBFC1E1B4 */ - uint32_t psx_brA_BFC1E1A8 = cpu->gpr[10]; uint32_t psx_brB_BFC1E1A8 = cpu->gpr[0]; - psx_taken_BFC1E1A8 = (psx_brA_BFC1E1A8 == psx_brB_BFC1E1A8); - psx_delay_BFC1E1A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E1AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800361ACu); -#endif - if (psx_delay_BFC1E1A8) { - psx_delay_BFC1E1A8 = 0; - if (psx_taken_BFC1E1A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361B4u); - goto label_BFC1E1B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361B0u); - } -label_BFC1E1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E1B0: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361B0u); return; } g_debug_last_store_pc = 0x800361B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800361B0u); -#endif -label_BFC1E1B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E1B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361B4u); -#endif - /* 0xBFC1E1B4: 8FAB0024 lw $t3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361B4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0024u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800361B4u); -#endif - /* 0xBFC1E1B8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800361B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E1BC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800361BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E1C0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800361C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1E1C4: 03E00008 jr $ra */ - psx_delay_BFC1E1C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E1C8: AC2B6940 sw $t3, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361C8u); return; } g_debug_last_store_pc = 0x800361C8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B6940u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800361C8u); -#endif - if (psx_delay_BFC1E1C4) { - psx_delay_BFC1E1C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1E1CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E1CCu); - int psx_delay_BFC1E1E4 = 0; - int psx_taken_BFC1E1E4 = 0; - int psx_delay_BFC1E200 = 0; - int psx_delay_BFC1E208 = 0; - int psx_delay_BFC1E210 = 0; - int psx_taken_BFC1E210 = 0; - int psx_delay_BFC1E220 = 0; - int psx_delay_BFC1E258 = 0; - int psx_taken_BFC1E258 = 0; - int psx_delay_BFC1E260 = 0; - int psx_delay_BFC1E284 = 0; - int psx_taken_BFC1E284 = 0; - int psx_delay_BFC1E28C = 0; - int psx_delay_BFC1E2B0 = 0; - int psx_taken_BFC1E2B0 = 0; - int psx_delay_BFC1E2B8 = 0; - int psx_delay_BFC1E2C8 = 0; - int psx_taken_BFC1E2C8 = 0; - int psx_delay_BFC1E2D0 = 0; - int psx_delay_BFC1E2D8 = 0; - int psx_taken_BFC1E2D8 = 0; - int psx_delay_BFC1E2F8 = 0; - int psx_delay_BFC1E300 = 0; - int psx_taken_BFC1E300 = 0; - int psx_delay_BFC1E30C = 0; - int psx_delay_BFC1E314 = 0; - int psx_taken_BFC1E314 = 0; - int psx_delay_BFC1E31C = 0; - int psx_delay_BFC1E324 = 0; - int psx_taken_BFC1E324 = 0; - int psx_delay_BFC1E334 = 0; - int psx_delay_BFC1E33C = 0; - int psx_taken_BFC1E33C = 0; - int psx_delay_BFC1E348 = 0; - int psx_delay_BFC1E350 = 0; - int psx_taken_BFC1E350 = 0; - int psx_delay_BFC1E364 = 0; - int psx_delay_BFC1E36C = 0; - int psx_taken_BFC1E36C = 0; - int psx_delay_BFC1E374 = 0; - int psx_delay_BFC1E37C = 0; - int psx_taken_BFC1E37C = 0; - int psx_delay_BFC1E384 = 0; - int psx_delay_BFC1E390 = 0; - int psx_taken_BFC1E390 = 0; - int psx_delay_BFC1E39C = 0; - int psx_delay_BFC1E3A4 = 0; - int psx_taken_BFC1E3A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1E1ECu: goto label_BFC1E1EC; - case 0xBFC1E208u: goto label_BFC1E208; - case 0xBFC1E210u: goto label_BFC1E210; - case 0xBFC1E218u: goto label_BFC1E218; - case 0xBFC1E228u: goto label_BFC1E228; - case 0xBFC1E260u: goto label_BFC1E260; - case 0xBFC1E268u: goto label_BFC1E268; - case 0xBFC1E28Cu: goto label_BFC1E28C; - case 0xBFC1E294u: goto label_BFC1E294; - case 0xBFC1E2B8u: goto label_BFC1E2B8; - case 0xBFC1E2C0u: goto label_BFC1E2C0; - case 0xBFC1E2D0u: goto label_BFC1E2D0; - case 0xBFC1E2D8u: goto label_BFC1E2D8; - case 0xBFC1E2E0u: goto label_BFC1E2E0; - case 0xBFC1E300u: goto label_BFC1E300; - case 0xBFC1E308u: goto label_BFC1E308; - case 0xBFC1E314u: goto label_BFC1E314; - case 0xBFC1E31Cu: goto label_BFC1E31C; - case 0xBFC1E324u: goto label_BFC1E324; - case 0xBFC1E32Cu: goto label_BFC1E32C; - case 0xBFC1E33Cu: goto label_BFC1E33C; - case 0xBFC1E344u: goto label_BFC1E344; - case 0xBFC1E350u: goto label_BFC1E350; - case 0xBFC1E358u: goto label_BFC1E358; - case 0xBFC1E36Cu: goto label_BFC1E36C; - case 0xBFC1E374u: goto label_BFC1E374; - case 0xBFC1E37Cu: goto label_BFC1E37C; - case 0xBFC1E384u: goto label_BFC1E384; - case 0xBFC1E38Cu: goto label_BFC1E38C; - case 0xBFC1E398u: goto label_BFC1E398; - case 0xBFC1E3A4u: goto label_BFC1E3A4; - default: break; - } - } -label_BFC1E1CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E1CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E1CC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800361CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC1E1D0: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800361D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E1D4: AC246940 sw $a0, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361D4u); return; } g_debug_last_store_pc = 0x800361D4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246940u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800361D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1E1D8: 244EFFFE addiu $t6, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x244EFFFEu, cpu->gpr[14], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x800361D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E1DC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800361DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E1E0: 2DC10018 sltiu $at, $t6, 24 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0); - PGXP_ALU(0x2DC10018u, cpu->gpr[1], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0x800361E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E1E4: 10200075 beq $at, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E1E4 = cpu->gpr[1]; uint32_t psx_brB_BFC1E1E4 = cpu->gpr[0]; - psx_taken_BFC1E1E4 = (psx_brA_BFC1E1E4 == psx_brB_BFC1E1E4); - psx_delay_BFC1E1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1E1E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361E8u); return; } g_debug_last_store_pc = 0x800361E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800361E8u); -#endif - if (psx_delay_BFC1E1E4) { - psx_delay_BFC1E1E4 = 0; - if (psx_taken_BFC1E1E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361ECu); - } -label_BFC1E1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1E1EC: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800361ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800361F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E1F0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800361F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E1F4: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800361F4u); -#endif - /* 0xBFC1E1F8: 8C2EAC84 lw $t6, -21372($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21372; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800361F8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EAC84u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800361F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E1FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800361FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E200: 01C00008 jr $t6 */ - psx_delay_BFC1E200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036204u); -#endif - if (psx_delay_BFC1E200) { - psx_delay_BFC1E200 = 0; - /* jump table at 0x8005AC84, 24 entries */ - switch (cpu->gpr[14]) { - case 0x800362E0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362E0u); - goto label_BFC1E2E0; - case 0x80036398u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036398u); - goto label_BFC1E398; - case 0x80036344u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036344u); - goto label_BFC1E344; - case 0x80036384u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036384u); - goto label_BFC1E384; - case 0x800362D0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362D0u); - goto label_BFC1E2D0; - case 0x800362B8u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362B8u); - goto label_BFC1E2B8; - case 0x8003631Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003631Cu); - goto label_BFC1E31C; - case 0x80036208u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036208u); - goto label_BFC1E208; - case 0x8003632Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003632Cu); - goto label_BFC1E32C; - case 0x80036260u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036260u); - goto label_BFC1E260; - case 0x8003628Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003628Cu); - goto label_BFC1E28C; - case 0x80036218u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036218u); - goto label_BFC1E218; - case 0x80036358u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036358u); - goto label_BFC1E358; - case 0x80036374u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036374u); - goto label_BFC1E374; - case 0x80036308u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036308u); - goto label_BFC1E308; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } - } -label_BFC1E208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E208: 0C00E2F9 jal 0xB0038BE4 */ - cpu->gpr[31] = 0x80036210u; /* jal link before delay slot */ - psx_delay_BFC1E208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E20C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003620Cu); -#endif - if (psx_delay_BFC1E208) { - psx_delay_BFC1E208 = 0; - cpu->gpr[31] = 0x80036210u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038BE4u); - cpu->pc = 0x80038BE4u; return; - } -label_BFC1E210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E210: 1000006B beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E210 = cpu->gpr[0]; uint32_t psx_brB_BFC1E210 = cpu->gpr[0]; - psx_taken_BFC1E210 = (psx_brA_BFC1E210 == psx_brB_BFC1E210); - psx_delay_BFC1E210 = 1; - /* 0xBFC1E214: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036214u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036214u); -#endif - if (psx_delay_BFC1E210) { - psx_delay_BFC1E210 = 0; - if (psx_taken_BFC1E210) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036218u); - } -label_BFC1E218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E218: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036218u); -#endif - /* 0xBFC1E21C: 90849EB8 lbu $a0, -24904($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24904; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24904)), 4, 0x10u); - PGXP_LOAD(0x90849EB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E220: 0C00E3C9 jal 0xB0038F24 */ - cpu->gpr[31] = 0x80036228u; /* jal link before delay slot */ - psx_delay_BFC1E220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E224: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036224u); -#endif - if (psx_delay_BFC1E220) { - psx_delay_BFC1E220 = 0; - cpu->gpr[31] = 0x80036228u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F24u); - cpu->pc = 0x80038F24u; return; - } -label_BFC1E228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1E228: 240F0033 addiu $t7, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x240F0033u, cpu->gpr[15], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80036228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E22C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1E230: AC2F6948 sw $t7, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036230u); return; } g_debug_last_store_pc = 0x80036230u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E234: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1E238: 24180033 addiu $t8, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24180033u, cpu->gpr[24], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80036238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E23C: AC386940 sw $t8, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003623Cu); return; } g_debug_last_store_pc = 0x8003623Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386940u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E240: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1E244: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80036244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1E248: AC399E74 sw $t9, -24972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036248u); return; } g_debug_last_store_pc = 0x80036248u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E24C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E250: AC209E48 sw $zero, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036250u); return; } g_debug_last_store_pc = 0x80036250u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E254: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E258: 10000058 beq $zero, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E258 = cpu->gpr[0]; uint32_t psx_brB_BFC1E258 = cpu->gpr[0]; - psx_taken_BFC1E258 = (psx_brA_BFC1E258 == psx_brB_BFC1E258); - psx_delay_BFC1E258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E25C: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003625Cu); return; } g_debug_last_store_pc = 0x8003625Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003625Cu); -#endif - if (psx_delay_BFC1E258) { - psx_delay_BFC1E258 = 0; - if (psx_taken_BFC1E258) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036260u); - } -label_BFC1E260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E260: 0C00E3E3 jal 0xB0038F8C */ - cpu->gpr[31] = 0x80036268u; /* jal link before delay slot */ - psx_delay_BFC1E260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E264: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036264u); -#endif - if (psx_delay_BFC1E260) { - psx_delay_BFC1E260 = 0; - cpu->gpr[31] = 0x80036268u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F8Cu); - cpu->pc = 0x80038F8Cu; return; - } -label_BFC1E268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1E268: 2408003A addiu $t0, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2408003Au, cpu->gpr[8], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80036268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E26C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003626Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1E270: AC286948 sw $t0, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036270u); return; } g_debug_last_store_pc = 0x80036270u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286948u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E274: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E278: 2409003A addiu $t1, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2409003Au, cpu->gpr[9], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80036278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1E27C: AC296940 sw $t1, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003627Cu); return; } g_debug_last_store_pc = 0x8003627Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296940u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E280: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E284: 1000004D beq $zero, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E284 = cpu->gpr[0]; uint32_t psx_brB_BFC1E284 = cpu->gpr[0]; - psx_taken_BFC1E284 = (psx_brA_BFC1E284 == psx_brB_BFC1E284); - psx_delay_BFC1E284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E288: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036288u); return; } g_debug_last_store_pc = 0x80036288u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036288u); -#endif - if (psx_delay_BFC1E284) { - psx_delay_BFC1E284 = 0; - if (psx_taken_BFC1E284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003628Cu); - } -label_BFC1E28C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E28Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E28C: 0C00E3FA jal 0xB0038FE8 */ - cpu->gpr[31] = 0x80036294u; /* jal link before delay slot */ - psx_delay_BFC1E28C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036290u); -#endif - if (psx_delay_BFC1E28C) { - psx_delay_BFC1E28C = 0; - cpu->gpr[31] = 0x80036294u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FE8u); - cpu->pc = 0x80038FE8u; return; - } -label_BFC1E294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1E294: 240A003B addiu $t2, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x240A003Bu, cpu->gpr[10], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80036294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E298: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1E29C: AC2A6948 sw $t2, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003629Cu); return; } g_debug_last_store_pc = 0x8003629Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6948u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003629Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E2A0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800362A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1E2A4: 240B003B addiu $t3, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x240B003Bu, cpu->gpr[11], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800362A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E2A8: AC2B6940 sw $t3, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362A8u); return; } g_debug_last_store_pc = 0x800362A8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B6940u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800362A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E2AC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800362ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2B0: 10000042 beq $zero, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E2B0 = cpu->gpr[0]; uint32_t psx_brB_BFC1E2B0 = cpu->gpr[0]; - psx_taken_BFC1E2B0 = (psx_brA_BFC1E2B0 == psx_brB_BFC1E2B0); - psx_delay_BFC1E2B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E2B4: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362B4u); return; } g_debug_last_store_pc = 0x800362B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800362B4u); -#endif - if (psx_delay_BFC1E2B0) { - psx_delay_BFC1E2B0 = 0; - if (psx_taken_BFC1E2B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362B8u); - } -label_BFC1E2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E2B8: 0C00E3B2 jal 0xB0038EC8 */ - cpu->gpr[31] = 0x800362C0u; /* jal link before delay slot */ - psx_delay_BFC1E2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800362BCu); -#endif - if (psx_delay_BFC1E2B8) { - psx_delay_BFC1E2B8 = 0; - cpu->gpr[31] = 0x800362C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EC8u); - cpu->pc = 0x80038EC8u; return; - } -label_BFC1E2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1E2C0: 240C000B addiu $t4, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x240C000Bu, cpu->gpr[12], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800362C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E2C4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800362C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2C8: 1000003C beq $zero, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E2C8 = cpu->gpr[0]; uint32_t psx_brB_BFC1E2C8 = cpu->gpr[0]; - psx_taken_BFC1E2C8 = (psx_brA_BFC1E2C8 == psx_brB_BFC1E2C8); - psx_delay_BFC1E2C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1E2CC: AC2C6948 sw $t4, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362CCu); return; } g_debug_last_store_pc = 0x800362CCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800362CCu); -#endif - if (psx_delay_BFC1E2C8) { - psx_delay_BFC1E2C8 = 0; - if (psx_taken_BFC1E2C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362D0u); - } -label_BFC1E2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E2D0: 0C00E384 jal 0xB0038E10 */ - cpu->gpr[31] = 0x800362D8u; /* jal link before delay slot */ - psx_delay_BFC1E2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800362D4u); -#endif - if (psx_delay_BFC1E2D0) { - psx_delay_BFC1E2D0 = 0; - cpu->gpr[31] = 0x800362D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E10u); - cpu->pc = 0x80038E10u; return; - } -label_BFC1E2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2D8: 10000039 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E2D8 = cpu->gpr[0]; uint32_t psx_brB_BFC1E2D8 = cpu->gpr[0]; - psx_taken_BFC1E2D8 = (psx_brA_BFC1E2D8 == psx_brB_BFC1E2D8); - psx_delay_BFC1E2D8 = 1; - /* 0xBFC1E2DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800362DCu); -#endif - if (psx_delay_BFC1E2D8) { - psx_delay_BFC1E2D8 = 0; - if (psx_taken_BFC1E2D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800362E0u); - } -label_BFC1E2E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E2E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1E2E0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800362E0u); -#endif - /* 0xBFC1E2E4: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362E4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800362E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E2E8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800362E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1E2EC: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800362ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800362F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1E2F0: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800362F0u); -#endif - /* 0xBFC1E2F4: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800362F4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800362F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E2F8: 0C00E319 jal 0xB0038C64 */ - cpu->gpr[31] = 0x80036300u; /* jal link before delay slot */ - psx_delay_BFC1E2F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800362FCu); -#endif - if (psx_delay_BFC1E2F8) { - psx_delay_BFC1E2F8 = 0; - cpu->gpr[31] = 0x80036300u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C64u); - cpu->pc = 0x80038C64u; return; - } -label_BFC1E300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E300: 1000002F beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E300 = cpu->gpr[0]; uint32_t psx_brB_BFC1E300 = cpu->gpr[0]; - psx_taken_BFC1E300 = (psx_brA_BFC1E300 == psx_brB_BFC1E300); - psx_delay_BFC1E300 = 1; - /* 0xBFC1E304: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036304u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036304u); -#endif - if (psx_delay_BFC1E300) { - psx_delay_BFC1E300 = 0; - if (psx_taken_BFC1E300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036308u); - } -label_BFC1E308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E308: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E30C: 0C00E339 jal 0xB0038CE4 */ - cpu->gpr[31] = 0x80036314u; /* jal link before delay slot */ - psx_delay_BFC1E30C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E310: 24849E94 addiu $a0, $a0, -24940 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24940)); - PGXP_ALU(0x24849E94u, cpu->gpr[4], _pgx1, 0xFFFF9E94u); } -#ifdef PSX_COSIM - cosim_instr(0x80036310u); -#endif - if (psx_delay_BFC1E30C) { - psx_delay_BFC1E30C = 0; - cpu->gpr[31] = 0x80036314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CE4u); - cpu->pc = 0x80038CE4u; return; - } -label_BFC1E314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E314: 1000002A beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E314 = cpu->gpr[0]; uint32_t psx_brB_BFC1E314 = cpu->gpr[0]; - psx_taken_BFC1E314 = (psx_brA_BFC1E314 == psx_brB_BFC1E314); - psx_delay_BFC1E314 = 1; - /* 0xBFC1E318: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036318u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036318u); -#endif - if (psx_delay_BFC1E314) { - psx_delay_BFC1E314 = 0; - if (psx_taken_BFC1E314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003631Cu); - } -label_BFC1E31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003631Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E31C: 0C00E44A jal 0xB0039128 */ - cpu->gpr[31] = 0x80036324u; /* jal link before delay slot */ - psx_delay_BFC1E31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036320u); -#endif - if (psx_delay_BFC1E31C) { - psx_delay_BFC1E31C = 0; - cpu->gpr[31] = 0x80036324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039128u); - cpu->pc = 0x80039128u; return; - } -label_BFC1E324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E324: 10000026 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E324 = cpu->gpr[0]; uint32_t psx_brB_BFC1E324 = cpu->gpr[0]; - psx_taken_BFC1E324 = (psx_brA_BFC1E324 == psx_brB_BFC1E324); - psx_delay_BFC1E324 = 1; - /* 0xBFC1E328: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036328u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036328u); -#endif - if (psx_delay_BFC1E324) { - psx_delay_BFC1E324 = 0; - if (psx_taken_BFC1E324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003632Cu); - } -label_BFC1E32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E32C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036330u); -#endif - /* 0xBFC1E330: 8C849EA8 lw $a0, -24920($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24920; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036330u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849EA8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E334: 0C00E411 jal 0xB0039044 */ - cpu->gpr[31] = 0x8003633Cu; /* jal link before delay slot */ - psx_delay_BFC1E334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E338: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036338u); -#endif - if (psx_delay_BFC1E334) { - psx_delay_BFC1E334 = 0; - cpu->gpr[31] = 0x8003633Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039044u); - cpu->pc = 0x80039044u; return; - } -label_BFC1E33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003633Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E33C: 10000020 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E33C = cpu->gpr[0]; uint32_t psx_brB_BFC1E33C = cpu->gpr[0]; - psx_taken_BFC1E33C = (psx_brA_BFC1E33C == psx_brB_BFC1E33C); - psx_delay_BFC1E33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036340u); -#endif - /* 0xBFC1E340: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036340u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036340u); -#endif - if (psx_delay_BFC1E33C) { - psx_delay_BFC1E33C = 0; - if (psx_taken_BFC1E33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036344u); - } -label_BFC1E344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E344: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E348: 0C00E430 jal 0xB00390C0 */ - cpu->gpr[31] = 0x80036350u; /* jal link before delay slot */ - psx_delay_BFC1E348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E34C: 24849EB4 addiu $a0, $a0, -24908 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24908)); - PGXP_ALU(0x24849EB4u, cpu->gpr[4], _pgx1, 0xFFFF9EB4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003634Cu); -#endif - if (psx_delay_BFC1E348) { - psx_delay_BFC1E348 = 0; - cpu->gpr[31] = 0x80036350u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390C0u); - cpu->pc = 0x800390C0u; return; - } -label_BFC1E350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E350: 1000001B beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E350 = cpu->gpr[0]; uint32_t psx_brB_BFC1E350 = cpu->gpr[0]; - psx_taken_BFC1E350 = (psx_brA_BFC1E350 == psx_brB_BFC1E350); - psx_delay_BFC1E350 = 1; - /* 0xBFC1E354: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036354u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036354u); -#endif - if (psx_delay_BFC1E350) { - psx_delay_BFC1E350 = 0; - if (psx_taken_BFC1E350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036358u); - } -label_BFC1E358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E358: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E35C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003635Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E360: 24A5A108 addiu $a1, $a1, -24312 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24312)); - PGXP_ALU(0x24A5A108u, cpu->gpr[5], _pgx1, 0xFFFFA108u); } -#ifdef PSX_COSIM - cosim_instr(0x80036360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E364: 0C00E480 jal 0xB0039200 */ - cpu->gpr[31] = 0x8003636Cu; /* jal link before delay slot */ - psx_delay_BFC1E364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E368: 2484A100 addiu $a0, $a0, -24320 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24320)); - PGXP_ALU(0x2484A100u, cpu->gpr[4], _pgx1, 0xFFFFA100u); } -#ifdef PSX_COSIM - cosim_instr(0x80036368u); -#endif - if (psx_delay_BFC1E364) { - psx_delay_BFC1E364 = 0; - cpu->gpr[31] = 0x8003636Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039200u); - cpu->pc = 0x80039200u; return; - } -label_BFC1E36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003636Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E36C: 10000014 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E36C = cpu->gpr[0]; uint32_t psx_brB_BFC1E36C = cpu->gpr[0]; - psx_taken_BFC1E36C = (psx_brA_BFC1E36C == psx_brB_BFC1E36C); - psx_delay_BFC1E36C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036370u); -#endif - /* 0xBFC1E370: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036370u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036370u); -#endif - if (psx_delay_BFC1E36C) { - psx_delay_BFC1E36C = 0; - if (psx_taken_BFC1E36C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036374u); - } -label_BFC1E374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E374: 0C00E4B1 jal 0xB00392C4 */ - cpu->gpr[31] = 0x8003637Cu; /* jal link before delay slot */ - psx_delay_BFC1E374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036378u); -#endif - if (psx_delay_BFC1E374) { - psx_delay_BFC1E374 = 0; - cpu->gpr[31] = 0x8003637Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392C4u); - cpu->pc = 0x800392C4u; return; - } -label_BFC1E37C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E37Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003637Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E37C: 10000010 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E37C = cpu->gpr[0]; uint32_t psx_brB_BFC1E37C = cpu->gpr[0]; - psx_taken_BFC1E37C = (psx_brA_BFC1E37C == psx_brB_BFC1E37C); - psx_delay_BFC1E37C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036380u); -#endif - /* 0xBFC1E380: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036380u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80036380u); -#endif - if (psx_delay_BFC1E37C) { - psx_delay_BFC1E37C = 0; - if (psx_taken_BFC1E37C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036384u); - } -label_BFC1E384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E384: 0C00E36D jal 0xB0038DB4 */ - cpu->gpr[31] = 0x8003638Cu; /* jal link before delay slot */ - psx_delay_BFC1E384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036388u); -#endif - if (psx_delay_BFC1E384) { - psx_delay_BFC1E384 = 0; - cpu->gpr[31] = 0x8003638Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DB4u); - cpu->pc = 0x80038DB4u; return; - } -label_BFC1E38C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E38Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003638Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E38C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003638Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E390: 1000000A beq $zero, $zero, 0xBFC1E3BC */ - uint32_t psx_brA_BFC1E390 = cpu->gpr[0]; uint32_t psx_brB_BFC1E390 = cpu->gpr[0]; - psx_taken_BFC1E390 = (psx_brA_BFC1E390 == psx_brB_BFC1E390); - psx_delay_BFC1E390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E394: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036394u); return; } g_debug_last_store_pc = 0x80036394u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036394u); -#endif - if (psx_delay_BFC1E390) { - psx_delay_BFC1E390 = 0; - if (psx_taken_BFC1E390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - cpu->pc = 0x800363BCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036398u); - } -label_BFC1E398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E398: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E39C: 0C00E353 jal 0xB0038D4C */ - cpu->gpr[31] = 0x800363A4u; /* jal link before delay slot */ - psx_delay_BFC1E39C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E3A0: 24849E98 addiu $a0, $a0, -24936 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24936)); - PGXP_ALU(0x24849E98u, cpu->gpr[4], _pgx1, 0xFFFF9E98u); } -#ifdef PSX_COSIM - cosim_instr(0x800363A0u); -#endif - if (psx_delay_BFC1E39C) { - psx_delay_BFC1E39C = 0; - cpu->gpr[31] = 0x800363A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D4Cu); - cpu->pc = 0x80038D4Cu; return; - } -label_BFC1E3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3A4: 10000006 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E3A4 = cpu->gpr[0]; uint32_t psx_brB_BFC1E3A4 = cpu->gpr[0]; - psx_taken_BFC1E3A4 = (psx_brA_BFC1E3A4 == psx_brB_BFC1E3A4); - psx_delay_BFC1E3A4 = 1; - /* 0xBFC1E3A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800363A8u); -#endif - if (psx_delay_BFC1E3A4) { - psx_delay_BFC1E3A4 = 0; - if (psx_taken_BFC1E3A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363ACu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363ACu); - cpu->pc = 0x800363ACu; return; /* fallthrough */ -} - -void SCPH1001_func_1FC1E3AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E3ACu); - int psx_delay_BFC1E3AC = 0; - int psx_delay_BFC1E3B4 = 0; - int psx_taken_BFC1E3B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1E3BCu: goto label_BFC1E3BC; - case 0xBFC1E3B4u: goto label_BFC1E3B4; - default: break; - } - } -label_BFC1E3AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E3AC: 0C00E4C8 jal 0xB0039320 */ - cpu->gpr[31] = 0x800363B4u; /* jal link before delay slot */ - psx_delay_BFC1E3AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800363B0u); -#endif - if (psx_delay_BFC1E3AC) { - psx_delay_BFC1E3AC = 0; - cpu->gpr[31] = 0x800363B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039320u); - cpu->pc = 0x80039320u; return; - } -label_BFC1E3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3B4: 10000002 beq $zero, $zero, 0xBFC1E3C0 */ - uint32_t psx_brA_BFC1E3B4 = cpu->gpr[0]; uint32_t psx_brB_BFC1E3B4 = cpu->gpr[0]; - psx_taken_BFC1E3B4 = (psx_brA_BFC1E3B4 == psx_brB_BFC1E3B4); - psx_delay_BFC1E3B4 = 1; - /* 0xBFC1E3B8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800363B8u); -#endif - if (psx_delay_BFC1E3B4) { - psx_delay_BFC1E3B4 = 0; - if (psx_taken_BFC1E3B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363BCu); - } -label_BFC1E3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363BCu); -#endif - /* 0xBFC1E3BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800363BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363C0u); - cpu->pc = 0x800363C0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC1E3C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E3C0u); - int psx_delay_BFC1E3C4 = 0; -label_BFC1E3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E3C0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800363C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1E3C4: 03E00008 jr $ra */ - psx_delay_BFC1E3C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800363C8u); -#endif - if (psx_delay_BFC1E3C4) { - psx_delay_BFC1E3C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1E3CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1E3CCu); - int psx_delay_BFC1E3DC = 0; - int psx_delay_BFC1E3E8 = 0; - int psx_taken_BFC1E3E8 = 0; - int psx_delay_BFC1E408 = 0; - int psx_taken_BFC1E408 = 0; - int psx_delay_BFC1E424 = 0; - int psx_delay_BFC1E440 = 0; - int psx_delay_BFC1E448 = 0; - int psx_taken_BFC1E448 = 0; - int psx_delay_BFC1E46C = 0; - int psx_delay_BFC1E474 = 0; - int psx_taken_BFC1E474 = 0; - int psx_delay_BFC1E484 = 0; - int psx_taken_BFC1E484 = 0; - int psx_delay_BFC1E4B8 = 0; - int psx_taken_BFC1E4B8 = 0; - int psx_delay_BFC1E4D4 = 0; - int psx_delay_BFC1E4E4 = 0; - int psx_taken_BFC1E4E4 = 0; - int psx_delay_BFC1E500 = 0; - int psx_taken_BFC1E500 = 0; - int psx_delay_BFC1E510 = 0; - int psx_taken_BFC1E510 = 0; - int psx_delay_BFC1E520 = 0; - int psx_taken_BFC1E520 = 0; - int psx_delay_BFC1E530 = 0; - int psx_taken_BFC1E530 = 0; - int psx_delay_BFC1E540 = 0; - int psx_taken_BFC1E540 = 0; - int psx_delay_BFC1E550 = 0; - int psx_taken_BFC1E550 = 0; - int psx_delay_BFC1E560 = 0; - int psx_taken_BFC1E560 = 0; - int psx_delay_BFC1E570 = 0; - int psx_taken_BFC1E570 = 0; - int psx_delay_BFC1E584 = 0; - int psx_taken_BFC1E584 = 0; - int psx_delay_BFC1E59C = 0; - int psx_delay_BFC1E5B0 = 0; - int psx_taken_BFC1E5B0 = 0; - int psx_delay_BFC1E5BC = 0; - int psx_taken_BFC1E5BC = 0; - int psx_delay_BFC1E5DC = 0; - int psx_taken_BFC1E5DC = 0; - int psx_delay_BFC1E5E4 = 0; - int psx_taken_BFC1E5E4 = 0; - int psx_delay_BFC1E61C = 0; - int psx_taken_BFC1E61C = 0; - int psx_delay_BFC1E638 = 0; - int psx_delay_BFC1E644 = 0; - int psx_taken_BFC1E644 = 0; - int psx_delay_BFC1E64C = 0; - int psx_delay_BFC1E660 = 0; - int psx_taken_BFC1E660 = 0; - int psx_delay_BFC1E674 = 0; - int psx_taken_BFC1E674 = 0; - int psx_delay_BFC1E68C = 0; - int psx_delay_BFC1E69C = 0; - int psx_delay_BFC1E6B4 = 0; - int psx_delay_BFC1E6CC = 0; - int psx_taken_BFC1E6CC = 0; - int psx_delay_BFC1E6DC = 0; - int psx_delay_BFC1E6F4 = 0; - int psx_delay_BFC1E700 = 0; - int psx_taken_BFC1E700 = 0; - int psx_delay_BFC1E710 = 0; - int psx_delay_BFC1E728 = 0; - int psx_delay_BFC1E744 = 0; - int psx_taken_BFC1E744 = 0; - int psx_delay_BFC1E788 = 0; - int psx_taken_BFC1E788 = 0; - int psx_delay_BFC1E790 = 0; - int psx_delay_BFC1E798 = 0; - int psx_taken_BFC1E798 = 0; - int psx_delay_BFC1E7A0 = 0; - int psx_delay_BFC1E7A8 = 0; - int psx_taken_BFC1E7A8 = 0; - int psx_delay_BFC1E7B0 = 0; - int psx_delay_BFC1E7BC = 0; - int psx_taken_BFC1E7BC = 0; - int psx_delay_BFC1E7D0 = 0; - int psx_delay_BFC1E7D8 = 0; - int psx_taken_BFC1E7D8 = 0; - int psx_delay_BFC1E7F8 = 0; - int psx_taken_BFC1E7F8 = 0; - int psx_delay_BFC1E804 = 0; - int psx_delay_BFC1E81C = 0; - int psx_taken_BFC1E81C = 0; - int psx_delay_BFC1E838 = 0; - int psx_taken_BFC1E838 = 0; - int psx_delay_BFC1E844 = 0; - int psx_delay_BFC1E85C = 0; - int psx_taken_BFC1E85C = 0; - int psx_delay_BFC1E86C = 0; - int psx_delay_BFC1E878 = 0; - int psx_taken_BFC1E878 = 0; - int psx_delay_BFC1E894 = 0; - int psx_taken_BFC1E894 = 0; - int psx_delay_BFC1E8A4 = 0; - int psx_delay_BFC1E8D4 = 0; - int psx_delay_BFC1E8E0 = 0; - int psx_taken_BFC1E8E0 = 0; - int psx_delay_BFC1E8E8 = 0; - int psx_delay_BFC1E8F4 = 0; - int psx_taken_BFC1E8F4 = 0; - int psx_delay_BFC1E908 = 0; - int psx_taken_BFC1E908 = 0; - int psx_delay_BFC1E910 = 0; - int psx_delay_BFC1E924 = 0; - int psx_delay_BFC1E92C = 0; - int psx_taken_BFC1E92C = 0; - int psx_delay_BFC1E94C = 0; - int psx_delay_BFC1E954 = 0; - int psx_taken_BFC1E954 = 0; - int psx_delay_BFC1E95C = 0; - int psx_delay_BFC1E964 = 0; - int psx_taken_BFC1E964 = 0; - int psx_delay_BFC1E96C = 0; - int psx_delay_BFC1E984 = 0; - int psx_taken_BFC1E984 = 0; - int psx_delay_BFC1E998 = 0; - int psx_taken_BFC1E998 = 0; - int psx_delay_BFC1E9AC = 0; - int psx_taken_BFC1E9AC = 0; - int psx_delay_BFC1E9C0 = 0; - int psx_taken_BFC1E9C0 = 0; - int psx_delay_BFC1E9C8 = 0; - int psx_delay_BFC1E9D0 = 0; - int psx_taken_BFC1E9D0 = 0; - int psx_delay_BFC1E9F0 = 0; - int psx_delay_BFC1E9F8 = 0; - int psx_taken_BFC1E9F8 = 0; - int psx_delay_BFC1EA00 = 0; - int psx_delay_BFC1EA08 = 0; - int psx_taken_BFC1EA08 = 0; - int psx_delay_BFC1EA10 = 0; - int psx_delay_BFC1EA18 = 0; - int psx_taken_BFC1EA18 = 0; - int psx_delay_BFC1EA24 = 0; - int psx_delay_BFC1EA2C = 0; - int psx_taken_BFC1EA2C = 0; - int psx_delay_BFC1EA58 = 0; - int psx_delay_BFC1EA70 = 0; - int psx_taken_BFC1EA70 = 0; - int psx_delay_BFC1EA98 = 0; - int psx_taken_BFC1EA98 = 0; - int psx_delay_BFC1EAA0 = 0; - int psx_delay_BFC1EAA8 = 0; - int psx_taken_BFC1EAA8 = 0; - int psx_delay_BFC1EAB8 = 0; - int psx_delay_BFC1EAC0 = 0; - int psx_taken_BFC1EAC0 = 0; - int psx_delay_BFC1EAC8 = 0; - int psx_delay_BFC1EADC = 0; - int psx_taken_BFC1EADC = 0; - int psx_delay_BFC1EAE4 = 0; - int psx_delay_BFC1EAEC = 0; - int psx_delay_BFC1EAF4 = 0; - int psx_taken_BFC1EAF4 = 0; - int psx_delay_BFC1EB08 = 0; - int psx_taken_BFC1EB08 = 0; - int psx_delay_BFC1EB14 = 0; - int psx_delay_BFC1EB1C = 0; - int psx_taken_BFC1EB1C = 0; - int psx_delay_BFC1EB48 = 0; - int psx_delay_BFC1EB60 = 0; - int psx_taken_BFC1EB60 = 0; - int psx_delay_BFC1EB6C = 0; - int psx_taken_BFC1EB6C = 0; - int psx_delay_BFC1EB8C = 0; - int psx_taken_BFC1EB8C = 0; - int psx_delay_BFC1EB94 = 0; - int psx_delay_BFC1EB9C = 0; - int psx_taken_BFC1EB9C = 0; - int psx_delay_BFC1EBA4 = 0; - int psx_delay_BFC1EBB0 = 0; - int psx_taken_BFC1EBB0 = 0; - int psx_delay_BFC1EBB8 = 0; - int psx_delay_BFC1EBC0 = 0; - int psx_taken_BFC1EBC0 = 0; - int psx_delay_BFC1EBD4 = 0; - int psx_taken_BFC1EBD4 = 0; - int psx_delay_BFC1EBE8 = 0; - int psx_taken_BFC1EBE8 = 0; - int psx_delay_BFC1EBF8 = 0; - int psx_delay_BFC1EC14 = 0; - int psx_taken_BFC1EC14 = 0; - int psx_delay_BFC1EC1C = 0; - int psx_delay_BFC1EC24 = 0; - int psx_taken_BFC1EC24 = 0; - int psx_delay_BFC1EC44 = 0; - int psx_delay_BFC1EC4C = 0; - int psx_taken_BFC1EC4C = 0; - int psx_delay_BFC1EC6C = 0; - int psx_delay_BFC1EC74 = 0; - int psx_taken_BFC1EC74 = 0; - int psx_delay_BFC1EC98 = 0; - int psx_taken_BFC1EC98 = 0; - int psx_delay_BFC1ECA0 = 0; - int psx_delay_BFC1ECA8 = 0; - int psx_taken_BFC1ECA8 = 0; - int psx_delay_BFC1ECC8 = 0; - int psx_delay_BFC1ECD0 = 0; - int psx_delay_BFC1ECD8 = 0; - int psx_taken_BFC1ECD8 = 0; - int psx_delay_BFC1ECF8 = 0; - int psx_taken_BFC1ECF8 = 0; - int psx_delay_BFC1ED14 = 0; - int psx_delay_BFC1ED2C = 0; - int psx_taken_BFC1ED2C = 0; - int psx_delay_BFC1ED38 = 0; - int psx_taken_BFC1ED38 = 0; - int psx_delay_BFC1ED40 = 0; - int psx_delay_BFC1ED48 = 0; - int psx_taken_BFC1ED48 = 0; - int psx_delay_BFC1ED5C = 0; - int psx_taken_BFC1ED5C = 0; - int psx_delay_BFC1ED70 = 0; - int psx_taken_BFC1ED70 = 0; - int psx_delay_BFC1ED78 = 0; - int psx_delay_BFC1ED80 = 0; - int psx_taken_BFC1ED80 = 0; - int psx_delay_BFC1ED88 = 0; - int psx_delay_BFC1ED90 = 0; - int psx_delay_BFC1ED98 = 0; - int psx_taken_BFC1ED98 = 0; - int psx_delay_BFC1EDAC = 0; - int psx_taken_BFC1EDAC = 0; - int psx_delay_BFC1EDCC = 0; - int psx_taken_BFC1EDCC = 0; - int psx_delay_BFC1EDE8 = 0; - int psx_delay_BFC1EE00 = 0; - int psx_taken_BFC1EE00 = 0; - int psx_delay_BFC1EE0C = 0; - int psx_taken_BFC1EE0C = 0; - int psx_delay_BFC1EE14 = 0; - int psx_delay_BFC1EE1C = 0; - int psx_taken_BFC1EE1C = 0; - int psx_delay_BFC1EE24 = 0; - int psx_delay_BFC1EE2C = 0; - int psx_taken_BFC1EE2C = 0; - int psx_delay_BFC1EE40 = 0; - int psx_taken_BFC1EE40 = 0; - int psx_delay_BFC1EE54 = 0; - int psx_taken_BFC1EE54 = 0; - int psx_delay_BFC1EE68 = 0; - int psx_taken_BFC1EE68 = 0; - int psx_delay_BFC1EE70 = 0; - int psx_delay_BFC1EE78 = 0; - int psx_taken_BFC1EE78 = 0; - int psx_delay_BFC1EE98 = 0; - int psx_delay_BFC1EEA0 = 0; - int psx_taken_BFC1EEA0 = 0; - int psx_delay_BFC1EEA8 = 0; - int psx_delay_BFC1EEB0 = 0; - int psx_taken_BFC1EEB0 = 0; - int psx_delay_BFC1EEB8 = 0; - int psx_delay_BFC1EECC = 0; - int psx_taken_BFC1EECC = 0; - int psx_delay_BFC1EED8 = 0; - int psx_delay_BFC1EEE4 = 0; - int psx_taken_BFC1EEE4 = 0; - int psx_delay_BFC1EF20 = 0; - int psx_taken_BFC1EF20 = 0; - int psx_delay_BFC1EF2C = 0; - int psx_taken_BFC1EF2C = 0; - int psx_delay_BFC1EF38 = 0; - int psx_delay_BFC1EF44 = 0; - int psx_taken_BFC1EF44 = 0; - int psx_delay_BFC1EF54 = 0; - int psx_taken_BFC1EF54 = 0; - int psx_delay_BFC1EF7C = 0; - int psx_taken_BFC1EF7C = 0; - int psx_delay_BFC1EF84 = 0; - int psx_delay_BFC1EF94 = 0; - int psx_delay_BFC1EF9C = 0; - int psx_taken_BFC1EF9C = 0; - int psx_delay_BFC1EFBC = 0; - int psx_delay_BFC1EFE4 = 0; - int psx_taken_BFC1EFE4 = 0; - int psx_delay_BFC1EFEC = 0; - int psx_delay_BFC1EFF4 = 0; - int psx_taken_BFC1EFF4 = 0; - int psx_delay_BFC1F014 = 0; - int psx_delay_BFC1F01C = 0; - int psx_taken_BFC1F01C = 0; - int psx_delay_BFC1F030 = 0; - int psx_taken_BFC1F030 = 0; - int psx_delay_BFC1F048 = 0; - int psx_delay_BFC1F050 = 0; - int psx_taken_BFC1F050 = 0; - int psx_delay_BFC1F05C = 0; - int psx_taken_BFC1F05C = 0; - int psx_delay_BFC1F070 = 0; - int psx_taken_BFC1F070 = 0; - int psx_delay_BFC1F084 = 0; - int psx_taken_BFC1F084 = 0; - int psx_delay_BFC1F098 = 0; - int psx_taken_BFC1F098 = 0; - int psx_delay_BFC1F0A0 = 0; - int psx_delay_BFC1F0B0 = 0; - int psx_taken_BFC1F0B0 = 0; - int psx_delay_BFC1F0B8 = 0; - int psx_delay_BFC1F0C0 = 0; - int psx_taken_BFC1F0C0 = 0; - int psx_delay_BFC1F0D8 = 0; - int psx_delay_BFC1F0E0 = 0; - int psx_taken_BFC1F0E0 = 0; - int psx_delay_BFC1F100 = 0; - int psx_delay_BFC1F11C = 0; - int psx_delay_BFC1F140 = 0; - int psx_delay_BFC1F14C = 0; - int psx_taken_BFC1F14C = 0; - int psx_delay_BFC1F158 = 0; - int psx_delay_BFC1F170 = 0; - int psx_taken_BFC1F170 = 0; - int psx_delay_BFC1F178 = 0; - int psx_delay_BFC1F1A0 = 0; - int psx_taken_BFC1F1A0 = 0; - int psx_delay_BFC1F1C0 = 0; - int psx_taken_BFC1F1C0 = 0; - int psx_delay_BFC1F1E0 = 0; - int psx_taken_BFC1F1E0 = 0; - int psx_delay_BFC1F200 = 0; - int psx_taken_BFC1F200 = 0; - int psx_delay_BFC1F214 = 0; - int psx_delay_BFC1F21C = 0; - int psx_taken_BFC1F21C = 0; - int psx_delay_BFC1F228 = 0; - int psx_taken_BFC1F228 = 0; - int psx_delay_BFC1F234 = 0; - int psx_taken_BFC1F234 = 0; - int psx_delay_BFC1F248 = 0; - int psx_taken_BFC1F248 = 0; - int psx_delay_BFC1F270 = 0; - int psx_taken_BFC1F270 = 0; - int psx_delay_BFC1F288 = 0; - int psx_taken_BFC1F288 = 0; - int psx_delay_BFC1F2A0 = 0; - int psx_taken_BFC1F2A0 = 0; - int psx_delay_BFC1F2BC = 0; - int psx_taken_BFC1F2BC = 0; - int psx_delay_BFC1F2C8 = 0; - int psx_taken_BFC1F2C8 = 0; - int psx_delay_BFC1F2D0 = 0; - int psx_delay_BFC1F2F0 = 0; - int psx_taken_BFC1F2F0 = 0; - int psx_delay_BFC1F300 = 0; - int psx_taken_BFC1F300 = 0; - int psx_delay_BFC1F314 = 0; - int psx_taken_BFC1F314 = 0; - int psx_delay_BFC1F324 = 0; - int psx_taken_BFC1F324 = 0; - int psx_delay_BFC1F338 = 0; - int psx_taken_BFC1F338 = 0; - int psx_delay_BFC1F340 = 0; - int psx_delay_BFC1F368 = 0; - int psx_taken_BFC1F368 = 0; - int psx_delay_BFC1F374 = 0; - int psx_taken_BFC1F374 = 0; - int psx_delay_BFC1F380 = 0; - int psx_taken_BFC1F380 = 0; - int psx_delay_BFC1F38C = 0; - int psx_taken_BFC1F38C = 0; - int psx_delay_BFC1F394 = 0; - int psx_delay_BFC1F3AC = 0; - int psx_taken_BFC1F3AC = 0; - int psx_delay_BFC1F3B8 = 0; - int psx_taken_BFC1F3B8 = 0; - int psx_delay_BFC1F3CC = 0; - int psx_taken_BFC1F3CC = 0; - int psx_delay_BFC1F3DC = 0; - int psx_taken_BFC1F3DC = 0; - int psx_delay_BFC1F3F0 = 0; - int psx_taken_BFC1F3F0 = 0; - int psx_delay_BFC1F400 = 0; - int psx_taken_BFC1F400 = 0; - int psx_delay_BFC1F414 = 0; - int psx_taken_BFC1F414 = 0; - int psx_delay_BFC1F428 = 0; - int psx_taken_BFC1F428 = 0; - int psx_delay_BFC1F438 = 0; - int psx_taken_BFC1F438 = 0; - int psx_delay_BFC1F44C = 0; - int psx_taken_BFC1F44C = 0; - int psx_delay_BFC1F460 = 0; - int psx_taken_BFC1F460 = 0; - int psx_delay_BFC1F470 = 0; - int psx_taken_BFC1F470 = 0; - int psx_delay_BFC1F484 = 0; - int psx_taken_BFC1F484 = 0; - int psx_delay_BFC1F4A0 = 0; - int psx_delay_BFC1F4AC = 0; - int psx_taken_BFC1F4AC = 0; - int psx_delay_BFC1F4C4 = 0; - int psx_taken_BFC1F4C4 = 0; - int psx_delay_BFC1F4D8 = 0; - int psx_taken_BFC1F4D8 = 0; - int psx_delay_BFC1F4F0 = 0; - int psx_delay_BFC1F504 = 0; - int psx_taken_BFC1F504 = 0; - int psx_delay_BFC1F510 = 0; - int psx_taken_BFC1F510 = 0; - int psx_delay_BFC1F530 = 0; - int psx_taken_BFC1F530 = 0; - int psx_delay_BFC1F538 = 0; - int psx_taken_BFC1F538 = 0; - int psx_delay_BFC1F570 = 0; - int psx_taken_BFC1F570 = 0; - int psx_delay_BFC1F594 = 0; - int psx_taken_BFC1F594 = 0; - int psx_delay_BFC1F5A8 = 0; - int psx_taken_BFC1F5A8 = 0; - int psx_delay_BFC1F5C4 = 0; - int psx_taken_BFC1F5C4 = 0; - int psx_delay_BFC1F5E4 = 0; - int psx_delay_BFC1F5F8 = 0; - int psx_delay_BFC1F600 = 0; - int psx_delay_BFC1F614 = 0; - int psx_taken_BFC1F614 = 0; - int psx_delay_BFC1F61C = 0; - int psx_taken_BFC1F61C = 0; - int psx_delay_BFC1F630 = 0; - int psx_taken_BFC1F630 = 0; - int psx_delay_BFC1F638 = 0; - int psx_delay_BFC1F640 = 0; - int psx_delay_BFC1F64C = 0; - int psx_taken_BFC1F64C = 0; - int psx_delay_BFC1F660 = 0; - int psx_taken_BFC1F660 = 0; - int psx_delay_BFC1F668 = 0; - int psx_taken_BFC1F668 = 0; - int psx_delay_BFC1F670 = 0; - int psx_delay_BFC1F678 = 0; - int psx_taken_BFC1F678 = 0; - int psx_delay_BFC1F68C = 0; - int psx_taken_BFC1F68C = 0; - int psx_delay_BFC1F694 = 0; - int psx_delay_BFC1F6A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1E3E4u: goto label_BFC1E3E4; - case 0xBFC1E3F0u: goto label_BFC1E3F0; - case 0xBFC1E410u: goto label_BFC1E410; - case 0xBFC1E42Cu: goto label_BFC1E42C; - case 0xBFC1E448u: goto label_BFC1E448; - case 0xBFC1E450u: goto label_BFC1E450; - case 0xBFC1E474u: goto label_BFC1E474; - case 0xBFC1E47Cu: goto label_BFC1E47C; - case 0xBFC1E48Cu: goto label_BFC1E48C; - case 0xBFC1E4C0u: goto label_BFC1E4C0; - case 0xBFC1E4DCu: goto label_BFC1E4DC; - case 0xBFC1E4ECu: goto label_BFC1E4EC; - case 0xBFC1E508u: goto label_BFC1E508; - case 0xBFC1E518u: goto label_BFC1E518; - case 0xBFC1E528u: goto label_BFC1E528; - case 0xBFC1E538u: goto label_BFC1E538; - case 0xBFC1E548u: goto label_BFC1E548; - case 0xBFC1E558u: goto label_BFC1E558; - case 0xBFC1E568u: goto label_BFC1E568; - case 0xBFC1E578u: goto label_BFC1E578; - case 0xBFC1E58Cu: goto label_BFC1E58C; - case 0xBFC1E5A4u: goto label_BFC1E5A4; - case 0xBFC1E5B8u: goto label_BFC1E5B8; - case 0xBFC1E5C4u: goto label_BFC1E5C4; - case 0xBFC1E5D0u: goto label_BFC1E5D0; - case 0xBFC1E5E4u: goto label_BFC1E5E4; - case 0xBFC1E5ECu: goto label_BFC1E5EC; - case 0xBFC1E5FCu: goto label_BFC1E5FC; - case 0xBFC1E624u: goto label_BFC1E624; - case 0xBFC1E630u: goto label_BFC1E630; - case 0xBFC1E640u: goto label_BFC1E640; - case 0xBFC1E64Cu: goto label_BFC1E64C; - case 0xBFC1E654u: goto label_BFC1E654; - case 0xBFC1E668u: goto label_BFC1E668; - case 0xBFC1E67Cu: goto label_BFC1E67C; - case 0xBFC1E688u: goto label_BFC1E688; - case 0xBFC1E694u: goto label_BFC1E694; - case 0xBFC1E6A4u: goto label_BFC1E6A4; - case 0xBFC1E6BCu: goto label_BFC1E6BC; - case 0xBFC1E6D4u: goto label_BFC1E6D4; - case 0xBFC1E6E4u: goto label_BFC1E6E4; - case 0xBFC1E6FCu: goto label_BFC1E6FC; - case 0xBFC1E708u: goto label_BFC1E708; - case 0xBFC1E718u: goto label_BFC1E718; - case 0xBFC1E730u: goto label_BFC1E730; - case 0xBFC1E738u: goto label_BFC1E738; - case 0xBFC1E74Cu: goto label_BFC1E74C; - case 0xBFC1E77Cu: goto label_BFC1E77C; - case 0xBFC1E790u: goto label_BFC1E790; - case 0xBFC1E798u: goto label_BFC1E798; - case 0xBFC1E7A0u: goto label_BFC1E7A0; - case 0xBFC1E7A8u: goto label_BFC1E7A8; - case 0xBFC1E7B0u: goto label_BFC1E7B0; - case 0xBFC1E7B8u: goto label_BFC1E7B8; - case 0xBFC1E7C4u: goto label_BFC1E7C4; - case 0xBFC1E7D8u: goto label_BFC1E7D8; - case 0xBFC1E7E0u: goto label_BFC1E7E0; - case 0xBFC1E800u: goto label_BFC1E800; - case 0xBFC1E80Cu: goto label_BFC1E80C; - case 0xBFC1E824u: goto label_BFC1E824; - case 0xBFC1E840u: goto label_BFC1E840; - case 0xBFC1E84Cu: goto label_BFC1E84C; - case 0xBFC1E864u: goto label_BFC1E864; - case 0xBFC1E86Cu: goto label_BFC1E86C; - case 0xBFC1E874u: goto label_BFC1E874; - case 0xBFC1E880u: goto label_BFC1E880; - case 0xBFC1E89Cu: goto label_BFC1E89C; - case 0xBFC1E8ACu: goto label_BFC1E8AC; - case 0xBFC1E8CCu: goto label_BFC1E8CC; - case 0xBFC1E8DCu: goto label_BFC1E8DC; - case 0xBFC1E8E8u: goto label_BFC1E8E8; - case 0xBFC1E8F0u: goto label_BFC1E8F0; - case 0xBFC1E8FCu: goto label_BFC1E8FC; - case 0xBFC1E910u: goto label_BFC1E910; - case 0xBFC1E918u: goto label_BFC1E918; - case 0xBFC1E92Cu: goto label_BFC1E92C; - case 0xBFC1E934u: goto label_BFC1E934; - case 0xBFC1E954u: goto label_BFC1E954; - case 0xBFC1E95Cu: goto label_BFC1E95C; - case 0xBFC1E964u: goto label_BFC1E964; - case 0xBFC1E96Cu: goto label_BFC1E96C; - case 0xBFC1E974u: goto label_BFC1E974; - case 0xBFC1E98Cu: goto label_BFC1E98C; - case 0xBFC1E9A0u: goto label_BFC1E9A0; - case 0xBFC1E9B4u: goto label_BFC1E9B4; - case 0xBFC1E9C8u: goto label_BFC1E9C8; - case 0xBFC1E9D0u: goto label_BFC1E9D0; - case 0xBFC1E9D8u: goto label_BFC1E9D8; - case 0xBFC1E9F8u: goto label_BFC1E9F8; - case 0xBFC1EA00u: goto label_BFC1EA00; - case 0xBFC1EA08u: goto label_BFC1EA08; - case 0xBFC1EA10u: goto label_BFC1EA10; - case 0xBFC1EA18u: goto label_BFC1EA18; - case 0xBFC1EA20u: goto label_BFC1EA20; - case 0xBFC1EA2Cu: goto label_BFC1EA2C; - case 0xBFC1EA34u: goto label_BFC1EA34; - case 0xBFC1EA4Cu: goto label_BFC1EA4C; - case 0xBFC1EA60u: goto label_BFC1EA60; - case 0xBFC1EA78u: goto label_BFC1EA78; - case 0xBFC1EA84u: goto label_BFC1EA84; - case 0xBFC1EAA0u: goto label_BFC1EAA0; - case 0xBFC1EAA8u: goto label_BFC1EAA8; - case 0xBFC1EAB0u: goto label_BFC1EAB0; - case 0xBFC1EAC0u: goto label_BFC1EAC0; - case 0xBFC1EAC8u: goto label_BFC1EAC8; - case 0xBFC1EAD0u: goto label_BFC1EAD0; - case 0xBFC1EAE4u: goto label_BFC1EAE4; - case 0xBFC1EAECu: goto label_BFC1EAEC; - case 0xBFC1EAF4u: goto label_BFC1EAF4; - case 0xBFC1EAFCu: goto label_BFC1EAFC; - case 0xBFC1EB10u: goto label_BFC1EB10; - case 0xBFC1EB1Cu: goto label_BFC1EB1C; - case 0xBFC1EB24u: goto label_BFC1EB24; - case 0xBFC1EB3Cu: goto label_BFC1EB3C; - case 0xBFC1EB50u: goto label_BFC1EB50; - case 0xBFC1EB68u: goto label_BFC1EB68; - case 0xBFC1EB74u: goto label_BFC1EB74; - case 0xBFC1EB94u: goto label_BFC1EB94; - case 0xBFC1EB9Cu: goto label_BFC1EB9C; - case 0xBFC1EBA4u: goto label_BFC1EBA4; - case 0xBFC1EBACu: goto label_BFC1EBAC; - case 0xBFC1EBB8u: goto label_BFC1EBB8; - case 0xBFC1EBC0u: goto label_BFC1EBC0; - case 0xBFC1EBC8u: goto label_BFC1EBC8; - case 0xBFC1EBDCu: goto label_BFC1EBDC; - case 0xBFC1EBF0u: goto label_BFC1EBF0; - case 0xBFC1EC00u: goto label_BFC1EC00; - case 0xBFC1EC1Cu: goto label_BFC1EC1C; - case 0xBFC1EC24u: goto label_BFC1EC24; - case 0xBFC1EC2Cu: goto label_BFC1EC2C; - case 0xBFC1EC4Cu: goto label_BFC1EC4C; - case 0xBFC1EC54u: goto label_BFC1EC54; - case 0xBFC1EC74u: goto label_BFC1EC74; - case 0xBFC1EC7Cu: goto label_BFC1EC7C; - case 0xBFC1ECA0u: goto label_BFC1ECA0; - case 0xBFC1ECA8u: goto label_BFC1ECA8; - case 0xBFC1ECB0u: goto label_BFC1ECB0; - case 0xBFC1ECD0u: goto label_BFC1ECD0; - case 0xBFC1ECD8u: goto label_BFC1ECD8; - case 0xBFC1ECE0u: goto label_BFC1ECE0; - case 0xBFC1ED00u: goto label_BFC1ED00; - case 0xBFC1ED10u: goto label_BFC1ED10; - case 0xBFC1ED1Cu: goto label_BFC1ED1C; - case 0xBFC1ED34u: goto label_BFC1ED34; - case 0xBFC1ED40u: goto label_BFC1ED40; - case 0xBFC1ED48u: goto label_BFC1ED48; - case 0xBFC1ED50u: goto label_BFC1ED50; - case 0xBFC1ED64u: goto label_BFC1ED64; - case 0xBFC1ED78u: goto label_BFC1ED78; - case 0xBFC1ED80u: goto label_BFC1ED80; - case 0xBFC1ED88u: goto label_BFC1ED88; - case 0xBFC1ED90u: goto label_BFC1ED90; - case 0xBFC1ED98u: goto label_BFC1ED98; - case 0xBFC1EDA0u: goto label_BFC1EDA0; - case 0xBFC1EDB4u: goto label_BFC1EDB4; - case 0xBFC1EDD4u: goto label_BFC1EDD4; - case 0xBFC1EDE4u: goto label_BFC1EDE4; - case 0xBFC1EDF0u: goto label_BFC1EDF0; - case 0xBFC1EE08u: goto label_BFC1EE08; - case 0xBFC1EE14u: goto label_BFC1EE14; - case 0xBFC1EE1Cu: goto label_BFC1EE1C; - case 0xBFC1EE24u: goto label_BFC1EE24; - case 0xBFC1EE2Cu: goto label_BFC1EE2C; - case 0xBFC1EE34u: goto label_BFC1EE34; - case 0xBFC1EE48u: goto label_BFC1EE48; - case 0xBFC1EE5Cu: goto label_BFC1EE5C; - case 0xBFC1EE70u: goto label_BFC1EE70; - case 0xBFC1EE78u: goto label_BFC1EE78; - case 0xBFC1EE80u: goto label_BFC1EE80; - case 0xBFC1EEA0u: goto label_BFC1EEA0; - case 0xBFC1EEA8u: goto label_BFC1EEA8; - case 0xBFC1EEB0u: goto label_BFC1EEB0; - case 0xBFC1EEB8u: goto label_BFC1EEB8; - case 0xBFC1EEC0u: goto label_BFC1EEC0; - case 0xBFC1EED4u: goto label_BFC1EED4; - case 0xBFC1EEE0u: goto label_BFC1EEE0; - case 0xBFC1EEECu: goto label_BFC1EEEC; - case 0xBFC1EF00u: goto label_BFC1EF00; - case 0xBFC1EF28u: goto label_BFC1EF28; - case 0xBFC1EF34u: goto label_BFC1EF34; - case 0xBFC1EF38u: goto label_BFC1EF38; - case 0xBFC1EF40u: goto label_BFC1EF40; - case 0xBFC1EF4Cu: goto label_BFC1EF4C; - case 0xBFC1EF50u: goto label_BFC1EF50; - case 0xBFC1EF5Cu: goto label_BFC1EF5C; - case 0xBFC1EF84u: goto label_BFC1EF84; - case 0xBFC1EF8Cu: goto label_BFC1EF8C; - case 0xBFC1EF90u: goto label_BFC1EF90; - case 0xBFC1EF94u: goto label_BFC1EF94; - case 0xBFC1EF9Cu: goto label_BFC1EF9C; - case 0xBFC1EFA4u: goto label_BFC1EFA4; - case 0xBFC1EFC4u: goto label_BFC1EFC4; - case 0xBFC1EFECu: goto label_BFC1EFEC; - case 0xBFC1EFF4u: goto label_BFC1EFF4; - case 0xBFC1EFFCu: goto label_BFC1EFFC; - case 0xBFC1F01Cu: goto label_BFC1F01C; - case 0xBFC1F024u: goto label_BFC1F024; - case 0xBFC1F038u: goto label_BFC1F038; - case 0xBFC1F050u: goto label_BFC1F050; - case 0xBFC1F058u: goto label_BFC1F058; - case 0xBFC1F05Cu: goto label_BFC1F05C; - case 0xBFC1F064u: goto label_BFC1F064; - case 0xBFC1F078u: goto label_BFC1F078; - case 0xBFC1F08Cu: goto label_BFC1F08C; - case 0xBFC1F0A0u: goto label_BFC1F0A0; - case 0xBFC1F0A8u: goto label_BFC1F0A8; - case 0xBFC1F0B8u: goto label_BFC1F0B8; - case 0xBFC1F0C0u: goto label_BFC1F0C0; - case 0xBFC1F0C8u: goto label_BFC1F0C8; - case 0xBFC1F0E0u: goto label_BFC1F0E0; - case 0xBFC1F0E8u: goto label_BFC1F0E8; - case 0xBFC1F108u: goto label_BFC1F108; - case 0xBFC1F124u: goto label_BFC1F124; - case 0xBFC1F128u: goto label_BFC1F128; - case 0xBFC1F130u: goto label_BFC1F130; - case 0xBFC1F138u: goto label_BFC1F138; - case 0xBFC1F148u: goto label_BFC1F148; - case 0xBFC1F154u: goto label_BFC1F154; - case 0xBFC1F160u: goto label_BFC1F160; - case 0xBFC1F178u: goto label_BFC1F178; - case 0xBFC1F180u: goto label_BFC1F180; - case 0xBFC1F1A8u: goto label_BFC1F1A8; - case 0xBFC1F1B4u: goto label_BFC1F1B4; - case 0xBFC1F1C8u: goto label_BFC1F1C8; - case 0xBFC1F1D4u: goto label_BFC1F1D4; - case 0xBFC1F1E8u: goto label_BFC1F1E8; - case 0xBFC1F1F4u: goto label_BFC1F1F4; - case 0xBFC1F208u: goto label_BFC1F208; - case 0xBFC1F214u: goto label_BFC1F214; - case 0xBFC1F21Cu: goto label_BFC1F21C; - case 0xBFC1F224u: goto label_BFC1F224; - case 0xBFC1F230u: goto label_BFC1F230; - case 0xBFC1F23Cu: goto label_BFC1F23C; - case 0xBFC1F250u: goto label_BFC1F250; - case 0xBFC1F268u: goto label_BFC1F268; - case 0xBFC1F278u: goto label_BFC1F278; - case 0xBFC1F284u: goto label_BFC1F284; - case 0xBFC1F290u: goto label_BFC1F290; - case 0xBFC1F2A0u: goto label_BFC1F2A0; - case 0xBFC1F2A8u: goto label_BFC1F2A8; - case 0xBFC1F2B8u: goto label_BFC1F2B8; - case 0xBFC1F2BCu: goto label_BFC1F2BC; - case 0xBFC1F2C4u: goto label_BFC1F2C4; - case 0xBFC1F2D0u: goto label_BFC1F2D0; - case 0xBFC1F2D8u: goto label_BFC1F2D8; - case 0xBFC1F2F8u: goto label_BFC1F2F8; - case 0xBFC1F308u: goto label_BFC1F308; - case 0xBFC1F31Cu: goto label_BFC1F31C; - case 0xBFC1F32Cu: goto label_BFC1F32C; - case 0xBFC1F340u: goto label_BFC1F340; - case 0xBFC1F348u: goto label_BFC1F348; - case 0xBFC1F360u: goto label_BFC1F360; - case 0xBFC1F364u: goto label_BFC1F364; - case 0xBFC1F370u: goto label_BFC1F370; - case 0xBFC1F37Cu: goto label_BFC1F37C; - case 0xBFC1F388u: goto label_BFC1F388; - case 0xBFC1F394u: goto label_BFC1F394; - case 0xBFC1F39Cu: goto label_BFC1F39C; - case 0xBFC1F3A8u: goto label_BFC1F3A8; - case 0xBFC1F3ACu: goto label_BFC1F3AC; - case 0xBFC1F3B4u: goto label_BFC1F3B4; - case 0xBFC1F3C0u: goto label_BFC1F3C0; - case 0xBFC1F3D4u: goto label_BFC1F3D4; - case 0xBFC1F3E4u: goto label_BFC1F3E4; - case 0xBFC1F3F8u: goto label_BFC1F3F8; - case 0xBFC1F408u: goto label_BFC1F408; - case 0xBFC1F41Cu: goto label_BFC1F41C; - case 0xBFC1F430u: goto label_BFC1F430; - case 0xBFC1F440u: goto label_BFC1F440; - case 0xBFC1F454u: goto label_BFC1F454; - case 0xBFC1F468u: goto label_BFC1F468; - case 0xBFC1F478u: goto label_BFC1F478; - case 0xBFC1F48Cu: goto label_BFC1F48C; - case 0xBFC1F498u: goto label_BFC1F498; - case 0xBFC1F4A8u: goto label_BFC1F4A8; - case 0xBFC1F4B4u: goto label_BFC1F4B4; - case 0xBFC1F4B8u: goto label_BFC1F4B8; - case 0xBFC1F4CCu: goto label_BFC1F4CC; - case 0xBFC1F4E0u: goto label_BFC1F4E0; - case 0xBFC1F4F8u: goto label_BFC1F4F8; - case 0xBFC1F50Cu: goto label_BFC1F50C; - case 0xBFC1F518u: goto label_BFC1F518; - case 0xBFC1F524u: goto label_BFC1F524; - case 0xBFC1F538u: goto label_BFC1F538; - case 0xBFC1F540u: goto label_BFC1F540; - case 0xBFC1F550u: goto label_BFC1F550; - case 0xBFC1F578u: goto label_BFC1F578; - case 0xBFC1F584u: goto label_BFC1F584; - case 0xBFC1F59Cu: goto label_BFC1F59C; - case 0xBFC1F5B0u: goto label_BFC1F5B0; - case 0xBFC1F5CCu: goto label_BFC1F5CC; - case 0xBFC1F5ECu: goto label_BFC1F5EC; - case 0xBFC1F5F8u: goto label_BFC1F5F8; - case 0xBFC1F600u: goto label_BFC1F600; - case 0xBFC1F608u: goto label_BFC1F608; - case 0xBFC1F61Cu: goto label_BFC1F61C; - case 0xBFC1F624u: goto label_BFC1F624; - case 0xBFC1F638u: goto label_BFC1F638; - case 0xBFC1F640u: goto label_BFC1F640; - case 0xBFC1F648u: goto label_BFC1F648; - case 0xBFC1F654u: goto label_BFC1F654; - case 0xBFC1F668u: goto label_BFC1F668; - case 0xBFC1F670u: goto label_BFC1F670; - case 0xBFC1F678u: goto label_BFC1F678; - case 0xBFC1F680u: goto label_BFC1F680; - case 0xBFC1F694u: goto label_BFC1F694; - case 0xBFC1F69Cu: goto label_BFC1F69C; - case 0xBFC1F6A0u: goto label_BFC1F6A0; - default: break; - } - } -label_BFC1E3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1E3CC: 27BDFF88 addiu $sp, $sp, -120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-120)); - PGXP_ALU(0x27BDFF88u, cpu->gpr[29], _pgx1, 0xFFFFFF88u); } -#ifdef PSX_COSIM - cosim_instr(0x800363CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E3D0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800363D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1E3D4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363D4u); return; } g_debug_last_store_pc = 0x800363D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800363D4u); -#endif - /* 0xBFC1E3D8: 8C849E80 lw $a0, -24960($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E80u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800363D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E3DC: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x800363E4u; /* jal link before delay slot */ - psx_delay_BFC1E3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800363E0u); -#endif - if (psx_delay_BFC1E3DC) { - psx_delay_BFC1E3DC = 0; - cpu->gpr[31] = 0x800363E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC1E3E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E3E4: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800363E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E3E8: 14410091 bne $v0, $at, 0xBFC1E630 */ - uint32_t psx_brA_BFC1E3E8 = cpu->gpr[2]; uint32_t psx_brB_BFC1E3E8 = cpu->gpr[1]; - psx_taken_BFC1E3E8 = (psx_brA_BFC1E3E8 != psx_brB_BFC1E3E8); - psx_delay_BFC1E3E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E3EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800363ECu); -#endif - if (psx_delay_BFC1E3E8) { - psx_delay_BFC1E3E8 = 0; - if (psx_taken_BFC1E3E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036630u); - goto label_BFC1E630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363F0u); - } -label_BFC1E3F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E3F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800363F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E3F0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800363F0u); -#endif - /* 0xBFC1E3F4: 8C426940 lw $v0, 26944($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426940u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800363F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E3F8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800363F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E3FC: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800363FCu); return; } g_debug_last_store_pc = 0x800363FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800363FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1E400: 244EFFFE addiu $t6, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x244EFFFEu, cpu->gpr[14], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80036400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E404: 2DC10018 sltiu $at, $t6, 24 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000018u ? 1 : 0); - PGXP_ALU(0x2DC10018u, cpu->gpr[1], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0x80036404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E408: 1020005B beq $at, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E408 = cpu->gpr[1]; uint32_t psx_brB_BFC1E408 = cpu->gpr[0]; - psx_taken_BFC1E408 = (psx_brA_BFC1E408 == psx_brB_BFC1E408); - psx_delay_BFC1E408 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E40C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003640Cu); -#endif - if (psx_delay_BFC1E408) { - psx_delay_BFC1E408 = 0; - if (psx_taken_BFC1E408) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036410u); - } -label_BFC1E410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1E410: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E414: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E418: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036418u); -#endif - /* 0xBFC1E41C: 8C2EAD0C lw $t6, -21236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003641Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EAD0Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E420: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E424: 01C00008 jr $t6 */ - psx_delay_BFC1E424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E428: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036428u); -#endif - if (psx_delay_BFC1E424) { - psx_delay_BFC1E424 = 0; - /* jump table at 0x8005AD0C, 24 entries */ - switch (cpu->gpr[14]) { - case 0x8003648Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003648Cu); - goto label_BFC1E48C; - case 0x80036578u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - case 0x80036568u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036568u); - goto label_BFC1E568; - case 0x80036538u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036538u); - goto label_BFC1E538; - case 0x80036450u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036450u); - goto label_BFC1E450; - case 0x8003642Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003642Cu); - goto label_BFC1E42C; - case 0x8003647Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003647Cu); - goto label_BFC1E47C; - case 0x80036548u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036548u); - goto label_BFC1E548; - case 0x80036558u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036558u); - goto label_BFC1E558; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } - } -label_BFC1E42C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E42Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003642Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1E42C: 240F0032 addiu $t7, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240F0032u, cpu->gpr[15], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003642Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E430: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1E434: AC2F6948 sw $t7, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036434u); return; } g_debug_last_store_pc = 0x80036434u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E438: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1E43C: 24180032 addiu $t8, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24180032u, cpu->gpr[24], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003643Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E440: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80036448u; /* jal link before delay slot */ - psx_delay_BFC1E440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E444: AC386940 sw $t8, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036444u); return; } g_debug_last_store_pc = 0x80036444u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386940u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036444u); -#endif - if (psx_delay_BFC1E440) { - psx_delay_BFC1E440 = 0; - cpu->gpr[31] = 0x80036448u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1E448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E448: 1000004B beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E448 = cpu->gpr[0]; uint32_t psx_brB_BFC1E448 = cpu->gpr[0]; - psx_taken_BFC1E448 = (psx_brA_BFC1E448 == psx_brB_BFC1E448); - psx_delay_BFC1E448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E44C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003644Cu); -#endif - if (psx_delay_BFC1E448) { - psx_delay_BFC1E448 = 0; - if (psx_taken_BFC1E448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036450u); - } -label_BFC1E450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1E450: 24190034 addiu $t9, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24190034u, cpu->gpr[25], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E454: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1E458: AC396948 sw $t9, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036458u); return; } g_debug_last_store_pc = 0x80036458u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396948u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E45C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003645Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1E460: 24080034 addiu $t0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24080034u, cpu->gpr[8], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1E464: AC286940 sw $t0, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036464u); return; } g_debug_last_store_pc = 0x80036464u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286940u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E468: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E46C: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80036474u; /* jal link before delay slot */ - psx_delay_BFC1E46C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E470: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036470u); return; } g_debug_last_store_pc = 0x80036470u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036470u); -#endif - if (psx_delay_BFC1E46C) { - psx_delay_BFC1E46C = 0; - cpu->gpr[31] = 0x80036474u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1E474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E474: 10000040 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E474 = cpu->gpr[0]; uint32_t psx_brB_BFC1E474 = cpu->gpr[0]; - psx_taken_BFC1E474 = (psx_brA_BFC1E474 == psx_brB_BFC1E474); - psx_delay_BFC1E474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E478: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036478u); -#endif - if (psx_delay_BFC1E474) { - psx_delay_BFC1E474 = 0; - if (psx_taken_BFC1E474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003647Cu); - } -label_BFC1E47C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E47Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E47C: 24090036 addiu $t1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24090036u, cpu->gpr[9], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x8003647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E480: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E484: 1000003C beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E484 = cpu->gpr[0]; uint32_t psx_brB_BFC1E484 = cpu->gpr[0]; - psx_taken_BFC1E484 = (psx_brA_BFC1E484 == psx_brB_BFC1E484); - psx_delay_BFC1E484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1E488: AC296940 sw $t1, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036488u); return; } g_debug_last_store_pc = 0x80036488u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296940u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036488u); -#endif - if (psx_delay_BFC1E484) { - psx_delay_BFC1E484 = 0; - if (psx_taken_BFC1E484) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003648Cu); - } -label_BFC1E48C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E48Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E48C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E490: AC209E48 sw $zero, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036490u); return; } g_debug_last_store_pc = 0x80036490u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E494: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1E498: 240A0035 addiu $t2, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x240A0035u, cpu->gpr[10], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0x80036498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E49C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364A0u); -#endif - /* 0xBFC1E4A0: 8C429E4C lw $v0, -25012($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E4Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800364A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1E4A4: AC2A6940 sw $t2, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364A4u); return; } g_debug_last_store_pc = 0x800364A4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6940u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800364A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E4A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800364A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E4AC: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364ACu); return; } g_debug_last_store_pc = 0x800364ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800364ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1E4B0: 244BFFCE addiu $t3, $v0, -50 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[2] + (-50)); - PGXP_ALU(0x244BFFCEu, cpu->gpr[11], _pgx1, 0xFFFFFFCEu); } -#ifdef PSX_COSIM - cosim_instr(0x800364B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E4B4: 2D61000A sltiu $at, $t3, 10 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < 0x0000000Au ? 1 : 0); - PGXP_ALU(0x2D61000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800364B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E4B8: 1020002F beq $at, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E4B8 = cpu->gpr[1]; uint32_t psx_brB_BFC1E4B8 = cpu->gpr[0]; - psx_taken_BFC1E4B8 = (psx_brA_BFC1E4B8 == psx_brB_BFC1E4B8); - psx_delay_BFC1E4B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E4BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800364BCu); -#endif - if (psx_delay_BFC1E4B8) { - psx_delay_BFC1E4B8 = 0; - if (psx_taken_BFC1E4B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800364C0u); - } -label_BFC1E4C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E4C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E4C0: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800364C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E4C4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800364C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E4C8: 002B0821 addu $at, $at, $t3 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[11]; - PGXP_ALU(0x002B0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800364C8u); -#endif - /* 0xBFC1E4CC: 8C2BACE4 lw $t3, -21276($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364CCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x2u); } - PGXP_LOAD(0x8C2BACE4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800364CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E4D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800364D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1E4D4: 01600008 jr $t3 */ - psx_delay_BFC1E4D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E4D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800364D8u); -#endif - if (psx_delay_BFC1E4D4) { - psx_delay_BFC1E4D4 = 0; - /* jump table at 0x8005ACE4, 10 entries */ - switch (cpu->gpr[11]) { - case 0x800364DCu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800364DCu); - goto label_BFC1E4DC; - case 0x80036508u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036508u); - goto label_BFC1E508; - case 0x800364ECu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800364ECu); - goto label_BFC1E4EC; - case 0x80036578u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - case 0x80036518u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036518u); - goto label_BFC1E518; - case 0x80036528u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036528u); - goto label_BFC1E528; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[11]); - cpu->pc = cpu->gpr[11]; return; - } - } -label_BFC1E4DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E4DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E4DC: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800364DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E4E0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800364E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E4E4: 10000024 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E4E4 = cpu->gpr[0]; uint32_t psx_brB_BFC1E4E4 = cpu->gpr[0]; - psx_taken_BFC1E4E4 = (psx_brA_BFC1E4E4 == psx_brB_BFC1E4E4); - psx_delay_BFC1E4E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E4E8: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364E8u); return; } g_debug_last_store_pc = 0x800364E8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800364E8u); -#endif - if (psx_delay_BFC1E4E4) { - psx_delay_BFC1E4E4 = 0; - if (psx_taken_BFC1E4E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800364ECu); - } -label_BFC1E4EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E4ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1E4EC: 240C0034 addiu $t4, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x240C0034u, cpu->gpr[12], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800364ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800364F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E4F0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800364F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1E4F4: AC2C6940 sw $t4, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800364F4u); return; } g_debug_last_store_pc = 0x800364F4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6940u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800364F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E4F8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800364F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1E4FC: 240D0034 addiu $t5, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x240D0034u, cpu->gpr[13], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800364FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E500: 1000001D beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E500 = cpu->gpr[0]; uint32_t psx_brB_BFC1E500 = cpu->gpr[0]; - psx_taken_BFC1E500 = (psx_brA_BFC1E500 == psx_brB_BFC1E500); - psx_delay_BFC1E500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1E504: AC2D6948 sw $t5, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036504u); return; } g_debug_last_store_pc = 0x80036504u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6948u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036504u); -#endif - if (psx_delay_BFC1E500) { - psx_delay_BFC1E500 = 0; - if (psx_taken_BFC1E500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036508u); - } -label_BFC1E508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E508: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80036508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E50C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003650Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E510: 10000019 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E510 = cpu->gpr[0]; uint32_t psx_brB_BFC1E510 = cpu->gpr[0]; - psx_taken_BFC1E510 = (psx_brA_BFC1E510 == psx_brB_BFC1E510); - psx_delay_BFC1E510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E514: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036514u); return; } g_debug_last_store_pc = 0x80036514u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036514u); -#endif - if (psx_delay_BFC1E510) { - psx_delay_BFC1E510 = 0; - if (psx_taken_BFC1E510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036518u); - } -label_BFC1E518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E518: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80036518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E51C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003651Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E520: 10000015 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E520 = cpu->gpr[0]; uint32_t psx_brB_BFC1E520 = cpu->gpr[0]; - psx_taken_BFC1E520 = (psx_brA_BFC1E520 == psx_brB_BFC1E520); - psx_delay_BFC1E520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E524: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036524u); return; } g_debug_last_store_pc = 0x80036524u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036524u); -#endif - if (psx_delay_BFC1E520) { - psx_delay_BFC1E520 = 0; - if (psx_taken_BFC1E520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036528u); - } -label_BFC1E528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E528: 24040013 addiu $a0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24040013u, cpu->gpr[4], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80036528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E52C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003652Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E530: 10000011 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E530 = cpu->gpr[0]; uint32_t psx_brB_BFC1E530 = cpu->gpr[0]; - psx_taken_BFC1E530 = (psx_brA_BFC1E530 == psx_brB_BFC1E530); - psx_delay_BFC1E530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1E534: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036534u); return; } g_debug_last_store_pc = 0x80036534u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036534u); -#endif - if (psx_delay_BFC1E530) { - psx_delay_BFC1E530 = 0; - if (psx_taken_BFC1E530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036538u); - } -label_BFC1E538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1E538: 240E0037 addiu $t6, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x240E0037u, cpu->gpr[14], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x80036538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E53C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003653Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E540: 1000000D beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E540 = cpu->gpr[0]; uint32_t psx_brB_BFC1E540 = cpu->gpr[0]; - psx_taken_BFC1E540 = (psx_brA_BFC1E540 == psx_brB_BFC1E540); - psx_delay_BFC1E540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E544: AC2E6940 sw $t6, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036544u); return; } g_debug_last_store_pc = 0x80036544u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6940u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036544u); -#endif - if (psx_delay_BFC1E540) { - psx_delay_BFC1E540 = 0; - if (psx_taken_BFC1E540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036548u); - } -label_BFC1E548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1E548: 240F0038 addiu $t7, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x240F0038u, cpu->gpr[15], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80036548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E54C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E550: 10000009 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E550 = cpu->gpr[0]; uint32_t psx_brB_BFC1E550 = cpu->gpr[0]; - psx_taken_BFC1E550 = (psx_brA_BFC1E550 == psx_brB_BFC1E550); - psx_delay_BFC1E550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1E554: AC2F6940 sw $t7, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036554u); return; } g_debug_last_store_pc = 0x80036554u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6940u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036554u); -#endif - if (psx_delay_BFC1E550) { - psx_delay_BFC1E550 = 0; - if (psx_taken_BFC1E550) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036558u); - } -label_BFC1E558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1E558: 2418003D addiu $t8, $zero, 61 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); - PGXP_ALU(0x2418003Du, cpu->gpr[24], _pgx1, 0x0000003Du); } -#ifdef PSX_COSIM - cosim_instr(0x80036558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E55C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E560: 10000005 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E560 = cpu->gpr[0]; uint32_t psx_brB_BFC1E560 = cpu->gpr[0]; - psx_taken_BFC1E560 = (psx_brA_BFC1E560 == psx_brB_BFC1E560); - psx_delay_BFC1E560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E564: AC386940 sw $t8, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036564u); return; } g_debug_last_store_pc = 0x80036564u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386940u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036564u); -#endif - if (psx_delay_BFC1E560) { - psx_delay_BFC1E560 = 0; - if (psx_taken_BFC1E560) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036568u); - } -label_BFC1E568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1E568: 2419003E addiu $t9, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x2419003Eu, cpu->gpr[25], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80036568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E56C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003656Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E570: 10000001 beq $zero, $zero, 0xBFC1E578 */ - uint32_t psx_brA_BFC1E570 = cpu->gpr[0]; uint32_t psx_brB_BFC1E570 = cpu->gpr[0]; - psx_taken_BFC1E570 = (psx_brA_BFC1E570 == psx_brB_BFC1E570); - psx_delay_BFC1E570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1E574: AC396940 sw $t9, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036574u); return; } g_debug_last_store_pc = 0x80036574u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396940u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036574u); -#endif - if (psx_delay_BFC1E570) { - psx_delay_BFC1E570 = 0; - if (psx_taken_BFC1E570) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - goto label_BFC1E578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036578u); - } -label_BFC1E578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E578: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036578u); -#endif - /* 0xBFC1E57C: 8CA5694C lw $a1, 26956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003657Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003657Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1E584: 10A0002A beq $a1, $zero, 0xBFC1E630 */ - uint32_t psx_brA_BFC1E584 = cpu->gpr[5]; uint32_t psx_brB_BFC1E584 = cpu->gpr[0]; - psx_taken_BFC1E584 = (psx_brA_BFC1E584 == psx_brB_BFC1E584); - psx_delay_BFC1E584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E588: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036588u); -#endif - if (psx_delay_BFC1E584) { - psx_delay_BFC1E584 = 0; - if (psx_taken_BFC1E584) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036630u); - goto label_BFC1E630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003658Cu); - } -label_BFC1E58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E58C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1E590: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E594: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036594u); -#endif - /* 0xBFC1E598: 9084A0E0 lbu $a0, -24352($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24352; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24352)), 4, 0x10u); - PGXP_LOAD(0x9084A0E0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E59C: 0C00D873 jal 0xB00361CC */ - cpu->gpr[31] = 0x800365A4u; /* jal link before delay slot */ - psx_delay_BFC1E59C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1E5A0: AC286950 sw $t0, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800365A0u); return; } g_debug_last_store_pc = 0x800365A0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286950u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800365A0u); -#endif - if (psx_delay_BFC1E59C) { - psx_delay_BFC1E59C = 0; - cpu->gpr[31] = 0x800365A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361CCu); - cpu->pc = 0x800361CCu; return; - } -label_BFC1E5A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E5A4: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800365A4u); -#endif - /* 0xBFC1E5A8: 8CA5694C lw $a1, 26956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800365A8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800365A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E5AC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800365ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E5B0: 18A0001C blez $a1, 0xBFC1E624 */ - uint32_t psx_brA_BFC1E5B0 = cpu->gpr[5]; - psx_taken_BFC1E5B0 = ((int32_t)psx_brA_BFC1E5B0 <= 0); - psx_delay_BFC1E5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E5B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800365B4u); -#endif - if (psx_delay_BFC1E5B0) { - psx_delay_BFC1E5B0 = 0; - if (psx_taken_BFC1E5B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036624u); - goto label_BFC1E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365B8u); - } -label_BFC1E5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC1E5B8: 30A30003 andi $v1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A30003u, cpu->gpr[3], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800365B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1E5BC: 1060000B beq $v1, $zero, 0xBFC1E5EC */ - uint32_t psx_brA_BFC1E5BC = cpu->gpr[3]; uint32_t psx_brB_BFC1E5BC = cpu->gpr[0]; - psx_taken_BFC1E5BC = (psx_brA_BFC1E5BC == psx_brB_BFC1E5BC); - psx_delay_BFC1E5BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E5C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800365C0u); -#endif - if (psx_delay_BFC1E5BC) { - psx_delay_BFC1E5BC = 0; - if (psx_taken_BFC1E5BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365ECu); - goto label_BFC1E5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365C4u); - } -label_BFC1E5C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1E5C4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800365C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1E5C8: 2529A0E0 addiu $t1, $t1, -24352 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-24352)); - PGXP_ALU(0x2529A0E0u, cpu->gpr[9], _pgx1, 0xFFFFA0E0u); } -#ifdef PSX_COSIM - cosim_instr(0x800365C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x214u); -#endif - /* 0xBFC1E5CC: 00891021 addu $v0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00891021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800365CCu); -#endif -label_BFC1E5D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365D0u); -#endif - /* 0xBFC1E5D0: 904A0001 lbu $t2, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 10, 0x4u); - PGXP_LOAD(0x904A0001u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800365D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E5D4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800365D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E5D8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800365D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC1E5DC: 1464FFFC bne $v1, $a0, 0xBFC1E5D0 */ - uint32_t psx_brA_BFC1E5DC = cpu->gpr[3]; uint32_t psx_brB_BFC1E5DC = cpu->gpr[4]; - psx_taken_BFC1E5DC = (psx_brA_BFC1E5DC != psx_brB_BFC1E5DC); - psx_delay_BFC1E5DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1E5E0: A04AFFFF sb $t2, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800365E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFFFFu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800365E0u); -#endif - if (psx_delay_BFC1E5DC) { - psx_delay_BFC1E5DC = 0; - if (psx_taken_BFC1E5DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365D0u); - goto label_BFC1E5D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365E4u); - } -label_BFC1E5E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC1E5E4: 1085000F beq $a0, $a1, 0xBFC1E624 */ - uint32_t psx_brA_BFC1E5E4 = cpu->gpr[4]; uint32_t psx_brB_BFC1E5E4 = cpu->gpr[5]; - psx_taken_BFC1E5E4 = (psx_brA_BFC1E5E4 == psx_brB_BFC1E5E4); - psx_delay_BFC1E5E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E5E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800365E8u); -#endif - if (psx_delay_BFC1E5E4) { - psx_delay_BFC1E5E4 = 0; - if (psx_taken_BFC1E5E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036624u); - goto label_BFC1E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365ECu); - } -label_BFC1E5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E5EC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800365ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E5F0: 256BA0E0 addiu $t3, $t3, -24352 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-24352)); - PGXP_ALU(0x256BA0E0u, cpu->gpr[11], _pgx1, 0xFFFFA0E0u); } -#ifdef PSX_COSIM - cosim_instr(0x800365F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x814u); -#endif - /* 0xBFC1E5F4: 008B1021 addu $v0, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800365F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x828u); -#endif - /* 0xBFC1E5F8: 00AB1821 addu $v1, $a1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[11]; - PGXP_ALU(0x00AB1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800365F8u); -#endif -label_BFC1E5FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E5FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800365FCu); -#endif - /* 0xBFC1E5FC: 904C0001 lbu $t4, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 12, 0x4u); - PGXP_LOAD(0x904C0001u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800365FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036600u); -#endif - /* 0xBFC1E600: 904D0002 lbu $t5, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 13, 0x4u); - PGXP_LOAD(0x904D0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036600u); -#endif - /* 0xBFC1E604: 904E0003 lbu $t6, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 14, 0x4u); - PGXP_LOAD(0x904E0003u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036604u); -#endif - /* 0xBFC1E608: 904F0004 lbu $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 15, 0x4u); - PGXP_LOAD(0x904F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1E60C: A04C0000 sb $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003660Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA04C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003660Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E610: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC1E614: A04DFFFD sb $t5, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80036614u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA04DFFFDu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1E618: A04EFFFE sb $t6, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80036618u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04EFFFEu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1E61C: 1443FFF7 bne $v0, $v1, 0xBFC1E5FC */ - uint32_t psx_brA_BFC1E61C = cpu->gpr[2]; uint32_t psx_brB_BFC1E61C = cpu->gpr[3]; - psx_taken_BFC1E61C = (psx_brA_BFC1E61C != psx_brB_BFC1E61C); - psx_delay_BFC1E61C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1E620: A04FFFFF sb $t7, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80036620u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04FFFFFu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036620u); -#endif - if (psx_delay_BFC1E61C) { - psx_delay_BFC1E61C = 0; - if (psx_taken_BFC1E61C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800365FCu); - goto label_BFC1E5FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036624u); - } -label_BFC1E624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1E624: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80036624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E628: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1E62C: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003662Cu); return; } g_debug_last_store_pc = 0x8003662Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003662Cu); -#endif -label_BFC1E630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E630: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036630u); -#endif - /* 0xBFC1E634: 8C849E84 lw $a0, -24956($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036634u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E84u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E638: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x80036640u; /* jal link before delay slot */ - psx_delay_BFC1E638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E63C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003663Cu); -#endif - if (psx_delay_BFC1E638) { - psx_delay_BFC1E638 = 0; - cpu->gpr[31] = 0x80036640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC1E640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E640: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E644: 144100A1 bne $v0, $at, 0xBFC1E8CC */ - uint32_t psx_brA_BFC1E644 = cpu->gpr[2]; uint32_t psx_brB_BFC1E644 = cpu->gpr[1]; - psx_taken_BFC1E644 = (psx_brA_BFC1E644 != psx_brB_BFC1E644); - psx_delay_BFC1E644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036648u); -#endif - if (psx_delay_BFC1E644) { - psx_delay_BFC1E644 = 0; - if (psx_taken_BFC1E644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368CCu); - goto label_BFC1E8CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003664Cu); - } -label_BFC1E64C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E64Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003664Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E64C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80036654u; /* jal link before delay slot */ - psx_delay_BFC1E64C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036650u); -#endif - if (psx_delay_BFC1E64C) { - psx_delay_BFC1E64C = 0; - cpu->gpr[31] = 0x80036654u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC1E654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1E654: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036654u); -#endif - /* 0xBFC1E658: 8F186948 lw $t8, 26952($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036658u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E65C: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8003665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E660: 1301009A beq $t8, $at, 0xBFC1E8CC */ - uint32_t psx_brA_BFC1E660 = cpu->gpr[24]; uint32_t psx_brB_BFC1E660 = cpu->gpr[1]; - psx_taken_BFC1E660 = (psx_brA_BFC1E660 == psx_brB_BFC1E660); - psx_delay_BFC1E660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E664: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036664u); -#endif - if (psx_delay_BFC1E660) { - psx_delay_BFC1E660 = 0; - if (psx_taken_BFC1E660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368CCu); - goto label_BFC1E8CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036668u); - } -label_BFC1E668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E668: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036668u); -#endif - /* 0xBFC1E66C: 8C429E74 lw $v0, -24972($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003666Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E74u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E670: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E674: 10400004 beq $v0, $zero, 0xBFC1E688 */ - uint32_t psx_brA_BFC1E674 = cpu->gpr[2]; uint32_t psx_brB_BFC1E674 = cpu->gpr[0]; - psx_taken_BFC1E674 = (psx_brA_BFC1E674 == psx_brB_BFC1E674); - psx_delay_BFC1E674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E678: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036678u); -#endif - if (psx_delay_BFC1E674) { - psx_delay_BFC1E674 = 0; - if (psx_taken_BFC1E674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036688u); - goto label_BFC1E688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003667Cu); - } -label_BFC1E67C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E67Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E67C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E680: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E684: AC229E74 sw $v0, -24972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036684u); return; } g_debug_last_store_pc = 0x80036684u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E74u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036684u); -#endif -label_BFC1E688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E688: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E68C: 0C00E497 jal 0xB003925C */ - cpu->gpr[31] = 0x80036694u; /* jal link before delay slot */ - psx_delay_BFC1E68C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E690: 24849EA0 addiu $a0, $a0, -24928 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24928)); - PGXP_ALU(0x24849EA0u, cpu->gpr[4], _pgx1, 0xFFFF9EA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036690u); -#endif - if (psx_delay_BFC1E68C) { - psx_delay_BFC1E68C = 0; - cpu->gpr[31] = 0x80036694u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003925Cu); - cpu->pc = 0x8003925Cu; return; - } -label_BFC1E694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E694: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036694u); -#endif - /* 0xBFC1E698: 90849EA1 lbu $a0, -24927($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24927; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24927)), 4, 0x10u); - PGXP_LOAD(0x90849EA1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E69C: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800366A4u; /* jal link before delay slot */ - psx_delay_BFC1E69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E6A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800366A0u); -#endif - if (psx_delay_BFC1E69C) { - psx_delay_BFC1E69C = 0; - cpu->gpr[31] = 0x800366A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E6A4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1E6A8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800366A8u); -#endif - /* 0xBFC1E6AC: 90849EA2 lbu $a0, -24926($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24926; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24926)), 4, 0x10u); - PGXP_LOAD(0x90849EA2u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800366ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E6B0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E6B4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800366BCu; /* jal link before delay slot */ - psx_delay_BFC1E6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1E6B8: AC239E50 sw $v1, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800366B8u); return; } g_debug_last_store_pc = 0x800366B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800366B8u); -#endif - if (psx_delay_BFC1E6B4) { - psx_delay_BFC1E6B4 = 0; - cpu->gpr[31] = 0x800366BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1E6BC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366C0u); -#endif - /* 0xBFC1E6C0: 93399EA4 lbu $t9, -24924($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24924; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-24924)), 25, 0x2000000u); - PGXP_LOAD(0x93399EA4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800366C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E6C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1E6C8: 33280080 andi $t0, $t9, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x80u; - PGXP_ALU(0x33280080u, cpu->gpr[8], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x800366C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1E6CC: 1100000E beq $t0, $zero, 0xBFC1E708 */ - uint32_t psx_brA_BFC1E6CC = cpu->gpr[8]; uint32_t psx_brB_BFC1E6CC = cpu->gpr[0]; - psx_taken_BFC1E6CC = (psx_brA_BFC1E6CC == psx_brB_BFC1E6CC); - psx_delay_BFC1E6CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E6D0: AC229EAC sw $v0, -24916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800366D0u); return; } g_debug_last_store_pc = 0x800366D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229EACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800366D0u); -#endif - if (psx_delay_BFC1E6CC) { - psx_delay_BFC1E6CC = 0; - if (psx_taken_BFC1E6CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036708u); - goto label_BFC1E708; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800366D4u); - } -label_BFC1E6D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E6D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E6D4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366D4u); -#endif - /* 0xBFC1E6D8: 90849EA3 lbu $a0, -24925($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24925; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24925)), 4, 0x10u); - PGXP_LOAD(0x90849EA3u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800366D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E6DC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800366E4u; /* jal link before delay slot */ - psx_delay_BFC1E6DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E6E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800366E0u); -#endif - if (psx_delay_BFC1E6DC) { - psx_delay_BFC1E6DC = 0; - cpu->gpr[31] = 0x800366E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E6E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E6E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E6E4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366E4u); -#endif - /* 0xBFC1E6E8: 90849EA4 lbu $a0, -24924($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24924; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24924)), 4, 0x10u); - PGXP_LOAD(0x90849EA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800366E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E6EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E6F0: AC229E60 sw $v0, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800366F0u); return; } g_debug_last_store_pc = 0x800366F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E60u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800366F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E6F4: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x800366FCu; /* jal link before delay slot */ - psx_delay_BFC1E6F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E6F8: 3084007F andi $a0, $a0, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7Fu; - PGXP_ALU(0x3084007Fu, cpu->gpr[4], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800366F8u); -#endif - if (psx_delay_BFC1E6F4) { - psx_delay_BFC1E6F4 = 0; - cpu->gpr[31] = 0x800366FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E6FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E6FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800366FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E6FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800366FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E700: 1000000D beq $zero, $zero, 0xBFC1E738 */ - uint32_t psx_brA_BFC1E700 = cpu->gpr[0]; uint32_t psx_brB_BFC1E700 = cpu->gpr[0]; - psx_taken_BFC1E700 = (psx_brA_BFC1E700 == psx_brB_BFC1E700); - psx_delay_BFC1E700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E704: AC229E64 sw $v0, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036704u); return; } g_debug_last_store_pc = 0x80036704u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E64u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036704u); -#endif - if (psx_delay_BFC1E700) { - psx_delay_BFC1E700 = 0; - if (psx_taken_BFC1E700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036738u); - goto label_BFC1E738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036708u); - } -label_BFC1E708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E708: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036708u); -#endif - /* 0xBFC1E70C: 90849EA3 lbu $a0, -24925($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24925; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24925)), 4, 0x10u); - PGXP_LOAD(0x90849EA3u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003670Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E710: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80036718u; /* jal link before delay slot */ - psx_delay_BFC1E710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036714u); -#endif - if (psx_delay_BFC1E710) { - psx_delay_BFC1E710 = 0; - cpu->gpr[31] = 0x80036718u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E718: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036718u); -#endif - /* 0xBFC1E71C: 90849EA4 lbu $a0, -24924($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24924; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24924)), 4, 0x10u); - PGXP_LOAD(0x90849EA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003671Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E720: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E724: AC229E54 sw $v0, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036724u); return; } g_debug_last_store_pc = 0x80036724u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E728: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80036730u; /* jal link before delay slot */ - psx_delay_BFC1E728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E72C: 3084007F andi $a0, $a0, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7Fu; - PGXP_ALU(0x3084007Fu, cpu->gpr[4], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003672Cu); -#endif - if (psx_delay_BFC1E728) { - psx_delay_BFC1E728 = 0; - cpu->gpr[31] = 0x80036730u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1E730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E730: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E734: AC229E58 sw $v0, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036734u); return; } g_debug_last_store_pc = 0x80036734u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036734u); -#endif -label_BFC1E738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1E738: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036738u); -#endif - /* 0xBFC1E73C: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003673Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1E744: 1460000D bne $v1, $zero, 0xBFC1E77C */ - uint32_t psx_brA_BFC1E744 = cpu->gpr[3]; uint32_t psx_brB_BFC1E744 = cpu->gpr[0]; - psx_taken_BFC1E744 = (psx_brA_BFC1E744 != psx_brB_BFC1E744); - psx_delay_BFC1E744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E748: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036748u); -#endif - if (psx_delay_BFC1E744) { - psx_delay_BFC1E744 = 0; - if (psx_taken_BFC1E744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003677Cu); - goto label_BFC1E77C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003674Cu); - } -label_BFC1E74C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E74Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003674Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E74C: AC209EAC sw $zero, -24916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003674Cu); return; } g_debug_last_store_pc = 0x8003674Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003674Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E750: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E754: AC209E54 sw $zero, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036754u); return; } g_debug_last_store_pc = 0x80036754u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E758: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E75C: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1E760: AC299E58 sw $t1, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036760u); return; } g_debug_last_store_pc = 0x80036760u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E764: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E768: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036768u); return; } g_debug_last_store_pc = 0x80036768u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E76C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1E770: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1E774: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1E778: AC2A9E64 sw $t2, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036778u); return; } g_debug_last_store_pc = 0x80036778u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9E64u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036778u); -#endif -label_BFC1E77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E77C: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036780u); -#endif - /* 0xBFC1E780: 8D6B6998 lw $t3, 27032($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 27032; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (27032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036780u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6998u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80036780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E784: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC1E788: 106B0038 beq $v1, $t3, 0xBFC1E86C */ - uint32_t psx_brA_BFC1E788 = cpu->gpr[3]; uint32_t psx_brB_BFC1E788 = cpu->gpr[11]; - psx_taken_BFC1E788 = (psx_brA_BFC1E788 == psx_brB_BFC1E788); - psx_delay_BFC1E788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1E78C: AC239E50 sw $v1, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003678Cu); return; } g_debug_last_store_pc = 0x8003678Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003678Cu); -#endif - if (psx_delay_BFC1E788) { - psx_delay_BFC1E788 = 0; - if (psx_taken_BFC1E788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003686Cu); - goto label_BFC1E86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036790u); - } -label_BFC1E790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E790: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80036798u; /* jal link before delay slot */ - psx_delay_BFC1E790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036794u); -#endif - if (psx_delay_BFC1E790) { - psx_delay_BFC1E790 = 0; - cpu->gpr[31] = 0x80036798u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1E798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E798: 14400034 bne $v0, $zero, 0xBFC1E86C */ - uint32_t psx_brA_BFC1E798 = cpu->gpr[2]; uint32_t psx_brB_BFC1E798 = cpu->gpr[0]; - psx_taken_BFC1E798 = (psx_brA_BFC1E798 != psx_brB_BFC1E798); - psx_delay_BFC1E798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E79C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003679Cu); -#endif - if (psx_delay_BFC1E798) { - psx_delay_BFC1E798 = 0; - if (psx_taken_BFC1E798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003686Cu); - goto label_BFC1E86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800367A0u); - } -label_BFC1E7A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E7A0: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x800367A8u; /* jal link before delay slot */ - psx_delay_BFC1E7A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E7A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800367A4u); -#endif - if (psx_delay_BFC1E7A0) { - psx_delay_BFC1E7A0 = 0; - cpu->gpr[31] = 0x800367A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1E7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E7A8: 14400030 bne $v0, $zero, 0xBFC1E86C */ - uint32_t psx_brA_BFC1E7A8 = cpu->gpr[2]; uint32_t psx_brB_BFC1E7A8 = cpu->gpr[0]; - psx_taken_BFC1E7A8 = (psx_brA_BFC1E7A8 != psx_brB_BFC1E7A8); - psx_delay_BFC1E7A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E7AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800367ACu); -#endif - if (psx_delay_BFC1E7A8) { - psx_delay_BFC1E7A8 = 0; - if (psx_taken_BFC1E7A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003686Cu); - goto label_BFC1E86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800367B0u); - } -label_BFC1E7B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E7B0: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x800367B8u; /* jal link before delay slot */ - psx_delay_BFC1E7B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E7B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800367B4u); -#endif - if (psx_delay_BFC1E7B0) { - psx_delay_BFC1E7B0 = 0; - cpu->gpr[31] = 0x800367B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC1E7B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E7B8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800367B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E7BC: 1041002B beq $v0, $at, 0xBFC1E86C */ - uint32_t psx_brA_BFC1E7BC = cpu->gpr[2]; uint32_t psx_brB_BFC1E7BC = cpu->gpr[1]; - psx_taken_BFC1E7BC = (psx_brA_BFC1E7BC == psx_brB_BFC1E7BC); - psx_delay_BFC1E7BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E7C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800367C0u); -#endif - if (psx_delay_BFC1E7BC) { - psx_delay_BFC1E7BC = 0; - if (psx_taken_BFC1E7BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003686Cu); - goto label_BFC1E86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800367C4u); - } -label_BFC1E7C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1E7C4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800367C4u); -#endif - /* 0xBFC1E7C8: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800367C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800367C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E7CC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800367CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E7D0: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x800367D8u; /* jal link before delay slot */ - psx_delay_BFC1E7D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1E7D4: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800367D4u); return; } g_debug_last_store_pc = 0x800367D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800367D4u); -#endif - if (psx_delay_BFC1E7D0) { - psx_delay_BFC1E7D0 = 0; - cpu->gpr[31] = 0x800367D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1E7D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E7D8: 14400024 bne $v0, $zero, 0xBFC1E86C */ - uint32_t psx_brA_BFC1E7D8 = cpu->gpr[2]; uint32_t psx_brB_BFC1E7D8 = cpu->gpr[0]; - psx_taken_BFC1E7D8 = (psx_brA_BFC1E7D8 != psx_brB_BFC1E7D8); - psx_delay_BFC1E7D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E7DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800367DCu); -#endif - if (psx_delay_BFC1E7D8) { - psx_delay_BFC1E7D8 = 0; - if (psx_taken_BFC1E7D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003686Cu); - goto label_BFC1E86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800367E0u); - } -label_BFC1E7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1E7E0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800367E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E7E4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800367E4u); -#endif - /* 0xBFC1E7E8: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800367E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800367E8u); -#endif - /* 0xBFC1E7EC: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800367ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800367F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1E7F0: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800367F0u); return; } g_debug_last_store_pc = 0x800367F0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800367F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC1E7F4: 0043082A slt $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800367F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E7F8: 1020000A beq $at, $zero, 0xBFC1E824 */ - uint32_t psx_brA_BFC1E7F8 = cpu->gpr[1]; uint32_t psx_brB_BFC1E7F8 = cpu->gpr[0]; - psx_taken_BFC1E7F8 = (psx_brA_BFC1E7F8 == psx_brB_BFC1E7F8); - psx_delay_BFC1E7F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC1E7FC: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800367FCu); -#endif - if (psx_delay_BFC1E7F8) { - psx_delay_BFC1E7F8 = 0; - if (psx_taken_BFC1E7F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036824u); - goto label_BFC1E824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036800u); - } -label_BFC1E800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1E800: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E804: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003680Cu; /* jal link before delay slot */ - psx_delay_BFC1E804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1E808: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80036808u); -#endif - if (psx_delay_BFC1E804) { - psx_delay_BFC1E804 = 0; - cpu->gpr[31] = 0x8003680Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1E80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1E80C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036810u); -#endif - /* 0xBFC1E810: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036810u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1E814: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000Au); -#endif - /* 0xBFC1E818: 0223082A slt $at, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0223082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E81C: 1420FFF8 bne $at, $zero, 0xBFC1E800 */ - uint32_t psx_brA_BFC1E81C = cpu->gpr[1]; uint32_t psx_brB_BFC1E81C = cpu->gpr[0]; - psx_taken_BFC1E81C = (psx_brA_BFC1E81C != psx_brB_BFC1E81C); - psx_delay_BFC1E81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036820u); -#endif - if (psx_delay_BFC1E81C) { - psx_delay_BFC1E81C = 0; - if (psx_taken_BFC1E81C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036800u); - goto label_BFC1E800; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036824u); - } -label_BFC1E824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1E824: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036824u); -#endif - /* 0xBFC1E828: 918C9E71 lbu $t4, -24975($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24975; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-24975)), 12, 0x1000u); - PGXP_LOAD(0x918C9E71u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80036828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E82C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1E830: AC239E50 sw $v1, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036830u); return; } g_debug_last_store_pc = 0x80036830u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100Au); -#endif - /* 0xBFC1E834: 006C082B sltu $at, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[12] ? 1 : 0); - PGXP_ALU(0x006C082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E838: 1020000A beq $at, $zero, 0xBFC1E864 */ - uint32_t psx_brA_BFC1E838 = cpu->gpr[1]; uint32_t psx_brB_BFC1E838 = cpu->gpr[0]; - psx_taken_BFC1E838 = (psx_brA_BFC1E838 == psx_brB_BFC1E838); - psx_delay_BFC1E838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20009u); -#endif - /* 0xBFC1E83C: 00608821 addu $s1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003683Cu); -#endif - if (psx_delay_BFC1E838) { - psx_delay_BFC1E838 = 0; - if (psx_taken_BFC1E838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036864u); - goto label_BFC1E864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036840u); - } -label_BFC1E840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC1E840: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E844: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003684Cu; /* jal link before delay slot */ - psx_delay_BFC1E844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1E848: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80036848u); -#endif - if (psx_delay_BFC1E844) { - psx_delay_BFC1E844 = 0; - cpu->gpr[31] = 0x8003684Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1E84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003684Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1E84C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003684Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036850u); -#endif - /* 0xBFC1E850: 91AD9E71 lbu $t5, -24975($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24975; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-24975)), 13, 0x2000u); - PGXP_LOAD(0x91AD9E71u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1E854: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22002u); -#endif - /* 0xBFC1E858: 022D082B sltu $at, $s1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[17] < cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x022D082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E85C: 1420FFF8 bne $at, $zero, 0xBFC1E840 */ - uint32_t psx_brA_BFC1E85C = cpu->gpr[1]; uint32_t psx_brB_BFC1E85C = cpu->gpr[0]; - psx_taken_BFC1E85C = (psx_brA_BFC1E85C != psx_brB_BFC1E85C); - psx_delay_BFC1E85C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E860: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036860u); -#endif - if (psx_delay_BFC1E85C) { - psx_delay_BFC1E85C = 0; - if (psx_taken_BFC1E85C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036840u); - goto label_BFC1E840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036864u); - } -label_BFC1E864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036864u); -#endif - /* 0xBFC1E864: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036864u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036868u); -#endif -label_BFC1E86C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E86Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003686Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E86C: 0C00C908 jal 0xB0032420 */ - cpu->gpr[31] = 0x80036874u; /* jal link before delay slot */ - psx_delay_BFC1E86C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036870u); -#endif - if (psx_delay_BFC1E86C) { - psx_delay_BFC1E86C = 0; - cpu->gpr[31] = 0x80036874u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032420u); - cpu->pc = 0x80032420u; return; - } -label_BFC1E874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E874: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E878: 1441000C bne $v0, $at, 0xBFC1E8AC */ - uint32_t psx_brA_BFC1E878 = cpu->gpr[2]; uint32_t psx_brB_BFC1E878 = cpu->gpr[1]; - psx_taken_BFC1E878 = (psx_brA_BFC1E878 != psx_brB_BFC1E878); - psx_delay_BFC1E878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E87C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003687Cu); -#endif - if (psx_delay_BFC1E878) { - psx_delay_BFC1E878 = 0; - if (psx_taken_BFC1E878) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368ACu); - goto label_BFC1E8AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036880u); - } -label_BFC1E880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1E880: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036880u); -#endif - /* 0xBFC1E884: 8DCE9E68 lw $t6, -24984($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036884u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E68u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E888: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80036888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1E88C: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1E890: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1E894: 11E00005 beq $t7, $zero, 0xBFC1E8AC */ - uint32_t psx_brA_BFC1E894 = cpu->gpr[15]; uint32_t psx_brB_BFC1E894 = cpu->gpr[0]; - psx_taken_BFC1E894 = (psx_brA_BFC1E894 == psx_brB_BFC1E894); - psx_delay_BFC1E894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E898: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036898u); -#endif - if (psx_delay_BFC1E894) { - psx_delay_BFC1E894 = 0; - if (psx_taken_BFC1E894) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368ACu); - goto label_BFC1E8AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003689Cu); - } -label_BFC1E89C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E89Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E89C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368A0u); -#endif - /* 0xBFC1E8A0: 8C849E6C lw $a0, -24980($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800368A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E8A4: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x800368ACu; /* jal link before delay slot */ - psx_delay_BFC1E8A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E8A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800368A8u); -#endif - if (psx_delay_BFC1E8A4) { - psx_delay_BFC1E8A4 = 0; - cpu->gpr[31] = 0x800368ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC1E8AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1E8AC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368B0u); -#endif - /* 0xBFC1E8B0: 8C639E50 lw $v1, -25008($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800368B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E8B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1E8B8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368B8u); -#endif - /* 0xBFC1E8BC: 8F189E58 lw $t8, -25000($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368BCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800368BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC1E8C0: AC236998 sw $v1, 27032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368C0u); return; } g_debug_last_store_pc = 0x800368C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236998u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800368C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E8C4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1E8C8: AC386994 sw $t8, 27028($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27028; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27028)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368C8u); return; } g_debug_last_store_pc = 0x800368C8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386994u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800368C8u); -#endif -label_BFC1E8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E8CC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368D0u); -#endif - /* 0xBFC1E8D0: 8C849E88 lw $a0, -24952($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800368D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E88u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800368D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E8D4: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x800368DCu; /* jal link before delay slot */ - psx_delay_BFC1E8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E8D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800368D8u); -#endif - if (psx_delay_BFC1E8D4) { - psx_delay_BFC1E8D4 = 0; - cpu->gpr[31] = 0x800368DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC1E8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E8DC: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800368DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E8E0: 14410215 bne $v0, $at, 0xBFC1F138 */ - uint32_t psx_brA_BFC1E8E0 = cpu->gpr[2]; uint32_t psx_brB_BFC1E8E0 = cpu->gpr[1]; - psx_taken_BFC1E8E0 = (psx_brA_BFC1E8E0 != psx_brB_BFC1E8E0); - psx_delay_BFC1E8E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E8E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800368E4u); -#endif - if (psx_delay_BFC1E8E0) { - psx_delay_BFC1E8E0 = 0; - if (psx_taken_BFC1E8E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037138u); - goto label_BFC1F138; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368E8u); - } -label_BFC1E8E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E8E8: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x800368F0u; /* jal link before delay slot */ - psx_delay_BFC1E8E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E8EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800368ECu); -#endif - if (psx_delay_BFC1E8E8) { - psx_delay_BFC1E8E8 = 0; - cpu->gpr[31] = 0x800368F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC1E8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E8F0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800368F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1E8F4: 14410019 bne $v0, $at, 0xBFC1E95C */ - uint32_t psx_brA_BFC1E8F4 = cpu->gpr[2]; uint32_t psx_brB_BFC1E8F4 = cpu->gpr[1]; - psx_taken_BFC1E8F4 = (psx_brA_BFC1E8F4 != psx_brB_BFC1E8F4); - psx_delay_BFC1E8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E8F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800368F8u); -#endif - if (psx_delay_BFC1E8F4) { - psx_delay_BFC1E8F4 = 0; - if (psx_taken_BFC1E8F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003695Cu); - goto label_BFC1E95C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800368FCu); - } -label_BFC1E8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800368FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1E8FC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800368FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036900u); -#endif - /* 0xBFC1E900: 8F399E4C lw $t9, -25012($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036900u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E4Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E904: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1E908: 1721000A bne $t9, $at, 0xBFC1E934 */ - uint32_t psx_brA_BFC1E908 = cpu->gpr[25]; uint32_t psx_brB_BFC1E908 = cpu->gpr[1]; - psx_taken_BFC1E908 = (psx_brA_BFC1E908 != psx_brB_BFC1E908); - psx_delay_BFC1E908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E90C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003690Cu); -#endif - if (psx_delay_BFC1E908) { - psx_delay_BFC1E908 = 0; - if (psx_taken_BFC1E908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036934u); - goto label_BFC1E934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036910u); - } -label_BFC1E910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E910: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036918u; /* jal link before delay slot */ - psx_delay_BFC1E910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E914: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036914u); -#endif - if (psx_delay_BFC1E910) { - psx_delay_BFC1E910 = 0; - cpu->gpr[31] = 0x80036918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1E918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E918: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E91C: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003691Cu); return; } g_debug_last_store_pc = 0x8003691Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1E920: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E924: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x8003692Cu; /* jal link before delay slot */ - psx_delay_BFC1E924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E928: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036928u); return; } g_debug_last_store_pc = 0x80036928u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036928u); -#endif - if (psx_delay_BFC1E924) { - psx_delay_BFC1E924 = 0; - cpu->gpr[31] = 0x8003692Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1E92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E92C: 10000200 beq $zero, $zero, 0xBFC1F130 */ - uint32_t psx_brA_BFC1E92C = cpu->gpr[0]; uint32_t psx_brB_BFC1E92C = cpu->gpr[0]; - psx_taken_BFC1E92C = (psx_brA_BFC1E92C == psx_brB_BFC1E92C); - psx_delay_BFC1E92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E930: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036930u); -#endif - if (psx_delay_BFC1E92C) { - psx_delay_BFC1E92C = 0; - if (psx_taken_BFC1E92C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037130u); - goto label_BFC1F130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036934u); - } -label_BFC1E934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1E934: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036934u); -#endif - /* 0xBFC1E938: 8D089E5C lw $t0, -24996($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036938u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E93C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1E940: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC1E944: 00892021 addu $a0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00892021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036944u); -#endif - /* 0xBFC1E948: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036948u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E94C: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036954u; /* jal link before delay slot */ - psx_delay_BFC1E94C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036950u); -#endif - if (psx_delay_BFC1E94C) { - psx_delay_BFC1E94C = 0; - cpu->gpr[31] = 0x80036954u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1E954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E954: 100001F6 beq $zero, $zero, 0xBFC1F130 */ - uint32_t psx_brA_BFC1E954 = cpu->gpr[0]; uint32_t psx_brB_BFC1E954 = cpu->gpr[0]; - psx_taken_BFC1E954 = (psx_brA_BFC1E954 == psx_brB_BFC1E954); - psx_delay_BFC1E954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1E958: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036958u); -#endif - if (psx_delay_BFC1E954) { - psx_delay_BFC1E954 = 0; - if (psx_taken_BFC1E954) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037130u); - goto label_BFC1F130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003695Cu); - } -label_BFC1E95C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E95Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E95C: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80036964u; /* jal link before delay slot */ - psx_delay_BFC1E95C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1E960: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036960u); return; } g_debug_last_store_pc = 0x80036960u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036960u); -#endif - if (psx_delay_BFC1E95C) { - psx_delay_BFC1E95C = 0; - cpu->gpr[31] = 0x80036964u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1E964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1E964: 10400083 beq $v0, $zero, 0xBFC1EB74 */ - uint32_t psx_brA_BFC1E964 = cpu->gpr[2]; uint32_t psx_brB_BFC1E964 = cpu->gpr[0]; - psx_taken_BFC1E964 = (psx_brA_BFC1E964 == psx_brB_BFC1E964); - psx_delay_BFC1E964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E968: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036968u); -#endif - if (psx_delay_BFC1E964) { - psx_delay_BFC1E964 = 0; - if (psx_taken_BFC1E964) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B74u); - goto label_BFC1EB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003696Cu); - } -label_BFC1E96C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E96Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E96C: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036974u; /* jal link before delay slot */ - psx_delay_BFC1E96C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036970u); -#endif - if (psx_delay_BFC1E96C) { - psx_delay_BFC1E96C = 0; - cpu->gpr[31] = 0x80036974u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1E974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1E974: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036974u); -#endif - /* 0xBFC1E978: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036978u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E97C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC1E980: 0142082A slt $at, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0142082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E984: 1420007B bne $at, $zero, 0xBFC1EB74 */ - uint32_t psx_brA_BFC1E984 = cpu->gpr[1]; uint32_t psx_brB_BFC1E984 = cpu->gpr[0]; - psx_taken_BFC1E984 = (psx_brA_BFC1E984 != psx_brB_BFC1E984); - psx_delay_BFC1E984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E988: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036988u); -#endif - if (psx_delay_BFC1E984) { - psx_delay_BFC1E984 = 0; - if (psx_taken_BFC1E984) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B74u); - goto label_BFC1EB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003698Cu); - } -label_BFC1E98C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E98Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1E98C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036990u); -#endif - /* 0xBFC1E990: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036990u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1E994: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80036994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1E998: 10500006 beq $v0, $s0, 0xBFC1E9B4 */ - uint32_t psx_brA_BFC1E998 = cpu->gpr[2]; uint32_t psx_brB_BFC1E998 = cpu->gpr[16]; - psx_taken_BFC1E998 = (psx_brA_BFC1E998 == psx_brB_BFC1E998); - psx_delay_BFC1E998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E99C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003699Cu); -#endif - if (psx_delay_BFC1E998) { - psx_delay_BFC1E998 = 0; - if (psx_taken_BFC1E998) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369B4u); - goto label_BFC1E9B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369A0u); - } -label_BFC1E9A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1E9A0: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800369A0u); -#endif - /* 0xBFC1E9A4: 8D6B6940 lw $t3, 26944($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800369A4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6940u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800369A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E9A8: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800369A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1E9AC: 15610014 bne $t3, $at, 0xBFC1EA00 */ - uint32_t psx_brA_BFC1E9AC = cpu->gpr[11]; uint32_t psx_brB_BFC1E9AC = cpu->gpr[1]; - psx_taken_BFC1E9AC = (psx_brA_BFC1E9AC != psx_brB_BFC1E9AC); - psx_delay_BFC1E9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800369B0u); -#endif - if (psx_delay_BFC1E9AC) { - psx_delay_BFC1E9AC = 0; - if (psx_taken_BFC1E9AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A00u); - goto label_BFC1EA00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369B4u); - } -label_BFC1E9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1E9B4: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800369B4u); -#endif - /* 0xBFC1E9B8: 8D8C6948 lw $t4, 26952($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800369B8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800369B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1E9BC: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800369BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1E9C0: 15810005 bne $t4, $at, 0xBFC1E9D8 */ - uint32_t psx_brA_BFC1E9C0 = cpu->gpr[12]; uint32_t psx_brB_BFC1E9C0 = cpu->gpr[1]; - psx_taken_BFC1E9C0 = (psx_brA_BFC1E9C0 != psx_brB_BFC1E9C0); - psx_delay_BFC1E9C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800369C4u); -#endif - if (psx_delay_BFC1E9C0) { - psx_delay_BFC1E9C0 = 0; - if (psx_taken_BFC1E9C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369D8u); - goto label_BFC1E9D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369C8u); - } -label_BFC1E9C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E9C8: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x800369D0u; /* jal link before delay slot */ - psx_delay_BFC1E9C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1E9CC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800369CCu); -#endif - if (psx_delay_BFC1E9C8) { - psx_delay_BFC1E9C8 = 0; - cpu->gpr[31] = 0x800369D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1E9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9D0: 10000046 beq $zero, $zero, 0xBFC1EAEC */ - uint32_t psx_brA_BFC1E9D0 = cpu->gpr[0]; uint32_t psx_brB_BFC1E9D0 = cpu->gpr[0]; - psx_taken_BFC1E9D0 = (psx_brA_BFC1E9D0 == psx_brB_BFC1E9D0); - psx_delay_BFC1E9D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800369D4u); -#endif - if (psx_delay_BFC1E9D0) { - psx_delay_BFC1E9D0 = 0; - if (psx_taken_BFC1E9D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AECu); - goto label_BFC1EAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800369D8u); - } -label_BFC1E9D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1E9D8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800369D8u); -#endif - /* 0xBFC1E9DC: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800369DCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800369DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1E9E0: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800369E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC1E9E4: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800369E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1E9E8: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800369E8u); -#endif - /* 0xBFC1E9EC: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800369ECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800369ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1E9F0: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x800369F8u; /* jal link before delay slot */ - psx_delay_BFC1E9F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800369F4u); -#endif - if (psx_delay_BFC1E9F0) { - psx_delay_BFC1E9F0 = 0; - cpu->gpr[31] = 0x800369F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1E9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1E9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1E9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800369F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9F8: 1000003C beq $zero, $zero, 0xBFC1EAEC */ - uint32_t psx_brA_BFC1E9F8 = cpu->gpr[0]; uint32_t psx_brB_BFC1E9F8 = cpu->gpr[0]; - psx_taken_BFC1E9F8 = (psx_brA_BFC1E9F8 == psx_brB_BFC1E9F8); - psx_delay_BFC1E9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1E9FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800369FCu); -#endif - if (psx_delay_BFC1E9F8) { - psx_delay_BFC1E9F8 = 0; - if (psx_taken_BFC1E9F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AECu); - goto label_BFC1EAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A00u); - } -label_BFC1EA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EA00: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x80036A08u; /* jal link before delay slot */ - psx_delay_BFC1EA00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A04u); -#endif - if (psx_delay_BFC1EA00) { - psx_delay_BFC1EA00 = 0; - cpu->gpr[31] = 0x80036A08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC1EA08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1EA08: 1450002F bne $v0, $s0, 0xBFC1EAC8 */ - uint32_t psx_brA_BFC1EA08 = cpu->gpr[2]; uint32_t psx_brB_BFC1EA08 = cpu->gpr[16]; - psx_taken_BFC1EA08 = (psx_brA_BFC1EA08 != psx_brB_BFC1EA08); - psx_delay_BFC1EA08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A0Cu); -#endif - if (psx_delay_BFC1EA08) { - psx_delay_BFC1EA08 = 0; - if (psx_taken_BFC1EA08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AC8u); - goto label_BFC1EAC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A10u); - } -label_BFC1EA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EA10: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80036A18u; /* jal link before delay slot */ - psx_delay_BFC1EA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A14u); -#endif - if (psx_delay_BFC1EA10) { - psx_delay_BFC1EA10 = 0; - cpu->gpr[31] = 0x80036A18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1EA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EA18: 1440001A bne $v0, $zero, 0xBFC1EA84 */ - uint32_t psx_brA_BFC1EA18 = cpu->gpr[2]; uint32_t psx_brB_BFC1EA18 = cpu->gpr[0]; - psx_taken_BFC1EA18 = (psx_brA_BFC1EA18 != psx_brB_BFC1EA18); - psx_delay_BFC1EA18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1EA1C: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A1Cu); -#endif - if (psx_delay_BFC1EA18) { - psx_delay_BFC1EA18 = 0; - if (psx_taken_BFC1EA18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A84u); - goto label_BFC1EA84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A20u); - } -label_BFC1EA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1EA20: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A20u); return; } g_debug_last_store_pc = 0x80036A20u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EA24: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036A2Cu; /* jal link before delay slot */ - psx_delay_BFC1EA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1EA28: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A28u); -#endif - if (psx_delay_BFC1EA24) { - psx_delay_BFC1EA24 = 0; - cpu->gpr[31] = 0x80036A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EA2C: 18400012 blez $v0, 0xBFC1EA78 */ - uint32_t psx_brA_BFC1EA2C = cpu->gpr[2]; - psx_taken_BFC1EA2C = ((int32_t)psx_brA_BFC1EA2C <= 0); - psx_delay_BFC1EA2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1EA30: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036A30u); -#endif - if (psx_delay_BFC1EA2C) { - psx_delay_BFC1EA2C = 0; - if (psx_taken_BFC1EA2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A78u); - goto label_BFC1EA78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A34u); - } -label_BFC1EA34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1EA34: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1EA38: 2718D0F0 addiu $t8, $t8, -12048 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-12048)); - PGXP_ALU(0x2718D0F0u, cpu->gpr[24], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC1EA3C: 00117880 sll $t7, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC1EA40: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC1EA44: 03381021 addu $v0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x03381021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC1EA48: 01F88021 addu $s0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036A48u); -#endif -label_BFC1EA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A4Cu); -#endif - /* 0xBFC1EA4C: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A4Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1EA50: AFA3005C sw $v1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A50u); return; } g_debug_last_store_pc = 0x80036A50u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3005Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1EA54: AFA20030 sw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A54u); return; } g_debug_last_store_pc = 0x80036A54u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EA58: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036A60u; /* jal link before delay slot */ - psx_delay_BFC1EA58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1EA5C: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A5Cu); -#endif - if (psx_delay_BFC1EA58) { - psx_delay_BFC1EA58 = 0; - cpu->gpr[31] = 0x80036A60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1EA60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A60u); -#endif - /* 0xBFC1EA60: 8FA20030 lw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A60u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1EA64: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A64u); -#endif - /* 0xBFC1EA68: 8FA3005C lw $v1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3005Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC1EA6C: 0050082B sltu $at, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0050082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EA70: 1020FFF6 beq $at, $zero, 0xBFC1EA4C */ - uint32_t psx_brA_BFC1EA70 = cpu->gpr[1]; uint32_t psx_brB_BFC1EA70 = cpu->gpr[0]; - psx_taken_BFC1EA70 = (psx_brA_BFC1EA70 == psx_brB_BFC1EA70); - psx_delay_BFC1EA70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A74u); -#endif - if (psx_delay_BFC1EA70) { - psx_delay_BFC1EA70 = 0; - if (psx_taken_BFC1EA70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A4Cu); - goto label_BFC1EA4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036A78u); - } -label_BFC1EA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A78u); -#endif - /* 0xBFC1EA78: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A78u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1EA80: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A80u); -#endif -label_BFC1EA84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EA84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1EA84: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1EA88: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036A88u); -#endif - /* 0xBFC1EA8C: 8D296948 lw $t1, 26952($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A8Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296948u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1EA90: AC289E5C sw $t0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036A90u); return; } g_debug_last_store_pc = 0x80036A90u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EA94: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1EA98: 15210005 bne $t1, $at, 0xBFC1EAB0 */ - uint32_t psx_brA_BFC1EA98 = cpu->gpr[9]; uint32_t psx_brB_BFC1EA98 = cpu->gpr[1]; - psx_taken_BFC1EA98 = (psx_brA_BFC1EA98 != psx_brB_BFC1EA98); - psx_delay_BFC1EA98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EA9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036A9Cu); -#endif - if (psx_delay_BFC1EA98) { - psx_delay_BFC1EA98 = 0; - if (psx_taken_BFC1EA98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AB0u); - goto label_BFC1EAB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AA0u); - } -label_BFC1EAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EAA0: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036AA8u; /* jal link before delay slot */ - psx_delay_BFC1EAA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1EAA4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036AA4u); -#endif - if (psx_delay_BFC1EAA0) { - psx_delay_BFC1EAA0 = 0; - cpu->gpr[31] = 0x80036AA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1EAA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAA8: 10000010 beq $zero, $zero, 0xBFC1EAEC */ - uint32_t psx_brA_BFC1EAA8 = cpu->gpr[0]; uint32_t psx_brB_BFC1EAA8 = cpu->gpr[0]; - psx_taken_BFC1EAA8 = (psx_brA_BFC1EAA8 == psx_brB_BFC1EAA8); - psx_delay_BFC1EAA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AACu); -#endif - if (psx_delay_BFC1EAA8) { - psx_delay_BFC1EAA8 = 0; - if (psx_taken_BFC1EAA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AECu); - goto label_BFC1EAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AB0u); - } -label_BFC1EAB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EAB0: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036AB0u); -#endif - /* 0xBFC1EAB4: 8C84D0F4 lw $a0, -12044($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036AB4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EAB8: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036AC0u; /* jal link before delay slot */ - psx_delay_BFC1EAB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EABC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036ABCu); -#endif - if (psx_delay_BFC1EAB8) { - psx_delay_BFC1EAB8 = 0; - cpu->gpr[31] = 0x80036AC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1EAC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAC0: 1000000A beq $zero, $zero, 0xBFC1EAEC */ - uint32_t psx_brA_BFC1EAC0 = cpu->gpr[0]; uint32_t psx_brB_BFC1EAC0 = cpu->gpr[0]; - psx_taken_BFC1EAC0 = (psx_brA_BFC1EAC0 == psx_brB_BFC1EAC0); - psx_delay_BFC1EAC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AC4u); -#endif - if (psx_delay_BFC1EAC0) { - psx_delay_BFC1EAC0 = 0; - if (psx_taken_BFC1EAC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AECu); - goto label_BFC1EAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AC8u); - } -label_BFC1EAC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EAC8: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036AD0u; /* jal link before delay slot */ - psx_delay_BFC1EAC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036ACCu); -#endif - if (psx_delay_BFC1EAC8) { - psx_delay_BFC1EAC8 = 0; - cpu->gpr[31] = 0x80036AD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1EAD0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036AD0u); -#endif - /* 0xBFC1EAD4: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036AD4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1EADC: 15420003 bne $t2, $v0, 0xBFC1EAEC */ - uint32_t psx_brA_BFC1EADC = cpu->gpr[10]; uint32_t psx_brB_BFC1EADC = cpu->gpr[2]; - psx_taken_BFC1EADC = (psx_brA_BFC1EADC != psx_brB_BFC1EADC); - psx_delay_BFC1EADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AE0u); -#endif - if (psx_delay_BFC1EADC) { - psx_delay_BFC1EADC = 0; - if (psx_taken_BFC1EADC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AECu); - goto label_BFC1EAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AE4u); - } -label_BFC1EAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EAE4: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80036AECu; /* jal link before delay slot */ - psx_delay_BFC1EAE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AE8u); -#endif - if (psx_delay_BFC1EAE4) { - psx_delay_BFC1EAE4 = 0; - cpu->gpr[31] = 0x80036AECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1EAEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EAEC: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80036AF4u; /* jal link before delay slot */ - psx_delay_BFC1EAEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EAF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036AF0u); -#endif - if (psx_delay_BFC1EAEC) { - psx_delay_BFC1EAEC = 0; - cpu->gpr[31] = 0x80036AF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1EAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EAF4: 1440018C bne $v0, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EAF4 = cpu->gpr[2]; uint32_t psx_brB_BFC1EAF4 = cpu->gpr[0]; - psx_taken_BFC1EAF4 = (psx_brA_BFC1EAF4 != psx_brB_BFC1EAF4); - psx_delay_BFC1EAF4 = 1; - /* 0xBFC1EAF8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036AF8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036AF8u); -#endif - if (psx_delay_BFC1EAF4) { - psx_delay_BFC1EAF4 = 0; - if (psx_taken_BFC1EAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036AFCu); - } -label_BFC1EAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EAFC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B00u); -#endif - /* 0xBFC1EB00: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EB04: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1EB08: 14410187 bne $v0, $at, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EB08 = cpu->gpr[2]; uint32_t psx_brB_BFC1EB08 = cpu->gpr[1]; - psx_taken_BFC1EB08 = (psx_brA_BFC1EB08 != psx_brB_BFC1EB08); - psx_delay_BFC1EB08 = 1; - /* 0xBFC1EB0C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B0Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B0Cu); -#endif - if (psx_delay_BFC1EB08) { - psx_delay_BFC1EB08 = 0; - if (psx_taken_BFC1EB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B10u); - } -label_BFC1EB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1EB10: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B10u); return; } g_debug_last_store_pc = 0x80036B10u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EB14: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036B1Cu; /* jal link before delay slot */ - psx_delay_BFC1EB14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC1EB18: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B18u); -#endif - if (psx_delay_BFC1EB14) { - psx_delay_BFC1EB14 = 0; - cpu->gpr[31] = 0x80036B1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EB1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EB1C: 18400012 blez $v0, 0xBFC1EB68 */ - uint32_t psx_brA_BFC1EB1C = cpu->gpr[2]; - psx_taken_BFC1EB1C = ((int32_t)psx_brA_BFC1EB1C <= 0); - psx_delay_BFC1EB1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC1EB20: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036B20u); -#endif - if (psx_delay_BFC1EB1C) { - psx_delay_BFC1EB1C = 0; - if (psx_taken_BFC1EB1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B68u); - goto label_BFC1EB68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B24u); - } -label_BFC1EB24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1EB24: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1EB28: 258CD0F0 addiu $t4, $t4, -12048 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-12048)); - PGXP_ALU(0x258CD0F0u, cpu->gpr[12], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC1EB2C: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC1EB30: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC1EB34: 01AC1021 addu $v0, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC1EB38: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036B38u); -#endif -label_BFC1EB3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B3Cu); -#endif - /* 0xBFC1EB3C: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B3Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC1EB40: AFA3005C sw $v1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B40u); return; } g_debug_last_store_pc = 0x80036B40u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3005Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC1EB44: AFA20030 sw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B44u); return; } g_debug_last_store_pc = 0x80036B44u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EB48: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036B50u; /* jal link before delay slot */ - psx_delay_BFC1EB48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1EB4C: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B4Cu); -#endif - if (psx_delay_BFC1EB48) { - psx_delay_BFC1EB48 = 0; - cpu->gpr[31] = 0x80036B50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1EB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B50u); -#endif - /* 0xBFC1EB50: 8FA20030 lw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1EB54: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036B54u); -#endif - /* 0xBFC1EB58: 8FA3005C lw $v1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B58u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3005Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC1EB5C: 0050082B sltu $at, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0050082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EB60: 1020FFF6 beq $at, $zero, 0xBFC1EB3C */ - uint32_t psx_brA_BFC1EB60 = cpu->gpr[1]; uint32_t psx_brB_BFC1EB60 = cpu->gpr[0]; - psx_taken_BFC1EB60 = (psx_brA_BFC1EB60 == psx_brB_BFC1EB60); - psx_delay_BFC1EB60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EB64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036B64u); -#endif - if (psx_delay_BFC1EB60) { - psx_delay_BFC1EB60 = 0; - if (psx_taken_BFC1EB60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B3Cu); - goto label_BFC1EB3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B68u); - } -label_BFC1EB68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B68u); -#endif - /* 0xBFC1EB68: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B68u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EB6C: 1000016E beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EB6C = cpu->gpr[0]; uint32_t psx_brB_BFC1EB6C = cpu->gpr[0]; - psx_taken_BFC1EB6C = (psx_brA_BFC1EB6C == psx_brB_BFC1EB6C); - psx_delay_BFC1EB6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B70u); -#endif - /* 0xBFC1EB70: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B70u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B70u); -#endif - if (psx_delay_BFC1EB6C) { - psx_delay_BFC1EB6C = 0; - if (psx_taken_BFC1EB6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B74u); - } -label_BFC1EB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1EB74: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1EB78: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036B78u); -#endif - /* 0xBFC1EB7C: 91EF9E71 lbu $t7, -24975($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24975; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-24975)), 15, 0x8000u); - PGXP_LOAD(0x91EF9E71u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B80u); -#endif - /* 0xBFC1EB80: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036B80u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EB84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC1EB88: 01CF082B sltu $at, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x01CF082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EB8C: 142000A1 bne $at, $zero, 0xBFC1EE14 */ - uint32_t psx_brA_BFC1EB8C = cpu->gpr[1]; uint32_t psx_brB_BFC1EB8C = cpu->gpr[0]; - psx_taken_BFC1EB8C = (psx_brA_BFC1EB8C != psx_brB_BFC1EB8C); - psx_delay_BFC1EB8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EB90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036B90u); -#endif - if (psx_delay_BFC1EB8C) { - psx_delay_BFC1EB8C = 0; - if (psx_taken_BFC1EB8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E14u); - goto label_BFC1EE14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036B94u); - } -label_BFC1EB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EB94: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80036B9Cu; /* jal link before delay slot */ - psx_delay_BFC1EB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EB98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036B98u); -#endif - if (psx_delay_BFC1EB94) { - psx_delay_BFC1EB94 = 0; - cpu->gpr[31] = 0x80036B9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1EB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EB9C: 1440009D bne $v0, $zero, 0xBFC1EE14 */ - uint32_t psx_brA_BFC1EB9C = cpu->gpr[2]; uint32_t psx_brB_BFC1EB9C = cpu->gpr[0]; - psx_taken_BFC1EB9C = (psx_brA_BFC1EB9C != psx_brB_BFC1EB9C); - psx_delay_BFC1EB9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BA0u); -#endif - if (psx_delay_BFC1EB9C) { - psx_delay_BFC1EB9C = 0; - if (psx_taken_BFC1EB9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E14u); - goto label_BFC1EE14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036BA4u); - } -label_BFC1EBA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EBA4: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x80036BACu; /* jal link before delay slot */ - psx_delay_BFC1EBA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BA8u); -#endif - if (psx_delay_BFC1EBA4) { - psx_delay_BFC1EBA4 = 0; - cpu->gpr[31] = 0x80036BACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC1EBAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1EBAC: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80036BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1EBB0: 14500063 bne $v0, $s0, 0xBFC1ED40 */ - uint32_t psx_brA_BFC1EBB0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EBB0 = cpu->gpr[16]; - psx_taken_BFC1EBB0 = (psx_brA_BFC1EBB0 != psx_brB_BFC1EBB0); - psx_delay_BFC1EBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BB4u); -#endif - if (psx_delay_BFC1EBB0) { - psx_delay_BFC1EBB0 = 0; - if (psx_taken_BFC1EBB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D40u); - goto label_BFC1ED40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036BB8u); - } -label_BFC1EBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EBB8: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80036BC0u; /* jal link before delay slot */ - psx_delay_BFC1EBB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BBCu); -#endif - if (psx_delay_BFC1EBB8) { - psx_delay_BFC1EBB8 = 0; - cpu->gpr[31] = 0x80036BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1EBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EBC0: 1040002E beq $v0, $zero, 0xBFC1EC7C */ - uint32_t psx_brA_BFC1EBC0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EBC0 = cpu->gpr[0]; - psx_taken_BFC1EBC0 = (psx_brA_BFC1EBC0 == psx_brB_BFC1EBC0); - psx_delay_BFC1EBC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BC4u); -#endif - if (psx_delay_BFC1EBC0) { - psx_delay_BFC1EBC0 = 0; - if (psx_taken_BFC1EBC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C7Cu); - goto label_BFC1EC7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036BC8u); - } -label_BFC1EBC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EBC8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036BC8u); -#endif - /* 0xBFC1EBCC: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036BCCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1EBD4: 1050001F beq $v0, $s0, 0xBFC1EC54 */ - uint32_t psx_brA_BFC1EBD4 = cpu->gpr[2]; uint32_t psx_brB_BFC1EBD4 = cpu->gpr[16]; - psx_taken_BFC1EBD4 = (psx_brA_BFC1EBD4 == psx_brB_BFC1EBD4); - psx_delay_BFC1EBD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BD8u); -#endif - if (psx_delay_BFC1EBD4) { - psx_delay_BFC1EBD4 = 0; - if (psx_taken_BFC1EBD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C54u); - goto label_BFC1EC54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036BDCu); - } -label_BFC1EBDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1EBDC: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BE0u); -#endif - /* 0xBFC1EBE0: 8F396940 lw $t9, 26944($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036BE0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396940u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EBE4: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80036BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1EBE8: 1321001A beq $t9, $at, 0xBFC1EC54 */ - uint32_t psx_brA_BFC1EBE8 = cpu->gpr[25]; uint32_t psx_brB_BFC1EBE8 = cpu->gpr[1]; - psx_taken_BFC1EBE8 = (psx_brA_BFC1EBE8 == psx_brB_BFC1EBE8); - psx_delay_BFC1EBE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EBEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036BECu); -#endif - if (psx_delay_BFC1EBE8) { - psx_delay_BFC1EBE8 = 0; - if (psx_taken_BFC1EBE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C54u); - goto label_BFC1EC54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036BF0u); - } -label_BFC1EBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1EBF0: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036BF0u); -#endif - /* 0xBFC1EBF4: 8E106948 lw $s0, 26952($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036BF4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E106948u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EBF8: 0C00D069 jal 0xB00341A4 */ - cpu->gpr[31] = 0x80036C00u; /* jal link before delay slot */ - psx_delay_BFC1EBF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1EBFC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036BFCu); -#endif - if (psx_delay_BFC1EBF8) { - psx_delay_BFC1EBF8 = 0; - cpu->gpr[31] = 0x80036C00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800341A4u); - cpu->pc = 0x800341A4u; return; - } -label_BFC1EC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1EC00: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C00u); -#endif - /* 0xBFC1EC04: 93189E70 lbu $t8, -24976($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24976; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-24976)), 24, 0x1000000u); - PGXP_LOAD(0x93189E70u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1EC08: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1EC0C: AC389E5C sw $t8, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C0Cu); return; } g_debug_last_store_pc = 0x80036C0Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EC10: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC1EC14: 16010005 bne $s0, $at, 0xBFC1EC2C */ - uint32_t psx_brA_BFC1EC14 = cpu->gpr[16]; uint32_t psx_brB_BFC1EC14 = cpu->gpr[1]; - psx_taken_BFC1EC14 = (psx_brA_BFC1EC14 != psx_brB_BFC1EC14); - psx_delay_BFC1EC14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C18u); -#endif - if (psx_delay_BFC1EC14) { - psx_delay_BFC1EC14 = 0; - if (psx_taken_BFC1EC14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C2Cu); - goto label_BFC1EC2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C1Cu); - } -label_BFC1EC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EC1C: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036C24u; /* jal link before delay slot */ - psx_delay_BFC1EC1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1EC20: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036C20u); -#endif - if (psx_delay_BFC1EC1C) { - psx_delay_BFC1EC1C = 0; - cpu->gpr[31] = 0x80036C24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1EC24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC24: 1000005A beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1EC24 = cpu->gpr[0]; uint32_t psx_brB_BFC1EC24 = cpu->gpr[0]; - psx_taken_BFC1EC24 = (psx_brA_BFC1EC24 == psx_brB_BFC1EC24); - psx_delay_BFC1EC24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C28u); -#endif - if (psx_delay_BFC1EC24) { - psx_delay_BFC1EC24 = 0; - if (psx_taken_BFC1EC24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C2Cu); - } -label_BFC1EC2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1EC2C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C30u); -#endif - /* 0xBFC1EC30: 8D089E5C lw $t0, -24996($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EC34: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1EC38: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC1EC3C: 00892021 addu $a0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00892021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C40u); -#endif - /* 0xBFC1EC40: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EC44: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036C4Cu; /* jal link before delay slot */ - psx_delay_BFC1EC44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C48u); -#endif - if (psx_delay_BFC1EC44) { - psx_delay_BFC1EC44 = 0; - cpu->gpr[31] = 0x80036C4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1EC4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC4C: 10000050 beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1EC4C = cpu->gpr[0]; uint32_t psx_brB_BFC1EC4C = cpu->gpr[0]; - psx_taken_BFC1EC4C = (psx_brA_BFC1EC4C == psx_brB_BFC1EC4C); - psx_delay_BFC1EC4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C50u); -#endif - if (psx_delay_BFC1EC4C) { - psx_delay_BFC1EC4C = 0; - if (psx_taken_BFC1EC4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C54u); - } -label_BFC1EC54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1EC54: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C54u); -#endif - /* 0xBFC1EC58: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C58u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EC5C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1EC60: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC1EC64: 008B2021 addu $a0, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036C64u); -#endif - /* 0xBFC1EC68: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C68u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EC6C: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036C74u; /* jal link before delay slot */ - psx_delay_BFC1EC6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C70u); -#endif - if (psx_delay_BFC1EC6C) { - psx_delay_BFC1EC6C = 0; - cpu->gpr[31] = 0x80036C74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1EC74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC74: 10000046 beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1EC74 = cpu->gpr[0]; uint32_t psx_brB_BFC1EC74 = cpu->gpr[0]; - psx_taken_BFC1EC74 = (psx_brA_BFC1EC74 == psx_brB_BFC1EC74); - psx_delay_BFC1EC74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C78u); -#endif - if (psx_delay_BFC1EC74) { - psx_delay_BFC1EC74 = 0; - if (psx_taken_BFC1EC74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036C7Cu); - } -label_BFC1EC7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EC7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1EC7C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C80u); -#endif - /* 0xBFC1EC80: 91AD9E70 lbu $t5, -24976($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24976; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-24976)), 13, 0x2000u); - PGXP_LOAD(0x91AD9E70u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1EC84: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1EC88: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036C88u); -#endif - /* 0xBFC1EC8C: 8D8C6948 lw $t4, 26952($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C8Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1EC90: AC2D9E5C sw $t5, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036C90u); return; } g_debug_last_store_pc = 0x80036C90u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EC94: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1EC98: 15810005 bne $t4, $at, 0xBFC1ECB0 */ - uint32_t psx_brA_BFC1EC98 = cpu->gpr[12]; uint32_t psx_brB_BFC1EC98 = cpu->gpr[1]; - psx_taken_BFC1EC98 = (psx_brA_BFC1EC98 != psx_brB_BFC1EC98); - psx_delay_BFC1EC98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EC9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036C9Cu); -#endif - if (psx_delay_BFC1EC98) { - psx_delay_BFC1EC98 = 0; - if (psx_taken_BFC1EC98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036CB0u); - goto label_BFC1ECB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036CA0u); - } -label_BFC1ECA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ECA0: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036CA8u; /* jal link before delay slot */ - psx_delay_BFC1ECA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1ECA4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036CA4u); -#endif - if (psx_delay_BFC1ECA0) { - psx_delay_BFC1ECA0 = 0; - cpu->gpr[31] = 0x80036CA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1ECA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ECA8: 10000039 beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1ECA8 = cpu->gpr[0]; uint32_t psx_brB_BFC1ECA8 = cpu->gpr[0]; - psx_taken_BFC1ECA8 = (psx_brA_BFC1ECA8 == psx_brB_BFC1ECA8); - psx_delay_BFC1ECA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ECAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036CACu); -#endif - if (psx_delay_BFC1ECA8) { - psx_delay_BFC1ECA8 = 0; - if (psx_taken_BFC1ECA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036CB0u); - } -label_BFC1ECB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1ECB0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036CB0u); -#endif - /* 0xBFC1ECB4: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036CB4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1ECB8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1ECBC: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC1ECC0: 008F2021 addu $a0, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036CC0u); -#endif - /* 0xBFC1ECC4: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036CC4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ECC8: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036CD0u; /* jal link before delay slot */ - psx_delay_BFC1ECC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ECCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036CCCu); -#endif - if (psx_delay_BFC1ECC8) { - psx_delay_BFC1ECC8 = 0; - cpu->gpr[31] = 0x80036CD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1ECD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ECD0: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80036CD8u; /* jal link before delay slot */ - psx_delay_BFC1ECD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ECD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036CD4u); -#endif - if (psx_delay_BFC1ECD0) { - psx_delay_BFC1ECD0 = 0; - cpu->gpr[31] = 0x80036CD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1ECD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1ECD8: 1440002D bne $v0, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1ECD8 = cpu->gpr[2]; uint32_t psx_brB_BFC1ECD8 = cpu->gpr[0]; - psx_taken_BFC1ECD8 = (psx_brA_BFC1ECD8 != psx_brB_BFC1ECD8); - psx_delay_BFC1ECD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ECDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036CDCu); -#endif - if (psx_delay_BFC1ECD8) { - psx_delay_BFC1ECD8 = 0; - if (psx_taken_BFC1ECD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036CE0u); - } -label_BFC1ECE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ECE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ECE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1ECE0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1ECE4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036CE4u); -#endif - /* 0xBFC1ECE8: 93399E71 lbu $t9, -24975($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24975; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-24975)), 25, 0x2000000u); - PGXP_LOAD(0x93399E71u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036CE8u); -#endif - /* 0xBFC1ECEC: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1ECF0: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036CF0u); return; } g_debug_last_store_pc = 0x80036CF0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC1ECF4: 0322082B sltu $at, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0322082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ECF8: 1420000E bne $at, $zero, 0xBFC1ED34 */ - uint32_t psx_brA_BFC1ECF8 = cpu->gpr[1]; uint32_t psx_brB_BFC1ECF8 = cpu->gpr[0]; - psx_taken_BFC1ECF8 = (psx_brA_BFC1ECF8 != psx_brB_BFC1ECF8); - psx_delay_BFC1ECF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC1ECFC: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036CFCu); -#endif - if (psx_delay_BFC1ECF8) { - psx_delay_BFC1ECF8 = 0; - if (psx_taken_BFC1ECF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D34u); - goto label_BFC1ED34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D00u); - } -label_BFC1ED00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1ED00: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1ED04: 2508D0F0 addiu $t0, $t0, -12048 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-12048)); - PGXP_ALU(0x2508D0F0u, cpu->gpr[8], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC1ED08: 0011C080 sll $t8, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010100u); -#endif - /* 0xBFC1ED0C: 03088021 addu $s0, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[24] + cpu->gpr[8]; - PGXP_ALU(0x03088021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036D0Cu); -#endif -label_BFC1ED10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D10u); -#endif - /* 0xBFC1ED10: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036D10u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ED14: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036D1Cu; /* jal link before delay slot */ - psx_delay_BFC1ED14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1ED18: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D18u); -#endif - if (psx_delay_BFC1ED14) { - psx_delay_BFC1ED14 = 0; - cpu->gpr[31] = 0x80036D1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1ED1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1ED1C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D20u); -#endif - /* 0xBFC1ED20: 91299E71 lbu $t1, -24975($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24975; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-24975)), 9, 0x200u); - PGXP_LOAD(0x91299E71u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1ED24: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20202u); -#endif - /* 0xBFC1ED28: 0131082B sltu $at, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0131082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ED2C: 1020FFF8 beq $at, $zero, 0xBFC1ED10 */ - uint32_t psx_brA_BFC1ED2C = cpu->gpr[1]; uint32_t psx_brB_BFC1ED2C = cpu->gpr[0]; - psx_taken_BFC1ED2C = (psx_brA_BFC1ED2C == psx_brB_BFC1ED2C); - psx_delay_BFC1ED2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1ED30: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D30u); -#endif - if (psx_delay_BFC1ED2C) { - psx_delay_BFC1ED2C = 0; - if (psx_taken_BFC1ED2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D10u); - goto label_BFC1ED10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D34u); - } -label_BFC1ED34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D34u); -#endif - /* 0xBFC1ED34: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036D34u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED38: 10000015 beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1ED38 = cpu->gpr[0]; uint32_t psx_brB_BFC1ED38 = cpu->gpr[0]; - psx_taken_BFC1ED38 = (psx_brA_BFC1ED38 == psx_brB_BFC1ED38); - psx_delay_BFC1ED38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D3Cu); -#endif - if (psx_delay_BFC1ED38) { - psx_delay_BFC1ED38 = 0; - if (psx_taken_BFC1ED38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D40u); - } -label_BFC1ED40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ED40: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80036D48u; /* jal link before delay slot */ - psx_delay_BFC1ED40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D44u); -#endif - if (psx_delay_BFC1ED40) { - psx_delay_BFC1ED40 = 0; - cpu->gpr[31] = 0x80036D48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1ED48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1ED48: 1040000F beq $v0, $zero, 0xBFC1ED88 */ - uint32_t psx_brA_BFC1ED48 = cpu->gpr[2]; uint32_t psx_brB_BFC1ED48 = cpu->gpr[0]; - psx_taken_BFC1ED48 = (psx_brA_BFC1ED48 == psx_brB_BFC1ED48); - psx_delay_BFC1ED48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D4Cu); -#endif - if (psx_delay_BFC1ED48) { - psx_delay_BFC1ED48 = 0; - if (psx_taken_BFC1ED48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D88u); - goto label_BFC1ED88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D50u); - } -label_BFC1ED50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1ED50: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036D50u); -#endif - /* 0xBFC1ED54: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036D54u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1ED5C: 1450000A bne $v0, $s0, 0xBFC1ED88 */ - uint32_t psx_brA_BFC1ED5C = cpu->gpr[2]; uint32_t psx_brB_BFC1ED5C = cpu->gpr[16]; - psx_taken_BFC1ED5C = (psx_brA_BFC1ED5C != psx_brB_BFC1ED5C); - psx_delay_BFC1ED5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D60u); -#endif - if (psx_delay_BFC1ED5C) { - psx_delay_BFC1ED5C = 0; - if (psx_taken_BFC1ED5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D88u); - goto label_BFC1ED88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D64u); - } -label_BFC1ED64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1ED64: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036D64u); -#endif - /* 0xBFC1ED68: 8D4A6940 lw $t2, 26944($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036D68u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6940u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1ED6C: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80036D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1ED70: 15410005 bne $t2, $at, 0xBFC1ED88 */ - uint32_t psx_brA_BFC1ED70 = cpu->gpr[10]; uint32_t psx_brB_BFC1ED70 = cpu->gpr[1]; - psx_taken_BFC1ED70 = (psx_brA_BFC1ED70 != psx_brB_BFC1ED70); - psx_delay_BFC1ED70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D74u); -#endif - if (psx_delay_BFC1ED70) { - psx_delay_BFC1ED70 = 0; - if (psx_taken_BFC1ED70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D88u); - goto label_BFC1ED88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D78u); - } -label_BFC1ED78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ED78: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036D80u; /* jal link before delay slot */ - psx_delay_BFC1ED78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1ED7C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036D7Cu); -#endif - if (psx_delay_BFC1ED78) { - psx_delay_BFC1ED78 = 0; - cpu->gpr[31] = 0x80036D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1ED80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED80: 10000003 beq $zero, $zero, 0xBFC1ED90 */ - uint32_t psx_brA_BFC1ED80 = cpu->gpr[0]; uint32_t psx_brB_BFC1ED80 = cpu->gpr[0]; - psx_taken_BFC1ED80 = (psx_brA_BFC1ED80 == psx_brB_BFC1ED80); - psx_delay_BFC1ED80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D84u); -#endif - if (psx_delay_BFC1ED80) { - psx_delay_BFC1ED80 = 0; - if (psx_taken_BFC1ED80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D90u); - goto label_BFC1ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036D88u); - } -label_BFC1ED88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ED88: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80036D90u; /* jal link before delay slot */ - psx_delay_BFC1ED88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D8Cu); -#endif - if (psx_delay_BFC1ED88) { - psx_delay_BFC1ED88 = 0; - cpu->gpr[31] = 0x80036D90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1ED90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1ED90: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80036D98u; /* jal link before delay slot */ - psx_delay_BFC1ED90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1ED94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036D94u); -#endif - if (psx_delay_BFC1ED90) { - psx_delay_BFC1ED90 = 0; - cpu->gpr[31] = 0x80036D98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1ED98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1ED98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1ED98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1ED98: 144000E3 bne $v0, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1ED98 = cpu->gpr[2]; uint32_t psx_brB_BFC1ED98 = cpu->gpr[0]; - psx_taken_BFC1ED98 = (psx_brA_BFC1ED98 != psx_brB_BFC1ED98); - psx_delay_BFC1ED98 = 1; - /* 0xBFC1ED9C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036D9Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036D9Cu); -#endif - if (psx_delay_BFC1ED98) { - psx_delay_BFC1ED98 = 0; - if (psx_taken_BFC1ED98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036DA0u); - } -label_BFC1EDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EDA0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036DA0u); -#endif - /* 0xBFC1EDA4: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036DA4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EDA8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1EDAC: 144100DE bne $v0, $at, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EDAC = cpu->gpr[2]; uint32_t psx_brB_BFC1EDAC = cpu->gpr[1]; - psx_taken_BFC1EDAC = (psx_brA_BFC1EDAC != psx_brB_BFC1EDAC); - psx_delay_BFC1EDAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DB0u); -#endif - /* 0xBFC1EDB0: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036DB0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DB0u); -#endif - if (psx_delay_BFC1EDAC) { - psx_delay_BFC1EDAC = 0; - if (psx_taken_BFC1EDAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036DB4u); - } -label_BFC1EDB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EDB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EDB4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1EDB8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036DB8u); -#endif - /* 0xBFC1EDBC: 916B9E71 lbu $t3, -24975($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24975; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (-24975)), 11, 0x800u); - PGXP_LOAD(0x916B9E71u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DC0u); -#endif - /* 0xBFC1EDC0: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1EDC4: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036DC4u); return; } g_debug_last_store_pc = 0x80036DC4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x806u); -#endif - /* 0xBFC1EDC8: 0162082B sltu $at, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0162082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EDCC: 1420000E bne $at, $zero, 0xBFC1EE08 */ - uint32_t psx_brA_BFC1EDCC = cpu->gpr[1]; uint32_t psx_brB_BFC1EDCC = cpu->gpr[0]; - psx_taken_BFC1EDCC = (psx_brA_BFC1EDCC != psx_brB_BFC1EDCC); - psx_delay_BFC1EDCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC1EDD0: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036DD0u); -#endif - if (psx_delay_BFC1EDCC) { - psx_delay_BFC1EDCC = 0; - if (psx_taken_BFC1EDCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E08u); - goto label_BFC1EE08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036DD4u); - } -label_BFC1EDD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EDD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1EDD4: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1EDD8: 258CD0F0 addiu $t4, $t4, -12048 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-12048)); - PGXP_ALU(0x258CD0F0u, cpu->gpr[12], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC1EDDC: 00116880 sll $t5, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13000u); -#endif - /* 0xBFC1EDE0: 01AC8021 addu $s0, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036DE0u); -#endif -label_BFC1EDE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EDE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DE4u); -#endif - /* 0xBFC1EDE4: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036DE4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EDE8: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036DF0u; /* jal link before delay slot */ - psx_delay_BFC1EDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1EDEC: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80036DECu); -#endif - if (psx_delay_BFC1EDE8) { - psx_delay_BFC1EDE8 = 0; - cpu->gpr[31] = 0x80036DF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1EDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1EDF0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036DF0u); -#endif - /* 0xBFC1EDF4: 91CE9E71 lbu $t6, -24975($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24975; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-24975)), 14, 0x4000u); - PGXP_LOAD(0x91CE9E71u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1EDF8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24002u); -#endif - /* 0xBFC1EDFC: 01D1082B sltu $at, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x01D1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EE00: 1020FFF8 beq $at, $zero, 0xBFC1EDE4 */ - uint32_t psx_brA_BFC1EE00 = cpu->gpr[1]; uint32_t psx_brB_BFC1EE00 = cpu->gpr[0]; - psx_taken_BFC1EE00 = (psx_brA_BFC1EE00 == psx_brB_BFC1EE00); - psx_delay_BFC1EE00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1EE04: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036E04u); -#endif - if (psx_delay_BFC1EE00) { - psx_delay_BFC1EE00 = 0; - if (psx_taken_BFC1EE00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036DE4u); - goto label_BFC1EDE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E08u); - } -label_BFC1EE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E08u); -#endif - /* 0xBFC1EE08: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E08u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE0C: 100000C6 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EE0C = cpu->gpr[0]; uint32_t psx_brB_BFC1EE0C = cpu->gpr[0]; - psx_taken_BFC1EE0C = (psx_brA_BFC1EE0C == psx_brB_BFC1EE0C); - psx_delay_BFC1EE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E10u); -#endif - /* 0xBFC1EE10: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E10u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E10u); -#endif - if (psx_delay_BFC1EE0C) { - psx_delay_BFC1EE0C = 0; - if (psx_taken_BFC1EE0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E14u); - } -label_BFC1EE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EE14: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80036E1Cu; /* jal link before delay slot */ - psx_delay_BFC1EE14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E18u); -#endif - if (psx_delay_BFC1EE14) { - psx_delay_BFC1EE14 = 0; - cpu->gpr[31] = 0x80036E1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1EE1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EE1C: 14400005 bne $v0, $zero, 0xBFC1EE34 */ - uint32_t psx_brA_BFC1EE1C = cpu->gpr[2]; uint32_t psx_brB_BFC1EE1C = cpu->gpr[0]; - psx_taken_BFC1EE1C = (psx_brA_BFC1EE1C != psx_brB_BFC1EE1C); - psx_delay_BFC1EE1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E20u); -#endif - if (psx_delay_BFC1EE1C) { - psx_delay_BFC1EE1C = 0; - if (psx_taken_BFC1EE1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E34u); - goto label_BFC1EE34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E24u); - } -label_BFC1EE24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EE24: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80036E2Cu; /* jal link before delay slot */ - psx_delay_BFC1EE24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E28u); -#endif - if (psx_delay_BFC1EE24) { - psx_delay_BFC1EE24 = 0; - cpu->gpr[31] = 0x80036E2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1EE2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EE2C: 1040007D beq $v0, $zero, 0xBFC1F024 */ - uint32_t psx_brA_BFC1EE2C = cpu->gpr[2]; uint32_t psx_brB_BFC1EE2C = cpu->gpr[0]; - psx_taken_BFC1EE2C = (psx_brA_BFC1EE2C == psx_brB_BFC1EE2C); - psx_delay_BFC1EE2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E30u); -#endif - if (psx_delay_BFC1EE2C) { - psx_delay_BFC1EE2C = 0; - if (psx_taken_BFC1EE2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037024u); - goto label_BFC1F024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E34u); - } -label_BFC1EE34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1EE34: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036E34u); -#endif - /* 0xBFC1EE38: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E38u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1EE3C: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80036E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1EE40: 10500006 beq $v0, $s0, 0xBFC1EE5C */ - uint32_t psx_brA_BFC1EE40 = cpu->gpr[2]; uint32_t psx_brB_BFC1EE40 = cpu->gpr[16]; - psx_taken_BFC1EE40 = (psx_brA_BFC1EE40 == psx_brB_BFC1EE40); - psx_delay_BFC1EE40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E44u); -#endif - if (psx_delay_BFC1EE40) { - psx_delay_BFC1EE40 = 0; - if (psx_taken_BFC1EE40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E5Cu); - goto label_BFC1EE5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E48u); - } -label_BFC1EE48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1EE48: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036E48u); -#endif - /* 0xBFC1EE4C: 8DEF6940 lw $t7, 26944($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E4Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6940u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EE50: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80036E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1EE54: 15E10014 bne $t7, $at, 0xBFC1EEA8 */ - uint32_t psx_brA_BFC1EE54 = cpu->gpr[15]; uint32_t psx_brB_BFC1EE54 = cpu->gpr[1]; - psx_taken_BFC1EE54 = (psx_brA_BFC1EE54 != psx_brB_BFC1EE54); - psx_delay_BFC1EE54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E58u); -#endif - if (psx_delay_BFC1EE54) { - psx_delay_BFC1EE54 = 0; - if (psx_taken_BFC1EE54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036EA8u); - goto label_BFC1EEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E5Cu); - } -label_BFC1EE5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1EE5C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E60u); -#endif - /* 0xBFC1EE60: 8F399E4C lw $t9, -25012($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E60u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E4Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EE64: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1EE68: 17210005 bne $t9, $at, 0xBFC1EE80 */ - uint32_t psx_brA_BFC1EE68 = cpu->gpr[25]; uint32_t psx_brB_BFC1EE68 = cpu->gpr[1]; - psx_taken_BFC1EE68 = (psx_brA_BFC1EE68 != psx_brB_BFC1EE68); - psx_delay_BFC1EE68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E6Cu); -#endif - if (psx_delay_BFC1EE68) { - psx_delay_BFC1EE68 = 0; - if (psx_taken_BFC1EE68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E80u); - goto label_BFC1EE80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E70u); - } -label_BFC1EE70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EE70: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036E78u; /* jal link before delay slot */ - psx_delay_BFC1EE70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1EE74: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036E74u); -#endif - if (psx_delay_BFC1EE70) { - psx_delay_BFC1EE70 = 0; - cpu->gpr[31] = 0x80036E78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1EE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE78: 100000AB beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EE78 = cpu->gpr[0]; uint32_t psx_brB_BFC1EE78 = cpu->gpr[0]; - psx_taken_BFC1EE78 = (psx_brA_BFC1EE78 == psx_brB_BFC1EE78); - psx_delay_BFC1EE78 = 1; - /* 0xBFC1EE7C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E7Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E7Cu); -#endif - if (psx_delay_BFC1EE78) { - psx_delay_BFC1EE78 = 0; - if (psx_taken_BFC1EE78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036E80u); - } -label_BFC1EE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1EE80: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036E80u); -#endif - /* 0xBFC1EE84: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E84u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EE88: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1EE8C: 00184080 sll $t0, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00184080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC1EE90: 00882021 addu $a0, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00882021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036E90u); -#endif - /* 0xBFC1EE94: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036E94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EE98: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80036EA0u; /* jal link before delay slot */ - psx_delay_BFC1EE98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EE9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036E9Cu); -#endif - if (psx_delay_BFC1EE98) { - psx_delay_BFC1EE98 = 0; - cpu->gpr[31] = 0x80036EA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1EEA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EEA0: 100000A1 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EEA0 = cpu->gpr[0]; uint32_t psx_brB_BFC1EEA0 = cpu->gpr[0]; - psx_taken_BFC1EEA0 = (psx_brA_BFC1EEA0 == psx_brB_BFC1EEA0); - psx_delay_BFC1EEA0 = 1; - /* 0xBFC1EEA4: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036EA4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036EA4u); -#endif - if (psx_delay_BFC1EEA0) { - psx_delay_BFC1EEA0 = 0; - if (psx_taken_BFC1EEA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036EA8u); - } -label_BFC1EEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EEA8: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80036EB0u; /* jal link before delay slot */ - psx_delay_BFC1EEA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EEAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036EACu); -#endif - if (psx_delay_BFC1EEA8) { - psx_delay_BFC1EEA8 = 0; - cpu->gpr[31] = 0x80036EB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC1EEB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EEB0: 14400038 bne $v0, $zero, 0xBFC1EF94 */ - uint32_t psx_brA_BFC1EEB0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EEB0 = cpu->gpr[0]; - psx_taken_BFC1EEB0 = (psx_brA_BFC1EEB0 != psx_brB_BFC1EEB0); - psx_delay_BFC1EEB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EEB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036EB4u); -#endif - if (psx_delay_BFC1EEB0) { - psx_delay_BFC1EEB0 = 0; - if (psx_taken_BFC1EEB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F94u); - goto label_BFC1EF94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036EB8u); - } -label_BFC1EEB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EEB8: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036EC0u; /* jal link before delay slot */ - psx_delay_BFC1EEB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EEBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036EBCu); -#endif - if (psx_delay_BFC1EEB8) { - psx_delay_BFC1EEB8 = 0; - cpu->gpr[31] = 0x80036EC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1EEC0: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036EC0u); -#endif - /* 0xBFC1EEC4: 8D299E5C lw $t1, -24996($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036EC4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80036EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EEC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1EECC: 11220031 beq $t1, $v0, 0xBFC1EF94 */ - uint32_t psx_brA_BFC1EECC = cpu->gpr[9]; uint32_t psx_brB_BFC1EECC = cpu->gpr[2]; - psx_taken_BFC1EECC = (psx_brA_BFC1EECC == psx_brB_BFC1EECC); - psx_delay_BFC1EECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036ED0u); -#endif - if (psx_delay_BFC1EECC) { - psx_delay_BFC1EECC = 0; - if (psx_taken_BFC1EECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F94u); - goto label_BFC1EF94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036ED4u); - } -label_BFC1EED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC1EED4: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036ED4u); return; } g_debug_last_store_pc = 0x80036ED4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EED8: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036EE0u; /* jal link before delay slot */ - psx_delay_BFC1EED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC1EEDC: 25310001 addiu $s1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036EDCu); -#endif - if (psx_delay_BFC1EED8) { - psx_delay_BFC1EED8 = 0; - cpu->gpr[31] = 0x80036EE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EEE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC1EEE0: 0051082A slt $at, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EEE4: 1420001A bne $at, $zero, 0xBFC1EF50 */ - uint32_t psx_brA_BFC1EEE4 = cpu->gpr[1]; uint32_t psx_brB_BFC1EEE4 = cpu->gpr[0]; - psx_taken_BFC1EEE4 = (psx_brA_BFC1EEE4 != psx_brB_BFC1EEE4); - psx_delay_BFC1EEE4 = 1; - /* 0xBFC1EEE8: 8FB80054 lw $t8, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036EE8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80054u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036EE8u); -#endif - if (psx_delay_BFC1EEE4) { - psx_delay_BFC1EEE4 = 0; - if (psx_taken_BFC1EEE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F50u); - goto label_BFC1EF50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036EECu); - } -label_BFC1EEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1EEEC: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1EEF0: 256BD0F0 addiu $t3, $t3, -12048 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-12048)); - PGXP_ALU(0x256BD0F0u, cpu->gpr[11], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80036EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC1EEF4: 00115080 sll $t2, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[10] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C00u); -#endif - /* 0xBFC1EEF8: 014B8021 addu $s0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC1EEFC: AFA00054 sw $zero, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036EFCu); return; } g_debug_last_store_pc = 0x80036EFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80036EFCu); -#endif -label_BFC1EF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1EF00: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036F00u); -#endif - /* 0xBFC1EF04: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F04u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1EF08: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1EF0C: 000D6080 sll $t4, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC1EF10: 01CC7021 addu $t6, $t6, $t4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[12]; - PGXP_ALU(0x01CC7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036F10u); -#endif - /* 0xBFC1EF14: 8DCED0F0 lw $t6, -12048($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCED0F0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F14u); -#endif - /* 0xBFC1EF18: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F18u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC1EF20: 15CF0005 bne $t6, $t7, 0xBFC1EF38 */ - uint32_t psx_brA_BFC1EF20 = cpu->gpr[14]; uint32_t psx_brB_BFC1EF20 = cpu->gpr[15]; - psx_taken_BFC1EF20 = (psx_brA_BFC1EF20 != psx_brB_BFC1EF20); - psx_delay_BFC1EF20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1EF24: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F24u); -#endif - if (psx_delay_BFC1EF20) { - psx_delay_BFC1EF20 = 0; - if (psx_taken_BFC1EF20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F38u); - goto label_BFC1EF38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F28u); - } -label_BFC1EF28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1EF28: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF2C: 10000007 beq $zero, $zero, 0xBFC1EF4C */ - uint32_t psx_brA_BFC1EF2C = cpu->gpr[0]; uint32_t psx_brB_BFC1EF2C = cpu->gpr[0]; - psx_taken_BFC1EF2C = (psx_brA_BFC1EF2C == psx_brB_BFC1EF2C); - psx_delay_BFC1EF2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC1EF30: AFB90054 sw $t9, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F30u); return; } g_debug_last_store_pc = 0x80036F30u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90054u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F30u); -#endif - if (psx_delay_BFC1EF2C) { - psx_delay_BFC1EF2C = 0; - if (psx_taken_BFC1EF2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F4Cu); - goto label_BFC1EF4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F34u); - } -label_BFC1EF34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC1EF34: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F34u); -#endif -label_BFC1EF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EF38: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80036F40u; /* jal link before delay slot */ - psx_delay_BFC1EF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC1EF3C: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F3Cu); -#endif - if (psx_delay_BFC1EF38) { - psx_delay_BFC1EF38 = 0; - cpu->gpr[31] = 0x80036F40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1EF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC1EF40: 0051082A slt $at, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EF44: 1020FFEE beq $at, $zero, 0xBFC1EF00 */ - uint32_t psx_brA_BFC1EF44 = cpu->gpr[1]; uint32_t psx_brB_BFC1EF44 = cpu->gpr[0]; - psx_taken_BFC1EF44 = (psx_brA_BFC1EF44 == psx_brB_BFC1EF44); - psx_delay_BFC1EF44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F48u); -#endif - if (psx_delay_BFC1EF44) { - psx_delay_BFC1EF44 = 0; - if (psx_taken_BFC1EF44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F00u); - goto label_BFC1EF00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F4Cu); - } -label_BFC1EF4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F4Cu); -#endif - /* 0xBFC1EF4C: 8FB80054 lw $t8, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F4Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80054u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F4Cu); -#endif -label_BFC1EF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1EF54: 1700000E bne $t8, $zero, 0xBFC1EF90 */ - uint32_t psx_brA_BFC1EF54 = cpu->gpr[24]; uint32_t psx_brB_BFC1EF54 = cpu->gpr[0]; - psx_taken_BFC1EF54 = (psx_brA_BFC1EF54 != psx_brB_BFC1EF54); - psx_delay_BFC1EF54 = 1; - /* 0xBFC1EF58: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F58u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F58u); -#endif - if (psx_delay_BFC1EF54) { - psx_delay_BFC1EF54 = 0; - if (psx_taken_BFC1EF54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F90u); - goto label_BFC1EF90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F5Cu); - } -label_BFC1EF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1EF5C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F60u); -#endif - /* 0xBFC1EF60: 8D089E5C lw $t0, -24996($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F60u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EF64: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1EF68: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC1EF6C: 00892021 addu $a0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00892021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F70u); -#endif - /* 0xBFC1EF70: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1EF78: 28810015 slti $at, $a0, 21 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0); - PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EF7C: 10200004 beq $at, $zero, 0xBFC1EF90 */ - uint32_t psx_brA_BFC1EF7C = cpu->gpr[1]; uint32_t psx_brB_BFC1EF7C = cpu->gpr[0]; - psx_taken_BFC1EF7C = (psx_brA_BFC1EF7C == psx_brB_BFC1EF7C); - psx_delay_BFC1EF7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F80u); -#endif - /* 0xBFC1EF80: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F80u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F80u); -#endif - if (psx_delay_BFC1EF7C) { - psx_delay_BFC1EF7C = 0; - if (psx_taken_BFC1EF7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F90u); - goto label_BFC1EF90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036F84u); - } -label_BFC1EF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EF84: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036F8Cu; /* jal link before delay slot */ - psx_delay_BFC1EF84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1EF88: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80036F88u); -#endif - if (psx_delay_BFC1EF84) { - psx_delay_BFC1EF84 = 0; - cpu->gpr[31] = 0x80036F8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1EF8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F8Cu); -#endif - /* 0xBFC1EF8C: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036F8Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80036F8Cu); -#endif -label_BFC1EF90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F90u); -#endif -label_BFC1EF94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EF94: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80036F9Cu; /* jal link before delay slot */ - psx_delay_BFC1EF94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EF98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036F98u); -#endif - if (psx_delay_BFC1EF94) { - psx_delay_BFC1EF94 = 0; - cpu->gpr[31] = 0x80036F9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1EF9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EF9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1EF9C: 10400009 beq $v0, $zero, 0xBFC1EFC4 */ - uint32_t psx_brA_BFC1EF9C = cpu->gpr[2]; uint32_t psx_brB_BFC1EF9C = cpu->gpr[0]; - psx_taken_BFC1EF9C = (psx_brA_BFC1EF9C == psx_brB_BFC1EF9C); - psx_delay_BFC1EF9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EFA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036FA0u); -#endif - if (psx_delay_BFC1EF9C) { - psx_delay_BFC1EF9C = 0; - if (psx_taken_BFC1EF9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036FC4u); - goto label_BFC1EFC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036FA4u); - } -label_BFC1EFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1EFA4: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FA4u); -#endif - /* 0xBFC1EFA8: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FA8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1EFAC: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1EFB0: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80036FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC1EFB4: 008B2021 addu $a0, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80036FB4u); -#endif - /* 0xBFC1EFB8: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FB8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EFBC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80036FC4u; /* jal link before delay slot */ - psx_delay_BFC1EFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1EFC0: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80036FC0u); -#endif - if (psx_delay_BFC1EFBC) { - psx_delay_BFC1EFBC = 0; - cpu->gpr[31] = 0x80036FC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1EFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1EFC4: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FC4u); -#endif - /* 0xBFC1EFC8: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FC8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1EFCC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1EFD0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1EFD4: 25AC0001 addiu $t4, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); - PGXP_ALU(0x25AC0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036FD4u); -#endif - /* 0xBFC1EFD8: 8DCE9E4C lw $t6, -25012($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FD8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E4Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1EFDC: AC2C9E5C sw $t4, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FDCu); return; } g_debug_last_store_pc = 0x80036FDCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1EFE0: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80036FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1EFE4: 15C10005 bne $t6, $at, 0xBFC1EFFC */ - uint32_t psx_brA_BFC1EFE4 = cpu->gpr[14]; uint32_t psx_brB_BFC1EFE4 = cpu->gpr[1]; - psx_taken_BFC1EFE4 = (psx_brA_BFC1EFE4 != psx_brB_BFC1EFE4); - psx_delay_BFC1EFE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EFE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80036FE8u); -#endif - if (psx_delay_BFC1EFE4) { - psx_delay_BFC1EFE4 = 0; - if (psx_taken_BFC1EFE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036FFCu); - goto label_BFC1EFFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036FECu); - } -label_BFC1EFEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EFECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1EFEC: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80036FF4u; /* jal link before delay slot */ - psx_delay_BFC1EFEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1EFF0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80036FF0u); -#endif - if (psx_delay_BFC1EFEC) { - psx_delay_BFC1EFEC = 0; - cpu->gpr[31] = 0x80036FF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1EFF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EFF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1EFF4: 1000004C beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1EFF4 = cpu->gpr[0]; uint32_t psx_brB_BFC1EFF4 = cpu->gpr[0]; - psx_taken_BFC1EFF4 = (psx_brA_BFC1EFF4 == psx_brB_BFC1EFF4); - psx_delay_BFC1EFF4 = 1; - /* 0xBFC1EFF8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80036FF8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80036FF8u); -#endif - if (psx_delay_BFC1EFF4) { - psx_delay_BFC1EFF4 = 0; - if (psx_taken_BFC1EFF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80036FFCu); - } -label_BFC1EFFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1EFFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1EFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80036FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1EFFC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80036FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037000u); -#endif - /* 0xBFC1F000: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037000u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F004: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1F008: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC1F00C: 00992021 addu $a0, $a0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[25]; - PGXP_ALU(0x00992021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003700Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037010u); -#endif - /* 0xBFC1F010: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037010u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F014: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x8003701Cu; /* jal link before delay slot */ - psx_delay_BFC1F014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037018u); -#endif - if (psx_delay_BFC1F014) { - psx_delay_BFC1F014 = 0; - cpu->gpr[31] = 0x8003701Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1F01C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F01Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003701Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F01C: 10000042 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1F01C = cpu->gpr[0]; uint32_t psx_brB_BFC1F01C = cpu->gpr[0]; - psx_taken_BFC1F01C = (psx_brA_BFC1F01C == psx_brB_BFC1F01C); - psx_delay_BFC1F01C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037020u); -#endif - /* 0xBFC1F020: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037020u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80037020u); -#endif - if (psx_delay_BFC1F01C) { - psx_delay_BFC1F01C = 0; - if (psx_taken_BFC1F01C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037024u); - } -label_BFC1F024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F024: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037024u); -#endif - /* 0xBFC1F028: 8C429E44 lw $v0, -25020($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037028u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F02C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003702Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F030: 1441000A bne $v0, $at, 0xBFC1F05C */ - uint32_t psx_brA_BFC1F030 = cpu->gpr[2]; uint32_t psx_brB_BFC1F030 = cpu->gpr[1]; - psx_taken_BFC1F030 = (psx_brA_BFC1F030 != psx_brB_BFC1F030); - psx_delay_BFC1F030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1F034: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80037034u); -#endif - if (psx_delay_BFC1F030) { - psx_delay_BFC1F030 = 0; - if (psx_taken_BFC1F030) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003705Cu); - goto label_BFC1F05C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037038u); - } -label_BFC1F038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1F038: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037038u); -#endif - /* 0xBFC1F03C: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003703Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F040: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1F044: 27080001 addiu $t0, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F048: 0C00E2D8 jal 0xB0038B60 */ - cpu->gpr[31] = 0x80037050u; /* jal link before delay slot */ - psx_delay_BFC1F048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1F04C: AC289E5C sw $t0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003704Cu); return; } g_debug_last_store_pc = 0x8003704Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003704Cu); -#endif - if (psx_delay_BFC1F048) { - psx_delay_BFC1F048 = 0; - cpu->gpr[31] = 0x80037050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B60u); - cpu->pc = 0x80038B60u; return; - } -label_BFC1F050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F050: 10000035 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1F050 = cpu->gpr[0]; uint32_t psx_brB_BFC1F050 = cpu->gpr[0]; - psx_taken_BFC1F050 = (psx_brA_BFC1F050 == psx_brB_BFC1F050); - psx_delay_BFC1F050 = 1; - /* 0xBFC1F054: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037054u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80037054u); -#endif - if (psx_delay_BFC1F050) { - psx_delay_BFC1F050 = 0; - if (psx_taken_BFC1F050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037058u); - } -label_BFC1F058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1F058: 24100002 addiu $s0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80037058u); -#endif -label_BFC1F05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003705Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1F05C: 10500006 beq $v0, $s0, 0xBFC1F078 */ - uint32_t psx_brA_BFC1F05C = cpu->gpr[2]; uint32_t psx_brB_BFC1F05C = cpu->gpr[16]; - psx_taken_BFC1F05C = (psx_brA_BFC1F05C == psx_brB_BFC1F05C); - psx_delay_BFC1F05C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037060u); -#endif - if (psx_delay_BFC1F05C) { - psx_delay_BFC1F05C = 0; - if (psx_taken_BFC1F05C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037078u); - goto label_BFC1F078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037064u); - } -label_BFC1F064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1F064: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037064u); -#endif - /* 0xBFC1F068: 8D296940 lw $t1, 26944($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037068u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296940u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80037068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F06C: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003706Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1F070: 1521001D bne $t1, $at, 0xBFC1F0E8 */ - uint32_t psx_brA_BFC1F070 = cpu->gpr[9]; uint32_t psx_brB_BFC1F070 = cpu->gpr[1]; - psx_taken_BFC1F070 = (psx_brA_BFC1F070 != psx_brB_BFC1F070); - psx_delay_BFC1F070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037074u); -#endif - if (psx_delay_BFC1F070) { - psx_delay_BFC1F070 = 0; - if (psx_taken_BFC1F070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370E8u); - goto label_BFC1F0E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037078u); - } -label_BFC1F078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1F078: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037078u); -#endif - /* 0xBFC1F07C: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003707Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F080: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1F084: 15410010 bne $t2, $at, 0xBFC1F0C8 */ - uint32_t psx_brA_BFC1F084 = cpu->gpr[10]; uint32_t psx_brB_BFC1F084 = cpu->gpr[1]; - psx_taken_BFC1F084 = (psx_brA_BFC1F084 != psx_brB_BFC1F084); - psx_delay_BFC1F084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037088u); -#endif - if (psx_delay_BFC1F084) { - psx_delay_BFC1F084 = 0; - if (psx_taken_BFC1F084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370C8u); - goto label_BFC1F0C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003708Cu); - } -label_BFC1F08C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F08Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1F08C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037090u); -#endif - /* 0xBFC1F090: 8D6B9E4C lw $t3, -25012($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037090u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E4Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F094: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F098: 15610007 bne $t3, $at, 0xBFC1F0B8 */ - uint32_t psx_brA_BFC1F098 = cpu->gpr[11]; uint32_t psx_brB_BFC1F098 = cpu->gpr[1]; - psx_taken_BFC1F098 = (psx_brA_BFC1F098 != psx_brB_BFC1F098); - psx_delay_BFC1F098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F09C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003709Cu); -#endif - if (psx_delay_BFC1F098) { - psx_delay_BFC1F098 = 0; - if (psx_taken_BFC1F098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370B8u); - goto label_BFC1F0B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370A0u); - } -label_BFC1F0A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F0A0: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x800370A8u; /* jal link before delay slot */ - psx_delay_BFC1F0A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F0A4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800370A4u); -#endif - if (psx_delay_BFC1F0A0) { - psx_delay_BFC1F0A0 = 0; - cpu->gpr[31] = 0x800370A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1F0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1F0A8: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800370A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F0AC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800370ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F0B0: 1000001C beq $zero, $zero, 0xBFC1F124 */ - uint32_t psx_brA_BFC1F0B0 = cpu->gpr[0]; uint32_t psx_brB_BFC1F0B0 = cpu->gpr[0]; - psx_taken_BFC1F0B0 = (psx_brA_BFC1F0B0 == psx_brB_BFC1F0B0); - psx_delay_BFC1F0B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F0B4: AC2D6958 sw $t5, 26968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370B4u); return; } g_debug_last_store_pc = 0x800370B4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6958u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800370B4u); -#endif - if (psx_delay_BFC1F0B0) { - psx_delay_BFC1F0B0 = 0; - if (psx_taken_BFC1F0B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037124u); - goto label_BFC1F124; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370B8u); - } -label_BFC1F0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F0B8: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x800370C0u; /* jal link before delay slot */ - psx_delay_BFC1F0B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F0BC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800370BCu); -#endif - if (psx_delay_BFC1F0B8) { - psx_delay_BFC1F0B8 = 0; - cpu->gpr[31] = 0x800370C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1F0C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F0C0: 10000019 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1F0C0 = cpu->gpr[0]; uint32_t psx_brB_BFC1F0C0 = cpu->gpr[0]; - psx_taken_BFC1F0C0 = (psx_brA_BFC1F0C0 == psx_brB_BFC1F0C0); - psx_delay_BFC1F0C0 = 1; - /* 0xBFC1F0C4: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370C4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800370C4u); -#endif - if (psx_delay_BFC1F0C0) { - psx_delay_BFC1F0C0 = 0; - if (psx_taken_BFC1F0C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370C8u); - } -label_BFC1F0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F0C8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800370C8u); -#endif - /* 0xBFC1F0CC: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370CCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800370CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F0D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800370D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC1F0D4: 258EFFFF addiu $t6, $t4, -1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] + (-1)); - PGXP_ALU(0x258EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800370D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F0D8: 0C00E2E7 jal 0xB0038B9C */ - cpu->gpr[31] = 0x800370E0u; /* jal link before delay slot */ - psx_delay_BFC1F0D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F0DC: AC2E9E5C sw $t6, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370DCu); return; } g_debug_last_store_pc = 0x800370DCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800370DCu); -#endif - if (psx_delay_BFC1F0D8) { - psx_delay_BFC1F0D8 = 0; - cpu->gpr[31] = 0x800370E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B9Cu); - cpu->pc = 0x80038B9Cu; return; - } -label_BFC1F0E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F0E0: 10000011 beq $zero, $zero, 0xBFC1F128 */ - uint32_t psx_brA_BFC1F0E0 = cpu->gpr[0]; uint32_t psx_brB_BFC1F0E0 = cpu->gpr[0]; - psx_taken_BFC1F0E0 = (psx_brA_BFC1F0E0 == psx_brB_BFC1F0E0); - psx_delay_BFC1F0E0 = 1; - /* 0xBFC1F0E4: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370E4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800370E4u); -#endif - if (psx_delay_BFC1F0E0) { - psx_delay_BFC1F0E0 = 0; - if (psx_taken_BFC1F0E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037128u); - goto label_BFC1F128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800370E8u); - } -label_BFC1F0E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F0E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1F0E8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800370E8u); -#endif - /* 0xBFC1F0EC: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370ECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800370ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800370F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F0F0: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800370F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC1F0F4: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800370F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC1F0F8: 00992021 addu $a0, $a0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[25]; - PGXP_ALU(0x00992021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800370F8u); -#endif - /* 0xBFC1F0FC: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800370FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800370FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F100: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80037108u; /* jal link before delay slot */ - psx_delay_BFC1F100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F104: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80037104u); -#endif - if (psx_delay_BFC1F100) { - psx_delay_BFC1F100 = 0; - cpu->gpr[31] = 0x80037108u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC1F108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1F108: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037108u); -#endif - /* 0xBFC1F10C: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003710Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003710Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F110: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC1F114: 27080001 addiu $t0, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1F118: AC289E5C sw $t0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037118u); return; } g_debug_last_store_pc = 0x80037118u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80037118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F11C: 0C00E3C9 jal 0xB0038F24 */ - cpu->gpr[31] = 0x80037124u; /* jal link before delay slot */ - psx_delay_BFC1F11C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F120: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037120u); -#endif - if (psx_delay_BFC1F11C) { - psx_delay_BFC1F11C = 0; - cpu->gpr[31] = 0x80037124u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F24u); - cpu->pc = 0x80038F24u; return; - } -label_BFC1F124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037124u); -#endif - /* 0xBFC1F124: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037124u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80037124u); -#endif -label_BFC1F128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F128: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F12C: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003712Cu); -#endif -label_BFC1F130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F130: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1F134: AC29695C sw $t1, 26972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037134u); return; } g_debug_last_store_pc = 0x80037134u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29695Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80037134u); -#endif -label_BFC1F138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F138: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037138u); -#endif - /* 0xBFC1F13C: 8C849E8C lw $a0, -24948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003713Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E8Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003713Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F140: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x80037148u; /* jal link before delay slot */ - psx_delay_BFC1F140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037144u); -#endif - if (psx_delay_BFC1F140) { - psx_delay_BFC1F140 = 0; - cpu->gpr[31] = 0x80037148u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC1F148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F148: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F14C: 144100D2 bne $v0, $at, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F14C = cpu->gpr[2]; uint32_t psx_brB_BFC1F14C = cpu->gpr[1]; - psx_taken_BFC1F14C = (psx_brA_BFC1F14C != psx_brB_BFC1F14C); - psx_delay_BFC1F14C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F150: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037150u); -#endif - if (psx_delay_BFC1F14C) { - psx_delay_BFC1F14C = 0; - if (psx_taken_BFC1F14C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037154u); - } -label_BFC1F154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1F154: 27A40048 addiu $a0, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27A40048u, cpu->gpr[4], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80037154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F158: 0C015C67 jal 0xB005719C */ - cpu->gpr[31] = 0x80037160u; /* jal link before delay slot */ - psx_delay_BFC1F158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1F15C: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8003715Cu); -#endif - if (psx_delay_BFC1F158) { - psx_delay_BFC1F158 = 0; - cpu->gpr[31] = 0x80037160u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005719Cu); - cpu->pc = 0x8005719Cu; return; - } -label_BFC1F160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037160u); -#endif - /* 0xBFC1F160: 93A30048 lbu $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 3, 0x20000000u); - PGXP_LOAD(0x93A30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80037160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F164: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F168: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC1F16C: 306B0010 andi $t3, $v1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0x10u; - PGXP_ALU(0x306B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003716Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1F170: 1160002C beq $t3, $zero, 0xBFC1F224 */ - uint32_t psx_brA_BFC1F170 = cpu->gpr[11]; uint32_t psx_brB_BFC1F170 = cpu->gpr[0]; - psx_taken_BFC1F170 = (psx_brA_BFC1F170 == psx_brB_BFC1F170); - psx_delay_BFC1F170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1F174: AC2A9EB0 sw $t2, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037174u); return; } g_debug_last_store_pc = 0x80037174u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9EB0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80037174u); -#endif - if (psx_delay_BFC1F170) { - psx_delay_BFC1F170 = 0; - if (psx_taken_BFC1F170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037224u); - goto label_BFC1F224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037178u); - } -label_BFC1F178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F178: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x80037180u; /* jal link before delay slot */ - psx_delay_BFC1F178 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F17C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003717Cu); -#endif - if (psx_delay_BFC1F178) { - psx_delay_BFC1F178 = 0; - cpu->gpr[31] = 0x80037180u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1F180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F180: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F184: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037184u); return; } g_debug_last_store_pc = 0x80037184u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F188: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F18C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003718Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1F190: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037190u); -#endif - /* 0xBFC1F194: 8DAD6940 lw $t5, 26944($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037194u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD6940u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F198: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037198u); return; } g_debug_last_store_pc = 0x80037198u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80037198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F19C: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8003719Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F1A0: 15A10004 bne $t5, $at, 0xBFC1F1B4 */ - uint32_t psx_brA_BFC1F1A0 = cpu->gpr[13]; uint32_t psx_brB_BFC1F1A0 = cpu->gpr[1]; - psx_taken_BFC1F1A0 = (psx_brA_BFC1F1A0 != psx_brB_BFC1F1A0); - psx_delay_BFC1F1A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F1A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800371A4u); -#endif - if (psx_delay_BFC1F1A0) { - psx_delay_BFC1F1A0 = 0; - if (psx_taken_BFC1F1A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371B4u); - goto label_BFC1F1B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371A8u); - } -label_BFC1F1A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1F1A8: 240C0038 addiu $t4, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x240C0038u, cpu->gpr[12], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800371A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F1AC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1F1B0: AC2C6940 sw $t4, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371B0u); return; } g_debug_last_store_pc = 0x800371B0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6940u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800371B0u); -#endif -label_BFC1F1B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1F1B4: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371B4u); -#endif - /* 0xBFC1F1B8: 8DCE6940 lw $t6, 26944($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6940u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800371B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F1BC: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800371BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F1C0: 15C10004 bne $t6, $at, 0xBFC1F1D4 */ - uint32_t psx_brA_BFC1F1C0 = cpu->gpr[14]; uint32_t psx_brB_BFC1F1C0 = cpu->gpr[1]; - psx_taken_BFC1F1C0 = (psx_brA_BFC1F1C0 != psx_brB_BFC1F1C0); - psx_delay_BFC1F1C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F1C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800371C4u); -#endif - if (psx_delay_BFC1F1C0) { - psx_delay_BFC1F1C0 = 0; - if (psx_taken_BFC1F1C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371D4u); - goto label_BFC1F1D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371C8u); - } -label_BFC1F1C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F1C8: 240F0037 addiu $t7, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x240F0037u, cpu->gpr[15], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x800371C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F1CC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F1D0: AC2F6940 sw $t7, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371D0u); return; } g_debug_last_store_pc = 0x800371D0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6940u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800371D0u); -#endif -label_BFC1F1D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1F1D4: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371D4u); -#endif - /* 0xBFC1F1D8: 8F396940 lw $t9, 26944($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371D8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396940u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800371D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F1DC: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800371DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1F1E0: 17210004 bne $t9, $at, 0xBFC1F1F4 */ - uint32_t psx_brA_BFC1F1E0 = cpu->gpr[25]; uint32_t psx_brB_BFC1F1E0 = cpu->gpr[1]; - psx_taken_BFC1F1E0 = (psx_brA_BFC1F1E0 != psx_brB_BFC1F1E0); - psx_delay_BFC1F1E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F1E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800371E4u); -#endif - if (psx_delay_BFC1F1E0) { - psx_delay_BFC1F1E0 = 0; - if (psx_taken_BFC1F1E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371F4u); - goto label_BFC1F1F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800371E8u); - } -label_BFC1F1E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1F1E8: 24180032 addiu $t8, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24180032u, cpu->gpr[24], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800371E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F1EC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1F1F0: AC386948 sw $t8, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371F0u); return; } g_debug_last_store_pc = 0x800371F0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800371F0u); -#endif -label_BFC1F1F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F1F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800371F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1F1F4: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800371F4u); -#endif - /* 0xBFC1F1F8: 8D086940 lw $t0, 26944($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800371F8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086940u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800371F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F1FC: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800371FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1F200: 15010004 bne $t0, $at, 0xBFC1F214 */ - uint32_t psx_brA_BFC1F200 = cpu->gpr[8]; uint32_t psx_brB_BFC1F200 = cpu->gpr[1]; - psx_taken_BFC1F200 = (psx_brA_BFC1F200 != psx_brB_BFC1F200); - psx_delay_BFC1F200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037204u); -#endif - if (psx_delay_BFC1F200) { - psx_delay_BFC1F200 = 0; - if (psx_taken_BFC1F200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037214u); - goto label_BFC1F214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037208u); - } -label_BFC1F208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F208: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F20C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003720Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1F210: AC296948 sw $t1, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037210u); return; } g_debug_last_store_pc = 0x80037210u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296948u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80037210u); -#endif -label_BFC1F214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F214: 0C00D2BC jal 0xB0034AF0 */ - cpu->gpr[31] = 0x8003721Cu; /* jal link before delay slot */ - psx_delay_BFC1F214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F218: 2402003A addiu $v0, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2402003Au, cpu->gpr[2], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80037218u); -#endif - if (psx_delay_BFC1F214) { - psx_delay_BFC1F214 = 0; - cpu->gpr[31] = 0x8003721Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AF0u); - cpu->pc = 0x80034AF0u; return; - } -label_BFC1F21C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F21Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003721Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F21C: 10000120 beq $zero, $zero, 0xBFC1F6A0 */ - uint32_t psx_brA_BFC1F21C = cpu->gpr[0]; uint32_t psx_brB_BFC1F21C = cpu->gpr[0]; - psx_taken_BFC1F21C = (psx_brA_BFC1F21C == psx_brB_BFC1F21C); - psx_delay_BFC1F21C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037220u); -#endif - /* 0xBFC1F220: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037220u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037220u); -#endif - if (psx_delay_BFC1F21C) { - psx_delay_BFC1F21C = 0; - if (psx_taken_BFC1F21C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376A0u); - goto label_BFC1F6A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037224u); - } -label_BFC1F224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1F224: 306A0008 andi $t2, $v1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x8u; - PGXP_ALU(0x306A0008u, cpu->gpr[10], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80037224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F228: 15400004 bne $t2, $zero, 0xBFC1F23C */ - uint32_t psx_brA_BFC1F228 = cpu->gpr[10]; uint32_t psx_brB_BFC1F228 = cpu->gpr[0]; - psx_taken_BFC1F228 = (psx_brA_BFC1F228 != psx_brB_BFC1F228); - psx_delay_BFC1F228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F22C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003722Cu); -#endif - if (psx_delay_BFC1F228) { - psx_delay_BFC1F228 = 0; - if (psx_taken_BFC1F228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003723Cu); - goto label_BFC1F23C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037230u); - } -label_BFC1F230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037230u); -#endif - /* 0xBFC1F230: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F234: 10000021 beq $zero, $zero, 0xBFC1F2BC */ - uint32_t psx_brA_BFC1F234 = cpu->gpr[0]; uint32_t psx_brB_BFC1F234 = cpu->gpr[0]; - psx_taken_BFC1F234 = (psx_brA_BFC1F234 == psx_brB_BFC1F234); - psx_delay_BFC1F234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC1F238: 30680004 andi $t0, $v1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x4u; - PGXP_ALU(0x30680004u, cpu->gpr[8], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80037238u); -#endif - if (psx_delay_BFC1F234) { - psx_delay_BFC1F234 = 0; - if (psx_taken_BFC1F234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372BCu); - goto label_BFC1F2BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003723Cu); - } -label_BFC1F23C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F23Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003723Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1F23C: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003723Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037240u); -#endif - /* 0xBFC1F240: 8D6B6940 lw $t3, 26944($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037240u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6940u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F244: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80037244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F248: 15610007 bne $t3, $at, 0xBFC1F268 */ - uint32_t psx_brA_BFC1F248 = cpu->gpr[11]; uint32_t psx_brB_BFC1F248 = cpu->gpr[1]; - psx_taken_BFC1F248 = (psx_brA_BFC1F248 != psx_brB_BFC1F248); - psx_delay_BFC1F248 = 1; - /* 0xBFC1F24C: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003724Cu); -#endif - if (psx_delay_BFC1F248) { - psx_delay_BFC1F248 = 0; - if (psx_taken_BFC1F248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037268u); - goto label_BFC1F268; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037250u); - } -label_BFC1F250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1F250: 240D0038 addiu $t5, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x240D0038u, cpu->gpr[13], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80037250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F254: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F258: AC2D6940 sw $t5, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037258u); return; } g_debug_last_store_pc = 0x80037258u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6940u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F25C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F260: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037260u); return; } g_debug_last_store_pc = 0x80037260u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037260u); -#endif - /* 0xBFC1F264: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037264u); -#endif -label_BFC1F268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1F26C: 304C0080 andi $t4, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304C0080u, cpu->gpr[12], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1F270: 11800004 beq $t4, $zero, 0xBFC1F284 */ - uint32_t psx_brA_BFC1F270 = cpu->gpr[12]; uint32_t psx_brB_BFC1F270 = cpu->gpr[0]; - psx_taken_BFC1F270 = (psx_brA_BFC1F270 == psx_brB_BFC1F270); - psx_delay_BFC1F270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F274: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037274u); -#endif - if (psx_delay_BFC1F270) { - psx_delay_BFC1F270 = 0; - if (psx_taken_BFC1F270) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037284u); - goto label_BFC1F284; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037278u); - } -label_BFC1F278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F278: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037278u); return; } g_debug_last_store_pc = 0x80037278u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F27C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F280: AC209DFC sw $zero, -25092($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25092; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25092)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037280u); return; } g_debug_last_store_pc = 0x80037280u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037280u); -#endif -label_BFC1F284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1F284: 304E0040 andi $t6, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x304E0040u, cpu->gpr[14], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80037284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1F288: 11C00005 beq $t6, $zero, 0xBFC1F2A0 */ - uint32_t psx_brA_BFC1F288 = cpu->gpr[14]; uint32_t psx_brB_BFC1F288 = cpu->gpr[0]; - psx_taken_BFC1F288 = (psx_brA_BFC1F288 == psx_brB_BFC1F288); - psx_delay_BFC1F288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1F28C: 30590010 andi $t9, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003728Cu); -#endif - if (psx_delay_BFC1F288) { - psx_delay_BFC1F288 = 0; - if (psx_taken_BFC1F288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372A0u); - goto label_BFC1F2A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037290u); - } -label_BFC1F290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F290: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F294: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F298: AC2F9DF4 sw $t7, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037298u); return; } g_debug_last_store_pc = 0x80037298u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9DF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1F29C: 30590010 andi $t9, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30590010u, cpu->gpr[25], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003729Cu); -#endif -label_BFC1F2A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1F2A0: 13200005 beq $t9, $zero, 0xBFC1F2B8 */ - uint32_t psx_brA_BFC1F2A0 = cpu->gpr[25]; uint32_t psx_brB_BFC1F2A0 = cpu->gpr[0]; - psx_taken_BFC1F2A0 = (psx_brA_BFC1F2A0 == psx_brB_BFC1F2A0); - psx_delay_BFC1F2A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F2A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372A4u); -#endif - if (psx_delay_BFC1F2A0) { - psx_delay_BFC1F2A0 = 0; - if (psx_taken_BFC1F2A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372B8u); - goto label_BFC1F2B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372A8u); - } -label_BFC1F2A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F2A8: AC209DF4 sw $zero, -25100($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800372A8u); return; } g_debug_last_store_pc = 0x800372A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800372A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F2AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1F2B0: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800372B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1F2B4: AC389E00 sw $t8, -25088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800372B4u); return; } g_debug_last_store_pc = 0x800372B4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E00u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800372B4u); -#endif -label_BFC1F2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC1F2B8: 30680004 andi $t0, $v1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x4u; - PGXP_ALU(0x30680004u, cpu->gpr[8], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800372B8u); -#endif -label_BFC1F2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1F2BC: 1100003A beq $t0, $zero, 0xBFC1F3A8 */ - uint32_t psx_brA_BFC1F2BC = cpu->gpr[8]; uint32_t psx_brB_BFC1F2BC = cpu->gpr[0]; - psx_taken_BFC1F2BC = (psx_brA_BFC1F2BC == psx_brB_BFC1F2BC); - psx_delay_BFC1F2BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F2C0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372C0u); -#endif - if (psx_delay_BFC1F2BC) { - psx_delay_BFC1F2BC = 0; - if (psx_taken_BFC1F2BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373A8u); - goto label_BFC1F3A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372C4u); - } -label_BFC1F2C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1F2C4: 30490008 andi $t1, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30490008u, cpu->gpr[9], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x800372C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F2C8: 11200029 beq $t1, $zero, 0xBFC1F370 */ - uint32_t psx_brA_BFC1F2C8 = cpu->gpr[9]; uint32_t psx_brB_BFC1F2C8 = cpu->gpr[0]; - psx_taken_BFC1F2C8 = (psx_brA_BFC1F2C8 == psx_brB_BFC1F2C8); - psx_delay_BFC1F2C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F2CC: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800372CCu); return; } g_debug_last_store_pc = 0x800372CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800372CCu); -#endif - if (psx_delay_BFC1F2C8) { - psx_delay_BFC1F2C8 = 0; - if (psx_taken_BFC1F2C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037370u); - goto label_BFC1F370; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372D0u); - } -label_BFC1F2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F2D0: 0C00D660 jal 0xB0035980 */ - cpu->gpr[31] = 0x800372D8u; /* jal link before delay slot */ - psx_delay_BFC1F2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800372D4u); -#endif - if (psx_delay_BFC1F2D0) { - psx_delay_BFC1F2D0 = 0; - cpu->gpr[31] = 0x800372D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80035980u); - cpu->pc = 0x80035980u; return; - } -label_BFC1F2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F2D8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800372D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F2DC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1F2E0: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372E0u); -#endif - /* 0xBFC1F2E4: 8D4A6940 lw $t2, 26944($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800372E4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6940u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800372E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F2E8: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800372E8u); return; } g_debug_last_store_pc = 0x800372E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800372E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F2EC: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x800372ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1F2F0: 15410005 bne $t2, $at, 0xBFC1F308 */ - uint32_t psx_brA_BFC1F2F0 = cpu->gpr[10]; uint32_t psx_brB_BFC1F2F0 = cpu->gpr[1]; - psx_taken_BFC1F2F0 = (psx_brA_BFC1F2F0 != psx_brB_BFC1F2F0); - psx_delay_BFC1F2F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F2F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800372F4u); -#endif - if (psx_delay_BFC1F2F0) { - psx_delay_BFC1F2F0 = 0; - if (psx_taken_BFC1F2F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037308u); - goto label_BFC1F308; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800372F8u); - } -label_BFC1F2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800372F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1F2F8: 240B0038 addiu $t3, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x240B0038u, cpu->gpr[11], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800372F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F2FC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800372FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F300: 10000017 beq $zero, $zero, 0xBFC1F360 */ - uint32_t psx_brA_BFC1F300 = cpu->gpr[0]; uint32_t psx_brB_BFC1F300 = cpu->gpr[0]; - psx_taken_BFC1F300 = (psx_brA_BFC1F300 == psx_brB_BFC1F300); - psx_delay_BFC1F300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F304: AC2B6940 sw $t3, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037304u); return; } g_debug_last_store_pc = 0x80037304u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B6940u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037304u); -#endif - if (psx_delay_BFC1F300) { - psx_delay_BFC1F300 = 0; - if (psx_taken_BFC1F300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037360u); - goto label_BFC1F360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037308u); - } -label_BFC1F308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1F308: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037308u); -#endif - /* 0xBFC1F30C: 8DAD6940 lw $t5, 26944($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003730Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD6940u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003730Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F310: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80037310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F314: 15A10005 bne $t5, $at, 0xBFC1F32C */ - uint32_t psx_brA_BFC1F314 = cpu->gpr[13]; uint32_t psx_brB_BFC1F314 = cpu->gpr[1]; - psx_taken_BFC1F314 = (psx_brA_BFC1F314 != psx_brB_BFC1F314); - psx_delay_BFC1F314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F318: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037318u); -#endif - if (psx_delay_BFC1F314) { - psx_delay_BFC1F314 = 0; - if (psx_taken_BFC1F314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003732Cu); - goto label_BFC1F32C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003731Cu); - } -label_BFC1F31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1F31C: 240C0037 addiu $t4, $zero, 55 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (55)); - PGXP_ALU(0x240C0037u, cpu->gpr[12], _pgx1, 0x00000037u); } -#ifdef PSX_COSIM - cosim_instr(0x8003731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F320: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F324: 1000000E beq $zero, $zero, 0xBFC1F360 */ - uint32_t psx_brA_BFC1F324 = cpu->gpr[0]; uint32_t psx_brB_BFC1F324 = cpu->gpr[0]; - psx_taken_BFC1F324 = (psx_brA_BFC1F324 == psx_brB_BFC1F324); - psx_delay_BFC1F324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1F328: AC2C6940 sw $t4, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037328u); return; } g_debug_last_store_pc = 0x80037328u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6940u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80037328u); -#endif - if (psx_delay_BFC1F324) { - psx_delay_BFC1F324 = 0; - if (psx_taken_BFC1F324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037360u); - goto label_BFC1F360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003732Cu); - } -label_BFC1F32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003732Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1F32C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003732Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037330u); -#endif - /* 0xBFC1F330: 8DCE6948 lw $t6, 26952($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037330u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F334: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F338: 11C1000A beq $t6, $at, 0xBFC1F364 */ - uint32_t psx_brA_BFC1F338 = cpu->gpr[14]; uint32_t psx_brB_BFC1F338 = cpu->gpr[1]; - psx_taken_BFC1F338 = (psx_brA_BFC1F338 == psx_brB_BFC1F338); - psx_delay_BFC1F338 = 1; - /* 0xBFC1F33C: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003733Cu); -#endif - if (psx_delay_BFC1F338) { - psx_delay_BFC1F338 = 0; - if (psx_taken_BFC1F338) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037364u); - goto label_BFC1F364; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037340u); - } -label_BFC1F340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F340: 0C00D2BC jal 0xB0034AF0 */ - cpu->gpr[31] = 0x80037348u; /* jal link before delay slot */ - psx_delay_BFC1F340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F344: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037344u); -#endif - if (psx_delay_BFC1F340) { - psx_delay_BFC1F340 = 0; - cpu->gpr[31] = 0x80037348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034AF0u); - cpu->pc = 0x80034AF0u; return; - } -label_BFC1F348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F348: 240F0032 addiu $t7, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240F0032u, cpu->gpr[15], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F34C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003734Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F350: AC2F6940 sw $t7, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037350u); return; } g_debug_last_store_pc = 0x80037350u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6940u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F354: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1F358: 24190032 addiu $t9, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24190032u, cpu->gpr[25], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1F35C: AC396948 sw $t9, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003735Cu); return; } g_debug_last_store_pc = 0x8003735Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396948u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003735Cu); -#endif -label_BFC1F360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037360u); -#endif - /* 0xBFC1F360: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037360u); -#endif -label_BFC1F364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037364u); -#endif - /* 0xBFC1F364: 93A30048 lbu $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 3, 0x20000000u); - PGXP_LOAD(0x93A30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80037364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F368: 10000010 beq $zero, $zero, 0xBFC1F3AC */ - uint32_t psx_brA_BFC1F368 = cpu->gpr[0]; uint32_t psx_brB_BFC1F368 = cpu->gpr[0]; - psx_taken_BFC1F368 = (psx_brA_BFC1F368 == psx_brB_BFC1F368); - psx_delay_BFC1F368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1F36C: 306A0001 andi $t2, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003736Cu); -#endif - if (psx_delay_BFC1F368) { - psx_delay_BFC1F368 = 0; - if (psx_taken_BFC1F368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373ACu); - goto label_BFC1F3AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037370u); - } -label_BFC1F370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1F370: 30580040 andi $t8, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80037370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1F374: 17000007 bne $t8, $zero, 0xBFC1F394 */ - uint32_t psx_brA_BFC1F374 = cpu->gpr[24]; uint32_t psx_brB_BFC1F374 = cpu->gpr[0]; - psx_taken_BFC1F374 = (psx_brA_BFC1F374 != psx_brB_BFC1F374); - psx_delay_BFC1F374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037378u); -#endif - if (psx_delay_BFC1F374) { - psx_delay_BFC1F374 = 0; - if (psx_taken_BFC1F374) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037394u); - goto label_BFC1F394; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003737Cu); - } -label_BFC1F37C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F37Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003737Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC1F37C: 30480020 andi $t0, $v0, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x20u; - PGXP_ALU(0x30480020u, cpu->gpr[8], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003737Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1F380: 15000004 bne $t0, $zero, 0xBFC1F394 */ - uint32_t psx_brA_BFC1F380 = cpu->gpr[8]; uint32_t psx_brB_BFC1F380 = cpu->gpr[0]; - psx_taken_BFC1F380 = (psx_brA_BFC1F380 != psx_brB_BFC1F380); - psx_delay_BFC1F380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037384u); -#endif - if (psx_delay_BFC1F380) { - psx_delay_BFC1F380 = 0; - if (psx_taken_BFC1F380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037394u); - goto label_BFC1F394; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037388u); - } -label_BFC1F388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC1F388: 30490010 andi $t1, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x30490010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80037388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F38C: 11200007 beq $t1, $zero, 0xBFC1F3AC */ - uint32_t psx_brA_BFC1F38C = cpu->gpr[9]; uint32_t psx_brB_BFC1F38C = cpu->gpr[0]; - psx_taken_BFC1F38C = (psx_brA_BFC1F38C == psx_brB_BFC1F38C); - psx_delay_BFC1F38C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1F390: 306A0001 andi $t2, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037390u); -#endif - if (psx_delay_BFC1F38C) { - psx_delay_BFC1F38C = 0; - if (psx_taken_BFC1F38C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373ACu); - goto label_BFC1F3AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037394u); - } -label_BFC1F394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F394: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x8003739Cu; /* jal link before delay slot */ - psx_delay_BFC1F394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037398u); -#endif - if (psx_delay_BFC1F394) { - psx_delay_BFC1F394 = 0; - cpu->gpr[31] = 0x8003739Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1F39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003739Cu); -#endif - /* 0xBFC1F39C: 93A20044 lbu $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 2, 0x20000000u); - PGXP_LOAD(0x93A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003739Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373A0u); -#endif - /* 0xBFC1F3A0: 93A30048 lbu $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 3, 0x20000000u); - PGXP_LOAD(0x93A30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800373A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F3A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800373A4u); -#endif -label_BFC1F3A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC1F3A8: 306A0001 andi $t2, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x306A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800373A8u); -#endif -label_BFC1F3AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F3AC: 1140003A beq $t2, $zero, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F3AC = cpu->gpr[10]; uint32_t psx_brB_BFC1F3AC = cpu->gpr[0]; - psx_taken_BFC1F3AC = (psx_brA_BFC1F3AC == psx_brB_BFC1F3AC); - psx_delay_BFC1F3AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F3B0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800373B0u); -#endif - if (psx_delay_BFC1F3AC) { - psx_delay_BFC1F3AC = 0; - if (psx_taken_BFC1F3AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373B4u); - } -label_BFC1F3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1F3B4: 304B0080 andi $t3, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304B0080u, cpu->gpr[11], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x800373B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1F3B8: 1160002F beq $t3, $zero, 0xBFC1F478 */ - uint32_t psx_brA_BFC1F3B8 = cpu->gpr[11]; uint32_t psx_brB_BFC1F3B8 = cpu->gpr[0]; - psx_taken_BFC1F3B8 = (psx_brA_BFC1F3B8 == psx_brB_BFC1F3B8); - psx_delay_BFC1F3B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F3BC: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800373BCu); return; } g_debug_last_store_pc = 0x800373BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800373BCu); -#endif - if (psx_delay_BFC1F3B8) { - psx_delay_BFC1F3B8 = 0; - if (psx_taken_BFC1F3B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037478u); - goto label_BFC1F478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373C0u); - } -label_BFC1F3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1F3C0: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800373C0u); -#endif - /* 0xBFC1F3C4: 8DAD6940 lw $t5, 26944($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800373C4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD6940u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800373C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F3C8: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800373C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F3CC: 15A10005 bne $t5, $at, 0xBFC1F3E4 */ - uint32_t psx_brA_BFC1F3CC = cpu->gpr[13]; uint32_t psx_brB_BFC1F3CC = cpu->gpr[1]; - psx_taken_BFC1F3CC = (psx_brA_BFC1F3CC != psx_brB_BFC1F3CC); - psx_delay_BFC1F3CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F3D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800373D0u); -#endif - if (psx_delay_BFC1F3CC) { - psx_delay_BFC1F3CC = 0; - if (psx_taken_BFC1F3CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373E4u); - goto label_BFC1F3E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373D4u); - } -label_BFC1F3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F3D4: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800373D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F3D8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800373D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F3DC: 1000002E beq $zero, $zero, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F3DC = cpu->gpr[0]; uint32_t psx_brB_BFC1F3DC = cpu->gpr[0]; - psx_taken_BFC1F3DC = (psx_brA_BFC1F3DC == psx_brB_BFC1F3DC); - psx_delay_BFC1F3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F3E0: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800373E0u); return; } g_debug_last_store_pc = 0x800373E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800373E0u); -#endif - if (psx_delay_BFC1F3DC) { - psx_delay_BFC1F3DC = 0; - if (psx_taken_BFC1F3DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373E4u); - } -label_BFC1F3E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F3E4: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800373E4u); -#endif - /* 0xBFC1F3E8: 8D8C6940 lw $t4, 26944($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800373E8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6940u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800373E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F3EC: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800373ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1F3F0: 15810005 bne $t4, $at, 0xBFC1F408 */ - uint32_t psx_brA_BFC1F3F0 = cpu->gpr[12]; uint32_t psx_brB_BFC1F3F0 = cpu->gpr[1]; - psx_taken_BFC1F3F0 = (psx_brA_BFC1F3F0 != psx_brB_BFC1F3F0); - psx_delay_BFC1F3F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F3F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800373F4u); -#endif - if (psx_delay_BFC1F3F0) { - psx_delay_BFC1F3F0 = 0; - if (psx_taken_BFC1F3F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037408u); - goto label_BFC1F408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800373F8u); - } -label_BFC1F3F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F3F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800373F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F3F8: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800373F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F3FC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800373FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F400: 10000025 beq $zero, $zero, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F400 = cpu->gpr[0]; uint32_t psx_brB_BFC1F400 = cpu->gpr[0]; - psx_taken_BFC1F400 = (psx_brA_BFC1F400 == psx_brB_BFC1F400); - psx_delay_BFC1F400 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F404: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037404u); return; } g_debug_last_store_pc = 0x80037404u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037404u); -#endif - if (psx_delay_BFC1F400) { - psx_delay_BFC1F400 = 0; - if (psx_taken_BFC1F400) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037408u); - } -label_BFC1F408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1F408: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037408u); -#endif - /* 0xBFC1F40C: 8DCE6940 lw $t6, 26944($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003740Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6940u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003740Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F410: 2402003A addiu $v0, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2402003Au, cpu->gpr[2], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80037410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1F414: 15C2000A bne $t6, $v0, 0xBFC1F440 */ - uint32_t psx_brA_BFC1F414 = cpu->gpr[14]; uint32_t psx_brB_BFC1F414 = cpu->gpr[2]; - psx_taken_BFC1F414 = (psx_brA_BFC1F414 != psx_brB_BFC1F414); - psx_delay_BFC1F414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F418: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037418u); -#endif - if (psx_delay_BFC1F414) { - psx_delay_BFC1F414 = 0; - if (psx_taken_BFC1F414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037440u); - goto label_BFC1F440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003741Cu); - } -label_BFC1F41C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F41Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003741Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1F41C: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003741Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037420u); -#endif - /* 0xBFC1F420: 8DEF6948 lw $t7, 26952($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037420u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F424: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1F428: 15E20005 bne $t7, $v0, 0xBFC1F440 */ - uint32_t psx_brA_BFC1F428 = cpu->gpr[15]; uint32_t psx_brB_BFC1F428 = cpu->gpr[2]; - psx_taken_BFC1F428 = (psx_brA_BFC1F428 != psx_brB_BFC1F428); - psx_delay_BFC1F428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F42C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003742Cu); -#endif - if (psx_delay_BFC1F428) { - psx_delay_BFC1F428 = 0; - if (psx_taken_BFC1F428) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037440u); - goto label_BFC1F440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037430u); - } -label_BFC1F430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F430: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80037430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F434: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F438: 10000017 beq $zero, $zero, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F438 = cpu->gpr[0]; uint32_t psx_brB_BFC1F438 = cpu->gpr[0]; - psx_taken_BFC1F438 = (psx_brA_BFC1F438 == psx_brB_BFC1F438); - psx_delay_BFC1F438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F43C: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003743Cu); return; } g_debug_last_store_pc = 0x8003743Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003743Cu); -#endif - if (psx_delay_BFC1F438) { - psx_delay_BFC1F438 = 0; - if (psx_taken_BFC1F438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037440u); - } -label_BFC1F440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC1F440: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037440u); -#endif - /* 0xBFC1F444: 8F396940 lw $t9, 26944($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037444u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396940u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80037444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F448: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80037448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1F44C: 17210012 bne $t9, $at, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F44C = cpu->gpr[25]; uint32_t psx_brB_BFC1F44C = cpu->gpr[1]; - psx_taken_BFC1F44C = (psx_brA_BFC1F44C != psx_brB_BFC1F44C); - psx_delay_BFC1F44C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037450u); -#endif - if (psx_delay_BFC1F44C) { - psx_delay_BFC1F44C = 0; - if (psx_taken_BFC1F44C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037454u); - } -label_BFC1F454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1F454: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037454u); -#endif - /* 0xBFC1F458: 8F186948 lw $t8, 26952($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037458u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186948u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80037458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F45C: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003745Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1F460: 1701000D bne $t8, $at, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F460 = cpu->gpr[24]; uint32_t psx_brB_BFC1F460 = cpu->gpr[1]; - psx_taken_BFC1F460 = (psx_brA_BFC1F460 != psx_brB_BFC1F460); - psx_delay_BFC1F460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037464u); -#endif - if (psx_delay_BFC1F460) { - psx_delay_BFC1F460 = 0; - if (psx_taken_BFC1F460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037468u); - } -label_BFC1F468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F468: 24040013 addiu $a0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24040013u, cpu->gpr[4], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80037468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F46C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003746Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F470: 10000009 beq $zero, $zero, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F470 = cpu->gpr[0]; uint32_t psx_brB_BFC1F470 = cpu->gpr[0]; - psx_taken_BFC1F470 = (psx_brA_BFC1F470 == psx_brB_BFC1F470); - psx_delay_BFC1F470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F474: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037474u); return; } g_debug_last_store_pc = 0x80037474u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037474u); -#endif - if (psx_delay_BFC1F470) { - psx_delay_BFC1F470 = 0; - if (psx_taken_BFC1F470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037478u); - } -label_BFC1F478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1F478: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037478u); -#endif - /* 0xBFC1F47C: 8D086940 lw $t0, 26944($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003747Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086940u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003747Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F480: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80037480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1F484: 15010004 bne $t0, $at, 0xBFC1F498 */ - uint32_t psx_brA_BFC1F484 = cpu->gpr[8]; uint32_t psx_brB_BFC1F484 = cpu->gpr[1]; - psx_taken_BFC1F484 = (psx_brA_BFC1F484 != psx_brB_BFC1F484); - psx_delay_BFC1F484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F488: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037488u); -#endif - if (psx_delay_BFC1F484) { - psx_delay_BFC1F484 = 0; - if (psx_taken_BFC1F484) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037498u); - goto label_BFC1F498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003748Cu); - } -label_BFC1F48C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F48Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003748Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F48C: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8003748Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F490: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F494: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037494u); return; } g_debug_last_store_pc = 0x80037494u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037494u); -#endif -label_BFC1F498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F498: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037498u); -#endif - /* 0xBFC1F49C: 8C849E90 lw $a0, -24944($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003749Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E90u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F4A0: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x800374A8u; /* jal link before delay slot */ - psx_delay_BFC1F4A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F4A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800374A4u); -#endif - if (psx_delay_BFC1F4A0) { - psx_delay_BFC1F4A0 = 0; - cpu->gpr[31] = 0x800374A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC1F4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F4A8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800374A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F4AC: 14410002 bne $v0, $at, 0xBFC1F4B8 */ - uint32_t psx_brA_BFC1F4AC = cpu->gpr[2]; uint32_t psx_brB_BFC1F4AC = cpu->gpr[1]; - psx_taken_BFC1F4AC = (psx_brA_BFC1F4AC != psx_brB_BFC1F4AC); - psx_delay_BFC1F4AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F4B0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374B0u); -#endif - if (psx_delay_BFC1F4AC) { - psx_delay_BFC1F4AC = 0; - if (psx_taken_BFC1F4AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800374B8u); - goto label_BFC1F4B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800374B4u); - } -label_BFC1F4B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F4B4: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800374B4u); return; } g_debug_last_store_pc = 0x800374B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800374B4u); -#endif -label_BFC1F4B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1F4B8: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374B8u); -#endif - /* 0xBFC1F4BC: 8D296950 lw $t1, 26960($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 26960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800374BCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296950u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800374BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F4C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800374C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F4C4: 1520002F bne $t1, $zero, 0xBFC1F584 */ - uint32_t psx_brA_BFC1F4C4 = cpu->gpr[9]; uint32_t psx_brB_BFC1F4C4 = cpu->gpr[0]; - psx_taken_BFC1F4C4 = (psx_brA_BFC1F4C4 != psx_brB_BFC1F4C4); - psx_delay_BFC1F4C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F4C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800374C8u); -#endif - if (psx_delay_BFC1F4C4) { - psx_delay_BFC1F4C4 = 0; - if (psx_taken_BFC1F4C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037584u); - goto label_BFC1F584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800374CCu); - } -label_BFC1F4CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F4CC: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374D0u); -#endif - /* 0xBFC1F4D0: 8CA5694C lw $a1, 26956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800374D0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800374D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F4D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800374D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F4D8: 10A0002A beq $a1, $zero, 0xBFC1F584 */ - uint32_t psx_brA_BFC1F4D8 = cpu->gpr[5]; uint32_t psx_brB_BFC1F4D8 = cpu->gpr[0]; - psx_taken_BFC1F4D8 = (psx_brA_BFC1F4D8 == psx_brB_BFC1F4D8); - psx_delay_BFC1F4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F4DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800374DCu); -#endif - if (psx_delay_BFC1F4D8) { - psx_delay_BFC1F4D8 = 0; - if (psx_taken_BFC1F4D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037584u); - goto label_BFC1F584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800374E0u); - } -label_BFC1F4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F4E0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F4E4: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800374E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F4E8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374E8u); -#endif - /* 0xBFC1F4EC: 9084A0E0 lbu $a0, -24352($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24352; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24352)), 4, 0x10u); - PGXP_LOAD(0x9084A0E0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800374ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F4F0: 0C00D873 jal 0xB00361CC */ - cpu->gpr[31] = 0x800374F8u; /* jal link before delay slot */ - psx_delay_BFC1F4F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1F4F4: AC2A6950 sw $t2, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800374F4u); return; } g_debug_last_store_pc = 0x800374F4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6950u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800374F4u); -#endif - if (psx_delay_BFC1F4F0) { - psx_delay_BFC1F4F0 = 0; - cpu->gpr[31] = 0x800374F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361CCu); - cpu->pc = 0x800361CCu; return; - } -label_BFC1F4F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F4F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800374F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F4F8: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800374F8u); -#endif - /* 0xBFC1F4FC: 8CA5694C lw $a1, 26956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800374FCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800374FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F500: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F504: 18A0001C blez $a1, 0xBFC1F578 */ - uint32_t psx_brA_BFC1F504 = cpu->gpr[5]; - psx_taken_BFC1F504 = ((int32_t)psx_brA_BFC1F504 <= 0); - psx_delay_BFC1F504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F508: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037508u); -#endif - if (psx_delay_BFC1F504) { - psx_delay_BFC1F504 = 0; - if (psx_taken_BFC1F504) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037578u); - goto label_BFC1F578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003750Cu); - } -label_BFC1F50C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F50Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC1F50C: 30A30003 andi $v1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A30003u, cpu->gpr[3], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1F510: 1060000B beq $v1, $zero, 0xBFC1F540 */ - uint32_t psx_brA_BFC1F510 = cpu->gpr[3]; uint32_t psx_brB_BFC1F510 = cpu->gpr[0]; - psx_taken_BFC1F510 = (psx_brA_BFC1F510 == psx_brB_BFC1F510); - psx_delay_BFC1F510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037514u); -#endif - if (psx_delay_BFC1F510) { - psx_delay_BFC1F510 = 0; - if (psx_taken_BFC1F510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037540u); - goto label_BFC1F540; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037518u); - } -label_BFC1F518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1F518: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1F51C: 256BA0E0 addiu $t3, $t3, -24352 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-24352)); - PGXP_ALU(0x256BA0E0u, cpu->gpr[11], _pgx1, 0xFFFFA0E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003751Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x814u); -#endif - /* 0xBFC1F520: 008B1021 addu $v0, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037520u); -#endif -label_BFC1F524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037524u); -#endif - /* 0xBFC1F524: 904D0001 lbu $t5, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 13, 0x4u); - PGXP_LOAD(0x904D0001u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F528: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F52C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003752Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC1F530: 1464FFFC bne $v1, $a0, 0xBFC1F524 */ - uint32_t psx_brA_BFC1F530 = cpu->gpr[3]; uint32_t psx_brB_BFC1F530 = cpu->gpr[4]; - psx_taken_BFC1F530 = (psx_brA_BFC1F530 != psx_brB_BFC1F530); - psx_delay_BFC1F530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC1F534: A04DFFFF sb $t5, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037534u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA04DFFFFu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037534u); -#endif - if (psx_delay_BFC1F530) { - psx_delay_BFC1F530 = 0; - if (psx_taken_BFC1F530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037524u); - goto label_BFC1F524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037538u); - } -label_BFC1F538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC1F538: 1085000F beq $a0, $a1, 0xBFC1F578 */ - uint32_t psx_brA_BFC1F538 = cpu->gpr[4]; uint32_t psx_brB_BFC1F538 = cpu->gpr[5]; - psx_taken_BFC1F538 = (psx_brA_BFC1F538 == psx_brB_BFC1F538); - psx_delay_BFC1F538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F53C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003753Cu); -#endif - if (psx_delay_BFC1F538) { - psx_delay_BFC1F538 = 0; - if (psx_taken_BFC1F538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037578u); - goto label_BFC1F578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037540u); - } -label_BFC1F540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F540: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F544: 258CA0E0 addiu $t4, $t4, -24352 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-24352)); - PGXP_ALU(0x258CA0E0u, cpu->gpr[12], _pgx1, 0xFFFFA0E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80037544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1014u); -#endif - /* 0xBFC1F548: 008C1021 addu $v0, $a0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[12]; - PGXP_ALU(0x008C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028u); -#endif - /* 0xBFC1F54C: 00AC1821 addu $v1, $a1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[12]; - PGXP_ALU(0x00AC1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003754Cu); -#endif -label_BFC1F550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037550u); -#endif - /* 0xBFC1F550: 904E0001 lbu $t6, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 14, 0x4u); - PGXP_LOAD(0x904E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037550u); -#endif - /* 0xBFC1F554: 904F0002 lbu $t7, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 15, 0x4u); - PGXP_LOAD(0x904F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037554u); -#endif - /* 0xBFC1F558: 90590003 lbu $t9, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 25, 0x4u); - PGXP_LOAD(0x90590003u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80037558u); -#endif - /* 0xBFC1F55C: 90580004 lbu $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 24, 0x4u); - PGXP_LOAD(0x90580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003755Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1F560: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037560u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F564: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80037564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC1F568: A04FFFFD sb $t7, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037568u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04FFFFDu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1F56C: A059FFFE sb $t9, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003756Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA059FFFEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003756Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1F570: 1443FFF7 bne $v0, $v1, 0xBFC1F550 */ - uint32_t psx_brA_BFC1F570 = cpu->gpr[2]; uint32_t psx_brB_BFC1F570 = cpu->gpr[3]; - psx_taken_BFC1F570 = (psx_brA_BFC1F570 != psx_brB_BFC1F570); - psx_delay_BFC1F570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC1F574: A058FFFF sb $t8, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037574u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA058FFFFu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80037574u); -#endif - if (psx_delay_BFC1F570) { - psx_delay_BFC1F570 = 0; - if (psx_taken_BFC1F570) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037550u); - goto label_BFC1F550; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037578u); - } -label_BFC1F578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F578: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80037578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F57C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003757Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F580: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037580u); return; } g_debug_last_store_pc = 0x80037580u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80037580u); -#endif -label_BFC1F584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F584: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037584u); -#endif - /* 0xBFC1F588: 8C846944 lw $a0, 26948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037588u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F58C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003758Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037590u); -#endif - /* 0xBFC1F590: 8CA5694C lw $a1, 26956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 26956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037590u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80037590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F594: 10800018 beq $a0, $zero, 0xBFC1F5F8 */ - uint32_t psx_brA_BFC1F594 = cpu->gpr[4]; uint32_t psx_brB_BFC1F594 = cpu->gpr[0]; - psx_taken_BFC1F594 = (psx_brA_BFC1F594 == psx_brB_BFC1F594); - psx_delay_BFC1F594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037598u); -#endif - if (psx_delay_BFC1F594) { - psx_delay_BFC1F594 = 0; - if (psx_taken_BFC1F594) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800375F8u); - goto label_BFC1F5F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003759Cu); - } -label_BFC1F59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1F59C: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375A0u); -#endif - /* 0xBFC1F5A0: 8D086950 lw $t0, 26960($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375A0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086950u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800375A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F5A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800375A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1F5A8: 11000008 beq $t0, $zero, 0xBFC1F5CC */ - uint32_t psx_brA_BFC1F5A8 = cpu->gpr[8]; uint32_t psx_brB_BFC1F5A8 = cpu->gpr[0]; - psx_taken_BFC1F5A8 = (psx_brA_BFC1F5A8 == psx_brB_BFC1F5A8); - psx_delay_BFC1F5A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375ACu); -#endif - if (psx_delay_BFC1F5A8) { - psx_delay_BFC1F5A8 = 0; - if (psx_taken_BFC1F5A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800375CCu); - goto label_BFC1F5CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800375B0u); - } -label_BFC1F5B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F5B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F5B0: 00250821 addu $at, $at, $a1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[5]; - PGXP_ALU(0x00250821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800375B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC1F5B4: 308900FF andi $t1, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800375B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1F5B8: A029A0E0 sb $t1, -24352($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24352; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800375B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24352)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA029A0E0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800375B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1F5BC: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800375BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5C0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F5C4: 10000009 beq $zero, $zero, 0xBFC1F5EC */ - uint32_t psx_brA_BFC1F5C4 = cpu->gpr[0]; uint32_t psx_brB_BFC1F5C4 = cpu->gpr[0]; - psx_taken_BFC1F5C4 = (psx_brA_BFC1F5C4 == psx_brB_BFC1F5C4); - psx_delay_BFC1F5C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F5C8: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375C8u); return; } g_debug_last_store_pc = 0x800375C8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800375C8u); -#endif - if (psx_delay_BFC1F5C4) { - psx_delay_BFC1F5C4 = 0; - if (psx_taken_BFC1F5C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800375ECu); - goto label_BFC1F5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800375CCu); - } -label_BFC1F5CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F5CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5CC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F5D0: AC25694C sw $a1, 26956($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26956; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375D0u); return; } g_debug_last_store_pc = 0x800375D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25694Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800375D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5D4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F5D8: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800375D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC1F5DC: AC2A6950 sw $t2, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375DCu); return; } g_debug_last_store_pc = 0x800375DCu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6950u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800375DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5E0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F5E4: 0C00D873 jal 0xB00361CC */ - cpu->gpr[31] = 0x800375ECu; /* jal link before delay slot */ - psx_delay_BFC1F5E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F5E8: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375E8u); return; } g_debug_last_store_pc = 0x800375E8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800375E8u); -#endif - if (psx_delay_BFC1F5E4) { - psx_delay_BFC1F5E4 = 0; - cpu->gpr[31] = 0x800375ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800361CCu); - cpu->pc = 0x800361CCu; return; - } -label_BFC1F5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F5EC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800375ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F5F0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800375F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC1F5F4: AC246944 sw $a0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800375F4u); return; } g_debug_last_store_pc = 0x800375F4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246944u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800375F4u); -#endif -label_BFC1F5F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F5F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800375F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F5F8: 0C00CB1A jal 0xB0032C68 */ - cpu->gpr[31] = 0x80037600u; /* jal link before delay slot */ - psx_delay_BFC1F5F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F5FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800375FCu); -#endif - if (psx_delay_BFC1F5F8) { - psx_delay_BFC1F5F8 = 0; - cpu->gpr[31] = 0x80037600u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032C68u); - cpu->pc = 0x80032C68u; return; - } -label_BFC1F600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F600: 0C00CDF8 jal 0xB00337E0 */ - cpu->gpr[31] = 0x80037608u; /* jal link before delay slot */ - psx_delay_BFC1F600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037604u); -#endif - if (psx_delay_BFC1F600) { - psx_delay_BFC1F600 = 0; - cpu->gpr[31] = 0x80037608u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800337E0u); - cpu->pc = 0x800337E0u; return; - } -label_BFC1F608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1F608: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037608u); -#endif - /* 0xBFC1F60C: 8D6B6948 lw $t3, 26952($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003760Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6948u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F610: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80037610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F614: 11610003 beq $t3, $at, 0xBFC1F624 */ - uint32_t psx_brA_BFC1F614 = cpu->gpr[11]; uint32_t psx_brB_BFC1F614 = cpu->gpr[1]; - psx_taken_BFC1F614 = (psx_brA_BFC1F614 == psx_brB_BFC1F614); - psx_delay_BFC1F614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F618: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037618u); -#endif - if (psx_delay_BFC1F614) { - psx_delay_BFC1F614 = 0; - if (psx_taken_BFC1F614) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037624u); - goto label_BFC1F624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003761Cu); - } -label_BFC1F61C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F61Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003761Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F61C: 15610008 bne $t3, $at, 0xBFC1F640 */ - uint32_t psx_brA_BFC1F61C = cpu->gpr[11]; uint32_t psx_brB_BFC1F61C = cpu->gpr[1]; - psx_taken_BFC1F61C = (psx_brA_BFC1F61C != psx_brB_BFC1F61C); - psx_delay_BFC1F61C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037620u); -#endif - if (psx_delay_BFC1F61C) { - psx_delay_BFC1F61C = 0; - if (psx_taken_BFC1F61C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037640u); - goto label_BFC1F640; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037624u); - } -label_BFC1F624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1F624: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037624u); -#endif - /* 0xBFC1F628: 8DAD9DF8 lw $t5, -25096($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037628u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9DF8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F62C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003762Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1F630: 11A00003 beq $t5, $zero, 0xBFC1F640 */ - uint32_t psx_brA_BFC1F630 = cpu->gpr[13]; uint32_t psx_brB_BFC1F630 = cpu->gpr[0]; - psx_taken_BFC1F630 = (psx_brA_BFC1F630 == psx_brB_BFC1F630); - psx_delay_BFC1F630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037634u); -#endif - if (psx_delay_BFC1F630) { - psx_delay_BFC1F630 = 0; - if (psx_taken_BFC1F630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037640u); - goto label_BFC1F640; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037638u); - } -label_BFC1F638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F638: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80037640u; /* jal link before delay slot */ - psx_delay_BFC1F638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F63C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003763Cu); -#endif - if (psx_delay_BFC1F638) { - psx_delay_BFC1F638 = 0; - cpu->gpr[31] = 0x80037640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1F640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F640: 0C00C908 jal 0xB0032420 */ - cpu->gpr[31] = 0x80037648u; /* jal link before delay slot */ - psx_delay_BFC1F640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F644: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037644u); -#endif - if (psx_delay_BFC1F640) { - psx_delay_BFC1F640 = 0; - cpu->gpr[31] = 0x80037648u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032420u); - cpu->pc = 0x80032420u; return; - } -label_BFC1F648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F648: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80037648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F64C: 1441000C bne $v0, $at, 0xBFC1F680 */ - uint32_t psx_brA_BFC1F64C = cpu->gpr[2]; uint32_t psx_brB_BFC1F64C = cpu->gpr[1]; - psx_taken_BFC1F64C = (psx_brA_BFC1F64C != psx_brB_BFC1F64C); - psx_delay_BFC1F64C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037650u); -#endif - if (psx_delay_BFC1F64C) { - psx_delay_BFC1F64C = 0; - if (psx_taken_BFC1F64C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037680u); - goto label_BFC1F680; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037654u); - } -label_BFC1F654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F654: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037654u); -#endif - /* 0xBFC1F658: 8D8C6948 lw $t4, 26952($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037658u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80037658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F65C: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003765Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1F660: 11810003 beq $t4, $at, 0xBFC1F670 */ - uint32_t psx_brA_BFC1F660 = cpu->gpr[12]; uint32_t psx_brB_BFC1F660 = cpu->gpr[1]; - psx_taken_BFC1F660 = (psx_brA_BFC1F660 == psx_brB_BFC1F660); - psx_delay_BFC1F660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F664: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80037664u); -#endif - if (psx_delay_BFC1F660) { - psx_delay_BFC1F660 = 0; - if (psx_taken_BFC1F660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037670u); - goto label_BFC1F670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037668u); - } -label_BFC1F668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC1F668: 1581000D bne $t4, $at, 0xBFC1F6A0 */ - uint32_t psx_brA_BFC1F668 = cpu->gpr[12]; uint32_t psx_brB_BFC1F668 = cpu->gpr[1]; - psx_taken_BFC1F668 = (psx_brA_BFC1F668 != psx_brB_BFC1F668); - psx_delay_BFC1F668 = 1; - /* 0xBFC1F66C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003766Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003766Cu); -#endif - if (psx_delay_BFC1F668) { - psx_delay_BFC1F668 = 0; - if (psx_taken_BFC1F668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376A0u); - goto label_BFC1F6A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037670u); - } -label_BFC1F670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F670: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80037678u; /* jal link before delay slot */ - psx_delay_BFC1F670 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037674u); -#endif - if (psx_delay_BFC1F670) { - psx_delay_BFC1F670 = 0; - cpu->gpr[31] = 0x80037678u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1F678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F678: 10000009 beq $zero, $zero, 0xBFC1F6A0 */ - uint32_t psx_brA_BFC1F678 = cpu->gpr[0]; uint32_t psx_brB_BFC1F678 = cpu->gpr[0]; - psx_taken_BFC1F678 = (psx_brA_BFC1F678 == psx_brB_BFC1F678); - psx_delay_BFC1F678 = 1; - /* 0xBFC1F67C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003767Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003767Cu); -#endif - if (psx_delay_BFC1F678) { - psx_delay_BFC1F678 = 0; - if (psx_taken_BFC1F678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376A0u); - goto label_BFC1F6A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037680u); - } -label_BFC1F680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1F680: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037680u); -#endif - /* 0xBFC1F684: 8DCE6948 lw $t6, 26952($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037684u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F688: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F68C: 11C10004 beq $t6, $at, 0xBFC1F6A0 */ - uint32_t psx_brA_BFC1F68C = cpu->gpr[14]; uint32_t psx_brB_BFC1F68C = cpu->gpr[1]; - psx_taken_BFC1F68C = (psx_brA_BFC1F68C == psx_brB_BFC1F68C); - psx_delay_BFC1F68C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037690u); -#endif - /* 0xBFC1F690: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037690u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037690u); -#endif - if (psx_delay_BFC1F68C) { - psx_delay_BFC1F68C = 0; - if (psx_taken_BFC1F68C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376A0u); - goto label_BFC1F6A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037694u); - } -label_BFC1F694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F694: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x8003769Cu; /* jal link before delay slot */ - psx_delay_BFC1F694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037698u); -#endif - if (psx_delay_BFC1F694) { - psx_delay_BFC1F694 = 0; - cpu->gpr[31] = 0x8003769Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1F69C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F69Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003769Cu); -#endif - /* 0xBFC1F69C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003769Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003769Cu); -#endif -label_BFC1F6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F6A0: 27BD0078 addiu $sp, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27BD0078u, cpu->gpr[29], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x800376A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1F6A4: 03E00008 jr $ra */ - psx_delay_BFC1F6A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F6A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800376A8u); -#endif - if (psx_delay_BFC1F6A4) { - psx_delay_BFC1F6A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1F6AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1F6ACu); - int psx_delay_BFC1F6C0 = 0; - int psx_taken_BFC1F6C0 = 0; - int psx_delay_BFC1F6FC = 0; - int psx_delay_BFC1F734 = 0; - int psx_delay_BFC1F770 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1F6C8u: goto label_BFC1F6C8; - case 0xBFC1F704u: goto label_BFC1F704; - case 0xBFC1F73Cu: goto label_BFC1F73C; - case 0xBFC1F754u: goto label_BFC1F754; - default: break; - } - } -label_BFC1F6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1F6AC: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800376ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376B0u); -#endif - /* 0xBFC1F6B0: 8DCE6948 lw $t6, 26952($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800376B0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800376B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F6B4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800376B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F6B8: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800376B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1F6BC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800376BCu); return; } g_debug_last_store_pc = 0x800376BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800376BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F6C0: 15C10024 bne $t6, $at, 0xBFC1F754 */ - uint32_t psx_brA_BFC1F6C0 = cpu->gpr[14]; uint32_t psx_brB_BFC1F6C0 = cpu->gpr[1]; - psx_taken_BFC1F6C0 = (psx_brA_BFC1F6C0 != psx_brB_BFC1F6C0); - psx_delay_BFC1F6C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1F6C4: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800376C4u); return; } g_debug_last_store_pc = 0x800376C4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800376C4u); -#endif - if (psx_delay_BFC1F6C0) { - psx_delay_BFC1F6C0 = 0; - if (psx_taken_BFC1F6C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037754u); - goto label_BFC1F754; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376C8u); - } -label_BFC1F6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1F6C8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800376C8u); -#endif - /* 0xBFC1F6CC: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800376CCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800376CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1F6D0: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800376D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC1F6D4: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800376D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1F6D8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800376D8u); -#endif - /* 0xBFC1F6DC: 8D08D0F0 lw $t0, -12048($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800376DCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08D0F0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800376DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F6E0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800376E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1F6E4: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800376E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC1F6E8: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800376E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC1F6EC: 00892021 addu $a0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00892021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800376ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800376F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F6F0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800376F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F6F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800376F4u); -#endif - /* 0xBFC1F6F8: 90849FB0 lbu $a0, -24656($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24656; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24656)), 4, 0x10u); - PGXP_LOAD(0x90849FB0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800376F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F6FC: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x80037704u; /* jal link before delay slot */ - psx_delay_BFC1F6FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F700: AC2F9EBC sw $t7, -24900($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037700u); return; } g_debug_last_store_pc = 0x80037700u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9EBCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037700u); -#endif - if (psx_delay_BFC1F6FC) { - psx_delay_BFC1F6FC = 0; - cpu->gpr[31] = 0x80037704u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1F704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1F704: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037704u); -#endif - /* 0xBFC1F708: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037708u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80037708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F70C: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003770Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1F710: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC1F714: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037714u); -#endif - /* 0xBFC1F718: 8D8CD0F0 lw $t4, -12048($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037718u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CD0F0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80037718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F71C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003771Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1F720: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1F724: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC1F728: 008D2021 addu $a0, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F72C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003772Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037730u); -#endif - /* 0xBFC1F730: 90849FB1 lbu $a0, -24655($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24655; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-24655)), 4, 0x10u); - PGXP_LOAD(0x90849FB1u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F734: 0C00E4E9 jal 0xB00393A4 */ - cpu->gpr[31] = 0x8003773Cu; /* jal link before delay slot */ - psx_delay_BFC1F734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F738: AC229E54 sw $v0, -25004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037738u); return; } g_debug_last_store_pc = 0x80037738u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037738u); -#endif - if (psx_delay_BFC1F734) { - psx_delay_BFC1F734 = 0; - cpu->gpr[31] = 0x8003773Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393A4u); - cpu->pc = 0x800393A4u; return; - } -label_BFC1F73C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F73Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003773Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F73C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003773Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F740: AC229E58 sw $v0, -25000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037740u); return; } g_debug_last_store_pc = 0x80037740u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F744: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F748: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037748u); return; } g_debug_last_store_pc = 0x80037748u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F74C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003774Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F750: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037750u); return; } g_debug_last_store_pc = 0x80037750u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037750u); -#endif -label_BFC1F754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1F754: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F758: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037758u); -#endif - /* 0xBFC1F75C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003775Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F760: AC2E9E48 sw $t6, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037760u); return; } g_debug_last_store_pc = 0x80037760u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E48u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F764: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F768: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80037768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F76C: AC2F6944 sw $t7, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003776Cu); return; } g_debug_last_store_pc = 0x8003776Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6944u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003776Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1F770: 03E00008 jr $ra */ - psx_delay_BFC1F770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F774: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80037774u); -#endif - if (psx_delay_BFC1F770) { - psx_delay_BFC1F770 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1F778(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1F778u); - int psx_delay_BFC1F7AC = 0; - int psx_delay_BFC1F7CC = 0; - int psx_delay_BFC1F7D4 = 0; - int psx_taken_BFC1F7D4 = 0; - int psx_delay_BFC1F7DC = 0; - int psx_taken_BFC1F7DC = 0; - int psx_delay_BFC1F7F0 = 0; - int psx_taken_BFC1F7F0 = 0; - int psx_delay_BFC1F7FC = 0; - int psx_taken_BFC1F7FC = 0; - int psx_delay_BFC1F81C = 0; - int psx_delay_BFC1F850 = 0; - int psx_taken_BFC1F850 = 0; - int psx_delay_BFC1F858 = 0; - int psx_taken_BFC1F858 = 0; - int psx_delay_BFC1F860 = 0; - int psx_taken_BFC1F860 = 0; - int psx_delay_BFC1F870 = 0; - int psx_taken_BFC1F870 = 0; - int psx_delay_BFC1F8A0 = 0; - int psx_delay_BFC1F8CC = 0; - int psx_delay_BFC1F8D4 = 0; - int psx_taken_BFC1F8D4 = 0; - int psx_delay_BFC1F8DC = 0; - int psx_delay_BFC1F8F0 = 0; - int psx_taken_BFC1F8F0 = 0; - int psx_delay_BFC1F8FC = 0; - int psx_taken_BFC1F8FC = 0; - int psx_delay_BFC1F91C = 0; - int psx_delay_BFC1F924 = 0; - int psx_taken_BFC1F924 = 0; - int psx_delay_BFC1F92C = 0; - int psx_delay_BFC1F940 = 0; - int psx_taken_BFC1F940 = 0; - int psx_delay_BFC1F94C = 0; - int psx_taken_BFC1F94C = 0; - int psx_delay_BFC1F978 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1F7B4u: goto label_BFC1F7B4; - case 0xBFC1F7D4u: goto label_BFC1F7D4; - case 0xBFC1F7DCu: goto label_BFC1F7DC; - case 0xBFC1F7E4u: goto label_BFC1F7E4; - case 0xBFC1F7F8u: goto label_BFC1F7F8; - case 0xBFC1F804u: goto label_BFC1F804; - case 0xBFC1F824u: goto label_BFC1F824; - case 0xBFC1F84Cu: goto label_BFC1F84C; - case 0xBFC1F858u: goto label_BFC1F858; - case 0xBFC1F860u: goto label_BFC1F860; - case 0xBFC1F868u: goto label_BFC1F868; - case 0xBFC1F86Cu: goto label_BFC1F86C; - case 0xBFC1F878u: goto label_BFC1F878; - case 0xBFC1F8A8u: goto label_BFC1F8A8; - case 0xBFC1F8D4u: goto label_BFC1F8D4; - case 0xBFC1F8DCu: goto label_BFC1F8DC; - case 0xBFC1F8E4u: goto label_BFC1F8E4; - case 0xBFC1F8F8u: goto label_BFC1F8F8; - case 0xBFC1F904u: goto label_BFC1F904; - case 0xBFC1F924u: goto label_BFC1F924; - case 0xBFC1F92Cu: goto label_BFC1F92C; - case 0xBFC1F934u: goto label_BFC1F934; - case 0xBFC1F948u: goto label_BFC1F948; - case 0xBFC1F954u: goto label_BFC1F954; - case 0xBFC1F970u: goto label_BFC1F970; - default: break; - } - } -label_BFC1F778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F778: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F77C: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003777Cu); return; } g_debug_last_store_pc = 0x8003777Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F780: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F784: AC209E44 sw $zero, -25020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037784u); return; } g_debug_last_store_pc = 0x80037784u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E44u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F788: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F78C: AC209E48 sw $zero, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003778Cu); return; } g_debug_last_store_pc = 0x8003778Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003778Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F790: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F794: AC209E4C sw $zero, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037794u); return; } g_debug_last_store_pc = 0x80037794u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E4Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F798: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F79C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F7A0: AC209EB8 sw $zero, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377A0u); return; } g_debug_last_store_pc = 0x800377A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800377A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1F7A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377A4u); return; } g_debug_last_store_pc = 0x800377A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800377A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F7A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800377A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F7AC: 0C00C8EE jal 0xB00323B8 */ - cpu->gpr[31] = 0x800377B4u; /* jal link before delay slot */ - psx_delay_BFC1F7AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F7B0: AC209E74 sw $zero, -24972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377B0u); return; } g_debug_last_store_pc = 0x800377B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800377B0u); -#endif - if (psx_delay_BFC1F7AC) { - psx_delay_BFC1F7AC = 0; - cpu->gpr[31] = 0x800377B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800323B8u); - cpu->pc = 0x800323B8u; return; - } -label_BFC1F7B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F7B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F7B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800377B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F7B8: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377B8u); return; } g_debug_last_store_pc = 0x800377B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800377B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F7BC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800377BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1F7C0: 240E000F addiu $t6, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x240E000Fu, cpu->gpr[14], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800377C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F7C4: AC2E6944 sw $t6, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377C4u); return; } g_debug_last_store_pc = 0x800377C4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6944u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800377C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F7C8: 24040036 addiu $a0, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24040036u, cpu->gpr[4], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x800377C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F7CC: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x800377D4u; /* jal link before delay slot */ - psx_delay_BFC1F7CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F7D0: 24050258 addiu $a1, $zero, 600 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (600)); - PGXP_ALU(0x24050258u, cpu->gpr[5], _pgx1, 0x00000258u); } -#ifdef PSX_COSIM - cosim_instr(0x800377D0u); -#endif - if (psx_delay_BFC1F7CC) { - psx_delay_BFC1F7CC = 0; - cpu->gpr[31] = 0x800377D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1F7D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F7D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F7D4: 14400003 bne $v0, $zero, 0xBFC1F7E4 */ - uint32_t psx_brA_BFC1F7D4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F7D4 = cpu->gpr[0]; - psx_taken_BFC1F7D4 = (psx_brA_BFC1F7D4 != psx_brB_BFC1F7D4); - psx_delay_BFC1F7D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F7D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800377D8u); -#endif - if (psx_delay_BFC1F7D4) { - psx_delay_BFC1F7D4 = 0; - if (psx_taken_BFC1F7D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800377E4u); - goto label_BFC1F7E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800377DCu); - } -label_BFC1F7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F7DC: 10000064 beq $zero, $zero, 0xBFC1F970 */ - uint32_t psx_brA_BFC1F7DC = cpu->gpr[0]; uint32_t psx_brB_BFC1F7DC = cpu->gpr[0]; - psx_taken_BFC1F7DC = (psx_brA_BFC1F7DC == psx_brB_BFC1F7DC); - psx_delay_BFC1F7DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F7E0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800377E0u); -#endif - if (psx_delay_BFC1F7DC) { - psx_delay_BFC1F7DC = 0; - if (psx_taken_BFC1F7DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037970u); - goto label_BFC1F970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800377E4u); - } -label_BFC1F7E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F7E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC1F7E4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800377E4u); -#endif - /* 0xBFC1F7E8: 8DEF9EB0 lw $t7, -24912($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377E8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9EB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800377E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F7EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800377ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F7F0: 11E00004 beq $t7, $zero, 0xBFC1F804 */ - uint32_t psx_brA_BFC1F7F0 = cpu->gpr[15]; uint32_t psx_brB_BFC1F7F0 = cpu->gpr[0]; - psx_taken_BFC1F7F0 = (psx_brA_BFC1F7F0 == psx_brB_BFC1F7F0); - psx_delay_BFC1F7F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F7F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800377F4u); -#endif - if (psx_delay_BFC1F7F0) { - psx_delay_BFC1F7F0 = 0; - if (psx_taken_BFC1F7F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037804u); - goto label_BFC1F804; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800377F8u); - } -label_BFC1F7F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F7F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800377F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F7F8: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800377F8u); return; } g_debug_last_store_pc = 0x800377F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800377F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F7FC: 1000005C beq $zero, $zero, 0xBFC1F970 */ - uint32_t psx_brA_BFC1F7FC = cpu->gpr[0]; uint32_t psx_brB_BFC1F7FC = cpu->gpr[0]; - psx_taken_BFC1F7FC = (psx_brA_BFC1F7FC == psx_brB_BFC1F7FC); - psx_delay_BFC1F7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F800: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037800u); -#endif - if (psx_delay_BFC1F7FC) { - psx_delay_BFC1F7FC = 0; - if (psx_taken_BFC1F7FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037970u); - goto label_BFC1F970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037804u); - } -label_BFC1F804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1F804: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F808: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1F80C: AC389E38 sw $t8, -25032($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25032)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003780Cu); return; } g_debug_last_store_pc = 0x8003780Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E38u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003780Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F810: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F814: AC209DF8 sw $zero, -25096($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037814u); return; } g_debug_last_store_pc = 0x80037814u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209DF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC1F818: 27A40024 addiu $a0, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A40024u, cpu->gpr[4], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80037818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F81C: 0C00E461 jal 0xB0039184 */ - cpu->gpr[31] = 0x80037824u; /* jal link before delay slot */ - psx_delay_BFC1F81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC1F820: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80037820u); -#endif - if (psx_delay_BFC1F81C) { - psx_delay_BFC1F81C = 0; - cpu->gpr[31] = 0x80037824u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039184u); - cpu->pc = 0x80039184u; return; - } -label_BFC1F824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037824u); -#endif - /* 0xBFC1F824: 93A50024 lbu $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (36)), 5, 0x20000000u); - PGXP_LOAD(0x93A50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80037824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F828: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037828u); -#endif - /* 0xBFC1F82C: 93A60020 lbu $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 6, 0x20000000u); - PGXP_LOAD(0x93A60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003782Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC1F830: A0259E70 sb $a1, -24976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24976; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037830u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24976)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA0259E70u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80037830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F834: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1F838: 3C03800F lui $v1, 0x800F */ - cpu->gpr[3] = 0x800F0000u; - PGXP_ALU(0x3C03800Fu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1F83C: 2463D0F0 addiu $v1, $v1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-12048)); - PGXP_ALU(0x2463D0F0u, cpu->gpr[3], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003783Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F840: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F844: 24040064 addiu $a0, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80037844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC1F848: A0269E71 sb $a2, -24975($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24975; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80037848u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24975)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0269E71u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80037848u); -#endif -label_BFC1F84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003784Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC1F84C: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003784Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F850: 14200003 bne $at, $zero, 0xBFC1F860 */ - uint32_t psx_brA_BFC1F850 = cpu->gpr[1]; uint32_t psx_brB_BFC1F850 = cpu->gpr[0]; - psx_taken_BFC1F850 = (psx_brA_BFC1F850 != psx_brB_BFC1F850); - psx_delay_BFC1F850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46u); -#endif - /* 0xBFC1F854: 00C2082B sltu $at, $a2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[6] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00C2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037854u); -#endif - if (psx_delay_BFC1F850) { - psx_delay_BFC1F850 = 0; - if (psx_taken_BFC1F850) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037860u); - goto label_BFC1F860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037858u); - } -label_BFC1F858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F858: 10200003 beq $at, $zero, 0xBFC1F868 */ - uint32_t psx_brA_BFC1F858 = cpu->gpr[1]; uint32_t psx_brB_BFC1F858 = cpu->gpr[0]; - psx_taken_BFC1F858 = (psx_brA_BFC1F858 == psx_brB_BFC1F858); - psx_delay_BFC1F858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F85C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003785Cu); -#endif - if (psx_delay_BFC1F858) { - psx_delay_BFC1F858 = 0; - if (psx_taken_BFC1F858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037868u); - goto label_BFC1F868; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037860u); - } -label_BFC1F860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F860: 10000002 beq $zero, $zero, 0xBFC1F86C */ - uint32_t psx_brA_BFC1F860 = cpu->gpr[0]; uint32_t psx_brB_BFC1F860 = cpu->gpr[0]; - psx_taken_BFC1F860 = (psx_brA_BFC1F860 == psx_brB_BFC1F860); - psx_delay_BFC1F860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1F864: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037864u); return; } g_debug_last_store_pc = 0x80037864u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037864u); -#endif - if (psx_delay_BFC1F860) { - psx_delay_BFC1F860 = 0; - if (psx_taken_BFC1F860) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003786Cu); - goto label_BFC1F86C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037868u); - } -label_BFC1F868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1F868: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037868u); return; } g_debug_last_store_pc = 0x80037868u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037868u); -#endif -label_BFC1F86C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F86Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003786Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F86C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003786Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC1F870: 1444FFF6 bne $v0, $a0, 0xBFC1F84C */ - uint32_t psx_brA_BFC1F870 = cpu->gpr[2]; uint32_t psx_brB_BFC1F870 = cpu->gpr[4]; - psx_taken_BFC1F870 = (psx_brA_BFC1F870 != psx_brB_BFC1F870); - psx_delay_BFC1F870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1F874: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80037874u); -#endif - if (psx_delay_BFC1F870) { - psx_delay_BFC1F870 = 0; - if (psx_taken_BFC1F870) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003784Cu); - goto label_BFC1F84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037878u); - } -label_BFC1F878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F878: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F87C: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003787Cu); return; } g_debug_last_store_pc = 0x8003787Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003787Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F880: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F884: AC209E50 sw $zero, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037884u); return; } g_debug_last_store_pc = 0x80037884u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F888: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1F88C: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003788Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1F890: AC399EAC sw $t9, -24916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037890u); return; } g_debug_last_store_pc = 0x80037890u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399EACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80037890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F894: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F898: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037898u); return; } g_debug_last_store_pc = 0x80037898u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F89C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003789Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F8A0: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x800378A8u; /* jal link before delay slot */ - psx_delay_BFC1F8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F8A4: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378A4u); return; } g_debug_last_store_pc = 0x800378A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800378A4u); -#endif - if (psx_delay_BFC1F8A0) { - psx_delay_BFC1F8A0 = 0; - cpu->gpr[31] = 0x800378A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1F8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1F8A8: 24080025 addiu $t0, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24080025u, cpu->gpr[8], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x800378A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F8AC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800378ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1F8B0: AC289EA8 sw $t0, -24920($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378B0u); return; } g_debug_last_store_pc = 0x800378B0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289EA8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800378B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F8B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800378B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F8B8: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378B8u); return; } g_debug_last_store_pc = 0x800378B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800378B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F8BC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800378BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1F8C0: 24090011 addiu $t1, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24090011u, cpu->gpr[9], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x800378C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1F8C4: AC296944 sw $t1, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378C4u); return; } g_debug_last_store_pc = 0x800378C4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296944u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800378C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F8C8: 2404003E addiu $a0, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x2404003Eu, cpu->gpr[4], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800378C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F8CC: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x800378D4u; /* jal link before delay slot */ - psx_delay_BFC1F8CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F8D0: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800378D0u); -#endif - if (psx_delay_BFC1F8CC) { - psx_delay_BFC1F8CC = 0; - cpu->gpr[31] = 0x800378D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1F8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F8D4: 14400003 bne $v0, $zero, 0xBFC1F8E4 */ - uint32_t psx_brA_BFC1F8D4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F8D4 = cpu->gpr[0]; - psx_taken_BFC1F8D4 = (psx_brA_BFC1F8D4 != psx_brB_BFC1F8D4); - psx_delay_BFC1F8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F8D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800378D8u); -#endif - if (psx_delay_BFC1F8D4) { - psx_delay_BFC1F8D4 = 0; - if (psx_taken_BFC1F8D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800378E4u); - goto label_BFC1F8E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800378DCu); - } -label_BFC1F8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F8DC: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x800378E4u; /* jal link before delay slot */ - psx_delay_BFC1F8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F8E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800378E0u); -#endif - if (psx_delay_BFC1F8DC) { - psx_delay_BFC1F8DC = 0; - cpu->gpr[31] = 0x800378E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1F8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1F8E4: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800378E4u); -#endif - /* 0xBFC1F8E8: 8D4A9EB0 lw $t2, -24912($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378E8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9EB0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800378E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F8EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800378ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1F8F0: 11400004 beq $t2, $zero, 0xBFC1F904 */ - uint32_t psx_brA_BFC1F8F0 = cpu->gpr[10]; uint32_t psx_brB_BFC1F8F0 = cpu->gpr[0]; - psx_taken_BFC1F8F0 = (psx_brA_BFC1F8F0 == psx_brB_BFC1F8F0); - psx_delay_BFC1F8F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F8F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800378F4u); -#endif - if (psx_delay_BFC1F8F0) { - psx_delay_BFC1F8F0 = 0; - if (psx_taken_BFC1F8F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037904u); - goto label_BFC1F904; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800378F8u); - } -label_BFC1F8F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F8F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800378F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F8F8: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800378F8u); return; } g_debug_last_store_pc = 0x800378F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800378F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F8FC: 1000001C beq $zero, $zero, 0xBFC1F970 */ - uint32_t psx_brA_BFC1F8FC = cpu->gpr[0]; uint32_t psx_brB_BFC1F8FC = cpu->gpr[0]; - psx_taken_BFC1F8FC = (psx_brA_BFC1F8FC == psx_brB_BFC1F8FC); - psx_delay_BFC1F8FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F900: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037900u); -#endif - if (psx_delay_BFC1F8FC) { - psx_delay_BFC1F8FC = 0; - if (psx_taken_BFC1F8FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037970u); - goto label_BFC1F970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037904u); - } -label_BFC1F904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F904: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F908: AC206940 sw $zero, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037908u); return; } g_debug_last_store_pc = 0x80037908u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206940u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F90C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003790Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC1F910: 240B000B addiu $t3, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x240B000Bu, cpu->gpr[11], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80037910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1F914: AC2B6944 sw $t3, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037914u); return; } g_debug_last_store_pc = 0x80037914u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B6944u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F918: 24040032 addiu $a0, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24040032u, cpu->gpr[4], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F91C: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x80037924u; /* jal link before delay slot */ - psx_delay_BFC1F91C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F920: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80037920u); -#endif - if (psx_delay_BFC1F91C) { - psx_delay_BFC1F91C = 0; - cpu->gpr[31] = 0x80037924u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1F924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F924: 14400003 bne $v0, $zero, 0xBFC1F934 */ - uint32_t psx_brA_BFC1F924 = cpu->gpr[2]; uint32_t psx_brB_BFC1F924 = cpu->gpr[0]; - psx_taken_BFC1F924 = (psx_brA_BFC1F924 != psx_brB_BFC1F924); - psx_delay_BFC1F924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037928u); -#endif - if (psx_delay_BFC1F924) { - psx_delay_BFC1F924 = 0; - if (psx_taken_BFC1F924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037934u); - goto label_BFC1F934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003792Cu); - } -label_BFC1F92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003792Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F92C: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80037934u; /* jal link before delay slot */ - psx_delay_BFC1F92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F930: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037930u); -#endif - if (psx_delay_BFC1F92C) { - psx_delay_BFC1F92C = 0; - cpu->gpr[31] = 0x80037934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1F934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1F934: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037934u); -#endif - /* 0xBFC1F938: 8D8C9EB0 lw $t4, -24912($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037938u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EB0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80037938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F93C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003793Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1F940: 11800004 beq $t4, $zero, 0xBFC1F954 */ - uint32_t psx_brA_BFC1F940 = cpu->gpr[12]; uint32_t psx_brB_BFC1F940 = cpu->gpr[0]; - psx_taken_BFC1F940 = (psx_brA_BFC1F940 == psx_brB_BFC1F940); - psx_delay_BFC1F940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F944: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037944u); -#endif - if (psx_delay_BFC1F940) { - psx_delay_BFC1F940 = 0; - if (psx_taken_BFC1F940) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037954u); - goto label_BFC1F954; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037948u); - } -label_BFC1F948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F948: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037948u); return; } g_debug_last_store_pc = 0x80037948u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F94C: 10000008 beq $zero, $zero, 0xBFC1F970 */ - uint32_t psx_brA_BFC1F94C = cpu->gpr[0]; uint32_t psx_brB_BFC1F94C = cpu->gpr[0]; - psx_taken_BFC1F94C = (psx_brA_BFC1F94C == psx_brB_BFC1F94C); - psx_delay_BFC1F94C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F950: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037950u); -#endif - if (psx_delay_BFC1F94C) { - psx_delay_BFC1F94C = 0; - if (psx_taken_BFC1F94C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037970u); - goto label_BFC1F970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037954u); - } -label_BFC1F954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC1F954: 240D0032 addiu $t5, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240D0032u, cpu->gpr[13], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F958: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1F95C: AC2D6940 sw $t5, 26944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003795Cu); return; } g_debug_last_store_pc = 0x8003795Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6940u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003795Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F960: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1F964: 240E0032 addiu $t6, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x240E0032u, cpu->gpr[14], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F968: AC2E6948 sw $t6, 26952($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26952; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037968u); return; } g_debug_last_store_pc = 0x80037968u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6948u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F96C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003796Cu); -#endif -label_BFC1F970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037970u); -#endif - /* 0xBFC1F970: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037970u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F974: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80037974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1F978: 03E00008 jr $ra */ - psx_delay_BFC1F978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F97C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003797Cu); -#endif - if (psx_delay_BFC1F978) { - psx_delay_BFC1F978 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1F980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1F980u); - int psx_delay_BFC1F990 = 0; - int psx_taken_BFC1F990 = 0; - int psx_delay_BFC1F9B4 = 0; - int psx_delay_BFC1F9BC = 0; - int psx_taken_BFC1F9BC = 0; - int psx_delay_BFC1F9C8 = 0; - int psx_delay_BFC1F9D0 = 0; - int psx_delay_BFC1F9D8 = 0; - int psx_taken_BFC1F9D8 = 0; - int psx_delay_BFC1F9EC = 0; - int psx_taken_BFC1F9EC = 0; - int psx_delay_BFC1FA04 = 0; - int psx_taken_BFC1FA04 = 0; - int psx_delay_BFC1FA0C = 0; - int psx_delay_BFC1FA14 = 0; - int psx_taken_BFC1FA14 = 0; - int psx_delay_BFC1FA1C = 0; - int psx_taken_BFC1FA1C = 0; - int psx_delay_BFC1FA24 = 0; - int psx_delay_BFC1FA2C = 0; - int psx_taken_BFC1FA2C = 0; - int psx_delay_BFC1FA3C = 0; - int psx_taken_BFC1FA3C = 0; - int psx_delay_BFC1FA70 = 0; - int psx_delay_BFC1FA78 = 0; - int psx_delay_BFC1FA80 = 0; - int psx_taken_BFC1FA80 = 0; - int psx_delay_BFC1FA8C = 0; - int psx_taken_BFC1FA8C = 0; - int psx_delay_BFC1FAA0 = 0; - int psx_taken_BFC1FAA0 = 0; - int psx_delay_BFC1FAB4 = 0; - int psx_taken_BFC1FAB4 = 0; - int psx_delay_BFC1FAD4 = 0; - int psx_delay_BFC1FAE0 = 0; - int psx_taken_BFC1FAE0 = 0; - int psx_delay_BFC1FAF4 = 0; - int psx_taken_BFC1FAF4 = 0; - int psx_delay_BFC1FB08 = 0; - int psx_taken_BFC1FB08 = 0; - int psx_delay_BFC1FB10 = 0; - int psx_delay_BFC1FB18 = 0; - int psx_taken_BFC1FB18 = 0; - int psx_delay_BFC1FB38 = 0; - int psx_delay_BFC1FB40 = 0; - int psx_taken_BFC1FB40 = 0; - int psx_delay_BFC1FB4C = 0; - int psx_taken_BFC1FB4C = 0; - int psx_delay_BFC1FB54 = 0; - int psx_taken_BFC1FB54 = 0; - int psx_delay_BFC1FB78 = 0; - int psx_taken_BFC1FB78 = 0; - int psx_delay_BFC1FB84 = 0; - int psx_taken_BFC1FB84 = 0; - int psx_delay_BFC1FB8C = 0; - int psx_delay_BFC1FB94 = 0; - int psx_taken_BFC1FB94 = 0; - int psx_delay_BFC1FB9C = 0; - int psx_delay_BFC1FBA4 = 0; - int psx_taken_BFC1FBA4 = 0; - int psx_delay_BFC1FBAC = 0; - int psx_delay_BFC1FBD0 = 0; - int psx_delay_BFC1FBD8 = 0; - int psx_taken_BFC1FBD8 = 0; - int psx_delay_BFC1FBE0 = 0; - int psx_delay_BFC1FBF4 = 0; - int psx_taken_BFC1FBF4 = 0; - int psx_delay_BFC1FBFC = 0; - int psx_taken_BFC1FBFC = 0; - int psx_delay_BFC1FC10 = 0; - int psx_taken_BFC1FC10 = 0; - int psx_delay_BFC1FC18 = 0; - int psx_delay_BFC1FC20 = 0; - int psx_taken_BFC1FC20 = 0; - int psx_delay_BFC1FC28 = 0; - int psx_taken_BFC1FC28 = 0; - int psx_delay_BFC1FC30 = 0; - int psx_delay_BFC1FC38 = 0; - int psx_taken_BFC1FC38 = 0; - int psx_delay_BFC1FC48 = 0; - int psx_taken_BFC1FC48 = 0; - int psx_delay_BFC1FC7C = 0; - int psx_delay_BFC1FC84 = 0; - int psx_delay_BFC1FC8C = 0; - int psx_delay_BFC1FCB0 = 0; - int psx_delay_BFC1FCC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1F998u: goto label_BFC1F998; - case 0xBFC1F9BCu: goto label_BFC1F9BC; - case 0xBFC1F9C4u: goto label_BFC1F9C4; - case 0xBFC1F9D0u: goto label_BFC1F9D0; - case 0xBFC1F9D8u: goto label_BFC1F9D8; - case 0xBFC1F9E0u: goto label_BFC1F9E0; - case 0xBFC1F9F4u: goto label_BFC1F9F4; - case 0xBFC1F9F8u: goto label_BFC1F9F8; - case 0xBFC1FA0Cu: goto label_BFC1FA0C; - case 0xBFC1FA14u: goto label_BFC1FA14; - case 0xBFC1FA1Cu: goto label_BFC1FA1C; - case 0xBFC1FA24u: goto label_BFC1FA24; - case 0xBFC1FA2Cu: goto label_BFC1FA2C; - case 0xBFC1FA34u: goto label_BFC1FA34; - case 0xBFC1FA44u: goto label_BFC1FA44; - case 0xBFC1FA50u: goto label_BFC1FA50; - case 0xBFC1FA54u: goto label_BFC1FA54; - case 0xBFC1FA78u: goto label_BFC1FA78; - case 0xBFC1FA80u: goto label_BFC1FA80; - case 0xBFC1FA88u: goto label_BFC1FA88; - case 0xBFC1FA94u: goto label_BFC1FA94; - case 0xBFC1FAA8u: goto label_BFC1FAA8; - case 0xBFC1FABCu: goto label_BFC1FABC; - case 0xBFC1FADCu: goto label_BFC1FADC; - case 0xBFC1FAE8u: goto label_BFC1FAE8; - case 0xBFC1FAFCu: goto label_BFC1FAFC; - case 0xBFC1FB10u: goto label_BFC1FB10; - case 0xBFC1FB18u: goto label_BFC1FB18; - case 0xBFC1FB20u: goto label_BFC1FB20; - case 0xBFC1FB40u: goto label_BFC1FB40; - case 0xBFC1FB48u: goto label_BFC1FB48; - case 0xBFC1FB4Cu: goto label_BFC1FB4C; - case 0xBFC1FB54u: goto label_BFC1FB54; - case 0xBFC1FB5Cu: goto label_BFC1FB5C; - case 0xBFC1FB80u: goto label_BFC1FB80; - case 0xBFC1FB84u: goto label_BFC1FB84; - case 0xBFC1FB8Cu: goto label_BFC1FB8C; - case 0xBFC1FB94u: goto label_BFC1FB94; - case 0xBFC1FB9Cu: goto label_BFC1FB9C; - case 0xBFC1FBA4u: goto label_BFC1FBA4; - case 0xBFC1FBACu: goto label_BFC1FBAC; - case 0xBFC1FBB4u: goto label_BFC1FBB4; - case 0xBFC1FBB8u: goto label_BFC1FBB8; - case 0xBFC1FBD8u: goto label_BFC1FBD8; - case 0xBFC1FBE0u: goto label_BFC1FBE0; - case 0xBFC1FBE8u: goto label_BFC1FBE8; - case 0xBFC1FBFCu: goto label_BFC1FBFC; - case 0xBFC1FC04u: goto label_BFC1FC04; - case 0xBFC1FC18u: goto label_BFC1FC18; - case 0xBFC1FC20u: goto label_BFC1FC20; - case 0xBFC1FC28u: goto label_BFC1FC28; - case 0xBFC1FC30u: goto label_BFC1FC30; - case 0xBFC1FC38u: goto label_BFC1FC38; - case 0xBFC1FC40u: goto label_BFC1FC40; - case 0xBFC1FC50u: goto label_BFC1FC50; - case 0xBFC1FC5Cu: goto label_BFC1FC5C; - case 0xBFC1FC60u: goto label_BFC1FC60; - case 0xBFC1FC84u: goto label_BFC1FC84; - case 0xBFC1FC8Cu: goto label_BFC1FC8C; - case 0xBFC1FC94u: goto label_BFC1FC94; - case 0xBFC1FCB8u: goto label_BFC1FCB8; - case 0xBFC1FCBCu: goto label_BFC1FCBC; - default: break; - } - } -label_BFC1F980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F980: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037980u); -#endif - /* 0xBFC1F984: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037984u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1F988: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80037988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F98C: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x8003798Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1F990: 1441003D bne $v0, $at, 0xBFC1FA88 */ - uint32_t psx_brA_BFC1F990 = cpu->gpr[2]; uint32_t psx_brB_BFC1F990 = cpu->gpr[1]; - psx_taken_BFC1F990 = (psx_brA_BFC1F990 != psx_brB_BFC1F990); - psx_delay_BFC1F990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1F994: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037994u); return; } g_debug_last_store_pc = 0x80037994u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037994u); -#endif - if (psx_delay_BFC1F990) { - psx_delay_BFC1F990 = 0; - if (psx_taken_BFC1F990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A88u); - goto label_BFC1FA88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037998u); - } -label_BFC1F998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1F998: 240E0034 addiu $t6, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x240E0034u, cpu->gpr[14], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F99C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003799Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC1F9A0: AC2E9E4C sw $t6, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379A0u); return; } g_debug_last_store_pc = 0x800379A0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E4Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800379A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F9A4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800379A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1F9A8: 240F000A addiu $t7, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x240F000Au, cpu->gpr[15], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800379A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1F9AC: AC2F6944 sw $t7, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379ACu); return; } g_debug_last_store_pc = 0x800379ACu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6944u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800379ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1F9B0: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800379B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F9B4: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x800379BCu; /* jal link before delay slot */ - psx_delay_BFC1F9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1F9B8: 24050078 addiu $a1, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24050078u, cpu->gpr[5], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x800379B8u); -#endif - if (psx_delay_BFC1F9B4) { - psx_delay_BFC1F9B4 = 0; - cpu->gpr[31] = 0x800379BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1F9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1F9BC: 14400008 bne $v0, $zero, 0xBFC1F9E0 */ - uint32_t psx_brA_BFC1F9BC = cpu->gpr[2]; uint32_t psx_brB_BFC1F9BC = cpu->gpr[0]; - psx_taken_BFC1F9BC = (psx_brA_BFC1F9BC != psx_brB_BFC1F9BC); - psx_delay_BFC1F9BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F9C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800379C0u); -#endif - if (psx_delay_BFC1F9BC) { - psx_delay_BFC1F9BC = 0; - if (psx_taken_BFC1F9BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800379E0u); - goto label_BFC1F9E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800379C4u); - } -label_BFC1F9C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F9C4: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800379C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F9C8: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x800379D0u; /* jal link before delay slot */ - psx_delay_BFC1F9C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1F9CC: 2484699C addiu $a0, $a0, 27036 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27036)); - PGXP_ALU(0x2484699Cu, cpu->gpr[4], _pgx1, 0x0000699Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800379CCu); -#endif - if (psx_delay_BFC1F9C8) { - psx_delay_BFC1F9C8 = 0; - cpu->gpr[31] = 0x800379D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC1F9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1F9D0: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x800379D8u; /* jal link before delay slot */ - psx_delay_BFC1F9D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F9D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800379D4u); -#endif - if (psx_delay_BFC1F9D0) { - psx_delay_BFC1F9D0 = 0; - cpu->gpr[31] = 0x800379D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1F9D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F9D8: 100000B8 beq $zero, $zero, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1F9D8 = cpu->gpr[0]; uint32_t psx_brB_BFC1F9D8 = cpu->gpr[0]; - psx_taken_BFC1F9D8 = (psx_brA_BFC1F9D8 == psx_brB_BFC1F9D8); - psx_delay_BFC1F9D8 = 1; - /* 0xBFC1F9DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800379DCu); -#endif - if (psx_delay_BFC1F9D8) { - psx_delay_BFC1F9D8 = 0; - if (psx_taken_BFC1F9D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800379E0u); - } -label_BFC1F9E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC1F9E0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800379E0u); -#endif - /* 0xBFC1F9E4: 8F189EB0 lw $t8, -24912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379E4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189EB0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800379E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1F9E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800379E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1F9EC: 13000002 beq $t8, $zero, 0xBFC1F9F8 */ - uint32_t psx_brA_BFC1F9EC = cpu->gpr[24]; uint32_t psx_brB_BFC1F9EC = cpu->gpr[0]; - psx_taken_BFC1F9EC = (psx_brA_BFC1F9EC == psx_brB_BFC1F9EC); - psx_delay_BFC1F9EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1F9F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800379F0u); -#endif - if (psx_delay_BFC1F9EC) { - psx_delay_BFC1F9EC = 0; - if (psx_taken_BFC1F9EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800379F8u); - goto label_BFC1F9F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800379F4u); - } -label_BFC1F9F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1F9F4: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379F4u); return; } g_debug_last_store_pc = 0x800379F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800379F4u); -#endif -label_BFC1F9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1F9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1F9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800379F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1F9F8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800379F8u); -#endif - /* 0xBFC1F9FC: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800379FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800379FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FA04: 144000AD bne $v0, $zero, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1FA04 = cpu->gpr[2]; uint32_t psx_brB_BFC1FA04 = cpu->gpr[0]; - psx_taken_BFC1FA04 = (psx_brA_BFC1FA04 != psx_brB_BFC1FA04); - psx_delay_BFC1FA04 = 1; - /* 0xBFC1FA08: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A08u); -#endif - if (psx_delay_BFC1FA04) { - psx_delay_BFC1FA04 = 0; - if (psx_taken_BFC1FA04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A0Cu); - } -label_BFC1FA0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FA0C: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80037A14u; /* jal link before delay slot */ - psx_delay_BFC1FA0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A10u); -#endif - if (psx_delay_BFC1FA0C) { - psx_delay_BFC1FA0C = 0; - cpu->gpr[31] = 0x80037A14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1FA14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FA14: 10400003 beq $v0, $zero, 0xBFC1FA24 */ - uint32_t psx_brA_BFC1FA14 = cpu->gpr[2]; uint32_t psx_brB_BFC1FA14 = cpu->gpr[0]; - psx_taken_BFC1FA14 = (psx_brA_BFC1FA14 == psx_brB_BFC1FA14); - psx_delay_BFC1FA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A18u); -#endif - if (psx_delay_BFC1FA14) { - psx_delay_BFC1FA14 = 0; - if (psx_taken_BFC1FA14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A24u); - goto label_BFC1FA24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A1Cu); - } -label_BFC1FA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA1C: 1000000C beq $zero, $zero, 0xBFC1FA50 */ - uint32_t psx_brA_BFC1FA1C = cpu->gpr[0]; uint32_t psx_brB_BFC1FA1C = cpu->gpr[0]; - psx_taken_BFC1FA1C = (psx_brA_BFC1FA1C == psx_brB_BFC1FA1C); - psx_delay_BFC1FA1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FA20: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A20u); -#endif - if (psx_delay_BFC1FA1C) { - psx_delay_BFC1FA1C = 0; - if (psx_taken_BFC1FA1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A50u); - goto label_BFC1FA50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A24u); - } -label_BFC1FA24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FA24: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80037A2Cu; /* jal link before delay slot */ - psx_delay_BFC1FA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A28u); -#endif - if (psx_delay_BFC1FA24) { - psx_delay_BFC1FA24 = 0; - cpu->gpr[31] = 0x80037A2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1FA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FA2C: 10400005 beq $v0, $zero, 0xBFC1FA44 */ - uint32_t psx_brA_BFC1FA2C = cpu->gpr[2]; uint32_t psx_brB_BFC1FA2C = cpu->gpr[0]; - psx_taken_BFC1FA2C = (psx_brA_BFC1FA2C == psx_brB_BFC1FA2C); - psx_delay_BFC1FA2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A30u); -#endif - if (psx_delay_BFC1FA2C) { - psx_delay_BFC1FA2C = 0; - if (psx_taken_BFC1FA2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A44u); - goto label_BFC1FA44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A34u); - } -label_BFC1FA34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FA34: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A34u); -#endif - /* 0xBFC1FA38: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA3C: 10000005 beq $zero, $zero, 0xBFC1FA54 */ - uint32_t psx_brA_BFC1FA3C = cpu->gpr[0]; uint32_t psx_brB_BFC1FA3C = cpu->gpr[0]; - psx_taken_BFC1FA3C = (psx_brA_BFC1FA3C == psx_brB_BFC1FA3C); - psx_delay_BFC1FA3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1FA40: 0002C880 sll $t9, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A40u); -#endif - if (psx_delay_BFC1FA3C) { - psx_delay_BFC1FA3C = 0; - if (psx_taken_BFC1FA3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A54u); - goto label_BFC1FA54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A44u); - } -label_BFC1FA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FA44: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A44u); -#endif - /* 0xBFC1FA48: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A4Cu); -#endif -label_BFC1FA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC1FA50: 0002C880 sll $t9, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A50u); -#endif -label_BFC1FA54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC1FA54: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC1FA58: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037A58u); -#endif - /* 0xBFC1FA5C: 8D08D0F0 lw $t0, -12048($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A5Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08D0F0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FA60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1FA64: AC289E50 sw $t0, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A64u); return; } g_debug_last_store_pc = 0x80037A64u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E50u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FA68: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1FA6C: AC229E5C sw $v0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A6Cu); return; } g_debug_last_store_pc = 0x80037A6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FA70: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x80037A78u; /* jal link before delay slot */ - psx_delay_BFC1FA70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FA74: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037A74u); -#endif - if (psx_delay_BFC1FA70) { - psx_delay_BFC1FA70 = 0; - cpu->gpr[31] = 0x80037A78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC1FA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FA78: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80037A80u; /* jal link before delay slot */ - psx_delay_BFC1FA78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FA7C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A7Cu); -#endif - if (psx_delay_BFC1FA78) { - psx_delay_BFC1FA78 = 0; - cpu->gpr[31] = 0x80037A80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1FA80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA80: 1000008E beq $zero, $zero, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1FA80 = cpu->gpr[0]; uint32_t psx_brB_BFC1FA80 = cpu->gpr[0]; - psx_taken_BFC1FA80 = (psx_brA_BFC1FA80 == psx_brB_BFC1FA80); - psx_delay_BFC1FA80 = 1; - /* 0xBFC1FA84: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A84u); -#endif - if (psx_delay_BFC1FA80) { - psx_delay_BFC1FA80 = 0; - if (psx_taken_BFC1FA80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A88u); - } -label_BFC1FA88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC1FA88: 24030034 addiu $v1, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24030034u, cpu->gpr[3], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC1FA8C: 10430006 beq $v0, $v1, 0xBFC1FAA8 */ - uint32_t psx_brA_BFC1FA8C = cpu->gpr[2]; uint32_t psx_brB_BFC1FA8C = cpu->gpr[3]; - psx_taken_BFC1FA8C = (psx_brA_BFC1FA8C == psx_brB_BFC1FA8C); - psx_delay_BFC1FA8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FA90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037A90u); -#endif - if (psx_delay_BFC1FA8C) { - psx_delay_BFC1FA8C = 0; - if (psx_taken_BFC1FA8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037AA8u); - goto label_BFC1FAA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037A94u); - } -label_BFC1FA94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FA94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1FA94: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037A94u); -#endif - /* 0xBFC1FA98: 8D296940 lw $t1, 26944($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037A98u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296940u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80037A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FA9C: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80037A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC1FAA0: 1521002A bne $t1, $at, 0xBFC1FB4C */ - uint32_t psx_brA_BFC1FAA0 = cpu->gpr[9]; uint32_t psx_brB_BFC1FAA0 = cpu->gpr[1]; - psx_taken_BFC1FAA0 = (psx_brA_BFC1FAA0 != psx_brB_BFC1FAA0); - psx_delay_BFC1FAA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FAA4: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80037AA4u); -#endif - if (psx_delay_BFC1FAA0) { - psx_delay_BFC1FAA0 = 0; - if (psx_taken_BFC1FAA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B4Cu); - goto label_BFC1FB4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037AA8u); - } -label_BFC1FAA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FAA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC1FAA8: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037AA8u); -#endif - /* 0xBFC1FAAC: 8D4A9EBC lw $t2, -24900($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24900; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037AACu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9EBCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80037AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC1FAB4: 1140000C beq $t2, $zero, 0xBFC1FAE8 */ - uint32_t psx_brA_BFC1FAB4 = cpu->gpr[10]; uint32_t psx_brB_BFC1FAB4 = cpu->gpr[0]; - psx_taken_BFC1FAB4 = (psx_brA_BFC1FAB4 == psx_brB_BFC1FAB4); - psx_delay_BFC1FAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037AB8u); -#endif - if (psx_delay_BFC1FAB4) { - psx_delay_BFC1FAB4 = 0; - if (psx_taken_BFC1FAB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037AE8u); - goto label_BFC1FAE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037ABCu); - } -label_BFC1FABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FABC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AC0u); -#endif - /* 0xBFC1FAC0: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037AC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1FAC4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC1FAC8: 00025880 sll $t3, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC1FACC: 008B2021 addu $a0, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AD0u); -#endif - /* 0xBFC1FAD0: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037AD0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FAD4: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80037ADCu; /* jal link before delay slot */ - psx_delay_BFC1FAD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037AD8u); -#endif - if (psx_delay_BFC1FAD4) { - psx_delay_BFC1FAD4 = 0; - cpu->gpr[31] = 0x80037ADCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1FADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FADC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAE0: 10000075 beq $zero, $zero, 0xBFC1FCB8 */ - uint32_t psx_brA_BFC1FAE0 = cpu->gpr[0]; uint32_t psx_brB_BFC1FAE0 = cpu->gpr[0]; - psx_taken_BFC1FAE0 = (psx_brA_BFC1FAE0 == psx_brB_BFC1FAE0); - psx_delay_BFC1FAE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FAE4: AC209EBC sw $zero, -24900($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037AE4u); return; } g_debug_last_store_pc = 0x80037AE4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037AE4u); -#endif - if (psx_delay_BFC1FAE0) { - psx_delay_BFC1FAE0 = 0; - if (psx_taken_BFC1FAE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CB8u); - goto label_BFC1FCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037AE8u); - } -label_BFC1FAE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FAE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC1FAE8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037AE8u); -#endif - /* 0xBFC1FAEC: 8D8C9E44 lw $t4, -25020($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25020; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037AECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E44u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80037AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC1FAF4: 15800006 bne $t4, $zero, 0xBFC1FB10 */ - uint32_t psx_brA_BFC1FAF4 = cpu->gpr[12]; uint32_t psx_brB_BFC1FAF4 = cpu->gpr[0]; - psx_taken_BFC1FAF4 = (psx_brA_BFC1FAF4 != psx_brB_BFC1FAF4); - psx_delay_BFC1FAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FAF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037AF8u); -#endif - if (psx_delay_BFC1FAF4) { - psx_delay_BFC1FAF4 = 0; - if (psx_taken_BFC1FAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B10u); - goto label_BFC1FB10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037AFCu); - } -label_BFC1FAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1FAFC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B00u); -#endif - /* 0xBFC1FB00: 8DAD9E4C lw $t5, -25012($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B00u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E4Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC1FB08: 15A30005 bne $t5, $v1, 0xBFC1FB20 */ - uint32_t psx_brA_BFC1FB08 = cpu->gpr[13]; uint32_t psx_brB_BFC1FB08 = cpu->gpr[3]; - psx_taken_BFC1FB08 = (psx_brA_BFC1FB08 != psx_brB_BFC1FB08); - psx_delay_BFC1FB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037B0Cu); -#endif - if (psx_delay_BFC1FB08) { - psx_delay_BFC1FB08 = 0; - if (psx_taken_BFC1FB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B20u); - goto label_BFC1FB20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B10u); - } -label_BFC1FB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FB10: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80037B18u; /* jal link before delay slot */ - psx_delay_BFC1FB10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FB14: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037B14u); -#endif - if (psx_delay_BFC1FB10) { - psx_delay_BFC1FB10 = 0; - cpu->gpr[31] = 0x80037B18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1FB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB18: 10000068 beq $zero, $zero, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1FB18 = cpu->gpr[0]; uint32_t psx_brB_BFC1FB18 = cpu->gpr[0]; - psx_taken_BFC1FB18 = (psx_brA_BFC1FB18 == psx_brB_BFC1FB18); - psx_delay_BFC1FB18 = 1; - /* 0xBFC1FB1C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B1Cu); -#endif - if (psx_delay_BFC1FB18) { - psx_delay_BFC1FB18 = 0; - if (psx_taken_BFC1FB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B20u); - } -label_BFC1FB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FB20: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037B20u); -#endif - /* 0xBFC1FB24: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B24u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC1FB28: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC1FB2C: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC1FB30: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037B30u); -#endif - /* 0xBFC1FB34: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B34u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FB38: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80037B40u; /* jal link before delay slot */ - psx_delay_BFC1FB38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037B3Cu); -#endif - if (psx_delay_BFC1FB38) { - psx_delay_BFC1FB38 = 0; - cpu->gpr[31] = 0x80037B40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC1FB40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB40: 1000005E beq $zero, $zero, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1FB40 = cpu->gpr[0]; uint32_t psx_brB_BFC1FB40 = cpu->gpr[0]; - psx_taken_BFC1FB40 = (psx_brA_BFC1FB40 == psx_brB_BFC1FB40); - psx_delay_BFC1FB40 = 1; - /* 0xBFC1FB44: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B44u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B44u); -#endif - if (psx_delay_BFC1FB40) { - psx_delay_BFC1FB40 = 0; - if (psx_taken_BFC1FB40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B48u); - } -label_BFC1FB48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FB48: 2401003A addiu $at, $zero, 58 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); - PGXP_ALU(0x2401003Au, cpu->gpr[1], _pgx1, 0x0000003Au); } -#ifdef PSX_COSIM - cosim_instr(0x80037B48u); -#endif -label_BFC1FB4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1FB4C: 10410003 beq $v0, $at, 0xBFC1FB5C */ - uint32_t psx_brA_BFC1FB4C = cpu->gpr[2]; uint32_t psx_brB_BFC1FB4C = cpu->gpr[1]; - psx_taken_BFC1FB4C = (psx_brA_BFC1FB4C == psx_brB_BFC1FB4C); - psx_delay_BFC1FB4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FB50: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80037B50u); -#endif - if (psx_delay_BFC1FB4C) { - psx_delay_BFC1FB4C = 0; - if (psx_taken_BFC1FB4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B5Cu); - goto label_BFC1FB5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B54u); - } -label_BFC1FB54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1FB54: 1441000B bne $v0, $at, 0xBFC1FB84 */ - uint32_t psx_brA_BFC1FB54 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB54 = cpu->gpr[1]; - psx_taken_BFC1FB54 = (psx_brA_BFC1FB54 != psx_brB_BFC1FB54); - psx_delay_BFC1FB54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FB58: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037B58u); -#endif - if (psx_delay_BFC1FB54) { - psx_delay_BFC1FB54 = 0; - if (psx_taken_BFC1FB54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B84u); - goto label_BFC1FB84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B5Cu); - } -label_BFC1FB5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC1FB5C: 240F0034 addiu $t7, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x240F0034u, cpu->gpr[15], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FB60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC1FB64: AC2F9E4C sw $t7, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B64u); return; } g_debug_last_store_pc = 0x80037B64u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E4Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FB68: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FB6C: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B6Cu); return; } g_debug_last_store_pc = 0x80037B6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FB70: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC1FB74: 2418000A addiu $t8, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2418000Au, cpu->gpr[24], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80037B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB78: 1000004F beq $zero, $zero, 0xBFC1FCB8 */ - uint32_t psx_brA_BFC1FB78 = cpu->gpr[0]; uint32_t psx_brB_BFC1FB78 = cpu->gpr[0]; - psx_taken_BFC1FB78 = (psx_brA_BFC1FB78 == psx_brB_BFC1FB78); - psx_delay_BFC1FB78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC1FB7C: AC386944 sw $t8, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B7Cu); return; } g_debug_last_store_pc = 0x80037B7Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386944u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B7Cu); -#endif - if (psx_delay_BFC1FB78) { - psx_delay_BFC1FB78 = 0; - if (psx_taken_BFC1FB78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CB8u); - goto label_BFC1FCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B80u); - } -label_BFC1FB80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FB80: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80037B80u); -#endif -label_BFC1FB84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1FB84: 1441004D bne $v0, $at, 0xBFC1FCBC */ - uint32_t psx_brA_BFC1FB84 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB84 = cpu->gpr[1]; - psx_taken_BFC1FB84 = (psx_brA_BFC1FB84 != psx_brB_BFC1FB84); - psx_delay_BFC1FB84 = 1; - /* 0xBFC1FB88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037B88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037B88u); -#endif - if (psx_delay_BFC1FB84) { - psx_delay_BFC1FB84 = 0; - if (psx_taken_BFC1FB84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CBCu); - goto label_BFC1FCBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B8Cu); - } -label_BFC1FB8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FB8C: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80037B94u; /* jal link before delay slot */ - psx_delay_BFC1FB8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FB90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037B90u); -#endif - if (psx_delay_BFC1FB8C) { - psx_delay_BFC1FB8C = 0; - cpu->gpr[31] = 0x80037B94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1FB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FB94: 10400008 beq $v0, $zero, 0xBFC1FBB8 */ - uint32_t psx_brA_BFC1FB94 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB94 = cpu->gpr[0]; - psx_taken_BFC1FB94 = (psx_brA_BFC1FB94 == psx_brB_BFC1FB94); - psx_delay_BFC1FB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1FB98: 24190034 addiu $t9, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24190034u, cpu->gpr[25], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037B98u); -#endif - if (psx_delay_BFC1FB94) { - psx_delay_BFC1FB94 = 0; - if (psx_taken_BFC1FB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037BB8u); - goto label_BFC1FBB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037B9Cu); - } -label_BFC1FB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FB9C: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80037BA4u; /* jal link before delay slot */ - psx_delay_BFC1FB9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FBA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037BA0u); -#endif - if (psx_delay_BFC1FB9C) { - psx_delay_BFC1FB9C = 0; - cpu->gpr[31] = 0x80037BA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC1FBA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FBA4: 14400004 bne $v0, $zero, 0xBFC1FBB8 */ - uint32_t psx_brA_BFC1FBA4 = cpu->gpr[2]; uint32_t psx_brB_BFC1FBA4 = cpu->gpr[0]; - psx_taken_BFC1FBA4 = (psx_brA_BFC1FBA4 != psx_brB_BFC1FBA4); - psx_delay_BFC1FBA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1FBA8: 24190034 addiu $t9, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24190034u, cpu->gpr[25], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BA8u); -#endif - if (psx_delay_BFC1FBA4) { - psx_delay_BFC1FBA4 = 0; - if (psx_taken_BFC1FBA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037BB8u); - goto label_BFC1FBB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037BACu); - } -label_BFC1FBAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FBAC: 0C00CFD1 jal 0xB0033F44 */ - cpu->gpr[31] = 0x80037BB4u; /* jal link before delay slot */ - psx_delay_BFC1FBAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FBB0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BB0u); -#endif - if (psx_delay_BFC1FBAC) { - psx_delay_BFC1FBAC = 0; - cpu->gpr[31] = 0x80037BB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F44u); - cpu->pc = 0x80033F44u; return; - } -label_BFC1FBB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC1FBB4: 24190034 addiu $t9, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24190034u, cpu->gpr[25], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BB4u); -#endif -label_BFC1FBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FBB8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC1FBBC: AC399E4C sw $t9, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037BBCu); return; } g_debug_last_store_pc = 0x80037BBCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E4Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80037BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FBC0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC1FBC4: 24080009 addiu $t0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24080009u, cpu->gpr[8], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC1FBC8: AC286944 sw $t0, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037BC8u); return; } g_debug_last_store_pc = 0x80037BC8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286944u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80037BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FBCC: 24040034 addiu $a0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24040034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FBD0: 0C00E4FF jal 0xB00393FC */ - cpu->gpr[31] = 0x80037BD8u; /* jal link before delay slot */ - psx_delay_BFC1FBD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC1FBD4: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80037BD4u); -#endif - if (psx_delay_BFC1FBD0) { - psx_delay_BFC1FBD0 = 0; - cpu->gpr[31] = 0x80037BD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393FCu); - cpu->pc = 0x800393FCu; return; - } -label_BFC1FBD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FBD8: 1440000A bne $v0, $zero, 0xBFC1FC04 */ - uint32_t psx_brA_BFC1FBD8 = cpu->gpr[2]; uint32_t psx_brB_BFC1FBD8 = cpu->gpr[0]; - psx_taken_BFC1FBD8 = (psx_brA_BFC1FBD8 != psx_brB_BFC1FBD8); - psx_delay_BFC1FBD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FBDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037BDCu); -#endif - if (psx_delay_BFC1FBD8) { - psx_delay_BFC1FBD8 = 0; - if (psx_taken_BFC1FBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C04u); - goto label_BFC1FC04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037BE0u); - } -label_BFC1FBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FBE0: 0C00DF32 jal 0xB0037CC8 */ - cpu->gpr[31] = 0x80037BE8u; /* jal link before delay slot */ - psx_delay_BFC1FBE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FBE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037BE4u); -#endif - if (psx_delay_BFC1FBE0) { - psx_delay_BFC1FBE0 = 0; - cpu->gpr[31] = 0x80037BE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CC8u); - cpu->pc = 0x80037CC8u; return; - } -label_BFC1FBE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC1FBE8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037BE8u); -#endif - /* 0xBFC1FBEC: 8D299EB0 lw $t1, -24912($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037BECu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299EB0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80037BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FBF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC1FBF4: 11200030 beq $t1, $zero, 0xBFC1FCB8 */ - uint32_t psx_brA_BFC1FBF4 = cpu->gpr[9]; uint32_t psx_brB_BFC1FBF4 = cpu->gpr[0]; - psx_taken_BFC1FBF4 = (psx_brA_BFC1FBF4 == psx_brB_BFC1FBF4); - psx_delay_BFC1FBF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FBF8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037BF8u); -#endif - if (psx_delay_BFC1FBF4) { - psx_delay_BFC1FBF4 = 0; - if (psx_taken_BFC1FBF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CB8u); - goto label_BFC1FCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037BFCu); - } -label_BFC1FBFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FBFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FBFC: 1000002E beq $zero, $zero, 0xBFC1FCB8 */ - uint32_t psx_brA_BFC1FBFC = cpu->gpr[0]; uint32_t psx_brB_BFC1FBFC = cpu->gpr[0]; - psx_taken_BFC1FBFC = (psx_brA_BFC1FBFC == psx_brB_BFC1FBFC); - psx_delay_BFC1FBFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC1FC00: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C00u); return; } g_debug_last_store_pc = 0x80037C00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C00u); -#endif - if (psx_delay_BFC1FBFC) { - psx_delay_BFC1FBFC = 0; - if (psx_taken_BFC1FBFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037CB8u); - goto label_BFC1FCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C04u); - } -label_BFC1FC04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FC04: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C04u); -#endif - /* 0xBFC1FC08: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FC10: 1440001C bne $v0, $zero, 0xBFC1FC84 */ - uint32_t psx_brA_BFC1FC10 = cpu->gpr[2]; uint32_t psx_brB_BFC1FC10 = cpu->gpr[0]; - psx_taken_BFC1FC10 = (psx_brA_BFC1FC10 != psx_brB_BFC1FC10); - psx_delay_BFC1FC10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C14u); -#endif - if (psx_delay_BFC1FC10) { - psx_delay_BFC1FC10 = 0; - if (psx_taken_BFC1FC10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C84u); - goto label_BFC1FC84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C18u); - } -label_BFC1FC18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FC18: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80037C20u; /* jal link before delay slot */ - psx_delay_BFC1FC18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C1Cu); -#endif - if (psx_delay_BFC1FC18) { - psx_delay_BFC1FC18 = 0; - cpu->gpr[31] = 0x80037C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC1FC20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FC20: 10400003 beq $v0, $zero, 0xBFC1FC30 */ - uint32_t psx_brA_BFC1FC20 = cpu->gpr[2]; uint32_t psx_brB_BFC1FC20 = cpu->gpr[0]; - psx_taken_BFC1FC20 = (psx_brA_BFC1FC20 == psx_brB_BFC1FC20); - psx_delay_BFC1FC20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C24u); -#endif - if (psx_delay_BFC1FC20) { - psx_delay_BFC1FC20 = 0; - if (psx_taken_BFC1FC20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C30u); - goto label_BFC1FC30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C28u); - } -label_BFC1FC28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC28: 1000000C beq $zero, $zero, 0xBFC1FC5C */ - uint32_t psx_brA_BFC1FC28 = cpu->gpr[0]; uint32_t psx_brB_BFC1FC28 = cpu->gpr[0]; - psx_taken_BFC1FC28 = (psx_brA_BFC1FC28 == psx_brB_BFC1FC28); - psx_delay_BFC1FC28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FC2C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037C2Cu); -#endif - if (psx_delay_BFC1FC28) { - psx_delay_BFC1FC28 = 0; - if (psx_taken_BFC1FC28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C5Cu); - goto label_BFC1FC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C30u); - } -label_BFC1FC30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FC30: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80037C38u; /* jal link before delay slot */ - psx_delay_BFC1FC30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C34u); -#endif - if (psx_delay_BFC1FC30) { - psx_delay_BFC1FC30 = 0; - cpu->gpr[31] = 0x80037C38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC1FC38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC1FC38: 10400005 beq $v0, $zero, 0xBFC1FC50 */ - uint32_t psx_brA_BFC1FC38 = cpu->gpr[2]; uint32_t psx_brB_BFC1FC38 = cpu->gpr[0]; - psx_taken_BFC1FC38 = (psx_brA_BFC1FC38 == psx_brB_BFC1FC38); - psx_delay_BFC1FC38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C3Cu); -#endif - if (psx_delay_BFC1FC38) { - psx_delay_BFC1FC38 = 0; - if (psx_taken_BFC1FC38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C50u); - goto label_BFC1FC50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C40u); - } -label_BFC1FC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FC40: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C40u); -#endif - /* 0xBFC1FC44: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC48: 10000005 beq $zero, $zero, 0xBFC1FC60 */ - uint32_t psx_brA_BFC1FC48 = cpu->gpr[0]; uint32_t psx_brB_BFC1FC48 = cpu->gpr[0]; - psx_taken_BFC1FC48 = (psx_brA_BFC1FC48 == psx_brB_BFC1FC48); - psx_delay_BFC1FC48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1FC4C: 00025080 sll $t2, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037C4Cu); -#endif - if (psx_delay_BFC1FC48) { - psx_delay_BFC1FC48 = 0; - if (psx_taken_BFC1FC48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C60u); - goto label_BFC1FC60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037C50u); - } -label_BFC1FC50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FC50: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C50u); -#endif - /* 0xBFC1FC54: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C58u); -#endif -label_BFC1FC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC1FC5C: 00025080 sll $t2, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037C5Cu); -#endif -label_BFC1FC60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC1FC60: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC1FC64: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037C64u); -#endif - /* 0xBFC1FC68: 8D6BD0F0 lw $t3, -12048($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C68u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BD0F0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FC6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC1FC70: AC2B9E50 sw $t3, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C70u); return; } g_debug_last_store_pc = 0x80037C70u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9E50u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FC74: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC1FC78: AC229E5C sw $v0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C78u); return; } g_debug_last_store_pc = 0x80037C78u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FC7C: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x80037C84u; /* jal link before delay slot */ - psx_delay_BFC1FC7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FC80: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037C80u); -#endif - if (psx_delay_BFC1FC7C) { - psx_delay_BFC1FC7C = 0; - cpu->gpr[31] = 0x80037C84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC1FC84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FC84: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80037C8Cu; /* jal link before delay slot */ - psx_delay_BFC1FC84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC1FC88: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80037C88u); -#endif - if (psx_delay_BFC1FC84) { - psx_delay_BFC1FC84 = 0; - cpu->gpr[31] = 0x80037C8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC1FC8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FC8C: 0C00D8F3 jal 0xB00363CC */ - cpu->gpr[31] = 0x80037C94u; /* jal link before delay slot */ - psx_delay_BFC1FC8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FC90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037C90u); -#endif - if (psx_delay_BFC1FC8C) { - psx_delay_BFC1FC8C = 0; - cpu->gpr[31] = 0x80037C94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363CCu); - cpu->pc = 0x800363CCu; return; - } -label_BFC1FC94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FC94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FC94: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C94u); -#endif - /* 0xBFC1FC98: 8C429E5C lw $v0, -24996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037C98u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC1FC9C: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC1FCA0: 00026080 sll $t4, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00026080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80037CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC1FCA4: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80037CA4u); -#endif - /* 0xBFC1FCA8: 8DADD0F0 lw $t5, -12048($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037CA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADD0F0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC1FCAC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC1FCB0: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80037CB8u; /* jal link before delay slot */ - psx_delay_BFC1FCB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC1FCB4: AC2D9E50 sw $t5, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037CB4u); return; } g_debug_last_store_pc = 0x80037CB4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E50u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80037CB4u); -#endif - if (psx_delay_BFC1FCB0) { - psx_delay_BFC1FCB0 = 0; - cpu->gpr[31] = 0x80037CB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC1FCB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FCB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037CB8u); -#endif - /* 0xBFC1FCB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037CB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037CB8u); -#endif -label_BFC1FCBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FCBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1FCBC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80037CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC1FCC0: 03E00008 jr $ra */ - psx_delay_BFC1FCC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FCC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037CC4u); -#endif - if (psx_delay_BFC1FCC0) { - psx_delay_BFC1FCC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC1FFA8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC1FFA8u); - int psx_delay_BFC1FFBC = 0; - int psx_taken_BFC1FFBC = 0; - int psx_delay_BFC1FFC8 = 0; - int psx_taken_BFC1FFC8 = 0; - int psx_delay_BFC1FFDC = 0; - int psx_taken_BFC1FFDC = 0; - int psx_delay_BFC1FFE8 = 0; - int psx_taken_BFC1FFE8 = 0; - int psx_delay_BFC20014 = 0; - int psx_taken_BFC20014 = 0; - int psx_delay_BFC2002C = 0; - int psx_taken_BFC2002C = 0; - int psx_delay_BFC20034 = 0; - int psx_delay_BFC20040 = 0; - int psx_taken_BFC20040 = 0; - int psx_delay_BFC20054 = 0; - int psx_taken_BFC20054 = 0; - int psx_delay_BFC2005C = 0; - int psx_taken_BFC2005C = 0; - int psx_delay_BFC2007C = 0; - int psx_delay_BFC20084 = 0; - int psx_taken_BFC20084 = 0; - int psx_delay_BFC2008C = 0; - int psx_delay_BFC200B8 = 0; - int psx_taken_BFC200B8 = 0; - int psx_delay_BFC200C0 = 0; - int psx_taken_BFC200C0 = 0; - int psx_delay_BFC200D4 = 0; - int psx_taken_BFC200D4 = 0; - int psx_delay_BFC200F4 = 0; - int psx_taken_BFC200F4 = 0; - int psx_delay_BFC200FC = 0; - int psx_delay_BFC20108 = 0; - int psx_taken_BFC20108 = 0; - int psx_delay_BFC2011C = 0; - int psx_taken_BFC2011C = 0; - int psx_delay_BFC20124 = 0; - int psx_taken_BFC20124 = 0; - int psx_delay_BFC20138 = 0; - int psx_taken_BFC20138 = 0; - int psx_delay_BFC20164 = 0; - int psx_taken_BFC20164 = 0; - int psx_delay_BFC2016C = 0; - int psx_taken_BFC2016C = 0; - int psx_delay_BFC20180 = 0; - int psx_taken_BFC20180 = 0; - int psx_delay_BFC201A0 = 0; - int psx_taken_BFC201A0 = 0; - int psx_delay_BFC201B4 = 0; - int psx_taken_BFC201B4 = 0; - int psx_delay_BFC201BC = 0; - int psx_taken_BFC201BC = 0; - int psx_delay_BFC201D0 = 0; - int psx_taken_BFC201D0 = 0; - int psx_delay_BFC201FC = 0; - int psx_delay_BFC20204 = 0; - int psx_taken_BFC20204 = 0; - int psx_delay_BFC20224 = 0; - int psx_taken_BFC20224 = 0; - int psx_delay_BFC20230 = 0; - int psx_delay_BFC20248 = 0; - int psx_taken_BFC20248 = 0; - int psx_delay_BFC20258 = 0; - int psx_taken_BFC20258 = 0; - int psx_delay_BFC20260 = 0; - int psx_taken_BFC20260 = 0; - int psx_delay_BFC20274 = 0; - int psx_taken_BFC20274 = 0; - int psx_delay_BFC20294 = 0; - int psx_taken_BFC20294 = 0; - int psx_delay_BFC202A8 = 0; - int psx_taken_BFC202A8 = 0; - int psx_delay_BFC202C0 = 0; - int psx_taken_BFC202C0 = 0; - int psx_delay_BFC202C8 = 0; - int psx_delay_BFC20330 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC1FFC4u: goto label_BFC1FFC4; - case 0xBFC1FFD0u: goto label_BFC1FFD0; - case 0xBFC1FFE4u: goto label_BFC1FFE4; - case 0xBFC1FFF0u: goto label_BFC1FFF0; - case 0xBFC20014u: goto label_BFC20014; - case 0xBFC2001Cu: goto label_BFC2001C; - case 0xBFC20028u: goto label_BFC20028; - case 0xBFC20034u: goto label_BFC20034; - case 0xBFC2003Cu: goto label_BFC2003C; - case 0xBFC20048u: goto label_BFC20048; - case 0xBFC2005Cu: goto label_BFC2005C; - case 0xBFC20064u: goto label_BFC20064; - case 0xBFC20084u: goto label_BFC20084; - case 0xBFC2008Cu: goto label_BFC2008C; - case 0xBFC20094u: goto label_BFC20094; - case 0xBFC200B0u: goto label_BFC200B0; - case 0xBFC200C0u: goto label_BFC200C0; - case 0xBFC200C8u: goto label_BFC200C8; - case 0xBFC200DCu: goto label_BFC200DC; - case 0xBFC200FCu: goto label_BFC200FC; - case 0xBFC20104u: goto label_BFC20104; - case 0xBFC20110u: goto label_BFC20110; - case 0xBFC20124u: goto label_BFC20124; - case 0xBFC2012Cu: goto label_BFC2012C; - case 0xBFC20140u: goto label_BFC20140; - case 0xBFC20150u: goto label_BFC20150; - case 0xBFC2016Cu: goto label_BFC2016C; - case 0xBFC20174u: goto label_BFC20174; - case 0xBFC20188u: goto label_BFC20188; - case 0xBFC201A8u: goto label_BFC201A8; - case 0xBFC201BCu: goto label_BFC201BC; - case 0xBFC201C4u: goto label_BFC201C4; - case 0xBFC201D8u: goto label_BFC201D8; - case 0xBFC201E8u: goto label_BFC201E8; - case 0xBFC20204u: goto label_BFC20204; - case 0xBFC2020Cu: goto label_BFC2020C; - case 0xBFC2022Cu: goto label_BFC2022C; - case 0xBFC20230u: goto label_BFC20230; - case 0xBFC20238u: goto label_BFC20238; - case 0xBFC20250u: goto label_BFC20250; - case 0xBFC20260u: goto label_BFC20260; - case 0xBFC20268u: goto label_BFC20268; - case 0xBFC2027Cu: goto label_BFC2027C; - case 0xBFC2029Cu: goto label_BFC2029C; - case 0xBFC202B0u: goto label_BFC202B0; - case 0xBFC202BCu: goto label_BFC202BC; - case 0xBFC202C0u: goto label_BFC202C0; - case 0xBFC202C8u: goto label_BFC202C8; - case 0xBFC202D0u: goto label_BFC202D0; - default: break; - } - } -label_BFC1FFA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FFA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC1FFA8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80037FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC1FFAC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FB0u); -#endif - /* 0xBFC1FFB0: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037FB0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80037FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC1FFB4: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037FB4u); return; } g_debug_last_store_pc = 0x80037FB4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80037FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC1FFB8: 24100034 addiu $s0, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24100034u, cpu->gpr[16], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80037FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC1FFBC: 10500004 beq $v0, $s0, 0xBFC1FFD0 */ - uint32_t psx_brA_BFC1FFBC = cpu->gpr[2]; uint32_t psx_brB_BFC1FFBC = cpu->gpr[16]; - psx_taken_BFC1FFBC = (psx_brA_BFC1FFBC == psx_brB_BFC1FFBC); - psx_delay_BFC1FFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC1FFC0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037FC0u); return; } g_debug_last_store_pc = 0x80037FC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80037FC0u); -#endif - if (psx_delay_BFC1FFBC) { - psx_delay_BFC1FFBC = 0; - if (psx_taken_BFC1FFBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FD0u); - goto label_BFC1FFD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FC4u); - } -label_BFC1FFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFC4: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FFC8: 10000012 beq $zero, $zero, 0xBFC20014 */ - uint32_t psx_brA_BFC1FFC8 = cpu->gpr[0]; uint32_t psx_brB_BFC1FFC8 = cpu->gpr[0]; - psx_taken_BFC1FFC8 = (psx_brA_BFC1FFC8 == psx_brB_BFC1FFC8); - psx_delay_BFC1FFC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFCC: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80037FCCu); -#endif - if (psx_delay_BFC1FFC8) { - psx_delay_BFC1FFC8 = 0; - if (psx_taken_BFC1FFC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038014u); - goto label_BFC20014; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FD0u); - } -label_BFC1FFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC1FFD0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FD0u); -#endif - /* 0xBFC1FFD4: 8DCE9EBC lw $t6, -24900($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24900; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037FD4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EBCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80037FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FFD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC1FFDC: 15C00004 bne $t6, $zero, 0xBFC1FFF0 */ - uint32_t psx_brA_BFC1FFDC = cpu->gpr[14]; uint32_t psx_brB_BFC1FFDC = cpu->gpr[0]; - psx_taken_BFC1FFDC = (psx_brA_BFC1FFDC != psx_brB_BFC1FFDC); - psx_delay_BFC1FFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FFE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80037FE0u); -#endif - if (psx_delay_BFC1FFDC) { - psx_delay_BFC1FFDC = 0; - if (psx_taken_BFC1FFDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FF0u); - goto label_BFC1FFF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FE4u); - } -label_BFC1FFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFE4: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1FFE8: 1000000A beq $zero, $zero, 0xBFC20014 */ - uint32_t psx_brA_BFC1FFE8 = cpu->gpr[0]; uint32_t psx_brB_BFC1FFE8 = cpu->gpr[0]; - psx_taken_BFC1FFE8 = (psx_brA_BFC1FFE8 == psx_brB_BFC1FFE8); - psx_delay_BFC1FFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFEC: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80037FECu); -#endif - if (psx_delay_BFC1FFE8) { - psx_delay_BFC1FFE8 = 0; - if (psx_taken_BFC1FFE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038014u); - goto label_BFC20014; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FF0u); - } -label_BFC1FFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC1FFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC1FFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80037FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC1FFF0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FF0u); -#endif - /* 0xBFC1FFF4: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80037FF4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80037FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFF8: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80037FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC1FFFC: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80037FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC20000: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC20004: 00AFC021 addu $t8, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038004u); -#endif - /* 0xBFC20008: 8F040000 lw $a0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038008u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x1000000u); } - PGXP_LOAD(0x8F040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2000C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003800Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20010: AC209EBC sw $zero, -24900($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038010u); return; } g_debug_last_store_pc = 0x80038010u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80038010u); -#endif -label_BFC20014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20014: 10800004 beq $a0, $zero, 0xBFC20028 */ - uint32_t psx_brA_BFC20014 = cpu->gpr[4]; uint32_t psx_brB_BFC20014 = cpu->gpr[0]; - psx_taken_BFC20014 = (psx_brA_BFC20014 == psx_brB_BFC20014); - psx_delay_BFC20014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20018: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038018u); -#endif - if (psx_delay_BFC20014) { - psx_delay_BFC20014 = 0; - if (psx_taken_BFC20014) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038028u); - goto label_BFC20028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003801Cu); - } -label_BFC2001C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2001Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003801Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2001C: AC209E60 sw $zero, -24992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003801Cu); return; } g_debug_last_store_pc = 0x8003801Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003801Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20020: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20024: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038024u); return; } g_debug_last_store_pc = 0x80038024u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80038024u); -#endif -label_BFC20028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20028: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2002C: 1480009B bne $a0, $zero, 0xBFC2029C */ - uint32_t psx_brA_BFC2002C = cpu->gpr[4]; uint32_t psx_brB_BFC2002C = cpu->gpr[0]; - psx_taken_BFC2002C = (psx_brA_BFC2002C != psx_brB_BFC2002C); - psx_delay_BFC2002C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC20030: AC249EB8 sw $a0, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038030u); return; } g_debug_last_store_pc = 0x80038030u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249EB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038030u); -#endif - if (psx_delay_BFC2002C) { - psx_delay_BFC2002C = 0; - if (psx_taken_BFC2002C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003829Cu); - goto label_BFC2029C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038034u); - } -label_BFC20034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20034: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x8003803Cu; /* jal link before delay slot */ - psx_delay_BFC20034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038038u); -#endif - if (psx_delay_BFC20034) { - psx_delay_BFC20034 = 0; - cpu->gpr[31] = 0x8003803Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC2003C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2003Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003803Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2003C: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003803Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20040: 1040002E beq $v0, $zero, 0xBFC200FC */ - uint32_t psx_brA_BFC20040 = cpu->gpr[2]; uint32_t psx_brB_BFC20040 = cpu->gpr[0]; - psx_taken_BFC20040 = (psx_brA_BFC20040 == psx_brB_BFC20040); - psx_delay_BFC20040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC20044: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038044u); -#endif - if (psx_delay_BFC20040) { - psx_delay_BFC20040 = 0; - if (psx_taken_BFC20040) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380FCu); - goto label_BFC200FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038048u); - } -label_BFC20048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20048: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038048u); -#endif - /* 0xBFC2004C: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003804Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003804Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20050: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20054: 10410003 beq $v0, $at, 0xBFC20064 */ - uint32_t psx_brA_BFC20054 = cpu->gpr[2]; uint32_t psx_brB_BFC20054 = cpu->gpr[1]; - psx_taken_BFC20054 = (psx_brA_BFC20054 == psx_brB_BFC20054); - psx_delay_BFC20054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20058: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80038058u); -#endif - if (psx_delay_BFC20054) { - psx_delay_BFC20054 = 0; - if (psx_taken_BFC20054) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038064u); - goto label_BFC20064; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003805Cu); - } -label_BFC2005C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2005Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2005Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003805Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2005C: 14410018 bne $v0, $at, 0xBFC200C0 */ - uint32_t psx_brA_BFC2005C = cpu->gpr[2]; uint32_t psx_brB_BFC2005C = cpu->gpr[1]; - psx_taken_BFC2005C = (psx_brA_BFC2005C != psx_brB_BFC2005C); - psx_delay_BFC2005C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038060u); -#endif - if (psx_delay_BFC2005C) { - psx_delay_BFC2005C = 0; - if (psx_taken_BFC2005C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380C0u); - goto label_BFC200C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038064u); - } -label_BFC20064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC20064: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038064u); -#endif - /* 0xBFC20068: 8F39D0F4 lw $t9, -12044($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -12044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-12044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038068u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39D0F4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80038068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2006C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003806Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC20070: AC399EB8 sw $t9, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038070u); return; } g_debug_last_store_pc = 0x80038070u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399EB8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80038070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC20074: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20078: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2007C: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80038084u; /* jal link before delay slot */ - psx_delay_BFC2007C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC20080: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038080u); return; } g_debug_last_store_pc = 0x80038080u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038080u); -#endif - if (psx_delay_BFC2007C) { - psx_delay_BFC2007C = 0; - cpu->gpr[31] = 0x80038084u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC20084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20084: 1440000A bne $v0, $zero, 0xBFC200B0 */ - uint32_t psx_brA_BFC20084 = cpu->gpr[2]; uint32_t psx_brB_BFC20084 = cpu->gpr[0]; - psx_taken_BFC20084 = (psx_brA_BFC20084 != psx_brB_BFC20084); - psx_delay_BFC20084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038088u); -#endif - if (psx_delay_BFC20084) { - psx_delay_BFC20084 = 0; - if (psx_taken_BFC20084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380B0u); - goto label_BFC200B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003808Cu); - } -label_BFC2008C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2008Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2008Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003808Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2008C: 0C00CFD1 jal 0xB0033F44 */ - cpu->gpr[31] = 0x80038094u; /* jal link before delay slot */ - psx_delay_BFC2008C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20090: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038090u); -#endif - if (psx_delay_BFC2008C) { - psx_delay_BFC2008C = 0; - cpu->gpr[31] = 0x80038094u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033F44u); - cpu->pc = 0x80033F44u; return; - } -label_BFC20094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC20094: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038094u); -#endif - /* 0xBFC20098: 8D08D0F4 lw $t0, -12044($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -12044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-12044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038098u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08D0F4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80038098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2009C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003809Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC200A0: AC289EB8 sw $t0, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380A0u); return; } g_debug_last_store_pc = 0x800380A0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289EB8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800380A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC200A4: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800380A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC200A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800380A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC200AC: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380ACu); return; } g_debug_last_store_pc = 0x800380ACu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800380ACu); -#endif -label_BFC200B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC200B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC200B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC200B0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800380B0u); -#endif - /* 0xBFC200B4: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800380B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC200B8: 10000081 beq $zero, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC200B8 = cpu->gpr[0]; uint32_t psx_brB_BFC200B8 = cpu->gpr[0]; - psx_taken_BFC200B8 = (psx_brA_BFC200B8 == psx_brB_BFC200B8); - psx_delay_BFC200B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC200BC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800380BCu); -#endif - if (psx_delay_BFC200B8) { - psx_delay_BFC200B8 = 0; - if (psx_taken_BFC200B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380C0u); - } -label_BFC200C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC200C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC200C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC200C0: 1450007F bne $v0, $s0, 0xBFC202C0 */ - uint32_t psx_brA_BFC200C0 = cpu->gpr[2]; uint32_t psx_brB_BFC200C0 = cpu->gpr[16]; - psx_taken_BFC200C0 = (psx_brA_BFC200C0 != psx_brB_BFC200C0); - psx_delay_BFC200C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC200C4: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800380C4u); -#endif - if (psx_delay_BFC200C0) { - psx_delay_BFC200C0 = 0; - if (psx_taken_BFC200C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380C8u); - } -label_BFC200C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC200C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC200C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC200C8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800380C8u); -#endif - /* 0xBFC200CC: 8D299E40 lw $t1, -25024($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380CCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E40u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800380CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC200D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800380D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC200D4: 1120007A beq $t1, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC200D4 = cpu->gpr[9]; uint32_t psx_brB_BFC200D4 = cpu->gpr[0]; - psx_taken_BFC200D4 = (psx_brA_BFC200D4 == psx_brB_BFC200D4); - psx_delay_BFC200D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC200D8: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800380D8u); -#endif - if (psx_delay_BFC200D4) { - psx_delay_BFC200D4 = 0; - if (psx_taken_BFC200D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380DCu); - } -label_BFC200DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC200DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC200DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC200DC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800380DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380E0u); -#endif - /* 0xBFC200E0: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800380E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC200E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800380E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC200E8: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800380E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC200EC: 00AA5821 addu $t3, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[5] + cpu->gpr[10]; - PGXP_ALU(0x00AA5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800380ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380F0u); -#endif - /* 0xBFC200F0: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380F0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800380F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC200F4: 10000071 beq $zero, $zero, 0xBFC202BC */ - uint32_t psx_brA_BFC200F4 = cpu->gpr[0]; uint32_t psx_brB_BFC200F4 = cpu->gpr[0]; - psx_taken_BFC200F4 = (psx_brA_BFC200F4 == psx_brB_BFC200F4); - psx_delay_BFC200F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC200F8: AC2C9EB8 sw $t4, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800380F8u); return; } g_debug_last_store_pc = 0x800380F8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9EB8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800380F8u); -#endif - if (psx_delay_BFC200F4) { - psx_delay_BFC200F4 = 0; - if (psx_taken_BFC200F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382BCu); - goto label_BFC202BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800380FCu); - } -label_BFC200FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC200FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC200FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800380FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC200FC: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80038104u; /* jal link before delay slot */ - psx_delay_BFC200FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038100u); -#endif - if (psx_delay_BFC200FC) { - psx_delay_BFC200FC = 0; - cpu->gpr[31] = 0x80038104u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC20104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC20104: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20108: 10400027 beq $v0, $zero, 0xBFC201A8 */ - uint32_t psx_brA_BFC20108 = cpu->gpr[2]; uint32_t psx_brB_BFC20108 = cpu->gpr[0]; - psx_taken_BFC20108 = (psx_brA_BFC20108 == psx_brB_BFC20108); - psx_delay_BFC20108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2010C: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003810Cu); -#endif - if (psx_delay_BFC20108) { - psx_delay_BFC20108 = 0; - if (psx_taken_BFC20108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381A8u); - goto label_BFC201A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038110u); - } -label_BFC20110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20110: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038110u); -#endif - /* 0xBFC20114: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038114u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20118: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2011C: 10410003 beq $v0, $at, 0xBFC2012C */ - uint32_t psx_brA_BFC2011C = cpu->gpr[2]; uint32_t psx_brB_BFC2011C = cpu->gpr[1]; - psx_taken_BFC2011C = (psx_brA_BFC2011C == psx_brB_BFC2011C); - psx_delay_BFC2011C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20120: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80038120u); -#endif - if (psx_delay_BFC2011C) { - psx_delay_BFC2011C = 0; - if (psx_taken_BFC2011C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003812Cu); - goto label_BFC2012C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038124u); - } -label_BFC20124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20124: 14410011 bne $v0, $at, 0xBFC2016C */ - uint32_t psx_brA_BFC20124 = cpu->gpr[2]; uint32_t psx_brB_BFC20124 = cpu->gpr[1]; - psx_taken_BFC20124 = (psx_brA_BFC20124 != psx_brB_BFC20124); - psx_delay_BFC20124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20128: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038128u); -#endif - if (psx_delay_BFC20124) { - psx_delay_BFC20124 = 0; - if (psx_taken_BFC20124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003816Cu); - goto label_BFC2016C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003812Cu); - } -label_BFC2012C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2012Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2012Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003812Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2012C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003812Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038130u); -#endif - /* 0xBFC20130: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038130u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC20138: 14600005 bne $v1, $zero, 0xBFC20150 */ - uint32_t psx_brA_BFC20138 = cpu->gpr[3]; uint32_t psx_brB_BFC20138 = cpu->gpr[0]; - psx_taken_BFC20138 = (psx_brA_BFC20138 != psx_brB_BFC20138); - psx_delay_BFC20138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2013C: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003813Cu); -#endif - if (psx_delay_BFC20138) { - psx_delay_BFC20138 = 0; - if (psx_taken_BFC20138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038150u); - goto label_BFC20150; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038140u); - } -label_BFC20140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC20140: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038140u); -#endif - /* 0xBFC20144: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2014C: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003814Cu); -#endif -label_BFC20150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6020u); -#endif - /* 0xBFC20150: 00AD7021 addu $t6, $a1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[5] + cpu->gpr[13]; - PGXP_ALU(0x00AD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038150u); -#endif - /* 0xBFC20154: 8DCF0000 lw $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038154u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20158: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2015C: AC2F9EB8 sw $t7, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003815Cu); return; } g_debug_last_store_pc = 0x8003815Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9EB8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20160: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20164: 10000055 beq $zero, $zero, 0xBFC202BC */ - uint32_t psx_brA_BFC20164 = cpu->gpr[0]; uint32_t psx_brB_BFC20164 = cpu->gpr[0]; - psx_taken_BFC20164 = (psx_brA_BFC20164 == psx_brB_BFC20164); - psx_delay_BFC20164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC20168: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038168u); return; } g_debug_last_store_pc = 0x80038168u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038168u); -#endif - if (psx_delay_BFC20164) { - psx_delay_BFC20164 = 0; - if (psx_taken_BFC20164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382BCu); - goto label_BFC202BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003816Cu); - } -label_BFC2016C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2016Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2016Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003816Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2016C: 14500054 bne $v0, $s0, 0xBFC202C0 */ - uint32_t psx_brA_BFC2016C = cpu->gpr[2]; uint32_t psx_brB_BFC2016C = cpu->gpr[16]; - psx_taken_BFC2016C = (psx_brA_BFC2016C != psx_brB_BFC2016C); - psx_delay_BFC2016C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20170: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038170u); -#endif - if (psx_delay_BFC2016C) { - psx_delay_BFC2016C = 0; - if (psx_taken_BFC2016C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038174u); - } -label_BFC20174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC20174: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038174u); -#endif - /* 0xBFC20178: 8F189E40 lw $t8, -25024($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038178u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2017C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003817Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC20180: 1300004F beq $t8, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC20180 = cpu->gpr[24]; uint32_t psx_brB_BFC20180 = cpu->gpr[0]; - psx_taken_BFC20180 = (psx_brA_BFC20180 == psx_brB_BFC20180); - psx_delay_BFC20180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20184: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038184u); -#endif - if (psx_delay_BFC20180) { - psx_delay_BFC20180 = 0; - if (psx_taken_BFC20180) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038188u); - } -label_BFC20188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC20188: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038188u); -#endif - /* 0xBFC2018C: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003818Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003818Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20190: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC20194: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000120u); -#endif - /* 0xBFC20198: 00B94021 addu $t0, $a1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[25]; - PGXP_ALU(0x00B94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038198u); -#endif - /* 0xBFC2019C: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003819Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC201A0: 10000046 beq $zero, $zero, 0xBFC202BC */ - uint32_t psx_brA_BFC201A0 = cpu->gpr[0]; uint32_t psx_brB_BFC201A0 = cpu->gpr[0]; - psx_taken_BFC201A0 = (psx_brA_BFC201A0 == psx_brB_BFC201A0); - psx_delay_BFC201A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC201A4: AC299EB8 sw $t1, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800381A4u); return; } g_debug_last_store_pc = 0x800381A4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299EB8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800381A4u); -#endif - if (psx_delay_BFC201A0) { - psx_delay_BFC201A0 = 0; - if (psx_taken_BFC201A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382BCu); - goto label_BFC202BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381A8u); - } -label_BFC201A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC201A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC201A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC201A8: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800381A8u); -#endif - /* 0xBFC201AC: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800381ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800381ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC201B0: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800381B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC201B4: 10410003 beq $v0, $at, 0xBFC201C4 */ - uint32_t psx_brA_BFC201B4 = cpu->gpr[2]; uint32_t psx_brB_BFC201B4 = cpu->gpr[1]; - psx_taken_BFC201B4 = (psx_brA_BFC201B4 == psx_brB_BFC201B4); - psx_delay_BFC201B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC201B8: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800381B8u); -#endif - if (psx_delay_BFC201B4) { - psx_delay_BFC201B4 = 0; - if (psx_taken_BFC201B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381C4u); - goto label_BFC201C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381BCu); - } -label_BFC201BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC201BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC201BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC201BC: 14410028 bne $v0, $at, 0xBFC20260 */ - uint32_t psx_brA_BFC201BC = cpu->gpr[2]; uint32_t psx_brB_BFC201BC = cpu->gpr[1]; - psx_taken_BFC201BC = (psx_brA_BFC201BC != psx_brB_BFC201BC); - psx_delay_BFC201BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC201C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800381C0u); -#endif - if (psx_delay_BFC201BC) { - psx_delay_BFC201BC = 0; - if (psx_taken_BFC201BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038260u); - goto label_BFC20260; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381C4u); - } -label_BFC201C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC201C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC201C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC201C4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800381C4u); -#endif - /* 0xBFC201C8: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800381C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800381C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC201CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800381CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC201D0: 14600005 bne $v1, $zero, 0xBFC201E8 */ - uint32_t psx_brA_BFC201D0 = cpu->gpr[3]; uint32_t psx_brB_BFC201D0 = cpu->gpr[0]; - psx_taken_BFC201D0 = (psx_brA_BFC201D0 != psx_brB_BFC201D0); - psx_delay_BFC201D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC201D4: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800381D4u); -#endif - if (psx_delay_BFC201D0) { - psx_delay_BFC201D0 = 0; - if (psx_taken_BFC201D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381E8u); - goto label_BFC201E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800381D8u); - } -label_BFC201D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC201D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC201D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC201D8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800381D8u); -#endif - /* 0xBFC201DC: 90639E70 lbu $v1, -24976($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24976; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-24976)), 3, 0x8u); - PGXP_LOAD(0x90639E70u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800381DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC201E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800381E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC201E4: 00035080 sll $t2, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800381E4u); -#endif -label_BFC201E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC201E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC201E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC201E8: 00AA5821 addu $t3, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[5] + cpu->gpr[10]; - PGXP_ALU(0x00AA5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800381E8u); -#endif - /* 0xBFC201EC: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800381ECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800381ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800381F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC201F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800381F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC201F4: AC2C9EB8 sw $t4, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800381F4u); return; } g_debug_last_store_pc = 0x800381F4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9EB8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800381F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC201F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800381F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC201FC: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80038204u; /* jal link before delay slot */ - psx_delay_BFC201FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC20200: AC239E5C sw $v1, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038200u); return; } g_debug_last_store_pc = 0x80038200u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038200u); -#endif - if (psx_delay_BFC201FC) { - psx_delay_BFC201FC = 0; - cpu->gpr[31] = 0x80038204u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC20204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20204: 14400012 bne $v0, $zero, 0xBFC20250 */ - uint32_t psx_brA_BFC20204 = cpu->gpr[2]; uint32_t psx_brB_BFC20204 = cpu->gpr[0]; - psx_taken_BFC20204 = (psx_brA_BFC20204 != psx_brB_BFC20204); - psx_delay_BFC20204 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20208: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038208u); -#endif - if (psx_delay_BFC20204) { - psx_delay_BFC20204 = 0; - if (psx_taken_BFC20204) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038250u); - goto label_BFC20250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003820Cu); - } -label_BFC2020C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2020Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2020Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003820Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2020C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003820Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20210: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038210u); -#endif - /* 0xBFC20214: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038214u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038214u); -#endif - /* 0xBFC20218: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2021C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003821Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC20220: 0043082A slt $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20224: 1020000A beq $at, $zero, 0xBFC20250 */ - uint32_t psx_brA_BFC20224 = cpu->gpr[1]; uint32_t psx_brB_BFC20224 = cpu->gpr[0]; - psx_taken_BFC20224 = (psx_brA_BFC20224 == psx_brB_BFC20224); - psx_delay_BFC20224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC20228: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038228u); -#endif - if (psx_delay_BFC20224) { - psx_delay_BFC20224 = 0; - if (psx_taken_BFC20224) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038250u); - goto label_BFC20250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003822Cu); - } -label_BFC2022C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2022Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2022Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003822Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2022C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003822Cu); -#endif -label_BFC20230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20230: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80038238u; /* jal link before delay slot */ - psx_delay_BFC20230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC20234: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80038234u); -#endif - if (psx_delay_BFC20230) { - psx_delay_BFC20230 = 0; - cpu->gpr[31] = 0x80038238u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC20238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC20238: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038238u); -#endif - /* 0xBFC2023C: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003823Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003823Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20240: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000Au); -#endif - /* 0xBFC20244: 0203082A slt $at, $s0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0203082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20248: 1420FFF9 bne $at, $zero, 0xBFC20230 */ - uint32_t psx_brA_BFC20248 = cpu->gpr[1]; uint32_t psx_brB_BFC20248 = cpu->gpr[0]; - psx_taken_BFC20248 = (psx_brA_BFC20248 != psx_brB_BFC20248); - psx_delay_BFC20248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2024C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003824Cu); -#endif - if (psx_delay_BFC20248) { - psx_delay_BFC20248 = 0; - if (psx_taken_BFC20248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038230u); - goto label_BFC20230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038250u); - } -label_BFC20250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20250: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038250u); -#endif - /* 0xBFC20254: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038254u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20258: 10000019 beq $zero, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC20258 = cpu->gpr[0]; uint32_t psx_brB_BFC20258 = cpu->gpr[0]; - psx_taken_BFC20258 = (psx_brA_BFC20258 == psx_brB_BFC20258); - psx_delay_BFC20258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2025C: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003825Cu); -#endif - if (psx_delay_BFC20258) { - psx_delay_BFC20258 = 0; - if (psx_taken_BFC20258) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038260u); - } -label_BFC20260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC20260: 14500017 bne $v0, $s0, 0xBFC202C0 */ - uint32_t psx_brA_BFC20260 = cpu->gpr[2]; uint32_t psx_brB_BFC20260 = cpu->gpr[16]; - psx_taken_BFC20260 = (psx_brA_BFC20260 != psx_brB_BFC20260); - psx_delay_BFC20260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20264: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038264u); -#endif - if (psx_delay_BFC20260) { - psx_delay_BFC20260 = 0; - if (psx_taken_BFC20260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038268u); - } -label_BFC20268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC20268: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038268u); -#endif - /* 0xBFC2026C: 8DAD9E40 lw $t5, -25024($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003826Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E40u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003826Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20270: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC20274: 11A00012 beq $t5, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC20274 = cpu->gpr[13]; uint32_t psx_brB_BFC20274 = cpu->gpr[0]; - psx_taken_BFC20274 = (psx_brA_BFC20274 == psx_brB_BFC20274); - psx_delay_BFC20274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20278: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038278u); -#endif - if (psx_delay_BFC20274) { - psx_delay_BFC20274 = 0; - if (psx_taken_BFC20274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003827Cu); - } -label_BFC2027C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2027Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2027Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2027C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003827Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038280u); -#endif - /* 0xBFC20280: 8C639E5C lw $v1, -24996($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038280u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639E5Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80038280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20284: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC20288: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2028C: 00AE7821 addu $t7, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[14]; - PGXP_ALU(0x00AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003828Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038290u); -#endif - /* 0xBFC20290: 8DF80000 lw $t8, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038290u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20294: 10000009 beq $zero, $zero, 0xBFC202BC */ - uint32_t psx_brA_BFC20294 = cpu->gpr[0]; uint32_t psx_brB_BFC20294 = cpu->gpr[0]; - psx_taken_BFC20294 = (psx_brA_BFC20294 == psx_brB_BFC20294); - psx_delay_BFC20294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC20298: AC389EB8 sw $t8, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038298u); return; } g_debug_last_store_pc = 0x80038298u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389EB8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038298u); -#endif - if (psx_delay_BFC20294) { - psx_delay_BFC20294 = 0; - if (psx_taken_BFC20294) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382BCu); - goto label_BFC202BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003829Cu); - } -label_BFC2029C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2029Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2029Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003829Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2029C: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003829Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382A0u); -#endif - /* 0xBFC202A0: 8F396954 lw $t9, 26964($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 26964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (26964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382A0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396954u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800382A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC202A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800382A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC202A8: 13200005 beq $t9, $zero, 0xBFC202C0 */ - uint32_t psx_brA_BFC202A8 = cpu->gpr[25]; uint32_t psx_brB_BFC202A8 = cpu->gpr[0]; - psx_taken_BFC202A8 = (psx_brA_BFC202A8 == psx_brB_BFC202A8); - psx_delay_BFC202A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202AC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800382ACu); -#endif - if (psx_delay_BFC202A8) { - psx_delay_BFC202A8 = 0; - if (psx_taken_BFC202A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C0u); - goto label_BFC202C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382B0u); - } -label_BFC202B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC202B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC202B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC202B0: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800382B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC202B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC202B8: AC28695C sw $t0, 26972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382B8u); return; } g_debug_last_store_pc = 0x800382B8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28695Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800382B8u); -#endif -label_BFC202BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC202BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC202BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202BC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800382BCu); -#endif -label_BFC202C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC202C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC202C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC202C0: 14410003 bne $v0, $at, 0xBFC202D0 */ - uint32_t psx_brA_BFC202C0 = cpu->gpr[2]; uint32_t psx_brB_BFC202C0 = cpu->gpr[1]; - psx_taken_BFC202C0 = (psx_brA_BFC202C0 != psx_brB_BFC202C0); - psx_delay_BFC202C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC202C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800382C4u); -#endif - if (psx_delay_BFC202C0) { - psx_delay_BFC202C0 = 0; - if (psx_taken_BFC202C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382D0u); - goto label_BFC202D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800382C8u); - } -label_BFC202C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC202C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC202C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC202C8: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x800382D0u; /* jal link before delay slot */ - psx_delay_BFC202C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC202CC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800382CCu); -#endif - if (psx_delay_BFC202C8) { - psx_delay_BFC202C8 = 0; - cpu->gpr[31] = 0x800382D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC202D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC202D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC202D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC202D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202D4: AC209E48 sw $zero, -25016($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25016)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382D4u); return; } g_debug_last_store_pc = 0x800382D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800382D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC202D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202DC: AC209E44 sw $zero, -25020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382DCu); return; } g_debug_last_store_pc = 0x800382DCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E44u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800382DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC202E0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC202E4: 24090033 addiu $t1, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24090033u, cpu->gpr[9], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800382E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC202E8: AC299E4C sw $t1, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382E8u); return; } g_debug_last_store_pc = 0x800382E8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E4Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800382E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC202EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800382F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC202F0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800382F0u); -#endif - /* 0xBFC202F4: 8D4A9EB8 lw $t2, -24904($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24904; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382F4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9EB8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800382F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202F8: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800382F8u); return; } g_debug_last_store_pc = 0x800382F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800382F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC202FC: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800382FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC20300: 0141001A div $t2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[10]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0141001Au, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80038300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20304: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038304u); -#endif - /* 0xBFC20308: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038308u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2030C: 240F0014 addiu $t7, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x240F0014u, cpu->gpr[15], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8003830Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038310u); -#endif - /* 0xBFC20310: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038310u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20314: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC20318: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2031C: 000B6100 sll $t4, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003831Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC20320: 00006810 mfhi $t5 */ - cpu->gpr[13] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006810u, cpu->gpr[13], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC20324: 018D7025 or $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] | cpu->gpr[13]; - PGXP_ALU(0x018D7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC20328: AC2E9EB8 sw $t6, -24904($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038328u); return; } g_debug_last_store_pc = 0x80038328u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9EB8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2032C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20330: 03E00008 jr $ra */ - psx_delay_BFC20330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20334: AC2F6944 sw $t7, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038334u); return; } g_debug_last_store_pc = 0x80038334u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6944u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038334u); -#endif - if (psx_delay_BFC20330) { - psx_delay_BFC20330 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20338(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20338u); - int psx_delay_BFC20340 = 0; - int psx_delay_BFC20348 = 0; - int psx_taken_BFC20348 = 0; - int psx_delay_BFC2035C = 0; - int psx_taken_BFC2035C = 0; - int psx_delay_BFC20370 = 0; - int psx_taken_BFC20370 = 0; - int psx_delay_BFC20378 = 0; - int psx_taken_BFC20378 = 0; - int psx_delay_BFC2038C = 0; - int psx_taken_BFC2038C = 0; - int psx_delay_BFC20394 = 0; - int psx_delay_BFC203A0 = 0; - int psx_taken_BFC203A0 = 0; - int psx_delay_BFC203B4 = 0; - int psx_taken_BFC203B4 = 0; - int psx_delay_BFC203BC = 0; - int psx_delay_BFC203C8 = 0; - int psx_delay_BFC203D0 = 0; - int psx_taken_BFC203D0 = 0; - int psx_delay_BFC203DC = 0; - int psx_delay_BFC203E8 = 0; - int psx_taken_BFC203E8 = 0; - int psx_delay_BFC20408 = 0; - int psx_delay_BFC20414 = 0; - int psx_delay_BFC20420 = 0; - int psx_taken_BFC20420 = 0; - int psx_delay_BFC20434 = 0; - int psx_taken_BFC20434 = 0; - int psx_delay_BFC20448 = 0; - int psx_taken_BFC20448 = 0; - int psx_delay_BFC2045C = 0; - int psx_delay_BFC20464 = 0; - int psx_taken_BFC20464 = 0; - int psx_delay_BFC20484 = 0; - int psx_delay_BFC20494 = 0; - int psx_taken_BFC20494 = 0; - int psx_delay_BFC2049C = 0; - int psx_delay_BFC204A4 = 0; - int psx_taken_BFC204A4 = 0; - int psx_delay_BFC204B8 = 0; - int psx_taken_BFC204B8 = 0; - int psx_delay_BFC204CC = 0; - int psx_delay_BFC204D4 = 0; - int psx_taken_BFC204D4 = 0; - int psx_delay_BFC204F4 = 0; - int psx_taken_BFC204F4 = 0; - int psx_delay_BFC20508 = 0; - int psx_taken_BFC20508 = 0; - int psx_delay_BFC20520 = 0; - int psx_taken_BFC20520 = 0; - int psx_delay_BFC20534 = 0; - int psx_taken_BFC20534 = 0; - int psx_delay_BFC20550 = 0; - int psx_delay_BFC20558 = 0; - int psx_taken_BFC20558 = 0; - int psx_delay_BFC20578 = 0; - int psx_delay_BFC20588 = 0; - int psx_taken_BFC20588 = 0; - int psx_delay_BFC2059C = 0; - int psx_taken_BFC2059C = 0; - int psx_delay_BFC205B0 = 0; - int psx_taken_BFC205B0 = 0; - int psx_delay_BFC205B8 = 0; - int psx_taken_BFC205B8 = 0; - int psx_delay_BFC205D8 = 0; - int psx_taken_BFC205D8 = 0; - int psx_delay_BFC205E0 = 0; - int psx_delay_BFC205E8 = 0; - int psx_taken_BFC205E8 = 0; - int psx_delay_BFC205F0 = 0; - int psx_delay_BFC205F8 = 0; - int psx_taken_BFC205F8 = 0; - int psx_delay_BFC20600 = 0; - int psx_delay_BFC20608 = 0; - int psx_delay_BFC20610 = 0; - int psx_taken_BFC20610 = 0; - int psx_delay_BFC20624 = 0; - int psx_taken_BFC20624 = 0; - int psx_delay_BFC2062C = 0; - int psx_delay_BFC20634 = 0; - int psx_taken_BFC20634 = 0; - int psx_delay_BFC20648 = 0; - int psx_taken_BFC20648 = 0; - int psx_delay_BFC20668 = 0; - int psx_delay_BFC20694 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20348u: goto label_BFC20348; - case 0xBFC20350u: goto label_BFC20350; - case 0xBFC20364u: goto label_BFC20364; - case 0xBFC20378u: goto label_BFC20378; - case 0xBFC20380u: goto label_BFC20380; - case 0xBFC20394u: goto label_BFC20394; - case 0xBFC2039Cu: goto label_BFC2039C; - case 0xBFC203A8u: goto label_BFC203A8; - case 0xBFC203BCu: goto label_BFC203BC; - case 0xBFC203C4u: goto label_BFC203C4; - case 0xBFC203D0u: goto label_BFC203D0; - case 0xBFC203D8u: goto label_BFC203D8; - case 0xBFC203E4u: goto label_BFC203E4; - case 0xBFC203F0u: goto label_BFC203F0; - case 0xBFC20404u: goto label_BFC20404; - case 0xBFC20410u: goto label_BFC20410; - case 0xBFC2041Cu: goto label_BFC2041C; - case 0xBFC20428u: goto label_BFC20428; - case 0xBFC20430u: goto label_BFC20430; - case 0xBFC2043Cu: goto label_BFC2043C; - case 0xBFC20450u: goto label_BFC20450; - case 0xBFC2045Cu: goto label_BFC2045C; - case 0xBFC20464u: goto label_BFC20464; - case 0xBFC2046Cu: goto label_BFC2046C; - case 0xBFC2048Cu: goto label_BFC2048C; - case 0xBFC20490u: goto label_BFC20490; - case 0xBFC2049Cu: goto label_BFC2049C; - case 0xBFC204A4u: goto label_BFC204A4; - case 0xBFC204ACu: goto label_BFC204AC; - case 0xBFC204C0u: goto label_BFC204C0; - case 0xBFC204D4u: goto label_BFC204D4; - case 0xBFC204DCu: goto label_BFC204DC; - case 0xBFC204FCu: goto label_BFC204FC; - case 0xBFC20510u: goto label_BFC20510; - case 0xBFC20528u: goto label_BFC20528; - case 0xBFC2053Cu: goto label_BFC2053C; - case 0xBFC20550u: goto label_BFC20550; - case 0xBFC20558u: goto label_BFC20558; - case 0xBFC20560u: goto label_BFC20560; - case 0xBFC20580u: goto label_BFC20580; - case 0xBFC20584u: goto label_BFC20584; - case 0xBFC20590u: goto label_BFC20590; - case 0xBFC205A4u: goto label_BFC205A4; - case 0xBFC205B8u: goto label_BFC205B8; - case 0xBFC205C0u: goto label_BFC205C0; - case 0xBFC205CCu: goto label_BFC205CC; - case 0xBFC205E0u: goto label_BFC205E0; - case 0xBFC205E8u: goto label_BFC205E8; - case 0xBFC205F0u: goto label_BFC205F0; - case 0xBFC205F8u: goto label_BFC205F8; - case 0xBFC20600u: goto label_BFC20600; - case 0xBFC20608u: goto label_BFC20608; - case 0xBFC20610u: goto label_BFC20610; - case 0xBFC20618u: goto label_BFC20618; - case 0xBFC2062Cu: goto label_BFC2062C; - case 0xBFC20634u: goto label_BFC20634; - case 0xBFC2063Cu: goto label_BFC2063C; - case 0xBFC20650u: goto label_BFC20650; - case 0xBFC20670u: goto label_BFC20670; - default: break; - } - } -label_BFC20338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20338: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2033C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003833Cu); return; } g_debug_last_store_pc = 0x8003833Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003833Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20340: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x80038348u; /* jal link before delay slot */ - psx_delay_BFC20340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20344: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038344u); -#endif - if (psx_delay_BFC20340) { - psx_delay_BFC20340 = 0; - cpu->gpr[31] = 0x80038348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC20348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20348: 10400054 beq $v0, $zero, 0xBFC2049C */ - uint32_t psx_brA_BFC20348 = cpu->gpr[2]; uint32_t psx_brB_BFC20348 = cpu->gpr[0]; - psx_taken_BFC20348 = (psx_brA_BFC20348 == psx_brB_BFC20348); - psx_delay_BFC20348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2034C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003834Cu); -#endif - if (psx_delay_BFC20348) { - psx_delay_BFC20348 = 0; - if (psx_taken_BFC20348) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003849Cu); - goto label_BFC2049C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038350u); - } -label_BFC20350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC20350: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038350u); -#endif - /* 0xBFC20354: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038354u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20358: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2035C: 19C0009B blez $t6, 0xBFC205CC */ - uint32_t psx_brA_BFC2035C = cpu->gpr[14]; - psx_taken_BFC2035C = ((int32_t)psx_brA_BFC2035C <= 0); - psx_delay_BFC2035C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20360: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038360u); -#endif - if (psx_delay_BFC2035C) { - psx_delay_BFC2035C = 0; - if (psx_taken_BFC2035C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038364u); - } -label_BFC20364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC20364: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038364u); -#endif - /* 0xBFC20368: 8DEF6948 lw $t7, 26952($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038368u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2036C: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003836Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20370: 11E10008 beq $t7, $at, 0xBFC20394 */ - uint32_t psx_brA_BFC20370 = cpu->gpr[15]; uint32_t psx_brB_BFC20370 = cpu->gpr[1]; - psx_taken_BFC20370 = (psx_brA_BFC20370 == psx_brB_BFC20370); - psx_delay_BFC20370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20374: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038374u); -#endif - if (psx_delay_BFC20370) { - psx_delay_BFC20370 = 0; - if (psx_taken_BFC20370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038394u); - goto label_BFC20394; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038378u); - } -label_BFC20378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20378: 11E10038 beq $t7, $at, 0xBFC2045C */ - uint32_t psx_brA_BFC20378 = cpu->gpr[15]; uint32_t psx_brB_BFC20378 = cpu->gpr[1]; - psx_taken_BFC20378 = (psx_brA_BFC20378 == psx_brB_BFC20378); - psx_delay_BFC20378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2037C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003837Cu); -#endif - if (psx_delay_BFC20378) { - psx_delay_BFC20378 = 0; - if (psx_taken_BFC20378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003845Cu); - goto label_BFC2045C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038380u); - } -label_BFC20380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC20380: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038380u); -#endif - /* 0xBFC20384: 8F189E64 lw $t8, -24988($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038384u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E64u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2038C: 17000033 bne $t8, $zero, 0xBFC2045C */ - uint32_t psx_brA_BFC2038C = cpu->gpr[24]; uint32_t psx_brB_BFC2038C = cpu->gpr[0]; - psx_taken_BFC2038C = (psx_brA_BFC2038C != psx_brB_BFC2038C); - psx_delay_BFC2038C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038390u); -#endif - if (psx_delay_BFC2038C) { - psx_delay_BFC2038C = 0; - if (psx_taken_BFC2038C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003845Cu); - goto label_BFC2045C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038394u); - } -label_BFC20394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20394: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x8003839Cu; /* jal link before delay slot */ - psx_delay_BFC20394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038398u); -#endif - if (psx_delay_BFC20394) { - psx_delay_BFC20394 = 0; - cpu->gpr[31] = 0x8003839Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC2039C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2039Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2039Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2039C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC203A0: 14410026 bne $v0, $at, 0xBFC2043C */ - uint32_t psx_brA_BFC203A0 = cpu->gpr[2]; uint32_t psx_brB_BFC203A0 = cpu->gpr[1]; - psx_taken_BFC203A0 = (psx_brA_BFC203A0 != psx_brB_BFC203A0); - psx_delay_BFC203A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC203A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800383A4u); -#endif - if (psx_delay_BFC203A0) { - psx_delay_BFC203A0 = 0; - if (psx_taken_BFC203A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003843Cu); - goto label_BFC2043C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800383A8u); - } -label_BFC203A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC203A8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800383A8u); -#endif - /* 0xBFC203AC: 8F399E5C lw $t9, -24996($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800383ACu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E5Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800383ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC203B0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800383B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC203B4: 17210021 bne $t9, $at, 0xBFC2043C */ - uint32_t psx_brA_BFC203B4 = cpu->gpr[25]; uint32_t psx_brB_BFC203B4 = cpu->gpr[1]; - psx_taken_BFC203B4 = (psx_brA_BFC203B4 != psx_brB_BFC203B4); - psx_delay_BFC203B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC203B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800383B8u); -#endif - if (psx_delay_BFC203B4) { - psx_delay_BFC203B4 = 0; - if (psx_taken_BFC203B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003843Cu); - goto label_BFC2043C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800383BCu); - } -label_BFC203BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC203BC: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800383C4u; /* jal link before delay slot */ - psx_delay_BFC203BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC203C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800383C0u); -#endif - if (psx_delay_BFC203BC) { - psx_delay_BFC203BC = 0; - cpu->gpr[31] = 0x800383C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC203C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC203C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800383C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC203C8: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x800383D0u; /* jal link before delay slot */ - psx_delay_BFC203C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC203CC: AC229E5C sw $v0, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800383CCu); return; } g_debug_last_store_pc = 0x800383CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E5Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800383CCu); -#endif - if (psx_delay_BFC203C8) { - psx_delay_BFC203C8 = 0; - cpu->gpr[31] = 0x800383D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC203D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC203D0: 14400022 bne $v0, $zero, 0xBFC2045C */ - uint32_t psx_brA_BFC203D0 = cpu->gpr[2]; uint32_t psx_brB_BFC203D0 = cpu->gpr[0]; - psx_taken_BFC203D0 = (psx_brA_BFC203D0 != psx_brB_BFC203D0); - psx_delay_BFC203D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC203D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800383D4u); -#endif - if (psx_delay_BFC203D0) { - psx_delay_BFC203D0 = 0; - if (psx_taken_BFC203D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003845Cu); - goto label_BFC2045C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800383D8u); - } -label_BFC203D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC203D8: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800383D8u); return; } g_debug_last_store_pc = 0x800383D8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800383D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC203DC: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800383E4u; /* jal link before delay slot */ - psx_delay_BFC203DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC203E0: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800383E0u); -#endif - if (psx_delay_BFC203DC) { - psx_delay_BFC203DC = 0; - cpu->gpr[31] = 0x800383E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC203E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC203E4: 28410002 slti $at, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0); - PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800383E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC203E8: 14200011 bne $at, $zero, 0xBFC20430 */ - uint32_t psx_brA_BFC203E8 = cpu->gpr[1]; uint32_t psx_brB_BFC203E8 = cpu->gpr[0]; - psx_taken_BFC203E8 = (psx_brA_BFC203E8 != psx_brB_BFC203E8); - psx_delay_BFC203E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC203EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800383ECu); -#endif - if (psx_delay_BFC203E8) { - psx_delay_BFC203E8 = 0; - if (psx_taken_BFC203E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038430u); - goto label_BFC20430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800383F0u); - } -label_BFC203F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC203F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC203F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800383F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC203F0: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800383F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC203F4: 2529D0F0 addiu $t1, $t1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-12048)); - PGXP_ALU(0x2529D0F0u, cpu->gpr[9], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800383F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC203F8: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800383F8u); return; } g_debug_last_store_pc = 0x800383F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800383F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC203FC: 00114080 sll $t0, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800383FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10300u); -#endif - /* 0xBFC20400: 01098021 addu $s0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01098021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038400u); -#endif -label_BFC20404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038404u); -#endif - /* 0xBFC20404: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038404u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20408: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80038410u; /* jal link before delay slot */ - psx_delay_BFC20408 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2040C: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003840Cu); -#endif - if (psx_delay_BFC20408) { - psx_delay_BFC20408 = 0; - cpu->gpr[31] = 0x80038410u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC20410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20410: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20414: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x8003841Cu; /* jal link before delay slot */ - psx_delay_BFC20414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20418: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80038418u); -#endif - if (psx_delay_BFC20414) { - psx_delay_BFC20414 = 0; - cpu->gpr[31] = 0x8003841Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC2041C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2041Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2041Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC2041C: 0222082A slt $at, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20420: 1420FFF8 bne $at, $zero, 0xBFC20404 */ - uint32_t psx_brA_BFC20420 = cpu->gpr[1]; uint32_t psx_brB_BFC20420 = cpu->gpr[0]; - psx_taken_BFC20420 = (psx_brA_BFC20420 != psx_brB_BFC20420); - psx_delay_BFC20420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20424: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038424u); -#endif - if (psx_delay_BFC20420) { - psx_delay_BFC20420 = 0; - if (psx_taken_BFC20420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038404u); - goto label_BFC20404; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038428u); - } -label_BFC20428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038428u); -#endif - /* 0xBFC20428: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038428u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2042C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003842Cu); -#endif -label_BFC20430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038430u); -#endif - /* 0xBFC20430: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038430u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20434: 10000009 beq $zero, $zero, 0xBFC2045C */ - uint32_t psx_brA_BFC20434 = cpu->gpr[0]; uint32_t psx_brB_BFC20434 = cpu->gpr[0]; - psx_taken_BFC20434 = (psx_brA_BFC20434 == psx_brB_BFC20434); - psx_delay_BFC20434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20438: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038438u); -#endif - if (psx_delay_BFC20434) { - psx_delay_BFC20434 = 0; - if (psx_taken_BFC20434) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003845Cu); - goto label_BFC2045C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003843Cu); - } -label_BFC2043C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2043Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2043Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003843Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2043C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003843Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038440u); -#endif - /* 0xBFC20440: 8D4A9E5C lw $t2, -24996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038440u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80038440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20444: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC20448: 11410004 beq $t2, $at, 0xBFC2045C */ - uint32_t psx_brA_BFC20448 = cpu->gpr[10]; uint32_t psx_brB_BFC20448 = cpu->gpr[1]; - psx_taken_BFC20448 = (psx_brA_BFC20448 == psx_brB_BFC20448); - psx_delay_BFC20448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2044C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003844Cu); -#endif - if (psx_delay_BFC20448) { - psx_delay_BFC20448 = 0; - if (psx_taken_BFC20448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003845Cu); - goto label_BFC2045C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038450u); - } -label_BFC20450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC20450: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20454: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC20458: AC2B9E5C sw $t3, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038458u); return; } g_debug_last_store_pc = 0x80038458u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9E5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80038458u); -#endif -label_BFC2045C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2045Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2045C: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80038464u; /* jal link before delay slot */ - psx_delay_BFC2045C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20460: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038460u); -#endif - if (psx_delay_BFC2045C) { - psx_delay_BFC2045C = 0; - cpu->gpr[31] = 0x80038464u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC20464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20464: 1440000A bne $v0, $zero, 0xBFC20490 */ - uint32_t psx_brA_BFC20464 = cpu->gpr[2]; uint32_t psx_brB_BFC20464 = cpu->gpr[0]; - psx_taken_BFC20464 = (psx_brA_BFC20464 != psx_brB_BFC20464); - psx_delay_BFC20464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC20468: 240E0002 addiu $t6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240E0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80038468u); -#endif - if (psx_delay_BFC20464) { - psx_delay_BFC20464 = 0; - if (psx_taken_BFC20464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038490u); - goto label_BFC20490; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003846Cu); - } -label_BFC2046C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2046Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2046Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003846Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2046C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003846Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038470u); -#endif - /* 0xBFC20470: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038470u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80038470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20474: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC20478: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC2047C: 008D2021 addu $a0, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003847Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038480u); -#endif - /* 0xBFC20480: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038480u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20484: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x8003848Cu; /* jal link before delay slot */ - psx_delay_BFC20484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC20488: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80038488u); -#endif - if (psx_delay_BFC20484) { - psx_delay_BFC20484 = 0; - cpu->gpr[31] = 0x8003848Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC2048C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2048Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2048Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003848Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2048C: 240E0002 addiu $t6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240E0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003848Cu); -#endif -label_BFC20490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20490: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20494: 1000004D beq $zero, $zero, 0xBFC205CC */ - uint32_t psx_brA_BFC20494 = cpu->gpr[0]; uint32_t psx_brB_BFC20494 = cpu->gpr[0]; - psx_taken_BFC20494 = (psx_brA_BFC20494 == psx_brB_BFC20494); - psx_delay_BFC20494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC20498: AC2E9E40 sw $t6, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038498u); return; } g_debug_last_store_pc = 0x80038498u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E40u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038498u); -#endif - if (psx_delay_BFC20494) { - psx_delay_BFC20494 = 0; - if (psx_taken_BFC20494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003849Cu); - } -label_BFC2049C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2049Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2049Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003849Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2049C: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x800384A4u; /* jal link before delay slot */ - psx_delay_BFC2049C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384A0u); -#endif - if (psx_delay_BFC2049C) { - psx_delay_BFC2049C = 0; - cpu->gpr[31] = 0x800384A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC204A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC204A4: 1040000D beq $v0, $zero, 0xBFC204DC */ - uint32_t psx_brA_BFC204A4 = cpu->gpr[2]; uint32_t psx_brB_BFC204A4 = cpu->gpr[0]; - psx_taken_BFC204A4 = (psx_brA_BFC204A4 == psx_brB_BFC204A4); - psx_delay_BFC204A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384A8u); -#endif - if (psx_delay_BFC204A4) { - psx_delay_BFC204A4 = 0; - if (psx_taken_BFC204A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800384DCu); - goto label_BFC204DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800384ACu); - } -label_BFC204AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC204AC: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800384ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384B0u); -#endif - /* 0xBFC204B0: 8DEF6948 lw $t7, 26952($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800384B0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6948u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800384B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC204B4: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800384B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC204B8: 15E10044 bne $t7, $at, 0xBFC205CC */ - uint32_t psx_brA_BFC204B8 = cpu->gpr[15]; uint32_t psx_brB_BFC204B8 = cpu->gpr[1]; - psx_taken_BFC204B8 = (psx_brA_BFC204B8 != psx_brB_BFC204B8); - psx_delay_BFC204B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384BCu); -#endif - if (psx_delay_BFC204B8) { - psx_delay_BFC204B8 = 0; - if (psx_taken_BFC204B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800384C0u); - } -label_BFC204C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC204C0: 24180002 addiu $t8, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24180002u, cpu->gpr[24], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800384C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC204C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800384C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC204C8: AC389E40 sw $t8, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800384C8u); return; } g_debug_last_store_pc = 0x800384C8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800384C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC204CC: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x800384D4u; /* jal link before delay slot */ - psx_delay_BFC204CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC204D0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800384D0u); -#endif - if (psx_delay_BFC204CC) { - psx_delay_BFC204CC = 0; - cpu->gpr[31] = 0x800384D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC204D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204D4: 1000003D beq $zero, $zero, 0xBFC205CC */ - uint32_t psx_brA_BFC204D4 = cpu->gpr[0]; uint32_t psx_brB_BFC204D4 = cpu->gpr[0]; - psx_taken_BFC204D4 = (psx_brA_BFC204D4 == psx_brB_BFC204D4); - psx_delay_BFC204D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384D8u); -#endif - if (psx_delay_BFC204D4) { - psx_delay_BFC204D4 = 0; - if (psx_taken_BFC204D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800384DCu); - } -label_BFC204DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC204DC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800384DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC204E0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800384E0u); -#endif - /* 0xBFC204E4: 90429E70 lbu $v0, -24976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24976; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24976)), 2, 0x4u); - PGXP_LOAD(0x90429E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800384E4u); -#endif - /* 0xBFC204E8: 8F399E5C lw $t9, -24996($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800384E8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E5Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800384E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC204F0: 0059082B sltu $at, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0059082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800384F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC204F4: 10200026 beq $at, $zero, 0xBFC20590 */ - uint32_t psx_brA_BFC204F4 = cpu->gpr[1]; uint32_t psx_brB_BFC204F4 = cpu->gpr[0]; - psx_taken_BFC204F4 = (psx_brA_BFC204F4 == psx_brB_BFC204F4); - psx_delay_BFC204F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC204F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800384F8u); -#endif - if (psx_delay_BFC204F4) { - psx_delay_BFC204F4 = 0; - if (psx_taken_BFC204F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038590u); - goto label_BFC20590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800384FCu); - } -label_BFC204FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC204FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC204FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800384FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC204FC: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800384FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038500u); -#endif - /* 0xBFC20500: 8D086948 lw $t0, 26952($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038500u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086948u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80038500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20504: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC20508: 15010007 bne $t0, $at, 0xBFC20528 */ - uint32_t psx_brA_BFC20508 = cpu->gpr[8]; uint32_t psx_brB_BFC20508 = cpu->gpr[1]; - psx_taken_BFC20508 = (psx_brA_BFC20508 != psx_brB_BFC20508); - psx_delay_BFC20508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2050C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003850Cu); -#endif - if (psx_delay_BFC20508) { - psx_delay_BFC20508 = 0; - if (psx_taken_BFC20508) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038528u); - goto label_BFC20528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038510u); - } -label_BFC20510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC20510: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038510u); -#endif - /* 0xBFC20514: 8D299E5C lw $t1, -24996($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038514u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80038514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20518: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2051C: 252AFFFF addiu $t2, $t1, -1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (-1)); - PGXP_ALU(0x252AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20520: 1000000B beq $zero, $zero, 0xBFC20550 */ - uint32_t psx_brA_BFC20520 = cpu->gpr[0]; uint32_t psx_brB_BFC20520 = cpu->gpr[0]; - psx_taken_BFC20520 = (psx_brA_BFC20520 == psx_brB_BFC20520); - psx_delay_BFC20520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC20524: AC2A9E5C sw $t2, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038524u); return; } g_debug_last_store_pc = 0x80038524u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80038524u); -#endif - if (psx_delay_BFC20520) { - psx_delay_BFC20520 = 0; - if (psx_taken_BFC20520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038550u); - goto label_BFC20550; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038528u); - } -label_BFC20528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC20528: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038528u); -#endif - /* 0xBFC2052C: 8D6B9E64 lw $t3, -24988($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003852Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E64u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC20534: 15600006 bne $t3, $zero, 0xBFC20550 */ - uint32_t psx_brA_BFC20534 = cpu->gpr[11]; uint32_t psx_brB_BFC20534 = cpu->gpr[0]; - psx_taken_BFC20534 = (psx_brA_BFC20534 != psx_brB_BFC20534); - psx_delay_BFC20534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038538u); -#endif - if (psx_delay_BFC20534) { - psx_delay_BFC20534 = 0; - if (psx_taken_BFC20534) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038550u); - goto label_BFC20550; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003853Cu); - } -label_BFC2053C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2053Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2053Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2053C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038540u); -#endif - /* 0xBFC20540: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038540u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80038540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20544: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC20548: 258DFFFF addiu $t5, $t4, -1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (-1)); - PGXP_ALU(0x258DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2054C: AC2D9E5C sw $t5, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003854Cu); return; } g_debug_last_store_pc = 0x8003854Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003854Cu); -#endif -label_BFC20550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20550: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80038558u; /* jal link before delay slot */ - psx_delay_BFC20550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038554u); -#endif - if (psx_delay_BFC20550) { - psx_delay_BFC20550 = 0; - cpu->gpr[31] = 0x80038558u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC20558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20558: 1440000A bne $v0, $zero, 0xBFC20584 */ - uint32_t psx_brA_BFC20558 = cpu->gpr[2]; uint32_t psx_brB_BFC20558 = cpu->gpr[0]; - psx_taken_BFC20558 = (psx_brA_BFC20558 != psx_brB_BFC20558); - psx_delay_BFC20558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2055C: 24180002 addiu $t8, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24180002u, cpu->gpr[24], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003855Cu); -#endif - if (psx_delay_BFC20558) { - psx_delay_BFC20558 = 0; - if (psx_taken_BFC20558) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038584u); - goto label_BFC20584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038560u); - } -label_BFC20560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC20560: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038560u); -#endif - /* 0xBFC20564: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038564u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20568: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2056C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC20570: 008F2021 addu $a0, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038570u); -#endif - /* 0xBFC20574: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038574u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20578: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80038580u; /* jal link before delay slot */ - psx_delay_BFC20578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2057C: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003857Cu); -#endif - if (psx_delay_BFC20578) { - psx_delay_BFC20578 = 0; - cpu->gpr[31] = 0x80038580u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC20580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC20580: 24180002 addiu $t8, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24180002u, cpu->gpr[24], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80038580u); -#endif -label_BFC20584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20584: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20588: 10000010 beq $zero, $zero, 0xBFC205CC */ - uint32_t psx_brA_BFC20588 = cpu->gpr[0]; uint32_t psx_brB_BFC20588 = cpu->gpr[0]; - psx_taken_BFC20588 = (psx_brA_BFC20588 == psx_brB_BFC20588); - psx_delay_BFC20588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2058C: AC389E40 sw $t8, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003858Cu); return; } g_debug_last_store_pc = 0x8003858Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E40u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003858Cu); -#endif - if (psx_delay_BFC20588) { - psx_delay_BFC20588 = 0; - if (psx_taken_BFC20588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038590u); - } -label_BFC20590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC20590: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038590u); -#endif - /* 0xBFC20594: 8F399E5C lw $t9, -24996($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038594u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E5Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80038594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2059C: 1722000B bne $t9, $v0, 0xBFC205CC */ - uint32_t psx_brA_BFC2059C = cpu->gpr[25]; uint32_t psx_brB_BFC2059C = cpu->gpr[2]; - psx_taken_BFC2059C = (psx_brA_BFC2059C != psx_brB_BFC2059C); - psx_delay_BFC2059C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385A0u); -#endif - if (psx_delay_BFC2059C) { - psx_delay_BFC2059C = 0; - if (psx_taken_BFC2059C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385A4u); - } -label_BFC205A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC205A4: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800385A4u); -#endif - /* 0xBFC205A8: 8D086948 lw $t0, 26952($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800385A8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086948u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800385A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC205AC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800385ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC205B0: 15010003 bne $t0, $at, 0xBFC205C0 */ - uint32_t psx_brA_BFC205B0 = cpu->gpr[8]; uint32_t psx_brB_BFC205B0 = cpu->gpr[1]; - psx_taken_BFC205B0 = (psx_brA_BFC205B0 != psx_brB_BFC205B0); - psx_delay_BFC205B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC205B4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800385B4u); -#endif - if (psx_delay_BFC205B0) { - psx_delay_BFC205B0 = 0; - if (psx_taken_BFC205B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385C0u); - goto label_BFC205C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385B8u); - } -label_BFC205B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205B8: 10000004 beq $zero, $zero, 0xBFC205CC */ - uint32_t psx_brA_BFC205B8 = cpu->gpr[0]; uint32_t psx_brB_BFC205B8 = cpu->gpr[0]; - psx_taken_BFC205B8 = (psx_brA_BFC205B8 == psx_brB_BFC205B8); - psx_delay_BFC205B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC205BC: AC209E5C sw $zero, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800385BCu); return; } g_debug_last_store_pc = 0x800385BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800385BCu); -#endif - if (psx_delay_BFC205B8) { - psx_delay_BFC205B8 = 0; - if (psx_taken_BFC205B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385CCu); - goto label_BFC205CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385C0u); - } -label_BFC205C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC205C0: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800385C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC205C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800385C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC205C8: AC299E40 sw $t1, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800385C8u); return; } g_debug_last_store_pc = 0x800385C8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299E40u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800385C8u); -#endif -label_BFC205CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC205CC: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800385CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385D0u); -#endif - /* 0xBFC205D0: 8D4A6948 lw $t2, 26952($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800385D0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6948u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800385D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC205D4: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800385D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC205D8: 1541000F bne $t2, $at, 0xBFC20618 */ - uint32_t psx_brA_BFC205D8 = cpu->gpr[10]; uint32_t psx_brB_BFC205D8 = cpu->gpr[1]; - psx_taken_BFC205D8 = (psx_brA_BFC205D8 != psx_brB_BFC205D8); - psx_delay_BFC205D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385DCu); -#endif - if (psx_delay_BFC205D8) { - psx_delay_BFC205D8 = 0; - if (psx_taken_BFC205D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038618u); - goto label_BFC20618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385E0u); - } -label_BFC205E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC205E0: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x800385E8u; /* jal link before delay slot */ - psx_delay_BFC205E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385E4u); -#endif - if (psx_delay_BFC205E0) { - psx_delay_BFC205E0 = 0; - cpu->gpr[31] = 0x800385E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC205E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC205E8: 14400021 bne $v0, $zero, 0xBFC20670 */ - uint32_t psx_brA_BFC205E8 = cpu->gpr[2]; uint32_t psx_brB_BFC205E8 = cpu->gpr[0]; - psx_taken_BFC205E8 = (psx_brA_BFC205E8 != psx_brB_BFC205E8); - psx_delay_BFC205E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385ECu); -#endif - if (psx_delay_BFC205E8) { - psx_delay_BFC205E8 = 0; - if (psx_taken_BFC205E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038670u); - goto label_BFC20670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800385F0u); - } -label_BFC205F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC205F0: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x800385F8u; /* jal link before delay slot */ - psx_delay_BFC205F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385F4u); -#endif - if (psx_delay_BFC205F0) { - psx_delay_BFC205F0 = 0; - cpu->gpr[31] = 0x800385F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC205F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC205F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC205F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800385F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC205F8: 1440001D bne $v0, $zero, 0xBFC20670 */ - uint32_t psx_brA_BFC205F8 = cpu->gpr[2]; uint32_t psx_brB_BFC205F8 = cpu->gpr[0]; - psx_taken_BFC205F8 = (psx_brA_BFC205F8 != psx_brB_BFC205F8); - psx_delay_BFC205F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC205FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800385FCu); -#endif - if (psx_delay_BFC205F8) { - psx_delay_BFC205F8 = 0; - if (psx_taken_BFC205F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038670u); - goto label_BFC20670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038600u); - } -label_BFC20600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20600: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x80038608u; /* jal link before delay slot */ - psx_delay_BFC20600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20604: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038604u); -#endif - if (psx_delay_BFC20600) { - psx_delay_BFC20600 = 0; - cpu->gpr[31] = 0x80038608u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC20608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20608: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80038610u; /* jal link before delay slot */ - psx_delay_BFC20608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2060C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003860Cu); -#endif - if (psx_delay_BFC20608) { - psx_delay_BFC20608 = 0; - cpu->gpr[31] = 0x80038610u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC20610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20610: 10000017 beq $zero, $zero, 0xBFC20670 */ - uint32_t psx_brA_BFC20610 = cpu->gpr[0]; uint32_t psx_brB_BFC20610 = cpu->gpr[0]; - psx_taken_BFC20610 = (psx_brA_BFC20610 == psx_brB_BFC20610); - psx_delay_BFC20610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038614u); -#endif - if (psx_delay_BFC20610) { - psx_delay_BFC20610 = 0; - if (psx_taken_BFC20610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038670u); - goto label_BFC20670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038618u); - } -label_BFC20618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC20618: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038618u); -#endif - /* 0xBFC2061C: 8D6B6948 lw $t3, 26952($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003861Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6948u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003861Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20620: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC20624: 15610005 bne $t3, $at, 0xBFC2063C */ - uint32_t psx_brA_BFC20624 = cpu->gpr[11]; uint32_t psx_brB_BFC20624 = cpu->gpr[1]; - psx_taken_BFC20624 = (psx_brA_BFC20624 != psx_brB_BFC20624); - psx_delay_BFC20624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038628u); -#endif - if (psx_delay_BFC20624) { - psx_delay_BFC20624 = 0; - if (psx_taken_BFC20624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003863Cu); - goto label_BFC2063C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003862Cu); - } -label_BFC2062C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2062Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2062Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003862Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2062C: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80038634u; /* jal link before delay slot */ - psx_delay_BFC2062C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20630: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038630u); -#endif - if (psx_delay_BFC2062C) { - psx_delay_BFC2062C = 0; - cpu->gpr[31] = 0x80038634u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC20634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20634: 1000000E beq $zero, $zero, 0xBFC20670 */ - uint32_t psx_brA_BFC20634 = cpu->gpr[0]; uint32_t psx_brB_BFC20634 = cpu->gpr[0]; - psx_taken_BFC20634 = (psx_brA_BFC20634 == psx_brB_BFC20634); - psx_delay_BFC20634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20638: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038638u); -#endif - if (psx_delay_BFC20634) { - psx_delay_BFC20634 = 0; - if (psx_taken_BFC20634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038670u); - goto label_BFC20670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003863Cu); - } -label_BFC2063C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2063Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2063Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2063C: 3C0C8006 lui $t4, 0x8006 */ - cpu->gpr[12] = 0x80060000u; - PGXP_ALU(0x3C0C8006u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038640u); -#endif - /* 0xBFC20640: 8D8C6948 lw $t4, 26952($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038640u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C6948u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80038640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20644: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80038644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC20648: 15810009 bne $t4, $at, 0xBFC20670 */ - uint32_t psx_brA_BFC20648 = cpu->gpr[12]; uint32_t psx_brB_BFC20648 = cpu->gpr[1]; - psx_taken_BFC20648 = (psx_brA_BFC20648 != psx_brB_BFC20648); - psx_delay_BFC20648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2064C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003864Cu); -#endif - if (psx_delay_BFC20648) { - psx_delay_BFC20648 = 0; - if (psx_taken_BFC20648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038670u); - goto label_BFC20670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038650u); - } -label_BFC20650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC20650: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038650u); -#endif - /* 0xBFC20654: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038654u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80038654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20658: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2065C: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003865Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC20660: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038660u); -#endif - /* 0xBFC20664: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038664u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20668: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80038670u; /* jal link before delay slot */ - psx_delay_BFC20668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2066C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003866Cu); -#endif - if (psx_delay_BFC20668) { - psx_delay_BFC20668 = 0; - cpu->gpr[31] = 0x80038670u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC20670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC20670: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038670u); -#endif - /* 0xBFC20674: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038674u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC20678: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2067C: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003867Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC20680: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038680u); -#endif - /* 0xBFC20684: 8F39D0F0 lw $t9, -12048($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038684u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39D0F0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80038684u); -#endif - /* 0xBFC20688: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038688u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2068C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003868Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20690: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80038690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20694: 03E00008 jr $ra */ - psx_delay_BFC20694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC20698: AC399E50 sw $t9, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038698u); return; } g_debug_last_store_pc = 0x80038698u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E50u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80038698u); -#endif - if (psx_delay_BFC20694) { - psx_delay_BFC20694 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2069C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2069Cu); - int psx_delay_BFC206A4 = 0; - int psx_delay_BFC206AC = 0; - int psx_taken_BFC206AC = 0; - int psx_delay_BFC206C0 = 0; - int psx_taken_BFC206C0 = 0; - int psx_delay_BFC206C8 = 0; - int psx_delay_BFC206E0 = 0; - int psx_taken_BFC206E0 = 0; - int psx_delay_BFC206E8 = 0; - int psx_delay_BFC206F4 = 0; - int psx_taken_BFC206F4 = 0; - int psx_delay_BFC206FC = 0; - int psx_delay_BFC20710 = 0; - int psx_taken_BFC20710 = 0; - int psx_delay_BFC20720 = 0; - int psx_delay_BFC20728 = 0; - int psx_taken_BFC20728 = 0; - int psx_delay_BFC20734 = 0; - int psx_delay_BFC2073C = 0; - int psx_taken_BFC2073C = 0; - int psx_delay_BFC2075C = 0; - int psx_delay_BFC20768 = 0; - int psx_delay_BFC20774 = 0; - int psx_taken_BFC20774 = 0; - int psx_delay_BFC20788 = 0; - int psx_taken_BFC20788 = 0; - int psx_delay_BFC20790 = 0; - int psx_delay_BFC207A4 = 0; - int psx_taken_BFC207A4 = 0; - int psx_delay_BFC207C0 = 0; - int psx_delay_BFC207C8 = 0; - int psx_taken_BFC207C8 = 0; - int psx_delay_BFC207D0 = 0; - int psx_delay_BFC207E4 = 0; - int psx_taken_BFC207E4 = 0; - int psx_delay_BFC207F0 = 0; - int psx_delay_BFC207FC = 0; - int psx_taken_BFC207FC = 0; - int psx_delay_BFC2083C = 0; - int psx_taken_BFC2083C = 0; - int psx_delay_BFC2084C = 0; - int psx_taken_BFC2084C = 0; - int psx_delay_BFC20858 = 0; - int psx_delay_BFC20864 = 0; - int psx_taken_BFC20864 = 0; - int psx_delay_BFC2087C = 0; - int psx_taken_BFC2087C = 0; - int psx_delay_BFC208A4 = 0; - int psx_taken_BFC208A4 = 0; - int psx_delay_BFC208AC = 0; - int psx_delay_BFC208D4 = 0; - int psx_taken_BFC208D4 = 0; - int psx_delay_BFC20900 = 0; - int psx_taken_BFC20900 = 0; - int psx_delay_BFC20910 = 0; - int psx_taken_BFC20910 = 0; - int psx_delay_BFC20918 = 0; - int psx_taken_BFC20918 = 0; - int psx_delay_BFC20920 = 0; - int psx_delay_BFC20928 = 0; - int psx_taken_BFC20928 = 0; - int psx_delay_BFC20934 = 0; - int psx_taken_BFC20934 = 0; - int psx_delay_BFC2093C = 0; - int psx_delay_BFC20964 = 0; - int psx_taken_BFC20964 = 0; - int psx_delay_BFC2096C = 0; - int psx_delay_BFC20974 = 0; - int psx_taken_BFC20974 = 0; - int psx_delay_BFC20988 = 0; - int psx_taken_BFC20988 = 0; - int psx_delay_BFC209A8 = 0; - int psx_taken_BFC209A8 = 0; - int psx_delay_BFC209C8 = 0; - int psx_delay_BFC209FC = 0; - int psx_taken_BFC209FC = 0; - int psx_delay_BFC20A14 = 0; - int psx_delay_BFC20A1C = 0; - int psx_taken_BFC20A1C = 0; - int psx_delay_BFC20A28 = 0; - int psx_taken_BFC20A28 = 0; - int psx_delay_BFC20A30 = 0; - int psx_delay_BFC20A38 = 0; - int psx_taken_BFC20A38 = 0; - int psx_delay_BFC20A58 = 0; - int psx_taken_BFC20A58 = 0; - int psx_delay_BFC20A60 = 0; - int psx_delay_BFC20A68 = 0; - int psx_taken_BFC20A68 = 0; - int psx_delay_BFC20A7C = 0; - int psx_taken_BFC20A7C = 0; - int psx_delay_BFC20A94 = 0; - int psx_delay_BFC20AC8 = 0; - int psx_taken_BFC20AC8 = 0; - int psx_delay_BFC20AE0 = 0; - int psx_delay_BFC20AE8 = 0; - int psx_taken_BFC20AE8 = 0; - int psx_delay_BFC20AF4 = 0; - int psx_taken_BFC20AF4 = 0; - int psx_delay_BFC20AFC = 0; - int psx_delay_BFC20B04 = 0; - int psx_delay_BFC20B0C = 0; - int psx_taken_BFC20B0C = 0; - int psx_delay_BFC20B18 = 0; - int psx_taken_BFC20B18 = 0; - int psx_delay_BFC20B20 = 0; - int psx_delay_BFC20B28 = 0; - int psx_delay_BFC20B58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC206ACu: goto label_BFC206AC; - case 0xBFC206B4u: goto label_BFC206B4; - case 0xBFC206C8u: goto label_BFC206C8; - case 0xBFC206D0u: goto label_BFC206D0; - case 0xBFC206E8u: goto label_BFC206E8; - case 0xBFC206F0u: goto label_BFC206F0; - case 0xBFC206FCu: goto label_BFC206FC; - case 0xBFC20704u: goto label_BFC20704; - case 0xBFC20718u: goto label_BFC20718; - case 0xBFC20728u: goto label_BFC20728; - case 0xBFC20730u: goto label_BFC20730; - case 0xBFC2073Cu: goto label_BFC2073C; - case 0xBFC20744u: goto label_BFC20744; - case 0xBFC20758u: goto label_BFC20758; - case 0xBFC20764u: goto label_BFC20764; - case 0xBFC20770u: goto label_BFC20770; - case 0xBFC2077Cu: goto label_BFC2077C; - case 0xBFC20784u: goto label_BFC20784; - case 0xBFC20790u: goto label_BFC20790; - case 0xBFC20798u: goto label_BFC20798; - case 0xBFC207ACu: goto label_BFC207AC; - case 0xBFC207C0u: goto label_BFC207C0; - case 0xBFC207C8u: goto label_BFC207C8; - case 0xBFC207D0u: goto label_BFC207D0; - case 0xBFC207D8u: goto label_BFC207D8; - case 0xBFC207ECu: goto label_BFC207EC; - case 0xBFC207F8u: goto label_BFC207F8; - case 0xBFC20804u: goto label_BFC20804; - case 0xBFC2081Cu: goto label_BFC2081C; - case 0xBFC20844u: goto label_BFC20844; - case 0xBFC20854u: goto label_BFC20854; - case 0xBFC20858u: goto label_BFC20858; - case 0xBFC20860u: goto label_BFC20860; - case 0xBFC2086Cu: goto label_BFC2086C; - case 0xBFC20874u: goto label_BFC20874; - case 0xBFC20878u: goto label_BFC20878; - case 0xBFC20884u: goto label_BFC20884; - case 0xBFC208ACu: goto label_BFC208AC; - case 0xBFC208B4u: goto label_BFC208B4; - case 0xBFC208B8u: goto label_BFC208B8; - case 0xBFC208BCu: goto label_BFC208BC; - case 0xBFC208DCu: goto label_BFC208DC; - case 0xBFC20908u: goto label_BFC20908; - case 0xBFC20918u: goto label_BFC20918; - case 0xBFC20920u: goto label_BFC20920; - case 0xBFC20928u: goto label_BFC20928; - case 0xBFC20930u: goto label_BFC20930; - case 0xBFC20934u: goto label_BFC20934; - case 0xBFC2093Cu: goto label_BFC2093C; - case 0xBFC20944u: goto label_BFC20944; - case 0xBFC2094Cu: goto label_BFC2094C; - case 0xBFC2096Cu: goto label_BFC2096C; - case 0xBFC20974u: goto label_BFC20974; - case 0xBFC2097Cu: goto label_BFC2097C; - case 0xBFC20990u: goto label_BFC20990; - case 0xBFC209B0u: goto label_BFC209B0; - case 0xBFC209D0u: goto label_BFC209D0; - case 0xBFC20A04u: goto label_BFC20A04; - case 0xBFC20A1Cu: goto label_BFC20A1C; - case 0xBFC20A24u: goto label_BFC20A24; - case 0xBFC20A28u: goto label_BFC20A28; - case 0xBFC20A30u: goto label_BFC20A30; - case 0xBFC20A38u: goto label_BFC20A38; - case 0xBFC20A40u: goto label_BFC20A40; - case 0xBFC20A60u: goto label_BFC20A60; - case 0xBFC20A68u: goto label_BFC20A68; - case 0xBFC20A70u: goto label_BFC20A70; - case 0xBFC20A84u: goto label_BFC20A84; - case 0xBFC20A9Cu: goto label_BFC20A9C; - case 0xBFC20AD0u: goto label_BFC20AD0; - case 0xBFC20AE8u: goto label_BFC20AE8; - case 0xBFC20AF0u: goto label_BFC20AF0; - case 0xBFC20AF4u: goto label_BFC20AF4; - case 0xBFC20AFCu: goto label_BFC20AFC; - case 0xBFC20B04u: goto label_BFC20B04; - case 0xBFC20B0Cu: goto label_BFC20B0C; - case 0xBFC20B14u: goto label_BFC20B14; - case 0xBFC20B18u: goto label_BFC20B18; - case 0xBFC20B20u: goto label_BFC20B20; - case 0xBFC20B28u: goto label_BFC20B28; - case 0xBFC20B30u: goto label_BFC20B30; - case 0xBFC20B50u: goto label_BFC20B50; - default: break; - } - } -label_BFC2069C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2069Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2069Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003869Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2069C: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003869Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC206A0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800386A0u); return; } g_debug_last_store_pc = 0x800386A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800386A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC206A4: 0C00D262 jal 0xB0034988 */ - cpu->gpr[31] = 0x800386ACu; /* jal link before delay slot */ - psx_delay_BFC206A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC206A8: AFA00040 sw $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800386A8u); return; } g_debug_last_store_pc = 0x800386A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800386A8u); -#endif - if (psx_delay_BFC206A4) { - psx_delay_BFC206A4 = 0; - cpu->gpr[31] = 0x800386ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034988u); - cpu->pc = 0x80034988u; return; - } -label_BFC206AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC206AC: 104000AF beq $v0, $zero, 0xBFC2096C */ - uint32_t psx_brA_BFC206AC = cpu->gpr[2]; uint32_t psx_brB_BFC206AC = cpu->gpr[0]; - psx_taken_BFC206AC = (psx_brA_BFC206AC == psx_brB_BFC206AC); - psx_delay_BFC206AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386B0u); -#endif - if (psx_delay_BFC206AC) { - psx_delay_BFC206AC = 0; - if (psx_taken_BFC206AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003896Cu); - goto label_BFC2096C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800386B4u); - } -label_BFC206B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC206B4: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800386B4u); -#endif - /* 0xBFC206B8: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800386B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800386B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC206BC: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x800386BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC206C0: 104100A2 beq $v0, $at, 0xBFC2094C */ - uint32_t psx_brA_BFC206C0 = cpu->gpr[2]; uint32_t psx_brB_BFC206C0 = cpu->gpr[1]; - psx_taken_BFC206C0 = (psx_brA_BFC206C0 == psx_brB_BFC206C0); - psx_delay_BFC206C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386C4u); -#endif - if (psx_delay_BFC206C0) { - psx_delay_BFC206C0 = 0; - if (psx_taken_BFC206C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003894Cu); - goto label_BFC2094C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800386C8u); - } -label_BFC206C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC206C8: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800386D0u; /* jal link before delay slot */ - psx_delay_BFC206C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386CCu); -#endif - if (psx_delay_BFC206C8) { - psx_delay_BFC206C8 = 0; - cpu->gpr[31] = 0x800386D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC206D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC206D0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800386D0u); -#endif - /* 0xBFC206D4: 8DCE9E5C lw $t6, -24996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800386D4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800386D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC206DC: 004E082A slt $at, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800386DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC206E0: 1420009A bne $at, $zero, 0xBFC2094C */ - uint32_t psx_brA_BFC206E0 = cpu->gpr[1]; uint32_t psx_brB_BFC206E0 = cpu->gpr[0]; - psx_taken_BFC206E0 = (psx_brA_BFC206E0 != psx_brB_BFC206E0); - psx_delay_BFC206E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386E4u); -#endif - if (psx_delay_BFC206E0) { - psx_delay_BFC206E0 = 0; - if (psx_taken_BFC206E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003894Cu); - goto label_BFC2094C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800386E8u); - } -label_BFC206E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC206E8: 0C00CB89 jal 0xB0032E24 */ - cpu->gpr[31] = 0x800386F0u; /* jal link before delay slot */ - psx_delay_BFC206E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386ECu); -#endif - if (psx_delay_BFC206E8) { - psx_delay_BFC206E8 = 0; - cpu->gpr[31] = 0x800386F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032E24u); - cpu->pc = 0x80032E24u; return; - } -label_BFC206F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC206F0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800386F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC206F4: 14410026 bne $v0, $at, 0xBFC20790 */ - uint32_t psx_brA_BFC206F4 = cpu->gpr[2]; uint32_t psx_brB_BFC206F4 = cpu->gpr[1]; - psx_taken_BFC206F4 = (psx_brA_BFC206F4 != psx_brB_BFC206F4); - psx_delay_BFC206F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC206F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800386F8u); -#endif - if (psx_delay_BFC206F4) { - psx_delay_BFC206F4 = 0; - if (psx_taken_BFC206F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038790u); - goto label_BFC20790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800386FCu); - } -label_BFC206FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC206FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC206FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800386FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC206FC: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80038704u; /* jal link before delay slot */ - psx_delay_BFC206FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20700: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038700u); -#endif - if (psx_delay_BFC206FC) { - psx_delay_BFC206FC = 0; - cpu->gpr[31] = 0x80038704u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC20704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC20704: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038704u); -#endif - /* 0xBFC20708: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038708u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2070C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003870Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC20710: 15E2001F bne $t7, $v0, 0xBFC20790 */ - uint32_t psx_brA_BFC20710 = cpu->gpr[15]; uint32_t psx_brB_BFC20710 = cpu->gpr[2]; - psx_taken_BFC20710 = (psx_brA_BFC20710 != psx_brB_BFC20710); - psx_delay_BFC20710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038714u); -#endif - if (psx_delay_BFC20710) { - psx_delay_BFC20710 = 0; - if (psx_taken_BFC20710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038790u); - goto label_BFC20790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038718u); - } -label_BFC20718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC20718: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2071C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003871Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20720: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80038728u; /* jal link before delay slot */ - psx_delay_BFC20720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC20724: AC389E5C sw $t8, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038724u); return; } g_debug_last_store_pc = 0x80038724u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038724u); -#endif - if (psx_delay_BFC20720) { - psx_delay_BFC20720 = 0; - cpu->gpr[31] = 0x80038728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC20728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20728: 14400025 bne $v0, $zero, 0xBFC207C0 */ - uint32_t psx_brA_BFC20728 = cpu->gpr[2]; uint32_t psx_brB_BFC20728 = cpu->gpr[0]; - psx_taken_BFC20728 = (psx_brA_BFC20728 != psx_brB_BFC20728); - psx_delay_BFC20728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2072C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003872Cu); -#endif - if (psx_delay_BFC20728) { - psx_delay_BFC20728 = 0; - if (psx_taken_BFC20728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387C0u); - goto label_BFC207C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038730u); - } -label_BFC20730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20730: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038730u); return; } g_debug_last_store_pc = 0x80038730u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20734: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x8003873Cu; /* jal link before delay slot */ - psx_delay_BFC20734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC20738: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038738u); -#endif - if (psx_delay_BFC20734) { - psx_delay_BFC20734 = 0; - cpu->gpr[31] = 0x8003873Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC2073C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2073Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003873Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2073C: 18400011 blez $v0, 0xBFC20784 */ - uint32_t psx_brA_BFC2073C = cpu->gpr[2]; - psx_taken_BFC2073C = ((int32_t)psx_brA_BFC2073C <= 0); - psx_delay_BFC2073C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038740u); -#endif - if (psx_delay_BFC2073C) { - psx_delay_BFC2073C = 0; - if (psx_taken_BFC2073C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038784u); - goto label_BFC20784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038744u); - } -label_BFC20744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC20744: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC20748: 2508D0F0 addiu $t0, $t0, -12048 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-12048)); - PGXP_ALU(0x2508D0F0u, cpu->gpr[8], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2074C: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003874Cu); return; } g_debug_last_store_pc = 0x8003874Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003874Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC20750: 0011C880 sll $t9, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010100u); -#endif - /* 0xBFC20754: 03288021 addu $s0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03288021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038754u); -#endif -label_BFC20758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038758u); -#endif - /* 0xBFC20758: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038758u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2075C: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80038764u; /* jal link before delay slot */ - psx_delay_BFC2075C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC20760: 24050028 addiu $a1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24050028u, cpu->gpr[5], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80038760u); -#endif - if (psx_delay_BFC2075C) { - psx_delay_BFC2075C = 0; - cpu->gpr[31] = 0x80038764u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC20764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20764: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20768: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80038770u; /* jal link before delay slot */ - psx_delay_BFC20768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2076C: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003876Cu); -#endif - if (psx_delay_BFC20768) { - psx_delay_BFC20768 = 0; - cpu->gpr[31] = 0x80038770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC20770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC20770: 0051082A slt $at, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20774: 1020FFF8 beq $at, $zero, 0xBFC20758 */ - uint32_t psx_brA_BFC20774 = cpu->gpr[1]; uint32_t psx_brB_BFC20774 = cpu->gpr[0]; - psx_taken_BFC20774 = (psx_brA_BFC20774 == psx_brB_BFC20774); - psx_delay_BFC20774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038778u); -#endif - if (psx_delay_BFC20774) { - psx_delay_BFC20774 = 0; - if (psx_taken_BFC20774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038758u); - goto label_BFC20758; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003877Cu); - } -label_BFC2077C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2077Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003877Cu); -#endif - /* 0xBFC2077C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003877Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003877Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038780u); -#endif -label_BFC20784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038784u); -#endif - /* 0xBFC20784: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038784u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20788: 1000000D beq $zero, $zero, 0xBFC207C0 */ - uint32_t psx_brA_BFC20788 = cpu->gpr[0]; uint32_t psx_brB_BFC20788 = cpu->gpr[0]; - psx_taken_BFC20788 = (psx_brA_BFC20788 == psx_brB_BFC20788); - psx_delay_BFC20788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2078C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003878Cu); -#endif - if (psx_delay_BFC20788) { - psx_delay_BFC20788 = 0; - if (psx_taken_BFC20788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387C0u); - goto label_BFC207C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038790u); - } -label_BFC20790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20790: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80038798u; /* jal link before delay slot */ - psx_delay_BFC20790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038794u); -#endif - if (psx_delay_BFC20790) { - psx_delay_BFC20790 = 0; - cpu->gpr[31] = 0x80038798u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC20798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC20798: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038798u); -#endif - /* 0xBFC2079C: 8D299E5C lw $t1, -24996($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003879Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003879Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC207A4: 11220006 beq $t1, $v0, 0xBFC207C0 */ - uint32_t psx_brA_BFC207A4 = cpu->gpr[9]; uint32_t psx_brB_BFC207A4 = cpu->gpr[2]; - psx_taken_BFC207A4 = (psx_brA_BFC207A4 == psx_brB_BFC207A4); - psx_delay_BFC207A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387A8u); -#endif - if (psx_delay_BFC207A4) { - psx_delay_BFC207A4 = 0; - if (psx_taken_BFC207A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387C0u); - goto label_BFC207C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387ACu); - } -label_BFC207AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC207AC: 252A0001 addiu $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x252A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800387ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC207B0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800387B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC207B4: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800387B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC207B8: AC2A9E5C sw $t2, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800387B8u); return; } g_debug_last_store_pc = 0x800387B8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9E5Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800387B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC207BC: AFAB0040 sw $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800387BCu); return; } g_debug_last_store_pc = 0x800387BCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800387BCu); -#endif -label_BFC207C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC207C0: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x800387C8u; /* jal link before delay slot */ - psx_delay_BFC207C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387C4u); -#endif - if (psx_delay_BFC207C0) { - psx_delay_BFC207C0 = 0; - cpu->gpr[31] = 0x800387C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC207C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC207C8: 1440003C bne $v0, $zero, 0xBFC208BC */ - uint32_t psx_brA_BFC207C8 = cpu->gpr[2]; uint32_t psx_brB_BFC207C8 = cpu->gpr[0]; - psx_taken_BFC207C8 = (psx_brA_BFC207C8 != psx_brB_BFC207C8); - psx_delay_BFC207C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387CCu); -#endif - if (psx_delay_BFC207C8) { - psx_delay_BFC207C8 = 0; - if (psx_taken_BFC207C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388BCu); - goto label_BFC208BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387D0u); - } -label_BFC207D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC207D0: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800387D8u; /* jal link before delay slot */ - psx_delay_BFC207D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387D4u); -#endif - if (psx_delay_BFC207D0) { - psx_delay_BFC207D0 = 0; - cpu->gpr[31] = 0x800387D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC207D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC207D8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800387D8u); -#endif - /* 0xBFC207DC: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800387DCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800387DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC207E0: 244D0001 addiu $t5, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x244D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800387E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC207E4: 118D0035 beq $t4, $t5, 0xBFC208BC */ - uint32_t psx_brA_BFC207E4 = cpu->gpr[12]; uint32_t psx_brB_BFC207E4 = cpu->gpr[13]; - psx_taken_BFC207E4 = (psx_brA_BFC207E4 == psx_brB_BFC207E4); - psx_delay_BFC207E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC207E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800387E8u); -#endif - if (psx_delay_BFC207E4) { - psx_delay_BFC207E4 = 0; - if (psx_taken_BFC207E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388BCu); - goto label_BFC208BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800387ECu); - } -label_BFC207EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC207EC: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800387ECu); return; } g_debug_last_store_pc = 0x800387ECu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800387ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC207F0: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x800387F8u; /* jal link before delay slot */ - psx_delay_BFC207F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21001u); -#endif - /* 0xBFC207F4: 01808821 addu $s1, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800387F4u); -#endif - if (psx_delay_BFC207F0) { - psx_delay_BFC207F0 = 0; - cpu->gpr[31] = 0x800387F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC207F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC207F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC207F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800387F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC207F8: 0051082A slt $at, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800387F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC207FC: 1420001E bne $at, $zero, 0xBFC20878 */ - uint32_t psx_brA_BFC207FC = cpu->gpr[1]; uint32_t psx_brB_BFC207FC = cpu->gpr[0]; - psx_taken_BFC207FC = (psx_brA_BFC207FC != psx_brB_BFC207FC); - psx_delay_BFC207FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038800u); -#endif - /* 0xBFC20800: 8FAB0034 lw $t3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038800u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80038800u); -#endif - if (psx_delay_BFC207FC) { - psx_delay_BFC207FC = 0; - if (psx_taken_BFC207FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038878u); - goto label_BFC20878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038804u); - } -label_BFC20804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC20804: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC20808: 25EFD0F0 addiu $t7, $t7, -12048 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-12048)); - PGXP_ALU(0x25EFD0F0u, cpu->gpr[15], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2080C: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003880Cu); return; } g_debug_last_store_pc = 0x8003880Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003880Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC20810: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC20814: 01CF8021 addu $s0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC20818: AFA00034 sw $zero, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038818u); return; } g_debug_last_store_pc = 0x80038818u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00034u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80038818u); -#endif -label_BFC2081C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2081Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2081Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2081C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038820u); -#endif - /* 0xBFC20820: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038820u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC20824: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC20828: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2082C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003882Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038830u); -#endif - /* 0xBFC20830: 8D08D0EC lw $t0, -12052($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -12052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-12052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038830u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08D0ECu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80038830u); -#endif - /* 0xBFC20834: 8E090000 lw $t1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038834u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80038834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2083C: 15090006 bne $t0, $t1, 0xBFC20858 */ - uint32_t psx_brA_BFC2083C = cpu->gpr[8]; uint32_t psx_brB_BFC2083C = cpu->gpr[9]; - psx_taken_BFC2083C = (psx_brA_BFC2083C != psx_brB_BFC2083C); - psx_delay_BFC2083C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20840: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038840u); -#endif - if (psx_delay_BFC2083C) { - psx_delay_BFC2083C = 0; - if (psx_taken_BFC2083C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038858u); - goto label_BFC20858; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038844u); - } -label_BFC20844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC20844: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038844u); -#endif - /* 0xBFC20848: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038848u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2084C: 10000009 beq $zero, $zero, 0xBFC20874 */ - uint32_t psx_brA_BFC2084C = cpu->gpr[0]; uint32_t psx_brB_BFC2084C = cpu->gpr[0]; - psx_taken_BFC2084C = (psx_brA_BFC2084C == psx_brB_BFC2084C); - psx_delay_BFC2084C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC20850: AFAA0034 sw $t2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038850u); return; } g_debug_last_store_pc = 0x80038850u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80038850u); -#endif - if (psx_delay_BFC2084C) { - psx_delay_BFC2084C = 0; - if (psx_taken_BFC2084C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038874u); - goto label_BFC20874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038854u); - } -label_BFC20854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20854: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038854u); -#endif -label_BFC20858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20858: 0C00D266 jal 0xB0034998 */ - cpu->gpr[31] = 0x80038860u; /* jal link before delay slot */ - psx_delay_BFC20858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2085C: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003885Cu); -#endif - if (psx_delay_BFC20858) { - psx_delay_BFC20858 = 0; - cpu->gpr[31] = 0x80038860u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034998u); - cpu->pc = 0x80034998u; return; - } -label_BFC20860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC20860: 0051082A slt $at, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0051082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20864: 1020FFED beq $at, $zero, 0xBFC2081C */ - uint32_t psx_brA_BFC20864 = cpu->gpr[1]; uint32_t psx_brB_BFC20864 = cpu->gpr[0]; - psx_taken_BFC20864 = (psx_brA_BFC20864 == psx_brB_BFC20864); - psx_delay_BFC20864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038868u); -#endif - if (psx_delay_BFC20864) { - psx_delay_BFC20864 = 0; - if (psx_taken_BFC20864) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003881Cu); - goto label_BFC2081C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003886Cu); - } -label_BFC2086C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2086Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003886Cu); -#endif - /* 0xBFC2086C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003886Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038870u); -#endif -label_BFC20874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038874u); -#endif - /* 0xBFC20874: 8FAB0034 lw $t3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038874u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80038874u); -#endif -label_BFC20878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20878: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2087C: 1560000E bne $t3, $zero, 0xBFC208B8 */ - uint32_t psx_brA_BFC2087C = cpu->gpr[11]; uint32_t psx_brB_BFC2087C = cpu->gpr[0]; - psx_taken_BFC2087C = (psx_brA_BFC2087C != psx_brB_BFC2087C); - psx_delay_BFC2087C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038880u); -#endif - /* 0xBFC20880: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038880u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038880u); -#endif - if (psx_delay_BFC2087C) { - psx_delay_BFC2087C = 0; - if (psx_taken_BFC2087C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388B8u); - goto label_BFC208B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038884u); - } -label_BFC20884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC20884: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038884u); -#endif - /* 0xBFC20888: 8DAD9E5C lw $t5, -24996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038888u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80038888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2088C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003888Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC20890: 000D6080 sll $t4, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC20894: 008C2021 addu $a0, $a0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[12]; - PGXP_ALU(0x008C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038894u); -#endif - /* 0xBFC20898: 8C84D0EC lw $a0, -12052($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038898u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0ECu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2089C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003889Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC208A0: 28810015 slti $at, $a0, 21 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (21) ? 1 : 0); - PGXP_ALU(0x28810015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800388A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC208A4: 10200004 beq $at, $zero, 0xBFC208B8 */ - uint32_t psx_brA_BFC208A4 = cpu->gpr[1]; uint32_t psx_brB_BFC208A4 = cpu->gpr[0]; - psx_taken_BFC208A4 = (psx_brA_BFC208A4 == psx_brB_BFC208A4); - psx_delay_BFC208A4 = 1; - /* 0xBFC208A8: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388A8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800388A8u); -#endif - if (psx_delay_BFC208A4) { - psx_delay_BFC208A4 = 0; - if (psx_taken_BFC208A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388B8u); - goto label_BFC208B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388ACu); - } -label_BFC208AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC208ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC208ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC208AC: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800388B4u; /* jal link before delay slot */ - psx_delay_BFC208AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC208B0: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800388B0u); -#endif - if (psx_delay_BFC208AC) { - psx_delay_BFC208AC = 0; - cpu->gpr[31] = 0x800388B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC208B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC208B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC208B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388B4u); -#endif - /* 0xBFC208B4: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388B4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800388B4u); -#endif -label_BFC208B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC208B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC208B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC208B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800388B8u); -#endif -label_BFC208BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC208BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC208BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC208BC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800388BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC208C0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800388C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC208C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800388C4u); -#endif - /* 0xBFC208C8: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800388C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC208CC: AC2E9E40 sw $t6, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388CCu); return; } g_debug_last_store_pc = 0x800388CCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E40u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800388CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC208D0: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800388D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC208D4: 14410017 bne $v0, $at, 0xBFC20934 */ - uint32_t psx_brA_BFC208D4 = cpu->gpr[2]; uint32_t psx_brB_BFC208D4 = cpu->gpr[1]; - psx_taken_BFC208D4 = (psx_brA_BFC208D4 != psx_brB_BFC208D4); - psx_delay_BFC208D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC208D8: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x800388D8u); -#endif - if (psx_delay_BFC208D4) { - psx_delay_BFC208D4 = 0; - if (psx_taken_BFC208D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038934u); - goto label_BFC20934; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800388DCu); - } -label_BFC208DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC208DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC208DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC208DC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800388DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388E0u); -#endif - /* 0xBFC208E0: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388E0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800388E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC208E4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800388E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC208E8: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800388E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC208EC: 00982021 addu $a0, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x00982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800388ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800388F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC208F0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800388F0u); -#endif - /* 0xBFC208F4: 8F399E50 lw $t9, -25008($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388F4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E50u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800388F4u); -#endif - /* 0xBFC208F8: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800388F8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800388F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC208FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800388FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC20900: 17240007 bne $t9, $a0, 0xBFC20920 */ - uint32_t psx_brA_BFC20900 = cpu->gpr[25]; uint32_t psx_brB_BFC20900 = cpu->gpr[4]; - psx_taken_BFC20900 = (psx_brA_BFC20900 != psx_brB_BFC20900); - psx_delay_BFC20900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038904u); -#endif - if (psx_delay_BFC20900) { - psx_delay_BFC20900 = 0; - if (psx_taken_BFC20900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038920u); - goto label_BFC20920; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038908u); - } -label_BFC20908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038908u); -#endif - /* 0xBFC20908: 8FA80040 lw $t0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038908u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80040u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80038908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2090C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003890Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC20910: 15000003 bne $t0, $zero, 0xBFC20920 */ - uint32_t psx_brA_BFC20910 = cpu->gpr[8]; uint32_t psx_brB_BFC20910 = cpu->gpr[0]; - psx_taken_BFC20910 = (psx_brA_BFC20910 != psx_brB_BFC20910); - psx_delay_BFC20910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20914: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038914u); -#endif - if (psx_delay_BFC20910) { - psx_delay_BFC20910 = 0; - if (psx_taken_BFC20910) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038920u); - goto label_BFC20920; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038918u); - } -label_BFC20918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20918: 1000000C beq $zero, $zero, 0xBFC2094C */ - uint32_t psx_brA_BFC20918 = cpu->gpr[0]; uint32_t psx_brB_BFC20918 = cpu->gpr[0]; - psx_taken_BFC20918 = (psx_brA_BFC20918 == psx_brB_BFC20918); - psx_delay_BFC20918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2091C: AC209E40 sw $zero, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003891Cu); return; } g_debug_last_store_pc = 0x8003891Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003891Cu); -#endif - if (psx_delay_BFC20918) { - psx_delay_BFC20918 = 0; - if (psx_taken_BFC20918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003894Cu); - goto label_BFC2094C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038920u); - } -label_BFC20920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20920: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80038928u; /* jal link before delay slot */ - psx_delay_BFC20920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038924u); -#endif - if (psx_delay_BFC20920) { - psx_delay_BFC20920 = 0; - cpu->gpr[31] = 0x80038928u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC20928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20928: 10000008 beq $zero, $zero, 0xBFC2094C */ - uint32_t psx_brA_BFC20928 = cpu->gpr[0]; uint32_t psx_brB_BFC20928 = cpu->gpr[0]; - psx_taken_BFC20928 = (psx_brA_BFC20928 == psx_brB_BFC20928); - psx_delay_BFC20928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2092C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003892Cu); -#endif - if (psx_delay_BFC20928) { - psx_delay_BFC20928 = 0; - if (psx_taken_BFC20928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003894Cu); - goto label_BFC2094C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038930u); - } -label_BFC20930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20930: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038930u); -#endif -label_BFC20934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20934: 14410005 bne $v0, $at, 0xBFC2094C */ - uint32_t psx_brA_BFC20934 = cpu->gpr[2]; uint32_t psx_brB_BFC20934 = cpu->gpr[1]; - psx_taken_BFC20934 = (psx_brA_BFC20934 != psx_brB_BFC20934); - psx_delay_BFC20934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038938u); -#endif - if (psx_delay_BFC20934) { - psx_delay_BFC20934 = 0; - if (psx_taken_BFC20934) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003894Cu); - goto label_BFC2094C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003893Cu); - } -label_BFC2093C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2093Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2093Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003893Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2093C: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80038944u; /* jal link before delay slot */ - psx_delay_BFC2093C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20940: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038940u); -#endif - if (psx_delay_BFC2093C) { - psx_delay_BFC2093C = 0; - cpu->gpr[31] = 0x80038944u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC20944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20944: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20948: AC209E64 sw $zero, -24988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038948u); return; } g_debug_last_store_pc = 0x80038948u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80038948u); -#endif -label_BFC2094C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2094Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003894Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2094C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003894Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038950u); -#endif - /* 0xBFC20950: 8D299E5C lw $t1, -24996($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038950u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80038950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20954: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC20958: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2095C: 008A2021 addu $a0, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[10]; - PGXP_ALU(0x008A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003895Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038960u); -#endif - /* 0xBFC20960: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038960u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20964: 1000007A beq $zero, $zero, 0xBFC20B50 */ - uint32_t psx_brA_BFC20964 = cpu->gpr[0]; uint32_t psx_brB_BFC20964 = cpu->gpr[0]; - psx_taken_BFC20964 = (psx_brA_BFC20964 == psx_brB_BFC20964); - psx_delay_BFC20964 = 1; - /* 0xBFC20968: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038968u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038968u); -#endif - if (psx_delay_BFC20964) { - psx_delay_BFC20964 = 0; - if (psx_taken_BFC20964) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B50u); - goto label_BFC20B50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003896Cu); - } -label_BFC2096C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2096Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2096Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003896Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2096C: 0C00D25E jal 0xB0034978 */ - cpu->gpr[31] = 0x80038974u; /* jal link before delay slot */ - psx_delay_BFC2096C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038970u); -#endif - if (psx_delay_BFC2096C) { - psx_delay_BFC2096C = 0; - cpu->gpr[31] = 0x80038974u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80034978u); - cpu->pc = 0x80034978u; return; - } -label_BFC20974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20974: 10400032 beq $v0, $zero, 0xBFC20A40 */ - uint32_t psx_brA_BFC20974 = cpu->gpr[2]; uint32_t psx_brB_BFC20974 = cpu->gpr[0]; - psx_taken_BFC20974 = (psx_brA_BFC20974 == psx_brB_BFC20974); - psx_delay_BFC20974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20978: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038978u); -#endif - if (psx_delay_BFC20974) { - psx_delay_BFC20974 = 0; - if (psx_taken_BFC20974) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A40u); - goto label_BFC20A40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003897Cu); - } -label_BFC2097C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2097Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2097C: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038980u); -#endif - /* 0xBFC20980: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038980u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20984: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20988: 10410069 beq $v0, $at, 0xBFC20B30 */ - uint32_t psx_brA_BFC20988 = cpu->gpr[2]; uint32_t psx_brB_BFC20988 = cpu->gpr[1]; - psx_taken_BFC20988 = (psx_brA_BFC20988 == psx_brB_BFC20988); - psx_delay_BFC20988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2098C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003898Cu); -#endif - if (psx_delay_BFC20988) { - psx_delay_BFC20988 = 0; - if (psx_taken_BFC20988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038990u); - } -label_BFC20990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC20990: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC20994: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038994u); -#endif - /* 0xBFC20998: 91AD9E71 lbu $t5, -24975($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24975; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-24975)), 13, 0x2000u); - PGXP_LOAD(0x91AD9E71u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80038998u); -#endif - /* 0xBFC2099C: 8D6B9E5C lw $t3, -24996($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003899Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003899Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC209A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800389A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2802u); -#endif - /* 0xBFC209A4: 016D082B sltu $at, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x016D082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800389A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC209A8: 10200061 beq $at, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC209A8 = cpu->gpr[1]; uint32_t psx_brB_BFC209A8 = cpu->gpr[0]; - psx_taken_BFC209A8 = (psx_brA_BFC209A8 == psx_brB_BFC209A8); - psx_delay_BFC209A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC209AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800389ACu); -#endif - if (psx_delay_BFC209A8) { - psx_delay_BFC209A8 = 0; - if (psx_taken_BFC209A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800389B0u); - } -label_BFC209B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC209B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC209B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC209B0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389B0u); -#endif - /* 0xBFC209B4: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389B4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800389B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC209B8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC209BC: 000C7080 sll $t6, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800389BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC209C0: 008E2021 addu $a0, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800389C0u); -#endif - /* 0xBFC209C4: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800389C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC209C8: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x800389D0u; /* jal link before delay slot */ - psx_delay_BFC209C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC209CC: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800389CCu); -#endif - if (psx_delay_BFC209C8) { - psx_delay_BFC209C8 = 0; - cpu->gpr[31] = 0x800389D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC209D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC209D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC209D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC209D0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389D0u); -#endif - /* 0xBFC209D4: 8DEF9E5C lw $t7, -24996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389D4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800389D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC209D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC209DC: 25F80001 addiu $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (1)); - PGXP_ALU(0x25F80001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800389DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC209E0: AC389E5C sw $t8, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389E0u); return; } g_debug_last_store_pc = 0x800389E0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800389E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC209E4: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC209E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800389E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC209EC: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800389ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800389F0u); -#endif - /* 0xBFC209F0: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800389F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC209F4: AC399E40 sw $t9, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800389F4u); return; } g_debug_last_store_pc = 0x800389F4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399E40u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800389F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC209F8: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x800389F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC209FC: 1441000A bne $v0, $at, 0xBFC20A28 */ - uint32_t psx_brA_BFC209FC = cpu->gpr[2]; uint32_t psx_brB_BFC209FC = cpu->gpr[1]; - psx_taken_BFC209FC = (psx_brA_BFC209FC != psx_brB_BFC209FC); - psx_delay_BFC209FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20A00: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A00u); -#endif - if (psx_delay_BFC209FC) { - psx_delay_BFC209FC = 0; - if (psx_taken_BFC209FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A28u); - goto label_BFC20A28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A04u); - } -label_BFC20A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC20A04: 00184080 sll $t0, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00184080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20A08: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC20A0C: 00882021 addu $a0, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00882021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A10u); -#endif - /* 0xBFC20A10: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038A10u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20A14: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80038A1Cu; /* jal link before delay slot */ - psx_delay_BFC20A14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A18u); -#endif - if (psx_delay_BFC20A14) { - psx_delay_BFC20A14 = 0; - cpu->gpr[31] = 0x80038A1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC20A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A1C: 10000044 beq $zero, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC20A1C = cpu->gpr[0]; uint32_t psx_brB_BFC20A1C = cpu->gpr[0]; - psx_taken_BFC20A1C = (psx_brA_BFC20A1C == psx_brB_BFC20A1C); - psx_delay_BFC20A1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A20u); -#endif - if (psx_delay_BFC20A1C) { - psx_delay_BFC20A1C = 0; - if (psx_taken_BFC20A1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A24u); - } -label_BFC20A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20A24: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A24u); -#endif -label_BFC20A28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20A28: 14410041 bne $v0, $at, 0xBFC20B30 */ - uint32_t psx_brA_BFC20A28 = cpu->gpr[2]; uint32_t psx_brB_BFC20A28 = cpu->gpr[1]; - psx_taken_BFC20A28 = (psx_brA_BFC20A28 != psx_brB_BFC20A28); - psx_delay_BFC20A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A2Cu); -#endif - if (psx_delay_BFC20A28) { - psx_delay_BFC20A28 = 0; - if (psx_taken_BFC20A28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A30u); - } -label_BFC20A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20A30: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80038A38u; /* jal link before delay slot */ - psx_delay_BFC20A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20A34: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A34u); -#endif - if (psx_delay_BFC20A30) { - psx_delay_BFC20A30 = 0; - cpu->gpr[31] = 0x80038A38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC20A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A38: 1000003D beq $zero, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC20A38 = cpu->gpr[0]; uint32_t psx_brB_BFC20A38 = cpu->gpr[0]; - psx_taken_BFC20A38 = (psx_brA_BFC20A38 == psx_brB_BFC20A38); - psx_delay_BFC20A38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A3Cu); -#endif - if (psx_delay_BFC20A38) { - psx_delay_BFC20A38 = 0; - if (psx_taken_BFC20A38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A40u); - } -label_BFC20A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC20A40: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC20A44: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A44u); -#endif - /* 0xBFC20A48: 914A9E71 lbu $t2, -24975($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24975; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (-24975)), 10, 0x400u); - PGXP_LOAD(0x914A9E71u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80038A48u); -#endif - /* 0xBFC20A4C: 8D299E5C lw $t1, -24996($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038A4Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E5Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80038A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC20A54: 012A082B sltu $at, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x012A082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20A58: 10200035 beq $at, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC20A58 = cpu->gpr[1]; uint32_t psx_brB_BFC20A58 = cpu->gpr[0]; - psx_taken_BFC20A58 = (psx_brA_BFC20A58 == psx_brB_BFC20A58); - psx_delay_BFC20A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A5Cu); -#endif - if (psx_delay_BFC20A58) { - psx_delay_BFC20A58 = 0; - if (psx_taken_BFC20A58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A60u); - } -label_BFC20A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20A60: 0C00CF56 jal 0xB0033D58 */ - cpu->gpr[31] = 0x80038A68u; /* jal link before delay slot */ - psx_delay_BFC20A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A64u); -#endif - if (psx_delay_BFC20A60) { - psx_delay_BFC20A60 = 0; - cpu->gpr[31] = 0x80038A68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80033D58u); - cpu->pc = 0x80033D58u; return; - } -label_BFC20A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20A68: 1440000C bne $v0, $zero, 0xBFC20A9C */ - uint32_t psx_brA_BFC20A68 = cpu->gpr[2]; uint32_t psx_brB_BFC20A68 = cpu->gpr[0]; - psx_taken_BFC20A68 = (psx_brA_BFC20A68 != psx_brB_BFC20A68); - psx_delay_BFC20A68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A6Cu); -#endif - if (psx_delay_BFC20A68) { - psx_delay_BFC20A68 = 0; - if (psx_taken_BFC20A68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A9Cu); - goto label_BFC20A9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A70u); - } -label_BFC20A70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC20A70: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A70u); -#endif - /* 0xBFC20A74: 8D6B9E5C lw $t3, -24996($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038A74u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E5Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80038A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC20A7C: 11600007 beq $t3, $zero, 0xBFC20A9C */ - uint32_t psx_brA_BFC20A7C = cpu->gpr[11]; uint32_t psx_brB_BFC20A7C = cpu->gpr[0]; - psx_taken_BFC20A7C = (psx_brA_BFC20A7C == psx_brB_BFC20A7C); - psx_delay_BFC20A7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20A80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038A80u); -#endif - if (psx_delay_BFC20A7C) { - psx_delay_BFC20A7C = 0; - if (psx_taken_BFC20A7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A9Cu); - goto label_BFC20A9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038A84u); - } -label_BFC20A84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC20A84: 000B6880 sll $t5, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20A88: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC20A8C: 008D2021 addu $a0, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A90u); -#endif - /* 0xBFC20A90: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038A90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20A94: 0C00CDBB jal 0xB00336EC */ - cpu->gpr[31] = 0x80038A9Cu; /* jal link before delay slot */ - psx_delay_BFC20A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC20A98: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80038A98u); -#endif - if (psx_delay_BFC20A94) { - psx_delay_BFC20A94 = 0; - cpu->gpr[31] = 0x80038A9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800336ECu); - cpu->pc = 0x800336ECu; return; - } -label_BFC20A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC20A9C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AA0u); -#endif - /* 0xBFC20AA0: 8D8C9E5C lw $t4, -24996($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038AA0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E5Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80038AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20AA4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC20AA8: 258E0001 addiu $t6, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); - PGXP_ALU(0x258E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC20AAC: AC2E9E5C sw $t6, -24996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038AACu); return; } g_debug_last_store_pc = 0x80038AACu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20AB0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20AB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC20AB8: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AB8u); -#endif - /* 0xBFC20ABC: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038ABCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20AC0: AC2F9E40 sw $t7, -25024($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25024; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25024)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038AC0u); return; } g_debug_last_store_pc = 0x80038AC0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E40u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20AC4: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20AC8: 1441000A bne $v0, $at, 0xBFC20AF4 */ - uint32_t psx_brA_BFC20AC8 = cpu->gpr[2]; uint32_t psx_brB_BFC20AC8 = cpu->gpr[1]; - psx_taken_BFC20AC8 = (psx_brA_BFC20AC8 != psx_brB_BFC20AC8); - psx_delay_BFC20AC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20ACC: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038ACCu); -#endif - if (psx_delay_BFC20AC8) { - psx_delay_BFC20AC8 = 0; - if (psx_taken_BFC20AC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038AF4u); - goto label_BFC20AF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038AD0u); - } -label_BFC20AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC20AD0: 000EC880 sll $t9, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000EC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20AD4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC20AD8: 00992021 addu $a0, $a0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[25]; - PGXP_ALU(0x00992021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038AD8u); -#endif - /* 0xBFC20ADC: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038ADCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20AE0: 0C00DFEA jal 0xB0037FA8 */ - cpu->gpr[31] = 0x80038AE8u; /* jal link before delay slot */ - psx_delay_BFC20AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20AE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038AE4u); -#endif - if (psx_delay_BFC20AE0) { - psx_delay_BFC20AE0 = 0; - cpu->gpr[31] = 0x80038AE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80037FA8u); - cpu->pc = 0x80037FA8u; return; - } -label_BFC20AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20AE8: 10000011 beq $zero, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC20AE8 = cpu->gpr[0]; uint32_t psx_brB_BFC20AE8 = cpu->gpr[0]; - psx_taken_BFC20AE8 = (psx_brA_BFC20AE8 == psx_brB_BFC20AE8); - psx_delay_BFC20AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038AECu); -#endif - if (psx_delay_BFC20AE8) { - psx_delay_BFC20AE8 = 0; - if (psx_taken_BFC20AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038AF0u); - } -label_BFC20AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20AF0: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AF0u); -#endif -label_BFC20AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20AF4: 14410008 bne $v0, $at, 0xBFC20B18 */ - uint32_t psx_brA_BFC20AF4 = cpu->gpr[2]; uint32_t psx_brB_BFC20AF4 = cpu->gpr[1]; - psx_taken_BFC20AF4 = (psx_brA_BFC20AF4 != psx_brB_BFC20AF4); - psx_delay_BFC20AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20AF8: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038AF8u); -#endif - if (psx_delay_BFC20AF4) { - psx_delay_BFC20AF4 = 0; - if (psx_taken_BFC20AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B18u); - goto label_BFC20B18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038AFCu); - } -label_BFC20AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20AFC: 0C00DDAB jal 0xB00376AC */ - cpu->gpr[31] = 0x80038B04u; /* jal link before delay slot */ - psx_delay_BFC20AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20B00: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B00u); -#endif - if (psx_delay_BFC20AFC) { - psx_delay_BFC20AFC = 0; - cpu->gpr[31] = 0x80038B04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800376ACu); - cpu->pc = 0x800376ACu; return; - } -label_BFC20B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20B04: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80038B0Cu; /* jal link before delay slot */ - psx_delay_BFC20B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B08u); -#endif - if (psx_delay_BFC20B04) { - psx_delay_BFC20B04 = 0; - cpu->gpr[31] = 0x80038B0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC20B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B0C: 10000008 beq $zero, $zero, 0xBFC20B30 */ - uint32_t psx_brA_BFC20B0C = cpu->gpr[0]; uint32_t psx_brB_BFC20B0C = cpu->gpr[0]; - psx_taken_BFC20B0C = (psx_brA_BFC20B0C == psx_brB_BFC20B0C); - psx_delay_BFC20B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B10u); -#endif - if (psx_delay_BFC20B0C) { - psx_delay_BFC20B0C = 0; - if (psx_taken_BFC20B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B14u); - } -label_BFC20B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20B14: 24010032 addiu $at, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24010032u, cpu->gpr[1], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B14u); -#endif -label_BFC20B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20B18: 14410005 bne $v0, $at, 0xBFC20B30 */ - uint32_t psx_brA_BFC20B18 = cpu->gpr[2]; uint32_t psx_brB_BFC20B18 = cpu->gpr[1]; - psx_taken_BFC20B18 = (psx_brA_BFC20B18 != psx_brB_BFC20B18); - psx_delay_BFC20B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B1Cu); -#endif - if (psx_delay_BFC20B18) { - psx_delay_BFC20B18 = 0; - if (psx_taken_BFC20B18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B30u); - goto label_BFC20B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B20u); - } -label_BFC20B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20B20: 0C00C905 jal 0xB0032414 */ - cpu->gpr[31] = 0x80038B28u; /* jal link before delay slot */ - psx_delay_BFC20B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC20B24: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038B24u); -#endif - if (psx_delay_BFC20B20) { - psx_delay_BFC20B20 = 0; - cpu->gpr[31] = 0x80038B28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032414u); - cpu->pc = 0x80032414u; return; - } -label_BFC20B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20B28: 0C00CAA4 jal 0xB0032A90 */ - cpu->gpr[31] = 0x80038B30u; /* jal link before delay slot */ - psx_delay_BFC20B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B2Cu); -#endif - if (psx_delay_BFC20B28) { - psx_delay_BFC20B28 = 0; - cpu->gpr[31] = 0x80038B30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80032A90u); - cpu->pc = 0x80032A90u; return; - } -label_BFC20B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC20B30: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B30u); -#endif - /* 0xBFC20B34: 8F189E5C lw $t8, -24996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B34u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20B38: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC20B3C: 00184080 sll $t0, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00184080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC20B40: 00882021 addu $a0, $a0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[8]; - PGXP_ALU(0x00882021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038B40u); -#endif - /* 0xBFC20B44: 8C84D0F0 lw $a0, -12048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B44u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84D0F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B48u); -#endif - /* 0xBFC20B4C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B4Cu); -#endif -label_BFC20B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20B50: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC20B54: AC249E50 sw $a0, -25008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B54u); return; } g_debug_last_store_pc = 0x80038B54u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249E50u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20B58: 03E00008 jr $ra */ - psx_delay_BFC20B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20B5C: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B5Cu); -#endif - if (psx_delay_BFC20B58) { - psx_delay_BFC20B58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20B60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20B60u); - int psx_delay_BFC20B6C = 0; - int psx_taken_BFC20B6C = 0; - int psx_delay_BFC20B74 = 0; - int psx_taken_BFC20B74 = 0; - int psx_delay_BFC20B94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20B74u: goto label_BFC20B74; - case 0xBFC20B7Cu: goto label_BFC20B7C; - case 0xBFC20B94u: goto label_BFC20B94; - default: break; - } - } -label_BFC20B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20B60: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B60u); -#endif - /* 0xBFC20B64: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20B68: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20B6C: 10410009 beq $v0, $at, 0xBFC20B94 */ - uint32_t psx_brA_BFC20B6C = cpu->gpr[2]; uint32_t psx_brB_BFC20B6C = cpu->gpr[1]; - psx_taken_BFC20B6C = (psx_brA_BFC20B6C == psx_brB_BFC20B6C); - psx_delay_BFC20B6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20B70: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B70u); -#endif - if (psx_delay_BFC20B6C) { - psx_delay_BFC20B6C = 0; - if (psx_taken_BFC20B6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B94u); - goto label_BFC20B94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B74u); - } -label_BFC20B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20B74: 14410007 bne $v0, $at, 0xBFC20B94 */ - uint32_t psx_brA_BFC20B74 = cpu->gpr[2]; uint32_t psx_brB_BFC20B74 = cpu->gpr[1]; - psx_taken_BFC20B74 = (psx_brA_BFC20B74 != psx_brB_BFC20B74); - psx_delay_BFC20B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B78u); -#endif - if (psx_delay_BFC20B74) { - psx_delay_BFC20B74 = 0; - if (psx_taken_BFC20B74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B94u); - goto label_BFC20B94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038B7Cu); - } -label_BFC20B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC20B7C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20B80: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC20B84: AC2E9E44 sw $t6, -25020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B84u); return; } g_debug_last_store_pc = 0x80038B84u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20B88: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC20B8C: 240F0012 addiu $t7, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x240F0012u, cpu->gpr[15], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80038B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20B90: AC2F6944 sw $t7, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038B90u); return; } g_debug_last_store_pc = 0x80038B90u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6944u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038B90u); -#endif -label_BFC20B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20B94: 03E00008 jr $ra */ - psx_delay_BFC20B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20B98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038B98u); -#endif - if (psx_delay_BFC20B94) { - psx_delay_BFC20B94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20B9C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20B9Cu); - int psx_delay_BFC20BA8 = 0; - int psx_taken_BFC20BA8 = 0; - int psx_delay_BFC20BB0 = 0; - int psx_taken_BFC20BB0 = 0; - int psx_delay_BFC20BDC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20BB0u: goto label_BFC20BB0; - case 0xBFC20BB8u: goto label_BFC20BB8; - case 0xBFC20BDCu: goto label_BFC20BDC; - default: break; - } - } -label_BFC20B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC20B9C: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BA0u); -#endif - /* 0xBFC20BA0: 8C426948 lw $v0, 26952($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426948u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20BA4: 24010034 addiu $at, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24010034u, cpu->gpr[1], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20BA8: 1041000C beq $v0, $at, 0xBFC20BDC */ - uint32_t psx_brA_BFC20BA8 = cpu->gpr[2]; uint32_t psx_brB_BFC20BA8 = cpu->gpr[1]; - psx_taken_BFC20BA8 = (psx_brA_BFC20BA8 == psx_brB_BFC20BA8); - psx_delay_BFC20BA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC20BAC: 24010033 addiu $at, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24010033u, cpu->gpr[1], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BACu); -#endif - if (psx_delay_BFC20BA8) { - psx_delay_BFC20BA8 = 0; - if (psx_taken_BFC20BA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038BDCu); - goto label_BFC20BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038BB0u); - } -label_BFC20BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC20BB0: 1441000A bne $v0, $at, 0xBFC20BDC */ - uint32_t psx_brA_BFC20BB0 = cpu->gpr[2]; uint32_t psx_brB_BFC20BB0 = cpu->gpr[1]; - psx_taken_BFC20BB0 = (psx_brA_BFC20BB0 != psx_brB_BFC20BB0); - psx_delay_BFC20BB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20BB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038BB4u); -#endif - if (psx_delay_BFC20BB0) { - psx_delay_BFC20BB0 = 0; - if (psx_taken_BFC20BB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038BDCu); - goto label_BFC20BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038BB8u); - } -label_BFC20BB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20BB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC20BB8: 240E0033 addiu $t6, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x240E0033u, cpu->gpr[14], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20BBC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC20BC0: AC2E9E4C sw $t6, -25012($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BC0u); return; } g_debug_last_store_pc = 0x80038BC0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9E4Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20BC4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC20BC8: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC20BCC: AC2F9E44 sw $t7, -25020($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25020; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25020)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BCCu); return; } g_debug_last_store_pc = 0x80038BCCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E44u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC20BD0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC20BD4: 24180013 addiu $t8, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24180013u, cpu->gpr[24], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC20BD8: AC386944 sw $t8, 26948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BD8u); return; } g_debug_last_store_pc = 0x80038BD8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386944u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BD8u); -#endif -label_BFC20BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20BDC: 03E00008 jr $ra */ - psx_delay_BFC20BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20BE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038BE0u); -#endif - if (psx_delay_BFC20BDC) { - psx_delay_BFC20BDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20BE4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20BE4u); - int psx_delay_BFC20BF4 = 0; - int psx_delay_BFC20C00 = 0; - int psx_taken_BFC20C00 = 0; - int psx_delay_BFC20C10 = 0; - int psx_delay_BFC20C18 = 0; - int psx_taken_BFC20C18 = 0; - int psx_delay_BFC20C24 = 0; - int psx_taken_BFC20C24 = 0; - int psx_delay_BFC20C2C = 0; - int psx_delay_BFC20C34 = 0; - int psx_taken_BFC20C34 = 0; - int psx_delay_BFC20C3C = 0; - int psx_taken_BFC20C3C = 0; - int psx_delay_BFC20C48 = 0; - int psx_delay_BFC20C5C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20BFCu: goto label_BFC20BFC; - case 0xBFC20C08u: goto label_BFC20C08; - case 0xBFC20C18u: goto label_BFC20C18; - case 0xBFC20C20u: goto label_BFC20C20; - case 0xBFC20C2Cu: goto label_BFC20C2C; - case 0xBFC20C34u: goto label_BFC20C34; - case 0xBFC20C3Cu: goto label_BFC20C3C; - case 0xBFC20C44u: goto label_BFC20C44; - case 0xBFC20C50u: goto label_BFC20C50; - case 0xBFC20C54u: goto label_BFC20C54; - default: break; - } - } -label_BFC20BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20BE4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20BE8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BE8u); return; } g_debug_last_store_pc = 0x80038BE8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20BEC: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BECu); return; } g_debug_last_store_pc = 0x80038BECu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20BF0: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038BF0u); return; } g_debug_last_store_pc = 0x80038BF0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20BF4: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038BFCu; /* jal link before delay slot */ - psx_delay_BFC20BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20BF8: 24100019 addiu $s0, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24100019u, cpu->gpr[16], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BF8u); -#endif - if (psx_delay_BFC20BF4) { - psx_delay_BFC20BF4 = 0; - cpu->gpr[31] = 0x80038BFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20BFC: 24100018 addiu $s0, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24100018u, cpu->gpr[16], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80038BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20C00: 1A00000E blez $s0, 0xBFC20C3C */ - uint32_t psx_brA_BFC20C00 = cpu->gpr[16]; - psx_taken_BFC20C00 = ((int32_t)psx_brA_BFC20C00 <= 0); - psx_delay_BFC20C00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20C04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038C04u); -#endif - if (psx_delay_BFC20C00) { - psx_delay_BFC20C00 = 0; - if (psx_taken_BFC20C00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C3Cu); - goto label_BFC20C3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C08u); - } -label_BFC20C08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20C08: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC20C0C: 26319FB0 addiu $s1, $s1, -24656 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-24656)); - PGXP_ALU(0x26319FB0u, cpu->gpr[17], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20C10: 0C015F98 jal 0xB0057E60 */ - cpu->gpr[31] = 0x80038C18u; /* jal link before delay slot */ - psx_delay_BFC20C10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20C14: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038C14u); -#endif - if (psx_delay_BFC20C10) { - psx_delay_BFC20C10 = 0; - cpu->gpr[31] = 0x80038C18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E60u); - cpu->pc = 0x80057E60u; return; - } -label_BFC20C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20C18: 14400008 bne $v0, $zero, 0xBFC20C3C */ - uint32_t psx_brA_BFC20C18 = cpu->gpr[2]; uint32_t psx_brB_BFC20C18 = cpu->gpr[0]; - psx_taken_BFC20C18 = (psx_brA_BFC20C18 != psx_brB_BFC20C18); - psx_delay_BFC20C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20C1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038C1Cu); -#endif - if (psx_delay_BFC20C18) { - psx_delay_BFC20C18 = 0; - if (psx_taken_BFC20C18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C3Cu); - goto label_BFC20C3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C20u); - } -label_BFC20C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20C20: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20C24: 1A000005 blez $s0, 0xBFC20C3C */ - uint32_t psx_brA_BFC20C24 = cpu->gpr[16]; - psx_taken_BFC20C24 = ((int32_t)psx_brA_BFC20C24 <= 0); - psx_delay_BFC20C24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20C28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038C28u); -#endif - if (psx_delay_BFC20C24) { - psx_delay_BFC20C24 = 0; - if (psx_taken_BFC20C24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C3Cu); - goto label_BFC20C3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C2Cu); - } -label_BFC20C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20C2C: 0C015F98 jal 0xB0057E60 */ - cpu->gpr[31] = 0x80038C34u; /* jal link before delay slot */ - psx_delay_BFC20C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20C30: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038C30u); -#endif - if (psx_delay_BFC20C2C) { - psx_delay_BFC20C2C = 0; - cpu->gpr[31] = 0x80038C34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E60u); - cpu->pc = 0x80057E60u; return; - } -label_BFC20C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20C34: 1040FFFA beq $v0, $zero, 0xBFC20C20 */ - uint32_t psx_brA_BFC20C34 = cpu->gpr[2]; uint32_t psx_brB_BFC20C34 = cpu->gpr[0]; - psx_taken_BFC20C34 = (psx_brA_BFC20C34 == psx_brB_BFC20C34); - psx_delay_BFC20C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20C38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038C38u); -#endif - if (psx_delay_BFC20C34) { - psx_delay_BFC20C34 = 0; - if (psx_taken_BFC20C34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C20u); - goto label_BFC20C20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C3Cu); - } -label_BFC20C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20C3C: 16000005 bne $s0, $zero, 0xBFC20C54 */ - uint32_t psx_brA_BFC20C3C = cpu->gpr[16]; uint32_t psx_brB_BFC20C3C = cpu->gpr[0]; - psx_taken_BFC20C3C = (psx_brA_BFC20C3C != psx_brB_BFC20C3C); - psx_delay_BFC20C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C40u); -#endif - /* 0xBFC20C40: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C40u); -#endif - if (psx_delay_BFC20C3C) { - psx_delay_BFC20C3C = 0; - if (psx_taken_BFC20C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C54u); - goto label_BFC20C54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C44u); - } -label_BFC20C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20C44: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20C48: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80038C50u; /* jal link before delay slot */ - psx_delay_BFC20C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC20C4C: 248469BC addiu $a0, $a0, 27068 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27068)); - PGXP_ALU(0x248469BCu, cpu->gpr[4], _pgx1, 0x000069BCu); } -#ifdef PSX_COSIM - cosim_instr(0x80038C4Cu); -#endif - if (psx_delay_BFC20C48) { - psx_delay_BFC20C48 = 0; - cpu->gpr[31] = 0x80038C50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC20C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C50u); -#endif - /* 0xBFC20C50: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C50u); -#endif -label_BFC20C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C54u); -#endif - /* 0xBFC20C54: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C54u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C54u); -#endif - /* 0xBFC20C58: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C58u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20C5C: 03E00008 jr $ra */ - psx_delay_BFC20C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20C60: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C60u); -#endif - if (psx_delay_BFC20C5C) { - psx_delay_BFC20C5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20C64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20C64u); - int psx_delay_BFC20C78 = 0; - int psx_delay_BFC20C84 = 0; - int psx_taken_BFC20C84 = 0; - int psx_delay_BFC20CA4 = 0; - int psx_delay_BFC20CAC = 0; - int psx_taken_BFC20CAC = 0; - int psx_delay_BFC20CB8 = 0; - int psx_taken_BFC20CB8 = 0; - int psx_delay_BFC20CC0 = 0; - int psx_delay_BFC20CC8 = 0; - int psx_taken_BFC20CC8 = 0; - int psx_delay_BFC20CDC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20C80u: goto label_BFC20C80; - case 0xBFC20C8Cu: goto label_BFC20C8C; - case 0xBFC20CACu: goto label_BFC20CAC; - case 0xBFC20CB4u: goto label_BFC20CB4; - case 0xBFC20CB8u: goto label_BFC20CB8; - case 0xBFC20CC0u: goto label_BFC20CC0; - case 0xBFC20CC8u: goto label_BFC20CC8; - case 0xBFC20CD0u: goto label_BFC20CD0; - case 0xBFC20CD4u: goto label_BFC20CD4; - default: break; - } - } -label_BFC20C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20C64: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20C68: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C68u); return; } g_debug_last_store_pc = 0x80038C68u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20C6C: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C6Cu); return; } g_debug_last_store_pc = 0x80038C6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20C70: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C70u); return; } g_debug_last_store_pc = 0x80038C70u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC20C74: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C74u); return; } g_debug_last_store_pc = 0x80038C74u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20C78: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038C80u; /* jal link before delay slot */ - psx_delay_BFC20C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20C7C: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038C7Cu); -#endif - if (psx_delay_BFC20C78) { - psx_delay_BFC20C78 = 0; - cpu->gpr[31] = 0x80038C80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20C80: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20C84: 1A000013 blez $s0, 0xBFC20CD4 */ - uint32_t psx_brA_BFC20C84 = cpu->gpr[16]; - psx_taken_BFC20C84 = ((int32_t)psx_brA_BFC20C84 <= 0); - psx_delay_BFC20C84 = 1; - /* 0xBFC20C88: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C88u); -#endif - if (psx_delay_BFC20C84) { - psx_delay_BFC20C84 = 0; - if (psx_taken_BFC20C84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CD4u); - goto label_BFC20CD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038C8Cu); - } -label_BFC20C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C8Cu); -#endif - /* 0xBFC20C8C: 8FAE0028 lw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038C8Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80038C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC20C90: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80038C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC20C94: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC20C98: 27189FB0 addiu $t8, $t8, -24656 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-24656)); - PGXP_ALU(0x27189FB0u, cpu->gpr[24], _pgx1, 0xFFFF9FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC20C9C: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC20CA0: 01F88821 addu $s1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20CA4: 0C015CAD jal 0xB00572B4 */ - cpu->gpr[31] = 0x80038CACu; /* jal link before delay slot */ - psx_delay_BFC20CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20CA8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038CA8u); -#endif - if (psx_delay_BFC20CA4) { - psx_delay_BFC20CA4 = 0; - cpu->gpr[31] = 0x80038CACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572B4u); - cpu->pc = 0x800572B4u; return; - } -label_BFC20CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20CAC: 14400009 bne $v0, $zero, 0xBFC20CD4 */ - uint32_t psx_brA_BFC20CAC = cpu->gpr[2]; uint32_t psx_brB_BFC20CAC = cpu->gpr[0]; - psx_taken_BFC20CAC = (psx_brA_BFC20CAC != psx_brB_BFC20CAC); - psx_delay_BFC20CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CB0u); -#endif - /* 0xBFC20CB0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CB0u); -#endif - if (psx_delay_BFC20CAC) { - psx_delay_BFC20CAC = 0; - if (psx_taken_BFC20CAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CD4u); - goto label_BFC20CD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CB4u); - } -label_BFC20CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20CB4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038CB4u); -#endif -label_BFC20CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20CB8: 1A000006 blez $s0, 0xBFC20CD4 */ - uint32_t psx_brA_BFC20CB8 = cpu->gpr[16]; - psx_taken_BFC20CB8 = ((int32_t)psx_brA_BFC20CB8 <= 0); - psx_delay_BFC20CB8 = 1; - /* 0xBFC20CBC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CBCu); -#endif - if (psx_delay_BFC20CB8) { - psx_delay_BFC20CB8 = 0; - if (psx_taken_BFC20CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CD4u); - goto label_BFC20CD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CC0u); - } -label_BFC20CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20CC0: 0C015CAD jal 0xB00572B4 */ - cpu->gpr[31] = 0x80038CC8u; /* jal link before delay slot */ - psx_delay_BFC20CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20CC4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038CC4u); -#endif - if (psx_delay_BFC20CC0) { - psx_delay_BFC20CC0 = 0; - cpu->gpr[31] = 0x80038CC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572B4u); - cpu->pc = 0x800572B4u; return; - } -label_BFC20CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20CC8: 1040FFFB beq $v0, $zero, 0xBFC20CB8 */ - uint32_t psx_brA_BFC20CC8 = cpu->gpr[2]; uint32_t psx_brB_BFC20CC8 = cpu->gpr[0]; - psx_taken_BFC20CC8 = (psx_brA_BFC20CC8 == psx_brB_BFC20CC8); - psx_delay_BFC20CC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20CCC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038CCCu); -#endif - if (psx_delay_BFC20CC8) { - psx_delay_BFC20CC8 = 0; - if (psx_taken_BFC20CC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CB8u); - goto label_BFC20CB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038CD0u); - } -label_BFC20CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CD0u); -#endif - /* 0xBFC20CD0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CD0u); -#endif -label_BFC20CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CD4u); -#endif - /* 0xBFC20CD4: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CD4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CD4u); -#endif - /* 0xBFC20CD8: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CD8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20CDC: 03E00008 jr $ra */ - psx_delay_BFC20CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20CE0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80038CE0u); -#endif - if (psx_delay_BFC20CDC) { - psx_delay_BFC20CDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20CE4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20CE4u); - int psx_delay_BFC20CF8 = 0; - int psx_delay_BFC20D04 = 0; - int psx_taken_BFC20D04 = 0; - int psx_delay_BFC20D0C = 0; - int psx_delay_BFC20D14 = 0; - int psx_taken_BFC20D14 = 0; - int psx_delay_BFC20D20 = 0; - int psx_taken_BFC20D20 = 0; - int psx_delay_BFC20D28 = 0; - int psx_delay_BFC20D30 = 0; - int psx_taken_BFC20D30 = 0; - int psx_delay_BFC20D44 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20D00u: goto label_BFC20D00; - case 0xBFC20D0Cu: goto label_BFC20D0C; - case 0xBFC20D14u: goto label_BFC20D14; - case 0xBFC20D1Cu: goto label_BFC20D1C; - case 0xBFC20D20u: goto label_BFC20D20; - case 0xBFC20D28u: goto label_BFC20D28; - case 0xBFC20D30u: goto label_BFC20D30; - case 0xBFC20D38u: goto label_BFC20D38; - case 0xBFC20D3Cu: goto label_BFC20D3C; - default: break; - } - } -label_BFC20CE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20CE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20CE4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20CE8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CE8u); return; } g_debug_last_store_pc = 0x80038CE8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20CEC: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CECu); return; } g_debug_last_store_pc = 0x80038CECu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20CF0: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038CF0u); return; } g_debug_last_store_pc = 0x80038CF0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20CF4: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20CF8: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038D00u; /* jal link before delay slot */ - psx_delay_BFC20CF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20CFC: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038CFCu); -#endif - if (psx_delay_BFC20CF8) { - psx_delay_BFC20CF8 = 0; - cpu->gpr[31] = 0x80038D00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20D00: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D04: 1A00000D blez $s0, 0xBFC20D3C */ - uint32_t psx_brA_BFC20D04 = cpu->gpr[16]; - psx_taken_BFC20D04 = ((int32_t)psx_brA_BFC20D04 <= 0); - psx_delay_BFC20D04 = 1; - /* 0xBFC20D08: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D08u); -#endif - if (psx_delay_BFC20D04) { - psx_delay_BFC20D04 = 0; - if (psx_taken_BFC20D04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D3Cu); - goto label_BFC20D3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D0Cu); - } -label_BFC20D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20D0C: 0C015CAD jal 0xB00572B4 */ - cpu->gpr[31] = 0x80038D14u; /* jal link before delay slot */ - psx_delay_BFC20D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20D10: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038D10u); -#endif - if (psx_delay_BFC20D0C) { - psx_delay_BFC20D0C = 0; - cpu->gpr[31] = 0x80038D14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572B4u); - cpu->pc = 0x800572B4u; return; - } -label_BFC20D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20D14: 14400009 bne $v0, $zero, 0xBFC20D3C */ - uint32_t psx_brA_BFC20D14 = cpu->gpr[2]; uint32_t psx_brB_BFC20D14 = cpu->gpr[0]; - psx_taken_BFC20D14 = (psx_brA_BFC20D14 != psx_brB_BFC20D14); - psx_delay_BFC20D14 = 1; - /* 0xBFC20D18: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D18u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D18u); -#endif - if (psx_delay_BFC20D14) { - psx_delay_BFC20D14 = 0; - if (psx_taken_BFC20D14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D3Cu); - goto label_BFC20D3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D1Cu); - } -label_BFC20D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D1C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038D1Cu); -#endif -label_BFC20D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D20: 1A000006 blez $s0, 0xBFC20D3C */ - uint32_t psx_brA_BFC20D20 = cpu->gpr[16]; - psx_taken_BFC20D20 = ((int32_t)psx_brA_BFC20D20 <= 0); - psx_delay_BFC20D20 = 1; - /* 0xBFC20D24: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D24u); -#endif - if (psx_delay_BFC20D20) { - psx_delay_BFC20D20 = 0; - if (psx_taken_BFC20D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D3Cu); - goto label_BFC20D3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D28u); - } -label_BFC20D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20D28: 0C015CAD jal 0xB00572B4 */ - cpu->gpr[31] = 0x80038D30u; /* jal link before delay slot */ - psx_delay_BFC20D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20D2C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038D2Cu); -#endif - if (psx_delay_BFC20D28) { - psx_delay_BFC20D28 = 0; - cpu->gpr[31] = 0x80038D30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572B4u); - cpu->pc = 0x800572B4u; return; - } -label_BFC20D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20D30: 1040FFFB beq $v0, $zero, 0xBFC20D20 */ - uint32_t psx_brA_BFC20D30 = cpu->gpr[2]; uint32_t psx_brB_BFC20D30 = cpu->gpr[0]; - psx_taken_BFC20D30 = (psx_brA_BFC20D30 == psx_brB_BFC20D30); - psx_delay_BFC20D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D34: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038D34u); -#endif - if (psx_delay_BFC20D30) { - psx_delay_BFC20D30 = 0; - if (psx_taken_BFC20D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D20u); - goto label_BFC20D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D38u); - } -label_BFC20D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D38u); -#endif - /* 0xBFC20D38: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D38u); -#endif -label_BFC20D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D3Cu); -#endif - /* 0xBFC20D3C: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D3Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D40u); -#endif - /* 0xBFC20D40: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D40u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20D44: 03E00008 jr $ra */ - psx_delay_BFC20D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20D48: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038D48u); -#endif - if (psx_delay_BFC20D44) { - psx_delay_BFC20D44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20D4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20D4Cu); - int psx_delay_BFC20D60 = 0; - int psx_delay_BFC20D6C = 0; - int psx_taken_BFC20D6C = 0; - int psx_delay_BFC20D74 = 0; - int psx_delay_BFC20D7C = 0; - int psx_taken_BFC20D7C = 0; - int psx_delay_BFC20D88 = 0; - int psx_taken_BFC20D88 = 0; - int psx_delay_BFC20D90 = 0; - int psx_delay_BFC20D98 = 0; - int psx_taken_BFC20D98 = 0; - int psx_delay_BFC20DAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20D68u: goto label_BFC20D68; - case 0xBFC20D74u: goto label_BFC20D74; - case 0xBFC20D7Cu: goto label_BFC20D7C; - case 0xBFC20D84u: goto label_BFC20D84; - case 0xBFC20D88u: goto label_BFC20D88; - case 0xBFC20D90u: goto label_BFC20D90; - case 0xBFC20D98u: goto label_BFC20D98; - case 0xBFC20DA0u: goto label_BFC20DA0; - case 0xBFC20DA4u: goto label_BFC20DA4; - default: break; - } - } -label_BFC20D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20D4C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20D50: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D50u); return; } g_debug_last_store_pc = 0x80038D50u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20D54: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D54u); return; } g_debug_last_store_pc = 0x80038D54u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20D58: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D58u); return; } g_debug_last_store_pc = 0x80038D58u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20D5C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20D60: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038D68u; /* jal link before delay slot */ - psx_delay_BFC20D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20D64: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038D64u); -#endif - if (psx_delay_BFC20D60) { - psx_delay_BFC20D60 = 0; - cpu->gpr[31] = 0x80038D68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20D68: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D6C: 1A00000D blez $s0, 0xBFC20DA4 */ - uint32_t psx_brA_BFC20D6C = cpu->gpr[16]; - psx_taken_BFC20D6C = ((int32_t)psx_brA_BFC20D6C <= 0); - psx_delay_BFC20D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D70u); -#endif - /* 0xBFC20D70: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D70u); -#endif - if (psx_delay_BFC20D6C) { - psx_delay_BFC20D6C = 0; - if (psx_taken_BFC20D6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DA4u); - goto label_BFC20DA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D74u); - } -label_BFC20D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20D74: 0C015D21 jal 0xB0057484 */ - cpu->gpr[31] = 0x80038D7Cu; /* jal link before delay slot */ - psx_delay_BFC20D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20D78: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038D78u); -#endif - if (psx_delay_BFC20D74) { - psx_delay_BFC20D74 = 0; - cpu->gpr[31] = 0x80038D7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057484u); - cpu->pc = 0x80057484u; return; - } -label_BFC20D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20D7C: 14400009 bne $v0, $zero, 0xBFC20DA4 */ - uint32_t psx_brA_BFC20D7C = cpu->gpr[2]; uint32_t psx_brB_BFC20D7C = cpu->gpr[0]; - psx_taken_BFC20D7C = (psx_brA_BFC20D7C != psx_brB_BFC20D7C); - psx_delay_BFC20D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D80u); -#endif - /* 0xBFC20D80: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D80u); -#endif - if (psx_delay_BFC20D7C) { - psx_delay_BFC20D7C = 0; - if (psx_taken_BFC20D7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DA4u); - goto label_BFC20DA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D84u); - } -label_BFC20D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D84: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038D84u); -#endif -label_BFC20D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D88: 1A000006 blez $s0, 0xBFC20DA4 */ - uint32_t psx_brA_BFC20D88 = cpu->gpr[16]; - psx_taken_BFC20D88 = ((int32_t)psx_brA_BFC20D88 <= 0); - psx_delay_BFC20D88 = 1; - /* 0xBFC20D8C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038D8Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038D8Cu); -#endif - if (psx_delay_BFC20D88) { - psx_delay_BFC20D88 = 0; - if (psx_taken_BFC20D88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DA4u); - goto label_BFC20DA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D90u); - } -label_BFC20D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20D90: 0C015D21 jal 0xB0057484 */ - cpu->gpr[31] = 0x80038D98u; /* jal link before delay slot */ - psx_delay_BFC20D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20D94: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038D94u); -#endif - if (psx_delay_BFC20D90) { - psx_delay_BFC20D90 = 0; - cpu->gpr[31] = 0x80038D98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057484u); - cpu->pc = 0x80057484u; return; - } -label_BFC20D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20D98: 1040FFFB beq $v0, $zero, 0xBFC20D88 */ - uint32_t psx_brA_BFC20D98 = cpu->gpr[2]; uint32_t psx_brB_BFC20D98 = cpu->gpr[0]; - psx_taken_BFC20D98 = (psx_brA_BFC20D98 == psx_brB_BFC20D98); - psx_delay_BFC20D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20D9C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038D9Cu); -#endif - if (psx_delay_BFC20D98) { - psx_delay_BFC20D98 = 0; - if (psx_taken_BFC20D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038D88u); - goto label_BFC20D88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DA0u); - } -label_BFC20DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DA0u); -#endif - /* 0xBFC20DA0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DA0u); -#endif -label_BFC20DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DA4u); -#endif - /* 0xBFC20DA4: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DA4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DA4u); -#endif - /* 0xBFC20DA8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DA8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20DAC: 03E00008 jr $ra */ - psx_delay_BFC20DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20DB0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038DB0u); -#endif - if (psx_delay_BFC20DAC) { - psx_delay_BFC20DAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20DB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20DB4u); - int psx_delay_BFC20DC0 = 0; - int psx_delay_BFC20DCC = 0; - int psx_taken_BFC20DCC = 0; - int psx_delay_BFC20DD4 = 0; - int psx_delay_BFC20DDC = 0; - int psx_taken_BFC20DDC = 0; - int psx_delay_BFC20DE8 = 0; - int psx_taken_BFC20DE8 = 0; - int psx_delay_BFC20DF0 = 0; - int psx_delay_BFC20DF8 = 0; - int psx_taken_BFC20DF8 = 0; - int psx_delay_BFC20E08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20DC8u: goto label_BFC20DC8; - case 0xBFC20DD4u: goto label_BFC20DD4; - case 0xBFC20DDCu: goto label_BFC20DDC; - case 0xBFC20DE4u: goto label_BFC20DE4; - case 0xBFC20DE8u: goto label_BFC20DE8; - case 0xBFC20DF0u: goto label_BFC20DF0; - case 0xBFC20DF8u: goto label_BFC20DF8; - case 0xBFC20E00u: goto label_BFC20E00; - case 0xBFC20E04u: goto label_BFC20E04; - default: break; - } - } -label_BFC20DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20DB4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20DB8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DB8u); return; } g_debug_last_store_pc = 0x80038DB8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20DBC: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DBCu); return; } g_debug_last_store_pc = 0x80038DBCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20DC0: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038DC8u; /* jal link before delay slot */ - psx_delay_BFC20DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20DC4: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038DC4u); -#endif - if (psx_delay_BFC20DC0) { - psx_delay_BFC20DC0 = 0; - cpu->gpr[31] = 0x80038DC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20DC8: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20DCC: 1A00000D blez $s0, 0xBFC20E04 */ - uint32_t psx_brA_BFC20DCC = cpu->gpr[16]; - psx_taken_BFC20DCC = ((int32_t)psx_brA_BFC20DCC <= 0); - psx_delay_BFC20DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DD0u); -#endif - /* 0xBFC20DD0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DD0u); -#endif - if (psx_delay_BFC20DCC) { - psx_delay_BFC20DCC = 0; - if (psx_taken_BFC20DCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E04u); - goto label_BFC20E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DD4u); - } -label_BFC20DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20DD4: 0C015E6B jal 0xB00579AC */ - cpu->gpr[31] = 0x80038DDCu; /* jal link before delay slot */ - psx_delay_BFC20DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038DD8u); -#endif - if (psx_delay_BFC20DD4) { - psx_delay_BFC20DD4 = 0; - cpu->gpr[31] = 0x80038DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800579ACu); - cpu->pc = 0x800579ACu; return; - } -label_BFC20DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20DDC: 14400009 bne $v0, $zero, 0xBFC20E04 */ - uint32_t psx_brA_BFC20DDC = cpu->gpr[2]; uint32_t psx_brB_BFC20DDC = cpu->gpr[0]; - psx_taken_BFC20DDC = (psx_brA_BFC20DDC != psx_brB_BFC20DDC); - psx_delay_BFC20DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DE0u); -#endif - /* 0xBFC20DE0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DE0u); -#endif - if (psx_delay_BFC20DDC) { - psx_delay_BFC20DDC = 0; - if (psx_taken_BFC20DDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E04u); - goto label_BFC20E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DE4u); - } -label_BFC20DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20DE4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038DE4u); -#endif -label_BFC20DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20DE8: 1A000006 blez $s0, 0xBFC20E04 */ - uint32_t psx_brA_BFC20DE8 = cpu->gpr[16]; - psx_taken_BFC20DE8 = ((int32_t)psx_brA_BFC20DE8 <= 0); - psx_delay_BFC20DE8 = 1; - /* 0xBFC20DEC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038DECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038DECu); -#endif - if (psx_delay_BFC20DE8) { - psx_delay_BFC20DE8 = 0; - if (psx_taken_BFC20DE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E04u); - goto label_BFC20E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DF0u); - } -label_BFC20DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20DF0: 0C015E6B jal 0xB00579AC */ - cpu->gpr[31] = 0x80038DF8u; /* jal link before delay slot */ - psx_delay_BFC20DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20DF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038DF4u); -#endif - if (psx_delay_BFC20DF0) { - psx_delay_BFC20DF0 = 0; - cpu->gpr[31] = 0x80038DF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800579ACu); - cpu->pc = 0x800579ACu; return; - } -label_BFC20DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20DF8: 1040FFFB beq $v0, $zero, 0xBFC20DE8 */ - uint32_t psx_brA_BFC20DF8 = cpu->gpr[2]; uint32_t psx_brB_BFC20DF8 = cpu->gpr[0]; - psx_taken_BFC20DF8 = (psx_brA_BFC20DF8 == psx_brB_BFC20DF8); - psx_delay_BFC20DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20DFC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038DFCu); -#endif - if (psx_delay_BFC20DF8) { - psx_delay_BFC20DF8 = 0; - if (psx_taken_BFC20DF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038DE8u); - goto label_BFC20DE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E00u); - } -label_BFC20E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E00u); -#endif - /* 0xBFC20E00: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E00u); -#endif -label_BFC20E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E04u); -#endif - /* 0xBFC20E04: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E04u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20E08: 03E00008 jr $ra */ - psx_delay_BFC20E08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20E0C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E0Cu); -#endif - if (psx_delay_BFC20E08) { - psx_delay_BFC20E08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20E10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20E10u); - int psx_delay_BFC20E1C = 0; - int psx_delay_BFC20E28 = 0; - int psx_taken_BFC20E28 = 0; - int psx_delay_BFC20E30 = 0; - int psx_delay_BFC20E38 = 0; - int psx_taken_BFC20E38 = 0; - int psx_delay_BFC20E44 = 0; - int psx_taken_BFC20E44 = 0; - int psx_delay_BFC20E4C = 0; - int psx_delay_BFC20E54 = 0; - int psx_taken_BFC20E54 = 0; - int psx_delay_BFC20E64 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20E24u: goto label_BFC20E24; - case 0xBFC20E30u: goto label_BFC20E30; - case 0xBFC20E38u: goto label_BFC20E38; - case 0xBFC20E40u: goto label_BFC20E40; - case 0xBFC20E44u: goto label_BFC20E44; - case 0xBFC20E4Cu: goto label_BFC20E4C; - case 0xBFC20E54u: goto label_BFC20E54; - case 0xBFC20E5Cu: goto label_BFC20E5C; - case 0xBFC20E60u: goto label_BFC20E60; - default: break; - } - } -label_BFC20E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20E10: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20E14: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E14u); return; } g_debug_last_store_pc = 0x80038E14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20E18: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E18u); return; } g_debug_last_store_pc = 0x80038E18u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20E1C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038E24u; /* jal link before delay slot */ - psx_delay_BFC20E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20E20: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038E20u); -#endif - if (psx_delay_BFC20E1C) { - psx_delay_BFC20E1C = 0; - cpu->gpr[31] = 0x80038E24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20E24: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E28: 1A00000D blez $s0, 0xBFC20E60 */ - uint32_t psx_brA_BFC20E28 = cpu->gpr[16]; - psx_taken_BFC20E28 = ((int32_t)psx_brA_BFC20E28 <= 0); - psx_delay_BFC20E28 = 1; - /* 0xBFC20E2C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E2Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E2Cu); -#endif - if (psx_delay_BFC20E28) { - psx_delay_BFC20E28 = 0; - if (psx_taken_BFC20E28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E60u); - goto label_BFC20E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E30u); - } -label_BFC20E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20E30: 0C015E84 jal 0xB0057A10 */ - cpu->gpr[31] = 0x80038E38u; /* jal link before delay slot */ - psx_delay_BFC20E30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20E34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038E34u); -#endif - if (psx_delay_BFC20E30) { - psx_delay_BFC20E30 = 0; - cpu->gpr[31] = 0x80038E38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A10u); - cpu->pc = 0x80057A10u; return; - } -label_BFC20E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20E38: 14400009 bne $v0, $zero, 0xBFC20E60 */ - uint32_t psx_brA_BFC20E38 = cpu->gpr[2]; uint32_t psx_brB_BFC20E38 = cpu->gpr[0]; - psx_taken_BFC20E38 = (psx_brA_BFC20E38 != psx_brB_BFC20E38); - psx_delay_BFC20E38 = 1; - /* 0xBFC20E3C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E3Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E3Cu); -#endif - if (psx_delay_BFC20E38) { - psx_delay_BFC20E38 = 0; - if (psx_taken_BFC20E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E60u); - goto label_BFC20E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E40u); - } -label_BFC20E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E40: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038E40u); -#endif -label_BFC20E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E44: 1A000006 blez $s0, 0xBFC20E60 */ - uint32_t psx_brA_BFC20E44 = cpu->gpr[16]; - psx_taken_BFC20E44 = ((int32_t)psx_brA_BFC20E44 <= 0); - psx_delay_BFC20E44 = 1; - /* 0xBFC20E48: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E48u); -#endif - if (psx_delay_BFC20E44) { - psx_delay_BFC20E44 = 0; - if (psx_taken_BFC20E44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E60u); - goto label_BFC20E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E4Cu); - } -label_BFC20E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20E4C: 0C015E84 jal 0xB0057A10 */ - cpu->gpr[31] = 0x80038E54u; /* jal link before delay slot */ - psx_delay_BFC20E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038E50u); -#endif - if (psx_delay_BFC20E4C) { - psx_delay_BFC20E4C = 0; - cpu->gpr[31] = 0x80038E54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A10u); - cpu->pc = 0x80057A10u; return; - } -label_BFC20E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20E54: 1040FFFB beq $v0, $zero, 0xBFC20E44 */ - uint32_t psx_brA_BFC20E54 = cpu->gpr[2]; uint32_t psx_brB_BFC20E54 = cpu->gpr[0]; - psx_taken_BFC20E54 = (psx_brA_BFC20E54 == psx_brB_BFC20E54); - psx_delay_BFC20E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E58: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038E58u); -#endif - if (psx_delay_BFC20E54) { - psx_delay_BFC20E54 = 0; - if (psx_taken_BFC20E54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E44u); - goto label_BFC20E44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E5Cu); - } -label_BFC20E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E5Cu); -#endif - /* 0xBFC20E5C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E5Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E5Cu); -#endif -label_BFC20E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E60u); -#endif - /* 0xBFC20E60: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E60u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20E64: 03E00008 jr $ra */ - psx_delay_BFC20E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20E68: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E68u); -#endif - if (psx_delay_BFC20E64) { - psx_delay_BFC20E64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20E6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20E6Cu); - int psx_delay_BFC20E78 = 0; - int psx_delay_BFC20E84 = 0; - int psx_taken_BFC20E84 = 0; - int psx_delay_BFC20E8C = 0; - int psx_delay_BFC20E94 = 0; - int psx_taken_BFC20E94 = 0; - int psx_delay_BFC20EA0 = 0; - int psx_taken_BFC20EA0 = 0; - int psx_delay_BFC20EA8 = 0; - int psx_delay_BFC20EB0 = 0; - int psx_taken_BFC20EB0 = 0; - int psx_delay_BFC20EC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20E80u: goto label_BFC20E80; - case 0xBFC20E8Cu: goto label_BFC20E8C; - case 0xBFC20E94u: goto label_BFC20E94; - case 0xBFC20E9Cu: goto label_BFC20E9C; - case 0xBFC20EA0u: goto label_BFC20EA0; - case 0xBFC20EA8u: goto label_BFC20EA8; - case 0xBFC20EB0u: goto label_BFC20EB0; - case 0xBFC20EB8u: goto label_BFC20EB8; - case 0xBFC20EBCu: goto label_BFC20EBC; - default: break; - } - } -label_BFC20E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20E6C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20E70: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E70u); return; } g_debug_last_store_pc = 0x80038E70u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20E74: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E74u); return; } g_debug_last_store_pc = 0x80038E74u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20E78: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038E80u; /* jal link before delay slot */ - psx_delay_BFC20E78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20E7C: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038E7Cu); -#endif - if (psx_delay_BFC20E78) { - psx_delay_BFC20E78 = 0; - cpu->gpr[31] = 0x80038E80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20E80: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E84: 1A00000D blez $s0, 0xBFC20EBC */ - uint32_t psx_brA_BFC20E84 = cpu->gpr[16]; - psx_taken_BFC20E84 = ((int32_t)psx_brA_BFC20E84 <= 0); - psx_delay_BFC20E84 = 1; - /* 0xBFC20E88: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E88u); -#endif - if (psx_delay_BFC20E84) { - psx_delay_BFC20E84 = 0; - if (psx_taken_BFC20E84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EBCu); - goto label_BFC20EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E8Cu); - } -label_BFC20E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20E8C: 0C015EBB jal 0xB0057AEC */ - cpu->gpr[31] = 0x80038E94u; /* jal link before delay slot */ - psx_delay_BFC20E8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20E90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038E90u); -#endif - if (psx_delay_BFC20E8C) { - psx_delay_BFC20E8C = 0; - cpu->gpr[31] = 0x80038E94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AECu); - cpu->pc = 0x80057AECu; return; - } -label_BFC20E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20E94: 14400009 bne $v0, $zero, 0xBFC20EBC */ - uint32_t psx_brA_BFC20E94 = cpu->gpr[2]; uint32_t psx_brB_BFC20E94 = cpu->gpr[0]; - psx_taken_BFC20E94 = (psx_brA_BFC20E94 != psx_brB_BFC20E94); - psx_delay_BFC20E94 = 1; - /* 0xBFC20E98: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038E98u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038E98u); -#endif - if (psx_delay_BFC20E94) { - psx_delay_BFC20E94 = 0; - if (psx_taken_BFC20E94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EBCu); - goto label_BFC20EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038E9Cu); - } -label_BFC20E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20E9C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038E9Cu); -#endif -label_BFC20EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20EA0: 1A000006 blez $s0, 0xBFC20EBC */ - uint32_t psx_brA_BFC20EA0 = cpu->gpr[16]; - psx_taken_BFC20EA0 = ((int32_t)psx_brA_BFC20EA0 <= 0); - psx_delay_BFC20EA0 = 1; - /* 0xBFC20EA4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038EA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038EA4u); -#endif - if (psx_delay_BFC20EA0) { - psx_delay_BFC20EA0 = 0; - if (psx_taken_BFC20EA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EBCu); - goto label_BFC20EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EA8u); - } -label_BFC20EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20EA8: 0C015EBB jal 0xB0057AEC */ - cpu->gpr[31] = 0x80038EB0u; /* jal link before delay slot */ - psx_delay_BFC20EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20EAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038EACu); -#endif - if (psx_delay_BFC20EA8) { - psx_delay_BFC20EA8 = 0; - cpu->gpr[31] = 0x80038EB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AECu); - cpu->pc = 0x80057AECu; return; - } -label_BFC20EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20EB0: 1040FFFB beq $v0, $zero, 0xBFC20EA0 */ - uint32_t psx_brA_BFC20EB0 = cpu->gpr[2]; uint32_t psx_brB_BFC20EB0 = cpu->gpr[0]; - psx_taken_BFC20EB0 = (psx_brA_BFC20EB0 == psx_brB_BFC20EB0); - psx_delay_BFC20EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20EB4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038EB4u); -#endif - if (psx_delay_BFC20EB0) { - psx_delay_BFC20EB0 = 0; - if (psx_taken_BFC20EB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EA0u); - goto label_BFC20EA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EB8u); - } -label_BFC20EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EB8u); -#endif - /* 0xBFC20EB8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038EB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038EB8u); -#endif -label_BFC20EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EBCu); -#endif - /* 0xBFC20EBC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038EBCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20EC0: 03E00008 jr $ra */ - psx_delay_BFC20EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20EC4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038EC4u); -#endif - if (psx_delay_BFC20EC0) { - psx_delay_BFC20EC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20EC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20EC8u); - int psx_delay_BFC20ED4 = 0; - int psx_delay_BFC20EE0 = 0; - int psx_taken_BFC20EE0 = 0; - int psx_delay_BFC20EE8 = 0; - int psx_delay_BFC20EF0 = 0; - int psx_taken_BFC20EF0 = 0; - int psx_delay_BFC20EFC = 0; - int psx_taken_BFC20EFC = 0; - int psx_delay_BFC20F04 = 0; - int psx_delay_BFC20F0C = 0; - int psx_taken_BFC20F0C = 0; - int psx_delay_BFC20F1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20EDCu: goto label_BFC20EDC; - case 0xBFC20EE8u: goto label_BFC20EE8; - case 0xBFC20EF0u: goto label_BFC20EF0; - case 0xBFC20EF8u: goto label_BFC20EF8; - case 0xBFC20EFCu: goto label_BFC20EFC; - case 0xBFC20F04u: goto label_BFC20F04; - case 0xBFC20F0Cu: goto label_BFC20F0C; - case 0xBFC20F14u: goto label_BFC20F14; - case 0xBFC20F18u: goto label_BFC20F18; - default: break; - } - } -label_BFC20EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20EC8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20ECC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038ECCu); return; } g_debug_last_store_pc = 0x80038ECCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20ED0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038ED0u); return; } g_debug_last_store_pc = 0x80038ED0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20ED4: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038EDCu; /* jal link before delay slot */ - psx_delay_BFC20ED4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20ED8: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038ED8u); -#endif - if (psx_delay_BFC20ED4) { - psx_delay_BFC20ED4 = 0; - cpu->gpr[31] = 0x80038EDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20EDC: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20EE0: 1A00000D blez $s0, 0xBFC20F18 */ - uint32_t psx_brA_BFC20EE0 = cpu->gpr[16]; - psx_taken_BFC20EE0 = ((int32_t)psx_brA_BFC20EE0 <= 0); - psx_delay_BFC20EE0 = 1; - /* 0xBFC20EE4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038EE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038EE4u); -#endif - if (psx_delay_BFC20EE0) { - psx_delay_BFC20EE0 = 0; - if (psx_taken_BFC20EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F18u); - goto label_BFC20F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EE8u); - } -label_BFC20EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20EE8: 0C015EDD jal 0xB0057B74 */ - cpu->gpr[31] = 0x80038EF0u; /* jal link before delay slot */ - psx_delay_BFC20EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20EEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038EECu); -#endif - if (psx_delay_BFC20EE8) { - psx_delay_BFC20EE8 = 0; - cpu->gpr[31] = 0x80038EF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B74u); - cpu->pc = 0x80057B74u; return; - } -label_BFC20EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20EF0: 14400009 bne $v0, $zero, 0xBFC20F18 */ - uint32_t psx_brA_BFC20EF0 = cpu->gpr[2]; uint32_t psx_brB_BFC20EF0 = cpu->gpr[0]; - psx_taken_BFC20EF0 = (psx_brA_BFC20EF0 != psx_brB_BFC20EF0); - psx_delay_BFC20EF0 = 1; - /* 0xBFC20EF4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038EF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038EF4u); -#endif - if (psx_delay_BFC20EF0) { - psx_delay_BFC20EF0 = 0; - if (psx_taken_BFC20EF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F18u); - goto label_BFC20F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EF8u); - } -label_BFC20EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20EF8: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038EF8u); -#endif -label_BFC20EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20EFC: 1A000006 blez $s0, 0xBFC20F18 */ - uint32_t psx_brA_BFC20EFC = cpu->gpr[16]; - psx_taken_BFC20EFC = ((int32_t)psx_brA_BFC20EFC <= 0); - psx_delay_BFC20EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F00u); -#endif - /* 0xBFC20F00: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F00u); -#endif - if (psx_delay_BFC20EFC) { - psx_delay_BFC20EFC = 0; - if (psx_taken_BFC20EFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F18u); - goto label_BFC20F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F04u); - } -label_BFC20F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20F04: 0C015EDD jal 0xB0057B74 */ - cpu->gpr[31] = 0x80038F0Cu; /* jal link before delay slot */ - psx_delay_BFC20F04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20F08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038F08u); -#endif - if (psx_delay_BFC20F04) { - psx_delay_BFC20F04 = 0; - cpu->gpr[31] = 0x80038F0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B74u); - cpu->pc = 0x80057B74u; return; - } -label_BFC20F0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20F0C: 1040FFFB beq $v0, $zero, 0xBFC20EFC */ - uint32_t psx_brA_BFC20F0C = cpu->gpr[2]; uint32_t psx_brB_BFC20F0C = cpu->gpr[0]; - psx_taken_BFC20F0C = (psx_brA_BFC20F0C == psx_brB_BFC20F0C); - psx_delay_BFC20F0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20F10: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038F10u); -#endif - if (psx_delay_BFC20F0C) { - psx_delay_BFC20F0C = 0; - if (psx_taken_BFC20F0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038EFCu); - goto label_BFC20EFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F14u); - } -label_BFC20F14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F14u); -#endif - /* 0xBFC20F14: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F14u); -#endif -label_BFC20F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F18u); -#endif - /* 0xBFC20F18: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F18u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20F1C: 03E00008 jr $ra */ - psx_delay_BFC20F1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20F20: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038F20u); -#endif - if (psx_delay_BFC20F1C) { - psx_delay_BFC20F1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20F24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20F24u); - int psx_delay_BFC20F38 = 0; - int psx_delay_BFC20F44 = 0; - int psx_taken_BFC20F44 = 0; - int psx_delay_BFC20F4C = 0; - int psx_delay_BFC20F54 = 0; - int psx_taken_BFC20F54 = 0; - int psx_delay_BFC20F60 = 0; - int psx_taken_BFC20F60 = 0; - int psx_delay_BFC20F68 = 0; - int psx_delay_BFC20F70 = 0; - int psx_taken_BFC20F70 = 0; - int psx_delay_BFC20F84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20F40u: goto label_BFC20F40; - case 0xBFC20F4Cu: goto label_BFC20F4C; - case 0xBFC20F54u: goto label_BFC20F54; - case 0xBFC20F5Cu: goto label_BFC20F5C; - case 0xBFC20F60u: goto label_BFC20F60; - case 0xBFC20F68u: goto label_BFC20F68; - case 0xBFC20F70u: goto label_BFC20F70; - case 0xBFC20F78u: goto label_BFC20F78; - case 0xBFC20F7Cu: goto label_BFC20F7C; - default: break; - } - } -label_BFC20F24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20F24: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20F28: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F28u); return; } g_debug_last_store_pc = 0x80038F28u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC20F2C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F2Cu); return; } g_debug_last_store_pc = 0x80038F2Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20F30: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F30u); return; } g_debug_last_store_pc = 0x80038F30u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC20F34: 309100FF andi $s1, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x309100FFu, cpu->gpr[17], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20F38: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038F40u; /* jal link before delay slot */ - psx_delay_BFC20F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20F3C: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038F3Cu); -#endif - if (psx_delay_BFC20F38) { - psx_delay_BFC20F38 = 0; - cpu->gpr[31] = 0x80038F40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20F40: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20F44: 1A00000D blez $s0, 0xBFC20F7C */ - uint32_t psx_brA_BFC20F44 = cpu->gpr[16]; - psx_taken_BFC20F44 = ((int32_t)psx_brA_BFC20F44 <= 0); - psx_delay_BFC20F44 = 1; - /* 0xBFC20F48: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F48u); -#endif - if (psx_delay_BFC20F44) { - psx_delay_BFC20F44 = 0; - if (psx_taken_BFC20F44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F7Cu); - goto label_BFC20F7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F4Cu); - } -label_BFC20F4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20F4C: 0C016061 jal 0xB0058184 */ - cpu->gpr[31] = 0x80038F54u; /* jal link before delay slot */ - psx_delay_BFC20F4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20F50: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038F50u); -#endif - if (psx_delay_BFC20F4C) { - psx_delay_BFC20F4C = 0; - cpu->gpr[31] = 0x80038F54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058184u); - cpu->pc = 0x80058184u; return; - } -label_BFC20F54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20F54: 14400009 bne $v0, $zero, 0xBFC20F7C */ - uint32_t psx_brA_BFC20F54 = cpu->gpr[2]; uint32_t psx_brB_BFC20F54 = cpu->gpr[0]; - psx_taken_BFC20F54 = (psx_brA_BFC20F54 != psx_brB_BFC20F54); - psx_delay_BFC20F54 = 1; - /* 0xBFC20F58: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F58u); -#endif - if (psx_delay_BFC20F54) { - psx_delay_BFC20F54 = 0; - if (psx_taken_BFC20F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F7Cu); - goto label_BFC20F7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F5Cu); - } -label_BFC20F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20F5C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038F5Cu); -#endif -label_BFC20F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20F60: 1A000006 blez $s0, 0xBFC20F7C */ - uint32_t psx_brA_BFC20F60 = cpu->gpr[16]; - psx_taken_BFC20F60 = ((int32_t)psx_brA_BFC20F60 <= 0); - psx_delay_BFC20F60 = 1; - /* 0xBFC20F64: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F64u); -#endif - if (psx_delay_BFC20F60) { - psx_delay_BFC20F60 = 0; - if (psx_taken_BFC20F60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F7Cu); - goto label_BFC20F7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F68u); - } -label_BFC20F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20F68: 0C016061 jal 0xB0058184 */ - cpu->gpr[31] = 0x80038F70u; /* jal link before delay slot */ - psx_delay_BFC20F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC20F6C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80038F6Cu); -#endif - if (psx_delay_BFC20F68) { - psx_delay_BFC20F68 = 0; - cpu->gpr[31] = 0x80038F70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058184u); - cpu->pc = 0x80058184u; return; - } -label_BFC20F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20F70: 1040FFFB beq $v0, $zero, 0xBFC20F60 */ - uint32_t psx_brA_BFC20F70 = cpu->gpr[2]; uint32_t psx_brB_BFC20F70 = cpu->gpr[0]; - psx_taken_BFC20F70 = (psx_brA_BFC20F70 == psx_brB_BFC20F70); - psx_delay_BFC20F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20F74: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038F74u); -#endif - if (psx_delay_BFC20F70) { - psx_delay_BFC20F70 = 0; - if (psx_taken_BFC20F70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F60u); - goto label_BFC20F60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038F78u); - } -label_BFC20F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F78u); -#endif - /* 0xBFC20F78: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F78u); -#endif -label_BFC20F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F7Cu); -#endif - /* 0xBFC20F7C: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F7Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F80u); -#endif - /* 0xBFC20F80: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F80u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20F84: 03E00008 jr $ra */ - psx_delay_BFC20F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20F88: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038F88u); -#endif - if (psx_delay_BFC20F84) { - psx_delay_BFC20F84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20F8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20F8Cu); - int psx_delay_BFC20F98 = 0; - int psx_delay_BFC20FA4 = 0; - int psx_taken_BFC20FA4 = 0; - int psx_delay_BFC20FAC = 0; - int psx_delay_BFC20FB4 = 0; - int psx_taken_BFC20FB4 = 0; - int psx_delay_BFC20FC0 = 0; - int psx_taken_BFC20FC0 = 0; - int psx_delay_BFC20FC8 = 0; - int psx_delay_BFC20FD0 = 0; - int psx_taken_BFC20FD0 = 0; - int psx_delay_BFC20FE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20FA0u: goto label_BFC20FA0; - case 0xBFC20FACu: goto label_BFC20FAC; - case 0xBFC20FB4u: goto label_BFC20FB4; - case 0xBFC20FBCu: goto label_BFC20FBC; - case 0xBFC20FC0u: goto label_BFC20FC0; - case 0xBFC20FC8u: goto label_BFC20FC8; - case 0xBFC20FD0u: goto label_BFC20FD0; - case 0xBFC20FD8u: goto label_BFC20FD8; - case 0xBFC20FDCu: goto label_BFC20FDC; - default: break; - } - } -label_BFC20F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20F8C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20F90: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F90u); return; } g_debug_last_store_pc = 0x80038F90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20F94: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038F94u); return; } g_debug_last_store_pc = 0x80038F94u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20F98: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038FA0u; /* jal link before delay slot */ - psx_delay_BFC20F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20F9C: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038F9Cu); -#endif - if (psx_delay_BFC20F98) { - psx_delay_BFC20F98 = 0; - cpu->gpr[31] = 0x80038FA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20FA0: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20FA4: 1A00000D blez $s0, 0xBFC20FDC */ - uint32_t psx_brA_BFC20FA4 = cpu->gpr[16]; - psx_taken_BFC20FA4 = ((int32_t)psx_brA_BFC20FA4 <= 0); - psx_delay_BFC20FA4 = 1; - /* 0xBFC20FA8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FA8u); -#endif - if (psx_delay_BFC20FA4) { - psx_delay_BFC20FA4 = 0; - if (psx_taken_BFC20FA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FDCu); - goto label_BFC20FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FACu); - } -label_BFC20FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20FAC: 0C01600D jal 0xB0058034 */ - cpu->gpr[31] = 0x80038FB4u; /* jal link before delay slot */ - psx_delay_BFC20FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038FB0u); -#endif - if (psx_delay_BFC20FAC) { - psx_delay_BFC20FAC = 0; - cpu->gpr[31] = 0x80038FB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058034u); - cpu->pc = 0x80058034u; return; - } -label_BFC20FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20FB4: 14400009 bne $v0, $zero, 0xBFC20FDC */ - uint32_t psx_brA_BFC20FB4 = cpu->gpr[2]; uint32_t psx_brB_BFC20FB4 = cpu->gpr[0]; - psx_taken_BFC20FB4 = (psx_brA_BFC20FB4 != psx_brB_BFC20FB4); - psx_delay_BFC20FB4 = 1; - /* 0xBFC20FB8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FB8u); -#endif - if (psx_delay_BFC20FB4) { - psx_delay_BFC20FB4 = 0; - if (psx_taken_BFC20FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FDCu); - goto label_BFC20FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FBCu); - } -label_BFC20FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20FBC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038FBCu); -#endif -label_BFC20FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20FC0: 1A000006 blez $s0, 0xBFC20FDC */ - uint32_t psx_brA_BFC20FC0 = cpu->gpr[16]; - psx_taken_BFC20FC0 = ((int32_t)psx_brA_BFC20FC0 <= 0); - psx_delay_BFC20FC0 = 1; - /* 0xBFC20FC4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FC4u); -#endif - if (psx_delay_BFC20FC0) { - psx_delay_BFC20FC0 = 0; - if (psx_taken_BFC20FC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FDCu); - goto label_BFC20FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FC8u); - } -label_BFC20FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20FC8: 0C01600D jal 0xB0058034 */ - cpu->gpr[31] = 0x80038FD0u; /* jal link before delay slot */ - psx_delay_BFC20FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC20FCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80038FCCu); -#endif - if (psx_delay_BFC20FC8) { - psx_delay_BFC20FC8 = 0; - cpu->gpr[31] = 0x80038FD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058034u); - cpu->pc = 0x80058034u; return; - } -label_BFC20FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC20FD0: 1040FFFB beq $v0, $zero, 0xBFC20FC0 */ - uint32_t psx_brA_BFC20FD0 = cpu->gpr[2]; uint32_t psx_brB_BFC20FD0 = cpu->gpr[0]; - psx_taken_BFC20FD0 = (psx_brA_BFC20FD0 == psx_brB_BFC20FD0); - psx_delay_BFC20FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC20FD4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80038FD4u); -#endif - if (psx_delay_BFC20FD0) { - psx_delay_BFC20FD0 = 0; - if (psx_taken_BFC20FD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FC0u); - goto label_BFC20FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80038FD8u); - } -label_BFC20FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FD8u); -#endif - /* 0xBFC20FD8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FD8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FD8u); -#endif -label_BFC20FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FDCu); -#endif - /* 0xBFC20FDC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FDCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC20FE0: 03E00008 jr $ra */ - psx_delay_BFC20FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20FE4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80038FE4u); -#endif - if (psx_delay_BFC20FE0) { - psx_delay_BFC20FE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC20FE8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC20FE8u); - int psx_delay_BFC20FF4 = 0; - int psx_delay_BFC21000 = 0; - int psx_taken_BFC21000 = 0; - int psx_delay_BFC21008 = 0; - int psx_delay_BFC21010 = 0; - int psx_taken_BFC21010 = 0; - int psx_delay_BFC2101C = 0; - int psx_taken_BFC2101C = 0; - int psx_delay_BFC21024 = 0; - int psx_delay_BFC2102C = 0; - int psx_taken_BFC2102C = 0; - int psx_delay_BFC2103C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC20FFCu: goto label_BFC20FFC; - case 0xBFC21008u: goto label_BFC21008; - case 0xBFC21010u: goto label_BFC21010; - case 0xBFC21018u: goto label_BFC21018; - case 0xBFC2101Cu: goto label_BFC2101C; - case 0xBFC21024u: goto label_BFC21024; - case 0xBFC2102Cu: goto label_BFC2102C; - case 0xBFC21034u: goto label_BFC21034; - case 0xBFC21038u: goto label_BFC21038; - default: break; - } - } -label_BFC20FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC20FE8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80038FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC20FEC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FECu); return; } g_debug_last_store_pc = 0x80038FECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC20FF0: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80038FF0u); return; } g_debug_last_store_pc = 0x80038FF0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80038FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC20FF4: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80038FFCu; /* jal link before delay slot */ - psx_delay_BFC20FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20FF8: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80038FF8u); -#endif - if (psx_delay_BFC20FF4) { - psx_delay_BFC20FF4 = 0; - cpu->gpr[31] = 0x80038FFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC20FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC20FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC20FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80038FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC20FFC: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80038FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21000: 1A00000D blez $s0, 0xBFC21038 */ - uint32_t psx_brA_BFC21000 = cpu->gpr[16]; - psx_taken_BFC21000 = ((int32_t)psx_brA_BFC21000 <= 0); - psx_delay_BFC21000 = 1; - /* 0xBFC21004: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039004u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039004u); -#endif - if (psx_delay_BFC21000) { - psx_delay_BFC21000 = 0; - if (psx_taken_BFC21000) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039038u); - goto label_BFC21038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039008u); - } -label_BFC21008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21008: 0C016037 jal 0xB00580DC */ - cpu->gpr[31] = 0x80039010u; /* jal link before delay slot */ - psx_delay_BFC21008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2100C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003900Cu); -#endif - if (psx_delay_BFC21008) { - psx_delay_BFC21008 = 0; - cpu->gpr[31] = 0x80039010u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580DCu); - cpu->pc = 0x800580DCu; return; - } -label_BFC21010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21010: 14400009 bne $v0, $zero, 0xBFC21038 */ - uint32_t psx_brA_BFC21010 = cpu->gpr[2]; uint32_t psx_brB_BFC21010 = cpu->gpr[0]; - psx_taken_BFC21010 = (psx_brA_BFC21010 != psx_brB_BFC21010); - psx_delay_BFC21010 = 1; - /* 0xBFC21014: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039014u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039014u); -#endif - if (psx_delay_BFC21010) { - psx_delay_BFC21010 = 0; - if (psx_taken_BFC21010) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039038u); - goto label_BFC21038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039018u); - } -label_BFC21018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21018: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039018u); -#endif -label_BFC2101C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2101Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003901Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2101C: 1A000006 blez $s0, 0xBFC21038 */ - uint32_t psx_brA_BFC2101C = cpu->gpr[16]; - psx_taken_BFC2101C = ((int32_t)psx_brA_BFC2101C <= 0); - psx_delay_BFC2101C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039020u); -#endif - /* 0xBFC21020: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039020u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039020u); -#endif - if (psx_delay_BFC2101C) { - psx_delay_BFC2101C = 0; - if (psx_taken_BFC2101C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039038u); - goto label_BFC21038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039024u); - } -label_BFC21024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21024: 0C016037 jal 0xB00580DC */ - cpu->gpr[31] = 0x8003902Cu; /* jal link before delay slot */ - psx_delay_BFC21024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039028u); -#endif - if (psx_delay_BFC21024) { - psx_delay_BFC21024 = 0; - cpu->gpr[31] = 0x8003902Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580DCu); - cpu->pc = 0x800580DCu; return; - } -label_BFC2102C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2102Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003902Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2102C: 1040FFFB beq $v0, $zero, 0xBFC2101C */ - uint32_t psx_brA_BFC2102C = cpu->gpr[2]; uint32_t psx_brB_BFC2102C = cpu->gpr[0]; - psx_taken_BFC2102C = (psx_brA_BFC2102C == psx_brB_BFC2102C); - psx_delay_BFC2102C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21030: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039030u); -#endif - if (psx_delay_BFC2102C) { - psx_delay_BFC2102C = 0; - if (psx_taken_BFC2102C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003901Cu); - goto label_BFC2101C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039034u); - } -label_BFC21034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039034u); -#endif - /* 0xBFC21034: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039034u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039034u); -#endif -label_BFC21038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039038u); -#endif - /* 0xBFC21038: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039038u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2103C: 03E00008 jr $ra */ - psx_delay_BFC2103C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21040: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80039040u); -#endif - if (psx_delay_BFC2103C) { - psx_delay_BFC2103C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21044(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21044u); - int psx_delay_BFC21058 = 0; - int psx_delay_BFC21064 = 0; - int psx_taken_BFC21064 = 0; - int psx_delay_BFC2106C = 0; - int psx_delay_BFC21074 = 0; - int psx_taken_BFC21074 = 0; - int psx_delay_BFC21080 = 0; - int psx_taken_BFC21080 = 0; - int psx_delay_BFC21088 = 0; - int psx_delay_BFC21090 = 0; - int psx_taken_BFC21090 = 0; - int psx_delay_BFC21098 = 0; - int psx_taken_BFC21098 = 0; - int psx_delay_BFC210A4 = 0; - int psx_delay_BFC210B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21060u: goto label_BFC21060; - case 0xBFC2106Cu: goto label_BFC2106C; - case 0xBFC21074u: goto label_BFC21074; - case 0xBFC2107Cu: goto label_BFC2107C; - case 0xBFC21088u: goto label_BFC21088; - case 0xBFC21090u: goto label_BFC21090; - case 0xBFC21098u: goto label_BFC21098; - case 0xBFC210A0u: goto label_BFC210A0; - case 0xBFC210ACu: goto label_BFC210AC; - case 0xBFC210B0u: goto label_BFC210B0; - default: break; - } - } -label_BFC21044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21044: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80039044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21048: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039048u); return; } g_debug_last_store_pc = 0x80039048u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2104C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003904Cu); return; } g_debug_last_store_pc = 0x8003904Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003904Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21050: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039050u); return; } g_debug_last_store_pc = 0x80039050u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21054: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21058: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80039060u; /* jal link before delay slot */ - psx_delay_BFC21058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2105C: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003905Cu); -#endif - if (psx_delay_BFC21058) { - psx_delay_BFC21058 = 0; - cpu->gpr[31] = 0x80039060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC21060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21060: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80039060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21064: 1A00000C blez $s0, 0xBFC21098 */ - uint32_t psx_brA_BFC21064 = cpu->gpr[16]; - psx_taken_BFC21064 = ((int32_t)psx_brA_BFC21064 <= 0); - psx_delay_BFC21064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039068u); -#endif - if (psx_delay_BFC21064) { - psx_delay_BFC21064 = 0; - if (psx_taken_BFC21064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039098u); - goto label_BFC21098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003906Cu); - } -label_BFC2106C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2106Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2106C: 0C015E39 jal 0xB00578E4 */ - cpu->gpr[31] = 0x80039074u; /* jal link before delay slot */ - psx_delay_BFC2106C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21070: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039070u); -#endif - if (psx_delay_BFC2106C) { - psx_delay_BFC2106C = 0; - cpu->gpr[31] = 0x80039074u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800578E4u); - cpu->pc = 0x800578E4u; return; - } -label_BFC21074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21074: 14400008 bne $v0, $zero, 0xBFC21098 */ - uint32_t psx_brA_BFC21074 = cpu->gpr[2]; uint32_t psx_brB_BFC21074 = cpu->gpr[0]; - psx_taken_BFC21074 = (psx_brA_BFC21074 != psx_brB_BFC21074); - psx_delay_BFC21074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039078u); -#endif - if (psx_delay_BFC21074) { - psx_delay_BFC21074 = 0; - if (psx_taken_BFC21074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039098u); - goto label_BFC21098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003907Cu); - } -label_BFC2107C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2107Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2107Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003907Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2107C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003907Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21080: 1A000005 blez $s0, 0xBFC21098 */ - uint32_t psx_brA_BFC21080 = cpu->gpr[16]; - psx_taken_BFC21080 = ((int32_t)psx_brA_BFC21080 <= 0); - psx_delay_BFC21080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039084u); -#endif - if (psx_delay_BFC21080) { - psx_delay_BFC21080 = 0; - if (psx_taken_BFC21080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039098u); - goto label_BFC21098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039088u); - } -label_BFC21088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21088: 0C015E39 jal 0xB00578E4 */ - cpu->gpr[31] = 0x80039090u; /* jal link before delay slot */ - psx_delay_BFC21088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2108C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003908Cu); -#endif - if (psx_delay_BFC21088) { - psx_delay_BFC21088 = 0; - cpu->gpr[31] = 0x80039090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800578E4u); - cpu->pc = 0x800578E4u; return; - } -label_BFC21090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21090: 1040FFFA beq $v0, $zero, 0xBFC2107C */ - uint32_t psx_brA_BFC21090 = cpu->gpr[2]; uint32_t psx_brB_BFC21090 = cpu->gpr[0]; - psx_taken_BFC21090 = (psx_brA_BFC21090 == psx_brB_BFC21090); - psx_delay_BFC21090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039094u); -#endif - if (psx_delay_BFC21090) { - psx_delay_BFC21090 = 0; - if (psx_taken_BFC21090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003907Cu); - goto label_BFC2107C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039098u); - } -label_BFC21098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21098: 16000005 bne $s0, $zero, 0xBFC210B0 */ - uint32_t psx_brA_BFC21098 = cpu->gpr[16]; uint32_t psx_brB_BFC21098 = cpu->gpr[0]; - psx_taken_BFC21098 = (psx_brA_BFC21098 != psx_brB_BFC21098); - psx_delay_BFC21098 = 1; - /* 0xBFC2109C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003909Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003909Cu); -#endif - if (psx_delay_BFC21098) { - psx_delay_BFC21098 = 0; - if (psx_taken_BFC21098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390B0u); - goto label_BFC210B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390A0u); - } -label_BFC210A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC210A0: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800390A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC210A4: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x800390ACu; /* jal link before delay slot */ - psx_delay_BFC210A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC210A8: 248469D8 addiu $a0, $a0, 27096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27096)); - PGXP_ALU(0x248469D8u, cpu->gpr[4], _pgx1, 0x000069D8u); } -#ifdef PSX_COSIM - cosim_instr(0x800390A8u); -#endif - if (psx_delay_BFC210A4) { - psx_delay_BFC210A4 = 0; - cpu->gpr[31] = 0x800390ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC210AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390ACu); -#endif - /* 0xBFC210AC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800390ACu); -#endif -label_BFC210B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390B0u); -#endif - /* 0xBFC210B0: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800390B0u); -#endif - /* 0xBFC210B4: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390B4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800390B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC210B8: 03E00008 jr $ra */ - psx_delay_BFC210B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC210BC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800390BCu); -#endif - if (psx_delay_BFC210B8) { - psx_delay_BFC210B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC210C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC210C0u); - int psx_delay_BFC210D4 = 0; - int psx_delay_BFC210E0 = 0; - int psx_taken_BFC210E0 = 0; - int psx_delay_BFC210E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC210DCu: goto label_BFC210DC; - case 0xBFC210E8u: goto label_BFC210E8; - default: break; - } - } -label_BFC210C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC210C0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800390C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC210C4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390C4u); return; } g_debug_last_store_pc = 0x800390C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800390C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC210C8: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390C8u); return; } g_debug_last_store_pc = 0x800390C8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800390C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC210CC: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390CCu); return; } g_debug_last_store_pc = 0x800390CCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800390CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC210D0: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800390D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC210D4: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x800390DCu; /* jal link before delay slot */ - psx_delay_BFC210D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC210D8: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800390D8u); -#endif - if (psx_delay_BFC210D4) { - psx_delay_BFC210D4 = 0; - cpu->gpr[31] = 0x800390DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC210DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC210DC: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x800390DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC210E0: 1A00000D blez $s0, 0xBFC21118 */ - uint32_t psx_brA_BFC210E0 = cpu->gpr[16]; - psx_taken_BFC210E0 = ((int32_t)psx_brA_BFC210E0 <= 0); - psx_delay_BFC210E0 = 1; - /* 0xBFC210E4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800390E4u); -#endif - if (psx_delay_BFC210E0) { - psx_delay_BFC210E0 = 0; - if (psx_taken_BFC210E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039118u); - cpu->pc = 0x80039118u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390E8u); - } -label_BFC210E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC210E8: 0C015D3C jal 0xB00574F0 */ - cpu->gpr[31] = 0x800390F0u; /* jal link before delay slot */ - psx_delay_BFC210E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC210EC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800390ECu); -#endif - if (psx_delay_BFC210E8) { - psx_delay_BFC210E8 = 0; - cpu->gpr[31] = 0x800390F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800574F0u); - cpu->pc = 0x800574F0u; return; - } -} - -void SCPH1001_func_1FC210F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC210F0u); - int psx_delay_BFC210F0 = 0; - int psx_taken_BFC210F0 = 0; - int psx_delay_BFC210FC = 0; - int psx_taken_BFC210FC = 0; - int psx_delay_BFC21104 = 0; - int psx_delay_BFC2110C = 0; - int psx_taken_BFC2110C = 0; - int psx_delay_BFC21120 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21118u: goto label_BFC21118; - case 0xBFC210F8u: goto label_BFC210F8; - case 0xBFC210FCu: goto label_BFC210FC; - case 0xBFC21104u: goto label_BFC21104; - case 0xBFC2110Cu: goto label_BFC2110C; - case 0xBFC21114u: goto label_BFC21114; - default: break; - } - } -label_BFC210F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC210F0: 14400009 bne $v0, $zero, 0xBFC21118 */ - uint32_t psx_brA_BFC210F0 = cpu->gpr[2]; uint32_t psx_brB_BFC210F0 = cpu->gpr[0]; - psx_taken_BFC210F0 = (psx_brA_BFC210F0 != psx_brB_BFC210F0); - psx_delay_BFC210F0 = 1; - /* 0xBFC210F4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800390F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800390F4u); -#endif - if (psx_delay_BFC210F0) { - psx_delay_BFC210F0 = 0; - if (psx_taken_BFC210F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039118u); - goto label_BFC21118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390F8u); - } -label_BFC210F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC210F8: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800390F8u); -#endif -label_BFC210FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC210FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC210FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800390FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC210FC: 1A000006 blez $s0, 0xBFC21118 */ - uint32_t psx_brA_BFC210FC = cpu->gpr[16]; - psx_taken_BFC210FC = ((int32_t)psx_brA_BFC210FC <= 0); - psx_delay_BFC210FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039100u); -#endif - /* 0xBFC21100: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039100u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039100u); -#endif - if (psx_delay_BFC210FC) { - psx_delay_BFC210FC = 0; - if (psx_taken_BFC210FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039118u); - goto label_BFC21118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039104u); - } -label_BFC21104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21104: 0C015D3C jal 0xB00574F0 */ - cpu->gpr[31] = 0x8003910Cu; /* jal link before delay slot */ - psx_delay_BFC21104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21108: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039108u); -#endif - if (psx_delay_BFC21104) { - psx_delay_BFC21104 = 0; - cpu->gpr[31] = 0x8003910Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800574F0u); - cpu->pc = 0x800574F0u; return; - } -label_BFC2110C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2110Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003910Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2110C: 1040FFFB beq $v0, $zero, 0xBFC210FC */ - uint32_t psx_brA_BFC2110C = cpu->gpr[2]; uint32_t psx_brB_BFC2110C = cpu->gpr[0]; - psx_taken_BFC2110C = (psx_brA_BFC2110C == psx_brB_BFC2110C); - psx_delay_BFC2110C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21110: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039110u); -#endif - if (psx_delay_BFC2110C) { - psx_delay_BFC2110C = 0; - if (psx_taken_BFC2110C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800390FCu); - goto label_BFC210FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039114u); - } -label_BFC21114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039114u); -#endif - /* 0xBFC21114: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039114u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039114u); -#endif -label_BFC21118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039118u); -#endif - /* 0xBFC21118: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039118u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039118u); -#endif - /* 0xBFC2111C: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003911Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC21120: 03E00008 jr $ra */ - psx_delay_BFC21120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21124: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80039124u); -#endif - if (psx_delay_BFC21120) { - psx_delay_BFC21120 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21128(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21128u); - int psx_delay_BFC21134 = 0; - int psx_delay_BFC21140 = 0; - int psx_taken_BFC21140 = 0; - int psx_delay_BFC21148 = 0; - int psx_delay_BFC21150 = 0; - int psx_taken_BFC21150 = 0; - int psx_delay_BFC2115C = 0; - int psx_taken_BFC2115C = 0; - int psx_delay_BFC21164 = 0; - int psx_delay_BFC2116C = 0; - int psx_taken_BFC2116C = 0; - int psx_delay_BFC2117C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2113Cu: goto label_BFC2113C; - case 0xBFC21148u: goto label_BFC21148; - case 0xBFC21150u: goto label_BFC21150; - case 0xBFC21158u: goto label_BFC21158; - case 0xBFC2115Cu: goto label_BFC2115C; - case 0xBFC21164u: goto label_BFC21164; - case 0xBFC2116Cu: goto label_BFC2116C; - case 0xBFC21174u: goto label_BFC21174; - case 0xBFC21178u: goto label_BFC21178; - default: break; - } - } -label_BFC21128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21128: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80039128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2112C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003912Cu); return; } g_debug_last_store_pc = 0x8003912Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003912Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21130: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039130u); return; } g_debug_last_store_pc = 0x80039130u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21134: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8003913Cu; /* jal link before delay slot */ - psx_delay_BFC21134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21138: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80039138u); -#endif - if (psx_delay_BFC21134) { - psx_delay_BFC21134 = 0; - cpu->gpr[31] = 0x8003913Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC2113C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2113Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2113C: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x8003913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21140: 1A00000D blez $s0, 0xBFC21178 */ - uint32_t psx_brA_BFC21140 = cpu->gpr[16]; - psx_taken_BFC21140 = ((int32_t)psx_brA_BFC21140 <= 0); - psx_delay_BFC21140 = 1; - /* 0xBFC21144: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039144u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039144u); -#endif - if (psx_delay_BFC21140) { - psx_delay_BFC21140 = 0; - if (psx_taken_BFC21140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039178u); - goto label_BFC21178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039148u); - } -label_BFC21148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21148: 0C015F43 jal 0xB0057D0C */ - cpu->gpr[31] = 0x80039150u; /* jal link before delay slot */ - psx_delay_BFC21148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2114C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003914Cu); -#endif - if (psx_delay_BFC21148) { - psx_delay_BFC21148 = 0; - cpu->gpr[31] = 0x80039150u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D0Cu); - cpu->pc = 0x80057D0Cu; return; - } -label_BFC21150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21150: 14400009 bne $v0, $zero, 0xBFC21178 */ - uint32_t psx_brA_BFC21150 = cpu->gpr[2]; uint32_t psx_brB_BFC21150 = cpu->gpr[0]; - psx_taken_BFC21150 = (psx_brA_BFC21150 != psx_brB_BFC21150); - psx_delay_BFC21150 = 1; - /* 0xBFC21154: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039154u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039154u); -#endif - if (psx_delay_BFC21150) { - psx_delay_BFC21150 = 0; - if (psx_taken_BFC21150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039178u); - goto label_BFC21178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039158u); - } -label_BFC21158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21158: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039158u); -#endif -label_BFC2115C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2115Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003915Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2115C: 1A000006 blez $s0, 0xBFC21178 */ - uint32_t psx_brA_BFC2115C = cpu->gpr[16]; - psx_taken_BFC2115C = ((int32_t)psx_brA_BFC2115C <= 0); - psx_delay_BFC2115C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039160u); -#endif - /* 0xBFC21160: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039160u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039160u); -#endif - if (psx_delay_BFC2115C) { - psx_delay_BFC2115C = 0; - if (psx_taken_BFC2115C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039178u); - goto label_BFC21178; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039164u); - } -label_BFC21164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21164: 0C015F43 jal 0xB0057D0C */ - cpu->gpr[31] = 0x8003916Cu; /* jal link before delay slot */ - psx_delay_BFC21164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039168u); -#endif - if (psx_delay_BFC21164) { - psx_delay_BFC21164 = 0; - cpu->gpr[31] = 0x8003916Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D0Cu); - cpu->pc = 0x80057D0Cu; return; - } -label_BFC2116C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2116Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2116Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003916Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2116C: 1040FFFB beq $v0, $zero, 0xBFC2115C */ - uint32_t psx_brA_BFC2116C = cpu->gpr[2]; uint32_t psx_brB_BFC2116C = cpu->gpr[0]; - psx_taken_BFC2116C = (psx_brA_BFC2116C == psx_brB_BFC2116C); - psx_delay_BFC2116C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21170: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039170u); -#endif - if (psx_delay_BFC2116C) { - psx_delay_BFC2116C = 0; - if (psx_taken_BFC2116C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003915Cu); - goto label_BFC2115C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039174u); - } -label_BFC21174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039174u); -#endif - /* 0xBFC21174: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039174u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039174u); -#endif -label_BFC21178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039178u); -#endif - /* 0xBFC21178: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039178u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2117C: 03E00008 jr $ra */ - psx_delay_BFC2117C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21180: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80039180u); -#endif - if (psx_delay_BFC2117C) { - psx_delay_BFC2117C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21184(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21184u); - int psx_delay_BFC211A0 = 0; - int psx_delay_BFC211AC = 0; - int psx_taken_BFC211AC = 0; - int psx_delay_BFC211B8 = 0; - int psx_delay_BFC211C0 = 0; - int psx_taken_BFC211C0 = 0; - int psx_delay_BFC211CC = 0; - int psx_taken_BFC211CC = 0; - int psx_delay_BFC211D8 = 0; - int psx_delay_BFC211E0 = 0; - int psx_taken_BFC211E0 = 0; - int psx_delay_BFC211F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC211A8u: goto label_BFC211A8; - case 0xBFC211B4u: goto label_BFC211B4; - case 0xBFC211C0u: goto label_BFC211C0; - case 0xBFC211C8u: goto label_BFC211C8; - case 0xBFC211CCu: goto label_BFC211CC; - case 0xBFC211D4u: goto label_BFC211D4; - case 0xBFC211E0u: goto label_BFC211E0; - case 0xBFC211E8u: goto label_BFC211E8; - case 0xBFC211ECu: goto label_BFC211EC; - default: break; - } - } -label_BFC21184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21184: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80039184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21188: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039188u); return; } g_debug_last_store_pc = 0x80039188u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2118C: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003918Cu); return; } g_debug_last_store_pc = 0x8003918Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003918Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21190: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039190u); return; } g_debug_last_store_pc = 0x80039190u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21194: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039194u); return; } g_debug_last_store_pc = 0x80039194u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21198: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC2119C: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003919Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC211A0: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x800391A8u; /* jal link before delay slot */ - psx_delay_BFC211A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC211A4: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800391A4u); -#endif - if (psx_delay_BFC211A0) { - psx_delay_BFC211A0 = 0; - cpu->gpr[31] = 0x800391A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC211A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC211A8: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x800391A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC211AC: 1A00000F blez $s0, 0xBFC211EC */ - uint32_t psx_brA_BFC211AC = cpu->gpr[16]; - psx_taken_BFC211AC = ((int32_t)psx_brA_BFC211AC <= 0); - psx_delay_BFC211AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391B0u); -#endif - /* 0xBFC211B0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800391B0u); -#endif - if (psx_delay_BFC211AC) { - psx_delay_BFC211AC = 0; - if (psx_taken_BFC211AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391ECu); - goto label_BFC211EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391B4u); - } -label_BFC211B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC211B4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800391B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC211B8: 0C0160F1 jal 0xB00583C4 */ - cpu->gpr[31] = 0x800391C0u; /* jal link before delay slot */ - psx_delay_BFC211B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC211BC: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800391BCu); -#endif - if (psx_delay_BFC211B8) { - psx_delay_BFC211B8 = 0; - cpu->gpr[31] = 0x800391C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583C4u); - cpu->pc = 0x800583C4u; return; - } -label_BFC211C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC211C0: 1440000A bne $v0, $zero, 0xBFC211EC */ - uint32_t psx_brA_BFC211C0 = cpu->gpr[2]; uint32_t psx_brB_BFC211C0 = cpu->gpr[0]; - psx_taken_BFC211C0 = (psx_brA_BFC211C0 != psx_brB_BFC211C0); - psx_delay_BFC211C0 = 1; - /* 0xBFC211C4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800391C4u); -#endif - if (psx_delay_BFC211C0) { - psx_delay_BFC211C0 = 0; - if (psx_taken_BFC211C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391ECu); - goto label_BFC211EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391C8u); - } -label_BFC211C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC211C8: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800391C8u); -#endif -label_BFC211CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC211CC: 1A000007 blez $s0, 0xBFC211EC */ - uint32_t psx_brA_BFC211CC = cpu->gpr[16]; - psx_taken_BFC211CC = ((int32_t)psx_brA_BFC211CC <= 0); - psx_delay_BFC211CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391D0u); -#endif - /* 0xBFC211D0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800391D0u); -#endif - if (psx_delay_BFC211CC) { - psx_delay_BFC211CC = 0; - if (psx_taken_BFC211CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391ECu); - goto label_BFC211EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391D4u); - } -label_BFC211D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC211D4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800391D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC211D8: 0C0160F1 jal 0xB00583C4 */ - cpu->gpr[31] = 0x800391E0u; /* jal link before delay slot */ - psx_delay_BFC211D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC211DC: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800391DCu); -#endif - if (psx_delay_BFC211D8) { - psx_delay_BFC211D8 = 0; - cpu->gpr[31] = 0x800391E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583C4u); - cpu->pc = 0x800583C4u; return; - } -label_BFC211E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC211E0: 1040FFFA beq $v0, $zero, 0xBFC211CC */ - uint32_t psx_brA_BFC211E0 = cpu->gpr[2]; uint32_t psx_brB_BFC211E0 = cpu->gpr[0]; - psx_taken_BFC211E0 = (psx_brA_BFC211E0 == psx_brB_BFC211E0); - psx_delay_BFC211E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC211E4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800391E4u); -#endif - if (psx_delay_BFC211E0) { - psx_delay_BFC211E0 = 0; - if (psx_taken_BFC211E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391CCu); - goto label_BFC211CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800391E8u); - } -label_BFC211E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391E8u); -#endif - /* 0xBFC211E8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391E8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800391E8u); -#endif -label_BFC211EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC211ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC211ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391ECu); -#endif - /* 0xBFC211EC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391ECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800391ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800391F0u); -#endif - /* 0xBFC211F0: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391F0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800391F0u); -#endif - /* 0xBFC211F4: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800391F4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800391F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC211F8: 03E00008 jr $ra */ - psx_delay_BFC211F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC211FC: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800391FCu); -#endif - if (psx_delay_BFC211F8) { - psx_delay_BFC211F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21200(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21200u); - int psx_delay_BFC2121C = 0; - int psx_delay_BFC21228 = 0; - int psx_taken_BFC21228 = 0; - int psx_delay_BFC21234 = 0; - int psx_delay_BFC2123C = 0; - int psx_taken_BFC2123C = 0; - int psx_delay_BFC21254 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21224u: goto label_BFC21224; - case 0xBFC21228u: goto label_BFC21228; - case 0xBFC21230u: goto label_BFC21230; - case 0xBFC2123Cu: goto label_BFC2123C; - case 0xBFC21244u: goto label_BFC21244; - case 0xBFC21248u: goto label_BFC21248; - default: break; - } - } -label_BFC21200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21200: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80039200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21204: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039204u); return; } g_debug_last_store_pc = 0x80039204u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC21208: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039208u); return; } g_debug_last_store_pc = 0x80039208u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2120C: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003920Cu); return; } g_debug_last_store_pc = 0x8003920Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003920Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21210: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039210u); return; } g_debug_last_store_pc = 0x80039210u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21214: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21218: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2121C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80039224u; /* jal link before delay slot */ - psx_delay_BFC2121C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21220: 24100014 addiu $s0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24100014u, cpu->gpr[16], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80039220u); -#endif - if (psx_delay_BFC2121C) { - psx_delay_BFC2121C = 0; - cpu->gpr[31] = 0x80039224u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC21224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21224: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039224u); -#endif -label_BFC21228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21228: 1A000007 blez $s0, 0xBFC21248 */ - uint32_t psx_brA_BFC21228 = cpu->gpr[16]; - psx_taken_BFC21228 = ((int32_t)psx_brA_BFC21228 <= 0); - psx_delay_BFC21228 = 1; - /* 0xBFC2122C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003922Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003922Cu); -#endif - if (psx_delay_BFC21228) { - psx_delay_BFC21228 = 0; - if (psx_taken_BFC21228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039248u); - goto label_BFC21248; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039230u); - } -label_BFC21230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21230: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21234: 0C016098 jal 0xB0058260 */ - cpu->gpr[31] = 0x8003923Cu; /* jal link before delay slot */ - psx_delay_BFC21234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21238: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039238u); -#endif - if (psx_delay_BFC21234) { - psx_delay_BFC21234 = 0; - cpu->gpr[31] = 0x8003923Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058260u); - cpu->pc = 0x80058260u; return; - } -label_BFC2123C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2123Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003923Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2123C: 1040FFFA beq $v0, $zero, 0xBFC21228 */ - uint32_t psx_brA_BFC2123C = cpu->gpr[2]; uint32_t psx_brB_BFC2123C = cpu->gpr[0]; - psx_taken_BFC2123C = (psx_brA_BFC2123C == psx_brB_BFC2123C); - psx_delay_BFC2123C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21240: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039240u); -#endif - if (psx_delay_BFC2123C) { - psx_delay_BFC2123C = 0; - if (psx_taken_BFC2123C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039228u); - goto label_BFC21228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039244u); - } -label_BFC21244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039244u); -#endif - /* 0xBFC21244: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039244u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039244u); -#endif -label_BFC21248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039248u); -#endif - /* 0xBFC21248: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039248u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039248u); -#endif - /* 0xBFC2124C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003924Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003924Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039250u); -#endif - /* 0xBFC21250: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039250u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC21254: 03E00008 jr $ra */ - psx_delay_BFC21254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21258: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80039258u); -#endif - if (psx_delay_BFC21254) { - psx_delay_BFC21254 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2125C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2125Cu); - int psx_delay_BFC21270 = 0; - int psx_delay_BFC2127C = 0; - int psx_taken_BFC2127C = 0; - int psx_delay_BFC21284 = 0; - int psx_delay_BFC2128C = 0; - int psx_taken_BFC2128C = 0; - int psx_delay_BFC21298 = 0; - int psx_taken_BFC21298 = 0; - int psx_delay_BFC212A0 = 0; - int psx_delay_BFC212A8 = 0; - int psx_taken_BFC212A8 = 0; - int psx_delay_BFC212BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21278u: goto label_BFC21278; - case 0xBFC21284u: goto label_BFC21284; - case 0xBFC2128Cu: goto label_BFC2128C; - case 0xBFC21294u: goto label_BFC21294; - case 0xBFC21298u: goto label_BFC21298; - case 0xBFC212A0u: goto label_BFC212A0; - case 0xBFC212A8u: goto label_BFC212A8; - case 0xBFC212B0u: goto label_BFC212B0; - case 0xBFC212B4u: goto label_BFC212B4; - default: break; - } - } -label_BFC2125C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2125Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003925Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2125C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003925Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21260: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039260u); return; } g_debug_last_store_pc = 0x80039260u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21264: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039264u); return; } g_debug_last_store_pc = 0x80039264u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21268: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039268u); return; } g_debug_last_store_pc = 0x80039268u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2126C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003926Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21270: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80039278u; /* jal link before delay slot */ - psx_delay_BFC21270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21274: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80039274u); -#endif - if (psx_delay_BFC21270) { - psx_delay_BFC21270 = 0; - cpu->gpr[31] = 0x80039278u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC21278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21278: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80039278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2127C: 1A00000D blez $s0, 0xBFC212B4 */ - uint32_t psx_brA_BFC2127C = cpu->gpr[16]; - psx_taken_BFC2127C = ((int32_t)psx_brA_BFC2127C <= 0); - psx_delay_BFC2127C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039280u); -#endif - /* 0xBFC21280: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039280u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039280u); -#endif - if (psx_delay_BFC2127C) { - psx_delay_BFC2127C = 0; - if (psx_taken_BFC2127C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392B4u); - goto label_BFC212B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039284u); - } -label_BFC21284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21284: 0C016101 jal 0xB0058404 */ - cpu->gpr[31] = 0x8003928Cu; /* jal link before delay slot */ - psx_delay_BFC21284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21288: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039288u); -#endif - if (psx_delay_BFC21284) { - psx_delay_BFC21284 = 0; - cpu->gpr[31] = 0x8003928Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058404u); - cpu->pc = 0x80058404u; return; - } -label_BFC2128C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2128Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2128Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003928Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2128C: 14400009 bne $v0, $zero, 0xBFC212B4 */ - uint32_t psx_brA_BFC2128C = cpu->gpr[2]; uint32_t psx_brB_BFC2128C = cpu->gpr[0]; - psx_taken_BFC2128C = (psx_brA_BFC2128C != psx_brB_BFC2128C); - psx_delay_BFC2128C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039290u); -#endif - /* 0xBFC21290: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039290u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039290u); -#endif - if (psx_delay_BFC2128C) { - psx_delay_BFC2128C = 0; - if (psx_taken_BFC2128C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392B4u); - goto label_BFC212B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039294u); - } -label_BFC21294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21294: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039294u); -#endif -label_BFC21298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21298: 1A000006 blez $s0, 0xBFC212B4 */ - uint32_t psx_brA_BFC21298 = cpu->gpr[16]; - psx_taken_BFC21298 = ((int32_t)psx_brA_BFC21298 <= 0); - psx_delay_BFC21298 = 1; - /* 0xBFC2129C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003929Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003929Cu); -#endif - if (psx_delay_BFC21298) { - psx_delay_BFC21298 = 0; - if (psx_taken_BFC21298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392B4u); - goto label_BFC212B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392A0u); - } -label_BFC212A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC212A0: 0C016101 jal 0xB0058404 */ - cpu->gpr[31] = 0x800392A8u; /* jal link before delay slot */ - psx_delay_BFC212A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC212A4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800392A4u); -#endif - if (psx_delay_BFC212A0) { - psx_delay_BFC212A0 = 0; - cpu->gpr[31] = 0x800392A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058404u); - cpu->pc = 0x80058404u; return; - } -label_BFC212A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC212A8: 1040FFFB beq $v0, $zero, 0xBFC21298 */ - uint32_t psx_brA_BFC212A8 = cpu->gpr[2]; uint32_t psx_brB_BFC212A8 = cpu->gpr[0]; - psx_taken_BFC212A8 = (psx_brA_BFC212A8 == psx_brB_BFC212A8); - psx_delay_BFC212A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC212AC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800392ACu); -#endif - if (psx_delay_BFC212A8) { - psx_delay_BFC212A8 = 0; - if (psx_taken_BFC212A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039298u); - goto label_BFC21298; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392B0u); - } -label_BFC212B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392B0u); -#endif - /* 0xBFC212B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800392B0u); -#endif -label_BFC212B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392B4u); -#endif - /* 0xBFC212B4: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392B4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800392B4u); -#endif - /* 0xBFC212B8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392B8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800392B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC212BC: 03E00008 jr $ra */ - psx_delay_BFC212BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC212C0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800392C0u); -#endif - if (psx_delay_BFC212BC) { - psx_delay_BFC212BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC212C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC212C4u); - int psx_delay_BFC212D0 = 0; - int psx_delay_BFC212DC = 0; - int psx_taken_BFC212DC = 0; - int psx_delay_BFC212E4 = 0; - int psx_delay_BFC212EC = 0; - int psx_taken_BFC212EC = 0; - int psx_delay_BFC212F8 = 0; - int psx_taken_BFC212F8 = 0; - int psx_delay_BFC21300 = 0; - int psx_delay_BFC21308 = 0; - int psx_taken_BFC21308 = 0; - int psx_delay_BFC21318 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC212D8u: goto label_BFC212D8; - case 0xBFC212E4u: goto label_BFC212E4; - case 0xBFC212ECu: goto label_BFC212EC; - case 0xBFC212F4u: goto label_BFC212F4; - case 0xBFC212F8u: goto label_BFC212F8; - case 0xBFC21300u: goto label_BFC21300; - case 0xBFC21308u: goto label_BFC21308; - case 0xBFC21310u: goto label_BFC21310; - case 0xBFC21314u: goto label_BFC21314; - default: break; - } - } -label_BFC212C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC212C4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800392C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC212C8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392C8u); return; } g_debug_last_store_pc = 0x800392C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800392C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC212CC: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392CCu); return; } g_debug_last_store_pc = 0x800392CCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800392CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC212D0: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x800392D8u; /* jal link before delay slot */ - psx_delay_BFC212D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC212D4: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800392D4u); -#endif - if (psx_delay_BFC212D0) { - psx_delay_BFC212D0 = 0; - cpu->gpr[31] = 0x800392D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC212D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC212D8: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x800392D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC212DC: 1A00000D blez $s0, 0xBFC21314 */ - uint32_t psx_brA_BFC212DC = cpu->gpr[16]; - psx_taken_BFC212DC = ((int32_t)psx_brA_BFC212DC <= 0); - psx_delay_BFC212DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392E0u); -#endif - /* 0xBFC212E0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800392E0u); -#endif - if (psx_delay_BFC212DC) { - psx_delay_BFC212DC = 0; - if (psx_taken_BFC212DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039314u); - goto label_BFC21314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392E4u); - } -label_BFC212E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC212E4: 0C015D5C jal 0xB0057570 */ - cpu->gpr[31] = 0x800392ECu; /* jal link before delay slot */ - psx_delay_BFC212E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC212E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800392E8u); -#endif - if (psx_delay_BFC212E4) { - psx_delay_BFC212E4 = 0; - cpu->gpr[31] = 0x800392ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057570u); - cpu->pc = 0x80057570u; return; - } -label_BFC212EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC212EC: 14400009 bne $v0, $zero, 0xBFC21314 */ - uint32_t psx_brA_BFC212EC = cpu->gpr[2]; uint32_t psx_brB_BFC212EC = cpu->gpr[0]; - psx_taken_BFC212EC = (psx_brA_BFC212EC != psx_brB_BFC212EC); - psx_delay_BFC212EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392F0u); -#endif - /* 0xBFC212F0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800392F0u); -#endif - if (psx_delay_BFC212EC) { - psx_delay_BFC212EC = 0; - if (psx_taken_BFC212EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039314u); - goto label_BFC21314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392F4u); - } -label_BFC212F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC212F4: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800392F4u); -#endif -label_BFC212F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC212F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC212F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800392F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC212F8: 1A000006 blez $s0, 0xBFC21314 */ - uint32_t psx_brA_BFC212F8 = cpu->gpr[16]; - psx_taken_BFC212F8 = ((int32_t)psx_brA_BFC212F8 <= 0); - psx_delay_BFC212F8 = 1; - /* 0xBFC212FC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800392FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800392FCu); -#endif - if (psx_delay_BFC212F8) { - psx_delay_BFC212F8 = 0; - if (psx_taken_BFC212F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039314u); - goto label_BFC21314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039300u); - } -label_BFC21300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21300: 0C015D5C jal 0xB0057570 */ - cpu->gpr[31] = 0x80039308u; /* jal link before delay slot */ - psx_delay_BFC21300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039304u); -#endif - if (psx_delay_BFC21300) { - psx_delay_BFC21300 = 0; - cpu->gpr[31] = 0x80039308u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057570u); - cpu->pc = 0x80057570u; return; - } -label_BFC21308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21308: 1040FFFB beq $v0, $zero, 0xBFC212F8 */ - uint32_t psx_brA_BFC21308 = cpu->gpr[2]; uint32_t psx_brB_BFC21308 = cpu->gpr[0]; - psx_taken_BFC21308 = (psx_brA_BFC21308 == psx_brB_BFC21308); - psx_delay_BFC21308 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2130C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003930Cu); -#endif - if (psx_delay_BFC21308) { - psx_delay_BFC21308 = 0; - if (psx_taken_BFC21308) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800392F8u); - goto label_BFC212F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039310u); - } -label_BFC21310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039310u); -#endif - /* 0xBFC21310: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039310u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039310u); -#endif -label_BFC21314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039314u); -#endif - /* 0xBFC21314: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039314u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC21318: 03E00008 jr $ra */ - psx_delay_BFC21318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2131C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003931Cu); -#endif - if (psx_delay_BFC21318) { - psx_delay_BFC21318 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21320(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21320u); - int psx_delay_BFC21334 = 0; - int psx_delay_BFC21340 = 0; - int psx_taken_BFC21340 = 0; - int psx_delay_BFC2135C = 0; - int psx_delay_BFC21364 = 0; - int psx_taken_BFC21364 = 0; - int psx_delay_BFC21370 = 0; - int psx_taken_BFC21370 = 0; - int psx_delay_BFC2137C = 0; - int psx_delay_BFC21384 = 0; - int psx_taken_BFC21384 = 0; - int psx_delay_BFC2139C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2133Cu: goto label_BFC2133C; - case 0xBFC21348u: goto label_BFC21348; - case 0xBFC21364u: goto label_BFC21364; - case 0xBFC2136Cu: goto label_BFC2136C; - case 0xBFC21370u: goto label_BFC21370; - case 0xBFC21378u: goto label_BFC21378; - case 0xBFC21384u: goto label_BFC21384; - case 0xBFC2138Cu: goto label_BFC2138C; - case 0xBFC21390u: goto label_BFC21390; - default: break; - } - } -label_BFC21320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21320: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80039320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21324: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039324u); return; } g_debug_last_store_pc = 0x80039324u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21328: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039328u); return; } g_debug_last_store_pc = 0x80039328u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2132C: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003932Cu); return; } g_debug_last_store_pc = 0x8003932Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21330: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039330u); return; } g_debug_last_store_pc = 0x80039330u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21334: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8003933Cu; /* jal link before delay slot */ - psx_delay_BFC21334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21338: 2410000A addiu $s0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2410000Au, cpu->gpr[16], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80039338u); -#endif - if (psx_delay_BFC21334) { - psx_delay_BFC21334 = 0; - cpu->gpr[31] = 0x8003933Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC2133C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2133Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2133Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2133C: 24100009 addiu $s0, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24100009u, cpu->gpr[16], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x8003933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21340: 1A000013 blez $s0, 0xBFC21390 */ - uint32_t psx_brA_BFC21340 = cpu->gpr[16]; - psx_taken_BFC21340 = ((int32_t)psx_brA_BFC21340 <= 0); - psx_delay_BFC21340 = 1; - /* 0xBFC21344: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039344u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039344u); -#endif - if (psx_delay_BFC21340) { - psx_delay_BFC21340 = 0; - if (psx_taken_BFC21340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039390u); - goto label_BFC21390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039348u); - } -label_BFC21348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21348: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2134C: 3C12800F lui $s2, 0x800F */ - cpu->gpr[18] = 0x800F0000u; - PGXP_ALU(0x3C12800Fu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC21350: 2652D290 addiu $s2, $s2, -11632 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-11632)); - PGXP_ALU(0x2652D290u, cpu->gpr[18], _pgx1, 0xFFFFD290u); } -#ifdef PSX_COSIM - cosim_instr(0x80039350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21354: 2631D280 addiu $s1, $s1, -11648 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-11648)); - PGXP_ALU(0x2631D280u, cpu->gpr[17], _pgx1, 0xFFFFD280u); } -#ifdef PSX_COSIM - cosim_instr(0x80039354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21358: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2135C: 0C0160B7 jal 0xB00582DC */ - cpu->gpr[31] = 0x80039364u; /* jal link before delay slot */ - psx_delay_BFC2135C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21360: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039360u); -#endif - if (psx_delay_BFC2135C) { - psx_delay_BFC2135C = 0; - cpu->gpr[31] = 0x80039364u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800582DCu); - cpu->pc = 0x800582DCu; return; - } -label_BFC21364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21364: 1440000A bne $v0, $zero, 0xBFC21390 */ - uint32_t psx_brA_BFC21364 = cpu->gpr[2]; uint32_t psx_brB_BFC21364 = cpu->gpr[0]; - psx_taken_BFC21364 = (psx_brA_BFC21364 != psx_brB_BFC21364); - psx_delay_BFC21364 = 1; - /* 0xBFC21368: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039368u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039368u); -#endif - if (psx_delay_BFC21364) { - psx_delay_BFC21364 = 0; - if (psx_taken_BFC21364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039390u); - goto label_BFC21390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003936Cu); - } -label_BFC2136C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2136Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003936Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2136C: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003936Cu); -#endif -label_BFC21370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21370: 1A000007 blez $s0, 0xBFC21390 */ - uint32_t psx_brA_BFC21370 = cpu->gpr[16]; - psx_taken_BFC21370 = ((int32_t)psx_brA_BFC21370 <= 0); - psx_delay_BFC21370 = 1; - /* 0xBFC21374: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039374u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039374u); -#endif - if (psx_delay_BFC21370) { - psx_delay_BFC21370 = 0; - if (psx_taken_BFC21370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039390u); - goto label_BFC21390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039378u); - } -label_BFC21378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21378: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2137C: 0C0160B7 jal 0xB00582DC */ - cpu->gpr[31] = 0x80039384u; /* jal link before delay slot */ - psx_delay_BFC2137C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21380: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039380u); -#endif - if (psx_delay_BFC2137C) { - psx_delay_BFC2137C = 0; - cpu->gpr[31] = 0x80039384u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800582DCu); - cpu->pc = 0x800582DCu; return; - } -label_BFC21384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21384: 1040FFFA beq $v0, $zero, 0xBFC21370 */ - uint32_t psx_brA_BFC21384 = cpu->gpr[2]; uint32_t psx_brB_BFC21384 = cpu->gpr[0]; - psx_taken_BFC21384 = (psx_brA_BFC21384 == psx_brB_BFC21384); - psx_delay_BFC21384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21388: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039388u); -#endif - if (psx_delay_BFC21384) { - psx_delay_BFC21384 = 0; - if (psx_taken_BFC21384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039370u); - goto label_BFC21370; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003938Cu); - } -label_BFC2138C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2138Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003938Cu); -#endif - /* 0xBFC2138C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003938Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003938Cu); -#endif -label_BFC21390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039390u); -#endif - /* 0xBFC21390: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039390u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039390u); -#endif - /* 0xBFC21394: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039394u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039394u); -#endif - /* 0xBFC21398: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039398u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2139C: 03E00008 jr $ra */ - psx_delay_BFC2139C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC213A0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800393A0u); -#endif - if (psx_delay_BFC2139C) { - psx_delay_BFC2139C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC213A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC213A4u); - int psx_delay_BFC213B4 = 0; - int psx_delay_BFC213C0 = 0; - int psx_delay_BFC213E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC213BCu: goto label_BFC213BC; - case 0xBFC213C8u: goto label_BFC213C8; - default: break; - } - } -label_BFC213A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC213A4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800393A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC213A8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800393A8u); return; } g_debug_last_store_pc = 0x800393A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800393A8u); -#endif - /* 0xBFC213AC: 93A40028 lbu $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (40)), 4, 0x20000000u); - PGXP_LOAD(0x93A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800393ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC213B0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800393B0u); return; } g_debug_last_store_pc = 0x800393B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800393B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC213B4: 0C00E4FA jal 0xB00393E8 */ - cpu->gpr[31] = 0x800393BCu; /* jal link before delay slot */ - psx_delay_BFC213B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC213B8: 00042102 srl $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 4u; - PGXP_ALU(0x00042102u, cpu->gpr[4], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800393B8u); -#endif - if (psx_delay_BFC213B4) { - psx_delay_BFC213B4 = 0; - cpu->gpr[31] = 0x800393BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393E8u); - cpu->pc = 0x800393E8u; return; - } -label_BFC213BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393BCu); -#endif - /* 0xBFC213BC: 93A40028 lbu $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (40)), 4, 0x20000000u); - PGXP_LOAD(0x93A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800393BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC213C0: 0C00E4FA jal 0xB00393E8 */ - cpu->gpr[31] = 0x800393C8u; /* jal link before delay slot */ - psx_delay_BFC213C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC213C4: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800393C4u); return; } g_debug_last_store_pc = 0x800393C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800393C4u); -#endif - if (psx_delay_BFC213C0) { - psx_delay_BFC213C0 = 0; - cpu->gpr[31] = 0x800393C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393E8u); - cpu->pc = 0x800393E8u; return; - } -label_BFC213C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393C8u); -#endif - /* 0xBFC213C8: 8FAE0024 lw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800393C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800393C8u); -#endif - /* 0xBFC213CC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800393CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800393CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC213D0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800393D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC213D4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800393D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC213D8: 000F7840 sll $t7, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 1u; - PGXP_ALU(0x000F7840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800393D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC213DC: 01E21021 addu $v0, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[2]; - PGXP_ALU(0x01E21021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800393DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC213E0: 03E00008 jr $ra */ - psx_delay_BFC213E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC213E4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800393E4u); -#endif - if (psx_delay_BFC213E0) { - psx_delay_BFC213E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC213E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC213E8u); - int psx_delay_BFC213EC = 0; -label_BFC213E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC213E8: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800393E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC213EC: 03E00008 jr $ra */ - psx_delay_BFC213EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC213F0: 3082000F andi $v0, $a0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFu; - PGXP_ALU(0x3082000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800393F0u); -#endif - if (psx_delay_BFC213EC) { - psx_delay_BFC213EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC213F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC213F4u); - int psx_delay_BFC213F4 = 0; -label_BFC213F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC213F4: 03E00008 jr $ra */ - psx_delay_BFC213F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC213F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800393F8u); -#endif - if (psx_delay_BFC213F4) { - psx_delay_BFC213F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC213FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC213FCu); - int psx_delay_BFC21420 = 0; - int psx_taken_BFC21420 = 0; - int psx_delay_BFC21428 = 0; - int psx_delay_BFC21430 = 0; - int psx_delay_BFC21444 = 0; - int psx_taken_BFC21444 = 0; - int psx_delay_BFC21458 = 0; - int psx_taken_BFC21458 = 0; - int psx_delay_BFC21464 = 0; - int psx_taken_BFC21464 = 0; - int psx_delay_BFC2146C = 0; - int psx_taken_BFC2146C = 0; - int psx_delay_BFC21480 = 0; - int psx_taken_BFC21480 = 0; - int psx_delay_BFC2149C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21428u: goto label_BFC21428; - case 0xBFC21430u: goto label_BFC21430; - case 0xBFC21438u: goto label_BFC21438; - case 0xBFC2144Cu: goto label_BFC2144C; - case 0xBFC21460u: goto label_BFC21460; - case 0xBFC21468u: goto label_BFC21468; - case 0xBFC2146Cu: goto label_BFC2146C; - case 0xBFC21474u: goto label_BFC21474; - case 0xBFC21488u: goto label_BFC21488; - case 0xBFC2148Cu: goto label_BFC2148C; - default: break; - } - } -label_BFC213FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC213FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC213FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800393FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC213FC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800393FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC21400: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039400u); return; } g_debug_last_store_pc = 0x80039400u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21404: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039404u); return; } g_debug_last_store_pc = 0x80039404u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21408: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2140C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003940Cu); return; } g_debug_last_store_pc = 0x8003940Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003940Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21410: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21414: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039414u); return; } g_debug_last_store_pc = 0x80039414u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC21418: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2141C: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003941Cu); return; } g_debug_last_store_pc = 0x8003941Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003941Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC21420: 1A400011 blez $s2, 0xBFC21468 */ - uint32_t psx_brA_BFC21420 = cpu->gpr[18]; - psx_taken_BFC21420 = ((int32_t)psx_brA_BFC21420 <= 0); - psx_delay_BFC21420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC21424: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039424u); -#endif - if (psx_delay_BFC21420) { - psx_delay_BFC21420 = 0; - if (psx_taken_BFC21420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039468u); - goto label_BFC21468; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039428u); - } -label_BFC21428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21428: 0C00D8F3 jal 0xB00363CC */ - cpu->gpr[31] = 0x80039430u; /* jal link before delay slot */ - psx_delay_BFC21428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2142C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003942Cu); -#endif - if (psx_delay_BFC21428) { - psx_delay_BFC21428 = 0; - cpu->gpr[31] = 0x80039430u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800363CCu); - cpu->pc = 0x800363CCu; return; - } -label_BFC21430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21430: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80039438u; /* jal link before delay slot */ - psx_delay_BFC21430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21434: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039434u); -#endif - if (psx_delay_BFC21430) { - psx_delay_BFC21430 = 0; - cpu->gpr[31] = 0x80039438u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC21438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC21438: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039438u); -#endif - /* 0xBFC2143C: 8DCE6940 lw $t6, 26944($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 26944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (26944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003943Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6940u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003943Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21440: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC21444: 11D10009 beq $t6, $s1, 0xBFC2146C */ - uint32_t psx_brA_BFC21444 = cpu->gpr[14]; uint32_t psx_brB_BFC21444 = cpu->gpr[17]; - psx_taken_BFC21444 = (psx_brA_BFC21444 == psx_brB_BFC21444); - psx_delay_BFC21444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC21448: 0212082A slt $at, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039448u); -#endif - if (psx_delay_BFC21444) { - psx_delay_BFC21444 = 0; - if (psx_taken_BFC21444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003946Cu); - goto label_BFC2146C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003944Cu); - } -label_BFC2144C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2144Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003944Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2144C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003944Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039450u); -#endif - /* 0xBFC21450: 8DEF9EB0 lw $t7, -24912($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039450u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9EB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC21458: 15E00004 bne $t7, $zero, 0xBFC2146C */ - uint32_t psx_brA_BFC21458 = cpu->gpr[15]; uint32_t psx_brB_BFC21458 = cpu->gpr[0]; - psx_taken_BFC21458 = (psx_brA_BFC21458 != psx_brB_BFC21458); - psx_delay_BFC21458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC2145C: 0212082A slt $at, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003945Cu); -#endif - if (psx_delay_BFC21458) { - psx_delay_BFC21458 = 0; - if (psx_taken_BFC21458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003946Cu); - goto label_BFC2146C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039460u); - } -label_BFC21460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21460: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC21464: 1612FFF0 bne $s0, $s2, 0xBFC21428 */ - uint32_t psx_brA_BFC21464 = cpu->gpr[16]; uint32_t psx_brB_BFC21464 = cpu->gpr[18]; - psx_taken_BFC21464 = (psx_brA_BFC21464 != psx_brB_BFC21464); - psx_delay_BFC21464 = 1; -label_BFC21468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC21468: 0212082A slt $at, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0212082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039468u); -#endif - if (psx_delay_BFC21464) { - psx_delay_BFC21464 = 0; - if (psx_taken_BFC21464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039428u); - goto label_BFC21428; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003946Cu); - } -label_BFC2146C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2146Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003946Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2146C: 14200006 bne $at, $zero, 0xBFC21488 */ - uint32_t psx_brA_BFC2146C = cpu->gpr[1]; uint32_t psx_brB_BFC2146C = cpu->gpr[0]; - psx_taken_BFC2146C = (psx_brA_BFC2146C != psx_brB_BFC2146C); - psx_delay_BFC2146C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21470: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039470u); -#endif - if (psx_delay_BFC2146C) { - psx_delay_BFC2146C = 0; - if (psx_taken_BFC2146C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039488u); - goto label_BFC21488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039474u); - } -label_BFC21474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21474: AC206950 sw $zero, 26960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 26960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (26960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039474u); return; } g_debug_last_store_pc = 0x80039474u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206950u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80039474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21478: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2147C: AC209EB0 sw $zero, -24912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003947Cu); return; } g_debug_last_store_pc = 0x8003947Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21480: 10000002 beq $zero, $zero, 0xBFC2148C */ - uint32_t psx_brA_BFC21480 = cpu->gpr[0]; uint32_t psx_brB_BFC21480 = cpu->gpr[0]; - psx_taken_BFC21480 = (psx_brA_BFC21480 == psx_brB_BFC21480); - psx_delay_BFC21480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21484: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039484u); -#endif - if (psx_delay_BFC21480) { - psx_delay_BFC21480 = 0; - if (psx_taken_BFC21480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003948Cu); - goto label_BFC2148C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039488u); - } -label_BFC21488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21488: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039488u); -#endif -label_BFC2148C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2148Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003948Cu); -#endif - /* 0xBFC2148C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003948Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039490u); -#endif - /* 0xBFC21490: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039490u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039490u); -#endif - /* 0xBFC21494: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039494u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039494u); -#endif - /* 0xBFC21498: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039498u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2149C: 03E00008 jr $ra */ - psx_delay_BFC2149C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC214A0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800394A0u); -#endif - if (psx_delay_BFC2149C) { - psx_delay_BFC2149C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC214B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC214B0u); - int psx_delay_BFC214C4 = 0; - int psx_taken_BFC214C4 = 0; - int psx_delay_BFC214E0 = 0; - int psx_taken_BFC214E0 = 0; - int psx_delay_BFC214E8 = 0; - int psx_taken_BFC214E8 = 0; - int psx_delay_BFC214FC = 0; - int psx_delay_BFC21504 = 0; - int psx_delay_BFC21518 = 0; - int psx_taken_BFC21518 = 0; - int psx_delay_BFC2152C = 0; - int psx_taken_BFC2152C = 0; - int psx_delay_BFC21534 = 0; - int psx_delay_BFC2153C = 0; - int psx_delay_BFC2154C = 0; - int psx_delay_BFC21570 = 0; - int psx_taken_BFC21570 = 0; - int psx_delay_BFC21590 = 0; - int psx_taken_BFC21590 = 0; - int psx_delay_BFC215F0 = 0; - int psx_taken_BFC215F0 = 0; - int psx_delay_BFC21600 = 0; - int psx_delay_BFC21620 = 0; - int psx_taken_BFC21620 = 0; - int psx_delay_BFC21634 = 0; - int psx_taken_BFC21634 = 0; - int psx_delay_BFC21640 = 0; - int psx_delay_BFC21658 = 0; - int psx_taken_BFC21658 = 0; - int psx_delay_BFC21660 = 0; - int psx_delay_BFC2166C = 0; - int psx_taken_BFC2166C = 0; - int psx_delay_BFC21674 = 0; - int psx_delay_BFC2167C = 0; - int psx_taken_BFC2167C = 0; - int psx_delay_BFC21684 = 0; - int psx_taken_BFC21684 = 0; - int psx_delay_BFC21698 = 0; - int psx_taken_BFC21698 = 0; - int psx_delay_BFC216AC = 0; - int psx_taken_BFC216AC = 0; - int psx_delay_BFC216B4 = 0; - int psx_delay_BFC216BC = 0; - int psx_delay_BFC216C8 = 0; - int psx_delay_BFC216D0 = 0; - int psx_delay_BFC216DC = 0; - int psx_delay_BFC216E4 = 0; - int psx_delay_BFC216F0 = 0; - int psx_delay_BFC216F8 = 0; - int psx_delay_BFC21704 = 0; - int psx_delay_BFC2170C = 0; - int psx_delay_BFC21718 = 0; - int psx_delay_BFC21740 = 0; - int psx_delay_BFC21748 = 0; - int psx_delay_BFC21754 = 0; - int psx_delay_BFC2175C = 0; - int psx_delay_BFC21768 = 0; - int psx_delay_BFC21770 = 0; - int psx_delay_BFC21778 = 0; - int psx_taken_BFC21778 = 0; - int psx_delay_BFC21780 = 0; - int psx_delay_BFC2178C = 0; - int psx_delay_BFC21794 = 0; - int psx_delay_BFC217A0 = 0; - int psx_delay_BFC217A8 = 0; - int psx_delay_BFC217B8 = 0; - int psx_taken_BFC217B8 = 0; - int psx_delay_BFC217C0 = 0; - int psx_delay_BFC217CC = 0; - int psx_delay_BFC217D4 = 0; - int psx_delay_BFC217E0 = 0; - int psx_delay_BFC217E8 = 0; - int psx_delay_BFC217F8 = 0; - int psx_taken_BFC217F8 = 0; - int psx_delay_BFC21800 = 0; - int psx_delay_BFC2180C = 0; - int psx_delay_BFC21814 = 0; - int psx_delay_BFC21820 = 0; - int psx_delay_BFC21828 = 0; - int psx_delay_BFC21838 = 0; - int psx_taken_BFC21838 = 0; - int psx_delay_BFC2184C = 0; - int psx_taken_BFC2184C = 0; - int psx_delay_BFC21854 = 0; - int psx_taken_BFC21854 = 0; - int psx_delay_BFC2185C = 0; - int psx_taken_BFC2185C = 0; - int psx_delay_BFC21878 = 0; - int psx_taken_BFC21878 = 0; - int psx_delay_BFC21880 = 0; - int psx_delay_BFC21890 = 0; - int psx_delay_BFC218C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC214CCu: goto label_BFC214CC; - case 0xBFC214E8u: goto label_BFC214E8; - case 0xBFC214F0u: goto label_BFC214F0; - case 0xBFC21504u: goto label_BFC21504; - case 0xBFC2150Cu: goto label_BFC2150C; - case 0xBFC21520u: goto label_BFC21520; - case 0xBFC21534u: goto label_BFC21534; - case 0xBFC2153Cu: goto label_BFC2153C; - case 0xBFC21544u: goto label_BFC21544; - case 0xBFC21554u: goto label_BFC21554; - case 0xBFC21564u: goto label_BFC21564; - case 0xBFC21578u: goto label_BFC21578; - case 0xBFC21584u: goto label_BFC21584; - case 0xBFC21598u: goto label_BFC21598; - case 0xBFC215F8u: goto label_BFC215F8; - case 0xBFC21608u: goto label_BFC21608; - case 0xBFC21610u: goto label_BFC21610; - case 0xBFC21628u: goto label_BFC21628; - case 0xBFC2163Cu: goto label_BFC2163C; - case 0xBFC21648u: goto label_BFC21648; - case 0xBFC21658u: goto label_BFC21658; - case 0xBFC21660u: goto label_BFC21660; - case 0xBFC21668u: goto label_BFC21668; - case 0xBFC21674u: goto label_BFC21674; - case 0xBFC2167Cu: goto label_BFC2167C; - case 0xBFC21684u: goto label_BFC21684; - case 0xBFC2168Cu: goto label_BFC2168C; - case 0xBFC216A0u: goto label_BFC216A0; - case 0xBFC216B4u: goto label_BFC216B4; - case 0xBFC216BCu: goto label_BFC216BC; - case 0xBFC216C4u: goto label_BFC216C4; - case 0xBFC216D0u: goto label_BFC216D0; - case 0xBFC216D8u: goto label_BFC216D8; - case 0xBFC216E4u: goto label_BFC216E4; - case 0xBFC216ECu: goto label_BFC216EC; - case 0xBFC216F8u: goto label_BFC216F8; - case 0xBFC21700u: goto label_BFC21700; - case 0xBFC2170Cu: goto label_BFC2170C; - case 0xBFC21714u: goto label_BFC21714; - case 0xBFC21720u: goto label_BFC21720; - case 0xBFC21748u: goto label_BFC21748; - case 0xBFC21750u: goto label_BFC21750; - case 0xBFC2175Cu: goto label_BFC2175C; - case 0xBFC21764u: goto label_BFC21764; - case 0xBFC21770u: goto label_BFC21770; - case 0xBFC21778u: goto label_BFC21778; - case 0xBFC21780u: goto label_BFC21780; - case 0xBFC21788u: goto label_BFC21788; - case 0xBFC21794u: goto label_BFC21794; - case 0xBFC2179Cu: goto label_BFC2179C; - case 0xBFC217A8u: goto label_BFC217A8; - case 0xBFC217B0u: goto label_BFC217B0; - case 0xBFC217C0u: goto label_BFC217C0; - case 0xBFC217C8u: goto label_BFC217C8; - case 0xBFC217D4u: goto label_BFC217D4; - case 0xBFC217DCu: goto label_BFC217DC; - case 0xBFC217E8u: goto label_BFC217E8; - case 0xBFC217F0u: goto label_BFC217F0; - case 0xBFC21800u: goto label_BFC21800; - case 0xBFC21808u: goto label_BFC21808; - case 0xBFC21814u: goto label_BFC21814; - case 0xBFC2181Cu: goto label_BFC2181C; - case 0xBFC21828u: goto label_BFC21828; - case 0xBFC21830u: goto label_BFC21830; - case 0xBFC21840u: goto label_BFC21840; - case 0xBFC21854u: goto label_BFC21854; - case 0xBFC2185Cu: goto label_BFC2185C; - case 0xBFC21860u: goto label_BFC21860; - case 0xBFC21864u: goto label_BFC21864; - case 0xBFC21880u: goto label_BFC21880; - case 0xBFC21888u: goto label_BFC21888; - case 0xBFC21898u: goto label_BFC21898; - case 0xBFC218BCu: goto label_BFC218BC; - case 0xBFC218C0u: goto label_BFC218C0; - default: break; - } - } -label_BFC214B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC214B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC214B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC214B0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800394B0u); -#endif - /* 0xBFC214B4: 8DCE9ED0 lw $t6, -24880($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9ED0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800394B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC214B8: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800394B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC214BC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800394BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC214C0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394C0u); return; } g_debug_last_store_pc = 0x800394C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800394C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC214C4: 15C10011 bne $t6, $at, 0xBFC2150C */ - uint32_t psx_brA_BFC214C4 = cpu->gpr[14]; uint32_t psx_brB_BFC214C4 = cpu->gpr[1]; - psx_taken_BFC214C4 = (psx_brA_BFC214C4 != psx_brB_BFC214C4); - psx_delay_BFC214C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC214C8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394C8u); return; } g_debug_last_store_pc = 0x800394C8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800394C8u); -#endif - if (psx_delay_BFC214C4) { - psx_delay_BFC214C4 = 0; - if (psx_taken_BFC214C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003950Cu); - goto label_BFC2150C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800394CCu); - } -label_BFC214CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC214CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC214CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC214CC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800394CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394D0u); -#endif - /* 0xBFC214D0: 8C42A134 lw $v0, -24268($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24268; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42A134u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800394D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC214D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800394D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC214D8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800394D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC214DC: 2841003D slti $at, $v0, 61 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (61) ? 1 : 0); - PGXP_ALU(0x2841003Du, cpu->gpr[1], _pgx1, 0x003Du); } -#ifdef PSX_COSIM - cosim_instr(0x800394DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC214E0: 10200003 beq $at, $zero, 0xBFC214F0 */ - uint32_t psx_brA_BFC214E0 = cpu->gpr[1]; uint32_t psx_brB_BFC214E0 = cpu->gpr[0]; - psx_taken_BFC214E0 = (psx_brA_BFC214E0 == psx_brB_BFC214E0); - psx_delay_BFC214E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC214E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800394E4u); -#endif - if (psx_delay_BFC214E0) { - psx_delay_BFC214E0 = 0; - if (psx_taken_BFC214E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800394F0u); - goto label_BFC214F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800394E8u); - } -label_BFC214E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC214E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC214E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC214E8: 10000008 beq $zero, $zero, 0xBFC2150C */ - uint32_t psx_brA_BFC214E8 = cpu->gpr[0]; uint32_t psx_brB_BFC214E8 = cpu->gpr[0]; - psx_taken_BFC214E8 = (psx_brA_BFC214E8 == psx_brB_BFC214E8); - psx_delay_BFC214E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC214EC: AC22A134 sw $v0, -24268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394ECu); return; } g_debug_last_store_pc = 0x800394ECu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A134u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800394ECu); -#endif - if (psx_delay_BFC214E8) { - psx_delay_BFC214E8 = 0; - if (psx_taken_BFC214E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003950Cu); - goto label_BFC2150C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800394F0u); - } -label_BFC214F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC214F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC214F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800394F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC214F0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800394F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC214F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800394F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC214F8: AC22A134 sw $v0, -24268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800394F8u); return; } g_debug_last_store_pc = 0x800394F8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A134u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800394F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC214FC: 0C00F3C0 jal 0xB003CF00 */ - cpu->gpr[31] = 0x80039504u; /* jal link before delay slot */ - psx_delay_BFC214FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21500: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039500u); -#endif - if (psx_delay_BFC214FC) { - psx_delay_BFC214FC = 0; - cpu->gpr[31] = 0x80039504u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF00u); - cpu->pc = 0x8003CF00u; return; - } -label_BFC21504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21504: 0C00F3C0 jal 0xB003CF00 */ - cpu->gpr[31] = 0x8003950Cu; /* jal link before delay slot */ - psx_delay_BFC21504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21508: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039508u); -#endif - if (psx_delay_BFC21504) { - psx_delay_BFC21504 = 0; - cpu->gpr[31] = 0x8003950Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF00u); - cpu->pc = 0x8003CF00u; return; - } -label_BFC2150C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2150Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003950Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2150C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003950Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039510u); -#endif - /* 0xBFC21510: 8DEFA12C lw $t7, -24276($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039510u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFA12Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC21518: 15E0001A bne $t7, $zero, 0xBFC21584 */ - uint32_t psx_brA_BFC21518 = cpu->gpr[15]; uint32_t psx_brB_BFC21518 = cpu->gpr[0]; - psx_taken_BFC21518 = (psx_brA_BFC21518 != psx_brB_BFC21518); - psx_delay_BFC21518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2151C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003951Cu); -#endif - if (psx_delay_BFC21518) { - psx_delay_BFC21518 = 0; - if (psx_taken_BFC21518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039584u); - goto label_BFC21584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039520u); - } -label_BFC21520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21520: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039520u); -#endif - /* 0xBFC21524: 8C42A130 lw $v0, -24272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039524u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42A130u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2152C: 1440000D bne $v0, $zero, 0xBFC21564 */ - uint32_t psx_brA_BFC2152C = cpu->gpr[2]; uint32_t psx_brB_BFC2152C = cpu->gpr[0]; - psx_taken_BFC2152C = (psx_brA_BFC2152C != psx_brB_BFC2152C); - psx_delay_BFC2152C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21530: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039530u); -#endif - if (psx_delay_BFC2152C) { - psx_delay_BFC2152C = 0; - if (psx_taken_BFC2152C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039564u); - goto label_BFC21564; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039534u); - } -label_BFC21534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21534: 0C00E64F jal 0xB003993C */ - cpu->gpr[31] = 0x8003953Cu; /* jal link before delay slot */ - psx_delay_BFC21534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21538: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039538u); -#endif - if (psx_delay_BFC21534) { - psx_delay_BFC21534 = 0; - cpu->gpr[31] = 0x8003953Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003993Cu); - cpu->pc = 0x8003993Cu; return; - } -label_BFC2153C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2153Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003953Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2153C: 0C00E64F jal 0xB003993C */ - cpu->gpr[31] = 0x80039544u; /* jal link before delay slot */ - psx_delay_BFC2153C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21540: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039540u); -#endif - if (psx_delay_BFC2153C) { - psx_delay_BFC2153C = 0; - cpu->gpr[31] = 0x80039544u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003993Cu); - cpu->pc = 0x8003993Cu; return; - } -label_BFC21544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC21544: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21548: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2154C: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x80039554u; /* jal link before delay slot */ - psx_delay_BFC2154C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC21550: AC38A8AC sw $t8, -22356($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22356; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039550u); return; } g_debug_last_store_pc = 0x80039550u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38A8ACu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80039550u); -#endif - if (psx_delay_BFC2154C) { - psx_delay_BFC2154C = 0; - cpu->gpr[31] = 0x80039554u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC21554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21554: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039554u); -#endif - /* 0xBFC21558: 8C42A130 lw $v0, -24272($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039558u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42A130u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2155C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21560: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039560u); -#endif -label_BFC21564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21564: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC21568: AC22A130 sw $v0, -24272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039568u); return; } g_debug_last_store_pc = 0x80039568u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A130u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2156C: 28410003 slti $at, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0); - PGXP_ALU(0x28410003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003956Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21570: 142000D3 bne $at, $zero, 0xBFC218C0 */ - uint32_t psx_brA_BFC21570 = cpu->gpr[1]; uint32_t psx_brB_BFC21570 = cpu->gpr[0]; - psx_taken_BFC21570 = (psx_brA_BFC21570 != psx_brB_BFC21570); - psx_delay_BFC21570 = 1; - /* 0xBFC21574: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039574u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039574u); -#endif - if (psx_delay_BFC21570) { - psx_delay_BFC21570 = 0; - if (psx_taken_BFC21570) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398C0u); - goto label_BFC218C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039578u); - } -label_BFC21578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC21578: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2157C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003957Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC21580: AC39A12C sw $t9, -24276($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039580u); return; } g_debug_last_store_pc = 0x80039580u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39A12Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80039580u); -#endif -label_BFC21584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21584: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039584u); -#endif - /* 0xBFC21588: 8D08FF58 lw $t0, -168($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039588u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08FF58u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2158C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21590: 19000025 blez $t0, 0xBFC21628 */ - uint32_t psx_brA_BFC21590 = cpu->gpr[8]; - psx_taken_BFC21590 = ((int32_t)psx_brA_BFC21590 <= 0); - psx_delay_BFC21590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039594u); -#endif - if (psx_delay_BFC21590) { - psx_delay_BFC21590 = 0; - if (psx_taken_BFC21590) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039628u); - goto label_BFC21628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039598u); - } -label_BFC21598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21598: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039598u); -#endif - /* 0xBFC2159C: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003959Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003959Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC215A0: 000258C0 sll $t3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000258C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800395A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215A4: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800395A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215A8: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC215AC: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800395ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215B0: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC215B4: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800395B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215B8: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC215BC: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800395BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215C0: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC215C4: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800395C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC215C8: 01625823 subu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01625823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC215CC: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC215D0: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800395D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC215D4: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800395D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC215D8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800395D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC215DC: 25ADA8B8 addiu $t5, $t5, -22344 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-22344)); - PGXP_ALU(0x25ADA8B8u, cpu->gpr[13], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x800395DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC215E0: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC215E4: 018D2821 addu $a1, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800395E4u); -#endif - /* 0xBFC215E8: 8CAE006C lw $t6, 108($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800395E8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE006Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800395E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC215EC: 240103FE addiu $at, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240103FEu, cpu->gpr[1], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800395ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC215F0: 11C10007 beq $t6, $at, 0xBFC21610 */ - uint32_t psx_brA_BFC215F0 = cpu->gpr[14]; uint32_t psx_brB_BFC215F0 = cpu->gpr[1]; - psx_taken_BFC215F0 = (psx_brA_BFC215F0 == psx_brB_BFC215F0); - psx_delay_BFC215F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC215F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800395F4u); -#endif - if (psx_delay_BFC215F0) { - psx_delay_BFC215F0 = 0; - if (psx_taken_BFC215F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039610u); - goto label_BFC21610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800395F8u); - } -label_BFC215F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC215F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC215F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800395F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC215F8: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800395F8u); -#endif - /* 0xBFC215FC: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800395FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800395FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21600: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x80039608u; /* jal link before delay slot */ - psx_delay_BFC21600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC21604: AFA20024 sw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039604u); return; } g_debug_last_store_pc = 0x80039604u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039604u); -#endif - if (psx_delay_BFC21600) { - psx_delay_BFC21600 = 0; - cpu->gpr[31] = 0x80039608u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC21608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039608u); -#endif - /* 0xBFC21608: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039608u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2160C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003960Cu); -#endif -label_BFC21610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21610: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039610u); -#endif - /* 0xBFC21614: 8DEFFF58 lw $t7, -168($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039614u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFFF58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21618: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC2161C: 004F082A slt $at, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x004F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003961Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21620: 1420FFDD bne $at, $zero, 0xBFC21598 */ - uint32_t psx_brA_BFC21620 = cpu->gpr[1]; uint32_t psx_brB_BFC21620 = cpu->gpr[0]; - psx_taken_BFC21620 = (psx_brA_BFC21620 != psx_brB_BFC21620); - psx_delay_BFC21620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039624u); -#endif - if (psx_delay_BFC21620) { - psx_delay_BFC21620 = 0; - if (psx_taken_BFC21620) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039598u); - goto label_BFC21598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039628u); - } -label_BFC21628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21628: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039628u); -#endif - /* 0xBFC2162C: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003962Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003962Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21630: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80039630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC21634: 14810008 bne $a0, $at, 0xBFC21658 */ - uint32_t psx_brA_BFC21634 = cpu->gpr[4]; uint32_t psx_brB_BFC21634 = cpu->gpr[1]; - psx_taken_BFC21634 = (psx_brA_BFC21634 != psx_brB_BFC21634); - psx_delay_BFC21634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21638: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80039638u); -#endif - if (psx_delay_BFC21634) { - psx_delay_BFC21634 = 0; - if (psx_taken_BFC21634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039658u); - goto label_BFC21658; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003963Cu); - } -label_BFC2163C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2163Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2163Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003963Cu); -#endif - /* 0xBFC2163C: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003963Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21640: 0C00E633 jal 0xB00398CC */ - cpu->gpr[31] = 0x80039648u; /* jal link before delay slot */ - psx_delay_BFC21640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21644: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039644u); -#endif - if (psx_delay_BFC21640) { - psx_delay_BFC21640 = 0; - cpu->gpr[31] = 0x80039648u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398CCu); - cpu->pc = 0x800398CCu; return; - } -label_BFC21648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21648: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039648u); -#endif - /* 0xBFC2164C: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003964Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21654: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80039654u); -#endif -label_BFC21658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC21658: 1481000A bne $a0, $at, 0xBFC21684 */ - uint32_t psx_brA_BFC21658 = cpu->gpr[4]; uint32_t psx_brB_BFC21658 = cpu->gpr[1]; - psx_taken_BFC21658 = (psx_brA_BFC21658 != psx_brB_BFC21658); - psx_delay_BFC21658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2165C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003965Cu); -#endif - if (psx_delay_BFC21658) { - psx_delay_BFC21658 = 0; - if (psx_taken_BFC21658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039684u); - goto label_BFC21684; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039660u); - } -label_BFC21660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21660: 0C00E6A7 jal 0xB0039A9C */ - cpu->gpr[31] = 0x80039668u; /* jal link before delay slot */ - psx_delay_BFC21660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21664: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039664u); -#endif - if (psx_delay_BFC21660) { - psx_delay_BFC21660 = 0; - cpu->gpr[31] = 0x80039668u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A9Cu); - cpu->pc = 0x80039A9Cu; return; - } -label_BFC21668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21668: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2166C: 10410094 beq $v0, $at, 0xBFC218C0 */ - uint32_t psx_brA_BFC2166C = cpu->gpr[2]; uint32_t psx_brB_BFC2166C = cpu->gpr[1]; - psx_taken_BFC2166C = (psx_brA_BFC2166C == psx_brB_BFC2166C); - psx_delay_BFC2166C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039670u); -#endif - /* 0xBFC21670: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039670u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039670u); -#endif - if (psx_delay_BFC2166C) { - psx_delay_BFC2166C = 0; - if (psx_taken_BFC2166C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398C0u); - goto label_BFC218C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039674u); - } -label_BFC21674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21674: 0C00E6A7 jal 0xB0039A9C */ - cpu->gpr[31] = 0x8003967Cu; /* jal link before delay slot */ - psx_delay_BFC21674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21678: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039678u); -#endif - if (psx_delay_BFC21674) { - psx_delay_BFC21674 = 0; - cpu->gpr[31] = 0x8003967Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A9Cu); - cpu->pc = 0x80039A9Cu; return; - } -label_BFC2167C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2167Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003967Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2167C: 10000090 beq $zero, $zero, 0xBFC218C0 */ - uint32_t psx_brA_BFC2167C = cpu->gpr[0]; uint32_t psx_brB_BFC2167C = cpu->gpr[0]; - psx_taken_BFC2167C = (psx_brA_BFC2167C == psx_brB_BFC2167C); - psx_delay_BFC2167C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039680u); -#endif - /* 0xBFC21680: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039680u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039680u); -#endif - if (psx_delay_BFC2167C) { - psx_delay_BFC2167C = 0; - if (psx_taken_BFC2167C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398C0u); - goto label_BFC218C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039684u); - } -label_BFC21684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21684: 1080008E beq $a0, $zero, 0xBFC218C0 */ - uint32_t psx_brA_BFC21684 = cpu->gpr[4]; uint32_t psx_brB_BFC21684 = cpu->gpr[0]; - psx_taken_BFC21684 = (psx_brA_BFC21684 == psx_brB_BFC21684); - psx_delay_BFC21684 = 1; - /* 0xBFC21688: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039688u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039688u); -#endif - if (psx_delay_BFC21684) { - psx_delay_BFC21684 = 0; - if (psx_taken_BFC21684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398C0u); - goto label_BFC218C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003968Cu); - } -label_BFC2168C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2168Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2168C: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039690u); -#endif - /* 0xBFC21690: 8F186BBC lw $t8, 27580($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039690u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186BBCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80039690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC21698: 13000089 beq $t8, $zero, 0xBFC218C0 */ - uint32_t psx_brA_BFC21698 = cpu->gpr[24]; uint32_t psx_brB_BFC21698 = cpu->gpr[0]; - psx_taken_BFC21698 = (psx_brA_BFC21698 == psx_brB_BFC21698); - psx_delay_BFC21698 = 1; - /* 0xBFC2169C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003969Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003969Cu); -#endif - if (psx_delay_BFC21698) { - psx_delay_BFC21698 = 0; - if (psx_taken_BFC21698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398C0u); - goto label_BFC218C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800396A0u); - } -label_BFC216A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC216A0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800396A0u); -#endif - /* 0xBFC216A4: 8F39A180 lw $t9, -24192($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800396A4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39A180u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800396A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC216A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800396A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC216AC: 13200074 beq $t9, $zero, 0xBFC21880 */ - uint32_t psx_brA_BFC216AC = cpu->gpr[25]; uint32_t psx_brB_BFC216AC = cpu->gpr[0]; - psx_taken_BFC216AC = (psx_brA_BFC216AC == psx_brB_BFC216AC); - psx_delay_BFC216AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC216B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800396B0u); -#endif - if (psx_delay_BFC216AC) { - psx_delay_BFC216AC = 0; - if (psx_taken_BFC216AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039880u); - goto label_BFC21880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800396B4u); - } -label_BFC216B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216B4: 0C00F954 jal 0xB003E550 */ - cpu->gpr[31] = 0x800396BCu; /* jal link before delay slot */ - psx_delay_BFC216B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC216B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800396B8u); -#endif - if (psx_delay_BFC216B4) { - psx_delay_BFC216B4 = 0; - cpu->gpr[31] = 0x800396BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E550u); - cpu->pc = 0x8003E550u; return; - } -label_BFC216BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216BC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800396C4u; /* jal link before delay slot */ - psx_delay_BFC216BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC216C0: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800396C0u); -#endif - if (psx_delay_BFC216BC) { - psx_delay_BFC216BC = 0; - cpu->gpr[31] = 0x800396C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC216C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC216C4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800396C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216C8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800396D0u; /* jal link before delay slot */ - psx_delay_BFC216C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC216CC: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800396CCu); -#endif - if (psx_delay_BFC216C8) { - psx_delay_BFC216C8 = 0; - cpu->gpr[31] = 0x800396D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC216D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216D0: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800396D8u; /* jal link before delay slot */ - psx_delay_BFC216D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC216D4: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800396D4u); -#endif - if (psx_delay_BFC216D0) { - psx_delay_BFC216D0 = 0; - cpu->gpr[31] = 0x800396D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC216D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC216D8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800396D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216DC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800396E4u; /* jal link before delay slot */ - psx_delay_BFC216DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC216E0: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800396E0u); -#endif - if (psx_delay_BFC216DC) { - psx_delay_BFC216DC = 0; - cpu->gpr[31] = 0x800396E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC216E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216E4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800396ECu; /* jal link before delay slot */ - psx_delay_BFC216E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC216E8: 24040011 addiu $a0, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24040011u, cpu->gpr[4], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x800396E8u); -#endif - if (psx_delay_BFC216E4) { - psx_delay_BFC216E4 = 0; - cpu->gpr[31] = 0x800396ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC216EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC216EC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800396ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216F0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800396F8u; /* jal link before delay slot */ - psx_delay_BFC216F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC216F4: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800396F4u); -#endif - if (psx_delay_BFC216F0) { - psx_delay_BFC216F0 = 0; - cpu->gpr[31] = 0x800396F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC216F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC216F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC216F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800396F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC216F8: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039700u; /* jal link before delay slot */ - psx_delay_BFC216F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC216FC: 2404006E addiu $a0, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2404006Eu, cpu->gpr[4], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800396FCu); -#endif - if (psx_delay_BFC216F8) { - psx_delay_BFC216F8 = 0; - cpu->gpr[31] = 0x80039700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21700: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21704: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003970Cu; /* jal link before delay slot */ - psx_delay_BFC21704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21708: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80039708u); -#endif - if (psx_delay_BFC21704) { - psx_delay_BFC21704 = 0; - cpu->gpr[31] = 0x8003970Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2170C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2170Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2170Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003970Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2170C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039714u; /* jal link before delay slot */ - psx_delay_BFC2170C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21710: 2404006F addiu $a0, $zero, 111 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (111)); - PGXP_ALU(0x2404006Fu, cpu->gpr[4], _pgx1, 0x0000006Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80039710u); -#endif - if (psx_delay_BFC2170C) { - psx_delay_BFC2170C = 0; - cpu->gpr[31] = 0x80039714u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21714: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21718: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039720u; /* jal link before delay slot */ - psx_delay_BFC21718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2171C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003971Cu); -#endif - if (psx_delay_BFC21718) { - psx_delay_BFC21718 = 0; - cpu->gpr[31] = 0x80039720u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21720: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039720u); -#endif - /* 0xBFC21724: 8D089E24 lw $t0, -25052($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039724u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E24u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21728: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2172C: 000848C0 sll $t1, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000848C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC21730: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21734: 00094A80 sll $t1, $t1, 10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 10u; - PGXP_ALU(0x00094A80u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80039734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21738: 254A86A8 addiu $t2, $t2, -31064 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-31064)); - PGXP_ALU(0x254A86A8u, cpu->gpr[10], _pgx1, 0xFFFF86A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80039738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC2173C: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003973Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21740: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039748u; /* jal link before delay slot */ - psx_delay_BFC21740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21744: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80039744u); -#endif - if (psx_delay_BFC21740) { - psx_delay_BFC21740 = 0; - cpu->gpr[31] = 0x80039748u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21748: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039750u; /* jal link before delay slot */ - psx_delay_BFC21748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2174C: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003974Cu); -#endif - if (psx_delay_BFC21748) { - psx_delay_BFC21748 = 0; - cpu->gpr[31] = 0x80039750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21750: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21754: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003975Cu; /* jal link before delay slot */ - psx_delay_BFC21754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21758: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80039758u); -#endif - if (psx_delay_BFC21754) { - psx_delay_BFC21754 = 0; - cpu->gpr[31] = 0x8003975Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2175C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2175Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2175C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039764u; /* jal link before delay slot */ - psx_delay_BFC2175C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21760: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80039760u); -#endif - if (psx_delay_BFC2175C) { - psx_delay_BFC2175C = 0; - cpu->gpr[31] = 0x80039764u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21764: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21768: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039770u; /* jal link before delay slot */ - psx_delay_BFC21768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2176C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003976Cu); -#endif - if (psx_delay_BFC21768) { - psx_delay_BFC21768 = 0; - cpu->gpr[31] = 0x80039770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21770: 0C011951 jal 0xB0046544 */ - cpu->gpr[31] = 0x80039778u; /* jal link before delay slot */ - psx_delay_BFC21770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039774u); -#endif - if (psx_delay_BFC21770) { - psx_delay_BFC21770 = 0; - cpu->gpr[31] = 0x80039778u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046544u); - cpu->pc = 0x80046544u; return; - } -label_BFC21778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21778: 10000031 beq $zero, $zero, 0xBFC21840 */ - uint32_t psx_brA_BFC21778 = cpu->gpr[0]; uint32_t psx_brB_BFC21778 = cpu->gpr[0]; - psx_taken_BFC21778 = (psx_brA_BFC21778 == psx_brB_BFC21778); - psx_delay_BFC21778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2177C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003977Cu); -#endif - if (psx_delay_BFC21778) { - psx_delay_BFC21778 = 0; - if (psx_taken_BFC21778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039840u); - goto label_BFC21840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039780u); - } -label_BFC21780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21780: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039788u; /* jal link before delay slot */ - psx_delay_BFC21780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21784: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039784u); -#endif - if (psx_delay_BFC21780) { - psx_delay_BFC21780 = 0; - cpu->gpr[31] = 0x80039788u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21788: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2178C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039794u; /* jal link before delay slot */ - psx_delay_BFC2178C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21790: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80039790u); -#endif - if (psx_delay_BFC2178C) { - psx_delay_BFC2178C = 0; - cpu->gpr[31] = 0x80039794u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21794: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003979Cu; /* jal link before delay slot */ - psx_delay_BFC21794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21798: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80039798u); -#endif - if (psx_delay_BFC21794) { - psx_delay_BFC21794 = 0; - cpu->gpr[31] = 0x8003979Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC2179C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2179Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2179Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC2179C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217A0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800397A8u; /* jal link before delay slot */ - psx_delay_BFC217A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC217A4: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800397A4u); -#endif - if (psx_delay_BFC217A0) { - psx_delay_BFC217A0 = 0; - cpu->gpr[31] = 0x800397A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC217A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217A8: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800397B0u; /* jal link before delay slot */ - psx_delay_BFC217A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC217AC: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800397ACu); -#endif - if (psx_delay_BFC217A8) { - psx_delay_BFC217A8 = 0; - cpu->gpr[31] = 0x800397B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC217B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC217B0: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800397B0u); -#endif - /* 0xBFC217B4: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800397B4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800397B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC217B8: 10000029 beq $zero, $zero, 0xBFC21860 */ - uint32_t psx_brA_BFC217B8 = cpu->gpr[0]; uint32_t psx_brB_BFC217B8 = cpu->gpr[0]; - psx_taken_BFC217B8 = (psx_brA_BFC217B8 == psx_brB_BFC217B8); - psx_delay_BFC217B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC217BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800397BCu); -#endif - if (psx_delay_BFC217B8) { - psx_delay_BFC217B8 = 0; - if (psx_taken_BFC217B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039860u); - goto label_BFC21860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800397C0u); - } -label_BFC217C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217C0: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800397C8u; /* jal link before delay slot */ - psx_delay_BFC217C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC217C4: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800397C4u); -#endif - if (psx_delay_BFC217C0) { - psx_delay_BFC217C0 = 0; - cpu->gpr[31] = 0x800397C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC217C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC217C8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800397C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217CC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800397D4u; /* jal link before delay slot */ - psx_delay_BFC217CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC217D0: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800397D0u); -#endif - if (psx_delay_BFC217CC) { - psx_delay_BFC217CC = 0; - cpu->gpr[31] = 0x800397D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC217D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217D4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x800397DCu; /* jal link before delay slot */ - psx_delay_BFC217D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC217D8: 24040013 addiu $a0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24040013u, cpu->gpr[4], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x800397D8u); -#endif - if (psx_delay_BFC217D4) { - psx_delay_BFC217D4 = 0; - cpu->gpr[31] = 0x800397DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC217DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC217DC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800397DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217E0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x800397E8u; /* jal link before delay slot */ - psx_delay_BFC217E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC217E4: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800397E4u); -#endif - if (psx_delay_BFC217E0) { - psx_delay_BFC217E0 = 0; - cpu->gpr[31] = 0x800397E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC217E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC217E8: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800397F0u; /* jal link before delay slot */ - psx_delay_BFC217E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC217EC: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800397ECu); -#endif - if (psx_delay_BFC217E8) { - psx_delay_BFC217E8 = 0; - cpu->gpr[31] = 0x800397F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC217F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC217F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC217F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800397F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC217F0: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800397F0u); -#endif - /* 0xBFC217F4: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800397F4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800397F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC217F8: 10000019 beq $zero, $zero, 0xBFC21860 */ - uint32_t psx_brA_BFC217F8 = cpu->gpr[0]; uint32_t psx_brB_BFC217F8 = cpu->gpr[0]; - psx_taken_BFC217F8 = (psx_brA_BFC217F8 == psx_brB_BFC217F8); - psx_delay_BFC217F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC217FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800397FCu); -#endif - if (psx_delay_BFC217F8) { - psx_delay_BFC217F8 = 0; - if (psx_taken_BFC217F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039860u); - goto label_BFC21860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039800u); - } -label_BFC21800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21800: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x80039808u; /* jal link before delay slot */ - psx_delay_BFC21800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21804: 2404000D addiu $a0, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2404000Du, cpu->gpr[4], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80039804u); -#endif - if (psx_delay_BFC21800) { - psx_delay_BFC21800 = 0; - cpu->gpr[31] = 0x80039808u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC21808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC21808: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2180C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039814u; /* jal link before delay slot */ - psx_delay_BFC2180C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21810: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80039810u); -#endif - if (psx_delay_BFC2180C) { - psx_delay_BFC2180C = 0; - cpu->gpr[31] = 0x80039814u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21814: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003981Cu; /* jal link before delay slot */ - psx_delay_BFC21814 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21818: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80039818u); -#endif - if (psx_delay_BFC21814) { - psx_delay_BFC21814 = 0; - cpu->gpr[31] = 0x8003981Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC2181C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2181Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003981Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC2181C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003981Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21820: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80039828u; /* jal link before delay slot */ - psx_delay_BFC21820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC21824: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80039824u); -#endif - if (psx_delay_BFC21820) { - psx_delay_BFC21820 = 0; - cpu->gpr[31] = 0x80039828u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC21828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21828: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80039830u; /* jal link before delay slot */ - psx_delay_BFC21828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2182C: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003982Cu); -#endif - if (psx_delay_BFC21828) { - psx_delay_BFC21828 = 0; - cpu->gpr[31] = 0x80039830u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC21830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21830: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039830u); -#endif - /* 0xBFC21834: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039834u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80039834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21838: 10000009 beq $zero, $zero, 0xBFC21860 */ - uint32_t psx_brA_BFC21838 = cpu->gpr[0]; uint32_t psx_brB_BFC21838 = cpu->gpr[0]; - psx_taken_BFC21838 = (psx_brA_BFC21838 == psx_brB_BFC21838); - psx_delay_BFC21838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2183C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003983Cu); -#endif - if (psx_delay_BFC21838) { - psx_delay_BFC21838 = 0; - if (psx_taken_BFC21838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039860u); - goto label_BFC21860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039840u); - } -label_BFC21840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21840: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039840u); -#endif - /* 0xBFC21844: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039844u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80039844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21848: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80039848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2184C: 1081FFCC beq $a0, $at, 0xBFC21780 */ - uint32_t psx_brA_BFC2184C = cpu->gpr[4]; uint32_t psx_brB_BFC2184C = cpu->gpr[1]; - psx_taken_BFC2184C = (psx_brA_BFC2184C == psx_brB_BFC2184C); - psx_delay_BFC2184C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21850: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80039850u); -#endif - if (psx_delay_BFC2184C) { - psx_delay_BFC2184C = 0; - if (psx_taken_BFC2184C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039780u); - goto label_BFC21780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039854u); - } -label_BFC21854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC21854: 1081FFDA beq $a0, $at, 0xBFC217C0 */ - uint32_t psx_brA_BFC21854 = cpu->gpr[4]; uint32_t psx_brB_BFC21854 = cpu->gpr[1]; - psx_taken_BFC21854 = (psx_brA_BFC21854 == psx_brB_BFC21854); - psx_delay_BFC21854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21858: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80039858u); -#endif - if (psx_delay_BFC21854) { - psx_delay_BFC21854 = 0; - if (psx_taken_BFC21854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800397C0u); - goto label_BFC217C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003985Cu); - } -label_BFC2185C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2185Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2185Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003985Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2185C: 1081FFE8 beq $a0, $at, 0xBFC21800 */ - uint32_t psx_brA_BFC2185C = cpu->gpr[4]; uint32_t psx_brB_BFC2185C = cpu->gpr[1]; - psx_taken_BFC2185C = (psx_brA_BFC2185C == psx_brB_BFC2185C); - psx_delay_BFC2185C = 1; -label_BFC21860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21860: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039860u); -#endif - if (psx_delay_BFC2185C) { - psx_delay_BFC2185C = 0; - if (psx_taken_BFC2185C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039800u); - goto label_BFC21800; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039864u); - } -label_BFC21864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC21864: AC246BB8 sw $a0, 27576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039864u); return; } g_debug_last_store_pc = 0x80039864u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80039864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21868: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2186C: AC20A180 sw $zero, -24192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003986Cu); return; } g_debug_last_store_pc = 0x8003986Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003986Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21870: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21874: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21878: 10000010 beq $zero, $zero, 0xBFC218BC */ - uint32_t psx_brA_BFC21878 = cpu->gpr[0]; uint32_t psx_brB_BFC21878 = cpu->gpr[0]; - psx_taken_BFC21878 = (psx_brA_BFC21878 == psx_brB_BFC21878); - psx_delay_BFC21878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2187C: AC246BC0 sw $a0, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003987Cu); return; } g_debug_last_store_pc = 0x8003987Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003987Cu); -#endif - if (psx_delay_BFC21878) { - psx_delay_BFC21878 = 0; - if (psx_taken_BFC21878) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398BCu); - goto label_BFC218BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039880u); - } -label_BFC21880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21880: 0C01196D jal 0xB00465B4 */ - cpu->gpr[31] = 0x80039888u; /* jal link before delay slot */ - psx_delay_BFC21880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21884: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039884u); -#endif - if (psx_delay_BFC21880) { - psx_delay_BFC21880 = 0; - cpu->gpr[31] = 0x80039888u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465B4u); - cpu->pc = 0x800465B4u; return; - } -label_BFC21888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21888: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039888u); -#endif - /* 0xBFC2188C: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003988Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003988Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21890: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80039898u; /* jal link before delay slot */ - psx_delay_BFC21890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21894: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039894u); -#endif - if (psx_delay_BFC21890) { - psx_delay_BFC21890 = 0; - cpu->gpr[31] = 0x80039898u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC21898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC21898: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039898u); -#endif - /* 0xBFC2189C: 8C846BC0 lw $a0, 27584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003989Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218A0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC218A4: AC246BB8 sw $a0, 27576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398A4u); return; } g_debug_last_store_pc = 0x800398A4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800398A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218A8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC218AC: AC206BBC sw $zero, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398ACu); return; } g_debug_last_store_pc = 0x800398ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800398ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC218B0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800398B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC218B8: AC246BC0 sw $a0, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398B8u); return; } g_debug_last_store_pc = 0x800398B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246BC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800398B8u); -#endif -label_BFC218BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398BCu); -#endif - /* 0xBFC218BC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800398BCu); -#endif -label_BFC218C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC218C0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800398C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC218C4: 03E00008 jr $ra */ - psx_delay_BFC218C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC218C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800398C8u); -#endif - if (psx_delay_BFC218C4) { - psx_delay_BFC218C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC218CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC218CCu); - int psx_delay_BFC218D8 = 0; - int psx_taken_BFC218D8 = 0; - int psx_delay_BFC218EC = 0; - int psx_taken_BFC218EC = 0; - int psx_delay_BFC218F4 = 0; - int psx_delay_BFC21900 = 0; - int psx_delay_BFC21908 = 0; - int psx_taken_BFC21908 = 0; - int psx_delay_BFC2191C = 0; - int psx_taken_BFC2191C = 0; - int psx_delay_BFC21924 = 0; - int psx_delay_BFC21934 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC218E0u: goto label_BFC218E0; - case 0xBFC218F4u: goto label_BFC218F4; - case 0xBFC218FCu: goto label_BFC218FC; - case 0xBFC21908u: goto label_BFC21908; - case 0xBFC21910u: goto label_BFC21910; - case 0xBFC21914u: goto label_BFC21914; - case 0xBFC21924u: goto label_BFC21924; - case 0xBFC2192Cu: goto label_BFC2192C; - case 0xBFC21930u: goto label_BFC21930; - default: break; - } - } -label_BFC218CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC218CC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398D0u); -#endif - /* 0xBFC218D0: 8DCE9EC8 lw $t6, -24888($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EC8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800398D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC218D4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800398D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC218D8: 15C00014 bne $t6, $zero, 0xBFC2192C */ - uint32_t psx_brA_BFC218D8 = cpu->gpr[14]; uint32_t psx_brB_BFC218D8 = cpu->gpr[0]; - psx_taken_BFC218D8 = (psx_brA_BFC218D8 != psx_brB_BFC218D8); - psx_delay_BFC218D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC218DC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398DCu); return; } g_debug_last_store_pc = 0x800398DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800398DCu); -#endif - if (psx_delay_BFC218D8) { - psx_delay_BFC218D8 = 0; - if (psx_taken_BFC218D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003992Cu); - goto label_BFC2192C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398E0u); - } -label_BFC218E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218E0: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218E4: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800398E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC218E8: 00817824 and $t7, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800398E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC218EC: 11E00009 beq $t7, $zero, 0xBFC21914 */ - uint32_t psx_brA_BFC218EC = cpu->gpr[15]; uint32_t psx_brB_BFC218EC = cpu->gpr[0]; - psx_taken_BFC218EC = (psx_brA_BFC218EC == psx_brB_BFC218EC); - psx_delay_BFC218EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC218F0: 3C015000 lui $at, 0x5000 */ - cpu->gpr[1] = 0x50000000u; - PGXP_ALU(0x3C015000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800398F0u); -#endif - if (psx_delay_BFC218EC) { - psx_delay_BFC218EC = 0; - if (psx_taken_BFC218EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039914u); - goto label_BFC21914; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800398F4u); - } -label_BFC218F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC218F4: 0C00F4C7 jal 0xB003D31C */ - cpu->gpr[31] = 0x800398FCu; /* jal link before delay slot */ - psx_delay_BFC218F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC218F8: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398F8u); return; } g_debug_last_store_pc = 0x800398F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800398F8u); -#endif - if (psx_delay_BFC218F4) { - psx_delay_BFC218F4 = 0; - cpu->gpr[31] = 0x800398FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D31Cu); - cpu->pc = 0x8003D31Cu; return; - } -label_BFC218FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC218FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC218FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800398FCu); -#endif - /* 0xBFC218FC: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800398FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800398FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21900: 0C00C847 jal 0xB003211C */ - cpu->gpr[31] = 0x80039908u; /* jal link before delay slot */ - psx_delay_BFC21900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039904u); -#endif - if (psx_delay_BFC21900) { - psx_delay_BFC21900 = 0; - cpu->gpr[31] = 0x80039908u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003211Cu); - cpu->pc = 0x8003211Cu; return; - } -label_BFC21908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21908: 10000009 beq $zero, $zero, 0xBFC21930 */ - uint32_t psx_brA_BFC21908 = cpu->gpr[0]; uint32_t psx_brB_BFC21908 = cpu->gpr[0]; - psx_taken_BFC21908 = (psx_brA_BFC21908 == psx_brB_BFC21908); - psx_delay_BFC21908 = 1; - /* 0xBFC2190C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003990Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003990Cu); -#endif - if (psx_delay_BFC21908) { - psx_delay_BFC21908 = 0; - if (psx_taken_BFC21908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039930u); - goto label_BFC21930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039910u); - } -label_BFC21910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21910: 3C015000 lui $at, 0x5000 */ - cpu->gpr[1] = 0x50000000u; - PGXP_ALU(0x3C015000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039910u); -#endif -label_BFC21914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21914: 34215000 ori $at, $at, 0x5000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x5000u; - PGXP_ALU(0x34215000u, cpu->gpr[1], _pgx1, 0x5000u); } -#ifdef PSX_COSIM - cosim_instr(0x80039914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000012u); -#endif - /* 0xBFC21918: 0081C024 and $t8, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x0081C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2191C: 13000004 beq $t8, $zero, 0xBFC21930 */ - uint32_t psx_brA_BFC2191C = cpu->gpr[24]; uint32_t psx_brB_BFC2191C = cpu->gpr[0]; - psx_taken_BFC2191C = (psx_brA_BFC2191C == psx_brB_BFC2191C); - psx_delay_BFC2191C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039920u); -#endif - /* 0xBFC21920: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039920u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039920u); -#endif - if (psx_delay_BFC2191C) { - psx_delay_BFC2191C = 0; - if (psx_taken_BFC2191C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039930u); - goto label_BFC21930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039924u); - } -label_BFC21924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21924: 0C011A33 jal 0xB00468CC */ - cpu->gpr[31] = 0x8003992Cu; /* jal link before delay slot */ - psx_delay_BFC21924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039928u); -#endif - if (psx_delay_BFC21924) { - psx_delay_BFC21924 = 0; - cpu->gpr[31] = 0x8003992Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468CCu); - cpu->pc = 0x800468CCu; return; - } -label_BFC2192C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2192Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003992Cu); -#endif - /* 0xBFC2192C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003992Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003992Cu); -#endif -label_BFC21930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21930: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80039930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC21934: 03E00008 jr $ra */ - psx_delay_BFC21934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039938u); -#endif - if (psx_delay_BFC21934) { - psx_delay_BFC21934 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2193C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2193Cu); - int psx_delay_BFC21954 = 0; - int psx_taken_BFC21954 = 0; - int psx_delay_BFC21964 = 0; - int psx_delay_BFC2196C = 0; - int psx_taken_BFC2196C = 0; - int psx_delay_BFC2197C = 0; - int psx_delay_BFC21988 = 0; - int psx_delay_BFC21994 = 0; - int psx_taken_BFC21994 = 0; - int psx_delay_BFC21A1C = 0; - int psx_delay_BFC21A30 = 0; - int psx_taken_BFC21A30 = 0; - int psx_delay_BFC21A4C = 0; - int psx_delay_BFC21A54 = 0; - int psx_taken_BFC21A54 = 0; - int psx_delay_BFC21A60 = 0; - int psx_taken_BFC21A60 = 0; - int psx_delay_BFC21A94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2195Cu: goto label_BFC2195C; - case 0xBFC2196Cu: goto label_BFC2196C; - case 0xBFC21974u: goto label_BFC21974; - case 0xBFC21984u: goto label_BFC21984; - case 0xBFC21988u: goto label_BFC21988; - case 0xBFC21990u: goto label_BFC21990; - case 0xBFC2199Cu: goto label_BFC2199C; - case 0xBFC21A1Cu: goto label_BFC21A1C; - case 0xBFC21A24u: goto label_BFC21A24; - case 0xBFC21A38u: goto label_BFC21A38; - case 0xBFC21A3Cu: goto label_BFC21A3C; - case 0xBFC21A54u: goto label_BFC21A54; - case 0xBFC21A5Cu: goto label_BFC21A5C; - case 0xBFC21A68u: goto label_BFC21A68; - case 0xBFC21A78u: goto label_BFC21A78; - default: break; - } - } -label_BFC2193C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2193Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2193C: 27BDFF90 addiu $sp, $sp, -112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-112)); - PGXP_ALU(0x27BDFF90u, cpu->gpr[29], _pgx1, 0xFFFFFF90u); } -#ifdef PSX_COSIM - cosim_instr(0x8003993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21940: AFA40070 sw $a0, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039940u); return; } g_debug_last_store_pc = 0x80039940u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40070u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80039940u); -#endif - /* 0xBFC21944: 8FAE0070 lw $t6, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039944u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0070u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC21948: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039948u); return; } g_debug_last_store_pc = 0x80039948u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2194C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003994Cu); return; } g_debug_last_store_pc = 0x8003994Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC21950: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039950u); return; } g_debug_last_store_pc = 0x80039950u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC21954: 15C00007 bne $t6, $zero, 0xBFC21974 */ - uint32_t psx_brA_BFC21954 = cpu->gpr[14]; uint32_t psx_brB_BFC21954 = cpu->gpr[0]; - psx_taken_BFC21954 = (psx_brA_BFC21954 != psx_brB_BFC21954); - psx_delay_BFC21954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC21958: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039958u); -#endif - if (psx_delay_BFC21954) { - psx_delay_BFC21954 = 0; - if (psx_taken_BFC21954) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039974u); - goto label_BFC21974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003995Cu); - } -label_BFC2195C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2195Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2195C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21960: 24A56A00 addiu $a1, $a1, 27136 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27136)); - PGXP_ALU(0x24A56A00u, cpu->gpr[5], _pgx1, 0x00006A00u); } -#ifdef PSX_COSIM - cosim_instr(0x80039960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21964: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003996Cu; /* jal link before delay slot */ - psx_delay_BFC21964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21968: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80039968u); -#endif - if (psx_delay_BFC21964) { - psx_delay_BFC21964 = 0; - cpu->gpr[31] = 0x8003996Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC2196C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2196Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2196Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2196C: 10000006 beq $zero, $zero, 0xBFC21988 */ - uint32_t psx_brA_BFC2196C = cpu->gpr[0]; uint32_t psx_brB_BFC2196C = cpu->gpr[0]; - psx_taken_BFC2196C = (psx_brA_BFC2196C == psx_brB_BFC2196C); - psx_delay_BFC2196C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21970: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80039970u); -#endif - if (psx_delay_BFC2196C) { - psx_delay_BFC2196C = 0; - if (psx_taken_BFC2196C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039988u); - goto label_BFC21988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039974u); - } -label_BFC21974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21974: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21978: 24A56A08 addiu $a1, $a1, 27144 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27144)); - PGXP_ALU(0x24A56A08u, cpu->gpr[5], _pgx1, 0x00006A08u); } -#ifdef PSX_COSIM - cosim_instr(0x80039978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2197C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039984u; /* jal link before delay slot */ - psx_delay_BFC2197C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21980: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80039980u); -#endif - if (psx_delay_BFC2197C) { - psx_delay_BFC2197C = 0; - cpu->gpr[31] = 0x80039984u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21984: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80039984u); -#endif -label_BFC21988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21988: 0C016A8C jal 0xB005AA30 */ - cpu->gpr[31] = 0x80039990u; /* jal link before delay slot */ - psx_delay_BFC21988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2198C: 27A50048 addiu $a1, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27A50048u, cpu->gpr[5], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8003998Cu); -#endif - if (psx_delay_BFC21988) { - psx_delay_BFC21988 = 0; - cpu->gpr[31] = 0x80039990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA30u); - cpu->pc = 0x8005AA30u; return; - } -label_BFC21990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC21990: 27B20048 addiu $s2, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27B20048u, cpu->gpr[18], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80039990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC21994: 14520038 bne $v0, $s2, 0xBFC21A78 */ - uint32_t psx_brA_BFC21994 = cpu->gpr[2]; uint32_t psx_brB_BFC21994 = cpu->gpr[18]; - psx_taken_BFC21994 = (psx_brA_BFC21994 != psx_brB_BFC21994); - psx_delay_BFC21994 = 1; - /* 0xBFC21998: 8FAF0070 lw $t7, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039998u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0070u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039998u); -#endif - if (psx_delay_BFC21994) { - psx_delay_BFC21994 = 0; - if (psx_taken_BFC21994) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A78u); - goto label_BFC21A78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003999Cu); - } -label_BFC2199C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2199Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2199Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003999Cu); -#endif - /* 0xBFC2199C: 8FA20070 lw $v0, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003999Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20070u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC219A0: 0013C080 sll $t8, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC219A4: 00135080 sll $t2, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00135080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC219A8: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC219AC: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC219B0: 01535023 subu $t2, $t2, $s3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[19]; - PGXP_ALU(0x01535023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC219B4: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC219B8: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC219BC: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC219C0: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800399C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC219C4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800399C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC219C8: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800399C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC219CC: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800399CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC219D0: 01535023 subu $t2, $t2, $s3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[19]; - PGXP_ALU(0x01535023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC219D4: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC219D8: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC219DC: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800399DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC219E0: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800399E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC219E4: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800399E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC219E8: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC219EC: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800399ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800399F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC219F0: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800399F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC219F4: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800399F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC219F8: 258CDBA0 addiu $t4, $t4, -9312 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-9312)); - PGXP_ALU(0x258CDBA0u, cpu->gpr[12], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x800399F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC219FC: 2508DC18 addiu $t0, $t0, -9192 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-9192)); - PGXP_ALU(0x2508DC18u, cpu->gpr[8], _pgx1, 0xFFFFDC18u); } -#ifdef PSX_COSIM - cosim_instr(0x800399FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC21A00: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC21A04: 01F8C821 addu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21A08: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A08u); return; } g_debug_last_store_pc = 0x80039A08u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21A0C: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A0Cu); return; } g_debug_last_store_pc = 0x80039A0Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21800u); -#endif - /* 0xBFC21A10: 016C8821 addu $s1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[17] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010100u); -#endif - /* 0xBFC21A14: 03288021 addu $s0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03288021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC21A18: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A18u); -#endif -label_BFC21A1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21A1C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039A24u; /* jal link before delay slot */ - psx_delay_BFC21A1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC21A20: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A20u); -#endif - if (psx_delay_BFC21A1C) { - psx_delay_BFC21A1C = 0; - cpu->gpr[31] = 0x80039A24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A24u); -#endif - /* 0xBFC21A24: 8FAD0060 lw $t5, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A24u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0060u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC21A28: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21A2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21A30: 05A10002 bgez $t5, 0xBFC21A3C */ - uint32_t psx_brA_BFC21A30 = cpu->gpr[13]; - psx_taken_BFC21A30 = ((int32_t)psx_brA_BFC21A30 >= 0); - psx_delay_BFC21A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2003u); -#endif - /* 0xBFC21A34: 01A00821 addu $at, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A34u); -#endif - if (psx_delay_BFC21A30) { - psx_delay_BFC21A30 = 0; - if (psx_taken_BFC21A30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A3Cu); - goto label_BFC21A3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A38u); - } -label_BFC21A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21A38: 24211FFF addiu $at, $at, 8191 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (8191)); - PGXP_ALU(0x24211FFFu, cpu->gpr[1], _pgx1, 0x00001FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039A38u); -#endif -label_BFC21A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC21A3C: 00017343 sra $t6, $at, 13 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 13u); - PGXP_ALU(0x00017343u, cpu->gpr[14], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x80039A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC21A40: AE2E0070 sw $t6, 112($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A40u); return; } g_debug_last_store_pc = 0x80039A40u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE2E0070u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21A44: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21A48: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21A4C: 0C016A90 jal 0xB005AA40 */ - cpu->gpr[31] = 0x80039A54u; /* jal link before delay slot */ - psx_delay_BFC21A4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC21A50: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A50u); -#endif - if (psx_delay_BFC21A4C) { - psx_delay_BFC21A4C = 0; - cpu->gpr[31] = 0x80039A54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA40u); - cpu->pc = 0x8005AA40u; return; - } -label_BFC21A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC21A54: 14520004 bne $v0, $s2, 0xBFC21A68 */ - uint32_t psx_brA_BFC21A54 = cpu->gpr[2]; uint32_t psx_brB_BFC21A54 = cpu->gpr[18]; - psx_taken_BFC21A54 = (psx_brA_BFC21A54 != psx_brB_BFC21A54); - psx_delay_BFC21A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21A58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039A58u); -#endif - if (psx_delay_BFC21A54) { - psx_delay_BFC21A54 = 0; - if (psx_taken_BFC21A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A68u); - goto label_BFC21A68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A5Cu); - } -label_BFC21A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A5Cu); -#endif - /* 0xBFC21A5C: 8FA20070 lw $v0, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20070u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21A60: 1000FFEE beq $zero, $zero, 0xBFC21A1C */ - uint32_t psx_brA_BFC21A60 = cpu->gpr[0]; uint32_t psx_brB_BFC21A60 = cpu->gpr[0]; - psx_taken_BFC21A60 = (psx_brA_BFC21A60 == psx_brB_BFC21A60); - psx_delay_BFC21A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC21A64: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A64u); -#endif - if (psx_delay_BFC21A60) { - psx_delay_BFC21A60 = 0; - if (psx_taken_BFC21A60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A1Cu); - goto label_BFC21A1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039A68u); - } -label_BFC21A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A68u); -#endif - /* 0xBFC21A68: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A68u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A68u); -#endif - /* 0xBFC21A6C: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A6Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21A70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039A70u); -#endif - /* 0xBFC21A74: 8FAF0070 lw $t7, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A74u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0070u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A74u); -#endif -label_BFC21A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21A78: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC21A7C: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC21A80: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039A80u); -#endif - /* 0xBFC21A84: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC21A88: AC33FF60 sw $s3, -160($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A88u); return; } g_debug_last_store_pc = 0x80039A88u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAC33FF60u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A88u); -#endif - /* 0xBFC21A8C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A8Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A90u); -#endif - /* 0xBFC21A90: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039A90u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC21A94: 03E00008 jr $ra */ - psx_delay_BFC21A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21A98: 27BD0070 addiu $sp, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27BD0070u, cpu->gpr[29], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80039A98u); -#endif - if (psx_delay_BFC21A94) { - psx_delay_BFC21A94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC21A9C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC21A9Cu); - int psx_delay_BFC21AA8 = 0; - int psx_taken_BFC21AA8 = 0; - int psx_delay_BFC21AD4 = 0; - int psx_taken_BFC21AD4 = 0; - int psx_delay_BFC21AE8 = 0; - int psx_taken_BFC21AE8 = 0; - int psx_delay_BFC21AF0 = 0; - int psx_delay_BFC21AFC = 0; - int psx_taken_BFC21AFC = 0; - int psx_delay_BFC21B08 = 0; - int psx_taken_BFC21B08 = 0; - int psx_delay_BFC21B20 = 0; - int psx_taken_BFC21B20 = 0; - int psx_delay_BFC21B34 = 0; - int psx_taken_BFC21B34 = 0; - int psx_delay_BFC21B3C = 0; - int psx_delay_BFC21B44 = 0; - int psx_delay_BFC21B54 = 0; - int psx_taken_BFC21B54 = 0; - int psx_delay_BFC21B64 = 0; - int psx_taken_BFC21B64 = 0; - int psx_delay_BFC21B70 = 0; - int psx_taken_BFC21B70 = 0; - int psx_delay_BFC21B9C = 0; - int psx_taken_BFC21B9C = 0; - int psx_delay_BFC21BA4 = 0; - int psx_taken_BFC21BA4 = 0; - int psx_delay_BFC21BB4 = 0; - int psx_delay_BFC21BC0 = 0; - int psx_taken_BFC21BC0 = 0; - int psx_delay_BFC21BD0 = 0; - int psx_delay_BFC21C30 = 0; - int psx_delay_BFC21C64 = 0; - int psx_delay_BFC21C70 = 0; - int psx_taken_BFC21C70 = 0; - int psx_delay_BFC21C88 = 0; - int psx_taken_BFC21C88 = 0; - int psx_delay_BFC21D10 = 0; - int psx_delay_BFC21D28 = 0; - int psx_taken_BFC21D28 = 0; - int psx_delay_BFC21D5C = 0; - int psx_delay_BFC21D80 = 0; - int psx_taken_BFC21D80 = 0; - int psx_delay_BFC21D94 = 0; - int psx_taken_BFC21D94 = 0; - int psx_delay_BFC21D9C = 0; - int psx_taken_BFC21D9C = 0; - int psx_delay_BFC21DB4 = 0; - int psx_taken_BFC21DB4 = 0; - int psx_delay_BFC21E3C = 0; - int psx_delay_BFC21E54 = 0; - int psx_taken_BFC21E54 = 0; - int psx_delay_BFC21E88 = 0; - int psx_delay_BFC21EAC = 0; - int psx_taken_BFC21EAC = 0; - int psx_delay_BFC21F08 = 0; - int psx_taken_BFC21F08 = 0; - int psx_delay_BFC21F10 = 0; - int psx_taken_BFC21F10 = 0; - int psx_delay_BFC21F24 = 0; - int psx_taken_BFC21F24 = 0; - int psx_delay_BFC21F70 = 0; - int psx_delay_BFC21F88 = 0; - int psx_taken_BFC21F88 = 0; - int psx_delay_BFC21FBC = 0; - int psx_delay_BFC21FE0 = 0; - int psx_taken_BFC21FE0 = 0; - int psx_delay_BFC22020 = 0; - int psx_taken_BFC22020 = 0; - int psx_delay_BFC22094 = 0; - int psx_delay_BFC220A4 = 0; - int psx_delay_BFC220B4 = 0; - int psx_delay_BFC220C0 = 0; - int psx_delay_BFC220D4 = 0; - int psx_taken_BFC220D4 = 0; - int psx_delay_BFC220F4 = 0; - int psx_delay_BFC22128 = 0; - int psx_taken_BFC22128 = 0; - int psx_delay_BFC2215C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC21AB0u: goto label_BFC21AB0; - case 0xBFC21ADCu: goto label_BFC21ADC; - case 0xBFC21AF0u: goto label_BFC21AF0; - case 0xBFC21AF8u: goto label_BFC21AF8; - case 0xBFC21B04u: goto label_BFC21B04; - case 0xBFC21B10u: goto label_BFC21B10; - case 0xBFC21B28u: goto label_BFC21B28; - case 0xBFC21B3Cu: goto label_BFC21B3C; - case 0xBFC21B44u: goto label_BFC21B44; - case 0xBFC21B4Cu: goto label_BFC21B4C; - case 0xBFC21B5Cu: goto label_BFC21B5C; - case 0xBFC21B6Cu: goto label_BFC21B6C; - case 0xBFC21B78u: goto label_BFC21B78; - case 0xBFC21B7Cu: goto label_BFC21B7C; - case 0xBFC21BA4u: goto label_BFC21BA4; - case 0xBFC21BACu: goto label_BFC21BAC; - case 0xBFC21BBCu: goto label_BFC21BBC; - case 0xBFC21BC8u: goto label_BFC21BC8; - case 0xBFC21BD8u: goto label_BFC21BD8; - case 0xBFC21BE0u: goto label_BFC21BE0; - case 0xBFC21C38u: goto label_BFC21C38; - case 0xBFC21C6Cu: goto label_BFC21C6C; - case 0xBFC21C78u: goto label_BFC21C78; - case 0xBFC21C90u: goto label_BFC21C90; - case 0xBFC21D0Cu: goto label_BFC21D0C; - case 0xBFC21D18u: goto label_BFC21D18; - case 0xBFC21D30u: goto label_BFC21D30; - case 0xBFC21D40u: goto label_BFC21D40; - case 0xBFC21D64u: goto label_BFC21D64; - case 0xBFC21D88u: goto label_BFC21D88; - case 0xBFC21D9Cu: goto label_BFC21D9C; - case 0xBFC21DA4u: goto label_BFC21DA4; - case 0xBFC21DBCu: goto label_BFC21DBC; - case 0xBFC21E38u: goto label_BFC21E38; - case 0xBFC21E44u: goto label_BFC21E44; - case 0xBFC21E5Cu: goto label_BFC21E5C; - case 0xBFC21E6Cu: goto label_BFC21E6C; - case 0xBFC21E90u: goto label_BFC21E90; - case 0xBFC21EB4u: goto label_BFC21EB4; - case 0xBFC21EB8u: goto label_BFC21EB8; - case 0xBFC21F10u: goto label_BFC21F10; - case 0xBFC21F18u: goto label_BFC21F18; - case 0xBFC21F2Cu: goto label_BFC21F2C; - case 0xBFC21F6Cu: goto label_BFC21F6C; - case 0xBFC21F78u: goto label_BFC21F78; - case 0xBFC21F90u: goto label_BFC21F90; - case 0xBFC21FA0u: goto label_BFC21FA0; - case 0xBFC21FC4u: goto label_BFC21FC4; - case 0xBFC21FE8u: goto label_BFC21FE8; - case 0xBFC22028u: goto label_BFC22028; - case 0xBFC2207Cu: goto label_BFC2207C; - case 0xBFC2209Cu: goto label_BFC2209C; - case 0xBFC220ACu: goto label_BFC220AC; - case 0xBFC220BCu: goto label_BFC220BC; - case 0xBFC220C8u: goto label_BFC220C8; - case 0xBFC220DCu: goto label_BFC220DC; - case 0xBFC220E8u: goto label_BFC220E8; - case 0xBFC220FCu: goto label_BFC220FC; - case 0xBFC22130u: goto label_BFC22130; - case 0xBFC2214Cu: goto label_BFC2214C; - case 0xBFC22154u: goto label_BFC22154; - case 0xBFC22158u: goto label_BFC22158; - default: break; - } - } -label_BFC21A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC21A9C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AA0u); -#endif - /* 0xBFC21AA0: 8DCE6BC0 lw $t6, 27584($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AA0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6BC0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC21AA4: 27BDFF30 addiu $sp, $sp, -208 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-208)); - PGXP_ALU(0x27BDFF30u, cpu->gpr[29], _pgx1, 0xFFFFFF30u); } -#ifdef PSX_COSIM - cosim_instr(0x80039AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC21AA8: 11C001AA beq $t6, $zero, 0xBFC22154 */ - uint32_t psx_brA_BFC21AA8 = cpu->gpr[14]; uint32_t psx_brB_BFC21AA8 = cpu->gpr[0]; - psx_taken_BFC21AA8 = (psx_brA_BFC21AA8 == psx_brB_BFC21AA8); - psx_delay_BFC21AA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC21AAC: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AACu); return; } g_debug_last_store_pc = 0x80039AACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AACu); -#endif - if (psx_delay_BFC21AA8) { - psx_delay_BFC21AA8 = 0; - if (psx_taken_BFC21AA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A154u); - goto label_BFC22154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039AB0u); - } -label_BFC21AB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC21AB0: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC21AB4: 01E47821 addu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[4]; - PGXP_ALU(0x01E47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21AB8: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC21ABC: AFB40054 sw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039ABCu); return; } g_debug_last_store_pc = 0x80039ABCu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21AC0: 27180E80 addiu $t8, $t8, 3712 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (3712)); - PGXP_ALU(0x27180E80u, cpu->gpr[24], _pgx1, 0x00000E80u); } -#ifdef PSX_COSIM - cosim_instr(0x80039AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21AC4: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1108000u); -#endif - /* 0xBFC21AC8: 01F8A021 addu $s4, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[20] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039AC8u); -#endif - /* 0xBFC21ACC: 8E82000C lw $v0, 12($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039ACCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } - PGXP_LOAD(0x8E82000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC21AD4: 1C400006 bgtz $v0, 0xBFC21AF0 */ - uint32_t psx_brA_BFC21AD4 = cpu->gpr[2]; - psx_taken_BFC21AD4 = ((int32_t)psx_brA_BFC21AD4 > 0); - psx_delay_BFC21AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21AD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039AD8u); -#endif - if (psx_delay_BFC21AD4) { - psx_delay_BFC21AD4 = 0; - if (psx_taken_BFC21AD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039AF0u); - goto label_BFC21AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039ADCu); - } -label_BFC21ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC21ADC: 24590001 addiu $t9, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24590001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC21AE0: AE99000C sw $t9, 12($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AE0u); return; } g_debug_last_store_pc = 0x80039AE0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE99000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AE0u); -#endif - /* 0xBFC21AE4: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AE4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21AE8: 1000019B beq $zero, $zero, 0xBFC22158 */ - uint32_t psx_brA_BFC21AE8 = cpu->gpr[0]; uint32_t psx_brB_BFC21AE8 = cpu->gpr[0]; - psx_taken_BFC21AE8 = (psx_brA_BFC21AE8 == psx_brB_BFC21AE8); - psx_delay_BFC21AE8 = 1; - /* 0xBFC21AEC: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AECu); -#endif - if (psx_delay_BFC21AE8) { - psx_delay_BFC21AE8 = 0; - if (psx_taken_BFC21AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A158u); - goto label_BFC22158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039AF0u); - } -label_BFC21AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21AF0: 0C00F3C0 jal 0xB003CF00 */ - cpu->gpr[31] = 0x80039AF8u; /* jal link before delay slot */ - psx_delay_BFC21AF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21AF4: AFA400D0 sw $a0, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039AF4u); return; } g_debug_last_store_pc = 0x80039AF4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA400D0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80039AF4u); -#endif - if (psx_delay_BFC21AF0) { - psx_delay_BFC21AF0 = 0; - cpu->gpr[31] = 0x80039AF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF00u); - cpu->pc = 0x8003CF00u; return; - } -label_BFC21AF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21AF8: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80039AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC21AFC: 14410004 bne $v0, $at, 0xBFC21B10 */ - uint32_t psx_brA_BFC21AFC = cpu->gpr[2]; uint32_t psx_brB_BFC21AFC = cpu->gpr[1]; - psx_taken_BFC21AFC = (psx_brA_BFC21AFC != psx_brB_BFC21AFC); - psx_delay_BFC21AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B00u); -#endif - if (psx_delay_BFC21AFC) { - psx_delay_BFC21AFC = 0; - if (psx_taken_BFC21AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B10u); - goto label_BFC21B10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B04u); - } -label_BFC21B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B04u); -#endif - /* 0xBFC21B04: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B04u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B08: 10000192 beq $zero, $zero, 0xBFC22154 */ - uint32_t psx_brA_BFC21B08 = cpu->gpr[0]; uint32_t psx_brB_BFC21B08 = cpu->gpr[0]; - psx_taken_BFC21B08 = (psx_brA_BFC21B08 == psx_brB_BFC21B08); - psx_delay_BFC21B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21B0C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039B0Cu); -#endif - if (psx_delay_BFC21B08) { - psx_delay_BFC21B08 = 0; - if (psx_taken_BFC21B08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A154u); - goto label_BFC22154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B10u); - } -label_BFC21B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC21B10: AE80000C sw $zero, 12($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B10u); return; } g_debug_last_store_pc = 0x80039B10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAE80000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21B14: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039B14u); -#endif - /* 0xBFC21B18: 8D080E90 lw $t0, 3728($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 3728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (3728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D080E90u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC21B1C: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC21B20: 1503000E bne $t0, $v1, 0xBFC21B5C */ - uint32_t psx_brA_BFC21B20 = cpu->gpr[8]; uint32_t psx_brB_BFC21B20 = cpu->gpr[3]; - psx_taken_BFC21B20 = (psx_brA_BFC21B20 != psx_brB_BFC21B20); - psx_delay_BFC21B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B24u); -#endif - if (psx_delay_BFC21B20) { - psx_delay_BFC21B20 = 0; - if (psx_taken_BFC21B20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B5Cu); - goto label_BFC21B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B28u); - } -label_BFC21B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21B28: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039B28u); -#endif - /* 0xBFC21B2C: 8D290EA4 lw $t1, 3748($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 3748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (3748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B2Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D290EA4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC21B34: 15230009 bne $t1, $v1, 0xBFC21B5C */ - uint32_t psx_brA_BFC21B34 = cpu->gpr[9]; uint32_t psx_brB_BFC21B34 = cpu->gpr[3]; - psx_taken_BFC21B34 = (psx_brA_BFC21B34 != psx_brB_BFC21B34); - psx_delay_BFC21B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B38u); -#endif - if (psx_delay_BFC21B34) { - psx_delay_BFC21B34 = 0; - if (psx_taken_BFC21B34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B5Cu); - goto label_BFC21B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B3Cu); - } -label_BFC21B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21B3C: 0C00E859 jal 0xB003A164 */ - cpu->gpr[31] = 0x80039B44u; /* jal link before delay slot */ - psx_delay_BFC21B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21B40: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039B40u); -#endif - if (psx_delay_BFC21B3C) { - psx_delay_BFC21B3C = 0; - cpu->gpr[31] = 0x80039B44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A164u); - cpu->pc = 0x8003A164u; return; - } -label_BFC21B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21B44: 0C00E859 jal 0xB003A164 */ - cpu->gpr[31] = 0x80039B4Cu; /* jal link before delay slot */ - psx_delay_BFC21B44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC21B48: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039B48u); -#endif - if (psx_delay_BFC21B44) { - psx_delay_BFC21B44 = 0; - cpu->gpr[31] = 0x80039B4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A164u); - cpu->pc = 0x8003A164u; return; - } -label_BFC21B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC21B4C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B50u); -#endif - /* 0xBFC21B50: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B50u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B54: 1000017F beq $zero, $zero, 0xBFC22154 */ - uint32_t psx_brA_BFC21B54 = cpu->gpr[0]; uint32_t psx_brB_BFC21B54 = cpu->gpr[0]; - psx_taken_BFC21B54 = (psx_brA_BFC21B54 == psx_brB_BFC21B54); - psx_delay_BFC21B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21B58: AC206BC0 sw $zero, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B58u); return; } g_debug_last_store_pc = 0x80039B58u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B58u); -#endif - if (psx_delay_BFC21B54) { - psx_delay_BFC21B54 = 0; - if (psx_taken_BFC21B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A154u); - goto label_BFC22154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B5Cu); - } -label_BFC21B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B5Cu); -#endif - /* 0xBFC21B5C: 8E820010 lw $v0, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } - PGXP_LOAD(0x8E820010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC21B64: 14620005 bne $v1, $v0, 0xBFC21B7C */ - uint32_t psx_brA_BFC21B64 = cpu->gpr[3]; uint32_t psx_brB_BFC21B64 = cpu->gpr[2]; - psx_taken_BFC21B64 = (psx_brA_BFC21B64 != psx_brB_BFC21B64); - psx_delay_BFC21B64 = 1; - /* 0xBFC21B68: 8FA600D0 lw $a2, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B68u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600D0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B68u); -#endif - if (psx_delay_BFC21B64) { - psx_delay_BFC21B64 = 0; - if (psx_taken_BFC21B64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B7Cu); - goto label_BFC21B7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B6Cu); - } -label_BFC21B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B6Cu); -#endif - /* 0xBFC21B6C: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B6Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B70: 10000179 beq $zero, $zero, 0xBFC22158 */ - uint32_t psx_brA_BFC21B70 = cpu->gpr[0]; uint32_t psx_brB_BFC21B70 = cpu->gpr[0]; - psx_taken_BFC21B70 = (psx_brA_BFC21B70 == psx_brB_BFC21B70); - psx_delay_BFC21B70 = 1; - /* 0xBFC21B74: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B74u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B74u); -#endif - if (psx_delay_BFC21B70) { - psx_delay_BFC21B70 = 0; - if (psx_taken_BFC21B70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A158u); - goto label_BFC22158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039B78u); - } -label_BFC21B78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B78u); -#endif - /* 0xBFC21B78: 8FA600D0 lw $a2, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B78u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA600D0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B78u); -#endif -label_BFC21B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21B7C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC21B80: AFB3004C sw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B80u); return; } g_debug_last_store_pc = 0x80039B80u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21B84: 256BFF60 addiu $t3, $t3, -160 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-160)); - PGXP_ALU(0x256BFF60u, cpu->gpr[11], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x80039B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC21B88: 00065080 sll $t2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00065080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80C00u); -#endif - /* 0xBFC21B8C: 014B9821 addu $s3, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[19] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039B90u); -#endif - /* 0xBFC21B90: 8E6C0000 lw $t4, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039B90u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80000u); } - PGXP_LOAD(0x8E6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80039B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21B94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC21B98: 0182082A slt $at, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0182082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21B9C: 14200164 bne $at, $zero, 0xBFC22130 */ - uint32_t psx_brA_BFC21B9C = cpu->gpr[1]; uint32_t psx_brB_BFC21B9C = cpu->gpr[0]; - psx_taken_BFC21B9C = (psx_brA_BFC21B9C != psx_brB_BFC21B9C); - psx_delay_BFC21B9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21BA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039BA0u); -#endif - if (psx_delay_BFC21B9C) { - psx_delay_BFC21B9C = 0; - if (psx_taken_BFC21B9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A130u); - goto label_BFC22130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039BA4u); - } -label_BFC21BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC21BA4: 14C00008 bne $a2, $zero, 0xBFC21BC8 */ - uint32_t psx_brA_BFC21BA4 = cpu->gpr[6]; uint32_t psx_brB_BFC21BA4 = cpu->gpr[0]; - psx_taken_BFC21BA4 = (psx_brA_BFC21BA4 != psx_brB_BFC21BA4); - psx_delay_BFC21BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC21BA8: AFB20044 sw $s2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BA8u); return; } g_debug_last_store_pc = 0x80039BA8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20044u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BA8u); -#endif - if (psx_delay_BFC21BA4) { - psx_delay_BFC21BA4 = 0; - if (psx_taken_BFC21BA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039BC8u); - goto label_BFC21BC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039BACu); - } -label_BFC21BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21BAC: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21BB0: 24A56A10 addiu $a1, $a1, 27152 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27152)); - PGXP_ALU(0x24A56A10u, cpu->gpr[5], _pgx1, 0x00006A10u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21BB4: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039BBCu; /* jal link before delay slot */ - psx_delay_BFC21BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21BB8: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BB8u); -#endif - if (psx_delay_BFC21BB4) { - psx_delay_BFC21BB4 = 0; - cpu->gpr[31] = 0x80039BBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC21BBC: 240D001E addiu $t5, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240D001Eu, cpu->gpr[13], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80039BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21BC0: 10000007 beq $zero, $zero, 0xBFC21BE0 */ - uint32_t psx_brA_BFC21BC0 = cpu->gpr[0]; uint32_t psx_brB_BFC21BC0 = cpu->gpr[0]; - psx_taken_BFC21BC0 = (psx_brA_BFC21BC0 == psx_brB_BFC21BC0); - psx_delay_BFC21BC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC21BC4: AFAD008C sw $t5, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BC4u); return; } g_debug_last_store_pc = 0x80039BC4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD008Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BC4u); -#endif - if (psx_delay_BFC21BC0) { - psx_delay_BFC21BC0 = 0; - if (psx_taken_BFC21BC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039BE0u); - goto label_BFC21BE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039BC8u); - } -label_BFC21BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21BC8: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21BCC: 24A56A18 addiu $a1, $a1, 27160 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27160)); - PGXP_ALU(0x24A56A18u, cpu->gpr[5], _pgx1, 0x00006A18u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21BD0: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039BD8u; /* jal link before delay slot */ - psx_delay_BFC21BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21BD4: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BD4u); -#endif - if (psx_delay_BFC21BD0) { - psx_delay_BFC21BD0 = 0; - cpu->gpr[31] = 0x80039BD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC21BD8: 240E003C addiu $t6, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x240E003Cu, cpu->gpr[14], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC21BDC: AFAE008C sw $t6, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BDCu); return; } g_debug_last_store_pc = 0x80039BDCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE008Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BDCu); -#endif -label_BFC21BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BE0u); -#endif - /* 0xBFC21BE0: 8E8F0004 lw $t7, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x100000u); } - PGXP_LOAD(0x8E8F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BE0u); -#endif - /* 0xBFC21BE4: 8FB900D0 lw $t9, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BE4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900D0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC21BE8: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC21BEC: AFB80088 sw $t8, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BECu); return; } g_debug_last_store_pc = 0x80039BECu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80088u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039BF0u); -#endif - /* 0xBFC21BF0: 8E8A0010 lw $t2, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039BF0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x100000u); } - PGXP_LOAD(0x8E8A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80039BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC21BF4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC21BF8: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC21BFC: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21C00: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC21C04: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21C08: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21C0C: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC21C10: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21C14: 00084180 sll $t0, $t0, 6 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 6u; - PGXP_ALU(0x00084180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21C18: 2529DBBC addiu $t1, $t1, -9284 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-9284)); - PGXP_ALU(0x2529DBBCu, cpu->gpr[9], _pgx1, 0xFFFFDBBCu); } -#ifdef PSX_COSIM - cosim_instr(0x80039C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC21C1C: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21C20: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC21C24: 01091021 addu $v0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x824u); -#endif - /* 0xBFC21C28: 004B2821 addu $a1, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[11]; - PGXP_ALU(0x004B2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC21C2C: AFA20068 sw $v0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C2Cu); return; } g_debug_last_store_pc = 0x80039C2Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20068u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21C30: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x80039C38u; /* jal link before delay slot */ - psx_delay_BFC21C30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21C34: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C34u); -#endif - if (psx_delay_BFC21C30) { - psx_delay_BFC21C30 = 0; - cpu->gpr[31] = 0x80039C38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC21C38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21C38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C38u); -#endif - /* 0xBFC21C38: 8FAC00D0 lw $t4, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C38u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C38u); -#endif - /* 0xBFC21C3C: 8FAE0088 lw $t6, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C3Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0088u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC21C40: 000C6900 sll $t5, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC21C44: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21C48: 000D6A40 sll $t5, $t5, 9 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 9u; - PGXP_ALU(0x000D6A40u, cpu->gpr[13], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC21C4C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC21C50: 000E7A40 sll $t7, $t6, 9 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 9u; - PGXP_ALU(0x000E7A40u, cpu->gpr[15], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC21C54: 01AFC021 addu $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] + cpu->gpr[15]; - PGXP_ALU(0x01AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC21C58: 2739FF68 addiu $t9, $t9, -152 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-152)); - PGXP_ALU(0x2739FF68u, cpu->gpr[25], _pgx1, 0xFFFFFF68u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC21C5C: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC21C60: AFA50064 sw $a1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C60u); return; } g_debug_last_store_pc = 0x80039C60u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50064u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21C64: 0C00EB87 jal 0xB003AE1C */ - cpu->gpr[31] = 0x80039C6Cu; /* jal link before delay slot */ - psx_delay_BFC21C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC21C68: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C68u); -#endif - if (psx_delay_BFC21C64) { - psx_delay_BFC21C64 = 0; - cpu->gpr[31] = 0x80039C6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE1Cu); - cpu->pc = 0x8003AE1Cu; return; - } -label_BFC21C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C6Cu); -#endif - /* 0xBFC21C6C: 8FA50064 lw $a1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50064u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC21C70: 10400045 beq $v0, $zero, 0xBFC21D88 */ - uint32_t psx_brA_BFC21C70 = cpu->gpr[2]; uint32_t psx_brB_BFC21C70 = cpu->gpr[0]; - psx_taken_BFC21C70 = (psx_brA_BFC21C70 == psx_brB_BFC21C70); - psx_delay_BFC21C70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21C74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039C74u); -#endif - if (psx_delay_BFC21C70) { - psx_delay_BFC21C70 = 0; - if (psx_taken_BFC21C70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D88u); - goto label_BFC21D88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039C78u); - } -label_BFC21C78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21C78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C78u); -#endif - /* 0xBFC21C78: 8E920010 lw $s2, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C78u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x100000u); } - PGXP_LOAD(0x8E920010u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C78u); -#endif - /* 0xBFC21C7C: 8E680000 lw $t0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C7Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x80000u); } - PGXP_LOAD(0x8E680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40102u); -#endif - /* 0xBFC21C84: 0248082A slt $at, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0248082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21C88: 1020002D beq $at, $zero, 0xBFC21D40 */ - uint32_t psx_brA_BFC21C88 = cpu->gpr[1]; uint32_t psx_brB_BFC21C88 = cpu->gpr[0]; - psx_taken_BFC21C88 = (psx_brA_BFC21C88 == psx_brB_BFC21C88); - psx_delay_BFC21C88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21C8C: 00125080 sll $t2, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00125080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C8Cu); -#endif - if (psx_delay_BFC21C88) { - psx_delay_BFC21C88 = 0; - if (psx_taken_BFC21C88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D40u); - goto label_BFC21D40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039C90u); - } -label_BFC21C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039C90u); -#endif - /* 0xBFC21C90: 8FA200D0 lw $v0, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039C90u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21C94: 00125080 sll $t2, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00125080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21C98: 00127880 sll $t7, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00127880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21C9C: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC21CA0: 00026880 sll $t5, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00026880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21CA4: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21CA8: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC21CAC: 01A26823 subu $t5, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[2]; - PGXP_ALU(0x01A26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21CB0: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21CB4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21CB8: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21CBC: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21CC0: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21CC4: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21CC8: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC21CCC: 01A26823 subu $t5, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[2]; - PGXP_ALU(0x01A26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21CD0: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21CD4: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21CD8: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21CDC: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21CE0: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC21CE4: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC21CE8: 25CEDBA0 addiu $t6, $t6, -9312 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-9312)); - PGXP_ALU(0x25CEDBA0u, cpu->gpr[14], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC21CEC: 01AFC021 addu $t8, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[13] + cpu->gpr[15]; - PGXP_ALU(0x01AFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC21CF0: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC21CF4: 256C001C addiu $t4, $t3, 28 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (28)); - PGXP_ALU(0x256C001Cu, cpu->gpr[12], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC21CF8: 27190078 addiu $t9, $t8, 120 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (120)); - PGXP_ALU(0x27190078u, cpu->gpr[25], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80039CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21CFC: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039CFCu); return; } g_debug_last_store_pc = 0x80039CFCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21D00: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D00u); return; } g_debug_last_store_pc = 0x80039D00u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024000u); -#endif - /* 0xBFC21D04: 032E8821 addu $s1, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15000u); -#endif - /* 0xBFC21D08: 018E8021 addu $s0, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[16] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D08u); -#endif -label_BFC21D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC21D0C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21D10: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039D18u; /* jal link before delay slot */ - psx_delay_BFC21D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC21D14: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D14u); -#endif - if (psx_delay_BFC21D10) { - psx_delay_BFC21D10 = 0; - cpu->gpr[31] = 0x80039D18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D18u); -#endif - /* 0xBFC21D18: 8E680000 lw $t0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x80000u); } - PGXP_LOAD(0x8E680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC21D1C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40102u); -#endif - /* 0xBFC21D20: 0248082A slt $at, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0248082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21D24: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21D28: 1420FFF8 bne $at, $zero, 0xBFC21D0C */ - uint32_t psx_brA_BFC21D28 = cpu->gpr[1]; uint32_t psx_brB_BFC21D28 = cpu->gpr[0]; - psx_taken_BFC21D28 = (psx_brA_BFC21D28 != psx_brB_BFC21D28); - psx_delay_BFC21D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21D2C: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039D2Cu); -#endif - if (psx_delay_BFC21D28) { - psx_delay_BFC21D28 = 0; - if (psx_taken_BFC21D28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D0Cu); - goto label_BFC21D0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D30u); - } -label_BFC21D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D30u); -#endif - /* 0xBFC21D30: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D30u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D30u); -#endif - /* 0xBFC21D34: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D34u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21D38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21D3C: 00125080 sll $t2, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00125080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D3Cu); -#endif -label_BFC21D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21D40: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21D44: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D44u); -#endif - /* 0xBFC21D48: 8FA90068 lw $t1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D48u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90068u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21D4C: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21D50: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21D54: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21D58: 24A56A20 addiu $a1, $a1, 27168 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27168)); - PGXP_ALU(0x24A56A20u, cpu->gpr[5], _pgx1, 0x00006A20u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21D5C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039D64u; /* jal link before delay slot */ - psx_delay_BFC21D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC21D60: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039D60u); -#endif - if (psx_delay_BFC21D5C) { - psx_delay_BFC21D5C = 0; - cpu->gpr[31] = 0x80039D64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D64u); -#endif - /* 0xBFC21D64: 8E6B0000 lw $t3, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D64u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x80000u); } - PGXP_LOAD(0x8E6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21D68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC21D6C: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000u); -#endif - /* 0xBFC21D70: AE6C0000 sw $t4, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D70u); return; } g_debug_last_store_pc = 0x80039D70u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D70u); -#endif - /* 0xBFC21D74: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D74u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D74u); -#endif - /* 0xBFC21D78: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D78u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D78u); -#endif - /* 0xBFC21D7C: 8FB20044 lw $s2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D7Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20044u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21D80: 100000F5 beq $zero, $zero, 0xBFC22158 */ - uint32_t psx_brA_BFC21D80 = cpu->gpr[0]; uint32_t psx_brB_BFC21D80 = cpu->gpr[0]; - psx_taken_BFC21D80 = (psx_brA_BFC21D80 == psx_brB_BFC21D80); - psx_delay_BFC21D80 = 1; - /* 0xBFC21D84: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039D84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D84u); -#endif - if (psx_delay_BFC21D80) { - psx_delay_BFC21D80 = 0; - if (psx_taken_BFC21D80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A158u); - goto label_BFC22158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D88u); - } -label_BFC21D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D88u); -#endif - /* 0xBFC21D88: 80A20002 lb $v0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 2, 0x20u); - PGXP_LOAD(0x80A20002u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21D8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC21D90: 28410011 slti $at, $v0, 17 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (17) ? 1 : 0); - PGXP_ALU(0x28410011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21D94: 14200003 bne $at, $zero, 0xBFC21DA4 */ - uint32_t psx_brA_BFC21D94 = cpu->gpr[1]; uint32_t psx_brB_BFC21D94 = cpu->gpr[0]; - psx_taken_BFC21D94 = (psx_brA_BFC21D94 != psx_brB_BFC21D94); - psx_delay_BFC21D94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC21D98: 28410014 slti $at, $v0, 20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0); - PGXP_ALU(0x28410014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0x80039D98u); -#endif - if (psx_delay_BFC21D94) { - psx_delay_BFC21D94 = 0; - if (psx_taken_BFC21D94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039DA4u); - goto label_BFC21DA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039D9Cu); - } -label_BFC21D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21D9C: 14200046 bne $at, $zero, 0xBFC21EB8 */ - uint32_t psx_brA_BFC21D9C = cpu->gpr[1]; uint32_t psx_brB_BFC21D9C = cpu->gpr[0]; - psx_taken_BFC21D9C = (psx_brA_BFC21D9C != psx_brB_BFC21D9C); - psx_delay_BFC21D9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DA0u); -#endif - /* 0xBFC21DA0: 8FA900D0 lw $t1, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039DA0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900D0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80039DA0u); -#endif - if (psx_delay_BFC21D9C) { - psx_delay_BFC21D9C = 0; - if (psx_taken_BFC21D9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039EB8u); - goto label_BFC21EB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039DA4u); - } -label_BFC21DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DA4u); -#endif - /* 0xBFC21DA4: 8E920010 lw $s2, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039DA4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x100000u); } - PGXP_LOAD(0x8E920010u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039DA4u); -#endif - /* 0xBFC21DA8: 8E6D0000 lw $t5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039DA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80000u); } - PGXP_LOAD(0x8E6D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80039DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42002u); -#endif - /* 0xBFC21DB0: 024D082A slt $at, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21DB4: 1020002D beq $at, $zero, 0xBFC21E6C */ - uint32_t psx_brA_BFC21DB4 = cpu->gpr[1]; uint32_t psx_brB_BFC21DB4 = cpu->gpr[0]; - psx_taken_BFC21DB4 = (psx_brA_BFC21DB4 == psx_brB_BFC21DB4); - psx_delay_BFC21DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21DB8: 0012C080 sll $t8, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 2u; - PGXP_ALU(0x0012C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DB8u); -#endif - if (psx_delay_BFC21DB4) { - psx_delay_BFC21DB4 = 0; - if (psx_taken_BFC21DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039E6Cu); - goto label_BFC21E6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039DBCu); - } -label_BFC21DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DBCu); -#endif - /* 0xBFC21DBC: 8FA200D0 lw $v0, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039DBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21DC0: 0012C080 sll $t8, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 2u; - PGXP_ALU(0x0012C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21DC4: 00125080 sll $t2, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00125080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC21DC8: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21DCC: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21DD0: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21DD4: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21DD8: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC21DDC: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21DE0: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21DE4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21DE8: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21DEC: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC21DF0: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21DF4: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC21DF8: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC21DFC: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21E00: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21E04: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21E08: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21E0C: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21E10: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC21E14: 2508DBA0 addiu $t0, $t0, -9312 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-9312)); - PGXP_ALU(0x2508DBA0u, cpu->gpr[8], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC21E18: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC21E1C: 01F8C821 addu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC21E20: 272E001C addiu $t6, $t9, 28 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[25] + (28)); - PGXP_ALU(0x272E001Cu, cpu->gpr[14], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC21E24: 256C0078 addiu $t4, $t3, 120 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (120)); - PGXP_ALU(0x256C0078u, cpu->gpr[12], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21E28: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E28u); return; } g_debug_last_store_pc = 0x80039E28u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21E2C: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E2Cu); return; } g_debug_last_store_pc = 0x80039E2Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21100u); -#endif - /* 0xBFC21E30: 01888821 addu $s1, $t4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[17] = cpu->gpr[12] + cpu->gpr[8]; - PGXP_ALU(0x01888821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14100u); -#endif - /* 0xBFC21E34: 01C88021 addu $s0, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[8]; - PGXP_ALU(0x01C88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E34u); -#endif -label_BFC21E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC21E38: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21E3C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039E44u; /* jal link before delay slot */ - psx_delay_BFC21E3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC21E40: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E40u); -#endif - if (psx_delay_BFC21E3C) { - psx_delay_BFC21E3C = 0; - cpu->gpr[31] = 0x80039E44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E44u); -#endif - /* 0xBFC21E44: 8E6D0000 lw $t5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E44u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80000u); } - PGXP_LOAD(0x8E6D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC21E48: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42002u); -#endif - /* 0xBFC21E4C: 024D082A slt $at, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21E50: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21E54: 1420FFF8 bne $at, $zero, 0xBFC21E38 */ - uint32_t psx_brA_BFC21E54 = cpu->gpr[1]; uint32_t psx_brB_BFC21E54 = cpu->gpr[0]; - psx_taken_BFC21E54 = (psx_brA_BFC21E54 != psx_brB_BFC21E54); - psx_delay_BFC21E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21E58: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039E58u); -#endif - if (psx_delay_BFC21E54) { - psx_delay_BFC21E54 = 0; - if (psx_taken_BFC21E54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039E38u); - goto label_BFC21E38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039E5Cu); - } -label_BFC21E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E5Cu); -#endif - /* 0xBFC21E5C: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E5Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E60u); -#endif - /* 0xBFC21E60: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E60u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21E64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21E68: 0012C080 sll $t8, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 2u; - PGXP_ALU(0x0012C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E68u); -#endif -label_BFC21E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21E6C: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21E70: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E70u); -#endif - /* 0xBFC21E74: 8FAF0068 lw $t7, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E74u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0068u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21E78: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21E7C: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21E80: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21E84: 24A56A24 addiu $a1, $a1, 27172 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27172)); - PGXP_ALU(0x24A56A24u, cpu->gpr[5], _pgx1, 0x00006A24u); } -#ifdef PSX_COSIM - cosim_instr(0x80039E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21E88: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039E90u; /* jal link before delay slot */ - psx_delay_BFC21E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC21E8C: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039E8Cu); -#endif - if (psx_delay_BFC21E88) { - psx_delay_BFC21E88 = 0; - cpu->gpr[31] = 0x80039E90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039E90u); -#endif - /* 0xBFC21E90: 8E790000 lw $t9, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E90u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80000u); } - PGXP_LOAD(0x8E790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21E94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC21E98: 272EFFFF addiu $t6, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x272EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC21E9C: AE6E0000 sw $t6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039E9Cu); return; } g_debug_last_store_pc = 0x80039E9Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EA0u); -#endif - /* 0xBFC21EA0: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EA0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EA0u); -#endif - /* 0xBFC21EA4: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EA4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EA4u); -#endif - /* 0xBFC21EA8: 8FB20044 lw $s2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EA8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20044u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21EAC: 100000AA beq $zero, $zero, 0xBFC22158 */ - uint32_t psx_brA_BFC21EAC = cpu->gpr[0]; uint32_t psx_brB_BFC21EAC = cpu->gpr[0]; - psx_taken_BFC21EAC = (psx_brA_BFC21EAC == psx_brB_BFC21EAC); - psx_delay_BFC21EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EB0u); -#endif - /* 0xBFC21EB0: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EB0u); -#endif - if (psx_delay_BFC21EAC) { - psx_delay_BFC21EAC = 0; - if (psx_taken_BFC21EAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A158u); - goto label_BFC22158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039EB4u); - } -label_BFC21EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EB4u); -#endif - /* 0xBFC21EB4: 8FA900D0 lw $t1, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EB4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900D0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EB4u); -#endif -label_BFC21EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EB8u); -#endif - /* 0xBFC21EB8: 8E820010 lw $v0, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } - PGXP_LOAD(0x8E820010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC21EBC: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC21EC0: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC21EC4: 00026080 sll $t4, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00026080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21EC8: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC21ECC: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC21ED0: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21ED4: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC21ED8: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC21EDC: 000A5180 sll $t2, $t2, 6 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 6u; - PGXP_ALU(0x000A5180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC21EE0: 256BDBA0 addiu $t3, $t3, -9312 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-9312)); - PGXP_ALU(0x256BDBA0u, cpu->gpr[11], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC21EE4: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC21EE8: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC40u); -#endif - /* 0xBFC21EEC: 014B3021 addu $a2, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[6] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1050u); -#endif - /* 0xBFC21EF0: 00CC2021 addu $a0, $a2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[12]; - PGXP_ALU(0x00CC2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039EF0u); -#endif - /* 0xBFC21EF4: 8C880014 lw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039EF4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21EF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC21EFC: A0A80003 sb $t0, 3($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80039EFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (3)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0A80003u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80039EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F00u); -#endif - /* 0xBFC21F00: 80A30003 lb $v1, 3($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 3; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (3)), 3, 0x20u); - PGXP_LOAD(0x80A30003u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21F04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC21F08: 18600003 blez $v1, 0xBFC21F18 */ - uint32_t psx_brA_BFC21F08 = cpu->gpr[3]; - psx_taken_BFC21F08 = ((int32_t)psx_brA_BFC21F08 <= 0); - psx_delay_BFC21F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC21F0C: 28610010 slti $at, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0); - PGXP_ALU(0x28610010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F0Cu); -#endif - if (psx_delay_BFC21F08) { - psx_delay_BFC21F08 = 0; - if (psx_taken_BFC21F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F18u); - goto label_BFC21F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F10u); - } -label_BFC21F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21F10: 14200035 bne $at, $zero, 0xBFC21FE8 */ - uint32_t psx_brA_BFC21F10 = cpu->gpr[1]; uint32_t psx_brB_BFC21F10 = cpu->gpr[0]; - psx_taken_BFC21F10 = (psx_brA_BFC21F10 != psx_brB_BFC21F10); - psx_delay_BFC21F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039F14u); -#endif - if (psx_delay_BFC21F10) { - psx_delay_BFC21F10 = 0; - if (psx_taken_BFC21F10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039FE8u); - goto label_BFC21FE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F18u); - } -label_BFC21F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F18u); -#endif - /* 0xBFC21F18: 8E6D0000 lw $t5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F18u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80000u); } - PGXP_LOAD(0x8E6D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC21F1C: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42002u); -#endif - /* 0xBFC21F20: 024D082A slt $at, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21F24: 1020001E beq $at, $zero, 0xBFC21FA0 */ - uint32_t psx_brA_BFC21F24 = cpu->gpr[1]; uint32_t psx_brB_BFC21F24 = cpu->gpr[0]; - psx_taken_BFC21F24 = (psx_brA_BFC21F24 == psx_brB_BFC21F24); - psx_delay_BFC21F24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC21F28: 00124880 sll $t1, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00124880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F28u); -#endif - if (psx_delay_BFC21F24) { - psx_delay_BFC21F24 = 0; - if (psx_taken_BFC21F24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039FA0u); - goto label_BFC21FA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F2Cu); - } -label_BFC21F2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21F2C: 00127880 sll $t7, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00127880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21F30: 0012C080 sll $t8, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 2u; - PGXP_ALU(0x0012C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21F34: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21F38: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21F3C: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21F40: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC21F44: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC21F48: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC21F4C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC21F50: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC21F54: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F54u); return; } g_debug_last_store_pc = 0x80039F54u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC21F58: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F58u); return; } g_debug_last_store_pc = 0x80039F58u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020040u); -#endif - /* 0xBFC21F5C: 00D88821 addu $s1, $a2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[6] + cpu->gpr[24]; - PGXP_ALU(0x00D88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18040u); -#endif - /* 0xBFC21F60: 00CF8021 addu $s0, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[6] + cpu->gpr[15]; - PGXP_ALU(0x00CF8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21F64: 2610001C addiu $s0, $s0, 28 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (28)); - PGXP_ALU(0x2610001Cu, cpu->gpr[16], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21F68: 26310078 addiu $s1, $s1, 120 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (120)); - PGXP_ALU(0x26310078u, cpu->gpr[17], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F68u); -#endif -label_BFC21F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC21F6C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21F70: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039F78u; /* jal link before delay slot */ - psx_delay_BFC21F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC21F74: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F74u); -#endif - if (psx_delay_BFC21F70) { - psx_delay_BFC21F70 = 0; - cpu->gpr[31] = 0x80039F78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F78u); -#endif - /* 0xBFC21F78: 8E790000 lw $t9, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F78u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80000u); } - PGXP_LOAD(0x8E790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC21F7C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040002u); -#endif - /* 0xBFC21F80: 0259082A slt $at, $s2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0259082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC21F84: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC21F88: 1420FFF8 bne $at, $zero, 0xBFC21F6C */ - uint32_t psx_brA_BFC21F88 = cpu->gpr[1]; uint32_t psx_brB_BFC21F88 = cpu->gpr[0]; - psx_taken_BFC21F88 = (psx_brA_BFC21F88 != psx_brB_BFC21F88); - psx_delay_BFC21F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC21F8C: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80039F8Cu); -#endif - if (psx_delay_BFC21F88) { - psx_delay_BFC21F88 = 0; - if (psx_taken_BFC21F88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F6Cu); - goto label_BFC21F6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039F90u); - } -label_BFC21F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039F90u); -#endif - /* 0xBFC21F90: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F90u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F90u); -#endif - /* 0xBFC21F94: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039F94u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80039F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21F98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC21F9C: 00124880 sll $t1, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00124880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039F9Cu); -#endif -label_BFC21FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC21FA0: 01324823 subu $t1, $t1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[18]; - PGXP_ALU(0x01324823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21FA4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80039FA4u); -#endif - /* 0xBFC21FA8: 8FAE0068 lw $t6, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FA8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0068u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC21FAC: 01324823 subu $t1, $t1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[18]; - PGXP_ALU(0x01324823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC21FB0: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21FB4: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC21FB8: 24A56A28 addiu $a1, $a1, 27176 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27176)); - PGXP_ALU(0x24A56A28u, cpu->gpr[5], _pgx1, 0x00006A28u); } -#ifdef PSX_COSIM - cosim_instr(0x80039FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC21FBC: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x80039FC4u; /* jal link before delay slot */ - psx_delay_BFC21FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4210u); -#endif - /* 0xBFC21FC0: 01C92021 addu $a0, $t6, $t1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[9]; - PGXP_ALU(0x01C92021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039FC0u); -#endif - if (psx_delay_BFC21FBC) { - psx_delay_BFC21FBC = 0; - cpu->gpr[31] = 0x80039FC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC21FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FC4u); -#endif - /* 0xBFC21FC4: 8E6A0000 lw $t2, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x80000u); } - PGXP_LOAD(0x8E6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21FC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80039FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC21FCC: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80039FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800u); -#endif - /* 0xBFC21FD0: AE6B0000 sw $t3, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FD0u); return; } g_debug_last_store_pc = 0x80039FD0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAE6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FD0u); -#endif - /* 0xBFC21FD4: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FD4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FD4u); -#endif - /* 0xBFC21FD8: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FD8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FD8u); -#endif - /* 0xBFC21FDC: 8FB20044 lw $s2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FDCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20044u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC21FE0: 1000005D beq $zero, $zero, 0xBFC22158 */ - uint32_t psx_brA_BFC21FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC21FE0 = cpu->gpr[0]; - psx_taken_BFC21FE0 = (psx_brA_BFC21FE0 == psx_brB_BFC21FE0); - psx_delay_BFC21FE0 = 1; - /* 0xBFC21FE4: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FE4u); -#endif - if (psx_delay_BFC21FE0) { - psx_delay_BFC21FE0 = 0; - if (psx_taken_BFC21FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A158u); - goto label_BFC22158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80039FE8u); - } -label_BFC21FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC21FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC21FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC21FE8: AC830014 sw $v1, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FE8u); return; } g_debug_last_store_pc = 0x80039FE8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC830014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FE8u); -#endif - /* 0xBFC21FEC: 8FAC00D0 lw $t4, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80039FECu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00D0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80039FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80039FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21FF0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80039FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC21FF4: 25ADA178 addiu $t5, $t5, -24200 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-24200)); - PGXP_ALU(0x25ADA178u, cpu->gpr[13], _pgx1, 0xFFFFA178u); } -#ifdef PSX_COSIM - cosim_instr(0x80039FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC21FF8: 000C4080 sll $t0, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C4080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80039FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2104u); -#endif - /* 0xBFC21FFC: 010D1021 addu $v0, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[13]; - PGXP_ALU(0x010D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80039FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A000u); -#endif - /* 0xBFC22000: 8C4F0000 lw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A000u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A000u); -#endif - /* 0xBFC22004: 80B90002 lb $t9, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 25, 0x20u); - PGXP_LOAD(0x80B90002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC22008: 01E3C021 addu $t8, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E3C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2200C: AC580000 sw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A00Cu); return; } g_debug_last_store_pc = 0x8003A00Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC22010: 272EFFF0 addiu $t6, $t9, -16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[25] + (-16)); - PGXP_ALU(0x272EFFF0u, cpu->gpr[14], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC22014: AFAE0084 sw $t6, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A014u); return; } g_debug_last_store_pc = 0x8003A014u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0084u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A014u); -#endif - /* 0xBFC22018: 8FA90084 lw $t1, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A018u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90084u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A018u); -#endif - /* 0xBFC2201C: 8E860008 lw $a2, 8($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A01Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x100000u); } - PGXP_LOAD(0x8E860008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC22020: 19200031 blez $t1, 0xBFC220E8 */ - uint32_t psx_brA_BFC22020 = cpu->gpr[9]; - psx_taken_BFC22020 = ((int32_t)psx_brA_BFC22020 <= 0); - psx_delay_BFC22020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC22024: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A024u); -#endif - if (psx_delay_BFC22020) { - psx_delay_BFC22020 = 0; - if (psx_taken_BFC22020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A0E8u); - goto label_BFC220E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A028u); - } -label_BFC22028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A028u); -#endif - /* 0xBFC22028: 8FAA00D0 lw $t2, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A028u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00D0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC2202C: 000660C0 sll $t4, $a2, 3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] << 3u; - PGXP_ALU(0x000660C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC22030: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC22034: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC22038: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2203C: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC22040: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC22044: 01866023 subu $t4, $t4, $a2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[6]; - PGXP_ALU(0x01866023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC22048: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2204C: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC22050: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC22054: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC22058: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A058u); return; } g_debug_last_store_pc = 0x8003A058u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2205C: 25ADE720 addiu $t5, $t5, -6368 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-6368)); - PGXP_ALU(0x25ADE720u, cpu->gpr[13], _pgx1, 0xFFFFE720u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1900u); -#endif - /* 0xBFC22060: 016C4021 addu $t0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC22064: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A064u); return; } g_debug_last_store_pc = 0x8003A064u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC22068: 24A20060 addiu $v0, $a1, 96 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[5] + (96)); - PGXP_ALU(0x24A20060u, cpu->gpr[2], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC2206C: AFA2006C sw $v0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A06Cu); return; } g_debug_last_store_pc = 0x8003A06Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2006Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC22070: 24B10080 addiu $s1, $a1, 128 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[5] + (128)); - PGXP_ALU(0x24B10080u, cpu->gpr[17], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12100u); -#endif - /* 0xBFC22074: 010D8021 addu $s0, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[16] = cpu->gpr[8] + cpu->gpr[13]; - PGXP_ALU(0x010D8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC22078: 3C138002 lui $s3, 0x8002 */ - cpu->gpr[19] = 0x80020000u; - PGXP_ALU(0x3C138002u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A078u); -#endif -label_BFC2207C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2207Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A07Cu); -#endif - /* 0xBFC2207C: 8FA2006C lw $v0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A07Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2006Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC22080: AFB10010 sw $s1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A080u); return; } g_debug_last_store_pc = 0x8003A080u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10010u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC22084: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22088: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2208C: 24060010 addiu $a2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24060010u, cpu->gpr[6], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22090: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22094: 0C011F31 jal 0xB0047CC4 */ - cpu->gpr[31] = 0x8003A09Cu; /* jal link before delay slot */ - psx_delay_BFC22094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC22098: AFA20014 sw $v0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A098u); return; } g_debug_last_store_pc = 0x8003A098u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A098u); -#endif - if (psx_delay_BFC22094) { - psx_delay_BFC22094 = 0; - cpu->gpr[31] = 0x8003A09Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047CC4u); - cpu->pc = 0x80047CC4u; return; - } -label_BFC2209C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2209Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2209C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC220A0: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC220A4: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003A0ACu; /* jal link before delay slot */ - psx_delay_BFC220A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC220A8: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0A8u); -#endif - if (psx_delay_BFC220A4) { - psx_delay_BFC220A4 = 0; - cpu->gpr[31] = 0x8003A0ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC220AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC220AC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC220B0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC220B4: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003A0BCu; /* jal link before delay slot */ - psx_delay_BFC220B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC220B8: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0B8u); -#endif - if (psx_delay_BFC220B4) { - psx_delay_BFC220B4 = 0; - cpu->gpr[31] = 0x8003A0BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC220BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC220BC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC220C0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003A0C8u; /* jal link before delay slot */ - psx_delay_BFC220C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC220C4: 24050203 addiu $a1, $zero, 515 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (515)); - PGXP_ALU(0x24050203u, cpu->gpr[5], _pgx1, 0x00000203u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0C4u); -#endif - if (psx_delay_BFC220C0) { - psx_delay_BFC220C0 = 0; - cpu->gpr[31] = 0x8003A0C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC220C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0C8u); -#endif - /* 0xBFC220C8: 8FAF0084 lw $t7, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0C8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0084u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC220CC: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC220D0: 26100070 addiu $s0, $s0, 112 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (112)); - PGXP_ALU(0x26100070u, cpu->gpr[16], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC220D4: 164FFFE9 bne $s2, $t7, 0xBFC2207C */ - uint32_t psx_brA_BFC220D4 = cpu->gpr[18]; uint32_t psx_brB_BFC220D4 = cpu->gpr[15]; - psx_taken_BFC220D4 = (psx_brA_BFC220D4 != psx_brB_BFC220D4); - psx_delay_BFC220D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC220D8: 26310080 addiu $s1, $s1, 128 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (128)); - PGXP_ALU(0x26310080u, cpu->gpr[17], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0D8u); -#endif - if (psx_delay_BFC220D4) { - psx_delay_BFC220D4 = 0; - if (psx_taken_BFC220D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A07Cu); - goto label_BFC2207C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A0DCu); - } -label_BFC220DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0DCu); -#endif - /* 0xBFC220DC: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0E0u); -#endif - /* 0xBFC220E0: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0E0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC220E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A0E4u); -#endif -label_BFC220E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0E8u); -#endif - /* 0xBFC220E8: 8FA400D0 lw $a0, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0E8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400D0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0E8u); -#endif - /* 0xBFC220EC: 8FA5008C lw $a1, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5008Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0F0u); -#endif - /* 0xBFC220F0: 8FA60088 lw $a2, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0F0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60088u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC220F4: 0C00EBA4 jal 0xB003AE90 */ - cpu->gpr[31] = 0x8003A0FCu; /* jal link before delay slot */ - psx_delay_BFC220F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC220F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A0F8u); -#endif - if (psx_delay_BFC220F4) { - psx_delay_BFC220F4 = 0; - cpu->gpr[31] = 0x8003A0FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE90u); - cpu->pc = 0x8003AE90u; return; - } -label_BFC220FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC220FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC220FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A0FCu); -#endif - /* 0xBFC220FC: 8FB90084 lw $t9, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A0FCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90084u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A100u); -#endif - /* 0xBFC22100: 8E980008 lw $t8, 8($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A100u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x100000u); } - PGXP_LOAD(0x8E980008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A100u); -#endif - /* 0xBFC22104: 8E890004 lw $t1, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A104u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100000u); } - PGXP_LOAD(0x8E890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A104u); -#endif - /* 0xBFC22108: 8E8B0010 lw $t3, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A108u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x100000u); } - PGXP_LOAD(0x8E8B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2210C: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC22110: 252A0001 addiu $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x252A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC22114: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC22118: AE8E0008 sw $t6, 8($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A118u); return; } g_debug_last_store_pc = 0x8003A118u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE8E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC2211C: AE8A0004 sw $t2, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A11Cu); return; } g_debug_last_store_pc = 0x8003A11Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAE8A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC22120: AE8C0010 sw $t4, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A120u); return; } g_debug_last_store_pc = 0x8003A120u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAE8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A120u); -#endif - /* 0xBFC22124: 8FB20044 lw $s2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A124u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20044u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22128: 10000008 beq $zero, $zero, 0xBFC2214C */ - uint32_t psx_brA_BFC22128 = cpu->gpr[0]; uint32_t psx_brB_BFC22128 = cpu->gpr[0]; - psx_taken_BFC22128 = (psx_brA_BFC22128 == psx_brB_BFC22128); - psx_delay_BFC22128 = 1; - /* 0xBFC2212C: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A12Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A12Cu); -#endif - if (psx_delay_BFC22128) { - psx_delay_BFC22128 = 0; - if (psx_taken_BFC22128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A14Cu); - goto label_BFC2214C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A130u); - } -label_BFC22130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A130u); -#endif - /* 0xBFC22130: 8E880008 lw $t0, 8($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A130u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100000u); } - PGXP_LOAD(0x8E880008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC22134: 00066880 sll $t5, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22138: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2213C: 002D0821 addu $at, $at, $t5 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[13]; - PGXP_ALU(0x002D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC22140: AC289E10 sw $t0, -25072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A140u); return; } g_debug_last_store_pc = 0x8003A140u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289E10u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC22144: AE830010 sw $v1, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A144u); return; } g_debug_last_store_pc = 0x8003A144u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE830010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A144u); -#endif - /* 0xBFC22148: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A148u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A148u); -#endif -label_BFC2214C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2214Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2214Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A14Cu); -#endif - /* 0xBFC2214C: 8FB40054 lw $s4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A14Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40054u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22150: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A150u); -#endif -label_BFC22154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A154u); -#endif - /* 0xBFC22154: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A154u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A154u); -#endif -label_BFC22158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22158: 27BD00D0 addiu $sp, $sp, 208 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (208)); - PGXP_ALU(0x27BD00D0u, cpu->gpr[29], _pgx1, 0x000000D0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2215C: 03E00008 jr $ra */ - psx_delay_BFC2215C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A160u); -#endif - if (psx_delay_BFC2215C) { - psx_delay_BFC2215C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC22164(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC22164u); - int psx_delay_BFC2218C = 0; - int psx_delay_BFC22198 = 0; - int psx_delay_BFC221A0 = 0; - int psx_taken_BFC221A0 = 0; - int psx_delay_BFC221B0 = 0; - int psx_delay_BFC221C0 = 0; - int psx_delay_BFC221C8 = 0; - int psx_taken_BFC221C8 = 0; - int psx_delay_BFC221D8 = 0; - int psx_delay_BFC221E8 = 0; - int psx_delay_BFC22214 = 0; - int psx_taken_BFC22214 = 0; - int psx_delay_BFC22234 = 0; - int psx_delay_BFC22240 = 0; - int psx_taken_BFC22240 = 0; - int psx_delay_BFC22250 = 0; - int psx_delay_BFC22260 = 0; - int psx_delay_BFC22270 = 0; - int psx_delay_BFC22278 = 0; - int psx_taken_BFC22278 = 0; - int psx_delay_BFC222A8 = 0; - int psx_delay_BFC222B4 = 0; - int psx_taken_BFC222B4 = 0; - int psx_delay_BFC222BC = 0; - int psx_taken_BFC222BC = 0; - int psx_delay_BFC222CC = 0; - int psx_delay_BFC222D8 = 0; - int psx_taken_BFC222D8 = 0; - int psx_delay_BFC222E8 = 0; - int psx_delay_BFC22300 = 0; - int psx_taken_BFC22300 = 0; - int psx_delay_BFC2230C = 0; - int psx_taken_BFC2230C = 0; - int psx_delay_BFC22328 = 0; - int psx_delay_BFC22334 = 0; - int psx_delay_BFC22344 = 0; - int psx_taken_BFC22344 = 0; - int psx_delay_BFC22368 = 0; - int psx_delay_BFC22384 = 0; - int psx_delay_BFC224B0 = 0; - int psx_taken_BFC224B0 = 0; - int psx_delay_BFC224C0 = 0; - int psx_taken_BFC224C0 = 0; - int psx_delay_BFC22528 = 0; - int psx_delay_BFC225A0 = 0; - int psx_delay_BFC226C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC22194u: goto label_BFC22194; - case 0xBFC221A0u: goto label_BFC221A0; - case 0xBFC221A8u: goto label_BFC221A8; - case 0xBFC221B8u: goto label_BFC221B8; - case 0xBFC221C8u: goto label_BFC221C8; - case 0xBFC221D0u: goto label_BFC221D0; - case 0xBFC221E0u: goto label_BFC221E0; - case 0xBFC221F0u: goto label_BFC221F0; - case 0xBFC221F4u: goto label_BFC221F4; - case 0xBFC2221Cu: goto label_BFC2221C; - case 0xBFC22234u: goto label_BFC22234; - case 0xBFC2223Cu: goto label_BFC2223C; - case 0xBFC22248u: goto label_BFC22248; - case 0xBFC22258u: goto label_BFC22258; - case 0xBFC22268u: goto label_BFC22268; - case 0xBFC22278u: goto label_BFC22278; - case 0xBFC22280u: goto label_BFC22280; - case 0xBFC222B0u: goto label_BFC222B0; - case 0xBFC222BCu: goto label_BFC222BC; - case 0xBFC222C4u: goto label_BFC222C4; - case 0xBFC222C8u: goto label_BFC222C8; - case 0xBFC222D4u: goto label_BFC222D4; - case 0xBFC222E0u: goto label_BFC222E0; - case 0xBFC222F0u: goto label_BFC222F0; - case 0xBFC222F4u: goto label_BFC222F4; - case 0xBFC22308u: goto label_BFC22308; - case 0xBFC2230Cu: goto label_BFC2230C; - case 0xBFC22314u: goto label_BFC22314; - case 0xBFC22328u: goto label_BFC22328; - case 0xBFC22330u: goto label_BFC22330; - case 0xBFC2233Cu: goto label_BFC2233C; - case 0xBFC2234Cu: goto label_BFC2234C; - case 0xBFC22350u: goto label_BFC22350; - case 0xBFC22370u: goto label_BFC22370; - case 0xBFC2238Cu: goto label_BFC2238C; - case 0xBFC22434u: goto label_BFC22434; - case 0xBFC224B8u: goto label_BFC224B8; - case 0xBFC224C8u: goto label_BFC224C8; - case 0xBFC22530u: goto label_BFC22530; - case 0xBFC225A8u: goto label_BFC225A8; - case 0xBFC226A8u: goto label_BFC226A8; - default: break; - } - } -label_BFC22164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22164: 27BDFB68 addiu $sp, $sp, -1176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-1176)); - PGXP_ALU(0x27BDFB68u, cpu->gpr[29], _pgx1, 0xFFFFFB68u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC22168: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A168u); return; } g_debug_last_store_pc = 0x8003A168u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2216C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A16Cu); return; } g_debug_last_store_pc = 0x8003A16Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC22170: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A170u); return; } g_debug_last_store_pc = 0x8003A170u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC22174: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A174u); return; } g_debug_last_store_pc = 0x8003A174u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC22178: 0080A821 addu $s5, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2217C: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A17Cu); return; } g_debug_last_store_pc = 0x8003A17Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC22180: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A180u); return; } g_debug_last_store_pc = 0x8003A180u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC22184: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A184u); return; } g_debug_last_store_pc = 0x8003A184u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22188: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2218C: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003A194u; /* jal link before delay slot */ - psx_delay_BFC2218C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22190: 24050201 addiu $a1, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24050201u, cpu->gpr[5], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A190u); -#endif - if (psx_delay_BFC2218C) { - psx_delay_BFC2218C = 0; - cpu->gpr[31] = 0x8003A194u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC22194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22194: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22198: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003A1A0u; /* jal link before delay slot */ - psx_delay_BFC22198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2219C: 24050201 addiu $a1, $zero, 513 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (513)); - PGXP_ALU(0x24050201u, cpu->gpr[5], _pgx1, 0x00000201u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A19Cu); -#endif - if (psx_delay_BFC22198) { - psx_delay_BFC22198 = 0; - cpu->gpr[31] = 0x8003A1A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC221A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC221A0: 16A0000B bne $s5, $zero, 0xBFC221D0 */ - uint32_t psx_brA_BFC221A0 = cpu->gpr[21]; uint32_t psx_brB_BFC221A0 = cpu->gpr[0]; - psx_taken_BFC221A0 = (psx_brA_BFC221A0 != psx_brB_BFC221A0); - psx_delay_BFC221A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC221A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A1A4u); -#endif - if (psx_delay_BFC221A0) { - psx_delay_BFC221A0 = 0; - if (psx_taken_BFC221A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A1D0u); - goto label_BFC221D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A1A8u); - } -label_BFC221A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221A8: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221AC: 24A56A2C addiu $a1, $a1, 27180 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27180)); - PGXP_ALU(0x24A56A2Cu, cpu->gpr[5], _pgx1, 0x00006A2Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC221B0: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003A1B8u; /* jal link before delay slot */ - psx_delay_BFC221B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC221B4: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1B4u); -#endif - if (psx_delay_BFC221B0) { - psx_delay_BFC221B0 = 0; - cpu->gpr[31] = 0x8003A1B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC221B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221B8: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221BC: 24A56A50 addiu $a1, $a1, 27216 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27216)); - PGXP_ALU(0x24A56A50u, cpu->gpr[5], _pgx1, 0x00006A50u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC221C0: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003A1C8u; /* jal link before delay slot */ - psx_delay_BFC221C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC221C4: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1C4u); -#endif - if (psx_delay_BFC221C0) { - psx_delay_BFC221C0 = 0; - cpu->gpr[31] = 0x8003A1C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC221C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC221C8: 1000000A beq $zero, $zero, 0xBFC221F4 */ - uint32_t psx_brA_BFC221C8 = cpu->gpr[0]; uint32_t psx_brB_BFC221C8 = cpu->gpr[0]; - psx_taken_BFC221C8 = (psx_brA_BFC221C8 == psx_brB_BFC221C8); - psx_delay_BFC221C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC221CC: 00157080 sll $t6, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00157080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1CCu); -#endif - if (psx_delay_BFC221C8) { - psx_delay_BFC221C8 = 0; - if (psx_taken_BFC221C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A1F4u); - goto label_BFC221F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A1D0u); - } -label_BFC221D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221D0: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221D4: 24A56A74 addiu $a1, $a1, 27252 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27252)); - PGXP_ALU(0x24A56A74u, cpu->gpr[5], _pgx1, 0x00006A74u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC221D8: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003A1E0u; /* jal link before delay slot */ - psx_delay_BFC221D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC221DC: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1DCu); -#endif - if (psx_delay_BFC221D8) { - psx_delay_BFC221D8 = 0; - cpu->gpr[31] = 0x8003A1E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC221E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221E0: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC221E4: 24A56A98 addiu $a1, $a1, 27288 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27288)); - PGXP_ALU(0x24A56A98u, cpu->gpr[5], _pgx1, 0x00006A98u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC221E8: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003A1F0u; /* jal link before delay slot */ - psx_delay_BFC221E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC221EC: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1ECu); -#endif - if (psx_delay_BFC221E8) { - psx_delay_BFC221E8 = 0; - cpu->gpr[31] = 0x8003A1F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC221F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC221F0: 00157080 sll $t6, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00157080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1F0u); -#endif -label_BFC221F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC221F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC221F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC221F4: 01D57021 addu $t6, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[21]; - PGXP_ALU(0x01D57021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC221F8: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC221FC: 25EF0E80 addiu $t7, $t7, 3712 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3712)); - PGXP_ALU(0x25EF0E80u, cpu->gpr[15], _pgx1, 0x00000E80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22200: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C000u); -#endif - /* 0xBFC22204: 01CFA021 addu $s4, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A204u); -#endif - /* 0xBFC22208: 8E980004 lw $t8, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A208u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x100000u); } - PGXP_LOAD(0x8E980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2220C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC22210: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC22214: 1B20003D blez $t9, 0xBFC2230C */ - uint32_t psx_brA_BFC22214 = cpu->gpr[25]; - psx_taken_BFC22214 = ((int32_t)psx_brA_BFC22214 <= 0); - psx_delay_BFC22214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC22218: 2A61000F slti $at, $s3, 15 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0); - PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A218u); -#endif - if (psx_delay_BFC22214) { - psx_delay_BFC22214 = 0; - if (psx_taken_BFC22214) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A30Cu); - goto label_BFC2230C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A21Cu); - } -label_BFC2221C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2221Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC2221C: 00157100 sll $t6, $s5, 4 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[21] << 4u; - PGXP_ALU(0x00157100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC22220: 01D57023 subu $t6, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[21]; - PGXP_ALU(0x01D57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22224: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22228: 25EFFF6C addiu $t7, $t7, -148 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-148)); - PGXP_ALU(0x25EFFF6Cu, cpu->gpr[15], _pgx1, 0xFFFFFF6Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2222C: 000E7240 sll $t6, $t6, 9 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 9u; - PGXP_ALU(0x000E7240u, cpu->gpr[14], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C000u); -#endif - /* 0xBFC22230: 01CF9021 addu $s2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[18] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A230u); -#endif -label_BFC22234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22234: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x8003A23Cu; /* jal link before delay slot */ - psx_delay_BFC22234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC22238: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A238u); -#endif - if (psx_delay_BFC22234) { - psx_delay_BFC22234 = 0; - cpu->gpr[31] = 0x8003A23Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC2223C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2223Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2223Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2223C: 28410020 slti $at, $v0, 32 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0); - PGXP_ALU(0x28410020u, cpu->gpr[1], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22240: 1020000F beq $at, $zero, 0xBFC22280 */ - uint32_t psx_brA_BFC22240 = cpu->gpr[1]; uint32_t psx_brB_BFC22240 = cpu->gpr[0]; - psx_taken_BFC22240 = (psx_brA_BFC22240 == psx_brB_BFC22240); - psx_delay_BFC22240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC22244: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A244u); -#endif - if (psx_delay_BFC22240) { - psx_delay_BFC22240 = 0; - if (psx_taken_BFC22240) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A280u); - goto label_BFC22280; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A248u); - } -label_BFC22248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22248: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC2224C: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22250: 0C016A98 jal 0xB005AA60 */ - cpu->gpr[31] = 0x8003A258u; /* jal link before delay slot */ - psx_delay_BFC22250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC22254: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A254u); -#endif - if (psx_delay_BFC22250) { - psx_delay_BFC22250 = 0; - cpu->gpr[31] = 0x8003A258u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA60u); - cpu->pc = 0x8005AA60u; return; - } -label_BFC22258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22258: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2225C: 24A56ABC addiu $a1, $a1, 27324 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27324)); - PGXP_ALU(0x24A56ABCu, cpu->gpr[5], _pgx1, 0x00006ABCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22260: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003A268u; /* jal link before delay slot */ - psx_delay_BFC22260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22264: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A264u); -#endif - if (psx_delay_BFC22260) { - psx_delay_BFC22260 = 0; - cpu->gpr[31] = 0x8003A268u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC22268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22268: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2226C: 24A56AC0 addiu $a1, $a1, 27328 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27328)); - PGXP_ALU(0x24A56AC0u, cpu->gpr[5], _pgx1, 0x00006AC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22270: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003A278u; /* jal link before delay slot */ - psx_delay_BFC22270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22274: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A274u); -#endif - if (psx_delay_BFC22270) { - psx_delay_BFC22270 = 0; - cpu->gpr[31] = 0x8003A278u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC22278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22278: 1000001E beq $zero, $zero, 0xBFC222F4 */ - uint32_t psx_brA_BFC22278 = cpu->gpr[0]; uint32_t psx_brB_BFC22278 = cpu->gpr[0]; - psx_taken_BFC22278 = (psx_brA_BFC22278 == psx_brB_BFC22278); - psx_delay_BFC22278 = 1; - /* 0xBFC2227C: 8E980004 lw $t8, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A27Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x100000u); } - PGXP_LOAD(0x8E980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A27Cu); -#endif - if (psx_delay_BFC22278) { - psx_delay_BFC22278 = 0; - if (psx_taken_BFC22278) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2F4u); - goto label_BFC222F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A280u); - } -label_BFC22280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC22280: 0015C100 sll $t8, $s5, 4 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 4u; - PGXP_ALU(0x0015C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC22284: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22288: 0018C240 sll $t8, $t8, 9 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 9u; - PGXP_ALU(0x0018C240u, cpu->gpr[24], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2228C: 0013CA40 sll $t9, $s3, 9 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 9u; - PGXP_ALU(0x0013CA40u, cpu->gpr[25], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22290: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22294: 25EFFF8C addiu $t7, $t7, -116 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-116)); - PGXP_ALU(0x25EFFF8Cu, cpu->gpr[15], _pgx1, 0xFFFFFF8Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC22298: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C000u); -#endif - /* 0xBFC2229C: 01CF8821 addu $s1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC222A0: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC222A4: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC222A8: 0C016A98 jal 0xB005AA60 */ - cpu->gpr[31] = 0x8003A2B0u; /* jal link before delay slot */ - psx_delay_BFC222A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC222AC: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2ACu); -#endif - if (psx_delay_BFC222A8) { - psx_delay_BFC222A8 = 0; - cpu->gpr[31] = 0x8003A2B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA60u); - cpu->pc = 0x8005AA60u; return; - } -label_BFC222B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC222B0: 2A010041 slti $at, $s0, 65 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (65) ? 1 : 0); - PGXP_ALU(0x2A010041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC222B4: 14200004 bne $at, $zero, 0xBFC222C8 */ - uint32_t psx_brA_BFC222B4 = cpu->gpr[1]; uint32_t psx_brB_BFC222B4 = cpu->gpr[0]; - psx_taken_BFC222B4 = (psx_brA_BFC222B4 != psx_brB_BFC222B4); - psx_delay_BFC222B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10040u); -#endif - /* 0xBFC222B8: 2606FFE0 addiu $a2, $s0, -32 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[16] + (-32)); - PGXP_ALU(0x2606FFE0u, cpu->gpr[6], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2B8u); -#endif - if (psx_delay_BFC222B4) { - psx_delay_BFC222B4 = 0; - if (psx_taken_BFC222B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2C8u); - goto label_BFC222C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2BCu); - } -label_BFC222BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC222BC: 10000002 beq $zero, $zero, 0xBFC222C8 */ - uint32_t psx_brA_BFC222BC = cpu->gpr[0]; uint32_t psx_brB_BFC222BC = cpu->gpr[0]; - psx_taken_BFC222BC = (psx_brA_BFC222BC == psx_brB_BFC222BC); - psx_delay_BFC222BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC222C0: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2C0u); -#endif - if (psx_delay_BFC222BC) { - psx_delay_BFC222BC = 0; - if (psx_taken_BFC222BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2C8u); - goto label_BFC222C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2C4u); - } -label_BFC222C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10040u); -#endif - /* 0xBFC222C4: 2606FFE0 addiu $a2, $s0, -32 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[16] + (-32)); - PGXP_ALU(0x2606FFE0u, cpu->gpr[6], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2C4u); -#endif -label_BFC222C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC222C8: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC222CC: 0C016A98 jal 0xB005AA60 */ - cpu->gpr[31] = 0x8003A2D4u; /* jal link before delay slot */ - psx_delay_BFC222CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC222D0: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2D0u); -#endif - if (psx_delay_BFC222CC) { - psx_delay_BFC222CC = 0; - cpu->gpr[31] = 0x8003A2D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA60u); - cpu->pc = 0x8005AA60u; return; - } -label_BFC222D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC222D4: 2A010040 slti $at, $s0, 64 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (64) ? 1 : 0); - PGXP_ALU(0x2A010040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC222D8: 10200005 beq $at, $zero, 0xBFC222F0 */ - uint32_t psx_brA_BFC222D8 = cpu->gpr[1]; uint32_t psx_brB_BFC222D8 = cpu->gpr[0]; - psx_taken_BFC222D8 = (psx_brA_BFC222D8 == psx_brB_BFC222D8); - psx_delay_BFC222D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC222DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A2DCu); -#endif - if (psx_delay_BFC222D8) { - psx_delay_BFC222D8 = 0; - if (psx_taken_BFC222D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2F0u); - goto label_BFC222F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A2E0u); - } -label_BFC222E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC222E0: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC222E4: 24A56AC4 addiu $a1, $a1, 27332 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27332)); - PGXP_ALU(0x24A56AC4u, cpu->gpr[5], _pgx1, 0x00006AC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC222E8: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003A2F0u; /* jal link before delay slot */ - psx_delay_BFC222E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC222EC: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2ECu); -#endif - if (psx_delay_BFC222E8) { - psx_delay_BFC222E8 = 0; - cpu->gpr[31] = 0x8003A2F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC222F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2F0u); -#endif - /* 0xBFC222F0: 8E980004 lw $t8, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A2F0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x100000u); } - PGXP_LOAD(0x8E980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2F0u); -#endif -label_BFC222F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC222F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC222F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC222F4: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC222F8: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080002u); -#endif - /* 0xBFC222FC: 0279082A slt $at, $s3, $t9 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0279082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22300: 1420FFCC bne $at, $zero, 0xBFC22234 */ - uint32_t psx_brA_BFC22300 = cpu->gpr[1]; uint32_t psx_brB_BFC22300 = cpu->gpr[0]; - psx_taken_BFC22300 = (psx_brA_BFC22300 != psx_brB_BFC22300); - psx_delay_BFC22300 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC22304: 26520200 addiu $s2, $s2, 512 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (512)); - PGXP_ALU(0x26520200u, cpu->gpr[18], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A304u); -#endif - if (psx_delay_BFC22300) { - psx_delay_BFC22300 = 0; - if (psx_taken_BFC22300) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A234u); - goto label_BFC22234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A308u); - } -label_BFC22308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC22308: 2A61000F slti $at, $s3, 15 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0); - PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A308u); -#endif -label_BFC2230C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2230Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2230C: 10200010 beq $at, $zero, 0xBFC22350 */ - uint32_t psx_brA_BFC2230C = cpu->gpr[1]; uint32_t psx_brB_BFC2230C = cpu->gpr[0]; - psx_taken_BFC2230C = (psx_brA_BFC2230C == psx_brB_BFC2230C); - psx_delay_BFC2230C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC22310: 00158240 sll $s0, $s5, 9 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[16] = cpu->gpr[21] << 9u; - PGXP_ALU(0x00158240u, cpu->gpr[16], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A310u); -#endif - if (psx_delay_BFC2230C) { - psx_delay_BFC2230C = 0; - if (psx_taken_BFC2230C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A350u); - goto label_BFC22350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A314u); - } -label_BFC22314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22314: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC22318: 3C118006 lui $s1, 0x8006 */ - cpu->gpr[17] = 0x80060000u; - PGXP_ALU(0x3C118006u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2231C: 26316ACC addiu $s1, $s1, 27340 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (27340)); - PGXP_ALU(0x26316ACCu, cpu->gpr[17], _pgx1, 0x00006ACCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22320: 26106AC8 addiu $s0, $s0, 27336 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (27336)); - PGXP_ALU(0x26106AC8u, cpu->gpr[16], _pgx1, 0x00006AC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22324: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A324u); -#endif -label_BFC22328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22328: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003A330u; /* jal link before delay slot */ - psx_delay_BFC22328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC2232C: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A32Cu); -#endif - if (psx_delay_BFC22328) { - psx_delay_BFC22328 = 0; - cpu->gpr[31] = 0x8003A330u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC22330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22330: 27A40090 addiu $a0, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A40090u, cpu->gpr[4], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22334: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003A33Cu; /* jal link before delay slot */ - psx_delay_BFC22334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC22338: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A338u); -#endif - if (psx_delay_BFC22334) { - psx_delay_BFC22334 = 0; - cpu->gpr[31] = 0x8003A33Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC2233C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2233Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2233Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2233C: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC22340: 2A61000F slti $at, $s3, 15 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (15) ? 1 : 0); - PGXP_ALU(0x2A61000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22344: 1420FFF8 bne $at, $zero, 0xBFC22328 */ - uint32_t psx_brA_BFC22344 = cpu->gpr[1]; uint32_t psx_brB_BFC22344 = cpu->gpr[0]; - psx_taken_BFC22344 = (psx_brA_BFC22344 != psx_brB_BFC22344); - psx_delay_BFC22344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22348: 27A40294 addiu $a0, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A40294u, cpu->gpr[4], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A348u); -#endif - if (psx_delay_BFC22344) { - psx_delay_BFC22344 = 0; - if (psx_taken_BFC22344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A328u); - goto label_BFC22328; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A34Cu); - } -label_BFC2234C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2234Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2234Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC2234C: 00158240 sll $s0, $s5, 9 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[16] = cpu->gpr[21] << 9u; - PGXP_ALU(0x00158240u, cpu->gpr[16], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A34Cu); -#endif -label_BFC22350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC22350: 02158021 addu $s0, $s0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[21]; - PGXP_ALU(0x02158021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22354: 3C018016 lui $at, 0x8016 */ - cpu->gpr[1] = 0x80160000u; - PGXP_ALU(0x3C018016u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22358: 34216000 ori $at, $at, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x6000u; - PGXP_ALU(0x34216000u, cpu->gpr[1], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2235C: 001081C0 sll $s0, $s0, 7 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 7u; - PGXP_ALU(0x001081C0u, cpu->gpr[16], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10012u); -#endif - /* 0xBFC22360: 02012021 addu $a0, $s0, $at */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[1]; - PGXP_ALU(0x02012021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC22364: 27A50294 addiu $a1, $sp, 660 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (660)); - PGXP_ALU(0x27A50294u, cpu->gpr[5], _pgx1, 0x00000294u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22368: 0C00ECB7 jal 0xB003B2DC */ - cpu->gpr[31] = 0x8003A370u; /* jal link before delay slot */ - psx_delay_BFC22368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2236C: 24060006 addiu $a2, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24060006u, cpu->gpr[6], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A36Cu); -#endif - if (psx_delay_BFC22368) { - psx_delay_BFC22368 = 0; - cpu->gpr[31] = 0x8003A370u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2DCu); - cpu->pc = 0x8003B2DCu; return; - } -label_BFC22370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22370: 3C018016 lui $at, 0x8016 */ - cpu->gpr[1] = 0x80160000u; - PGXP_ALU(0x3C018016u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22374: 3421E040 ori $at, $at, 0xE040 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xE040u; - PGXP_ALU(0x3421E040u, cpu->gpr[1], _pgx1, 0xE040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC22378: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10012u); -#endif - /* 0xBFC2237C: 02012021 addu $a0, $s0, $at */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[1]; - PGXP_ALU(0x02012021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC22380: 27A50090 addiu $a1, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27A50090u, cpu->gpr[5], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22384: 0C00ECB7 jal 0xB003B2DC */ - cpu->gpr[31] = 0x8003A38Cu; /* jal link before delay slot */ - psx_delay_BFC22384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22388: 24060007 addiu $a2, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24060007u, cpu->gpr[6], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A388u); -#endif - if (psx_delay_BFC22384) { - psx_delay_BFC22384 = 0; - cpu->gpr[31] = 0x8003A38Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2DCu); - cpu->pc = 0x8003B2DCu; return; - } -label_BFC2238C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2238Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2238Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC2238C: 00157080 sll $t6, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00157080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC22390: 01D57023 subu $t6, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[21]; - PGXP_ALU(0x01D57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22394: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC22398: 01D57023 subu $t6, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[21]; - PGXP_ALU(0x01D57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2239C: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC223A0: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A3A0u); -#endif - /* 0xBFC223A4: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A3A4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC223A8: 25EFDBA0 addiu $t7, $t7, -9312 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-9312)); - PGXP_ALU(0x25EFDBA0u, cpu->gpr[15], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC223AC: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC223B0: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC223B4: 00124240 sll $t0, $s2, 9 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[18] << 9u; - PGXP_ALU(0x00124240u, cpu->gpr[8], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC223B8: 01124021 addu $t0, $t0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[18]; - PGXP_ALU(0x01124021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC223BC: 3C018016 lui $at, 0x8016 */ - cpu->gpr[1] = 0x80160000u; - PGXP_ALU(0x3C018016u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC223C0: 0014C8C0 sll $t9, $s4, 3 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[20] << 3u; - PGXP_ALU(0x0014C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC223C4: 34216000 ori $at, $at, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x6000u; - PGXP_ALU(0x34216000u, cpu->gpr[1], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC223C8: 00084180 sll $t0, $t0, 6 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 6u; - PGXP_ALU(0x00084180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC223CC: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC223D0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC223D4: 0012C200 sll $t8, $s2, 8 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 8u; - PGXP_ALU(0x0012C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC223D8: 0334C823 subu $t9, $t9, $s4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[20]; - PGXP_ALU(0x0334C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC223DC: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002004u); -#endif - /* 0xBFC223E0: 03026825 or $t5, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[24] | cpu->gpr[2]; - PGXP_ALU(0x03026825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC223E4: 25CEA528 addiu $t6, $t6, -23256 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-23256)); - PGXP_ALU(0x25CEA528u, cpu->gpr[14], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC223E8: 01014021 addu $t0, $t0, $at */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[1]; - PGXP_ALU(0x01014021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC223EC: AC880018 sw $t0, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A3ECu); return; } g_debug_last_store_pc = 0x8003A3ECu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024000u); -#endif - /* 0xBFC223F0: 032E8821 addu $s1, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC223F4: AC8D0010 sw $t5, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A3F4u); return; } g_debug_last_store_pc = 0x8003A3F4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC8D0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3F4u); -#endif - /* 0xBFC223F8: 92290024 lbu $t1, 36($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 36; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (36)), 9, 0x20000u); - PGXP_LOAD(0x92290024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC223FC: 24A3005C addiu $v1, $a1, 92 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[5] + (92)); - PGXP_ALU(0x24A3005Cu, cpu->gpr[3], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC22400: AC890000 sw $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A400u); return; } g_debug_last_store_pc = 0x8003A400u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A400u); -#endif - /* 0xBFC22404: 922A0094 lbu $t2, 148($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 148; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (148)), 10, 0x20000u); - PGXP_LOAD(0x922A0094u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC22408: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2240C: AC8A0004 sw $t2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A40Cu); return; } g_debug_last_store_pc = 0x8003A40Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A410u); -#endif - /* 0xBFC22410: 922B0025 lbu $t3, 37($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 37; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (37)), 11, 0x20000u); - PGXP_LOAD(0x922B0025u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC22414: 241F0010 addiu $ra, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x241F0010u, cpu->gpr[31], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC22418: AC8B0008 sw $t3, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A418u); return; } g_debug_last_store_pc = 0x8003A418u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A418u); -#endif - /* 0xBFC2241C: 922C0095 lbu $t4, 149($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 149; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (149)), 12, 0x20000u); - PGXP_LOAD(0x922C0095u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC22420: 24100020 addiu $s0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24100020u, cpu->gpr[16], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC22424: AC8C000C sw $t4, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A424u); return; } g_debug_last_store_pc = 0x8003A424u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC8C000Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC22428: AFA50060 sw $a1, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A428u); return; } g_debug_last_store_pc = 0x8003A428u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50060u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A428u); -#endif - /* 0xBFC2242C: 8FB20060 lw $s2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A42Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20060u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22430: 24070030 addiu $a3, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24070030u, cpu->gpr[7], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A430u); -#endif -label_BFC22434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC22434: AC6D0010 sw $t5, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A434u); return; } g_debug_last_store_pc = 0x8003A434u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC22438: AC680018 sw $t0, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A438u); return; } g_debug_last_store_pc = 0x8003A438u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2243C: AC690000 sw $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A43Cu); return; } g_debug_last_store_pc = 0x8003A43Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC22440: AC6A0004 sw $t2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A440u); return; } g_debug_last_store_pc = 0x8003A440u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC22444: AC6D006C sw $t5, 108($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A444u); return; } g_debug_last_store_pc = 0x8003A444u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D006Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC22448: AC680074 sw $t0, 116($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A448u); return; } g_debug_last_store_pc = 0x8003A448u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680074u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2244C: AC69005C sw $t1, 92($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A44Cu); return; } g_debug_last_store_pc = 0x8003A44Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC69005Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC22450: AC6A0060 sw $t2, 96($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A450u); return; } g_debug_last_store_pc = 0x8003A450u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0060u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC22454: AC6D00C8 sw $t5, 200($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A454u); return; } g_debug_last_store_pc = 0x8003A454u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D00C8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC22458: AC6800D0 sw $t0, 208($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A458u); return; } g_debug_last_store_pc = 0x8003A458u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC6800D0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2245C: AC6900B8 sw $t1, 184($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 184; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A45Cu); return; } g_debug_last_store_pc = 0x8003A45Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC6900B8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC22460: AC6A00BC sw $t2, 188($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A460u); return; } g_debug_last_store_pc = 0x8003A460u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A00BCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000011u); -#endif - /* 0xBFC22464: 03E02021 addu $a0, $ra, $zero */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[31] + cpu->gpr[0]; - PGXP_ALU(0x03E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC22468: 00E03021 addu $a2, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8810u); -#endif - /* 0xBFC2246C: 01647821 addu $t7, $t3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[11] + cpu->gpr[4]; - PGXP_ALU(0x01647821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC22470: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A470u); return; } g_debug_last_store_pc = 0x8003A470u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001010u); -#endif - /* 0xBFC22474: 0184C021 addu $t8, $t4, $a0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[12] + cpu->gpr[4]; - PGXP_ALU(0x0184C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC22478: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2247C: AC78000C sw $t8, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A47Cu); return; } g_debug_last_store_pc = 0x8003A47Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC78000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001040u); -#endif - /* 0xBFC22480: 0186C021 addu $t8, $t4, $a2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[12] + cpu->gpr[6]; - PGXP_ALU(0x0186C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC22484: AC7800C4 sw $t8, 196($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A484u); return; } g_debug_last_store_pc = 0x8003A484u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC7800C4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000820u); -#endif - /* 0xBFC22488: 0165C821 addu $t9, $t3, $a1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[11] + cpu->gpr[5]; - PGXP_ALU(0x0165C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5020u); -#endif - /* 0xBFC2248C: 01857021 addu $t6, $t4, $a1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[5]; - PGXP_ALU(0x01857021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8840u); -#endif - /* 0xBFC22490: 01667821 addu $t7, $t3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[11] + cpu->gpr[6]; - PGXP_ALU(0x01667821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC22494: 24E70030 addiu $a3, $a3, 48 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (48)); - PGXP_ALU(0x24E70030u, cpu->gpr[7], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22498: 24010120 addiu $at, $zero, 288 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (288)); - PGXP_ALU(0x24010120u, cpu->gpr[1], _pgx1, 0x00000120u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2249C: AC6F00C0 sw $t7, 192($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A49Cu); return; } g_debug_last_store_pc = 0x8003A49Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F00C0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC224A0: AC6E0068 sw $t6, 104($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A4A0u); return; } g_debug_last_store_pc = 0x8003A4A0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0068u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC224A4: AC790064 sw $t9, 100($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A4A4u); return; } g_debug_last_store_pc = 0x8003A4A4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC224A8: 26100030 addiu $s0, $s0, 48 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (48)); - PGXP_ALU(0x26100030u, cpu->gpr[16], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC224AC: 27FF0030 addiu $ra, $ra, 48 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] + (48)); - PGXP_ALU(0x27FF0030u, cpu->gpr[31], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC224B0: 14E1FFE0 bne $a3, $at, 0xBFC22434 */ - uint32_t psx_brA_BFC224B0 = cpu->gpr[7]; uint32_t psx_brB_BFC224B0 = cpu->gpr[1]; - psx_taken_BFC224B0 = (psx_brA_BFC224B0 != psx_brB_BFC224B0); - psx_delay_BFC224B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC224B4: 24630114 addiu $v1, $v1, 276 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (276)); - PGXP_ALU(0x24630114u, cpu->gpr[3], _pgx1, 0x00000114u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4B4u); -#endif - if (psx_delay_BFC224B0) { - psx_delay_BFC224B0 = 0; - if (psx_taken_BFC224B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A434u); - goto label_BFC22434; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A4B8u); - } -label_BFC224B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC224B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC224B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC224B8: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC224BC: 2739DBA0 addiu $t9, $t9, -9312 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-9312)); - PGXP_ALU(0x2739DBA0u, cpu->gpr[25], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC224C0: 16590079 bne $s2, $t9, 0xBFC226A8 */ - uint32_t psx_brA_BFC224C0 = cpu->gpr[18]; uint32_t psx_brB_BFC224C0 = cpu->gpr[25]; - psx_taken_BFC224C0 = (psx_brA_BFC224C0 != psx_brB_BFC224C0); - psx_delay_BFC224C0 = 1; - /* 0xBFC224C4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A4C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4C4u); -#endif - if (psx_delay_BFC224C0) { - psx_delay_BFC224C0 = 0; - if (psx_taken_BFC224C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A6A8u); - goto label_BFC226A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A4C8u); - } -label_BFC224C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC224C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC224C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224C8: 00147080 sll $t6, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224CC: 01D47023 subu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[20]; - PGXP_ALU(0x01D47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC224D0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224D4: 01D47023 subu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[20]; - PGXP_ALU(0x01D47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC224D8: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC224DC: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4E0u); -#endif - /* 0xBFC224E0: 8E10FF58 lw $s0, -168($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A4E0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10FF58u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224E4: 01D47023 subu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[20]; - PGXP_ALU(0x01D47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC224E8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224EC: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC224F0: 26100002 addiu $s0, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (2)); - PGXP_ALU(0x26100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC224F4: 001078C0 sll $t7, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[16] << 3u; - PGXP_ALU(0x001078C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC224F8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC224FC: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC22500: 01F07823 subu $t7, $t7, $s0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[16]; - PGXP_ALU(0x01F07823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22504: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22508: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2250C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC22510: 2739A7D8 addiu $t9, $t9, -22568 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-22568)); - PGXP_ALU(0x2739A7D8u, cpu->gpr[25], _pgx1, 0xFFFFA7D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC22514: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22518: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2251C: AC30FF58 sw $s0, -168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A51Cu); return; } g_debug_last_store_pc = 0x8003A51Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC30FF58u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC22520: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC22524: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22528: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003A530u; /* jal link before delay slot */ - psx_delay_BFC22528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2252C: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A52Cu); -#endif - if (psx_delay_BFC22528) { - psx_delay_BFC22528 = 0; - cpu->gpr[31] = 0x8003A530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC22530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC22530: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A530u); -#endif - /* 0xBFC22534: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A534u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22538: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC2253C: 0014C080 sll $t8, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC22540: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22544: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC22548: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2254C: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC22550: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A550u); -#endif - /* 0xBFC22554: 8E10FF58 lw $s0, -168($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A554u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10FF58u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22558: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC2255C: 001470C0 sll $t6, $s4, 3 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[20] << 3u; - PGXP_ALU(0x001470C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22560: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC22564: 01D47023 subu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[20]; - PGXP_ALU(0x01D47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC22568: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2256C: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22570: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22574: 25EFA598 addiu $t7, $t7, -23144 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-23144)); - PGXP_ALU(0x25EFA598u, cpu->gpr[15], _pgx1, 0xFFFFA598u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC22578: 0010C8C0 sll $t9, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[16] << 3u; - PGXP_ALU(0x0010C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC2257C: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC22580: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC22584: 0330C823 subu $t9, $t9, $s0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[16]; - PGXP_ALU(0x0330C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC22588: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2258C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22590: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22594: 25EFA848 addiu $t7, $t7, -22456 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22456)); - PGXP_ALU(0x25EFA848u, cpu->gpr[15], _pgx1, 0xFFFFA848u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC22598: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2259C: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC225A0: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003A5A8u; /* jal link before delay slot */ - psx_delay_BFC225A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC225A4: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5A4u); -#endif - if (psx_delay_BFC225A0) { - psx_delay_BFC225A0 = 0; - cpu->gpr[31] = 0x8003A5A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC225A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC225A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC225A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC225A8: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A5A8u); -#endif - /* 0xBFC225AC: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A5ACu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC225B0: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225B4: 0014C080 sll $t8, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225B8: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC225BC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225C0: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC225C4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225C8: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5C8u); -#endif - /* 0xBFC225CC: 8E10FF58 lw $s0, -168($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A5CCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10FF58u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC225D0: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225D4: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC225D8: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC225DC: 0010C8C0 sll $t9, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[16] << 3u; - PGXP_ALU(0x0010C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC225E0: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC225E4: 0330C823 subu $t9, $t9, $s0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[16]; - PGXP_ALU(0x0330C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5E4u); -#endif - /* 0xBFC225E8: 8E430000 lw $v1, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A5E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } - PGXP_LOAD(0x8E430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC225EC: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC225F0: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC225F4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC225F8: 25EFA8B8 addiu $t7, $t7, -22344 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22344)); - PGXP_ALU(0x25EFA8B8u, cpu->gpr[15], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC225FC: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC22600: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC22604: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC22608: A044FF44 sb $a0, -188($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -188; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A608u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-188)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FF44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A608u); -#endif - /* 0xBFC2260C: 8E450008 lw $a1, 8($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A60Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } - PGXP_LOAD(0x8E450008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC22610: 246800FF addiu $t0, $v1, 255 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[3] + (255)); - PGXP_ALU(0x246800FFu, cpu->gpr[8], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC22614: 24A9000F addiu $t1, $a1, 15 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] + (15)); - PGXP_ALU(0x24A9000Fu, cpu->gpr[9], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC22618: 312900FF andi $t1, $t1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFu; - PGXP_ALU(0x312900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2261C: A049FF5D sb $t1, -163($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -163; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A61Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-163)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FF5Du, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC22620: 310800FF andi $t0, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC22624: A048FF5C sb $t0, -164($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -164; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A624u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-164)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA048FF5Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC22628: 30A700FF andi $a3, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2262C: A047FF4D sb $a3, -179($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -179; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A62Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-179)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA047FF4Du, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC22630: 30E600FF andi $a2, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[6] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30E600FFu, cpu->gpr[6], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC22634: A046FF45 sb $a2, -187($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -187; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A634u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-187)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA046FF45u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC22638: 310A00FF andi $t2, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2263C: A04AFF4C sb $t2, -180($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -180; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A63Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-180)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFF4Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC22640: 312C00FF andi $t4, $t1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[12] = cpu->gpr[9] & 0xFFu; - PGXP_ALU(0x312C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC22644: 308B00FF andi $t3, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC22648: A04BFF54 sb $t3, -172($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -172; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A648u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-172)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA04BFF54u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2264C: A04CFF55 sb $t4, -171($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -171; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A64Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-171)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA04CFF55u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A650u); -#endif - /* 0xBFC22650: 8E4D0004 lw $t5, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A650u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40000u); } - PGXP_LOAD(0x8E4D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002001u); -#endif - /* 0xBFC22658: 01A0F821 addu $ra, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[31] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A0F821u, cpu->gpr[31], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC2265C: A05FFFB4 sb $ra, -76($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -76; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A65Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-76)), (uint8_t)(cpu->gpr[31] & 0xFFu)); - PGXP_STORE(0xA05FFFB4u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A660u); -#endif - /* 0xBFC22660: 8E43000C lw $v1, 12($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A660u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } - PGXP_LOAD(0x8E43000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC22664: 25A500FF addiu $a1, $t5, 255 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[13] + (255)); - PGXP_ALU(0x25A500FFu, cpu->gpr[5], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC22668: 2467000F addiu $a3, $v1, 15 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (15)); - PGXP_ALU(0x2467000Fu, cpu->gpr[7], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2266C: 30E700FF andi $a3, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC22670: A047FFCD sb $a3, -51($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -51; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A670u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-51)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA047FFCDu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22674: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC22678: A045FFCC sb $a1, -52($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -52; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A678u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-52)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA045FFCCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2267C: 306400FF andi $a0, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC22680: A044FFBD sb $a0, -67($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -67; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A680u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-67)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FFBDu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC22684: 308600FF andi $a2, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308600FFu, cpu->gpr[6], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC22688: A046FFB5 sb $a2, -75($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -75; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A688u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-75)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA046FFB5u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC2268C: 30AA00FF andi $t2, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30AA00FFu, cpu->gpr[10], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC22690: A04AFFBC sb $t2, -68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A690u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-68)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFFBCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC22694: 30EC00FF andi $t4, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30EC00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC22698: 33EB00FF andi $t3, $ra, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[11] = cpu->gpr[31] & 0xFFu; - PGXP_ALU(0x33EB00FFu, cpu->gpr[11], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2269C: A04BFFC4 sb $t3, -60($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -60; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A69Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-60)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA04BFFC4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC226A0: A04CFFC5 sb $t4, -59($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -59; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A6A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-59)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA04CFFC5u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6A0u); -#endif - /* 0xBFC226A4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6A4u); -#endif -label_BFC226A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC226A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC226A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC226A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A6A8u); -#endif - /* 0xBFC226AC: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6ACu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6B0u); -#endif - /* 0xBFC226B0: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6B0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6B0u); -#endif - /* 0xBFC226B4: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6B4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6B4u); -#endif - /* 0xBFC226B8: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6B8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6B8u); -#endif - /* 0xBFC226BC: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6BCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6C0u); -#endif - /* 0xBFC226C0: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6C0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC226C4: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6C4u); return; } g_debug_last_store_pc = 0x8003A6C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC226C8: 03E00008 jr $ra */ - psx_delay_BFC226C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC226CC: 27BD0498 addiu $sp, $sp, 1176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (1176)); - PGXP_ALU(0x27BD0498u, cpu->gpr[29], _pgx1, 0x00000498u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6CCu); -#endif - if (psx_delay_BFC226C8) { - psx_delay_BFC226C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC226D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC226D0u); - int psx_delay_BFC226DC = 0; - int psx_taken_BFC226DC = 0; - int psx_delay_BFC226F0 = 0; - int psx_taken_BFC226F0 = 0; - int psx_delay_BFC226F8 = 0; - int psx_delay_BFC22714 = 0; - int psx_delay_BFC2271C = 0; - int psx_taken_BFC2271C = 0; - int psx_delay_BFC22724 = 0; - int psx_delay_BFC2272C = 0; - int psx_delay_BFC22738 = 0; - int psx_taken_BFC22738 = 0; - int psx_delay_BFC22740 = 0; - int psx_delay_BFC22748 = 0; - int psx_delay_BFC22750 = 0; - int psx_taken_BFC22750 = 0; - int psx_delay_BFC22758 = 0; - int psx_delay_BFC22760 = 0; - int psx_taken_BFC22760 = 0; - int psx_delay_BFC22768 = 0; - int psx_delay_BFC22770 = 0; - int psx_delay_BFC22778 = 0; - int psx_taken_BFC22778 = 0; - int psx_delay_BFC22780 = 0; - int psx_delay_BFC22788 = 0; - int psx_taken_BFC22788 = 0; - int psx_delay_BFC22790 = 0; - int psx_delay_BFC22798 = 0; - int psx_taken_BFC22798 = 0; - int psx_delay_BFC227A0 = 0; - int psx_taken_BFC227A0 = 0; - int psx_delay_BFC227A8 = 0; - int psx_delay_BFC227B0 = 0; - int psx_delay_BFC227B8 = 0; - int psx_delay_BFC227C4 = 0; - int psx_taken_BFC227C4 = 0; - int psx_delay_BFC227CC = 0; - int psx_delay_BFC227D4 = 0; - int psx_taken_BFC227D4 = 0; - int psx_delay_BFC227E0 = 0; - int psx_taken_BFC227E0 = 0; - int psx_delay_BFC227F4 = 0; - int psx_taken_BFC227F4 = 0; - int psx_delay_BFC227FC = 0; - int psx_delay_BFC22804 = 0; - int psx_taken_BFC22804 = 0; - int psx_delay_BFC22818 = 0; - int psx_taken_BFC22818 = 0; - int psx_delay_BFC22828 = 0; - int psx_taken_BFC22828 = 0; - int psx_delay_BFC22838 = 0; - int psx_taken_BFC22838 = 0; - int psx_delay_BFC22848 = 0; - int psx_taken_BFC22848 = 0; - int psx_delay_BFC22868 = 0; - int psx_delay_BFC22870 = 0; - int psx_taken_BFC22870 = 0; - int psx_delay_BFC22884 = 0; - int psx_delay_BFC2288C = 0; - int psx_taken_BFC2288C = 0; - int psx_delay_BFC22894 = 0; - int psx_delay_BFC2289C = 0; - int psx_taken_BFC2289C = 0; - int psx_delay_BFC228A8 = 0; - int psx_taken_BFC228A8 = 0; - int psx_delay_BFC228B0 = 0; - int psx_delay_BFC228B8 = 0; - int psx_delay_BFC228D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC226E4u: goto label_BFC226E4; - case 0xBFC226F8u: goto label_BFC226F8; - case 0xBFC22700u: goto label_BFC22700; - case 0xBFC2271Cu: goto label_BFC2271C; - case 0xBFC22724u: goto label_BFC22724; - case 0xBFC2272Cu: goto label_BFC2272C; - case 0xBFC22734u: goto label_BFC22734; - case 0xBFC22740u: goto label_BFC22740; - case 0xBFC22748u: goto label_BFC22748; - case 0xBFC22750u: goto label_BFC22750; - case 0xBFC22758u: goto label_BFC22758; - case 0xBFC22760u: goto label_BFC22760; - case 0xBFC22768u: goto label_BFC22768; - case 0xBFC22770u: goto label_BFC22770; - case 0xBFC22778u: goto label_BFC22778; - case 0xBFC22780u: goto label_BFC22780; - case 0xBFC22788u: goto label_BFC22788; - case 0xBFC22790u: goto label_BFC22790; - case 0xBFC22798u: goto label_BFC22798; - case 0xBFC227A0u: goto label_BFC227A0; - case 0xBFC227A8u: goto label_BFC227A8; - case 0xBFC227B0u: goto label_BFC227B0; - case 0xBFC227B8u: goto label_BFC227B8; - case 0xBFC227C0u: goto label_BFC227C0; - case 0xBFC227CCu: goto label_BFC227CC; - case 0xBFC227D4u: goto label_BFC227D4; - case 0xBFC227DCu: goto label_BFC227DC; - case 0xBFC227E0u: goto label_BFC227E0; - case 0xBFC227E8u: goto label_BFC227E8; - case 0xBFC227ECu: goto label_BFC227EC; - case 0xBFC227FCu: goto label_BFC227FC; - case 0xBFC22804u: goto label_BFC22804; - case 0xBFC2280Cu: goto label_BFC2280C; - case 0xBFC22810u: goto label_BFC22810; - case 0xBFC22820u: goto label_BFC22820; - case 0xBFC22830u: goto label_BFC22830; - case 0xBFC22840u: goto label_BFC22840; - case 0xBFC22850u: goto label_BFC22850; - case 0xBFC22870u: goto label_BFC22870; - case 0xBFC22878u: goto label_BFC22878; - case 0xBFC2288Cu: goto label_BFC2288C; - case 0xBFC22894u: goto label_BFC22894; - case 0xBFC2289Cu: goto label_BFC2289C; - case 0xBFC228A4u: goto label_BFC228A4; - case 0xBFC228B0u: goto label_BFC228B0; - case 0xBFC228B8u: goto label_BFC228B8; - case 0xBFC228C0u: goto label_BFC228C0; - case 0xBFC228C8u: goto label_BFC228C8; - case 0xBFC228CCu: goto label_BFC228CC; - default: break; - } - } -label_BFC226D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC226D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC226D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC226D0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A6D0u); -#endif - /* 0xBFC226D4: 8DCE9EC8 lw $t6, -24888($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6D4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EC8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC226D8: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC226DC: 15C0007A bne $t6, $zero, 0xBFC228C8 */ - uint32_t psx_brA_BFC226DC = cpu->gpr[14]; uint32_t psx_brB_BFC226DC = cpu->gpr[0]; - psx_taken_BFC226DC = (psx_brA_BFC226DC != psx_brB_BFC226DC); - psx_delay_BFC226DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC226E0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6E0u); return; } g_debug_last_store_pc = 0x8003A6E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6E0u); -#endif - if (psx_delay_BFC226DC) { - psx_delay_BFC226DC = 0; - if (psx_taken_BFC226DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8C8u); - goto label_BFC228C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A6E4u); - } -label_BFC226E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC226E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC226E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC226E4: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC226E8: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC226EC: 00817824 and $t7, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC226F0: 11E0003E beq $t7, $zero, 0xBFC227EC */ - uint32_t psx_brA_BFC226F0 = cpu->gpr[15]; uint32_t psx_brB_BFC226F0 = cpu->gpr[0]; - psx_taken_BFC226F0 = (psx_brA_BFC226F0 == psx_brB_BFC226F0); - psx_delay_BFC226F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC226F4: 3C015000 lui $at, 0x5000 */ - cpu->gpr[1] = 0x50000000u; - PGXP_ALU(0x3C015000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A6F4u); -#endif - if (psx_delay_BFC226F0) { - psx_delay_BFC226F0 = 0; - if (psx_taken_BFC226F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7ECu); - goto label_BFC227EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A6F8u); - } -label_BFC226F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC226F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC226F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC226F8: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003A700u; /* jal link before delay slot */ - psx_delay_BFC226F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC226FC: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A6FCu); return; } g_debug_last_store_pc = 0x8003A6FCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A6FCu); -#endif - if (psx_delay_BFC226F8) { - psx_delay_BFC226F8 = 0; - cpu->gpr[31] = 0x8003A700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC22700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22700: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22704: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003A704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22708: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2270C: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC22710: AC386BC0 sw $t8, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A710u); return; } g_debug_last_store_pc = 0x8003A710u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386BC0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22714: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003A71Cu; /* jal link before delay slot */ - psx_delay_BFC22714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22718: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A718u); -#endif - if (psx_delay_BFC22714) { - psx_delay_BFC22714 = 0; - cpu->gpr[31] = 0x8003A71Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC2271C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2271Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2271Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2271C: 04410022 bgez $v0, 0xBFC227A8 */ - uint32_t psx_brA_BFC2271C = cpu->gpr[2]; - psx_taken_BFC2271C = ((int32_t)psx_brA_BFC2271C >= 0); - psx_delay_BFC2271C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22720: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A720u); -#endif - if (psx_delay_BFC2271C) { - psx_delay_BFC2271C = 0; - if (psx_taken_BFC2271C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7A8u); - goto label_BFC227A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A724u); - } -label_BFC22724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22724: 0C011951 jal 0xB0046544 */ - cpu->gpr[31] = 0x8003A72Cu; /* jal link before delay slot */ - psx_delay_BFC22724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22728: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A728u); -#endif - if (psx_delay_BFC22724) { - psx_delay_BFC22724 = 0; - cpu->gpr[31] = 0x8003A72Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046544u); - cpu->pc = 0x80046544u; return; - } -label_BFC2272C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2272Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2272Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2272C: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003A734u; /* jal link before delay slot */ - psx_delay_BFC2272C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22730: 2404001E addiu $a0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2404001Eu, cpu->gpr[4], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A730u); -#endif - if (psx_delay_BFC2272C) { - psx_delay_BFC2272C = 0; - cpu->gpr[31] = 0x8003A734u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC22734: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22738: 10500007 beq $v0, $s0, 0xBFC22758 */ - uint32_t psx_brA_BFC22738 = cpu->gpr[2]; uint32_t psx_brB_BFC22738 = cpu->gpr[16]; - psx_taken_BFC22738 = (psx_brA_BFC22738 == psx_brB_BFC22738); - psx_delay_BFC22738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2273C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A73Cu); -#endif - if (psx_delay_BFC22738) { - psx_delay_BFC22738 = 0; - if (psx_taken_BFC22738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A758u); - goto label_BFC22758; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A740u); - } -label_BFC22740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22740: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003A748u; /* jal link before delay slot */ - psx_delay_BFC22740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22744: 2404001E addiu $a0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2404001Eu, cpu->gpr[4], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A744u); -#endif - if (psx_delay_BFC22740) { - psx_delay_BFC22740 = 0; - cpu->gpr[31] = 0x8003A748u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22748: 0C00F970 jal 0xB003E5C0 */ - cpu->gpr[31] = 0x8003A750u; /* jal link before delay slot */ - psx_delay_BFC22748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2274C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A74Cu); -#endif - if (psx_delay_BFC22748) { - psx_delay_BFC22748 = 0; - cpu->gpr[31] = 0x8003A750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E5C0u); - cpu->pc = 0x8003E5C0u; return; - } -label_BFC22750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22750: 10000023 beq $zero, $zero, 0xBFC227E0 */ - uint32_t psx_brA_BFC22750 = cpu->gpr[0]; uint32_t psx_brB_BFC22750 = cpu->gpr[0]; - psx_taken_BFC22750 = (psx_brA_BFC22750 == psx_brB_BFC22750); - psx_delay_BFC22750 = 1; - /* 0xBFC22754: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A754u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A754u); -#endif - if (psx_delay_BFC22750) { - psx_delay_BFC22750 = 0; - if (psx_taken_BFC22750) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7E0u); - goto label_BFC227E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A758u); - } -label_BFC22758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22758: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003A760u; /* jal link before delay slot */ - psx_delay_BFC22758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2275C: 2404003C addiu $a0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2404003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A75Cu); -#endif - if (psx_delay_BFC22758) { - psx_delay_BFC22758 = 0; - cpu->gpr[31] = 0x8003A760u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22760: 10500007 beq $v0, $s0, 0xBFC22780 */ - uint32_t psx_brA_BFC22760 = cpu->gpr[2]; uint32_t psx_brB_BFC22760 = cpu->gpr[16]; - psx_taken_BFC22760 = (psx_brA_BFC22760 == psx_brB_BFC22760); - psx_delay_BFC22760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22764: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A764u); -#endif - if (psx_delay_BFC22760) { - psx_delay_BFC22760 = 0; - if (psx_taken_BFC22760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A780u); - goto label_BFC22780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A768u); - } -label_BFC22768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22768: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003A770u; /* jal link before delay slot */ - psx_delay_BFC22768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2276C: 2404003C addiu $a0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2404003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A76Cu); -#endif - if (psx_delay_BFC22768) { - psx_delay_BFC22768 = 0; - cpu->gpr[31] = 0x8003A770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22770: 0C00F984 jal 0xB003E610 */ - cpu->gpr[31] = 0x8003A778u; /* jal link before delay slot */ - psx_delay_BFC22770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A774u); -#endif - if (psx_delay_BFC22770) { - psx_delay_BFC22770 = 0; - cpu->gpr[31] = 0x8003A778u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E610u); - cpu->pc = 0x8003E610u; return; - } -label_BFC22778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22778: 10000019 beq $zero, $zero, 0xBFC227E0 */ - uint32_t psx_brA_BFC22778 = cpu->gpr[0]; uint32_t psx_brB_BFC22778 = cpu->gpr[0]; - psx_taken_BFC22778 = (psx_brA_BFC22778 == psx_brB_BFC22778); - psx_delay_BFC22778 = 1; - /* 0xBFC2277C: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A77Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A77Cu); -#endif - if (psx_delay_BFC22778) { - psx_delay_BFC22778 = 0; - if (psx_taken_BFC22778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7E0u); - goto label_BFC227E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A780u); - } -label_BFC22780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22780: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003A788u; /* jal link before delay slot */ - psx_delay_BFC22780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A784u); -#endif - if (psx_delay_BFC22780) { - psx_delay_BFC22780 = 0; - cpu->gpr[31] = 0x8003A788u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22788: 10500014 beq $v0, $s0, 0xBFC227DC */ - uint32_t psx_brA_BFC22788 = cpu->gpr[2]; uint32_t psx_brB_BFC22788 = cpu->gpr[16]; - psx_taken_BFC22788 = (psx_brA_BFC22788 == psx_brB_BFC22788); - psx_delay_BFC22788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2278C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A78Cu); -#endif - if (psx_delay_BFC22788) { - psx_delay_BFC22788 = 0; - if (psx_taken_BFC22788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7DCu); - goto label_BFC227DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A790u); - } -label_BFC22790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22790: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003A798u; /* jal link before delay slot */ - psx_delay_BFC22790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A794u); -#endif - if (psx_delay_BFC22790) { - psx_delay_BFC22790 = 0; - cpu->gpr[31] = 0x8003A798u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22798: 1450FFFD bne $v0, $s0, 0xBFC22790 */ - uint32_t psx_brA_BFC22798 = cpu->gpr[2]; uint32_t psx_brB_BFC22798 = cpu->gpr[16]; - psx_taken_BFC22798 = (psx_brA_BFC22798 != psx_brB_BFC22798); - psx_delay_BFC22798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2279C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A79Cu); -#endif - if (psx_delay_BFC22798) { - psx_delay_BFC22798 = 0; - if (psx_taken_BFC22798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A790u); - goto label_BFC22790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7A0u); - } -label_BFC227A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227A0: 1000000F beq $zero, $zero, 0xBFC227E0 */ - uint32_t psx_brA_BFC227A0 = cpu->gpr[0]; uint32_t psx_brB_BFC227A0 = cpu->gpr[0]; - psx_taken_BFC227A0 = (psx_brA_BFC227A0 == psx_brB_BFC227A0); - psx_delay_BFC227A0 = 1; - /* 0xBFC227A4: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A7A4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7A4u); -#endif - if (psx_delay_BFC227A0) { - psx_delay_BFC227A0 = 0; - if (psx_taken_BFC227A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7E0u); - goto label_BFC227E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7A8u); - } -label_BFC227A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC227A8: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003A7B0u; /* jal link before delay slot */ - psx_delay_BFC227A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC227AC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7ACu); -#endif - if (psx_delay_BFC227A8) { - psx_delay_BFC227A8 = 0; - cpu->gpr[31] = 0x8003A7B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC227B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC227B0: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x8003A7B8u; /* jal link before delay slot */ - psx_delay_BFC227B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A7B4u); -#endif - if (psx_delay_BFC227B0) { - psx_delay_BFC227B0 = 0; - cpu->gpr[31] = 0x8003A7B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC227B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC227B8: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003A7C0u; /* jal link before delay slot */ - psx_delay_BFC227B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A7BCu); -#endif - if (psx_delay_BFC227B8) { - psx_delay_BFC227B8 = 0; - cpu->gpr[31] = 0x8003A7C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC227C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC227C0: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC227C4: 10500005 beq $v0, $s0, 0xBFC227DC */ - uint32_t psx_brA_BFC227C4 = cpu->gpr[2]; uint32_t psx_brB_BFC227C4 = cpu->gpr[16]; - psx_taken_BFC227C4 = (psx_brA_BFC227C4 == psx_brB_BFC227C4); - psx_delay_BFC227C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A7C8u); -#endif - if (psx_delay_BFC227C4) { - psx_delay_BFC227C4 = 0; - if (psx_taken_BFC227C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7DCu); - goto label_BFC227DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7CCu); - } -label_BFC227CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC227CC: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003A7D4u; /* jal link before delay slot */ - psx_delay_BFC227CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A7D0u); -#endif - if (psx_delay_BFC227CC) { - psx_delay_BFC227CC = 0; - cpu->gpr[31] = 0x8003A7D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC227D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC227D4: 1450FFFD bne $v0, $s0, 0xBFC227CC */ - uint32_t psx_brA_BFC227D4 = cpu->gpr[2]; uint32_t psx_brB_BFC227D4 = cpu->gpr[16]; - psx_taken_BFC227D4 = (psx_brA_BFC227D4 != psx_brB_BFC227D4); - psx_delay_BFC227D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A7D8u); -#endif - if (psx_delay_BFC227D4) { - psx_delay_BFC227D4 = 0; - if (psx_taken_BFC227D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7CCu); - goto label_BFC227CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7DCu); - } -label_BFC227DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7DCu); -#endif - /* 0xBFC227DC: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A7DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7DCu); -#endif -label_BFC227E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC227E0: 1000003A beq $zero, $zero, 0xBFC228CC */ - uint32_t psx_brA_BFC227E0 = cpu->gpr[0]; uint32_t psx_brB_BFC227E0 = cpu->gpr[0]; - psx_taken_BFC227E0 = (psx_brA_BFC227E0 == psx_brB_BFC227E0); - psx_delay_BFC227E0 = 1; - /* 0xBFC227E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A7E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7E4u); -#endif - if (psx_delay_BFC227E0) { - psx_delay_BFC227E0 = 0; - if (psx_taken_BFC227E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8CCu); - goto label_BFC228CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7E8u); - } -label_BFC227E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC227E8: 3C015000 lui $at, 0x5000 */ - cpu->gpr[1] = 0x50000000u; - PGXP_ALU(0x3C015000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A7E8u); -#endif -label_BFC227EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC227EC: 34215000 ori $at, $at, 0x5000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x5000u; - PGXP_ALU(0x34215000u, cpu->gpr[1], _pgx1, 0x5000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC227F0: 0081C824 and $t9, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC227F4: 13200006 beq $t9, $zero, 0xBFC22810 */ - uint32_t psx_brA_BFC227F4 = cpu->gpr[25]; uint32_t psx_brB_BFC227F4 = cpu->gpr[0]; - psx_taken_BFC227F4 = (psx_brA_BFC227F4 == psx_brB_BFC227F4); - psx_delay_BFC227F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC227F8: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A7F8u); -#endif - if (psx_delay_BFC227F4) { - psx_delay_BFC227F4 = 0; - if (psx_taken_BFC227F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A810u); - goto label_BFC22810; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A7FCu); - } -label_BFC227FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC227FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC227FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC227FC: 0C011A33 jal 0xB00468CC */ - cpu->gpr[31] = 0x8003A804u; /* jal link before delay slot */ - psx_delay_BFC227FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A800u); -#endif - if (psx_delay_BFC227FC) { - psx_delay_BFC227FC = 0; - cpu->gpr[31] = 0x8003A804u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468CCu); - cpu->pc = 0x800468CCu; return; - } -label_BFC22804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22804: 10000031 beq $zero, $zero, 0xBFC228CC */ - uint32_t psx_brA_BFC22804 = cpu->gpr[0]; uint32_t psx_brB_BFC22804 = cpu->gpr[0]; - psx_taken_BFC22804 = (psx_brA_BFC22804 == psx_brB_BFC22804); - psx_delay_BFC22804 = 1; - /* 0xBFC22808: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A808u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A808u); -#endif - if (psx_delay_BFC22804) { - psx_delay_BFC22804 = 0; - if (psx_taken_BFC22804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8CCu); - goto label_BFC228CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A80Cu); - } -label_BFC2280C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2280Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2280C: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A80Cu); -#endif -label_BFC22810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22810: 34210008 ori $at, $at, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x8u; - PGXP_ALU(0x34210008u, cpu->gpr[1], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x112u); -#endif - /* 0xBFC22814: 00814024 and $t0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00814024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC22818: 1100002B beq $t0, $zero, 0xBFC228C8 */ - uint32_t psx_brA_BFC22818 = cpu->gpr[8]; uint32_t psx_brB_BFC22818 = cpu->gpr[0]; - psx_taken_BFC22818 = (psx_brA_BFC22818 == psx_brB_BFC22818); - psx_delay_BFC22818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2281C: 3C010002 lui $at, 0x2 */ - cpu->gpr[1] = 0x00020000u; - PGXP_ALU(0x3C010002u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A81Cu); -#endif - if (psx_delay_BFC22818) { - psx_delay_BFC22818 = 0; - if (psx_taken_BFC22818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8C8u); - goto label_BFC228C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A820u); - } -label_BFC22820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22820: 34210002 ori $at, $at, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2u; - PGXP_ALU(0x34210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x212u); -#endif - /* 0xBFC22824: 00814824 and $t1, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00814824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC22828: 11200027 beq $t1, $zero, 0xBFC228C8 */ - uint32_t psx_brA_BFC22828 = cpu->gpr[9]; uint32_t psx_brB_BFC22828 = cpu->gpr[0]; - psx_taken_BFC22828 = (psx_brA_BFC22828 == psx_brB_BFC22828); - psx_delay_BFC22828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2282C: 3C010004 lui $at, 0x4 */ - cpu->gpr[1] = 0x00040000u; - PGXP_ALU(0x3C010004u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A82Cu); -#endif - if (psx_delay_BFC22828) { - psx_delay_BFC22828 = 0; - if (psx_taken_BFC22828) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8C8u); - goto label_BFC228C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A830u); - } -label_BFC22830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22830: 34210004 ori $at, $at, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4u; - PGXP_ALU(0x34210004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x412u); -#endif - /* 0xBFC22834: 00815024 and $t2, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC22838: 11400023 beq $t2, $zero, 0xBFC228C8 */ - uint32_t psx_brA_BFC22838 = cpu->gpr[10]; uint32_t psx_brB_BFC22838 = cpu->gpr[0]; - psx_taken_BFC22838 = (psx_brA_BFC22838 == psx_brB_BFC22838); - psx_delay_BFC22838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2283C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A83Cu); -#endif - if (psx_delay_BFC22838) { - psx_delay_BFC22838 = 0; - if (psx_taken_BFC22838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8C8u); - goto label_BFC228C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A840u); - } -label_BFC22840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22840: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x812u); -#endif - /* 0xBFC22844: 00815824 and $t3, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC22848: 11600020 beq $t3, $zero, 0xBFC228CC */ - uint32_t psx_brA_BFC22848 = cpu->gpr[11]; uint32_t psx_brB_BFC22848 = cpu->gpr[0]; - psx_taken_BFC22848 = (psx_brA_BFC22848 == psx_brB_BFC22848); - psx_delay_BFC22848 = 1; - /* 0xBFC2284C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A84Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A84Cu); -#endif - if (psx_delay_BFC22848) { - psx_delay_BFC22848 = 0; - if (psx_taken_BFC22848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8CCu); - goto label_BFC228CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A850u); - } -label_BFC22850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC22850: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A850u); return; } g_debug_last_store_pc = 0x8003A850u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22854: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22858: 2610A138 addiu $s0, $s0, -24264 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-24264)); - PGXP_ALU(0x2610A138u, cpu->gpr[16], _pgx1, 0xFFFFA138u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2285C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22860: 24A56AD0 addiu $a1, $a1, 27344 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27344)); - PGXP_ALU(0x24A56AD0u, cpu->gpr[5], _pgx1, 0x00006AD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22864: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22868: 0C016A9C jal 0xB005AA70 */ - cpu->gpr[31] = 0x8003A870u; /* jal link before delay slot */ - psx_delay_BFC22868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2286C: 24060005 addiu $a2, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24060005u, cpu->gpr[6], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A86Cu); -#endif - if (psx_delay_BFC22868) { - psx_delay_BFC22868 = 0; - cpu->gpr[31] = 0x8003A870u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA70u); - cpu->pc = 0x8005AA70u; return; - } -label_BFC22870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22870: 10400008 beq $v0, $zero, 0xBFC22894 */ - uint32_t psx_brA_BFC22870 = cpu->gpr[2]; uint32_t psx_brB_BFC22870 = cpu->gpr[0]; - psx_taken_BFC22870 = (psx_brA_BFC22870 == psx_brB_BFC22870); - psx_delay_BFC22870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22874: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A874u); -#endif - if (psx_delay_BFC22870) { - psx_delay_BFC22870 = 0; - if (psx_taken_BFC22870) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A894u); - goto label_BFC22894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A878u); - } -label_BFC22878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22878: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2287C: 24A56AD8 addiu $a1, $a1, 27352 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27352)); - PGXP_ALU(0x24A56AD8u, cpu->gpr[5], _pgx1, 0x00006AD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22880: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22884: 0C016A9C jal 0xB005AA70 */ - cpu->gpr[31] = 0x8003A88Cu; /* jal link before delay slot */ - psx_delay_BFC22884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22888: 24060005 addiu $a2, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24060005u, cpu->gpr[6], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A888u); -#endif - if (psx_delay_BFC22884) { - psx_delay_BFC22884 = 0; - cpu->gpr[31] = 0x8003A88Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA70u); - cpu->pc = 0x8005AA70u; return; - } -label_BFC2288C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2288Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2288Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2288C: 1440000C bne $v0, $zero, 0xBFC228C0 */ - uint32_t psx_brA_BFC2288C = cpu->gpr[2]; uint32_t psx_brB_BFC2288C = cpu->gpr[0]; - psx_taken_BFC2288C = (psx_brA_BFC2288C != psx_brB_BFC2288C); - psx_delay_BFC2288C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22890: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A890u); -#endif - if (psx_delay_BFC2288C) { - psx_delay_BFC2288C = 0; - if (psx_taken_BFC2288C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8C0u); - goto label_BFC228C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A894u); - } -label_BFC22894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22894: 0C016AA0 jal 0xB005AA80 */ - cpu->gpr[31] = 0x8003A89Cu; /* jal link before delay slot */ - psx_delay_BFC22894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22898: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A898u); -#endif - if (psx_delay_BFC22894) { - psx_delay_BFC22894 = 0; - cpu->gpr[31] = 0x8003A89Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA80u); - cpu->pc = 0x8005AA80u; return; - } -label_BFC2289C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2289Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2289C: 14400004 bne $v0, $zero, 0xBFC228B0 */ - uint32_t psx_brA_BFC2289C = cpu->gpr[2]; uint32_t psx_brB_BFC2289C = cpu->gpr[0]; - psx_taken_BFC2289C = (psx_brA_BFC2289C != psx_brB_BFC2289C); - psx_delay_BFC2289C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC228A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A8A0u); -#endif - if (psx_delay_BFC2289C) { - psx_delay_BFC2289C = 0; - if (psx_taken_BFC2289C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8B0u); - goto label_BFC228B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8A4u); - } -label_BFC228A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8A4u); -#endif - /* 0xBFC228A4: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8A4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC228A8: 10000008 beq $zero, $zero, 0xBFC228CC */ - uint32_t psx_brA_BFC228A8 = cpu->gpr[0]; uint32_t psx_brB_BFC228A8 = cpu->gpr[0]; - psx_taken_BFC228A8 = (psx_brA_BFC228A8 == psx_brB_BFC228A8); - psx_delay_BFC228A8 = 1; - /* 0xBFC228AC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8ACu); -#endif - if (psx_delay_BFC228A8) { - psx_delay_BFC228A8 = 0; - if (psx_taken_BFC228A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8CCu); - goto label_BFC228CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8B0u); - } -label_BFC228B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC228B0: 0C00F4C7 jal 0xB003D31C */ - cpu->gpr[31] = 0x8003A8B8u; /* jal link before delay slot */ - psx_delay_BFC228B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC228B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A8B4u); -#endif - if (psx_delay_BFC228B0) { - psx_delay_BFC228B0 = 0; - cpu->gpr[31] = 0x8003A8B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D31Cu); - cpu->pc = 0x8003D31Cu; return; - } -label_BFC228B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC228B8: 0C00C696 jal 0xB0031A58 */ - cpu->gpr[31] = 0x8003A8C0u; /* jal link before delay slot */ - psx_delay_BFC228B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC228BC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8BCu); -#endif - if (psx_delay_BFC228B8) { - psx_delay_BFC228B8 = 0; - cpu->gpr[31] = 0x8003A8C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031A58u); - cpu->pc = 0x80031A58u; return; - } -label_BFC228C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8C0u); -#endif - /* 0xBFC228C0: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8C0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC228C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A8C4u); -#endif -label_BFC228C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8C8u); -#endif - /* 0xBFC228C8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8C8u); -#endif -label_BFC228CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC228CC: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC228D0: 03E00008 jr $ra */ - psx_delay_BFC228D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC228D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A8D4u); -#endif - if (psx_delay_BFC228D0) { - psx_delay_BFC228D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC228D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC228D8u); - int psx_delay_BFC228E8 = 0; - int psx_taken_BFC228E8 = 0; - int psx_delay_BFC22964 = 0; - int psx_delay_BFC22974 = 0; - int psx_delay_BFC229C8 = 0; - int psx_taken_BFC229C8 = 0; - int psx_delay_BFC229D0 = 0; - int psx_delay_BFC229D8 = 0; - int psx_delay_BFC229F0 = 0; - int psx_delay_BFC22A10 = 0; - int psx_delay_BFC22A30 = 0; - int psx_delay_BFC22A50 = 0; - int psx_delay_BFC22A64 = 0; - int psx_delay_BFC22A74 = 0; - int psx_delay_BFC22A84 = 0; - int psx_delay_BFC22A94 = 0; - int psx_delay_BFC22A9C = 0; - int psx_delay_BFC22AAC = 0; - int psx_taken_BFC22AAC = 0; - int psx_delay_BFC22ABC = 0; - int psx_taken_BFC22ABC = 0; - int psx_delay_BFC22B14 = 0; - int psx_delay_BFC22B20 = 0; - int psx_taken_BFC22B20 = 0; - int psx_delay_BFC22B28 = 0; - int psx_delay_BFC22B34 = 0; - int psx_delay_BFC22B48 = 0; - int psx_taken_BFC22B48 = 0; - int psx_delay_BFC22B54 = 0; - int psx_delay_BFC22B5C = 0; - int psx_taken_BFC22B5C = 0; - int psx_delay_BFC22B68 = 0; - int psx_delay_BFC22B78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC228F0u: goto label_BFC228F0; - case 0xBFC2296Cu: goto label_BFC2296C; - case 0xBFC2297Cu: goto label_BFC2297C; - case 0xBFC229A4u: goto label_BFC229A4; - case 0xBFC229D0u: goto label_BFC229D0; - case 0xBFC229D8u: goto label_BFC229D8; - case 0xBFC229E0u: goto label_BFC229E0; - case 0xBFC229F8u: goto label_BFC229F8; - case 0xBFC22A18u: goto label_BFC22A18; - case 0xBFC22A38u: goto label_BFC22A38; - case 0xBFC22A58u: goto label_BFC22A58; - case 0xBFC22A6Cu: goto label_BFC22A6C; - case 0xBFC22A7Cu: goto label_BFC22A7C; - case 0xBFC22A8Cu: goto label_BFC22A8C; - case 0xBFC22A9Cu: goto label_BFC22A9C; - case 0xBFC22AA4u: goto label_BFC22AA4; - case 0xBFC22AACu: goto label_BFC22AAC; - case 0xBFC22AB4u: goto label_BFC22AB4; - case 0xBFC22AC4u: goto label_BFC22AC4; - case 0xBFC22ACCu: goto label_BFC22ACC; - case 0xBFC22B1Cu: goto label_BFC22B1C; - case 0xBFC22B28u: goto label_BFC22B28; - case 0xBFC22B30u: goto label_BFC22B30; - case 0xBFC22B3Cu: goto label_BFC22B3C; - case 0xBFC22B40u: goto label_BFC22B40; - case 0xBFC22B50u: goto label_BFC22B50; - case 0xBFC22B5Cu: goto label_BFC22B5C; - case 0xBFC22B64u: goto label_BFC22B64; - case 0xBFC22B70u: goto label_BFC22B70; - case 0xBFC22B74u: goto label_BFC22B74; - default: break; - } - } -label_BFC228D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC228D8: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC228DC: 00804021 addu $t0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC228E0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC228E4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8E4u); return; } g_debug_last_store_pc = 0x8003A8E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC228E8: 15000070 bne $t0, $zero, 0xBFC22AAC */ - uint32_t psx_brA_BFC228E8 = cpu->gpr[8]; uint32_t psx_brB_BFC228E8 = cpu->gpr[0]; - psx_taken_BFC228E8 = (psx_brA_BFC228E8 != psx_brB_BFC228E8); - psx_delay_BFC228E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC228EC: AC209E24 sw $zero, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8ECu); return; } g_debug_last_store_pc = 0x8003A8ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8ECu); -#endif - if (psx_delay_BFC228E8) { - psx_delay_BFC228E8 = 0; - if (psx_taken_BFC228E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AAACu); - goto label_BFC22AAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A8F0u); - } -label_BFC228F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC228F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC228F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC228F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC228F4: AC20A180 sw $zero, -24192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A8F4u); return; } g_debug_last_store_pc = 0x8003A8F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC228F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC228FC: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC22900: AC2E9EC8 sw $t6, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A900u); return; } g_debug_last_store_pc = 0x8003A900u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9EC8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22904: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC22908: 240FFFFF addiu $t7, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2290C: AC2F9ED0 sw $t7, -24880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A90Cu); return; } g_debug_last_store_pc = 0x8003A90Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9ED0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22910: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC22914: 2418FFFF addiu $t8, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC22918: AC389ECC sw $t8, -24884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A918u); return; } g_debug_last_store_pc = 0x8003A918u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389ECCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2291C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC22920: 2419FFFF addiu $t9, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003A920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC22924: AC399ED4 sw $t9, -24876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A924u); return; } g_debug_last_store_pc = 0x8003A924u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399ED4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22928: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2292C: AC20A134 sw $zero, -24268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A92Cu); return; } g_debug_last_store_pc = 0x8003A92Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A134u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22930: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22934: AC20FF58 sw $zero, -168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A934u); return; } g_debug_last_store_pc = 0x8003A934u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22938: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2293C: A020A8A8 sb $zero, -22360($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22360; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003A93Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22360)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020A8A8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22940: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22944: AC203B68 sw $zero, 15208($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A944u); return; } g_debug_last_store_pc = 0x8003A944u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203B68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22948: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2294C: AC20A12C sw $zero, -24276($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A94Cu); return; } g_debug_last_store_pc = 0x8003A94Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A12Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22950: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22954: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22958: AC20A130 sw $zero, -24272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A958u); return; } g_debug_last_store_pc = 0x8003A958u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A130u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2295C: 2484DBA0 addiu $a0, $a0, -9312 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-9312)); - PGXP_ALU(0x2484DBA0u, cpu->gpr[4], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22960: 24050B80 addiu $a1, $zero, 2944 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2944)); - PGXP_ALU(0x24050B80u, cpu->gpr[5], _pgx1, 0x00000B80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22964: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003A96Cu; /* jal link before delay slot */ - psx_delay_BFC22964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC22968: AFA80038 sw $t0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A968u); return; } g_debug_last_store_pc = 0x8003A968u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80038u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A968u); -#endif - if (psx_delay_BFC22964) { - psx_delay_BFC22964 = 0; - cpu->gpr[31] = 0x8003A96Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2296C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2296Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2296C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22970: 2484A138 addiu $a0, $a0, -24264 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24264)); - PGXP_ALU(0x2484A138u, cpu->gpr[4], _pgx1, 0xFFFFA138u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22974: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003A97Cu; /* jal link before delay slot */ - psx_delay_BFC22974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22978: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A978u); -#endif - if (psx_delay_BFC22974) { - psx_delay_BFC22974 = 0; - cpu->gpr[31] = 0x8003A97Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2297C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2297Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2297C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22980: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22984: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC22988: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2298C: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC22990: 24C6A1D0 addiu $a2, $a2, -24112 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-24112)); - PGXP_ALU(0x24C6A1D0u, cpu->gpr[6], _pgx1, 0xFFFFA1D0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC22994: 2463A1C8 addiu $v1, $v1, -24120 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24120)); - PGXP_ALU(0x2463A1C8u, cpu->gpr[3], _pgx1, 0xFFFFA1C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22998: 24A5A178 addiu $a1, $a1, -24200 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24200)); - PGXP_ALU(0x24A5A178u, cpu->gpr[5], _pgx1, 0xFFFFA178u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2299C: 24420E80 addiu $v0, $v0, 3712 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (3712)); - PGXP_ALU(0x24420E80u, cpu->gpr[2], _pgx1, 0x00000E80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC229A0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9A0u); -#endif -label_BFC229A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC229A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC229A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC229A4: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9A4u); return; } g_debug_last_store_pc = 0x8003A9A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC229A8: AC440004 sw $a0, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9A8u); return; } g_debug_last_store_pc = 0x8003A9A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC229AC: AC400008 sw $zero, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9ACu); return; } g_debug_last_store_pc = 0x8003A9ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC229B0: AC40000C sw $zero, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9B0u); return; } g_debug_last_store_pc = 0x8003A9B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC229B4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC229B8: AC440010 sw $a0, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9B8u); return; } g_debug_last_store_pc = 0x8003A9B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC440010u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC229BC: ACA00000 sw $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9BCu); return; } g_debug_last_store_pc = 0x8003A9BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACA00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC229C0: AC60FFFC sw $zero, -4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003A9C0u); return; } g_debug_last_store_pc = 0x8003A9C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC229C4: 24420014 addiu $v0, $v0, 20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20)); - PGXP_ALU(0x24420014u, cpu->gpr[2], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC229C8: 1466FFF6 bne $v1, $a2, 0xBFC229A4 */ - uint32_t psx_brA_BFC229C8 = cpu->gpr[3]; uint32_t psx_brB_BFC229C8 = cpu->gpr[6]; - psx_taken_BFC229C8 = (psx_brA_BFC229C8 != psx_brB_BFC229C8); - psx_delay_BFC229C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC229CC: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9CCu); -#endif - if (psx_delay_BFC229C8) { - psx_delay_BFC229C8 = 0; - if (psx_taken_BFC229C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A9A4u); - goto label_BFC229A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003A9D0u); - } -label_BFC229D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC229D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC229D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC229D0: 0C00E4FD jal 0xB00393F4 */ - cpu->gpr[31] = 0x8003A9D8u; /* jal link before delay slot */ - psx_delay_BFC229D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC229D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A9D4u); -#endif - if (psx_delay_BFC229D0) { - psx_delay_BFC229D0 = 0; - cpu->gpr[31] = 0x8003A9D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800393F4u); - cpu->pc = 0x800393F4u; return; - } -label_BFC229D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC229D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC229D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC229D8: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x8003A9E0u; /* jal link before delay slot */ - psx_delay_BFC229D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC229DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003A9DCu); -#endif - if (psx_delay_BFC229D8) { - psx_delay_BFC229D8 = 0; - cpu->gpr[31] = 0x8003A9E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC229E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC229E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC229E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC229E0: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC229E4: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC229E8: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC229EC: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC229F0: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x8003A9F8u; /* jal link before delay slot */ - psx_delay_BFC229F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC229F4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003A9F4u); -#endif - if (psx_delay_BFC229F0) { - psx_delay_BFC229F0 = 0; - cpu->gpr[31] = 0x8003A9F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC229F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC229F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC229F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003A9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC229F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC229FC: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003A9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22A00: AC223B6C sw $v0, 15212($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA00u); return; } g_debug_last_store_pc = 0x8003AA00u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223B6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A04: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22A08: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22A0C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A10: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x8003AA18u; /* jal link before delay slot */ - psx_delay_BFC22A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22A14: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA14u); -#endif - if (psx_delay_BFC22A10) { - psx_delay_BFC22A10 = 0; - cpu->gpr[31] = 0x8003AA18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC22A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22A18: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A1C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22A20: AC22A120 sw $v0, -24288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA20u); return; } g_debug_last_store_pc = 0x8003AA20u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A120u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A24: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22A28: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22A2C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A30: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x8003AA38u; /* jal link before delay slot */ - psx_delay_BFC22A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22A34: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA34u); -#endif - if (psx_delay_BFC22A30) { - psx_delay_BFC22A30 = 0; - cpu->gpr[31] = 0x8003AA38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC22A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22A38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A3C: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22A40: AC22A124 sw $v0, -24284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA40u); return; } g_debug_last_store_pc = 0x8003AA40u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A124u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A44: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22A48: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22A4C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A50: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x8003AA58u; /* jal link before delay slot */ - psx_delay_BFC22A50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22A54: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA54u); -#endif - if (psx_delay_BFC22A50) { - psx_delay_BFC22A50 = 0; - cpu->gpr[31] = 0x8003AA58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC22A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A58: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22A5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA60u); -#endif - /* 0xBFC22A60: 8C843B6C lw $a0, 15212($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843B6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A64: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x8003AA6Cu; /* jal link before delay slot */ - psx_delay_BFC22A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22A68: AC22A128 sw $v0, -24280($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA68u); return; } g_debug_last_store_pc = 0x8003AA68u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A128u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA68u); -#endif - if (psx_delay_BFC22A64) { - psx_delay_BFC22A64 = 0; - cpu->gpr[31] = 0x8003AA6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC22A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A6C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA70u); -#endif - /* 0xBFC22A70: 8C84A120 lw $a0, -24288($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A120u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A74: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x8003AA7Cu; /* jal link before delay slot */ - psx_delay_BFC22A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22A78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AA78u); -#endif - if (psx_delay_BFC22A74) { - psx_delay_BFC22A74 = 0; - cpu->gpr[31] = 0x8003AA7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC22A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A7C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA80u); -#endif - /* 0xBFC22A80: 8C84A124 lw $a0, -24284($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24284; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA80u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A124u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A84: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x8003AA8Cu; /* jal link before delay slot */ - psx_delay_BFC22A84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22A88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AA88u); -#endif - if (psx_delay_BFC22A84) { - psx_delay_BFC22A84 = 0; - cpu->gpr[31] = 0x8003AA8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC22A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22A8C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA90u); -#endif - /* 0xBFC22A90: 8C84A128 lw $a0, -24280($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AA90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A128u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A94: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x8003AA9Cu; /* jal link before delay slot */ - psx_delay_BFC22A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22A98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AA98u); -#endif - if (psx_delay_BFC22A94) { - psx_delay_BFC22A94 = 0; - cpu->gpr[31] = 0x8003AA9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC22A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22A9C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8003AAA4u; /* jal link before delay slot */ - psx_delay_BFC22A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AAA0u); -#endif - if (psx_delay_BFC22A9C) { - psx_delay_BFC22A9C = 0; - cpu->gpr[31] = 0x8003AAA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC22AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAA4u); -#endif - /* 0xBFC22AA4: 8FA80038 lw $t0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAA4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80038u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22AA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AAA8u); -#endif -label_BFC22AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC22AAC: 11000005 beq $t0, $zero, 0xBFC22AC4 */ - uint32_t psx_brA_BFC22AAC = cpu->gpr[8]; uint32_t psx_brB_BFC22AAC = cpu->gpr[0]; - psx_taken_BFC22AAC = (psx_brA_BFC22AAC == psx_brB_BFC22AAC); - psx_delay_BFC22AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22AB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AAB0u); -#endif - if (psx_delay_BFC22AAC) { - psx_delay_BFC22AAC = 0; - if (psx_taken_BFC22AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AAC4u); - goto label_BFC22AC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AAB4u); - } -label_BFC22AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC22AB4: 24090007 addiu $t1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24090007u, cpu->gpr[9], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22AB8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22ABC: 10000003 beq $zero, $zero, 0xBFC22ACC */ - uint32_t psx_brA_BFC22ABC = cpu->gpr[0]; uint32_t psx_brB_BFC22ABC = cpu->gpr[0]; - psx_taken_BFC22ABC = (psx_brA_BFC22ABC == psx_brB_BFC22ABC); - psx_delay_BFC22ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC22AC0: AC296BC0 sw $t1, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAC0u); return; } g_debug_last_store_pc = 0x8003AAC0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296BC0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAC0u); -#endif - if (psx_delay_BFC22ABC) { - psx_delay_BFC22ABC = 0; - if (psx_taken_BFC22ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AACCu); - goto label_BFC22ACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AAC4u); - } -label_BFC22AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22AC4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22AC8: AC206BC0 sw $zero, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAC8u); return; } g_debug_last_store_pc = 0x8003AAC8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAC8u); -#endif -label_BFC22ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC22ACC: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22AD0: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22AD4: 25CE0EB8 addiu $t6, $t6, 3768 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (3768)); - PGXP_ALU(0x25CE0EB8u, cpu->gpr[14], _pgx1, 0x00000EB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC22AD8: 258C0EA8 addiu $t4, $t4, 3752 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (3752)); - PGXP_ALU(0x258C0EA8u, cpu->gpr[12], _pgx1, 0x00000EA8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC22ADC: 000858C0 sll $t3, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000858C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC22AE0: 000868C0 sll $t5, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[13] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000868C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC22AE4: 240A0003 addiu $t2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240A0003u, cpu->gpr[10], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22AE8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC22AEC: AC2A6BB8 sw $t2, 27576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAECu); return; } g_debug_last_store_pc = 0x8003AAECu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6BB8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC22AF0: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC22AF4: AFA20014 sw $v0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAF4u); return; } g_debug_last_store_pc = 0x8003AAF4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1808u); -#endif - /* 0xBFC22AF8: 016C1821 addu $v1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC22AFC: AFA30010 sw $v1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AAFCu); return; } g_debug_last_store_pc = 0x8003AAFCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC22B00: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB00u); return; } g_debug_last_store_pc = 0x8003AB00u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC22B04: AFA20028 sw $v0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB04u); return; } g_debug_last_store_pc = 0x8003AB04u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20028u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22B08: 24040040 addiu $a0, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24040040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22B0C: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22B10: 24060010 addiu $a2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24060010u, cpu->gpr[6], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B14: 0C01267B jal 0xB00499EC */ - cpu->gpr[31] = 0x8003AB1Cu; /* jal link before delay slot */ - psx_delay_BFC22B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC22B18: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB18u); -#endif - if (psx_delay_BFC22B14) { - psx_delay_BFC22B14 = 0; - cpu->gpr[31] = 0x8003AB1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800499ECu); - cpu->pc = 0x800499ECu; return; - } -label_BFC22B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB1Cu); -#endif - /* 0xBFC22B1C: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB1Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22B20: 10400007 beq $v0, $zero, 0xBFC22B40 */ - uint32_t psx_brA_BFC22B20 = cpu->gpr[2]; uint32_t psx_brB_BFC22B20 = cpu->gpr[0]; - psx_taken_BFC22B20 = (psx_brA_BFC22B20 == psx_brB_BFC22B20); - psx_delay_BFC22B20 = 1; - /* 0xBFC22B24: 8FAF0028 lw $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB24u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB24u); -#endif - if (psx_delay_BFC22B20) { - psx_delay_BFC22B20 = 0; - if (psx_taken_BFC22B20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB40u); - goto label_BFC22B40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB28u); - } -label_BFC22B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B28: 0C012719 jal 0xB0049C64 */ - cpu->gpr[31] = 0x8003AB30u; /* jal link before delay slot */ - psx_delay_BFC22B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC22B2C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB2Cu); -#endif - if (psx_delay_BFC22B28) { - psx_delay_BFC22B28 = 0; - cpu->gpr[31] = 0x8003AB30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C64u); - cpu->pc = 0x80049C64u; return; - } -label_BFC22B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB30u); -#endif - /* 0xBFC22B30: 8FA40028 lw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB30u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B34: 0C012745 jal 0xB0049D14 */ - cpu->gpr[31] = 0x8003AB3Cu; /* jal link before delay slot */ - psx_delay_BFC22B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22B38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AB38u); -#endif - if (psx_delay_BFC22B34) { - psx_delay_BFC22B34 = 0; - cpu->gpr[31] = 0x8003AB3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D14u); - cpu->pc = 0x80049D14u; return; - } -label_BFC22B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB3Cu); -#endif - /* 0xBFC22B3C: 8FAF0028 lw $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB3Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB3Cu); -#endif -label_BFC22B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22B40: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22B44: 27180EB8 addiu $t8, $t8, 3768 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (3768)); - PGXP_ALU(0x27180EB8u, cpu->gpr[24], _pgx1, 0x00000EB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC22B48: 11F80006 beq $t7, $t8, 0xBFC22B64 */ - uint32_t psx_brA_BFC22B48 = cpu->gpr[15]; uint32_t psx_brB_BFC22B48 = cpu->gpr[24]; - psx_taken_BFC22B48 = (psx_brA_BFC22B48 == psx_brB_BFC22B48); - psx_delay_BFC22B48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22B4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AB4Cu); -#endif - if (psx_delay_BFC22B48) { - psx_delay_BFC22B48 = 0; - if (psx_taken_BFC22B48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB64u); - goto label_BFC22B64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB50u); - } -label_BFC22B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22B50: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B54: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003AB5Cu; /* jal link before delay slot */ - psx_delay_BFC22B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22B58: 24846AE0 addiu $a0, $a0, 27360 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27360)); - PGXP_ALU(0x24846AE0u, cpu->gpr[4], _pgx1, 0x00006AE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB58u); -#endif - if (psx_delay_BFC22B54) { - psx_delay_BFC22B54 = 0; - cpu->gpr[31] = 0x8003AB5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC22B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22B5C: 10000005 beq $zero, $zero, 0xBFC22B74 */ - uint32_t psx_brA_BFC22B5C = cpu->gpr[0]; uint32_t psx_brB_BFC22B5C = cpu->gpr[0]; - psx_taken_BFC22B5C = (psx_brA_BFC22B5C == psx_brB_BFC22B5C); - psx_delay_BFC22B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB60u); -#endif - /* 0xBFC22B60: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB60u); -#endif - if (psx_delay_BFC22B5C) { - psx_delay_BFC22B5C = 0; - if (psx_taken_BFC22B5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB74u); - goto label_BFC22B74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AB64u); - } -label_BFC22B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22B64: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B68: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003AB70u; /* jal link before delay slot */ - psx_delay_BFC22B68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22B6C: 24846AF0 addiu $a0, $a0, 27376 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27376)); - PGXP_ALU(0x24846AF0u, cpu->gpr[4], _pgx1, 0x00006AF0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB6Cu); -#endif - if (psx_delay_BFC22B68) { - psx_delay_BFC22B68 = 0; - cpu->gpr[31] = 0x8003AB70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC22B70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB70u); -#endif - /* 0xBFC22B70: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB70u); -#endif -label_BFC22B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22B74: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC22B78: 03E00008 jr $ra */ - psx_delay_BFC22B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22B7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AB7Cu); -#endif - if (psx_delay_BFC22B78) { - psx_delay_BFC22B78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC22B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC22B80u); - int psx_delay_BFC22B8C = 0; - int psx_delay_BFC22BA4 = 0; - int psx_taken_BFC22BA4 = 0; - int psx_delay_BFC22BB4 = 0; - int psx_taken_BFC22BB4 = 0; - int psx_delay_BFC22BBC = 0; - int psx_taken_BFC22BBC = 0; - int psx_delay_BFC22BC8 = 0; - int psx_taken_BFC22BC8 = 0; - int psx_delay_BFC22BD0 = 0; - int psx_taken_BFC22BD0 = 0; - int psx_delay_BFC22BD8 = 0; - int psx_delay_BFC22BE0 = 0; - int psx_taken_BFC22BE0 = 0; - int psx_delay_BFC22BE8 = 0; - int psx_delay_BFC22BF0 = 0; - int psx_delay_BFC22BF8 = 0; - int psx_taken_BFC22BF8 = 0; - int psx_delay_BFC22C0C = 0; - int psx_taken_BFC22C0C = 0; - int psx_delay_BFC22C18 = 0; - int psx_delay_BFC22C20 = 0; - int psx_taken_BFC22C20 = 0; - int psx_delay_BFC22C2C = 0; - int psx_delay_BFC22C34 = 0; - int psx_delay_BFC22C3C = 0; - int psx_taken_BFC22C3C = 0; - int psx_delay_BFC22C50 = 0; - int psx_taken_BFC22C50 = 0; - int psx_delay_BFC22C58 = 0; - int psx_delay_BFC22C60 = 0; - int psx_taken_BFC22C60 = 0; - int psx_delay_BFC22C78 = 0; - int psx_delay_BFC22C80 = 0; - int psx_delay_BFC22C8C = 0; - int psx_taken_BFC22C8C = 0; - int psx_delay_BFC22C94 = 0; - int psx_delay_BFC22C9C = 0; - int psx_taken_BFC22C9C = 0; - int psx_delay_BFC22CA8 = 0; - int psx_delay_BFC22CB0 = 0; - int psx_delay_BFC22CB8 = 0; - int psx_taken_BFC22CB8 = 0; - int psx_delay_BFC22CCC = 0; - int psx_taken_BFC22CCC = 0; - int psx_delay_BFC22CD4 = 0; - int psx_delay_BFC22CE0 = 0; - int psx_delay_BFC22CE8 = 0; - int psx_taken_BFC22CE8 = 0; - int psx_delay_BFC22CF0 = 0; - int psx_delay_BFC22D00 = 0; - int psx_delay_BFC22D08 = 0; - int psx_taken_BFC22D08 = 0; - int psx_delay_BFC22D14 = 0; - int psx_taken_BFC22D14 = 0; - int psx_delay_BFC22D30 = 0; - int psx_taken_BFC22D30 = 0; - int psx_delay_BFC22D38 = 0; - int psx_taken_BFC22D38 = 0; - int psx_delay_BFC22D44 = 0; - int psx_delay_BFC22D4C = 0; - int psx_delay_BFC22D5C = 0; - int psx_taken_BFC22D5C = 0; - int psx_delay_BFC22D6C = 0; - int psx_delay_BFC22D74 = 0; - int psx_taken_BFC22D74 = 0; - int psx_delay_BFC22D88 = 0; - int psx_taken_BFC22D88 = 0; - int psx_delay_BFC22D90 = 0; - int psx_taken_BFC22D90 = 0; - int psx_delay_BFC22D98 = 0; - int psx_delay_BFC22DA0 = 0; - int psx_taken_BFC22DA0 = 0; - int psx_delay_BFC22DA8 = 0; - int psx_delay_BFC22DB0 = 0; - int psx_delay_BFC22DB8 = 0; - int psx_delay_BFC22DC0 = 0; - int psx_taken_BFC22DC0 = 0; - int psx_delay_BFC22DD4 = 0; - int psx_taken_BFC22DD4 = 0; - int psx_delay_BFC22DDC = 0; - int psx_taken_BFC22DDC = 0; - int psx_delay_BFC22DE4 = 0; - int psx_delay_BFC22DEC = 0; - int psx_taken_BFC22DEC = 0; - int psx_delay_BFC22DF4 = 0; - int psx_delay_BFC22DFC = 0; - int psx_delay_BFC22E04 = 0; - int psx_delay_BFC22E14 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC22B94u: goto label_BFC22B94; - case 0xBFC22BACu: goto label_BFC22BAC; - case 0xBFC22BBCu: goto label_BFC22BBC; - case 0xBFC22BC4u: goto label_BFC22BC4; - case 0xBFC22BC8u: goto label_BFC22BC8; - case 0xBFC22BD0u: goto label_BFC22BD0; - case 0xBFC22BD8u: goto label_BFC22BD8; - case 0xBFC22BE0u: goto label_BFC22BE0; - case 0xBFC22BE8u: goto label_BFC22BE8; - case 0xBFC22BF0u: goto label_BFC22BF0; - case 0xBFC22BF8u: goto label_BFC22BF8; - case 0xBFC22C00u: goto label_BFC22C00; - case 0xBFC22C14u: goto label_BFC22C14; - case 0xBFC22C20u: goto label_BFC22C20; - case 0xBFC22C28u: goto label_BFC22C28; - case 0xBFC22C2Cu: goto label_BFC22C2C; - case 0xBFC22C34u: goto label_BFC22C34; - case 0xBFC22C3Cu: goto label_BFC22C3C; - case 0xBFC22C44u: goto label_BFC22C44; - case 0xBFC22C48u: goto label_BFC22C48; - case 0xBFC22C58u: goto label_BFC22C58; - case 0xBFC22C60u: goto label_BFC22C60; - case 0xBFC22C68u: goto label_BFC22C68; - case 0xBFC22C6Cu: goto label_BFC22C6C; - case 0xBFC22C80u: goto label_BFC22C80; - case 0xBFC22C88u: goto label_BFC22C88; - case 0xBFC22C94u: goto label_BFC22C94; - case 0xBFC22C9Cu: goto label_BFC22C9C; - case 0xBFC22CA0u: goto label_BFC22CA0; - case 0xBFC22CA4u: goto label_BFC22CA4; - case 0xBFC22CB0u: goto label_BFC22CB0; - case 0xBFC22CB8u: goto label_BFC22CB8; - case 0xBFC22CC0u: goto label_BFC22CC0; - case 0xBFC22CC4u: goto label_BFC22CC4; - case 0xBFC22CD4u: goto label_BFC22CD4; - case 0xBFC22CDCu: goto label_BFC22CDC; - case 0xBFC22CE8u: goto label_BFC22CE8; - case 0xBFC22CF0u: goto label_BFC22CF0; - case 0xBFC22CF8u: goto label_BFC22CF8; - case 0xBFC22D08u: goto label_BFC22D08; - case 0xBFC22D10u: goto label_BFC22D10; - case 0xBFC22D14u: goto label_BFC22D14; - case 0xBFC22D1Cu: goto label_BFC22D1C; - case 0xBFC22D20u: goto label_BFC22D20; - case 0xBFC22D38u: goto label_BFC22D38; - case 0xBFC22D40u: goto label_BFC22D40; - case 0xBFC22D44u: goto label_BFC22D44; - case 0xBFC22D4Cu: goto label_BFC22D4C; - case 0xBFC22D54u: goto label_BFC22D54; - case 0xBFC22D64u: goto label_BFC22D64; - case 0xBFC22D68u: goto label_BFC22D68; - case 0xBFC22D74u: goto label_BFC22D74; - case 0xBFC22D7Cu: goto label_BFC22D7C; - case 0xBFC22D80u: goto label_BFC22D80; - case 0xBFC22D90u: goto label_BFC22D90; - case 0xBFC22D98u: goto label_BFC22D98; - case 0xBFC22DA0u: goto label_BFC22DA0; - case 0xBFC22DA8u: goto label_BFC22DA8; - case 0xBFC22DB0u: goto label_BFC22DB0; - case 0xBFC22DB8u: goto label_BFC22DB8; - case 0xBFC22DC0u: goto label_BFC22DC0; - case 0xBFC22DC8u: goto label_BFC22DC8; - case 0xBFC22DDCu: goto label_BFC22DDC; - case 0xBFC22DE4u: goto label_BFC22DE4; - case 0xBFC22DECu: goto label_BFC22DEC; - case 0xBFC22DF4u: goto label_BFC22DF4; - case 0xBFC22DFCu: goto label_BFC22DFC; - case 0xBFC22E04u: goto label_BFC22E04; - case 0xBFC22E0Cu: goto label_BFC22E0C; - case 0xBFC22E10u: goto label_BFC22E10; - default: break; - } - } -label_BFC22B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22B80: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC22B84: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB84u); return; } g_debug_last_store_pc = 0x8003AB84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC22B88: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB88u); return; } g_debug_last_store_pc = 0x8003AB88u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22B8C: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003AB94u; /* jal link before delay slot */ - psx_delay_BFC22B8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22B90: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB90u); return; } g_debug_last_store_pc = 0x8003AB90u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB90u); -#endif - if (psx_delay_BFC22B8C) { - psx_delay_BFC22B8C = 0; - cpu->gpr[31] = 0x8003AB94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC22B94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22B94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AB94u); -#endif - /* 0xBFC22B94: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AB94u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22B98: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22B9C: 34214000 ori $at, $at, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4000u; - PGXP_ALU(0x34214000u, cpu->gpr[1], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC22BA0: 00817024 and $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC22BA4: 11C00016 beq $t6, $zero, 0xBFC22C00 */ - uint32_t psx_brA_BFC22BA4 = cpu->gpr[14]; uint32_t psx_brB_BFC22BA4 = cpu->gpr[0]; - psx_taken_BFC22BA4 = (psx_brA_BFC22BA4 == psx_brB_BFC22BA4); - psx_delay_BFC22BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC22BA8: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABA8u); -#endif - if (psx_delay_BFC22BA4) { - psx_delay_BFC22BA4 = 0; - if (psx_taken_BFC22BA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC00u); - goto label_BFC22C00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABACu); - } -label_BFC22BAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22BAC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22BB0: 2401001D addiu $at, $zero, 29 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (29)); - PGXP_ALU(0x2401001Du, cpu->gpr[1], _pgx1, 0x0000001Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC22BB4: 16010004 bne $s0, $at, 0xBFC22BC8 */ - uint32_t psx_brA_BFC22BB4 = cpu->gpr[16]; uint32_t psx_brB_BFC22BB4 = cpu->gpr[1]; - psx_taken_BFC22BB4 = (psx_brA_BFC22BB4 != psx_brB_BFC22BB4); - psx_delay_BFC22BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22BB8: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABB8u); -#endif - if (psx_delay_BFC22BB4) { - psx_delay_BFC22BB4 = 0; - if (psx_taken_BFC22BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABC8u); - goto label_BFC22BC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABBCu); - } -label_BFC22BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22BBC: 1000000A beq $zero, $zero, 0xBFC22BE8 */ - uint32_t psx_brA_BFC22BBC = cpu->gpr[0]; uint32_t psx_brB_BFC22BBC = cpu->gpr[0]; - psx_taken_BFC22BBC = (psx_brA_BFC22BBC == psx_brB_BFC22BBC); - psx_delay_BFC22BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22BC0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABC0u); -#endif - if (psx_delay_BFC22BBC) { - psx_delay_BFC22BBC = 0; - if (psx_taken_BFC22BBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABE8u); - goto label_BFC22BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABC4u); - } -label_BFC22BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22BC4: 2401003B addiu $at, $zero, 59 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); - PGXP_ALU(0x2401003Bu, cpu->gpr[1], _pgx1, 0x0000003Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABC4u); -#endif -label_BFC22BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC22BC8: 16010003 bne $s0, $at, 0xBFC22BD8 */ - uint32_t psx_brA_BFC22BC8 = cpu->gpr[16]; uint32_t psx_brB_BFC22BC8 = cpu->gpr[1]; - psx_taken_BFC22BC8 = (psx_brA_BFC22BC8 != psx_brB_BFC22BC8); - psx_delay_BFC22BC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22BCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ABCCu); -#endif - if (psx_delay_BFC22BC8) { - psx_delay_BFC22BC8 = 0; - if (psx_taken_BFC22BC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABD8u); - goto label_BFC22BD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABD0u); - } -label_BFC22BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22BD0: 10000005 beq $zero, $zero, 0xBFC22BE8 */ - uint32_t psx_brA_BFC22BD0 = cpu->gpr[0]; uint32_t psx_brB_BFC22BD0 = cpu->gpr[0]; - psx_taken_BFC22BD0 = (psx_brA_BFC22BD0 == psx_brB_BFC22BD0); - psx_delay_BFC22BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22BD4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABD4u); -#endif - if (psx_delay_BFC22BD0) { - psx_delay_BFC22BD0 = 0; - if (psx_taken_BFC22BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABE8u); - goto label_BFC22BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABD8u); - } -label_BFC22BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22BD8: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003ABE0u; /* jal link before delay slot */ - psx_delay_BFC22BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22BDC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABDCu); -#endif - if (psx_delay_BFC22BD8) { - psx_delay_BFC22BD8 = 0; - cpu->gpr[31] = 0x8003ABE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22BE0: 0440FFF2 bltz $v0, 0xBFC22BAC */ - uint32_t psx_brA_BFC22BE0 = cpu->gpr[2]; - psx_taken_BFC22BE0 = ((int32_t)psx_brA_BFC22BE0 < 0); - psx_delay_BFC22BE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22BE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ABE4u); -#endif - if (psx_delay_BFC22BE0) { - psx_delay_BFC22BE0 = 0; - if (psx_taken_BFC22BE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABACu); - goto label_BFC22BAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ABE8u); - } -label_BFC22BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22BE8: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003ABF0u; /* jal link before delay slot */ - psx_delay_BFC22BE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22BEC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABECu); -#endif - if (psx_delay_BFC22BE8) { - psx_delay_BFC22BE8 = 0; - cpu->gpr[31] = 0x8003ABF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC22BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22BF0: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003ABF8u; /* jal link before delay slot */ - psx_delay_BFC22BF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22BF4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABF4u); -#endif - if (psx_delay_BFC22BF0) { - psx_delay_BFC22BF0 = 0; - cpu->gpr[31] = 0x8003ABF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22BF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22BF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ABF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22BF8: 10000085 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22BF8 = cpu->gpr[0]; uint32_t psx_brB_BFC22BF8 = cpu->gpr[0]; - psx_taken_BFC22BF8 = (psx_brA_BFC22BF8 == psx_brB_BFC22BF8); - psx_delay_BFC22BF8 = 1; - /* 0xBFC22BFC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ABFCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ABFCu); -#endif - if (psx_delay_BFC22BF8) { - psx_delay_BFC22BF8 = 0; - if (psx_taken_BFC22BF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC00u); - } -label_BFC22C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C00: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C04: 34211000 ori $at, $at, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1000u; - PGXP_ALU(0x34211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC22C08: 00817824 and $t7, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC22C0C: 11E0000E beq $t7, $zero, 0xBFC22C48 */ - uint32_t psx_brA_BFC22C0C = cpu->gpr[15]; uint32_t psx_brB_BFC22C0C = cpu->gpr[0]; - psx_taken_BFC22C0C = (psx_brA_BFC22C0C == psx_brB_BFC22C0C); - psx_delay_BFC22C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C10: 3C010900 lui $at, 0x900 */ - cpu->gpr[1] = 0x09000000u; - PGXP_ALU(0x3C010900u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AC10u); -#endif - if (psx_delay_BFC22C0C) { - psx_delay_BFC22C0C = 0; - if (psx_taken_BFC22C0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC48u); - goto label_BFC22C48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC14u); - } -label_BFC22C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22C14: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C18: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003AC20u; /* jal link before delay slot */ - psx_delay_BFC22C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22C1C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC1Cu); -#endif - if (psx_delay_BFC22C18) { - psx_delay_BFC22C18 = 0; - cpu->gpr[31] = 0x8003AC20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22C20: 04410002 bgez $v0, 0xBFC22C2C */ - uint32_t psx_brA_BFC22C20 = cpu->gpr[2]; - psx_taken_BFC22C20 = ((int32_t)psx_brA_BFC22C20 >= 0); - psx_delay_BFC22C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC24u); -#endif - if (psx_delay_BFC22C20) { - psx_delay_BFC22C20 = 0; - if (psx_taken_BFC22C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC2Cu); - goto label_BFC22C2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC28u); - } -label_BFC22C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22C28: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC28u); -#endif -label_BFC22C2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C2C: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003AC34u; /* jal link before delay slot */ - psx_delay_BFC22C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22C30: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC30u); -#endif - if (psx_delay_BFC22C2C) { - psx_delay_BFC22C2C = 0; - cpu->gpr[31] = 0x8003AC34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC22C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C34: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003AC3Cu; /* jal link before delay slot */ - psx_delay_BFC22C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC22C38: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC38u); -#endif - if (psx_delay_BFC22C34) { - psx_delay_BFC22C34 = 0; - cpu->gpr[31] = 0x8003AC3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C3C: 10000074 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22C3C = cpu->gpr[0]; uint32_t psx_brB_BFC22C3C = cpu->gpr[0]; - psx_taken_BFC22C3C = (psx_brA_BFC22C3C == psx_brB_BFC22C3C); - psx_delay_BFC22C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC40u); -#endif - /* 0xBFC22C40: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AC40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC40u); -#endif - if (psx_delay_BFC22C3C) { - psx_delay_BFC22C3C = 0; - if (psx_taken_BFC22C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC44u); - } -label_BFC22C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C44: 3C010900 lui $at, 0x900 */ - cpu->gpr[1] = 0x09000000u; - PGXP_ALU(0x3C010900u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AC44u); -#endif -label_BFC22C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C48: 34210900 ori $at, $at, 0x900 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x900u; - PGXP_ALU(0x34210900u, cpu->gpr[1], _pgx1, 0x0900u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000012u); -#endif - /* 0xBFC22C4C: 0081C024 and $t8, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x0081C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC22C50: 1300001C beq $t8, $zero, 0xBFC22CC4 */ - uint32_t psx_brA_BFC22C50 = cpu->gpr[24]; uint32_t psx_brB_BFC22C50 = cpu->gpr[0]; - psx_taken_BFC22C50 = (psx_brA_BFC22C50 == psx_brB_BFC22C50); - psx_delay_BFC22C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22C54: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AC54u); -#endif - if (psx_delay_BFC22C50) { - psx_delay_BFC22C50 = 0; - if (psx_taken_BFC22C50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACC4u); - goto label_BFC22CC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC58u); - } -label_BFC22C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C58: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003AC60u; /* jal link before delay slot */ - psx_delay_BFC22C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC5Cu); -#endif - if (psx_delay_BFC22C58) { - psx_delay_BFC22C58 = 0; - cpu->gpr[31] = 0x8003AC60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22C60: 04410002 bgez $v0, 0xBFC22C6C */ - uint32_t psx_brA_BFC22C60 = cpu->gpr[2]; - psx_taken_BFC22C60 = ((int32_t)psx_brA_BFC22C60 >= 0); - psx_delay_BFC22C60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC22C64: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC64u); -#endif - if (psx_delay_BFC22C60) { - psx_delay_BFC22C60 = 0; - if (psx_taken_BFC22C60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC6Cu); - goto label_BFC22C6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC68u); - } -label_BFC22C68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC22C68: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC68u); -#endif -label_BFC22C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22C6C: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC22C70: 0061001A div $v1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0061001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003AC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22C74: 00002010 mfhi $a0 */ - cpu->gpr[4] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002010u, cpu->gpr[4], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C78: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003AC80u; /* jal link before delay slot */ - psx_delay_BFC22C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC7Cu); -#endif - if (psx_delay_BFC22C78) { - psx_delay_BFC22C78 = 0; - cpu->gpr[31] = 0x8003AC80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C80: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003AC88u; /* jal link before delay slot */ - psx_delay_BFC22C80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC84u); -#endif - if (psx_delay_BFC22C80) { - psx_delay_BFC22C80 = 0; - cpu->gpr[31] = 0x8003AC88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22C88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC22C88: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22C8C: 10500004 beq $v0, $s0, 0xBFC22CA0 */ - uint32_t psx_brA_BFC22C8C = cpu->gpr[2]; uint32_t psx_brB_BFC22C8C = cpu->gpr[16]; - psx_taken_BFC22C8C = (psx_brA_BFC22C8C == psx_brB_BFC22C8C); - psx_delay_BFC22C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC90u); -#endif - if (psx_delay_BFC22C8C) { - psx_delay_BFC22C8C = 0; - if (psx_taken_BFC22C8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACA0u); - goto label_BFC22CA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC94u); - } -label_BFC22C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22C94: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003AC9Cu; /* jal link before delay slot */ - psx_delay_BFC22C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AC98u); -#endif - if (psx_delay_BFC22C94) { - psx_delay_BFC22C94 = 0; - cpu->gpr[31] = 0x8003AC9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC22C9C: 1450FFFD bne $v0, $s0, 0xBFC22C94 */ - uint32_t psx_brA_BFC22C9C = cpu->gpr[2]; uint32_t psx_brB_BFC22C9C = cpu->gpr[16]; - psx_taken_BFC22C9C = (psx_brA_BFC22C9C != psx_brB_BFC22C9C); - psx_delay_BFC22C9C = 1; -label_BFC22CA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22CA0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ACA0u); -#endif - if (psx_delay_BFC22C9C) { - psx_delay_BFC22C9C = 0; - if (psx_taken_BFC22C9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AC94u); - goto label_BFC22C94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACA4u); - } -label_BFC22CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22CA4: AC206BC0 sw $zero, 27584($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27584; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ACA4u); return; } g_debug_last_store_pc = 0x8003ACA4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22CA8: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003ACB0u; /* jal link before delay slot */ - psx_delay_BFC22CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22CAC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACACu); -#endif - if (psx_delay_BFC22CA8) { - psx_delay_BFC22CA8 = 0; - cpu->gpr[31] = 0x8003ACB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC22CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22CB0: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x8003ACB8u; /* jal link before delay slot */ - psx_delay_BFC22CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22CB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ACB4u); -#endif - if (psx_delay_BFC22CB0) { - psx_delay_BFC22CB0 = 0; - cpu->gpr[31] = 0x8003ACB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC22CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22CB8: 10000055 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22CB8 = cpu->gpr[0]; uint32_t psx_brB_BFC22CB8 = cpu->gpr[0]; - psx_taken_BFC22CB8 = (psx_brA_BFC22CB8 == psx_brB_BFC22CB8); - psx_delay_BFC22CB8 = 1; - /* 0xBFC22CBC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ACBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACBCu); -#endif - if (psx_delay_BFC22CB8) { - psx_delay_BFC22CB8 = 0; - if (psx_taken_BFC22CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACC0u); - } -label_BFC22CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22CC0: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ACC0u); -#endif -label_BFC22CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22CC4: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC22CC8: 0081C824 and $t9, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x0081C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC22CCC: 1320002C beq $t9, $zero, 0xBFC22D80 */ - uint32_t psx_brA_BFC22CCC = cpu->gpr[25]; uint32_t psx_brB_BFC22CCC = cpu->gpr[0]; - psx_taken_BFC22CCC = (psx_brA_BFC22CCC == psx_brB_BFC22CCC); - psx_delay_BFC22CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22CD0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ACD0u); -#endif - if (psx_delay_BFC22CCC) { - psx_delay_BFC22CCC = 0; - if (psx_taken_BFC22CCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD80u); - goto label_BFC22D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACD4u); - } -label_BFC22CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22CD4: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003ACDCu; /* jal link before delay slot */ - psx_delay_BFC22CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22CD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ACD8u); -#endif - if (psx_delay_BFC22CD4) { - psx_delay_BFC22CD4 = 0; - cpu->gpr[31] = 0x8003ACDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC22CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22CDC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ACDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22CE0: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003ACE8u; /* jal link before delay slot */ - psx_delay_BFC22CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22CE4: AC226BBC sw $v0, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ACE4u); return; } g_debug_last_store_pc = 0x8003ACE4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC226BBCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACE4u); -#endif - if (psx_delay_BFC22CE0) { - psx_delay_BFC22CE0 = 0; - cpu->gpr[31] = 0x8003ACE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC22CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22CE8: 0441000A bgez $v0, 0xBFC22D14 */ - uint32_t psx_brA_BFC22CE8 = cpu->gpr[2]; - psx_taken_BFC22CE8 = ((int32_t)psx_brA_BFC22CE8 >= 0); - psx_delay_BFC22CE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22CEC: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACECu); -#endif - if (psx_delay_BFC22CE8) { - psx_delay_BFC22CE8 = 0; - if (psx_taken_BFC22CE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD14u); - goto label_BFC22D14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ACF0u); - } -label_BFC22CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22CF0: 0C011951 jal 0xB0046544 */ - cpu->gpr[31] = 0x8003ACF8u; /* jal link before delay slot */ - psx_delay_BFC22CF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22CF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ACF4u); -#endif - if (psx_delay_BFC22CF0) { - psx_delay_BFC22CF0 = 0; - cpu->gpr[31] = 0x8003ACF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046544u); - cpu->pc = 0x80046544u; return; - } -label_BFC22CF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22CF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ACF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC22CF8: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ACF8u); -#endif - /* 0xBFC22CFC: 8C846BB8 lw $a0, 27576($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ACFCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ACFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22D00: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003AD08u; /* jal link before delay slot */ - psx_delay_BFC22D00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AD04u); -#endif - if (psx_delay_BFC22D00) { - psx_delay_BFC22D00 = 0; - cpu->gpr[31] = 0x8003AD08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22D08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D08: 10000041 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22D08 = cpu->gpr[0]; uint32_t psx_brB_BFC22D08 = cpu->gpr[0]; - psx_taken_BFC22D08 = (psx_brA_BFC22D08 == psx_brB_BFC22D08); - psx_delay_BFC22D08 = 1; - /* 0xBFC22D0C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AD0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD0Cu); -#endif - if (psx_delay_BFC22D08) { - psx_delay_BFC22D08 = 0; - if (psx_taken_BFC22D08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD10u); - } -label_BFC22D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22D10: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD10u); -#endif -label_BFC22D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22D14: 14410014 bne $v0, $at, 0xBFC22D68 */ - uint32_t psx_brA_BFC22D14 = cpu->gpr[2]; uint32_t psx_brB_BFC22D14 = cpu->gpr[1]; - psx_taken_BFC22D14 = (psx_brA_BFC22D14 != psx_brB_BFC22D14); - psx_delay_BFC22D14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC22D18: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD18u); -#endif - if (psx_delay_BFC22D14) { - psx_delay_BFC22D14 = 0; - if (psx_taken_BFC22D14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD68u); - goto label_BFC22D68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD1Cu); - } -label_BFC22D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC22D1C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD1Cu); -#endif -label_BFC22D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC22D20: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AD20u); -#endif - /* 0xBFC22D24: 8D086BBC lw $t0, 27580($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AD24u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D086BBCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC22D2C: 2901003C slti $at, $t0, 60 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (60) ? 1 : 0); - PGXP_ALU(0x2901003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22D30: 10200004 beq $at, $zero, 0xBFC22D44 */ - uint32_t psx_brA_BFC22D30 = cpu->gpr[1]; uint32_t psx_brB_BFC22D30 = cpu->gpr[0]; - psx_taken_BFC22D30 = (psx_brA_BFC22D30 == psx_brB_BFC22D30); - psx_delay_BFC22D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22D34: 2402003C addiu $v0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2402003Cu, cpu->gpr[2], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD34u); -#endif - if (psx_delay_BFC22D30) { - psx_delay_BFC22D30 = 0; - if (psx_taken_BFC22D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD44u); - goto label_BFC22D44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD38u); - } -label_BFC22D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D38: 10000002 beq $zero, $zero, 0xBFC22D44 */ - uint32_t psx_brA_BFC22D38 = cpu->gpr[0]; uint32_t psx_brB_BFC22D38 = cpu->gpr[0]; - psx_taken_BFC22D38 = (psx_brA_BFC22D38 == psx_brB_BFC22D38); - psx_delay_BFC22D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22D3C: 2402001E addiu $v0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2402001Eu, cpu->gpr[2], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD3Cu); -#endif - if (psx_delay_BFC22D38) { - psx_delay_BFC22D38 = 0; - if (psx_taken_BFC22D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD44u); - goto label_BFC22D44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD40u); - } -label_BFC22D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22D40: 2402003C addiu $v0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2402003Cu, cpu->gpr[2], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD40u); -#endif -label_BFC22D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22D44: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003AD4Cu; /* jal link before delay slot */ - psx_delay_BFC22D44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10014u); -#endif - /* 0xBFC22D48: 00502021 addu $a0, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[16]; - PGXP_ALU(0x00502021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD48u); -#endif - if (psx_delay_BFC22D44) { - psx_delay_BFC22D44 = 0; - cpu->gpr[31] = 0x8003AD4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22D4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22D4C: 0C011951 jal 0xB0046544 */ - cpu->gpr[31] = 0x8003AD54u; /* jal link before delay slot */ - psx_delay_BFC22D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AD50u); -#endif - if (psx_delay_BFC22D4C) { - psx_delay_BFC22D4C = 0; - cpu->gpr[31] = 0x8003AD54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046544u); - cpu->pc = 0x80046544u; return; - } -label_BFC22D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC22D54: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22D58: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC22D5C: 1601FFF0 bne $s0, $at, 0xBFC22D20 */ - uint32_t psx_brA_BFC22D5C = cpu->gpr[16]; uint32_t psx_brB_BFC22D5C = cpu->gpr[1]; - psx_taken_BFC22D5C = (psx_brA_BFC22D5C != psx_brB_BFC22D5C); - psx_delay_BFC22D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AD60u); -#endif - if (psx_delay_BFC22D5C) { - psx_delay_BFC22D5C = 0; - if (psx_taken_BFC22D5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD20u); - goto label_BFC22D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD64u); - } -label_BFC22D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC22D64: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD64u); -#endif -label_BFC22D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22D68: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22D6C: 0C00F954 jal 0xB003E550 */ - cpu->gpr[31] = 0x8003AD74u; /* jal link before delay slot */ - psx_delay_BFC22D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC22D70: AC29A180 sw $t1, -24192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AD70u); return; } g_debug_last_store_pc = 0x8003AD70u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29A180u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD70u); -#endif - if (psx_delay_BFC22D6C) { - psx_delay_BFC22D6C = 0; - cpu->gpr[31] = 0x8003AD74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E550u); - cpu->pc = 0x8003E550u; return; - } -label_BFC22D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22D74: 10000026 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22D74 = cpu->gpr[0]; uint32_t psx_brB_BFC22D74 = cpu->gpr[0]; - psx_taken_BFC22D74 = (psx_brA_BFC22D74 == psx_brB_BFC22D74); - psx_delay_BFC22D74 = 1; - /* 0xBFC22D78: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AD78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD78u); -#endif - if (psx_delay_BFC22D74) { - psx_delay_BFC22D74 = 0; - if (psx_taken_BFC22D74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD7Cu); - } -label_BFC22D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22D7C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AD7Cu); -#endif -label_BFC22D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22D80: 34218000 ori $at, $at, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x8000u; - PGXP_ALU(0x34218000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x412u); -#endif - /* 0xBFC22D84: 00815024 and $t2, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC22D88: 1140000F beq $t2, $zero, 0xBFC22DC8 */ - uint32_t psx_brA_BFC22D88 = cpu->gpr[10]; uint32_t psx_brB_BFC22D88 = cpu->gpr[0]; - psx_taken_BFC22D88 = (psx_brA_BFC22D88 == psx_brB_BFC22D88); - psx_delay_BFC22D88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22D8C: 2841003C slti $at, $v0, 60 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0); - PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD8Cu); -#endif - if (psx_delay_BFC22D88) { - psx_delay_BFC22D88 = 0; - if (psx_taken_BFC22D88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADC8u); - goto label_BFC22DC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD90u); - } -label_BFC22D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22D90: 1420001F bne $at, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22D90 = cpu->gpr[1]; uint32_t psx_brB_BFC22D90 = cpu->gpr[0]; - psx_taken_BFC22D90 = (psx_brA_BFC22D90 != psx_brB_BFC22D90); - psx_delay_BFC22D90 = 1; - /* 0xBFC22D94: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AD94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD94u); -#endif - if (psx_delay_BFC22D90) { - psx_delay_BFC22D90 = 0; - if (psx_taken_BFC22D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AD98u); - } -label_BFC22D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22D98: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003ADA0u; /* jal link before delay slot */ - psx_delay_BFC22D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22D9C: 2404001E addiu $a0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2404001Eu, cpu->gpr[4], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AD9Cu); -#endif - if (psx_delay_BFC22D98) { - psx_delay_BFC22D98 = 0; - cpu->gpr[31] = 0x8003ADA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22DA0: 0440001B bltz $v0, 0xBFC22E10 */ - uint32_t psx_brA_BFC22DA0 = cpu->gpr[2]; - psx_taken_BFC22DA0 = ((int32_t)psx_brA_BFC22DA0 < 0); - psx_delay_BFC22DA0 = 1; - /* 0xBFC22DA4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ADA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADA4u); -#endif - if (psx_delay_BFC22DA0) { - psx_delay_BFC22DA0 = 0; - if (psx_taken_BFC22DA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADA8u); - } -label_BFC22DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DA8: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003ADB0u; /* jal link before delay slot */ - psx_delay_BFC22DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22DAC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADACu); -#endif - if (psx_delay_BFC22DA8) { - psx_delay_BFC22DA8 = 0; - cpu->gpr[31] = 0x8003ADB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC22DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DB0: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003ADB8u; /* jal link before delay slot */ - psx_delay_BFC22DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22DB4: 2404001E addiu $a0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2404001Eu, cpu->gpr[4], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADB4u); -#endif - if (psx_delay_BFC22DB0) { - psx_delay_BFC22DB0 = 0; - cpu->gpr[31] = 0x8003ADB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DB8: 0C00F970 jal 0xB003E5C0 */ - cpu->gpr[31] = 0x8003ADC0u; /* jal link before delay slot */ - psx_delay_BFC22DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22DBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ADBCu); -#endif - if (psx_delay_BFC22DB8) { - psx_delay_BFC22DB8 = 0; - cpu->gpr[31] = 0x8003ADC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E5C0u); - cpu->pc = 0x8003E5C0u; return; - } -label_BFC22DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22DC0: 10000013 beq $zero, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22DC0 = cpu->gpr[0]; uint32_t psx_brB_BFC22DC0 = cpu->gpr[0]; - psx_taken_BFC22DC0 = (psx_brA_BFC22DC0 == psx_brB_BFC22DC0); - psx_delay_BFC22DC0 = 1; - /* 0xBFC22DC4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ADC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADC4u); -#endif - if (psx_delay_BFC22DC0) { - psx_delay_BFC22DC0 = 0; - if (psx_taken_BFC22DC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADC8u); - } -label_BFC22DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22DC8: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ADC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC22DCC: 34212000 ori $at, $at, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2000u; - PGXP_ALU(0x34212000u, cpu->gpr[1], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x812u); -#endif - /* 0xBFC22DD0: 00815824 and $t3, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00815824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC22DD4: 1160000D beq $t3, $zero, 0xBFC22E0C */ - uint32_t psx_brA_BFC22DD4 = cpu->gpr[11]; uint32_t psx_brB_BFC22DD4 = cpu->gpr[0]; - psx_taken_BFC22DD4 = (psx_brA_BFC22DD4 == psx_brB_BFC22DD4); - psx_delay_BFC22DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22DD8: 2841003C slti $at, $v0, 60 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0); - PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADD8u); -#endif - if (psx_delay_BFC22DD4) { - psx_delay_BFC22DD4 = 0; - if (psx_taken_BFC22DD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE0Cu); - goto label_BFC22E0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADDCu); - } -label_BFC22DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22DDC: 1020000C beq $at, $zero, 0xBFC22E10 */ - uint32_t psx_brA_BFC22DDC = cpu->gpr[1]; uint32_t psx_brB_BFC22DDC = cpu->gpr[0]; - psx_taken_BFC22DDC = (psx_brA_BFC22DDC == psx_brB_BFC22DDC); - psx_delay_BFC22DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADE0u); -#endif - /* 0xBFC22DE0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ADE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADE0u); -#endif - if (psx_delay_BFC22DDC) { - psx_delay_BFC22DDC = 0; - if (psx_taken_BFC22DDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADE4u); - } -label_BFC22DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DE4: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003ADECu; /* jal link before delay slot */ - psx_delay_BFC22DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22DE8: 2404003C addiu $a0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2404003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADE8u); -#endif - if (psx_delay_BFC22DE4) { - psx_delay_BFC22DE4 = 0; - cpu->gpr[31] = 0x8003ADECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC22DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC22DEC: 04400008 bltz $v0, 0xBFC22E10 */ - uint32_t psx_brA_BFC22DEC = cpu->gpr[2]; - psx_taken_BFC22DEC = ((int32_t)psx_brA_BFC22DEC < 0); - psx_delay_BFC22DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADF0u); -#endif - /* 0xBFC22DF0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ADF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADF0u); -#endif - if (psx_delay_BFC22DEC) { - psx_delay_BFC22DEC = 0; - if (psx_taken_BFC22DEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE10u); - goto label_BFC22E10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ADF4u); - } -label_BFC22DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DF4: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003ADFCu; /* jal link before delay slot */ - psx_delay_BFC22DF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22DF8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ADF8u); -#endif - if (psx_delay_BFC22DF4) { - psx_delay_BFC22DF4 = 0; - cpu->gpr[31] = 0x8003ADFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC22DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ADFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22DFC: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003AE04u; /* jal link before delay slot */ - psx_delay_BFC22DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC22E00: 2404003C addiu $a0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2404003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE00u); -#endif - if (psx_delay_BFC22DFC) { - psx_delay_BFC22DFC = 0; - cpu->gpr[31] = 0x8003AE04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC22E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22E04: 0C00F984 jal 0xB003E610 */ - cpu->gpr[31] = 0x8003AE0Cu; /* jal link before delay slot */ - psx_delay_BFC22E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AE08u); -#endif - if (psx_delay_BFC22E04) { - psx_delay_BFC22E04 = 0; - cpu->gpr[31] = 0x8003AE0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E610u); - cpu->pc = 0x8003E610u; return; - } -label_BFC22E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE0Cu); -#endif - /* 0xBFC22E0C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE0Cu); -#endif -label_BFC22E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE10u); -#endif - /* 0xBFC22E10: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE10u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC22E14: 03E00008 jr $ra */ - psx_delay_BFC22E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22E18: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE18u); -#endif - if (psx_delay_BFC22E14) { - psx_delay_BFC22E14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC22E1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC22E1Cu); - int psx_delay_BFC22E28 = 0; - int psx_delay_BFC22E34 = 0; - int psx_taken_BFC22E34 = 0; - int psx_delay_BFC22E3C = 0; - int psx_taken_BFC22E3C = 0; - int psx_delay_BFC22E4C = 0; - int psx_delay_BFC22E5C = 0; - int psx_taken_BFC22E5C = 0; - int psx_delay_BFC22E64 = 0; - int psx_delay_BFC22E6C = 0; - int psx_taken_BFC22E6C = 0; - int psx_delay_BFC22E74 = 0; - int psx_delay_BFC22E88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC22E30u: goto label_BFC22E30; - case 0xBFC22E3Cu: goto label_BFC22E3C; - case 0xBFC22E44u: goto label_BFC22E44; - case 0xBFC22E54u: goto label_BFC22E54; - case 0xBFC22E64u: goto label_BFC22E64; - case 0xBFC22E6Cu: goto label_BFC22E6C; - case 0xBFC22E74u: goto label_BFC22E74; - case 0xBFC22E7Cu: goto label_BFC22E7C; - case 0xBFC22E80u: goto label_BFC22E80; - default: break; - } - } -label_BFC22E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22E1C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC22E20: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE20u); return; } g_debug_last_store_pc = 0x8003AE20u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC22E24: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE24u); return; } g_debug_last_store_pc = 0x8003AE24u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22E28: 0C016AAC jal 0xB005AAB0 */ - cpu->gpr[31] = 0x8003AE30u; /* jal link before delay slot */ - psx_delay_BFC22E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC22E2C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE2Cu); -#endif - if (psx_delay_BFC22E28) { - psx_delay_BFC22E28 = 0; - cpu->gpr[31] = 0x8003AE30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAB0u); - cpu->pc = 0x8005AAB0u; return; - } -label_BFC22E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22E30: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22E34: 14410003 bne $v0, $at, 0xBFC22E44 */ - uint32_t psx_brA_BFC22E34 = cpu->gpr[2]; uint32_t psx_brB_BFC22E34 = cpu->gpr[1]; - psx_taken_BFC22E34 = (psx_brA_BFC22E34 != psx_brB_BFC22E34); - psx_delay_BFC22E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC22E38: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE38u); -#endif - if (psx_delay_BFC22E34) { - psx_delay_BFC22E34 = 0; - if (psx_taken_BFC22E34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE44u); - goto label_BFC22E44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE3Cu); - } -label_BFC22E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E3C: 10000010 beq $zero, $zero, 0xBFC22E80 */ - uint32_t psx_brA_BFC22E3C = cpu->gpr[0]; uint32_t psx_brB_BFC22E3C = cpu->gpr[0]; - psx_taken_BFC22E3C = (psx_brA_BFC22E3C == psx_brB_BFC22E3C); - psx_delay_BFC22E3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22E40: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE40u); -#endif - if (psx_delay_BFC22E3C) { - psx_delay_BFC22E3C = 0; - if (psx_taken_BFC22E3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE80u); - goto label_BFC22E80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE44u); - } -label_BFC22E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE44u); -#endif - /* 0xBFC22E44: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE44u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC22E48: 24060200 addiu $a2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24060200u, cpu->gpr[6], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22E4C: 0C016AB0 jal 0xB005AAC0 */ - cpu->gpr[31] = 0x8003AE54u; /* jal link before delay slot */ - psx_delay_BFC22E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22E50: AFA40024 sw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE50u); return; } g_debug_last_store_pc = 0x8003AE50u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE50u); -#endif - if (psx_delay_BFC22E4C) { - psx_delay_BFC22E4C = 0; - cpu->gpr[31] = 0x8003AE54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAC0u); - cpu->pc = 0x8005AAC0u; return; - } -label_BFC22E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE54u); -#endif - /* 0xBFC22E54: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE54u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22E58: 24010200 addiu $at, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24010200u, cpu->gpr[1], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC22E5C: 10410005 beq $v0, $at, 0xBFC22E74 */ - uint32_t psx_brA_BFC22E5C = cpu->gpr[2]; uint32_t psx_brB_BFC22E5C = cpu->gpr[1]; - psx_taken_BFC22E5C = (psx_brA_BFC22E5C == psx_brB_BFC22E5C); - psx_delay_BFC22E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AE60u); -#endif - if (psx_delay_BFC22E5C) { - psx_delay_BFC22E5C = 0; - if (psx_taken_BFC22E5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE74u); - goto label_BFC22E74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE64u); - } -label_BFC22E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22E64: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003AE6Cu; /* jal link before delay slot */ - psx_delay_BFC22E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AE68u); -#endif - if (psx_delay_BFC22E64) { - psx_delay_BFC22E64 = 0; - cpu->gpr[31] = 0x8003AE6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC22E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E6C: 10000004 beq $zero, $zero, 0xBFC22E80 */ - uint32_t psx_brA_BFC22E6C = cpu->gpr[0]; uint32_t psx_brB_BFC22E6C = cpu->gpr[0]; - psx_taken_BFC22E6C = (psx_brA_BFC22E6C == psx_brB_BFC22E6C); - psx_delay_BFC22E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22E70: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE70u); -#endif - if (psx_delay_BFC22E6C) { - psx_delay_BFC22E6C = 0; - if (psx_taken_BFC22E6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE80u); - goto label_BFC22E80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AE74u); - } -label_BFC22E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22E74: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003AE7Cu; /* jal link before delay slot */ - psx_delay_BFC22E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AE78u); -#endif - if (psx_delay_BFC22E74) { - psx_delay_BFC22E74 = 0; - cpu->gpr[31] = 0x8003AE7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC22E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC22E7C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE7Cu); -#endif -label_BFC22E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE80u); -#endif - /* 0xBFC22E80: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22E84: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC22E88: 03E00008 jr $ra */ - psx_delay_BFC22E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC22E8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003AE8Cu); -#endif - if (psx_delay_BFC22E88) { - psx_delay_BFC22E88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC22E90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC22E90u); - int psx_delay_BFC22F58 = 0; - int psx_taken_BFC22F58 = 0; - int psx_delay_BFC22FE4 = 0; - int psx_delay_BFC22FF0 = 0; - int psx_delay_BFC22FFC = 0; - int psx_taken_BFC22FFC = 0; - int psx_delay_BFC2300C = 0; - int psx_delay_BFC23018 = 0; - int psx_taken_BFC23018 = 0; - int psx_delay_BFC23034 = 0; - int psx_taken_BFC23034 = 0; - int psx_delay_BFC23068 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC22F60u: goto label_BFC22F60; - case 0xBFC22FC4u: goto label_BFC22FC4; - case 0xBFC22FECu: goto label_BFC22FEC; - case 0xBFC22FF8u: goto label_BFC22FF8; - case 0xBFC23004u: goto label_BFC23004; - case 0xBFC23008u: goto label_BFC23008; - case 0xBFC23014u: goto label_BFC23014; - case 0xBFC23020u: goto label_BFC23020; - case 0xBFC2303Cu: goto label_BFC2303C; - case 0xBFC23054u: goto label_BFC23054; - default: break; - } - } -label_BFC22E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC22E90: 27BDFF60 addiu $sp, $sp, -160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-160)); - PGXP_ALU(0x27BDFF60u, cpu->gpr[29], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC22E94: AFB70020 sw $s7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE94u); return; } g_debug_last_store_pc = 0x8003AE94u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70020u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC22E98: AFB50018 sw $s5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE98u); return; } g_debug_last_store_pc = 0x8003AE98u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC22E9C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AE9Cu); return; } g_debug_last_store_pc = 0x8003AE9Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC22EA0: AFB6001C sw $s6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEA0u); return; } g_debug_last_store_pc = 0x8003AEA0u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6001Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC22EA4: AFB30014 sw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEA4u); return; } g_debug_last_store_pc = 0x8003AEA4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EA8: AFA0006C sw $zero, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEA8u); return; } g_debug_last_store_pc = 0x8003AEA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0006Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EAC: AFA00080 sw $zero, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEACu); return; } g_debug_last_store_pc = 0x8003AEACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00080u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EB0: AFA00084 sw $zero, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEB0u); return; } g_debug_last_store_pc = 0x8003AEB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00084u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EB4: AFA00088 sw $zero, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEB4u); return; } g_debug_last_store_pc = 0x8003AEB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00088u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EB8: AFA0008C sw $zero, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEB8u); return; } g_debug_last_store_pc = 0x8003AEB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0008Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC22EBC: AFA00094 sw $zero, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEBCu); return; } g_debug_last_store_pc = 0x8003AEBCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00094u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC22EC0: 240E0140 addiu $t6, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x240E0140u, cpu->gpr[14], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC22EC4: AFAE0070 sw $t6, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEC4u); return; } g_debug_last_store_pc = 0x8003AEC4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0070u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC22EC8: 24180032 addiu $t8, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24180032u, cpu->gpr[24], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC22ECC: AFB80078 sw $t8, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AECCu); return; } g_debug_last_store_pc = 0x8003AECCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80078u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC22ED0: 00046900 sll $t5, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00046900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC22ED4: 240F0140 addiu $t7, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x240F0140u, cpu->gpr[15], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC22ED8: 24190032 addiu $t9, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24190032u, cpu->gpr[25], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC22EDC: 01A46823 subu $t5, $t5, $a0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[4]; - PGXP_ALU(0x01A46823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC22EE0: AFAF0074 sw $t7, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEE0u); return; } g_debug_last_store_pc = 0x8003AEE0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0074u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC22EE4: AFB9007C sw $t9, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AEE4u); return; } g_debug_last_store_pc = 0x8003AEE4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9007Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC22EE8: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC22EEC: 3C098004 lui $t1, 0x8004 */ - cpu->gpr[9] = 0x80040000u; - PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC22EF0: 3C0AF9F0 lui $t2, 0xF9F0 */ - cpu->gpr[10] = 0xF9F00000u; - PGXP_ALU(0x3C0AF9F0u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC22EF4: 000D6A40 sll $t5, $t5, 9 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 9u; - PGXP_ALU(0x000D6A40u, cpu->gpr[13], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22EF8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC22EFC: 00067240 sll $t6, $a2, 9 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 9u; - PGXP_ALU(0x00067240u, cpu->gpr[14], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC22F00: AFA80090 sw $t0, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF00u); return; } g_debug_last_store_pc = 0x8003AF00u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80090u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC22F04: 2529AB80 addiu $t1, $t1, -21632 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-21632)); - PGXP_ALU(0x2529AB80u, cpu->gpr[9], _pgx1, 0xFFFFAB80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC22F08: 354AF9F0 ori $t2, $t2, 0xF9F0 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] | 0xF9F0u; - PGXP_ALU(0x354AF9F0u, cpu->gpr[10], _pgx1, 0xF9F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC22F0C: 248B0003 addiu $t3, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); - PGXP_ALU(0x248B0003u, cpu->gpr[11], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1060u); -#endif - /* 0xBFC22F10: 00A66021 addu $t4, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[5] + cpu->gpr[6]; - PGXP_ALU(0x00A66021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC22F14: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC22F18: 2718FF68 addiu $t8, $t8, -152 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-152)); - PGXP_ALU(0x2718FF68u, cpu->gpr[24], _pgx1, 0xFFFFFF68u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC22F1C: 0004C880 sll $t9, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 2u; - PGXP_ALU(0x0004C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC22F20: AFA90098 sw $t1, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF20u); return; } g_debug_last_store_pc = 0x8003AF20u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90098u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC22F24: AFAA009C sw $t2, 156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF24u); return; } g_debug_last_store_pc = 0x8003AF24u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA009Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC22F28: AFAB0064 sw $t3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF28u); return; } g_debug_last_store_pc = 0x8003AF28u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0064u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC22F2C: AFAC0068 sw $t4, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF2Cu); return; } g_debug_last_store_pc = 0x8003AF2Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0068u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1808000u); -#endif - /* 0xBFC22F30: 01F8B821 addu $s7, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[23] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC22F34: 0324C821 addu $t9, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[4]; - PGXP_ALU(0x0324C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC22F38: 3C08800F lui $t0, 0x800F */ - cpu->gpr[8] = 0x800F0000u; - PGXP_ALU(0x3C08800Fu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC22F3C: 25080E80 addiu $t0, $t0, 3712 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (3712)); - PGXP_ALU(0x25080E80u, cpu->gpr[8], _pgx1, 0x00000E80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC22F40: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF40u); -#endif - /* 0xBFC22F44: 82F30002 lb $s3, 2($s7) */ - { uint32_t _pgxa = cpu->gpr[23] + 2; cpu->gpr[19] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[23] + (2)), 19, 0x800000u); - PGXP_LOAD(0x82F30002u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF44u); -#endif - /* 0xBFC22F48: 82E90003 lb $t1, 3($s7) */ - { uint32_t _pgxa = cpu->gpr[23] + 3; cpu->gpr[9] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[23] + (3)), 9, 0x800000u); - PGXP_LOAD(0x82E90003u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200100u); -#endif - /* 0xBFC22F4C: 0328A821 addu $s5, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[21] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x0328A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF50u); -#endif - /* 0xBFC22F50: 8EA20008 lw $v0, 8($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200000u); } - PGXP_LOAD(0x8EA20008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC22F54: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC22F58: 1920003E blez $t1, 0xBFC23054 */ - uint32_t psx_brA_BFC22F58 = cpu->gpr[9]; - psx_taken_BFC22F58 = ((int32_t)psx_brA_BFC22F58 <= 0); - psx_delay_BFC22F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC22F5C: 2673FFF0 addiu $s3, $s3, -16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-16)); - PGXP_ALU(0x2673FFF0u, cpu->gpr[19], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF5Cu); -#endif - if (psx_delay_BFC22F58) { - psx_delay_BFC22F58 = 0; - if (psx_taken_BFC22F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B054u); - goto label_BFC23054; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AF60u); - } -label_BFC22F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC22F60: 00045080 sll $t2, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00045080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC22F64: 01445021 addu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[4]; - PGXP_ALU(0x01445021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC22F68: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC22F6C: 01445023 subu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[4]; - PGXP_ALU(0x01445023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC22F70: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC22F74: 000258C0 sll $t3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000258C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC22F78: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF78u); return; } g_debug_last_store_pc = 0x8003AF78u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC22F7C: 01625823 subu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01625823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC22F80: 01445023 subu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[4]; - PGXP_ALU(0x01445023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC22F84: 00047100 sll $t6, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC22F88: AFBE0028 sw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AF88u); return; } g_debug_last_store_pc = 0x8003AF88u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC22F8C: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC22F90: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC22F94: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC22F98: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22F9C: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003AF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC22FA0: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFA0u); return; } g_debug_last_store_pc = 0x8003AFA0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC22FA4: 25EF6BC4 addiu $t7, $t7, 27588 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (27588)); - PGXP_ALU(0x25EF6BC4u, cpu->gpr[15], _pgx1, 0x00006BC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC22FA8: 25ADE720 addiu $t5, $t5, -6368 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-6368)); - PGXP_ALU(0x25ADE720u, cpu->gpr[13], _pgx1, 0xFFFFE720u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC22FAC: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC22FB0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC22FB4: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFB4u); return; } g_debug_last_store_pc = 0x8003AFB4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000C000u); -#endif - /* 0xBFC22FB8: 01CFF021 addu $fp, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[30] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFF021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103000u); -#endif - /* 0xBFC22FBC: 018DA021 addu $s4, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[20] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018DA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC22FC0: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFC0u); return; } g_debug_last_store_pc = 0x8003AFC0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFC0u); -#endif -label_BFC22FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFC4u); -#endif - /* 0xBFC22FC4: 8EB80000 lw $t8, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFC4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x200000u); } - PGXP_LOAD(0x8EB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC22FC8: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC22FCC: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000004u); -#endif - /* 0xBFC22FD0: 03D91021 addu $v0, $fp, $t9 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[30] + cpu->gpr[25]; - PGXP_ALU(0x03D91021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFD0u); -#endif - /* 0xBFC22FD4: 84450000 lh $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFD4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x84450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFD4u); -#endif - /* 0xBFC22FD8: 84460002 lh $a2, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003AFD8u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x84460002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC22FDC: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC22FE0: 24A50019 addiu $a1, $a1, 25 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (25)); - PGXP_ALU(0x24A50019u, cpu->gpr[5], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22FE4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003AFECu; /* jal link before delay slot */ - psx_delay_BFC22FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC22FE8: 24C60019 addiu $a2, $a2, 25 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (25)); - PGXP_ALU(0x24C60019u, cpu->gpr[6], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFE8u); -#endif - if (psx_delay_BFC22FE4) { - psx_delay_BFC22FE4 = 0; - cpu->gpr[31] = 0x8003AFECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC22FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC22FEC: 27A40064 addiu $a0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A40064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC22FF0: 0C0113D5 jal 0xB0044F54 */ - cpu->gpr[31] = 0x8003AFF8u; /* jal link before delay slot */ - psx_delay_BFC22FF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC22FF4: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFF4u); -#endif - if (psx_delay_BFC22FF0) { - psx_delay_BFC22FF0 = 0; - cpu->gpr[31] = 0x8003AFF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F54u); - cpu->pc = 0x80044F54u; return; - } -label_BFC22FF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC22FF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC22FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003AFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC22FF8: 2A610002 slti $at, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (2) ? 1 : 0); - PGXP_ALU(0x2A610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003AFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC22FFC: 14200008 bne $at, $zero, 0xBFC23020 */ - uint32_t psx_brA_BFC22FFC = cpu->gpr[1]; uint32_t psx_brB_BFC22FFC = cpu->gpr[0]; - psx_taken_BFC22FFC = (psx_brA_BFC22FFC != psx_brB_BFC22FFC); - psx_delay_BFC22FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC23000: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B000u); -#endif - if (psx_delay_BFC22FFC) { - psx_delay_BFC22FFC = 0; - if (psx_taken_BFC22FFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B020u); - goto label_BFC23020; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B004u); - } -label_BFC23004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC23004: 26900070 addiu $s0, $s4, 112 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[20] + (112)); - PGXP_ALU(0x26900070u, cpu->gpr[16], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B004u); -#endif -label_BFC23008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC23008: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2300C: 0C011AA5 jal 0xB0046A94 */ - cpu->gpr[31] = 0x8003B014u; /* jal link before delay slot */ - psx_delay_BFC2300C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC23010: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B010u); -#endif - if (psx_delay_BFC2300C) { - psx_delay_BFC2300C = 0; - cpu->gpr[31] = 0x8003B014u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A94u); - cpu->pc = 0x80046A94u; return; - } -label_BFC23014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC23014: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC23018: 1633FFFB bne $s1, $s3, 0xBFC23008 */ - uint32_t psx_brA_BFC23018 = cpu->gpr[17]; uint32_t psx_brB_BFC23018 = cpu->gpr[19]; - psx_taken_BFC23018 = (psx_brA_BFC23018 != psx_brB_BFC23018); - psx_delay_BFC23018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2301C: 26100070 addiu $s0, $s0, 112 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (112)); - PGXP_ALU(0x26100070u, cpu->gpr[16], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B01Cu); -#endif - if (psx_delay_BFC23018) { - psx_delay_BFC23018 = 0; - if (psx_taken_BFC23018) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B008u); - goto label_BFC23008; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B020u); - } -label_BFC23020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B020u); -#endif - /* 0xBFC23020: 8EA80000 lw $t0, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B020u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x200000u); } - PGXP_LOAD(0x8EA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B020u); -#endif - /* 0xBFC23024: 82EA0003 lb $t2, 3($s7) */ - { uint32_t _pgxa = cpu->gpr[23] + 3; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[23] + (3)), 10, 0x800000u); - PGXP_LOAD(0x82EA0003u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC23028: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2302C: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400402u); -#endif - /* 0xBFC23030: 02CA082A slt $at, $s6, $t2 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x02CA082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23034: 1420FFE3 bne $at, $zero, 0xBFC22FC4 */ - uint32_t psx_brA_BFC23034 = cpu->gpr[1]; uint32_t psx_brB_BFC23034 = cpu->gpr[0]; - psx_taken_BFC23034 = (psx_brA_BFC23034 != psx_brB_BFC23034); - psx_delay_BFC23034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200200u); -#endif - /* 0xBFC23038: AEA90000 sw $t1, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B038u); return; } g_debug_last_store_pc = 0x8003B038u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAEA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B038u); -#endif - if (psx_delay_BFC23034) { - psx_delay_BFC23034 = 0; - if (psx_taken_BFC23034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003AFC4u); - goto label_BFC22FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B03Cu); - } -label_BFC2303C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2303Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2303Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B03Cu); -#endif - /* 0xBFC2303C: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B03Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B040u); -#endif - /* 0xBFC23040: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B040u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B040u); -#endif - /* 0xBFC23044: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B044u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B044u); -#endif - /* 0xBFC23048: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B048u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B048u); -#endif - /* 0xBFC2304C: 8FBE0028 lw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B04Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B050u); -#endif -label_BFC23054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B054u); -#endif - /* 0xBFC23054: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B054u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B054u); -#endif - /* 0xBFC23058: 8FB30014 lw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B058u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B058u); -#endif - /* 0xBFC2305C: 8FB50018 lw $s5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B05Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50018u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B060u); -#endif - /* 0xBFC23060: 8FB6001C lw $s6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B060u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6001Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B060u); -#endif - /* 0xBFC23064: 8FB70020 lw $s7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B064u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70020u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC23068: 03E00008 jr $ra */ - psx_delay_BFC23068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2306C: 27BD00A0 addiu $sp, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27BD00A0u, cpu->gpr[29], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B06Cu); -#endif - if (psx_delay_BFC23068) { - psx_delay_BFC23068 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC23078(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC23078u); - int psx_delay_BFC23098 = 0; - int psx_delay_BFC230A4 = 0; - int psx_taken_BFC230A4 = 0; - int psx_delay_BFC230BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC23098u: goto label_BFC23098; - case 0xBFC230A0u: goto label_BFC230A0; - case 0xBFC230ACu: goto label_BFC230AC; - default: break; - } - } -label_BFC23078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23078: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2307C: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B07Cu); return; } g_debug_last_store_pc = 0x8003B07Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC23080: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B080u); return; } g_debug_last_store_pc = 0x8003B080u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC23084: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B084u); return; } g_debug_last_store_pc = 0x8003B084u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC23088: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2308C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B08Cu); return; } g_debug_last_store_pc = 0x8003B08Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC23090: 2411000F addiu $s1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2411000Fu, cpu->gpr[17], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC23094: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B094u); -#endif -label_BFC23098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23098: 0C011429 jal 0xB00450A4 */ - cpu->gpr[31] = 0x8003B0A0u; /* jal link before delay slot */ - psx_delay_BFC23098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50010u); -#endif - /* 0xBFC2309C: 02502021 addu $a0, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[16]; - PGXP_ALU(0x02502021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B09Cu); -#endif - if (psx_delay_BFC23098) { - psx_delay_BFC23098 = 0; - cpu->gpr[31] = 0x8003B0A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450A4u); - cpu->pc = 0x800450A4u; return; - } -label_BFC230A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC230A0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC230A4: 1611FFFC bne $s0, $s1, 0xBFC23098 */ - uint32_t psx_brA_BFC230A4 = cpu->gpr[16]; uint32_t psx_brB_BFC230A4 = cpu->gpr[17]; - psx_taken_BFC230A4 = (psx_brA_BFC230A4 != psx_brB_BFC230A4); - psx_delay_BFC230A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC230A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B0A8u); -#endif - if (psx_delay_BFC230A4) { - psx_delay_BFC230A4 = 0; - if (psx_taken_BFC230A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B098u); - goto label_BFC23098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0ACu); - } -label_BFC230AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0ACu); -#endif - /* 0xBFC230AC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0B0u); -#endif - /* 0xBFC230B0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0B0u); -#endif - /* 0xBFC230B4: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0B4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0B4u); -#endif - /* 0xBFC230B8: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0B8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC230BC: 03E00008 jr $ra */ - psx_delay_BFC230BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC230C0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0C0u); -#endif - if (psx_delay_BFC230BC) { - psx_delay_BFC230BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC230C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC230C4u); - int psx_delay_BFC230D0 = 0; - int psx_taken_BFC230D0 = 0; - int psx_delay_BFC230D8 = 0; - int psx_taken_BFC230D8 = 0; - int psx_delay_BFC230E8 = 0; - int psx_taken_BFC230E8 = 0; - int psx_delay_BFC230F0 = 0; - int psx_delay_BFC23100 = 0; - int psx_taken_BFC23100 = 0; - int psx_delay_BFC23114 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC230D8u: goto label_BFC230D8; - case 0xBFC230E0u: goto label_BFC230E0; - case 0xBFC230E4u: goto label_BFC230E4; - case 0xBFC230F0u: goto label_BFC230F0; - case 0xBFC230F8u: goto label_BFC230F8; - case 0xBFC23108u: goto label_BFC23108; - default: break; - } - } -label_BFC230C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC230C4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC230C8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0C8u); return; } g_debug_last_store_pc = 0x8003B0C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC230CC: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0CCu); return; } g_debug_last_store_pc = 0x8003B0CCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC230D0: 14800003 bne $a0, $zero, 0xBFC230E0 */ - uint32_t psx_brA_BFC230D0 = cpu->gpr[4]; uint32_t psx_brB_BFC230D0 = cpu->gpr[0]; - psx_taken_BFC230D0 = (psx_brA_BFC230D0 != psx_brB_BFC230D0); - psx_delay_BFC230D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC230D4: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B0D4u); return; } g_debug_last_store_pc = 0x8003B0D4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0D4u); -#endif - if (psx_delay_BFC230D0) { - psx_delay_BFC230D0 = 0; - if (psx_taken_BFC230D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0E0u); - goto label_BFC230E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0D8u); - } -label_BFC230D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC230D8: 10000002 beq $zero, $zero, 0xBFC230E4 */ - uint32_t psx_brA_BFC230D8 = cpu->gpr[0]; uint32_t psx_brB_BFC230D8 = cpu->gpr[0]; - psx_taken_BFC230D8 = (psx_brA_BFC230D8 == psx_brB_BFC230D8); - psx_delay_BFC230D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC230DC: 2411002D addiu $s1, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2411002Du, cpu->gpr[17], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0DCu); -#endif - if (psx_delay_BFC230D8) { - psx_delay_BFC230D8 = 0; - if (psx_taken_BFC230D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0E4u); - goto label_BFC230E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0E0u); - } -label_BFC230E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC230E0: 2411004B addiu $s1, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2411004Bu, cpu->gpr[17], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0E0u); -#endif -label_BFC230E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20022u); -#endif - /* 0xBFC230E4: 00B1082A slt $at, $a1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x00B1082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC230E8: 10200007 beq $at, $zero, 0xBFC23108 */ - uint32_t psx_brA_BFC230E8 = cpu->gpr[1]; uint32_t psx_brB_BFC230E8 = cpu->gpr[0]; - psx_taken_BFC230E8 = (psx_brA_BFC230E8 == psx_brB_BFC230E8); - psx_delay_BFC230E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC230EC: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0ECu); -#endif - if (psx_delay_BFC230E8) { - psx_delay_BFC230E8 = 0; - if (psx_taken_BFC230E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B108u); - goto label_BFC23108; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0F0u); - } -label_BFC230F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC230F0: 0C011429 jal 0xB00450A4 */ - cpu->gpr[31] = 0x8003B0F8u; /* jal link before delay slot */ - psx_delay_BFC230F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC230F4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0F4u); -#endif - if (psx_delay_BFC230F0) { - psx_delay_BFC230F0 = 0; - cpu->gpr[31] = 0x8003B0F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450A4u); - cpu->pc = 0x800450A4u; return; - } -label_BFC230F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC230F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC230F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC230F8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC230FC: 0211082A slt $at, $s0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0211082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23100: 1420FFFB bne $at, $zero, 0xBFC230F0 */ - uint32_t psx_brA_BFC23100 = cpu->gpr[1]; uint32_t psx_brB_BFC23100 = cpu->gpr[0]; - psx_taken_BFC23100 = (psx_brA_BFC23100 != psx_brB_BFC23100); - psx_delay_BFC23100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B104u); -#endif - if (psx_delay_BFC23100) { - psx_delay_BFC23100 = 0; - if (psx_taken_BFC23100) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0F0u); - goto label_BFC230F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B108u); - } -label_BFC23108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B108u); -#endif - /* 0xBFC23108: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B108u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B108u); -#endif - /* 0xBFC2310C: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B10Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B110u); -#endif - /* 0xBFC23110: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B110u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC23114: 03E00008 jr $ra */ - psx_delay_BFC23114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23118: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B118u); -#endif - if (psx_delay_BFC23114) { - psx_delay_BFC23114 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2311C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2311Cu); - int psx_delay_BFC23174 = 0; - int psx_delay_BFC2317C = 0; - int psx_taken_BFC2317C = 0; - int psx_delay_BFC23184 = 0; - int psx_taken_BFC23184 = 0; - int psx_delay_BFC231D4 = 0; - int psx_delay_BFC231E8 = 0; - int psx_taken_BFC231E8 = 0; - int psx_delay_BFC23214 = 0; - int psx_delay_BFC2321C = 0; - int psx_taken_BFC2321C = 0; - int psx_delay_BFC23228 = 0; - int psx_taken_BFC23228 = 0; - int psx_delay_BFC23244 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC23170u: goto label_BFC23170; - case 0xBFC2317Cu: goto label_BFC2317C; - case 0xBFC23184u: goto label_BFC23184; - case 0xBFC2318Cu: goto label_BFC2318C; - case 0xBFC231CCu: goto label_BFC231CC; - case 0xBFC231DCu: goto label_BFC231DC; - case 0xBFC231F0u: goto label_BFC231F0; - case 0xBFC2321Cu: goto label_BFC2321C; - case 0xBFC23224u: goto label_BFC23224; - case 0xBFC23230u: goto label_BFC23230; - case 0xBFC23234u: goto label_BFC23234; - default: break; - } - } -label_BFC2311C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2311Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2311C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23120: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B120u); return; } g_debug_last_store_pc = 0x8003B120u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B120u); -#endif - /* 0xBFC23124: 8FAE0030 lw $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B124u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC23128: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B128u); return; } g_debug_last_store_pc = 0x8003B128u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2312C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC23130: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23134: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC23138: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2313C: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B13Cu); return; } g_debug_last_store_pc = 0x8003B13Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23140: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23144: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC23148: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B148u); return; } g_debug_last_store_pc = 0x8003B148u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2314C: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B14Cu); return; } g_debug_last_store_pc = 0x8003B14Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23150: 2739DBBC addiu $t9, $t9, -9284 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-9284)); - PGXP_ALU(0x2739DBBCu, cpu->gpr[25], _pgx1, 0xFFFFDBBCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC23154: 25F8005C addiu $t8, $t7, 92 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (92)); - PGXP_ALU(0x25F8005Cu, cpu->gpr[24], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC23158: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2315C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B15Cu); return; } g_debug_last_store_pc = 0x8003B15Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC23160: 2652A188 addiu $s2, $s2, -24184 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-24184)); - PGXP_ALU(0x2652A188u, cpu->gpr[18], _pgx1, 0xFFFFA188u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC23164: 03198021 addu $s0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03198021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC23168: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2316C: 24130010 addiu $s3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24130010u, cpu->gpr[19], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B16Cu); -#endif -label_BFC23170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC23170: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23174: 0C016A40 jal 0xB005A900 */ - cpu->gpr[31] = 0x8003B17Cu; /* jal link before delay slot */ - psx_delay_BFC23174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC23178: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B178u); -#endif - if (psx_delay_BFC23174) { - psx_delay_BFC23174 = 0; - cpu->gpr[31] = 0x8003B17Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A900u); - cpu->pc = 0x8005A900u; return; - } -label_BFC2317C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2317Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2317C: 14400029 bne $v0, $zero, 0xBFC23224 */ - uint32_t psx_brA_BFC2317C = cpu->gpr[2]; uint32_t psx_brB_BFC2317C = cpu->gpr[0]; - psx_taken_BFC2317C = (psx_brA_BFC2317C != psx_brB_BFC2317C); - psx_delay_BFC2317C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC23180: 2A21000F slti $at, $s1, 15 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (15) ? 1 : 0); - PGXP_ALU(0x2A21000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B180u); -#endif - if (psx_delay_BFC2317C) { - psx_delay_BFC2317C = 0; - if (psx_taken_BFC2317C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B224u); - goto label_BFC23224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B184u); - } -label_BFC23184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23184: 1020001A beq $at, $zero, 0xBFC231F0 */ - uint32_t psx_brA_BFC23184 = cpu->gpr[1]; uint32_t psx_brB_BFC23184 = cpu->gpr[0]; - psx_taken_BFC23184 = (psx_brA_BFC23184 == psx_brB_BFC23184); - psx_delay_BFC23184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60001u); -#endif - /* 0xBFC23188: 02209021 addu $s2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02209021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B188u); -#endif - if (psx_delay_BFC23184) { - psx_delay_BFC23184 = 0; - if (psx_taken_BFC23184) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B1F0u); - goto label_BFC231F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B18Cu); - } -label_BFC2318C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2318Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2318Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B18Cu); -#endif - /* 0xBFC2318C: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B18Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC23190: 00125080 sll $t2, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00125080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC23194: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC23198: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2319C: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC231A0: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC231A4: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC231A8: 01525023 subu $t2, $t2, $s2 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[18]; - PGXP_ALU(0x01525023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC231AC: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC231B0: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC231B4: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC231B8: 3C0C800F lui $t4, 0x800F */ - cpu->gpr[12] = 0x800F0000u; - PGXP_ALU(0x3C0C800Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC231BC: 258CDBA0 addiu $t4, $t4, -9312 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-9312)); - PGXP_ALU(0x258CDBA0u, cpu->gpr[12], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC231C0: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC231C4: 016C8021 addu $s0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC231C8: 2611005C addiu $s1, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2611005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1C8u); -#endif -label_BFC231CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC231CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC231CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC231CC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC231D0: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC231D4: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003B1DCu; /* jal link before delay slot */ - psx_delay_BFC231D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC231D8: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1D8u); -#endif - if (psx_delay_BFC231D4) { - psx_delay_BFC231D4 = 0; - cpu->gpr[31] = 0x8003B1DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC231DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC231DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC231DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC231DC: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC231E0: 2A41000F slti $at, $s2, 15 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0); - PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC231E4: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC231E8: 1420FFF8 bne $at, $zero, 0xBFC231CC */ - uint32_t psx_brA_BFC231E8 = cpu->gpr[1]; uint32_t psx_brB_BFC231E8 = cpu->gpr[0]; - psx_taken_BFC231E8 = (psx_brA_BFC231E8 != psx_brB_BFC231E8); - psx_delay_BFC231E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC231EC: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1ECu); -#endif - if (psx_delay_BFC231E8) { - psx_delay_BFC231E8 = 0; - if (psx_taken_BFC231E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B1CCu); - goto label_BFC231CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B1F0u); - } -label_BFC231F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC231F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC231F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B1F0u); -#endif - /* 0xBFC231F0: 8FAD0030 lw $t5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B1F0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0030u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC231F4: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC231F8: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC231FC: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23200: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC23204: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23208: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2320C: 25EFE104 addiu $t7, $t7, -7932 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-7932)); - PGXP_ALU(0x25EFE104u, cpu->gpr[15], _pgx1, 0xFFFFE104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC23210: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23214: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003B21Cu; /* jal link before delay slot */ - psx_delay_BFC23214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23218: 2405005C addiu $a1, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2405005Cu, cpu->gpr[5], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B218u); -#endif - if (psx_delay_BFC23214) { - psx_delay_BFC23214 = 0; - cpu->gpr[31] = 0x8003B21Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2321C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2321Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2321Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2321C: 10000005 beq $zero, $zero, 0xBFC23234 */ - uint32_t psx_brA_BFC2321C = cpu->gpr[0]; uint32_t psx_brB_BFC2321C = cpu->gpr[0]; - psx_taken_BFC2321C = (psx_brA_BFC2321C == psx_brB_BFC2321C); - psx_delay_BFC2321C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B220u); -#endif - /* 0xBFC23220: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B220u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B220u); -#endif - if (psx_delay_BFC2321C) { - psx_delay_BFC2321C = 0; - if (psx_taken_BFC2321C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B234u); - goto label_BFC23234; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B224u); - } -label_BFC23224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC23224: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC23228: 1633FFD1 bne $s1, $s3, 0xBFC23170 */ - uint32_t psx_brA_BFC23228 = cpu->gpr[17]; uint32_t psx_brB_BFC23228 = cpu->gpr[19]; - psx_taken_BFC23228 = (psx_brA_BFC23228 != psx_brB_BFC23228); - psx_delay_BFC23228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2322C: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B22Cu); -#endif - if (psx_delay_BFC23228) { - psx_delay_BFC23228 = 0; - if (psx_taken_BFC23228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B170u); - goto label_BFC23170; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B230u); - } -label_BFC23230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B230u); -#endif - /* 0xBFC23230: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B230u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B230u); -#endif -label_BFC23234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B234u); -#endif - /* 0xBFC23234: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B234u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B234u); -#endif - /* 0xBFC23238: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B238u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B238u); -#endif - /* 0xBFC2323C: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B23Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B240u); -#endif - /* 0xBFC23240: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B240u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC23244: 03E00008 jr $ra */ - psx_delay_BFC23244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23248: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B248u); -#endif - if (psx_delay_BFC23244) { - psx_delay_BFC23244 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2324C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2324Cu); - int psx_delay_BFC23298 = 0; - int psx_delay_BFC232A0 = 0; - int psx_taken_BFC232A0 = 0; - int psx_delay_BFC232A8 = 0; - int psx_taken_BFC232A8 = 0; - int psx_delay_BFC232B4 = 0; - int psx_taken_BFC232B4 = 0; - int psx_delay_BFC232D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC23294u: goto label_BFC23294; - case 0xBFC232A0u: goto label_BFC232A0; - case 0xBFC232A8u: goto label_BFC232A8; - case 0xBFC232B0u: goto label_BFC232B0; - case 0xBFC232B4u: goto label_BFC232B4; - case 0xBFC232BCu: goto label_BFC232BC; - case 0xBFC232C0u: goto label_BFC232C0; - default: break; - } - } -label_BFC2324C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2324Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2324C: 00057080 sll $t6, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00057080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23250: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC23254: 01C57023 subu $t6, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[5]; - PGXP_ALU(0x01C57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23258: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2325C: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B25Cu); return; } g_debug_last_store_pc = 0x8003B25Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC23260: 01C57023 subu $t6, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[5]; - PGXP_ALU(0x01C57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC23264: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B264u); return; } g_debug_last_store_pc = 0x8003B264u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23268: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2326C: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC23270: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B270u); return; } g_debug_last_store_pc = 0x8003B270u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC23274: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B274u); return; } g_debug_last_store_pc = 0x8003B274u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23278: 2718DBBC addiu $t8, $t8, -9284 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-9284)); - PGXP_ALU(0x2718DBBCu, cpu->gpr[24], _pgx1, 0xFFFFDBBCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2327C: 25CF005C addiu $t7, $t6, 92 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (92)); - PGXP_ALU(0x25CF005Cu, cpu->gpr[15], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC23280: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC23284: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B284u); return; } g_debug_last_store_pc = 0x8003B284u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC23288: 01F88821 addu $s1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2328C: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC23290: 24120010 addiu $s2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24120010u, cpu->gpr[18], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B290u); -#endif -label_BFC23294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC23294: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23298: 0C016A40 jal 0xB005A900 */ - cpu->gpr[31] = 0x8003B2A0u; /* jal link before delay slot */ - psx_delay_BFC23298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2329C: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B29Cu); -#endif - if (psx_delay_BFC23298) { - psx_delay_BFC23298 = 0; - cpu->gpr[31] = 0x8003B2A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A900u); - cpu->pc = 0x8005A900u; return; - } -label_BFC232A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC232A0: 14400004 bne $v0, $zero, 0xBFC232B4 */ - uint32_t psx_brA_BFC232A0 = cpu->gpr[2]; uint32_t psx_brB_BFC232A0 = cpu->gpr[0]; - psx_taken_BFC232A0 = (psx_brA_BFC232A0 != psx_brB_BFC232A0); - psx_delay_BFC232A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC232A4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2A4u); -#endif - if (psx_delay_BFC232A0) { - psx_delay_BFC232A0 = 0; - if (psx_taken_BFC232A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2B4u); - goto label_BFC232B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2A8u); - } -label_BFC232A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC232A8: 10000005 beq $zero, $zero, 0xBFC232C0 */ - uint32_t psx_brA_BFC232A8 = cpu->gpr[0]; uint32_t psx_brB_BFC232A8 = cpu->gpr[0]; - psx_taken_BFC232A8 = (psx_brA_BFC232A8 == psx_brB_BFC232A8); - psx_delay_BFC232A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC232AC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2ACu); -#endif - if (psx_delay_BFC232A8) { - psx_delay_BFC232A8 = 0; - if (psx_taken_BFC232A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2C0u); - goto label_BFC232C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2B0u); - } -label_BFC232B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC232B0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2B0u); -#endif -label_BFC232B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC232B4: 1612FFF7 bne $s0, $s2, 0xBFC23294 */ - uint32_t psx_brA_BFC232B4 = cpu->gpr[16]; uint32_t psx_brB_BFC232B4 = cpu->gpr[18]; - psx_taken_BFC232B4 = (psx_brA_BFC232B4 != psx_brB_BFC232B4); - psx_delay_BFC232B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC232B8: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2B8u); -#endif - if (psx_delay_BFC232B4) { - psx_delay_BFC232B4 = 0; - if (psx_taken_BFC232B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B294u); - goto label_BFC23294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B2BCu); - } -label_BFC232BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC232BC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2BCu); -#endif -label_BFC232C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2C0u); -#endif - /* 0xBFC232C0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2C0u); -#endif - /* 0xBFC232C4: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2C4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2C4u); -#endif - /* 0xBFC232C8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2C8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2C8u); -#endif - /* 0xBFC232CC: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2CCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2D0u); -#endif - /* 0xBFC232D0: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2D0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC232D4: 03E00008 jr $ra */ - psx_delay_BFC232D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC232D8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2D8u); -#endif - if (psx_delay_BFC232D4) { - psx_delay_BFC232D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC232DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC232DCu); - int psx_delay_BFC232F4 = 0; - int psx_delay_BFC23324 = 0; - int psx_delay_BFC2333C = 0; - int psx_taken_BFC2333C = 0; - int psx_delay_BFC23358 = 0; - int psx_delay_BFC23374 = 0; - int psx_delay_BFC233B8 = 0; - int psx_delay_BFC23404 = 0; - int psx_delay_BFC23448 = 0; - int psx_delay_BFC23488 = 0; - int psx_delay_BFC234C8 = 0; - int psx_delay_BFC234F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC232FCu: goto label_BFC232FC; - case 0xBFC2332Cu: goto label_BFC2332C; - case 0xBFC23344u: goto label_BFC23344; - case 0xBFC23360u: goto label_BFC23360; - case 0xBFC2337Cu: goto label_BFC2337C; - case 0xBFC233C0u: goto label_BFC233C0; - case 0xBFC2340Cu: goto label_BFC2340C; - case 0xBFC23450u: goto label_BFC23450; - case 0xBFC23490u: goto label_BFC23490; - case 0xBFC234D0u: goto label_BFC234D0; - case 0xBFC234E0u: goto label_BFC234E0; - default: break; - } - } -label_BFC232DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC232DC: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC232E0: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2E0u); return; } g_debug_last_store_pc = 0x8003B2E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC232E4: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2E4u); return; } g_debug_last_store_pc = 0x8003B2E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC232E8: AFA50044 sw $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2E8u); return; } g_debug_last_store_pc = 0x8003B2E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2E8u); -#endif - /* 0xBFC232EC: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2ECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC232F0: AFA60048 sw $a2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2F0u); return; } g_debug_last_store_pc = 0x8003B2F0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC232F4: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003B2FCu; /* jal link before delay slot */ - psx_delay_BFC232F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC232F8: 34058040 ori $a1, $zero, 0x8040 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8040u; - PGXP_ALU(0x34058040u, cpu->gpr[5], _pgx1, 0x8040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2F8u); -#endif - if (psx_delay_BFC232F4) { - psx_delay_BFC232F4 = 0; - cpu->gpr[31] = 0x8003B2FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC232FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC232FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC232FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC232FC: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B2FCu); return; } g_debug_last_store_pc = 0x8003B2FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC23300: AFA00014 sw $zero, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B300u); return; } g_debug_last_store_pc = 0x8003B300u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B300u); -#endif - /* 0xBFC23304: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B304u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B304u); -#endif - /* 0xBFC23308: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B308u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2330C: 340EFFFF ori $t6, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC23310: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC23314: AFAF0020 sw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B314u); return; } g_debug_last_store_pc = 0x8003B314u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC23318: AFAE0018 sw $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B318u); return; } g_debug_last_store_pc = 0x8003B318u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2331C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC23320: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23324: 0C010938 jal 0xB00424E0 */ - cpu->gpr[31] = 0x8003B32Cu; /* jal link before delay slot */ - psx_delay_BFC23324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC23328: AFA0001C sw $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B328u); return; } g_debug_last_store_pc = 0x8003B328u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B328u); -#endif - if (psx_delay_BFC23324) { - psx_delay_BFC23324 = 0; - cpu->gpr[31] = 0x8003B32Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800424E0u); - cpu->pc = 0x800424E0u; return; - } -label_BFC2332C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2332Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2332C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B330u); -#endif - /* 0xBFC23330: 8063A8A8 lb $v1, -22360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -22360; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-22360)), 3, 0x8u); - PGXP_LOAD(0x8063A8A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23334: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23338: 28610002 slti $at, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (2) ? 1 : 0); - PGXP_ALU(0x28610002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2333C: 10200068 beq $at, $zero, 0xBFC234E0 */ - uint32_t psx_brA_BFC2333C = cpu->gpr[1]; uint32_t psx_brB_BFC2333C = cpu->gpr[0]; - psx_taken_BFC2333C = (psx_brA_BFC2333C == psx_brB_BFC2333C); - psx_delay_BFC2333C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC23340: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B340u); -#endif - if (psx_delay_BFC2333C) { - psx_delay_BFC2333C = 0; - if (psx_taken_BFC2333C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B4E0u); - goto label_BFC234E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B344u); - } -label_BFC23344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23344: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23348: 27390EA8 addiu $t9, $t9, 3752 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (3752)); - PGXP_ALU(0x27390EA8u, cpu->gpr[25], _pgx1, 0x00000EA8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2334C: 0003C0C0 sll $t8, $v1, 3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 3u; - PGXP_ALU(0x0003C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23350: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23354: A023A8A8 sb $v1, -22360($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22360; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003B354u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22360)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023A8A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23358: 0C012771 jal 0xB0049DC4 */ - cpu->gpr[31] = 0x8003B360u; /* jal link before delay slot */ - psx_delay_BFC23358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC2335C: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B35Cu); -#endif - if (psx_delay_BFC23358) { - psx_delay_BFC23358 = 0; - cpu->gpr[31] = 0x8003B360u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DC4u); - cpu->pc = 0x80049DC4u; return; - } -label_BFC23360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC23360: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B360u); -#endif - /* 0xBFC23364: 8108A8A8 lb $t0, -22360($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -22360; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-22360)), 8, 0x100u); - PGXP_LOAD(0x8108A8A8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC23368: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2336C: 254A0EB8 addiu $t2, $t2, 3768 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (3768)); - PGXP_ALU(0x254A0EB8u, cpu->gpr[10], _pgx1, 0x00000EB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC23370: 000848C0 sll $t1, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000848C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23374: 0C012771 jal 0xB0049DC4 */ - cpu->gpr[31] = 0x8003B37Cu; /* jal link before delay slot */ - psx_delay_BFC23374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC23378: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B378u); -#endif - if (psx_delay_BFC23374) { - psx_delay_BFC23374 = 0; - cpu->gpr[31] = 0x8003B37Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DC4u); - cpu->pc = 0x80049DC4u; return; - } -label_BFC2337C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2337Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2337C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23380: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B380u); -#endif - /* 0xBFC23384: 81ADA8A8 lb $t5, -22360($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -22360; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-22360)), 13, 0x2000u); - PGXP_LOAD(0x81ADA8A8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B384u); -#endif - /* 0xBFC23388: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B388u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2338C: 000D70C0 sll $t6, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC23390: 000B60C0 sll $t4, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC23394: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC23398: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2339C: 000C6180 sll $t4, $t4, 6 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 6u; - PGXP_ALU(0x000C6180u, cpu->gpr[12], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC233A0: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC233A4: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC233A8: 2718A528 addiu $t8, $t8, -23256 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-23256)); - PGXP_ALU(0x2718A528u, cpu->gpr[24], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC233AC: 018E7821 addu $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3B0u); -#endif - /* 0xBFC233B0: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B3B0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC233B4: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC233B8: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003B3C0u; /* jal link before delay slot */ - psx_delay_BFC233B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC233BC: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3BCu); -#endif - if (psx_delay_BFC233B8) { - psx_delay_BFC233B8 = 0; - cpu->gpr[31] = 0x8003B3C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC233C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC233C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC233C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC233C0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC233C4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B3C4u); -#endif - /* 0xBFC233C8: 8129A8A8 lb $t1, -22360($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -22360; cpu->gpr[9] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-22360)), 9, 0x200u); - PGXP_LOAD(0x8129A8A8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3C8u); -#endif - /* 0xBFC233CC: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B3CCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC233D0: 000950C0 sll $t2, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000950C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC233D4: 001940C0 sll $t0, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001940C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3D4u); -#endif - /* 0xBFC233D8: 8FA50048 lw $a1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B3D8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50048u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC233DC: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC233E0: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC233E4: 00084180 sll $t0, $t0, 6 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 6u; - PGXP_ALU(0x00084180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC233E8: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC233EC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC233F0: 25ADA528 addiu $t5, $t5, -23256 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-23256)); - PGXP_ALU(0x25ADA528u, cpu->gpr[13], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD00u); -#endif - /* 0xBFC233F4: 010A5821 addu $t3, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[8] + cpu->gpr[10]; - PGXP_ALU(0x010A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC233F8: 00052A00 sll $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 8u; - PGXP_ALU(0x00052A00u, cpu->gpr[5], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC233FC: 24A5FAC0 addiu $a1, $a1, -1344 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1344)); - PGXP_ALU(0x24A5FAC0u, cpu->gpr[5], _pgx1, 0xFFFFFAC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2810u); -#endif - /* 0xBFC23400: 016D2021 addu $a0, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[13]; - PGXP_ALU(0x016D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23404: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003B40Cu; /* jal link before delay slot */ - psx_delay_BFC23404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23408: 2406019B addiu $a2, $zero, 411 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (411)); - PGXP_ALU(0x2406019Bu, cpu->gpr[6], _pgx1, 0x0000019Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B408u); -#endif - if (psx_delay_BFC23404) { - psx_delay_BFC23404 = 0; - cpu->gpr[31] = 0x8003B40Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2340C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2340Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2340C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23410: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B410u); -#endif - /* 0xBFC23414: 81EFA8A8 lb $t7, -22360($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -22360; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-22360)), 15, 0x8000u); - PGXP_LOAD(0x81EFA8A8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B414u); -#endif - /* 0xBFC23418: 8D8C9E24 lw $t4, -25052($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B418u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E24u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2341C: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC23420: 000C70C0 sll $t6, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC23424: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC23428: 01CC7023 subu $t6, $t6, $t4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[12]; - PGXP_ALU(0x01CC7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2342C: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23430: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC23434: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC23438: 2529A528 addiu $t1, $t1, -23256 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-23256)); - PGXP_ALU(0x2529A528u, cpu->gpr[9], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2343C: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000210u); -#endif - /* 0xBFC23440: 03292021 addu $a0, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[9]; - PGXP_ALU(0x03292021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23444: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23448: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003B450u; /* jal link before delay slot */ - psx_delay_BFC23448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2344C: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B44Cu); -#endif - if (psx_delay_BFC23448) { - psx_delay_BFC23448 = 0; - cpu->gpr[31] = 0x8003B450u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC23450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC23450: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC23454: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B454u); -#endif - /* 0xBFC23458: 816BA8A8 lb $t3, -22360($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -22360; cpu->gpr[11] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (-22360)), 11, 0x800u); - PGXP_LOAD(0x816BA8A8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B458u); -#endif - /* 0xBFC2345C: 8D089E24 lw $t0, -25052($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B45Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089E24u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC23460: 000B68C0 sll $t5, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC23464: 000850C0 sll $t2, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000850C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC23468: 01AB6823 subu $t5, $t5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[11]; - PGXP_ALU(0x01AB6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2346C: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC23470: 000A5180 sll $t2, $t2, 6 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 6u; - PGXP_ALU(0x000A5180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23474: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23478: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2347C: 25EFA528 addiu $t7, $t7, -23256 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-23256)); - PGXP_ALU(0x25EFA528u, cpu->gpr[15], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3400u); -#endif - /* 0xBFC23480: 014D6021 addu $t4, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[13]; - PGXP_ALU(0x014D6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9010u); -#endif - /* 0xBFC23484: 018F2021 addu $a0, $t4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[15]; - PGXP_ALU(0x018F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23488: 0C0112B8 jal 0xB0044AE0 */ - cpu->gpr[31] = 0x8003B490u; /* jal link before delay slot */ - psx_delay_BFC23488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2348C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B48Cu); -#endif - if (psx_delay_BFC23488) { - psx_delay_BFC23488 = 0; - cpu->gpr[31] = 0x8003B490u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AE0u); - cpu->pc = 0x80044AE0u; return; - } -label_BFC23490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23490: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23494: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B494u); -#endif - /* 0xBFC23498: 8339A8A8 lb $t9, -22360($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -22360; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-22360)), 25, 0x2000000u); - PGXP_LOAD(0x8339A8A8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B498u); -#endif - /* 0xBFC2349C: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B49Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC234A0: 001948C0 sll $t1, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC234A4: 000EC0C0 sll $t8, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000EC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC234A8: 01394823 subu $t1, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[25]; - PGXP_ALU(0x01394823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC234AC: 030EC023 subu $t8, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[14]; - PGXP_ALU(0x030EC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC234B0: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC234B4: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC234B8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC234BC: 256BA528 addiu $t3, $t3, -23256 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-23256)); - PGXP_ALU(0x256BA528u, cpu->gpr[11], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000300u); -#endif - /* 0xBFC234C0: 03094021 addu $t0, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03094021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x910u); -#endif - /* 0xBFC234C4: 010B2021 addu $a0, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[11]; - PGXP_ALU(0x010B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC234C8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003B4D0u; /* jal link before delay slot */ - psx_delay_BFC234C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC234CC: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4CCu); -#endif - if (psx_delay_BFC234C8) { - psx_delay_BFC234C8 = 0; - cpu->gpr[31] = 0x8003B4D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC234D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC234D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC234D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC234D0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B4D0u); -#endif - /* 0xBFC234D4: 8063A8A8 lb $v1, -22360($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -22360; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-22360)), 3, 0x8u); - PGXP_LOAD(0x8063A8A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC234D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC234DC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4DCu); -#endif -label_BFC234E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC234E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC234E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC234E0: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4E0u); -#endif - /* 0xBFC234E4: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B4E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC234E8: 00031E00 sll $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 24u; - PGXP_ALU(0x00031E00u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC234EC: 00031E03 sra $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 24u); - PGXP_ALU(0x00031E03u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC234F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC234F4: A023A8A8 sb $v1, -22360($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22360; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003B4F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22360)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023A8A8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC234F8: 03E00008 jr $ra */ - psx_delay_BFC234F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC234FC: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B4FCu); -#endif - if (psx_delay_BFC234F8) { - psx_delay_BFC234F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC23500(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC23500u); - int psx_delay_BFC23504 = 0; - int psx_taken_BFC23504 = 0; - int psx_delay_BFC2350C = 0; - int psx_delay_BFC2351C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2350Cu: goto label_BFC2350C; - case 0xBFC23514u: goto label_BFC23514; - default: break; - } - } -label_BFC23500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23500: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC23504: 14800003 bne $a0, $zero, 0xBFC23514 */ - uint32_t psx_brA_BFC23504 = cpu->gpr[4]; uint32_t psx_brB_BFC23504 = cpu->gpr[0]; - psx_taken_BFC23504 = (psx_brA_BFC23504 != psx_brB_BFC23504); - psx_delay_BFC23504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC23508: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B508u); return; } g_debug_last_store_pc = 0x8003B508u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B508u); -#endif - if (psx_delay_BFC23504) { - psx_delay_BFC23504 = 0; - if (psx_taken_BFC23504) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B514u); - goto label_BFC23514; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B50Cu); - } -label_BFC2350C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2350Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2350C: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003B514u; /* jal link before delay slot */ - psx_delay_BFC2350C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B510u); -#endif - if (psx_delay_BFC2350C) { - psx_delay_BFC2350C = 0; - cpu->gpr[31] = 0x8003B514u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC23514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B514u); -#endif - /* 0xBFC23514: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B514u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23518: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2351C: 03E00008 jr $ra */ - psx_delay_BFC2351C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23520: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B520u); -#endif - if (psx_delay_BFC2351C) { - psx_delay_BFC2351C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC23524(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC23524u); - int psx_delay_BFC2353C = 0; - int psx_taken_BFC2353C = 0; - int psx_delay_BFC23568 = 0; - int psx_taken_BFC23568 = 0; - int psx_delay_BFC23574 = 0; - int psx_taken_BFC23574 = 0; - int psx_delay_BFC2359C = 0; - int psx_taken_BFC2359C = 0; - int psx_delay_BFC235A8 = 0; - int psx_taken_BFC235A8 = 0; - int psx_delay_BFC235BC = 0; - int psx_taken_BFC235BC = 0; - int psx_delay_BFC23618 = 0; - int psx_taken_BFC23618 = 0; - int psx_delay_BFC23620 = 0; - int psx_taken_BFC23620 = 0; - int psx_delay_BFC23644 = 0; - int psx_taken_BFC23644 = 0; - int psx_delay_BFC23658 = 0; - int psx_taken_BFC23658 = 0; - int psx_delay_BFC236E0 = 0; - int psx_delay_BFC23768 = 0; - int psx_delay_BFC237B8 = 0; - int psx_delay_BFC237EC = 0; - int psx_delay_BFC23820 = 0; - int psx_delay_BFC23850 = 0; - int psx_delay_BFC238D8 = 0; - int psx_delay_BFC23960 = 0; - int psx_delay_BFC239A8 = 0; - int psx_delay_BFC239DC = 0; - int psx_delay_BFC23A10 = 0; - int psx_delay_BFC23A40 = 0; - int psx_delay_BFC23A5C = 0; - int psx_taken_BFC23A5C = 0; - int psx_delay_BFC23A6C = 0; - int psx_taken_BFC23A6C = 0; - int psx_delay_BFC23AC0 = 0; - int psx_taken_BFC23AC0 = 0; - int psx_delay_BFC23B40 = 0; - int psx_taken_BFC23B40 = 0; - int psx_delay_BFC23BC4 = 0; - int psx_delay_BFC23C44 = 0; - int psx_delay_BFC23D34 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC23544u: goto label_BFC23544; - case 0xBFC23570u: goto label_BFC23570; - case 0xBFC2357Cu: goto label_BFC2357C; - case 0xBFC235A4u: goto label_BFC235A4; - case 0xBFC235A8u: goto label_BFC235A8; - case 0xBFC235B0u: goto label_BFC235B0; - case 0xBFC235C4u: goto label_BFC235C4; - case 0xBFC235C8u: goto label_BFC235C8; - case 0xBFC235D0u: goto label_BFC235D0; - case 0xBFC23620u: goto label_BFC23620; - case 0xBFC23628u: goto label_BFC23628; - case 0xBFC23630u: goto label_BFC23630; - case 0xBFC23634u: goto label_BFC23634; - case 0xBFC2364Cu: goto label_BFC2364C; - case 0xBFC23660u: goto label_BFC23660; - case 0xBFC236E8u: goto label_BFC236E8; - case 0xBFC23770u: goto label_BFC23770; - case 0xBFC237C0u: goto label_BFC237C0; - case 0xBFC237F4u: goto label_BFC237F4; - case 0xBFC23828u: goto label_BFC23828; - case 0xBFC23858u: goto label_BFC23858; - case 0xBFC238E0u: goto label_BFC238E0; - case 0xBFC23968u: goto label_BFC23968; - case 0xBFC239B0u: goto label_BFC239B0; - case 0xBFC239E4u: goto label_BFC239E4; - case 0xBFC23A18u: goto label_BFC23A18; - case 0xBFC23A48u: goto label_BFC23A48; - case 0xBFC23A64u: goto label_BFC23A64; - case 0xBFC23A74u: goto label_BFC23A74; - case 0xBFC23A78u: goto label_BFC23A78; - case 0xBFC23AA4u: goto label_BFC23AA4; - case 0xBFC23AB8u: goto label_BFC23AB8; - case 0xBFC23AC8u: goto label_BFC23AC8; - case 0xBFC23B3Cu: goto label_BFC23B3C; - case 0xBFC23B48u: goto label_BFC23B48; - case 0xBFC23B54u: goto label_BFC23B54; - case 0xBFC23BCCu: goto label_BFC23BCC; - case 0xBFC23C4Cu: goto label_BFC23C4C; - default: break; - } - } -label_BFC23524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23524: 27BDFF60 addiu $sp, $sp, -160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-160)); - PGXP_ALU(0x27BDFF60u, cpu->gpr[29], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC23528: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B528u); return; } g_debug_last_store_pc = 0x8003B528u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2352C: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B52Cu); return; } g_debug_last_store_pc = 0x8003B52Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC23530: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B530u); return; } g_debug_last_store_pc = 0x8003B530u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC23534: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B534u); return; } g_debug_last_store_pc = 0x8003B534u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC23538: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B538u); return; } g_debug_last_store_pc = 0x8003B538u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2353C: 1480000C bne $a0, $zero, 0xBFC23570 */ - uint32_t psx_brA_BFC2353C = cpu->gpr[4]; uint32_t psx_brB_BFC2353C = cpu->gpr[0]; - psx_taken_BFC2353C = (psx_brA_BFC2353C != psx_brB_BFC2353C); - psx_delay_BFC2353C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC23540: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B540u); return; } g_debug_last_store_pc = 0x8003B540u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B540u); -#endif - if (psx_delay_BFC2353C) { - psx_delay_BFC2353C = 0; - if (psx_taken_BFC2353C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B570u); - goto label_BFC23570; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B544u); - } -label_BFC23544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23544: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC23548: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2354C: 25EFDBA0 addiu $t7, $t7, -9312 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-9312)); - PGXP_ALU(0x25EFDBA0u, cpu->gpr[15], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC23550: AFAE0098 sw $t6, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B550u); return; } g_debug_last_store_pc = 0x8003B550u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0098u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23554: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23558: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2355C: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC23560: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC23564: AFAF0040 sw $t7, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B564u); return; } g_debug_last_store_pc = 0x8003B564u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0040u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23568: 10000032 beq $zero, $zero, 0xBFC23634 */ - uint32_t psx_brA_BFC23568 = cpu->gpr[0]; uint32_t psx_brB_BFC23568 = cpu->gpr[0]; - psx_taken_BFC23568 = (psx_brA_BFC23568 == psx_brB_BFC23568); - psx_delay_BFC23568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108001u); -#endif - /* 0xBFC2356C: 01E0A021 addu $s4, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B56Cu); -#endif - if (psx_delay_BFC23568) { - psx_delay_BFC23568 = 0; - if (psx_taken_BFC23568) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B634u); - goto label_BFC23634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B570u); - } -label_BFC23570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23570: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC23574: 1481000C bne $a0, $at, 0xBFC235A8 */ - uint32_t psx_brA_BFC23574 = cpu->gpr[4]; uint32_t psx_brB_BFC23574 = cpu->gpr[1]; - psx_taken_BFC23574 = (psx_brA_BFC23574 != psx_brB_BFC23574); - psx_delay_BFC23574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC23578: 2881003C slti $at, $a0, 60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0); - PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B578u); -#endif - if (psx_delay_BFC23574) { - psx_delay_BFC23574 = 0; - if (psx_taken_BFC23574) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5A8u); - goto label_BFC235A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B57Cu); - } -label_BFC2357C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2357Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2357C: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23580: 2718E160 addiu $t8, $t8, -7840 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-7840)); - PGXP_ALU(0x2718E160u, cpu->gpr[24], _pgx1, 0xFFFFE160u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC23584: AFA00098 sw $zero, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B584u); return; } g_debug_last_store_pc = 0x8003B584u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00098u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23588: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2358C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC23590: 24110002 addiu $s1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24110002u, cpu->gpr[17], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC23594: 24120003 addiu $s2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24120003u, cpu->gpr[18], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC23598: AFB80040 sw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B598u); return; } g_debug_last_store_pc = 0x8003B598u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2359C: 10000025 beq $zero, $zero, 0xBFC23634 */ - uint32_t psx_brA_BFC2359C = cpu->gpr[0]; uint32_t psx_brB_BFC2359C = cpu->gpr[0]; - psx_taken_BFC2359C = (psx_brA_BFC2359C == psx_brB_BFC2359C); - psx_delay_BFC2359C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100001u); -#endif - /* 0xBFC235A0: 0300A021 addu $s4, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x0300A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5A0u); -#endif - if (psx_delay_BFC2359C) { - psx_delay_BFC2359C = 0; - if (psx_taken_BFC2359C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B634u); - goto label_BFC23634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5A4u); - } -label_BFC235A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC235A4: 2881003C slti $at, $a0, 60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (60) ? 1 : 0); - PGXP_ALU(0x2881003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5A4u); -#endif -label_BFC235A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC235A8: 10200007 beq $at, $zero, 0xBFC235C8 */ - uint32_t psx_brA_BFC235A8 = cpu->gpr[1]; uint32_t psx_brB_BFC235A8 = cpu->gpr[0]; - psx_taken_BFC235A8 = (psx_brA_BFC235A8 == psx_brB_BFC235A8); - psx_delay_BFC235A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC235AC: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5ACu); -#endif - if (psx_delay_BFC235A8) { - psx_delay_BFC235A8 = 0; - if (psx_taken_BFC235A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5C8u); - goto label_BFC235C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5B0u); - } -label_BFC235B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC235B0: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC235B4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC235B8: AFB90098 sw $t9, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B5B8u); return; } g_debug_last_store_pc = 0x8003B5B8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90098u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC235BC: 10000004 beq $zero, $zero, 0xBFC235D0 */ - uint32_t psx_brA_BFC235BC = cpu->gpr[0]; uint32_t psx_brB_BFC235BC = cpu->gpr[0]; - psx_taken_BFC235BC = (psx_brA_BFC235BC == psx_brB_BFC235BC); - psx_delay_BFC235BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC235C0: 2485FFE3 addiu $a1, $a0, -29 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (-29)); - PGXP_ALU(0x2485FFE3u, cpu->gpr[5], _pgx1, 0xFFFFFFE3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5C0u); -#endif - if (psx_delay_BFC235BC) { - psx_delay_BFC235BC = 0; - if (psx_taken_BFC235BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5D0u); - goto label_BFC235D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B5C4u); - } -label_BFC235C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC235C4: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5C4u); -#endif -label_BFC235C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC235C8: AFA00098 sw $zero, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B5C8u); return; } g_debug_last_store_pc = 0x8003B5C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00098u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC235CC: 2485FFC5 addiu $a1, $a0, -59 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (-59)); - PGXP_ALU(0x2485FFC5u, cpu->gpr[5], _pgx1, 0xFFFFFFC5u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5CCu); -#endif -label_BFC235D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC235D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC235D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC235D0: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC235D4: 01A36823 subu $t5, $t5, $v1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[3]; - PGXP_ALU(0x01A36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC235D8: 00057880 sll $t7, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00057880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC235DC: 01E57823 subu $t7, $t7, $a1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[5]; - PGXP_ALU(0x01E57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC235E0: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC235E4: 01A36823 subu $t5, $t5, $v1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[3]; - PGXP_ALU(0x01A36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC235E8: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC235EC: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC235F0: 25CEDBA0 addiu $t6, $t6, -9312 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-9312)); - PGXP_ALU(0x25CEDBA0u, cpu->gpr[14], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC235F4: 01E57823 subu $t7, $t7, $a1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[5]; - PGXP_ALU(0x01E57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC235F8: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6010u); -#endif - /* 0xBFC235FC: 01AE2021 addu $a0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23600: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108010u); -#endif - /* 0xBFC23604: 008FA021 addu $s4, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008FA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B604u); -#endif - /* 0xBFC23608: 8E820010 lw $v0, 16($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B608u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } - PGXP_LOAD(0x8E820010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2360C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC23610: 00028A03 sra $s1, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[2] >> 8u); - PGXP_ALU(0x00028A03u, cpu->gpr[17], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC23614: 323100FF andi $s1, $s1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] & 0xFFu; - PGXP_ALU(0x323100FFu, cpu->gpr[17], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC23618: 16200005 bne $s1, $zero, 0xBFC23630 */ - uint32_t psx_brA_BFC23618 = cpu->gpr[17]; uint32_t psx_brB_BFC23618 = cpu->gpr[0]; - psx_taken_BFC23618 = (psx_brA_BFC23618 != psx_brB_BFC23618); - psx_delay_BFC23618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC2361C: 305200FF andi $s2, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305200FFu, cpu->gpr[18], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B61Cu); -#endif - if (psx_delay_BFC23618) { - psx_delay_BFC23618 = 0; - if (psx_taken_BFC23618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B630u); - goto label_BFC23630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B620u); - } -label_BFC23620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC23620: 16400003 bne $s2, $zero, 0xBFC23630 */ - uint32_t psx_brA_BFC23620 = cpu->gpr[18]; uint32_t psx_brB_BFC23620 = cpu->gpr[0]; - psx_taken_BFC23620 = (psx_brA_BFC23620 != psx_brB_BFC23620); - psx_delay_BFC23620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B624u); -#endif - if (psx_delay_BFC23620) { - psx_delay_BFC23620 = 0; - if (psx_taken_BFC23620) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B630u); - goto label_BFC23630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B628u); - } -label_BFC23628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC23628: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2362C: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B62Cu); -#endif -label_BFC23630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23630: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B630u); return; } g_debug_last_store_pc = 0x8003B630u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B630u); -#endif -label_BFC23634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC23634: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B634u); -#endif - /* 0xBFC23638: 8D8C3B68 lw $t4, 15208($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 15208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (15208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B638u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C3B68u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B638u); -#endif - /* 0xBFC2363C: 8E980018 lw $t8, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B63Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x100000u); } - PGXP_LOAD(0x8E980018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23640: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC23644: 15980006 bne $t4, $t8, 0xBFC23660 */ - uint32_t psx_brA_BFC23644 = cpu->gpr[12]; uint32_t psx_brB_BFC23644 = cpu->gpr[24]; - psx_taken_BFC23644 = (psx_brA_BFC23644 != psx_brB_BFC23644); - psx_delay_BFC23644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B648u); -#endif - if (psx_delay_BFC23644) { - psx_delay_BFC23644 = 0; - if (psx_taken_BFC23644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B660u); - goto label_BFC23660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B64Cu); - } -label_BFC2364C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2364Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2364C: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B650u); -#endif - /* 0xBFC23650: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B650u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC23654: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23658: 1000013E beq $zero, $zero, 0xBFC23B54 */ - uint32_t psx_brA_BFC23658 = cpu->gpr[0]; uint32_t psx_brB_BFC23658 = cpu->gpr[0]; - psx_taken_BFC23658 = (psx_brA_BFC23658 == psx_brB_BFC23658); - psx_delay_BFC23658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2365C: 2610A528 addiu $s0, $s0, -23256 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-23256)); - PGXP_ALU(0x2610A528u, cpu->gpr[16], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B65Cu); -#endif - if (psx_delay_BFC23658) { - psx_delay_BFC23658 = 0; - if (psx_taken_BFC23658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BB54u); - goto label_BFC23B54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B660u); - } -label_BFC23660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23660: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B660u); -#endif - /* 0xBFC23664: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B664u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23668: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2366C: 0013C880 sll $t9, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23670: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23674: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23678: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2367C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23680: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B680u); -#endif - /* 0xBFC23684: 8DADFF58 lw $t5, -168($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B684u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADFF58u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23688: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2368C: 0333C821 addu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[19]; - PGXP_ALU(0x0333C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23690: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC23694: 000D70C0 sll $t6, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23698: 0333C821 addu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[19]; - PGXP_ALU(0x0333C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2369C: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC236A0: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC236A4: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC236A8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC236AC: 2718A8B8 addiu $t8, $t8, -22344 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-22344)); - PGXP_ALU(0x2718A8B8u, cpu->gpr[24], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC236B0: 032E7821 addu $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC236B4: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6B4u); -#endif - /* 0xBFC236B8: 844DFF72 lh $t5, -142($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -142; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-142)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6B8u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x844DFF72u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC236BC: 27A40070 addiu $a0, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A40070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC236C0: A7AD0070 sh $t5, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6C0u); return; } g_debug_last_store_pc = 0x8003B6C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0070u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6C0u); -#endif - /* 0xBFC236C4: 8459FF74 lh $t9, -140($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-140)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6C4u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8459FF74u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC236C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC236CC: A7B90072 sh $t9, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6CCu); return; } g_debug_last_store_pc = 0x8003B6CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90072u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6D0u); -#endif - /* 0xBFC236D0: 844EFF76 lh $t6, -138($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -138; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-138)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6D0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x844EFF76u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC236D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC236D8: A7AE0074 sh $t6, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6D8u); return; } g_debug_last_store_pc = 0x8003B6D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0074u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6D8u); -#endif - /* 0xBFC236DC: 844FFF78 lh $t7, -136($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-136)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6DCu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x844FFF78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC236E0: 0C012771 jal 0xB0049DC4 */ - cpu->gpr[31] = 0x8003B6E8u; /* jal link before delay slot */ - psx_delay_BFC236E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC236E4: A7AF0076 sh $t7, 118($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 118; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (118)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6E4u); return; } g_debug_last_store_pc = 0x8003B6E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0076u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6E4u); -#endif - if (psx_delay_BFC236E0) { - psx_delay_BFC236E0 = 0; - cpu->gpr[31] = 0x8003B6E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DC4u); - cpu->pc = 0x80049DC4u; return; - } -label_BFC236E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC236E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC236E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC236E8: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B6E8u); -#endif - /* 0xBFC236EC: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B6ECu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC236F0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC236F4: 0013C080 sll $t8, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC236F8: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC236FC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23700: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23704: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23708: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B708u); -#endif - /* 0xBFC2370C: 8DADFF58 lw $t5, -168($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B70Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADFF58u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23710: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23714: 0313C021 addu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[19]; - PGXP_ALU(0x0313C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23718: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC2371C: 000DC8C0 sll $t9, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000DC8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23720: 0313C021 addu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[19]; - PGXP_ALU(0x0313C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC23724: 032DC823 subu $t9, $t9, $t5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[13]; - PGXP_ALU(0x032DC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23728: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2372C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23730: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23734: 25EFA8B8 addiu $t7, $t7, -22344 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22344)); - PGXP_ALU(0x25EFA8B8u, cpu->gpr[15], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC23738: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2373C: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B740u); -#endif - /* 0xBFC23740: 844DFF6A lh $t5, -150($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -150; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-150)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B740u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x844DFF6Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23744: 27A40070 addiu $a0, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A40070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC23748: A7AD0070 sh $t5, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B748u); return; } g_debug_last_store_pc = 0x8003B748u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0070u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B748u); -#endif - /* 0xBFC2374C: 8458FF6C lh $t8, -148($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-148)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B74Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8458FF6Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23750: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC23754: A7B80072 sh $t8, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B754u); return; } g_debug_last_store_pc = 0x8003B754u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80072u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B754u); -#endif - /* 0xBFC23758: 8459FF6E lh $t9, -146($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -146; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-146)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B758u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8459FF6Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2375C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC23760: A7B90074 sh $t9, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B760u); return; } g_debug_last_store_pc = 0x8003B760u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90074u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B760u); -#endif - /* 0xBFC23764: 844EFF70 lh $t6, -144($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-144)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B764u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x844EFF70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23768: 0C01279D jal 0xB0049E74 */ - cpu->gpr[31] = 0x8003B770u; /* jal link before delay slot */ - psx_delay_BFC23768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2376C: A7AE0076 sh $t6, 118($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 118; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (118)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B76Cu); return; } g_debug_last_store_pc = 0x8003B76Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0076u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B76Cu); -#endif - if (psx_delay_BFC23768) { - psx_delay_BFC23768 = 0; - cpu->gpr[31] = 0x8003B770u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E74u); - cpu->pc = 0x80049E74u; return; - } -label_BFC23770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23770: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B770u); -#endif - /* 0xBFC23774: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B774u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC23778: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC2377C: 001378C0 sll $t7, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001378C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC23780: 0011C0C0 sll $t8, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 3u; - PGXP_ALU(0x0011C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC23784: 00112A40 sll $a1, $s1, 9 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = cpu->gpr[17] << 9u; - PGXP_ALU(0x00112A40u, cpu->gpr[5], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23788: 01F37823 subu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[19]; - PGXP_ALU(0x01F37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2378C: 2610A528 addiu $s0, $s0, -23256 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-23256)); - PGXP_ALU(0x2610A528u, cpu->gpr[16], _pgx1, 0xFFFFA528u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23790: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC23794: 00B12821 addu $a1, $a1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[17]; - PGXP_ALU(0x00B12821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC23798: 0311C023 subu $t8, $t8, $s1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[17]; - PGXP_ALU(0x0311C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2379C: 3C018016 lui $at, 0x8016 */ - cpu->gpr[1] = 0x80160000u; - PGXP_ALU(0x3C018016u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC237A0: 34216000 ori $at, $at, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x6000u; - PGXP_ALU(0x34216000u, cpu->gpr[1], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC237A4: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC237A8: 00052980 sll $a1, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00052980u, cpu->gpr[5], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1A000u); -#endif - /* 0xBFC237AC: 020F6821 addu $t5, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[16] + cpu->gpr[15]; - PGXP_ALU(0x020F6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002010u); -#endif - /* 0xBFC237B0: 01B82021 addu $a0, $t5, $t8 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[24]; - PGXP_ALU(0x01B82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC237B4: 00A12821 addu $a1, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[1]; - PGXP_ALU(0x00A12821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC237B8: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003B7C0u; /* jal link before delay slot */ - psx_delay_BFC237B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC237BC: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7BCu); -#endif - if (psx_delay_BFC237B8) { - psx_delay_BFC237B8 = 0; - cpu->gpr[31] = 0x8003B7C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC237C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC237C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC237C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC237C0: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B7C0u); -#endif - /* 0xBFC237C4: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B7C4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC237C8: 001178C0 sll $t7, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001178C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC237CC: 0013C8C0 sll $t9, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 3u; - PGXP_ALU(0x0013C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC237D0: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC237D4: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC237D8: 01F17823 subu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[17]; - PGXP_ALU(0x01F17823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC237DC: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2014000u); -#endif - /* 0xBFC237E0: 02197021 addu $t6, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC237E4: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC237E8: 240500C0 addiu $a1, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240500C0u, cpu->gpr[5], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC237EC: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003B7F4u; /* jal link before delay slot */ - psx_delay_BFC237EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC237F0: 2406019B addiu $a2, $zero, 411 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (411)); - PGXP_ALU(0x2406019Bu, cpu->gpr[6], _pgx1, 0x0000019Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7F0u); -#endif - if (psx_delay_BFC237EC) { - psx_delay_BFC237EC = 0; - cpu->gpr[31] = 0x8003B7F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC237F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC237F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC237F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC237F4: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B7F4u); -#endif - /* 0xBFC237F8: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B7F8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC237FC: 0011C8C0 sll $t9, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 3u; - PGXP_ALU(0x0011C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23800: 001368C0 sll $t5, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001368C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23804: 01B36823 subu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[19]; - PGXP_ALU(0x01B36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23808: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC2380C: 0331C823 subu $t9, $t9, $s1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[17]; - PGXP_ALU(0x0331C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23810: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1012000u); -#endif - /* 0xBFC23814: 020DC021 addu $t8, $s0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[16] + cpu->gpr[13]; - PGXP_ALU(0x020DC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC23818: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2381C: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23820: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003B828u; /* jal link before delay slot */ - psx_delay_BFC23820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23824: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B824u); -#endif - if (psx_delay_BFC23820) { - psx_delay_BFC23820 = 0; - cpu->gpr[31] = 0x8003B828u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC23828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23828: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B828u); -#endif - /* 0xBFC2382C: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B82Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC23830: 001168C0 sll $t5, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001168C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23834: 001370C0 sll $t6, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001370C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23838: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2383C: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC23840: 01B16823 subu $t5, $t5, $s1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[17]; - PGXP_ALU(0x01B16823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23844: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC23848: 020E7821 addu $t7, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA010u); -#endif - /* 0xBFC2384C: 01ED2021 addu $a0, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23850: 0C0112B8 jal 0xB0044AE0 */ - cpu->gpr[31] = 0x8003B858u; /* jal link before delay slot */ - psx_delay_BFC23850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23854: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B854u); -#endif - if (psx_delay_BFC23850) { - psx_delay_BFC23850 = 0; - cpu->gpr[31] = 0x8003B858u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AE0u); - cpu->pc = 0x80044AE0u; return; - } -label_BFC23858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23858: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B858u); -#endif - /* 0xBFC2385C: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B85Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23860: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23864: 0013C080 sll $t8, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23868: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2386C: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23870: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23874: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23878: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B878u); -#endif - /* 0xBFC2387C: 8F39FF58 lw $t9, -168($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B87Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39FF58u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23880: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23884: 0313C021 addu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[19]; - PGXP_ALU(0x0313C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23888: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2388C: 001970C0 sll $t6, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23890: 0313C021 addu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[19]; - PGXP_ALU(0x0313C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC23894: 01D97023 subu $t6, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[25]; - PGXP_ALU(0x01D97023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23898: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2389C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC238A0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC238A4: 25ADA8B8 addiu $t5, $t5, -22344 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-22344)); - PGXP_ALU(0x25ADA8B8u, cpu->gpr[13], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC238A8: 030E7821 addu $t7, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA004u); -#endif - /* 0xBFC238AC: 01ED1021 addu $v0, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8B0u); -#endif - /* 0xBFC238B0: 8459FFE2 lh $t9, -30($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8B0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8459FFE2u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC238B4: 27A40070 addiu $a0, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A40070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC238B8: A7B90070 sh $t9, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8B8u); return; } g_debug_last_store_pc = 0x8003B8B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90070u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8B8u); -#endif - /* 0xBFC238BC: 8458FFE4 lh $t8, -28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8BCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8458FFE4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC238C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC238C4: A7B80072 sh $t8, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8C4u); return; } g_debug_last_store_pc = 0x8003B8C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80072u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8C4u); -#endif - /* 0xBFC238C8: 844EFFE6 lh $t6, -26($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8C8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x844EFFE6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC238CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC238D0: A7AE0074 sh $t6, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8D0u); return; } g_debug_last_store_pc = 0x8003B8D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0074u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8D0u); -#endif - /* 0xBFC238D4: 844FFFE8 lh $t7, -24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8D4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x844FFFE8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC238D8: 0C012771 jal 0xB0049DC4 */ - cpu->gpr[31] = 0x8003B8E0u; /* jal link before delay slot */ - psx_delay_BFC238D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC238DC: A7AF0076 sh $t7, 118($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 118; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (118)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8DCu); return; } g_debug_last_store_pc = 0x8003B8DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0076u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8DCu); -#endif - if (psx_delay_BFC238D8) { - psx_delay_BFC238D8 = 0; - cpu->gpr[31] = 0x8003B8E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DC4u); - cpu->pc = 0x80049DC4u; return; - } -label_BFC238E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC238E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC238E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC238E0: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B8E0u); -#endif - /* 0xBFC238E4: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B8E4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC238E8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC238EC: 00136880 sll $t5, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00136880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC238F0: 01B36823 subu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[19]; - PGXP_ALU(0x01B36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC238F4: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC238F8: 01B36823 subu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[19]; - PGXP_ALU(0x01B36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC238FC: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23900: 01B36823 subu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[19]; - PGXP_ALU(0x01B36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B900u); -#endif - /* 0xBFC23904: 8F39FF58 lw $t9, -168($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B904u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39FF58u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23908: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC2390C: 01B36821 addu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[19]; - PGXP_ALU(0x01B36821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23910: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC23914: 0019C0C0 sll $t8, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23918: 01B36821 addu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[19]; - PGXP_ALU(0x01B36821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2391C: 0319C023 subu $t8, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x0319C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23920: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23924: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23928: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2392C: 25EFA8B8 addiu $t7, $t7, -22344 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22344)); - PGXP_ALU(0x25EFA8B8u, cpu->gpr[15], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006000u); -#endif - /* 0xBFC23930: 01B87021 addu $t6, $t5, $t8 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[13] + cpu->gpr[24]; - PGXP_ALU(0x01B87021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC23934: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B934u); -#endif - /* 0xBFC23938: 8459FFDA lh $t9, -38($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -38; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B938u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8459FFDAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2393C: 27A40070 addiu $a0, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A40070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC23940: A7B90070 sh $t9, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B940u); return; } g_debug_last_store_pc = 0x8003B940u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90070u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B940u); -#endif - /* 0xBFC23944: 844DFFDC lh $t5, -36($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B944u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x844DFFDCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC2394C: A7AD0072 sh $t5, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B94Cu); return; } g_debug_last_store_pc = 0x8003B94Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0072u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B950u); -#endif - /* 0xBFC23950: 8458FFDE lh $t8, -34($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -34; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B950u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8458FFDEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003B954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC23958: A7B80074 sh $t8, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B958u); return; } g_debug_last_store_pc = 0x8003B958u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80074u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B958u); -#endif - /* 0xBFC2395C: 844EFFE0 lh $t6, -32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B95Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x844EFFE0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23960: 0C01279D jal 0xB0049E74 */ - cpu->gpr[31] = 0x8003B968u; /* jal link before delay slot */ - psx_delay_BFC23960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC23964: A7AE0076 sh $t6, 118($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 118; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (118)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003B964u); return; } g_debug_last_store_pc = 0x8003B964u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0076u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B964u); -#endif - if (psx_delay_BFC23960) { - psx_delay_BFC23960 = 0; - cpu->gpr[31] = 0x8003B968u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E74u); - cpu->pc = 0x80049E74u; return; - } -label_BFC23968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23968: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B968u); -#endif - /* 0xBFC2396C: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B96Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC23970: 001268C0 sll $t5, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[18] << 3u; - PGXP_ALU(0x001268C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23974: 001378C0 sll $t7, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001378C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020u); -#endif - /* 0xBFC23978: 00122A40 sll $a1, $s2, 9 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[18] << 9u; - PGXP_ALU(0x00122A40u, cpu->gpr[5], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC2397C: 01F37823 subu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[19]; - PGXP_ALU(0x01F37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23980: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020u); -#endif - /* 0xBFC23984: 00B22821 addu $a1, $a1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[18]; - PGXP_ALU(0x00B22821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC23988: 01B26823 subu $t5, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[18]; - PGXP_ALU(0x01B26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2398C: 3C018016 lui $at, 0x8016 */ - cpu->gpr[1] = 0x80160000u; - PGXP_ALU(0x3C018016u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23990: 34216000 ori $at, $at, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x6000u; - PGXP_ALU(0x34216000u, cpu->gpr[1], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23994: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23998: 00052980 sll $a1, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00052980u, cpu->gpr[5], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2018000u); -#endif - /* 0xBFC2399C: 020FC821 addu $t9, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[16] + cpu->gpr[15]; - PGXP_ALU(0x020FC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002010u); -#endif - /* 0xBFC239A0: 032D2021 addu $a0, $t9, $t5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[13]; - PGXP_ALU(0x032D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC239A4: 00A12821 addu $a1, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[1]; - PGXP_ALU(0x00A12821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC239A8: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003B9B0u; /* jal link before delay slot */ - psx_delay_BFC239A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC239AC: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9ACu); -#endif - if (psx_delay_BFC239A8) { - psx_delay_BFC239A8 = 0; - cpu->gpr[31] = 0x8003B9B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC239B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC239B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC239B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC239B0: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B9B0u); -#endif - /* 0xBFC239B4: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B9B4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC239B8: 001278C0 sll $t7, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 3u; - PGXP_ALU(0x001278C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC239BC: 0013C0C0 sll $t8, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 3u; - PGXP_ALU(0x0013C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC239C0: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC239C4: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC239C8: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC239CC: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1014000u); -#endif - /* 0xBFC239D0: 02187021 addu $t6, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02187021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC239D4: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC239D8: 240501C0 addiu $a1, $zero, 448 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (448)); - PGXP_ALU(0x240501C0u, cpu->gpr[5], _pgx1, 0x000001C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC239DC: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003B9E4u; /* jal link before delay slot */ - psx_delay_BFC239DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC239E0: 2406019B addiu $a2, $zero, 411 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (411)); - PGXP_ALU(0x2406019Bu, cpu->gpr[6], _pgx1, 0x0000019Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9E0u); -#endif - if (psx_delay_BFC239DC) { - psx_delay_BFC239DC = 0; - cpu->gpr[31] = 0x8003B9E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC239E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC239E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC239E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC239E4: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003B9E4u); -#endif - /* 0xBFC239E8: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003B9E8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC239EC: 0012C0C0 sll $t8, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 3u; - PGXP_ALU(0x0012C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003B9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC239F0: 0013C8C0 sll $t9, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 3u; - PGXP_ALU(0x0013C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC239F4: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC239F8: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC239FC: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003B9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23A00: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2012000u); -#endif - /* 0xBFC23A04: 02196821 addu $t5, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02196821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002010u); -#endif - /* 0xBFC23A08: 01B82021 addu $a0, $t5, $t8 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[24]; - PGXP_ALU(0x01B82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23A0C: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23A10: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003BA18u; /* jal link before delay slot */ - psx_delay_BFC23A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23A14: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA14u); -#endif - if (psx_delay_BFC23A10) { - psx_delay_BFC23A10 = 0; - cpu->gpr[31] = 0x8003BA18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC23A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23A18: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BA18u); -#endif - /* 0xBFC23A1C: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA1Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC23A20: 0012C8C0 sll $t9, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] << 3u; - PGXP_ALU(0x0012C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23A24: 001370C0 sll $t6, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001370C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23A28: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23A2C: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC23A30: 0332C823 subu $t9, $t9, $s2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[18]; - PGXP_ALU(0x0332C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23A34: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC23A38: 020E7821 addu $t7, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008010u); -#endif - /* 0xBFC23A3C: 01F92021 addu $a0, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[25]; - PGXP_ALU(0x01F92021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23A40: 0C0112B8 jal 0xB0044AE0 */ - cpu->gpr[31] = 0x8003BA48u; /* jal link before delay slot */ - psx_delay_BFC23A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23A44: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA44u); -#endif - if (psx_delay_BFC23A40) { - psx_delay_BFC23A40 = 0; - cpu->gpr[31] = 0x8003BA48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AE0u); - cpu->pc = 0x80044AE0u; return; - } -label_BFC23A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA48u); -#endif - /* 0xBFC23A48: 8FA30040 lw $v1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30040u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC23A4C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA50u); -#endif - /* 0xBFC23A50: 8D8C3B68 lw $t4, 15208($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 15208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (15208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA50u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C3B68u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA50u); -#endif - /* 0xBFC23A54: 8C6D0018 lw $t5, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA54u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23A58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC23A5C: 158D0006 bne $t4, $t5, 0xBFC23A78 */ - uint32_t psx_brA_BFC23A5C = cpu->gpr[12]; uint32_t psx_brB_BFC23A5C = cpu->gpr[13]; - psx_taken_BFC23A5C = (psx_brA_BFC23A5C != psx_brB_BFC23A5C); - psx_delay_BFC23A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA60u); -#endif - /* 0xBFC23A60: 8FB80098 lw $t8, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA60u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80098u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA60u); -#endif - if (psx_delay_BFC23A5C) { - psx_delay_BFC23A5C = 0; - if (psx_taken_BFC23A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BA78u); - goto label_BFC23A78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BA64u); - } -label_BFC23A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA64u); -#endif - /* 0xBFC23A64: 8C6A0008 lw $t2, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA64u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA64u); -#endif - /* 0xBFC23A68: 8C6B000C lw $t3, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA68u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23A6C: 1000000D beq $zero, $zero, 0xBFC23AA4 */ - uint32_t psx_brA_BFC23A6C = cpu->gpr[0]; uint32_t psx_brB_BFC23A6C = cpu->gpr[0]; - psx_taken_BFC23A6C = (psx_brA_BFC23A6C == psx_brB_BFC23A6C); - psx_delay_BFC23A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23A70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BA70u); -#endif - if (psx_delay_BFC23A6C) { - psx_delay_BFC23A6C = 0; - if (psx_taken_BFC23A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BAA4u); - goto label_BFC23AA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BA74u); - } -label_BFC23A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA74u); -#endif - /* 0xBFC23A74: 8FB80098 lw $t8, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA74u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80098u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA74u); -#endif -label_BFC23A78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23A78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23A78: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC23A7C: 00187080 sll $t6, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 2u; - PGXP_ALU(0x00187080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC23A80: 01D87023 subu $t6, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[24]; - PGXP_ALU(0x01D87023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23A84: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC23A88: 01D87023 subu $t6, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[24]; - PGXP_ALU(0x01D87023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23A8C: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23A90: 25EFDBA0 addiu $t7, $t7, -9312 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-9312)); - PGXP_ALU(0x25EFDBA0u, cpu->gpr[15], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC23A94: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA94u); -#endif - /* 0xBFC23A98: 8C4A0008 lw $t2, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA98u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x8C4A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA98u); -#endif - /* 0xBFC23A9C: 8C4B000C lw $t3, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BA9Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BAA0u); -#endif -label_BFC23AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23AA4: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BAA4u); -#endif - /* 0xBFC23AA8: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BAA8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC23AAC: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC23AB0: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC23AB4: 24090010 addiu $t1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24090010u, cpu->gpr[9], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAB4u); -#endif -label_BFC23AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAB8u); -#endif - /* 0xBFC23AB8: 8CB90018 lw $t9, 24($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BAB8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20u); } - PGXP_LOAD(0x8CB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23ABC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC23AC0: 1199001E beq $t4, $t9, 0xBFC23B3C */ - uint32_t psx_brA_BFC23AC0 = cpu->gpr[12]; uint32_t psx_brB_BFC23AC0 = cpu->gpr[25]; - psx_taken_BFC23AC0 = (psx_brA_BFC23AC0 == psx_brB_BFC23AC0); - psx_delay_BFC23AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BAC4u); -#endif - if (psx_delay_BFC23AC0) { - psx_delay_BFC23AC0 = 0; - if (psx_taken_BFC23AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BB3Cu); - goto label_BFC23B3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BAC8u); - } -label_BFC23AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23AC8: 001370C0 sll $t6, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001370C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAC8u); -#endif - /* 0xBFC23ACC: 8CAD0008 lw $t5, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BACCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x8CAD0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23AD0: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC23AD4: 001178C0 sll $t7, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001178C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC23AD8: 01F17823 subu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[17]; - PGXP_ALU(0x01F17823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23ADC: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14004u); -#endif - /* 0xBFC23AE0: 020E1021 addu $v0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23AE4: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2440u); -#endif - /* 0xBFC23AE8: 01AA3023 subu $a2, $t5, $t2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[6] = cpu->gpr[13] - cpu->gpr[10]; - PGXP_ALU(0x01AA3023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Cu); -#endif - /* 0xBFC23AEC: 004F1821 addu $v1, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC23AF0: 001268C0 sll $t5, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[18] << 3u; - PGXP_ALU(0x001268C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAF0u); -#endif - /* 0xBFC23AF4: 8CB8000C lw $t8, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BAF4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x8CB8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAF4u); -#endif - /* 0xBFC23AF8: 90790024 lbu $t9, 36($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 36; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (36)), 25, 0x8u); - PGXP_LOAD(0x90790024u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC23AFC: 01B26823 subu $t5, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[18]; - PGXP_ALU(0x01B26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23B00: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2014u); -#endif - /* 0xBFC23B04: 004D2021 addu $a0, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[13]; - PGXP_ALU(0x004D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000900u); -#endif - /* 0xBFC23B08: 030B4023 subu $t0, $t8, $t3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[8] = cpu->gpr[24] - cpu->gpr[11]; - PGXP_ALU(0x030B4023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC23B0C: ACB90000 sw $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB0Cu); return; } g_debug_last_store_pc = 0x8003BB0Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACB90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB10u); -#endif - /* 0xBFC23B10: 90980024 lbu $t8, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (36)), 24, 0x10u); - PGXP_LOAD(0x90980024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23B14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC23B18: ACB80004 sw $t8, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB18u); return; } g_debug_last_store_pc = 0x8003BB18u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB18u); -#endif - /* 0xBFC23B1C: 906E0025 lbu $t6, 37($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 37; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (37)), 14, 0x8u); - PGXP_LOAD(0x906E0025u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23B20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC23B24: 01C67821 addu $t7, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[14] + cpu->gpr[6]; - PGXP_ALU(0x01C67821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC23B28: ACAF0008 sw $t7, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB28u); return; } g_debug_last_store_pc = 0x8003BB28u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB28u); -#endif - /* 0xBFC23B2C: 90990025 lbu $t9, 37($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 37; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (37)), 25, 0x10u); - PGXP_LOAD(0x90990025u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23B30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002100u); -#endif - /* 0xBFC23B34: 03286821 addu $t5, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[13] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03286821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC23B38: ACAD000C sw $t5, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB38u); return; } g_debug_last_store_pc = 0x8003BB38u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xACAD000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB38u); -#endif -label_BFC23B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC23B3C: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC23B40: 14E9FFDD bne $a3, $t1, 0xBFC23AB8 */ - uint32_t psx_brA_BFC23B40 = cpu->gpr[7]; uint32_t psx_brB_BFC23B40 = cpu->gpr[9]; - psx_taken_BFC23B40 = (psx_brA_BFC23B40 != psx_brB_BFC23B40); - psx_delay_BFC23B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23B44: 24A5005C addiu $a1, $a1, 92 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (92)); - PGXP_ALU(0x24A5005Cu, cpu->gpr[5], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB44u); -#endif - if (psx_delay_BFC23B40) { - psx_delay_BFC23B40 = 0; - if (psx_taken_BFC23B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BAB8u); - goto label_BFC23AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BB48u); - } -label_BFC23B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB48u); -#endif - /* 0xBFC23B48: 8E8C0018 lw $t4, 24($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB48u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x100000u); } - PGXP_LOAD(0x8E8C0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23B4C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC23B50: AC2C3B68 sw $t4, 15208($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB50u); return; } g_debug_last_store_pc = 0x8003BB50u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C3B68u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB50u); -#endif -label_BFC23B54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23B54: 0013C880 sll $t9, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23B58: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23B5C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23B60: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23B64: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23B68: 0013C0C0 sll $t8, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 3u; - PGXP_ALU(0x0013C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC23B6C: 0313C023 subu $t8, $t8, $s3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[19]; - PGXP_ALU(0x0313C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23B70: 0333C823 subu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[19]; - PGXP_ALU(0x0333C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23B74: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BB74u); -#endif - /* 0xBFC23B78: 8DADFF58 lw $t5, -168($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BB78u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADFF58u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23B7C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23B80: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC23B84: 001178C0 sll $t7, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001178C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC23B88: 01F17823 subu $t7, $t7, $s1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[17]; - PGXP_ALU(0x01F17823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1014000u); -#endif - /* 0xBFC23B8C: 02187021 addu $t6, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02187021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23B90: 0333C821 addu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[19]; - PGXP_ALU(0x0333C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23B94: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23B98: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC23B9C: 000DC0C0 sll $t8, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000DC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC23BA0: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC23BA4: 0333C821 addu $t9, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[19]; - PGXP_ALU(0x0333C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC23BA8: 030DC023 subu $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[13]; - PGXP_ALU(0x030DC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23BAC: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC23BB0: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23BB4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23BB8: 25EFA7D8 addiu $t7, $t7, -22568 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22568)); - PGXP_ALU(0x25EFA7D8u, cpu->gpr[15], _pgx1, 0xFFFFA7D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC23BBC: 03387021 addu $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x03387021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC23BC0: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23BC4: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x8003BBCCu; /* jal link before delay slot */ - psx_delay_BFC23BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23BC8: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBC8u); -#endif - if (psx_delay_BFC23BC4) { - psx_delay_BFC23BC4 = 0; - cpu->gpr[31] = 0x8003BBCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC23BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23BCC: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBD0u); -#endif - /* 0xBFC23BD0: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BBD0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23BD4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23BD8: 00137080 sll $t6, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00137080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23BDC: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23BE0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23BE4: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23BE8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23BEC: 001368C0 sll $t5, $s3, 3 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[19] << 3u; - PGXP_ALU(0x001368C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000u); -#endif - /* 0xBFC23BF0: 01B36823 subu $t5, $t5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[19]; - PGXP_ALU(0x01B36823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23BF4: 01D37023 subu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[19]; - PGXP_ALU(0x01D37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBF4u); -#endif - /* 0xBFC23BF8: 8DEFFF58 lw $t7, -168($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BBF8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFFF58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23BFC: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23C00: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC23C04: 0012C0C0 sll $t8, $s2, 3 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[18] << 3u; - PGXP_ALU(0x0012C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC23C08: 0312C023 subu $t8, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[18]; - PGXP_ALU(0x0312C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2012000u); -#endif - /* 0xBFC23C0C: 020DC821 addu $t9, $s0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[16] + cpu->gpr[13]; - PGXP_ALU(0x020DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23C10: 01D37021 addu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[19]; - PGXP_ALU(0x01D37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23C14: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23C18: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC23C1C: 000F68C0 sll $t5, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC23C20: 03382021 addu $a0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x03382021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC23C24: 01D37021 addu $t6, $t6, $s3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[19]; - PGXP_ALU(0x01D37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC23C28: 01AF6823 subu $t5, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[15]; - PGXP_ALU(0x01AF6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23C2C: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23C30: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23C34: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23C38: 2718A848 addiu $t8, $t8, -22456 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-22456)); - PGXP_ALU(0x2718A848u, cpu->gpr[24], _pgx1, 0xFFFFA848u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006000u); -#endif - /* 0xBFC23C3C: 01CDC821 addu $t9, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CDC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC23C40: 03382821 addu $a1, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x03382821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23C44: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x8003BC4Cu; /* jal link before delay slot */ - psx_delay_BFC23C44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23C48: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC48u); -#endif - if (psx_delay_BFC23C44) { - psx_delay_BFC23C44 = 0; - cpu->gpr[31] = 0x8003BC4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC23C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC23C4C: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC50u); -#endif - /* 0xBFC23C50: 8E739E24 lw $s3, -25052($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BC50u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x80000u); } - PGXP_LOAD(0x8E739E24u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC23C54: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C58: 00137880 sll $t7, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00137880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C5C: 01F37823 subu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[19]; - PGXP_ALU(0x01F37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23C60: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C64: 01F37823 subu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[19]; - PGXP_ALU(0x01F37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23C68: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C6C: 01F37823 subu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[19]; - PGXP_ALU(0x01F37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC70u); -#endif - /* 0xBFC23C70: 8DCEFF58 lw $t6, -168($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BC70u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEFF58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23C74: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C78: 01F37821 addu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[19]; - PGXP_ALU(0x01F37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23C7C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC23C80: 000E68C0 sll $t5, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[13] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC23C84: 01F37821 addu $t7, $t7, $s3 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[19]; - PGXP_ALU(0x01F37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC23C88: 01AE6823 subu $t5, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC88u); -#endif - /* 0xBFC23C8C: 8E830000 lw $v1, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BC8Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100000u); } - PGXP_LOAD(0x8E830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BC90u); -#endif - /* 0xBFC23C90: 8E860008 lw $a2, 8($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BC90u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x100000u); } - PGXP_LOAD(0x8E860008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC90u); -#endif - /* 0xBFC23C94: 8E88000C lw $t0, 12($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BC94u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100000u); } - PGXP_LOAD(0x8E88000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC23C98: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC23C9C: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23CA0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BCA0u); -#endif - /* 0xBFC23CA4: 8E870004 lw $a3, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BCA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x100000u); } - PGXP_LOAD(0x8E870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC23CA8: 2718A8B8 addiu $t8, $t8, -22344 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-22344)); - PGXP_ALU(0x2718A8B8u, cpu->gpr[24], _pgx1, 0xFFFFA8B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200A000u); -#endif - /* 0xBFC23CAC: 01EDC821 addu $t9, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01EDC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC23CB0: 03381021 addu $v0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x03381021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC23CB4: A043FF44 sb $v1, -188($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -188; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-188)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA043FF44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC23CB8: A043FF54 sb $v1, -172($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -172; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-172)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA043FF54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC23CBC: A047FFB4 sb $a3, -76($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -76; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-76)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA047FFB4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC23CC0: A047FFC4 sb $a3, -60($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -60; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-60)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA047FFC4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC23CC4: 246500FF addiu $a1, $v1, 255 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (255)); - PGXP_ALU(0x246500FFu, cpu->gpr[5], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23CC8: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC23CCC: A045FF4C sb $a1, -180($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -180; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-180)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA045FF4Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC23CD0: A045FF5C sb $a1, -164($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -164; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-164)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA045FF5Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC23CD4: 30C400FF andi $a0, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30C400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC23CD8: A044FF45 sb $a0, -187($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -187; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-187)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FF45u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC23CDC: A044FF4D sb $a0, -179($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -179; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCDCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-179)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FF4Du, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC23CE0: 24C9000F addiu $t1, $a2, 15 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[6] + (15)); - PGXP_ALU(0x24C9000Fu, cpu->gpr[9], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC23CE4: 2505000F addiu $a1, $t0, 15 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[8] + (15)); - PGXP_ALU(0x2505000Fu, cpu->gpr[5], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC23CE8: 24E400FF addiu $a0, $a3, 255 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] + (255)); - PGXP_ALU(0x24E400FFu, cpu->gpr[4], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC23CEC: 312900FF andi $t1, $t1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFu; - PGXP_ALU(0x312900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23CF0: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23CF4: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC23CF8: 310300FF andi $v1, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC23CFC: A049FF55 sb $t1, -171($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -171; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BCFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-171)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FF55u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC23D00: A049FF5D sb $t1, -163($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -163; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD00u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-163)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FF5Du, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC23D04: A043FFB5 sb $v1, -75($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -75; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-75)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA043FFB5u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC23D08: A043FFBD sb $v1, -67($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -67; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-67)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA043FFBDu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC23D0C: A045FFC5 sb $a1, -59($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -59; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-59)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA045FFC5u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC23D10: A045FFCD sb $a1, -51($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -51; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-51)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA045FFCDu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC23D14: A044FFBC sb $a0, -68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -68; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-68)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FFBCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC23D18: A044FFCC sb $a0, -52($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -52; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BD18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-52)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA044FFCCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD18u); -#endif - /* 0xBFC23D1C: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD20u); -#endif - /* 0xBFC23D20: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD20u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD20u); -#endif - /* 0xBFC23D24: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD24u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD24u); -#endif - /* 0xBFC23D28: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD28u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD28u); -#endif - /* 0xBFC23D2C: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD2Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD30u); -#endif - /* 0xBFC23D30: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD30u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC23D34: 03E00008 jr $ra */ - psx_delay_BFC23D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23D38: 27BD00A0 addiu $sp, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27BD00A0u, cpu->gpr[29], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD38u); -#endif - if (psx_delay_BFC23D34) { - psx_delay_BFC23D34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC23D3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC23D3Cu); - int psx_delay_BFC23D54 = 0; - int psx_taken_BFC23D54 = 0; - int psx_delay_BFC23D5C = 0; - int psx_taken_BFC23D5C = 0; - int psx_delay_BFC23D6C = 0; - int psx_delay_BFC23D80 = 0; - int psx_delay_BFC23D88 = 0; - int psx_taken_BFC23D88 = 0; - int psx_delay_BFC23D98 = 0; - int psx_delay_BFC23DAC = 0; - int psx_delay_BFC23DB8 = 0; - int psx_delay_BFC23DCC = 0; - int psx_delay_BFC23DDC = 0; - int psx_delay_BFC23DE8 = 0; - int psx_delay_BFC23DF8 = 0; - int psx_delay_BFC23E08 = 0; - int psx_delay_BFC23E18 = 0; - int psx_delay_BFC23E24 = 0; - int psx_delay_BFC23E30 = 0; - int psx_taken_BFC23E30 = 0; - int psx_delay_BFC23E44 = 0; - int psx_taken_BFC23E44 = 0; - int psx_delay_BFC23E68 = 0; - int psx_delay_BFC23E74 = 0; - int psx_taken_BFC23E74 = 0; - int psx_delay_BFC23E84 = 0; - int psx_taken_BFC23E84 = 0; - int psx_delay_BFC23E94 = 0; - int psx_delay_BFC23EA8 = 0; - int psx_taken_BFC23EA8 = 0; - int psx_delay_BFC23EC0 = 0; - int psx_delay_BFC23ED8 = 0; - int psx_delay_BFC23EE4 = 0; - int psx_taken_BFC23EE4 = 0; - int psx_delay_BFC23EFC = 0; - int psx_delay_BFC23F10 = 0; - int psx_taken_BFC23F10 = 0; - int psx_delay_BFC23F20 = 0; - int psx_delay_BFC23F2C = 0; - int psx_delay_BFC23F38 = 0; - int psx_taken_BFC23F38 = 0; - int psx_delay_BFC23F50 = 0; - int psx_delay_BFC23F64 = 0; - int psx_delay_BFC23F6C = 0; - int psx_taken_BFC23F6C = 0; - int psx_delay_BFC23F90 = 0; - int psx_delay_BFC23F9C = 0; - int psx_taken_BFC23F9C = 0; - int psx_delay_BFC23FAC = 0; - int psx_taken_BFC23FAC = 0; - int psx_delay_BFC23FBC = 0; - int psx_delay_BFC23FCC = 0; - int psx_delay_BFC23FEC = 0; - int psx_delay_BFC23FF4 = 0; - int psx_taken_BFC23FF4 = 0; - int psx_delay_BFC2400C = 0; - int psx_taken_BFC2400C = 0; - int psx_delay_BFC24020 = 0; - int psx_taken_BFC24020 = 0; - int psx_delay_BFC24034 = 0; - int psx_taken_BFC24034 = 0; - int psx_delay_BFC24050 = 0; - int psx_delay_BFC2405C = 0; - int psx_taken_BFC2405C = 0; - int psx_delay_BFC2406C = 0; - int psx_taken_BFC2406C = 0; - int psx_delay_BFC2407C = 0; - int psx_delay_BFC2408C = 0; - int psx_delay_BFC240B4 = 0; - int psx_delay_BFC240C4 = 0; - int psx_delay_BFC240CC = 0; - int psx_delay_BFC240D4 = 0; - int psx_taken_BFC240D4 = 0; - int psx_delay_BFC240E4 = 0; - int psx_taken_BFC240E4 = 0; - int psx_delay_BFC24100 = 0; - int psx_delay_BFC2410C = 0; - int psx_taken_BFC2410C = 0; - int psx_delay_BFC2411C = 0; - int psx_taken_BFC2411C = 0; - int psx_delay_BFC2412C = 0; - int psx_delay_BFC2413C = 0; - int psx_delay_BFC24164 = 0; - int psx_delay_BFC24174 = 0; - int psx_delay_BFC2417C = 0; - int psx_delay_BFC24184 = 0; - int psx_taken_BFC24184 = 0; - int psx_delay_BFC241B0 = 0; - int psx_taken_BFC241B0 = 0; - int psx_delay_BFC241C8 = 0; - int psx_delay_BFC241D8 = 0; - int psx_delay_BFC24200 = 0; - int psx_delay_BFC24210 = 0; - int psx_delay_BFC24220 = 0; - int psx_delay_BFC24230 = 0; - int psx_taken_BFC24230 = 0; - int psx_delay_BFC24240 = 0; - int psx_taken_BFC24240 = 0; - int psx_delay_BFC24248 = 0; - int psx_taken_BFC24248 = 0; - int psx_delay_BFC24254 = 0; - int psx_taken_BFC24254 = 0; - int psx_delay_BFC24264 = 0; - int psx_taken_BFC24264 = 0; - int psx_delay_BFC2426C = 0; - int psx_taken_BFC2426C = 0; - int psx_delay_BFC24280 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC23D5Cu: goto label_BFC23D5C; - case 0xBFC23D64u: goto label_BFC23D64; - case 0xBFC23D74u: goto label_BFC23D74; - case 0xBFC23D88u: goto label_BFC23D88; - case 0xBFC23D90u: goto label_BFC23D90; - case 0xBFC23DA0u: goto label_BFC23DA0; - case 0xBFC23DB4u: goto label_BFC23DB4; - case 0xBFC23DB8u: goto label_BFC23DB8; - case 0xBFC23DC0u: goto label_BFC23DC0; - case 0xBFC23DD4u: goto label_BFC23DD4; - case 0xBFC23DE4u: goto label_BFC23DE4; - case 0xBFC23DF0u: goto label_BFC23DF0; - case 0xBFC23E00u: goto label_BFC23E00; - case 0xBFC23E10u: goto label_BFC23E10; - case 0xBFC23E20u: goto label_BFC23E20; - case 0xBFC23E2Cu: goto label_BFC23E2C; - case 0xBFC23E38u: goto label_BFC23E38; - case 0xBFC23E4Cu: goto label_BFC23E4C; - case 0xBFC23E54u: goto label_BFC23E54; - case 0xBFC23E70u: goto label_BFC23E70; - case 0xBFC23E7Cu: goto label_BFC23E7C; - case 0xBFC23E8Cu: goto label_BFC23E8C; - case 0xBFC23E9Cu: goto label_BFC23E9C; - case 0xBFC23EB0u: goto label_BFC23EB0; - case 0xBFC23EB4u: goto label_BFC23EB4; - case 0xBFC23EC8u: goto label_BFC23EC8; - case 0xBFC23EE0u: goto label_BFC23EE0; - case 0xBFC23EECu: goto label_BFC23EEC; - case 0xBFC23F04u: goto label_BFC23F04; - case 0xBFC23F18u: goto label_BFC23F18; - case 0xBFC23F28u: goto label_BFC23F28; - case 0xBFC23F34u: goto label_BFC23F34; - case 0xBFC23F40u: goto label_BFC23F40; - case 0xBFC23F58u: goto label_BFC23F58; - case 0xBFC23F6Cu: goto label_BFC23F6C; - case 0xBFC23F74u: goto label_BFC23F74; - case 0xBFC23F7Cu: goto label_BFC23F7C; - case 0xBFC23F98u: goto label_BFC23F98; - case 0xBFC23FA4u: goto label_BFC23FA4; - case 0xBFC23FB4u: goto label_BFC23FB4; - case 0xBFC23FC4u: goto label_BFC23FC4; - case 0xBFC23FD4u: goto label_BFC23FD4; - case 0xBFC23FF4u: goto label_BFC23FF4; - case 0xBFC23FFCu: goto label_BFC23FFC; - case 0xBFC24014u: goto label_BFC24014; - case 0xBFC24028u: goto label_BFC24028; - case 0xBFC2403Cu: goto label_BFC2403C; - case 0xBFC24058u: goto label_BFC24058; - case 0xBFC24064u: goto label_BFC24064; - case 0xBFC24074u: goto label_BFC24074; - case 0xBFC24084u: goto label_BFC24084; - case 0xBFC24094u: goto label_BFC24094; - case 0xBFC240BCu: goto label_BFC240BC; - case 0xBFC240CCu: goto label_BFC240CC; - case 0xBFC240D4u: goto label_BFC240D4; - case 0xBFC240DCu: goto label_BFC240DC; - case 0xBFC240E0u: goto label_BFC240E0; - case 0xBFC240ECu: goto label_BFC240EC; - case 0xBFC24108u: goto label_BFC24108; - case 0xBFC24114u: goto label_BFC24114; - case 0xBFC24124u: goto label_BFC24124; - case 0xBFC24134u: goto label_BFC24134; - case 0xBFC24144u: goto label_BFC24144; - case 0xBFC2416Cu: goto label_BFC2416C; - case 0xBFC2417Cu: goto label_BFC2417C; - case 0xBFC24184u: goto label_BFC24184; - case 0xBFC2418Cu: goto label_BFC2418C; - case 0xBFC241B8u: goto label_BFC241B8; - case 0xBFC241D0u: goto label_BFC241D0; - case 0xBFC241E0u: goto label_BFC241E0; - case 0xBFC24208u: goto label_BFC24208; - case 0xBFC24218u: goto label_BFC24218; - case 0xBFC24228u: goto label_BFC24228; - case 0xBFC24238u: goto label_BFC24238; - case 0xBFC24248u: goto label_BFC24248; - case 0xBFC24250u: goto label_BFC24250; - case 0xBFC24254u: goto label_BFC24254; - case 0xBFC2425Cu: goto label_BFC2425C; - case 0xBFC2426Cu: goto label_BFC2426C; - case 0xBFC24274u: goto label_BFC24274; - case 0xBFC24278u: goto label_BFC24278; - case 0xBFC2427Cu: goto label_BFC2427C; - default: break; - } - } -label_BFC23D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC23D3C: 27BDFF40 addiu $sp, $sp, -192 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-192)); - PGXP_ALU(0x27BDFF40u, cpu->gpr[29], _pgx1, 0xFFFFFF40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC23D40: AFA500C4 sw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD40u); return; } g_debug_last_store_pc = 0x8003BD40u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD40u); -#endif - /* 0xBFC23D44: 8FAE00C4 lw $t6, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00C4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC23D48: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD48u); return; } g_debug_last_store_pc = 0x8003BD48u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC23D4C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD4Cu); return; } g_debug_last_store_pc = 0x8003BD4Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC23D50: AFA600C8 sw $a2, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BD50u); return; } g_debug_last_store_pc = 0x8003BD50u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA600C8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC23D54: 11C000AF beq $t6, $zero, 0xBFC24014 */ - uint32_t psx_brA_BFC23D54 = cpu->gpr[14]; uint32_t psx_brB_BFC23D54 = cpu->gpr[0]; - psx_taken_BFC23D54 = (psx_brA_BFC23D54 == psx_brB_BFC23D54); - psx_delay_BFC23D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC23D58: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD58u); -#endif - if (psx_delay_BFC23D54) { - psx_delay_BFC23D54 = 0; - if (psx_taken_BFC23D54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C014u); - goto label_BFC24014; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD5Cu); - } -label_BFC23D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC23D5C: 1480000C bne $a0, $zero, 0xBFC23D90 */ - uint32_t psx_brA_BFC23D5C = cpu->gpr[4]; uint32_t psx_brB_BFC23D5C = cpu->gpr[0]; - psx_taken_BFC23D5C = (psx_brA_BFC23D5C != psx_brB_BFC23D5C); - psx_delay_BFC23D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23D60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BD60u); -#endif - if (psx_delay_BFC23D5C) { - psx_delay_BFC23D5C = 0; - if (psx_taken_BFC23D5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD90u); - goto label_BFC23D90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD64u); - } -label_BFC23D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D64: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D68: 24A56B08 addiu $a1, $a1, 27400 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27400)); - PGXP_ALU(0x24A56B08u, cpu->gpr[5], _pgx1, 0x00006B08u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23D6C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BD74u; /* jal link before delay slot */ - psx_delay_BFC23D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23D70: 27A40038 addiu $a0, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A40038u, cpu->gpr[4], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD70u); -#endif - if (psx_delay_BFC23D6C) { - psx_delay_BFC23D6C = 0; - cpu->gpr[31] = 0x8003BD74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23D74: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D78: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D7C: 24A56B10 addiu $a1, $a1, 27408 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27408)); - PGXP_ALU(0x24A56B10u, cpu->gpr[5], _pgx1, 0x00006B10u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23D80: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BD88u; /* jal link before delay slot */ - psx_delay_BFC23D80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23D84: 2484A518 addiu $a0, $a0, -23272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23272)); - PGXP_ALU(0x2484A518u, cpu->gpr[4], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD84u); -#endif - if (psx_delay_BFC23D80) { - psx_delay_BFC23D80 = 0; - cpu->gpr[31] = 0x8003BD88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23D88: 1000000B beq $zero, $zero, 0xBFC23DB8 */ - uint32_t psx_brA_BFC23D88 = cpu->gpr[0]; uint32_t psx_brB_BFC23D88 = cpu->gpr[0]; - psx_taken_BFC23D88 = (psx_brA_BFC23D88 == psx_brB_BFC23D88); - psx_delay_BFC23D88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23D8C: 27A40080 addiu $a0, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27A40080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD8Cu); -#endif - if (psx_delay_BFC23D88) { - psx_delay_BFC23D88 = 0; - if (psx_taken_BFC23D88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BDB8u); - goto label_BFC23DB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD90u); - } -label_BFC23D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D90: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23D94: 24A56B18 addiu $a1, $a1, 27416 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27416)); - PGXP_ALU(0x24A56B18u, cpu->gpr[5], _pgx1, 0x00006B18u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23D98: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BDA0u; /* jal link before delay slot */ - psx_delay_BFC23D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23D9C: 27A40038 addiu $a0, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A40038u, cpu->gpr[4], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BD9Cu); -#endif - if (psx_delay_BFC23D98) { - psx_delay_BFC23D98 = 0; - cpu->gpr[31] = 0x8003BDA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DA0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DA4: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DA8: 24A56B20 addiu $a1, $a1, 27424 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27424)); - PGXP_ALU(0x24A56B20u, cpu->gpr[5], _pgx1, 0x00006B20u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DAC: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BDB4u; /* jal link before delay slot */ - psx_delay_BFC23DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DB0: 2484A518 addiu $a0, $a0, -23272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23272)); - PGXP_ALU(0x2484A518u, cpu->gpr[4], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDB0u); -#endif - if (psx_delay_BFC23DAC) { - psx_delay_BFC23DAC = 0; - cpu->gpr[31] = 0x8003BDB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23DB4: 27A40080 addiu $a0, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27A40080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDB4u); -#endif -label_BFC23DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DB8: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BDC0u; /* jal link before delay slot */ - psx_delay_BFC23DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC23DBC: 27A50038 addiu $a1, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A50038u, cpu->gpr[5], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDBCu); -#endif - if (psx_delay_BFC23DB8) { - psx_delay_BFC23DB8 = 0; - cpu->gpr[31] = 0x8003BDC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DC0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DC4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DC8: 24A5A518 addiu $a1, $a1, -23272 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23272)); - PGXP_ALU(0x24A5A518u, cpu->gpr[5], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DCC: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BDD4u; /* jal link before delay slot */ - psx_delay_BFC23DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DD0: 2484A4D8 addiu $a0, $a0, -23336 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23336)); - PGXP_ALU(0x2484A4D8u, cpu->gpr[4], _pgx1, 0xFFFFA4D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDD0u); -#endif - if (psx_delay_BFC23DCC) { - psx_delay_BFC23DCC = 0; - cpu->gpr[31] = 0x8003BDD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DD4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23DD8: 24A5A518 addiu $a1, $a1, -23272 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23272)); - PGXP_ALU(0x24A5A518u, cpu->gpr[5], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DDC: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BDE4u; /* jal link before delay slot */ - psx_delay_BFC23DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23DE0: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDE0u); -#endif - if (psx_delay_BFC23DDC) { - psx_delay_BFC23DDC = 0; - cpu->gpr[31] = 0x8003BDE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDE4u); -#endif - /* 0xBFC23DE4: 8FA500C4 lw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BDE4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DE8: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003BDF0u; /* jal link before delay slot */ - psx_delay_BFC23DE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23DEC: 27A40080 addiu $a0, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27A40080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDECu); -#endif - if (psx_delay_BFC23DE8) { - psx_delay_BFC23DE8 = 0; - cpu->gpr[31] = 0x8003BDF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC23DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DF0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BDF0u); -#endif - /* 0xBFC23DF4: 8FA500C4 lw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BDF4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23DF8: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003BE00u; /* jal link before delay slot */ - psx_delay_BFC23DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23DFC: 2484A4D8 addiu $a0, $a0, -23336 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23336)); - PGXP_ALU(0x2484A4D8u, cpu->gpr[4], _pgx1, 0xFFFFA4D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BDFCu); -#endif - if (psx_delay_BFC23DF8) { - psx_delay_BFC23DF8 = 0; - cpu->gpr[31] = 0x8003BE00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC23E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23E00: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23E04: 24A56B28 addiu $a1, $a1, 27432 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27432)); - PGXP_ALU(0x24A56B28u, cpu->gpr[5], _pgx1, 0x00006B28u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23E08: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003BE10u; /* jal link before delay slot */ - psx_delay_BFC23E08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23E0C: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE0Cu); -#endif - if (psx_delay_BFC23E08) { - psx_delay_BFC23E08 = 0; - cpu->gpr[31] = 0x8003BE10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC23E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23E10: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE10u); -#endif - /* 0xBFC23E14: 8FA500C4 lw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE14u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23E18: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003BE20u; /* jal link before delay slot */ - psx_delay_BFC23E18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC23E1C: 2484A188 addiu $a0, $a0, -24184 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24184)); - PGXP_ALU(0x2484A188u, cpu->gpr[4], _pgx1, 0xFFFFA188u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE1Cu); -#endif - if (psx_delay_BFC23E18) { - psx_delay_BFC23E18 = 0; - cpu->gpr[31] = 0x8003BE20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC23E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23E20: 27A40080 addiu $a0, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27A40080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23E24: 0C016AAC jal 0xB005AAB0 */ - cpu->gpr[31] = 0x8003BE2Cu; /* jal link before delay slot */ - psx_delay_BFC23E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23E28: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE28u); -#endif - if (psx_delay_BFC23E24) { - psx_delay_BFC23E24 = 0; - cpu->gpr[31] = 0x8003BE2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAB0u); - cpu->pc = 0x8005AAB0u; return; - } -label_BFC23E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23E2C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC23E30: 14410006 bne $v0, $at, 0xBFC23E4C */ - uint32_t psx_brA_BFC23E30 = cpu->gpr[2]; uint32_t psx_brB_BFC23E30 = cpu->gpr[1]; - psx_taken_BFC23E30 = (psx_brA_BFC23E30 != psx_brB_BFC23E30); - psx_delay_BFC23E30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC23E34: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE34u); -#endif - if (psx_delay_BFC23E30) { - psx_delay_BFC23E30 = 0; - if (psx_taken_BFC23E30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE4Cu); - goto label_BFC23E4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE38u); - } -label_BFC23E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23E38: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23E3C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23E40: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE40u); return; } g_debug_last_store_pc = 0x8003BE40u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23E44: 1000010C beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC23E44 = cpu->gpr[0]; uint32_t psx_brB_BFC23E44 = cpu->gpr[0]; - psx_taken_BFC23E44 = (psx_brA_BFC23E44 == psx_brB_BFC23E44); - psx_delay_BFC23E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC23E48: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE48u); -#endif - if (psx_delay_BFC23E44) { - psx_delay_BFC23E44 = 0; - if (psx_taken_BFC23E44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE4Cu); - } -label_BFC23E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23E4C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23E50: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE50u); return; } g_debug_last_store_pc = 0x8003BE50u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE50u); -#endif -label_BFC23E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC23E54: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE54u); -#endif - /* 0xBFC23E58: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE58u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23E5C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23E60: 24A5A1D0 addiu $a1, $a1, -24112 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24112)); - PGXP_ALU(0x24A5A1D0u, cpu->gpr[5], _pgx1, 0xFFFFA1D0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23E64: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23E68: 0C016AB0 jal 0xB005AAC0 */ - cpu->gpr[31] = 0x8003BE70u; /* jal link before delay slot */ - psx_delay_BFC23E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC23E6C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE6Cu); -#endif - if (psx_delay_BFC23E68) { - psx_delay_BFC23E68 = 0; - cpu->gpr[31] = 0x8003BE70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAC0u); - cpu->pc = 0x8005AAC0u; return; - } -label_BFC23E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23E70: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC23E74: 1441000F bne $v0, $at, 0xBFC23EB4 */ - uint32_t psx_brA_BFC23E74 = cpu->gpr[2]; uint32_t psx_brB_BFC23E74 = cpu->gpr[1]; - psx_taken_BFC23E74 = (psx_brA_BFC23E74 != psx_brB_BFC23E74); - psx_delay_BFC23E74 = 1; - /* 0xBFC23E78: 8FAF00C8 lw $t7, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE78u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00C8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE78u); -#endif - if (psx_delay_BFC23E74) { - psx_delay_BFC23E74 = 0; - if (psx_taken_BFC23E74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BEB4u); - goto label_BFC23EB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE7Cu); - } -label_BFC23E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC23E7C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC23E80: 2A01000A slti $at, $s0, 10 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0); - PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23E84: 1420FFF3 bne $at, $zero, 0xBFC23E54 */ - uint32_t psx_brA_BFC23E84 = cpu->gpr[1]; uint32_t psx_brB_BFC23E84 = cpu->gpr[0]; - psx_taken_BFC23E84 = (psx_brA_BFC23E84 != psx_brB_BFC23E84); - psx_delay_BFC23E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BE88u); -#endif - if (psx_delay_BFC23E84) { - psx_delay_BFC23E84 = 0; - if (psx_taken_BFC23E84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE54u); - goto label_BFC23E54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BE8Cu); - } -label_BFC23E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC23E8C: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE90u); -#endif - /* 0xBFC23E90: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BE90u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23E94: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BE9Cu; /* jal link before delay slot */ - psx_delay_BFC23E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC23E98: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE98u); -#endif - if (psx_delay_BFC23E94) { - psx_delay_BFC23E94 = 0; - cpu->gpr[31] = 0x8003BE9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23E9C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23EA0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23EA4: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BEA4u); return; } g_debug_last_store_pc = 0x8003BEA4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23EA8: 100000F3 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC23EA8 = cpu->gpr[0]; uint32_t psx_brB_BFC23EA8 = cpu->gpr[0]; - psx_taken_BFC23EA8 = (psx_brA_BFC23EA8 == psx_brB_BFC23EA8); - psx_delay_BFC23EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC23EAC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEACu); -#endif - if (psx_delay_BFC23EA8) { - psx_delay_BFC23EA8 = 0; - if (psx_taken_BFC23EA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BEB0u); - } -label_BFC23EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEB0u); -#endif - /* 0xBFC23EB0: 8FAF00C8 lw $t7, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BEB0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00C8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEB0u); -#endif -label_BFC23EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23EB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC23EB8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23EBC: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23EC0: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003BEC8u; /* jal link before delay slot */ - psx_delay_BFC23EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC23EC4: A02FA1D3 sb $t7, -24109($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24109; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003BEC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24109)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FA1D3u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEC4u); -#endif - if (psx_delay_BFC23EC0) { - psx_delay_BFC23EC0 = 0; - cpu->gpr[31] = 0x8003BEC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC23EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23EC8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BEC8u); -#endif - /* 0xBFC23ECC: 80A5A1D3 lb $a1, -24109($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24109; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-24109)), 5, 0x20u); - PGXP_LOAD(0x80A5A1D3u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23ED0: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23ED4: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23ED8: 0C016AAC jal 0xB005AAB0 */ - cpu->gpr[31] = 0x8003BEE0u; /* jal link before delay slot */ - psx_delay_BFC23ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23EDC: 34A50200 ori $a1, $a1, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x200u; - PGXP_ALU(0x34A50200u, cpu->gpr[5], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEDCu); -#endif - if (psx_delay_BFC23ED8) { - psx_delay_BFC23ED8 = 0; - cpu->gpr[31] = 0x8003BEE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAB0u); - cpu->pc = 0x8005AAB0u; return; - } -label_BFC23EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23EE0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC23EE4: 1441000C bne $v0, $at, 0xBFC23F18 */ - uint32_t psx_brA_BFC23EE4 = cpu->gpr[2]; uint32_t psx_brB_BFC23EE4 = cpu->gpr[1]; - psx_taken_BFC23EE4 = (psx_brA_BFC23EE4 != psx_brB_BFC23EE4); - psx_delay_BFC23EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC23EE8: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEE8u); -#endif - if (psx_delay_BFC23EE4) { - psx_delay_BFC23EE4 = 0; - if (psx_taken_BFC23EE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF18u); - goto label_BFC23F18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BEECu); - } -label_BFC23EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC23EEC: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BEF0u); -#endif - /* 0xBFC23EF0: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BEF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23EF4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC23EF8: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BEF8u); return; } g_debug_last_store_pc = 0x8003BEF8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23EFC: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BF04u; /* jal link before delay slot */ - psx_delay_BFC23EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC23F00: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF00u); -#endif - if (psx_delay_BFC23EFC) { - psx_delay_BFC23EFC = 0; - cpu->gpr[31] = 0x8003BF04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23F04: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23F08: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23F0C: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF0Cu); return; } g_debug_last_store_pc = 0x8003BF0Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23F10: 100000D9 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC23F10 = cpu->gpr[0]; uint32_t psx_brB_BFC23F10 = cpu->gpr[0]; - psx_taken_BFC23F10 = (psx_brA_BFC23F10 == psx_brB_BFC23F10); - psx_delay_BFC23F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC23F14: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF14u); -#endif - if (psx_delay_BFC23F10) { - psx_delay_BFC23F10 = 0; - if (psx_taken_BFC23F10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF18u); - } -label_BFC23F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23F18: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC23F1C: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF1Cu); return; } g_debug_last_store_pc = 0x8003BF1Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23F20: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BF28u; /* jal link before delay slot */ - psx_delay_BFC23F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC23F24: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF24u); -#endif - if (psx_delay_BFC23F20) { - psx_delay_BFC23F20 = 0; - cpu->gpr[31] = 0x8003BF28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23F28: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23F2C: 0C016AAC jal 0xB005AAB0 */ - cpu->gpr[31] = 0x8003BF34u; /* jal link before delay slot */ - psx_delay_BFC23F2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC23F30: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF30u); -#endif - if (psx_delay_BFC23F2C) { - psx_delay_BFC23F2C = 0; - cpu->gpr[31] = 0x8003BF34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAB0u); - cpu->pc = 0x8005AAB0u; return; - } -label_BFC23F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23F34: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC23F38: 1441000E bne $v0, $at, 0xBFC23F74 */ - uint32_t psx_brA_BFC23F38 = cpu->gpr[2]; uint32_t psx_brB_BFC23F38 = cpu->gpr[1]; - psx_taken_BFC23F38 = (psx_brA_BFC23F38 != psx_brB_BFC23F38); - psx_delay_BFC23F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC23F3C: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF3Cu); -#endif - if (psx_delay_BFC23F38) { - psx_delay_BFC23F38 = 0; - if (psx_taken_BFC23F38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF74u); - goto label_BFC23F74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF40u); - } -label_BFC23F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC23F40: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF40u); -#endif - /* 0xBFC23F44: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF44u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23F48: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC23F4C: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF4Cu); return; } g_debug_last_store_pc = 0x8003BF4Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23F50: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BF58u; /* jal link before delay slot */ - psx_delay_BFC23F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC23F54: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF54u); -#endif - if (psx_delay_BFC23F50) { - psx_delay_BFC23F50 = 0; - cpu->gpr[31] = 0x8003BF58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23F58: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23F5C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23F60: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF60u); return; } g_debug_last_store_pc = 0x8003BF60u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23F64: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003BF6Cu; /* jal link before delay slot */ - psx_delay_BFC23F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23F68: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF68u); -#endif - if (psx_delay_BFC23F64) { - psx_delay_BFC23F64 = 0; - cpu->gpr[31] = 0x8003BF6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC23F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23F6C: 100000C2 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC23F6C = cpu->gpr[0]; uint32_t psx_brB_BFC23F6C = cpu->gpr[0]; - psx_taken_BFC23F6C = (psx_brA_BFC23F6C == psx_brB_BFC23F6C); - psx_delay_BFC23F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC23F70: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF70u); -#endif - if (psx_delay_BFC23F6C) { - psx_delay_BFC23F6C = 0; - if (psx_taken_BFC23F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF74u); - } -label_BFC23F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23F74: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC23F78: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF78u); return; } g_debug_last_store_pc = 0x8003BF78u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF78u); -#endif -label_BFC23F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC23F7C: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF80u); -#endif - /* 0xBFC23F80: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BF80u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23F84: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC23F88: 24A5A1D0 addiu $a1, $a1, -24112 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24112)); - PGXP_ALU(0x24A5A1D0u, cpu->gpr[5], _pgx1, 0xFFFFA1D0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC23F8C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23F90: 0C016AB8 jal 0xB005AAE0 */ - cpu->gpr[31] = 0x8003BF98u; /* jal link before delay slot */ - psx_delay_BFC23F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC23F94: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF94u); -#endif - if (psx_delay_BFC23F90) { - psx_delay_BFC23F90 = 0; - cpu->gpr[31] = 0x8003BF98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAE0u); - cpu->pc = 0x8005AAE0u; return; - } -label_BFC23F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23F98: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC23F9C: 14410017 bne $v0, $at, 0xBFC23FFC */ - uint32_t psx_brA_BFC23F9C = cpu->gpr[2]; uint32_t psx_brB_BFC23F9C = cpu->gpr[1]; - psx_taken_BFC23F9C = (psx_brA_BFC23F9C != psx_brB_BFC23F9C); - psx_delay_BFC23F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23FA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BFA0u); -#endif - if (psx_delay_BFC23F9C) { - psx_delay_BFC23F9C = 0; - if (psx_taken_BFC23F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BFFCu); - goto label_BFC23FFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BFA4u); - } -label_BFC23FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC23FA4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC23FA8: 2A01000A slti $at, $s0, 10 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0); - PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC23FAC: 1420FFF3 bne $at, $zero, 0xBFC23F7C */ - uint32_t psx_brA_BFC23FAC = cpu->gpr[1]; uint32_t psx_brB_BFC23FAC = cpu->gpr[0]; - psx_taken_BFC23FAC = (psx_brA_BFC23FAC != psx_brB_BFC23FAC); - psx_delay_BFC23FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003BFB0u); -#endif - if (psx_delay_BFC23FAC) { - psx_delay_BFC23FAC = 0; - if (psx_taken_BFC23FAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BF7Cu); - goto label_BFC23F7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BFB4u); - } -label_BFC23FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC23FB4: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BFB4u); -#endif - /* 0xBFC23FB8: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BFB8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23FBC: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BFC4u; /* jal link before delay slot */ - psx_delay_BFC23FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC23FC0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFC0u); -#endif - if (psx_delay_BFC23FBC) { - psx_delay_BFC23FBC = 0; - cpu->gpr[31] = 0x8003BFC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC23FC4: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BFC4u); -#endif - /* 0xBFC23FC8: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BFC8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23FCC: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003BFD4u; /* jal link before delay slot */ - psx_delay_BFC23FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC23FD0: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFD0u); -#endif - if (psx_delay_BFC23FCC) { - psx_delay_BFC23FCC = 0; - cpu->gpr[31] = 0x8003BFD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC23FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC23FD4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23FD8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC23FDC: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BFDCu); return; } g_debug_last_store_pc = 0x8003BFDCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC23FE0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23FE4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC23FE8: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003BFE8u); return; } g_debug_last_store_pc = 0x8003BFE8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC23FEC: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003BFF4u; /* jal link before delay slot */ - psx_delay_BFC23FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC23FF0: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFF0u); -#endif - if (psx_delay_BFC23FEC) { - psx_delay_BFC23FEC = 0; - cpu->gpr[31] = 0x8003BFF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC23FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC23FF4: 100000A0 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC23FF4 = cpu->gpr[0]; uint32_t psx_brB_BFC23FF4 = cpu->gpr[0]; - psx_taken_BFC23FF4 = (psx_brA_BFC23FF4 == psx_brB_BFC23FF4); - psx_delay_BFC23FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC23FF8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003BFF8u); -#endif - if (psx_delay_BFC23FF4) { - psx_delay_BFC23FF4 = 0; - if (psx_taken_BFC23FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BFFCu); - } -label_BFC23FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC23FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC23FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC23FFC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24000: AC20A450 sw $zero, -23472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C000u); return; } g_debug_last_store_pc = 0x8003C000u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A450u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24004: 24020080 addiu $v0, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24020080u, cpu->gpr[2], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24008: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2400C: 1000009A beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC2400C = cpu->gpr[0]; uint32_t psx_brB_BFC2400C = cpu->gpr[0]; - psx_taken_BFC2400C = (psx_brA_BFC2400C == psx_brB_BFC2400C); - psx_delay_BFC2400C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24010: AC22A454 sw $v0, -23468($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23468; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C010u); return; } g_debug_last_store_pc = 0x8003C010u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A454u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C010u); -#endif - if (psx_delay_BFC2400C) { - psx_delay_BFC2400C = 0; - if (psx_taken_BFC2400C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C014u); - } -label_BFC24014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24014: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C014u); -#endif - /* 0xBFC24018: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C018u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2401C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24020: 10600092 beq $v1, $zero, 0xBFC2426C */ - uint32_t psx_brA_BFC24020 = cpu->gpr[3]; uint32_t psx_brB_BFC24020 = cpu->gpr[0]; - psx_taken_BFC24020 = (psx_brA_BFC24020 == psx_brB_BFC24020); - psx_delay_BFC24020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C024u); -#endif - if (psx_delay_BFC24020) { - psx_delay_BFC24020 = 0; - if (psx_taken_BFC24020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C26Cu); - goto label_BFC2426C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C028u); - } -label_BFC24028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24028: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C028u); -#endif - /* 0xBFC2402C: 8F18A450 lw $t8, -23472($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -23472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-23472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C02Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18A450u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC24034: 1700002D bne $t8, $zero, 0xBFC240EC */ - uint32_t psx_brA_BFC24034 = cpu->gpr[24]; uint32_t psx_brB_BFC24034 = cpu->gpr[0]; - psx_taken_BFC24034 = (psx_brA_BFC24034 != psx_brB_BFC24034); - psx_delay_BFC24034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C038u); -#endif - if (psx_delay_BFC24034) { - psx_delay_BFC24034 = 0; - if (psx_taken_BFC24034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C0ECu); - goto label_BFC240EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C03Cu); - } -label_BFC2403C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2403Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2403C: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C040u); -#endif - /* 0xBFC24040: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C040u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24044: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24048: 24A5A458 addiu $a1, $a1, -23464 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23464)); - PGXP_ALU(0x24A5A458u, cpu->gpr[5], _pgx1, 0xFFFFA458u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2404C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24050: 0C016AB0 jal 0xB005AAC0 */ - cpu->gpr[31] = 0x8003C058u; /* jal link before delay slot */ - psx_delay_BFC24050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC24054: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C054u); -#endif - if (psx_delay_BFC24050) { - psx_delay_BFC24050 = 0; - cpu->gpr[31] = 0x8003C058u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAC0u); - cpu->pc = 0x8005AAC0u; return; - } -label_BFC24058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24058: 24010080 addiu $at, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24010080u, cpu->gpr[1], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2405C: 10410020 beq $v0, $at, 0xBFC240E0 */ - uint32_t psx_brA_BFC2405C = cpu->gpr[2]; uint32_t psx_brB_BFC2405C = cpu->gpr[1]; - psx_taken_BFC2405C = (psx_brA_BFC2405C == psx_brB_BFC2405C); - psx_delay_BFC2405C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC24060: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C060u); -#endif - if (psx_delay_BFC2405C) { - psx_delay_BFC2405C = 0; - if (psx_taken_BFC2405C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C0E0u); - goto label_BFC240E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C064u); - } -label_BFC24064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24064: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC24068: 2A01000A slti $at, $s0, 10 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0); - PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2406C: 1420FFF3 bne $at, $zero, 0xBFC2403C */ - uint32_t psx_brA_BFC2406C = cpu->gpr[1]; uint32_t psx_brB_BFC2406C = cpu->gpr[0]; - psx_taken_BFC2406C = (psx_brA_BFC2406C != psx_brB_BFC2406C); - psx_delay_BFC2406C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C070u); -#endif - if (psx_delay_BFC2406C) { - psx_delay_BFC2406C = 0; - if (psx_taken_BFC2406C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C03Cu); - goto label_BFC2403C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C074u); - } -label_BFC24074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC24074: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C074u); -#endif - /* 0xBFC24078: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C078u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2407C: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C084u; /* jal link before delay slot */ - psx_delay_BFC2407C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC24080: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C080u); -#endif - if (psx_delay_BFC2407C) { - psx_delay_BFC2407C = 0; - cpu->gpr[31] = 0x8003C084u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC24084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24084: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C084u); -#endif - /* 0xBFC24088: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C088u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2408C: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C094u; /* jal link before delay slot */ - psx_delay_BFC2408C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC24090: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C090u); -#endif - if (psx_delay_BFC2408C) { - psx_delay_BFC2408C = 0; - cpu->gpr[31] = 0x8003C094u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC24094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24094: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24098: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2409C: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C09Cu); return; } g_debug_last_store_pc = 0x8003C09Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC240A0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC240A4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240A8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240AC: 24A5A518 addiu $a1, $a1, -23272 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23272)); - PGXP_ALU(0x24A5A518u, cpu->gpr[5], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC240B0: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C0B0u); return; } g_debug_last_store_pc = 0x8003C0B0u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC240B4: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C0BCu; /* jal link before delay slot */ - psx_delay_BFC240B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC240B8: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0B8u); -#endif - if (psx_delay_BFC240B4) { - psx_delay_BFC240B4 = 0; - cpu->gpr[31] = 0x8003C0BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC240BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240BC: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240C0: 24A56B34 addiu $a1, $a1, 27444 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27444)); - PGXP_ALU(0x24A56B34u, cpu->gpr[5], _pgx1, 0x00006B34u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC240C4: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003C0CCu; /* jal link before delay slot */ - psx_delay_BFC240C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC240C8: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0C8u); -#endif - if (psx_delay_BFC240C4) { - psx_delay_BFC240C4 = 0; - cpu->gpr[31] = 0x8003C0CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC240CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC240CC: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003C0D4u; /* jal link before delay slot */ - psx_delay_BFC240CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC240D0: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0D0u); -#endif - if (psx_delay_BFC240CC) { - psx_delay_BFC240CC = 0; - cpu->gpr[31] = 0x8003C0D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC240D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC240D4: 10000068 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC240D4 = cpu->gpr[0]; uint32_t psx_brB_BFC240D4 = cpu->gpr[0]; - psx_taken_BFC240D4 = (psx_brA_BFC240D4 == psx_brB_BFC240D4); - psx_delay_BFC240D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC240D8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0D8u); -#endif - if (psx_delay_BFC240D4) { - psx_delay_BFC240D4 = 0; - if (psx_taken_BFC240D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C0DCu); - } -label_BFC240DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC240DC: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0DCu); -#endif -label_BFC240E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC240E0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC240E4: 10000063 beq $zero, $zero, 0xBFC24274 */ - uint32_t psx_brA_BFC240E4 = cpu->gpr[0]; uint32_t psx_brB_BFC240E4 = cpu->gpr[0]; - psx_taken_BFC240E4 = (psx_brA_BFC240E4 == psx_brB_BFC240E4); - psx_delay_BFC240E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC240E8: AC39A450 sw $t9, -23472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C0E8u); return; } g_debug_last_store_pc = 0x8003C0E8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39A450u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0E8u); -#endif - if (psx_delay_BFC240E4) { - psx_delay_BFC240E4 = 0; - if (psx_taken_BFC240E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C274u); - goto label_BFC24274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C0ECu); - } -label_BFC240EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC240ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC240ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC240EC: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C0F0u); -#endif - /* 0xBFC240F0: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C0F0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240F4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC240F8: 24A5A458 addiu $a1, $a1, -23464 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23464)); - PGXP_ALU(0x24A5A458u, cpu->gpr[5], _pgx1, 0xFFFFA458u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC240FC: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24100: 0C016AB8 jal 0xB005AAE0 */ - cpu->gpr[31] = 0x8003C108u; /* jal link before delay slot */ - psx_delay_BFC24100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC24104: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C104u); -#endif - if (psx_delay_BFC24100) { - psx_delay_BFC24100 = 0; - cpu->gpr[31] = 0x8003C108u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAE0u); - cpu->pc = 0x8005AAE0u; return; - } -label_BFC24108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24108: 24010080 addiu $at, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24010080u, cpu->gpr[1], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2410C: 1041001F beq $v0, $at, 0xBFC2418C */ - uint32_t psx_brA_BFC2410C = cpu->gpr[2]; uint32_t psx_brB_BFC2410C = cpu->gpr[1]; - psx_taken_BFC2410C = (psx_brA_BFC2410C == psx_brB_BFC2410C); - psx_delay_BFC2410C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24110: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C110u); -#endif - if (psx_delay_BFC2410C) { - psx_delay_BFC2410C = 0; - if (psx_taken_BFC2410C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C18Cu); - goto label_BFC2418C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C114u); - } -label_BFC24114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24114: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC24118: 2A01000A slti $at, $s0, 10 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (10) ? 1 : 0); - PGXP_ALU(0x2A01000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003C118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2411C: 1420FFF3 bne $at, $zero, 0xBFC240EC */ - uint32_t psx_brA_BFC2411C = cpu->gpr[1]; uint32_t psx_brB_BFC2411C = cpu->gpr[0]; - psx_taken_BFC2411C = (psx_brA_BFC2411C != psx_brB_BFC2411C); - psx_delay_BFC2411C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24120: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C120u); -#endif - if (psx_delay_BFC2411C) { - psx_delay_BFC2411C = 0; - if (psx_taken_BFC2411C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C0ECu); - goto label_BFC240EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C124u); - } -label_BFC24124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC24124: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C124u); -#endif - /* 0xBFC24128: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C128u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2412C: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C134u; /* jal link before delay slot */ - psx_delay_BFC2412C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC24130: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C130u); -#endif - if (psx_delay_BFC2412C) { - psx_delay_BFC2412C = 0; - cpu->gpr[31] = 0x8003C134u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC24134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24134: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C134u); -#endif - /* 0xBFC24138: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C138u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2413C: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C144u; /* jal link before delay slot */ - psx_delay_BFC2413C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC24140: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C140u); -#endif - if (psx_delay_BFC2413C) { - psx_delay_BFC2413C = 0; - cpu->gpr[31] = 0x8003C144u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC24144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24144: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24148: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2414C: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C14Cu); return; } g_debug_last_store_pc = 0x8003C14Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC24150: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24154: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24158: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2415C: 24A5A518 addiu $a1, $a1, -23272 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23272)); - PGXP_ALU(0x24A5A518u, cpu->gpr[5], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC24160: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C160u); return; } g_debug_last_store_pc = 0x8003C160u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24164: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C16Cu; /* jal link before delay slot */ - psx_delay_BFC24164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24168: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C168u); -#endif - if (psx_delay_BFC24164) { - psx_delay_BFC24164 = 0; - cpu->gpr[31] = 0x8003C16Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC2416C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2416Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2416C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24170: 24A56B40 addiu $a1, $a1, 27456 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27456)); - PGXP_ALU(0x24A56B40u, cpu->gpr[5], _pgx1, 0x00006B40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24174: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003C17Cu; /* jal link before delay slot */ - psx_delay_BFC24174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24178: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C178u); -#endif - if (psx_delay_BFC24174) { - psx_delay_BFC24174 = 0; - cpu->gpr[31] = 0x8003C17Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC2417C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2417Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2417C: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003C184u; /* jal link before delay slot */ - psx_delay_BFC2417C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24180: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C180u); -#endif - if (psx_delay_BFC2417C) { - psx_delay_BFC2417C = 0; - cpu->gpr[31] = 0x8003C184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC24184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24184: 1000003C beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC24184 = cpu->gpr[0]; uint32_t psx_brB_BFC24184 = cpu->gpr[0]; - psx_taken_BFC24184 = (psx_brA_BFC24184 == psx_brB_BFC24184); - psx_delay_BFC24184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24188: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C188u); -#endif - if (psx_delay_BFC24184) { - psx_delay_BFC24184 = 0; - if (psx_taken_BFC24184) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C18Cu); - } -label_BFC2418C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2418Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2418Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2418C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24190: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C190u); -#endif - /* 0xBFC24194: 8C42A454 lw $v0, -23468($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -23468; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-23468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C194u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42A454u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C194u); -#endif - /* 0xBFC24198: 8108A1D3 lb $t0, -24109($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24109; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24109)), 8, 0x100u); - PGXP_LOAD(0x8108A1D3u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2419C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC241A0: AC20A450 sw $zero, -23472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1A0u); return; } g_debug_last_store_pc = 0x8003C1A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A450u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC241A4: 24420080 addiu $v0, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (128)); - PGXP_ALU(0x24420080u, cpu->gpr[2], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC241A8: 00084B40 sll $t1, $t0, 13 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 13u; - PGXP_ALU(0x00084B40u, cpu->gpr[9], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x206u); -#endif - /* 0xBFC241AC: 0049082A slt $at, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0049082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC241B0: 14200021 bne $at, $zero, 0xBFC24238 */ - uint32_t psx_brA_BFC241B0 = cpu->gpr[1]; uint32_t psx_brB_BFC241B0 = cpu->gpr[0]; - psx_taken_BFC241B0 = (psx_brA_BFC241B0 != psx_brB_BFC241B0); - psx_delay_BFC241B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC241B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C1B4u); -#endif - if (psx_delay_BFC241B0) { - psx_delay_BFC241B0 = 0; - if (psx_taken_BFC241B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C238u); - goto label_BFC24238; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C1B8u); - } -label_BFC241B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC241B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC241B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC241B8: 3C078006 lui $a3, 0x8006 */ - cpu->gpr[7] = 0x80060000u; - PGXP_ALU(0x3C078006u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1B8u); -#endif - /* 0xBFC241BC: 8CE76B04 lw $a3, 27396($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 27396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1BCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE76B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC241C0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC241C4: AC22A454 sw $v0, -23468($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23468; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1C4u); return; } g_debug_last_store_pc = 0x8003C1C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A454u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC241C8: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C1D0u; /* jal link before delay slot */ - psx_delay_BFC241C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC241CC: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1CCu); -#endif - if (psx_delay_BFC241C8) { - psx_delay_BFC241C8 = 0; - cpu->gpr[31] = 0x8003C1D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC241D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC241D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC241D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC241D0: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1D0u); -#endif - /* 0xBFC241D4: 8C636B00 lw $v1, 27392($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC241D8: 0C016AB4 jal 0xB005AAD0 */ - cpu->gpr[31] = 0x8003C1E0u; /* jal link before delay slot */ - psx_delay_BFC241D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC241DC: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1DCu); -#endif - if (psx_delay_BFC241D8) { - psx_delay_BFC241D8 = 0; - cpu->gpr[31] = 0x8003C1E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAD0u); - cpu->pc = 0x8005AAD0u; return; - } -label_BFC241E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC241E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC241E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC241E0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC241E4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC241E8: AC236B00 sw $v1, 27392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1E8u); return; } g_debug_last_store_pc = 0x8003C1E8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236B00u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC241EC: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC241F0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC241F4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC241F8: 24A5A518 addiu $a1, $a1, -23272 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23272)); - PGXP_ALU(0x24A5A518u, cpu->gpr[5], _pgx1, 0xFFFFA518u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC241FC: AC276B04 sw $a3, 27396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C1FCu); return; } g_debug_last_store_pc = 0x8003C1FCu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC276B04u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24200: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C208u; /* jal link before delay slot */ - psx_delay_BFC24200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24204: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C204u); -#endif - if (psx_delay_BFC24200) { - psx_delay_BFC24200 = 0; - cpu->gpr[31] = 0x8003C208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC24208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24208: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2420C: 24A56B4C addiu $a1, $a1, 27468 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27468)); - PGXP_ALU(0x24A56B4Cu, cpu->gpr[5], _pgx1, 0x00006B4Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24210: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003C218u; /* jal link before delay slot */ - psx_delay_BFC24210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24214: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C214u); -#endif - if (psx_delay_BFC24210) { - psx_delay_BFC24210 = 0; - cpu->gpr[31] = 0x8003C218u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC24218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24218: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2421C: 24A5A4D8 addiu $a1, $a1, -23336 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23336)); - PGXP_ALU(0x24A5A4D8u, cpu->gpr[5], _pgx1, 0xFFFFA4D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24220: 0C016ABC jal 0xB005AAF0 */ - cpu->gpr[31] = 0x8003C228u; /* jal link before delay slot */ - psx_delay_BFC24220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24224: 27A40040 addiu $a0, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A40040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C224u); -#endif - if (psx_delay_BFC24220) { - psx_delay_BFC24220 = 0; - cpu->gpr[31] = 0x8003C228u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAF0u); - cpu->pc = 0x8005AAF0u; return; - } -label_BFC24228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24228: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C228u); -#endif - /* 0xBFC2422C: 8042A1D3 lb $v0, -24109($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24109; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-24109)), 2, 0x4u); - PGXP_LOAD(0x8042A1D3u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24230: 10000012 beq $zero, $zero, 0xBFC2427C */ - uint32_t psx_brA_BFC24230 = cpu->gpr[0]; uint32_t psx_brB_BFC24230 = cpu->gpr[0]; - psx_taken_BFC24230 = (psx_brA_BFC24230 == psx_brB_BFC24230); - psx_delay_BFC24230 = 1; - /* 0xBFC24234: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C234u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C234u); -#endif - if (psx_delay_BFC24230) { - psx_delay_BFC24230 = 0; - if (psx_taken_BFC24230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C27Cu); - goto label_BFC2427C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C238u); - } -label_BFC24238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24238: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2423C: AC22A454 sw $v0, -23468($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23468; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C23Cu); return; } g_debug_last_store_pc = 0x8003C23Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A454u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24240: 04410004 bgez $v0, 0xBFC24254 */ - uint32_t psx_brA_BFC24240 = cpu->gpr[2]; - psx_taken_BFC24240 = ((int32_t)psx_brA_BFC24240 >= 0); - psx_delay_BFC24240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC24244: 304A1FFF andi $t2, $v0, 0x1FFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x1FFFu; - PGXP_ALU(0x304A1FFFu, cpu->gpr[10], _pgx1, 0x1FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C244u); -#endif - if (psx_delay_BFC24240) { - psx_delay_BFC24240 = 0; - if (psx_taken_BFC24240) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C254u); - goto label_BFC24254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C248u); - } -label_BFC24248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC24248: 11400002 beq $t2, $zero, 0xBFC24254 */ - uint32_t psx_brA_BFC24248 = cpu->gpr[10]; uint32_t psx_brB_BFC24248 = cpu->gpr[0]; - psx_taken_BFC24248 = (psx_brA_BFC24248 == psx_brB_BFC24248); - psx_delay_BFC24248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2424C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C24Cu); -#endif - if (psx_delay_BFC24248) { - psx_delay_BFC24248 = 0; - if (psx_taken_BFC24248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C254u); - goto label_BFC24254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C250u); - } -label_BFC24250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24250: 254AE000 addiu $t2, $t2, -8192 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-8192)); - PGXP_ALU(0x254AE000u, cpu->gpr[10], _pgx1, 0xFFFFE000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C250u); -#endif -label_BFC24254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC24254: 15400008 bne $t2, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC24254 = cpu->gpr[10]; uint32_t psx_brB_BFC24254 = cpu->gpr[0]; - psx_taken_BFC24254 = (psx_brA_BFC24254 != psx_brB_BFC24254); - psx_delay_BFC24254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24258: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C258u); -#endif - if (psx_delay_BFC24254) { - psx_delay_BFC24254 = 0; - if (psx_taken_BFC24254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C25Cu); - } -label_BFC2425C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2425Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2425C: 240BFFFF addiu $t3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24260: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24264: 10000003 beq $zero, $zero, 0xBFC24274 */ - uint32_t psx_brA_BFC24264 = cpu->gpr[0]; uint32_t psx_brB_BFC24264 = cpu->gpr[0]; - psx_taken_BFC24264 = (psx_brA_BFC24264 == psx_brB_BFC24264); - psx_delay_BFC24264 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC24268: AC2B9ED4 sw $t3, -24876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C268u); return; } g_debug_last_store_pc = 0x8003C268u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9ED4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C268u); -#endif - if (psx_delay_BFC24264) { - psx_delay_BFC24264 = 0; - if (psx_taken_BFC24264) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C274u); - goto label_BFC24274; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C26Cu); - } -label_BFC2426C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2426Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2426C: 10000002 beq $zero, $zero, 0xBFC24278 */ - uint32_t psx_brA_BFC2426C = cpu->gpr[0]; uint32_t psx_brB_BFC2426C = cpu->gpr[0]; - psx_taken_BFC2426C = (psx_brA_BFC2426C == psx_brB_BFC2426C); - psx_delay_BFC2426C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24270: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C270u); -#endif - if (psx_delay_BFC2426C) { - psx_delay_BFC2426C = 0; - if (psx_taken_BFC2426C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C278u); - goto label_BFC24278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C274u); - } -label_BFC24274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24274: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C274u); -#endif -label_BFC24278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C278u); -#endif - /* 0xBFC24278: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C278u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C278u); -#endif -label_BFC2427C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2427Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C27Cu); -#endif - /* 0xBFC2427C: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C27Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC24280: 03E00008 jr $ra */ - psx_delay_BFC24280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24284: 27BD00C0 addiu $sp, $sp, 192 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (192)); - PGXP_ALU(0x27BD00C0u, cpu->gpr[29], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C284u); -#endif - if (psx_delay_BFC24280) { - psx_delay_BFC24280 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC24288(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC24288u); - int psx_delay_BFC24298 = 0; - int psx_taken_BFC24298 = 0; - int psx_delay_BFC242AC = 0; - int psx_taken_BFC242AC = 0; - int psx_delay_BFC242C0 = 0; - int psx_taken_BFC242C0 = 0; - int psx_delay_BFC242D4 = 0; - int psx_taken_BFC242D4 = 0; - int psx_delay_BFC242DC = 0; - int psx_delay_BFC242F0 = 0; - int psx_taken_BFC242F0 = 0; - int psx_delay_BFC2430C = 0; - int psx_delay_BFC24324 = 0; - int psx_taken_BFC24324 = 0; - int psx_delay_BFC2432C = 0; - int psx_taken_BFC2432C = 0; - int psx_delay_BFC24338 = 0; - int psx_taken_BFC24338 = 0; - int psx_delay_BFC24348 = 0; - int psx_delay_BFC24354 = 0; - int psx_delay_BFC24388 = 0; - int psx_delay_BFC24390 = 0; - int psx_taken_BFC24390 = 0; - int psx_delay_BFC24398 = 0; - int psx_taken_BFC24398 = 0; - int psx_delay_BFC243F0 = 0; - int psx_taken_BFC243F0 = 0; - int psx_delay_BFC24400 = 0; - int psx_delay_BFC24410 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC242A0u: goto label_BFC242A0; - case 0xBFC242B4u: goto label_BFC242B4; - case 0xBFC242C8u: goto label_BFC242C8; - case 0xBFC242DCu: goto label_BFC242DC; - case 0xBFC242E4u: goto label_BFC242E4; - case 0xBFC242F8u: goto label_BFC242F8; - case 0xBFC242FCu: goto label_BFC242FC; - case 0xBFC24304u: goto label_BFC24304; - case 0xBFC24308u: goto label_BFC24308; - case 0xBFC24314u: goto label_BFC24314; - case 0xBFC2432Cu: goto label_BFC2432C; - case 0xBFC24334u: goto label_BFC24334; - case 0xBFC24338u: goto label_BFC24338; - case 0xBFC24340u: goto label_BFC24340; - case 0xBFC24350u: goto label_BFC24350; - case 0xBFC2435Cu: goto label_BFC2435C; - case 0xBFC24390u: goto label_BFC24390; - case 0xBFC24398u: goto label_BFC24398; - case 0xBFC243A0u: goto label_BFC243A0; - case 0xBFC243F8u: goto label_BFC243F8; - case 0xBFC24408u: goto label_BFC24408; - case 0xBFC2440Cu: goto label_BFC2440C; - default: break; - } - } -label_BFC24288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24288: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C288u); -#endif - /* 0xBFC2428C: 8CA59ED0 lw $a1, -24880($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C28Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59ED0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24290: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC24294: 2407FFFF addiu $a3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2407FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC24298: 10A7005B beq $a1, $a3, 0xBFC24408 */ - uint32_t psx_brA_BFC24298 = cpu->gpr[5]; uint32_t psx_brB_BFC24298 = cpu->gpr[7]; - psx_taken_BFC24298 = (psx_brA_BFC24298 == psx_brB_BFC24298); - psx_delay_BFC24298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2429C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C29Cu); return; } g_debug_last_store_pc = 0x8003C29Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C29Cu); -#endif - if (psx_delay_BFC24298) { - psx_delay_BFC24298 = 0; - if (psx_taken_BFC24298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C408u); - goto label_BFC24408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2A0u); - } -label_BFC242A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC242A0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C2A0u); -#endif - /* 0xBFC242A4: 8DCE9ED4 lw $t6, -24876($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24876; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C2A4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9ED4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC242A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC242AC: 11C70057 beq $t6, $a3, 0xBFC2440C */ - uint32_t psx_brA_BFC242AC = cpu->gpr[14]; uint32_t psx_brB_BFC242AC = cpu->gpr[7]; - psx_taken_BFC242AC = (psx_brA_BFC242AC == psx_brB_BFC242AC); - psx_delay_BFC242AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2B0u); -#endif - /* 0xBFC242B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C2B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2B0u); -#endif - if (psx_delay_BFC242AC) { - psx_delay_BFC242AC = 0; - if (psx_taken_BFC242AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C40Cu); - goto label_BFC2440C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2B4u); - } -label_BFC242B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC242B4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C2B4u); -#endif - /* 0xBFC242B8: 8DEF9DEC lw $t7, -25108($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C2B8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DECu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC242BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC242C0: 11E00011 beq $t7, $zero, 0xBFC24308 */ - uint32_t psx_brA_BFC242C0 = cpu->gpr[15]; uint32_t psx_brB_BFC242C0 = cpu->gpr[0]; - psx_taken_BFC242C0 = (psx_brA_BFC242C0 == psx_brB_BFC242C0); - psx_delay_BFC242C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC242C4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2C4u); -#endif - if (psx_delay_BFC242C0) { - psx_delay_BFC242C0 = 0; - if (psx_taken_BFC242C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C308u); - goto label_BFC24308; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2C8u); - } -label_BFC242C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC242C8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C2C8u); -#endif - /* 0xBFC242CC: 8C42A520 lw $v0, -23264($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -23264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-23264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C2CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42A520u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC242D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC242D4: 10400009 beq $v0, $zero, 0xBFC242FC */ - uint32_t psx_brA_BFC242D4 = cpu->gpr[2]; uint32_t psx_brB_BFC242D4 = cpu->gpr[0]; - psx_taken_BFC242D4 = (psx_brA_BFC242D4 == psx_brB_BFC242D4); - psx_delay_BFC242D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC242D8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2D8u); -#endif - if (psx_delay_BFC242D4) { - psx_delay_BFC242D4 = 0; - if (psx_taken_BFC242D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2FCu); - goto label_BFC242FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2DCu); - } -label_BFC242DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC242DC: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x8003C2E4u; /* jal link before delay slot */ - psx_delay_BFC242DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC242E0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2E0u); -#endif - if (psx_delay_BFC242DC) { - psx_delay_BFC242DC = 0; - cpu->gpr[31] = 0x8003C2E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC242E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC242E4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC242E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC242EC: AC22A520 sw $v0, -23264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C2ECu); return; } g_debug_last_store_pc = 0x8003C2ECu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A520u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC242F0: 10000004 beq $zero, $zero, 0xBFC24304 */ - uint32_t psx_brA_BFC242F0 = cpu->gpr[0]; uint32_t psx_brB_BFC242F0 = cpu->gpr[0]; - psx_taken_BFC242F0 = (psx_brA_BFC242F0 == psx_brB_BFC242F0); - psx_delay_BFC242F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC242F4: 2407FFFF addiu $a3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2407FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2F4u); -#endif - if (psx_delay_BFC242F0) { - psx_delay_BFC242F0 = 0; - if (psx_taken_BFC242F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C304u); - goto label_BFC24304; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C2F8u); - } -label_BFC242F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC242F8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C2F8u); -#endif -label_BFC242FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC242FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC242FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC242FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24300: AC22A520 sw $v0, -23264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -23264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-23264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C300u); return; } g_debug_last_store_pc = 0x8003C300u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A520u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C300u); -#endif -label_BFC24304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24304: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C304u); -#endif -label_BFC24308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24308: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2430C: 0C00EF4F jal 0xB003BD3C */ - cpu->gpr[31] = 0x8003C314u; /* jal link before delay slot */ - psx_delay_BFC2430C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24310: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C310u); -#endif - if (psx_delay_BFC2430C) { - psx_delay_BFC2430C = 0; - cpu->gpr[31] = 0x8003C314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD3Cu); - cpu->pc = 0x8003BD3Cu; return; - } -label_BFC24314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24314: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C314u); -#endif - /* 0xBFC24318: 8CA59ED0 lw $a1, -24880($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C318u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59ED0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2431C: 2407FFFF addiu $a3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2407FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC24320: 28A1003C slti $at, $a1, 60 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (60) ? 1 : 0); - PGXP_ALU(0x28A1003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24324: 10200004 beq $at, $zero, 0xBFC24338 */ - uint32_t psx_brA_BFC24324 = cpu->gpr[1]; uint32_t psx_brB_BFC24324 = cpu->gpr[0]; - psx_taken_BFC24324 = (psx_brA_BFC24324 == psx_brB_BFC24324); - psx_delay_BFC24324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24328: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C328u); -#endif - if (psx_delay_BFC24324) { - psx_delay_BFC24324 = 0; - if (psx_taken_BFC24324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C338u); - goto label_BFC24338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C32Cu); - } -label_BFC2432C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2432Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2432Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2432C: 10000002 beq $zero, $zero, 0xBFC24338 */ - uint32_t psx_brA_BFC2432C = cpu->gpr[0]; uint32_t psx_brB_BFC2432C = cpu->gpr[0]; - psx_taken_BFC2432C = (psx_brA_BFC2432C == psx_brB_BFC2432C); - psx_delay_BFC2432C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24330: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C330u); -#endif - if (psx_delay_BFC2432C) { - psx_delay_BFC2432C = 0; - if (psx_taken_BFC2432C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C338u); - goto label_BFC24338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C334u); - } -label_BFC24334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24334: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C334u); -#endif -label_BFC24338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC24338: 14470017 bne $v0, $a3, 0xBFC24398 */ - uint32_t psx_brA_BFC24338 = cpu->gpr[2]; uint32_t psx_brB_BFC24338 = cpu->gpr[7]; - psx_taken_BFC24338 = (psx_brA_BFC24338 != psx_brB_BFC24338); - psx_delay_BFC24338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2433C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C33Cu); -#endif - if (psx_delay_BFC24338) { - psx_delay_BFC24338 = 0; - if (psx_taken_BFC24338) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C398u); - goto label_BFC24398; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C340u); - } -label_BFC24340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC24340: AC259ED0 sw $a1, -24880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C340u); return; } g_debug_last_store_pc = 0x8003C340u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259ED0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC24344: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24348: 0C00EC31 jal 0xB003B0C4 */ - cpu->gpr[31] = 0x8003C350u; /* jal link before delay slot */ - psx_delay_BFC24348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2434C: AFA60018 sw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C34Cu); return; } g_debug_last_store_pc = 0x8003C34Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C34Cu); -#endif - if (psx_delay_BFC24348) { - psx_delay_BFC24348 = 0; - cpu->gpr[31] = 0x8003C350u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B0C4u); - cpu->pc = 0x8003B0C4u; return; - } -label_BFC24350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C350u); -#endif - /* 0xBFC24350: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C350u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24354: 0C00EC47 jal 0xB003B11C */ - cpu->gpr[31] = 0x8003C35Cu; /* jal link before delay slot */ - psx_delay_BFC24354 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC24358: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C358u); -#endif - if (psx_delay_BFC24354) { - psx_delay_BFC24354 = 0; - cpu->gpr[31] = 0x8003C35Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B11Cu); - cpu->pc = 0x8003B11Cu; return; - } -label_BFC2435C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2435Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2435Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2435C: 2418FFFF addiu $t8, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24360: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC24364: AC389ECC sw $t8, -24884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C364u); return; } g_debug_last_store_pc = 0x8003C364u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389ECCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24368: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2436C: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C36Cu); return; } g_debug_last_store_pc = 0x8003C36Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24370: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC24374: 2419FFFF addiu $t9, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC24378: AC399ED4 sw $t9, -24876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C378u); return; } g_debug_last_store_pc = 0x8003C378u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399ED4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2437C: 2405FFFF addiu $a1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24380: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC24384: AC259ED0 sw $a1, -24880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C384u); return; } g_debug_last_store_pc = 0x8003C384u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259ED0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24388: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003C390u; /* jal link before delay slot */ - psx_delay_BFC24388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2438C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C38Cu); -#endif - if (psx_delay_BFC24388) { - psx_delay_BFC24388 = 0; - cpu->gpr[31] = 0x8003C390u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC24390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24390: 1000001E beq $zero, $zero, 0xBFC2440C */ - uint32_t psx_brA_BFC24390 = cpu->gpr[0]; uint32_t psx_brB_BFC24390 = cpu->gpr[0]; - psx_taken_BFC24390 = (psx_brA_BFC24390 == psx_brB_BFC24390); - psx_delay_BFC24390 = 1; - /* 0xBFC24394: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C394u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C394u); -#endif - if (psx_delay_BFC24390) { - psx_delay_BFC24390 = 0; - if (psx_taken_BFC24390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C40Cu); - goto label_BFC2440C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C398u); - } -label_BFC24398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24398: 1840001C blez $v0, 0xBFC2440C */ - uint32_t psx_brA_BFC24398 = cpu->gpr[2]; - psx_taken_BFC24398 = ((int32_t)psx_brA_BFC24398 <= 0); - psx_delay_BFC24398 = 1; - /* 0xBFC2439C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C39Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C39Cu); -#endif - if (psx_delay_BFC24398) { - psx_delay_BFC24398 = 0; - if (psx_taken_BFC24398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C40Cu); - goto label_BFC2440C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C3A0u); - } -label_BFC243A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC243A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC243A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC243A0: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC243A4: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC243A8: 2529A178 addiu $t1, $t1, -24200 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-24200)); - PGXP_ALU(0x2529A178u, cpu->gpr[9], _pgx1, 0xFFFFA178u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC243AC: 00064080 sll $t0, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00064080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC243B0: 25ADFF60 addiu $t5, $t5, -160 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-160)); - PGXP_ALU(0x25ADFF60u, cpu->gpr[13], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC243B4: 00066080 sll $t4, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x308u); -#endif - /* 0xBFC243B8: 01091821 addu $v1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC243BC: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3C0u); -#endif - /* 0xBFC243C0: 8C6A0000 lw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3C0u); -#endif - /* 0xBFC243C4: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC243C8: 01425821 addu $t3, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[10] + cpu->gpr[2]; - PGXP_ALU(0x01425821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC243CC: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC243D0: AC6B0000 sw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3D0u); return; } g_debug_last_store_pc = 0x8003C3D0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC243D4: AC8F0000 sw $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3D4u); return; } g_debug_last_store_pc = 0x8003C3D4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC243D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC243DC: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3E0u); -#endif - /* 0xBFC243E0: 8F189ECC lw $t8, -24884($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189ECCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC243E4: AC279ED4 sw $a3, -24876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3E4u); return; } g_debug_last_store_pc = 0x8003C3E4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279ED4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC243E8: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC243EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC243F0: 17070005 bne $t8, $a3, 0xBFC24408 */ - uint32_t psx_brA_BFC243F0 = cpu->gpr[24]; uint32_t psx_brB_BFC243F0 = cpu->gpr[7]; - psx_taken_BFC243F0 = (psx_brA_BFC243F0 != psx_brB_BFC243F0); - psx_delay_BFC243F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC243F4: AC259ED0 sw $a1, -24880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3F4u); return; } g_debug_last_store_pc = 0x8003C3F4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259ED0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3F4u); -#endif - if (psx_delay_BFC243F0) { - psx_delay_BFC243F0 = 0; - if (psx_taken_BFC243F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C408u); - goto label_BFC24408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C3F8u); - } -label_BFC243F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC243F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC243F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC243F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC243FC: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C3FCu); return; } g_debug_last_store_pc = 0x8003C3FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24400: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003C408u; /* jal link before delay slot */ - psx_delay_BFC24400 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24404: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C404u); -#endif - if (psx_delay_BFC24400) { - psx_delay_BFC24400 = 0; - cpu->gpr[31] = 0x8003C408u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC24408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C408u); -#endif - /* 0xBFC24408: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C408u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C408u); -#endif -label_BFC2440C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2440Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2440Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2440C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC24410: 03E00008 jr $ra */ - psx_delay_BFC24410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24414: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C414u); -#endif - if (psx_delay_BFC24410) { - psx_delay_BFC24410 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC24418(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC24418u); - int psx_delay_BFC24434 = 0; - int psx_taken_BFC24434 = 0; - int psx_delay_BFC2444C = 0; - int psx_delay_BFC24474 = 0; - int psx_delay_BFC2447C = 0; - int psx_taken_BFC2447C = 0; - int psx_delay_BFC24494 = 0; - int psx_delay_BFC244BC = 0; - int psx_delay_BFC244C4 = 0; - int psx_delay_BFC244D0 = 0; - int psx_taken_BFC244D0 = 0; - int psx_delay_BFC244E4 = 0; - int psx_delay_BFC24548 = 0; - int psx_taken_BFC24548 = 0; - int psx_delay_BFC24590 = 0; - int psx_delay_BFC245A4 = 0; - int psx_taken_BFC245A4 = 0; - int psx_delay_BFC245CC = 0; - int psx_delay_BFC245E0 = 0; - int psx_delay_BFC245F4 = 0; - int psx_delay_BFC24638 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2443Cu: goto label_BFC2443C; - case 0xBFC24454u: goto label_BFC24454; - case 0xBFC2447Cu: goto label_BFC2447C; - case 0xBFC24484u: goto label_BFC24484; - case 0xBFC2449Cu: goto label_BFC2449C; - case 0xBFC244C4u: goto label_BFC244C4; - case 0xBFC244CCu: goto label_BFC244CC; - case 0xBFC244D8u: goto label_BFC244D8; - case 0xBFC244ECu: goto label_BFC244EC; - case 0xBFC24550u: goto label_BFC24550; - case 0xBFC24588u: goto label_BFC24588; - case 0xBFC24598u: goto label_BFC24598; - case 0xBFC245ACu: goto label_BFC245AC; - case 0xBFC245D4u: goto label_BFC245D4; - case 0xBFC245E8u: goto label_BFC245E8; - case 0xBFC245FCu: goto label_BFC245FC; - case 0xBFC2462Cu: goto label_BFC2462C; - default: break; - } - } -label_BFC24418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24418: 27BDFF78 addiu $sp, $sp, -136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-136)); - PGXP_ALU(0x27BDFF78u, cpu->gpr[29], _pgx1, 0xFFFFFF78u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2441C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C41Cu); return; } g_debug_last_store_pc = 0x8003C41Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC24420: 3C118006 lui $s1, 0x8006 */ - cpu->gpr[17] = 0x80060000u; - PGXP_ALU(0x3C118006u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C420u); -#endif - /* 0xBFC24424: 8E316BBC lw $s1, 27580($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C424u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E316BBCu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC24428: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C428u); return; } g_debug_last_store_pc = 0x8003C428u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC2442C: 2A21003C slti $at, $s1, 60 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (60) ? 1 : 0); - PGXP_ALU(0x2A21003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC24430: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C430u); return; } g_debug_last_store_pc = 0x8003C430u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24434: 10200013 beq $at, $zero, 0xBFC24484 */ - uint32_t psx_brA_BFC24434 = cpu->gpr[1]; uint32_t psx_brB_BFC24434 = cpu->gpr[0]; - psx_taken_BFC24434 = (psx_brA_BFC24434 == psx_brB_BFC24434); - psx_delay_BFC24434 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC24438: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C438u); return; } g_debug_last_store_pc = 0x8003C438u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C438u); -#endif - if (psx_delay_BFC24434) { - psx_delay_BFC24434 = 0; - if (psx_taken_BFC24434) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C484u); - goto label_BFC24484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C43Cu); - } -label_BFC2443C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2443Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2443Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2443C: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC24440: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC24444: 2630FFE2 addiu $s0, $s1, -30 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (-30)); - PGXP_ALU(0x2630FFE2u, cpu->gpr[16], _pgx1, 0xFFFFFFE2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24448: 24A56B58 addiu $a1, $a1, 27480 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27480)); - PGXP_ALU(0x24A56B58u, cpu->gpr[5], _pgx1, 0x00006B58u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2444C: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C454u; /* jal link before delay slot */ - psx_delay_BFC2444C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24450: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C450u); -#endif - if (psx_delay_BFC2444C) { - psx_delay_BFC2444C = 0; - cpu->gpr[31] = 0x8003C454u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC24454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC24454: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC24458: 01D07023 subu $t6, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[16]; - PGXP_ALU(0x01D07023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2445C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC24460: 01D07023 subu $t6, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[16]; - PGXP_ALU(0x01D07023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24464: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24468: 25EFDC18 addiu $t7, $t7, -9192 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-9192)); - PGXP_ALU(0x25EFDC18u, cpu->gpr[15], _pgx1, 0xFFFFDC18u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2446C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC24470: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24474: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003C47Cu; /* jal link before delay slot */ - psx_delay_BFC24474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24478: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C478u); -#endif - if (psx_delay_BFC24474) { - psx_delay_BFC24474 = 0; - cpu->gpr[31] = 0x8003C47Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC2447C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2447Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2447C: 10000011 beq $zero, $zero, 0xBFC244C4 */ - uint32_t psx_brA_BFC2447C = cpu->gpr[0]; uint32_t psx_brB_BFC2447C = cpu->gpr[0]; - psx_taken_BFC2447C = (psx_brA_BFC2447C == psx_brB_BFC2447C); - psx_delay_BFC2447C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24480: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C480u); -#endif - if (psx_delay_BFC2447C) { - psx_delay_BFC2447C = 0; - if (psx_taken_BFC2447C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C4C4u); - goto label_BFC244C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C484u); - } -label_BFC24484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24484: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC24488: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC2448C: 2630FFC4 addiu $s0, $s1, -60 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[17] + (-60)); - PGXP_ALU(0x2630FFC4u, cpu->gpr[16], _pgx1, 0xFFFFFFC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24490: 24A56B60 addiu $a1, $a1, 27488 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (27488)); - PGXP_ALU(0x24A56B60u, cpu->gpr[5], _pgx1, 0x00006B60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24494: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C49Cu; /* jal link before delay slot */ - psx_delay_BFC24494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24498: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C498u); -#endif - if (psx_delay_BFC24494) { - psx_delay_BFC24494 = 0; - cpu->gpr[31] = 0x8003C49Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC2449C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2449Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2449Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2449C: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC244A0: 0310C023 subu $t8, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[16]; - PGXP_ALU(0x0310C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC244A4: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC244A8: 0310C023 subu $t8, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[16]; - PGXP_ALU(0x0310C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC244AC: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC244B0: 2739E1D8 addiu $t9, $t9, -7720 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-7720)); - PGXP_ALU(0x2739E1D8u, cpu->gpr[25], _pgx1, 0xFFFFE1D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC244B4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC244B8: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC244BC: 0C016A94 jal 0xB005AA50 */ - cpu->gpr[31] = 0x8003C4C4u; /* jal link before delay slot */ - psx_delay_BFC244BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC244C0: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4C0u); -#endif - if (psx_delay_BFC244BC) { - psx_delay_BFC244BC = 0; - cpu->gpr[31] = 0x8003C4C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA50u); - cpu->pc = 0x8005AA50u; return; - } -label_BFC244C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC244C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC244C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC244C4: 0C016AA8 jal 0xB005AAA0 */ - cpu->gpr[31] = 0x8003C4CCu; /* jal link before delay slot */ - psx_delay_BFC244C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC244C8: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4C8u); -#endif - if (psx_delay_BFC244C4) { - psx_delay_BFC244C4 = 0; - cpu->gpr[31] = 0x8003C4CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AAA0u); - cpu->pc = 0x8005AAA0u; return; - } -label_BFC244CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC244CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC244CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC244CC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC244D0: 10410056 beq $v0, $at, 0xBFC2462C */ - uint32_t psx_brA_BFC244D0 = cpu->gpr[2]; uint32_t psx_brB_BFC244D0 = cpu->gpr[1]; - psx_taken_BFC244D0 = (psx_brA_BFC244D0 == psx_brB_BFC244D0); - psx_delay_BFC244D0 = 1; - /* 0xBFC244D4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C4D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4D4u); -#endif - if (psx_delay_BFC244D0) { - psx_delay_BFC244D0 = 0; - if (psx_taken_BFC244D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C62Cu); - goto label_BFC2462C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C4D8u); - } -label_BFC244D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC244D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC244D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC244D8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC244DC: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C4DCu); return; } g_debug_last_store_pc = 0x8003C4DCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC244E0: 2484A138 addiu $a0, $a0, -24264 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24264)); - PGXP_ALU(0x2484A138u, cpu->gpr[4], _pgx1, 0xFFFFA138u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC244E4: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C4ECu; /* jal link before delay slot */ - psx_delay_BFC244E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC244E8: 27A5003C addiu $a1, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A5003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4E8u); -#endif - if (psx_delay_BFC244E4) { - psx_delay_BFC244E4 = 0; - cpu->gpr[31] = 0x8003C4ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC244EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC244ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC244ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC244EC: 00135080 sll $t2, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00135080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC244F0: 01535023 subu $t2, $t2, $s3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[19]; - PGXP_ALU(0x01535023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC244F4: 00106880 sll $t5, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00106880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC244F8: 01B06823 subu $t5, $t5, $s0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[16]; - PGXP_ALU(0x01B06823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC244FC: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC24500: 01535023 subu $t2, $t2, $s3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[19]; - PGXP_ALU(0x01535023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24504: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24508: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2450C: 256BDBA0 addiu $t3, $t3, -9312 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-9312)); - PGXP_ALU(0x256BDBA0u, cpu->gpr[11], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC24510: 01B06823 subu $t5, $t5, $s0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[16]; - PGXP_ALU(0x01B06823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24514: 000A5180 sll $t2, $t2, 6 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 6u; - PGXP_ALU(0x000A5180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24518: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2451C: 2529A178 addiu $t1, $t1, -24200 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-24200)); - PGXP_ALU(0x2529A178u, cpu->gpr[9], _pgx1, 0xFFFFA178u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC08u); -#endif - /* 0xBFC24520: 014B1821 addu $v1, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24524: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80100u); -#endif - /* 0xBFC24528: 00134080 sll $t0, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[8] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00134080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC2452C: 01091021 addu $v0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6008u); -#endif - /* 0xBFC24530: 006D7021 addu $t6, $v1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[3] + cpu->gpr[13]; - PGXP_ALU(0x006D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C530u); -#endif - /* 0xBFC24534: 8DCF0070 lw $t7, 112($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C534u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0070u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C534u); -#endif - /* 0xBFC24538: 8C4C0000 lw $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C538u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x8C4C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2453C: 2A01000E slti $at, $s0, 14 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (14) ? 1 : 0); - PGXP_ALU(0x2A01000Eu, cpu->gpr[1], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1009000u); -#endif - /* 0xBFC24540: 018FC023 subu $t8, $t4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[12] - cpu->gpr[15]; - PGXP_ALU(0x018FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC24544: AC580000 sw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C544u); return; } g_debug_last_store_pc = 0x8003C544u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24548: 10200018 beq $at, $zero, 0xBFC245AC */ - uint32_t psx_brA_BFC24548 = cpu->gpr[1]; uint32_t psx_brB_BFC24548 = cpu->gpr[0]; - psx_taken_BFC24548 = (psx_brA_BFC24548 == psx_brB_BFC24548); - psx_delay_BFC24548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC2454C: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C54Cu); -#endif - if (psx_delay_BFC24548) { - psx_delay_BFC24548 = 0; - if (psx_taken_BFC24548) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C5ACu); - goto label_BFC245AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C550u); - } -label_BFC24550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC24550: 0012C880 sll $t9, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] << 2u; - PGXP_ALU(0x0012C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC24554: 00124080 sll $t0, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00124080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC24558: 01124023 subu $t0, $t0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[18]; - PGXP_ALU(0x01124023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2455C: 0332C823 subu $t9, $t9, $s2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[18]; - PGXP_ALU(0x0332C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC24560: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24564: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC24568: 01124023 subu $t0, $t0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[18]; - PGXP_ALU(0x01124023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2456C: 0332C823 subu $t9, $t9, $s2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[18]; - PGXP_ALU(0x0332C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC24570: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24574: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20108u); -#endif - /* 0xBFC24578: 00688821 addu $s1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[17] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00688821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010008u); -#endif - /* 0xBFC2457C: 00798021 addu $s0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00798021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24580: 261000B8 addiu $s0, $s0, 184 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (184)); - PGXP_ALU(0x261000B8u, cpu->gpr[16], _pgx1, 0x000000B8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC24584: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C584u); -#endif -label_BFC24588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC24588: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2458C: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24590: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003C598u; /* jal link before delay slot */ - psx_delay_BFC24590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24594: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C594u); -#endif - if (psx_delay_BFC24590) { - psx_delay_BFC24590 = 0; - cpu->gpr[31] = 0x8003C598u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC24598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC24598: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC2459C: 2A41000E slti $at, $s2, 14 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (14) ? 1 : 0); - PGXP_ALU(0x2A41000Eu, cpu->gpr[1], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC245A0: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC245A4: 1420FFF8 bne $at, $zero, 0xBFC24588 */ - uint32_t psx_brA_BFC245A4 = cpu->gpr[1]; uint32_t psx_brB_BFC245A4 = cpu->gpr[0]; - psx_taken_BFC245A4 = (psx_brA_BFC245A4 != psx_brB_BFC245A4); - psx_delay_BFC245A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC245A8: 2631005C addiu $s1, $s1, 92 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (92)); - PGXP_ALU(0x2631005Cu, cpu->gpr[17], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5A8u); -#endif - if (psx_delay_BFC245A4) { - psx_delay_BFC245A4 = 0; - if (psx_taken_BFC245A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C588u); - goto label_BFC24588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C5ACu); - } -label_BFC245AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC245ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC245ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200u); -#endif - /* 0xBFC245AC: 00134880 sll $t1, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[9] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00134880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200u); -#endif - /* 0xBFC245B0: 01334823 subu $t1, $t1, $s3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[19]; - PGXP_ALU(0x01334823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC245B4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200u); -#endif - /* 0xBFC245B8: 01334823 subu $t1, $t1, $s3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[19]; - PGXP_ALU(0x01334823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC245BC: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC245C0: 254AE104 addiu $t2, $t2, -7932 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-7932)); - PGXP_ALU(0x254AE104u, cpu->gpr[10], _pgx1, 0xFFFFE104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC245C4: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC245C8: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC245CC: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003C5D4u; /* jal link before delay slot */ - psx_delay_BFC245CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC245D0: 2405005C addiu $a1, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2405005Cu, cpu->gpr[5], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5D0u); -#endif - if (psx_delay_BFC245CC) { - psx_delay_BFC245CC = 0; - cpu->gpr[31] = 0x8003C5D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC245D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC245D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC245D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC245D4: 3C118006 lui $s1, 0x8006 */ - cpu->gpr[17] = 0x80060000u; - PGXP_ALU(0x3C118006u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C5D4u); -#endif - /* 0xBFC245D8: 8E316BBC lw $s1, 27580($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C5D8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E316BBCu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC245DC: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC245E0: 0C011B24 jal 0xB0046C90 */ - cpu->gpr[31] = 0x8003C5E8u; /* jal link before delay slot */ - psx_delay_BFC245E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC245E4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5E4u); -#endif - if (psx_delay_BFC245E0) { - psx_delay_BFC245E0 = 0; - cpu->gpr[31] = 0x8003C5E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046C90u); - cpu->pc = 0x80046C90u; return; - } -label_BFC245E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC245E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC245E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC245E8: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC245EC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC245F0: AC316BBC sw $s1, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C5F0u); return; } g_debug_last_store_pc = 0x8003C5F0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAC316BBCu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC245F4: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003C5FCu; /* jal link before delay slot */ - psx_delay_BFC245F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC245F8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C5F8u); -#endif - if (psx_delay_BFC245F4) { - psx_delay_BFC245F4 = 0; - cpu->gpr[31] = 0x8003C5FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC245FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC245FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC245FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC245FC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24600: 25ADFF60 addiu $t5, $t5, -160 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-160)); - PGXP_ALU(0x25ADFF60u, cpu->gpr[13], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800u); -#endif - /* 0xBFC24604: 00135880 sll $t3, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[11] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00135880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2804u); -#endif - /* 0xBFC24608: 016D1021 addu $v0, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[13]; - PGXP_ALU(0x016D1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C608u); -#endif - /* 0xBFC2460C: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C60Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC24610: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC24614: 25CCFFFF addiu $t4, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CCFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC24618: AC4C0000 sw $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C618u); return; } g_debug_last_store_pc = 0x8003C618u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC4C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2461C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C620u); -#endif - /* 0xBFC24620: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C620u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC24624: AC2F9EC8 sw $t7, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C624u); return; } g_debug_last_store_pc = 0x8003C624u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9EC8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C624u); -#endif - /* 0xBFC24628: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C628u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C628u); -#endif -label_BFC2462C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2462Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C62Cu); -#endif - /* 0xBFC2462C: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C62Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C630u); -#endif - /* 0xBFC24630: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C630u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C630u); -#endif - /* 0xBFC24634: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C634u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC24638: 03E00008 jr $ra */ - psx_delay_BFC24638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2463C: 27BD0088 addiu $sp, $sp, 136 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (136)); - PGXP_ALU(0x27BD0088u, cpu->gpr[29], _pgx1, 0x00000088u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C63Cu); -#endif - if (psx_delay_BFC24638) { - psx_delay_BFC24638 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC24640(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC24640u); - int psx_delay_BFC2465C = 0; - int psx_delay_BFC24674 = 0; - int psx_taken_BFC24674 = 0; - int psx_delay_BFC246B0 = 0; - int psx_delay_BFC246BC = 0; - int psx_taken_BFC246BC = 0; - int psx_delay_BFC246E8 = 0; - int psx_delay_BFC246F0 = 0; - int psx_taken_BFC246F0 = 0; - int psx_delay_BFC2472C = 0; - int psx_delay_BFC24738 = 0; - int psx_taken_BFC24738 = 0; - int psx_delay_BFC24764 = 0; - int psx_delay_BFC247C4 = 0; - int psx_taken_BFC247C4 = 0; - int psx_delay_BFC247D0 = 0; - int psx_taken_BFC247D0 = 0; - int psx_delay_BFC247F0 = 0; - int psx_delay_BFC247F8 = 0; - int psx_taken_BFC247F8 = 0; - int psx_delay_BFC24804 = 0; - int psx_taken_BFC24804 = 0; - int psx_delay_BFC2480C = 0; - int psx_taken_BFC2480C = 0; - int psx_delay_BFC24824 = 0; - int psx_taken_BFC24824 = 0; - int psx_delay_BFC24894 = 0; - int psx_delay_BFC248A8 = 0; - int psx_delay_BFC248B8 = 0; - int psx_delay_BFC248C0 = 0; - int psx_taken_BFC248C0 = 0; - int psx_delay_BFC248FC = 0; - int psx_delay_BFC24934 = 0; - int psx_delay_BFC24958 = 0; - int psx_delay_BFC24970 = 0; - int psx_taken_BFC24970 = 0; - int psx_delay_BFC2497C = 0; - int psx_taken_BFC2497C = 0; - int psx_delay_BFC24990 = 0; - int psx_taken_BFC24990 = 0; - int psx_delay_BFC2499C = 0; - int psx_taken_BFC2499C = 0; - int psx_delay_BFC249C8 = 0; - int psx_taken_BFC249C8 = 0; - int psx_delay_BFC249D0 = 0; - int psx_taken_BFC249D0 = 0; - int psx_delay_BFC249E8 = 0; - int psx_delay_BFC249F4 = 0; - int psx_taken_BFC249F4 = 0; - int psx_delay_BFC24A00 = 0; - int psx_delay_BFC24A40 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC24664u: goto label_BFC24664; - case 0xBFC2467Cu: goto label_BFC2467C; - case 0xBFC246B8u: goto label_BFC246B8; - case 0xBFC246C4u: goto label_BFC246C4; - case 0xBFC246F0u: goto label_BFC246F0; - case 0xBFC246F8u: goto label_BFC246F8; - case 0xBFC246FCu: goto label_BFC246FC; - case 0xBFC24734u: goto label_BFC24734; - case 0xBFC24740u: goto label_BFC24740; - case 0xBFC2476Cu: goto label_BFC2476C; - case 0xBFC24770u: goto label_BFC24770; - case 0xBFC247CCu: goto label_BFC247CC; - case 0xBFC247D8u: goto label_BFC247D8; - case 0xBFC247F0u: goto label_BFC247F0; - case 0xBFC247F8u: goto label_BFC247F8; - case 0xBFC24800u: goto label_BFC24800; - case 0xBFC2480Cu: goto label_BFC2480C; - case 0xBFC24814u: goto label_BFC24814; - case 0xBFC2482Cu: goto label_BFC2482C; - case 0xBFC24830u: goto label_BFC24830; - case 0xBFC2489Cu: goto label_BFC2489C; - case 0xBFC248B0u: goto label_BFC248B0; - case 0xBFC248C0u: goto label_BFC248C0; - case 0xBFC248C8u: goto label_BFC248C8; - case 0xBFC248FCu: goto label_BFC248FC; - case 0xBFC24904u: goto label_BFC24904; - case 0xBFC2493Cu: goto label_BFC2493C; - case 0xBFC24960u: goto label_BFC24960; - case 0xBFC24978u: goto label_BFC24978; - case 0xBFC24984u: goto label_BFC24984; - case 0xBFC24988u: goto label_BFC24988; - case 0xBFC24998u: goto label_BFC24998; - case 0xBFC2499Cu: goto label_BFC2499C; - case 0xBFC249A4u: goto label_BFC249A4; - case 0xBFC249A8u: goto label_BFC249A8; - case 0xBFC249B8u: goto label_BFC249B8; - case 0xBFC249D0u: goto label_BFC249D0; - case 0xBFC249D8u: goto label_BFC249D8; - case 0xBFC249DCu: goto label_BFC249DC; - case 0xBFC249E0u: goto label_BFC249E0; - case 0xBFC249F0u: goto label_BFC249F0; - case 0xBFC249FCu: goto label_BFC249FC; - case 0xBFC24A00u: goto label_BFC24A00; - case 0xBFC24A08u: goto label_BFC24A08; - case 0xBFC24A34u: goto label_BFC24A34; - default: break; - } - } -label_BFC24640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24640: 27BDFF40 addiu $sp, $sp, -192 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-192)); - PGXP_ALU(0x27BDFF40u, cpu->gpr[29], _pgx1, 0xFFFFFF40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC24644: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C644u); return; } g_debug_last_store_pc = 0x8003C644u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC24648: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2464C: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C64Cu); return; } g_debug_last_store_pc = 0x8003C64Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC24650: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C650u); return; } g_debug_last_store_pc = 0x8003C650u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC24654: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C654u); return; } g_debug_last_store_pc = 0x8003C654u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC24658: 2484A138 addiu $a0, $a0, -24264 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24264)); - PGXP_ALU(0x2484A138u, cpu->gpr[4], _pgx1, 0xFFFFA138u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2465C: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003C664u; /* jal link before delay slot */ - psx_delay_BFC2465C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24660: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C660u); -#endif - if (psx_delay_BFC2465C) { - psx_delay_BFC2465C = 0; - cpu->gpr[31] = 0x8003C664u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC24664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24664: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C664u); -#endif - /* 0xBFC24668: 8C636BBC lw $v1, 27580($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C668u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636BBCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2466C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24670: 2861003C slti $at, $v1, 60 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (60) ? 1 : 0); - PGXP_ALU(0x2861003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24674: 10200021 beq $at, $zero, 0xBFC246FC */ - uint32_t psx_brA_BFC24674 = cpu->gpr[1]; uint32_t psx_brB_BFC24674 = cpu->gpr[0]; - psx_taken_BFC24674 = (psx_brA_BFC24674 == psx_brB_BFC24674); - psx_delay_BFC24674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC24678: 00034080 sll $t0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C678u); -#endif - if (psx_delay_BFC24674) { - psx_delay_BFC24674 = 0; - if (psx_taken_BFC24674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C6FCu); - goto label_BFC246FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C67Cu); - } -label_BFC2467C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2467Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2467C: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC24680: 01C37023 subu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[3]; - PGXP_ALU(0x01C37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC24684: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC24688: 01C37023 subu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[3]; - PGXP_ALU(0x01C37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2468C: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24690: 25EFD150 addiu $t7, $t7, -11952 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-11952)); - PGXP_ALU(0x25EFD150u, cpu->gpr[15], _pgx1, 0xFFFFD150u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC24694: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24698: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC2469C: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC246A0: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC246A4: 2474FFE2 addiu $s4, $v1, -30 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[3] + (-30)); - PGXP_ALU(0x2474FFE2u, cpu->gpr[20], _pgx1, 0xFFFFFFE2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC246A8: AC236BBC sw $v1, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C6A8u); return; } g_debug_last_store_pc = 0x8003C6A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236BBCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC246AC: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC246B0: 0C00EC93 jal 0xB003B24C */ - cpu->gpr[31] = 0x8003C6B8u; /* jal link before delay slot */ - psx_delay_BFC246B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC246B4: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6B4u); -#endif - if (psx_delay_BFC246B0) { - psx_delay_BFC246B0 = 0; - cpu->gpr[31] = 0x8003C6B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B24Cu); - cpu->pc = 0x8003B24Cu; return; - } -label_BFC246B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC246B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC246B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC246B8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC246BC: 104100DD beq $v0, $at, 0xBFC24A34 */ - uint32_t psx_brA_BFC246BC = cpu->gpr[2]; uint32_t psx_brB_BFC246BC = cpu->gpr[1]; - psx_taken_BFC246BC = (psx_brA_BFC246BC == psx_brB_BFC246BC); - psx_delay_BFC246BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6C0u); -#endif - /* 0xBFC246C0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C6C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6C0u); -#endif - if (psx_delay_BFC246BC) { - psx_delay_BFC246BC = 0; - if (psx_taken_BFC246BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA34u); - goto label_BFC24A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C6C4u); - } -label_BFC246C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC246C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC246C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC246C4: 0014C080 sll $t8, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC246C8: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC246CC: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC246D0: 0314C023 subu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[20]; - PGXP_ALU(0x0314C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC246D4: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC246D8: 2739DC18 addiu $t9, $t9, -9192 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-9192)); - PGXP_ALU(0x2739DC18u, cpu->gpr[25], _pgx1, 0xFFFFDC18u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC246DC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC246E0: AFB3003C sw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C6E0u); return; } g_debug_last_store_pc = 0x8003C6E0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC246E4: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC246E8: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C6F0u; /* jal link before delay slot */ - psx_delay_BFC246E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC246EC: 27A40060 addiu $a0, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27A40060u, cpu->gpr[4], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6ECu); -#endif - if (psx_delay_BFC246E8) { - psx_delay_BFC246E8 = 0; - cpu->gpr[31] = 0x8003C6F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC246F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC246F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC246F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC246F0: 1000001F beq $zero, $zero, 0xBFC24770 */ - uint32_t psx_brA_BFC246F0 = cpu->gpr[0]; uint32_t psx_brB_BFC246F0 = cpu->gpr[0]; - psx_taken_BFC246F0 = (psx_brA_BFC246F0 == psx_brB_BFC246F0); - psx_delay_BFC246F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC246F4: 2413003C addiu $s3, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2413003Cu, cpu->gpr[19], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6F4u); -#endif - if (psx_delay_BFC246F0) { - psx_delay_BFC246F0 = 0; - if (psx_taken_BFC246F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C770u); - goto label_BFC24770; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C6F8u); - } -label_BFC246F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC246F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC246F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC246F8: 00034080 sll $t0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6F8u); -#endif -label_BFC246FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC246FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC246FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC246FC: 01034023 subu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[3]; - PGXP_ALU(0x01034023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24700: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC24704: 01034023 subu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[3]; - PGXP_ALU(0x01034023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24708: 3C09800F lui $t1, 0x800F */ - cpu->gpr[9] = 0x800F0000u; - PGXP_ALU(0x3C09800Fu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2470C: 2529CC48 addiu $t1, $t1, -13240 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-13240)); - PGXP_ALU(0x2529CC48u, cpu->gpr[9], _pgx1, 0xFFFFCC48u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24710: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24714: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC24718: 24160001 addiu $s6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24160001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2471C: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC24720: 2474FFC4 addiu $s4, $v1, -60 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[3] + (-60)); - PGXP_ALU(0x2474FFC4u, cpu->gpr[20], _pgx1, 0xFFFFFFC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24724: AC236BBC sw $v1, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C724u); return; } g_debug_last_store_pc = 0x8003C724u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236BBCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC24728: 01092021 addu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2472C: 0C00EC93 jal 0xB003B24C */ - cpu->gpr[31] = 0x8003C734u; /* jal link before delay slot */ - psx_delay_BFC2472C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24730: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C730u); -#endif - if (psx_delay_BFC2472C) { - psx_delay_BFC2472C = 0; - cpu->gpr[31] = 0x8003C734u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B24Cu); - cpu->pc = 0x8003B24Cu; return; - } -label_BFC24734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24734: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24738: 104100BE beq $v0, $at, 0xBFC24A34 */ - uint32_t psx_brA_BFC24738 = cpu->gpr[2]; uint32_t psx_brB_BFC24738 = cpu->gpr[1]; - psx_taken_BFC24738 = (psx_brA_BFC24738 == psx_brB_BFC24738); - psx_delay_BFC24738 = 1; - /* 0xBFC2473C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C73Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C73Cu); -#endif - if (psx_delay_BFC24738) { - psx_delay_BFC24738 = 0; - if (psx_taken_BFC24738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA34u); - goto label_BFC24A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C740u); - } -label_BFC24740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC24740: 00145080 sll $t2, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00145080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC24744: 01545023 subu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[20]; - PGXP_ALU(0x01545023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24748: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC2474C: 01545023 subu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[20]; - PGXP_ALU(0x01545023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24750: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24754: 256BE1D8 addiu $t3, $t3, -7720 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-7720)); - PGXP_ALU(0x256BE1D8u, cpu->gpr[11], _pgx1, 0xFFFFE1D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24758: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2475C: AFB3003C sw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C75Cu); return; } g_debug_last_store_pc = 0x8003C75Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC24760: 014B2821 addu $a1, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24764: 0C016A88 jal 0xB005AA20 */ - cpu->gpr[31] = 0x8003C76Cu; /* jal link before delay slot */ - psx_delay_BFC24764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24768: 27A40060 addiu $a0, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27A40060u, cpu->gpr[4], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C768u); -#endif - if (psx_delay_BFC24764) { - psx_delay_BFC24764 = 0; - cpu->gpr[31] = 0x8003C76Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA20u); - cpu->pc = 0x8005AA20u; return; - } -label_BFC2476C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2476Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2476C: 2413001E addiu $s3, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2413001Eu, cpu->gpr[19], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C76Cu); -#endif -label_BFC24770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC24770: 00167080 sll $t6, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00167080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC24774: 00147880 sll $t7, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC24778: 01F47823 subu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[20]; - PGXP_ALU(0x01F47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC2477C: 01D67023 subu $t6, $t6, $s6 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[22]; - PGXP_ALU(0x01D67023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC24780: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24784: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC24788: 01F47823 subu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[20]; - PGXP_ALU(0x01F47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC2478C: 01D67023 subu $t6, $t6, $s6 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[22]; - PGXP_ALU(0x01D67023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC24790: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24794: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC24798: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC2479C: 00156080 sll $t4, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[12] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00156080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC247A0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC247A4: 3C19800F lui $t9, 0x800F */ - cpu->gpr[25] = 0x800F0000u; - PGXP_ALU(0x3C19800Fu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC247A8: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC247AC: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7B0u); -#endif - /* 0xBFC247B0: 8DADA178 lw $t5, -24200($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7B0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADA178u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7B0u); -#endif - /* 0xBFC247B4: 8F39DC10 lw $t9, -9200($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -9200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-9200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7B4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39DC10u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC247B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002100u); -#endif - /* 0xBFC247BC: 01B94021 addu $t0, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC247C0: 29010010 slti $at, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (16) ? 1 : 0); - PGXP_ALU(0x29010010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC247C4: 14200004 bne $at, $zero, 0xBFC247D8 */ - uint32_t psx_brA_BFC247C4 = cpu->gpr[1]; uint32_t psx_brB_BFC247C4 = cpu->gpr[0]; - psx_taken_BFC247C4 = (psx_brA_BFC247C4 != psx_brB_BFC247C4); - psx_delay_BFC247C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC247C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C7C8u); -#endif - if (psx_delay_BFC247C4) { - psx_delay_BFC247C4 = 0; - if (psx_taken_BFC247C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C7D8u); - goto label_BFC247D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C7CCu); - } -label_BFC247CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC247CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC247CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7CCu); -#endif - /* 0xBFC247CC: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7CCu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC247D0: 10000098 beq $zero, $zero, 0xBFC24A34 */ - uint32_t psx_brA_BFC247D0 = cpu->gpr[0]; uint32_t psx_brB_BFC247D0 = cpu->gpr[0]; - psx_taken_BFC247D0 = (psx_brA_BFC247D0 == psx_brB_BFC247D0); - psx_delay_BFC247D0 = 1; - /* 0xBFC247D4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7D4u); -#endif - if (psx_delay_BFC247D0) { - psx_delay_BFC247D0 = 0; - if (psx_taken_BFC247D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA34u); - goto label_BFC24A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C7D8u); - } -label_BFC247D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC247D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC247D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC247D8: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7D8u); return; } g_debug_last_store_pc = 0x8003C7D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC247DC: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7DCu); return; } g_debug_last_store_pc = 0x8003C7DCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC247E0: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C7E0u); return; } g_debug_last_store_pc = 0x8003C7E0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC247E4: 2412000F addiu $s2, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2412000Fu, cpu->gpr[18], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC247E8: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC247EC: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7ECu); -#endif -label_BFC247F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC247F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC247F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC247F0: 0C011BB0 jal 0xB0046EC0 */ - cpu->gpr[31] = 0x8003C7F8u; /* jal link before delay slot */ - psx_delay_BFC247F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90010u); -#endif - /* 0xBFC247F4: 02702021 addu $a0, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02702021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C7F4u); -#endif - if (psx_delay_BFC247F0) { - psx_delay_BFC247F0 = 0; - cpu->gpr[31] = 0x8003C7F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EC0u); - cpu->pc = 0x80046EC0u; return; - } -label_BFC247F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC247F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC247F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC247F8: 10400004 beq $v0, $zero, 0xBFC2480C */ - uint32_t psx_brA_BFC247F8 = cpu->gpr[2]; uint32_t psx_brB_BFC247F8 = cpu->gpr[0]; - psx_taken_BFC247F8 = (psx_brA_BFC247F8 == psx_brB_BFC247F8); - psx_delay_BFC247F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC247FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C7FCu); -#endif - if (psx_delay_BFC247F8) { - psx_delay_BFC247F8 = 0; - if (psx_taken_BFC247F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C80Cu); - goto label_BFC2480C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C800u); - } -label_BFC24800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24800: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC24804: 1612FFFA bne $s0, $s2, 0xBFC247F0 */ - uint32_t psx_brA_BFC24804 = cpu->gpr[16]; uint32_t psx_brB_BFC24804 = cpu->gpr[18]; - psx_taken_BFC24804 = (psx_brA_BFC24804 != psx_brB_BFC24804); - psx_delay_BFC24804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC24808: 02228821 addu $s1, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[2]; - PGXP_ALU(0x02228821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C808u); -#endif - if (psx_delay_BFC24804) { - psx_delay_BFC24804 = 0; - if (psx_taken_BFC24804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C7F0u); - goto label_BFC247F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C80Cu); - } -label_BFC2480C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2480Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC2480C: 16120008 bne $s0, $s2, 0xBFC24830 */ - uint32_t psx_brA_BFC2480C = cpu->gpr[16]; uint32_t psx_brB_BFC2480C = cpu->gpr[18]; - psx_taken_BFC2480C = (psx_brA_BFC2480C != psx_brB_BFC2480C); - psx_delay_BFC2480C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC24810: 00164880 sll $t1, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[9] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00164880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C810u); -#endif - if (psx_delay_BFC2480C) { - psx_delay_BFC2480C = 0; - if (psx_taken_BFC2480C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C830u); - goto label_BFC24830; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C814u); - } -label_BFC24814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C814u); -#endif - /* 0xBFC24814: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C814u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C814u); -#endif - /* 0xBFC24818: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C818u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C818u); -#endif - /* 0xBFC2481C: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C81Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C820u); -#endif - /* 0xBFC24820: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C820u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24824: 10000083 beq $zero, $zero, 0xBFC24A34 */ - uint32_t psx_brA_BFC24824 = cpu->gpr[0]; uint32_t psx_brB_BFC24824 = cpu->gpr[0]; - psx_taken_BFC24824 = (psx_brA_BFC24824 == psx_brB_BFC24824); - psx_delay_BFC24824 = 1; - /* 0xBFC24828: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C828u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C828u); -#endif - if (psx_delay_BFC24824) { - psx_delay_BFC24824 = 0; - if (psx_taken_BFC24824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA34u); - goto label_BFC24A34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C82Cu); - } -label_BFC2482C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2482Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2482Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC2482C: 00164880 sll $t1, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[9] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00164880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C82Cu); -#endif -label_BFC24830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC24830: 00156080 sll $t4, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[12] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00156080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC24834: 01956023 subu $t4, $t4, $s5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[21]; - PGXP_ALU(0x01956023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC24838: 01364823 subu $t1, $t1, $s6 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[22]; - PGXP_ALU(0x01364823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100800u); -#endif - /* 0xBFC2483C: 00145880 sll $t3, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[11] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00145880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC24840: 00107880 sll $t7, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24844: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC24848: 01F07823 subu $t7, $t7, $s0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[16]; - PGXP_ALU(0x01F07823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100800u); -#endif - /* 0xBFC2484C: 01745823 subu $t3, $t3, $s4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[20]; - PGXP_ALU(0x01745823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24850: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24854: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24858: 2442DBFC addiu $v0, $v0, -9220 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-9220)); - PGXP_ALU(0x2442DBFCu, cpu->gpr[2], _pgx1, 0xFFFFDBFCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201000u); -#endif - /* 0xBFC2485C: 01956023 subu $t4, $t4, $s5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[21]; - PGXP_ALU(0x01956023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC24860: 01364823 subu $t1, $t1, $s6 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[22]; - PGXP_ALU(0x01364823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24864: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24868: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2486C: 01F07823 subu $t7, $t7, $s0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[16]; - PGXP_ALU(0x01F07823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100800u); -#endif - /* 0xBFC24870: 01745823 subu $t3, $t3, $s4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[20]; - PGXP_ALU(0x01745823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24874: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24878: 000C6180 sll $t4, $t4, 6 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 6u; - PGXP_ALU(0x000C6180u, cpu->gpr[12], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5004u); -#endif - /* 0xBFC2487C: 004C7021 addu $t6, $v0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[2] + cpu->gpr[12]; - PGXP_ALU(0x004C7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC24880: 00495021 addu $t2, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[2] + cpu->gpr[9]; - PGXP_ALU(0x00495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24884: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24888: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2488C: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC24890: 014B2021 addu $a0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24894: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003C89Cu; /* jal link before delay slot */ - psx_delay_BFC24894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24898: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C898u); -#endif - if (psx_delay_BFC24894) { - psx_delay_BFC24894 = 0; - cpu->gpr[31] = 0x8003C89Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2489C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2489Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2489C: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8A0u); -#endif - /* 0xBFC248A0: 8C636BBC lw $v1, 27580($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C8A0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636BBCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC248A4: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC248A8: 0C011BD0 jal 0xB0046F40 */ - cpu->gpr[31] = 0x8003C8B0u; /* jal link before delay slot */ - psx_delay_BFC248A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC248AC: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8ACu); -#endif - if (psx_delay_BFC248A8) { - psx_delay_BFC248A8 = 0; - cpu->gpr[31] = 0x8003C8B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F40u); - cpu->pc = 0x80046F40u; return; - } -label_BFC248B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC248B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC248B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400005u); -#endif - /* 0xBFC248B0: 0040B021 addu $s6, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC248B4: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC248B8: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x8003C8C0u; /* jal link before delay slot */ - psx_delay_BFC248B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC248BC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8BCu); -#endif - if (psx_delay_BFC248B8) { - psx_delay_BFC248B8 = 0; - cpu->gpr[31] = 0x8003C8C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC248C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC248C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC248C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC248C0: 1840004F blez $v0, 0xBFC24A00 */ - uint32_t psx_brA_BFC248C0 = cpu->gpr[2]; - psx_taken_BFC248C0 = ((int32_t)psx_brA_BFC248C0 <= 0); - psx_delay_BFC248C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC248C4: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8C4u); -#endif - if (psx_delay_BFC248C0) { - psx_delay_BFC248C0 = 0; - if (psx_taken_BFC248C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA00u); - goto label_BFC24A00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C8C8u); - } -label_BFC248C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC248C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC248C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC248C8: 0015C100 sll $t8, $s5, 4 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 4u; - PGXP_ALU(0x0015C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC248CC: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC248D0: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC248D4: 00116880 sll $t5, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002000u); -#endif - /* 0xBFC248D8: 030DC821 addu $t9, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[13]; - PGXP_ALU(0x030DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC248DC: 00144080 sll $t0, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[8] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00144080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC248E0: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC248E4: 254A6BC4 addiu $t2, $t2, 27588 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (27588)); - PGXP_ALU(0x254A6BC4u, cpu->gpr[10], _pgx1, 0x00006BC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC248E8: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC248EC: 3C15800F lui $s5, 0x800F */ - cpu->gpr[21] = 0x800F0000u; - PGXP_ALU(0x3C15800Fu, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003C8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC248F0: 26B5D2A0 addiu $s5, $s5, -11616 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-11616)); - PGXP_ALU(0x26B5D2A0u, cpu->gpr[21], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80600u); -#endif - /* 0xBFC248F4: 012A9821 addu $s3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[19] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC248F8: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C8F8u); -#endif -label_BFC248FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC248FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC248FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC248FC: 0C011B9B jal 0xB0046E6C */ - cpu->gpr[31] = 0x8003C904u; /* jal link before delay slot */ - psx_delay_BFC248FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC24900: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C900u); -#endif - if (psx_delay_BFC248FC) { - psx_delay_BFC248FC = 0; - cpu->gpr[31] = 0x8003C904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046E6Cu); - cpu->pc = 0x80046E6Cu; return; - } -label_BFC24904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC24904: 00025880 sll $t3, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC24908: 01625823 subu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01625823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2490C: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C910u); -#endif - /* 0xBFC24910: 86650000 lh $a1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003C910u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x80000u); } - PGXP_LOAD(0x86650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C910u); -#endif - /* 0xBFC24914: 866C0002 lh $t4, 2($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003C914u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x80000u); } - PGXP_LOAD(0x866C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200808u); -#endif - /* 0xBFC24918: 02AB1821 addu $v1, $s5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[21] + cpu->gpr[11]; - PGXP_ALU(0x02AB1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C918u); -#endif - /* 0xBFC2491C: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C91Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24920: 24A50019 addiu $a1, $a1, 25 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (25)); - PGXP_ALU(0x24A50019u, cpu->gpr[5], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC24924: 258E0019 addiu $t6, $t4, 25 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] + (25)); - PGXP_ALU(0x258E0019u, cpu->gpr[14], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC24928: AC650008 sw $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C928u); return; } g_debug_last_store_pc = 0x8003C928u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2492C: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC24930: AC6E000C sw $t6, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C930u); return; } g_debug_last_store_pc = 0x8003C930u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24934: 0C016A6C jal 0xB005A9B0 */ - cpu->gpr[31] = 0x8003C93Cu; /* jal link before delay slot */ - psx_delay_BFC24934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8030u); -#endif - /* 0xBFC24938: 00AF2023 subu $a0, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[5] - cpu->gpr[15]; - PGXP_ALU(0x00AF2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C938u); -#endif - if (psx_delay_BFC24934) { - psx_delay_BFC24934 = 0; - cpu->gpr[31] = 0x8003C93Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9B0u); - cpu->pc = 0x8005A9B0u; return; - } -label_BFC2493C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2493Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC2493C: 0011C080 sll $t8, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 2u; - PGXP_ALU(0x0011C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC24940: 0311C023 subu $t8, $t8, $s1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[17]; - PGXP_ALU(0x0311C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24944: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1210000u); -#endif - /* 0xBFC24948: 02B88021 addu $s0, $s5, $t8 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[21] + cpu->gpr[24]; - PGXP_ALU(0x02B88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C948u); -#endif - /* 0xBFC2494C: 8E0D000C lw $t5, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C94Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C950u); -#endif - /* 0xBFC24950: 8E190004 lw $t9, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C950u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC24954: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24958: 0C016A6C jal 0xB005A9B0 */ - cpu->gpr[31] = 0x8003C960u; /* jal link before delay slot */ - psx_delay_BFC24958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002010u); -#endif - /* 0xBFC2495C: 01B92023 subu $a0, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[13] - cpu->gpr[25]; - PGXP_ALU(0x01B92023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C95Cu); -#endif - if (psx_delay_BFC24958) { - psx_delay_BFC24958 = 0; - cpu->gpr[31] = 0x8003C960u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9B0u); - cpu->pc = 0x8005A9B0u; return; - } -label_BFC24960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C960u); -#endif - /* 0xBFC24960: 8E080008 lw $t0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C960u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x8E080008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C960u); -#endif - /* 0xBFC24964: 8E090000 lw $t1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C964u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24968: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC2496C: 0128082A slt $at, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0128082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24970: 1020000A beq $at, $zero, 0xBFC2499C */ - uint32_t psx_brA_BFC24970 = cpu->gpr[1]; uint32_t psx_brB_BFC24970 = cpu->gpr[0]; - psx_taken_BFC24970 = (psx_brA_BFC24970 == psx_brB_BFC24970); - psx_delay_BFC24970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24974: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C974u); -#endif - if (psx_delay_BFC24970) { - psx_delay_BFC24970 = 0; - if (psx_taken_BFC24970) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C99Cu); - goto label_BFC2499C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C978u); - } -label_BFC24978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24978: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2497C: 04610002 bgez $v1, 0xBFC24988 */ - uint32_t psx_brA_BFC2497C = cpu->gpr[3]; - psx_taken_BFC2497C = ((int32_t)psx_brA_BFC2497C >= 0); - psx_delay_BFC2497C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC24980: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C980u); -#endif - if (psx_delay_BFC2497C) { - psx_delay_BFC2497C = 0; - if (psx_taken_BFC2497C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C988u); - goto label_BFC24988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C984u); - } -label_BFC24984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24984: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C984u); -#endif -label_BFC24988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24988: 000119C3 sra $v1, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000119C3u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2498C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24990: 10000009 beq $zero, $zero, 0xBFC249B8 */ - uint32_t psx_brA_BFC24990 = cpu->gpr[0]; uint32_t psx_brB_BFC24990 = cpu->gpr[0]; - psx_taken_BFC24990 = (psx_brA_BFC24990 == psx_brB_BFC24990); - psx_delay_BFC24990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC24994: AE030010 sw $v1, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C994u); return; } g_debug_last_store_pc = 0x8003C994u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE030010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C994u); -#endif - if (psx_delay_BFC24990) { - psx_delay_BFC24990 = 0; - if (psx_taken_BFC24990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9B8u); - goto label_BFC249B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C998u); - } -label_BFC24998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24998: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C998u); -#endif -label_BFC2499C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2499Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2499C: 04610002 bgez $v1, 0xBFC249A8 */ - uint32_t psx_brA_BFC2499C = cpu->gpr[3]; - psx_taken_BFC2499C = ((int32_t)psx_brA_BFC2499C >= 0); - psx_delay_BFC2499C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC249A0: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9A0u); -#endif - if (psx_delay_BFC2499C) { - psx_delay_BFC2499C = 0; - if (psx_taken_BFC2499C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9A8u); - goto label_BFC249A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9A4u); - } -label_BFC249A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC249A4: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9A4u); -#endif -label_BFC249A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC249A8: 000119C3 sra $v1, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000119C3u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC249AC: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x409u); -#endif - /* 0xBFC249B0: 00035023 subu $t2, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00035023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC249B4: AE0A0010 sw $t2, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C9B4u); return; } g_debug_last_store_pc = 0x8003C9B4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAE0A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9B4u); -#endif -label_BFC249B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9B8u); -#endif - /* 0xBFC249B8: 8E0B000C lw $t3, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C9B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9B8u); -#endif - /* 0xBFC249BC: 8E0C0004 lw $t4, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C9BCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x8E0C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC249C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1802u); -#endif - /* 0xBFC249C4: 018B082A slt $at, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x018B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC249C8: 10200004 beq $at, $zero, 0xBFC249DC */ - uint32_t psx_brA_BFC249C8 = cpu->gpr[1]; uint32_t psx_brB_BFC249C8 = cpu->gpr[0]; - psx_taken_BFC249C8 = (psx_brA_BFC249C8 == psx_brB_BFC249C8); - psx_delay_BFC249C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC249CC: 00037023 subu $t6, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00037023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9CCu); -#endif - if (psx_delay_BFC249C8) { - psx_delay_BFC249C8 = 0; - if (psx_taken_BFC249C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9DCu); - goto label_BFC249DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9D0u); - } -label_BFC249D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC249D0: 10000003 beq $zero, $zero, 0xBFC249E0 */ - uint32_t psx_brA_BFC249D0 = cpu->gpr[0]; uint32_t psx_brB_BFC249D0 = cpu->gpr[0]; - psx_taken_BFC249D0 = (psx_brA_BFC249D0 == psx_brB_BFC249D0); - psx_delay_BFC249D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC249D4: AE030014 sw $v1, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C9D4u); return; } g_debug_last_store_pc = 0x8003C9D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE030014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9D4u); -#endif - if (psx_delay_BFC249D0) { - psx_delay_BFC249D0 = 0; - if (psx_taken_BFC249D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9E0u); - goto label_BFC249E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9D8u); - } -label_BFC249D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC249D8: 00037023 subu $t6, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00037023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9D8u); -#endif -label_BFC249DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC249DC: AE0E0014 sw $t6, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003C9DCu); return; } g_debug_last_store_pc = 0x8003C9DCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE0E0014u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9DCu); -#endif -label_BFC249E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC249E0: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC249E4: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC249E8: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x8003C9F0u; /* jal link before delay slot */ - psx_delay_BFC249E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC249EC: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9ECu); -#endif - if (psx_delay_BFC249E8) { - psx_delay_BFC249E8 = 0; - cpu->gpr[31] = 0x8003C9F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC249F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100006u); -#endif - /* 0xBFC249F0: 0282082A slt $at, $s4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC249F4: 1420FFC1 bne $at, $zero, 0xBFC248FC */ - uint32_t psx_brA_BFC249F4 = cpu->gpr[1]; uint32_t psx_brB_BFC249F4 = cpu->gpr[0]; - psx_taken_BFC249F4 = (psx_brA_BFC249F4 != psx_brB_BFC249F4); - psx_delay_BFC249F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC249F8: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9F8u); -#endif - if (psx_delay_BFC249F4) { - psx_delay_BFC249F4 = 0; - if (psx_taken_BFC249F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C8FCu); - goto label_BFC248FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003C9FCu); - } -label_BFC249FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC249FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC249FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003C9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC249FC: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003C9FCu); -#endif -label_BFC24A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24A00: 0C011B24 jal 0xB0046C90 */ - cpu->gpr[31] = 0x8003CA08u; /* jal link before delay slot */ - psx_delay_BFC24A00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24A04: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA04u); -#endif - if (psx_delay_BFC24A00) { - psx_delay_BFC24A00 = 0; - cpu->gpr[31] = 0x8003CA08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046C90u); - cpu->pc = 0x80046C90u; return; - } -label_BFC24A08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC24A08: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24A0C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC24A10: AC2F9EC8 sw $t7, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA10u); return; } g_debug_last_store_pc = 0x8003CA10u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9EC8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24A14: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24A18: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CA18u); -#endif - /* 0xBFC24A1C: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA1Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA20u); -#endif - /* 0xBFC24A20: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA20u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA20u); -#endif - /* 0xBFC24A24: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA24u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA24u); -#endif - /* 0xBFC24A28: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA28u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24A2C: AC236BBC sw $v1, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA2Cu); return; } g_debug_last_store_pc = 0x8003CA2Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC236BBCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA30u); -#endif - /* 0xBFC24A30: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA30u); -#endif -label_BFC24A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA34u); -#endif - /* 0xBFC24A34: 8FB40018 lw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA34u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA34u); -#endif - /* 0xBFC24A38: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA38u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA38u); -#endif - /* 0xBFC24A3C: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA3Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC24A40: 03E00008 jr $ra */ - psx_delay_BFC24A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24A44: 27BD00C0 addiu $sp, $sp, 192 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (192)); - PGXP_ALU(0x27BD00C0u, cpu->gpr[29], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA44u); -#endif - if (psx_delay_BFC24A40) { - psx_delay_BFC24A40 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC24A48(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC24A48u); - int psx_delay_BFC24A74 = 0; - int psx_delay_BFC24A8C = 0; - int psx_taken_BFC24A8C = 0; - int psx_delay_BFC24AA8 = 0; - int psx_taken_BFC24AA8 = 0; - int psx_delay_BFC24AE8 = 0; - int psx_delay_BFC24AF4 = 0; - int psx_taken_BFC24AF4 = 0; - int psx_delay_BFC24B3C = 0; - int psx_delay_BFC24B48 = 0; - int psx_taken_BFC24B48 = 0; - int psx_delay_BFC24B58 = 0; - int psx_delay_BFC24B60 = 0; - int psx_taken_BFC24B60 = 0; - int psx_delay_BFC24B6C = 0; - int psx_taken_BFC24B6C = 0; - int psx_delay_BFC24B74 = 0; - int psx_taken_BFC24B74 = 0; - int psx_delay_BFC24BD0 = 0; - int psx_taken_BFC24BD0 = 0; - int psx_delay_BFC24BF8 = 0; - int psx_taken_BFC24BF8 = 0; - int psx_delay_BFC24C2C = 0; - int psx_delay_BFC24C38 = 0; - int psx_taken_BFC24C38 = 0; - int psx_delay_BFC24C80 = 0; - int psx_delay_BFC24C8C = 0; - int psx_taken_BFC24C8C = 0; - int psx_delay_BFC24C9C = 0; - int psx_delay_BFC24CA4 = 0; - int psx_taken_BFC24CA4 = 0; - int psx_delay_BFC24CB0 = 0; - int psx_taken_BFC24CB0 = 0; - int psx_delay_BFC24CB8 = 0; - int psx_taken_BFC24CB8 = 0; - int psx_delay_BFC24D34 = 0; - int psx_delay_BFC24D40 = 0; - int psx_delay_BFC24D4C = 0; - int psx_taken_BFC24D4C = 0; - int psx_delay_BFC24D58 = 0; - int psx_delay_BFC24D60 = 0; - int psx_taken_BFC24D60 = 0; - int psx_delay_BFC24D98 = 0; - int psx_delay_BFC24DD0 = 0; - int psx_delay_BFC24DF4 = 0; - int psx_delay_BFC24E0C = 0; - int psx_taken_BFC24E0C = 0; - int psx_delay_BFC24E18 = 0; - int psx_taken_BFC24E18 = 0; - int psx_delay_BFC24E2C = 0; - int psx_taken_BFC24E2C = 0; - int psx_delay_BFC24E38 = 0; - int psx_taken_BFC24E38 = 0; - int psx_delay_BFC24E64 = 0; - int psx_taken_BFC24E64 = 0; - int psx_delay_BFC24E6C = 0; - int psx_taken_BFC24E6C = 0; - int psx_delay_BFC24E84 = 0; - int psx_delay_BFC24E90 = 0; - int psx_taken_BFC24E90 = 0; - int psx_delay_BFC24E9C = 0; - int psx_delay_BFC24EC0 = 0; - int psx_taken_BFC24EC0 = 0; - int psx_delay_BFC24EF8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC24A7Cu: goto label_BFC24A7C; - case 0xBFC24A94u: goto label_BFC24A94; - case 0xBFC24AB0u: goto label_BFC24AB0; - case 0xBFC24AC8u: goto label_BFC24AC8; - case 0xBFC24AE0u: goto label_BFC24AE0; - case 0xBFC24AF0u: goto label_BFC24AF0; - case 0xBFC24AFCu: goto label_BFC24AFC; - case 0xBFC24B44u: goto label_BFC24B44; - case 0xBFC24B50u: goto label_BFC24B50; - case 0xBFC24B58u: goto label_BFC24B58; - case 0xBFC24B60u: goto label_BFC24B60; - case 0xBFC24B68u: goto label_BFC24B68; - case 0xBFC24B74u: goto label_BFC24B74; - case 0xBFC24B7Cu: goto label_BFC24B7C; - case 0xBFC24BC4u: goto label_BFC24BC4; - case 0xBFC24BD8u: goto label_BFC24BD8; - case 0xBFC24BDCu: goto label_BFC24BDC; - case 0xBFC24C00u: goto label_BFC24C00; - case 0xBFC24C1Cu: goto label_BFC24C1C; - case 0xBFC24C34u: goto label_BFC24C34; - case 0xBFC24C40u: goto label_BFC24C40; - case 0xBFC24C88u: goto label_BFC24C88; - case 0xBFC24C94u: goto label_BFC24C94; - case 0xBFC24C9Cu: goto label_BFC24C9C; - case 0xBFC24CA4u: goto label_BFC24CA4; - case 0xBFC24CACu: goto label_BFC24CAC; - case 0xBFC24CB8u: goto label_BFC24CB8; - case 0xBFC24CC0u: goto label_BFC24CC0; - case 0xBFC24D3Cu: goto label_BFC24D3C; - case 0xBFC24D48u: goto label_BFC24D48; - case 0xBFC24D54u: goto label_BFC24D54; - case 0xBFC24D60u: goto label_BFC24D60; - case 0xBFC24D68u: goto label_BFC24D68; - case 0xBFC24D98u: goto label_BFC24D98; - case 0xBFC24DA0u: goto label_BFC24DA0; - case 0xBFC24DD8u: goto label_BFC24DD8; - case 0xBFC24DFCu: goto label_BFC24DFC; - case 0xBFC24E14u: goto label_BFC24E14; - case 0xBFC24E20u: goto label_BFC24E20; - case 0xBFC24E24u: goto label_BFC24E24; - case 0xBFC24E34u: goto label_BFC24E34; - case 0xBFC24E38u: goto label_BFC24E38; - case 0xBFC24E40u: goto label_BFC24E40; - case 0xBFC24E44u: goto label_BFC24E44; - case 0xBFC24E54u: goto label_BFC24E54; - case 0xBFC24E6Cu: goto label_BFC24E6C; - case 0xBFC24E74u: goto label_BFC24E74; - case 0xBFC24E78u: goto label_BFC24E78; - case 0xBFC24E7Cu: goto label_BFC24E7C; - case 0xBFC24E8Cu: goto label_BFC24E8C; - case 0xBFC24E98u: goto label_BFC24E98; - case 0xBFC24E9Cu: goto label_BFC24E9C; - case 0xBFC24EA4u: goto label_BFC24EA4; - case 0xBFC24EB0u: goto label_BFC24EB0; - case 0xBFC24EB4u: goto label_BFC24EB4; - case 0xBFC24EC8u: goto label_BFC24EC8; - case 0xBFC24EE0u: goto label_BFC24EE0; - default: break; - } - } -label_BFC24A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24A48: 27BDFF28 addiu $sp, $sp, -216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-216)); - PGXP_ALU(0x27BDFF28u, cpu->gpr[29], _pgx1, 0xFFFFFF28u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC24A4C: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA4Cu); return; } g_debug_last_store_pc = 0x8003CA4Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC24A50: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA50u); return; } g_debug_last_store_pc = 0x8003CA50u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC24A54: AFBE0038 sw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA54u); return; } g_debug_last_store_pc = 0x8003CA54u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC24A58: AFB70034 sw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA58u); return; } g_debug_last_store_pc = 0x8003CA58u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC24A5C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC24A60: AFB30030 sw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA60u); return; } g_debug_last_store_pc = 0x8003CA60u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC24A64: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA64u); return; } g_debug_last_store_pc = 0x8003CA64u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC24A68: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA68u); return; } g_debug_last_store_pc = 0x8003CA68u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC24A6C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC24A70: 2484A138 addiu $a0, $a0, -24264 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24264)); - PGXP_ALU(0x2484A138u, cpu->gpr[4], _pgx1, 0xFFFFA138u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24A74: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8003CA7Cu; /* jal link before delay slot */ - psx_delay_BFC24A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24A78: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA78u); -#endif - if (psx_delay_BFC24A74) { - psx_delay_BFC24A74 = 0; - cpu->gpr[31] = 0x8003CA7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC24A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC24A7C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA80u); -#endif - /* 0xBFC24A80: 8DCE6BBC lw $t6, 27580($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA80u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6BBCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC24A88: 29C1003C slti $at, $t6, 60 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (60) ? 1 : 0); - PGXP_ALU(0x29C1003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24A8C: 10200008 beq $at, $zero, 0xBFC24AB0 */ - uint32_t psx_brA_BFC24A8C = cpu->gpr[1]; uint32_t psx_brB_BFC24A8C = cpu->gpr[0]; - psx_taken_BFC24A8C = (psx_brA_BFC24A8C == psx_brB_BFC24A8C); - psx_delay_BFC24A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24A90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CA90u); -#endif - if (psx_delay_BFC24A8C) { - psx_delay_BFC24A8C = 0; - if (psx_taken_BFC24A8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CAB0u); - goto label_BFC24AB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CA94u); - } -label_BFC24A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC24A94: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24A98: 2403001E addiu $v1, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2403001Eu, cpu->gpr[3], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC24A9C: AFA000C8 sw $zero, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CA9Cu); return; } g_debug_last_store_pc = 0x8003CA9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000C8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC24AA0: AFAF00C4 sw $t7, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAA0u); return; } g_debug_last_store_pc = 0x8003CAA0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF00C4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC24AA4: 241E003C addiu $fp, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x241E003Cu, cpu->gpr[30], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24AA8: 10000007 beq $zero, $zero, 0xBFC24AC8 */ - uint32_t psx_brA_BFC24AA8 = cpu->gpr[0]; uint32_t psx_brB_BFC24AA8 = cpu->gpr[0]; - psx_taken_BFC24AA8 = (psx_brA_BFC24AA8 == psx_brB_BFC24AA8); - psx_delay_BFC24AA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC24AAC: AFA300BC sw $v1, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAACu); return; } g_debug_last_store_pc = 0x8003CAACu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300BCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAACu); -#endif - if (psx_delay_BFC24AA8) { - psx_delay_BFC24AA8 = 0; - if (psx_taken_BFC24AA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CAC8u); - goto label_BFC24AC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CAB0u); - } -label_BFC24AB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC24AB0: AFA000C4 sw $zero, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAB0u); return; } g_debug_last_store_pc = 0x8003CAB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000C4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC24AB4: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC24AB8: 2419003C addiu $t9, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2419003Cu, cpu->gpr[25], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC24ABC: AFB800C8 sw $t8, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CABCu); return; } g_debug_last_store_pc = 0x8003CABCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB800C8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC24AC0: AFB900BC sw $t9, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAC0u); return; } g_debug_last_store_pc = 0x8003CAC0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900BCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC24AC4: 241E001E addiu $fp, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x241E001Eu, cpu->gpr[30], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAC4u); -#endif -label_BFC24AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24AC8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC24ACC: 3C13800F lui $s3, 0x800F */ - cpu->gpr[19] = 0x800F0000u; - PGXP_ALU(0x3C13800Fu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAD0u); -#endif - /* 0xBFC24AD0: 8FA300BC lw $v1, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAD0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300BCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC24AD4: 2673DBA0 addiu $s3, $s3, -9312 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-9312)); - PGXP_ALU(0x2673DBA0u, cpu->gpr[19], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC24AD8: AFA200D4 sw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAD8u); return; } g_debug_last_store_pc = 0x8003CAD8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC24ADC: 2417000F addiu $s7, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2417000Fu, cpu->gpr[23], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CADCu); -#endif -label_BFC24AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAE0u); -#endif - /* 0xBFC24AE0: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAE0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAE0u); -#endif - /* 0xBFC24AE4: 8FA300BC lw $v1, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAE4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA300BCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24AE8: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x8003CAF0u; /* jal link before delay slot */ - psx_delay_BFC24AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC24AEC: 00622021 addu $a0, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00622021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAECu); -#endif - if (psx_delay_BFC24AE8) { - psx_delay_BFC24AE8 = 0; - cpu->gpr[31] = 0x8003CAF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC24AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24AF0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24AF4: 10410033 beq $v0, $at, 0xBFC24BC4 */ - uint32_t psx_brA_BFC24AF4 = cpu->gpr[2]; uint32_t psx_brB_BFC24AF4 = cpu->gpr[1]; - psx_taken_BFC24AF4 = (psx_brA_BFC24AF4 == psx_brB_BFC24AF4); - psx_delay_BFC24AF4 = 1; - /* 0xBFC24AF8: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAF8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAF8u); -#endif - if (psx_delay_BFC24AF4) { - psx_delay_BFC24AF4 = 0; - if (psx_taken_BFC24AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CBC4u); - goto label_BFC24BC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CAFCu); - } -label_BFC24AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CAFCu); -#endif - /* 0xBFC24AFC: 8FA800C8 lw $t0, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CAFCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800C8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB00u); -#endif - /* 0xBFC24B00: 8FAA00D4 lw $t2, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB00u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00D4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC24B04: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC24B08: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC24B0C: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC24B10: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24B14: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24B18: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC24B1C: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC24B20: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24B24: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24B28: 00094980 sll $t1, $t1, 6 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 6u; - PGXP_ALU(0x00094980u, cpu->gpr[9], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24B2C: 3C0D800F lui $t5, 0x800F */ - cpu->gpr[13] = 0x800F0000u; - PGXP_ALU(0x3C0D800Fu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24B30: 25ADDC18 addiu $t5, $t5, -9192 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-9192)); - PGXP_ALU(0x25ADDC18u, cpu->gpr[13], _pgx1, 0xFFFFDC18u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1A00u); -#endif - /* 0xBFC24B34: 012B6021 addu $t4, $t1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[9] + cpu->gpr[11]; - PGXP_ALU(0x012B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB34u); -#endif - /* 0xBFC24B38: 8FA500C4 lw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB38u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24B3C: 0C00EC93 jal 0xB003B24C */ - cpu->gpr[31] = 0x8003CB44u; /* jal link before delay slot */ - psx_delay_BFC24B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC24B40: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB40u); -#endif - if (psx_delay_BFC24B3C) { - psx_delay_BFC24B3C = 0; - cpu->gpr[31] = 0x8003CB44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B24Cu); - cpu->pc = 0x8003B24Cu; return; - } -label_BFC24B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24B44: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24B48: 1041001E beq $v0, $at, 0xBFC24BC4 */ - uint32_t psx_brA_BFC24B48 = cpu->gpr[2]; uint32_t psx_brB_BFC24B48 = cpu->gpr[1]; - psx_taken_BFC24B48 = (psx_brA_BFC24B48 == psx_brB_BFC24B48); - psx_delay_BFC24B48 = 1; - /* 0xBFC24B4C: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB4Cu); -#endif - if (psx_delay_BFC24B48) { - psx_delay_BFC24B48 = 0; - if (psx_taken_BFC24B48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CBC4u); - goto label_BFC24BC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB50u); - } -label_BFC24B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC24B50: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC24B54: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB54u); -#endif -label_BFC24B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24B58: 0C011BB0 jal 0xB0046EC0 */ - cpu->gpr[31] = 0x8003CB60u; /* jal link before delay slot */ - psx_delay_BFC24B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010010u); -#endif - /* 0xBFC24B5C: 03D02021 addu $a0, $fp, $s0 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[16]; - PGXP_ALU(0x03D02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB5Cu); -#endif - if (psx_delay_BFC24B58) { - psx_delay_BFC24B58 = 0; - cpu->gpr[31] = 0x8003CB60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EC0u); - cpu->pc = 0x80046EC0u; return; - } -label_BFC24B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24B60: 10400004 beq $v0, $zero, 0xBFC24B74 */ - uint32_t psx_brA_BFC24B60 = cpu->gpr[2]; uint32_t psx_brB_BFC24B60 = cpu->gpr[0]; - psx_taken_BFC24B60 = (psx_brA_BFC24B60 == psx_brB_BFC24B60); - psx_delay_BFC24B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CB64u); -#endif - if (psx_delay_BFC24B60) { - psx_delay_BFC24B60 = 0; - if (psx_taken_BFC24B60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB74u); - goto label_BFC24B74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB68u); - } -label_BFC24B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24B68: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC24B6C: 1617FFFA bne $s0, $s7, 0xBFC24B58 */ - uint32_t psx_brA_BFC24B6C = cpu->gpr[16]; uint32_t psx_brB_BFC24B6C = cpu->gpr[23]; - psx_taken_BFC24B6C = (psx_brA_BFC24B6C != psx_brB_BFC24B6C); - psx_delay_BFC24B6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC24B70: 02228821 addu $s1, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[2]; - PGXP_ALU(0x02228821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB70u); -#endif - if (psx_delay_BFC24B6C) { - psx_delay_BFC24B6C = 0; - if (psx_taken_BFC24B6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB58u); - goto label_BFC24B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB74u); - } -label_BFC24B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC24B74: 12170019 beq $s0, $s7, 0xBFC24BDC */ - uint32_t psx_brA_BFC24B74 = cpu->gpr[16]; uint32_t psx_brB_BFC24B74 = cpu->gpr[23]; - psx_taken_BFC24B74 = (psx_brA_BFC24B74 == psx_brB_BFC24B74); - psx_delay_BFC24B74 = 1; - /* 0xBFC24B78: 8FAB00C4 lw $t3, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB78u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00C4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB78u); -#endif - if (psx_delay_BFC24B74) { - psx_delay_BFC24B74 = 0; - if (psx_taken_BFC24B74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CBDCu); - goto label_BFC24BDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CB7Cu); - } -label_BFC24B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB7Cu); -#endif - /* 0xBFC24B7C: 8FAE00C8 lw $t6, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB7Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00C8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB80u); -#endif - /* 0xBFC24B80: 8FB900D4 lw $t9, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CB80u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900D4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC24B84: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC24B88: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC24B8C: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24B90: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC24B94: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24B98: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC24B9C: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC24BA0: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC24BA4: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24BA8: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1088000u); -#endif - /* 0xBFC24BAC: 026FC021 addu $t8, $s3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[19] + cpu->gpr[15]; - PGXP_ALU(0x026FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000500u); -#endif - /* 0xBFC24BB0: 03085021 addu $t2, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[24] + cpu->gpr[8]; - PGXP_ALU(0x03085021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBB0u); -#endif - /* 0xBFC24BB4: 8D490070 lw $t1, 112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBB4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x400u); } - PGXP_LOAD(0x8D490070u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC24BBC: 02499021 addu $s2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02499021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBC0u); -#endif - /* 0xBFC24BC0: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBC0u); -#endif -label_BFC24BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24BC8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24BCC: 2841000F slti $at, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0); - PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24BD0: 1420FFC3 bne $at, $zero, 0xBFC24AE0 */ - uint32_t psx_brA_BFC24BD0 = cpu->gpr[1]; uint32_t psx_brB_BFC24BD0 = cpu->gpr[0]; - psx_taken_BFC24BD0 = (psx_brA_BFC24BD0 != psx_brB_BFC24BD0); - psx_delay_BFC24BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC24BD4: AFA200D4 sw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBD4u); return; } g_debug_last_store_pc = 0x8003CBD4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBD4u); -#endif - if (psx_delay_BFC24BD0) { - psx_delay_BFC24BD0 = 0; - if (psx_taken_BFC24BD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CAE0u); - goto label_BFC24AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CBD8u); - } -label_BFC24BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBD8u); -#endif - /* 0xBFC24BD8: 8FAB00C4 lw $t3, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBD8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00C4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBD8u); -#endif -label_BFC24BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24BDC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC24BE0: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC24BE4: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBE4u); -#endif - /* 0xBFC24BE8: 8DADA178 lw $t5, -24200($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBE8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADA178u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24BEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46000u); -#endif - /* 0xBFC24BF0: 01B27021 addu $t6, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[13] + cpu->gpr[18]; - PGXP_ALU(0x01B27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC24BF4: 29C10010 slti $at, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (16) ? 1 : 0); - PGXP_ALU(0x29C10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24BF8: 102000B9 beq $at, $zero, 0xBFC24EE0 */ - uint32_t psx_brA_BFC24BF8 = cpu->gpr[1]; uint32_t psx_brB_BFC24BF8 = cpu->gpr[0]; - psx_taken_BFC24BF8 = (psx_brA_BFC24BF8 == psx_brB_BFC24BF8); - psx_delay_BFC24BF8 = 1; - /* 0xBFC24BFC: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CBFCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CBFCu); -#endif - if (psx_delay_BFC24BF8) { - psx_delay_BFC24BF8 = 0; - if (psx_taken_BFC24BF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEE0u); - goto label_BFC24EE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CC00u); - } -label_BFC24C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC24C00: AFB60044 sw $s6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC00u); return; } g_debug_last_store_pc = 0x8003CC00u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60044u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC24C04: AFB4004C sw $s4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC04u); return; } g_debug_last_store_pc = 0x8003CC04u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4004Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC24C08: 3C16800F lui $s6, 0x800F */ - cpu->gpr[22] = 0x800F0000u; - PGXP_ALU(0x3C16800Fu, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24C0C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC24C10: AFB50048 sw $s5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC10u); return; } g_debug_last_store_pc = 0x8003CC10u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50048u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC24C14: AFA200D4 sw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC14u); return; } g_debug_last_store_pc = 0x8003CC14u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC24C18: 26D6D2A0 addiu $s6, $s6, -11616 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-11616)); - PGXP_ALU(0x26D6D2A0u, cpu->gpr[22], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC18u); -#endif -label_BFC24C1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC1Cu); -#endif - /* 0xBFC24C1C: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC1Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC20u); -#endif - /* 0xBFC24C20: 8FAF00BC lw $t7, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC20u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00BCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24C24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48004u); -#endif - /* 0xBFC24C28: 01E29021 addu $s2, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[15] + cpu->gpr[2]; - PGXP_ALU(0x01E29021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24C2C: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x8003CC34u; /* jal link before delay slot */ - psx_delay_BFC24C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC24C30: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC30u); -#endif - if (psx_delay_BFC24C2C) { - psx_delay_BFC24C2C = 0; - cpu->gpr[31] = 0x8003CC34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC24C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24C34: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24C38: 1041009E beq $v0, $at, 0xBFC24EB4 */ - uint32_t psx_brA_BFC24C38 = cpu->gpr[2]; uint32_t psx_brB_BFC24C38 = cpu->gpr[1]; - psx_taken_BFC24C38 = (psx_brA_BFC24C38 == psx_brB_BFC24C38); - psx_delay_BFC24C38 = 1; - /* 0xBFC24C3C: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC3Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC3Cu); -#endif - if (psx_delay_BFC24C38) { - psx_delay_BFC24C38 = 0; - if (psx_taken_BFC24C38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEB4u); - goto label_BFC24EB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CC40u); - } -label_BFC24C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC40u); -#endif - /* 0xBFC24C40: 8FB900C8 lw $t9, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC40u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900C8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC40u); -#endif - /* 0xBFC24C44: 8FA800D4 lw $t0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC44u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800D4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC24C48: 0019C080 sll $t8, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC24C4C: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC24C50: 0319C023 subu $t8, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x0319C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC24C54: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24C58: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24C5C: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC24C60: 0319C023 subu $t8, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x0319C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC24C64: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC24C68: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24C6C: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24C70: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC24C74: 256BDC18 addiu $t3, $t3, -9192 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-9192)); - PGXP_ALU(0x256BDC18u, cpu->gpr[11], _pgx1, 0xFFFFDC18u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC24C78: 030A4821 addu $t1, $t8, $t2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[24] + cpu->gpr[10]; - PGXP_ALU(0x030A4821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC78u); -#endif - /* 0xBFC24C7C: 8FA500C4 lw $a1, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC7Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500C4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24C80: 0C00EC93 jal 0xB003B24C */ - cpu->gpr[31] = 0x8003CC88u; /* jal link before delay slot */ - psx_delay_BFC24C80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA10u); -#endif - /* 0xBFC24C84: 012B2021 addu $a0, $t1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[11]; - PGXP_ALU(0x012B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC84u); -#endif - if (psx_delay_BFC24C80) { - psx_delay_BFC24C80 = 0; - cpu->gpr[31] = 0x8003CC88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B24Cu); - cpu->pc = 0x8003B24Cu; return; - } -label_BFC24C88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24C88: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24C8C: 10410089 beq $v0, $at, 0xBFC24EB4 */ - uint32_t psx_brA_BFC24C8C = cpu->gpr[2]; uint32_t psx_brB_BFC24C8C = cpu->gpr[1]; - psx_taken_BFC24C8C = (psx_brA_BFC24C8C == psx_brB_BFC24C8C); - psx_delay_BFC24C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC90u); -#endif - /* 0xBFC24C90: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CC90u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC90u); -#endif - if (psx_delay_BFC24C8C) { - psx_delay_BFC24C8C = 0; - if (psx_taken_BFC24C8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEB4u); - goto label_BFC24EB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CC94u); - } -label_BFC24C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC24C94: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC24C98: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CC98u); -#endif -label_BFC24C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24C9C: 0C011BB0 jal 0xB0046EC0 */ - cpu->gpr[31] = 0x8003CCA4u; /* jal link before delay slot */ - psx_delay_BFC24C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010010u); -#endif - /* 0xBFC24CA0: 03D02021 addu $a0, $fp, $s0 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[16]; - PGXP_ALU(0x03D02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCA0u); -#endif - if (psx_delay_BFC24C9C) { - psx_delay_BFC24C9C = 0; - cpu->gpr[31] = 0x8003CCA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EC0u); - cpu->pc = 0x80046EC0u; return; - } -label_BFC24CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24CA4: 10400004 beq $v0, $zero, 0xBFC24CB8 */ - uint32_t psx_brA_BFC24CA4 = cpu->gpr[2]; uint32_t psx_brB_BFC24CA4 = cpu->gpr[0]; - psx_taken_BFC24CA4 = (psx_brA_BFC24CA4 == psx_brB_BFC24CA4); - psx_delay_BFC24CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24CA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CCA8u); -#endif - if (psx_delay_BFC24CA4) { - psx_delay_BFC24CA4 = 0; - if (psx_taken_BFC24CA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CCB8u); - goto label_BFC24CB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CCACu); - } -label_BFC24CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC24CAC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC24CB0: 1617FFFA bne $s0, $s7, 0xBFC24C9C */ - uint32_t psx_brA_BFC24CB0 = cpu->gpr[16]; uint32_t psx_brB_BFC24CB0 = cpu->gpr[23]; - psx_taken_BFC24CB0 = (psx_brA_BFC24CB0 != psx_brB_BFC24CB0); - psx_delay_BFC24CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC24CB4: 02228821 addu $s1, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[2]; - PGXP_ALU(0x02228821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCB4u); -#endif - if (psx_delay_BFC24CB0) { - psx_delay_BFC24CB0 = 0; - if (psx_taken_BFC24CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CC9Cu); - goto label_BFC24C9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CCB8u); - } -label_BFC24CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC24CB8: 12170083 beq $s0, $s7, 0xBFC24EC8 */ - uint32_t psx_brA_BFC24CB8 = cpu->gpr[16]; uint32_t psx_brB_BFC24CB8 = cpu->gpr[23]; - psx_taken_BFC24CB8 = (psx_brA_BFC24CB8 == psx_brB_BFC24CB8); - psx_delay_BFC24CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24CBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CCBCu); -#endif - if (psx_delay_BFC24CB8) { - psx_delay_BFC24CB8 = 0; - if (psx_taken_BFC24CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEC8u); - goto label_BFC24EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CCC0u); - } -label_BFC24CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCC0u); -#endif - /* 0xBFC24CC0: 8FAC00C8 lw $t4, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CCC0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00C8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCC0u); -#endif - /* 0xBFC24CC4: 8FA800C4 lw $t0, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CCC4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800C4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCC4u); -#endif - /* 0xBFC24CC8: 8FAF00D4 lw $t7, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CCC8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00D4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC24CCC: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC24CD0: 0008C080 sll $t8, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 2u; - PGXP_ALU(0x0008C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC24CD4: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC24CD8: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC24CDC: 0308C023 subu $t8, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[8]; - PGXP_ALU(0x0308C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC24CE0: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24CE4: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24CE8: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24CEC: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC24CF0: 01304823 subu $t1, $t1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[16]; - PGXP_ALU(0x01304823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC24CF4: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24CF8: 2442DBFC addiu $v0, $v0, -9220 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-9220)); - PGXP_ALU(0x2442DBFCu, cpu->gpr[2], _pgx1, 0xFFFFDBFCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC24CFC: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24D00: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC24D04: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC24D08: 0308C023 subu $t8, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[8]; - PGXP_ALU(0x0308C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24D0C: 0018C180 sll $t8, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C180u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC24D10: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC24D14: 01304823 subu $t1, $t1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[16]; - PGXP_ALU(0x01304823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC24D18: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC24D1C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC24D20: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC24D24: 004D7021 addu $t6, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[2] + cpu->gpr[13]; - PGXP_ALU(0x004D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000404u); -#endif - /* 0xBFC24D28: 00585021 addu $t2, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[10] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x00585021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x620u); -#endif - /* 0xBFC24D2C: 01492821 addu $a1, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01492821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004010u); -#endif - /* 0xBFC24D30: 01D92021 addu $a0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D92021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24D34: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8003CD3Cu; /* jal link before delay slot */ - psx_delay_BFC24D34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC24D38: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD38u); -#endif - if (psx_delay_BFC24D34) { - psx_delay_BFC24D34 = 0; - cpu->gpr[31] = 0x8003CD3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC24D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC24D3C: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24D40: 0C011BD0 jal 0xB0046F40 */ - cpu->gpr[31] = 0x8003CD48u; /* jal link before delay slot */ - psx_delay_BFC24D40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC24D44: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD44u); -#endif - if (psx_delay_BFC24D40) { - psx_delay_BFC24D40 = 0; - cpu->gpr[31] = 0x8003CD48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F40u); - cpu->pc = 0x80046F40u; return; - } -label_BFC24D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24D48: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24D4C: 10410058 beq $v0, $at, 0xBFC24EB0 */ - uint32_t psx_brA_BFC24D4C = cpu->gpr[2]; uint32_t psx_brB_BFC24D4C = cpu->gpr[1]; - psx_taken_BFC24D4C = (psx_brA_BFC24D4C == psx_brB_BFC24D4C); - psx_delay_BFC24D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200005u); -#endif - /* 0xBFC24D50: 0040A821 addu $s5, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x0040A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD50u); -#endif - if (psx_delay_BFC24D4C) { - psx_delay_BFC24D4C = 0; - if (psx_taken_BFC24D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEB0u); - goto label_BFC24EB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CD54u); - } -label_BFC24D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC24D54: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24D58: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x8003CD60u; /* jal link before delay slot */ - psx_delay_BFC24D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24D5C: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD5Cu); -#endif - if (psx_delay_BFC24D58) { - psx_delay_BFC24D58 = 0; - cpu->gpr[31] = 0x8003CD60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC24D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24D60: 1840004E blez $v0, 0xBFC24E9C */ - uint32_t psx_brA_BFC24D60 = cpu->gpr[2]; - psx_taken_BFC24D60 = ((int32_t)psx_brA_BFC24D60 <= 0); - psx_delay_BFC24D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24D64: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD64u); -#endif - if (psx_delay_BFC24D60) { - psx_delay_BFC24D60 = 0; - if (psx_taken_BFC24D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE9Cu); - goto label_BFC24E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CD68u); - } -label_BFC24D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD68u); -#endif - /* 0xBFC24D68: 8FAB00C4 lw $t3, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CD68u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00C4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000u); -#endif - /* 0xBFC24D6C: 00116880 sll $t5, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[13] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC24D70: 000B6100 sll $t4, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC24D74: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24D78: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xB000u); -#endif - /* 0xBFC24D7C: 018D7821 addu $t7, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC24D80: 00147080 sll $t6, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24D84: 3C088006 lui $t0, 0x8006 */ - cpu->gpr[8] = 0x80060000u; - PGXP_ALU(0x3C088006u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24D88: 25086BC4 addiu $t0, $t0, 27588 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (27588)); - PGXP_ALU(0x25086BC4u, cpu->gpr[8], _pgx1, 0x00006BC4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC24D8C: 01EEC821 addu $t9, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EEC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080100u); -#endif - /* 0xBFC24D90: 03289821 addu $s3, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[19] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03289821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24D94: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD94u); -#endif -label_BFC24D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24D98: 0C011B9B jal 0xB0046E6C */ - cpu->gpr[31] = 0x8003CDA0u; /* jal link before delay slot */ - psx_delay_BFC24D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC24D9C: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CD9Cu); -#endif - if (psx_delay_BFC24D98) { - psx_delay_BFC24D98 = 0; - cpu->gpr[31] = 0x8003CDA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046E6Cu); - cpu->pc = 0x80046E6Cu; return; - } -label_BFC24DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC24DA0: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC24DA4: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC24DA8: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDA8u); -#endif - /* 0xBFC24DAC: 86650000 lh $a1, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDACu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x80000u); } - PGXP_LOAD(0x86650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDB0u); -#endif - /* 0xBFC24DB0: 866A0002 lh $t2, 2($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDB0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x80000u); } - PGXP_LOAD(0x866A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400008u); -#endif - /* 0xBFC24DB4: 02D81821 addu $v1, $s6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[22] + cpu->gpr[24]; - PGXP_ALU(0x02D81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDB4u); -#endif - /* 0xBFC24DB8: 8C6B0000 lw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDB8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC24DBC: 24A50019 addiu $a1, $a1, 25 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (25)); - PGXP_ALU(0x24A50019u, cpu->gpr[5], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC24DC0: 25490019 addiu $t1, $t2, 25 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[10] + (25)); - PGXP_ALU(0x25490019u, cpu->gpr[9], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC24DC4: AC650008 sw $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDC4u); return; } g_debug_last_store_pc = 0x8003CDC4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC24DC8: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC24DCC: AC69000C sw $t1, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDCCu); return; } g_debug_last_store_pc = 0x8003CDCCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC69000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24DD0: 0C016A6C jal 0xB005A9B0 */ - cpu->gpr[31] = 0x8003CDD8u; /* jal link before delay slot */ - psx_delay_BFC24DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x830u); -#endif - /* 0xBFC24DD4: 00AB2023 subu $a0, $a1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[5] - cpu->gpr[11]; - PGXP_ALU(0x00AB2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDD4u); -#endif - if (psx_delay_BFC24DD0) { - psx_delay_BFC24DD0 = 0; - cpu->gpr[31] = 0x8003CDD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9B0u); - cpu->pc = 0x8005A9B0u; return; - } -label_BFC24DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC24DD8: 00116080 sll $t4, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC24DDC: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24DE0: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x411000u); -#endif - /* 0xBFC24DE4: 02CC8021 addu $s0, $s6, $t4 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[16] = cpu->gpr[22] + cpu->gpr[12]; - PGXP_ALU(0x02CC8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDE4u); -#endif - /* 0xBFC24DE8: 8E0D000C lw $t5, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDE8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x8E0D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDE8u); -#endif - /* 0xBFC24DEC: 8E0F0004 lw $t7, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC24DF0: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24DF4: 0C016A6C jal 0xB005A9B0 */ - cpu->gpr[31] = 0x8003CDFCu; /* jal link before delay slot */ - psx_delay_BFC24DF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA010u); -#endif - /* 0xBFC24DF8: 01AF2023 subu $a0, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[13] - cpu->gpr[15]; - PGXP_ALU(0x01AF2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDF8u); -#endif - if (psx_delay_BFC24DF4) { - psx_delay_BFC24DF4 = 0; - cpu->gpr[31] = 0x8003CDFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9B0u); - cpu->pc = 0x8005A9B0u; return; - } -label_BFC24DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CDFCu); -#endif - /* 0xBFC24DFC: 8E0E0008 lw $t6, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CDFCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE00u); -#endif - /* 0xBFC24E00: 8E190000 lw $t9, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE00u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004002u); -#endif - /* 0xBFC24E08: 032E082A slt $at, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x032E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24E0C: 1020000A beq $at, $zero, 0xBFC24E38 */ - uint32_t psx_brA_BFC24E0C = cpu->gpr[1]; uint32_t psx_brB_BFC24E0C = cpu->gpr[0]; - psx_taken_BFC24E0C = (psx_brA_BFC24E0C == psx_brB_BFC24E0C); - psx_delay_BFC24E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24E10: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE10u); -#endif - if (psx_delay_BFC24E0C) { - psx_delay_BFC24E0C = 0; - if (psx_taken_BFC24E0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE38u); - goto label_BFC24E38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE14u); - } -label_BFC24E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24E14: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24E18: 04610002 bgez $v1, 0xBFC24E24 */ - uint32_t psx_brA_BFC24E18 = cpu->gpr[3]; - psx_taken_BFC24E18 = ((int32_t)psx_brA_BFC24E18 >= 0); - psx_delay_BFC24E18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC24E1C: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE1Cu); -#endif - if (psx_delay_BFC24E18) { - psx_delay_BFC24E18 = 0; - if (psx_taken_BFC24E18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE24u); - goto label_BFC24E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE20u); - } -label_BFC24E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24E20: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE20u); -#endif -label_BFC24E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24E24: 000119C3 sra $v1, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000119C3u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24E28: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24E2C: 10000009 beq $zero, $zero, 0xBFC24E54 */ - uint32_t psx_brA_BFC24E2C = cpu->gpr[0]; uint32_t psx_brB_BFC24E2C = cpu->gpr[0]; - psx_taken_BFC24E2C = (psx_brA_BFC24E2C == psx_brB_BFC24E2C); - psx_delay_BFC24E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC24E30: AE030010 sw $v1, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE30u); return; } g_debug_last_store_pc = 0x8003CE30u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE030010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE30u); -#endif - if (psx_delay_BFC24E2C) { - psx_delay_BFC24E2C = 0; - if (psx_taken_BFC24E2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE54u); - goto label_BFC24E54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE34u); - } -label_BFC24E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000Cu); -#endif - /* 0xBFC24E34: 02421821 addu $v1, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02421821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE34u); -#endif -label_BFC24E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24E38: 04610002 bgez $v1, 0xBFC24E44 */ - uint32_t psx_brA_BFC24E38 = cpu->gpr[3]; - psx_taken_BFC24E38 = ((int32_t)psx_brA_BFC24E38 >= 0); - psx_delay_BFC24E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC24E3C: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE3Cu); -#endif - if (psx_delay_BFC24E38) { - psx_delay_BFC24E38 = 0; - if (psx_taken_BFC24E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE44u); - goto label_BFC24E44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE40u); - } -label_BFC24E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24E40: 2421007F addiu $at, $at, 127 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (127)); - PGXP_ALU(0x2421007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE40u); -#endif -label_BFC24E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC24E44: 000119C3 sra $v1, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 7u); - PGXP_ALU(0x000119C3u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC24E48: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC24E4C: 00034023 subu $t0, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00034023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC24E50: AE080010 sw $t0, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE50u); return; } g_debug_last_store_pc = 0x8003CE50u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAE080010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE50u); -#endif -label_BFC24E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE54u); -#endif - /* 0xBFC24E54: 8E18000C lw $t8, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE54u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x8E18000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE54u); -#endif - /* 0xBFC24E58: 8E0A0004 lw $t2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE58u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x8E0A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000402u); -#endif - /* 0xBFC24E60: 0158082A slt $at, $t2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0158082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24E64: 10200004 beq $at, $zero, 0xBFC24E78 */ - uint32_t psx_brA_BFC24E64 = cpu->gpr[1]; uint32_t psx_brB_BFC24E64 = cpu->gpr[0]; - psx_taken_BFC24E64 = (psx_brA_BFC24E64 == psx_brB_BFC24E64); - psx_delay_BFC24E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x209u); -#endif - /* 0xBFC24E68: 00034823 subu $t1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00034823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE68u); -#endif - if (psx_delay_BFC24E64) { - psx_delay_BFC24E64 = 0; - if (psx_taken_BFC24E64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE78u); - goto label_BFC24E78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE6Cu); - } -label_BFC24E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24E6C: 10000003 beq $zero, $zero, 0xBFC24E7C */ - uint32_t psx_brA_BFC24E6C = cpu->gpr[0]; uint32_t psx_brB_BFC24E6C = cpu->gpr[0]; - psx_taken_BFC24E6C = (psx_brA_BFC24E6C == psx_brB_BFC24E6C); - psx_delay_BFC24E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC24E70: AE030014 sw $v1, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE70u); return; } g_debug_last_store_pc = 0x8003CE70u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAE030014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE70u); -#endif - if (psx_delay_BFC24E6C) { - psx_delay_BFC24E6C = 0; - if (psx_taken_BFC24E6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE7Cu); - goto label_BFC24E7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE74u); - } -label_BFC24E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x209u); -#endif - /* 0xBFC24E74: 00034823 subu $t1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00034823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE74u); -#endif -label_BFC24E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC24E78: AE090014 sw $t1, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CE78u); return; } g_debug_last_store_pc = 0x8003CE78u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAE090014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE78u); -#endif -label_BFC24E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC24E7C: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC24E80: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24E84: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x8003CE8Cu; /* jal link before delay slot */ - psx_delay_BFC24E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24E88: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE88u); -#endif - if (psx_delay_BFC24E84) { - psx_delay_BFC24E84 = 0; - cpu->gpr[31] = 0x8003CE8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC24E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100006u); -#endif - /* 0xBFC24E8C: 0282082A slt $at, $s4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24E90: 1420FFC1 bne $at, $zero, 0xBFC24D98 */ - uint32_t psx_brA_BFC24E90 = cpu->gpr[1]; uint32_t psx_brB_BFC24E90 = cpu->gpr[0]; - psx_taken_BFC24E90 = (psx_brA_BFC24E90 != psx_brB_BFC24E90); - psx_delay_BFC24E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24E94: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE94u); -#endif - if (psx_delay_BFC24E90) { - psx_delay_BFC24E90 = 0; - if (psx_taken_BFC24E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CD98u); - goto label_BFC24D98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CE98u); - } -label_BFC24E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC24E98: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CE98u); -#endif -label_BFC24E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24E9C: 0C011B24 jal 0xB0046C90 */ - cpu->gpr[31] = 0x8003CEA4u; /* jal link before delay slot */ - psx_delay_BFC24E9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24EA0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEA0u); -#endif - if (psx_delay_BFC24E9C) { - psx_delay_BFC24E9C = 0; - cpu->gpr[31] = 0x8003CEA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046C90u); - cpu->pc = 0x80046C90u; return; - } -label_BFC24EA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24EA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC24EA4: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24EA8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC24EAC: AC2B9EC8 sw $t3, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEACu); return; } g_debug_last_store_pc = 0x8003CEACu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9EC8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEACu); -#endif -label_BFC24EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEB0u); -#endif - /* 0xBFC24EB0: 8FA200D4 lw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEB0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEB0u); -#endif -label_BFC24EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24EB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC24EB8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24EBC: 2841000F slti $at, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0); - PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24EC0: 1420FF56 bne $at, $zero, 0xBFC24C1C */ - uint32_t psx_brA_BFC24EC0 = cpu->gpr[1]; uint32_t psx_brB_BFC24EC0 = cpu->gpr[0]; - psx_taken_BFC24EC0 = (psx_brA_BFC24EC0 != psx_brB_BFC24EC0); - psx_delay_BFC24EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC24EC4: AFA200D4 sw $v0, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEC4u); return; } g_debug_last_store_pc = 0x8003CEC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200D4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEC4u); -#endif - if (psx_delay_BFC24EC0) { - psx_delay_BFC24EC0 = 0; - if (psx_taken_BFC24EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CC1Cu); - goto label_BFC24C1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CEC8u); - } -label_BFC24EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24EC8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CEC8u); -#endif - /* 0xBFC24ECC: 8FB4004C lw $s4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CECCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4004Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CED0u); -#endif - /* 0xBFC24ED0: 8FB50048 lw $s5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CED0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50048u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CED0u); -#endif - /* 0xBFC24ED4: 8FB60044 lw $s6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CED4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60044u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24ED8: AC206BBC sw $zero, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CED8u); return; } g_debug_last_store_pc = 0x8003CED8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CED8u); -#endif - /* 0xBFC24EDC: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEDCu); -#endif -label_BFC24EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEE0u); -#endif - /* 0xBFC24EE0: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEE0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEE0u); -#endif - /* 0xBFC24EE4: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEE4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEE4u); -#endif - /* 0xBFC24EE8: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEE8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEE8u); -#endif - /* 0xBFC24EEC: 8FB30030 lw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEECu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CEF0u); -#endif - /* 0xBFC24EF0: 8FB70034 lw $s7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEF0u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70034u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEF0u); -#endif - /* 0xBFC24EF4: 8FBE0038 lw $fp, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CEF4u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0038u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC24EF8: 03E00008 jr $ra */ - psx_delay_BFC24EF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24EFC: 27BD00D8 addiu $sp, $sp, 216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (216)); - PGXP_ALU(0x27BD00D8u, cpu->gpr[29], _pgx1, 0x000000D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CEFCu); -#endif - if (psx_delay_BFC24EF8) { - psx_delay_BFC24EF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC24F00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC24F00u); - int psx_delay_BFC24F10 = 0; - int psx_taken_BFC24F10 = 0; - int psx_delay_BFC24F20 = 0; - int psx_taken_BFC24F20 = 0; - int psx_delay_BFC24F34 = 0; - int psx_delay_BFC24F3C = 0; - int psx_taken_BFC24F3C = 0; - int psx_delay_BFC24F48 = 0; - int psx_taken_BFC24F48 = 0; - int psx_delay_BFC24F6C = 0; - int psx_taken_BFC24F6C = 0; - int psx_delay_BFC24F78 = 0; - int psx_taken_BFC24F78 = 0; - int psx_delay_BFC24F94 = 0; - int psx_taken_BFC24F94 = 0; - int psx_delay_BFC24FB4 = 0; - int psx_taken_BFC24FB4 = 0; - int psx_delay_BFC24FC0 = 0; - int psx_delay_BFC24FCC = 0; - int psx_delay_BFC24FD4 = 0; - int psx_delay_BFC24FE0 = 0; - int psx_delay_BFC24FE8 = 0; - int psx_delay_BFC24FF4 = 0; - int psx_delay_BFC24FFC = 0; - int psx_delay_BFC25008 = 0; - int psx_delay_BFC25010 = 0; - int psx_delay_BFC2501C = 0; - int psx_delay_BFC25024 = 0; - int psx_delay_BFC25030 = 0; - int psx_delay_BFC25038 = 0; - int psx_delay_BFC25044 = 0; - int psx_delay_BFC2504C = 0; - int psx_delay_BFC25058 = 0; - int psx_delay_BFC25060 = 0; - int psx_delay_BFC2506C = 0; - int psx_delay_BFC25094 = 0; - int psx_delay_BFC2509C = 0; - int psx_delay_BFC250A8 = 0; - int psx_delay_BFC250B0 = 0; - int psx_delay_BFC250BC = 0; - int psx_delay_BFC250C8 = 0; - int psx_delay_BFC250D0 = 0; - int psx_delay_BFC250DC = 0; - int psx_taken_BFC250DC = 0; - int psx_delay_BFC250E4 = 0; - int psx_delay_BFC250F0 = 0; - int psx_taken_BFC250F0 = 0; - int psx_delay_BFC25100 = 0; - int psx_delay_BFC25108 = 0; - int psx_delay_BFC25118 = 0; - int psx_delay_BFC25148 = 0; - int psx_taken_BFC25148 = 0; - int psx_delay_BFC25154 = 0; - int psx_taken_BFC25154 = 0; - int psx_delay_BFC2515C = 0; - int psx_delay_BFC25170 = 0; - int psx_delay_BFC25178 = 0; - int psx_delay_BFC2518C = 0; - int psx_taken_BFC2518C = 0; - int psx_delay_BFC251A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC24F18u: goto label_BFC24F18; - case 0xBFC24F28u: goto label_BFC24F28; - case 0xBFC24F2Cu: goto label_BFC24F2C; - case 0xBFC24F34u: goto label_BFC24F34; - case 0xBFC24F3Cu: goto label_BFC24F3C; - case 0xBFC24F44u: goto label_BFC24F44; - case 0xBFC24F50u: goto label_BFC24F50; - case 0xBFC24F74u: goto label_BFC24F74; - case 0xBFC24F80u: goto label_BFC24F80; - case 0xBFC24F84u: goto label_BFC24F84; - case 0xBFC24F90u: goto label_BFC24F90; - case 0xBFC24F9Cu: goto label_BFC24F9C; - case 0xBFC24FBCu: goto label_BFC24FBC; - case 0xBFC24FC8u: goto label_BFC24FC8; - case 0xBFC24FD4u: goto label_BFC24FD4; - case 0xBFC24FDCu: goto label_BFC24FDC; - case 0xBFC24FE8u: goto label_BFC24FE8; - case 0xBFC24FF0u: goto label_BFC24FF0; - case 0xBFC24FFCu: goto label_BFC24FFC; - case 0xBFC25004u: goto label_BFC25004; - case 0xBFC25010u: goto label_BFC25010; - case 0xBFC25018u: goto label_BFC25018; - case 0xBFC25024u: goto label_BFC25024; - case 0xBFC2502Cu: goto label_BFC2502C; - case 0xBFC25038u: goto label_BFC25038; - case 0xBFC25040u: goto label_BFC25040; - case 0xBFC2504Cu: goto label_BFC2504C; - case 0xBFC25054u: goto label_BFC25054; - case 0xBFC25060u: goto label_BFC25060; - case 0xBFC25068u: goto label_BFC25068; - case 0xBFC25074u: goto label_BFC25074; - case 0xBFC2509Cu: goto label_BFC2509C; - case 0xBFC250A4u: goto label_BFC250A4; - case 0xBFC250B0u: goto label_BFC250B0; - case 0xBFC250B8u: goto label_BFC250B8; - case 0xBFC250C4u: goto label_BFC250C4; - case 0xBFC250D0u: goto label_BFC250D0; - case 0xBFC250D8u: goto label_BFC250D8; - case 0xBFC250E4u: goto label_BFC250E4; - case 0xBFC250ECu: goto label_BFC250EC; - case 0xBFC250F8u: goto label_BFC250F8; - case 0xBFC25108u: goto label_BFC25108; - case 0xBFC25110u: goto label_BFC25110; - case 0xBFC25120u: goto label_BFC25120; - case 0xBFC25148u: goto label_BFC25148; - case 0xBFC25150u: goto label_BFC25150; - case 0xBFC25154u: goto label_BFC25154; - case 0xBFC2515Cu: goto label_BFC2515C; - case 0xBFC25164u: goto label_BFC25164; - case 0xBFC25178u: goto label_BFC25178; - case 0xBFC25180u: goto label_BFC25180; - case 0xBFC25194u: goto label_BFC25194; - case 0xBFC25198u: goto label_BFC25198; - default: break; - } - } -label_BFC24F00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC24F00: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC24F04: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF04u); return; } g_debug_last_store_pc = 0x8003CF04u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF04u); -#endif - /* 0xBFC24F08: 8FAE0048 lw $t6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF08u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC24F0C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF0Cu); return; } g_debug_last_store_pc = 0x8003CF0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC24F10: 15C00006 bne $t6, $zero, 0xBFC24F2C */ - uint32_t psx_brA_BFC24F10 = cpu->gpr[14]; uint32_t psx_brB_BFC24F10 = cpu->gpr[0]; - psx_taken_BFC24F10 = (psx_brA_BFC24F10 != psx_brB_BFC24F10); - psx_delay_BFC24F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC24F14: 2418003C addiu $t8, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2418003Cu, cpu->gpr[24], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF14u); -#endif - if (psx_delay_BFC24F10) { - psx_delay_BFC24F10 = 0; - if (psx_taken_BFC24F10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF2Cu); - goto label_BFC24F2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF18u); - } -label_BFC24F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC24F18: 240F001E addiu $t7, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240F001Eu, cpu->gpr[15], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24F1C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24F20: 10000004 beq $zero, $zero, 0xBFC24F34 */ - uint32_t psx_brA_BFC24F20 = cpu->gpr[0]; uint32_t psx_brB_BFC24F20 = cpu->gpr[0]; - psx_taken_BFC24F20 = (psx_brA_BFC24F20 == psx_brB_BFC24F20); - psx_delay_BFC24F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC24F24: AFAF0040 sw $t7, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF24u); return; } g_debug_last_store_pc = 0x8003CF24u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0040u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF24u); -#endif - if (psx_delay_BFC24F20) { - psx_delay_BFC24F20 = 0; - if (psx_taken_BFC24F20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF34u); - goto label_BFC24F34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF28u); - } -label_BFC24F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC24F28: 2418003C addiu $t8, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2418003Cu, cpu->gpr[24], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF28u); -#endif -label_BFC24F2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24F2C: 24040010 addiu $a0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24040010u, cpu->gpr[4], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC24F30: AFB80040 sw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF30u); return; } g_debug_last_store_pc = 0x8003CF30u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF30u); -#endif -label_BFC24F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24F34: 0C00F46A jal 0xB003D1A8 */ - cpu->gpr[31] = 0x8003CF3Cu; /* jal link before delay slot */ - psx_delay_BFC24F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24F38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CF38u); -#endif - if (psx_delay_BFC24F34) { - psx_delay_BFC24F34 = 0; - cpu->gpr[31] = 0x8003CF3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D1A8u); - cpu->pc = 0x8003D1A8u; return; - } -label_BFC24F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC24F3C: 10400004 beq $v0, $zero, 0xBFC24F50 */ - uint32_t psx_brA_BFC24F3C = cpu->gpr[2]; uint32_t psx_brB_BFC24F3C = cpu->gpr[0]; - psx_taken_BFC24F3C = (psx_brA_BFC24F3C == psx_brB_BFC24F3C); - psx_delay_BFC24F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC24F40: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF40u); -#endif - if (psx_delay_BFC24F3C) { - psx_delay_BFC24F3C = 0; - if (psx_taken_BFC24F3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF50u); - goto label_BFC24F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF44u); - } -label_BFC24F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF44u); -#endif - /* 0xBFC24F44: 8FA50048 lw $a1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF44u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50048u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24F48: 1000000E beq $zero, $zero, 0xBFC24F84 */ - uint32_t psx_brA_BFC24F48 = cpu->gpr[0]; uint32_t psx_brB_BFC24F48 = cpu->gpr[0]; - psx_taken_BFC24F48 = (psx_brA_BFC24F48 == psx_brB_BFC24F48); - psx_delay_BFC24F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC24F4C: 00055080 sll $t2, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00055080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF4Cu); -#endif - if (psx_delay_BFC24F48) { - psx_delay_BFC24F48 = 0; - if (psx_taken_BFC24F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF84u); - goto label_BFC24F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF50u); - } -label_BFC24F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF50u); -#endif - /* 0xBFC24F50: 8FA50048 lw $a1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF50u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50048u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24F54: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC24F58: 2508A1C8 addiu $t0, $t0, -24120 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-24120)); - PGXP_ALU(0x2508A1C8u, cpu->gpr[8], _pgx1, 0xFFFFA1C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC24F5C: 0005C880 sll $t9, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 2u; - PGXP_ALU(0x0005C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC24F60: 03281821 addu $v1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF60u); -#endif - /* 0xBFC24F64: 8C690000 lw $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF64u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8u); } - PGXP_LOAD(0x8C690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24F68: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC24F6C: 15210005 bne $t1, $at, 0xBFC24F84 */ - uint32_t psx_brA_BFC24F6C = cpu->gpr[9]; uint32_t psx_brB_BFC24F6C = cpu->gpr[1]; - psx_taken_BFC24F6C = (psx_brA_BFC24F6C != psx_brB_BFC24F6C); - psx_delay_BFC24F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC24F70: 00055080 sll $t2, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00055080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF70u); -#endif - if (psx_delay_BFC24F6C) { - psx_delay_BFC24F6C = 0; - if (psx_taken_BFC24F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF84u); - goto label_BFC24F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF74u); - } -label_BFC24F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24F74: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24F78: 10000005 beq $zero, $zero, 0xBFC24F90 */ - uint32_t psx_brA_BFC24F78 = cpu->gpr[0]; uint32_t psx_brB_BFC24F78 = cpu->gpr[0]; - psx_taken_BFC24F78 = (psx_brA_BFC24F78 == psx_brB_BFC24F78); - psx_delay_BFC24F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC24F7C: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF7Cu); return; } g_debug_last_store_pc = 0x8003CF7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF7Cu); -#endif - if (psx_delay_BFC24F78) { - psx_delay_BFC24F78 = 0; - if (psx_taken_BFC24F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF90u); - goto label_BFC24F90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF80u); - } -label_BFC24F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC24F80: 00055080 sll $t2, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00055080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF80u); -#endif -label_BFC24F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC24F84: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC24F88: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC24F8C: AC22A1C8 sw $v0, -24120($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CF8Cu); return; } g_debug_last_store_pc = 0x8003CF8Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22A1C8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF8Cu); -#endif -label_BFC24F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24F90: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC24F94: 1481006F bne $a0, $at, 0xBFC25154 */ - uint32_t psx_brA_BFC24F94 = cpu->gpr[4]; uint32_t psx_brB_BFC24F94 = cpu->gpr[1]; - psx_taken_BFC24F94 = (psx_brA_BFC24F94 != psx_brB_BFC24F94); - psx_delay_BFC24F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC24F98: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CF98u); -#endif - if (psx_delay_BFC24F94) { - psx_delay_BFC24F94 = 0; - if (psx_taken_BFC24F94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D154u); - goto label_BFC25154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CF9Cu); - } -label_BFC24F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24F9C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003CF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC24FA0: 258CFF60 addiu $t4, $t4, -160 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-160)); - PGXP_ALU(0x258CFF60u, cpu->gpr[12], _pgx1, 0xFFFFFF60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC24FA4: 00055880 sll $t3, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00055880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC24FA8: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFA8u); -#endif - /* 0xBFC24FAC: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CFACu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC24FB4: 11A00064 beq $t5, $zero, 0xBFC25148 */ - uint32_t psx_brA_BFC24FB4 = cpu->gpr[13]; uint32_t psx_brB_BFC24FB4 = cpu->gpr[0]; - psx_taken_BFC24FB4 = (psx_brA_BFC24FB4 == psx_brB_BFC24FB4); - psx_delay_BFC24FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC24FB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003CFB8u); -#endif - if (psx_delay_BFC24FB4) { - psx_delay_BFC24FB4 = 0; - if (psx_taken_BFC24FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D148u); - goto label_BFC25148; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003CFBCu); - } -label_BFC24FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24FBC: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FC0: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003CFC8u; /* jal link before delay slot */ - psx_delay_BFC24FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC24FC4: AFA20028 sw $v0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003CFC4u); return; } g_debug_last_store_pc = 0x8003CFC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20028u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFC4u); -#endif - if (psx_delay_BFC24FC0) { - psx_delay_BFC24FC0 = 0; - cpu->gpr[31] = 0x8003CFC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC24FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC24FC8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FCC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003CFD4u; /* jal link before delay slot */ - psx_delay_BFC24FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24FD0: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFD0u); -#endif - if (psx_delay_BFC24FCC) { - psx_delay_BFC24FCC = 0; - cpu->gpr[31] = 0x8003CFD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC24FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FD4: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003CFDCu; /* jal link before delay slot */ - psx_delay_BFC24FD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24FD8: 2404000B addiu $a0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2404000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFD8u); -#endif - if (psx_delay_BFC24FD4) { - psx_delay_BFC24FD4 = 0; - cpu->gpr[31] = 0x8003CFDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC24FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC24FDC: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FE0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003CFE8u; /* jal link before delay slot */ - psx_delay_BFC24FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24FE4: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFE4u); -#endif - if (psx_delay_BFC24FE0) { - psx_delay_BFC24FE0 = 0; - cpu->gpr[31] = 0x8003CFE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC24FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FE8: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003CFF0u; /* jal link before delay slot */ - psx_delay_BFC24FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC24FEC: 2404006E addiu $a0, $zero, 110 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (110)); - PGXP_ALU(0x2404006Eu, cpu->gpr[4], _pgx1, 0x0000006Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFECu); -#endif - if (psx_delay_BFC24FE8) { - psx_delay_BFC24FE8 = 0; - cpu->gpr[31] = 0x8003CFF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC24FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC24FF0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FF4: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003CFFCu; /* jal link before delay slot */ - psx_delay_BFC24FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC24FF8: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003CFF8u); -#endif - if (psx_delay_BFC24FF4) { - psx_delay_BFC24FF4 = 0; - cpu->gpr[31] = 0x8003CFFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC24FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC24FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC24FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003CFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC24FFC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D004u; /* jal link before delay slot */ - psx_delay_BFC24FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25000: 2404006F addiu $a0, $zero, 111 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (111)); - PGXP_ALU(0x2404006Fu, cpu->gpr[4], _pgx1, 0x0000006Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D000u); -#endif - if (psx_delay_BFC24FFC) { - psx_delay_BFC24FFC = 0; - cpu->gpr[31] = 0x8003D004u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC25004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25004: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25008: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D010u; /* jal link before delay slot */ - psx_delay_BFC25008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2500C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D00Cu); -#endif - if (psx_delay_BFC25008) { - psx_delay_BFC25008 = 0; - cpu->gpr[31] = 0x8003D010u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC25010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25010: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D018u; /* jal link before delay slot */ - psx_delay_BFC25010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25014: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D014u); -#endif - if (psx_delay_BFC25010) { - psx_delay_BFC25010 = 0; - cpu->gpr[31] = 0x8003D018u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC25018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25018: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2501C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D024u; /* jal link before delay slot */ - psx_delay_BFC2501C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25020: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D020u); -#endif - if (psx_delay_BFC2501C) { - psx_delay_BFC2501C = 0; - cpu->gpr[31] = 0x8003D024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC25024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25024: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D02Cu; /* jal link before delay slot */ - psx_delay_BFC25024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25028: 2404000D addiu $a0, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2404000Du, cpu->gpr[4], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003D028u); -#endif - if (psx_delay_BFC25024) { - psx_delay_BFC25024 = 0; - cpu->gpr[31] = 0x8003D02Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC2502C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2502Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC2502C: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25030: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D038u; /* jal link before delay slot */ - psx_delay_BFC25030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25034: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D034u); -#endif - if (psx_delay_BFC25030) { - psx_delay_BFC25030 = 0; - cpu->gpr[31] = 0x8003D038u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC25038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25038: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D040u; /* jal link before delay slot */ - psx_delay_BFC25038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2503C: 24040011 addiu $a0, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24040011u, cpu->gpr[4], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D03Cu); -#endif - if (psx_delay_BFC25038) { - psx_delay_BFC25038 = 0; - cpu->gpr[31] = 0x8003D040u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC25040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25040: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25044: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D04Cu; /* jal link before delay slot */ - psx_delay_BFC25044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25048: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D048u); -#endif - if (psx_delay_BFC25044) { - psx_delay_BFC25044 = 0; - cpu->gpr[31] = 0x8003D04Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2504C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2504Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2504Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2504C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D054u; /* jal link before delay slot */ - psx_delay_BFC2504C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25050: 24040012 addiu $a0, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24040012u, cpu->gpr[4], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D050u); -#endif - if (psx_delay_BFC2504C) { - psx_delay_BFC2504C = 0; - cpu->gpr[31] = 0x8003D054u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC25054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25054: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25058: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D060u; /* jal link before delay slot */ - psx_delay_BFC25058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2505C: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D05Cu); -#endif - if (psx_delay_BFC25058) { - psx_delay_BFC25058 = 0; - cpu->gpr[31] = 0x8003D060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC25060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25060: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D068u; /* jal link before delay slot */ - psx_delay_BFC25060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25064: 24040013 addiu $a0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24040013u, cpu->gpr[4], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D064u); -#endif - if (psx_delay_BFC25060) { - psx_delay_BFC25060 = 0; - cpu->gpr[31] = 0x8003D068u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC25068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25068: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2506C: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D074u; /* jal link before delay slot */ - psx_delay_BFC2506C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25070: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D070u); -#endif - if (psx_delay_BFC2506C) { - psx_delay_BFC2506C = 0; - cpu->gpr[31] = 0x8003D074u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC25074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25074: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D074u); -#endif - /* 0xBFC25078: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D078u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2507C: 3C18800F lui $t8, 0x800F */ - cpu->gpr[24] = 0x800F0000u; - PGXP_ALU(0x3C18800Fu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC25080: 000E78C0 sll $t7, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC25084: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25088: 000F7A80 sll $t7, $t7, 10 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 10u; - PGXP_ALU(0x000F7A80u, cpu->gpr[15], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2508C: 271886A8 addiu $t8, $t8, -31064 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-31064)); - PGXP_ALU(0x271886A8u, cpu->gpr[24], _pgx1, 0xFFFF86A8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC25090: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25094: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D09Cu; /* jal link before delay slot */ - psx_delay_BFC25094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25098: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D098u); -#endif - if (psx_delay_BFC25094) { - psx_delay_BFC25094 = 0; - cpu->gpr[31] = 0x8003D09Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2509C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2509Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2509Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2509C: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D0A4u; /* jal link before delay slot */ - psx_delay_BFC2509C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC250A0: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0A0u); -#endif - if (psx_delay_BFC2509C) { - psx_delay_BFC2509C = 0; - cpu->gpr[31] = 0x8003D0A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC250A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC250A4: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250A8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D0B0u; /* jal link before delay slot */ - psx_delay_BFC250A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC250AC: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0ACu); -#endif - if (psx_delay_BFC250A8) { - psx_delay_BFC250A8 = 0; - cpu->gpr[31] = 0x8003D0B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC250B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250B0: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003D0B8u; /* jal link before delay slot */ - psx_delay_BFC250B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC250B4: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0B4u); -#endif - if (psx_delay_BFC250B0) { - psx_delay_BFC250B0 = 0; - cpu->gpr[31] = 0x8003D0B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC250B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC250B8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250BC: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003D0C4u; /* jal link before delay slot */ - psx_delay_BFC250BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC250C0: 24050005 addiu $a1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24050005u, cpu->gpr[5], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0C0u); -#endif - if (psx_delay_BFC250BC) { - psx_delay_BFC250BC = 0; - cpu->gpr[31] = 0x8003D0C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC250C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0C4u); -#endif - /* 0xBFC250C4: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D0C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250C8: 0C00EC1E jal 0xB003B078 */ - cpu->gpr[31] = 0x8003D0D0u; /* jal link before delay slot */ - psx_delay_BFC250C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC250CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D0CCu); -#endif - if (psx_delay_BFC250C8) { - psx_delay_BFC250C8 = 0; - cpu->gpr[31] = 0x8003D0D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B078u); - cpu->pc = 0x8003B078u; return; - } -label_BFC250D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250D0: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003D0D8u; /* jal link before delay slot */ - psx_delay_BFC250D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC250D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D0D4u); -#endif - if (psx_delay_BFC250D0) { - psx_delay_BFC250D0 = 0; - cpu->gpr[31] = 0x8003D0D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC250D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC250D8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC250DC: 10410006 beq $v0, $at, 0xBFC250F8 */ - uint32_t psx_brA_BFC250DC = cpu->gpr[2]; uint32_t psx_brB_BFC250DC = cpu->gpr[1]; - psx_taken_BFC250DC = (psx_brA_BFC250DC == psx_brB_BFC250DC); - psx_delay_BFC250DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC250E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D0E0u); -#endif - if (psx_delay_BFC250DC) { - psx_delay_BFC250DC = 0; - if (psx_taken_BFC250DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D0F8u); - goto label_BFC250F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D0E4u); - } -label_BFC250E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC250E4: 0C01195D jal 0xB0046574 */ - cpu->gpr[31] = 0x8003D0ECu; /* jal link before delay slot */ - psx_delay_BFC250E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC250E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D0E8u); -#endif - if (psx_delay_BFC250E4) { - psx_delay_BFC250E4 = 0; - cpu->gpr[31] = 0x8003D0ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046574u); - cpu->pc = 0x80046574u; return; - } -label_BFC250EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC250EC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC250F0: 1441FFFC bne $v0, $at, 0xBFC250E4 */ - uint32_t psx_brA_BFC250F0 = cpu->gpr[2]; uint32_t psx_brB_BFC250F0 = cpu->gpr[1]; - psx_taken_BFC250F0 = (psx_brA_BFC250F0 != psx_brB_BFC250F0); - psx_delay_BFC250F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC250F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D0F4u); -#endif - if (psx_delay_BFC250F0) { - psx_delay_BFC250F0 = 0; - if (psx_taken_BFC250F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D0E4u); - goto label_BFC250E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D0F8u); - } -label_BFC250F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC250F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC250F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC250F8: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D0F8u); -#endif - /* 0xBFC250FC: 8C846BB8 lw $a0, 27576($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D0FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25100: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003D108u; /* jal link before delay slot */ - psx_delay_BFC25100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D104u); -#endif - if (psx_delay_BFC25100) { - psx_delay_BFC25100 = 0; - cpu->gpr[31] = 0x8003D108u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC25108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25108: 0C00F928 jal 0xB003E4A0 */ - cpu->gpr[31] = 0x8003D110u; /* jal link before delay slot */ - psx_delay_BFC25108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2510C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D10Cu); -#endif - if (psx_delay_BFC25108) { - psx_delay_BFC25108 = 0; - cpu->gpr[31] = 0x8003D110u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4A0u); - cpu->pc = 0x8003E4A0u; return; - } -label_BFC25110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25110: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25114: AC206BBC sw $zero, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D114u); return; } g_debug_last_store_pc = 0x8003D114u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25118: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003D120u; /* jal link before delay slot */ - psx_delay_BFC25118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2511C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D11Cu); -#endif - if (psx_delay_BFC25118) { - psx_delay_BFC25118 = 0; - cpu->gpr[31] = 0x8003D120u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC25120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D120u); -#endif - /* 0xBFC25120: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D120u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25124: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC25128: AF200000 sw $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D128u); return; } g_debug_last_store_pc = 0x8003D128u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAF200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D128u); -#endif - /* 0xBFC2512C: 8FA80048 lw $t0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D12Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80048u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25130: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC25134: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC25138: 00290821 addu $at, $at, $t1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[9]; - PGXP_ALU(0x00290821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2513C: AC20A178 sw $zero, -24200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D13Cu); return; } g_debug_last_store_pc = 0x8003D13Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20A178u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25140: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25144: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D144u); return; } g_debug_last_store_pc = 0x8003D144u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D144u); -#endif -label_BFC25148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25148: 10000013 beq $zero, $zero, 0xBFC25198 */ - uint32_t psx_brA_BFC25148 = cpu->gpr[0]; uint32_t psx_brB_BFC25148 = cpu->gpr[0]; - psx_taken_BFC25148 = (psx_brA_BFC25148 == psx_brB_BFC25148); - psx_delay_BFC25148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2514C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D14Cu); -#endif - if (psx_delay_BFC25148) { - psx_delay_BFC25148 = 0; - if (psx_taken_BFC25148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D198u); - goto label_BFC25198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D150u); - } -label_BFC25150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25150: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D150u); -#endif -label_BFC25154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC25154: 1481000F bne $a0, $at, 0xBFC25194 */ - uint32_t psx_brA_BFC25154 = cpu->gpr[4]; uint32_t psx_brB_BFC25154 = cpu->gpr[1]; - psx_taken_BFC25154 = (psx_brA_BFC25154 != psx_brB_BFC25154); - psx_delay_BFC25154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25158: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D158u); -#endif - if (psx_delay_BFC25154) { - psx_delay_BFC25154 = 0; - if (psx_taken_BFC25154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D194u); - goto label_BFC25194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D15Cu); - } -label_BFC2515C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2515Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2515C: 0C00F4C7 jal 0xB003D31C */ - cpu->gpr[31] = 0x8003D164u; /* jal link before delay slot */ - psx_delay_BFC2515C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25160: AC206BBC sw $zero, 27580($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27580; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D160u); return; } g_debug_last_store_pc = 0x8003D160u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206BBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D160u); -#endif - if (psx_delay_BFC2515C) { - psx_delay_BFC2515C = 0; - cpu->gpr[31] = 0x8003D164u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D31Cu); - cpu->pc = 0x8003D31Cu; return; - } -label_BFC25164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25164: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D164u); -#endif - /* 0xBFC25168: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D168u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2516C: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25170: 0C013CCD jal 0xB004F334 */ - cpu->gpr[31] = 0x8003D178u; /* jal link before delay slot */ - psx_delay_BFC25170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25174: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D174u); -#endif - if (psx_delay_BFC25170) { - psx_delay_BFC25170 = 0; - cpu->gpr[31] = 0x8003D178u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F334u); - cpu->pc = 0x8004F334u; return; - } -label_BFC25178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25178: 0C00C696 jal 0xB0031A58 */ - cpu->gpr[31] = 0x8003D180u; /* jal link before delay slot */ - psx_delay_BFC25178 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2517C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D17Cu); -#endif - if (psx_delay_BFC25178) { - psx_delay_BFC25178 = 0; - cpu->gpr[31] = 0x8003D180u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031A58u); - cpu->pc = 0x80031A58u; return; - } -label_BFC25180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC25180: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25184: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC25188: AC2AA8AC sw $t2, -22356($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22356; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D188u); return; } g_debug_last_store_pc = 0x8003D188u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AA8ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2518C: 10000002 beq $zero, $zero, 0xBFC25198 */ - uint32_t psx_brA_BFC2518C = cpu->gpr[0]; uint32_t psx_brB_BFC2518C = cpu->gpr[0]; - psx_taken_BFC2518C = (psx_brA_BFC2518C == psx_brB_BFC2518C); - psx_delay_BFC2518C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25190: 2402FFFE addiu $v0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2402FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D190u); -#endif - if (psx_delay_BFC2518C) { - psx_delay_BFC2518C = 0; - if (psx_taken_BFC2518C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D198u); - goto label_BFC25198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D194u); - } -label_BFC25194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25194: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D194u); -#endif -label_BFC25198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D198u); -#endif - /* 0xBFC25198: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D198u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2519C: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC251A0: 03E00008 jr $ra */ - psx_delay_BFC251A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1A4u); -#endif - if (psx_delay_BFC251A0) { - psx_delay_BFC251A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC251A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC251A8u); - int psx_delay_BFC251B0 = 0; - int psx_delay_BFC251BC = 0; - int psx_delay_BFC251C4 = 0; - int psx_taken_BFC251C4 = 0; - int psx_delay_BFC251CC = 0; - int psx_taken_BFC251CC = 0; - int psx_delay_BFC251D4 = 0; - int psx_delay_BFC251F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC251B8u: goto label_BFC251B8; - case 0xBFC251C4u: goto label_BFC251C4; - case 0xBFC251CCu: goto label_BFC251CC; - case 0xBFC251D4u: goto label_BFC251D4; - case 0xBFC251DCu: goto label_BFC251DC; - case 0xBFC251F0u: goto label_BFC251F0; - default: break; - } - } -label_BFC251A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC251A8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC251AC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D1ACu); return; } g_debug_last_store_pc = 0x8003D1ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC251B0: 0C016AC0 jal 0xB005AB00 */ - cpu->gpr[31] = 0x8003D1B8u; /* jal link before delay slot */ - psx_delay_BFC251B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC251B4: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D1B4u); return; } g_debug_last_store_pc = 0x8003D1B4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1B4u); -#endif - if (psx_delay_BFC251B0) { - psx_delay_BFC251B0 = 0; - cpu->gpr[31] = 0x8003D1B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB00u); - cpu->pc = 0x8005AB00u; return; - } -label_BFC251B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1B8u); -#endif - /* 0xBFC251B8: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D1B8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC251BC: 0C016AC4 jal 0xB005AB10 */ - cpu->gpr[31] = 0x8003D1C4u; /* jal link before delay slot */ - psx_delay_BFC251BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1C0u); -#endif - if (psx_delay_BFC251BC) { - psx_delay_BFC251BC = 0; - cpu->gpr[31] = 0x8003D1C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB10u); - cpu->pc = 0x8005AB10u; return; - } -label_BFC251C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC251C4: 14400003 bne $v0, $zero, 0xBFC251D4 */ - uint32_t psx_brA_BFC251C4 = cpu->gpr[2]; uint32_t psx_brB_BFC251C4 = cpu->gpr[0]; - psx_taken_BFC251C4 = (psx_brA_BFC251C4 != psx_brB_BFC251C4); - psx_delay_BFC251C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1C8u); -#endif - if (psx_delay_BFC251C4) { - psx_delay_BFC251C4 = 0; - if (psx_taken_BFC251C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D1D4u); - goto label_BFC251D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D1CCu); - } -label_BFC251CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251CC: 10000008 beq $zero, $zero, 0xBFC251F0 */ - uint32_t psx_brA_BFC251CC = cpu->gpr[0]; uint32_t psx_brB_BFC251CC = cpu->gpr[0]; - psx_taken_BFC251CC = (psx_brA_BFC251CC == psx_brB_BFC251CC); - psx_delay_BFC251CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC251D0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1D0u); -#endif - if (psx_delay_BFC251CC) { - psx_delay_BFC251CC = 0; - if (psx_taken_BFC251CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D1F0u); - goto label_BFC251F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D1D4u); - } -label_BFC251D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC251D4: 0C00F480 jal 0xB003D200 */ - cpu->gpr[31] = 0x8003D1DCu; /* jal link before delay slot */ - psx_delay_BFC251D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1D8u); -#endif - if (psx_delay_BFC251D4) { - psx_delay_BFC251D4 = 0; - cpu->gpr[31] = 0x8003D1DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D200u); - cpu->pc = 0x8003D200u; return; - } -label_BFC251DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC251DC: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC251E0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC251E4: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1E4u); -#endif - /* 0xBFC251E8: 8C426B68 lw $v0, 27496($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27496; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D1E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426B68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1ECu); -#endif -label_BFC251F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC251F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC251F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D1F0u); -#endif - /* 0xBFC251F0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D1F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC251F4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC251F8: 03E00008 jr $ra */ - psx_delay_BFC251F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC251FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D1FCu); -#endif - if (psx_delay_BFC251F8) { - psx_delay_BFC251F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25200(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25200u); - int psx_delay_BFC25218 = 0; - int psx_delay_BFC25220 = 0; - int psx_taken_BFC25220 = 0; - int psx_delay_BFC25228 = 0; - int psx_delay_BFC25230 = 0; - int psx_taken_BFC25230 = 0; - int psx_delay_BFC25240 = 0; - int psx_delay_BFC25248 = 0; - int psx_taken_BFC25248 = 0; - int psx_delay_BFC25250 = 0; - int psx_delay_BFC25258 = 0; - int psx_taken_BFC25258 = 0; - int psx_delay_BFC25268 = 0; - int psx_delay_BFC25270 = 0; - int psx_taken_BFC25270 = 0; - int psx_delay_BFC25278 = 0; - int psx_delay_BFC25280 = 0; - int psx_taken_BFC25280 = 0; - int psx_delay_BFC25290 = 0; - int psx_delay_BFC25298 = 0; - int psx_taken_BFC25298 = 0; - int psx_delay_BFC252A0 = 0; - int psx_delay_BFC252B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25210u: goto label_BFC25210; - case 0xBFC25220u: goto label_BFC25220; - case 0xBFC25228u: goto label_BFC25228; - case 0xBFC25230u: goto label_BFC25230; - case 0xBFC25238u: goto label_BFC25238; - case 0xBFC25248u: goto label_BFC25248; - case 0xBFC25250u: goto label_BFC25250; - case 0xBFC25258u: goto label_BFC25258; - case 0xBFC25260u: goto label_BFC25260; - case 0xBFC25270u: goto label_BFC25270; - case 0xBFC25278u: goto label_BFC25278; - case 0xBFC25280u: goto label_BFC25280; - case 0xBFC25288u: goto label_BFC25288; - case 0xBFC25298u: goto label_BFC25298; - case 0xBFC252A0u: goto label_BFC252A0; - case 0xBFC252A8u: goto label_BFC252A8; - case 0xBFC252ACu: goto label_BFC252AC; - default: break; - } - } -label_BFC25200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25200: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC25204: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D204u); return; } g_debug_last_store_pc = 0x8003D204u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC25208: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2520C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D20Cu); return; } g_debug_last_store_pc = 0x8003D20Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D20Cu); -#endif -label_BFC25210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25210: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D210u); -#endif - /* 0xBFC25214: 8C843B6C lw $a0, 15212($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D214u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843B6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25218: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003D220u; /* jal link before delay slot */ - psx_delay_BFC25218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2521C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D21Cu); -#endif - if (psx_delay_BFC25218) { - psx_delay_BFC25218 = 0; - cpu->gpr[31] = 0x8003D220u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC25220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC25220: 14500005 bne $v0, $s0, 0xBFC25238 */ - uint32_t psx_brA_BFC25220 = cpu->gpr[2]; uint32_t psx_brB_BFC25220 = cpu->gpr[16]; - psx_taken_BFC25220 = (psx_brA_BFC25220 != psx_brB_BFC25220); - psx_delay_BFC25220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25224: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D224u); -#endif - if (psx_delay_BFC25220) { - psx_delay_BFC25220 = 0; - if (psx_taken_BFC25220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D238u); - goto label_BFC25238; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D228u); - } -label_BFC25228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25228: 0C00F4AF jal 0xB003D2BC */ - cpu->gpr[31] = 0x8003D230u; /* jal link before delay slot */ - psx_delay_BFC25228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2522C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D22Cu); -#endif - if (psx_delay_BFC25228) { - psx_delay_BFC25228 = 0; - cpu->gpr[31] = 0x8003D230u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2BCu); - cpu->pc = 0x8003D2BCu; return; - } -label_BFC25230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25230: 1000001E beq $zero, $zero, 0xBFC252AC */ - uint32_t psx_brA_BFC25230 = cpu->gpr[0]; uint32_t psx_brB_BFC25230 = cpu->gpr[0]; - psx_taken_BFC25230 = (psx_brA_BFC25230 == psx_brB_BFC25230); - psx_delay_BFC25230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25234: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D234u); -#endif - if (psx_delay_BFC25230) { - psx_delay_BFC25230 = 0; - if (psx_taken_BFC25230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2ACu); - goto label_BFC252AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D238u); - } -label_BFC25238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25238: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D238u); -#endif - /* 0xBFC2523C: 8C84A120 lw $a0, -24288($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D23Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A120u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25240: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003D248u; /* jal link before delay slot */ - psx_delay_BFC25240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25244: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D244u); -#endif - if (psx_delay_BFC25240) { - psx_delay_BFC25240 = 0; - cpu->gpr[31] = 0x8003D248u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC25248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC25248: 14500005 bne $v0, $s0, 0xBFC25260 */ - uint32_t psx_brA_BFC25248 = cpu->gpr[2]; uint32_t psx_brB_BFC25248 = cpu->gpr[16]; - psx_taken_BFC25248 = (psx_brA_BFC25248 != psx_brB_BFC25248); - psx_delay_BFC25248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2524C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D24Cu); -#endif - if (psx_delay_BFC25248) { - psx_delay_BFC25248 = 0; - if (psx_taken_BFC25248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D260u); - goto label_BFC25260; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D250u); - } -label_BFC25250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25250: 0C00F4AF jal 0xB003D2BC */ - cpu->gpr[31] = 0x8003D258u; /* jal link before delay slot */ - psx_delay_BFC25250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D254u); -#endif - if (psx_delay_BFC25250) { - psx_delay_BFC25250 = 0; - cpu->gpr[31] = 0x8003D258u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2BCu); - cpu->pc = 0x8003D2BCu; return; - } -label_BFC25258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25258: 10000014 beq $zero, $zero, 0xBFC252AC */ - uint32_t psx_brA_BFC25258 = cpu->gpr[0]; uint32_t psx_brB_BFC25258 = cpu->gpr[0]; - psx_taken_BFC25258 = (psx_brA_BFC25258 == psx_brB_BFC25258); - psx_delay_BFC25258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2525C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D25Cu); -#endif - if (psx_delay_BFC25258) { - psx_delay_BFC25258 = 0; - if (psx_taken_BFC25258) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2ACu); - goto label_BFC252AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D260u); - } -label_BFC25260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25260: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D260u); -#endif - /* 0xBFC25264: 8C84A124 lw $a0, -24284($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24284; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D264u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A124u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25268: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003D270u; /* jal link before delay slot */ - psx_delay_BFC25268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2526C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D26Cu); -#endif - if (psx_delay_BFC25268) { - psx_delay_BFC25268 = 0; - cpu->gpr[31] = 0x8003D270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC25270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC25270: 14500005 bne $v0, $s0, 0xBFC25288 */ - uint32_t psx_brA_BFC25270 = cpu->gpr[2]; uint32_t psx_brB_BFC25270 = cpu->gpr[16]; - psx_taken_BFC25270 = (psx_brA_BFC25270 != psx_brB_BFC25270); - psx_delay_BFC25270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25274: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D274u); -#endif - if (psx_delay_BFC25270) { - psx_delay_BFC25270 = 0; - if (psx_taken_BFC25270) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D288u); - goto label_BFC25288; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D278u); - } -label_BFC25278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25278: 0C00F4AF jal 0xB003D2BC */ - cpu->gpr[31] = 0x8003D280u; /* jal link before delay slot */ - psx_delay_BFC25278 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2527C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D27Cu); -#endif - if (psx_delay_BFC25278) { - psx_delay_BFC25278 = 0; - cpu->gpr[31] = 0x8003D280u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2BCu); - cpu->pc = 0x8003D2BCu; return; - } -label_BFC25280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25280: 1000000A beq $zero, $zero, 0xBFC252AC */ - uint32_t psx_brA_BFC25280 = cpu->gpr[0]; uint32_t psx_brB_BFC25280 = cpu->gpr[0]; - psx_taken_BFC25280 = (psx_brA_BFC25280 == psx_brB_BFC25280); - psx_delay_BFC25280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25284: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D284u); -#endif - if (psx_delay_BFC25280) { - psx_delay_BFC25280 = 0; - if (psx_taken_BFC25280) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2ACu); - goto label_BFC252AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D288u); - } -label_BFC25288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25288: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D288u); -#endif - /* 0xBFC2528C: 8C84A128 lw $a0, -24280($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D28Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A128u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25290: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003D298u; /* jal link before delay slot */ - psx_delay_BFC25290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D294u); -#endif - if (psx_delay_BFC25290) { - psx_delay_BFC25290 = 0; - cpu->gpr[31] = 0x8003D298u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC25298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC25298: 1450FFDD bne $v0, $s0, 0xBFC25210 */ - uint32_t psx_brA_BFC25298 = cpu->gpr[2]; uint32_t psx_brB_BFC25298 = cpu->gpr[16]; - psx_taken_BFC25298 = (psx_brA_BFC25298 != psx_brB_BFC25298); - psx_delay_BFC25298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2529C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D29Cu); -#endif - if (psx_delay_BFC25298) { - psx_delay_BFC25298 = 0; - if (psx_taken_BFC25298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D210u); - goto label_BFC25210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2A0u); - } -label_BFC252A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC252A0: 0C00F4AF jal 0xB003D2BC */ - cpu->gpr[31] = 0x8003D2A8u; /* jal link before delay slot */ - psx_delay_BFC252A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC252A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D2A4u); -#endif - if (psx_delay_BFC252A0) { - psx_delay_BFC252A0 = 0; - cpu->gpr[31] = 0x8003D2A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D2BCu); - cpu->pc = 0x8003D2BCu; return; - } -label_BFC252A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC252A8: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2A8u); -#endif -label_BFC252AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2ACu); -#endif - /* 0xBFC252AC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D2ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2B0u); -#endif - /* 0xBFC252B0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D2B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC252B4: 03E00008 jr $ra */ - psx_delay_BFC252B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC252B8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2B8u); -#endif - if (psx_delay_BFC252B4) { - psx_delay_BFC252B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC252BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC252BCu); - int psx_delay_BFC252CC = 0; - int psx_delay_BFC252DC = 0; - int psx_delay_BFC252EC = 0; - int psx_delay_BFC252FC = 0; - int psx_delay_BFC2530C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC252D4u: goto label_BFC252D4; - case 0xBFC252E4u: goto label_BFC252E4; - case 0xBFC252F4u: goto label_BFC252F4; - case 0xBFC25304u: goto label_BFC25304; - default: break; - } - } -label_BFC252BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC252BC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC252C0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D2C0u); return; } g_debug_last_store_pc = 0x8003D2C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252C4: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252C8: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC252CC: 0C016AC8 jal 0xB005AB20 */ - cpu->gpr[31] = 0x8003D2D4u; /* jal link before delay slot */ - psx_delay_BFC252CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC252D0: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2D0u); -#endif - if (psx_delay_BFC252CC) { - psx_delay_BFC252CC = 0; - cpu->gpr[31] = 0x8003D2D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB20u); - cpu->pc = 0x8005AB20u; return; - } -label_BFC252D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252D4: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252D8: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC252DC: 0C016AC8 jal 0xB005AB20 */ - cpu->gpr[31] = 0x8003D2E4u; /* jal link before delay slot */ - psx_delay_BFC252DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC252E0: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2E0u); -#endif - if (psx_delay_BFC252DC) { - psx_delay_BFC252DC = 0; - cpu->gpr[31] = 0x8003D2E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB20u); - cpu->pc = 0x8005AB20u; return; - } -label_BFC252E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252E4: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252E8: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC252EC: 0C016AC8 jal 0xB005AB20 */ - cpu->gpr[31] = 0x8003D2F4u; /* jal link before delay slot */ - psx_delay_BFC252EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC252F0: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2F0u); -#endif - if (psx_delay_BFC252EC) { - psx_delay_BFC252EC = 0; - cpu->gpr[31] = 0x8003D2F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB20u); - cpu->pc = 0x8005AB20u; return; - } -label_BFC252F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC252F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC252F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252F4: 3C04F400 lui $a0, 0xF400 */ - cpu->gpr[4] = 0xF4000000u; - PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC252F8: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC252FC: 0C016AC8 jal 0xB005AB20 */ - cpu->gpr[31] = 0x8003D304u; /* jal link before delay slot */ - psx_delay_BFC252FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25300: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D300u); -#endif - if (psx_delay_BFC252FC) { - psx_delay_BFC252FC = 0; - cpu->gpr[31] = 0x8003D304u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB20u); - cpu->pc = 0x8005AB20u; return; - } -label_BFC25304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D304u); -#endif - /* 0xBFC25304: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D304u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25308: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2530C: 03E00008 jr $ra */ - psx_delay_BFC2530C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25310: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D310u); -#endif - if (psx_delay_BFC2530C) { - psx_delay_BFC2530C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25314(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25314u); - int psx_delay_BFC25314 = 0; -label_BFC25314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25314: 03E00008 jr $ra */ - psx_delay_BFC25314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25318: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D318u); -#endif - if (psx_delay_BFC25314) { - psx_delay_BFC25314 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2531C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2531Cu); - int psx_delay_BFC25324 = 0; - int psx_delay_BFC25334 = 0; - int psx_delay_BFC25344 = 0; - int psx_delay_BFC25354 = 0; - int psx_delay_BFC25364 = 0; - int psx_delay_BFC2536C = 0; - int psx_delay_BFC2537C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2532Cu: goto label_BFC2532C; - case 0xBFC2533Cu: goto label_BFC2533C; - case 0xBFC2534Cu: goto label_BFC2534C; - case 0xBFC2535Cu: goto label_BFC2535C; - case 0xBFC2536Cu: goto label_BFC2536C; - case 0xBFC25374u: goto label_BFC25374; - default: break; - } - } -label_BFC2531C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2531Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2531Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2531C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25320: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D320u); return; } g_debug_last_store_pc = 0x8003D320u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25324: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x8003D32Cu; /* jal link before delay slot */ - psx_delay_BFC25324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25328: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D328u); -#endif - if (psx_delay_BFC25324) { - psx_delay_BFC25324 = 0; - cpu->gpr[31] = 0x8003D32Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC2532C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2532Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2532Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2532C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D330u); -#endif - /* 0xBFC25330: 8C843B6C lw $a0, 15212($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D330u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843B6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25334: 0C016ACC jal 0xB005AB30 */ - cpu->gpr[31] = 0x8003D33Cu; /* jal link before delay slot */ - psx_delay_BFC25334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25338: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D338u); -#endif - if (psx_delay_BFC25334) { - psx_delay_BFC25334 = 0; - cpu->gpr[31] = 0x8003D33Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB30u); - cpu->pc = 0x8005AB30u; return; - } -label_BFC2533C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2533Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2533Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2533C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D340u); -#endif - /* 0xBFC25340: 8C84A120 lw $a0, -24288($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D340u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A120u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25344: 0C016ACC jal 0xB005AB30 */ - cpu->gpr[31] = 0x8003D34Cu; /* jal link before delay slot */ - psx_delay_BFC25344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D348u); -#endif - if (psx_delay_BFC25344) { - psx_delay_BFC25344 = 0; - cpu->gpr[31] = 0x8003D34Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB30u); - cpu->pc = 0x8005AB30u; return; - } -label_BFC2534C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2534Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2534C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D350u); -#endif - /* 0xBFC25350: 8C84A124 lw $a0, -24284($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24284; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D350u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A124u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25354: 0C016ACC jal 0xB005AB30 */ - cpu->gpr[31] = 0x8003D35Cu; /* jal link before delay slot */ - psx_delay_BFC25354 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25358: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D358u); -#endif - if (psx_delay_BFC25354) { - psx_delay_BFC25354 = 0; - cpu->gpr[31] = 0x8003D35Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB30u); - cpu->pc = 0x8005AB30u; return; - } -label_BFC2535C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2535Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2535Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2535C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D360u); -#endif - /* 0xBFC25360: 8C84A128 lw $a0, -24280($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D360u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84A128u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25364: 0C016ACC jal 0xB005AB30 */ - cpu->gpr[31] = 0x8003D36Cu; /* jal link before delay slot */ - psx_delay_BFC25364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D368u); -#endif - if (psx_delay_BFC25364) { - psx_delay_BFC25364 = 0; - cpu->gpr[31] = 0x8003D36Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB30u); - cpu->pc = 0x8005AB30u; return; - } -label_BFC2536C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2536Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2536Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2536C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8003D374u; /* jal link before delay slot */ - psx_delay_BFC2536C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25370: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D370u); -#endif - if (psx_delay_BFC2536C) { - psx_delay_BFC2536C = 0; - cpu->gpr[31] = 0x8003D374u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC25374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D374u); -#endif - /* 0xBFC25374: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D374u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25378: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2537C: 03E00008 jr $ra */ - psx_delay_BFC2537C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25380: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D380u); -#endif - if (psx_delay_BFC2537C) { - psx_delay_BFC2537C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25390(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25390u); - int psx_delay_BFC2539C = 0; - int psx_taken_BFC2539C = 0; - int psx_delay_BFC253B0 = 0; - int psx_taken_BFC253B0 = 0; - int psx_delay_BFC253B8 = 0; - int psx_taken_BFC253B8 = 0; - int psx_delay_BFC253D0 = 0; - int psx_delay_BFC253DC = 0; - int psx_delay_BFC253FC = 0; - int psx_taken_BFC253FC = 0; - int psx_delay_BFC25404 = 0; - int psx_delay_BFC25410 = 0; - int psx_taken_BFC25410 = 0; - int psx_delay_BFC2543C = 0; - int psx_delay_BFC25460 = 0; - int psx_delay_BFC2547C = 0; - int psx_delay_BFC254A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC253A4u: goto label_BFC253A4; - case 0xBFC253B8u: goto label_BFC253B8; - case 0xBFC253C0u: goto label_BFC253C0; - case 0xBFC253C4u: goto label_BFC253C4; - case 0xBFC253D8u: goto label_BFC253D8; - case 0xBFC253E4u: goto label_BFC253E4; - case 0xBFC25404u: goto label_BFC25404; - case 0xBFC2540Cu: goto label_BFC2540C; - case 0xBFC25418u: goto label_BFC25418; - case 0xBFC25444u: goto label_BFC25444; - case 0xBFC25468u: goto label_BFC25468; - case 0xBFC25484u: goto label_BFC25484; - case 0xBFC254A0u: goto label_BFC254A0; - default: break; - } - } -label_BFC25390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25390: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D390u); -#endif - /* 0xBFC25394: 8DCE3C58 lw $t6, 15448($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D394u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE3C58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25398: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2539C: 11C00040 beq $t6, $zero, 0xBFC254A0 */ - uint32_t psx_brA_BFC2539C = cpu->gpr[14]; uint32_t psx_brB_BFC2539C = cpu->gpr[0]; - psx_taken_BFC2539C = (psx_brA_BFC2539C == psx_brB_BFC2539C); - psx_delay_BFC2539C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC253A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3A0u); return; } g_debug_last_store_pc = 0x8003D3A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3A0u); -#endif - if (psx_delay_BFC2539C) { - psx_delay_BFC2539C = 0; - if (psx_taken_BFC2539C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D4A0u); - goto label_BFC254A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D3A4u); - } -label_BFC253A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC253A4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D3A4u); -#endif - /* 0xBFC253A8: 8DEF9DE0 lw $t7, -25120($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3A8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DE0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC253AC: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3ACu); return; } g_debug_last_store_pc = 0x8003D3ACu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC253B0: 11E00003 beq $t7, $zero, 0xBFC253C0 */ - uint32_t psx_brA_BFC253B0 = cpu->gpr[15]; uint32_t psx_brB_BFC253B0 = cpu->gpr[0]; - psx_taken_BFC253B0 = (psx_brA_BFC253B0 == psx_brB_BFC253B0); - psx_delay_BFC253B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC253B4: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3B4u); return; } g_debug_last_store_pc = 0x8003D3B4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3B4u); -#endif - if (psx_delay_BFC253B0) { - psx_delay_BFC253B0 = 0; - if (psx_taken_BFC253B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D3C0u); - goto label_BFC253C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D3B8u); - } -label_BFC253B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC253B8: 10000002 beq $zero, $zero, 0xBFC253C4 */ - uint32_t psx_brA_BFC253B8 = cpu->gpr[0]; uint32_t psx_brB_BFC253B8 = cpu->gpr[0]; - psx_taken_BFC253B8 = (psx_brA_BFC253B8 == psx_brB_BFC253B8); - psx_delay_BFC253B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC253BC: 2403004A addiu $v1, $zero, 74 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (74)); - PGXP_ALU(0x2403004Au, cpu->gpr[3], _pgx1, 0x0000004Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3BCu); -#endif - if (psx_delay_BFC253B8) { - psx_delay_BFC253B8 = 0; - if (psx_taken_BFC253B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D3C4u); - goto label_BFC253C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D3C0u); - } -label_BFC253C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC253C0: 24030016 addiu $v1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24030016u, cpu->gpr[3], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3C0u); -#endif -label_BFC253C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC253C4: 3C11F200 lui $s1, 0xF200 */ - cpu->gpr[17] = 0xF2000000u; - PGXP_ALU(0x3C11F200u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC253C8: 36310002 ori $s1, $s1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x2u; - PGXP_ALU(0x36310002u, cpu->gpr[17], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC253CC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC253D0: 0C0167E2 jal 0xB0059F88 */ - cpu->gpr[31] = 0x8003D3D8u; /* jal link before delay slot */ - psx_delay_BFC253D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC253D4: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3D4u); return; } g_debug_last_store_pc = 0x8003D3D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3D4u); -#endif - if (psx_delay_BFC253D0) { - psx_delay_BFC253D0 = 0; - cpu->gpr[31] = 0x8003D3D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F88u); - cpu->pc = 0x80059F88u; return; - } -label_BFC253D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3D8u); -#endif - /* 0xBFC253D8: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC253DC: 0C0167B6 jal 0xB0059ED8 */ - cpu->gpr[31] = 0x8003D3E4u; /* jal link before delay slot */ - psx_delay_BFC253DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC253E0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3E0u); -#endif - if (psx_delay_BFC253DC) { - psx_delay_BFC253DC = 0; - cpu->gpr[31] = 0x8003D3E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059ED8u); - cpu->pc = 0x80059ED8u; return; - } -label_BFC253E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC253E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC253E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3E4u); -#endif - /* 0xBFC253E4: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D3E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC253E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC253EC: 00038140 sll $s0, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00038140u, cpu->gpr[16], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC253F0: 02038021 addu $s0, $s0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[3]; - PGXP_ALU(0x02038021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC253F4: 001080C0 sll $s0, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 3u; - PGXP_ALU(0x001080C0u, cpu->gpr[16], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC253F8: 0050082A slt $at, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC253FC: 10200006 beq $at, $zero, 0xBFC25418 */ - uint32_t psx_brA_BFC253FC = cpu->gpr[1]; uint32_t psx_brB_BFC253FC = cpu->gpr[0]; - psx_taken_BFC253FC = (psx_brA_BFC253FC == psx_brB_BFC253FC); - psx_delay_BFC253FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25400: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D400u); -#endif - if (psx_delay_BFC253FC) { - psx_delay_BFC253FC = 0; - if (psx_taken_BFC253FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D418u); - goto label_BFC25418; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D404u); - } -label_BFC25404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25404: 0C0167B6 jal 0xB0059ED8 */ - cpu->gpr[31] = 0x8003D40Cu; /* jal link before delay slot */ - psx_delay_BFC25404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC25408: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D408u); -#endif - if (psx_delay_BFC25404) { - psx_delay_BFC25404 = 0; - cpu->gpr[31] = 0x8003D40Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059ED8u); - cpu->pc = 0x80059ED8u; return; - } -label_BFC2540C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2540Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2540Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC2540C: 0050082A slt $at, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25410: 1420FFFC bne $at, $zero, 0xBFC25404 */ - uint32_t psx_brA_BFC25410 = cpu->gpr[1]; uint32_t psx_brB_BFC25410 = cpu->gpr[0]; - psx_taken_BFC25410 = (psx_brA_BFC25410 != psx_brB_BFC25410); - psx_delay_BFC25410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25414: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D414u); -#endif - if (psx_delay_BFC25410) { - psx_delay_BFC25410 = 0; - if (psx_taken_BFC25410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D404u); - goto label_BFC25404; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D418u); - } -label_BFC25418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC25418: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D418u); -#endif - /* 0xBFC2541C: 87183C50 lh $t8, 15440($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 15440; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D41Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x87183C50u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC25420: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC25424: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC25428: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2542C: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC25430: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25434: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC25438: 25083B70 addiu $t0, $t0, 15216 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (15216)); - PGXP_ALU(0x25083B70u, cpu->gpr[8], _pgx1, 0x00003B70u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2543C: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x8003D444u; /* jal link before delay slot */ - psx_delay_BFC2543C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC25440: 03282021 addu $a0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D440u); -#endif - if (psx_delay_BFC2543C) { - psx_delay_BFC2543C = 0; - cpu->gpr[31] = 0x8003D444u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC25444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25444: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D444u); -#endif - /* 0xBFC25448: 85293C50 lh $t1, 15440($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 15440; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D448u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x85293C50u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2544C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC25450: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC25454: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC25458: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2545C: 256B3C28 addiu $t3, $t3, 15400 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (15400)); - PGXP_ALU(0x256B3C28u, cpu->gpr[11], _pgx1, 0x00003C28u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25460: 0C013D3B jal 0xB004F4EC */ - cpu->gpr[31] = 0x8003D468u; /* jal link before delay slot */ - psx_delay_BFC25460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC25464: 014B2021 addu $a0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D464u); -#endif - if (psx_delay_BFC25460) { - psx_delay_BFC25460 = 0; - cpu->gpr[31] = 0x8003D468u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F4ECu); - cpu->pc = 0x8004F4ECu; return; - } -label_BFC25468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25468: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D468u); -#endif - /* 0xBFC2546C: 858C3C50 lh $t4, 15440($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 15440; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D46Cu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x858C3C50u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25470: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25474: 25CE0EC8 addiu $t6, $t6, 3784 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (3784)); - PGXP_ALU(0x25CE0EC8u, cpu->gpr[14], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC25478: 000C6C00 sll $t5, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6C00u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2547C: 0C013CF8 jal 0xB004F3E0 */ - cpu->gpr[31] = 0x8003D484u; /* jal link before delay slot */ - psx_delay_BFC2547C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6010u); -#endif - /* 0xBFC25480: 01AE2021 addu $a0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D480u); -#endif - if (psx_delay_BFC2547C) { - psx_delay_BFC2547C = 0; - cpu->gpr[31] = 0x8003D484u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F3E0u); - cpu->pc = 0x8004F3E0u; return; - } -label_BFC25484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25484: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D484u); -#endif - /* 0xBFC25488: 8DEF3C58 lw $t7, 15448($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D488u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF3C58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2548C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC25490: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D490u); -#endif - /* 0xBFC25494: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D494u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D494u); -#endif - /* 0xBFC25498: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D498u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2549C: AC383C58 sw $t8, 15448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D49Cu); return; } g_debug_last_store_pc = 0x8003D49Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC383C58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D49Cu); -#endif -label_BFC254A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC254A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC254A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4A0u); -#endif - /* 0xBFC254A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D4A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC254A4: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC254A8: 03E00008 jr $ra */ - psx_delay_BFC254A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC254AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D4ACu); -#endif - if (psx_delay_BFC254A8) { - psx_delay_BFC254A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC254B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC254B0u); - int psx_delay_BFC254B8 = 0; - int psx_delay_BFC254D4 = 0; - int psx_delay_BFC254E4 = 0; - int psx_delay_BFC254F8 = 0; - int psx_delay_BFC25504 = 0; - int psx_delay_BFC25518 = 0; - int psx_delay_BFC25524 = 0; - int psx_delay_BFC2552C = 0; - int psx_delay_BFC25550 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC254C0u: goto label_BFC254C0; - case 0xBFC254DCu: goto label_BFC254DC; - case 0xBFC254ECu: goto label_BFC254EC; - case 0xBFC25500u: goto label_BFC25500; - case 0xBFC2550Cu: goto label_BFC2550C; - case 0xBFC25520u: goto label_BFC25520; - case 0xBFC2552Cu: goto label_BFC2552C; - case 0xBFC25534u: goto label_BFC25534; - default: break; - } - } -label_BFC254B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC254B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC254B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC254B0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC254B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D4B4u); return; } g_debug_last_store_pc = 0x8003D4B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC254B8: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x8003D4C0u; /* jal link before delay slot */ - psx_delay_BFC254B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC254BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D4BCu); -#endif - if (psx_delay_BFC254B8) { - psx_delay_BFC254B8 = 0; - cpu->gpr[31] = 0x8003D4C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC254C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC254C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC254C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC254C0: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC254C4: 3C078004 lui $a3, 0x8004 */ - cpu->gpr[7] = 0x80040000u; - PGXP_ALU(0x3C078004u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC254C8: 24E7D390 addiu $a3, $a3, -11376 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-11376)); - PGXP_ALU(0x24E7D390u, cpu->gpr[7], _pgx1, 0xFFFFD390u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC254CC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC254D0: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC254D4: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x8003D4DCu; /* jal link before delay slot */ - psx_delay_BFC254D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC254D8: 24061000 addiu $a2, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24061000u, cpu->gpr[6], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4D8u); -#endif - if (psx_delay_BFC254D4) { - psx_delay_BFC254D4 = 0; - cpu->gpr[31] = 0x8003D4DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC254DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC254DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC254DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC254DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC254E0: AC223C54 sw $v0, 15444($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15444; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D4E0u); return; } g_debug_last_store_pc = 0x8003D4E0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223C54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC254E4: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x8003D4ECu; /* jal link before delay slot */ - psx_delay_BFC254E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC254E8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4E8u); -#endif - if (psx_delay_BFC254E4) { - psx_delay_BFC254E4 = 0; - cpu->gpr[31] = 0x8003D4ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC254EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC254ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC254ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC254EC: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC254F0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC254F4: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC254F8: 0C01678C jal 0xB0059E30 */ - cpu->gpr[31] = 0x8003D500u; /* jal link before delay slot */ - psx_delay_BFC254F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC254FC: 24061000 addiu $a2, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24061000u, cpu->gpr[6], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D4FCu); -#endif - if (psx_delay_BFC254F8) { - psx_delay_BFC254F8 = 0; - cpu->gpr[31] = 0x8003D500u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E30u); - cpu->pc = 0x80059E30u; return; - } -label_BFC25500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25500: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25504: 0C0167C4 jal 0xB0059F10 */ - cpu->gpr[31] = 0x8003D50Cu; /* jal link before delay slot */ - psx_delay_BFC25504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25508: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D508u); -#endif - if (psx_delay_BFC25504) { - psx_delay_BFC25504 = 0; - cpu->gpr[31] = 0x8003D50Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F10u); - cpu->pc = 0x80059F10u; return; - } -label_BFC2550C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2550Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2550Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2550C: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25510: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25514: 3405FFFF ori $a1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25518: 0C01678C jal 0xB0059E30 */ - cpu->gpr[31] = 0x8003D520u; /* jal link before delay slot */ - psx_delay_BFC25518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2551C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D51Cu); -#endif - if (psx_delay_BFC25518) { - psx_delay_BFC25518 = 0; - cpu->gpr[31] = 0x8003D520u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E30u); - cpu->pc = 0x80059E30u; return; - } -label_BFC25520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25520: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25524: 0C0167C4 jal 0xB0059F10 */ - cpu->gpr[31] = 0x8003D52Cu; /* jal link before delay slot */ - psx_delay_BFC25524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25528: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D528u); -#endif - if (psx_delay_BFC25524) { - psx_delay_BFC25524 = 0; - cpu->gpr[31] = 0x8003D52Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F10u); - cpu->pc = 0x80059F10u; return; - } -label_BFC2552C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2552Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2552Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2552C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8003D534u; /* jal link before delay slot */ - psx_delay_BFC2552C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D530u); -#endif - if (psx_delay_BFC2552C) { - psx_delay_BFC2552C = 0; - cpu->gpr[31] = 0x8003D534u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC25534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25534: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25538: AC203C58 sw $zero, 15448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D538u); return; } g_debug_last_store_pc = 0x8003D538u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203C58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2553C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D540u); -#endif - /* 0xBFC25540: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D540u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25544: AC203C5C sw $zero, 15452($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D544u); return; } g_debug_last_store_pc = 0x8003D544u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203C5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25548: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2554C: A4203C50 sh $zero, 15440($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D54Cu); return; } g_debug_last_store_pc = 0x8003D54Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4203C50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25550: 03E00008 jr $ra */ - psx_delay_BFC25550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25554: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D554u); -#endif - if (psx_delay_BFC25550) { - psx_delay_BFC25550 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25558(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25558u); - int psx_delay_BFC25568 = 0; - int psx_delay_BFC2557C = 0; - int psx_delay_BFC25588 = 0; - int psx_delay_BFC25598 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25570u: goto label_BFC25570; - case 0xBFC25584u: goto label_BFC25584; - case 0xBFC25590u: goto label_BFC25590; - default: break; - } - } -label_BFC25558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25558: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2555C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25560: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D560u); return; } g_debug_last_store_pc = 0x8003D560u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D560u); -#endif - /* 0xBFC25564: 8C843C54 lw $a0, 15444($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D564u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843C54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25568: 0C016ACC jal 0xB005AB30 */ - cpu->gpr[31] = 0x8003D570u; /* jal link before delay slot */ - psx_delay_BFC25568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2556C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D56Cu); -#endif - if (psx_delay_BFC25568) { - psx_delay_BFC25568 = 0; - cpu->gpr[31] = 0x8003D570u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB30u); - cpu->pc = 0x8005AB30u; return; - } -label_BFC25570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25570: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25574: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25578: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2557C: 0C01678C jal 0xB0059E30 */ - cpu->gpr[31] = 0x8003D584u; /* jal link before delay slot */ - psx_delay_BFC2557C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC25580: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D580u); -#endif - if (psx_delay_BFC2557C) { - psx_delay_BFC2557C = 0; - cpu->gpr[31] = 0x8003D584u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E30u); - cpu->pc = 0x80059E30u; return; - } -label_BFC25584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25584: 3C04F200 lui $a0, 0xF200 */ - cpu->gpr[4] = 0xF2000000u; - PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25588: 0C0167D5 jal 0xB0059F54 */ - cpu->gpr[31] = 0x8003D590u; /* jal link before delay slot */ - psx_delay_BFC25588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2558C: 34840002 ori $a0, $a0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x2u; - PGXP_ALU(0x34840002u, cpu->gpr[4], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D58Cu); -#endif - if (psx_delay_BFC25588) { - psx_delay_BFC25588 = 0; - cpu->gpr[31] = 0x8003D590u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F54u); - cpu->pc = 0x80059F54u; return; - } -label_BFC25590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D590u); -#endif - /* 0xBFC25590: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D590u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25594: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25598: 03E00008 jr $ra */ - psx_delay_BFC25598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2559C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D59Cu); -#endif - if (psx_delay_BFC25598) { - psx_delay_BFC25598 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC255A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC255A0u); - int psx_delay_BFC255D0 = 0; - int psx_delay_BFC25620 = 0; - int psx_taken_BFC25620 = 0; - int psx_delay_BFC25690 = 0; - int psx_taken_BFC25690 = 0; - int psx_delay_BFC256D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC255D8u: goto label_BFC255D8; - case 0xBFC25604u: goto label_BFC25604; - case 0xBFC25628u: goto label_BFC25628; - case 0xBFC25658u: goto label_BFC25658; - case 0xBFC25698u: goto label_BFC25698; - default: break; - } - } -label_BFC255A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC255A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC255A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC255A0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D5A0u); -#endif - /* 0xBFC255A4: 84423C50 lh $v0, 15440($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15440; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5A4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x84423C50u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC255A8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC255AC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5ACu); return; } g_debug_last_store_pc = 0x8003D5ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC255B0: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC255B4: 38420001 xori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x1u; - PGXP_ALU(0x38420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC255B8: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5B8u); return; } g_debug_last_store_pc = 0x8003D5B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC255BC: 00027400 sll $t6, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00027400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC255C0: 25EF0EC8 addiu $t7, $t7, 3784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3784)); - PGXP_ALU(0x25EF0EC8u, cpu->gpr[15], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC255C4: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5C4u); return; } g_debug_last_store_pc = 0x8003D5C4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC255C8: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5C8u); return; } g_debug_last_store_pc = 0x8003D5C8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC255CC: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC255D0: 0C00F5D5 jal 0xB003D754 */ - cpu->gpr[31] = 0x8003D5D8u; /* jal link before delay slot */ - psx_delay_BFC255D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC255D4: AFA2001C sw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5D4u); return; } g_debug_last_store_pc = 0x8003D5D4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5D4u); -#endif - if (psx_delay_BFC255D0) { - psx_delay_BFC255D0 = 0; - cpu->gpr[31] = 0x8003D5D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D754u); - cpu->pc = 0x8003D754u; return; - } -label_BFC255D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC255D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC255D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5D8u); -#endif - /* 0xBFC255D8: 8FA2001C lw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D5D8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC255DC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC255E0: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC255E4: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC255E8: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC255EC: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC255F0: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC255F4: 27393B70 addiu $t9, $t9, 15216 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (15216)); - PGXP_ALU(0x27393B70u, cpu->gpr[25], _pgx1, 0x00003B70u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC255F8: 27A90024 addiu $t1, $sp, 36 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); - PGXP_ALU(0x27A90024u, cpu->gpr[9], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC255FC: 252A0054 addiu $t2, $t1, 84 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (84)); - PGXP_ALU(0x252A0054u, cpu->gpr[10], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC25600: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D600u); -#endif -label_BFC25604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D604u); -#endif - /* 0xBFC25604: 8D210000 lw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D604u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25608: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2560C: AD010000 sw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D60Cu); return; } g_debug_last_store_pc = 0x8003D60Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D610u); -#endif - /* 0xBFC25610: 8D21FFF8 lw $at, -8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D610u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC25614: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC25618: AD01FFF8 sw $at, -8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D618u); return; } g_debug_last_store_pc = 0x8003D618u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D618u); -#endif - /* 0xBFC2561C: 8D21FFFC lw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D61Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC25620: 152AFFF8 bne $t1, $t2, 0xBFC25604 */ - uint32_t psx_brA_BFC25620 = cpu->gpr[9]; uint32_t psx_brB_BFC25620 = cpu->gpr[10]; - psx_taken_BFC25620 = (psx_brA_BFC25620 != psx_brB_BFC25620); - psx_delay_BFC25620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC25624: AD01FFFC sw $at, -4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D624u); return; } g_debug_last_store_pc = 0x8003D624u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D624u); -#endif - if (psx_delay_BFC25620) { - psx_delay_BFC25620 = 0; - if (psx_taken_BFC25620) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D604u); - goto label_BFC25604; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D628u); - } -label_BFC25628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D628u); -#endif - /* 0xBFC25628: 8D210000 lw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D628u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2562C: 00025880 sll $t3, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC25630: AD010000 sw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D630u); return; } g_debug_last_store_pc = 0x8003D630u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D630u); -#endif - /* 0xBFC25634: 8D2A0004 lw $t2, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D634u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } - PGXP_LOAD(0x8D2A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC25638: 01625821 addu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[2]; - PGXP_ALU(0x01625821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2563C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25640: 258C3C28 addiu $t4, $t4, 15400 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (15400)); - PGXP_ALU(0x258C3C28u, cpu->gpr[12], _pgx1, 0x00003C28u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC25644: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC25648: 27AE0080 addiu $t6, $sp, 128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (128)); - PGXP_ALU(0x27AE0080u, cpu->gpr[14], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2564C: 25CF000C addiu $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (12)); - PGXP_ALU(0x25CF000Cu, cpu->gpr[15], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC25650: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC25654: AD0A0004 sw $t2, 4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D654u); return; } g_debug_last_store_pc = 0x8003D654u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD0A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D654u); -#endif -label_BFC25658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D658u); -#endif - /* 0xBFC25658: 89C10003 lwl $at, 3($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 3; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89C10003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D658u); -#endif - /* 0xBFC2565C: 99C10000 lwr $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99C10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25660: 25CE000C addiu $t6, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (12)); - PGXP_ALU(0x25CE000Cu, cpu->gpr[14], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC25664: A9A10003 swl $at, 3($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 3; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x8003D664u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9A10003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC25668: B9A10000 swr $at, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x8003D668u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9A10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D668u); -#endif - /* 0xBFC2566C: 89C1FFFB lwl $at, -5($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -5; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-5)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89C1FFFBu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D670u); -#endif - /* 0xBFC25670: 99C1FFF8 lwr $at, -8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99C1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC25674: 25AD000C addiu $t5, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (12)); - PGXP_ALU(0x25AD000Cu, cpu->gpr[13], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC25678: A9A1FFFB swl $at, -5($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -5; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-5)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x8003D678u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9A1FFFBu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2567C: B9A1FFF8 swr $at, -8($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x8003D67Cu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9A1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D680u); -#endif - /* 0xBFC25680: 89C1FFFF lwl $at, -1($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -1; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89C1FFFFu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D680u); -#endif - /* 0xBFC25684: 99C1FFFC lwr $at, -4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99C1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2568C: A9A1FFFF swl $at, -1($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -1; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x8003D68Cu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9A1FFFFu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC25690: 15CFFFF1 bne $t6, $t7, 0xBFC25658 */ - uint32_t psx_brA_BFC25690 = cpu->gpr[14]; uint32_t psx_brB_BFC25690 = cpu->gpr[15]; - psx_taken_BFC25690 = (psx_brA_BFC25690 != psx_brB_BFC25690); - psx_delay_BFC25690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC25694: B9A1FFFC swr $at, -4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-4)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x8003D694u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9A1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D694u); -#endif - if (psx_delay_BFC25690) { - psx_delay_BFC25690 = 0; - if (psx_taken_BFC25690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D658u); - goto label_BFC25658; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D698u); - } -label_BFC25698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D698u); -#endif - /* 0xBFC25698: 89C10003 lwl $at, 3($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 3; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89C10003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D698u); -#endif - /* 0xBFC2569C: 99C10000 lwr $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x4000u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99C10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC256A0: 24180002 addiu $t8, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24180002u, cpu->gpr[24], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC256A4: A9A10003 swl $at, 3($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 3; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x8003D6A4u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9A10003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC256A8: B9A10000 swr $at, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x8003D6A8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9A10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6A8u); -#endif - /* 0xBFC256AC: 89CF0007 lwl $t7, 7($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 7; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (7)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 15, 0x4000u); uint32_t psx_old_rt = cpu->gpr[15]; cpu->gpr[15] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x89CF0007u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6B0u); -#endif - /* 0xBFC256B0: 99CF0004 lwr $t7, 4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (4)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 15, 0x4000u); uint32_t psx_old_rt = cpu->gpr[15]; cpu->gpr[15] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x99CF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC256B4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC256B8: A9AF0007 swl $t7, 7($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 7; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (7)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[15] >> psx_shift_bits); g_debug_last_store_pc = 0x8003D6B8u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xA9AF0007u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC256BC: B9AF0004 swr $t7, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (4)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[15] << psx_shift_bits); g_debug_last_store_pc = 0x8003D6BCu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xB9AF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6C0u); -#endif - /* 0xBFC256C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D6C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC256C4: A4223C50 sh $v0, 15440($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15440)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003D6C4u); return; } g_debug_last_store_pc = 0x8003D6C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4223C50u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC256C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC256CC: AC383C58 sw $t8, 15448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D6CCu); return; } g_debug_last_store_pc = 0x8003D6CCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC383C58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC256D0: 03E00008 jr $ra */ - psx_delay_BFC256D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC256D4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6D4u); -#endif - if (psx_delay_BFC256D0) { - psx_delay_BFC256D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC256D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC256D8u); - int psx_delay_BFC256DC = 0; - int psx_taken_BFC256DC = 0; - int psx_delay_BFC256F4 = 0; - int psx_taken_BFC256F4 = 0; - int psx_delay_BFC2570C = 0; - int psx_taken_BFC2570C = 0; - int psx_delay_BFC25714 = 0; - int psx_taken_BFC25714 = 0; - int psx_delay_BFC25728 = 0; - int psx_taken_BFC25728 = 0; - int psx_delay_BFC2573C = 0; - int psx_taken_BFC2573C = 0; - int psx_delay_BFC2574C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC256E4u: goto label_BFC256E4; - case 0xBFC256FCu: goto label_BFC256FC; - case 0xBFC25714u: goto label_BFC25714; - case 0xBFC2571Cu: goto label_BFC2571C; - case 0xBFC25730u: goto label_BFC25730; - case 0xBFC25744u: goto label_BFC25744; - default: break; - } - } -label_BFC256D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC256D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC256D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC256D8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC256DC: 1481000D bne $a0, $at, 0xBFC25714 */ - uint32_t psx_brA_BFC256DC = cpu->gpr[4]; uint32_t psx_brB_BFC256DC = cpu->gpr[1]; - psx_taken_BFC256DC = (psx_brA_BFC256DC != psx_brB_BFC256DC); - psx_delay_BFC256DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC256E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D6E0u); -#endif - if (psx_delay_BFC256DC) { - psx_delay_BFC256DC = 0; - if (psx_taken_BFC256DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D714u); - goto label_BFC25714; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D6E4u); - } -label_BFC256E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC256E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC256E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC256E4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D6E4u); -#endif - /* 0xBFC256E8: 8DCE3C58 lw $t6, 15448($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D6E8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE3C58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC256EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC256F0: 29C10002 slti $at, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (2) ? 1 : 0); - PGXP_ALU(0x29C10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC256F4: 14200007 bne $at, $zero, 0xBFC25714 */ - uint32_t psx_brA_BFC256F4 = cpu->gpr[1]; uint32_t psx_brB_BFC256F4 = cpu->gpr[0]; - psx_taken_BFC256F4 = (psx_brA_BFC256F4 != psx_brB_BFC256F4); - psx_delay_BFC256F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC256F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D6F8u); -#endif - if (psx_delay_BFC256F4) { - psx_delay_BFC256F4 = 0; - if (psx_taken_BFC256F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D714u); - goto label_BFC25714; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D6FCu); - } -label_BFC256FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC256FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC256FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC256FC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D700u); -#endif - /* 0xBFC25700: 8DEF3C58 lw $t7, 15448($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D700u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF3C58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC25708: 29E10002 slti $at, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0); - PGXP_ALU(0x29E10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2570C: 1020FFFB beq $at, $zero, 0xBFC256FC */ - uint32_t psx_brA_BFC2570C = cpu->gpr[1]; uint32_t psx_brB_BFC2570C = cpu->gpr[0]; - psx_taken_BFC2570C = (psx_brA_BFC2570C == psx_brB_BFC2570C); - psx_delay_BFC2570C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D710u); -#endif - if (psx_delay_BFC2570C) { - psx_delay_BFC2570C = 0; - if (psx_taken_BFC2570C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D6FCu); - goto label_BFC256FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D714u); - } -label_BFC25714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25714: 1480000B bne $a0, $zero, 0xBFC25744 */ - uint32_t psx_brA_BFC25714 = cpu->gpr[4]; uint32_t psx_brB_BFC25714 = cpu->gpr[0]; - psx_taken_BFC25714 = (psx_brA_BFC25714 != psx_brB_BFC25714); - psx_delay_BFC25714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25718: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D718u); -#endif - if (psx_delay_BFC25714) { - psx_delay_BFC25714 = 0; - if (psx_taken_BFC25714) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D744u); - goto label_BFC25744; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D71Cu); - } -label_BFC2571C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2571Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2571C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D720u); -#endif - /* 0xBFC25720: 8F183C58 lw $t8, 15448($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D720u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183C58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25724: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC25728: 13000006 beq $t8, $zero, 0xBFC25744 */ - uint32_t psx_brA_BFC25728 = cpu->gpr[24]; uint32_t psx_brB_BFC25728 = cpu->gpr[0]; - psx_taken_BFC25728 = (psx_brA_BFC25728 == psx_brB_BFC25728); - psx_delay_BFC25728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2572C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D72Cu); -#endif - if (psx_delay_BFC25728) { - psx_delay_BFC25728 = 0; - if (psx_taken_BFC25728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D744u); - goto label_BFC25744; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D730u); - } -label_BFC25730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25730: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D730u); -#endif - /* 0xBFC25734: 8F393C58 lw $t9, 15448($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D734u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F393C58u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25738: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2573C: 1720FFFC bne $t9, $zero, 0xBFC25730 */ - uint32_t psx_brA_BFC2573C = cpu->gpr[25]; uint32_t psx_brB_BFC2573C = cpu->gpr[0]; - psx_taken_BFC2573C = (psx_brA_BFC2573C != psx_brB_BFC2573C); - psx_delay_BFC2573C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D740u); -#endif - if (psx_delay_BFC2573C) { - psx_delay_BFC2573C = 0; - if (psx_taken_BFC2573C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D730u); - goto label_BFC25730; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D744u); - } -label_BFC25744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC25744: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D744u); -#endif - /* 0xBFC25748: 8C423C58 lw $v0, 15448($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D748u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423C58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2574C: 03E00008 jr $ra */ - psx_delay_BFC2574C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25750: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D750u); -#endif - if (psx_delay_BFC2574C) { - psx_delay_BFC2574C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25754(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25754u); - int psx_delay_BFC2579C = 0; - int psx_taken_BFC2579C = 0; - int psx_delay_BFC257D8 = 0; - int psx_taken_BFC257D8 = 0; - int psx_delay_BFC257E4 = 0; - int psx_delay_BFC25804 = 0; - int psx_taken_BFC25804 = 0; - int psx_delay_BFC25838 = 0; - int psx_taken_BFC25838 = 0; - int psx_delay_BFC2587C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25788u: goto label_BFC25788; - case 0xBFC257A4u: goto label_BFC257A4; - case 0xBFC257E0u: goto label_BFC257E0; - case 0xBFC257ECu: goto label_BFC257EC; - case 0xBFC25800u: goto label_BFC25800; - case 0xBFC2580Cu: goto label_BFC2580C; - case 0xBFC25840u: goto label_BFC25840; - default: break; - } - } -label_BFC25754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25754: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC25758: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D758u); return; } g_debug_last_store_pc = 0x8003D758u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2575C: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D75Cu); return; } g_debug_last_store_pc = 0x8003D75Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC25760: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D760u); return; } g_debug_last_store_pc = 0x8003D760u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC25764: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D764u); return; } g_debug_last_store_pc = 0x8003D764u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC25768: 00A09821 addu $s3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2576C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D76Cu); return; } g_debug_last_store_pc = 0x8003D76Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC25770: 3C1400FF lui $s4, 0xFF */ - cpu->gpr[20] = 0x00FF0000u; - PGXP_ALU(0x3C1400FFu, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25774: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D774u); return; } g_debug_last_store_pc = 0x8003D774u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC25778: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2577C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC25780: 3694FFFF ori $s4, $s4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] | 0xFFFFu; - PGXP_ALU(0x3694FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0001u); -#endif - /* 0xBFC25784: 02609021 addu $s2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02609021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D784u); -#endif -label_BFC25788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D788u); -#endif - /* 0xBFC25788: 8E230000 lw $v1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D788u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x8E230000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2578C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC25790: 00031E02 srl $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x00031E02u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14008u); -#endif - /* 0xBFC25794: 02037021 addu $t6, $s0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[16] + cpu->gpr[3]; - PGXP_ALU(0x02037021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC25798: 2DC14000 sltiu $at, $t6, 16384 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00004000u ? 1 : 0); - PGXP_ALU(0x2DC14000u, cpu->gpr[1], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2579C: 10200028 beq $at, $zero, 0xBFC25840 */ - uint32_t psx_brA_BFC2579C = cpu->gpr[1]; uint32_t psx_brB_BFC2579C = cpu->gpr[0]; - psx_taken_BFC2579C = (psx_brA_BFC2579C == psx_brB_BFC2579C); - psx_delay_BFC2579C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC257A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D7A0u); -#endif - if (psx_delay_BFC2579C) { - psx_delay_BFC2579C = 0; - if (psx_taken_BFC2579C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D840u); - goto label_BFC25840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D7A4u); - } -label_BFC257A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC257A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC257A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC257A4: 00107880 sll $t7, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88010u); -#endif - /* 0xBFC257A8: 026F2021 addu $a0, $s3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[15]; - PGXP_ALU(0x026F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC257AC: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7B0u); -#endif - /* 0xBFC257B0: 8E420000 lw $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D7B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } - PGXP_LOAD(0x8E420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC257B4: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC257B8: 0002C602 srl $t8, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 24u; - PGXP_ALU(0x0002C602u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC257BC: 0078C826 xor $t9, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[3] ^ cpu->gpr[24]; - PGXP_ALU(0x0078C826u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC257C0: 00194600 sll $t0, $t9, 24 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 24u; - PGXP_ALU(0x00194600u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC257C4: 01024826 xor $t1, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] ^ cpu->gpr[2]; - PGXP_ALU(0x01024826u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC257C8: AE490000 sw $t1, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D7C8u); return; } g_debug_last_store_pc = 0x8003D7C8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAE490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7C8u); -#endif - /* 0xBFC257CC: 8E250000 lw $a1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D7CCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } - PGXP_LOAD(0x8E250000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC257D0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC257D4: 00051E02 srl $v1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] >> 24u; - PGXP_ALU(0x00051E02u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC257D8: 10600009 beq $v1, $zero, 0xBFC25800 */ - uint32_t psx_brA_BFC257D8 = cpu->gpr[3]; uint32_t psx_brB_BFC257D8 = cpu->gpr[0]; - psx_taken_BFC257D8 = (psx_brA_BFC257D8 == psx_brB_BFC257D8); - psx_delay_BFC257D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC257DC: 00055A00 sll $t3, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[5] << 8u; - PGXP_ALU(0x00055A00u, cpu->gpr[11], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7DCu); -#endif - if (psx_delay_BFC257D8) { - psx_delay_BFC257D8 = 0; - if (psx_taken_BFC257D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D800u); - goto label_BFC25800; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D7E0u); - } -label_BFC257E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC257E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC257E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC257E0: 26250004 addiu $a1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26250004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC257E4: 0C00F621 jal 0xB003D884 */ - cpu->gpr[31] = 0x8003D7ECu; /* jal link before delay slot */ - psx_delay_BFC257E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC257E8: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7E8u); -#endif - if (psx_delay_BFC257E4) { - psx_delay_BFC257E4 = 0; - cpu->gpr[31] = 0x8003D7ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D884u); - cpu->pc = 0x8003D884u; return; - } -label_BFC257EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC257ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC257ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7ECu); -#endif - /* 0xBFC257EC: 8E250000 lw $a1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D7ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } - PGXP_LOAD(0x8E250000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC257F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC257F4: 00055602 srl $t2, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[5] >> 24u; - PGXP_ALU(0x00055602u, cpu->gpr[10], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC257F8: 020A8021 addu $s0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC257FC: 00055A00 sll $t3, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[11] = cpu->gpr[5] << 8u; - PGXP_ALU(0x00055A00u, cpu->gpr[11], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D7FCu); -#endif -label_BFC25800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC25800: 000B6202 srl $t4, $t3, 8 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] >> 8u; - PGXP_ALU(0x000B6202u, cpu->gpr[12], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC25804: 128C000E beq $s4, $t4, 0xBFC25840 */ - uint32_t psx_brA_BFC25804 = cpu->gpr[20]; uint32_t psx_brB_BFC25804 = cpu->gpr[12]; - psx_taken_BFC25804 = (psx_brA_BFC25804 == psx_brB_BFC25804); - psx_delay_BFC25804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D808u); -#endif - if (psx_delay_BFC25804) { - psx_delay_BFC25804 = 0; - if (psx_taken_BFC25804) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D840u); - goto label_BFC25840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D80Cu); - } -label_BFC2580C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2580Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2580Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D80Cu); -#endif - /* 0xBFC2580C: 8E420000 lw $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D80Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } - PGXP_LOAD(0x8E420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC25810: 00106880 sll $t5, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00106880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x86000u); -#endif - /* 0xBFC25814: 026D7021 addu $t6, $s3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[19] + cpu->gpr[13]; - PGXP_ALU(0x026D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC25818: 01C27826 xor $t7, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] ^ cpu->gpr[2]; - PGXP_ALU(0x01C27826u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2581C: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC25820: 0018CA02 srl $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 8u; - PGXP_ALU(0x0018CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC25824: 03224026 xor $t0, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[25] ^ cpu->gpr[2]; - PGXP_ALU(0x03224026u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC25828: AE480000 sw $t0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D828u); return; } g_debug_last_store_pc = 0x8003D828u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAE480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D828u); -#endif - /* 0xBFC2582C: 8E310000 lw $s1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D82Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E310000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25830: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC25834: 00118A00 sll $s1, $s1, 8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 8u; - PGXP_ALU(0x00118A00u, cpu->gpr[17], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25838: 1000FFD3 beq $zero, $zero, 0xBFC25788 */ - uint32_t psx_brA_BFC25838 = cpu->gpr[0]; uint32_t psx_brB_BFC25838 = cpu->gpr[0]; - psx_taken_BFC25838 = (psx_brA_BFC25838 == psx_brB_BFC25838); - psx_delay_BFC25838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2583C: 00118A02 srl $s1, $s1, 8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] >> 8u; - PGXP_ALU(0x00118A02u, cpu->gpr[17], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D83Cu); -#endif - if (psx_delay_BFC25838) { - psx_delay_BFC25838 = 0; - if (psx_taken_BFC25838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D788u); - goto label_BFC25788; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D840u); - } -label_BFC25840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D840u); -#endif - /* 0xBFC25840: 8E490000 lw $t1, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D840u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40000u); } - PGXP_LOAD(0x8E490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25844: 3C01FF00 lui $at, 0xFF00 */ - cpu->gpr[1] = 0xFF000000u; - PGXP_ALU(0x3C01FF00u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100600u); -#endif - /* 0xBFC25848: 01345024 and $t2, $t1, $s4 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[20]; - PGXP_ALU(0x01345024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC2584C: AE4A0000 sw $t2, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D84Cu); return; } g_debug_last_store_pc = 0x8003D84Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAE4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D850u); -#endif - /* 0xBFC25850: 8E4B0000 lw $t3, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D850u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40000u); } - PGXP_LOAD(0x8E4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25854: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1802u); -#endif - /* 0xBFC25858: 01616024 and $t4, $t3, $at */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[1]; - PGXP_ALU(0x01616024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103000u); -#endif - /* 0xBFC2585C: 028C6825 or $t5, $s4, $t4 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[20] | cpu->gpr[12]; - PGXP_ALU(0x028C6825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000u); -#endif - /* 0xBFC25860: AE4D0000 sw $t5, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D860u); return; } g_debug_last_store_pc = 0x8003D860u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D860u); -#endif - /* 0xBFC25864: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D864u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D864u); -#endif - /* 0xBFC25868: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D868u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D868u); -#endif - /* 0xBFC2586C: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D86Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D870u); -#endif - /* 0xBFC25870: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D870u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D870u); -#endif - /* 0xBFC25874: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D874u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D874u); -#endif - /* 0xBFC25878: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D878u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2587C: 03E00008 jr $ra */ - psx_delay_BFC2587C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25880: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D880u); -#endif - if (psx_delay_BFC2587C) { - psx_delay_BFC2587C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25884(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25884u); - int psx_delay_BFC25888 = 0; - int psx_taken_BFC25888 = 0; - int psx_delay_BFC258A4 = 0; - int psx_taken_BFC258A4 = 0; - int psx_delay_BFC258AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25890u: goto label_BFC25890; - case 0xBFC258ACu: goto label_BFC258AC; - default: break; - } - } -label_BFC25884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC25884: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25888: 10400008 beq $v0, $zero, 0xBFC258AC */ - uint32_t psx_brA_BFC25888 = cpu->gpr[2]; uint32_t psx_brB_BFC25888 = cpu->gpr[0]; - psx_taken_BFC25888 = (psx_brA_BFC25888 == psx_brB_BFC25888); - psx_delay_BFC25888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2588C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D88Cu); -#endif - if (psx_delay_BFC25888) { - psx_delay_BFC25888 = 0; - if (psx_taken_BFC25888) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D8ACu); - goto label_BFC258AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D890u); - } -label_BFC25890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D890u); -#endif - /* 0xBFC25890: 8CAE0000 lw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D890u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC25894: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC25898: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2589C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC258A0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC258A4: 1440FFFA bne $v0, $zero, 0xBFC25890 */ - uint32_t psx_brA_BFC258A4 = cpu->gpr[2]; uint32_t psx_brB_BFC258A4 = cpu->gpr[0]; - psx_taken_BFC258A4 = (psx_brA_BFC258A4 != psx_brB_BFC258A4); - psx_delay_BFC258A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC258A8: AC8EFFFC sw $t6, -4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D8A8u); return; } g_debug_last_store_pc = 0x8003D8A8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D8A8u); -#endif - if (psx_delay_BFC258A4) { - psx_delay_BFC258A4 = 0; - if (psx_taken_BFC258A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D890u); - goto label_BFC25890; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D8ACu); - } -label_BFC258AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC258ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC258ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC258AC: 03E00008 jr $ra */ - psx_delay_BFC258AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC258B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D8B0u); -#endif - if (psx_delay_BFC258AC) { - psx_delay_BFC258AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2592C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2592Cu); - int psx_delay_BFC2593C = 0; - int psx_taken_BFC2593C = 0; - int psx_delay_BFC25944 = 0; - int psx_taken_BFC25944 = 0; - int psx_delay_BFC2595C = 0; - int psx_taken_BFC2595C = 0; - int psx_delay_BFC25978 = 0; - int psx_taken_BFC25978 = 0; - int psx_delay_BFC25980 = 0; - int psx_taken_BFC25980 = 0; - int psx_delay_BFC25998 = 0; - int psx_taken_BFC25998 = 0; - int psx_delay_BFC259B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25944u: goto label_BFC25944; - case 0xBFC2594Cu: goto label_BFC2594C; - case 0xBFC25964u: goto label_BFC25964; - case 0xBFC25968u: goto label_BFC25968; - case 0xBFC25980u: goto label_BFC25980; - case 0xBFC25988u: goto label_BFC25988; - case 0xBFC259A0u: goto label_BFC259A0; - case 0xBFC259A4u: goto label_BFC259A4; - default: break; - } - } -label_BFC2592C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2592Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2592C: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D930u); -#endif - /* 0xBFC25930: 8C426EE4 lw $v0, 28388($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28388; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28388)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D930u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426EE4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25934: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC25938: 0082082A slt $at, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0082082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2593C: 10200003 beq $at, $zero, 0xBFC2594C */ - uint32_t psx_brA_BFC2593C = cpu->gpr[1]; uint32_t psx_brB_BFC2593C = cpu->gpr[0]; - psx_taken_BFC2593C = (psx_brA_BFC2593C == psx_brB_BFC2593C); - psx_delay_BFC2593C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D940u); -#endif - if (psx_delay_BFC2593C) { - psx_delay_BFC2593C = 0; - if (psx_taken_BFC2593C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D94Cu); - goto label_BFC2594C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D944u); - } -label_BFC25944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25944: 10000008 beq $zero, $zero, 0xBFC25968 */ - uint32_t psx_brA_BFC25944 = cpu->gpr[0]; uint32_t psx_brB_BFC25944 = cpu->gpr[0]; - psx_taken_BFC25944 = (psx_brA_BFC25944 == psx_brB_BFC25944); - psx_delay_BFC25944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25948: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D948u); -#endif - if (psx_delay_BFC25944) { - psx_delay_BFC25944 = 0; - if (psx_taken_BFC25944) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D968u); - goto label_BFC25968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D94Cu); - } -label_BFC2594C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2594Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2594C: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D950u); -#endif - /* 0xBFC25950: 8C426EEC lw $v0, 28396($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D950u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426EECu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC25958: 0044082A slt $at, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0044082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2595C: 10200002 beq $at, $zero, 0xBFC25968 */ - uint32_t psx_brA_BFC2595C = cpu->gpr[1]; uint32_t psx_brB_BFC2595C = cpu->gpr[0]; - psx_taken_BFC2595C = (psx_brA_BFC2595C == psx_brB_BFC2595C); - psx_delay_BFC2595C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25960: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D960u); -#endif - if (psx_delay_BFC2595C) { - psx_delay_BFC2595C = 0; - if (psx_taken_BFC2595C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D968u); - goto label_BFC25968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D964u); - } -label_BFC25964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC25964: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D964u); -#endif -label_BFC25968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC25968: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D968u); -#endif - /* 0xBFC2596C: 8C426EE8 lw $v0, 28392($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D96Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426EE8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC25974: 00A2082A slt $at, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00A2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25978: 10200003 beq $at, $zero, 0xBFC25988 */ - uint32_t psx_brA_BFC25978 = cpu->gpr[1]; uint32_t psx_brB_BFC25978 = cpu->gpr[0]; - psx_taken_BFC25978 = (psx_brA_BFC25978 == psx_brB_BFC25978); - psx_delay_BFC25978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2597C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D97Cu); -#endif - if (psx_delay_BFC25978) { - psx_delay_BFC25978 = 0; - if (psx_taken_BFC25978) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D988u); - goto label_BFC25988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D980u); - } -label_BFC25980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25980: 10000008 beq $zero, $zero, 0xBFC259A4 */ - uint32_t psx_brA_BFC25980 = cpu->gpr[0]; uint32_t psx_brB_BFC25980 = cpu->gpr[0]; - psx_taken_BFC25980 = (psx_brA_BFC25980 == psx_brB_BFC25980); - psx_delay_BFC25980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC25984: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D984u); -#endif - if (psx_delay_BFC25980) { - psx_delay_BFC25980 = 0; - if (psx_taken_BFC25980) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D9A4u); - goto label_BFC259A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D988u); - } -label_BFC25988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC25988: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D988u); -#endif - /* 0xBFC2598C: 8C426EF0 lw $v0, 28400($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28400; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D98Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426EF0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC25994: 0045082A slt $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25998: 10200002 beq $at, $zero, 0xBFC259A4 */ - uint32_t psx_brA_BFC25998 = cpu->gpr[1]; uint32_t psx_brB_BFC25998 = cpu->gpr[0]; - psx_taken_BFC25998 = (psx_brA_BFC25998 == psx_brB_BFC25998); - psx_delay_BFC25998 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2599C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D99Cu); -#endif - if (psx_delay_BFC25998) { - psx_delay_BFC25998 = 0; - if (psx_taken_BFC25998) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D9A4u); - goto label_BFC259A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D9A0u); - } -label_BFC259A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC259A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC259A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC259A0: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9A0u); -#endif -label_BFC259A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC259A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC259A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC259A4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC259A8: AC246EF4 sw $a0, 28404($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28404; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D9A8u); return; } g_debug_last_store_pc = 0x8003D9A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246EF4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC259AC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC259B0: 03E00008 jr $ra */ - psx_delay_BFC259B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC259B4: AC256EF8 sw $a1, 28408($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D9B4u); return; } g_debug_last_store_pc = 0x8003D9B4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC256EF8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9B4u); -#endif - if (psx_delay_BFC259B0) { - psx_delay_BFC259B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC259D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC259D8u); - int psx_delay_BFC259FC = 0; - int psx_taken_BFC259FC = 0; - int psx_delay_BFC25A04 = 0; - int psx_delay_BFC25A10 = 0; - int psx_taken_BFC25A10 = 0; - int psx_delay_BFC25A1C = 0; - int psx_taken_BFC25A1C = 0; - int psx_delay_BFC25A24 = 0; - int psx_taken_BFC25A24 = 0; - int psx_delay_BFC25A58 = 0; - int psx_taken_BFC25A58 = 0; - int psx_delay_BFC25A80 = 0; - int psx_taken_BFC25A80 = 0; - int psx_delay_BFC25A98 = 0; - int psx_taken_BFC25A98 = 0; - int psx_delay_BFC25AC0 = 0; - int psx_taken_BFC25AC0 = 0; - int psx_delay_BFC25AE4 = 0; - int psx_taken_BFC25AE4 = 0; - int psx_delay_BFC25AF4 = 0; - int psx_taken_BFC25AF4 = 0; - int psx_delay_BFC25AFC = 0; - int psx_taken_BFC25AFC = 0; - int psx_delay_BFC25B0C = 0; - int psx_taken_BFC25B0C = 0; - int psx_delay_BFC25B40 = 0; - int psx_taken_BFC25B40 = 0; - int psx_delay_BFC25B4C = 0; - int psx_taken_BFC25B4C = 0; - int psx_delay_BFC25B54 = 0; - int psx_taken_BFC25B54 = 0; - int psx_delay_BFC25B5C = 0; - int psx_taken_BFC25B5C = 0; - int psx_delay_BFC25B6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25A04u: goto label_BFC25A04; - case 0xBFC25A0Cu: goto label_BFC25A0C; - case 0xBFC25A18u: goto label_BFC25A18; - case 0xBFC25A24u: goto label_BFC25A24; - case 0xBFC25A2Cu: goto label_BFC25A2C; - case 0xBFC25A60u: goto label_BFC25A60; - case 0xBFC25A74u: goto label_BFC25A74; - case 0xBFC25A88u: goto label_BFC25A88; - case 0xBFC25AA0u: goto label_BFC25AA0; - case 0xBFC25AB4u: goto label_BFC25AB4; - case 0xBFC25AC8u: goto label_BFC25AC8; - case 0xBFC25AD4u: goto label_BFC25AD4; - case 0xBFC25AECu: goto label_BFC25AEC; - case 0xBFC25AFCu: goto label_BFC25AFC; - case 0xBFC25B04u: goto label_BFC25B04; - case 0xBFC25B14u: goto label_BFC25B14; - case 0xBFC25B48u: goto label_BFC25B48; - case 0xBFC25B54u: goto label_BFC25B54; - case 0xBFC25B5Cu: goto label_BFC25B5C; - case 0xBFC25B64u: goto label_BFC25B64; - case 0xBFC25B68u: goto label_BFC25B68; - case 0xBFC25B6Cu: goto label_BFC25B6C; - default: break; - } - } -label_BFC259D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC259D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC259D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC259D8: ACA00000 sw $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D9D8u); return; } g_debug_last_store_pc = 0x8003D9D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACA00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC259DC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003D9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC259E0: ACC00000 sw $zero, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D9E0u); return; } g_debug_last_store_pc = 0x8003D9E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC259E4: 25EF3E30 addiu $t7, $t7, 15920 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (15920)); - PGXP_ALU(0x25EF3E30u, cpu->gpr[15], _pgx1, 0x00003E30u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC259E8: 00047140 sll $t6, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00047140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC259EC: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003D9ECu); return; } g_debug_last_store_pc = 0x8003D9ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC259F0: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9F0u); -#endif - /* 0xBFC259F4: 90580000 lbu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 24, 0x4u); - PGXP_LOAD(0x90580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003D9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC259F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003D9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC259FC: 13000003 beq $t8, $zero, 0xBFC25A0C */ - uint32_t psx_brA_BFC259FC = cpu->gpr[24]; uint32_t psx_brB_BFC259FC = cpu->gpr[0]; - psx_taken_BFC259FC = (psx_brA_BFC259FC == psx_brB_BFC259FC); - psx_delay_BFC259FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA00u); -#endif - if (psx_delay_BFC259FC) { - psx_delay_BFC259FC = 0; - if (psx_taken_BFC259FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA0Cu); - goto label_BFC25A0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA04u); - } -label_BFC25A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25A04: 03E00008 jr $ra */ - psx_delay_BFC25A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25A08: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA08u); -#endif - if (psx_delay_BFC25A04) { - psx_delay_BFC25A04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC25A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA0Cu); -#endif - /* 0xBFC25A0C: 90440001 lbu $a0, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 4, 0x4u); - PGXP_LOAD(0x90440001u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A10: 1000004D beq $zero, $zero, 0xBFC25B48 */ - uint32_t psx_brA_BFC25A10 = cpu->gpr[0]; uint32_t psx_brB_BFC25A10 = cpu->gpr[0]; - psx_taken_BFC25A10 = (psx_brA_BFC25A10 == psx_brB_BFC25A10); - psx_delay_BFC25A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC25A14: 308300F0 andi $v1, $a0, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xF0u; - PGXP_ALU(0x308300F0u, cpu->gpr[3], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA14u); -#endif - if (psx_delay_BFC25A10) { - psx_delay_BFC25A10 = 0; - if (psx_taken_BFC25A10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB48u); - goto label_BFC25B48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA18u); - } -label_BFC25A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25A18: 24010012 addiu $at, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24010012u, cpu->gpr[1], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC25A1C: 10810003 beq $a0, $at, 0xBFC25A2C */ - uint32_t psx_brA_BFC25A1C = cpu->gpr[4]; uint32_t psx_brB_BFC25A1C = cpu->gpr[1]; - psx_taken_BFC25A1C = (psx_brA_BFC25A1C == psx_brB_BFC25A1C); - psx_delay_BFC25A1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA20u); -#endif - if (psx_delay_BFC25A1C) { - psx_delay_BFC25A1C = 0; - if (psx_taken_BFC25A1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA2Cu); - goto label_BFC25A2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA24u); - } -label_BFC25A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A24: 10000050 beq $zero, $zero, 0xBFC25B68 */ - uint32_t psx_brA_BFC25A24 = cpu->gpr[0]; uint32_t psx_brB_BFC25A24 = cpu->gpr[0]; - psx_taken_BFC25A24 = (psx_brA_BFC25A24 == psx_brB_BFC25A24); - psx_delay_BFC25A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC25A28: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA28u); -#endif - if (psx_delay_BFC25A24) { - psx_delay_BFC25A24 = 0; - if (psx_taken_BFC25A24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB68u); - goto label_BFC25B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA2Cu); - } -label_BFC25A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA2Cu); -#endif - /* 0xBFC25A2C: 80590004 lb $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 25, 0x4u); - PGXP_LOAD(0x80590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC25A34: ACB90000 sw $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA34u); return; } g_debug_last_store_pc = 0x8003DA34u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACB90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA34u); -#endif - /* 0xBFC25A38: 80480005 lb $t0, 5($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 5; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (5)), 8, 0x4u); - PGXP_LOAD(0x80480005u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC25A40: ACC80000 sw $t0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA40u); return; } g_debug_last_store_pc = 0x8003DA40u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACC80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC25A44: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA44u); return; } g_debug_last_store_pc = 0x8003DA44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA44u); -#endif - /* 0xBFC25A48: 90490003 lbu $t1, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 9, 0x4u); - PGXP_LOAD(0x90490003u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC25A50: 01205027 nor $t2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]); - PGXP_ALU(0x01205027u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC25A54: 314B0008 andi $t3, $t2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u; - PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC25A58: 11600006 beq $t3, $zero, 0xBFC25A74 */ - uint32_t psx_brA_BFC25A58 = cpu->gpr[11]; uint32_t psx_brB_BFC25A58 = cpu->gpr[0]; - psx_taken_BFC25A58 = (psx_brA_BFC25A58 == psx_brB_BFC25A58); - psx_delay_BFC25A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA5Cu); -#endif - if (psx_delay_BFC25A58) { - psx_delay_BFC25A58 = 0; - if (psx_taken_BFC25A58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA74u); - goto label_BFC25A74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA60u); - } -label_BFC25A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA60u); -#endif - /* 0xBFC25A60: 8CEC0000 lw $t4, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA60u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80u); } - PGXP_LOAD(0x8CEC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25A64: 3C010020 lui $at, 0x20 */ - cpu->gpr[1] = 0x00200000u; - PGXP_ALU(0x3C010020u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25A68: 34210020 ori $at, $at, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20u; - PGXP_ALU(0x34210020u, cpu->gpr[1], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002u); -#endif - /* 0xBFC25A6C: 01816825 or $t5, $t4, $at */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[12] | cpu->gpr[1]; - PGXP_ALU(0x01816825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080u); -#endif - /* 0xBFC25A70: ACED0000 sw $t5, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA70u); return; } g_debug_last_store_pc = 0x8003DA70u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xACED0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA70u); -#endif -label_BFC25A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25A74: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DA74u); -#endif - /* 0xBFC25A78: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DA78u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25A7C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC25A80: 15C40014 bne $t6, $a0, 0xBFC25AD4 */ - uint32_t psx_brA_BFC25A80 = cpu->gpr[14]; uint32_t psx_brB_BFC25A80 = cpu->gpr[4]; - psx_taken_BFC25A80 = (psx_brA_BFC25A80 != psx_brB_BFC25A80); - psx_delay_BFC25A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA84u); -#endif - if (psx_delay_BFC25A80) { - psx_delay_BFC25A80 = 0; - if (psx_taken_BFC25A80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAD4u); - goto label_BFC25AD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA88u); - } -label_BFC25A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA88u); -#endif - /* 0xBFC25A88: 904F0003 lbu $t7, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 15, 0x4u); - PGXP_LOAD(0x904F0003u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008001u); -#endif - /* 0xBFC25A90: 01E0C027 nor $t8, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = ~(cpu->gpr[15] | cpu->gpr[0]); - PGXP_ALU(0x01E0C027u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC25A94: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC25A98: 13200006 beq $t9, $zero, 0xBFC25AB4 */ - uint32_t psx_brA_BFC25A98 = cpu->gpr[25]; uint32_t psx_brB_BFC25A98 = cpu->gpr[0]; - psx_taken_BFC25A98 = (psx_brA_BFC25A98 == psx_brB_BFC25A98); - psx_delay_BFC25A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25A9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DA9Cu); -#endif - if (psx_delay_BFC25A98) { - psx_delay_BFC25A98 = 0; - if (psx_taken_BFC25A98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAB4u); - goto label_BFC25AB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAA0u); - } -label_BFC25AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAA0u); -#endif - /* 0xBFC25AA0: 8CE80000 lw $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DAA0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x80u); } - PGXP_LOAD(0x8CE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25AA4: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25AA8: 34210800 ori $at, $at, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x800u; - PGXP_ALU(0x34210800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC25AAC: 01014825 or $t1, $t0, $at */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[8] | cpu->gpr[1]; - PGXP_ALU(0x01014825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC25AB0: ACE90000 sw $t1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DAB0u); return; } g_debug_last_store_pc = 0x8003DAB0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAB0u); -#endif -label_BFC25AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAB4u); -#endif - /* 0xBFC25AB4: 8CEA0000 lw $t2, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DAB4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x80u); } - PGXP_LOAD(0x8CEA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25AB8: 24010820 addiu $at, $zero, 2080 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2080)); - PGXP_ALU(0x24010820u, cpu->gpr[1], _pgx1, 0x00000820u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC25ABC: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC25AC0: 15610004 bne $t3, $at, 0xBFC25AD4 */ - uint32_t psx_brA_BFC25AC0 = cpu->gpr[11]; uint32_t psx_brB_BFC25AC0 = cpu->gpr[1]; - psx_taken_BFC25AC0 = (psx_brA_BFC25AC0 != psx_brB_BFC25AC0); - psx_delay_BFC25AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DAC4u); -#endif - if (psx_delay_BFC25AC0) { - psx_delay_BFC25AC0 = 0; - if (psx_taken_BFC25AC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAD4u); - goto label_BFC25AD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAC8u); - } -label_BFC25AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25AC8: 3C0C000F lui $t4, 0xF */ - cpu->gpr[12] = 0x000F0000u; - PGXP_ALU(0x3C0C000Fu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25ACC: 358C000F ori $t4, $t4, 0xF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] | 0xFu; - PGXP_ALU(0x358C000Fu, cpu->gpr[12], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC25AD0: ACEC0000 sw $t4, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DAD0u); return; } g_debug_last_store_pc = 0x8003DAD0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xACEC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAD0u); -#endif -label_BFC25AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC25AD4: 3C0D8006 lui $t5, 0x8006 */ - cpu->gpr[13] = 0x80060000u; - PGXP_ALU(0x3C0D8006u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DAD4u); -#endif - /* 0xBFC25AD8: 90430001 lbu $v1, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 3, 0x4u); - PGXP_LOAD(0x90430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAD8u); -#endif - /* 0xBFC25ADC: 8DAD6EB8 lw $t5, 28344($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 28344; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DADCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD6EB8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC25AE0: 306300F0 andi $v1, $v1, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u; - PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC25AE4: 15A40021 bne $t5, $a0, 0xBFC25B6C */ - uint32_t psx_brA_BFC25AE4 = cpu->gpr[13]; uint32_t psx_brB_BFC25AE4 = cpu->gpr[4]; - psx_taken_BFC25AE4 = (psx_brA_BFC25AE4 != psx_brB_BFC25AE4); - psx_delay_BFC25AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC25AE8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAE8u); -#endif - if (psx_delay_BFC25AE4) { - psx_delay_BFC25AE4 = 0; - if (psx_taken_BFC25AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB6Cu); - goto label_BFC25B6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAECu); - } -label_BFC25AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAECu); -#endif - /* 0xBFC25AEC: 8CEE0000 lw $t6, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DAECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x8CEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25AF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC25AF4: 15C00003 bne $t6, $zero, 0xBFC25B04 */ - uint32_t psx_brA_BFC25AF4 = cpu->gpr[14]; uint32_t psx_brB_BFC25AF4 = cpu->gpr[0]; - psx_taken_BFC25AF4 = (psx_brA_BFC25AF4 != psx_brB_BFC25AF4); - psx_delay_BFC25AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25AF8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DAF8u); -#endif - if (psx_delay_BFC25AF4) { - psx_delay_BFC25AF4 = 0; - if (psx_taken_BFC25AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB04u); - goto label_BFC25B04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DAFCu); - } -label_BFC25AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25AFC: 1000001A beq $zero, $zero, 0xBFC25B68 */ - uint32_t psx_brA_BFC25AFC = cpu->gpr[0]; uint32_t psx_brB_BFC25AFC = cpu->gpr[0]; - psx_taken_BFC25AFC = (psx_brA_BFC25AFC == psx_brB_BFC25AFC); - psx_delay_BFC25AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25B00: AC206EB8 sw $zero, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB00u); return; } g_debug_last_store_pc = 0x8003DB00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB00u); -#endif - if (psx_delay_BFC25AFC) { - psx_delay_BFC25AFC = 0; - if (psx_taken_BFC25AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB68u); - goto label_BFC25B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB04u); - } -label_BFC25B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC25B04: ACE00000 sw $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB04u); return; } g_debug_last_store_pc = 0x8003DB04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACE00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25B08: ACA00000 sw $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB08u); return; } g_debug_last_store_pc = 0x8003DB08u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACA00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25B0C: 10000016 beq $zero, $zero, 0xBFC25B68 */ - uint32_t psx_brA_BFC25B0C = cpu->gpr[0]; uint32_t psx_brB_BFC25B0C = cpu->gpr[0]; - psx_taken_BFC25B0C = (psx_brA_BFC25B0C == psx_brB_BFC25B0C); - psx_delay_BFC25B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC25B10: ACC00000 sw $zero, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB10u); return; } g_debug_last_store_pc = 0x8003DB10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB10u); -#endif - if (psx_delay_BFC25B0C) { - psx_delay_BFC25B0C = 0; - if (psx_taken_BFC25B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB68u); - goto label_BFC25B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB14u); - } -label_BFC25B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB14u); -#endif - /* 0xBFC25B14: 904F0002 lbu $t7, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 15, 0x4u); - PGXP_LOAD(0x904F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB14u); -#endif - /* 0xBFC25B18: 90590003 lbu $t9, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 25, 0x4u); - PGXP_LOAD(0x90590003u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC25B1C: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC25B20: 03194025 or $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03194025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC25B24: ACE80000 sw $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB24u); return; } g_debug_last_store_pc = 0x8003DB24u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB24u); -#endif - /* 0xBFC25B28: 8CE90000 lw $t1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB28u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x80u); } - PGXP_LOAD(0x8CE90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC25B30: 01205027 nor $t2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = ~(cpu->gpr[9] | cpu->gpr[0]); - PGXP_ALU(0x01205027u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC25B34: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC25B38: ACEB0000 sw $t3, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB38u); return; } g_debug_last_store_pc = 0x8003DB38u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACEB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB38u); -#endif - /* 0xBFC25B3C: 90430001 lbu $v1, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 3, 0x4u); - PGXP_LOAD(0x90430001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25B40: 10000009 beq $zero, $zero, 0xBFC25B68 */ - uint32_t psx_brA_BFC25B40 = cpu->gpr[0]; uint32_t psx_brB_BFC25B40 = cpu->gpr[0]; - psx_taken_BFC25B40 = (psx_brA_BFC25B40 == psx_brB_BFC25B40); - psx_delay_BFC25B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC25B44: 306300F0 andi $v1, $v1, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xF0u; - PGXP_ALU(0x306300F0u, cpu->gpr[3], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB44u); -#endif - if (psx_delay_BFC25B40) { - psx_delay_BFC25B40 = 0; - if (psx_taken_BFC25B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB68u); - goto label_BFC25B68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB48u); - } -label_BFC25B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25B48: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC25B4C: 1061FFB2 beq $v1, $at, 0xBFC25A18 */ - uint32_t psx_brA_BFC25B4C = cpu->gpr[3]; uint32_t psx_brB_BFC25B4C = cpu->gpr[1]; - psx_taken_BFC25B4C = (psx_brA_BFC25B4C == psx_brB_BFC25B4C); - psx_delay_BFC25B4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25B50: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB50u); -#endif - if (psx_delay_BFC25B4C) { - psx_delay_BFC25B4C = 0; - if (psx_taken_BFC25B4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DA18u); - goto label_BFC25A18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB54u); - } -label_BFC25B54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC25B54: 1061FFEF beq $v1, $at, 0xBFC25B14 */ - uint32_t psx_brA_BFC25B54 = cpu->gpr[3]; uint32_t psx_brB_BFC25B54 = cpu->gpr[1]; - psx_taken_BFC25B54 = (psx_brA_BFC25B54 == psx_brB_BFC25B54); - psx_delay_BFC25B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25B58: 24010040 addiu $at, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24010040u, cpu->gpr[1], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB58u); -#endif - if (psx_delay_BFC25B54) { - psx_delay_BFC25B54 = 0; - if (psx_taken_BFC25B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB14u); - goto label_BFC25B14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB5Cu); - } -label_BFC25B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC25B5C: 1061FFED beq $v1, $at, 0xBFC25B14 */ - uint32_t psx_brA_BFC25B5C = cpu->gpr[3]; uint32_t psx_brB_BFC25B5C = cpu->gpr[1]; - psx_taken_BFC25B5C = (psx_brA_BFC25B5C == psx_brB_BFC25B5C); - psx_delay_BFC25B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25B60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DB60u); -#endif - if (psx_delay_BFC25B5C) { - psx_delay_BFC25B5C = 0; - if (psx_taken_BFC25B5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB14u); - goto label_BFC25B14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB64u); - } -label_BFC25B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC25B64: 2403FFFF addiu $v1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB64u); -#endif -label_BFC25B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC25B68: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB68u); -#endif -label_BFC25B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25B6C: 03E00008 jr $ra */ - psx_delay_BFC25B6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25B70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DB70u); -#endif - if (psx_delay_BFC25B6C) { - psx_delay_BFC25B6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25B74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25B74u); - int psx_delay_BFC25B94 = 0; - int psx_delay_BFC25BA0 = 0; - int psx_taken_BFC25BA0 = 0; - int psx_delay_BFC25BB4 = 0; - int psx_delay_BFC25BCC = 0; - int psx_taken_BFC25BCC = 0; - int psx_delay_BFC25BF4 = 0; - int psx_delay_BFC25C3C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25B9Cu: goto label_BFC25B9C; - case 0xBFC25BA8u: goto label_BFC25BA8; - case 0xBFC25BBCu: goto label_BFC25BBC; - case 0xBFC25BC0u: goto label_BFC25BC0; - case 0xBFC25BD4u: goto label_BFC25BD4; - case 0xBFC25BFCu: goto label_BFC25BFC; - case 0xBFC25C38u: goto label_BFC25C38; - default: break; - } - } -label_BFC25B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25B74: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25B78: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB78u); return; } g_debug_last_store_pc = 0x8003DB78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC25B7C: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB7Cu); return; } g_debug_last_store_pc = 0x8003DB7Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC25B80: AFA5004C sw $a1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB80u); return; } g_debug_last_store_pc = 0x8003DB80u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5004Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC25B84: AFA60050 sw $a2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DB84u); return; } g_debug_last_store_pc = 0x8003DB84u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60050u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC25B88: 27A60040 addiu $a2, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A60040u, cpu->gpr[6], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC25B8C: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25B90: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25B94: 0C00F676 jal 0xB003D9D8 */ - cpu->gpr[31] = 0x8003DB9Cu; /* jal link before delay slot */ - psx_delay_BFC25B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC25B98: 27A70034 addiu $a3, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A70034u, cpu->gpr[7], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB98u); -#endif - if (psx_delay_BFC25B94) { - psx_delay_BFC25B94 = 0; - cpu->gpr[31] = 0x8003DB9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D9D8u); - cpu->pc = 0x8003D9D8u; return; - } -label_BFC25B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25B9C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC25BA0: 14410007 bne $v0, $at, 0xBFC25BC0 */ - uint32_t psx_brA_BFC25BA0 = cpu->gpr[2]; uint32_t psx_brB_BFC25BA0 = cpu->gpr[1]; - psx_taken_BFC25BA0 = (psx_brA_BFC25BA0 != psx_brB_BFC25BA0); - psx_delay_BFC25BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC25BA4: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBA4u); -#endif - if (psx_delay_BFC25BA0) { - psx_delay_BFC25BA0 = 0; - if (psx_taken_BFC25BA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DBC0u); - goto label_BFC25BC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DBA8u); - } -label_BFC25BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25BA8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC25BAC: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC25BB0: 27A60040 addiu $a2, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A60040u, cpu->gpr[6], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25BB4: 0C00F676 jal 0xB003D9D8 */ - cpu->gpr[31] = 0x8003DBBCu; /* jal link before delay slot */ - psx_delay_BFC25BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC25BB8: 27A70034 addiu $a3, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A70034u, cpu->gpr[7], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBB8u); -#endif - if (psx_delay_BFC25BB4) { - psx_delay_BFC25BB4 = 0; - cpu->gpr[31] = 0x8003DBBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D9D8u); - cpu->pc = 0x8003D9D8u; return; - } -label_BFC25BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC25BBC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBBCu); -#endif -label_BFC25BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25BC0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DBC0u); -#endif - /* 0xBFC25BC4: 8DCE9EC8 lw $t6, -24888($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBC4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EC8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC25BCC: 15C0001A bne $t6, $zero, 0xBFC25C38 */ - uint32_t psx_brA_BFC25BCC = cpu->gpr[14]; uint32_t psx_brB_BFC25BCC = cpu->gpr[0]; - psx_taken_BFC25BCC = (psx_brA_BFC25BCC != psx_brB_BFC25BCC); - psx_delay_BFC25BCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBD0u); -#endif - /* 0xBFC25BD0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBD0u); -#endif - if (psx_delay_BFC25BCC) { - psx_delay_BFC25BCC = 0; - if (psx_taken_BFC25BCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC38u); - goto label_BFC25C38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DBD4u); - } -label_BFC25BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25BD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25BD4: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25BD8: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DBD8u); -#endif - /* 0xBFC25BDC: 8F396EF8 lw $t9, 28408($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 28408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBDCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396EF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBE0u); -#endif - /* 0xBFC25BE0: 8DEF6EF4 lw $t7, 28404($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 28404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6EF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBE0u); -#endif - /* 0xBFC25BE4: 8FB80044 lw $t8, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBE4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80044u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBE4u); -#endif - /* 0xBFC25BE8: 8FA80040 lw $t0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBE8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80040u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC25BEC: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DBECu); return; } g_debug_last_store_pc = 0x8003DBECu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC25BF0: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25BF4: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003DBFCu; /* jal link before delay slot */ - psx_delay_BFC25BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000120u); -#endif - /* 0xBFC25BF8: 03282821 addu $a1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DBF8u); -#endif - if (psx_delay_BFC25BF4) { - psx_delay_BFC25BF4 = 0; - cpu->gpr[31] = 0x8003DBFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC25BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25BFC: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC00u); -#endif - /* 0xBFC25C00: 8D296EF4 lw $t1, 28404($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 28404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC00u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D296EF4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC00u); -#endif - /* 0xBFC25C04: 8FAA0048 lw $t2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC04u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0048u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC04u); -#endif - /* 0xBFC25C08: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC08u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC25C0C: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC0Cu); return; } g_debug_last_store_pc = 0x8003DC0Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC25C10: 3C0B8006 lui $t3, 0x8006 */ - cpu->gpr[11] = 0x80060000u; - PGXP_ALU(0x3C0B8006u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DC10u); -#endif - /* 0xBFC25C14: 8D6B6EF8 lw $t3, 28408($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 28408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC14u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B6EF8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC14u); -#endif - /* 0xBFC25C18: 8FAC004C lw $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC18u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC25C20: AD8B0000 sw $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC20u); return; } g_debug_last_store_pc = 0x8003DC20u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC20u); -#endif - /* 0xBFC25C24: 8FAE0050 lw $t6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC24u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0050u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC24u); -#endif - /* 0xBFC25C28: 8FAD0034 lw $t5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC28u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC25C30: ADCD0000 sw $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC30u); return; } g_debug_last_store_pc = 0x8003DC30u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC30u); -#endif - /* 0xBFC25C34: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC34u); -#endif -label_BFC25C38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25C38: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C3C: 03E00008 jr $ra */ - psx_delay_BFC25C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC25C40: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC40u); -#endif - if (psx_delay_BFC25C3C) { - psx_delay_BFC25C3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25C74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25C74u); - int psx_delay_BFC25C74 = 0; -label_BFC25C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C74: 03E00008 jr $ra */ - psx_delay_BFC25C74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC78u); -#endif - if (psx_delay_BFC25C74) { - psx_delay_BFC25C74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25C7C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25C7Cu); - int psx_delay_BFC25C7C = 0; -label_BFC25C7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C7C: 03E00008 jr $ra */ - psx_delay_BFC25C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC80u); -#endif - if (psx_delay_BFC25C7C) { - psx_delay_BFC25C7C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25C84(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25C84u); - int psx_delay_BFC25C84 = 0; -label_BFC25C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C84: 03E00008 jr $ra */ - psx_delay_BFC25C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC88u); -#endif - if (psx_delay_BFC25C84) { - psx_delay_BFC25C84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25C8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25C8Cu); - int psx_delay_BFC25C8C = 0; -label_BFC25C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C8C: 03E00008 jr $ra */ - psx_delay_BFC25C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC25C90: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DC90u); return; } g_debug_last_store_pc = 0x8003DC90u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DC90u); -#endif - if (psx_delay_BFC25C8C) { - psx_delay_BFC25C8C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25C94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25C94u); - int psx_delay_BFC25C94 = 0; -label_BFC25C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25C94: 03E00008 jr $ra */ - psx_delay_BFC25C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DC98u); -#endif - if (psx_delay_BFC25C94) { - psx_delay_BFC25C94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25CB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25CB0u); - int psx_delay_BFC25CB0 = 0; -label_BFC25CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25CB0: 03E00008 jr $ra */ - psx_delay_BFC25CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC25CB4: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCB4u); return; } g_debug_last_store_pc = 0x8003DCB4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCB4u); -#endif - if (psx_delay_BFC25CB0) { - psx_delay_BFC25CB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25CB8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25CB8u); - int psx_delay_BFC25CB8 = 0; -label_BFC25CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25CB8: 03E00008 jr $ra */ - psx_delay_BFC25CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25CBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DCBCu); -#endif - if (psx_delay_BFC25CB8) { - psx_delay_BFC25CB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25CC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25CC0u); - int psx_delay_BFC25CE0 = 0; - int psx_delay_BFC25CFC = 0; - int psx_taken_BFC25CFC = 0; - int psx_delay_BFC25D10 = 0; - int psx_taken_BFC25D10 = 0; - int psx_delay_BFC25D18 = 0; - int psx_taken_BFC25D18 = 0; - int psx_delay_BFC25D4C = 0; - int psx_delay_BFC25D74 = 0; - int psx_delay_BFC25D84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25CE8u: goto label_BFC25CE8; - case 0xBFC25D04u: goto label_BFC25D04; - case 0xBFC25D18u: goto label_BFC25D18; - case 0xBFC25D20u: goto label_BFC25D20; - case 0xBFC25D54u: goto label_BFC25D54; - case 0xBFC25D7Cu: goto label_BFC25D7C; - case 0xBFC25D80u: goto label_BFC25D80; - default: break; - } - } -label_BFC25CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25CC0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC25CC4: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCC4u); return; } g_debug_last_store_pc = 0x8003DCC4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC25CC8: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCC8u); return; } g_debug_last_store_pc = 0x8003DCC8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC25CCC: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25CD0: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25CD4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCD4u); return; } g_debug_last_store_pc = 0x8003DCD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCD4u); -#endif - /* 0xBFC25CD8: 8C846EF4 lw $a0, 28404($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCD8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846EF4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCD8u); -#endif - /* 0xBFC25CDC: 8CA56EF8 lw $a1, 28408($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 28408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCDCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA56EF8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25CE0: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003DCE8u; /* jal link before delay slot */ - psx_delay_BFC25CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25CE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DCE4u); -#endif - if (psx_delay_BFC25CE0) { - psx_delay_BFC25CE0 = 0; - cpu->gpr[31] = 0x8003DCE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC25CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCE8u); -#endif - /* 0xBFC25CE8: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCE8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC25CEC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC25CF0: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DCF0u); -#endif - /* 0xBFC25CF4: 8C426EF4 lw $v0, 28404($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCF4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426EF4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCF4u); -#endif - /* 0xBFC25CF8: 8C636EF8 lw $v1, 28408($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 28408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DCF8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C636EF8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25CFC: 14800006 bne $a0, $zero, 0xBFC25D18 */ - uint32_t psx_brA_BFC25CFC = cpu->gpr[4]; uint32_t psx_brB_BFC25CFC = cpu->gpr[0]; - psx_taken_BFC25CFC = (psx_brA_BFC25CFC != psx_brB_BFC25CFC); - psx_delay_BFC25CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25D00: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD00u); -#endif - if (psx_delay_BFC25CFC) { - psx_delay_BFC25CFC = 0; - if (psx_taken_BFC25CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD18u); - goto label_BFC25D18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD04u); - } -label_BFC25D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25D04: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DD04u); -#endif - /* 0xBFC25D08: 8DCE6EDC lw $t6, 28380($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 28380; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (28380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD08u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6EDCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25D0C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC25D10: 11C10003 beq $t6, $at, 0xBFC25D20 */ - uint32_t psx_brA_BFC25D10 = cpu->gpr[14]; uint32_t psx_brB_BFC25D10 = cpu->gpr[1]; - psx_taken_BFC25D10 = (psx_brA_BFC25D10 == psx_brB_BFC25D10); - psx_delay_BFC25D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25D14: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD14u); -#endif - if (psx_delay_BFC25D10) { - psx_delay_BFC25D10 = 0; - if (psx_taken_BFC25D10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD20u); - goto label_BFC25D20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD18u); - } -label_BFC25D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC25D18: 14810019 bne $a0, $at, 0xBFC25D80 */ - uint32_t psx_brA_BFC25D18 = cpu->gpr[4]; uint32_t psx_brB_BFC25D18 = cpu->gpr[1]; - psx_taken_BFC25D18 = (psx_brA_BFC25D18 != psx_brB_BFC25D18); - psx_delay_BFC25D18 = 1; - /* 0xBFC25D1C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD1Cu); -#endif - if (psx_delay_BFC25D18) { - psx_delay_BFC25D18 = 0; - if (psx_taken_BFC25D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD80u); - goto label_BFC25D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DD20u); - } -label_BFC25D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25D20: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DD20u); -#endif - /* 0xBFC25D24: 8DEF6EE0 lw $t7, 28384($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 28384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (28384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD24u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6EE0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25D28: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC25D2C: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC25D30: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC25D34: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25D38: 27393DC0 addiu $t9, $t9, 15808 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (15808)); - PGXP_ALU(0x27393DC0u, cpu->gpr[25], _pgx1, 0x00003DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC25D3C: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD40u); -#endif - /* 0xBFC25D40: 8488005A lh $t0, 90($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 90; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD40u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8488005Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD40u); -#endif - /* 0xBFC25D44: 8489005C lh $t1, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD44u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8489005Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x124u); -#endif - /* 0xBFC25D48: 00482821 addu $a1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00482821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25D4C: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003DD54u; /* jal link before delay slot */ - psx_delay_BFC25D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x248u); -#endif - /* 0xBFC25D50: 00693021 addu $a2, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[9]; - PGXP_ALU(0x00693021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD50u); -#endif - if (psx_delay_BFC25D4C) { - psx_delay_BFC25D4C = 0; - cpu->gpr[31] = 0x8003DD54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC25D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC25D54: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DD54u); -#endif - /* 0xBFC25D58: 8D4A6EE0 lw $t2, 28384($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 28384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (28384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD58u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6EE0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25D5C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC25D60: 000A58C0 sll $t3, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC25D64: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC25D68: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC25D6C: 258C3DC0 addiu $t4, $t4, 15808 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (15808)); - PGXP_ALU(0x258C3DC0u, cpu->gpr[12], _pgx1, 0x00003DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD70u); -#endif - /* 0xBFC25D70: 8FA40024 lw $a0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25D74: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x8003DD7Cu; /* jal link before delay slot */ - psx_delay_BFC25D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1820u); -#endif - /* 0xBFC25D78: 016C2821 addu $a1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD78u); -#endif - if (psx_delay_BFC25D74) { - psx_delay_BFC25D74 = 0; - cpu->gpr[31] = 0x8003DD7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC25D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD7Cu); -#endif - /* 0xBFC25D7C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD7Cu); -#endif -label_BFC25D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25D80: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25D84: 03E00008 jr $ra */ - psx_delay_BFC25D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DD88u); -#endif - if (psx_delay_BFC25D84) { - psx_delay_BFC25D84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25D8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25D8Cu); - int psx_delay_BFC25DA0 = 0; - int psx_delay_BFC25DA8 = 0; - int psx_delay_BFC25DB0 = 0; - int psx_delay_BFC25DB8 = 0; - int psx_delay_BFC25DE8 = 0; - int psx_delay_BFC25DF8 = 0; - int psx_delay_BFC25E04 = 0; - int psx_delay_BFC25E10 = 0; - int psx_delay_BFC25E20 = 0; - int psx_taken_BFC25E20 = 0; - int psx_delay_BFC25E34 = 0; - int psx_taken_BFC25E34 = 0; - int psx_delay_BFC25E58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25DA8u: goto label_BFC25DA8; - case 0xBFC25DB0u: goto label_BFC25DB0; - case 0xBFC25DB8u: goto label_BFC25DB8; - case 0xBFC25DC0u: goto label_BFC25DC0; - case 0xBFC25DE0u: goto label_BFC25DE0; - case 0xBFC25DF0u: goto label_BFC25DF0; - case 0xBFC25E00u: goto label_BFC25E00; - case 0xBFC25E0Cu: goto label_BFC25E0C; - case 0xBFC25E18u: goto label_BFC25E18; - case 0xBFC25E28u: goto label_BFC25E28; - case 0xBFC25E3Cu: goto label_BFC25E3C; - case 0xBFC25E40u: goto label_BFC25E40; - default: break; - } - } -label_BFC25D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25D8C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25D90: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD90u); return; } g_debug_last_store_pc = 0x8003DD90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC25D94: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD94u); return; } g_debug_last_store_pc = 0x8003DD94u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC25D98: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD98u); return; } g_debug_last_store_pc = 0x8003DD98u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC25D9C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DD9Cu); return; } g_debug_last_store_pc = 0x8003DD9Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DA0: 0C00F721 jal 0xB003DC84 */ - cpu->gpr[31] = 0x8003DDA8u; /* jal link before delay slot */ - psx_delay_BFC25DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC25DA4: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DDA4u); return; } g_debug_last_store_pc = 0x8003DDA4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDA4u); -#endif - if (psx_delay_BFC25DA0) { - psx_delay_BFC25DA0 = 0; - cpu->gpr[31] = 0x8003DDA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC84u); - cpu->pc = 0x8003DC84u; return; - } -label_BFC25DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DA8: 0C00F71F jal 0xB003DC7C */ - cpu->gpr[31] = 0x8003DDB0u; /* jal link before delay slot */ - psx_delay_BFC25DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DDACu); -#endif - if (psx_delay_BFC25DA8) { - psx_delay_BFC25DA8 = 0; - cpu->gpr[31] = 0x8003DDB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC7Cu); - cpu->pc = 0x8003DC7Cu; return; - } -label_BFC25DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DB0: 0C00F725 jal 0xB003DC94 */ - cpu->gpr[31] = 0x8003DDB8u; /* jal link before delay slot */ - psx_delay_BFC25DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25DB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DDB4u); -#endif - if (psx_delay_BFC25DB0) { - psx_delay_BFC25DB0 = 0; - cpu->gpr[31] = 0x8003DDB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC94u); - cpu->pc = 0x8003DC94u; return; - } -label_BFC25DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DB8: 0C00F71D jal 0xB003DC74 */ - cpu->gpr[31] = 0x8003DDC0u; /* jal link before delay slot */ - psx_delay_BFC25DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25DBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DDBCu); -#endif - if (psx_delay_BFC25DB8) { - psx_delay_BFC25DB8 = 0; - cpu->gpr[31] = 0x8003DDC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC74u); - cpu->pc = 0x8003DC74u; return; - } -label_BFC25DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC25DC0: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC25DC4: 3C118006 lui $s1, 0x8006 */ - cpu->gpr[17] = 0x80060000u; - PGXP_ALU(0x3C118006u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC25DC8: 3C138006 lui $s3, 0x8006 */ - cpu->gpr[19] = 0x80060000u; - PGXP_ALU(0x3C138006u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC25DCC: 26736EDC addiu $s3, $s3, 28380 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (28380)); - PGXP_ALU(0x26736EDCu, cpu->gpr[19], _pgx1, 0x00006EDCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC25DD0: 26316ED8 addiu $s1, $s1, 28376 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (28376)); - PGXP_ALU(0x26316ED8u, cpu->gpr[17], _pgx1, 0x00006ED8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC25DD4: 26103DC0 addiu $s0, $s0, 15808 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (15808)); - PGXP_ALU(0x26103DC0u, cpu->gpr[16], _pgx1, 0x00003DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25DD8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC25DDC: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDDCu); -#endif -label_BFC25DE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDE0u); -#endif - /* 0xBFC25DE0: 8E250000 lw $a1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DDE0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } - PGXP_LOAD(0x8E250000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC25DE4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DE8: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003DDF0u; /* jal link before delay slot */ - psx_delay_BFC25DE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC25DEC: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDECu); -#endif - if (psx_delay_BFC25DE8) { - psx_delay_BFC25DE8 = 0; - cpu->gpr[31] = 0x8003DDF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC25DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC25DF0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25DF4: 240500C8 addiu $a1, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240500C8u, cpu->gpr[5], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25DF8: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003DE00u; /* jal link before delay slot */ - psx_delay_BFC25DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC25DFC: 24060064 addiu $a2, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24060064u, cpu->gpr[6], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DDFCu); -#endif - if (psx_delay_BFC25DF8) { - psx_delay_BFC25DF8 = 0; - cpu->gpr[31] = 0x8003DE00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC25E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC25E00: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25E04: 0C0112A7 jal 0xB0044A9C */ - cpu->gpr[31] = 0x8003DE0Cu; /* jal link before delay slot */ - psx_delay_BFC25E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25E08: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE08u); -#endif - if (psx_delay_BFC25E04) { - psx_delay_BFC25E04 = 0; - cpu->gpr[31] = 0x8003DE0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A9Cu); - cpu->pc = 0x80044A9Cu; return; - } -label_BFC25E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC25E0C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25E10: 0C0112B8 jal 0xB0044AE0 */ - cpu->gpr[31] = 0x8003DE18u; /* jal link before delay slot */ - psx_delay_BFC25E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25E14: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE14u); -#endif - if (psx_delay_BFC25E10) { - psx_delay_BFC25E10 = 0; - cpu->gpr[31] = 0x8003DE18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AE0u); - cpu->pc = 0x80044AE0u; return; - } -label_BFC25E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC25E18: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC25E1C: AE12006C sw $s2, 108($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE1Cu); return; } g_debug_last_store_pc = 0x8003DE1Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAE12006Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC25E20: 1633FFEF bne $s1, $s3, 0xBFC25DE0 */ - uint32_t psx_brA_BFC25E20 = cpu->gpr[17]; uint32_t psx_brB_BFC25E20 = cpu->gpr[19]; - psx_taken_BFC25E20 = (psx_brA_BFC25E20 != psx_brB_BFC25E20); - psx_delay_BFC25E20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC25E24: 26100070 addiu $s0, $s0, 112 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (112)); - PGXP_ALU(0x26100070u, cpu->gpr[16], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE24u); -#endif - if (psx_delay_BFC25E20) { - psx_delay_BFC25E20 = 0; - if (psx_taken_BFC25E20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DDE0u); - goto label_BFC25DE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE28u); - } -label_BFC25E28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25E28: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE28u); -#endif - /* 0xBFC25E2C: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE2Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25E30: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC25E34: 11C10002 beq $t6, $at, 0xBFC25E40 */ - uint32_t psx_brA_BFC25E34 = cpu->gpr[14]; uint32_t psx_brB_BFC25E34 = cpu->gpr[1]; - psx_taken_BFC25E34 = (psx_brA_BFC25E34 == psx_brB_BFC25E34); - psx_delay_BFC25E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25E38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE38u); -#endif - if (psx_delay_BFC25E34) { - psx_delay_BFC25E34 = 0; - if (psx_taken_BFC25E34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE40u); - goto label_BFC25E40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE3Cu); - } -label_BFC25E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25E3C: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE3Cu); return; } g_debug_last_store_pc = 0x8003DE3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE3Cu); -#endif -label_BFC25E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE40u); -#endif - /* 0xBFC25E40: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE40u); -#endif - /* 0xBFC25E44: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE44u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE44u); -#endif - /* 0xBFC25E48: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE48u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE48u); -#endif - /* 0xBFC25E4C: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE4Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE50u); -#endif - /* 0xBFC25E50: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE50u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25E54: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25E58: 03E00008 jr $ra */ - psx_delay_BFC25E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25E5C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE5Cu); -#endif - if (psx_delay_BFC25E58) { - psx_delay_BFC25E58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25E60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25E60u); - int psx_delay_BFC25E84 = 0; -label_BFC25E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25E60: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC25E64: AC246EE4 sw $a0, 28388($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28388)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE64u); return; } g_debug_last_store_pc = 0x8003DE64u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC246EE4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25E68: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC25E6C: AC256EE8 sw $a1, 28392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE6Cu); return; } g_debug_last_store_pc = 0x8003DE6Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC256EE8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25E70: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4050u); -#endif - /* 0xBFC25E74: 00867021 addu $t6, $a0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[4] + cpu->gpr[6]; - PGXP_ALU(0x00867021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC25E78: AC2E6EEC sw $t6, 28396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE78u); return; } g_debug_last_store_pc = 0x8003DE78u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6EECu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25E7C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80A0u); -#endif - /* 0xBFC25E80: 00A77821 addu $t7, $a1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[7]; - PGXP_ALU(0x00A77821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25E84: 03E00008 jr $ra */ - psx_delay_BFC25E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC25E88: AC2F6EF0 sw $t7, 28400($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28400; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE88u); return; } g_debug_last_store_pc = 0x8003DE88u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6EF0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE88u); -#endif - if (psx_delay_BFC25E84) { - psx_delay_BFC25E84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25E8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25E8Cu); - int psx_delay_BFC25E94 = 0; - int psx_delay_BFC25EB0 = 0; - int psx_delay_BFC25EC4 = 0; - int psx_delay_BFC25ED0 = 0; - int psx_delay_BFC25ED8 = 0; - int psx_delay_BFC25EE0 = 0; - int psx_delay_BFC25EF0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25E9Cu: goto label_BFC25E9C; - case 0xBFC25EB8u: goto label_BFC25EB8; - case 0xBFC25ECCu: goto label_BFC25ECC; - case 0xBFC25ED8u: goto label_BFC25ED8; - case 0xBFC25EE0u: goto label_BFC25EE0; - case 0xBFC25EE8u: goto label_BFC25EE8; - default: break; - } - } -label_BFC25E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25E8C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25E90: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DE90u); return; } g_debug_last_store_pc = 0x8003DE90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25E94: 0C00FABE jal 0xB003EAF8 */ - cpu->gpr[31] = 0x8003DE9Cu; /* jal link before delay slot */ - psx_delay_BFC25E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25E98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DE98u); -#endif - if (psx_delay_BFC25E94) { - psx_delay_BFC25E94 = 0; - cpu->gpr[31] = 0x8003DE9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAF8u); - cpu->pc = 0x8003EAF8u; return; - } -label_BFC25E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25E9C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC25EA0: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC25EA4: 24C63E50 addiu $a2, $a2, 15952 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (15952)); - PGXP_ALU(0x24C63E50u, cpu->gpr[6], _pgx1, 0x00003E50u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC25EA8: 24843E30 addiu $a0, $a0, 15920 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15920)); - PGXP_ALU(0x24843E30u, cpu->gpr[4], _pgx1, 0x00003E30u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25EAC: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25EB0: 0C016AD0 jal 0xB005AB40 */ - cpu->gpr[31] = 0x8003DEB8u; /* jal link before delay slot */ - psx_delay_BFC25EB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC25EB4: 24070002 addiu $a3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24070002u, cpu->gpr[7], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEB4u); -#endif - if (psx_delay_BFC25EB0) { - psx_delay_BFC25EB0 = 0; - cpu->gpr[31] = 0x8003DEB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB40u); - cpu->pc = 0x8005AB40u; return; - } -label_BFC25EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25EB8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25EBC: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC25EC0: 24060260 addiu $a2, $zero, 608 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (608)); - PGXP_ALU(0x24060260u, cpu->gpr[6], _pgx1, 0x00000260u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25EC4: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003DECCu; /* jal link before delay slot */ - psx_delay_BFC25EC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC25EC8: 240701B0 addiu $a3, $zero, 432 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (432)); - PGXP_ALU(0x240701B0u, cpu->gpr[7], _pgx1, 0x000001B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEC8u); -#endif - if (psx_delay_BFC25EC4) { - psx_delay_BFC25EC4 = 0; - cpu->gpr[31] = 0x8003DECCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC25ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25ECC: 24040050 addiu $a0, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24040050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25ED0: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003DED8u; /* jal link before delay slot */ - psx_delay_BFC25ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC25ED4: 24050064 addiu $a1, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24050064u, cpu->gpr[5], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DED4u); -#endif - if (psx_delay_BFC25ED0) { - psx_delay_BFC25ED0 = 0; - cpu->gpr[31] = 0x8003DED8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC25ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25ED8: 0C016AD4 jal 0xB005AB50 */ - cpu->gpr[31] = 0x8003DEE0u; /* jal link before delay slot */ - psx_delay_BFC25ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25EDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DEDCu); -#endif - if (psx_delay_BFC25ED8) { - psx_delay_BFC25ED8 = 0; - cpu->gpr[31] = 0x8003DEE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB50u); - cpu->pc = 0x8005AB50u; return; - } -label_BFC25EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25EE0: 0C016A60 jal 0xB005A980 */ - cpu->gpr[31] = 0x8003DEE8u; /* jal link before delay slot */ - psx_delay_BFC25EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25EE4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEE4u); -#endif - if (psx_delay_BFC25EE0) { - psx_delay_BFC25EE0 = 0; - cpu->gpr[31] = 0x8003DEE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A980u); - cpu->pc = 0x8005A980u; return; - } -label_BFC25EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEE8u); -#endif - /* 0xBFC25EE8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DEE8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25EEC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC25EF0: 03E00008 jr $ra */ - psx_delay_BFC25EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25EF4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEF4u); -#endif - if (psx_delay_BFC25EF0) { - psx_delay_BFC25EF0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC25EF8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC25EF8u); - int psx_delay_BFC25F1C = 0; - int psx_taken_BFC25F1C = 0; - int psx_delay_BFC25F2C = 0; - int psx_delay_BFC25F34 = 0; - int psx_delay_BFC25F50 = 0; - int psx_taken_BFC25F50 = 0; - int psx_delay_BFC25F58 = 0; - int psx_taken_BFC25F58 = 0; - int psx_delay_BFC25F64 = 0; - int psx_taken_BFC25F64 = 0; - int psx_delay_BFC25F6C = 0; - int psx_taken_BFC25F6C = 0; - int psx_delay_BFC25F80 = 0; - int psx_taken_BFC25F80 = 0; - int psx_delay_BFC25F94 = 0; - int psx_taken_BFC25F94 = 0; - int psx_delay_BFC25F9C = 0; - int psx_taken_BFC25F9C = 0; - int psx_delay_BFC25FA4 = 0; - int psx_taken_BFC25FA4 = 0; - int psx_delay_BFC25FBC = 0; - int psx_taken_BFC25FBC = 0; - int psx_delay_BFC25FC8 = 0; - int psx_taken_BFC25FC8 = 0; - int psx_delay_BFC25FD0 = 0; - int psx_taken_BFC25FD0 = 0; - int psx_delay_BFC25FE8 = 0; - int psx_taken_BFC25FE8 = 0; - int psx_delay_BFC26040 = 0; - int psx_taken_BFC26040 = 0; - int psx_delay_BFC26058 = 0; - int psx_taken_BFC26058 = 0; - int psx_delay_BFC26074 = 0; - int psx_taken_BFC26074 = 0; - int psx_delay_BFC26084 = 0; - int psx_taken_BFC26084 = 0; - int psx_delay_BFC260A4 = 0; - int psx_taken_BFC260A4 = 0; - int psx_delay_BFC260F0 = 0; - int psx_taken_BFC260F0 = 0; - int psx_delay_BFC26104 = 0; - int psx_taken_BFC26104 = 0; - int psx_delay_BFC26118 = 0; - int psx_taken_BFC26118 = 0; - int psx_delay_BFC26128 = 0; - int psx_taken_BFC26128 = 0; - int psx_delay_BFC26130 = 0; - int psx_taken_BFC26130 = 0; - int psx_delay_BFC26140 = 0; - int psx_taken_BFC26140 = 0; - int psx_delay_BFC26148 = 0; - int psx_taken_BFC26148 = 0; - int psx_delay_BFC2615C = 0; - int psx_taken_BFC2615C = 0; - int psx_delay_BFC26170 = 0; - int psx_taken_BFC26170 = 0; - int psx_delay_BFC26178 = 0; - int psx_taken_BFC26178 = 0; - int psx_delay_BFC26184 = 0; - int psx_delay_BFC26190 = 0; - int psx_taken_BFC26190 = 0; - int psx_delay_BFC2619C = 0; - int psx_delay_BFC261C4 = 0; - int psx_taken_BFC261C4 = 0; - int psx_delay_BFC261D8 = 0; - int psx_taken_BFC261D8 = 0; - int psx_delay_BFC261E4 = 0; - int psx_delay_BFC261F8 = 0; - int psx_delay_BFC26200 = 0; - int psx_taken_BFC26200 = 0; - int psx_delay_BFC26214 = 0; - int psx_taken_BFC26214 = 0; - int psx_delay_BFC26224 = 0; - int psx_taken_BFC26224 = 0; - int psx_delay_BFC2623C = 0; - int psx_taken_BFC2623C = 0; - int psx_delay_BFC26244 = 0; - int psx_delay_BFC2624C = 0; - int psx_taken_BFC2624C = 0; - int psx_delay_BFC2625C = 0; - int psx_taken_BFC2625C = 0; - int psx_delay_BFC26274 = 0; - int psx_taken_BFC26274 = 0; - int psx_delay_BFC2627C = 0; - int psx_delay_BFC26284 = 0; - int psx_taken_BFC26284 = 0; - int psx_delay_BFC2628C = 0; - int psx_taken_BFC2628C = 0; - int psx_delay_BFC26298 = 0; - int psx_taken_BFC26298 = 0; - int psx_delay_BFC262AC = 0; - int psx_taken_BFC262AC = 0; - int psx_delay_BFC262C0 = 0; - int psx_taken_BFC262C0 = 0; - int psx_delay_BFC262C8 = 0; - int psx_taken_BFC262C8 = 0; - int psx_delay_BFC262D0 = 0; - int psx_taken_BFC262D0 = 0; - int psx_delay_BFC262D8 = 0; - int psx_taken_BFC262D8 = 0; - int psx_delay_BFC262E0 = 0; - int psx_taken_BFC262E0 = 0; - int psx_delay_BFC262E8 = 0; - int psx_delay_BFC262F0 = 0; - int psx_taken_BFC262F0 = 0; - int psx_delay_BFC262FC = 0; - int psx_taken_BFC262FC = 0; - int psx_delay_BFC26304 = 0; - int psx_taken_BFC26304 = 0; - int psx_delay_BFC2630C = 0; - int psx_delay_BFC26324 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC25F24u: goto label_BFC25F24; - case 0xBFC25F34u: goto label_BFC25F34; - case 0xBFC25F3Cu: goto label_BFC25F3C; - case 0xBFC25F48u: goto label_BFC25F48; - case 0xBFC25F58u: goto label_BFC25F58; - case 0xBFC25F60u: goto label_BFC25F60; - case 0xBFC25F6Cu: goto label_BFC25F6C; - case 0xBFC25F74u: goto label_BFC25F74; - case 0xBFC25F88u: goto label_BFC25F88; - case 0xBFC25F9Cu: goto label_BFC25F9C; - case 0xBFC25FA4u: goto label_BFC25FA4; - case 0xBFC25FACu: goto label_BFC25FAC; - case 0xBFC25FC4u: goto label_BFC25FC4; - case 0xBFC25FC8u: goto label_BFC25FC8; - case 0xBFC25FD0u: goto label_BFC25FD0; - case 0xBFC25FD8u: goto label_BFC25FD8; - case 0xBFC25FF0u: goto label_BFC25FF0; - case 0xBFC26048u: goto label_BFC26048; - case 0xBFC2604Cu: goto label_BFC2604C; - case 0xBFC26060u: goto label_BFC26060; - case 0xBFC26064u: goto label_BFC26064; - case 0xBFC2606Cu: goto label_BFC2606C; - case 0xBFC2607Cu: goto label_BFC2607C; - case 0xBFC2608Cu: goto label_BFC2608C; - case 0xBFC260ACu: goto label_BFC260AC; - case 0xBFC260F8u: goto label_BFC260F8; - case 0xBFC260FCu: goto label_BFC260FC; - case 0xBFC2610Cu: goto label_BFC2610C; - case 0xBFC26110u: goto label_BFC26110; - case 0xBFC26120u: goto label_BFC26120; - case 0xBFC26130u: goto label_BFC26130; - case 0xBFC26138u: goto label_BFC26138; - case 0xBFC26148u: goto label_BFC26148; - case 0xBFC26150u: goto label_BFC26150; - case 0xBFC26164u: goto label_BFC26164; - case 0xBFC26178u: goto label_BFC26178; - case 0xBFC26180u: goto label_BFC26180; - case 0xBFC2618Cu: goto label_BFC2618C; - case 0xBFC26198u: goto label_BFC26198; - case 0xBFC2619Cu: goto label_BFC2619C; - case 0xBFC261A4u: goto label_BFC261A4; - case 0xBFC261B0u: goto label_BFC261B0; - case 0xBFC261CCu: goto label_BFC261CC; - case 0xBFC261E0u: goto label_BFC261E0; - case 0xBFC261ECu: goto label_BFC261EC; - case 0xBFC26200u: goto label_BFC26200; - case 0xBFC26208u: goto label_BFC26208; - case 0xBFC2621Cu: goto label_BFC2621C; - case 0xBFC2622Cu: goto label_BFC2622C; - case 0xBFC26244u: goto label_BFC26244; - case 0xBFC2624Cu: goto label_BFC2624C; - case 0xBFC26254u: goto label_BFC26254; - case 0xBFC26264u: goto label_BFC26264; - case 0xBFC2627Cu: goto label_BFC2627C; - case 0xBFC26284u: goto label_BFC26284; - case 0xBFC2628Cu: goto label_BFC2628C; - case 0xBFC26294u: goto label_BFC26294; - case 0xBFC26298u: goto label_BFC26298; - case 0xBFC262A0u: goto label_BFC262A0; - case 0xBFC262B4u: goto label_BFC262B4; - case 0xBFC262C8u: goto label_BFC262C8; - case 0xBFC262D0u: goto label_BFC262D0; - case 0xBFC262D8u: goto label_BFC262D8; - case 0xBFC262E0u: goto label_BFC262E0; - case 0xBFC262E8u: goto label_BFC262E8; - case 0xBFC262F0u: goto label_BFC262F0; - case 0xBFC262F8u: goto label_BFC262F8; - case 0xBFC262FCu: goto label_BFC262FC; - case 0xBFC26304u: goto label_BFC26304; - case 0xBFC2630Cu: goto label_BFC2630C; - case 0xBFC26314u: goto label_BFC26314; - case 0xBFC26318u: goto label_BFC26318; - default: break; - } - } -label_BFC25EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25EF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC25EF8: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC25EFC: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC25F00: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF00u); return; } g_debug_last_store_pc = 0x8003DF00u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF00u); -#endif - /* 0xBFC25F04: 8DCE6ED4 lw $t6, 28372($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 28372; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (28372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF04u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6ED4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC25F08: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF08u); return; } g_debug_last_store_pc = 0x8003DF08u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC25F0C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF0Cu); return; } g_debug_last_store_pc = 0x8003DF0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC25F10: AFA60060 sw $a2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF10u); return; } g_debug_last_store_pc = 0x8003DF10u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60060u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC25F14: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC25F18: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC25F1C: 11C00005 beq $t6, $zero, 0xBFC25F34 */ - uint32_t psx_brA_BFC25F1C = cpu->gpr[14]; uint32_t psx_brB_BFC25F1C = cpu->gpr[0]; - psx_taken_BFC25F1C = (psx_brA_BFC25F1C == psx_brB_BFC25F1C); - psx_delay_BFC25F1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC25F20: AFA70064 sw $a3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF20u); return; } g_debug_last_store_pc = 0x8003DF20u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70064u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF20u); -#endif - if (psx_delay_BFC25F1C) { - psx_delay_BFC25F1C = 0; - if (psx_taken_BFC25F1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF34u); - goto label_BFC25F34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF24u); - } -label_BFC25F24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC25F24: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25F28: AC206ED4 sw $zero, 28372($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF28u); return; } g_debug_last_store_pc = 0x8003DF28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206ED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25F2C: 0C00F72C jal 0xB003DCB0 */ - cpu->gpr[31] = 0x8003DF34u; /* jal link before delay slot */ - psx_delay_BFC25F2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC25F30: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF30u); -#endif - if (psx_delay_BFC25F2C) { - psx_delay_BFC25F2C = 0; - cpu->gpr[31] = 0x8003DF34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCB0u); - cpu->pc = 0x8003DCB0u; return; - } -label_BFC25F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC25F34: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003DF3Cu; /* jal link before delay slot */ - psx_delay_BFC25F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF38u); -#endif - if (psx_delay_BFC25F34) { - psx_delay_BFC25F34 = 0; - cpu->gpr[31] = 0x8003DF3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC25F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25F3C: 3C098011 lui $t1, 0x8011 */ - cpu->gpr[9] = 0x80110000u; - PGXP_ALU(0x3C098011u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25F40: 25290EC8 addiu $t1, $t1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (3784)); - PGXP_ALU(0x25290EC8u, cpu->gpr[9], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC25F44: 00005021 addu $t2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00005021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF44u); -#endif -label_BFC25F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF48u); -#endif - /* 0xBFC25F48: 8D280004 lw $t0, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF48u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x200u); } - PGXP_LOAD(0x8D280004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC25F50: 11000006 beq $t0, $zero, 0xBFC25F6C */ - uint32_t psx_brA_BFC25F50 = cpu->gpr[8]; uint32_t psx_brB_BFC25F50 = cpu->gpr[0]; - psx_taken_BFC25F50 = (psx_brA_BFC25F50 == psx_brB_BFC25F50); - psx_delay_BFC25F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF54u); -#endif - if (psx_delay_BFC25F50) { - psx_delay_BFC25F50 = 0; - if (psx_taken_BFC25F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF6Cu); - goto label_BFC25F6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF58u); - } -label_BFC25F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC25F58: 14480004 bne $v0, $t0, 0xBFC25F6C */ - uint32_t psx_brA_BFC25F58 = cpu->gpr[2]; uint32_t psx_brB_BFC25F58 = cpu->gpr[8]; - psx_taken_BFC25F58 = (psx_brA_BFC25F58 != psx_brB_BFC25F58); - psx_delay_BFC25F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF5Cu); -#endif - if (psx_delay_BFC25F58) { - psx_delay_BFC25F58 = 0; - if (psx_taken_BFC25F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF6Cu); - goto label_BFC25F6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF60u); - } -label_BFC25F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF60u); -#endif - /* 0xBFC25F60: 8D230000 lw $v1, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF60u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x200u); } - PGXP_LOAD(0x8D230000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F64: 10000003 beq $zero, $zero, 0xBFC25F74 */ - uint32_t psx_brA_BFC25F64 = cpu->gpr[0]; uint32_t psx_brB_BFC25F64 = cpu->gpr[0]; - psx_taken_BFC25F64 = (psx_brA_BFC25F64 == psx_brB_BFC25F64); - psx_delay_BFC25F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF68u); -#endif - if (psx_delay_BFC25F64) { - psx_delay_BFC25F64 = 0; - if (psx_taken_BFC25F64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF74u); - goto label_BFC25F74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF6Cu); - } -label_BFC25F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F6C: 1000FFF6 beq $zero, $zero, 0xBFC25F48 */ - uint32_t psx_brA_BFC25F6C = cpu->gpr[0]; uint32_t psx_brB_BFC25F6C = cpu->gpr[0]; - psx_taken_BFC25F6C = (psx_brA_BFC25F6C == psx_brB_BFC25F6C); - psx_delay_BFC25F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC25F70: 25290688 addiu $t1, $t1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1672)); - PGXP_ALU(0x25290688u, cpu->gpr[9], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF70u); -#endif - if (psx_delay_BFC25F6C) { - psx_delay_BFC25F6C = 0; - if (psx_taken_BFC25F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF48u); - goto label_BFC25F48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF74u); - } -label_BFC25F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25F74: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DF74u); -#endif - /* 0xBFC25F78: 8DEF9E2C lw $t7, -25044($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF78u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25F7C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC25F80: 15E1001B bne $t7, $at, 0xBFC25FF0 */ - uint32_t psx_brA_BFC25F80 = cpu->gpr[15]; uint32_t psx_brB_BFC25F80 = cpu->gpr[1]; - psx_taken_BFC25F80 = (psx_brA_BFC25F80 != psx_brB_BFC25F80); - psx_delay_BFC25F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF84u); -#endif - if (psx_delay_BFC25F80) { - psx_delay_BFC25F80 = 0; - if (psx_taken_BFC25F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFF0u); - goto label_BFC25FF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF88u); - } -label_BFC25F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC25F88: 3C188006 lui $t8, 0x8006 */ - cpu->gpr[24] = 0x80060000u; - PGXP_ALU(0x3C188006u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DF88u); -#endif - /* 0xBFC25F8C: 8F186EBC lw $t8, 28348($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 28348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DF8Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F186EBCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC25F94: 17000016 bne $t8, $zero, 0xBFC25FF0 */ - uint32_t psx_brA_BFC25F94 = cpu->gpr[24]; uint32_t psx_brB_BFC25F94 = cpu->gpr[0]; - psx_taken_BFC25F94 = (psx_brA_BFC25F94 != psx_brB_BFC25F94); - psx_delay_BFC25F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC25F98: 2A0100B4 slti $at, $s0, 180 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (180) ? 1 : 0); - PGXP_ALU(0x2A0100B4u, cpu->gpr[1], _pgx1, 0x00B4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DF98u); -#endif - if (psx_delay_BFC25F94) { - psx_delay_BFC25F94 = 0; - if (psx_taken_BFC25F94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFF0u); - goto label_BFC25FF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DF9Cu); - } -label_BFC25F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25F9C: 14200009 bne $at, $zero, 0xBFC25FC4 */ - uint32_t psx_brA_BFC25F9C = cpu->gpr[1]; uint32_t psx_brB_BFC25F9C = cpu->gpr[0]; - psx_taken_BFC25F9C = (psx_brA_BFC25F9C != psx_brB_BFC25F9C); - psx_delay_BFC25F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25FA0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFA0u); -#endif - if (psx_delay_BFC25F9C) { - psx_delay_BFC25F9C = 0; - if (psx_taken_BFC25F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFC4u); - goto label_BFC25FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFA4u); - } -label_BFC25FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC25FA4: 14610008 bne $v1, $at, 0xBFC25FC8 */ - uint32_t psx_brA_BFC25FA4 = cpu->gpr[3]; uint32_t psx_brB_BFC25FA4 = cpu->gpr[1]; - psx_taken_BFC25FA4 = (psx_brA_BFC25FA4 != psx_brB_BFC25FA4); - psx_delay_BFC25FA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC25FA8: 2A0101B5 slti $at, $s0, 437 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0); - PGXP_ALU(0x2A0101B5u, cpu->gpr[1], _pgx1, 0x01B5u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFA8u); -#endif - if (psx_delay_BFC25FA4) { - psx_delay_BFC25FA4 = 0; - if (psx_taken_BFC25FA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFC8u); - goto label_BFC25FC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFACu); - } -label_BFC25FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFACu); -#endif - /* 0xBFC25FAC: 8FAE0068 lw $t6, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DFACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0068u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25FB0: 3C192000 lui $t9, 0x2000 */ - cpu->gpr[25] = 0x20000000u; - PGXP_ALU(0x3C192000u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25FB4: 37392000 ori $t9, $t9, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] | 0x2000u; - PGXP_ALU(0x37392000u, cpu->gpr[25], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25FB8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25FBC: 100000D6 beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC25FBC = cpu->gpr[0]; uint32_t psx_brB_BFC25FBC = cpu->gpr[0]; - psx_taken_BFC25FBC = (psx_brA_BFC25FBC == psx_brB_BFC25FBC); - psx_delay_BFC25FBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC25FC0: ADD90000 sw $t9, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DFC0u); return; } g_debug_last_store_pc = 0x8003DFC0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xADD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFC0u); -#endif - if (psx_delay_BFC25FBC) { - psx_delay_BFC25FBC = 0; - if (psx_taken_BFC25FBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFC4u); - } -label_BFC25FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC25FC4: 2A0101B5 slti $at, $s0, 437 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (437) ? 1 : 0); - PGXP_ALU(0x2A0101B5u, cpu->gpr[1], _pgx1, 0x01B5u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFC4u); -#endif -label_BFC25FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25FC8: 10200009 beq $at, $zero, 0xBFC25FF0 */ - uint32_t psx_brA_BFC25FC8 = cpu->gpr[1]; uint32_t psx_brB_BFC25FC8 = cpu->gpr[0]; - psx_taken_BFC25FC8 = (psx_brA_BFC25FC8 == psx_brB_BFC25FC8); - psx_delay_BFC25FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC25FCC: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFCCu); -#endif - if (psx_delay_BFC25FC8) { - psx_delay_BFC25FC8 = 0; - if (psx_taken_BFC25FC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFF0u); - goto label_BFC25FF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFD0u); - } -label_BFC25FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC25FD0: 14610007 bne $v1, $at, 0xBFC25FF0 */ - uint32_t psx_brA_BFC25FD0 = cpu->gpr[3]; uint32_t psx_brB_BFC25FD0 = cpu->gpr[1]; - psx_taken_BFC25FD0 = (psx_brA_BFC25FD0 != psx_brB_BFC25FD0); - psx_delay_BFC25FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25FD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003DFD4u); -#endif - if (psx_delay_BFC25FD0) { - psx_delay_BFC25FD0 = 0; - if (psx_taken_BFC25FD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFF0u); - goto label_BFC25FF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFD8u); - } -label_BFC25FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFD8u); -#endif - /* 0xBFC25FD8: 8FB80068 lw $t8, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DFD8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80068u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25FDC: 3C0F8000 lui $t7, 0x8000 */ - cpu->gpr[15] = 0x80000000u; - PGXP_ALU(0x3C0F8000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25FE0: 35EF8000 ori $t7, $t7, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] | 0x8000u; - PGXP_ALU(0x35EF8000u, cpu->gpr[15], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC25FE4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC25FE8: 100000CB beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC25FE8 = cpu->gpr[0]; uint32_t psx_brB_BFC25FE8 = cpu->gpr[0]; - psx_taken_BFC25FE8 = (psx_brA_BFC25FE8 == psx_brB_BFC25FE8); - psx_delay_BFC25FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC25FEC: AF0F0000 sw $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DFECu); return; } g_debug_last_store_pc = 0x8003DFECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAF0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFECu); -#endif - if (psx_delay_BFC25FE8) { - psx_delay_BFC25FE8 = 0; - if (psx_taken_BFC25FE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DFF0u); - } -label_BFC25FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC25FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC25FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003DFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC25FF0: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DFF0u); -#endif - /* 0xBFC25FF4: 8F396EE0 lw $t9, 28384($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 28384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (28384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003DFF4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396EE0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC25FF8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003DFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC25FFC: 001970C0 sll $t6, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003DFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC26000: 01D97023 subu $t6, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[25]; - PGXP_ALU(0x01D97023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26004: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26008: 25EF3DC0 addiu $t7, $t7, 15808 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (15808)); - PGXP_ALU(0x25EF3DC0u, cpu->gpr[15], _pgx1, 0x00003DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC2600C: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E010u); -#endif - /* 0xBFC26010: 84780048 lh $t8, 72($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E010u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780048u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E010u); -#endif - /* 0xBFC26014: 846E0046 lh $t6, 70($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E014u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0046u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC26018: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2601C: 3C098011 lui $t1, 0x8011 */ - cpu->gpr[9] = 0x80110000u; - PGXP_ALU(0x3C098011u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26020: 3C1F8011 lui $ra, 0x8011 */ - cpu->gpr[31] = 0x80110000u; - PGXP_ALU(0x3C1F8011u, cpu->gpr[31], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E020u); -#endif - /* 0xBFC26024: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E024u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26028: 27FF0F04 addiu $ra, $ra, 3844 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] + (3844)); - PGXP_ALU(0x27FF0F04u, cpu->gpr[31], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2602C: 25290EC8 addiu $t1, $t1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (3784)); - PGXP_ALU(0x25290EC8u, cpu->gpr[9], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC26030: 00005021 addu $t2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00005021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC26034: 240C0060 addiu $t4, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x240C0060u, cpu->gpr[12], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC26038: 240D03FE addiu $t5, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240D03FEu, cpu->gpr[13], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2603C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC26040: 07010002 bgez $t8, 0xBFC2604C */ - uint32_t psx_brA_BFC26040 = cpu->gpr[24]; - psx_taken_BFC26040 = ((int32_t)psx_brA_BFC26040 >= 0); - psx_delay_BFC26040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000003u); -#endif - /* 0xBFC26044: 03000821 addu $at, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E044u); -#endif - if (psx_delay_BFC26040) { - psx_delay_BFC26040 = 0; - if (psx_taken_BFC26040) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E04Cu); - goto label_BFC2604C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E048u); - } -label_BFC26048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26048: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E048u); -#endif -label_BFC2604C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2604Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2604C: 0001C843 sra $t9, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C843u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC26050: 02198021 addu $s0, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02198021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26058: 05C10002 bgez $t6, 0xBFC26064 */ - uint32_t psx_brA_BFC26058 = cpu->gpr[14]; - psx_taken_BFC26058 = ((int32_t)psx_brA_BFC26058 >= 0); - psx_delay_BFC26058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC2605C: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E05Cu); -#endif - if (psx_delay_BFC26058) { - psx_delay_BFC26058 = 0; - if (psx_taken_BFC26058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E064u); - goto label_BFC26064; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E060u); - } -label_BFC26060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26060: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E060u); -#endif -label_BFC26064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC26064: 00017843 sra $t7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017843u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC26068: 022F8821 addu $s1, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022F8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E068u); -#endif -label_BFC2606C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2606Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2606Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E06Cu); -#endif - /* 0xBFC2606C: 8D280004 lw $t0, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E06Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x200u); } - PGXP_LOAD(0x8D280004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26070: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC26074: 11000087 beq $t0, $zero, 0xBFC26294 */ - uint32_t psx_brA_BFC26074 = cpu->gpr[8]; uint32_t psx_brB_BFC26074 = cpu->gpr[0]; - psx_taken_BFC26074 = (psx_brA_BFC26074 == psx_brB_BFC26074); - psx_delay_BFC26074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E078u); -#endif - if (psx_delay_BFC26074) { - psx_delay_BFC26074 = 0; - if (psx_taken_BFC26074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E07Cu); - } -label_BFC2607C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2607Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E07Cu); -#endif - /* 0xBFC2607C: 8D380034 lw $t8, 52($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E07Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x200u); } - PGXP_LOAD(0x8D380034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26084: 13000083 beq $t8, $zero, 0xBFC26294 */ - uint32_t psx_brA_BFC26084 = cpu->gpr[24]; uint32_t psx_brB_BFC26084 = cpu->gpr[0]; - psx_taken_BFC26084 = (psx_brA_BFC26084 == psx_brB_BFC26084); - psx_delay_BFC26084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E088u); -#endif - if (psx_delay_BFC26084) { - psx_delay_BFC26084 = 0; - if (psx_taken_BFC26084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E08Cu); - } -label_BFC2608C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2608Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2608Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC2608C: 000BC8C0 sll $t9, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000BC8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC26090: 032BC823 subu $t9, $t9, $t3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[11]; - PGXP_ALU(0x032BC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC26094: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004200u); -#endif - /* 0xBFC26098: 01397021 addu $t6, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[9] + cpu->gpr[25]; - PGXP_ALU(0x01397021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E098u); -#endif - /* 0xBFC2609C: 8DCF00A8 lw $t7, 168($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E09Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF00A8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC260A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC260A4: 11AF007B beq $t5, $t7, 0xBFC26294 */ - uint32_t psx_brA_BFC260A4 = cpu->gpr[13]; uint32_t psx_brB_BFC260A4 = cpu->gpr[15]; - psx_taken_BFC260A4 = (psx_brA_BFC260A4 == psx_brB_BFC260A4); - psx_delay_BFC260A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC260A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E0A8u); -#endif - if (psx_delay_BFC260A4) { - psx_delay_BFC260A4 = 0; - if (psx_taken_BFC260A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E0ACu); - } -label_BFC260AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC260ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC260ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC260AC: 000AC080 sll $t8, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000AC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC260B0: 030AC023 subu $t8, $t8, $t2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[10]; - PGXP_ALU(0x030AC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC260B4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC260B8: 030AC021 addu $t8, $t8, $t2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[10]; - PGXP_ALU(0x030AC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC260BC: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC260C0: 030AC021 addu $t8, $t8, $t2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[10]; - PGXP_ALU(0x030AC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC260C4: 000B70C0 sll $t6, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC260C8: 01CB7023 subu $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[11]; - PGXP_ALU(0x01CB7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC260CC: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83000000u); -#endif - /* 0xBFC260D0: 03F8C821 addu $t9, $ra, $t8 */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[31] + cpu->gpr[24]; - PGXP_ALU(0x03F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC260D4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004008u); -#endif - /* 0xBFC260D8: 032E1821 addu $v1, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC260DC: AFA30038 sw $v1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E0DCu); return; } g_debug_last_store_pc = 0x8003E0DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0E0u); -#endif - /* 0xBFC260E0: 8D240014 lw $a0, 20($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E0E0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200u); } - PGXP_LOAD(0x8D240014u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0E0u); -#endif - /* 0xBFC260E4: 8D260018 lw $a2, 24($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E0E4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x200u); } - PGXP_LOAD(0x8D260018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0E4u); -#endif - /* 0xBFC260E8: 846F0042 lh $t7, 66($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E0E8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x846F0042u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0E8u); -#endif - /* 0xBFC260EC: 84790044 lh $t9, 68($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E0ECu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x84790044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC260F0: 04810002 bgez $a0, 0xBFC260FC */ - uint32_t psx_brA_BFC260F0 = cpu->gpr[4]; - psx_taken_BFC260F0 = ((int32_t)psx_brA_BFC260F0 >= 0); - psx_delay_BFC260F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC260F4: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0F4u); -#endif - if (psx_delay_BFC260F0) { - psx_delay_BFC260F0 = 0; - if (psx_taken_BFC260F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E0FCu); - goto label_BFC260FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E0F8u); - } -label_BFC260F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC260F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC260F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC260F8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0F8u); -#endif -label_BFC260FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC260FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC260FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC260FC: 0001C043 sra $t8, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C043u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC26100: 01F82823 subu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F82823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC26104: 04C10002 bgez $a2, 0xBFC26110 */ - uint32_t psx_brA_BFC26104 = cpu->gpr[6]; - psx_taken_BFC26104 = ((int32_t)psx_brA_BFC26104 >= 0); - psx_delay_BFC26104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC26108: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E108u); -#endif - if (psx_delay_BFC26104) { - psx_delay_BFC26104 = 0; - if (psx_taken_BFC26104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E110u); - goto label_BFC26110; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E10Cu); - } -label_BFC2610C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2610Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2610Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2610C: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E10Cu); -#endif -label_BFC26110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26110: 00017043 sra $t6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017043u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10022u); -#endif - /* 0xBFC26114: 00B0082A slt $at, $a1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x00B0082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26118: 1020005E beq $at, $zero, 0xBFC26294 */ - uint32_t psx_brA_BFC26118 = cpu->gpr[1]; uint32_t psx_brB_BFC26118 = cpu->gpr[0]; - psx_taken_BFC26118 = (psx_brA_BFC26118 == psx_brB_BFC26118); - psx_delay_BFC26118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004080u); -#endif - /* 0xBFC2611C: 032E3823 subu $a3, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[7] = cpu->gpr[25] - cpu->gpr[14]; - PGXP_ALU(0x032E3823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E11Cu); -#endif - if (psx_delay_BFC26118) { - psx_delay_BFC26118 = 0; - if (psx_taken_BFC26118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E120u); - } -label_BFC26120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8030u); -#endif - /* 0xBFC26120: 00A47821 addu $t7, $a1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[4]; - PGXP_ALU(0x00A47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18002u); -#endif - /* 0xBFC26124: 020F082A slt $at, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26128: 1020005A beq $at, $zero, 0xBFC26294 */ - uint32_t psx_brA_BFC26128 = cpu->gpr[1]; uint32_t psx_brB_BFC26128 = cpu->gpr[0]; - psx_taken_BFC26128 = (psx_brA_BFC26128 == psx_brB_BFC26128); - psx_delay_BFC26128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20082u); -#endif - /* 0xBFC2612C: 00F1082A slt $at, $a3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x00F1082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E12Cu); -#endif - if (psx_delay_BFC26128) { - psx_delay_BFC26128 = 0; - if (psx_taken_BFC26128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E130u); - } -label_BFC26130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26130: 10200058 beq $at, $zero, 0xBFC26294 */ - uint32_t psx_brA_BFC26130 = cpu->gpr[1]; uint32_t psx_brB_BFC26130 = cpu->gpr[0]; - psx_taken_BFC26130 = (psx_brA_BFC26130 == psx_brB_BFC26130); - psx_delay_BFC26130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E134u); -#endif - if (psx_delay_BFC26130) { - psx_delay_BFC26130 = 0; - if (psx_taken_BFC26130) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - goto label_BFC26294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E138u); - } -label_BFC26138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000C0u); -#endif - /* 0xBFC26138: 00E6C021 addu $t8, $a3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[7] + cpu->gpr[6]; - PGXP_ALU(0x00E6C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020002u); -#endif - /* 0xBFC2613C: 0238082A slt $at, $s1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0238082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26140: 10200055 beq $at, $zero, 0xBFC26298 */ - uint32_t psx_brA_BFC26140 = cpu->gpr[1]; uint32_t psx_brB_BFC26140 = cpu->gpr[0]; - psx_taken_BFC26140 = (psx_brA_BFC26140 == psx_brB_BFC26140); - psx_delay_BFC26140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC26144: 254A0001 addiu $t2, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E144u); -#endif - if (psx_delay_BFC26140) { - psx_delay_BFC26140 = 0; - if (psx_taken_BFC26140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E298u); - goto label_BFC26298; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E148u); - } -label_BFC26148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC26148: 10480019 beq $v0, $t0, 0xBFC261B0 */ - uint32_t psx_brA_BFC26148 = cpu->gpr[2]; uint32_t psx_brB_BFC26148 = cpu->gpr[8]; - psx_taken_BFC26148 = (psx_brA_BFC26148 == psx_brB_BFC26148); - psx_delay_BFC26148 = 1; - /* 0xBFC2614C: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E14Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E14Cu); -#endif - if (psx_delay_BFC26148) { - psx_delay_BFC26148 = 0; - if (psx_taken_BFC26148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E1B0u); - goto label_BFC261B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E150u); - } -label_BFC26150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E150u); -#endif - /* 0xBFC26150: 8D39002C lw $t9, 44($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E150u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x200u); } - PGXP_LOAD(0x8D39002Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC26158: 332E0020 andi $t6, $t9, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x20u; - PGXP_ALU(0x332E0020u, cpu->gpr[14], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2615C: 15C00014 bne $t6, $zero, 0xBFC261B0 */ - uint32_t psx_brA_BFC2615C = cpu->gpr[14]; uint32_t psx_brB_BFC2615C = cpu->gpr[0]; - psx_taken_BFC2615C = (psx_brA_BFC2615C != psx_brB_BFC2615C); - psx_delay_BFC2615C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E160u); -#endif - /* 0xBFC26160: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E160u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E160u); -#endif - if (psx_delay_BFC2615C) { - psx_delay_BFC2615C = 0; - if (psx_taken_BFC2615C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E1B0u); - goto label_BFC261B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E164u); - } -label_BFC26164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26164: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E164u); -#endif - /* 0xBFC26168: 8DEF9E2C lw $t7, -25044($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E168u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2616C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC26170: 15E10009 bne $t7, $at, 0xBFC26198 */ - uint32_t psx_brA_BFC26170 = cpu->gpr[15]; uint32_t psx_brB_BFC26170 = cpu->gpr[1]; - psx_taken_BFC26170 = (psx_brA_BFC26170 != psx_brB_BFC26170); - psx_delay_BFC26170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26174: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E174u); -#endif - if (psx_delay_BFC26170) { - psx_delay_BFC26170 = 0; - if (psx_taken_BFC26170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E198u); - goto label_BFC26198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E178u); - } -label_BFC26178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC26178: 15010008 bne $t0, $at, 0xBFC2619C */ - uint32_t psx_brA_BFC26178 = cpu->gpr[8]; uint32_t psx_brB_BFC26178 = cpu->gpr[1]; - psx_taken_BFC26178 = (psx_brA_BFC26178 != psx_brB_BFC26178); - psx_delay_BFC26178 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC2617C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E17Cu); -#endif - if (psx_delay_BFC26178) { - psx_delay_BFC26178 = 0; - if (psx_taken_BFC26178) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E19Cu); - goto label_BFC2619C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E180u); - } -label_BFC26180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26180: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003E180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26184: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003E18Cu; /* jal link before delay slot */ - psx_delay_BFC26184 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC26188: AFA90034 sw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E188u); return; } g_debug_last_store_pc = 0x8003E188u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E188u); -#endif - if (psx_delay_BFC26184) { - psx_delay_BFC26184 = 0; - cpu->gpr[31] = 0x8003E18Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2618C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2618Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E18Cu); -#endif - /* 0xBFC2618C: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E18Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26190: 10000007 beq $zero, $zero, 0xBFC261B0 */ - uint32_t psx_brA_BFC26190 = cpu->gpr[0]; uint32_t psx_brB_BFC26190 = cpu->gpr[0]; - psx_taken_BFC26190 = (psx_brA_BFC26190 == psx_brB_BFC26190); - psx_delay_BFC26190 = 1; - /* 0xBFC26194: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E194u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E194u); -#endif - if (psx_delay_BFC26190) { - psx_delay_BFC26190 = 0; - if (psx_taken_BFC26190) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E1B0u); - goto label_BFC261B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E198u); - } -label_BFC26198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC26198: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E198u); -#endif -label_BFC2619C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2619Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2619C: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x8003E1A4u; /* jal link before delay slot */ - psx_delay_BFC2619C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC261A0: AFA90034 sw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1A0u); return; } g_debug_last_store_pc = 0x8003E1A0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1A0u); -#endif - if (psx_delay_BFC2619C) { - psx_delay_BFC2619C = 0; - cpu->gpr[31] = 0x8003E1A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC261A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC261A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC261A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1A4u); -#endif - /* 0xBFC261A4: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1A4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1A8u); -#endif - /* 0xBFC261AC: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1ACu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1ACu); -#endif -label_BFC261B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC261B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC261B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1B0u); -#endif - /* 0xBFC261B0: 8FB90060 lw $t9, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1B0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90060u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC261B4: 3C0E8004 lui $t6, 0x8004 */ - cpu->gpr[14] = 0x80040000u; - PGXP_ALU(0x3C0E8004u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC261B8: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1B8u); return; } g_debug_last_store_pc = 0x8003E1B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1B8u); -#endif - /* 0xBFC261BC: 8D220034 lw $v0, 52($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1BCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } - PGXP_LOAD(0x8D220034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC261C0: 25CEAB80 addiu $t6, $t6, -21632 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-21632)); - PGXP_ALU(0x25CEAB80u, cpu->gpr[14], _pgx1, 0xFFFFAB80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC261C4: 15C20010 bne $t6, $v0, 0xBFC26208 */ - uint32_t psx_brA_BFC261C4 = cpu->gpr[14]; uint32_t psx_brB_BFC261C4 = cpu->gpr[2]; - psx_taken_BFC261C4 = (psx_brA_BFC261C4 != psx_brB_BFC261C4); - psx_delay_BFC261C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1C8u); -#endif - if (psx_delay_BFC261C4) { - psx_delay_BFC261C4 = 0; - if (psx_taken_BFC261C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E208u); - goto label_BFC26208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E1CCu); - } -label_BFC261CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC261CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC261CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1CCu); -#endif - /* 0xBFC261CC: 8D2F002C lw $t7, 44($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1CCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x200u); } - PGXP_LOAD(0x8D2F002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC261D4: 31F80020 andi $t8, $t7, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x20u; - PGXP_ALU(0x31F80020u, cpu->gpr[24], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC261D8: 1700002C bne $t8, $zero, 0xBFC2628C */ - uint32_t psx_brA_BFC261D8 = cpu->gpr[24]; uint32_t psx_brB_BFC261D8 = cpu->gpr[0]; - psx_taken_BFC261D8 = (psx_brA_BFC261D8 != psx_brB_BFC261D8); - psx_delay_BFC261D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1DCu); -#endif - if (psx_delay_BFC261D8) { - psx_delay_BFC261D8 = 0; - if (psx_taken_BFC261D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - goto label_BFC2628C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E1E0u); - } -label_BFC261E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC261E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC261E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC261E0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC261E4: 0C00ED40 jal 0xB003B500 */ - cpu->gpr[31] = 0x8003E1ECu; /* jal link before delay slot */ - psx_delay_BFC261E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC261E8: AFA90034 sw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1E8u); return; } g_debug_last_store_pc = 0x8003E1E8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1E8u); -#endif - if (psx_delay_BFC261E4) { - psx_delay_BFC261E4 = 0; - cpu->gpr[31] = 0x8003E1ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B500u); - cpu->pc = 0x8003B500u; return; - } -label_BFC261EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC261ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC261ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1ECu); -#endif - /* 0xBFC261EC: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1ECu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1F0u); -#endif - /* 0xBFC261F4: 8D240004 lw $a0, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E1F4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200u); } - PGXP_LOAD(0x8D240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC261F8: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003E200u; /* jal link before delay slot */ - psx_delay_BFC261F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC261FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E1FCu); -#endif - if (psx_delay_BFC261F8) { - psx_delay_BFC261F8 = 0; - cpu->gpr[31] = 0x8003E200u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC26200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26200: 10000022 beq $zero, $zero, 0xBFC2628C */ - uint32_t psx_brA_BFC26200 = cpu->gpr[0]; uint32_t psx_brB_BFC26200 = cpu->gpr[0]; - psx_taken_BFC26200 = (psx_brA_BFC26200 == psx_brB_BFC26200); - psx_delay_BFC26200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E204u); -#endif - if (psx_delay_BFC26200) { - psx_delay_BFC26200 = 0; - if (psx_taken_BFC26200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - goto label_BFC2628C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E208u); - } -label_BFC26208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC26208: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E208u); -#endif - /* 0xBFC2620C: 8F396F00 lw $t9, 28416($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 28416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (28416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E20Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396F00u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26210: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC26214: 1320001D beq $t9, $zero, 0xBFC2628C */ - uint32_t psx_brA_BFC26214 = cpu->gpr[25]; uint32_t psx_brB_BFC26214 = cpu->gpr[0]; - psx_taken_BFC26214 = (psx_brA_BFC26214 == psx_brB_BFC26214); - psx_delay_BFC26214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26218: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E218u); -#endif - if (psx_delay_BFC26214) { - psx_delay_BFC26214 = 0; - if (psx_taken_BFC26214) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - goto label_BFC2628C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E21Cu); - } -label_BFC2621C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2621Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2621C: 3C0E8004 lui $t6, 0x8004 */ - cpu->gpr[14] = 0x80040000u; - PGXP_ALU(0x3C0E8004u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26220: 25CE98CC addiu $t6, $t6, -26420 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-26420)); - PGXP_ALU(0x25CE98CCu, cpu->gpr[14], _pgx1, 0xFFFF98CCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC26224: 15C2000B bne $t6, $v0, 0xBFC26254 */ - uint32_t psx_brA_BFC26224 = cpu->gpr[14]; uint32_t psx_brB_BFC26224 = cpu->gpr[2]; - psx_taken_BFC26224 = (psx_brA_BFC26224 != psx_brB_BFC26224); - psx_delay_BFC26224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E228u); -#endif - if (psx_delay_BFC26224) { - psx_delay_BFC26224 = 0; - if (psx_taken_BFC26224) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E254u); - goto label_BFC26254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E22Cu); - } -label_BFC2622C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2622Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E22Cu); -#endif - /* 0xBFC2622C: 8FAF0064 lw $t7, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E22Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0064u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26230: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26234: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC26238: 01E1C024 and $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1]; - PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2623C: 13000005 beq $t8, $zero, 0xBFC26254 */ - uint32_t psx_brA_BFC2623C = cpu->gpr[24]; uint32_t psx_brB_BFC2623C = cpu->gpr[0]; - psx_taken_BFC2623C = (psx_brA_BFC2623C == psx_brB_BFC2623C); - psx_delay_BFC2623C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E240u); -#endif - if (psx_delay_BFC2623C) { - psx_delay_BFC2623C = 0; - if (psx_taken_BFC2623C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E254u); - goto label_BFC26254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E244u); - } -label_BFC26244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26244: 0C00F99C jal 0xB003E670 */ - cpu->gpr[31] = 0x8003E24Cu; /* jal link before delay slot */ - psx_delay_BFC26244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E248u); -#endif - if (psx_delay_BFC26244) { - psx_delay_BFC26244 = 0; - cpu->gpr[31] = 0x8003E24Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E670u); - cpu->pc = 0x8003E670u; return; - } -label_BFC2624C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2624Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2624C: 10000032 beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC2624C = cpu->gpr[0]; uint32_t psx_brB_BFC2624C = cpu->gpr[0]; - psx_taken_BFC2624C = (psx_brA_BFC2624C == psx_brB_BFC2624C); - psx_delay_BFC2624C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26250: 2402FFFE addiu $v0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2402FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E250u); -#endif - if (psx_delay_BFC2624C) { - psx_delay_BFC2624C = 0; - if (psx_taken_BFC2624C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E254u); - } -label_BFC26254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC26254: 3C198003 lui $t9, 0x8003 */ - cpu->gpr[25] = 0x80030000u; - PGXP_ALU(0x3C198003u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC26258: 273948EC addiu $t9, $t9, 18668 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (18668)); - PGXP_ALU(0x273948ECu, cpu->gpr[25], _pgx1, 0x000048ECu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2625C: 1722000B bne $t9, $v0, 0xBFC2628C */ - uint32_t psx_brA_BFC2625C = cpu->gpr[25]; uint32_t psx_brB_BFC2625C = cpu->gpr[2]; - psx_taken_BFC2625C = (psx_brA_BFC2625C != psx_brB_BFC2625C); - psx_delay_BFC2625C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26260: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E260u); -#endif - if (psx_delay_BFC2625C) { - psx_delay_BFC2625C = 0; - if (psx_taken_BFC2625C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - goto label_BFC2628C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E264u); - } -label_BFC26264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E264u); -#endif - /* 0xBFC26264: 8FAE0064 lw $t6, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E264u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0064u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26268: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2626C: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC26270: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC26274: 11E00005 beq $t7, $zero, 0xBFC2628C */ - uint32_t psx_brA_BFC26274 = cpu->gpr[15]; uint32_t psx_brB_BFC26274 = cpu->gpr[0]; - psx_taken_BFC26274 = (psx_brA_BFC26274 == psx_brB_BFC26274); - psx_delay_BFC26274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E278u); -#endif - if (psx_delay_BFC26274) { - psx_delay_BFC26274 = 0; - if (psx_taken_BFC26274) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - goto label_BFC2628C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E27Cu); - } -label_BFC2627C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2627Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2627C: 0C00F99C jal 0xB003E670 */ - cpu->gpr[31] = 0x8003E284u; /* jal link before delay slot */ - psx_delay_BFC2627C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26280: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E280u); -#endif - if (psx_delay_BFC2627C) { - psx_delay_BFC2627C = 0; - cpu->gpr[31] = 0x8003E284u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E670u); - cpu->pc = 0x8003E670u; return; - } -label_BFC26284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26284: 10000024 beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC26284 = cpu->gpr[0]; uint32_t psx_brB_BFC26284 = cpu->gpr[0]; - psx_taken_BFC26284 = (psx_brA_BFC26284 == psx_brB_BFC26284); - psx_delay_BFC26284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26288: 2402FFFE addiu $v0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2402FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E288u); -#endif - if (psx_delay_BFC26284) { - psx_delay_BFC26284 = 0; - if (psx_taken_BFC26284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E28Cu); - } -label_BFC2628C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2628Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2628C: 10000022 beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC2628C = cpu->gpr[0]; uint32_t psx_brB_BFC2628C = cpu->gpr[0]; - psx_taken_BFC2628C = (psx_brA_BFC2628C == psx_brB_BFC2628C); - psx_delay_BFC2628C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26290: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E290u); -#endif - if (psx_delay_BFC2628C) { - psx_delay_BFC2628C = 0; - if (psx_taken_BFC2628C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E294u); - } -label_BFC26294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC26294: 254A0001 addiu $t2, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E294u); -#endif -label_BFC26298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC26298: 154CFF74 bne $t2, $t4, 0xBFC2606C */ - uint32_t psx_brA_BFC26298 = cpu->gpr[10]; uint32_t psx_brB_BFC26298 = cpu->gpr[12]; - psx_taken_BFC26298 = (psx_brA_BFC26298 != psx_brB_BFC26298); - psx_delay_BFC26298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2629C: 25290688 addiu $t1, $t1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1672)); - PGXP_ALU(0x25290688u, cpu->gpr[9], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E29Cu); -#endif - if (psx_delay_BFC26298) { - psx_delay_BFC26298 = 0; - if (psx_taken_BFC26298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E06Cu); - goto label_BFC2606C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2A0u); - } -label_BFC262A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC262A0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E2A0u); -#endif - /* 0xBFC262A4: 8F189E2C lw $t8, -25044($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E2A4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189E2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262A8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC262AC: 1701001A bne $t8, $at, 0xBFC26318 */ - uint32_t psx_brA_BFC262AC = cpu->gpr[24]; uint32_t psx_brB_BFC262AC = cpu->gpr[1]; - psx_taken_BFC262AC = (psx_brA_BFC262AC != psx_brB_BFC262AC); - psx_delay_BFC262AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC262B0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2B0u); -#endif - if (psx_delay_BFC262AC) { - psx_delay_BFC262AC = 0; - if (psx_taken_BFC262AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2B4u); - } -label_BFC262B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC262B4: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E2B4u); -#endif - /* 0xBFC262B8: 8F396EBC lw $t9, 28348($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 28348; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E2B8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F396EBCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC262BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC262C0: 17200014 bne $t9, $zero, 0xBFC26314 */ - uint32_t psx_brA_BFC262C0 = cpu->gpr[25]; uint32_t psx_brB_BFC262C0 = cpu->gpr[0]; - psx_taken_BFC262C0 = (psx_brA_BFC262C0 != psx_brB_BFC262C0); - psx_delay_BFC262C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC262C4: 2A210072 slti $at, $s1, 114 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (114) ? 1 : 0); - PGXP_ALU(0x2A210072u, cpu->gpr[1], _pgx1, 0x0072u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2C4u); -#endif - if (psx_delay_BFC262C0) { - psx_delay_BFC262C0 = 0; - if (psx_taken_BFC262C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E314u); - goto label_BFC26314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2C8u); - } -label_BFC262C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262C8: 14200012 bne $at, $zero, 0xBFC26314 */ - uint32_t psx_brA_BFC262C8 = cpu->gpr[1]; uint32_t psx_brB_BFC262C8 = cpu->gpr[0]; - psx_taken_BFC262C8 = (psx_brA_BFC262C8 != psx_brB_BFC262C8); - psx_delay_BFC262C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC262CC: 2A21016B slti $at, $s1, 363 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (363) ? 1 : 0); - PGXP_ALU(0x2A21016Bu, cpu->gpr[1], _pgx1, 0x016Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2CCu); -#endif - if (psx_delay_BFC262C8) { - psx_delay_BFC262C8 = 0; - if (psx_taken_BFC262C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E314u); - goto label_BFC26314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2D0u); - } -label_BFC262D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262D0: 10200010 beq $at, $zero, 0xBFC26314 */ - uint32_t psx_brA_BFC262D0 = cpu->gpr[1]; uint32_t psx_brB_BFC262D0 = cpu->gpr[0]; - psx_taken_BFC262D0 = (psx_brA_BFC262D0 == psx_brB_BFC262D0); - psx_delay_BFC262D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC262D4: 2A010015 slti $at, $s0, 21 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (21) ? 1 : 0); - PGXP_ALU(0x2A010015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2D4u); -#endif - if (psx_delay_BFC262D0) { - psx_delay_BFC262D0 = 0; - if (psx_taken_BFC262D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E314u); - goto label_BFC26314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2D8u); - } -label_BFC262D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262D8: 14200007 bne $at, $zero, 0xBFC262F8 */ - uint32_t psx_brA_BFC262D8 = cpu->gpr[1]; uint32_t psx_brB_BFC262D8 = cpu->gpr[0]; - psx_taken_BFC262D8 = (psx_brA_BFC262D8 != psx_brB_BFC262D8); - psx_delay_BFC262D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC262DC: 2A0100B3 slti $at, $s0, 179 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (179) ? 1 : 0); - PGXP_ALU(0x2A0100B3u, cpu->gpr[1], _pgx1, 0x00B3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2DCu); -#endif - if (psx_delay_BFC262D8) { - psx_delay_BFC262D8 = 0; - if (psx_taken_BFC262D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2F8u); - goto label_BFC262F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2E0u); - } -label_BFC262E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262E0: 10200006 beq $at, $zero, 0xBFC262FC */ - uint32_t psx_brA_BFC262E0 = cpu->gpr[1]; uint32_t psx_brB_BFC262E0 = cpu->gpr[0]; - psx_taken_BFC262E0 = (psx_brA_BFC262E0 == psx_brB_BFC262E0); - psx_delay_BFC262E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC262E4: 2A0101A7 slti $at, $s0, 423 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0); - PGXP_ALU(0x2A0101A7u, cpu->gpr[1], _pgx1, 0x01A7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2E4u); -#endif - if (psx_delay_BFC262E0) { - psx_delay_BFC262E0 = 0; - if (psx_taken_BFC262E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2FCu); - goto label_BFC262FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2E8u); - } -label_BFC262E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC262E8: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003E2F0u; /* jal link before delay slot */ - psx_delay_BFC262E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC262EC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2ECu); -#endif - if (psx_delay_BFC262E8) { - psx_delay_BFC262E8 = 0; - cpu->gpr[31] = 0x8003E2F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC262F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC262F0: 10000009 beq $zero, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC262F0 = cpu->gpr[0]; uint32_t psx_brB_BFC262F0 = cpu->gpr[0]; - psx_taken_BFC262F0 = (psx_brA_BFC262F0 == psx_brB_BFC262F0); - psx_delay_BFC262F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC262F4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2F4u); -#endif - if (psx_delay_BFC262F0) { - psx_delay_BFC262F0 = 0; - if (psx_taken_BFC262F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E2F8u); - } -label_BFC262F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC262F8: 2A0101A7 slti $at, $s0, 423 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (423) ? 1 : 0); - PGXP_ALU(0x2A0101A7u, cpu->gpr[1], _pgx1, 0x01A7u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E2F8u); -#endif -label_BFC262FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC262FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC262FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC262FC: 14200005 bne $at, $zero, 0xBFC26314 */ - uint32_t psx_brA_BFC262FC = cpu->gpr[1]; uint32_t psx_brB_BFC262FC = cpu->gpr[0]; - psx_taken_BFC262FC = (psx_brA_BFC262FC != psx_brB_BFC262FC); - psx_delay_BFC262FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC26300: 2A010245 slti $at, $s0, 581 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (581) ? 1 : 0); - PGXP_ALU(0x2A010245u, cpu->gpr[1], _pgx1, 0x0245u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E300u); -#endif - if (psx_delay_BFC262FC) { - psx_delay_BFC262FC = 0; - if (psx_taken_BFC262FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E314u); - goto label_BFC26314; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E304u); - } -label_BFC26304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26304: 10200004 beq $at, $zero, 0xBFC26318 */ - uint32_t psx_brA_BFC26304 = cpu->gpr[1]; uint32_t psx_brB_BFC26304 = cpu->gpr[0]; - psx_taken_BFC26304 = (psx_brA_BFC26304 == psx_brB_BFC26304); - psx_delay_BFC26304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26308: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E308u); -#endif - if (psx_delay_BFC26304) { - psx_delay_BFC26304 = 0; - if (psx_taken_BFC26304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E318u); - goto label_BFC26318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E30Cu); - } -label_BFC2630C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2630Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2630C: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x8003E314u; /* jal link before delay slot */ - psx_delay_BFC2630C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26310: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E310u); -#endif - if (psx_delay_BFC2630C) { - psx_delay_BFC2630C = 0; - cpu->gpr[31] = 0x8003E314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC26314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26314: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E314u); -#endif -label_BFC26318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E318u); -#endif - /* 0xBFC26318: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E318u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E318u); -#endif - /* 0xBFC2631C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E31Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E320u); -#endif - /* 0xBFC26320: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E320u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26324: 03E00008 jr $ra */ - psx_delay_BFC26324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26328: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E328u); -#endif - if (psx_delay_BFC26324) { - psx_delay_BFC26324 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2632C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2632Cu); - int psx_delay_BFC2633C = 0; - int psx_taken_BFC2633C = 0; - int psx_delay_BFC26350 = 0; - int psx_delay_BFC26360 = 0; - int psx_delay_BFC26380 = 0; - int psx_taken_BFC26380 = 0; - int psx_delay_BFC26388 = 0; - int psx_taken_BFC26388 = 0; - int psx_delay_BFC26390 = 0; - int psx_taken_BFC26390 = 0; - int psx_delay_BFC26398 = 0; - int psx_taken_BFC26398 = 0; - int psx_delay_BFC263A0 = 0; - int psx_taken_BFC263A0 = 0; - int psx_delay_BFC263D0 = 0; - int psx_taken_BFC263D0 = 0; - int psx_delay_BFC263D8 = 0; - int psx_taken_BFC263D8 = 0; - int psx_delay_BFC263E8 = 0; - int psx_taken_BFC263E8 = 0; - int psx_delay_BFC263F4 = 0; - int psx_taken_BFC263F4 = 0; - int psx_delay_BFC263FC = 0; - int psx_delay_BFC26404 = 0; - int psx_taken_BFC26404 = 0; - int psx_delay_BFC2640C = 0; - int psx_taken_BFC2640C = 0; - int psx_delay_BFC26418 = 0; - int psx_taken_BFC26418 = 0; - int psx_delay_BFC26420 = 0; - int psx_delay_BFC26428 = 0; - int psx_taken_BFC26428 = 0; - int psx_delay_BFC26430 = 0; - int psx_taken_BFC26430 = 0; - int psx_delay_BFC26444 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26344u: goto label_BFC26344; - case 0xBFC26358u: goto label_BFC26358; - case 0xBFC26360u: goto label_BFC26360; - case 0xBFC26368u: goto label_BFC26368; - case 0xBFC26378u: goto label_BFC26378; - case 0xBFC26388u: goto label_BFC26388; - case 0xBFC26390u: goto label_BFC26390; - case 0xBFC26398u: goto label_BFC26398; - case 0xBFC263A0u: goto label_BFC263A0; - case 0xBFC263A8u: goto label_BFC263A8; - case 0xBFC263C8u: goto label_BFC263C8; - case 0xBFC263D8u: goto label_BFC263D8; - case 0xBFC263E0u: goto label_BFC263E0; - case 0xBFC263F0u: goto label_BFC263F0; - case 0xBFC263FCu: goto label_BFC263FC; - case 0xBFC26404u: goto label_BFC26404; - case 0xBFC2640Cu: goto label_BFC2640C; - case 0xBFC26414u: goto label_BFC26414; - case 0xBFC26420u: goto label_BFC26420; - case 0xBFC26428u: goto label_BFC26428; - case 0xBFC26430u: goto label_BFC26430; - case 0xBFC26438u: goto label_BFC26438; - case 0xBFC2643Cu: goto label_BFC2643C; - default: break; - } - } -label_BFC2632C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2632Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2632C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E330u); -#endif - /* 0xBFC26330: 8DCE6ED4 lw $t6, 28372($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 28372; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (28372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E330u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6ED4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26334: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26338: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E338u); return; } g_debug_last_store_pc = 0x8003E338u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2633C: 11C00008 beq $t6, $zero, 0xBFC26360 */ - uint32_t psx_brA_BFC2633C = cpu->gpr[14]; uint32_t psx_brB_BFC2633C = cpu->gpr[0]; - psx_taken_BFC2633C = (psx_brA_BFC2633C == psx_brB_BFC2633C); - psx_delay_BFC2633C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC26340: 00804021 addu $t0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E340u); -#endif - if (psx_delay_BFC2633C) { - psx_delay_BFC2633C = 0; - if (psx_taken_BFC2633C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E360u); - goto label_BFC26360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E344u); - } -label_BFC26344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26344: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26348: AC206ED4 sw $zero, 28372($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E348u); return; } g_debug_last_store_pc = 0x8003E348u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206ED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2634C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26350: 0C00F72C jal 0xB003DCB0 */ - cpu->gpr[31] = 0x8003E358u; /* jal link before delay slot */ - psx_delay_BFC26350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC26354: AFA80018 sw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E354u); return; } g_debug_last_store_pc = 0x8003E354u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E354u); -#endif - if (psx_delay_BFC26350) { - psx_delay_BFC26350 = 0; - cpu->gpr[31] = 0x8003E358u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCB0u); - cpu->pc = 0x8003DCB0u; return; - } -label_BFC26358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E358u); -#endif - /* 0xBFC26358: 8FA80018 lw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E358u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2635C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E35Cu); -#endif -label_BFC26360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26360: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003E368u; /* jal link before delay slot */ - psx_delay_BFC26360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC26364: AFA80018 sw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E364u); return; } g_debug_last_store_pc = 0x8003E364u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E364u); -#endif - if (psx_delay_BFC26360) { - psx_delay_BFC26360 = 0; - cpu->gpr[31] = 0x8003E368u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC26368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26368: 3C048011 lui $a0, 0x8011 */ - cpu->gpr[4] = 0x80110000u; - PGXP_ALU(0x3C048011u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E368u); -#endif - /* 0xBFC2636C: 8FA80018 lw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E36Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26370: 24840EC8 addiu $a0, $a0, 3784 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3784)); - PGXP_ALU(0x24840EC8u, cpu->gpr[4], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC26374: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E374u); -#endif -label_BFC26378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E378u); -#endif - /* 0xBFC26378: 8C830004 lw $v1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E378u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2637C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC26380: 14600003 bne $v1, $zero, 0xBFC26390 */ - uint32_t psx_brA_BFC26380 = cpu->gpr[3]; uint32_t psx_brB_BFC26380 = cpu->gpr[0]; - psx_taken_BFC26380 = (psx_brA_BFC26380 != psx_brB_BFC26380); - psx_delay_BFC26380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E384u); -#endif - if (psx_delay_BFC26380) { - psx_delay_BFC26380 = 0; - if (psx_taken_BFC26380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E390u); - goto label_BFC26390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E388u); - } -label_BFC26388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26388: 10000007 beq $zero, $zero, 0xBFC263A8 */ - uint32_t psx_brA_BFC26388 = cpu->gpr[0]; uint32_t psx_brB_BFC26388 = cpu->gpr[0]; - psx_taken_BFC26388 = (psx_brA_BFC26388 == psx_brB_BFC26388); - psx_delay_BFC26388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2638C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E38Cu); -#endif - if (psx_delay_BFC26388) { - psx_delay_BFC26388 = 0; - if (psx_taken_BFC26388) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3A8u); - goto label_BFC263A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E390u); - } -label_BFC26390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC26390: 14430003 bne $v0, $v1, 0xBFC263A0 */ - uint32_t psx_brA_BFC26390 = cpu->gpr[2]; uint32_t psx_brB_BFC26390 = cpu->gpr[3]; - psx_taken_BFC26390 = (psx_brA_BFC26390 != psx_brB_BFC26390); - psx_delay_BFC26390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26394: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E394u); -#endif - if (psx_delay_BFC26390) { - psx_delay_BFC26390 = 0; - if (psx_taken_BFC26390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3A0u); - goto label_BFC263A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E398u); - } -label_BFC26398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26398: 10000003 beq $zero, $zero, 0xBFC263A8 */ - uint32_t psx_brA_BFC26398 = cpu->gpr[0]; uint32_t psx_brB_BFC26398 = cpu->gpr[0]; - psx_taken_BFC26398 = (psx_brA_BFC26398 == psx_brB_BFC26398); - psx_delay_BFC26398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2639C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E39Cu); -#endif - if (psx_delay_BFC26398) { - psx_delay_BFC26398 = 0; - if (psx_taken_BFC26398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3A8u); - goto label_BFC263A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3A0u); - } -label_BFC263A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263A0: 1000FFF5 beq $zero, $zero, 0xBFC26378 */ - uint32_t psx_brA_BFC263A0 = cpu->gpr[0]; uint32_t psx_brB_BFC263A0 = cpu->gpr[0]; - psx_taken_BFC263A0 = (psx_brA_BFC263A0 == psx_brB_BFC263A0); - psx_delay_BFC263A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC263A4: 24840688 addiu $a0, $a0, 1672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1672)); - PGXP_ALU(0x24840688u, cpu->gpr[4], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3A4u); -#endif - if (psx_delay_BFC263A0) { - psx_delay_BFC263A0 = 0; - if (psx_taken_BFC263A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E378u); - goto label_BFC26378; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3A8u); - } -label_BFC263A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC263A8: 3C048011 lui $a0, 0x8011 */ - cpu->gpr[4] = 0x80110000u; - PGXP_ALU(0x3C048011u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC263AC: 3C0500F0 lui $a1, 0xF0 */ - cpu->gpr[5] = 0x00F00000u; - PGXP_ALU(0x3C0500F0u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC263B0: 3C068004 lui $a2, 0x8004 */ - cpu->gpr[6] = 0x80040000u; - PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC263B4: 3C078003 lui $a3, 0x8003 */ - cpu->gpr[7] = 0x80030000u; - PGXP_ALU(0x3C078003u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC263B8: 24E748EC addiu $a3, $a3, 18668 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (18668)); - PGXP_ALU(0x24E748ECu, cpu->gpr[7], _pgx1, 0x000048ECu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC263BC: 24C698CC addiu $a2, $a2, -26420 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-26420)); - PGXP_ALU(0x24C698CCu, cpu->gpr[6], _pgx1, 0xFFFF98CCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC263C0: 34A500F0 ori $a1, $a1, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0xF0u; - PGXP_ALU(0x34A500F0u, cpu->gpr[5], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC263C4: 24840EC8 addiu $a0, $a0, 3784 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3784)); - PGXP_ALU(0x24840EC8u, cpu->gpr[4], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3C4u); -#endif -label_BFC263C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3C8u); -#endif - /* 0xBFC263C8: 8C830004 lw $v1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E3C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC263D0: 10600019 beq $v1, $zero, 0xBFC26438 */ - uint32_t psx_brA_BFC263D0 = cpu->gpr[3]; uint32_t psx_brB_BFC263D0 = cpu->gpr[0]; - psx_taken_BFC263D0 = (psx_brA_BFC263D0 == psx_brB_BFC263D0); - psx_delay_BFC263D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3D4u); -#endif - if (psx_delay_BFC263D0) { - psx_delay_BFC263D0 = 0; - if (psx_taken_BFC263D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E438u); - goto label_BFC26438; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3D8u); - } -label_BFC263D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC263D8: 14430015 bne $v0, $v1, 0xBFC26430 */ - uint32_t psx_brA_BFC263D8 = cpu->gpr[2]; uint32_t psx_brB_BFC263D8 = cpu->gpr[3]; - psx_taken_BFC263D8 = (psx_brA_BFC263D8 != psx_brB_BFC263D8); - psx_delay_BFC263D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3DCu); -#endif - if (psx_delay_BFC263D8) { - psx_delay_BFC263D8 = 0; - if (psx_taken_BFC263D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E430u); - goto label_BFC26430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3E0u); - } -label_BFC263E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3E0u); -#endif - /* 0xBFC263E0: 8C830034 lw $v1, 52($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E3E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC263E8: 14C30008 bne $a2, $v1, 0xBFC2640C */ - uint32_t psx_brA_BFC263E8 = cpu->gpr[6]; uint32_t psx_brB_BFC263E8 = cpu->gpr[3]; - psx_taken_BFC263E8 = (psx_brA_BFC263E8 != psx_brB_BFC263E8); - psx_delay_BFC263E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3ECu); -#endif - if (psx_delay_BFC263E8) { - psx_delay_BFC263E8 = 0; - if (psx_taken_BFC263E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E40Cu); - goto label_BFC2640C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3F0u); - } -label_BFC263F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8120u); -#endif - /* 0xBFC263F0: 01057824 and $t7, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[5]; - PGXP_ALU(0x01057824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC263F4: 11E00005 beq $t7, $zero, 0xBFC2640C */ - uint32_t psx_brA_BFC263F4 = cpu->gpr[15]; uint32_t psx_brB_BFC263F4 = cpu->gpr[0]; - psx_taken_BFC263F4 = (psx_brA_BFC263F4 == psx_brB_BFC263F4); - psx_delay_BFC263F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC263F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E3F8u); -#endif - if (psx_delay_BFC263F4) { - psx_delay_BFC263F4 = 0; - if (psx_taken_BFC263F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E40Cu); - goto label_BFC2640C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3FCu); - } -label_BFC263FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC263FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC263FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC263FC: 0C00F99C jal 0xB003E670 */ - cpu->gpr[31] = 0x8003E404u; /* jal link before delay slot */ - psx_delay_BFC263FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26400: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E400u); -#endif - if (psx_delay_BFC263FC) { - psx_delay_BFC263FC = 0; - cpu->gpr[31] = 0x8003E404u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E670u); - cpu->pc = 0x8003E670u; return; - } -label_BFC26404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26404: 1000000D beq $zero, $zero, 0xBFC2643C */ - uint32_t psx_brA_BFC26404 = cpu->gpr[0]; uint32_t psx_brB_BFC26404 = cpu->gpr[0]; - psx_taken_BFC26404 = (psx_brA_BFC26404 == psx_brB_BFC26404); - psx_delay_BFC26404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26408: 2402FFFE addiu $v0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2402FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E408u); -#endif - if (psx_delay_BFC26404) { - psx_delay_BFC26404 = 0; - if (psx_taken_BFC26404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E43Cu); - goto label_BFC2643C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E40Cu); - } -label_BFC2640C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2640Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2640Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2640C: 14E30008 bne $a3, $v1, 0xBFC26430 */ - uint32_t psx_brA_BFC2640C = cpu->gpr[7]; uint32_t psx_brB_BFC2640C = cpu->gpr[3]; - psx_taken_BFC2640C = (psx_brA_BFC2640C != psx_brB_BFC2640C); - psx_delay_BFC2640C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E410u); -#endif - if (psx_delay_BFC2640C) { - psx_delay_BFC2640C = 0; - if (psx_taken_BFC2640C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E430u); - goto label_BFC26430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E414u); - } -label_BFC26414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000120u); -#endif - /* 0xBFC26414: 0105C024 and $t8, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[8] & cpu->gpr[5]; - PGXP_ALU(0x0105C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26418: 13000005 beq $t8, $zero, 0xBFC26430 */ - uint32_t psx_brA_BFC26418 = cpu->gpr[24]; uint32_t psx_brB_BFC26418 = cpu->gpr[0]; - psx_taken_BFC26418 = (psx_brA_BFC26418 == psx_brB_BFC26418); - psx_delay_BFC26418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2641C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E41Cu); -#endif - if (psx_delay_BFC26418) { - psx_delay_BFC26418 = 0; - if (psx_taken_BFC26418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E430u); - goto label_BFC26430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E420u); - } -label_BFC26420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26420: 0C00F99C jal 0xB003E670 */ - cpu->gpr[31] = 0x8003E428u; /* jal link before delay slot */ - psx_delay_BFC26420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26424: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E424u); -#endif - if (psx_delay_BFC26420) { - psx_delay_BFC26420 = 0; - cpu->gpr[31] = 0x8003E428u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E670u); - cpu->pc = 0x8003E670u; return; - } -label_BFC26428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26428: 10000004 beq $zero, $zero, 0xBFC2643C */ - uint32_t psx_brA_BFC26428 = cpu->gpr[0]; uint32_t psx_brB_BFC26428 = cpu->gpr[0]; - psx_taken_BFC26428 = (psx_brA_BFC26428 == psx_brB_BFC26428); - psx_delay_BFC26428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2642C: 2402FFFE addiu $v0, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2402FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E42Cu); -#endif - if (psx_delay_BFC26428) { - psx_delay_BFC26428 = 0; - if (psx_taken_BFC26428) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E43Cu); - goto label_BFC2643C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E430u); - } -label_BFC26430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26430: 1000FFE5 beq $zero, $zero, 0xBFC263C8 */ - uint32_t psx_brA_BFC26430 = cpu->gpr[0]; uint32_t psx_brB_BFC26430 = cpu->gpr[0]; - psx_taken_BFC26430 = (psx_brA_BFC26430 == psx_brB_BFC26430); - psx_delay_BFC26430 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26434: 24840688 addiu $a0, $a0, 1672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1672)); - PGXP_ALU(0x24840688u, cpu->gpr[4], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E434u); -#endif - if (psx_delay_BFC26430) { - psx_delay_BFC26430 = 0; - if (psx_taken_BFC26430) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E3C8u); - goto label_BFC263C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E438u); - } -label_BFC26438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26438: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E438u); -#endif -label_BFC2643C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2643Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2643Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E43Cu); -#endif - /* 0xBFC2643C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E43Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26440: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26444: 03E00008 jr $ra */ - psx_delay_BFC26444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26448: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E448u); -#endif - if (psx_delay_BFC26444) { - psx_delay_BFC26444 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2644C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2644Cu); - int psx_delay_BFC26460 = 0; - int psx_delay_BFC2646C = 0; - int psx_delay_BFC26498 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26468u: goto label_BFC26468; - case 0xBFC26474u: goto label_BFC26474; - default: break; - } - } -label_BFC2644C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2644Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2644C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26450: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E450u); return; } g_debug_last_store_pc = 0x8003E450u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26454: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26458: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2645C: 24060260 addiu $a2, $zero, 608 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (608)); - PGXP_ALU(0x24060260u, cpu->gpr[6], _pgx1, 0x00000260u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26460: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003E468u; /* jal link before delay slot */ - psx_delay_BFC26460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26464: 240701B0 addiu $a3, $zero, 432 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (432)); - PGXP_ALU(0x240701B0u, cpu->gpr[7], _pgx1, 0x000001B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E464u); -#endif - if (psx_delay_BFC26460) { - psx_delay_BFC26460 = 0; - cpu->gpr[31] = 0x8003E468u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC26468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26468: 24040064 addiu $a0, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2646C: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E474u; /* jal link before delay slot */ - psx_delay_BFC2646C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26470: 24050064 addiu $a1, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24050064u, cpu->gpr[5], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E470u); -#endif - if (psx_delay_BFC2646C) { - psx_delay_BFC2646C = 0; - cpu->gpr[31] = 0x8003E474u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC26474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC26474: 240E0002 addiu $t6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240E0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26478: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2647C: AC2E6EC0 sw $t6, 28352($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28352; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E47Cu); return; } g_debug_last_store_pc = 0x8003E47Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6EC0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26480: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC26484: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E484u); -#endif - /* 0xBFC26488: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E488u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2648C: AC2F6EB8 sw $t7, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E48Cu); return; } g_debug_last_store_pc = 0x8003E48Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6EB8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26490: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26494: AC206EBC sw $zero, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E494u); return; } g_debug_last_store_pc = 0x8003E494u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26498: 03E00008 jr $ra */ - psx_delay_BFC26498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2649C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E49Cu); -#endif - if (psx_delay_BFC26498) { - psx_delay_BFC26498 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC264A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC264A0u); - int psx_delay_BFC264B0 = 0; - int psx_taken_BFC264B0 = 0; - int psx_delay_BFC264C8 = 0; - int psx_delay_BFC264E4 = 0; - int psx_delay_BFC264EC = 0; - int psx_delay_BFC26500 = 0; - int psx_delay_BFC26508 = 0; - int psx_delay_BFC26510 = 0; - int psx_delay_BFC26524 = 0; - int psx_delay_BFC26548 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC264B8u: goto label_BFC264B8; - case 0xBFC264D0u: goto label_BFC264D0; - case 0xBFC264ECu: goto label_BFC264EC; - case 0xBFC264F4u: goto label_BFC264F4; - case 0xBFC26508u: goto label_BFC26508; - case 0xBFC26510u: goto label_BFC26510; - case 0xBFC26518u: goto label_BFC26518; - case 0xBFC2652Cu: goto label_BFC2652C; - default: break; - } - } -label_BFC264A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC264A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC264A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC264A0: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4A0u); -#endif - /* 0xBFC264A4: 8DCE6C64 lw $t6, 27748($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E4A4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6C64u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC264A8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC264AC: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC264B0: 15C1000E bne $t6, $at, 0xBFC264EC */ - uint32_t psx_brA_BFC264B0 = cpu->gpr[14]; uint32_t psx_brB_BFC264B0 = cpu->gpr[1]; - psx_taken_BFC264B0 = (psx_brA_BFC264B0 != psx_brB_BFC264B0); - psx_delay_BFC264B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC264B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E4B4u); return; } g_debug_last_store_pc = 0x8003E4B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4B4u); -#endif - if (psx_delay_BFC264B0) { - psx_delay_BFC264B0 = 0; - if (psx_taken_BFC264B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4ECu); - goto label_BFC264EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E4B8u); - } -label_BFC264B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC264B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC264B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC264B8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC264BC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC264C0: AC206C64 sw $zero, 27748($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27748; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E4C0u); return; } g_debug_last_store_pc = 0x8003E4C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC264C4: 24843C60 addiu $a0, $a0, 15456 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15456)); - PGXP_ALU(0x24843C60u, cpu->gpr[4], _pgx1, 0x00003C60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC264C8: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8003E4D0u; /* jal link before delay slot */ - psx_delay_BFC264C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC264CC: 240503FE addiu $a1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240503FEu, cpu->gpr[5], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4CCu); -#endif - if (psx_delay_BFC264C8) { - psx_delay_BFC264C8 = 0; - cpu->gpr[31] = 0x8003E4D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC264D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC264D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC264D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC264D0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC264D4: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4D4u); -#endif - /* 0xBFC264D8: 84C63D14 lh $a2, 15636($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 15636; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (15636)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E4D8u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x84C63D14u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4D8u); -#endif - /* 0xBFC264DC: 84A53D12 lh $a1, 15634($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 15634; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (15634)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E4DCu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A53D12u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC264E0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC264E4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003E4ECu; /* jal link before delay slot */ - psx_delay_BFC264E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC264E8: 24843C60 addiu $a0, $a0, 15456 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15456)); - PGXP_ALU(0x24843C60u, cpu->gpr[4], _pgx1, 0x00003C60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4E8u); -#endif - if (psx_delay_BFC264E4) { - psx_delay_BFC264E4 = 0; - cpu->gpr[31] = 0x8003E4ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC264EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC264ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC264ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC264EC: 0C00F72E jal 0xB003DCB8 */ - cpu->gpr[31] = 0x8003E4F4u; /* jal link before delay slot */ - psx_delay_BFC264EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC264F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E4F0u); -#endif - if (psx_delay_BFC264EC) { - psx_delay_BFC264EC = 0; - cpu->gpr[31] = 0x8003E4F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCB8u); - cpu->pc = 0x8003DCB8u; return; - } -label_BFC264F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC264F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC264F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC264F4: 240400DE addiu $a0, $zero, 222 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (222)); - PGXP_ALU(0x240400DEu, cpu->gpr[4], _pgx1, 0x000000DEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC264F8: 24050065 addiu $a1, $zero, 101 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (101)); - PGXP_ALU(0x24050065u, cpu->gpr[5], _pgx1, 0x00000065u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC264FC: 240600AC addiu $a2, $zero, 172 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (172)); - PGXP_ALU(0x240600ACu, cpu->gpr[6], _pgx1, 0x000000ACu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26500: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003E508u; /* jal link before delay slot */ - psx_delay_BFC26500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26504: 24070107 addiu $a3, $zero, 263 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (263)); - PGXP_ALU(0x24070107u, cpu->gpr[7], _pgx1, 0x00000107u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E504u); -#endif - if (psx_delay_BFC26500) { - psx_delay_BFC26500 = 0; - cpu->gpr[31] = 0x8003E508u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC26508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26508: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003E510u; /* jal link before delay slot */ - psx_delay_BFC26508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2650C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E50Cu); -#endif - if (psx_delay_BFC26508) { - psx_delay_BFC26508 = 0; - cpu->gpr[31] = 0x8003E510u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC26510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26510: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003E518u; /* jal link before delay slot */ - psx_delay_BFC26510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC26514: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E514u); -#endif - if (psx_delay_BFC26510) { - psx_delay_BFC26510 = 0; - cpu->gpr[31] = 0x8003E518u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC26518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E518u); -#endif - /* 0xBFC26518: 84440042 lh $a0, 66($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E518u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x84440042u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E518u); -#endif - /* 0xBFC2651C: 84450044 lh $a1, 68($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E51Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x84450044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26520: 2484FFF4 addiu $a0, $a0, -12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-12)); - PGXP_ALU(0x2484FFF4u, cpu->gpr[4], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26524: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E52Cu; /* jal link before delay slot */ - psx_delay_BFC26524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26528: 24A5FFF4 addiu $a1, $a1, -12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12)); - PGXP_ALU(0x24A5FFF4u, cpu->gpr[5], _pgx1, 0xFFFFFFF4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E528u); -#endif - if (psx_delay_BFC26524) { - psx_delay_BFC26524 = 0; - cpu->gpr[31] = 0x8003E52Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC2652C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2652Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2652Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2652C: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26530: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E530u); -#endif - /* 0xBFC26534: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E534u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC26538: AC2F6EB8 sw $t7, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E538u); return; } g_debug_last_store_pc = 0x8003E538u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6EB8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2653C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26540: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC26544: AC386EBC sw $t8, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E544u); return; } g_debug_last_store_pc = 0x8003E544u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386EBCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26548: 03E00008 jr $ra */ - psx_delay_BFC26548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2654C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E54Cu); -#endif - if (psx_delay_BFC26548) { - psx_delay_BFC26548 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26550(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26550u); - int psx_delay_BFC26564 = 0; - int psx_delay_BFC26578 = 0; - int psx_taken_BFC26578 = 0; - int psx_delay_BFC26584 = 0; - int psx_delay_BFC2658C = 0; - int psx_taken_BFC2658C = 0; - int psx_delay_BFC26598 = 0; - int psx_delay_BFC265B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2656Cu: goto label_BFC2656C; - case 0xBFC26580u: goto label_BFC26580; - case 0xBFC2658Cu: goto label_BFC2658C; - case 0xBFC26594u: goto label_BFC26594; - case 0xBFC26598u: goto label_BFC26598; - case 0xBFC265A0u: goto label_BFC265A0; - case 0xBFC265A4u: goto label_BFC265A4; - default: break; - } - } -label_BFC26550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26550: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26554: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E554u); return; } g_debug_last_store_pc = 0x8003E554u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26558: 240400B2 addiu $a0, $zero, 178 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (178)); - PGXP_ALU(0x240400B2u, cpu->gpr[4], _pgx1, 0x000000B2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2655C: 240500A8 addiu $a1, $zero, 168 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (168)); - PGXP_ALU(0x240500A8u, cpu->gpr[5], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC26560: 24060104 addiu $a2, $zero, 260 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (260)); - PGXP_ALU(0x24060104u, cpu->gpr[6], _pgx1, 0x00000104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26564: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003E56Cu; /* jal link before delay slot */ - psx_delay_BFC26564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26568: 24070078 addiu $a3, $zero, 120 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); - PGXP_ALU(0x24070078u, cpu->gpr[7], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E568u); -#endif - if (psx_delay_BFC26564) { - psx_delay_BFC26564 = 0; - cpu->gpr[31] = 0x8003E56Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC2656C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2656Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2656Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2656C: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E570u); -#endif - /* 0xBFC26570: 8DCE6BC0 lw $t6, 27584($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E570u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6BC0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26574: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26578: 15C10007 bne $t6, $at, 0xBFC26598 */ - uint32_t psx_brA_BFC26578 = cpu->gpr[14]; uint32_t psx_brB_BFC26578 = cpu->gpr[1]; - psx_taken_BFC26578 = (psx_brA_BFC26578 != psx_brB_BFC26578); - psx_delay_BFC26578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2657C: 24040104 addiu $a0, $zero, 260 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (260)); - PGXP_ALU(0x24040104u, cpu->gpr[4], _pgx1, 0x00000104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E57Cu); -#endif - if (psx_delay_BFC26578) { - psx_delay_BFC26578 = 0; - if (psx_taken_BFC26578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E598u); - goto label_BFC26598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E580u); - } -label_BFC26580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26580: 24040164 addiu $a0, $zero, 356 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (356)); - PGXP_ALU(0x24040164u, cpu->gpr[4], _pgx1, 0x00000164u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26584: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E58Cu; /* jal link before delay slot */ - psx_delay_BFC26584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26588: 240500E4 addiu $a1, $zero, 228 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (228)); - PGXP_ALU(0x240500E4u, cpu->gpr[5], _pgx1, 0x000000E4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E588u); -#endif - if (psx_delay_BFC26584) { - psx_delay_BFC26584 = 0; - cpu->gpr[31] = 0x8003E58Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC2658C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2658Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2658Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2658C: 10000005 beq $zero, $zero, 0xBFC265A4 */ - uint32_t psx_brA_BFC2658C = cpu->gpr[0]; uint32_t psx_brB_BFC2658C = cpu->gpr[0]; - psx_taken_BFC2658C = (psx_brA_BFC2658C == psx_brB_BFC2658C); - psx_delay_BFC2658C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC26590: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E590u); -#endif - if (psx_delay_BFC2658C) { - psx_delay_BFC2658C = 0; - if (psx_taken_BFC2658C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E5A4u); - goto label_BFC265A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E594u); - } -label_BFC26594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26594: 24040104 addiu $a0, $zero, 260 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (260)); - PGXP_ALU(0x24040104u, cpu->gpr[4], _pgx1, 0x00000104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E594u); -#endif -label_BFC26598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26598: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E5A0u; /* jal link before delay slot */ - psx_delay_BFC26598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2659C: 240500E4 addiu $a1, $zero, 228 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (228)); - PGXP_ALU(0x240500E4u, cpu->gpr[5], _pgx1, 0x000000E4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E59Cu); -#endif - if (psx_delay_BFC26598) { - psx_delay_BFC26598 = 0; - cpu->gpr[31] = 0x8003E5A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC265A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC265A0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5A0u); -#endif -label_BFC265A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC265A4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E5A4u); -#endif - /* 0xBFC265A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC265AC: AC2F6EB8 sw $t7, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5ACu); return; } g_debug_last_store_pc = 0x8003E5ACu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6EB8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC265B0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC265B4: AC206EBC sw $zero, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5B4u); return; } g_debug_last_store_pc = 0x8003E5B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC265B8: 03E00008 jr $ra */ - psx_delay_BFC265B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC265BC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5BCu); -#endif - if (psx_delay_BFC265B8) { - psx_delay_BFC265B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC265C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC265C0u); - int psx_delay_BFC265C8 = 0; - int psx_delay_BFC265DC = 0; - int psx_delay_BFC265E8 = 0; - int psx_delay_BFC26608 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC265D0u: goto label_BFC265D0; - case 0xBFC265E4u: goto label_BFC265E4; - case 0xBFC265F0u: goto label_BFC265F0; - default: break; - } - } -label_BFC265C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC265C0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC265C4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5C4u); return; } g_debug_last_store_pc = 0x8003E5C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC265C8: 0C00F72C jal 0xB003DCB0 */ - cpu->gpr[31] = 0x8003E5D0u; /* jal link before delay slot */ - psx_delay_BFC265C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC265CC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5CCu); -#endif - if (psx_delay_BFC265C8) { - psx_delay_BFC265C8 = 0; - cpu->gpr[31] = 0x8003E5D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCB0u); - cpu->pc = 0x8003DCB0u; return; - } -label_BFC265D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC265D0: 24040014 addiu $a0, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24040014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC265D4: 24050071 addiu $a1, $zero, 113 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (113)); - PGXP_ALU(0x24050071u, cpu->gpr[5], _pgx1, 0x00000071u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC265D8: 240600AE addiu $a2, $zero, 174 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (174)); - PGXP_ALU(0x240600AEu, cpu->gpr[6], _pgx1, 0x000000AEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC265DC: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003E5E4u; /* jal link before delay slot */ - psx_delay_BFC265DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC265E0: 240700FA addiu $a3, $zero, 250 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (250)); - PGXP_ALU(0x240700FAu, cpu->gpr[7], _pgx1, 0x000000FAu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5E0u); -#endif - if (psx_delay_BFC265DC) { - psx_delay_BFC265DC = 0; - cpu->gpr[31] = 0x8003E5E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC265E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC265E4: 2404006B addiu $a0, $zero, 107 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (107)); - PGXP_ALU(0x2404006Bu, cpu->gpr[4], _pgx1, 0x0000006Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC265E8: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E5F0u; /* jal link before delay slot */ - psx_delay_BFC265E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC265EC: 240500EE addiu $a1, $zero, 238 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (238)); - PGXP_ALU(0x240500EEu, cpu->gpr[5], _pgx1, 0x000000EEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5ECu); -#endif - if (psx_delay_BFC265E8) { - psx_delay_BFC265E8 = 0; - cpu->gpr[31] = 0x8003E5F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC265F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC265F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC265F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC265F0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC265F4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E5F4u); -#endif - /* 0xBFC265F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC265FC: AC2E6EB8 sw $t6, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E5FCu); return; } g_debug_last_store_pc = 0x8003E5FCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6EB8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26600: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26604: AC206EBC sw $zero, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E604u); return; } g_debug_last_store_pc = 0x8003E604u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26608: 03E00008 jr $ra */ - psx_delay_BFC26608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2660C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E60Cu); -#endif - if (psx_delay_BFC26608) { - psx_delay_BFC26608 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26610(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26610u); - int psx_delay_BFC26618 = 0; - int psx_delay_BFC2662C = 0; - int psx_delay_BFC26638 = 0; - int psx_delay_BFC26658 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26620u: goto label_BFC26620; - case 0xBFC26634u: goto label_BFC26634; - case 0xBFC26640u: goto label_BFC26640; - default: break; - } - } -label_BFC26610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26610: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26614: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E614u); return; } g_debug_last_store_pc = 0x8003E614u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26618: 0C00F72C jal 0xB003DCB0 */ - cpu->gpr[31] = 0x8003E620u; /* jal link before delay slot */ - psx_delay_BFC26618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2661C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E61Cu); -#endif - if (psx_delay_BFC26618) { - psx_delay_BFC26618 = 0; - cpu->gpr[31] = 0x8003E620u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCB0u); - cpu->pc = 0x8003DCB0u; return; - } -label_BFC26620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26620: 240401A6 addiu $a0, $zero, 422 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (422)); - PGXP_ALU(0x240401A6u, cpu->gpr[4], _pgx1, 0x000001A6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26624: 24050071 addiu $a1, $zero, 113 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (113)); - PGXP_ALU(0x24050071u, cpu->gpr[5], _pgx1, 0x00000071u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC26628: 240600AE addiu $a2, $zero, 174 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (174)); - PGXP_ALU(0x240600AEu, cpu->gpr[6], _pgx1, 0x000000AEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2662C: 0C00F798 jal 0xB003DE60 */ - cpu->gpr[31] = 0x8003E634u; /* jal link before delay slot */ - psx_delay_BFC2662C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26630: 240700FA addiu $a3, $zero, 250 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (250)); - PGXP_ALU(0x240700FAu, cpu->gpr[7], _pgx1, 0x000000FAu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E630u); -#endif - if (psx_delay_BFC2662C) { - psx_delay_BFC2662C = 0; - cpu->gpr[31] = 0x8003E634u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DE60u); - cpu->pc = 0x8003DE60u; return; - } -label_BFC26634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26634: 240401FD addiu $a0, $zero, 509 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (509)); - PGXP_ALU(0x240401FDu, cpu->gpr[4], _pgx1, 0x000001FDu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26638: 0C00F64B jal 0xB003D92C */ - cpu->gpr[31] = 0x8003E640u; /* jal link before delay slot */ - psx_delay_BFC26638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2663C: 240500EE addiu $a1, $zero, 238 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (238)); - PGXP_ALU(0x240500EEu, cpu->gpr[5], _pgx1, 0x000000EEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E63Cu); -#endif - if (psx_delay_BFC26638) { - psx_delay_BFC26638 = 0; - cpu->gpr[31] = 0x8003E640u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003D92Cu); - cpu->pc = 0x8003D92Cu; return; - } -label_BFC26640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC26640: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26644: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E644u); -#endif - /* 0xBFC26648: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E648u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2664C: AC2E6EB8 sw $t6, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E64Cu); return; } g_debug_last_store_pc = 0x8003E64Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6EB8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26650: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26654: AC206EBC sw $zero, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E654u); return; } g_debug_last_store_pc = 0x8003E654u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EBCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26658: 03E00008 jr $ra */ - psx_delay_BFC26658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2665C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E65Cu); -#endif - if (psx_delay_BFC26658) { - psx_delay_BFC26658 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26660(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26660u); - int psx_delay_BFC26668 = 0; -label_BFC26660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26660: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E660u); -#endif - /* 0xBFC26664: 8C426C68 lw $v0, 27752($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E664u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426C68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26668: 03E00008 jr $ra */ - psx_delay_BFC26668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2666C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E66Cu); -#endif - if (psx_delay_BFC26668) { - psx_delay_BFC26668 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26670(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26670u); - int psx_delay_BFC26678 = 0; - int psx_delay_BFC266A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26680u: goto label_BFC26680; - default: break; - } - } -label_BFC26670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26670: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26674: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E674u); return; } g_debug_last_store_pc = 0x8003E674u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26678: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003E680u; /* jal link before delay slot */ - psx_delay_BFC26678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2667C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E67Cu); -#endif - if (psx_delay_BFC26678) { - psx_delay_BFC26678 = 0; - cpu->gpr[31] = 0x8003E680u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC26680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26680: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26684: 25CE3D50 addiu $t6, $t6, 15696 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (15696)); - PGXP_ALU(0x25CE3D50u, cpu->gpr[14], _pgx1, 0x00003D50u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26688: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E688u); -#endif - /* 0xBFC2668C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E68Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26690: AC2E3D40 sw $t6, 15680($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15680; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E690u); return; } g_debug_last_store_pc = 0x8003E690u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E3D40u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26694: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC26698: 240F0050 addiu $t7, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240F0050u, cpu->gpr[15], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2669C: AC2F6C68 sw $t7, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E69Cu); return; } g_debug_last_store_pc = 0x8003E69Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6C68u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC266A0: 03E00008 jr $ra */ - psx_delay_BFC266A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC266A4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6A4u); -#endif - if (psx_delay_BFC266A0) { - psx_delay_BFC266A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC266B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC266B0u); - int psx_delay_BFC266C0 = 0; - int psx_taken_BFC266C0 = 0; - int psx_delay_BFC266D4 = 0; - int psx_taken_BFC266D4 = 0; - int psx_delay_BFC266E4 = 0; - int psx_delay_BFC266FC = 0; - int psx_taken_BFC266FC = 0; - int psx_delay_BFC26720 = 0; - int psx_delay_BFC26734 = 0; - int psx_taken_BFC26734 = 0; - int psx_delay_BFC26748 = 0; - int psx_taken_BFC26748 = 0; - int psx_delay_BFC26758 = 0; - int psx_taken_BFC26758 = 0; - int psx_delay_BFC26760 = 0; - int psx_taken_BFC26760 = 0; - int psx_delay_BFC2676C = 0; - int psx_taken_BFC2676C = 0; - int psx_delay_BFC26778 = 0; - int psx_taken_BFC26778 = 0; - int psx_delay_BFC26790 = 0; - int psx_taken_BFC26790 = 0; - int psx_delay_BFC2679C = 0; - int psx_taken_BFC2679C = 0; - int psx_delay_BFC267A4 = 0; - int psx_taken_BFC267A4 = 0; - int psx_delay_BFC267C0 = 0; - int psx_taken_BFC267C0 = 0; - int psx_delay_BFC267D8 = 0; - int psx_taken_BFC267D8 = 0; - int psx_delay_BFC267E0 = 0; - int psx_taken_BFC267E0 = 0; - int psx_delay_BFC267F4 = 0; - int psx_taken_BFC267F4 = 0; - int psx_delay_BFC267FC = 0; - int psx_taken_BFC267FC = 0; - int psx_delay_BFC26818 = 0; - int psx_taken_BFC26818 = 0; - int psx_delay_BFC26824 = 0; - int psx_taken_BFC26824 = 0; - int psx_delay_BFC2682C = 0; - int psx_taken_BFC2682C = 0; - int psx_delay_BFC2683C = 0; - int psx_delay_BFC26848 = 0; - int psx_taken_BFC26848 = 0; - int psx_delay_BFC26868 = 0; - int psx_delay_BFC26870 = 0; - int psx_delay_BFC2688C = 0; - int psx_taken_BFC2688C = 0; - int psx_delay_BFC268A8 = 0; - int psx_taken_BFC268A8 = 0; - int psx_delay_BFC268C4 = 0; - int psx_delay_BFC268CC = 0; - int psx_delay_BFC268E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC266C8u: goto label_BFC266C8; - case 0xBFC266DCu: goto label_BFC266DC; - case 0xBFC266ECu: goto label_BFC266EC; - case 0xBFC26704u: goto label_BFC26704; - case 0xBFC26728u: goto label_BFC26728; - case 0xBFC2673Cu: goto label_BFC2673C; - case 0xBFC26748u: goto label_BFC26748; - case 0xBFC26750u: goto label_BFC26750; - case 0xBFC26760u: goto label_BFC26760; - case 0xBFC26768u: goto label_BFC26768; - case 0xBFC2676Cu: goto label_BFC2676C; - case 0xBFC26774u: goto label_BFC26774; - case 0xBFC26780u: goto label_BFC26780; - case 0xBFC26798u: goto label_BFC26798; - case 0xBFC267A4u: goto label_BFC267A4; - case 0xBFC267ACu: goto label_BFC267AC; - case 0xBFC267B4u: goto label_BFC267B4; - case 0xBFC267C8u: goto label_BFC267C8; - case 0xBFC267CCu: goto label_BFC267CC; - case 0xBFC267E0u: goto label_BFC267E0; - case 0xBFC267E8u: goto label_BFC267E8; - case 0xBFC267FCu: goto label_BFC267FC; - case 0xBFC26804u: goto label_BFC26804; - case 0xBFC26820u: goto label_BFC26820; - case 0xBFC26824u: goto label_BFC26824; - case 0xBFC2682Cu: goto label_BFC2682C; - case 0xBFC26834u: goto label_BFC26834; - case 0xBFC26844u: goto label_BFC26844; - case 0xBFC26850u: goto label_BFC26850; - case 0xBFC26870u: goto label_BFC26870; - case 0xBFC26878u: goto label_BFC26878; - case 0xBFC26880u: goto label_BFC26880; - case 0xBFC26894u: goto label_BFC26894; - case 0xBFC268B0u: goto label_BFC268B0; - case 0xBFC268CCu: goto label_BFC268CC; - case 0xBFC268D4u: goto label_BFC268D4; - case 0xBFC268DCu: goto label_BFC268DC; - case 0xBFC268E0u: goto label_BFC268E0; - default: break; - } - } -label_BFC266B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC266B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC266B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC266B0: 3C0E8006 lui $t6, 0x8006 */ - cpu->gpr[14] = 0x80060000u; - PGXP_ALU(0x3C0E8006u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E6B0u); -#endif - /* 0xBFC266B4: 8DCE6C68 lw $t6, 27752($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 27752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE6C68u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC266B8: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC266BC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6BCu); return; } g_debug_last_store_pc = 0x8003E6BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC266C0: 1DC00086 bgtz $t6, 0xBFC268DC */ - uint32_t psx_brA_BFC266C0 = cpu->gpr[14]; - psx_taken_BFC266C0 = ((int32_t)psx_brA_BFC266C0 > 0); - psx_delay_BFC266C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC266C4: AFA40048 sw $a0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6C4u); return; } g_debug_last_store_pc = 0x8003E6C4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40048u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6C4u); -#endif - if (psx_delay_BFC266C0) { - psx_delay_BFC266C0 = 0; - if (psx_taken_BFC266C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8DCu); - goto label_BFC268DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E6C8u); - } -label_BFC266C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC266C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC266C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC266C8: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E6C8u); -#endif - /* 0xBFC266CC: 8DEF6C6C lw $t7, 27756($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 27756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6CCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF6C6Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC266D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC266D4: 15E00082 bne $t7, $zero, 0xBFC268E0 */ - uint32_t psx_brA_BFC266D4 = cpu->gpr[15]; uint32_t psx_brB_BFC266D4 = cpu->gpr[0]; - psx_taken_BFC266D4 = (psx_brA_BFC266D4 != psx_brB_BFC266D4); - psx_delay_BFC266D4 = 1; - /* 0xBFC266D8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6D8u); -#endif - if (psx_delay_BFC266D4) { - psx_delay_BFC266D4 = 0; - if (psx_taken_BFC266D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8E0u); - goto label_BFC268E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E6DCu); - } -label_BFC266DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC266DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC266DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC266DC: 27A40044 addiu $a0, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A40044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC266E0: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC266E4: 0C00F6DD jal 0xB003DB74 */ - cpu->gpr[31] = 0x8003E6ECu; /* jal link before delay slot */ - psx_delay_BFC266E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC266E8: 27A60038 addiu $a2, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27A60038u, cpu->gpr[6], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6E8u); -#endif - if (psx_delay_BFC266E4) { - psx_delay_BFC266E4 = 0; - cpu->gpr[31] = 0x8003E6ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DB74u); - cpu->pc = 0x8003DB74u; return; - } -label_BFC266EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC266ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC266ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC266EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC266F0: AC223D48 sw $v0, 15688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6F0u); return; } g_debug_last_store_pc = 0x8003E6F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223D48u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6F0u); -#endif - /* 0xBFC266F4: 8FA70038 lw $a3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E6F4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70038u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC266F8: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC266FC: 14410049 bne $v0, $at, 0xBFC26824 */ - uint32_t psx_brA_BFC266FC = cpu->gpr[2]; uint32_t psx_brB_BFC266FC = cpu->gpr[1]; - psx_taken_BFC266FC = (psx_brA_BFC266FC != psx_brB_BFC266FC); - psx_delay_BFC266FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26700: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E700u); -#endif - if (psx_delay_BFC266FC) { - psx_delay_BFC266FC = 0; - if (psx_taken_BFC266FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E824u); - goto label_BFC26824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E704u); - } -label_BFC26704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E704u); -#endif - /* 0xBFC26704: 8FA40044 lw $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E704u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E704u); -#endif - /* 0xBFC26708: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E708u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2670C: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC26710: 27B80034 addiu $t8, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27B80034u, cpu->gpr[24], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26714: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC26718: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E718u); return; } g_debug_last_store_pc = 0x8003E718u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2671C: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E71Cu); return; } g_debug_last_store_pc = 0x8003E71Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26720: 0C00F7BE jal 0xB003DEF8 */ - cpu->gpr[31] = 0x8003E728u; /* jal link before delay slot */ - psx_delay_BFC26720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC26724: 24C63D44 addiu $a2, $a2, 15684 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (15684)); - PGXP_ALU(0x24C63D44u, cpu->gpr[6], _pgx1, 0x00003D44u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E724u); -#endif - if (psx_delay_BFC26720) { - psx_delay_BFC26720 = 0; - cpu->gpr[31] = 0x8003E728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DEF8u); - cpu->pc = 0x8003DEF8u; return; - } -label_BFC26728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC26728: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E728u); -#endif - /* 0xBFC2672C: 8CE79E1C lw $a3, -25060($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E72Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26730: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26734: 14E00004 bne $a3, $zero, 0xBFC26748 */ - uint32_t psx_brA_BFC26734 = cpu->gpr[7]; uint32_t psx_brB_BFC26734 = cpu->gpr[0]; - psx_taken_BFC26734 = (psx_brA_BFC26734 != psx_brB_BFC26734); - psx_delay_BFC26734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26738: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E738u); -#endif - if (psx_delay_BFC26734) { - psx_delay_BFC26734 = 0; - if (psx_taken_BFC26734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E748u); - goto label_BFC26748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E73Cu); - } -label_BFC2673C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2673Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2673C: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26740: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC26744: AC396F00 sw $t9, 28416($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E744u); return; } g_debug_last_store_pc = 0x8003E744u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396F00u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E744u); -#endif -label_BFC26748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26748: 1440000A bne $v0, $zero, 0xBFC26774 */ - uint32_t psx_brA_BFC26748 = cpu->gpr[2]; uint32_t psx_brB_BFC26748 = cpu->gpr[0]; - psx_taken_BFC26748 = (psx_brA_BFC26748 != psx_brB_BFC26748); - psx_delay_BFC26748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2674C: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E74Cu); -#endif - if (psx_delay_BFC26748) { - psx_delay_BFC26748 = 0; - if (psx_taken_BFC26748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E774u); - goto label_BFC26774; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E750u); - } -label_BFC26750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26750: 34210800 ori $at, $at, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x800u; - PGXP_ALU(0x34210800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x182u); -#endif - /* 0xBFC26754: 00E14024 and $t0, $a3, $at */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[7] & cpu->gpr[1]; - PGXP_ALU(0x00E14024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC26758: 15000016 bne $t0, $zero, 0xBFC267B4 */ - uint32_t psx_brA_BFC26758 = cpu->gpr[8]; uint32_t psx_brB_BFC26758 = cpu->gpr[0]; - psx_taken_BFC26758 = (psx_brA_BFC26758 != psx_brB_BFC26758); - psx_delay_BFC26758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2675C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E75Cu); -#endif - if (psx_delay_BFC26758) { - psx_delay_BFC26758 = 0; - if (psx_taken_BFC26758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7B4u); - goto label_BFC267B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E760u); - } -label_BFC26760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26760: 10E00002 beq $a3, $zero, 0xBFC2676C */ - uint32_t psx_brA_BFC26760 = cpu->gpr[7]; uint32_t psx_brB_BFC26760 = cpu->gpr[0]; - psx_taken_BFC26760 = (psx_brA_BFC26760 == psx_brB_BFC26760); - psx_delay_BFC26760 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26764: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E764u); -#endif - if (psx_delay_BFC26760) { - psx_delay_BFC26760 = 0; - if (psx_taken_BFC26760) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E76Cu); - goto label_BFC2676C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E768u); - } -label_BFC26768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26768: AC206F00 sw $zero, 28416($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E768u); return; } g_debug_last_store_pc = 0x8003E768u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206F00u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E768u); -#endif -label_BFC2676C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2676Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2676C: 10000011 beq $zero, $zero, 0xBFC267B4 */ - uint32_t psx_brA_BFC2676C = cpu->gpr[0]; uint32_t psx_brB_BFC2676C = cpu->gpr[0]; - psx_taken_BFC2676C = (psx_brA_BFC2676C == psx_brB_BFC2676C); - psx_delay_BFC2676C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26770: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E770u); -#endif - if (psx_delay_BFC2676C) { - psx_delay_BFC2676C = 0; - if (psx_taken_BFC2676C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7B4u); - goto label_BFC267B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E774u); - } -label_BFC26774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26774: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26778: 14410007 bne $v0, $at, 0xBFC26798 */ - uint32_t psx_brA_BFC26778 = cpu->gpr[2]; uint32_t psx_brB_BFC26778 = cpu->gpr[1]; - psx_taken_BFC26778 = (psx_brA_BFC26778 != psx_brB_BFC26778); - psx_delay_BFC26778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2677C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E77Cu); -#endif - if (psx_delay_BFC26778) { - psx_delay_BFC26778 = 0; - if (psx_taken_BFC26778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E798u); - goto label_BFC26798; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E780u); - } -label_BFC26780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26780: AC206C68 sw $zero, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E780u); return; } g_debug_last_store_pc = 0x8003E780u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26784: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC26788: 24090040 addiu $t1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24090040u, cpu->gpr[9], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2678C: AC296C6C sw $t1, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E78Cu); return; } g_debug_last_store_pc = 0x8003E78Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296C6Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26790: 10000008 beq $zero, $zero, 0xBFC267B4 */ - uint32_t psx_brA_BFC26790 = cpu->gpr[0]; uint32_t psx_brB_BFC26790 = cpu->gpr[0]; - psx_taken_BFC26790 = (psx_brA_BFC26790 == psx_brB_BFC26790); - psx_delay_BFC26790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26794: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E794u); -#endif - if (psx_delay_BFC26790) { - psx_delay_BFC26790 = 0; - if (psx_taken_BFC26790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7B4u); - goto label_BFC267B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E798u); - } -label_BFC26798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26798: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2679C: 14410005 bne $v0, $at, 0xBFC267B4 */ - uint32_t psx_brA_BFC2679C = cpu->gpr[2]; uint32_t psx_brB_BFC2679C = cpu->gpr[1]; - psx_taken_BFC2679C = (psx_brA_BFC2679C != psx_brB_BFC2679C); - psx_delay_BFC2679C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7A0u); -#endif - if (psx_delay_BFC2679C) { - psx_delay_BFC2679C = 0; - if (psx_taken_BFC2679C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7B4u); - goto label_BFC267B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7A4u); - } -label_BFC267A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC267A4: 14E00003 bne $a3, $zero, 0xBFC267B4 */ - uint32_t psx_brA_BFC267A4 = cpu->gpr[7]; uint32_t psx_brB_BFC267A4 = cpu->gpr[0]; - psx_taken_BFC267A4 = (psx_brA_BFC267A4 != psx_brB_BFC267A4); - psx_delay_BFC267A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7A8u); -#endif - if (psx_delay_BFC267A4) { - psx_delay_BFC267A4 = 0; - if (psx_taken_BFC267A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7B4u); - goto label_BFC267B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7ACu); - } -label_BFC267AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7ACu); -#endif - /* 0xBFC267AC: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E7ACu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7B0u); -#endif -label_BFC267B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC267B4: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E7B4u); -#endif - /* 0xBFC267B8: 8D4A6F00 lw $t2, 28416($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 28416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (28416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E7B8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A6F00u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC267C0: 15400002 bne $t2, $zero, 0xBFC267CC */ - uint32_t psx_brA_BFC267C0 = cpu->gpr[10]; uint32_t psx_brB_BFC267C0 = cpu->gpr[0]; - psx_taken_BFC267C0 = (psx_brA_BFC267C0 != psx_brB_BFC267C0); - psx_delay_BFC267C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7C4u); -#endif - if (psx_delay_BFC267C0) { - psx_delay_BFC267C0 = 0; - if (psx_taken_BFC267C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7CCu); - goto label_BFC267CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7C8u); - } -label_BFC267C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC267C8: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7C8u); -#endif -label_BFC267CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC267CC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7D0u); -#endif - /* 0xBFC267D0: 8D6B9E2C lw $t3, -25044($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E7D0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E2Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC267D8: 11600003 beq $t3, $zero, 0xBFC267E8 */ - uint32_t psx_brA_BFC267D8 = cpu->gpr[11]; uint32_t psx_brB_BFC267D8 = cpu->gpr[0]; - psx_taken_BFC267D8 = (psx_brA_BFC267D8 == psx_brB_BFC267D8); - psx_delay_BFC267D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC267DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E7DCu); -#endif - if (psx_delay_BFC267D8) { - psx_delay_BFC267D8 = 0; - if (psx_taken_BFC267D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7E8u); - goto label_BFC267E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7E0u); - } -label_BFC267E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267E0: 1000003E beq $zero, $zero, 0xBFC268DC */ - uint32_t psx_brA_BFC267E0 = cpu->gpr[0]; uint32_t psx_brB_BFC267E0 = cpu->gpr[0]; - psx_taken_BFC267E0 = (psx_brA_BFC267E0 == psx_brB_BFC267E0); - psx_delay_BFC267E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC267E4: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E7E4u); return; } g_debug_last_store_pc = 0x8003E7E4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7E4u); -#endif - if (psx_delay_BFC267E0) { - psx_delay_BFC267E0 = 0; - if (psx_taken_BFC267E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8DCu); - goto label_BFC268DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7E8u); - } -label_BFC267E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC267E8: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC267EC: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1082u); -#endif - /* 0xBFC267F0: 00E16024 and $t4, $a3, $at */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[7] & cpu->gpr[1]; - PGXP_ALU(0x00E16024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC267F4: 15800003 bne $t4, $zero, 0xBFC26804 */ - uint32_t psx_brA_BFC267F4 = cpu->gpr[12]; uint32_t psx_brB_BFC267F4 = cpu->gpr[0]; - psx_taken_BFC267F4 = (psx_brA_BFC267F4 != psx_brB_BFC267F4); - psx_delay_BFC267F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC267F8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E7F8u); -#endif - if (psx_delay_BFC267F4) { - psx_delay_BFC267F4 = 0; - if (psx_taken_BFC267F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E804u); - goto label_BFC26804; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E7FCu); - } -label_BFC267FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC267FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC267FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC267FC: 10000037 beq $zero, $zero, 0xBFC268DC */ - uint32_t psx_brA_BFC267FC = cpu->gpr[0]; uint32_t psx_brB_BFC267FC = cpu->gpr[0]; - psx_taken_BFC267FC = (psx_brA_BFC267FC == psx_brB_BFC267FC); - psx_delay_BFC267FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC26800: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E800u); return; } g_debug_last_store_pc = 0x8003E800u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E800u); -#endif - if (psx_delay_BFC267FC) { - psx_delay_BFC267FC = 0; - if (psx_taken_BFC267FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8DCu); - goto label_BFC268DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E804u); - } -label_BFC26804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC26804: 240D0040 addiu $t5, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240D0040u, cpu->gpr[13], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26808: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2680C: AC2D6C6C sw $t5, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E80Cu); return; } g_debug_last_store_pc = 0x8003E80Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D6C6Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26810: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26814: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26818: 10000030 beq $zero, $zero, 0xBFC268DC */ - uint32_t psx_brA_BFC26818 = cpu->gpr[0]; uint32_t psx_brB_BFC26818 = cpu->gpr[0]; - psx_taken_BFC26818 = (psx_brA_BFC26818 == psx_brB_BFC26818); - psx_delay_BFC26818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2681C: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E81Cu); return; } g_debug_last_store_pc = 0x8003E81Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E81Cu); -#endif - if (psx_delay_BFC26818) { - psx_delay_BFC26818 = 0; - if (psx_taken_BFC26818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8DCu); - goto label_BFC268DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E820u); - } -label_BFC26820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26820: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E820u); -#endif -label_BFC26824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26824: 14410003 bne $v0, $at, 0xBFC26834 */ - uint32_t psx_brA_BFC26824 = cpu->gpr[2]; uint32_t psx_brB_BFC26824 = cpu->gpr[1]; - psx_taken_BFC26824 = (psx_brA_BFC26824 != psx_brB_BFC26824); - psx_delay_BFC26824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26828: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E828u); -#endif - if (psx_delay_BFC26824) { - psx_delay_BFC26824 = 0; - if (psx_taken_BFC26824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E834u); - goto label_BFC26834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E82Cu); - } -label_BFC2682C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2682Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2682C: 1000002B beq $zero, $zero, 0xBFC268DC */ - uint32_t psx_brA_BFC2682C = cpu->gpr[0]; uint32_t psx_brB_BFC2682C = cpu->gpr[0]; - psx_taken_BFC2682C = (psx_brA_BFC2682C == psx_brB_BFC2682C); - psx_delay_BFC2682C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC26830: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E830u); return; } g_debug_last_store_pc = 0x8003E830u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E830u); -#endif - if (psx_delay_BFC2682C) { - psx_delay_BFC2682C = 0; - if (psx_taken_BFC2682C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8DCu); - goto label_BFC268DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E834u); - } -label_BFC26834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26834: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC26838: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E838u); return; } g_debug_last_store_pc = 0x8003E838u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2683C: 0C00F8CB jal 0xB003E32C */ - cpu->gpr[31] = 0x8003E844u; /* jal link before delay slot */ - psx_delay_BFC2683C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC26840: 00E02021 addu $a0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E840u); -#endif - if (psx_delay_BFC2683C) { - psx_delay_BFC2683C = 0; - cpu->gpr[31] = 0x8003E844u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E32Cu); - cpu->pc = 0x8003E32Cu; return; - } -label_BFC26844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26844: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26848: 1441000D bne $v0, $at, 0xBFC26880 */ - uint32_t psx_brA_BFC26848 = cpu->gpr[2]; uint32_t psx_brB_BFC26848 = cpu->gpr[1]; - psx_taken_BFC26848 = (psx_brA_BFC26848 != psx_brB_BFC26848); - psx_delay_BFC26848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2684C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E84Cu); -#endif - if (psx_delay_BFC26848) { - psx_delay_BFC26848 = 0; - if (psx_taken_BFC26848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E880u); - goto label_BFC26880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E850u); - } -label_BFC26850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26850: AC206C68 sw $zero, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E850u); return; } g_debug_last_store_pc = 0x8003E850u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26854: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC26858: 240E0040 addiu $t6, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240E0040u, cpu->gpr[14], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2685C: AC2E6C6C sw $t6, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E85Cu); return; } g_debug_last_store_pc = 0x8003E85Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6C6Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26860: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26864: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26868: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003E870u; /* jal link before delay slot */ - psx_delay_BFC26868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2686C: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E86Cu); return; } g_debug_last_store_pc = 0x8003E86Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E86Cu); -#endif - if (psx_delay_BFC26868) { - psx_delay_BFC26868 = 0; - cpu->gpr[31] = 0x8003E870u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC26870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26870: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003E878u; /* jal link before delay slot */ - psx_delay_BFC26870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC26874: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E874u); -#endif - if (psx_delay_BFC26870) { - psx_delay_BFC26870 = 0; - cpu->gpr[31] = 0x8003E878u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC26878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26878: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2687C: AC223D44 sw $v0, 15684($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E87Cu); return; } g_debug_last_store_pc = 0x8003E87Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223D44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E87Cu); -#endif -label_BFC26880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26880: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E880u); -#endif - /* 0xBFC26884: 8DEF9E2C lw $t7, -25044($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E884u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26888: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2688C: 15E00014 bne $t7, $zero, 0xBFC268E0 */ - uint32_t psx_brA_BFC2688C = cpu->gpr[15]; uint32_t psx_brB_BFC2688C = cpu->gpr[0]; - psx_taken_BFC2688C = (psx_brA_BFC2688C != psx_brB_BFC2688C); - psx_delay_BFC2688C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E890u); -#endif - /* 0xBFC26890: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E890u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E890u); -#endif - if (psx_delay_BFC2688C) { - psx_delay_BFC2688C = 0; - if (psx_taken_BFC2688C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8E0u); - goto label_BFC268E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E894u); - } -label_BFC26894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC26894: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E894u); -#endif - /* 0xBFC26898: 8CE79E1C lw $a3, -25060($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25060; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E898u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2689C: 3C0100F0 lui $at, 0xF0 */ - cpu->gpr[1] = 0x00F00000u; - PGXP_ALU(0x3C0100F0u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC268A0: 342100F0 ori $at, $at, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF0u; - PGXP_ALU(0x342100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000082u); -#endif - /* 0xBFC268A4: 00E1C024 and $t8, $a3, $at */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[7] & cpu->gpr[1]; - PGXP_ALU(0x00E1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC268A8: 1300000D beq $t8, $zero, 0xBFC268E0 */ - uint32_t psx_brA_BFC268A8 = cpu->gpr[24]; uint32_t psx_brB_BFC268A8 = cpu->gpr[0]; - psx_taken_BFC268A8 = (psx_brA_BFC268A8 == psx_brB_BFC268A8); - psx_delay_BFC268A8 = 1; - /* 0xBFC268AC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8ACu); -#endif - if (psx_delay_BFC268A8) { - psx_delay_BFC268A8 = 0; - if (psx_taken_BFC268A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8E0u); - goto label_BFC268E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E8B0u); - } -label_BFC268B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC268B0: 24190040 addiu $t9, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24190040u, cpu->gpr[25], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC268B4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC268B8: AC396C6C sw $t9, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8B8u); return; } g_debug_last_store_pc = 0x8003E8B8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396C6Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC268BC: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC268C0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC268C4: 0C011934 jal 0xB00464D0 */ - cpu->gpr[31] = 0x8003E8CCu; /* jal link before delay slot */ - psx_delay_BFC268C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC268C8: AC279E1C sw $a3, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8C8u); return; } g_debug_last_store_pc = 0x8003E8C8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279E1Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8C8u); -#endif - if (psx_delay_BFC268C4) { - psx_delay_BFC268C4 = 0; - cpu->gpr[31] = 0x8003E8CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464D0u); - cpu->pc = 0x800464D0u; return; - } -label_BFC268CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC268CC: 0C011997 jal 0xB004665C */ - cpu->gpr[31] = 0x8003E8D4u; /* jal link before delay slot */ - psx_delay_BFC268CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC268D0: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8D0u); -#endif - if (psx_delay_BFC268CC) { - psx_delay_BFC268CC = 0; - cpu->gpr[31] = 0x8003E8D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004665Cu); - cpu->pc = 0x8004665Cu; return; - } -label_BFC268D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC268D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC268D8: AC223D44 sw $v0, 15684($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8D8u); return; } g_debug_last_store_pc = 0x8003E8D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223D44u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8D8u); -#endif -label_BFC268DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8DCu); -#endif - /* 0xBFC268DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8DCu); -#endif -label_BFC268E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC268E0: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC268E4: 03E00008 jr $ra */ - psx_delay_BFC268E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC268E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E8E8u); -#endif - if (psx_delay_BFC268E4) { - psx_delay_BFC268E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC268EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC268ECu); - int psx_delay_BFC26900 = 0; - int psx_taken_BFC26900 = 0; - int psx_delay_BFC26914 = 0; - int psx_taken_BFC26914 = 0; - int psx_delay_BFC26920 = 0; - int psx_taken_BFC26920 = 0; - int psx_delay_BFC26938 = 0; - int psx_taken_BFC26938 = 0; - int psx_delay_BFC26954 = 0; - int psx_taken_BFC26954 = 0; - int psx_delay_BFC269D8 = 0; - int psx_delay_BFC269E0 = 0; - int psx_taken_BFC269E0 = 0; - int psx_delay_BFC269E8 = 0; - int psx_delay_BFC269F0 = 0; - int psx_taken_BFC269F0 = 0; - int psx_delay_BFC26A04 = 0; - int psx_taken_BFC26A04 = 0; - int psx_delay_BFC26A30 = 0; - int psx_delay_BFC26A44 = 0; - int psx_taken_BFC26A44 = 0; - int psx_delay_BFC26A6C = 0; - int psx_delay_BFC26A74 = 0; - int psx_taken_BFC26A74 = 0; - int psx_delay_BFC26A80 = 0; - int psx_delay_BFC26A98 = 0; - int psx_taken_BFC26A98 = 0; - int psx_delay_BFC26AA4 = 0; - int psx_delay_BFC26AAC = 0; - int psx_taken_BFC26AAC = 0; - int psx_delay_BFC26AB8 = 0; - int psx_taken_BFC26AB8 = 0; - int psx_delay_BFC26AE0 = 0; - int psx_delay_BFC26AF0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26908u: goto label_BFC26908; - case 0xBFC2691Cu: goto label_BFC2691C; - case 0xBFC26928u: goto label_BFC26928; - case 0xBFC26940u: goto label_BFC26940; - case 0xBFC2695Cu: goto label_BFC2695C; - case 0xBFC269E0u: goto label_BFC269E0; - case 0xBFC269E8u: goto label_BFC269E8; - case 0xBFC269F0u: goto label_BFC269F0; - case 0xBFC269F8u: goto label_BFC269F8; - case 0xBFC26A0Cu: goto label_BFC26A0C; - case 0xBFC26A38u: goto label_BFC26A38; - case 0xBFC26A4Cu: goto label_BFC26A4C; - case 0xBFC26A74u: goto label_BFC26A74; - case 0xBFC26A7Cu: goto label_BFC26A7C; - case 0xBFC26A80u: goto label_BFC26A80; - case 0xBFC26A88u: goto label_BFC26A88; - case 0xBFC26AA0u: goto label_BFC26AA0; - case 0xBFC26AACu: goto label_BFC26AAC; - case 0xBFC26AB4u: goto label_BFC26AB4; - case 0xBFC26AB8u: goto label_BFC26AB8; - case 0xBFC26AC0u: goto label_BFC26AC0; - case 0xBFC26AE8u: goto label_BFC26AE8; - case 0xBFC26AECu: goto label_BFC26AEC; - default: break; - } - } -label_BFC268EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC268ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC268ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC268EC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E8F0u); -#endif - /* 0xBFC268F0: 8DCE9E2C lw $t6, -25044($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25044; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC268F4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC268F8: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC268FC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E8FCu); return; } g_debug_last_store_pc = 0x8003E8FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26900: 11C10079 beq $t6, $at, 0xBFC26AE8 */ - uint32_t psx_brA_BFC26900 = cpu->gpr[14]; uint32_t psx_brB_BFC26900 = cpu->gpr[1]; - psx_taken_BFC26900 = (psx_brA_BFC26900 == psx_brB_BFC26900); - psx_delay_BFC26900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC26904: 00805821 addu $t3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E904u); -#endif - if (psx_delay_BFC26900) { - psx_delay_BFC26900 = 0; - if (psx_taken_BFC26900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAE8u); - goto label_BFC26AE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E908u); - } -label_BFC26908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26908: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E908u); -#endif - /* 0xBFC2690C: 8C426C68 lw $v0, 27752($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E90Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426C68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26910: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26914: 18400038 blez $v0, 0xBFC269F8 */ - uint32_t psx_brA_BFC26914 = cpu->gpr[2]; - psx_taken_BFC26914 = ((int32_t)psx_brA_BFC26914 <= 0); - psx_delay_BFC26914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26918: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E918u); -#endif - if (psx_delay_BFC26914) { - psx_delay_BFC26914 = 0; - if (psx_taken_BFC26914) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E9F8u); - goto label_BFC269F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E91Cu); - } -label_BFC2691C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2691Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2691C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26920: 14400007 bne $v0, $zero, 0xBFC26940 */ - uint32_t psx_brA_BFC26920 = cpu->gpr[2]; uint32_t psx_brB_BFC26920 = cpu->gpr[0]; - psx_taken_BFC26920 = (psx_brA_BFC26920 != psx_brB_BFC26920); - psx_delay_BFC26920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26924: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E924u); -#endif - if (psx_delay_BFC26920) { - psx_delay_BFC26920 = 0; - if (psx_taken_BFC26920) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E940u); - goto label_BFC26940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E928u); - } -label_BFC26928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26928: AC226C68 sw $v0, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E928u); return; } g_debug_last_store_pc = 0x8003E928u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC226C68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2692C: 3C0F00F0 lui $t7, 0xF0 */ - cpu->gpr[15] = 0x00F00000u; - PGXP_ALU(0x3C0F00F0u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26930: 35EF00F0 ori $t7, $t7, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] | 0xF0u; - PGXP_ALU(0x35EF00F0u, cpu->gpr[15], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26934: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26938: 1000006B beq $zero, $zero, 0xBFC26AE8 */ - uint32_t psx_brA_BFC26938 = cpu->gpr[0]; uint32_t psx_brB_BFC26938 = cpu->gpr[0]; - psx_taken_BFC26938 = (psx_brA_BFC26938 == psx_brB_BFC26938); - psx_delay_BFC26938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2693C: AC2F9E1C sw $t7, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E93Cu); return; } g_debug_last_store_pc = 0x8003E93Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E1Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E93Cu); -#endif - if (psx_delay_BFC26938) { - psx_delay_BFC26938 = 0; - if (psx_taken_BFC26938) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAE8u); - goto label_BFC26AE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E940u); - } -label_BFC26940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26940: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26944: AC226C68 sw $v0, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E944u); return; } g_debug_last_store_pc = 0x8003E944u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC226C68u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26948: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003E948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2694C: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003E94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC26950: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26954: 17000024 bne $t8, $zero, 0xBFC269E8 */ - uint32_t psx_brA_BFC26954 = cpu->gpr[24]; uint32_t psx_brB_BFC26954 = cpu->gpr[0]; - psx_taken_BFC26954 = (psx_brA_BFC26954 != psx_brB_BFC26954); - psx_delay_BFC26954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26958: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003E958u); -#endif - if (psx_delay_BFC26954) { - psx_delay_BFC26954 = 0; - if (psx_taken_BFC26954) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E9E8u); - goto label_BFC269E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E95Cu); - } -label_BFC2695C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2695Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2695C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E960u); -#endif - /* 0xBFC26960: 8C423D40 lw $v0, 15680($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15680; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E960u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423D40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC26964: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E964u); -#endif - /* 0xBFC26968: 844A003A lh $t2, 58($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 58; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E968u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x844A003Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E968u); -#endif - /* 0xBFC2696C: 84490038 lh $t1, 56($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E96Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x84490038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E970u); -#endif - /* 0xBFC26970: 8446002A lh $a2, 42($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E970u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8446002Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E970u); -#endif - /* 0xBFC26974: 84450028 lh $a1, 40($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E974u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x84450028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC26978: 254AFFFF addiu $t2, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2697C: 2529FFFF addiu $t1, $t1, -1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-1)); - PGXP_ALU(0x2529FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC26980: 24C60001 addiu $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C60001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26984: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003E984u); -#endif - /* 0xBFC26988: 84480032 lh $t0, 50($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 50; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E988u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x84480032u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E988u); -#endif - /* 0xBFC2698C: 84470030 lh $a3, 48($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E98Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x4u); } - PGXP_LOAD(0x84470030u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC26990: A4480032 sh $t0, 50($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E990u); return; } g_debug_last_store_pc = 0x8003E990u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4480032u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC26994: A4470030 sh $a3, 48($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E994u); return; } g_debug_last_store_pc = 0x8003E994u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4470030u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E994u); -#endif - /* 0xBFC26998: 84430022 lh $v1, 34($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 34; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E998u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x84430022u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E998u); -#endif - /* 0xBFC2699C: 84590020 lh $t9, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E99Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x84590020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC269A0: A4430022 sh $v1, 34($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9A0u); return; } g_debug_last_store_pc = 0x8003E9A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430022u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC269A4: A4590020 sh $t9, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9A4u); return; } g_debug_last_store_pc = 0x8003E9A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC269A8: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC269AC: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC269B0: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC269B4: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC269B8: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC269BC: A44A003A sh $t2, 58($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9BCu); return; } g_debug_last_store_pc = 0x8003E9BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA44A003Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC269C0: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC269C4: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC269C8: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC269CC: A4450028 sh $a1, 40($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9CCu); return; } g_debug_last_store_pc = 0x8003E9CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4450028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC269D0: A446002A sh $a2, 42($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9D0u); return; } g_debug_last_store_pc = 0x8003E9D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA446002Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC269D4: A4490038 sh $t1, 56($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9D4u); return; } g_debug_last_store_pc = 0x8003E9D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4490038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC269D8: 0C00F723 jal 0xB003DC8C */ - cpu->gpr[31] = 0x8003E9E0u; /* jal link before delay slot */ - psx_delay_BFC269D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC269DC: 24420018 addiu $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (24)); - PGXP_ALU(0x24420018u, cpu->gpr[2], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9DCu); -#endif - if (psx_delay_BFC269D8) { - psx_delay_BFC269D8 = 0; - cpu->gpr[31] = 0x8003E9E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC8Cu); - cpu->pc = 0x8003DC8Cu; return; - } -label_BFC269E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC269E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC269E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC269E0: 10000042 beq $zero, $zero, 0xBFC26AEC */ - uint32_t psx_brA_BFC269E0 = cpu->gpr[0]; uint32_t psx_brB_BFC269E0 = cpu->gpr[0]; - psx_taken_BFC269E0 = (psx_brA_BFC269E0 == psx_brB_BFC269E0); - psx_delay_BFC269E0 = 1; - /* 0xBFC269E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9E4u); -#endif - if (psx_delay_BFC269E0) { - psx_delay_BFC269E0 = 0; - if (psx_taken_BFC269E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E9E8u); - } -label_BFC269E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC269E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC269E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC269E8: 0C00F723 jal 0xB003DC8C */ - cpu->gpr[31] = 0x8003E9F0u; /* jal link before delay slot */ - psx_delay_BFC269E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC269EC: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9ECu); -#endif - if (psx_delay_BFC269E8) { - psx_delay_BFC269E8 = 0; - cpu->gpr[31] = 0x8003E9F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC8Cu); - cpu->pc = 0x8003DC8Cu; return; - } -label_BFC269F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC269F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC269F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC269F0: 1000003E beq $zero, $zero, 0xBFC26AEC */ - uint32_t psx_brA_BFC269F0 = cpu->gpr[0]; uint32_t psx_brB_BFC269F0 = cpu->gpr[0]; - psx_taken_BFC269F0 = (psx_brA_BFC269F0 == psx_brB_BFC269F0); - psx_delay_BFC269F0 = 1; - /* 0xBFC269F4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9F4u); -#endif - if (psx_delay_BFC269F0) { - psx_delay_BFC269F0 = 0; - if (psx_taken_BFC269F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003E9F8u); - } -label_BFC269F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC269F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC269F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003E9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC269F8: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003E9F8u); -#endif - /* 0xBFC269FC: 8C426C6C lw $v0, 27756($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003E9FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426C6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003E9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26A04: 1040001E beq $v0, $zero, 0xBFC26A80 */ - uint32_t psx_brA_BFC26A04 = cpu->gpr[2]; uint32_t psx_brB_BFC26A04 = cpu->gpr[0]; - psx_taken_BFC26A04 = (psx_brA_BFC26A04 == psx_brB_BFC26A04); - psx_delay_BFC26A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC26A08: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA08u); -#endif - if (psx_delay_BFC26A04) { - psx_delay_BFC26A04 = 0; - if (psx_taken_BFC26A04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EA80u); - goto label_BFC26A80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EA0Cu); - } -label_BFC26A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26A0C: 2442FFFE addiu $v0, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x2442FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC26A10: 00022840 sll $a1, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00022840u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26A14: 24A5FFF8 addiu $a1, $a1, -8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8)); - PGXP_ALU(0x24A5FFF8u, cpu->gpr[5], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26A18: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA18u); -#endif - /* 0xBFC26A1C: 8C843D44 lw $a0, 15684($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA1Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843D44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26A20: 30A5007F andi $a1, $a1, 0x7F */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x7Fu; - PGXP_ALU(0x30A5007Fu, cpu->gpr[5], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26A24: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26A28: AC226C6C sw $v0, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA28u); return; } g_debug_last_store_pc = 0x8003EA28u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC226C6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC26A2C: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26A30: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8003EA38u; /* jal link before delay slot */ - psx_delay_BFC26A30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC26A34: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA34u); -#endif - if (psx_delay_BFC26A30) { - psx_delay_BFC26A30 = 0; - cpu->gpr[31] = 0x8003EA38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC26A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26A38: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA38u); -#endif - /* 0xBFC26A3C: 8C426C6C lw $v0, 27756($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 27756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA3Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C426C6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26A44: 1C400029 bgtz $v0, 0xBFC26AEC */ - uint32_t psx_brA_BFC26A44 = cpu->gpr[2]; - psx_taken_BFC26A44 = ((int32_t)psx_brA_BFC26A44 > 0); - psx_delay_BFC26A44 = 1; - /* 0xBFC26A48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA48u); -#endif - if (psx_delay_BFC26A44) { - psx_delay_BFC26A44 = 0; - if (psx_taken_BFC26A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EA4Cu); - } -label_BFC26A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26A4C: 3C0C00F0 lui $t4, 0xF0 */ - cpu->gpr[12] = 0x00F00000u; - PGXP_ALU(0x3C0C00F0u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26A50: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26A54: 358C00F0 ori $t4, $t4, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] | 0xF0u; - PGXP_ALU(0x358C00F0u, cpu->gpr[12], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26A58: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA58u); -#endif - /* 0xBFC26A5C: 8C843D44 lw $a0, 15684($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 15684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA5Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C843D44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC26A60: AC2C9E1C sw $t4, -25060($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25060; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25060)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA60u); return; } g_debug_last_store_pc = 0x8003EA60u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9E1Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26A64: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC26A68: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26A6C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8003EA74u; /* jal link before delay slot */ - psx_delay_BFC26A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26A70: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA70u); -#endif - if (psx_delay_BFC26A6C) { - psx_delay_BFC26A6C = 0; - cpu->gpr[31] = 0x8003EA74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC26A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26A74: 1000001D beq $zero, $zero, 0xBFC26AEC */ - uint32_t psx_brA_BFC26A74 = cpu->gpr[0]; uint32_t psx_brB_BFC26A74 = cpu->gpr[0]; - psx_taken_BFC26A74 = (psx_brA_BFC26A74 == psx_brB_BFC26A74); - psx_delay_BFC26A74 = 1; - /* 0xBFC26A78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA78u); -#endif - if (psx_delay_BFC26A74) { - psx_delay_BFC26A74 = 0; - if (psx_taken_BFC26A74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EA7Cu); - } -label_BFC26A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC26A7C: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA7Cu); -#endif -label_BFC26A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26A80: 0C00F723 jal 0xB003DC8C */ - cpu->gpr[31] = 0x8003EA88u; /* jal link before delay slot */ - psx_delay_BFC26A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC26A84: AFAB0018 sw $t3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA84u); return; } g_debug_last_store_pc = 0x8003EA84u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA84u); -#endif - if (psx_delay_BFC26A80) { - psx_delay_BFC26A80 = 0; - cpu->gpr[31] = 0x8003EA88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DC8Cu); - cpu->pc = 0x8003DC8Cu; return; - } -label_BFC26A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26A88: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EA88u); -#endif - /* 0xBFC26A8C: 8C423D48 lw $v0, 15688($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA8Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423D48u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EA90u); -#endif - /* 0xBFC26A90: 8FAB0018 lw $t3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EA90u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26A94: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26A98: 14410007 bne $v0, $at, 0xBFC26AB8 */ - uint32_t psx_brA_BFC26A98 = cpu->gpr[2]; uint32_t psx_brB_BFC26A98 = cpu->gpr[1]; - psx_taken_BFC26A98 = (psx_brA_BFC26A98 != psx_brB_BFC26A98); - psx_delay_BFC26A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26A9C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EA9Cu); -#endif - if (psx_delay_BFC26A98) { - psx_delay_BFC26A98 = 0; - if (psx_taken_BFC26A98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAB8u); - goto label_BFC26AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAA0u); - } -label_BFC26AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26AA0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26AA4: 0C00F730 jal 0xB003DCC0 */ - cpu->gpr[31] = 0x8003EAACu; /* jal link before delay slot */ - psx_delay_BFC26AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x821u); -#endif - /* 0xBFC26AA8: 01602821 addu $a1, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAA8u); -#endif - if (psx_delay_BFC26AA4) { - psx_delay_BFC26AA4 = 0; - cpu->gpr[31] = 0x8003EAACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003DCC0u); - cpu->pc = 0x8003DCC0u; return; - } -label_BFC26AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26AAC: 1000000F beq $zero, $zero, 0xBFC26AEC */ - uint32_t psx_brA_BFC26AAC = cpu->gpr[0]; uint32_t psx_brB_BFC26AAC = cpu->gpr[0]; - psx_taken_BFC26AAC = (psx_brA_BFC26AAC == psx_brB_BFC26AAC); - psx_delay_BFC26AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAB0u); -#endif - /* 0xBFC26AB0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EAB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAB0u); -#endif - if (psx_delay_BFC26AAC) { - psx_delay_BFC26AAC = 0; - if (psx_taken_BFC26AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAB4u); - } -label_BFC26AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26AB4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAB4u); -#endif -label_BFC26AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26AB8: 1041000C beq $v0, $at, 0xBFC26AEC */ - uint32_t psx_brA_BFC26AB8 = cpu->gpr[2]; uint32_t psx_brB_BFC26AB8 = cpu->gpr[1]; - psx_taken_BFC26AB8 = (psx_brA_BFC26AB8 == psx_brB_BFC26AB8); - psx_delay_BFC26AB8 = 1; - /* 0xBFC26ABC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EABCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EABCu); -#endif - if (psx_delay_BFC26AB8) { - psx_delay_BFC26AB8 = 0; - if (psx_taken_BFC26AB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAECu); - goto label_BFC26AEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EAC0u); - } -label_BFC26AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC26AC0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EAC0u); -#endif - /* 0xBFC26AC4: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EAC4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26AC8: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC26ACC: 000D70C0 sll $t6, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC26AD0: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26AD4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26AD8: 25EFA784 addiu $t7, $t7, -22652 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22652)); - PGXP_ALU(0x25EFA784u, cpu->gpr[15], _pgx1, 0xFFFFA784u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC26ADC: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26AE0: 0C00C58C jal 0xB0031630 */ - cpu->gpr[31] = 0x8003EAE8u; /* jal link before delay slot */ - psx_delay_BFC26AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x811u); -#endif - /* 0xBFC26AE4: 01602021 addu $a0, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAE4u); -#endif - if (psx_delay_BFC26AE0) { - psx_delay_BFC26AE0 = 0; - cpu->gpr[31] = 0x8003EAE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80031630u); - cpu->pc = 0x80031630u; return; - } -label_BFC26AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAE8u); -#endif - /* 0xBFC26AE8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EAE8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAE8u); -#endif -label_BFC26AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26AEC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26AF0: 03E00008 jr $ra */ - psx_delay_BFC26AF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26AF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EAF4u); -#endif - if (psx_delay_BFC26AF0) { - psx_delay_BFC26AF0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26AF8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26AF8u); - int psx_delay_BFC26C00 = 0; -label_BFC26AF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26AF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26AF8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26AFC: AC206EB8 sw $zero, 28344($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28344; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28344)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EAFCu); return; } g_debug_last_store_pc = 0x8003EAFCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B00: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC26B04: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26B08: AC2E6EBC sw $t6, 28348($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28348; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28348)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB08u); return; } g_debug_last_store_pc = 0x8003EB08u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6EBCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B0C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B10: AC206EC0 sw $zero, 28352($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28352; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB10u); return; } g_debug_last_store_pc = 0x8003EB10u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B14: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B18: AC206EC4 sw $zero, 28356($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28356; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28356)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB18u); return; } g_debug_last_store_pc = 0x8003EB18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EC4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B1C: AC206EC8 sw $zero, 28360($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28360; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB1Cu); return; } g_debug_last_store_pc = 0x8003EB1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B20: AC206ECC sw $zero, 28364($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28364; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28364)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB20u); return; } g_debug_last_store_pc = 0x8003EB20u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206ECCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B24: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B28: AC206ED0 sw $zero, 28368($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28368; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28368)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB28u); return; } g_debug_last_store_pc = 0x8003EB28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206ED0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B2C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B30: AC206ED4 sw $zero, 28372($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28372)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB30u); return; } g_debug_last_store_pc = 0x8003EB30u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206ED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26B34: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26B38: 25EF6C78 addiu $t7, $t7, 27768 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (27768)); - PGXP_ALU(0x25EF6C78u, cpu->gpr[15], _pgx1, 0x00006C78u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B3C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC26B40: AC2F6ED8 sw $t7, 28376($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28376; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28376)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB40u); return; } g_debug_last_store_pc = 0x8003EB40u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F6ED8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B44: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26B48: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC26B4C: AC386EDC sw $t8, 28380($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28380; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28380)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB4Cu); return; } g_debug_last_store_pc = 0x8003EB4Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC386EDCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B50: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B54: AC206EE0 sw $zero, 28384($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB54u); return; } g_debug_last_store_pc = 0x8003EB54u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EE0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B58: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B5C: AC206EE4 sw $zero, 28388($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28388)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB5Cu); return; } g_debug_last_store_pc = 0x8003EB5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EE4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B60: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B64: AC206EE8 sw $zero, 28392($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB64u); return; } g_debug_last_store_pc = 0x8003EB64u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B68: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC26B6C: 24190280 addiu $t9, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24190280u, cpu->gpr[25], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC26B70: AC396EEC sw $t9, 28396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB70u); return; } g_debug_last_store_pc = 0x8003EB70u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC396EECu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B74: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC26B78: 240801E0 addiu $t0, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240801E0u, cpu->gpr[8], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC26B7C: AC286EF0 sw $t0, 28400($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28400; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB7Cu); return; } g_debug_last_store_pc = 0x8003EB7Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC286EF0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B80: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC26B84: 2409000A addiu $t1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2409000Au, cpu->gpr[9], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC26B88: AC296EF4 sw $t1, 28404($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28404; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB88u); return; } g_debug_last_store_pc = 0x8003EB88u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC296EF4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B8C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC26B90: 240A000A addiu $t2, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x240A000Au, cpu->gpr[10], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC26B94: AC2A6EF8 sw $t2, 28408($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB94u); return; } g_debug_last_store_pc = 0x8003EB94u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A6EF8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26B98: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26B9C: AC206EFC sw $zero, 28412($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28412; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EB9Cu); return; } g_debug_last_store_pc = 0x8003EB9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206EFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BA0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BA4: AC206C54 sw $zero, 27732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBA4u); return; } g_debug_last_store_pc = 0x8003EBA4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BA8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BAC: AC206C58 sw $zero, 27736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBACu); return; } g_debug_last_store_pc = 0x8003EBACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BB0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BB4: AC206C5C sw $zero, 27740($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27740; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBB4u); return; } g_debug_last_store_pc = 0x8003EBB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BB8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BBC: AC206C60 sw $zero, 27744($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBBCu); return; } g_debug_last_store_pc = 0x8003EBBCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BC0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BC4: AC206C64 sw $zero, 27748($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27748; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBC4u); return; } g_debug_last_store_pc = 0x8003EBC4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C64u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BC8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BCC: AC206C68 sw $zero, 27752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBCCu); return; } g_debug_last_store_pc = 0x8003EBCCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C68u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BD0: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26BD4: AC206C6C sw $zero, 27756($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBD4u); return; } g_debug_last_store_pc = 0x8003EBD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC206C6Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BD8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC26BDC: 240B0040 addiu $t3, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240B0040u, cpu->gpr[11], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC26BE0: AC2B6C70 sw $t3, 27760($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27760; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBE0u); return; } g_debug_last_store_pc = 0x8003EBE0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B6C70u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BE4: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC26BE8: 240C0040 addiu $t4, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240C0040u, cpu->gpr[12], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC26BEC: AC2C6C74 sw $t4, 27764($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 27764; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (27764)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBECu); return; } g_debug_last_store_pc = 0x8003EBECu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C6C74u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BF0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC26BF4: 240D03FE addiu $t5, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x240D03FEu, cpu->gpr[13], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC26BF8: AC2D3CCC sw $t5, 15564($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15564; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EBF8u); return; } g_debug_last_store_pc = 0x8003EBF8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D3CCCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26BFC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26C00: 03E00008 jr $ra */ - psx_delay_BFC26C00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26C04: AC2E6F00 sw $t6, 28416($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 28416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (28416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC04u); return; } g_debug_last_store_pc = 0x8003EC04u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E6F00u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC04u); -#endif - if (psx_delay_BFC26C00) { - psx_delay_BFC26C00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26C10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26C10u); - int psx_delay_BFC26C1C = 0; - int psx_delay_BFC26C38 = 0; - int psx_delay_BFC26C40 = 0; - int psx_taken_BFC26C40 = 0; - int psx_delay_BFC26C48 = 0; - int psx_taken_BFC26C48 = 0; - int psx_delay_BFC26C7C = 0; - int psx_taken_BFC26C7C = 0; - int psx_delay_BFC26C84 = 0; - int psx_taken_BFC26C84 = 0; - int psx_delay_BFC26C94 = 0; - int psx_taken_BFC26C94 = 0; - int psx_delay_BFC26CAC = 0; - int psx_delay_BFC26CB4 = 0; - int psx_taken_BFC26CB4 = 0; - int psx_delay_BFC26CC0 = 0; - int psx_taken_BFC26CC0 = 0; - int psx_delay_BFC26CD4 = 0; - int psx_taken_BFC26CD4 = 0; - int psx_delay_BFC26CFC = 0; - int psx_taken_BFC26CFC = 0; - int psx_delay_BFC26D04 = 0; - int psx_delay_BFC26D10 = 0; - int psx_delay_BFC26D20 = 0; - int psx_taken_BFC26D20 = 0; - int psx_delay_BFC26D48 = 0; - int psx_taken_BFC26D48 = 0; - int psx_delay_BFC26D54 = 0; - int psx_delay_BFC26D5C = 0; - int psx_taken_BFC26D5C = 0; - int psx_delay_BFC26D70 = 0; - int psx_taken_BFC26D70 = 0; - int psx_delay_BFC26D84 = 0; - int psx_taken_BFC26D84 = 0; - int psx_delay_BFC26D90 = 0; - int psx_delay_BFC26D98 = 0; - int psx_taken_BFC26D98 = 0; - int psx_delay_BFC26DA0 = 0; - int psx_taken_BFC26DA0 = 0; - int psx_delay_BFC26DB4 = 0; - int psx_taken_BFC26DB4 = 0; - int psx_delay_BFC26DC0 = 0; - int psx_delay_BFC26DD4 = 0; - int psx_taken_BFC26DD4 = 0; - int psx_delay_BFC26DE0 = 0; - int psx_delay_BFC26DF4 = 0; - int psx_taken_BFC26DF4 = 0; - int psx_delay_BFC26E28 = 0; - int psx_taken_BFC26E28 = 0; - int psx_delay_BFC26E34 = 0; - int psx_taken_BFC26E34 = 0; - int psx_delay_BFC26E5C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26C24u: goto label_BFC26C24; - case 0xBFC26C40u: goto label_BFC26C40; - case 0xBFC26C48u: goto label_BFC26C48; - case 0xBFC26C50u: goto label_BFC26C50; - case 0xBFC26C74u: goto label_BFC26C74; - case 0xBFC26C84u: goto label_BFC26C84; - case 0xBFC26C8Cu: goto label_BFC26C8C; - case 0xBFC26C9Cu: goto label_BFC26C9C; - case 0xBFC26CB4u: goto label_BFC26CB4; - case 0xBFC26CBCu: goto label_BFC26CBC; - case 0xBFC26CC8u: goto label_BFC26CC8; - case 0xBFC26CDCu: goto label_BFC26CDC; - case 0xBFC26CF0u: goto label_BFC26CF0; - case 0xBFC26D04u: goto label_BFC26D04; - case 0xBFC26D0Cu: goto label_BFC26D0C; - case 0xBFC26D18u: goto label_BFC26D18; - case 0xBFC26D28u: goto label_BFC26D28; - case 0xBFC26D30u: goto label_BFC26D30; - case 0xBFC26D38u: goto label_BFC26D38; - case 0xBFC26D50u: goto label_BFC26D50; - case 0xBFC26D5Cu: goto label_BFC26D5C; - case 0xBFC26D64u: goto label_BFC26D64; - case 0xBFC26D78u: goto label_BFC26D78; - case 0xBFC26D8Cu: goto label_BFC26D8C; - case 0xBFC26D98u: goto label_BFC26D98; - case 0xBFC26DA0u: goto label_BFC26DA0; - case 0xBFC26DA8u: goto label_BFC26DA8; - case 0xBFC26DBCu: goto label_BFC26DBC; - case 0xBFC26DC8u: goto label_BFC26DC8; - case 0xBFC26DCCu: goto label_BFC26DCC; - case 0xBFC26DDCu: goto label_BFC26DDC; - case 0xBFC26DE8u: goto label_BFC26DE8; - case 0xBFC26DECu: goto label_BFC26DEC; - case 0xBFC26DFCu: goto label_BFC26DFC; - case 0xBFC26E30u: goto label_BFC26E30; - case 0xBFC26E3Cu: goto label_BFC26E3C; - case 0xBFC26E48u: goto label_BFC26E48; - case 0xBFC26E54u: goto label_BFC26E54; - case 0xBFC26E58u: goto label_BFC26E58; - default: break; - } - } -label_BFC26C10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26C10: 27BDFF90 addiu $sp, $sp, -112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-112)); - PGXP_ALU(0x27BDFF90u, cpu->gpr[29], _pgx1, 0xFFFFFF90u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26C14: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC14u); return; } g_debug_last_store_pc = 0x8003EC14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC26C18: AFA40070 sw $a0, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC18u); return; } g_debug_last_store_pc = 0x8003EC18u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40070u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26C1C: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x8003EC24u; /* jal link before delay slot */ - psx_delay_BFC26C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26C20: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC20u); -#endif - if (psx_delay_BFC26C1C) { - psx_delay_BFC26C1C = 0; - cpu->gpr[31] = 0x8003EC24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC26C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26C24: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC26C28: 3C06A001 lui $a2, 0xA001 */ - cpu->gpr[6] = 0xA0010000u; - PGXP_ALU(0x3C06A001u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26C2C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC30u); -#endif - /* 0xBFC26C30: 8CA59DE4 lw $a1, -25116($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC30u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59DE4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC26C34: AC269ED8 sw $a2, -24872($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24872; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC34u); return; } g_debug_last_store_pc = 0x8003EC34u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC269ED8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26C38: 0C00FBBE jal 0xB003EEF8 */ - cpu->gpr[31] = 0x8003EC40u; /* jal link before delay slot */ - psx_delay_BFC26C38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26C3C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC3Cu); -#endif - if (psx_delay_BFC26C38) { - psx_delay_BFC26C38 = 0; - cpu->gpr[31] = 0x8003EC40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEF8u); - cpu->pc = 0x8003EEF8u; return; - } -label_BFC26C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26C40: 1C400003 bgtz $v0, 0xBFC26C50 */ - uint32_t psx_brA_BFC26C40 = cpu->gpr[2]; - psx_taken_BFC26C40 = ((int32_t)psx_brA_BFC26C40 > 0); - psx_delay_BFC26C40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26C44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EC44u); -#endif - if (psx_delay_BFC26C40) { - psx_delay_BFC26C40 = 0; - if (psx_taken_BFC26C40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC50u); - goto label_BFC26C50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC48u); - } -label_BFC26C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26C48: 10000082 beq $zero, $zero, 0xBFC26E54 */ - uint32_t psx_brA_BFC26C48 = cpu->gpr[0]; uint32_t psx_brB_BFC26C48 = cpu->gpr[0]; - psx_taken_BFC26C48 = (psx_brA_BFC26C48 == psx_brB_BFC26C48); - psx_delay_BFC26C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26C4C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC4Cu); -#endif - if (psx_delay_BFC26C48) { - psx_delay_BFC26C48 = 0; - if (psx_taken_BFC26C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE54u); - goto label_BFC26E54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC50u); - } -label_BFC26C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC26C50: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC26C54: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC54u); return; } g_debug_last_store_pc = 0x8003EC54u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC26C58: 3C07800F lui $a3, 0x800F */ - cpu->gpr[7] = 0x800F0000u; - PGXP_ALU(0x3C07800Fu, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26C5C: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC60u); -#endif - /* 0xBFC26C60: 8C639ED8 lw $v1, -24872($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -24872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-24872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EC60u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639ED8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26C64: 24A5D0F0 addiu $a1, $a1, -12048 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-12048)); - PGXP_ALU(0x24A5D0F0u, cpu->gpr[5], _pgx1, 0xFFFFD0F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC26C68: 24E7D0A8 addiu $a3, $a3, -12120 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-12120)); - PGXP_ALU(0x24E7D0A8u, cpu->gpr[7], _pgx1, 0xFFFFD0A8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC26C6C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26C70: 2404000A addiu $a0, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2404000Au, cpu->gpr[4], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC70u); -#endif -label_BFC26C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC74u); -#endif - /* 0xBFC26C74: 80620000 lb $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 2, 0x8u); - PGXP_LOAD(0x80620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC26C7C: 10820007 beq $a0, $v0, 0xBFC26C9C */ - uint32_t psx_brA_BFC26C7C = cpu->gpr[4]; uint32_t psx_brB_BFC26C7C = cpu->gpr[2]; - psx_taken_BFC26C7C = (psx_brA_BFC26C7C == psx_brB_BFC26C7C); - psx_delay_BFC26C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EC80u); -#endif - if (psx_delay_BFC26C7C) { - psx_delay_BFC26C7C = 0; - if (psx_taken_BFC26C7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC9Cu); - goto label_BFC26C9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC84u); - } -label_BFC26C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26C84: 10400005 beq $v0, $zero, 0xBFC26C9C */ - uint32_t psx_brA_BFC26C84 = cpu->gpr[2]; uint32_t psx_brB_BFC26C84 = cpu->gpr[0]; - psx_taken_BFC26C84 = (psx_brA_BFC26C84 == psx_brB_BFC26C84); - psx_delay_BFC26C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26C88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EC88u); -#endif - if (psx_delay_BFC26C84) { - psx_delay_BFC26C84 = 0; - if (psx_taken_BFC26C84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC9Cu); - goto label_BFC26C9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC8Cu); - } -label_BFC26C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC26C8C: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC26C90: A0E2FFFF sb $v0, -1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EC90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0E2FFFFu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC26C94: 14E5FFF7 bne $a3, $a1, 0xBFC26C74 */ - uint32_t psx_brA_BFC26C94 = cpu->gpr[7]; uint32_t psx_brB_BFC26C94 = cpu->gpr[5]; - psx_taken_BFC26C94 = (psx_brA_BFC26C94 != psx_brB_BFC26C94); - psx_delay_BFC26C94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC26C98: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC98u); -#endif - if (psx_delay_BFC26C94) { - psx_delay_BFC26C94 = 0; - if (psx_taken_BFC26C94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC74u); - goto label_BFC26C74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EC9Cu); - } -label_BFC26C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC26C9C: A0E00000 sb $zero, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EC9Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC26CA0: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ECA0u); -#endif - /* 0xBFC26CA4: 8CC69ED8 lw $a2, -24872($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -24872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-24872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECA4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69ED8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26CA8: 24040007 addiu $a0, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24040007u, cpu->gpr[4], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26CAC: 0C00FBBE jal 0xB003EEF8 */ - cpu->gpr[31] = 0x8003ECB4u; /* jal link before delay slot */ - psx_delay_BFC26CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26CB0: 24050005 addiu $a1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24050005u, cpu->gpr[5], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECB0u); -#endif - if (psx_delay_BFC26CAC) { - psx_delay_BFC26CAC = 0; - cpu->gpr[31] = 0x8003ECB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEF8u); - cpu->pc = 0x8003EEF8u; return; - } -label_BFC26CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26CB4: 1C400004 bgtz $v0, 0xBFC26CC8 */ - uint32_t psx_brA_BFC26CB4 = cpu->gpr[2]; - psx_taken_BFC26CB4 = ((int32_t)psx_brA_BFC26CB4 > 0); - psx_delay_BFC26CB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26CB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ECB8u); -#endif - if (psx_delay_BFC26CB4) { - psx_delay_BFC26CB4 = 0; - if (psx_taken_BFC26CB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ECC8u); - goto label_BFC26CC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ECBCu); - } -label_BFC26CBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECBCu); -#endif - /* 0xBFC26CBC: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECBCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26CC0: 10000064 beq $zero, $zero, 0xBFC26E54 */ - uint32_t psx_brA_BFC26CC0 = cpu->gpr[0]; uint32_t psx_brB_BFC26CC0 = cpu->gpr[0]; - psx_taken_BFC26CC0 = (psx_brA_BFC26CC0 == psx_brB_BFC26CC0); - psx_delay_BFC26CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26CC4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECC4u); -#endif - if (psx_delay_BFC26CC0) { - psx_delay_BFC26CC0 = 0; - if (psx_taken_BFC26CC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE54u); - goto label_BFC26E54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ECC8u); - } -label_BFC26CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26CC8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ECC8u); -#endif - /* 0xBFC26CCC: 8DCE9DEC lw $t6, -25108($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DECu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC26CD0: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECD0u); return; } g_debug_last_store_pc = 0x8003ECD0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC26CD4: 11C00016 beq $t6, $zero, 0xBFC26D30 */ - uint32_t psx_brA_BFC26CD4 = cpu->gpr[14]; uint32_t psx_brB_BFC26CD4 = cpu->gpr[0]; - psx_taken_BFC26CD4 = (psx_brA_BFC26CD4 == psx_brB_BFC26CD4); - psx_delay_BFC26CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC26CD8: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECD8u); -#endif - if (psx_delay_BFC26CD4) { - psx_delay_BFC26CD4 = 0; - if (psx_taken_BFC26CD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED30u); - goto label_BFC26D30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ECDCu); - } -label_BFC26CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC26CDC: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECDCu); return; } g_debug_last_store_pc = 0x8003ECDCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC26CE0: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ECE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC26CE4: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ECE4u); -#endif - /* 0xBFC26CE8: 8E109ED8 lw $s0, -24872($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -24872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-24872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ECE8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E109ED8u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC26CEC: 26319E08 addiu $s1, $s1, -25080 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-25080)); - PGXP_ALU(0x26319E08u, cpu->gpr[17], _pgx1, 0xFFFF9E08u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECECu); -#endif -label_BFC26CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ECF0u); -#endif - /* 0xBFC26CF0: 82220000 lb $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 2, 0x20000u); - PGXP_LOAD(0x82220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECF0u); -#endif - /* 0xBFC26CF4: 82030000 lb $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 3, 0x10000u); - PGXP_LOAD(0x82030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC26CF8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ECF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC26CFC: 10620006 beq $v1, $v0, 0xBFC26D18 */ - uint32_t psx_brA_BFC26CFC = cpu->gpr[3]; uint32_t psx_brB_BFC26CFC = cpu->gpr[2]; - psx_taken_BFC26CFC = (psx_brA_BFC26CFC == psx_brB_BFC26CFC); - psx_delay_BFC26CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC26D00: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED00u); -#endif - if (psx_delay_BFC26CFC) { - psx_delay_BFC26CFC = 0; - if (psx_taken_BFC26CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED18u); - goto label_BFC26D18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED04u); - } -label_BFC26D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26D04: 0C00C1E2 jal 0xB0030788 */ - cpu->gpr[31] = 0x8003ED0Cu; /* jal link before delay slot */ - psx_delay_BFC26D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26D08: 24040007 addiu $a0, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24040007u, cpu->gpr[4], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED08u); -#endif - if (psx_delay_BFC26D04) { - psx_delay_BFC26D04 = 0; - cpu->gpr[31] = 0x8003ED0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80030788u); - cpu->pc = 0x80030788u; return; - } -label_BFC26D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC26D0C: 24040042 addiu $a0, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24040042u, cpu->gpr[4], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26D10: 0C016AD8 jal 0xB005AB60 */ - cpu->gpr[31] = 0x8003ED18u; /* jal link before delay slot */ - psx_delay_BFC26D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC26D14: 2405038D addiu $a1, $zero, 909 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (909)); - PGXP_ALU(0x2405038Du, cpu->gpr[5], _pgx1, 0x0000038Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED14u); -#endif - if (psx_delay_BFC26D10) { - psx_delay_BFC26D10 = 0; - cpu->gpr[31] = 0x8003ED18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB60u); - cpu->pc = 0x8005AB60u; return; - } -label_BFC26D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC26D18: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26D1C: 24013278 addiu $at, $zero, 12920 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12920)); - PGXP_ALU(0x24013278u, cpu->gpr[1], _pgx1, 0x00003278u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC26D20: 1641FFF3 bne $s2, $at, 0xBFC26CF0 */ - uint32_t psx_brA_BFC26D20 = cpu->gpr[18]; uint32_t psx_brB_BFC26D20 = cpu->gpr[1]; - psx_taken_BFC26D20 = (psx_brA_BFC26D20 != psx_brB_BFC26D20); - psx_delay_BFC26D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ED24u); -#endif - if (psx_delay_BFC26D20) { - psx_delay_BFC26D20 = 0; - if (psx_taken_BFC26D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ECF0u); - goto label_BFC26CF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED28u); - } -label_BFC26D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED28u); -#endif - /* 0xBFC26D28: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003ED28u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC26D2C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED2Cu); -#endif -label_BFC26D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC26D30: 27A20070 addiu $v0, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A20070u, cpu->gpr[2], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC26D34: 27A30078 addiu $v1, $sp, 120 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (120)); - PGXP_ALU(0x27A30078u, cpu->gpr[3], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED34u); -#endif -label_BFC26D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26D38: A040FFD8 sb $zero, -40($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -40; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003ED38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-40)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFD8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26D3C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26D40: A040FFD5 sb $zero, -43($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -43; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003ED40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-43)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFD5u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26D44: A040FFD6 sb $zero, -42($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -42; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003ED44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-42)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFD6u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC26D48: 1443FFFB bne $v0, $v1, 0xBFC26D38 */ - uint32_t psx_brA_BFC26D48 = cpu->gpr[2]; uint32_t psx_brB_BFC26D48 = cpu->gpr[3]; - psx_taken_BFC26D48 = (psx_brA_BFC26D48 != psx_brB_BFC26D48); - psx_delay_BFC26D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26D4C: A040FFD7 sb $zero, -41($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -41; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003ED4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-41)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040FFD7u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED4Cu); -#endif - if (psx_delay_BFC26D48) { - psx_delay_BFC26D48 = 0; - if (psx_taken_BFC26D48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED38u); - goto label_BFC26D38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED50u); - } -label_BFC26D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC26D50: 27A40048 addiu $a0, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27A40048u, cpu->gpr[4], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26D54: 0C00FB99 jal 0xB003EE64 */ - cpu->gpr[31] = 0x8003ED5Cu; /* jal link before delay slot */ - psx_delay_BFC26D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC26D58: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED58u); -#endif - if (psx_delay_BFC26D54) { - psx_delay_BFC26D54 = 0; - cpu->gpr[31] = 0x8003ED5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE64u); - cpu->pc = 0x8003EE64u; return; - } -label_BFC26D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26D5C: 04410027 bgez $v0, 0xBFC26DFC */ - uint32_t psx_brA_BFC26D5C = cpu->gpr[2]; - psx_taken_BFC26D5C = ((int32_t)psx_brA_BFC26D5C >= 0); - psx_delay_BFC26D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC26D60: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED60u); -#endif - if (psx_delay_BFC26D5C) { - psx_delay_BFC26D5C = 0; - if (psx_taken_BFC26D5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDFCu); - goto label_BFC26DFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED64u); - } -label_BFC26D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED64u); -#endif - /* 0xBFC26D64: 93A20048 lbu $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 2, 0x20000000u); - PGXP_LOAD(0x93A20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ED68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC26D6C: 30420080 andi $v0, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x30420080u, cpu->gpr[2], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26D70: 1040000B beq $v0, $zero, 0xBFC26DA0 */ - uint32_t psx_brA_BFC26D70 = cpu->gpr[2]; uint32_t psx_brB_BFC26D70 = cpu->gpr[0]; - psx_taken_BFC26D70 = (psx_brA_BFC26D70 == psx_brB_BFC26D70); - psx_delay_BFC26D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ED74u); -#endif - if (psx_delay_BFC26D70) { - psx_delay_BFC26D70 = 0; - if (psx_taken_BFC26D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDA0u); - goto label_BFC26DA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED78u); - } -label_BFC26D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED78u); -#endif - /* 0xBFC26D78: 93AF0044 lbu $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 15, 0x20000000u); - PGXP_LOAD(0x93AF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ED7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC26D80: 31F80080 andi $t8, $t7, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x80u; - PGXP_ALU(0x31F80080u, cpu->gpr[24], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC26D84: 13000006 beq $t8, $zero, 0xBFC26DA0 */ - uint32_t psx_brA_BFC26D84 = cpu->gpr[24]; uint32_t psx_brB_BFC26D84 = cpu->gpr[0]; - psx_taken_BFC26D84 = (psx_brA_BFC26D84 == psx_brB_BFC26D84); - psx_delay_BFC26D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003ED88u); -#endif - if (psx_delay_BFC26D84) { - psx_delay_BFC26D84 = 0; - if (psx_taken_BFC26D84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDA0u); - goto label_BFC26DA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003ED8Cu); - } -label_BFC26D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26D8C: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003ED8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26D90: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003ED98u; /* jal link before delay slot */ - psx_delay_BFC26D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26D94: 24846F10 addiu $a0, $a0, 28432 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28432)); - PGXP_ALU(0x24846F10u, cpu->gpr[4], _pgx1, 0x00006F10u); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED94u); -#endif - if (psx_delay_BFC26D90) { - psx_delay_BFC26D90 = 0; - cpu->gpr[31] = 0x8003ED98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC26D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003ED98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26D98: 1000000C beq $zero, $zero, 0xBFC26DCC */ - uint32_t psx_brA_BFC26D98 = cpu->gpr[0]; uint32_t psx_brB_BFC26D98 = cpu->gpr[0]; - psx_taken_BFC26D98 = (psx_brA_BFC26D98 == psx_brB_BFC26D98); - psx_delay_BFC26D98 = 1; - /* 0xBFC26D9C: 93A90048 lbu $t1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 9, 0x20000000u); - PGXP_LOAD(0x93A90048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003ED9Cu); -#endif - if (psx_delay_BFC26D98) { - psx_delay_BFC26D98 = 0; - if (psx_taken_BFC26D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDCCu); - goto label_BFC26DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDA0u); - } -label_BFC26DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26DA0: 1040000A beq $v0, $zero, 0xBFC26DCC */ - uint32_t psx_brA_BFC26DA0 = cpu->gpr[2]; uint32_t psx_brB_BFC26DA0 = cpu->gpr[0]; - psx_taken_BFC26DA0 = (psx_brA_BFC26DA0 == psx_brB_BFC26DA0); - psx_delay_BFC26DA0 = 1; - /* 0xBFC26DA4: 93A90048 lbu $t1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 9, 0x20000000u); - PGXP_LOAD(0x93A90048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDA4u); -#endif - if (psx_delay_BFC26DA0) { - psx_delay_BFC26DA0 = 0; - if (psx_taken_BFC26DA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDCCu); - goto label_BFC26DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDA8u); - } -label_BFC26DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDA8u); -#endif - /* 0xBFC26DA8: 93B90044 lbu $t9, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (68)), 25, 0x20000000u); - PGXP_LOAD(0x93B90044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC26DB0: 33280010 andi $t0, $t9, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x10u; - PGXP_ALU(0x33280010u, cpu->gpr[8], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC26DB4: 11000005 beq $t0, $zero, 0xBFC26DCC */ - uint32_t psx_brA_BFC26DB4 = cpu->gpr[8]; uint32_t psx_brB_BFC26DB4 = cpu->gpr[0]; - psx_taken_BFC26DB4 = (psx_brA_BFC26DB4 == psx_brB_BFC26DB4); - psx_delay_BFC26DB4 = 1; - /* 0xBFC26DB8: 93A90048 lbu $t1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 9, 0x20000000u); - PGXP_LOAD(0x93A90048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDB8u); -#endif - if (psx_delay_BFC26DB4) { - psx_delay_BFC26DB4 = 0; - if (psx_taken_BFC26DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDCCu); - goto label_BFC26DCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDBCu); - } -label_BFC26DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26DBC: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26DC0: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003EDC8u; /* jal link before delay slot */ - psx_delay_BFC26DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26DC4: 24846F30 addiu $a0, $a0, 28464 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28464)); - PGXP_ALU(0x24846F30u, cpu->gpr[4], _pgx1, 0x00006F30u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDC4u); -#endif - if (psx_delay_BFC26DC0) { - psx_delay_BFC26DC0 = 0; - cpu->gpr[31] = 0x8003EDC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC26DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDC8u); -#endif - /* 0xBFC26DC8: 93A90048 lbu $t1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (72)), 9, 0x20000000u); - PGXP_LOAD(0x93A90048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDC8u); -#endif -label_BFC26DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26DCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC26DD0: 312A0010 andi $t2, $t1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x10u; - PGXP_ALU(0x312A0010u, cpu->gpr[10], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC26DD4: 11400005 beq $t2, $zero, 0xBFC26DEC */ - uint32_t psx_brA_BFC26DD4 = cpu->gpr[10]; uint32_t psx_brB_BFC26DD4 = cpu->gpr[0]; - psx_taken_BFC26DD4 = (psx_brA_BFC26DD4 == psx_brB_BFC26DD4); - psx_delay_BFC26DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC26DD8: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDD8u); -#endif - if (psx_delay_BFC26DD4) { - psx_delay_BFC26DD4 = 0; - if (psx_taken_BFC26DD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDECu); - goto label_BFC26DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDDCu); - } -label_BFC26DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26DDC: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26DE0: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8003EDE8u; /* jal link before delay slot */ - psx_delay_BFC26DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26DE4: 24846F40 addiu $a0, $a0, 28480 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28480)); - PGXP_ALU(0x24846F40u, cpu->gpr[4], _pgx1, 0x00006F40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDE4u); -#endif - if (psx_delay_BFC26DE0) { - psx_delay_BFC26DE0 = 0; - cpu->gpr[31] = 0x8003EDE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC26DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC26DE8: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDE8u); -#endif -label_BFC26DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDECu); -#endif - /* 0xBFC26DEC: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EDECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDF0u); -#endif - /* 0xBFC26DF0: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EDF0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26DF4: 10000018 beq $zero, $zero, 0xBFC26E58 */ - uint32_t psx_brA_BFC26DF4 = cpu->gpr[0]; uint32_t psx_brB_BFC26DF4 = cpu->gpr[0]; - psx_taken_BFC26DF4 = (psx_brA_BFC26DF4 == psx_brB_BFC26DF4); - psx_delay_BFC26DF4 = 1; - /* 0xBFC26DF8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EDF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDF8u); -#endif - if (psx_delay_BFC26DF4) { - psx_delay_BFC26DF4 = 0; - if (psx_taken_BFC26DF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE58u); - goto label_BFC26E58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EDFCu); - } -label_BFC26DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EDFCu); -#endif - /* 0xBFC26DFC: 93AB004D lbu $t3, 77($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 77; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (77)), 11, 0x20000000u); - PGXP_LOAD(0x93AB004Du, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E00: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE00u); -#endif - /* 0xBFC26E04: 93AC004E lbu $t4, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (78)), 12, 0x20000000u); - PGXP_LOAD(0x93AC004Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC26E08: A02B9EDD sb $t3, -24867($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24867; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24867)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA02B9EDDu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E0C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE10u); -#endif - /* 0xBFC26E10: 93AD004F lbu $t5, 79($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 79; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (79)), 13, 0x20000000u); - PGXP_LOAD(0x93AD004Fu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC26E14: A02C9EDE sb $t4, -24866($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24866; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24866)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA02C9EDEu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E18: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE18u); -#endif - /* 0xBFC26E1C: 83A2004C lb $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (76)), 2, 0x20000000u); - PGXP_LOAD(0x83A2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC26E20: A02D9EDF sb $t5, -24865($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24865; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24865)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA02D9EDFu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E24: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26E28: 10400004 beq $v0, $zero, 0xBFC26E3C */ - uint32_t psx_brA_BFC26E28 = cpu->gpr[2]; uint32_t psx_brB_BFC26E28 = cpu->gpr[0]; - psx_taken_BFC26E28 = (psx_brA_BFC26E28 == psx_brB_BFC26E28); - psx_delay_BFC26E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26E2C: A0209EE0 sb $zero, -24864($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24864; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24864)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0209EE0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE2Cu); -#endif - if (psx_delay_BFC26E28) { - psx_delay_BFC26E28 = 0; - if (psx_taken_BFC26E28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE3Cu); - goto label_BFC26E3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE30u); - } -label_BFC26E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E30: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26E34: 10000004 beq $zero, $zero, 0xBFC26E48 */ - uint32_t psx_brA_BFC26E34 = cpu->gpr[0]; uint32_t psx_brB_BFC26E34 = cpu->gpr[0]; - psx_taken_BFC26E34 = (psx_brA_BFC26E34 == psx_brB_BFC26E34); - psx_delay_BFC26E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26E38: A0229EDC sb $v0, -24868($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24868; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24868)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0229EDCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE38u); -#endif - if (psx_delay_BFC26E34) { - psx_delay_BFC26E34 = 0; - if (psx_taken_BFC26E34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE48u); - goto label_BFC26E48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE3Cu); - } -label_BFC26E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26E3C: 24020020 addiu $v0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24020020u, cpu->gpr[2], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC26E40: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC26E44: A0229EDC sb $v0, -24868($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24868; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EE44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-24868)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0229EDCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE44u); -#endif -label_BFC26E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE48u); -#endif - /* 0xBFC26E48: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE48u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE48u); -#endif - /* 0xBFC26E4C: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE4Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26E50: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE50u); -#endif -label_BFC26E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE54u); -#endif - /* 0xBFC26E54: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE54u); -#endif -label_BFC26E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26E58: 27BD0070 addiu $sp, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27BD0070u, cpu->gpr[29], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26E5C: 03E00008 jr $ra */ - psx_delay_BFC26E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26E60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EE60u); -#endif - if (psx_delay_BFC26E5C) { - psx_delay_BFC26E5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26E64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26E64u); - int psx_delay_BFC26E80 = 0; - int psx_delay_BFC26E88 = 0; - int psx_taken_BFC26E88 = 0; - int psx_delay_BFC26E90 = 0; - int psx_taken_BFC26E90 = 0; - int psx_delay_BFC26E9C = 0; - int psx_delay_BFC26EA4 = 0; - int psx_taken_BFC26EA4 = 0; - int psx_delay_BFC26EB8 = 0; - int psx_delay_BFC26EC0 = 0; - int psx_taken_BFC26EC0 = 0; - int psx_delay_BFC26ED0 = 0; - int psx_delay_BFC26ED8 = 0; - int psx_taken_BFC26ED8 = 0; - int psx_delay_BFC26EF0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC26E88u: goto label_BFC26E88; - case 0xBFC26E90u: goto label_BFC26E90; - case 0xBFC26E98u: goto label_BFC26E98; - case 0xBFC26E9Cu: goto label_BFC26E9C; - case 0xBFC26EA4u: goto label_BFC26EA4; - case 0xBFC26EACu: goto label_BFC26EAC; - case 0xBFC26EB0u: goto label_BFC26EB0; - case 0xBFC26EC0u: goto label_BFC26EC0; - case 0xBFC26EC8u: goto label_BFC26EC8; - case 0xBFC26ED8u: goto label_BFC26ED8; - case 0xBFC26EE0u: goto label_BFC26EE0; - case 0xBFC26EE8u: goto label_BFC26EE8; - default: break; - } - } -label_BFC26E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26E64: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC26E68: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE68u); return; } g_debug_last_store_pc = 0x8003EE68u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC26E6C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE6Cu); return; } g_debug_last_store_pc = 0x8003EE6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC26E70: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC26E74: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26E78: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EE78u); return; } g_debug_last_store_pc = 0x8003EE78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC26E7C: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26E80: 0C016098 jal 0xB0058260 */ - cpu->gpr[31] = 0x8003EE88u; /* jal link before delay slot */ - psx_delay_BFC26E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC26E84: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE84u); -#endif - if (psx_delay_BFC26E80) { - psx_delay_BFC26E80 = 0; - cpu->gpr[31] = 0x8003EE88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058260u); - cpu->pc = 0x80058260u; return; - } -label_BFC26E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26E88: 10400004 beq $v0, $zero, 0xBFC26E9C */ - uint32_t psx_brA_BFC26E88 = cpu->gpr[2]; uint32_t psx_brB_BFC26E88 = cpu->gpr[0]; - psx_taken_BFC26E88 = (psx_brA_BFC26E88 == psx_brB_BFC26E88); - psx_delay_BFC26E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC26E8C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE8Cu); -#endif - if (psx_delay_BFC26E88) { - psx_delay_BFC26E88 = 0; - if (psx_taken_BFC26E88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE9Cu); - goto label_BFC26E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE90u); - } -label_BFC26E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26E90: 10000007 beq $zero, $zero, 0xBFC26EB0 */ - uint32_t psx_brA_BFC26E90 = cpu->gpr[0]; uint32_t psx_brB_BFC26E90 = cpu->gpr[0]; - psx_taken_BFC26E90 = (psx_brA_BFC26E90 == psx_brB_BFC26E90); - psx_delay_BFC26E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC26E94: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE94u); -#endif - if (psx_delay_BFC26E90) { - psx_delay_BFC26E90 = 0; - if (psx_taken_BFC26E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEB0u); - goto label_BFC26EB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE98u); - } -label_BFC26E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC26E98: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EE98u); -#endif -label_BFC26E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26E9C: 0C016098 jal 0xB0058260 */ - cpu->gpr[31] = 0x8003EEA4u; /* jal link before delay slot */ - psx_delay_BFC26E9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC26EA0: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEA0u); -#endif - if (psx_delay_BFC26E9C) { - psx_delay_BFC26E9C = 0; - cpu->gpr[31] = 0x8003EEA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058260u); - cpu->pc = 0x80058260u; return; - } -label_BFC26EA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26EA4: 1040FFFD beq $v0, $zero, 0xBFC26E9C */ - uint32_t psx_brA_BFC26EA4 = cpu->gpr[2]; uint32_t psx_brB_BFC26EA4 = cpu->gpr[0]; - psx_taken_BFC26EA4 = (psx_brA_BFC26EA4 == psx_brB_BFC26EA4); - psx_delay_BFC26EA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC26EA8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEA8u); -#endif - if (psx_delay_BFC26EA4) { - psx_delay_BFC26EA4 = 0; - if (psx_taken_BFC26EA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EE9Cu); - goto label_BFC26E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEACu); - } -label_BFC26EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC26EAC: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEACu); -#endif -label_BFC26EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26EB0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EEB0u); -#endif - /* 0xBFC26EB4: 8C849E80 lw $a0, -24960($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EEB4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E80u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26EB8: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003EEC0u; /* jal link before delay slot */ - psx_delay_BFC26EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EEBCu); -#endif - if (psx_delay_BFC26EB8) { - psx_delay_BFC26EB8 = 0; - cpu->gpr[31] = 0x8003EEC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC26EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC26EC0: 10500009 beq $v0, $s0, 0xBFC26EE8 */ - uint32_t psx_brA_BFC26EC0 = cpu->gpr[2]; uint32_t psx_brB_BFC26EC0 = cpu->gpr[16]; - psx_taken_BFC26EC0 = (psx_brA_BFC26EC0 == psx_brB_BFC26EC0); - psx_delay_BFC26EC0 = 1; - /* 0xBFC26EC4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EEC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEC4u); -#endif - if (psx_delay_BFC26EC0) { - psx_delay_BFC26EC0 = 0; - if (psx_taken_BFC26EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEE8u); - goto label_BFC26EE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEC8u); - } -label_BFC26EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC26EC8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EEC8u); -#endif - /* 0xBFC26ECC: 8C849E8C lw $a0, -24948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EECCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E8Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC26ED0: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003EED8u; /* jal link before delay slot */ - psx_delay_BFC26ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26ED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EED4u); -#endif - if (psx_delay_BFC26ED0) { - psx_delay_BFC26ED0 = 0; - cpu->gpr[31] = 0x8003EED8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC26ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC26ED8: 1450FFF5 bne $v0, $s0, 0xBFC26EB0 */ - uint32_t psx_brA_BFC26ED8 = cpu->gpr[2]; uint32_t psx_brB_BFC26ED8 = cpu->gpr[16]; - psx_taken_BFC26ED8 = (psx_brA_BFC26ED8 != psx_brB_BFC26ED8); - psx_delay_BFC26ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26EDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EEDCu); -#endif - if (psx_delay_BFC26ED8) { - psx_delay_BFC26ED8 = 0; - if (psx_taken_BFC26ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEB0u); - goto label_BFC26EB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003EEE0u); - } -label_BFC26EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC26EE0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEE0u); -#endif - /* 0xBFC26EE4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EEE4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEE4u); -#endif -label_BFC26EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEE8u); -#endif - /* 0xBFC26EE8: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EEE8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEE8u); -#endif - /* 0xBFC26EEC: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EEECu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC26EF0: 03E00008 jr $ra */ - psx_delay_BFC26EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26EF4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEF4u); -#endif - if (psx_delay_BFC26EF0) { - psx_delay_BFC26EF0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC26EF8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC26EF8u); - int psx_delay_BFC2701C = 0; - int psx_delay_BFC27024 = 0; - int psx_taken_BFC27024 = 0; - int psx_delay_BFC2702C = 0; - int psx_taken_BFC2702C = 0; - int psx_delay_BFC27034 = 0; - int psx_delay_BFC2703C = 0; - int psx_taken_BFC2703C = 0; - int psx_delay_BFC27050 = 0; - int psx_delay_BFC27058 = 0; - int psx_taken_BFC27058 = 0; - int psx_delay_BFC27064 = 0; - int psx_taken_BFC27064 = 0; - int psx_delay_BFC27074 = 0; - int psx_delay_BFC2707C = 0; - int psx_taken_BFC2707C = 0; - int psx_delay_BFC27084 = 0; - int psx_taken_BFC27084 = 0; - int psx_delay_BFC2709C = 0; - int psx_delay_BFC270A4 = 0; - int psx_taken_BFC270A4 = 0; - int psx_delay_BFC270B0 = 0; - int psx_taken_BFC270B0 = 0; - int psx_delay_BFC270C0 = 0; - int psx_delay_BFC270C8 = 0; - int psx_taken_BFC270C8 = 0; - int psx_delay_BFC270D0 = 0; - int psx_taken_BFC270D0 = 0; - int psx_delay_BFC270E0 = 0; - int psx_delay_BFC270E8 = 0; - int psx_taken_BFC270E8 = 0; - int psx_delay_BFC270F4 = 0; - int psx_taken_BFC270F4 = 0; - int psx_delay_BFC270FC = 0; - int psx_taken_BFC270FC = 0; - int psx_delay_BFC2710C = 0; - int psx_delay_BFC27114 = 0; - int psx_taken_BFC27114 = 0; - int psx_delay_BFC27124 = 0; - int psx_taken_BFC27124 = 0; - int psx_delay_BFC27134 = 0; - int psx_delay_BFC2713C = 0; - int psx_taken_BFC2713C = 0; - int psx_delay_BFC2714C = 0; - int psx_taken_BFC2714C = 0; - int psx_delay_BFC27154 = 0; - int psx_taken_BFC27154 = 0; - int psx_delay_BFC2717C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27024u: goto label_BFC27024; - case 0xBFC2702Cu: goto label_BFC2702C; - case 0xBFC27034u: goto label_BFC27034; - case 0xBFC2703Cu: goto label_BFC2703C; - case 0xBFC27044u: goto label_BFC27044; - case 0xBFC27048u: goto label_BFC27048; - case 0xBFC27058u: goto label_BFC27058; - case 0xBFC27060u: goto label_BFC27060; - case 0xBFC2706Cu: goto label_BFC2706C; - case 0xBFC2707Cu: goto label_BFC2707C; - case 0xBFC27084u: goto label_BFC27084; - case 0xBFC2708Cu: goto label_BFC2708C; - case 0xBFC270A4u: goto label_BFC270A4; - case 0xBFC270ACu: goto label_BFC270AC; - case 0xBFC270B8u: goto label_BFC270B8; - case 0xBFC270C8u: goto label_BFC270C8; - case 0xBFC270D0u: goto label_BFC270D0; - case 0xBFC270D8u: goto label_BFC270D8; - case 0xBFC270E8u: goto label_BFC270E8; - case 0xBFC270F0u: goto label_BFC270F0; - case 0xBFC270FCu: goto label_BFC270FC; - case 0xBFC27104u: goto label_BFC27104; - case 0xBFC27114u: goto label_BFC27114; - case 0xBFC2711Cu: goto label_BFC2711C; - case 0xBFC2712Cu: goto label_BFC2712C; - case 0xBFC2713Cu: goto label_BFC2713C; - case 0xBFC27144u: goto label_BFC27144; - case 0xBFC27154u: goto label_BFC27154; - case 0xBFC2715Cu: goto label_BFC2715C; - case 0xBFC2716Cu: goto label_BFC2716C; - default: break; - } - } -label_BFC26EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC26EF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC26EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC26EF8: 24A50096 addiu $a1, $a1, 150 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (150)); - PGXP_ALU(0x24A50096u, cpu->gpr[5], _pgx1, 0x00000096u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26EFC: 24011194 addiu $at, $zero, 4500 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4500)); - PGXP_ALU(0x24011194u, cpu->gpr[1], _pgx1, 0x00001194u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC26F00: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC26F04: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26F08: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC26F0C: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF0Cu); return; } g_debug_last_store_pc = 0x8003EF0Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC26F10: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF10u); return; } g_debug_last_store_pc = 0x8003EF10u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC26F14: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF14u); return; } g_debug_last_store_pc = 0x8003EF14u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC26F18: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF18u); return; } g_debug_last_store_pc = 0x8003EF18u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC26F1C: 0080A021 addu $s4, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC26F20: 00C08021 addu $s0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC26F24: 27A40058 addiu $a0, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A40058u, cpu->gpr[4], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC26F28: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC26F2C: AFAE0038 sw $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF2Cu); return; } g_debug_last_store_pc = 0x8003EF2Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF30u); -#endif - /* 0xBFC26F30: 8FAF0038 lw $t7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF30u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF30u); -#endif - /* 0xBFC26F34: 8FB90038 lw $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF34u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC26F38: 01E1001A div $t7, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EF38u); -#endif - /* 0xBFC26F3C: 8FAB0038 lw $t3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF3Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0038u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26F40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC26F44: 000B60C0 sll $t4, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC26F48: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26F4C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC26F50: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26F54: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC26F58: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26F5C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC26F60: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC26F64: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC26F68: 00AC2823 subu $a1, $a1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[12]; - PGXP_ALU(0x00AC2823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC26F6C: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC26F78: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26F7C: 2401004B addiu $at, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2401004Bu, cpu->gpr[1], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC26F80: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC26F84: 00084900 sll $t1, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC26F88: 03095021 addu $t2, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC26F8C: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC26F90: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC26F94: A3AA0058 sb $t2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EF94u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (88)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0058u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC26F98: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC26F9C: AFAD0038 sw $t5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EF9Cu); return; } g_debug_last_store_pc = 0x8003EF9Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0038u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFA0u); -#endif - /* 0xBFC26FA0: 8FAE0038 lw $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFA0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFA0u); -#endif - /* 0xBFC26FA4: 8FB90038 lw $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFA4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC26FA8: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EFA8u); -#endif - /* 0xBFC26FAC: 8FAA0038 lw $t2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFACu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0038u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC26FB4: 000A5880 sll $t3, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC26FB8: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC26FBC: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC26FC0: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC26FC4: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC26FC8: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1820u); -#endif - /* 0xBFC26FCC: 00AB6023 subu $t4, $a1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[5] - cpu->gpr[11]; - PGXP_ALU(0x00AB6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC26FD0: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFD0u); return; } g_debug_last_store_pc = 0x8003EFD0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFD0u); -#endif - /* 0xBFC26FD4: 8FAD0038 lw $t5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFD4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0038u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC26FD8: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC26FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003EFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC26FE4: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EFE4u); -#endif - /* 0xBFC26FE8: 8FB90038 lw $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003EFE8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC26FEC: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003EFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003EFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC26FF0: 0008C100 sll $t8, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 4u; - PGXP_ALU(0x0008C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008200u); -#endif - /* 0xBFC26FF4: 01F84821 addu $t1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[9] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F84821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC26FF8: 01A1001A div $t5, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A1001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003EFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC26FFC: A3A90059 sb $t1, 89($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 89; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003EFFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (89)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A90059u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003EFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27000: 00007010 mfhi $t6 */ - cpu->gpr[14] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007010u, cpu->gpr[14], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27004: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27008: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2700C: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8003F00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC27010: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC27014: 00087900 sll $t7, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00087900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC27018: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2701C: 0C015C6E jal 0xB00571B8 */ - cpu->gpr[31] = 0x8003F024u; /* jal link before delay slot */ - psx_delay_BFC2701C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC27020: A3B8005A sb $t8, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F020u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (90)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B8005Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F020u); -#endif - if (psx_delay_BFC2701C) { - psx_delay_BFC2701C = 0; - cpu->gpr[31] = 0x8003F024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571B8u); - cpu->pc = 0x800571B8u; return; - } -label_BFC27024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27024: 10400003 beq $v0, $zero, 0xBFC27034 */ - uint32_t psx_brA_BFC27024 = cpu->gpr[2]; uint32_t psx_brB_BFC27024 = cpu->gpr[0]; - psx_taken_BFC27024 = (psx_brA_BFC27024 == psx_brB_BFC27024); - psx_delay_BFC27024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F028u); -#endif - if (psx_delay_BFC27024) { - psx_delay_BFC27024 = 0; - if (psx_taken_BFC27024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F034u); - goto label_BFC27034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F02Cu); - } -label_BFC2702C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2702Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2702Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2702C: 10000006 beq $zero, $zero, 0xBFC27048 */ - uint32_t psx_brA_BFC2702C = cpu->gpr[0]; uint32_t psx_brB_BFC2702C = cpu->gpr[0]; - psx_taken_BFC2702C = (psx_brA_BFC2702C == psx_brB_BFC2702C); - psx_delay_BFC2702C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC27030: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F030u); -#endif - if (psx_delay_BFC2702C) { - psx_delay_BFC2702C = 0; - if (psx_taken_BFC2702C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F048u); - goto label_BFC27048; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F034u); - } -label_BFC27034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27034: 0C015C6E jal 0xB00571B8 */ - cpu->gpr[31] = 0x8003F03Cu; /* jal link before delay slot */ - psx_delay_BFC27034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC27038: 27A40058 addiu $a0, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A40058u, cpu->gpr[4], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F038u); -#endif - if (psx_delay_BFC27034) { - psx_delay_BFC27034 = 0; - cpu->gpr[31] = 0x8003F03Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571B8u); - cpu->pc = 0x800571B8u; return; - } -label_BFC2703C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2703Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2703C: 1040FFFD beq $v0, $zero, 0xBFC27034 */ - uint32_t psx_brA_BFC2703C = cpu->gpr[2]; uint32_t psx_brB_BFC2703C = cpu->gpr[0]; - psx_taken_BFC2703C = (psx_brA_BFC2703C == psx_brB_BFC2703C); - psx_delay_BFC2703C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F040u); -#endif - if (psx_delay_BFC2703C) { - psx_delay_BFC2703C = 0; - if (psx_taken_BFC2703C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F034u); - goto label_BFC27034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F044u); - } -label_BFC27044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC27044: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F044u); -#endif -label_BFC27048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27048: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F048u); -#endif - /* 0xBFC2704C: 8C849E80 lw $a0, -24960($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F04Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E80u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27050: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003F058u; /* jal link before delay slot */ - psx_delay_BFC27050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F054u); -#endif - if (psx_delay_BFC27050) { - psx_delay_BFC27050 = 0; - cpu->gpr[31] = 0x8003F058u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC27058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC27058: 14520004 bne $v0, $s2, 0xBFC2706C */ - uint32_t psx_brA_BFC27058 = cpu->gpr[2]; uint32_t psx_brB_BFC27058 = cpu->gpr[18]; - psx_taken_BFC27058 = (psx_brA_BFC27058 != psx_brB_BFC27058); - psx_delay_BFC27058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2705C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F05Cu); -#endif - if (psx_delay_BFC27058) { - psx_delay_BFC27058 = 0; - if (psx_taken_BFC27058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F06Cu); - goto label_BFC2706C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F060u); - } -label_BFC27060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC27060: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F060u); return; } g_debug_last_store_pc = 0x8003F060u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27064: 10000009 beq $zero, $zero, 0xBFC2708C */ - uint32_t psx_brA_BFC27064 = cpu->gpr[0]; uint32_t psx_brB_BFC27064 = cpu->gpr[0]; - psx_taken_BFC27064 = (psx_brA_BFC27064 == psx_brB_BFC27064); - psx_delay_BFC27064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC27068: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F068u); return; } g_debug_last_store_pc = 0x8003F068u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F068u); -#endif - if (psx_delay_BFC27064) { - psx_delay_BFC27064 = 0; - if (psx_taken_BFC27064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F08Cu); - goto label_BFC2708C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F06Cu); - } -label_BFC2706C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2706Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2706Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2706C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F070u); -#endif - /* 0xBFC27070: 8C849E8C lw $a0, -24948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F070u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E8Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27074: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003F07Cu; /* jal link before delay slot */ - psx_delay_BFC27074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F078u); -#endif - if (psx_delay_BFC27074) { - psx_delay_BFC27074 = 0; - cpu->gpr[31] = 0x8003F07Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC2707C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2707Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC2707C: 1452FFF2 bne $v0, $s2, 0xBFC27048 */ - uint32_t psx_brA_BFC2707C = cpu->gpr[2]; uint32_t psx_brB_BFC2707C = cpu->gpr[18]; - psx_taken_BFC2707C = (psx_brA_BFC2707C != psx_brB_BFC2707C); - psx_delay_BFC2707C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F080u); -#endif - if (psx_delay_BFC2707C) { - psx_delay_BFC2707C = 0; - if (psx_taken_BFC2707C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F048u); - goto label_BFC27048; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F084u); - } -label_BFC27084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27084: 10000039 beq $zero, $zero, 0xBFC2716C */ - uint32_t psx_brA_BFC27084 = cpu->gpr[0]; uint32_t psx_brB_BFC27084 = cpu->gpr[0]; - psx_taken_BFC27084 = (psx_brA_BFC27084 == psx_brB_BFC27084); - psx_delay_BFC27084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27088: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F088u); -#endif - if (psx_delay_BFC27084) { - psx_delay_BFC27084 = 0; - if (psx_taken_BFC27084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F16Cu); - goto label_BFC2716C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F08Cu); - } -label_BFC2708C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2708Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2708C: 3C110001 lui $s1, 0x1 */ - cpu->gpr[17] = 0x00010000u; - PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27090: 3631869F ori $s1, $s1, 0x869F */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] | 0x869Fu; - PGXP_ALU(0x3631869Fu, cpu->gpr[17], _pgx1, 0x869Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC27094: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC27098: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2709C: 0C015D76 jal 0xB00575D8 */ - cpu->gpr[31] = 0x8003F0A4u; /* jal link before delay slot */ - psx_delay_BFC2709C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC270A0: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0A0u); -#endif - if (psx_delay_BFC2709C) { - psx_delay_BFC2709C = 0; - cpu->gpr[31] = 0x8003F0A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575D8u); - cpu->pc = 0x800575D8u; return; - } -label_BFC270A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC270A4: 1440000A bne $v0, $zero, 0xBFC270D0 */ - uint32_t psx_brA_BFC270A4 = cpu->gpr[2]; uint32_t psx_brB_BFC270A4 = cpu->gpr[0]; - psx_taken_BFC270A4 = (psx_brA_BFC270A4 != psx_brB_BFC270A4); - psx_delay_BFC270A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC270A8: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0A8u); -#endif - if (psx_delay_BFC270A4) { - psx_delay_BFC270A4 = 0; - if (psx_taken_BFC270A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0D0u); - goto label_BFC270D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0ACu); - } -label_BFC270AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC270AC: 2631FFFF addiu $s1, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2631FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC270B0: 1A200007 blez $s1, 0xBFC270D0 */ - uint32_t psx_brA_BFC270B0 = cpu->gpr[17]; - psx_taken_BFC270B0 = ((int32_t)psx_brA_BFC270B0 <= 0); - psx_delay_BFC270B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC270B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F0B4u); -#endif - if (psx_delay_BFC270B0) { - psx_delay_BFC270B0 = 0; - if (psx_taken_BFC270B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0D0u); - goto label_BFC270D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0B8u); - } -label_BFC270B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC270B8: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC270BC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC270C0: 0C015D76 jal 0xB00575D8 */ - cpu->gpr[31] = 0x8003F0C8u; /* jal link before delay slot */ - psx_delay_BFC270C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC270C4: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0C4u); -#endif - if (psx_delay_BFC270C0) { - psx_delay_BFC270C0 = 0; - cpu->gpr[31] = 0x8003F0C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575D8u); - cpu->pc = 0x800575D8u; return; - } -label_BFC270C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC270C8: 1040FFF8 beq $v0, $zero, 0xBFC270AC */ - uint32_t psx_brA_BFC270C8 = cpu->gpr[2]; uint32_t psx_brB_BFC270C8 = cpu->gpr[0]; - psx_taken_BFC270C8 = (psx_brA_BFC270C8 == psx_brB_BFC270C8); - psx_delay_BFC270C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC270CC: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0CCu); -#endif - if (psx_delay_BFC270C8) { - psx_delay_BFC270C8 = 0; - if (psx_taken_BFC270C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0ACu); - goto label_BFC270AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0D0u); - } -label_BFC270D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC270D0: 1A200022 blez $s1, 0xBFC2715C */ - uint32_t psx_brA_BFC270D0 = cpu->gpr[17]; - psx_taken_BFC270D0 = ((int32_t)psx_brA_BFC270D0 <= 0); - psx_delay_BFC270D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC270D4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0D4u); -#endif - if (psx_delay_BFC270D0) { - psx_delay_BFC270D0 = 0; - if (psx_taken_BFC270D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F15Cu); - goto label_BFC2715C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0D8u); - } -label_BFC270D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC270D8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F0D8u); -#endif - /* 0xBFC270DC: 8C849E80 lw $a0, -24960($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F0DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E80u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC270E0: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003F0E8u; /* jal link before delay slot */ - psx_delay_BFC270E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC270E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F0E4u); -#endif - if (psx_delay_BFC270E0) { - psx_delay_BFC270E0 = 0; - cpu->gpr[31] = 0x8003F0E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC270E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC270E8: 14520006 bne $v0, $s2, 0xBFC27104 */ - uint32_t psx_brA_BFC270E8 = cpu->gpr[2]; uint32_t psx_brB_BFC270E8 = cpu->gpr[18]; - psx_taken_BFC270E8 = (psx_brA_BFC270E8 != psx_brB_BFC270E8); - psx_delay_BFC270E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC270EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F0ECu); -#endif - if (psx_delay_BFC270E8) { - psx_delay_BFC270E8 = 0; - if (psx_taken_BFC270E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F104u); - goto label_BFC27104; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0F0u); - } -label_BFC270F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC270F0: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC270F4: 1A000003 blez $s0, 0xBFC27104 */ - uint32_t psx_brA_BFC270F4 = cpu->gpr[16]; - psx_taken_BFC270F4 = ((int32_t)psx_brA_BFC270F4 <= 0); - psx_delay_BFC270F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC270F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F0F8u); -#endif - if (psx_delay_BFC270F4) { - psx_delay_BFC270F4 = 0; - if (psx_taken_BFC270F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F104u); - goto label_BFC27104; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0FCu); - } -label_BFC270FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC270FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC270FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC270FC: 10000017 beq $zero, $zero, 0xBFC2715C */ - uint32_t psx_brA_BFC270FC = cpu->gpr[0]; uint32_t psx_brB_BFC270FC = cpu->gpr[0]; - psx_taken_BFC270FC = (psx_brA_BFC270FC == psx_brB_BFC270FC); - psx_delay_BFC270FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180001u); -#endif - /* 0xBFC27100: 02809821 addu $s3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F100u); -#endif - if (psx_delay_BFC270FC) { - psx_delay_BFC270FC = 0; - if (psx_taken_BFC270FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F15Cu); - goto label_BFC2715C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F104u); - } -label_BFC27104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27104: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F104u); -#endif - /* 0xBFC27108: 8C849E8C lw $a0, -24948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F108u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E8Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2710C: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003F114u; /* jal link before delay slot */ - psx_delay_BFC2710C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27110: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F110u); -#endif - if (psx_delay_BFC2710C) { - psx_delay_BFC2710C = 0; - cpu->gpr[31] = 0x8003F114u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC27114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC27114: 14520005 bne $v0, $s2, 0xBFC2712C */ - uint32_t psx_brA_BFC27114 = cpu->gpr[2]; uint32_t psx_brB_BFC27114 = cpu->gpr[18]; - psx_taken_BFC27114 = (psx_brA_BFC27114 != psx_brB_BFC27114); - psx_delay_BFC27114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F118u); -#endif - if (psx_delay_BFC27114) { - psx_delay_BFC27114 = 0; - if (psx_taken_BFC27114) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F12Cu); - goto label_BFC2712C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F11Cu); - } -label_BFC2711C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2711Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2711Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F11Cu); -#endif - /* 0xBFC2711C: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F11Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F120u); -#endif - /* 0xBFC27120: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F120u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27124: 10000011 beq $zero, $zero, 0xBFC2716C */ - uint32_t psx_brA_BFC27124 = cpu->gpr[0]; uint32_t psx_brB_BFC27124 = cpu->gpr[0]; - psx_taken_BFC27124 = (psx_brA_BFC27124 == psx_brB_BFC27124); - psx_delay_BFC27124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27128: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F128u); -#endif - if (psx_delay_BFC27124) { - psx_delay_BFC27124 = 0; - if (psx_taken_BFC27124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F16Cu); - goto label_BFC2716C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F12Cu); - } -label_BFC2712C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2712Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2712Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2712C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F130u); -#endif - /* 0xBFC27130: 8C849E88 lw $a0, -24952($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F130u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849E88u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27134: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8003F13Cu; /* jal link before delay slot */ - psx_delay_BFC27134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F138u); -#endif - if (psx_delay_BFC27134) { - psx_delay_BFC27134 = 0; - cpu->gpr[31] = 0x8003F13Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC2713C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2713Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2713Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC2713C: 14520005 bne $v0, $s2, 0xBFC27154 */ - uint32_t psx_brA_BFC2713C = cpu->gpr[2]; uint32_t psx_brB_BFC2713C = cpu->gpr[18]; - psx_taken_BFC2713C = (psx_brA_BFC2713C != psx_brB_BFC2713C); - psx_delay_BFC2713C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F140u); -#endif - if (psx_delay_BFC2713C) { - psx_delay_BFC2713C = 0; - if (psx_taken_BFC2713C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F154u); - goto label_BFC27154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F144u); - } -label_BFC27144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F144u); -#endif - /* 0xBFC27144: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F144u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F144u); -#endif - /* 0xBFC27148: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F148u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2714C: 10000007 beq $zero, $zero, 0xBFC2716C */ - uint32_t psx_brA_BFC2714C = cpu->gpr[0]; uint32_t psx_brB_BFC2714C = cpu->gpr[0]; - psx_taken_BFC2714C = (psx_brA_BFC2714C == psx_brB_BFC2714C); - psx_delay_BFC2714C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27150: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F150u); -#endif - if (psx_delay_BFC2714C) { - psx_delay_BFC2714C = 0; - if (psx_taken_BFC2714C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F16Cu); - goto label_BFC2716C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F154u); - } -label_BFC27154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27154: 1E20FFE0 bgtz $s1, 0xBFC270D8 */ - uint32_t psx_brA_BFC27154 = cpu->gpr[17]; - psx_taken_BFC27154 = ((int32_t)psx_brA_BFC27154 > 0); - psx_delay_BFC27154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F158u); -#endif - if (psx_delay_BFC27154) { - psx_delay_BFC27154 = 0; - if (psx_taken_BFC27154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F0D8u); - goto label_BFC270D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F15Cu); - } -label_BFC2715C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2715Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC2715C: 02601021 addu $v0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F160u); -#endif - /* 0xBFC27160: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F160u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F160u); -#endif - /* 0xBFC27164: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F164u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F168u); -#endif -label_BFC2716C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2716Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2716Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F16Cu); -#endif - /* 0xBFC2716C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F16Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F170u); -#endif - /* 0xBFC27170: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F170u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F170u); -#endif - /* 0xBFC27174: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F174u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F174u); -#endif - /* 0xBFC27178: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F178u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2717C: 03E00008 jr $ra */ - psx_delay_BFC2717C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27180: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F180u); -#endif - if (psx_delay_BFC2717C) { - psx_delay_BFC2717C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27190(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27190u); - int psx_delay_BFC271B8 = 0; - int psx_delay_BFC271C0 = 0; - int psx_delay_BFC271E0 = 0; - int psx_delay_BFC27200 = 0; - int psx_delay_BFC27220 = 0; - int psx_delay_BFC27240 = 0; - int psx_delay_BFC27254 = 0; - int psx_taken_BFC27254 = 0; - int psx_delay_BFC272EC = 0; - int psx_delay_BFC2731C = 0; - int psx_delay_BFC27328 = 0; - int psx_taken_BFC27328 = 0; - int psx_delay_BFC27330 = 0; - int psx_taken_BFC27330 = 0; - int psx_delay_BFC27344 = 0; - int psx_taken_BFC27344 = 0; - int psx_delay_BFC27384 = 0; - int psx_delay_BFC27390 = 0; - int psx_taken_BFC27390 = 0; - int psx_delay_BFC27398 = 0; - int psx_delay_BFC273A0 = 0; - int psx_delay_BFC273B0 = 0; - int psx_taken_BFC273B0 = 0; - int psx_delay_BFC273DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC271C0u: goto label_BFC271C0; - case 0xBFC271C8u: goto label_BFC271C8; - case 0xBFC271E8u: goto label_BFC271E8; - case 0xBFC27208u: goto label_BFC27208; - case 0xBFC27228u: goto label_BFC27228; - case 0xBFC27248u: goto label_BFC27248; - case 0xBFC2725Cu: goto label_BFC2725C; - case 0xBFC272B8u: goto label_BFC272B8; - case 0xBFC272ECu: goto label_BFC272EC; - case 0xBFC272F4u: goto label_BFC272F4; - case 0xBFC27324u: goto label_BFC27324; - case 0xBFC27328u: goto label_BFC27328; - case 0xBFC27330u: goto label_BFC27330; - case 0xBFC27338u: goto label_BFC27338; - case 0xBFC2734Cu: goto label_BFC2734C; - case 0xBFC2738Cu: goto label_BFC2738C; - case 0xBFC27398u: goto label_BFC27398; - case 0xBFC273A0u: goto label_BFC273A0; - case 0xBFC273A8u: goto label_BFC273A8; - case 0xBFC273B8u: goto label_BFC273B8; - default: break; - } - } -label_BFC27190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27190: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27194: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F194u); return; } g_debug_last_store_pc = 0x8003F194u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC27198: AFB70038 sw $s7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F198u); return; } g_debug_last_store_pc = 0x8003F198u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70038u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2719C: AFB60034 sw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F19Cu); return; } g_debug_last_store_pc = 0x8003F19Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC271A0: AFB50030 sw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1A0u); return; } g_debug_last_store_pc = 0x8003F1A0u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC271A4: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1A4u); return; } g_debug_last_store_pc = 0x8003F1A4u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC271A8: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1A8u); return; } g_debug_last_store_pc = 0x8003F1A8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC271AC: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1ACu); return; } g_debug_last_store_pc = 0x8003F1ACu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC271B0: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1B0u); return; } g_debug_last_store_pc = 0x8003F1B0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC271B4: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1B4u); return; } g_debug_last_store_pc = 0x8003F1B4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC271B8: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x8003F1C0u; /* jal link before delay slot */ - psx_delay_BFC271B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC271BC: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1BCu); -#endif - if (psx_delay_BFC271B8) { - psx_delay_BFC271B8 = 0; - cpu->gpr[31] = 0x8003F1C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC271C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC271C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC271C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC271C0: 0C010FC4 jal 0xB0043F10 */ - cpu->gpr[31] = 0x8003F1C8u; /* jal link before delay slot */ - psx_delay_BFC271C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC271C4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1C4u); -#endif - if (psx_delay_BFC271C0) { - psx_delay_BFC271C0 = 0; - cpu->gpr[31] = 0x8003F1C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F10u); - cpu->pc = 0x80043F10u; return; - } -label_BFC271C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC271C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC271C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC271C8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC271CC: 240E01DE addiu $t6, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x240E01DEu, cpu->gpr[14], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC271D0: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1D0u); return; } g_debug_last_store_pc = 0x8003F1D0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC271D4: 2484A868 addiu $a0, $a0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22424)); - PGXP_ALU(0x2484A868u, cpu->gpr[4], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC271D8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC271DC: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC271E0: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x8003F1E8u; /* jal link before delay slot */ - psx_delay_BFC271E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC271E4: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1E4u); -#endif - if (psx_delay_BFC271E0) { - psx_delay_BFC271E0 = 0; - cpu->gpr[31] = 0x8003F1E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC271E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC271E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC271E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC271E8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC271EC: 240F01DE addiu $t7, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x240F01DEu, cpu->gpr[15], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC271F0: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F1F0u); return; } g_debug_last_store_pc = 0x8003F1F0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC271F4: 2484BC88 addiu $a0, $a0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); - PGXP_ALU(0x2484BC88u, cpu->gpr[4], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC271F8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC271FC: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27200: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x8003F208u; /* jal link before delay slot */ - psx_delay_BFC27200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27204: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F204u); -#endif - if (psx_delay_BFC27200) { - psx_delay_BFC27200 = 0; - cpu->gpr[31] = 0x8003F208u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC27208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27208: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2720C: 241801DE addiu $t8, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241801DEu, cpu->gpr[24], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC27210: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F210u); return; } g_debug_last_store_pc = 0x8003F210u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27214: 2484A8C4 addiu $a0, $a0, -22332 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22332)); - PGXP_ALU(0x2484A8C4u, cpu->gpr[4], _pgx1, 0xFFFFA8C4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27218: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2721C: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27220: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x8003F228u; /* jal link before delay slot */ - psx_delay_BFC27220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27224: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F224u); -#endif - if (psx_delay_BFC27220) { - psx_delay_BFC27220 = 0; - cpu->gpr[31] = 0x8003F228u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC27228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27228: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2722C: 241901DE addiu $t9, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241901DEu, cpu->gpr[25], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC27230: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F230u); return; } g_debug_last_store_pc = 0x8003F230u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27234: 2484BCE4 addiu $a0, $a0, -17180 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17180)); - PGXP_ALU(0x2484BCE4u, cpu->gpr[4], _pgx1, 0xFFFFBCE4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27238: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2723C: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27240: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x8003F248u; /* jal link before delay slot */ - psx_delay_BFC27240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27244: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F244u); -#endif - if (psx_delay_BFC27240) { - psx_delay_BFC27240 = 0; - cpu->gpr[31] = 0x8003F248u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC27248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC27248: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F248u); -#endif - /* 0xBFC2724C: 8D089DE0 lw $t0, -25120($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F24Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC27254: 11000018 beq $t0, $zero, 0xBFC272B8 */ - uint32_t psx_brA_BFC27254 = cpu->gpr[8]; uint32_t psx_brB_BFC27254 = cpu->gpr[0]; - psx_taken_BFC27254 = (psx_brA_BFC27254 == psx_brB_BFC27254); - psx_delay_BFC27254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC27258: 240F00EF addiu $t7, $zero, 239 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (239)); - PGXP_ALU(0x240F00EFu, cpu->gpr[15], _pgx1, 0x000000EFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F258u); -#endif - if (psx_delay_BFC27254) { - psx_delay_BFC27254 = 0; - if (psx_taken_BFC27254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F2B8u); - goto label_BFC272B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F25Cu); - } -label_BFC2725C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2725Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2725C: 24090003 addiu $t1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24090003u, cpu->gpr[9], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27260: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC27264: A429BCEC sh $t1, -17172($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17172)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F264u); return; } g_debug_last_store_pc = 0x8003F264u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA429BCECu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27268: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2726C: 240A0003 addiu $t2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240A0003u, cpu->gpr[10], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC27270: A42AA8CC sh $t2, -22324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22324)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F270u); return; } g_debug_last_store_pc = 0x8003F270u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA42AA8CCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27274: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC27278: 240B001B addiu $t3, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240B001Bu, cpu->gpr[11], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2727C: A42BBCEE sh $t3, -17170($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F27Cu); return; } g_debug_last_store_pc = 0x8003F27Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA42BBCEEu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27280: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC27284: 240C001B addiu $t4, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240C001Bu, cpu->gpr[12], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC27288: A42CA8CE sh $t4, -22322($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22322; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22322)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F288u); return; } g_debug_last_store_pc = 0x8003F288u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CA8CEu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2728C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27290: A420BCF0 sh $zero, -17168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F290u); return; } g_debug_last_store_pc = 0x8003F290u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420BCF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27294: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27298: A420A8D0 sh $zero, -22320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22320)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F298u); return; } g_debug_last_store_pc = 0x8003F298u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420A8D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2729C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC272A0: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC272A4: A02DBCF6 sb $t5, -17162($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17162; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F2A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-17162)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA02DBCF6u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC272A8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC272AC: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC272B0: A02EA8D6 sb $t6, -22314($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22314; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F2B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22314)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EA8D6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC272B4: 240F00EF addiu $t7, $zero, 239 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (239)); - PGXP_ALU(0x240F00EFu, cpu->gpr[15], _pgx1, 0x000000EFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2B4u); -#endif -label_BFC272B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC272B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC272B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC272B8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC272BC: A42FBCF2 sh $t7, -17166($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F2BCu); return; } g_debug_last_store_pc = 0x8003F2BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FBCF2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC272C0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC272C4: 241800EF addiu $t8, $zero, 239 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (239)); - PGXP_ALU(0x241800EFu, cpu->gpr[24], _pgx1, 0x000000EFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC272C8: 3C118014 lui $s1, 0x8014 */ - cpu->gpr[17] = 0x80140000u; - PGXP_ALU(0x3C118014u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC272CC: A438A8D2 sh $t8, -22318($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22318; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22318)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F2CCu); return; } g_debug_last_store_pc = 0x8003F2CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438A8D2u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC272D0: 263181C8 addiu $s1, $s1, -32312 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-32312)); - PGXP_ALU(0x263181C8u, cpu->gpr[17], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC272D4: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC272D8: 0000B821 addu $s7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC272DC: 24120001 addiu $s2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24120001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC272E0: 24130002 addiu $s3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24130002u, cpu->gpr[19], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC272E4: 24140020 addiu $s4, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24140020u, cpu->gpr[20], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC272E8: 24150008 addiu $s5, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24150008u, cpu->gpr[21], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2E8u); -#endif -label_BFC272EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC272ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC272ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC272EC: 0C011DA8 jal 0xB00476A0 */ - cpu->gpr[31] = 0x8003F2F4u; /* jal link before delay slot */ - psx_delay_BFC272EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC272F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F2F0u); -#endif - if (psx_delay_BFC272EC) { - psx_delay_BFC272EC = 0; - cpu->gpr[31] = 0x8003F2F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476A0u); - cpu->pc = 0x800476A0u; return; - } -label_BFC272F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC272F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC272F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC272F4: 0002C880 sll $t9, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC272F8: 0322C821 addu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[2]; - PGXP_ALU(0x0322C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC272FC: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC27300: 0322C821 addu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[2]; - PGXP_ALU(0x0322C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27304: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC27308: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2730C: AC229E24 sw $v0, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F30Cu); return; } g_debug_last_store_pc = 0x8003F30Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020010u); -#endif - /* 0xBFC27310: 02392021 addu $a0, $s1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[25]; - PGXP_ALU(0x02392021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC27314: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC27318: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2731C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8003F324u; /* jal link before delay slot */ - psx_delay_BFC2731C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400081u); -#endif - /* 0xBFC27320: 02C03821 addu $a3, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F320u); -#endif - if (psx_delay_BFC2731C) { - psx_delay_BFC2731C = 0; - cpu->gpr[31] = 0x8003F324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC27324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC27324: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F324u); -#endif -label_BFC27328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC27328: 12120003 beq $s0, $s2, 0xBFC27338 */ - uint32_t psx_brA_BFC27328 = cpu->gpr[16]; uint32_t psx_brB_BFC27328 = cpu->gpr[18]; - psx_taken_BFC27328 = (psx_brA_BFC27328 == psx_brB_BFC27328); - psx_delay_BFC27328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2732C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F32Cu); -#endif - if (psx_delay_BFC27328) { - psx_delay_BFC27328 = 0; - if (psx_taken_BFC27328) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F338u); - goto label_BFC27338; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F330u); - } -label_BFC27330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC27330: 16130006 bne $s0, $s3, 0xBFC2734C */ - uint32_t psx_brA_BFC27330 = cpu->gpr[16]; uint32_t psx_brB_BFC27330 = cpu->gpr[19]; - psx_taken_BFC27330 = (psx_brA_BFC27330 != psx_brB_BFC27330); - psx_delay_BFC27330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27334: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F334u); -#endif - if (psx_delay_BFC27330) { - psx_delay_BFC27330 = 0; - if (psx_taken_BFC27330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F34Cu); - goto label_BFC2734C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F338u); - } -label_BFC27338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC27338: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F338u); -#endif - /* 0xBFC2733C: 81089EDC lb $t0, -24868($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24868; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-24868)), 8, 0x100u); - PGXP_LOAD(0x81089EDCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC27344: 11140011 beq $t0, $s4, 0xBFC2738C */ - uint32_t psx_brA_BFC27344 = cpu->gpr[8]; uint32_t psx_brB_BFC27344 = cpu->gpr[20]; - psx_taken_BFC27344 = (psx_brA_BFC27344 == psx_brB_BFC27344); - psx_delay_BFC27344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F348u); -#endif - if (psx_delay_BFC27344) { - psx_delay_BFC27344 = 0; - if (psx_taken_BFC27344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F38Cu); - goto label_BFC2738C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F34Cu); - } -label_BFC2734C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2734Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2734Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2734C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F350u); -#endif - /* 0xBFC27350: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F350u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27354: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC27358: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2735C: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC27360: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC27364: 001060C0 sll $t4, $s0, 3 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] << 3u; - PGXP_ALU(0x001060C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC27368: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F368u); -#endif - /* 0xBFC2736C: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F36Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC27370: 000A5180 sll $t2, $t2, 6 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 6u; - PGXP_ALU(0x000A5180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC27374: 01906023 subu $t4, $t4, $s0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[16]; - PGXP_ALU(0x01906023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC27378: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20C00u); -#endif - /* 0xBFC2737C: 022A5821 addu $t3, $s1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[17] + cpu->gpr[10]; - PGXP_ALU(0x022A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1820u); -#endif - /* 0xBFC27380: 016C2821 addu $a1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27384: 0C0112C9 jal 0xB0044B24 */ - cpu->gpr[31] = 0x8003F38Cu; /* jal link before delay slot */ - psx_delay_BFC27384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27388: 24840084 addiu $a0, $a0, 132 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (132)); - PGXP_ALU(0x24840084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F388u); -#endif - if (psx_delay_BFC27384) { - psx_delay_BFC27384 = 0; - cpu->gpr[31] = 0x8003F38Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B24u); - cpu->pc = 0x80044B24u; return; - } -label_BFC2738C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2738Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2738Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2738C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC27390: 1615FFE5 bne $s0, $s5, 0xBFC27328 */ - uint32_t psx_brA_BFC27390 = cpu->gpr[16]; uint32_t psx_brB_BFC27390 = cpu->gpr[21]; - psx_taken_BFC27390 = (psx_brA_BFC27390 != psx_brB_BFC27390); - psx_delay_BFC27390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27394: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F394u); -#endif - if (psx_delay_BFC27390) { - psx_delay_BFC27390 = 0; - if (psx_taken_BFC27390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F328u); - goto label_BFC27328; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F398u); - } -label_BFC27398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27398: 0C011DC6 jal 0xB0047718 */ - cpu->gpr[31] = 0x8003F3A0u; /* jal link before delay slot */ - psx_delay_BFC27398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2739C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F39Cu); -#endif - if (psx_delay_BFC27398) { - psx_delay_BFC27398 = 0; - cpu->gpr[31] = 0x8003F3A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047718u); - cpu->pc = 0x80047718u; return; - } -label_BFC273A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC273A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC273A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC273A0: 0C00FEF7 jal 0xB003FBDC */ - cpu->gpr[31] = 0x8003F3A8u; /* jal link before delay slot */ - psx_delay_BFC273A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC273A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F3A4u); -#endif - if (psx_delay_BFC273A0) { - psx_delay_BFC273A0 = 0; - cpu->gpr[31] = 0x8003F3A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FBDCu); - cpu->pc = 0x8003FBDCu; return; - } -label_BFC273A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC273A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC273A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC273A8: 26F70001 addiu $s7, $s7, 1 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (1)); - PGXP_ALU(0x26F70001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800002u); -#endif - /* 0xBFC273AC: 2AE1001E slti $at, $s7, 30 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (30) ? 1 : 0); - PGXP_ALU(0x2AE1001Eu, cpu->gpr[1], _pgx1, 0x001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC273B0: 1420FFCE bne $at, $zero, 0xBFC272EC */ - uint32_t psx_brA_BFC273B0 = cpu->gpr[1]; uint32_t psx_brB_BFC273B0 = cpu->gpr[0]; - psx_taken_BFC273B0 = (psx_brA_BFC273B0 != psx_brB_BFC273B0); - psx_delay_BFC273B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC273B4: 26D60005 addiu $s6, $s6, 5 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (5)); - PGXP_ALU(0x26D60005u, cpu->gpr[22], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3B4u); -#endif - if (psx_delay_BFC273B0) { - psx_delay_BFC273B0 = 0; - if (psx_taken_BFC273B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F2ECu); - goto label_BFC272EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F3B8u); - } -label_BFC273B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC273B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC273B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3B8u); -#endif - /* 0xBFC273B8: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3B8u); -#endif - /* 0xBFC273BC: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3BCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3C0u); -#endif - /* 0xBFC273C0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3C0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3C0u); -#endif - /* 0xBFC273C4: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3C4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3C4u); -#endif - /* 0xBFC273C8: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3C8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3C8u); -#endif - /* 0xBFC273CC: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3CCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3D0u); -#endif - /* 0xBFC273D0: 8FB50030 lw $s5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3D0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50030u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3D0u); -#endif - /* 0xBFC273D4: 8FB60034 lw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3D4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3D4u); -#endif - /* 0xBFC273D8: 8FB70038 lw $s7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3D8u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70038u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC273DC: 03E00008 jr $ra */ - psx_delay_BFC273DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC273E0: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3E0u); -#endif - if (psx_delay_BFC273DC) { - psx_delay_BFC273DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC273E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC273E4u); - int psx_delay_BFC27440 = 0; - int psx_taken_BFC27440 = 0; - int psx_delay_BFC2744C = 0; - int psx_taken_BFC2744C = 0; - int psx_delay_BFC27464 = 0; - int psx_delay_BFC27478 = 0; - int psx_delay_BFC2748C = 0; - int psx_delay_BFC274A0 = 0; - int psx_delay_BFC274BC = 0; - int psx_taken_BFC274BC = 0; - int psx_delay_BFC274CC = 0; - int psx_taken_BFC274CC = 0; - int psx_delay_BFC274D4 = 0; - int psx_taken_BFC274D4 = 0; - int psx_delay_BFC274E4 = 0; - int psx_delay_BFC27500 = 0; - int psx_taken_BFC27500 = 0; - int psx_delay_BFC27510 = 0; - int psx_taken_BFC27510 = 0; - int psx_delay_BFC27518 = 0; - int psx_taken_BFC27518 = 0; - int psx_delay_BFC27528 = 0; - int psx_delay_BFC27544 = 0; - int psx_taken_BFC27544 = 0; - int psx_delay_BFC27554 = 0; - int psx_taken_BFC27554 = 0; - int psx_delay_BFC2755C = 0; - int psx_taken_BFC2755C = 0; - int psx_delay_BFC2756C = 0; - int psx_delay_BFC27588 = 0; - int psx_taken_BFC27588 = 0; - int psx_delay_BFC27598 = 0; - int psx_taken_BFC27598 = 0; - int psx_delay_BFC275A0 = 0; - int psx_taken_BFC275A0 = 0; - int psx_delay_BFC275B0 = 0; - int psx_delay_BFC275B8 = 0; - int psx_delay_BFC275C0 = 0; - int psx_taken_BFC275C0 = 0; - int psx_delay_BFC275E8 = 0; - int psx_delay_BFC275F4 = 0; - int psx_taken_BFC275F4 = 0; - int psx_delay_BFC2760C = 0; - int psx_taken_BFC2760C = 0; - int psx_delay_BFC276C4 = 0; - int psx_delay_BFC276D0 = 0; - int psx_taken_BFC276D0 = 0; - int psx_delay_BFC276F0 = 0; - int psx_delay_BFC276F8 = 0; - int psx_taken_BFC276F8 = 0; - int psx_delay_BFC27700 = 0; - int psx_delay_BFC2770C = 0; - int psx_taken_BFC2770C = 0; - int psx_delay_BFC2772C = 0; - int psx_delay_BFC27734 = 0; - int psx_taken_BFC27734 = 0; - int psx_delay_BFC27754 = 0; - int psx_delay_BFC27774 = 0; - int psx_delay_BFC27794 = 0; - int psx_delay_BFC277B4 = 0; - int psx_delay_BFC277D4 = 0; - int psx_delay_BFC277F4 = 0; - int psx_delay_BFC277FC = 0; - int psx_taken_BFC277FC = 0; - int psx_delay_BFC2781C = 0; - int psx_delay_BFC27834 = 0; - int psx_taken_BFC27834 = 0; - int psx_delay_BFC27860 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27434u: goto label_BFC27434; - case 0xBFC27448u: goto label_BFC27448; - case 0xBFC27454u: goto label_BFC27454; - case 0xBFC2745Cu: goto label_BFC2745C; - case 0xBFC2746Cu: goto label_BFC2746C; - case 0xBFC27480u: goto label_BFC27480; - case 0xBFC27494u: goto label_BFC27494; - case 0xBFC274A8u: goto label_BFC274A8; - case 0xBFC274C4u: goto label_BFC274C4; - case 0xBFC274C8u: goto label_BFC274C8; - case 0xBFC274D4u: goto label_BFC274D4; - case 0xBFC274DCu: goto label_BFC274DC; - case 0xBFC274E0u: goto label_BFC274E0; - case 0xBFC274ECu: goto label_BFC274EC; - case 0xBFC27508u: goto label_BFC27508; - case 0xBFC2750Cu: goto label_BFC2750C; - case 0xBFC27518u: goto label_BFC27518; - case 0xBFC27520u: goto label_BFC27520; - case 0xBFC27524u: goto label_BFC27524; - case 0xBFC27530u: goto label_BFC27530; - case 0xBFC2754Cu: goto label_BFC2754C; - case 0xBFC27550u: goto label_BFC27550; - case 0xBFC2755Cu: goto label_BFC2755C; - case 0xBFC27564u: goto label_BFC27564; - case 0xBFC27568u: goto label_BFC27568; - case 0xBFC27574u: goto label_BFC27574; - case 0xBFC27590u: goto label_BFC27590; - case 0xBFC27594u: goto label_BFC27594; - case 0xBFC275A0u: goto label_BFC275A0; - case 0xBFC275A8u: goto label_BFC275A8; - case 0xBFC275ACu: goto label_BFC275AC; - case 0xBFC275B8u: goto label_BFC275B8; - case 0xBFC275C0u: goto label_BFC275C0; - case 0xBFC275C8u: goto label_BFC275C8; - case 0xBFC275D4u: goto label_BFC275D4; - case 0xBFC275F0u: goto label_BFC275F0; - case 0xBFC275FCu: goto label_BFC275FC; - case 0xBFC27600u: goto label_BFC27600; - case 0xBFC27614u: goto label_BFC27614; - case 0xBFC276CCu: goto label_BFC276CC; - case 0xBFC276D8u: goto label_BFC276D8; - case 0xBFC276F8u: goto label_BFC276F8; - case 0xBFC27700u: goto label_BFC27700; - case 0xBFC27708u: goto label_BFC27708; - case 0xBFC27714u: goto label_BFC27714; - case 0xBFC27734u: goto label_BFC27734; - case 0xBFC2773Cu: goto label_BFC2773C; - case 0xBFC2775Cu: goto label_BFC2775C; - case 0xBFC27760u: goto label_BFC27760; - case 0xBFC2777Cu: goto label_BFC2777C; - case 0xBFC2779Cu: goto label_BFC2779C; - case 0xBFC277BCu: goto label_BFC277BC; - case 0xBFC277DCu: goto label_BFC277DC; - case 0xBFC277FCu: goto label_BFC277FC; - case 0xBFC27804u: goto label_BFC27804; - case 0xBFC27824u: goto label_BFC27824; - case 0xBFC27828u: goto label_BFC27828; - case 0xBFC2783Cu: goto label_BFC2783C; - default: break; - } - } -label_BFC273E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC273E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC273E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC273E4: 27BDFEE8 addiu $sp, $sp, -280 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-280)); - PGXP_ALU(0x27BDFEE8u, cpu->gpr[29], _pgx1, 0xFFFFFEE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC273E8: AFB70048 sw $s7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3E8u); return; } g_debug_last_store_pc = 0x8003F3E8u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70048u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC273EC: AFB60044 sw $s6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3ECu); return; } g_debug_last_store_pc = 0x8003F3ECu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60044u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC273F0: AFB50040 sw $s5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3F0u); return; } g_debug_last_store_pc = 0x8003F3F0u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50040u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC273F4: AFB30038 sw $s3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3F4u); return; } g_debug_last_store_pc = 0x8003F3F4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30038u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC273F8: AFB4003C sw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3F8u); return; } g_debug_last_store_pc = 0x8003F3F8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC273FC: AFBF004C sw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F3FCu); return; } g_debug_last_store_pc = 0x8003F3FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC27400: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F400u); return; } g_debug_last_store_pc = 0x8003F400u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC27404: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F404u); return; } g_debug_last_store_pc = 0x8003F404u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC27408: 3C13800F lui $s3, 0x800F */ - cpu->gpr[19] = 0x800F0000u; - PGXP_ALU(0x3C13800Fu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2740C: 3C158014 lui $s5, 0x8014 */ - cpu->gpr[21] = 0x80140000u; - PGXP_ALU(0x3C158014u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC27410: 3C168014 lui $s6, 0x8014 */ - cpu->gpr[22] = 0x80140000u; - PGXP_ALU(0x3C168014u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC27414: 3C178014 lui $s7, 0x8014 */ - cpu->gpr[23] = 0x80140000u; - PGXP_ALU(0x3C178014u, cpu->gpr[23], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27418: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F418u); return; } g_debug_last_store_pc = 0x8003F418u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2741C: AFA40118 sw $a0, 280($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F41Cu); return; } g_debug_last_store_pc = 0x8003F41Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40118u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC27420: 26F782A8 addiu $s7, $s7, -32088 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (-32088)); - PGXP_ALU(0x26F782A8u, cpu->gpr[23], _pgx1, 0xFFFF82A8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC27424: 26D68238 addiu $s6, $s6, -32200 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-32200)); - PGXP_ALU(0x26D68238u, cpu->gpr[22], _pgx1, 0xFFFF8238u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC27428: 26B581C8 addiu $s5, $s5, -32312 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-32312)); - PGXP_ALU(0x26B581C8u, cpu->gpr[21], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2742C: 2673D0A8 addiu $s3, $s3, -12120 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-12120)); - PGXP_ALU(0x2673D0A8u, cpu->gpr[19], _pgx1, 0xFFFFD0A8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC27430: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F430u); -#endif -label_BFC27434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27434: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F434u); -#endif - /* 0xBFC27438: 8DCE9DEC lw $t6, -25108($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F438u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DECu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2743C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC27440: 11C00004 beq $t6, $zero, 0xBFC27454 */ - uint32_t psx_brA_BFC27440 = cpu->gpr[14]; uint32_t psx_brB_BFC27440 = cpu->gpr[0]; - psx_taken_BFC27440 = (psx_brA_BFC27440 == psx_brB_BFC27440); - psx_delay_BFC27440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27444: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F444u); -#endif - if (psx_delay_BFC27440) { - psx_delay_BFC27440 = 0; - if (psx_taken_BFC27440) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F454u); - goto label_BFC27454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F448u); - } -label_BFC27448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27448: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2744C: 10000003 beq $zero, $zero, 0xBFC2745C */ - uint32_t psx_brA_BFC2744C = cpu->gpr[0]; uint32_t psx_brB_BFC2744C = cpu->gpr[0]; - psx_taken_BFC2744C = (psx_brA_BFC2744C == psx_brB_BFC2744C); - psx_delay_BFC2744C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27450: 24636F60 addiu $v1, $v1, 28512 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (28512)); - PGXP_ALU(0x24636F60u, cpu->gpr[3], _pgx1, 0x00006F60u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F450u); -#endif - if (psx_delay_BFC2744C) { - psx_delay_BFC2744C = 0; - if (psx_taken_BFC2744C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F45Cu); - goto label_BFC2745C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F454u); - } -label_BFC27454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27454: 3C038006 lui $v1, 0x8006 */ - cpu->gpr[3] = 0x80060000u; - PGXP_ALU(0x3C038006u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27458: 24637F40 addiu $v1, $v1, 32576 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (32576)); - PGXP_ALU(0x24637F40u, cpu->gpr[3], _pgx1, 0x00007F40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F458u); -#endif -label_BFC2745C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2745Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2745Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC2745C: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC27460: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27464: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003F46Cu; /* jal link before delay slot */ - psx_delay_BFC27464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27468: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F468u); -#endif - if (psx_delay_BFC27464) { - psx_delay_BFC27464 = 0; - cpu->gpr[31] = 0x8003F46Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC2746C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2746Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2746Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2746C: 3C058007 lui $a1, 0x8007 */ - cpu->gpr[5] = 0x80070000u; - PGXP_ALU(0x3C058007u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27470: 24A58F20 addiu $a1, $a1, -28896 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28896)); - PGXP_ALU(0x24A58F20u, cpu->gpr[5], _pgx1, 0xFFFF8F20u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC27474: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27478: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003F480u; /* jal link before delay slot */ - psx_delay_BFC27478 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2747C: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F47Cu); -#endif - if (psx_delay_BFC27478) { - psx_delay_BFC27478 = 0; - cpu->gpr[31] = 0x8003F480u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC27480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC27480: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27484: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27488: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2748C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8003F494u; /* jal link before delay slot */ - psx_delay_BFC2748C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27490: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F490u); -#endif - if (psx_delay_BFC2748C) { - psx_delay_BFC2748C = 0; - cpu->gpr[31] = 0x8003F494u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC27494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC27494: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27498: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2749C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC274A0: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8003F4A8u; /* jal link before delay slot */ - psx_delay_BFC274A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC274A4: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4A4u); -#endif - if (psx_delay_BFC274A0) { - psx_delay_BFC274A0 = 0; - cpu->gpr[31] = 0x8003F4A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC274A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC274A8: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC274AC: 240F0122 addiu $t7, $zero, 290 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (290)); - PGXP_ALU(0x240F0122u, cpu->gpr[15], _pgx1, 0x00000122u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC274B0: 01E3001A div $t7, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E3001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8003F4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC274B4: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC274B8: 24050148 addiu $a1, $zero, 328 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (328)); - PGXP_ALU(0x24050148u, cpu->gpr[5], _pgx1, 0x00000148u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC274BC: 14600002 bne $v1, $zero, 0xBFC274C8 */ - uint32_t psx_brA_BFC274BC = cpu->gpr[3]; uint32_t psx_brB_BFC274BC = cpu->gpr[0]; - psx_taken_BFC274BC = (psx_brA_BFC274BC != psx_brB_BFC274BC); - psx_delay_BFC274BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC274C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F4C0u); -#endif - if (psx_delay_BFC274BC) { - psx_delay_BFC274BC = 0; - if (psx_taken_BFC274BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4C8u); - goto label_BFC274C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4C4u); - } -label_BFC274C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC274C4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8003F4C4u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F4C4u); -#endif -label_BFC274C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC274C8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC274CC: 14610004 bne $v1, $at, 0xBFC274E0 */ - uint32_t psx_brA_BFC274CC = cpu->gpr[3]; uint32_t psx_brB_BFC274CC = cpu->gpr[1]; - psx_taken_BFC274CC = (psx_brA_BFC274CC != psx_brB_BFC274CC); - psx_delay_BFC274CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC274D0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F4D0u); -#endif - if (psx_delay_BFC274CC) { - psx_delay_BFC274CC = 0; - if (psx_taken_BFC274CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4E0u); - goto label_BFC274E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4D4u); - } -label_BFC274D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC274D4: 15E10002 bne $t7, $at, 0xBFC274E0 */ - uint32_t psx_brA_BFC274D4 = cpu->gpr[15]; uint32_t psx_brB_BFC274D4 = cpu->gpr[1]; - psx_taken_BFC274D4 = (psx_brA_BFC274D4 != psx_brB_BFC274D4); - psx_delay_BFC274D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC274D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F4D8u); -#endif - if (psx_delay_BFC274D4) { - psx_delay_BFC274D4 = 0; - if (psx_taken_BFC274D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4E0u); - goto label_BFC274E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F4DCu); - } -label_BFC274DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC274DC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8003F4DCu); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F4DCu); -#endif -label_BFC274E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC274E0: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC274E4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003F4ECu; /* jal link before delay slot */ - psx_delay_BFC274E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC274E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F4E8u); -#endif - if (psx_delay_BFC274E4) { - psx_delay_BFC274E4 = 0; - cpu->gpr[31] = 0x8003F4ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC274EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC274ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC274ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC274EC: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC274F0: 24180026 addiu $t8, $zero, 38 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (38)); - PGXP_ALU(0x24180026u, cpu->gpr[24], _pgx1, 0x00000026u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC274F4: 0303001A div $t8, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[24]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0303001Au, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8003F4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC274F8: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC274FC: 240500C8 addiu $a1, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240500C8u, cpu->gpr[5], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27500: 14600002 bne $v1, $zero, 0xBFC2750C */ - uint32_t psx_brA_BFC27500 = cpu->gpr[3]; uint32_t psx_brB_BFC27500 = cpu->gpr[0]; - psx_taken_BFC27500 = (psx_brA_BFC27500 != psx_brB_BFC27500); - psx_delay_BFC27500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F504u); -#endif - if (psx_delay_BFC27500) { - psx_delay_BFC27500 = 0; - if (psx_taken_BFC27500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F50Cu); - goto label_BFC2750C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F508u); - } -label_BFC27508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC27508: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8003F508u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F508u); -#endif -label_BFC2750C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2750Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2750C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC27510: 14610004 bne $v1, $at, 0xBFC27524 */ - uint32_t psx_brA_BFC27510 = cpu->gpr[3]; uint32_t psx_brB_BFC27510 = cpu->gpr[1]; - psx_taken_BFC27510 = (psx_brA_BFC27510 != psx_brB_BFC27510); - psx_delay_BFC27510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27514: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F514u); -#endif - if (psx_delay_BFC27510) { - psx_delay_BFC27510 = 0; - if (psx_taken_BFC27510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F524u); - goto label_BFC27524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F518u); - } -label_BFC27518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC27518: 17010002 bne $t8, $at, 0xBFC27524 */ - uint32_t psx_brA_BFC27518 = cpu->gpr[24]; uint32_t psx_brB_BFC27518 = cpu->gpr[1]; - psx_taken_BFC27518 = (psx_brA_BFC27518 != psx_brB_BFC27518); - psx_delay_BFC27518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2751C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F51Cu); -#endif - if (psx_delay_BFC27518) { - psx_delay_BFC27518 = 0; - if (psx_taken_BFC27518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F524u); - goto label_BFC27524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F520u); - } -label_BFC27520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC27520: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8003F520u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F520u); -#endif -label_BFC27524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC27524: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27528: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003F530u; /* jal link before delay slot */ - psx_delay_BFC27528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2752C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F52Cu); -#endif - if (psx_delay_BFC27528) { - psx_delay_BFC27528 = 0; - cpu->gpr[31] = 0x8003F530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC27530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27530: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC27534: 24190193 addiu $t9, $zero, 403 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (403)); - PGXP_ALU(0x24190193u, cpu->gpr[25], _pgx1, 0x00000193u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC27538: 0323001A div $t9, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0323001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8003F538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC2753C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27540: 2405016C addiu $a1, $zero, 364 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (364)); - PGXP_ALU(0x2405016Cu, cpu->gpr[5], _pgx1, 0x0000016Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27544: 14600002 bne $v1, $zero, 0xBFC27550 */ - uint32_t psx_brA_BFC27544 = cpu->gpr[3]; uint32_t psx_brB_BFC27544 = cpu->gpr[0]; - psx_taken_BFC27544 = (psx_brA_BFC27544 != psx_brB_BFC27544); - psx_delay_BFC27544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27548: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F548u); -#endif - if (psx_delay_BFC27544) { - psx_delay_BFC27544 = 0; - if (psx_taken_BFC27544) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F550u); - goto label_BFC27550; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F54Cu); - } -label_BFC2754C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2754Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2754Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2754C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8003F54Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F54Cu); -#endif -label_BFC27550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27550: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC27554: 14610004 bne $v1, $at, 0xBFC27568 */ - uint32_t psx_brA_BFC27554 = cpu->gpr[3]; uint32_t psx_brB_BFC27554 = cpu->gpr[1]; - psx_taken_BFC27554 = (psx_brA_BFC27554 != psx_brB_BFC27554); - psx_delay_BFC27554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27558: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F558u); -#endif - if (psx_delay_BFC27554) { - psx_delay_BFC27554 = 0; - if (psx_taken_BFC27554) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F568u); - goto label_BFC27568; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F55Cu); - } -label_BFC2755C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2755Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2755Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2755C: 17210002 bne $t9, $at, 0xBFC27568 */ - uint32_t psx_brA_BFC2755C = cpu->gpr[25]; uint32_t psx_brB_BFC2755C = cpu->gpr[1]; - psx_taken_BFC2755C = (psx_brA_BFC2755C != psx_brB_BFC2755C); - psx_delay_BFC2755C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F560u); -#endif - if (psx_delay_BFC2755C) { - psx_delay_BFC2755C = 0; - if (psx_taken_BFC2755C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F568u); - goto label_BFC27568; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F564u); - } -label_BFC27564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC27564: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8003F564u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F564u); -#endif -label_BFC27568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC27568: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2756C: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003F574u; /* jal link before delay slot */ - psx_delay_BFC2756C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27570: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F570u); -#endif - if (psx_delay_BFC2756C) { - psx_delay_BFC2756C = 0; - cpu->gpr[31] = 0x8003F574u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC27574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27574: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC27578: 24080008 addiu $t0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24080008u, cpu->gpr[8], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2757C: 0103001A div $t0, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[8]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0103001Au, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8003F57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC27580: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27584: 24050014 addiu $a1, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24050014u, cpu->gpr[5], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27588: 14600002 bne $v1, $zero, 0xBFC27594 */ - uint32_t psx_brA_BFC27588 = cpu->gpr[3]; uint32_t psx_brB_BFC27588 = cpu->gpr[0]; - psx_taken_BFC27588 = (psx_brA_BFC27588 != psx_brB_BFC27588); - psx_delay_BFC27588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2758C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F58Cu); -#endif - if (psx_delay_BFC27588) { - psx_delay_BFC27588 = 0; - if (psx_taken_BFC27588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F594u); - goto label_BFC27594; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F590u); - } -label_BFC27590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC27590: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8003F590u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F590u); -#endif -label_BFC27594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27594: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC27598: 14610004 bne $v1, $at, 0xBFC275AC */ - uint32_t psx_brA_BFC27598 = cpu->gpr[3]; uint32_t psx_brB_BFC27598 = cpu->gpr[1]; - psx_taken_BFC27598 = (psx_brA_BFC27598 != psx_brB_BFC27598); - psx_delay_BFC27598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2759C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F59Cu); -#endif - if (psx_delay_BFC27598) { - psx_delay_BFC27598 = 0; - if (psx_taken_BFC27598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5ACu); - goto label_BFC275AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5A0u); - } -label_BFC275A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC275A0: 15010002 bne $t0, $at, 0xBFC275AC */ - uint32_t psx_brA_BFC275A0 = cpu->gpr[8]; uint32_t psx_brB_BFC275A0 = cpu->gpr[1]; - psx_taken_BFC275A0 = (psx_brA_BFC275A0 != psx_brB_BFC275A0); - psx_delay_BFC275A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC275A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F5A4u); -#endif - if (psx_delay_BFC275A0) { - psx_delay_BFC275A0 = 0; - if (psx_taken_BFC275A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5ACu); - goto label_BFC275AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5A8u); - } -label_BFC275A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC275A8: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8003F5A8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8003F5A8u); -#endif -label_BFC275AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC275AC: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC275B0: 0C011262 jal 0xB0044988 */ - cpu->gpr[31] = 0x8003F5B8u; /* jal link before delay slot */ - psx_delay_BFC275B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC275B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F5B4u); -#endif - if (psx_delay_BFC275B0) { - psx_delay_BFC275B0 = 0; - cpu->gpr[31] = 0x8003F5B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044988u); - cpu->pc = 0x80044988u; return; - } -label_BFC275B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC275B8: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x8003F5C0u; /* jal link before delay slot */ - psx_delay_BFC275B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC275BC: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5BCu); -#endif - if (psx_delay_BFC275B8) { - psx_delay_BFC275B8 = 0; - cpu->gpr[31] = 0x8003F5C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC275C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC275C0: 1840000F blez $v0, 0xBFC27600 */ - uint32_t psx_brA_BFC275C0 = cpu->gpr[2]; - psx_taken_BFC275C0 = ((int32_t)psx_brA_BFC275C0 <= 0); - psx_delay_BFC275C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040800u); -#endif - /* 0xBFC275C4: 03B25821 addu $t3, $sp, $s2 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[11] = cpu->gpr[29] + cpu->gpr[18]; - PGXP_ALU(0x03B25821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5C4u); -#endif - if (psx_delay_BFC275C0) { - psx_delay_BFC275C0 = 0; - if (psx_taken_BFC275C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F600u); - goto label_BFC27600; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5C8u); - } -label_BFC275C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC275C8: 27A90118 addiu $t1, $sp, 280 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (280)); - PGXP_ALU(0x27A90118u, cpu->gpr[9], _pgx1, 0x00000118u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50200u); -#endif - /* 0xBFC275CC: 02498021 addu $s0, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02498021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE0000u); -#endif - /* 0xBFC275D0: 02728821 addu $s1, $s3, $s2 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[17] = cpu->gpr[19] + cpu->gpr[18]; - PGXP_ALU(0x02728821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5D0u); -#endif -label_BFC275D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5D4u); -#endif - /* 0xBFC275D4: 822A0000 lb $t2, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[10] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 10, 0x20000u); - PGXP_LOAD(0x822A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC275D8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC275DC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC275E0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC275E4: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC275E8: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x8003F5F0u; /* jal link before delay slot */ - psx_delay_BFC275E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC275EC: A20AFF6B sb $t2, -149($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -149; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F5ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-149)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20AFF6Bu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5ECu); -#endif - if (psx_delay_BFC275E8) { - psx_delay_BFC275E8 = 0; - cpu->gpr[31] = 0x8003F5F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC275F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40006u); -#endif - /* 0xBFC275F0: 0242082A slt $at, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0242082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC275F4: 1420FFF7 bne $at, $zero, 0xBFC275D4 */ - uint32_t psx_brA_BFC275F4 = cpu->gpr[1]; uint32_t psx_brB_BFC275F4 = cpu->gpr[0]; - psx_taken_BFC275F4 = (psx_brA_BFC275F4 != psx_brB_BFC275F4); - psx_delay_BFC275F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC275F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F5F8u); -#endif - if (psx_delay_BFC275F4) { - psx_delay_BFC275F4 = 0; - if (psx_taken_BFC275F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5D4u); - goto label_BFC275D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F5FCu); - } -label_BFC275FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC275FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC275FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040800u); -#endif - /* 0xBFC275FC: 03B25821 addu $t3, $sp, $s2 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[11] = cpu->gpr[29] + cpu->gpr[18]; - PGXP_ALU(0x03B25821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F5FCu); -#endif -label_BFC27600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC27600: A1600084 sb $zero, 132($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 132; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F600u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[11] + (132)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1600084u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F600u); -#endif - /* 0xBFC27604: 8FAC0118 lw $t4, 280($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F604u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0118u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27608: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2760C: 1180007D beq $t4, $zero, 0xBFC27804 */ - uint32_t psx_brA_BFC2760C = cpu->gpr[12]; uint32_t psx_brB_BFC2760C = cpu->gpr[0]; - psx_taken_BFC2760C = (psx_brA_BFC2760C == psx_brB_BFC2760C); - psx_delay_BFC2760C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F610u); -#endif - if (psx_delay_BFC2760C) { - psx_delay_BFC2760C = 0; - if (psx_taken_BFC2760C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F804u); - goto label_BFC27804; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F614u); - } -label_BFC27614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC27614: 00146880 sll $t5, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00146880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC27618: 01B46821 addu $t5, $t5, $s4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[20]; - PGXP_ALU(0x01B46821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2761C: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC27620: 01B46821 addu $t5, $t5, $s4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[20]; - PGXP_ALU(0x01B46821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27624: 3C0E8014 lui $t6, 0x8014 */ - cpu->gpr[14] = 0x80140000u; - PGXP_ALU(0x3C0E8014u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27628: 25CE84D8 addiu $t6, $t6, -31528 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-31528)); - PGXP_ALU(0x25CE84D8u, cpu->gpr[14], _pgx1, 0xFFFF84D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2762C: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16000u); -#endif - /* 0xBFC27630: 01AE8021 addu $s0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[16] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC27634: 00147880 sll $t7, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC27638: 01F47821 addu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[20]; - PGXP_ALU(0x01F47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC2763C: 00146880 sll $t5, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00146880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC27640: 0014C880 sll $t9, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC27644: 00145080 sll $t2, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00145080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC27648: 01545021 addu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[20]; - PGXP_ALU(0x01545021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC2764C: 0334C821 addu $t9, $t9, $s4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[20]; - PGXP_ALU(0x0334C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC27650: 01B46821 addu $t5, $t5, $s4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[20]; - PGXP_ALU(0x01B46821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC27654: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC27658: 01F47821 addu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[20]; - PGXP_ALU(0x01F47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2765C: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC27660: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC27664: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC27668: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2766C: 27188468 addiu $t8, $t8, -31640 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-31640)); - PGXP_ALU(0x27188468u, cpu->gpr[24], _pgx1, 0xFFFF8468u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC27670: 01545021 addu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[20]; - PGXP_ALU(0x01545021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC27674: 0334C821 addu $t9, $t9, $s4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[20]; - PGXP_ALU(0x0334C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC27678: 01B46821 addu $t5, $t5, $s4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[20]; - PGXP_ALU(0x01B46821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2767C: 000F7980 sll $t7, $t7, 6 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 6u; - PGXP_ALU(0x000F7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27680: 3C0E8014 lui $t6, 0x8014 */ - cpu->gpr[14] = 0x80140000u; - PGXP_ALU(0x3C0E8014u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC27684: 3C088014 lui $t0, 0x8014 */ - cpu->gpr[8] = 0x80140000u; - PGXP_ALU(0x3C088014u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC27688: 3C0B8014 lui $t3, 0x8014 */ - cpu->gpr[11] = 0x80140000u; - PGXP_ALU(0x3C0B8014u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2768C: 256B8388 addiu $t3, $t3, -31864 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-31864)); - PGXP_ALU(0x256B8388u, cpu->gpr[11], _pgx1, 0xFFFF8388u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC27690: 250883F8 addiu $t0, $t0, -31752 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-31752)); - PGXP_ALU(0x250883F8u, cpu->gpr[8], _pgx1, 0xFFFF83F8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27694: 25CE8318 addiu $t6, $t6, -31976 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-31976)); - PGXP_ALU(0x25CE8318u, cpu->gpr[14], _pgx1, 0xFFFF8318u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1048000u); -#endif - /* 0xBFC27698: 01F89021 addu $s2, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[18] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F89021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2769C: 000D6980 sll $t5, $t5, 6 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 6u; - PGXP_ALU(0x000D6980u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC276A0: 0019C980 sll $t9, $t9, 6 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 6u; - PGXP_ALU(0x0019C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC276A4: 000A5180 sll $t2, $t2, 6 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 6u; - PGXP_ALU(0x000A5180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC276A8: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC276AC: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC276B0: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC276B4: AFAF0058 sw $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F6B4u); return; } g_debug_last_store_pc = 0x8003F6B4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC276B8: AFA90060 sw $t1, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F6B8u); return; } g_debug_last_store_pc = 0x8003F6B8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90060u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC276BC: 24110016 addiu $s1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24110016u, cpu->gpr[17], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC276C0: AFAC005C sw $t4, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F6C0u); return; } g_debug_last_store_pc = 0x8003F6C0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC005Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC276C4: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x8003F6CCu; /* jal link before delay slot */ - psx_delay_BFC276C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC276C8: 27A400C4 addiu $a0, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A400C4u, cpu->gpr[4], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6C8u); -#endif - if (psx_delay_BFC276C4) { - psx_delay_BFC276C4 = 0; - cpu->gpr[31] = 0x8003F6CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC276CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC276CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC276CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC276CC: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC276D0: 1441000B bne $v0, $at, 0xBFC27700 */ - uint32_t psx_brA_BFC276D0 = cpu->gpr[2]; uint32_t psx_brB_BFC276D0 = cpu->gpr[1]; - psx_taken_BFC276D0 = (psx_brA_BFC276D0 != psx_brB_BFC276D0); - psx_delay_BFC276D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC276D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F6D4u); -#endif - if (psx_delay_BFC276D0) { - psx_delay_BFC276D0 = 0; - if (psx_taken_BFC276D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F700u); - goto label_BFC27700; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F6D8u); - } -label_BFC276D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC276D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC276D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC276D8: 24180010 addiu $t8, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24180010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC276DC: 2411FFFC addiu $s1, $zero, -4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); - PGXP_ALU(0x2411FFFCu, cpu->gpr[17], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC276E0: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F6E0u); return; } g_debug_last_store_pc = 0x8003F6E0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC276E4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC276E8: 27A500C4 addiu $a1, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A500C4u, cpu->gpr[5], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC276EC: 24060214 addiu $a2, $zero, 532 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (532)); - PGXP_ALU(0x24060214u, cpu->gpr[6], _pgx1, 0x00000214u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC276F0: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F6F8u; /* jal link before delay slot */ - psx_delay_BFC276F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC276F4: 24070168 addiu $a3, $zero, 360 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (360)); - PGXP_ALU(0x24070168u, cpu->gpr[7], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6F4u); -#endif - if (psx_delay_BFC276F0) { - psx_delay_BFC276F0 = 0; - cpu->gpr[31] = 0x8003F6F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC276F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC276F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC276F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC276F8: 10000019 beq $zero, $zero, 0xBFC27760 */ - uint32_t psx_brA_BFC276F8 = cpu->gpr[0]; uint32_t psx_brB_BFC276F8 = cpu->gpr[0]; - psx_taken_BFC276F8 = (psx_brA_BFC276F8 == psx_brB_BFC276F8); - psx_delay_BFC276F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC276FC: 24090010 addiu $t1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24090010u, cpu->gpr[9], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F6FCu); -#endif - if (psx_delay_BFC276F8) { - psx_delay_BFC276F8 = 0; - if (psx_taken_BFC276F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F760u); - goto label_BFC27760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F700u); - } -label_BFC27700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27700: 0C016A48 jal 0xB005A920 */ - cpu->gpr[31] = 0x8003F708u; /* jal link before delay slot */ - psx_delay_BFC27700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC27704: 27A400C4 addiu $a0, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A400C4u, cpu->gpr[4], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F704u); -#endif - if (psx_delay_BFC27700) { - psx_delay_BFC27700 = 0; - cpu->gpr[31] = 0x8003F708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A920u); - cpu->pc = 0x8005A920u; return; - } -label_BFC27708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27708: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2770C: 1441000B bne $v0, $at, 0xBFC2773C */ - uint32_t psx_brA_BFC2770C = cpu->gpr[2]; uint32_t psx_brB_BFC2770C = cpu->gpr[1]; - psx_taken_BFC2770C = (psx_brA_BFC2770C != psx_brB_BFC2770C); - psx_delay_BFC2770C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F710u); -#endif - if (psx_delay_BFC2770C) { - psx_delay_BFC2770C = 0; - if (psx_taken_BFC2770C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F73Cu); - goto label_BFC2773C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F714u); - } -label_BFC27714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC27714: 24190010 addiu $t9, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC27718: 2411FFF2 addiu $s1, $zero, -14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (-14)); - PGXP_ALU(0x2411FFF2u, cpu->gpr[17], _pgx1, 0xFFFFFFF2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2771C: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F71Cu); return; } g_debug_last_store_pc = 0x8003F71Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC27720: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC27724: 27A500C4 addiu $a1, $sp, 196 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (196)); - PGXP_ALU(0x27A500C4u, cpu->gpr[5], _pgx1, 0x000000C4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27728: 24060212 addiu $a2, $zero, 530 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (530)); - PGXP_ALU(0x24060212u, cpu->gpr[6], _pgx1, 0x00000212u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2772C: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F734u; /* jal link before delay slot */ - psx_delay_BFC2772C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27730: 24070168 addiu $a3, $zero, 360 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (360)); - PGXP_ALU(0x24070168u, cpu->gpr[7], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F730u); -#endif - if (psx_delay_BFC2772C) { - psx_delay_BFC2772C = 0; - cpu->gpr[31] = 0x8003F734u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC27734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27734: 1000000A beq $zero, $zero, 0xBFC27760 */ - uint32_t psx_brA_BFC27734 = cpu->gpr[0]; uint32_t psx_brB_BFC27734 = cpu->gpr[0]; - psx_taken_BFC27734 = (psx_brA_BFC27734 == psx_brB_BFC27734); - psx_delay_BFC27734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC27738: 24090010 addiu $t1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24090010u, cpu->gpr[9], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F738u); -#endif - if (psx_delay_BFC27734) { - psx_delay_BFC27734 = 0; - if (psx_taken_BFC27734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F760u); - goto label_BFC27760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F73Cu); - } -label_BFC2773C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2773Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2773Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2773C: 3C058007 lui $a1, 0x8007 */ - cpu->gpr[5] = 0x80070000u; - PGXP_ALU(0x3C058007u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC27740: 24080010 addiu $t0, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24080010u, cpu->gpr[8], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC27744: AFA80010 sw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F744u); return; } g_debug_last_store_pc = 0x8003F744u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27748: 24A58FB0 addiu $a1, $a1, -28752 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28752)); - PGXP_ALU(0x24A58FB0u, cpu->gpr[5], _pgx1, 0xFFFF8FB0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2774C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27750: 24060240 addiu $a2, $zero, 576 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (576)); - PGXP_ALU(0x24060240u, cpu->gpr[6], _pgx1, 0x00000240u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27754: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F75Cu; /* jal link before delay slot */ - psx_delay_BFC27754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27758: 24070168 addiu $a3, $zero, 360 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (360)); - PGXP_ALU(0x24070168u, cpu->gpr[7], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F758u); -#endif - if (psx_delay_BFC27754) { - psx_delay_BFC27754 = 0; - cpu->gpr[31] = 0x8003F75Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC2775C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2775Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2775C: 24090010 addiu $t1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24090010u, cpu->gpr[9], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F75Cu); -#endif -label_BFC27760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27760: A3A000C4 sb $zero, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F760u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (196)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A000C4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC27764: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F764u); return; } g_debug_last_store_pc = 0x8003F764u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC27768: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2776C: 27A500B4 addiu $a1, $sp, 180 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (180)); - PGXP_ALU(0x27A500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040u); -#endif - /* 0xBFC27770: 262601C0 addiu $a2, $s1, 448 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[17] + (448)); - PGXP_ALU(0x262601C0u, cpu->gpr[6], _pgx1, 0x000001C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27774: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F77Cu; /* jal link before delay slot */ - psx_delay_BFC27774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27778: 24070168 addiu $a3, $zero, 360 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (360)); - PGXP_ALU(0x24070168u, cpu->gpr[7], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F778u); -#endif - if (psx_delay_BFC27774) { - psx_delay_BFC27774 = 0; - cpu->gpr[31] = 0x8003F77Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC2777C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2777Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F77Cu); -#endif - /* 0xBFC2777C: 8FA40060 lw $a0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F77Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40060u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC27780: 240A0010 addiu $t2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27784: A3A000B4 sb $zero, 180($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 180; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F784u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (180)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A000B4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC27788: AFAA0010 sw $t2, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F788u); return; } g_debug_last_store_pc = 0x8003F788u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2778C: 27A500A4 addiu $a1, $sp, 164 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (164)); - PGXP_ALU(0x27A500A4u, cpu->gpr[5], _pgx1, 0x000000A4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040u); -#endif - /* 0xBFC27790: 26260104 addiu $a2, $s1, 260 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[17] + (260)); - PGXP_ALU(0x26260104u, cpu->gpr[6], _pgx1, 0x00000104u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27794: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F79Cu; /* jal link before delay slot */ - psx_delay_BFC27794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27798: 24070168 addiu $a3, $zero, 360 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (360)); - PGXP_ALU(0x24070168u, cpu->gpr[7], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F798u); -#endif - if (psx_delay_BFC27794) { - psx_delay_BFC27794 = 0; - cpu->gpr[31] = 0x8003F79Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC2779C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2779Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F79Cu); -#endif - /* 0xBFC2779C: 8FA4005C lw $a0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F79Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4005Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC277A0: 240B0010 addiu $t3, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240B0010u, cpu->gpr[11], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC277A4: A3A000A4 sb $zero, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F7A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (164)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A000A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC277A8: AFAB0010 sw $t3, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F7A8u); return; } g_debug_last_store_pc = 0x8003F7A8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC277AC: 27A50094 addiu $a1, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A50094u, cpu->gpr[5], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC277B0: 240601CD addiu $a2, $zero, 461 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (461)); - PGXP_ALU(0x240601CDu, cpu->gpr[6], _pgx1, 0x000001CDu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC277B4: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F7BCu; /* jal link before delay slot */ - psx_delay_BFC277B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC277B8: 24070154 addiu $a3, $zero, 340 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (340)); - PGXP_ALU(0x24070154u, cpu->gpr[7], _pgx1, 0x00000154u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7B8u); -#endif - if (psx_delay_BFC277B4) { - psx_delay_BFC277B4 = 0; - cpu->gpr[31] = 0x8003F7BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC277BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC277BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC277BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7BCu); -#endif - /* 0xBFC277BC: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F7BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC277C0: 240C0010 addiu $t4, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240C0010u, cpu->gpr[12], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC277C4: A3A00094 sb $zero, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003F7C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (148)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00094u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC277C8: AFAC0010 sw $t4, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F7C8u); return; } g_debug_last_store_pc = 0x8003F7C8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC277CC: 27A50084 addiu $a1, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A50084u, cpu->gpr[5], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC277D0: 2406015D addiu $a2, $zero, 349 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (349)); - PGXP_ALU(0x2406015Du, cpu->gpr[6], _pgx1, 0x0000015Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC277D4: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F7DCu; /* jal link before delay slot */ - psx_delay_BFC277D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC277D8: 24070154 addiu $a3, $zero, 340 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (340)); - PGXP_ALU(0x24070154u, cpu->gpr[7], _pgx1, 0x00000154u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7D8u); -#endif - if (psx_delay_BFC277D4) { - psx_delay_BFC277D4 = 0; - cpu->gpr[31] = 0x8003F7DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC277DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC277DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC277DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC277DC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC277E0: 240D0004 addiu $t5, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240D0004u, cpu->gpr[13], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC277E4: AFAD0010 sw $t5, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F7E4u); return; } g_debug_last_store_pc = 0x8003F7E4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC277E8: 24A59EDC addiu $a1, $a1, -24868 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-24868)); - PGXP_ALU(0x24A59EDCu, cpu->gpr[5], _pgx1, 0xFFFF9EDCu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC277EC: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC277F0: 24060140 addiu $a2, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24060140u, cpu->gpr[6], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC277F4: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F7FCu; /* jal link before delay slot */ - psx_delay_BFC277F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC277F8: 24070190 addiu $a3, $zero, 400 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (400)); - PGXP_ALU(0x24070190u, cpu->gpr[7], _pgx1, 0x00000190u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F7F8u); -#endif - if (psx_delay_BFC277F4) { - psx_delay_BFC277F4 = 0; - cpu->gpr[31] = 0x8003F7FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC277FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC277FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC277FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC277FC: 1000000A beq $zero, $zero, 0xBFC27828 */ - uint32_t psx_brA_BFC277FC = cpu->gpr[0]; uint32_t psx_brB_BFC277FC = cpu->gpr[0]; - psx_taken_BFC277FC = (psx_brA_BFC277FC == psx_brB_BFC277FC); - psx_delay_BFC277FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC27800: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F800u); -#endif - if (psx_delay_BFC277FC) { - psx_delay_BFC277FC = 0; - if (psx_taken_BFC277FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F828u); - goto label_BFC27828; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F804u); - } -label_BFC27804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27804: 3C058007 lui $a1, 0x8007 */ - cpu->gpr[5] = 0x80070000u; - PGXP_ALU(0x3C058007u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC27808: 240E0004 addiu $t6, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240E0004u, cpu->gpr[14], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2780C: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F80Cu); return; } g_debug_last_store_pc = 0x8003F80Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27810: 24A58FB4 addiu $a1, $a1, -28748 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-28748)); - PGXP_ALU(0x24A58FB4u, cpu->gpr[5], _pgx1, 0xFFFF8FB4u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800011u); -#endif - /* 0xBFC27814: 02E02021 addu $a0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27818: 24060140 addiu $a2, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24060140u, cpu->gpr[6], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2781C: 0C00FE1A jal 0xB003F868 */ - cpu->gpr[31] = 0x8003F824u; /* jal link before delay slot */ - psx_delay_BFC2781C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27820: 24070190 addiu $a3, $zero, 400 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (400)); - PGXP_ALU(0x24070190u, cpu->gpr[7], _pgx1, 0x00000190u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F820u); -#endif - if (psx_delay_BFC2781C) { - psx_delay_BFC2781C = 0; - cpu->gpr[31] = 0x8003F824u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F868u); - cpu->pc = 0x8003F868u; return; - } -label_BFC27824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC27824: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F824u); -#endif -label_BFC27828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC27828: 2A810002 slti $at, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0); - PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2782C: 26B50540 addiu $s5, $s5, 1344 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (1344)); - PGXP_ALU(0x26B50540u, cpu->gpr[21], _pgx1, 0x00000540u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC27830: 26D60540 addiu $s6, $s6, 1344 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1344)); - PGXP_ALU(0x26D60540u, cpu->gpr[22], _pgx1, 0x00000540u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27834: 1420FEFF bne $at, $zero, 0xBFC27434 */ - uint32_t psx_brA_BFC27834 = cpu->gpr[1]; uint32_t psx_brB_BFC27834 = cpu->gpr[0]; - psx_taken_BFC27834 = (psx_brA_BFC27834 != psx_brB_BFC27834); - psx_delay_BFC27834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC27838: 26F70540 addiu $s7, $s7, 1344 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (1344)); - PGXP_ALU(0x26F70540u, cpu->gpr[23], _pgx1, 0x00000540u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F838u); -#endif - if (psx_delay_BFC27834) { - psx_delay_BFC27834 = 0; - if (psx_taken_BFC27834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F434u); - goto label_BFC27434; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F83Cu); - } -label_BFC2783C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2783Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2783Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F83Cu); -#endif - /* 0xBFC2783C: 8FBF004C lw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F83Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F840u); -#endif - /* 0xBFC27840: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F840u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F840u); -#endif - /* 0xBFC27844: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F844u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F844u); -#endif - /* 0xBFC27848: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F848u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F848u); -#endif - /* 0xBFC2784C: 8FB30038 lw $s3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F84Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30038u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F850u); -#endif - /* 0xBFC27850: 8FB4003C lw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F850u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F850u); -#endif - /* 0xBFC27854: 8FB50040 lw $s5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F854u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50040u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F854u); -#endif - /* 0xBFC27858: 8FB60044 lw $s6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F858u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60044u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F858u); -#endif - /* 0xBFC2785C: 8FB70048 lw $s7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F85Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70048u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27860: 03E00008 jr $ra */ - psx_delay_BFC27860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27864: 27BD0118 addiu $sp, $sp, 280 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (280)); - PGXP_ALU(0x27BD0118u, cpu->gpr[29], _pgx1, 0x00000118u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F864u); -#endif - if (psx_delay_BFC27860) { - psx_delay_BFC27860 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27868(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27868u); - int psx_delay_BFC27888 = 0; - int psx_taken_BFC27888 = 0; - int psx_delay_BFC278C0 = 0; - int psx_delay_BFC278D0 = 0; - int psx_delay_BFC278E4 = 0; - int psx_delay_BFC278EC = 0; - int psx_delay_BFC278FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27890u: goto label_BFC27890; - case 0xBFC278C8u: goto label_BFC278C8; - case 0xBFC278D8u: goto label_BFC278D8; - case 0xBFC278ECu: goto label_BFC278EC; - case 0xBFC278F4u: goto label_BFC278F4; - case 0xBFC278F8u: goto label_BFC278F8; - default: break; - } - } -label_BFC27868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27868: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2786C: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F86Cu); return; } g_debug_last_store_pc = 0x8003F86Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC27870: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F870u); return; } g_debug_last_store_pc = 0x8003F870u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC27874: AFA60048 sw $a2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F874u); return; } g_debug_last_store_pc = 0x8003F874u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC27878: AFA7004C sw $a3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F878u); return; } g_debug_last_store_pc = 0x8003F878u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7004Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2787C: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F880u); -#endif - /* 0xBFC27880: 806E0000 lb $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x806E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27884: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC27888: 11C0001B beq $t6, $zero, 0xBFC278F8 */ - uint32_t psx_brA_BFC27888 = cpu->gpr[14]; uint32_t psx_brB_BFC27888 = cpu->gpr[0]; - psx_taken_BFC27888 = (psx_brA_BFC27888 == psx_brB_BFC27888); - psx_delay_BFC27888 = 1; - /* 0xBFC2788C: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F88Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F88Cu); -#endif - if (psx_delay_BFC27888) { - psx_delay_BFC27888 = 0; - if (psx_taken_BFC27888) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F8F8u); - goto label_BFC278F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F890u); - } -label_BFC27890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27890: AFA0001C sw $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F890u); return; } g_debug_last_store_pc = 0x8003F890u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC27894: 240F0280 addiu $t7, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x240F0280u, cpu->gpr[15], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC27898: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F898u); return; } g_debug_last_store_pc = 0x8003F898u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2789C: 241801E0 addiu $t8, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x241801E0u, cpu->gpr[24], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC278A0: 3419DAD6 ori $t9, $zero, 0xDAD6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xDAD6u; - PGXP_ALU(0x3419DAD6u, cpu->gpr[25], _pgx1, 0xDAD6u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC278A4: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC278A8: AFA80020 sw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8A8u); return; } g_debug_last_store_pc = 0x8003F8A8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC278AC: AFB90018 sw $t9, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8ACu); return; } g_debug_last_store_pc = 0x8003F8ACu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC278B0: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8B0u); return; } g_debug_last_store_pc = 0x8003F8B0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC278B4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC278B8: 3C05801E lui $a1, 0x801E */ - cpu->gpr[5] = 0x801E0000u; - PGXP_ALU(0x3C05801Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC278BC: 24060280 addiu $a2, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24060280u, cpu->gpr[6], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC278C0: 0C010C98 jal 0xB0043260 */ - cpu->gpr[31] = 0x8003F8C8u; /* jal link before delay slot */ - psx_delay_BFC278C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC278C4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8C4u); -#endif - if (psx_delay_BFC278C0) { - psx_delay_BFC278C0 = 0; - cpu->gpr[31] = 0x8003F8C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043260u); - cpu->pc = 0x80043260u; return; - } -label_BFC278C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC278C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC278C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8C8u); -#endif - /* 0xBFC278C8: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC278CC: 3C05801E lui $a1, 0x801E */ - cpu->gpr[5] = 0x801E0000u; - PGXP_ALU(0x3C05801Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC278D0: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8003F8D8u; /* jal link before delay slot */ - psx_delay_BFC278D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC278D4: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8D4u); -#endif - if (psx_delay_BFC278D0) { - psx_delay_BFC278D0 = 0; - cpu->gpr[31] = 0x8003F8D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC278D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC278D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC278D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8D8u); -#endif - /* 0xBFC278D8: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8D8u); -#endif - /* 0xBFC278DC: 8FA50048 lw $a1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8DCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50048u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8E0u); -#endif - /* 0xBFC278E0: 8FA6004C lw $a2, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8E0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6004Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC278E4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x8003F8ECu; /* jal link before delay slot */ - psx_delay_BFC278E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC278E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F8E8u); -#endif - if (psx_delay_BFC278E4) { - psx_delay_BFC278E4 = 0; - cpu->gpr[31] = 0x8003F8ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC278EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC278ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC278ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC278EC: 0C016A50 jal 0xB005A940 */ - cpu->gpr[31] = 0x8003F8F4u; /* jal link before delay slot */ - psx_delay_BFC278EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC278F0: 3C04801E lui $a0, 0x801E */ - cpu->gpr[4] = 0x801E0000u; - PGXP_ALU(0x3C04801Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F8F0u); -#endif - if (psx_delay_BFC278EC) { - psx_delay_BFC278EC = 0; - cpu->gpr[31] = 0x8003F8F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A940u); - cpu->pc = 0x8005A940u; return; - } -label_BFC278F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC278F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC278F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8F4u); -#endif - /* 0xBFC278F4: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F8F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8F4u); -#endif -label_BFC278F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC278F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC278F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC278F8: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC278FC: 03E00008 jr $ra */ - psx_delay_BFC278FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27900: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F900u); -#endif - if (psx_delay_BFC278FC) { - psx_delay_BFC278FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27910u); - int psx_delay_BFC27924 = 0; - int psx_delay_BFC2794C = 0; - int psx_taken_BFC2794C = 0; - int psx_delay_BFC2796C = 0; - int psx_taken_BFC2796C = 0; - int psx_delay_BFC27994 = 0; - int psx_delay_BFC279D0 = 0; - int psx_taken_BFC279D0 = 0; - int psx_delay_BFC279D8 = 0; - int psx_delay_BFC279E8 = 0; - int psx_taken_BFC279E8 = 0; - int psx_delay_BFC279F8 = 0; - int psx_taken_BFC279F8 = 0; - int psx_delay_BFC27A0C = 0; - int psx_taken_BFC27A0C = 0; - int psx_delay_BFC27A24 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2792Cu: goto label_BFC2792C; - case 0xBFC27954u: goto label_BFC27954; - case 0xBFC27974u: goto label_BFC27974; - case 0xBFC2799Cu: goto label_BFC2799C; - case 0xBFC279D8u: goto label_BFC279D8; - case 0xBFC279E0u: goto label_BFC279E0; - case 0xBFC279F0u: goto label_BFC279F0; - case 0xBFC27A00u: goto label_BFC27A00; - case 0xBFC27A04u: goto label_BFC27A04; - case 0xBFC27A0Cu: goto label_BFC27A0C; - case 0xBFC27A14u: goto label_BFC27A14; - case 0xBFC27A18u: goto label_BFC27A18; - default: break; - } - } -label_BFC27910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27910: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27914: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F914u); return; } g_debug_last_store_pc = 0x8003F914u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC27918: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F918u); return; } g_debug_last_store_pc = 0x8003F918u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2791C: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F91Cu); return; } g_debug_last_store_pc = 0x8003F91Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27920: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F920u); return; } g_debug_last_store_pc = 0x8003F920u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27924: 0C010019 jal 0xB0040064 */ - cpu->gpr[31] = 0x8003F92Cu; /* jal link before delay slot */ - psx_delay_BFC27924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27928: 2404005E addiu $a0, $zero, 94 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); - PGXP_ALU(0x2404005Eu, cpu->gpr[4], _pgx1, 0x0000005Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F928u); -#endif - if (psx_delay_BFC27924) { - psx_delay_BFC27924 = 0; - cpu->gpr[31] = 0x8003F92Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040064u); - cpu->pc = 0x80040064u; return; - } -label_BFC2792C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2792Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2792Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2792C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F930u); -#endif - /* 0xBFC27930: 8C423E70 lw $v0, 15984($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F930u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27934: 3C118007 lui $s1, 0x8007 */ - cpu->gpr[17] = 0x80070000u; - PGXP_ALU(0x3C118007u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27938: 26314A40 addiu $s1, $s1, 19008 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (19008)); - PGXP_ALU(0x26314A40u, cpu->gpr[17], _pgx1, 0x00004A40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2793C: 000270C0 sll $t6, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000270C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x34000u); -#endif - /* 0xBFC27940: 022E8021 addu $s0, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F940u); -#endif - /* 0xBFC27944: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F944u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27948: 2401270F addiu $at, $zero, 9999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9999)); - PGXP_ALU(0x2401270Fu, cpu->gpr[1], _pgx1, 0x0000270Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003F948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2794C: 11E10032 beq $t7, $at, 0xBFC27A18 */ - uint32_t psx_brA_BFC2794C = cpu->gpr[15]; uint32_t psx_brB_BFC2794C = cpu->gpr[1]; - psx_taken_BFC2794C = (psx_brA_BFC2794C == psx_brB_BFC2794C); - psx_delay_BFC2794C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27950: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F950u); -#endif - if (psx_delay_BFC2794C) { - psx_delay_BFC2794C = 0; - if (psx_taken_BFC2794C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA18u); - goto label_BFC27A18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F954u); - } -label_BFC27954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27954: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC27958: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F958u); -#endif - /* 0xBFC2795C: 8C633E78 lw $v1, 15992($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 15992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F95Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C633E78u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F960u); -#endif - /* 0xBFC27960: 8F183E74 lw $t8, 15988($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 15988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F960u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183E74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000Au); -#endif - /* 0xBFC27968: 0303082B sltu $at, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0303082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2796C: 1420001A bne $at, $zero, 0xBFC279D8 */ - uint32_t psx_brA_BFC2796C = cpu->gpr[1]; uint32_t psx_brB_BFC2796C = cpu->gpr[0]; - psx_taken_BFC2796C = (psx_brA_BFC2796C != psx_brB_BFC2796C); - psx_delay_BFC2796C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F970u); -#endif - if (psx_delay_BFC2796C) { - psx_delay_BFC2796C = 0; - if (psx_taken_BFC2796C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F9D8u); - goto label_BFC279D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F974u); - } -label_BFC27974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F974u); -#endif - /* 0xBFC27974: 82190006 lb $t9, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (6)), 25, 0x10000u); - PGXP_LOAD(0x82190006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F974u); -#endif - /* 0xBFC27978: 82060004 lb $a2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (4)), 6, 0x10000u); - PGXP_LOAD(0x82060004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F978u); -#endif - /* 0xBFC2797C: 82070005 lb $a3, 5($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (5)), 7, 0x10000u); - PGXP_LOAD(0x82070005u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC27980: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F980u); return; } g_debug_last_store_pc = 0x8003F980u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F980u); -#endif - /* 0xBFC27984: 82080007 lb $t0, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 8, 0x10000u); - PGXP_LOAD(0x82080007u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27988: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F988u); -#endif - /* 0xBFC2798C: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003F98Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27990: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27994: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003F99Cu; /* jal link before delay slot */ - psx_delay_BFC27994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC27998: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F998u); return; } g_debug_last_store_pc = 0x8003F998u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F998u); -#endif - if (psx_delay_BFC27994) { - psx_delay_BFC27994 = 0; - cpu->gpr[31] = 0x8003F99Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC2799C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2799Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2799Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2799C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9A0u); -#endif - /* 0xBFC279A0: 8C423E70 lw $v0, 15984($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC279A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC279A8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC279AC: 000248C0 sll $t1, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000248C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30200u); -#endif - /* 0xBFC279B0: 02298021 addu $s0, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02298021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9B0u); -#endif - /* 0xBFC279B4: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC279B8: AC223E70 sw $v0, 15984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9B8u); return; } g_debug_last_store_pc = 0x8003F9B8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC279BC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9C0u); -#endif - /* 0xBFC279C0: 8D4A3E74 lw $t2, 15988($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 15988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A3E74u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC279C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC279C8: AC233E78 sw $v1, 15992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9C8u); return; } g_debug_last_store_pc = 0x8003F9C8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC233E78u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40Au); -#endif - /* 0xBFC279CC: 0143082B sltu $at, $t2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0143082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC279D0: 1020FFE8 beq $at, $zero, 0xBFC27974 */ - uint32_t psx_brA_BFC279D0 = cpu->gpr[1]; uint32_t psx_brB_BFC279D0 = cpu->gpr[0]; - psx_taken_BFC279D0 = (psx_brA_BFC279D0 == psx_brB_BFC279D0); - psx_delay_BFC279D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC279D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F9D4u); -#endif - if (psx_delay_BFC279D0) { - psx_delay_BFC279D0 = 0; - if (psx_taken_BFC279D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F974u); - goto label_BFC27974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F9D8u); - } -label_BFC279D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC279D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC279D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC279D8: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x8003F9E0u; /* jal link before delay slot */ - psx_delay_BFC279D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC279DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F9DCu); -#endif - if (psx_delay_BFC279D8) { - psx_delay_BFC279D8 = 0; - cpu->gpr[31] = 0x8003F9E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC279E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC279E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC279E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9E0u); -#endif - /* 0xBFC279E0: 8FAB0030 lw $t3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9E0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0030u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC279E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003F9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC279E8: 11600006 beq $t3, $zero, 0xBFC27A04 */ - uint32_t psx_brA_BFC279E8 = cpu->gpr[11]; uint32_t psx_brB_BFC279E8 = cpu->gpr[0]; - psx_taken_BFC279E8 = (psx_brA_BFC279E8 == psx_brB_BFC279E8); - psx_delay_BFC279E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC279EC: 240D0059 addiu $t5, $zero, 89 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (89)); - PGXP_ALU(0x240D0059u, cpu->gpr[13], _pgx1, 0x00000059u); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9ECu); -#endif - if (psx_delay_BFC279E8) { - psx_delay_BFC279E8 = 0; - if (psx_taken_BFC279E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA04u); - goto label_BFC27A04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003F9F0u); - } -label_BFC279F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC279F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC279F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003F9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC279F0: 240C004A addiu $t4, $zero, 74 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (74)); - PGXP_ALU(0x240C004Au, cpu->gpr[12], _pgx1, 0x0000004Au); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC279F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003F9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC279F8: 10000004 beq $zero, $zero, 0xBFC27A0C */ - uint32_t psx_brA_BFC279F8 = cpu->gpr[0]; uint32_t psx_brB_BFC279F8 = cpu->gpr[0]; - psx_taken_BFC279F8 = (psx_brA_BFC279F8 == psx_brB_BFC279F8); - psx_delay_BFC279F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC279FC: AC2C3E74 sw $t4, 15988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003F9FCu); return; } g_debug_last_store_pc = 0x8003F9FCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C3E74u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003F9FCu); -#endif - if (psx_delay_BFC279F8) { - psx_delay_BFC279F8 = 0; - if (psx_taken_BFC279F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA0Cu); - goto label_BFC27A0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA00u); - } -label_BFC27A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC27A00: 240D0059 addiu $t5, $zero, 89 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (89)); - PGXP_ALU(0x240D0059u, cpu->gpr[13], _pgx1, 0x00000059u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA00u); -#endif -label_BFC27A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27A04: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC27A08: AC2D3E74 sw $t5, 15988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA08u); return; } g_debug_last_store_pc = 0x8003FA08u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D3E74u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA08u); -#endif -label_BFC27A0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27A0C: 10000002 beq $zero, $zero, 0xBFC27A18 */ - uint32_t psx_brA_BFC27A0C = cpu->gpr[0]; uint32_t psx_brB_BFC27A0C = cpu->gpr[0]; - psx_taken_BFC27A0C = (psx_brA_BFC27A0C == psx_brB_BFC27A0C); - psx_delay_BFC27A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27A10: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA10u); -#endif - if (psx_delay_BFC27A0C) { - psx_delay_BFC27A0C = 0; - if (psx_taken_BFC27A0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA18u); - goto label_BFC27A18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA14u); - } -label_BFC27A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27A14: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA14u); -#endif -label_BFC27A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA18u); -#endif - /* 0xBFC27A18: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA18u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA18u); -#endif - /* 0xBFC27A1C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA1Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA20u); -#endif - /* 0xBFC27A20: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA20u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27A24: 03E00008 jr $ra */ - psx_delay_BFC27A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27A28: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA28u); -#endif - if (psx_delay_BFC27A24) { - psx_delay_BFC27A24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27A2C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27A2Cu); - int psx_delay_BFC27A5C = 0; - int psx_taken_BFC27A5C = 0; - int psx_delay_BFC27A7C = 0; - int psx_taken_BFC27A7C = 0; - int psx_delay_BFC27AA4 = 0; - int psx_delay_BFC27AE0 = 0; - int psx_taken_BFC27AE0 = 0; - int psx_delay_BFC27AE8 = 0; - int psx_delay_BFC27B04 = 0; - int psx_taken_BFC27B04 = 0; - int psx_delay_BFC27B1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27A64u: goto label_BFC27A64; - case 0xBFC27A84u: goto label_BFC27A84; - case 0xBFC27AACu: goto label_BFC27AAC; - case 0xBFC27AE8u: goto label_BFC27AE8; - case 0xBFC27AF0u: goto label_BFC27AF0; - case 0xBFC27B0Cu: goto label_BFC27B0C; - case 0xBFC27B10u: goto label_BFC27B10; - default: break; - } - } -label_BFC27A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27A2C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27A30: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA30u); -#endif - /* 0xBFC27A34: 8C423E70 lw $v0, 15984($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC27A38: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA38u); return; } g_debug_last_store_pc = 0x8003FA38u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27A3C: 3C118007 lui $s1, 0x8007 */ - cpu->gpr[17] = 0x80070000u; - PGXP_ALU(0x3C118007u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27A40: 26314A40 addiu $s1, $s1, 19008 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (19008)); - PGXP_ALU(0x26314A40u, cpu->gpr[17], _pgx1, 0x00004A40u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27A44: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA44u); return; } g_debug_last_store_pc = 0x8003FA44u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC27A48: 000270C0 sll $t6, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000270C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27A4C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA4Cu); return; } g_debug_last_store_pc = 0x8003FA4Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x34000u); -#endif - /* 0xBFC27A50: 022E8021 addu $s0, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA50u); -#endif - /* 0xBFC27A54: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA54u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27A58: 2401270F addiu $at, $zero, 9999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9999)); - PGXP_ALU(0x2401270Fu, cpu->gpr[1], _pgx1, 0x0000270Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC27A5C: 11E1002C beq $t7, $at, 0xBFC27B10 */ - uint32_t psx_brA_BFC27A5C = cpu->gpr[15]; uint32_t psx_brB_BFC27A5C = cpu->gpr[1]; - psx_taken_BFC27A5C = (psx_brA_BFC27A5C == psx_brB_BFC27A5C); - psx_delay_BFC27A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27A60: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA60u); -#endif - if (psx_delay_BFC27A5C) { - psx_delay_BFC27A5C = 0; - if (psx_taken_BFC27A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FB10u); - goto label_BFC27B10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA64u); - } -label_BFC27A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27A64: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC27A68: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA68u); -#endif - /* 0xBFC27A6C: 8C633E78 lw $v1, 15992($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 15992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA6Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C633E78u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA70u); -#endif - /* 0xBFC27A70: 8F183E74 lw $t8, 15988($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 15988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA70u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183E74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27A74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000Au); -#endif - /* 0xBFC27A78: 0303082B sltu $at, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0303082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27A7C: 1420001A bne $at, $zero, 0xBFC27AE8 */ - uint32_t psx_brA_BFC27A7C = cpu->gpr[1]; uint32_t psx_brB_BFC27A7C = cpu->gpr[0]; - psx_taken_BFC27A7C = (psx_brA_BFC27A7C != psx_brB_BFC27A7C); - psx_delay_BFC27A7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27A80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FA80u); -#endif - if (psx_delay_BFC27A7C) { - psx_delay_BFC27A7C = 0; - if (psx_taken_BFC27A7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FAE8u); - goto label_BFC27AE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA84u); - } -label_BFC27A84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA84u); -#endif - /* 0xBFC27A84: 82190006 lb $t9, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (6)), 25, 0x10000u); - PGXP_LOAD(0x82190006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA84u); -#endif - /* 0xBFC27A88: 82060004 lb $a2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (4)), 6, 0x10000u); - PGXP_LOAD(0x82060004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA88u); -#endif - /* 0xBFC27A8C: 82070005 lb $a3, 5($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (5)), 7, 0x10000u); - PGXP_LOAD(0x82070005u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC27A90: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA90u); return; } g_debug_last_store_pc = 0x8003FA90u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA90u); -#endif - /* 0xBFC27A94: 82080007 lb $t0, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 8, 0x10000u); - PGXP_LOAD(0x82080007u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27A98: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FA98u); -#endif - /* 0xBFC27A9C: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FA9Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27AA0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27AA4: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FAACu; /* jal link before delay slot */ - psx_delay_BFC27AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC27AA8: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAA8u); return; } g_debug_last_store_pc = 0x8003FAA8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAA8u); -#endif - if (psx_delay_BFC27AA4) { - psx_delay_BFC27AA4 = 0; - cpu->gpr[31] = 0x8003FAACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27AAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27AACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27AAC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAB0u); -#endif - /* 0xBFC27AB0: 8C423E70 lw $v0, 15984($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAB0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27AB4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27AB8: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC27ABC: 000248C0 sll $t1, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000248C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30200u); -#endif - /* 0xBFC27AC0: 02298021 addu $s0, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02298021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAC0u); -#endif - /* 0xBFC27AC4: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAC4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC27AC8: AC223E70 sw $v0, 15984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAC8u); return; } g_debug_last_store_pc = 0x8003FAC8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223E70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC27ACC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAD0u); -#endif - /* 0xBFC27AD0: 8D4A3E74 lw $t2, 15988($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 15988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAD0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A3E74u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27AD4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC27AD8: AC233E78 sw $v1, 15992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAD8u); return; } g_debug_last_store_pc = 0x8003FAD8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC233E78u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40Au); -#endif - /* 0xBFC27ADC: 0143082B sltu $at, $t2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[10] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0143082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27AE0: 1020FFE8 beq $at, $zero, 0xBFC27A84 */ - uint32_t psx_brA_BFC27AE0 = cpu->gpr[1]; uint32_t psx_brB_BFC27AE0 = cpu->gpr[0]; - psx_taken_BFC27AE0 = (psx_brA_BFC27AE0 == psx_brB_BFC27AE0); - psx_delay_BFC27AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27AE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FAE4u); -#endif - if (psx_delay_BFC27AE0) { - psx_delay_BFC27AE0 = 0; - if (psx_taken_BFC27AE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA84u); - goto label_BFC27A84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FAE8u); - } -label_BFC27AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27AE8: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x8003FAF0u; /* jal link before delay slot */ - psx_delay_BFC27AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FAECu); -#endif - if (psx_delay_BFC27AE8) { - psx_delay_BFC27AE8 = 0; - cpu->gpr[31] = 0x8003FAF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC27AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC27AF0: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FAF0u); -#endif - /* 0xBFC27AF4: 8D6B3E74 lw $t3, 15988($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 15988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FAF4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B3E74u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27AF8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC27AFC: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC27B00: AC2C3E74 sw $t4, 15988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB00u); return; } g_debug_last_store_pc = 0x8003FB00u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C3E74u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27B04: 10000002 beq $zero, $zero, 0xBFC27B10 */ - uint32_t psx_brA_BFC27B04 = cpu->gpr[0]; uint32_t psx_brB_BFC27B04 = cpu->gpr[0]; - psx_taken_BFC27B04 = (psx_brA_BFC27B04 == psx_brB_BFC27B04); - psx_delay_BFC27B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27B08: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB08u); -#endif - if (psx_delay_BFC27B04) { - psx_delay_BFC27B04 = 0; - if (psx_taken_BFC27B04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FB10u); - goto label_BFC27B10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FB0Cu); - } -label_BFC27B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27B0C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB0Cu); -#endif -label_BFC27B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB10u); -#endif - /* 0xBFC27B10: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB10u); -#endif - /* 0xBFC27B14: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB14u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB14u); -#endif - /* 0xBFC27B18: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB18u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27B1C: 03E00008 jr $ra */ - psx_delay_BFC27B1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27B20: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB20u); -#endif - if (psx_delay_BFC27B1C) { - psx_delay_BFC27B1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27B24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27B24u); - int psx_delay_BFC27B2C = 0; - int psx_delay_BFC27B50 = 0; - int psx_delay_BFC27B74 = 0; - int psx_delay_BFC27B98 = 0; - int psx_delay_BFC27BBC = 0; - int psx_delay_BFC27BC4 = 0; - int psx_delay_BFC27BD4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27B34u: goto label_BFC27B34; - case 0xBFC27B58u: goto label_BFC27B58; - case 0xBFC27B7Cu: goto label_BFC27B7C; - case 0xBFC27BA0u: goto label_BFC27BA0; - case 0xBFC27BC4u: goto label_BFC27BC4; - case 0xBFC27BCCu: goto label_BFC27BCC; - default: break; - } - } -label_BFC27B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27B24: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27B28: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB28u); return; } g_debug_last_store_pc = 0x8003FB28u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27B2C: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x8003FB34u; /* jal link before delay slot */ - psx_delay_BFC27B2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27B30: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB30u); -#endif - if (psx_delay_BFC27B2C) { - psx_delay_BFC27B2C = 0; - cpu->gpr[31] = 0x8003FB34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC27B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27B34: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FB34u); -#endif - /* 0xBFC27B38: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB38u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC27B3C: 240E0040 addiu $t6, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240E0040u, cpu->gpr[14], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC27B40: AFAE0014 sw $t6, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB40u); return; } g_debug_last_store_pc = 0x8003FB40u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0014u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27B44: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27B48: 24060003 addiu $a2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24060003u, cpu->gpr[6], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27B4C: 2407003E addiu $a3, $zero, 62 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (62)); - PGXP_ALU(0x2407003Eu, cpu->gpr[7], _pgx1, 0x0000003Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27B50: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FB58u; /* jal link before delay slot */ - psx_delay_BFC27B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27B54: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB54u); return; } g_debug_last_store_pc = 0x8003FB54u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB54u); -#endif - if (psx_delay_BFC27B50) { - psx_delay_BFC27B50 = 0; - cpu->gpr[31] = 0x8003FB58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27B58: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FB58u); -#endif - /* 0xBFC27B5C: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB5Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC27B60: 240F0040 addiu $t7, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240F0040u, cpu->gpr[15], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC27B64: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB64u); return; } g_debug_last_store_pc = 0x8003FB64u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27B68: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27B6C: 24060003 addiu $a2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24060003u, cpu->gpr[6], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27B70: 24070040 addiu $a3, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24070040u, cpu->gpr[7], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27B74: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FB7Cu; /* jal link before delay slot */ - psx_delay_BFC27B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27B78: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB78u); return; } g_debug_last_store_pc = 0x8003FB78u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB78u); -#endif - if (psx_delay_BFC27B74) { - psx_delay_BFC27B74 = 0; - cpu->gpr[31] = 0x8003FB7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27B7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27B7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27B7C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB80u); -#endif - /* 0xBFC27B80: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB80u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC27B84: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC27B88: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB88u); return; } g_debug_last_store_pc = 0x8003FB88u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27B8C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27B90: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27B94: 2407001D addiu $a3, $zero, 29 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (29)); - PGXP_ALU(0x2407001Du, cpu->gpr[7], _pgx1, 0x0000001Du); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27B98: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FBA0u; /* jal link before delay slot */ - psx_delay_BFC27B98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27B9C: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FB9Cu); return; } g_debug_last_store_pc = 0x8003FB9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FB9Cu); -#endif - if (psx_delay_BFC27B98) { - psx_delay_BFC27B98 = 0; - cpu->gpr[31] = 0x8003FBA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27BA0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FBA0u); -#endif - /* 0xBFC27BA4: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBA4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC27BA8: 24190040 addiu $t9, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24190040u, cpu->gpr[25], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC27BAC: AFB90014 sw $t9, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBACu); return; } g_debug_last_store_pc = 0x8003FBACu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90014u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27BB0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27BB4: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC27BB8: 24070029 addiu $a3, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24070029u, cpu->gpr[7], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27BBC: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FBC4u; /* jal link before delay slot */ - psx_delay_BFC27BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27BC0: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBC0u); return; } g_debug_last_store_pc = 0x8003FBC0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBC0u); -#endif - if (psx_delay_BFC27BBC) { - psx_delay_BFC27BBC = 0; - cpu->gpr[31] = 0x8003FBC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27BC4: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x8003FBCCu; /* jal link before delay slot */ - psx_delay_BFC27BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FBC8u); -#endif - if (psx_delay_BFC27BC4) { - psx_delay_BFC27BC4 = 0; - cpu->gpr[31] = 0x8003FBCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC27BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBCCu); -#endif - /* 0xBFC27BCC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBCCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27BD0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27BD4: 03E00008 jr $ra */ - psx_delay_BFC27BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27BD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FBD8u); -#endif - if (psx_delay_BFC27BD4) { - psx_delay_BFC27BD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27BDC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27BDCu); - int psx_delay_BFC27C0C = 0; - int psx_taken_BFC27C0C = 0; - int psx_delay_BFC27C28 = 0; - int psx_taken_BFC27C28 = 0; - int psx_delay_BFC27C50 = 0; - int psx_delay_BFC27C84 = 0; - int psx_taken_BFC27C84 = 0; - int psx_delay_BFC27C8C = 0; - int psx_delay_BFC27CA8 = 0; - int psx_taken_BFC27CA8 = 0; - int psx_delay_BFC27CC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27C14u: goto label_BFC27C14; - case 0xBFC27C30u: goto label_BFC27C30; - case 0xBFC27C58u: goto label_BFC27C58; - case 0xBFC27C8Cu: goto label_BFC27C8C; - case 0xBFC27C94u: goto label_BFC27C94; - case 0xBFC27CB0u: goto label_BFC27CB0; - case 0xBFC27CB4u: goto label_BFC27CB4; - default: break; - } - } -label_BFC27BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27BDC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27BE0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FBE0u); -#endif - /* 0xBFC27BE4: 8C423E7C lw $v0, 15996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBE4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC27BE8: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBE8u); return; } g_debug_last_store_pc = 0x8003FBE8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27BEC: 3C118007 lui $s1, 0x8007 */ - cpu->gpr[17] = 0x80070000u; - PGXP_ALU(0x3C118007u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27BF0: 26314B88 addiu $s1, $s1, 19336 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (19336)); - PGXP_ALU(0x26314B88u, cpu->gpr[17], _pgx1, 0x00004B88u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27BF4: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBF4u); return; } g_debug_last_store_pc = 0x8003FBF4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC27BF8: 000270C0 sll $t6, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000270C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27BFC: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FBFCu); return; } g_debug_last_store_pc = 0x8003FBFCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x34000u); -#endif - /* 0xBFC27C00: 022E8021 addu $s0, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC00u); -#endif - /* 0xBFC27C04: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC04u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27C08: 2401270F addiu $at, $zero, 9999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9999)); - PGXP_ALU(0x2401270Fu, cpu->gpr[1], _pgx1, 0x0000270Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC27C0C: 11E10029 beq $t7, $at, 0xBFC27CB4 */ - uint32_t psx_brA_BFC27C0C = cpu->gpr[15]; uint32_t psx_brB_BFC27C0C = cpu->gpr[1]; - psx_taken_BFC27C0C = (psx_brA_BFC27C0C == psx_brB_BFC27C0C); - psx_delay_BFC27C0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27C10: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC10u); -#endif - if (psx_delay_BFC27C0C) { - psx_delay_BFC27C0C = 0; - if (psx_taken_BFC27C0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FCB4u); - goto label_BFC27CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FC14u); - } -label_BFC27C14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27C14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27C14: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC27C18: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC18u); -#endif - /* 0xBFC27C1C: 8C633E84 lw $v1, 16004($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC1Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C633E84u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC20u); -#endif - /* 0xBFC27C20: 8F183E80 lw $t8, 16000($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC20u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183E80u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27C24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC27C28: 14780018 bne $v1, $t8, 0xBFC27C8C */ - uint32_t psx_brA_BFC27C28 = cpu->gpr[3]; uint32_t psx_brB_BFC27C28 = cpu->gpr[24]; - psx_taken_BFC27C28 = (psx_brA_BFC27C28 != psx_brB_BFC27C28); - psx_delay_BFC27C28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27C2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FC2Cu); -#endif - if (psx_delay_BFC27C28) { - psx_delay_BFC27C28 = 0; - if (psx_taken_BFC27C28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FC8Cu); - goto label_BFC27C8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FC30u); - } -label_BFC27C30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27C30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC30u); -#endif - /* 0xBFC27C30: 82190006 lb $t9, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; cpu->gpr[25] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (6)), 25, 0x10000u); - PGXP_LOAD(0x82190006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC30u); -#endif - /* 0xBFC27C34: 82060004 lb $a2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (4)), 6, 0x10000u); - PGXP_LOAD(0x82060004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC34u); -#endif - /* 0xBFC27C38: 82070005 lb $a3, 5($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (5)), 7, 0x10000u); - PGXP_LOAD(0x82070005u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC27C3C: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC3Cu); return; } g_debug_last_store_pc = 0x8003FC3Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC40u); -#endif - /* 0xBFC27C40: 82080007 lb $t0, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 8, 0x10000u); - PGXP_LOAD(0x82080007u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC27C44: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC44u); -#endif - /* 0xBFC27C48: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC48u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27C4C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27C50: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8003FC58u; /* jal link before delay slot */ - psx_delay_BFC27C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC27C54: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC54u); return; } g_debug_last_store_pc = 0x8003FC54u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC54u); -#endif - if (psx_delay_BFC27C50) { - psx_delay_BFC27C50 = 0; - cpu->gpr[31] = 0x8003FC58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC27C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27C58: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC58u); -#endif - /* 0xBFC27C5C: 8C423E7C lw $v0, 15996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 15996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423E7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27C60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27C64: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC27C68: 000248C0 sll $t1, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000248C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30200u); -#endif - /* 0xBFC27C6C: 02298021 addu $s0, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02298021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC70u); -#endif - /* 0xBFC27C70: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC70u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC27C74: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC74u); -#endif - /* 0xBFC27C78: 8D4A3E80 lw $t2, 16000($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC78u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A3E80u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC27C7C: AC223E7C sw $v0, 15996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC7Cu); return; } g_debug_last_store_pc = 0x8003FC7Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC223E7Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27C80: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC27C84: 106AFFEA beq $v1, $t2, 0xBFC27C30 */ - uint32_t psx_brA_BFC27C84 = cpu->gpr[3]; uint32_t psx_brB_BFC27C84 = cpu->gpr[10]; - psx_taken_BFC27C84 = (psx_brA_BFC27C84 == psx_brB_BFC27C84); - psx_delay_BFC27C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC27C88: AC233E84 sw $v1, 16004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC88u); return; } g_debug_last_store_pc = 0x8003FC88u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC233E84u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC88u); -#endif - if (psx_delay_BFC27C84) { - psx_delay_BFC27C84 = 0; - if (psx_taken_BFC27C84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FC30u); - goto label_BFC27C30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FC8Cu); - } -label_BFC27C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27C8C: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x8003FC94u; /* jal link before delay slot */ - psx_delay_BFC27C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27C90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FC90u); -#endif - if (psx_delay_BFC27C8C) { - psx_delay_BFC27C8C = 0; - cpu->gpr[31] = 0x8003FC94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC27C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC27C94: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC94u); -#endif - /* 0xBFC27C98: 8D6B3E80 lw $t3, 16000($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FC98u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B3E80u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27C9C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC27CA0: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC27CA4: AC2C3E80 sw $t4, 16000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCA4u); return; } g_debug_last_store_pc = 0x8003FCA4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C3E80u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27CA8: 10000002 beq $zero, $zero, 0xBFC27CB4 */ - uint32_t psx_brA_BFC27CA8 = cpu->gpr[0]; uint32_t psx_brB_BFC27CA8 = cpu->gpr[0]; - psx_taken_BFC27CA8 = (psx_brA_BFC27CA8 == psx_brB_BFC27CA8); - psx_delay_BFC27CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27CAC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCACu); -#endif - if (psx_delay_BFC27CA8) { - psx_delay_BFC27CA8 = 0; - if (psx_taken_BFC27CA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FCB4u); - goto label_BFC27CB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FCB0u); - } -label_BFC27CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27CB0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCB0u); -#endif -label_BFC27CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCB4u); -#endif - /* 0xBFC27CB4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCB4u); -#endif - /* 0xBFC27CB8: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCB8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCB8u); -#endif - /* 0xBFC27CBC: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCBCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27CC0: 03E00008 jr $ra */ - psx_delay_BFC27CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27CC4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCC4u); -#endif - if (psx_delay_BFC27CC0) { - psx_delay_BFC27CC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27CC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27CC8u); - int psx_delay_BFC27CD0 = 0; - int psx_delay_BFC27CD8 = 0; - int psx_delay_BFC27D24 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27CD8u: goto label_BFC27CD8; - case 0xBFC27CE0u: goto label_BFC27CE0; - default: break; - } - } -label_BFC27CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27CC8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27CCC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCCCu); return; } g_debug_last_store_pc = 0x8003FCCCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27CD0: 0C015018 jal 0xB0054060 */ - cpu->gpr[31] = 0x8003FCD8u; /* jal link before delay slot */ - psx_delay_BFC27CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27CD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FCD4u); -#endif - if (psx_delay_BFC27CD0) { - psx_delay_BFC27CD0 = 0; - cpu->gpr[31] = 0x8003FCD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054060u); - cpu->pc = 0x80054060u; return; - } -label_BFC27CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27CD8: 0C0148B0 jal 0xB00522C0 */ - cpu->gpr[31] = 0x8003FCE0u; /* jal link before delay slot */ - psx_delay_BFC27CD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27CDC: 24040018 addiu $a0, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24040018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCDCu); -#endif - if (psx_delay_BFC27CD8) { - psx_delay_BFC27CD8 = 0; - cpu->gpr[31] = 0x8003FCE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800522C0u); - cpu->pc = 0x800522C0u; return; - } -label_BFC27CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27CE0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27CE4: AC203E70 sw $zero, 15984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCE4u); return; } g_debug_last_store_pc = 0x8003FCE4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203E70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27CE8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC27CEC: 3C0E8007 lui $t6, 0x8007 */ - cpu->gpr[14] = 0x80070000u; - PGXP_ALU(0x3C0E8007u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FCF0u); -#endif - /* 0xBFC27CF0: 8DCE4A40 lw $t6, 19008($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 19008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (19008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCF0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE4A40u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27CF4: AC203E74 sw $zero, 15988($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15988; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCF4u); return; } g_debug_last_store_pc = 0x8003FCF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203E74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27CF8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC27CFC: AC2E3E78 sw $t6, 15992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15992; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FCFCu); return; } g_debug_last_store_pc = 0x8003FCFCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E3E78u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27D00: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27D04: AC203E7C sw $zero, 15996($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 15996; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (15996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD04u); return; } g_debug_last_store_pc = 0x8003FD04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203E7Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27D08: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC27D0C: 3C0F8007 lui $t7, 0x8007 */ - cpu->gpr[15] = 0x80070000u; - PGXP_ALU(0x3C0F8007u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD10u); -#endif - /* 0xBFC27D10: 8DEF4B88 lw $t7, 19336($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 19336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (19336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD10u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF4B88u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD10u); -#endif - /* 0xBFC27D14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27D18: AC203E80 sw $zero, 16000($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16000; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD18u); return; } g_debug_last_store_pc = 0x8003FD18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC203E80u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27D1C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27D20: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27D24: 03E00008 jr $ra */ - psx_delay_BFC27D24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC27D28: AC2F3E84 sw $t7, 16004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD28u); return; } g_debug_last_store_pc = 0x8003FD28u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F3E84u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD28u); -#endif - if (psx_delay_BFC27D24) { - psx_delay_BFC27D24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27D2C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27D2Cu); - int psx_delay_BFC27D68 = 0; - int psx_taken_BFC27D68 = 0; - int psx_delay_BFC27D74 = 0; - int psx_delay_BFC27D84 = 0; - int psx_delay_BFC27DA8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27D48u: goto label_BFC27D48; - case 0xBFC27D70u: goto label_BFC27D70; - case 0xBFC27D7Cu: goto label_BFC27D7C; - case 0xBFC27D8Cu: goto label_BFC27D8C; - default: break; - } - } -label_BFC27D2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27D2C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27D30: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27D34: 3C031F80 lui $v1, 0x1F80 */ - cpu->gpr[3] = 0x1F800000u; - PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27D38: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27D3C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD3Cu); return; } g_debug_last_store_pc = 0x8003FD3Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27D40: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC27D44: 34631D80 ori $v1, $v1, 0x1D80 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1D80u; - PGXP_ALU(0x34631D80u, cpu->gpr[3], _pgx1, 0x1D80u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD44u); -#endif -label_BFC27D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D48: A4400000 sh $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD48u); return; } g_debug_last_store_pc = 0x8003FD48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D4C: A4400002 sh $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD4Cu); return; } g_debug_last_store_pc = 0x8003FD4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D50: A4400010 sh $zero, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD50u); return; } g_debug_last_store_pc = 0x8003FD50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D54: A4400012 sh $zero, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD54u); return; } g_debug_last_store_pc = 0x8003FD54u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400012u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D58: A4400020 sh $zero, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD58u); return; } g_debug_last_store_pc = 0x8003FD58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27D5C: 24420040 addiu $v0, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (64)); - PGXP_ALU(0x24420040u, cpu->gpr[2], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D60: A440FFE2 sh $zero, -30($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD60u); return; } g_debug_last_store_pc = 0x8003FD60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440FFE2u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D64: A440FFF0 sh $zero, -16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD64u); return; } g_debug_last_store_pc = 0x8003FD64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440FFF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC27D68: 1443FFF7 bne $v0, $v1, 0xBFC27D48 */ - uint32_t psx_brA_BFC27D68 = cpu->gpr[2]; uint32_t psx_brB_BFC27D68 = cpu->gpr[3]; - psx_taken_BFC27D68 = (psx_brA_BFC27D68 != psx_brB_BFC27D68); - psx_delay_BFC27D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27D6C: A440FFF2 sh $zero, -14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD6Cu); return; } g_debug_last_store_pc = 0x8003FD6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440FFF2u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD6Cu); -#endif - if (psx_delay_BFC27D68) { - psx_delay_BFC27D68 = 0; - if (psx_taken_BFC27D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FD48u); - goto label_BFC27D48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FD70u); - } -label_BFC27D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27D70: 2404007F addiu $a0, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2404007Fu, cpu->gpr[4], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27D74: 0C014FA4 jal 0xB0053E90 */ - cpu->gpr[31] = 0x8003FD7Cu; /* jal link before delay slot */ - psx_delay_BFC27D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27D78: 2405007F addiu $a1, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2405007Fu, cpu->gpr[5], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD78u); -#endif - if (psx_delay_BFC27D74) { - psx_delay_BFC27D74 = 0; - cpu->gpr[31] = 0x8003FD7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E90u); - cpu->pc = 0x80053E90u; return; - } -label_BFC27D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27D7C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27D80: 24057FFF addiu $a1, $zero, 32767 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32767)); - PGXP_ALU(0x24057FFFu, cpu->gpr[5], _pgx1, 0x00007FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27D84: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FD8Cu; /* jal link before delay slot */ - psx_delay_BFC27D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27D88: 24067FFF addiu $a2, $zero, 32767 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32767)); - PGXP_ALU(0x24067FFFu, cpu->gpr[6], _pgx1, 0x00007FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD88u); -#endif - if (psx_delay_BFC27D84) { - psx_delay_BFC27D84 = 0; - cpu->gpr[31] = 0x8003FD8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27D8C: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27D90: 34421C00 ori $v0, $v0, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1C00u; - PGXP_ALU(0x34421C00u, cpu->gpr[2], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27D94: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC27D98: A443018C sh $v1, 396($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (396)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD98u); return; } g_debug_last_store_pc = 0x8003FD98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA443018Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC27D9C: A443018E sh $v1, 398($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 398; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (398)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FD9Cu); return; } g_debug_last_store_pc = 0x8003FD9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA443018Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDA0u); -#endif - /* 0xBFC27DA0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FDA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27DA4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27DA8: 03E00008 jr $ra */ - psx_delay_BFC27DA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27DAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FDACu); -#endif - if (psx_delay_BFC27DA8) { - psx_delay_BFC27DA8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27DB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27DB0u); - int psx_delay_BFC27DB4 = 0; - int psx_taken_BFC27DB4 = 0; - int psx_delay_BFC27DBC = 0; - int psx_delay_BFC27DC4 = 0; - int psx_delay_BFC27DD0 = 0; - int psx_delay_BFC27DE0 = 0; - int psx_delay_BFC27DF0 = 0; - int psx_delay_BFC27E00 = 0; - int psx_delay_BFC27E10 = 0; - int psx_delay_BFC27E20 = 0; - int psx_delay_BFC27E50 = 0; - int psx_delay_BFC27E60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27DBCu: goto label_BFC27DBC; - case 0xBFC27DC4u: goto label_BFC27DC4; - case 0xBFC27DCCu: goto label_BFC27DCC; - case 0xBFC27DD8u: goto label_BFC27DD8; - case 0xBFC27DE8u: goto label_BFC27DE8; - case 0xBFC27DF8u: goto label_BFC27DF8; - case 0xBFC27E08u: goto label_BFC27E08; - case 0xBFC27E18u: goto label_BFC27E18; - case 0xBFC27E28u: goto label_BFC27E28; - case 0xBFC27E58u: goto label_BFC27E58; - default: break; - } - } -label_BFC27DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27DB0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DB4: 10800003 beq $a0, $zero, 0xBFC27DC4 */ - uint32_t psx_brA_BFC27DB4 = cpu->gpr[4]; uint32_t psx_brB_BFC27DB4 = cpu->gpr[0]; - psx_taken_BFC27DB4 = (psx_brA_BFC27DB4 == psx_brB_BFC27DB4); - psx_delay_BFC27DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27DB8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FDB8u); return; } g_debug_last_store_pc = 0x8003FDB8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDB8u); -#endif - if (psx_delay_BFC27DB4) { - psx_delay_BFC27DB4 = 0; - if (psx_taken_BFC27DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FDC4u); - goto label_BFC27DC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FDBCu); - } -label_BFC27DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27DBC: 0C00FF32 jal 0xB003FCC8 */ - cpu->gpr[31] = 0x8003FDC4u; /* jal link before delay slot */ - psx_delay_BFC27DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27DC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FDC0u); -#endif - if (psx_delay_BFC27DBC) { - psx_delay_BFC27DBC = 0; - cpu->gpr[31] = 0x8003FDC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FCC8u); - cpu->pc = 0x8003FCC8u; return; - } -label_BFC27DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27DC4: 0C00FFAD jal 0xB003FEB4 */ - cpu->gpr[31] = 0x8003FDCCu; /* jal link before delay slot */ - psx_delay_BFC27DC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DC8: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDC8u); -#endif - if (psx_delay_BFC27DC4) { - psx_delay_BFC27DC4 = 0; - cpu->gpr[31] = 0x8003FDCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FEB4u); - cpu->pc = 0x8003FEB4u; return; - } -label_BFC27DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DCC: 2404007F addiu $a0, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2404007Fu, cpu->gpr[4], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27DD0: 0C014FA4 jal 0xB0053E90 */ - cpu->gpr[31] = 0x8003FDD8u; /* jal link before delay slot */ - psx_delay_BFC27DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27DD4: 2405006F addiu $a1, $zero, 111 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (111)); - PGXP_ALU(0x2405006Fu, cpu->gpr[5], _pgx1, 0x0000006Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDD4u); -#endif - if (psx_delay_BFC27DD0) { - psx_delay_BFC27DD0 = 0; - cpu->gpr[31] = 0x8003FDD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E90u); - cpu->pc = 0x80053E90u; return; - } -label_BFC27DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DD8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27DDC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27DE0: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FDE8u; /* jal link before delay slot */ - psx_delay_BFC27DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27DE4: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDE4u); -#endif - if (psx_delay_BFC27DE0) { - psx_delay_BFC27DE0 = 0; - cpu->gpr[31] = 0x8003FDE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DE8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27DEC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27DF0: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FDF8u; /* jal link before delay slot */ - psx_delay_BFC27DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27DF4: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDF4u); -#endif - if (psx_delay_BFC27DF0) { - psx_delay_BFC27DF0 = 0; - cpu->gpr[31] = 0x8003FDF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27DF8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27DFC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E00: 0C014FD0 jal 0xB0053F40 */ - cpu->gpr[31] = 0x8003FE08u; /* jal link before delay slot */ - psx_delay_BFC27E00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27E04: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE04u); -#endif - if (psx_delay_BFC27E00) { - psx_delay_BFC27E00 = 0; - cpu->gpr[31] = 0x8003FE08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F40u); - cpu->pc = 0x80053F40u; return; - } -label_BFC27E08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27E08: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27E0C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E10: 0C014FD0 jal 0xB0053F40 */ - cpu->gpr[31] = 0x8003FE18u; /* jal link before delay slot */ - psx_delay_BFC27E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27E14: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE14u); -#endif - if (psx_delay_BFC27E10) { - psx_delay_BFC27E10 = 0; - cpu->gpr[31] = 0x8003FE18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F40u); - cpu->pc = 0x80053F40u; return; - } -label_BFC27E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27E18: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27E1C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E20: 0C014FD0 jal 0xB0053F40 */ - cpu->gpr[31] = 0x8003FE28u; /* jal link before delay slot */ - psx_delay_BFC27E20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27E24: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE24u); -#endif - if (psx_delay_BFC27E20) { - psx_delay_BFC27E20 = 0; - cpu->gpr[31] = 0x8003FE28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F40u); - cpu->pc = 0x80053F40u; return; - } -label_BFC27E28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27E28: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27E2C: A4209EE4 sh $zero, -24860($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24860; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24860)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE2Cu); return; } g_debug_last_store_pc = 0x8003FE2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EE4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27E30: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27E34: A4209EE6 sh $zero, -24858($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24858; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24858)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE34u); return; } g_debug_last_store_pc = 0x8003FE34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EE6u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27E38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27E3C: A4209EE8 sh $zero, -24856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24856)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE3Cu); return; } g_debug_last_store_pc = 0x8003FE3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27E40: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27E44: A4209EEA sh $zero, -24854($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24854; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24854)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE44u); return; } g_debug_last_store_pc = 0x8003FE44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EEAu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27E48: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27E4C: A4209EEC sh $zero, -24852($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24852; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24852)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE4Cu); return; } g_debug_last_store_pc = 0x8003FE4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EECu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E50: 0C014FC4 jal 0xB0053F10 */ - cpu->gpr[31] = 0x8003FE58u; /* jal link before delay slot */ - psx_delay_BFC27E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27E54: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE54u); -#endif - if (psx_delay_BFC27E50) { - psx_delay_BFC27E50 = 0; - cpu->gpr[31] = 0x8003FE58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F10u); - cpu->pc = 0x80053F10u; return; - } -label_BFC27E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE58u); -#endif - /* 0xBFC27E58: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27E5C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27E60: 03E00008 jr $ra */ - psx_delay_BFC27E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27E64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FE64u); -#endif - if (psx_delay_BFC27E60) { - psx_delay_BFC27E60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27E68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27E68u); - int psx_delay_BFC27E70 = 0; - int psx_delay_BFC27E80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27E78u: goto label_BFC27E78; - default: break; - } - } -label_BFC27E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27E68: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27E6C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE6Cu); return; } g_debug_last_store_pc = 0x8003FE6Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E70: 0C00FF4B jal 0xB003FD2C */ - cpu->gpr[31] = 0x8003FE78u; /* jal link before delay slot */ - psx_delay_BFC27E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27E74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FE74u); -#endif - if (psx_delay_BFC27E70) { - psx_delay_BFC27E70 = 0; - cpu->gpr[31] = 0x8003FE78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FD2Cu); - cpu->pc = 0x8003FD2Cu; return; - } -label_BFC27E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE78u); -#endif - /* 0xBFC27E78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27E7C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27E80: 03E00008 jr $ra */ - psx_delay_BFC27E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27E84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FE84u); -#endif - if (psx_delay_BFC27E80) { - psx_delay_BFC27E80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27E88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27E88u); - int psx_delay_BFC27E98 = 0; - int psx_delay_BFC27EAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27EA0u: goto label_BFC27EA0; - default: break; - } - } -label_BFC27E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27E88: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27E8C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FE8Cu); return; } g_debug_last_store_pc = 0x8003FE8Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27E90: 3C048007 lui $a0, 0x8007 */ - cpu->gpr[4] = 0x80070000u; - PGXP_ALU(0x3C048007u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC27E94: 24848FC0 addiu $a0, $a0, -28736 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28736)); - PGXP_ALU(0x24848FC0u, cpu->gpr[4], _pgx1, 0xFFFF8FC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27E98: 0C014CC3 jal 0xB005330C */ - cpu->gpr[31] = 0x8003FEA0u; /* jal link before delay slot */ - psx_delay_BFC27E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27E9C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FE9Cu); -#endif - if (psx_delay_BFC27E98) { - psx_delay_BFC27E98 = 0; - cpu->gpr[31] = 0x8003FEA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005330Cu); - cpu->pc = 0x8005330Cu; return; - } -label_BFC27EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEA0u); -#endif - /* 0xBFC27EA0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FEA0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27EA4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC27EA8: A4229EE2 sh $v0, -24862($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24862; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003FEA8u); return; } g_debug_last_store_pc = 0x8003FEA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4229EE2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC27EAC: 03E00008 jr $ra */ - psx_delay_BFC27EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27EB0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEB0u); -#endif - if (psx_delay_BFC27EAC) { - psx_delay_BFC27EAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC27EB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27EB4u); - int psx_delay_BFC27ECC = 0; - int psx_taken_BFC27ECC = 0; - int psx_delay_BFC27EE8 = 0; - int psx_delay_BFC27EF0 = 0; - int psx_delay_BFC27F00 = 0; - int psx_delay_BFC27F08 = 0; - int psx_taken_BFC27F08 = 0; - int psx_delay_BFC27F10 = 0; - int psx_delay_BFC27F20 = 0; - int psx_delay_BFC27F28 = 0; - int psx_taken_BFC27F28 = 0; - int psx_delay_BFC27F30 = 0; - int psx_delay_BFC27F40 = 0; - int psx_delay_BFC27F48 = 0; - int psx_taken_BFC27F48 = 0; - int psx_delay_BFC27F50 = 0; - int psx_delay_BFC27F60 = 0; - int psx_delay_BFC27F68 = 0; - int psx_taken_BFC27F68 = 0; - int psx_delay_BFC27F70 = 0; - int psx_delay_BFC27F80 = 0; - int psx_delay_BFC27F88 = 0; - int psx_taken_BFC27F88 = 0; - int psx_delay_BFC27F90 = 0; - int psx_delay_BFC27FA0 = 0; - int psx_delay_BFC27FA8 = 0; - int psx_taken_BFC27FA8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC27ED4u: goto label_BFC27ED4; - case 0xBFC27EF0u: goto label_BFC27EF0; - case 0xBFC27EF8u: goto label_BFC27EF8; - case 0xBFC27F08u: goto label_BFC27F08; - case 0xBFC27F10u: goto label_BFC27F10; - case 0xBFC27F18u: goto label_BFC27F18; - case 0xBFC27F28u: goto label_BFC27F28; - case 0xBFC27F30u: goto label_BFC27F30; - case 0xBFC27F38u: goto label_BFC27F38; - case 0xBFC27F48u: goto label_BFC27F48; - case 0xBFC27F50u: goto label_BFC27F50; - case 0xBFC27F58u: goto label_BFC27F58; - case 0xBFC27F68u: goto label_BFC27F68; - case 0xBFC27F70u: goto label_BFC27F70; - case 0xBFC27F78u: goto label_BFC27F78; - case 0xBFC27F88u: goto label_BFC27F88; - case 0xBFC27F90u: goto label_BFC27F90; - case 0xBFC27F98u: goto label_BFC27F98; - case 0xBFC27FA8u: goto label_BFC27FA8; - default: break; - } - } -label_BFC27EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC27EB4: 27BDEFC8 addiu $sp, $sp, -4152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-4152)); - PGXP_ALU(0x27BDEFC8u, cpu->gpr[29], _pgx1, 0xFFFFEFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC27EB8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC27EBC: 340EE000 ori $t6, $zero, 0xE000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = cpu->gpr[0] | 0xE000u; - PGXP_ALU(0x340EE000u, cpu->gpr[14], _pgx1, 0xE000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC27EC0: 2C410007 sltiu $at, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000007u ? 1 : 0); - PGXP_ALU(0x2C410007u, cpu->gpr[1], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC27EC4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FEC4u); return; } g_debug_last_store_pc = 0x8003FEC4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC27EC8: AFAE1030 sw $t6, 4144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FEC8u); return; } g_debug_last_store_pc = 0x8003FEC8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE1030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC27ECC: 1020005F beq $at, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27ECC = cpu->gpr[1]; uint32_t psx_brB_BFC27ECC = cpu->gpr[0]; - psx_taken_BFC27ECC = (psx_brA_BFC27ECC == psx_brB_BFC27ECC); - psx_delay_BFC27ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC27ED0: AFA0002C sw $zero, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FED0u); return; } g_debug_last_store_pc = 0x8003FED0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0002Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FED0u); -#endif - if (psx_delay_BFC27ECC) { - psx_delay_BFC27ECC = 0; - if (psx_taken_BFC27ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FED4u); - } -label_BFC27ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC27ED4: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC27ED8: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC27EDC: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEE0u); -#endif - /* 0xBFC27EE0: 8C2FAD70 lw $t7, -21136($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FEE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x2u); } - PGXP_LOAD(0x8C2FAD70u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27EE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC27EE8: 01E00008 jr $t7 */ - psx_delay_BFC27EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27EEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FEECu); -#endif - if (psx_delay_BFC27EE8) { - psx_delay_BFC27EE8 = 0; - /* jump table at 0x8005AD70, 7 entries */ - switch (cpu->gpr[15]) { - case 0x8003FEF0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FEF0u); - goto label_BFC27EF0; - case 0x8003FF10u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF10u); - goto label_BFC27F10; - case 0x8003FF30u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF30u); - goto label_BFC27F30; - case 0x8003FF50u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF50u); - goto label_BFC27F50; - case 0x8003FF70u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF70u); - goto label_BFC27F70; - case 0x8003FF90u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF90u); - goto label_BFC27F90; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[15]); - cpu->pc = cpu->gpr[15]; return; - } - } -label_BFC27EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27EF0: 0C010019 jal 0xB0040064 */ - cpu->gpr[31] = 0x8003FEF8u; /* jal link before delay slot */ - psx_delay_BFC27EF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27EF4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEF4u); -#endif - if (psx_delay_BFC27EF0) { - psx_delay_BFC27EF0 = 0; - cpu->gpr[31] = 0x8003FEF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040064u); - cpu->pc = 0x80040064u; return; - } -label_BFC27EF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27EF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27EF8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27EFC: 24057FFF addiu $a1, $zero, 32767 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32767)); - PGXP_ALU(0x24057FFFu, cpu->gpr[5], _pgx1, 0x00007FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F00: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FF08u; /* jal link before delay slot */ - psx_delay_BFC27F00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27F04: 24067FFF addiu $a2, $zero, 32767 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32767)); - PGXP_ALU(0x24067FFFu, cpu->gpr[6], _pgx1, 0x00007FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF04u); -#endif - if (psx_delay_BFC27F00) { - psx_delay_BFC27F00 = 0; - cpu->gpr[31] = 0x8003FF08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F08: 10000050 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27F08 = cpu->gpr[0]; uint32_t psx_brB_BFC27F08 = cpu->gpr[0]; - psx_taken_BFC27F08 = (psx_brA_BFC27F08 == psx_brB_BFC27F08); - psx_delay_BFC27F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FF0Cu); -#endif - if (psx_delay_BFC27F08) { - psx_delay_BFC27F08 = 0; - if (psx_taken_BFC27F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF10u); - } -label_BFC27F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F10: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8003FF18u; /* jal link before delay slot */ - psx_delay_BFC27F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F14: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF14u); -#endif - if (psx_delay_BFC27F10) { - psx_delay_BFC27F10 = 0; - cpu->gpr[31] = 0x8003FF18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC27F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F18: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27F1C: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F20: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FF28u; /* jal link before delay slot */ - psx_delay_BFC27F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27F24: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF24u); -#endif - if (psx_delay_BFC27F20) { - psx_delay_BFC27F20 = 0; - cpu->gpr[31] = 0x8003FF28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F28: 10000048 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27F28 = cpu->gpr[0]; uint32_t psx_brB_BFC27F28 = cpu->gpr[0]; - psx_taken_BFC27F28 = (psx_brA_BFC27F28 == psx_brB_BFC27F28); - psx_delay_BFC27F28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FF2Cu); -#endif - if (psx_delay_BFC27F28) { - psx_delay_BFC27F28 = 0; - if (psx_taken_BFC27F28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF30u); - } -label_BFC27F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F30: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8003FF38u; /* jal link before delay slot */ - psx_delay_BFC27F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F34: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF34u); -#endif - if (psx_delay_BFC27F30) { - psx_delay_BFC27F30 = 0; - cpu->gpr[31] = 0x8003FF38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC27F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F38: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27F3C: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F40: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FF48u; /* jal link before delay slot */ - psx_delay_BFC27F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27F44: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF44u); -#endif - if (psx_delay_BFC27F40) { - psx_delay_BFC27F40 = 0; - cpu->gpr[31] = 0x8003FF48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F48: 10000040 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27F48 = cpu->gpr[0]; uint32_t psx_brB_BFC27F48 = cpu->gpr[0]; - psx_taken_BFC27F48 = (psx_brA_BFC27F48 == psx_brB_BFC27F48); - psx_delay_BFC27F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FF4Cu); -#endif - if (psx_delay_BFC27F48) { - psx_delay_BFC27F48 = 0; - if (psx_taken_BFC27F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF50u); - } -label_BFC27F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F50: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8003FF58u; /* jal link before delay slot */ - psx_delay_BFC27F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F54: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF54u); -#endif - if (psx_delay_BFC27F50) { - psx_delay_BFC27F50 = 0; - cpu->gpr[31] = 0x8003FF58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC27F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F58: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27F5C: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F60: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FF68u; /* jal link before delay slot */ - psx_delay_BFC27F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27F64: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF64u); -#endif - if (psx_delay_BFC27F60) { - psx_delay_BFC27F60 = 0; - cpu->gpr[31] = 0x8003FF68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F68: 10000038 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27F68 = cpu->gpr[0]; uint32_t psx_brB_BFC27F68 = cpu->gpr[0]; - psx_taken_BFC27F68 = (psx_brA_BFC27F68 == psx_brB_BFC27F68); - psx_delay_BFC27F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FF6Cu); -#endif - if (psx_delay_BFC27F68) { - psx_delay_BFC27F68 = 0; - if (psx_taken_BFC27F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF70u); - } -label_BFC27F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F70: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8003FF78u; /* jal link before delay slot */ - psx_delay_BFC27F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F74: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF74u); -#endif - if (psx_delay_BFC27F70) { - psx_delay_BFC27F70 = 0; - cpu->gpr[31] = 0x8003FF78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC27F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F78: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27F7C: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F80: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FF88u; /* jal link before delay slot */ - psx_delay_BFC27F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27F84: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF84u); -#endif - if (psx_delay_BFC27F80) { - psx_delay_BFC27F80 = 0; - cpu->gpr[31] = 0x8003FF88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F88: 10000030 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27F88 = cpu->gpr[0]; uint32_t psx_brB_BFC27F88 = cpu->gpr[0]; - psx_taken_BFC27F88 = (psx_brA_BFC27F88 == psx_brB_BFC27F88); - psx_delay_BFC27F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27F8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FF8Cu); -#endif - if (psx_delay_BFC27F88) { - psx_delay_BFC27F88 = 0; - if (psx_taken_BFC27F88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FF90u); - } -label_BFC27F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27F90: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8003FF98u; /* jal link before delay slot */ - psx_delay_BFC27F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F94: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF94u); -#endif - if (psx_delay_BFC27F90) { - psx_delay_BFC27F90 = 0; - cpu->gpr[31] = 0x8003FF98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC27F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27F98: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27F9C: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27FA0: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8003FFA8u; /* jal link before delay slot */ - psx_delay_BFC27FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC27FA4: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFA4u); -#endif - if (psx_delay_BFC27FA0) { - psx_delay_BFC27FA0 = 0; - cpu->gpr[31] = 0x8003FFA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC27FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27FA8: 10000028 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC27FA8 = cpu->gpr[0]; uint32_t psx_brB_BFC27FA8 = cpu->gpr[0]; - psx_taken_BFC27FA8 = (psx_brA_BFC27FA8 == psx_brB_BFC27FA8); - psx_delay_BFC27FA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC27FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8003FFACu); -#endif - if (psx_delay_BFC27FA8) { - psx_delay_BFC27FA8 = 0; - if (psx_taken_BFC27FA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - cpu->pc = 0x8004004Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FFB0u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FFB0u); - cpu->pc = 0x8003FFB0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC27FB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC27FB0u); - int psx_delay_BFC27FD4 = 0; - int psx_taken_BFC27FD4 = 0; - int psx_delay_BFC27FE4 = 0; - int psx_delay_BFC28004 = 0; - int psx_delay_BFC28010 = 0; - int psx_delay_BFC2801C = 0; - int psx_taken_BFC2801C = 0; - int psx_delay_BFC28024 = 0; - int psx_delay_BFC28034 = 0; - int psx_delay_BFC28044 = 0; - int psx_taken_BFC28044 = 0; - int psx_delay_BFC2804C = 0; - int psx_delay_BFC2805C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2804Cu: goto label_BFC2804C; - case 0xBFC27FC4u: goto label_BFC27FC4; - case 0xBFC27FDCu: goto label_BFC27FDC; - case 0xBFC27FECu: goto label_BFC27FEC; - case 0xBFC27FF8u: goto label_BFC27FF8; - case 0xBFC2800Cu: goto label_BFC2800C; - case 0xBFC28018u: goto label_BFC28018; - case 0xBFC28024u: goto label_BFC28024; - case 0xBFC2802Cu: goto label_BFC2802C; - case 0xBFC2803Cu: goto label_BFC2803C; - case 0xBFC28054u: goto label_BFC28054; - default: break; - } - } -label_BFC27FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27FB0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27FB4: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFB4u); return; } g_debug_last_store_pc = 0x8003FFB4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC27FB8: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFB8u); return; } g_debug_last_store_pc = 0x8003FFB8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC27FBC: 27A32038 addiu $v1, $sp, 8248 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (8248)); - PGXP_ALU(0x27A32038u, cpu->gpr[3], _pgx1, 0x00002038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC27FC0: 27A21038 addiu $v0, $sp, 4152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (4152)); - PGXP_ALU(0x27A21038u, cpu->gpr[2], _pgx1, 0x00001038u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFC0u); -#endif -label_BFC27FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27FC4: AC40EFF8 sw $zero, -4104($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFC4u); return; } g_debug_last_store_pc = 0x8003FFC4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40EFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC27FC8: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27FCC: AC40EFEC sw $zero, -4116($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFCCu); return; } g_debug_last_store_pc = 0x8003FFCCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40EFECu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27FD0: AC40EFF0 sw $zero, -4112($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFD0u); return; } g_debug_last_store_pc = 0x8003FFD0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40EFF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC27FD4: 1443FFFB bne $v0, $v1, 0xBFC27FC4 */ - uint32_t psx_brA_BFC27FD4 = cpu->gpr[2]; uint32_t psx_brB_BFC27FD4 = cpu->gpr[3]; - psx_taken_BFC27FD4 = (psx_brA_BFC27FD4 != psx_brB_BFC27FD4); - psx_delay_BFC27FD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC27FD8: AC40EFF4 sw $zero, -4108($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFD8u); return; } g_debug_last_store_pc = 0x8003FFD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40EFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFD8u); -#endif - if (psx_delay_BFC27FD4) { - psx_delay_BFC27FD4 = 0; - if (psx_taken_BFC27FD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FFC4u); - goto label_BFC27FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FFDCu); - } -label_BFC27FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27FDC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC27FE0: 24050021 addiu $a1, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24050021u, cpu->gpr[5], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC27FE4: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x8003FFECu; /* jal link before delay slot */ - psx_delay_BFC27FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC27FE8: 27A6002C addiu $a2, $sp, 44 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (44)); - PGXP_ALU(0x27A6002Cu, cpu->gpr[6], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFE8u); -#endif - if (psx_delay_BFC27FE4) { - psx_delay_BFC27FE4 = 0; - cpu->gpr[31] = 0x8003FFECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC27FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC27FEC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC27FF0: 3410E000 ori $s0, $zero, 0xE000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] | 0xE000u; - PGXP_ALU(0x3410E000u, cpu->gpr[16], _pgx1, 0xE000u); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC27FF4: 3C110001 lui $s1, 0x1 */ - cpu->gpr[17] = 0x00010000u; - PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8003FFF4u); -#endif -label_BFC27FF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC27FF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC27FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8003FFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC27FF8: AFB01030 sw $s0, 4144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003FFF8u); return; } g_debug_last_store_pc = 0x8003FFF8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB01030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC27FFC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8003FFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28000: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80040000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28004: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x8004000Cu; /* jal link before delay slot */ - psx_delay_BFC28004 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC28008: 27A61030 addiu $a2, $sp, 4144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (4144)); - PGXP_ALU(0x27A61030u, cpu->gpr[6], _pgx1, 0x00001030u); } -#ifdef PSX_COSIM - cosim_instr(0x80040008u); -#endif - if (psx_delay_BFC28004) { - psx_delay_BFC28004 = 0; - cpu->gpr[31] = 0x8004000Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC2800C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2800Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2800Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004000Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2800C: 27A40030 addiu $a0, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27A40030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004000Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28010: 0C01510A jal 0xB0054428 */ - cpu->gpr[31] = 0x80040018u; /* jal link before delay slot */ - psx_delay_BFC28010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28014: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80040014u); -#endif - if (psx_delay_BFC28010) { - psx_delay_BFC28010 = 0; - cpu->gpr[31] = 0x80040018u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054428u); - cpu->pc = 0x80054428u; return; - } -label_BFC28018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC28018: 26100200 addiu $s0, $s0, 512 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (512)); - PGXP_ALU(0x26100200u, cpu->gpr[16], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80040018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC2801C: 1611FFF6 bne $s0, $s1, 0xBFC27FF8 */ - uint32_t psx_brA_BFC2801C = cpu->gpr[16]; uint32_t psx_brB_BFC2801C = cpu->gpr[17]; - psx_taken_BFC2801C = (psx_brA_BFC2801C != psx_brB_BFC2801C); - psx_delay_BFC2801C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040020u); -#endif - if (psx_delay_BFC2801C) { - psx_delay_BFC2801C = 0; - if (psx_taken_BFC2801C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FFF8u); - goto label_BFC27FF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040024u); - } -label_BFC28024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28024: 0C014F6E jal 0xB0053DB8 */ - cpu->gpr[31] = 0x8004002Cu; /* jal link before delay slot */ - psx_delay_BFC28024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28028: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80040028u); -#endif - if (psx_delay_BFC28024) { - psx_delay_BFC28024 = 0; - cpu->gpr[31] = 0x8004002Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DB8u); - cpu->pc = 0x80053DB8u; return; - } -label_BFC2802C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2802Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2802Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2802C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28030: 24053FFF addiu $a1, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24053FFFu, cpu->gpr[5], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28034: 0C014FFC jal 0xB0053FF0 */ - cpu->gpr[31] = 0x8004003Cu; /* jal link before delay slot */ - psx_delay_BFC28034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28038: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040038u); -#endif - if (psx_delay_BFC28034) { - psx_delay_BFC28034 = 0; - cpu->gpr[31] = 0x8004003Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FF0u); - cpu->pc = 0x80053FF0u; return; - } -label_BFC2803C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2803Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2803Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004003Cu); -#endif - /* 0xBFC2803C: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004003Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040040u); -#endif - /* 0xBFC28040: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040040u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80040040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28044: 10000001 beq $zero, $zero, 0xBFC2804C */ - uint32_t psx_brA_BFC28044 = cpu->gpr[0]; uint32_t psx_brB_BFC28044 = cpu->gpr[0]; - psx_taken_BFC28044 = (psx_brA_BFC28044 == psx_brB_BFC28044); - psx_delay_BFC28044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040048u); -#endif - if (psx_delay_BFC28044) { - psx_delay_BFC28044 = 0; - if (psx_taken_BFC28044) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - goto label_BFC2804C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004004Cu); - } -label_BFC2804C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2804Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2804Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004004Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2804C: 0C014F5E jal 0xB0053D78 */ - cpu->gpr[31] = 0x80040054u; /* jal link before delay slot */ - psx_delay_BFC2804C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040050u); -#endif - if (psx_delay_BFC2804C) { - psx_delay_BFC2804C = 0; - cpu->gpr[31] = 0x80040054u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053D78u); - cpu->pc = 0x80053D78u; return; - } -label_BFC28054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040054u); -#endif - /* 0xBFC28054: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040054u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28058: 27BD1038 addiu $sp, $sp, 4152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (4152)); - PGXP_ALU(0x27BD1038u, cpu->gpr[29], _pgx1, 0x00001038u); } -#ifdef PSX_COSIM - cosim_instr(0x80040058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2805C: 03E00008 jr $ra */ - psx_delay_BFC2805C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040060u); -#endif - if (psx_delay_BFC2805C) { - psx_delay_BFC2805C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC28064(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC28064u); - int psx_delay_BFC28074 = 0; - int psx_delay_BFC28084 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2807Cu: goto label_BFC2807C; - default: break; - } - } -label_BFC28064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28064: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28068: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2806C: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004006Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC28070: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040070u); return; } g_debug_last_store_pc = 0x80040070u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28074: 0C014F86 jal 0xB0053E18 */ - cpu->gpr[31] = 0x8004007Cu; /* jal link before delay slot */ - psx_delay_BFC28074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC28078: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040078u); -#endif - if (psx_delay_BFC28074) { - psx_delay_BFC28074 = 0; - cpu->gpr[31] = 0x8004007Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E18u); - cpu->pc = 0x80053E18u; return; - } -label_BFC2807C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2807Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2807Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004007Cu); -#endif - /* 0xBFC2807C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004007Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004007Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28080: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80040080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC28084: 03E00008 jr $ra */ - psx_delay_BFC28084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040088u); -#endif - if (psx_delay_BFC28084) { - psx_delay_BFC28084 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC282E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC282E8u); - int psx_delay_BFC282F4 = 0; - int psx_taken_BFC282F4 = 0; - int psx_delay_BFC2831C = 0; - int psx_delay_BFC28344 = 0; - int psx_delay_BFC2834C = 0; - int psx_delay_BFC28368 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC282FCu: goto label_BFC282FC; - case 0xBFC28324u: goto label_BFC28324; - case 0xBFC2834Cu: goto label_BFC2834C; - case 0xBFC28354u: goto label_BFC28354; - case 0xBFC28360u: goto label_BFC28360; - default: break; - } - } -label_BFC282E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC282E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC282E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800402E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC282E8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800402E8u); -#endif - /* 0xBFC282EC: 85CE9EE8 lh $t6, -24856($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24856)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800402ECu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CE9EE8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800402ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800402F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC282F0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800402F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC282F4: 15C0001A bne $t6, $zero, 0xBFC28360 */ - uint32_t psx_brA_BFC282F4 = cpu->gpr[14]; uint32_t psx_brB_BFC282F4 = cpu->gpr[0]; - psx_taken_BFC282F4 = (psx_brA_BFC282F4 != psx_brB_BFC282F4); - psx_delay_BFC282F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC282F8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800402F8u); return; } g_debug_last_store_pc = 0x800402F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800402F8u); -#endif - if (psx_delay_BFC282F4) { - psx_delay_BFC282F4 = 0; - if (psx_taken_BFC282F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040360u); - goto label_BFC28360; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800402FCu); - } -label_BFC282FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC282FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC282FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800402FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC282FC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800402FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040300u); -#endif - /* 0xBFC28300: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040300u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC28304: 240F007F addiu $t7, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x240F007Fu, cpu->gpr[15], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80040304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC28308: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80040308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2830C: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004030Cu); return; } g_debug_last_store_pc = 0x8004030Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC28310: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040310u); return; } g_debug_last_store_pc = 0x80040310u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28314: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28318: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2831C: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x80040324u; /* jal link before delay slot */ - psx_delay_BFC2831C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28320: 2407001F addiu $a3, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2407001Fu, cpu->gpr[7], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80040320u); -#endif - if (psx_delay_BFC2831C) { - psx_delay_BFC2831C = 0; - cpu->gpr[31] = 0x80040324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC28324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC28324: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040324u); -#endif - /* 0xBFC28328: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040328u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2832C: 2419003C addiu $t9, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2419003Cu, cpu->gpr[25], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004032Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC28330: 24080040 addiu $t0, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24080040u, cpu->gpr[8], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80040330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC28334: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040334u); return; } g_debug_last_store_pc = 0x80040334u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80040334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC28338: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040338u); return; } g_debug_last_store_pc = 0x80040338u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2833C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004033Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28340: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28344: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x8004034Cu; /* jal link before delay slot */ - psx_delay_BFC28344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28348: 24070024 addiu $a3, $zero, 36 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); - PGXP_ALU(0x24070024u, cpu->gpr[7], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80040348u); -#endif - if (psx_delay_BFC28344) { - psx_delay_BFC28344 = 0; - cpu->gpr[31] = 0x8004034Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC2834C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2834Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2834Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004034Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2834C: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x80040354u; /* jal link before delay slot */ - psx_delay_BFC2834C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28350: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040350u); -#endif - if (psx_delay_BFC2834C) { - psx_delay_BFC2834C = 0; - cpu->gpr[31] = 0x80040354u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC28354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC28354: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28358: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2835C: A4299EE8 sh $t1, -24856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24856)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004035Cu); return; } g_debug_last_store_pc = 0x8004035Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4299EE8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004035Cu); -#endif -label_BFC28360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040360u); -#endif - /* 0xBFC28360: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040360u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28364: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80040364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC28368: 03E00008 jr $ra */ - psx_delay_BFC28368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2836C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004036Cu); -#endif - if (psx_delay_BFC28368) { - psx_delay_BFC28368 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC28370(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC28370u); - int psx_delay_BFC28380 = 0; - int psx_taken_BFC28380 = 0; - int psx_delay_BFC283A4 = 0; - int psx_delay_BFC283C8 = 0; - int psx_delay_BFC283D0 = 0; - int psx_delay_BFC283E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC28388u: goto label_BFC28388; - case 0xBFC283ACu: goto label_BFC283AC; - case 0xBFC283D0u: goto label_BFC283D0; - case 0xBFC283D8u: goto label_BFC283D8; - case 0xBFC283E0u: goto label_BFC283E0; - default: break; - } - } -label_BFC28370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28370: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040370u); -#endif - /* 0xBFC28374: 85CE9EE8 lh $t6, -24856($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24856)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040374u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CE9EE8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80040374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28378: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2837C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004037Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC28380: 15C10017 bne $t6, $at, 0xBFC283E0 */ - uint32_t psx_brA_BFC28380 = cpu->gpr[14]; uint32_t psx_brB_BFC28380 = cpu->gpr[1]; - psx_taken_BFC28380 = (psx_brA_BFC28380 != psx_brB_BFC28380); - psx_delay_BFC28380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC28384: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040384u); return; } g_debug_last_store_pc = 0x80040384u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040384u); -#endif - if (psx_delay_BFC28380) { - psx_delay_BFC28380 = 0; - if (psx_taken_BFC28380) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800403E0u); - goto label_BFC283E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040388u); - } -label_BFC28388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC28388: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040388u); -#endif - /* 0xBFC2838C: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004038Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004038Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC28390: 240F0040 addiu $t7, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240F0040u, cpu->gpr[15], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80040390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC28394: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040394u); return; } g_debug_last_store_pc = 0x80040394u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28398: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2839C: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004039Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC283A0: 2407001F addiu $a3, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2407001Fu, cpu->gpr[7], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800403A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC283A4: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x800403ACu; /* jal link before delay slot */ - psx_delay_BFC283A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC283A8: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800403A8u); return; } g_debug_last_store_pc = 0x800403A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800403A8u); -#endif - if (psx_delay_BFC283A4) { - psx_delay_BFC283A4 = 0; - cpu->gpr[31] = 0x800403ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC283AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC283AC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800403ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403B0u); -#endif - /* 0xBFC283B0: 84A59EE2 lh $a1, -24862($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -24862; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-24862)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800403B0u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A59EE2u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800403B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC283B4: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800403B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC283B8: AFB80014 sw $t8, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800403B8u); return; } g_debug_last_store_pc = 0x800403B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800403B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC283BC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800403BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC283C0: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800403C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC283C4: 24070024 addiu $a3, $zero, 36 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); - PGXP_ALU(0x24070024u, cpu->gpr[7], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x800403C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC283C8: 0C014B5A jal 0xB0052D68 */ - cpu->gpr[31] = 0x800403D0u; /* jal link before delay slot */ - psx_delay_BFC283C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC283CC: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800403CCu); return; } g_debug_last_store_pc = 0x800403CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800403CCu); -#endif - if (psx_delay_BFC283C8) { - psx_delay_BFC283C8 = 0; - cpu->gpr[31] = 0x800403D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052D68u); - cpu->pc = 0x80052D68u; return; - } -label_BFC283D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC283D0: 0C014F9B jal 0xB0053E6C */ - cpu->gpr[31] = 0x800403D8u; /* jal link before delay slot */ - psx_delay_BFC283D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC283D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800403D4u); -#endif - if (psx_delay_BFC283D0) { - psx_delay_BFC283D0 = 0; - cpu->gpr[31] = 0x800403D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E6Cu); - cpu->pc = 0x80053E6Cu; return; - } -label_BFC283D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC283D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800403D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC283DC: A4209EE8 sh $zero, -24856($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24856)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800403DCu); return; } g_debug_last_store_pc = 0x800403DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209EE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800403DCu); -#endif -label_BFC283E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403E0u); -#endif - /* 0xBFC283E0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800403E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800403E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC283E4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800403E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC283E8: 03E00008 jr $ra */ - psx_delay_BFC283E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC283EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800403ECu); -#endif - if (psx_delay_BFC283E8) { - psx_delay_BFC283E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC283F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC283F0u); - int psx_delay_BFC283F0 = 0; - int psx_taken_BFC283F0 = 0; - int psx_delay_BFC28410 = 0; - int psx_taken_BFC28410 = 0; - int psx_delay_BFC28418 = 0; - int psx_taken_BFC28418 = 0; - int psx_delay_BFC2843C = 0; - int psx_taken_BFC2843C = 0; - int psx_delay_BFC28454 = 0; - int psx_taken_BFC28454 = 0; - int psx_delay_BFC28478 = 0; - int psx_taken_BFC28478 = 0; - int psx_delay_BFC28480 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC283F8u: goto label_BFC283F8; - case 0xBFC2840Cu: goto label_BFC2840C; - case 0xBFC28418u: goto label_BFC28418; - case 0xBFC28420u: goto label_BFC28420; - case 0xBFC28424u: goto label_BFC28424; - case 0xBFC28444u: goto label_BFC28444; - case 0xBFC28450u: goto label_BFC28450; - case 0xBFC2845Cu: goto label_BFC2845C; - case 0xBFC28480u: goto label_BFC28480; - default: break; - } - } -label_BFC283F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC283F0: 10800023 beq $a0, $zero, 0xBFC28480 */ - uint32_t psx_brA_BFC283F0 = cpu->gpr[4]; uint32_t psx_brB_BFC283F0 = cpu->gpr[0]; - psx_taken_BFC283F0 = (psx_brA_BFC283F0 == psx_brB_BFC283F0); - psx_delay_BFC283F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC283F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800403F4u); -#endif - if (psx_delay_BFC283F0) { - psx_delay_BFC283F0 = 0; - if (psx_taken_BFC283F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040480u); - goto label_BFC28480; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800403F8u); - } -label_BFC283F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC283F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC283F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800403F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC283F8: 3C038007 lui $v1, 0x8007 */ - cpu->gpr[3] = 0x80070000u; - PGXP_ALU(0x3C038007u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800403F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC283FC: 24634A40 addiu $v1, $v1, 19008 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19008)); - PGXP_ALU(0x24634A40u, cpu->gpr[3], _pgx1, 0x00004A40u); } -#ifdef PSX_COSIM - cosim_instr(0x800403FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28400: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28404: 2404270F addiu $a0, $zero, 9999 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (9999)); - PGXP_ALU(0x2404270Fu, cpu->gpr[4], _pgx1, 0x0000270Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80040404u); -#endif - /* 0xBFC28408: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040408u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80040408u); -#endif -label_BFC2840C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2840Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2840Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2840C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC28410: 14440004 bne $v0, $a0, 0xBFC28424 */ - uint32_t psx_brA_BFC28410 = cpu->gpr[2]; uint32_t psx_brB_BFC28410 = cpu->gpr[4]; - psx_taken_BFC28410 = (psx_brA_BFC28410 != psx_brB_BFC28410); - psx_delay_BFC28410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC28414: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040414u); -#endif - if (psx_delay_BFC28410) { - psx_delay_BFC28410 = 0; - if (psx_taken_BFC28410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040424u); - goto label_BFC28424; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040418u); - } -label_BFC28418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28418: 1000000A beq $zero, $zero, 0xBFC28444 */ - uint32_t psx_brA_BFC28418 = cpu->gpr[0]; uint32_t psx_brB_BFC28418 = cpu->gpr[0]; - psx_taken_BFC28418 = (psx_brA_BFC28418 == psx_brB_BFC28418); - psx_delay_BFC28418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2841C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004041Cu); -#endif - if (psx_delay_BFC28418) { - psx_delay_BFC28418 = 0; - if (psx_taken_BFC28418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040444u); - goto label_BFC28444; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040420u); - } -label_BFC28420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC28420: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040420u); -#endif -label_BFC28424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC28424: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28428: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80040428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2842C: 01C1001B divu $t6, $at */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8004042Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC28430: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80040430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28434: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC28438: AC6FFFF8 sw $t7, -8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040438u); return; } g_debug_last_store_pc = 0x80040438u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6FFFF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2843C: 1000FFF3 beq $zero, $zero, 0xBFC2840C */ - uint32_t psx_brA_BFC2843C = cpu->gpr[0]; uint32_t psx_brB_BFC2843C = cpu->gpr[0]; - psx_taken_BFC2843C = (psx_brA_BFC2843C == psx_brB_BFC2843C); - psx_delay_BFC2843C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040440u); -#endif - /* 0xBFC28440: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040440u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80040440u); -#endif - if (psx_delay_BFC2843C) { - psx_delay_BFC2843C = 0; - if (psx_taken_BFC2843C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004040Cu); - goto label_BFC2840C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040444u); - } -label_BFC28444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC28444: 3C038007 lui $v1, 0x8007 */ - cpu->gpr[3] = 0x80070000u; - PGXP_ALU(0x3C038007u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC28448: 24634B88 addiu $v1, $v1, 19336 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19336)); - PGXP_ALU(0x24634B88u, cpu->gpr[3], _pgx1, 0x00004B88u); } -#ifdef PSX_COSIM - cosim_instr(0x80040448u); -#endif - /* 0xBFC2844C: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004044Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004044Cu); -#endif -label_BFC28450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC28454: 1044000A beq $v0, $a0, 0xBFC28480 */ - uint32_t psx_brA_BFC28454 = cpu->gpr[2]; uint32_t psx_brB_BFC28454 = cpu->gpr[4]; - psx_taken_BFC28454 = (psx_brA_BFC28454 == psx_brB_BFC28454); - psx_delay_BFC28454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040458u); -#endif - if (psx_delay_BFC28454) { - psx_delay_BFC28454 = 0; - if (psx_taken_BFC28454) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040480u); - goto label_BFC28480; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004045Cu); - } -label_BFC2845C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2845Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2845C: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC28460: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28464: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80040464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC28468: 0301001B divu $t8, $at */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0301001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80040468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2846C: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004046Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28470: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC28474: AC79FFF8 sw $t9, -8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040474u); return; } g_debug_last_store_pc = 0x80040474u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79FFF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28478: 1000FFF5 beq $zero, $zero, 0xBFC28450 */ - uint32_t psx_brA_BFC28478 = cpu->gpr[0]; uint32_t psx_brB_BFC28478 = cpu->gpr[0]; - psx_taken_BFC28478 = (psx_brA_BFC28478 == psx_brB_BFC28478); - psx_delay_BFC28478 = 1; - /* 0xBFC2847C: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004047Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004047Cu); -#endif - if (psx_delay_BFC28478) { - psx_delay_BFC28478 = 0; - if (psx_taken_BFC28478) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040450u); - goto label_BFC28450; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040480u); - } -label_BFC28480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC28480: 03E00008 jr $ra */ - psx_delay_BFC28480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28484: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040484u); -#endif - if (psx_delay_BFC28480) { - psx_delay_BFC28480 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC28490(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC28490u); - int psx_delay_BFC284A4 = 0; - int psx_delay_BFC284AC = 0; - int psx_taken_BFC284AC = 0; - int psx_delay_BFC284B8 = 0; - int psx_taken_BFC284B8 = 0; - int psx_delay_BFC284C0 = 0; - int psx_delay_BFC284C8 = 0; - int psx_taken_BFC284C8 = 0; - int psx_delay_BFC284D0 = 0; - int psx_taken_BFC284D0 = 0; - int psx_delay_BFC284E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC284ACu: goto label_BFC284AC; - case 0xBFC284B4u: goto label_BFC284B4; - case 0xBFC284C0u: goto label_BFC284C0; - case 0xBFC284C8u: goto label_BFC284C8; - case 0xBFC284D0u: goto label_BFC284D0; - case 0xBFC284D8u: goto label_BFC284D8; - case 0xBFC284DCu: goto label_BFC284DC; - default: break; - } - } -label_BFC28490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28490: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC28494: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040494u); return; } g_debug_last_store_pc = 0x80040494u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80040494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC28498: 00048C00 sll $s1, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00048C00u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2849C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004049Cu); return; } g_debug_last_store_pc = 0x8004049Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004049Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC284A0: 00118C03 sra $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 16u); - PGXP_ALU(0x00118C03u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800404A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC284A4: 0C01013C jal 0xB00404F0 */ - cpu->gpr[31] = 0x800404ACu; /* jal link before delay slot */ - psx_delay_BFC284A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC284A8: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404A8u); return; } g_debug_last_store_pc = 0x800404A8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800404A8u); -#endif - if (psx_delay_BFC284A4) { - psx_delay_BFC284A4 = 0; - cpu->gpr[31] = 0x800404ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404F0u); - cpu->pc = 0x800404F0u; return; - } -label_BFC284AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC284AC: 1440000B bne $v0, $zero, 0xBFC284DC */ - uint32_t psx_brA_BFC284AC = cpu->gpr[2]; uint32_t psx_brB_BFC284AC = cpu->gpr[0]; - psx_taken_BFC284AC = (psx_brA_BFC284AC != psx_brB_BFC284AC); - psx_delay_BFC284AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404B0u); -#endif - /* 0xBFC284B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800404B0u); -#endif - if (psx_delay_BFC284AC) { - psx_delay_BFC284AC = 0; - if (psx_taken_BFC284AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404DCu); - goto label_BFC284DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404B4u); - } -label_BFC284B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC284B4: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800404B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC284B8: 16300008 bne $s1, $s0, 0xBFC284DC */ - uint32_t psx_brA_BFC284B8 = cpu->gpr[17]; uint32_t psx_brB_BFC284B8 = cpu->gpr[16]; - psx_taken_BFC284B8 = (psx_brA_BFC284B8 != psx_brB_BFC284B8); - psx_delay_BFC284B8 = 1; - /* 0xBFC284BC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800404BCu); -#endif - if (psx_delay_BFC284B8) { - psx_delay_BFC284B8 = 0; - if (psx_taken_BFC284B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404DCu); - goto label_BFC284DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404C0u); - } -label_BFC284C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC284C0: 0C01013C jal 0xB00404F0 */ - cpu->gpr[31] = 0x800404C8u; /* jal link before delay slot */ - psx_delay_BFC284C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC284C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800404C4u); -#endif - if (psx_delay_BFC284C0) { - psx_delay_BFC284C0 = 0; - cpu->gpr[31] = 0x800404C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404F0u); - cpu->pc = 0x800404F0u; return; - } -label_BFC284C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC284C8: 14400004 bne $v0, $zero, 0xBFC284DC */ - uint32_t psx_brA_BFC284C8 = cpu->gpr[2]; uint32_t psx_brB_BFC284C8 = cpu->gpr[0]; - psx_taken_BFC284C8 = (psx_brA_BFC284C8 != psx_brB_BFC284C8); - psx_delay_BFC284C8 = 1; - /* 0xBFC284CC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800404CCu); -#endif - if (psx_delay_BFC284C8) { - psx_delay_BFC284C8 = 0; - if (psx_taken_BFC284C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404DCu); - goto label_BFC284DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404D0u); - } -label_BFC284D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC284D0: 1230FFFB beq $s1, $s0, 0xBFC284C0 */ - uint32_t psx_brA_BFC284D0 = cpu->gpr[17]; uint32_t psx_brB_BFC284D0 = cpu->gpr[16]; - psx_taken_BFC284D0 = (psx_brA_BFC284D0 == psx_brB_BFC284D0); - psx_delay_BFC284D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC284D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800404D4u); -#endif - if (psx_delay_BFC284D0) { - psx_delay_BFC284D0 = 0; - if (psx_taken_BFC284D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404C0u); - goto label_BFC284C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800404D8u); - } -label_BFC284D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404D8u); -#endif - /* 0xBFC284D8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800404D8u); -#endif -label_BFC284DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404DCu); -#endif - /* 0xBFC284DC: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800404DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404E0u); -#endif - /* 0xBFC284E0: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404E0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800404E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC284E4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800404E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC284E8: 03E00008 jr $ra */ - psx_delay_BFC284E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC284EC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800404ECu); -#endif - if (psx_delay_BFC284E8) { - psx_delay_BFC284E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC284F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC284F0u); - int psx_delay_BFC284FC = 0; - int psx_delay_BFC2850C = 0; - int psx_delay_BFC28514 = 0; - int psx_delay_BFC28524 = 0; - int psx_delay_BFC28534 = 0; - int psx_delay_BFC2853C = 0; - int psx_delay_BFC28560 = 0; - int psx_delay_BFC28570 = 0; - int psx_delay_BFC28578 = 0; - int psx_delay_BFC2858C = 0; - int psx_taken_BFC2858C = 0; - int psx_delay_BFC2859C = 0; - int psx_delay_BFC285B0 = 0; - int psx_taken_BFC285B0 = 0; - int psx_delay_BFC285B8 = 0; - int psx_taken_BFC285B8 = 0; - int psx_delay_BFC285C4 = 0; - int psx_taken_BFC285C4 = 0; - int psx_delay_BFC285D4 = 0; - int psx_delay_BFC285E8 = 0; - int psx_taken_BFC285E8 = 0; - int psx_delay_BFC285F0 = 0; - int psx_taken_BFC285F0 = 0; - int psx_delay_BFC28608 = 0; - int psx_taken_BFC28608 = 0; - int psx_delay_BFC28618 = 0; - int psx_delay_BFC28620 = 0; - int psx_delay_BFC28634 = 0; - int psx_taken_BFC28634 = 0; - int psx_delay_BFC2863C = 0; - int psx_taken_BFC2863C = 0; - int psx_delay_BFC28648 = 0; - int psx_taken_BFC28648 = 0; - int psx_delay_BFC28658 = 0; - int psx_taken_BFC28658 = 0; - int psx_delay_BFC2866C = 0; - int psx_delay_BFC28674 = 0; - int psx_delay_BFC28680 = 0; - int psx_taken_BFC28680 = 0; - int psx_delay_BFC286BC = 0; - int psx_delay_BFC286F4 = 0; - int psx_delay_BFC2872C = 0; - int psx_delay_BFC28734 = 0; - int psx_taken_BFC28734 = 0; - int psx_delay_BFC28748 = 0; - int psx_delay_BFC28780 = 0; - int psx_delay_BFC287B8 = 0; - int psx_delay_BFC287F0 = 0; - int psx_delay_BFC28800 = 0; - int psx_delay_BFC28808 = 0; - int psx_delay_BFC28810 = 0; - int psx_delay_BFC28818 = 0; - int psx_delay_BFC2882C = 0; - int psx_taken_BFC2882C = 0; - int psx_delay_BFC28834 = 0; - int psx_taken_BFC28834 = 0; - int psx_delay_BFC28840 = 0; - int psx_taken_BFC28840 = 0; - int psx_delay_BFC28854 = 0; - int psx_taken_BFC28854 = 0; - int psx_delay_BFC28864 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC28504u: goto label_BFC28504; - case 0xBFC28514u: goto label_BFC28514; - case 0xBFC2851Cu: goto label_BFC2851C; - case 0xBFC2852Cu: goto label_BFC2852C; - case 0xBFC2853Cu: goto label_BFC2853C; - case 0xBFC28544u: goto label_BFC28544; - case 0xBFC28568u: goto label_BFC28568; - case 0xBFC28578u: goto label_BFC28578; - case 0xBFC28580u: goto label_BFC28580; - case 0xBFC28594u: goto label_BFC28594; - case 0xBFC285A4u: goto label_BFC285A4; - case 0xBFC285B8u: goto label_BFC285B8; - case 0xBFC285C0u: goto label_BFC285C0; - case 0xBFC285C4u: goto label_BFC285C4; - case 0xBFC285CCu: goto label_BFC285CC; - case 0xBFC285D0u: goto label_BFC285D0; - case 0xBFC285DCu: goto label_BFC285DC; - case 0xBFC285F0u: goto label_BFC285F0; - case 0xBFC285F8u: goto label_BFC285F8; - case 0xBFC285FCu: goto label_BFC285FC; - case 0xBFC28610u: goto label_BFC28610; - case 0xBFC28614u: goto label_BFC28614; - case 0xBFC28620u: goto label_BFC28620; - case 0xBFC28628u: goto label_BFC28628; - case 0xBFC2863Cu: goto label_BFC2863C; - case 0xBFC28644u: goto label_BFC28644; - case 0xBFC28648u: goto label_BFC28648; - case 0xBFC28650u: goto label_BFC28650; - case 0xBFC28654u: goto label_BFC28654; - case 0xBFC28660u: goto label_BFC28660; - case 0xBFC28674u: goto label_BFC28674; - case 0xBFC2867Cu: goto label_BFC2867C; - case 0xBFC28688u: goto label_BFC28688; - case 0xBFC2868Cu: goto label_BFC2868C; - case 0xBFC286C4u: goto label_BFC286C4; - case 0xBFC286FCu: goto label_BFC286FC; - case 0xBFC28734u: goto label_BFC28734; - case 0xBFC2873Cu: goto label_BFC2873C; - case 0xBFC28750u: goto label_BFC28750; - case 0xBFC28788u: goto label_BFC28788; - case 0xBFC287C0u: goto label_BFC287C0; - case 0xBFC287F8u: goto label_BFC287F8; - case 0xBFC287FCu: goto label_BFC287FC; - case 0xBFC28808u: goto label_BFC28808; - case 0xBFC28810u: goto label_BFC28810; - case 0xBFC28818u: goto label_BFC28818; - case 0xBFC28820u: goto label_BFC28820; - case 0xBFC28834u: goto label_BFC28834; - case 0xBFC2883Cu: goto label_BFC2883C; - case 0xBFC28840u: goto label_BFC28840; - case 0xBFC28848u: goto label_BFC28848; - case 0xBFC2884Cu: goto label_BFC2884C; - case 0xBFC2885Cu: goto label_BFC2885C; - case 0xBFC28860u: goto label_BFC28860; - default: break; - } - } -label_BFC284F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC284F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC284F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800404F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC284F0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800404F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC284F4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404F4u); return; } g_debug_last_store_pc = 0x800404F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800404F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC284F8: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800404F8u); return; } g_debug_last_store_pc = 0x800404F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800404F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC284FC: 0C011C84 jal 0xB0047210 */ - cpu->gpr[31] = 0x80040504u; /* jal link before delay slot */ - psx_delay_BFC284FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28500: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040500u); -#endif - if (psx_delay_BFC284FC) { - psx_delay_BFC284FC = 0; - cpu->gpr[31] = 0x80040504u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047210u); - cpu->pc = 0x80047210u; return; - } -label_BFC28504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28504: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28508: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2850C: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x80040514u; /* jal link before delay slot */ - psx_delay_BFC2850C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28510: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040510u); -#endif - if (psx_delay_BFC2850C) { - psx_delay_BFC2850C = 0; - cpu->gpr[31] = 0x80040514u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC28514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28514: 0C011E17 jal 0xB004785C */ - cpu->gpr[31] = 0x8004051Cu; /* jal link before delay slot */ - psx_delay_BFC28514 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28518: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040518u); -#endif - if (psx_delay_BFC28514) { - psx_delay_BFC28514 = 0; - cpu->gpr[31] = 0x8004051Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004785Cu); - cpu->pc = 0x8004785Cu; return; - } -label_BFC2851C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2851Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004051Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2851C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004051Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040520u); -#endif - /* 0xBFC28520: 84848028 lh $a0, -32728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -32728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-32728)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040520u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x84848028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80040520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28524: 0C011C84 jal 0xB0047210 */ - cpu->gpr[31] = 0x8004052Cu; /* jal link before delay slot */ - psx_delay_BFC28524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040528u); -#endif - if (psx_delay_BFC28524) { - psx_delay_BFC28524 = 0; - cpu->gpr[31] = 0x8004052Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047210u); - cpu->pc = 0x80047210u; return; - } -label_BFC2852C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2852Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004052Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2852C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004052Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28530: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28534: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x8004053Cu; /* jal link before delay slot */ - psx_delay_BFC28534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28538: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040538u); -#endif - if (psx_delay_BFC28534) { - psx_delay_BFC28534 = 0; - cpu->gpr[31] = 0x8004053Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC2853C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2853Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004053Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2853C: 0C011E17 jal 0xB004785C */ - cpu->gpr[31] = 0x80040544u; /* jal link before delay slot */ - psx_delay_BFC2853C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28540: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040540u); -#endif - if (psx_delay_BFC2853C) { - psx_delay_BFC2853C = 0; - cpu->gpr[31] = 0x80040544u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004785Cu); - cpu->pc = 0x8004785Cu; return; - } -label_BFC28544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC28544: 240E0046 addiu $t6, $zero, 70 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (70)); - PGXP_ALU(0x240E0046u, cpu->gpr[14], _pgx1, 0x00000046u); } -#ifdef PSX_COSIM - cosim_instr(0x80040544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28548: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2854C: A42E8024 sh $t6, -32732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -32732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-32732)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004054Cu); return; } g_debug_last_store_pc = 0x8004054Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42E8024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004054Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28550: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28554: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC28558: 240F0100 addiu $t7, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240F0100u, cpu->gpr[15], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80040558u); -#endif - /* 0xBFC2855C: 84848028 lh $a0, -32728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -32728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-32728)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004055Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x84848028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004055Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28560: 0C01021B jal 0xB004086C */ - cpu->gpr[31] = 0x80040568u; /* jal link before delay slot */ - psx_delay_BFC28560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC28564: A42F8020 sh $t7, -32736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -32736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-32736)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040564u); return; } g_debug_last_store_pc = 0x80040564u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42F8020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040564u); -#endif - if (psx_delay_BFC28560) { - psx_delay_BFC28560 = 0; - cpu->gpr[31] = 0x80040568u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004086Cu); - cpu->pc = 0x8004086Cu; return; - } -label_BFC28568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28568: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040568u); -#endif - /* 0xBFC2856C: 84848028 lh $a0, -32728($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -32728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-32728)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004056Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x84848028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28570: 0C0102E1 jal 0xB0040B84 */ - cpu->gpr[31] = 0x80040578u; /* jal link before delay slot */ - psx_delay_BFC28570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28574: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040574u); -#endif - if (psx_delay_BFC28570) { - psx_delay_BFC28570 = 0; - cpu->gpr[31] = 0x80040578u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B84u); - cpu->pc = 0x80040B84u; return; - } -label_BFC28578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28578: 0C013C0A jal 0xB004F028 */ - cpu->gpr[31] = 0x80040580u; /* jal link before delay slot */ - psx_delay_BFC28578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2857C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004057Cu); -#endif - if (psx_delay_BFC28578) { - psx_delay_BFC28578 = 0; - cpu->gpr[31] = 0x80040580u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F028u); - cpu->pc = 0x8004F028u; return; - } -label_BFC28580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28580: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040580u); -#endif - /* 0xBFC28584: 8718802C lh $t8, -32724($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -32724; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-32724)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040584u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8718802Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80040584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28588: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2858C: 13000013 beq $t8, $zero, 0xBFC285DC */ - uint32_t psx_brA_BFC2858C = cpu->gpr[24]; uint32_t psx_brB_BFC2858C = cpu->gpr[0]; - psx_taken_BFC2858C = (psx_brA_BFC2858C == psx_brB_BFC2858C); - psx_delay_BFC2858C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040590u); -#endif - if (psx_delay_BFC2858C) { - psx_delay_BFC2858C = 0; - if (psx_taken_BFC2858C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405DCu); - goto label_BFC285DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040594u); - } -label_BFC28594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28594: 240400B4 addiu $a0, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240400B4u, cpu->gpr[4], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28598: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2859C: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x800405A4u; /* jal link before delay slot */ - psx_delay_BFC2859C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC285A0: 240600B4 addiu $a2, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240600B4u, cpu->gpr[6], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800405A0u); -#endif - if (psx_delay_BFC2859C) { - psx_delay_BFC2859C = 0; - cpu->gpr[31] = 0x800405A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC285A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC285A4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800405A4u); -#endif - /* 0xBFC285A8: 8F399DE0 lw $t9, -25120($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800405A8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DE0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800405A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC285AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800405ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC285B0: 13200004 beq $t9, $zero, 0xBFC285C4 */ - uint32_t psx_brA_BFC285B0 = cpu->gpr[25]; uint32_t psx_brB_BFC285B0 = cpu->gpr[0]; - psx_taken_BFC285B0 = (psx_brA_BFC285B0 == psx_brB_BFC285B0); - psx_delay_BFC285B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285B4: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800405B4u); -#endif - if (psx_delay_BFC285B0) { - psx_delay_BFC285B0 = 0; - if (psx_taken_BFC285B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405C4u); - goto label_BFC285C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405B8u); - } -label_BFC285B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC285B8: 10000002 beq $zero, $zero, 0xBFC285C4 */ - uint32_t psx_brA_BFC285B8 = cpu->gpr[0]; uint32_t psx_brB_BFC285B8 = cpu->gpr[0]; - psx_taken_BFC285B8 = (psx_brA_BFC285B8 == psx_brB_BFC285B8); - psx_delay_BFC285B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285BC: 240200C8 addiu $v0, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240200C8u, cpu->gpr[2], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800405BCu); -#endif - if (psx_delay_BFC285B8) { - psx_delay_BFC285B8 = 0; - if (psx_taken_BFC285B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405C4u); - goto label_BFC285C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405C0u); - } -label_BFC285C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285C0: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800405C0u); -#endif -label_BFC285C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC285C4: 04410002 bgez $v0, 0xBFC285D0 */ - uint32_t psx_brA_BFC285C4 = cpu->gpr[2]; - psx_taken_BFC285C4 = ((int32_t)psx_brA_BFC285C4 >= 0); - psx_delay_BFC285C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC285C8: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800405C8u); -#endif - if (psx_delay_BFC285C4) { - psx_delay_BFC285C4 = 0; - if (psx_taken_BFC285C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405D0u); - goto label_BFC285D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405CCu); - } -label_BFC285CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC285CC: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800405CCu); -#endif -label_BFC285D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC285D0: 00012083 sra $a0, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00012083u, cpu->gpr[4], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800405D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC285D4: 0C011E2B jal 0xB00478AC */ - cpu->gpr[31] = 0x800405DCu; /* jal link before delay slot */ - psx_delay_BFC285D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC285D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800405D8u); -#endif - if (psx_delay_BFC285D4) { - psx_delay_BFC285D4 = 0; - cpu->gpr[31] = 0x800405DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800478ACu); - cpu->pc = 0x800478ACu; return; - } -label_BFC285DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC285DC: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800405DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405E0u); -#endif - /* 0xBFC285E0: 8D089DE0 lw $t0, -25120($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800405E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800405E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC285E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800405E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC285E8: 11000004 beq $t0, $zero, 0xBFC285FC */ - uint32_t psx_brA_BFC285E8 = cpu->gpr[8]; uint32_t psx_brB_BFC285E8 = cpu->gpr[0]; - psx_taken_BFC285E8 = (psx_brA_BFC285E8 == psx_brB_BFC285E8); - psx_delay_BFC285E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285EC: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800405ECu); -#endif - if (psx_delay_BFC285E8) { - psx_delay_BFC285E8 = 0; - if (psx_taken_BFC285E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405FCu); - goto label_BFC285FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405F0u); - } -label_BFC285F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC285F0: 10000002 beq $zero, $zero, 0xBFC285FC */ - uint32_t psx_brA_BFC285F0 = cpu->gpr[0]; uint32_t psx_brB_BFC285F0 = cpu->gpr[0]; - psx_taken_BFC285F0 = (psx_brA_BFC285F0 == psx_brB_BFC285F0); - psx_delay_BFC285F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285F4: 240200C8 addiu $v0, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240200C8u, cpu->gpr[2], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800405F4u); -#endif - if (psx_delay_BFC285F0) { - psx_delay_BFC285F0 = 0; - if (psx_taken_BFC285F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405FCu); - goto label_BFC285FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800405F8u); - } -label_BFC285F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC285F8: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800405F8u); -#endif -label_BFC285FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC285FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC285FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800405FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC285FC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800405FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040600u); -#endif - /* 0xBFC28600: 84A58028 lh $a1, -32728($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -32728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-32728)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040600u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A58028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28604: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC28608: 04410002 bgez $v0, 0xBFC28614 */ - uint32_t psx_brA_BFC28608 = cpu->gpr[2]; - psx_taken_BFC28608 = ((int32_t)psx_brA_BFC28608 >= 0); - psx_delay_BFC28608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC2860C: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004060Cu); -#endif - if (psx_delay_BFC28608) { - psx_delay_BFC28608 = 0; - if (psx_taken_BFC28608) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040614u); - goto label_BFC28614; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040610u); - } -label_BFC28610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28610: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80040610u); -#endif -label_BFC28614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC28614: 00013083 sra $a2, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00013083u, cpu->gpr[6], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28618: 0C010471 jal 0xB00411C4 */ - cpu->gpr[31] = 0x80040620u; /* jal link before delay slot */ - psx_delay_BFC28618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2861C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004061Cu); -#endif - if (psx_delay_BFC28618) { - psx_delay_BFC28618 = 0; - cpu->gpr[31] = 0x80040620u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800411C4u); - cpu->pc = 0x800411C4u; return; - } -label_BFC28620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28620: 0C0105DC jal 0xB0041770 */ - cpu->gpr[31] = 0x80040628u; /* jal link before delay slot */ - psx_delay_BFC28620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28624: 24040011 addiu $a0, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24040011u, cpu->gpr[4], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x80040624u); -#endif - if (psx_delay_BFC28620) { - psx_delay_BFC28620 = 0; - cpu->gpr[31] = 0x80040628u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041770u); - cpu->pc = 0x80041770u; return; - } -label_BFC28628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28628: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040628u); -#endif - /* 0xBFC2862C: 8D299DE0 lw $t1, -25120($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004062Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299DE0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004062Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC28630: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC28634: 11200004 beq $t1, $zero, 0xBFC28648 */ - uint32_t psx_brA_BFC28634 = cpu->gpr[9]; uint32_t psx_brB_BFC28634 = cpu->gpr[0]; - psx_taken_BFC28634 = (psx_brA_BFC28634 == psx_brB_BFC28634); - psx_delay_BFC28634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28638: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040638u); -#endif - if (psx_delay_BFC28634) { - psx_delay_BFC28634 = 0; - if (psx_taken_BFC28634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040648u); - goto label_BFC28648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004063Cu); - } -label_BFC2863C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2863Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004063Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2863C: 10000002 beq $zero, $zero, 0xBFC28648 */ - uint32_t psx_brA_BFC2863C = cpu->gpr[0]; uint32_t psx_brB_BFC2863C = cpu->gpr[0]; - psx_taken_BFC2863C = (psx_brA_BFC2863C == psx_brB_BFC2863C); - psx_delay_BFC2863C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28640: 240200C8 addiu $v0, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240200C8u, cpu->gpr[2], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040640u); -#endif - if (psx_delay_BFC2863C) { - psx_delay_BFC2863C = 0; - if (psx_taken_BFC2863C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040648u); - goto label_BFC28648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040644u); - } -label_BFC28644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28644: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040644u); -#endif -label_BFC28648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC28648: 04410002 bgez $v0, 0xBFC28654 */ - uint32_t psx_brA_BFC28648 = cpu->gpr[2]; - psx_taken_BFC28648 = ((int32_t)psx_brA_BFC28648 >= 0); - psx_delay_BFC28648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC2864C: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004064Cu); -#endif - if (psx_delay_BFC28648) { - psx_delay_BFC28648 = 0; - if (psx_taken_BFC28648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040654u); - goto label_BFC28654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040650u); - } -label_BFC28650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28650: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040650u); -#endif -label_BFC28654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC28654: 00015043 sra $t2, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015043u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80040654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28658: 19400081 blez $t2, 0xBFC28860 */ - uint32_t psx_brA_BFC28658 = cpu->gpr[10]; - psx_taken_BFC28658 = ((int32_t)psx_brA_BFC28658 <= 0); - psx_delay_BFC28658 = 1; - /* 0xBFC2865C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004065Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004065Cu); -#endif - if (psx_delay_BFC28658) { - psx_delay_BFC28658 = 0; - if (psx_taken_BFC28658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040860u); - goto label_BFC28860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040660u); - } -label_BFC28660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC28660: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040660u); -#endif - /* 0xBFC28664: 84A58028 lh $a1, -32728($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -32728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-32728)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040664u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A58028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28668: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2866C: 0C010471 jal 0xB00411C4 */ - cpu->gpr[31] = 0x80040674u; /* jal link before delay slot */ - psx_delay_BFC2866C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28670: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040670u); -#endif - if (psx_delay_BFC2866C) { - psx_delay_BFC2866C = 0; - cpu->gpr[31] = 0x80040674u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800411C4u); - cpu->pc = 0x800411C4u; return; - } -label_BFC28674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28674: 0C011DA8 jal 0xB00476A0 */ - cpu->gpr[31] = 0x8004067Cu; /* jal link before delay slot */ - psx_delay_BFC28674 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC28678: 02028021 addu $s0, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[2]; - PGXP_ALU(0x02028021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040678u); -#endif - if (psx_delay_BFC28674) { - psx_delay_BFC28674 = 0; - cpu->gpr[31] = 0x8004067Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476A0u); - cpu->pc = 0x800476A0u; return; - } -label_BFC2867C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2867Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2867Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004067Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2867C: 2A012329 slti $at, $s0, 9001 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (9001) ? 1 : 0); - PGXP_ALU(0x2A012329u, cpu->gpr[1], _pgx1, 0x2329u); } -#ifdef PSX_COSIM - cosim_instr(0x8004067Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28680: 14200002 bne $at, $zero, 0xBFC2868C */ - uint32_t psx_brA_BFC28680 = cpu->gpr[1]; uint32_t psx_brB_BFC28680 = cpu->gpr[0]; - psx_taken_BFC28680 = (psx_brA_BFC28680 != psx_brB_BFC28680); - psx_delay_BFC28680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28684: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040684u); -#endif - if (psx_delay_BFC28680) { - psx_delay_BFC28680 = 0; - if (psx_taken_BFC28680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004068Cu); - goto label_BFC2868C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040688u); - } -label_BFC28688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC28688: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040688u); -#endif -label_BFC2868C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2868Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2868Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004068Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2868C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004068Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040690u); -#endif - /* 0xBFC28690: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040690u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80040690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28694: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28698: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2869C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004069Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC286A0: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800406A0u); -#endif - /* 0xBFC286A4: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800406A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800406A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC286A8: 3C0D8014 lui $t5, 0x8014 */ - cpu->gpr[13] = 0x80140000u; - PGXP_ALU(0x3C0D8014u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800406A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC286AC: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800406ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC286B0: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800406B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC286B4: 25AD8CA8 addiu $t5, $t5, -29528 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-29528)); - PGXP_ALU(0x25AD8CA8u, cpu->gpr[13], _pgx1, 0xFFFF8CA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800406B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC286B8: 018D2821 addu $a1, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800406B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC286BC: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x800406C4u; /* jal link before delay slot */ - psx_delay_BFC286BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC286C0: 24840080 addiu $a0, $a0, 128 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (128)); - PGXP_ALU(0x24840080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800406C0u); -#endif - if (psx_delay_BFC286BC) { - psx_delay_BFC286BC = 0; - cpu->gpr[31] = 0x800406C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC286C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC286C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC286C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC286C4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800406C4u); -#endif - /* 0xBFC286C8: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800406C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800406C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC286CC: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800406CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC286D0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800406D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC286D4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800406D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC286D8: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800406D8u); -#endif - /* 0xBFC286DC: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800406DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800406DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC286E0: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800406E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC286E4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800406E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC286E8: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800406E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC286EC: 27188CFC addiu $t8, $t8, -29444 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-29444)); - PGXP_ALU(0x27188CFCu, cpu->gpr[24], _pgx1, 0xFFFF8CFCu); } -#ifdef PSX_COSIM - cosim_instr(0x800406ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC286F0: 01F82821 addu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800406F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC286F4: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x800406FCu; /* jal link before delay slot */ - psx_delay_BFC286F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC286F8: 24840080 addiu $a0, $a0, 128 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (128)); - PGXP_ALU(0x24840080u, cpu->gpr[4], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800406F8u); -#endif - if (psx_delay_BFC286F4) { - psx_delay_BFC286F4 = 0; - cpu->gpr[31] = 0x800406FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC286FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC286FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC286FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800406FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC286FC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800406FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040700u); -#endif - /* 0xBFC28700: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040700u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28704: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28708: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2870C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004070Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28710: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040710u); -#endif - /* 0xBFC28714: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040714u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80040714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28718: 3C098014 lui $t1, 0x8014 */ - cpu->gpr[9] = 0x80140000u; - PGXP_ALU(0x3C098014u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2871C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004071Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28720: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28724: 25298C54 addiu $t1, $t1, -29612 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-29612)); - PGXP_ALU(0x25298C54u, cpu->gpr[9], _pgx1, 0xFFFF8C54u); } -#ifdef PSX_COSIM - cosim_instr(0x80040724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x320u); -#endif - /* 0xBFC28728: 01092821 addu $a1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2872C: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80040734u; /* jal link before delay slot */ - psx_delay_BFC2872C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28730: 24840084 addiu $a0, $a0, 132 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (132)); - PGXP_ALU(0x24840084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80040730u); -#endif - if (psx_delay_BFC2872C) { - psx_delay_BFC2872C = 0; - cpu->gpr[31] = 0x80040734u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC28734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC28734: 12000031 beq $s0, $zero, 0xBFC287FC */ - uint32_t psx_brA_BFC28734 = cpu->gpr[16]; uint32_t psx_brB_BFC28734 = cpu->gpr[0]; - psx_taken_BFC28734 = (psx_brA_BFC28734 == psx_brB_BFC28734); - psx_delay_BFC28734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28738: 240400B4 addiu $a0, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240400B4u, cpu->gpr[4], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040738u); -#endif - if (psx_delay_BFC28734) { - psx_delay_BFC28734 = 0; - if (psx_taken_BFC28734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800407FCu); - goto label_BFC287FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004073Cu); - } -label_BFC2873C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2873Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2873Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2873C: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28740: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC28744: AC2A9E24 sw $t2, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040744u); return; } g_debug_last_store_pc = 0x80040744u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9E24u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80040744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28748: 0C0105DC jal 0xB0041770 */ - cpu->gpr[31] = 0x80040750u; /* jal link before delay slot */ - psx_delay_BFC28748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2874C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004074Cu); -#endif - if (psx_delay_BFC28748) { - psx_delay_BFC28748 = 0; - cpu->gpr[31] = 0x80040750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041770u); - cpu->pc = 0x80041770u; return; - } -label_BFC28750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC28750: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040750u); -#endif - /* 0xBFC28754: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040754u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80040754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28758: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2875C: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004075Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28760: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28764: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040764u); -#endif - /* 0xBFC28768: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040768u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80040768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2876C: 3C0D8014 lui $t5, 0x8014 */ - cpu->gpr[13] = 0x80140000u; - PGXP_ALU(0x3C0D8014u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004076Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28770: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28774: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC28778: 25AD81C8 addiu $t5, $t5, -32312 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-32312)); - PGXP_ALU(0x25AD81C8u, cpu->gpr[13], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC2877C: 018D2821 addu $a1, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28780: 0C0112C9 jal 0xB0044B24 */ - cpu->gpr[31] = 0x80040788u; /* jal link before delay slot */ - psx_delay_BFC28780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28784: 24840074 addiu $a0, $a0, 116 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (116)); - PGXP_ALU(0x24840074u, cpu->gpr[4], _pgx1, 0x00000074u); } -#ifdef PSX_COSIM - cosim_instr(0x80040784u); -#endif - if (psx_delay_BFC28780) { - psx_delay_BFC28780 = 0; - cpu->gpr[31] = 0x80040788u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B24u); - cpu->pc = 0x80044B24u; return; - } -label_BFC28788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28788: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040788u); -#endif - /* 0xBFC2878C: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004078Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28790: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC28794: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC28798: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2879C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004079Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407A0u); -#endif - /* 0xBFC287A0: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800407A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800407A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC287A4: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800407A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC287A8: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800407A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC287AC: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800407ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC287B0: 27188238 addiu $t8, $t8, -32200 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-32200)); - PGXP_ALU(0x27188238u, cpu->gpr[24], _pgx1, 0xFFFF8238u); } -#ifdef PSX_COSIM - cosim_instr(0x800407B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC287B4: 01F82821 addu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800407B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC287B8: 0C0112C9 jal 0xB0044B24 */ - cpu->gpr[31] = 0x800407C0u; /* jal link before delay slot */ - psx_delay_BFC287B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC287BC: 24840078 addiu $a0, $a0, 120 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (120)); - PGXP_ALU(0x24840078u, cpu->gpr[4], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x800407BCu); -#endif - if (psx_delay_BFC287B8) { - psx_delay_BFC287B8 = 0; - cpu->gpr[31] = 0x800407C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B24u); - cpu->pc = 0x80044B24u; return; - } -label_BFC287C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC287C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC287C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC287C0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800407C0u); -#endif - /* 0xBFC287C4: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800407C4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800407C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC287C8: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800407C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC287CC: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800407CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC287D0: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800407D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC287D4: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800407D4u); -#endif - /* 0xBFC287D8: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800407D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800407D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC287DC: 3C098014 lui $t1, 0x8014 */ - cpu->gpr[9] = 0x80140000u; - PGXP_ALU(0x3C098014u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800407DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC287E0: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800407E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC287E4: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800407E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC287E8: 252982A8 addiu $t1, $t1, -32088 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-32088)); - PGXP_ALU(0x252982A8u, cpu->gpr[9], _pgx1, 0xFFFF82A8u); } -#ifdef PSX_COSIM - cosim_instr(0x800407E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x320u); -#endif - /* 0xBFC287EC: 01092821 addu $a1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800407ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC287F0: 0C0112C9 jal 0xB0044B24 */ - cpu->gpr[31] = 0x800407F8u; /* jal link before delay slot */ - psx_delay_BFC287F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC287F4: 2484007C addiu $a0, $a0, 124 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (124)); - PGXP_ALU(0x2484007Cu, cpu->gpr[4], _pgx1, 0x0000007Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800407F4u); -#endif - if (psx_delay_BFC287F0) { - psx_delay_BFC287F0 = 0; - cpu->gpr[31] = 0x800407F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B24u); - cpu->pc = 0x80044B24u; return; - } -label_BFC287F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC287F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC287F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC287F8: 240400B4 addiu $a0, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240400B4u, cpu->gpr[4], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800407F8u); -#endif -label_BFC287FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC287FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC287FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800407FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC287FC: 240500B4 addiu $a1, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240500B4u, cpu->gpr[5], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800407FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28800: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x80040808u; /* jal link before delay slot */ - psx_delay_BFC28800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28804: 240600B4 addiu $a2, $zero, 180 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (180)); - PGXP_ALU(0x240600B4u, cpu->gpr[6], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040804u); -#endif - if (psx_delay_BFC28800) { - psx_delay_BFC28800 = 0; - cpu->gpr[31] = 0x80040808u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC28808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28808: 0C011DE7 jal 0xB004779C */ - cpu->gpr[31] = 0x80040810u; /* jal link before delay slot */ - psx_delay_BFC28808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2880C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004080Cu); -#endif - if (psx_delay_BFC28808) { - psx_delay_BFC28808 = 0; - cpu->gpr[31] = 0x80040810u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004779Cu); - cpu->pc = 0x8004779Cu; return; - } -label_BFC28810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28810: 0C011DC6 jal 0xB0047718 */ - cpu->gpr[31] = 0x80040818u; /* jal link before delay slot */ - psx_delay_BFC28810 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040814u); -#endif - if (psx_delay_BFC28810) { - psx_delay_BFC28810 = 0; - cpu->gpr[31] = 0x80040818u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047718u); - cpu->pc = 0x80047718u; return; - } -label_BFC28818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28818: 0C00FE8B jal 0xB003FA2C */ - cpu->gpr[31] = 0x80040820u; /* jal link before delay slot */ - psx_delay_BFC28818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2881C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004081Cu); -#endif - if (psx_delay_BFC28818) { - psx_delay_BFC28818 = 0; - cpu->gpr[31] = 0x80040820u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003FA2Cu); - cpu->pc = 0x8003FA2Cu; return; - } -label_BFC28820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28820: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040820u); -#endif - /* 0xBFC28824: 8D4A9DE0 lw $t2, -25120($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040824u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DE0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80040824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2882C: 11400004 beq $t2, $zero, 0xBFC28840 */ - uint32_t psx_brA_BFC2882C = cpu->gpr[10]; uint32_t psx_brB_BFC2882C = cpu->gpr[0]; - psx_taken_BFC2882C = (psx_brA_BFC2882C == psx_brB_BFC2882C); - psx_delay_BFC2882C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28830: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040830u); -#endif - if (psx_delay_BFC2882C) { - psx_delay_BFC2882C = 0; - if (psx_taken_BFC2882C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040840u); - goto label_BFC28840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040834u); - } -label_BFC28834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28834: 10000002 beq $zero, $zero, 0xBFC28840 */ - uint32_t psx_brA_BFC28834 = cpu->gpr[0]; uint32_t psx_brB_BFC28834 = cpu->gpr[0]; - psx_taken_BFC28834 = (psx_brA_BFC28834 == psx_brB_BFC28834); - psx_delay_BFC28834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28838: 240200C8 addiu $v0, $zero, 200 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); - PGXP_ALU(0x240200C8u, cpu->gpr[2], _pgx1, 0x000000C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040838u); -#endif - if (psx_delay_BFC28834) { - psx_delay_BFC28834 = 0; - if (psx_taken_BFC28834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040840u); - goto label_BFC28840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004083Cu); - } -label_BFC2883C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2883Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2883Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004083Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2883C: 240200F0 addiu $v0, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240200F0u, cpu->gpr[2], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004083Cu); -#endif -label_BFC28840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC28840: 04410002 bgez $v0, 0xBFC2884C */ - uint32_t psx_brA_BFC28840 = cpu->gpr[2]; - psx_taken_BFC28840 = ((int32_t)psx_brA_BFC28840 >= 0); - psx_delay_BFC28840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC28844: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040844u); -#endif - if (psx_delay_BFC28840) { - psx_delay_BFC28840 = 0; - if (psx_taken_BFC28840) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004084Cu); - goto label_BFC2884C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040848u); - } -label_BFC28848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28848: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040848u); -#endif -label_BFC2884C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2884Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2884Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004084Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2884C: 00015843 sra $t3, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015843u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004084Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10802u); -#endif - /* 0xBFC28850: 020B082A slt $at, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x020B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28854: 1420FF82 bne $at, $zero, 0xBFC28660 */ - uint32_t psx_brA_BFC28854 = cpu->gpr[1]; uint32_t psx_brB_BFC28854 = cpu->gpr[0]; - psx_taken_BFC28854 = (psx_brA_BFC28854 != psx_brB_BFC28854); - psx_delay_BFC28854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040858u); -#endif - if (psx_delay_BFC28854) { - psx_delay_BFC28854 = 0; - if (psx_taken_BFC28854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040660u); - goto label_BFC28660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004085Cu); - } -label_BFC2885C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2885Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004085Cu); -#endif - /* 0xBFC2885C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004085Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004085Cu); -#endif -label_BFC28860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040860u); -#endif - /* 0xBFC28860: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040860u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80040860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC28864: 03E00008 jr $ra */ - psx_delay_BFC28864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28868: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80040868u); -#endif - if (psx_delay_BFC28864) { - psx_delay_BFC28864 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2886C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2886Cu); - int psx_delay_BFC28898 = 0; - int psx_delay_BFC288F8 = 0; - int psx_delay_BFC28924 = 0; - int psx_delay_BFC28950 = 0; - int psx_delay_BFC28980 = 0; - int psx_delay_BFC289B0 = 0; - int psx_delay_BFC289E0 = 0; - int psx_delay_BFC289E8 = 0; - int psx_taken_BFC289E8 = 0; - int psx_delay_BFC289F0 = 0; - int psx_taken_BFC289F0 = 0; - int psx_delay_BFC28A2C = 0; - int psx_taken_BFC28A2C = 0; - int psx_delay_BFC28A3C = 0; - int psx_taken_BFC28A3C = 0; - int psx_delay_BFC28A44 = 0; - int psx_taken_BFC28A44 = 0; - int psx_delay_BFC28A50 = 0; - int psx_delay_BFC28A58 = 0; - int psx_taken_BFC28A58 = 0; - int psx_delay_BFC28A60 = 0; - int psx_taken_BFC28A60 = 0; - int psx_delay_BFC28A9C = 0; - int psx_taken_BFC28A9C = 0; - int psx_delay_BFC28AAC = 0; - int psx_taken_BFC28AAC = 0; - int psx_delay_BFC28AB4 = 0; - int psx_taken_BFC28AB4 = 0; - int psx_delay_BFC28AC0 = 0; - int psx_delay_BFC28AC8 = 0; - int psx_taken_BFC28AC8 = 0; - int psx_delay_BFC28AD0 = 0; - int psx_taken_BFC28AD0 = 0; - int psx_delay_BFC28B0C = 0; - int psx_taken_BFC28B0C = 0; - int psx_delay_BFC28B1C = 0; - int psx_taken_BFC28B1C = 0; - int psx_delay_BFC28B24 = 0; - int psx_taken_BFC28B24 = 0; - int psx_delay_BFC28B30 = 0; - int psx_delay_BFC28B4C = 0; - int psx_taken_BFC28B4C = 0; - int psx_delay_BFC28B7C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC288A0u: goto label_BFC288A0; - case 0xBFC288D4u: goto label_BFC288D4; - case 0xBFC28900u: goto label_BFC28900; - case 0xBFC2892Cu: goto label_BFC2892C; - case 0xBFC28958u: goto label_BFC28958; - case 0xBFC28988u: goto label_BFC28988; - case 0xBFC289B8u: goto label_BFC289B8; - case 0xBFC289E8u: goto label_BFC289E8; - case 0xBFC289F0u: goto label_BFC289F0; - case 0xBFC289F8u: goto label_BFC289F8; - case 0xBFC289FCu: goto label_BFC289FC; - case 0xBFC28A34u: goto label_BFC28A34; - case 0xBFC28A38u: goto label_BFC28A38; - case 0xBFC28A44u: goto label_BFC28A44; - case 0xBFC28A4Cu: goto label_BFC28A4C; - case 0xBFC28A50u: goto label_BFC28A50; - case 0xBFC28A58u: goto label_BFC28A58; - case 0xBFC28A60u: goto label_BFC28A60; - case 0xBFC28A68u: goto label_BFC28A68; - case 0xBFC28A6Cu: goto label_BFC28A6C; - case 0xBFC28AA4u: goto label_BFC28AA4; - case 0xBFC28AA8u: goto label_BFC28AA8; - case 0xBFC28AB4u: goto label_BFC28AB4; - case 0xBFC28ABCu: goto label_BFC28ABC; - case 0xBFC28AC0u: goto label_BFC28AC0; - case 0xBFC28AC8u: goto label_BFC28AC8; - case 0xBFC28AD0u: goto label_BFC28AD0; - case 0xBFC28AD8u: goto label_BFC28AD8; - case 0xBFC28ADCu: goto label_BFC28ADC; - case 0xBFC28B14u: goto label_BFC28B14; - case 0xBFC28B18u: goto label_BFC28B18; - case 0xBFC28B24u: goto label_BFC28B24; - case 0xBFC28B2Cu: goto label_BFC28B2C; - case 0xBFC28B30u: goto label_BFC28B30; - case 0xBFC28B38u: goto label_BFC28B38; - case 0xBFC28B54u: goto label_BFC28B54; - default: break; - } - } -label_BFC2886C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2886Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2886C: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC28870: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040870u); return; } g_debug_last_store_pc = 0x80040870u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80040870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC28874: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040874u); return; } g_debug_last_store_pc = 0x80040874u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC28878: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040878u); return; } g_debug_last_store_pc = 0x80040878u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80040878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2887C: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004087Cu); return; } g_debug_last_store_pc = 0x8004087Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC28880: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040880u); return; } g_debug_last_store_pc = 0x80040880u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80040880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC28884: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040884u); return; } g_debug_last_store_pc = 0x80040884u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80010u); -#endif - /* 0xBFC28888: 00049C00 sll $s3, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[19] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00049C00u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2888C: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004088Cu); return; } g_debug_last_store_pc = 0x8004088Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004088Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC28890: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040890u); return; } g_debug_last_store_pc = 0x80040890u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80040890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC28894: 00139C03 sra $s3, $s3, 16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] >> 16u); - PGXP_ALU(0x00139C03u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28898: 0C010FC7 jal 0xB0043F1C */ - cpu->gpr[31] = 0x800408A0u; /* jal link before delay slot */ - psx_delay_BFC28898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2889C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004089Cu); return; } g_debug_last_store_pc = 0x8004089Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004089Cu); -#endif - if (psx_delay_BFC28898) { - psx_delay_BFC28898 = 0; - cpu->gpr[31] = 0x800408A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F1Cu); - cpu->pc = 0x80043F1Cu; return; - } -label_BFC288A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC288A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC288A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC288A0: 3C108014 lui $s0, 0x8014 */ - cpu->gpr[16] = 0x80140000u; - PGXP_ALU(0x3C108014u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC288A4: 3C118014 lui $s1, 0x8014 */ - cpu->gpr[17] = 0x80140000u; - PGXP_ALU(0x3C118014u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC288A8: 3C128014 lui $s2, 0x8014 */ - cpu->gpr[18] = 0x80140000u; - PGXP_ALU(0x3C128014u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC288AC: 3C158007 lui $s5, 0x8007 */ - cpu->gpr[21] = 0x80070000u; - PGXP_ALU(0x3C158007u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC288B0: 3C168007 lui $s6, 0x8007 */ - cpu->gpr[22] = 0x80070000u; - PGXP_ALU(0x3C168007u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC288B4: 3C178007 lui $s7, 0x8007 */ - cpu->gpr[23] = 0x80070000u; - PGXP_ALU(0x3C178007u, cpu->gpr[23], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC288B8: 26F77F50 addiu $s7, $s7, 32592 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (32592)); - PGXP_ALU(0x26F77F50u, cpu->gpr[23], _pgx1, 0x00007F50u); } -#ifdef PSX_COSIM - cosim_instr(0x800408B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC288BC: 26D662F0 addiu $s6, $s6, 25328 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (25328)); - PGXP_ALU(0x26D662F0u, cpu->gpr[22], _pgx1, 0x000062F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800408BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC288C0: 26B54C30 addiu $s5, $s5, 19504 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (19504)); - PGXP_ALU(0x26B54C30u, cpu->gpr[21], _pgx1, 0x00004C30u); } -#ifdef PSX_COSIM - cosim_instr(0x800408C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC288C4: 265282A8 addiu $s2, $s2, -32088 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-32088)); - PGXP_ALU(0x265282A8u, cpu->gpr[18], _pgx1, 0xFFFF82A8u); } -#ifdef PSX_COSIM - cosim_instr(0x800408C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC288C8: 26318238 addiu $s1, $s1, -32200 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-32200)); - PGXP_ALU(0x26318238u, cpu->gpr[17], _pgx1, 0xFFFF8238u); } -#ifdef PSX_COSIM - cosim_instr(0x800408C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC288CC: 261081C8 addiu $s0, $s0, -32312 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-32312)); - PGXP_ALU(0x261081C8u, cpu->gpr[16], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800408CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC288D0: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800408D0u); -#endif -label_BFC288D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC288D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC288D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC288D4: 00147080 sll $t6, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800408D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC288D8: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800408D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC288DC: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800408DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC288E0: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800408E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC288E4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800408E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC288E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800408E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC288EC: AC349E24 sw $s4, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800408ECu); return; } g_debug_last_store_pc = 0x800408ECu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAC349E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800408ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800408F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14010u); -#endif - /* 0xBFC288F0: 020E2021 addu $a0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800408F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC288F4: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800408F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC288F8: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x80040900u; /* jal link before delay slot */ - psx_delay_BFC288F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC288FC: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800408FCu); -#endif - if (psx_delay_BFC288F8) { - psx_delay_BFC288F8 = 0; - cpu->gpr[31] = 0x80040900u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC28900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28900: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040900u); -#endif - /* 0xBFC28904: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040904u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC28908: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC2890C: 00147880 sll $t7, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004090Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC28910: 01F47821 addu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[20]; - PGXP_ALU(0x01F47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28914: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC28918: 01F47821 addu $t7, $t7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[20]; - PGXP_ALU(0x01F47821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2891C: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28010u); -#endif - /* 0xBFC28920: 022F2021 addu $a0, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28924: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x8004092Cu; /* jal link before delay slot */ - psx_delay_BFC28924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28928: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040928u); -#endif - if (psx_delay_BFC28924) { - psx_delay_BFC28924 = 0; - cpu->gpr[31] = 0x8004092Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC2892C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2892Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2892Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004092Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2892C: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004092Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040930u); -#endif - /* 0xBFC28930: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040930u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800021u); -#endif - /* 0xBFC28934: 02E02821 addu $a1, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC28938: 0014C080 sll $t8, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC2893C: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004093Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28940: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100000u); -#endif - /* 0xBFC28944: 0314C021 addu $t8, $t8, $s4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[20]; - PGXP_ALU(0x0314C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28948: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040010u); -#endif - /* 0xBFC2894C: 02582021 addu $a0, $s2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[24]; - PGXP_ALU(0x02582021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28950: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x80040958u; /* jal link before delay slot */ - psx_delay_BFC28950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28954: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040954u); -#endif - if (psx_delay_BFC28950) { - psx_delay_BFC28950 = 0; - cpu->gpr[31] = 0x80040958u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC28958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28958: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040958u); -#endif - /* 0xBFC2895C: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004095Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004095Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28960: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80040960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC28964: 0014C880 sll $t9, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC28968: 0334C821 addu $t9, $t9, $s4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[20]; - PGXP_ALU(0x0334C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2896C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004096Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC28970: 0334C821 addu $t9, $t9, $s4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[20]; - PGXP_ALU(0x0334C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28974: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010010u); -#endif - /* 0xBFC28978: 02192021 addu $a0, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2897C: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8004097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28980: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80040988u; /* jal link before delay slot */ - psx_delay_BFC28980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28984: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80040984u); -#endif - if (psx_delay_BFC28980) { - psx_delay_BFC28980 = 0; - cpu->gpr[31] = 0x80040988u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC28988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28988: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040988u); -#endif - /* 0xBFC2898C: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004098Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004098Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28990: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80040990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC28994: 00144080 sll $t0, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[8] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00144080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC28998: 01144021 addu $t0, $t0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[20]; - PGXP_ALU(0x01144021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2899C: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004099Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100100u); -#endif - /* 0xBFC289A0: 01144021 addu $t0, $t0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[20]; - PGXP_ALU(0x01144021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800409A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC289A4: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800409A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20110u); -#endif - /* 0xBFC289A8: 02282021 addu $a0, $s1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[8]; - PGXP_ALU(0x02282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800409A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC289AC: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800409ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC289B0: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x800409B8u; /* jal link before delay slot */ - psx_delay_BFC289B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC289B4: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800409B4u); -#endif - if (psx_delay_BFC289B0) { - psx_delay_BFC289B0 = 0; - cpu->gpr[31] = 0x800409B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC289B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC289B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC289B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC289B8: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800409B8u); -#endif - /* 0xBFC289BC: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800409BCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800409BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC289C0: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800409C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100200u); -#endif - /* 0xBFC289C4: 00144880 sll $t1, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[9] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00144880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800409C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100200u); -#endif - /* 0xBFC289C8: 01344821 addu $t1, $t1, $s4 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[20]; - PGXP_ALU(0x01344821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800409C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC289CC: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800409CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100200u); -#endif - /* 0xBFC289D0: 01344821 addu $t1, $t1, $s4 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[20]; - PGXP_ALU(0x01344821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800409D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC289D4: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800409D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40210u); -#endif - /* 0xBFC289D8: 02492021 addu $a0, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[9]; - PGXP_ALU(0x02492021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800409D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC289DC: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800409DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC289E0: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x800409E8u; /* jal link before delay slot */ - psx_delay_BFC289E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC289E4: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800409E4u); -#endif - if (psx_delay_BFC289E0) { - psx_delay_BFC289E0 = 0; - cpu->gpr[31] = 0x800409E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC289E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC289E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC289E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC289E8: 12600004 beq $s3, $zero, 0xBFC289FC */ - uint32_t psx_brA_BFC289E8 = cpu->gpr[19]; uint32_t psx_brB_BFC289E8 = cpu->gpr[0]; - psx_taken_BFC289E8 = (psx_brA_BFC289E8 == psx_brB_BFC289E8); - psx_delay_BFC289E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC289EC: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800409ECu); -#endif - if (psx_delay_BFC289E8) { - psx_delay_BFC289E8 = 0; - if (psx_taken_BFC289E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800409FCu); - goto label_BFC289FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800409F0u); - } -label_BFC289F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC289F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC289F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC289F0: 10000002 beq $zero, $zero, 0xBFC289FC */ - uint32_t psx_brA_BFC289F0 = cpu->gpr[0]; uint32_t psx_brB_BFC289F0 = cpu->gpr[0]; - psx_taken_BFC289F0 = (psx_brA_BFC289F0 == psx_brB_BFC289F0); - psx_delay_BFC289F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC289F4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800409F4u); -#endif - if (psx_delay_BFC289F0) { - psx_delay_BFC289F0 = 0; - if (psx_taken_BFC289F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800409FCu); - goto label_BFC289FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800409F8u); - } -label_BFC289F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC289F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC289F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC289F8: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800409F8u); -#endif -label_BFC289FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC289FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC289FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800409FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC289FC: 240B0050 addiu $t3, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240B0050u, cpu->gpr[11], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x800409FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC28A00: 0162001A div $t3, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[11]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0162001Au, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80040A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28A04: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040A04u); -#endif - /* 0xBFC28A08: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040A08u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28A0C: 24050140 addiu $a1, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24050140u, cpu->gpr[5], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC28A10: 00145080 sll $t2, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00145080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC28A14: 01545021 addu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[20]; - PGXP_ALU(0x01545021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28A18: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100400u); -#endif - /* 0xBFC28A1C: 01545021 addu $t2, $t2, $s4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[20]; - PGXP_ALU(0x01545021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28A20: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10410u); -#endif - /* 0xBFC28A24: 020A2021 addu $a0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC28A28: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28A2C: 14400002 bne $v0, $zero, 0xBFC28A38 */ - uint32_t psx_brA_BFC28A2C = cpu->gpr[2]; uint32_t psx_brB_BFC28A2C = cpu->gpr[0]; - psx_taken_BFC28A2C = (psx_brA_BFC28A2C != psx_brB_BFC28A2C); - psx_delay_BFC28A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28A30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040A30u); -#endif - if (psx_delay_BFC28A2C) { - psx_delay_BFC28A2C = 0; - if (psx_taken_BFC28A2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A38u); - goto label_BFC28A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A34u); - } -label_BFC28A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28A34: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80040A34u); return; -#ifdef PSX_COSIM - cosim_instr(0x80040A34u); -#endif -label_BFC28A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28A38: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC28A3C: 14410004 bne $v0, $at, 0xBFC28A50 */ - uint32_t psx_brA_BFC28A3C = cpu->gpr[2]; uint32_t psx_brB_BFC28A3C = cpu->gpr[1]; - psx_taken_BFC28A3C = (psx_brA_BFC28A3C != psx_brB_BFC28A3C); - psx_delay_BFC28A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28A40: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040A40u); -#endif - if (psx_delay_BFC28A3C) { - psx_delay_BFC28A3C = 0; - if (psx_taken_BFC28A3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A50u); - goto label_BFC28A50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A44u); - } -label_BFC28A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC28A44: 15610002 bne $t3, $at, 0xBFC28A50 */ - uint32_t psx_brA_BFC28A44 = cpu->gpr[11]; uint32_t psx_brB_BFC28A44 = cpu->gpr[1]; - psx_taken_BFC28A44 = (psx_brA_BFC28A44 != psx_brB_BFC28A44); - psx_delay_BFC28A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28A48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040A48u); -#endif - if (psx_delay_BFC28A44) { - psx_delay_BFC28A44 = 0; - if (psx_taken_BFC28A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A50u); - goto label_BFC28A50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A4Cu); - } -label_BFC28A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28A4C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80040A4Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x80040A4Cu); -#endif -label_BFC28A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28A50: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80040A58u; /* jal link before delay slot */ - psx_delay_BFC28A50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040A54u); -#endif - if (psx_delay_BFC28A50) { - psx_delay_BFC28A50 = 0; - cpu->gpr[31] = 0x80040A58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC28A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC28A58: 12600004 beq $s3, $zero, 0xBFC28A6C */ - uint32_t psx_brA_BFC28A58 = cpu->gpr[19]; uint32_t psx_brB_BFC28A58 = cpu->gpr[0]; - psx_taken_BFC28A58 = (psx_brA_BFC28A58 == psx_brB_BFC28A58); - psx_delay_BFC28A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28A5C: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A5Cu); -#endif - if (psx_delay_BFC28A58) { - psx_delay_BFC28A58 = 0; - if (psx_taken_BFC28A58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A6Cu); - goto label_BFC28A6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A60u); - } -label_BFC28A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28A60: 10000002 beq $zero, $zero, 0xBFC28A6C */ - uint32_t psx_brA_BFC28A60 = cpu->gpr[0]; uint32_t psx_brB_BFC28A60 = cpu->gpr[0]; - psx_taken_BFC28A60 = (psx_brA_BFC28A60 == psx_brB_BFC28A60); - psx_delay_BFC28A60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28A64: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A64u); -#endif - if (psx_delay_BFC28A60) { - psx_delay_BFC28A60 = 0; - if (psx_taken_BFC28A60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A6Cu); - goto label_BFC28A6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040A68u); - } -label_BFC28A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28A68: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A68u); -#endif -label_BFC28A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC28A6C: 240D019C addiu $t5, $zero, 412 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (412)); - PGXP_ALU(0x240D019Cu, cpu->gpr[13], _pgx1, 0x0000019Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80040A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC28A70: 01A2001A div $t5, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A2001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80040A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28A74: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040A74u); -#endif - /* 0xBFC28A78: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040A78u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28A7C: 24050140 addiu $a1, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24050140u, cpu->gpr[5], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC28A80: 00146080 sll $t4, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[12] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00146080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC28A84: 01946021 addu $t4, $t4, $s4 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[20]; - PGXP_ALU(0x01946021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28A88: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101000u); -#endif - /* 0xBFC28A8C: 01946021 addu $t4, $t4, $s4 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[20]; - PGXP_ALU(0x01946021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28A90: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21010u); -#endif - /* 0xBFC28A94: 022C2021 addu $a0, $s1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[12]; - PGXP_ALU(0x022C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC28A98: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28A9C: 14400002 bne $v0, $zero, 0xBFC28AA8 */ - uint32_t psx_brA_BFC28A9C = cpu->gpr[2]; uint32_t psx_brB_BFC28A9C = cpu->gpr[0]; - psx_taken_BFC28A9C = (psx_brA_BFC28A9C != psx_brB_BFC28A9C); - psx_delay_BFC28A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040AA0u); -#endif - if (psx_delay_BFC28A9C) { - psx_delay_BFC28A9C = 0; - if (psx_taken_BFC28A9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AA8u); - goto label_BFC28AA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AA4u); - } -label_BFC28AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28AA4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80040AA4u); return; -#ifdef PSX_COSIM - cosim_instr(0x80040AA4u); -#endif -label_BFC28AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28AA8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC28AAC: 14410004 bne $v0, $at, 0xBFC28AC0 */ - uint32_t psx_brA_BFC28AAC = cpu->gpr[2]; uint32_t psx_brB_BFC28AAC = cpu->gpr[1]; - psx_taken_BFC28AAC = (psx_brA_BFC28AAC != psx_brB_BFC28AAC); - psx_delay_BFC28AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28AB0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040AB0u); -#endif - if (psx_delay_BFC28AAC) { - psx_delay_BFC28AAC = 0; - if (psx_taken_BFC28AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AC0u); - goto label_BFC28AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AB4u); - } -label_BFC28AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC28AB4: 15A10002 bne $t5, $at, 0xBFC28AC0 */ - uint32_t psx_brA_BFC28AB4 = cpu->gpr[13]; uint32_t psx_brB_BFC28AB4 = cpu->gpr[1]; - psx_taken_BFC28AB4 = (psx_brA_BFC28AB4 != psx_brB_BFC28AB4); - psx_delay_BFC28AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28AB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040AB8u); -#endif - if (psx_delay_BFC28AB4) { - psx_delay_BFC28AB4 = 0; - if (psx_taken_BFC28AB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AC0u); - goto label_BFC28AC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040ABCu); - } -label_BFC28ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28ABC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80040ABCu); return; -#ifdef PSX_COSIM - cosim_instr(0x80040ABCu); -#endif -label_BFC28AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28AC0: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80040AC8u; /* jal link before delay slot */ - psx_delay_BFC28AC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28AC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040AC4u); -#endif - if (psx_delay_BFC28AC0) { - psx_delay_BFC28AC0 = 0; - cpu->gpr[31] = 0x80040AC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC28AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC28AC8: 12600004 beq $s3, $zero, 0xBFC28ADC */ - uint32_t psx_brA_BFC28AC8 = cpu->gpr[19]; uint32_t psx_brB_BFC28AC8 = cpu->gpr[0]; - psx_taken_BFC28AC8 = (psx_brA_BFC28AC8 == psx_brB_BFC28AC8); - psx_delay_BFC28AC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28ACC: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040ACCu); -#endif - if (psx_delay_BFC28AC8) { - psx_delay_BFC28AC8 = 0; - if (psx_taken_BFC28AC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040ADCu); - goto label_BFC28ADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AD0u); - } -label_BFC28AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28AD0: 10000002 beq $zero, $zero, 0xBFC28ADC */ - uint32_t psx_brA_BFC28AD0 = cpu->gpr[0]; uint32_t psx_brB_BFC28AD0 = cpu->gpr[0]; - psx_taken_BFC28AD0 = (psx_brA_BFC28AD0 == psx_brB_BFC28AD0); - psx_delay_BFC28AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28AD4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040AD4u); -#endif - if (psx_delay_BFC28AD0) { - psx_delay_BFC28AD0 = 0; - if (psx_taken_BFC28AD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040ADCu); - goto label_BFC28ADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040AD8u); - } -label_BFC28AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28AD8: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040AD8u); -#endif -label_BFC28ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC28ADC: 240F016D addiu $t7, $zero, 365 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (365)); - PGXP_ALU(0x240F016Du, cpu->gpr[15], _pgx1, 0x0000016Du); } -#ifdef PSX_COSIM - cosim_instr(0x80040ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC28AE0: 01E2001A div $t7, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E2001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80040AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28AE4: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040AE4u); -#endif - /* 0xBFC28AE8: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040AE8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28AEC: 24050160 addiu $a1, $zero, 352 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (352)); - PGXP_ALU(0x24050160u, cpu->gpr[5], _pgx1, 0x00000160u); } -#ifdef PSX_COSIM - cosim_instr(0x80040AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC28AF0: 00147080 sll $t6, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC28AF4: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28AF8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104000u); -#endif - /* 0xBFC28AFC: 01D47021 addu $t6, $t6, $s4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[20]; - PGXP_ALU(0x01D47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28B00: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44010u); -#endif - /* 0xBFC28B04: 024E2021 addu $a0, $s2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[14]; - PGXP_ALU(0x024E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC28B08: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28B0C: 14400002 bne $v0, $zero, 0xBFC28B18 */ - uint32_t psx_brA_BFC28B0C = cpu->gpr[2]; uint32_t psx_brB_BFC28B0C = cpu->gpr[0]; - psx_taken_BFC28B0C = (psx_brA_BFC28B0C != psx_brB_BFC28B0C); - psx_delay_BFC28B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28B10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040B10u); -#endif - if (psx_delay_BFC28B0C) { - psx_delay_BFC28B0C = 0; - if (psx_taken_BFC28B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B18u); - goto label_BFC28B18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B14u); - } -label_BFC28B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28B14: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80040B14u); return; -#ifdef PSX_COSIM - cosim_instr(0x80040B14u); -#endif -label_BFC28B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28B18: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC28B1C: 14410004 bne $v0, $at, 0xBFC28B30 */ - uint32_t psx_brA_BFC28B1C = cpu->gpr[2]; uint32_t psx_brB_BFC28B1C = cpu->gpr[1]; - psx_taken_BFC28B1C = (psx_brA_BFC28B1C != psx_brB_BFC28B1C); - psx_delay_BFC28B1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28B20: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040B20u); -#endif - if (psx_delay_BFC28B1C) { - psx_delay_BFC28B1C = 0; - if (psx_taken_BFC28B1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B30u); - goto label_BFC28B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B24u); - } -label_BFC28B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC28B24: 15E10002 bne $t7, $at, 0xBFC28B30 */ - uint32_t psx_brA_BFC28B24 = cpu->gpr[15]; uint32_t psx_brB_BFC28B24 = cpu->gpr[1]; - psx_taken_BFC28B24 = (psx_brA_BFC28B24 != psx_brB_BFC28B24); - psx_delay_BFC28B24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28B28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040B28u); -#endif - if (psx_delay_BFC28B24) { - psx_delay_BFC28B24 = 0; - if (psx_taken_BFC28B24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B30u); - goto label_BFC28B30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B2Cu); - } -label_BFC28B2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28B2C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80040B2Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x80040B2Cu); -#endif -label_BFC28B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28B30: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80040B38u; /* jal link before delay slot */ - psx_delay_BFC28B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28B34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040B34u); -#endif - if (psx_delay_BFC28B30) { - psx_delay_BFC28B30 = 0; - cpu->gpr[31] = 0x80040B38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC28B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28B38: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040B38u); -#endif - /* 0xBFC28B3C: 8E949E24 lw $s4, -25052($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B3Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E949E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28B40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28B44: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC28B48: 2A810002 slti $at, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0); - PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28B4C: 1420FF61 bne $at, $zero, 0xBFC288D4 */ - uint32_t psx_brA_BFC28B4C = cpu->gpr[1]; uint32_t psx_brB_BFC28B4C = cpu->gpr[0]; - psx_taken_BFC28B4C = (psx_brA_BFC28B4C != psx_brB_BFC28B4C); - psx_delay_BFC28B4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28B50: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040B50u); -#endif - if (psx_delay_BFC28B4C) { - psx_delay_BFC28B4C = 0; - if (psx_taken_BFC28B4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800408D4u); - goto label_BFC288D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040B54u); - } -label_BFC28B54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B54u); -#endif - /* 0xBFC28B54: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC28B58: AC349E24 sw $s4, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B58u); return; } g_debug_last_store_pc = 0x80040B58u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAC349E24u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B58u); -#endif - /* 0xBFC28B5C: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B5Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B60u); -#endif - /* 0xBFC28B60: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B60u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B60u); -#endif - /* 0xBFC28B64: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B64u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B64u); -#endif - /* 0xBFC28B68: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B68u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B68u); -#endif - /* 0xBFC28B6C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B6Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B70u); -#endif - /* 0xBFC28B70: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B70u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B70u); -#endif - /* 0xBFC28B74: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B74u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B74u); -#endif - /* 0xBFC28B78: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B78u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC28B7C: 03E00008 jr $ra */ - psx_delay_BFC28B7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28B80: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80040B80u); -#endif - if (psx_delay_BFC28B7C) { - psx_delay_BFC28B7C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC28B84(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC28B84u); - int psx_delay_BFC28BC4 = 0; - int psx_taken_BFC28BC4 = 0; - int psx_delay_BFC28BD4 = 0; - int psx_taken_BFC28BD4 = 0; - int psx_delay_BFC28BDC = 0; - int psx_taken_BFC28BDC = 0; - int psx_delay_BFC28C38 = 0; - int psx_taken_BFC28C38 = 0; - int psx_delay_BFC28C48 = 0; - int psx_taken_BFC28C48 = 0; - int psx_delay_BFC28C50 = 0; - int psx_taken_BFC28C50 = 0; - int psx_delay_BFC28CB0 = 0; - int psx_delay_BFC28CE4 = 0; - int psx_delay_BFC28D18 = 0; - int psx_delay_BFC28D4C = 0; - int psx_delay_BFC28D80 = 0; - int psx_delay_BFC28DB0 = 0; - int psx_delay_BFC28DE0 = 0; - int psx_delay_BFC28E10 = 0; - int psx_delay_BFC28E40 = 0; - int psx_delay_BFC28E6C = 0; - int psx_delay_BFC28E94 = 0; - int psx_delay_BFC28EC8 = 0; - int psx_delay_BFC28EFC = 0; - int psx_delay_BFC28F30 = 0; - int psx_delay_BFC28F60 = 0; - int psx_delay_BFC28F90 = 0; - int psx_delay_BFC28FC0 = 0; - int psx_delay_BFC28FEC = 0; - int psx_delay_BFC29014 = 0; - int psx_delay_BFC29048 = 0; - int psx_delay_BFC2907C = 0; - int psx_delay_BFC290B0 = 0; - int psx_delay_BFC290E0 = 0; - int psx_delay_BFC29110 = 0; - int psx_delay_BFC29140 = 0; - int psx_delay_BFC2916C = 0; - int psx_delay_BFC2918C = 0; - int psx_taken_BFC2918C = 0; - int psx_delay_BFC291BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC28BCCu: goto label_BFC28BCC; - case 0xBFC28BD0u: goto label_BFC28BD0; - case 0xBFC28BDCu: goto label_BFC28BDC; - case 0xBFC28BE4u: goto label_BFC28BE4; - case 0xBFC28BE8u: goto label_BFC28BE8; - case 0xBFC28C40u: goto label_BFC28C40; - case 0xBFC28C44u: goto label_BFC28C44; - case 0xBFC28C50u: goto label_BFC28C50; - case 0xBFC28C58u: goto label_BFC28C58; - case 0xBFC28C5Cu: goto label_BFC28C5C; - case 0xBFC28C90u: goto label_BFC28C90; - case 0xBFC28CB8u: goto label_BFC28CB8; - case 0xBFC28CECu: goto label_BFC28CEC; - case 0xBFC28D20u: goto label_BFC28D20; - case 0xBFC28D54u: goto label_BFC28D54; - case 0xBFC28D88u: goto label_BFC28D88; - case 0xBFC28DB8u: goto label_BFC28DB8; - case 0xBFC28DE8u: goto label_BFC28DE8; - case 0xBFC28E18u: goto label_BFC28E18; - case 0xBFC28E48u: goto label_BFC28E48; - case 0xBFC28E74u: goto label_BFC28E74; - case 0xBFC28E9Cu: goto label_BFC28E9C; - case 0xBFC28ED0u: goto label_BFC28ED0; - case 0xBFC28F04u: goto label_BFC28F04; - case 0xBFC28F38u: goto label_BFC28F38; - case 0xBFC28F68u: goto label_BFC28F68; - case 0xBFC28F98u: goto label_BFC28F98; - case 0xBFC28FC8u: goto label_BFC28FC8; - case 0xBFC28FF4u: goto label_BFC28FF4; - case 0xBFC2901Cu: goto label_BFC2901C; - case 0xBFC29050u: goto label_BFC29050; - case 0xBFC29084u: goto label_BFC29084; - case 0xBFC290B8u: goto label_BFC290B8; - case 0xBFC290E8u: goto label_BFC290E8; - case 0xBFC29118u: goto label_BFC29118; - case 0xBFC29148u: goto label_BFC29148; - case 0xBFC29174u: goto label_BFC29174; - case 0xBFC29194u: goto label_BFC29194; - default: break; - } - } -label_BFC28B84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28B84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC28B84: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC28B88: AFB60038 sw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B88u); return; } g_debug_last_store_pc = 0x80040B88u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC28B8C: AFBE0040 sw $fp, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B8Cu); return; } g_debug_last_store_pc = 0x80040B8Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0040u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC28B90: AFBF0044 sw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B90u); return; } g_debug_last_store_pc = 0x80040B90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC28B94: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC28B98: AFB7003C sw $s7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040B98u); return; } g_debug_last_store_pc = 0x80040B98u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7003Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B98u); -#endif - /* 0xBFC28B9C: 84C68020 lh $a2, -32736($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -32736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-32736)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040B9Cu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x84C68020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80040B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC28BA0: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BA0u); return; } g_debug_last_store_pc = 0x80040BA0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC28BA4: AFB50034 sw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BA4u); return; } g_debug_last_store_pc = 0x80040BA4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28BA8: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC28BAC: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BACu); return; } g_debug_last_store_pc = 0x80040BACu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC28BB0: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC28BB4: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BB4u); return; } g_debug_last_store_pc = 0x80040BB4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC28BB8: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BB8u); return; } g_debug_last_store_pc = 0x80040BB8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC28BBC: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040BBCu); return; } g_debug_last_store_pc = 0x80040BBCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28BC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC28BC4: 04C10002 bgez $a2, 0xBFC28BD0 */ - uint32_t psx_brA_BFC28BC4 = cpu->gpr[6]; - psx_taken_BFC28BC4 = ((int32_t)psx_brA_BFC28BC4 >= 0); - psx_delay_BFC28BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC28BC8: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040BC8u); -#endif - if (psx_delay_BFC28BC4) { - psx_delay_BFC28BC4 = 0; - if (psx_taken_BFC28BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BD0u); - goto label_BFC28BD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BCCu); - } -label_BFC28BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28BCC: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BCCu); -#endif -label_BFC28BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC28BD0: 0001B043 sra $s6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001B043u, cpu->gpr[22], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC28BD4: 10800004 beq $a0, $zero, 0xBFC28BE8 */ - uint32_t psx_brA_BFC28BD4 = cpu->gpr[4]; uint32_t psx_brB_BFC28BD4 = cpu->gpr[0]; - psx_taken_BFC28BD4 = (psx_brA_BFC28BD4 == psx_brB_BFC28BD4); - psx_delay_BFC28BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28BD8: 24020004 addiu $v0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24020004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BD8u); -#endif - if (psx_delay_BFC28BD4) { - psx_delay_BFC28BD4 = 0; - if (psx_taken_BFC28BD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BE8u); - goto label_BFC28BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BDCu); - } -label_BFC28BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28BDC: 10000002 beq $zero, $zero, 0xBFC28BE8 */ - uint32_t psx_brA_BFC28BDC = cpu->gpr[0]; uint32_t psx_brB_BFC28BDC = cpu->gpr[0]; - psx_taken_BFC28BDC = (psx_brA_BFC28BDC == psx_brB_BFC28BDC); - psx_delay_BFC28BDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28BE0: 24020002 addiu $v0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24020002u, cpu->gpr[2], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BE0u); -#endif - if (psx_delay_BFC28BDC) { - psx_delay_BFC28BDC = 0; - if (psx_taken_BFC28BDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BE8u); - goto label_BFC28BE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040BE4u); - } -label_BFC28BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28BE4: 24020004 addiu $v0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24020004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BE4u); -#endif -label_BFC28BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC28BE8: 00C2001A div $a2, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C2001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80040BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC28BEC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040BF0u); -#endif - /* 0xBFC28BF0: 84638024 lh $v1, -32732($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -32732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-32732)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80040BF0u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x84638024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80040BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28BF4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC28BF8: 00038A00 sll $s1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[3] << 8u; - PGXP_ALU(0x00038A00u, cpu->gpr[17], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80040BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC28BFC: 02238823 subu $s1, $s1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[17] - cpu->gpr[3]; - PGXP_ALU(0x02238823u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC28C00: 0003A080 sll $s4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[20] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003A080u, cpu->gpr[20], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC28C04: 0283A023 subu $s4, $s4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[20] = cpu->gpr[20] - cpu->gpr[3]; - PGXP_ALU(0x0283A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28C08: 0014A0C0 sll $s4, $s4, 3 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 3u; - PGXP_ALU(0x0014A0C0u, cpu->gpr[20], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC28C0C: 0283A021 addu $s4, $s4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[3]; - PGXP_ALU(0x0283A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28C10: 0014A0C0 sll $s4, $s4, 3 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 3u; - PGXP_ALU(0x0014A0C0u, cpu->gpr[20], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC28C14: 3C108014 lui $s0, 0x8014 */ - cpu->gpr[16] = 0x80140000u; - PGXP_ALU(0x3C108014u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC28C18: 3C128014 lui $s2, 0x8014 */ - cpu->gpr[18] = 0x80140000u; - PGXP_ALU(0x3C128014u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC28C1C: 3C138014 lui $s3, 0x8014 */ - cpu->gpr[19] = 0x80140000u; - PGXP_ALU(0x3C138014u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC28C20: 26738CF0 addiu $s3, $s3, -29456 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-29456)); - PGXP_ALU(0x26738CF0u, cpu->gpr[19], _pgx1, 0xFFFF8CF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC28C24: 26528C9C addiu $s2, $s2, -29540 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-29540)); - PGXP_ALU(0x26528C9Cu, cpu->gpr[18], _pgx1, 0xFFFF8C9Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80040C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC28C28: 26108C48 addiu $s0, $s0, -29624 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-29624)); - PGXP_ALU(0x26108C48u, cpu->gpr[16], _pgx1, 0xFFFF8C48u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600001u); -#endif - /* 0xBFC28C2C: 0016A823 subu $s5, $zero, $s6 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[21] = cpu->gpr[0] - cpu->gpr[22]; - PGXP_ALU(0x0016A823u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC28C30: 0000B812 mflo $s7 */ - cpu->gpr[23] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000B812u, cpu->gpr[23], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40800001u); -#endif - /* 0xBFC28C34: 0017F023 subu $fp, $zero, $s7 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[30] = cpu->gpr[0] - cpu->gpr[23]; - PGXP_ALU(0x0017F023u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC28C38: 14400002 bne $v0, $zero, 0xBFC28C44 */ - uint32_t psx_brA_BFC28C38 = cpu->gpr[2]; uint32_t psx_brB_BFC28C38 = cpu->gpr[0]; - psx_taken_BFC28C38 = (psx_brA_BFC28C38 != psx_brB_BFC28C38); - psx_delay_BFC28C38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28C3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040C3Cu); -#endif - if (psx_delay_BFC28C38) { - psx_delay_BFC28C38 = 0; - if (psx_taken_BFC28C38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C44u); - goto label_BFC28C44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C40u); - } -label_BFC28C40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28C40: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80040C40u); return; -#ifdef PSX_COSIM - cosim_instr(0x80040C40u); -#endif -label_BFC28C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28C44: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80040C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC28C48: 14410004 bne $v0, $at, 0xBFC28C5C */ - uint32_t psx_brA_BFC28C48 = cpu->gpr[2]; uint32_t psx_brB_BFC28C48 = cpu->gpr[1]; - psx_taken_BFC28C48 = (psx_brA_BFC28C48 != psx_brB_BFC28C48); - psx_delay_BFC28C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28C4C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C4Cu); -#endif - if (psx_delay_BFC28C48) { - psx_delay_BFC28C48 = 0; - if (psx_taken_BFC28C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C5Cu); - goto label_BFC28C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C50u); - } -label_BFC28C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC28C50: 14C10002 bne $a2, $at, 0xBFC28C5C */ - uint32_t psx_brA_BFC28C50 = cpu->gpr[6]; uint32_t psx_brB_BFC28C50 = cpu->gpr[1]; - psx_taken_BFC28C50 = (psx_brA_BFC28C50 != psx_brB_BFC28C50); - psx_delay_BFC28C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28C54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040C54u); -#endif - if (psx_delay_BFC28C50) { - psx_delay_BFC28C50 = 0; - if (psx_taken_BFC28C50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C5Cu); - goto label_BFC28C5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C58u); - } -label_BFC28C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC28C58: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80040C58u); return; -#ifdef PSX_COSIM - cosim_instr(0x80040C58u); -#endif -label_BFC28C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC28C5C: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC28C60: 0221001A div $s1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[17]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0221001Au, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80040C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC28C64: 00008812 mflo $s1 */ - cpu->gpr[17] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008812u, cpu->gpr[17], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28C68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28C6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC28C70: 0281001A div $s4, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[20]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0281001Au, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80040C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28C74: 0000A012 mflo $s4 */ - cpu->gpr[20] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A012u, cpu->gpr[20], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC28C78: 00118C00 sll $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 16u; - PGXP_ALU(0x00118C00u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28C7C: 0014A400 sll $s4, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 16u; - PGXP_ALU(0x0014A400u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC28C80: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC28C84: 00118C03 sra $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 16u); - PGXP_ALU(0x00118C03u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC28C88: 0014A403 sra $s4, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] >> 16u); - PGXP_ALU(0x0014A403u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC28C8C: AC259E24 sw $a1, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040C8Cu); return; } g_debug_last_store_pc = 0x80040C8Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259E24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040C8Cu); -#endif -label_BFC28C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC28C90: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040C90u); -#endif - /* 0xBFC28C94: 8CA59E24 lw $a1, -25052($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040C94u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59E24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80040C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28C98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC28C9C: 00057080 sll $t6, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00057080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC28CA0: 01C57021 addu $t6, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[5]; - PGXP_ALU(0x01C57021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28CA4: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC28CA8: 01C57021 addu $t6, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[5]; - PGXP_ALU(0x01C57021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28CAC: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28CB0: 0C012043 jal 0xB004810C */ - cpu->gpr[31] = 0x80040CB8u; /* jal link before delay slot */ - psx_delay_BFC28CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14010u); -#endif - /* 0xBFC28CB4: 020E2021 addu $a0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CB4u); -#endif - if (psx_delay_BFC28CB0) { - psx_delay_BFC28CB0 = 0; - cpu->gpr[31] = 0x80040CB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004810Cu); - cpu->pc = 0x8004810Cu; return; - } -label_BFC28CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28CB8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040CB8u); -#endif - /* 0xBFC28CBC: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040CBCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28CC0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28CC4: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28CC8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28CCC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28CD0: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28CD4: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010010u); -#endif - /* 0xBFC28CD8: 02182021 addu $a0, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02182021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28CDC: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28CE0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28CE4: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040CECu; /* jal link before delay slot */ - psx_delay_BFC28CE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28CE8: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040CE8u); return; } g_debug_last_store_pc = 0x80040CE8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040CE8u); -#endif - if (psx_delay_BFC28CE4) { - psx_delay_BFC28CE4 = 0; - cpu->gpr[31] = 0x80040CECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28CEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28CECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28CEC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040CF0u); -#endif - /* 0xBFC28CF0: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040CF0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28CF4: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28CF8: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28CFC: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28D00: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28D04: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28D08: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10110u); -#endif - /* 0xBFC28D0C: 02082021 addu $a0, $s0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[8]; - PGXP_ALU(0x02082021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28D10: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC28D14: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28D18: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040D20u; /* jal link before delay slot */ - psx_delay_BFC28D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28D1C: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D1Cu); return; } g_debug_last_store_pc = 0x80040D1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D1Cu); -#endif - if (psx_delay_BFC28D18) { - psx_delay_BFC28D18 = 0; - cpu->gpr[31] = 0x80040D20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28D20: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040D20u); -#endif - /* 0xBFC28D24: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D24u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28D28: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28D2C: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28D30: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28D34: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28D38: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28D3C: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10410u); -#endif - /* 0xBFC28D40: 020A2021 addu $a0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28D44: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC28D48: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28D4C: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040D54u; /* jal link before delay slot */ - psx_delay_BFC28D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28D50: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D50u); return; } g_debug_last_store_pc = 0x80040D50u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D50u); -#endif - if (psx_delay_BFC28D4C) { - psx_delay_BFC28D4C = 0; - cpu->gpr[31] = 0x80040D54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC28D54: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040D54u); -#endif - /* 0xBFC28D58: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D58u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28D5C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28D60: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28D64: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28D68: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28D6C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28D70: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11010u); -#endif - /* 0xBFC28D74: 020C2021 addu $a0, $s0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[12]; - PGXP_ALU(0x020C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28D78: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28D7C: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28D80: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040D88u; /* jal link before delay slot */ - psx_delay_BFC28D80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28D84: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D84u); return; } g_debug_last_store_pc = 0x80040D84u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D84u); -#endif - if (psx_delay_BFC28D80) { - psx_delay_BFC28D80 = 0; - cpu->gpr[31] = 0x80040D88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC28D88: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040D88u); -#endif - /* 0xBFC28D8C: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040D8Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80040D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28D90: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28D94: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28D98: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28D9C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28DA0: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28DA4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14010u); -#endif - /* 0xBFC28DA8: 020E2021 addu $a0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC28DAC: 02A03021 addu $a2, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28DB0: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040DB8u; /* jal link before delay slot */ - psx_delay_BFC28DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28DB4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DB4u); -#endif - if (psx_delay_BFC28DB0) { - psx_delay_BFC28DB0 = 0; - cpu->gpr[31] = 0x80040DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28DB8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040DB8u); -#endif - /* 0xBFC28DBC: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040DBCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28DC0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28DC4: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28DC8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28DCC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28DD0: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28DD4: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010010u); -#endif - /* 0xBFC28DD8: 02182021 addu $a0, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02182021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28DDC: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28DE0: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040DE8u; /* jal link before delay slot */ - psx_delay_BFC28DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000081u); -#endif - /* 0xBFC28DE4: 03C03821 addu $a3, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DE4u); -#endif - if (psx_delay_BFC28DE0) { - psx_delay_BFC28DE0 = 0; - cpu->gpr[31] = 0x80040DE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28DE8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040DE8u); -#endif - /* 0xBFC28DEC: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040DECu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28DF0: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28DF4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28DF8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28DFC: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28E00: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28E04: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10110u); -#endif - /* 0xBFC28E08: 02082021 addu $a0, $s0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[8]; - PGXP_ALU(0x02082021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28E0C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28E10: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040E18u; /* jal link before delay slot */ - psx_delay_BFC28E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800081u); -#endif - /* 0xBFC28E14: 02E03821 addu $a3, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E14u); -#endif - if (psx_delay_BFC28E10) { - psx_delay_BFC28E10 = 0; - cpu->gpr[31] = 0x80040E18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28E18: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040E18u); -#endif - /* 0xBFC28E1C: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040E1Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80040E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28E20: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28E24: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28E28: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28E2C: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28E30: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28E34: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10410u); -#endif - /* 0xBFC28E38: 020A2021 addu $a0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC28E3C: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28E40: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040E48u; /* jal link before delay slot */ - psx_delay_BFC28E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28E44: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E44u); -#endif - if (psx_delay_BFC28E40) { - psx_delay_BFC28E40 = 0; - cpu->gpr[31] = 0x80040E48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC28E48: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040E48u); -#endif - /* 0xBFC28E4C: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040E4Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80040E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28E50: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28E54: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28E58: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28E5C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28E60: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28E64: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11010u); -#endif - /* 0xBFC28E68: 020C2021 addu $a0, $s0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[12]; - PGXP_ALU(0x020C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28E6C: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x80040E74u; /* jal link before delay slot */ - psx_delay_BFC28E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28E70: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E70u); -#endif - if (psx_delay_BFC28E6C) { - psx_delay_BFC28E6C = 0; - cpu->gpr[31] = 0x80040E74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC28E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC28E74: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040E74u); -#endif - /* 0xBFC28E78: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040E78u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80040E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28E7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28E80: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28E84: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28E88: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28E8C: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28E90: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28E94: 0C012057 jal 0xB004815C */ - cpu->gpr[31] = 0x80040E9Cu; /* jal link before delay slot */ - psx_delay_BFC28E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44010u); -#endif - /* 0xBFC28E98: 024E2021 addu $a0, $s2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[14]; - PGXP_ALU(0x024E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040E98u); -#endif - if (psx_delay_BFC28E94) { - psx_delay_BFC28E94 = 0; - cpu->gpr[31] = 0x80040E9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004815Cu); - cpu->pc = 0x8004815Cu; return; - } -label_BFC28E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28E9C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040EA0u); -#endif - /* 0xBFC28EA0: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040EA0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28EA4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28EA8: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28EAC: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28EB0: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28EB4: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28EB8: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040010u); -#endif - /* 0xBFC28EBC: 02582021 addu $a0, $s2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[24]; - PGXP_ALU(0x02582021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28EC0: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28EC4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28EC8: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040ED0u; /* jal link before delay slot */ - psx_delay_BFC28EC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28ECC: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040ECCu); return; } g_debug_last_store_pc = 0x80040ECCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040ECCu); -#endif - if (psx_delay_BFC28EC8) { - psx_delay_BFC28EC8 = 0; - cpu->gpr[31] = 0x80040ED0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28ED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28ED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28ED0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040ED0u); -#endif - /* 0xBFC28ED4: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040ED4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28ED8: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28EDC: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28EE0: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28EE4: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28EE8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28EEC: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40110u); -#endif - /* 0xBFC28EF0: 02482021 addu $a0, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[8]; - PGXP_ALU(0x02482021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28EF4: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC28EF8: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28EFC: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040F04u; /* jal link before delay slot */ - psx_delay_BFC28EFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28F00: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F00u); return; } g_debug_last_store_pc = 0x80040F00u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F00u); -#endif - if (psx_delay_BFC28EFC) { - psx_delay_BFC28EFC = 0; - cpu->gpr[31] = 0x80040F04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28F04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28F04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28F04: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040F04u); -#endif - /* 0xBFC28F08: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F08u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28F0C: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28F10: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28F14: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28F18: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC28F1C: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC28F20: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40410u); -#endif - /* 0xBFC28F24: 024A2021 addu $a0, $s2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[10]; - PGXP_ALU(0x024A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC28F28: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC28F2C: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28F30: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80040F38u; /* jal link before delay slot */ - psx_delay_BFC28F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC28F34: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F34u); return; } g_debug_last_store_pc = 0x80040F34u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F34u); -#endif - if (psx_delay_BFC28F30) { - psx_delay_BFC28F30 = 0; - cpu->gpr[31] = 0x80040F38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC28F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC28F38: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040F38u); -#endif - /* 0xBFC28F3C: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F3Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28F40: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28F44: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28F48: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28F4C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC28F50: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC28F54: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41010u); -#endif - /* 0xBFC28F58: 024C2021 addu $a0, $s2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[12]; - PGXP_ALU(0x024C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28F5C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28F60: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040F68u; /* jal link before delay slot */ - psx_delay_BFC28F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC28F64: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F64u); -#endif - if (psx_delay_BFC28F60) { - psx_delay_BFC28F60 = 0; - cpu->gpr[31] = 0x80040F68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC28F68: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040F68u); -#endif - /* 0xBFC28F6C: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F6Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28F70: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28F74: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28F78: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28F7C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC28F80: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC28F84: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44010u); -#endif - /* 0xBFC28F88: 024E2021 addu $a0, $s2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[14]; - PGXP_ALU(0x024E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC28F8C: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28F90: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040F98u; /* jal link before delay slot */ - psx_delay_BFC28F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000081u); -#endif - /* 0xBFC28F94: 03C03821 addu $a3, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040F94u); -#endif - if (psx_delay_BFC28F90) { - psx_delay_BFC28F90 = 0; - cpu->gpr[31] = 0x80040F98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC28F98: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040F98u); -#endif - /* 0xBFC28F9C: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040F9Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80040F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC28FA0: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28FA4: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28FA8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28FAC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC28FB0: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC28FB4: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040010u); -#endif - /* 0xBFC28FB8: 02582021 addu $a0, $s2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[24]; - PGXP_ALU(0x02582021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC28FBC: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28FC0: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80040FC8u; /* jal link before delay slot */ - psx_delay_BFC28FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800081u); -#endif - /* 0xBFC28FC4: 02E03821 addu $a3, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FC4u); -#endif - if (psx_delay_BFC28FC0) { - psx_delay_BFC28FC0 = 0; - cpu->gpr[31] = 0x80040FC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC28FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC28FC8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040FC8u); -#endif - /* 0xBFC28FCC: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040FCCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80040FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC28FD0: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28FD4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28FD8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28FDC: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC28FE0: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC28FE4: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80040FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40110u); -#endif - /* 0xBFC28FE8: 02482021 addu $a0, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[8]; - PGXP_ALU(0x02482021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC28FEC: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x80040FF4u; /* jal link before delay slot */ - psx_delay_BFC28FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC28FF0: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80040FF0u); -#endif - if (psx_delay_BFC28FEC) { - psx_delay_BFC28FEC = 0; - cpu->gpr[31] = 0x80040FF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC28FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC28FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC28FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80040FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC28FF4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80040FF4u); -#endif - /* 0xBFC28FF8: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80040FF8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80040FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC28FFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80040FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29000: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29004: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29008: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2900C: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29010: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29014: 0C012057 jal 0xB004815C */ - cpu->gpr[31] = 0x8004101Cu; /* jal link before delay slot */ - psx_delay_BFC29014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80410u); -#endif - /* 0xBFC29018: 026A2021 addu $a0, $s3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[10]; - PGXP_ALU(0x026A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041018u); -#endif - if (psx_delay_BFC29014) { - psx_delay_BFC29014 = 0; - cpu->gpr[31] = 0x8004101Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004815Cu); - cpu->pc = 0x8004815Cu; return; - } -label_BFC2901C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2901Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2901Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2901C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041020u); -#endif - /* 0xBFC29020: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041020u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29024: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29028: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2902C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29030: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29034: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29038: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81010u); -#endif - /* 0xBFC2903C: 026C2021 addu $a0, $s3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[12]; - PGXP_ALU(0x026C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC29040: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29044: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29048: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80041050u; /* jal link before delay slot */ - psx_delay_BFC29048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2904C: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004104Cu); return; } g_debug_last_store_pc = 0x8004104Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004104Cu); -#endif - if (psx_delay_BFC29048) { - psx_delay_BFC29048 = 0; - cpu->gpr[31] = 0x80041050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC29050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29050: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041050u); -#endif - /* 0xBFC29054: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041054u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80041054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29058: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2905C: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29060: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29064: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29068: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2906C: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84010u); -#endif - /* 0xBFC29070: 026E2021 addu $a0, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC29074: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC29078: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2907C: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x80041084u; /* jal link before delay slot */ - psx_delay_BFC2907C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC29080: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041080u); return; } g_debug_last_store_pc = 0x80041080u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041080u); -#endif - if (psx_delay_BFC2907C) { - psx_delay_BFC2907C = 0; - cpu->gpr[31] = 0x80041084u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC29084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29084: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041084u); -#endif - /* 0xBFC29088: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041088u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2908C: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC29090: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC29094: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29098: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2909C: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC290A0: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800410A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080010u); -#endif - /* 0xBFC290A4: 02782021 addu $a0, $s3, $t8 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[24]; - PGXP_ALU(0x02782021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC290A8: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC290AC: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC290B0: 0C01206B jal 0xB00481AC */ - cpu->gpr[31] = 0x800410B8u; /* jal link before delay slot */ - psx_delay_BFC290B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC290B4: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800410B4u); return; } g_debug_last_store_pc = 0x800410B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800410B4u); -#endif - if (psx_delay_BFC290B0) { - psx_delay_BFC290B0 = 0; - cpu->gpr[31] = 0x800410B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481ACu); - cpu->pc = 0x800481ACu; return; - } -label_BFC290B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC290B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC290B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC290B8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800410B8u); -#endif - /* 0xBFC290BC: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800410BCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800410BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC290C0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC290C4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800410C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC290C8: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC290CC: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800410CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC290D0: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC290D4: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800410D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80110u); -#endif - /* 0xBFC290D8: 02682021 addu $a0, $s3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[8]; - PGXP_ALU(0x02682021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC290DC: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC290E0: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x800410E8u; /* jal link before delay slot */ - psx_delay_BFC290E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC290E4: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410E4u); -#endif - if (psx_delay_BFC290E0) { - psx_delay_BFC290E0 = 0; - cpu->gpr[31] = 0x800410E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC290E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC290E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC290E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC290E8: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800410E8u); -#endif - /* 0xBFC290EC: 8D299E24 lw $t1, -25052($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800410ECu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299E24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800410ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800410F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC290F0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800410F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC290F4: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800410F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC290F8: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800410F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC290FC: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800410FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29100: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29104: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80410u); -#endif - /* 0xBFC29108: 026A2021 addu $a0, $s3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[10]; - PGXP_ALU(0x026A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC2910C: 02A03021 addu $a2, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004110Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29110: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80041118u; /* jal link before delay slot */ - psx_delay_BFC29110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000081u); -#endif - /* 0xBFC29114: 03C03821 addu $a3, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041114u); -#endif - if (psx_delay_BFC29110) { - psx_delay_BFC29110 = 0; - cpu->gpr[31] = 0x80041118u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC29118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29118: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041118u); -#endif - /* 0xBFC2911C: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004111Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29120: 24050002 addiu $a1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24050002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29124: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29128: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2912C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004112Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29130: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29134: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81010u); -#endif - /* 0xBFC29138: 026C2021 addu $a0, $s3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[12]; - PGXP_ALU(0x026C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC2913C: 02A03021 addu $a2, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29140: 0C01208B jal 0xB004822C */ - cpu->gpr[31] = 0x80041148u; /* jal link before delay slot */ - psx_delay_BFC29140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800081u); -#endif - /* 0xBFC29144: 02E03821 addu $a3, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041144u); -#endif - if (psx_delay_BFC29140) { - psx_delay_BFC29140 = 0; - cpu->gpr[31] = 0x80041148u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004822Cu); - cpu->pc = 0x8004822Cu; return; - } -label_BFC29148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29148: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041148u); -#endif - /* 0xBFC2914C: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004114Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004114Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC29150: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29154: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29158: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2915C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29160: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29164: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84010u); -#endif - /* 0xBFC29168: 026E2021 addu $a0, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2916C: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x80041174u; /* jal link before delay slot */ - psx_delay_BFC2916C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29170: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041170u); -#endif - if (psx_delay_BFC2916C) { - psx_delay_BFC2916C = 0; - cpu->gpr[31] = 0x80041174u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC29174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29174: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041174u); -#endif - /* 0xBFC29178: 8C429E24 lw $v0, -25052($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041178u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2917C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29180: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29184: AC229E24 sw $v0, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041184u); return; } g_debug_last_store_pc = 0x80041184u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29188: 28410002 slti $at, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0); - PGXP_ALU(0x28410002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2918C: 1420FEC0 bne $at, $zero, 0xBFC28C90 */ - uint32_t psx_brA_BFC2918C = cpu->gpr[1]; uint32_t psx_brB_BFC2918C = cpu->gpr[0]; - psx_taken_BFC2918C = (psx_brA_BFC2918C != psx_brB_BFC2918C); - psx_delay_BFC2918C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29190: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041190u); -#endif - if (psx_delay_BFC2918C) { - psx_delay_BFC2918C = 0; - if (psx_taken_BFC2918C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040C90u); - goto label_BFC28C90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041194u); - } -label_BFC29194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041194u); -#endif - /* 0xBFC29194: 8FBF0044 lw $ra, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041194u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0044u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80041194u); -#endif - /* 0xBFC29198: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041198u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041198u); -#endif - /* 0xBFC2919C: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004119Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411A0u); -#endif - /* 0xBFC291A0: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411A0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800411A0u); -#endif - /* 0xBFC291A4: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411A4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800411A4u); -#endif - /* 0xBFC291A8: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411A8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800411A8u); -#endif - /* 0xBFC291AC: 8FB50034 lw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411ACu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800411ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411B0u); -#endif - /* 0xBFC291B0: 8FB60038 lw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411B0u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800411B0u); -#endif - /* 0xBFC291B4: 8FB7003C lw $s7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411B4u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7003Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x800411B4u); -#endif - /* 0xBFC291B8: 8FBE0040 lw $fp, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411B8u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0040u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x800411B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC291BC: 03E00008 jr $ra */ - psx_delay_BFC291BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC291C0: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x800411C0u); -#endif - if (psx_delay_BFC291BC) { - psx_delay_BFC291BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC291C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC291C4u); - int psx_delay_BFC291E0 = 0; - int psx_taken_BFC291E0 = 0; - int psx_delay_BFC29208 = 0; - int psx_taken_BFC29208 = 0; - int psx_delay_BFC29218 = 0; - int psx_taken_BFC29218 = 0; - int psx_delay_BFC29244 = 0; - int psx_taken_BFC29244 = 0; - int psx_delay_BFC2924C = 0; - int psx_taken_BFC2924C = 0; - int psx_delay_BFC29284 = 0; - int psx_taken_BFC29284 = 0; - int psx_delay_BFC29294 = 0; - int psx_taken_BFC29294 = 0; - int psx_delay_BFC2929C = 0; - int psx_taken_BFC2929C = 0; - int psx_delay_BFC292B0 = 0; - int psx_taken_BFC292B0 = 0; - int psx_delay_BFC292DC = 0; - int psx_taken_BFC292DC = 0; - int psx_delay_BFC29324 = 0; - int psx_taken_BFC29324 = 0; - int psx_delay_BFC2933C = 0; - int psx_taken_BFC2933C = 0; - int psx_delay_BFC29360 = 0; - int psx_taken_BFC29360 = 0; - int psx_delay_BFC293DC = 0; - int psx_delay_BFC29450 = 0; - int psx_delay_BFC29458 = 0; - int psx_taken_BFC29458 = 0; - int psx_delay_BFC294B4 = 0; - int psx_taken_BFC294B4 = 0; - int psx_delay_BFC294C4 = 0; - int psx_taken_BFC294C4 = 0; - int psx_delay_BFC294CC = 0; - int psx_taken_BFC294CC = 0; - int psx_delay_BFC294DC = 0; - int psx_delay_BFC29550 = 0; - int psx_taken_BFC29550 = 0; - int psx_delay_BFC29560 = 0; - int psx_taken_BFC29560 = 0; - int psx_delay_BFC29568 = 0; - int psx_taken_BFC29568 = 0; - int psx_delay_BFC295A4 = 0; - int psx_taken_BFC295A4 = 0; - int psx_delay_BFC295B4 = 0; - int psx_taken_BFC295B4 = 0; - int psx_delay_BFC295BC = 0; - int psx_taken_BFC295BC = 0; - int psx_delay_BFC295D4 = 0; - int psx_delay_BFC29638 = 0; - int psx_taken_BFC29638 = 0; - int psx_delay_BFC29648 = 0; - int psx_taken_BFC29648 = 0; - int psx_delay_BFC29650 = 0; - int psx_taken_BFC29650 = 0; - int psx_delay_BFC2965C = 0; - int psx_delay_BFC296D0 = 0; - int psx_taken_BFC296D0 = 0; - int psx_delay_BFC296E0 = 0; - int psx_taken_BFC296E0 = 0; - int psx_delay_BFC296E8 = 0; - int psx_taken_BFC296E8 = 0; - int psx_delay_BFC29724 = 0; - int psx_taken_BFC29724 = 0; - int psx_delay_BFC29734 = 0; - int psx_taken_BFC29734 = 0; - int psx_delay_BFC2973C = 0; - int psx_taken_BFC2973C = 0; - int psx_delay_BFC29754 = 0; - int psx_delay_BFC29768 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC291E8u: goto label_BFC291E8; - case 0xBFC29210u: goto label_BFC29210; - case 0xBFC29214u: goto label_BFC29214; - case 0xBFC29220u: goto label_BFC29220; - case 0xBFC29224u: goto label_BFC29224; - case 0xBFC2924Cu: goto label_BFC2924C; - case 0xBFC29254u: goto label_BFC29254; - case 0xBFC29258u: goto label_BFC29258; - case 0xBFC2928Cu: goto label_BFC2928C; - case 0xBFC29290u: goto label_BFC29290; - case 0xBFC2929Cu: goto label_BFC2929C; - case 0xBFC292A4u: goto label_BFC292A4; - case 0xBFC292A8u: goto label_BFC292A8; - case 0xBFC292B8u: goto label_BFC292B8; - case 0xBFC292BCu: goto label_BFC292BC; - case 0xBFC292E4u: goto label_BFC292E4; - case 0xBFC292E8u: goto label_BFC292E8; - case 0xBFC2932Cu: goto label_BFC2932C; - case 0xBFC29344u: goto label_BFC29344; - case 0xBFC29350u: goto label_BFC29350; - case 0xBFC29368u: goto label_BFC29368; - case 0xBFC293E4u: goto label_BFC293E4; - case 0xBFC29458u: goto label_BFC29458; - case 0xBFC29460u: goto label_BFC29460; - case 0xBFC294BCu: goto label_BFC294BC; - case 0xBFC294C0u: goto label_BFC294C0; - case 0xBFC294CCu: goto label_BFC294CC; - case 0xBFC294D4u: goto label_BFC294D4; - case 0xBFC294D8u: goto label_BFC294D8; - case 0xBFC294E4u: goto label_BFC294E4; - case 0xBFC29558u: goto label_BFC29558; - case 0xBFC2955Cu: goto label_BFC2955C; - case 0xBFC29568u: goto label_BFC29568; - case 0xBFC29570u: goto label_BFC29570; - case 0xBFC29574u: goto label_BFC29574; - case 0xBFC295ACu: goto label_BFC295AC; - case 0xBFC295B0u: goto label_BFC295B0; - case 0xBFC295BCu: goto label_BFC295BC; - case 0xBFC295C4u: goto label_BFC295C4; - case 0xBFC295C8u: goto label_BFC295C8; - case 0xBFC295DCu: goto label_BFC295DC; - case 0xBFC29640u: goto label_BFC29640; - case 0xBFC29644u: goto label_BFC29644; - case 0xBFC29650u: goto label_BFC29650; - case 0xBFC29658u: goto label_BFC29658; - case 0xBFC2965Cu: goto label_BFC2965C; - case 0xBFC29664u: goto label_BFC29664; - case 0xBFC296D8u: goto label_BFC296D8; - case 0xBFC296DCu: goto label_BFC296DC; - case 0xBFC296E8u: goto label_BFC296E8; - case 0xBFC296F0u: goto label_BFC296F0; - case 0xBFC296F4u: goto label_BFC296F4; - case 0xBFC2972Cu: goto label_BFC2972C; - case 0xBFC29730u: goto label_BFC29730; - case 0xBFC2973Cu: goto label_BFC2973C; - case 0xBFC29744u: goto label_BFC29744; - case 0xBFC29748u: goto label_BFC29748; - case 0xBFC2975Cu: goto label_BFC2975C; - case 0xBFC29760u: goto label_BFC29760; - default: break; - } - } -label_BFC291C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC291C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC291C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC291C4: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC291C8: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC291CC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800411CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC291D0: 00051C00 sll $v1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00051C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC291D4: 00064400 sll $t0, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00064400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC291D8: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC291DC: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800411DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC291E0: 10800052 beq $a0, $zero, 0xBFC2932C */ - uint32_t psx_brA_BFC291E0 = cpu->gpr[4]; uint32_t psx_brB_BFC291E0 = cpu->gpr[0]; - psx_taken_BFC291E0 = (psx_brA_BFC291E0 == psx_brB_BFC291E0); - psx_delay_BFC291E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC291E4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411E4u); return; } g_debug_last_store_pc = 0x800411E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800411E4u); -#endif - if (psx_delay_BFC291E0) { - psx_delay_BFC291E0 = 0; - if (psx_taken_BFC291E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004132Cu); - goto label_BFC2932C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800411E8u); - } -label_BFC291E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC291E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC291E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC291E8: 240E1000 addiu $t6, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240E1000u, cpu->gpr[14], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x800411E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC291EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800411ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800411F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC291F0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800411F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC291F4: AC2E3F78 sw $t6, 16248($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16248; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800411F4u); return; } g_debug_last_store_pc = 0x800411F4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E3F78u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800411F4u); -#endif - /* 0xBFC291F8: 84848020 lh $a0, -32736($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -32736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-32736)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800411F8u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x84848020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800411F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC291FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800411FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC29200: 240F08D2 addiu $t7, $zero, 2258 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2258)); - PGXP_ALU(0x240F08D2u, cpu->gpr[15], _pgx1, 0x000008D2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC29204: AC2F3F7C sw $t7, 16252($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16252; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041204u); return; } g_debug_last_store_pc = 0x80041204u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F3F7Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29208: 04810002 bgez $a0, 0xBFC29214 */ - uint32_t psx_brA_BFC29208 = cpu->gpr[4]; - psx_taken_BFC29208 = ((int32_t)psx_brA_BFC29208 >= 0); - psx_delay_BFC29208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC2920C: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004120Cu); -#endif - if (psx_delay_BFC29208) { - psx_delay_BFC29208 = 0; - if (psx_taken_BFC29208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041214u); - goto label_BFC29214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041210u); - } -label_BFC29210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29210: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80041210u); -#endif -label_BFC29214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC29214: 00012883 sra $a1, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x00012883u, cpu->gpr[5], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29218: 04810002 bgez $a0, 0xBFC29224 */ - uint32_t psx_brA_BFC29218 = cpu->gpr[4]; - psx_taken_BFC29218 = ((int32_t)psx_brA_BFC29218 >= 0); - psx_delay_BFC29218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC2921C: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004121Cu); -#endif - if (psx_delay_BFC29218) { - psx_delay_BFC29218 = 0; - if (psx_taken_BFC29218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041224u); - goto label_BFC29224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041220u); - } -label_BFC29220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29220: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80041220u); -#endif -label_BFC29224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC29224: 00013103 sra $a2, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00013103u, cpu->gpr[6], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000060u); -#endif - /* 0xBFC29228: 00A6C021 addu $t8, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[5] + cpu->gpr[6]; - PGXP_ALU(0x00A6C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2922C: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004122Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC29230: 0338C823 subu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[24]; - PGXP_ALU(0x0338C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29234: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80041234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC29238: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2923C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29240: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC29244: 10600003 beq $v1, $zero, 0xBFC29254 */ - uint32_t psx_brA_BFC29244 = cpu->gpr[3]; uint32_t psx_brB_BFC29244 = cpu->gpr[0]; - psx_taken_BFC29244 = (psx_brA_BFC29244 == psx_brB_BFC29244); - psx_delay_BFC29244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC29248: A4393F6A sh $t9, 16234($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16234; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041248u); return; } g_debug_last_store_pc = 0x80041248u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4393F6Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041248u); -#endif - if (psx_delay_BFC29244) { - psx_delay_BFC29244 = 0; - if (psx_taken_BFC29244) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041254u); - goto label_BFC29254; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004124Cu); - } -label_BFC2924C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2924Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2924Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004124Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2924C: 10000002 beq $zero, $zero, 0xBFC29258 */ - uint32_t psx_brA_BFC2924C = cpu->gpr[0]; uint32_t psx_brB_BFC2924C = cpu->gpr[0]; - psx_taken_BFC2924C = (psx_brA_BFC2924C == psx_brB_BFC2924C); - psx_delay_BFC2924C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC29250: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041250u); -#endif - if (psx_delay_BFC2924C) { - psx_delay_BFC2924C = 0; - if (psx_taken_BFC2924C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041258u); - goto label_BFC29258; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041254u); - } -label_BFC29254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC29254: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041254u); -#endif -label_BFC29258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x260u); -#endif - /* 0xBFC29258: 00A64823 subu $t1, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[5] - cpu->gpr[6]; - PGXP_ALU(0x00A64823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2925C: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004125Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29260: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29264: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80041264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29268: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2926C: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004126Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC29270: 0143001A div $t2, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[10]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0143001Au, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80041270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1011u); -#endif - /* 0xBFC29274: 00046023 subu $t4, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00046023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29278: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2927C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004127Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29280: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC29284: 14600002 bne $v1, $zero, 0xBFC29290 */ - uint32_t psx_brA_BFC29284 = cpu->gpr[3]; uint32_t psx_brB_BFC29284 = cpu->gpr[0]; - psx_taken_BFC29284 = (psx_brA_BFC29284 != psx_brB_BFC29284); - psx_delay_BFC29284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041288u); -#endif - if (psx_delay_BFC29284) { - psx_delay_BFC29284 = 0; - if (psx_taken_BFC29284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041290u); - goto label_BFC29290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004128Cu); - } -label_BFC2928C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2928Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2928Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004128Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2928C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004128Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004128Cu); -#endif -label_BFC29290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29290: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC29294: 14610004 bne $v1, $at, 0xBFC292A8 */ - uint32_t psx_brA_BFC29294 = cpu->gpr[3]; uint32_t psx_brB_BFC29294 = cpu->gpr[1]; - psx_taken_BFC29294 = (psx_brA_BFC29294 != psx_brB_BFC29294); - psx_delay_BFC29294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29298: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041298u); -#endif - if (psx_delay_BFC29294) { - psx_delay_BFC29294 = 0; - if (psx_taken_BFC29294) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412A8u); - goto label_BFC292A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004129Cu); - } -label_BFC2929C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2929Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2929Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2929C: 15410002 bne $t2, $at, 0xBFC292A8 */ - uint32_t psx_brA_BFC2929C = cpu->gpr[10]; uint32_t psx_brB_BFC2929C = cpu->gpr[1]; - psx_taken_BFC2929C = (psx_brA_BFC2929C != psx_brB_BFC2929C); - psx_delay_BFC2929C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC292A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800412A0u); -#endif - if (psx_delay_BFC2929C) { - psx_delay_BFC2929C = 0; - if (psx_taken_BFC2929C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412A8u); - goto label_BFC292A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412A4u); - } -label_BFC292A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC292A4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800412A4u); return; -#ifdef PSX_COSIM - cosim_instr(0x800412A4u); -#endif -label_BFC292A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC292A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800412A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC292AC: A42B3F6C sh $t3, 16236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800412ACu); return; } g_debug_last_store_pc = 0x800412ACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA42B3F6Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800412ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC292B0: 05810002 bgez $t4, 0xBFC292BC */ - uint32_t psx_brA_BFC292B0 = cpu->gpr[12]; - psx_taken_BFC292B0 = ((int32_t)psx_brA_BFC292B0 >= 0); - psx_delay_BFC292B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1003u); -#endif - /* 0xBFC292B4: 01800821 addu $at, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412B4u); -#endif - if (psx_delay_BFC292B0) { - psx_delay_BFC292B0 = 0; - if (psx_taken_BFC292B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412BCu); - goto label_BFC292BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412B8u); - } -label_BFC292B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC292B8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800412B8u); -#endif -label_BFC292BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC292BC: 00016843 sra $t5, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00016843u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800412BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC292C0: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800412C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC292C4: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC292C8: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800412C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC292CC: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC292D0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800412D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC292D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800412D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC292D8: A42E3F6E sh $t6, 16238($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16238; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16238)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800412D8u); return; } g_debug_last_store_pc = 0x800412D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42E3F6Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800412D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC292DC: 04810002 bgez $a0, 0xBFC292E8 */ - uint32_t psx_brA_BFC292DC = cpu->gpr[4]; - psx_taken_BFC292DC = ((int32_t)psx_brA_BFC292DC >= 0); - psx_delay_BFC292DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC292E0: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412E0u); -#endif - if (psx_delay_BFC292DC) { - psx_delay_BFC292DC = 0; - if (psx_taken_BFC292DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412E8u); - goto label_BFC292E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800412E4u); - } -label_BFC292E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC292E4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800412E4u); -#endif -label_BFC292E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC292E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC292E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC292E8: 00017843 sra $t7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017843u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800412E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC292EC: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800412ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800412F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC292F0: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC292F4: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800412F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC292F8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800412F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC292FC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800412FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29300: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC29304: A4383F72 sh $t8, 16242($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16242; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16242)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041304u); return; } g_debug_last_store_pc = 0x80041304u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4383F72u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29308: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2930C: A4203F74 sh $zero, 16244($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16244)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004130Cu); return; } g_debug_last_store_pc = 0x8004130Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4203F74u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29310: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29314: A4203F70 sh $zero, 16240($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16240; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16240)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041314u); return; } g_debug_last_store_pc = 0x80041314u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4203F70u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29318: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2931C: AC283F80 sw $t0, 16256($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004131Cu); return; } g_debug_last_store_pc = 0x8004131Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC283F80u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004131Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29320: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29324: 1000010E beq $zero, $zero, 0xBFC29760 */ - uint32_t psx_brA_BFC29324 = cpu->gpr[0]; uint32_t psx_brB_BFC29324 = cpu->gpr[0]; - psx_taken_BFC29324 = (psx_brA_BFC29324 == psx_brB_BFC29324); - psx_delay_BFC29324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29328: A4273F68 sh $a3, 16232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041328u); return; } g_debug_last_store_pc = 0x80041328u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4273F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041328u); -#endif - if (psx_delay_BFC29324) { - psx_delay_BFC29324 = 0; - if (psx_taken_BFC29324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041760u); - goto label_BFC29760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004132Cu); - } -label_BFC2932C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2932Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2932C: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041330u); -#endif - /* 0xBFC29330: 84E73F68 lh $a3, 16232($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041330u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x84E73F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29334: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29338: 28E11000 slti $at, $a3, 4096 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (4096) ? 1 : 0); - PGXP_ALU(0x28E11000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80041338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2933C: 10200004 beq $at, $zero, 0xBFC29350 */ - uint32_t psx_brA_BFC2933C = cpu->gpr[1]; uint32_t psx_brB_BFC2933C = cpu->gpr[0]; - psx_taken_BFC2933C = (psx_brA_BFC2933C == psx_brB_BFC2933C); - psx_delay_BFC2933C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041340u); -#endif - if (psx_delay_BFC2933C) { - psx_delay_BFC2933C = 0; - if (psx_taken_BFC2933C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041350u); - goto label_BFC29350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041344u); - } -label_BFC29344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC29344: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC29348: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80041348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2934C: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004134Cu); -#endif -label_BFC29350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29350: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041350u); -#endif - /* 0xBFC29354: 8C423F80 lw $v0, 16256($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041354u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423F80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29358: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x86u); -#endif - /* 0xBFC2935C: 0047082A slt $at, $v0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x0047082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29360: 1020003F beq $at, $zero, 0xBFC29460 */ - uint32_t psx_brA_BFC29360 = cpu->gpr[1]; uint32_t psx_brB_BFC29360 = cpu->gpr[0]; - psx_taken_BFC29360 = (psx_brA_BFC29360 == psx_brB_BFC29360); - psx_delay_BFC29360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29364: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041364u); -#endif - if (psx_delay_BFC29360) { - psx_delay_BFC29360 = 0; - if (psx_taken_BFC29360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041460u); - goto label_BFC29460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041368u); - } -label_BFC29368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29368: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2936C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041370u); -#endif - /* 0xBFC29370: 858C3F6A lh $t4, 16234($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 16234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (16234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041370u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x858C3F6Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80041370u); -#endif - /* 0xBFC29374: 856B3F6E lh $t3, 16238($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16238; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16238)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041374u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x856B3F6Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29378: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2937C: A4273F68 sh $a3, 16232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004137Cu); return; } g_debug_last_store_pc = 0x8004137Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4273F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004137Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29380: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1820u); -#endif - /* 0xBFC29384: 016C2821 addu $a1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC29388: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80041388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2938C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29390: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041390u); -#endif - /* 0xBFC29394: 85CE3F6C lh $t6, 16236($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041394u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CE3F6Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041394u); -#endif - /* 0xBFC29398: 85AD3F70 lh $t5, 16240($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 16240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (16240)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041398u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x85AD3F70u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80041398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2939C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004139Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6040u); -#endif - /* 0xBFC293A0: 01AE3023 subu $a2, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[6] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE3023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800413A0u); -#endif - /* 0xBFC293A4: 8F399E24 lw $t9, -25052($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800413A4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399E24u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800413A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC293A8: 3C0A8014 lui $t2, 0x8014 */ - cpu->gpr[10] = 0x80140000u; - PGXP_ALU(0x3C0A8014u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800413A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC293AC: 00194880 sll $t1, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800413ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC293B0: 01394821 addu $t1, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[25]; - PGXP_ALU(0x01394821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800413B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC293B4: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800413B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC293B8: 01394821 addu $t1, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[25]; - PGXP_ALU(0x01394821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800413B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC293BC: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800413BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC293C0: 254A8C9C addiu $t2, $t2, -29540 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-29540)); - PGXP_ALU(0x254A8C9Cu, cpu->gpr[10], _pgx1, 0xFFFF8C9Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800413C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC293C4: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800413C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC293C8: 00002812 mflo $a1 */ - cpu->gpr[5] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002812u, cpu->gpr[5], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800413C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC293CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800413CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC293D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800413D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC293D4: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800413D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC293D8: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800413D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC293DC: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x800413E4u; /* jal link before delay slot */ - psx_delay_BFC293DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC293E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800413E0u); -#endif - if (psx_delay_BFC293DC) { - psx_delay_BFC293DC = 0; - cpu->gpr[31] = 0x800413E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC293E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC293E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC293E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC293E4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800413E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC293E8: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800413E8u); -#endif - /* 0xBFC293EC: 854A3F6A lh $t2, 16234($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800413ECu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x854A3F6Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800413ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800413F0u); -#endif - /* 0xBFC293F0: 85293F72 lh $t1, 16242($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 16242; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (16242)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800413F0u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x85293F72u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800413F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC293F4: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800413F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x620u); -#endif - /* 0xBFC293F8: 012A2823 subu $a1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A2823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800413F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC293FC: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800413FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29400: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29404: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041404u); -#endif - /* 0xBFC29408: 858C3F6C lh $t4, 16236($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 16236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (16236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041408u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x858C3F6Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80041408u); -#endif - /* 0xBFC2940C: 856B3F74 lh $t3, 16244($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16244)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004140Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x856B3F74u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004140Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29410: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1840u); -#endif - /* 0xBFC29414: 016C3021 addu $a2, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[6] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041414u); -#endif - /* 0xBFC29418: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041418u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2941C: 3C198014 lui $t9, 0x8014 */ - cpu->gpr[25] = 0x80140000u; - PGXP_ALU(0x3C198014u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC29420: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC29424: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29428: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2942C: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29430: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29434: 27398CF0 addiu $t9, $t9, -29456 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-29456)); - PGXP_ALU(0x27398CF0u, cpu->gpr[25], _pgx1, 0xFFFF8CF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC29438: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2943C: 00002812 mflo $a1 */ - cpu->gpr[5] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002812u, cpu->gpr[5], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004143Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29440: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29444: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC29448: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80041448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2944C: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004144Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29450: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x80041458u; /* jal link before delay slot */ - psx_delay_BFC29450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041454u); -#endif - if (psx_delay_BFC29450) { - psx_delay_BFC29450 = 0; - cpu->gpr[31] = 0x80041458u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC29458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29458: 100000C1 beq $zero, $zero, 0xBFC29760 */ - uint32_t psx_brA_BFC29458 = cpu->gpr[0]; uint32_t psx_brB_BFC29458 = cpu->gpr[0]; - psx_taken_BFC29458 = (psx_brA_BFC29458 == psx_brB_BFC29458); - psx_delay_BFC29458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2945C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004145Cu); -#endif - if (psx_delay_BFC29458) { - psx_delay_BFC29458 = 0; - if (psx_taken_BFC29458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041760u); - goto label_BFC29760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041460u); - } -label_BFC29460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29460: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041460u); -#endif - /* 0xBFC29464: 8F393F7C lw $t9, 16252($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 16252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (16252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041464u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F393F7Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29468: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2946C: 03270019 multu $t9, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03270019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041470u); -#endif - /* 0xBFC29470: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041470u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80041470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29474: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29478: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2947C: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29480: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041480u); -#endif - /* 0xBFC29484: 8F183F78 lw $t8, 16248($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16248; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041484u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183F78u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29488: 3C0F8014 lui $t7, 0x8014 */ - cpu->gpr[15] = 0x80140000u; - PGXP_ALU(0x3C0F8014u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2948C: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29490: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29494: 25EF8C9C addiu $t7, $t7, -29540 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-29540)); - PGXP_ALU(0x25EF8C9Cu, cpu->gpr[15], _pgx1, 0xFFFF8C9Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC29498: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2949C: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC294A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800414A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC294A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800414A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC294A8: 0122001A div $t1, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[9]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0122001Au, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800414A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC294AC: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000420u); -#endif - /* 0xBFC294B0: 030A2823 subu $a1, $t8, $t2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[24] - cpu->gpr[10]; - PGXP_ALU(0x030A2823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800414B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC294B4: 14400002 bne $v0, $zero, 0xBFC294C0 */ - uint32_t psx_brA_BFC294B4 = cpu->gpr[2]; uint32_t psx_brB_BFC294B4 = cpu->gpr[0]; - psx_taken_BFC294B4 = (psx_brA_BFC294B4 != psx_brB_BFC294B4); - psx_delay_BFC294B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC294B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800414B8u); -#endif - if (psx_delay_BFC294B4) { - psx_delay_BFC294B4 = 0; - if (psx_taken_BFC294B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414C0u); - goto label_BFC294C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414BCu); - } -label_BFC294BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC294BC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800414BCu); return; -#ifdef PSX_COSIM - cosim_instr(0x800414BCu); -#endif -label_BFC294C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC294C0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800414C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC294C4: 14410004 bne $v0, $at, 0xBFC294D8 */ - uint32_t psx_brA_BFC294C4 = cpu->gpr[2]; uint32_t psx_brB_BFC294C4 = cpu->gpr[1]; - psx_taken_BFC294C4 = (psx_brA_BFC294C4 != psx_brB_BFC294C4); - psx_delay_BFC294C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC294C8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414C8u); -#endif - if (psx_delay_BFC294C4) { - psx_delay_BFC294C4 = 0; - if (psx_taken_BFC294C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414D8u); - goto label_BFC294D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414CCu); - } -label_BFC294CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC294CC: 15210002 bne $t1, $at, 0xBFC294D8 */ - uint32_t psx_brA_BFC294CC = cpu->gpr[9]; uint32_t psx_brB_BFC294CC = cpu->gpr[1]; - psx_taken_BFC294CC = (psx_brA_BFC294CC != psx_brB_BFC294CC); - psx_delay_BFC294CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC294D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800414D0u); -#endif - if (psx_delay_BFC294CC) { - psx_delay_BFC294CC = 0; - if (psx_taken_BFC294CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414D8u); - goto label_BFC294D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800414D4u); - } -label_BFC294D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC294D4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800414D4u); return; -#ifdef PSX_COSIM - cosim_instr(0x800414D4u); -#endif -label_BFC294D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC294D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC294DC: 0C0120A7 jal 0xB004829C */ - cpu->gpr[31] = 0x800414E4u; /* jal link before delay slot */ - psx_delay_BFC294DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC294E0: A4273F68 sh $a3, 16232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800414E0u); return; } g_debug_last_store_pc = 0x800414E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4273F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800414E0u); -#endif - if (psx_delay_BFC294DC) { - psx_delay_BFC294DC = 0; - cpu->gpr[31] = 0x800414E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004829Cu); - cpu->pc = 0x8004829Cu; return; - } -label_BFC294E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC294E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC294E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC294E4: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC294E8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414E8u); -#endif - /* 0xBFC294EC: 84E73F68 lh $a3, 16232($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800414ECu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x84E73F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800414ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800414F0u); -#endif - /* 0xBFC294F0: 85EF3F6A lh $t7, 16234($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 16234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (16234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800414F0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EF3F6Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800414F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC294F4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800414F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC294F8: 01E70019 multu $t7, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[15] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[15])); -#endif - PGXP_MULDIV(0x01E70019u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x800414F8u); -#endif - /* 0xBFC294FC: 8C423F80 lw $v0, 16256($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800414FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423F80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800414FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29500: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041500u); -#endif - /* 0xBFC29504: 85CE3F6E lh $t6, 16238($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16238; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16238)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041504u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CE3F6Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29508: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041508u); -#endif - /* 0xBFC2950C: 854A3F6C lh $t2, 16236($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004150Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x854A3F6Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29510: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041510u); -#endif - /* 0xBFC29514: 8D6B9E24 lw $t3, -25052($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041514u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9E24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29518: 3C0D8014 lui $t5, 0x8014 */ - cpu->gpr[13] = 0x80140000u; - PGXP_ALU(0x3C0D8014u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2951C: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004151Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29520: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29524: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29528: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2952C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29530: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC29534: 0322001A div $t9, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0322001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80041534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29538: 25AD8C9C addiu $t5, $t5, -29540 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-29540)); - PGXP_ALU(0x25AD8C9Cu, cpu->gpr[13], _pgx1, 0xFFFF8C9Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC2953C: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29540: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041540u); -#endif - /* 0xBFC29544: 87183F70 lh $t8, 16240($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16240)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041544u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x87183F70u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29548: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4220u); -#endif - /* 0xBFC2954C: 01C92821 addu $a1, $t6, $t1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[9]; - PGXP_ALU(0x01C92821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29550: 14400002 bne $v0, $zero, 0xBFC2955C */ - uint32_t psx_brA_BFC29550 = cpu->gpr[2]; uint32_t psx_brB_BFC29550 = cpu->gpr[0]; - psx_taken_BFC29550 = (psx_brA_BFC29550 != psx_brB_BFC29550); - psx_delay_BFC29550 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041554u); -#endif - if (psx_delay_BFC29550) { - psx_delay_BFC29550 = 0; - if (psx_taken_BFC29550) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004155Cu); - goto label_BFC2955C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041558u); - } -label_BFC29558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29558: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80041558u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041558u); -#endif -label_BFC2955C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2955Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2955C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29560: 14410004 bne $v0, $at, 0xBFC29574 */ - uint32_t psx_brA_BFC29560 = cpu->gpr[2]; uint32_t psx_brB_BFC29560 = cpu->gpr[1]; - psx_taken_BFC29560 = (psx_brA_BFC29560 != psx_brB_BFC29560); - psx_delay_BFC29560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29564: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041564u); -#endif - if (psx_delay_BFC29560) { - psx_delay_BFC29560 = 0; - if (psx_taken_BFC29560) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041574u); - goto label_BFC29574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041568u); - } -label_BFC29568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC29568: 17210002 bne $t9, $at, 0xBFC29574 */ - uint32_t psx_brA_BFC29568 = cpu->gpr[25]; uint32_t psx_brB_BFC29568 = cpu->gpr[1]; - psx_taken_BFC29568 = (psx_brA_BFC29568 != psx_brB_BFC29568); - psx_delay_BFC29568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2956C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004156Cu); -#endif - if (psx_delay_BFC29568) { - psx_delay_BFC29568 = 0; - if (psx_taken_BFC29568) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041574u); - goto label_BFC29574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041570u); - } -label_BFC29570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29570: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80041570u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041570u); -#endif -label_BFC29574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29574: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC29578: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80041578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2957C: 00002812 mflo $a1 */ - cpu->gpr[5] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002812u, cpu->gpr[5], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004157Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29584: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC29588: 01470019 multu $t2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x01470019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2958C: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC29598: 0162001A div $t3, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[11]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0162001Au, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80041598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2959C: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004159Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001040u); -#endif - /* 0xBFC295A0: 030C3023 subu $a2, $t8, $t4 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[6] = cpu->gpr[24] - cpu->gpr[12]; - PGXP_ALU(0x030C3023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800415A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC295A4: 14400002 bne $v0, $zero, 0xBFC295B0 */ - uint32_t psx_brA_BFC295A4 = cpu->gpr[2]; uint32_t psx_brB_BFC295A4 = cpu->gpr[0]; - psx_taken_BFC295A4 = (psx_brA_BFC295A4 != psx_brB_BFC295A4); - psx_delay_BFC295A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC295A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800415A8u); -#endif - if (psx_delay_BFC295A4) { - psx_delay_BFC295A4 = 0; - if (psx_taken_BFC295A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415B0u); - goto label_BFC295B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415ACu); - } -label_BFC295AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC295AC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800415ACu); return; -#ifdef PSX_COSIM - cosim_instr(0x800415ACu); -#endif -label_BFC295B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC295B0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800415B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC295B4: 14410004 bne $v0, $at, 0xBFC295C8 */ - uint32_t psx_brA_BFC295B4 = cpu->gpr[2]; uint32_t psx_brB_BFC295B4 = cpu->gpr[1]; - psx_taken_BFC295B4 = (psx_brA_BFC295B4 != psx_brB_BFC295B4); - psx_delay_BFC295B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC295B8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415B8u); -#endif - if (psx_delay_BFC295B4) { - psx_delay_BFC295B4 = 0; - if (psx_taken_BFC295B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415C8u); - goto label_BFC295C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415BCu); - } -label_BFC295BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC295BC: 15610002 bne $t3, $at, 0xBFC295C8 */ - uint32_t psx_brA_BFC295BC = cpu->gpr[11]; uint32_t psx_brB_BFC295BC = cpu->gpr[1]; - psx_taken_BFC295BC = (psx_brA_BFC295BC != psx_brB_BFC295BC); - psx_delay_BFC295BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC295C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800415C0u); -#endif - if (psx_delay_BFC295BC) { - psx_delay_BFC295BC = 0; - if (psx_taken_BFC295BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415C8u); - goto label_BFC295C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800415C4u); - } -label_BFC295C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC295C4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800415C4u); return; -#ifdef PSX_COSIM - cosim_instr(0x800415C4u); -#endif -label_BFC295C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC295C8: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800415C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC295CC: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800415CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC295D0: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC295D4: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x800415DCu; /* jal link before delay slot */ - psx_delay_BFC295D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC295D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800415D8u); -#endif - if (psx_delay_BFC295D4) { - psx_delay_BFC295D4 = 0; - cpu->gpr[31] = 0x800415DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC295DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC295DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC295DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC295DC: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC295E0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415E0u); -#endif - /* 0xBFC295E4: 84E73F68 lh $a3, 16232($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800415E4u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x84E73F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800415E4u); -#endif - /* 0xBFC295E8: 8DCE3F7C lw $t6, 16252($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800415E8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE3F7Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800415E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC295EC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800415F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC295F0: 01C70019 multu $t6, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C70019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x800415F0u); -#endif - /* 0xBFC295F4: 8D4A3F80 lw $t2, 16256($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800415F4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A3F80u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800415F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC295F8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800415F8u); -#endif - /* 0xBFC295FC: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800415FCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800415FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29600: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC29604: 000D7880 sll $t7, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC29608: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2960C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041610u); -#endif - /* 0xBFC29610: 8F183F78 lw $t8, 16248($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16248; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041610u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F183F78u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29614: 3C198014 lui $t9, 0x8014 */ - cpu->gpr[25] = 0x80140000u; - PGXP_ALU(0x3C198014u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC29618: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2961C: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004161Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29620: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29624: 27398CF0 addiu $t9, $t9, -29456 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-29456)); - PGXP_ALU(0x27398CF0u, cpu->gpr[25], _pgx1, 0xFFFF8CF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008010u); -#endif - /* 0xBFC29628: 01F92021 addu $a0, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[25]; - PGXP_ALU(0x01F92021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2962C: 012A001A div $t1, $t2 */ - { int32_t psx_n = (int32_t)cpu->gpr[9]; int32_t psx_d = (int32_t)cpu->gpr[10]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x012A001Au, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004162Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29630: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000820u); -#endif - /* 0xBFC29634: 030B2823 subu $a1, $t8, $t3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[24] - cpu->gpr[11]; - PGXP_ALU(0x030B2823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC29638: 15400002 bne $t2, $zero, 0xBFC29644 */ - uint32_t psx_brA_BFC29638 = cpu->gpr[10]; uint32_t psx_brB_BFC29638 = cpu->gpr[0]; - psx_taken_BFC29638 = (psx_brA_BFC29638 != psx_brB_BFC29638); - psx_delay_BFC29638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2963C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004163Cu); -#endif - if (psx_delay_BFC29638) { - psx_delay_BFC29638 = 0; - if (psx_taken_BFC29638) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041644u); - goto label_BFC29644; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041640u); - } -label_BFC29640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29640: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80041640u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041640u); -#endif -label_BFC29644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29644: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC29648: 15410004 bne $t2, $at, 0xBFC2965C */ - uint32_t psx_brA_BFC29648 = cpu->gpr[10]; uint32_t psx_brB_BFC29648 = cpu->gpr[1]; - psx_taken_BFC29648 = (psx_brA_BFC29648 != psx_brB_BFC29648); - psx_delay_BFC29648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2964C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004164Cu); -#endif - if (psx_delay_BFC29648) { - psx_delay_BFC29648 = 0; - if (psx_taken_BFC29648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004165Cu); - goto label_BFC2965C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041650u); - } -label_BFC29650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC29650: 15210002 bne $t1, $at, 0xBFC2965C */ - uint32_t psx_brA_BFC29650 = cpu->gpr[9]; uint32_t psx_brB_BFC29650 = cpu->gpr[1]; - psx_taken_BFC29650 = (psx_brA_BFC29650 != psx_brB_BFC29650); - psx_delay_BFC29650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041654u); -#endif - if (psx_delay_BFC29650) { - psx_delay_BFC29650 = 0; - if (psx_taken_BFC29650) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004165Cu); - goto label_BFC2965C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041658u); - } -label_BFC29658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29658: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80041658u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041658u); -#endif -label_BFC2965C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2965Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2965Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004165Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2965C: 0C0120A7 jal 0xB004829C */ - cpu->gpr[31] = 0x80041664u; /* jal link before delay slot */ - psx_delay_BFC2965C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29660: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041660u); -#endif - if (psx_delay_BFC2965C) { - psx_delay_BFC2965C = 0; - cpu->gpr[31] = 0x80041664u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004829Cu); - cpu->pc = 0x8004829Cu; return; - } -label_BFC29664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC29664: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC29668: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041668u); -#endif - /* 0xBFC2966C: 84E73F68 lh $a3, 16232($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004166Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x84E73F68u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004166Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041670u); -#endif - /* 0xBFC29670: 85CE3F6A lh $t6, 16234($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041670u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CE3F6Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29674: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC29678: 01C70019 multu $t6, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C70019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041678u); -#endif - /* 0xBFC2967C: 8C423F80 lw $v0, 16256($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004167Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C423F80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC29680: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041680u); -#endif - /* 0xBFC29684: 87393F72 lh $t9, 16242($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 16242; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (16242)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041684u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x87393F72u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29688: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041688u); -#endif - /* 0xBFC2968C: 856B3F6C lh $t3, 16236($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004168Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x856B3F6Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004168Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29690: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041690u); -#endif - /* 0xBFC29694: 8D8C9E24 lw $t4, -25052($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041694u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9E24u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80041694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29698: 3C0F8014 lui $t7, 0x8014 */ - cpu->gpr[15] = 0x80140000u; - PGXP_ALU(0x3C0F8014u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2969C: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC296A0: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800416A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC296A4: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800416A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC296A8: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800416A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC296AC: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800416ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC296B0: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800416B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC296B4: 0122001A div $t1, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[9]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0122001Au, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800416B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC296B8: 25EF8CF0 addiu $t7, $t7, -29456 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-29456)); - PGXP_ALU(0x25EF8CF0u, cpu->gpr[15], _pgx1, 0xFFFF8CF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800416B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA010u); -#endif - /* 0xBFC296BC: 01AF2021 addu $a0, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[15]; - PGXP_ALU(0x01AF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800416BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC296C0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800416C0u); -#endif - /* 0xBFC296C4: 87183F74 lh $t8, 16244($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16244)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800416C4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x87183F74u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800416C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC296C8: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800416C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000420u); -#endif - /* 0xBFC296CC: 032A2823 subu $a1, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[25] - cpu->gpr[10]; - PGXP_ALU(0x032A2823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800416CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC296D0: 14400002 bne $v0, $zero, 0xBFC296DC */ - uint32_t psx_brA_BFC296D0 = cpu->gpr[2]; uint32_t psx_brB_BFC296D0 = cpu->gpr[0]; - psx_taken_BFC296D0 = (psx_brA_BFC296D0 != psx_brB_BFC296D0); - psx_delay_BFC296D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC296D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800416D4u); -#endif - if (psx_delay_BFC296D0) { - psx_delay_BFC296D0 = 0; - if (psx_taken_BFC296D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416DCu); - goto label_BFC296DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416D8u); - } -label_BFC296D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC296D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC296D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC296D8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800416D8u); return; -#ifdef PSX_COSIM - cosim_instr(0x800416D8u); -#endif -label_BFC296DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC296DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC296DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC296DC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800416DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC296E0: 14410004 bne $v0, $at, 0xBFC296F4 */ - uint32_t psx_brA_BFC296E0 = cpu->gpr[2]; uint32_t psx_brB_BFC296E0 = cpu->gpr[1]; - psx_taken_BFC296E0 = (psx_brA_BFC296E0 != psx_brB_BFC296E0); - psx_delay_BFC296E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC296E4: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800416E4u); -#endif - if (psx_delay_BFC296E0) { - psx_delay_BFC296E0 = 0; - if (psx_taken_BFC296E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416F4u); - goto label_BFC296F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416E8u); - } -label_BFC296E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC296E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC296E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC296E8: 15210002 bne $t1, $at, 0xBFC296F4 */ - uint32_t psx_brA_BFC296E8 = cpu->gpr[9]; uint32_t psx_brB_BFC296E8 = cpu->gpr[1]; - psx_taken_BFC296E8 = (psx_brA_BFC296E8 != psx_brB_BFC296E8); - psx_delay_BFC296E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC296EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800416ECu); -#endif - if (psx_delay_BFC296E8) { - psx_delay_BFC296E8 = 0; - if (psx_taken_BFC296E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416F4u); - goto label_BFC296F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800416F0u); - } -label_BFC296F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC296F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC296F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC296F0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800416F0u); return; -#ifdef PSX_COSIM - cosim_instr(0x800416F0u); -#endif -label_BFC296F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC296F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC296F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800416F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC296F4: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800416F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC296F8: 00A1001A div $a1, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00A1001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800416F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC296FC: 00002812 mflo $a1 */ - cpu->gpr[5] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002812u, cpu->gpr[5], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800416FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29700: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC29708: 01670019 multu $t3, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x01670019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2970C: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004170Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29718: 0182001A div $t4, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[12]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0182001Au, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80041718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2971C: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002040u); -#endif - /* 0xBFC29720: 030D3021 addu $a2, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[6] = cpu->gpr[24] + cpu->gpr[13]; - PGXP_ALU(0x030D3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29724: 14400002 bne $v0, $zero, 0xBFC29730 */ - uint32_t psx_brA_BFC29724 = cpu->gpr[2]; uint32_t psx_brB_BFC29724 = cpu->gpr[0]; - psx_taken_BFC29724 = (psx_brA_BFC29724 != psx_brB_BFC29724); - psx_delay_BFC29724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29728: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041728u); -#endif - if (psx_delay_BFC29724) { - psx_delay_BFC29724 = 0; - if (psx_taken_BFC29724) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041730u); - goto label_BFC29730; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004172Cu); - } -label_BFC2972C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2972Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2972C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004172Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004172Cu); -#endif -label_BFC29730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29730: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29734: 14410004 bne $v0, $at, 0xBFC29748 */ - uint32_t psx_brA_BFC29734 = cpu->gpr[2]; uint32_t psx_brB_BFC29734 = cpu->gpr[1]; - psx_taken_BFC29734 = (psx_brA_BFC29734 != psx_brB_BFC29734); - psx_delay_BFC29734 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29738: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041738u); -#endif - if (psx_delay_BFC29734) { - psx_delay_BFC29734 = 0; - if (psx_taken_BFC29734) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041748u); - goto label_BFC29748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004173Cu); - } -label_BFC2973C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2973Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2973Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004173Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC2973C: 15810002 bne $t4, $at, 0xBFC29748 */ - uint32_t psx_brA_BFC2973C = cpu->gpr[12]; uint32_t psx_brB_BFC2973C = cpu->gpr[1]; - psx_taken_BFC2973C = (psx_brA_BFC2973C != psx_brB_BFC2973C); - psx_delay_BFC2973C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041740u); -#endif - if (psx_delay_BFC2973C) { - psx_delay_BFC2973C = 0; - if (psx_taken_BFC2973C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041748u); - goto label_BFC29748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041744u); - } -label_BFC29744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29744: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80041744u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041744u); -#endif -label_BFC29748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29748: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2974C: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8004174Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC29750: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29754: 0C0120C7 jal 0xB004831C */ - cpu->gpr[31] = 0x8004175Cu; /* jal link before delay slot */ - psx_delay_BFC29754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29758: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041758u); -#endif - if (psx_delay_BFC29754) { - psx_delay_BFC29754 = 0; - cpu->gpr[31] = 0x8004175Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004831Cu); - cpu->pc = 0x8004831Cu; return; - } -label_BFC2975C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2975Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2975C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004175Cu); -#endif -label_BFC29760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041760u); -#endif - /* 0xBFC29760: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041760u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80041760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29764: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80041764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC29768: 03E00008 jr $ra */ - psx_delay_BFC29768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2976C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004176Cu); -#endif - if (psx_delay_BFC29768) { - psx_delay_BFC29768 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC29770(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC29770u); - int psx_delay_BFC29780 = 0; - int psx_taken_BFC29780 = 0; - int psx_delay_BFC29798 = 0; - int psx_taken_BFC29798 = 0; - int psx_delay_BFC2982C = 0; - int psx_delay_BFC29834 = 0; - int psx_delay_BFC29844 = 0; - int psx_taken_BFC29844 = 0; - int psx_delay_BFC29870 = 0; - int psx_taken_BFC29870 = 0; - int psx_delay_BFC29880 = 0; - int psx_taken_BFC29880 = 0; - int psx_delay_BFC29894 = 0; - int psx_taken_BFC29894 = 0; - int psx_delay_BFC298E4 = 0; - int psx_taken_BFC298E4 = 0; - int psx_delay_BFC29950 = 0; - int psx_taken_BFC29950 = 0; - int psx_delay_BFC29960 = 0; - int psx_taken_BFC29960 = 0; - int psx_delay_BFC29968 = 0; - int psx_taken_BFC29968 = 0; - int psx_delay_BFC2998C = 0; - int psx_taken_BFC2998C = 0; - int psx_delay_BFC2999C = 0; - int psx_taken_BFC2999C = 0; - int psx_delay_BFC299A4 = 0; - int psx_taken_BFC299A4 = 0; - int psx_delay_BFC299D0 = 0; - int psx_taken_BFC299D0 = 0; - int psx_delay_BFC299E0 = 0; - int psx_taken_BFC299E0 = 0; - int psx_delay_BFC299E8 = 0; - int psx_taken_BFC299E8 = 0; - int psx_delay_BFC29A34 = 0; - int psx_taken_BFC29A34 = 0; - int psx_delay_BFC29A44 = 0; - int psx_taken_BFC29A44 = 0; - int psx_delay_BFC29A4C = 0; - int psx_taken_BFC29A4C = 0; - int psx_delay_BFC29A64 = 0; - int psx_taken_BFC29A64 = 0; - int psx_delay_BFC29A80 = 0; - int psx_delay_BFC29A94 = 0; - int psx_taken_BFC29A94 = 0; - int psx_delay_BFC29AAC = 0; - int psx_taken_BFC29AAC = 0; - int psx_delay_BFC29AD0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC29788u: goto label_BFC29788; - case 0xBFC297A0u: goto label_BFC297A0; - case 0xBFC297E0u: goto label_BFC297E0; - case 0xBFC29834u: goto label_BFC29834; - case 0xBFC2983Cu: goto label_BFC2983C; - case 0xBFC2984Cu: goto label_BFC2984C; - case 0xBFC2986Cu: goto label_BFC2986C; - case 0xBFC29878u: goto label_BFC29878; - case 0xBFC29880u: goto label_BFC29880; - case 0xBFC29888u: goto label_BFC29888; - case 0xBFC2989Cu: goto label_BFC2989C; - case 0xBFC298D4u: goto label_BFC298D4; - case 0xBFC298DCu: goto label_BFC298DC; - case 0xBFC298ECu: goto label_BFC298EC; - case 0xBFC29958u: goto label_BFC29958; - case 0xBFC2995Cu: goto label_BFC2995C; - case 0xBFC29968u: goto label_BFC29968; - case 0xBFC29970u: goto label_BFC29970; - case 0xBFC29974u: goto label_BFC29974; - case 0xBFC29994u: goto label_BFC29994; - case 0xBFC29998u: goto label_BFC29998; - case 0xBFC299A4u: goto label_BFC299A4; - case 0xBFC299ACu: goto label_BFC299AC; - case 0xBFC299B0u: goto label_BFC299B0; - case 0xBFC299D8u: goto label_BFC299D8; - case 0xBFC299DCu: goto label_BFC299DC; - case 0xBFC299E8u: goto label_BFC299E8; - case 0xBFC299F0u: goto label_BFC299F0; - case 0xBFC299F4u: goto label_BFC299F4; - case 0xBFC29A3Cu: goto label_BFC29A3C; - case 0xBFC29A40u: goto label_BFC29A40; - case 0xBFC29A4Cu: goto label_BFC29A4C; - case 0xBFC29A54u: goto label_BFC29A54; - case 0xBFC29A58u: goto label_BFC29A58; - case 0xBFC29A6Cu: goto label_BFC29A6C; - case 0xBFC29A88u: goto label_BFC29A88; - case 0xBFC29A9Cu: goto label_BFC29A9C; - case 0xBFC29AB4u: goto label_BFC29AB4; - case 0xBFC29AC8u: goto label_BFC29AC8; - default: break; - } - } -label_BFC29770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29770: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x80041770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC29774: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041774u); return; } g_debug_last_store_pc = 0x80041774u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80041774u); -#endif - /* 0xBFC29778: 87AE0058 lh $t6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041778u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0058u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2977C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004177Cu); return; } g_debug_last_store_pc = 0x8004177Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004177Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC29780: 15C00007 bne $t6, $zero, 0xBFC297A0 */ - uint32_t psx_brA_BFC29780 = cpu->gpr[14]; uint32_t psx_brB_BFC29780 = cpu->gpr[0]; - psx_taken_BFC29780 = (psx_brA_BFC29780 != psx_brB_BFC29780); - psx_delay_BFC29780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC29784: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041784u); return; } g_debug_last_store_pc = 0x80041784u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80041784u); -#endif - if (psx_delay_BFC29780) { - psx_delay_BFC29780 = 0; - if (psx_taken_BFC29780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800417A0u); - goto label_BFC297A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041788u); - } -label_BFC29788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC29788: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2978C: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004178Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041790u); -#endif - /* 0xBFC29790: 8CE73F88 lw $a3, 16264($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041790u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE73F88u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041790u); -#endif - /* 0xBFC29794: 8D083F84 lw $t0, 16260($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 16260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (16260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041794u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D083F84u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29798: 10000034 beq $zero, $zero, 0xBFC2986C */ - uint32_t psx_brA_BFC29798 = cpu->gpr[0]; uint32_t psx_brB_BFC29798 = cpu->gpr[0]; - psx_taken_BFC29798 = (psx_brA_BFC29798 == psx_brB_BFC29798); - psx_delay_BFC29798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2979C: 24120010 addiu $s2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24120010u, cpu->gpr[18], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004179Cu); -#endif - if (psx_delay_BFC29798) { - psx_delay_BFC29798 = 0; - if (psx_taken_BFC29798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004186Cu); - goto label_BFC2986C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800417A0u); - } -label_BFC297A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC297A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC297A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC297A0: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417A0u); return; } g_debug_last_store_pc = 0x800417A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800417A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC297A4: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417A4u); return; } g_debug_last_store_pc = 0x800417A4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800417A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC297A8: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417A8u); return; } g_debug_last_store_pc = 0x800417A8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800417A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC297AC: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417ACu); return; } g_debug_last_store_pc = 0x800417ACu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800417ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC297B0: AFB50024 sw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417B0u); return; } g_debug_last_store_pc = 0x800417B0u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800417B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC297B4: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417B4u); return; } g_debug_last_store_pc = 0x800417B4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800417B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC297B8: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800417B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC297BC: 3C138014 lui $s3, 0x8014 */ - cpu->gpr[19] = 0x80140000u; - PGXP_ALU(0x3C138014u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800417BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC297C0: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800417C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC297C4: 26103E90 addiu $s0, $s0, 16016 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (16016)); - PGXP_ALU(0x26103E90u, cpu->gpr[16], _pgx1, 0x00003E90u); } -#ifdef PSX_COSIM - cosim_instr(0x800417C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC297C8: 267381C8 addiu $s3, $s3, -32312 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-32312)); - PGXP_ALU(0x267381C8u, cpu->gpr[19], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800417C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC297CC: 26943EA8 addiu $s4, $s4, 16040 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (16040)); - PGXP_ALU(0x26943EA8u, cpu->gpr[20], _pgx1, 0x00003EA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800417CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC297D0: 24160003 addiu $s6, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24160003u, cpu->gpr[22], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800417D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC297D4: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800417D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC297D8: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800417D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC297DC: 24120010 addiu $s2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24120010u, cpu->gpr[18], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800417DCu); -#endif -label_BFC297E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC297E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC297E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC297E0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800417E0u); -#endif - /* 0xBFC297E4: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800417E4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800417E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC297E8: 001148C0 sll $t1, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001148C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800417E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC297EC: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800417ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800417F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC297F0: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800417F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC297F4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800417F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC297F8: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800417F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC297FC: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800417FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC29800: 01314823 subu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[17]; - PGXP_ALU(0x01314823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29804: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3080000u); -#endif - /* 0xBFC29808: 0278C821 addu $t9, $s3, $t8 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[19] + cpu->gpr[24]; - PGXP_ALU(0x0278C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000204u); -#endif - /* 0xBFC2980C: 03291021 addu $v0, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[9]; - PGXP_ALU(0x03291021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041810u); -#endif - /* 0xBFC29810: 844A004A lh $t2, 74($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041810u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x844A004Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80041810u); -#endif - /* 0xBFC29814: 844B004C lh $t3, 76($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041814u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x844B004Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC29818: A6120004 sh $s2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041818u); return; } g_debug_last_store_pc = 0x80041818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA6120004u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80041818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC2981C: A6150006 sh $s5, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004181Cu); return; } g_debug_last_store_pc = 0x8004181Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA6150006u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC29820: A60A0000 sh $t2, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041820u); return; } g_debug_last_store_pc = 0x80041820u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80041820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC29824: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC29828: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2982C: 0C013C4C jal 0xB004F130 */ - cpu->gpr[31] = 0x80041834u; /* jal link before delay slot */ - psx_delay_BFC2982C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC29830: A60B0002 sh $t3, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041830u); return; } g_debug_last_store_pc = 0x80041830u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA60B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041830u); -#endif - if (psx_delay_BFC2982C) { - psx_delay_BFC2982C = 0; - cpu->gpr[31] = 0x80041834u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F130u); - cpu->pc = 0x8004F130u; return; - } -label_BFC29834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29834: 0C013C1C jal 0xB004F070 */ - cpu->gpr[31] = 0x8004183Cu; /* jal link before delay slot */ - psx_delay_BFC29834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29838: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041838u); -#endif - if (psx_delay_BFC29834) { - psx_delay_BFC29834 = 0; - cpu->gpr[31] = 0x8004183Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F070u); - cpu->pc = 0x8004F070u; return; - } -label_BFC2983C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2983Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2983Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2983C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29840: 26100008 addiu $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (8)); - PGXP_ALU(0x26100008u, cpu->gpr[16], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80041840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420000u); -#endif - /* 0xBFC29844: 1636FFE6 bne $s1, $s6, 0xBFC297E0 */ - uint32_t psx_brA_BFC29844 = cpu->gpr[17]; uint32_t psx_brB_BFC29844 = cpu->gpr[22]; - psx_taken_BFC29844 = (psx_brA_BFC29844 != psx_brB_BFC29844); - psx_delay_BFC29844 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC29848: 26940020 addiu $s4, $s4, 32 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (32)); - PGXP_ALU(0x26940020u, cpu->gpr[20], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80041848u); -#endif - if (psx_delay_BFC29844) { - psx_delay_BFC29844 = 0; - if (psx_taken_BFC29844) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800417E0u); - goto label_BFC297E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004184Cu); - } -label_BFC2984C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2984Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2984Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004184Cu); -#endif - /* 0xBFC2984C: 87A70058 lh $a3, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004184Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x87A70058u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004184Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041850u); -#endif - /* 0xBFC29850: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041850u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041850u); -#endif - /* 0xBFC29854: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041854u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80041854u); -#endif - /* 0xBFC29858: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041858u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80041858u); -#endif - /* 0xBFC2985C: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004185Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004185Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041860u); -#endif - /* 0xBFC29860: 8FB50024 lw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041860u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80041860u); -#endif - /* 0xBFC29864: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041864u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80041864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC29868: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041868u); -#endif -label_BFC2986C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2986Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2986Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2986C: 29011000 slti $at, $t0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4096) ? 1 : 0); - PGXP_ALU(0x29011000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29870: 10200003 beq $at, $zero, 0xBFC29880 */ - uint32_t psx_brA_BFC29870 = cpu->gpr[1]; uint32_t psx_brB_BFC29870 = cpu->gpr[0]; - psx_taken_BFC29870 = (psx_brA_BFC29870 == psx_brB_BFC29870); - psx_delay_BFC29870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x182u); -#endif - /* 0xBFC29874: 00E8082A slt $at, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x00E8082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041874u); -#endif - if (psx_delay_BFC29870) { - psx_delay_BFC29870 = 0; - if (psx_taken_BFC29870) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041880u); - goto label_BFC29880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041878u); - } -label_BFC29878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC29878: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x182u); -#endif - /* 0xBFC2987C: 00E8082A slt $at, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x00E8082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004187Cu); -#endif -label_BFC29880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29880: 10200006 beq $at, $zero, 0xBFC2989C */ - uint32_t psx_brA_BFC29880 = cpu->gpr[1]; uint32_t psx_brB_BFC29880 = cpu->gpr[0]; - psx_taken_BFC29880 = (psx_brA_BFC29880 == psx_brB_BFC29880); - psx_delay_BFC29880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29884: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041884u); -#endif - if (psx_delay_BFC29880) { - psx_delay_BFC29880 = 0; - if (psx_taken_BFC29880) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004189Cu); - goto label_BFC2989C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041888u); - } -label_BFC29888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC29888: AC283F84 sw $t0, 16260($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16260; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041888u); return; } g_debug_last_store_pc = 0x80041888u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC283F84u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2988C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29890: AC273F88 sw $a3, 16264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041890u); return; } g_debug_last_store_pc = 0x80041890u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC273F88u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29894: 1000008C beq $zero, $zero, 0xBFC29AC8 */ - uint32_t psx_brA_BFC29894 = cpu->gpr[0]; uint32_t psx_brB_BFC29894 = cpu->gpr[0]; - psx_taken_BFC29894 = (psx_brA_BFC29894 == psx_brB_BFC29894); - psx_delay_BFC29894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29898: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041898u); -#endif - if (psx_delay_BFC29894) { - psx_delay_BFC29894 = 0; - if (psx_taken_BFC29894) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041AC8u); - goto label_BFC29AC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004189Cu); - } -label_BFC2989C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2989Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2989C: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004189Cu); return; } g_debug_last_store_pc = 0x8004189Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004189Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC298A0: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800418A0u); return; } g_debug_last_store_pc = 0x800418A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800418A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC298A4: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800418A4u); return; } g_debug_last_store_pc = 0x800418A4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800418A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC298A8: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800418A8u); return; } g_debug_last_store_pc = 0x800418A8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800418A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC298AC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC298B0: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800418B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC298B4: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800418B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC298B8: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800418B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC298BC: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800418BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC298C0: 26103E90 addiu $s0, $s0, 16016 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (16016)); - PGXP_ALU(0x26103E90u, cpu->gpr[16], _pgx1, 0x00003E90u); } -#ifdef PSX_COSIM - cosim_instr(0x800418C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC298C4: 26733F08 addiu $s3, $s3, 16136 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (16136)); - PGXP_ALU(0x26733F08u, cpu->gpr[19], _pgx1, 0x00003F08u); } -#ifdef PSX_COSIM - cosim_instr(0x800418C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC298C8: 26943EA8 addiu $s4, $s4, 16040 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (16040)); - PGXP_ALU(0x26943EA8u, cpu->gpr[20], _pgx1, 0x00003EA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800418C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC298CC: 26313F68 addiu $s1, $s1, 16232 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (16232)); - PGXP_ALU(0x26313F68u, cpu->gpr[17], _pgx1, 0x00003F68u); } -#ifdef PSX_COSIM - cosim_instr(0x800418CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC298D0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418D0u); -#endif -label_BFC298D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC298D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC298D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC298D4: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC298D8: 02603021 addu $a2, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418D8u); -#endif -label_BFC298DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC298DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC298DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418DCu); -#endif - /* 0xBFC298DC: 84A20000 lh $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800418DCu); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x84A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800418DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC298E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800418E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC298E4: 1040005C beq $v0, $zero, 0xBFC29A58 */ - uint32_t psx_brA_BFC298E4 = cpu->gpr[2]; uint32_t psx_brB_BFC298E4 = cpu->gpr[0]; - psx_taken_BFC298E4 = (psx_brA_BFC298E4 == psx_brB_BFC298E4); - psx_delay_BFC298E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC298E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800418E8u); -#endif - if (psx_delay_BFC298E4) { - psx_delay_BFC298E4 = 0; - if (psx_taken_BFC298E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A58u); - goto label_BFC29A58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800418ECu); - } -label_BFC298EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC298ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC298ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1180u); -#endif - /* 0xBFC298EC: 00E86023 subu $t4, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[7] - cpu->gpr[8]; - PGXP_ALU(0x00E86023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800418F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC298F0: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800418F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC298F4: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC298F8: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800418F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC298FC: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800418FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29900: 000D6840 sll $t5, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 1u; - PGXP_ALU(0x000D6840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80041900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080u); -#endif - /* 0xBFC29904: 01A7001A div $t5, $a3 */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[7]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A7001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC29908: 304E001F andi $t6, $v0, 0x1F */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1Fu; - PGXP_ALU(0x304E001Fu, cpu->gpr[14], _pgx1, 0x001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80041908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2990C: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004190Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29910: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC29918: 01C80019 multu $t6, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C80019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x80041918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2991C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004191Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29924: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC29928: 01E7001A div $t7, $a3 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[7]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E7001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2992C: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC29930: 0303C821 addu $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[3]; - PGXP_ALU(0x0303C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC29934: 3329FFFF andi $t1, $t9, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu; - PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC29938: 01225026 xor $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2]; - PGXP_ALU(0x01225026u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2993C: 314B001F andi $t3, $t2, 0x1F */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x1Fu; - PGXP_ALU(0x314B001Fu, cpu->gpr[11], _pgx1, 0x001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC29940: 01621026 xor $v0, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[11] ^ cpu->gpr[2]; - PGXP_ALU(0x01621026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29944: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29948: 00026580 sll $t4, $v0, 22 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 22u; - PGXP_ALU(0x00026580u, cpu->gpr[12], _pgx1, 22u); } -#ifdef PSX_COSIM - cosim_instr(0x80041948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2994C: 00024942 srl $t1, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00024942u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8004194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29950: 14E00002 bne $a3, $zero, 0xBFC2995C */ - uint32_t psx_brA_BFC29950 = cpu->gpr[7]; uint32_t psx_brB_BFC29950 = cpu->gpr[0]; - psx_taken_BFC29950 = (psx_brA_BFC29950 != psx_brB_BFC29950); - psx_delay_BFC29950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29954: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041954u); -#endif - if (psx_delay_BFC29950) { - psx_delay_BFC29950 = 0; - if (psx_taken_BFC29950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004195Cu); - goto label_BFC2995C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041958u); - } -label_BFC29958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29958: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80041958u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041958u); -#endif -label_BFC2995C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2995Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2995C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29960: 14E10004 bne $a3, $at, 0xBFC29974 */ - uint32_t psx_brA_BFC29960 = cpu->gpr[7]; uint32_t psx_brB_BFC29960 = cpu->gpr[1]; - psx_taken_BFC29960 = (psx_brA_BFC29960 != psx_brB_BFC29960); - psx_delay_BFC29960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29964: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041964u); -#endif - if (psx_delay_BFC29960) { - psx_delay_BFC29960 = 0; - if (psx_taken_BFC29960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041974u); - goto label_BFC29974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041968u); - } -label_BFC29968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC29968: 15A10002 bne $t5, $at, 0xBFC29974 */ - uint32_t psx_brA_BFC29968 = cpu->gpr[13]; uint32_t psx_brB_BFC29968 = cpu->gpr[1]; - psx_taken_BFC29968 = (psx_brA_BFC29968 != psx_brB_BFC29968); - psx_delay_BFC29968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2996C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004196Cu); -#endif - if (psx_delay_BFC29968) { - psx_delay_BFC29968 = 0; - if (psx_taken_BFC29968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041974u); - goto label_BFC29974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041970u); - } -label_BFC29970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29970: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80041970u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041970u); -#endif -label_BFC29974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC29974: 000C6EC2 srl $t5, $t4, 27 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] >> 27u; - PGXP_ALU(0x000C6EC2u, cpu->gpr[13], _pgx1, 27u); } -#ifdef PSX_COSIM - cosim_instr(0x80041974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC29978: 01A80019 multu $t5, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[13] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[13])); -#endif - PGXP_MULDIV(0x01A80019u, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x80041978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2997C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004197Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29980: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC29988: 01C7001A div $t6, $a3 */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[7]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C7001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2998C: 14E00002 bne $a3, $zero, 0xBFC29998 */ - uint32_t psx_brA_BFC2998C = cpu->gpr[7]; uint32_t psx_brB_BFC2998C = cpu->gpr[0]; - psx_taken_BFC2998C = (psx_brA_BFC2998C != psx_brB_BFC2998C); - psx_delay_BFC2998C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041990u); -#endif - if (psx_delay_BFC2998C) { - psx_delay_BFC2998C = 0; - if (psx_taken_BFC2998C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041998u); - goto label_BFC29998; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041994u); - } -label_BFC29994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29994: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80041994u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041994u); -#endif -label_BFC29998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29998: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2999C: 14E10004 bne $a3, $at, 0xBFC299B0 */ - uint32_t psx_brA_BFC2999C = cpu->gpr[7]; uint32_t psx_brB_BFC2999C = cpu->gpr[1]; - psx_taken_BFC2999C = (psx_brA_BFC2999C != psx_brB_BFC2999C); - psx_delay_BFC2999C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC299A0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800419A0u); -#endif - if (psx_delay_BFC2999C) { - psx_delay_BFC2999C = 0; - if (psx_taken_BFC2999C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419B0u); - goto label_BFC299B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419A4u); - } -label_BFC299A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC299A4: 15E10002 bne $t7, $at, 0xBFC299B0 */ - uint32_t psx_brA_BFC299A4 = cpu->gpr[15]; uint32_t psx_brB_BFC299A4 = cpu->gpr[1]; - psx_taken_BFC299A4 = (psx_brA_BFC299A4 != psx_brB_BFC299A4); - psx_delay_BFC299A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC299A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800419A8u); -#endif - if (psx_delay_BFC299A4) { - psx_delay_BFC299A4 = 0; - if (psx_taken_BFC299A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419B0u); - goto label_BFC299B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419ACu); - } -label_BFC299AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC299AC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800419ACu); return; -#ifdef PSX_COSIM - cosim_instr(0x800419ACu); -#endif -label_BFC299B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC299B0: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800419B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC299B4: 01E3C021 addu $t8, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E3C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800419B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC299B8: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800419B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC299BC: 03295026 xor $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] ^ cpu->gpr[9]; - PGXP_ALU(0x03295026u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800419BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC299C0: 000A5EC0 sll $t3, $t2, 27 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 27u; - PGXP_ALU(0x000A5EC0u, cpu->gpr[11], _pgx1, 27u); } -#ifdef PSX_COSIM - cosim_instr(0x800419C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC299C4: 000B6582 srl $t4, $t3, 22 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] >> 22u; - PGXP_ALU(0x000B6582u, cpu->gpr[12], _pgx1, 22u); } -#ifdef PSX_COSIM - cosim_instr(0x800419C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC299C8: 01821026 xor $v0, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[12] ^ cpu->gpr[2]; - PGXP_ALU(0x01821026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800419C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC299CC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800419CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC299D0: 14E00002 bne $a3, $zero, 0xBFC299DC */ - uint32_t psx_brA_BFC299D0 = cpu->gpr[7]; uint32_t psx_brB_BFC299D0 = cpu->gpr[0]; - psx_taken_BFC299D0 = (psx_brA_BFC299D0 != psx_brB_BFC299D0); - psx_delay_BFC299D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC299D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800419D4u); -#endif - if (psx_delay_BFC299D0) { - psx_delay_BFC299D0 = 0; - if (psx_taken_BFC299D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419DCu); - goto label_BFC299DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419D8u); - } -label_BFC299D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC299D8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800419D8u); return; -#ifdef PSX_COSIM - cosim_instr(0x800419D8u); -#endif -label_BFC299DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC299DC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800419DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC299E0: 14E10004 bne $a3, $at, 0xBFC299F4 */ - uint32_t psx_brA_BFC299E0 = cpu->gpr[7]; uint32_t psx_brB_BFC299E0 = cpu->gpr[1]; - psx_taken_BFC299E0 = (psx_brA_BFC299E0 != psx_brB_BFC299E0); - psx_delay_BFC299E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC299E4: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800419E4u); -#endif - if (psx_delay_BFC299E0) { - psx_delay_BFC299E0 = 0; - if (psx_taken_BFC299E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419F4u); - goto label_BFC299F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419E8u); - } -label_BFC299E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC299E8: 15C10002 bne $t6, $at, 0xBFC299F4 */ - uint32_t psx_brA_BFC299E8 = cpu->gpr[14]; uint32_t psx_brB_BFC299E8 = cpu->gpr[1]; - psx_taken_BFC299E8 = (psx_brA_BFC299E8 != psx_brB_BFC299E8); - psx_delay_BFC299E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC299EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800419ECu); -#endif - if (psx_delay_BFC299E8) { - psx_delay_BFC299E8 = 0; - if (psx_taken_BFC299E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419F4u); - goto label_BFC299F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800419F0u); - } -label_BFC299F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC299F0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800419F0u); return; -#ifdef PSX_COSIM - cosim_instr(0x800419F0u); -#endif -label_BFC299F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC299F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC299F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800419F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC299F4: 00026C40 sll $t5, $v0, 17 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] << 17u; - PGXP_ALU(0x00026C40u, cpu->gpr[13], _pgx1, 17u); } -#ifdef PSX_COSIM - cosim_instr(0x800419F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC299F8: 000D76C2 srl $t6, $t5, 27 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] >> 27u; - PGXP_ALU(0x000D76C2u, cpu->gpr[14], _pgx1, 27u); } -#ifdef PSX_COSIM - cosim_instr(0x800419F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC299FC: 01C80019 multu $t6, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C80019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x800419FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC29A00: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29A04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29A08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC29A0C: 01E7001A div $t7, $a3 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[7]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E7001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x80041A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC29A10: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC29A14: 0303C821 addu $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[3]; - PGXP_ALU(0x0303C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC29A18: 3329FFFF andi $t1, $t9, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu; - PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC29A1C: 00025282 srl $t2, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] >> 10u; - PGXP_ALU(0x00025282u, cpu->gpr[10], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC29A20: 012A5826 xor $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] ^ cpu->gpr[10]; - PGXP_ALU(0x012A5826u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29A24: 000B66C0 sll $t4, $t3, 27 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 27u; - PGXP_ALU(0x000B66C0u, cpu->gpr[12], _pgx1, 27u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC29A28: 000C6C42 srl $t5, $t4, 17 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] >> 17u; - PGXP_ALU(0x000C6C42u, cpu->gpr[13], _pgx1, 17u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC29A2C: 01A21026 xor $v0, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[13] ^ cpu->gpr[2]; - PGXP_ALU(0x01A21026u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29A30: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29A34: 14E00002 bne $a3, $zero, 0xBFC29A40 */ - uint32_t psx_brA_BFC29A34 = cpu->gpr[7]; uint32_t psx_brB_BFC29A34 = cpu->gpr[0]; - psx_taken_BFC29A34 = (psx_brA_BFC29A34 != psx_brB_BFC29A34); - psx_delay_BFC29A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29A38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041A38u); -#endif - if (psx_delay_BFC29A34) { - psx_delay_BFC29A34 = 0; - if (psx_taken_BFC29A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A40u); - goto label_BFC29A40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A3Cu); - } -label_BFC29A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29A3C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80041A3Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x80041A3Cu); -#endif -label_BFC29A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29A40: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80041A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29A44: 14E10004 bne $a3, $at, 0xBFC29A58 */ - uint32_t psx_brA_BFC29A44 = cpu->gpr[7]; uint32_t psx_brB_BFC29A44 = cpu->gpr[1]; - psx_taken_BFC29A44 = (psx_brA_BFC29A44 != psx_brB_BFC29A44); - psx_delay_BFC29A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29A48: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A48u); -#endif - if (psx_delay_BFC29A44) { - psx_delay_BFC29A44 = 0; - if (psx_taken_BFC29A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A58u); - goto label_BFC29A58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A4Cu); - } -label_BFC29A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC29A4C: 15E10002 bne $t7, $at, 0xBFC29A58 */ - uint32_t psx_brA_BFC29A4C = cpu->gpr[15]; uint32_t psx_brB_BFC29A4C = cpu->gpr[1]; - psx_taken_BFC29A4C = (psx_brA_BFC29A4C != psx_brB_BFC29A4C); - psx_delay_BFC29A4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29A50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041A50u); -#endif - if (psx_delay_BFC29A4C) { - psx_delay_BFC29A4C = 0; - if (psx_taken_BFC29A4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A58u); - goto label_BFC29A58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A54u); - } -label_BFC29A54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC29A54: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80041A54u); return; -#ifdef PSX_COSIM - cosim_instr(0x80041A54u); -#endif -label_BFC29A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29A58: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC29A5C: A4C20000 sh $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041A5Cu); return; } g_debug_last_store_pc = 0x80041A5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29A60: 24A50002 addiu $a1, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (2)); - PGXP_ALU(0x24A50002u, cpu->gpr[5], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC29A64: 1492FF9D bne $a0, $s2, 0xBFC298DC */ - uint32_t psx_brA_BFC29A64 = cpu->gpr[4]; uint32_t psx_brB_BFC29A64 = cpu->gpr[18]; - psx_taken_BFC29A64 = (psx_brA_BFC29A64 != psx_brB_BFC29A64); - psx_delay_BFC29A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC29A68: 24C60002 addiu $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (2)); - PGXP_ALU(0x24C60002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A68u); -#endif - if (psx_delay_BFC29A64) { - psx_delay_BFC29A64 = 0; - if (psx_taken_BFC29A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800418DCu); - goto label_BFC298DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A6Cu); - } -label_BFC29A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29A6C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC29A70: AC283F84 sw $t0, 16260($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16260; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041A70u); return; } g_debug_last_store_pc = 0x80041A70u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC283F84u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29A74: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC29A78: AC273F88 sw $a3, 16264($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 16264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (16264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041A78u); return; } g_debug_last_store_pc = 0x80041A78u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC273F88u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC29A7C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29A80: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x80041A88u; /* jal link before delay slot */ - psx_delay_BFC29A80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC29A84: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A84u); -#endif - if (psx_delay_BFC29A80) { - psx_delay_BFC29A80 = 0; - cpu->gpr[31] = 0x80041A88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC29A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC29A88: 26730020 addiu $s3, $s3, 32 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (32)); - PGXP_ALU(0x26730020u, cpu->gpr[19], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0002u); -#endif - /* 0xBFC29A8C: 0271082B sltu $at, $s3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0271082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29A90: 26100008 addiu $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (8)); - PGXP_ALU(0x26100008u, cpu->gpr[16], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29A94: 10200007 beq $at, $zero, 0xBFC29AB4 */ - uint32_t psx_brA_BFC29A94 = cpu->gpr[1]; uint32_t psx_brB_BFC29A94 = cpu->gpr[0]; - psx_taken_BFC29A94 = (psx_brA_BFC29A94 == psx_brB_BFC29A94); - psx_delay_BFC29A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC29A98: 26940020 addiu $s4, $s4, 32 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (32)); - PGXP_ALU(0x26940020u, cpu->gpr[20], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80041A98u); -#endif - if (psx_delay_BFC29A94) { - psx_delay_BFC29A94 = 0; - if (psx_taken_BFC29A94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041AB4u); - goto label_BFC29AB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041A9Cu); - } -label_BFC29A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC29A9C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC29AA0: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041AA0u); -#endif - /* 0xBFC29AA4: 8CE73F88 lw $a3, 16264($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE73F88u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AA4u); -#endif - /* 0xBFC29AA8: 8D083F84 lw $t0, 16260($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 16260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (16260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AA8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D083F84u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29AAC: 1000FF89 beq $zero, $zero, 0xBFC298D4 */ - uint32_t psx_brA_BFC29AAC = cpu->gpr[0]; uint32_t psx_brB_BFC29AAC = cpu->gpr[0]; - psx_taken_BFC29AAC = (psx_brA_BFC29AAC == psx_brB_BFC29AAC); - psx_delay_BFC29AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29AB0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041AB0u); -#endif - if (psx_delay_BFC29AAC) { - psx_delay_BFC29AAC = 0; - if (psx_taken_BFC29AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800418D4u); - goto label_BFC298D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041AB4u); - } -label_BFC29AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AB4u); -#endif - /* 0xBFC29AB4: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AB4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AB4u); -#endif - /* 0xBFC29AB8: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AB8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AB8u); -#endif - /* 0xBFC29ABC: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041ABCu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80041ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AC0u); -#endif - /* 0xBFC29AC0: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AC0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29AC4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041AC4u); -#endif -label_BFC29AC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29AC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AC8u); -#endif - /* 0xBFC29AC8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AC8u); -#endif - /* 0xBFC29ACC: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041ACCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80041ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC29AD0: 03E00008 jr $ra */ - psx_delay_BFC29AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29AD4: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80041AD4u); -#endif - if (psx_delay_BFC29AD0) { - psx_delay_BFC29AD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC29AE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC29AE0u); - int psx_delay_BFC29B18 = 0; - int psx_delay_BFC29B28 = 0; - int psx_delay_BFC29B30 = 0; - int psx_taken_BFC29B30 = 0; - int psx_delay_BFC29B38 = 0; - int psx_delay_BFC29B58 = 0; - int psx_delay_BFC29B78 = 0; - int psx_delay_BFC29B98 = 0; - int psx_delay_BFC29BB8 = 0; - int psx_delay_BFC29BD4 = 0; - int psx_taken_BFC29BD4 = 0; - int psx_delay_BFC29C50 = 0; - int psx_delay_BFC29C58 = 0; - int psx_delay_BFC29C68 = 0; - int psx_delay_BFC29C78 = 0; - int psx_delay_BFC29C84 = 0; - int psx_delay_BFC29C90 = 0; - int psx_delay_BFC29C9C = 0; - int psx_delay_BFC29CA8 = 0; - int psx_delay_BFC29CB4 = 0; - int psx_delay_BFC29CC8 = 0; - int psx_delay_BFC29CD8 = 0; - int psx_delay_BFC29CEC = 0; - int psx_delay_BFC29D00 = 0; - int psx_delay_BFC29D18 = 0; - int psx_taken_BFC29D18 = 0; - int psx_delay_BFC29D24 = 0; - int psx_taken_BFC29D24 = 0; - int psx_delay_BFC29D30 = 0; - int psx_taken_BFC29D30 = 0; - int psx_delay_BFC29D38 = 0; - int psx_taken_BFC29D38 = 0; - int psx_delay_BFC29D54 = 0; - int psx_delay_BFC29D6C = 0; - int psx_delay_BFC29D74 = 0; - int psx_delay_BFC29D7C = 0; - int psx_delay_BFC29D94 = 0; - int psx_taken_BFC29D94 = 0; - int psx_delay_BFC29DA4 = 0; - int psx_delay_BFC29DB0 = 0; - int psx_delay_BFC29DD4 = 0; - int psx_delay_BFC29DE4 = 0; - int psx_taken_BFC29DE4 = 0; - int psx_delay_BFC29EAC = 0; - int psx_delay_BFC29EC4 = 0; - int psx_delay_BFC29ED8 = 0; - int psx_taken_BFC29ED8 = 0; - int psx_delay_BFC29EE4 = 0; - int psx_taken_BFC29EE4 = 0; - int psx_delay_BFC29EEC = 0; - int psx_taken_BFC29EEC = 0; - int psx_delay_BFC29F08 = 0; - int psx_delay_BFC29F54 = 0; - int psx_taken_BFC29F54 = 0; - int psx_delay_BFC29F64 = 0; - int psx_delay_BFC29F74 = 0; - int psx_delay_BFC29F84 = 0; - int psx_delay_BFC29FA8 = 0; - int psx_taken_BFC29FA8 = 0; - int psx_delay_BFC29FB0 = 0; - int psx_delay_BFC29FE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC29B20u: goto label_BFC29B20; - case 0xBFC29B30u: goto label_BFC29B30; - case 0xBFC29B38u: goto label_BFC29B38; - case 0xBFC29B40u: goto label_BFC29B40; - case 0xBFC29B60u: goto label_BFC29B60; - case 0xBFC29B80u: goto label_BFC29B80; - case 0xBFC29BA0u: goto label_BFC29BA0; - case 0xBFC29BC0u: goto label_BFC29BC0; - case 0xBFC29BDCu: goto label_BFC29BDC; - case 0xBFC29C34u: goto label_BFC29C34; - case 0xBFC29C58u: goto label_BFC29C58; - case 0xBFC29C60u: goto label_BFC29C60; - case 0xBFC29C70u: goto label_BFC29C70; - case 0xBFC29C80u: goto label_BFC29C80; - case 0xBFC29C8Cu: goto label_BFC29C8C; - case 0xBFC29C98u: goto label_BFC29C98; - case 0xBFC29CA4u: goto label_BFC29CA4; - case 0xBFC29CB0u: goto label_BFC29CB0; - case 0xBFC29CBCu: goto label_BFC29CBC; - case 0xBFC29CD0u: goto label_BFC29CD0; - case 0xBFC29CE0u: goto label_BFC29CE0; - case 0xBFC29CF4u: goto label_BFC29CF4; - case 0xBFC29D08u: goto label_BFC29D08; - case 0xBFC29D20u: goto label_BFC29D20; - case 0xBFC29D2Cu: goto label_BFC29D2C; - case 0xBFC29D30u: goto label_BFC29D30; - case 0xBFC29D38u: goto label_BFC29D38; - case 0xBFC29D40u: goto label_BFC29D40; - case 0xBFC29D44u: goto label_BFC29D44; - case 0xBFC29D48u: goto label_BFC29D48; - case 0xBFC29D5Cu: goto label_BFC29D5C; - case 0xBFC29D74u: goto label_BFC29D74; - case 0xBFC29D7Cu: goto label_BFC29D7C; - case 0xBFC29D84u: goto label_BFC29D84; - case 0xBFC29D9Cu: goto label_BFC29D9C; - case 0xBFC29DACu: goto label_BFC29DAC; - case 0xBFC29DB8u: goto label_BFC29DB8; - case 0xBFC29DDCu: goto label_BFC29DDC; - case 0xBFC29DECu: goto label_BFC29DEC; - case 0xBFC29E7Cu: goto label_BFC29E7C; - case 0xBFC29EB4u: goto label_BFC29EB4; - case 0xBFC29ECCu: goto label_BFC29ECC; - case 0xBFC29EE0u: goto label_BFC29EE0; - case 0xBFC29EECu: goto label_BFC29EEC; - case 0xBFC29EF4u: goto label_BFC29EF4; - case 0xBFC29F10u: goto label_BFC29F10; - case 0xBFC29F14u: goto label_BFC29F14; - case 0xBFC29F5Cu: goto label_BFC29F5C; - case 0xBFC29F6Cu: goto label_BFC29F6C; - case 0xBFC29F7Cu: goto label_BFC29F7C; - case 0xBFC29F8Cu: goto label_BFC29F8C; - case 0xBFC29F9Cu: goto label_BFC29F9C; - case 0xBFC29FB0u: goto label_BFC29FB0; - case 0xBFC29FB8u: goto label_BFC29FB8; - default: break; - } - } -label_BFC29AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29AE0: 27BDFF50 addiu $sp, $sp, -176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-176)); - PGXP_ALU(0x27BDFF50u, cpu->gpr[29], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x80041AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC29AE4: AFBF0064 sw $ra, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AE4u); return; } g_debug_last_store_pc = 0x80041AE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0064u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC29AE8: AFB00040 sw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AE8u); return; } g_debug_last_store_pc = 0x80041AE8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC29AEC: AFBE0060 sw $fp, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AECu); return; } g_debug_last_store_pc = 0x80041AECu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0060u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC29AF0: AFB60058 sw $s6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AF0u); return; } g_debug_last_store_pc = 0x80041AF0u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60058u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC29AF4: AFB7005C sw $s7, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AF4u); return; } g_debug_last_store_pc = 0x80041AF4u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7005Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC29AF8: AFB40050 sw $s4, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AF8u); return; } g_debug_last_store_pc = 0x80041AF8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40050u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC29AFC: AFB50054 sw $s5, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041AFCu); return; } g_debug_last_store_pc = 0x80041AFCu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50054u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80041AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC29B00: AFB20048 sw $s2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B00u); return; } g_debug_last_store_pc = 0x80041B00u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20048u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29B04: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29B08: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC29B0C: AFB3004C sw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B0Cu); return; } g_debug_last_store_pc = 0x80041B0Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC29B10: AFB10044 sw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B10u); return; } g_debug_last_store_pc = 0x80041B10u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC29B14: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B18: 0C012DBC jal 0xB004B6F0 */ - cpu->gpr[31] = 0x80041B20u; /* jal link before delay slot */ - psx_delay_BFC29B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29B1C: AC228080 sw $v0, -32640($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -32640; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B1Cu); return; } g_debug_last_store_pc = 0x80041B1Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B1Cu); -#endif - if (psx_delay_BFC29B18) { - psx_delay_BFC29B18 = 0; - cpu->gpr[31] = 0x80041B20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6F0u); - cpu->pc = 0x8004B6F0u; return; - } -label_BFC29B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B20: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041B20u); -#endif - /* 0xBFC29B24: 8C849ED8 lw $a0, -24872($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B24u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849ED8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B28: 0C0107FA jal 0xB0041FE8 */ - cpu->gpr[31] = 0x80041B30u; /* jal link before delay slot */ - psx_delay_BFC29B28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041B2Cu); -#endif - if (psx_delay_BFC29B28) { - psx_delay_BFC29B28 = 0; - cpu->gpr[31] = 0x80041B30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041FE8u); - cpu->pc = 0x80041FE8u; return; - } -label_BFC29B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC29B30: 12000003 beq $s0, $zero, 0xBFC29B40 */ - uint32_t psx_brA_BFC29B30 = cpu->gpr[16]; uint32_t psx_brB_BFC29B30 = cpu->gpr[0]; - psx_taken_BFC29B30 = (psx_brA_BFC29B30 == psx_brB_BFC29B30); - psx_delay_BFC29B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC29B34: AFA200A8 sw $v0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B34u); return; } g_debug_last_store_pc = 0x80041B34u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200A8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B34u); -#endif - if (psx_delay_BFC29B30) { - psx_delay_BFC29B30 = 0; - if (psx_taken_BFC29B30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041B40u); - goto label_BFC29B40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041B38u); - } -label_BFC29B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B38: 0C011E9E jal 0xB0047A78 */ - cpu->gpr[31] = 0x80041B40u; /* jal link before delay slot */ - psx_delay_BFC29B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29B3C: 2404000C addiu $a0, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2404000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041B3Cu); -#endif - if (psx_delay_BFC29B38) { - psx_delay_BFC29B38 = 0; - cpu->gpr[31] = 0x80041B40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047A78u); - cpu->pc = 0x80047A78u; return; - } -label_BFC29B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B40: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC29B44: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC29B48: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B48u); return; } g_debug_last_store_pc = 0x80041B48u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B4C: 2484A868 addiu $a0, $a0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22424)); - PGXP_ALU(0x2484A868u, cpu->gpr[4], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29B50: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29B54: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B58: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80041B60u; /* jal link before delay slot */ - psx_delay_BFC29B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29B5C: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B5Cu); -#endif - if (psx_delay_BFC29B58) { - psx_delay_BFC29B58 = 0; - cpu->gpr[31] = 0x80041B60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC29B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B60: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC29B64: 240F01E0 addiu $t7, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240F01E0u, cpu->gpr[15], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC29B68: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B68u); return; } g_debug_last_store_pc = 0x80041B68u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B6C: 2484BC88 addiu $a0, $a0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); - PGXP_ALU(0x2484BC88u, cpu->gpr[4], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29B70: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29B74: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B78: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80041B80u; /* jal link before delay slot */ - psx_delay_BFC29B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29B7C: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B7Cu); -#endif - if (psx_delay_BFC29B78) { - psx_delay_BFC29B78 = 0; - cpu->gpr[31] = 0x80041B80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC29B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B80: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC29B84: 241801DE addiu $t8, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241801DEu, cpu->gpr[24], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x80041B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC29B88: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041B88u); return; } g_debug_last_store_pc = 0x80041B88u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29B8C: 2484A8C4 addiu $a0, $a0, -22332 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22332)); - PGXP_ALU(0x2484A8C4u, cpu->gpr[4], _pgx1, 0xFFFFA8C4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29B90: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29B94: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29B98: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x80041BA0u; /* jal link before delay slot */ - psx_delay_BFC29B98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29B9C: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80041B9Cu); -#endif - if (psx_delay_BFC29B98) { - psx_delay_BFC29B98 = 0; - cpu->gpr[31] = 0x80041BA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC29BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29BA0: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC29BA4: 241901DE addiu $t9, $zero, 478 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (478)); - PGXP_ALU(0x241901DEu, cpu->gpr[25], _pgx1, 0x000001DEu); } -#ifdef PSX_COSIM - cosim_instr(0x80041BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC29BA8: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041BA8u); return; } g_debug_last_store_pc = 0x80041BA8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29BAC: 2484BCE4 addiu $a0, $a0, -17180 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17180)); - PGXP_ALU(0x2484BCE4u, cpu->gpr[4], _pgx1, 0xFFFFBCE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29BB0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29BB4: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80041BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29BB8: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x80041BC0u; /* jal link before delay slot */ - psx_delay_BFC29BB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC29BBC: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80041BBCu); -#endif - if (psx_delay_BFC29BB8) { - psx_delay_BFC29BB8 = 0; - cpu->gpr[31] = 0x80041BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC29BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29BC0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC29BC4: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BC4u); -#endif - /* 0xBFC29BC8: 8D089DE0 lw $t0, -25120($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041BC8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29BCC: A020BC9F sb $zero, -17249($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17249; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80041BCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-17249)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020BC9Fu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29BD0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC29BD4: 11000017 beq $t0, $zero, 0xBFC29C34 */ - uint32_t psx_brA_BFC29BD4 = cpu->gpr[8]; uint32_t psx_brB_BFC29BD4 = cpu->gpr[0]; - psx_taken_BFC29BD4 = (psx_brA_BFC29BD4 == psx_brB_BFC29BD4); - psx_delay_BFC29BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29BD8: A020A87F sb $zero, -22401($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22401; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80041BD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22401)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020A87Fu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BD8u); -#endif - if (psx_delay_BFC29BD4) { - psx_delay_BFC29BD4 = 0; - if (psx_taken_BFC29BD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041C34u); - goto label_BFC29C34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041BDCu); - } -label_BFC29BDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29BDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC29BDC: 24090003 addiu $t1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24090003u, cpu->gpr[9], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80041BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29BE0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC29BE4: A429BCEC sh $t1, -17172($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17172)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041BE4u); return; } g_debug_last_store_pc = 0x80041BE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA429BCECu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29BE8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC29BEC: 240A0003 addiu $t2, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240A0003u, cpu->gpr[10], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80041BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC29BF0: A42AA8CC sh $t2, -22324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22324)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041BF0u); return; } g_debug_last_store_pc = 0x80041BF0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA42AA8CCu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29BF4: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC29BF8: 240B001B addiu $t3, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240B001Bu, cpu->gpr[11], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80041BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC29BFC: A42BBCEE sh $t3, -17170($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041BFCu); return; } g_debug_last_store_pc = 0x80041BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA42BBCEEu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C00: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC29C04: 240C001B addiu $t4, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240C001Bu, cpu->gpr[12], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80041C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC29C08: A42CA8CE sh $t4, -22322($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22322; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22322)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041C08u); return; } g_debug_last_store_pc = 0x80041C08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CA8CEu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C0C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29C10: A420BCF0 sh $zero, -17168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041C10u); return; } g_debug_last_store_pc = 0x80041C10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420BCF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C14: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29C18: A420A8D0 sh $zero, -22320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22320)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041C18u); return; } g_debug_last_store_pc = 0x80041C18u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420A8D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C1C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC29C20: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC29C24: A02DBCF6 sb $t5, -17162($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17162; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80041C24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-17162)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA02DBCF6u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C28: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC29C2C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC29C30: A02EA8D6 sb $t6, -22314($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22314; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80041C30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22314)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EA8D6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C30u); -#endif -label_BFC29C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC29C34: 240F00EC addiu $t7, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x240F00ECu, cpu->gpr[15], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80041C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C38: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC29C3C: A42FBCF2 sh $t7, -17166($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041C3Cu); return; } g_debug_last_store_pc = 0x80041C3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FBCF2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29C40: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC29C44: 241800EC addiu $t8, $zero, 236 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (236)); - PGXP_ALU(0x241800ECu, cpu->gpr[24], _pgx1, 0x000000ECu); } -#ifdef PSX_COSIM - cosim_instr(0x80041C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC29C48: A438A8D2 sh $t8, -22318($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22318; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22318)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80041C48u); return; } g_debug_last_store_pc = 0x80041C48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438A8D2u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29C4C: 24040140 addiu $a0, $zero, 320 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (320)); - PGXP_ALU(0x24040140u, cpu->gpr[4], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C50: 0C012FED jal 0xB004BFB4 */ - cpu->gpr[31] = 0x80041C58u; /* jal link before delay slot */ - psx_delay_BFC29C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29C54: 240500F0 addiu $a1, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240500F0u, cpu->gpr[5], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C54u); -#endif - if (psx_delay_BFC29C50) { - psx_delay_BFC29C50 = 0; - cpu->gpr[31] = 0x80041C58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFB4u); - cpu->pc = 0x8004BFB4u; return; - } -label_BFC29C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C58: 0C012FF3 jal 0xB004BFCC */ - cpu->gpr[31] = 0x80041C60u; /* jal link before delay slot */ - psx_delay_BFC29C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29C5C: 24040400 addiu $a0, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24040400u, cpu->gpr[4], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C5Cu); -#endif - if (psx_delay_BFC29C58) { - psx_delay_BFC29C58 = 0; - cpu->gpr[31] = 0x80041C60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFCCu); - cpu->pc = 0x8004BFCCu; return; - } -label_BFC29C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29C60: 24040064 addiu $a0, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29C64: 24050064 addiu $a1, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24050064u, cpu->gpr[5], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C68: 0C012FC0 jal 0xB004BF00 */ - cpu->gpr[31] = 0x80041C70u; /* jal link before delay slot */ - psx_delay_BFC29C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29C6C: 24060064 addiu $a2, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24060064u, cpu->gpr[6], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C6Cu); -#endif - if (psx_delay_BFC29C68) { - psx_delay_BFC29C68 = 0; - cpu->gpr[31] = 0x80041C70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BF00u); - cpu->pc = 0x8004BF00u; return; - } -label_BFC29C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29C70: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29C74: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C78: 0C012FC8 jal 0xB004BF20 */ - cpu->gpr[31] = 0x80041C80u; /* jal link before delay slot */ - psx_delay_BFC29C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC29C7C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041C7Cu); -#endif - if (psx_delay_BFC29C78) { - psx_delay_BFC29C78 = 0; - cpu->gpr[31] = 0x80041C80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BF20u); - cpu->pc = 0x8004BF20u; return; - } -label_BFC29C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29C80: 24042710 addiu $a0, $zero, 10000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (10000)); - PGXP_ALU(0x24042710u, cpu->gpr[4], _pgx1, 0x00002710u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C84: 0C0132BC jal 0xB004CAF0 */ - cpu->gpr[31] = 0x80041C8Cu; /* jal link before delay slot */ - psx_delay_BFC29C84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29C88: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C88u); -#endif - if (psx_delay_BFC29C84) { - psx_delay_BFC29C84 = 0; - cpu->gpr[31] = 0x80041C8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAF0u); - cpu->pc = 0x8004CAF0u; return; - } -label_BFC29C8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29C8C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C90: 0C0108C7 jal 0xB004231C */ - cpu->gpr[31] = 0x80041C98u; /* jal link before delay slot */ - psx_delay_BFC29C90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29C94: 2484A868 addiu $a0, $a0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22424)); - PGXP_ALU(0x2484A868u, cpu->gpr[4], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x80041C94u); -#endif - if (psx_delay_BFC29C90) { - psx_delay_BFC29C90 = 0; - cpu->gpr[31] = 0x80041C98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004231Cu); - cpu->pc = 0x8004231Cu; return; - } -label_BFC29C98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29C98: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29C9C: 0C0108C7 jal 0xB004231C */ - cpu->gpr[31] = 0x80041CA4u; /* jal link before delay slot */ - psx_delay_BFC29C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CA0: 2484BC88 addiu $a0, $a0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); - PGXP_ALU(0x2484BC88u, cpu->gpr[4], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CA0u); -#endif - if (psx_delay_BFC29C9C) { - psx_delay_BFC29C9C = 0; - cpu->gpr[31] = 0x80041CA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004231Cu); - cpu->pc = 0x8004231Cu; return; - } -label_BFC29CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CA4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29CA8: 0C0136CE jal 0xB004DB38 */ - cpu->gpr[31] = 0x80041CB0u; /* jal link before delay slot */ - psx_delay_BFC29CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CAC: 24848050 addiu $a0, $a0, -32688 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32688)); - PGXP_ALU(0x24848050u, cpu->gpr[4], _pgx1, 0xFFFF8050u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CACu); -#endif - if (psx_delay_BFC29CA8) { - psx_delay_BFC29CA8 = 0; - cpu->gpr[31] = 0x80041CB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DB38u); - cpu->pc = 0x8004DB38u; return; - } -label_BFC29CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CB0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29CB4: 0C0136C2 jal 0xB004DB08 */ - cpu->gpr[31] = 0x80041CBCu; /* jal link before delay slot */ - psx_delay_BFC29CB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CB8: 24848030 addiu $a0, $a0, -32720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32720)); - PGXP_ALU(0x24848030u, cpu->gpr[4], _pgx1, 0xFFFF8030u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CB8u); -#endif - if (psx_delay_BFC29CB4) { - psx_delay_BFC29CB4 = 0; - cpu->gpr[31] = 0x80041CBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DB08u); - cpu->pc = 0x8004DB08u; return; - } -label_BFC29CBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CBC: 3C048014 lui $a0, 0x8014 */ - cpu->gpr[4] = 0x80140000u; - PGXP_ALU(0x3C048014u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CC0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CC4: 24A58070 addiu $a1, $a1, -32656 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-32656)); - PGXP_ALU(0x24A58070u, cpu->gpr[5], _pgx1, 0xFFFF8070u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29CC8: 0C01366D jal 0xB004D9B4 */ - cpu->gpr[31] = 0x80041CD0u; /* jal link before delay slot */ - psx_delay_BFC29CC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CCC: 2484E388 addiu $a0, $a0, -7288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7288)); - PGXP_ALU(0x2484E388u, cpu->gpr[4], _pgx1, 0xFFFFE388u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CCCu); -#endif - if (psx_delay_BFC29CC8) { - psx_delay_BFC29CC8 = 0; - cpu->gpr[31] = 0x80041CD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004D9B4u); - cpu->pc = 0x8004D9B4u; return; - } -label_BFC29CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC29CD0: 2402003C addiu $v0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2402003Cu, cpu->gpr[2], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29CD4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29CD8: 0C0100BA jal 0xB00402E8 */ - cpu->gpr[31] = 0x80041CE0u; /* jal link before delay slot */ - psx_delay_BFC29CD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29CDC: AC228080 sw $v0, -32640($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -32640; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041CDCu); return; } g_debug_last_store_pc = 0x80041CDCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041CDCu); -#endif - if (psx_delay_BFC29CD8) { - psx_delay_BFC29CD8 = 0; - cpu->gpr[31] = 0x80041CE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800402E8u); - cpu->pc = 0x800402E8u; return; - } -label_BFC29CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CE0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CE4: 3C058014 lui $a1, 0x8014 */ - cpu->gpr[5] = 0x80140000u; - PGXP_ALU(0x3C058014u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CE8: 24A5E388 addiu $a1, $a1, -7288 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-7288)); - PGXP_ALU(0x24A5E388u, cpu->gpr[5], _pgx1, 0xFFFFE388u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29CEC: 0C013058 jal 0xB004C160 */ - cpu->gpr[31] = 0x80041CF4u; /* jal link before delay slot */ - psx_delay_BFC29CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CF0: 24848084 addiu $a0, $a0, -32636 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32636)); - PGXP_ALU(0x24848084u, cpu->gpr[4], _pgx1, 0xFFFF8084u); } -#ifdef PSX_COSIM - cosim_instr(0x80041CF0u); -#endif - if (psx_delay_BFC29CEC) { - psx_delay_BFC29CEC = 0; - cpu->gpr[31] = 0x80041CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C160u); - cpu->pc = 0x8004C160u; return; - } -label_BFC29CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29CF4: 3C048014 lui $a0, 0x8014 */ - cpu->gpr[4] = 0x80140000u; - PGXP_ALU(0x3C048014u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CF8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC29CFC: 24A5808C addiu $a1, $a1, -32628 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-32628)); - PGXP_ALU(0x24A5808Cu, cpu->gpr[5], _pgx1, 0xFFFF808Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29D00: 0C01361B jal 0xB004D86C */ - cpu->gpr[31] = 0x80041D08u; /* jal link before delay slot */ - psx_delay_BFC29D00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29D04: 2484E388 addiu $a0, $a0, -7288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7288)); - PGXP_ALU(0x2484E388u, cpu->gpr[4], _pgx1, 0xFFFFE388u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D04u); -#endif - if (psx_delay_BFC29D00) { - psx_delay_BFC29D00 = 0; - cpu->gpr[31] = 0x80041D08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004D86Cu); - cpu->pc = 0x8004D86Cu; return; - } -label_BFC29D08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29D08: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D08u); -#endif - /* 0xBFC29D0C: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D0Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29D10: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29D14: 2442A868 addiu $v0, $v0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-22424)); - PGXP_ALU(0x2442A868u, cpu->gpr[2], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC29D18: 16020005 bne $s0, $v0, 0xBFC29D30 */ - uint32_t psx_brA_BFC29D18 = cpu->gpr[16]; uint32_t psx_brB_BFC29D18 = cpu->gpr[2]; - psx_taken_BFC29D18 = (psx_brA_BFC29D18 != psx_brB_BFC29D18); - psx_delay_BFC29D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC29D1C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041D1Cu); -#endif - if (psx_delay_BFC29D18) { - psx_delay_BFC29D18 = 0; - if (psx_taken_BFC29D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D30u); - goto label_BFC29D30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D20u); - } -label_BFC29D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29D20: 3C10800F lui $s0, 0x800F */ - cpu->gpr[16] = 0x800F0000u; - PGXP_ALU(0x3C10800Fu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29D24: 10000002 beq $zero, $zero, 0xBFC29D30 */ - uint32_t psx_brA_BFC29D24 = cpu->gpr[0]; uint32_t psx_brB_BFC29D24 = cpu->gpr[0]; - psx_taken_BFC29D24 = (psx_brA_BFC29D24 == psx_brB_BFC29D24); - psx_delay_BFC29D24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29D28: 2610BC88 addiu $s0, $s0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-17272)); - PGXP_ALU(0x2610BC88u, cpu->gpr[16], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D28u); -#endif - if (psx_delay_BFC29D24) { - psx_delay_BFC29D24 = 0; - if (psx_taken_BFC29D24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D30u); - goto label_BFC29D30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D2Cu); - } -label_BFC29D2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC29D2C: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041D2Cu); -#endif -label_BFC29D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC29D30: 16020004 bne $s0, $v0, 0xBFC29D44 */ - uint32_t psx_brA_BFC29D30 = cpu->gpr[16]; uint32_t psx_brB_BFC29D30 = cpu->gpr[2]; - psx_taken_BFC29D30 = (psx_brA_BFC29D30 != psx_brB_BFC29D30); - psx_delay_BFC29D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC29D34: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D34u); -#endif - if (psx_delay_BFC29D30) { - psx_delay_BFC29D30 = 0; - if (psx_taken_BFC29D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D44u); - goto label_BFC29D44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D38u); - } -label_BFC29D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29D38: 10000003 beq $zero, $zero, 0xBFC29D48 */ - uint32_t psx_brA_BFC29D38 = cpu->gpr[0]; uint32_t psx_brB_BFC29D38 = cpu->gpr[0]; - psx_taken_BFC29D38 = (psx_brA_BFC29D38 == psx_brB_BFC29D38); - psx_delay_BFC29D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC29D3C: AFA000A4 sw $zero, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D3Cu); return; } g_debug_last_store_pc = 0x80041D3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000A4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D3Cu); -#endif - if (psx_delay_BFC29D38) { - psx_delay_BFC29D38 = 0; - if (psx_taken_BFC29D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D48u); - goto label_BFC29D48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D40u); - } -label_BFC29D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC29D40: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D40u); -#endif -label_BFC29D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC29D44: AFB900A4 sw $t9, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D44u); return; } g_debug_last_store_pc = 0x80041D44u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900A4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D44u); -#endif -label_BFC29D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29D48: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC29D4C: AC30AE2C sw $s0, -20948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D4Cu); return; } g_debug_last_store_pc = 0x80041D4Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC30AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC29D50: 26040070 addiu $a0, $s0, 112 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (112)); - PGXP_ALU(0x26040070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29D54: 0C013CCD jal 0xB004F334 */ - cpu->gpr[31] = 0x80041D5Cu; /* jal link before delay slot */ - psx_delay_BFC29D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29D58: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D58u); -#endif - if (psx_delay_BFC29D54) { - psx_delay_BFC29D54 = 0; - cpu->gpr[31] = 0x80041D5Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F334u); - cpu->pc = 0x8004F334u; return; - } -label_BFC29D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29D5C: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D60u); -#endif - /* 0xBFC29D60: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D60u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29D64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC29D68: 2604106C addiu $a0, $s0, 4204 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4204)); - PGXP_ALU(0x2604106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29D6C: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80041D74u; /* jal link before delay slot */ - psx_delay_BFC29D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC29D70: 26051070 addiu $a1, $s0, 4208 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); - PGXP_ALU(0x26051070u, cpu->gpr[5], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D70u); -#endif - if (psx_delay_BFC29D6C) { - psx_delay_BFC29D6C = 0; - cpu->gpr[31] = 0x80041D74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC29D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29D74: 0C013C1C jal 0xB004F070 */ - cpu->gpr[31] = 0x80041D7Cu; /* jal link before delay slot */ - psx_delay_BFC29D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29D78: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041D78u); -#endif - if (psx_delay_BFC29D74) { - psx_delay_BFC29D74 = 0; - cpu->gpr[31] = 0x80041D7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F070u); - cpu->pc = 0x8004F070u; return; - } -label_BFC29D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29D7C: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80041D84u; /* jal link before delay slot */ - psx_delay_BFC29D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC29D80: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041D80u); -#endif - if (psx_delay_BFC29D7C) { - psx_delay_BFC29D7C = 0; - cpu->gpr[31] = 0x80041D84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC29D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29D84: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D84u); -#endif - /* 0xBFC29D88: 8C428080 lw $v0, -32640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -32640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041D88u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29D8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29D90: 2841003C slti $at, $v0, 60 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (60) ? 1 : 0); - PGXP_ALU(0x2841003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29D94: 14200081 bne $at, $zero, 0xBFC29F9C */ - uint32_t psx_brA_BFC29D94 = cpu->gpr[1]; uint32_t psx_brB_BFC29D94 = cpu->gpr[0]; - psx_taken_BFC29D94 = (psx_brA_BFC29D94 != psx_brB_BFC29D94); - psx_delay_BFC29D94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29D98: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041D98u); -#endif - if (psx_delay_BFC29D94) { - psx_delay_BFC29D94 = 0; - if (psx_taken_BFC29D94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F9Cu); - goto label_BFC29F9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D9Cu); - } -label_BFC29D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29D9C: 3C048014 lui $a0, 0x8014 */ - cpu->gpr[4] = 0x80140000u; - PGXP_ALU(0x3C048014u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29DA0: 2484E388 addiu $a0, $a0, -7288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7288)); - PGXP_ALU(0x2484E388u, cpu->gpr[4], _pgx1, 0xFFFFE388u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29DA4: 0C0136B6 jal 0xB004DAD8 */ - cpu->gpr[31] = 0x80041DACu; /* jal link before delay slot */ - psx_delay_BFC29DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC29DA8: AFA000AC sw $zero, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041DA8u); return; } g_debug_last_store_pc = 0x80041DA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000ACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80041DA8u); -#endif - if (psx_delay_BFC29DA4) { - psx_delay_BFC29DA4 = 0; - cpu->gpr[31] = 0x80041DACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DAD8u); - cpu->pc = 0x8004DAD8u; return; - } -label_BFC29DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29DAC: 3C048014 lui $a0, 0x8014 */ - cpu->gpr[4] = 0x80140000u; - PGXP_ALU(0x3C048014u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29DB0: 0C0136DA jal 0xB004DB68 */ - cpu->gpr[31] = 0x80041DB8u; /* jal link before delay slot */ - psx_delay_BFC29DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29DB4: 2484E388 addiu $a0, $a0, -7288 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-7288)); - PGXP_ALU(0x2484E388u, cpu->gpr[4], _pgx1, 0xFFFFE388u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DB4u); -#endif - if (psx_delay_BFC29DB0) { - psx_delay_BFC29DB0 = 0; - cpu->gpr[31] = 0x80041DB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DB68u); - cpu->pc = 0x8004DB68u; return; - } -label_BFC29DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29DB8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041DB8u); -#endif - /* 0xBFC29DBC: 8C428080 lw $v0, -32640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -32640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041DBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC29DC0: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC29DC4: 00022140 sll $a0, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 5u; - PGXP_ALU(0x00022140u, cpu->gpr[4], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC29DC8: 00822021 addu $a0, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[2]; - PGXP_ALU(0x00822021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29DCC: 00042080 sll $a0, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00042080u, cpu->gpr[4], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC29DD0: 00822021 addu $a0, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[2]; - PGXP_ALU(0x00822021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29DD4: 0C0132BC jal 0xB004CAF0 */ - cpu->gpr[31] = 0x80041DDCu; /* jal link before delay slot */ - psx_delay_BFC29DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29DD8: 2484E4BC addiu $a0, $a0, -6980 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-6980)); - PGXP_ALU(0x2484E4BCu, cpu->gpr[4], _pgx1, 0xFFFFE4BCu); } -#ifdef PSX_COSIM - cosim_instr(0x80041DD8u); -#endif - if (psx_delay_BFC29DD4) { - psx_delay_BFC29DD4 = 0; - cpu->gpr[31] = 0x80041DDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAF0u); - cpu->pc = 0x8004CAF0u; return; - } -label_BFC29DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DDCu); -#endif - /* 0xBFC29DDC: 8FA800A8 lw $t0, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041DDCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800A8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29DE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC29DE4: 1900005D blez $t0, 0xBFC29F5C */ - uint32_t psx_brA_BFC29DE4 = cpu->gpr[8]; - psx_taken_BFC29DE4 = ((int32_t)psx_brA_BFC29DE4 <= 0); - psx_delay_BFC29DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041DE8u); -#endif - if (psx_delay_BFC29DE4) { - psx_delay_BFC29DE4 = 0; - if (psx_taken_BFC29DE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F5Cu); - goto label_BFC29F5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041DECu); - } -label_BFC29DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DECu); -#endif - /* 0xBFC29DEC: 8FA200A4 lw $v0, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041DECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29DF0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC29DF4: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC29DF8: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29DFC: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29E00: 00026080 sll $t4, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00026080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29E04: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC29E08: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29E0C: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29E10: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29E14: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC29E18: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29E1C: 00094940 sll $t1, $t1, 5 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 5u; - PGXP_ALU(0x00094940u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29E20: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC29E24: 254A3F90 addiu $t2, $t2, 16272 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (16272)); - PGXP_ALU(0x254A3F90u, cpu->gpr[10], _pgx1, 0x00003F90u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC29E28: 012A8821 addu $s1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[17] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29E2C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC29E30: 01826023 subu $t4, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[2]; - PGXP_ALU(0x01826023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC29E34: 000C6140 sll $t4, $t4, 5 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 5u; - PGXP_ALU(0x000C6140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC29E38: 25AD3F94 addiu $t5, $t5, 16276 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (16276)); - PGXP_ALU(0x25AD3F94u, cpu->gpr[13], _pgx1, 0x00003F94u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29E3C: 3C0B8014 lui $t3, 0x8014 */ - cpu->gpr[11] = 0x80140000u; - PGXP_ALU(0x3C0B8014u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC29E40: 256B8F08 addiu $t3, $t3, -28920 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-28920)); - PGXP_ALU(0x256B8F08u, cpu->gpr[11], _pgx1, 0xFFFF8F08u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC29E44: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC29E48: 3C128014 lui $s2, 0x8014 */ - cpu->gpr[18] = 0x80140000u; - PGXP_ALU(0x3C128014u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC29E4C: 3C138014 lui $s3, 0x8014 */ - cpu->gpr[19] = 0x80140000u; - PGXP_ALU(0x3C138014u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC29E50: 3C148014 lui $s4, 0x8014 */ - cpu->gpr[20] = 0x80140000u; - PGXP_ALU(0x3C148014u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC29E54: 3C1E8014 lui $fp, 0x8014 */ - cpu->gpr[30] = 0x80140000u; - PGXP_ALU(0x3C1E8014u, cpu->gpr[30], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC29E58: AFAE006C sw $t6, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E58u); return; } g_debug_last_store_pc = 0x80041E58u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE006Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC29E5C: 27DE8F00 addiu $fp, $fp, -28928 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (-28928)); - PGXP_ALU(0x27DE8F00u, cpu->gpr[30], _pgx1, 0xFFFF8F00u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC29E60: 26948EF8 addiu $s4, $s4, -28936 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-28936)); - PGXP_ALU(0x26948EF8u, cpu->gpr[20], _pgx1, 0xFFFF8EF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC29E64: 26738EF0 addiu $s3, $s3, -28944 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-28944)); - PGXP_ALU(0x26738EF0u, cpu->gpr[19], _pgx1, 0xFFFF8EF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC29E68: 26528EE8 addiu $s2, $s2, -28952 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-28952)); - PGXP_ALU(0x26528EE8u, cpu->gpr[18], _pgx1, 0xFFFF8EE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC29E6C: AFAB0070 sw $t3, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E6Cu); return; } g_debug_last_store_pc = 0x80041E6Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0070u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC29E70: 26350008 addiu $s5, $s1, 8 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[17] + (8)); - PGXP_ALU(0x26350008u, cpu->gpr[21], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420000u); -#endif - /* 0xBFC29E74: 2636000C addiu $s6, $s1, 12 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[17] + (12)); - PGXP_ALU(0x2636000Cu, cpu->gpr[22], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820000u); -#endif - /* 0xBFC29E78: 26370010 addiu $s7, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[17] + (16)); - PGXP_ALU(0x26370010u, cpu->gpr[23], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E78u); -#endif -label_BFC29E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC29E7C: AFB60010 sw $s6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E7Cu); return; } g_debug_last_store_pc = 0x80041E7Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60010u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC29E80: AFB70014 sw $s7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E80u); return; } g_debug_last_store_pc = 0x80041E80u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70014u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E80u); -#endif - /* 0xBFC29E84: 8FA200AC lw $v0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC29E88: 27AF009C addiu $t7, $sp, 156 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (156)); - PGXP_ALU(0x27AF009Cu, cpu->gpr[15], _pgx1, 0x0000009Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC29E8C: 27B800A0 addiu $t8, $sp, 160 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (160)); - PGXP_ALU(0x27B800A0u, cpu->gpr[24], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC29E90: 27B90098 addiu $t9, $sp, 152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (152)); - PGXP_ALU(0x27B90098u, cpu->gpr[25], _pgx1, 0x00000098u); } -#ifdef PSX_COSIM - cosim_instr(0x80041E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC29E94: AFB90020 sw $t9, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E94u); return; } g_debug_last_store_pc = 0x80041E94u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC29E98: AFB8001C sw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E98u); return; } g_debug_last_store_pc = 0x80041E98u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC29E9C: AFAF0018 sw $t7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041E9Cu); return; } g_debug_last_store_pc = 0x80041E9Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC29EA0: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC29EA4: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC29EA8: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29EAC: 0C0139D0 jal 0xB004E740 */ - cpu->gpr[31] = 0x80041EB4u; /* jal link before delay slot */ - psx_delay_BFC29EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200081u); -#endif - /* 0xBFC29EB0: 02A03821 addu $a3, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EB0u); -#endif - if (psx_delay_BFC29EAC) { - psx_delay_BFC29EAC = 0; - cpu->gpr[31] = 0x80041EB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E740u); - cpu->pc = 0x8004E740u; return; - } -label_BFC29EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EB4u); -#endif - /* 0xBFC29EB4: 8FA50070 lw $a1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EB4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50070u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EB4u); -#endif - /* 0xBFC29EB8: 8FA6009C lw $a2, 156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EB8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6009Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EB8u); -#endif - /* 0xBFC29EBC: 8FA7006C lw $a3, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EBCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7006Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC29EC0: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29EC4: 0C01381A jal 0xB004E068 */ - cpu->gpr[31] = 0x80041ECCu; /* jal link before delay slot */ - psx_delay_BFC29EC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC29EC8: 03C02021 addu $a0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041EC8u); -#endif - if (psx_delay_BFC29EC4) { - psx_delay_BFC29EC4 = 0; - cpu->gpr[31] = 0x80041ECCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E068u); - cpu->pc = 0x8004E068u; return; - } -label_BFC29ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041ECCu); -#endif - /* 0xBFC29ECC: 8FA800A0 lw $t0, 160($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 160; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041ECCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800A0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80041ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29ED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC29ED4: 00084883 sra $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 2u); - PGXP_ALU(0x00084883u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC29ED8: 1920000D blez $t1, 0xBFC29F10 */ - uint32_t psx_brA_BFC29ED8 = cpu->gpr[9]; - psx_taken_BFC29ED8 = ((int32_t)psx_brA_BFC29ED8 <= 0); - psx_delay_BFC29ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC29EDC: AFA900A0 sw $t1, 160($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EDCu); return; } g_debug_last_store_pc = 0x80041EDCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA900A0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EDCu); -#endif - if (psx_delay_BFC29ED8) { - psx_delay_BFC29ED8 = 0; - if (psx_taken_BFC29ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F10u); - goto label_BFC29F10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041EE0u); - } -label_BFC29EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC29EE0: 29210400 slti $at, $t1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0); - PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80041EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29EE4: 1020000B beq $at, $zero, 0xBFC29F14 */ - uint32_t psx_brA_BFC29EE4 = cpu->gpr[1]; uint32_t psx_brB_BFC29EE4 = cpu->gpr[0]; - psx_taken_BFC29EE4 = (psx_brA_BFC29EE4 == psx_brB_BFC29EE4); - psx_delay_BFC29EE4 = 1; - /* 0xBFC29EE8: 8FA200AC lw $v0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EE8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EE8u); -#endif - if (psx_delay_BFC29EE4) { - psx_delay_BFC29EE4 = 0; - if (psx_taken_BFC29EE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F14u); - goto label_BFC29F14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041EECu); - } -label_BFC29EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29EEC: 1A000009 blez $s0, 0xBFC29F14 */ - uint32_t psx_brA_BFC29EEC = cpu->gpr[16]; - psx_taken_BFC29EEC = ((int32_t)psx_brA_BFC29EEC <= 0); - psx_delay_BFC29EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EF0u); -#endif - /* 0xBFC29EF0: 8FA200AC lw $v0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EF0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EF0u); -#endif - if (psx_delay_BFC29EEC) { - psx_delay_BFC29EEC = 0; - if (psx_taken_BFC29EEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F14u); - goto label_BFC29F14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041EF4u); - } -label_BFC29EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29EF4: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041EF4u); -#endif - /* 0xBFC29EF8: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041EF8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC29EFC: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10410u); -#endif - /* 0xBFC29F00: 020A2021 addu $a0, $s0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[10]; - PGXP_ALU(0x020A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29F04: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29F08: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80041F10u; /* jal link before delay slot */ - psx_delay_BFC29F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC29F0C: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041F0Cu); -#endif - if (psx_delay_BFC29F08) { - psx_delay_BFC29F08 = 0; - cpu->gpr[31] = 0x80041F10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC29F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F10u); -#endif - /* 0xBFC29F10: 8FA200AC lw $v0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F10u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F10u); -#endif -label_BFC29F14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F14u); -#endif - /* 0xBFC29F14: 8FAB0070 lw $t3, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F14u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0070u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F14u); -#endif - /* 0xBFC29F18: 8FAD006C lw $t5, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F18u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD006Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F18u); -#endif - /* 0xBFC29F1C: 8FAF00A8 lw $t7, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F1Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00A8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29F20: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC29F24: 256C0024 addiu $t4, $t3, 36 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (36)); - PGXP_ALU(0x256C0024u, cpu->gpr[12], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC29F28: 25AE0014 addiu $t6, $t5, 20 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (20)); - PGXP_ALU(0x25AE0014u, cpu->gpr[14], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC29F2C: AFAE006C sw $t6, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F2Cu); return; } g_debug_last_store_pc = 0x80041F2Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE006Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC29F30: AFAC0070 sw $t4, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F30u); return; } g_debug_last_store_pc = 0x80041F30u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0070u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC29F34: AFA200AC sw $v0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F34u); return; } g_debug_last_store_pc = 0x80041F34u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA200ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC29F38: 26520024 addiu $s2, $s2, 36 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (36)); - PGXP_ALU(0x26520024u, cpu->gpr[18], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC29F3C: 26730024 addiu $s3, $s3, 36 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (36)); - PGXP_ALU(0x26730024u, cpu->gpr[19], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC29F40: 26940024 addiu $s4, $s4, 36 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (36)); - PGXP_ALU(0x26940024u, cpu->gpr[20], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC29F44: 26310014 addiu $s1, $s1, 20 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (20)); - PGXP_ALU(0x26310014u, cpu->gpr[17], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC29F48: 26B50014 addiu $s5, $s5, 20 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (20)); - PGXP_ALU(0x26B50014u, cpu->gpr[21], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC29F4C: 26D60014 addiu $s6, $s6, 20 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (20)); - PGXP_ALU(0x26D60014u, cpu->gpr[22], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC29F50: 26F70014 addiu $s7, $s7, 20 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (20)); - PGXP_ALU(0x26F70014u, cpu->gpr[23], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC29F54: 144FFFC9 bne $v0, $t7, 0xBFC29E7C */ - uint32_t psx_brA_BFC29F54 = cpu->gpr[2]; uint32_t psx_brB_BFC29F54 = cpu->gpr[15]; - psx_taken_BFC29F54 = (psx_brA_BFC29F54 != psx_brB_BFC29F54); - psx_delay_BFC29F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC29F58: 27DE0024 addiu $fp, $fp, 36 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (36)); - PGXP_ALU(0x27DE0024u, cpu->gpr[30], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F58u); -#endif - if (psx_delay_BFC29F54) { - psx_delay_BFC29F54 = 0; - if (psx_taken_BFC29F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041E7Cu); - goto label_BFC29E7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041F5Cu); - } -label_BFC29F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29F5C: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F60u); -#endif - /* 0xBFC29F60: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F60u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29F64: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80041F6Cu; /* jal link before delay slot */ - psx_delay_BFC29F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC29F68: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80041F68u); -#endif - if (psx_delay_BFC29F64) { - psx_delay_BFC29F64 = 0; - cpu->gpr[31] = 0x80041F6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC29F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29F6C: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F70u); -#endif - /* 0xBFC29F70: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F70u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29F74: 0C013D3B jal 0xB004F4EC */ - cpu->gpr[31] = 0x80041F7Cu; /* jal link before delay slot */ - psx_delay_BFC29F74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC29F78: 2604005C addiu $a0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2604005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041F78u); -#endif - if (psx_delay_BFC29F74) { - psx_delay_BFC29F74 = 0; - cpu->gpr[31] = 0x80041F7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F4ECu); - cpu->pc = 0x8004F4ECu; return; - } -label_BFC29F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC29F7C: 3C108006 lui $s0, 0x8006 */ - cpu->gpr[16] = 0x80060000u; - PGXP_ALU(0x3C108006u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F80u); -#endif - /* 0xBFC29F80: 8E10AE2C lw $s0, -20948($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F80u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10AE2Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29F84: 0C013CF8 jal 0xB004F3E0 */ - cpu->gpr[31] = 0x80041F8Cu; /* jal link before delay slot */ - psx_delay_BFC29F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC29F88: 2604106C addiu $a0, $s0, 4204 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4204)); - PGXP_ALU(0x2604106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041F88u); -#endif - if (psx_delay_BFC29F84) { - psx_delay_BFC29F84 = 0; - cpu->gpr[31] = 0x80041F8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F3E0u); - cpu->pc = 0x8004F3E0u; return; - } -label_BFC29F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29F8C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F90u); -#endif - /* 0xBFC29F90: 8C428080 lw $v0, -32640($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -32640; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041F90u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29F94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC29F98: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80041F98u); -#endif -label_BFC29F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC29F9C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80041F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29FA0: AC228080 sw $v0, -32640($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -32640; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-32640)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FA0u); return; } g_debug_last_store_pc = 0x80041FA0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228080u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC29FA4: 2841005B slti $at, $v0, 91 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (91) ? 1 : 0); - PGXP_ALU(0x2841005Bu, cpu->gpr[1], _pgx1, 0x005Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80041FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC29FA8: 1420FF57 bne $at, $zero, 0xBFC29D08 */ - uint32_t psx_brA_BFC29FA8 = cpu->gpr[1]; uint32_t psx_brB_BFC29FA8 = cpu->gpr[0]; - psx_taken_BFC29FA8 = (psx_brA_BFC29FA8 != psx_brB_BFC29FA8); - psx_delay_BFC29FA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041FACu); -#endif - if (psx_delay_BFC29FA8) { - psx_delay_BFC29FA8 = 0; - if (psx_taken_BFC29FA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041D08u); - goto label_BFC29D08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80041FB0u); - } -label_BFC29FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29FB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC29FB0: 0C0100DC jal 0xB0040370 */ - cpu->gpr[31] = 0x80041FB8u; /* jal link before delay slot */ - psx_delay_BFC29FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC29FB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80041FB4u); -#endif - if (psx_delay_BFC29FB0) { - psx_delay_BFC29FB0 = 0; - cpu->gpr[31] = 0x80041FB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80040370u); - cpu->pc = 0x80040370u; return; - } -label_BFC29FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FB8u); -#endif - /* 0xBFC29FB8: 8FBF0064 lw $ra, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0064u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FB8u); -#endif - /* 0xBFC29FBC: 8FB00040 lw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FBCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FC0u); -#endif - /* 0xBFC29FC0: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FC0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FC0u); -#endif - /* 0xBFC29FC4: 8FB20048 lw $s2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FC4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20048u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FC4u); -#endif - /* 0xBFC29FC8: 8FB3004C lw $s3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FC8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3004Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FC8u); -#endif - /* 0xBFC29FCC: 8FB40050 lw $s4, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FCCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40050u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FD0u); -#endif - /* 0xBFC29FD0: 8FB50054 lw $s5, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FD0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50054u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FD0u); -#endif - /* 0xBFC29FD4: 8FB60058 lw $s6, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FD4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60058u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FD4u); -#endif - /* 0xBFC29FD8: 8FB7005C lw $s7, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FD8u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7005Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FD8u); -#endif - /* 0xBFC29FDC: 8FBE0060 lw $fp, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FDCu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0060u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC29FE0: 03E00008 jr $ra */ - psx_delay_BFC29FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29FE4: 27BD00B0 addiu $sp, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27BD00B0u, cpu->gpr[29], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x80041FE4u); -#endif - if (psx_delay_BFC29FE0) { - psx_delay_BFC29FE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC29FE8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC29FE8u); - int psx_delay_BFC2A01C = 0; - int psx_taken_BFC2A01C = 0; - int psx_delay_BFC2A060 = 0; - int psx_taken_BFC2A060 = 0; - int psx_delay_BFC2A150 = 0; - int psx_taken_BFC2A150 = 0; - int psx_delay_BFC2A2C0 = 0; - int psx_taken_BFC2A2C0 = 0; - int psx_delay_BFC2A2C8 = 0; - int psx_taken_BFC2A2C8 = 0; - int psx_delay_BFC2A2D0 = 0; - int psx_taken_BFC2A2D0 = 0; - int psx_delay_BFC2A2DC = 0; - int psx_taken_BFC2A2DC = 0; - int psx_delay_BFC2A314 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2A024u: goto label_BFC2A024; - case 0xBFC2A05Cu: goto label_BFC2A05C; - case 0xBFC2A068u: goto label_BFC2A068; - case 0xBFC2A158u: goto label_BFC2A158; - case 0xBFC2A2C8u: goto label_BFC2A2C8; - case 0xBFC2A2D0u: goto label_BFC2A2D0; - case 0xBFC2A2D8u: goto label_BFC2A2D8; - case 0xBFC2A2E4u: goto label_BFC2A2E4; - case 0xBFC2A30Cu: goto label_BFC2A30C; - default: break; - } - } -label_BFC29FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC29FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC29FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC29FE8: 27BDFF98 addiu $sp, $sp, -104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-104)); - PGXP_ALU(0x27BDFF98u, cpu->gpr[29], _pgx1, 0xFFFFFF98u); } -#ifdef PSX_COSIM - cosim_instr(0x80041FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC29FEC: AFB10004 sw $s1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FECu); return; } g_debug_last_store_pc = 0x80041FECu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10004u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80041FF0u); -#endif - /* 0xBFC29FF0: 8C8E000C lw $t6, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FF0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FF0u); -#endif - /* 0xBFC29FF4: 8C990014 lw $t9, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80041FF4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C990014u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80041FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC29FF8: 000E7882 srl $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 2u; - PGXP_ALU(0x000E7882u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80041FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC29FFC: 2484000C addiu $a0, $a0, 12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (12)); - PGXP_ALU(0x2484000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80041FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2A000: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A004: 00197082 srl $t6, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] >> 2u; - PGXP_ALU(0x00197082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042004u); -#endif - /* 0xBFC2A008: 8C910014 lw $s1, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042008u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } - PGXP_LOAD(0x8C910014u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A00C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004200Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000110u); -#endif - /* 0xBFC2A010: 00984021 addu $t0, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x00984021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8410u); -#endif - /* 0xBFC2A014: 008F5021 addu $t2, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[10] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A018: 2484001C addiu $a0, $a0, 28 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (28)); - PGXP_ALU(0x2484001Cu, cpu->gpr[4], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80042018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2A01C: 1A2000BB blez $s1, 0xBFC2A30C */ - uint32_t psx_brA_BFC2A01C = cpu->gpr[17]; - psx_taken_BFC2A01C = ((int32_t)psx_brA_BFC2A01C <= 0); - psx_delay_BFC2A01C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2A020: 00004821 addu $t1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042020u); -#endif - if (psx_delay_BFC2A01C) { - psx_delay_BFC2A01C = 0; - if (psx_taken_BFC2A01C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004230Cu); - goto label_BFC2A30C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042024u); - } -label_BFC2A024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2A024: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042024u); return; } g_debug_last_store_pc = 0x80042024u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80042024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2A028: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042028u); return; } g_debug_last_store_pc = 0x80042028u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2A02C: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004202Cu); return; } g_debug_last_store_pc = 0x8004202Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004202Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2A030: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042030u); return; } g_debug_last_store_pc = 0x80042030u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80042030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2A034: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042034u); return; } g_debug_last_store_pc = 0x80042034u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80042034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2A038: AFB60018 sw $s6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042038u); return; } g_debug_last_store_pc = 0x80042038u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60018u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80042038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2A03C: AFB70014 sw $s7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004203Cu); return; } g_debug_last_store_pc = 0x8004203Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70014u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2A040: 3C0B8014 lui $t3, 0x8014 */ - cpu->gpr[11] = 0x80140000u; - PGXP_ALU(0x3C0B8014u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC2A044: AFBE0010 sw $fp, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042044u); return; } g_debug_last_store_pc = 0x80042044u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0010u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80042044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2A048: 256B8EE8 addiu $t3, $t3, -28952 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-28952)); - PGXP_ALU(0x256B8EE8u, cpu->gpr[11], _pgx1, 0xFFFF8EE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2A04C: 24100020 addiu $s0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24100020u, cpu->gpr[16], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004204Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2A050: AFBF000C sw $ra, 12($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042050u); return; } g_debug_last_store_pc = 0x80042050u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF000Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2A054: 240C0020 addiu $t4, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240C0020u, cpu->gpr[12], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80042054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2A058: 240D0030 addiu $t5, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x240D0030u, cpu->gpr[13], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80042058u); -#endif -label_BFC2A05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004205Cu); -#endif - /* 0xBFC2A05C: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004205Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004205Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A060: 10000099 beq $zero, $zero, 0xBFC2A2C8 */ - uint32_t psx_brA_BFC2A060 = cpu->gpr[0]; uint32_t psx_brB_BFC2A060 = cpu->gpr[0]; - psx_taken_BFC2A060 = (psx_brA_BFC2A060 == psx_brB_BFC2A060); - psx_delay_BFC2A060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2A064: 00021602 srl $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 24u; - PGXP_ALU(0x00021602u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80042064u); -#endif - if (psx_delay_BFC2A060) { - psx_delay_BFC2A060 = 0; - if (psx_taken_BFC2A060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422C8u); - goto label_BFC2A2C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042068u); - } -label_BFC2A068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042068u); -#endif - /* 0xBFC2A068: 8C920008 lw $s2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042068u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } - PGXP_LOAD(0x8C920008u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC2A06C: 0009C0C0 sll $t8, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC2A070: 00129C02 srl $s3, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[19] = cpu->gpr[18] >> 16u; - PGXP_ALU(0x00129C02u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A074: 00139840 sll $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = cpu->gpr[19] << 1u; - PGXP_ALU(0x00139840u, cpu->gpr[19], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2A078: 0013C880 sll $t9, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 2u; - PGXP_ALU(0x0013C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800100u); -#endif - /* 0xBFC2A07C: 0119B821 addu $s7, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[23] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x0119B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004207Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042080u); -#endif - /* 0xBFC2A080: 8EEE0000 lw $t6, 0($s7) */ - { uint32_t _pgxa = cpu->gpr[23]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042080u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x800000u); } - PGXP_LOAD(0x8EEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC2A084: 0309C021 addu $t8, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x0309C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2A088: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042088u); -#endif - /* 0xBFC2A08C: 8C95000C lw $s5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004208Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } - PGXP_LOAD(0x8C95000Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004208Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000804u); -#endif - /* 0xBFC2A090: 01781021 addu $v0, $t3, $t8 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[24]; - PGXP_ALU(0x01781021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A094: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A098: A44F0000 sh $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042098u); return; } g_debug_last_store_pc = 0x80042098u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042098u); -#endif - /* 0xBFC2A09C: 8EF80000 lw $t8, 0($s7) */ - { uint32_t _pgxa = cpu->gpr[23]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004209Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x800000u); } - PGXP_LOAD(0x8EF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300000u); -#endif - /* 0xBFC2A0A0: 32B4FFFF andi $s4, $s5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[20] = cpu->gpr[21] & 0xFFFFu; - PGXP_ALU(0x32B4FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800420A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A0A4: 0018CC02 srl $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 16u; - PGXP_ALU(0x0018CC02u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800420A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A0A8: A4590002 sh $t9, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420A8u); return; } g_debug_last_store_pc = 0x800420A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800420A8u); -#endif - /* 0xBFC2A0AC: 8EEE0004 lw $t6, 4($s7) */ - { uint32_t _pgxa = cpu->gpr[23] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800420ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x800000u); } - PGXP_LOAD(0x8EEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800420ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2A0B0: 0014A040 sll $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 1u; - PGXP_ALU(0x0014A040u, cpu->gpr[20], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800420B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC2A0B4: 00147880 sll $t7, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[15] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00147880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800420B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008100u); -#endif - /* 0xBFC2A0B8: 010FF021 addu $fp, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[30] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010FF021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800420B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A0BC: A44E0004 sh $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420BCu); return; } g_debug_last_store_pc = 0x800420BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA44E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800420BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420C0u); -#endif - /* 0xBFC2A0C0: 8FD80000 lw $t8, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800420C0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800420C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600000u); -#endif - /* 0xBFC2A0C4: 0015B402 srl $s6, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[22] = cpu->gpr[21] >> 16u; - PGXP_ALU(0x0015B402u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800420C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A0C8: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800420C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A0CC: A4590008 sh $t9, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420CCu); return; } g_debug_last_store_pc = 0x800420CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800420CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420D0u); -#endif - /* 0xBFC2A0D0: 8FCE0000 lw $t6, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800420D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800420D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A0D4: 0016B040 sll $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 1u; - PGXP_ALU(0x0016B040u, cpu->gpr[22], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800420D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A0D8: 000E7C02 srl $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 16u; - PGXP_ALU(0x000E7C02u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800420D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A0DC: A44F000A sh $t7, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420DCu); return; } g_debug_last_store_pc = 0x800420DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800420DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420E0u); -#endif - /* 0xBFC2A0E0: 8FD80004 lw $t8, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800420E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800420E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400000u); -#endif - /* 0xBFC2A0E4: 0016C880 sll $t9, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[25] = cpu->gpr[22] << 2u; - PGXP_ALU(0x0016C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800420E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC2A0E8: 01191821 addu $v1, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01191821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800420E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A0EC: A458000C sh $t8, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420ECu); return; } g_debug_last_store_pc = 0x800420ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA458000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800420ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800420F0u); -#endif - /* 0xBFC2A0F0: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800420F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800420F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020u); -#endif - /* 0xBFC2A0F4: 3245FFFF andi $a1, $s2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu; - PGXP_ALU(0x3245FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800420F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A0F8: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800420F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A0FC: A44F0010 sh $t7, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800420FCu); return; } g_debug_last_store_pc = 0x800420FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800420FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042100u); -#endif - /* 0xBFC2A100: 8C780000 lw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042100u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A104: 00052840 sll $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00052840u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A108: 0018CC02 srl $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 16u; - PGXP_ALU(0x0018CC02u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A10C: A4590012 sh $t9, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004210Cu); return; } g_debug_last_store_pc = 0x8004210Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590012u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004210Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042110u); -#endif - /* 0xBFC2A110: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042110u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2A114: 00057880 sll $t7, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 2u; - PGXP_ALU(0x00057880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48400u); -#endif - /* 0xBFC2A118: 014F9021 addu $s2, $t2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[18] = cpu->gpr[10] + cpu->gpr[15]; - PGXP_ALU(0x014F9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A11C: A44E0014 sh $t6, 20($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004211Cu); return; } g_debug_last_store_pc = 0x8004211Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA44E0014u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042120u); -#endif - /* 0xBFC2A120: 8E580000 lw $t8, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042120u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A124: 24840010 addiu $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (16)); - PGXP_ALU(0x24840010u, cpu->gpr[4], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A128: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A12C: A4590018 sh $t9, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004212Cu); return; } g_debug_last_store_pc = 0x8004212Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590018u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042130u); -#endif - /* 0xBFC2A130: 8E4E0000 lw $t6, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042130u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000u); } - PGXP_LOAD(0x8E4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A138: 000E7C02 srl $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 16u; - PGXP_ALU(0x000E7C02u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A13C: A44F001A sh $t7, 26($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004213Cu); return; } g_debug_last_store_pc = 0x8004213Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F001Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042140u); -#endif - /* 0xBFC2A140: 8E580004 lw $t8, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042140u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A148: A458001C sh $t8, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042148u); return; } g_debug_last_store_pc = 0x80042148u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA458001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042148u); -#endif - /* 0xBFC2A14C: 8C99FFF4 lw $t9, -12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004214Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C99FFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004214Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A150: 10000061 beq $zero, $zero, 0xBFC2A2D8 */ - uint32_t psx_brA_BFC2A150 = cpu->gpr[0]; uint32_t psx_brB_BFC2A150 = cpu->gpr[0]; - psx_taken_BFC2A150 = (psx_brA_BFC2A150 == psx_brB_BFC2A150); - psx_delay_BFC2A150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A154: AC590020 sw $t9, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042154u); return; } g_debug_last_store_pc = 0x80042154u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042154u); -#endif - if (psx_delay_BFC2A150) { - psx_delay_BFC2A150 = 0; - if (psx_taken_BFC2A150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422D8u); - goto label_BFC2A2D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042158u); - } -label_BFC2A158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042158u); -#endif - /* 0xBFC2A158: 8C920008 lw $s2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042158u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } - PGXP_LOAD(0x8C920008u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2A15C: 000970C0 sll $t6, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004215Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC2A160: 00129C02 srl $s3, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[19] = cpu->gpr[18] >> 16u; - PGXP_ALU(0x00129C02u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A164: 00139840 sll $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = cpu->gpr[19] << 1u; - PGXP_ALU(0x00139840u, cpu->gpr[19], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC2A168: 00137880 sll $t7, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[19] << 2u; - PGXP_ALU(0x00137880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808100u); -#endif - /* 0xBFC2A16C: 010FB821 addu $s7, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[23] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010FB821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042170u); -#endif - /* 0xBFC2A170: 8EF80000 lw $t8, 0($s7) */ - { uint32_t _pgxa = cpu->gpr[23]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042170u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x800000u); } - PGXP_LOAD(0x8EF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2A174: 01C97021 addu $t6, $t6, $t1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[9]; - PGXP_ALU(0x01C97021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2A178: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042178u); -#endif - /* 0xBFC2A17C: 8C95000C lw $s5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004217Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } - PGXP_LOAD(0x8C95000Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004217Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042180u); -#endif - /* 0xBFC2A180: 8C9F0010 lw $ra, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042180u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x10u); } - PGXP_LOAD(0x8C9F0010u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4804u); -#endif - /* 0xBFC2A184: 016E1021 addu $v0, $t3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[14]; - PGXP_ALU(0x016E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A188: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A18C: A4590000 sh $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004218Cu); return; } g_debug_last_store_pc = 0x8004218Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042190u); -#endif - /* 0xBFC2A190: 8EEE0000 lw $t6, 0($s7) */ - { uint32_t _pgxa = cpu->gpr[23]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042190u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x800000u); } - PGXP_LOAD(0x8EEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300000u); -#endif - /* 0xBFC2A194: 0015A402 srl $s4, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[20] = cpu->gpr[21] >> 16u; - PGXP_ALU(0x0015A402u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A198: 000E7C02 srl $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 16u; - PGXP_ALU(0x000E7C02u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A19C: A44F0002 sh $t7, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004219Cu); return; } g_debug_last_store_pc = 0x8004219Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421A0u); -#endif - /* 0xBFC2A1A0: 8EF80004 lw $t8, 4($s7) */ - { uint32_t _pgxa = cpu->gpr[23] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421A0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x800000u); } - PGXP_LOAD(0x8EF80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800421A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2A1A4: 0014A040 sll $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 1u; - PGXP_ALU(0x0014A040u, cpu->gpr[20], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800421A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC2A1A8: 0014C880 sll $t9, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[20] << 2u; - PGXP_ALU(0x0014C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800421A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000100u); -#endif - /* 0xBFC2A1AC: 0119F021 addu $fp, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[30] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x0119F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800421ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A1B0: A4580004 sh $t8, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800421B0u); return; } g_debug_last_store_pc = 0x800421B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800421B0u); -#endif - /* 0xBFC2A1B4: 8FCE0000 lw $t6, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800421B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400000u); -#endif - /* 0xBFC2A1B8: 001FB402 srl $s6, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[22] = cpu->gpr[31] >> 16u; - PGXP_ALU(0x001FB402u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800421B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A1BC: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800421BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A1C0: A44F0008 sh $t7, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800421C0u); return; } g_debug_last_store_pc = 0x800421C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800421C0u); -#endif - /* 0xBFC2A1C4: 8FD80000 lw $t8, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421C4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800421C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A1C8: 0016B040 sll $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 1u; - PGXP_ALU(0x0016B040u, cpu->gpr[22], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800421C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A1CC: 0018CC02 srl $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 16u; - PGXP_ALU(0x0018CC02u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800421CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A1D0: A459000A sh $t9, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800421D0u); return; } g_debug_last_store_pc = 0x800421D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA459000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800421D0u); -#endif - /* 0xBFC2A1D4: 8FCE0004 lw $t6, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421D4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800421D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408000u); -#endif - /* 0xBFC2A1D8: 00167880 sll $t7, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[15] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00167880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800421D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8108u); -#endif - /* 0xBFC2A1DC: 010F1821 addu $v1, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800421DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A1E0: A44E000C sh $t6, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800421E0u); return; } g_debug_last_store_pc = 0x800421E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA44E000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800421E0u); -#endif - /* 0xBFC2A1E4: 8C780000 lw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421E4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800421E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200040u); -#endif - /* 0xBFC2A1E8: 32A6FFFF andi $a2, $s5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[6] = cpu->gpr[21] & 0xFFFFu; - PGXP_ALU(0x32A6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800421E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A1EC: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800421ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800421F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A1F0: A4590010 sh $t9, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800421F0u); return; } g_debug_last_store_pc = 0x800421F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800421F0u); -#endif - /* 0xBFC2A1F4: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800421F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800421F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2A1F8: 00063040 sll $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 1u; - PGXP_ALU(0x00063040u, cpu->gpr[6], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800421F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A1FC: 000E7C02 srl $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 16u; - PGXP_ALU(0x000E7C02u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800421FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A200: A44F0012 sh $t7, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042200u); return; } g_debug_last_store_pc = 0x80042200u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0012u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042200u); -#endif - /* 0xBFC2A204: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042204u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020u); -#endif - /* 0xBFC2A208: 3245FFFF andi $a1, $s2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[18] & 0xFFFFu; - PGXP_ALU(0x3245FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A20C: 00052840 sll $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00052840u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004220Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC2A210: 00067080 sll $t6, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00067080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000080u); -#endif - /* 0xBFC2A214: 33E7FFFF andi $a3, $ra, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[7] = cpu->gpr[31] & 0xFFFFu; - PGXP_ALU(0x33E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2A218: 00073840 sll $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 1u; - PGXP_ALU(0x00073840u, cpu->gpr[7], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84400u); -#endif - /* 0xBFC2A21C: 014E9821 addu $s3, $t2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[19] = cpu->gpr[10] + cpu->gpr[14]; - PGXP_ALU(0x014E9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2A220: 0005C880 sll $t9, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 2u; - PGXP_ALU(0x0005C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A224: A4580014 sh $t8, 20($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042224u); return; } g_debug_last_store_pc = 0x80042224u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4580014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042224u); -#endif - /* 0xBFC2A228: 8E6E0000 lw $t6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042228u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80000u); } - PGXP_LOAD(0x8E6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040400u); -#endif - /* 0xBFC2A22C: 01599021 addu $s2, $t2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[18] = cpu->gpr[10] + cpu->gpr[25]; - PGXP_ALU(0x01599021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004222Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC2A230: 00077880 sll $t7, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042230u); -#endif - /* 0xBFC2A234: 8E580000 lw $t8, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042234u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108400u); -#endif - /* 0xBFC2A238: 014FA021 addu $s4, $t2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[20] = cpu->gpr[10] + cpu->gpr[15]; - PGXP_ALU(0x014FA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A23C: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004223Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042240u); -#endif - /* 0xBFC2A240: 8E8E0000 lw $t6, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042240u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x100000u); } - PGXP_LOAD(0x8E8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A244: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A248: 032FC021 addu $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] + cpu->gpr[15]; - PGXP_ALU(0x032FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A24C: 31D9FFFF andi $t9, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31D9FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004224Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A250: 03197821 addu $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A254: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80042254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2A258: 01E1001B divu $t7, $at */ - { uint32_t psx_n = cpu->gpr[15]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Bu, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80042258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A25C: 24840014 addiu $a0, $a0, 20 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20)); - PGXP_ALU(0x24840014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2A260: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A264: A44E0018 sh $t6, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042264u); return; } g_debug_last_store_pc = 0x80042264u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA44E0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042264u); -#endif - /* 0xBFC2A268: 8E6F0000 lw $t7, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042268u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80000u); } - PGXP_LOAD(0x8E6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042268u); -#endif - /* 0xBFC2A26C: 8E580000 lw $t8, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004226Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004226Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A270: 000F7402 srl $t6, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] >> 16u; - PGXP_ALU(0x000F7402u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042270u); -#endif - /* 0xBFC2A274: 8E8F0000 lw $t7, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042274u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x100000u); } - PGXP_LOAD(0x8E8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A278: 0018CC02 srl $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 16u; - PGXP_ALU(0x0018CC02u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A27C: 032EC021 addu $t8, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032EC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A280: 000FCC02 srl $t9, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] >> 16u; - PGXP_ALU(0x000FCC02u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A284: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2A288: 01C1001B divu $t6, $at */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80042288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2A28C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004228Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A290: A44F001A sh $t7, 26($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042290u); return; } g_debug_last_store_pc = 0x80042290u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F001Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042290u); -#endif - /* 0xBFC2A294: 8E790004 lw $t9, 4($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042294u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80000u); } - PGXP_LOAD(0x8E790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042294u); -#endif - /* 0xBFC2A298: 8E580004 lw $t8, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042298u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000u); } - PGXP_LOAD(0x8E580004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042298u); -#endif - /* 0xBFC2A29C: 8E8F0004 lw $t7, 4($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004229Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x100000u); } - PGXP_LOAD(0x8E8F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004229Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A2A0: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800422A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A2A4: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800422A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2A2A8: 0301001B divu $t8, $at */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0301001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800422A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2A2AC: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800422ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A2B0: A459001C sh $t9, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800422B0u); return; } g_debug_last_store_pc = 0x800422B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA459001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800422B0u); -#endif - /* 0xBFC2A2B4: 8C8EFFF0 lw $t6, -16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8EFFF0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800422B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A2B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800422B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A2BC: AC4E0020 sw $t6, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422BCu); return; } g_debug_last_store_pc = 0x800422BCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800422BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A2C0: 10000005 beq $zero, $zero, 0xBFC2A2D8 */ - uint32_t psx_brA_BFC2A2C0 = cpu->gpr[0]; uint32_t psx_brB_BFC2A2C0 = cpu->gpr[0]; - psx_taken_BFC2A2C0 = (psx_brA_BFC2A2C0 == psx_brB_BFC2A2C0); - psx_delay_BFC2A2C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2A2C4: A0500023 sb $s0, 35($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 35; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800422C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (35)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA0500023u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800422C4u); -#endif - if (psx_delay_BFC2A2C0) { - psx_delay_BFC2A2C0 = 0; - if (psx_taken_BFC2A2C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422D8u); - goto label_BFC2A2D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422C8u); - } -label_BFC2A2C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A2C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2A2C8: 104CFF67 beq $v0, $t4, 0xBFC2A068 */ - uint32_t psx_brA_BFC2A2C8 = cpu->gpr[2]; uint32_t psx_brB_BFC2A2C8 = cpu->gpr[12]; - psx_taken_BFC2A2C8 = (psx_brA_BFC2A2C8 == psx_brB_BFC2A2C8); - psx_delay_BFC2A2C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A2CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800422CCu); -#endif - if (psx_delay_BFC2A2C8) { - psx_delay_BFC2A2C8 = 0; - if (psx_taken_BFC2A2C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042068u); - goto label_BFC2A068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422D0u); - } -label_BFC2A2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC2A2D0: 104DFFA1 beq $v0, $t5, 0xBFC2A158 */ - uint32_t psx_brA_BFC2A2D0 = cpu->gpr[2]; uint32_t psx_brB_BFC2A2D0 = cpu->gpr[13]; - psx_taken_BFC2A2D0 = (psx_brA_BFC2A2D0 == psx_brB_BFC2A2D0); - psx_delay_BFC2A2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800422D4u); -#endif - if (psx_delay_BFC2A2D0) { - psx_delay_BFC2A2D0 = 0; - if (psx_taken_BFC2A2D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042158u); - goto label_BFC2A158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422D8u); - } -label_BFC2A2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2A2D8: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800422D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2A2DC: 1531FF5F bne $t1, $s1, 0xBFC2A05C */ - uint32_t psx_brA_BFC2A2DC = cpu->gpr[9]; uint32_t psx_brB_BFC2A2DC = cpu->gpr[17]; - psx_taken_BFC2A2DC = (psx_brA_BFC2A2DC != psx_brB_BFC2A2DC); - psx_delay_BFC2A2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A2E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800422E0u); -#endif - if (psx_delay_BFC2A2DC) { - psx_delay_BFC2A2DC = 0; - if (psx_taken_BFC2A2DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004205Cu); - goto label_BFC2A05C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800422E4u); - } -label_BFC2A2E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A2E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422E4u); -#endif - /* 0xBFC2A2E4: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422E4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800422E4u); -#endif - /* 0xBFC2A2E8: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422E8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800422E8u); -#endif - /* 0xBFC2A2EC: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422ECu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800422ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800422F0u); -#endif - /* 0xBFC2A2F0: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422F0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800422F0u); -#endif - /* 0xBFC2A2F4: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422F4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800422F4u); -#endif - /* 0xBFC2A2F8: 8FB60018 lw $s6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422F8u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60018u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800422F8u); -#endif - /* 0xBFC2A2FC: 8FB70014 lw $s7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800422FCu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70014u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x800422FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042300u); -#endif - /* 0xBFC2A300: 8FBE0010 lw $fp, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042300u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0010u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80042300u); -#endif - /* 0xBFC2A304: 8FBF000C lw $ra, 12($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042304u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF000Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A308: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042308u); -#endif -label_BFC2A30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2A30C: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042310u); -#endif - /* 0xBFC2A310: 8FB10004 lw $s1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042310u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10004u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2A314: 03E00008 jr $ra */ - psx_delay_BFC2A314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2A318: 27BD0068 addiu $sp, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27BD0068u, cpu->gpr[29], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x80042318u); -#endif - if (psx_delay_BFC2A314) { - psx_delay_BFC2A314 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2A31C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2A31Cu); - int psx_delay_BFC2A33C = 0; - int psx_delay_BFC2A3B8 = 0; - int psx_taken_BFC2A3B8 = 0; - int psx_delay_BFC2A3C0 = 0; - int psx_taken_BFC2A3C0 = 0; - int psx_delay_BFC2A3F8 = 0; - int psx_delay_BFC2A404 = 0; - int psx_taken_BFC2A404 = 0; - int psx_delay_BFC2A424 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2A344u: goto label_BFC2A344; - case 0xBFC2A3B8u: goto label_BFC2A3B8; - case 0xBFC2A3C0u: goto label_BFC2A3C0; - case 0xBFC2A3C8u: goto label_BFC2A3C8; - case 0xBFC2A3CCu: goto label_BFC2A3CC; - case 0xBFC2A400u: goto label_BFC2A400; - case 0xBFC2A40Cu: goto label_BFC2A40C; - default: break; - } - } -label_BFC2A31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2A31C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2A320: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042320u); return; } g_debug_last_store_pc = 0x80042320u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2A324: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042324u); return; } g_debug_last_store_pc = 0x80042324u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2A328: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042328u); return; } g_debug_last_store_pc = 0x80042328u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80042328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2A32C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004232Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2A330: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042330u); return; } g_debug_last_store_pc = 0x80042330u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2A334: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042334u); return; } g_debug_last_store_pc = 0x80042334u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80042334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2A338: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042338u); return; } g_debug_last_store_pc = 0x80042338u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80042338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A33C: 0C01467B jal 0xB00519EC */ - cpu->gpr[31] = 0x80042344u; /* jal link before delay slot */ - psx_delay_BFC2A33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC2A340: 26241070 addiu $a0, $s1, 4208 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (4208)); - PGXP_ALU(0x26241070u, cpu->gpr[4], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x80042340u); -#endif - if (psx_delay_BFC2A33C) { - psx_delay_BFC2A33C = 0; - cpu->gpr[31] = 0x80042344u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800519ECu); - cpu->pc = 0x800519ECu; return; - } -label_BFC2A344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2A344: A2201074 sb $zero, 4212($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4212; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80042344u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (4212)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2201074u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80042344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2A348: A2201075 sb $zero, 4213($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4213; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80042348u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (4213)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2201075u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80042348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2A34C: A2201076 sb $zero, 4214($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4214; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004234Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (4214)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2201076u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004234Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042350u); -#endif - /* 0xBFC2A350: 86230000 lh $v1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042350u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x86230000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042350u); -#endif - /* 0xBFC2A354: 86240002 lh $a0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042354u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80042354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC2A358: A6231078 sh $v1, 4216($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4216)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042358u); return; } g_debug_last_store_pc = 0x80042358u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA6231078u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC2A35C: A624107E sh $a0, 4222($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4222; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4222)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004235Cu); return; } g_debug_last_store_pc = 0x8004235Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA624107Eu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004235Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2A360: 24650280 addiu $a1, $v1, 640 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (640)); - PGXP_ALU(0x24650280u, cpu->gpr[5], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80042360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC2A364: A6251084 sh $a1, 4228($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4228; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4228)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042364u); return; } g_debug_last_store_pc = 0x80042364u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA6251084u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80042364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC2A368: 248601E0 addiu $a2, $a0, 480 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] + (480)); - PGXP_ALU(0x248601E0u, cpu->gpr[6], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040u); -#endif - /* 0xBFC2A36C: A6261086 sh $a2, 4230($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4230; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4230)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004236Cu); return; } g_debug_last_store_pc = 0x8004236Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA6261086u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004236Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC2A370: 00064C00 sll $t1, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00064C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC2A374: 00053C00 sll $a3, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00053C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2A378: 00034400 sll $t0, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00034400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2A37C: 00041400 sll $v0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00041400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004237Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2A380: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC2A384: A622107A sh $v0, 4218($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4218; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4218)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042384u); return; } g_debug_last_store_pc = 0x80042384u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA622107Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2A388: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2A38C: A6281080 sh $t0, 4224($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4224; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4224)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004238Cu); return; } g_debug_last_store_pc = 0x8004238Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA6281080u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004238Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2A390: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2A394: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2A398: 3C12800F lui $s2, 0x800F */ - cpu->gpr[18] = 0x800F0000u; - PGXP_ALU(0x3C12800Fu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A39C: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004239Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2A3A0: A6291082 sh $t1, 4226($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4226; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4226)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800423A0u); return; } g_debug_last_store_pc = 0x800423A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6291082u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800423A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080u); -#endif - /* 0xBFC2A3A4: A627107C sh $a3, 4220($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4220)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800423A4u); return; } g_debug_last_store_pc = 0x800423A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA627107Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800423A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A3A8: 26733F90 addiu $s3, $s3, 16272 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (16272)); - PGXP_ALU(0x26733F90u, cpu->gpr[19], _pgx1, 0x00003F90u); } -#ifdef PSX_COSIM - cosim_instr(0x800423A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2A3AC: 2652A868 addiu $s2, $s2, -22424 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-22424)); - PGXP_ALU(0x2652A868u, cpu->gpr[18], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x800423ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2A3B0: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2A3B4: 24140258 addiu $s4, $zero, 600 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (600)); - PGXP_ALU(0x24140258u, cpu->gpr[20], _pgx1, 0x00000258u); } -#ifdef PSX_COSIM - cosim_instr(0x800423B4u); -#endif -label_BFC2A3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC2A3B8: 16320004 bne $s1, $s2, 0xBFC2A3CC */ - uint32_t psx_brA_BFC2A3B8 = cpu->gpr[17]; uint32_t psx_brB_BFC2A3B8 = cpu->gpr[18]; - psx_taken_BFC2A3B8 = (psx_brA_BFC2A3B8 != psx_brB_BFC2A3B8); - psx_delay_BFC2A3B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A3BC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800423BCu); -#endif - if (psx_delay_BFC2A3B8) { - psx_delay_BFC2A3B8 = 0; - if (psx_taken_BFC2A3B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800423CCu); - goto label_BFC2A3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800423C0u); - } -label_BFC2A3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A3C0: 10000002 beq $zero, $zero, 0xBFC2A3CC */ - uint32_t psx_brA_BFC2A3C0 = cpu->gpr[0]; uint32_t psx_brB_BFC2A3C0 = cpu->gpr[0]; - psx_taken_BFC2A3C0 = (psx_brA_BFC2A3C0 == psx_brB_BFC2A3C0); - psx_delay_BFC2A3C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A3C4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423C4u); -#endif - if (psx_delay_BFC2A3C0) { - psx_delay_BFC2A3C0 = 0; - if (psx_taken_BFC2A3C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800423CCu); - goto label_BFC2A3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800423C8u); - } -label_BFC2A3C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A3C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A3C8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800423C8u); -#endif -label_BFC2A3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A3CC: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800423CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A3D0: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2A3D4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800423D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A3D8: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2A3DC: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800423DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A3E0: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2A3E4: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800423E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2A3E8: 0310C021 addu $t8, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[16]; - PGXP_ALU(0x0310C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2A3EC: 000E7140 sll $t6, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 5u; - PGXP_ALU(0x000E7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800423ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800423F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8C000u); -#endif - /* 0xBFC2A3F0: 026E7821 addu $t7, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2A3F4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800423F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A3F8: 0C014653 jal 0xB005194C */ - cpu->gpr[31] = 0x80042400u; /* jal link before delay slot */ - psx_delay_BFC2A3F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC2A3FC: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800423FCu); -#endif - if (psx_delay_BFC2A3F8) { - psx_delay_BFC2A3F8 = 0; - cpu->gpr[31] = 0x80042400u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005194Cu); - cpu->pc = 0x8005194Cu; return; - } -label_BFC2A400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A400: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC2A404: 1614FFEC bne $s0, $s4, 0xBFC2A3B8 */ - uint32_t psx_brA_BFC2A404 = cpu->gpr[16]; uint32_t psx_brB_BFC2A404 = cpu->gpr[20]; - psx_taken_BFC2A404 = (psx_brA_BFC2A404 != psx_brB_BFC2A404); - psx_delay_BFC2A404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A408: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042408u); -#endif - if (psx_delay_BFC2A404) { - psx_delay_BFC2A404 = 0; - if (psx_taken_BFC2A404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800423B8u); - goto label_BFC2A3B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004240Cu); - } -label_BFC2A40C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A40Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004240Cu); -#endif - /* 0xBFC2A40C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004240Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004240Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042410u); -#endif - /* 0xBFC2A410: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042410u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80042410u); -#endif - /* 0xBFC2A414: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042414u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042414u); -#endif - /* 0xBFC2A418: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042418u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042418u); -#endif - /* 0xBFC2A41C: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004241Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004241Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042420u); -#endif - /* 0xBFC2A420: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042420u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80042420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2A424: 03E00008 jr $ra */ - psx_delay_BFC2A424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2A428: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80042428u); -#endif - if (psx_delay_BFC2A424) { - psx_delay_BFC2A424 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2A4E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2A4E0u); - int psx_delay_BFC2A548 = 0; - int psx_delay_BFC2A554 = 0; - int psx_delay_BFC2A564 = 0; - int psx_taken_BFC2A564 = 0; - int psx_delay_BFC2A578 = 0; - int psx_taken_BFC2A578 = 0; - int psx_delay_BFC2A580 = 0; - int psx_taken_BFC2A580 = 0; - int psx_delay_BFC2A598 = 0; - int psx_taken_BFC2A598 = 0; - int psx_delay_BFC2A5A4 = 0; - int psx_taken_BFC2A5A4 = 0; - int psx_delay_BFC2A5AC = 0; - int psx_taken_BFC2A5AC = 0; - int psx_delay_BFC2A5C4 = 0; - int psx_taken_BFC2A5C4 = 0; - int psx_delay_BFC2A5CC = 0; - int psx_delay_BFC2A5D8 = 0; - int psx_taken_BFC2A5D8 = 0; - int psx_delay_BFC2A5E0 = 0; - int psx_taken_BFC2A5E0 = 0; - int psx_delay_BFC2A5F0 = 0; - int psx_taken_BFC2A5F0 = 0; - int psx_delay_BFC2A5F8 = 0; - int psx_taken_BFC2A5F8 = 0; - int psx_delay_BFC2A614 = 0; - int psx_taken_BFC2A614 = 0; - int psx_delay_BFC2A624 = 0; - int psx_taken_BFC2A624 = 0; - int psx_delay_BFC2A630 = 0; - int psx_taken_BFC2A630 = 0; - int psx_delay_BFC2A64C = 0; - int psx_taken_BFC2A64C = 0; - int psx_delay_BFC2A658 = 0; - int psx_delay_BFC2A660 = 0; - int psx_taken_BFC2A660 = 0; - int psx_delay_BFC2A668 = 0; - int psx_delay_BFC2A684 = 0; - int psx_delay_BFC2A698 = 0; - int psx_taken_BFC2A698 = 0; - int psx_delay_BFC2A6A0 = 0; - int psx_taken_BFC2A6A0 = 0; - int psx_delay_BFC2A6D0 = 0; - int psx_taken_BFC2A6D0 = 0; - int psx_delay_BFC2A6F8 = 0; - int psx_taken_BFC2A6F8 = 0; - int psx_delay_BFC2A87C = 0; - int psx_taken_BFC2A87C = 0; - int psx_delay_BFC2A99C = 0; - int psx_taken_BFC2A99C = 0; - int psx_delay_BFC2A9AC = 0; - int psx_taken_BFC2A9AC = 0; - int psx_delay_BFC2A9B4 = 0; - int psx_taken_BFC2A9B4 = 0; - int psx_delay_BFC2A9C4 = 0; - int psx_taken_BFC2A9C4 = 0; - int psx_delay_BFC2A9CC = 0; - int psx_taken_BFC2A9CC = 0; - int psx_delay_BFC2A9DC = 0; - int psx_taken_BFC2A9DC = 0; - int psx_delay_BFC2A9EC = 0; - int psx_taken_BFC2A9EC = 0; - int psx_delay_BFC2A9F8 = 0; - int psx_taken_BFC2A9F8 = 0; - int psx_delay_BFC2AA18 = 0; - int psx_delay_BFC2AAB8 = 0; - int psx_taken_BFC2AAB8 = 0; - int psx_delay_BFC2AAC0 = 0; - int psx_taken_BFC2AAC0 = 0; - int psx_delay_BFC2AAC8 = 0; - int psx_taken_BFC2AAC8 = 0; - int psx_delay_BFC2AAD0 = 0; - int psx_taken_BFC2AAD0 = 0; - int psx_delay_BFC2AAF8 = 0; - int psx_taken_BFC2AAF8 = 0; - int psx_delay_BFC2AB08 = 0; - int psx_taken_BFC2AB08 = 0; - int psx_delay_BFC2AB18 = 0; - int psx_taken_BFC2AB18 = 0; - int psx_delay_BFC2AB20 = 0; - int psx_taken_BFC2AB20 = 0; - int psx_delay_BFC2AB30 = 0; - int psx_taken_BFC2AB30 = 0; - int psx_delay_BFC2AB80 = 0; - int psx_taken_BFC2AB80 = 0; - int psx_delay_BFC2AB88 = 0; - int psx_taken_BFC2AB88 = 0; - int psx_delay_BFC2AB94 = 0; - int psx_taken_BFC2AB94 = 0; - int psx_delay_BFC2ABCC = 0; - int psx_taken_BFC2ABCC = 0; - int psx_delay_BFC2ABEC = 0; - int psx_taken_BFC2ABEC = 0; - int psx_delay_BFC2AC28 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2A550u: goto label_BFC2A550; - case 0xBFC2A55Cu: goto label_BFC2A55C; - case 0xBFC2A56Cu: goto label_BFC2A56C; - case 0xBFC2A578u: goto label_BFC2A578; - case 0xBFC2A580u: goto label_BFC2A580; - case 0xBFC2A588u: goto label_BFC2A588; - case 0xBFC2A58Cu: goto label_BFC2A58C; - case 0xBFC2A5A0u: goto label_BFC2A5A0; - case 0xBFC2A5A4u: goto label_BFC2A5A4; - case 0xBFC2A5ACu: goto label_BFC2A5AC; - case 0xBFC2A5B4u: goto label_BFC2A5B4; - case 0xBFC2A5CCu: goto label_BFC2A5CC; - case 0xBFC2A5D4u: goto label_BFC2A5D4; - case 0xBFC2A5E0u: goto label_BFC2A5E0; - case 0xBFC2A5E8u: goto label_BFC2A5E8; - case 0xBFC2A5ECu: goto label_BFC2A5EC; - case 0xBFC2A5F8u: goto label_BFC2A5F8; - case 0xBFC2A600u: goto label_BFC2A600; - case 0xBFC2A61Cu: goto label_BFC2A61C; - case 0xBFC2A62Cu: goto label_BFC2A62C; - case 0xBFC2A638u: goto label_BFC2A638; - case 0xBFC2A654u: goto label_BFC2A654; - case 0xBFC2A660u: goto label_BFC2A660; - case 0xBFC2A668u: goto label_BFC2A668; - case 0xBFC2A670u: goto label_BFC2A670; - case 0xBFC2A68Cu: goto label_BFC2A68C; - case 0xBFC2A690u: goto label_BFC2A690; - case 0xBFC2A6A0u: goto label_BFC2A6A0; - case 0xBFC2A6A8u: goto label_BFC2A6A8; - case 0xBFC2A6ACu: goto label_BFC2A6AC; - case 0xBFC2A6C0u: goto label_BFC2A6C0; - case 0xBFC2A6C4u: goto label_BFC2A6C4; - case 0xBFC2A6CCu: goto label_BFC2A6CC; - case 0xBFC2A6D8u: goto label_BFC2A6D8; - case 0xBFC2A700u: goto label_BFC2A700; - case 0xBFC2A884u: goto label_BFC2A884; - case 0xBFC2A994u: goto label_BFC2A994; - case 0xBFC2A9A4u: goto label_BFC2A9A4; - case 0xBFC2A9B4u: goto label_BFC2A9B4; - case 0xBFC2A9BCu: goto label_BFC2A9BC; - case 0xBFC2A9CCu: goto label_BFC2A9CC; - case 0xBFC2A9D4u: goto label_BFC2A9D4; - case 0xBFC2A9E4u: goto label_BFC2A9E4; - case 0xBFC2A9E8u: goto label_BFC2A9E8; - case 0xBFC2A9F4u: goto label_BFC2A9F4; - case 0xBFC2A9F8u: goto label_BFC2A9F8; - case 0xBFC2AA00u: goto label_BFC2AA00; - case 0xBFC2AA04u: goto label_BFC2AA04; - case 0xBFC2AA14u: goto label_BFC2AA14; - case 0xBFC2AA20u: goto label_BFC2AA20; - case 0xBFC2AAC0u: goto label_BFC2AAC0; - case 0xBFC2AAC8u: goto label_BFC2AAC8; - case 0xBFC2AAD0u: goto label_BFC2AAD0; - case 0xBFC2AAD8u: goto label_BFC2AAD8; - case 0xBFC2AADCu: goto label_BFC2AADC; - case 0xBFC2AAE4u: goto label_BFC2AAE4; - case 0xBFC2AB00u: goto label_BFC2AB00; - case 0xBFC2AB10u: goto label_BFC2AB10; - case 0xBFC2AB18u: goto label_BFC2AB18; - case 0xBFC2AB20u: goto label_BFC2AB20; - case 0xBFC2AB28u: goto label_BFC2AB28; - case 0xBFC2AB2Cu: goto label_BFC2AB2C; - case 0xBFC2AB38u: goto label_BFC2AB38; - case 0xBFC2AB44u: goto label_BFC2AB44; - case 0xBFC2AB88u: goto label_BFC2AB88; - case 0xBFC2AB90u: goto label_BFC2AB90; - case 0xBFC2AB9Cu: goto label_BFC2AB9C; - case 0xBFC2ABA8u: goto label_BFC2ABA8; - case 0xBFC2ABD4u: goto label_BFC2ABD4; - case 0xBFC2ABD8u: goto label_BFC2ABD8; - case 0xBFC2ABF4u: goto label_BFC2ABF4; - case 0xBFC2ABF8u: goto label_BFC2ABF8; - default: break; - } - } -label_BFC2A4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800424E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A4E0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800424E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A4E4: 342120B8 ori $at, $at, 0x20B8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20B8u; - PGXP_ALU(0x342120B8u, cpu->gpr[1], _pgx1, 0x20B8u); } -#ifdef PSX_COSIM - cosim_instr(0x800424E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2A4E8: 03A1E823 subu $sp, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[29] = cpu->gpr[29] - cpu->gpr[1]; - PGXP_ALU(0x03A1E823u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800424E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC2A4EC: AFBE0050 sw $fp, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800424ECu); return; } g_debug_last_store_pc = 0x800424ECu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0050u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x800424ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800424F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2A4F0: AFBF0054 sw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800424F0u); return; } g_debug_last_store_pc = 0x800424F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800424F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2A4F4: AFB60048 sw $s6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800424F4u); return; } g_debug_last_store_pc = 0x800424F4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60048u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800424F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2A4F8: AFB7004C sw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800424F8u); return; } g_debug_last_store_pc = 0x800424F8u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x800424F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2A4FC: AFB40040 sw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800424FCu); return; } g_debug_last_store_pc = 0x800424FCu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800424FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A500: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2A504: 003D0821 addu $at, $at, $sp */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[29]; - PGXP_ALU(0x003D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2A508: AFB50044 sw $s5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042508u); return; } g_debug_last_store_pc = 0x80042508u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50044u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80042508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2A50C: AFB20038 sw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004250Cu); return; } g_debug_last_store_pc = 0x8004250Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004250Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2A510: AFB3003C sw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042510u); return; } g_debug_last_store_pc = 0x80042510u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80042510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2A514: AFB00030 sw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042514u); return; } g_debug_last_store_pc = 0x80042514u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80042514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2A518: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042518u); return; } g_debug_last_store_pc = 0x80042518u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2A51C: AC2620C0 sw $a2, 8384($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 8384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (8384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004251Cu); return; } g_debug_last_store_pc = 0x8004251Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC2620C0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004251Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A520: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2A524: 003D0821 addu $at, $at, $sp */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[29]; - PGXP_ALU(0x003D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2A528: AC2720C4 sw $a3, 8388($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 8388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (8388)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042528u); return; } g_debug_last_store_pc = 0x80042528u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC2720C4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80042528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A52C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC2A530: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000021u); -#endif - /* 0xBFC2A534: 00A0F021 addu $fp, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A538: 342100AC ori $at, $at, 0xAC */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xACu; - PGXP_ALU(0x342100ACu, cpu->gpr[1], _pgx1, 0x00ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80042538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC2A53C: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004253Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2A540: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000012u); -#endif - /* 0xBFC2A544: 03A12021 addu $a0, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A12021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A548: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x80042550u; /* jal link before delay slot */ - psx_delay_BFC2A548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2A54C: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004254Cu); -#endif - if (psx_delay_BFC2A548) { - psx_delay_BFC2A548 = 0; - cpu->gpr[31] = 0x80042550u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2A550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2A550: 27A400AC addiu $a0, $sp, 172 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (172)); - PGXP_ALU(0x27A400ACu, cpu->gpr[4], _pgx1, 0x000000ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80042550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A554: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x8004255Cu; /* jal link before delay slot */ - psx_delay_BFC2A554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A558: 3C050001 lui $a1, 0x1 */ - cpu->gpr[5] = 0x00010000u; - PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042558u); -#endif - if (psx_delay_BFC2A554) { - psx_delay_BFC2A554 = 0; - cpu->gpr[31] = 0x8004255Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2A55C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A55Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004255Cu); -#endif - /* 0xBFC2A55C: 92640000 lbu $a0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 4, 0x80000u); - PGXP_LOAD(0x92640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004255Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2A564: 10800051 beq $a0, $zero, 0xBFC2A6AC */ - uint32_t psx_brA_BFC2A564 = cpu->gpr[4]; uint32_t psx_brB_BFC2A564 = cpu->gpr[0]; - psx_taken_BFC2A564 = (psx_brA_BFC2A564 == psx_brB_BFC2A564); - psx_delay_BFC2A564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2A568: 3C140001 lui $s4, 0x1 */ - cpu->gpr[20] = 0x00010000u; - PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042568u); -#endif - if (psx_delay_BFC2A564) { - psx_delay_BFC2A564 = 0; - if (psx_taken_BFC2A564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426ACu); - goto label_BFC2A6AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004256Cu); - } -label_BFC2A56C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A56Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004256Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2A56C: 2414000A addiu $s4, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2414000Au, cpu->gpr[20], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8004256Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2A570: 34158140 ori $s5, $zero, 0x8140 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] | 0x8140u; - PGXP_ALU(0x34158140u, cpu->gpr[21], _pgx1, 0x8140u); } -#ifdef PSX_COSIM - cosim_instr(0x80042570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC2A574: 341784BF ori $s7, $zero, 0x84BF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] | 0x84BFu; - PGXP_ALU(0x341784BFu, cpu->gpr[23], _pgx1, 0x84BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042574u); -#endif -label_BFC2A578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100010u); -#endif - /* 0xBFC2A578: 1684000A bne $s4, $a0, 0xBFC2A5A4 */ - uint32_t psx_brA_BFC2A578 = cpu->gpr[20]; uint32_t psx_brB_BFC2A578 = cpu->gpr[4]; - psx_taken_BFC2A578 = (psx_brA_BFC2A578 != psx_brB_BFC2A578); - psx_delay_BFC2A578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2A57C: 2C810081 sltiu $at, $a0, 129 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x8004257Cu); -#endif - if (psx_delay_BFC2A578) { - psx_delay_BFC2A578 = 0; - if (psx_taken_BFC2A578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425A4u); - goto label_BFC2A5A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042580u); - } -label_BFC2A580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A580: 06C10002 bgez $s6, 0xBFC2A58C */ - uint32_t psx_brA_BFC2A580 = cpu->gpr[22]; - psx_taken_BFC2A580 = ((int32_t)psx_brA_BFC2A580 >= 0); - psx_delay_BFC2A580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400003u); -#endif - /* 0xBFC2A584: 02C00821 addu $at, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042584u); -#endif - if (psx_delay_BFC2A580) { - psx_delay_BFC2A580 = 0; - if (psx_taken_BFC2A580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004258Cu); - goto label_BFC2A58C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042588u); - } -label_BFC2A588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A588: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042588u); -#endif -label_BFC2A58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2A58C: 0001B103 sra $s6, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x0001B103u, cpu->gpr[22], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A590: 0016B100 sll $s6, $s6, 4 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 4u; - PGXP_ALU(0x0016B100u, cpu->gpr[22], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A594: 26D60010 addiu $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (16)); - PGXP_ALU(0x26D60010u, cpu->gpr[22], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A598: 1000003D beq $zero, $zero, 0xBFC2A690 */ - uint32_t psx_brA_BFC2A598 = cpu->gpr[0]; uint32_t psx_brB_BFC2A598 = cpu->gpr[0]; - psx_taken_BFC2A598 = (psx_brA_BFC2A598 == psx_brB_BFC2A598); - psx_delay_BFC2A598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A59C: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004259Cu); -#endif - if (psx_delay_BFC2A598) { - psx_delay_BFC2A598 = 0; - if (psx_taken_BFC2A598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042690u); - goto label_BFC2A690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425A0u); - } -label_BFC2A5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2A5A0: 2C810081 sltiu $at, $a0, 129 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x800425A0u); -#endif -label_BFC2A5A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A5A4: 14200009 bne $at, $zero, 0xBFC2A5CC */ - uint32_t psx_brA_BFC2A5A4 = cpu->gpr[1]; uint32_t psx_brB_BFC2A5A4 = cpu->gpr[0]; - psx_taken_BFC2A5A4 = (psx_brA_BFC2A5A4 != psx_brB_BFC2A5A4); - psx_delay_BFC2A5A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2A5A8: 2C810099 sltiu $at, $a0, 153 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0); - PGXP_ALU(0x2C810099u, cpu->gpr[1], _pgx1, 0x0099u); } -#ifdef PSX_COSIM - cosim_instr(0x800425A8u); -#endif - if (psx_delay_BFC2A5A4) { - psx_delay_BFC2A5A4 = 0; - if (psx_taken_BFC2A5A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425CCu); - goto label_BFC2A5CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425ACu); - } -label_BFC2A5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A5AC: 10200007 beq $at, $zero, 0xBFC2A5CC */ - uint32_t psx_brA_BFC2A5AC = cpu->gpr[1]; uint32_t psx_brB_BFC2A5AC = cpu->gpr[0]; - psx_taken_BFC2A5AC = (psx_brA_BFC2A5AC == psx_brB_BFC2A5AC); - psx_delay_BFC2A5AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A5B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800425B0u); -#endif - if (psx_delay_BFC2A5AC) { - psx_delay_BFC2A5AC = 0; - if (psx_taken_BFC2A5AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425CCu); - goto label_BFC2A5CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425B4u); - } -label_BFC2A5B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425B4u); -#endif - /* 0xBFC2A5B4: 926F0001 lbu $t7, 1($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 1; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (1)), 15, 0x80000u); - PGXP_LOAD(0x926F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800425B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2A5B8: 00047200 sll $t6, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 8u; - PGXP_ALU(0x00047200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800425B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2A5BC: 01CF2825 or $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF2825u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800425BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A5C0: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800425C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A5C4: 10000009 beq $zero, $zero, 0xBFC2A5EC */ - uint32_t psx_brA_BFC2A5C4 = cpu->gpr[0]; uint32_t psx_brB_BFC2A5C4 = cpu->gpr[0]; - psx_taken_BFC2A5C4 = (psx_brA_BFC2A5C4 == psx_brB_BFC2A5C4); - psx_delay_BFC2A5C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A5C8: 26730002 addiu $s3, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (2)); - PGXP_ALU(0x26730002u, cpu->gpr[19], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800425C8u); -#endif - if (psx_delay_BFC2A5C4) { - psx_delay_BFC2A5C4 = 0; - if (psx_taken_BFC2A5C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425ECu); - goto label_BFC2A5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425CCu); - } -label_BFC2A5CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A5CC: 0C010C2A jal 0xB00430A8 */ - cpu->gpr[31] = 0x800425D4u; /* jal link before delay slot */ - psx_delay_BFC2A5CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A5D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800425D0u); -#endif - if (psx_delay_BFC2A5CC) { - psx_delay_BFC2A5CC = 0; - cpu->gpr[31] = 0x800425D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430A8u); - cpu->pc = 0x800430A8u; return; - } -label_BFC2A5D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A5D4: 3058FFFF andi $t8, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3058FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800425D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2A5D8: 17000003 bne $t8, $zero, 0xBFC2A5E8 */ - uint32_t psx_brA_BFC2A5D8 = cpu->gpr[24]; uint32_t psx_brB_BFC2A5D8 = cpu->gpr[0]; - psx_taken_BFC2A5D8 = (psx_brA_BFC2A5D8 != psx_brB_BFC2A5D8); - psx_delay_BFC2A5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2A5DC: 3045FFFF andi $a1, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800425DCu); -#endif - if (psx_delay_BFC2A5D8) { - psx_delay_BFC2A5D8 = 0; - if (psx_taken_BFC2A5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425E8u); - goto label_BFC2A5E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425E0u); - } -label_BFC2A5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A5E0: 10000185 beq $zero, $zero, 0xBFC2ABF8 */ - uint32_t psx_brA_BFC2A5E0 = cpu->gpr[0]; uint32_t psx_brB_BFC2A5E0 = cpu->gpr[0]; - psx_taken_BFC2A5E0 = (psx_brA_BFC2A5E0 == psx_brB_BFC2A5E0); - psx_delay_BFC2A5E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A5E4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800425E4u); -#endif - if (psx_delay_BFC2A5E0) { - psx_delay_BFC2A5E0 = 0; - if (psx_taken_BFC2A5E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF8u); - goto label_BFC2ABF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425E8u); - } -label_BFC2A5E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2A5E8: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800425E8u); -#endif -label_BFC2A5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200022u); -#endif - /* 0xBFC2A5EC: 00B5082B sltu $at, $a1, $s5 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[21] ? 1 : 0); - PGXP_ALU(0x00B5082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800425ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A5F0: 1420000A bne $at, $zero, 0xBFC2A61C */ - uint32_t psx_brA_BFC2A5F0 = cpu->gpr[1]; uint32_t psx_brB_BFC2A5F0 = cpu->gpr[0]; - psx_taken_BFC2A5F0 = (psx_brA_BFC2A5F0 != psx_brB_BFC2A5F0); - psx_delay_BFC2A5F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800022u); -#endif - /* 0xBFC2A5F4: 00B7082B sltu $at, $a1, $s7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[23] ? 1 : 0); - PGXP_ALU(0x00B7082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800425F4u); -#endif - if (psx_delay_BFC2A5F0) { - psx_delay_BFC2A5F0 = 0; - if (psx_taken_BFC2A5F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004261Cu); - goto label_BFC2A61C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800425F8u); - } -label_BFC2A5F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A5F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800425F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A5F8: 10200008 beq $at, $zero, 0xBFC2A61C */ - uint32_t psx_brA_BFC2A5F8 = cpu->gpr[1]; uint32_t psx_brB_BFC2A5F8 = cpu->gpr[0]; - psx_taken_BFC2A5F8 = (psx_brA_BFC2A5F8 == psx_brB_BFC2A5F8); - psx_delay_BFC2A5F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A5FC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800425FCu); -#endif - if (psx_delay_BFC2A5F8) { - psx_delay_BFC2A5F8 = 0; - if (psx_taken_BFC2A5F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004261Cu); - goto label_BFC2A61C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042600u); - } -label_BFC2A600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A600: 342100AC ori $at, $at, 0xAC */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xACu; - PGXP_ALU(0x342100ACu, cpu->gpr[1], _pgx1, 0x00ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80042600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2A604: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A608: 3C10BFC6 lui $s0, 0xBFC6 */ - cpu->gpr[16] = 0xBFC60000u; - PGXP_ALU(0x3C10BFC6u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400000u); -#endif - /* 0xBFC2A60C: 0016C940 sll $t9, $s6, 5 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[25] = cpu->gpr[22] << 5u; - PGXP_ALU(0x0016C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8004260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024000u); -#endif - /* 0xBFC2A610: 032E8821 addu $s1, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A614: 10000014 beq $zero, $zero, 0xBFC2A668 */ - uint32_t psx_brA_BFC2A614 = cpu->gpr[0]; uint32_t psx_brB_BFC2A614 = cpu->gpr[0]; - psx_taken_BFC2A614 = (psx_brA_BFC2A614 == psx_brB_BFC2A614); - psx_delay_BFC2A614 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A618: 36106000 ori $s0, $s0, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x6000u; - PGXP_ALU(0x36106000u, cpu->gpr[16], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x80042618u); -#endif - if (psx_delay_BFC2A614) { - psx_delay_BFC2A614 = 0; - if (psx_taken_BFC2A614) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042668u); - goto label_BFC2A668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004261Cu); - } -label_BFC2A61C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A61Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A61C: 3401889F ori $at, $zero, 0x889F */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x889Fu; - PGXP_ALU(0x3401889Fu, cpu->gpr[1], _pgx1, 0x889Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004261Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2A620: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A624: 1420000B bne $at, $zero, 0xBFC2A654 */ - uint32_t psx_brA_BFC2A624 = cpu->gpr[1]; uint32_t psx_brB_BFC2A624 = cpu->gpr[0]; - psx_taken_BFC2A624 = (psx_brA_BFC2A624 != psx_brB_BFC2A624); - psx_delay_BFC2A624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A628: 34019873 ori $at, $zero, 0x9873 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x9873u; - PGXP_ALU(0x34019873u, cpu->gpr[1], _pgx1, 0x9873u); } -#ifdef PSX_COSIM - cosim_instr(0x80042628u); -#endif - if (psx_delay_BFC2A624) { - psx_delay_BFC2A624 = 0; - if (psx_taken_BFC2A624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042654u); - goto label_BFC2A654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004262Cu); - } -label_BFC2A62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2A62C: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A630: 10200008 beq $at, $zero, 0xBFC2A654 */ - uint32_t psx_brA_BFC2A630 = cpu->gpr[1]; uint32_t psx_brB_BFC2A630 = cpu->gpr[0]; - psx_taken_BFC2A630 = (psx_brA_BFC2A630 == psx_brB_BFC2A630); - psx_delay_BFC2A630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A634: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042634u); -#endif - if (psx_delay_BFC2A630) { - psx_delay_BFC2A630 = 0; - if (psx_taken_BFC2A630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042654u); - goto label_BFC2A654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042638u); - } -label_BFC2A638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A638: 342100AC ori $at, $at, 0xAC */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xACu; - PGXP_ALU(0x342100ACu, cpu->gpr[1], _pgx1, 0x00ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80042638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000002u); -#endif - /* 0xBFC2A63C: 03A1C021 addu $t8, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004263Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A640: 3C10BFC6 lui $s0, 0xBFC6 */ - cpu->gpr[16] = 0xBFC60000u; - PGXP_ALU(0x3C10BFC6u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408000u); -#endif - /* 0xBFC2A644: 00167940 sll $t7, $s6, 5 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[15] = cpu->gpr[22] << 5u; - PGXP_ALU(0x00167940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80042644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC2A648: 01F88821 addu $s1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[17] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A64C: 10000006 beq $zero, $zero, 0xBFC2A668 */ - uint32_t psx_brA_BFC2A64C = cpu->gpr[0]; uint32_t psx_brB_BFC2A64C = cpu->gpr[0]; - psx_taken_BFC2A64C = (psx_brA_BFC2A64C == psx_brB_BFC2A64C); - psx_delay_BFC2A64C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A650: 36109D68 ori $s0, $s0, 0x9D68 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x9D68u; - PGXP_ALU(0x36109D68u, cpu->gpr[16], _pgx1, 0x9D68u); } -#ifdef PSX_COSIM - cosim_instr(0x80042650u); -#endif - if (psx_delay_BFC2A64C) { - psx_delay_BFC2A64C = 0; - if (psx_taken_BFC2A64C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042668u); - goto label_BFC2A668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042654u); - } -label_BFC2A654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A654: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A658: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80042660u; /* jal link before delay slot */ - psx_delay_BFC2A658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A65C: 248480A0 addiu $a0, $a0, -32608 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32608)); - PGXP_ALU(0x248480A0u, cpu->gpr[4], _pgx1, 0xFFFF80A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004265Cu); -#endif - if (psx_delay_BFC2A658) { - psx_delay_BFC2A658 = 0; - cpu->gpr[31] = 0x80042660u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC2A660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A660: 10000165 beq $zero, $zero, 0xBFC2ABF8 */ - uint32_t psx_brA_BFC2A660 = cpu->gpr[0]; uint32_t psx_brB_BFC2A660 = cpu->gpr[0]; - psx_taken_BFC2A660 = (psx_brA_BFC2A660 == psx_brB_BFC2A660); - psx_delay_BFC2A660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A664: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042664u); -#endif - if (psx_delay_BFC2A660) { - psx_delay_BFC2A660 = 0; - if (psx_taken_BFC2A660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF8u); - goto label_BFC2ABF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042668u); - } -label_BFC2A668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A668: 0C010B34 jal 0xB0042CD0 */ - cpu->gpr[31] = 0x80042670u; /* jal link before delay slot */ - psx_delay_BFC2A668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC2A66C: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004266Cu); -#endif - if (psx_delay_BFC2A668) { - psx_delay_BFC2A668 = 0; - cpu->gpr[31] = 0x80042670u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042CD0u); - cpu->pc = 0x80042CD0u; return; - } -label_BFC2A670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A670: 0002C900 sll $t9, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 4u; - PGXP_ALU(0x0002C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A674: 0322C823 subu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[2]; - PGXP_ALU(0x0322C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2A678: 0019C840 sll $t9, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 1u; - PGXP_ALU(0x0019C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010010u); -#endif - /* 0xBFC2A67C: 02192021 addu $a0, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2A680: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A684: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x8004268Cu; /* jal link before delay slot */ - psx_delay_BFC2A684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2A688: 2406001E addiu $a2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2406001Eu, cpu->gpr[6], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80042688u); -#endif - if (psx_delay_BFC2A684) { - psx_delay_BFC2A684 = 0; - cpu->gpr[31] = 0x8004268Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2A68C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A68Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2A68C: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004268Cu); -#endif -label_BFC2A690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042690u); -#endif - /* 0xBFC2A690: 92640000 lbu $a0, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 4, 0x80000u); - PGXP_LOAD(0x92640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80042690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2A698: 10800003 beq $a0, $zero, 0xBFC2A6A8 */ - uint32_t psx_brA_BFC2A698 = cpu->gpr[4]; uint32_t psx_brB_BFC2A698 = cpu->gpr[0]; - psx_taken_BFC2A698 = (psx_brA_BFC2A698 == psx_brB_BFC2A698); - psx_delay_BFC2A698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2A69C: 2AC10100 slti $at, $s6, 256 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (256) ? 1 : 0); - PGXP_ALU(0x2AC10100u, cpu->gpr[1], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004269Cu); -#endif - if (psx_delay_BFC2A698) { - psx_delay_BFC2A698 = 0; - if (psx_taken_BFC2A698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426A8u); - goto label_BFC2A6A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426A0u); - } -label_BFC2A6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A6A0: 1420FFB5 bne $at, $zero, 0xBFC2A578 */ - uint32_t psx_brA_BFC2A6A0 = cpu->gpr[1]; uint32_t psx_brB_BFC2A6A0 = cpu->gpr[0]; - psx_taken_BFC2A6A0 = (psx_brA_BFC2A6A0 != psx_brB_BFC2A6A0); - psx_delay_BFC2A6A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A6A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800426A4u); -#endif - if (psx_delay_BFC2A6A0) { - psx_delay_BFC2A6A0 = 0; - if (psx_taken_BFC2A6A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042578u); - goto label_BFC2A578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426A8u); - } -label_BFC2A6A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2A6A8: 3C140001 lui $s4, 0x1 */ - cpu->gpr[20] = 0x00010000u; - PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800426A8u); -#endif -label_BFC2A6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2A6AC: 029DA021 addu $s4, $s4, $sp */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[29]; - PGXP_ALU(0x029DA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426B0u); -#endif - /* 0xBFC2A6B0: 8E9420D8 lw $s4, 8408($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 8408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (8408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800426B0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x100000u); } - PGXP_LOAD(0x8E9420D8u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800426B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2A6B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC2A6B8: 0000B821 addu $s7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2A6BC: 24150010 addiu $s5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24150010u, cpu->gpr[21], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800426BCu); -#endif -label_BFC2A6C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2A6C0: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426C0u); -#endif -label_BFC2A6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2A6C4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80800001u); -#endif - /* 0xBFC2A6C8: 02E0F821 addu $ra, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[31] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E0F821u, cpu->gpr[31], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426C8u); -#endif -label_BFC2A6CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400002u); -#endif - /* 0xBFC2A6CC: 03F6082A slt $at, $ra, $s6 */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[22] ? 1 : 0); - PGXP_ALU(0x03F6082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A6D0: 102000B0 beq $at, $zero, 0xBFC2A994 */ - uint32_t psx_brA_BFC2A6D0 = cpu->gpr[1]; uint32_t psx_brB_BFC2A6D0 = cpu->gpr[0]; - psx_taken_BFC2A6D0 = (psx_brA_BFC2A6D0 == psx_brB_BFC2A6D0); - psx_delay_BFC2A6D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80080001u); -#endif - /* 0xBFC2A6D4: 03E09821 addu $s3, $ra, $zero */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[31] + cpu->gpr[0]; - PGXP_ALU(0x03E09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426D4u); -#endif - if (psx_delay_BFC2A6D0) { - psx_delay_BFC2A6D0 = 0; - if (psx_taken_BFC2A6D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042994u); - goto label_BFC2A994; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426D8u); - } -label_BFC2A6D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A6D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A6D8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800426D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A6DC: 342120B8 ori $at, $at, 0x20B8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20B8u; - PGXP_ALU(0x342120B8u, cpu->gpr[1], _pgx1, 0x20B8u); } -#ifdef PSX_COSIM - cosim_instr(0x800426DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008002u); -#endif - /* 0xBFC2A6E0: 03A17821 addu $t7, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC2A6E4: 00127040 sll $t6, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[18] << 1u; - PGXP_ALU(0x00127040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800426E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC400u); -#endif - /* 0xBFC2A6E8: 01CF5021 addu $t2, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[10] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC2A6EC: 001FC140 sll $t8, $ra, 5 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[24] = cpu->gpr[31] << 5u; - PGXP_ALU(0x001FC140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800426ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800426F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC2A6F0: 0011C840 sll $t9, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[17] << 1u; - PGXP_ALU(0x0011C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800426F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A6F4: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2A6F8: 12800062 beq $s4, $zero, 0xBFC2A884 */ - uint32_t psx_brA_BFC2A6F8 = cpu->gpr[20]; uint32_t psx_brB_BFC2A6F8 = cpu->gpr[0]; - psx_taken_BFC2A6F8 = (psx_brA_BFC2A6F8 == psx_brB_BFC2A6F8); - psx_delay_BFC2A6F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC2A6FC: 01CF6821 addu $t5, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800426FCu); -#endif - if (psx_delay_BFC2A6F8) { - psx_delay_BFC2A6F8 = 0; - if (psx_taken_BFC2A6F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042884u); - goto label_BFC2A884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042700u); - } -label_BFC2A700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042700u); -#endif - /* 0xBFC2A700: 95A2DFF4 lhu $v0, -8204($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042700u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x2000u); } - PGXP_LOAD(0x95A2DFF4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A704: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2A708: 000219C2 srl $v1, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x000219C2u, cpu->gpr[3], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80042708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2A70C: 00025A02 srl $t3, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00025A02u, cpu->gpr[11], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2A710: 00022182 srl $a0, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] >> 6u; - PGXP_ALU(0x00022182u, cpu->gpr[4], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80042710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A714: 30840001 andi $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2A718: 316B0001 andi $t3, $t3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0x1u; - PGXP_ALU(0x316B0001u, cpu->gpr[11], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2A71C: 30630001 andi $v1, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x30630001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004271Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000808u); -#endif - /* 0xBFC2A720: 006BC025 or $t8, $v1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[3] | cpu->gpr[11]; - PGXP_ALU(0x006BC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC2A724: 0004C900 sll $t9, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 4u; - PGXP_ALU(0x0004C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A728: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2A72C: 00037900 sll $t7, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 4u; - PGXP_ALU(0x00037900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004272Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2A730: 00022942 srl $a1, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00022942u, cpu->gpr[5], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80042730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A734: 30A50001 andi $a1, $a1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u; - PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A738: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2A73C: 0005CA00 sll $t9, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 8u; - PGXP_ALU(0x0005CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A740: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2A744: 00047A00 sll $t7, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 8u; - PGXP_ALU(0x00047A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2A748: 00023102 srl $a2, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00023102u, cpu->gpr[6], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2A74C: 30C60001 andi $a2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u; - PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A750: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC2A754: 0006CB00 sll $t9, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] << 12u; - PGXP_ALU(0x0006CB00u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A758: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2A75C: 00057B00 sll $t7, $a1, 12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 12u; - PGXP_ALU(0x00057B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004275Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A760: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2A764: 000238C2 srl $a3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] >> 3u; - PGXP_ALU(0x000238C2u, cpu->gpr[7], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80042764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2A768: 00024082 srl $t0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 2u; - PGXP_ALU(0x00024082u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A76C: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004276Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2A770: 31080001 andi $t0, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2A774: 30E70001 andi $a3, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2A778: A438DFF4 sh $t8, -8204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042778u); return; } g_debug_last_store_pc = 0x80042778u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DFF4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000C0u); -#endif - /* 0xBFC2A77C: 00E6C825 or $t9, $a3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[7] | cpu->gpr[6]; - PGXP_ALU(0x00E6C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2A780: 00087100 sll $t6, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00087100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A784: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC2A788: 0007C100 sll $t8, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] << 4u; - PGXP_ALU(0x0007C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2A78C: 00024842 srl $t1, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x00024842u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2A790: 31290001 andi $t1, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A794: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2A798: 00097200 sll $t6, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 8u; - PGXP_ALU(0x00097200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A79C: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004279Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC2A7A0: 0008C200 sll $t8, $t0, 8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 8u; - PGXP_ALU(0x0008C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800427A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A7A4: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2A7A8: 304C0001 andi $t4, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304C0001u, cpu->gpr[12], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800427A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC2A7AC: 000C7300 sll $t6, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] << 12u; - PGXP_ALU(0x000C7300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800427ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A7B0: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC2A7B4: 0009C300 sll $t8, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 12u; - PGXP_ALU(0x0009C300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800427B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A7B8: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A7BC: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800427BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2A7C0: 00022382 srl $a0, $v0, 14 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] >> 14u; - PGXP_ALU(0x00022382u, cpu->gpr[4], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x800427C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2A7C4: 00021BC2 srl $v1, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] >> 15u; - PGXP_ALU(0x00021BC2u, cpu->gpr[3], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x800427C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A7C8: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2A7CC: 30630001 andi $v1, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x30630001u, cpu->gpr[3], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800427CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2A7D0: 30840001 andi $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800427D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2A7D4: A439DFF6 sh $t9, -8202($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800427D4u); return; } g_debug_last_store_pc = 0x800427D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFF6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800427D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2A7D8: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800427D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5008u); -#endif - /* 0xBFC2A7DC: 006C7025 or $t6, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[3] | cpu->gpr[12]; - PGXP_ALU(0x006C7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A7E0: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2A7E4: 0003C900 sll $t9, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 4u; - PGXP_ALU(0x0003C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800427E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2A7E8: 00022B42 srl $a1, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 13u; - PGXP_ALU(0x00022B42u, cpu->gpr[5], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x800427E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2A7EC: 30A50001 andi $a1, $a1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u; - PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800427ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800427F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A7F0: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2A7F4: 00057A00 sll $t7, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 8u; - PGXP_ALU(0x00057A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800427F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A7F8: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800427F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC2A7FC: 0004CA00 sll $t9, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 8u; - PGXP_ALU(0x0004CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800427FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2A800: 00023302 srl $a2, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 12u; - PGXP_ALU(0x00023302u, cpu->gpr[6], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2A804: 30C60001 andi $a2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u; - PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A808: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC2A80C: 00067B00 sll $t7, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 12u; - PGXP_ALU(0x00067B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A810: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2A814: 0005CB00 sll $t9, $a1, 12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 12u; - PGXP_ALU(0x0005CB00u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A818: 03197025 or $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A81C: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004281Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2A820: 00024282 srl $t0, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 10u; - PGXP_ALU(0x00024282u, cpu->gpr[8], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80042820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2A824: 00023AC2 srl $a3, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] >> 11u; - PGXP_ALU(0x00023AC2u, cpu->gpr[7], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80042824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A828: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2A82C: 30E70001 andi $a3, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004282Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2A830: 31080001 andi $t0, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2A834: A42EDFF8 sh $t6, -8200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042834u); return; } g_debug_last_store_pc = 0x80042834u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EDFF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC2A838: 0008C100 sll $t8, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = cpu->gpr[8] << 4u; - PGXP_ALU(0x0008C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80C0u); -#endif - /* 0xBFC2A83C: 00E67825 or $t7, $a3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[7] | cpu->gpr[6]; - PGXP_ALU(0x00E67825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A840: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2A844: 00077100 sll $t6, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 4u; - PGXP_ALU(0x00077100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2A848: 00024A42 srl $t1, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] >> 9u; - PGXP_ALU(0x00024A42u, cpu->gpr[9], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80042848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2A84C: 31290001 andi $t1, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004284Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A850: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC2A854: 0009C200 sll $t8, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 8u; - PGXP_ALU(0x0009C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A858: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2A85C: 00087200 sll $t6, $t0, 8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 8u; - PGXP_ALU(0x00087200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A860: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000800u); -#endif - /* 0xBFC2A864: 000BC300 sll $t8, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[11] << 12u; - PGXP_ALU(0x000BC300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A868: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2A86C: 00097300 sll $t6, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 12u; - PGXP_ALU(0x00097300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004286Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A870: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A874: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A878: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A87C: 10000045 beq $zero, $zero, 0xBFC2A994 */ - uint32_t psx_brA_BFC2A87C = cpu->gpr[0]; uint32_t psx_brB_BFC2A87C = cpu->gpr[0]; - psx_taken_BFC2A87C = (psx_brA_BFC2A87C == psx_brB_BFC2A87C); - psx_delay_BFC2A87C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2A880: A42FDFFA sh $t7, -8198($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042880u); return; } g_debug_last_store_pc = 0x80042880u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FDFFAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042880u); -#endif - if (psx_delay_BFC2A87C) { - psx_delay_BFC2A87C = 0; - if (psx_taken_BFC2A87C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042994u); - goto label_BFC2A994; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042884u); - } -label_BFC2A884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042884u); -#endif - /* 0xBFC2A884: 95A2DFF4 lhu $v0, -8204($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042884u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x2000u); } - PGXP_LOAD(0x95A2DFF4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A888: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A88C: 0002C1C2 srl $t8, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x0002C1C2u, cpu->gpr[24], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8004288Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A890: 00027182 srl $t6, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 6u; - PGXP_ALU(0x00027182u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80042890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A894: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A898: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2A89C: 000FC100 sll $t8, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000FC100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A8A0: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A8A4: 00027942 srl $t7, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00027942u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800428A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A8A8: 31F90001 andi $t9, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A8AC: 0019C200 sll $t8, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 8u; - PGXP_ALU(0x0019C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800428ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A8B0: 01D87825 or $t7, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D87825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A8B4: 0002C902 srl $t9, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x0002C902u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800428B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A8B8: 332E0001 andi $t6, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2A8BC: 000EC300 sll $t8, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 12u; - PGXP_ALU(0x000EC300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800428BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A8C0: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A8C4: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2A8C8: A439DFF4 sh $t9, -8204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800428C8u); return; } g_debug_last_store_pc = 0x800428C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800428C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A8CC: 0002C082 srl $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 2u; - PGXP_ALU(0x0002C082u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800428CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A8D0: 000270C2 srl $t6, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 3u; - PGXP_ALU(0x000270C2u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800428D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A8D4: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A8D8: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A8DC: 00197100 sll $t6, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 4u; - PGXP_ALU(0x00197100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800428DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A8E0: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A8E4: 0002C842 srl $t9, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x0002C842u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800428E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A8E8: 332F0001 andi $t7, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A8EC: 000F7200 sll $t6, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000F7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800428ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800428F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A8F0: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A8F4: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800428F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2A8F8: 000FC300 sll $t8, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 12u; - PGXP_ALU(0x000FC300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800428F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A8FC: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800428FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A900: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A904: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2A908: A42EDFF6 sh $t6, -8202($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042908u); return; } g_debug_last_store_pc = 0x80042908u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EDFF6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A90C: 0002C382 srl $t8, $v0, 14 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 14u; - PGXP_ALU(0x0002C382u, cpu->gpr[24], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x8004290Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A910: 00027BC2 srl $t7, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 15u; - PGXP_ALU(0x00027BC2u, cpu->gpr[15], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x80042910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A914: 31F90001 andi $t9, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2A918: 330E0001 andi $t6, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A91C: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004291Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A920: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A924: 00027342 srl $t6, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 13u; - PGXP_ALU(0x00027342u, cpu->gpr[14], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x80042924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A928: 31D90001 andi $t9, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A92C: 00197A00 sll $t7, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00197A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004292Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A930: 030F7025 or $t6, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[15]; - PGXP_ALU(0x030F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A934: 0002CB02 srl $t9, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 12u; - PGXP_ALU(0x0002CB02u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A938: 33380001 andi $t8, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x33380001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2A93C: 00187B00 sll $t7, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] << 12u; - PGXP_ALU(0x00187B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004293Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2A940: 01CFC825 or $t9, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A944: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A948: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2A94C: A439DFF8 sh $t9, -8200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004294Cu); return; } g_debug_last_store_pc = 0x8004294Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2A950: 00027A82 srl $t7, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 10u; - PGXP_ALU(0x00027A82u, cpu->gpr[15], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80042950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2A954: 0002C2C2 srl $t8, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 11u; - PGXP_ALU(0x0002C2C2u, cpu->gpr[24], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80042954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2A958: 330E0001 andi $t6, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2A95C: 31F90001 andi $t9, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2A960: 0019C100 sll $t8, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2A964: 01D87825 or $t7, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D87825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2A968: 0002CA42 srl $t9, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 9u; - PGXP_ALU(0x0002CA42u, cpu->gpr[25], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80042968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2A96C: 332E0001 andi $t6, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2A970: 000EC200 sll $t8, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000EC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2A974: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2A978: 00027202 srl $t6, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2A97C: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2A980: 000FC300 sll $t8, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 12u; - PGXP_ALU(0x000FC300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80042980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A984: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2A988: 002A0821 addu $at, $at, $t2 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[10]; - PGXP_ALU(0x002A0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2A98C: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2A990: A42EDFFA sh $t6, -8198($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042990u); return; } g_debug_last_store_pc = 0x80042990u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EDFFAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042990u); -#endif -label_BFC2A994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2A994: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2A998: 27FF0001 addiu $ra, $ra, 1 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] + (1)); - PGXP_ALU(0x27FF0001u, cpu->gpr[31], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC2A99C: 1615FF4B bne $s0, $s5, 0xBFC2A6CC */ - uint32_t psx_brA_BFC2A99C = cpu->gpr[16]; uint32_t psx_brB_BFC2A99C = cpu->gpr[21]; - psx_taken_BFC2A99C = (psx_brA_BFC2A99C != psx_brB_BFC2A99C); - psx_delay_BFC2A99C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2A9A0: 26520004 addiu $s2, $s2, 4 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (4)); - PGXP_ALU(0x26520004u, cpu->gpr[18], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800429A0u); -#endif - if (psx_delay_BFC2A99C) { - psx_delay_BFC2A99C = 0; - if (psx_taken_BFC2A99C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426CCu); - goto label_BFC2A6CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429A4u); - } -label_BFC2A9A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2A9A4: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800429A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC2A9A8: 2A210010 slti $at, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0); - PGXP_ALU(0x2A210010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800429A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A9AC: 1420FF45 bne $at, $zero, 0xBFC2A6C4 */ - uint32_t psx_brA_BFC2A9AC = cpu->gpr[1]; uint32_t psx_brB_BFC2A9AC = cpu->gpr[0]; - psx_taken_BFC2A9AC = (psx_brA_BFC2A9AC != psx_brB_BFC2A9AC); - psx_delay_BFC2A9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480002u); -#endif - /* 0xBFC2A9B0: 0276082A slt $at, $s3, $s6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[22] ? 1 : 0); - PGXP_ALU(0x0276082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800429B0u); -#endif - if (psx_delay_BFC2A9AC) { - psx_delay_BFC2A9AC = 0; - if (psx_taken_BFC2A9AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426C4u); - goto label_BFC2A6C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429B4u); - } -label_BFC2A9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A9B4: 10200005 beq $at, $zero, 0xBFC2A9CC */ - uint32_t psx_brA_BFC2A9B4 = cpu->gpr[1]; uint32_t psx_brB_BFC2A9B4 = cpu->gpr[0]; - psx_taken_BFC2A9B4 = (psx_brA_BFC2A9B4 == psx_brB_BFC2A9B4); - psx_delay_BFC2A9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2A9B8: 2AC10010 slti $at, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0); - PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800429B8u); -#endif - if (psx_delay_BFC2A9B4) { - psx_delay_BFC2A9B4 = 0; - if (psx_taken_BFC2A9B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429CCu); - goto label_BFC2A9CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429BCu); - } -label_BFC2A9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2A9BC: 26F70010 addiu $s7, $s7, 16 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (16)); - PGXP_ALU(0x26F70010u, cpu->gpr[23], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800429BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800002u); -#endif - /* 0xBFC2A9C0: 2AE10100 slti $at, $s7, 256 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (256) ? 1 : 0); - PGXP_ALU(0x2AE10100u, cpu->gpr[1], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x800429C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A9C4: 1420FF3E bne $at, $zero, 0xBFC2A6C0 */ - uint32_t psx_brA_BFC2A9C4 = cpu->gpr[1]; uint32_t psx_brB_BFC2A9C4 = cpu->gpr[0]; - psx_taken_BFC2A9C4 = (psx_brA_BFC2A9C4 != psx_brB_BFC2A9C4); - psx_delay_BFC2A9C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2A9C8: 2AC10010 slti $at, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0); - PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800429C8u); -#endif - if (psx_delay_BFC2A9C4) { - psx_delay_BFC2A9C4 = 0; - if (psx_taken_BFC2A9C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800426C0u); - goto label_BFC2A6C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429CCu); - } -label_BFC2A9CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2A9CC: 1020000A beq $at, $zero, 0xBFC2A9F8 */ - uint32_t psx_brA_BFC2A9CC = cpu->gpr[1]; uint32_t psx_brB_BFC2A9CC = cpu->gpr[0]; - psx_taken_BFC2A9CC = (psx_brA_BFC2A9CC == psx_brB_BFC2A9CC); - psx_delay_BFC2A9CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420000u); -#endif - /* 0xBFC2A9D0: 26D1FFFF addiu $s1, $s6, -1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); - PGXP_ALU(0x26D1FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800429D0u); -#endif - if (psx_delay_BFC2A9CC) { - psx_delay_BFC2A9CC = 0; - if (psx_taken_BFC2A9CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429F8u); - goto label_BFC2A9F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429D4u); - } -label_BFC2A9D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420000u); -#endif - /* 0xBFC2A9D4: 26D1FFFF addiu $s1, $s6, -1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); - PGXP_ALU(0x26D1FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800429D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500000u); -#endif - /* 0xBFC2A9D8: 0016A140 sll $s4, $s6, 5 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[20] = cpu->gpr[22] << 5u; - PGXP_ALU(0x0016A140u, cpu->gpr[20], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800429D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2A9DC: 06210002 bgez $s1, 0xBFC2A9E8 */ - uint32_t psx_brA_BFC2A9DC = cpu->gpr[17]; - psx_taken_BFC2A9DC = ((int32_t)psx_brA_BFC2A9DC >= 0); - psx_delay_BFC2A9DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC2A9E0: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800429E0u); -#endif - if (psx_delay_BFC2A9DC) { - psx_delay_BFC2A9DC = 0; - if (psx_taken_BFC2A9DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429E8u); - goto label_BFC2A9E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429E4u); - } -label_BFC2A9E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2A9E4: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800429E4u); -#endif -label_BFC2A9E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC2A9E8: 00019103 sra $s2, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00019103u, cpu->gpr[18], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800429E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2A9EC: 10000009 beq $zero, $zero, 0xBFC2AA14 */ - uint32_t psx_brA_BFC2A9EC = cpu->gpr[0]; uint32_t psx_brB_BFC2A9EC = cpu->gpr[0]; - psx_taken_BFC2A9EC = (psx_brA_BFC2A9EC == psx_brB_BFC2A9EC); - psx_delay_BFC2A9EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC2A9F0: 00148080 sll $s0, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[16] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00148080u, cpu->gpr[16], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800429F0u); -#endif - if (psx_delay_BFC2A9EC) { - psx_delay_BFC2A9EC = 0; - if (psx_taken_BFC2A9EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042A14u); - goto label_BFC2AA14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800429F4u); - } -label_BFC2A9F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420000u); -#endif - /* 0xBFC2A9F4: 26D1FFFF addiu $s1, $s6, -1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); - PGXP_ALU(0x26D1FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800429F4u); -#endif -label_BFC2A9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2A9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2A9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800429F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2A9F8: 06210002 bgez $s1, 0xBFC2AA04 */ - uint32_t psx_brA_BFC2A9F8 = cpu->gpr[17]; - psx_taken_BFC2A9F8 = ((int32_t)psx_brA_BFC2A9F8 >= 0); - psx_delay_BFC2A9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC2A9FC: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800429FCu); -#endif - if (psx_delay_BFC2A9F8) { - psx_delay_BFC2A9F8 = 0; - if (psx_taken_BFC2A9F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042A04u); - goto label_BFC2AA04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042A00u); - } -label_BFC2AA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AA00: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042A00u); -#endif -label_BFC2AA04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AA04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC2AA04: 00019103 sra $s2, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00019103u, cpu->gpr[18], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140000u); -#endif - /* 0xBFC2AA08: 0012A240 sll $s4, $s2, 9 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[20] = cpu->gpr[18] << 9u; - PGXP_ALU(0x0012A240u, cpu->gpr[20], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2AA0C: 26940200 addiu $s4, $s4, 512 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (512)); - PGXP_ALU(0x26940200u, cpu->gpr[20], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC2AA10: 00148080 sll $s0, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[16] = cpu->gpr[20] << 2u; - PGXP_ALU(0x00148080u, cpu->gpr[16], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A10u); -#endif -label_BFC2AA14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AA14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC2AA14: 26050040 addiu $a1, $s0, 64 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (64)); - PGXP_ALU(0x26050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2AA18: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x80042A20u; /* jal link before delay slot */ - psx_delay_BFC2AA18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000011u); -#endif - /* 0xBFC2AA1C: 03C02021 addu $a0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A1Cu); -#endif - if (psx_delay_BFC2AA18) { - psx_delay_BFC2AA18 = 0; - cpu->gpr[31] = 0x80042A20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2AA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2AA20: 24190008 addiu $t9, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24190008u, cpu->gpr[25], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2AA24: 240F0010 addiu $t7, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000000u); -#endif - /* 0xBFC2AA28: AFD90004 sw $t9, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A28u); return; } g_debug_last_store_pc = 0x80042A28u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFD90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2AA2C: 2418002C addiu $t8, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2418002Cu, cpu->gpr[24], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80042A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2AA30: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008000u); -#endif - /* 0xBFC2AA34: AFCF0000 sw $t7, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A34u); return; } g_debug_last_store_pc = 0x80042A34u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000000u); -#endif - /* 0xBFC2AA38: AFD80008 sw $t8, 8($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A38u); return; } g_debug_last_store_pc = 0x80042A38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFD80008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2AA3C: 01DD7021 addu $t6, $t6, $sp */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[29]; - PGXP_ALU(0x01DD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2AA40: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A40u); -#endif - /* 0xBFC2AA44: 8DCE20CC lw $t6, 8396($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE20CCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2AA48: 033DC821 addu $t9, $t9, $sp */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[29]; - PGXP_ALU(0x033DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A48u); -#endif - /* 0xBFC2AA4C: 8F3920C8 lw $t9, 8392($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 8392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (8392)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A4Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3920C8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2AA50: 000E7C00 sll $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7C00u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2AA54: 01F9C025 or $t8, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[25]; - PGXP_ALU(0x01F9C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2AA58: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000000u); -#endif - /* 0xBFC2AA5C: AFD8000C sw $t8, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A5Cu); return; } g_debug_last_store_pc = 0x80042A5Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFD8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2AA60: 35CE0010 ori $t6, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CE0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2AA64: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004000u); -#endif - /* 0xBFC2AA68: AFCE0010 sw $t6, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A68u); return; } g_debug_last_store_pc = 0x80042A68u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFCE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2AA6C: 01FD7821 addu $t7, $t7, $sp */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[29]; - PGXP_ALU(0x01FD7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2AA70: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A70u); -#endif - /* 0xBFC2AA74: 8DEF20D0 lw $t7, 8400($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8400; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A74u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF20D0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2AA78: 031DC021 addu $t8, $t8, $sp */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[29]; - PGXP_ALU(0x031DC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A78u); -#endif - /* 0xBFC2AA7C: 8F1820D4 lw $t8, 8404($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 8404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (8404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A7Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1820D4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2AA80: 000FCC00 sll $t9, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FCC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2AA84: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004000u); -#endif - /* 0xBFC2AA88: AFCE0014 sw $t6, 20($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A88u); return; } g_debug_last_store_pc = 0x80042A88u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFCE0014u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2AA8C: 260F000C addiu $t7, $s0, 12 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[16] + (12)); - PGXP_ALU(0x260F000Cu, cpu->gpr[15], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80042A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2AA90: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008000u); -#endif - /* 0xBFC2AA94: AFCF0034 sw $t7, 52($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042A94u); return; } g_debug_last_store_pc = 0x80042A94u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFCF0034u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2AA98: 033DC821 addu $t9, $t9, $sp */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[29]; - PGXP_ALU(0x033DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2AA9C: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AA0u); -#endif - /* 0xBFC2AAA0: 8F3920C4 lw $t9, 8388($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 8388; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (8388)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042AA0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3920C4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2AAA4: 01DD7021 addu $t6, $t6, $sp */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[29]; - PGXP_ALU(0x01DD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042AA4u); -#endif - /* 0xBFC2AAA8: 8DCE20C0 lw $t6, 8384($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042AA8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE20C0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2AAAC: 0019C400 sll $t8, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 16u; - PGXP_ALU(0x0019C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2AAB0: 2AC10011 slti $at, $s6, 17 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (17) ? 1 : 0); - PGXP_ALU(0x2AC10011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2AAB4: 030E7825 or $t7, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AAB8: 14200003 bne $at, $zero, 0xBFC2AAC8 */ - uint32_t psx_brA_BFC2AAB8 = cpu->gpr[1]; uint32_t psx_brB_BFC2AAB8 = cpu->gpr[0]; - psx_taken_BFC2AAB8 = (psx_brA_BFC2AAB8 != psx_brB_BFC2AAB8); - psx_delay_BFC2AAB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008000u); -#endif - /* 0xBFC2AABC: AFCF0038 sw $t7, 56($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042ABCu); return; } g_debug_last_store_pc = 0x80042ABCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFCF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042ABCu); -#endif - if (psx_delay_BFC2AAB8) { - psx_delay_BFC2AAB8 = 0; - if (psx_taken_BFC2AAB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AC8u); - goto label_BFC2AAC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AC0u); - } -label_BFC2AAC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AAC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AAC0: 10000008 beq $zero, $zero, 0xBFC2AAE4 */ - uint32_t psx_brA_BFC2AAC0 = cpu->gpr[0]; uint32_t psx_brB_BFC2AAC0 = cpu->gpr[0]; - psx_taken_BFC2AAC0 = (psx_brA_BFC2AAC0 == psx_brB_BFC2AAC0); - psx_delay_BFC2AAC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2AAC4: 24020040 addiu $v0, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24020040u, cpu->gpr[2], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AC4u); -#endif - if (psx_delay_BFC2AAC0) { - psx_delay_BFC2AAC0 = 0; - if (psx_taken_BFC2AAC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AE4u); - goto label_BFC2AAE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AC8u); - } -label_BFC2AAC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AAC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2AAC8: 06210004 bgez $s1, 0xBFC2AADC */ - uint32_t psx_brA_BFC2AAC8 = cpu->gpr[17]; - psx_taken_BFC2AAC8 = ((int32_t)psx_brA_BFC2AAC8 >= 0); - psx_delay_BFC2AAC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC2AACC: 3222000F andi $v0, $s1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0xFu; - PGXP_ALU(0x3222000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042ACCu); -#endif - if (psx_delay_BFC2AAC8) { - psx_delay_BFC2AAC8 = 0; - if (psx_taken_BFC2AAC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042ADCu); - goto label_BFC2AADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AD0u); - } -label_BFC2AAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2AAD0: 10400002 beq $v0, $zero, 0xBFC2AADC */ - uint32_t psx_brA_BFC2AAD0 = cpu->gpr[2]; uint32_t psx_brB_BFC2AAD0 = cpu->gpr[0]; - psx_taken_BFC2AAD0 = (psx_brA_BFC2AAD0 == psx_brB_BFC2AAD0); - psx_delay_BFC2AAD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AAD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042AD4u); -#endif - if (psx_delay_BFC2AAD0) { - psx_delay_BFC2AAD0 = 0; - if (psx_taken_BFC2AAD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042ADCu); - goto label_BFC2AADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042AD8u); - } -label_BFC2AAD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AAD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2AAD8: 2442FFF0 addiu $v0, $v0, -16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-16)); - PGXP_ALU(0x2442FFF0u, cpu->gpr[2], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AD8u); -#endif -label_BFC2AADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2AADC: 00021080 sll $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00021080u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2AAE0: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AE0u); -#endif -label_BFC2AAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2AAE4: 0012C900 sll $t9, $s2, 4 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] << 4u; - PGXP_ALU(0x0012C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2AAE8: 27380010 addiu $t8, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[25] + (16)); - PGXP_ALU(0x27380010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2AAEC: 00187400 sll $t6, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 16u; - PGXP_ALU(0x00187400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2AAF0: 01C27825 or $t7, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[2]; - PGXP_ALU(0x01C27825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400002u); -#endif - /* 0xBFC2AAF4: 2AC10010 slti $at, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (16) ? 1 : 0); - PGXP_ALU(0x2AC10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AAF8: 10200025 beq $at, $zero, 0xBFC2AB90 */ - uint32_t psx_brA_BFC2AAF8 = cpu->gpr[1]; uint32_t psx_brB_BFC2AAF8 = cpu->gpr[0]; - psx_taken_BFC2AAF8 = (psx_brA_BFC2AAF8 == psx_brB_BFC2AAF8); - psx_delay_BFC2AAF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008000u); -#endif - /* 0xBFC2AAFC: AFCF003C sw $t7, 60($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042AFCu); return; } g_debug_last_store_pc = 0x80042AFCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFCF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042AFCu); -#endif - if (psx_delay_BFC2AAF8) { - psx_delay_BFC2AAF8 = 0; - if (psx_taken_BFC2AAF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B90u); - goto label_BFC2AB90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B00u); - } -label_BFC2AB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2AB00: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2AB04: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2AB08: 1A80003A blez $s4, 0xBFC2ABF4 */ - uint32_t psx_brA_BFC2AB08 = cpu->gpr[20]; - psx_taken_BFC2AB08 = ((int32_t)psx_brA_BFC2AB08 <= 0); - psx_delay_BFC2AB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2AB0C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B0Cu); -#endif - if (psx_delay_BFC2AB08) { - psx_delay_BFC2AB08 = 0; - if (psx_taken_BFC2AB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF4u); - goto label_BFC2ABF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B10u); - } -label_BFC2AB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC2AB10: 00162080 sll $a0, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[4] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00162080u, cpu->gpr[4], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000005u); -#endif - /* 0xBFC2AB14: 03C01021 addu $v0, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B14u); -#endif -label_BFC2AB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2AB18: 06610004 bgez $s3, 0xBFC2AB2C */ - uint32_t psx_brA_BFC2AB18 = cpu->gpr[19]; - psx_taken_BFC2AB18 = ((int32_t)psx_brA_BFC2AB18 >= 0); - psx_delay_BFC2AB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2AB1C: 3279003F andi $t9, $s3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] & 0x3Fu; - PGXP_ALU(0x3279003Fu, cpu->gpr[25], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042B1Cu); -#endif - if (psx_delay_BFC2AB18) { - psx_delay_BFC2AB18 = 0; - if (psx_taken_BFC2AB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B2Cu); - goto label_BFC2AB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B20u); - } -label_BFC2AB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2AB20: 13200002 beq $t9, $zero, 0xBFC2AB2C */ - uint32_t psx_brA_BFC2AB20 = cpu->gpr[25]; uint32_t psx_brB_BFC2AB20 = cpu->gpr[0]; - psx_taken_BFC2AB20 = (psx_brA_BFC2AB20 == psx_brB_BFC2AB20); - psx_delay_BFC2AB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042B24u); -#endif - if (psx_delay_BFC2AB20) { - psx_delay_BFC2AB20 = 0; - if (psx_taken_BFC2AB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B2Cu); - goto label_BFC2AB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B28u); - } -label_BFC2AB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2AB28: 2739FFC0 addiu $t9, $t9, -64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-64)); - PGXP_ALU(0x2739FFC0u, cpu->gpr[25], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B28u); -#endif -label_BFC2AB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC2AB2C: 0324082A slt $at, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0324082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AB30: 14200004 bne $at, $zero, 0xBFC2AB44 */ - uint32_t psx_brA_BFC2AB30 = cpu->gpr[1]; uint32_t psx_brB_BFC2AB30 = cpu->gpr[0]; - psx_taken_BFC2AB30 = (psx_brA_BFC2AB30 != psx_brB_BFC2AB30); - psx_delay_BFC2AB30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AB34: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042B34u); -#endif - if (psx_delay_BFC2AB30) { - psx_delay_BFC2AB30 = 0; - if (psx_taken_BFC2AB30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B44u); - goto label_BFC2AB44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B38u); - } -label_BFC2AB38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2AB38: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80020u); -#endif - /* 0xBFC2AB3C: 00059980 sll $s3, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[19] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00059980u, cpu->gpr[19], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AB40: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042B40u); -#endif -label_BFC2AB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AB44: 342120B8 ori $at, $at, 0x20B8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20B8u; - PGXP_ALU(0x342120B8u, cpu->gpr[1], _pgx1, 0x20B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2AB48: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080000u); -#endif - /* 0xBFC2AB4C: 0013C040 sll $t8, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[19] << 1u; - PGXP_ALU(0x0013C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004008u); -#endif - /* 0xBFC2AB50: 030E1821 addu $v1, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2AB54: 3C19FFFF lui $t9, 0xFFFF */ - cpu->gpr[25] = 0xFFFF0000u; - PGXP_ALU(0x3C19FFFFu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2AB58: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2AB5C: 3C0FFFFF lui $t7, 0xFFFF */ - cpu->gpr[15] = 0xFFFF0000u; - PGXP_ALU(0x3C0FFFFFu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B60u); -#endif - /* 0xBFC2AB60: 9739DFF6 lhu $t9, -8202($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042B60u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x9739DFF6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2AB64: 01E37821 addu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B64u); -#endif - /* 0xBFC2AB68: 95EFDFF4 lhu $t7, -8204($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042B68u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x95EFDFF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2AB6C: 0019C400 sll $t8, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 16u; - PGXP_ALU(0x0019C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2AB70: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2AB74: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2AB78: AC4E0040 sw $t6, 64($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042B78u); return; } g_debug_last_store_pc = 0x80042B78u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2AB7C: 26730002 addiu $s3, $s3, 2 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (2)); - PGXP_ALU(0x26730002u, cpu->gpr[19], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120000u); -#endif - /* 0xBFC2AB80: 1634FFE5 bne $s1, $s4, 0xBFC2AB18 */ - uint32_t psx_brA_BFC2AB80 = cpu->gpr[17]; uint32_t psx_brB_BFC2AB80 = cpu->gpr[20]; - psx_taken_BFC2AB80 = (psx_brA_BFC2AB80 != psx_brB_BFC2AB80); - psx_delay_BFC2AB80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2AB84: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B84u); -#endif - if (psx_delay_BFC2AB80) { - psx_delay_BFC2AB80 = 0; - if (psx_taken_BFC2AB80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B18u); - goto label_BFC2AB18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B88u); - } -label_BFC2AB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AB88: 1000001B beq $zero, $zero, 0xBFC2ABF8 */ - uint32_t psx_brA_BFC2AB88 = cpu->gpr[0]; uint32_t psx_brB_BFC2AB88 = cpu->gpr[0]; - psx_taken_BFC2AB88 = (psx_brA_BFC2AB88 == psx_brB_BFC2AB88); - psx_delay_BFC2AB88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2AB8C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B8Cu); -#endif - if (psx_delay_BFC2AB88) { - psx_delay_BFC2AB88 = 0; - if (psx_taken_BFC2AB88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF8u); - goto label_BFC2ABF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B90u); - } -label_BFC2AB90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC2AB90: 00141040 sll $v0, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[20] << 1u; - PGXP_ALU(0x00141040u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2AB94: 18400017 blez $v0, 0xBFC2ABF4 */ - uint32_t psx_brA_BFC2AB94 = cpu->gpr[2]; - psx_taken_BFC2AB94 = ((int32_t)psx_brA_BFC2AB94 <= 0); - psx_delay_BFC2AB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2AB98: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042B98u); -#endif - if (psx_delay_BFC2AB94) { - psx_delay_BFC2AB94 = 0; - if (psx_taken_BFC2AB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF4u); - goto label_BFC2ABF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042B9Cu); - } -label_BFC2AB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AB9C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2ABA0: 342120B8 ori $at, $at, 0x20B8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20B8u; - PGXP_ALU(0x342120B8u, cpu->gpr[1], _pgx1, 0x20B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000Au); -#endif - /* 0xBFC2ABA4: 03A11821 addu $v1, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[3] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A11821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BA4u); -#endif -label_BFC2ABA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ABA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ABA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2ABA8: 3C0FFFFF lui $t7, 0xFFFF */ - cpu->gpr[15] = 0xFFFF0000u; - PGXP_ALU(0x3C0FFFFFu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2ABAC: 01E37821 addu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BB0u); -#endif - /* 0xBFC2ABB0: 95EFDFF6 lhu $t7, -8202($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042BB0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x95EFDFF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80042BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2ABB4: 3C19FFFF lui $t9, 0xFFFF */ - cpu->gpr[25] = 0xFFFF0000u; - PGXP_ALU(0x3C19FFFFu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2ABB8: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2ABBC: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BC0u); -#endif - /* 0xBFC2ABC0: 9739DFF4 lhu $t9, -8204($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042BC0u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x9739DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2ABC4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2ABC8: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2ABCC: 06210002 bgez $s1, 0xBFC2ABD8 */ - uint32_t psx_brA_BFC2ABCC = cpu->gpr[17]; - psx_taken_BFC2ABCC = ((int32_t)psx_brA_BFC2ABCC >= 0); - psx_delay_BFC2ABCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC2ABD0: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BD0u); -#endif - if (psx_delay_BFC2ABCC) { - psx_delay_BFC2ABCC = 0; - if (psx_taken_BFC2ABCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BD8u); - goto label_BFC2ABD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BD4u); - } -label_BFC2ABD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ABD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ABD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2ABD4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BD4u); -#endif -label_BFC2ABD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ABD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ABD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2ABD8: 00017843 sra $t7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017843u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2ABDC: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2ABE0: 26310002 addiu $s1, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (2)); - PGXP_ALU(0x26310002u, cpu->gpr[17], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80042BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43000000u); -#endif - /* 0xBFC2ABE4: 03D9C021 addu $t8, $fp, $t9 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[30] + cpu->gpr[25]; - PGXP_ALU(0x03D9C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20006u); -#endif - /* 0xBFC2ABE8: 0222082A slt $at, $s1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0222082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ABEC: 1420FFEE bne $at, $zero, 0xBFC2ABA8 */ - uint32_t psx_brA_BFC2ABEC = cpu->gpr[1]; uint32_t psx_brB_BFC2ABEC = cpu->gpr[0]; - psx_taken_BFC2ABEC = (psx_brA_BFC2ABEC != psx_brB_BFC2ABEC); - psx_delay_BFC2ABEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2ABF0: AF0E0040 sw $t6, 64($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042BF0u); return; } g_debug_last_store_pc = 0x80042BF0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF0E0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042BF0u); -#endif - if (psx_delay_BFC2ABEC) { - psx_delay_BFC2ABEC = 0; - if (psx_taken_BFC2ABEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BA8u); - goto label_BFC2ABA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042BF4u); - } -label_BFC2ABF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ABF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ABF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2ABF4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042BF4u); -#endif -label_BFC2ABF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ABF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ABF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042BF8u); -#endif - /* 0xBFC2ABF8: 8FBF0054 lw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042BF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2ABFC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AC00: 342120B8 ori $at, $at, 0x20B8 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x20B8u; - PGXP_ALU(0x342120B8u, cpu->gpr[1], _pgx1, 0x20B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042C00u); -#endif - /* 0xBFC2AC04: 8FB00030 lw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C04u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C04u); -#endif - /* 0xBFC2AC08: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C08u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C08u); -#endif - /* 0xBFC2AC0C: 8FB20038 lw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C0Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042C10u); -#endif - /* 0xBFC2AC10: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C10u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C10u); -#endif - /* 0xBFC2AC14: 8FB40040 lw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C14u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C14u); -#endif - /* 0xBFC2AC18: 8FB50044 lw $s5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C18u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50044u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C18u); -#endif - /* 0xBFC2AC1C: 8FB60048 lw $s6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C1Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60048u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042C20u); -#endif - /* 0xBFC2AC20: 8FB7004C lw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C20u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C20u); -#endif - /* 0xBFC2AC24: 8FBE0050 lw $fp, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042C24u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0050u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80042C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2AC28: 03E00008 jr $ra */ - psx_delay_BFC2AC28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2AC2C: 03A1E821 addu $sp, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[29] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1E821u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042C2Cu); -#endif - if (psx_delay_BFC2AC28) { - psx_delay_BFC2AC28 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2ACD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2ACD0u); - int psx_delay_BFC2ACE4 = 0; - int psx_delay_BFC2AD00 = 0; - int psx_taken_BFC2AD00 = 0; - int psx_delay_BFC2AD1C = 0; - int psx_delay_BFC2AD30 = 0; - int psx_taken_BFC2AD30 = 0; - int psx_delay_BFC2AD38 = 0; - int psx_taken_BFC2AD38 = 0; - int psx_delay_BFC2AD40 = 0; - int psx_taken_BFC2AD40 = 0; - int psx_delay_BFC2AD4C = 0; - int psx_taken_BFC2AD4C = 0; - int psx_delay_BFC2AD54 = 0; - int psx_taken_BFC2AD54 = 0; - int psx_delay_BFC2AD5C = 0; - int psx_taken_BFC2AD5C = 0; - int psx_delay_BFC2AD68 = 0; - int psx_taken_BFC2AD68 = 0; - int psx_delay_BFC2AD70 = 0; - int psx_taken_BFC2AD70 = 0; - int psx_delay_BFC2AD78 = 0; - int psx_taken_BFC2AD78 = 0; - int psx_delay_BFC2AD84 = 0; - int psx_taken_BFC2AD84 = 0; - int psx_delay_BFC2AD8C = 0; - int psx_taken_BFC2AD8C = 0; - int psx_delay_BFC2AD94 = 0; - int psx_taken_BFC2AD94 = 0; - int psx_delay_BFC2ADA0 = 0; - int psx_taken_BFC2ADA0 = 0; - int psx_delay_BFC2ADA8 = 0; - int psx_taken_BFC2ADA8 = 0; - int psx_delay_BFC2ADB0 = 0; - int psx_taken_BFC2ADB0 = 0; - int psx_delay_BFC2ADBC = 0; - int psx_taken_BFC2ADBC = 0; - int psx_delay_BFC2ADC4 = 0; - int psx_taken_BFC2ADC4 = 0; - int psx_delay_BFC2ADCC = 0; - int psx_taken_BFC2ADCC = 0; - int psx_delay_BFC2ADD8 = 0; - int psx_taken_BFC2ADD8 = 0; - int psx_delay_BFC2ADE4 = 0; - int psx_taken_BFC2ADE4 = 0; - int psx_delay_BFC2AE10 = 0; - int psx_taken_BFC2AE10 = 0; - int psx_delay_BFC2AE24 = 0; - int psx_taken_BFC2AE24 = 0; - int psx_delay_BFC2AE2C = 0; - int psx_taken_BFC2AE2C = 0; - int psx_delay_BFC2AE34 = 0; - int psx_taken_BFC2AE34 = 0; - int psx_delay_BFC2AE40 = 0; - int psx_taken_BFC2AE40 = 0; - int psx_delay_BFC2AE48 = 0; - int psx_taken_BFC2AE48 = 0; - int psx_delay_BFC2AE50 = 0; - int psx_taken_BFC2AE50 = 0; - int psx_delay_BFC2AE5C = 0; - int psx_taken_BFC2AE5C = 0; - int psx_delay_BFC2AE64 = 0; - int psx_taken_BFC2AE64 = 0; - int psx_delay_BFC2AE6C = 0; - int psx_taken_BFC2AE6C = 0; - int psx_delay_BFC2AE78 = 0; - int psx_taken_BFC2AE78 = 0; - int psx_delay_BFC2AE84 = 0; - int psx_taken_BFC2AE84 = 0; - int psx_delay_BFC2AE90 = 0; - int psx_taken_BFC2AE90 = 0; - int psx_delay_BFC2AE9C = 0; - int psx_taken_BFC2AE9C = 0; - int psx_delay_BFC2AEC8 = 0; - int psx_taken_BFC2AEC8 = 0; - int psx_delay_BFC2AEDC = 0; - int psx_taken_BFC2AEDC = 0; - int psx_delay_BFC2AEE4 = 0; - int psx_taken_BFC2AEE4 = 0; - int psx_delay_BFC2AEEC = 0; - int psx_taken_BFC2AEEC = 0; - int psx_delay_BFC2AEF8 = 0; - int psx_taken_BFC2AEF8 = 0; - int psx_delay_BFC2AF00 = 0; - int psx_taken_BFC2AF00 = 0; - int psx_delay_BFC2AF08 = 0; - int psx_taken_BFC2AF08 = 0; - int psx_delay_BFC2AF14 = 0; - int psx_taken_BFC2AF14 = 0; - int psx_delay_BFC2AF1C = 0; - int psx_taken_BFC2AF1C = 0; - int psx_delay_BFC2AF24 = 0; - int psx_taken_BFC2AF24 = 0; - int psx_delay_BFC2AF30 = 0; - int psx_taken_BFC2AF30 = 0; - int psx_delay_BFC2AF3C = 0; - int psx_taken_BFC2AF3C = 0; - int psx_delay_BFC2AF48 = 0; - int psx_taken_BFC2AF48 = 0; - int psx_delay_BFC2AF54 = 0; - int psx_taken_BFC2AF54 = 0; - int psx_delay_BFC2AF80 = 0; - int psx_taken_BFC2AF80 = 0; - int psx_delay_BFC2AF94 = 0; - int psx_taken_BFC2AF94 = 0; - int psx_delay_BFC2AF9C = 0; - int psx_taken_BFC2AF9C = 0; - int psx_delay_BFC2AFA4 = 0; - int psx_taken_BFC2AFA4 = 0; - int psx_delay_BFC2AFB0 = 0; - int psx_taken_BFC2AFB0 = 0; - int psx_delay_BFC2AFB8 = 0; - int psx_taken_BFC2AFB8 = 0; - int psx_delay_BFC2AFC0 = 0; - int psx_taken_BFC2AFC0 = 0; - int psx_delay_BFC2AFCC = 0; - int psx_taken_BFC2AFCC = 0; - int psx_delay_BFC2AFD4 = 0; - int psx_taken_BFC2AFD4 = 0; - int psx_delay_BFC2AFDC = 0; - int psx_taken_BFC2AFDC = 0; - int psx_delay_BFC2AFE8 = 0; - int psx_taken_BFC2AFE8 = 0; - int psx_delay_BFC2AFF4 = 0; - int psx_taken_BFC2AFF4 = 0; - int psx_delay_BFC2B000 = 0; - int psx_taken_BFC2B000 = 0; - int psx_delay_BFC2B00C = 0; - int psx_taken_BFC2B00C = 0; - int psx_delay_BFC2B038 = 0; - int psx_taken_BFC2B038 = 0; - int psx_delay_BFC2B04C = 0; - int psx_taken_BFC2B04C = 0; - int psx_delay_BFC2B054 = 0; - int psx_taken_BFC2B054 = 0; - int psx_delay_BFC2B090 = 0; - int psx_taken_BFC2B090 = 0; - int psx_delay_BFC2B0A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2ACECu: goto label_BFC2ACEC; - case 0xBFC2AD08u: goto label_BFC2AD08; - case 0xBFC2AD24u: goto label_BFC2AD24; - case 0xBFC2AD38u: goto label_BFC2AD38; - case 0xBFC2AD40u: goto label_BFC2AD40; - case 0xBFC2AD48u: goto label_BFC2AD48; - case 0xBFC2AD4Cu: goto label_BFC2AD4C; - case 0xBFC2AD54u: goto label_BFC2AD54; - case 0xBFC2AD5Cu: goto label_BFC2AD5C; - case 0xBFC2AD64u: goto label_BFC2AD64; - case 0xBFC2AD68u: goto label_BFC2AD68; - case 0xBFC2AD70u: goto label_BFC2AD70; - case 0xBFC2AD78u: goto label_BFC2AD78; - case 0xBFC2AD80u: goto label_BFC2AD80; - case 0xBFC2AD84u: goto label_BFC2AD84; - case 0xBFC2AD8Cu: goto label_BFC2AD8C; - case 0xBFC2AD94u: goto label_BFC2AD94; - case 0xBFC2AD9Cu: goto label_BFC2AD9C; - case 0xBFC2ADA0u: goto label_BFC2ADA0; - case 0xBFC2ADA8u: goto label_BFC2ADA8; - case 0xBFC2ADB0u: goto label_BFC2ADB0; - case 0xBFC2ADB8u: goto label_BFC2ADB8; - case 0xBFC2ADBCu: goto label_BFC2ADBC; - case 0xBFC2ADC4u: goto label_BFC2ADC4; - case 0xBFC2ADCCu: goto label_BFC2ADCC; - case 0xBFC2ADD4u: goto label_BFC2ADD4; - case 0xBFC2ADD8u: goto label_BFC2ADD8; - case 0xBFC2ADE0u: goto label_BFC2ADE0; - case 0xBFC2ADECu: goto label_BFC2ADEC; - case 0xBFC2ADF0u: goto label_BFC2ADF0; - case 0xBFC2AE18u: goto label_BFC2AE18; - case 0xBFC2AE2Cu: goto label_BFC2AE2C; - case 0xBFC2AE34u: goto label_BFC2AE34; - case 0xBFC2AE3Cu: goto label_BFC2AE3C; - case 0xBFC2AE40u: goto label_BFC2AE40; - case 0xBFC2AE48u: goto label_BFC2AE48; - case 0xBFC2AE50u: goto label_BFC2AE50; - case 0xBFC2AE58u: goto label_BFC2AE58; - case 0xBFC2AE5Cu: goto label_BFC2AE5C; - case 0xBFC2AE64u: goto label_BFC2AE64; - case 0xBFC2AE6Cu: goto label_BFC2AE6C; - case 0xBFC2AE74u: goto label_BFC2AE74; - case 0xBFC2AE78u: goto label_BFC2AE78; - case 0xBFC2AE80u: goto label_BFC2AE80; - case 0xBFC2AE8Cu: goto label_BFC2AE8C; - case 0xBFC2AE90u: goto label_BFC2AE90; - case 0xBFC2AE98u: goto label_BFC2AE98; - case 0xBFC2AEA4u: goto label_BFC2AEA4; - case 0xBFC2AEA8u: goto label_BFC2AEA8; - case 0xBFC2AED0u: goto label_BFC2AED0; - case 0xBFC2AEE4u: goto label_BFC2AEE4; - case 0xBFC2AEECu: goto label_BFC2AEEC; - case 0xBFC2AEF4u: goto label_BFC2AEF4; - case 0xBFC2AEF8u: goto label_BFC2AEF8; - case 0xBFC2AF00u: goto label_BFC2AF00; - case 0xBFC2AF08u: goto label_BFC2AF08; - case 0xBFC2AF10u: goto label_BFC2AF10; - case 0xBFC2AF14u: goto label_BFC2AF14; - case 0xBFC2AF1Cu: goto label_BFC2AF1C; - case 0xBFC2AF24u: goto label_BFC2AF24; - case 0xBFC2AF2Cu: goto label_BFC2AF2C; - case 0xBFC2AF30u: goto label_BFC2AF30; - case 0xBFC2AF38u: goto label_BFC2AF38; - case 0xBFC2AF44u: goto label_BFC2AF44; - case 0xBFC2AF48u: goto label_BFC2AF48; - case 0xBFC2AF50u: goto label_BFC2AF50; - case 0xBFC2AF5Cu: goto label_BFC2AF5C; - case 0xBFC2AF60u: goto label_BFC2AF60; - case 0xBFC2AF88u: goto label_BFC2AF88; - case 0xBFC2AF9Cu: goto label_BFC2AF9C; - case 0xBFC2AFA4u: goto label_BFC2AFA4; - case 0xBFC2AFACu: goto label_BFC2AFAC; - case 0xBFC2AFB0u: goto label_BFC2AFB0; - case 0xBFC2AFB8u: goto label_BFC2AFB8; - case 0xBFC2AFC0u: goto label_BFC2AFC0; - case 0xBFC2AFC8u: goto label_BFC2AFC8; - case 0xBFC2AFCCu: goto label_BFC2AFCC; - case 0xBFC2AFD4u: goto label_BFC2AFD4; - case 0xBFC2AFDCu: goto label_BFC2AFDC; - case 0xBFC2AFE4u: goto label_BFC2AFE4; - case 0xBFC2AFE8u: goto label_BFC2AFE8; - case 0xBFC2AFF0u: goto label_BFC2AFF0; - case 0xBFC2AFFCu: goto label_BFC2AFFC; - case 0xBFC2B000u: goto label_BFC2B000; - case 0xBFC2B008u: goto label_BFC2B008; - case 0xBFC2B014u: goto label_BFC2B014; - case 0xBFC2B018u: goto label_BFC2B018; - case 0xBFC2B040u: goto label_BFC2B040; - case 0xBFC2B054u: goto label_BFC2B054; - case 0xBFC2B05Cu: goto label_BFC2B05C; - case 0xBFC2B060u: goto label_BFC2B060; - case 0xBFC2B098u: goto label_BFC2B098; - default: break; - } - } -label_BFC2ACD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ACD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2ACD0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2ACD4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042CD4u); return; } g_debug_last_store_pc = 0x80042CD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80042CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2ACD8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042CD8u); return; } g_debug_last_store_pc = 0x80042CD8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80042CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2ACDC: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80042CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2ACE0: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80042CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2ACE4: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x80042CECu; /* jal link before delay slot */ - psx_delay_BFC2ACE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2ACE8: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80042CE8u); -#endif - if (psx_delay_BFC2ACE4) { - psx_delay_BFC2ACE4 = 0; - cpu->gpr[31] = 0x80042CECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2ACEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ACECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ACECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042CECu); -#endif - /* 0xBFC2ACEC: 93A50021 lbu $a1, 33($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 33; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (33)), 5, 0x20000000u); - PGXP_LOAD(0x93A50021u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80042CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ACF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2ACF4: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2ACF8: 246EFF7F addiu $t6, $v1, -129 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[3] + (-129)); - PGXP_ALU(0x246EFF7Fu, cpu->gpr[14], _pgx1, 0xFFFFFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2ACFC: 2DC10004 sltiu $at, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2DC10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80042CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD00: 102000CF beq $at, $zero, 0xBFC2B040 */ - uint32_t psx_brA_BFC2AD00 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD00 = cpu->gpr[0]; - psx_taken_BFC2AD00 = (psx_brA_BFC2AD00 == psx_brB_BFC2AD00); - psx_delay_BFC2AD00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042D04u); -#endif - if (psx_delay_BFC2AD00) { - psx_delay_BFC2AD00 = 0; - if (psx_taken_BFC2AD00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043040u); - goto label_BFC2B040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D08u); - } -label_BFC2AD08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2AD08: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2AD0C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2AD10: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042D10u); -#endif - /* 0xBFC2AD14: 8C2EAD90 lw $t6, -21104($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80042D14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EAD90u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2AD1C: 01C00008 jr $t6 */ - psx_delay_BFC2AD1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042D20u); -#endif - if (psx_delay_BFC2AD1C) { - psx_delay_BFC2AD1C = 0; - /* jump table at 0x8005AD90, 4 entries */ - switch (cpu->gpr[14]) { - case 0x80042D24u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D24u); - goto label_BFC2AD24; - case 0x80042E18u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E18u); - goto label_BFC2AE18; - case 0x80042ED0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042ED0u); - goto label_BFC2AED0; - case 0x80042F88u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F88u); - goto label_BFC2AF88; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } - } -label_BFC2AD24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D24u); -#endif - /* 0xBFC2AD24: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD2C: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD30: 14200005 bne $at, $zero, 0xBFC2AD48 */ - uint32_t psx_brA_BFC2AD30 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD30 = cpu->gpr[0]; - psx_taken_BFC2AD30 = (psx_brA_BFC2AD30 != psx_brB_BFC2AD30); - psx_delay_BFC2AD30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD34: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042D34u); -#endif - if (psx_delay_BFC2AD30) { - psx_delay_BFC2AD30 = 0; - if (psx_taken_BFC2AD30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D48u); - goto label_BFC2AD48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D38u); - } -label_BFC2AD38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD38: 10200004 beq $at, $zero, 0xBFC2AD4C */ - uint32_t psx_brA_BFC2AD38 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD38 = cpu->gpr[0]; - psx_taken_BFC2AD38 = (psx_brA_BFC2AD38 == psx_brB_BFC2AD38); - psx_delay_BFC2AD38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD3C: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D3Cu); -#endif - if (psx_delay_BFC2AD38) { - psx_delay_BFC2AD38 = 0; - if (psx_taken_BFC2AD38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D4Cu); - goto label_BFC2AD4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D40u); - } -label_BFC2AD40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD40: 1000002B beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2AD40 = cpu->gpr[0]; uint32_t psx_brB_BFC2AD40 = cpu->gpr[0]; - psx_taken_BFC2AD40 = (psx_brA_BFC2AD40 == psx_brB_BFC2AD40); - psx_delay_BFC2AD40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AD44: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042D44u); -#endif - if (psx_delay_BFC2AD40) { - psx_delay_BFC2AD40 = 0; - if (psx_taken_BFC2AD40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D48u); - } -label_BFC2AD48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD48: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D48u); -#endif -label_BFC2AD4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD4C: 14200005 bne $at, $zero, 0xBFC2AD64 */ - uint32_t psx_brA_BFC2AD4C = cpu->gpr[1]; uint32_t psx_brB_BFC2AD4C = cpu->gpr[0]; - psx_taken_BFC2AD4C = (psx_brA_BFC2AD4C != psx_brB_BFC2AD4C); - psx_delay_BFC2AD4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD50: 2C4100AD sltiu $at, $v0, 173 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000ADu ? 1 : 0); - PGXP_ALU(0x2C4100ADu, cpu->gpr[1], _pgx1, 0x00ADu); } -#ifdef PSX_COSIM - cosim_instr(0x80042D50u); -#endif - if (psx_delay_BFC2AD4C) { - psx_delay_BFC2AD4C = 0; - if (psx_taken_BFC2AD4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D64u); - goto label_BFC2AD64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D54u); - } -label_BFC2AD54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD54: 10200004 beq $at, $zero, 0xBFC2AD68 */ - uint32_t psx_brA_BFC2AD54 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD54 = cpu->gpr[0]; - psx_taken_BFC2AD54 = (psx_brA_BFC2AD54 == psx_brB_BFC2AD54); - psx_delay_BFC2AD54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD58: 2C4100B8 sltiu $at, $v0, 184 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0); - PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D58u); -#endif - if (psx_delay_BFC2AD54) { - psx_delay_BFC2AD54 = 0; - if (psx_taken_BFC2AD54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D68u); - goto label_BFC2AD68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D5Cu); - } -label_BFC2AD5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD5C: 10000024 beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2AD5C = cpu->gpr[0]; uint32_t psx_brB_BFC2AD5C = cpu->gpr[0]; - psx_taken_BFC2AD5C = (psx_brA_BFC2AD5C == psx_brB_BFC2AD5C); - psx_delay_BFC2AD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AD60: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D60u); -#endif - if (psx_delay_BFC2AD5C) { - psx_delay_BFC2AD5C = 0; - if (psx_taken_BFC2AD5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D64u); - } -label_BFC2AD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD64: 2C4100B8 sltiu $at, $v0, 184 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B8u ? 1 : 0); - PGXP_ALU(0x2C4100B8u, cpu->gpr[1], _pgx1, 0x00B8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D64u); -#endif -label_BFC2AD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD68: 14200005 bne $at, $zero, 0xBFC2AD80 */ - uint32_t psx_brA_BFC2AD68 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD68 = cpu->gpr[0]; - psx_taken_BFC2AD68 = (psx_brA_BFC2AD68 != psx_brB_BFC2AD68); - psx_delay_BFC2AD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD6C: 2C4100C0 sltiu $at, $v0, 192 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C0u ? 1 : 0); - PGXP_ALU(0x2C4100C0u, cpu->gpr[1], _pgx1, 0x00C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D6Cu); -#endif - if (psx_delay_BFC2AD68) { - psx_delay_BFC2AD68 = 0; - if (psx_taken_BFC2AD68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D80u); - goto label_BFC2AD80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D70u); - } -label_BFC2AD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD70: 10200004 beq $at, $zero, 0xBFC2AD84 */ - uint32_t psx_brA_BFC2AD70 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD70 = cpu->gpr[0]; - psx_taken_BFC2AD70 = (psx_brA_BFC2AD70 == psx_brB_BFC2AD70); - psx_delay_BFC2AD70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD74: 2C4100C8 sltiu $at, $v0, 200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0); - PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D74u); -#endif - if (psx_delay_BFC2AD70) { - psx_delay_BFC2AD70 = 0; - if (psx_taken_BFC2AD70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D84u); - goto label_BFC2AD84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D78u); - } -label_BFC2AD78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD78: 1000001D beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2AD78 = cpu->gpr[0]; uint32_t psx_brB_BFC2AD78 = cpu->gpr[0]; - psx_taken_BFC2AD78 = (psx_brA_BFC2AD78 == psx_brB_BFC2AD78); - psx_delay_BFC2AD78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AD7C: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D7Cu); -#endif - if (psx_delay_BFC2AD78) { - psx_delay_BFC2AD78 = 0; - if (psx_taken_BFC2AD78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D80u); - } -label_BFC2AD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD80: 2C4100C8 sltiu $at, $v0, 200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000C8u ? 1 : 0); - PGXP_ALU(0x2C4100C8u, cpu->gpr[1], _pgx1, 0x00C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D80u); -#endif -label_BFC2AD84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD84: 14200005 bne $at, $zero, 0xBFC2AD9C */ - uint32_t psx_brA_BFC2AD84 = cpu->gpr[1]; uint32_t psx_brB_BFC2AD84 = cpu->gpr[0]; - psx_taken_BFC2AD84 = (psx_brA_BFC2AD84 != psx_brB_BFC2AD84); - psx_delay_BFC2AD84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD88: 2C4100CF sltiu $at, $v0, 207 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000CFu ? 1 : 0); - PGXP_ALU(0x2C4100CFu, cpu->gpr[1], _pgx1, 0x00CFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042D88u); -#endif - if (psx_delay_BFC2AD84) { - psx_delay_BFC2AD84 = 0; - if (psx_taken_BFC2AD84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D9Cu); - goto label_BFC2AD9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D8Cu); - } -label_BFC2AD8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AD8C: 10200004 beq $at, $zero, 0xBFC2ADA0 */ - uint32_t psx_brA_BFC2AD8C = cpu->gpr[1]; uint32_t psx_brB_BFC2AD8C = cpu->gpr[0]; - psx_taken_BFC2AD8C = (psx_brA_BFC2AD8C == psx_brB_BFC2AD8C); - psx_delay_BFC2AD8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD90: 2C4100DA sltiu $at, $v0, 218 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0); - PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); } -#ifdef PSX_COSIM - cosim_instr(0x80042D90u); -#endif - if (psx_delay_BFC2AD8C) { - psx_delay_BFC2AD8C = 0; - if (psx_taken_BFC2AD8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DA0u); - goto label_BFC2ADA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D94u); - } -label_BFC2AD94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AD94: 10000016 beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2AD94 = cpu->gpr[0]; uint32_t psx_brB_BFC2AD94 = cpu->gpr[0]; - psx_taken_BFC2AD94 = (psx_brA_BFC2AD94 == psx_brB_BFC2AD94); - psx_delay_BFC2AD94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AD98: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80042D98u); -#endif - if (psx_delay_BFC2AD94) { - psx_delay_BFC2AD94 = 0; - if (psx_taken_BFC2AD94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042D9Cu); - } -label_BFC2AD9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AD9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AD9C: 2C4100DA sltiu $at, $v0, 218 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000DAu ? 1 : 0); - PGXP_ALU(0x2C4100DAu, cpu->gpr[1], _pgx1, 0x00DAu); } -#ifdef PSX_COSIM - cosim_instr(0x80042D9Cu); -#endif -label_BFC2ADA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADA0: 14200005 bne $at, $zero, 0xBFC2ADB8 */ - uint32_t psx_brA_BFC2ADA0 = cpu->gpr[1]; uint32_t psx_brB_BFC2ADA0 = cpu->gpr[0]; - psx_taken_BFC2ADA0 = (psx_brA_BFC2ADA0 != psx_brB_BFC2ADA0); - psx_delay_BFC2ADA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2ADA4: 2C4100E9 sltiu $at, $v0, 233 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000E9u ? 1 : 0); - PGXP_ALU(0x2C4100E9u, cpu->gpr[1], _pgx1, 0x00E9u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DA4u); -#endif - if (psx_delay_BFC2ADA0) { - psx_delay_BFC2ADA0 = 0; - if (psx_taken_BFC2ADA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DB8u); - goto label_BFC2ADB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DA8u); - } -label_BFC2ADA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADA8: 10200004 beq $at, $zero, 0xBFC2ADBC */ - uint32_t psx_brA_BFC2ADA8 = cpu->gpr[1]; uint32_t psx_brB_BFC2ADA8 = cpu->gpr[0]; - psx_taken_BFC2ADA8 = (psx_brA_BFC2ADA8 == psx_brB_BFC2ADA8); - psx_delay_BFC2ADA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2ADAC: 2C4100F0 sltiu $at, $v0, 240 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0); - PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DACu); -#endif - if (psx_delay_BFC2ADA8) { - psx_delay_BFC2ADA8 = 0; - if (psx_taken_BFC2ADA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DBCu); - goto label_BFC2ADBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DB0u); - } -label_BFC2ADB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ADB0: 1000000F beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2ADB0 = cpu->gpr[0]; uint32_t psx_brB_BFC2ADB0 = cpu->gpr[0]; - psx_taken_BFC2ADB0 = (psx_brA_BFC2ADB0 == psx_brB_BFC2ADB0); - psx_delay_BFC2ADB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2ADB4: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DB4u); -#endif - if (psx_delay_BFC2ADB0) { - psx_delay_BFC2ADB0 = 0; - if (psx_taken_BFC2ADB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DB8u); - } -label_BFC2ADB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2ADB8: 2C4100F0 sltiu $at, $v0, 240 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F0u ? 1 : 0); - PGXP_ALU(0x2C4100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DB8u); -#endif -label_BFC2ADBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADBC: 14200005 bne $at, $zero, 0xBFC2ADD4 */ - uint32_t psx_brA_BFC2ADBC = cpu->gpr[1]; uint32_t psx_brB_BFC2ADBC = cpu->gpr[0]; - psx_taken_BFC2ADBC = (psx_brA_BFC2ADBC != psx_brB_BFC2ADBC); - psx_delay_BFC2ADBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2ADC0: 2C4100F8 sltiu $at, $v0, 248 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F8u ? 1 : 0); - PGXP_ALU(0x2C4100F8u, cpu->gpr[1], _pgx1, 0x00F8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DC0u); -#endif - if (psx_delay_BFC2ADBC) { - psx_delay_BFC2ADBC = 0; - if (psx_taken_BFC2ADBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DD4u); - goto label_BFC2ADD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DC4u); - } -label_BFC2ADC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADC4: 10200004 beq $at, $zero, 0xBFC2ADD8 */ - uint32_t psx_brA_BFC2ADC4 = cpu->gpr[1]; uint32_t psx_brB_BFC2ADC4 = cpu->gpr[0]; - psx_taken_BFC2ADC4 = (psx_brA_BFC2ADC4 == psx_brB_BFC2ADC4); - psx_delay_BFC2ADC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADC8: 240100FC addiu $at, $zero, 252 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (252)); - PGXP_ALU(0x240100FCu, cpu->gpr[1], _pgx1, 0x000000FCu); } -#ifdef PSX_COSIM - cosim_instr(0x80042DC8u); -#endif - if (psx_delay_BFC2ADC4) { - psx_delay_BFC2ADC4 = 0; - if (psx_taken_BFC2ADC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DD8u); - goto label_BFC2ADD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DCCu); - } -label_BFC2ADCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ADCC: 10000008 beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2ADCC = cpu->gpr[0]; uint32_t psx_brB_BFC2ADCC = cpu->gpr[0]; - psx_taken_BFC2ADCC = (psx_brA_BFC2ADCC == psx_brB_BFC2ADCC); - psx_delay_BFC2ADCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2ADD0: 24030005 addiu $v1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24030005u, cpu->gpr[3], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DD0u); -#endif - if (psx_delay_BFC2ADCC) { - psx_delay_BFC2ADCC = 0; - if (psx_taken_BFC2ADCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DD4u); - } -label_BFC2ADD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2ADD4: 240100FC addiu $at, $zero, 252 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (252)); - PGXP_ALU(0x240100FCu, cpu->gpr[1], _pgx1, 0x000000FCu); } -#ifdef PSX_COSIM - cosim_instr(0x80042DD4u); -#endif -label_BFC2ADD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2ADD8: 10410005 beq $v0, $at, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2ADD8 = cpu->gpr[2]; uint32_t psx_brB_BFC2ADD8 = cpu->gpr[1]; - psx_taken_BFC2ADD8 = (psx_brA_BFC2ADD8 == psx_brB_BFC2ADD8); - psx_delay_BFC2ADD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2ADDC: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DDCu); -#endif - if (psx_delay_BFC2ADD8) { - psx_delay_BFC2ADD8 = 0; - if (psx_taken_BFC2ADD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DE0u); - } -label_BFC2ADE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DE0u); -#endif - /* 0xBFC2ADE0: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ADE4: 10000002 beq $zero, $zero, 0xBFC2ADF0 */ - uint32_t psx_brA_BFC2ADE4 = cpu->gpr[0]; uint32_t psx_brB_BFC2ADE4 = cpu->gpr[0]; - psx_taken_BFC2ADE4 = (psx_brA_BFC2ADE4 == psx_brB_BFC2ADE4); - psx_delay_BFC2ADE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ADE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042DE8u); -#endif - if (psx_delay_BFC2ADE4) { - psx_delay_BFC2ADE4 = 0; - if (psx_taken_BFC2ADE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DF0u); - goto label_BFC2ADF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042DECu); - } -label_BFC2ADEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2ADEC: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DECu); -#endif -label_BFC2ADF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ADF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ADF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2ADF0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2ADF4: 271880C8 addiu $t8, $t8, -32568 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-32568)); - PGXP_ALU(0x271880C8u, cpu->gpr[24], _pgx1, 0xFFFF80C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2ADF8: 00037880 sll $t7, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC2ADFC: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E00u); -#endif - /* 0xBFC2AE00: 94480000 lhu $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042E00u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E00u); -#endif - /* 0xBFC2AE04: 97B90028 lhu $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042E04u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x97B90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E04u); -#endif - /* 0xBFC2AE08: 944A0002 lhu $t2, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042E08u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x944A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC2AE0C: 03284823 subu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x03284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE10: 100000A1 beq $zero, $zero, 0xBFC2B098 */ - uint32_t psx_brA_BFC2AE10 = cpu->gpr[0]; uint32_t psx_brB_BFC2AE10 = cpu->gpr[0]; - psx_taken_BFC2AE10 = (psx_brA_BFC2AE10 == psx_brB_BFC2AE10); - psx_delay_BFC2AE10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC2AE14: 012A2021 addu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042E14u); -#endif - if (psx_delay_BFC2AE10) { - psx_delay_BFC2AE10 = 0; - if (psx_taken_BFC2AE10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - goto label_BFC2B098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E18u); - } -label_BFC2AE18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E18u); -#endif - /* 0xBFC2AE18: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE20: 2C41004F sltiu $at, $v0, 79 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000004Fu ? 1 : 0); - PGXP_ALU(0x2C41004Fu, cpu->gpr[1], _pgx1, 0x004Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE24: 14200005 bne $at, $zero, 0xBFC2AE3C */ - uint32_t psx_brA_BFC2AE24 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE24 = cpu->gpr[0]; - psx_taken_BFC2AE24 = (psx_brA_BFC2AE24 != psx_brB_BFC2AE24); - psx_delay_BFC2AE24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE28: 2C410059 sltiu $at, $v0, 89 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000059u ? 1 : 0); - PGXP_ALU(0x2C410059u, cpu->gpr[1], _pgx1, 0x0059u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E28u); -#endif - if (psx_delay_BFC2AE24) { - psx_delay_BFC2AE24 = 0; - if (psx_taken_BFC2AE24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E3Cu); - goto label_BFC2AE3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E2Cu); - } -label_BFC2AE2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE2C: 10200004 beq $at, $zero, 0xBFC2AE40 */ - uint32_t psx_brA_BFC2AE2C = cpu->gpr[1]; uint32_t psx_brB_BFC2AE2C = cpu->gpr[0]; - psx_taken_BFC2AE2C = (psx_brA_BFC2AE2C == psx_brB_BFC2AE2C); - psx_delay_BFC2AE2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE30: 2C410060 sltiu $at, $v0, 96 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0); - PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E30u); -#endif - if (psx_delay_BFC2AE2C) { - psx_delay_BFC2AE2C = 0; - if (psx_taken_BFC2AE2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E40u); - goto label_BFC2AE40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E34u); - } -label_BFC2AE34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE34: 1000001C beq $zero, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE34 = cpu->gpr[0]; uint32_t psx_brB_BFC2AE34 = cpu->gpr[0]; - psx_taken_BFC2AE34 = (psx_brA_BFC2AE34 == psx_brB_BFC2AE34); - psx_delay_BFC2AE34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AE38: 24030007 addiu $v1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24030007u, cpu->gpr[3], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E38u); -#endif - if (psx_delay_BFC2AE34) { - psx_delay_BFC2AE34 = 0; - if (psx_taken_BFC2AE34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E3Cu); - } -label_BFC2AE3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE3C: 2C410060 sltiu $at, $v0, 96 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000060u ? 1 : 0); - PGXP_ALU(0x2C410060u, cpu->gpr[1], _pgx1, 0x0060u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E3Cu); -#endif -label_BFC2AE40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE40: 14200005 bne $at, $zero, 0xBFC2AE58 */ - uint32_t psx_brA_BFC2AE40 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE40 = cpu->gpr[0]; - psx_taken_BFC2AE40 = (psx_brA_BFC2AE40 != psx_brB_BFC2AE40); - psx_delay_BFC2AE40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE44: 2C41007A sltiu $at, $v0, 122 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Au ? 1 : 0); - PGXP_ALU(0x2C41007Au, cpu->gpr[1], _pgx1, 0x007Au); } -#ifdef PSX_COSIM - cosim_instr(0x80042E44u); -#endif - if (psx_delay_BFC2AE40) { - psx_delay_BFC2AE40 = 0; - if (psx_taken_BFC2AE40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E58u); - goto label_BFC2AE58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E48u); - } -label_BFC2AE48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE48: 10200004 beq $at, $zero, 0xBFC2AE5C */ - uint32_t psx_brA_BFC2AE48 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE48 = cpu->gpr[0]; - psx_taken_BFC2AE48 = (psx_brA_BFC2AE48 == psx_brB_BFC2AE48); - psx_delay_BFC2AE48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE4C: 2C410081 sltiu $at, $v0, 129 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E4Cu); -#endif - if (psx_delay_BFC2AE48) { - psx_delay_BFC2AE48 = 0; - if (psx_taken_BFC2AE48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E5Cu); - goto label_BFC2AE5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E50u); - } -label_BFC2AE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE50: 10000015 beq $zero, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE50 = cpu->gpr[0]; uint32_t psx_brB_BFC2AE50 = cpu->gpr[0]; - psx_taken_BFC2AE50 = (psx_brA_BFC2AE50 == psx_brB_BFC2AE50); - psx_delay_BFC2AE50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AE54: 24030008 addiu $v1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24030008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E54u); -#endif - if (psx_delay_BFC2AE50) { - psx_delay_BFC2AE50 = 0; - if (psx_taken_BFC2AE50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E58u); - } -label_BFC2AE58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE58: 2C410081 sltiu $at, $v0, 129 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C410081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E58u); -#endif -label_BFC2AE5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE5C: 14200005 bne $at, $zero, 0xBFC2AE74 */ - uint32_t psx_brA_BFC2AE5C = cpu->gpr[1]; uint32_t psx_brB_BFC2AE5C = cpu->gpr[0]; - psx_taken_BFC2AE5C = (psx_brA_BFC2AE5C != psx_brB_BFC2AE5C); - psx_delay_BFC2AE5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE60: 2C41009B sltiu $at, $v0, 155 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Bu ? 1 : 0); - PGXP_ALU(0x2C41009Bu, cpu->gpr[1], _pgx1, 0x009Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80042E60u); -#endif - if (psx_delay_BFC2AE5C) { - psx_delay_BFC2AE5C = 0; - if (psx_taken_BFC2AE5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E74u); - goto label_BFC2AE74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E64u); - } -label_BFC2AE64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE64: 10200004 beq $at, $zero, 0xBFC2AE78 */ - uint32_t psx_brA_BFC2AE64 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE64 = cpu->gpr[0]; - psx_taken_BFC2AE64 = (psx_brA_BFC2AE64 == psx_brB_BFC2AE64); - psx_delay_BFC2AE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE68: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042E68u); -#endif - if (psx_delay_BFC2AE64) { - psx_delay_BFC2AE64 = 0; - if (psx_taken_BFC2AE64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E78u); - goto label_BFC2AE78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E6Cu); - } -label_BFC2AE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE6C: 1000000E beq $zero, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE6C = cpu->gpr[0]; uint32_t psx_brB_BFC2AE6C = cpu->gpr[0]; - psx_taken_BFC2AE6C = (psx_brA_BFC2AE6C == psx_brB_BFC2AE6C); - psx_delay_BFC2AE6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AE70: 24030009 addiu $v1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24030009u, cpu->gpr[3], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E70u); -#endif - if (psx_delay_BFC2AE6C) { - psx_delay_BFC2AE6C = 0; - if (psx_taken_BFC2AE6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E74u); - } -label_BFC2AE74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE74: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042E74u); -#endif -label_BFC2AE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE78: 10200005 beq $at, $zero, 0xBFC2AE90 */ - uint32_t psx_brA_BFC2AE78 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE78 = cpu->gpr[0]; - psx_taken_BFC2AE78 = (psx_brA_BFC2AE78 == psx_brB_BFC2AE78); - psx_delay_BFC2AE78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE7C: 2C4100F2 sltiu $at, $v0, 242 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0); - PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E7Cu); -#endif - if (psx_delay_BFC2AE78) { - psx_delay_BFC2AE78 = 0; - if (psx_taken_BFC2AE78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E90u); - goto label_BFC2AE90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E80u); - } -label_BFC2AE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E80u); -#endif - /* 0xBFC2AE80: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE84: 10000008 beq $zero, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE84 = cpu->gpr[0]; uint32_t psx_brB_BFC2AE84 = cpu->gpr[0]; - psx_taken_BFC2AE84 = (psx_brA_BFC2AE84 == psx_brB_BFC2AE84); - psx_delay_BFC2AE84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042E88u); -#endif - if (psx_delay_BFC2AE84) { - psx_delay_BFC2AE84 = 0; - if (psx_taken_BFC2AE84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E8Cu); - } -label_BFC2AE8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AE8C: 2C4100F2 sltiu $at, $v0, 242 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000F2u ? 1 : 0); - PGXP_ALU(0x2C4100F2u, cpu->gpr[1], _pgx1, 0x00F2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042E8Cu); -#endif -label_BFC2AE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AE90: 14200005 bne $at, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE90 = cpu->gpr[1]; uint32_t psx_brB_BFC2AE90 = cpu->gpr[0]; - psx_taken_BFC2AE90 = (psx_brA_BFC2AE90 != psx_brB_BFC2AE90); - psx_delay_BFC2AE90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AE94: 2403000A addiu $v1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2403000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80042E94u); -#endif - if (psx_delay_BFC2AE90) { - psx_delay_BFC2AE90 = 0; - if (psx_taken_BFC2AE90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042E98u); - } -label_BFC2AE98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AE98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042E98u); -#endif - /* 0xBFC2AE98: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AE9C: 10000002 beq $zero, $zero, 0xBFC2AEA8 */ - uint32_t psx_brA_BFC2AE9C = cpu->gpr[0]; uint32_t psx_brB_BFC2AE9C = cpu->gpr[0]; - psx_taken_BFC2AE9C = (psx_brA_BFC2AE9C == psx_brB_BFC2AE9C); - psx_delay_BFC2AE9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AEA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042EA0u); -#endif - if (psx_delay_BFC2AE9C) { - psx_delay_BFC2AE9C = 0; - if (psx_taken_BFC2AE9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA8u); - goto label_BFC2AEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EA4u); - } -label_BFC2AEA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AEA4: 2403000A addiu $v1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2403000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80042EA4u); -#endif -label_BFC2AEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2AEA8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2AEAC: 258C80C8 addiu $t4, $t4, -32568 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-32568)); - PGXP_ALU(0x258C80C8u, cpu->gpr[12], _pgx1, 0xFFFF80C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2AEB0: 00035880 sll $t3, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC2AEB4: 016C1021 addu $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042EB4u); -#endif - /* 0xBFC2AEB8: 944E0000 lhu $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042EB8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x944E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80042EB8u); -#endif - /* 0xBFC2AEBC: 97AD0028 lhu $t5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042EBCu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x97AD0028u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80042EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EC0u); -#endif - /* 0xBFC2AEC0: 94580002 lhu $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042EC0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80042EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC2AEC4: 01AE7823 subu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AEC8: 10000073 beq $zero, $zero, 0xBFC2B098 */ - uint32_t psx_brA_BFC2AEC8 = cpu->gpr[0]; uint32_t psx_brB_BFC2AEC8 = cpu->gpr[0]; - psx_taken_BFC2AEC8 = (psx_brA_BFC2AEC8 == psx_brB_BFC2AEC8); - psx_delay_BFC2AEC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC2AECC: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042ECCu); -#endif - if (psx_delay_BFC2AEC8) { - psx_delay_BFC2AEC8 = 0; - if (psx_taken_BFC2AEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - goto label_BFC2B098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042ED0u); - } -label_BFC2AED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042ED0u); -#endif - /* 0xBFC2AED0: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AED8: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80042ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AEDC: 14200005 bne $at, $zero, 0xBFC2AEF4 */ - uint32_t psx_brA_BFC2AEDC = cpu->gpr[1]; uint32_t psx_brB_BFC2AEDC = cpu->gpr[0]; - psx_taken_BFC2AEDC = (psx_brA_BFC2AEDC != psx_brB_BFC2AEDC); - psx_delay_BFC2AEDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AEE0: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042EE0u); -#endif - if (psx_delay_BFC2AEDC) { - psx_delay_BFC2AEDC = 0; - if (psx_taken_BFC2AEDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EF4u); - goto label_BFC2AEF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EE4u); - } -label_BFC2AEE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AEE4: 10200004 beq $at, $zero, 0xBFC2AEF8 */ - uint32_t psx_brA_BFC2AEE4 = cpu->gpr[1]; uint32_t psx_brB_BFC2AEE4 = cpu->gpr[0]; - psx_taken_BFC2AEE4 = (psx_brA_BFC2AEE4 == psx_brB_BFC2AEE4); - psx_delay_BFC2AEE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AEE8: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042EE8u); -#endif - if (psx_delay_BFC2AEE4) { - psx_delay_BFC2AEE4 = 0; - if (psx_taken_BFC2AEE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EF8u); - goto label_BFC2AEF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EECu); - } -label_BFC2AEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AEEC: 1000001C beq $zero, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AEEC = cpu->gpr[0]; uint32_t psx_brB_BFC2AEEC = cpu->gpr[0]; - psx_taken_BFC2AEEC = (psx_brA_BFC2AEEC == psx_brB_BFC2AEEC); - psx_delay_BFC2AEEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AEF0: 2403000B addiu $v1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2403000Bu, cpu->gpr[3], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80042EF0u); -#endif - if (psx_delay_BFC2AEEC) { - psx_delay_BFC2AEEC = 0; - if (psx_taken_BFC2AEEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042EF4u); - } -label_BFC2AEF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AEF4: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042EF4u); -#endif -label_BFC2AEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AEF8: 14200005 bne $at, $zero, 0xBFC2AF10 */ - uint32_t psx_brA_BFC2AEF8 = cpu->gpr[1]; uint32_t psx_brB_BFC2AEF8 = cpu->gpr[0]; - psx_taken_BFC2AEF8 = (psx_brA_BFC2AEF8 != psx_brB_BFC2AEF8); - psx_delay_BFC2AEF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AEFC: 2C410097 sltiu $at, $v0, 151 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000097u ? 1 : 0); - PGXP_ALU(0x2C410097u, cpu->gpr[1], _pgx1, 0x0097u); } -#ifdef PSX_COSIM - cosim_instr(0x80042EFCu); -#endif - if (psx_delay_BFC2AEF8) { - psx_delay_BFC2AEF8 = 0; - if (psx_taken_BFC2AEF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F10u); - goto label_BFC2AF10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F00u); - } -label_BFC2AF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF00: 10200004 beq $at, $zero, 0xBFC2AF14 */ - uint32_t psx_brA_BFC2AF00 = cpu->gpr[1]; uint32_t psx_brB_BFC2AF00 = cpu->gpr[0]; - psx_taken_BFC2AF00 = (psx_brA_BFC2AF00 == psx_brB_BFC2AF00); - psx_delay_BFC2AF00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF04: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F04u); -#endif - if (psx_delay_BFC2AF00) { - psx_delay_BFC2AF00 = 0; - if (psx_taken_BFC2AF00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F14u); - goto label_BFC2AF14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F08u); - } -label_BFC2AF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF08: 10000015 beq $zero, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AF08 = cpu->gpr[0]; uint32_t psx_brB_BFC2AF08 = cpu->gpr[0]; - psx_taken_BFC2AF08 = (psx_brA_BFC2AF08 == psx_brB_BFC2AF08); - psx_delay_BFC2AF08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AF0C: 2403000C addiu $v1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2403000Cu, cpu->gpr[3], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F0Cu); -#endif - if (psx_delay_BFC2AF08) { - psx_delay_BFC2AF08 = 0; - if (psx_taken_BFC2AF08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F10u); - } -label_BFC2AF10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF10: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F10u); -#endif -label_BFC2AF14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF14: 14200005 bne $at, $zero, 0xBFC2AF2C */ - uint32_t psx_brA_BFC2AF14 = cpu->gpr[1]; uint32_t psx_brB_BFC2AF14 = cpu->gpr[0]; - psx_taken_BFC2AF14 = (psx_brA_BFC2AF14 != psx_brB_BFC2AF14); - psx_delay_BFC2AF14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF18: 2C4100B7 sltiu $at, $v0, 183 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000B7u ? 1 : 0); - PGXP_ALU(0x2C4100B7u, cpu->gpr[1], _pgx1, 0x00B7u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F18u); -#endif - if (psx_delay_BFC2AF14) { - psx_delay_BFC2AF14 = 0; - if (psx_taken_BFC2AF14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F2Cu); - goto label_BFC2AF2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F1Cu); - } -label_BFC2AF1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF1C: 10200004 beq $at, $zero, 0xBFC2AF30 */ - uint32_t psx_brA_BFC2AF1C = cpu->gpr[1]; uint32_t psx_brB_BFC2AF1C = cpu->gpr[0]; - psx_taken_BFC2AF1C = (psx_brA_BFC2AF1C == psx_brB_BFC2AF1C); - psx_delay_BFC2AF1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF20: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F20u); -#endif - if (psx_delay_BFC2AF1C) { - psx_delay_BFC2AF1C = 0; - if (psx_taken_BFC2AF1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F30u); - goto label_BFC2AF30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F24u); - } -label_BFC2AF24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF24: 1000000E beq $zero, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AF24 = cpu->gpr[0]; uint32_t psx_brB_BFC2AF24 = cpu->gpr[0]; - psx_taken_BFC2AF24 = (psx_brA_BFC2AF24 == psx_brB_BFC2AF24); - psx_delay_BFC2AF24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AF28: 2403000D addiu $v1, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2403000Du, cpu->gpr[3], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80042F28u); -#endif - if (psx_delay_BFC2AF24) { - psx_delay_BFC2AF24 = 0; - if (psx_taken_BFC2AF24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F2Cu); - } -label_BFC2AF2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF2C: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F2Cu); -#endif -label_BFC2AF30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF30: 10200005 beq $at, $zero, 0xBFC2AF48 */ - uint32_t psx_brA_BFC2AF30 = cpu->gpr[1]; uint32_t psx_brB_BFC2AF30 = cpu->gpr[0]; - psx_taken_BFC2AF30 = (psx_brA_BFC2AF30 == psx_brB_BFC2AF30); - psx_delay_BFC2AF30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF34: 2C4100D7 sltiu $at, $v0, 215 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0); - PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F34u); -#endif - if (psx_delay_BFC2AF30) { - psx_delay_BFC2AF30 = 0; - if (psx_taken_BFC2AF30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F48u); - goto label_BFC2AF48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F38u); - } -label_BFC2AF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F38u); -#endif - /* 0xBFC2AF38: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF3C: 10000008 beq $zero, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AF3C = cpu->gpr[0]; uint32_t psx_brB_BFC2AF3C = cpu->gpr[0]; - psx_taken_BFC2AF3C = (psx_brA_BFC2AF3C == psx_brB_BFC2AF3C); - psx_delay_BFC2AF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042F40u); -#endif - if (psx_delay_BFC2AF3C) { - psx_delay_BFC2AF3C = 0; - if (psx_taken_BFC2AF3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F44u); - } -label_BFC2AF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF44: 2C4100D7 sltiu $at, $v0, 215 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000D7u ? 1 : 0); - PGXP_ALU(0x2C4100D7u, cpu->gpr[1], _pgx1, 0x00D7u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F44u); -#endif -label_BFC2AF48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF48: 14200005 bne $at, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AF48 = cpu->gpr[1]; uint32_t psx_brB_BFC2AF48 = cpu->gpr[0]; - psx_taken_BFC2AF48 = (psx_brA_BFC2AF48 != psx_brB_BFC2AF48); - psx_delay_BFC2AF48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AF4C: 2403000E addiu $v1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2403000Eu, cpu->gpr[3], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F4Cu); -#endif - if (psx_delay_BFC2AF48) { - psx_delay_BFC2AF48 = 0; - if (psx_taken_BFC2AF48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F50u); - } -label_BFC2AF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F50u); -#endif - /* 0xBFC2AF50: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF54: 10000002 beq $zero, $zero, 0xBFC2AF60 */ - uint32_t psx_brA_BFC2AF54 = cpu->gpr[0]; uint32_t psx_brB_BFC2AF54 = cpu->gpr[0]; - psx_taken_BFC2AF54 = (psx_brA_BFC2AF54 == psx_brB_BFC2AF54); - psx_delay_BFC2AF54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042F58u); -#endif - if (psx_delay_BFC2AF54) { - psx_delay_BFC2AF54 = 0; - if (psx_taken_BFC2AF54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F60u); - goto label_BFC2AF60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F5Cu); - } -label_BFC2AF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AF5C: 2403000E addiu $v1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2403000Eu, cpu->gpr[3], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80042F5Cu); -#endif -label_BFC2AF60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2AF60: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80042F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2AF64: 250880C8 addiu $t0, $t0, -32568 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-32568)); - PGXP_ALU(0x250880C8u, cpu->gpr[8], _pgx1, 0xFFFF80C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2AF68: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC2AF6C: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F70u); -#endif - /* 0xBFC2AF70: 944A0000 lhu $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042F70u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x944A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F70u); -#endif - /* 0xBFC2AF74: 97A90028 lhu $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042F74u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x97A90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F74u); -#endif - /* 0xBFC2AF78: 944C0002 lhu $t4, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80042F78u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x944C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC2AF7C: 012A5823 subu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF80: 10000045 beq $zero, $zero, 0xBFC2B098 */ - uint32_t psx_brA_BFC2AF80 = cpu->gpr[0]; uint32_t psx_brB_BFC2AF80 = cpu->gpr[0]; - psx_taken_BFC2AF80 = (psx_brA_BFC2AF80 == psx_brB_BFC2AF80); - psx_delay_BFC2AF80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC2AF84: 016C2021 addu $a0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80042F84u); -#endif - if (psx_delay_BFC2AF80) { - psx_delay_BFC2AF80 = 0; - if (psx_taken_BFC2AF80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - goto label_BFC2B098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F88u); - } -label_BFC2AF88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F88u); -#endif - /* 0xBFC2AF88: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80042F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AF8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF90: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF94: 14200005 bne $at, $zero, 0xBFC2AFAC */ - uint32_t psx_brA_BFC2AF94 = cpu->gpr[1]; uint32_t psx_brB_BFC2AF94 = cpu->gpr[0]; - psx_taken_BFC2AF94 = (psx_brA_BFC2AF94 != psx_brB_BFC2AF94); - psx_delay_BFC2AF94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AF98: 2C410061 sltiu $at, $v0, 97 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000061u ? 1 : 0); - PGXP_ALU(0x2C410061u, cpu->gpr[1], _pgx1, 0x0061u); } -#ifdef PSX_COSIM - cosim_instr(0x80042F98u); -#endif - if (psx_delay_BFC2AF94) { - psx_delay_BFC2AF94 = 0; - if (psx_taken_BFC2AF94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FACu); - goto label_BFC2AFAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042F9Cu); - } -label_BFC2AF9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AF9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AF9C: 10200004 beq $at, $zero, 0xBFC2AFB0 */ - uint32_t psx_brA_BFC2AF9C = cpu->gpr[1]; uint32_t psx_brB_BFC2AF9C = cpu->gpr[0]; - psx_taken_BFC2AF9C = (psx_brA_BFC2AF9C == psx_brB_BFC2AF9C); - psx_delay_BFC2AF9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFA0: 2C410070 sltiu $at, $v0, 112 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0); - PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FA0u); -#endif - if (psx_delay_BFC2AF9C) { - psx_delay_BFC2AF9C = 0; - if (psx_taken_BFC2AF9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FB0u); - goto label_BFC2AFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FA4u); - } -label_BFC2AFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AFA4: 1000001C beq $zero, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2AFA4 = cpu->gpr[0]; uint32_t psx_brB_BFC2AFA4 = cpu->gpr[0]; - psx_taken_BFC2AFA4 = (psx_brA_BFC2AFA4 == psx_brB_BFC2AFA4); - psx_delay_BFC2AFA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AFA8: 2403000F addiu $v1, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2403000Fu, cpu->gpr[3], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FA8u); -#endif - if (psx_delay_BFC2AFA4) { - psx_delay_BFC2AFA4 = 0; - if (psx_taken_BFC2AFA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FACu); - } -label_BFC2AFAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFAC: 2C410070 sltiu $at, $v0, 112 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000070u ? 1 : 0); - PGXP_ALU(0x2C410070u, cpu->gpr[1], _pgx1, 0x0070u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FACu); -#endif -label_BFC2AFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AFB0: 14200005 bne $at, $zero, 0xBFC2AFC8 */ - uint32_t psx_brA_BFC2AFB0 = cpu->gpr[1]; uint32_t psx_brB_BFC2AFB0 = cpu->gpr[0]; - psx_taken_BFC2AFB0 = (psx_brA_BFC2AFB0 != psx_brB_BFC2AFB0); - psx_delay_BFC2AFB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFB4: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FB4u); -#endif - if (psx_delay_BFC2AFB0) { - psx_delay_BFC2AFB0 = 0; - if (psx_taken_BFC2AFB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FC8u); - goto label_BFC2AFC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FB8u); - } -label_BFC2AFB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AFB8: 10200004 beq $at, $zero, 0xBFC2AFCC */ - uint32_t psx_brA_BFC2AFB8 = cpu->gpr[1]; uint32_t psx_brB_BFC2AFB8 = cpu->gpr[0]; - psx_taken_BFC2AFB8 = (psx_brA_BFC2AFB8 == psx_brB_BFC2AFB8); - psx_delay_BFC2AFB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFBC: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FBCu); -#endif - if (psx_delay_BFC2AFB8) { - psx_delay_BFC2AFB8 = 0; - if (psx_taken_BFC2AFB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FCCu); - goto label_BFC2AFCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FC0u); - } -label_BFC2AFC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AFC0: 10000015 beq $zero, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2AFC0 = cpu->gpr[0]; uint32_t psx_brB_BFC2AFC0 = cpu->gpr[0]; - psx_taken_BFC2AFC0 = (psx_brA_BFC2AFC0 == psx_brB_BFC2AFC0); - psx_delay_BFC2AFC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AFC4: 24030010 addiu $v1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24030010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FC4u); -#endif - if (psx_delay_BFC2AFC0) { - psx_delay_BFC2AFC0 = 0; - if (psx_taken_BFC2AFC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FC8u); - } -label_BFC2AFC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFC8: 2C410080 sltiu $at, $v0, 128 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C410080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FC8u); -#endif -label_BFC2AFCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AFCC: 14200005 bne $at, $zero, 0xBFC2AFE4 */ - uint32_t psx_brA_BFC2AFCC = cpu->gpr[1]; uint32_t psx_brB_BFC2AFCC = cpu->gpr[0]; - psx_taken_BFC2AFCC = (psx_brA_BFC2AFCC != psx_brB_BFC2AFCC); - psx_delay_BFC2AFCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFD0: 2C410092 sltiu $at, $v0, 146 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000092u ? 1 : 0); - PGXP_ALU(0x2C410092u, cpu->gpr[1], _pgx1, 0x0092u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FD0u); -#endif - if (psx_delay_BFC2AFCC) { - psx_delay_BFC2AFCC = 0; - if (psx_taken_BFC2AFCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FE4u); - goto label_BFC2AFE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FD4u); - } -label_BFC2AFD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AFD4: 10200004 beq $at, $zero, 0xBFC2AFE8 */ - uint32_t psx_brA_BFC2AFD4 = cpu->gpr[1]; uint32_t psx_brB_BFC2AFD4 = cpu->gpr[0]; - psx_taken_BFC2AFD4 = (psx_brA_BFC2AFD4 == psx_brB_BFC2AFD4); - psx_delay_BFC2AFD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFD8: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FD8u); -#endif - if (psx_delay_BFC2AFD4) { - psx_delay_BFC2AFD4 = 0; - if (psx_taken_BFC2AFD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FE8u); - goto label_BFC2AFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FDCu); - } -label_BFC2AFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AFDC: 1000000E beq $zero, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2AFDC = cpu->gpr[0]; uint32_t psx_brB_BFC2AFDC = cpu->gpr[0]; - psx_taken_BFC2AFDC = (psx_brA_BFC2AFDC == psx_brB_BFC2AFDC); - psx_delay_BFC2AFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2AFE0: 24030011 addiu $v1, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24030011u, cpu->gpr[3], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x80042FE0u); -#endif - if (psx_delay_BFC2AFDC) { - psx_delay_BFC2AFDC = 0; - if (psx_taken_BFC2AFDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FE4u); - } -label_BFC2AFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFE4: 2C41009F sltiu $at, $v0, 159 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000009Fu ? 1 : 0); - PGXP_ALU(0x2C41009Fu, cpu->gpr[1], _pgx1, 0x009Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FE4u); -#endif -label_BFC2AFE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2AFE8: 10200005 beq $at, $zero, 0xBFC2B000 */ - uint32_t psx_brA_BFC2AFE8 = cpu->gpr[1]; uint32_t psx_brB_BFC2AFE8 = cpu->gpr[0]; - psx_taken_BFC2AFE8 = (psx_brA_BFC2AFE8 == psx_brB_BFC2AFE8); - psx_delay_BFC2AFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFEC: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FECu); -#endif - if (psx_delay_BFC2AFE8) { - psx_delay_BFC2AFE8 = 0; - if (psx_taken_BFC2AFE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043000u); - goto label_BFC2B000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FF0u); - } -label_BFC2AFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FF0u); -#endif - /* 0xBFC2AFF0: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80042FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AFF4: 10000008 beq $zero, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2AFF4 = cpu->gpr[0]; uint32_t psx_brB_BFC2AFF4 = cpu->gpr[0]; - psx_taken_BFC2AFF4 = (psx_brA_BFC2AFF4 == psx_brB_BFC2AFF4); - psx_delay_BFC2AFF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2AFF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80042FF8u); -#endif - if (psx_delay_BFC2AFF4) { - psx_delay_BFC2AFF4 = 0; - if (psx_taken_BFC2AFF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042FFCu); - } -label_BFC2AFFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2AFFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2AFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80042FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2AFFC: 2C4100BF sltiu $at, $v0, 191 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x000000BFu ? 1 : 0); - PGXP_ALU(0x2C4100BFu, cpu->gpr[1], _pgx1, 0x00BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80042FFCu); -#endif -label_BFC2B000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B000: 14200005 bne $at, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2B000 = cpu->gpr[1]; uint32_t psx_brB_BFC2B000 = cpu->gpr[0]; - psx_taken_BFC2B000 = (psx_brA_BFC2B000 != psx_brB_BFC2B000); - psx_delay_BFC2B000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2B004: 24030012 addiu $v1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24030012u, cpu->gpr[3], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80043004u); -#endif - if (psx_delay_BFC2B000) { - psx_delay_BFC2B000 = 0; - if (psx_taken_BFC2B000) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043008u); - } -label_BFC2B008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043008u); -#endif - /* 0xBFC2B008: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80043008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B00C: 10000002 beq $zero, $zero, 0xBFC2B018 */ - uint32_t psx_brA_BFC2B00C = cpu->gpr[0]; uint32_t psx_brB_BFC2B00C = cpu->gpr[0]; - psx_taken_BFC2B00C = (psx_brA_BFC2B00C == psx_brB_BFC2B00C); - psx_delay_BFC2B00C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043010u); -#endif - if (psx_delay_BFC2B00C) { - psx_delay_BFC2B00C = 0; - if (psx_taken_BFC2B00C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043018u); - goto label_BFC2B018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043014u); - } -label_BFC2B014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2B014: 24030012 addiu $v1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24030012u, cpu->gpr[3], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80043014u); -#endif -label_BFC2B018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2B018: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2B01C: 25CE80C8 addiu $t6, $t6, -32568 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-32568)); - PGXP_ALU(0x25CE80C8u, cpu->gpr[14], _pgx1, 0xFFFF80C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2B020: 00036880 sll $t5, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC2B024: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043024u); -#endif - /* 0xBFC2B028: 94580000 lhu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043028u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043028u); -#endif - /* 0xBFC2B02C: 97AF0028 lhu $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004302Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004302Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043030u); -#endif - /* 0xBFC2B030: 94480002 lhu $t0, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043030u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80043030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B034: 01F8C823 subu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F8C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B038: 10000017 beq $zero, $zero, 0xBFC2B098 */ - uint32_t psx_brA_BFC2B038 = cpu->gpr[0]; uint32_t psx_brB_BFC2B038 = cpu->gpr[0]; - psx_taken_BFC2B038 = (psx_brA_BFC2B038 == psx_brB_BFC2B038); - psx_delay_BFC2B038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC2B03C: 03282021 addu $a0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004303Cu); -#endif - if (psx_delay_BFC2B038) { - psx_delay_BFC2B038 = 0; - if (psx_taken_BFC2B038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - goto label_BFC2B098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043040u); - } -label_BFC2B040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043040u); -#endif - /* 0xBFC2B040: 93A20020 lbu $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x93A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B044: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2B048: 2C41007F sltiu $at, $v0, 127 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2C41007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B04C: 10200004 beq $at, $zero, 0xBFC2B060 */ - uint32_t psx_brA_BFC2B04C = cpu->gpr[1]; uint32_t psx_brB_BFC2B04C = cpu->gpr[0]; - psx_taken_BFC2B04C = (psx_brA_BFC2B04C == psx_brB_BFC2B04C); - psx_delay_BFC2B04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2B050: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043050u); -#endif - if (psx_delay_BFC2B04C) { - psx_delay_BFC2B04C = 0; - if (psx_taken_BFC2B04C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043060u); - goto label_BFC2B060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043054u); - } -label_BFC2B054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B054: 10000002 beq $zero, $zero, 0xBFC2B060 */ - uint32_t psx_brA_BFC2B054 = cpu->gpr[0]; uint32_t psx_brB_BFC2B054 = cpu->gpr[0]; - psx_taken_BFC2B054 = (psx_brA_BFC2B054 == psx_brB_BFC2B054); - psx_delay_BFC2B054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2B058: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043058u); -#endif - if (psx_delay_BFC2B054) { - psx_delay_BFC2B054 = 0; - if (psx_taken_BFC2B054) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043060u); - goto label_BFC2B060; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004305Cu); - } -label_BFC2B05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004305Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2B05C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004305Cu); -#endif -label_BFC2B060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC2B060: 00054840 sll $t1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00054840u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC2B064: 01235021 addu $t2, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[9] + cpu->gpr[3]; - PGXP_ALU(0x01235021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2B068: 254BFEEF addiu $t3, $t2, -273 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-273)); - PGXP_ALU(0x254BFEEFu, cpu->gpr[11], _pgx1, 0xFFFFFEEFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2B06C: 316C00FF andi $t4, $t3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFu; - PGXP_ALU(0x316C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2B070: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2B074: 25CE8114 addiu $t6, $t6, -32492 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-32492)); - PGXP_ALU(0x25CE8114u, cpu->gpr[14], _pgx1, 0xFFFF8114u); } -#ifdef PSX_COSIM - cosim_instr(0x80043074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2B078: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC2B07C: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004307Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043080u); -#endif - /* 0xBFC2B080: 94580000 lhu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043080u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x94580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043080u); -#endif - /* 0xBFC2B084: 97AF0028 lhu $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043084u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043084u); -#endif - /* 0xBFC2B088: 94480002 lhu $t0, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043088u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x94480002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80043088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B08C: 01F8C823 subu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F8C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B090: 10000001 beq $zero, $zero, 0xBFC2B098 */ - uint32_t psx_brA_BFC2B090 = cpu->gpr[0]; uint32_t psx_brB_BFC2B090 = cpu->gpr[0]; - psx_taken_BFC2B090 = (psx_brA_BFC2B090 == psx_brB_BFC2B090); - psx_delay_BFC2B090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC2B094: 03282021 addu $a0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043094u); -#endif - if (psx_delay_BFC2B090) { - psx_delay_BFC2B090 = 0; - if (psx_taken_BFC2B090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - goto label_BFC2B098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043098u); - } -label_BFC2B098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043098u); -#endif - /* 0xBFC2B098: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043098u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2B09C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004309Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2B0A0: 03E00008 jr $ra */ - psx_delay_BFC2B0A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC2B0A4: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800430A4u); -#endif - if (psx_delay_BFC2B0A0) { - psx_delay_BFC2B0A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2B0A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2B0A8u); - int psx_delay_BFC2B0B8 = 0; - int psx_taken_BFC2B0B8 = 0; - int psx_delay_BFC2B0C4 = 0; - int psx_taken_BFC2B0C4 = 0; - int psx_delay_BFC2B0CC = 0; - int psx_taken_BFC2B0CC = 0; - int psx_delay_BFC2B0D8 = 0; - int psx_taken_BFC2B0D8 = 0; - int psx_delay_BFC2B0E0 = 0; - int psx_taken_BFC2B0E0 = 0; - int psx_delay_BFC2B0E8 = 0; - int psx_taken_BFC2B0E8 = 0; - int psx_delay_BFC2B0F4 = 0; - int psx_taken_BFC2B0F4 = 0; - int psx_delay_BFC2B0FC = 0; - int psx_taken_BFC2B0FC = 0; - int psx_delay_BFC2B104 = 0; - int psx_taken_BFC2B104 = 0; - int psx_delay_BFC2B110 = 0; - int psx_taken_BFC2B110 = 0; - int psx_delay_BFC2B118 = 0; - int psx_taken_BFC2B118 = 0; - int psx_delay_BFC2B124 = 0; - int psx_taken_BFC2B124 = 0; - int psx_delay_BFC2B130 = 0; - int psx_taken_BFC2B130 = 0; - int psx_delay_BFC2B138 = 0; - int psx_taken_BFC2B138 = 0; - int psx_delay_BFC2B140 = 0; - int psx_taken_BFC2B140 = 0; - int psx_delay_BFC2B14C = 0; - int psx_taken_BFC2B14C = 0; - int psx_delay_BFC2B154 = 0; - int psx_taken_BFC2B154 = 0; - int psx_delay_BFC2B160 = 0; - int psx_taken_BFC2B160 = 0; - int psx_delay_BFC2B16C = 0; - int psx_taken_BFC2B16C = 0; - int psx_delay_BFC2B174 = 0; - int psx_taken_BFC2B174 = 0; - int psx_delay_BFC2B17C = 0; - int psx_taken_BFC2B17C = 0; - int psx_delay_BFC2B188 = 0; - int psx_delay_BFC2B190 = 0; - int psx_taken_BFC2B190 = 0; - int psx_delay_BFC2B198 = 0; - int psx_taken_BFC2B198 = 0; - int psx_delay_BFC2B1BC = 0; - int psx_taken_BFC2B1BC = 0; - int psx_delay_BFC2B1F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2B0C0u: goto label_BFC2B0C0; - case 0xBFC2B0CCu: goto label_BFC2B0CC; - case 0xBFC2B0D4u: goto label_BFC2B0D4; - case 0xBFC2B0D8u: goto label_BFC2B0D8; - case 0xBFC2B0E0u: goto label_BFC2B0E0; - case 0xBFC2B0E8u: goto label_BFC2B0E8; - case 0xBFC2B0F0u: goto label_BFC2B0F0; - case 0xBFC2B0F4u: goto label_BFC2B0F4; - case 0xBFC2B0FCu: goto label_BFC2B0FC; - case 0xBFC2B104u: goto label_BFC2B104; - case 0xBFC2B10Cu: goto label_BFC2B10C; - case 0xBFC2B110u: goto label_BFC2B110; - case 0xBFC2B118u: goto label_BFC2B118; - case 0xBFC2B120u: goto label_BFC2B120; - case 0xBFC2B12Cu: goto label_BFC2B12C; - case 0xBFC2B130u: goto label_BFC2B130; - case 0xBFC2B138u: goto label_BFC2B138; - case 0xBFC2B140u: goto label_BFC2B140; - case 0xBFC2B148u: goto label_BFC2B148; - case 0xBFC2B14Cu: goto label_BFC2B14C; - case 0xBFC2B154u: goto label_BFC2B154; - case 0xBFC2B15Cu: goto label_BFC2B15C; - case 0xBFC2B168u: goto label_BFC2B168; - case 0xBFC2B16Cu: goto label_BFC2B16C; - case 0xBFC2B174u: goto label_BFC2B174; - case 0xBFC2B17Cu: goto label_BFC2B17C; - case 0xBFC2B184u: goto label_BFC2B184; - case 0xBFC2B190u: goto label_BFC2B190; - case 0xBFC2B198u: goto label_BFC2B198; - case 0xBFC2B1A0u: goto label_BFC2B1A0; - case 0xBFC2B1C4u: goto label_BFC2B1C4; - case 0xBFC2B1C8u: goto label_BFC2B1C8; - case 0xBFC2B1ECu: goto label_BFC2B1EC; - default: break; - } - } -label_BFC2B0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2B0A8: 308500FF andi $a1, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800430A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2B0AC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800430ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0B0: 2CA10020 sltiu $at, $a1, 32 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000020u ? 1 : 0); - PGXP_ALU(0x2CA10020u, cpu->gpr[1], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x800430B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2B0B4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800430B4u); return; } g_debug_last_store_pc = 0x800430B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800430B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0B8: 14200006 bne $at, $zero, 0xBFC2B0D4 */ - uint32_t psx_brA_BFC2B0B8 = cpu->gpr[1]; uint32_t psx_brB_BFC2B0B8 = cpu->gpr[0]; - psx_taken_BFC2B0B8 = (psx_brA_BFC2B0B8 != psx_brB_BFC2B0B8); - psx_delay_BFC2B0B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B0BC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800430BCu); -#endif - if (psx_delay_BFC2B0B8) { - psx_delay_BFC2B0B8 = 0; - if (psx_taken_BFC2B0B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430D4u); - goto label_BFC2B0D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430C0u); - } -label_BFC2B0C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0C0: 2CA10030 sltiu $at, $a1, 48 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0); - PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x800430C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0C4: 10200004 beq $at, $zero, 0xBFC2B0D8 */ - uint32_t psx_brA_BFC2B0C4 = cpu->gpr[1]; uint32_t psx_brB_BFC2B0C4 = cpu->gpr[0]; - psx_taken_BFC2B0C4 = (psx_brA_BFC2B0C4 == psx_brB_BFC2B0C4); - psx_delay_BFC2B0C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0C8: 2CA10030 sltiu $at, $a1, 48 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0); - PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x800430C8u); -#endif - if (psx_delay_BFC2B0C4) { - psx_delay_BFC2B0C4 = 0; - if (psx_taken_BFC2B0C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430D8u); - goto label_BFC2B0D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430CCu); - } -label_BFC2B0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B0CC: 10000032 beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B0CC = cpu->gpr[0]; uint32_t psx_brB_BFC2B0CC = cpu->gpr[0]; - psx_taken_BFC2B0CC = (psx_brA_BFC2B0CC == psx_brB_BFC2B0CC); - psx_delay_BFC2B0CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B0D0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800430D0u); -#endif - if (psx_delay_BFC2B0CC) { - psx_delay_BFC2B0CC = 0; - if (psx_taken_BFC2B0CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430D4u); - } -label_BFC2B0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0D4: 2CA10030 sltiu $at, $a1, 48 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0); - PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x800430D4u); -#endif -label_BFC2B0D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0D8: 14200005 bne $at, $zero, 0xBFC2B0F0 */ - uint32_t psx_brA_BFC2B0D8 = cpu->gpr[1]; uint32_t psx_brB_BFC2B0D8 = cpu->gpr[0]; - psx_taken_BFC2B0D8 = (psx_brA_BFC2B0D8 != psx_brB_BFC2B0D8); - psx_delay_BFC2B0D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0DC: 2CA1003A sltiu $at, $a1, 58 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0); - PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); } -#ifdef PSX_COSIM - cosim_instr(0x800430DCu); -#endif - if (psx_delay_BFC2B0D8) { - psx_delay_BFC2B0D8 = 0; - if (psx_taken_BFC2B0D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430F0u); - goto label_BFC2B0F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430E0u); - } -label_BFC2B0E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0E0: 10200004 beq $at, $zero, 0xBFC2B0F4 */ - uint32_t psx_brA_BFC2B0E0 = cpu->gpr[1]; uint32_t psx_brB_BFC2B0E0 = cpu->gpr[0]; - psx_taken_BFC2B0E0 = (psx_brA_BFC2B0E0 == psx_brB_BFC2B0E0); - psx_delay_BFC2B0E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0E4: 2CA1003A sltiu $at, $a1, 58 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0); - PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); } -#ifdef PSX_COSIM - cosim_instr(0x800430E4u); -#endif - if (psx_delay_BFC2B0E0) { - psx_delay_BFC2B0E0 = 0; - if (psx_taken_BFC2B0E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430F4u); - goto label_BFC2B0F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430E8u); - } -label_BFC2B0E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B0E8: 1000002B beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B0E8 = cpu->gpr[0]; uint32_t psx_brB_BFC2B0E8 = cpu->gpr[0]; - psx_taken_BFC2B0E8 = (psx_brA_BFC2B0E8 == psx_brB_BFC2B0E8); - psx_delay_BFC2B0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2B0EC: A3A00020 sb $zero, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800430ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (32)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800430ECu); -#endif - if (psx_delay_BFC2B0E8) { - psx_delay_BFC2B0E8 = 0; - if (psx_taken_BFC2B0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430F0u); - } -label_BFC2B0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0F0: 2CA1003A sltiu $at, $a1, 58 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000003Au ? 1 : 0); - PGXP_ALU(0x2CA1003Au, cpu->gpr[1], _pgx1, 0x003Au); } -#ifdef PSX_COSIM - cosim_instr(0x800430F0u); -#endif -label_BFC2B0F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0F4: 14200005 bne $at, $zero, 0xBFC2B10C */ - uint32_t psx_brA_BFC2B0F4 = cpu->gpr[1]; uint32_t psx_brB_BFC2B0F4 = cpu->gpr[0]; - psx_taken_BFC2B0F4 = (psx_brA_BFC2B0F4 != psx_brB_BFC2B0F4); - psx_delay_BFC2B0F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B0F8: 2CA10041 sltiu $at, $a1, 65 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0); - PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x800430F8u); -#endif - if (psx_delay_BFC2B0F4) { - psx_delay_BFC2B0F4 = 0; - if (psx_taken_BFC2B0F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004310Cu); - goto label_BFC2B10C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430FCu); - } -label_BFC2B0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800430FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B0FC: 10200004 beq $at, $zero, 0xBFC2B110 */ - uint32_t psx_brA_BFC2B0FC = cpu->gpr[1]; uint32_t psx_brB_BFC2B0FC = cpu->gpr[0]; - psx_taken_BFC2B0FC = (psx_brA_BFC2B0FC == psx_brB_BFC2B0FC); - psx_delay_BFC2B0FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B100: 2CA10041 sltiu $at, $a1, 65 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0); - PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x80043100u); -#endif - if (psx_delay_BFC2B0FC) { - psx_delay_BFC2B0FC = 0; - if (psx_taken_BFC2B0FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043110u); - goto label_BFC2B110; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043104u); - } -label_BFC2B104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B104: 10000024 beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B104 = cpu->gpr[0]; uint32_t psx_brB_BFC2B104 = cpu->gpr[0]; - psx_taken_BFC2B104 = (psx_brA_BFC2B104 == psx_brB_BFC2B104); - psx_delay_BFC2B104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B108: 2402000B addiu $v0, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2402000Bu, cpu->gpr[2], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80043108u); -#endif - if (psx_delay_BFC2B104) { - psx_delay_BFC2B104 = 0; - if (psx_taken_BFC2B104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004310Cu); - } -label_BFC2B10C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B10Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004310Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B10C: 2CA10041 sltiu $at, $a1, 65 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000041u ? 1 : 0); - PGXP_ALU(0x2CA10041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x8004310Cu); -#endif -label_BFC2B110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B110: 14200006 bne $at, $zero, 0xBFC2B12C */ - uint32_t psx_brA_BFC2B110 = cpu->gpr[1]; uint32_t psx_brB_BFC2B110 = cpu->gpr[0]; - psx_taken_BFC2B110 = (psx_brA_BFC2B110 != psx_brB_BFC2B110); - psx_delay_BFC2B110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B114: 2CA1005B sltiu $at, $a1, 91 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0); - PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80043114u); -#endif - if (psx_delay_BFC2B110) { - psx_delay_BFC2B110 = 0; - if (psx_taken_BFC2B110) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004312Cu); - goto label_BFC2B12C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043118u); - } -label_BFC2B118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B118: 10200005 beq $at, $zero, 0xBFC2B130 */ - uint32_t psx_brA_BFC2B118 = cpu->gpr[1]; uint32_t psx_brB_BFC2B118 = cpu->gpr[0]; - psx_taken_BFC2B118 = (psx_brA_BFC2B118 == psx_brB_BFC2B118); - psx_delay_BFC2B118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B11C: 2CA1005B sltiu $at, $a1, 91 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0); - PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8004311Cu); -#endif - if (psx_delay_BFC2B118) { - psx_delay_BFC2B118 = 0; - if (psx_taken_BFC2B118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043130u); - goto label_BFC2B130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043120u); - } -label_BFC2B120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2B120: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B124: 1000001C beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B124 = cpu->gpr[0]; uint32_t psx_brB_BFC2B124 = cpu->gpr[0]; - psx_taken_BFC2B124 = (psx_brA_BFC2B124 == psx_brB_BFC2B124); - psx_delay_BFC2B124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2B128: A3AE0020 sb $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80043128u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (32)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043128u); -#endif - if (psx_delay_BFC2B124) { - psx_delay_BFC2B124 = 0; - if (psx_taken_BFC2B124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004312Cu); - } -label_BFC2B12C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B12Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004312Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B12C: 2CA1005B sltiu $at, $a1, 91 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000005Bu ? 1 : 0); - PGXP_ALU(0x2CA1005Bu, cpu->gpr[1], _pgx1, 0x005Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8004312Cu); -#endif -label_BFC2B130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B130: 14200005 bne $at, $zero, 0xBFC2B148 */ - uint32_t psx_brA_BFC2B130 = cpu->gpr[1]; uint32_t psx_brB_BFC2B130 = cpu->gpr[0]; - psx_taken_BFC2B130 = (psx_brA_BFC2B130 != psx_brB_BFC2B130); - psx_delay_BFC2B130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B134: 2CA10061 sltiu $at, $a1, 97 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0); - PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); } -#ifdef PSX_COSIM - cosim_instr(0x80043134u); -#endif - if (psx_delay_BFC2B130) { - psx_delay_BFC2B130 = 0; - if (psx_taken_BFC2B130) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043148u); - goto label_BFC2B148; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043138u); - } -label_BFC2B138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B138: 10200004 beq $at, $zero, 0xBFC2B14C */ - uint32_t psx_brA_BFC2B138 = cpu->gpr[1]; uint32_t psx_brB_BFC2B138 = cpu->gpr[0]; - psx_taken_BFC2B138 = (psx_brA_BFC2B138 == psx_brB_BFC2B138); - psx_delay_BFC2B138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B13C: 2CA10061 sltiu $at, $a1, 97 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0); - PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); } -#ifdef PSX_COSIM - cosim_instr(0x8004313Cu); -#endif - if (psx_delay_BFC2B138) { - psx_delay_BFC2B138 = 0; - if (psx_taken_BFC2B138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004314Cu); - goto label_BFC2B14C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043140u); - } -label_BFC2B140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B140: 10000015 beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B140 = cpu->gpr[0]; uint32_t psx_brB_BFC2B140 = cpu->gpr[0]; - psx_taken_BFC2B140 = (psx_brA_BFC2B140 == psx_brB_BFC2B140); - psx_delay_BFC2B140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B144: 24020025 addiu $v0, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24020025u, cpu->gpr[2], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x80043144u); -#endif - if (psx_delay_BFC2B140) { - psx_delay_BFC2B140 = 0; - if (psx_taken_BFC2B140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043148u); - } -label_BFC2B148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B148: 2CA10061 sltiu $at, $a1, 97 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000061u ? 1 : 0); - PGXP_ALU(0x2CA10061u, cpu->gpr[1], _pgx1, 0x0061u); } -#ifdef PSX_COSIM - cosim_instr(0x80043148u); -#endif -label_BFC2B14C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B14Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004314Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B14C: 14200006 bne $at, $zero, 0xBFC2B168 */ - uint32_t psx_brA_BFC2B14C = cpu->gpr[1]; uint32_t psx_brB_BFC2B14C = cpu->gpr[0]; - psx_taken_BFC2B14C = (psx_brA_BFC2B14C != psx_brB_BFC2B14C); - psx_delay_BFC2B14C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B150: 2CA1007B sltiu $at, $a1, 123 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0); - PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80043150u); -#endif - if (psx_delay_BFC2B14C) { - psx_delay_BFC2B14C = 0; - if (psx_taken_BFC2B14C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043168u); - goto label_BFC2B168; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043154u); - } -label_BFC2B154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B154: 10200005 beq $at, $zero, 0xBFC2B16C */ - uint32_t psx_brA_BFC2B154 = cpu->gpr[1]; uint32_t psx_brB_BFC2B154 = cpu->gpr[0]; - psx_taken_BFC2B154 = (psx_brA_BFC2B154 == psx_brB_BFC2B154); - psx_delay_BFC2B154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B158: 2CA1007B sltiu $at, $a1, 123 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0); - PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80043158u); -#endif - if (psx_delay_BFC2B154) { - psx_delay_BFC2B154 = 0; - if (psx_taken_BFC2B154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004316Cu); - goto label_BFC2B16C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004315Cu); - } -label_BFC2B15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004315Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2B15C: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004315Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B160: 1000000D beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B160 = cpu->gpr[0]; uint32_t psx_brB_BFC2B160 = cpu->gpr[0]; - psx_taken_BFC2B160 = (psx_brA_BFC2B160 == psx_brB_BFC2B160); - psx_delay_BFC2B160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2B164: A3AF0020 sb $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80043164u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (32)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043164u); -#endif - if (psx_delay_BFC2B160) { - psx_delay_BFC2B160 = 0; - if (psx_taken_BFC2B160) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043168u); - } -label_BFC2B168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B168: 2CA1007B sltiu $at, $a1, 123 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Bu ? 1 : 0); - PGXP_ALU(0x2CA1007Bu, cpu->gpr[1], _pgx1, 0x007Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80043168u); -#endif -label_BFC2B16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004316Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B16C: 14200005 bne $at, $zero, 0xBFC2B184 */ - uint32_t psx_brA_BFC2B16C = cpu->gpr[1]; uint32_t psx_brB_BFC2B16C = cpu->gpr[0]; - psx_taken_BFC2B16C = (psx_brA_BFC2B16C != psx_brB_BFC2B16C); - psx_delay_BFC2B16C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B170: 2CA1007F sltiu $at, $a1, 127 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000007Fu ? 1 : 0); - PGXP_ALU(0x2CA1007Fu, cpu->gpr[1], _pgx1, 0x007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043170u); -#endif - if (psx_delay_BFC2B16C) { - psx_delay_BFC2B16C = 0; - if (psx_taken_BFC2B16C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043184u); - goto label_BFC2B184; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043174u); - } -label_BFC2B174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B174: 10200003 beq $at, $zero, 0xBFC2B184 */ - uint32_t psx_brA_BFC2B174 = cpu->gpr[1]; uint32_t psx_brB_BFC2B174 = cpu->gpr[0]; - psx_taken_BFC2B174 = (psx_brA_BFC2B174 == psx_brB_BFC2B174); - psx_delay_BFC2B174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043178u); -#endif - if (psx_delay_BFC2B174) { - psx_delay_BFC2B174 = 0; - if (psx_taken_BFC2B174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043184u); - goto label_BFC2B184; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004317Cu); - } -label_BFC2B17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B17C: 10000006 beq $zero, $zero, 0xBFC2B198 */ - uint32_t psx_brA_BFC2B17C = cpu->gpr[0]; uint32_t psx_brB_BFC2B17C = cpu->gpr[0]; - psx_taken_BFC2B17C = (psx_brA_BFC2B17C == psx_brB_BFC2B17C); - psx_delay_BFC2B17C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B180: 2402003F addiu $v0, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2402003Fu, cpu->gpr[2], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043180u); -#endif - if (psx_delay_BFC2B17C) { - psx_delay_BFC2B17C = 0; - if (psx_taken_BFC2B17C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - goto label_BFC2B198; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043184u); - } -label_BFC2B184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B184: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B188: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80043190u; /* jal link before delay slot */ - psx_delay_BFC2B188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B18C: 248481E4 addiu $a0, $a0, -32284 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32284)); - PGXP_ALU(0x248481E4u, cpu->gpr[4], _pgx1, 0xFFFF81E4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004318Cu); -#endif - if (psx_delay_BFC2B188) { - psx_delay_BFC2B188 = 0; - cpu->gpr[31] = 0x80043190u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC2B190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B190: 10000016 beq $zero, $zero, 0xBFC2B1EC */ - uint32_t psx_brA_BFC2B190 = cpu->gpr[0]; uint32_t psx_brB_BFC2B190 = cpu->gpr[0]; - psx_taken_BFC2B190 = (psx_brA_BFC2B190 == psx_brB_BFC2B190); - psx_delay_BFC2B190 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B194: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043194u); -#endif - if (psx_delay_BFC2B190) { - psx_delay_BFC2B190 = 0; - if (psx_taken_BFC2B190) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431ECu); - goto label_BFC2B1EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043198u); - } -label_BFC2B198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B198: 1040000B beq $v0, $zero, 0xBFC2B1C8 */ - uint32_t psx_brA_BFC2B198 = cpu->gpr[2]; uint32_t psx_brB_BFC2B198 = cpu->gpr[0]; - psx_taken_BFC2B198 = (psx_brA_BFC2B198 == psx_brB_BFC2B198); - psx_delay_BFC2B198 = 1; - /* 0xBFC2B19C: 93A90020 lbu $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 9, 0x20000000u); - PGXP_LOAD(0x93A90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004319Cu); -#endif - if (psx_delay_BFC2B198) { - psx_delay_BFC2B198 = 0; - if (psx_taken_BFC2B198) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431C8u); - goto label_BFC2B1C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431A0u); - } -label_BFC2B1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B1A0: 0002C840 sll $t9, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 1u; - PGXP_ALU(0x0002C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800431A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2B1A4: 0019C823 subu $t9, $zero, $t9 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[0] - cpu->gpr[25]; - PGXP_ALU(0x0019C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC2B1A8: 0005C040 sll $t8, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 1u; - PGXP_ALU(0x0005C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800431A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC2B1AC: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2B1B0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800431B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2B1B4: 00681821 addu $v1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00681821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431B4u); -#endif - /* 0xBFC2B1B8: 94638162 lhu $v1, -32414($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -32414; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-32414)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800431B8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x94638162u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800431B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B1BC: 1000000B beq $zero, $zero, 0xBFC2B1EC */ - uint32_t psx_brA_BFC2B1BC = cpu->gpr[0]; uint32_t psx_brB_BFC2B1BC = cpu->gpr[0]; - psx_taken_BFC2B1BC = (psx_brA_BFC2B1BC == psx_brB_BFC2B1BC); - psx_delay_BFC2B1BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2B1C0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431C0u); -#endif - if (psx_delay_BFC2B1BC) { - psx_delay_BFC2B1BC = 0; - if (psx_taken_BFC2B1BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431ECu); - goto label_BFC2B1EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431C4u); - } -label_BFC2B1C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B1C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431C4u); -#endif - /* 0xBFC2B1C4: 93A90020 lbu $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 9, 0x20000000u); - PGXP_LOAD(0x93A90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800431C4u); -#endif -label_BFC2B1C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B1C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2B1C8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800431C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2B1CC: 256B8194 addiu $t3, $t3, -32364 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-32364)); - PGXP_ALU(0x256B8194u, cpu->gpr[11], _pgx1, 0xFFFF8194u); } -#ifdef PSX_COSIM - cosim_instr(0x800431CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2B1D0: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800431D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC2B1D4: 014B1021 addu $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431D4u); -#endif - /* 0xBFC2B1D8: 944C0000 lhu $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800431D8u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x944C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800431D8u); -#endif - /* 0xBFC2B1DC: 944E0002 lhu $t6, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800431DCu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x944E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800431DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC2B1E0: 01856821 addu $t5, $t4, $a1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[5]; - PGXP_ALU(0x01856821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6008u); -#endif - /* 0xBFC2B1E4: 01AE1823 subu $v1, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2B1E8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431E8u); -#endif -label_BFC2B1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431ECu); -#endif - /* 0xBFC2B1EC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800431ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800431ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2B1F0: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800431F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2B1F4: 03E00008 jr $ra */ - psx_delay_BFC2B1F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B1F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800431F8u); -#endif - if (psx_delay_BFC2B1F4) { - psx_delay_BFC2B1F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2B1FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2B1FCu); - int psx_delay_BFC2B200 = 0; - int psx_taken_BFC2B200 = 0; - int psx_delay_BFC2B21C = 0; - int psx_taken_BFC2B21C = 0; - int psx_delay_BFC2B224 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2B208u: goto label_BFC2B208; - case 0xBFC2B224u: goto label_BFC2B224; - default: break; - } - } -label_BFC2B1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800431FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2B1FC: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800431FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B200: 10400008 beq $v0, $zero, 0xBFC2B224 */ - uint32_t psx_brA_BFC2B200 = cpu->gpr[2]; uint32_t psx_brB_BFC2B200 = cpu->gpr[0]; - psx_taken_BFC2B200 = (psx_brA_BFC2B200 == psx_brB_BFC2B200); - psx_delay_BFC2B200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2B204: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043204u); -#endif - if (psx_delay_BFC2B200) { - psx_delay_BFC2B200 = 0; - if (psx_taken_BFC2B200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043224u); - goto label_BFC2B224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043208u); - } -label_BFC2B208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043208u); -#endif - /* 0xBFC2B208: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2B20C: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004320Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B210: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B214: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2B218: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B21C: 1440FFFA bne $v0, $zero, 0xBFC2B208 */ - uint32_t psx_brA_BFC2B21C = cpu->gpr[2]; uint32_t psx_brB_BFC2B21C = cpu->gpr[0]; - psx_taken_BFC2B21C = (psx_brA_BFC2B21C != psx_brB_BFC2B21C); - psx_delay_BFC2B21C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2B220: A0AEFFFF sb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80043220u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA0AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043220u); -#endif - if (psx_delay_BFC2B21C) { - psx_delay_BFC2B21C = 0; - if (psx_taken_BFC2B21C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043208u); - goto label_BFC2B208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043224u); - } -label_BFC2B224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2B224: 03E00008 jr $ra */ - psx_delay_BFC2B224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043228u); -#endif - if (psx_delay_BFC2B224) { - psx_delay_BFC2B224 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2B22C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2B22Cu); - int psx_delay_BFC2B230 = 0; - int psx_taken_BFC2B230 = 0; - int psx_delay_BFC2B244 = 0; - int psx_taken_BFC2B244 = 0; - int psx_delay_BFC2B24C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2B238u: goto label_BFC2B238; - case 0xBFC2B24Cu: goto label_BFC2B24C; - default: break; - } - } -label_BFC2B22C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B22Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC2B22C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B230: 10400006 beq $v0, $zero, 0xBFC2B24C */ - uint32_t psx_brA_BFC2B230 = cpu->gpr[2]; uint32_t psx_brB_BFC2B230 = cpu->gpr[0]; - psx_taken_BFC2B230 = (psx_brA_BFC2B230 == psx_brB_BFC2B230); - psx_delay_BFC2B230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B234: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043234u); -#endif - if (psx_delay_BFC2B230) { - psx_delay_BFC2B230 = 0; - if (psx_taken_BFC2B230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004324Cu); - goto label_BFC2B24C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043238u); - } -label_BFC2B238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC2B238: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2B23C: A0800000 sb $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004323Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B240: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B244: 1440FFFC bne $v0, $zero, 0xBFC2B238 */ - uint32_t psx_brA_BFC2B244 = cpu->gpr[2]; uint32_t psx_brB_BFC2B244 = cpu->gpr[0]; - psx_taken_BFC2B244 = (psx_brA_BFC2B244 != psx_brB_BFC2B244); - psx_delay_BFC2B244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B248: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043248u); -#endif - if (psx_delay_BFC2B244) { - psx_delay_BFC2B244 = 0; - if (psx_taken_BFC2B244) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043238u); - goto label_BFC2B238; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004324Cu); - } -label_BFC2B24C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B24Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2B24C: 03E00008 jr $ra */ - psx_delay_BFC2B24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043250u); -#endif - if (psx_delay_BFC2B24C) { - psx_delay_BFC2B24C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2B260(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2B260u); - int psx_delay_BFC2B2D0 = 0; - int psx_delay_BFC2B2DC = 0; - int psx_delay_BFC2B2EC = 0; - int psx_taken_BFC2B2EC = 0; - int psx_delay_BFC2B304 = 0; - int psx_taken_BFC2B304 = 0; - int psx_delay_BFC2B318 = 0; - int psx_taken_BFC2B318 = 0; - int psx_delay_BFC2B330 = 0; - int psx_taken_BFC2B330 = 0; - int psx_delay_BFC2B33C = 0; - int psx_taken_BFC2B33C = 0; - int psx_delay_BFC2B344 = 0; - int psx_taken_BFC2B344 = 0; - int psx_delay_BFC2B35C = 0; - int psx_taken_BFC2B35C = 0; - int psx_delay_BFC2B364 = 0; - int psx_delay_BFC2B370 = 0; - int psx_taken_BFC2B370 = 0; - int psx_delay_BFC2B378 = 0; - int psx_taken_BFC2B378 = 0; - int psx_delay_BFC2B38C = 0; - int psx_taken_BFC2B38C = 0; - int psx_delay_BFC2B398 = 0; - int psx_taken_BFC2B398 = 0; - int psx_delay_BFC2B3C4 = 0; - int psx_taken_BFC2B3C4 = 0; - int psx_delay_BFC2B3D4 = 0; - int psx_taken_BFC2B3D4 = 0; - int psx_delay_BFC2B3E0 = 0; - int psx_taken_BFC2B3E0 = 0; - int psx_delay_BFC2B410 = 0; - int psx_taken_BFC2B410 = 0; - int psx_delay_BFC2B41C = 0; - int psx_delay_BFC2B424 = 0; - int psx_taken_BFC2B424 = 0; - int psx_delay_BFC2B42C = 0; - int psx_delay_BFC2B444 = 0; - int psx_taken_BFC2B444 = 0; - int psx_delay_BFC2B450 = 0; - int psx_taken_BFC2B450 = 0; - int psx_delay_BFC2B458 = 0; - int psx_taken_BFC2B458 = 0; - int psx_delay_BFC2B49C = 0; - int psx_delay_BFC2B678 = 0; - int psx_taken_BFC2B678 = 0; - int psx_delay_BFC2B680 = 0; - int psx_taken_BFC2B680 = 0; - int psx_delay_BFC2B688 = 0; - int psx_taken_BFC2B688 = 0; - int psx_delay_BFC2B690 = 0; - int psx_taken_BFC2B690 = 0; - int psx_delay_BFC2B6C8 = 0; - int psx_delay_BFC2B8A8 = 0; - int psx_taken_BFC2B8A8 = 0; - int psx_delay_BFC2B8B0 = 0; - int psx_taken_BFC2B8B0 = 0; - int psx_delay_BFC2B8CC = 0; - int psx_delay_BFC2B8EC = 0; - int psx_taken_BFC2B8EC = 0; - int psx_delay_BFC2B900 = 0; - int psx_taken_BFC2B900 = 0; - int psx_delay_BFC2B93C = 0; - int psx_taken_BFC2B93C = 0; - int psx_delay_BFC2B944 = 0; - int psx_taken_BFC2B944 = 0; - int psx_delay_BFC2B968 = 0; - int psx_taken_BFC2B968 = 0; - int psx_delay_BFC2BAFC = 0; - int psx_taken_BFC2BAFC = 0; - int psx_delay_BFC2BC4C = 0; - int psx_taken_BFC2BC4C = 0; - int psx_delay_BFC2BC5C = 0; - int psx_taken_BFC2BC5C = 0; - int psx_delay_BFC2BC68 = 0; - int psx_taken_BFC2BC68 = 0; - int psx_delay_BFC2BC80 = 0; - int psx_taken_BFC2BC80 = 0; - int psx_delay_BFC2BC8C = 0; - int psx_taken_BFC2BC8C = 0; - int psx_delay_BFC2BC9C = 0; - int psx_taken_BFC2BC9C = 0; - int psx_delay_BFC2BCAC = 0; - int psx_taken_BFC2BCAC = 0; - int psx_delay_BFC2BCB8 = 0; - int psx_taken_BFC2BCB8 = 0; - int psx_delay_BFC2BCE4 = 0; - int psx_delay_BFC2BD88 = 0; - int psx_taken_BFC2BD88 = 0; - int psx_delay_BFC2BD90 = 0; - int psx_taken_BFC2BD90 = 0; - int psx_delay_BFC2BD98 = 0; - int psx_taken_BFC2BD98 = 0; - int psx_delay_BFC2BDA0 = 0; - int psx_taken_BFC2BDA0 = 0; - int psx_delay_BFC2BDC8 = 0; - int psx_taken_BFC2BDC8 = 0; - int psx_delay_BFC2BDD8 = 0; - int psx_taken_BFC2BDD8 = 0; - int psx_delay_BFC2BDE8 = 0; - int psx_taken_BFC2BDE8 = 0; - int psx_delay_BFC2BDF0 = 0; - int psx_taken_BFC2BDF0 = 0; - int psx_delay_BFC2BE00 = 0; - int psx_taken_BFC2BE00 = 0; - int psx_delay_BFC2BE50 = 0; - int psx_taken_BFC2BE50 = 0; - int psx_delay_BFC2BE58 = 0; - int psx_taken_BFC2BE58 = 0; - int psx_delay_BFC2BE64 = 0; - int psx_taken_BFC2BE64 = 0; - int psx_delay_BFC2BE9C = 0; - int psx_taken_BFC2BE9C = 0; - int psx_delay_BFC2BEBC = 0; - int psx_taken_BFC2BEBC = 0; - int psx_delay_BFC2BEF8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2B2D8u: goto label_BFC2B2D8; - case 0xBFC2B2E4u: goto label_BFC2B2E4; - case 0xBFC2B2F4u: goto label_BFC2B2F4; - case 0xBFC2B304u: goto label_BFC2B304; - case 0xBFC2B30Cu: goto label_BFC2B30C; - case 0xBFC2B320u: goto label_BFC2B320; - case 0xBFC2B324u: goto label_BFC2B324; - case 0xBFC2B338u: goto label_BFC2B338; - case 0xBFC2B33Cu: goto label_BFC2B33C; - case 0xBFC2B344u: goto label_BFC2B344; - case 0xBFC2B34Cu: goto label_BFC2B34C; - case 0xBFC2B364u: goto label_BFC2B364; - case 0xBFC2B36Cu: goto label_BFC2B36C; - case 0xBFC2B378u: goto label_BFC2B378; - case 0xBFC2B380u: goto label_BFC2B380; - case 0xBFC2B384u: goto label_BFC2B384; - case 0xBFC2B394u: goto label_BFC2B394; - case 0xBFC2B3A0u: goto label_BFC2B3A0; - case 0xBFC2B3CCu: goto label_BFC2B3CC; - case 0xBFC2B3DCu: goto label_BFC2B3DC; - case 0xBFC2B3E8u: goto label_BFC2B3E8; - case 0xBFC2B418u: goto label_BFC2B418; - case 0xBFC2B424u: goto label_BFC2B424; - case 0xBFC2B42Cu: goto label_BFC2B42C; - case 0xBFC2B434u: goto label_BFC2B434; - case 0xBFC2B44Cu: goto label_BFC2B44C; - case 0xBFC2B458u: goto label_BFC2B458; - case 0xBFC2B460u: goto label_BFC2B460; - case 0xBFC2B4A4u: goto label_BFC2B4A4; - case 0xBFC2B574u: goto label_BFC2B574; - case 0xBFC2B680u: goto label_BFC2B680; - case 0xBFC2B688u: goto label_BFC2B688; - case 0xBFC2B690u: goto label_BFC2B690; - case 0xBFC2B698u: goto label_BFC2B698; - case 0xBFC2B6D0u: goto label_BFC2B6D0; - case 0xBFC2B7A4u: goto label_BFC2B7A4; - case 0xBFC2B8B0u: goto label_BFC2B8B0; - case 0xBFC2B8B8u: goto label_BFC2B8B8; - case 0xBFC2B8BCu: goto label_BFC2B8BC; - case 0xBFC2B8D4u: goto label_BFC2B8D4; - case 0xBFC2B8D8u: goto label_BFC2B8D8; - case 0xBFC2B8E4u: goto label_BFC2B8E4; - case 0xBFC2B8F4u: goto label_BFC2B8F4; - case 0xBFC2B908u: goto label_BFC2B908; - case 0xBFC2B924u: goto label_BFC2B924; - case 0xBFC2B92Cu: goto label_BFC2B92C; - case 0xBFC2B938u: goto label_BFC2B938; - case 0xBFC2B944u: goto label_BFC2B944; - case 0xBFC2B94Cu: goto label_BFC2B94C; - case 0xBFC2B970u: goto label_BFC2B970; - case 0xBFC2BB04u: goto label_BFC2BB04; - case 0xBFC2BC2Cu: goto label_BFC2BC2C; - case 0xBFC2BC48u: goto label_BFC2BC48; - case 0xBFC2BC54u: goto label_BFC2BC54; - case 0xBFC2BC64u: goto label_BFC2BC64; - case 0xBFC2BC70u: goto label_BFC2BC70; - case 0xBFC2BC88u: goto label_BFC2BC88; - case 0xBFC2BC8Cu: goto label_BFC2BC8C; - case 0xBFC2BC94u: goto label_BFC2BC94; - case 0xBFC2BCA4u: goto label_BFC2BCA4; - case 0xBFC2BCA8u: goto label_BFC2BCA8; - case 0xBFC2BCB4u: goto label_BFC2BCB4; - case 0xBFC2BCB8u: goto label_BFC2BCB8; - case 0xBFC2BCC0u: goto label_BFC2BCC0; - case 0xBFC2BCC4u: goto label_BFC2BCC4; - case 0xBFC2BCD4u: goto label_BFC2BCD4; - case 0xBFC2BCECu: goto label_BFC2BCEC; - case 0xBFC2BD90u: goto label_BFC2BD90; - case 0xBFC2BD98u: goto label_BFC2BD98; - case 0xBFC2BDA0u: goto label_BFC2BDA0; - case 0xBFC2BDA8u: goto label_BFC2BDA8; - case 0xBFC2BDACu: goto label_BFC2BDAC; - case 0xBFC2BDB4u: goto label_BFC2BDB4; - case 0xBFC2BDD0u: goto label_BFC2BDD0; - case 0xBFC2BDE0u: goto label_BFC2BDE0; - case 0xBFC2BDE8u: goto label_BFC2BDE8; - case 0xBFC2BDF0u: goto label_BFC2BDF0; - case 0xBFC2BDF8u: goto label_BFC2BDF8; - case 0xBFC2BDFCu: goto label_BFC2BDFC; - case 0xBFC2BE08u: goto label_BFC2BE08; - case 0xBFC2BE14u: goto label_BFC2BE14; - case 0xBFC2BE58u: goto label_BFC2BE58; - case 0xBFC2BE60u: goto label_BFC2BE60; - case 0xBFC2BE6Cu: goto label_BFC2BE6C; - case 0xBFC2BE78u: goto label_BFC2BE78; - case 0xBFC2BEA4u: goto label_BFC2BEA4; - case 0xBFC2BEA8u: goto label_BFC2BEA8; - case 0xBFC2BEC4u: goto label_BFC2BEC4; - case 0xBFC2BEC8u: goto label_BFC2BEC8; - default: break; - } - } -label_BFC2B260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B260: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B264: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2B268: 03A1E823 subu $sp, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[29] = cpu->gpr[29] - cpu->gpr[1]; - PGXP_ALU(0x03A1E823u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC2B26C: AFBE0058 sw $fp, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004326Cu); return; } g_debug_last_store_pc = 0x8004326Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0058u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004326Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2B270: AFBF005C sw $ra, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043270u); return; } g_debug_last_store_pc = 0x80043270u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF005Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2B274: AFB60050 sw $s6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043274u); return; } g_debug_last_store_pc = 0x80043274u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60050u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80043274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2B278: AFB70054 sw $s7, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043278u); return; } g_debug_last_store_pc = 0x80043278u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70054u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80043278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2B27C: AFB40048 sw $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004327Cu); return; } g_debug_last_store_pc = 0x8004327Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B280: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2B284: AFB5004C sw $s5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043284u); return; } g_debug_last_store_pc = 0x80043284u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5004Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80043284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2B288: 003D0821 addu $at, $at, $sp */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[29]; - PGXP_ALU(0x003D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2B28C: AFB20040 sw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004328Cu); return; } g_debug_last_store_pc = 0x8004328Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2B290: AFB30044 sw $s3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043290u); return; } g_debug_last_store_pc = 0x80043290u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30044u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80043290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2B294: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043294u); return; } g_debug_last_store_pc = 0x80043294u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80043294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2B298: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043298u); return; } g_debug_last_store_pc = 0x80043298u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80043298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B29C: AC2521D4 sw $a1, 8660($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 8660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (8660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004329Cu); return; } g_debug_last_store_pc = 0x8004329Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC2521D4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004329Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B2A0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800432A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2B2A4: 003D0821 addu $at, $at, $sp */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[29]; - PGXP_ALU(0x003D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800432A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2B2A8: AC2621D8 sw $a2, 8664($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 8664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (8664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800432A8u); return; } g_debug_last_store_pc = 0x800432A8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC2621D8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800432A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B2AC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800432ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2B2B0: 003D0821 addu $at, $at, $sp */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[29]; - PGXP_ALU(0x003D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800432B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2B2B4: AC2721DC sw $a3, 8668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + 8668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (8668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800432B4u); return; } g_debug_last_store_pc = 0x800432B4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC2721DCu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800432B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B2B8: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800432B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC2B2BC: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800432BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B2C0: 342101C4 ori $at, $at, 0x1C4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1C4u; - PGXP_ALU(0x342101C4u, cpu->gpr[1], _pgx1, 0x01C4u); } -#ifdef PSX_COSIM - cosim_instr(0x800432C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2B2C4: AFA001C0 sw $zero, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800432C4u); return; } g_debug_last_store_pc = 0x800432C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA001C0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800432C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2B2C8: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800432C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000012u); -#endif - /* 0xBFC2B2CC: 03A12021 addu $a0, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A12021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800432CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B2D0: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x800432D8u; /* jal link before delay slot */ - psx_delay_BFC2B2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2B2D4: 24052000 addiu $a1, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24052000u, cpu->gpr[5], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x800432D4u); -#endif - if (psx_delay_BFC2B2D0) { - psx_delay_BFC2B2D0 = 0; - cpu->gpr[31] = 0x800432D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2B2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2B2D8: 27A401C4 addiu $a0, $sp, 452 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (452)); - PGXP_ALU(0x27A401C4u, cpu->gpr[4], _pgx1, 0x000001C4u); } -#ifdef PSX_COSIM - cosim_instr(0x800432D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B2DC: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x800432E4u; /* jal link before delay slot */ - psx_delay_BFC2B2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B2E0: 3C050001 lui $a1, 0x1 */ - cpu->gpr[5] = 0x00010000u; - PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800432E0u); -#endif - if (psx_delay_BFC2B2DC) { - psx_delay_BFC2B2DC = 0; - cpu->gpr[31] = 0x800432E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2B2E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B2E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432E4u); -#endif - /* 0xBFC2B2E4: 92C40000 lbu $a0, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (0)), 4, 0x400000u); - PGXP_LOAD(0x92C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800432E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B2E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800432E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2B2EC: 10800186 beq $a0, $zero, 0xBFC2B908 */ - uint32_t psx_brA_BFC2B2EC = cpu->gpr[4]; uint32_t psx_brB_BFC2B2EC = cpu->gpr[0]; - psx_taken_BFC2B2EC = (psx_brA_BFC2B2EC == psx_brB_BFC2B2EC); - psx_delay_BFC2B2EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B2F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800432F0u); -#endif - if (psx_delay_BFC2B2EC) { - psx_delay_BFC2B2EC = 0; - if (psx_taken_BFC2B2EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043908u); - goto label_BFC2B908; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800432F4u); - } -label_BFC2B2F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B2F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800432F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2B2F4: 3C17BFC6 lui $s7, 0xBFC6 */ - cpu->gpr[23] = 0xBFC60000u; - PGXP_ALU(0x3C17BFC6u, cpu->gpr[23], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800432F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2B2F8: 36F76000 ori $s7, $s7, 0x6000 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = cpu->gpr[23] | 0x6000u; - PGXP_ALU(0x36F76000u, cpu->gpr[23], _pgx1, 0x6000u); } -#ifdef PSX_COSIM - cosim_instr(0x800432F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2B2FC: 2412000F addiu $s2, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2412000Fu, cpu->gpr[18], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800432FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2B300: 241E000A addiu $fp, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x241E000Au, cpu->gpr[30], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80043300u); -#endif -label_BFC2B304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000010u); -#endif - /* 0xBFC2B304: 17C4000D bne $fp, $a0, 0xBFC2B33C */ - uint32_t psx_brA_BFC2B304 = cpu->gpr[30]; uint32_t psx_brB_BFC2B304 = cpu->gpr[4]; - psx_taken_BFC2B304 = (psx_brA_BFC2B304 != psx_brB_BFC2B304); - psx_delay_BFC2B304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2B308: 2C810081 sltiu $at, $a0, 129 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x80043308u); -#endif - if (psx_delay_BFC2B304) { - psx_delay_BFC2B304 = 0; - if (psx_taken_BFC2B304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004333Cu); - goto label_BFC2B33C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004330Cu); - } -label_BFC2B30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004330Cu); -#endif - /* 0xBFC2B30C: 8FAE01C0 lw $t6, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004330Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE01C0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2B310: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B314: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2B318: 05C10002 bgez $t6, 0xBFC2B324 */ - uint32_t psx_brA_BFC2B318 = cpu->gpr[14]; - psx_taken_BFC2B318 = ((int32_t)psx_brA_BFC2B318 >= 0); - psx_delay_BFC2B318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC2B31C: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004331Cu); -#endif - if (psx_delay_BFC2B318) { - psx_delay_BFC2B318 = 0; - if (psx_taken_BFC2B318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043324u); - goto label_BFC2B324; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043320u); - } -label_BFC2B320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B320: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043320u); -#endif -label_BFC2B324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2B324: 00017903 sra $t7, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00017903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B328: 000FC100 sll $t8, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000FC100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B32C: 27190010 addiu $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (16)); - PGXP_ALU(0x27190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B330: 1000016C beq $zero, $zero, 0xBFC2B8E4 */ - uint32_t psx_brA_BFC2B330 = cpu->gpr[0]; uint32_t psx_brB_BFC2B330 = cpu->gpr[0]; - psx_taken_BFC2B330 = (psx_brA_BFC2B330 == psx_brB_BFC2B330); - psx_delay_BFC2B330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2B334: AFB901C0 sw $t9, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043334u); return; } g_debug_last_store_pc = 0x80043334u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB901C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043334u); -#endif - if (psx_delay_BFC2B330) { - psx_delay_BFC2B330 = 0; - if (psx_taken_BFC2B330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438E4u); - goto label_BFC2B8E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043338u); - } -label_BFC2B338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2B338: 2C810081 sltiu $at, $a0, 129 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000081u ? 1 : 0); - PGXP_ALU(0x2C810081u, cpu->gpr[1], _pgx1, 0x0081u); } -#ifdef PSX_COSIM - cosim_instr(0x80043338u); -#endif -label_BFC2B33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004333Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B33C: 14200009 bne $at, $zero, 0xBFC2B364 */ - uint32_t psx_brA_BFC2B33C = cpu->gpr[1]; uint32_t psx_brB_BFC2B33C = cpu->gpr[0]; - psx_taken_BFC2B33C = (psx_brA_BFC2B33C != psx_brB_BFC2B33C); - psx_delay_BFC2B33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2B340: 2C810099 sltiu $at, $a0, 153 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000099u ? 1 : 0); - PGXP_ALU(0x2C810099u, cpu->gpr[1], _pgx1, 0x0099u); } -#ifdef PSX_COSIM - cosim_instr(0x80043340u); -#endif - if (psx_delay_BFC2B33C) { - psx_delay_BFC2B33C = 0; - if (psx_taken_BFC2B33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043364u); - goto label_BFC2B364; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043344u); - } -label_BFC2B344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B344: 10200007 beq $at, $zero, 0xBFC2B364 */ - uint32_t psx_brA_BFC2B344 = cpu->gpr[1]; uint32_t psx_brB_BFC2B344 = cpu->gpr[0]; - psx_taken_BFC2B344 = (psx_brA_BFC2B344 == psx_brB_BFC2B344); - psx_delay_BFC2B344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043348u); -#endif - if (psx_delay_BFC2B344) { - psx_delay_BFC2B344 = 0; - if (psx_taken_BFC2B344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043364u); - goto label_BFC2B364; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004334Cu); - } -label_BFC2B34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004334Cu); -#endif - /* 0xBFC2B34C: 92CF0001 lbu $t7, 1($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 1; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (1)), 15, 0x400000u); - PGXP_LOAD(0x92CF0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004334Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2B350: 00047200 sll $t6, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 8u; - PGXP_ALU(0x00047200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2B354: 01CF2825 or $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF2825u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B358: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B35C: 10000009 beq $zero, $zero, 0xBFC2B384 */ - uint32_t psx_brA_BFC2B35C = cpu->gpr[0]; uint32_t psx_brB_BFC2B35C = cpu->gpr[0]; - psx_taken_BFC2B35C = (psx_brA_BFC2B35C == psx_brB_BFC2B35C); - psx_delay_BFC2B35C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2B360: 26D60002 addiu $s6, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (2)); - PGXP_ALU(0x26D60002u, cpu->gpr[22], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80043360u); -#endif - if (psx_delay_BFC2B35C) { - psx_delay_BFC2B35C = 0; - if (psx_taken_BFC2B35C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043384u); - goto label_BFC2B384; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043364u); - } -label_BFC2B364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B364: 0C010C2A jal 0xB00430A8 */ - cpu->gpr[31] = 0x8004336Cu; /* jal link before delay slot */ - psx_delay_BFC2B364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043368u); -#endif - if (psx_delay_BFC2B364) { - psx_delay_BFC2B364 = 0; - cpu->gpr[31] = 0x8004336Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800430A8u); - cpu->pc = 0x800430A8u; return; - } -label_BFC2B36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B36C: 3058FFFF andi $t8, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3058FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2B370: 17000003 bne $t8, $zero, 0xBFC2B380 */ - uint32_t psx_brA_BFC2B370 = cpu->gpr[24]; uint32_t psx_brB_BFC2B370 = cpu->gpr[0]; - psx_taken_BFC2B370 = (psx_brA_BFC2B370 != psx_brB_BFC2B370); - psx_delay_BFC2B370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2B374: 3045FFFF andi $a1, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043374u); -#endif - if (psx_delay_BFC2B370) { - psx_delay_BFC2B370 = 0; - if (psx_taken_BFC2B370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043380u); - goto label_BFC2B380; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043378u); - } -label_BFC2B378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B378: 100002D3 beq $zero, $zero, 0xBFC2BEC8 */ - uint32_t psx_brA_BFC2B378 = cpu->gpr[0]; uint32_t psx_brB_BFC2B378 = cpu->gpr[0]; - psx_taken_BFC2B378 = (psx_brA_BFC2B378 == psx_brB_BFC2B378); - psx_delay_BFC2B378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B37C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004337Cu); -#endif - if (psx_delay_BFC2B378) { - psx_delay_BFC2B378 = 0; - if (psx_taken_BFC2B378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC8u); - goto label_BFC2BEC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043380u); - } -label_BFC2B380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2B380: 26D60001 addiu $s6, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); - PGXP_ALU(0x26D60001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043380u); -#endif -label_BFC2B384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B384: 34018140 ori $at, $zero, 0x8140 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x8140u; - PGXP_ALU(0x34018140u, cpu->gpr[1], _pgx1, 0x8140u); } -#ifdef PSX_COSIM - cosim_instr(0x80043384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B388: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B38C: 1420000F bne $at, $zero, 0xBFC2B3CC */ - uint32_t psx_brA_BFC2B38C = cpu->gpr[1]; uint32_t psx_brB_BFC2B38C = cpu->gpr[0]; - psx_taken_BFC2B38C = (psx_brA_BFC2B38C != psx_brB_BFC2B38C); - psx_delay_BFC2B38C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B390: 340184BF ori $at, $zero, 0x84BF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x84BFu; - PGXP_ALU(0x340184BFu, cpu->gpr[1], _pgx1, 0x84BFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043390u); -#endif - if (psx_delay_BFC2B38C) { - psx_delay_BFC2B38C = 0; - if (psx_taken_BFC2B38C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433CCu); - goto label_BFC2B3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043394u); - } -label_BFC2B394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B394: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B398: 1020000C beq $at, $zero, 0xBFC2B3CC */ - uint32_t psx_brA_BFC2B398 = cpu->gpr[1]; uint32_t psx_brB_BFC2B398 = cpu->gpr[0]; - psx_taken_BFC2B398 = (psx_brA_BFC2B398 == psx_brB_BFC2B398); - psx_delay_BFC2B398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B39C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004339Cu); -#endif - if (psx_delay_BFC2B398) { - psx_delay_BFC2B398 = 0; - if (psx_taken_BFC2B398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433CCu); - goto label_BFC2B3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433A0u); - } -label_BFC2B3A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B3A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3A0: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x800433A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2B3A4: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433A4u); -#endif - /* 0xBFC2B3A8: 8FB901C0 lw $t9, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800433A8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB901C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800433A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3AC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800433ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3B0: 342101C4 ori $at, $at, 0x1C4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1C4u; - PGXP_ALU(0x342101C4u, cpu->gpr[1], _pgx1, 0x01C4u); } -#ifdef PSX_COSIM - cosim_instr(0x800433B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000002u); -#endif - /* 0xBFC2B3B4: 03A1C021 addu $t8, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B3B8: 00197940 sll $t7, $t9, 5 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 5u; - PGXP_ALU(0x00197940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800433B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1208000u); -#endif - /* 0xBFC2B3BC: 01F8A821 addu $s5, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[21] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810001u); -#endif - /* 0xBFC2B3C0: 02E08021 addu $s0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B3C4: 10000019 beq $zero, $zero, 0xBFC2B42C */ - uint32_t psx_brA_BFC2B3C4 = cpu->gpr[0]; uint32_t psx_brB_BFC2B3C4 = cpu->gpr[0]; - psx_taken_BFC2B3C4 = (psx_brA_BFC2B3C4 == psx_brB_BFC2B3C4); - psx_delay_BFC2B3C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2104000u); -#endif - /* 0xBFC2B3C8: 032EA021 addu $s4, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[20] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032EA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433C8u); -#endif - if (psx_delay_BFC2B3C4) { - psx_delay_BFC2B3C4 = 0; - if (psx_taken_BFC2B3C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004342Cu); - goto label_BFC2B42C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433CCu); - } -label_BFC2B3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B3CC: 3401889F ori $at, $zero, 0x889F */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x889Fu; - PGXP_ALU(0x3401889Fu, cpu->gpr[1], _pgx1, 0x889Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800433CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B3D0: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B3D4: 14200010 bne $at, $zero, 0xBFC2B418 */ - uint32_t psx_brA_BFC2B3D4 = cpu->gpr[1]; uint32_t psx_brB_BFC2B3D4 = cpu->gpr[0]; - psx_taken_BFC2B3D4 = (psx_brA_BFC2B3D4 != psx_brB_BFC2B3D4); - psx_delay_BFC2B3D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B3D8: 34019873 ori $at, $zero, 0x9873 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0x9873u; - PGXP_ALU(0x34019873u, cpu->gpr[1], _pgx1, 0x9873u); } -#ifdef PSX_COSIM - cosim_instr(0x800433D8u); -#endif - if (psx_delay_BFC2B3D4) { - psx_delay_BFC2B3D4 = 0; - if (psx_taken_BFC2B3D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043418u); - goto label_BFC2B418; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433DCu); - } -label_BFC2B3DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B3DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2B3DC: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B3E0: 1020000D beq $at, $zero, 0xBFC2B418 */ - uint32_t psx_brA_BFC2B3E0 = cpu->gpr[1]; uint32_t psx_brB_BFC2B3E0 = cpu->gpr[0]; - psx_taken_BFC2B3E0 = (psx_brA_BFC2B3E0 == psx_brB_BFC2B3E0); - psx_delay_BFC2B3E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3E4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800433E4u); -#endif - if (psx_delay_BFC2B3E0) { - psx_delay_BFC2B3E0 = 0; - if (psx_taken_BFC2B3E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043418u); - goto label_BFC2B418; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800433E8u); - } -label_BFC2B3E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B3E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3E8: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x800433E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2B3EC: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800433F0u); -#endif - /* 0xBFC2B3F0: 8FA201C0 lw $v0, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800433F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA201C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800433F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3F4: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800433F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B3F8: 342101C4 ori $at, $at, 0x1C4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1C4u; - PGXP_ALU(0x342101C4u, cpu->gpr[1], _pgx1, 0x01C4u); } -#ifdef PSX_COSIM - cosim_instr(0x800433F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008002u); -#endif - /* 0xBFC2B3FC: 03A17821 addu $t7, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800433FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2B400: 3C10BFC6 lui $s0, 0xBFC6 */ - cpu->gpr[16] = 0xBFC60000u; - PGXP_ALU(0x3C10BFC6u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B404: 0002C940 sll $t9, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 5u; - PGXP_ALU(0x0002C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80043404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2208000u); -#endif - /* 0xBFC2B408: 032FA821 addu $s5, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[21] = cpu->gpr[25] + cpu->gpr[15]; - PGXP_ALU(0x032FA821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2B40C: 36109D68 ori $s0, $s0, 0x9D68 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] | 0x9D68u; - PGXP_ALU(0x36109D68u, cpu->gpr[16], _pgx1, 0x9D68u); } -#ifdef PSX_COSIM - cosim_instr(0x8004340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B410: 10000006 beq $zero, $zero, 0xBFC2B42C */ - uint32_t psx_brA_BFC2B410 = cpu->gpr[0]; uint32_t psx_brB_BFC2B410 = cpu->gpr[0]; - psx_taken_BFC2B410 = (psx_brA_BFC2B410 == psx_brB_BFC2B410); - psx_delay_BFC2B410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104004u); -#endif - /* 0xBFC2B414: 004EA021 addu $s4, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[20] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004EA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043414u); -#endif - if (psx_delay_BFC2B410) { - psx_delay_BFC2B410 = 0; - if (psx_taken_BFC2B410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004342Cu); - goto label_BFC2B42C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043418u); - } -label_BFC2B418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B418: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B41C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80043424u; /* jal link before delay slot */ - psx_delay_BFC2B41C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B420: 248482FC addiu $a0, $a0, -32004 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-32004)); - PGXP_ALU(0x248482FCu, cpu->gpr[4], _pgx1, 0xFFFF82FCu); } -#ifdef PSX_COSIM - cosim_instr(0x80043420u); -#endif - if (psx_delay_BFC2B41C) { - psx_delay_BFC2B41C = 0; - cpu->gpr[31] = 0x80043424u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC2B424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B424: 100002A8 beq $zero, $zero, 0xBFC2BEC8 */ - uint32_t psx_brA_BFC2B424 = cpu->gpr[0]; uint32_t psx_brB_BFC2B424 = cpu->gpr[0]; - psx_taken_BFC2B424 = (psx_brA_BFC2B424 == psx_brB_BFC2B424); - psx_delay_BFC2B424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B428: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043428u); -#endif - if (psx_delay_BFC2B424) { - psx_delay_BFC2B424 = 0; - if (psx_taken_BFC2B424) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC8u); - goto label_BFC2BEC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004342Cu); - } -label_BFC2B42C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B42Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004342Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B42C: 0C010B34 jal 0xB0042CD0 */ - cpu->gpr[31] = 0x80043434u; /* jal link before delay slot */ - psx_delay_BFC2B42C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC2B430: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043430u); -#endif - if (psx_delay_BFC2B42C) { - psx_delay_BFC2B42C = 0; - cpu->gpr[31] = 0x80043434u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80042CD0u); - cpu->pc = 0x80042CD0u; return; - } -label_BFC2B434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B434: 0002C100 sll $t8, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 4u; - PGXP_ALU(0x0002C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B438: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2B43C: 0018C040 sll $t8, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 1u; - PGXP_ALU(0x0018C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004343Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2B440: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC2B444: 16170090 bne $s0, $s7, 0xBFC2B688 */ - uint32_t psx_brA_BFC2B444 = cpu->gpr[16]; uint32_t psx_brB_BFC2B444 = cpu->gpr[23]; - psx_taken_BFC2B444 = (psx_brA_BFC2B444 != psx_brB_BFC2B444); - psx_delay_BFC2B444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010010u); -#endif - /* 0xBFC2B448: 02182021 addu $a0, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02182021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043448u); -#endif - if (psx_delay_BFC2B444) { - psx_delay_BFC2B444 = 0; - if (psx_taken_BFC2B444) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043688u); - goto label_BFC2B688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004344Cu); - } -label_BFC2B44C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B44Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004344Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2B44C: 28410093 slti $at, $v0, 147 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (147) ? 1 : 0); - PGXP_ALU(0x28410093u, cpu->gpr[1], _pgx1, 0x0093u); } -#ifdef PSX_COSIM - cosim_instr(0x8004344Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B450: 1420008D bne $at, $zero, 0xBFC2B688 */ - uint32_t psx_brA_BFC2B450 = cpu->gpr[1]; uint32_t psx_brB_BFC2B450 = cpu->gpr[0]; - psx_taken_BFC2B450 = (psx_brA_BFC2B450 != psx_brB_BFC2B450); - psx_delay_BFC2B450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2B454: 284100D1 slti $at, $v0, 209 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (209) ? 1 : 0); - PGXP_ALU(0x284100D1u, cpu->gpr[1], _pgx1, 0x00D1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043454u); -#endif - if (psx_delay_BFC2B450) { - psx_delay_BFC2B450 = 0; - if (psx_taken_BFC2B450) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043688u); - goto label_BFC2B688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043458u); - } -label_BFC2B458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B458: 1020008B beq $at, $zero, 0xBFC2B688 */ - uint32_t psx_brA_BFC2B458 = cpu->gpr[1]; uint32_t psx_brB_BFC2B458 = cpu->gpr[0]; - psx_taken_BFC2B458 = (psx_brA_BFC2B458 == psx_brB_BFC2B458); - psx_delay_BFC2B458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B45C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004345Cu); -#endif - if (psx_delay_BFC2B458) { - psx_delay_BFC2B458 = 0; - if (psx_taken_BFC2B458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043688u); - goto label_BFC2B688; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043460u); - } -label_BFC2B460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2B460: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2B464: 27398200 addiu $t9, $t9, -32256 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-32256)); - PGXP_ALU(0x27398200u, cpu->gpr[25], _pgx1, 0xFFFF8200u); } -#ifdef PSX_COSIM - cosim_instr(0x80043464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2B468: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2014000u); -#endif - /* 0xBFC2B46C: 01D98021 addu $s0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D98021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043470u); -#endif - /* 0xBFC2B470: 960FFDB6 lhu $t7, -586($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -586; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-586)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043470u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x960FFDB6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B474: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2B478: 00340821 addu $at, $at, $s4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[20]; - PGXP_ALU(0x00340821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2B47C: A02FDED0 sb $t7, -8496($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8496; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004347Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-8496)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FDED0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043480u); -#endif - /* 0xBFC2B480: 8FB801C0 lw $t8, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043480u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB801C0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B484: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B488: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000002u); -#endif - /* 0xBFC2B48C: 03A1C821 addu $t9, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B490: 00187140 sll $t6, $t8, 5 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 5u; - PGXP_ALU(0x00187140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80043490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024000u); -#endif - /* 0xBFC2B494: 01D98821 addu $s1, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[17] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D98821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC2B498: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B49C: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x800434A4u; /* jal link before delay slot */ - psx_delay_BFC2B49C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2B4A0: 2406001E addiu $a2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2406001Eu, cpu->gpr[6], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800434A0u); -#endif - if (psx_delay_BFC2B49C) { - psx_delay_BFC2B49C = 0; - cpu->gpr[31] = 0x800434A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2B4A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B4A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2B4A4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800434A4u); -#endif - /* 0xBFC2B4A8: 9485DFF4 lhu $a1, -8204($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800434A8u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10u); } - PGXP_LOAD(0x9485DFF4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800434A8u); -#endif - /* 0xBFC2B4AC: 9608FDB4 lhu $t0, -588($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -588; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-588)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800434ACu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10000u); } - PGXP_LOAD(0x9608FDB4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800434ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2B4B0: 30AF00FF andi $t7, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30AF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2B4B4: 00057202 srl $t6, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] >> 8u; - PGXP_ALU(0x00057202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B4B8: 31D900FF andi $t9, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B4BC: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B4C0: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800434C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B4C4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B4C8: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800434C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B4CC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B4D0: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B4D4: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B4D8: 0002C202 srl $t8, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B4DC: 331900FF andi $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B4E0: 000F7200 sll $t6, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000F7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434E0u); -#endif - /* 0xBFC2B4E4: 9486DFF6 lhu $a2, -8202($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800434E4u); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x9486DFF6u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800434E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B4E8: 01D97825 or $t7, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D97825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800434E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2B4EC: A48FDFF4 sh $t7, -8204($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800434ECu); return; } g_debug_last_store_pc = 0x800434ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48FDFF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800434ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800434F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC2B4F0: 0006CA02 srl $t9, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x0006CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2B4F4: 30D800FF andi $t8, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30D800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B4F8: 00187200 sll $t6, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800434F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B4FC: 332F00FF andi $t7, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800434FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B500: 01CF1025 or $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B504: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B508: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B50C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B510: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B514: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B518: 00027202 srl $t6, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B51C: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B520: 0018CA00 sll $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 8u; - PGXP_ALU(0x0018CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043520u); -#endif - /* 0xBFC2B524: 9487DFF8 lhu $a3, -8200($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043524u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x9487DFF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80043524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B528: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2B52C: A498DFF6 sh $t8, -8202($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004352Cu); return; } g_debug_last_store_pc = 0x8004352Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA498DFF6u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004352Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC2B530: 00077A02 srl $t7, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] >> 8u; - PGXP_ALU(0x00077A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2B534: 30EE00FF andi $t6, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B538: 000ECA00 sll $t9, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000ECA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B53C: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004353Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B540: 03381025 or $v0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03381025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B544: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B548: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B54C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004354Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B550: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B554: 304E00FF andi $t6, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B558: 0002CA02 srl $t9, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B55C: 333800FF andi $t8, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004355Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B560: 000E7A00 sll $t7, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000E7A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2B564: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2B568: A48EDFF8 sh $t6, -8200($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043568u); return; } g_debug_last_store_pc = 0x80043568u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48EDFF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2B56C: 24140003 addiu $s4, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24140003u, cpu->gpr[20], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC2B570: 26230006 addiu $v1, $s1, 6 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] + (6)); - PGXP_ALU(0x26230006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80043570u); -#endif -label_BFC2B574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043574u); -#endif - /* 0xBFC2B574: 9464DFF4 lhu $a0, -8204($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043574u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x9464DFF4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80043574u); -#endif - /* 0xBFC2B578: 9465DFF6 lhu $a1, -8202($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043578u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x9465DFF6u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80043578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC2B57C: 309900FF andi $t9, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x309900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2B580: 0004C202 srl $t8, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] >> 8u; - PGXP_ALU(0x0004C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B584: 330E00FF andi $t6, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B588: 00197A00 sll $t7, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00197A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B58C: 01EE1025 or $v0, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EE1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B590: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B594: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B598: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B59C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004359Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B5A0: 305900FF andi $t9, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B5A4: 00027A02 srl $t7, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B5A8: 31EE00FF andi $t6, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B5AC: 0019C200 sll $t8, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 8u; - PGXP_ALU(0x0019C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B5B0: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800435B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2B5B4: A479DFF4 sh $t9, -8204($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800435B4u); return; } g_debug_last_store_pc = 0x800435B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800435B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2B5B8: 00057202 srl $t6, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] >> 8u; - PGXP_ALU(0x00057202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2B5BC: 30AF00FF andi $t7, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30AF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B5C0: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B5C4: 31D900FF andi $t9, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B5C8: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800435C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B5CC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B5D0: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800435D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B5D4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B5D8: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B5DC: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B5E0: 0002C202 srl $t8, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B5E4: 331900FF andi $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B5E8: 000F7200 sll $t6, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000F7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435E8u); -#endif - /* 0xBFC2B5EC: 9466DFF8 lhu $a2, -8200($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800435ECu); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x9466DFF8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800435ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800435F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B5F0: 01D97825 or $t7, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D97825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800435F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2B5F4: A46FDFF6 sh $t7, -8202($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800435F4u); return; } g_debug_last_store_pc = 0x800435F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46FDFF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800435F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC2B5F8: 0006CA02 srl $t9, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x0006CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800435F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2B5FC: 30D800FF andi $t8, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30D800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800435FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B600: 00187200 sll $t6, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B604: 332F00FF andi $t7, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B608: 01CF1025 or $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B60C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004360Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B610: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B614: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B618: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B61C: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B620: 00027202 srl $t6, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B624: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B628: 0018CA00 sll $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 8u; - PGXP_ALU(0x0018CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043628u); -#endif - /* 0xBFC2B62C: 9467DFFA lhu $a3, -8198($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8198; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004362Cu); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x9467DFFAu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B630: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2B634: A478DFF8 sh $t8, -8200($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043634u); return; } g_debug_last_store_pc = 0x80043634u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA478DFF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC2B638: 00077A02 srl $t7, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] >> 8u; - PGXP_ALU(0x00077A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2B63C: 30EE00FF andi $t6, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004363Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B640: 000ECA00 sll $t9, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000ECA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B644: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B648: 03381025 or $v0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03381025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B64C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B650: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B654: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B658: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B65C: 304E00FF andi $t6, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004365Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B660: 0002CA02 srl $t9, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B664: 333800FF andi $t8, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B668: 000E7A00 sll $t7, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000E7A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2B66C: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004366Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2B670: 26940004 addiu $s4, $s4, 4 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (4)); - PGXP_ALU(0x26940004u, cpu->gpr[20], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2B674: A46EDFFA sh $t6, -8198($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043674u); return; } g_debug_last_store_pc = 0x80043674u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46EDFFAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140000u); -#endif - /* 0xBFC2B678: 1692FFBE bne $s4, $s2, 0xBFC2B574 */ - uint32_t psx_brA_BFC2B678 = cpu->gpr[20]; uint32_t psx_brB_BFC2B678 = cpu->gpr[18]; - psx_taken_BFC2B678 = (psx_brA_BFC2B678 != psx_brB_BFC2B678); - psx_delay_BFC2B678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2B67C: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004367Cu); -#endif - if (psx_delay_BFC2B678) { - psx_delay_BFC2B678 = 0; - if (psx_taken_BFC2B678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043574u); - goto label_BFC2B574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043680u); - } -label_BFC2B680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B680: 10000095 beq $zero, $zero, 0xBFC2B8D8 */ - uint32_t psx_brA_BFC2B680 = cpu->gpr[0]; uint32_t psx_brB_BFC2B680 = cpu->gpr[0]; - psx_taken_BFC2B680 = (psx_brA_BFC2B680 == psx_brB_BFC2B680); - psx_delay_BFC2B680 = 1; - /* 0xBFC2B684: 8FB901C0 lw $t9, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043684u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB901C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043684u); -#endif - if (psx_delay_BFC2B680) { - psx_delay_BFC2B680 = 0; - if (psx_taken_BFC2B680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438D8u); - goto label_BFC2B8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043688u); - } -label_BFC2B688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810000u); -#endif - /* 0xBFC2B688: 1617008C bne $s0, $s7, 0xBFC2B8BC */ - uint32_t psx_brA_BFC2B688 = cpu->gpr[16]; uint32_t psx_brB_BFC2B688 = cpu->gpr[23]; - psx_taken_BFC2B688 = (psx_brA_BFC2B688 != psx_brB_BFC2B688); - psx_delay_BFC2B688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B68C: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004368Cu); -#endif - if (psx_delay_BFC2B688) { - psx_delay_BFC2B688 = 0; - if (psx_taken_BFC2B688) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438BCu); - goto label_BFC2B8BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043690u); - } -label_BFC2B690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B690: 1440008A bne $v0, $zero, 0xBFC2B8BC */ - uint32_t psx_brA_BFC2B690 = cpu->gpr[2]; uint32_t psx_brB_BFC2B690 = cpu->gpr[0]; - psx_taken_BFC2B690 = (psx_brA_BFC2B690 != psx_brB_BFC2B690); - psx_delay_BFC2B690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B694: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043694u); -#endif - if (psx_delay_BFC2B690) { - psx_delay_BFC2B690 = 0; - if (psx_taken_BFC2B690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438BCu); - goto label_BFC2B8BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043698u); - } -label_BFC2B698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2B698: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043698u); -#endif - /* 0xBFC2B69C: 973982FA lhu $t9, -32006($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -32006; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-32006)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004369Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x973982FAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004369Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B6A0: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800436A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2B6A4: 00340821 addu $at, $at, $s4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[20]; - PGXP_ALU(0x00340821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2B6A8: A039DED0 sb $t9, -8496($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8496; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800436A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-8496)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA039DED0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800436A8u); -#endif - /* 0xBFC2B6AC: 8FAF01C0 lw $t7, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800436ACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF01C0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800436ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B6B0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800436B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B6B4: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x800436B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2B6B8: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B6BC: 000FC140 sll $t8, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000FC140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800436BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1024000u); -#endif - /* 0xBFC2B6C0: 030E8821 addu $s1, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC2B6C4: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B6C8: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x800436D0u; /* jal link before delay slot */ - psx_delay_BFC2B6C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2B6CC: 2406001E addiu $a2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2406001Eu, cpu->gpr[6], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800436CCu); -#endif - if (psx_delay_BFC2B6C8) { - psx_delay_BFC2B6C8 = 0; - cpu->gpr[31] = 0x800436D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2B6D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B6D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2B6D0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436D0u); -#endif - /* 0xBFC2B6D4: 9485DFF4 lhu $a1, -8204($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800436D4u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10u); } - PGXP_LOAD(0x9485DFF4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800436D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2B6D8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800436D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2B6DC: 30B900FF andi $t9, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30B900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800436DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC2B6E0: 0005C202 srl $t8, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] >> 8u; - PGXP_ALU(0x0005C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800436E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B6E4: 330E00FF andi $t6, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800436E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B6E8: 00197A00 sll $t7, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00197A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800436E8u); -#endif - /* 0xBFC2B6EC: 950882F8 lhu $t0, -32008($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -32008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-32008)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800436ECu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x950882F8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800436ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800436F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B6F0: 01EE1025 or $v0, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EE1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B6F4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800436F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B6F8: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800436F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B6FC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800436FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B700: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B704: 305900FF andi $t9, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B708: 00027A02 srl $t7, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B70C: 31EE00FF andi $t6, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B710: 0019C200 sll $t8, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 8u; - PGXP_ALU(0x0019C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043710u); -#endif - /* 0xBFC2B714: 9486DFF6 lhu $a2, -8202($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043714u); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x9486DFF6u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80043714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B718: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC2B71C: A499DFF4 sh $t9, -8204($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004371Cu); return; } g_debug_last_store_pc = 0x8004371Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA499DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC2B720: 00067202 srl $t6, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x00067202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC2B724: 30CF00FF andi $t7, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B728: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B72C: 31D900FF andi $t9, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004372Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B730: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B734: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B738: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B73C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004373Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B740: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B744: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B748: 0002C202 srl $t8, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B74C: 331900FF andi $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004374Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B750: 000F7200 sll $t6, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000F7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043750u); -#endif - /* 0xBFC2B754: 9487DFF8 lhu $a3, -8200($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043754u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x9487DFF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80043754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B758: 01D97825 or $t7, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D97825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2B75C: A48FDFF6 sh $t7, -8202($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004375Cu); return; } g_debug_last_store_pc = 0x8004375Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48FDFF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004375Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2B760: 0007CA02 srl $t9, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] >> 8u; - PGXP_ALU(0x0007CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC2B764: 30F800FF andi $t8, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B768: 00187200 sll $t6, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B76C: 332F00FF andi $t7, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004376Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B770: 01CF1025 or $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B774: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B778: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B77C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004377Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B780: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B784: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B788: 00027202 srl $t6, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B78C: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004378Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B790: 0018CA00 sll $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 8u; - PGXP_ALU(0x0018CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B794: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2B798: A498DFF8 sh $t8, -8200($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043798u); return; } g_debug_last_store_pc = 0x80043798u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA498DFF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2B79C: 24140003 addiu $s4, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24140003u, cpu->gpr[20], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC2B7A0: 26230006 addiu $v1, $s1, 6 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] + (6)); - PGXP_ALU(0x26230006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x800437A0u); -#endif -label_BFC2B7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437A4u); -#endif - /* 0xBFC2B7A4: 9464DFF4 lhu $a0, -8204($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800437A4u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x9464DFF4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800437A4u); -#endif - /* 0xBFC2B7A8: 9465DFF6 lhu $a1, -8202($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800437A8u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x9465DFF6u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800437A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2B7AC: 308E00FF andi $t6, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2B7B0: 00047A02 srl $t7, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] >> 8u; - PGXP_ALU(0x00047A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B7B4: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B7B8: 000ECA00 sll $t9, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000ECA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B7BC: 03381025 or $v0, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03381025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800437BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B7C0: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B7C4: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800437C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B7C8: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B7CC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B7D0: 304E00FF andi $t6, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B7D4: 0002CA02 srl $t9, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B7D8: 333800FF andi $t8, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x333800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B7DC: 000E7A00 sll $t7, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000E7A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2B7E0: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800437E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2B7E4: A46EDFF4 sh $t6, -8204($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800437E4u); return; } g_debug_last_store_pc = 0x800437E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46EDFF4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800437E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC2B7E8: 0005C202 srl $t8, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] >> 8u; - PGXP_ALU(0x0005C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2B7EC: 30B900FF andi $t9, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30B900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800437F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B7F0: 00197A00 sll $t7, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00197A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800437F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B7F4: 330E00FF andi $t6, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x330E00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B7F8: 01EE1025 or $v0, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EE1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800437F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B7FC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800437FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B800: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B804: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B808: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2B80C: 305900FF andi $t9, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B810: 00027A02 srl $t7, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027A02u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B814: 31EE00FF andi $t6, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31EE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B818: 0019C200 sll $t8, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 8u; - PGXP_ALU(0x0019C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043818u); -#endif - /* 0xBFC2B81C: 9466DFF8 lhu $a2, -8200($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004381Cu); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x9466DFF8u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004381Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B820: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2B824: A479DFF6 sh $t9, -8202($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043824u); return; } g_debug_last_store_pc = 0x80043824u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479DFF6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC2B828: 00067202 srl $t6, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] >> 8u; - PGXP_ALU(0x00067202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC2B82C: 30CF00FF andi $t7, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2B830: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2B834: 31D900FF andi $t9, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31D900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC2B838: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B83C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B840: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B844: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B848: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2B84C: 304F00FF andi $t7, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004384Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B850: 0002C202 srl $t8, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002C202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B854: 331900FF andi $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B858: 000F7200 sll $t6, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000F7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043858u); -#endif - /* 0xBFC2B85C: 9467DFFA lhu $a3, -8198($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8198; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004385Cu); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x9467DFFAu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B860: 01D97825 or $t7, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D97825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2B864: A46FDFF8 sh $t7, -8200($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043864u); return; } g_debug_last_store_pc = 0x80043864u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46FDFF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2B868: 0007CA02 srl $t9, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] >> 8u; - PGXP_ALU(0x0007CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC2B86C: 30F800FF andi $t8, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004386Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2B870: 00187200 sll $t6, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B874: 332F00FF andi $t7, $t9, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0xFFu; - PGXP_ALU(0x332F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2B878: 01CF1025 or $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CF1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B87C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B880: 01021004 sllv $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[2] << (cpu->gpr[8] & 0x1Fu); - PGXP_ALU(0x01021004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B884: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2B888: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2B88C: 305800FF andi $t8, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2B890: 00027202 srl $t6, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00027202u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2B894: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2B898: 0018CA00 sll $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 8u; - PGXP_ALU(0x0018CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2B89C: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004389Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2B8A0: 26940004 addiu $s4, $s4, 4 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (4)); - PGXP_ALU(0x26940004u, cpu->gpr[20], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800438A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2B8A4: A478DFFA sh $t8, -8198($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800438A4u); return; } g_debug_last_store_pc = 0x800438A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA478DFFAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800438A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140000u); -#endif - /* 0xBFC2B8A8: 1692FFBE bne $s4, $s2, 0xBFC2B7A4 */ - uint32_t psx_brA_BFC2B8A8 = cpu->gpr[20]; uint32_t psx_brB_BFC2B8A8 = cpu->gpr[18]; - psx_taken_BFC2B8A8 = (psx_brA_BFC2B8A8 != psx_brB_BFC2B8A8); - psx_delay_BFC2B8A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2B8AC: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800438ACu); -#endif - if (psx_delay_BFC2B8A8) { - psx_delay_BFC2B8A8 = 0; - if (psx_taken_BFC2B8A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800437A4u); - goto label_BFC2B7A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438B0u); - } -label_BFC2B8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B8B0: 10000009 beq $zero, $zero, 0xBFC2B8D8 */ - uint32_t psx_brA_BFC2B8B0 = cpu->gpr[0]; uint32_t psx_brB_BFC2B8B0 = cpu->gpr[0]; - psx_taken_BFC2B8B0 = (psx_brA_BFC2B8B0 == psx_brB_BFC2B8B0); - psx_delay_BFC2B8B0 = 1; - /* 0xBFC2B8B4: 8FB901C0 lw $t9, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800438B4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB901C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800438B4u); -#endif - if (psx_delay_BFC2B8B0) { - psx_delay_BFC2B8B0 = 0; - if (psx_taken_BFC2B8B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438D8u); - goto label_BFC2B8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438B8u); - } -label_BFC2B8B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B8B8: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800438B8u); -#endif -label_BFC2B8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2B8BC: 00340821 addu $at, $at, $s4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[20]; - PGXP_ALU(0x00340821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800438BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2B8C0: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800438C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2B8C4: A02EDED0 sb $t6, -8496($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8496; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800438C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-8496)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EDED0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800438C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC2B8C8: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800438C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2B8CC: 0C010C7F jal 0xB00431FC */ - cpu->gpr[31] = 0x800438D4u; /* jal link before delay slot */ - psx_delay_BFC2B8CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2B8D0: 2406001E addiu $a2, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2406001Eu, cpu->gpr[6], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800438D0u); -#endif - if (psx_delay_BFC2B8CC) { - psx_delay_BFC2B8CC = 0; - cpu->gpr[31] = 0x800438D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800431FCu); - cpu->pc = 0x800431FCu; return; - } -label_BFC2B8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438D4u); -#endif - /* 0xBFC2B8D4: 8FB901C0 lw $t9, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800438D4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB901C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800438D4u); -#endif -label_BFC2B8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B8D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800438D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2B8DC: 272F0001 addiu $t7, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x272F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800438DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2B8E0: AFAF01C0 sw $t7, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800438E0u); return; } g_debug_last_store_pc = 0x800438E0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF01C0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800438E0u); -#endif -label_BFC2B8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438E4u); -#endif - /* 0xBFC2B8E4: 92C40000 lbu $a0, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (0)), 4, 0x400000u); - PGXP_LOAD(0x92C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800438E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B8E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800438E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2B8EC: 10800006 beq $a0, $zero, 0xBFC2B908 */ - uint32_t psx_brA_BFC2B8EC = cpu->gpr[4]; uint32_t psx_brB_BFC2B8EC = cpu->gpr[0]; - psx_taken_BFC2B8EC = (psx_brA_BFC2B8EC == psx_brB_BFC2B8EC); - psx_delay_BFC2B8EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B8F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800438F0u); -#endif - if (psx_delay_BFC2B8EC) { - psx_delay_BFC2B8EC = 0; - if (psx_taken_BFC2B8EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043908u); - goto label_BFC2B908; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800438F4u); - } -label_BFC2B8F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B8F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800438F4u); -#endif - /* 0xBFC2B8F4: 8FB801C0 lw $t8, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800438F4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB801C0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800438F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B8F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800438F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2B8FC: 2B010100 slti $at, $t8, 256 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (256) ? 1 : 0); - PGXP_ALU(0x2B010100u, cpu->gpr[1], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x800438FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B900: 1420FE80 bne $at, $zero, 0xBFC2B304 */ - uint32_t psx_brA_BFC2B900 = cpu->gpr[1]; uint32_t psx_brB_BFC2B900 = cpu->gpr[0]; - psx_taken_BFC2B900 = (psx_brA_BFC2B900 != psx_brB_BFC2B900); - psx_delay_BFC2B900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043904u); -#endif - if (psx_delay_BFC2B900) { - psx_delay_BFC2B900 = 0; - if (psx_taken_BFC2B900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043304u); - goto label_BFC2B304; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043908u); - } -label_BFC2B908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2B908: 3C160001 lui $s6, 0x1 */ - cpu->gpr[22] = 0x00010000u; - PGXP_ALU(0x3C160001u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2B90C: 02DDB021 addu $s6, $s6, $sp */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[29]; - PGXP_ALU(0x02DDB021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004390Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2B910: AFA0008C sw $zero, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043910u); return; } g_debug_last_store_pc = 0x80043910u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0008Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043910u); -#endif - /* 0xBFC2B914: 8ED621F0 lw $s6, 8688($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 8688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (8688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043914u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x400000u); } - PGXP_LOAD(0x8ED621F0u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80043914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2B918: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC2B91C: 24170010 addiu $s7, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24170010u, cpu->gpr[23], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004391Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2B920: 241E0004 addiu $fp, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x241E0004u, cpu->gpr[30], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043920u); -#endif -label_BFC2B924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043924u); -#endif - /* 0xBFC2B924: 8FA401C0 lw $a0, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043924u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA401C0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80043924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2B928: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043928u); -#endif -label_BFC2B92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004392Cu); -#endif - /* 0xBFC2B92C: 8FBF008C lw $ra, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004392Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF008Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004392Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2B930: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2B934: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043934u); -#endif -label_BFC2B938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000012u); -#endif - /* 0xBFC2B938: 03E4082A slt $at, $ra, $a0 */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[31] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x03E4082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2B93C: 14200003 bne $at, $zero, 0xBFC2B94C */ - uint32_t psx_brA_BFC2B93C = cpu->gpr[1]; uint32_t psx_brB_BFC2B93C = cpu->gpr[0]; - psx_taken_BFC2B93C = (psx_brA_BFC2B93C != psx_brB_BFC2B93C); - psx_delay_BFC2B93C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80200001u); -#endif - /* 0xBFC2B940: 03E0A821 addu $s5, $ra, $zero */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[31] + cpu->gpr[0]; - PGXP_ALU(0x03E0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043940u); -#endif - if (psx_delay_BFC2B93C) { - psx_delay_BFC2B93C = 0; - if (psx_taken_BFC2B93C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004394Cu); - goto label_BFC2B94C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043944u); - } -label_BFC2B944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2B944: 100000C0 beq $zero, $zero, 0xBFC2BC48 */ - uint32_t psx_brA_BFC2B944 = cpu->gpr[0]; uint32_t psx_brB_BFC2B944 = cpu->gpr[0]; - psx_taken_BFC2B944 = (psx_brA_BFC2B944 == psx_brB_BFC2B944); - psx_delay_BFC2B944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2B948: 26730004 addiu $s3, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); - PGXP_ALU(0x26730004u, cpu->gpr[19], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043948u); -#endif - if (psx_delay_BFC2B944) { - psx_delay_BFC2B944 = 0; - if (psx_taken_BFC2B944) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C48u); - goto label_BFC2BC48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004394Cu); - } -label_BFC2B94C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B94Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004394Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B94C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004394Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B950: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC2B954: 001F7140 sll $t6, $ra, 5 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[14] = cpu->gpr[31] << 5u; - PGXP_ALU(0x001F7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80043954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100000u); -#endif - /* 0xBFC2B958: 0014C840 sll $t9, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[25] = cpu->gpr[20] << 1u; - PGXP_ALU(0x0014C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B95C: 01D97821 addu $t7, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D97821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004395Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000002u); -#endif - /* 0xBFC2B960: 03A1C021 addu $t8, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100A000u); -#endif - /* 0xBFC2B964: 01F86821 addu $t5, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[13] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F86821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC2B968: 12C00066 beq $s6, $zero, 0xBFC2BB04 */ - uint32_t psx_brA_BFC2B968 = cpu->gpr[22]; uint32_t psx_brB_BFC2B968 = cpu->gpr[0]; - psx_taken_BFC2B968 = (psx_brA_BFC2B968 == psx_brB_BFC2B968); - psx_delay_BFC2B968 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81010000u); -#endif - /* 0xBFC2B96C: 03F88021 addu $s0, $ra, $t8 */ - { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[31] + cpu->gpr[24]; - PGXP_ALU(0x03F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004396Cu); -#endif - if (psx_delay_BFC2B968) { - psx_delay_BFC2B968 = 0; - if (psx_taken_BFC2B968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043B04u); - goto label_BFC2BB04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043970u); - } -label_BFC2B970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2B970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043970u); -#endif - /* 0xBFC2B970: 95A2DFF4 lhu $v0, -8204($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043970u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x2000u); } - PGXP_LOAD(0x95A2DFF4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84000u); -#endif - /* 0xBFC2B974: 00137040 sll $t6, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[14] = cpu->gpr[19] << 1u; - PGXP_ALU(0x00137040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2B978: 000221C2 srl $a0, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x000221C2u, cpu->gpr[4], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80043978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2B97C: 00025A02 srl $t3, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00025A02u, cpu->gpr[11], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2B980: 00022982 srl $a1, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 6u; - PGXP_ALU(0x00022982u, cpu->gpr[5], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80043980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2B984: 30A50001 andi $a1, $a1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u; - PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2B988: 316B0001 andi $t3, $t3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0x1u; - PGXP_ALU(0x316B0001u, cpu->gpr[11], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2B98C: 30840001 andi $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004398Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004008u); -#endif - /* 0xBFC2B990: 01D81821 addu $v1, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000810u); -#endif - /* 0xBFC2B994: 008BC825 or $t9, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[4] | cpu->gpr[11]; - PGXP_ALU(0x008BC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2B998: 00057900 sll $t7, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 4u; - PGXP_ALU(0x00057900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B99C: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004399Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2B9A0: 0004C100 sll $t8, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 4u; - PGXP_ALU(0x0004C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800439A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2B9A4: 00023142 srl $a2, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00023142u, cpu->gpr[6], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800439A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2B9A8: 30C60001 andi $a2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u; - PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800439A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B9AC: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC2B9B0: 00067A00 sll $t7, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 8u; - PGXP_ALU(0x00067A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800439B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B9B4: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC2B9B8: 0005C200 sll $t8, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 8u; - PGXP_ALU(0x0005C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800439B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2B9BC: 00023902 srl $a3, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00023902u, cpu->gpr[7], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800439BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2B9C0: 30E70001 andi $a3, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800439C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B9C4: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC2B9C8: 00077B00 sll $t7, $a3, 12 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 12u; - PGXP_ALU(0x00077B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800439C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2B9CC: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2B9D0: 0006C300 sll $t8, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 12u; - PGXP_ALU(0x0006C300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800439D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2B9D4: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2B9D8: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800439D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2B9DC: 000240C2 srl $t0, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 3u; - PGXP_ALU(0x000240C2u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800439DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2B9E0: 00024882 srl $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] >> 2u; - PGXP_ALU(0x00024882u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800439E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2B9E4: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2B9E8: 31290001 andi $t1, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800439E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2B9EC: 31080001 andi $t0, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800439ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800439F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2B9F0: A439DFF4 sh $t9, -8204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800439F0u); return; } g_debug_last_store_pc = 0x800439F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800439F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8180u); -#endif - /* 0xBFC2B9F4: 01077825 or $t7, $t0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[8] | cpu->gpr[7]; - PGXP_ALU(0x01077825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2B9F8: 00097100 sll $t6, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00097100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800439F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2B9FC: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800439FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2BA00: 0008C900 sll $t9, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 4u; - PGXP_ALU(0x0008C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2BA04: 00025042 srl $t2, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x00025042u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2BA08: 314A0001 andi $t2, $t2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0x1u; - PGXP_ALU(0x314A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BA0C: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400u); -#endif - /* 0xBFC2BA10: 000A7200 sll $t6, $t2, 8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[10] << 8u; - PGXP_ALU(0x000A7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BA14: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC2BA18: 0009CA00 sll $t9, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[25] = cpu->gpr[9] << 8u; - PGXP_ALU(0x0009CA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BA1C: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2BA20: 304C0001 andi $t4, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304C0001u, cpu->gpr[12], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC2BA24: 000C7300 sll $t6, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] << 12u; - PGXP_ALU(0x000C7300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BA28: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC2BA2C: 000ACB00 sll $t9, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] << 12u; - PGXP_ALU(0x000ACB00u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BA30: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BA34: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2BA38: 00022B82 srl $a1, $v0, 14 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 14u; - PGXP_ALU(0x00022B82u, cpu->gpr[5], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2BA3C: 000223C2 srl $a0, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] >> 15u; - PGXP_ALU(0x000223C2u, cpu->gpr[4], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BA40: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2BA44: 30840001 andi $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2BA48: 30A50001 andi $a1, $a1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x1u; - PGXP_ALU(0x30A50001u, cpu->gpr[5], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2BA4C: A42FDFF6 sh $t7, -8202($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043A4Cu); return; } g_debug_last_store_pc = 0x80043A4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FDFF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC2BA50: 0005C100 sll $t8, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 4u; - PGXP_ALU(0x0005C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5010u); -#endif - /* 0xBFC2BA54: 008C7025 or $t6, $a0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[4] | cpu->gpr[12]; - PGXP_ALU(0x008C7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BA58: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2BA5C: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2BA60: 00023342 srl $a2, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 13u; - PGXP_ALU(0x00023342u, cpu->gpr[6], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2BA64: 30C60001 andi $a2, $a2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1u; - PGXP_ALU(0x30C60001u, cpu->gpr[6], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BA68: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2BA6C: 0006C200 sll $t8, $a2, 8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 8u; - PGXP_ALU(0x0006C200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BA70: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2BA74: 00057A00 sll $t7, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] << 8u; - PGXP_ALU(0x00057A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2BA78: 00023B02 srl $a3, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] >> 12u; - PGXP_ALU(0x00023B02u, cpu->gpr[7], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2BA7C: 30E70001 andi $a3, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E70001u, cpu->gpr[7], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BA80: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC2BA84: 0007C300 sll $t8, $a3, 12 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] << 12u; - PGXP_ALU(0x0007C300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BA88: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC2BA8C: 00067B00 sll $t7, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] << 12u; - PGXP_ALU(0x00067B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BA90: 032F7025 or $t6, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BA94: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2BA98: 00024A82 srl $t1, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] >> 10u; - PGXP_ALU(0x00024A82u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC2BA9C: 000242C2 srl $t0, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 11u; - PGXP_ALU(0x000242C2u, cpu->gpr[8], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80043A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BAA0: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2BAA4: 31080001 andi $t0, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31080001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2BAA8: 31290001 andi $t1, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x31290001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2BAAC: A42EDFF8 sh $t6, -8200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043AACu); return; } g_debug_last_store_pc = 0x80043AACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EDFF8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC2BAB0: 0009C900 sll $t9, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[25] = cpu->gpr[9] << 4u; - PGXP_ALU(0x0009C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000180u); -#endif - /* 0xBFC2BAB4: 0107C025 or $t8, $t0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[8] | cpu->gpr[7]; - PGXP_ALU(0x0107C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BAB8: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2BABC: 00087100 sll $t6, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00087100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2BAC0: 00025242 srl $t2, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] >> 9u; - PGXP_ALU(0x00025242u, cpu->gpr[10], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2BAC4: 314A0001 andi $t2, $t2, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0x1u; - PGXP_ALU(0x314A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BAC8: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC2BACC: 000ACA00 sll $t9, $t2, 8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] << 8u; - PGXP_ALU(0x000ACA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BAD0: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC2BAD4: 00097200 sll $t6, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 8u; - PGXP_ALU(0x00097200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BAD8: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC2BADC: 000BCB00 sll $t9, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[11] << 12u; - PGXP_ALU(0x000BCB00u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BAE0: 03197825 or $t7, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03197825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400u); -#endif - /* 0xBFC2BAE4: 000A7300 sll $t6, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[10] << 12u; - PGXP_ALU(0x000A7300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BAE8: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BAEC: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BAF0: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2BAF4: A438DFFA sh $t8, -8198($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043AF4u); return; } g_debug_last_store_pc = 0x80043AF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DFFAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043AF4u); -#endif - /* 0xBFC2BAF8: 8FA401C0 lw $a0, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043AF8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA401C0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80043AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BAFC: 1000004B beq $zero, $zero, 0xBFC2BC2C */ - uint32_t psx_brA_BFC2BAFC = cpu->gpr[0]; uint32_t psx_brB_BFC2BAFC = cpu->gpr[0]; - psx_taken_BFC2BAFC = (psx_brA_BFC2BAFC == psx_brB_BFC2BAFC); - psx_delay_BFC2BAFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BB00: 3C02FFFF lui $v0, 0xFFFF */ - cpu->gpr[2] = 0xFFFF0000u; - PGXP_ALU(0x3C02FFFFu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043B00u); -#endif - if (psx_delay_BFC2BAFC) { - psx_delay_BFC2BAFC = 0; - if (psx_taken_BFC2BAFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C2Cu); - goto label_BFC2BC2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043B04u); - } -label_BFC2BB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BB04: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043B04u); -#endif - /* 0xBFC2BB08: 95A2DFF4 lhu $v0, -8204($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043B08u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x2000u); } - PGXP_LOAD(0x95A2DFF4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BB0C: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008002u); -#endif - /* 0xBFC2BB10: 03A17821 addu $t7, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2BB14: 0013C840 sll $t9, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[25] = cpu->gpr[19] << 1u; - PGXP_ALU(0x0013C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008008u); -#endif - /* 0xBFC2BB18: 032F1821 addu $v1, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[25] + cpu->gpr[15]; - PGXP_ALU(0x032F1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2BB1C: 0002C982 srl $t9, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 6u; - PGXP_ALU(0x0002C982u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2BB20: 000271C2 srl $t6, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x000271C2u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BB24: 31D80001 andi $t8, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31D80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BB28: 332F0001 andi $t7, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2BB2C: 000F7100 sll $t6, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BB30: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2BB34: 00027942 srl $t7, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00027942u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BB38: 31F80001 andi $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BB3C: 00187200 sll $t6, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BB40: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BB44: 0002C102 srl $t8, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x0002C102u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2BB48: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2BB4C: 00197300 sll $t6, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 12u; - PGXP_ALU(0x00197300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BB50: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BB54: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BB58: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2BB5C: A438DFF4 sh $t8, -8204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043B5Cu); return; } g_debug_last_store_pc = 0x80043B5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DFF4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2BB60: 00027082 srl $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 2u; - PGXP_ALU(0x00027082u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2BB64: 0002C8C2 srl $t9, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 3u; - PGXP_ALU(0x0002C8C2u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BB68: 332F0001 andi $t7, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BB6C: 31D80001 andi $t8, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31D80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2BB70: 0018C900 sll $t9, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BB74: 01F97025 or $t6, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[25]; - PGXP_ALU(0x01F97025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BB78: 0002C042 srl $t8, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x0002C042u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BB7C: 330F0001 andi $t7, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x330F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BB80: 000FCA00 sll $t9, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FCA00u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BB84: 01D9C025 or $t8, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[25]; - PGXP_ALU(0x01D9C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2BB88: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2BB8C: 000F7300 sll $t6, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 12u; - PGXP_ALU(0x000F7300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BB90: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BB94: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BB98: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2BB9C: A439DFF6 sh $t9, -8202($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043B9Cu); return; } g_debug_last_store_pc = 0x80043B9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFF6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2BBA0: 00027382 srl $t6, $v0, 14 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 14u; - PGXP_ALU(0x00027382u, cpu->gpr[14], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2BBA4: 00027BC2 srl $t7, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 15u; - PGXP_ALU(0x00027BC2u, cpu->gpr[15], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BBA8: 31F80001 andi $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2BBAC: 31D90001 andi $t9, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BBB0: 00197900 sll $t7, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 4u; - PGXP_ALU(0x00197900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BBB4: 030F7025 or $t6, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[24] | cpu->gpr[15]; - PGXP_ALU(0x030F7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2BBB8: 0002CB42 srl $t9, $v0, 13 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 13u; - PGXP_ALU(0x0002CB42u, cpu->gpr[25], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2BBBC: 33380001 andi $t8, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x33380001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BBC0: 00187A00 sll $t7, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] << 8u; - PGXP_ALU(0x00187A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BBC4: 01CFC825 or $t9, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BBC8: 0002C302 srl $t8, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 12u; - PGXP_ALU(0x0002C302u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BBCC: 330E0001 andi $t6, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x330E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2BBD0: 000E7B00 sll $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 12u; - PGXP_ALU(0x000E7B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BBD4: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BBD8: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BBDC: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2BBE0: A438DFF8 sh $t8, -8200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043BE0u); return; } g_debug_last_store_pc = 0x80043BE0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DFF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2BBE4: 00027A82 srl $t7, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] >> 10u; - PGXP_ALU(0x00027A82u, cpu->gpr[15], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2BBE8: 000272C2 srl $t6, $v0, 11 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] >> 11u; - PGXP_ALU(0x000272C2u, cpu->gpr[14], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2BBEC: 31D90001 andi $t9, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31D90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BBF0: 31F80001 andi $t8, $t7, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x1u; - PGXP_ALU(0x31F80001u, cpu->gpr[24], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BBF4: 00187100 sll $t6, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 4u; - PGXP_ALU(0x00187100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC2BBF8: 032E7825 or $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] | cpu->gpr[14]; - PGXP_ALU(0x032E7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BBFC: 0002C242 srl $t8, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] >> 9u; - PGXP_ALU(0x0002C242u, cpu->gpr[24], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80043BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2BC00: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2BC04: 00197200 sll $t6, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00197200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BC08: 01EEC025 or $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EEC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2BC0C: 0002CA02 srl $t9, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x0002CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BC10: 332F0001 andi $t7, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x332F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2BC14: 000F7300 sll $t6, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[15] << 12u; - PGXP_ALU(0x000F7300u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BC18: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BC1C: 00230821 addu $at, $at, $v1 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[3]; - PGXP_ALU(0x00230821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BC20: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2BC24: A439DFFA sh $t9, -8198($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043C24u); return; } g_debug_last_store_pc = 0x80043C24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DFFAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BC28: 3C02FFFF lui $v0, 0xFFFF */ - cpu->gpr[2] = 0xFFFF0000u; - PGXP_ALU(0x3C02FFFFu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043C28u); -#endif -label_BFC2BC2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2BC2C: 00501021 addu $v0, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[16]; - PGXP_ALU(0x00501021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C30u); -#endif - /* 0xBFC2BC30: 9042DED0 lbu $v0, -8496($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8496; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-8496)), 2, 0x4u); - PGXP_LOAD(0x9042DED0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BC34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BC38: 00021082 srl $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 2u; - PGXP_ALU(0x00021082u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008004u); -#endif - /* 0xBFC2BC3C: 03C27823 subu $t7, $fp, $v0 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[30] - cpu->gpr[2]; - PGXP_ALU(0x03C27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2BC40: 024F9021 addu $s2, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024F9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC2BC44: 02629821 addu $s3, $s3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[2]; - PGXP_ALU(0x02629821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C44u); -#endif -label_BFC2BC48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2BC48: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820000u); -#endif - /* 0xBFC2BC4C: 1637FF3A bne $s1, $s7, 0xBFC2B938 */ - uint32_t psx_brA_BFC2BC4C = cpu->gpr[17]; uint32_t psx_brB_BFC2BC4C = cpu->gpr[23]; - psx_taken_BFC2BC4C = (psx_brA_BFC2BC4C != psx_brB_BFC2BC4C); - psx_delay_BFC2BC4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2BC50: 27FF0001 addiu $ra, $ra, 1 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] + (1)); - PGXP_ALU(0x27FF0001u, cpu->gpr[31], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C50u); -#endif - if (psx_delay_BFC2BC4C) { - psx_delay_BFC2BC4C = 0; - if (psx_taken_BFC2BC4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043938u); - goto label_BFC2B938; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C54u); - } -label_BFC2BC54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2BC54: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2BC58: 2A810010 slti $at, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (16) ? 1 : 0); - PGXP_ALU(0x2A810010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BC5C: 1420FF33 bne $at, $zero, 0xBFC2B92C */ - uint32_t psx_brA_BFC2BC5C = cpu->gpr[1]; uint32_t psx_brB_BFC2BC5C = cpu->gpr[0]; - psx_taken_BFC2BC5C = (psx_brA_BFC2BC5C != psx_brB_BFC2BC5C); - psx_delay_BFC2BC5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC2BC60: 02729821 addu $s3, $s3, $s2 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[18]; - PGXP_ALU(0x02729821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C60u); -#endif - if (psx_delay_BFC2BC5C) { - psx_delay_BFC2BC5C = 0; - if (psx_taken_BFC2BC5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004392Cu); - goto label_BFC2B92C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C64u); - } -label_BFC2BC64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200012u); -#endif - /* 0xBFC2BC64: 02A4082A slt $at, $s5, $a0 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x02A4082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BC68: 10200008 beq $at, $zero, 0xBFC2BC8C */ - uint32_t psx_brA_BFC2BC68 = cpu->gpr[1]; uint32_t psx_brB_BFC2BC68 = cpu->gpr[0]; - psx_taken_BFC2BC68 = (psx_brA_BFC2BC68 == psx_brB_BFC2BC68); - psx_delay_BFC2BC68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2BC6C: 28810010 slti $at, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0); - PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C6Cu); -#endif - if (psx_delay_BFC2BC68) { - psx_delay_BFC2BC68 = 0; - if (psx_taken_BFC2BC68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C8Cu); - goto label_BFC2BC8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C70u); - } -label_BFC2BC70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C70u); -#endif - /* 0xBFC2BC70: 8FB8008C lw $t8, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043C70u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8008Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BC74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BC78: 270E0010 addiu $t6, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[24] + (16)); - PGXP_ALU(0x270E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2BC7C: 29C10100 slti $at, $t6, 256 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (256) ? 1 : 0); - PGXP_ALU(0x29C10100u, cpu->gpr[1], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BC80: 1420FF28 bne $at, $zero, 0xBFC2B924 */ - uint32_t psx_brA_BFC2BC80 = cpu->gpr[1]; uint32_t psx_brB_BFC2BC80 = cpu->gpr[0]; - psx_taken_BFC2BC80 = (psx_brA_BFC2BC80 != psx_brB_BFC2BC80); - psx_delay_BFC2BC80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2BC84: AFAE008C sw $t6, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043C84u); return; } g_debug_last_store_pc = 0x80043C84u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE008Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043C84u); -#endif - if (psx_delay_BFC2BC80) { - psx_delay_BFC2BC80 = 0; - if (psx_taken_BFC2BC80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043924u); - goto label_BFC2B924; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C88u); - } -label_BFC2BC88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2BC88: 28810010 slti $at, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (16) ? 1 : 0); - PGXP_ALU(0x28810010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C88u); -#endif -label_BFC2BC8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BC8C: 1020000A beq $at, $zero, 0xBFC2BCB8 */ - uint32_t psx_brA_BFC2BC8C = cpu->gpr[1]; uint32_t psx_brB_BFC2BC8C = cpu->gpr[0]; - psx_taken_BFC2BC8C = (psx_brA_BFC2BC8C == psx_brB_BFC2BC8C); - psx_delay_BFC2BC8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC2BC90: 2491FFFF addiu $s1, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2491FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043C90u); -#endif - if (psx_delay_BFC2BC8C) { - psx_delay_BFC2BC8C = 0; - if (psx_taken_BFC2BC8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CB8u); - goto label_BFC2BCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043C94u); - } -label_BFC2BC94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BC94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC2BC94: 2491FFFF addiu $s1, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2491FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC2BC98: 0004B140 sll $s6, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[22] = cpu->gpr[4] << 5u; - PGXP_ALU(0x0004B140u, cpu->gpr[22], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80043C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2BC9C: 06210002 bgez $s1, 0xBFC2BCA8 */ - uint32_t psx_brA_BFC2BC9C = cpu->gpr[17]; - psx_taken_BFC2BC9C = ((int32_t)psx_brA_BFC2BC9C >= 0); - psx_delay_BFC2BC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC2BCA0: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043CA0u); -#endif - if (psx_delay_BFC2BC9C) { - psx_delay_BFC2BC9C = 0; - if (psx_taken_BFC2BC9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CA8u); - goto label_BFC2BCA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CA4u); - } -label_BFC2BCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BCA4: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043CA4u); -#endif -label_BFC2BCA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC2BCA8: 00019903 sra $s3, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00019903u, cpu->gpr[19], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BCAC: 10000009 beq $zero, $zero, 0xBFC2BCD4 */ - uint32_t psx_brA_BFC2BCAC = cpu->gpr[0]; uint32_t psx_brB_BFC2BCAC = cpu->gpr[0]; - psx_taken_BFC2BCAC = (psx_brA_BFC2BCAC == psx_brB_BFC2BCAC); - psx_delay_BFC2BCAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2BCB0: 3C120001 lui $s2, 0x1 */ - cpu->gpr[18] = 0x00010000u; - PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043CB0u); -#endif - if (psx_delay_BFC2BCAC) { - psx_delay_BFC2BCAC = 0; - if (psx_taken_BFC2BCAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CD4u); - goto label_BFC2BCD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CB4u); - } -label_BFC2BCB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC2BCB4: 2491FFFF addiu $s1, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2491FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043CB4u); -#endif -label_BFC2BCB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2BCB8: 06210002 bgez $s1, 0xBFC2BCC4 */ - uint32_t psx_brA_BFC2BCB8 = cpu->gpr[17]; - psx_taken_BFC2BCB8 = ((int32_t)psx_brA_BFC2BCB8 >= 0); - psx_delay_BFC2BCB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC2BCBC: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043CBCu); -#endif - if (psx_delay_BFC2BCB8) { - psx_delay_BFC2BCB8 = 0; - if (psx_taken_BFC2BCB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CC4u); - goto label_BFC2BCC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043CC0u); - } -label_BFC2BCC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BCC0: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043CC0u); -#endif -label_BFC2BCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002u); -#endif - /* 0xBFC2BCC4: 00019903 sra $s3, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00019903u, cpu->gpr[19], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC2BCC8: 0013B240 sll $s6, $s3, 9 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[22] = cpu->gpr[19] << 9u; - PGXP_ALU(0x0013B240u, cpu->gpr[22], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2BCCC: 26D60200 addiu $s6, $s6, 512 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (512)); - PGXP_ALU(0x26D60200u, cpu->gpr[22], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2BCD0: 3C120001 lui $s2, 0x1 */ - cpu->gpr[18] = 0x00010000u; - PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043CD0u); -#endif -label_BFC2BCD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2BCD4: 025D9021 addu $s2, $s2, $sp */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[29]; - PGXP_ALU(0x025D9021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043CD4u); -#endif - /* 0xBFC2BCD8: 8E5221D4 lw $s2, 8660($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043CD8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x40000u); } - PGXP_LOAD(0x8E5221D4u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80043CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410000u); -#endif - /* 0xBFC2BCDC: 00168080 sll $s0, $s6, 2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[16] = cpu->gpr[22] << 2u; - PGXP_ALU(0x00168080u, cpu->gpr[16], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC2BCE0: 26050040 addiu $a1, $s0, 64 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (64)); - PGXP_ALU(0x26050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2BCE4: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x80043CECu; /* jal link before delay slot */ - psx_delay_BFC2BCE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC2BCE8: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043CE8u); -#endif - if (psx_delay_BFC2BCE4) { - psx_delay_BFC2BCE4 = 0; - cpu->gpr[31] = 0x80043CECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2BCEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BCECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CECu); -#endif - /* 0xBFC2BCEC: 8FA301C0 lw $v1, 448($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 448; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043CECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA301C0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80043CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2BCF0: 240F0008 addiu $t7, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x240F0008u, cpu->gpr[15], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2BCF4: 24190010 addiu $t9, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24190010u, cpu->gpr[25], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2BCF8: AE4F0004 sw $t7, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043CF8u); return; } g_debug_last_store_pc = 0x80043CF8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2BCFC: 2418002C addiu $t8, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2418002Cu, cpu->gpr[24], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80043CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2BD00: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2BD04: AE590000 sw $t9, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D04u); return; } g_debug_last_store_pc = 0x80043D04u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC2BD08: AE580008 sw $t8, 8($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D08u); return; } g_debug_last_store_pc = 0x80043D08u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE580008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2BD0C: 01DD7021 addu $t6, $t6, $sp */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[29]; - PGXP_ALU(0x01DD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2BD10: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D10u); -#endif - /* 0xBFC2BD14: 8DCE21E4 lw $t6, 8676($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8676; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE21E4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2BD18: 01FD7821 addu $t7, $t7, $sp */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[29]; - PGXP_ALU(0x01FD7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D18u); -#endif - /* 0xBFC2BD1C: 8DEF21E0 lw $t7, 8672($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D1Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF21E0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC2BD20: 000ECC00 sll $t9, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000ECC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC2BD24: 032FC025 or $t8, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[25] | cpu->gpr[15]; - PGXP_ALU(0x032FC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2BD28: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040000u); -#endif - /* 0xBFC2BD2C: AE58000C sw $t8, 12($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D2Cu); return; } g_debug_last_store_pc = 0x80043D2Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE58000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2BD30: 35CE0010 ori $t6, $t6, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x10u; - PGXP_ALU(0x35CE0010u, cpu->gpr[14], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2BD34: 3C190001 lui $t9, 0x1 */ - cpu->gpr[25] = 0x00010000u; - PGXP_ALU(0x3C190001u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC2BD38: AE4E0010 sw $t6, 16($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D38u); return; } g_debug_last_store_pc = 0x80043D38u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE4E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2BD3C: 033DC821 addu $t9, $t9, $sp */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[29]; - PGXP_ALU(0x033DC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2BD40: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D40u); -#endif - /* 0xBFC2BD44: 8F3921E8 lw $t9, 8680($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 8680; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (8680)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D44u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3921E8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2BD48: 031DC021 addu $t8, $t8, $sp */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[29]; - PGXP_ALU(0x031DC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D48u); -#endif - /* 0xBFC2BD4C: 8F1821EC lw $t8, 8684($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 8684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (8684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D4Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1821ECu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BD50: 00197C00 sll $t7, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 16u; - PGXP_ALU(0x00197C00u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BD54: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44000u); -#endif - /* 0xBFC2BD58: AE4E0014 sw $t6, 20($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D58u); return; } g_debug_last_store_pc = 0x80043D58u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE4E0014u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC2BD5C: 2619000C addiu $t9, $s0, 12 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[16] + (12)); - PGXP_ALU(0x2619000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80043D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2BD60: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2BD64: AE590034 sw $t9, 52($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D64u); return; } g_debug_last_store_pc = 0x80043D64u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE590034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2BD68: 01FD7821 addu $t7, $t7, $sp */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[29]; - PGXP_ALU(0x01FD7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2BD6C: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D70u); -#endif - /* 0xBFC2BD70: 8DEF21DC lw $t7, 8668($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D70u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF21DCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2BD74: 01DD7021 addu $t6, $t6, $sp */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[29]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[29]; - PGXP_ALU(0x01DD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D74u); -#endif - /* 0xBFC2BD78: 8DCE21D8 lw $t6, 8664($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D78u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE21D8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BD7C: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BD80: 28610011 slti $at, $v1, 17 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (17) ? 1 : 0); - PGXP_ALU(0x28610011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BD84: 030EC825 or $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[14]; - PGXP_ALU(0x030EC825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BD88: 14200003 bne $at, $zero, 0xBFC2BD98 */ - uint32_t psx_brA_BFC2BD88 = cpu->gpr[1]; uint32_t psx_brB_BFC2BD88 = cpu->gpr[0]; - psx_taken_BFC2BD88 = (psx_brA_BFC2BD88 != psx_brB_BFC2BD88); - psx_delay_BFC2BD88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2BD8C: AE590038 sw $t9, 56($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043D8Cu); return; } g_debug_last_store_pc = 0x80043D8Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE590038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043D8Cu); -#endif - if (psx_delay_BFC2BD88) { - psx_delay_BFC2BD88 = 0; - if (psx_taken_BFC2BD88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043D98u); - goto label_BFC2BD98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043D90u); - } -label_BFC2BD90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BD90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BD90: 10000008 beq $zero, $zero, 0xBFC2BDB4 */ - uint32_t psx_brA_BFC2BD90 = cpu->gpr[0]; uint32_t psx_brB_BFC2BD90 = cpu->gpr[0]; - psx_taken_BFC2BD90 = (psx_brA_BFC2BD90 == psx_brB_BFC2BD90); - psx_delay_BFC2BD90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BD94: 24020040 addiu $v0, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24020040u, cpu->gpr[2], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80043D94u); -#endif - if (psx_delay_BFC2BD90) { - psx_delay_BFC2BD90 = 0; - if (psx_taken_BFC2BD90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DB4u); - goto label_BFC2BDB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043D98u); - } -label_BFC2BD98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BD98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2BD98: 06210004 bgez $s1, 0xBFC2BDAC */ - uint32_t psx_brA_BFC2BD98 = cpu->gpr[17]; - psx_taken_BFC2BD98 = ((int32_t)psx_brA_BFC2BD98 >= 0); - psx_delay_BFC2BD98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC2BD9C: 3222000F andi $v0, $s1, 0xF */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0xFu; - PGXP_ALU(0x3222000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043D9Cu); -#endif - if (psx_delay_BFC2BD98) { - psx_delay_BFC2BD98 = 0; - if (psx_taken_BFC2BD98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DACu); - goto label_BFC2BDAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DA0u); - } -label_BFC2BDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BDA0: 10400002 beq $v0, $zero, 0xBFC2BDAC */ - uint32_t psx_brA_BFC2BDA0 = cpu->gpr[2]; uint32_t psx_brB_BFC2BDA0 = cpu->gpr[0]; - psx_taken_BFC2BDA0 = (psx_brA_BFC2BDA0 == psx_brB_BFC2BDA0); - psx_delay_BFC2BDA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BDA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043DA4u); -#endif - if (psx_delay_BFC2BDA0) { - psx_delay_BFC2BDA0 = 0; - if (psx_taken_BFC2BDA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DACu); - goto label_BFC2BDAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DA8u); - } -label_BFC2BDA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BDA8: 2442FFF0 addiu $v0, $v0, -16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-16)); - PGXP_ALU(0x2442FFF0u, cpu->gpr[2], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DA8u); -#endif -label_BFC2BDAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BDAC: 00021080 sll $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00021080u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BDB0: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DB0u); -#endif -label_BFC2BDB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC2BDB4: 00137900 sll $t7, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[19] << 4u; - PGXP_ALU(0x00137900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BDB8: 25F80010 addiu $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (16)); - PGXP_ALU(0x25F80010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BDBC: 00187400 sll $t6, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] << 16u; - PGXP_ALU(0x00187400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004004u); -#endif - /* 0xBFC2BDC0: 01C2C825 or $t9, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[2]; - PGXP_ALU(0x01C2C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2BDC4: 28610010 slti $at, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (16) ? 1 : 0); - PGXP_ALU(0x28610010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BDC8: 10200025 beq $at, $zero, 0xBFC2BE60 */ - uint32_t psx_brA_BFC2BDC8 = cpu->gpr[1]; uint32_t psx_brB_BFC2BDC8 = cpu->gpr[0]; - psx_taken_BFC2BDC8 = (psx_brA_BFC2BDC8 == psx_brB_BFC2BDC8); - psx_delay_BFC2BDC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040000u); -#endif - /* 0xBFC2BDCC: AE59003C sw $t9, 60($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043DCCu); return; } g_debug_last_store_pc = 0x80043DCCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE59003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043DCCu); -#endif - if (psx_delay_BFC2BDC8) { - psx_delay_BFC2BDC8 = 0; - if (psx_taken_BFC2BDC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E60u); - goto label_BFC2BE60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DD0u); - } -label_BFC2BDD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2BDD0: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2BDD4: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2BDD8: 1AC0003A blez $s6, 0xBFC2BEC4 */ - uint32_t psx_brA_BFC2BDD8 = cpu->gpr[22]; - psx_taken_BFC2BDD8 = ((int32_t)psx_brA_BFC2BDD8 <= 0); - psx_delay_BFC2BDD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2BDDC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DDCu); -#endif - if (psx_delay_BFC2BDD8) { - psx_delay_BFC2BDD8 = 0; - if (psx_taken_BFC2BDD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC4u); - goto label_BFC2BEC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DE0u); - } -label_BFC2BDE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2BDE0: 00032080 sll $a0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00032080u, cpu->gpr[4], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC2BDE4: 02401021 addu $v0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DE4u); -#endif -label_BFC2BDE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2BDE8: 06A10004 bgez $s5, 0xBFC2BDFC */ - uint32_t psx_brA_BFC2BDE8 = cpu->gpr[21]; - psx_taken_BFC2BDE8 = ((int32_t)psx_brA_BFC2BDE8 >= 0); - psx_delay_BFC2BDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2BDEC: 32AF003F andi $t7, $s5, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] & 0x3Fu; - PGXP_ALU(0x32AF003Fu, cpu->gpr[15], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80043DECu); -#endif - if (psx_delay_BFC2BDE8) { - psx_delay_BFC2BDE8 = 0; - if (psx_taken_BFC2BDE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DFCu); - goto label_BFC2BDFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DF0u); - } -label_BFC2BDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2BDF0: 11E00002 beq $t7, $zero, 0xBFC2BDFC */ - uint32_t psx_brA_BFC2BDF0 = cpu->gpr[15]; uint32_t psx_brB_BFC2BDF0 = cpu->gpr[0]; - psx_taken_BFC2BDF0 = (psx_brA_BFC2BDF0 == psx_brB_BFC2BDF0); - psx_delay_BFC2BDF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BDF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043DF4u); -#endif - if (psx_delay_BFC2BDF0) { - psx_delay_BFC2BDF0 = 0; - if (psx_taken_BFC2BDF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DFCu); - goto label_BFC2BDFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DF8u); - } -label_BFC2BDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2BDF8: 25EFFFC0 addiu $t7, $t7, -64 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-64)); - PGXP_ALU(0x25EFFFC0u, cpu->gpr[15], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043DF8u); -#endif -label_BFC2BDFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BDFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC2BDFC: 01E4082A slt $at, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x01E4082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BE00: 14200004 bne $at, $zero, 0xBFC2BE14 */ - uint32_t psx_brA_BFC2BE00 = cpu->gpr[1]; uint32_t psx_brB_BFC2BE00 = cpu->gpr[0]; - psx_taken_BFC2BE00 = (psx_brA_BFC2BE00 != psx_brB_BFC2BE00); - psx_delay_BFC2BE00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BE04: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E04u); -#endif - if (psx_delay_BFC2BE00) { - psx_delay_BFC2BE00 = 0; - if (psx_taken_BFC2BE00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E14u); - goto label_BFC2BE14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E08u); - } -label_BFC2BE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2BE08: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200020u); -#endif - /* 0xBFC2BE0C: 0005A980 sll $s5, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[21] = cpu->gpr[5] << 6u; - PGXP_ALU(0x0005A980u, cpu->gpr[21], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BE10: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E10u); -#endif -label_BFC2BE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BE14: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004002u); -#endif - /* 0xBFC2BE18: 03A17021 addu $t6, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2BE1C: 0015C040 sll $t8, $s5, 1 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 1u; - PGXP_ALU(0x0015C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004008u); -#endif - /* 0xBFC2BE20: 030E1821 addu $v1, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2BE24: 3C0FFFFF lui $t7, 0xFFFF */ - cpu->gpr[15] = 0xFFFF0000u; - PGXP_ALU(0x3C0FFFFFu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2BE28: 01E37821 addu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2BE2C: 3C19FFFF lui $t9, 0xFFFF */ - cpu->gpr[25] = 0xFFFF0000u; - PGXP_ALU(0x3C19FFFFu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E30u); -#endif - /* 0xBFC2BE30: 95EFDFF6 lhu $t7, -8202($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043E30u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x95EFDFF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2BE34: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E34u); -#endif - /* 0xBFC2BE38: 9739DFF4 lhu $t9, -8204($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043E38u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x9739DFF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2BE3C: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2BE40: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2BE44: 03387025 or $t6, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[25] | cpu->gpr[24]; - PGXP_ALU(0x03387025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2BE48: AC4E0040 sw $t6, 64($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043E48u); return; } g_debug_last_store_pc = 0x80043E48u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2BE4C: 26B50002 addiu $s5, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (2)); - PGXP_ALU(0x26B50002u, cpu->gpr[21], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500000u); -#endif - /* 0xBFC2BE50: 1696FFE5 bne $s4, $s6, 0xBFC2BDE8 */ - uint32_t psx_brA_BFC2BE50 = cpu->gpr[20]; uint32_t psx_brB_BFC2BE50 = cpu->gpr[22]; - psx_taken_BFC2BE50 = (psx_brA_BFC2BE50 != psx_brB_BFC2BE50); - psx_delay_BFC2BE50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BE54: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E54u); -#endif - if (psx_delay_BFC2BE50) { - psx_delay_BFC2BE50 = 0; - if (psx_taken_BFC2BE50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043DE8u); - goto label_BFC2BDE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E58u); - } -label_BFC2BE58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BE58: 1000001B beq $zero, $zero, 0xBFC2BEC8 */ - uint32_t psx_brA_BFC2BE58 = cpu->gpr[0]; uint32_t psx_brB_BFC2BE58 = cpu->gpr[0]; - psx_taken_BFC2BE58 = (psx_brA_BFC2BE58 == psx_brB_BFC2BE58); - psx_delay_BFC2BE58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BE5C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E5Cu); -#endif - if (psx_delay_BFC2BE58) { - psx_delay_BFC2BE58 = 0; - if (psx_taken_BFC2BE58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC8u); - goto label_BFC2BEC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E60u); - } -label_BFC2BE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC2BE60: 00161040 sll $v0, $s6, 1 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = cpu->gpr[22] << 1u; - PGXP_ALU(0x00161040u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BE64: 18400017 blez $v0, 0xBFC2BEC4 */ - uint32_t psx_brA_BFC2BE64 = cpu->gpr[2]; - psx_taken_BFC2BE64 = ((int32_t)psx_brA_BFC2BE64 <= 0); - psx_delay_BFC2BE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2BE68: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E68u); -#endif - if (psx_delay_BFC2BE64) { - psx_delay_BFC2BE64 = 0; - if (psx_taken_BFC2BE64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC4u); - goto label_BFC2BEC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E6Cu); - } -label_BFC2BE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BE6C: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BE70: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000Au); -#endif - /* 0xBFC2BE74: 03A11821 addu $v1, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[3] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A11821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E74u); -#endif -label_BFC2BE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2BE78: 3C19FFFF lui $t9, 0xFFFF */ - cpu->gpr[25] = 0xFFFF0000u; - PGXP_ALU(0x3C19FFFFu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2BE7C: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E80u); -#endif - /* 0xBFC2BE80: 9739DFF6 lhu $t9, -8202($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8202; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043E80u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x9739DFF6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2BE84: 3C0FFFFF lui $t7, 0xFFFF */ - cpu->gpr[15] = 0xFFFF0000u; - PGXP_ALU(0x3C0FFFFFu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2BE88: 0019C400 sll $t8, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[25] << 16u; - PGXP_ALU(0x0019C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2BE8C: 01E37821 addu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[3]; - PGXP_ALU(0x01E37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043E90u); -#endif - /* 0xBFC2BE90: 95EFDFF4 lhu $t7, -8204($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -8204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-8204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043E90u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x95EFDFF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2BE94: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC2BE98: 01F87025 or $t6, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F87025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2BE9C: 06810002 bgez $s4, 0xBFC2BEA8 */ - uint32_t psx_brA_BFC2BE9C = cpu->gpr[20]; - psx_taken_BFC2BE9C = ((int32_t)psx_brA_BFC2BE9C >= 0); - psx_delay_BFC2BE9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100003u); -#endif - /* 0xBFC2BEA0: 02800821 addu $at, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043EA0u); -#endif - if (psx_delay_BFC2BE9C) { - psx_delay_BFC2BE9C = 0; - if (psx_taken_BFC2BE9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EA8u); - goto label_BFC2BEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EA4u); - } -label_BFC2BEA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BEA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BEA4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80043EA4u); -#endif -label_BFC2BEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2BEA8: 0001C843 sra $t9, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C843u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80043EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2BEAC: 00197880 sll $t7, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00197880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80043EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2BEB0: 26940002 addiu $s4, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (2)); - PGXP_ALU(0x26940002u, cpu->gpr[20], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80043EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1048000u); -#endif - /* 0xBFC2BEB4: 024FC021 addu $t8, $s2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[18] + cpu->gpr[15]; - PGXP_ALU(0x024FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100006u); -#endif - /* 0xBFC2BEB8: 0282082A slt $at, $s4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0282082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BEBC: 1420FFEE bne $at, $zero, 0xBFC2BE78 */ - uint32_t psx_brA_BFC2BEBC = cpu->gpr[1]; uint32_t psx_brB_BFC2BEBC = cpu->gpr[0]; - psx_taken_BFC2BEBC = (psx_brA_BFC2BEBC != psx_brB_BFC2BEBC); - psx_delay_BFC2BEBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC2BEC0: AF0E0040 sw $t6, 64($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EC0u); return; } g_debug_last_store_pc = 0x80043EC0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAF0E0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EC0u); -#endif - if (psx_delay_BFC2BEBC) { - psx_delay_BFC2BEBC = 0; - if (psx_taken_BFC2BEBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043E78u); - goto label_BFC2BE78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043EC4u); - } -label_BFC2BEC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BEC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BEC4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043EC4u); -#endif -label_BFC2BEC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BEC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EC8u); -#endif - /* 0xBFC2BEC8: 8FBF005C lw $ra, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF005Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BECC: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BED0: 342121D0 ori $at, $at, 0x21D0 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x21D0u; - PGXP_ALU(0x342121D0u, cpu->gpr[1], _pgx1, 0x21D0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043ED0u); -#endif - /* 0xBFC2BED4: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043ED4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80043ED4u); -#endif - /* 0xBFC2BED8: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043ED8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80043ED8u); -#endif - /* 0xBFC2BEDC: 8FB20040 lw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EDCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EE0u); -#endif - /* 0xBFC2BEE0: 8FB30044 lw $s3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EE0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30044u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EE0u); -#endif - /* 0xBFC2BEE4: 8FB40048 lw $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EE4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EE4u); -#endif - /* 0xBFC2BEE8: 8FB5004C lw $s5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EE8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5004Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EE8u); -#endif - /* 0xBFC2BEEC: 8FB60050 lw $s6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EECu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60050u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043EF0u); -#endif - /* 0xBFC2BEF0: 8FB70054 lw $s7, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EF0u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70054u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EF0u); -#endif - /* 0xBFC2BEF4: 8FBE0058 lw $fp, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043EF4u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0058u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80043EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2BEF8: 03E00008 jr $ra */ - psx_delay_BFC2BEF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000002u); -#endif - /* 0xBFC2BEFC: 03A1E821 addu $sp, $sp, $at */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[29] = cpu->gpr[29] + cpu->gpr[1]; - PGXP_ALU(0x03A1E821u, cpu->gpr[29], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043EFCu); -#endif - if (psx_delay_BFC2BEF8) { - psx_delay_BFC2BEF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2BF00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2BF00u); - int psx_delay_BFC2BF08 = 0; -label_BFC2BF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2BF00: 3C028009 lui $v0, 0x8009 */ - cpu->gpr[2] = 0x80090000u; - PGXP_ALU(0x3C028009u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043F00u); -#endif - /* 0xBFC2BF04: 8C429D6C lw $v0, -25236($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429D6Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2BF08: 03E00008 jr $ra */ - psx_delay_BFC2BF08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BF0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043F0Cu); -#endif - if (psx_delay_BFC2BF08) { - psx_delay_BFC2BF08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2BF10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2BF10u); - int psx_delay_BFC2BF14 = 0; -label_BFC2BF10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2BF10: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80043F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2BF14: 03E00008 jr $ra */ - psx_delay_BFC2BF14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2BF18: AC249D6C sw $a0, -25236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F18u); return; } g_debug_last_store_pc = 0x80043F18u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249D6Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F18u); -#endif - if (psx_delay_BFC2BF14) { - psx_delay_BFC2BF14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2BF1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2BF1Cu); - int psx_delay_BFC2BF5C = 0; - int psx_delay_BFC2BF6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2BF64u: goto label_BFC2BF64; - default: break; - } - } -label_BFC2BF1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2BF1C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2BF20: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F20u); return; } g_debug_last_store_pc = 0x80043F20u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2BF24: A7A00020 sh $zero, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F24u); return; } g_debug_last_store_pc = 0x80043F24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2BF28: A7A00022 sh $zero, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F28u); return; } g_debug_last_store_pc = 0x80043F28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00022u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2BF2C: A7A00018 sh $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F2Cu); return; } g_debug_last_store_pc = 0x80043F2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2BF30: 240E0280 addiu $t6, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x240E0280u, cpu->gpr[14], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2BF34: A7AE0024 sh $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F34u); return; } g_debug_last_store_pc = 0x80043F34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2BF38: 240F01E0 addiu $t7, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240F01E0u, cpu->gpr[15], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2BF3C: A7AF0026 sh $t7, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F3Cu); return; } g_debug_last_store_pc = 0x80043F3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0026u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2BF40: 241801E0 addiu $t8, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x241801E0u, cpu->gpr[24], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2BF44: 24190280 addiu $t9, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24190280u, cpu->gpr[25], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC2BF48: 24080020 addiu $t0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24080020u, cpu->gpr[8], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC2BF4C: A7A8001E sh $t0, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F4Cu); return; } g_debug_last_store_pc = 0x80043F4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A8001Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2BF50: A7B9001C sh $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F50u); return; } g_debug_last_store_pc = 0x80043F50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2BF54: A7B8001A sh $t8, 26($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043F54u); return; } g_debug_last_store_pc = 0x80043F54u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8001Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2BF58: 27A40020 addiu $a0, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A40020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2BF5C: 0C0125F4 jal 0xB00497D0 */ - cpu->gpr[31] = 0x80043F64u; /* jal link before delay slot */ - psx_delay_BFC2BF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2BF60: 27A50018 addiu $a1, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A50018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F60u); -#endif - if (psx_delay_BFC2BF5C) { - psx_delay_BFC2BF5C = 0; - cpu->gpr[31] = 0x80043F64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800497D0u); - cpu->pc = 0x800497D0u; return; - } -label_BFC2BF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F64u); -#endif - /* 0xBFC2BF64: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2BF68: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2BF6C: 03E00008 jr $ra */ - psx_delay_BFC2BF6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BF70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043F70u); -#endif - if (psx_delay_BFC2BF6C) { - psx_delay_BFC2BF6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2BF74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2BF74u); - int psx_delay_BFC2BF90 = 0; - int psx_taken_BFC2BF90 = 0; - int psx_delay_BFC2BF98 = 0; - int psx_taken_BFC2BF98 = 0; - int psx_delay_BFC2BFA4 = 0; - int psx_delay_BFC2BFB8 = 0; - int psx_taken_BFC2BFB8 = 0; - int psx_delay_BFC2BFF0 = 0; - int psx_delay_BFC2BFF8 = 0; - int psx_taken_BFC2BFF8 = 0; - int psx_delay_BFC2C018 = 0; - int psx_delay_BFC2C028 = 0; - int psx_taken_BFC2C028 = 0; - int psx_delay_BFC2C038 = 0; - int psx_taken_BFC2C038 = 0; - int psx_delay_BFC2C058 = 0; - int psx_delay_BFC2C060 = 0; - int psx_taken_BFC2C060 = 0; - int psx_delay_BFC2C068 = 0; - int psx_taken_BFC2C068 = 0; - int psx_delay_BFC2C088 = 0; - int psx_delay_BFC2C0A8 = 0; - int psx_taken_BFC2C0A8 = 0; - int psx_delay_BFC2C0B0 = 0; - int psx_taken_BFC2C0B0 = 0; - int psx_delay_BFC2C0CC = 0; - int psx_taken_BFC2C0CC = 0; - int psx_delay_BFC2C0D4 = 0; - int psx_taken_BFC2C0D4 = 0; - int psx_delay_BFC2C0F0 = 0; - int psx_taken_BFC2C0F0 = 0; - int psx_delay_BFC2C150 = 0; - int psx_delay_BFC2C164 = 0; - int psx_taken_BFC2C164 = 0; - int psx_delay_BFC2C1A8 = 0; - int psx_delay_BFC2C1BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2BF98u: goto label_BFC2BF98; - case 0xBFC2BFA0u: goto label_BFC2BFA0; - case 0xBFC2BFACu: goto label_BFC2BFAC; - case 0xBFC2BFC0u: goto label_BFC2BFC0; - case 0xBFC2BFD0u: goto label_BFC2BFD0; - case 0xBFC2BFF8u: goto label_BFC2BFF8; - case 0xBFC2C000u: goto label_BFC2C000; - case 0xBFC2C020u: goto label_BFC2C020; - case 0xBFC2C030u: goto label_BFC2C030; - case 0xBFC2C040u: goto label_BFC2C040; - case 0xBFC2C060u: goto label_BFC2C060; - case 0xBFC2C068u: goto label_BFC2C068; - case 0xBFC2C070u: goto label_BFC2C070; - case 0xBFC2C074u: goto label_BFC2C074; - case 0xBFC2C090u: goto label_BFC2C090; - case 0xBFC2C0B0u: goto label_BFC2C0B0; - case 0xBFC2C0B8u: goto label_BFC2C0B8; - case 0xBFC2C0BCu: goto label_BFC2C0BC; - case 0xBFC2C0D4u: goto label_BFC2C0D4; - case 0xBFC2C0DCu: goto label_BFC2C0DC; - case 0xBFC2C0E0u: goto label_BFC2C0E0; - case 0xBFC2C0F8u: goto label_BFC2C0F8; - case 0xBFC2C108u: goto label_BFC2C108; - case 0xBFC2C158u: goto label_BFC2C158; - case 0xBFC2C16Cu: goto label_BFC2C16C; - case 0xBFC2C1B0u: goto label_BFC2C1B0; - case 0xBFC2C1B4u: goto label_BFC2C1B4; - default: break; - } - } -label_BFC2BF74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2BF74: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2BF78: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F78u); return; } g_debug_last_store_pc = 0x80043F78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2BF7C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F7Cu); return; } g_debug_last_store_pc = 0x80043F7Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2BF80: AFA60058 sw $a2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F80u); return; } g_debug_last_store_pc = 0x80043F80u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60058u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2BF84: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043F84u); -#endif - /* 0xBFC2BF88: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043F88u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80043F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2BF8C: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80043F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2BF90: 11C10003 beq $t6, $at, 0xBFC2BFA0 */ - uint32_t psx_brA_BFC2BF90 = cpu->gpr[14]; uint32_t psx_brB_BFC2BF90 = cpu->gpr[1]; - psx_taken_BFC2BF90 = (psx_brA_BFC2BF90 == psx_brB_BFC2BF90); - psx_delay_BFC2BF90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC2BF94: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043F94u); -#endif - if (psx_delay_BFC2BF90) { - psx_delay_BFC2BF90 = 0; - if (psx_taken_BFC2BF90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043FA0u); - goto label_BFC2BFA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F98u); - } -label_BFC2BF98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BF98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BF98: 10000086 beq $zero, $zero, 0xBFC2C1B4 */ - uint32_t psx_brA_BFC2BF98 = cpu->gpr[0]; uint32_t psx_brB_BFC2BF98 = cpu->gpr[0]; - psx_taken_BFC2BF98 = (psx_brA_BFC2BF98 == psx_brB_BFC2BF98); - psx_delay_BFC2BF98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BF9C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80043F9Cu); -#endif - if (psx_delay_BFC2BF98) { - psx_delay_BFC2BF98 = 0; - if (psx_taken_BFC2BF98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800441B4u); - goto label_BFC2C1B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043FA0u); - } -label_BFC2BFA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BFA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2BFA0: 24640004 addiu $a0, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24640004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80043FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2BFA4: 0C011071 jal 0xB00441C4 */ - cpu->gpr[31] = 0x80043FACu; /* jal link before delay slot */ - psx_delay_BFC2BFA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC2BFA8: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80043FA8u); -#endif - if (psx_delay_BFC2BFA4) { - psx_delay_BFC2BFA4 = 0; - cpu->gpr[31] = 0x80043FACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800441C4u); - cpu->pc = 0x800441C4u; return; - } -label_BFC2BFAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BFACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FACu); -#endif - /* 0xBFC2BFAC: 8E020000 lw $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043FACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BFB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2BFB4: 304F0008 andi $t7, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80043FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2BFB8: 15E00005 bne $t7, $zero, 0xBFC2BFD0 */ - uint32_t psx_brA_BFC2BFB8 = cpu->gpr[15]; uint32_t psx_brB_BFC2BFB8 = cpu->gpr[0]; - psx_taken_BFC2BFB8 = (psx_brA_BFC2BFB8 != psx_brB_BFC2BFB8); - psx_delay_BFC2BFB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BFBC: 30580003 andi $t8, $v0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u; - PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80043FBCu); -#endif - if (psx_delay_BFC2BFB8) { - psx_delay_BFC2BFB8 = 0; - if (psx_taken_BFC2BFB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043FD0u); - goto label_BFC2BFD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043FC0u); - } -label_BFC2BFC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BFC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FC0u); -#endif - /* 0xBFC2BFC0: 8E020000 lw $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043FC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2BFC4: A6000014 sh $zero, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FC4u); return; } g_debug_last_store_pc = 0x80043FC4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2BFC8: A6000016 sh $zero, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FC8u); return; } g_debug_last_store_pc = 0x80043FC8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000016u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2BFCC: 30580003 andi $t8, $v0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x3u; - PGXP_ALU(0x30580003u, cpu->gpr[24], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80043FCCu); -#endif -label_BFC2BFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FD0u); -#endif - /* 0xBFC2BFD0: 86040008 lh $a0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FD0u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x86040008u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FD0u); -#endif - /* 0xBFC2BFD4: 8605000A lh $a1, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FD4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8605000Au, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FD4u); -#endif - /* 0xBFC2BFD8: 86060014 lh $a2, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FD8u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x86060014u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FD8u); -#endif - /* 0xBFC2BFDC: 86070016 lh $a3, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80043FDCu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070016u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2BFE0: AE180000 sw $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043FE0u); return; } g_debug_last_store_pc = 0x80043FE0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2BFE4: 27B9003C addiu $t9, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27B9003Cu, cpu->gpr[25], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80043FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC2BFE8: 27A80034 addiu $t0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A80034u, cpu->gpr[8], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80043FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC2BFEC: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043FECu); return; } g_debug_last_store_pc = 0x80043FECu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2BFF0: 0C01267B jal 0xB00499EC */ - cpu->gpr[31] = 0x80043FF8u; /* jal link before delay slot */ - psx_delay_BFC2BFF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2BFF4: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80043FF4u); return; } g_debug_last_store_pc = 0x80043FF4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80043FF4u); -#endif - if (psx_delay_BFC2BFF0) { - psx_delay_BFC2BFF0 = 0; - cpu->gpr[31] = 0x80043FF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800499ECu); - cpu->pc = 0x800499ECu; return; - } -label_BFC2BFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2BFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2BFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80043FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2BFF8: 1040001B beq $v0, $zero, 0xBFC2C068 */ - uint32_t psx_brA_BFC2BFF8 = cpu->gpr[2]; uint32_t psx_brB_BFC2BFF8 = cpu->gpr[0]; - psx_taken_BFC2BFF8 = (psx_brA_BFC2BFF8 == psx_brB_BFC2BFF8); - psx_delay_BFC2BFF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2BFFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80043FFCu); -#endif - if (psx_delay_BFC2BFF8) { - psx_delay_BFC2BFF8 = 0; - if (psx_taken_BFC2BFF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044068u); - goto label_BFC2C068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044000u); - } -label_BFC2C000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044000u); -#endif - /* 0xBFC2C000: 87A9003C lh $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044000u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C004: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044004u); -#endif - /* 0xBFC2C008: 87AA003E lh $t2, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044008u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA003Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2C00C: AC298310 sw $t1, -31984($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31984; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004400Cu); return; } g_debug_last_store_pc = 0x8004400Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC298310u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004400Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C010: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2C014: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C018: 0C012719 jal 0xB0049C64 */ - cpu->gpr[31] = 0x80044020u; /* jal link before delay slot */ - psx_delay_BFC2C018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2C01C: AC2A8314 sw $t2, -31980($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31980; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004401Cu); return; } g_debug_last_store_pc = 0x8004401Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A8314u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004401Cu); -#endif - if (psx_delay_BFC2C018) { - psx_delay_BFC2C018 = 0; - cpu->gpr[31] = 0x80044020u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C64u); - cpu->pc = 0x80049C64u; return; - } -label_BFC2C020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044020u); -#endif - /* 0xBFC2C020: 960B0014 lhu $t3, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044020u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x960B0014u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2C028: 11600011 beq $t3, $zero, 0xBFC2C070 */ - uint32_t psx_brA_BFC2C028 = cpu->gpr[11]; uint32_t psx_brB_BFC2C028 = cpu->gpr[0]; - psx_taken_BFC2C028 = (psx_brA_BFC2C028 == psx_brB_BFC2C028); - psx_delay_BFC2C028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C02C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004402Cu); -#endif - if (psx_delay_BFC2C028) { - psx_delay_BFC2C028 = 0; - if (psx_taken_BFC2C028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044070u); - goto label_BFC2C070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044030u); - } -label_BFC2C030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044030u); -#endif - /* 0xBFC2C030: 960C0016 lhu $t4, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044030u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x960C0016u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2C038: 1180000D beq $t4, $zero, 0xBFC2C070 */ - uint32_t psx_brA_BFC2C038 = cpu->gpr[12]; uint32_t psx_brB_BFC2C038 = cpu->gpr[0]; - psx_taken_BFC2C038 = (psx_brA_BFC2C038 == psx_brB_BFC2C038); - psx_delay_BFC2C038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C03C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004403Cu); -#endif - if (psx_delay_BFC2C038) { - psx_delay_BFC2C038 = 0; - if (psx_taken_BFC2C038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044070u); - goto label_BFC2C070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044040u); - } -label_BFC2C040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044040u); -#endif - /* 0xBFC2C040: 87A20034 lh $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044040u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C044: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044044u); -#endif - /* 0xBFC2C048: 87A30036 lh $v1, 54($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 54; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044048u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30036u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2C04C: AC228318 sw $v0, -31976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004404Cu); return; } g_debug_last_store_pc = 0x8004404Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228318u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004404Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C050: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2C054: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80044054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C058: 0C012745 jal 0xB0049D14 */ - cpu->gpr[31] = 0x80044060u; /* jal link before delay slot */ - psx_delay_BFC2C058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2C05C: AC23831C sw $v1, -31972($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31972; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004405Cu); return; } g_debug_last_store_pc = 0x8004405Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23831Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004405Cu); -#endif - if (psx_delay_BFC2C058) { - psx_delay_BFC2C058 = 0; - cpu->gpr[31] = 0x80044060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D14u); - cpu->pc = 0x80049D14u; return; - } -label_BFC2C060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C060: 10000004 beq $zero, $zero, 0xBFC2C074 */ - uint32_t psx_brA_BFC2C060 = cpu->gpr[0]; uint32_t psx_brB_BFC2C060 = cpu->gpr[0]; - psx_taken_BFC2C060 = (psx_brA_BFC2C060 == psx_brB_BFC2C060); - psx_delay_BFC2C060 = 1; - /* 0xBFC2C064: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044064u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044064u); -#endif - if (psx_delay_BFC2C060) { - psx_delay_BFC2C060 = 0; - if (psx_taken_BFC2C060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044074u); - goto label_BFC2C074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044068u); - } -label_BFC2C068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C068: 10000052 beq $zero, $zero, 0xBFC2C1B4 */ - uint32_t psx_brA_BFC2C068 = cpu->gpr[0]; uint32_t psx_brB_BFC2C068 = cpu->gpr[0]; - psx_taken_BFC2C068 = (psx_brA_BFC2C068 == psx_brB_BFC2C068); - psx_delay_BFC2C068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2C06C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004406Cu); -#endif - if (psx_delay_BFC2C068) { - psx_delay_BFC2C068 = 0; - if (psx_taken_BFC2C068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800441B4u); - goto label_BFC2C1B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044070u); - } -label_BFC2C070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044070u); -#endif - /* 0xBFC2C070: 8E040000 lw $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044070u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x8E040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044070u); -#endif -label_BFC2C074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C074: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2C078: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044078u); -#endif - /* 0xBFC2C07C: 8CE78314 lw $a3, -31980($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -31980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-31980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004407Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE78314u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044080u); -#endif - /* 0xBFC2C080: 8CC68310 lw $a2, -31984($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -31984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-31984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044080u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC68310u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2C084: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C088: 0C01458C jal 0xB0051630 */ - cpu->gpr[31] = 0x80044090u; /* jal link before delay slot */ - psx_delay_BFC2C088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C08C: 30840007 andi $a0, $a0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x7u; - PGXP_ALU(0x30840007u, cpu->gpr[4], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x8004408Cu); -#endif - if (psx_delay_BFC2C088) { - psx_delay_BFC2C088 = 0; - cpu->gpr[31] = 0x80044090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051630u); - cpu->pc = 0x80051630u; return; - } -label_BFC2C090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044090u); -#endif - /* 0xBFC2C090: 8FA30058 lw $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044090u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2C094: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2C098: A4620000 sh $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044098u); return; } g_debug_last_store_pc = 0x80044098u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044098u); -#endif - /* 0xBFC2C09C: 8DAD8310 lw $t5, -31984($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004409Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD8310u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2C0A0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800440A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2C0A8: 05A10004 bgez $t5, 0xBFC2C0BC */ - uint32_t psx_brA_BFC2C0A8 = cpu->gpr[13]; - psx_taken_BFC2C0A8 = ((int32_t)psx_brA_BFC2C0A8 >= 0); - psx_delay_BFC2C0A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2C0AC: 31AE003F andi $t6, $t5, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x3Fu; - PGXP_ALU(0x31AE003Fu, cpu->gpr[14], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800440ACu); -#endif - if (psx_delay_BFC2C0A8) { - psx_delay_BFC2C0A8 = 0; - if (psx_taken_BFC2C0A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440BCu); - goto label_BFC2C0BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440B0u); - } -label_BFC2C0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2C0B0: 11C00002 beq $t6, $zero, 0xBFC2C0BC */ - uint32_t psx_brA_BFC2C0B0 = cpu->gpr[14]; uint32_t psx_brB_BFC2C0B0 = cpu->gpr[0]; - psx_taken_BFC2C0B0 = (psx_brA_BFC2C0B0 == psx_brB_BFC2C0B0); - psx_delay_BFC2C0B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440B4u); -#endif - if (psx_delay_BFC2C0B0) { - psx_delay_BFC2C0B0 = 0; - if (psx_taken_BFC2C0B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440BCu); - goto label_BFC2C0BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440B8u); - } -label_BFC2C0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2C0B8: 25CEFFC0 addiu $t6, $t6, -64 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-64)); - PGXP_ALU(0x25CEFFC0u, cpu->gpr[14], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x800440B8u); -#endif -label_BFC2C0BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2C0BC: A46E0002 sh $t6, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800440BCu); return; } g_debug_last_store_pc = 0x800440BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800440BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440C0u); -#endif - /* 0xBFC2C0C0: 8DEF8314 lw $t7, -31980($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -31980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-31980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800440C0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF8314u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800440C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2C0CC: 05E10004 bgez $t7, 0xBFC2C0E0 */ - uint32_t psx_brA_BFC2C0CC = cpu->gpr[15]; - psx_taken_BFC2C0CC = ((int32_t)psx_brA_BFC2C0CC >= 0); - psx_delay_BFC2C0CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2C0D0: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800440D0u); -#endif - if (psx_delay_BFC2C0CC) { - psx_delay_BFC2C0CC = 0; - if (psx_taken_BFC2C0CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440E0u); - goto label_BFC2C0E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440D4u); - } -label_BFC2C0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2C0D4: 13000002 beq $t8, $zero, 0xBFC2C0E0 */ - uint32_t psx_brA_BFC2C0D4 = cpu->gpr[24]; uint32_t psx_brB_BFC2C0D4 = cpu->gpr[0]; - psx_taken_BFC2C0D4 = (psx_brA_BFC2C0D4 == psx_brB_BFC2C0D4); - psx_delay_BFC2C0D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440D8u); -#endif - if (psx_delay_BFC2C0D4) { - psx_delay_BFC2C0D4 = 0; - if (psx_taken_BFC2C0D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440E0u); - goto label_BFC2C0E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440DCu); - } -label_BFC2C0DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2C0DC: 2718FF00 addiu $t8, $t8, -256 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-256)); - PGXP_ALU(0x2718FF00u, cpu->gpr[24], _pgx1, 0xFFFFFF00u); } -#ifdef PSX_COSIM - cosim_instr(0x800440DCu); -#endif -label_BFC2C0E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2C0E0: A4780004 sh $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800440E0u); return; } g_debug_last_store_pc = 0x800440E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800440E0u); -#endif - /* 0xBFC2C0E4: 8E190000 lw $t9, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800440E4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800440E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2C0EC: 2F210002 sltiu $at, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2F210002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800440ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C0F0: 14200005 bne $at, $zero, 0xBFC2C108 */ - uint32_t psx_brA_BFC2C0F0 = cpu->gpr[1]; uint32_t psx_brB_BFC2C0F0 = cpu->gpr[0]; - psx_taken_BFC2C0F0 = (psx_brA_BFC2C0F0 != psx_brB_BFC2C0F0); - psx_delay_BFC2C0F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C0F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800440F4u); -#endif - if (psx_delay_BFC2C0F0) { - psx_delay_BFC2C0F0 = 0; - if (psx_taken_BFC2C0F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044108u); - goto label_BFC2C108; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800440F8u); - } -label_BFC2C0F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C0F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800440F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C0F8: A6000010 sh $zero, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800440F8u); return; } g_debug_last_store_pc = 0x800440F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800440F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C0FC: A6000012 sh $zero, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800440FCu); return; } g_debug_last_store_pc = 0x800440FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000012u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800440FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C100: A6000016 sh $zero, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044100u); return; } g_debug_last_store_pc = 0x80044100u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000016u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C104: A6000014 sh $zero, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044104u); return; } g_debug_last_store_pc = 0x80044104u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044104u); -#endif -label_BFC2C108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2C108: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044108u); -#endif - /* 0xBFC2C10C: 8D088310 lw $t0, -31984($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -31984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004410Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D088310u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2C110: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC2C114: A6080004 sh $t0, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044114u); return; } g_debug_last_store_pc = 0x80044114u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA6080004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044114u); -#endif - /* 0xBFC2C118: 8D298314 lw $t1, -31980($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -31980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-31980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044118u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D298314u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044118u); -#endif - /* 0xBFC2C11C: 860A0004 lh $t2, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004411Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x860A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004411Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC2C120: A6090006 sh $t1, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044120u); return; } g_debug_last_store_pc = 0x80044120u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090006u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC2C124: A7AA0044 sh $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044124u); return; } g_debug_last_store_pc = 0x80044124u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044124u); -#endif - /* 0xBFC2C128: 860B0006 lh $t3, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044128u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x860B0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2C12C: 27A40044 addiu $a0, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A40044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8004412Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC2C130: A7AB0046 sh $t3, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044130u); return; } g_debug_last_store_pc = 0x80044130u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0046u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044130u); -#endif - /* 0xBFC2C134: 960C0008 lhu $t4, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044134u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x960C0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC2C13C: A7AC0048 sh $t4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004413Cu); return; } g_debug_last_store_pc = 0x8004413Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC0048u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004413Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044140u); -#endif - /* 0xBFC2C140: 960D000A lhu $t5, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044140u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x960D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC2C148: A7AD004A sh $t5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044148u); return; } g_debug_last_store_pc = 0x80044148u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD004Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044148u); -#endif - /* 0xBFC2C14C: 8E05000C lw $a1, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004414Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E05000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004414Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C150: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x80044158u; /* jal link before delay slot */ - psx_delay_BFC2C150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044154u); -#endif - if (psx_delay_BFC2C150) { - psx_delay_BFC2C150 = 0; - cpu->gpr[31] = 0x80044158u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC2C158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044158u); -#endif - /* 0xBFC2C158: 8E0E0000 lw $t6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044158u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C15C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004415Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C160: 2DC10002 sltiu $at, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2DC10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80044160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C164: 10200013 beq $at, $zero, 0xBFC2C1B4 */ - uint32_t psx_brA_BFC2C164 = cpu->gpr[1]; uint32_t psx_brB_BFC2C164 = cpu->gpr[0]; - psx_taken_BFC2C164 = (psx_brA_BFC2C164 == psx_brB_BFC2C164); - psx_delay_BFC2C164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2C168: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044168u); -#endif - if (psx_delay_BFC2C164) { - psx_delay_BFC2C164 = 0; - if (psx_taken_BFC2C164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800441B4u); - goto label_BFC2C1B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004416Cu); - } -label_BFC2C16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C16C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044170u); -#endif - /* 0xBFC2C170: 8C428318 lw $v0, -31976($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044170u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428318u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C174: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044174u); -#endif - /* 0xBFC2C178: 8C63831C lw $v1, -31972($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044178u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63831Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2C17C: A6020010 sh $v0, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004417Cu); return; } g_debug_last_store_pc = 0x8004417Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6020010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC2C180: A7A20044 sh $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044180u); return; } g_debug_last_store_pc = 0x80044180u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC2C184: A6030012 sh $v1, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044184u); return; } g_debug_last_store_pc = 0x80044184u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA6030012u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2C188: A7A30046 sh $v1, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044188u); return; } g_debug_last_store_pc = 0x80044188u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30046u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044188u); -#endif - /* 0xBFC2C18C: 960F0014 lhu $t7, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004418Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x960F0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004418Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2C190: 27A40044 addiu $a0, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A40044u, cpu->gpr[4], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80044190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2C194: A7AF0048 sh $t7, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044194u); return; } g_debug_last_store_pc = 0x80044194u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0048u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044194u); -#endif - /* 0xBFC2C198: 96180016 lhu $t8, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044198u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x96180016u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C19C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004419Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2C1A0: A7B8004A sh $t8, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800441A0u); return; } g_debug_last_store_pc = 0x800441A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8004Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800441A0u); -#endif - /* 0xBFC2C1A4: 8E050018 lw $a1, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441A4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8E050018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800441A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C1A8: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x800441B0u; /* jal link before delay slot */ - psx_delay_BFC2C1A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C1AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800441ACu); -#endif - if (psx_delay_BFC2C1A8) { - psx_delay_BFC2C1A8 = 0; - cpu->gpr[31] = 0x800441B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC2C1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2C1B0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800441B0u); -#endif -label_BFC2C1B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C1B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441B4u); -#endif - /* 0xBFC2C1B4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800441B4u); -#endif - /* 0xBFC2C1B8: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441B8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800441B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C1BC: 03E00008 jr $ra */ - psx_delay_BFC2C1BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2C1C0: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x800441C0u); -#endif - if (psx_delay_BFC2C1BC) { - psx_delay_BFC2C1BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C1C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C1C4u); - int psx_delay_BFC2C1E0 = 0; - int psx_taken_BFC2C1E0 = 0; - int psx_delay_BFC2C288 = 0; - int psx_delay_BFC2C2DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C1E8u: goto label_BFC2C1E8; - case 0xBFC2C290u: goto label_BFC2C290; - default: break; - } - } -label_BFC2C1C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C1C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441C4u); -#endif - /* 0xBFC2C1C4: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800441C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C1C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800441C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2C1CC: ACAE0000 sw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441CCu); return; } g_debug_last_store_pc = 0x800441CCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800441CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441D0u); -#endif - /* 0xBFC2C1D0: 8CAF0000 lw $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441D0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20u); } - PGXP_LOAD(0x8CAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800441D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C1D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800441D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2C1D8: 000FC0C2 srl $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] >> 3u; - PGXP_ALU(0x000FC0C2u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800441D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2C1DC: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800441DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2C1E0: 1320002B beq $t9, $zero, 0xBFC2C290 */ - uint32_t psx_brA_BFC2C1E0 = cpu->gpr[25]; uint32_t psx_brB_BFC2C1E0 = cpu->gpr[0]; - psx_taken_BFC2C1E0 = (psx_brA_BFC2C1E0 == psx_brB_BFC2C1E0); - psx_delay_BFC2C1E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C1E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800441E4u); -#endif - if (psx_delay_BFC2C1E0) { - psx_delay_BFC2C1E0 = 0; - if (psx_taken_BFC2C1E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044290u); - goto label_BFC2C290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800441E8u); - } -label_BFC2C1E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C1E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441E8u); -#endif - /* 0xBFC2C1E8: 8C8B0008 lw $t3, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441E8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800441E8u); -#endif - /* 0xBFC2C1EC: 8C880004 lw $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441ECu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800441ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800441F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2C1F0: 316CFFFF andi $t4, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800441F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC2C1F4: A4AC0010 sh $t4, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800441F4u); return; } g_debug_last_store_pc = 0x800441F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800441F4u); -#endif - /* 0xBFC2C1F8: 8C8D0008 lw $t5, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800441F8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800441F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2C1FC: 00084882 srl $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] >> 2u; - PGXP_ALU(0x00084882u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800441FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2C200: 000D7402 srl $t6, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] >> 16u; - PGXP_ALU(0x000D7402u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2C204: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2C208: A4AF0012 sh $t7, 18($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044208u); return; } g_debug_last_store_pc = 0x80044208u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0012u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044208u); -#endif - /* 0xBFC2C20C: 8C98000C lw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004420Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004420Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C210: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2C214: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2C218: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2C21C: A4B90014 sh $t9, 20($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004421Cu); return; } g_debug_last_store_pc = 0x8004421Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B90014u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004421Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044220u); -#endif - /* 0xBFC2C220: 8C880008 lw $t0, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044220u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x414u); -#endif - /* 0xBFC2C224: 008A1021 addu $v0, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[10]; - PGXP_ALU(0x008A1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C228: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C22C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004422Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2C230: 00084C02 srl $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] >> 16u; - PGXP_ALU(0x00084C02u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2C234: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C238: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC2C23C: A4AA0016 sh $t2, 22($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 22; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004423Cu); return; } g_debug_last_store_pc = 0x8004423Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA4AA0016u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004423Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2C240: ACA40018 sw $a0, 24($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044240u); return; } g_debug_last_store_pc = 0x80044240u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044240u); -#endif - /* 0xBFC2C244: 8C4B0004 lw $t3, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044244u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C248: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2C24C: 316CFFFF andi $t4, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004424Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC2C250: A4AC0004 sh $t4, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044250u); return; } g_debug_last_store_pc = 0x80044250u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044250u); -#endif - /* 0xBFC2C254: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044254u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C258: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2C25C: 000D7402 srl $t6, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] >> 16u; - PGXP_ALU(0x000D7402u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2C260: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2C264: A4AF0006 sh $t7, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044264u); return; } g_debug_last_store_pc = 0x80044264u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044264u); -#endif - /* 0xBFC2C268: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044268u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C26C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2C270: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2C274: A4B90008 sh $t9, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044274u); return; } g_debug_last_store_pc = 0x80044274u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B90008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044274u); -#endif - /* 0xBFC2C278: 8C48FFFC lw $t0, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044278u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C48FFFCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2C27C: ACA2000C sw $v0, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004427Cu); return; } g_debug_last_store_pc = 0x8004427Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACA2000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2C280: 00084C02 srl $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] >> 16u; - PGXP_ALU(0x00084C02u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2C284: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C288: 03E00008 jr $ra */ - psx_delay_BFC2C288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC2C28C: A4AA000A sh $t2, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004428Cu); return; } g_debug_last_store_pc = 0x8004428Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA4AA000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004428Cu); -#endif - if (psx_delay_BFC2C288) { - psx_delay_BFC2C288 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2C290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044290u); -#endif - /* 0xBFC2C290: 8C8B0008 lw $t3, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044290u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C294: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2C298: 316CFFFF andi $t4, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC2C29C: A4AC0004 sh $t4, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004429Cu); return; } g_debug_last_store_pc = 0x8004429Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004429Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442A0u); -#endif - /* 0xBFC2C2A0: 8C8D0004 lw $t5, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442A0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800442A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C2A4: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800442A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2C2A8: 000D7402 srl $t6, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] >> 16u; - PGXP_ALU(0x000D7402u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800442A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2C2AC: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800442ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2C2B0: A4AF0006 sh $t7, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800442B0u); return; } g_debug_last_store_pc = 0x800442B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800442B0u); -#endif - /* 0xBFC2C2B4: 8C980004 lw $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442B4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800442B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C2B8: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800442B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2C2BC: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800442BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2C2C0: A4B90008 sh $t9, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800442C0u); return; } g_debug_last_store_pc = 0x800442C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B90008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800442C0u); -#endif - /* 0xBFC2C2C4: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442C4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800442C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2C2C8: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800442C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2C2CC: 00084C02 srl $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] >> 16u; - PGXP_ALU(0x00084C02u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800442CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2C2D0: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800442D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC2C2D4: A4AA000A sh $t2, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800442D4u); return; } g_debug_last_store_pc = 0x800442D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA4AA000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800442D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2C2D8: ACA4000C sw $a0, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442D8u); return; } g_debug_last_store_pc = 0x800442D8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACA4000Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800442D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C2DC: 03E00008 jr $ra */ - psx_delay_BFC2C2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C2E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800442E0u); -#endif - if (psx_delay_BFC2C2DC) { - psx_delay_BFC2C2DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C2F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C2F0u); - int psx_delay_BFC2C30C = 0; - int psx_delay_BFC2C318 = 0; - int psx_taken_BFC2C318 = 0; - int psx_delay_BFC2C320 = 0; - int psx_taken_BFC2C320 = 0; - int psx_delay_BFC2C340 = 0; - int psx_taken_BFC2C340 = 0; - int psx_delay_BFC2C368 = 0; - int psx_taken_BFC2C368 = 0; - int psx_delay_BFC2C394 = 0; - int psx_taken_BFC2C394 = 0; - int psx_delay_BFC2C3B4 = 0; - int psx_taken_BFC2C3B4 = 0; - int psx_delay_BFC2C3C8 = 0; - int psx_delay_BFC2C3D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C314u: goto label_BFC2C314; - case 0xBFC2C320u: goto label_BFC2C320; - case 0xBFC2C328u: goto label_BFC2C328; - case 0xBFC2C348u: goto label_BFC2C348; - case 0xBFC2C364u: goto label_BFC2C364; - case 0xBFC2C370u: goto label_BFC2C370; - case 0xBFC2C39Cu: goto label_BFC2C39C; - case 0xBFC2C3ACu: goto label_BFC2C3AC; - case 0xBFC2C3BCu: goto label_BFC2C3BC; - case 0xBFC2C3C0u: goto label_BFC2C3C0; - case 0xBFC2C3D0u: goto label_BFC2C3D0; - default: break; - } - } -label_BFC2C2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800442F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2C2F0: 27BDFF98 addiu $sp, $sp, -104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-104)); - PGXP_ALU(0x27BDFF98u, cpu->gpr[29], _pgx1, 0xFFFFFF98u); } -#ifdef PSX_COSIM - cosim_instr(0x800442F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2C2F4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442F4u); return; } g_debug_last_store_pc = 0x800442F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800442F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2C2F8: AFA40068 sw $a0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442F8u); return; } g_debug_last_store_pc = 0x800442F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40068u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800442F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2C2FC: AFA60070 sw $a2, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800442FCu); return; } g_debug_last_store_pc = 0x800442FCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60070u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800442FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2C300: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2C304: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2C308: 27A5003C addiu $a1, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A5003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C30C: 0C010FDD jal 0xB0043F74 */ - cpu->gpr[31] = 0x80044314u; /* jal link before delay slot */ - psx_delay_BFC2C30C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2C310: 27A60058 addiu $a2, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A60058u, cpu->gpr[6], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80044310u); -#endif - if (psx_delay_BFC2C30C) { - psx_delay_BFC2C30C = 0; - cpu->gpr[31] = 0x80044314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F74u); - cpu->pc = 0x80043F74u; return; - } -label_BFC2C314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044314u); -#endif - /* 0xBFC2C314: 8FAA0070 lw $t2, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044314u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0070u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2C318: 1440002D bne $v0, $zero, 0xBFC2C3D0 */ - uint32_t psx_brA_BFC2C318 = cpu->gpr[2]; uint32_t psx_brB_BFC2C318 = cpu->gpr[0]; - psx_taken_BFC2C318 = (psx_brA_BFC2C318 != psx_brB_BFC2C318); - psx_delay_BFC2C318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C31C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004431Cu); -#endif - if (psx_delay_BFC2C318) { - psx_delay_BFC2C318 = 0; - if (psx_taken_BFC2C318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443D0u); - goto label_BFC2C3D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044320u); - } -label_BFC2C320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2C320: 15410027 bne $t2, $at, 0xBFC2C3C0 */ - uint32_t psx_brA_BFC2C320 = cpu->gpr[10]; uint32_t psx_brB_BFC2C320 = cpu->gpr[1]; - psx_taken_BFC2C320 = (psx_brA_BFC2C320 != psx_brB_BFC2C320); - psx_delay_BFC2C320 = 1; - /* 0xBFC2C324: 8FA40068 lw $a0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044324u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40068u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044324u); -#endif - if (psx_delay_BFC2C320) { - psx_delay_BFC2C320 = 0; - if (psx_taken_BFC2C320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443C0u); - goto label_BFC2C3C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044328u); - } -label_BFC2C328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044328u); -#endif - /* 0xBFC2C328: 87A90042 lh $t1, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044328u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90042u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044328u); -#endif - /* 0xBFC2C32C: 97AE0046 lhu $t6, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004432Cu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE0046u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004432Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x205u); -#endif - /* 0xBFC2C330: 01201021 addu $v0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4104u); -#endif - /* 0xBFC2C334: 004E4021 addu $t0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044334u); -#endif - /* 0xBFC2C338: 8FA30048 lw $v1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044338u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30048u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC2C33C: 0048082B sltu $at, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0048082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004433Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C340: 1020001E beq $at, $zero, 0xBFC2C3BC */ - uint32_t psx_brA_BFC2C340 = cpu->gpr[1]; uint32_t psx_brB_BFC2C340 = cpu->gpr[0]; - psx_taken_BFC2C340 = (psx_brA_BFC2C340 == psx_brB_BFC2C340); - psx_delay_BFC2C340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x281u); -#endif - /* 0xBFC2C344: 01203821 addu $a3, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01203821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044344u); -#endif - if (psx_delay_BFC2C340) { - psx_delay_BFC2C340 = 0; - if (psx_taken_BFC2C340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443BCu); - goto label_BFC2C3BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044348u); - } -label_BFC2C348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044348u); -#endif - /* 0xBFC2C348: 97AF0044 lhu $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044348u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044348u); -#endif - /* 0xBFC2C34C: 87A40040 lh $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004434Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004434Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C350: 3C068000 lui $a2, 0x8000 */ - cpu->gpr[6] = 0x80000000u; - PGXP_ALU(0x3C068000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2C354: 000FC042 srl $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] >> 1u; - PGXP_ALU(0x000FC042u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80044354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C358: 34C68000 ori $a2, $a2, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x8000u; - PGXP_ALU(0x34C68000u, cpu->gpr[6], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80044358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000030u); -#endif - /* 0xBFC2C35C: 00982821 addu $a1, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x00982821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004435Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044360u); -#endif - /* 0xBFC2C360: 87A20040 lh $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044360u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044360u); -#endif -label_BFC2C364: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C364u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x32u); -#endif - /* 0xBFC2C364: 0085082B sltu $at, $a0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0085082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C368: 10200010 beq $at, $zero, 0xBFC2C3AC */ - uint32_t psx_brA_BFC2C368 = cpu->gpr[1]; uint32_t psx_brB_BFC2C368 = cpu->gpr[0]; - psx_taken_BFC2C368 = (psx_brA_BFC2C368 == psx_brB_BFC2C368); - psx_delay_BFC2C368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C36C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004436Cu); -#endif - if (psx_delay_BFC2C368) { - psx_delay_BFC2C368 = 0; - if (psx_taken_BFC2C368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443ACu); - goto label_BFC2C3AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044370u); - } -label_BFC2C370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044370u); -#endif - /* 0xBFC2C370: 8C790000 lw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044370u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C374: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000840u); -#endif - /* 0xBFC2C378: 03265825 or $t3, $t9, $a2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[25] | cpu->gpr[6]; - PGXP_ALU(0x03265825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2C37C: AC6B0000 sw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004437Cu); return; } g_debug_last_store_pc = 0x8004437Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004437Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044380u); -#endif - /* 0xBFC2C380: 97AC0044 lhu $t4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044380u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x97AC0044u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044380u); -#endif - /* 0xBFC2C384: 87A40040 lh $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044384u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2C388: 000C6842 srl $t5, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] >> 1u; - PGXP_ALU(0x000C6842u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80044388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2030u); -#endif - /* 0xBFC2C38C: 008D2821 addu $a1, $a0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[13]; - PGXP_ALU(0x008D2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004438Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC2C390: 0045082B sltu $at, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0045082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C394: 1420FFF6 bne $at, $zero, 0xBFC2C370 */ - uint32_t psx_brA_BFC2C394 = cpu->gpr[1]; uint32_t psx_brB_BFC2C394 = cpu->gpr[0]; - psx_taken_BFC2C394 = (psx_brA_BFC2C394 != psx_brB_BFC2C394); - psx_delay_BFC2C394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C398: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044398u); -#endif - if (psx_delay_BFC2C394) { - psx_delay_BFC2C394 = 0; - if (psx_taken_BFC2C394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044370u); - goto label_BFC2C370; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004439Cu); - } -label_BFC2C39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004439Cu); -#endif - /* 0xBFC2C39C: 87A90042 lh $t1, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004439Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90042u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004439Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443A0u); -#endif - /* 0xBFC2C3A0: 97AE0046 lhu $t6, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800443A0u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE0046u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800443A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C3A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800443A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4300u); -#endif - /* 0xBFC2C3A8: 012E4021 addu $t0, $t1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[8] = cpu->gpr[9] + cpu->gpr[14]; - PGXP_ALU(0x012E4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800443A8u); -#endif -label_BFC2C3AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2C3AC: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800443ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x182u); -#endif - /* 0xBFC2C3B0: 00E8082B sltu $at, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x00E8082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800443B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C3B4: 1420FFEB bne $at, $zero, 0xBFC2C364 */ - uint32_t psx_brA_BFC2C3B4 = cpu->gpr[1]; uint32_t psx_brB_BFC2C3B4 = cpu->gpr[0]; - psx_taken_BFC2C3B4 = (psx_brA_BFC2C3B4 != psx_brB_BFC2C3B4); - psx_delay_BFC2C3B4 = 1; - /* 0xBFC2C3B8: 87A20040 lh $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800443B8u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800443B8u); -#endif - if (psx_delay_BFC2C3B4) { - psx_delay_BFC2C3B4 = 0; - if (psx_taken_BFC2C3B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044364u); - goto label_BFC2C364; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443BCu); - } -label_BFC2C3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443BCu); -#endif - /* 0xBFC2C3BC: 8FA40068 lw $a0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800443BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40068u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800443BCu); -#endif -label_BFC2C3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2C3C0: 27A5003C addiu $a1, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A5003Cu, cpu->gpr[5], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800443C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2C3C4: 27A60058 addiu $a2, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A60058u, cpu->gpr[6], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x800443C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C3C8: 0C0110F8 jal 0xB00443E0 */ - cpu->gpr[31] = 0x800443D0u; /* jal link before delay slot */ - psx_delay_BFC2C3C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x481u); -#endif - /* 0xBFC2C3CC: 01403821 addu $a3, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800443CCu); -#endif - if (psx_delay_BFC2C3C8) { - psx_delay_BFC2C3C8 = 0; - cpu->gpr[31] = 0x800443D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443E0u); - cpu->pc = 0x800443E0u; return; - } -label_BFC2C3D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443D0u); -#endif - /* 0xBFC2C3D0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800443D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800443D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2C3D4: 27BD0068 addiu $sp, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27BD0068u, cpu->gpr[29], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x800443D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C3D8: 03E00008 jr $ra */ - psx_delay_BFC2C3D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C3DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800443DCu); -#endif - if (psx_delay_BFC2C3D8) { - psx_delay_BFC2C3D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C3E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C3E0u); - int psx_delay_BFC2C418 = 0; - int psx_taken_BFC2C418 = 0; - int psx_delay_BFC2C454 = 0; - int psx_taken_BFC2C454 = 0; - int psx_delay_BFC2C460 = 0; - int psx_taken_BFC2C460 = 0; - int psx_delay_BFC2C474 = 0; - int psx_taken_BFC2C474 = 0; - int psx_delay_BFC2C484 = 0; - int psx_taken_BFC2C484 = 0; - int psx_delay_BFC2C4A8 = 0; - int psx_delay_BFC2C4B4 = 0; - int psx_taken_BFC2C4B4 = 0; - int psx_delay_BFC2C4BC = 0; - int psx_taken_BFC2C4BC = 0; - int psx_delay_BFC2C4D0 = 0; - int psx_taken_BFC2C4D0 = 0; - int psx_delay_BFC2C4DC = 0; - int psx_delay_BFC2C60C = 0; - int psx_taken_BFC2C60C = 0; - int psx_delay_BFC2C618 = 0; - int psx_taken_BFC2C618 = 0; - int psx_delay_BFC2C624 = 0; - int psx_taken_BFC2C624 = 0; - int psx_delay_BFC2C630 = 0; - int psx_delay_BFC2C694 = 0; - int psx_delay_BFC2C6A8 = 0; - int psx_taken_BFC2C6A8 = 0; - int psx_delay_BFC2C6C0 = 0; - int psx_taken_BFC2C6C0 = 0; - int psx_delay_BFC2C6D0 = 0; - int psx_taken_BFC2C6D0 = 0; - int psx_delay_BFC2C6DC = 0; - int psx_delay_BFC2C758 = 0; - int psx_taken_BFC2C758 = 0; - int psx_delay_BFC2C764 = 0; - int psx_delay_BFC2C78C = 0; - int psx_delay_BFC2C7A0 = 0; - int psx_taken_BFC2C7A0 = 0; - int psx_delay_BFC2C7B8 = 0; - int psx_taken_BFC2C7B8 = 0; - int psx_delay_BFC2C7DC = 0; - int psx_delay_BFC2C7EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C3FCu: goto label_BFC2C3FC; - case 0xBFC2C420u: goto label_BFC2C420; - case 0xBFC2C45Cu: goto label_BFC2C45C; - case 0xBFC2C468u: goto label_BFC2C468; - case 0xBFC2C46Cu: goto label_BFC2C46C; - case 0xBFC2C470u: goto label_BFC2C470; - case 0xBFC2C47Cu: goto label_BFC2C47C; - case 0xBFC2C484u: goto label_BFC2C484; - case 0xBFC2C48Cu: goto label_BFC2C48C; - case 0xBFC2C494u: goto label_BFC2C494; - case 0xBFC2C4B0u: goto label_BFC2C4B0; - case 0xBFC2C4BCu: goto label_BFC2C4BC; - case 0xBFC2C4C4u: goto label_BFC2C4C4; - case 0xBFC2C4C8u: goto label_BFC2C4C8; - case 0xBFC2C4D8u: goto label_BFC2C4D8; - case 0xBFC2C4E4u: goto label_BFC2C4E4; - case 0xBFC2C614u: goto label_BFC2C614; - case 0xBFC2C618u: goto label_BFC2C618; - case 0xBFC2C620u: goto label_BFC2C620; - case 0xBFC2C624u: goto label_BFC2C624; - case 0xBFC2C62Cu: goto label_BFC2C62C; - case 0xBFC2C630u: goto label_BFC2C630; - case 0xBFC2C638u: goto label_BFC2C638; - case 0xBFC2C69Cu: goto label_BFC2C69C; - case 0xBFC2C6B0u: goto label_BFC2C6B0; - case 0xBFC2C6B4u: goto label_BFC2C6B4; - case 0xBFC2C6C8u: goto label_BFC2C6C8; - case 0xBFC2C6CCu: goto label_BFC2C6CC; - case 0xBFC2C6D8u: goto label_BFC2C6D8; - case 0xBFC2C6E4u: goto label_BFC2C6E4; - case 0xBFC2C760u: goto label_BFC2C760; - case 0xBFC2C764u: goto label_BFC2C764; - case 0xBFC2C76Cu: goto label_BFC2C76C; - case 0xBFC2C794u: goto label_BFC2C794; - case 0xBFC2C7A8u: goto label_BFC2C7A8; - case 0xBFC2C7ACu: goto label_BFC2C7AC; - case 0xBFC2C7C0u: goto label_BFC2C7C0; - case 0xBFC2C7C4u: goto label_BFC2C7C4; - case 0xBFC2C7E4u: goto label_BFC2C7E4; - default: break; - } - } -label_BFC2C3E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2C3E0: 27BDFF90 addiu $sp, $sp, -112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-112)); - PGXP_ALU(0x27BDFF90u, cpu->gpr[29], _pgx1, 0xFFFFFF90u); } -#ifdef PSX_COSIM - cosim_instr(0x800443E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2C3E4: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800443E4u); return; } g_debug_last_store_pc = 0x800443E4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800443E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000021u); -#endif - /* 0xBFC2C3E8: 00A0C021 addu $t8, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800443E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2C3EC: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800443ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2C3F0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800443F0u); return; } g_debug_last_store_pc = 0x800443F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800443F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2C3F4: 270F0018 addiu $t7, $t8, 24 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[24] + (24)); - PGXP_ALU(0x270F0018u, cpu->gpr[15], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800443F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2C3F8: 27AE0044 addiu $t6, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27AE0044u, cpu->gpr[14], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x800443F8u); -#endif -label_BFC2C3FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C3FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800443FCu); -#endif - /* 0xBFC2C3FC: 8F010000 lw $at, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800443FCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800443FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2C400: 2718000C addiu $t8, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2718000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C404: ADC10000 sw $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044404u); return; } g_debug_last_store_pc = 0x80044404u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADC10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044404u); -#endif - /* 0xBFC2C408: 8F01FFF8 lw $at, -8($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044408u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2C40C: 25CE000C addiu $t6, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (12)); - PGXP_ALU(0x25CE000Cu, cpu->gpr[14], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004440Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C410: ADC1FFF8 sw $at, -8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044410u); return; } g_debug_last_store_pc = 0x80044410u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADC1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044410u); -#endif - /* 0xBFC2C414: 8F01FFFC lw $at, -4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044414u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2C418: 170FFFF8 bne $t8, $t7, 0xBFC2C3FC */ - uint32_t psx_brA_BFC2C418 = cpu->gpr[24]; uint32_t psx_brB_BFC2C418 = cpu->gpr[15]; - psx_taken_BFC2C418 = (psx_brA_BFC2C418 != psx_brB_BFC2C418); - psx_delay_BFC2C418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C41C: ADC1FFFC sw $at, -4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004441Cu); return; } g_debug_last_store_pc = 0x8004441Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADC1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8004441Cu); -#endif - if (psx_delay_BFC2C418) { - psx_delay_BFC2C418 = 0; - if (psx_taken_BFC2C418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443FCu); - goto label_BFC2C3FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044420u); - } -label_BFC2C420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044420u); -#endif - /* 0xBFC2C420: 8F010000 lw $at, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044420u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2C424: 27B90060 addiu $t9, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27B90060u, cpu->gpr[25], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80044424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C428: ADC10000 sw $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044428u); return; } g_debug_last_store_pc = 0x80044428u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xADC10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044428u); -#endif - /* 0xBFC2C42C: 88C10003 lwl $at, 3($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 3; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_left = (3u - psx_byte_offset) * 8u; uint32_t psx_keep_mask = (1u << psx_shift_left) - 1u; uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x40u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } - PGXP_LOAD(0x88C10003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8004442Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044430u); -#endif - /* 0xBFC2C430: 98C10000 lwr $at, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_byte_offset = psx_addr & 3u; uint32_t psx_shift_right = psx_byte_offset * 8u; uint32_t psx_keep_mask = ~(0xFFFFFFFFu >> psx_shift_right); uint32_t psx_word = psx_cyc_load_word(cpu, psx_aligned, 1, 0x40u); uint32_t psx_old_rt = cpu->gpr[1]; cpu->gpr[1] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } - PGXP_LOAD(0x98C10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C434: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2C438: AB210003 swl $at, 3($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 3; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (3)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = (3u - psx_shift_bytes) * 8u; uint32_t psx_keep_mask = 0x00FFFFFFu >> (psx_shift_bytes * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] >> psx_shift_bits); g_debug_last_store_pc = 0x80044438u; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xAB210003u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2C43C: BB210000 swr $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); uint32_t psx_aligned = psx_addr & ~3u; uint32_t psx_shift_bytes = psx_addr & 3u; uint32_t psx_shift_bits = psx_shift_bytes * 8u; uint32_t psx_keep_mask = 0xFFFFFF00u << ((3u - psx_shift_bytes) * 8u); uint32_t psx_mem = cpu->read_word(psx_aligned); uint32_t psx_new = (psx_mem & psx_keep_mask) | (cpu->gpr[1] << psx_shift_bits); g_debug_last_store_pc = 0x8004443Cu; cpu->write_word(psx_aligned, psx_new); } - PGXP_STORE(0xBB210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8004443Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044440u); -#endif - /* 0xBFC2C440: 94C10004 lhu $at, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044440u); return; } cpu->gpr[1] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 1, 0x40u); } - PGXP_LOAD(0x94C10004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C444: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2C448: A7210004 sh $at, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044448u); return; } g_debug_last_store_pc = 0x80044448u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[1] & 0xFFFFu)); } - PGXP_STORE(0xA7210004u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044448u); -#endif - /* 0xBFC2C44C: 8FA90044 lw $t1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004444Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90044u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004444Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2C454: 11200005 beq $t1, $zero, 0xBFC2C46C */ - uint32_t psx_brA_BFC2C454 = cpu->gpr[9]; uint32_t psx_brB_BFC2C454 = cpu->gpr[0]; - psx_taken_BFC2C454 = (psx_brA_BFC2C454 == psx_brB_BFC2C454); - psx_delay_BFC2C454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C458: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044458u); -#endif - if (psx_delay_BFC2C454) { - psx_delay_BFC2C454 = 0; - if (psx_taken_BFC2C454) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004446Cu); - goto label_BFC2C46C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004445Cu); - } -label_BFC2C45C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C45Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004445Cu); -#endif - /* 0xBFC2C45C: 8FA3006C lw $v1, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004445Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3006Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004445Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C460: 10000003 beq $zero, $zero, 0xBFC2C470 */ - uint32_t psx_brA_BFC2C460 = cpu->gpr[0]; uint32_t psx_brB_BFC2C460 = cpu->gpr[0]; - psx_taken_BFC2C460 = (psx_brA_BFC2C460 == psx_brB_BFC2C460); - psx_delay_BFC2C460 = 1; - /* 0xBFC2C464: 8FA20044 lw $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044464u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044464u); -#endif - if (psx_delay_BFC2C460) { - psx_delay_BFC2C460 = 0; - if (psx_taken_BFC2C460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044470u); - goto label_BFC2C470; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044468u); - } -label_BFC2C468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C468: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044468u); -#endif -label_BFC2C46C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C46Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004446Cu); -#endif - /* 0xBFC2C46C: 8FA20044 lw $v0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004446Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20044u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004446Cu); -#endif -label_BFC2C470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C470: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2C474: 14410003 bne $v0, $at, 0xBFC2C484 */ - uint32_t psx_brA_BFC2C474 = cpu->gpr[2]; uint32_t psx_brB_BFC2C474 = cpu->gpr[1]; - psx_taken_BFC2C474 = (psx_brA_BFC2C474 != psx_brB_BFC2C474); - psx_delay_BFC2C474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C478: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80044478u); -#endif - if (psx_delay_BFC2C474) { - psx_delay_BFC2C474 = 0; - if (psx_taken_BFC2C474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044484u); - goto label_BFC2C484; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004447Cu); - } -label_BFC2C47C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C47Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C47C: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2C480: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80044480u); -#endif -label_BFC2C484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2C484: 14410003 bne $v0, $at, 0xBFC2C494 */ - uint32_t psx_brA_BFC2C484 = cpu->gpr[2]; uint32_t psx_brB_BFC2C484 = cpu->gpr[1]; - psx_taken_BFC2C484 = (psx_brA_BFC2C484 != psx_brB_BFC2C484); - psx_delay_BFC2C484 = 1; - /* 0xBFC2C488: 97AA004C lhu $t2, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044488u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA004Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044488u); -#endif - if (psx_delay_BFC2C484) { - psx_delay_BFC2C484 = 0; - if (psx_taken_BFC2C484) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044494u); - goto label_BFC2C494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004448Cu); - } -label_BFC2C48C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C48Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004448Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C48C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004448Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044490u); -#endif - /* 0xBFC2C490: 97AA004C lhu $t2, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044490u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA004Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044490u); -#endif -label_BFC2C494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2C494: 306BFFFF andi $t3, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x306BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2C498: 014B0019 multu $t2, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014B0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x80044498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC2C49C: AFA7007C sw $a3, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004449Cu); return; } g_debug_last_store_pc = 0x8004449Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7007Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004449Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2C4A0: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800444A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC2C4A4: A7AC004C sh $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444A4u); return; } g_debug_last_store_pc = 0x800444A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800444A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C4A8: 0C010FC0 jal 0xB0043F00 */ - cpu->gpr[31] = 0x800444B0u; /* jal link before delay slot */ - psx_delay_BFC2C4A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800444ACu); -#endif - if (psx_delay_BFC2C4A8) { - psx_delay_BFC2C4A8 = 0; - cpu->gpr[31] = 0x800444B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F00u); - cpu->pc = 0x80043F00u; return; - } -label_BFC2C4B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444B0u); -#endif - /* 0xBFC2C4B0: 8FA7007C lw $a3, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800444B0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7007Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800444B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2C4B4: 10400004 beq $v0, $zero, 0xBFC2C4C8 */ - uint32_t psx_brA_BFC2C4B4 = cpu->gpr[2]; uint32_t psx_brB_BFC2C4B4 = cpu->gpr[0]; - psx_taken_BFC2C4B4 = (psx_brA_BFC2C4B4 == psx_brB_BFC2C4B4); - psx_delay_BFC2C4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C4B8: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800444B8u); -#endif - if (psx_delay_BFC2C4B4) { - psx_delay_BFC2C4B4 = 0; - if (psx_taken_BFC2C4B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800444C8u); - goto label_BFC2C4C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800444BCu); - } -label_BFC2C4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C4BC: 10000002 beq $zero, $zero, 0xBFC2C4C8 */ - uint32_t psx_brA_BFC2C4BC = cpu->gpr[0]; uint32_t psx_brB_BFC2C4BC = cpu->gpr[0]; - psx_taken_BFC2C4BC = (psx_brA_BFC2C4BC == psx_brB_BFC2C4BC); - psx_delay_BFC2C4BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C4C0: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800444C0u); -#endif - if (psx_delay_BFC2C4BC) { - psx_delay_BFC2C4BC = 0; - if (psx_taken_BFC2C4BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800444C8u); - goto label_BFC2C4C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800444C4u); - } -label_BFC2C4C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C4C4: 24030002 addiu $v1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24030002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800444C4u); -#endif -label_BFC2C4C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2C4C8: 240D0004 addiu $t5, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240D0004u, cpu->gpr[13], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800444C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10080u); -#endif - /* 0xBFC2C4CC: A6070000 sh $a3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444CCu); return; } g_debug_last_store_pc = 0x800444CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA6070000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800444CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2C4D0: 10E00081 beq $a3, $zero, 0xBFC2C6D8 */ - uint32_t psx_brA_BFC2C4D0 = cpu->gpr[7]; uint32_t psx_brB_BFC2C4D0 = cpu->gpr[0]; - psx_taken_BFC2C4D0 = (psx_brA_BFC2C4D0 == psx_brB_BFC2C4D0); - psx_delay_BFC2C4D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC2C4D4: AE0D006C sw $t5, 108($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800444D4u); return; } g_debug_last_store_pc = 0x800444D4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE0D006Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800444D4u); -#endif - if (psx_delay_BFC2C4D0) { - psx_delay_BFC2C4D0 = 0; - if (psx_taken_BFC2C4D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446D8u); - goto label_BFC2C6D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800444D8u); - } -label_BFC2C4D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC2C4D8: 26040018 addiu $a0, $s0, 24 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (24)); - PGXP_ALU(0x26040018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800444D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C4DC: 0C014685 jal 0xB0051A14 */ - cpu->gpr[31] = 0x800444E4u; /* jal link before delay slot */ - psx_delay_BFC2C4DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2C4E0: AFA30068 sw $v1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800444E0u); return; } g_debug_last_store_pc = 0x800444E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30068u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800444E0u); -#endif - if (psx_delay_BFC2C4DC) { - psx_delay_BFC2C4DC = 0; - cpu->gpr[31] = 0x800444E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051A14u); - cpu->pc = 0x80051A14u; return; - } -label_BFC2C4E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C4E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444E4u); -#endif - /* 0xBFC2C4E4: 8FA30068 lw $v1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800444E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30068u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800444E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C4E8: A6000042 sh $zero, 66($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444E8u); return; } g_debug_last_store_pc = 0x800444E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000042u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800444E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C4EC: A6000044 sh $zero, 68($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444ECu); return; } g_debug_last_store_pc = 0x800444ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800444ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800444F0u); -#endif - /* 0xBFC2C4F0: 97AF004C lhu $t7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444F0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800444F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C4F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800444F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C4F8: A60F0046 sh $t7, 70($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444F8u); return; } g_debug_last_store_pc = 0x800444F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0046u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800444F8u); -#endif - /* 0xBFC2C4FC: 97B8004E lhu $t8, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800444FCu); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x97B8004Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800444FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C500: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2C504: 0303001B divu $t8, $v1 */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[3]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0303001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80044504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2C508: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC2C50C: A60E0048 sh $t6, 72($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004450Cu); return; } g_debug_last_store_pc = 0x8004450Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004450Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044510u); -#endif - /* 0xBFC2C510: 87B90060 lh $t9, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044510u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90060u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC2C518: A6190040 sh $t9, 64($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044518u); return; } g_debug_last_store_pc = 0x80044518u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA6190040u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044518u); -#endif - /* 0xBFC2C51C: 87A80060 lh $t0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004451Cu); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A80060u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004451Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C520: A6000022 sh $zero, 34($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044520u); return; } g_debug_last_store_pc = 0x80044520u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000022u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C524: A6000020 sh $zero, 32($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044524u); return; } g_debug_last_store_pc = 0x80044524u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC2C528: A608002E sh $t0, 46($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 46; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044528u); return; } g_debug_last_store_pc = 0x80044528u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608002Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044528u); -#endif - /* 0xBFC2C52C: 97A9004C lhu $t1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004452Cu); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x97A9004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004452Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C530: A6000030 sh $zero, 48($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044530u); return; } g_debug_last_store_pc = 0x80044530u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000030u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C534: A600002A sh $zero, 42($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044534u); return; } g_debug_last_store_pc = 0x80044534u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600002Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC2C538: A6090028 sh $t1, 40($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044538u); return; } g_debug_last_store_pc = 0x80044538u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044538u); -#endif - /* 0xBFC2C53C: 97AA004E lhu $t2, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004453Cu); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA004Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004453Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C540: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2C544: 0143001B divu $t2, $v1 */ - { uint32_t psx_n = cpu->gpr[10]; uint32_t psx_d = cpu->gpr[3]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0143001Bu, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80044544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2C548: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC2C54C: A60B0032 sh $t3, 50($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004454Cu); return; } g_debug_last_store_pc = 0x8004454Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA60B0032u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004454Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044550u); -#endif - /* 0xBFC2C550: 97AC004C lhu $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044550u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x97AC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC2C558: A60C0038 sh $t4, 56($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044558u); return; } g_debug_last_store_pc = 0x80044558u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA60C0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044558u); -#endif - /* 0xBFC2C55C: 97AD004E lhu $t5, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004455Cu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x97AD004Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004455Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2C564: 01A3001B divu $t5, $v1 */ - { uint32_t psx_n = cpu->gpr[13]; uint32_t psx_d = cpu->gpr[3]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A3001Bu, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80044564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2C568: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C56C: A60F003A sh $t7, 58($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004456Cu); return; } g_debug_last_store_pc = 0x8004456Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F003Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004456Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044570u); -#endif - /* 0xBFC2C570: 87B80062 lh $t8, 98($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 98; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (98)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044570u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80062u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C574: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2C578: A2180024 sb $t8, 36($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 36; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044578u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (36)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA2180024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044578u); -#endif - /* 0xBFC2C57C: 87AE0064 lh $t6, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004457Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0064u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004457Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC2C584: A20E0025 sb $t6, 37($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 37; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044584u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (37)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA20E0025u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044584u); -#endif - /* 0xBFC2C588: 97A8004C lhu $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044588u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x97A8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044588u); -#endif - /* 0xBFC2C58C: 87B90062 lh $t9, 98($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 98; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (98)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004458Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90062u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004458Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC2C594: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C598: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2C59C: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004459Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2C5A0: A202002C sb $v0, 44($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 44; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800445A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (44)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800445A0u); -#endif - /* 0xBFC2C5A4: 87A90064 lh $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445A4u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800445A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C5A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800445A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC2C5AC: A209002D sb $t1, 45($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 45; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800445ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (45)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA209002Du, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800445ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445B0u); -#endif - /* 0xBFC2C5B0: 87AA0062 lh $t2, 98($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 98; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (98)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445B0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0062u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800445B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C5B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800445B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC2C5B8: A20A0034 sb $t2, 52($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 52; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800445B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (52)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20A0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800445B8u); -#endif - /* 0xBFC2C5BC: 97AC004E lhu $t4, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445BCu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x97AC004Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800445BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445C0u); -#endif - /* 0xBFC2C5C0: 87AB0064 lh $t3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445C0u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB0064u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800445C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C5C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800445C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC2C5C8: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800445C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2C5CC: 25AFFFFF addiu $t7, $t5, -1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); - PGXP_ALU(0x25AFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800445CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C5D0: A20F0035 sb $t7, 53($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 53; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800445D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (53)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA20F0035u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800445D0u); -#endif - /* 0xBFC2C5D4: 97AE004C lhu $t6, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445D4u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE004Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800445D4u); -#endif - /* 0xBFC2C5D8: 87B80062 lh $t8, 98($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 98; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (98)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445D8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80062u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800445D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C5DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800445DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2C5E0: 030EC821 addu $t9, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030EC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800445E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2C5E4: 2728FFFF addiu $t0, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x2728FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800445E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC2C5E8: A208003C sb $t0, 60($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 60; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800445E8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (60)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA208003Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800445E8u); -#endif - /* 0xBFC2C5EC: 97AA004E lhu $t2, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445ECu); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA004Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800445ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800445F0u); -#endif - /* 0xBFC2C5F0: 87A90064 lh $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800445F0u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800445F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C5F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800445F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC2C5F8: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800445F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2C5FC: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800445FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC2C600: A20C003D sb $t4, 61($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 61; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044600u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (61)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA20C003Du, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044600u); -#endif - /* 0xBFC2C604: 87A50056 lh $a1, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044604u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50056u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044604u); -#endif - /* 0xBFC2C608: 87A40054 lh $a0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044608u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40054u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C60C: 14600002 bne $v1, $zero, 0xBFC2C618 */ - uint32_t psx_brA_BFC2C60C = cpu->gpr[3]; uint32_t psx_brB_BFC2C60C = cpu->gpr[0]; - psx_taken_BFC2C60C = (psx_brA_BFC2C60C != psx_brB_BFC2C60C); - psx_delay_BFC2C60C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044610u); -#endif - if (psx_delay_BFC2C60C) { - psx_delay_BFC2C60C = 0; - if (psx_taken_BFC2C60C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044618u); - goto label_BFC2C618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044614u); - } -label_BFC2C614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2C614: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80044614u); return; -#ifdef PSX_COSIM - cosim_instr(0x80044614u); -#endif -label_BFC2C618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C618: 14600002 bne $v1, $zero, 0xBFC2C624 */ - uint32_t psx_brA_BFC2C618 = cpu->gpr[3]; uint32_t psx_brB_BFC2C618 = cpu->gpr[0]; - psx_taken_BFC2C618 = (psx_brA_BFC2C618 != psx_brB_BFC2C618); - psx_delay_BFC2C618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C61C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004461Cu); -#endif - if (psx_delay_BFC2C618) { - psx_delay_BFC2C618 = 0; - if (psx_taken_BFC2C618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044624u); - goto label_BFC2C624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044620u); - } -label_BFC2C620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2C620: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80044620u); return; -#ifdef PSX_COSIM - cosim_instr(0x80044620u); -#endif -label_BFC2C624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C624: 14600002 bne $v1, $zero, 0xBFC2C630 */ - uint32_t psx_brA_BFC2C624 = cpu->gpr[3]; uint32_t psx_brB_BFC2C624 = cpu->gpr[0]; - psx_taken_BFC2C624 = (psx_brA_BFC2C624 != psx_brB_BFC2C624); - psx_delay_BFC2C624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044628u); -#endif - if (psx_delay_BFC2C624) { - psx_delay_BFC2C624 = 0; - if (psx_taken_BFC2C624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044630u); - goto label_BFC2C630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004462Cu); - } -label_BFC2C62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2C62C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004462Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004462Cu); -#endif -label_BFC2C630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C630: 0C0145B4 jal 0xB00516D0 */ - cpu->gpr[31] = 0x80044638u; /* jal link before delay slot */ - psx_delay_BFC2C630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044634u); -#endif - if (psx_delay_BFC2C630) { - psx_delay_BFC2C630 = 0; - cpu->gpr[31] = 0x80044638u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800516D0u); - cpu->pc = 0x800516D0u; return; - } -label_BFC2C638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2C638: A6020026 sh $v0, 38($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044638u); return; } g_debug_last_store_pc = 0x80044638u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6020026u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044638u); -#endif - /* 0xBFC2C63C: 87AD0048 lh $t5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004463Cu); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD0048u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004463Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2C640: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC2C644: A60D0052 sh $t5, 82($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 82; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (82)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044644u); return; } g_debug_last_store_pc = 0x80044644u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D0052u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044644u); -#endif - /* 0xBFC2C648: 87AF004A lh $t7, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044648u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF004Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2C64C: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8004464Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C650: A60F0054 sh $t7, 84($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044650u); return; } g_debug_last_store_pc = 0x80044650u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0054u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044650u); -#endif - /* 0xBFC2C654: 97B8004C lhu $t8, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044654u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x97B8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2C658: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2C65C: A6180056 sh $t8, 86($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 86; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004465Cu); return; } g_debug_last_store_pc = 0x8004465Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180056u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004465Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044660u); -#endif - /* 0xBFC2C660: 97AE004E lhu $t6, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044660u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE004Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2C664: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC2C668: A60E0058 sh $t6, 88($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044668u); return; } g_debug_last_store_pc = 0x80044668u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0058u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044668u); -#endif - /* 0xBFC2C66C: 87B90054 lh $t9, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004466Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90054u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004466Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C670: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC2C674: A619004A sh $t9, 74($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044674u); return; } g_debug_last_store_pc = 0x80044674u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA619004Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044674u); -#endif - /* 0xBFC2C678: 87A80056 lh $t0, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044678u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A80056u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C67C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC2C680: A608004C sh $t0, 76($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044680u); return; } g_debug_last_store_pc = 0x80044680u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044680u); -#endif - /* 0xBFC2C684: 97A90058 lhu $t1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044684u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x97A90058u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC2C68C: A609004E sh $t1, 78($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004468Cu); return; } g_debug_last_store_pc = 0x8004468Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA609004Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044690u); -#endif - /* 0xBFC2C690: 97AA005A lhu $t2, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044690u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA005Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C694: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8004469Cu; /* jal link before delay slot */ - psx_delay_BFC2C694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC2C698: A60A0050 sh $t2, 80($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044698u); return; } g_debug_last_store_pc = 0x80044698u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0050u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044698u); -#endif - if (psx_delay_BFC2C694) { - psx_delay_BFC2C694 = 0; - cpu->gpr[31] = 0x8004469Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2C69C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C69Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004469Cu); -#endif - /* 0xBFC2C69C: 860B0046 lh $t3, 70($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004469Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x860B0046u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004469Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446A0u); -#endif - /* 0xBFC2C6A0: 860D0048 lh $t5, 72($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446A0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x860D0048u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800446A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C6A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800446A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2C6A8: 05610002 bgez $t3, 0xBFC2C6B4 */ - uint32_t psx_brA_BFC2C6A8 = cpu->gpr[11]; - psx_taken_BFC2C6A8 = ((int32_t)psx_brA_BFC2C6A8 >= 0); - psx_delay_BFC2C6A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC2C6AC: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800446ACu); -#endif - if (psx_delay_BFC2C6A8) { - psx_delay_BFC2C6A8 = 0; - if (psx_taken_BFC2C6A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446B4u); - goto label_BFC2C6B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446B0u); - } -label_BFC2C6B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C6B0: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800446B0u); -#endif -label_BFC2C6B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC2C6B4: 00016043 sra $t4, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00016043u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800446B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC2C6B8: A60C005A sh $t4, 90($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446B8u); return; } g_debug_last_store_pc = 0x800446B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA60C005Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800446B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C6BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800446BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2C6C0: 05A10002 bgez $t5, 0xBFC2C6CC */ - uint32_t psx_brA_BFC2C6C0 = cpu->gpr[13]; - psx_taken_BFC2C6C0 = ((int32_t)psx_brA_BFC2C6C0 >= 0); - psx_delay_BFC2C6C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2003u); -#endif - /* 0xBFC2C6C4: 01A00821 addu $at, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800446C4u); -#endif - if (psx_delay_BFC2C6C0) { - psx_delay_BFC2C6C0 = 0; - if (psx_taken_BFC2C6C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446CCu); - goto label_BFC2C6CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446C8u); - } -label_BFC2C6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C6C8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800446C8u); -#endif -label_BFC2C6CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2C6CC: 00017843 sra $t7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017843u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800446CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C6D0: 10000044 beq $zero, $zero, 0xBFC2C7E4 */ - uint32_t psx_brA_BFC2C6D0 = cpu->gpr[0]; uint32_t psx_brB_BFC2C6D0 = cpu->gpr[0]; - psx_taken_BFC2C6D0 = (psx_brA_BFC2C6D0 == psx_brB_BFC2C6D0); - psx_delay_BFC2C6D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C6D4: A60F005C sh $t7, 92($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446D4u); return; } g_debug_last_store_pc = 0x800446D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F005Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800446D4u); -#endif - if (psx_delay_BFC2C6D0) { - psx_delay_BFC2C6D0 = 0; - if (psx_taken_BFC2C6D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447E4u); - goto label_BFC2C7E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800446D8u); - } -label_BFC2C6D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC2C6D8: 26040004 addiu $a0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800446D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C6DC: 0C0146B7 jal 0xB0051ADC */ - cpu->gpr[31] = 0x800446E4u; /* jal link before delay slot */ - psx_delay_BFC2C6DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2C6E0: AFA30068 sw $v1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800446E0u); return; } g_debug_last_store_pc = 0x800446E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30068u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800446E0u); -#endif - if (psx_delay_BFC2C6DC) { - psx_delay_BFC2C6DC = 0; - cpu->gpr[31] = 0x800446E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051ADCu); - cpu->pc = 0x80051ADCu; return; - } -label_BFC2C6E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C6E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446E4u); -#endif - /* 0xBFC2C6E4: 8FA30068 lw $v1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800446E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30068u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800446E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C6E8: A600000E sh $zero, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446E8u); return; } g_debug_last_store_pc = 0x800446E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800446E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C6EC: A600000C sh $zero, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446ECu); return; } g_debug_last_store_pc = 0x800446ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800446ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800446F0u); -#endif - /* 0xBFC2C6F0: 97B8004C lhu $t8, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446F0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x97B8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800446F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C6F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800446F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2C6F8: A6180014 sh $t8, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446F8u); return; } g_debug_last_store_pc = 0x800446F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800446F8u); -#endif - /* 0xBFC2C6FC: 97AE004E lhu $t6, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800446FCu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE004Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800446FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C700: A6000042 sh $zero, 66($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044700u); return; } g_debug_last_store_pc = 0x80044700u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000042u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2C704: A6000044 sh $zero, 68($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044704u); return; } g_debug_last_store_pc = 0x80044704u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000044u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC2C708: A60E0016 sh $t6, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044708u); return; } g_debug_last_store_pc = 0x80044708u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0016u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044708u); -#endif - /* 0xBFC2C70C: 97B9004C lhu $t9, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004470Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x97B9004Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004470Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC2C714: A6190046 sh $t9, 70($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044714u); return; } g_debug_last_store_pc = 0x80044714u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA6190046u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044714u); -#endif - /* 0xBFC2C718: 97A8004E lhu $t0, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044718u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x97A8004Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C71C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004471Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2C720: 0103001B divu $t0, $v1 */ - { uint32_t psx_n = cpu->gpr[8]; uint32_t psx_d = cpu->gpr[3]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0103001Bu, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80044720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2C724: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC2C728: A6090048 sh $t1, 72($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044728u); return; } g_debug_last_store_pc = 0x80044728u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090048u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044728u); -#endif - /* 0xBFC2C72C: 87AA0060 lh $t2, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004472Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0060u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C730: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC2C734: A60A0040 sh $t2, 64($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044734u); return; } g_debug_last_store_pc = 0x80044734u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0040u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044734u); -#endif - /* 0xBFC2C738: 87AB0062 lh $t3, 98($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 98; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (98)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044738u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB0062u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C73C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004473Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC2C740: A20B0010 sb $t3, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044740u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (16)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA20B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044740u); -#endif - /* 0xBFC2C744: 87AC0064 lh $t4, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044744u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC0064u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80044744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C748: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC2C74C: A20C0011 sb $t4, 17($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 17; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004474Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (17)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA20C0011u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004474Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044750u); -#endif - /* 0xBFC2C750: 87A50056 lh $a1, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044750u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50056u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044750u); -#endif - /* 0xBFC2C754: 87A40054 lh $a0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044754u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40054u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2C758: 14600002 bne $v1, $zero, 0xBFC2C764 */ - uint32_t psx_brA_BFC2C758 = cpu->gpr[3]; uint32_t psx_brB_BFC2C758 = cpu->gpr[0]; - psx_taken_BFC2C758 = (psx_brA_BFC2C758 != psx_brB_BFC2C758); - psx_delay_BFC2C758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C75C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004475Cu); -#endif - if (psx_delay_BFC2C758) { - psx_delay_BFC2C758 = 0; - if (psx_taken_BFC2C758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044764u); - goto label_BFC2C764; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044760u); - } -label_BFC2C760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2C760: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80044760u); return; -#ifdef PSX_COSIM - cosim_instr(0x80044760u); -#endif -label_BFC2C764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C764: 0C0145B4 jal 0xB00516D0 */ - cpu->gpr[31] = 0x8004476Cu; /* jal link before delay slot */ - psx_delay_BFC2C764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C768: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044768u); -#endif - if (psx_delay_BFC2C764) { - psx_delay_BFC2C764 = 0; - cpu->gpr[31] = 0x8004476Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800516D0u); - cpu->pc = 0x800516D0u; return; - } -label_BFC2C76C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C76Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2C76C: A6020012 sh $v0, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004476Cu); return; } g_debug_last_store_pc = 0x8004476Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6020012u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044770u); -#endif - /* 0xBFC2C770: 87AD0054 lh $t5, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044770u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD0054u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2C774: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC2C778: A60D004A sh $t5, 74($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044778u); return; } g_debug_last_store_pc = 0x80044778u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D004Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044778u); -#endif - /* 0xBFC2C77C: 87AF0056 lh $t7, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004477Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0056u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004477Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2C780: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2C784: 24060080 addiu $a2, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24060080u, cpu->gpr[6], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2C788: 24070080 addiu $a3, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24070080u, cpu->gpr[7], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C78C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80044794u; /* jal link before delay slot */ - psx_delay_BFC2C78C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2C790: A60F004C sh $t7, 76($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044790u); return; } g_debug_last_store_pc = 0x80044790u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F004Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044790u); -#endif - if (psx_delay_BFC2C78C) { - psx_delay_BFC2C78C = 0; - cpu->gpr[31] = 0x80044794u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2C794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044794u); -#endif - /* 0xBFC2C794: 86180046 lh $t8, 70($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044794u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x86180046u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044794u); -#endif - /* 0xBFC2C798: 86190048 lh $t9, 72($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044798u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x86190048u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C79C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004479Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2C7A0: 07010002 bgez $t8, 0xBFC2C7AC */ - uint32_t psx_brA_BFC2C7A0 = cpu->gpr[24]; - psx_taken_BFC2C7A0 = ((int32_t)psx_brA_BFC2C7A0 >= 0); - psx_delay_BFC2C7A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000003u); -#endif - /* 0xBFC2C7A4: 03000821 addu $at, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800447A4u); -#endif - if (psx_delay_BFC2C7A0) { - psx_delay_BFC2C7A0 = 0; - if (psx_taken_BFC2C7A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447ACu); - goto label_BFC2C7AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447A8u); - } -label_BFC2C7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C7A8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800447A8u); -#endif -label_BFC2C7AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C7AC: 00017043 sra $t6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017043u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800447ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC2C7B0: A60E005A sh $t6, 90($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800447B0u); return; } g_debug_last_store_pc = 0x800447B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E005Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800447B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C7B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800447B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2C7B8: 07210002 bgez $t9, 0xBFC2C7C4 */ - uint32_t psx_brA_BFC2C7B8 = cpu->gpr[25]; - psx_taken_BFC2C7B8 = ((int32_t)psx_brA_BFC2C7B8 >= 0); - psx_delay_BFC2C7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000003u); -#endif - /* 0xBFC2C7BC: 03200821 addu $at, $t9, $zero */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[25] + cpu->gpr[0]; - PGXP_ALU(0x03200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800447BCu); -#endif - if (psx_delay_BFC2C7B8) { - psx_delay_BFC2C7B8 = 0; - if (psx_taken_BFC2C7B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447C4u); - goto label_BFC2C7C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447C0u); - } -label_BFC2C7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C7C0: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800447C0u); -#endif -label_BFC2C7C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2C7C4: 00014043 sra $t0, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00014043u, cpu->gpr[8], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800447C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC2C7C8: A608005C sh $t0, 92($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800447C8u); return; } g_debug_last_store_pc = 0x800447C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608005Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800447C8u); -#endif - /* 0xBFC2C7CC: 86070040 lh $a3, 64($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800447CCu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070040u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800447CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2C7D0: AFA00010 sw $zero, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800447D0u); return; } g_debug_last_store_pc = 0x800447D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800447D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC2C7D4: 26040060 addiu $a0, $s0, 96 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (96)); - PGXP_ALU(0x26040060u, cpu->gpr[4], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x800447D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2C7D8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800447D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2C7DC: 0C013E93 jal 0xB004FA4C */ - cpu->gpr[31] = 0x800447E4u; /* jal link before delay slot */ - psx_delay_BFC2C7DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2C7E0: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800447E0u); -#endif - if (psx_delay_BFC2C7DC) { - psx_delay_BFC2C7DC = 0; - cpu->gpr[31] = 0x800447E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FA4Cu); - cpu->pc = 0x8004FA4Cu; return; - } -label_BFC2C7E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447E4u); -#endif - /* 0xBFC2C7E4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800447E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800447E4u); -#endif - /* 0xBFC2C7E8: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800447E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800447E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C7EC: 03E00008 jr $ra */ - psx_delay_BFC2C7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2C7F0: 27BD0070 addiu $sp, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27BD0070u, cpu->gpr[29], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x800447F0u); -#endif - if (psx_delay_BFC2C7EC) { - psx_delay_BFC2C7EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C7F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C7F4u); - int psx_delay_BFC2C80C = 0; - int psx_taken_BFC2C80C = 0; - int psx_delay_BFC2C878 = 0; - int psx_delay_BFC2C8A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C814u: goto label_BFC2C814; - case 0xBFC2C880u: goto label_BFC2C880; - default: break; - } - } -label_BFC2C7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800447F4u); -#endif - /* 0xBFC2C7F4: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800447F4u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800447F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2C7F8: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800447F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C7FC: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800447FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C800: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2C804: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2C808: A4850042 sh $a1, 66($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044808u); return; } g_debug_last_store_pc = 0x80044808u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4850042u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2C80C: 11C0001C beq $t6, $zero, 0xBFC2C880 */ - uint32_t psx_brA_BFC2C80C = cpu->gpr[14]; uint32_t psx_brB_BFC2C80C = cpu->gpr[0]; - psx_taken_BFC2C80C = (psx_brA_BFC2C80C == psx_brB_BFC2C80C); - psx_delay_BFC2C80C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC2C810: A4860044 sh $a2, 68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044810u); return; } g_debug_last_store_pc = 0x80044810u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860044u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044810u); -#endif - if (psx_delay_BFC2C80C) { - psx_delay_BFC2C80C = 0; - if (psx_taken_BFC2C80C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044880u); - goto label_BFC2C880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044814u); - } -label_BFC2C814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044814u); -#endif - /* 0xBFC2C814: 8498005C lh $t8, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044814u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8498005Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044814u); -#endif - /* 0xBFC2C818: 848E0048 lh $t6, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044818u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044818u); -#endif - /* 0xBFC2C81C: 848F005A lh $t7, 90($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 90; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004481Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F005Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000C0u); -#endif - /* 0xBFC2C820: 00D83823 subu $a3, $a2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[6] - cpu->gpr[24]; - PGXP_ALU(0x00D83823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC2C824: A487002A sh $a3, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044824u); return; } g_debug_last_store_pc = 0x80044824u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487002Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80044824u); -#endif - /* 0xBFC2C828: 84990046 lh $t9, 70($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044828u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990046u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5080u); -#endif - /* 0xBFC2C82C: 00EE6021 addu $t4, $a3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[12] = cpu->gpr[7] + cpu->gpr[14]; - PGXP_ALU(0x00EE6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004482Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2C830: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8024u); -#endif - /* 0xBFC2C834: 00AF1023 subu $v0, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[5] - cpu->gpr[15]; - PGXP_ALU(0x00AF1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2C838: A4820020 sh $v0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044838u); return; } g_debug_last_store_pc = 0x80044838u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2C83C: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000204u); -#endif - /* 0xBFC2C840: 00594821 addu $t1, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00594821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC2C844: A4890038 sh $t1, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044844u); return; } g_debug_last_store_pc = 0x80044844u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4890038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2C848: 00094400 sll $t0, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2C84C: 00025400 sll $t2, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00025400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004484Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2C850: 00071C00 sll $v1, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00071C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C854: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2C858: A4830022 sh $v1, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044858u); return; } g_debug_last_store_pc = 0x80044858u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4830022u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2C85C: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2C860: A48A0030 sh $t2, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044860u); return; } g_debug_last_store_pc = 0x80044860u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2C864: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC2C868: 01805821 addu $t3, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3001u); -#endif - /* 0xBFC2C86C: 01806821 addu $t5, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01806821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004486Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC2C870: A48D003A sh $t5, 58($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044870u); return; } g_debug_last_store_pc = 0x80044870u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D003Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC2C874: A48B0032 sh $t3, 50($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044874u); return; } g_debug_last_store_pc = 0x80044874u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B0032u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C878: 03E00008 jr $ra */ - psx_delay_BFC2C878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC2C87C: A4880028 sh $t0, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004487Cu); return; } g_debug_last_store_pc = 0x8004487Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4880028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004487Cu); -#endif - if (psx_delay_BFC2C878) { - psx_delay_BFC2C878 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2C880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044880u); -#endif - /* 0xBFC2C880: 8499005C lh $t9, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044880u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8499005Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044880u); -#endif - /* 0xBFC2C884: 848F005A lh $t7, 90($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 90; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044884u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F005Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000048u); -#endif - /* 0xBFC2C888: 00D91823 subu $v1, $a2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[6] - cpu->gpr[25]; - PGXP_ALU(0x00D91823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C88C: 00031C00 sll $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00031C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004488Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C890: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC2C894: 00AFC023 subu $t8, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[5] - cpu->gpr[15]; - PGXP_ALU(0x00AFC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2C898: A498000C sh $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044898u); return; } g_debug_last_store_pc = 0x80044898u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA498000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2C89C: A483000E sh $v1, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004489Cu); return; } g_debug_last_store_pc = 0x8004489Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA483000Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C8A0: 03E00008 jr $ra */ - psx_delay_BFC2C8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C8A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800448A4u); -#endif - if (psx_delay_BFC2C8A0) { - psx_delay_BFC2C8A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C8A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C8A8u); - int psx_delay_BFC2C8B0 = 0; - int psx_taken_BFC2C8B0 = 0; - int psx_delay_BFC2C8E0 = 0; - int psx_taken_BFC2C8E0 = 0; - int psx_delay_BFC2C8F0 = 0; - int psx_taken_BFC2C8F0 = 0; - int psx_delay_BFC2C900 = 0; - int psx_taken_BFC2C900 = 0; - int psx_delay_BFC2C918 = 0; - int psx_taken_BFC2C918 = 0; - int psx_delay_BFC2C980 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C8B8u: goto label_BFC2C8B8; - case 0xBFC2C8E8u: goto label_BFC2C8E8; - case 0xBFC2C8ECu: goto label_BFC2C8EC; - case 0xBFC2C8F8u: goto label_BFC2C8F8; - case 0xBFC2C8FCu: goto label_BFC2C8FC; - case 0xBFC2C908u: goto label_BFC2C908; - case 0xBFC2C90Cu: goto label_BFC2C90C; - case 0xBFC2C920u: goto label_BFC2C920; - case 0xBFC2C924u: goto label_BFC2C924; - case 0xBFC2C980u: goto label_BFC2C980; - default: break; - } - } -label_BFC2C8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448A8u); -#endif - /* 0xBFC2C8A8: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800448A8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800448A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C8AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800448ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2C8B0: 11C00033 beq $t6, $zero, 0xBFC2C980 */ - uint32_t psx_brA_BFC2C8B0 = cpu->gpr[14]; uint32_t psx_brB_BFC2C8B0 = cpu->gpr[0]; - psx_taken_BFC2C8B0 = (psx_brA_BFC2C8B0 == psx_brB_BFC2C8B0); - psx_delay_BFC2C8B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C8B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800448B4u); -#endif - if (psx_delay_BFC2C8B0) { - psx_delay_BFC2C8B0 = 0; - if (psx_taken_BFC2C8B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044980u); - goto label_BFC2C980; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448B8u); - } -label_BFC2C8B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448B8u); -#endif - /* 0xBFC2C8B8: 848F0046 lh $t7, 70($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800448B8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0046u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800448B8u); -#endif - /* 0xBFC2C8BC: 84980048 lh $t8, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800448BCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980048u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800448BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC2C8C0: 01E50019 multu $t7, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[15] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[15])); -#endif - PGXP_MULDIV(0x01E50019u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800448C0u); -#endif - /* 0xBFC2C8C4: 848F0044 lh $t7, 68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800448C4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800448C4u); -#endif - /* 0xBFC2C8C8: 84990042 lh $t9, 66($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800448C8u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990042u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800448C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2C8CC: 00002812 mflo $a1 */ - cpu->gpr[5] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002812u, cpu->gpr[5], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800448CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C8D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800448D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C8D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800448D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2C8D8: 03060019 multu $t8, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[24] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[24])); -#endif - PGXP_MULDIV(0x03060019u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x800448D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C8DC: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800448DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2C8E0: 04A10002 bgez $a1, 0xBFC2C8EC */ - uint32_t psx_brA_BFC2C8E0 = cpu->gpr[5]; - psx_taken_BFC2C8E0 = ((int32_t)psx_brA_BFC2C8E0 >= 0); - psx_delay_BFC2C8E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC2C8E4: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800448E4u); -#endif - if (psx_delay_BFC2C8E0) { - psx_delay_BFC2C8E0 = 0; - if (psx_taken_BFC2C8E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448ECu); - goto label_BFC2C8EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448E8u); - } -label_BFC2C8E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C8E8: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800448E8u); -#endif -label_BFC2C8EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2C8EC: 00012B03 sra $a1, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00012B03u, cpu->gpr[5], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800448ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C8F0: 04C10002 bgez $a2, 0xBFC2C8FC */ - uint32_t psx_brA_BFC2C8F0 = cpu->gpr[6]; - psx_taken_BFC2C8F0 = ((int32_t)psx_brA_BFC2C8F0 >= 0); - psx_delay_BFC2C8F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC2C8F4: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800448F4u); -#endif - if (psx_delay_BFC2C8F0) { - psx_delay_BFC2C8F0 = 0; - if (psx_taken_BFC2C8F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448FCu); - goto label_BFC2C8FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448F8u); - } -label_BFC2C8F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C8F8: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800448F8u); -#endif -label_BFC2C8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800448FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2C8FC: 00013303 sra $a2, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00013303u, cpu->gpr[6], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800448FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2C900: 04A10002 bgez $a1, 0xBFC2C90C */ - uint32_t psx_brA_BFC2C900 = cpu->gpr[5]; - psx_taken_BFC2C900 = ((int32_t)psx_brA_BFC2C900 >= 0); - psx_delay_BFC2C900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC2C904: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044904u); -#endif - if (psx_delay_BFC2C900) { - psx_delay_BFC2C900 = 0; - if (psx_taken_BFC2C900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004490Cu); - goto label_BFC2C90C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044908u); - } -label_BFC2C908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C908: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044908u); -#endif -label_BFC2C90C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C90Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2C90C: 00017043 sra $t6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017043u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004004u); -#endif - /* 0xBFC2C910: 032E1023 subu $v0, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[25] - cpu->gpr[14]; - PGXP_ALU(0x032E1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2C914: A4820020 sh $v0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044914u); return; } g_debug_last_store_pc = 0x80044914u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2C918: 04C10002 bgez $a2, 0xBFC2C924 */ - uint32_t psx_brA_BFC2C918 = cpu->gpr[6]; - psx_taken_BFC2C918 = ((int32_t)psx_brA_BFC2C918 >= 0); - psx_delay_BFC2C918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC2C91C: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004491Cu); -#endif - if (psx_delay_BFC2C918) { - psx_delay_BFC2C918 = 0; - if (psx_taken_BFC2C918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044924u); - goto label_BFC2C924; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044920u); - } -label_BFC2C920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C920: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044920u); -#endif -label_BFC2C924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2C924: 0001C043 sra $t8, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C043u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80044924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008080u); -#endif - /* 0xBFC2C928: 01F83823 subu $a3, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F83823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC2C92C: A487002A sh $a3, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004492Cu); return; } g_debug_last_store_pc = 0x8004492Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487002Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004492Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C0u); -#endif - /* 0xBFC2C930: 00E66021 addu $t4, $a3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[7] + cpu->gpr[6]; - PGXP_ALU(0x00E66021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x224u); -#endif - /* 0xBFC2C934: 00454821 addu $t1, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[5]; - PGXP_ALU(0x00454821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2C938: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2C93C: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004493Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2C940: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2C944: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2C948: 00025400 sll $t2, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00025400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2C94C: 00071C00 sll $v1, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00071C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004494Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2C950: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2C954: A4830022 sh $v1, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044954u); return; } g_debug_last_store_pc = 0x80044954u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4830022u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2C958: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2C95C: A48A0030 sh $t2, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004495Cu); return; } g_debug_last_store_pc = 0x8004495Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004495Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1005u); -#endif - /* 0xBFC2C960: 01801021 addu $v0, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2C964: A482003A sh $v0, 58($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044964u); return; } g_debug_last_store_pc = 0x80044964u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA482003Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC2C968: 01204021 addu $t0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01204021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC2C96C: A4880028 sh $t0, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004496Cu); return; } g_debug_last_store_pc = 0x8004496Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4880028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2201u); -#endif - /* 0xBFC2C970: 01206821 addu $t5, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01206821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC2C974: 01805821 addu $t3, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC2C978: A48B0032 sh $t3, 50($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044978u); return; } g_debug_last_store_pc = 0x80044978u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B0032u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC2C97C: A48D0038 sh $t5, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004497Cu); return; } g_debug_last_store_pc = 0x8004497Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D0038u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004497Cu); -#endif -label_BFC2C980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2C980: 03E00008 jr $ra */ - psx_delay_BFC2C980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C984: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044984u); -#endif - if (psx_delay_BFC2C980) { - psx_delay_BFC2C980 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2C988(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2C988u); - int psx_delay_BFC2C990 = 0; - int psx_taken_BFC2C990 = 0; - int psx_delay_BFC2C9B0 = 0; - int psx_taken_BFC2C9B0 = 0; - int psx_delay_BFC2C9C8 = 0; - int psx_taken_BFC2C9C8 = 0; - int psx_delay_BFC2CA48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2C998u: goto label_BFC2C998; - case 0xBFC2C9B8u: goto label_BFC2C9B8; - case 0xBFC2C9BCu: goto label_BFC2C9BC; - case 0xBFC2C9D0u: goto label_BFC2C9D0; - case 0xBFC2C9D4u: goto label_BFC2C9D4; - case 0xBFC2CA48u: goto label_BFC2CA48; - default: break; - } - } -label_BFC2C988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044988u); -#endif - /* 0xBFC2C988: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044988u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C98C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2C990: 11C0002D beq $t6, $zero, 0xBFC2CA48 */ - uint32_t psx_brA_BFC2C990 = cpu->gpr[14]; uint32_t psx_brB_BFC2C990 = cpu->gpr[0]; - psx_taken_BFC2C990 = (psx_brA_BFC2C990 == psx_brB_BFC2C990); - psx_delay_BFC2C990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044994u); -#endif - if (psx_delay_BFC2C990) { - psx_delay_BFC2C990 = 0; - if (psx_taken_BFC2C990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A48u); - goto label_BFC2CA48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044998u); - } -label_BFC2C998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2C998: A4850046 sh $a1, 70($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044998u); return; } g_debug_last_store_pc = 0x80044998u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4850046u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044998u); -#endif - /* 0xBFC2C99C: 848F0046 lh $t7, 70($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004499Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0046u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC2C9A0: A4860048 sh $a2, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449A0u); return; } g_debug_last_store_pc = 0x800449A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860048u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800449A0u); -#endif - /* 0xBFC2C9A4: 84990048 lh $t9, 72($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449A4u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990048u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800449A4u); -#endif - /* 0xBFC2C9A8: 848E0042 lh $t6, 66($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449A8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0042u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800449A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C9AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800449ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2C9B0: 05E10002 bgez $t7, 0xBFC2C9BC */ - uint32_t psx_brA_BFC2C9B0 = cpu->gpr[15]; - psx_taken_BFC2C9B0 = ((int32_t)psx_brA_BFC2C9B0 >= 0); - psx_delay_BFC2C9B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8003u); -#endif - /* 0xBFC2C9B4: 01E00821 addu $at, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449B4u); -#endif - if (psx_delay_BFC2C9B0) { - psx_delay_BFC2C9B0 = 0; - if (psx_taken_BFC2C9B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800449BCu); - goto label_BFC2C9BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800449B8u); - } -label_BFC2C9B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C9B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C9B8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800449B8u); -#endif -label_BFC2C9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2C9BC: 0001C043 sra $t8, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C043u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800449BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2C9C0: A498005A sh $t8, 90($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449C0u); return; } g_debug_last_store_pc = 0x800449C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA498005Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800449C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2C9C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800449C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2C9C8: 07210002 bgez $t9, 0xBFC2C9D4 */ - uint32_t psx_brA_BFC2C9C8 = cpu->gpr[25]; - psx_taken_BFC2C9C8 = ((int32_t)psx_brA_BFC2C9C8 >= 0); - psx_delay_BFC2C9C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000003u); -#endif - /* 0xBFC2C9CC: 03200821 addu $at, $t9, $zero */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[25] + cpu->gpr[0]; - PGXP_ALU(0x03200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449CCu); -#endif - if (psx_delay_BFC2C9C8) { - psx_delay_BFC2C9C8 = 0; - if (psx_taken_BFC2C9C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800449D4u); - goto label_BFC2C9D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800449D0u); - } -label_BFC2C9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2C9D0: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800449D0u); -#endif -label_BFC2C9D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2C9D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2C9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2C9D4: 00016843 sra $t5, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00016843u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800449D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC2C9D8: A48D005C sh $t5, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449D8u); return; } g_debug_last_store_pc = 0x800449D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D005Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800449D8u); -#endif - /* 0xBFC2C9DC: 8499005C lh $t9, 92($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449DCu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8499005Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800449DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449E0u); -#endif - /* 0xBFC2C9E0: 848F005A lh $t7, 90($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 90; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449E0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F005Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800449E0u); -#endif - /* 0xBFC2C9E4: 84980044 lh $t8, 68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449E4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980044u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800449E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2C9E8: 01CF1023 subu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2C9EC: A4820020 sh $v0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449ECu); return; } g_debug_last_store_pc = 0x800449ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800449ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800449F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000080u); -#endif - /* 0xBFC2C9F0: 03193823 subu $a3, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[7] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03193823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC2C9F4: A487002A sh $a3, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800449F4u); return; } g_debug_last_store_pc = 0x800449F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487002Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800449F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C0u); -#endif - /* 0xBFC2C9F8: 00E66021 addu $t4, $a3, $a2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[7] + cpu->gpr[6]; - PGXP_ALU(0x00E66021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x224u); -#endif - /* 0xBFC2C9FC: 00454821 addu $t1, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[5]; - PGXP_ALU(0x00454821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800449FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CA00: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CA04: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2CA08: 00071C00 sll $v1, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00071C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2CA0C: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CA10: A4830022 sh $v1, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A10u); return; } g_debug_last_store_pc = 0x80044A10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4830022u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CA14: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CA18: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2CA1C: 00025400 sll $t2, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00025400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2CA20: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2CA24: A48A0030 sh $t2, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A24u); return; } g_debug_last_store_pc = 0x80044A24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x205u); -#endif - /* 0xBFC2CA28: 01201021 addu $v0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2CA2C: A4820038 sh $v0, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A2Cu); return; } g_debug_last_store_pc = 0x80044A2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820038u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC2CA30: 01204021 addu $t0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01204021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC2CA34: A4880028 sh $t0, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A34u); return; } g_debug_last_store_pc = 0x80044A34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4880028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC2CA38: 01805821 addu $t3, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1009u); -#endif - /* 0xBFC2CA3C: 01801821 addu $v1, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CA40: A483003A sh $v1, 58($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A40u); return; } g_debug_last_store_pc = 0x80044A40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA483003Au, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC2CA44: A48B0032 sh $t3, 50($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A44u); return; } g_debug_last_store_pc = 0x80044A44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B0032u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A44u); -#endif -label_BFC2CA48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CA48: 03E00008 jr $ra */ - psx_delay_BFC2CA48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CA4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044A4Cu); -#endif - if (psx_delay_BFC2CA48) { - psx_delay_BFC2CA48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CA50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CA50u); - int psx_delay_BFC2CA50 = 0; -label_BFC2CA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CA50: 03E00008 jr $ra */ - psx_delay_BFC2CA50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2CA54: AC85006C sw $a1, 108($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044A54u); return; } g_debug_last_store_pc = 0x80044A54u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC85006Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A54u); -#endif - if (psx_delay_BFC2CA50) { - psx_delay_BFC2CA50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CA58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CA58u); - int psx_delay_BFC2CA70 = 0; - int psx_taken_BFC2CA70 = 0; - int psx_delay_BFC2CA80 = 0; - int psx_delay_BFC2CA94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CA78u: goto label_BFC2CA78; - case 0xBFC2CA88u: goto label_BFC2CA88; - default: break; - } - } -label_BFC2CA58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A58u); -#endif - /* 0xBFC2CA58: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044A58u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2CA5C: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2CA60: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2CA64: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2CA68: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2CA6C: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CA70: 11C00005 beq $t6, $zero, 0xBFC2CA88 */ - uint32_t psx_brA_BFC2CA70 = cpu->gpr[14]; uint32_t psx_brB_BFC2CA70 = cpu->gpr[0]; - psx_taken_BFC2CA70 = (psx_brA_BFC2CA70 == psx_brB_BFC2CA70); - psx_delay_BFC2CA70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2CA74: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A74u); -#endif - if (psx_delay_BFC2CA70) { - psx_delay_BFC2CA70 = 0; - if (psx_taken_BFC2CA70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A88u); - goto label_BFC2CA88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A78u); - } -label_BFC2CA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2CA78: A085001C sb $a1, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (28)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA085001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC2CA7C: A086001D sb $a2, 29($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (29)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA086001Du, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CA80: 03E00008 jr $ra */ - psx_delay_BFC2CA80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC2CA84: A087001E sb $a3, 30($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A84u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (30)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087001Eu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A84u); -#endif - if (psx_delay_BFC2CA80) { - psx_delay_BFC2CA80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2CA88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2CA88: A0850008 sb $a1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (8)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA0850008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC2CA8C: A0860009 sb $a2, 9($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 9; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (9)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860009u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC2CA90: A087000A sb $a3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044A90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (10)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087000Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80044A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CA94: 03E00008 jr $ra */ - psx_delay_BFC2CA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CA98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044A98u); -#endif - if (psx_delay_BFC2CA94) { - psx_delay_BFC2CA94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CA9C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CA9Cu); - int psx_delay_BFC2CAB0 = 0; - int psx_taken_BFC2CAB0 = 0; - int psx_delay_BFC2CAB8 = 0; - int psx_delay_BFC2CAC0 = 0; - int psx_taken_BFC2CAC0 = 0; - int psx_delay_BFC2CAC8 = 0; - int psx_delay_BFC2CAD8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CAB8u: goto label_BFC2CAB8; - case 0xBFC2CAC0u: goto label_BFC2CAC0; - case 0xBFC2CAC8u: goto label_BFC2CAC8; - case 0xBFC2CAD0u: goto label_BFC2CAD0; - case 0xBFC2CAD4u: goto label_BFC2CAD4; - default: break; - } - } -label_BFC2CA9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CA9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CA9C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CAA0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044AA0u); return; } g_debug_last_store_pc = 0x80044AA0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2CAA4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044AA4u); -#endif - /* 0xBFC2CAA8: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044AA8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CAAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CAB0: 11C00005 beq $t6, $zero, 0xBFC2CAC8 */ - uint32_t psx_brA_BFC2CAB0 = cpu->gpr[14]; uint32_t psx_brB_BFC2CAB0 = cpu->gpr[0]; - psx_taken_BFC2CAB0 = (psx_brA_BFC2CAB0 == psx_brB_BFC2CAB0); - psx_delay_BFC2CAB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CAB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044AB4u); -#endif - if (psx_delay_BFC2CAB0) { - psx_delay_BFC2CAB0 = 0; - if (psx_taken_BFC2CAB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AC8u); - goto label_BFC2CAC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AB8u); - } -label_BFC2CAB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CAB8: 0C014635 jal 0xB00518D4 */ - cpu->gpr[31] = 0x80044AC0u; /* jal link before delay slot */ - psx_delay_BFC2CAB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CABC: 24640018 addiu $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (24)); - PGXP_ALU(0x24640018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044ABCu); -#endif - if (psx_delay_BFC2CAB8) { - psx_delay_BFC2CAB8 = 0; - cpu->gpr[31] = 0x80044AC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800518D4u); - cpu->pc = 0x800518D4u; return; - } -label_BFC2CAC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CAC0: 10000004 beq $zero, $zero, 0xBFC2CAD4 */ - uint32_t psx_brA_BFC2CAC0 = cpu->gpr[0]; uint32_t psx_brB_BFC2CAC0 = cpu->gpr[0]; - psx_taken_BFC2CAC0 = (psx_brA_BFC2CAC0 == psx_brB_BFC2CAC0); - psx_delay_BFC2CAC0 = 1; - /* 0xBFC2CAC4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044AC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AC4u); -#endif - if (psx_delay_BFC2CAC0) { - psx_delay_BFC2CAC0 = 0; - if (psx_taken_BFC2CAC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AD4u); - goto label_BFC2CAD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AC8u); - } -label_BFC2CAC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CAC8: 0C014635 jal 0xB00518D4 */ - cpu->gpr[31] = 0x80044AD0u; /* jal link before delay slot */ - psx_delay_BFC2CAC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CACC: 24640004 addiu $a0, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24640004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044ACCu); -#endif - if (psx_delay_BFC2CAC8) { - psx_delay_BFC2CAC8 = 0; - cpu->gpr[31] = 0x80044AD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800518D4u); - cpu->pc = 0x800518D4u; return; - } -label_BFC2CAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AD0u); -#endif - /* 0xBFC2CAD0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044AD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AD0u); -#endif -label_BFC2CAD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CAD4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CAD8: 03E00008 jr $ra */ - psx_delay_BFC2CAD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CADC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044ADCu); -#endif - if (psx_delay_BFC2CAD8) { - psx_delay_BFC2CAD8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CAE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CAE0u); - int psx_delay_BFC2CAF4 = 0; - int psx_taken_BFC2CAF4 = 0; - int psx_delay_BFC2CAFC = 0; - int psx_delay_BFC2CB04 = 0; - int psx_taken_BFC2CB04 = 0; - int psx_delay_BFC2CB0C = 0; - int psx_delay_BFC2CB1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CAFCu: goto label_BFC2CAFC; - case 0xBFC2CB04u: goto label_BFC2CB04; - case 0xBFC2CB0Cu: goto label_BFC2CB0C; - case 0xBFC2CB14u: goto label_BFC2CB14; - case 0xBFC2CB18u: goto label_BFC2CB18; - default: break; - } - } -label_BFC2CAE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CAE0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CAE4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044AE4u); return; } g_debug_last_store_pc = 0x80044AE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2CAE8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044AE8u); -#endif - /* 0xBFC2CAEC: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044AECu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CAF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CAF4: 11C00005 beq $t6, $zero, 0xBFC2CB0C */ - uint32_t psx_brA_BFC2CAF4 = cpu->gpr[14]; uint32_t psx_brB_BFC2CAF4 = cpu->gpr[0]; - psx_taken_BFC2CAF4 = (psx_brA_BFC2CAF4 == psx_brB_BFC2CAF4); - psx_delay_BFC2CAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CAF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044AF8u); -#endif - if (psx_delay_BFC2CAF4) { - psx_delay_BFC2CAF4 = 0; - if (psx_taken_BFC2CAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B0Cu); - goto label_BFC2CB0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044AFCu); - } -label_BFC2CAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CAFC: 0C014644 jal 0xB0051910 */ - cpu->gpr[31] = 0x80044B04u; /* jal link before delay slot */ - psx_delay_BFC2CAFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CB00: 24640018 addiu $a0, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (24)); - PGXP_ALU(0x24640018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B00u); -#endif - if (psx_delay_BFC2CAFC) { - psx_delay_BFC2CAFC = 0; - cpu->gpr[31] = 0x80044B04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051910u); - cpu->pc = 0x80051910u; return; - } -label_BFC2CB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB04: 10000004 beq $zero, $zero, 0xBFC2CB18 */ - uint32_t psx_brA_BFC2CB04 = cpu->gpr[0]; uint32_t psx_brB_BFC2CB04 = cpu->gpr[0]; - psx_taken_BFC2CB04 = (psx_brA_BFC2CB04 == psx_brB_BFC2CB04); - psx_delay_BFC2CB04 = 1; - /* 0xBFC2CB08: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B08u); -#endif - if (psx_delay_BFC2CB04) { - psx_delay_BFC2CB04 = 0; - if (psx_taken_BFC2CB04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B18u); - goto label_BFC2CB18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B0Cu); - } -label_BFC2CB0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CB0C: 0C014644 jal 0xB0051910 */ - cpu->gpr[31] = 0x80044B14u; /* jal link before delay slot */ - psx_delay_BFC2CB0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2CB10: 24640004 addiu $a0, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24640004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B10u); -#endif - if (psx_delay_BFC2CB0C) { - psx_delay_BFC2CB0C = 0; - cpu->gpr[31] = 0x80044B14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051910u); - cpu->pc = 0x80051910u; return; - } -label_BFC2CB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B14u); -#endif - /* 0xBFC2CB14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B14u); -#endif -label_BFC2CB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CB18: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CB1C: 03E00008 jr $ra */ - psx_delay_BFC2CB1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044B20u); -#endif - if (psx_delay_BFC2CB1C) { - psx_delay_BFC2CB1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CB24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CB24u); - int psx_delay_BFC2CB38 = 0; - int psx_taken_BFC2CB38 = 0; - int psx_delay_BFC2CB40 = 0; - int psx_delay_BFC2CB48 = 0; - int psx_taken_BFC2CB48 = 0; - int psx_delay_BFC2CB58 = 0; - int psx_delay_BFC2CB68 = 0; - int psx_delay_BFC2CB78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CB40u: goto label_BFC2CB40; - case 0xBFC2CB48u: goto label_BFC2CB48; - case 0xBFC2CB50u: goto label_BFC2CB50; - case 0xBFC2CB60u: goto label_BFC2CB60; - case 0xBFC2CB70u: goto label_BFC2CB70; - case 0xBFC2CB74u: goto label_BFC2CB74; - default: break; - } - } -label_BFC2CB24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CB24: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CB28: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B28u); return; } g_debug_last_store_pc = 0x80044B28u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2CB2C: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B30u); -#endif - /* 0xBFC2CB30: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044B30u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CB38: 11C00005 beq $t6, $zero, 0xBFC2CB50 */ - uint32_t psx_brA_BFC2CB38 = cpu->gpr[14]; uint32_t psx_brB_BFC2CB38 = cpu->gpr[0]; - psx_taken_BFC2CB38 = (psx_brA_BFC2CB38 == psx_brB_BFC2CB38); - psx_delay_BFC2CB38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044B3Cu); -#endif - if (psx_delay_BFC2CB38) { - psx_delay_BFC2CB38 = 0; - if (psx_taken_BFC2CB38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B50u); - goto label_BFC2CB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B40u); - } -label_BFC2CB40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CB40: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044B48u; /* jal link before delay slot */ - psx_delay_BFC2CB40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CB44: 24650018 addiu $a1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (24)); - PGXP_ALU(0x24650018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B44u); -#endif - if (psx_delay_BFC2CB40) { - psx_delay_BFC2CB40 = 0; - cpu->gpr[31] = 0x80044B48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CB48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB48: 1000000A beq $zero, $zero, 0xBFC2CB74 */ - uint32_t psx_brA_BFC2CB48 = cpu->gpr[0]; uint32_t psx_brB_BFC2CB48 = cpu->gpr[0]; - psx_taken_BFC2CB48 = (psx_brA_BFC2CB48 == psx_brB_BFC2CB48); - psx_delay_BFC2CB48 = 1; - /* 0xBFC2CB4C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B4Cu); -#endif - if (psx_delay_BFC2CB48) { - psx_delay_BFC2CB48 = 0; - if (psx_taken_BFC2CB48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B74u); - goto label_BFC2CB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B50u); - } -label_BFC2CB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2CB50: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B50u); return; } g_debug_last_store_pc = 0x80044B50u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CB54: 24650004 addiu $a1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24650004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CB58: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044B60u; /* jal link before delay slot */ - psx_delay_BFC2CB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2CB5C: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B5Cu); return; } g_debug_last_store_pc = 0x80044B5Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B5Cu); -#endif - if (psx_delay_BFC2CB58) { - psx_delay_BFC2CB58 = 0; - cpu->gpr[31] = 0x80044B60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B60u); -#endif - /* 0xBFC2CB60: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B60u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B60u); -#endif - /* 0xBFC2CB64: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CB68: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044B70u; /* jal link before delay slot */ - psx_delay_BFC2CB68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CB6C: 24650060 addiu $a1, $v1, 96 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (96)); - PGXP_ALU(0x24650060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B6Cu); -#endif - if (psx_delay_BFC2CB68) { - psx_delay_BFC2CB68 = 0; - cpu->gpr[31] = 0x80044B70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B70u); -#endif - /* 0xBFC2CB70: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B70u); -#endif -label_BFC2CB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CB74: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CB78: 03E00008 jr $ra */ - psx_delay_BFC2CB78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044B7Cu); -#endif - if (psx_delay_BFC2CB78) { - psx_delay_BFC2CB78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CB80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CB80u); - int psx_delay_BFC2CB94 = 0; - int psx_taken_BFC2CB94 = 0; - int psx_delay_BFC2CBAC = 0; - int psx_delay_BFC2CBB4 = 0; - int psx_taken_BFC2CBB4 = 0; - int psx_delay_BFC2CBD4 = 0; - int psx_delay_BFC2CBF4 = 0; - int psx_delay_BFC2CC04 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CB9Cu: goto label_BFC2CB9C; - case 0xBFC2CBB4u: goto label_BFC2CBB4; - case 0xBFC2CBBCu: goto label_BFC2CBBC; - case 0xBFC2CBDCu: goto label_BFC2CBDC; - case 0xBFC2CBFCu: goto label_BFC2CBFC; - case 0xBFC2CC00u: goto label_BFC2CC00; - default: break; - } - } -label_BFC2CB80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CB80: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CB84: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B84u); return; } g_debug_last_store_pc = 0x80044B84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2CB88: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044B88u); -#endif - /* 0xBFC2CB8C: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80044B8Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC2CB90: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CB94: 11C00009 beq $t6, $zero, 0xBFC2CBBC */ - uint32_t psx_brA_BFC2CB94 = cpu->gpr[14]; uint32_t psx_brB_BFC2CB94 = cpu->gpr[0]; - psx_taken_BFC2CB94 = (psx_brA_BFC2CB94 == psx_brB_BFC2CB94); - psx_delay_BFC2CB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CB98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044B98u); -#endif - if (psx_delay_BFC2CB94) { - psx_delay_BFC2CB94 = 0; - if (psx_taken_BFC2CB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044BBCu); - goto label_BFC2CBBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B9Cu); - } -label_BFC2CB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044B9Cu); -#endif - /* 0xBFC2CB9C: 8C6F006C lw $t7, 108($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044B9Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F006Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80044B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CBA0: 24650018 addiu $a1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (24)); - PGXP_ALU(0x24650018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2CBA4: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000050u); -#endif - /* 0xBFC2CBA8: 00D82021 addu $a0, $a2, $t8 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[24]; - PGXP_ALU(0x00D82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CBAC: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044BB4u; /* jal link before delay slot */ - psx_delay_BFC2CBAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2CBB0: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BB0u); -#endif - if (psx_delay_BFC2CBAC) { - psx_delay_BFC2CBAC = 0; - cpu->gpr[31] = 0x80044BB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CBB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CBB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CBB4: 10000012 beq $zero, $zero, 0xBFC2CC00 */ - uint32_t psx_brA_BFC2CBB4 = cpu->gpr[0]; uint32_t psx_brB_BFC2CBB4 = cpu->gpr[0]; - psx_taken_BFC2CBB4 = (psx_brA_BFC2CBB4 == psx_brB_BFC2CBB4); - psx_delay_BFC2CBB4 = 1; - /* 0xBFC2CBB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BB8u); -#endif - if (psx_delay_BFC2CBB4) { - psx_delay_BFC2CBB4 = 0; - if (psx_taken_BFC2CBB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C00u); - goto label_BFC2CC00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044BBCu); - } -label_BFC2CBBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CBBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BBCu); -#endif - /* 0xBFC2CBBC: 8C79006C lw $t9, 108($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BBCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C79006Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2CBC0: AFA60018 sw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BC0u); return; } g_debug_last_store_pc = 0x80044BC0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2CBC4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x150u); -#endif - /* 0xBFC2CBC8: 00C82021 addu $a0, $a2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[8]; - PGXP_ALU(0x00C82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2CBCC: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2CBD0: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BD0u); return; } g_debug_last_store_pc = 0x80044BD0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CBD4: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044BDCu; /* jal link before delay slot */ - psx_delay_BFC2CBD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CBD8: 24650004 addiu $a1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24650004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BD8u); -#endif - if (psx_delay_BFC2CBD4) { - psx_delay_BFC2CBD4 = 0; - cpu->gpr[31] = 0x80044BDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CBDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CBDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BDCu); -#endif - /* 0xBFC2CBDC: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BDCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BE0u); -#endif - /* 0xBFC2CBE0: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BE0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BE0u); -#endif - /* 0xBFC2CBE4: 8C69006C lw $t1, 108($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BE4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8u); } - PGXP_LOAD(0x8C69006Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2CBE8: 24650060 addiu $a1, $v1, 96 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (96)); - PGXP_ALU(0x24650060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2CBEC: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x450u); -#endif - /* 0xBFC2CBF0: 00CA2021 addu $a0, $a2, $t2 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[10]; - PGXP_ALU(0x00CA2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CBF4: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x80044BFCu; /* jal link before delay slot */ - psx_delay_BFC2CBF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2CBF8: 24840070 addiu $a0, $a0, 112 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (112)); - PGXP_ALU(0x24840070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80044BF8u); -#endif - if (psx_delay_BFC2CBF4) { - psx_delay_BFC2CBF4 = 0; - cpu->gpr[31] = 0x80044BFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2CBFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CBFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044BFCu); -#endif - /* 0xBFC2CBFC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044BFCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044BFCu); -#endif -label_BFC2CC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CC00: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CC04: 03E00008 jr $ra */ - psx_delay_BFC2CC04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CC08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044C08u); -#endif - if (psx_delay_BFC2CC04) { - psx_delay_BFC2CC04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CC10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CC10u); - int psx_delay_BFC2CC44 = 0; - int psx_delay_BFC2CC54 = 0; - int psx_taken_BFC2CC54 = 0; - int psx_delay_BFC2CC80 = 0; - int psx_taken_BFC2CC80 = 0; - int psx_delay_BFC2CCB4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CC40u: goto label_BFC2CC40; - case 0xBFC2CC4Cu: goto label_BFC2CC4C; - case 0xBFC2CC5Cu: goto label_BFC2CC5C; - case 0xBFC2CC70u: goto label_BFC2CC70; - case 0xBFC2CC88u: goto label_BFC2CC88; - default: break; - } - } -label_BFC2CC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CC10: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2CC14: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C14u); return; } g_debug_last_store_pc = 0x80044C14u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2CC18: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C18u); return; } g_debug_last_store_pc = 0x80044C18u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2CC1C: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C1Cu); return; } g_debug_last_store_pc = 0x80044C1Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2CC20: 3C11800F lui $s1, 0x800F */ - cpu->gpr[17] = 0x800F0000u; - PGXP_ALU(0x3C11800Fu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2CC24: 3C108014 lui $s0, 0x8014 */ - cpu->gpr[16] = 0x80140000u; - PGXP_ALU(0x3C108014u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2CC28: 3C128014 lui $s2, 0x8014 */ - cpu->gpr[18] = 0x80140000u; - PGXP_ALU(0x3C128014u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CC2C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C2Cu); return; } g_debug_last_store_pc = 0x80044C2Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2CC30: 2652E408 addiu $s2, $s2, -7160 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-7160)); - PGXP_ALU(0x2652E408u, cpu->gpr[18], _pgx1, 0xFFFFE408u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2CC34: 2610E3A8 addiu $s0, $s0, -7256 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-7256)); - PGXP_ALU(0x2610E3A8u, cpu->gpr[16], _pgx1, 0xFFFFE3A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2CC38: 2631D2A0 addiu $s1, $s1, -11616 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-11616)); - PGXP_ALU(0x2631D2A0u, cpu->gpr[17], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2CC3C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044C3Cu); -#endif -label_BFC2CC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2CC40: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CC44: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x80044C4Cu; /* jal link before delay slot */ - psx_delay_BFC2CC44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2CC48: 24050018 addiu $a1, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24050018u, cpu->gpr[5], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C48u); -#endif - if (psx_delay_BFC2CC44) { - psx_delay_BFC2CC44 = 0; - cpu->gpr[31] = 0x80044C4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2CC4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2CC4C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2CC50: A200FFFF sb $zero, -1($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80044C50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA200FFFFu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC2CC54: 1612FFFA bne $s0, $s2, 0xBFC2CC40 */ - uint32_t psx_brA_BFC2CC54 = cpu->gpr[16]; uint32_t psx_brB_BFC2CC54 = cpu->gpr[18]; - psx_taken_BFC2CC54 = (psx_brA_BFC2CC54 != psx_brB_BFC2CC54); - psx_delay_BFC2CC54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2CC58: 26310018 addiu $s1, $s1, 24 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (24)); - PGXP_ALU(0x26310018u, cpu->gpr[17], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C58u); -#endif - if (psx_delay_BFC2CC54) { - psx_delay_BFC2CC54 = 0; - if (psx_taken_BFC2CC54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C40u); - goto label_BFC2CC40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C5Cu); - } -label_BFC2CC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2CC5C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2CC60: 3C038014 lui $v1, 0x8014 */ - cpu->gpr[3] = 0x80140000u; - PGXP_ALU(0x3C038014u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CC64: 3C028011 lui $v0, 0x8011 */ - cpu->gpr[2] = 0x80110000u; - PGXP_ALU(0x3C028011u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CC68: 24420EC8 addiu $v0, $v0, 3784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (3784)); - PGXP_ALU(0x24420EC8u, cpu->gpr[2], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2CC6C: 246381C8 addiu $v1, $v1, -32312 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-32312)); - PGXP_ALU(0x246381C8u, cpu->gpr[3], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C6Cu); -#endif -label_BFC2CC70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CC70: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C70u); return; } g_debug_last_store_pc = 0x80044C70u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CC74: 24421A20 addiu $v0, $v0, 6688 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (6688)); - PGXP_ALU(0x24421A20u, cpu->gpr[2], _pgx1, 0x00001A20u); } -#ifdef PSX_COSIM - cosim_instr(0x80044C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CC78: AC40EC6C sw $zero, -5012($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -5012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-5012)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C78u); return; } g_debug_last_store_pc = 0x80044C78u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40EC6Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CC7C: AC40F2F4 sw $zero, -3340($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-3340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C7Cu); return; } g_debug_last_store_pc = 0x80044C7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40F2F4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2CC80: 1443FFFB bne $v0, $v1, 0xBFC2CC70 */ - uint32_t psx_brA_BFC2CC80 = cpu->gpr[2]; uint32_t psx_brB_BFC2CC80 = cpu->gpr[3]; - psx_taken_BFC2CC80 = (psx_brA_BFC2CC80 != psx_brB_BFC2CC80); - psx_delay_BFC2CC80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CC84: AC40F97C sw $zero, -1668($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C84u); return; } g_debug_last_store_pc = 0x80044C84u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40F97Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C84u); -#endif - if (psx_delay_BFC2CC80) { - psx_delay_BFC2CC80 = 0; - if (psx_taken_BFC2CC80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C70u); - goto label_BFC2CC70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044C88u); - } -label_BFC2CC88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CC88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CC88: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2CC8C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2CC90: AC2E8320 sw $t6, -31968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C90u); return; } g_debug_last_store_pc = 0x80044C90u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8320u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2CC94: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044C94u); -#endif - /* 0xBFC2CC98: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C98u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2CC9C: AC208324 sw $zero, -31964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044C9Cu); return; } g_debug_last_store_pc = 0x80044C9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208324u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2CCA0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044CA0u); -#endif - /* 0xBFC2CCA4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CA4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CA4u); -#endif - /* 0xBFC2CCA8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CA8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CA8u); -#endif - /* 0xBFC2CCAC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2CCB0: AC208348 sw $zero, -31928($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31928; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CB0u); return; } g_debug_last_store_pc = 0x80044CB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208348u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CCB4: 03E00008 jr $ra */ - psx_delay_BFC2CCB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CCB8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80044CB8u); -#endif - if (psx_delay_BFC2CCB4) { - psx_delay_BFC2CCB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CCC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CCC4u); - int psx_delay_BFC2CCD4 = 0; - int psx_delay_BFC2CCE0 = 0; - int psx_taken_BFC2CCE0 = 0; - int psx_delay_BFC2CCE8 = 0; - int psx_taken_BFC2CCE8 = 0; - int psx_delay_BFC2CD44 = 0; - int psx_taken_BFC2CD44 = 0; - int psx_delay_BFC2CD80 = 0; - int psx_delay_BFC2CD98 = 0; - int psx_delay_BFC2CDA4 = 0; - int psx_delay_BFC2CDD8 = 0; - int psx_delay_BFC2CE00 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CCDCu: goto label_BFC2CCDC; - case 0xBFC2CCE8u: goto label_BFC2CCE8; - case 0xBFC2CCF0u: goto label_BFC2CCF0; - case 0xBFC2CD28u: goto label_BFC2CD28; - case 0xBFC2CD4Cu: goto label_BFC2CD4C; - case 0xBFC2CD88u: goto label_BFC2CD88; - case 0xBFC2CDA0u: goto label_BFC2CDA0; - case 0xBFC2CDACu: goto label_BFC2CDAC; - case 0xBFC2CDE0u: goto label_BFC2CDE0; - case 0xBFC2CDF8u: goto label_BFC2CDF8; - default: break; - } - } -label_BFC2CCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CCC4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80044CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CCC8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CC8u); return; } g_debug_last_store_pc = 0x80044CC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2CCCC: AFA40030 sw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CCCu); return; } g_debug_last_store_pc = 0x80044CCCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2CCD0: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CD0u); return; } g_debug_last_store_pc = 0x80044CD0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CCD4: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80044CDCu; /* jal link before delay slot */ - psx_delay_BFC2CCD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2CCD8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044CD8u); -#endif - if (psx_delay_BFC2CCD4) { - psx_delay_BFC2CCD4 = 0; - cpu->gpr[31] = 0x80044CDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2CCDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CCDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CDCu); -#endif - /* 0xBFC2CCDC: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044CDCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CCE0: 04410003 bgez $v0, 0xBFC2CCF0 */ - uint32_t psx_brA_BFC2CCE0 = cpu->gpr[2]; - psx_taken_BFC2CCE0 = ((int32_t)psx_brA_BFC2CCE0 >= 0); - psx_delay_BFC2CCE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2CCE4: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044CE4u); -#endif - if (psx_delay_BFC2CCE0) { - psx_delay_BFC2CCE0 = 0; - if (psx_taken_BFC2CCE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044CF0u); - goto label_BFC2CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044CE8u); - } -label_BFC2CCE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CCE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CCE8: 10000043 beq $zero, $zero, 0xBFC2CDF8 */ - uint32_t psx_brA_BFC2CCE8 = cpu->gpr[0]; uint32_t psx_brB_BFC2CCE8 = cpu->gpr[0]; - psx_taken_BFC2CCE8 = (psx_brA_BFC2CCE8 == psx_brB_BFC2CCE8); - psx_delay_BFC2CCE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CCEC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044CECu); -#endif - if (psx_delay_BFC2CCE8) { - psx_delay_BFC2CCE8 = 0; - if (psx_taken_BFC2CCE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044DF8u); - goto label_BFC2CDF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044CF0u); - } -label_BFC2CCF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CCF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CCF0: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CCF4: 01D17023 subu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[17]; - PGXP_ALU(0x01D17023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CCF8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CCFC: 01D17021 addu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[17]; - PGXP_ALU(0x01D17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CD00: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CD04: 01D17021 addu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[17]; - PGXP_ALU(0x01D17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CD08: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CD0C: 25EF0EC8 addiu $t7, $t7, 3784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3784)); - PGXP_ALU(0x25EF0EC8u, cpu->gpr[15], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CD10: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2CD14: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000009u); -#endif - /* 0xBFC2CD18: 0060C821 addu $t9, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x0060C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2CD1C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D1Cu); return; } g_debug_last_store_pc = 0x80044D1Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CD20: 2738003C addiu $t8, $t9, 60 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[25] + (60)); - PGXP_ALU(0x2738003Cu, cpu->gpr[24], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC2CD24: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D24u); -#endif -label_BFC2CD28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CD28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D28u); -#endif - /* 0xBFC2CD28: 8F210000 lw $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D28u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2CD2C: 2739000C addiu $t9, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (12)); - PGXP_ALU(0x2739000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CD30: AD010000 sw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D30u); return; } g_debug_last_store_pc = 0x80044D30u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D30u); -#endif - /* 0xBFC2CD34: 8F21FFF8 lw $at, -8($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D34u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2CD38: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CD3C: AD01FFF8 sw $at, -8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D3Cu); return; } g_debug_last_store_pc = 0x80044D3Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D40u); -#endif - /* 0xBFC2CD40: 8F21FFFC lw $at, -4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D40u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CD44: 1738FFF8 bne $t9, $t8, 0xBFC2CD28 */ - uint32_t psx_brA_BFC2CD44 = cpu->gpr[25]; uint32_t psx_brB_BFC2CD44 = cpu->gpr[24]; - psx_taken_BFC2CD44 = (psx_brA_BFC2CD44 != psx_brB_BFC2CD44); - psx_delay_BFC2CD44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CD48: AD01FFFC sw $at, -4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D48u); return; } g_debug_last_store_pc = 0x80044D48u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D48u); -#endif - if (psx_delay_BFC2CD44) { - psx_delay_BFC2CD44 = 0; - if (psx_taken_BFC2CD44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044D28u); - goto label_BFC2CD28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044D4Cu); - } -label_BFC2CD4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CD4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CD4C: 00114880 sll $t1, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CD50: 01314823 subu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[17]; - PGXP_ALU(0x01314823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CD54: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CD58: 01314821 addu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[17]; - PGXP_ALU(0x01314821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CD5C: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CD60: 01314821 addu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[17]; - PGXP_ALU(0x01314821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2CD64: 3C0A8011 lui $t2, 0x8011 */ - cpu->gpr[10] = 0x80110000u; - PGXP_ALU(0x3C0A8011u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2CD68: 254A0F04 addiu $t2, $t2, 3844 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (3844)); - PGXP_ALU(0x254A0F04u, cpu->gpr[10], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CD6C: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10600u); -#endif - /* 0xBFC2CD70: 012A8021 addu $s0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D70u); -#endif - /* 0xBFC2CD74: 8C650008 lw $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D74u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x8C650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC2CD78: AFA20028 sw $v0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D78u); return; } g_debug_last_store_pc = 0x80044D78u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20028u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CD7C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CD80: 0C0110BC jal 0xB00442F0 */ - cpu->gpr[31] = 0x80044D88u; /* jal link before delay slot */ - psx_delay_BFC2CD80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2CD84: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044D84u); -#endif - if (psx_delay_BFC2CD80) { - psx_delay_BFC2CD80 = 0; - cpu->gpr[31] = 0x80044D88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800442F0u); - cpu->pc = 0x800442F0u; return; - } -label_BFC2CD88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CD88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D88u); -#endif - /* 0xBFC2CD88: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D88u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CD8C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044D90u); -#endif - /* 0xBFC2CD90: 8C65000C lw $a1, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D90u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x8C65000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D90u); -#endif - /* 0xBFC2CD94: 8C660010 lw $a2, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044D94u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x8C660010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CD98: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80044DA0u; /* jal link before delay slot */ - psx_delay_BFC2CD98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CD9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044D9Cu); -#endif - if (psx_delay_BFC2CD98) { - psx_delay_BFC2CD98 = 0; - cpu->gpr[31] = 0x80044DA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2CDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CDA0: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CDA4: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80044DACu; /* jal link before delay slot */ - psx_delay_BFC2CDA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2CDA8: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DA8u); -#endif - if (psx_delay_BFC2CDA4) { - psx_delay_BFC2CDA4 = 0; - cpu->gpr[31] = 0x80044DACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2CDAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CDACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC2CDAC: 00115880 sll $t3, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00115880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC2CDB0: 01715823 subu $t3, $t3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[17]; - PGXP_ALU(0x01715823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2CDB4: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC2CDB8: 01715821 addu $t3, $t3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[17]; - PGXP_ALU(0x01715821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2CDBC: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800u); -#endif - /* 0xBFC2CDC0: 01715821 addu $t3, $t3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[17]; - PGXP_ALU(0x01715821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CDC4: 3C0C8011 lui $t4, 0x8011 */ - cpu->gpr[12] = 0x80110000u; - PGXP_ALU(0x3C0C8011u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CDC8: 258C0F74 addiu $t4, $t4, 3956 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (3956)); - PGXP_ALU(0x258C0F74u, cpu->gpr[12], _pgx1, 0x00000F74u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2CDCC: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1820u); -#endif - /* 0xBFC2CDD0: 016C2821 addu $a1, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CDD4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CDD8: 0C011C75 jal 0xB00471D4 */ - cpu->gpr[31] = 0x80044DE0u; /* jal link before delay slot */ - psx_delay_BFC2CDD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2CDDC: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DDCu); -#endif - if (psx_delay_BFC2CDD8) { - psx_delay_BFC2CDD8 = 0; - cpu->gpr[31] = 0x80044DE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471D4u); - cpu->pc = 0x800471D4u; return; - } -label_BFC2CDE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CDE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DE0u); -#endif - /* 0xBFC2CDE0: 8FA30028 lw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DE0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2CDE4: 240D0080 addiu $t5, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240D0080u, cpu->gpr[13], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2CDE8: AC6D0678 sw $t5, 1656($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DE8u); return; } g_debug_last_store_pc = 0x80044DE8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0678u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2CDEC: AC600684 sw $zero, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DECu); return; } g_debug_last_store_pc = 0x80044DECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600684u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DF0u); -#endif - /* 0xBFC2CDF0: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DF0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2CDF4: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044DF4u); -#endif -label_BFC2CDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044DF8u); -#endif - /* 0xBFC2CDF8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DF8u); -#endif - /* 0xBFC2CDFC: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044DFCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CE00: 03E00008 jr $ra */ - psx_delay_BFC2CE00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CE04: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E04u); -#endif - if (psx_delay_BFC2CE00) { - psx_delay_BFC2CE00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CE08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CE08u); - int psx_delay_BFC2CE20 = 0; - int psx_delay_BFC2CE28 = 0; - int psx_taken_BFC2CE28 = 0; - int psx_delay_BFC2CE30 = 0; - int psx_taken_BFC2CE30 = 0; - int psx_delay_BFC2CE8C = 0; - int psx_taken_BFC2CE8C = 0; - int psx_delay_BFC2CECC = 0; - int psx_delay_BFC2CEE4 = 0; - int psx_delay_BFC2CEF0 = 0; - int psx_delay_BFC2CF24 = 0; - int psx_delay_BFC2CF4C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CE28u: goto label_BFC2CE28; - case 0xBFC2CE30u: goto label_BFC2CE30; - case 0xBFC2CE38u: goto label_BFC2CE38; - case 0xBFC2CE70u: goto label_BFC2CE70; - case 0xBFC2CE94u: goto label_BFC2CE94; - case 0xBFC2CED4u: goto label_BFC2CED4; - case 0xBFC2CEECu: goto label_BFC2CEEC; - case 0xBFC2CEF8u: goto label_BFC2CEF8; - case 0xBFC2CF2Cu: goto label_BFC2CF2C; - case 0xBFC2CF44u: goto label_BFC2CF44; - default: break; - } - } -label_BFC2CE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CE08: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CE0C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E0Cu); return; } g_debug_last_store_pc = 0x80044E0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2CE10: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E10u); return; } g_debug_last_store_pc = 0x80044E10u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2CE14: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E14u); return; } g_debug_last_store_pc = 0x80044E14u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2CE18: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E18u); return; } g_debug_last_store_pc = 0x80044E18u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2CE1C: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E1Cu); return; } g_debug_last_store_pc = 0x80044E1Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CE20: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80044E28u; /* jal link before delay slot */ - psx_delay_BFC2CE20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2CE24: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E24u); -#endif - if (psx_delay_BFC2CE20) { - psx_delay_BFC2CE20 = 0; - cpu->gpr[31] = 0x80044E28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2CE28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CE28: 04410003 bgez $v0, 0xBFC2CE38 */ - uint32_t psx_brA_BFC2CE28 = cpu->gpr[2]; - psx_taken_BFC2CE28 = ((int32_t)psx_brA_BFC2CE28 >= 0); - psx_delay_BFC2CE28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2CE2C: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E2Cu); -#endif - if (psx_delay_BFC2CE28) { - psx_delay_BFC2CE28 = 0; - if (psx_taken_BFC2CE28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E38u); - goto label_BFC2CE38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E30u); - } -label_BFC2CE30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CE30: 10000044 beq $zero, $zero, 0xBFC2CF44 */ - uint32_t psx_brA_BFC2CE30 = cpu->gpr[0]; uint32_t psx_brB_BFC2CE30 = cpu->gpr[0]; - psx_taken_BFC2CE30 = (psx_brA_BFC2CE30 == psx_brB_BFC2CE30); - psx_delay_BFC2CE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CE34: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044E34u); -#endif - if (psx_delay_BFC2CE30) { - psx_delay_BFC2CE30 = 0; - if (psx_taken_BFC2CE30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F44u); - goto label_BFC2CF44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E38u); - } -label_BFC2CE38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CE38: 00117080 sll $t6, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00117080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CE3C: 01D17023 subu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[17]; - PGXP_ALU(0x01D17023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CE40: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CE44: 01D17021 addu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[17]; - PGXP_ALU(0x01D17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CE48: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC2CE4C: 01D17021 addu $t6, $t6, $s1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[17]; - PGXP_ALU(0x01D17021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CE50: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044E50u); -#endif - /* 0xBFC2CE54: 8FB80038 lw $t8, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E54u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80038u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CE58: 25EF0EC8 addiu $t7, $t7, 3784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3784)); - PGXP_ALU(0x25EF0EC8u, cpu->gpr[15], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CE5C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC2CE60: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2CE64: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E64u); return; } g_debug_last_store_pc = 0x80044E64u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC2CE68: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CE6C: 2719003C addiu $t9, $t8, 60 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (60)); - PGXP_ALU(0x2719003Cu, cpu->gpr[25], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044E6Cu); -#endif -label_BFC2CE70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E70u); -#endif - /* 0xBFC2CE70: 8F010000 lw $at, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E70u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2CE74: 2718000C addiu $t8, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2718000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CE78: AD010000 sw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E78u); return; } g_debug_last_store_pc = 0x80044E78u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E78u); -#endif - /* 0xBFC2CE7C: 8F01FFF8 lw $at, -8($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E7Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2CE80: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CE84: AD01FFF8 sw $at, -8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E84u); return; } g_debug_last_store_pc = 0x80044E84u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E84u); -#endif - /* 0xBFC2CE88: 8F01FFFC lw $at, -4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E88u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CE8C: 1719FFF8 bne $t8, $t9, 0xBFC2CE70 */ - uint32_t psx_brA_BFC2CE8C = cpu->gpr[24]; uint32_t psx_brB_BFC2CE8C = cpu->gpr[25]; - psx_taken_BFC2CE8C = (psx_brA_BFC2CE8C != psx_brB_BFC2CE8C); - psx_delay_BFC2CE8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CE90: AD01FFFC sw $at, -4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044E90u); return; } g_debug_last_store_pc = 0x80044E90u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044E90u); -#endif - if (psx_delay_BFC2CE8C) { - psx_delay_BFC2CE8C = 0; - if (psx_taken_BFC2CE8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E70u); - goto label_BFC2CE70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044E94u); - } -label_BFC2CE94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CE94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CE94: 00114880 sll $t1, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CE98: 01314823 subu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[17]; - PGXP_ALU(0x01314823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CE9C: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CEA0: 01314821 addu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[17]; - PGXP_ALU(0x01314821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CEA4: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200u); -#endif - /* 0xBFC2CEA8: 01314821 addu $t1, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[17]; - PGXP_ALU(0x01314821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2CEAC: 3C0A8011 lui $t2, 0x8011 */ - cpu->gpr[10] = 0x80110000u; - PGXP_ALU(0x3C0A8011u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2CEB0: 254A0F04 addiu $t2, $t2, 3844 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (3844)); - PGXP_ALU(0x254A0F04u, cpu->gpr[10], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CEB4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10600u); -#endif - /* 0xBFC2CEB8: 012A8021 addu $s0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EB8u); -#endif - /* 0xBFC2CEBC: 8FA5003C lw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044EBCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EC0u); -#endif - /* 0xBFC2CEC0: 8FA60040 lw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044EC0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CEC4: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2CEC8: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CECC: 0C0110F8 jal 0xB00443E0 */ - cpu->gpr[31] = 0x80044ED4u; /* jal link before delay slot */ - psx_delay_BFC2CECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC2CED0: AFA20030 sw $v0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044ED0u); return; } g_debug_last_store_pc = 0x80044ED0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80044ED0u); -#endif - if (psx_delay_BFC2CECC) { - psx_delay_BFC2CECC = 0; - cpu->gpr[31] = 0x80044ED4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800443E0u); - cpu->pc = 0x800443E0u; return; - } -label_BFC2CED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044ED4u); -#endif - /* 0xBFC2CED4: 8FAB0038 lw $t3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044ED4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0038u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80044ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CED8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044ED8u); -#endif - /* 0xBFC2CEDC: 8D65000C lw $a1, 12($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044EDCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x800u); } - PGXP_LOAD(0x8D65000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EE0u); -#endif - /* 0xBFC2CEE0: 8D660010 lw $a2, 16($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044EE0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x800u); } - PGXP_LOAD(0x8D660010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80044EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CEE4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80044EECu; /* jal link before delay slot */ - psx_delay_BFC2CEE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CEE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80044EE8u); -#endif - if (psx_delay_BFC2CEE4) { - psx_delay_BFC2CEE4 = 0; - cpu->gpr[31] = 0x80044EECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2CEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CEEC: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CEF0: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80044EF8u; /* jal link before delay slot */ - psx_delay_BFC2CEF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2CEF4: 24050004 addiu $a1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24050004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EF4u); -#endif - if (psx_delay_BFC2CEF0) { - psx_delay_BFC2CEF0 = 0; - cpu->gpr[31] = 0x80044EF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2CEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2CEF8: 00116080 sll $t4, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00116080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2CEFC: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CF00: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2CF04: 01916021 addu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[17]; - PGXP_ALU(0x01916021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CF08: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2CF0C: 01916021 addu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[17]; - PGXP_ALU(0x01916021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2CF10: 3C0D8011 lui $t5, 0x8011 */ - cpu->gpr[13] = 0x80110000u; - PGXP_ALU(0x3C0D8011u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2CF14: 25AD0F74 addiu $t5, $t5, 3956 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (3956)); - PGXP_ALU(0x25AD0F74u, cpu->gpr[13], _pgx1, 0x00000F74u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2CF18: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC2CF1C: 018D2821 addu $a1, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2CF20: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CF24: 0C011C75 jal 0xB00471D4 */ - cpu->gpr[31] = 0x80044F2Cu; /* jal link before delay slot */ - psx_delay_BFC2CF24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2CF28: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F28u); -#endif - if (psx_delay_BFC2CF24) { - psx_delay_BFC2CF24 = 0; - cpu->gpr[31] = 0x80044F2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471D4u); - cpu->pc = 0x800471D4u; return; - } -label_BFC2CF2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F2Cu); -#endif - /* 0xBFC2CF2C: 8FA30030 lw $v1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F2Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30030u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2CF30: 240E0080 addiu $t6, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240E0080u, cpu->gpr[14], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2CF34: AC6E0678 sw $t6, 1656($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F34u); return; } g_debug_last_store_pc = 0x80044F34u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0678u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2CF38: AC600684 sw $zero, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F38u); return; } g_debug_last_store_pc = 0x80044F38u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600684u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F38u); -#endif - /* 0xBFC2CF3C: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F3Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2CF40: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F40u); -#endif -label_BFC2CF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F44u); -#endif - /* 0xBFC2CF44: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F44u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F44u); -#endif - /* 0xBFC2CF48: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F48u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2CF4C: 03E00008 jr $ra */ - psx_delay_BFC2CF4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CF50: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F50u); -#endif - if (psx_delay_BFC2CF4C) { - psx_delay_BFC2CF4C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2CF54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2CF54u); - int psx_delay_BFC2CF64 = 0; - int psx_delay_BFC2CF6C = 0; - int psx_taken_BFC2CF6C = 0; - int psx_delay_BFC2CF74 = 0; - int psx_taken_BFC2CF74 = 0; - int psx_delay_BFC2CFCC = 0; - int psx_taken_BFC2CFCC = 0; - int psx_delay_BFC2CFFC = 0; - int psx_taken_BFC2CFFC = 0; - int psx_delay_BFC2D064 = 0; - int psx_delay_BFC2D09C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2CF6Cu: goto label_BFC2CF6C; - case 0xBFC2CF74u: goto label_BFC2CF74; - case 0xBFC2CF7Cu: goto label_BFC2CF7C; - case 0xBFC2CFB0u: goto label_BFC2CFB0; - case 0xBFC2CFD4u: goto label_BFC2CFD4; - case 0xBFC2CFE0u: goto label_BFC2CFE0; - case 0xBFC2D004u: goto label_BFC2D004; - case 0xBFC2D06Cu: goto label_BFC2D06C; - case 0xBFC2D094u: goto label_BFC2D094; - default: break; - } - } -label_BFC2CF54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2CF54: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2CF58: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F58u); return; } g_debug_last_store_pc = 0x80044F58u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2CF5C: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F5Cu); return; } g_debug_last_store_pc = 0x80044F5Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2CF60: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F60u); return; } g_debug_last_store_pc = 0x80044F60u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2CF64: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80044F6Cu; /* jal link before delay slot */ - psx_delay_BFC2CF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2CF68: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F68u); -#endif - if (psx_delay_BFC2CF64) { - psx_delay_BFC2CF64 = 0; - cpu->gpr[31] = 0x80044F6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2CF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2CF6C: 04410003 bgez $v0, 0xBFC2CF7C */ - uint32_t psx_brA_BFC2CF6C = cpu->gpr[2]; - psx_taken_BFC2CF6C = ((int32_t)psx_brA_BFC2CF6C >= 0); - psx_delay_BFC2CF6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC2CF70: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F70u); -#endif - if (psx_delay_BFC2CF6C) { - psx_delay_BFC2CF6C = 0; - if (psx_taken_BFC2CF6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F7Cu); - goto label_BFC2CF7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F74u); - } -label_BFC2CF74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2CF74: 10000047 beq $zero, $zero, 0xBFC2D094 */ - uint32_t psx_brA_BFC2CF74 = cpu->gpr[0]; uint32_t psx_brB_BFC2CF74 = cpu->gpr[0]; - psx_taken_BFC2CF74 = (psx_brA_BFC2CF74 == psx_brB_BFC2CF74); - psx_delay_BFC2CF74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2CF78: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80044F78u); -#endif - if (psx_delay_BFC2CF74) { - psx_delay_BFC2CF74 = 0; - if (psx_taken_BFC2CF74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045094u); - goto label_BFC2D094; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044F7Cu); - } -label_BFC2CF7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CF7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2CF7C: 00077080 sll $t6, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2CF80: 01C77023 subu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[7]; - PGXP_ALU(0x01C77023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CF84: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2CF88: 01C77021 addu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[7]; - PGXP_ALU(0x01C77021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CF8C: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2CF90: 01C77021 addu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[7]; - PGXP_ALU(0x01C77021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CF94: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80044F94u); -#endif - /* 0xBFC2CF98: 8FB80028 lw $t8, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044F98u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80028u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80044F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2CF9C: 25EF0EC8 addiu $t7, $t7, 3784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3784)); - PGXP_ALU(0x25EF0EC8u, cpu->gpr[15], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80044F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2CFA0: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80044FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC2CFA4: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC2CFA8: 00604021 addu $t0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00604021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CFAC: 2719003C addiu $t9, $t8, 60 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (60)); - PGXP_ALU(0x2719003Cu, cpu->gpr[25], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FACu); -#endif -label_BFC2CFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FB0u); -#endif - /* 0xBFC2CFB0: 8F010000 lw $at, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FB0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2CFB4: 2718000C addiu $t8, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2718000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CFB8: AD010000 sw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FB8u); return; } g_debug_last_store_pc = 0x80044FB8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FB8u); -#endif - /* 0xBFC2CFBC: 8F01FFF8 lw $at, -8($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FBCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2CFC0: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CFC4: AD01FFF8 sw $at, -8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FC4u); return; } g_debug_last_store_pc = 0x80044FC4u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FC4u); -#endif - /* 0xBFC2CFC8: 8F01FFFC lw $at, -4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FC8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x1000000u); } - PGXP_LOAD(0x8F01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2CFCC: 1719FFF8 bne $t8, $t9, 0xBFC2CFB0 */ - uint32_t psx_brA_BFC2CFCC = cpu->gpr[24]; uint32_t psx_brB_BFC2CFCC = cpu->gpr[25]; - psx_taken_BFC2CFCC = (psx_brA_BFC2CFCC != psx_brB_BFC2CFCC); - psx_delay_BFC2CFCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2CFD0: AD01FFFC sw $at, -4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FD0u); return; } g_debug_last_store_pc = 0x80044FD0u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FD0u); -#endif - if (psx_delay_BFC2CFCC) { - psx_delay_BFC2CFCC = 0; - if (psx_taken_BFC2CFCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044FB0u); - goto label_BFC2CFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044FD4u); - } -label_BFC2CFD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CFD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FD4u); -#endif - /* 0xBFC2CFD4: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FD4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x809u); -#endif - /* 0xBFC2CFD8: 00605821 addu $t3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00605821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80044FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2CFDC: 252A006C addiu $t2, $t1, 108 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (108)); - PGXP_ALU(0x252A006Cu, cpu->gpr[10], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FDCu); -#endif -label_BFC2CFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2CFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2CFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FE0u); -#endif - /* 0xBFC2CFE0: 8D210000 lw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FE0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2CFE4: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2CFE8: AD61003C sw $at, 60($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FE8u); return; } g_debug_last_store_pc = 0x80044FE8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD61003Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FE8u); -#endif - /* 0xBFC2CFEC: 8D21FFF8 lw $at, -8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FECu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80044FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2CFF0: 256B000C addiu $t3, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (12)); - PGXP_ALU(0x256B000Cu, cpu->gpr[11], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80044FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2CFF4: AD610034 sw $at, 52($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FF4u); return; } g_debug_last_store_pc = 0x80044FF4u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD610034u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FF4u); -#endif - /* 0xBFC2CFF8: 8D21FFFC lw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80044FF8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80044FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2CFFC: 152AFFF8 bne $t1, $t2, 0xBFC2CFE0 */ - uint32_t psx_brA_BFC2CFFC = cpu->gpr[9]; uint32_t psx_brB_BFC2CFFC = cpu->gpr[10]; - psx_taken_BFC2CFFC = (psx_brA_BFC2CFFC != psx_brB_BFC2CFFC); - psx_delay_BFC2CFFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2D000: AD610038 sw $at, 56($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045000u); return; } g_debug_last_store_pc = 0x80045000u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD610038u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045000u); -#endif - if (psx_delay_BFC2CFFC) { - psx_delay_BFC2CFFC = 0; - if (psx_taken_BFC2CFFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044FE0u); - goto label_BFC2CFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045004u); - } -label_BFC2D004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC2D004: 00076080 sll $t4, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00076080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2D008: 00077080 sll $t6, $a3, 2 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 2u; - PGXP_ALU(0x00077080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2D00C: 01C77023 subu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[7]; - PGXP_ALU(0x01C77023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004500Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC2D010: 01876023 subu $t4, $t4, $a3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[7]; - PGXP_ALU(0x01876023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D014: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D018: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2D01C: 01C77021 addu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[7]; - PGXP_ALU(0x01C77021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC2D020: 01876021 addu $t4, $t4, $a3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[7]; - PGXP_ALU(0x01876021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045020u); -#endif - /* 0xBFC2D024: 8D210000 lw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045024u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x200u); } - PGXP_LOAD(0x8D210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D028: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D02C: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004502Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2D030: 01C77021 addu $t6, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[7]; - PGXP_ALU(0x01C77021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC2D034: 01876021 addu $t4, $t4, $a3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[7]; - PGXP_ALU(0x01876021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D038: 3C0D8011 lui $t5, 0x8011 */ - cpu->gpr[13] = 0x80110000u; - PGXP_ALU(0x3C0D8011u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D03C: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D040: 25EF0F74 addiu $t7, $t7, 3956 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3956)); - PGXP_ALU(0x25EF0F74u, cpu->gpr[15], _pgx1, 0x00000F74u); } -#ifdef PSX_COSIM - cosim_instr(0x80045040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D044: 25AD0F04 addiu $t5, $t5, 3844 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (3844)); - PGXP_ALU(0x25AD0F04u, cpu->gpr[13], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80045044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D048: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D04C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004504Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2D050: AD61003C sw $at, 60($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045050u); return; } g_debug_last_store_pc = 0x80045050u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD61003Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC2D054: AFA70024 sw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045054u); return; } g_debug_last_store_pc = 0x80045054u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80045054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2D058: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045058u); return; } g_debug_last_store_pc = 0x80045058u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2D05C: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC2D060: 018D2021 addu $a0, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D064: 0C011C75 jal 0xB00471D4 */ - cpu->gpr[31] = 0x8004506Cu; /* jal link before delay slot */ - psx_delay_BFC2D064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2D068: 24060070 addiu $a2, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24060070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x80045068u); -#endif - if (psx_delay_BFC2D064) { - psx_delay_BFC2D064 = 0; - cpu->gpr[31] = 0x8004506Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471D4u); - cpu->pc = 0x800471D4u; return; - } -label_BFC2D06C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D06Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004506Cu); -#endif - /* 0xBFC2D06C: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004506Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004506Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045070u); -#endif - /* 0xBFC2D070: 8FA70024 lw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045070u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80045070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2D074: AC600684 sw $zero, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045074u); return; } g_debug_last_store_pc = 0x80045074u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600684u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045074u); -#endif - /* 0xBFC2D078: 8479007E lh $t9, 126($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 126; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (126)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80045078u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8479007Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045078u); -#endif - /* 0xBFC2D07C: 84780080 lh $t8, 128($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (128)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004507Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780080u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004507Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2D080: AC79000C sw $t9, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045080u); return; } g_debug_last_store_pc = 0x80045080u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC79000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC2D084: 24080080 addiu $t0, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24080080u, cpu->gpr[8], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80045084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2D088: AC680678 sw $t0, 1656($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045088u); return; } g_debug_last_store_pc = 0x80045088u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680678u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC2D08C: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004508Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2D090: AC780010 sw $t8, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045090u); return; } g_debug_last_store_pc = 0x80045090u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045090u); -#endif -label_BFC2D094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045094u); -#endif - /* 0xBFC2D094: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045094u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80045094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2D098: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80045098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2D09C: 03E00008 jr $ra */ - psx_delay_BFC2D09C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D0A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800450A0u); -#endif - if (psx_delay_BFC2D09C) { - psx_delay_BFC2D09C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2D0A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2D0A4u); - int psx_delay_BFC2D0C0 = 0; - int psx_taken_BFC2D0C0 = 0; - int psx_delay_BFC2D0D0 = 0; - int psx_taken_BFC2D0D0 = 0; - int psx_delay_BFC2D0D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2D0B8u: goto label_BFC2D0B8; - case 0xBFC2D0C8u: goto label_BFC2D0C8; - case 0xBFC2D0CCu: goto label_BFC2D0CC; - case 0xBFC2D0D8u: goto label_BFC2D0D8; - default: break; - } - } -label_BFC2D0A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D0A4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800450A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2D0A8: 3C028014 lui $v0, 0x8014 */ - cpu->gpr[2] = 0x80140000u; - PGXP_ALU(0x3C028014u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800450A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2D0AC: 3C038011 lui $v1, 0x8011 */ - cpu->gpr[3] = 0x80110000u; - PGXP_ALU(0x3C038011u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800450ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2D0B0: 24630EC8 addiu $v1, $v1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (3784)); - PGXP_ALU(0x24630EC8u, cpu->gpr[3], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800450B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2D0B4: 244281C8 addiu $v0, $v0, -32312 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-32312)); - PGXP_ALU(0x244281C8u, cpu->gpr[2], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800450B4u); -#endif -label_BFC2D0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450B8u); -#endif - /* 0xBFC2D0B8: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800450B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D0BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800450BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2D0C0: 148E0002 bne $a0, $t6, 0xBFC2D0CC */ - uint32_t psx_brA_BFC2D0C0 = cpu->gpr[4]; uint32_t psx_brB_BFC2D0C0 = cpu->gpr[14]; - psx_taken_BFC2D0C0 = (psx_brA_BFC2D0C0 != psx_brB_BFC2D0C0); - psx_delay_BFC2D0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D0C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800450C4u); -#endif - if (psx_delay_BFC2D0C0) { - psx_delay_BFC2D0C0 = 0; - if (psx_taken_BFC2D0C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450CCu); - goto label_BFC2D0CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450C8u); - } -label_BFC2D0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2D0C8: AC600004 sw $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450C8u); return; } g_debug_last_store_pc = 0x800450C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800450C8u); -#endif -label_BFC2D0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2D0CC: 24630688 addiu $v1, $v1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1672)); - PGXP_ALU(0x24630688u, cpu->gpr[3], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x800450CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2D0D0: 1462FFF9 bne $v1, $v0, 0xBFC2D0B8 */ - uint32_t psx_brA_BFC2D0D0 = cpu->gpr[3]; uint32_t psx_brB_BFC2D0D0 = cpu->gpr[2]; - psx_taken_BFC2D0D0 = (psx_brA_BFC2D0D0 != psx_brB_BFC2D0D0); - psx_delay_BFC2D0D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D0D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800450D4u); -#endif - if (psx_delay_BFC2D0D0) { - psx_delay_BFC2D0D0 = 0; - if (psx_taken_BFC2D0D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450B8u); - goto label_BFC2D0B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450D8u); - } -label_BFC2D0D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2D0D8: 03E00008 jr $ra */ - psx_delay_BFC2D0D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D0DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800450DCu); -#endif - if (psx_delay_BFC2D0D8) { - psx_delay_BFC2D0D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2D0E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2D0E0u); - int psx_delay_BFC2D13C = 0; - int psx_taken_BFC2D13C = 0; - int psx_delay_BFC2D14C = 0; - int psx_taken_BFC2D14C = 0; - int psx_delay_BFC2D19C = 0; - int psx_delay_BFC2D1B0 = 0; - int psx_taken_BFC2D1B0 = 0; - int psx_delay_BFC2D1C4 = 0; - int psx_taken_BFC2D1C4 = 0; - int psx_delay_BFC2D1D8 = 0; - int psx_taken_BFC2D1D8 = 0; - int psx_delay_BFC2D1E4 = 0; - int psx_taken_BFC2D1E4 = 0; - int psx_delay_BFC2D20C = 0; - int psx_taken_BFC2D20C = 0; - int psx_delay_BFC2D21C = 0; - int psx_taken_BFC2D21C = 0; - int psx_delay_BFC2D224 = 0; - int psx_taken_BFC2D224 = 0; - int psx_delay_BFC2D238 = 0; - int psx_taken_BFC2D238 = 0; - int psx_delay_BFC2D2A8 = 0; - int psx_taken_BFC2D2A8 = 0; - int psx_delay_BFC2D2F0 = 0; - int psx_taken_BFC2D2F0 = 0; - int psx_delay_BFC2D314 = 0; - int psx_taken_BFC2D314 = 0; - int psx_delay_BFC2D368 = 0; - int psx_delay_BFC2D384 = 0; - int psx_taken_BFC2D384 = 0; - int psx_delay_BFC2D3D0 = 0; - int psx_delay_BFC2D3F8 = 0; - int psx_delay_BFC2D414 = 0; - int psx_taken_BFC2D414 = 0; - int psx_delay_BFC2D448 = 0; - int psx_taken_BFC2D448 = 0; - int psx_delay_BFC2D450 = 0; - int psx_taken_BFC2D450 = 0; - int psx_delay_BFC2D45C = 0; - int psx_taken_BFC2D45C = 0; - int psx_delay_BFC2D464 = 0; - int psx_taken_BFC2D464 = 0; - int psx_delay_BFC2D480 = 0; - int psx_delay_BFC2D4C4 = 0; - int psx_taken_BFC2D4C4 = 0; - int psx_delay_BFC2D4D8 = 0; - int psx_taken_BFC2D4D8 = 0; - int psx_delay_BFC2D528 = 0; - int psx_taken_BFC2D528 = 0; - int psx_delay_BFC2D538 = 0; - int psx_taken_BFC2D538 = 0; - int psx_delay_BFC2D540 = 0; - int psx_taken_BFC2D540 = 0; - int psx_delay_BFC2D554 = 0; - int psx_taken_BFC2D554 = 0; - int psx_delay_BFC2D5C4 = 0; - int psx_taken_BFC2D5C4 = 0; - int psx_delay_BFC2D60C = 0; - int psx_taken_BFC2D60C = 0; - int psx_delay_BFC2D63C = 0; - int psx_taken_BFC2D63C = 0; - int psx_delay_BFC2D650 = 0; - int psx_delay_BFC2D66C = 0; - int psx_taken_BFC2D66C = 0; - int psx_delay_BFC2D67C = 0; - int psx_delay_BFC2D684 = 0; - int psx_taken_BFC2D684 = 0; - int psx_delay_BFC2D6A4 = 0; - int psx_taken_BFC2D6A4 = 0; - int psx_delay_BFC2D6B4 = 0; - int psx_taken_BFC2D6B4 = 0; - int psx_delay_BFC2D6BC = 0; - int psx_taken_BFC2D6BC = 0; - int psx_delay_BFC2D6DC = 0; - int psx_taken_BFC2D6DC = 0; - int psx_delay_BFC2D72C = 0; - int psx_taken_BFC2D72C = 0; - int psx_delay_BFC2D740 = 0; - int psx_taken_BFC2D740 = 0; - int psx_delay_BFC2D75C = 0; - int psx_taken_BFC2D75C = 0; - int psx_delay_BFC2D764 = 0; - int psx_delay_BFC2D774 = 0; - int psx_taken_BFC2D774 = 0; - int psx_delay_BFC2D784 = 0; - int psx_delay_BFC2D79C = 0; - int psx_taken_BFC2D79C = 0; - int psx_delay_BFC2D7A8 = 0; - int psx_delay_BFC2D7B0 = 0; - int psx_taken_BFC2D7B0 = 0; - int psx_delay_BFC2D7B8 = 0; - int psx_delay_BFC2D7C4 = 0; - int psx_taken_BFC2D7C4 = 0; - int psx_delay_BFC2D868 = 0; - int psx_taken_BFC2D868 = 0; - int psx_delay_BFC2D870 = 0; - int psx_taken_BFC2D870 = 0; - int psx_delay_BFC2D88C = 0; - int psx_taken_BFC2D88C = 0; - int psx_delay_BFC2D894 = 0; - int psx_taken_BFC2D894 = 0; - int psx_delay_BFC2D8B0 = 0; - int psx_taken_BFC2D8B0 = 0; - int psx_delay_BFC2D8C4 = 0; - int psx_taken_BFC2D8C4 = 0; - int psx_delay_BFC2D8CC = 0; - int psx_taken_BFC2D8CC = 0; - int psx_delay_BFC2D8E8 = 0; - int psx_taken_BFC2D8E8 = 0; - int psx_delay_BFC2D8F0 = 0; - int psx_delay_BFC2D904 = 0; - int psx_taken_BFC2D904 = 0; - int psx_delay_BFC2D95C = 0; - int psx_delay_BFC2D988 = 0; - int psx_delay_BFC2D990 = 0; - int psx_taken_BFC2D990 = 0; - int psx_delay_BFC2D9C4 = 0; - int psx_taken_BFC2D9C4 = 0; - int psx_delay_BFC2D9E4 = 0; - int psx_taken_BFC2D9E4 = 0; - int psx_delay_BFC2D9F8 = 0; - int psx_delay_BFC2DA10 = 0; - int psx_taken_BFC2DA10 = 0; - int psx_delay_BFC2DA24 = 0; - int psx_taken_BFC2DA24 = 0; - int psx_delay_BFC2DA2C = 0; - int psx_taken_BFC2DA2C = 0; - int psx_delay_BFC2DA4C = 0; - int psx_taken_BFC2DA4C = 0; - int psx_delay_BFC2DA54 = 0; - int psx_taken_BFC2DA54 = 0; - int psx_delay_BFC2DA64 = 0; - int psx_taken_BFC2DA64 = 0; - int psx_delay_BFC2DAB4 = 0; - int psx_delay_BFC2DAC0 = 0; - int psx_taken_BFC2DAC0 = 0; - int psx_delay_BFC2DAD4 = 0; - int psx_delay_BFC2DADC = 0; - int psx_delay_BFC2DAE4 = 0; - int psx_taken_BFC2DAE4 = 0; - int psx_delay_BFC2DB0C = 0; - int psx_taken_BFC2DB0C = 0; - int psx_delay_BFC2DB1C = 0; - int psx_taken_BFC2DB1C = 0; - int psx_delay_BFC2DB24 = 0; - int psx_taken_BFC2DB24 = 0; - int psx_delay_BFC2DB48 = 0; - int psx_delay_BFC2DB58 = 0; - int psx_taken_BFC2DB58 = 0; - int psx_delay_BFC2DB64 = 0; - int psx_taken_BFC2DB64 = 0; - int psx_delay_BFC2DB8C = 0; - int psx_taken_BFC2DB8C = 0; - int psx_delay_BFC2DBAC = 0; - int psx_taken_BFC2DBAC = 0; - int psx_delay_BFC2DBEC = 0; - int psx_taken_BFC2DBEC = 0; - int psx_delay_BFC2DC00 = 0; - int psx_taken_BFC2DC00 = 0; - int psx_delay_BFC2DC18 = 0; - int psx_taken_BFC2DC18 = 0; - int psx_delay_BFC2DC2C = 0; - int psx_taken_BFC2DC2C = 0; - int psx_delay_BFC2DC88 = 0; - int psx_taken_BFC2DC88 = 0; - int psx_delay_BFC2DCA0 = 0; - int psx_taken_BFC2DCA0 = 0; - int psx_delay_BFC2DCB8 = 0; - int psx_taken_BFC2DCB8 = 0; - int psx_delay_BFC2DCC0 = 0; - int psx_taken_BFC2DCC0 = 0; - int psx_delay_BFC2DCD8 = 0; - int psx_taken_BFC2DCD8 = 0; - int psx_delay_BFC2DCE8 = 0; - int psx_taken_BFC2DCE8 = 0; - int psx_delay_BFC2DD00 = 0; - int psx_taken_BFC2DD00 = 0; - int psx_delay_BFC2DD18 = 0; - int psx_taken_BFC2DD18 = 0; - int psx_delay_BFC2DD20 = 0; - int psx_taken_BFC2DD20 = 0; - int psx_delay_BFC2DD38 = 0; - int psx_taken_BFC2DD38 = 0; - int psx_delay_BFC2DD64 = 0; - int psx_delay_BFC2DDCC = 0; - int psx_taken_BFC2DDCC = 0; - int psx_delay_BFC2DDD8 = 0; - int psx_delay_BFC2DE04 = 0; - int psx_delay_BFC2DE28 = 0; - int psx_delay_BFC2DE38 = 0; - int psx_taken_BFC2DE38 = 0; - int psx_delay_BFC2DEA0 = 0; - int psx_delay_BFC2DEB4 = 0; - int psx_taken_BFC2DEB4 = 0; - int psx_delay_BFC2DEC8 = 0; - int psx_taken_BFC2DEC8 = 0; - int psx_delay_BFC2DED8 = 0; - int psx_taken_BFC2DED8 = 0; - int psx_delay_BFC2DEE0 = 0; - int psx_taken_BFC2DEE0 = 0; - int psx_delay_BFC2DEEC = 0; - int psx_taken_BFC2DEEC = 0; - int psx_delay_BFC2DF30 = 0; - int psx_delay_BFC2DF40 = 0; - int psx_taken_BFC2DF40 = 0; - int psx_delay_BFC2DF58 = 0; - int psx_taken_BFC2DF58 = 0; - int psx_delay_BFC2DF70 = 0; - int psx_taken_BFC2DF70 = 0; - int psx_delay_BFC2DF78 = 0; - int psx_taken_BFC2DF78 = 0; - int psx_delay_BFC2DF90 = 0; - int psx_taken_BFC2DF90 = 0; - int psx_delay_BFC2DFA0 = 0; - int psx_taken_BFC2DFA0 = 0; - int psx_delay_BFC2DFB8 = 0; - int psx_taken_BFC2DFB8 = 0; - int psx_delay_BFC2DFD0 = 0; - int psx_taken_BFC2DFD0 = 0; - int psx_delay_BFC2DFD8 = 0; - int psx_taken_BFC2DFD8 = 0; - int psx_delay_BFC2DFF0 = 0; - int psx_taken_BFC2DFF0 = 0; - int psx_delay_BFC2E024 = 0; - int psx_delay_BFC2E058 = 0; - int psx_delay_BFC2E07C = 0; - int psx_delay_BFC2E08C = 0; - int psx_taken_BFC2E08C = 0; - int psx_delay_BFC2E0F4 = 0; - int psx_delay_BFC2E108 = 0; - int psx_taken_BFC2E108 = 0; - int psx_delay_BFC2E110 = 0; - int psx_taken_BFC2E110 = 0; - int psx_delay_BFC2E12C = 0; - int psx_delay_BFC2E154 = 0; - int psx_delay_BFC2E1A0 = 0; - int psx_taken_BFC2E1A0 = 0; - int psx_delay_BFC2E1A8 = 0; - int psx_taken_BFC2E1A8 = 0; - int psx_delay_BFC2E1B0 = 0; - int psx_taken_BFC2E1B0 = 0; - int psx_delay_BFC2E1FC = 0; - int psx_taken_BFC2E1FC = 0; - int psx_delay_BFC2E210 = 0; - int psx_delay_BFC2E230 = 0; - int psx_taken_BFC2E230 = 0; - int psx_delay_BFC2E24C = 0; - int psx_taken_BFC2E24C = 0; - int psx_delay_BFC2E29C = 0; - int psx_delay_BFC2E2C0 = 0; - int psx_taken_BFC2E2C0 = 0; - int psx_delay_BFC2E2E0 = 0; - int psx_taken_BFC2E2E0 = 0; - int psx_delay_BFC2E304 = 0; - int psx_taken_BFC2E304 = 0; - int psx_delay_BFC2E324 = 0; - int psx_taken_BFC2E324 = 0; - int psx_delay_BFC2E368 = 0; - int psx_delay_BFC2E388 = 0; - int psx_taken_BFC2E388 = 0; - int psx_delay_BFC2E39C = 0; - int psx_taken_BFC2E39C = 0; - int psx_delay_BFC2E3AC = 0; - int psx_taken_BFC2E3AC = 0; - int psx_delay_BFC2E3E4 = 0; - int psx_taken_BFC2E3E4 = 0; - int psx_delay_BFC2E3EC = 0; - int psx_taken_BFC2E3EC = 0; - int psx_delay_BFC2E408 = 0; - int psx_taken_BFC2E408 = 0; - int psx_delay_BFC2E444 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2D134u: goto label_BFC2D134; - case 0xBFC2D144u: goto label_BFC2D144; - case 0xBFC2D154u: goto label_BFC2D154; - case 0xBFC2D1A4u: goto label_BFC2D1A4; - case 0xBFC2D1B8u: goto label_BFC2D1B8; - case 0xBFC2D1CCu: goto label_BFC2D1CC; - case 0xBFC2D1E0u: goto label_BFC2D1E0; - case 0xBFC2D1ECu: goto label_BFC2D1EC; - case 0xBFC2D214u: goto label_BFC2D214; - case 0xBFC2D218u: goto label_BFC2D218; - case 0xBFC2D224u: goto label_BFC2D224; - case 0xBFC2D22Cu: goto label_BFC2D22C; - case 0xBFC2D230u: goto label_BFC2D230; - case 0xBFC2D240u: goto label_BFC2D240; - case 0xBFC2D2B0u: goto label_BFC2D2B0; - case 0xBFC2D2BCu: goto label_BFC2D2BC; - case 0xBFC2D2D4u: goto label_BFC2D2D4; - case 0xBFC2D2F8u: goto label_BFC2D2F8; - case 0xBFC2D308u: goto label_BFC2D308; - case 0xBFC2D310u: goto label_BFC2D310; - case 0xBFC2D31Cu: goto label_BFC2D31C; - case 0xBFC2D370u: goto label_BFC2D370; - case 0xBFC2D384u: goto label_BFC2D384; - case 0xBFC2D38Cu: goto label_BFC2D38C; - case 0xBFC2D3D8u: goto label_BFC2D3D8; - case 0xBFC2D400u: goto label_BFC2D400; - case 0xBFC2D414u: goto label_BFC2D414; - case 0xBFC2D41Cu: goto label_BFC2D41C; - case 0xBFC2D450u: goto label_BFC2D450; - case 0xBFC2D458u: goto label_BFC2D458; - case 0xBFC2D45Cu: goto label_BFC2D45C; - case 0xBFC2D464u: goto label_BFC2D464; - case 0xBFC2D46Cu: goto label_BFC2D46C; - case 0xBFC2D470u: goto label_BFC2D470; - case 0xBFC2D488u: goto label_BFC2D488; - case 0xBFC2D494u: goto label_BFC2D494; - case 0xBFC2D4CCu: goto label_BFC2D4CC; - case 0xBFC2D4E0u: goto label_BFC2D4E0; - case 0xBFC2D530u: goto label_BFC2D530; - case 0xBFC2D534u: goto label_BFC2D534; - case 0xBFC2D540u: goto label_BFC2D540; - case 0xBFC2D548u: goto label_BFC2D548; - case 0xBFC2D54Cu: goto label_BFC2D54C; - case 0xBFC2D55Cu: goto label_BFC2D55C; - case 0xBFC2D5CCu: goto label_BFC2D5CC; - case 0xBFC2D5D8u: goto label_BFC2D5D8; - case 0xBFC2D5F0u: goto label_BFC2D5F0; - case 0xBFC2D614u: goto label_BFC2D614; - case 0xBFC2D624u: goto label_BFC2D624; - case 0xBFC2D644u: goto label_BFC2D644; - case 0xBFC2D648u: goto label_BFC2D648; - case 0xBFC2D658u: goto label_BFC2D658; - case 0xBFC2D66Cu: goto label_BFC2D66C; - case 0xBFC2D674u: goto label_BFC2D674; - case 0xBFC2D684u: goto label_BFC2D684; - case 0xBFC2D68Cu: goto label_BFC2D68C; - case 0xBFC2D6ACu: goto label_BFC2D6AC; - case 0xBFC2D6B0u: goto label_BFC2D6B0; - case 0xBFC2D6BCu: goto label_BFC2D6BC; - case 0xBFC2D6C4u: goto label_BFC2D6C4; - case 0xBFC2D6C8u: goto label_BFC2D6C8; - case 0xBFC2D6D0u: goto label_BFC2D6D0; - case 0xBFC2D6E4u: goto label_BFC2D6E4; - case 0xBFC2D734u: goto label_BFC2D734; - case 0xBFC2D748u: goto label_BFC2D748; - case 0xBFC2D758u: goto label_BFC2D758; - case 0xBFC2D764u: goto label_BFC2D764; - case 0xBFC2D76Cu: goto label_BFC2D76C; - case 0xBFC2D77Cu: goto label_BFC2D77C; - case 0xBFC2D784u: goto label_BFC2D784; - case 0xBFC2D78Cu: goto label_BFC2D78C; - case 0xBFC2D7A4u: goto label_BFC2D7A4; - case 0xBFC2D7A8u: goto label_BFC2D7A8; - case 0xBFC2D7B0u: goto label_BFC2D7B0; - case 0xBFC2D7B8u: goto label_BFC2D7B8; - case 0xBFC2D7C0u: goto label_BFC2D7C0; - case 0xBFC2D7CCu: goto label_BFC2D7CC; - case 0xBFC2D870u: goto label_BFC2D870; - case 0xBFC2D878u: goto label_BFC2D878; - case 0xBFC2D87Cu: goto label_BFC2D87C; - case 0xBFC2D894u: goto label_BFC2D894; - case 0xBFC2D89Cu: goto label_BFC2D89C; - case 0xBFC2D8A0u: goto label_BFC2D8A0; - case 0xBFC2D8B8u: goto label_BFC2D8B8; - case 0xBFC2D8BCu: goto label_BFC2D8BC; - case 0xBFC2D8CCu: goto label_BFC2D8CC; - case 0xBFC2D8D4u: goto label_BFC2D8D4; - case 0xBFC2D8D8u: goto label_BFC2D8D8; - case 0xBFC2D8F0u: goto label_BFC2D8F0; - case 0xBFC2D8F8u: goto label_BFC2D8F8; - case 0xBFC2D90Cu: goto label_BFC2D90C; - case 0xBFC2D910u: goto label_BFC2D910; - case 0xBFC2D964u: goto label_BFC2D964; - case 0xBFC2D990u: goto label_BFC2D990; - case 0xBFC2D998u: goto label_BFC2D998; - case 0xBFC2D99Cu: goto label_BFC2D99C; - case 0xBFC2D9CCu: goto label_BFC2D9CC; - case 0xBFC2D9ECu: goto label_BFC2D9EC; - case 0xBFC2D9F0u: goto label_BFC2D9F0; - case 0xBFC2DA00u: goto label_BFC2DA00; - case 0xBFC2DA18u: goto label_BFC2DA18; - case 0xBFC2DA2Cu: goto label_BFC2DA2C; - case 0xBFC2DA34u: goto label_BFC2DA34; - case 0xBFC2DA38u: goto label_BFC2DA38; - case 0xBFC2DA54u: goto label_BFC2DA54; - case 0xBFC2DA5Cu: goto label_BFC2DA5C; - case 0xBFC2DA6Cu: goto label_BFC2DA6C; - case 0xBFC2DA70u: goto label_BFC2DA70; - case 0xBFC2DA78u: goto label_BFC2DA78; - case 0xBFC2DABCu: goto label_BFC2DABC; - case 0xBFC2DAC8u: goto label_BFC2DAC8; - case 0xBFC2DADCu: goto label_BFC2DADC; - case 0xBFC2DAE4u: goto label_BFC2DAE4; - case 0xBFC2DAECu: goto label_BFC2DAEC; - case 0xBFC2DB00u: goto label_BFC2DB00; - case 0xBFC2DB14u: goto label_BFC2DB14; - case 0xBFC2DB18u: goto label_BFC2DB18; - case 0xBFC2DB24u: goto label_BFC2DB24; - case 0xBFC2DB2Cu: goto label_BFC2DB2C; - case 0xBFC2DB44u: goto label_BFC2DB44; - case 0xBFC2DB50u: goto label_BFC2DB50; - case 0xBFC2DB60u: goto label_BFC2DB60; - case 0xBFC2DB6Cu: goto label_BFC2DB6C; - case 0xBFC2DB74u: goto label_BFC2DB74; - case 0xBFC2DB94u: goto label_BFC2DB94; - case 0xBFC2DB98u: goto label_BFC2DB98; - case 0xBFC2DBA0u: goto label_BFC2DBA0; - case 0xBFC2DBB4u: goto label_BFC2DBB4; - case 0xBFC2DBF4u: goto label_BFC2DBF4; - case 0xBFC2DC08u: goto label_BFC2DC08; - case 0xBFC2DC20u: goto label_BFC2DC20; - case 0xBFC2DC34u: goto label_BFC2DC34; - case 0xBFC2DC38u: goto label_BFC2DC38; - case 0xBFC2DC60u: goto label_BFC2DC60; - case 0xBFC2DC90u: goto label_BFC2DC90; - case 0xBFC2DCA8u: goto label_BFC2DCA8; - case 0xBFC2DCC0u: goto label_BFC2DCC0; - case 0xBFC2DCC8u: goto label_BFC2DCC8; - case 0xBFC2DCE0u: goto label_BFC2DCE0; - case 0xBFC2DCF0u: goto label_BFC2DCF0; - case 0xBFC2DD08u: goto label_BFC2DD08; - case 0xBFC2DD20u: goto label_BFC2DD20; - case 0xBFC2DD28u: goto label_BFC2DD28; - case 0xBFC2DD40u: goto label_BFC2DD40; - case 0xBFC2DD6Cu: goto label_BFC2DD6C; - case 0xBFC2DDD4u: goto label_BFC2DDD4; - case 0xBFC2DDE0u: goto label_BFC2DDE0; - case 0xBFC2DDECu: goto label_BFC2DDEC; - case 0xBFC2DE0Cu: goto label_BFC2DE0C; - case 0xBFC2DE30u: goto label_BFC2DE30; - case 0xBFC2DE40u: goto label_BFC2DE40; - case 0xBFC2DE6Cu: goto label_BFC2DE6C; - case 0xBFC2DEA8u: goto label_BFC2DEA8; - case 0xBFC2DEBCu: goto label_BFC2DEBC; - case 0xBFC2DED0u: goto label_BFC2DED0; - case 0xBFC2DEE0u: goto label_BFC2DEE0; - case 0xBFC2DEE8u: goto label_BFC2DEE8; - case 0xBFC2DEF4u: goto label_BFC2DEF4; - case 0xBFC2DF38u: goto label_BFC2DF38; - case 0xBFC2DF48u: goto label_BFC2DF48; - case 0xBFC2DF60u: goto label_BFC2DF60; - case 0xBFC2DF78u: goto label_BFC2DF78; - case 0xBFC2DF80u: goto label_BFC2DF80; - case 0xBFC2DF98u: goto label_BFC2DF98; - case 0xBFC2DFA8u: goto label_BFC2DFA8; - case 0xBFC2DFC0u: goto label_BFC2DFC0; - case 0xBFC2DFD8u: goto label_BFC2DFD8; - case 0xBFC2DFE0u: goto label_BFC2DFE0; - case 0xBFC2DFF8u: goto label_BFC2DFF8; - case 0xBFC2E02Cu: goto label_BFC2E02C; - case 0xBFC2E038u: goto label_BFC2E038; - case 0xBFC2E060u: goto label_BFC2E060; - case 0xBFC2E084u: goto label_BFC2E084; - case 0xBFC2E094u: goto label_BFC2E094; - case 0xBFC2E0C0u: goto label_BFC2E0C0; - case 0xBFC2E0FCu: goto label_BFC2E0FC; - case 0xBFC2E110u: goto label_BFC2E110; - case 0xBFC2E118u: goto label_BFC2E118; - case 0xBFC2E134u: goto label_BFC2E134; - case 0xBFC2E15Cu: goto label_BFC2E15C; - case 0xBFC2E19Cu: goto label_BFC2E19C; - case 0xBFC2E1A8u: goto label_BFC2E1A8; - case 0xBFC2E1B0u: goto label_BFC2E1B0; - case 0xBFC2E1B8u: goto label_BFC2E1B8; - case 0xBFC2E204u: goto label_BFC2E204; - case 0xBFC2E208u: goto label_BFC2E208; - case 0xBFC2E218u: goto label_BFC2E218; - case 0xBFC2E224u: goto label_BFC2E224; - case 0xBFC2E238u: goto label_BFC2E238; - case 0xBFC2E240u: goto label_BFC2E240; - case 0xBFC2E254u: goto label_BFC2E254; - case 0xBFC2E2A4u: goto label_BFC2E2A4; - case 0xBFC2E2B0u: goto label_BFC2E2B0; - case 0xBFC2E2C8u: goto label_BFC2E2C8; - case 0xBFC2E2D0u: goto label_BFC2E2D0; - case 0xBFC2E2D4u: goto label_BFC2E2D4; - case 0xBFC2E2E8u: goto label_BFC2E2E8; - case 0xBFC2E2ECu: goto label_BFC2E2EC; - case 0xBFC2E2FCu: goto label_BFC2E2FC; - case 0xBFC2E30Cu: goto label_BFC2E30C; - case 0xBFC2E32Cu: goto label_BFC2E32C; - case 0xBFC2E370u: goto label_BFC2E370; - case 0xBFC2E380u: goto label_BFC2E380; - case 0xBFC2E390u: goto label_BFC2E390; - case 0xBFC2E3A4u: goto label_BFC2E3A4; - case 0xBFC2E3B4u: goto label_BFC2E3B4; - case 0xBFC2E3C4u: goto label_BFC2E3C4; - case 0xBFC2E3ECu: goto label_BFC2E3EC; - case 0xBFC2E3F4u: goto label_BFC2E3F4; - case 0xBFC2E410u: goto label_BFC2E410; - case 0xBFC2E420u: goto label_BFC2E420; - default: break; - } - } -label_BFC2D0E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D0E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2D0E0: 27BDFF50 addiu $sp, $sp, -176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-176)); - PGXP_ALU(0x27BDFF50u, cpu->gpr[29], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x800450E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2D0E4: AFB5003C sw $s5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450E4u); return; } g_debug_last_store_pc = 0x800450E4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5003Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800450E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC2D0E8: AFBE0048 sw $fp, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450E8u); return; } g_debug_last_store_pc = 0x800450E8u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0048u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x800450E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2D0EC: AFB60040 sw $s6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450ECu); return; } g_debug_last_store_pc = 0x800450ECu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60040u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800450ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800450F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2D0F0: AFB70044 sw $s7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450F0u); return; } g_debug_last_store_pc = 0x800450F0u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70044u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x800450F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2D0F4: AFBF004C sw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450F4u); return; } g_debug_last_store_pc = 0x800450F4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800450F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2D0F8: AFB40038 sw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450F8u); return; } g_debug_last_store_pc = 0x800450F8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800450F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2D0FC: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800450FCu); return; } g_debug_last_store_pc = 0x800450FCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800450FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2D100: AFB30034 sw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045100u); return; } g_debug_last_store_pc = 0x80045100u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80045100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2D104: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045104u); return; } g_debug_last_store_pc = 0x80045104u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80045104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D108: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2D10C: AFB1002C sw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004510Cu); return; } g_debug_last_store_pc = 0x8004510Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004510Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2D110: 3C1E8011 lui $fp, 0x8011 */ - cpu->gpr[30] = 0x80110000u; - PGXP_ALU(0x3C1E8011u, cpu->gpr[30], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D114: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045114u); -#endif - /* 0xBFC2D118: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045118u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2D11C: AFA400B0 sw $a0, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004511Cu); return; } g_debug_last_store_pc = 0x8004511Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA400B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004511Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D120: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2D124: 27DE0EC8 addiu $fp, $fp, 3784 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (3784)); - PGXP_ALU(0x27DE0EC8u, cpu->gpr[30], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC2D128: 2417FFFE addiu $s7, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2417FFFEu, cpu->gpr[23], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80045128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC2D12C: 24160002 addiu $s6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24160002u, cpu->gpr[22], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004512Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2D130: AFA000AC sw $zero, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045130u); return; } g_debug_last_store_pc = 0x80045130u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000ACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045130u); -#endif -label_BFC2D134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045134u); -#endif - /* 0xBFC2D134: 8FC30004 lw $v1, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045134u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2D13C: 10600465 beq $v1, $zero, 0xBFC2E2D4 */ - uint32_t psx_brA_BFC2D13C = cpu->gpr[3]; uint32_t psx_brB_BFC2D13C = cpu->gpr[0]; - psx_taken_BFC2D13C = (psx_brA_BFC2D13C == psx_brB_BFC2D13C); - psx_delay_BFC2D13C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045140u); -#endif - /* 0xBFC2D140: 8FAC00AC lw $t4, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045140u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00ACu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045140u); -#endif - if (psx_delay_BFC2D13C) { - psx_delay_BFC2D13C = 0; - if (psx_taken_BFC2D13C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D4u); - goto label_BFC2E2D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045144u); - } -label_BFC2D144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045144u); -#endif - /* 0xBFC2D144: 8FC20030 lw $v0, 48($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045144u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC20030u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D14C: 1040001A beq $v0, $zero, 0xBFC2D1B8 */ - uint32_t psx_brA_BFC2D14C = cpu->gpr[2]; uint32_t psx_brB_BFC2D14C = cpu->gpr[0]; - psx_taken_BFC2D14C = (psx_brA_BFC2D14C == psx_brB_BFC2D14C); - psx_delay_BFC2D14C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D150: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045150u); -#endif - if (psx_delay_BFC2D14C) { - psx_delay_BFC2D14C = 0; - if (psx_taken_BFC2D14C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800451B8u); - goto label_BFC2D1B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045154u); - } -label_BFC2D154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045154u); -#endif - /* 0xBFC2D154: 8FAF00AC lw $t7, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045154u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF00ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D158: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2D15C: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2D160: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D164: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2D168: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D16C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004516Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2D170: 0015C8C0 sll $t9, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045170u); -#endif - /* 0xBFC2D174: 8DCE8324 lw $t6, -31964($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045174u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8324u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2D178: 0335C823 subu $t9, $t9, $s5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[21]; - PGXP_ALU(0x0335C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2D17C: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D180: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D184: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D188: 3C098011 lui $t1, 0x8011 */ - cpu->gpr[9] = 0x80110000u; - PGXP_ALU(0x3C098011u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D18C: 25290F04 addiu $t1, $t1, 3844 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (3844)); - PGXP_ALU(0x25290F04u, cpu->gpr[9], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x8004518Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC2D190: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4018u); -#endif - /* 0xBFC2D194: 01C32026 xor $a0, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[14] ^ cpu->gpr[3]; - PGXP_ALU(0x01C32026u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2D198: 2C840001 sltiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0); - PGXP_ALU(0x2C840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC2D19C: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x800451A4u; /* jalr link before delay slot */ - psx_delay_BFC2D19C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x320u); -#endif - /* 0xBFC2D1A0: 01092821 addu $a1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800451A0u); -#endif - if (psx_delay_BFC2D19C) { - psx_delay_BFC2D19C = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x800451A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC2D1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D1A4: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800451A4u); -#endif - /* 0xBFC2D1A8: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800451A8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800451A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D1AC: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800451ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1B0: 10000447 beq $zero, $zero, 0xBFC2E2D0 */ - uint32_t psx_brA_BFC2D1B0 = cpu->gpr[0]; uint32_t psx_brB_BFC2D1B0 = cpu->gpr[0]; - psx_taken_BFC2D1B0 = (psx_brA_BFC2D1B0 == psx_brB_BFC2D1B0); - psx_delay_BFC2D1B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D1B4: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800451B4u); -#endif - if (psx_delay_BFC2D1B0) { - psx_delay_BFC2D1B0 = 0; - if (psx_taken_BFC2D1B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D0u); - goto label_BFC2E2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800451B8u); - } -label_BFC2D1B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D1B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D1B8: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800451B8u); -#endif - /* 0xBFC2D1BC: 8D4A8324 lw $t2, -31964($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -31964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-31964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800451BCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A8324u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800451BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800451C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2D1C4: 154300C1 bne $t2, $v1, 0xBFC2D4CC */ - uint32_t psx_brA_BFC2D1C4 = cpu->gpr[10]; uint32_t psx_brB_BFC2D1C4 = cpu->gpr[3]; - psx_taken_BFC2D1C4 = (psx_brA_BFC2D1C4 != psx_brB_BFC2D1C4); - psx_delay_BFC2D1C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800451C8u); -#endif - if (psx_delay_BFC2D1C4) { - psx_delay_BFC2D1C4 = 0; - if (psx_taken_BFC2D1C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800454CCu); - goto label_BFC2D4CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800451CCu); - } -label_BFC2D1CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D1CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451CCu); -#endif - /* 0xBFC2D1CC: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800451CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800451CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800451D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2D1D4: 304B00F0 andi $t3, $v0, 0xF0 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0xF0u; - PGXP_ALU(0x304B00F0u, cpu->gpr[11], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800451D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2D1D8: 156000BC bne $t3, $zero, 0xBFC2D4CC */ - uint32_t psx_brA_BFC2D1D8 = cpu->gpr[11]; uint32_t psx_brB_BFC2D1D8 = cpu->gpr[0]; - psx_taken_BFC2D1D8 = (psx_brA_BFC2D1D8 != psx_brB_BFC2D1D8); - psx_delay_BFC2D1D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800451DCu); -#endif - if (psx_delay_BFC2D1D8) { - psx_delay_BFC2D1D8 = 0; - if (psx_taken_BFC2D1D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800454CCu); - goto label_BFC2D4CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800451E0u); - } -label_BFC2D1E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D1E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2D1E0: 304C0004 andi $t4, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x304C0004u, cpu->gpr[12], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800451E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2D1E4: 1180004A beq $t4, $zero, 0xBFC2D310 */ - uint32_t psx_brA_BFC2D1E4 = cpu->gpr[12]; uint32_t psx_brB_BFC2D1E4 = cpu->gpr[0]; - psx_taken_BFC2D1E4 = (psx_brA_BFC2D1E4 == psx_brB_BFC2D1E4); - psx_delay_BFC2D1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2D1E8: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800451E8u); -#endif - if (psx_delay_BFC2D1E4) { - psx_delay_BFC2D1E4 = 0; - if (psx_taken_BFC2D1E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045310u); - goto label_BFC2D310; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800451ECu); - } -label_BFC2D1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451ECu); -#endif - /* 0xBFC2D1EC: 8FC20684 lw $v0, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800451ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC20684u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800451ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800451F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2D1F0: 2418001E addiu $t8, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2418001Eu, cpu->gpr[24], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800451F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2D1F4: 0302001A div $t8, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[24]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0302001Au, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800451F4u); -#endif - /* 0xBFC2D1F8: 8FCD067C lw $t5, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800451F8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40000000u); } - PGXP_LOAD(0x8FCD067Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800451F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D1FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800451FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2D200: 25AE0001 addiu $t6, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); - PGXP_ALU(0x25AE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004000u); -#endif - /* 0xBFC2D204: AFCE067C sw $t6, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045204u); return; } g_debug_last_store_pc = 0x80045204u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFCE067Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045204u); -#endif - /* 0xBFC2D208: 8FCF067C lw $t7, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045208u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40000000u); } - PGXP_LOAD(0x8FCF067Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D20C: 14400002 bne $v0, $zero, 0xBFC2D218 */ - uint32_t psx_brA_BFC2D20C = cpu->gpr[2]; uint32_t psx_brB_BFC2D20C = cpu->gpr[0]; - psx_taken_BFC2D20C = (psx_brA_BFC2D20C != psx_brB_BFC2D20C); - psx_delay_BFC2D20C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D210: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045210u); -#endif - if (psx_delay_BFC2D20C) { - psx_delay_BFC2D20C = 0; - if (psx_taken_BFC2D20C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045218u); - goto label_BFC2D218; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045214u); - } -label_BFC2D214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D214: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80045214u); return; -#ifdef PSX_COSIM - cosim_instr(0x80045214u); -#endif -label_BFC2D218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D218: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2D21C: 14410004 bne $v0, $at, 0xBFC2D230 */ - uint32_t psx_brA_BFC2D21C = cpu->gpr[2]; uint32_t psx_brB_BFC2D21C = cpu->gpr[1]; - psx_taken_BFC2D21C = (psx_brA_BFC2D21C != psx_brB_BFC2D21C); - psx_delay_BFC2D21C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D220: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045220u); -#endif - if (psx_delay_BFC2D21C) { - psx_delay_BFC2D21C = 0; - if (psx_taken_BFC2D21C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045230u); - goto label_BFC2D230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045224u); - } -label_BFC2D224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2D224: 17010002 bne $t8, $at, 0xBFC2D230 */ - uint32_t psx_brA_BFC2D224 = cpu->gpr[24]; uint32_t psx_brB_BFC2D224 = cpu->gpr[1]; - psx_taken_BFC2D224 = (psx_brA_BFC2D224 != psx_brB_BFC2D224); - psx_delay_BFC2D224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045228u); -#endif - if (psx_delay_BFC2D224) { - psx_delay_BFC2D224 = 0; - if (psx_taken_BFC2D224) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045230u); - goto label_BFC2D230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004522Cu); - } -label_BFC2D22C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D22Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004522Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D22C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004522Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004522Cu); -#endif -label_BFC2D230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D230: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008002u); -#endif - /* 0xBFC2D234: 032F082A slt $at, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x032F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D238: 10200033 beq $at, $zero, 0xBFC2D308 */ - uint32_t psx_brA_BFC2D238 = cpu->gpr[1]; uint32_t psx_brB_BFC2D238 = cpu->gpr[0]; - psx_taken_BFC2D238 = (psx_brA_BFC2D238 == psx_brB_BFC2D238); - psx_delay_BFC2D238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D23C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004523Cu); -#endif - if (psx_delay_BFC2D238) { - psx_delay_BFC2D238 = 0; - if (psx_taken_BFC2D238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045308u); - goto label_BFC2D308; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045240u); - } -label_BFC2D240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045240u); -#endif - /* 0xBFC2D240: 8FC80680 lw $t0, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045240u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40000000u); } - PGXP_LOAD(0x8FC80680u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D244: 00156880 sll $t5, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00156880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D248: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000200u); -#endif - /* 0xBFC2D24C: AFC90680 sw $t1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004524Cu); return; } g_debug_last_store_pc = 0x8004524Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFC90680u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045250u); -#endif - /* 0xBFC2D250: 8FAB00AC lw $t3, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045250u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00ACu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D254: 01B56821 addu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[21]; - PGXP_ALU(0x01B56821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D258: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D25C: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004525Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D260: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D264: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D268: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D26C: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004526Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D270: 001550C0 sll $t2, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001550C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045270u); -#endif - /* 0xBFC2D274: 8FC30680 lw $v1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045274u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30680u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D278: 01555023 subu $t2, $t2, $s5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[21]; - PGXP_ALU(0x01555023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D27C: 01B56821 addu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[21]; - PGXP_ALU(0x01B56821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D280: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D284: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D288: 000D6940 sll $t5, $t5, 5 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 5u; - PGXP_ALU(0x000D6940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80045288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D28C: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004528Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D290: 3C188011 lui $t8, 0x8011 */ - cpu->gpr[24] = 0x80110000u; - PGXP_ALU(0x3C188011u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D294: 27180FE4 addiu $t8, $t8, 4068 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (4068)); - PGXP_ALU(0x27180FE4u, cpu->gpr[24], _pgx1, 0x00000FE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000410u); -#endif - /* 0xBFC2D298: 03CA2021 addu $a0, $fp, $t2 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[10]; - PGXP_ALU(0x03CA2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC2D29C: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC2D2A0: 0062082A slt $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800452A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004020u); -#endif - /* 0xBFC2D2A4: 01D82821 addu $a1, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800452A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D2A8: 14200004 bne $at, $zero, 0xBFC2D2BC */ - uint32_t psx_brA_BFC2D2A8 = cpu->gpr[1]; uint32_t psx_brB_BFC2D2A8 = cpu->gpr[0]; - psx_taken_BFC2D2A8 = (psx_brA_BFC2D2A8 != psx_brB_BFC2D2A8); - psx_delay_BFC2D2A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2D2AC: 2484003C addiu $a0, $a0, 60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (60)); - PGXP_ALU(0x2484003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800452ACu); -#endif - if (psx_delay_BFC2D2A8) { - psx_delay_BFC2D2A8 = 0; - if (psx_taken_BFC2D2A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800452BCu); - goto label_BFC2D2BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800452B0u); - } -label_BFC2D2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2D2B0: AFC00680 sw $zero, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452B0u); return; } g_debug_last_store_pc = 0x800452B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFC00680u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800452B0u); -#endif - /* 0xBFC2D2B4: 8FC30680 lw $v1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30680u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800452B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D2B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800452B8u); -#endif -label_BFC2D2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2D2BC: 000378C0 sll $t7, $v1, 3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 3u; - PGXP_ALU(0x000378C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800452BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2D2C0: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800452C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D2C4: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800452C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008020u); -#endif - /* 0xBFC2D2C8: 00AFC821 addu $t9, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AFC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800452C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D2CC: 2728006C addiu $t0, $t9, 108 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (108)); - PGXP_ALU(0x2728006Cu, cpu->gpr[8], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800452CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC2D2D0: 00804821 addu $t1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800452D0u); -#endif -label_BFC2D2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452D4u); -#endif - /* 0xBFC2D2D4: 8F210000 lw $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452D4u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D2D8: 2739000C addiu $t9, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (12)); - PGXP_ALU(0x2739000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800452D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D2DC: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452DCu); return; } g_debug_last_store_pc = 0x800452DCu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452E0u); -#endif - /* 0xBFC2D2E0: 8F21FFF8 lw $at, -8($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452E0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D2E4: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800452E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D2E8: AD21FFF8 sw $at, -8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452E8u); return; } g_debug_last_store_pc = 0x800452E8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452E8u); -#endif - /* 0xBFC2D2EC: 8F21FFFC lw $at, -4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452ECu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D2F0: 1728FFF8 bne $t9, $t0, 0xBFC2D2D4 */ - uint32_t psx_brA_BFC2D2F0 = cpu->gpr[25]; uint32_t psx_brB_BFC2D2F0 = cpu->gpr[8]; - psx_taken_BFC2D2F0 = (psx_brA_BFC2D2F0 != psx_brB_BFC2D2F0); - psx_delay_BFC2D2F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D2F4: AD21FFFC sw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452F4u); return; } g_debug_last_store_pc = 0x800452F4u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452F4u); -#endif - if (psx_delay_BFC2D2F0) { - psx_delay_BFC2D2F0 = 0; - if (psx_taken_BFC2D2F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800452D4u); - goto label_BFC2D2D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800452F8u); - } -label_BFC2D2F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D2F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800452F8u); -#endif - /* 0xBFC2D2F8: 8F210000 lw $at, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800452F8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x2000000u); } - PGXP_LOAD(0x8F210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800452F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800452FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D300: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045300u); return; } g_debug_last_store_pc = 0x80045300u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2D304: AFC0067C sw $zero, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045304u); return; } g_debug_last_store_pc = 0x80045304u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFC0067Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045304u); -#endif -label_BFC2D308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045308u); -#endif - /* 0xBFC2D308: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045308u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D30C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004530Cu); -#endif -label_BFC2D310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2D310: 304A0002 andi $t2, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x2u; - PGXP_ALU(0x304A0002u, cpu->gpr[10], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80045310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2D314: 1140001B beq $t2, $zero, 0xBFC2D384 */ - uint32_t psx_brA_BFC2D314 = cpu->gpr[10]; uint32_t psx_brB_BFC2D314 = cpu->gpr[0]; - psx_taken_BFC2D314 = (psx_brA_BFC2D314 == psx_brB_BFC2D314); - psx_delay_BFC2D314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2D318: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045318u); -#endif - if (psx_delay_BFC2D314) { - psx_delay_BFC2D314 = 0; - if (psx_taken_BFC2D314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045384u); - goto label_BFC2D384; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004531Cu); - } -label_BFC2D31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004531Cu); -#endif - /* 0xBFC2D31C: 8FAB00AC lw $t3, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004531Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00ACu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004531Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2D320: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D324: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D328: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D32C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004532Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D330: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045330u); -#endif - /* 0xBFC2D334: 8C638328 lw $v1, -31960($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045334u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638328u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D338: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D33C: 001568C0 sll $t5, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001568C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004533Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D340: 01B56823 subu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[21]; - PGXP_ALU(0x01B56823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D344: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D348: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D34C: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D350: 3C188011 lui $t8, 0x8011 */ - cpu->gpr[24] = 0x80110000u; - PGXP_ALU(0x3C188011u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D354: 27180F04 addiu $t8, $t8, 3844 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (3844)); - PGXP_ALU(0x27180F04u, cpu->gpr[24], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80045354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC2D358: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004010u); -#endif - /* 0xBFC2D35C: 01D82021 addu $a0, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004535Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC2D360: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC2D364: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D368: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045370u; /* jal link before delay slot */ - psx_delay_BFC2D368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC2D36C: 00603821 addu $a3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004536Cu); -#endif - if (psx_delay_BFC2D368) { - psx_delay_BFC2D368 = 0; - cpu->gpr[31] = 0x80045370u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2D370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D370: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045370u); -#endif - /* 0xBFC2D374: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045374u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045374u); -#endif - /* 0xBFC2D378: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045378u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D37C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004537Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2D380: 304F0001 andi $t7, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304F0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045380u); -#endif -label_BFC2D384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2D384: 11E00023 beq $t7, $zero, 0xBFC2D414 */ - uint32_t psx_brA_BFC2D384 = cpu->gpr[15]; uint32_t psx_brB_BFC2D384 = cpu->gpr[0]; - psx_taken_BFC2D384 = (psx_brA_BFC2D384 == psx_brB_BFC2D384); - psx_delay_BFC2D384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2D388: 304C0008 andi $t4, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80045388u); -#endif - if (psx_delay_BFC2D384) { - psx_delay_BFC2D384 = 0; - if (psx_taken_BFC2D384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045414u); - goto label_BFC2D414; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004538Cu); - } -label_BFC2D38C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D38Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004538Cu); -#endif - /* 0xBFC2D38C: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004538Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004538Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045390u); -#endif - /* 0xBFC2D390: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045390u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80045390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D394: 0008C880 sll $t9, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 2u; - PGXP_ALU(0x0008C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D398: 0328C823 subu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x0328C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D39C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004539Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D3A0: 0328C821 addu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x0328C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D3A4: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800453A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D3A8: 3C098011 lui $t1, 0x8011 */ - cpu->gpr[9] = 0x80110000u; - PGXP_ALU(0x3C098011u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800453A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D3AC: 001550C0 sll $t2, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001550C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800453ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D3B0: 0328C821 addu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x0328C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D3B4: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800453B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D3B8: 01555023 subu $t2, $t2, $s5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[21]; - PGXP_ALU(0x01555023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D3BC: 25290F04 addiu $t1, $t1, 3844 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (3844)); - PGXP_ALU(0x25290F04u, cpu->gpr[9], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x800453BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100200u); -#endif - /* 0xBFC2D3C0: 0329A021 addu $s4, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[20] = cpu->gpr[25] + cpu->gpr[9]; - PGXP_ALU(0x0329A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D3C4: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800453C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100410u); -#endif - /* 0xBFC2D3C8: 028A2021 addu $a0, $s4, $t2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[10]; - PGXP_ALU(0x028A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2D3CC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D3D0: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x800453D8u; /* jal link before delay slot */ - psx_delay_BFC2D3D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2D3D4: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453D4u); -#endif - if (psx_delay_BFC2D3D0) { - psx_delay_BFC2D3D0 = 0; - cpu->gpr[31] = 0x800453D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2D3D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D3D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D3D8: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800453D8u); -#endif - /* 0xBFC2D3DC: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800453DCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800453DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2D3E0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800453E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2D3E4: 001558C0 sll $t3, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001558C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800453E4u); -#endif - /* 0xBFC2D3E8: 8CA58338 lw $a1, -31944($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800453E8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA58338u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800453E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2D3EC: 01755823 subu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[21]; - PGXP_ALU(0x01755823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800453F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2D3F0: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800453F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100810u); -#endif - /* 0xBFC2D3F4: 028B2021 addu $a0, $s4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[11]; - PGXP_ALU(0x028B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D3F8: 0C01122A jal 0xB00448A8 */ - cpu->gpr[31] = 0x80045400u; /* jal link before delay slot */ - psx_delay_BFC2D3F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2D3FC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800453FCu); -#endif - if (psx_delay_BFC2D3F8) { - psx_delay_BFC2D3F8 = 0; - cpu->gpr[31] = 0x80045400u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448A8u); - cpu->pc = 0x800448A8u; return; - } -label_BFC2D400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D400: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045400u); -#endif - /* 0xBFC2D404: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045404u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045404u); -#endif - /* 0xBFC2D408: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045408u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D40C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004540Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC2D410: 304C0008 andi $t4, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80045410u); -#endif -label_BFC2D414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2D414: 1180001F beq $t4, $zero, 0xBFC2D494 */ - uint32_t psx_brA_BFC2D414 = cpu->gpr[12]; uint32_t psx_brB_BFC2D414 = cpu->gpr[0]; - psx_taken_BFC2D414 = (psx_brA_BFC2D414 == psx_brB_BFC2D414); - psx_delay_BFC2D414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D418: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045418u); -#endif - if (psx_delay_BFC2D414) { - psx_delay_BFC2D414 = 0; - if (psx_taken_BFC2D414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045494u); - goto label_BFC2D494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004541Cu); - } -label_BFC2D41C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D41Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004541Cu); -#endif - /* 0xBFC2D41C: 8FAD00AC lw $t5, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004541Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD00ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D420: 3C188011 lui $t8, 0x8011 */ - cpu->gpr[24] = 0x80110000u; - PGXP_ALU(0x3C188011u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2D424: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2D428: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D42C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004542Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2D430: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D434: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2D438: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D43C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004543Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D440: 27180F04 addiu $t8, $t8, 3844 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (3844)); - PGXP_ALU(0x27180F04u, cpu->gpr[24], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80045440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2D444: 30430080 andi $v1, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x30430080u, cpu->gpr[3], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80045444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2D448: 10600003 beq $v1, $zero, 0xBFC2D458 */ - uint32_t psx_brA_BFC2D448 = cpu->gpr[3]; uint32_t psx_brB_BFC2D448 = cpu->gpr[0]; - psx_taken_BFC2D448 = (psx_brA_BFC2D448 == psx_brB_BFC2D448); - psx_delay_BFC2D448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1104000u); -#endif - /* 0xBFC2D44C: 01D8A021 addu $s4, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[20] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004544Cu); -#endif - if (psx_delay_BFC2D448) { - psx_delay_BFC2D448 = 0; - if (psx_taken_BFC2D448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045458u); - goto label_BFC2D458; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045450u); - } -label_BFC2D450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D450: 10000002 beq $zero, $zero, 0xBFC2D45C */ - uint32_t psx_brA_BFC2D450 = cpu->gpr[0]; uint32_t psx_brB_BFC2D450 = cpu->gpr[0]; - psx_taken_BFC2D450 = (psx_brA_BFC2D450 == psx_brB_BFC2D450); - psx_delay_BFC2D450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2D454: 240600FF addiu $a2, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240600FFu, cpu->gpr[6], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045454u); -#endif - if (psx_delay_BFC2D450) { - psx_delay_BFC2D450 = 0; - if (psx_taken_BFC2D450) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004545Cu); - goto label_BFC2D45C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045458u); - } -label_BFC2D458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2D458: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045458u); -#endif -label_BFC2D45C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D45Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004545Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2D45C: 10600004 beq $v1, $zero, 0xBFC2D470 */ - uint32_t psx_brA_BFC2D45C = cpu->gpr[3]; uint32_t psx_brB_BFC2D45C = cpu->gpr[0]; - psx_taken_BFC2D45C = (psx_brA_BFC2D45C == psx_brB_BFC2D45C); - psx_delay_BFC2D45C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2D460: 240700FF addiu $a3, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240700FFu, cpu->gpr[7], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045460u); -#endif - if (psx_delay_BFC2D45C) { - psx_delay_BFC2D45C = 0; - if (psx_taken_BFC2D45C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045470u); - goto label_BFC2D470; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045464u); - } -label_BFC2D464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D464: 10000002 beq $zero, $zero, 0xBFC2D470 */ - uint32_t psx_brA_BFC2D464 = cpu->gpr[0]; uint32_t psx_brB_BFC2D464 = cpu->gpr[0]; - psx_taken_BFC2D464 = (psx_brA_BFC2D464 == psx_brB_BFC2D464); - psx_delay_BFC2D464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2D468: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045468u); -#endif - if (psx_delay_BFC2D464) { - psx_delay_BFC2D464 = 0; - if (psx_taken_BFC2D464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045470u); - goto label_BFC2D470; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004546Cu); - } -label_BFC2D46C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D46Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004546Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2D46C: 240700FF addiu $a3, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240700FFu, cpu->gpr[7], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004546Cu); -#endif -label_BFC2D470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2D470: 001578C0 sll $t7, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001578C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2D474: 01F57823 subu $t7, $t7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[21]; - PGXP_ALU(0x01F57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D478: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108010u); -#endif - /* 0xBFC2D47C: 028F2021 addu $a0, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004547Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D480: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045488u; /* jal link before delay slot */ - psx_delay_BFC2D480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2D484: 240500FF addiu $a1, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240500FFu, cpu->gpr[5], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045484u); -#endif - if (psx_delay_BFC2D480) { - psx_delay_BFC2D480 = 0; - cpu->gpr[31] = 0x80045488u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2D488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D488: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045488u); -#endif - /* 0xBFC2D48C: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004548Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004548Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D490: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045490u); -#endif -label_BFC2D494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D494: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045494u); -#endif - /* 0xBFC2D498: 8D088320 lw $t0, -31968($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045498u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D088320u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2D49C: 3C038011 lui $v1, 0x8011 */ - cpu->gpr[3] = 0x80110000u; - PGXP_ALU(0x3C038011u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004549Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D4A0: 0008C880 sll $t9, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 2u; - PGXP_ALU(0x0008C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800454A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D4A4: 0328C823 subu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x0328C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800454A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D4A8: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800454A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D4AC: 0328C821 addu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x0328C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800454ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D4B0: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800454B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D4B4: 0328C821 addu $t9, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x0328C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800454B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D4B8: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800454B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2D4BC: 00791821 addu $v1, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00791821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800454BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454C0u); -#endif - /* 0xBFC2D4C0: 8C630EC8 lw $v1, 3784($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 3784; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (3784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630EC8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800454C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D4C4: 10000335 beq $zero, $zero, 0xBFC2E19C */ - uint32_t psx_brA_BFC2D4C4 = cpu->gpr[0]; uint32_t psx_brB_BFC2D4C4 = cpu->gpr[0]; - psx_taken_BFC2D4C4 = (psx_brA_BFC2D4C4 == psx_brB_BFC2D4C4); - psx_delay_BFC2D4C4 = 1; - /* 0xBFC2D4C8: 8FC20000 lw $v0, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800454C8u); -#endif - if (psx_delay_BFC2D4C4) { - psx_delay_BFC2D4C4 = 0; - if (psx_taken_BFC2D4C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004619Cu); - goto label_BFC2E19C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800454CCu); - } -label_BFC2D4CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D4CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454CCu); -#endif - /* 0xBFC2D4CC: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800454CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D4D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800454D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2D4D4: 30490004 andi $t1, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30490004u, cpu->gpr[9], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800454D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2D4D8: 11200064 beq $t1, $zero, 0xBFC2D66C */ - uint32_t psx_brA_BFC2D4D8 = cpu->gpr[9]; uint32_t psx_brB_BFC2D4D8 = cpu->gpr[0]; - psx_taken_BFC2D4D8 = (psx_brA_BFC2D4D8 == psx_brB_BFC2D4D8); - psx_delay_BFC2D4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2D4DC: 304B0010 andi $t3, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800454DCu); -#endif - if (psx_delay_BFC2D4D8) { - psx_delay_BFC2D4D8 = 0; - if (psx_taken_BFC2D4D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004566Cu); - goto label_BFC2D66C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800454E0u); - } -label_BFC2D4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454E0u); -#endif - /* 0xBFC2D4E0: 8FC20684 lw $v0, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC20684u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800454E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2D4E4: 240F001E addiu $t7, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240F001Eu, cpu->gpr[15], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800454E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2D4E8: 01E2001A div $t7, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E2001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800454E8u); -#endif - /* 0xBFC2D4EC: 8FCA067C lw $t2, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454ECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40000000u); } - PGXP_LOAD(0x8FCA067Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800454ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800454F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D4F0: 3C0E8011 lui $t6, 0x8011 */ - cpu->gpr[14] = 0x80110000u; - PGXP_ALU(0x3C0E8011u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800454F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2D4F4: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800454F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000800u); -#endif - /* 0xBFC2D4F8: AFCB067C sw $t3, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454F8u); return; } g_debug_last_store_pc = 0x800454F8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFCB067Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800454F8u); -#endif - /* 0xBFC2D4FC: 8FAC00AC lw $t4, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800454FCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00ACu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800454FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045500u); -#endif - /* 0xBFC2D500: 8FD8067C lw $t8, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045500u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD8067Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2D504: 000C6880 sll $t5, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2D508: 01AC6823 subu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D50C: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004550Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2D510: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D514: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2D518: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D51C: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004551Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D520: 25CE0F04 addiu $t6, $t6, 3844 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (3844)); - PGXP_ALU(0x25CE0F04u, cpu->gpr[14], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80045520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106000u); -#endif - /* 0xBFC2D524: 01AEA021 addu $s4, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[20] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AEA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D528: 14400002 bne $v0, $zero, 0xBFC2D534 */ - uint32_t psx_brA_BFC2D528 = cpu->gpr[2]; uint32_t psx_brB_BFC2D528 = cpu->gpr[0]; - psx_taken_BFC2D528 = (psx_brA_BFC2D528 != psx_brB_BFC2D528); - psx_delay_BFC2D528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D52C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004552Cu); -#endif - if (psx_delay_BFC2D528) { - psx_delay_BFC2D528 = 0; - if (psx_taken_BFC2D528) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045534u); - goto label_BFC2D534; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045530u); - } -label_BFC2D530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D530: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80045530u); return; -#ifdef PSX_COSIM - cosim_instr(0x80045530u); -#endif -label_BFC2D534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D534: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2D538: 14410004 bne $v0, $at, 0xBFC2D54C */ - uint32_t psx_brA_BFC2D538 = cpu->gpr[2]; uint32_t psx_brB_BFC2D538 = cpu->gpr[1]; - psx_taken_BFC2D538 = (psx_brA_BFC2D538 != psx_brB_BFC2D538); - psx_delay_BFC2D538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D53C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004553Cu); -#endif - if (psx_delay_BFC2D538) { - psx_delay_BFC2D538 = 0; - if (psx_taken_BFC2D538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004554Cu); - goto label_BFC2D54C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045540u); - } -label_BFC2D540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2D540: 15E10002 bne $t7, $at, 0xBFC2D54C */ - uint32_t psx_brA_BFC2D540 = cpu->gpr[15]; uint32_t psx_brB_BFC2D540 = cpu->gpr[1]; - psx_taken_BFC2D540 = (psx_brA_BFC2D540 != psx_brB_BFC2D540); - psx_delay_BFC2D540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D544: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045544u); -#endif - if (psx_delay_BFC2D540) { - psx_delay_BFC2D540 = 0; - if (psx_taken_BFC2D540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004554Cu); - goto label_BFC2D54C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045548u); - } -label_BFC2D548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D548: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80045548u); return; -#ifdef PSX_COSIM - cosim_instr(0x80045548u); -#endif -label_BFC2D54C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D54Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D54C: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000102u); -#endif - /* 0xBFC2D550: 0118082A slt $at, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0118082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D554: 10200033 beq $at, $zero, 0xBFC2D624 */ - uint32_t psx_brA_BFC2D554 = cpu->gpr[1]; uint32_t psx_brB_BFC2D554 = cpu->gpr[0]; - psx_taken_BFC2D554 = (psx_brA_BFC2D554 == psx_brB_BFC2D554); - psx_delay_BFC2D554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D558: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045558u); -#endif - if (psx_delay_BFC2D554) { - psx_delay_BFC2D554 = 0; - if (psx_taken_BFC2D554) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045624u); - goto label_BFC2D624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004555Cu); - } -label_BFC2D55C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D55Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004555Cu); -#endif - /* 0xBFC2D55C: 8FD90680 lw $t9, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004555Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40000000u); } - PGXP_LOAD(0x8FD90680u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004555Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D560: 00156880 sll $t5, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00156880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC2D564: 27290001 addiu $t1, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000200u); -#endif - /* 0xBFC2D568: AFC90680 sw $t1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045568u); return; } g_debug_last_store_pc = 0x80045568u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFC90680u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045568u); -#endif - /* 0xBFC2D56C: 8FAB00AC lw $t3, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004556Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00ACu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D570: 01B56821 addu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[21]; - PGXP_ALU(0x01B56821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D574: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D578: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D57C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004557Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D580: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D584: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D588: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D58C: 001550C0 sll $t2, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001550C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004558Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045590u); -#endif - /* 0xBFC2D590: 8FC30680 lw $v1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045590u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30680u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D594: 01555023 subu $t2, $t2, $s5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[21]; - PGXP_ALU(0x01555023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D598: 01B56821 addu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[21]; - PGXP_ALU(0x01B56821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2D59C: 018B6021 addu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[11]; - PGXP_ALU(0x018B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004559Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D5A0: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800455A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D5A4: 000D6940 sll $t5, $t5, 5 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 5u; - PGXP_ALU(0x000D6940u, cpu->gpr[13], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800455A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D5A8: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800455A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D5AC: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800455ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D5B0: 25EF0FE4 addiu $t7, $t7, 4068 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (4068)); - PGXP_ALU(0x25EF0FE4u, cpu->gpr[15], _pgx1, 0x00000FE4u); } -#ifdef PSX_COSIM - cosim_instr(0x800455B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000410u); -#endif - /* 0xBFC2D5B4: 03CA2021 addu $a0, $fp, $t2 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[10]; - PGXP_ALU(0x03CA2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC2D5B8: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC2D5BC: 0062082A slt $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC2D5C0: 01CF2821 addu $a1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D5C4: 14200004 bne $at, $zero, 0xBFC2D5D8 */ - uint32_t psx_brA_BFC2D5C4 = cpu->gpr[1]; uint32_t psx_brB_BFC2D5C4 = cpu->gpr[0]; - psx_taken_BFC2D5C4 = (psx_brA_BFC2D5C4 != psx_brB_BFC2D5C4); - psx_delay_BFC2D5C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2D5C8: 2484003C addiu $a0, $a0, 60 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (60)); - PGXP_ALU(0x2484003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800455C8u); -#endif - if (psx_delay_BFC2D5C4) { - psx_delay_BFC2D5C4 = 0; - if (psx_taken_BFC2D5C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800455D8u); - goto label_BFC2D5D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800455CCu); - } -label_BFC2D5CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D5CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2D5CC: AFC00680 sw $zero, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800455CCu); return; } g_debug_last_store_pc = 0x800455CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFC00680u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800455CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455D0u); -#endif - /* 0xBFC2D5D0: 8FC30680 lw $v1, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800455D0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30680u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800455D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D5D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800455D4u); -#endif -label_BFC2D5D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D5D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2D5D8: 0003C0C0 sll $t8, $v1, 3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 3u; - PGXP_ALU(0x0003C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800455D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2D5DC: 0303C023 subu $t8, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[3]; - PGXP_ALU(0x0303C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D5E0: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800455E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000120u); -#endif - /* 0xBFC2D5E4: 00B84021 addu $t0, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B84021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D5E8: 2519006C addiu $t9, $t0, 108 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (108)); - PGXP_ALU(0x2519006Cu, cpu->gpr[25], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800455E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC2D5EC: 00804821 addu $t1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800455ECu); -#endif -label_BFC2D5F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D5F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800455F0u); -#endif - /* 0xBFC2D5F0: 8D010000 lw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800455F0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x100u); } - PGXP_LOAD(0x8D010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800455F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D5F4: 2508000C addiu $t0, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (12)); - PGXP_ALU(0x2508000Cu, cpu->gpr[8], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800455F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D5F8: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800455F8u); return; } g_debug_last_store_pc = 0x800455F8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800455F8u); -#endif - /* 0xBFC2D5FC: 8D01FFF8 lw $at, -8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800455FCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x100u); } - PGXP_LOAD(0x8D01FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x800455FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D600: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D604: AD21FFF8 sw $at, -8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045604u); return; } g_debug_last_store_pc = 0x80045604u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045604u); -#endif - /* 0xBFC2D608: 8D01FFFC lw $at, -4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045608u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x100u); } - PGXP_LOAD(0x8D01FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D60C: 1519FFF8 bne $t0, $t9, 0xBFC2D5F0 */ - uint32_t psx_brA_BFC2D60C = cpu->gpr[8]; uint32_t psx_brB_BFC2D60C = cpu->gpr[25]; - psx_taken_BFC2D60C = (psx_brA_BFC2D60C != psx_brB_BFC2D60C); - psx_delay_BFC2D60C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D610: AD21FFFC sw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045610u); return; } g_debug_last_store_pc = 0x80045610u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045610u); -#endif - if (psx_delay_BFC2D60C) { - psx_delay_BFC2D60C = 0; - if (psx_taken_BFC2D60C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800455F0u); - goto label_BFC2D5F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045614u); - } -label_BFC2D614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045614u); -#endif - /* 0xBFC2D614: 8D010000 lw $at, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045614u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x100u); } - PGXP_LOAD(0x8D010000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80045614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D618: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2D61C: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004561Cu); return; } g_debug_last_store_pc = 0x8004561Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x8004561Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2D620: AFC0067C sw $zero, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045620u); return; } g_debug_last_store_pc = 0x80045620u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFC0067Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045620u); -#endif -label_BFC2D624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045624u); -#endif - /* 0xBFC2D624: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045624u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80045624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D628: 001550C0 sll $t2, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001550C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200400u); -#endif - /* 0xBFC2D62C: 01555023 subu $t2, $t2, $s5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[21]; - PGXP_ALU(0x01555023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D630: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100410u); -#endif - /* 0xBFC2D634: 028A2021 addu $a0, $s4, $t2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[10]; - PGXP_ALU(0x028A2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D638: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2D63C: 04A10002 bgez $a1, 0xBFC2D648 */ - uint32_t psx_brA_BFC2D63C = cpu->gpr[5]; - psx_taken_BFC2D63C = ((int32_t)psx_brA_BFC2D63C >= 0); - psx_delay_BFC2D63C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC2D640: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045640u); -#endif - if (psx_delay_BFC2D63C) { - psx_delay_BFC2D63C = 0; - if (psx_taken_BFC2D63C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045648u); - goto label_BFC2D648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045644u); - } -label_BFC2D644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D644: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045644u); -#endif -label_BFC2D648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2D648: 00012843 sra $a1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00012843u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80045648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2D64C: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D650: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045658u; /* jal link before delay slot */ - psx_delay_BFC2D650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2D654: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045654u); -#endif - if (psx_delay_BFC2D650) { - psx_delay_BFC2D650 = 0; - cpu->gpr[31] = 0x80045658u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2D658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D658: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045658u); -#endif - /* 0xBFC2D65C: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004565Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045660u); -#endif - /* 0xBFC2D660: 8FC2002C lw $v0, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045660u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D664: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2D668: 304B0010 andi $t3, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80045668u); -#endif -label_BFC2D66C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D66Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2D66C: 116000CB beq $t3, $zero, 0xBFC2D99C */ - uint32_t psx_brA_BFC2D66C = cpu->gpr[11]; uint32_t psx_brB_BFC2D66C = cpu->gpr[0]; - psx_taken_BFC2D66C = (psx_brA_BFC2D66C == psx_brB_BFC2D66C); - psx_delay_BFC2D66C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045670u); -#endif - /* 0xBFC2D670: 8FAE00AC lw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045670u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045670u); -#endif - if (psx_delay_BFC2D66C) { - psx_delay_BFC2D66C = 0; - if (psx_taken_BFC2D66C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004599Cu); - goto label_BFC2D99C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045674u); - } -label_BFC2D674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045674u); -#endif - /* 0xBFC2D674: 8FC40004 lw $a0, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045674u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000000u); } - PGXP_LOAD(0x8FC40004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80045674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2D678: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D67C: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x80045684u; /* jal link before delay slot */ - psx_delay_BFC2D67C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2D680: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045680u); -#endif - if (psx_delay_BFC2D67C) { - psx_delay_BFC2D67C = 0; - cpu->gpr[31] = 0x80045684u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC2D684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2D684: 18400012 blez $v0, 0xBFC2D6D0 */ - uint32_t psx_brA_BFC2D684 = cpu->gpr[2]; - psx_taken_BFC2D684 = ((int32_t)psx_brA_BFC2D684 <= 0); - psx_delay_BFC2D684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045688u); -#endif - if (psx_delay_BFC2D684) { - psx_delay_BFC2D684 = 0; - if (psx_taken_BFC2D684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456D0u); - goto label_BFC2D6D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004568Cu); - } -label_BFC2D68C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D68Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004568Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2D68C: 240D0020 addiu $t5, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240D0020u, cpu->gpr[13], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004568Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC2D690: 01A2001A div $t5, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[13]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01A2001Au, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80045690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D694: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045694u); -#endif - /* 0xBFC2D698: 8D8C834C lw $t4, -31924($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -31924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-31924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045698u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C834Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2D69C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004569Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC2D6A0: 018E7823 subu $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] - cpu->gpr[14]; - PGXP_ALU(0x018E7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800456A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D6A4: 14400002 bne $v0, $zero, 0xBFC2D6B0 */ - uint32_t psx_brA_BFC2D6A4 = cpu->gpr[2]; uint32_t psx_brB_BFC2D6A4 = cpu->gpr[0]; - psx_taken_BFC2D6A4 = (psx_brA_BFC2D6A4 != psx_brB_BFC2D6A4); - psx_delay_BFC2D6A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D6A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800456A8u); -#endif - if (psx_delay_BFC2D6A4) { - psx_delay_BFC2D6A4 = 0; - if (psx_taken_BFC2D6A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456B0u); - goto label_BFC2D6B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456ACu); - } -label_BFC2D6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D6AC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800456ACu); return; -#ifdef PSX_COSIM - cosim_instr(0x800456ACu); -#endif -label_BFC2D6B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D6B0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800456B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2D6B4: 14410004 bne $v0, $at, 0xBFC2D6C8 */ - uint32_t psx_brA_BFC2D6B4 = cpu->gpr[2]; uint32_t psx_brB_BFC2D6B4 = cpu->gpr[1]; - psx_taken_BFC2D6B4 = (psx_brA_BFC2D6B4 != psx_brB_BFC2D6B4); - psx_delay_BFC2D6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D6B8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800456B8u); -#endif - if (psx_delay_BFC2D6B4) { - psx_delay_BFC2D6B4 = 0; - if (psx_taken_BFC2D6B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456C8u); - goto label_BFC2D6C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456BCu); - } -label_BFC2D6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2D6BC: 15A10002 bne $t5, $at, 0xBFC2D6C8 */ - uint32_t psx_brA_BFC2D6BC = cpu->gpr[13]; uint32_t psx_brB_BFC2D6BC = cpu->gpr[1]; - psx_taken_BFC2D6BC = (psx_brA_BFC2D6BC != psx_brB_BFC2D6BC); - psx_delay_BFC2D6BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D6C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800456C0u); -#endif - if (psx_delay_BFC2D6BC) { - psx_delay_BFC2D6BC = 0; - if (psx_taken_BFC2D6BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456C8u); - goto label_BFC2D6C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456C4u); - } -label_BFC2D6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2D6C4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800456C4u); return; -#ifdef PSX_COSIM - cosim_instr(0x800456C4u); -#endif -label_BFC2D6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D6C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800456C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2D6CC: AC2F834C sw $t7, -31924($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800456CCu); return; } g_debug_last_store_pc = 0x800456CCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F834Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800456CCu); -#endif -label_BFC2D6D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D6D0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800456D0u); -#endif - /* 0xBFC2D6D4: 8F18834C lw $t8, -31924($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -31924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-31924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800456D4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18834Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800456D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D6D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800456D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D6DC: 0701008C bgez $t8, 0xBFC2D910 */ - uint32_t psx_brA_BFC2D6DC = cpu->gpr[24]; - psx_taken_BFC2D6DC = ((int32_t)psx_brA_BFC2D6DC >= 0); - psx_delay_BFC2D6DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456E0u); -#endif - /* 0xBFC2D6E0: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800456E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800456E0u); -#endif - if (psx_delay_BFC2D6DC) { - psx_delay_BFC2D6DC = 0; - if (psx_taken_BFC2D6DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045910u); - goto label_BFC2D910; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800456E4u); - } -label_BFC2D6E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D6E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D6E4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800456E4u); -#endif - /* 0xBFC2D6E8: 8F398320 lw $t9, -31968($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800456E8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F398320u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800456E8u); -#endif - /* 0xBFC2D6EC: 8FC30004 lw $v1, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800456ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800456ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800456F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D6F0: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800456F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D6F4: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800456F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D6F8: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800456F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D6FC: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800456FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D700: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D704: 3C098011 lui $t1, 0x8011 */ - cpu->gpr[9] = 0x80110000u; - PGXP_ALU(0x3C098011u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2D708: 240B1000 addiu $t3, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240B1000u, cpu->gpr[11], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80045708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D70C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2D710: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D714: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2D718: AC2B834C sw $t3, -31924($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045718u); return; } g_debug_last_store_pc = 0x80045718u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B834Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D71C: 25290EC8 addiu $t1, $t1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (3784)); - PGXP_ALU(0x25290EC8u, cpu->gpr[9], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10009u); -#endif - /* 0xBFC2D720: 00608021 addu $s0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00608021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2D724: 2A01003C slti $at, $s0, 60 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0); - PGXP_ALU(0x2A01003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC2D728: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D72C: 10200006 beq $at, $zero, 0xBFC2D748 */ - uint32_t psx_brA_BFC2D72C = cpu->gpr[1]; uint32_t psx_brB_BFC2D72C = cpu->gpr[0]; - psx_taken_BFC2D72C = (psx_brA_BFC2D72C == psx_brB_BFC2D72C); - psx_delay_BFC2D72C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC2D730: AFAA0054 sw $t2, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045730u); return; } g_debug_last_store_pc = 0x80045730u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0054u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045730u); -#endif - if (psx_delay_BFC2D72C) { - psx_delay_BFC2D72C = 0; - if (psx_taken_BFC2D72C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045748u); - goto label_BFC2D748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045734u); - } -label_BFC2D734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2D734: 240D002D addiu $t5, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x240D002Du, cpu->gpr[13], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80045734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC2D738: AFAD0094 sw $t5, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045738u); return; } g_debug_last_store_pc = 0x80045738u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0094u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D73C: 2402001E addiu $v0, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x2402001Eu, cpu->gpr[2], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8004573Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D740: 10000005 beq $zero, $zero, 0xBFC2D758 */ - uint32_t psx_brA_BFC2D740 = cpu->gpr[0]; uint32_t psx_brB_BFC2D740 = cpu->gpr[0]; - psx_taken_BFC2D740 = (psx_brA_BFC2D740 == psx_brB_BFC2D740); - psx_delay_BFC2D740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2D744: 0000A021 addu $s4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045744u); -#endif - if (psx_delay_BFC2D740) { - psx_delay_BFC2D740 = 0; - if (psx_taken_BFC2D740) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045758u); - goto label_BFC2D758; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045748u); - } -label_BFC2D748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2D748: 240C004B addiu $t4, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x240C004Bu, cpu->gpr[12], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80045748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC2D74C: AFAC0094 sw $t4, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004574Cu); return; } g_debug_last_store_pc = 0x8004574Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0094u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004574Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2D750: 2402003C addiu $v0, $zero, 60 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (60)); - PGXP_ALU(0x2402003Cu, cpu->gpr[2], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2D754: 24140001 addiu $s4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24140001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045754u); -#endif -label_BFC2D758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC2D758: 0050082A slt $at, $v0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0050082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D75C: 10200009 beq $at, $zero, 0xBFC2D784 */ - uint32_t psx_brA_BFC2D75C = cpu->gpr[1]; uint32_t psx_brB_BFC2D75C = cpu->gpr[0]; - psx_taken_BFC2D75C = (psx_brA_BFC2D75C == psx_brB_BFC2D75C); - psx_delay_BFC2D75C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC2D760: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045760u); -#endif - if (psx_delay_BFC2D75C) { - psx_delay_BFC2D75C = 0; - if (psx_taken_BFC2D75C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045784u); - goto label_BFC2D784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045764u); - } -label_BFC2D764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D764: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x8004576Cu; /* jal link before delay slot */ - psx_delay_BFC2D764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2D768: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045768u); -#endif - if (psx_delay_BFC2D764) { - psx_delay_BFC2D764 = 0; - cpu->gpr[31] = 0x8004576Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC2D76C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D76Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004576Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2D76C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004576Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30002u); -#endif - /* 0xBFC2D770: 0230082A slt $at, $s1, $s0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0230082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D774: 1420FFFB bne $at, $zero, 0xBFC2D764 */ - uint32_t psx_brA_BFC2D774 = cpu->gpr[1]; uint32_t psx_brB_BFC2D774 = cpu->gpr[0]; - psx_taken_BFC2D774 = (psx_brA_BFC2D774 != psx_brB_BFC2D774); - psx_delay_BFC2D774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC2D778: 02429021 addu $s2, $s2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[2]; - PGXP_ALU(0x02429021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045778u); -#endif - if (psx_delay_BFC2D774) { - psx_delay_BFC2D774 = 0; - if (psx_taken_BFC2D774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045764u); - goto label_BFC2D764; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004577Cu); - } -label_BFC2D77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004577Cu); -#endif - /* 0xBFC2D77C: 8FC30004 lw $v1, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004577Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000000u); } - PGXP_LOAD(0x8FC30004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D780: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045780u); -#endif -label_BFC2D784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D784: 0C011429 jal 0xB00450A4 */ - cpu->gpr[31] = 0x8004578Cu; /* jal link before delay slot */ - psx_delay_BFC2D784 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2D788: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045788u); -#endif - if (psx_delay_BFC2D784) { - psx_delay_BFC2D784 = 0; - cpu->gpr[31] = 0x8004578Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800450A4u); - cpu->pc = 0x800450A4u; return; - } -label_BFC2D78C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D78Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004578Cu); -#endif - /* 0xBFC2D78C: 8FAE0094 lw $t6, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004578Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0094u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC2D790: 26110001 addiu $s1, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2D794: 25CFFFFF addiu $t7, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18002u); -#endif - /* 0xBFC2D798: 020F082A slt $at, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D79C: 1020004B beq $at, $zero, 0xBFC2D8CC */ - uint32_t psx_brA_BFC2D79C = cpu->gpr[1]; uint32_t psx_brB_BFC2D79C = cpu->gpr[0]; - psx_taken_BFC2D79C = (psx_brA_BFC2D79C == psx_brB_BFC2D79C); - psx_delay_BFC2D79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D7A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800457A0u); -#endif - if (psx_delay_BFC2D79C) { - psx_delay_BFC2D79C = 0; - if (psx_taken_BFC2D79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458CCu); - goto label_BFC2D8CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800457A4u); - } -label_BFC2D7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2D7A4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457A4u); -#endif -label_BFC2D7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D7A8: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x800457B0u; /* jal link before delay slot */ - psx_delay_BFC2D7A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2D7AC: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457ACu); -#endif - if (psx_delay_BFC2D7A8) { - psx_delay_BFC2D7A8 = 0; - cpu->gpr[31] = 0x800457B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC2D7B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2D7B0: 18400041 blez $v0, 0xBFC2D8B8 */ - uint32_t psx_brA_BFC2D7B0 = cpu->gpr[2]; - psx_taken_BFC2D7B0 = ((int32_t)psx_brA_BFC2D7B0 <= 0); - psx_delay_BFC2D7B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC2D7B4: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457B4u); -#endif - if (psx_delay_BFC2D7B0) { - psx_delay_BFC2D7B0 = 0; - if (psx_taken_BFC2D7B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458B8u); - goto label_BFC2D8B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800457B8u); - } -label_BFC2D7B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D7B8: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x800457C0u; /* jal link before delay slot */ - psx_delay_BFC2D7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2D7BC: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457BCu); -#endif - if (psx_delay_BFC2D7B8) { - psx_delay_BFC2D7B8 = 0; - cpu->gpr[31] = 0x800457C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2D7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D7C0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800457C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2D7C4: 1041003D beq $v0, $at, 0xBFC2D8BC */ - uint32_t psx_brA_BFC2D7C4 = cpu->gpr[2]; uint32_t psx_brB_BFC2D7C4 = cpu->gpr[1]; - psx_taken_BFC2D7C4 = (psx_brA_BFC2D7C4 == psx_brB_BFC2D7C4); - psx_delay_BFC2D7C4 = 1; - /* 0xBFC2D7C8: 8FAF0094 lw $t7, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800457C8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0094u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800457C8u); -#endif - if (psx_delay_BFC2D7C4) { - psx_delay_BFC2D7C4 = 0; - if (psx_taken_BFC2D7C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458BCu); - goto label_BFC2D8BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800457CCu); - } -label_BFC2D7CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D7CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2D7CC: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800457CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2D7D0: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D7D4: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800457D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2D7D8: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC2D7DC: 00146900 sll $t5, $s4, 4 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[20] << 4u; - PGXP_ALU(0x00146900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800457DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D7E0: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800457E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102000u); -#endif - /* 0xBFC2D7E4: 01B46823 subu $t5, $t5, $s4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[20]; - PGXP_ALU(0x01B46823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2D7E8: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800457E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D7EC: 3C198011 lui $t9, 0x8011 */ - cpu->gpr[25] = 0x80110000u; - PGXP_ALU(0x3C198011u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800457ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800457F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D7F0: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800457F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC2D7F4: 00126080 sll $t4, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[12] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00126080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800457F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D7F8: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800457F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2D7FC: 27390EC8 addiu $t9, $t9, 3784 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (3784)); - PGXP_ALU(0x27390EC8u, cpu->gpr[25], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800457FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D800: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D804: 25EF6BC4 addiu $t7, $t7, 27588 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (27588)); - PGXP_ALU(0x25EF6BC4u, cpu->gpr[15], _pgx1, 0x00006BC4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC2D808: 01AC7021 addu $t6, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC2D80C: 03193021 addu $a2, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03193021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004580Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2D810: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC2D814: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045814u); -#endif - /* 0xBFC2D818: 84780000 lh $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80045818u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2D81C: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004581Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D820: 3C0A800F lui $t2, 0x800F */ - cpu->gpr[10] = 0x800F0000u; - PGXP_ALU(0x3C0A800Fu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D824: 254AD2A0 addiu $t2, $t2, -11616 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-11616)); - PGXP_ALU(0x254AD2A0u, cpu->gpr[10], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80045824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D828: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2D82C: 2628FFFF addiu $t0, $s1, -1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); - PGXP_ALU(0x2628FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004582Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x620u); -#endif - /* 0xBFC2D830: 012A2821 addu $a1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2D834: 27190019 addiu $t9, $t8, 25 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (25)); - PGXP_ALU(0x27190019u, cpu->gpr[25], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x80045834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC2D838: ACC80004 sw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045838u); return; } g_debug_last_store_pc = 0x80045838u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC2D83C: ACB90008 sw $t9, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004583Cu); return; } g_debug_last_store_pc = 0x8004583Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACB90008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004583Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045840u); -#endif - /* 0xBFC2D840: 8CC4000C lw $a0, 12($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045840u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40u); } - PGXP_LOAD(0x8CC4000Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80045840u); -#endif - /* 0xBFC2D844: 84680002 lh $t0, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80045844u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x84680002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045844u); -#endif - /* 0xBFC2D848: 8CAA0008 lw $t2, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045848u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045848u); -#endif - /* 0xBFC2D84C: 8CCB0010 lw $t3, 16($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004584Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004584Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D850: 25090019 addiu $t1, $t0, 25 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (25)); - PGXP_ALU(0x25090019u, cpu->gpr[9], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x80045850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x412u); -#endif - /* 0xBFC2D854: 008A082A slt $at, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x008A082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC2D858: ACA9000C sw $t1, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045858u); return; } g_debug_last_store_pc = 0x80045858u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA9000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC2D85C: ACA40000 sw $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004585Cu); return; } g_debug_last_store_pc = 0x8004585Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004585Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2D860: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2D864: 24150001 addiu $s5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24150001u, cpu->gpr[21], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D868: 10200003 beq $at, $zero, 0xBFC2D878 */ - uint32_t psx_brA_BFC2D868 = cpu->gpr[1]; uint32_t psx_brB_BFC2D868 = cpu->gpr[0]; - psx_taken_BFC2D868 = (psx_brA_BFC2D868 == psx_brB_BFC2D868); - psx_delay_BFC2D868 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC2D86C: ACAB0004 sw $t3, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004586Cu); return; } g_debug_last_store_pc = 0x8004586Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACAB0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004586Cu); -#endif - if (psx_delay_BFC2D868) { - psx_delay_BFC2D868 = 0; - if (psx_taken_BFC2D868) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045878u); - goto label_BFC2D878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045870u); - } -label_BFC2D870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D870: 10000002 beq $zero, $zero, 0xBFC2D87C */ - uint32_t psx_brA_BFC2D870 = cpu->gpr[0]; uint32_t psx_brB_BFC2D870 = cpu->gpr[0]; - psx_taken_BFC2D870 = (psx_brA_BFC2D870 == psx_brB_BFC2D870); - psx_delay_BFC2D870 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400020u); -#endif - /* 0xBFC2D874: ACB60010 sw $s6, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045874u); return; } g_debug_last_store_pc = 0x80045874u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xACB60010u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80045874u); -#endif - if (psx_delay_BFC2D870) { - psx_delay_BFC2D870 = 0; - if (psx_taken_BFC2D870) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004587Cu); - goto label_BFC2D87C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045878u); - } -label_BFC2D878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800020u); -#endif - /* 0xBFC2D878: ACB70010 sw $s7, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045878u); return; } g_debug_last_store_pc = 0x80045878u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xACB70010u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80045878u); -#endif -label_BFC2D87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004587Cu); -#endif - /* 0xBFC2D87C: 8CAB000C lw $t3, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004587Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20u); } - PGXP_LOAD(0x8CAB000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045880u); -#endif - /* 0xBFC2D880: 8CAD0004 lw $t5, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045880u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x8CAD0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D884: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2802u); -#endif - /* 0xBFC2D888: 01AB082A slt $at, $t5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x01AB082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D88C: 10200003 beq $at, $zero, 0xBFC2D89C */ - uint32_t psx_brA_BFC2D88C = cpu->gpr[1]; uint32_t psx_brB_BFC2D88C = cpu->gpr[0]; - psx_taken_BFC2D88C = (psx_brA_BFC2D88C == psx_brB_BFC2D88C); - psx_delay_BFC2D88C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D890: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045890u); -#endif - if (psx_delay_BFC2D88C) { - psx_delay_BFC2D88C = 0; - if (psx_taken_BFC2D88C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004589Cu); - goto label_BFC2D89C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045894u); - } -label_BFC2D894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D894: 10000002 beq $zero, $zero, 0xBFC2D8A0 */ - uint32_t psx_brA_BFC2D894 = cpu->gpr[0]; uint32_t psx_brB_BFC2D894 = cpu->gpr[0]; - psx_taken_BFC2D894 = (psx_brA_BFC2D894 == psx_brB_BFC2D894); - psx_delay_BFC2D894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400020u); -#endif - /* 0xBFC2D898: ACB60014 sw $s6, 20($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045898u); return; } g_debug_last_store_pc = 0x80045898u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xACB60014u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80045898u); -#endif - if (psx_delay_BFC2D894) { - psx_delay_BFC2D894 = 0; - if (psx_taken_BFC2D894) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458A0u); - goto label_BFC2D8A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004589Cu); - } -label_BFC2D89C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D89Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004589Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800020u); -#endif - /* 0xBFC2D89C: ACB70014 sw $s7, 20($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004589Cu); return; } g_debug_last_store_pc = 0x8004589Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xACB70014u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004589Cu); -#endif -label_BFC2D8A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458A0u); -#endif - /* 0xBFC2D8A0: 8CCC002C lw $t4, 44($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458A0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800458A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2D8A4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800458A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90002u); -#endif - /* 0xBFC2D8A8: 0213082A slt $at, $s0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0213082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800458A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC2D8AC: 358E0040 ori $t6, $t4, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] | 0x40u; - PGXP_ALU(0x358E0040u, cpu->gpr[14], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x800458ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D8B0: 1420FFC1 bne $at, $zero, 0xBFC2D7B8 */ - uint32_t psx_brA_BFC2D8B0 = cpu->gpr[1]; uint32_t psx_brB_BFC2D8B0 = cpu->gpr[0]; - psx_taken_BFC2D8B0 = (psx_brA_BFC2D8B0 != psx_brB_BFC2D8B0); - psx_delay_BFC2D8B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC2D8B4: ACCE002C sw $t6, 44($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458B4u); return; } g_debug_last_store_pc = 0x800458B4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE002Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800458B4u); -#endif - if (psx_delay_BFC2D8B0) { - psx_delay_BFC2D8B0 = 0; - if (psx_taken_BFC2D8B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800457B8u); - goto label_BFC2D7B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458B8u); - } -label_BFC2D8B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458B8u); -#endif - /* 0xBFC2D8B8: 8FAF0094 lw $t7, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458B8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0094u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800458B8u); -#endif -label_BFC2D8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2D8BC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800458BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28002u); -#endif - /* 0xBFC2D8C0: 022F082A slt $at, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x022F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800458C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D8C4: 1420FFB8 bne $at, $zero, 0xBFC2D7A8 */ - uint32_t psx_brA_BFC2D8C4 = cpu->gpr[1]; uint32_t psx_brB_BFC2D8C4 = cpu->gpr[0]; - psx_taken_BFC2D8C4 = (psx_brA_BFC2D8C4 != psx_brB_BFC2D8C4); - psx_delay_BFC2D8C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC2D8C8: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800458C8u); -#endif - if (psx_delay_BFC2D8C4) { - psx_delay_BFC2D8C4 = 0; - if (psx_taken_BFC2D8C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800457A8u); - goto label_BFC2D7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458CCu); - } -label_BFC2D8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC2D8CC: 16A00002 bne $s5, $zero, 0xBFC2D8D8 */ - uint32_t psx_brA_BFC2D8CC = cpu->gpr[21]; uint32_t psx_brB_BFC2D8CC = cpu->gpr[0]; - psx_taken_BFC2D8CC = (psx_brA_BFC2D8CC != psx_brB_BFC2D8CC); - psx_delay_BFC2D8CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D8D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800458D0u); -#endif - if (psx_delay_BFC2D8CC) { - psx_delay_BFC2D8CC = 0; - if (psx_taken_BFC2D8CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458D8u); - goto label_BFC2D8D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458D4u); - } -label_BFC2D8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2D8D4: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458D4u); return; } g_debug_last_store_pc = 0x800458D4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800458D4u); -#endif -label_BFC2D8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458D8u); -#endif - /* 0xBFC2D8D8: 8FB80054 lw $t8, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458D8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80054u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800458D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D8DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800458DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458E0u); -#endif - /* 0xBFC2D8E0: 8F190004 lw $t9, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458E0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800458E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D8E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800458E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2D8E8: 17200003 bne $t9, $zero, 0xBFC2D8F8 */ - uint32_t psx_brA_BFC2D8E8 = cpu->gpr[25]; uint32_t psx_brB_BFC2D8E8 = cpu->gpr[0]; - psx_taken_BFC2D8E8 = (psx_brA_BFC2D8E8 != psx_brB_BFC2D8E8); - psx_delay_BFC2D8E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D8EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800458ECu); -#endif - if (psx_delay_BFC2D8E8) { - psx_delay_BFC2D8E8 = 0; - if (psx_taken_BFC2D8E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458F8u); - goto label_BFC2D8F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800458F0u); - } -label_BFC2D8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D8F0: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800458F8u; /* jal link before delay slot */ - psx_delay_BFC2D8F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2D8F4: 24040006 addiu $a0, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24040006u, cpu->gpr[4], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x800458F4u); -#endif - if (psx_delay_BFC2D8F0) { - psx_delay_BFC2D8F0 = 0; - cpu->gpr[31] = 0x800458F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2D8F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D8F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800458F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D8F8: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800458F8u); -#endif - /* 0xBFC2D8FC: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800458FCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800458FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D900: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D904: 10000272 beq $zero, $zero, 0xBFC2E2D0 */ - uint32_t psx_brA_BFC2D904 = cpu->gpr[0]; uint32_t psx_brB_BFC2D904 = cpu->gpr[0]; - psx_taken_BFC2D904 = (psx_brA_BFC2D904 == psx_brB_BFC2D904); - psx_delay_BFC2D904 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2D908: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045908u); -#endif - if (psx_delay_BFC2D904) { - psx_delay_BFC2D904 = 0; - if (psx_taken_BFC2D904) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D0u); - goto label_BFC2E2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004590Cu); - } -label_BFC2D90C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D90Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004590Cu); -#endif - /* 0xBFC2D90C: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004590Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004590Cu); -#endif -label_BFC2D910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D910: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D914: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D918: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D91C: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045920u); -#endif - /* 0xBFC2D920: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045920u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D924: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D928: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045928u); -#endif - /* 0xBFC2D92C: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004592Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D930: 3C0A8011 lui $t2, 0x8011 */ - cpu->gpr[10] = 0x80110000u; - PGXP_ALU(0x3C0A8011u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2D934: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2D938: 001558C0 sll $t3, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001558C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2D93C: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2D940: 254A0F04 addiu $t2, $t2, 3844 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (3844)); - PGXP_ALU(0x254A0F04u, cpu->gpr[10], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80045940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2D944: 01755823 subu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[21]; - PGXP_ALU(0x01755823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2D948: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100600u); -#endif - /* 0xBFC2D94C: 012AA021 addu $s4, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[20] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012AA021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004594Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100810u); -#endif - /* 0xBFC2D950: 028B2021 addu $a0, $s4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[11]; - PGXP_ALU(0x028B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2D954: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2D958: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D95C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045964u; /* jal link before delay slot */ - psx_delay_BFC2D95C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2D960: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045960u); -#endif - if (psx_delay_BFC2D95C) { - psx_delay_BFC2D95C = 0; - cpu->gpr[31] = 0x80045964u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2D964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2D964: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045964u); -#endif - /* 0xBFC2D968: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045968u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2D96C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004596Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045970u); -#endif - /* 0xBFC2D970: 8D8C834C lw $t4, -31924($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -31924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-31924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045970u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C834Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D974: 001568C0 sll $t5, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001568C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2D978: 01B56823 subu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[21]; - PGXP_ALU(0x01B56823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2D97C: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004597Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102010u); -#endif - /* 0xBFC2D980: 028D2021 addu $a0, $s4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[13]; - PGXP_ALU(0x028D2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1021u); -#endif - /* 0xBFC2D984: 01802821 addu $a1, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D988: 0C01122A jal 0xB00448A8 */ - cpu->gpr[31] = 0x80045990u; /* jal link before delay slot */ - psx_delay_BFC2D988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1041u); -#endif - /* 0xBFC2D98C: 01803021 addu $a2, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004598Cu); -#endif - if (psx_delay_BFC2D988) { - psx_delay_BFC2D988 = 0; - cpu->gpr[31] = 0x80045990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448A8u); - cpu->pc = 0x800448A8u; return; - } -label_BFC2D990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D990: 100001F2 beq $zero, $zero, 0xBFC2E15C */ - uint32_t psx_brA_BFC2D990 = cpu->gpr[0]; uint32_t psx_brB_BFC2D990 = cpu->gpr[0]; - psx_taken_BFC2D990 = (psx_brA_BFC2D990 == psx_brB_BFC2D990); - psx_delay_BFC2D990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045994u); -#endif - if (psx_delay_BFC2D990) { - psx_delay_BFC2D990 = 0; - if (psx_taken_BFC2D990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004615Cu); - goto label_BFC2E15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045998u); - } -label_BFC2D998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045998u); -#endif - /* 0xBFC2D998: 8FAE00AC lw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045998u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045998u); -#endif -label_BFC2D99C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D99Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D99C: 3C188011 lui $t8, 0x8011 */ - cpu->gpr[24] = 0x80110000u; - PGXP_ALU(0x3C188011u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004599Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2D9A0: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800459A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2D9A4: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D9A8: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800459A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2D9AC: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D9B0: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800459B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2D9B4: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2D9B8: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800459B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2D9BC: 27180F04 addiu $t8, $t8, 3844 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (3844)); - PGXP_ALU(0x27180F04u, cpu->gpr[24], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x800459BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC2D9C0: 30590020 andi $t9, $v0, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x20u; - PGXP_ALU(0x30590020u, cpu->gpr[25], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x800459C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2D9C4: 13200148 beq $t9, $zero, 0xBFC2DEE8 */ - uint32_t psx_brA_BFC2D9C4 = cpu->gpr[25]; uint32_t psx_brB_BFC2D9C4 = cpu->gpr[0]; - psx_taken_BFC2D9C4 = (psx_brA_BFC2D9C4 == psx_brB_BFC2D9C4); - psx_delay_BFC2D9C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1108000u); -#endif - /* 0xBFC2D9C8: 01F8A021 addu $s4, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[20] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459C8u); -#endif - if (psx_delay_BFC2D9C4) { - psx_delay_BFC2D9C4 = 0; - if (psx_taken_BFC2D9C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EE8u); - goto label_BFC2DEE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800459CCu); - } -label_BFC2D9CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D9CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459CCu); -#endif - /* 0xBFC2D9CC: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800459CCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800459CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC2D9D0: 001540C0 sll $t0, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001540C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800459D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC2D9D4: 01154023 subu $t0, $t0, $s5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[21]; - PGXP_ALU(0x01154023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2D9D8: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800459D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100110u); -#endif - /* 0xBFC2D9DC: 02882021 addu $a0, $s4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[8]; - PGXP_ALU(0x02882021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2D9E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800459E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2D9E4: 04A10002 bgez $a1, 0xBFC2D9F0 */ - uint32_t psx_brA_BFC2D9E4 = cpu->gpr[5]; - psx_taken_BFC2D9E4 = ((int32_t)psx_brA_BFC2D9E4 >= 0); - psx_delay_BFC2D9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC2D9E8: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459E8u); -#endif - if (psx_delay_BFC2D9E4) { - psx_delay_BFC2D9E4 = 0; - if (psx_taken_BFC2D9E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800459F0u); - goto label_BFC2D9F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800459ECu); - } -label_BFC2D9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2D9EC: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800459ECu); -#endif -label_BFC2D9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2D9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800459F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2D9F0: 00012843 sra $a1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00012843u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800459F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2D9F4: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2D9F8: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045A00u; /* jal link before delay slot */ - psx_delay_BFC2D9F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2D9FC: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800459FCu); -#endif - if (psx_delay_BFC2D9F8) { - psx_delay_BFC2D9F8 = 0; - cpu->gpr[31] = 0x80045A00u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2DA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2DA00: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045A00u); -#endif - /* 0xBFC2DA04: 8D299ECC lw $t1, -24884($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045A04u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299ECCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045A04u); -#endif - /* 0xBFC2DA08: 8FD00004 lw $s0, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045A08u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x40000000u); } - PGXP_LOAD(0x8FD00004u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80045A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DA0C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2DA10: 1521007D bne $t1, $at, 0xBFC2DC08 */ - uint32_t psx_brA_BFC2DA10 = cpu->gpr[9]; uint32_t psx_brB_BFC2DA10 = cpu->gpr[1]; - psx_taken_BFC2DA10 = (psx_brA_BFC2DA10 != psx_brB_BFC2DA10); - psx_delay_BFC2DA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DA14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045A14u); -#endif - if (psx_delay_BFC2DA10) { - psx_delay_BFC2DA10 = 0; - if (psx_taken_BFC2DA10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C08u); - goto label_BFC2DC08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A18u); - } -label_BFC2DA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DA18: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045A18u); -#endif - /* 0xBFC2DA1C: 8D4A9ED0 lw $t2, -24880($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045A1Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9ED0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DA20: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2DA24: 11410004 beq $t2, $at, 0xBFC2DA38 */ - uint32_t psx_brA_BFC2DA24 = cpu->gpr[10]; uint32_t psx_brB_BFC2DA24 = cpu->gpr[1]; - psx_taken_BFC2DA24 = (psx_brA_BFC2DA24 == psx_brB_BFC2DA24); - psx_delay_BFC2DA24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2DA28: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A28u); -#endif - if (psx_delay_BFC2DA24) { - psx_delay_BFC2DA24 = 0; - if (psx_taken_BFC2DA24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A38u); - goto label_BFC2DA38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A2Cu); - } -label_BFC2DA2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC2DA2C: 15500076 bne $t2, $s0, 0xBFC2DC08 */ - uint32_t psx_brA_BFC2DA2C = cpu->gpr[10]; uint32_t psx_brB_BFC2DA2C = cpu->gpr[16]; - psx_taken_BFC2DA2C = (psx_brA_BFC2DA2C != psx_brB_BFC2DA2C); - psx_delay_BFC2DA2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DA30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045A30u); -#endif - if (psx_delay_BFC2DA2C) { - psx_delay_BFC2DA2C = 0; - if (psx_taken_BFC2DA2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C08u); - goto label_BFC2DC08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A34u); - } -label_BFC2DA34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2DA34: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A34u); -#endif -label_BFC2DA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DA38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2DA3C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A40u); -#endif - /* 0xBFC2DA40: 8DAD9ED0 lw $t5, -24880($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045A40u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9ED0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2DA44: AC2B9EC8 sw $t3, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045A44u); return; } g_debug_last_store_pc = 0x80045A44u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9EC8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DA48: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2DA4C: 15A10054 bne $t5, $at, 0xBFC2DBA0 */ - uint32_t psx_brA_BFC2DA4C = cpu->gpr[13]; uint32_t psx_brB_BFC2DA4C = cpu->gpr[1]; - psx_taken_BFC2DA4C = (psx_brA_BFC2DA4C != psx_brB_BFC2DA4C); - psx_delay_BFC2DA4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2DA50: 2A01003C slti $at, $s0, 60 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (60) ? 1 : 0); - PGXP_ALU(0x2A01003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045A50u); -#endif - if (psx_delay_BFC2DA4C) { - psx_delay_BFC2DA4C = 0; - if (psx_taken_BFC2DA4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045BA0u); - goto label_BFC2DBA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A54u); - } -label_BFC2DA54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DA54: 10200006 beq $at, $zero, 0xBFC2DA70 */ - uint32_t psx_brA_BFC2DA54 = cpu->gpr[1]; uint32_t psx_brB_BFC2DA54 = cpu->gpr[0]; - psx_taken_BFC2DA54 = (psx_brA_BFC2DA54 == psx_brB_BFC2DA54); - psx_delay_BFC2DA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2DA58: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A58u); -#endif - if (psx_delay_BFC2DA54) { - psx_delay_BFC2DA54 = 0; - if (psx_taken_BFC2DA54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A70u); - goto label_BFC2DA70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A5Cu); - } -label_BFC2DA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2DA5C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2DA60: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DA64: 10000004 beq $zero, $zero, 0xBFC2DA78 */ - uint32_t psx_brA_BFC2DA64 = cpu->gpr[0]; uint32_t psx_brB_BFC2DA64 = cpu->gpr[0]; - psx_taken_BFC2DA64 = (psx_brA_BFC2DA64 == psx_brB_BFC2DA64); - psx_delay_BFC2DA64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC2DA68: 2612FFE2 addiu $s2, $s0, -30 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[16] + (-30)); - PGXP_ALU(0x2612FFE2u, cpu->gpr[18], _pgx1, 0xFFFFFFE2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A68u); -#endif - if (psx_delay_BFC2DA64) { - psx_delay_BFC2DA64 = 0; - if (psx_taken_BFC2DA64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A78u); - goto label_BFC2DA78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045A6Cu); - } -label_BFC2DA6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2DA6C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A6Cu); -#endif -label_BFC2DA70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2DA70: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC2DA74: 2612FFC4 addiu $s2, $s0, -60 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[16] + (-60)); - PGXP_ALU(0x2612FFC4u, cpu->gpr[18], _pgx1, 0xFFFFFFC4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A74u); -#endif -label_BFC2DA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC2DA78: 00036080 sll $t4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC2DA7C: 01836023 subu $t4, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[3]; - PGXP_ALU(0x01836023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2DA80: 00127880 sll $t7, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00127880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2DA84: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2DA88: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC2DA8C: 01836023 subu $t4, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[3]; - PGXP_ALU(0x01836023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DA90: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2DA94: 3C0E800F lui $t6, 0x800F */ - cpu->gpr[14] = 0x800F0000u; - PGXP_ALU(0x3C0E800Fu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2DA98: 25CEDBA0 addiu $t6, $t6, -9312 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-9312)); - PGXP_ALU(0x25CEDBA0u, cpu->gpr[14], _pgx1, 0xFFFFDBA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80045A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2DA9C: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2DAA0: 000C6180 sll $t4, $t4, 6 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 6u; - PGXP_ALU(0x000C6180u, cpu->gpr[12], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85000u); -#endif - /* 0xBFC2DAA4: 018E9821 addu $s3, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[19] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DAA8: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88004u); -#endif - /* 0xBFC2DAAC: 026F1021 addu $v0, $s3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[15]; - PGXP_ALU(0x026F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AB0u); -#endif - /* 0xBFC2DAB0: 8C460070 lw $a2, 112($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045AB0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x8C460070u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80045AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DAB4: 0C00EF4F jal 0xB003BD3C */ - cpu->gpr[31] = 0x80045ABCu; /* jal link before delay slot */ - psx_delay_BFC2DAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2DAB8: 24450078 addiu $a1, $v0, 120 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (120)); - PGXP_ALU(0x24450078u, cpu->gpr[5], _pgx1, 0x00000078u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AB8u); -#endif - if (psx_delay_BFC2DAB4) { - psx_delay_BFC2DAB4 = 0; - cpu->gpr[31] = 0x80045ABCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003BD3Cu); - cpu->pc = 0x8003BD3Cu; return; - } -label_BFC2DABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DABC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2DAC0: 1041000A beq $v0, $at, 0xBFC2DAEC */ - uint32_t psx_brA_BFC2DAC0 = cpu->gpr[2]; uint32_t psx_brB_BFC2DAC0 = cpu->gpr[1]; - psx_taken_BFC2DAC0 = (psx_brA_BFC2DAC0 == psx_brB_BFC2DAC0); - psx_delay_BFC2DAC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DAC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045AC4u); -#endif - if (psx_delay_BFC2DAC0) { - psx_delay_BFC2DAC0 = 0; - if (psx_taken_BFC2DAC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045AECu); - goto label_BFC2DAEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045AC8u); - } -label_BFC2DAC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DAC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2DAC8: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DACC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AD0u); -#endif - /* 0xBFC2DAD0: 8C846BB8 lw $a0, 27576($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 27576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (27576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045AD0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C846BB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80045AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DAD4: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80045ADCu; /* jal link before delay slot */ - psx_delay_BFC2DAD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC2DAD8: AC309ED0 sw $s0, -24880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045AD8u); return; } g_debug_last_store_pc = 0x80045AD8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309ED0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80045AD8u); -#endif - if (psx_delay_BFC2DAD4) { - psx_delay_BFC2DAD4 = 0; - cpu->gpr[31] = 0x80045ADCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2DADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DADC: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x80045AE4u; /* jal link before delay slot */ - psx_delay_BFC2DADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2DAE0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AE0u); -#endif - if (psx_delay_BFC2DADC) { - psx_delay_BFC2DADC = 0; - cpu->gpr[31] = 0x80045AE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC2DAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DAE4: 1000002C beq $zero, $zero, 0xBFC2DB98 */ - uint32_t psx_brA_BFC2DAE4 = cpu->gpr[0]; uint32_t psx_brB_BFC2DAE4 = cpu->gpr[0]; - psx_taken_BFC2DAE4 = (psx_brA_BFC2DAE4 == psx_brB_BFC2DAE4); - psx_delay_BFC2DAE4 = 1; - /* 0xBFC2DAE8: 8FAA00AC lw $t2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045AE8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045AE8u); -#endif - if (psx_delay_BFC2DAE4) { - psx_delay_BFC2DAE4 = 0; - if (psx_taken_BFC2DAE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B98u); - goto label_BFC2DB98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045AECu); - } -label_BFC2DAEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DAECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2DAEC: 3C028011 lui $v0, 0x8011 */ - cpu->gpr[2] = 0x80110000u; - PGXP_ALU(0x3C028011u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DAF0: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DAF4: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2DAF8: 24420EC8 addiu $v0, $v0, 3784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (3784)); - PGXP_ALU(0x24420EC8u, cpu->gpr[2], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2DAFC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045AFCu); -#endif -label_BFC2DB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B00u); -#endif - /* 0xBFC2DB00: 8C58002C lw $t8, 44($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B00u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C58002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DB04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2DB08: 33190020 andi $t9, $t8, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x20u; - PGXP_ALU(0x33190020u, cpu->gpr[25], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2DB0C: 13200002 beq $t9, $zero, 0xBFC2DB18 */ - uint32_t psx_brA_BFC2DB0C = cpu->gpr[25]; uint32_t psx_brB_BFC2DB0C = cpu->gpr[0]; - psx_taken_BFC2DB0C = (psx_brA_BFC2DB0C == psx_brB_BFC2DB0C); - psx_delay_BFC2DB0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DB10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045B10u); -#endif - if (psx_delay_BFC2DB0C) { - psx_delay_BFC2DB0C = 0; - if (psx_taken_BFC2DB0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B18u); - goto label_BFC2DB18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B14u); - } -label_BFC2DB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2DB14: AC400004 sw $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B14u); return; } g_debug_last_store_pc = 0x80045B14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B14u); -#endif -label_BFC2DB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2DB18: 24420688 addiu $v0, $v0, 1672 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1672)); - PGXP_ALU(0x24420688u, cpu->gpr[2], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2DB1C: 1446FFF8 bne $v0, $a2, 0xBFC2DB00 */ - uint32_t psx_brA_BFC2DB1C = cpu->gpr[2]; uint32_t psx_brB_BFC2DB1C = cpu->gpr[6]; - psx_taken_BFC2DB1C = (psx_brA_BFC2DB1C != psx_brB_BFC2DB1C); - psx_delay_BFC2DB1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC2DB20: 2A41000F slti $at, $s2, 15 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (15) ? 1 : 0); - PGXP_ALU(0x2A41000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80045B20u); -#endif - if (psx_delay_BFC2DB1C) { - psx_delay_BFC2DB1C = 0; - if (psx_taken_BFC2DB1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B00u); - goto label_BFC2DB00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B24u); - } -label_BFC2DB24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DB24: 10200013 beq $at, $zero, 0xBFC2DB74 */ - uint32_t psx_brA_BFC2DB24 = cpu->gpr[1]; uint32_t psx_brB_BFC2DB24 = cpu->gpr[0]; - psx_taken_BFC2DB24 = (psx_brA_BFC2DB24 == psx_brB_BFC2DB24); - psx_delay_BFC2DB24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC2DB28: 26510001 addiu $s1, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26510001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B28u); -#endif - if (psx_delay_BFC2DB24) { - psx_delay_BFC2DB24 = 0; - if (psx_taken_BFC2DB24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B74u); - goto label_BFC2DB74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B2Cu); - } -label_BFC2DB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2DB2C: 00114080 sll $t0, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2DB30: 01114023 subu $t0, $t0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[17]; - PGXP_ALU(0x01114023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DB34: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2DB38: 01114023 subu $t0, $t0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[17]; - PGXP_ALU(0x01114023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DB3C: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90100u); -#endif - /* 0xBFC2DB40: 02688021 addu $s0, $s3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[16] = cpu->gpr[19] + cpu->gpr[8]; - PGXP_ALU(0x02688021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045B40u); -#endif -label_BFC2DB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2DB44: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DB48: 0C010C8B jal 0xB004322C */ - cpu->gpr[31] = 0x80045B50u; /* jal link before delay slot */ - psx_delay_BFC2DB48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2DB4C: 2405005C addiu $a1, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2405005Cu, cpu->gpr[5], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045B4Cu); -#endif - if (psx_delay_BFC2DB48) { - psx_delay_BFC2DB48 = 0; - cpu->gpr[31] = 0x80045B50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004322Cu); - cpu->pc = 0x8004322Cu; return; - } -label_BFC2DB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2DB50: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC2DB54: 2A210010 slti $at, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (16) ? 1 : 0); - PGXP_ALU(0x2A210010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DB58: 10200004 beq $at, $zero, 0xBFC2DB6C */ - uint32_t psx_brA_BFC2DB58 = cpu->gpr[1]; uint32_t psx_brB_BFC2DB58 = cpu->gpr[0]; - psx_taken_BFC2DB58 = (psx_brA_BFC2DB58 == psx_brB_BFC2DB58); - psx_delay_BFC2DB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2DB5C: 2610005C addiu $s0, $s0, 92 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (92)); - PGXP_ALU(0x2610005Cu, cpu->gpr[16], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80045B5Cu); -#endif - if (psx_delay_BFC2DB58) { - psx_delay_BFC2DB58 = 0; - if (psx_taken_BFC2DB58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B6Cu); - goto label_BFC2DB6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B60u); - } -label_BFC2DB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DB60: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DB64: 1000FFF7 beq $zero, $zero, 0xBFC2DB44 */ - uint32_t psx_brA_BFC2DB64 = cpu->gpr[0]; uint32_t psx_brB_BFC2DB64 = cpu->gpr[0]; - psx_taken_BFC2DB64 = (psx_brA_BFC2DB64 == psx_brB_BFC2DB64); - psx_delay_BFC2DB64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DB68: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B68u); -#endif - if (psx_delay_BFC2DB64) { - psx_delay_BFC2DB64 = 0; - if (psx_taken_BFC2DB64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B44u); - goto label_BFC2DB44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B6Cu); - } -label_BFC2DB6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DB6C: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DB70: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045B70u); -#endif -label_BFC2DB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DB74: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DB78: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B78u); return; } g_debug_last_store_pc = 0x80045B78u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DB7C: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DB80: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2DB84: 2409FFFF addiu $t1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045B84u); -#endif - /* 0xBFC2DB88: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B88u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DB8C: 100001D0 beq $zero, $zero, 0xBFC2E2D0 */ - uint32_t psx_brA_BFC2DB8C = cpu->gpr[0]; uint32_t psx_brB_BFC2DB8C = cpu->gpr[0]; - psx_taken_BFC2DB8C = (psx_brA_BFC2DB8C == psx_brB_BFC2DB8C); - psx_delay_BFC2DB8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2DB90: AC299ECC sw $t1, -24884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B90u); return; } g_debug_last_store_pc = 0x80045B90u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299ECCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B90u); -#endif - if (psx_delay_BFC2DB8C) { - psx_delay_BFC2DB8C = 0; - if (psx_taken_BFC2DB8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D0u); - goto label_BFC2E2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045B94u); - } -label_BFC2DB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B94u); -#endif - /* 0xBFC2DB94: 8FAA00AC lw $t2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B94u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B94u); -#endif -label_BFC2DB98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DB98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DB98: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2DB9C: AC2A9DB0 sw $t2, -25168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045B9Cu); return; } g_debug_last_store_pc = 0x80045B9Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A9DB0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045B9Cu); -#endif -label_BFC2DBA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DBA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DBA0: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BA0u); -#endif - /* 0xBFC2DBA4: 8D6B9ED4 lw $t3, -24876($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24876; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045BA4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9ED4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DBA8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2DBAC: 15610011 bne $t3, $at, 0xBFC2DBF4 */ - uint32_t psx_brA_BFC2DBAC = cpu->gpr[11]; uint32_t psx_brB_BFC2DBAC = cpu->gpr[1]; - psx_taken_BFC2DBAC = (psx_brA_BFC2DBAC != psx_brB_BFC2DBAC); - psx_delay_BFC2DBAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DBB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045BB0u); -#endif - if (psx_delay_BFC2DBAC) { - psx_delay_BFC2DBAC = 0; - if (psx_taken_BFC2DBAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045BF4u); - goto label_BFC2DBF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045BB4u); - } -label_BFC2DBB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DBB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BB4u); -#endif - /* 0xBFC2DBB4: 8FAD00AC lw $t5, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045BB4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD00ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DBB8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2DBBC: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2DBC0: 3C0C8014 lui $t4, 0x8014 */ - cpu->gpr[12] = 0x80140000u; - PGXP_ALU(0x3C0C8014u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DBC4: 3C0F800F lui $t7, 0x800F */ - cpu->gpr[15] = 0x800F0000u; - PGXP_ALU(0x3C0F800Fu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2DBC8: AC2D9ECC sw $t5, -24884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045BC8u); return; } g_debug_last_store_pc = 0x80045BC8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9ECCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2DBCC: 01CD7023 subu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DBD0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2DBD4: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DBD8: 25EFD2A0 addiu $t7, $t7, -11616 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-11616)); - PGXP_ALU(0x25EFD2A0u, cpu->gpr[15], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80045BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2DBDC: 258CE3A8 addiu $t4, $t4, -7256 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-7256)); - PGXP_ALU(0x258CE3A8u, cpu->gpr[12], _pgx1, 0xFFFFE3A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC2DBE0: 01CF8021 addu $s0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2DBE4: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2DBE8: AC2D9ED4 sw $t5, -24876($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045BE8u); return; } g_debug_last_store_pc = 0x80045BE8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9ED4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DBEC: 1000001C beq $zero, $zero, 0xBFC2DC60 */ - uint32_t psx_brA_BFC2DBEC = cpu->gpr[0]; uint32_t psx_brB_BFC2DBEC = cpu->gpr[0]; - psx_taken_BFC2DBEC = (psx_brA_BFC2DBEC == psx_brB_BFC2DBEC); - psx_delay_BFC2DBEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83000u); -#endif - /* 0xBFC2DBF0: 01AC9821 addu $s3, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[19] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC9821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045BF0u); -#endif - if (psx_delay_BFC2DBEC) { - psx_delay_BFC2DBEC = 0; - if (psx_taken_BFC2DBEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C60u); - goto label_BFC2DC60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045BF4u); - } -label_BFC2DBF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DBF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DBF4: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BF4u); -#endif - /* 0xBFC2DBF8: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045BF8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DBFC: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC00: 100001B3 beq $zero, $zero, 0xBFC2E2D0 */ - uint32_t psx_brA_BFC2DC00 = cpu->gpr[0]; uint32_t psx_brB_BFC2DC00 = cpu->gpr[0]; - psx_taken_BFC2DC00 = (psx_brA_BFC2DC00 == psx_brB_BFC2DC00); - psx_delay_BFC2DC00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DC04: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C04u); -#endif - if (psx_delay_BFC2DC00) { - psx_delay_BFC2DC00 = 0; - if (psx_taken_BFC2DC00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D0u); - goto label_BFC2E2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C08u); - } -label_BFC2DC08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2DC08: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C08u); -#endif - /* 0xBFC2DC0C: 8F189ECC lw $t8, -24884($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C0Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189ECCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C10u); -#endif - /* 0xBFC2DC10: 8FB900AC lw $t9, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C10u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2DC18: 13190007 beq $t8, $t9, 0xBFC2DC38 */ - uint32_t psx_brA_BFC2DC18 = cpu->gpr[24]; uint32_t psx_brB_BFC2DC18 = cpu->gpr[25]; - psx_taken_BFC2DC18 = (psx_brA_BFC2DC18 == psx_brB_BFC2DC18); - psx_delay_BFC2DC18 = 1; - /* 0xBFC2DC1C: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C1Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C1Cu); -#endif - if (psx_delay_BFC2DC18) { - psx_delay_BFC2DC18 = 0; - if (psx_taken_BFC2DC18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C38u); - goto label_BFC2DC38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C20u); - } -label_BFC2DC20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DC20: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C20u); -#endif - /* 0xBFC2DC24: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C24u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DC28: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC2C: 100001A8 beq $zero, $zero, 0xBFC2E2D0 */ - uint32_t psx_brA_BFC2DC2C = cpu->gpr[0]; uint32_t psx_brB_BFC2DC2C = cpu->gpr[0]; - psx_taken_BFC2DC2C = (psx_brA_BFC2DC2C == psx_brB_BFC2DC2C); - psx_delay_BFC2DC2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2DC30: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C30u); -#endif - if (psx_delay_BFC2DC2C) { - psx_delay_BFC2DC2C = 0; - if (psx_taken_BFC2DC2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462D0u); - goto label_BFC2E2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C34u); - } -label_BFC2DC34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C34u); -#endif - /* 0xBFC2DC34: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C34u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C34u); -#endif -label_BFC2DC38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2DC38: 3C098014 lui $t1, 0x8014 */ - cpu->gpr[9] = 0x80140000u; - PGXP_ALU(0x3C098014u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DC3C: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DC40: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DC44: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DC48: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DC4C: 256BD2A0 addiu $t3, $t3, -11616 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-11616)); - PGXP_ALU(0x256BD2A0u, cpu->gpr[11], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2DC50: 2529E3A8 addiu $t1, $t1, -7256 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-7256)); - PGXP_ALU(0x2529E3A8u, cpu->gpr[9], _pgx1, 0xFFFFE3A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C00u); -#endif - /* 0xBFC2DC54: 014B8021 addu $s0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2DC58: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80300u); -#endif - /* 0xBFC2DC5C: 01099821 addu $s3, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[19] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01099821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C5Cu); -#endif -label_BFC2DC60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DC60: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045C60u); -#endif - /* 0xBFC2DC64: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C64u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2DC68: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2DC6C: 001568C0 sll $t5, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001568C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202000u); -#endif - /* 0xBFC2DC70: 01B56823 subu $t5, $t5, $s5 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[21]; - PGXP_ALU(0x01B56823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2DC74: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40006000u); -#endif - /* 0xBFC2DC78: 03CD7021 addu $t6, $fp, $t5 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[30] + cpu->gpr[13]; - PGXP_ALU(0x03CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC2DC7C: ADCC00A8 sw $t4, 168($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C7Cu); return; } g_debug_last_store_pc = 0x80045C7Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADCC00A8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C80u); -#endif - /* 0xBFC2DC80: 826F0000 lb $t7, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 15, 0x80000u); - PGXP_LOAD(0x826F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2DC88: 15E00019 bne $t7, $zero, 0xBFC2DCF0 */ - uint32_t psx_brA_BFC2DC88 = cpu->gpr[15]; uint32_t psx_brB_BFC2DC88 = cpu->gpr[0]; - psx_taken_BFC2DC88 = (psx_brA_BFC2DC88 != psx_brB_BFC2DC88); - psx_delay_BFC2DC88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045C8Cu); -#endif - if (psx_delay_BFC2DC88) { - psx_delay_BFC2DC88 = 0; - if (psx_taken_BFC2DC88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CF0u); - goto label_BFC2DCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045C90u); - } -label_BFC2DC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045C90u); -#endif - /* 0xBFC2DC90: 8E030010 lw $v1, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C90u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C90u); -#endif - /* 0xBFC2DC94: 8FD8000C lw $t8, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045C94u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DC98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC2DC9C: 0303C821 addu $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[3]; - PGXP_ALU(0x0303C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DCA0: 04600007 bltz $v1, 0xBFC2DCC0 */ - uint32_t psx_brA_BFC2DCA0 = cpu->gpr[3]; - psx_taken_BFC2DCA0 = ((int32_t)psx_brA_BFC2DCA0 < 0); - psx_delay_BFC2DCA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42000000u); -#endif - /* 0xBFC2DCA4: AFD9000C sw $t9, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CA4u); return; } g_debug_last_store_pc = 0x80045CA4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFD9000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CA4u); -#endif - if (psx_delay_BFC2DCA0) { - psx_delay_BFC2DCA0 = 0; - if (psx_taken_BFC2DCA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CC0u); - goto label_BFC2DCC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CA8u); - } -label_BFC2DCA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DCA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CA8u); -#endif - /* 0xBFC2DCA8: 8E020008 lw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CA8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CA8u); -#endif - /* 0xBFC2DCAC: 8FC9000C lw $t1, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40000000u); } - PGXP_LOAD(0x8FC9000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x206u); -#endif - /* 0xBFC2DCB4: 0122082A slt $at, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0122082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DCB8: 10200009 beq $at, $zero, 0xBFC2DCE0 */ - uint32_t psx_brA_BFC2DCB8 = cpu->gpr[1]; uint32_t psx_brB_BFC2DCB8 = cpu->gpr[0]; - psx_taken_BFC2DCB8 = (psx_brA_BFC2DCB8 == psx_brB_BFC2DCB8); - psx_delay_BFC2DCB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CBCu); -#endif - if (psx_delay_BFC2DCB8) { - psx_delay_BFC2DCB8 = 0; - if (psx_taken_BFC2DCB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CE0u); - goto label_BFC2DCE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CC0u); - } -label_BFC2DCC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DCC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DCC0: 0461004A bgez $v1, 0xBFC2DDEC */ - uint32_t psx_brA_BFC2DCC0 = cpu->gpr[3]; - psx_taken_BFC2DCC0 = ((int32_t)psx_brA_BFC2DCC0 >= 0); - psx_delay_BFC2DCC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CC4u); -#endif - if (psx_delay_BFC2DCC0) { - psx_delay_BFC2DCC0 = 0; - if (psx_taken_BFC2DCC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DECu); - goto label_BFC2DDEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CC8u); - } -label_BFC2DCC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DCC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CC8u); -#endif - /* 0xBFC2DCC8: 8E020008 lw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CC8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CC8u); -#endif - /* 0xBFC2DCCC: 8FC8000C lw $t0, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CCCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40000000u); } - PGXP_LOAD(0x8FC8000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC2DCD4: 0102082A slt $at, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0102082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DCD8: 10200044 beq $at, $zero, 0xBFC2DDEC */ - uint32_t psx_brA_BFC2DCD8 = cpu->gpr[1]; uint32_t psx_brB_BFC2DCD8 = cpu->gpr[0]; - psx_taken_BFC2DCD8 = (psx_brA_BFC2DCD8 == psx_brB_BFC2DCD8); - psx_delay_BFC2DCD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CDCu); -#endif - if (psx_delay_BFC2DCD8) { - psx_delay_BFC2DCD8 = 0; - if (psx_taken_BFC2DCD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DECu); - goto label_BFC2DDEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CE0u); - } -label_BFC2DCE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DCE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC2DCE0: AFC2000C sw $v0, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CE0u); return; } g_debug_last_store_pc = 0x80045CE0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFC2000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2DCE4: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCE8: 10000040 beq $zero, $zero, 0xBFC2DDEC */ - uint32_t psx_brA_BFC2DCE8 = cpu->gpr[0]; uint32_t psx_brB_BFC2DCE8 = cpu->gpr[0]; - psx_taken_BFC2DCE8 = (psx_brA_BFC2DCE8 == psx_brB_BFC2DCE8); - psx_delay_BFC2DCE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80400u); -#endif - /* 0xBFC2DCEC: A26A0000 sb $t2, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80045CECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA26A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CECu); -#endif - if (psx_delay_BFC2DCE8) { - psx_delay_BFC2DCE8 = 0; - if (psx_taken_BFC2DCE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DECu); - goto label_BFC2DDEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045CF0u); - } -label_BFC2DCF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DCF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045CF0u); -#endif - /* 0xBFC2DCF0: 8E030014 lw $v1, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CF0u); -#endif - /* 0xBFC2DCF4: 8FCB0010 lw $t3, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045CF4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40000000u); } - PGXP_LOAD(0x8FCB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DCF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2808u); -#endif - /* 0xBFC2DCFC: 01636821 addu $t5, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[3]; - PGXP_ALU(0x01636821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DD00: 04600007 bltz $v1, 0xBFC2DD20 */ - uint32_t psx_brA_BFC2DD00 = cpu->gpr[3]; - psx_taken_BFC2DD00 = ((int32_t)psx_brA_BFC2DD00 < 0); - psx_delay_BFC2DD00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002000u); -#endif - /* 0xBFC2DD04: AFCD0010 sw $t5, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D04u); return; } g_debug_last_store_pc = 0x80045D04u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFCD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D04u); -#endif - if (psx_delay_BFC2DD00) { - psx_delay_BFC2DD00 = 0; - if (psx_taken_BFC2DD00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D20u); - goto label_BFC2DD20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D08u); - } -label_BFC2DD08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DD08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D08u); -#endif - /* 0xBFC2DD08: 8E02000C lw $v0, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E02000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D08u); -#endif - /* 0xBFC2DD0C: 8FCC0010 lw $t4, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D0Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40000000u); } - PGXP_LOAD(0x8FCC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DD10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC2DD14: 0182082A slt $at, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0182082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DD18: 10200009 beq $at, $zero, 0xBFC2DD40 */ - uint32_t psx_brA_BFC2DD18 = cpu->gpr[1]; uint32_t psx_brB_BFC2DD18 = cpu->gpr[0]; - psx_taken_BFC2DD18 = (psx_brA_BFC2DD18 == psx_brB_BFC2DD18); - psx_delay_BFC2DD18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DD1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045D1Cu); -#endif - if (psx_delay_BFC2DD18) { - psx_delay_BFC2DD18 = 0; - if (psx_taken_BFC2DD18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D40u); - goto label_BFC2DD40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D20u); - } -label_BFC2DD20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DD20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DD20: 04610032 bgez $v1, 0xBFC2DDEC */ - uint32_t psx_brA_BFC2DD20 = cpu->gpr[3]; - psx_taken_BFC2DD20 = ((int32_t)psx_brA_BFC2DD20 >= 0); - psx_delay_BFC2DD20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DD24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045D24u); -#endif - if (psx_delay_BFC2DD20) { - psx_delay_BFC2DD20 = 0; - if (psx_taken_BFC2DD20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DECu); - goto label_BFC2DDEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D28u); - } -label_BFC2DD28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DD28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D28u); -#endif - /* 0xBFC2DD28: 8E02000C lw $v0, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D28u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E02000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D28u); -#endif - /* 0xBFC2DD2C: 8FCE0010 lw $t6, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D2Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DD30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC2DD34: 01C2082A slt $at, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01C2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DD38: 1020002C beq $at, $zero, 0xBFC2DDEC */ - uint32_t psx_brA_BFC2DD38 = cpu->gpr[1]; uint32_t psx_brB_BFC2DD38 = cpu->gpr[0]; - psx_taken_BFC2DD38 = (psx_brA_BFC2DD38 == psx_brB_BFC2DD38); - psx_delay_BFC2DD38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DD3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045D3Cu); -#endif - if (psx_delay_BFC2DD38) { - psx_delay_BFC2DD38 = 0; - if (psx_taken_BFC2DD38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DECu); - goto label_BFC2DDEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045D40u); - } -label_BFC2DD40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DD40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D40u); -#endif - /* 0xBFC2DD40: 8FCF002C lw $t7, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D40u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40000000u); } - PGXP_LOAD(0x8FCF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2DD44: 0015C8C0 sll $t9, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DD48: 2401FFDF addiu $at, $zero, -33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); - PGXP_ALU(0x2401FFDFu, cpu->gpr[1], _pgx1, 0xFFFFFFDFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2DD4C: 0335C823 subu $t9, $t9, $s5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[21]; - PGXP_ALU(0x0335C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2DD50: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC2DD54: 01E1C024 and $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1]; - PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC2DD58: AFC20010 sw $v0, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D58u); return; } g_debug_last_store_pc = 0x80045D58u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFC20010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000000u); -#endif - /* 0xBFC2DD5C: AFD8002C sw $t8, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D5Cu); return; } g_debug_last_store_pc = 0x80045D5Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFD8002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100010u); -#endif - /* 0xBFC2DD60: 02992021 addu $a0, $s4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[25]; - PGXP_ALU(0x02992021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DD64: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80045D6Cu; /* jal link before delay slot */ - psx_delay_BFC2DD64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2DD68: 24050203 addiu $a1, $zero, 515 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (515)); - PGXP_ALU(0x24050203u, cpu->gpr[5], _pgx1, 0x00000203u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D68u); -#endif - if (psx_delay_BFC2DD64) { - psx_delay_BFC2DD64 = 0; - cpu->gpr[31] = 0x80045D6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2DD6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DD6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2DD6C: A2600000 sb $zero, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80045D6Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DD70: 3C088009 lui $t0, 0x8009 */ - cpu->gpr[8] = 0x80090000u; - PGXP_ALU(0x3C088009u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045D70u); -#endif - /* 0xBFC2DD74: 8D089DB0 lw $t0, -25168($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045D74u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DB0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DD78: 3C0B8011 lui $t3, 0x8011 */ - cpu->gpr[11] = 0x80110000u; - PGXP_ALU(0x3C0B8011u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DD7C: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DD80: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DD84: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DD88: 01485021 addu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01485021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DD8C: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2DD90: 01485021 addu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01485021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2DD94: 2409FFFF addiu $t1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DD98: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DD9C: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DDA0: 256B0EC8 addiu $t3, $t3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (3784)); - PGXP_ALU(0x256B0EC8u, cpu->gpr[11], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2DDA4: AC299ECC sw $t1, -24884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DA4u); return; } g_debug_last_store_pc = 0x80045DA4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299ECCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC2DDA8: 014B1021 addu $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045DA8u); -#endif - /* 0xBFC2DDAC: 8C4D067C lw $t5, 1660($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DACu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D067Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2DDB0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002000u); -#endif - /* 0xBFC2DDB4: AFCD067C sw $t5, 1660($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DB4u); return; } g_debug_last_store_pc = 0x80045DB4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFCD067Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DB4u); -#endif - /* 0xBFC2DDB8: 8C4C0680 lw $t4, 1664($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DB8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x8C4C0680u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DDBC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001000u); -#endif - /* 0xBFC2DDC0: AFCC0680 sw $t4, 1664($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DC0u); return; } g_debug_last_store_pc = 0x80045DC0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFCC0680u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DC0u); -#endif - /* 0xBFC2DDC4: 8DCE9ED0 lw $t6, -24880($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DC4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9ED0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DDC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2DDCC: 15C10004 bne $t6, $at, 0xBFC2DDE0 */ - uint32_t psx_brA_BFC2DDCC = cpu->gpr[14]; uint32_t psx_brB_BFC2DDCC = cpu->gpr[1]; - psx_taken_BFC2DDCC = (psx_brA_BFC2DDCC != psx_brB_BFC2DDCC); - psx_delay_BFC2DDCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2DDD0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045DD0u); -#endif - if (psx_delay_BFC2DDCC) { - psx_delay_BFC2DDCC = 0; - if (psx_taken_BFC2DDCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DE0u); - goto label_BFC2DDE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045DD4u); - } -label_BFC2DDD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DDD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DDD4: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DD4u); return; } g_debug_last_store_pc = 0x80045DD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DDD8: 0C00ED49 jal 0xB003B524 */ - cpu->gpr[31] = 0x80045DE0u; /* jal link before delay slot */ - psx_delay_BFC2DDD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2DDDC: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045DDCu); -#endif - if (psx_delay_BFC2DDD8) { - psx_delay_BFC2DDD8 = 0; - cpu->gpr[31] = 0x80045DE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8003B524u); - cpu->pc = 0x8003B524u; return; - } -label_BFC2DDE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DDE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DDE0: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045DE0u); -#endif - /* 0xBFC2DDE4: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DE4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DDE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045DE8u); -#endif -label_BFC2DDEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DDECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DECu); -#endif - /* 0xBFC2DDEC: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045DECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80045DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2DDF0: 001578C0 sll $t7, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001578C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2DDF4: 01F57823 subu $t7, $t7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[21]; - PGXP_ALU(0x01F57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DDF8: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108010u); -#endif - /* 0xBFC2DDFC: 028F2021 addu $a0, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2DE00: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DE04: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80045E0Cu; /* jal link before delay slot */ - psx_delay_BFC2DE04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2DE08: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E08u); -#endif - if (psx_delay_BFC2DE04) { - psx_delay_BFC2DE04 = 0; - cpu->gpr[31] = 0x80045E0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2DE0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DE0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DE0C: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E10u); -#endif - /* 0xBFC2DE10: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E10u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E10u); -#endif - /* 0xBFC2DE14: 8FC5000C lw $a1, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E14u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC5000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2DE18: 0015C0C0 sll $t8, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2DE1C: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2DE20: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E20u); -#endif - /* 0xBFC2DE24: 8FC60010 lw $a2, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E24u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40000000u); } - PGXP_LOAD(0x8FC60010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DE28: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80045E30u; /* jal link before delay slot */ - psx_delay_BFC2DE28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100010u); -#endif - /* 0xBFC2DE2C: 02982021 addu $a0, $s4, $t8 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[24]; - PGXP_ALU(0x02982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E2Cu); -#endif - if (psx_delay_BFC2DE28) { - psx_delay_BFC2DE28 = 0; - cpu->gpr[31] = 0x80045E30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2DE30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DE30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E30u); -#endif - /* 0xBFC2DE30: 8FD90684 lw $t9, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E30u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40000000u); } - PGXP_LOAD(0x8FD90684u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DE34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2DE38: 1B200020 blez $t9, 0xBFC2DEBC */ - uint32_t psx_brA_BFC2DE38 = cpu->gpr[25]; - psx_taken_BFC2DE38 = ((int32_t)psx_brA_BFC2DE38 <= 0); - psx_delay_BFC2DE38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DE3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045E3Cu); -#endif - if (psx_delay_BFC2DE38) { - psx_delay_BFC2DE38 = 0; - if (psx_taken_BFC2DE38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EBCu); - goto label_BFC2DEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045E40u); - } -label_BFC2DE40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DE40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E40u); -#endif - /* 0xBFC2DE40: 8FA900AC lw $t1, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E40u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900ACu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DE44: 3C0A8011 lui $t2, 0x8011 */ - cpu->gpr[10] = 0x80110000u; - PGXP_ALU(0x3C0A8011u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2DE48: 00094080 sll $t0, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2DE4C: 01094023 subu $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[9]; - PGXP_ALU(0x01094023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DE50: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2DE54: 01094021 addu $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01094021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DE58: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2DE5C: 01094021 addu $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01094021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DE60: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DE64: 254A0FE4 addiu $t2, $t2, 4068 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (4068)); - PGXP_ALU(0x254A0FE4u, cpu->gpr[10], _pgx1, 0x00000FE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10500u); -#endif - /* 0xBFC2DE68: 010A8021 addu $s0, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[8] + cpu->gpr[10]; - PGXP_ALU(0x010A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E68u); -#endif -label_BFC2DE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DE6C: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E70u); -#endif - /* 0xBFC2DE70: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E70u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2DE74: 001160C0 sll $t4, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001160C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2DE78: 00155880 sll $t3, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00155880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2DE7C: 01755821 addu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[21]; - PGXP_ALU(0x01755821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DE80: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2DE84: 01755821 addu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[21]; - PGXP_ALU(0x01755821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DE88: 000B5940 sll $t3, $t3, 5 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 5u; - PGXP_ALU(0x000B5940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2DE8C: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2DE90: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12800u); -#endif - /* 0xBFC2DE94: 020B6821 addu $t5, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[16] + cpu->gpr[11]; - PGXP_ALU(0x020B6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045E94u); -#endif - /* 0xBFC2DE98: 8FC5000C lw $a1, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E98u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC5000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E98u); -#endif - /* 0xBFC2DE9C: 8FC60010 lw $a2, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045E9Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40000000u); } - PGXP_LOAD(0x8FC60010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80045E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DEA0: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80045EA8u; /* jal link before delay slot */ - psx_delay_BFC2DEA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC2DEA4: 01AC2021 addu $a0, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045EA4u); -#endif - if (psx_delay_BFC2DEA0) { - psx_delay_BFC2DEA0 = 0; - cpu->gpr[31] = 0x80045EA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2DEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EA8u); -#endif - /* 0xBFC2DEA8: 8FCE0684 lw $t6, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045EA8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0684u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2DEAC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24002u); -#endif - /* 0xBFC2DEB0: 022E082A slt $at, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x022E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DEB4: 1420FFED bne $at, $zero, 0xBFC2DE6C */ - uint32_t psx_brA_BFC2DEB4 = cpu->gpr[1]; uint32_t psx_brB_BFC2DEB4 = cpu->gpr[0]; - psx_taken_BFC2DEB4 = (psx_brA_BFC2DEB4 != psx_brB_BFC2DEB4); - psx_delay_BFC2DEB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DEB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045EB8u); -#endif - if (psx_delay_BFC2DEB4) { - psx_delay_BFC2DEB4 = 0; - if (psx_taken_BFC2DEB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045E6Cu); - goto label_BFC2DE6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EBCu); - } -label_BFC2DEBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DEBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2DEBC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EC0u); -#endif - /* 0xBFC2DEC0: 8DEF9ECC lw $t7, -24884($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045EC0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9ECCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DEC4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80045EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2DEC8: 15E10005 bne $t7, $at, 0xBFC2DEE0 */ - uint32_t psx_brA_BFC2DEC8 = cpu->gpr[15]; uint32_t psx_brB_BFC2DEC8 = cpu->gpr[1]; - psx_taken_BFC2DEC8 = (psx_brA_BFC2DEC8 != psx_brB_BFC2DEC8); - psx_delay_BFC2DEC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DECC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045ECCu); -#endif - if (psx_delay_BFC2DEC8) { - psx_delay_BFC2DEC8 = 0; - if (psx_taken_BFC2DEC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EE0u); - goto label_BFC2DEE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045ED0u); - } -label_BFC2DED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DED0: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045ED0u); -#endif - /* 0xBFC2DED4: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045ED4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DED8: 10000104 beq $zero, $zero, 0xBFC2E2EC */ - uint32_t psx_brA_BFC2DED8 = cpu->gpr[0]; uint32_t psx_brB_BFC2DED8 = cpu->gpr[0]; - psx_taken_BFC2DED8 = (psx_brA_BFC2DED8 == psx_brB_BFC2DED8); - psx_delay_BFC2DED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2DEDC: AFA000AC sw $zero, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045EDCu); return; } g_debug_last_store_pc = 0x80045EDCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000ACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80045EDCu); -#endif - if (psx_delay_BFC2DED8) { - psx_delay_BFC2DED8 = 0; - if (psx_taken_BFC2DED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462ECu); - goto label_BFC2E2EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EE0u); - } -label_BFC2DEE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DEE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DEE0: 1000009E beq $zero, $zero, 0xBFC2E15C */ - uint32_t psx_brA_BFC2DEE0 = cpu->gpr[0]; uint32_t psx_brB_BFC2DEE0 = cpu->gpr[0]; - psx_taken_BFC2DEE0 = (psx_brA_BFC2DEE0 == psx_brB_BFC2DEE0); - psx_delay_BFC2DEE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2DEE4: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045EE4u); -#endif - if (psx_delay_BFC2DEE0) { - psx_delay_BFC2DEE0 = 0; - if (psx_taken_BFC2DEE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004615Cu); - goto label_BFC2E15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EE8u); - } -label_BFC2DEE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DEE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2DEE8: 30580040 andi $t8, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80045EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2DEEC: 1300008A beq $t8, $zero, 0xBFC2E118 */ - uint32_t psx_brA_BFC2DEEC = cpu->gpr[24]; uint32_t psx_brB_BFC2DEEC = cpu->gpr[0]; - psx_taken_BFC2DEEC = (psx_brA_BFC2DEEC == psx_brB_BFC2DEEC); - psx_delay_BFC2DEEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC2DEF0: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045EF0u); -#endif - if (psx_delay_BFC2DEEC) { - psx_delay_BFC2DEEC = 0; - if (psx_taken_BFC2DEEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046118u); - goto label_BFC2E118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045EF4u); - } -label_BFC2DEF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DEF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045EF4u); -#endif - /* 0xBFC2DEF4: 8FA900AC lw $t1, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045EF4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900ACu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2DEF8: 0015C8C0 sll $t9, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2DEFC: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80045EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2DF00: 0335C823 subu $t9, $t9, $s5 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[21]; - PGXP_ALU(0x0335C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DF04: 3C088014 lui $t0, 0x8014 */ - cpu->gpr[8] = 0x80140000u; - PGXP_ALU(0x3C088014u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DF08: 3C0B800F lui $t3, 0x800F */ - cpu->gpr[11] = 0x800F0000u; - PGXP_ALU(0x3C0B800Fu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2DF0C: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2DF10: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2DF14: 256BD2A0 addiu $t3, $t3, -11616 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-11616)); - PGXP_ALU(0x256BD2A0u, cpu->gpr[11], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2DF18: 2508E3A8 addiu $t0, $t0, -7256 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-7256)); - PGXP_ALU(0x2508E3A8u, cpu->gpr[8], _pgx1, 0xFFFFE3A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2DF1C: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100010u); -#endif - /* 0xBFC2DF20: 02992021 addu $a0, $s4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[25]; - PGXP_ALU(0x02992021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C00u); -#endif - /* 0xBFC2DF24: 014B8021 addu $s0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[16] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2DF28: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2DF2C: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2DF30: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x80045F38u; /* jal link before delay slot */ - psx_delay_BFC2DF30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80300u); -#endif - /* 0xBFC2DF34: 01289821 addu $s3, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[19] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01289821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F34u); -#endif - if (psx_delay_BFC2DF30) { - psx_delay_BFC2DF30 = 0; - cpu->gpr[31] = 0x80045F38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2DF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F38u); -#endif - /* 0xBFC2DF38: 826D0000 lb $t5, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 13, 0x80000u); - PGXP_LOAD(0x826D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2DF40: 15A00019 bne $t5, $zero, 0xBFC2DFA8 */ - uint32_t psx_brA_BFC2DF40 = cpu->gpr[13]; uint32_t psx_brB_BFC2DF40 = cpu->gpr[0]; - psx_taken_BFC2DF40 = (psx_brA_BFC2DF40 != psx_brB_BFC2DF40); - psx_delay_BFC2DF40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F44u); -#endif - if (psx_delay_BFC2DF40) { - psx_delay_BFC2DF40 = 0; - if (psx_taken_BFC2DF40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FA8u); - goto label_BFC2DFA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F48u); - } -label_BFC2DF48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F48u); -#endif - /* 0xBFC2DF48: 8E030010 lw $v1, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F48u); -#endif - /* 0xBFC2DF4C: 8FCC000C lw $t4, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F4Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40000000u); } - PGXP_LOAD(0x8FCC000Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5008u); -#endif - /* 0xBFC2DF54: 01837021 addu $t6, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[3]; - PGXP_ALU(0x01837021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DF58: 04600007 bltz $v1, 0xBFC2DF78 */ - uint32_t psx_brA_BFC2DF58 = cpu->gpr[3]; - psx_taken_BFC2DF58 = ((int32_t)psx_brA_BFC2DF58 < 0); - psx_delay_BFC2DF58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004000u); -#endif - /* 0xBFC2DF5C: AFCE000C sw $t6, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F5Cu); return; } g_debug_last_store_pc = 0x80045F5Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFCE000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F5Cu); -#endif - if (psx_delay_BFC2DF58) { - psx_delay_BFC2DF58 = 0; - if (psx_taken_BFC2DF58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F78u); - goto label_BFC2DF78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F60u); - } -label_BFC2DF60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F60u); -#endif - /* 0xBFC2DF60: 8E020008 lw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F60u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F60u); -#endif - /* 0xBFC2DF64: 8FCF000C lw $t7, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F64u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40000000u); } - PGXP_LOAD(0x8FCF000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC2DF6C: 01E2082A slt $at, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DF70: 10200009 beq $at, $zero, 0xBFC2DF98 */ - uint32_t psx_brA_BFC2DF70 = cpu->gpr[1]; uint32_t psx_brB_BFC2DF70 = cpu->gpr[0]; - psx_taken_BFC2DF70 = (psx_brA_BFC2DF70 == psx_brB_BFC2DF70); - psx_delay_BFC2DF70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F74u); -#endif - if (psx_delay_BFC2DF70) { - psx_delay_BFC2DF70 = 0; - if (psx_taken_BFC2DF70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F98u); - goto label_BFC2DF98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F78u); - } -label_BFC2DF78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DF78: 0461002F bgez $v1, 0xBFC2E038 */ - uint32_t psx_brA_BFC2DF78 = cpu->gpr[3]; - psx_taken_BFC2DF78 = ((int32_t)psx_brA_BFC2DF78 >= 0); - psx_delay_BFC2DF78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F7Cu); -#endif - if (psx_delay_BFC2DF78) { - psx_delay_BFC2DF78 = 0; - if (psx_taken_BFC2DF78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046038u); - goto label_BFC2E038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F80u); - } -label_BFC2DF80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F80u); -#endif - /* 0xBFC2DF80: 8E020008 lw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F80u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F80u); -#endif - /* 0xBFC2DF84: 8FD8000C lw $t8, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F84u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC2DF8C: 0302082A slt $at, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0302082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DF90: 10200029 beq $at, $zero, 0xBFC2E038 */ - uint32_t psx_brA_BFC2DF90 = cpu->gpr[1]; uint32_t psx_brB_BFC2DF90 = cpu->gpr[0]; - psx_taken_BFC2DF90 = (psx_brA_BFC2DF90 == psx_brB_BFC2DF90); - psx_delay_BFC2DF90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DF94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045F94u); -#endif - if (psx_delay_BFC2DF90) { - psx_delay_BFC2DF90 = 0; - if (psx_taken_BFC2DF90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046038u); - goto label_BFC2E038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045F98u); - } -label_BFC2DF98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DF98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC2DF98: AFC2000C sw $v0, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045F98u); return; } g_debug_last_store_pc = 0x80045F98u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFC2000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2DF9C: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80045F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFA0: 10000025 beq $zero, $zero, 0xBFC2E038 */ - uint32_t psx_brA_BFC2DFA0 = cpu->gpr[0]; uint32_t psx_brB_BFC2DFA0 = cpu->gpr[0]; - psx_taken_BFC2DFA0 = (psx_brA_BFC2DFA0 == psx_brB_BFC2DFA0); - psx_delay_BFC2DFA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC2DFA4: A2790000 sb $t9, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80045FA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA2790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FA4u); -#endif - if (psx_delay_BFC2DFA0) { - psx_delay_BFC2DFA0 = 0; - if (psx_taken_BFC2DFA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046038u); - goto label_BFC2E038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FA8u); - } -label_BFC2DFA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DFA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FA8u); -#endif - /* 0xBFC2DFA8: 8E030014 lw $v1, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FA8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030014u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FA8u); -#endif - /* 0xBFC2DFAC: 8FC80010 lw $t0, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40000000u); } - PGXP_LOAD(0x8FC80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x308u); -#endif - /* 0xBFC2DFB4: 01034821 addu $t1, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[3]; - PGXP_ALU(0x01034821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DFB8: 04600007 bltz $v1, 0xBFC2DFD8 */ - uint32_t psx_brA_BFC2DFB8 = cpu->gpr[3]; - psx_taken_BFC2DFB8 = ((int32_t)psx_brA_BFC2DFB8 < 0); - psx_delay_BFC2DFB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000200u); -#endif - /* 0xBFC2DFBC: AFC90010 sw $t1, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FBCu); return; } g_debug_last_store_pc = 0x80045FBCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFC90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FBCu); -#endif - if (psx_delay_BFC2DFB8) { - psx_delay_BFC2DFB8 = 0; - if (psx_taken_BFC2DFB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FD8u); - goto label_BFC2DFD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FC0u); - } -label_BFC2DFC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DFC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FC0u); -#endif - /* 0xBFC2DFC0: 8E02000C lw $v0, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E02000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FC0u); -#endif - /* 0xBFC2DFC4: 8FCA0010 lw $t2, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40000000u); } - PGXP_LOAD(0x8FCA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC2DFCC: 0142082A slt $at, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0142082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DFD0: 10200009 beq $at, $zero, 0xBFC2DFF8 */ - uint32_t psx_brA_BFC2DFD0 = cpu->gpr[1]; uint32_t psx_brB_BFC2DFD0 = cpu->gpr[0]; - psx_taken_BFC2DFD0 = (psx_brA_BFC2DFD0 == psx_brB_BFC2DFD0); - psx_delay_BFC2DFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FD4u); -#endif - if (psx_delay_BFC2DFD0) { - psx_delay_BFC2DFD0 = 0; - if (psx_taken_BFC2DFD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FF8u); - goto label_BFC2DFF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FD8u); - } -label_BFC2DFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2DFD8: 04610017 bgez $v1, 0xBFC2E038 */ - uint32_t psx_brA_BFC2DFD8 = cpu->gpr[3]; - psx_taken_BFC2DFD8 = ((int32_t)psx_brA_BFC2DFD8 >= 0); - psx_delay_BFC2DFD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FDCu); -#endif - if (psx_delay_BFC2DFD8) { - psx_delay_BFC2DFD8 = 0; - if (psx_taken_BFC2DFD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046038u); - goto label_BFC2E038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FE0u); - } -label_BFC2DFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FE0u); -#endif - /* 0xBFC2DFE0: 8E02000C lw $v0, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FE0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E02000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FE0u); -#endif - /* 0xBFC2DFE4: 8FCB0010 lw $t3, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FE4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40000000u); } - PGXP_LOAD(0x8FCB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x806u); -#endif - /* 0xBFC2DFEC: 0162082A slt $at, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0162082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80045FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2DFF0: 10200011 beq $at, $zero, 0xBFC2E038 */ - uint32_t psx_brA_BFC2DFF0 = cpu->gpr[1]; uint32_t psx_brB_BFC2DFF0 = cpu->gpr[0]; - psx_taken_BFC2DFF0 = (psx_brA_BFC2DFF0 == psx_brB_BFC2DFF0); - psx_delay_BFC2DFF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2DFF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80045FF4u); -#endif - if (psx_delay_BFC2DFF0) { - psx_delay_BFC2DFF0 = 0; - if (psx_taken_BFC2DFF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046038u); - goto label_BFC2E038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045FF8u); - } -label_BFC2DFF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2DFF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2DFF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80045FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2DFF8: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80045FF8u); -#endif - /* 0xBFC2DFFC: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80045FFCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80045FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046000u); -#endif - /* 0xBFC2E000: 8FCD002C lw $t5, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046000u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x40000000u); } - PGXP_LOAD(0x8FCD002Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80046000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC2E004: 001570C0 sll $t6, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001570C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E008: 2401FFBF addiu $at, $zero, -65 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-65)); - PGXP_ALU(0x2401FFBFu, cpu->gpr[1], _pgx1, 0xFFFFFFBFu); } -#ifdef PSX_COSIM - cosim_instr(0x80046008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC2E00C: 01D57023 subu $t6, $t6, $s5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[21]; - PGXP_ALU(0x01D57023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004600Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E010: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002u); -#endif - /* 0xBFC2E014: 01A16024 and $t4, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[13] & cpu->gpr[1]; - PGXP_ALU(0x01A16024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC2E018: AFC20010 sw $v0, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046018u); return; } g_debug_last_store_pc = 0x80046018u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFC20010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001000u); -#endif - /* 0xBFC2E01C: AFCC002C sw $t4, 44($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004601Cu); return; } g_debug_last_store_pc = 0x8004601Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFCC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004601Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104010u); -#endif - /* 0xBFC2E020: 028E2021 addu $a0, $s4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[14]; - PGXP_ALU(0x028E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E024: 0C011294 jal 0xB0044A50 */ - cpu->gpr[31] = 0x8004602Cu; /* jal link before delay slot */ - psx_delay_BFC2E024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2E028: 24050203 addiu $a1, $zero, 515 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (515)); - PGXP_ALU(0x24050203u, cpu->gpr[5], _pgx1, 0x00000203u); } -#ifdef PSX_COSIM - cosim_instr(0x80046028u); -#endif - if (psx_delay_BFC2E024) { - psx_delay_BFC2E024 = 0; - cpu->gpr[31] = 0x8004602Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A50u); - cpu->pc = 0x80044A50u; return; - } -label_BFC2E02C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E02Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2E02C: A2600000 sb $zero, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004602Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[19] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA2600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E030: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E034: AC209EC8 sw $zero, -24888($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046034u); return; } g_debug_last_store_pc = 0x80046034u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209EC8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80046034u); -#endif -label_BFC2E038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E038: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046038u); -#endif - /* 0xBFC2E03C: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004603Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004603Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046040u); -#endif - /* 0xBFC2E040: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046040u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2E044: 001578C0 sll $t7, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001578C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2E048: 01F57823 subu $t7, $t7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[21]; - PGXP_ALU(0x01F57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E04C: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004604Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108010u); -#endif - /* 0xBFC2E050: 028F2021 addu $a0, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2E054: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E058: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80046060u; /* jal link before delay slot */ - psx_delay_BFC2E058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2E05C: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004605Cu); -#endif - if (psx_delay_BFC2E058) { - psx_delay_BFC2E058 = 0; - cpu->gpr[31] = 0x80046060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2E060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E060: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046060u); -#endif - /* 0xBFC2E064: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046064u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80046064u); -#endif - /* 0xBFC2E068: 8FC5000C lw $a1, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046068u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC5000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E06C: 0015C0C0 sll $t8, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004606Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E070: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E074: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046074u); -#endif - /* 0xBFC2E078: 8FC60010 lw $a2, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046078u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40000000u); } - PGXP_LOAD(0x8FC60010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80046078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E07C: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80046084u; /* jal link before delay slot */ - psx_delay_BFC2E07C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100010u); -#endif - /* 0xBFC2E080: 02982021 addu $a0, $s4, $t8 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[24]; - PGXP_ALU(0x02982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046080u); -#endif - if (psx_delay_BFC2E07C) { - psx_delay_BFC2E07C = 0; - cpu->gpr[31] = 0x80046084u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2E084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046084u); -#endif - /* 0xBFC2E084: 8FD90684 lw $t9, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046084u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40000000u); } - PGXP_LOAD(0x8FD90684u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2E08C: 1B200033 blez $t9, 0xBFC2E15C */ - uint32_t psx_brA_BFC2E08C = cpu->gpr[25]; - psx_taken_BFC2E08C = ((int32_t)psx_brA_BFC2E08C <= 0); - psx_delay_BFC2E08C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E090: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046090u); -#endif - if (psx_delay_BFC2E08C) { - psx_delay_BFC2E08C = 0; - if (psx_taken_BFC2E08C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004615Cu); - goto label_BFC2E15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046094u); - } -label_BFC2E094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046094u); -#endif - /* 0xBFC2E094: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046094u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80046094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E098: 3C0A8011 lui $t2, 0x8011 */ - cpu->gpr[10] = 0x80110000u; - PGXP_ALU(0x3C0A8011u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2E09C: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004609Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2E0A0: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E0A4: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800460A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2E0A8: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E0AC: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800460ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2E0B0: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E0B4: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800460B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E0B8: 254A0FE4 addiu $t2, $t2, 4068 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (4068)); - PGXP_ALU(0x254A0FE4u, cpu->gpr[10], _pgx1, 0x00000FE4u); } -#ifdef PSX_COSIM - cosim_instr(0x800460B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10600u); -#endif - /* 0xBFC2E0BC: 012A8021 addu $s0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[16] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460BCu); -#endif -label_BFC2E0C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E0C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E0C0: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800460C0u); -#endif - /* 0xBFC2E0C4: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800460C4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800460C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2E0C8: 001160C0 sll $t4, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[17] << 3u; - PGXP_ALU(0x001160C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800460C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E0CC: 00155880 sll $t3, $s5, 2 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 2u; - PGXP_ALU(0x00155880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800460CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E0D0: 01755821 addu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[21]; - PGXP_ALU(0x01755821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E0D4: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800460D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E0D8: 01755821 addu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[21]; - PGXP_ALU(0x01755821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E0DC: 000B5940 sll $t3, $t3, 5 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 5u; - PGXP_ALU(0x000B5940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800460DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000u); -#endif - /* 0xBFC2E0E0: 01916023 subu $t4, $t4, $s1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[17]; - PGXP_ALU(0x01916023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E0E4: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800460E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12800u); -#endif - /* 0xBFC2E0E8: 020B6821 addu $t5, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[16] + cpu->gpr[11]; - PGXP_ALU(0x020B6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460E8u); -#endif - /* 0xBFC2E0EC: 8FC5000C lw $a1, 12($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800460ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC5000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800460ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460F0u); -#endif - /* 0xBFC2E0F0: 8FC60010 lw $a2, 16($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800460F0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40000000u); } - PGXP_LOAD(0x8FC60010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800460F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E0F4: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x800460FCu; /* jal link before delay slot */ - psx_delay_BFC2E0F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC2E0F8: 01AC2021 addu $a0, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800460F8u); -#endif - if (psx_delay_BFC2E0F4) { - psx_delay_BFC2E0F4 = 0; - cpu->gpr[31] = 0x800460FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2E0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800460FCu); -#endif - /* 0xBFC2E0FC: 8FCE0684 lw $t6, 1668($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800460FCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40000000u); } - PGXP_LOAD(0x8FCE0684u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800460FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2E100: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24002u); -#endif - /* 0xBFC2E104: 022E082A slt $at, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x022E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E108: 1420FFED bne $at, $zero, 0xBFC2E0C0 */ - uint32_t psx_brA_BFC2E108 = cpu->gpr[1]; uint32_t psx_brB_BFC2E108 = cpu->gpr[0]; - psx_taken_BFC2E108 = (psx_brA_BFC2E108 != psx_brB_BFC2E108); - psx_delay_BFC2E108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E10C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004610Cu); -#endif - if (psx_delay_BFC2E108) { - psx_delay_BFC2E108 = 0; - if (psx_taken_BFC2E108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800460C0u); - goto label_BFC2E0C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046110u); - } -label_BFC2E110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E110: 10000012 beq $zero, $zero, 0xBFC2E15C */ - uint32_t psx_brA_BFC2E110 = cpu->gpr[0]; uint32_t psx_brB_BFC2E110 = cpu->gpr[0]; - psx_taken_BFC2E110 = (psx_brA_BFC2E110 == psx_brB_BFC2E110); - psx_delay_BFC2E110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E114: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046114u); -#endif - if (psx_delay_BFC2E110) { - psx_delay_BFC2E110 = 0; - if (psx_taken_BFC2E110) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004615Cu); - goto label_BFC2E15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046118u); - } -label_BFC2E118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2E118: 001578C0 sll $t7, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001578C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208000u); -#endif - /* 0xBFC2E11C: 01F57823 subu $t7, $t7, $s5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[21]; - PGXP_ALU(0x01F57823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E120: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108010u); -#endif - /* 0xBFC2E124: 028F2021 addu $a0, $s4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[15]; - PGXP_ALU(0x028F2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2E128: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E12C: 0C01122A jal 0xB00448A8 */ - cpu->gpr[31] = 0x80046134u; /* jal link before delay slot */ - psx_delay_BFC2E12C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2E130: 24061000 addiu $a2, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24061000u, cpu->gpr[6], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046130u); -#endif - if (psx_delay_BFC2E12C) { - psx_delay_BFC2E12C = 0; - cpu->gpr[31] = 0x80046134u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800448A8u); - cpu->pc = 0x800448A8u; return; - } -label_BFC2E134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E134: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046134u); -#endif - /* 0xBFC2E138: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046138u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80046138u); -#endif - /* 0xBFC2E13C: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004613Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004613Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E140: 0015C0C0 sll $t8, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E144: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E148: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100010u); -#endif - /* 0xBFC2E14C: 02982021 addu $a0, $s4, $t8 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[24]; - PGXP_ALU(0x02982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2E150: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E154: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x8004615Cu; /* jal link before delay slot */ - psx_delay_BFC2E154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2E158: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046158u); -#endif - if (psx_delay_BFC2E154) { - psx_delay_BFC2E154 = 0; - cpu->gpr[31] = 0x8004615Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2E15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2E15C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046160u); -#endif - /* 0xBFC2E160: 8F398320 lw $t9, -31968($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046160u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F398320u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E164: 3C038011 lui $v1, 0x8011 */ - cpu->gpr[3] = 0x80110000u; - PGXP_ALU(0x3C038011u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E168: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E16C: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004616Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E170: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E174: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E178: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E17C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E180: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2E184: 00681821 addu $v1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00681821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E188: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046188u); -#endif - /* 0xBFC2E18C: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004618Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004618Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046190u); -#endif - /* 0xBFC2E190: 8C630EC8 lw $v1, 3784($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 3784; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (3784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046190u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C630EC8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046194u); -#endif - /* 0xBFC2E198: 8FC20000 lw $v0, 0($fp) */ - { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046198u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } - PGXP_LOAD(0x8FC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046198u); -#endif -label_BFC2E19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E19C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2E1A0: 10620020 beq $v1, $v0, 0xBFC2E224 */ - uint32_t psx_brA_BFC2E1A0 = cpu->gpr[3]; uint32_t psx_brB_BFC2E1A0 = cpu->gpr[2]; - psx_taken_BFC2E1A0 = (psx_brA_BFC2E1A0 == psx_brB_BFC2E1A0); - psx_delay_BFC2E1A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E1A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800461A4u); -#endif - if (psx_delay_BFC2E1A0) { - psx_delay_BFC2E1A0 = 0; - if (psx_taken_BFC2E1A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046224u); - goto label_BFC2E224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800461A8u); - } -label_BFC2E1A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E1A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E1A8: 1040001E beq $v0, $zero, 0xBFC2E224 */ - uint32_t psx_brA_BFC2E1A8 = cpu->gpr[2]; uint32_t psx_brB_BFC2E1A8 = cpu->gpr[0]; - psx_taken_BFC2E1A8 = (psx_brA_BFC2E1A8 == psx_brB_BFC2E1A8); - psx_delay_BFC2E1A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E1AC: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x800461ACu); -#endif - if (psx_delay_BFC2E1A8) { - psx_delay_BFC2E1A8 = 0; - if (psx_taken_BFC2E1A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046224u); - goto label_BFC2E224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800461B0u); - } -label_BFC2E1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2E1B0: 1041001C beq $v0, $at, 0xBFC2E224 */ - uint32_t psx_brA_BFC2E1B0 = cpu->gpr[2]; uint32_t psx_brB_BFC2E1B0 = cpu->gpr[1]; - psx_taken_BFC2E1B0 = (psx_brA_BFC2E1B0 == psx_brB_BFC2E1B0); - psx_delay_BFC2E1B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E1B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800461B4u); -#endif - if (psx_delay_BFC2E1B0) { - psx_delay_BFC2E1B0 = 0; - if (psx_taken_BFC2E1B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046224u); - goto label_BFC2E224; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800461B8u); - } -label_BFC2E1B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E1B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461B8u); -#endif - /* 0xBFC2E1B8: 8FA900AC lw $t1, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800461B8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900ACu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800461B8u); -#endif - /* 0xBFC2E1BC: 8FC50678 lw $a1, 1656($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 1656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (1656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800461BCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } - PGXP_LOAD(0x8FC50678u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800461BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E1C0: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800461C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E1C4: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E1C8: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800461C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E1CC: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E1D0: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800461D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E1D4: 001558C0 sll $t3, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001558C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800461D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E1D8: 01755823 subu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[21]; - PGXP_ALU(0x01755823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E1DC: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E1E0: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800461E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E1E4: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800461E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E1E8: 3C0C8011 lui $t4, 0x8011 */ - cpu->gpr[12] = 0x80110000u; - PGXP_ALU(0x3C0C8011u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800461E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E1EC: 258C0F04 addiu $t4, $t4, 3844 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (3844)); - PGXP_ALU(0x258C0F04u, cpu->gpr[12], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x800461ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800461F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C00u); -#endif - /* 0xBFC2E1F0: 014B6821 addu $t5, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC2E1F4: 01AC2021 addu $a0, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800461F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E1F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800461F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2E1FC: 04A10002 bgez $a1, 0xBFC2E208 */ - uint32_t psx_brA_BFC2E1FC = cpu->gpr[5]; - psx_taken_BFC2E1FC = ((int32_t)psx_brA_BFC2E1FC >= 0); - psx_delay_BFC2E1FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC2E200: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046200u); -#endif - if (psx_delay_BFC2E1FC) { - psx_delay_BFC2E1FC = 0; - if (psx_taken_BFC2E1FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046208u); - goto label_BFC2E208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046204u); - } -label_BFC2E204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E204: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046204u); -#endif -label_BFC2E208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2E208: 00012843 sra $a1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00012843u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80046208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2E20C: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E210: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x80046218u; /* jal link before delay slot */ - psx_delay_BFC2E210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2E214: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046214u); -#endif - if (psx_delay_BFC2E210) { - psx_delay_BFC2E210 = 0; - cpu->gpr[31] = 0x80046218u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2E218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E218: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046218u); -#endif - /* 0xBFC2E21C: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004621Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E220: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046220u); -#endif -label_BFC2E224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E224: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046224u); -#endif - /* 0xBFC2E228: 8DCE8348 lw $t6, -31928($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046228u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8348u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E22C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E230: 19C00025 blez $t6, 0xBFC2E2C8 */ - uint32_t psx_brA_BFC2E230 = cpu->gpr[14]; - psx_taken_BFC2E230 = ((int32_t)psx_brA_BFC2E230 <= 0); - psx_delay_BFC2E230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E234: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046234u); -#endif - if (psx_delay_BFC2E230) { - psx_delay_BFC2E230 = 0; - if (psx_taken_BFC2E230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462C8u); - goto label_BFC2E2C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046238u); - } -label_BFC2E238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2E238: 3C108009 lui $s0, 0x8009 */ - cpu->gpr[16] = 0x80090000u; - PGXP_ALU(0x3C108009u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2E23C: 26109D70 addiu $s0, $s0, -25232 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-25232)); - PGXP_ALU(0x26109D70u, cpu->gpr[16], _pgx1, 0xFFFF9D70u); } -#ifdef PSX_COSIM - cosim_instr(0x8004623Cu); -#endif -label_BFC2E240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046240u); -#endif - /* 0xBFC2E240: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046240u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046240u); -#endif - /* 0xBFC2E244: 8FD80004 lw $t8, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046244u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40000000u); } - PGXP_LOAD(0x8FD80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80046244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2E24C: 15F80018 bne $t7, $t8, 0xBFC2E2B0 */ - uint32_t psx_brA_BFC2E24C = cpu->gpr[15]; uint32_t psx_brB_BFC2E24C = cpu->gpr[24]; - psx_taken_BFC2E24C = (psx_brA_BFC2E24C != psx_brB_BFC2E24C); - psx_delay_BFC2E24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046250u); -#endif - if (psx_delay_BFC2E24C) { - psx_delay_BFC2E24C = 0; - if (psx_taken_BFC2E24C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462B0u); - goto label_BFC2E2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046254u); - } -label_BFC2E254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046254u); -#endif - /* 0xBFC2E254: 8FB900AC lw $t9, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046254u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2E258: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E25C: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E260: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E264: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E268: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E26C: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004626Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200200u); -#endif - /* 0xBFC2E270: 001548C0 sll $t1, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[9] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001548C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046270u); -#endif - /* 0xBFC2E274: 8CA5832C lw $a1, -31956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046274u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5832Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200200u); -#endif - /* 0xBFC2E278: 01354823 subu $t1, $t1, $s5 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[21]; - PGXP_ALU(0x01354823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2E27C: 01194021 addu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E280: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E284: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E288: 3C0B8011 lui $t3, 0x8011 */ - cpu->gpr[11] = 0x80110000u; - PGXP_ALU(0x3C0B8011u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E28C: 256B0F04 addiu $t3, $t3, 3844 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (3844)); - PGXP_ALU(0x256B0F04u, cpu->gpr[11], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x8004628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC2E290: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC2E294: 014B2021 addu $a0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC2E298: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E29C: 0C011296 jal 0xB0044A58 */ - cpu->gpr[31] = 0x800462A4u; /* jal link before delay slot */ - psx_delay_BFC2E29C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC2E2A0: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800462A0u); -#endif - if (psx_delay_BFC2E29C) { - psx_delay_BFC2E29C = 0; - cpu->gpr[31] = 0x800462A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044A58u); - cpu->pc = 0x80044A58u; return; - } -label_BFC2E2A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E2A4: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800462A4u); -#endif - /* 0xBFC2E2A8: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462A8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800462A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E2AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800462ACu); -#endif -label_BFC2E2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2E2B0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800462B0u); -#endif - /* 0xBFC2E2B4: 8DAD8348 lw $t5, -31928($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462B4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD8348u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800462B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2E2B8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800462B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42002u); -#endif - /* 0xBFC2E2BC: 024D082A slt $at, $s2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x024D082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800462BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E2C0: 1420FFDF bne $at, $zero, 0xBFC2E240 */ - uint32_t psx_brA_BFC2E2C0 = cpu->gpr[1]; uint32_t psx_brB_BFC2E2C0 = cpu->gpr[0]; - psx_taken_BFC2E2C0 = (psx_brA_BFC2E2C0 != psx_brB_BFC2E2C0); - psx_delay_BFC2E2C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2E2C4: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800462C4u); -#endif - if (psx_delay_BFC2E2C0) { - psx_delay_BFC2E2C0 = 0; - if (psx_taken_BFC2E2C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046240u); - goto label_BFC2E240; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462C8u); - } -label_BFC2E2C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E2C8: 3C068014 lui $a2, 0x8014 */ - cpu->gpr[6] = 0x80140000u; - PGXP_ALU(0x3C068014u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800462C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E2CC: 24C681C8 addiu $a2, $a2, -32312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-32312)); - PGXP_ALU(0x24C681C8u, cpu->gpr[6], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x800462CCu); -#endif -label_BFC2E2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462D0u); -#endif - /* 0xBFC2E2D0: 8FAC00AC lw $t4, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462D0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC00ACu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800462D0u); -#endif -label_BFC2E2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2E2D4: 27DE0688 addiu $fp, $fp, 1672 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (1672)); - PGXP_ALU(0x27DE0688u, cpu->gpr[30], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x800462D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC2E2D8: 258E0001 addiu $t6, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); - PGXP_ALU(0x258E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800462D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2E2DC: 29C10060 slti $at, $t6, 96 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (96) ? 1 : 0); - PGXP_ALU(0x29C10060u, cpu->gpr[1], _pgx1, 0x0060u); } -#ifdef PSX_COSIM - cosim_instr(0x800462DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E2E0: 1420FB94 bne $at, $zero, 0xBFC2D134 */ - uint32_t psx_brA_BFC2E2E0 = cpu->gpr[1]; uint32_t psx_brB_BFC2E2E0 = cpu->gpr[0]; - psx_taken_BFC2E2E0 = (psx_brA_BFC2E2E0 != psx_brB_BFC2E2E0); - psx_delay_BFC2E2E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2E2E4: AFAE00AC sw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462E4u); return; } g_debug_last_store_pc = 0x800462E4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800462E4u); -#endif - if (psx_delay_BFC2E2E0) { - psx_delay_BFC2E2E0 = 0; - if (psx_taken_BFC2E2E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80045134u); - goto label_BFC2D134; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462E8u); - } -label_BFC2E2E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC2E2E8: AFA000AC sw $zero, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462E8u); return; } g_debug_last_store_pc = 0x800462E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA000ACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800462E8u); -#endif -label_BFC2E2EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2E2EC: 3C1E8011 lui $fp, 0x8011 */ - cpu->gpr[30] = 0x80110000u; - PGXP_ALU(0x3C1E8011u, cpu->gpr[30], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800462ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2E2F0: 27DE0EC8 addiu $fp, $fp, 3784 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (3784)); - PGXP_ALU(0x27DE0EC8u, cpu->gpr[30], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800462F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2E2F4: 24100060 addiu $s0, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24100060u, cpu->gpr[16], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x800462F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2E2F8: 241103FE addiu $s1, $zero, 1022 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1022)); - PGXP_ALU(0x241103FEu, cpu->gpr[17], _pgx1, 0x000003FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800462F8u); -#endif -label_BFC2E2FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E2FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800462FCu); -#endif - /* 0xBFC2E2FC: 8FCF0004 lw $t7, 4($fp) */ - { uint32_t _pgxa = cpu->gpr[30] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800462FCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40000000u); } - PGXP_LOAD(0x8FCF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800462FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E300: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2E304: 11E0001E beq $t7, $zero, 0xBFC2E380 */ - uint32_t psx_brA_BFC2E304 = cpu->gpr[15]; uint32_t psx_brB_BFC2E304 = cpu->gpr[0]; - psx_taken_BFC2E304 = (psx_brA_BFC2E304 == psx_brB_BFC2E304); - psx_delay_BFC2E304 = 1; - /* 0xBFC2E308: 8FAE00AC lw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046308u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046308u); -#endif - if (psx_delay_BFC2E304) { - psx_delay_BFC2E304 = 0; - if (psx_taken_BFC2E304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046380u); - goto label_BFC2E380; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004630Cu); - } -label_BFC2E30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E30C: 0015C0C0 sll $t8, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[21] << 3u; - PGXP_ALU(0x0015C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2E310: 0315C023 subu $t8, $t8, $s5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[21]; - PGXP_ALU(0x0315C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E314: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43000000u); -#endif - /* 0xBFC2E318: 03D8C821 addu $t9, $fp, $t8 */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[30] + cpu->gpr[24]; - PGXP_ALU(0x03D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046318u); -#endif - /* 0xBFC2E31C: 8F2800A8 lw $t0, 168($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004631Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2000000u); } - PGXP_LOAD(0x8F2800A8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004631Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC2E324: 12280016 beq $s1, $t0, 0xBFC2E380 */ - uint32_t psx_brA_BFC2E324 = cpu->gpr[17]; uint32_t psx_brB_BFC2E324 = cpu->gpr[8]; - psx_taken_BFC2E324 = (psx_brA_BFC2E324 == psx_brB_BFC2E324); - psx_delay_BFC2E324 = 1; - /* 0xBFC2E328: 8FAE00AC lw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046328u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046328u); -#endif - if (psx_delay_BFC2E324) { - psx_delay_BFC2E324 = 0; - if (psx_taken_BFC2E324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046380u); - goto label_BFC2E380; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004632Cu); - } -label_BFC2E32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004632Cu); -#endif - /* 0xBFC2E32C: 8FA900AC lw $t1, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004632Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900ACu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E330: 001558C0 sll $t3, $s5, 3 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[21] << 3u; - PGXP_ALU(0x001558C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E334: 00095080 sll $t2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00095080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E338: 01495023 subu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[9]; - PGXP_ALU(0x01495023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E33C: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004633Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E340: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E344: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200800u); -#endif - /* 0xBFC2E348: 01755823 subu $t3, $t3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[21]; - PGXP_ALU(0x01755823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC2E34C: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004634Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2E350: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E354: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E358: 3C0C8011 lui $t4, 0x8011 */ - cpu->gpr[12] = 0x80110000u; - PGXP_ALU(0x3C0C8011u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E35C: 258C0F04 addiu $t4, $t4, 3844 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (3844)); - PGXP_ALU(0x258C0F04u, cpu->gpr[12], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x8004635Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2C00u); -#endif - /* 0xBFC2E360: 014B6821 addu $t5, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046360u); -#endif - /* 0xBFC2E364: 8FA400B0 lw $a0, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046364u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E368: 0C0112E0 jal 0xB0044B80 */ - cpu->gpr[31] = 0x80046370u; /* jal link before delay slot */ - psx_delay_BFC2E368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020u); -#endif - /* 0xBFC2E36C: 01AC2821 addu $a1, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004636Cu); -#endif - if (psx_delay_BFC2E368) { - psx_delay_BFC2E368 = 0; - cpu->gpr[31] = 0x80046370u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80044B80u); - cpu->pc = 0x80044B80u; return; - } -label_BFC2E370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2E370: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046370u); -#endif - /* 0xBFC2E374: 8EB59E24 lw $s5, -25052($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046374u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x200000u); } - PGXP_LOAD(0x8EB59E24u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80046374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E378: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046378u); -#endif - /* 0xBFC2E37C: 8FAE00AC lw $t6, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004637Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004637Cu); -#endif -label_BFC2E380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC2E380: 27DE0688 addiu $fp, $fp, 1672 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (1672)); - PGXP_ALU(0x27DE0688u, cpu->gpr[30], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80046380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2E384: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC2E388: 15F0FFDC bne $t7, $s0, 0xBFC2E2FC */ - uint32_t psx_brA_BFC2E388 = cpu->gpr[15]; uint32_t psx_brB_BFC2E388 = cpu->gpr[16]; - psx_taken_BFC2E388 = (psx_brA_BFC2E388 != psx_brB_BFC2E388); - psx_delay_BFC2E388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2E38C: AFAF00AC sw $t7, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004638Cu); return; } g_debug_last_store_pc = 0x8004638Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF00ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004638Cu); -#endif - if (psx_delay_BFC2E388) { - psx_delay_BFC2E388 = 0; - if (psx_taken_BFC2E388) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800462FCu); - goto label_BFC2E2FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046390u); - } -label_BFC2E390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E390: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046390u); -#endif - /* 0xBFC2E394: 8F189DE8 lw $t8, -25112($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046394u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DE8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80046394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2E39C: 13000005 beq $t8, $zero, 0xBFC2E3B4 */ - uint32_t psx_brA_BFC2E39C = cpu->gpr[24]; uint32_t psx_brB_BFC2E39C = cpu->gpr[0]; - psx_taken_BFC2E39C = (psx_brA_BFC2E39C == psx_brB_BFC2E39C); - psx_delay_BFC2E39C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E3A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800463A0u); -#endif - if (psx_delay_BFC2E39C) { - psx_delay_BFC2E39C = 0; - if (psx_taken_BFC2E39C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463B4u); - goto label_BFC2E3B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463A4u); - } -label_BFC2E3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2E3A4: 24051000 addiu $a1, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24051000u, cpu->gpr[5], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x800463A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E3A8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E3AC: 10000005 beq $zero, $zero, 0xBFC2E3C4 */ - uint32_t psx_brA_BFC2E3AC = cpu->gpr[0]; uint32_t psx_brB_BFC2E3AC = cpu->gpr[0]; - psx_taken_BFC2E3AC = (psx_brA_BFC2E3AC == psx_brB_BFC2E3AC); - psx_delay_BFC2E3AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2E3B0: AC258338 sw $a1, -31944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463B0u); return; } g_debug_last_store_pc = 0x800463B0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC258338u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800463B0u); -#endif - if (psx_delay_BFC2E3AC) { - psx_delay_BFC2E3AC = 0; - if (psx_taken_BFC2E3AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463C4u); - goto label_BFC2E3C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463B4u); - } -label_BFC2E3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2E3B4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463B4u); -#endif - /* 0xBFC2E3B8: 8CA5833C lw $a1, -31940($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31940; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31940)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463B8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5833Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800463B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E3BC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2E3C0: AC258338 sw $a1, -31944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463C0u); return; } g_debug_last_store_pc = 0x800463C0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC258338u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800463C0u); -#endif -label_BFC2E3C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E3C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E3C4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E3C8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463C8u); -#endif - /* 0xBFC2E3CC: 8C638328 lw $v1, -31960($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31960; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638328u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800463CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463D0u); -#endif - /* 0xBFC2E3D0: 8C428334 lw $v0, -31948($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428334u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800463D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2E3D4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463D4u); -#endif - /* 0xBFC2E3D8: 8CA5832C lw $a1, -31956($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31956; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31956)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463D8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5832Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800463D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2E3DC: 00621821 addu $v1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00621821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800463DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC2E3E0: 0065082A slt $at, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800463E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E3E4: 14200003 bne $at, $zero, 0xBFC2E3F4 */ - uint32_t psx_brA_BFC2E3E4 = cpu->gpr[1]; uint32_t psx_brB_BFC2E3E4 = cpu->gpr[0]; - psx_taken_BFC2E3E4 = (psx_brA_BFC2E3E4 != psx_brB_BFC2E3E4); - psx_delay_BFC2E3E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E3E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463E8u); -#endif - if (psx_delay_BFC2E3E4) { - psx_delay_BFC2E3E4 = 0; - if (psx_taken_BFC2E3E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463F4u); - goto label_BFC2E3F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463ECu); - } -label_BFC2E3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E3EC: 10000008 beq $zero, $zero, 0xBFC2E410 */ - uint32_t psx_brA_BFC2E3EC = cpu->gpr[0]; uint32_t psx_brB_BFC2E3EC = cpu->gpr[0]; - psx_taken_BFC2E3EC = (psx_brA_BFC2E3EC == psx_brB_BFC2E3EC); - psx_delay_BFC2E3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2E3F0: AC238328 sw $v1, -31960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463F0u); return; } g_debug_last_store_pc = 0x800463F0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC238328u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800463F0u); -#endif - if (psx_delay_BFC2E3EC) { - psx_delay_BFC2E3EC = 0; - if (psx_taken_BFC2E3EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046410u); - goto label_BFC2E410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800463F4u); - } -label_BFC2E3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800463F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2E3F4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463F4u); -#endif - /* 0xBFC2E3F8: 8F398330 lw $t9, -31952($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -31952; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-31952)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800463F8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F398330u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800463F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E3FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800463FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2E400: AC238328 sw $v1, -31960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046400u); return; } g_debug_last_store_pc = 0x80046400u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC238328u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000Au); -#endif - /* 0xBFC2E404: 0323082A slt $at, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0323082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E408: 14200005 bne $at, $zero, 0xBFC2E420 */ - uint32_t psx_brA_BFC2E408 = cpu->gpr[1]; uint32_t psx_brB_BFC2E408 = cpu->gpr[0]; - psx_taken_BFC2E408 = (psx_brA_BFC2E408 != psx_brB_BFC2E408); - psx_delay_BFC2E408 = 1; - /* 0xBFC2E40C: 8FBF004C lw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004640Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004640Cu); -#endif - if (psx_delay_BFC2E408) { - psx_delay_BFC2E408 = 0; - if (psx_taken_BFC2E408) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046420u); - goto label_BFC2E420; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046410u); - } -label_BFC2E410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E410: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E414: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2E418: AC228334 sw $v0, -31948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046418u); return; } g_debug_last_store_pc = 0x80046418u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228334u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046418u); -#endif - /* 0xBFC2E41C: 8FBF004C lw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004641Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004641Cu); -#endif -label_BFC2E420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046420u); -#endif - /* 0xBFC2E420: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046420u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80046420u); -#endif - /* 0xBFC2E424: 8FB1002C lw $s1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046424u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1002Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80046424u); -#endif - /* 0xBFC2E428: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046428u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80046428u); -#endif - /* 0xBFC2E42C: 8FB30034 lw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004642Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004642Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046430u); -#endif - /* 0xBFC2E430: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046430u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80046430u); -#endif - /* 0xBFC2E434: 8FB5003C lw $s5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046434u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5003Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80046434u); -#endif - /* 0xBFC2E438: 8FB60040 lw $s6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046438u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60040u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80046438u); -#endif - /* 0xBFC2E43C: 8FB70044 lw $s7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004643Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70044u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004643Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046440u); -#endif - /* 0xBFC2E440: 8FBE0048 lw $fp, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046440u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0048u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80046440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E444: 03E00008 jr $ra */ - psx_delay_BFC2E444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E448: 27BD00B0 addiu $sp, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27BD00B0u, cpu->gpr[29], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x80046448u); -#endif - if (psx_delay_BFC2E444) { - psx_delay_BFC2E444 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E44C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E44Cu); - int psx_delay_BFC2E450 = 0; - int psx_taken_BFC2E450 = 0; - int psx_delay_BFC2E458 = 0; - int psx_taken_BFC2E458 = 0; - int psx_delay_BFC2E460 = 0; - int psx_delay_BFC2E46C = 0; - int psx_taken_BFC2E46C = 0; - int psx_delay_BFC2E474 = 0; - int psx_taken_BFC2E474 = 0; - int psx_delay_BFC2E4C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E458u: goto label_BFC2E458; - case 0xBFC2E460u: goto label_BFC2E460; - case 0xBFC2E468u: goto label_BFC2E468; - case 0xBFC2E474u: goto label_BFC2E474; - case 0xBFC2E47Cu: goto label_BFC2E47C; - case 0xBFC2E4C0u: goto label_BFC2E4C0; - default: break; - } - } -label_BFC2E44C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E44Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E44C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2E450: 1C800003 bgtz $a0, 0xBFC2E460 */ - uint32_t psx_brA_BFC2E450 = cpu->gpr[4]; - psx_taken_BFC2E450 = ((int32_t)psx_brA_BFC2E450 > 0); - psx_delay_BFC2E450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2E454: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046454u); return; } g_debug_last_store_pc = 0x80046454u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046454u); -#endif - if (psx_delay_BFC2E450) { - psx_delay_BFC2E450 = 0; - if (psx_taken_BFC2E450) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046460u); - goto label_BFC2E460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046458u); - } -label_BFC2E458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E458: 10000019 beq $zero, $zero, 0xBFC2E4C0 */ - uint32_t psx_brA_BFC2E458 = cpu->gpr[0]; uint32_t psx_brB_BFC2E458 = cpu->gpr[0]; - psx_taken_BFC2E458 = (psx_brA_BFC2E458 == psx_brB_BFC2E458); - psx_delay_BFC2E458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E45C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004645Cu); -#endif - if (psx_delay_BFC2E458) { - psx_delay_BFC2E458 = 0; - if (psx_taken_BFC2E458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464C0u); - goto label_BFC2E4C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046460u); - } -label_BFC2E460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E460: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80046468u; /* jal link before delay slot */ - psx_delay_BFC2E460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2E464: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046464u); return; } g_debug_last_store_pc = 0x80046464u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046464u); -#endif - if (psx_delay_BFC2E460) { - psx_delay_BFC2E460 = 0; - cpu->gpr[31] = 0x80046468u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2E468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046468u); -#endif - /* 0xBFC2E468: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046468u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E46C: 04410003 bgez $v0, 0xBFC2E47C */ - uint32_t psx_brA_BFC2E46C = cpu->gpr[2]; - psx_taken_BFC2E46C = ((int32_t)psx_brA_BFC2E46C >= 0); - psx_delay_BFC2E46C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2E470: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046470u); -#endif - if (psx_delay_BFC2E46C) { - psx_delay_BFC2E46C = 0; - if (psx_taken_BFC2E46C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004647Cu); - goto label_BFC2E47C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046474u); - } -label_BFC2E474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E474: 10000012 beq $zero, $zero, 0xBFC2E4C0 */ - uint32_t psx_brA_BFC2E474 = cpu->gpr[0]; uint32_t psx_brB_BFC2E474 = cpu->gpr[0]; - psx_taken_BFC2E474 = (psx_brA_BFC2E474 == psx_brB_BFC2E474); - psx_delay_BFC2E474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E478: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80046478u); -#endif - if (psx_delay_BFC2E474) { - psx_delay_BFC2E474 = 0; - if (psx_taken_BFC2E474) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800464C0u); - goto label_BFC2E4C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004647Cu); - } -label_BFC2E47C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E47Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E47C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2E480: AC238320 sw $v1, -31968($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31968; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046480u); return; } g_debug_last_store_pc = 0x80046480u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC238320u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E484: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2E488: AC248324 sw $a0, -31964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046488u); return; } g_debug_last_store_pc = 0x80046488u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC248324u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E48C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2E490: 240E1000 addiu $t6, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240E1000u, cpu->gpr[14], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2E494: AC2E8338 sw $t6, -31944($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046494u); return; } g_debug_last_store_pc = 0x80046494u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8338u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E498: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2E49C: 240F0040 addiu $t7, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240F0040u, cpu->gpr[15], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2E4A0: AC2F8344 sw $t7, -31932($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31932; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31932)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464A0u); return; } g_debug_last_store_pc = 0x800464A0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F8344u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800464A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E4A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800464A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2E4A8: 24180080 addiu $t8, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24180080u, cpu->gpr[24], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800464A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2E4AC: AC388328 sw $t8, -31960($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31960; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31960)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464ACu); return; } g_debug_last_store_pc = 0x800464ACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC388328u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800464ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E4B0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800464B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2E4B4: 24190006 addiu $t9, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24190006u, cpu->gpr[25], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x800464B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2E4B8: AC398334 sw $t9, -31948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464B8u); return; } g_debug_last_store_pc = 0x800464B8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC398334u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800464B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2E4BC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800464BCu); -#endif -label_BFC2E4C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E4C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464C0u); -#endif - /* 0xBFC2E4C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800464C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E4C4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800464C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E4C8: 03E00008 jr $ra */ - psx_delay_BFC2E4C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E4CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800464CCu); -#endif - if (psx_delay_BFC2E4C8) { - psx_delay_BFC2E4C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E4D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E4D0u); - int psx_delay_BFC2E500 = 0; -label_BFC2E4D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E4D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E4D0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800464D0u); -#endif - /* 0xBFC2E4D4: 8DCE8320 lw $t6, -31968($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464D4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8320u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800464D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E4D8: 3C028011 lui $v0, 0x8011 */ - cpu->gpr[2] = 0x80110000u; - PGXP_ALU(0x3C028011u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800464D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2E4DC: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800464DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2E4E0: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800464E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E4E4: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800464E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2E4E8: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800464E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E4EC: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800464ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800464F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2E4F0: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800464F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E4F4: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800464F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E4F8: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800464F8u); -#endif - /* 0xBFC2E4FC: 8C420ECC lw $v0, 3788($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3788; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (3788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800464FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C420ECCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800464FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E500: 03E00008 jr $ra */ - psx_delay_BFC2E500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046504u); -#endif - if (psx_delay_BFC2E500) { - psx_delay_BFC2E500 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E544(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E544u); - int psx_delay_BFC2E56C = 0; -label_BFC2E544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E544: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046544u); -#endif - /* 0xBFC2E548: 8C428348 lw $v0, -31928($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046548u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428348u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E54C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046550u); -#endif - /* 0xBFC2E550: 8DCE8324 lw $t6, -31964($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046550u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8324u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E554: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E558: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2E55C: 002F0821 addu $at, $at, $t7 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[15]; - PGXP_ALU(0x002F0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2E560: AC2E9D70 sw $t6, -25232($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046560u); return; } g_debug_last_store_pc = 0x80046560u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9D70u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E564: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E568: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E56C: 03E00008 jr $ra */ - psx_delay_BFC2E56C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2E570: AC228348 sw $v0, -31928($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31928; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046570u); return; } g_debug_last_store_pc = 0x80046570u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228348u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046570u); -#endif - if (psx_delay_BFC2E56C) { - psx_delay_BFC2E56C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E574(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E574u); - int psx_delay_BFC2E580 = 0; - int psx_taken_BFC2E580 = 0; - int psx_delay_BFC2E588 = 0; - int psx_delay_BFC2E5AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E588u: goto label_BFC2E588; - case 0xBFC2E590u: goto label_BFC2E590; - default: break; - } - } -label_BFC2E574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E574: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046574u); -#endif - /* 0xBFC2E578: 8C638348 lw $v1, -31928($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046578u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638348u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E57C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004657Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E580: 1C600003 bgtz $v1, 0xBFC2E590 */ - uint32_t psx_brA_BFC2E580 = cpu->gpr[3]; - psx_taken_BFC2E580 = ((int32_t)psx_brA_BFC2E580 > 0); - psx_delay_BFC2E580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E584: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046584u); -#endif - if (psx_delay_BFC2E580) { - psx_delay_BFC2E580 = 0; - if (psx_taken_BFC2E580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046590u); - goto label_BFC2E590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046588u); - } -label_BFC2E588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E588: 03E00008 jr $ra */ - psx_delay_BFC2E588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E58C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004658Cu); -#endif - if (psx_delay_BFC2E588) { - psx_delay_BFC2E588 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2E590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E590: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80046590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E594: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E598: 3C028009 lui $v0, 0x8009 */ - cpu->gpr[2] = 0x80090000u; - PGXP_ALU(0x3C028009u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E59C: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004659Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E5A0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800465A0u); -#endif - /* 0xBFC2E5A4: 8C429D70 lw $v0, -25232($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800465A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429D70u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800465A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2E5A8: AC238348 sw $v1, -31928($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31928; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800465A8u); return; } g_debug_last_store_pc = 0x800465A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC238348u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800465A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E5AC: 03E00008 jr $ra */ - psx_delay_BFC2E5AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E5B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800465B0u); -#endif - if (psx_delay_BFC2E5AC) { - psx_delay_BFC2E5AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E5B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E5B4u); - int psx_delay_BFC2E5B8 = 0; -label_BFC2E5B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E5B4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800465B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E5B8: 03E00008 jr $ra */ - psx_delay_BFC2E5B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2E5BC: AC208348 sw $zero, -31928($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31928; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800465BCu); return; } g_debug_last_store_pc = 0x800465BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC208348u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800465BCu); -#endif - if (psx_delay_BFC2E5B8) { - psx_delay_BFC2E5B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E5C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E5C0u); - int psx_delay_BFC2E5D8 = 0; - int psx_taken_BFC2E5D8 = 0; - int psx_delay_BFC2E5E0 = 0; - int psx_delay_BFC2E5EC = 0; - int psx_taken_BFC2E5EC = 0; - int psx_delay_BFC2E5F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E5D0u: goto label_BFC2E5D0; - case 0xBFC2E5E0u: goto label_BFC2E5E0; - case 0xBFC2E5E8u: goto label_BFC2E5E8; - case 0xBFC2E5F4u: goto label_BFC2E5F4; - default: break; - } - } -label_BFC2E5C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E5C0: 3C028011 lui $v0, 0x8011 */ - cpu->gpr[2] = 0x80110000u; - PGXP_ALU(0x3C028011u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800465C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E5C4: 24420EC8 addiu $v0, $v0, 3784 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (3784)); - PGXP_ALU(0x24420EC8u, cpu->gpr[2], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800465C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2E5C8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800465C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2E5CC: 24050060 addiu $a1, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24050060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x800465CCu); -#endif -label_BFC2E5D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465D0u); -#endif - /* 0xBFC2E5D0: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800465D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800465D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E5D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800465D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2E5D8: 148E0003 bne $a0, $t6, 0xBFC2E5E8 */ - uint32_t psx_brA_BFC2E5D8 = cpu->gpr[4]; uint32_t psx_brB_BFC2E5D8 = cpu->gpr[14]; - psx_taken_BFC2E5D8 = (psx_brA_BFC2E5D8 != psx_brB_BFC2E5D8); - psx_delay_BFC2E5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E5DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800465DCu); -#endif - if (psx_delay_BFC2E5D8) { - psx_delay_BFC2E5D8 = 0; - if (psx_taken_BFC2E5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465E8u); - goto label_BFC2E5E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465E0u); - } -label_BFC2E5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E5E0: 03E00008 jr $ra */ - psx_delay_BFC2E5E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2E5E4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800465E4u); -#endif - if (psx_delay_BFC2E5E0) { - psx_delay_BFC2E5E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2E5E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E5E8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800465E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC2E5EC: 1465FFF8 bne $v1, $a1, 0xBFC2E5D0 */ - uint32_t psx_brA_BFC2E5EC = cpu->gpr[3]; uint32_t psx_brB_BFC2E5EC = cpu->gpr[5]; - psx_taken_BFC2E5EC = (psx_brA_BFC2E5EC != psx_brB_BFC2E5EC); - psx_delay_BFC2E5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E5F0: 24420688 addiu $v0, $v0, 1672 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1672)); - PGXP_ALU(0x24420688u, cpu->gpr[2], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x800465F0u); -#endif - if (psx_delay_BFC2E5EC) { - psx_delay_BFC2E5EC = 0; - if (psx_taken_BFC2E5EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465D0u); - goto label_BFC2E5D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465F4u); - } -label_BFC2E5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800465F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2E5F4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800465F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E5F8: 03E00008 jr $ra */ - psx_delay_BFC2E5F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E5FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800465FCu); -#endif - if (psx_delay_BFC2E5F8) { - psx_delay_BFC2E5F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E600(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E600u); - int psx_delay_BFC2E608 = 0; - int psx_delay_BFC2E654 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E610u: goto label_BFC2E610; - default: break; - } - } -label_BFC2E600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E600: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2E604: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046604u); return; } g_debug_last_store_pc = 0x80046604u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E608: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80046610u; /* jal link before delay slot */ - psx_delay_BFC2E608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E60C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004660Cu); -#endif - if (psx_delay_BFC2E608) { - psx_delay_BFC2E608 = 0; - cpu->gpr[31] = 0x80046610u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2E610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E610: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E614: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E618: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046618u); -#endif - /* 0xBFC2E61C: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004661Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004661Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E620: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E624: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E628: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2E62C: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004662Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E630: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2E634: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046634u); -#endif - /* 0xBFC2E638: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046638u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E63C: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004663Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E640: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E644: 3C088011 lui $t0, 0x8011 */ - cpu->gpr[8] = 0x80110000u; - PGXP_ALU(0x3C088011u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E648: 25080F1C addiu $t0, $t0, 3868 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (3868)); - PGXP_ALU(0x25080F1Cu, cpu->gpr[8], _pgx1, 0x00000F1Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2E64C: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004664Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC2E650: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E654: 03E00008 jr $ra */ - psx_delay_BFC2E654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E658: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80046658u); -#endif - if (psx_delay_BFC2E654) { - psx_delay_BFC2E654 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E65C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E65Cu); - int psx_delay_BFC2E664 = 0; - int psx_delay_BFC2E6B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E66Cu: goto label_BFC2E66C; - default: break; - } - } -label_BFC2E65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E65C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2E660: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046660u); return; } g_debug_last_store_pc = 0x80046660u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E664: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x8004666Cu; /* jal link before delay slot */ - psx_delay_BFC2E664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E668: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046668u); -#endif - if (psx_delay_BFC2E664) { - psx_delay_BFC2E664 = 0; - cpu->gpr[31] = 0x8004666Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2E66C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E66Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E66C: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E670: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E674: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046674u); -#endif - /* 0xBFC2E678: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046678u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E67C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E680: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E684: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2E688: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2E68C: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2E690: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046690u); -#endif - /* 0xBFC2E694: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046694u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E698: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E69C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004669Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E6A0: 3C088011 lui $t0, 0x8011 */ - cpu->gpr[8] = 0x80110000u; - PGXP_ALU(0x3C088011u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800466A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E6A4: 25080F04 addiu $t0, $t0, 3844 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (3844)); - PGXP_ALU(0x25080F04u, cpu->gpr[8], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x800466A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2E6A8: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC2E6AC: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E6B0: 03E00008 jr $ra */ - psx_delay_BFC2E6B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E6B4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800466B4u); -#endif - if (psx_delay_BFC2E6B0) { - psx_delay_BFC2E6B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E6B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E6B8u); - int psx_delay_BFC2E6FC = 0; - int psx_taken_BFC2E6FC = 0; - int psx_delay_BFC2E70C = 0; - int psx_taken_BFC2E70C = 0; - int psx_delay_BFC2E73C = 0; - int psx_delay_BFC2E744 = 0; - int psx_taken_BFC2E744 = 0; - int psx_delay_BFC2E758 = 0; - int psx_taken_BFC2E758 = 0; - int psx_delay_BFC2E768 = 0; - int psx_taken_BFC2E768 = 0; - int psx_delay_BFC2E798 = 0; - int psx_delay_BFC2E7BC = 0; - int psx_taken_BFC2E7BC = 0; - int psx_delay_BFC2E7EC = 0; - int psx_taken_BFC2E7EC = 0; - int psx_delay_BFC2E7F8 = 0; - int psx_delay_BFC2E81C = 0; - int psx_taken_BFC2E81C = 0; - int psx_delay_BFC2E84C = 0; - int psx_taken_BFC2E84C = 0; - int psx_delay_BFC2E858 = 0; - int psx_delay_BFC2E87C = 0; - int psx_taken_BFC2E87C = 0; - int psx_delay_BFC2E8AC = 0; - int psx_taken_BFC2E8AC = 0; - int psx_delay_BFC2E8B4 = 0; - int psx_delay_BFC2E8C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E704u: goto label_BFC2E704; - case 0xBFC2E714u: goto label_BFC2E714; - case 0xBFC2E744u: goto label_BFC2E744; - case 0xBFC2E74Cu: goto label_BFC2E74C; - case 0xBFC2E750u: goto label_BFC2E750; - case 0xBFC2E760u: goto label_BFC2E760; - case 0xBFC2E770u: goto label_BFC2E770; - case 0xBFC2E7A0u: goto label_BFC2E7A0; - case 0xBFC2E7B4u: goto label_BFC2E7B4; - case 0xBFC2E7C4u: goto label_BFC2E7C4; - case 0xBFC2E7F4u: goto label_BFC2E7F4; - case 0xBFC2E800u: goto label_BFC2E800; - case 0xBFC2E814u: goto label_BFC2E814; - case 0xBFC2E824u: goto label_BFC2E824; - case 0xBFC2E854u: goto label_BFC2E854; - case 0xBFC2E860u: goto label_BFC2E860; - case 0xBFC2E874u: goto label_BFC2E874; - case 0xBFC2E884u: goto label_BFC2E884; - case 0xBFC2E8B4u: goto label_BFC2E8B4; - case 0xBFC2E8BCu: goto label_BFC2E8BC; - case 0xBFC2E8C0u: goto label_BFC2E8C0; - default: break; - } - } -label_BFC2E6B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E6B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2E6B8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800466B8u); -#endif - /* 0xBFC2E6BC: 8C638320 lw $v1, -31968($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800466BCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638320u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800466BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E6C0: 3C078011 lui $a3, 0x8011 */ - cpu->gpr[7] = 0x80110000u; - PGXP_ALU(0x3C078011u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800466C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E6C4: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800466C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E6C8: 01C37023 subu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[3]; - PGXP_ALU(0x01C37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E6CC: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800466CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E6D0: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E6D4: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800466D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E6D8: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E6DC: 24E70EC8 addiu $a3, $a3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (3784)); - PGXP_ALU(0x24E70EC8u, cpu->gpr[7], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800466DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E6E0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800466E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E6E4: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800466E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2E6E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800466E8u); return; } g_debug_last_store_pc = 0x800466E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800466E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4084u); -#endif - /* 0xBFC2E6EC: 00EE1021 addu $v0, $a3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[14]; - PGXP_ALU(0x00EE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800466F0u); -#endif - /* 0xBFC2E6F0: 8C4F0038 lw $t7, 56($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800466F0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800466F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC2E6F4: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC2E6F8: 00AFC024 and $t8, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[15]; - PGXP_ALU(0x00AFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800466F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2E6FC: 13000013 beq $t8, $zero, 0xBFC2E74C */ - uint32_t psx_brA_BFC2E6FC = cpu->gpr[24]; uint32_t psx_brB_BFC2E6FC = cpu->gpr[0]; - psx_taken_BFC2E6FC = (psx_brA_BFC2E6FC == psx_brB_BFC2E6FC); - psx_delay_BFC2E6FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC2E700: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046700u); -#endif - if (psx_delay_BFC2E6FC) { - psx_delay_BFC2E6FC = 0; - if (psx_taken_BFC2E6FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004674Cu); - goto label_BFC2E74C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046704u); - } -label_BFC2E704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046704u); -#endif - /* 0xBFC2E704: 8C590034 lw $t9, 52($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046704u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E708: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2E70C: 13200010 beq $t9, $zero, 0xBFC2E750 */ - uint32_t psx_brA_BFC2E70C = cpu->gpr[25]; uint32_t psx_brB_BFC2E70C = cpu->gpr[0]; - psx_taken_BFC2E70C = (psx_brA_BFC2E70C == psx_brB_BFC2E70C); - psx_delay_BFC2E70C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E710: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046710u); -#endif - if (psx_delay_BFC2E70C) { - psx_delay_BFC2E70C = 0; - if (psx_taken_BFC2E70C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046750u); - goto label_BFC2E750; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046714u); - } -label_BFC2E714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC2E714: 00064080 sll $t0, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00064080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC2E718: 01064023 subu $t0, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[6]; - PGXP_ALU(0x01064023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E71C: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004671Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC2E720: 01064021 addu $t0, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[6]; - PGXP_ALU(0x01064021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E724: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC2E728: 01064021 addu $t0, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[6]; - PGXP_ALU(0x01064021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E72C: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004672Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x380u); -#endif - /* 0xBFC2E730: 00E84821 addu $t1, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[7] + cpu->gpr[8]; - PGXP_ALU(0x00E84821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046730u); -#endif - /* 0xBFC2E734: 8D2A0034 lw $t2, 52($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046734u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } - PGXP_LOAD(0x8D2A0034u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80046734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC2E738: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC2E73C: 0140F809 jalr $ra, $t2 */ - cpu->gpr[31] = 0x80046744u; /* jalr link before delay slot */ - psx_delay_BFC2E73C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046740u); -#endif - if (psx_delay_BFC2E73C) { - psx_delay_BFC2E73C = 0; - { uint32_t _t = cpu->gpr[10]; - cpu->gpr[31] = 0x80046744u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC2E744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E744: 1000005E beq $zero, $zero, 0xBFC2E8C0 */ - uint32_t psx_brA_BFC2E744 = cpu->gpr[0]; uint32_t psx_brB_BFC2E744 = cpu->gpr[0]; - psx_taken_BFC2E744 = (psx_brA_BFC2E744 == psx_brB_BFC2E744); - psx_delay_BFC2E744 = 1; - /* 0xBFC2E748: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046748u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046748u); -#endif - if (psx_delay_BFC2E744) { - psx_delay_BFC2E744 = 0; - if (psx_taken_BFC2E744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468C0u); - goto label_BFC2E8C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004674Cu); - } -label_BFC2E74C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E74Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004674Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E74C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004674Cu); -#endif -label_BFC2E750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E750: 34218000 ori $at, $at, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x8000u; - PGXP_ALU(0x34218000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x822u); -#endif - /* 0xBFC2E754: 00A15824 and $t3, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A15824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2E758: 11600016 beq $t3, $zero, 0xBFC2E7B4 */ - uint32_t psx_brA_BFC2E758 = cpu->gpr[11]; uint32_t psx_brB_BFC2E758 = cpu->gpr[0]; - psx_taken_BFC2E758 = (psx_brA_BFC2E758 == psx_brB_BFC2E758); - psx_delay_BFC2E758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E75C: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004675Cu); -#endif - if (psx_delay_BFC2E758) { - psx_delay_BFC2E758 = 0; - if (psx_taken_BFC2E758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800467B4u); - goto label_BFC2E7B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046760u); - } -label_BFC2E760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046760u); -#endif - /* 0xBFC2E760: 8C4C001C lw $t4, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046760u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x4u); } - PGXP_LOAD(0x8C4C001Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80046760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E764: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2E768: 11800012 beq $t4, $zero, 0xBFC2E7B4 */ - uint32_t psx_brA_BFC2E768 = cpu->gpr[12]; uint32_t psx_brB_BFC2E768 = cpu->gpr[0]; - psx_taken_BFC2E768 = (psx_brA_BFC2E768 == psx_brB_BFC2E768); - psx_delay_BFC2E768 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E76C: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004676Cu); -#endif - if (psx_delay_BFC2E768) { - psx_delay_BFC2E768 = 0; - if (psx_taken_BFC2E768) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800467B4u); - goto label_BFC2E7B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046770u); - } -label_BFC2E770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC2E770: 00066880 sll $t5, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC2E774: 01A66823 subu $t5, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[13] - cpu->gpr[6]; - PGXP_ALU(0x01A66823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2E778: 000D6880 sll $t5, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC2E77C: 01A66821 addu $t5, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[6]; - PGXP_ALU(0x01A66821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2E780: 000D6900 sll $t5, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D6900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC2E784: 01A66821 addu $t5, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[6]; - PGXP_ALU(0x01A66821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2E788: 000D68C0 sll $t5, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6080u); -#endif - /* 0xBFC2E78C: 00ED7021 addu $t6, $a3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[7] + cpu->gpr[13]; - PGXP_ALU(0x00ED7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046790u); -#endif - /* 0xBFC2E790: 8DC4001C lw $a0, 28($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046790u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4000u); } - PGXP_LOAD(0x8DC4001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2E794: AFA6001C sw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046794u); return; } g_debug_last_store_pc = 0x80046794u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80046794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E798: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800467A0u; /* jal link before delay slot */ - psx_delay_BFC2E798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2E79C: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004679Cu); return; } g_debug_last_store_pc = 0x8004679Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004679Cu); -#endif - if (psx_delay_BFC2E798) { - psx_delay_BFC2E798 = 0; - cpu->gpr[31] = 0x800467A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E7A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E7A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E7A0: 3C078011 lui $a3, 0x8011 */ - cpu->gpr[7] = 0x80110000u; - PGXP_ALU(0x3C078011u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800467A0u); -#endif - /* 0xBFC2E7A4: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800467A4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800467A4u); -#endif - /* 0xBFC2E7A8: 8FA6001C lw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800467A8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800467A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E7AC: 24E70EC8 addiu $a3, $a3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (3784)); - PGXP_ALU(0x24E70EC8u, cpu->gpr[7], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800467ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E7B0: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800467B0u); -#endif -label_BFC2E7B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E7B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E7B4: 34212000 ori $at, $at, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2000u; - PGXP_ALU(0x34212000u, cpu->gpr[1], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x800467B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8022u); -#endif - /* 0xBFC2E7B8: 00A17824 and $t7, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800467B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2E7BC: 11E00015 beq $t7, $zero, 0xBFC2E814 */ - uint32_t psx_brA_BFC2E7BC = cpu->gpr[15]; uint32_t psx_brB_BFC2E7BC = cpu->gpr[0]; - psx_taken_BFC2E7BC = (psx_brA_BFC2E7BC == psx_brB_BFC2E7BC); - psx_delay_BFC2E7BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E7C0: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800467C0u); -#endif - if (psx_delay_BFC2E7BC) { - psx_delay_BFC2E7BC = 0; - if (psx_taken_BFC2E7BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046814u); - goto label_BFC2E814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800467C4u); - } -label_BFC2E7C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E7C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2E7C4: 0006C080 sll $t8, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 2u; - PGXP_ALU(0x0006C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800467C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2E7C8: 0306C023 subu $t8, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[6]; - PGXP_ALU(0x0306C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800467C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E7CC: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800467CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2E7D0: 0306C021 addu $t8, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[6]; - PGXP_ALU(0x0306C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800467D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E7D4: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800467D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2E7D8: 0306C021 addu $t8, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[6]; - PGXP_ALU(0x0306C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800467D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2E7DC: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800467DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000080u); -#endif - /* 0xBFC2E7E0: 00F8C821 addu $t9, $a3, $t8 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[7] + cpu->gpr[24]; - PGXP_ALU(0x00F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800467E0u); -#endif - /* 0xBFC2E7E4: 8F240020 lw $a0, 32($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800467E4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000000u); } - PGXP_LOAD(0x8F240020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800467E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E7E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800467E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2E7EC: 10800009 beq $a0, $zero, 0xBFC2E814 */ - uint32_t psx_brA_BFC2E7EC = cpu->gpr[4]; uint32_t psx_brB_BFC2E7EC = cpu->gpr[0]; - psx_taken_BFC2E7EC = (psx_brA_BFC2E7EC == psx_brB_BFC2E7EC); - psx_delay_BFC2E7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E7F0: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800467F0u); -#endif - if (psx_delay_BFC2E7EC) { - psx_delay_BFC2E7EC = 0; - if (psx_taken_BFC2E7EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046814u); - goto label_BFC2E814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800467F4u); - } -label_BFC2E7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800467F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2E7F4: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800467F4u); return; } g_debug_last_store_pc = 0x800467F4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800467F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E7F8: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80046800u; /* jal link before delay slot */ - psx_delay_BFC2E7F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2E7FC: AFA6001C sw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800467FCu); return; } g_debug_last_store_pc = 0x800467FCu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800467FCu); -#endif - if (psx_delay_BFC2E7F8) { - psx_delay_BFC2E7F8 = 0; - cpu->gpr[31] = 0x80046800u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E800: 3C078011 lui $a3, 0x8011 */ - cpu->gpr[7] = 0x80110000u; - PGXP_ALU(0x3C078011u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046800u); -#endif - /* 0xBFC2E804: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046804u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046804u); -#endif - /* 0xBFC2E808: 8FA6001C lw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046808u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80046808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E80C: 24E70EC8 addiu $a3, $a3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (3784)); - PGXP_ALU(0x24E70EC8u, cpu->gpr[7], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E810: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046810u); -#endif -label_BFC2E814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E814: 34211000 ori $at, $at, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1000u; - PGXP_ALU(0x34211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC2E818: 00A14024 and $t0, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A14024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC2E81C: 11000015 beq $t0, $zero, 0xBFC2E874 */ - uint32_t psx_brA_BFC2E81C = cpu->gpr[8]; uint32_t psx_brB_BFC2E81C = cpu->gpr[0]; - psx_taken_BFC2E81C = (psx_brA_BFC2E81C == psx_brB_BFC2E81C); - psx_delay_BFC2E81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E820: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046820u); -#endif - if (psx_delay_BFC2E81C) { - psx_delay_BFC2E81C = 0; - if (psx_taken_BFC2E81C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046874u); - goto label_BFC2E874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046824u); - } -label_BFC2E824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC2E824: 00064880 sll $t1, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00064880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC2E828: 01264823 subu $t1, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[6]; - PGXP_ALU(0x01264823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E82C: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004682Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC2E830: 01264821 addu $t1, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[6]; - PGXP_ALU(0x01264821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E834: 00094900 sll $t1, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00094900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC2E838: 01264821 addu $t1, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[6]; - PGXP_ALU(0x01264821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2E83C: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004683Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x680u); -#endif - /* 0xBFC2E840: 00E95021 addu $t2, $a3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[7] + cpu->gpr[9]; - PGXP_ALU(0x00E95021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046840u); -#endif - /* 0xBFC2E844: 8D440024 lw $a0, 36($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046844u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400u); } - PGXP_LOAD(0x8D440024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2E84C: 10800009 beq $a0, $zero, 0xBFC2E874 */ - uint32_t psx_brA_BFC2E84C = cpu->gpr[4]; uint32_t psx_brB_BFC2E84C = cpu->gpr[0]; - psx_taken_BFC2E84C = (psx_brA_BFC2E84C == psx_brB_BFC2E84C); - psx_delay_BFC2E84C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E850: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046850u); -#endif - if (psx_delay_BFC2E84C) { - psx_delay_BFC2E84C = 0; - if (psx_taken_BFC2E84C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046874u); - goto label_BFC2E874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046854u); - } -label_BFC2E854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2E854: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046854u); return; } g_debug_last_store_pc = 0x80046854u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E858: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80046860u; /* jal link before delay slot */ - psx_delay_BFC2E858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC2E85C: AFA6001C sw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004685Cu); return; } g_debug_last_store_pc = 0x8004685Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004685Cu); -#endif - if (psx_delay_BFC2E858) { - psx_delay_BFC2E858 = 0; - cpu->gpr[31] = 0x80046860u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E860: 3C078011 lui $a3, 0x8011 */ - cpu->gpr[7] = 0x80110000u; - PGXP_ALU(0x3C078011u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046860u); -#endif - /* 0xBFC2E864: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046864u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046864u); -#endif - /* 0xBFC2E868: 8FA6001C lw $a2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046868u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80046868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2E86C: 24E70EC8 addiu $a3, $a3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (3784)); - PGXP_ALU(0x24E70EC8u, cpu->gpr[7], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004686Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E870: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046870u); -#endif -label_BFC2E874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E874: 34214000 ori $at, $at, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4000u; - PGXP_ALU(0x34214000u, cpu->gpr[1], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x822u); -#endif - /* 0xBFC2E878: 00A15824 and $t3, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A15824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2E87C: 11600010 beq $t3, $zero, 0xBFC2E8C0 */ - uint32_t psx_brA_BFC2E87C = cpu->gpr[11]; uint32_t psx_brB_BFC2E87C = cpu->gpr[0]; - psx_taken_BFC2E87C = (psx_brA_BFC2E87C == psx_brB_BFC2E87C); - psx_delay_BFC2E87C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046880u); -#endif - /* 0xBFC2E880: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046880u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046880u); -#endif - if (psx_delay_BFC2E87C) { - psx_delay_BFC2E87C = 0; - if (psx_taken_BFC2E87C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468C0u); - goto label_BFC2E8C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046884u); - } -label_BFC2E884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC2E884: 00066080 sll $t4, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00066080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC2E888: 01866023 subu $t4, $t4, $a2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[6]; - PGXP_ALU(0x01866023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E88C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC2E890: 01866021 addu $t4, $t4, $a2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[6]; - PGXP_ALU(0x01866021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E894: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC2E898: 01866021 addu $t4, $t4, $a2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[6]; - PGXP_ALU(0x01866021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2E89C: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3080u); -#endif - /* 0xBFC2E8A0: 00EC6821 addu $t5, $a3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[7] + cpu->gpr[12]; - PGXP_ALU(0x00EC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800468A0u); -#endif - /* 0xBFC2E8A4: 8DA40028 lw $a0, 40($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800468A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000u); } - PGXP_LOAD(0x8DA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800468A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E8A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800468A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2E8AC: 10800004 beq $a0, $zero, 0xBFC2E8C0 */ - uint32_t psx_brA_BFC2E8AC = cpu->gpr[4]; uint32_t psx_brB_BFC2E8AC = cpu->gpr[0]; - psx_taken_BFC2E8AC = (psx_brA_BFC2E8AC == psx_brB_BFC2E8AC); - psx_delay_BFC2E8AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468B0u); -#endif - /* 0xBFC2E8B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800468B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800468B0u); -#endif - if (psx_delay_BFC2E8AC) { - psx_delay_BFC2E8AC = 0; - if (psx_taken_BFC2E8AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468C0u); - goto label_BFC2E8C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468B4u); - } -label_BFC2E8B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E8B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E8B4: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800468BCu; /* jal link before delay slot */ - psx_delay_BFC2E8B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E8B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800468B8u); -#endif - if (psx_delay_BFC2E8B4) { - psx_delay_BFC2E8B4 = 0; - cpu->gpr[31] = 0x800468BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468BCu); -#endif - /* 0xBFC2E8BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800468BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800468BCu); -#endif -label_BFC2E8C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E8C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E8C0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800468C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2E8C4: 03E00008 jr $ra */ - psx_delay_BFC2E8C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E8C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800468C8u); -#endif - if (psx_delay_BFC2E8C4) { - psx_delay_BFC2E8C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2E8CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2E8CCu); - int psx_delay_BFC2E8EC = 0; - int psx_taken_BFC2E8EC = 0; - int psx_delay_BFC2E8F8 = 0; - int psx_taken_BFC2E8F8 = 0; - int psx_delay_BFC2E930 = 0; - int psx_taken_BFC2E930 = 0; - int psx_delay_BFC2E960 = 0; - int psx_delay_BFC2E984 = 0; - int psx_taken_BFC2E984 = 0; - int psx_delay_BFC2E9B4 = 0; - int psx_taken_BFC2E9B4 = 0; - int psx_delay_BFC2E9C0 = 0; - int psx_delay_BFC2E9E4 = 0; - int psx_taken_BFC2E9E4 = 0; - int psx_delay_BFC2EA14 = 0; - int psx_taken_BFC2EA14 = 0; - int psx_delay_BFC2EA20 = 0; - int psx_delay_BFC2EA44 = 0; - int psx_taken_BFC2EA44 = 0; - int psx_delay_BFC2EA74 = 0; - int psx_taken_BFC2EA74 = 0; - int psx_delay_BFC2EA7C = 0; - int psx_delay_BFC2EA8C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2E8F4u: goto label_BFC2E8F4; - case 0xBFC2E900u: goto label_BFC2E900; - case 0xBFC2E938u: goto label_BFC2E938; - case 0xBFC2E968u: goto label_BFC2E968; - case 0xBFC2E978u: goto label_BFC2E978; - case 0xBFC2E97Cu: goto label_BFC2E97C; - case 0xBFC2E98Cu: goto label_BFC2E98C; - case 0xBFC2E9BCu: goto label_BFC2E9BC; - case 0xBFC2E9C8u: goto label_BFC2E9C8; - case 0xBFC2E9DCu: goto label_BFC2E9DC; - case 0xBFC2E9ECu: goto label_BFC2E9EC; - case 0xBFC2EA1Cu: goto label_BFC2EA1C; - case 0xBFC2EA28u: goto label_BFC2EA28; - case 0xBFC2EA3Cu: goto label_BFC2EA3C; - case 0xBFC2EA4Cu: goto label_BFC2EA4C; - case 0xBFC2EA7Cu: goto label_BFC2EA7C; - case 0xBFC2EA84u: goto label_BFC2EA84; - case 0xBFC2EA88u: goto label_BFC2EA88; - default: break; - } - } -label_BFC2E8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2E8CC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800468CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E8D0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800468D0u); -#endif - /* 0xBFC2E8D4: 8C428320 lw $v0, -31968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800468D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428320u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800468D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC2E8D8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800468D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E8DC: 34218000 ori $at, $at, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x8000u; - PGXP_ALU(0x34218000u, cpu->gpr[1], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x800468DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2E8E0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800468E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4022u); -#endif - /* 0xBFC2E8E4: 00A17024 and $t6, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A17024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800468E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2E8E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800468E8u); return; } g_debug_last_store_pc = 0x800468E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800468E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2E8EC: 15C00004 bne $t6, $zero, 0xBFC2E900 */ - uint32_t psx_brA_BFC2E8EC = cpu->gpr[14]; uint32_t psx_brB_BFC2E8EC = cpu->gpr[0]; - psx_taken_BFC2E8EC = (psx_brA_BFC2E8EC != psx_brB_BFC2E8EC); - psx_delay_BFC2E8EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2E8F0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800468F0u); -#endif - if (psx_delay_BFC2E8EC) { - psx_delay_BFC2E8EC = 0; - if (psx_taken_BFC2E8EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046900u); - goto label_BFC2E900; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800468F4u); - } -label_BFC2E8F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E8F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800468F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E8F4: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800468F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E8F8: 1000001F beq $zero, $zero, 0xBFC2E978 */ - uint32_t psx_brA_BFC2E8F8 = cpu->gpr[0]; uint32_t psx_brB_BFC2E8F8 = cpu->gpr[0]; - psx_taken_BFC2E8F8 = (psx_brA_BFC2E8F8 == psx_brB_BFC2E8F8); - psx_delay_BFC2E8F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E8FC: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800468FCu); -#endif - if (psx_delay_BFC2E8F8) { - psx_delay_BFC2E8F8 = 0; - if (psx_taken_BFC2E8F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046978u); - goto label_BFC2E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046900u); - } -label_BFC2E900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E900: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E904: 01E27823 subu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E908: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E90C: 01E27821 addu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[2]; - PGXP_ALU(0x01E27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004690Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E910: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2E914: 01E27821 addu $t7, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[2]; - PGXP_ALU(0x01E27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E918: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E91C: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2E920: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008040u); -#endif - /* 0xBFC2E924: 00CFC021 addu $t8, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[6] + cpu->gpr[15]; - PGXP_ALU(0x00CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046924u); -#endif - /* 0xBFC2E928: 8F19001C lw $t9, 28($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046928u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F19001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E92C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2E930: 13200012 beq $t9, $zero, 0xBFC2E97C */ - uint32_t psx_brA_BFC2E930 = cpu->gpr[25]; uint32_t psx_brB_BFC2E930 = cpu->gpr[0]; - psx_taken_BFC2E930 = (psx_brA_BFC2E930 == psx_brB_BFC2E930); - psx_delay_BFC2E930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E934: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046934u); -#endif - if (psx_delay_BFC2E930) { - psx_delay_BFC2E930 = 0; - if (psx_taken_BFC2E930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004697Cu); - goto label_BFC2E97C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046938u); - } -label_BFC2E938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2E938: 00034080 sll $t0, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2E93C: 01034023 subu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[3]; - PGXP_ALU(0x01034023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E940: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2E944: 01034021 addu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[3]; - PGXP_ALU(0x01034021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E948: 00084100 sll $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2E94C: 01034021 addu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[3]; - PGXP_ALU(0x01034021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2E950: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x340u); -#endif - /* 0xBFC2E954: 00C84821 addu $t1, $a2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[6] + cpu->gpr[8]; - PGXP_ALU(0x00C84821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046954u); -#endif - /* 0xBFC2E958: 8D24001C lw $a0, 28($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046958u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200u); } - PGXP_LOAD(0x8D24001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2E95C: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004695Cu); return; } g_debug_last_store_pc = 0x8004695Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E960: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80046968u; /* jal link before delay slot */ - psx_delay_BFC2E960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2E964: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046964u); return; } g_debug_last_store_pc = 0x80046964u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046964u); -#endif - if (psx_delay_BFC2E960) { - psx_delay_BFC2E960 = 0; - cpu->gpr[31] = 0x80046968u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E968: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046968u); -#endif - /* 0xBFC2E96C: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004696Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046970u); -#endif - /* 0xBFC2E970: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046970u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E974: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046974u); -#endif -label_BFC2E978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E978: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046978u); -#endif -label_BFC2E97C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E97Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E97C: 34212000 ori $at, $at, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x2000u; - PGXP_ALU(0x34212000u, cpu->gpr[1], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004697Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x422u); -#endif - /* 0xBFC2E980: 00A15024 and $t2, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A15024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2E984: 11400015 beq $t2, $zero, 0xBFC2E9DC */ - uint32_t psx_brA_BFC2E984 = cpu->gpr[10]; uint32_t psx_brB_BFC2E984 = cpu->gpr[0]; - psx_taken_BFC2E984 = (psx_brA_BFC2E984 == psx_brB_BFC2E984); - psx_delay_BFC2E984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E988: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046988u); -#endif - if (psx_delay_BFC2E984) { - psx_delay_BFC2E984 = 0; - if (psx_taken_BFC2E984) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800469DCu); - goto label_BFC2E9DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004698Cu); - } -label_BFC2E98C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E98Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2E98C: 00035880 sll $t3, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00035880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2E990: 01635823 subu $t3, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[3]; - PGXP_ALU(0x01635823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E994: 000B5880 sll $t3, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B5880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2E998: 01635821 addu $t3, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[3]; - PGXP_ALU(0x01635821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E99C: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004699Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2E9A0: 01635821 addu $t3, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[3]; - PGXP_ALU(0x01635821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800469A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2E9A4: 000B58C0 sll $t3, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000B58C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800469A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1840u); -#endif - /* 0xBFC2E9A8: 00CB6021 addu $t4, $a2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[6] + cpu->gpr[11]; - PGXP_ALU(0x00CB6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800469A8u); -#endif - /* 0xBFC2E9AC: 8D840020 lw $a0, 32($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800469ACu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x1000u); } - PGXP_LOAD(0x8D840020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800469ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2E9B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800469B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2E9B4: 10800009 beq $a0, $zero, 0xBFC2E9DC */ - uint32_t psx_brA_BFC2E9B4 = cpu->gpr[4]; uint32_t psx_brB_BFC2E9B4 = cpu->gpr[0]; - psx_taken_BFC2E9B4 = (psx_brA_BFC2E9B4 == psx_brB_BFC2E9B4); - psx_delay_BFC2E9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E9B8: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800469B8u); -#endif - if (psx_delay_BFC2E9B4) { - psx_delay_BFC2E9B4 = 0; - if (psx_taken_BFC2E9B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800469DCu); - goto label_BFC2E9DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800469BCu); - } -label_BFC2E9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2E9BC: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800469BCu); return; } g_debug_last_store_pc = 0x800469BCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800469BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2E9C0: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x800469C8u; /* jal link before delay slot */ - psx_delay_BFC2E9C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2E9C4: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800469C4u); return; } g_debug_last_store_pc = 0x800469C4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800469C4u); -#endif - if (psx_delay_BFC2E9C0) { - psx_delay_BFC2E9C0 = 0; - cpu->gpr[31] = 0x800469C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2E9C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E9C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E9C8: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800469C8u); -#endif - /* 0xBFC2E9CC: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800469CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800469CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469D0u); -#endif - /* 0xBFC2E9D0: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800469D0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800469D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2E9D4: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x800469D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E9D8: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800469D8u); -#endif -label_BFC2E9DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E9DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E9DC: 34211000 ori $at, $at, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1000u; - PGXP_ALU(0x34211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x800469DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2022u); -#endif - /* 0xBFC2E9E0: 00A16824 and $t5, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A16824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800469E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2E9E4: 11A00015 beq $t5, $zero, 0xBFC2EA3C */ - uint32_t psx_brA_BFC2E9E4 = cpu->gpr[13]; uint32_t psx_brB_BFC2E9E4 = cpu->gpr[0]; - psx_taken_BFC2E9E4 = (psx_brA_BFC2E9E4 == psx_brB_BFC2E9E4); - psx_delay_BFC2E9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2E9E8: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800469E8u); -#endif - if (psx_delay_BFC2E9E4) { - psx_delay_BFC2E9E4 = 0; - if (psx_taken_BFC2E9E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A3Cu); - goto label_BFC2EA3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800469ECu); - } -label_BFC2E9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2E9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2E9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E9EC: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800469ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800469F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E9F0: 01C37023 subu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[3]; - PGXP_ALU(0x01C37023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800469F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E9F4: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800469F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2E9F8: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800469F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2E9FC: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800469FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2EA00: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EA04: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC2EA08: 00CE7821 addu $t7, $a2, $t6 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[6] + cpu->gpr[14]; - PGXP_ALU(0x00CE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A08u); -#endif - /* 0xBFC2EA0C: 8DE40024 lw $a0, 36($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000u); } - PGXP_LOAD(0x8DE40024u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EA10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2EA14: 10800009 beq $a0, $zero, 0xBFC2EA3C */ - uint32_t psx_brA_BFC2EA14 = cpu->gpr[4]; uint32_t psx_brB_BFC2EA14 = cpu->gpr[0]; - psx_taken_BFC2EA14 = (psx_brA_BFC2EA14 == psx_brB_BFC2EA14); - psx_delay_BFC2EA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2EA18: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046A18u); -#endif - if (psx_delay_BFC2EA14) { - psx_delay_BFC2EA14 = 0; - if (psx_taken_BFC2EA14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A3Cu); - goto label_BFC2EA3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A1Cu); - } -label_BFC2EA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2EA1C: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A1Cu); return; } g_debug_last_store_pc = 0x80046A1Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EA20: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80046A28u; /* jal link before delay slot */ - psx_delay_BFC2EA20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2EA24: AFA50020 sw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A24u); return; } g_debug_last_store_pc = 0x80046A24u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A24u); -#endif - if (psx_delay_BFC2EA20) { - psx_delay_BFC2EA20 = 0; - cpu->gpr[31] = 0x80046A28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2EA28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2EA28: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046A28u); -#endif - /* 0xBFC2EA2C: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A2Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A30u); -#endif - /* 0xBFC2EA30: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A30u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2EA34: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2EA38: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046A38u); -#endif -label_BFC2EA3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2EA3C: 34214000 ori $at, $at, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4000u; - PGXP_ALU(0x34214000u, cpu->gpr[1], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000022u); -#endif - /* 0xBFC2EA40: 00A1C024 and $t8, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[5] & cpu->gpr[1]; - PGXP_ALU(0x00A1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2EA44: 13000010 beq $t8, $zero, 0xBFC2EA88 */ - uint32_t psx_brA_BFC2EA44 = cpu->gpr[24]; uint32_t psx_brB_BFC2EA44 = cpu->gpr[0]; - psx_taken_BFC2EA44 = (psx_brA_BFC2EA44 == psx_brB_BFC2EA44); - psx_delay_BFC2EA44 = 1; - /* 0xBFC2EA48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A48u); -#endif - if (psx_delay_BFC2EA44) { - psx_delay_BFC2EA44 = 0; - if (psx_taken_BFC2EA44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A88u); - goto label_BFC2EA88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A4Cu); - } -label_BFC2EA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2EA4C: 0003C880 sll $t9, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2EA50: 0323C823 subu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[3]; - PGXP_ALU(0x0323C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2EA54: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2EA58: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2EA5C: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2EA60: 0323C821 addu $t9, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x0323C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2EA64: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000140u); -#endif - /* 0xBFC2EA68: 00D94021 addu $t0, $a2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[25]; - PGXP_ALU(0x00D94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A68u); -#endif - /* 0xBFC2EA6C: 8D040028 lw $a0, 40($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100u); } - PGXP_LOAD(0x8D040028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EA70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2EA74: 10800004 beq $a0, $zero, 0xBFC2EA88 */ - uint32_t psx_brA_BFC2EA74 = cpu->gpr[4]; uint32_t psx_brB_BFC2EA74 = cpu->gpr[0]; - psx_taken_BFC2EA74 = (psx_brA_BFC2EA74 == psx_brB_BFC2EA74); - psx_delay_BFC2EA74 = 1; - /* 0xBFC2EA78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A78u); -#endif - if (psx_delay_BFC2EA74) { - psx_delay_BFC2EA74 = 0; - if (psx_taken_BFC2EA74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A88u); - goto label_BFC2EA88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046A7Cu); - } -label_BFC2EA7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EA7C: 0C011913 jal 0xB004644C */ - cpu->gpr[31] = 0x80046A84u; /* jal link before delay slot */ - psx_delay_BFC2EA7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EA80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046A80u); -#endif - if (psx_delay_BFC2EA7C) { - psx_delay_BFC2EA7C = 0; - cpu->gpr[31] = 0x80046A84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004644Cu); - cpu->pc = 0x8004644Cu; return; - } -label_BFC2EA84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A84u); -#endif - /* 0xBFC2EA84: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046A84u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046A84u); -#endif -label_BFC2EA88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2EA88: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EA8C: 03E00008 jr $ra */ - psx_delay_BFC2EA8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EA90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046A90u); -#endif - if (psx_delay_BFC2EA8C) { - psx_delay_BFC2EA8C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EA94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EA94u); - int psx_delay_BFC2EAD0 = 0; - int psx_taken_BFC2EAD0 = 0; - int psx_delay_BFC2EB50 = 0; - int psx_taken_BFC2EB50 = 0; - int psx_delay_BFC2EBDC = 0; - int psx_taken_BFC2EBDC = 0; - int psx_delay_BFC2EC60 = 0; - int psx_delay_BFC2EC88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2EAD8u: goto label_BFC2EAD8; - case 0xBFC2EB34u: goto label_BFC2EB34; - case 0xBFC2EB58u: goto label_BFC2EB58; - case 0xBFC2EB88u: goto label_BFC2EB88; - case 0xBFC2EBC0u: goto label_BFC2EBC0; - case 0xBFC2EBE4u: goto label_BFC2EBE4; - case 0xBFC2EC68u: goto label_BFC2EC68; - default: break; - } - } -label_BFC2EA94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EA94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC2EA94: 00804021 addu $t0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2EA98: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2EA9C: 01C87023 subu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[8]; - PGXP_ALU(0x01C87023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EAA0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2EAA4: 01C87021 addu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[8]; - PGXP_ALU(0x01C87021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EAA8: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC2EAAC: 01C87021 addu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[8]; - PGXP_ALU(0x01C87021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EAB0: 3C0F8011 lui $t7, 0x8011 */ - cpu->gpr[15] = 0x80110000u; - PGXP_ALU(0x3C0F8011u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2EAB4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EAB8: 25EF0EC8 addiu $t7, $t7, 3784 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (3784)); - PGXP_ALU(0x25EF0EC8u, cpu->gpr[15], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EABC: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2EAC0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046AC0u); return; } g_debug_last_store_pc = 0x80046AC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC2EAC4: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AC4u); -#endif - /* 0xBFC2EAC8: 8C670684 lw $a3, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046AC8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x8C670684u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80046AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC2EACC: 00A04821 addu $t1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2EAD0: 14E0002D bne $a3, $zero, 0xBFC2EB88 */ - uint32_t psx_brA_BFC2EAD0 = cpu->gpr[7]; uint32_t psx_brB_BFC2EAD0 = cpu->gpr[0]; - psx_taken_BFC2EAD0 = (psx_brA_BFC2EAD0 != psx_brB_BFC2EAD0); - psx_delay_BFC2EAD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EAD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046AD4u); -#endif - if (psx_delay_BFC2EAD0) { - psx_delay_BFC2EAD0 = 0; - if (psx_taken_BFC2EAD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046B88u); - goto label_BFC2EB88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046AD8u); - } -label_BFC2EAD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EAD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EAD8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046AD8u); -#endif - /* 0xBFC2EADC: 8C429E24 lw $v0, -25052($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046ADCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429E24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2EAE0: 00085080 sll $t2, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00085080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2EAE4: 01485023 subu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[8]; - PGXP_ALU(0x01485023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2EAE8: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2EAEC: 01485021 addu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01485021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2EAF0: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2EAF4: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2EAF8: 000258C0 sll $t3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000258C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC2EAFC: 01485021 addu $t2, $t2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[8]; - PGXP_ALU(0x01485021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC2EB00: 01625823 subu $t3, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[2]; - PGXP_ALU(0x01625823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2EB04: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2EB08: 0018C080 sll $t8, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2EB0C: 000B5900 sll $t3, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2EB10: 000A50C0 sll $t2, $t2, 3 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 3u; - PGXP_ALU(0x000A50C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2EB14: 3C0D8011 lui $t5, 0x8011 */ - cpu->gpr[13] = 0x80110000u; - PGXP_ALU(0x3C0D8011u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2EB18: 25AD0F04 addiu $t5, $t5, 3844 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (3844)); - PGXP_ALU(0x25AD0F04u, cpu->gpr[13], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC2EB1C: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC2EB20: 0302C021 addu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[2]; - PGXP_ALU(0x0302C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2EB24: 0018C140 sll $t8, $t8, 5 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 5u; - PGXP_ALU(0x0018C140u, cpu->gpr[24], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC2EB28: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2EB2C: 25CF006C addiu $t7, $t6, 108 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (108)); - PGXP_ALU(0x25CF006Cu, cpu->gpr[15], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC2EB30: 0078C821 addu $t9, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x0078C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B30u); -#endif -label_BFC2EB34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EB34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B34u); -#endif - /* 0xBFC2EB34: 8DC10000 lw $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B34u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000u); } - PGXP_LOAD(0x8DC10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EB38: 25CE000C addiu $t6, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (12)); - PGXP_ALU(0x25CE000Cu, cpu->gpr[14], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2EB3C: AF21011C sw $at, 284($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B3Cu); return; } g_debug_last_store_pc = 0x80046B3Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF21011Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B40u); -#endif - /* 0xBFC2EB40: 8DC1FFF8 lw $at, -8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B40u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000u); } - PGXP_LOAD(0x8DC1FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2EB44: 2739000C addiu $t9, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (12)); - PGXP_ALU(0x2739000Cu, cpu->gpr[25], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2EB48: AF210114 sw $at, 276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B48u); return; } g_debug_last_store_pc = 0x80046B48u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF210114u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B48u); -#endif - /* 0xBFC2EB4C: 8DC1FFFC lw $at, -4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B4Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000u); } - PGXP_LOAD(0x8DC1FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2EB50: 15CFFFF8 bne $t6, $t7, 0xBFC2EB34 */ - uint32_t psx_brA_BFC2EB50 = cpu->gpr[14]; uint32_t psx_brB_BFC2EB50 = cpu->gpr[15]; - psx_taken_BFC2EB50 = (psx_brA_BFC2EB50 != psx_brB_BFC2EB50); - psx_delay_BFC2EB50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2EB54: AF210118 sw $at, 280($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B54u); return; } g_debug_last_store_pc = 0x80046B54u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF210118u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B54u); -#endif - if (psx_delay_BFC2EB50) { - psx_delay_BFC2EB50 = 0; - if (psx_taken_BFC2EB50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046B34u); - goto label_BFC2EB34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046B58u); - } -label_BFC2EB58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EB58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B58u); -#endif - /* 0xBFC2EB58: 8DC10000 lw $at, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B58u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000u); } - PGXP_LOAD(0x8DC10000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EB5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2EB60: AF21011C sw $at, 284($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B60u); return; } g_debug_last_store_pc = 0x80046B60u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF21011Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B60u); -#endif - /* 0xBFC2EB64: 8C780684 lw $t8, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B64u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780684u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B64u); -#endif - /* 0xBFC2EB68: 8C6B002C lw $t3, 44($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B68u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x8C6B002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC2EB6C: 270A0001 addiu $t2, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x270A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2EB70: AC6A0684 sw $t2, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B70u); return; } g_debug_last_store_pc = 0x80046B70u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0684u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2EB74: AC60067C sw $zero, 1660($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B74u); return; } g_debug_last_store_pc = 0x80046B74u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC60067Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2EB78: 356C0004 ori $t4, $t3, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] | 0x4u; - PGXP_ALU(0x356C0004u, cpu->gpr[12], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B78u); -#endif - /* 0xBFC2EB7C: 8C670684 lw $a3, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B7Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x8C670684u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2EB80: AC600680 sw $zero, 1664($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B80u); return; } g_debug_last_store_pc = 0x80046B80u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600680u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC2EB84: AC6C002C sw $t4, 44($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B84u); return; } g_debug_last_store_pc = 0x80046B84u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC6C002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B84u); -#endif -label_BFC2EB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2EB88: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046B88u); -#endif - /* 0xBFC2EB8C: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046B8Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80046B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2EB90: 0007C8C0 sll $t9, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 3u; - PGXP_ALU(0x0007C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EB94: 000D7880 sll $t7, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EB98: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EB9C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EBA0: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EBA4: 000F7940 sll $t7, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000F7940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80046BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2EBA8: 0327C823 subu $t9, $t9, $a3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[7]; - PGXP_ALU(0x0327C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2EBAC: 0019C900 sll $t9, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 4u; - PGXP_ALU(0x0019C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC2EBB0: 006F7021 addu $t6, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[3] + cpu->gpr[15]; - PGXP_ALU(0x006F7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA01u); -#endif - /* 0xBFC2EBB4: 01205821 addu $t3, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01205821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2EBB8: 256A006C addiu $t2, $t3, 108 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[11] + (108)); - PGXP_ALU(0x256A006Cu, cpu->gpr[10], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2EBBC: 01D9C021 addu $t8, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D9C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BBCu); -#endif -label_BFC2EBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BC0u); -#endif - /* 0xBFC2EBC0: 8D610000 lw $at, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BC0u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D610000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2EBC4: 256B000C addiu $t3, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (12)); - PGXP_ALU(0x256B000Cu, cpu->gpr[11], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2EBC8: AF01011C sw $at, 284($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BC8u); return; } g_debug_last_store_pc = 0x80046BC8u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF01011Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BC8u); -#endif - /* 0xBFC2EBCC: 8D61FFF8 lw $at, -8($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BCCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D61FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2EBD0: 2718000C addiu $t8, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (12)); - PGXP_ALU(0x2718000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2EBD4: AF010114 sw $at, 276($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BD4u); return; } g_debug_last_store_pc = 0x80046BD4u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF010114u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BD4u); -#endif - /* 0xBFC2EBD8: 8D61FFFC lw $at, -4($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BD8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D61FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2EBDC: 156AFFF8 bne $t3, $t2, 0xBFC2EBC0 */ - uint32_t psx_brA_BFC2EBDC = cpu->gpr[11]; uint32_t psx_brB_BFC2EBDC = cpu->gpr[10]; - psx_taken_BFC2EBDC = (psx_brA_BFC2EBDC != psx_brB_BFC2EBDC); - psx_delay_BFC2EBDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2EBE0: AF010118 sw $at, 280($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BE0u); return; } g_debug_last_store_pc = 0x80046BE0u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF010118u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BE0u); -#endif - if (psx_delay_BFC2EBDC) { - psx_delay_BFC2EBDC = 0; - if (psx_taken_BFC2EBDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046BC0u); - goto label_BFC2EBC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046BE4u); - } -label_BFC2EBE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EBE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BE4u); -#endif - /* 0xBFC2EBE4: 8D610000 lw $at, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BE4u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x800u); } - PGXP_LOAD(0x8D610000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2EBE8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2EBEC: AF01011C sw $at, 284($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BECu); return; } g_debug_last_store_pc = 0x80046BECu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAF01011Cu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046BF0u); -#endif - /* 0xBFC2EBF0: 8DAD9E24 lw $t5, -25052($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046BF0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9E24u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80046BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC2EBF4: 00086080 sll $t4, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00086080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC2EBF8: 01886023 subu $t4, $t4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[8]; - PGXP_ALU(0x01886023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2EBFC: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EC00: 000D7880 sll $t7, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC2EC04: 01886021 addu $t4, $t4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[8]; - PGXP_ALU(0x01886021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EC08: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EC0C: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2EC10: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC2EC14: 01886021 addu $t4, $t4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[8]; - PGXP_ALU(0x01886021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC2EC18: 01ED7821 addu $t7, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EC1C: 000F7940 sll $t7, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000F7940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2EC20: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC2EC24: 018F7021 addu $t6, $t4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[15]; - PGXP_ALU(0x018F7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C24u); -#endif - /* 0xBFC2EC28: 8C790684 lw $t9, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C28u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790684u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2EC2C: 000D60C0 sll $t4, $t5, 3 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[13] << 3u; - PGXP_ALU(0x000D60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC2EC30: 018D6023 subu $t4, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[13]; - PGXP_ALU(0x018D6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2EC34: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC2EC38: 001950C0 sll $t2, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001950C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100Cu); -#endif - /* 0xBFC2EC3C: 006C1021 addu $v0, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[12]; - PGXP_ALU(0x006C1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC2EC40: 01595023 subu $t2, $t2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[25]; - PGXP_ALU(0x01595023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2EC44: 000A5100 sll $t2, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2EC48: 3C188011 lui $t8, 0x8011 */ - cpu->gpr[24] = 0x80110000u; - PGXP_ALU(0x3C188011u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2EC4C: 27180FE4 addiu $t8, $t8, 4068 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (4068)); - PGXP_ALU(0x27180FE4u, cpu->gpr[24], _pgx1, 0x00000FE4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4C00u); -#endif - /* 0xBFC2EC50: 01CA5821 addu $t3, $t6, $t2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[14] + cpu->gpr[10]; - PGXP_ALU(0x01CA5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C50u); -#endif - /* 0xBFC2EC54: 8445007E lh $a1, 126($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 126; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (126)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80046C54u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } - PGXP_LOAD(0x8445007Eu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C54u); -#endif - /* 0xBFC2EC58: 84460080 lh $a2, 128($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (128)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80046C58u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x4u); } - PGXP_LOAD(0x84460080u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2EC5C: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C5Cu); return; } g_debug_last_store_pc = 0x80046C5Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EC60: 0C0111FD jal 0xB00447F4 */ - cpu->gpr[31] = 0x80046C68u; /* jal link before delay slot */ - psx_delay_BFC2EC60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000810u); -#endif - /* 0xBFC2EC64: 01782021 addu $a0, $t3, $t8 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[11] + cpu->gpr[24]; - PGXP_ALU(0x01782021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C64u); -#endif - if (psx_delay_BFC2EC60) { - psx_delay_BFC2EC60 = 0; - cpu->gpr[31] = 0x80046C68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800447F4u); - cpu->pc = 0x800447F4u; return; - } -label_BFC2EC68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EC68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C68u); -#endif - /* 0xBFC2EC68: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EC6C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C70u); -#endif - /* 0xBFC2EC70: 8C6F0684 lw $t7, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C70u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0684u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EC74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC2EC78: 25F90001 addiu $t9, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[15] + (1)); - PGXP_ALU(0x25F90001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2EC7C: AC790684 sw $t9, 1668($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (1668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C7Cu); return; } g_debug_last_store_pc = 0x80046C7Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790684u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C80u); -#endif - /* 0xBFC2EC80: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046C80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2EC84: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EC88: 03E00008 jr $ra */ - psx_delay_BFC2EC88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EC8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046C8Cu); -#endif - if (psx_delay_BFC2EC88) { - psx_delay_BFC2EC88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EC90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EC90u); - int psx_delay_BFC2ECAC = 0; - int psx_taken_BFC2ECAC = 0; - int psx_delay_BFC2ECC8 = 0; - int psx_taken_BFC2ECC8 = 0; - int psx_delay_BFC2ECD0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2ECA4u: goto label_BFC2ECA4; - case 0xBFC2ECB4u: goto label_BFC2ECB4; - case 0xBFC2ECC4u: goto label_BFC2ECC4; - case 0xBFC2ECD0u: goto label_BFC2ECD0; - default: break; - } - } -label_BFC2EC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EC90: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EC94: 3C028014 lui $v0, 0x8014 */ - cpu->gpr[2] = 0x80140000u; - PGXP_ALU(0x3C028014u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2EC98: 3C038011 lui $v1, 0x8011 */ - cpu->gpr[3] = 0x80110000u; - PGXP_ALU(0x3C038011u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2EC9C: 24630EC8 addiu $v1, $v1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (3784)); - PGXP_ALU(0x24630EC8u, cpu->gpr[3], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2ECA0: 244281C8 addiu $v0, $v0, -32312 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-32312)); - PGXP_ALU(0x244281C8u, cpu->gpr[2], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CA0u); -#endif -label_BFC2ECA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ECA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ECA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CA4u); -#endif - /* 0xBFC2ECA4: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046CA4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ECA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2ECAC: 148E0005 bne $a0, $t6, 0xBFC2ECC4 */ - uint32_t psx_brA_BFC2ECAC = cpu->gpr[4]; uint32_t psx_brB_BFC2ECAC = cpu->gpr[14]; - psx_taken_BFC2ECAC = (psx_brA_BFC2ECAC != psx_brB_BFC2ECAC); - psx_delay_BFC2ECAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ECB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046CB0u); -#endif - if (psx_delay_BFC2ECAC) { - psx_delay_BFC2ECAC = 0; - if (psx_taken_BFC2ECAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CC4u); - goto label_BFC2ECC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CB4u); - } -label_BFC2ECB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ECB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ECB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CB4u); -#endif - /* 0xBFC2ECB4: 8C6F002C lw $t7, 44($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046CB4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ECB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC2ECBC: 01E5C025 or $t8, $t7, $a1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[5]; - PGXP_ALU(0x01E5C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2ECC0: AC78002C sw $t8, 44($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046CC0u); return; } g_debug_last_store_pc = 0x80046CC0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC78002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80046CC0u); -#endif -label_BFC2ECC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ECC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ECC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2ECC4: 24630688 addiu $v1, $v1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1672)); - PGXP_ALU(0x24630688u, cpu->gpr[3], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2ECC8: 1462FFF6 bne $v1, $v0, 0xBFC2ECA4 */ - uint32_t psx_brA_BFC2ECC8 = cpu->gpr[3]; uint32_t psx_brB_BFC2ECC8 = cpu->gpr[2]; - psx_taken_BFC2ECC8 = (psx_brA_BFC2ECC8 != psx_brB_BFC2ECC8); - psx_delay_BFC2ECC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ECCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046CCCu); -#endif - if (psx_delay_BFC2ECC8) { - psx_delay_BFC2ECC8 = 0; - if (psx_taken_BFC2ECC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CA4u); - goto label_BFC2ECA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046CD0u); - } -label_BFC2ECD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ECD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2ECD0: 03E00008 jr $ra */ - psx_delay_BFC2ECD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ECD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046CD4u); -#endif - if (psx_delay_BFC2ECD0) { - psx_delay_BFC2ECD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2ECD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2ECD8u); - int psx_delay_BFC2ED14 = 0; -label_BFC2ECD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ECD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ECD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2ECD8: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2ECDC: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2ECE0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046CE0u); -#endif - /* 0xBFC2ECE4: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046CE4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ECE8: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2ECEC: 01C47021 addu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[4]; - PGXP_ALU(0x01C47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ECF0: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2ECF4: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2ECF8: 01C47021 addu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[4]; - PGXP_ALU(0x01C47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2ECFC: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2ED00: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ED04: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2ED08: 3C088011 lui $t0, 0x8011 */ - cpu->gpr[8] = 0x80110000u; - PGXP_ALU(0x3C088011u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2ED0C: 25080F04 addiu $t0, $t0, 3844 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (3844)); - PGXP_ALU(0x25080F04u, cpu->gpr[8], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2ED10: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2ED14: 03E00008 jr $ra */ - psx_delay_BFC2ED14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC2ED18: 03281021 addu $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03281021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D18u); -#endif - if (psx_delay_BFC2ED14) { - psx_delay_BFC2ED14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2ED1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2ED1Cu); - int psx_delay_BFC2ED24 = 0; - int psx_delay_BFC2ED90 = 0; - int psx_taken_BFC2ED90 = 0; - int psx_delay_BFC2EDAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2ED2Cu: goto label_BFC2ED2C; - case 0xBFC2ED74u: goto label_BFC2ED74; - case 0xBFC2ED98u: goto label_BFC2ED98; - default: break; - } - } -label_BFC2ED1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ED1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ED1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2ED1C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2ED20: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D20u); return; } g_debug_last_store_pc = 0x80046D20u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2ED24: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80046D2Cu; /* jal link before delay slot */ - psx_delay_BFC2ED24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC2ED28: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D28u); return; } g_debug_last_store_pc = 0x80046D28u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D28u); -#endif - if (psx_delay_BFC2ED24) { - psx_delay_BFC2ED24 = 0; - cpu->gpr[31] = 0x80046D2Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2ED2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ED2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ED2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2ED2C: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2ED30: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2ED34: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046D34u); -#endif - /* 0xBFC2ED38: 8DEF9E24 lw $t7, -25052($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D38u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ED3C: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2ED40: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ED44: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2ED48: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2ED4C: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC2ED50: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D50u); -#endif - /* 0xBFC2ED54: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D54u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2ED58: 0018C100 sll $t8, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2ED5C: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2ED60: 3C088011 lui $t0, 0x8011 */ - cpu->gpr[8] = 0x80110000u; - PGXP_ALU(0x3C088011u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2ED64: 25080F04 addiu $t0, $t0, 3844 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (3844)); - PGXP_ALU(0x25080F04u, cpu->gpr[8], _pgx1, 0x00000F04u); } -#ifdef PSX_COSIM - cosim_instr(0x80046D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC2ED68: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC2ED6C: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2ED70: 254B006C addiu $t3, $t2, 108 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (108)); - PGXP_ALU(0x254B006Cu, cpu->gpr[11], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046D70u); -#endif -label_BFC2ED74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ED74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ED74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D74u); -#endif - /* 0xBFC2ED74: 8D410000 lw $at, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D74u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x400u); } - PGXP_LOAD(0x8D410000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2ED78: 254A000C addiu $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (12)); - PGXP_ALU(0x254A000Cu, cpu->gpr[10], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2ED7C: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D7Cu); return; } g_debug_last_store_pc = 0x80046D7Cu; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D80u); -#endif - /* 0xBFC2ED80: 8D41FFF8 lw $at, -8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D80u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x400u); } - PGXP_LOAD(0x8D41FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2ED84: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80046D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2ED88: AD21FFF8 sw $at, -8($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D88u); return; } g_debug_last_store_pc = 0x80046D88u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFF8u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D88u); -#endif - /* 0xBFC2ED8C: 8D41FFFC lw $at, -4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D8Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x400u); } - PGXP_LOAD(0x8D41FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC2ED90: 154BFFF8 bne $t2, $t3, 0xBFC2ED74 */ - uint32_t psx_brA_BFC2ED90 = cpu->gpr[10]; uint32_t psx_brB_BFC2ED90 = cpu->gpr[11]; - psx_taken_BFC2ED90 = (psx_brA_BFC2ED90 != psx_brB_BFC2ED90); - psx_delay_BFC2ED90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2ED94: AD21FFFC sw $at, -4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D94u); return; } g_debug_last_store_pc = 0x80046D94u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD21FFFCu, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D94u); -#endif - if (psx_delay_BFC2ED90) { - psx_delay_BFC2ED90 = 0; - if (psx_taken_BFC2ED90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046D74u); - goto label_BFC2ED74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046D98u); - } -label_BFC2ED98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2ED98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2ED98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046D98u); -#endif - /* 0xBFC2ED98: 8D410000 lw $at, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046D98u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x400u); } - PGXP_LOAD(0x8D410000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2ED9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2EDA0: AD210000 sw $at, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046DA0u); return; } g_debug_last_store_pc = 0x80046DA0u; cpu->write_word(psx_addr, cpu->gpr[1]); } - PGXP_STORE(0xAD210000u, _pgxa, cpu->gpr[1]); } -#ifdef PSX_COSIM - cosim_instr(0x80046DA0u); -#endif - /* 0xBFC2EDA4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046DA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2EDA8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80046DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EDAC: 03E00008 jr $ra */ - psx_delay_BFC2EDAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EDB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046DB0u); -#endif - if (psx_delay_BFC2EDAC) { - psx_delay_BFC2EDAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EE6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EE6Cu); - int psx_delay_BFC2EE88 = 0; - int psx_taken_BFC2EE88 = 0; - int psx_delay_BFC2EE98 = 0; - int psx_taken_BFC2EE98 = 0; - int psx_delay_BFC2EEA0 = 0; - int psx_delay_BFC2EEAC = 0; - int psx_taken_BFC2EEAC = 0; - int psx_delay_BFC2EEB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2EE80u: goto label_BFC2EE80; - case 0xBFC2EE90u: goto label_BFC2EE90; - case 0xBFC2EEA0u: goto label_BFC2EEA0; - case 0xBFC2EEA8u: goto label_BFC2EEA8; - case 0xBFC2EEB4u: goto label_BFC2EEB4; - default: break; - } - } -label_BFC2EE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2EE6C: 3C068011 lui $a2, 0x8011 */ - cpu->gpr[6] = 0x80110000u; - PGXP_ALU(0x3C068011u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EE70: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2EE74: 24C60EC8 addiu $a2, $a2, 3784 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3784)); - PGXP_ALU(0x24C60EC8u, cpu->gpr[6], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2EE78: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2EE7C: 24070060 addiu $a3, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24070060u, cpu->gpr[7], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80046E7Cu); -#endif -label_BFC2EE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046E80u); -#endif - /* 0xBFC2EE80: 8CCE0004 lw $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046E80u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EE84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2EE88: 148E0007 bne $a0, $t6, 0xBFC2EEA8 */ - uint32_t psx_brA_BFC2EE88 = cpu->gpr[4]; uint32_t psx_brB_BFC2EE88 = cpu->gpr[14]; - psx_taken_BFC2EE88 = (psx_brA_BFC2EE88 != psx_brB_BFC2EE88); - psx_delay_BFC2EE88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EE8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046E8Cu); -#endif - if (psx_delay_BFC2EE88) { - psx_delay_BFC2EE88 = 0; - if (psx_taken_BFC2EE88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EA8u); - goto label_BFC2EEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046E90u); - } -label_BFC2EE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EE90: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC2EE94: 00A2082A slt $at, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00A2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2EE98: 10200003 beq $at, $zero, 0xBFC2EEA8 */ - uint32_t psx_brA_BFC2EE98 = cpu->gpr[1]; uint32_t psx_brB_BFC2EE98 = cpu->gpr[0]; - psx_taken_BFC2EE98 = (psx_brA_BFC2EE98 == psx_brB_BFC2EE98); - psx_delay_BFC2EE98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EE9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046E9Cu); -#endif - if (psx_delay_BFC2EE98) { - psx_delay_BFC2EE98 = 0; - if (psx_taken_BFC2EE98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EA8u); - goto label_BFC2EEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EA0u); - } -label_BFC2EEA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EEA0: 03E00008 jr $ra */ - psx_delay_BFC2EEA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2EEA4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046EA4u); -#endif - if (psx_delay_BFC2EEA0) { - psx_delay_BFC2EEA0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC2EEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2EEA8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2EEAC: 1467FFF4 bne $v1, $a3, 0xBFC2EE80 */ - uint32_t psx_brA_BFC2EEAC = cpu->gpr[3]; uint32_t psx_brB_BFC2EEAC = cpu->gpr[7]; - psx_taken_BFC2EEAC = (psx_brA_BFC2EEAC != psx_brB_BFC2EEAC); - psx_delay_BFC2EEAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2EEB0: 24C60688 addiu $a2, $a2, 1672 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1672)); - PGXP_ALU(0x24C60688u, cpu->gpr[6], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80046EB0u); -#endif - if (psx_delay_BFC2EEAC) { - psx_delay_BFC2EEAC = 0; - if (psx_taken_BFC2EEAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046E80u); - goto label_BFC2EE80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EB4u); - } -label_BFC2EEB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EEB4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80046EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EEB8: 03E00008 jr $ra */ - psx_delay_BFC2EEB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EEBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046EBCu); -#endif - if (psx_delay_BFC2EEB8) { - psx_delay_BFC2EEB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EEC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EEC0u); - int psx_delay_BFC2EEE0 = 0; - int psx_taken_BFC2EEE0 = 0; - int psx_delay_BFC2EEF0 = 0; - int psx_taken_BFC2EEF0 = 0; - int psx_delay_BFC2EEF8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2EED8u: goto label_BFC2EED8; - case 0xBFC2EEE8u: goto label_BFC2EEE8; - case 0xBFC2EEECu: goto label_BFC2EEEC; - case 0xBFC2EEF8u: goto label_BFC2EEF8; - default: break; - } - } -label_BFC2EEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EEC0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EEC4: 3C028014 lui $v0, 0x8014 */ - cpu->gpr[2] = 0x80140000u; - PGXP_ALU(0x3C028014u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EEC8: 3C058011 lui $a1, 0x8011 */ - cpu->gpr[5] = 0x80110000u; - PGXP_ALU(0x3C058011u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2EECC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EED0: 24A50EC8 addiu $a1, $a1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (3784)); - PGXP_ALU(0x24A50EC8u, cpu->gpr[5], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EED4: 244281C8 addiu $v0, $v0, -32312 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-32312)); - PGXP_ALU(0x244281C8u, cpu->gpr[2], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046ED4u); -#endif -label_BFC2EED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046ED8u); -#endif - /* 0xBFC2EED8: 8CAE0004 lw $t6, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046ED8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EEDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2EEE0: 148E0002 bne $a0, $t6, 0xBFC2EEEC */ - uint32_t psx_brA_BFC2EEE0 = cpu->gpr[4]; uint32_t psx_brB_BFC2EEE0 = cpu->gpr[14]; - psx_taken_BFC2EEE0 = (psx_brA_BFC2EEE0 != psx_brB_BFC2EEE0); - psx_delay_BFC2EEE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EEE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046EE4u); -#endif - if (psx_delay_BFC2EEE0) { - psx_delay_BFC2EEE0 = 0; - if (psx_taken_BFC2EEE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EECu); - goto label_BFC2EEEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EE8u); - } -label_BFC2EEE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2EEE8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046EE8u); -#endif -label_BFC2EEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EEEC: 24A50688 addiu $a1, $a1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1672)); - PGXP_ALU(0x24A50688u, cpu->gpr[5], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80046EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2EEF0: 14A2FFF9 bne $a1, $v0, 0xBFC2EED8 */ - uint32_t psx_brA_BFC2EEF0 = cpu->gpr[5]; uint32_t psx_brB_BFC2EEF0 = cpu->gpr[2]; - psx_taken_BFC2EEF0 = (psx_brA_BFC2EEF0 != psx_brB_BFC2EEF0); - psx_delay_BFC2EEF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EEF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046EF4u); -#endif - if (psx_delay_BFC2EEF0) { - psx_delay_BFC2EEF0 = 0; - if (psx_taken_BFC2EEF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046ED8u); - goto label_BFC2EED8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046EF8u); - } -label_BFC2EEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EEF8: 03E00008 jr $ra */ - psx_delay_BFC2EEF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2EEFC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046EFCu); -#endif - if (psx_delay_BFC2EEF8) { - psx_delay_BFC2EEF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EF00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EF00u); - int psx_delay_BFC2EF20 = 0; - int psx_taken_BFC2EF20 = 0; - int psx_delay_BFC2EF30 = 0; - int psx_taken_BFC2EF30 = 0; - int psx_delay_BFC2EF38 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2EF18u: goto label_BFC2EF18; - case 0xBFC2EF28u: goto label_BFC2EF28; - case 0xBFC2EF2Cu: goto label_BFC2EF2C; - case 0xBFC2EF38u: goto label_BFC2EF38; - default: break; - } - } -label_BFC2EF00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2EF00: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EF04: 3C028014 lui $v0, 0x8014 */ - cpu->gpr[2] = 0x80140000u; - PGXP_ALU(0x3C028014u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EF08: 3C058011 lui $a1, 0x8011 */ - cpu->gpr[5] = 0x80110000u; - PGXP_ALU(0x3C058011u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2EF0C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EF10: 24A50EC8 addiu $a1, $a1, 3784 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (3784)); - PGXP_ALU(0x24A50EC8u, cpu->gpr[5], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EF14: 244281C8 addiu $v0, $v0, -32312 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-32312)); - PGXP_ALU(0x244281C8u, cpu->gpr[2], _pgx1, 0xFFFF81C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F14u); -#endif -label_BFC2EF18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F18u); -#endif - /* 0xBFC2EF18: 8CAE0004 lw $t6, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F18u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EF1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2EF20: 148E0002 bne $a0, $t6, 0xBFC2EF2C */ - uint32_t psx_brA_BFC2EF20 = cpu->gpr[4]; uint32_t psx_brB_BFC2EF20 = cpu->gpr[14]; - psx_taken_BFC2EF20 = (psx_brA_BFC2EF20 != psx_brB_BFC2EF20); - psx_delay_BFC2EF20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EF24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046F24u); -#endif - if (psx_delay_BFC2EF20) { - psx_delay_BFC2EF20 = 0; - if (psx_taken_BFC2EF20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F2Cu); - goto label_BFC2EF2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F28u); - } -label_BFC2EF28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2EF28: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F28u); -#endif -label_BFC2EF2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2EF2C: 24A50688 addiu $a1, $a1, 1672 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1672)); - PGXP_ALU(0x24A50688u, cpu->gpr[5], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC2EF30: 14A2FFF9 bne $a1, $v0, 0xBFC2EF18 */ - uint32_t psx_brA_BFC2EF30 = cpu->gpr[5]; uint32_t psx_brB_BFC2EF30 = cpu->gpr[2]; - psx_taken_BFC2EF30 = (psx_brA_BFC2EF30 != psx_brB_BFC2EF30); - psx_delay_BFC2EF30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EF34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80046F34u); -#endif - if (psx_delay_BFC2EF30) { - psx_delay_BFC2EF30 = 0; - if (psx_taken_BFC2EF30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F18u); - goto label_BFC2EF18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F38u); - } -label_BFC2EF38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2EF38: 03E00008 jr $ra */ - psx_delay_BFC2EF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2EF3C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F3Cu); -#endif - if (psx_delay_BFC2EF38) { - psx_delay_BFC2EF38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2EF40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2EF40u); - int psx_delay_BFC2EF64 = 0; - int psx_delay_BFC2EF70 = 0; - int psx_taken_BFC2EF70 = 0; - int psx_delay_BFC2EF80 = 0; - int psx_taken_BFC2EF80 = 0; - int psx_delay_BFC2EFB0 = 0; - int psx_delay_BFC2EFC0 = 0; - int psx_delay_BFC2F00C = 0; - int psx_delay_BFC2F018 = 0; - int psx_taken_BFC2F018 = 0; - int psx_delay_BFC2F028 = 0; - int psx_taken_BFC2F028 = 0; - int psx_delay_BFC2F068 = 0; - int psx_taken_BFC2F068 = 0; - int psx_delay_BFC2F0C0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2EF6Cu: goto label_BFC2EF6C; - case 0xBFC2EF78u: goto label_BFC2EF78; - case 0xBFC2EF88u: goto label_BFC2EF88; - case 0xBFC2EFB0u: goto label_BFC2EFB0; - case 0xBFC2EFB8u: goto label_BFC2EFB8; - case 0xBFC2EFC8u: goto label_BFC2EFC8; - case 0xBFC2F014u: goto label_BFC2F014; - case 0xBFC2F020u: goto label_BFC2F020; - case 0xBFC2F030u: goto label_BFC2F030; - case 0xBFC2F034u: goto label_BFC2F034; - case 0xBFC2F03Cu: goto label_BFC2F03C; - case 0xBFC2F070u: goto label_BFC2F070; - case 0xBFC2F084u: goto label_BFC2F084; - default: break; - } - } -label_BFC2EF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2EF40: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2EF44: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F44u); return; } g_debug_last_store_pc = 0x80046F44u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2EF48: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F48u); return; } g_debug_last_store_pc = 0x80046F48u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2EF4C: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F4Cu); return; } g_debug_last_store_pc = 0x80046F4Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC2EF50: 0080A021 addu $s4, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2EF54: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F54u); return; } g_debug_last_store_pc = 0x80046F54u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2EF58: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F58u); return; } g_debug_last_store_pc = 0x80046F58u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC2EF5C: 00A0A821 addu $s5, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2EF60: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F60u); return; } g_debug_last_store_pc = 0x80046F60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EF64: 0C011BC0 jal 0xB0046F00 */ - cpu->gpr[31] = 0x80046F6Cu; /* jal link before delay slot */ - psx_delay_BFC2EF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC2EF68: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F68u); -#endif - if (psx_delay_BFC2EF64) { - psx_delay_BFC2EF64 = 0; - cpu->gpr[31] = 0x80046F6Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F00u); - cpu->pc = 0x80046F00u; return; - } -label_BFC2EF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC2EF6C: AFA20048 sw $v0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F6Cu); return; } g_debug_last_store_pc = 0x80046F6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20048u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2EF70: 1C400005 bgtz $v0, 0xBFC2EF88 */ - uint32_t psx_brA_BFC2EF70 = cpu->gpr[2]; - psx_taken_BFC2EF70 = ((int32_t)psx_brA_BFC2EF70 > 0); - psx_delay_BFC2EF70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2EF74: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046F74u); -#endif - if (psx_delay_BFC2EF70) { - psx_delay_BFC2EF70 = 0; - if (psx_taken_BFC2EF70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F88u); - goto label_BFC2EF88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F78u); - } -label_BFC2EF78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2EF78: 3C138011 lui $s3, 0x8011 */ - cpu->gpr[19] = 0x80110000u; - PGXP_ALU(0x3C138011u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046F78u); -#endif - /* 0xBFC2EF7C: 8FB20054 lw $s2, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F7Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20054u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2EF80: 10000040 beq $zero, $zero, 0xBFC2F084 */ - uint32_t psx_brA_BFC2EF80 = cpu->gpr[0]; uint32_t psx_brB_BFC2EF80 = cpu->gpr[0]; - psx_taken_BFC2EF80 = (psx_brA_BFC2EF80 == psx_brB_BFC2EF80); - psx_delay_BFC2EF80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2EF84: 26730EC8 addiu $s3, $s3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (3784)); - PGXP_ALU(0x26730EC8u, cpu->gpr[19], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F84u); -#endif - if (psx_delay_BFC2EF80) { - psx_delay_BFC2EF80 = 0; - if (psx_taken_BFC2EF80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047084u); - goto label_BFC2F084; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046F88u); - } -label_BFC2EF88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EF88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2EF88: AFB70038 sw $s7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F88u); return; } g_debug_last_store_pc = 0x80046F88u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70038u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2EF8C: AFB6003C sw $s6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F8Cu); return; } g_debug_last_store_pc = 0x80046F8Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6003Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2EF90: 3C17800F lui $s7, 0x800F */ - cpu->gpr[23] = 0x800F0000u; - PGXP_ALU(0x3C17800Fu, cpu->gpr[23], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC2EF94: AFBE0034 sw $fp, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046F94u); return; } g_debug_last_store_pc = 0x80046F94u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0034u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80046F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2EF98: 3C138011 lui $s3, 0x8011 */ - cpu->gpr[19] = 0x80110000u; - PGXP_ALU(0x3C138011u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80046F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2EF9C: 26730EC8 addiu $s3, $s3, 3784 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (3784)); - PGXP_ALU(0x26730EC8u, cpu->gpr[19], _pgx1, 0x00000EC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80046F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC2EFA0: 241E0003 addiu $fp, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x241E0003u, cpu->gpr[30], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2EFA4: 26F7D2A0 addiu $s7, $s7, -11616 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (-11616)); - PGXP_ALU(0x26F7D2A0u, cpu->gpr[23], _pgx1, 0xFFFFD2A0u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC2EFA8: 24160004 addiu $s6, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24160004u, cpu->gpr[22], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2EFAC: AFB00040 sw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80046FACu); return; } g_debug_last_store_pc = 0x80046FACu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80046FACu); -#endif -label_BFC2EFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EFB0: 0C011970 jal 0xB00465C0 */ - cpu->gpr[31] = 0x80046FB8u; /* jal link before delay slot */ - psx_delay_BFC2EFB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2EFB4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FB4u); -#endif - if (psx_delay_BFC2EFB0) { - psx_delay_BFC2EFB0 = 0; - cpu->gpr[31] = 0x80046FB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800465C0u); - cpu->pc = 0x800465C0u; return; - } -label_BFC2EFB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EFB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC2EFB8: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC2EFBC: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2EFC0: 0C011B9B jal 0xB0046E6C */ - cpu->gpr[31] = 0x80046FC8u; /* jal link before delay slot */ - psx_delay_BFC2EFC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2EFC4: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FC4u); -#endif - if (psx_delay_BFC2EFC0) { - psx_delay_BFC2EFC0 = 0; - cpu->gpr[31] = 0x80046FC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046E6Cu); - cpu->pc = 0x80046E6Cu; return; - } -label_BFC2EFC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2EFC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2EFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2EFC8: 00127880 sll $t7, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00127880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2EFCC: 01F27823 subu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[18]; - PGXP_ALU(0x01F27823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2EFD0: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2EFD4: 01C27023 subu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[2]; - PGXP_ALU(0x01C27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EFD8: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2EFDC: 01F27821 addu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[18]; - PGXP_ALU(0x01F27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EFE0: 000E7080 sll $t6, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2EFE4: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EFE8: 000F7900 sll $t7, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000F7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48000u); -#endif - /* 0xBFC2EFEC: 01F27821 addu $t7, $t7, $s2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[18]; - PGXP_ALU(0x01F27821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80046FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2EFF0: 000E7100 sll $t6, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2EFF4: 01C27021 addu $t6, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[2]; - PGXP_ALU(0x01C27021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2EFF8: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80046FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x98000u); -#endif - /* 0xBFC2EFFC: 026F8021 addu $s0, $s3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[16] = cpu->gpr[19] + cpu->gpr[15]; - PGXP_ALU(0x026F8021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80046FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2F000: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80047000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84010u); -#endif - /* 0xBFC2F004: 026E2021 addu $a0, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC2F008: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F00C: 0C011C75 jal 0xB00471D4 */ - cpu->gpr[31] = 0x80047014u; /* jal link before delay slot */ - psx_delay_BFC2F00C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F010: 24060688 addiu $a2, $zero, 1672 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1672)); - PGXP_ALU(0x24060688u, cpu->gpr[6], _pgx1, 0x00000688u); } -#ifdef PSX_COSIM - cosim_instr(0x80047010u); -#endif - if (psx_delay_BFC2F00C) { - psx_delay_BFC2F00C = 0; - cpu->gpr[31] = 0x80047014u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471D4u); - cpu->pc = 0x800471D4u; return; - } -label_BFC2F014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2F014: 2A81003C slti $at, $s4, 60 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (60) ? 1 : 0); - PGXP_ALU(0x2A81003Cu, cpu->gpr[1], _pgx1, 0x003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F018: 10200006 beq $at, $zero, 0xBFC2F034 */ - uint32_t psx_brA_BFC2F018 = cpu->gpr[1]; uint32_t psx_brB_BFC2F018 = cpu->gpr[0]; - psx_taken_BFC2F018 = (psx_brA_BFC2F018 == psx_brB_BFC2F018); - psx_delay_BFC2F018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2F01C: 26B9001E addiu $t9, $s5, 30 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[21] + (30)); - PGXP_ALU(0x26B9001Eu, cpu->gpr[25], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8004701Cu); -#endif - if (psx_delay_BFC2F018) { - psx_delay_BFC2F018 = 0; - if (psx_taken_BFC2F018) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047034u); - goto label_BFC2F034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047020u); - } -label_BFC2F020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC2F020: 26B8003C addiu $t8, $s5, 60 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[21] + (60)); - PGXP_ALU(0x26B8003Cu, cpu->gpr[24], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410000u); -#endif - /* 0xBFC2F024: AE160000 sw $s6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047024u); return; } g_debug_last_store_pc = 0x80047024u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAE160000u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80047024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F028: 10000004 beq $zero, $zero, 0xBFC2F03C */ - uint32_t psx_brA_BFC2F028 = cpu->gpr[0]; uint32_t psx_brB_BFC2F028 = cpu->gpr[0]; - psx_taken_BFC2F028 = (psx_brA_BFC2F028 == psx_brB_BFC2F028); - psx_delay_BFC2F028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC2F02C: AE180004 sw $t8, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004702Cu); return; } g_debug_last_store_pc = 0x8004702Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE180004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004702Cu); -#endif - if (psx_delay_BFC2F028) { - psx_delay_BFC2F028 = 0; - if (psx_taken_BFC2F028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004703Cu); - goto label_BFC2F03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047030u); - } -label_BFC2F030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200000u); -#endif - /* 0xBFC2F030: 26B9001E addiu $t9, $s5, 30 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[21] + (30)); - PGXP_ALU(0x26B9001Eu, cpu->gpr[25], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80047030u); -#endif -label_BFC2F034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010000u); -#endif - /* 0xBFC2F034: AE1E0000 sw $fp, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047034u); return; } g_debug_last_store_pc = 0x80047034u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAE1E0000u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80047034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC2F038: AE190004 sw $t9, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047038u); return; } g_debug_last_store_pc = 0x80047038u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE190004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047038u); -#endif -label_BFC2F03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC2F03C: 00124080 sll $t0, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00124080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40100u); -#endif - /* 0xBFC2F040: 01124023 subu $t0, $t0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[18]; - PGXP_ALU(0x01124023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2F044: 000840C0 sll $t0, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000840C0u, cpu->gpr[8], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80047044u); -#endif - /* 0xBFC2F048: 8E09000C lw $t1, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047048u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10000u); } - PGXP_LOAD(0x8E09000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047048u); -#endif - /* 0xBFC2F04C: 8E0A0010 lw $t2, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004704Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x8E0A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004704Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800104u); -#endif - /* 0xBFC2F050: 02E81021 addu $v0, $s7, $t0 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[8]; - PGXP_ALU(0x02E81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC2F054: AC490000 sw $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047054u); return; } g_debug_last_store_pc = 0x80047054u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC2F058: AC4A0004 sw $t2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047058u); return; } g_debug_last_store_pc = 0x80047058u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047058u); -#endif - /* 0xBFC2F05C: 8FAB0048 lw $t3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004705Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0048u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004705Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2F060: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20802u); -#endif - /* 0xBFC2F064: 022B082A slt $at, $s1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x022B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F068: 1420FFD1 bne $at, $zero, 0xBFC2EFB0 */ - uint32_t psx_brA_BFC2F068 = cpu->gpr[1]; uint32_t psx_brB_BFC2F068 = cpu->gpr[0]; - psx_taken_BFC2F068 = (psx_brA_BFC2F068 != psx_brB_BFC2F068); - psx_delay_BFC2F068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F06C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004706Cu); -#endif - if (psx_delay_BFC2F068) { - psx_delay_BFC2F068 = 0; - if (psx_taken_BFC2F068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80046FB0u); - goto label_BFC2EFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047070u); - } -label_BFC2F070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047070u); -#endif - /* 0xBFC2F070: 8FB00040 lw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047070u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047070u); -#endif - /* 0xBFC2F074: 8FB6003C lw $s6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047074u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6003Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80047074u); -#endif - /* 0xBFC2F078: 8FB70038 lw $s7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047078u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70038u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80047078u); -#endif - /* 0xBFC2F07C: 8FBE0034 lw $fp, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004707Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0034u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047080u); -#endif -label_BFC2F084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC2F084: 00126080 sll $t4, $s2, 2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[12] = cpu->gpr[18] << 2u; - PGXP_ALU(0x00126080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80047084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC2F088: 01926023 subu $t4, $t4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[18]; - PGXP_ALU(0x01926023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2F08C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004708Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC2F090: 01926021 addu $t4, $t4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[18]; - PGXP_ALU(0x01926021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2F094: 000C6100 sll $t4, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 4u; - PGXP_ALU(0x000C6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80047094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41000u); -#endif - /* 0xBFC2F098: 01926021 addu $t4, $t4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[18]; - PGXP_ALU(0x01926021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC2F09C: 000C60C0 sll $t4, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C60C0u, cpu->gpr[12], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004709Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800470A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83000u); -#endif - /* 0xBFC2F0A0: 026C6821 addu $t5, $s3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[19] + cpu->gpr[12]; - PGXP_ALU(0x026C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800470A0u); -#endif - /* 0xBFC2F0A4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800470A4u); -#endif - /* 0xBFC2F0A8: 8DA20004 lw $v0, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x2000u); } - PGXP_LOAD(0x8DA20004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800470A8u); -#endif - /* 0xBFC2F0AC: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470ACu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800470ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800470B0u); -#endif - /* 0xBFC2F0B0: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470B0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800470B0u); -#endif - /* 0xBFC2F0B4: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470B4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800470B4u); -#endif - /* 0xBFC2F0B8: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470B8u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800470B8u); -#endif - /* 0xBFC2F0BC: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800470BCu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800470BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800470C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F0C0: 03E00008 jr $ra */ - psx_delay_BFC2F0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F0C4: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x800470C4u); -#endif - if (psx_delay_BFC2F0C0) { - psx_delay_BFC2F0C0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F1D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F1D4u); - int psx_delay_BFC2F1D8 = 0; - int psx_taken_BFC2F1D8 = 0; - int psx_delay_BFC2F1F4 = 0; - int psx_taken_BFC2F1F4 = 0; - int psx_delay_BFC2F1FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F1E0u: goto label_BFC2F1E0; - case 0xBFC2F1FCu: goto label_BFC2F1FC; - default: break; - } - } -label_BFC2F1D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F1D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800471D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2F1D4: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800471D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F1D8: 10400008 beq $v0, $zero, 0xBFC2F1FC */ - uint32_t psx_brA_BFC2F1D8 = cpu->gpr[2]; uint32_t psx_brB_BFC2F1D8 = cpu->gpr[0]; - psx_taken_BFC2F1D8 = (psx_brA_BFC2F1D8 == psx_brB_BFC2F1D8); - psx_delay_BFC2F1D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2F1DC: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800471DCu); -#endif - if (psx_delay_BFC2F1D8) { - psx_delay_BFC2F1D8 = 0; - if (psx_taken_BFC2F1D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471FCu); - goto label_BFC2F1FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471E0u); - } -label_BFC2F1E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F1E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800471E0u); -#endif - /* 0xBFC2F1E0: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800471E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2F1E4: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800471E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F1E8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800471E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2F1EC: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800471ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800471F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2F1F0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800471F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F1F4: 1440FFFA bne $v0, $zero, 0xBFC2F1E0 */ - uint32_t psx_brA_BFC2F1F4 = cpu->gpr[2]; uint32_t psx_brB_BFC2F1F4 = cpu->gpr[0]; - psx_taken_BFC2F1F4 = (psx_brA_BFC2F1F4 != psx_brB_BFC2F1F4); - psx_delay_BFC2F1F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2F1F8: A0AEFFFF sb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800471F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA0AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800471F8u); -#endif - if (psx_delay_BFC2F1F4) { - psx_delay_BFC2F1F4 = 0; - if (psx_taken_BFC2F1F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471E0u); - goto label_BFC2F1E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800471FCu); - } -label_BFC2F1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800471FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F1FC: 03E00008 jr $ra */ - psx_delay_BFC2F1FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F200: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047200u); -#endif - if (psx_delay_BFC2F1FC) { - psx_delay_BFC2F1FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F210(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F210u); - int psx_delay_BFC2F220 = 0; - int psx_taken_BFC2F220 = 0; - int psx_delay_BFC2F228 = 0; - int psx_delay_BFC2F238 = 0; - int psx_taken_BFC2F238 = 0; - int psx_delay_BFC2F240 = 0; - int psx_delay_BFC2F24C = 0; - int psx_delay_BFC2F25C = 0; - int psx_taken_BFC2F25C = 0; - int psx_delay_BFC2F294 = 0; - int psx_delay_BFC2F2BC = 0; - int psx_delay_BFC2F2E8 = 0; - int psx_delay_BFC2F314 = 0; - int psx_delay_BFC2F328 = 0; - int psx_taken_BFC2F328 = 0; - int psx_delay_BFC2F398 = 0; - int psx_taken_BFC2F398 = 0; - int psx_delay_BFC2F3BC = 0; - int psx_taken_BFC2F3BC = 0; - int psx_delay_BFC2F3F4 = 0; - int psx_delay_BFC2F41C = 0; - int psx_delay_BFC2F448 = 0; - int psx_delay_BFC2F474 = 0; - int psx_delay_BFC2F488 = 0; - int psx_taken_BFC2F488 = 0; - int psx_delay_BFC2F510 = 0; - int psx_delay_BFC2F584 = 0; - int psx_delay_BFC2F610 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F228u: goto label_BFC2F228; - case 0xBFC2F230u: goto label_BFC2F230; - case 0xBFC2F240u: goto label_BFC2F240; - case 0xBFC2F248u: goto label_BFC2F248; - case 0xBFC2F254u: goto label_BFC2F254; - case 0xBFC2F264u: goto label_BFC2F264; - case 0xBFC2F29Cu: goto label_BFC2F29C; - case 0xBFC2F2C4u: goto label_BFC2F2C4; - case 0xBFC2F2F0u: goto label_BFC2F2F0; - case 0xBFC2F31Cu: goto label_BFC2F31C; - case 0xBFC2F330u: goto label_BFC2F330; - case 0xBFC2F388u: goto label_BFC2F388; - case 0xBFC2F3A0u: goto label_BFC2F3A0; - case 0xBFC2F3A4u: goto label_BFC2F3A4; - case 0xBFC2F3C4u: goto label_BFC2F3C4; - case 0xBFC2F3C8u: goto label_BFC2F3C8; - case 0xBFC2F3FCu: goto label_BFC2F3FC; - case 0xBFC2F424u: goto label_BFC2F424; - case 0xBFC2F450u: goto label_BFC2F450; - case 0xBFC2F47Cu: goto label_BFC2F47C; - case 0xBFC2F490u: goto label_BFC2F490; - case 0xBFC2F4E8u: goto label_BFC2F4E8; - case 0xBFC2F50Cu: goto label_BFC2F50C; - case 0xBFC2F518u: goto label_BFC2F518; - case 0xBFC2F58Cu: goto label_BFC2F58C; - case 0xBFC2F60Cu: goto label_BFC2F60C; - default: break; - } - } -label_BFC2F210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2F210: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047210u); -#endif - /* 0xBFC2F214: 8DCE8374 lw $t6, -31884($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047214u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8374u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F218: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F21C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004721Cu); return; } g_debug_last_store_pc = 0x8004721Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004721Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2F220: 11C00007 beq $t6, $zero, 0xBFC2F240 */ - uint32_t psx_brA_BFC2F220 = cpu->gpr[14]; uint32_t psx_brB_BFC2F220 = cpu->gpr[0]; - psx_taken_BFC2F220 = (psx_brA_BFC2F220 == psx_brB_BFC2F220); - psx_delay_BFC2F220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2F224: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047224u); return; } g_debug_last_store_pc = 0x80047224u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047224u); -#endif - if (psx_delay_BFC2F220) { - psx_delay_BFC2F220 = 0; - if (psx_taken_BFC2F220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047240u); - goto label_BFC2F240; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047228u); - } -label_BFC2F228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F228: 0C010FC0 jal 0xB0043F00 */ - cpu->gpr[31] = 0x80047230u; /* jal link before delay slot */ - psx_delay_BFC2F228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F22C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004722Cu); -#endif - if (psx_delay_BFC2F228) { - psx_delay_BFC2F228 = 0; - cpu->gpr[31] = 0x80047230u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F00u); - cpu->pc = 0x80043F00u; return; - } -label_BFC2F230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047230u); -#endif - /* 0xBFC2F230: 87AF0028 lh $t7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047230u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0028u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F234: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC2F238: 104F00F4 beq $v0, $t7, 0xBFC2F60C */ - uint32_t psx_brA_BFC2F238 = cpu->gpr[2]; uint32_t psx_brB_BFC2F238 = cpu->gpr[15]; - psx_taken_BFC2F238 = (psx_brA_BFC2F238 == psx_brB_BFC2F238); - psx_delay_BFC2F238 = 1; - /* 0xBFC2F23C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004723Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004723Cu); -#endif - if (psx_delay_BFC2F238) { - psx_delay_BFC2F238 = 0; - if (psx_taken_BFC2F238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004760Cu); - goto label_BFC2F60C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047240u); - } -label_BFC2F240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F240: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80047248u; /* jal link before delay slot */ - psx_delay_BFC2F240 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F244: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047244u); -#endif - if (psx_delay_BFC2F240) { - psx_delay_BFC2F240 = 0; - cpu->gpr[31] = 0x80047248u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC2F248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047248u); -#endif - /* 0xBFC2F248: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047248u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F24C: 0C010FC4 jal 0xB0043F10 */ - cpu->gpr[31] = 0x80047254u; /* jal link before delay slot */ - psx_delay_BFC2F24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047250u); -#endif - if (psx_delay_BFC2F24C) { - psx_delay_BFC2F24C = 0; - cpu->gpr[31] = 0x80047254u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F10u); - cpu->pc = 0x80043F10u; return; - } -label_BFC2F254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047254u); -#endif - /* 0xBFC2F254: 87B80028 lh $t8, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047254u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80028u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F258: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2F25C: 1300005A beq $t8, $zero, 0xBFC2F3C8 */ - uint32_t psx_brA_BFC2F25C = cpu->gpr[24]; uint32_t psx_brB_BFC2F25C = cpu->gpr[0]; - psx_taken_BFC2F25C = (psx_brA_BFC2F25C == psx_brB_BFC2F25C); - psx_delay_BFC2F25C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2F260: 240C0280 addiu $t4, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x240C0280u, cpu->gpr[12], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80047260u); -#endif - if (psx_delay_BFC2F25C) { - psx_delay_BFC2F25C = 0; - if (psx_taken_BFC2F25C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800473C8u); - goto label_BFC2F3C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047264u); - } -label_BFC2F264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2F264: 24190280 addiu $t9, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24190280u, cpu->gpr[25], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80047264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F268: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2F26C: AC399DE4 sw $t9, -25116($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004726Cu); return; } g_debug_last_store_pc = 0x8004726Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399DE4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F270: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC2F274: 240801E0 addiu $t0, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240801E0u, cpu->gpr[8], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80047274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F278: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2F27C: 240901E0 addiu $t1, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240901E0u, cpu->gpr[9], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2F280: AC289DE8 sw $t0, -25112($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047280u); return; } g_debug_last_store_pc = 0x80047280u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC289DE8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC2F284: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047284u); return; } g_debug_last_store_pc = 0x80047284u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F288: 2484A868 addiu $a0, $a0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22424)); - PGXP_ALU(0x2484A868u, cpu->gpr[4], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x80047288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F28C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004728Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F290: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F294: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x8004729Cu; /* jal link before delay slot */ - psx_delay_BFC2F294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2F298: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80047298u); -#endif - if (psx_delay_BFC2F294) { - psx_delay_BFC2F294 = 0; - cpu->gpr[31] = 0x8004729Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC2F29C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F29Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004729Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2F29C: 3C0A8009 lui $t2, 0x8009 */ - cpu->gpr[10] = 0x80090000u; - PGXP_ALU(0x3C0A8009u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004729Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472A0u); -#endif - /* 0xBFC2F2A0: 8D4A9DE8 lw $t2, -25112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472A0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DE8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800472A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F2A4: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472A4u); -#endif - /* 0xBFC2F2A8: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472A8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800472A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F2AC: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F2B0: 2484BC88 addiu $a0, $a0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); - PGXP_ALU(0x2484BC88u, cpu->gpr[4], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x800472B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F2B4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800472B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F2B8: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800472B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F2BC: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x800472C4u; /* jal link before delay slot */ - psx_delay_BFC2F2BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC2F2C0: AFAA0010 sw $t2, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472C0u); return; } g_debug_last_store_pc = 0x800472C0u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800472C0u); -#endif - if (psx_delay_BFC2F2BC) { - psx_delay_BFC2F2BC = 0; - cpu->gpr[31] = 0x800472C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC2F2C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F2C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2F2C4: 3C0B8009 lui $t3, 0x8009 */ - cpu->gpr[11] = 0x80090000u; - PGXP_ALU(0x3C0B8009u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472C4u); -#endif - /* 0xBFC2F2C8: 8D6B9DE8 lw $t3, -25112($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472C8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9DE8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800472C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F2CC: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472D0u); -#endif - /* 0xBFC2F2D0: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472D0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800472D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F2D4: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2F2D8: 256CFFFE addiu $t4, $t3, -2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-2)); - PGXP_ALU(0x256CFFFEu, cpu->gpr[12], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x800472D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC2F2DC: AFAC0010 sw $t4, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472DCu); return; } g_debug_last_store_pc = 0x800472DCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800472DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F2E0: 2484A8C4 addiu $a0, $a0, -22332 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22332)); - PGXP_ALU(0x2484A8C4u, cpu->gpr[4], _pgx1, 0xFFFFA8C4u); } -#ifdef PSX_COSIM - cosim_instr(0x800472E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F2E4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800472E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F2E8: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x800472F0u; /* jal link before delay slot */ - psx_delay_BFC2F2E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F2EC: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800472ECu); -#endif - if (psx_delay_BFC2F2E8) { - psx_delay_BFC2F2E8 = 0; - cpu->gpr[31] = 0x800472F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC2F2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800472F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC2F2F0: 3C0D8009 lui $t5, 0x8009 */ - cpu->gpr[13] = 0x80090000u; - PGXP_ALU(0x3C0D8009u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472F0u); -#endif - /* 0xBFC2F2F4: 8DAD9DE8 lw $t5, -25112($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472F4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9DE8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800472F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F2F8: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800472F8u); -#endif - /* 0xBFC2F2FC: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800472FCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800472FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F300: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC2F304: 25AEFFFE addiu $t6, $t5, -2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (-2)); - PGXP_ALU(0x25AEFFFEu, cpu->gpr[14], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80047304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2F308: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047308u); return; } g_debug_last_store_pc = 0x80047308u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F30C: 2484BCE4 addiu $a0, $a0, -17180 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17180)); - PGXP_ALU(0x2484BCE4u, cpu->gpr[4], _pgx1, 0xFFFFBCE4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004730Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F310: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F314: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x8004731Cu; /* jal link before delay slot */ - psx_delay_BFC2F314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F318: 24060002 addiu $a2, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24060002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80047318u); -#endif - if (psx_delay_BFC2F314) { - psx_delay_BFC2F314 = 0; - cpu->gpr[31] = 0x8004731Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC2F31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2F31C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047320u); -#endif - /* 0xBFC2F320: 8DEF9DE0 lw $t7, -25120($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047320u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DE0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F324: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2F328: 11E00017 beq $t7, $zero, 0xBFC2F388 */ - uint32_t psx_brA_BFC2F328 = cpu->gpr[15]; uint32_t psx_brB_BFC2F328 = cpu->gpr[0]; - psx_taken_BFC2F328 = (psx_brA_BFC2F328 == psx_brB_BFC2F328); - psx_delay_BFC2F328 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F32C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004732Cu); -#endif - if (psx_delay_BFC2F328) { - psx_delay_BFC2F328 = 0; - if (psx_taken_BFC2F328) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047388u); - goto label_BFC2F388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047330u); - } -label_BFC2F330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2F330: 24180003 addiu $t8, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24180003u, cpu->gpr[24], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80047330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F334: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2F338: A438BCEC sh $t8, -17172($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17172)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047338u); return; } g_debug_last_store_pc = 0x80047338u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438BCECu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F33C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004733Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2F340: 24190003 addiu $t9, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24190003u, cpu->gpr[25], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80047340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC2F344: A439A8CC sh $t9, -22324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22324)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047344u); return; } g_debug_last_store_pc = 0x80047344u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439A8CCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F348: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC2F34C: 2408001B addiu $t0, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2408001Bu, cpu->gpr[8], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8004734Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC2F350: A428BCEE sh $t0, -17170($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047350u); return; } g_debug_last_store_pc = 0x80047350u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA428BCEEu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F354: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC2F358: 2409001B addiu $t1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2409001Bu, cpu->gpr[9], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80047358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC2F35C: A429A8CE sh $t1, -22322($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22322; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22322)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004735Cu); return; } g_debug_last_store_pc = 0x8004735Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA429A8CEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004735Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F360: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F364: A420BCF0 sh $zero, -17168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047364u); return; } g_debug_last_store_pc = 0x80047364u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420BCF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F368: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F36C: A420A8D0 sh $zero, -22320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22320)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004736Cu); return; } g_debug_last_store_pc = 0x8004736Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420A8D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004736Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F370: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2F374: 240A0001 addiu $t2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240A0001u, cpu->gpr[10], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC2F378: A02ABCF6 sb $t2, -17162($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17162; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80047378u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-17162)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA02ABCF6u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F37C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004737Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2F380: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2F384: A02BA8D6 sb $t3, -22314($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22314; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80047384u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22314)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA02BA8D6u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80047384u); -#endif -label_BFC2F388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F388: 3C028009 lui $v0, 0x8009 */ - cpu->gpr[2] = 0x80090000u; - PGXP_ALU(0x3C028009u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047388u); -#endif - /* 0xBFC2F38C: 8C429DE8 lw $v0, -25112($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004738Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429DE8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004738Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F394: 2442FFFE addiu $v0, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x2442FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80047394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F398: 04410002 bgez $v0, 0xBFC2F3A4 */ - uint32_t psx_brA_BFC2F398 = cpu->gpr[2]; - psx_taken_BFC2F398 = ((int32_t)psx_brA_BFC2F398 >= 0); - psx_delay_BFC2F398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC2F39C: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004739Cu); -#endif - if (psx_delay_BFC2F398) { - psx_delay_BFC2F398 = 0; - if (psx_taken_BFC2F398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800473A4u); - goto label_BFC2F3A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800473A0u); - } -label_BFC2F3A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F3A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F3A0: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800473A0u); -#endif -label_BFC2F3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F3A4: 00011043 sra $v0, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00011043u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800473A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F3A8: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800473A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F3AC: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800473ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F3B0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F3B4: A422A8D2 sh $v0, -22318($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22318; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22318)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800473B4u); return; } g_debug_last_store_pc = 0x800473B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422A8D2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800473B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F3B8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F3BC: 10000053 beq $zero, $zero, 0xBFC2F50C */ - uint32_t psx_brA_BFC2F3BC = cpu->gpr[0]; uint32_t psx_brB_BFC2F3BC = cpu->gpr[0]; - psx_taken_BFC2F3BC = (psx_brA_BFC2F3BC == psx_brB_BFC2F3BC); - psx_delay_BFC2F3BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F3C0: A422BCF2 sh $v0, -17166($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800473C0u); return; } g_debug_last_store_pc = 0x800473C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422BCF2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800473C0u); -#endif - if (psx_delay_BFC2F3BC) { - psx_delay_BFC2F3BC = 0; - if (psx_taken_BFC2F3BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004750Cu); - goto label_BFC2F50C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800473C4u); - } -label_BFC2F3C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F3C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2F3C4: 240C0280 addiu $t4, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x240C0280u, cpu->gpr[12], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800473C4u); -#endif -label_BFC2F3C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F3C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F3C8: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC2F3CC: AC2C9DE4 sw $t4, -25116($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800473CCu); return; } g_debug_last_store_pc = 0x800473CCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9DE4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800473CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F3D0: 3C018009 lui $at, 0x8009 */ - cpu->gpr[1] = 0x80090000u; - PGXP_ALU(0x3C018009u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2F3D4: 240D00F0 addiu $t5, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240D00F0u, cpu->gpr[13], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800473D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F3D8: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2F3DC: 240E00F0 addiu $t6, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240E00F0u, cpu->gpr[14], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800473DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2F3E0: AC2D9DE8 sw $t5, -25112($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800473E0u); return; } g_debug_last_store_pc = 0x800473E0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2D9DE8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800473E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2F3E4: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800473E4u); return; } g_debug_last_store_pc = 0x800473E4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800473E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F3E8: 2484A868 addiu $a0, $a0, -22424 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22424)); - PGXP_ALU(0x2484A868u, cpu->gpr[4], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x800473E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F3EC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800473ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F3F0: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800473F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F3F4: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x800473FCu; /* jal link before delay slot */ - psx_delay_BFC2F3F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2F3F8: 24070280 addiu $a3, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24070280u, cpu->gpr[7], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800473F8u); -#endif - if (psx_delay_BFC2F3F4) { - psx_delay_BFC2F3F4 = 0; - cpu->gpr[31] = 0x800473FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC2F3FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F3FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800473FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2F3FC: 3C0F8009 lui $t7, 0x8009 */ - cpu->gpr[15] = 0x80090000u; - PGXP_ALU(0x3C0F8009u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800473FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047400u); -#endif - /* 0xBFC2F400: 8DEF9DE8 lw $t7, -25112($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047400u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9DE8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F404: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047404u); -#endif - /* 0xBFC2F408: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047408u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80047408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F40C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004740Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F410: 2484BC88 addiu $a0, $a0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); - PGXP_ALU(0x2484BC88u, cpu->gpr[4], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x80047410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F414: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F418: 240600F1 addiu $a2, $zero, 241 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (241)); - PGXP_ALU(0x240600F1u, cpu->gpr[6], _pgx1, 0x000000F1u); } -#ifdef PSX_COSIM - cosim_instr(0x80047418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F41C: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80047424u; /* jal link before delay slot */ - psx_delay_BFC2F41C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2F420: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047420u); return; } g_debug_last_store_pc = 0x80047420u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047420u); -#endif - if (psx_delay_BFC2F41C) { - psx_delay_BFC2F41C = 0; - cpu->gpr[31] = 0x80047424u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC2F424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2F424: 3C188009 lui $t8, 0x8009 */ - cpu->gpr[24] = 0x80090000u; - PGXP_ALU(0x3C188009u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047424u); -#endif - /* 0xBFC2F428: 8F189DE8 lw $t8, -25112($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047428u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189DE8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F42C: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004742Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047430u); -#endif - /* 0xBFC2F430: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047430u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80047430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F434: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2F438: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2F43C: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004743Cu); return; } g_debug_last_store_pc = 0x8004743Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004743Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F440: 2484A8C4 addiu $a0, $a0, -22332 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-22332)); - PGXP_ALU(0x2484A8C4u, cpu->gpr[4], _pgx1, 0xFFFFA8C4u); } -#ifdef PSX_COSIM - cosim_instr(0x80047440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F444: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F448: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x80047450u; /* jal link before delay slot */ - psx_delay_BFC2F448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F44C: 240600F1 addiu $a2, $zero, 241 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (241)); - PGXP_ALU(0x240600F1u, cpu->gpr[6], _pgx1, 0x000000F1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004744Cu); -#endif - if (psx_delay_BFC2F448) { - psx_delay_BFC2F448 = 0; - cpu->gpr[31] = 0x80047450u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC2F450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2F450: 3C088009 lui $t0, 0x8009 */ - cpu->gpr[8] = 0x80090000u; - PGXP_ALU(0x3C088009u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047450u); -#endif - /* 0xBFC2F454: 8D089DE8 lw $t0, -25112($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047454u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC2F458: 3C078009 lui $a3, 0x8009 */ - cpu->gpr[7] = 0x80090000u; - PGXP_ALU(0x3C078009u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047458u); -#endif - /* 0xBFC2F45C: 8CE79DE4 lw $a3, -25116($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004745Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79DE4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004745Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F460: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2F464: 2509FFFF addiu $t1, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2509FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC2F468: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047468u); return; } g_debug_last_store_pc = 0x80047468u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F46C: 2484BCE4 addiu $a0, $a0, -17180 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-17180)); - PGXP_ALU(0x2484BCE4u, cpu->gpr[4], _pgx1, 0xFFFFBCE4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004746Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F470: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F474: 0C01457B jal 0xB00515EC */ - cpu->gpr[31] = 0x8004747Cu; /* jal link before delay slot */ - psx_delay_BFC2F474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2F478: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047478u); -#endif - if (psx_delay_BFC2F474) { - psx_delay_BFC2F474 = 0; - cpu->gpr[31] = 0x8004747Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ECu); - cpu->pc = 0x800515ECu; return; - } -label_BFC2F47C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F47Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004747Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2F47C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004747Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047480u); -#endif - /* 0xBFC2F480: 8D4A9DE0 lw $t2, -25120($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047480u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DE0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F484: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2F488: 11400017 beq $t2, $zero, 0xBFC2F4E8 */ - uint32_t psx_brA_BFC2F488 = cpu->gpr[10]; uint32_t psx_brB_BFC2F488 = cpu->gpr[0]; - psx_taken_BFC2F488 = (psx_brA_BFC2F488 == psx_brB_BFC2F488); - psx_delay_BFC2F488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F48C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004748Cu); -#endif - if (psx_delay_BFC2F488) { - psx_delay_BFC2F488 = 0; - if (psx_taken_BFC2F488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800474E8u); - goto label_BFC2F4E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047490u); - } -label_BFC2F490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2F490: 240B0003 addiu $t3, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240B0003u, cpu->gpr[11], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80047490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F494: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC2F498: A42BBCEC sh $t3, -17172($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17172)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047498u); return; } g_debug_last_store_pc = 0x80047498u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA42BBCECu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80047498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F49C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2F4A0: 240C0003 addiu $t4, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240C0003u, cpu->gpr[12], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800474A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC2F4A4: A42CA8CC sh $t4, -22324($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22324)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800474A4u); return; } g_debug_last_store_pc = 0x800474A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CA8CCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800474A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4A8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC2F4AC: 240D001B addiu $t5, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240D001Bu, cpu->gpr[13], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800474ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC2F4B0: A42DBCEE sh $t5, -17170($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800474B0u); return; } g_debug_last_store_pc = 0x800474B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA42DBCEEu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800474B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4B4: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2F4B8: 240E001B addiu $t6, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240E001Bu, cpu->gpr[14], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x800474B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2F4BC: A42EA8CE sh $t6, -22322($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22322; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22322)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800474BCu); return; } g_debug_last_store_pc = 0x800474BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EA8CEu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800474BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4C0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F4C4: A420BCF0 sh $zero, -17168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800474C4u); return; } g_debug_last_store_pc = 0x800474C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420BCF0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800474C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4C8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F4CC: A420A8D0 sh $zero, -22320($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22320)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800474CCu); return; } g_debug_last_store_pc = 0x800474CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420A8D0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800474CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4D0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2F4D4: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800474D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2F4D8: A02FBCF6 sb $t7, -17162($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17162; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800474D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-17162)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FBCF6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800474D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4DC: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC2F4E0: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800474E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2F4E4: A038A8D6 sb $t8, -22314($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22314; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800474E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-22314)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038A8D6u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800474E4u); -#endif -label_BFC2F4E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F4E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F4E8: 3C028009 lui $v0, 0x8009 */ - cpu->gpr[2] = 0x80090000u; - PGXP_ALU(0x3C028009u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474E8u); -#endif - /* 0xBFC2F4EC: 8C429DE8 lw $v0, -25112($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800474ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429DE8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800474ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800474F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F4F0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800474F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F4F4: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800474F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F4F8: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800474F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F4FC: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800474FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F500: A422A8D2 sh $v0, -22318($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -22318; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-22318)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047500u); return; } g_debug_last_store_pc = 0x80047500u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422A8D2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F504: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F508: A422BCF2 sh $v0, -17166($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -17166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-17166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047508u); return; } g_debug_last_store_pc = 0x80047508u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422BCF2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047508u); -#endif -label_BFC2F50C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F50Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F50C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004750Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F510: 0C01467B jal 0xB00519EC */ - cpu->gpr[31] = 0x80047518u; /* jal link before delay slot */ - psx_delay_BFC2F510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F514: 2484B8D8 addiu $a0, $a0, -18216 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-18216)); - PGXP_ALU(0x2484B8D8u, cpu->gpr[4], _pgx1, 0xFFFFB8D8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047514u); -#endif - if (psx_delay_BFC2F510) { - psx_delay_BFC2F510 = 0; - cpu->gpr[31] = 0x80047518u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800519ECu); - cpu->pc = 0x800519ECu; return; - } -label_BFC2F518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2F518: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047518u); -#endif - /* 0xBFC2F51C: 84A5A868 lh $a1, -22424($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -22424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-22424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004751Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A5A868u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004751Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2F520: 3C06800F lui $a2, 0x800F */ - cpu->gpr[6] = 0x800F0000u; - PGXP_ALU(0x3C06800Fu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047520u); -#endif - /* 0xBFC2F524: 84C6A86A lh $a2, -22422($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -22422; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-22422)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047524u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x84C6A86Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80047524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F528: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2F52C: 3C198009 lui $t9, 0x8009 */ - cpu->gpr[25] = 0x80090000u; - PGXP_ALU(0x3C198009u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004752Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2F530: A425B8E0 sh $a1, -18208($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18208)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047530u); return; } g_debug_last_store_pc = 0x80047530u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425B8E0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047530u); -#endif - /* 0xBFC2F534: 8F399DE4 lw $t9, -25116($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047534u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399DE4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F538: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2F53C: A426B8E2 sh $a2, -18206($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18206; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18206)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004753Cu); return; } g_debug_last_store_pc = 0x8004753Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA426B8E2u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004753Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F540: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000024u); -#endif - /* 0xBFC2F544: 00B91021 addu $v0, $a1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[25]; - PGXP_ALU(0x00B91021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F548: A422B8E4 sh $v0, -18204($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18204)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047548u); return; } g_debug_last_store_pc = 0x80047548u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422B8E4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F54C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004754Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2F550: 3C088009 lui $t0, 0x8009 */ - cpu->gpr[8] = 0x80090000u; - PGXP_ALU(0x3C088009u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2F554: A426B8E6 sh $a2, -18202($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18202; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18202)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047554u); return; } g_debug_last_store_pc = 0x80047554u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA426B8E6u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80047554u); -#endif - /* 0xBFC2F558: 8D089DE8 lw $t0, -25112($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047558u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089DE8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F55C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004755Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2F560: A425B8E8 sh $a1, -18200($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18200)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047560u); return; } g_debug_last_store_pc = 0x80047560u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425B8E8u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F564: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x148u); -#endif - /* 0xBFC2F568: 00C81821 addu $v1, $a2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[8]; - PGXP_ALU(0x00C81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F56C: A423B8EA sh $v1, -18198($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18198; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18198)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004756Cu); return; } g_debug_last_store_pc = 0x8004756Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423B8EAu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004756Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F570: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F574: A422B8EC sh $v0, -18196($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18196)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047574u); return; } g_debug_last_store_pc = 0x80047574u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422B8ECu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F578: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F57C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004757Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F580: A423B8EE sh $v1, -18194($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -18194; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-18194)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047580u); return; } g_debug_last_store_pc = 0x80047580u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423B8EEu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F584: 0C01467B jal 0xB00519EC */ - cpu->gpr[31] = 0x8004758Cu; /* jal link before delay slot */ - psx_delay_BFC2F584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F588: 2484CCF8 addiu $a0, $a0, -13064 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-13064)); - PGXP_ALU(0x2484CCF8u, cpu->gpr[4], _pgx1, 0xFFFFCCF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047588u); -#endif - if (psx_delay_BFC2F584) { - psx_delay_BFC2F584 = 0; - cpu->gpr[31] = 0x8004758Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800519ECu); - cpu->pc = 0x800519ECu; return; - } -label_BFC2F58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004758Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F58C: 3C04800F lui $a0, 0x800F */ - cpu->gpr[4] = 0x800F0000u; - PGXP_ALU(0x3C04800Fu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004758Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047590u); -#endif - /* 0xBFC2F590: 8484BC88 lh $a0, -17272($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -17272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-17272)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047590u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8484BC88u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2F594: 3C05800F lui $a1, 0x800F */ - cpu->gpr[5] = 0x800F0000u; - PGXP_ALU(0x3C05800Fu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047594u); -#endif - /* 0xBFC2F598: 84A5BC8A lh $a1, -17270($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -17270; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-17270)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047598u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x84A5BC8Au, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F59C: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2F5A0: 3C098009 lui $t1, 0x8009 */ - cpu->gpr[9] = 0x80090000u; - PGXP_ALU(0x3C098009u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2F5A4: A424CD00 sh $a0, -13056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13056; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13056)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475A4u); return; } g_debug_last_store_pc = 0x800475A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA424CD00u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800475A4u); -#endif - /* 0xBFC2F5A8: 8D299DE4 lw $t1, -25116($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800475A8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299DE4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800475A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5AC: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2F5B0: A425CD02 sh $a1, -13054($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13054; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13054)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475B0u); return; } g_debug_last_store_pc = 0x800475B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425CD02u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800475B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5B4: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x214u); -#endif - /* 0xBFC2F5B8: 00891021 addu $v0, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00891021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800475B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F5BC: A422CD04 sh $v0, -13052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13052)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475BCu); return; } g_debug_last_store_pc = 0x800475BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422CD04u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800475BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5C0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2F5C4: 3C0A8009 lui $t2, 0x8009 */ - cpu->gpr[10] = 0x80090000u; - PGXP_ALU(0x3C0A8009u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2F5C8: A425CD06 sh $a1, -13050($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13050; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13050)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475C8u); return; } g_debug_last_store_pc = 0x800475C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425CD06u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800475C8u); -#endif - /* 0xBFC2F5CC: 8D4A9DE8 lw $t2, -25112($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800475CCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9DE8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800475CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5D0: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2F5D4: A424CD08 sh $a0, -13048($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13048)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475D4u); return; } g_debug_last_store_pc = 0x800475D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA424CD08u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800475D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5D8: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x428u); -#endif - /* 0xBFC2F5DC: 00AA1821 addu $v1, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[10]; - PGXP_ALU(0x00AA1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800475DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F5E0: A423CD0A sh $v1, -13046($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13046; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13046)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475E0u); return; } g_debug_last_store_pc = 0x800475E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423CD0Au, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800475E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5E4: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F5E8: A422CD0C sh $v0, -13044($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13044; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13044)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475E8u); return; } g_debug_last_store_pc = 0x800475E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422CD0Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800475E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC2F5EC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800475F0u); -#endif - /* 0xBFC2F5F0: 8D6B8374 lw $t3, -31884($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -31884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800475F0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B8374u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800475F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5F4: 3C01800F lui $at, 0x800F */ - cpu->gpr[1] = 0x800F0000u; - PGXP_ALU(0x3C01800Fu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F5F8: A423CD0E sh $v1, -13042($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -13042; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-13042)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800475F8u); return; } g_debug_last_store_pc = 0x800475F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423CD0Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800475F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F5FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800475FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC2F600: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC2F604: AC2C8374 sw $t4, -31884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047604u); return; } g_debug_last_store_pc = 0x80047604u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C8374u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80047604u); -#endif - /* 0xBFC2F608: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047608u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047608u); -#endif -label_BFC2F60C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F60Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F60C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F610: 03E00008 jr $ra */ - psx_delay_BFC2F610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047614u); -#endif - if (psx_delay_BFC2F610) { - psx_delay_BFC2F610 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F618(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F618u); - int psx_delay_BFC2F624 = 0; - int psx_taken_BFC2F624 = 0; - int psx_delay_BFC2F634 = 0; - int psx_taken_BFC2F634 = 0; - int psx_delay_BFC2F63C = 0; - int psx_delay_BFC2F644 = 0; - int psx_delay_BFC2F654 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F62Cu: goto label_BFC2F62C; - case 0xBFC2F630u: goto label_BFC2F630; - case 0xBFC2F63Cu: goto label_BFC2F63C; - case 0xBFC2F644u: goto label_BFC2F644; - case 0xBFC2F64Cu: goto label_BFC2F64C; - default: break; - } - } -label_BFC2F618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F618: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047618u); -#endif - /* 0xBFC2F61C: 8C428374 lw $v0, -31884($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004761Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428374u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004761Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F620: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F624: 10400002 beq $v0, $zero, 0xBFC2F630 */ - uint32_t psx_brA_BFC2F624 = cpu->gpr[2]; uint32_t psx_brB_BFC2F624 = cpu->gpr[0]; - psx_taken_BFC2F624 = (psx_brA_BFC2F624 == psx_brB_BFC2F624); - psx_delay_BFC2F624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F628: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047628u); return; } g_debug_last_store_pc = 0x80047628u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047628u); -#endif - if (psx_delay_BFC2F624) { - psx_delay_BFC2F624 = 0; - if (psx_taken_BFC2F624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047630u); - goto label_BFC2F630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004762Cu); - } -label_BFC2F62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004762Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F62C: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004762Cu); -#endif -label_BFC2F630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F630: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F634: 14400005 bne $v0, $zero, 0xBFC2F64C */ - uint32_t psx_brA_BFC2F634 = cpu->gpr[2]; uint32_t psx_brB_BFC2F634 = cpu->gpr[0]; - psx_taken_BFC2F634 = (psx_brA_BFC2F634 != psx_brB_BFC2F634); - psx_delay_BFC2F634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F638: AC228374 sw $v0, -31884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047638u); return; } g_debug_last_store_pc = 0x80047638u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228374u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047638u); -#endif - if (psx_delay_BFC2F634) { - psx_delay_BFC2F634 = 0; - if (psx_taken_BFC2F634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004764Cu); - goto label_BFC2F64C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004763Cu); - } -label_BFC2F63C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F63Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004763Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F63C: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80047644u; /* jal link before delay slot */ - psx_delay_BFC2F63C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F640: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047640u); -#endif - if (psx_delay_BFC2F63C) { - psx_delay_BFC2F63C = 0; - cpu->gpr[31] = 0x80047644u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC2F644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F644: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x8004764Cu; /* jal link before delay slot */ - psx_delay_BFC2F644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F648: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047648u); -#endif - if (psx_delay_BFC2F644) { - psx_delay_BFC2F644 = 0; - cpu->gpr[31] = 0x8004764Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC2F64C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F64Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004764Cu); -#endif - /* 0xBFC2F64C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004764Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004764Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F650: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80047650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F654: 03E00008 jr $ra */ - psx_delay_BFC2F654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047658u); -#endif - if (psx_delay_BFC2F654) { - psx_delay_BFC2F654 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F65C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F65Cu); - int psx_delay_BFC2F668 = 0; - int psx_taken_BFC2F668 = 0; - int psx_delay_BFC2F678 = 0; - int psx_taken_BFC2F678 = 0; - int psx_delay_BFC2F680 = 0; - int psx_delay_BFC2F688 = 0; - int psx_delay_BFC2F698 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F670u: goto label_BFC2F670; - case 0xBFC2F674u: goto label_BFC2F674; - case 0xBFC2F680u: goto label_BFC2F680; - case 0xBFC2F688u: goto label_BFC2F688; - case 0xBFC2F690u: goto label_BFC2F690; - default: break; - } - } -label_BFC2F65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004765Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F65C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004765Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047660u); -#endif - /* 0xBFC2F660: 8C428374 lw $v0, -31884($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047660u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428374u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F664: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F668: 10400002 beq $v0, $zero, 0xBFC2F674 */ - uint32_t psx_brA_BFC2F668 = cpu->gpr[2]; uint32_t psx_brB_BFC2F668 = cpu->gpr[0]; - psx_taken_BFC2F668 = (psx_brA_BFC2F668 == psx_brB_BFC2F668); - psx_delay_BFC2F668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F66C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004766Cu); return; } g_debug_last_store_pc = 0x8004766Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004766Cu); -#endif - if (psx_delay_BFC2F668) { - psx_delay_BFC2F668 = 0; - if (psx_taken_BFC2F668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047674u); - goto label_BFC2F674; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047670u); - } -label_BFC2F670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F670: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047670u); -#endif -label_BFC2F674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F674: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2F678: 14400005 bne $v0, $zero, 0xBFC2F690 */ - uint32_t psx_brA_BFC2F678 = cpu->gpr[2]; uint32_t psx_brB_BFC2F678 = cpu->gpr[0]; - psx_taken_BFC2F678 = (psx_brA_BFC2F678 != psx_brB_BFC2F678); - psx_delay_BFC2F678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F67C: AC228374 sw $v0, -31884($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004767Cu); return; } g_debug_last_store_pc = 0x8004767Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC228374u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004767Cu); -#endif - if (psx_delay_BFC2F678) { - psx_delay_BFC2F678 = 0; - if (psx_taken_BFC2F678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047690u); - goto label_BFC2F690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047680u); - } -label_BFC2F680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F680: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80047688u; /* jal link before delay slot */ - psx_delay_BFC2F680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F684: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047684u); -#endif - if (psx_delay_BFC2F680) { - psx_delay_BFC2F680 = 0; - cpu->gpr[31] = 0x80047688u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC2F688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F688: 0C013B47 jal 0xB004ED1C */ - cpu->gpr[31] = 0x80047690u; /* jal link before delay slot */ - psx_delay_BFC2F688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F68C: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004768Cu); -#endif - if (psx_delay_BFC2F688) { - psx_delay_BFC2F688 = 0; - cpu->gpr[31] = 0x80047690u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ED1Cu); - cpu->pc = 0x8004ED1Cu; return; - } -label_BFC2F690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047690u); -#endif - /* 0xBFC2F690: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047690u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F694: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80047694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F698: 03E00008 jr $ra */ - psx_delay_BFC2F698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F69C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004769Cu); -#endif - if (psx_delay_BFC2F698) { - psx_delay_BFC2F698 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F6A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F6A0u); - int psx_delay_BFC2F6B4 = 0; - int psx_taken_BFC2F6B4 = 0; - int psx_delay_BFC2F6C0 = 0; - int psx_taken_BFC2F6C0 = 0; - int psx_delay_BFC2F6D8 = 0; - int psx_delay_BFC2F6F0 = 0; - int psx_taken_BFC2F6F0 = 0; - int psx_delay_BFC2F6F8 = 0; - int psx_taken_BFC2F6F8 = 0; - int psx_delay_BFC2F710 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F6BCu: goto label_BFC2F6BC; - case 0xBFC2F6C8u: goto label_BFC2F6C8; - case 0xBFC2F6CCu: goto label_BFC2F6CC; - case 0xBFC2F6E0u: goto label_BFC2F6E0; - case 0xBFC2F6F8u: goto label_BFC2F6F8; - case 0xBFC2F700u: goto label_BFC2F700; - case 0xBFC2F704u: goto label_BFC2F704; - default: break; - } - } -label_BFC2F6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F6A0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476A0u); -#endif - /* 0xBFC2F6A4: 8C42AE2C lw $v0, -20948($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800476A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42AE2Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800476A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2F6A8: 3C03800F lui $v1, 0x800F */ - cpu->gpr[3] = 0x800F0000u; - PGXP_ALU(0x3C03800Fu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2F6AC: 2463A868 addiu $v1, $v1, -22424 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-22424)); - PGXP_ALU(0x2463A868u, cpu->gpr[3], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x800476ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F6B0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800476B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2F6B4: 14430004 bne $v0, $v1, 0xBFC2F6C8 */ - uint32_t psx_brA_BFC2F6B4 = cpu->gpr[2]; uint32_t psx_brB_BFC2F6B4 = cpu->gpr[3]; - psx_taken_BFC2F6B4 = (psx_brA_BFC2F6B4 != psx_brB_BFC2F6B4); - psx_delay_BFC2F6B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F6B8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800476B8u); return; } g_debug_last_store_pc = 0x800476B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800476B8u); -#endif - if (psx_delay_BFC2F6B4) { - psx_delay_BFC2F6B4 = 0; - if (psx_taken_BFC2F6B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476C8u); - goto label_BFC2F6C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476BCu); - } -label_BFC2F6BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F6BC: 3C02800F lui $v0, 0x800F */ - cpu->gpr[2] = 0x800F0000u; - PGXP_ALU(0x3C02800Fu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F6C0: 10000002 beq $zero, $zero, 0xBFC2F6CC */ - uint32_t psx_brA_BFC2F6C0 = cpu->gpr[0]; uint32_t psx_brB_BFC2F6C0 = cpu->gpr[0]; - psx_taken_BFC2F6C0 = (psx_brA_BFC2F6C0 == psx_brB_BFC2F6C0); - psx_delay_BFC2F6C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F6C4: 2442BC88 addiu $v0, $v0, -17272 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-17272)); - PGXP_ALU(0x2442BC88u, cpu->gpr[2], _pgx1, 0xFFFFBC88u); } -#ifdef PSX_COSIM - cosim_instr(0x800476C4u); -#endif - if (psx_delay_BFC2F6C0) { - psx_delay_BFC2F6C0 = 0; - if (psx_taken_BFC2F6C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476CCu); - goto label_BFC2F6CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476C8u); - } -label_BFC2F6C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2F6C8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800476C8u); -#endif -label_BFC2F6CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F6CC: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F6D0: AC22AE2C sw $v0, -20948($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800476D0u); return; } g_debug_last_store_pc = 0x800476D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22AE2Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800476D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC2F6D4: 24440070 addiu $a0, $v0, 112 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (112)); - PGXP_ALU(0x24440070u, cpu->gpr[4], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x800476D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F6D8: 0C013CCD jal 0xB004F334 */ - cpu->gpr[31] = 0x800476E0u; /* jal link before delay slot */ - psx_delay_BFC2F6D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC2F6DC: 24050400 addiu $a1, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24050400u, cpu->gpr[5], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x800476DCu); -#endif - if (psx_delay_BFC2F6D8) { - psx_delay_BFC2F6D8 = 0; - cpu->gpr[31] = 0x800476E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F334u); - cpu->pc = 0x8004F334u; return; - } -label_BFC2F6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F6E0: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476E0u); -#endif - /* 0xBFC2F6E4: 8C42AE2C lw $v0, -20948($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800476E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42AE2Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800476E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2F6E8: 3C03800F lui $v1, 0x800F */ - cpu->gpr[3] = 0x800F0000u; - PGXP_ALU(0x3C03800Fu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800476E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2F6EC: 2463A868 addiu $v1, $v1, -22424 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-22424)); - PGXP_ALU(0x2463A868u, cpu->gpr[3], _pgx1, 0xFFFFA868u); } -#ifdef PSX_COSIM - cosim_instr(0x800476ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2F6F0: 14430004 bne $v0, $v1, 0xBFC2F704 */ - uint32_t psx_brA_BFC2F6F0 = cpu->gpr[2]; uint32_t psx_brB_BFC2F6F0 = cpu->gpr[3]; - psx_taken_BFC2F6F0 = (psx_brA_BFC2F6F0 != psx_brB_BFC2F6F0); - psx_delay_BFC2F6F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2F6F4: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800476F4u); -#endif - if (psx_delay_BFC2F6F0) { - psx_delay_BFC2F6F0 = 0; - if (psx_taken_BFC2F6F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047704u); - goto label_BFC2F704; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476F8u); - } -label_BFC2F6F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F6F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800476F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F6F8: 10000002 beq $zero, $zero, 0xBFC2F704 */ - uint32_t psx_brA_BFC2F6F8 = cpu->gpr[0]; uint32_t psx_brB_BFC2F6F8 = cpu->gpr[0]; - psx_taken_BFC2F6F8 = (psx_brA_BFC2F6F8 == psx_brB_BFC2F6F8); - psx_delay_BFC2F6F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2F6FC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800476FCu); -#endif - if (psx_delay_BFC2F6F8) { - psx_delay_BFC2F6F8 = 0; - if (psx_taken_BFC2F6F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047704u); - goto label_BFC2F704; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047700u); - } -label_BFC2F700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2F700: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047700u); -#endif -label_BFC2F704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047704u); -#endif - /* 0xBFC2F704: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047704u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2F708: 00031400 sll $v0, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00031400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F70C: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004770Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F710: 03E00008 jr $ra */ - psx_delay_BFC2F710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F714: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80047714u); -#endif - if (psx_delay_BFC2F710) { - psx_delay_BFC2F710 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F718(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F718u); - int psx_delay_BFC2F720 = 0; - int psx_delay_BFC2F728 = 0; - int psx_delay_BFC2F738 = 0; - int psx_delay_BFC2F748 = 0; - int psx_delay_BFC2F758 = 0; - int psx_delay_BFC2F76C = 0; - int psx_taken_BFC2F76C = 0; - int psx_delay_BFC2F77C = 0; - int psx_taken_BFC2F77C = 0; - int psx_delay_BFC2F794 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F728u: goto label_BFC2F728; - case 0xBFC2F730u: goto label_BFC2F730; - case 0xBFC2F740u: goto label_BFC2F740; - case 0xBFC2F750u: goto label_BFC2F750; - case 0xBFC2F760u: goto label_BFC2F760; - case 0xBFC2F774u: goto label_BFC2F774; - case 0xBFC2F784u: goto label_BFC2F784; - case 0xBFC2F78Cu: goto label_BFC2F78C; - default: break; - } - } -label_BFC2F718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F718: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F71C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004771Cu); return; } g_debug_last_store_pc = 0x8004771Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004771Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F720: 0C013C1C jal 0xB004F070 */ - cpu->gpr[31] = 0x80047728u; /* jal link before delay slot */ - psx_delay_BFC2F720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F724: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047724u); -#endif - if (psx_delay_BFC2F720) { - psx_delay_BFC2F720 = 0; - cpu->gpr[31] = 0x80047728u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F070u); - cpu->pc = 0x8004F070u; return; - } -label_BFC2F728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F728: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80047730u; /* jal link before delay slot */ - psx_delay_BFC2F728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2F72C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004772Cu); -#endif - if (psx_delay_BFC2F728) { - psx_delay_BFC2F728 = 0; - cpu->gpr[31] = 0x80047730u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC2F730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F730: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047730u); -#endif - /* 0xBFC2F734: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047734u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F738: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80047740u; /* jal link before delay slot */ - psx_delay_BFC2F738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F73C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004773Cu); -#endif - if (psx_delay_BFC2F738) { - psx_delay_BFC2F738 = 0; - cpu->gpr[31] = 0x80047740u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC2F740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F740: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047740u); -#endif - /* 0xBFC2F744: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047744u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F748: 0C013D3B jal 0xB004F4EC */ - cpu->gpr[31] = 0x80047750u; /* jal link before delay slot */ - psx_delay_BFC2F748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F74C: 2484005C addiu $a0, $a0, 92 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (92)); - PGXP_ALU(0x2484005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004774Cu); -#endif - if (psx_delay_BFC2F748) { - psx_delay_BFC2F748 = 0; - cpu->gpr[31] = 0x80047750u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F4ECu); - cpu->pc = 0x8004F4ECu; return; - } -label_BFC2F750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F750: 3C048006 lui $a0, 0x8006 */ - cpu->gpr[4] = 0x80060000u; - PGXP_ALU(0x3C048006u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047750u); -#endif - /* 0xBFC2F754: 8C84AE2C lw $a0, -20948($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047754u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84AE2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F758: 0C013CF8 jal 0xB004F3E0 */ - cpu->gpr[31] = 0x80047760u; /* jal link before delay slot */ - psx_delay_BFC2F758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F75C: 2484106C addiu $a0, $a0, 4204 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4204)); - PGXP_ALU(0x2484106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004775Cu); -#endif - if (psx_delay_BFC2F758) { - psx_delay_BFC2F758 = 0; - cpu->gpr[31] = 0x80047760u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F3E0u); - cpu->pc = 0x8004F3E0u; return; - } -label_BFC2F760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2F760: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047760u); -#endif - /* 0xBFC2F764: 8DCE9E24 lw $t6, -25052($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25052; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047764u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9E24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F768: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC2F76C: 15C00005 bne $t6, $zero, 0xBFC2F784 */ - uint32_t psx_brA_BFC2F76C = cpu->gpr[14]; uint32_t psx_brB_BFC2F76C = cpu->gpr[0]; - psx_taken_BFC2F76C = (psx_brA_BFC2F76C != psx_brB_BFC2F76C); - psx_delay_BFC2F76C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047770u); -#endif - if (psx_delay_BFC2F76C) { - psx_delay_BFC2F76C = 0; - if (psx_taken_BFC2F76C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047784u); - goto label_BFC2F784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047774u); - } -label_BFC2F774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2F774: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F778: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F77C: 10000003 beq $zero, $zero, 0xBFC2F78C */ - uint32_t psx_brA_BFC2F77C = cpu->gpr[0]; uint32_t psx_brB_BFC2F77C = cpu->gpr[0]; - psx_taken_BFC2F77C = (psx_brA_BFC2F77C == psx_brB_BFC2F77C); - psx_delay_BFC2F77C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2F780: AC2F9E24 sw $t7, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047780u); return; } g_debug_last_store_pc = 0x80047780u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9E24u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047780u); -#endif - if (psx_delay_BFC2F77C) { - psx_delay_BFC2F77C = 0; - if (psx_taken_BFC2F77C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004778Cu); - goto label_BFC2F78C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047784u); - } -label_BFC2F784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F784: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F788: AC209E24 sw $zero, -25052($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25052; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25052)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047788u); return; } g_debug_last_store_pc = 0x80047788u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209E24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047788u); -#endif -label_BFC2F78C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F78Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004778Cu); -#endif - /* 0xBFC2F78C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004778Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004778Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F790: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80047790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F794: 03E00008 jr $ra */ - psx_delay_BFC2F794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F798: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047798u); -#endif - if (psx_delay_BFC2F794) { - psx_delay_BFC2F794 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F79C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F79Cu); - int psx_delay_BFC2F7F0 = 0; - int psx_delay_BFC2F800 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F7F8u: goto label_BFC2F7F8; - default: break; - } - } -label_BFC2F79C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F79Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2F79C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2F7A0: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477A0u); -#endif - /* 0xBFC2F7A4: 8DEFAE2C lw $t7, -20948($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477A4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFAE2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800477A4u); -#endif - /* 0xBFC2F7A8: 8DCE8354 lw $t6, -31916($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477A8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8354u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800477A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F7AC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800477ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F7B0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477B0u); return; } g_debug_last_store_pc = 0x800477B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800477B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2F7B4: A1EE1074 sb $t6, 4212($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4212; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800477B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (4212)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE1074u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800477B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2F7B8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC2F7BC: 3C198006 lui $t9, 0x8006 */ - cpu->gpr[25] = 0x80060000u; - PGXP_ALU(0x3C198006u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477C0u); -#endif - /* 0xBFC2F7C0: 8F39AE2C lw $t9, -20948($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477C0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39AE2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800477C0u); -#endif - /* 0xBFC2F7C4: 8F188358 lw $t8, -31912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -31912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-31912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477C4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F188358u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800477C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC2F7C8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2F7CC: A3381075 sb $t8, 4213($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4213; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800477CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (4213)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3381075u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800477CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC2F7D0: 3C098006 lui $t1, 0x8006 */ - cpu->gpr[9] = 0x80060000u; - PGXP_ALU(0x3C098006u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477D0u); -#endif - /* 0xBFC2F7D4: 8D29AE2C lw $t1, -20948($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477D4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29AE2Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800477D4u); -#endif - /* 0xBFC2F7D8: 8D08835C lw $t0, -31908($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -31908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477D8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08835Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800477D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC2F7DC: 3C0A8006 lui $t2, 0x8006 */ - cpu->gpr[10] = 0x80060000u; - PGXP_ALU(0x3C0A8006u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800477DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2F7E0: A1281076 sb $t0, 4214($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4214; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800477E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (4214)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1281076u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800477E0u); -#endif - /* 0xBFC2F7E4: 8D4AAE2C lw $t2, -20948($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -20948; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-20948)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477E4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AAE2Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800477E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F7E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800477E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC2F7EC: 2544106C addiu $a0, $t2, 4204 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[10] + (4204)); - PGXP_ALU(0x2544106Cu, cpu->gpr[4], _pgx1, 0x0000106Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800477ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F7F0: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x800477F8u; /* jal link before delay slot */ - psx_delay_BFC2F7F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC2F7F4: 25451070 addiu $a1, $t2, 4208 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[10] + (4208)); - PGXP_ALU(0x25451070u, cpu->gpr[5], _pgx1, 0x00001070u); } -#ifdef PSX_COSIM - cosim_instr(0x800477F4u); -#endif - if (psx_delay_BFC2F7F0) { - psx_delay_BFC2F7F0 = 0; - cpu->gpr[31] = 0x800477F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC2F7F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F7F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800477F8u); -#endif - /* 0xBFC2F7F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800477F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800477F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F7FC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800477FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F800: 03E00008 jr $ra */ - psx_delay_BFC2F800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F804: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047804u); -#endif - if (psx_delay_BFC2F800) { - psx_delay_BFC2F800 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F808(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F808u); - int psx_delay_BFC2F814 = 0; - int psx_delay_BFC2F828 = 0; - int psx_taken_BFC2F828 = 0; - int psx_delay_BFC2F838 = 0; - int psx_taken_BFC2F838 = 0; - int psx_delay_BFC2F854 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F81Cu: goto label_BFC2F81C; - case 0xBFC2F830u: goto label_BFC2F830; - case 0xBFC2F840u: goto label_BFC2F840; - case 0xBFC2F84Cu: goto label_BFC2F84C; - default: break; - } - } -label_BFC2F808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F808: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80047808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F80C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004780Cu); return; } g_debug_last_store_pc = 0x8004780Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004780Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F810: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F814: 0C016805 jal 0xB005A014 */ - cpu->gpr[31] = 0x8004781Cu; /* jal link before delay slot */ - psx_delay_BFC2F814 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2F818: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047818u); -#endif - if (psx_delay_BFC2F814) { - psx_delay_BFC2F814 = 0; - cpu->gpr[31] = 0x8004781Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A014u); - cpu->pc = 0x8005A014u; return; - } -label_BFC2F81C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F81Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004781Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2F81C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004781Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047820u); -#endif - /* 0xBFC2F820: 8DCE8378 lw $t6, -31880($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047820u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8378u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2F824: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2F828: 144E0005 bne $v0, $t6, 0xBFC2F840 */ - uint32_t psx_brA_BFC2F828 = cpu->gpr[2]; uint32_t psx_brB_BFC2F828 = cpu->gpr[14]; - psx_taken_BFC2F828 = (psx_brA_BFC2F828 != psx_brB_BFC2F828); - psx_delay_BFC2F828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F82C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004782Cu); -#endif - if (psx_delay_BFC2F828) { - psx_delay_BFC2F828 = 0; - if (psx_taken_BFC2F828) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047840u); - goto label_BFC2F840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047830u); - } -label_BFC2F830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2F830: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047830u); -#endif - /* 0xBFC2F834: 8DEF8370 lw $t7, -31888($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -31888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-31888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047834u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF8370u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F838: 10000004 beq $zero, $zero, 0xBFC2F84C */ - uint32_t psx_brA_BFC2F838 = cpu->gpr[0]; uint32_t psx_brB_BFC2F838 = cpu->gpr[0]; - psx_taken_BFC2F838 = (psx_brA_BFC2F838 == psx_brB_BFC2F838); - psx_delay_BFC2F838 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Cu); -#endif - /* 0xBFC2F83C: 006F1024 and $v0, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[15]; - PGXP_ALU(0x006F1024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004783Cu); -#endif - if (psx_delay_BFC2F838) { - psx_delay_BFC2F838 = 0; - if (psx_taken_BFC2F838) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004784Cu); - goto label_BFC2F84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047840u); - } -label_BFC2F840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F840: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F844: AC238378 sw $v1, -31880($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047844u); return; } g_debug_last_store_pc = 0x80047844u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC238378u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC2F848: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047848u); -#endif -label_BFC2F84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004784Cu); -#endif - /* 0xBFC2F84C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004784Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004784Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F850: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80047850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F854: 03E00008 jr $ra */ - psx_delay_BFC2F854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047858u); -#endif - if (psx_delay_BFC2F854) { - psx_delay_BFC2F854 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F85C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F85Cu); - int psx_delay_BFC2F874 = 0; - int psx_delay_BFC2F87C = 0; - int psx_delay_BFC2F884 = 0; - int psx_delay_BFC2F890 = 0; - int psx_taken_BFC2F890 = 0; - int psx_delay_BFC2F8A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F874u: goto label_BFC2F874; - case 0xBFC2F87Cu: goto label_BFC2F87C; - case 0xBFC2F884u: goto label_BFC2F884; - case 0xBFC2F88Cu: goto label_BFC2F88C; - case 0xBFC2F898u: goto label_BFC2F898; - default: break; - } - } -label_BFC2F85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004785Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F85C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004785Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2F860: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047860u); return; } g_debug_last_store_pc = 0x80047860u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2F864: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047864u); return; } g_debug_last_store_pc = 0x80047864u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F868: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047868u); return; } g_debug_last_store_pc = 0x80047868u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC2F86C: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004786Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC2F870: 24110004 addiu $s1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24110004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80047870u); -#endif -label_BFC2F874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F874: 0C011DA8 jal 0xB00476A0 */ - cpu->gpr[31] = 0x8004787Cu; /* jal link before delay slot */ - psx_delay_BFC2F874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F878: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047878u); -#endif - if (psx_delay_BFC2F874) { - psx_delay_BFC2F874 = 0; - cpu->gpr[31] = 0x8004787Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476A0u); - cpu->pc = 0x800476A0u; return; - } -label_BFC2F87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004787Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F87C: 0C011DE7 jal 0xB004779C */ - cpu->gpr[31] = 0x80047884u; /* jal link before delay slot */ - psx_delay_BFC2F87C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F880: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047880u); -#endif - if (psx_delay_BFC2F87C) { - psx_delay_BFC2F87C = 0; - cpu->gpr[31] = 0x80047884u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004779Cu); - cpu->pc = 0x8004779Cu; return; - } -label_BFC2F884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F884: 0C011DC6 jal 0xB0047718 */ - cpu->gpr[31] = 0x8004788Cu; /* jal link before delay slot */ - psx_delay_BFC2F884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F888: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047888u); -#endif - if (psx_delay_BFC2F884) { - psx_delay_BFC2F884 = 0; - cpu->gpr[31] = 0x8004788Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047718u); - cpu->pc = 0x80047718u; return; - } -label_BFC2F88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004788Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2F88C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004788Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30000u); -#endif - /* 0xBFC2F890: 1611FFF8 bne $s0, $s1, 0xBFC2F874 */ - uint32_t psx_brA_BFC2F890 = cpu->gpr[16]; uint32_t psx_brB_BFC2F890 = cpu->gpr[17]; - psx_taken_BFC2F890 = (psx_brA_BFC2F890 != psx_brB_BFC2F890); - psx_delay_BFC2F890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F894: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047894u); -#endif - if (psx_delay_BFC2F890) { - psx_delay_BFC2F890 = 0; - if (psx_taken_BFC2F890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047874u); - goto label_BFC2F874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047898u); - } -label_BFC2F898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047898u); -#endif - /* 0xBFC2F898: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047898u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047898u); -#endif - /* 0xBFC2F89C: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004789Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004789Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478A0u); -#endif - /* 0xBFC2F8A0: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478A0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800478A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2F8A4: 03E00008 jr $ra */ - psx_delay_BFC2F8A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F8A8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800478A8u); -#endif - if (psx_delay_BFC2F8A4) { - psx_delay_BFC2F8A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2F8AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2F8ACu); - int psx_delay_BFC2F91C = 0; - int psx_taken_BFC2F91C = 0; - int psx_delay_BFC2F92C = 0; - int psx_taken_BFC2F92C = 0; - int psx_delay_BFC2F934 = 0; - int psx_taken_BFC2F934 = 0; - int psx_delay_BFC2F940 = 0; - int psx_taken_BFC2F940 = 0; - int psx_delay_BFC2F950 = 0; - int psx_taken_BFC2F950 = 0; - int psx_delay_BFC2F958 = 0; - int psx_taken_BFC2F958 = 0; - int psx_delay_BFC2F964 = 0; - int psx_taken_BFC2F964 = 0; - int psx_delay_BFC2F974 = 0; - int psx_taken_BFC2F974 = 0; - int psx_delay_BFC2F97C = 0; - int psx_taken_BFC2F97C = 0; - int psx_delay_BFC2F988 = 0; - int psx_taken_BFC2F988 = 0; - int psx_delay_BFC2F99C = 0; - int psx_taken_BFC2F99C = 0; - int psx_delay_BFC2F9B8 = 0; - int psx_taken_BFC2F9B8 = 0; - int psx_delay_BFC2F9F0 = 0; - int psx_delay_BFC2FA00 = 0; - int psx_delay_BFC2FA08 = 0; - int psx_delay_BFC2FA10 = 0; - int psx_delay_BFC2FA20 = 0; - int psx_taken_BFC2FA20 = 0; - int psx_delay_BFC2FA40 = 0; - int psx_taken_BFC2FA40 = 0; - int psx_delay_BFC2FA70 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2F924u: goto label_BFC2F924; - case 0xBFC2F928u: goto label_BFC2F928; - case 0xBFC2F934u: goto label_BFC2F934; - case 0xBFC2F93Cu: goto label_BFC2F93C; - case 0xBFC2F940u: goto label_BFC2F940; - case 0xBFC2F948u: goto label_BFC2F948; - case 0xBFC2F94Cu: goto label_BFC2F94C; - case 0xBFC2F958u: goto label_BFC2F958; - case 0xBFC2F960u: goto label_BFC2F960; - case 0xBFC2F964u: goto label_BFC2F964; - case 0xBFC2F96Cu: goto label_BFC2F96C; - case 0xBFC2F970u: goto label_BFC2F970; - case 0xBFC2F97Cu: goto label_BFC2F97C; - case 0xBFC2F984u: goto label_BFC2F984; - case 0xBFC2F988u: goto label_BFC2F988; - case 0xBFC2F990u: goto label_BFC2F990; - case 0xBFC2F99Cu: goto label_BFC2F99C; - case 0xBFC2F9A4u: goto label_BFC2F9A4; - case 0xBFC2F9C0u: goto label_BFC2F9C0; - case 0xBFC2F9F0u: goto label_BFC2F9F0; - case 0xBFC2F9F8u: goto label_BFC2F9F8; - case 0xBFC2FA08u: goto label_BFC2FA08; - case 0xBFC2FA10u: goto label_BFC2FA10; - case 0xBFC2FA18u: goto label_BFC2FA18; - case 0xBFC2FA28u: goto label_BFC2FA28; - case 0xBFC2FA48u: goto label_BFC2FA48; - case 0xBFC2FA4Cu: goto label_BFC2FA4C; - case 0xBFC2FA5Cu: goto label_BFC2FA5C; - default: break; - } - } -label_BFC2F8AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F8ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2F8AC: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800478ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2F8B0: AFB4001C sw $s4, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478B0u); return; } g_debug_last_store_pc = 0x800478B0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800478B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2F8B4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800478B4u); -#endif - /* 0xBFC2F8B8: 8C428354 lw $v0, -31916($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428354u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800478B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100010u); -#endif - /* 0xBFC2F8BC: 0004A400 sll $s4, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[20] = cpu->gpr[4] << 16u; - PGXP_ALU(0x0004A400u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800478BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2F8C0: 0014A403 sra $s4, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] >> 16u); - PGXP_ALU(0x0014A403u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800478C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC2F8C4: 0054001A div $v0, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0054001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x800478C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2F8C8: AFB50020 sw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478C8u); return; } g_debug_last_store_pc = 0x800478C8u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800478C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2F8CC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800478CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478D0u); -#endif - /* 0xBFC2F8D0: 8C638358 lw $v1, -31912($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478D0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638358u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800478D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2F8D4: AFB60024 sw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478D4u); return; } g_debug_last_store_pc = 0x800478D4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800478D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2F8D8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800478D8u); -#endif - /* 0xBFC2F8DC: 8CA5835C lw $a1, -31908($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478DCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5835Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800478DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC2F8E0: AFB70028 sw $s7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478E0u); return; } g_debug_last_store_pc = 0x800478E0u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70028u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x800478E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2F8E4: AFB30018 sw $s3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478E4u); return; } g_debug_last_store_pc = 0x800478E4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800478E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2F8E8: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800478E8u); return; } g_debug_last_store_pc = 0x800478E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800478E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC2F8EC: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800478ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800478F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2F8F0: 0000A812 mflo $s5 */ - cpu->gpr[21] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A812u, cpu->gpr[21], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800478F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2F8F4: 0015AC00 sll $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] << 16u; - PGXP_ALU(0x0015AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800478F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2F8F8: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800478F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100008u); -#endif - /* 0xBFC2F8FC: 0074001A div $v1, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0074001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x800478FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2F900: 0000B012 mflo $s6 */ - cpu->gpr[22] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000B012u, cpu->gpr[22], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2F904: 0016B400 sll $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 16u; - PGXP_ALU(0x0016B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2F908: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100020u); -#endif - /* 0xBFC2F90C: 00B4001A div $a1, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[5]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00B4001Au, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x8004790Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2F910: 0000B812 mflo $s7 */ - cpu->gpr[23] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000B812u, cpu->gpr[23], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2F914: 0017BC00 sll $s7, $s7, 16 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = cpu->gpr[23] << 16u; - PGXP_ALU(0x0017BC00u, cpu->gpr[23], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC2F918: 0017BC03 sra $s7, $s7, 16 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] >> 16u); - PGXP_ALU(0x0017BC03u, cpu->gpr[23], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2F91C: 16800002 bne $s4, $zero, 0xBFC2F928 */ - uint32_t psx_brA_BFC2F91C = cpu->gpr[20]; uint32_t psx_brB_BFC2F91C = cpu->gpr[0]; - psx_taken_BFC2F91C = (psx_brA_BFC2F91C != psx_brB_BFC2F91C); - psx_delay_BFC2F91C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047920u); -#endif - if (psx_delay_BFC2F91C) { - psx_delay_BFC2F91C = 0; - if (psx_taken_BFC2F91C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047928u); - goto label_BFC2F928; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047924u); - } -label_BFC2F924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F924: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80047924u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047924u); -#endif -label_BFC2F928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F928: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2F92C: 16810004 bne $s4, $at, 0xBFC2F940 */ - uint32_t psx_brA_BFC2F92C = cpu->gpr[20]; uint32_t psx_brB_BFC2F92C = cpu->gpr[1]; - psx_taken_BFC2F92C = (psx_brA_BFC2F92C != psx_brB_BFC2F92C); - psx_delay_BFC2F92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F930: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047930u); -#endif - if (psx_delay_BFC2F92C) { - psx_delay_BFC2F92C = 0; - if (psx_taken_BFC2F92C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047940u); - goto label_BFC2F940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047934u); - } -label_BFC2F934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC2F934: 14410002 bne $v0, $at, 0xBFC2F940 */ - uint32_t psx_brA_BFC2F934 = cpu->gpr[2]; uint32_t psx_brB_BFC2F934 = cpu->gpr[1]; - psx_taken_BFC2F934 = (psx_brA_BFC2F934 != psx_brB_BFC2F934); - psx_delay_BFC2F934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F938: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047938u); -#endif - if (psx_delay_BFC2F934) { - psx_delay_BFC2F934 = 0; - if (psx_taken_BFC2F934) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047940u); - goto label_BFC2F940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004793Cu); - } -label_BFC2F93C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F93Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004793Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F93C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004793Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004793Cu); -#endif -label_BFC2F940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2F940: 16800002 bne $s4, $zero, 0xBFC2F94C */ - uint32_t psx_brA_BFC2F940 = cpu->gpr[20]; uint32_t psx_brB_BFC2F940 = cpu->gpr[0]; - psx_taken_BFC2F940 = (psx_brA_BFC2F940 != psx_brB_BFC2F940); - psx_delay_BFC2F940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F944: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047944u); -#endif - if (psx_delay_BFC2F940) { - psx_delay_BFC2F940 = 0; - if (psx_taken_BFC2F940) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004794Cu); - goto label_BFC2F94C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047948u); - } -label_BFC2F948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F948: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80047948u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047948u); -#endif -label_BFC2F94C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F94Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F94C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2F950: 16810004 bne $s4, $at, 0xBFC2F964 */ - uint32_t psx_brA_BFC2F950 = cpu->gpr[20]; uint32_t psx_brB_BFC2F950 = cpu->gpr[1]; - psx_taken_BFC2F950 = (psx_brA_BFC2F950 != psx_brB_BFC2F950); - psx_delay_BFC2F950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F954: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047954u); -#endif - if (psx_delay_BFC2F950) { - psx_delay_BFC2F950 = 0; - if (psx_taken_BFC2F950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047964u); - goto label_BFC2F964; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047958u); - } -label_BFC2F958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC2F958: 14610002 bne $v1, $at, 0xBFC2F964 */ - uint32_t psx_brA_BFC2F958 = cpu->gpr[3]; uint32_t psx_brB_BFC2F958 = cpu->gpr[1]; - psx_taken_BFC2F958 = (psx_brA_BFC2F958 != psx_brB_BFC2F958); - psx_delay_BFC2F958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F95C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004795Cu); -#endif - if (psx_delay_BFC2F958) { - psx_delay_BFC2F958 = 0; - if (psx_taken_BFC2F958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047964u); - goto label_BFC2F964; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047960u); - } -label_BFC2F960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F960: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80047960u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047960u); -#endif -label_BFC2F964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC2F964: 16800002 bne $s4, $zero, 0xBFC2F970 */ - uint32_t psx_brA_BFC2F964 = cpu->gpr[20]; uint32_t psx_brB_BFC2F964 = cpu->gpr[0]; - psx_taken_BFC2F964 = (psx_brA_BFC2F964 != psx_brB_BFC2F964); - psx_delay_BFC2F964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F968: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047968u); -#endif - if (psx_delay_BFC2F964) { - psx_delay_BFC2F964 = 0; - if (psx_taken_BFC2F964) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047970u); - goto label_BFC2F970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004796Cu); - } -label_BFC2F96C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F96Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004796Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F96C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004796Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004796Cu); -#endif -label_BFC2F970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2F970: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC2F974: 16810004 bne $s4, $at, 0xBFC2F988 */ - uint32_t psx_brA_BFC2F974 = cpu->gpr[20]; uint32_t psx_brB_BFC2F974 = cpu->gpr[1]; - psx_taken_BFC2F974 = (psx_brA_BFC2F974 != psx_brB_BFC2F974); - psx_delay_BFC2F974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2F978: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047978u); -#endif - if (psx_delay_BFC2F974) { - psx_delay_BFC2F974 = 0; - if (psx_taken_BFC2F974) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047988u); - goto label_BFC2F988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004797Cu); - } -label_BFC2F97C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F97Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004797Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2F97C: 14A10002 bne $a1, $at, 0xBFC2F988 */ - uint32_t psx_brA_BFC2F97C = cpu->gpr[5]; uint32_t psx_brB_BFC2F97C = cpu->gpr[1]; - psx_taken_BFC2F97C = (psx_brA_BFC2F97C != psx_brB_BFC2F97C); - psx_delay_BFC2F97C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F980: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047980u); -#endif - if (psx_delay_BFC2F97C) { - psx_delay_BFC2F97C = 0; - if (psx_taken_BFC2F97C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047988u); - goto label_BFC2F988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047984u); - } -label_BFC2F984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2F984: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80047984u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047984u); -#endif -label_BFC2F988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2F988: 06800034 bltz $s4, 0xBFC2FA5C */ - uint32_t psx_brA_BFC2F988 = cpu->gpr[20]; - psx_taken_BFC2F988 = ((int32_t)psx_brA_BFC2F988 < 0); - psx_delay_BFC2F988 = 1; - /* 0xBFC2F98C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004798Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004798Cu); -#endif - if (psx_delay_BFC2F988) { - psx_delay_BFC2F988 = 0; - if (psx_taken_BFC2F988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047A5Cu); - goto label_BFC2FA5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047990u); - } -label_BFC2F990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2F990: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047990u); return; } g_debug_last_store_pc = 0x80047990u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2F994: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047994u); return; } g_debug_last_store_pc = 0x80047994u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2F998: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047998u); return; } g_debug_last_store_pc = 0x80047998u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80047998u); -#endif -label_BFC2F99C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F99Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004799Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC2F99C: 16740008 bne $s3, $s4, 0xBFC2F9C0 */ - uint32_t psx_brA_BFC2F99C = cpu->gpr[19]; uint32_t psx_brB_BFC2F99C = cpu->gpr[20]; - psx_taken_BFC2F99C = (psx_brA_BFC2F99C != psx_brB_BFC2F99C); - psx_delay_BFC2F99C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F9A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800479A0u); -#endif - if (psx_delay_BFC2F99C) { - psx_delay_BFC2F99C = 0; - if (psx_taken_BFC2F99C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800479C0u); - goto label_BFC2F9C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800479A4u); - } -label_BFC2F9A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F9A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC2F9A4: 00028400 sll $s0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00028400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008u); -#endif - /* 0xBFC2F9A8: 00038C00 sll $s1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[17] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00038C00u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40020u); -#endif - /* 0xBFC2F9AC: 00059400 sll $s2, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[18] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00059400u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2F9B0: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2F9B4: 00118C03 sra $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 16u); - PGXP_ALU(0x00118C03u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F9B8: 1000000D beq $zero, $zero, 0xBFC2F9F0 */ - uint32_t psx_brA_BFC2F9B8 = cpu->gpr[0]; uint32_t psx_brB_BFC2F9B8 = cpu->gpr[0]; - psx_taken_BFC2F9B8 = (psx_brA_BFC2F9B8 == psx_brB_BFC2F9B8); - psx_delay_BFC2F9B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2F9BC: 00129403 sra $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 16u); - PGXP_ALU(0x00129403u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479BCu); -#endif - if (psx_delay_BFC2F9B8) { - psx_delay_BFC2F9B8 = 0; - if (psx_taken_BFC2F9B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800479F0u); - goto label_BFC2F9F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800479C0u); - } -label_BFC2F9C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F9C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280000u); -#endif - /* 0xBFC2F9C0: 02B30019 multu $s5, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[21] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[21])); -#endif - PGXP_MULDIV(0x02B30019u, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x800479C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2F9C4: 00008012 mflo $s0 */ - cpu->gpr[16] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008012u, cpu->gpr[16], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800479C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2F9C8: 00108400 sll $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00108400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2F9CC: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC2F9D0: 02D30019 multu $s6, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[22] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[22])); -#endif - PGXP_MULDIV(0x02D30019u, cpu->hi, cpu->lo, cpu->gpr[22], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x800479D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2F9D4: 00008812 mflo $s1 */ - cpu->gpr[17] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008812u, cpu->gpr[17], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800479D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2F9D8: 00118C00 sll $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 16u; - PGXP_ALU(0x00118C00u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2F9DC: 00118C03 sra $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 16u); - PGXP_ALU(0x00118C03u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880000u); -#endif - /* 0xBFC2F9E0: 02F30019 multu $s7, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[23] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[23])); -#endif - PGXP_MULDIV(0x02F30019u, cpu->hi, cpu->lo, cpu->gpr[23], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x800479E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2F9E4: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800479E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2F9E8: 00129400 sll $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] << 16u; - PGXP_ALU(0x00129400u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2F9EC: 00129403 sra $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 16u); - PGXP_ALU(0x00129403u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800479ECu); -#endif -label_BFC2F9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2F9F0: 0C011DA8 jal 0xB00476A0 */ - cpu->gpr[31] = 0x800479F8u; /* jal link before delay slot */ - psx_delay_BFC2F9F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2F9F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800479F4u); -#endif - if (psx_delay_BFC2F9F0) { - psx_delay_BFC2F9F0 = 0; - cpu->gpr[31] = 0x800479F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476A0u); - cpu->pc = 0x800476A0u; return; - } -label_BFC2F9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2F9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2F9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800479F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2F9F8: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800479F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2F9FC: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800479FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FA00: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x80047A08u; /* jal link before delay slot */ - psx_delay_BFC2FA00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC2FA04: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047A04u); -#endif - if (psx_delay_BFC2FA00) { - psx_delay_BFC2FA00 = 0; - cpu->gpr[31] = 0x80047A08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC2FA08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FA08: 0C011DE7 jal 0xB004779C */ - cpu->gpr[31] = 0x80047A10u; /* jal link before delay slot */ - psx_delay_BFC2FA08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FA0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047A0Cu); -#endif - if (psx_delay_BFC2FA08) { - psx_delay_BFC2FA08 = 0; - cpu->gpr[31] = 0x80047A10u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004779Cu); - cpu->pc = 0x8004779Cu; return; - } -label_BFC2FA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FA10: 0C011DC6 jal 0xB0047718 */ - cpu->gpr[31] = 0x80047A18u; /* jal link before delay slot */ - psx_delay_BFC2FA10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FA14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047A14u); -#endif - if (psx_delay_BFC2FA10) { - psx_delay_BFC2FA10 = 0; - cpu->gpr[31] = 0x80047A18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047718u); - cpu->pc = 0x80047718u; return; - } -label_BFC2FA18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2FA18: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180002u); -#endif - /* 0xBFC2FA1C: 0293082A slt $at, $s4, $s3 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (int32_t)cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0293082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FA20: 1420000A bne $at, $zero, 0xBFC2FA4C */ - uint32_t psx_brA_BFC2FA20 = cpu->gpr[1]; uint32_t psx_brB_BFC2FA20 = cpu->gpr[0]; - psx_taken_BFC2FA20 = (psx_brA_BFC2FA20 != psx_brB_BFC2FA20); - psx_delay_BFC2FA20 = 1; - /* 0xBFC2FA24: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A24u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A24u); -#endif - if (psx_delay_BFC2FA20) { - psx_delay_BFC2FA20 = 0; - if (psx_taken_BFC2FA20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047A4Cu); - goto label_BFC2FA4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047A28u); - } -label_BFC2FA28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2FA28: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC2FA2C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2FA30: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047A30u); -#endif - /* 0xBFC2FA34: 8C428354 lw $v0, -31916($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C428354u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A34u); -#endif - /* 0xBFC2FA38: 8C638358 lw $v1, -31912($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -31912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A38u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C638358u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A38u); -#endif - /* 0xBFC2FA3C: 8CA5835C lw $a1, -31908($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -31908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-31908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A3Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5835Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FA40: 1000FFD6 beq $zero, $zero, 0xBFC2F99C */ - uint32_t psx_brA_BFC2FA40 = cpu->gpr[0]; uint32_t psx_brB_BFC2FA40 = cpu->gpr[0]; - psx_taken_BFC2FA40 = (psx_brA_BFC2FA40 == psx_brB_BFC2FA40); - psx_delay_BFC2FA40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FA44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047A44u); -#endif - if (psx_delay_BFC2FA40) { - psx_delay_BFC2FA40 = 0; - if (psx_taken_BFC2FA40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004799Cu); - goto label_BFC2F99C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047A48u); - } -label_BFC2FA48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A48u); -#endif - /* 0xBFC2FA48: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A48u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A48u); -#endif -label_BFC2FA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A4Cu); -#endif - /* 0xBFC2FA4C: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A4Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A50u); -#endif - /* 0xBFC2FA50: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A50u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FA54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047A54u); -#endif - /* 0xBFC2FA58: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A58u); -#endif -label_BFC2FA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A5Cu); -#endif - /* 0xBFC2FA5C: 8FB30018 lw $s3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A5Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30018u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A60u); -#endif - /* 0xBFC2FA60: 8FB4001C lw $s4, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A60u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4001Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A60u); -#endif - /* 0xBFC2FA64: 8FB50020 lw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A64u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A64u); -#endif - /* 0xBFC2FA68: 8FB60024 lw $s6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A68u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60024u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A68u); -#endif - /* 0xBFC2FA6C: 8FB70028 lw $s7, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A6Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70028u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FA70: 03E00008 jr $ra */ - psx_delay_BFC2FA70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FA74: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80047A74u); -#endif - if (psx_delay_BFC2FA70) { - psx_delay_BFC2FA70 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2FA78(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2FA78u); - int psx_delay_BFC2FAE4 = 0; - int psx_taken_BFC2FAE4 = 0; - int psx_delay_BFC2FAF4 = 0; - int psx_taken_BFC2FAF4 = 0; - int psx_delay_BFC2FAFC = 0; - int psx_taken_BFC2FAFC = 0; - int psx_delay_BFC2FB08 = 0; - int psx_taken_BFC2FB08 = 0; - int psx_delay_BFC2FB18 = 0; - int psx_taken_BFC2FB18 = 0; - int psx_delay_BFC2FB20 = 0; - int psx_taken_BFC2FB20 = 0; - int psx_delay_BFC2FB2C = 0; - int psx_taken_BFC2FB2C = 0; - int psx_delay_BFC2FB3C = 0; - int psx_taken_BFC2FB3C = 0; - int psx_delay_BFC2FB44 = 0; - int psx_taken_BFC2FB44 = 0; - int psx_delay_BFC2FB50 = 0; - int psx_taken_BFC2FB50 = 0; - int psx_delay_BFC2FB94 = 0; - int psx_delay_BFC2FBB0 = 0; - int psx_delay_BFC2FBB8 = 0; - int psx_delay_BFC2FBC0 = 0; - int psx_delay_BFC2FBD4 = 0; - int psx_taken_BFC2FBD4 = 0; - int psx_delay_BFC2FBEC = 0; - int psx_delay_BFC2FC08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2FAECu: goto label_BFC2FAEC; - case 0xBFC2FAF0u: goto label_BFC2FAF0; - case 0xBFC2FAFCu: goto label_BFC2FAFC; - case 0xBFC2FB04u: goto label_BFC2FB04; - case 0xBFC2FB08u: goto label_BFC2FB08; - case 0xBFC2FB10u: goto label_BFC2FB10; - case 0xBFC2FB14u: goto label_BFC2FB14; - case 0xBFC2FB20u: goto label_BFC2FB20; - case 0xBFC2FB28u: goto label_BFC2FB28; - case 0xBFC2FB2Cu: goto label_BFC2FB2C; - case 0xBFC2FB34u: goto label_BFC2FB34; - case 0xBFC2FB38u: goto label_BFC2FB38; - case 0xBFC2FB44u: goto label_BFC2FB44; - case 0xBFC2FB4Cu: goto label_BFC2FB4C; - case 0xBFC2FB50u: goto label_BFC2FB50; - case 0xBFC2FB58u: goto label_BFC2FB58; - case 0xBFC2FB94u: goto label_BFC2FB94; - case 0xBFC2FB9Cu: goto label_BFC2FB9C; - case 0xBFC2FBB8u: goto label_BFC2FBB8; - case 0xBFC2FBC0u: goto label_BFC2FBC0; - case 0xBFC2FBC8u: goto label_BFC2FBC8; - case 0xBFC2FBDCu: goto label_BFC2FBDC; - case 0xBFC2FBECu: goto label_BFC2FBEC; - case 0xBFC2FBF4u: goto label_BFC2FBF4; - default: break; - } - } -label_BFC2FA78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FA78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC2FA78: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047A78u); -#endif - /* 0xBFC2FA7C: 8DCE8354 lw $t6, -31916($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -31916; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-31916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A7Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8354u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FA80: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FA84: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC2FA88: 01C4001A div $t6, $a0 */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[4]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C4001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x80047A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FA8C: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80047A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC2FA90: AFB40018 sw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A90u); return; } g_debug_last_store_pc = 0x80047A90u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC2FA94: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047A94u); -#endif - /* 0xBFC2FA98: 8DEF8358 lw $t7, -31912($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -31912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-31912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A98u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF8358u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC2FA9C: AFB5001C sw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047A9Cu); return; } g_debug_last_store_pc = 0x80047A9Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80047A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC2FAA0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047AA0u); -#endif - /* 0xBFC2FAA4: 8F18835C lw $t8, -31908($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -31908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-31908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047AA4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18835Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC2FAA8: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047AA8u); return; } g_debug_last_store_pc = 0x80047AA8u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80047AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC2FAAC: AFB30014 sw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047AACu); return; } g_debug_last_store_pc = 0x80047AACu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80047AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2FAB0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047AB0u); return; } g_debug_last_store_pc = 0x80047AB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC2FAB4: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2FAB8: 0000A012 mflo $s4 */ - cpu->gpr[20] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A012u, cpu->gpr[20], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2FABC: 0014A400 sll $s4, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] << 16u; - PGXP_ALU(0x0014A400u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC2FAC0: 0014A403 sra $s4, $s4, 16 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] >> 16u); - PGXP_ALU(0x0014A403u, cpu->gpr[20], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC2FAC4: 01E4001A div $t7, $a0 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[4]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E4001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x80047AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2FAC8: 0000A812 mflo $s5 */ - cpu->gpr[21] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000A812u, cpu->gpr[21], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2FACC: 0015AC00 sll $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] << 16u; - PGXP_ALU(0x0015AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC2FAD0: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC2FAD4: 0304001A div $t8, $a0 */ - { int32_t psx_n = (int32_t)cpu->gpr[24]; int32_t psx_d = (int32_t)cpu->gpr[4]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0304001Au, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x80047AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2FAD8: 0000B012 mflo $s6 */ - cpu->gpr[22] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000B012u, cpu->gpr[22], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2FADC: 0016B400 sll $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 16u; - PGXP_ALU(0x0016B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC2FAE0: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2FAE4: 14800002 bne $a0, $zero, 0xBFC2FAF0 */ - uint32_t psx_brA_BFC2FAE4 = cpu->gpr[4]; uint32_t psx_brB_BFC2FAE4 = cpu->gpr[0]; - psx_taken_BFC2FAE4 = (psx_brA_BFC2FAE4 != psx_brB_BFC2FAE4); - psx_delay_BFC2FAE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FAE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047AE8u); -#endif - if (psx_delay_BFC2FAE4) { - psx_delay_BFC2FAE4 = 0; - if (psx_taken_BFC2FAE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047AF0u); - goto label_BFC2FAF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047AECu); - } -label_BFC2FAEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FAECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FAEC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80047AECu); return; -#ifdef PSX_COSIM - cosim_instr(0x80047AECu); -#endif -label_BFC2FAF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FAF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FAF0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2FAF4: 14810004 bne $a0, $at, 0xBFC2FB08 */ - uint32_t psx_brA_BFC2FAF4 = cpu->gpr[4]; uint32_t psx_brB_BFC2FAF4 = cpu->gpr[1]; - psx_taken_BFC2FAF4 = (psx_brA_BFC2FAF4 != psx_brB_BFC2FAF4); - psx_delay_BFC2FAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FAF8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047AF8u); -#endif - if (psx_delay_BFC2FAF4) { - psx_delay_BFC2FAF4 = 0; - if (psx_taken_BFC2FAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B08u); - goto label_BFC2FB08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047AFCu); - } -label_BFC2FAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC2FAFC: 15C10002 bne $t6, $at, 0xBFC2FB08 */ - uint32_t psx_brA_BFC2FAFC = cpu->gpr[14]; uint32_t psx_brB_BFC2FAFC = cpu->gpr[1]; - psx_taken_BFC2FAFC = (psx_brA_BFC2FAFC != psx_brB_BFC2FAFC); - psx_delay_BFC2FAFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B00u); -#endif - if (psx_delay_BFC2FAFC) { - psx_delay_BFC2FAFC = 0; - if (psx_taken_BFC2FAFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B08u); - goto label_BFC2FB08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B04u); - } -label_BFC2FB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FB04: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80047B04u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047B04u); -#endif -label_BFC2FB08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2FB08: 14800002 bne $a0, $zero, 0xBFC2FB14 */ - uint32_t psx_brA_BFC2FB08 = cpu->gpr[4]; uint32_t psx_brB_BFC2FB08 = cpu->gpr[0]; - psx_taken_BFC2FB08 = (psx_brA_BFC2FB08 != psx_brB_BFC2FB08); - psx_delay_BFC2FB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B0Cu); -#endif - if (psx_delay_BFC2FB08) { - psx_delay_BFC2FB08 = 0; - if (psx_taken_BFC2FB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B14u); - goto label_BFC2FB14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B10u); - } -label_BFC2FB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FB10: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80047B10u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047B10u); -#endif -label_BFC2FB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FB14: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2FB18: 14810004 bne $a0, $at, 0xBFC2FB2C */ - uint32_t psx_brA_BFC2FB18 = cpu->gpr[4]; uint32_t psx_brB_BFC2FB18 = cpu->gpr[1]; - psx_taken_BFC2FB18 = (psx_brA_BFC2FB18 != psx_brB_BFC2FB18); - psx_delay_BFC2FB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FB1C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047B1Cu); -#endif - if (psx_delay_BFC2FB18) { - psx_delay_BFC2FB18 = 0; - if (psx_taken_BFC2FB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B2Cu); - goto label_BFC2FB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B20u); - } -label_BFC2FB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC2FB20: 15E10002 bne $t7, $at, 0xBFC2FB2C */ - uint32_t psx_brA_BFC2FB20 = cpu->gpr[15]; uint32_t psx_brB_BFC2FB20 = cpu->gpr[1]; - psx_taken_BFC2FB20 = (psx_brA_BFC2FB20 != psx_brB_BFC2FB20); - psx_delay_BFC2FB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B24u); -#endif - if (psx_delay_BFC2FB20) { - psx_delay_BFC2FB20 = 0; - if (psx_taken_BFC2FB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B2Cu); - goto label_BFC2FB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B28u); - } -label_BFC2FB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FB28: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80047B28u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047B28u); -#endif -label_BFC2FB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2FB2C: 14800002 bne $a0, $zero, 0xBFC2FB38 */ - uint32_t psx_brA_BFC2FB2C = cpu->gpr[4]; uint32_t psx_brB_BFC2FB2C = cpu->gpr[0]; - psx_taken_BFC2FB2C = (psx_brA_BFC2FB2C != psx_brB_BFC2FB2C); - psx_delay_BFC2FB2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B30u); -#endif - if (psx_delay_BFC2FB2C) { - psx_delay_BFC2FB2C = 0; - if (psx_taken_BFC2FB2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B38u); - goto label_BFC2FB38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B34u); - } -label_BFC2FB34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FB34: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80047B34u); return; -#ifdef PSX_COSIM - cosim_instr(0x80047B34u); -#endif -label_BFC2FB38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FB38: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2FB3C: 14810004 bne $a0, $at, 0xBFC2FB50 */ - uint32_t psx_brA_BFC2FB3C = cpu->gpr[4]; uint32_t psx_brB_BFC2FB3C = cpu->gpr[1]; - psx_taken_BFC2FB3C = (psx_brA_BFC2FB3C != psx_brB_BFC2FB3C); - psx_delay_BFC2FB3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FB40: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047B40u); -#endif - if (psx_delay_BFC2FB3C) { - psx_delay_BFC2FB3C = 0; - if (psx_taken_BFC2FB3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B50u); - goto label_BFC2FB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B44u); - } -label_BFC2FB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC2FB44: 17010002 bne $t8, $at, 0xBFC2FB50 */ - uint32_t psx_brA_BFC2FB44 = cpu->gpr[24]; uint32_t psx_brB_BFC2FB44 = cpu->gpr[1]; - psx_taken_BFC2FB44 = (psx_brA_BFC2FB44 != psx_brB_BFC2FB44); - psx_delay_BFC2FB44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B48u); -#endif - if (psx_delay_BFC2FB44) { - psx_delay_BFC2FB44 = 0; - if (psx_taken_BFC2FB44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B50u); - goto label_BFC2FB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B4Cu); - } -label_BFC2FB4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC2FB4C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80047B4Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x80047B4Cu); -#endif -label_BFC2FB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FB50: 18800026 blez $a0, 0xBFC2FBEC */ - uint32_t psx_brA_BFC2FB50 = cpu->gpr[4]; - psx_taken_BFC2FB50 = ((int32_t)psx_brA_BFC2FB50 <= 0); - psx_delay_BFC2FB50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B54u); -#endif - if (psx_delay_BFC2FB50) { - psx_delay_BFC2FB50 = 0; - if (psx_taken_BFC2FB50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047BECu); - goto label_BFC2FBEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B58u); - } -label_BFC2FB58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC2FB58: 02930019 multu $s4, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[20] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[20])); -#endif - PGXP_MULDIV(0x02930019u, cpu->hi, cpu->lo, cpu->gpr[20], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x80047B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2FB5C: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047B5Cu); return; } g_debug_last_store_pc = 0x80047B5Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2FB60: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047B60u); return; } g_debug_last_store_pc = 0x80047B60u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC2FB64: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047B64u); return; } g_debug_last_store_pc = 0x80047B64u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80047B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC2FB68: 00008012 mflo $s0 */ - cpu->gpr[16] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008012u, cpu->gpr[16], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280000u); -#endif - /* 0xBFC2FB74: 02B30019 multu $s5, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[21] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[21])); -#endif - PGXP_MULDIV(0x02B30019u, cpu->hi, cpu->lo, cpu->gpr[21], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x80047B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC2FB78: 00008812 mflo $s1 */ - cpu->gpr[17] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008812u, cpu->gpr[17], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC2FB84: 02D30019 multu $s6, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[22] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[22])); -#endif - PGXP_MULDIV(0x02D30019u, cpu->hi, cpu->lo, cpu->gpr[22], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x80047B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC2FB88: 00009012 mflo $s2 */ - cpu->gpr[18] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00009012u, cpu->gpr[18], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B90u); -#endif -label_BFC2FB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FB94: 0C011DA8 jal 0xB00476A0 */ - cpu->gpr[31] = 0x80047B9Cu; /* jal link before delay slot */ - psx_delay_BFC2FB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FB98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047B98u); -#endif - if (psx_delay_BFC2FB94) { - psx_delay_BFC2FB94 = 0; - cpu->gpr[31] = 0x80047B9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800476A0u); - cpu->pc = 0x800476A0u; return; - } -label_BFC2FB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC2FB9C: 00102400 sll $a0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00102400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020u); -#endif - /* 0xBFC2FBA0: 00112C00 sll $a1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[5] = cpu->gpr[17] << 16u; - PGXP_ALU(0x00112C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40040u); -#endif - /* 0xBFC2FBA4: 00123400 sll $a2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[6] = cpu->gpr[18] << 16u; - PGXP_ALU(0x00123400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FBA8: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2FBAC: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FBB0: 0C011F04 jal 0xB0047C10 */ - cpu->gpr[31] = 0x80047BB8u; /* jal link before delay slot */ - psx_delay_BFC2FBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FBB4: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047BB4u); -#endif - if (psx_delay_BFC2FBB0) { - psx_delay_BFC2FBB0 = 0; - cpu->gpr[31] = 0x80047BB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047C10u); - cpu->pc = 0x80047C10u; return; - } -label_BFC2FBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FBB8: 0C011DE7 jal 0xB004779C */ - cpu->gpr[31] = 0x80047BC0u; /* jal link before delay slot */ - psx_delay_BFC2FBB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FBBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047BBCu); -#endif - if (psx_delay_BFC2FBB8) { - psx_delay_BFC2FBB8 = 0; - cpu->gpr[31] = 0x80047BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004779Cu); - cpu->pc = 0x8004779Cu; return; - } -label_BFC2FBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FBC0: 0C011DC6 jal 0xB0047718 */ - cpu->gpr[31] = 0x80047BC8u; /* jal link before delay slot */ - psx_delay_BFC2FBC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FBC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047BC4u); -#endif - if (psx_delay_BFC2FBC0) { - psx_delay_BFC2FBC0 = 0; - cpu->gpr[31] = 0x80047BC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047718u); - cpu->pc = 0x80047718u; return; - } -label_BFC2FBC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2FBC8: 2673FFFF addiu $s3, $s3, -1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-1)); - PGXP_ALU(0x2673FFFFu, cpu->gpr[19], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC2FBCC: 02148023 subu $s0, $s0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[20]; - PGXP_ALU(0x02148023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220000u); -#endif - /* 0xBFC2FBD0: 02358823 subu $s1, $s1, $s5 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[17] = cpu->gpr[17] - cpu->gpr[21]; - PGXP_ALU(0x02358823u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC2FBD4: 1E60FFEF bgtz $s3, 0xBFC2FB94 */ - uint32_t psx_brA_BFC2FBD4 = cpu->gpr[19]; - psx_taken_BFC2FBD4 = ((int32_t)psx_brA_BFC2FBD4 > 0); - psx_delay_BFC2FBD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440000u); -#endif - /* 0xBFC2FBD8: 02569023 subu $s2, $s2, $s6 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[22]; - PGXP_ALU(0x02569023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047BD8u); -#endif - if (psx_delay_BFC2FBD4) { - psx_delay_BFC2FBD4 = 0; - if (psx_taken_BFC2FBD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047B94u); - goto label_BFC2FB94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047BDCu); - } -label_BFC2FBDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BDCu); -#endif - /* 0xBFC2FBDC: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BDCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BE0u); -#endif - /* 0xBFC2FBE0: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BE0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BE0u); -#endif - /* 0xBFC2FBE4: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BE4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FBE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047BE8u); -#endif -label_BFC2FBEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FBEC: 0C011E17 jal 0xB004785C */ - cpu->gpr[31] = 0x80047BF4u; /* jal link before delay slot */ - psx_delay_BFC2FBEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FBF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047BF0u); -#endif - if (psx_delay_BFC2FBEC) { - psx_delay_BFC2FBEC = 0; - cpu->gpr[31] = 0x80047BF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004785Cu); - cpu->pc = 0x8004785Cu; return; - } -label_BFC2FBF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FBF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047BF4u); -#endif - /* 0xBFC2FBF4: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BF4u); -#endif - /* 0xBFC2FBF8: 8FB30014 lw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BF8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BF8u); -#endif - /* 0xBFC2FBFC: 8FB40018 lw $s4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047BFCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40018u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80047BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047C00u); -#endif - /* 0xBFC2FC00: 8FB5001C lw $s5, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047C00u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5001Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80047C00u); -#endif - /* 0xBFC2FC04: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047C04u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80047C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FC08: 03E00008 jr $ra */ - psx_delay_BFC2FC08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FC0C: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C0Cu); -#endif - if (psx_delay_BFC2FC08) { - psx_delay_BFC2FC08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2FC10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2FC10u); - int psx_delay_BFC2FC3C = 0; -label_BFC2FC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FC10: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FC14: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FC18: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2FC1C: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC2FC20: AC248354 sw $a0, -31916($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047C20u); return; } g_debug_last_store_pc = 0x80047C20u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC248354u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80047C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2FC24: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FC28: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FC2C: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC2FC30: AC258358 sw $a1, -31912($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047C30u); return; } g_debug_last_store_pc = 0x80047C30u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC258358u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FC34: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC2FC38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FC3C: 03E00008 jr $ra */ - psx_delay_BFC2FC3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC2FC40: AC26835C sw $a2, -31908($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31908; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047C40u); return; } g_debug_last_store_pc = 0x80047C40u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26835Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80047C40u); -#endif - if (psx_delay_BFC2FC3C) { - psx_delay_BFC2FC3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2FCC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2FCC4u); - int psx_delay_BFC2FCD4 = 0; - int psx_taken_BFC2FCD4 = 0; - int psx_delay_BFC2FD1C = 0; - int psx_delay_BFC2FD5C = 0; - int psx_delay_BFC2FD64 = 0; - int psx_taken_BFC2FD64 = 0; - int psx_delay_BFC2FDAC = 0; - int psx_delay_BFC2FDEC = 0; - int psx_delay_BFC2FDF4 = 0; - int psx_taken_BFC2FDF4 = 0; - int psx_delay_BFC2FE30 = 0; - int psx_delay_BFC2FE38 = 0; - int psx_taken_BFC2FE38 = 0; - int psx_delay_BFC2FE40 = 0; - int psx_taken_BFC2FE40 = 0; - int psx_delay_BFC2FE4C = 0; - int psx_taken_BFC2FE4C = 0; - int psx_delay_BFC2FE54 = 0; - int psx_taken_BFC2FE54 = 0; - int psx_delay_BFC2FE64 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2FCDCu: goto label_BFC2FCDC; - case 0xBFC2FD24u: goto label_BFC2FD24; - case 0xBFC2FD64u: goto label_BFC2FD64; - case 0xBFC2FD6Cu: goto label_BFC2FD6C; - case 0xBFC2FDB4u: goto label_BFC2FDB4; - case 0xBFC2FDF4u: goto label_BFC2FDF4; - case 0xBFC2FDFCu: goto label_BFC2FDFC; - case 0xBFC2FE38u: goto label_BFC2FE38; - case 0xBFC2FE40u: goto label_BFC2FE40; - case 0xBFC2FE48u: goto label_BFC2FE48; - case 0xBFC2FE54u: goto label_BFC2FE54; - case 0xBFC2FE5Cu: goto label_BFC2FE5C; - case 0xBFC2FE60u: goto label_BFC2FE60; - default: break; - } - } -label_BFC2FCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FCC4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80047CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2FCC8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047CC8u); return; } g_debug_last_store_pc = 0x80047CC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC2FCCC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC2FCD0: 00A04021 addu $t0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FCD4: 1000005A beq $zero, $zero, 0xBFC2FE40 */ - uint32_t psx_brA_BFC2FCD4 = cpu->gpr[0]; uint32_t psx_brB_BFC2FCD4 = cpu->gpr[0]; - psx_taken_BFC2FCD4 = (psx_brA_BFC2FCD4 == psx_brB_BFC2FCD4); - psx_delay_BFC2FCD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC2FCD8: 00C04821 addu $t1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047CD8u); -#endif - if (psx_delay_BFC2FCD4) { - psx_delay_BFC2FCD4 = 0; - if (psx_taken_BFC2FCD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E40u); - goto label_BFC2FE40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047CDCu); - } -label_BFC2FCDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FCDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FCDC: A460000C sh $zero, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047CDCu); return; } g_debug_last_store_pc = 0x80047CDCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FCE0: A460000E sh $zero, 14($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047CE0u); return; } g_debug_last_store_pc = 0x80047CE0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2FCE4: 240A0010 addiu $t2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80047CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2FCE8: AC6A0000 sw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047CE8u); return; } g_debug_last_store_pc = 0x80047CE8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2FCEC: A46A0010 sh $t2, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047CECu); return; } g_debug_last_store_pc = 0x80047CECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2FCF0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2FCF4: A4620012 sh $v0, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047CF4u); return; } g_debug_last_store_pc = 0x80047CF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4620012u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC2FCF8: 34EE0008 ori $t6, $a3, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] | 0x8u; - PGXP_ALU(0x34EE0008u, cpu->gpr[14], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80047CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC2FCFC: 240F002C addiu $t7, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x240F002Cu, cpu->gpr[15], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2FD00: AC6E0004 sw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D00u); return; } g_debug_last_store_pc = 0x80047D00u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC2FD04: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D04u); return; } g_debug_last_store_pc = 0x80047D04u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D04u); -#endif - /* 0xBFC2FD08: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D08u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC2FD0C: AFA90028 sw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D0Cu); return; } g_debug_last_store_pc = 0x80047D0Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC2FD10: AFA80024 sw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D10u); return; } g_debug_last_store_pc = 0x80047D10u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2FD14: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D14u); return; } g_debug_last_store_pc = 0x80047D14u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2FD18: 24640014 addiu $a0, $v1, 20 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (20)); - PGXP_ALU(0x24640014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FD1C: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x80047D24u; /* jal link before delay slot */ - psx_delay_BFC2FD1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2FD20: 24060020 addiu $a2, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24060020u, cpu->gpr[6], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D20u); -#endif - if (psx_delay_BFC2FD1C) { - psx_delay_BFC2FD1C = 0; - cpu->gpr[31] = 0x80047D24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC2FD24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FD24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D24u); -#endif - /* 0xBFC2FD24: 8FA80024 lw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D24u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D24u); -#endif - /* 0xBFC2FD28: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D28u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D28u); -#endif - /* 0xBFC2FD2C: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D2Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2FD30: 01090019 multu $t0, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01090019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x80047D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FD34: A4600038 sh $zero, 56($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D34u); return; } g_debug_last_store_pc = 0x80047D34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600038u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FD38: A460003A sh $zero, 58($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D38u); return; } g_debug_last_store_pc = 0x80047D38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460003Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2FD3C: A468003C sh $t0, 60($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D3Cu); return; } g_debug_last_store_pc = 0x80047D3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA468003Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2FD40: A469003E sh $t1, 62($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 62; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D40u); return; } g_debug_last_store_pc = 0x80047D40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA469003Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2FD44: 24640040 addiu $a0, $v1, 64 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (64)); - PGXP_ALU(0x24640040u, cpu->gpr[4], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FD48: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FD4C: 00063040 sll $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 1u; - PGXP_ALU(0x00063040u, cpu->gpr[6], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC2FD50: 24D8000C addiu $t8, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[6] + (12)); - PGXP_ALU(0x24D8000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC2FD54: AC780034 sw $t8, 52($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D54u); return; } g_debug_last_store_pc = 0x80047D54u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D54u); -#endif - /* 0xBFC2FD58: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D58u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FD5C: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x80047D64u; /* jal link before delay slot */ - psx_delay_BFC2FD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FD60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047D60u); -#endif - if (psx_delay_BFC2FD5C) { - psx_delay_BFC2FD5C = 0; - cpu->gpr[31] = 0x80047D64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC2FD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FD64: 1000003E beq $zero, $zero, 0xBFC2FE60 */ - uint32_t psx_brA_BFC2FD64 = cpu->gpr[0]; uint32_t psx_brB_BFC2FD64 = cpu->gpr[0]; - psx_taken_BFC2FD64 = (psx_brA_BFC2FD64 == psx_brB_BFC2FD64); - psx_delay_BFC2FD64 = 1; - /* 0xBFC2FD68: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D68u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D68u); -#endif - if (psx_delay_BFC2FD64) { - psx_delay_BFC2FD64 = 0; - if (psx_taken_BFC2FD64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E60u); - goto label_BFC2FE60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047D6Cu); - } -label_BFC2FD6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FD6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FD6C: A460000C sh $zero, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D6Cu); return; } g_debug_last_store_pc = 0x80047D6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FD70: A460000E sh $zero, 14($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D70u); return; } g_debug_last_store_pc = 0x80047D70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC2FD74: A4620012 sh $v0, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D74u); return; } g_debug_last_store_pc = 0x80047D74u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4620012u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2FD78: 240A0010 addiu $t2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2FD7C: AC6A0000 sw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D7Cu); return; } g_debug_last_store_pc = 0x80047D7Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC2FD80: 34F90008 ori $t9, $a3, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] | 0x8u; - PGXP_ALU(0x34F90008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC2FD84: AC790004 sw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D84u); return; } g_debug_last_store_pc = 0x80047D84u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC2FD88: 240B0100 addiu $t3, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240B0100u, cpu->gpr[11], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80047D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC2FD8C: 240C010C addiu $t4, $zero, 268 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (268)); - PGXP_ALU(0x240C010Cu, cpu->gpr[12], _pgx1, 0x0000010Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC2FD90: A46B0010 sh $t3, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047D90u); return; } g_debug_last_store_pc = 0x80047D90u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC2FD94: AC6C0008 sw $t4, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D94u); return; } g_debug_last_store_pc = 0x80047D94u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC6C0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D94u); -#endif - /* 0xBFC2FD98: 8FA50034 lw $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D98u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC2FD9C: AFA90028 sw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047D9Cu); return; } g_debug_last_store_pc = 0x80047D9Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC2FDA0: AFA80024 sw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DA0u); return; } g_debug_last_store_pc = 0x80047DA0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC2FDA4: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DA4u); return; } g_debug_last_store_pc = 0x80047DA4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2FDA8: 24640014 addiu $a0, $v1, 20 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (20)); - PGXP_ALU(0x24640014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80047DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FDAC: 0C011FCD jal 0xB0047F34 */ - cpu->gpr[31] = 0x80047DB4u; /* jal link before delay slot */ - psx_delay_BFC2FDAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC2FDB0: 24060100 addiu $a2, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24060100u, cpu->gpr[6], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80047DB0u); -#endif - if (psx_delay_BFC2FDAC) { - psx_delay_BFC2FDAC = 0; - cpu->gpr[31] = 0x80047DB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F34u); - cpu->pc = 0x80047F34u; return; - } -label_BFC2FDB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FDB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DB4u); -#endif - /* 0xBFC2FDB4: 8FA80024 lw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DB4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DB4u); -#endif - /* 0xBFC2FDB8: 8FA90028 lw $t1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DB8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90028u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DB8u); -#endif - /* 0xBFC2FDBC: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DBCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2FDC0: 01090019 multu $t0, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01090019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x80047DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FDC4: A4600218 sh $zero, 536($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (536)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047DC4u); return; } g_debug_last_store_pc = 0x80047DC4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600218u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FDC8: A460021A sh $zero, 538($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 538; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (538)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047DC8u); return; } g_debug_last_store_pc = 0x80047DC8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460021Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2FDCC: A468021C sh $t0, 540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (540)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047DCCu); return; } g_debug_last_store_pc = 0x80047DCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA468021Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2FDD0: A469021E sh $t1, 542($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 542; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (542)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047DD0u); return; } g_debug_last_store_pc = 0x80047DD0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA469021Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2FDD4: 24640220 addiu $a0, $v1, 544 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (544)); - PGXP_ALU(0x24640220u, cpu->gpr[4], _pgx1, 0x00000220u); } -#ifdef PSX_COSIM - cosim_instr(0x80047DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FDD8: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FDDC: 00063040 sll $a2, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 1u; - PGXP_ALU(0x00063040u, cpu->gpr[6], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80047DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC2FDE0: 24CD000C addiu $t5, $a2, 12 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[6] + (12)); - PGXP_ALU(0x24CD000Cu, cpu->gpr[13], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC2FDE4: AC6D0214 sw $t5, 532($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DE4u); return; } g_debug_last_store_pc = 0x80047DE4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0214u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DE4u); -#endif - /* 0xBFC2FDE8: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DE8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FDEC: 0C011FCD jal 0xB0047F34 */ - cpu->gpr[31] = 0x80047DF4u; /* jal link before delay slot */ - psx_delay_BFC2FDEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FDF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047DF0u); -#endif - if (psx_delay_BFC2FDEC) { - psx_delay_BFC2FDEC = 0; - cpu->gpr[31] = 0x80047DF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F34u); - cpu->pc = 0x80047F34u; return; - } -label_BFC2FDF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FDF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FDF4: 1000001A beq $zero, $zero, 0xBFC2FE60 */ - uint32_t psx_brA_BFC2FDF4 = cpu->gpr[0]; uint32_t psx_brB_BFC2FDF4 = cpu->gpr[0]; - psx_taken_BFC2FDF4 = (psx_brA_BFC2FDF4 == psx_brB_BFC2FDF4); - psx_delay_BFC2FDF4 = 1; - /* 0xBFC2FDF8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047DF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047DF8u); -#endif - if (psx_delay_BFC2FDF4) { - psx_delay_BFC2FDF4 = 0; - if (psx_taken_BFC2FDF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E60u); - goto label_BFC2FE60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047DFCu); - } -label_BFC2FDFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FDFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2FDFC: 01090019 multu $t0, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01090019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x80047DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC2FE00: AC670004 sw $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E00u); return; } g_debug_last_store_pc = 0x80047E00u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FE04: A460000C sh $zero, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E04u); return; } g_debug_last_store_pc = 0x80047E04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC2FE08: 240A0010 addiu $t2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC2FE0C: AC6A0000 sw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E0Cu); return; } g_debug_last_store_pc = 0x80047E0Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC2FE10: A460000E sh $zero, 14($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E10u); return; } g_debug_last_store_pc = 0x80047E10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC2FE14: A4680010 sh $t0, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E14u); return; } g_debug_last_store_pc = 0x80047E14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4680010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC2FE18: A4690012 sh $t1, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E18u); return; } g_debug_last_store_pc = 0x80047E18u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690012u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC2FE1C: 24640014 addiu $a0, $v1, 20 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (20)); - PGXP_ALU(0x24640014u, cpu->gpr[4], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC2FE20: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80047E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC2FE24: 244E000C addiu $t6, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (12)); - PGXP_ALU(0x244E000Cu, cpu->gpr[14], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80047E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC2FE28: AC6E0008 sw $t6, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E28u); return; } g_debug_last_store_pc = 0x80047E28u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E28u); -#endif - /* 0xBFC2FE2C: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FE30: 0C011FCD jal 0xB0047F34 */ - cpu->gpr[31] = 0x80047E38u; /* jal link before delay slot */ - psx_delay_BFC2FE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC2FE34: 00023040 sll $a2, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00023040u, cpu->gpr[6], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E34u); -#endif - if (psx_delay_BFC2FE30) { - psx_delay_BFC2FE30 = 0; - cpu->gpr[31] = 0x80047E38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F34u); - cpu->pc = 0x80047F34u; return; - } -label_BFC2FE38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FE38: 10000009 beq $zero, $zero, 0xBFC2FE60 */ - uint32_t psx_brA_BFC2FE38 = cpu->gpr[0]; uint32_t psx_brB_BFC2FE38 = cpu->gpr[0]; - psx_taken_BFC2FE38 = (psx_brA_BFC2FE38 == psx_brB_BFC2FE38); - psx_delay_BFC2FE38 = 1; - /* 0xBFC2FE3C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E3Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E3Cu); -#endif - if (psx_delay_BFC2FE38) { - psx_delay_BFC2FE38 = 0; - if (psx_taken_BFC2FE38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E60u); - goto label_BFC2FE60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E40u); - } -label_BFC2FE40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC2FE40: 10E0FFA6 beq $a3, $zero, 0xBFC2FCDC */ - uint32_t psx_brA_BFC2FE40 = cpu->gpr[7]; uint32_t psx_brB_BFC2FE40 = cpu->gpr[0]; - psx_taken_BFC2FE40 = (psx_brA_BFC2FE40 == psx_brB_BFC2FE40); - psx_delay_BFC2FE40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FE44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047E44u); -#endif - if (psx_delay_BFC2FE40) { - psx_delay_BFC2FE40 = 0; - if (psx_taken_BFC2FE40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047CDCu); - goto label_BFC2FCDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E48u); - } -label_BFC2FE48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2FE48: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC2FE4C: 10E2FFC7 beq $a3, $v0, 0xBFC2FD6C */ - uint32_t psx_brA_BFC2FE4C = cpu->gpr[7]; uint32_t psx_brB_BFC2FE4C = cpu->gpr[2]; - psx_taken_BFC2FE4C = (psx_brA_BFC2FE4C == psx_brB_BFC2FE4C); - psx_delay_BFC2FE4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FE50: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E50u); -#endif - if (psx_delay_BFC2FE4C) { - psx_delay_BFC2FE4C = 0; - if (psx_taken_BFC2FE4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047D6Cu); - goto label_BFC2FD6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E54u); - } -label_BFC2FE54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC2FE54: 10E1FFE9 beq $a3, $at, 0xBFC2FDFC */ - uint32_t psx_brA_BFC2FE54 = cpu->gpr[7]; uint32_t psx_brB_BFC2FE54 = cpu->gpr[1]; - psx_taken_BFC2FE54 = (psx_brA_BFC2FE54 == psx_brB_BFC2FE54); - psx_delay_BFC2FE54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FE58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047E58u); -#endif - if (psx_delay_BFC2FE54) { - psx_delay_BFC2FE54 = 0; - if (psx_taken_BFC2FE54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047DFCu); - goto label_BFC2FDFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047E5Cu); - } -label_BFC2FE5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E5Cu); -#endif - /* 0xBFC2FE5C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E5Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E5Cu); -#endif -label_BFC2FE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FE60: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FE64: 03E00008 jr $ra */ - psx_delay_BFC2FE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FE68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047E68u); -#endif - if (psx_delay_BFC2FE64) { - psx_delay_BFC2FE64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2FE6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2FE6Cu); - int psx_delay_BFC2FEA4 = 0; - int psx_delay_BFC2FEAC = 0; - int psx_taken_BFC2FEAC = 0; - int psx_delay_BFC2FED8 = 0; - int psx_taken_BFC2FED8 = 0; - int psx_delay_BFC2FEE4 = 0; - int psx_delay_BFC2FF18 = 0; - int psx_taken_BFC2FF18 = 0; - int psx_delay_BFC2FF2C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2FEACu: goto label_BFC2FEAC; - case 0xBFC2FEB4u: goto label_BFC2FEB4; - case 0xBFC2FEC4u: goto label_BFC2FEC4; - case 0xBFC2FEE0u: goto label_BFC2FEE0; - case 0xBFC2FEECu: goto label_BFC2FEEC; - case 0xBFC2FF20u: goto label_BFC2FF20; - case 0xBFC2FF24u: goto label_BFC2FF24; - default: break; - } - } -label_BFC2FE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FE6C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC2FE70: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E70u); return; } g_debug_last_store_pc = 0x80047E70u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC2FE74: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC2FE78: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E78u); return; } g_debug_last_store_pc = 0x80047E78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC2FE7C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047E7Cu); return; } g_debug_last_store_pc = 0x80047E7Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E80u); -#endif - /* 0xBFC2FE80: 860E0000 lh $t6, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E80u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC2FE84: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC2FE88: A7AE0028 sh $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E88u); return; } g_debug_last_store_pc = 0x80047E88u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E88u); -#endif - /* 0xBFC2FE8C: 860F0002 lh $t7, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E8Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x860F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2FE90: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC2FE94: A7AF002A sh $t7, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E94u); return; } g_debug_last_store_pc = 0x80047E94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF002Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E94u); -#endif - /* 0xBFC2FE98: 86180004 lh $t8, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E98u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x86180004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2FE9C: A7B9002E sh $t9, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047E9Cu); return; } g_debug_last_store_pc = 0x80047E9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9002Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC2FEA0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FEA4: 0C016720 jal 0xB0059C80 */ - cpu->gpr[31] = 0x80047EACu; /* jal link before delay slot */ - psx_delay_BFC2FEA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC2FEA8: A7B8002C sh $t8, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EA8u); return; } g_debug_last_store_pc = 0x80047EA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EA8u); -#endif - if (psx_delay_BFC2FEA4) { - psx_delay_BFC2FEA4 = 0; - cpu->gpr[31] = 0x80047EACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C80u); - cpu->pc = 0x80059C80u; return; - } -label_BFC2FEAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FEACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2FEAC: 10400005 beq $v0, $zero, 0xBFC2FEC4 */ - uint32_t psx_brA_BFC2FEAC = cpu->gpr[2]; uint32_t psx_brB_BFC2FEAC = cpu->gpr[0]; - psx_taken_BFC2FEAC = (psx_brA_BFC2FEAC == psx_brB_BFC2FEAC); - psx_delay_BFC2FEAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FEB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047EB0u); -#endif - if (psx_delay_BFC2FEAC) { - psx_delay_BFC2FEAC = 0; - if (psx_taken_BFC2FEAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047EC4u); - goto label_BFC2FEC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047EB4u); - } -label_BFC2FEB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FEB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EB4u); -#endif - /* 0xBFC2FEB4: 87A8002A lh $t0, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EB4u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A8002Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FEB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2FEBC: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC2FEC0: A7A9002A sh $t1, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EC0u); return; } g_debug_last_store_pc = 0x80047EC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9002Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EC0u); -#endif -label_BFC2FEC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FEC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EC4u); -#endif - /* 0xBFC2FEC4: 860B0002 lh $t3, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EC4u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x860B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EC4u); -#endif - /* 0xBFC2FEC8: 860C0006 lh $t4, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EC8u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x860C0006u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EC8u); -#endif - /* 0xBFC2FECC: 87AA002A lh $t2, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047ECCu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA002Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80047ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC2FED0: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2402u); -#endif - /* 0xBFC2FED4: 014D082A slt $at, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x014D082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FED8: 10200012 beq $at, $zero, 0xBFC2FF24 */ - uint32_t psx_brA_BFC2FED8 = cpu->gpr[1]; uint32_t psx_brB_BFC2FED8 = cpu->gpr[0]; - psx_taken_BFC2FED8 = (psx_brA_BFC2FED8 == psx_brB_BFC2FED8); - psx_delay_BFC2FED8 = 1; - /* 0xBFC2FEDC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047EDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EDCu); -#endif - if (psx_delay_BFC2FED8) { - psx_delay_BFC2FED8 = 0; - if (psx_taken_BFC2FED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F24u); - goto label_BFC2FF24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047EE0u); - } -label_BFC2FEE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FEE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC2FEE0: 27A40028 addiu $a0, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27A40028u, cpu->gpr[4], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80047EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC2FEE4: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x80047EECu; /* jal link before delay slot */ - psx_delay_BFC2FEE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC2FEE8: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047EE8u); -#endif - if (psx_delay_BFC2FEE4) { - psx_delay_BFC2FEE4 = 0; - cpu->gpr[31] = 0x80047EECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC2FEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EECu); -#endif - /* 0xBFC2FEEC: 87B8002A lh $t8, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EECu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B8002Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047EF0u); -#endif - /* 0xBFC2FEF0: 860E0004 lh $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EF0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC2FEF4: 27190002 addiu $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (2)); - PGXP_ALU(0x27190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80047EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC2FEF8: A7B9002A sh $t9, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EF8u); return; } g_debug_last_store_pc = 0x80047EF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9002Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EF8u); -#endif - /* 0xBFC2FEFC: 860C0006 lh $t4, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047EFCu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x860C0006u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80047EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F00u); -#endif - /* 0xBFC2FF00: 860B0002 lh $t3, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80047F00u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x860B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC2FF04: 00194400 sll $t0, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 16u; - PGXP_ALU(0x00194400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC2FF08: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC2FF0C: 016C5021 addu $t2, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[10] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC2FF10: 012A082A slt $at, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x012A082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC2FF14: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC2FF18: 1420FFF1 bne $at, $zero, 0xBFC2FEE0 */ - uint32_t psx_brA_BFC2FF18 = cpu->gpr[1]; uint32_t psx_brB_BFC2FF18 = cpu->gpr[0]; - psx_taken_BFC2FF18 = (psx_brA_BFC2FF18 != psx_brB_BFC2FF18); - psx_delay_BFC2FF18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC2FF1C: 022F8821 addu $s1, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022F8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047F1Cu); -#endif - if (psx_delay_BFC2FF18) { - psx_delay_BFC2FF18 = 0; - if (psx_taken_BFC2FF18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047EE0u); - goto label_BFC2FEE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F20u); - } -label_BFC2FF20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FF20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F20u); -#endif - /* 0xBFC2FF20: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047F20u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F20u); -#endif -label_BFC2FF24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FF24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F24u); -#endif - /* 0xBFC2FF24: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047F24u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F24u); -#endif - /* 0xBFC2FF28: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80047F28u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FF2C: 03E00008 jr $ra */ - psx_delay_BFC2FF2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC2FF30: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F30u); -#endif - if (psx_delay_BFC2FF2C) { - psx_delay_BFC2FF2C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC2FF34(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC2FF34u); - int psx_delay_BFC2FF38 = 0; - int psx_taken_BFC2FF38 = 0; - int psx_delay_BFC2FF54 = 0; - int psx_taken_BFC2FF54 = 0; - int psx_delay_BFC2FF5C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC2FF40u: goto label_BFC2FF40; - case 0xBFC2FF5Cu: goto label_BFC2FF5C; - default: break; - } - } -label_BFC2FF34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FF34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2FF34: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2FF38: 10400008 beq $v0, $zero, 0xBFC2FF5C */ - uint32_t psx_brA_BFC2FF38 = cpu->gpr[2]; uint32_t psx_brB_BFC2FF38 = cpu->gpr[0]; - psx_taken_BFC2FF38 = (psx_brA_BFC2FF38 == psx_brB_BFC2FF38); - psx_delay_BFC2FF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FF3C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047F3Cu); -#endif - if (psx_delay_BFC2FF38) { - psx_delay_BFC2FF38 = 0; - if (psx_taken_BFC2FF38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F5Cu); - goto label_BFC2FF5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F40u); - } -label_BFC2FF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F40u); -#endif - /* 0xBFC2FF40: 808E0000 lb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x808E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC2FF44: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80047F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC2FF48: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC2FF4C: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80047F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC2FF50: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80047F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC2FF54: 1440FFFA bne $v0, $zero, 0xBFC2FF40 */ - uint32_t psx_brA_BFC2FF54 = cpu->gpr[2]; uint32_t psx_brB_BFC2FF54 = cpu->gpr[0]; - psx_taken_BFC2FF54 = (psx_brA_BFC2FF54 != psx_brB_BFC2FF54); - psx_delay_BFC2FF54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC2FF58: A0AEFFFF sb $t6, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80047F58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA0AEFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80047F58u); -#endif - if (psx_delay_BFC2FF54) { - psx_delay_BFC2FF54 = 0; - if (psx_taken_BFC2FF54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F40u); - goto label_BFC2FF40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80047F5Cu); - } -label_BFC2FF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC2FF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC2FF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC2FF5C: 03E00008 jr $ra */ - psx_delay_BFC2FF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80047F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC2FF60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80047F60u); -#endif - if (psx_delay_BFC2FF5C) { - psx_delay_BFC2FF5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3010C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3010Cu); - int psx_delay_BFC30124 = 0; - int psx_delay_BFC30130 = 0; - int psx_delay_BFC30154 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3012Cu: goto label_BFC3012C; - case 0xBFC30138u: goto label_BFC30138; - default: break; - } - } -label_BFC3010C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3010Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3010Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3010C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30110: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048110u); return; } g_debug_last_store_pc = 0x80048110u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC30114: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC30118: 240E000E addiu $t6, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x240E000Eu, cpu->gpr[14], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80048118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3011C: A46E0000 sh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004811Cu); return; } g_debug_last_store_pc = 0x8004811Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004811Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC30120: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048120u); return; } g_debug_last_store_pc = 0x80048120u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30124: 0C01468F jal 0xB0051A3C */ - cpu->gpr[31] = 0x8004812Cu; /* jal link before delay slot */ - psx_delay_BFC30124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC30128: 2464000C addiu $a0, $v1, 12 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (12)); - PGXP_ALU(0x2464000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80048128u); -#endif - if (psx_delay_BFC30124) { - psx_delay_BFC30124 = 0; - cpu->gpr[31] = 0x8004812Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051A3Cu); - cpu->pc = 0x80051A3Cu; return; - } -label_BFC3012C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3012Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3012Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004812Cu); -#endif - /* 0xBFC3012C: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004812Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004812Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30130: 0C01468F jal 0xB0051A3C */ - cpu->gpr[31] = 0x80048138u; /* jal link before delay slot */ - psx_delay_BFC30130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC30134: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80048134u); -#endif - if (psx_delay_BFC30130) { - psx_delay_BFC30130 = 0; - cpu->gpr[31] = 0x80048138u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051A3Cu); - cpu->pc = 0x80051A3Cu; return; - } -label_BFC30138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048138u); -#endif - /* 0xBFC30138: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048138u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3013C: 240F1000 addiu $t7, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240F1000u, cpu->gpr[15], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004813Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC30140: A4600002 sh $zero, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048140u); return; } g_debug_last_store_pc = 0x80048140u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC30144: A4600004 sh $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048144u); return; } g_debug_last_store_pc = 0x80048144u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC30148: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048148u); return; } g_debug_last_store_pc = 0x80048148u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048148u); -#endif - /* 0xBFC3014C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004814Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004814Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30150: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30154: 03E00008 jr $ra */ - psx_delay_BFC30154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048158u); -#endif - if (psx_delay_BFC30154) { - psx_delay_BFC30154 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3015C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3015Cu); - int psx_delay_BFC30174 = 0; - int psx_delay_BFC30180 = 0; - int psx_delay_BFC301A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3017Cu: goto label_BFC3017C; - case 0xBFC30188u: goto label_BFC30188; - default: break; - } - } -label_BFC3015C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3015Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3015Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3015C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30160: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048160u); return; } g_debug_last_store_pc = 0x80048160u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC30164: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC30168: 240E000D addiu $t6, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x240E000Du, cpu->gpr[14], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80048168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3016C: A46E0000 sh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004816Cu); return; } g_debug_last_store_pc = 0x8004816Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA46E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004816Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC30170: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048170u); return; } g_debug_last_store_pc = 0x80048170u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30174: 0C014667 jal 0xB005199C */ - cpu->gpr[31] = 0x8004817Cu; /* jal link before delay slot */ - psx_delay_BFC30174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC30178: 2464000C addiu $a0, $v1, 12 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (12)); - PGXP_ALU(0x2464000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80048178u); -#endif - if (psx_delay_BFC30174) { - psx_delay_BFC30174 = 0; - cpu->gpr[31] = 0x8004817Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005199Cu); - cpu->pc = 0x8005199Cu; return; - } -label_BFC3017C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3017Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3017Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004817Cu); -#endif - /* 0xBFC3017C: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004817Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004817Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30180: 0C014667 jal 0xB005199C */ - cpu->gpr[31] = 0x80048188u; /* jal link before delay slot */ - psx_delay_BFC30180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC30184: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80048184u); -#endif - if (psx_delay_BFC30180) { - psx_delay_BFC30180 = 0; - cpu->gpr[31] = 0x80048188u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005199Cu); - cpu->pc = 0x8005199Cu; return; - } -label_BFC30188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048188u); -#endif - /* 0xBFC30188: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048188u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3018C: 240F1000 addiu $t7, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x240F1000u, cpu->gpr[15], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004818Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC30190: A4600002 sh $zero, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048190u); return; } g_debug_last_store_pc = 0x80048190u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC30194: A4600004 sh $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048194u); return; } g_debug_last_store_pc = 0x80048194u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC30198: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048198u); return; } g_debug_last_store_pc = 0x80048198u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048198u); -#endif - /* 0xBFC3019C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004819Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC301A0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800481A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC301A4: 03E00008 jr $ra */ - psx_delay_BFC301A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC301A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800481A8u); -#endif - if (psx_delay_BFC301A4) { - psx_delay_BFC301A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC301AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC301ACu); - int psx_delay_BFC301D0 = 0; - int psx_taken_BFC301D0 = 0; - int psx_delay_BFC301E0 = 0; - int psx_delay_BFC301E8 = 0; - int psx_taken_BFC301E8 = 0; - int psx_delay_BFC301F8 = 0; - int psx_delay_BFC30200 = 0; - int psx_taken_BFC30200 = 0; - int psx_delay_BFC3020C = 0; - int psx_taken_BFC3020C = 0; - int psx_delay_BFC30214 = 0; - int psx_taken_BFC30214 = 0; - int psx_delay_BFC30224 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC301D8u: goto label_BFC301D8; - case 0xBFC301E8u: goto label_BFC301E8; - case 0xBFC301F0u: goto label_BFC301F0; - case 0xBFC301F4u: goto label_BFC301F4; - case 0xBFC30200u: goto label_BFC30200; - case 0xBFC30208u: goto label_BFC30208; - case 0xBFC30214u: goto label_BFC30214; - case 0xBFC3021Cu: goto label_BFC3021C; - case 0xBFC30220u: goto label_BFC30220; - default: break; - } - } -label_BFC301AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC301ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC301ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC301AC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800481ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC301B0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800481B0u); return; } g_debug_last_store_pc = 0x800481B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800481B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC301B4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800481B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC301B8: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC301BC: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC301C0: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481C0u); -#endif - /* 0xBFC301C4: 84620000 lh $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800481C4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x84620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800481C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC301C8: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC301CC: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC301D0: 1000000D beq $zero, $zero, 0xBFC30208 */ - uint32_t psx_brA_BFC301D0 = cpu->gpr[0]; uint32_t psx_brB_BFC301D0 = cpu->gpr[0]; - psx_taken_BFC301D0 = (psx_brA_BFC301D0 == psx_brB_BFC301D0); - psx_delay_BFC301D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC301D4: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800481D4u); -#endif - if (psx_delay_BFC301D0) { - psx_delay_BFC301D0 = 0; - if (psx_taken_BFC301D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048208u); - goto label_BFC30208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481D8u); - } -label_BFC301D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC301D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC301D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481D8u); -#endif - /* 0xBFC301D8: 87AE0038 lh $t6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800481D8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0038u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800481D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC301DC: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800481DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC301E0: 0C0120E9 jal 0xB00483A4 */ - cpu->gpr[31] = 0x800481E8u; /* jal link before delay slot */ - psx_delay_BFC301E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC301E4: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800481E4u); return; } g_debug_last_store_pc = 0x800481E4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800481E4u); -#endif - if (psx_delay_BFC301E0) { - psx_delay_BFC301E0 = 0; - cpu->gpr[31] = 0x800481E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483A4u); - cpu->pc = 0x800483A4u; return; - } -label_BFC301E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC301E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC301E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC301E8: 1000000D beq $zero, $zero, 0xBFC30220 */ - uint32_t psx_brA_BFC301E8 = cpu->gpr[0]; uint32_t psx_brB_BFC301E8 = cpu->gpr[0]; - psx_taken_BFC301E8 = (psx_brA_BFC301E8 == psx_brB_BFC301E8); - psx_delay_BFC301E8 = 1; - /* 0xBFC301EC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800481ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800481ECu); -#endif - if (psx_delay_BFC301E8) { - psx_delay_BFC301E8 = 0; - if (psx_taken_BFC301E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048220u); - goto label_BFC30220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481F0u); - } -label_BFC301F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC301F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC301F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481F0u); -#endif - /* 0xBFC301F0: 87AF0038 lh $t7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800481F0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800481F0u); -#endif -label_BFC301F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC301F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC301F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800481F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC301F4: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800481F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC301F8: 0C012107 jal 0xB004841C */ - cpu->gpr[31] = 0x80048200u; /* jal link before delay slot */ - psx_delay_BFC301F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC301FC: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800481FCu); return; } g_debug_last_store_pc = 0x800481FCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800481FCu); -#endif - if (psx_delay_BFC301F8) { - psx_delay_BFC301F8 = 0; - cpu->gpr[31] = 0x80048200u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004841Cu); - cpu->pc = 0x8004841Cu; return; - } -label_BFC30200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30200: 10000007 beq $zero, $zero, 0xBFC30220 */ - uint32_t psx_brA_BFC30200 = cpu->gpr[0]; uint32_t psx_brB_BFC30200 = cpu->gpr[0]; - psx_taken_BFC30200 = (psx_brA_BFC30200 == psx_brB_BFC30200); - psx_delay_BFC30200 = 1; - /* 0xBFC30204: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048204u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048204u); -#endif - if (psx_delay_BFC30200) { - psx_delay_BFC30200 = 0; - if (psx_taken_BFC30200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048220u); - goto label_BFC30220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048208u); - } -label_BFC30208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30208: 2401000D addiu $at, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2401000Du, cpu->gpr[1], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80048208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3020C: 1041FFF2 beq $v0, $at, 0xBFC301D8 */ - uint32_t psx_brA_BFC3020C = cpu->gpr[2]; uint32_t psx_brB_BFC3020C = cpu->gpr[1]; - psx_taken_BFC3020C = (psx_brA_BFC3020C == psx_brB_BFC3020C); - psx_delay_BFC3020C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30210: 2401000E addiu $at, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2401000Eu, cpu->gpr[1], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80048210u); -#endif - if (psx_delay_BFC3020C) { - psx_delay_BFC3020C = 0; - if (psx_taken_BFC3020C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481D8u); - goto label_BFC301D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048214u); - } -label_BFC30214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30214: 1041FFF7 beq $v0, $at, 0xBFC301F4 */ - uint32_t psx_brA_BFC30214 = cpu->gpr[2]; uint32_t psx_brB_BFC30214 = cpu->gpr[1]; - psx_taken_BFC30214 = (psx_brA_BFC30214 == psx_brB_BFC30214); - psx_delay_BFC30214 = 1; - /* 0xBFC30218: 87AF0038 lh $t7, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048218u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048218u); -#endif - if (psx_delay_BFC30214) { - psx_delay_BFC30214 = 0; - if (psx_taken_BFC30214) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800481F4u); - goto label_BFC301F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004821Cu); - } -label_BFC3021C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3021Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004821Cu); -#endif - /* 0xBFC3021C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004821Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004821Cu); -#endif -label_BFC30220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30220: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80048220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30224: 03E00008 jr $ra */ - psx_delay_BFC30224 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048228u); -#endif - if (psx_delay_BFC30224) { - psx_delay_BFC30224 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3022C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3022Cu); - int psx_delay_BFC30250 = 0; - int psx_taken_BFC30250 = 0; - int psx_delay_BFC30258 = 0; - int psx_delay_BFC30260 = 0; - int psx_taken_BFC30260 = 0; - int psx_delay_BFC30268 = 0; - int psx_delay_BFC30270 = 0; - int psx_taken_BFC30270 = 0; - int psx_delay_BFC3027C = 0; - int psx_taken_BFC3027C = 0; - int psx_delay_BFC30284 = 0; - int psx_taken_BFC30284 = 0; - int psx_delay_BFC30294 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30258u: goto label_BFC30258; - case 0xBFC30260u: goto label_BFC30260; - case 0xBFC30268u: goto label_BFC30268; - case 0xBFC30270u: goto label_BFC30270; - case 0xBFC30278u: goto label_BFC30278; - case 0xBFC30284u: goto label_BFC30284; - case 0xBFC3028Cu: goto label_BFC3028C; - case 0xBFC30290u: goto label_BFC30290; - default: break; - } - } -label_BFC3022C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3022Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3022Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004822Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3022C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004822Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30230: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048230u); return; } g_debug_last_store_pc = 0x80048230u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC30234: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30238: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3023C: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004823Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30240: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048240u); -#endif - /* 0xBFC30244: 84620000 lh $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048244u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x84620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30248: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3024C: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004824Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30250: 10000009 beq $zero, $zero, 0xBFC30278 */ - uint32_t psx_brA_BFC30250 = cpu->gpr[0]; uint32_t psx_brB_BFC30250 = cpu->gpr[0]; - psx_taken_BFC30250 = (psx_brA_BFC30250 == psx_brB_BFC30250); - psx_delay_BFC30250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30254: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048254u); -#endif - if (psx_delay_BFC30250) { - psx_delay_BFC30250 = 0; - if (psx_taken_BFC30250) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048278u); - goto label_BFC30278; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048258u); - } -label_BFC30258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30258: 0C01212D jal 0xB00484B4 */ - cpu->gpr[31] = 0x80048260u; /* jal link before delay slot */ - psx_delay_BFC30258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3025C: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004825Cu); -#endif - if (psx_delay_BFC30258) { - psx_delay_BFC30258 = 0; - cpu->gpr[31] = 0x80048260u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484B4u); - cpu->pc = 0x800484B4u; return; - } -label_BFC30260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30260: 1000000B beq $zero, $zero, 0xBFC30290 */ - uint32_t psx_brA_BFC30260 = cpu->gpr[0]; uint32_t psx_brB_BFC30260 = cpu->gpr[0]; - psx_taken_BFC30260 = (psx_brA_BFC30260 == psx_brB_BFC30260); - psx_delay_BFC30260 = 1; - /* 0xBFC30264: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048264u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048264u); -#endif - if (psx_delay_BFC30260) { - psx_delay_BFC30260 = 0; - if (psx_taken_BFC30260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048290u); - goto label_BFC30290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048268u); - } -label_BFC30268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30268: 0C012145 jal 0xB0048514 */ - cpu->gpr[31] = 0x80048270u; /* jal link before delay slot */ - psx_delay_BFC30268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3026C: 24640030 addiu $a0, $v1, 48 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (48)); - PGXP_ALU(0x24640030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004826Cu); -#endif - if (psx_delay_BFC30268) { - psx_delay_BFC30268 = 0; - cpu->gpr[31] = 0x80048270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048514u); - cpu->pc = 0x80048514u; return; - } -label_BFC30270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30270: 10000007 beq $zero, $zero, 0xBFC30290 */ - uint32_t psx_brA_BFC30270 = cpu->gpr[0]; uint32_t psx_brB_BFC30270 = cpu->gpr[0]; - psx_taken_BFC30270 = (psx_brA_BFC30270 == psx_brB_BFC30270); - psx_delay_BFC30270 = 1; - /* 0xBFC30274: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048274u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048274u); -#endif - if (psx_delay_BFC30270) { - psx_delay_BFC30270 = 0; - if (psx_taken_BFC30270) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048290u); - goto label_BFC30290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048278u); - } -label_BFC30278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30278: 2401000D addiu $at, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2401000Du, cpu->gpr[1], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x80048278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3027C: 1041FFF6 beq $v0, $at, 0xBFC30258 */ - uint32_t psx_brA_BFC3027C = cpu->gpr[2]; uint32_t psx_brB_BFC3027C = cpu->gpr[1]; - psx_taken_BFC3027C = (psx_brA_BFC3027C == psx_brB_BFC3027C); - psx_delay_BFC3027C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30280: 2401000E addiu $at, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2401000Eu, cpu->gpr[1], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80048280u); -#endif - if (psx_delay_BFC3027C) { - psx_delay_BFC3027C = 0; - if (psx_taken_BFC3027C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048258u); - goto label_BFC30258; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048284u); - } -label_BFC30284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30284: 1041FFF8 beq $v0, $at, 0xBFC30268 */ - uint32_t psx_brA_BFC30284 = cpu->gpr[2]; uint32_t psx_brB_BFC30284 = cpu->gpr[1]; - psx_taken_BFC30284 = (psx_brA_BFC30284 == psx_brB_BFC30284); - psx_delay_BFC30284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048288u); -#endif - if (psx_delay_BFC30284) { - psx_delay_BFC30284 = 0; - if (psx_taken_BFC30284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048268u); - goto label_BFC30268; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004828Cu); - } -label_BFC3028C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3028Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004828Cu); -#endif - /* 0xBFC3028C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004828Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004828Cu); -#endif -label_BFC30290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30290: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30294: 03E00008 jr $ra */ - psx_delay_BFC30294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30298: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048298u); -#endif - if (psx_delay_BFC30294) { - psx_delay_BFC30294 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3029C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3029Cu); - int psx_delay_BFC302A4 = 0; - int psx_delay_BFC302B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC302ACu: goto label_BFC302AC; - default: break; - } - } -label_BFC3029C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3029Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3029Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004829Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3029C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004829Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC302A0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482A0u); return; } g_debug_last_store_pc = 0x800482A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800482A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC302A4: 0C0120AF jal 0xB00482BC */ - cpu->gpr[31] = 0x800482ACu; /* jal link before delay slot */ - psx_delay_BFC302A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC302A8: AC850008 sw $a1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482A8u); return; } g_debug_last_store_pc = 0x800482A8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC850008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800482A8u); -#endif - if (psx_delay_BFC302A4) { - psx_delay_BFC302A4 = 0; - cpu->gpr[31] = 0x800482ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482BCu); - cpu->pc = 0x800482BCu; return; - } -label_BFC302AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482ACu); -#endif - /* 0xBFC302AC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482ACu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800482ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC302B0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800482B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC302B4: 03E00008 jr $ra */ - psx_delay_BFC302B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC302B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800482B8u); -#endif - if (psx_delay_BFC302B4) { - psx_delay_BFC302B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC302BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC302BCu); - int psx_delay_BFC302C8 = 0; - int psx_taken_BFC302C8 = 0; - int psx_delay_BFC302D4 = 0; - int psx_delay_BFC302DC = 0; - int psx_taken_BFC302DC = 0; - int psx_delay_BFC302E8 = 0; - int psx_delay_BFC302F0 = 0; - int psx_taken_BFC302F0 = 0; - int psx_delay_BFC302FC = 0; - int psx_taken_BFC302FC = 0; - int psx_delay_BFC30304 = 0; - int psx_taken_BFC30304 = 0; - int psx_delay_BFC30314 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC302D0u: goto label_BFC302D0; - case 0xBFC302DCu: goto label_BFC302DC; - case 0xBFC302E4u: goto label_BFC302E4; - case 0xBFC302E8u: goto label_BFC302E8; - case 0xBFC302F0u: goto label_BFC302F0; - case 0xBFC302F8u: goto label_BFC302F8; - case 0xBFC302FCu: goto label_BFC302FC; - case 0xBFC30304u: goto label_BFC30304; - case 0xBFC3030Cu: goto label_BFC3030C; - case 0xBFC30310u: goto label_BFC30310; - default: break; - } - } -label_BFC302BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC302BC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800482BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC302C0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482C0u); return; } g_debug_last_store_pc = 0x800482C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800482C0u); -#endif - /* 0xBFC302C4: 84820000 lh $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800482C4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x84820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800482C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC302C8: 1000000C beq $zero, $zero, 0xBFC302FC */ - uint32_t psx_brA_BFC302C8 = cpu->gpr[0]; uint32_t psx_brB_BFC302C8 = cpu->gpr[0]; - psx_taken_BFC302C8 = (psx_brA_BFC302C8 == psx_brB_BFC302C8); - psx_delay_BFC302C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC302CC: 2401000D addiu $at, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2401000Du, cpu->gpr[1], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x800482CCu); -#endif - if (psx_delay_BFC302C8) { - psx_delay_BFC302C8 = 0; - if (psx_taken_BFC302C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482FCu); - goto label_BFC302FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482D0u); - } -label_BFC302D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC302D0: 24850030 addiu $a1, $a0, 48 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (48)); - PGXP_ALU(0x24850030u, cpu->gpr[5], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800482D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC302D4: 0C0121E7 jal 0xB004879C */ - cpu->gpr[31] = 0x800482DCu; /* jal link before delay slot */ - psx_delay_BFC302D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC302D8: 2486000C addiu $a2, $a0, 12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] + (12)); - PGXP_ALU(0x2486000Cu, cpu->gpr[6], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800482D8u); -#endif - if (psx_delay_BFC302D4) { - psx_delay_BFC302D4 = 0; - cpu->gpr[31] = 0x800482DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004879Cu); - cpu->pc = 0x8004879Cu; return; - } -label_BFC302DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC302DC: 1000000C beq $zero, $zero, 0xBFC30310 */ - uint32_t psx_brA_BFC302DC = cpu->gpr[0]; uint32_t psx_brB_BFC302DC = cpu->gpr[0]; - psx_taken_BFC302DC = (psx_brA_BFC302DC == psx_brB_BFC302DC); - psx_delay_BFC302DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482E0u); -#endif - /* 0xBFC302E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800482E0u); -#endif - if (psx_delay_BFC302DC) { - psx_delay_BFC302DC = 0; - if (psx_taken_BFC302DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048310u); - goto label_BFC30310; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482E4u); - } -label_BFC302E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC302E4: 24850030 addiu $a1, $a0, 48 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (48)); - PGXP_ALU(0x24850030u, cpu->gpr[5], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800482E4u); -#endif -label_BFC302E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC302E8: 0C01221A jal 0xB0048868 */ - cpu->gpr[31] = 0x800482F0u; /* jal link before delay slot */ - psx_delay_BFC302E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC302EC: 2486000C addiu $a2, $a0, 12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] + (12)); - PGXP_ALU(0x2486000Cu, cpu->gpr[6], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800482ECu); -#endif - if (psx_delay_BFC302E8) { - psx_delay_BFC302E8 = 0; - cpu->gpr[31] = 0x800482F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048868u); - cpu->pc = 0x80048868u; return; - } -label_BFC302F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC302F0: 10000007 beq $zero, $zero, 0xBFC30310 */ - uint32_t psx_brA_BFC302F0 = cpu->gpr[0]; uint32_t psx_brB_BFC302F0 = cpu->gpr[0]; - psx_taken_BFC302F0 = (psx_brA_BFC302F0 == psx_brB_BFC302F0); - psx_delay_BFC302F0 = 1; - /* 0xBFC302F4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800482F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800482F4u); -#endif - if (psx_delay_BFC302F0) { - psx_delay_BFC302F0 = 0; - if (psx_taken_BFC302F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048310u); - goto label_BFC30310; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482F8u); - } -label_BFC302F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC302F8: 2401000D addiu $at, $zero, 13 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); - PGXP_ALU(0x2401000Du, cpu->gpr[1], _pgx1, 0x0000000Du); } -#ifdef PSX_COSIM - cosim_instr(0x800482F8u); -#endif -label_BFC302FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC302FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC302FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800482FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC302FC: 1041FFF4 beq $v0, $at, 0xBFC302D0 */ - uint32_t psx_brA_BFC302FC = cpu->gpr[2]; uint32_t psx_brB_BFC302FC = cpu->gpr[1]; - psx_taken_BFC302FC = (psx_brA_BFC302FC == psx_brB_BFC302FC); - psx_delay_BFC302FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30300: 2401000E addiu $at, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2401000Eu, cpu->gpr[1], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80048300u); -#endif - if (psx_delay_BFC302FC) { - psx_delay_BFC302FC = 0; - if (psx_taken_BFC302FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482D0u); - goto label_BFC302D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048304u); - } -label_BFC30304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30304: 1041FFF8 beq $v0, $at, 0xBFC302E8 */ - uint32_t psx_brA_BFC30304 = cpu->gpr[2]; uint32_t psx_brB_BFC30304 = cpu->gpr[1]; - psx_taken_BFC30304 = (psx_brA_BFC30304 == psx_brB_BFC30304); - psx_delay_BFC30304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC30308: 24850030 addiu $a1, $a0, 48 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (48)); - PGXP_ALU(0x24850030u, cpu->gpr[5], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80048308u); -#endif - if (psx_delay_BFC30304) { - psx_delay_BFC30304 = 0; - if (psx_taken_BFC30304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482E8u); - goto label_BFC302E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004830Cu); - } -label_BFC3030C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3030Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004830Cu); -#endif - /* 0xBFC3030C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004830Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004830Cu); -#endif -label_BFC30310: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30310u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30310: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30314: 03E00008 jr $ra */ - psx_delay_BFC30314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30318: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048318u); -#endif - if (psx_delay_BFC30314) { - psx_delay_BFC30314 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3031C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3031Cu); - int psx_delay_BFC30338 = 0; - int psx_delay_BFC30348 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30340u: goto label_BFC30340; - default: break; - } - } -label_BFC3031C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3031Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3031Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004831Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3031C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004831Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30320: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048320u); return; } g_debug_last_store_pc = 0x80048320u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30324: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30328: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3032C: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30330: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC30334: A4850002 sh $a1, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048334u); return; } g_debug_last_store_pc = 0x80048334u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4850002u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80048334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30338: 0C0120AF jal 0xB00482BC */ - cpu->gpr[31] = 0x80048340u; /* jal link before delay slot */ - psx_delay_BFC30338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3033C: A4860004 sh $a2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004833Cu); return; } g_debug_last_store_pc = 0x8004833Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004833Cu); -#endif - if (psx_delay_BFC30338) { - psx_delay_BFC30338 = 0; - cpu->gpr[31] = 0x80048340u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482BCu); - cpu->pc = 0x800482BCu; return; - } -label_BFC30340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048340u); -#endif - /* 0xBFC30340: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048340u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30344: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30348: 03E00008 jr $ra */ - psx_delay_BFC30348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3034C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004834Cu); -#endif - if (psx_delay_BFC30348) { - psx_delay_BFC30348 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30350(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30350u); - int psx_delay_BFC3037C = 0; - int psx_delay_BFC3038C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30384u: goto label_BFC30384; - default: break; - } - } -label_BFC30350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30350: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80048350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30354: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048354u); return; } g_debug_last_store_pc = 0x80048354u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048354u); -#endif - /* 0xBFC30358: 848E0002 lh $t6, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048358u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048358u); -#endif - /* 0xBFC3035C: 84980004 lh $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004835Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004835Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30360: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30364: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30368: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3036C: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004836Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC020u); -#endif - /* 0xBFC30370: 01C57821 addu $t7, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[14] + cpu->gpr[5]; - PGXP_ALU(0x01C57821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC30374: 0306C821 addu $t9, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[24] + cpu->gpr[6]; - PGXP_ALU(0x0306C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC30378: A48F0002 sh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048378u); return; } g_debug_last_store_pc = 0x80048378u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3037C: 0C0120AF jal 0xB00482BC */ - cpu->gpr[31] = 0x80048384u; /* jal link before delay slot */ - psx_delay_BFC3037C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC30380: A4990004 sh $t9, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048380u); return; } g_debug_last_store_pc = 0x80048380u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4990004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048380u); -#endif - if (psx_delay_BFC3037C) { - psx_delay_BFC3037C = 0; - cpu->gpr[31] = 0x80048384u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800482BCu); - cpu->pc = 0x800482BCu; return; - } -label_BFC30384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048384u); -#endif - /* 0xBFC30384: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048384u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30388: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3038C: 03E00008 jr $ra */ - psx_delay_BFC3038C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048390u); -#endif - if (psx_delay_BFC3038C) { - psx_delay_BFC3038C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC303A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC303A4u); - int psx_delay_BFC303B8 = 0; - int psx_taken_BFC303B8 = 0; - int psx_delay_BFC303CC = 0; - int psx_delay_BFC303E0 = 0; - int psx_delay_BFC303F4 = 0; - int psx_delay_BFC303FC = 0; - int psx_taken_BFC303FC = 0; - int psx_delay_BFC30404 = 0; - int psx_taken_BFC30404 = 0; - int psx_delay_BFC3040C = 0; - int psx_taken_BFC3040C = 0; - int psx_delay_BFC30414 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC303C0u: goto label_BFC303C0; - case 0xBFC303D4u: goto label_BFC303D4; - case 0xBFC303E8u: goto label_BFC303E8; - case 0xBFC303FCu: goto label_BFC303FC; - case 0xBFC30404u: goto label_BFC30404; - case 0xBFC3040Cu: goto label_BFC3040C; - case 0xBFC30414u: goto label_BFC30414; - default: break; - } - } -label_BFC303A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC303A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC303A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC303A4: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC303A8: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC303AC: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC303B0: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC303B4: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC303B8: 10000010 beq $zero, $zero, 0xBFC303FC */ - uint32_t psx_brA_BFC303B8 = cpu->gpr[0]; uint32_t psx_brB_BFC303B8 = cpu->gpr[0]; - psx_taken_BFC303B8 = (psx_brA_BFC303B8 == psx_brB_BFC303B8); - psx_delay_BFC303B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC303BC: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800483BCu); -#endif - if (psx_delay_BFC303B8) { - psx_delay_BFC303B8 = 0; - if (psx_taken_BFC303B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483FCu); - goto label_BFC303FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483C0u); - } -label_BFC303C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC303C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC303C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC303C0: A0860004 sb $a2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800483C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC303C4: A0870005 sb $a3, 5($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (5)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA0870005u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800483C4u); -#endif - /* 0xBFC303C8: 87AE0010 lh $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800483C8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800483C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC303CC: 03E00008 jr $ra */ - psx_delay_BFC303CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC303D0: A08E0006 sb $t6, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800483D0u); -#endif - if (psx_delay_BFC303CC) { - psx_delay_BFC303CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC303D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC303D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC303D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC303D4: A086000C sb $a2, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (12)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA086000Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800483D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC303D8: A087000D sb $a3, 13($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (13)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087000Du, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800483D8u); -#endif - /* 0xBFC303DC: 87AF0010 lh $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800483DCu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800483DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC303E0: 03E00008 jr $ra */ - psx_delay_BFC303E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC303E4: A08F000E sb $t7, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (14)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08F000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800483E4u); -#endif - if (psx_delay_BFC303E0) { - psx_delay_BFC303E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC303E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC303E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC303E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC303E8: A0860014 sb $a2, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483E8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (20)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860014u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800483E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC303EC: A0870015 sb $a3, 21($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 21; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (21)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA0870015u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800483ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483F0u); -#endif - /* 0xBFC303F0: 87B80010 lh $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800483F0u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800483F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC303F4: 03E00008 jr $ra */ - psx_delay_BFC303F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC303F8: A0980016 sb $t8, 22($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 22; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800483F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (22)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0980016u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800483F8u); -#endif - if (psx_delay_BFC303F4) { - psx_delay_BFC303F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC303FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC303FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC303FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800483FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC303FC: 10A0FFF0 beq $a1, $zero, 0xBFC303C0 */ - uint32_t psx_brA_BFC303FC = cpu->gpr[5]; uint32_t psx_brB_BFC303FC = cpu->gpr[0]; - psx_taken_BFC303FC = (psx_brA_BFC303FC == psx_brB_BFC303FC); - psx_delay_BFC303FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30400: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048400u); -#endif - if (psx_delay_BFC303FC) { - psx_delay_BFC303FC = 0; - if (psx_taken_BFC303FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483C0u); - goto label_BFC303C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048404u); - } -label_BFC30404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC30404: 10A1FFF3 beq $a1, $at, 0xBFC303D4 */ - uint32_t psx_brA_BFC30404 = cpu->gpr[5]; uint32_t psx_brB_BFC30404 = cpu->gpr[1]; - psx_taken_BFC30404 = (psx_brA_BFC30404 == psx_brB_BFC30404); - psx_delay_BFC30404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30408: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80048408u); -#endif - if (psx_delay_BFC30404) { - psx_delay_BFC30404 = 0; - if (psx_taken_BFC30404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483D4u); - goto label_BFC303D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004840Cu); - } -label_BFC3040C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3040Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004840Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3040C: 10A1FFF6 beq $a1, $at, 0xBFC303E8 */ - uint32_t psx_brA_BFC3040C = cpu->gpr[5]; uint32_t psx_brB_BFC3040C = cpu->gpr[1]; - psx_taken_BFC3040C = (psx_brA_BFC3040C == psx_brB_BFC3040C); - psx_delay_BFC3040C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048410u); -#endif - if (psx_delay_BFC3040C) { - psx_delay_BFC3040C = 0; - if (psx_taken_BFC3040C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800483E8u); - goto label_BFC303E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048414u); - } -label_BFC30414: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30414u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30414: 03E00008 jr $ra */ - psx_delay_BFC30414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30418: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048418u); -#endif - if (psx_delay_BFC30414) { - psx_delay_BFC30414 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3041C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3041Cu); - int psx_delay_BFC30438 = 0; - int psx_taken_BFC30438 = 0; - int psx_delay_BFC30454 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30440u: goto label_BFC30440; - default: break; - } - } -label_BFC3041C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3041Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3041Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3041C: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004841Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30420: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC30424: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30428: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3042C: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004842Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30430: 2C410004 sltiu $at, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2C410004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80048430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30434: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30438: 1020001C beq $at, $zero, 0xBFC304AC */ - uint32_t psx_brA_BFC30438 = cpu->gpr[1]; uint32_t psx_brB_BFC30438 = cpu->gpr[0]; - psx_taken_BFC30438 = (psx_brA_BFC30438 == psx_brB_BFC30438); - psx_delay_BFC30438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3043C: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004843Cu); -#endif - if (psx_delay_BFC30438) { - psx_delay_BFC30438 = 0; - if (psx_taken_BFC30438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484ACu); - cpu->pc = 0x800484ACu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048440u); - } -label_BFC30440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC30440: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30444: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC30448: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048448u); -#endif - /* 0xBFC3044C: 8C2EADA0 lw $t6, -21088($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21088)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004844Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EADA0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004844Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC30454: 01C00008 jr $t6 */ - psx_delay_BFC30454 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048458u); -#endif - if (psx_delay_BFC30454) { - psx_delay_BFC30454 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } -} - -void SCPH1001_func_1FC3045C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3045Cu); - int psx_delay_BFC30468 = 0; -label_BFC3045C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3045Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3045C: A0860004 sb $a2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004845Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30460: A0870005 sb $a3, 5($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048460u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (5)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA0870005u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048460u); -#endif - /* 0xBFC30464: 87AF0010 lh $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048464u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30468: 03E00008 jr $ra */ - psx_delay_BFC30468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3046C: A08F0006 sb $t7, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004846Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08F0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004846Cu); -#endif - if (psx_delay_BFC30468) { - psx_delay_BFC30468 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30470(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30470u); - int psx_delay_BFC3047C = 0; -label_BFC30470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30470: A086000C sb $a2, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048470u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (12)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA086000Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30474: A087000D sb $a3, 13($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048474u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (13)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087000Du, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048474u); -#endif - /* 0xBFC30478: 87B80010 lh $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048478u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3047C: 03E00008 jr $ra */ - psx_delay_BFC3047C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC30480: A098000E sb $t8, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048480u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (14)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA098000Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048480u); -#endif - if (psx_delay_BFC3047C) { - psx_delay_BFC3047C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30484(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30484u); - int psx_delay_BFC30490 = 0; -label_BFC30484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30484: A0860014 sb $a2, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048484u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (20)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860014u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30488: A0870015 sb $a3, 21($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 21; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048488u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (21)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA0870015u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048488u); -#endif - /* 0xBFC3048C: 87B90010 lh $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004848Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004848Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30490: 03E00008 jr $ra */ - psx_delay_BFC30490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC30494: A0990016 sb $t9, 22($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 22; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048494u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (22)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990016u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048494u); -#endif - if (psx_delay_BFC30490) { - psx_delay_BFC30490 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30498(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30498u); - int psx_delay_BFC304A4 = 0; -label_BFC30498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30498: A086001C sb $a2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048498u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (28)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA086001Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC3049C: A087001D sb $a3, 29($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 29; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004849Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (29)), (uint8_t)(cpu->gpr[7] & 0xFFu)); - PGXP_STORE(0xA087001Du, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004849Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484A0u); -#endif - /* 0xBFC304A0: 87A80010 lh $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484A0u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800484A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC304A4: 03E00008 jr $ra */ - psx_delay_BFC304A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC304A8: A088001E sb $t0, 30($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800484A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (30)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA088001Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800484A8u); -#endif - if (psx_delay_BFC304A4) { - psx_delay_BFC304A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC304AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC304ACu); - int psx_delay_BFC304AC = 0; -label_BFC304AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC304AC: 03E00008 jr $ra */ - psx_delay_BFC304AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC304B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800484B0u); -#endif - if (psx_delay_BFC304AC) { - psx_delay_BFC304AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC304B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC304B4u); - int psx_delay_BFC304C8 = 0; - int psx_taken_BFC304C8 = 0; - int psx_delay_BFC304D4 = 0; - int psx_delay_BFC304E0 = 0; - int psx_delay_BFC304EC = 0; - int psx_delay_BFC304F4 = 0; - int psx_taken_BFC304F4 = 0; - int psx_delay_BFC304FC = 0; - int psx_taken_BFC304FC = 0; - int psx_delay_BFC30504 = 0; - int psx_taken_BFC30504 = 0; - int psx_delay_BFC3050C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC304D0u: goto label_BFC304D0; - case 0xBFC304DCu: goto label_BFC304DC; - case 0xBFC304E8u: goto label_BFC304E8; - case 0xBFC304F4u: goto label_BFC304F4; - case 0xBFC304FCu: goto label_BFC304FC; - case 0xBFC30504u: goto label_BFC30504; - case 0xBFC3050Cu: goto label_BFC3050C; - default: break; - } - } -label_BFC304B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC304B4: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC304B8: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC304BC: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC304C0: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC304C4: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC304C8: 1000000A beq $zero, $zero, 0xBFC304F4 */ - uint32_t psx_brA_BFC304C8 = cpu->gpr[0]; uint32_t psx_brB_BFC304C8 = cpu->gpr[0]; - psx_taken_BFC304C8 = (psx_brA_BFC304C8 == psx_brB_BFC304C8); - psx_delay_BFC304C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC304CC: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800484CCu); -#endif - if (psx_delay_BFC304C8) { - psx_delay_BFC304C8 = 0; - if (psx_taken_BFC304C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484F4u); - goto label_BFC304F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484D0u); - } -label_BFC304D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC304D0: A4860008 sh $a2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484D0u); return; } g_debug_last_store_pc = 0x800484D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800484D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC304D4: 03E00008 jr $ra */ - psx_delay_BFC304D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC304D8: A487000A sh $a3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484D8u); return; } g_debug_last_store_pc = 0x800484D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487000Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800484D8u); -#endif - if (psx_delay_BFC304D4) { - psx_delay_BFC304D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC304DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC304DC: A4860010 sh $a2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484DCu); return; } g_debug_last_store_pc = 0x800484DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800484DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC304E0: 03E00008 jr $ra */ - psx_delay_BFC304E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC304E4: A4870012 sh $a3, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484E4u); return; } g_debug_last_store_pc = 0x800484E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870012u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800484E4u); -#endif - if (psx_delay_BFC304E0) { - psx_delay_BFC304E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC304E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC304E8: A4860018 sh $a2, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484E8u); return; } g_debug_last_store_pc = 0x800484E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800484E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC304EC: 03E00008 jr $ra */ - psx_delay_BFC304EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC304F0: A487001A sh $a3, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800484F0u); return; } g_debug_last_store_pc = 0x800484F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487001Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800484F0u); -#endif - if (psx_delay_BFC304EC) { - psx_delay_BFC304EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC304F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC304F4: 10A0FFF6 beq $a1, $zero, 0xBFC304D0 */ - uint32_t psx_brA_BFC304F4 = cpu->gpr[5]; uint32_t psx_brB_BFC304F4 = cpu->gpr[0]; - psx_taken_BFC304F4 = (psx_brA_BFC304F4 == psx_brB_BFC304F4); - psx_delay_BFC304F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC304F8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800484F8u); -#endif - if (psx_delay_BFC304F4) { - psx_delay_BFC304F4 = 0; - if (psx_taken_BFC304F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484D0u); - goto label_BFC304D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484FCu); - } -label_BFC304FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC304FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC304FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800484FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC304FC: 10A1FFF7 beq $a1, $at, 0xBFC304DC */ - uint32_t psx_brA_BFC304FC = cpu->gpr[5]; uint32_t psx_brB_BFC304FC = cpu->gpr[1]; - psx_taken_BFC304FC = (psx_brA_BFC304FC == psx_brB_BFC304FC); - psx_delay_BFC304FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30500: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80048500u); -#endif - if (psx_delay_BFC304FC) { - psx_delay_BFC304FC = 0; - if (psx_taken_BFC304FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484DCu); - goto label_BFC304DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048504u); - } -label_BFC30504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC30504: 10A1FFF8 beq $a1, $at, 0xBFC304E8 */ - uint32_t psx_brA_BFC30504 = cpu->gpr[5]; uint32_t psx_brB_BFC30504 = cpu->gpr[1]; - psx_taken_BFC30504 = (psx_brA_BFC30504 == psx_brB_BFC30504); - psx_delay_BFC30504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30508: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048508u); -#endif - if (psx_delay_BFC30504) { - psx_delay_BFC30504 = 0; - if (psx_taken_BFC30504) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800484E8u); - goto label_BFC304E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004850Cu); - } -label_BFC3050C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3050Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3050Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004850Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3050C: 03E00008 jr $ra */ - psx_delay_BFC3050C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048510u); -#endif - if (psx_delay_BFC3050C) { - psx_delay_BFC3050C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30514(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30514u); - int psx_delay_BFC30530 = 0; - int psx_taken_BFC30530 = 0; - int psx_delay_BFC3054C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30538u: goto label_BFC30538; - default: break; - } - } -label_BFC30514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30514: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC30518: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3051C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30520: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30524: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30528: 2C410004 sltiu $at, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0); - PGXP_ALU(0x2C410004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80048528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3052C: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004852Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30530: 10200014 beq $at, $zero, 0xBFC30584 */ - uint32_t psx_brA_BFC30530 = cpu->gpr[1]; uint32_t psx_brB_BFC30530 = cpu->gpr[0]; - psx_taken_BFC30530 = (psx_brA_BFC30530 == psx_brB_BFC30530); - psx_delay_BFC30530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30534: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80048534u); -#endif - if (psx_delay_BFC30530) { - psx_delay_BFC30530 = 0; - if (psx_taken_BFC30530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048584u); - cpu->pc = 0x80048584u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048538u); - } -label_BFC30538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC30538: 00027080 sll $t6, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3053C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC30540: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048540u); -#endif - /* 0xBFC30544: 8C2EADB0 lw $t6, -21072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048544u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EADB0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30548: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3054C: 01C00008 jr $t6 */ - psx_delay_BFC3054C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30550: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048550u); -#endif - if (psx_delay_BFC3054C) { - psx_delay_BFC3054C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } -} - -void SCPH1001_func_1FC30554(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30554u); - int psx_delay_BFC30558 = 0; -label_BFC30554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30554: A4860008 sh $a2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048554u); return; } g_debug_last_store_pc = 0x80048554u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30558: 03E00008 jr $ra */ - psx_delay_BFC30558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC3055C: A487000A sh $a3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004855Cu); return; } g_debug_last_store_pc = 0x8004855Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487000Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004855Cu); -#endif - if (psx_delay_BFC30558) { - psx_delay_BFC30558 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30560(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30560u); - int psx_delay_BFC30564 = 0; -label_BFC30560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30560: A4860010 sh $a2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048560u); return; } g_debug_last_store_pc = 0x80048560u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860010u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30564: 03E00008 jr $ra */ - psx_delay_BFC30564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30568: A4870012 sh $a3, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048568u); return; } g_debug_last_store_pc = 0x80048568u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870012u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048568u); -#endif - if (psx_delay_BFC30564) { - psx_delay_BFC30564 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3056C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3056Cu); - int psx_delay_BFC30570 = 0; -label_BFC3056C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3056Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3056C: A4860018 sh $a2, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004856Cu); return; } g_debug_last_store_pc = 0x8004856Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30570: 03E00008 jr $ra */ - psx_delay_BFC30570 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30574: A487001A sh $a3, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048574u); return; } g_debug_last_store_pc = 0x80048574u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA487001Au, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048574u); -#endif - if (psx_delay_BFC30570) { - psx_delay_BFC30570 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30578(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30578u); - int psx_delay_BFC3057C = 0; -label_BFC30578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC30578: A4860020 sh $a2, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048578u); return; } g_debug_last_store_pc = 0x80048578u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3057C: 03E00008 jr $ra */ - psx_delay_BFC3057C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC30580: A4870022 sh $a3, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048580u); return; } g_debug_last_store_pc = 0x80048580u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870022u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048580u); -#endif - if (psx_delay_BFC3057C) { - psx_delay_BFC3057C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30584(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30584u); - int psx_delay_BFC30584 = 0; -label_BFC30584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30584: 03E00008 jr $ra */ - psx_delay_BFC30584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30588: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048588u); -#endif - if (psx_delay_BFC30584) { - psx_delay_BFC30584 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3058C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3058Cu); - int psx_delay_BFC305D4 = 0; - int psx_taken_BFC305D4 = 0; - int psx_delay_BFC305F8 = 0; - int psx_taken_BFC305F8 = 0; - int psx_delay_BFC3061C = 0; - int psx_taken_BFC3061C = 0; - int psx_delay_BFC30630 = 0; - int psx_taken_BFC30630 = 0; - int psx_delay_BFC30644 = 0; - int psx_taken_BFC30644 = 0; - int psx_delay_BFC30658 = 0; - int psx_taken_BFC30658 = 0; - int psx_delay_BFC30668 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC305DCu: goto label_BFC305DC; - case 0xBFC305E0u: goto label_BFC305E0; - case 0xBFC30600u: goto label_BFC30600; - case 0xBFC30604u: goto label_BFC30604; - case 0xBFC30624u: goto label_BFC30624; - case 0xBFC30628u: goto label_BFC30628; - case 0xBFC30638u: goto label_BFC30638; - case 0xBFC3063Cu: goto label_BFC3063C; - case 0xBFC3064Cu: goto label_BFC3064C; - case 0xBFC30650u: goto label_BFC30650; - case 0xBFC30660u: goto label_BFC30660; - case 0xBFC30664u: goto label_BFC30664; - default: break; - } - } -label_BFC3058C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3058Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3058Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004858Cu); -#endif - /* 0xBFC3058C: 848E0008 lh $t6, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004858Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004858Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048590u); -#endif - /* 0xBFC30590: 8499000A lh $t9, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048590u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8499000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC30594: 01C50019 multu $t6, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C50019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x80048594u); -#endif - /* 0xBFC30598: 848A0010 lh $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048598u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048598u); -#endif - /* 0xBFC3059C: 848D0012 lh $t5, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004859Cu); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x848D0012u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC305A0: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800485A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC305AC: 03250019 multu $t9, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03250019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800485ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC305B0: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800485B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC305BC: 01450019 multu $t2, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x01450019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800485BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC305C0: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800485C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC305CC: 01A50019 multu $t5, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[13] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[13])); -#endif - PGXP_MULDIV(0x01A50019u, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800485CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC305D0: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800485D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC305D4: 05E10002 bgez $t7, 0xBFC305E0 */ - uint32_t psx_brA_BFC305D4 = cpu->gpr[15]; - psx_taken_BFC305D4 = ((int32_t)psx_brA_BFC305D4 >= 0); - psx_delay_BFC305D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8003u); -#endif - /* 0xBFC305D8: 01E00821 addu $at, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800485D8u); -#endif - if (psx_delay_BFC305D4) { - psx_delay_BFC305D4 = 0; - if (psx_taken_BFC305D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800485E0u); - goto label_BFC305E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800485DCu); - } -label_BFC305DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC305DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC305DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC305DC: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800485DCu); -#endif -label_BFC305E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC305E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC305E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC305E0: 0001C303 sra $t8, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x0001C303u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800485E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC305E4: A4980008 sh $t8, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800485E4u); return; } g_debug_last_store_pc = 0x800485E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4980008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800485E4u); -#endif - /* 0xBFC305E8: 84980018 lh $t8, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800485E8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800485E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC305EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800485ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800485F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC305F0: 03050019 multu $t8, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[24] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[24])); -#endif - PGXP_MULDIV(0x03050019u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800485F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC305F4: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800485F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC305F8: 05010002 bgez $t0, 0xBFC30604 */ - uint32_t psx_brA_BFC305F8 = cpu->gpr[8]; - psx_taken_BFC305F8 = ((int32_t)psx_brA_BFC305F8 >= 0); - psx_delay_BFC305F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103u); -#endif - /* 0xBFC305FC: 01000821 addu $at, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800485FCu); -#endif - if (psx_delay_BFC305F8) { - psx_delay_BFC305F8 = 0; - if (psx_taken_BFC305F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048604u); - goto label_BFC30604; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048600u); - } -label_BFC30600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30600: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048600u); -#endif -label_BFC30604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC30604: 00014B03 sra $t1, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00014B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC30608: A489000A sh $t1, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048608u); return; } g_debug_last_store_pc = 0x80048608u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA489000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048608u); -#endif - /* 0xBFC3060C: 8489001A lh $t1, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004860Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8489001Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004860Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC30614: 01250019 multu $t1, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x01250019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x80048614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC30618: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3061C: 05610002 bgez $t3, 0xBFC30628 */ - uint32_t psx_brA_BFC3061C = cpu->gpr[11]; - psx_taken_BFC3061C = ((int32_t)psx_brA_BFC3061C >= 0); - psx_delay_BFC3061C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC30620: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048620u); -#endif - if (psx_delay_BFC3061C) { - psx_delay_BFC3061C = 0; - if (psx_taken_BFC3061C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048628u); - goto label_BFC30628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048624u); - } -label_BFC30624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30624: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048624u); -#endif -label_BFC30628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC30628: 00016303 sra $t4, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00016303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC3062C: A48C0010 sh $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004862Cu); return; } g_debug_last_store_pc = 0x8004862Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA48C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004862Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC30630: 05C10002 bgez $t6, 0xBFC3063C */ - uint32_t psx_brA_BFC30630 = cpu->gpr[14]; - psx_taken_BFC30630 = ((int32_t)psx_brA_BFC30630 >= 0); - psx_delay_BFC30630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC30634: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048634u); -#endif - if (psx_delay_BFC30630) { - psx_delay_BFC30630 = 0; - if (psx_taken_BFC30630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004863Cu); - goto label_BFC3063C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048638u); - } -label_BFC30638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30638: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048638u); -#endif -label_BFC3063C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3063Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3063Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3063C: 00017B03 sra $t7, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00017B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC30640: A48F0012 sh $t7, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048640u); return; } g_debug_last_store_pc = 0x80048640u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F0012u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC30644: 07210002 bgez $t9, 0xBFC30650 */ - uint32_t psx_brA_BFC30644 = cpu->gpr[25]; - psx_taken_BFC30644 = ((int32_t)psx_brA_BFC30644 >= 0); - psx_delay_BFC30644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000003u); -#endif - /* 0xBFC30648: 03200821 addu $at, $t9, $zero */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[25] + cpu->gpr[0]; - PGXP_ALU(0x03200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048648u); -#endif - if (psx_delay_BFC30644) { - psx_delay_BFC30644 = 0; - if (psx_taken_BFC30644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048650u); - goto label_BFC30650; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004864Cu); - } -label_BFC3064C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3064Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3064Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004864Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3064C: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004864Cu); -#endif -label_BFC30650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC30650: 00014303 sra $t0, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00014303u, cpu->gpr[8], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC30654: A4880018 sh $t0, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048654u); return; } g_debug_last_store_pc = 0x80048654u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4880018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC30658: 05410002 bgez $t2, 0xBFC30664 */ - uint32_t psx_brA_BFC30658 = cpu->gpr[10]; - psx_taken_BFC30658 = ((int32_t)psx_brA_BFC30658 >= 0); - psx_delay_BFC30658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC3065C: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004865Cu); -#endif - if (psx_delay_BFC30658) { - psx_delay_BFC30658 = 0; - if (psx_taken_BFC30658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048664u); - goto label_BFC30664; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048660u); - } -label_BFC30660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30660: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048660u); -#endif -label_BFC30664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC30664: 00015B03 sra $t3, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00015B03u, cpu->gpr[11], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30668: 03E00008 jr $ra */ - psx_delay_BFC30668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3066C: A48B001A sh $t3, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004866Cu); return; } g_debug_last_store_pc = 0x8004866Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B001Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004866Cu); -#endif - if (psx_delay_BFC30668) { - psx_delay_BFC30668 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30670(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30670u); - int psx_delay_BFC306B8 = 0; - int psx_taken_BFC306B8 = 0; - int psx_delay_BFC306DC = 0; - int psx_taken_BFC306DC = 0; - int psx_delay_BFC30700 = 0; - int psx_taken_BFC30700 = 0; - int psx_delay_BFC30724 = 0; - int psx_taken_BFC30724 = 0; - int psx_delay_BFC30748 = 0; - int psx_taken_BFC30748 = 0; - int psx_delay_BFC3075C = 0; - int psx_taken_BFC3075C = 0; - int psx_delay_BFC30770 = 0; - int psx_taken_BFC30770 = 0; - int psx_delay_BFC30784 = 0; - int psx_taken_BFC30784 = 0; - int psx_delay_BFC30794 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC306C0u: goto label_BFC306C0; - case 0xBFC306C4u: goto label_BFC306C4; - case 0xBFC306E4u: goto label_BFC306E4; - case 0xBFC306E8u: goto label_BFC306E8; - case 0xBFC30708u: goto label_BFC30708; - case 0xBFC3070Cu: goto label_BFC3070C; - case 0xBFC3072Cu: goto label_BFC3072C; - case 0xBFC30730u: goto label_BFC30730; - case 0xBFC30750u: goto label_BFC30750; - case 0xBFC30754u: goto label_BFC30754; - case 0xBFC30764u: goto label_BFC30764; - case 0xBFC30768u: goto label_BFC30768; - case 0xBFC30778u: goto label_BFC30778; - case 0xBFC3077Cu: goto label_BFC3077C; - case 0xBFC3078Cu: goto label_BFC3078C; - case 0xBFC30790u: goto label_BFC30790; - default: break; - } - } -label_BFC30670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048670u); -#endif - /* 0xBFC30670: 848E0008 lh $t6, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048670u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048670u); -#endif - /* 0xBFC30674: 8499000A lh $t9, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048674u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8499000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC30678: 01C50019 multu $t6, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[14] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[14])); -#endif - PGXP_MULDIV(0x01C50019u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x80048678u); -#endif - /* 0xBFC3067C: 848A0010 lh $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004867Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004867Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048680u); -#endif - /* 0xBFC30680: 848D0012 lh $t5, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048680u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x848D0012u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC30684: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30688: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3068C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004868Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC30690: 03250019 multu $t9, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03250019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x80048690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC30694: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3069C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004869Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC306A0: 01450019 multu $t2, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x01450019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800486A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC306A4: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800486A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC306A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800486A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC306AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800486ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC306B0: 01A50019 multu $t5, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[13] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[13])); -#endif - PGXP_MULDIV(0x01A50019u, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800486B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC306B4: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800486B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC306B8: 05E10002 bgez $t7, 0xBFC306C4 */ - uint32_t psx_brA_BFC306B8 = cpu->gpr[15]; - psx_taken_BFC306B8 = ((int32_t)psx_brA_BFC306B8 >= 0); - psx_delay_BFC306B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8003u); -#endif - /* 0xBFC306BC: 01E00821 addu $at, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800486BCu); -#endif - if (psx_delay_BFC306B8) { - psx_delay_BFC306B8 = 0; - if (psx_taken_BFC306B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800486C4u); - goto label_BFC306C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800486C0u); - } -label_BFC306C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC306C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC306C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC306C0: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800486C0u); -#endif -label_BFC306C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC306C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC306C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC306C4: 0001C303 sra $t8, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x0001C303u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800486C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC306C8: A4980008 sh $t8, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800486C8u); return; } g_debug_last_store_pc = 0x800486C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4980008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800486C8u); -#endif - /* 0xBFC306CC: 84980018 lh $t8, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800486CCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800486CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC306D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800486D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC306D4: 03050019 multu $t8, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[24] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[24])); -#endif - PGXP_MULDIV(0x03050019u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800486D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC306D8: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800486D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC306DC: 05010002 bgez $t0, 0xBFC306E8 */ - uint32_t psx_brA_BFC306DC = cpu->gpr[8]; - psx_taken_BFC306DC = ((int32_t)psx_brA_BFC306DC >= 0); - psx_delay_BFC306DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103u); -#endif - /* 0xBFC306E0: 01000821 addu $at, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800486E0u); -#endif - if (psx_delay_BFC306DC) { - psx_delay_BFC306DC = 0; - if (psx_taken_BFC306DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800486E8u); - goto label_BFC306E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800486E4u); - } -label_BFC306E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC306E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC306E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC306E4: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800486E4u); -#endif -label_BFC306E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC306E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC306E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC306E8: 00014B03 sra $t1, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00014B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800486E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC306EC: A489000A sh $t1, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800486ECu); return; } g_debug_last_store_pc = 0x800486ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA489000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800486ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800486F0u); -#endif - /* 0xBFC306F0: 8489001A lh $t1, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800486F0u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8489001Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800486F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC306F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800486F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC306F8: 01250019 multu $t1, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x01250019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x800486F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC306FC: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800486FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC30700: 05610002 bgez $t3, 0xBFC3070C */ - uint32_t psx_brA_BFC30700 = cpu->gpr[11]; - psx_taken_BFC30700 = ((int32_t)psx_brA_BFC30700 >= 0); - psx_delay_BFC30700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC30704: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048704u); -#endif - if (psx_delay_BFC30700) { - psx_delay_BFC30700 = 0; - if (psx_taken_BFC30700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004870Cu); - goto label_BFC3070C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048708u); - } -label_BFC30708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30708: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048708u); -#endif -label_BFC3070C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3070Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3070Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004870Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3070C: 00016303 sra $t4, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00016303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004870Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC30710: A48C0010 sh $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048710u); return; } g_debug_last_store_pc = 0x80048710u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA48C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048710u); -#endif - /* 0xBFC30714: 848C0020 lh $t4, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048714u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x848C0020u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30718: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC3071C: 01850019 multu $t4, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[12] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[12])); -#endif - PGXP_MULDIV(0x01850019u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004871Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC30720: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC30724: 05C10002 bgez $t6, 0xBFC30730 */ - uint32_t psx_brA_BFC30724 = cpu->gpr[14]; - psx_taken_BFC30724 = ((int32_t)psx_brA_BFC30724 >= 0); - psx_delay_BFC30724 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC30728: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048728u); -#endif - if (psx_delay_BFC30724) { - psx_delay_BFC30724 = 0; - if (psx_taken_BFC30724) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048730u); - goto label_BFC30730; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004872Cu); - } -label_BFC3072C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3072Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3072Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004872Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3072C: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004872Cu); -#endif -label_BFC30730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC30730: 00017B03 sra $t7, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00017B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC30734: A48F0012 sh $t7, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048734u); return; } g_debug_last_store_pc = 0x80048734u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F0012u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048734u); -#endif - /* 0xBFC30738: 848F0022 lh $t7, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048738u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0022u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3073C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004873Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC30740: 01E50019 multu $t7, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[15] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[15])); -#endif - PGXP_MULDIV(0x01E50019u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x80048740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC30744: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC30748: 07210002 bgez $t9, 0xBFC30754 */ - uint32_t psx_brA_BFC30748 = cpu->gpr[25]; - psx_taken_BFC30748 = ((int32_t)psx_brA_BFC30748 >= 0); - psx_delay_BFC30748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000003u); -#endif - /* 0xBFC3074C: 03200821 addu $at, $t9, $zero */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[25] + cpu->gpr[0]; - PGXP_ALU(0x03200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004874Cu); -#endif - if (psx_delay_BFC30748) { - psx_delay_BFC30748 = 0; - if (psx_taken_BFC30748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048754u); - goto label_BFC30754; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048750u); - } -label_BFC30750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30750: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048750u); -#endif -label_BFC30754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC30754: 00014303 sra $t0, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00014303u, cpu->gpr[8], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC30758: A4880018 sh $t0, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048758u); return; } g_debug_last_store_pc = 0x80048758u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4880018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3075C: 05410002 bgez $t2, 0xBFC30768 */ - uint32_t psx_brA_BFC3075C = cpu->gpr[10]; - psx_taken_BFC3075C = ((int32_t)psx_brA_BFC3075C >= 0); - psx_delay_BFC3075C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC30760: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048760u); -#endif - if (psx_delay_BFC3075C) { - psx_delay_BFC3075C = 0; - if (psx_taken_BFC3075C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048768u); - goto label_BFC30768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048764u); - } -label_BFC30764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30764: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048764u); -#endif -label_BFC30768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC30768: 00015B03 sra $t3, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00015B03u, cpu->gpr[11], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3076C: A48B001A sh $t3, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004876Cu); return; } g_debug_last_store_pc = 0x8004876Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B001Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004876Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC30770: 05A10002 bgez $t5, 0xBFC3077C */ - uint32_t psx_brA_BFC30770 = cpu->gpr[13]; - psx_taken_BFC30770 = ((int32_t)psx_brA_BFC30770 >= 0); - psx_delay_BFC30770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2003u); -#endif - /* 0xBFC30774: 01A00821 addu $at, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048774u); -#endif - if (psx_delay_BFC30770) { - psx_delay_BFC30770 = 0; - if (psx_taken_BFC30770) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004877Cu); - goto label_BFC3077C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048778u); - } -label_BFC30778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30778: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048778u); -#endif -label_BFC3077C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3077Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004877Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3077C: 00017303 sra $t6, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x00017303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004877Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC30780: A48E0020 sh $t6, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048780u); return; } g_debug_last_store_pc = 0x80048780u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48E0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC30784: 07010002 bgez $t8, 0xBFC30790 */ - uint32_t psx_brA_BFC30784 = cpu->gpr[24]; - psx_taken_BFC30784 = ((int32_t)psx_brA_BFC30784 >= 0); - psx_delay_BFC30784 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000003u); -#endif - /* 0xBFC30788: 03000821 addu $at, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048788u); -#endif - if (psx_delay_BFC30784) { - psx_delay_BFC30784 = 0; - if (psx_taken_BFC30784) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048790u); - goto label_BFC30790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004878Cu); - } -label_BFC3078C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3078Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004878Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3078C: 24210FFF addiu $at, $at, 4095 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (4095)); - PGXP_ALU(0x24210FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004878Cu); -#endif -label_BFC30790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC30790: 0001CB03 sra $t9, $at, 12 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 12u); - PGXP_ALU(0x0001CB03u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80048790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30794: 03E00008 jr $ra */ - psx_delay_BFC30794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC30798: A4990022 sh $t9, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048798u); return; } g_debug_last_store_pc = 0x80048798u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4990022u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048798u); -#endif - if (psx_delay_BFC30794) { - psx_delay_BFC30794 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3079C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3079Cu); - int psx_delay_BFC307B8 = 0; - int psx_delay_BFC307CC = 0; - int psx_delay_BFC30860 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC307C0u: goto label_BFC307C0; - case 0xBFC307D4u: goto label_BFC307D4; - default: break; - } - } -label_BFC3079C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3079Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3079Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004879Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3079C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004879Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC307A0: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC307A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487A4u); return; } g_debug_last_store_pc = 0x800487A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800487A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC307A8: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC307AC: AFA70018 sw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487ACu); return; } g_debug_last_store_pc = 0x800487ACu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800487ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC307B0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC307B4: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487B4u); return; } g_debug_last_store_pc = 0x800487B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800487B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC307B8: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x800487C0u; /* jal link before delay slot */ - psx_delay_BFC307B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC307BC: 2406001C addiu $a2, $zero, 28 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); - PGXP_ALU(0x2406001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800487BCu); -#endif - if (psx_delay_BFC307B8) { - psx_delay_BFC307B8 = 0; - cpu->gpr[31] = 0x800487C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC307C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC307C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC307C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487C0u); -#endif - /* 0xBFC307C0: 8FA70018 lw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487C0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800487C0u); -#endif - /* 0xBFC307C4: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800487C4u); -#endif - /* 0xBFC307C8: 8CE50008 lw $a1, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487C8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x80u); } - PGXP_LOAD(0x8CE50008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800487C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC307CC: 0C012163 jal 0xB004858C */ - cpu->gpr[31] = 0x800487D4u; /* jal link before delay slot */ - psx_delay_BFC307CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC307D0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487D0u); -#endif - if (psx_delay_BFC307CC) { - psx_delay_BFC307CC = 0; - cpu->gpr[31] = 0x800487D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004858Cu); - cpu->pc = 0x8004858Cu; return; - } -label_BFC307D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC307D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC307D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487D4u); -#endif - /* 0xBFC307D4: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800487D4u); -#endif - /* 0xBFC307D8: 8FA70018 lw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800487D8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800487D8u); -#endif - /* 0xBFC307DC: 846E0008 lh $t6, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487DCu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800487DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487E0u); -#endif - /* 0xBFC307E0: 84EF0002 lh $t7, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487E0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x84EF0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800487E0u); -#endif - /* 0xBFC307E4: 8468000A lh $t0, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487E4u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8468000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800487E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC307E8: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC307EC: 27190140 addiu $t9, $t8, 320 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (320)); - PGXP_ALU(0x27190140u, cpu->gpr[25], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x800487ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800487F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC307F0: A4790008 sh $t9, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487F0u); return; } g_debug_last_store_pc = 0x800487F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4790008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800487F0u); -#endif - /* 0xBFC307F4: 84E90004 lh $t1, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487F4u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x80u); } - PGXP_LOAD(0x84E90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800487F4u); -#endif - /* 0xBFC307F8: 846C0010 lh $t4, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800487F8u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x846C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800487F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC307FC: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800487FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC30800: 254B00F0 addiu $t3, $t2, 240 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (240)); - PGXP_ALU(0x254B00F0u, cpu->gpr[11], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC30804: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048804u); return; } g_debug_last_store_pc = 0x80048804u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048804u); -#endif - /* 0xBFC30808: 84ED0002 lh $t5, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048808u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x80u); } - PGXP_LOAD(0x84ED0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048808u); -#endif - /* 0xBFC3080C: 84780012 lh $t8, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004880Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780012u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004880Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC30810: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC30814: 25CF0140 addiu $t7, $t6, 320 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (320)); - PGXP_ALU(0x25CF0140u, cpu->gpr[15], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80048814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC30818: A46F0010 sh $t7, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048818u); return; } g_debug_last_store_pc = 0x80048818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048818u); -#endif - /* 0xBFC3081C: 84F90004 lh $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004881Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x84F90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048820u); -#endif - /* 0xBFC30820: 846A0018 lh $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048820u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC30824: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC30828: 250900F0 addiu $t1, $t0, 240 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (240)); - PGXP_ALU(0x250900F0u, cpu->gpr[9], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3082C: A4690012 sh $t1, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004882Cu); return; } g_debug_last_store_pc = 0x8004882Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690012u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004882Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048830u); -#endif - /* 0xBFC30830: 84EB0002 lh $t3, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048830u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x80u); } - PGXP_LOAD(0x84EB0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048830u); -#endif - /* 0xBFC30834: 846E001A lh $t6, 26($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048834u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E001Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC30838: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3083C: 258D0140 addiu $t5, $t4, 320 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (320)); - PGXP_ALU(0x258D0140u, cpu->gpr[13], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x8004883Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC30840: A46D0018 sh $t5, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048840u); return; } g_debug_last_store_pc = 0x80048840u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048840u); -#endif - /* 0xBFC30844: 84EF0004 lh $t7, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048844u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x84EF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC3084C: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004884Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC30850: 271900F0 addiu $t9, $t8, 240 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (240)); - PGXP_ALU(0x271900F0u, cpu->gpr[25], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC30854: A479001A sh $t9, 26($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048854u); return; } g_debug_last_store_pc = 0x80048854u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479001Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048854u); -#endif - /* 0xBFC30858: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048858u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3085C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30860: 03E00008 jr $ra */ - psx_delay_BFC30860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30864: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048864u); -#endif - if (psx_delay_BFC30860) { - psx_delay_BFC30860 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30868(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30868u); - int psx_delay_BFC30884 = 0; - int psx_delay_BFC30898 = 0; - int psx_delay_BFC30954 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3088Cu: goto label_BFC3088C; - case 0xBFC308A0u: goto label_BFC308A0; - default: break; - } - } -label_BFC30868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30868: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80048868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC3086C: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30870: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048870u); return; } g_debug_last_store_pc = 0x80048870u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC30874: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC30878: AFA70018 sw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048878u); return; } g_debug_last_store_pc = 0x80048878u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3087C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC30880: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048880u); return; } g_debug_last_store_pc = 0x80048880u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30884: 0C00C22D jal 0xB00308B4 */ - cpu->gpr[31] = 0x8004888Cu; /* jal link before delay slot */ - psx_delay_BFC30884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC30888: 24060024 addiu $a2, $zero, 36 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); - PGXP_ALU(0x24060024u, cpu->gpr[6], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80048888u); -#endif - if (psx_delay_BFC30884) { - psx_delay_BFC30884 = 0; - cpu->gpr[31] = 0x8004888Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800308B4u); - cpu->pc = 0x800308B4u; return; - } -label_BFC3088C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3088Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3088Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004888Cu); -#endif - /* 0xBFC3088C: 8FA70018 lw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004888Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004888Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048890u); -#endif - /* 0xBFC30890: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048890u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048890u); -#endif - /* 0xBFC30894: 8CE50008 lw $a1, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048894u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x80u); } - PGXP_LOAD(0x8CE50008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80048894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30898: 0C01219C jal 0xB0048670 */ - cpu->gpr[31] = 0x800488A0u; /* jal link before delay slot */ - psx_delay_BFC30898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3089C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004889Cu); -#endif - if (psx_delay_BFC30898) { - psx_delay_BFC30898 = 0; - cpu->gpr[31] = 0x800488A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048670u); - cpu->pc = 0x80048670u; return; - } -label_BFC308A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC308A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC308A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488A0u); -#endif - /* 0xBFC308A0: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800488A0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800488A0u); -#endif - /* 0xBFC308A4: 8FA70018 lw $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800488A4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800488A4u); -#endif - /* 0xBFC308A8: 846E0008 lh $t6, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488A8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800488A8u); -#endif - /* 0xBFC308AC: 84EF0002 lh $t7, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488ACu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x84EF0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800488ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488B0u); -#endif - /* 0xBFC308B0: 8468000A lh $t0, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488B0u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8468000Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800488B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC308B4: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800488B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC308B8: 27190140 addiu $t9, $t8, 320 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (320)); - PGXP_ALU(0x27190140u, cpu->gpr[25], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x800488B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC308BC: A4790008 sh $t9, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488BCu); return; } g_debug_last_store_pc = 0x800488BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4790008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800488BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488C0u); -#endif - /* 0xBFC308C0: 84E90004 lh $t1, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488C0u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x80u); } - PGXP_LOAD(0x84E90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800488C0u); -#endif - /* 0xBFC308C4: 846C0010 lh $t4, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488C4u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x846C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800488C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC308C8: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800488C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC308CC: 254B00F0 addiu $t3, $t2, 240 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (240)); - PGXP_ALU(0x254B00F0u, cpu->gpr[11], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800488CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC308D0: A46B000A sh $t3, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488D0u); return; } g_debug_last_store_pc = 0x800488D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800488D0u); -#endif - /* 0xBFC308D4: 84ED0002 lh $t5, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488D4u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x80u); } - PGXP_LOAD(0x84ED0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800488D4u); -#endif - /* 0xBFC308D8: 84780012 lh $t8, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488D8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780012u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800488D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC308DC: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800488DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC308E0: 25CF0140 addiu $t7, $t6, 320 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (320)); - PGXP_ALU(0x25CF0140u, cpu->gpr[15], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x800488E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC308E4: A46F0010 sh $t7, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488E4u); return; } g_debug_last_store_pc = 0x800488E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800488E4u); -#endif - /* 0xBFC308E8: 84F90004 lh $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488E8u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x84F90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800488E8u); -#endif - /* 0xBFC308EC: 846A0018 lh $t2, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488ECu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800488ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800488F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC308F0: 03194021 addu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800488F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC308F4: 250900F0 addiu $t1, $t0, 240 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (240)); - PGXP_ALU(0x250900F0u, cpu->gpr[9], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800488F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC308F8: A4690012 sh $t1, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488F8u); return; } g_debug_last_store_pc = 0x800488F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690012u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800488F8u); -#endif - /* 0xBFC308FC: 84EB0002 lh $t3, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800488FCu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x80u); } - PGXP_LOAD(0x84EB0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800488FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048900u); -#endif - /* 0xBFC30900: 846E001A lh $t6, 26($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048900u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E001Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC30904: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC30908: 258D0140 addiu $t5, $t4, 320 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (320)); - PGXP_ALU(0x258D0140u, cpu->gpr[13], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80048908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3090C: A46D0018 sh $t5, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004890Cu); return; } g_debug_last_store_pc = 0x8004890Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA46D0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004890Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048910u); -#endif - /* 0xBFC30910: 84EF0004 lh $t7, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048910u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x84EF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048910u); -#endif - /* 0xBFC30914: 84680020 lh $t0, 32($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048914u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x84680020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC30918: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3091C: 271900F0 addiu $t9, $t8, 240 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (240)); - PGXP_ALU(0x271900F0u, cpu->gpr[25], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004891Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC30920: A479001A sh $t9, 26($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048920u); return; } g_debug_last_store_pc = 0x80048920u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA479001Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048920u); -#endif - /* 0xBFC30924: 84E90002 lh $t1, 2($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048924u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x80u); } - PGXP_LOAD(0x84E90002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048924u); -#endif - /* 0xBFC30928: 846C0022 lh $t4, 34($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 34; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048928u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x846C0022u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC3092C: 01095021 addu $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004892Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC30930: 254B0140 addiu $t3, $t2, 320 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (320)); - PGXP_ALU(0x254B0140u, cpu->gpr[11], _pgx1, 0x00000140u); } -#ifdef PSX_COSIM - cosim_instr(0x80048930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC30934: A46B0020 sh $t3, 32($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048934u); return; } g_debug_last_store_pc = 0x80048934u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA46B0020u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048934u); -#endif - /* 0xBFC30938: 84ED0004 lh $t5, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048938u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x80u); } - PGXP_LOAD(0x84ED0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3093C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004893Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC30940: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC30944: 25CF00F0 addiu $t7, $t6, 240 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (240)); - PGXP_ALU(0x25CF00F0u, cpu->gpr[15], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC30948: A46F0022 sh $t7, 34($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048948u); return; } g_debug_last_store_pc = 0x80048948u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA46F0022u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048948u); -#endif - /* 0xBFC3094C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004894Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004894Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30950: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80048950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30954: 03E00008 jr $ra */ - psx_delay_BFC30954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30958: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048958u); -#endif - if (psx_delay_BFC30954) { - psx_delay_BFC30954 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30960(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30960u); - int psx_delay_BFC30990 = 0; - int psx_delay_BFC309A0 = 0; - int psx_delay_BFC309C4 = 0; - int psx_delay_BFC30A0C = 0; - int psx_delay_BFC30A18 = 0; - int psx_delay_BFC30A78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30998u: goto label_BFC30998; - case 0xBFC309A8u: goto label_BFC309A8; - case 0xBFC309CCu: goto label_BFC309CC; - case 0xBFC30A14u: goto label_BFC30A14; - case 0xBFC30A20u: goto label_BFC30A20; - default: break; - } - } -label_BFC30960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30960: 27BDFF58 addiu $sp, $sp, -168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-168)); - PGXP_ALU(0x27BDFF58u, cpu->gpr[29], _pgx1, 0xFFFFFF58u); } -#ifdef PSX_COSIM - cosim_instr(0x80048960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30964: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048964u); return; } g_debug_last_store_pc = 0x80048964u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30968: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048968u); return; } g_debug_last_store_pc = 0x80048968u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3096C: AFA500AC sw $a1, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004896Cu); return; } g_debug_last_store_pc = 0x8004896Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA500ACu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004896Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC30970: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC30974: AFA600B0 sw $a2, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048974u); return; } g_debug_last_store_pc = 0x80048974u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA600B0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80048974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC30978: AFA700B4 sw $a3, 180($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 180; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (180)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048978u); return; } g_debug_last_store_pc = 0x80048978u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80048978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3097C: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30980: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048980u); return; } g_debug_last_store_pc = 0x80048980u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC30984: 24070348 addiu $a3, $zero, 840 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (840)); - PGXP_ALU(0x24070348u, cpu->gpr[7], _pgx1, 0x00000348u); } -#ifdef PSX_COSIM - cosim_instr(0x80048984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC30988: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3098C: 27A4004C addiu $a0, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A4004Cu, cpu->gpr[4], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004898Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30990: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80048998u; /* jal link before delay slot */ - psx_delay_BFC30990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC30994: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048994u); -#endif - if (psx_delay_BFC30990) { - psx_delay_BFC30990 = 0; - cpu->gpr[31] = 0x80048998u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC30998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC30998: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3099C: A3AF0063 sb $t7, 99($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 99; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004899Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (99)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0063u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004899Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC309A0: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x800489A8u; /* jal link before delay slot */ - psx_delay_BFC309A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC309A4: 27A4004C addiu $a0, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A4004Cu, cpu->gpr[4], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800489A4u); -#endif - if (psx_delay_BFC309A0) { - psx_delay_BFC309A0 = 0; - cpu->gpr[31] = 0x800489A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC309A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC309A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC309A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489A8u); -#endif - /* 0xBFC309A8: 8FB900AC lw $t9, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800489A8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB900ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800489A8u); -#endif - /* 0xBFC309AC: 8FA800B0 lw $t0, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800489ACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800B0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800489ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC309B0: A7A00036 sh $zero, 54($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 54; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489B0u); return; } g_debug_last_store_pc = 0x800489B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00036u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800489B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC309B4: 24180280 addiu $t8, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24180280u, cpu->gpr[24], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800489B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC309B8: A7B80034 sh $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489B8u); return; } g_debug_last_store_pc = 0x800489B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800489B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC309BC: A7B90038 sh $t9, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489BCu); return; } g_debug_last_store_pc = 0x800489BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800489BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC309C0: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800489C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC309C4: 0C0146E9 jal 0xB0051BA4 */ - cpu->gpr[31] = 0x800489CCu; /* jal link before delay slot */ - psx_delay_BFC309C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC309C8: A7A8003A sh $t0, 58($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 58; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489C8u); return; } g_debug_last_store_pc = 0x800489C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A8003Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800489C8u); -#endif - if (psx_delay_BFC309C4) { - psx_delay_BFC309C4 = 0; - cpu->gpr[31] = 0x800489CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051BA4u); - cpu->pc = 0x80051BA4u; return; - } -label_BFC309CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC309CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC309CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489CCu); -#endif - /* 0xBFC309CC: 87A90034 lh $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489CCu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800489CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489D0u); -#endif - /* 0xBFC309D0: 87AA0036 lh $t2, 54($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 54; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489D0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0036u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800489D0u); -#endif - /* 0xBFC309D4: 87AB0038 lh $t3, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489D4u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB0038u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800489D4u); -#endif - /* 0xBFC309D8: 87AC003A lh $t4, 58($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 58; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489D8u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC003Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800489D8u); -#endif - /* 0xBFC309DC: 8FA200B4 lw $v0, 180($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 180; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (180)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800489DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200B4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800489DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC309E0: A7A90044 sh $t1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489E0u); return; } g_debug_last_store_pc = 0x800489E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90044u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800489E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC309E4: A7AA0046 sh $t2, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489E4u); return; } g_debug_last_store_pc = 0x800489E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0046u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800489E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC309E8: A7AB0048 sh $t3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489E8u); return; } g_debug_last_store_pc = 0x800489E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0048u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800489E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC309EC: A7AC004A sh $t4, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800489ECu); return; } g_debug_last_store_pc = 0x800489ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC004Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800489ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800489F0u); -#endif - /* 0xBFC309F0: 904D0000 lbu $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 13, 0x4u); - PGXP_LOAD(0x904D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800489F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC309F4: 27A4003C addiu $a0, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A4003Cu, cpu->gpr[4], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800489F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC309F8: A3AD0040 sb $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800489F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (64)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800489F8u); -#endif - /* 0xBFC309FC: 904E0001 lbu $t6, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 14, 0x4u); - PGXP_LOAD(0x904E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800489FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30A04: A3AE0041 sb $t6, 65($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 65; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048A04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (65)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE0041u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A04u); -#endif - /* 0xBFC30A08: 904F0002 lbu $t7, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 15, 0x4u); - PGXP_LOAD(0x904F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30A0C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048A14u; /* jal link before delay slot */ - psx_delay_BFC30A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC30A10: A3AF0042 sb $t7, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048A10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (66)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0042u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A10u); -#endif - if (psx_delay_BFC30A0C) { - psx_delay_BFC30A0C = 0; - cpu->gpr[31] = 0x80048A14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30A14: 27A40034 addiu $a0, $sp, 52 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (52)); - PGXP_ALU(0x27A40034u, cpu->gpr[4], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30A18: 0C013C4C jal 0xB004F130 */ - cpu->gpr[31] = 0x80048A20u; /* jal link before delay slot */ - psx_delay_BFC30A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC30A1C: 26050014 addiu $a1, $s0, 20 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (20)); - PGXP_ALU(0x26050014u, cpu->gpr[5], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A1Cu); -#endif - if (psx_delay_BFC30A18) { - psx_delay_BFC30A18 = 0; - cpu->gpr[31] = 0x80048A20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F130u); - cpu->pc = 0x8004F130u; return; - } -label_BFC30A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC30A20: 24180010 addiu $t8, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24180010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC30A24: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC30A28: AE180000 sw $t8, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A28u); return; } g_debug_last_store_pc = 0x80048A28u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE180000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC30A2C: AE190004 sw $t9, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A2Cu); return; } g_debug_last_store_pc = 0x80048A2Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAE190004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC30A30: A600000C sh $zero, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048A30u); return; } g_debug_last_store_pc = 0x80048A30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC30A34: A600000E sh $zero, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048A34u); return; } g_debug_last_store_pc = 0x80048A34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A34u); -#endif - /* 0xBFC30A38: 8FA800AC lw $t0, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A38u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30A3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC30A40: A6080010 sh $t0, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048A40u); return; } g_debug_last_store_pc = 0x80048A40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA6080010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A40u); -#endif - /* 0xBFC30A44: 8FA900B0 lw $t1, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A44u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA900B0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30A48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC30A4C: A6090012 sh $t1, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048A4Cu); return; } g_debug_last_store_pc = 0x80048A4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090012u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A50u); -#endif - /* 0xBFC30A50: 8FAB00B0 lw $t3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A50u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB00B0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A50u); -#endif - /* 0xBFC30A54: 8FAA00AC lw $t2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A54u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30A58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC30A5C: 014B0019 multu $t2, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014B0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x80048A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC30A60: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC30A64: 000C6840 sll $t5, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC30A68: 25AE000C addiu $t6, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (12)); - PGXP_ALU(0x25AE000Cu, cpu->gpr[14], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80048A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC30A6C: AE0E0008 sw $t6, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A6Cu); return; } g_debug_last_store_pc = 0x80048A6Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE0E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A70u); -#endif - /* 0xBFC30A70: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A70u); -#endif - /* 0xBFC30A74: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A74u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30A78: 03E00008 jr $ra */ - psx_delay_BFC30A78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30A7C: 27BD00A8 addiu $sp, $sp, 168 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (168)); - PGXP_ALU(0x27BD00A8u, cpu->gpr[29], _pgx1, 0x000000A8u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A7Cu); -#endif - if (psx_delay_BFC30A78) { - psx_delay_BFC30A78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30A80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30A80u); - int psx_delay_BFC30ACC = 0; - int psx_delay_BFC30AE0 = 0; - int psx_delay_BFC30B04 = 0; - int psx_delay_BFC30BD0 = 0; - int psx_delay_BFC30BD8 = 0; - int psx_delay_BFC30C10 = 0; - int psx_delay_BFC30C3C = 0; - int psx_delay_BFC30C7C = 0; - int psx_delay_BFC30CAC = 0; - int psx_delay_BFC30CE0 = 0; - int psx_delay_BFC30D0C = 0; - int psx_delay_BFC30D48 = 0; - int psx_delay_BFC30D78 = 0; - int psx_delay_BFC30D84 = 0; - int psx_delay_BFC30DE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30AD4u: goto label_BFC30AD4; - case 0xBFC30AE8u: goto label_BFC30AE8; - case 0xBFC30B0Cu: goto label_BFC30B0C; - case 0xBFC30BD8u: goto label_BFC30BD8; - case 0xBFC30BE0u: goto label_BFC30BE0; - case 0xBFC30C18u: goto label_BFC30C18; - case 0xBFC30C44u: goto label_BFC30C44; - case 0xBFC30C84u: goto label_BFC30C84; - case 0xBFC30CB4u: goto label_BFC30CB4; - case 0xBFC30CE8u: goto label_BFC30CE8; - case 0xBFC30D14u: goto label_BFC30D14; - case 0xBFC30D50u: goto label_BFC30D50; - case 0xBFC30D80u: goto label_BFC30D80; - case 0xBFC30D8Cu: goto label_BFC30D8C; - default: break; - } - } -label_BFC30A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30A80: 27BDFF20 addiu $sp, $sp, -224 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-224)); - PGXP_ALU(0x27BDFF20u, cpu->gpr[29], _pgx1, 0xFFFFFF20u); } -#ifdef PSX_COSIM - cosim_instr(0x80048A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC30A84: AFB60038 sw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A84u); return; } g_debug_last_store_pc = 0x80048A84u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC30A88: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A88u); return; } g_debug_last_store_pc = 0x80048A88u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC30A8C: AFB3002C sw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A8Cu); return; } g_debug_last_store_pc = 0x80048A8Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30A90: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A90u); return; } g_debug_last_store_pc = 0x80048A90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30A94: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A94u); return; } g_debug_last_store_pc = 0x80048A94u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30A98: AFB50034 sw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A98u); return; } g_debug_last_store_pc = 0x80048A98u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30A9C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048A9Cu); return; } g_debug_last_store_pc = 0x80048A9Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC30AA0: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC30AA4: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC30AA8: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x181u); -#endif - /* 0xBFC30AAC: 00E04021 addu $t0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC30AB0: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30AB4: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048AB4u); return; } g_debug_last_store_pc = 0x80048AB4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30AB8: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048AB8u); return; } g_debug_last_store_pc = 0x80048AB8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC30ABC: AFA800EC sw $t0, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048ABCu); return; } g_debug_last_store_pc = 0x80048ABCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA800ECu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC30AC0: 24070348 addiu $a3, $zero, 840 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (840)); - PGXP_ALU(0x24070348u, cpu->gpr[7], _pgx1, 0x00000348u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30AC4: 27A40084 addiu $a0, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A40084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC30AC8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30ACC: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80048AD4u; /* jal link before delay slot */ - psx_delay_BFC30ACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC30AD0: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AD0u); -#endif - if (psx_delay_BFC30ACC) { - psx_delay_BFC30ACC = 0; - cpu->gpr[31] = 0x80048AD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC30AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AD4u); -#endif - /* 0xBFC30AD4: 8FA800EC lw $t0, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048AD4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ECu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC30AD8: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC30ADC: A3AF009B sb $t7, 155($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 155; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048ADCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (155)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF009Bu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30AE0: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80048AE8u; /* jal link before delay slot */ - psx_delay_BFC30AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30AE4: 27A40084 addiu $a0, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A40084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AE4u); -#endif - if (psx_delay_BFC30AE0) { - psx_delay_BFC30AE0 = 0; - cpu->gpr[31] = 0x80048AE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC30AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC30AE8: A7B2004C sh $s2, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048AE8u); return; } g_debug_last_store_pc = 0x80048AE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA7B2004Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AE8u); -#endif - /* 0xBFC30AEC: 8FA800EC lw $t0, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048AECu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ECu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC30AF0: 24140280 addiu $s4, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24140280u, cpu->gpr[20], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80048AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC30AF4: 0000A821 addu $s5, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC30AF8: A7B3004E sh $s3, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048AF8u); return; } g_debug_last_store_pc = 0x80048AF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA7B3004Eu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30AFC: A7B5004A sh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048AFCu); return; } g_debug_last_store_pc = 0x80048AFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30B00: A7B40048 sh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B00u); return; } g_debug_last_store_pc = 0x80048B00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30B04: 0C01468F jal 0xB0051A3C */ - cpu->gpr[31] = 0x80048B0Cu; /* jal link before delay slot */ - psx_delay_BFC30B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30B08: 27A40060 addiu $a0, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27A40060u, cpu->gpr[4], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80048B08u); -#endif - if (psx_delay_BFC30B04) { - psx_delay_BFC30B04 = 0; - cpu->gpr[31] = 0x80048B0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051A3Cu); - cpu->pc = 0x80051A3Cu; return; - } -label_BFC30B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B0Cu); -#endif - /* 0xBFC30B0C: 87B80048 lh $t8, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B0Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80048u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B10u); -#endif - /* 0xBFC30B10: 87B9004A lh $t9, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B10u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B9004Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B10u); -#endif - /* 0xBFC30B14: 87A9004C lh $t1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B14u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B14u); -#endif - /* 0xBFC30B18: 87AA004E lh $t2, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B18u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA004Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000208u); -#endif - /* 0xBFC30B1C: 03091821 addu $v1, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03091821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000420u); -#endif - /* 0xBFC30B20: 032A2821 addu $a1, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[25] + cpu->gpr[10]; - PGXP_ALU(0x032A2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048B20u); -#endif - /* 0xBFC30B24: 8FA800EC lw $t0, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048B24u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA800ECu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC30B28: A7A5007A sh $a1, 122($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 122; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (122)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B28u); return; } g_debug_last_store_pc = 0x80048B28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA7A5007Au, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC30B2C: A7A50082 sh $a1, 130($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 130; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (130)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B2Cu); return; } g_debug_last_store_pc = 0x80048B2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA7A50082u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC30B30: A7A30070 sh $v1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B30u); return; } g_debug_last_store_pc = 0x80048B30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30070u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC30B34: A7A30080 sh $v1, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B34u); return; } g_debug_last_store_pc = 0x80048B34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30080u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC30B38: A7B80068 sh $t8, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B38u); return; } g_debug_last_store_pc = 0x80048B38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80068u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC30B3C: A7B80078 sh $t8, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B3Cu); return; } g_debug_last_store_pc = 0x80048B3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80078u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC30B40: A7B9006A sh $t9, 106($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 106; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (106)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B40u); return; } g_debug_last_store_pc = 0x80048B40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9006Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC30B44: A7B90072 sh $t9, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048B44u); return; } g_debug_last_store_pc = 0x80048B44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90072u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B44u); -#endif - /* 0xBFC30B48: 910B0000 lbu $t3, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 11, 0x100u); - PGXP_LOAD(0x910B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B48u); -#endif - /* 0xBFC30B4C: 8FA200F0 lw $v0, 240($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048B4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA200F0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC30B50: A3AB0064 sb $t3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (100)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB0064u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B50u); -#endif - /* 0xBFC30B54: 910C0001 lbu $t4, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 12, 0x100u); - PGXP_LOAD(0x910C0001u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30B58: 27A40060 addiu $a0, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27A40060u, cpu->gpr[4], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80048B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC30B5C: A3AC0065 sb $t4, 101($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 101; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (101)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0065u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B60u); -#endif - /* 0xBFC30B60: 910D0002 lbu $t5, 2($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 2; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (2)), 13, 0x100u); - PGXP_LOAD(0x910D0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC30B68: A3AD0066 sb $t5, 102($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 102; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (102)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD0066u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B68u); -#endif - /* 0xBFC30B6C: 910E0000 lbu $t6, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 14, 0x100u); - PGXP_LOAD(0x910E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30B70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30B74: A3AE006C sb $t6, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (108)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA3AE006Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B74u); -#endif - /* 0xBFC30B78: 910F0001 lbu $t7, 1($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 1; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (1)), 15, 0x100u); - PGXP_LOAD(0x910F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30B7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC30B80: A3AF006D sb $t7, 109($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 109; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (109)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF006Du, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B80u); -#endif - /* 0xBFC30B84: 91090002 lbu $t1, 2($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 2; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (2)), 9, 0x100u); - PGXP_LOAD(0x91090002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30B88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC30B8C: A3A9006E sb $t1, 110($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 110; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (110)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA3A9006Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048B90u); -#endif - /* 0xBFC30B90: 90580000 lbu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 24, 0x4u); - PGXP_LOAD(0x90580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30B94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC30B98: A3B80074 sb $t8, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048B98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (116)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3B80074u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B98u); -#endif - /* 0xBFC30B9C: 90590001 lbu $t9, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 25, 0x4u); - PGXP_LOAD(0x90590001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30BA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC30BA4: A3B90075 sb $t9, 117($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 117; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (117)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA3B90075u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BA4u); -#endif - /* 0xBFC30BA8: 904A0002 lbu $t2, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 10, 0x4u); - PGXP_LOAD(0x904A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30BAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC30BB0: A3AA0076 sb $t2, 118($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 118; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (118)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA3AA0076u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BB0u); -#endif - /* 0xBFC30BB4: 904B0000 lbu $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 11, 0x4u); - PGXP_LOAD(0x904B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC30BBC: A3AB007C sb $t3, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (124)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA3AB007Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BC0u); -#endif - /* 0xBFC30BC0: 904C0001 lbu $t4, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 12, 0x4u); - PGXP_LOAD(0x904C0001u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC30BC8: A3AC007D sb $t4, 125($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 125; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (125)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC007Du, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BC8u); -#endif - /* 0xBFC30BCC: 904D0002 lbu $t5, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 13, 0x4u); - PGXP_LOAD(0x904D0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30BD0: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048BD8u; /* jal link before delay slot */ - psx_delay_BFC30BD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC30BD4: A3AD007E sb $t5, 126($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 126; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (126)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA3AD007Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BD4u); -#endif - if (psx_delay_BFC30BD0) { - psx_delay_BFC30BD0 = 0; - cpu->gpr[31] = 0x80048BD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30BD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30BD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30BD8: 0C0146F3 jal 0xB0051BCC */ - cpu->gpr[31] = 0x80048BE0u; /* jal link before delay slot */ - psx_delay_BFC30BD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30BDC: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048BDCu); -#endif - if (psx_delay_BFC30BD8) { - psx_delay_BFC30BD8 = 0; - cpu->gpr[31] = 0x80048BE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051BCCu); - cpu->pc = 0x80051BCCu; return; - } -label_BFC30BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BE0u); -#endif - /* 0xBFC30BE0: 8FB000F4 lw $s0, 244($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048BE0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB000F4u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BE0u); -#endif - /* 0xBFC30BE4: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048BE4u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30BE8: A3B00054 sb $s0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00054u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30BEC: A3B00055 sb $s0, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00055u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048BF0u); -#endif - /* 0xBFC30BF0: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048BF0u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30BF4: A3B00056 sb $s0, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048BF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00056u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x144000u); -#endif - /* 0xBFC30BF8: 02927021 addu $t6, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x02927021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30BFC: A7B40058 sh $s4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048BFCu); return; } g_debug_last_store_pc = 0x80048BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40058u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC30C00: 25CFFFFF addiu $t7, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC30C04: A7AF005C sh $t7, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C04u); return; } g_debug_last_store_pc = 0x80048C04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF005Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30C08: A7B5005A sh $s5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C08u); return; } g_debug_last_store_pc = 0x80048C08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30C0C: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30C10: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048C18u; /* jal link before delay slot */ - psx_delay_BFC30C10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30C14: A7B5005E sh $s5, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C14u); return; } g_debug_last_store_pc = 0x80048C14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Eu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C14u); -#endif - if (psx_delay_BFC30C10) { - psx_delay_BFC30C10 = 0; - cpu->gpr[31] = 0x80048C18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C18u); -#endif - /* 0xBFC30C18: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C18u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C18u); -#endif - /* 0xBFC30C1C: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C1Cu); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140200u); -#endif - /* 0xBFC30C20: 02924821 addu $t1, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x02924821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30C24: A7B40058 sh $s4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C24u); return; } g_debug_last_store_pc = 0x80048C24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40058u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC30C28: 2538FFFF addiu $t8, $t1, -1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[9] + (-1)); - PGXP_ALU(0x2538FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC30C2C: 26A20001 addiu $v0, $s5, 1 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] + (1)); - PGXP_ALU(0x26A20001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30C30: A7A2005A sh $v0, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C30u); return; } g_debug_last_store_pc = 0x80048C30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30C34: A7A2005E sh $v0, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C34u); return; } g_debug_last_store_pc = 0x80048C34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC30C38: A7B8005C sh $t8, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C38u); return; } g_debug_last_store_pc = 0x80048C38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8005Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30C3C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048C44u; /* jal link before delay slot */ - psx_delay_BFC30C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30C40: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048C40u); -#endif - if (psx_delay_BFC30C3C) { - psx_delay_BFC30C3C = 0; - cpu->gpr[31] = 0x80048C44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C44u); -#endif - /* 0xBFC30C44: 8FB100F8 lw $s1, 248($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 248; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048C44u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB100F8u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C44u); -#endif - /* 0xBFC30C48: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C48u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30C4C: A3B10054 sb $s1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048C4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10054u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30C50: A3B10055 sb $s1, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048C50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10055u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C50u); -#endif - /* 0xBFC30C54: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C54u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30C58: A3B10056 sb $s1, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048C58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10056u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2140000u); -#endif - /* 0xBFC30C5C: 0292C821 addu $t9, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x0292C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280004u); -#endif - /* 0xBFC30C60: 02B31021 addu $v0, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B31021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30C64: A7B40058 sh $s4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C64u); return; } g_debug_last_store_pc = 0x80048C64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40058u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC30C68: 2442FFFE addiu $v0, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x2442FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC30C6C: 272AFFFF addiu $t2, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x272AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC30C70: A7AA005C sh $t2, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C70u); return; } g_debug_last_store_pc = 0x80048C70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA005Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30C74: A7A2005A sh $v0, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C74u); return; } g_debug_last_store_pc = 0x80048C74u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30C78: A7A2005E sh $v0, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C78u); return; } g_debug_last_store_pc = 0x80048C78u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30C7C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048C84u; /* jal link before delay slot */ - psx_delay_BFC30C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30C80: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048C80u); -#endif - if (psx_delay_BFC30C7C) { - psx_delay_BFC30C7C = 0; - cpu->gpr[31] = 0x80048C84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C84u); -#endif - /* 0xBFC30C84: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C84u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C84u); -#endif - /* 0xBFC30C88: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C88u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140800u); -#endif - /* 0xBFC30C8C: 02925821 addu $t3, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[11] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x02925821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280004u); -#endif - /* 0xBFC30C90: 02B31021 addu $v0, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B31021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30C94: A7B40058 sh $s4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048C94u); return; } g_debug_last_store_pc = 0x80048C94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40058u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC30C98: 2442FFFD addiu $v0, $v0, -3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-3)); - PGXP_ALU(0x2442FFFDu, cpu->gpr[2], _pgx1, 0xFFFFFFFDu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC30C9C: 256CFFFF addiu $t4, $t3, -1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (-1)); - PGXP_ALU(0x256CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC30CA0: A7AC005C sh $t4, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CA0u); return; } g_debug_last_store_pc = 0x80048CA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC005Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30CA4: A7A2005A sh $v0, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CA4u); return; } g_debug_last_store_pc = 0x80048CA4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30CA8: A7A2005E sh $v0, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CA8u); return; } g_debug_last_store_pc = 0x80048CA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30CAC: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048CB4u; /* jal link before delay slot */ - psx_delay_BFC30CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30CB0: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048CB0u); -#endif - if (psx_delay_BFC30CAC) { - psx_delay_BFC30CAC = 0; - cpu->gpr[31] = 0x80048CB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30CB4: A3B00054 sb $s0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048CB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00054u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30CB8: A3B00055 sb $s0, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048CB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00055u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CB8u); -#endif - /* 0xBFC30CBC: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CBCu); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CC0u); -#endif - /* 0xBFC30CC0: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CC0u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30CC4: A3B00056 sb $s0, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048CC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[16] & 0xFFu)); - PGXP_STORE(0xA3B00056u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x282000u); -#endif - /* 0xBFC30CC8: 02B36821 addu $t5, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[13] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B36821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30CCC: A7B5005A sh $s5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CCCu); return; } g_debug_last_store_pc = 0x80048CCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC30CD0: 25AEFFFF addiu $t6, $t5, -1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); - PGXP_ALU(0x25AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30CD4: A7AE005E sh $t6, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CD4u); return; } g_debug_last_store_pc = 0x80048CD4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE005Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30CD8: A7B40058 sh $s4, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CD8u); return; } g_debug_last_store_pc = 0x80048CD8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B40058u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30CDC: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30CE0: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048CE8u; /* jal link before delay slot */ - psx_delay_BFC30CE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30CE4: A7B4005C sh $s4, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CE4u); return; } g_debug_last_store_pc = 0x80048CE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA7B4005Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CE4u); -#endif - if (psx_delay_BFC30CE0) { - psx_delay_BFC30CE0 = 0; - cpu->gpr[31] = 0x80048CE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CE8u); -#endif - /* 0xBFC30CE8: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CE8u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CE8u); -#endif - /* 0xBFC30CEC: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CECu); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x288000u); -#endif - /* 0xBFC30CF0: 02B37821 addu $t7, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[15] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30CF4: A7B5005A sh $s5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048CF4u); return; } g_debug_last_store_pc = 0x80048CF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC30CF8: 25E9FFFF addiu $t1, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25E9FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC30CFC: 26820001 addiu $v0, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26820001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D00: A7A20058 sh $v0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D00u); return; } g_debug_last_store_pc = 0x80048D00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A20058u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D04: A7A2005C sh $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D04u); return; } g_debug_last_store_pc = 0x80048D04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC30D08: A7A9005E sh $t1, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D08u); return; } g_debug_last_store_pc = 0x80048D08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9005Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30D0C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048D14u; /* jal link before delay slot */ - psx_delay_BFC30D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30D10: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D10u); -#endif - if (psx_delay_BFC30D0C) { - psx_delay_BFC30D0C = 0; - cpu->gpr[31] = 0x80048D14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30D14: A3B10054 sb $s1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048D14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (84)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10054u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30D18: A3B10055 sb $s1, 85($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 85; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048D18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (85)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10055u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D18u); -#endif - /* 0xBFC30D1C: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D1Cu); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D20u); -#endif - /* 0xBFC30D20: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D20u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30D24: A3B10056 sb $s1, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048D24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (86)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA3B10056u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140004u); -#endif - /* 0xBFC30D28: 02921021 addu $v0, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x02921021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1280000u); -#endif - /* 0xBFC30D2C: 02B3C021 addu $t8, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[24] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B3C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30D30: A7B5005A sh $s5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D30u); return; } g_debug_last_store_pc = 0x80048D30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC30D34: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC30D38: 2442FFFE addiu $v0, $v0, -2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-2)); - PGXP_ALU(0x2442FFFEu, cpu->gpr[2], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80048D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D3C: A7A20058 sh $v0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D3Cu); return; } g_debug_last_store_pc = 0x80048D3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A20058u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D40: A7A2005C sh $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D40u); return; } g_debug_last_store_pc = 0x80048D40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC30D44: A7B9005E sh $t9, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D44u); return; } g_debug_last_store_pc = 0x80048D44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9005Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30D48: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048D50u; /* jal link before delay slot */ - psx_delay_BFC30D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30D4C: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D4Cu); -#endif - if (psx_delay_BFC30D48) { - psx_delay_BFC30D48 = 0; - cpu->gpr[31] = 0x80048D50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D50u); -#endif - /* 0xBFC30D50: 87B40048 lh $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D50u); return; } cpu->gpr[20] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x87B40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D50u); -#endif - /* 0xBFC30D54: 87B5004A lh $s5, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D54u); return; } cpu->gpr[21] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x87B5004Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140004u); -#endif - /* 0xBFC30D58: 02921021 addu $v0, $s4, $s2 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[18]; - PGXP_ALU(0x02921021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280400u); -#endif - /* 0xBFC30D5C: 02B35021 addu $t2, $s5, $s3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[10] = cpu->gpr[21] + cpu->gpr[19]; - PGXP_ALU(0x02B35021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30D60: A7B5005A sh $s5, 90($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 90; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (90)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D60u); return; } g_debug_last_store_pc = 0x80048D60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA7B5005Au, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC30D64: 254BFFFF addiu $t3, $t2, -1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-1)); - PGXP_ALU(0x254BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC30D68: 2442FFFD addiu $v0, $v0, -3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-3)); - PGXP_ALU(0x2442FFFDu, cpu->gpr[2], _pgx1, 0xFFFFFFFDu); } -#ifdef PSX_COSIM - cosim_instr(0x80048D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D6C: A7A20058 sh $v0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D6Cu); return; } g_debug_last_store_pc = 0x80048D6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A20058u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30D70: A7A2005C sh $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D70u); return; } g_debug_last_store_pc = 0x80048D70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC30D74: A7AB005E sh $t3, 94($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 94; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (94)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048D74u); return; } g_debug_last_store_pc = 0x80048D74u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB005Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30D78: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80048D80u; /* jal link before delay slot */ - psx_delay_BFC30D78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30D7C: 27A40050 addiu $a0, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A40050u, cpu->gpr[4], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D7Cu); -#endif - if (psx_delay_BFC30D78) { - psx_delay_BFC30D78 = 0; - cpu->gpr[31] = 0x80048D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC30D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30D80: 27A40048 addiu $a0, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27A40048u, cpu->gpr[4], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30D84: 0C013C4C jal 0xB004F130 */ - cpu->gpr[31] = 0x80048D8Cu; /* jal link before delay slot */ - psx_delay_BFC30D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400020u); -#endif - /* 0xBFC30D88: 26C50014 addiu $a1, $s6, 20 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[22] + (20)); - PGXP_ALU(0x26C50014u, cpu->gpr[5], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D88u); -#endif - if (psx_delay_BFC30D84) { - psx_delay_BFC30D84 = 0; - cpu->gpr[31] = 0x80048D8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F130u); - cpu->pc = 0x8004F130u; return; - } -label_BFC30D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC30D8C: 02530019 multu $s2, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02530019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x80048D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC30D90: 240C0010 addiu $t4, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240C0010u, cpu->gpr[12], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC30D94: 240D0002 addiu $t5, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240D0002u, cpu->gpr[13], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80048D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401000u); -#endif - /* 0xBFC30D98: AECC0000 sw $t4, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048D98u); return; } g_debug_last_store_pc = 0x80048D98u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAECC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402000u); -#endif - /* 0xBFC30D9C: AECD0004 sw $t5, 4($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048D9Cu); return; } g_debug_last_store_pc = 0x80048D9Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAECD0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80048D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC30DA0: A6C0000C sh $zero, 12($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048DA0u); return; } g_debug_last_store_pc = 0x80048DA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6C0000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC30DA4: A6C0000E sh $zero, 14($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048DA4u); return; } g_debug_last_store_pc = 0x80048DA4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6C0000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440000u); -#endif - /* 0xBFC30DA8: A6D20010 sh $s2, 16($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048DA8u); return; } g_debug_last_store_pc = 0x80048DA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA6D20010u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480000u); -#endif - /* 0xBFC30DAC: A6D30012 sh $s3, 18($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048DACu); return; } g_debug_last_store_pc = 0x80048DACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA6D30012u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC30DB0: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC30DB4: 000E7840 sll $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 1u; - PGXP_ALU(0x000E7840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80048DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC30DB8: 25E9000C addiu $t1, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[15] + (12)); - PGXP_ALU(0x25E9000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80048DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400200u); -#endif - /* 0xBFC30DBC: AEC90008 sw $t1, 8($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DBCu); return; } g_debug_last_store_pc = 0x80048DBCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAEC90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DC0u); -#endif - /* 0xBFC30DC0: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DC0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DC0u); -#endif - /* 0xBFC30DC4: 8FB60038 lw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DC4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DC4u); -#endif - /* 0xBFC30DC8: 8FB50034 lw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DC8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DC8u); -#endif - /* 0xBFC30DCC: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DCCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DD0u); -#endif - /* 0xBFC30DD0: 8FB3002C lw $s3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DD0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3002Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DD0u); -#endif - /* 0xBFC30DD4: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DD4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DD4u); -#endif - /* 0xBFC30DD8: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DD8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DD8u); -#endif - /* 0xBFC30DDC: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DDCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC30DE0: 03E00008 jr $ra */ - psx_delay_BFC30DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30DE4: 27BD00E0 addiu $sp, $sp, 224 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (224)); - PGXP_ALU(0x27BD00E0u, cpu->gpr[29], _pgx1, 0x000000E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048DE4u); -#endif - if (psx_delay_BFC30DE0) { - psx_delay_BFC30DE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC30DF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC30DF0u); - int psx_delay_BFC30E34 = 0; - int psx_delay_BFC30E44 = 0; - int psx_delay_BFC30E60 = 0; - int psx_delay_BFC30E74 = 0; - int psx_delay_BFC30E84 = 0; - int psx_delay_BFC30EA4 = 0; - int psx_delay_BFC30EC4 = 0; - int psx_delay_BFC30ED4 = 0; - int psx_delay_BFC30F30 = 0; - int psx_delay_BFC30F3C = 0; - int psx_taken_BFC30F3C = 0; - int psx_delay_BFC30F50 = 0; - int psx_delay_BFC30F60 = 0; - int psx_taken_BFC30F60 = 0; - int psx_delay_BFC30F70 = 0; - int psx_taken_BFC30F70 = 0; - int psx_delay_BFC30F78 = 0; - int psx_taken_BFC30F78 = 0; - int psx_delay_BFC30F84 = 0; - int psx_taken_BFC30F84 = 0; - int psx_delay_BFC30F8C = 0; - int psx_delay_BFC30FA0 = 0; - int psx_taken_BFC30FA0 = 0; - int psx_delay_BFC30FB0 = 0; - int psx_taken_BFC30FB0 = 0; - int psx_delay_BFC30FB8 = 0; - int psx_taken_BFC30FB8 = 0; - int psx_delay_BFC30FC4 = 0; - int psx_taken_BFC30FC4 = 0; - int psx_delay_BFC30FCC = 0; - int psx_delay_BFC30FDC = 0; - int psx_taken_BFC30FDC = 0; - int psx_delay_BFC30FEC = 0; - int psx_taken_BFC30FEC = 0; - int psx_delay_BFC30FF4 = 0; - int psx_taken_BFC30FF4 = 0; - int psx_delay_BFC31000 = 0; - int psx_delay_BFC31010 = 0; - int psx_taken_BFC31010 = 0; - int psx_delay_BFC31020 = 0; - int psx_taken_BFC31020 = 0; - int psx_delay_BFC31028 = 0; - int psx_taken_BFC31028 = 0; - int psx_delay_BFC31034 = 0; - int psx_taken_BFC31034 = 0; - int psx_delay_BFC3103C = 0; - int psx_delay_BFC31050 = 0; - int psx_taken_BFC31050 = 0; - int psx_delay_BFC31060 = 0; - int psx_taken_BFC31060 = 0; - int psx_delay_BFC31068 = 0; - int psx_taken_BFC31068 = 0; - int psx_delay_BFC31074 = 0; - int psx_taken_BFC31074 = 0; - int psx_delay_BFC3107C = 0; - int psx_delay_BFC3108C = 0; - int psx_taken_BFC3108C = 0; - int psx_delay_BFC3109C = 0; - int psx_taken_BFC3109C = 0; - int psx_delay_BFC310A4 = 0; - int psx_taken_BFC310A4 = 0; - int psx_delay_BFC310BC = 0; - int psx_delay_BFC310C8 = 0; - int psx_taken_BFC310C8 = 0; - int psx_delay_BFC310D8 = 0; - int psx_taken_BFC310D8 = 0; - int psx_delay_BFC310E0 = 0; - int psx_taken_BFC310E0 = 0; - int psx_delay_BFC310F0 = 0; - int psx_delay_BFC310F8 = 0; - int psx_taken_BFC310F8 = 0; - int psx_delay_BFC31120 = 0; - int psx_taken_BFC31120 = 0; - int psx_delay_BFC31130 = 0; - int psx_taken_BFC31130 = 0; - int psx_delay_BFC3118C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC30E3Cu: goto label_BFC30E3C; - case 0xBFC30E4Cu: goto label_BFC30E4C; - case 0xBFC30E68u: goto label_BFC30E68; - case 0xBFC30E7Cu: goto label_BFC30E7C; - case 0xBFC30E8Cu: goto label_BFC30E8C; - case 0xBFC30EACu: goto label_BFC30EAC; - case 0xBFC30ECCu: goto label_BFC30ECC; - case 0xBFC30EDCu: goto label_BFC30EDC; - case 0xBFC30F38u: goto label_BFC30F38; - case 0xBFC30F44u: goto label_BFC30F44; - case 0xBFC30F50u: goto label_BFC30F50; - case 0xBFC30F58u: goto label_BFC30F58; - case 0xBFC30F68u: goto label_BFC30F68; - case 0xBFC30F6Cu: goto label_BFC30F6C; - case 0xBFC30F78u: goto label_BFC30F78; - case 0xBFC30F80u: goto label_BFC30F80; - case 0xBFC30F84u: goto label_BFC30F84; - case 0xBFC30F8Cu: goto label_BFC30F8C; - case 0xBFC30F94u: goto label_BFC30F94; - case 0xBFC30FA8u: goto label_BFC30FA8; - case 0xBFC30FACu: goto label_BFC30FAC; - case 0xBFC30FB8u: goto label_BFC30FB8; - case 0xBFC30FC0u: goto label_BFC30FC0; - case 0xBFC30FC4u: goto label_BFC30FC4; - case 0xBFC30FCCu: goto label_BFC30FCC; - case 0xBFC30FD4u: goto label_BFC30FD4; - case 0xBFC30FE4u: goto label_BFC30FE4; - case 0xBFC30FE8u: goto label_BFC30FE8; - case 0xBFC30FF4u: goto label_BFC30FF4; - case 0xBFC30FFCu: goto label_BFC30FFC; - case 0xBFC31000u: goto label_BFC31000; - case 0xBFC31008u: goto label_BFC31008; - case 0xBFC31018u: goto label_BFC31018; - case 0xBFC3101Cu: goto label_BFC3101C; - case 0xBFC31028u: goto label_BFC31028; - case 0xBFC31030u: goto label_BFC31030; - case 0xBFC31034u: goto label_BFC31034; - case 0xBFC3103Cu: goto label_BFC3103C; - case 0xBFC31044u: goto label_BFC31044; - case 0xBFC31058u: goto label_BFC31058; - case 0xBFC3105Cu: goto label_BFC3105C; - case 0xBFC31068u: goto label_BFC31068; - case 0xBFC31070u: goto label_BFC31070; - case 0xBFC31074u: goto label_BFC31074; - case 0xBFC3107Cu: goto label_BFC3107C; - case 0xBFC31084u: goto label_BFC31084; - case 0xBFC31094u: goto label_BFC31094; - case 0xBFC31098u: goto label_BFC31098; - case 0xBFC310A4u: goto label_BFC310A4; - case 0xBFC310ACu: goto label_BFC310AC; - case 0xBFC310B0u: goto label_BFC310B0; - case 0xBFC310B4u: goto label_BFC310B4; - case 0xBFC310C4u: goto label_BFC310C4; - case 0xBFC310D0u: goto label_BFC310D0; - case 0xBFC310D8u: goto label_BFC310D8; - case 0xBFC310E0u: goto label_BFC310E0; - case 0xBFC310E8u: goto label_BFC310E8; - case 0xBFC310ECu: goto label_BFC310EC; - case 0xBFC310F8u: goto label_BFC310F8; - case 0xBFC31100u: goto label_BFC31100; - case 0xBFC3111Cu: goto label_BFC3111C; - case 0xBFC31128u: goto label_BFC31128; - case 0xBFC31138u: goto label_BFC31138; - default: break; - } - } -label_BFC30DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC30DF0: 27BDFEF8 addiu $sp, $sp, -264 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-264)); - PGXP_ALU(0x27BDFEF8u, cpu->gpr[29], _pgx1, 0xFFFFFEF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80048DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC30DF4: AFB60038 sw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DF4u); return; } g_debug_last_store_pc = 0x80048DF4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC30DF8: AFB50034 sw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DF8u); return; } g_debug_last_store_pc = 0x80048DF8u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC30DFC: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048DFCu); return; } g_debug_last_store_pc = 0x80048DFCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC30E00: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E00u); return; } g_debug_last_store_pc = 0x80048E00u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E04: AFA40108 sw $a0, 264($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E04u); return; } g_debug_last_store_pc = 0x80048E04u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40108u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC30E08: AFB30030 sw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E08u); return; } g_debug_last_store_pc = 0x80048E08u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC30E0C: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200081u); -#endif - /* 0xBFC30E10: 00E0A821 addu $s5, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC30E14: 00C0B021 addu $s6, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC30E18: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC30E1C: AFB10028 sw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E1Cu); return; } g_debug_last_store_pc = 0x80048E1Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC30E20: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E20u); return; } g_debug_last_store_pc = 0x80048E20u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC30E24: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E24u); return; } g_debug_last_store_pc = 0x80048E24u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC30E28: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC30E2C: 24070348 addiu $a3, $zero, 840 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (840)); - PGXP_ALU(0x24070348u, cpu->gpr[7], _pgx1, 0x00000348u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC30E30: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30E34: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x80048E3Cu; /* jal link before delay slot */ - psx_delay_BFC30E34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E38: 27A400AC addiu $a0, $sp, 172 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (172)); - PGXP_ALU(0x27A400ACu, cpu->gpr[4], _pgx1, 0x000000ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80048E38u); -#endif - if (psx_delay_BFC30E34) { - psx_delay_BFC30E34 = 0; - cpu->gpr[31] = 0x80048E3Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC30E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC30E3C: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC30E40: A3AF00C3 sb $t7, 195($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 195; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80048E40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (195)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF00C3u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30E44: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x80048E4Cu; /* jal link before delay slot */ - psx_delay_BFC30E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E48: 27A400AC addiu $a0, $sp, 172 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (172)); - PGXP_ALU(0x27A400ACu, cpu->gpr[4], _pgx1, 0x000000ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80048E48u); -#endif - if (psx_delay_BFC30E44) { - psx_delay_BFC30E44 = 0; - cpu->gpr[31] = 0x80048E4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC30E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC30E4C: A7A000A6 sh $zero, 166($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048E4Cu); return; } g_debug_last_store_pc = 0x80048E4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A000A6u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC30E50: 24180280 addiu $t8, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24180280u, cpu->gpr[24], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC30E54: A7B800A4 sh $t8, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048E54u); return; } g_debug_last_store_pc = 0x80048E54u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B800A4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC30E58: A7B200A8 sh $s2, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048E58u); return; } g_debug_last_store_pc = 0x80048E58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA7B200A8u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC30E5C: A7B600AA sh $s6, 170($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80048E5Cu); return; } g_debug_last_store_pc = 0x80048E5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[22] & 0xFFFFu)); } - PGXP_STORE(0xA7B600AAu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30E60: 0C012A7C jal 0xB004A9F0 */ - cpu->gpr[31] = 0x80048E68u; /* jal link before delay slot */ - psx_delay_BFC30E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E64: 27A400A4 addiu $a0, $sp, 164 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (164)); - PGXP_ALU(0x27A400A4u, cpu->gpr[4], _pgx1, 0x000000A4u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E64u); -#endif - if (psx_delay_BFC30E60) { - psx_delay_BFC30E60 = 0; - cpu->gpr[31] = 0x80048E68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A9F0u); - cpu->pc = 0x8004A9F0u; return; - } -label_BFC30E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E68u); -#endif - /* 0xBFC30E68: 8FB30108 lw $s3, 264($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E68u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30108u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E6C: 27A400A4 addiu $a0, $sp, 164 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (164)); - PGXP_ALU(0x27A400A4u, cpu->gpr[4], _pgx1, 0x000000A4u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC30E70: 26730014 addiu $s3, $s3, 20 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (20)); - PGXP_ALU(0x26730014u, cpu->gpr[19], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30E74: 0C013C4C jal 0xB004F130 */ - cpu->gpr[31] = 0x80048E7Cu; /* jal link before delay slot */ - psx_delay_BFC30E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC30E78: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E78u); -#endif - if (psx_delay_BFC30E74) { - psx_delay_BFC30E74 = 0; - cpu->gpr[31] = 0x80048E7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F130u); - cpu->pc = 0x8004F130u; return; - } -label_BFC30E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC30E7C: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400021u); -#endif - /* 0xBFC30E80: 02C02821 addu $a1, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30E84: 0C012904 jal 0xB004A410 */ - cpu->gpr[31] = 0x80048E8Cu; /* jal link before delay slot */ - psx_delay_BFC30E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC30E88: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E88u); -#endif - if (psx_delay_BFC30E84) { - psx_delay_BFC30E84 = 0; - cpu->gpr[31] = 0x80048E8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A410u); - cpu->pc = 0x8004A410u; return; - } -label_BFC30E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30E8C: 3C07800D lui $a3, 0x800D */ - cpu->gpr[7] = 0x800D0000u; - PGXP_ALU(0x3C07800Du, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC30E90: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC30E94: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048E94u); return; } g_debug_last_store_pc = 0x80048E94u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80048E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30E98: 24E79DF0 addiu $a3, $a3, -25104 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-25104)); - PGXP_ALU(0x24E79DF0u, cpu->gpr[7], _pgx1, 0xFFFF9DF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30E9C: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x80048E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC30EA0: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30EA4: 0C0128B9 jal 0xB004A2E4 */ - cpu->gpr[31] = 0x80048EACu; /* jal link before delay slot */ - psx_delay_BFC30EA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC30EA8: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EA8u); -#endif - if (psx_delay_BFC30EA4) { - psx_delay_BFC30EA4 = 0; - cpu->gpr[31] = 0x80048EACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2E4u); - cpu->pc = 0x8004A2E4u; return; - } -label_BFC30EAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30EACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30EAC: 3C07800D lui $a3, 0x800D */ - cpu->gpr[7] = 0x800D0000u; - PGXP_ALU(0x3C07800Du, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC30EB0: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC30EB4: AFA80010 sw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048EB4u); return; } g_debug_last_store_pc = 0x80048EB4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80048EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30EB8: 24E7BDF0 addiu $a3, $a3, -16912 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-16912)); - PGXP_ALU(0x24E7BDF0u, cpu->gpr[7], _pgx1, 0xFFFFBDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30EBC: 27A40084 addiu $a0, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A40084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC30EC0: 02402821 addu $a1, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30EC4: 0C0128B9 jal 0xB004A2E4 */ - cpu->gpr[31] = 0x80048ECCu; /* jal link before delay slot */ - psx_delay_BFC30EC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC30EC8: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EC8u); -#endif - if (psx_delay_BFC30EC4) { - psx_delay_BFC30EC4 = 0; - cpu->gpr[31] = 0x80048ECCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2E4u); - cpu->pc = 0x8004A2E4u; return; - } -label_BFC30ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC30ECC: 3C048009 lui $a0, 0x8009 */ - cpu->gpr[4] = 0x80090000u; - PGXP_ALU(0x3C048009u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC30ED0: 24849DF0 addiu $a0, $a0, -25104 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25104)); - PGXP_ALU(0x24849DF0u, cpu->gpr[4], _pgx1, 0xFFFF9DF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80048ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30ED4: 0C0129C4 jal 0xB004A710 */ - cpu->gpr[31] = 0x80048EDCu; /* jal link before delay slot */ - psx_delay_BFC30ED4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC30ED8: 3405FFFF ori $a1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048ED8u); -#endif - if (psx_delay_BFC30ED4) { - psx_delay_BFC30ED4 = 0; - cpu->gpr[31] = 0x80048EDCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A710u); - cpu->pc = 0x8004A710u; return; - } -label_BFC30EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440000u); -#endif - /* 0xBFC30EDC: 02560019 multu $s2, $s6 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[22]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02560019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[22]); -#ifdef PSX_COSIM - cosim_instr(0x80048EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30EE0: 24010064 addiu $at, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24010064u, cpu->gpr[1], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC30EE4: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC30EE8: 27A50084 addiu $a1, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A50084u, cpu->gpr[5], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC30EEC: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC30EF0: 00023080 sll $a2, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00023080u, cpu->gpr[6], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC30EF4: 00C23023 subu $a2, $a2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[6] - cpu->gpr[2]; - PGXP_ALU(0x00C23023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30EF8: 00063080 sll $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00063080u, cpu->gpr[6], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC30EFC: 00C23023 subu $a2, $a2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[6] - cpu->gpr[2]; - PGXP_ALU(0x00C23023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30F00: 00063080 sll $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 2u; - PGXP_ALU(0x00063080u, cpu->gpr[6], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC30F04: 00C23021 addu $a2, $a2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[2]; - PGXP_ALU(0x00C23021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC30F08: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80048F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC30F0C: 00023880 sll $a3, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00023880u, cpu->gpr[7], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80048F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC30F10: 00E23821 addu $a3, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[2]; - PGXP_ALU(0x00E23821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30F14: 00073840 sll $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 1u; - PGXP_ALU(0x00073840u, cpu->gpr[7], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80048F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC30F18: AFA2004C sw $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048F18u); return; } g_debug_last_store_pc = 0x80048F18u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80048F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC30F1C: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC30F28: 00E1001A div $a3, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[7]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00E1001Au, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80048F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC30F2C: 00003812 mflo $a3 */ - cpu->gpr[7] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003812u, cpu->gpr[7], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30F30: 0C012B33 jal 0xB004ACCC */ - cpu->gpr[31] = 0x80048F38u; /* jal link before delay slot */ - psx_delay_BFC30F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F34u); -#endif - if (psx_delay_BFC30F30) { - psx_delay_BFC30F30 = 0; - cpu->gpr[31] = 0x80048F38u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ACCCu); - cpu->pc = 0x8004ACCCu; return; - } -label_BFC30F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210001u); -#endif - /* 0xBFC30F38: 02A08021 addu $s0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC30F3C: 12000066 beq $s0, $zero, 0xBFC310D8 */ - uint32_t psx_brA_BFC30F3C = cpu->gpr[16]; uint32_t psx_brB_BFC30F3C = cpu->gpr[0]; - psx_taken_BFC30F3C = (psx_brA_BFC30F3C == psx_brB_BFC30F3C); - psx_delay_BFC30F3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC30F40: 26B5FFFF addiu $s5, $s5, -1 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-1)); - PGXP_ALU(0x26B5FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048F40u); -#endif - if (psx_delay_BFC30F3C) { - psx_delay_BFC30F3C = 0; - if (psx_taken_BFC30F3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490D8u); - goto label_BFC310D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F44u); - } -label_BFC30F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC30F44: AFB40040 sw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80048F44u); return; } g_debug_last_store_pc = 0x80048F44u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80048F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500000u); -#endif - /* 0xBFC30F48: 26D4FFFE addiu $s4, $s6, -2 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[22] + (-2)); - PGXP_ALU(0x26D4FFFEu, cpu->gpr[20], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80048F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC30F4C: 2651FFFE addiu $s1, $s2, -2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[18] + (-2)); - PGXP_ALU(0x2651FFFEu, cpu->gpr[17], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80048F4Cu); -#endif -label_BFC30F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30F50: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80048F58u; /* jal link before delay slot */ - psx_delay_BFC30F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F54u); -#endif - if (psx_delay_BFC30F50) { - psx_delay_BFC30F50 = 0; - cpu->gpr[31] = 0x80048F58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC30F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC30F58: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x80048F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC30F5C: 00004810 mfhi $t1 */ - cpu->gpr[9] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004810u, cpu->gpr[9], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC30F60: 16200002 bne $s1, $zero, 0xBFC30F6C */ - uint32_t psx_brA_BFC30F60 = cpu->gpr[17]; uint32_t psx_brB_BFC30F60 = cpu->gpr[0]; - psx_taken_BFC30F60 = (psx_brA_BFC30F60 != psx_brB_BFC30F60); - psx_delay_BFC30F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F64u); -#endif - if (psx_delay_BFC30F60) { - psx_delay_BFC30F60 = 0; - if (psx_taken_BFC30F60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F6Cu); - goto label_BFC30F6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F68u); - } -label_BFC30F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30F68: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80048F68u); return; -#ifdef PSX_COSIM - cosim_instr(0x80048F68u); -#endif -label_BFC30F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30F6C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC30F70: 16210004 bne $s1, $at, 0xBFC30F84 */ - uint32_t psx_brA_BFC30F70 = cpu->gpr[17]; uint32_t psx_brB_BFC30F70 = cpu->gpr[1]; - psx_taken_BFC30F70 = (psx_brA_BFC30F70 != psx_brB_BFC30F70); - psx_delay_BFC30F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30F74: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048F74u); -#endif - if (psx_delay_BFC30F70) { - psx_delay_BFC30F70 = 0; - if (psx_taken_BFC30F70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F84u); - goto label_BFC30F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F78u); - } -label_BFC30F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30F78: 14410002 bne $v0, $at, 0xBFC30F84 */ - uint32_t psx_brA_BFC30F78 = cpu->gpr[2]; uint32_t psx_brB_BFC30F78 = cpu->gpr[1]; - psx_taken_BFC30F78 = (psx_brA_BFC30F78 != psx_brB_BFC30F78); - psx_delay_BFC30F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F7Cu); -#endif - if (psx_delay_BFC30F78) { - psx_delay_BFC30F78 = 0; - if (psx_taken_BFC30F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F84u); - goto label_BFC30F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F80u); - } -label_BFC30F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30F80: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80048F80u); return; -#ifdef PSX_COSIM - cosim_instr(0x80048F80u); -#endif -label_BFC30F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC30F84: 05210011 bgez $t1, 0xBFC30FCC */ - uint32_t psx_brA_BFC30F84 = cpu->gpr[9]; - psx_taken_BFC30F84 = ((int32_t)psx_brA_BFC30F84 >= 0); - psx_delay_BFC30F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F88u); -#endif - if (psx_delay_BFC30F84) { - psx_delay_BFC30F84 = 0; - if (psx_taken_BFC30F84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FCCu); - goto label_BFC30FCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F8Cu); - } -label_BFC30F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30F8C: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80048F94u; /* jal link before delay slot */ - psx_delay_BFC30F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048F90u); -#endif - if (psx_delay_BFC30F8C) { - psx_delay_BFC30F8C = 0; - cpu->gpr[31] = 0x80048F94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC30F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC30F94: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x80048F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC30F98: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC30F9C: 00108023 subu $s0, $zero, $s0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[0] - cpu->gpr[16]; - PGXP_ALU(0x00108023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80048F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC30FA0: 16200002 bne $s1, $zero, 0xBFC30FAC */ - uint32_t psx_brA_BFC30FA0 = cpu->gpr[17]; uint32_t psx_brB_BFC30FA0 = cpu->gpr[0]; - psx_taken_BFC30FA0 = (psx_brA_BFC30FA0 != psx_brB_BFC30FA0); - psx_delay_BFC30FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FA4u); -#endif - if (psx_delay_BFC30FA0) { - psx_delay_BFC30FA0 = 0; - if (psx_taken_BFC30FA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FACu); - goto label_BFC30FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FA8u); - } -label_BFC30FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30FA8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80048FA8u); return; -#ifdef PSX_COSIM - cosim_instr(0x80048FA8u); -#endif -label_BFC30FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30FAC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC30FB0: 16210004 bne $s1, $at, 0xBFC30FC4 */ - uint32_t psx_brA_BFC30FB0 = cpu->gpr[17]; uint32_t psx_brB_BFC30FB0 = cpu->gpr[1]; - psx_taken_BFC30FB0 = (psx_brA_BFC30FB0 != psx_brB_BFC30FB0); - psx_delay_BFC30FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30FB4: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048FB4u); -#endif - if (psx_delay_BFC30FB0) { - psx_delay_BFC30FB0 = 0; - if (psx_taken_BFC30FB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FC4u); - goto label_BFC30FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FB8u); - } -label_BFC30FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30FB8: 14410002 bne $v0, $at, 0xBFC30FC4 */ - uint32_t psx_brA_BFC30FB8 = cpu->gpr[2]; uint32_t psx_brB_BFC30FB8 = cpu->gpr[1]; - psx_taken_BFC30FB8 = (psx_brA_BFC30FB8 != psx_brB_BFC30FB8); - psx_delay_BFC30FB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FBCu); -#endif - if (psx_delay_BFC30FB8) { - psx_delay_BFC30FB8 = 0; - if (psx_taken_BFC30FB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FC4u); - goto label_BFC30FC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FC0u); - } -label_BFC30FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30FC0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80048FC0u); return; -#ifdef PSX_COSIM - cosim_instr(0x80048FC0u); -#endif -label_BFC30FC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FC4: 1000000E beq $zero, $zero, 0xBFC31000 */ - uint32_t psx_brA_BFC30FC4 = cpu->gpr[0]; uint32_t psx_brB_BFC30FC4 = cpu->gpr[0]; - psx_taken_BFC30FC4 = (psx_brA_BFC30FC4 == psx_brB_BFC30FC4); - psx_delay_BFC30FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FC8u); -#endif - if (psx_delay_BFC30FC4) { - psx_delay_BFC30FC4 = 0; - if (psx_taken_BFC30FC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049000u); - goto label_BFC31000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FCCu); - } -label_BFC30FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC30FCC: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80048FD4u; /* jal link before delay slot */ - psx_delay_BFC30FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FD0u); -#endif - if (psx_delay_BFC30FCC) { - psx_delay_BFC30FCC = 0; - cpu->gpr[31] = 0x80048FD4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC30FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC30FD4: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x80048FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC30FD8: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC30FDC: 16200002 bne $s1, $zero, 0xBFC30FE8 */ - uint32_t psx_brA_BFC30FDC = cpu->gpr[17]; uint32_t psx_brB_BFC30FDC = cpu->gpr[0]; - psx_taken_BFC30FDC = (psx_brA_BFC30FDC != psx_brB_BFC30FDC); - psx_delay_BFC30FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FE0u); -#endif - if (psx_delay_BFC30FDC) { - psx_delay_BFC30FDC = 0; - if (psx_taken_BFC30FDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FE8u); - goto label_BFC30FE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FE4u); - } -label_BFC30FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30FE4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80048FE4u); return; -#ifdef PSX_COSIM - cosim_instr(0x80048FE4u); -#endif -label_BFC30FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC30FE8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80048FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC30FEC: 16210004 bne $s1, $at, 0xBFC31000 */ - uint32_t psx_brA_BFC30FEC = cpu->gpr[17]; uint32_t psx_brB_BFC30FEC = cpu->gpr[1]; - psx_taken_BFC30FEC = (psx_brA_BFC30FEC != psx_brB_BFC30FEC); - psx_delay_BFC30FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC30FF0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80048FF0u); -#endif - if (psx_delay_BFC30FEC) { - psx_delay_BFC30FEC = 0; - if (psx_taken_BFC30FEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049000u); - goto label_BFC31000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FF4u); - } -label_BFC30FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC30FF4: 14410002 bne $v0, $at, 0xBFC31000 */ - uint32_t psx_brA_BFC30FF4 = cpu->gpr[2]; uint32_t psx_brB_BFC30FF4 = cpu->gpr[1]; - psx_taken_BFC30FF4 = (psx_brA_BFC30FF4 != psx_brB_BFC30FF4); - psx_delay_BFC30FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC30FF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80048FF8u); -#endif - if (psx_delay_BFC30FF4) { - psx_delay_BFC30FF4 = 0; - if (psx_taken_BFC30FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049000u); - goto label_BFC31000; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048FFCu); - } -label_BFC30FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC30FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC30FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80048FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC30FFC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80048FFCu); return; -#ifdef PSX_COSIM - cosim_instr(0x80048FFCu); -#endif -label_BFC31000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31000: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80049008u; /* jal link before delay slot */ - psx_delay_BFC31000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31004: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049004u); -#endif - if (psx_delay_BFC31000) { - psx_delay_BFC31000 = 0; - cpu->gpr[31] = 0x80049008u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC31008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC31008: 0054001A div $v0, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0054001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x80049008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3100C: 00005010 mfhi $t2 */ - cpu->gpr[10] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005010u, cpu->gpr[10], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004900Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC31010: 16800002 bne $s4, $zero, 0xBFC3101C */ - uint32_t psx_brA_BFC31010 = cpu->gpr[20]; uint32_t psx_brB_BFC31010 = cpu->gpr[0]; - psx_taken_BFC31010 = (psx_brA_BFC31010 != psx_brB_BFC31010); - psx_delay_BFC31010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31014: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049014u); -#endif - if (psx_delay_BFC31010) { - psx_delay_BFC31010 = 0; - if (psx_taken_BFC31010) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004901Cu); - goto label_BFC3101C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049018u); - } -label_BFC31018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC31018: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80049018u); return; -#ifdef PSX_COSIM - cosim_instr(0x80049018u); -#endif -label_BFC3101C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3101Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004901Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3101C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004901Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC31020: 16810004 bne $s4, $at, 0xBFC31034 */ - uint32_t psx_brA_BFC31020 = cpu->gpr[20]; uint32_t psx_brB_BFC31020 = cpu->gpr[1]; - psx_taken_BFC31020 = (psx_brA_BFC31020 != psx_brB_BFC31020); - psx_delay_BFC31020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31024: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049024u); -#endif - if (psx_delay_BFC31020) { - psx_delay_BFC31020 = 0; - if (psx_taken_BFC31020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049034u); - goto label_BFC31034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049028u); - } -label_BFC31028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC31028: 14410002 bne $v0, $at, 0xBFC31034 */ - uint32_t psx_brA_BFC31028 = cpu->gpr[2]; uint32_t psx_brB_BFC31028 = cpu->gpr[1]; - psx_taken_BFC31028 = (psx_brA_BFC31028 != psx_brB_BFC31028); - psx_delay_BFC31028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3102C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004902Cu); -#endif - if (psx_delay_BFC31028) { - psx_delay_BFC31028 = 0; - if (psx_taken_BFC31028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049034u); - goto label_BFC31034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049030u); - } -label_BFC31030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC31030: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80049030u); return; -#ifdef PSX_COSIM - cosim_instr(0x80049030u); -#endif -label_BFC31034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC31034: 05410011 bgez $t2, 0xBFC3107C */ - uint32_t psx_brA_BFC31034 = cpu->gpr[10]; - psx_taken_BFC31034 = ((int32_t)psx_brA_BFC31034 >= 0); - psx_delay_BFC31034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049038u); -#endif - if (psx_delay_BFC31034) { - psx_delay_BFC31034 = 0; - if (psx_taken_BFC31034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004907Cu); - goto label_BFC3107C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004903Cu); - } -label_BFC3103C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3103Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004903Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3103C: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80049044u; /* jal link before delay slot */ - psx_delay_BFC3103C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049040u); -#endif - if (psx_delay_BFC3103C) { - psx_delay_BFC3103C = 0; - cpu->gpr[31] = 0x80049044u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC31044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC31044: 0054001A div $v0, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0054001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x80049044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31048: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3104C: 00031823 subu $v1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00031823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004904Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC31050: 16800002 bne $s4, $zero, 0xBFC3105C */ - uint32_t psx_brA_BFC31050 = cpu->gpr[20]; uint32_t psx_brB_BFC31050 = cpu->gpr[0]; - psx_taken_BFC31050 = (psx_brA_BFC31050 != psx_brB_BFC31050); - psx_delay_BFC31050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049054u); -#endif - if (psx_delay_BFC31050) { - psx_delay_BFC31050 = 0; - if (psx_taken_BFC31050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004905Cu); - goto label_BFC3105C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049058u); - } -label_BFC31058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC31058: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80049058u); return; -#ifdef PSX_COSIM - cosim_instr(0x80049058u); -#endif -label_BFC3105C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3105Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004905Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3105C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004905Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC31060: 16810004 bne $s4, $at, 0xBFC31074 */ - uint32_t psx_brA_BFC31060 = cpu->gpr[20]; uint32_t psx_brB_BFC31060 = cpu->gpr[1]; - psx_taken_BFC31060 = (psx_brA_BFC31060 != psx_brB_BFC31060); - psx_delay_BFC31060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31064: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049064u); -#endif - if (psx_delay_BFC31060) { - psx_delay_BFC31060 = 0; - if (psx_taken_BFC31060) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049074u); - goto label_BFC31074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049068u); - } -label_BFC31068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC31068: 14410002 bne $v0, $at, 0xBFC31074 */ - uint32_t psx_brA_BFC31068 = cpu->gpr[2]; uint32_t psx_brB_BFC31068 = cpu->gpr[1]; - psx_taken_BFC31068 = (psx_brA_BFC31068 != psx_brB_BFC31068); - psx_delay_BFC31068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3106C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004906Cu); -#endif - if (psx_delay_BFC31068) { - psx_delay_BFC31068 = 0; - if (psx_taken_BFC31068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049074u); - goto label_BFC31074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049070u); - } -label_BFC31070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC31070: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80049070u); return; -#ifdef PSX_COSIM - cosim_instr(0x80049070u); -#endif -label_BFC31074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31074: 1000000F beq $zero, $zero, 0xBFC310B4 */ - uint32_t psx_brA_BFC31074 = cpu->gpr[0]; uint32_t psx_brB_BFC31074 = cpu->gpr[0]; - psx_taken_BFC31074 = (psx_brA_BFC31074 == psx_brB_BFC31074); - psx_delay_BFC31074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31078: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x80049078u); -#endif - if (psx_delay_BFC31074) { - psx_delay_BFC31074 = 0; - if (psx_taken_BFC31074) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490B4u); - goto label_BFC310B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004907Cu); - } -label_BFC3107C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3107Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3107Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004907Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3107C: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x80049084u; /* jal link before delay slot */ - psx_delay_BFC3107C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049080u); -#endif - if (psx_delay_BFC3107C) { - psx_delay_BFC3107C = 0; - cpu->gpr[31] = 0x80049084u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC31084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC31084: 0054001A div $v0, $s4 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[20]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0054001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[20]); -#ifdef PSX_COSIM - cosim_instr(0x80049084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31088: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC3108C: 16800002 bne $s4, $zero, 0xBFC31098 */ - uint32_t psx_brA_BFC3108C = cpu->gpr[20]; uint32_t psx_brB_BFC3108C = cpu->gpr[0]; - psx_taken_BFC3108C = (psx_brA_BFC3108C != psx_brB_BFC3108C); - psx_delay_BFC3108C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31090: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049090u); -#endif - if (psx_delay_BFC3108C) { - psx_delay_BFC3108C = 0; - if (psx_taken_BFC3108C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049098u); - goto label_BFC31098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049094u); - } -label_BFC31094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC31094: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80049094u); return; -#ifdef PSX_COSIM - cosim_instr(0x80049094u); -#endif -label_BFC31098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC31098: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80049098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC3109C: 16810004 bne $s4, $at, 0xBFC310B0 */ - uint32_t psx_brA_BFC3109C = cpu->gpr[20]; uint32_t psx_brB_BFC3109C = cpu->gpr[1]; - psx_taken_BFC3109C = (psx_brA_BFC3109C != psx_brB_BFC3109C); - psx_delay_BFC3109C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC310A0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800490A0u); -#endif - if (psx_delay_BFC3109C) { - psx_delay_BFC3109C = 0; - if (psx_taken_BFC3109C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490B0u); - goto label_BFC310B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490A4u); - } -label_BFC310A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC310A4: 14410002 bne $v0, $at, 0xBFC310B0 */ - uint32_t psx_brA_BFC310A4 = cpu->gpr[2]; uint32_t psx_brB_BFC310A4 = cpu->gpr[1]; - psx_taken_BFC310A4 = (psx_brA_BFC310A4 != psx_brB_BFC310A4); - psx_delay_BFC310A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC310A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800490A8u); -#endif - if (psx_delay_BFC310A4) { - psx_delay_BFC310A4 = 0; - if (psx_taken_BFC310A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490B0u); - goto label_BFC310B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490ACu); - } -label_BFC310AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC310AC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800490ACu); return; -#ifdef PSX_COSIM - cosim_instr(0x800490ACu); -#endif -label_BFC310B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC310B0: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x800490B0u); -#endif -label_BFC310B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC310B4: 26050001 addiu $a1, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800490B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC310B8: 24660001 addiu $a2, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24660001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800490B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC310BC: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x800490C4u; /* jal link before delay slot */ - psx_delay_BFC310BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC310C0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490C0u); -#endif - if (psx_delay_BFC310BC) { - psx_delay_BFC310BC = 0; - cpu->gpr[31] = 0x800490C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC310C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210001u); -#endif - /* 0xBFC310C4: 02A08021 addu $s0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC310C8: 1600FFA1 bne $s0, $zero, 0xBFC30F50 */ - uint32_t psx_brA_BFC310C8 = cpu->gpr[16]; uint32_t psx_brB_BFC310C8 = cpu->gpr[0]; - psx_taken_BFC310C8 = (psx_brA_BFC310C8 != psx_brB_BFC310C8); - psx_delay_BFC310C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC310CC: 26B5FFFF addiu $s5, $s5, -1 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-1)); - PGXP_ALU(0x26B5FFFFu, cpu->gpr[21], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800490CCu); -#endif - if (psx_delay_BFC310C8) { - psx_delay_BFC310C8 = 0; - if (psx_taken_BFC310C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80048F50u); - goto label_BFC30F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490D0u); - } -label_BFC310D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490D0u); -#endif - /* 0xBFC310D0: 8FB40040 lw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800490D0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800490D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC310D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800490D4u); -#endif -label_BFC310D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC310D8: 1AC00017 blez $s6, 0xBFC31138 */ - uint32_t psx_brA_BFC310D8 = cpu->gpr[22]; - psx_taken_BFC310D8 = ((int32_t)psx_brA_BFC310D8 <= 0); - psx_delay_BFC310D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC310DC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490DCu); -#endif - if (psx_delay_BFC310D8) { - psx_delay_BFC310D8 = 0; - if (psx_taken_BFC310D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049138u); - goto label_BFC31138; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490E0u); - } -label_BFC310E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC310E0: 1A400011 blez $s2, 0xBFC31128 */ - uint32_t psx_brA_BFC310E0 = cpu->gpr[18]; - psx_taken_BFC310E0 = ((int32_t)psx_brA_BFC310E0 <= 0); - psx_delay_BFC310E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC310E4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490E4u); -#endif - if (psx_delay_BFC310E0) { - psx_delay_BFC310E0 = 0; - if (psx_taken_BFC310E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049128u); - goto label_BFC31128; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490E8u); - } -label_BFC310E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC310E8: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x800490E8u); -#endif -label_BFC310EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC310EC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC310F0: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x800490F8u; /* jal link before delay slot */ - psx_delay_BFC310F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20041u); -#endif - /* 0xBFC310F4: 02203021 addu $a2, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800490F4u); -#endif - if (psx_delay_BFC310F0) { - psx_delay_BFC310F0 = 0; - cpu->gpr[31] = 0x800490F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC310F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC310F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC310F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800490F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC310F8: 10400008 beq $v0, $zero, 0xBFC3111C */ - uint32_t psx_brA_BFC310F8 = cpu->gpr[2]; uint32_t psx_brB_BFC310F8 = cpu->gpr[0]; - psx_taken_BFC310F8 = (psx_brA_BFC310F8 == psx_brB_BFC310F8); - psx_delay_BFC310F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC310FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800490FCu); -#endif - if (psx_delay_BFC310F8) { - psx_delay_BFC310F8 = 0; - if (psx_taken_BFC310F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004911Cu); - goto label_BFC3111C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049100u); - } -label_BFC31100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC31100: 02320019 multu $s1, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[17] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[17])); -#endif - PGXP_MULDIV(0x02320019u, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x80049100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC31104: 00107040 sll $t6, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 1u; - PGXP_ALU(0x00107040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80049104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC31108: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3110C: 000B6040 sll $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 1u; - PGXP_ALU(0x000B6040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004910Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83000u); -#endif - /* 0xBFC31110: 026C6821 addu $t5, $s3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[19] + cpu->gpr[12]; - PGXP_ALU(0x026C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC31114: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC31118: A5E00000 sh $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049118u); return; } g_debug_last_store_pc = 0x80049118u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049118u); -#endif -label_BFC3111C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3111Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3111C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC31120: 1612FFF2 bne $s0, $s2, 0xBFC310EC */ - uint32_t psx_brA_BFC31120 = cpu->gpr[16]; uint32_t psx_brB_BFC31120 = cpu->gpr[18]; - psx_taken_BFC31120 = (psx_brA_BFC31120 != psx_brB_BFC31120); - psx_delay_BFC31120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31124: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x80049124u); -#endif - if (psx_delay_BFC31120) { - psx_delay_BFC31120 = 0; - if (psx_taken_BFC31120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490ECu); - goto label_BFC310EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049128u); - } -label_BFC31128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC31128: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420002u); -#endif - /* 0xBFC3112C: 0236082A slt $at, $s1, $s6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[22] ? 1 : 0); - PGXP_ALU(0x0236082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004912Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC31130: 1420FFEB bne $at, $zero, 0xBFC310E0 */ - uint32_t psx_brA_BFC31130 = cpu->gpr[1]; uint32_t psx_brB_BFC31130 = cpu->gpr[0]; - psx_taken_BFC31130 = (psx_brA_BFC31130 != psx_brB_BFC31130); - psx_delay_BFC31130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049134u); -#endif - if (psx_delay_BFC31130) { - psx_delay_BFC31130 = 0; - if (psx_taken_BFC31130) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800490E0u); - goto label_BFC310E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049138u); - } -label_BFC31138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049138u); -#endif - /* 0xBFC31138: 8FA20108 lw $v0, 264($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049138u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20108u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3113C: 24180010 addiu $t8, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24180010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31140: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80049140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC31144: AC580000 sw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049144u); return; } g_debug_last_store_pc = 0x80049144u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC31148: AC590004 sw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049148u); return; } g_debug_last_store_pc = 0x80049148u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3114C: A440000C sh $zero, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004914Cu); return; } g_debug_last_store_pc = 0x8004914Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004914Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31150: A440000E sh $zero, 14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049150u); return; } g_debug_last_store_pc = 0x80049150u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC31154: A4520010 sh $s2, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049154u); return; } g_debug_last_store_pc = 0x80049154u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA4520010u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80049154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC31158: A4560012 sh $s6, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049158u); return; } g_debug_last_store_pc = 0x80049158u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[22] & 0xFFFFu)); } - PGXP_STORE(0xA4560012u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80049158u); -#endif - /* 0xBFC3115C: 8FA8004C lw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004915Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004915Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC31164: 00084840 sll $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 1u; - PGXP_ALU(0x00084840u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80049164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC31168: 252A000C addiu $t2, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x252A000Cu, cpu->gpr[10], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3116C: AC4A0008 sw $t2, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004916Cu); return; } g_debug_last_store_pc = 0x8004916Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004916Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049170u); -#endif - /* 0xBFC31170: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049170u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049170u); -#endif - /* 0xBFC31174: 8FB60038 lw $s6, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049174u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60038u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80049174u); -#endif - /* 0xBFC31178: 8FB50034 lw $s5, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049178u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50034u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80049178u); -#endif - /* 0xBFC3117C: 8FB30030 lw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004917Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004917Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049180u); -#endif - /* 0xBFC31180: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049180u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80049180u); -#endif - /* 0xBFC31184: 8FB10028 lw $s1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049184u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10028u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80049184u); -#endif - /* 0xBFC31188: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049188u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3118C: 03E00008 jr $ra */ - psx_delay_BFC3118C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31190: 27BD0108 addiu $sp, $sp, 264 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (264)); - PGXP_ALU(0x27BD0108u, cpu->gpr[29], _pgx1, 0x00000108u); } -#ifdef PSX_COSIM - cosim_instr(0x80049190u); -#endif - if (psx_delay_BFC3118C) { - psx_delay_BFC3118C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31194(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31194u); - int psx_delay_BFC311C4 = 0; - int psx_delay_BFC311D4 = 0; - int psx_delay_BFC311F8 = 0; - int psx_delay_BFC3122C = 0; - int psx_delay_BFC31234 = 0; - int psx_delay_BFC3123C = 0; - int psx_taken_BFC3123C = 0; - int psx_delay_BFC31280 = 0; - int psx_delay_BFC31288 = 0; - int psx_taken_BFC31288 = 0; - int psx_delay_BFC312CC = 0; - int psx_taken_BFC312CC = 0; - int psx_delay_BFC312DC = 0; - int psx_taken_BFC312DC = 0; - int psx_delay_BFC312F4 = 0; - int psx_taken_BFC312F4 = 0; - int psx_delay_BFC31304 = 0; - int psx_delay_BFC3130C = 0; - int psx_delay_BFC31318 = 0; - int psx_delay_BFC31378 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC311CCu: goto label_BFC311CC; - case 0xBFC311DCu: goto label_BFC311DC; - case 0xBFC31200u: goto label_BFC31200; - case 0xBFC31234u: goto label_BFC31234; - case 0xBFC3123Cu: goto label_BFC3123C; - case 0xBFC31244u: goto label_BFC31244; - case 0xBFC31288u: goto label_BFC31288; - case 0xBFC31290u: goto label_BFC31290; - case 0xBFC31294u: goto label_BFC31294; - case 0xBFC312D4u: goto label_BFC312D4; - case 0xBFC312D8u: goto label_BFC312D8; - case 0xBFC312E4u: goto label_BFC312E4; - case 0xBFC312E8u: goto label_BFC312E8; - case 0xBFC312FCu: goto label_BFC312FC; - case 0xBFC31300u: goto label_BFC31300; - case 0xBFC3130Cu: goto label_BFC3130C; - case 0xBFC31314u: goto label_BFC31314; - case 0xBFC31320u: goto label_BFC31320; - default: break; - } - } -label_BFC31194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31194: 27BDFB98 addiu $sp, $sp, -1128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-1128)); - PGXP_ALU(0x27BDFB98u, cpu->gpr[29], _pgx1, 0xFFFFFB98u); } -#ifdef PSX_COSIM - cosim_instr(0x80049194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC31198: AFB00050 sw $s0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049198u); return; } g_debug_last_store_pc = 0x80049198u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00050u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3119C: AFBF0054 sw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004919Cu); return; } g_debug_last_store_pc = 0x8004919Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004919Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC311A0: AFA5046C sw $a1, 1132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491A0u); return; } g_debug_last_store_pc = 0x800491A0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5046Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800491A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC311A4: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800491A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC311A8: AFA60470 sw $a2, 1136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491A8u); return; } g_debug_last_store_pc = 0x800491A8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60470u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800491A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC311AC: AFA70474 sw $a3, 1140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491ACu); return; } g_debug_last_store_pc = 0x800491ACu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70474u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800491ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC311B0: 240E01E0 addiu $t6, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240E01E0u, cpu->gpr[14], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x800491B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC311B4: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491B4u); return; } g_debug_last_store_pc = 0x800491B4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800491B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC311B8: 24070348 addiu $a3, $zero, 840 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (840)); - PGXP_ALU(0x24070348u, cpu->gpr[7], _pgx1, 0x00000348u); } -#ifdef PSX_COSIM - cosim_instr(0x800491B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC311BC: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800491BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC311C0: 27A4040C addiu $a0, $sp, 1036 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1036)); - PGXP_ALU(0x27A4040Cu, cpu->gpr[4], _pgx1, 0x0000040Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800491C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC311C4: 0C014553 jal 0xB005154C */ - cpu->gpr[31] = 0x800491CCu; /* jal link before delay slot */ - psx_delay_BFC311C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC311C8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800491C8u); -#endif - if (psx_delay_BFC311C4) { - psx_delay_BFC311C4 = 0; - cpu->gpr[31] = 0x800491CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005154Cu); - cpu->pc = 0x8005154Cu; return; - } -label_BFC311CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC311CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC311CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC311CC: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800491CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC311D0: A3AF0423 sb $t7, 1059($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1059; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800491D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (1059)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA3AF0423u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800491D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC311D4: 0C013D0D jal 0xB004F434 */ - cpu->gpr[31] = 0x800491DCu; /* jal link before delay slot */ - psx_delay_BFC311D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC311D8: 27A4040C addiu $a0, $sp, 1036 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1036)); - PGXP_ALU(0x27A4040Cu, cpu->gpr[4], _pgx1, 0x0000040Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800491D8u); -#endif - if (psx_delay_BFC311D4) { - psx_delay_BFC311D4 = 0; - cpu->gpr[31] = 0x800491DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F434u); - cpu->pc = 0x8004F434u; return; - } -label_BFC311DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC311DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC311DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491DCu); -#endif - /* 0xBFC311DC: 8FB90470 lw $t9, 1136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491DCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90470u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800491DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491E0u); -#endif - /* 0xBFC311E0: 8FA80474 lw $t0, 1140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800491E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80474u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800491E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC311E4: A7A003F6 sh $zero, 1014($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1014; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1014)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800491E4u); return; } g_debug_last_store_pc = 0x800491E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A003F6u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800491E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC311E8: 24180280 addiu $t8, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24180280u, cpu->gpr[24], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800491E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC311EC: A7B803F4 sh $t8, 1012($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1012; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1012)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800491ECu); return; } g_debug_last_store_pc = 0x800491ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B803F4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800491ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800491F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC311F0: A7B903F8 sh $t9, 1016($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1016; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1016)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800491F0u); return; } g_debug_last_store_pc = 0x800491F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B903F8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800491F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC311F4: 27A403FC addiu $a0, $sp, 1020 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1020)); - PGXP_ALU(0x27A403FCu, cpu->gpr[4], _pgx1, 0x000003FCu); } -#ifdef PSX_COSIM - cosim_instr(0x800491F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC311F8: 0C0146E9 jal 0xB0051BA4 */ - cpu->gpr[31] = 0x80049200u; /* jal link before delay slot */ - psx_delay_BFC311F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC311FC: A7A803FA sh $t0, 1018($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1018; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1018)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800491FCu); return; } g_debug_last_store_pc = 0x800491FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A803FAu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800491FCu); -#endif - if (psx_delay_BFC311F8) { - psx_delay_BFC311F8 = 0; - cpu->gpr[31] = 0x80049200u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051BA4u); - cpu->pc = 0x80051BA4u; return; - } -label_BFC31200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31200: A3A00400 sb $zero, 1024($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1024; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049200u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (1024)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00400u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31204: A3A00401 sb $zero, 1025($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1025; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049204u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (1025)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00401u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31208: A3A00402 sb $zero, 1026($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1026; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049208u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (1026)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3A00402u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049208u); -#endif - /* 0xBFC3120C: 87A903F4 lh $t1, 1012($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1012; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1012)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004920Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A903F4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004920Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049210u); -#endif - /* 0xBFC31210: 87AA03F6 lh $t2, 1014($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1014; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1014)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049210u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA03F6u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049210u); -#endif - /* 0xBFC31214: 87AB03F8 lh $t3, 1016($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1016; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1016)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049214u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB03F8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049214u); -#endif - /* 0xBFC31218: 87AC03FA lh $t4, 1018($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1018; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1018)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049218u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC03FAu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3121C: A7A90404 sh $t1, 1028($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1028; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1028)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004921Cu); return; } g_debug_last_store_pc = 0x8004921Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90404u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004921Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31220: A7AA0406 sh $t2, 1030($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1030; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1030)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049220u); return; } g_debug_last_store_pc = 0x80049220u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0406u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC31224: A7AB0408 sh $t3, 1032($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1032; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1032)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049224u); return; } g_debug_last_store_pc = 0x80049224u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0408u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31228: 27A403FC addiu $a0, $sp, 1020 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1020)); - PGXP_ALU(0x27A403FCu, cpu->gpr[4], _pgx1, 0x000003FCu); } -#ifdef PSX_COSIM - cosim_instr(0x80049228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3122C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80049234u; /* jal link before delay slot */ - psx_delay_BFC3122C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC31230: A7AC040A sh $t4, 1034($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1034; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1034)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049230u); return; } g_debug_last_store_pc = 0x80049230u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC040Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049230u); -#endif - if (psx_delay_BFC3122C) { - psx_delay_BFC3122C = 0; - cpu->gpr[31] = 0x80049234u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC31234: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31234u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31234: 0C010FC0 jal 0xB0043F00 */ - cpu->gpr[31] = 0x8004923Cu; /* jal link before delay slot */ - psx_delay_BFC31234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31238: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049238u); -#endif - if (psx_delay_BFC31234) { - psx_delay_BFC31234 = 0; - cpu->gpr[31] = 0x8004923Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80043F00u); - cpu->pc = 0x80043F00u; return; - } -label_BFC3123C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3123Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3123Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004923Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3123C: 10400015 beq $v0, $zero, 0xBFC31294 */ - uint32_t psx_brA_BFC3123C = cpu->gpr[2]; uint32_t psx_brB_BFC3123C = cpu->gpr[0]; - psx_taken_BFC3123C = (psx_brA_BFC3123C == psx_brB_BFC3123C); - psx_delay_BFC3123C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049240u); -#endif - /* 0xBFC31240: 8FA7047C lw $a3, 1148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049240u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7047Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049240u); -#endif - if (psx_delay_BFC3123C) { - psx_delay_BFC3123C = 0; - if (psx_taken_BFC3123C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049294u); - goto label_BFC31294; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049244u); - } -label_BFC31244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049244u); -#endif - /* 0xBFC31244: 8FA20480 lw $v0, 1152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049244u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20480u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049244u); -#endif - /* 0xBFC31248: 8FA60478 lw $a2, 1144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049248u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60478u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80049248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3124C: AFA20010 sw $v0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004924Cu); return; } g_debug_last_store_pc = 0x8004924Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004924Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC31250: AFA20014 sw $v0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049250u); return; } g_debug_last_store_pc = 0x80049250u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049250u); -#endif - /* 0xBFC31254: 8FAD0484 lw $t5, 1156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049254u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0484u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049254u); -#endif - /* 0xBFC31258: 8FAE0488 lw $t6, 1160($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1160; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049258u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0488u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049258u); -#endif - /* 0xBFC3125C: 8FAF048C lw $t7, 1164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004925Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF048Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004925Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049260u); -#endif - /* 0xBFC31260: 8FB80490 lw $t8, 1168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049260u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80490u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC31264: AFAD0018 sw $t5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049264u); return; } g_debug_last_store_pc = 0x80049264u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049264u); -#endif - /* 0xBFC31268: 8FA5046C lw $a1, 1132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049268u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5046Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80049268u); -#endif - /* 0xBFC3126C: 8FA7047C lw $a3, 1148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004926Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7047Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004926Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC31270: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049270u); return; } g_debug_last_store_pc = 0x80049270u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31274: AFAF0020 sw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049274u); return; } g_debug_last_store_pc = 0x80049274u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31278: 27A4005C addiu $a0, $sp, 92 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (92)); - PGXP_ALU(0x27A4005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3127C: 24C60280 addiu $a2, $a2, 640 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (640)); - PGXP_ALU(0x24C60280u, cpu->gpr[6], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x8004927Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31280: 0C012512 jal 0xB0049448 */ - cpu->gpr[31] = 0x80049288u; /* jal link before delay slot */ - psx_delay_BFC31280 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31284: AFB80024 sw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049284u); return; } g_debug_last_store_pc = 0x80049284u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049284u); -#endif - if (psx_delay_BFC31280) { - psx_delay_BFC31280 = 0; - cpu->gpr[31] = 0x80049288u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049448u); - cpu->pc = 0x80049448u; return; - } -label_BFC31288: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31288u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31288: 10000020 beq $zero, $zero, 0xBFC3130C */ - uint32_t psx_brA_BFC31288 = cpu->gpr[0]; uint32_t psx_brB_BFC31288 = cpu->gpr[0]; - psx_taken_BFC31288 = (psx_brA_BFC31288 == psx_brB_BFC31288); - psx_delay_BFC31288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3128C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004928Cu); -#endif - if (psx_delay_BFC31288) { - psx_delay_BFC31288 = 0; - if (psx_taken_BFC31288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004930Cu); - goto label_BFC3130C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049290u); - } -label_BFC31290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049290u); -#endif - /* 0xBFC31290: 8FA7047C lw $a3, 1148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049290u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA7047Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049290u); -#endif -label_BFC31294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049294u); -#endif - /* 0xBFC31294: 8FA20480 lw $v0, 1152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049294u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20480u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049294u); -#endif - /* 0xBFC31298: 8FA90488 lw $t1, 1160($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1160; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049298u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90488u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3129C: AFA20010 sw $v0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004929Cu); return; } g_debug_last_store_pc = 0x8004929Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004929Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492A0u); -#endif - /* 0xBFC312A0: 8FA60478 lw $a2, 1144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492A0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60478u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800492A0u); -#endif - /* 0xBFC312A4: 8FA80484 lw $t0, 1156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492A4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80484u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800492A4u); -#endif - /* 0xBFC312A8: 8FAB048C lw $t3, 1164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492A8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB048Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800492A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC312AC: AFA80018 sw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492ACu); return; } g_debug_last_store_pc = 0x800492ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800492ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492B0u); -#endif - /* 0xBFC312B0: 8FAC0490 lw $t4, 1168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492B0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0490u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800492B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC312B4: AFAB0020 sw $t3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492B4u); return; } g_debug_last_store_pc = 0x800492B4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0020u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800492B4u); -#endif - /* 0xBFC312B8: 8FA5046C lw $a1, 1132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492B8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5046Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800492B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC312BC: AFAC0024 sw $t4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492BCu); return; } g_debug_last_store_pc = 0x800492BCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0024u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800492BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC312C0: 27A4005C addiu $a0, $sp, 92 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (92)); - PGXP_ALU(0x27A4005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800492C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC312C4: 24C60280 addiu $a2, $a2, 640 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (640)); - PGXP_ALU(0x24C60280u, cpu->gpr[6], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800492C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC312C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800492C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC312CC: 04E10002 bgez $a3, 0xBFC312D8 */ - uint32_t psx_brA_BFC312CC = cpu->gpr[7]; - psx_taken_BFC312CC = ((int32_t)psx_brA_BFC312CC >= 0); - psx_delay_BFC312CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC312D0: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800492D0u); -#endif - if (psx_delay_BFC312CC) { - psx_delay_BFC312CC = 0; - if (psx_taken_BFC312CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800492D8u); - goto label_BFC312D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800492D4u); - } -label_BFC312D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC312D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC312D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC312D4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800492D4u); -#endif -label_BFC312D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC312D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC312D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC312D8: 00013843 sra $a3, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00013843u, cpu->gpr[7], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800492D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC312DC: 04410002 bgez $v0, 0xBFC312E8 */ - uint32_t psx_brA_BFC312DC = cpu->gpr[2]; - psx_taken_BFC312DC = ((int32_t)psx_brA_BFC312DC >= 0); - psx_delay_BFC312DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7u); -#endif - /* 0xBFC312E0: 00400821 addu $at, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800492E0u); -#endif - if (psx_delay_BFC312DC) { - psx_delay_BFC312DC = 0; - if (psx_taken_BFC312DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800492E8u); - goto label_BFC312E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800492E4u); - } -label_BFC312E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC312E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC312E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC312E4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800492E4u); -#endif -label_BFC312E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC312E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC312E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC312E8: 0001C843 sra $t9, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001C843u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800492E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC312EC: AFB90014 sw $t9, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800492ECu); return; } g_debug_last_store_pc = 0x800492ECu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90014u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800492ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC312F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800492F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC312F4: 05210002 bgez $t1, 0xBFC31300 */ - uint32_t psx_brA_BFC312F4 = cpu->gpr[9]; - psx_taken_BFC312F4 = ((int32_t)psx_brA_BFC312F4 >= 0); - psx_delay_BFC312F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x203u); -#endif - /* 0xBFC312F8: 01200821 addu $at, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800492F8u); -#endif - if (psx_delay_BFC312F4) { - psx_delay_BFC312F4 = 0; - if (psx_taken_BFC312F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049300u); - goto label_BFC31300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800492FCu); - } -label_BFC312FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC312FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC312FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800492FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC312FC: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800492FCu); -#endif -label_BFC31300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC31300: 00015043 sra $t2, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015043u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80049300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31304: 0C012512 jal 0xB0049448 */ - cpu->gpr[31] = 0x8004930Cu; /* jal link before delay slot */ - psx_delay_BFC31304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31308: AFAA001C sw $t2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049308u); return; } g_debug_last_store_pc = 0x80049308u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049308u); -#endif - if (psx_delay_BFC31304) { - psx_delay_BFC31304 = 0; - cpu->gpr[31] = 0x8004930Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049448u); - cpu->pc = 0x80049448u; return; - } -label_BFC3130C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3130Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004930Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3130C: 0C0124FB jal 0xB00493EC */ - cpu->gpr[31] = 0x80049314u; /* jal link before delay slot */ - psx_delay_BFC3130C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31310: 27A4005C addiu $a0, $sp, 92 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (92)); - PGXP_ALU(0x27A4005Cu, cpu->gpr[4], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049310u); -#endif - if (psx_delay_BFC3130C) { - psx_delay_BFC3130C = 0; - cpu->gpr[31] = 0x80049314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800493ECu); - cpu->pc = 0x800493ECu; return; - } -label_BFC31314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC31314: 27A403F4 addiu $a0, $sp, 1012 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1012)); - PGXP_ALU(0x27A403F4u, cpu->gpr[4], _pgx1, 0x000003F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80049314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31318: 0C013C4C jal 0xB004F130 */ - cpu->gpr[31] = 0x80049320u; /* jal link before delay slot */ - psx_delay_BFC31318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC3131C: 26050014 addiu $a1, $s0, 20 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (20)); - PGXP_ALU(0x26050014u, cpu->gpr[5], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004931Cu); -#endif - if (psx_delay_BFC31318) { - psx_delay_BFC31318 = 0; - cpu->gpr[31] = 0x80049320u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F130u); - cpu->pc = 0x8004F130u; return; - } -label_BFC31320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC31320: 240D0010 addiu $t5, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240D0010u, cpu->gpr[13], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80049320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC31324: 240E0002 addiu $t6, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240E0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80049324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC31328: AE0D0000 sw $t5, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049328u); return; } g_debug_last_store_pc = 0x80049328u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAE0D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC3132C: AE0E0004 sw $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004932Cu); return; } g_debug_last_store_pc = 0x8004932Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAE0E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC31330: A600000C sh $zero, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049330u); return; } g_debug_last_store_pc = 0x80049330u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC31334: A600000E sh $zero, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049334u); return; } g_debug_last_store_pc = 0x80049334u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049334u); -#endif - /* 0xBFC31338: 8FAF0470 lw $t7, 1136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049338u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0470u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3133C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC31340: A60F0010 sh $t7, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049340u); return; } g_debug_last_store_pc = 0x80049340u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049340u); -#endif - /* 0xBFC31344: 8FB80474 lw $t8, 1140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049344u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80474u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC3134C: A6180012 sh $t8, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004934Cu); return; } g_debug_last_store_pc = 0x8004934Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180012u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049350u); -#endif - /* 0xBFC31350: 8FA80474 lw $t0, 1140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049350u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80474u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049350u); -#endif - /* 0xBFC31354: 8FB90470 lw $t9, 1136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049354u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90470u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31358: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3135C: 03280019 multu $t9, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03280019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004935Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC31360: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC31364: 00095040 sll $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 1u; - PGXP_ALU(0x00095040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80049364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC31368: 254B000C addiu $t3, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (12)); - PGXP_ALU(0x254B000Cu, cpu->gpr[11], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC3136C: AE0B0008 sw $t3, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004936Cu); return; } g_debug_last_store_pc = 0x8004936Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAE0B0008u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004936Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049370u); -#endif - /* 0xBFC31370: 8FBF0054 lw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049370u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049370u); -#endif - /* 0xBFC31374: 8FB00050 lw $s0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049374u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00050u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31378: 03E00008 jr $ra */ - psx_delay_BFC31378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3137C: 27BD0468 addiu $sp, $sp, 1128 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (1128)); - PGXP_ALU(0x27BD0468u, cpu->gpr[29], _pgx1, 0x00000468u); } -#ifdef PSX_COSIM - cosim_instr(0x8004937Cu); -#endif - if (psx_delay_BFC31378) { - psx_delay_BFC31378 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31380(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31380u); - int psx_delay_BFC313B0 = 0; - int psx_delay_BFC313C8 = 0; - int psx_taken_BFC313C8 = 0; - int psx_delay_BFC313E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC313ACu: goto label_BFC313AC; - case 0xBFC313B8u: goto label_BFC313B8; - case 0xBFC313D0u: goto label_BFC313D0; - default: break; - } - } -label_BFC31380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31380: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC31384: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049384u); return; } g_debug_last_store_pc = 0x80049384u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80049384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC31388: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049388u); return; } g_debug_last_store_pc = 0x80049388u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3138C: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004938Cu); return; } g_debug_last_store_pc = 0x8004938Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004938Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC31390: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC31394: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049394u); return; } g_debug_last_store_pc = 0x80049394u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC31398: 00A09821 addu $s3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3139C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004939Cu); return; } g_debug_last_store_pc = 0x8004939Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004939Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC313A0: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC313A4: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC313A8: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493A8u); -#endif -label_BFC313AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC313ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC313ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC313AC: 2610001C addiu $s0, $s0, 28 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (28)); - PGXP_ALU(0x2610001Cu, cpu->gpr[16], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800493ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC313B0: 0C014601 jal 0xB0051804 */ - cpu->gpr[31] = 0x800493B8u; /* jal link before delay slot */ - psx_delay_BFC313B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC313B4: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493B4u); -#endif - if (psx_delay_BFC313B0) { - psx_delay_BFC313B0 = 0; - cpu->gpr[31] = 0x800493B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051804u); - cpu->pc = 0x80051804u; return; - } -label_BFC313B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC313B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC313B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493B8u); -#endif - /* 0xBFC313B8: 864E038C lh $t6, 908($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (908)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800493B8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x40000u); } - PGXP_LOAD(0x864E038Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800493B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC313BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800493BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC313C0: 022E8821 addu $s1, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC313C4: 2A211000 slti $at, $s1, 4096 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0); - PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x800493C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC313C8: 1420FFF8 bne $at, $zero, 0xBFC313AC */ - uint32_t psx_brA_BFC313C8 = cpu->gpr[1]; uint32_t psx_brB_BFC313C8 = cpu->gpr[0]; - psx_taken_BFC313C8 = (psx_brA_BFC313C8 != psx_brB_BFC313C8); - psx_delay_BFC313C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC313CC: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493CCu); -#endif - if (psx_delay_BFC313C8) { - psx_delay_BFC313C8 = 0; - if (psx_taken_BFC313C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800493ACu); - goto label_BFC313AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800493D0u); - } -label_BFC313D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC313D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC313D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493D0u); -#endif - /* 0xBFC313D0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800493D0u); -#endif - /* 0xBFC313D4: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493D4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800493D4u); -#endif - /* 0xBFC313D8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493D8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800493D8u); -#endif - /* 0xBFC313DC: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493DCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800493DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493E0u); -#endif - /* 0xBFC313E0: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493E0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800493E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC313E4: 03E00008 jr $ra */ - psx_delay_BFC313E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC313E8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800493E8u); -#endif - if (psx_delay_BFC313E4) { - psx_delay_BFC313E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC313EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC313ECu); - int psx_delay_BFC31410 = 0; - int psx_delay_BFC31428 = 0; - int psx_taken_BFC31428 = 0; - int psx_delay_BFC31440 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31410u: goto label_BFC31410; - case 0xBFC31418u: goto label_BFC31418; - case 0xBFC31430u: goto label_BFC31430; - default: break; - } - } -label_BFC313EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC313ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC313ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC313EC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800493ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800493F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC313F0: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493F0u); return; } g_debug_last_store_pc = 0x800493F0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800493F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC313F4: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493F4u); return; } g_debug_last_store_pc = 0x800493F4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800493F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC313F8: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800493F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC313FC: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800493FCu); return; } g_debug_last_store_pc = 0x800493FCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800493FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31400: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049400u); return; } g_debug_last_store_pc = 0x80049400u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC31404: 02408021 addu $s0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC31408: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3140C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004940Cu); -#endif -label_BFC31410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31410: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80049418u; /* jal link before delay slot */ - psx_delay_BFC31410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31414: 2610001C addiu $s0, $s0, 28 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (28)); - PGXP_ALU(0x2610001Cu, cpu->gpr[16], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049414u); -#endif - if (psx_delay_BFC31410) { - psx_delay_BFC31410 = 0; - cpu->gpr[31] = 0x80049418u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC31418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049418u); -#endif - /* 0xBFC31418: 864E038C lh $t6, 908($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (908)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049418u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x40000u); } - PGXP_LOAD(0x864E038Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3141C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004941Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC31420: 022E8821 addu $s1, $s1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[14]; - PGXP_ALU(0x022E8821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC31424: 2A211000 slti $at, $s1, 4096 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0); - PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80049424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC31428: 1420FFF9 bne $at, $zero, 0xBFC31410 */ - uint32_t psx_brA_BFC31428 = cpu->gpr[1]; uint32_t psx_brB_BFC31428 = cpu->gpr[0]; - psx_taken_BFC31428 = (psx_brA_BFC31428 != psx_brB_BFC31428); - psx_delay_BFC31428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3142C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004942Cu); -#endif - if (psx_delay_BFC31428) { - psx_delay_BFC31428 = 0; - if (psx_taken_BFC31428) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049410u); - goto label_BFC31410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049430u); - } -label_BFC31430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049430u); -#endif - /* 0xBFC31430: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049430u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049430u); -#endif - /* 0xBFC31434: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049434u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049434u); -#endif - /* 0xBFC31438: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049438u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80049438u); -#endif - /* 0xBFC3143C: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004943Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004943Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31440: 03E00008 jr $ra */ - psx_delay_BFC31440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31444: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80049444u); -#endif - if (psx_delay_BFC31440) { - psx_delay_BFC31440 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31448(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31448u); - int psx_delay_BFC31528 = 0; - int psx_delay_BFC31538 = 0; - int psx_taken_BFC31538 = 0; - int psx_delay_BFC31548 = 0; - int psx_taken_BFC31548 = 0; - int psx_delay_BFC31578 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31500u: goto label_BFC31500; - case 0xBFC31530u: goto label_BFC31530; - case 0xBFC31540u: goto label_BFC31540; - case 0xBFC31550u: goto label_BFC31550; - case 0xBFC31554u: goto label_BFC31554; - default: break; - } - } -label_BFC31448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31448: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3144C: AFB30044 sw $s3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004944Cu); return; } g_debug_last_store_pc = 0x8004944Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30044u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004944Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC31450: AFBE0058 sw $fp, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049450u); return; } g_debug_last_store_pc = 0x80049450u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0058u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80049450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC31454: AFB60050 sw $s6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049454u); return; } g_debug_last_store_pc = 0x80049454u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60050u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80049454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC31458: AFB70054 sw $s7, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049458u); return; } g_debug_last_store_pc = 0x80049458u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70054u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80049458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3145C: AFB40048 sw $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004945Cu); return; } g_debug_last_store_pc = 0x8004945Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004945Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC31460: AFB5004C sw $s5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049460u); return; } g_debug_last_store_pc = 0x80049460u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5004Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80049460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC31464: AFB20040 sw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049464u); return; } g_debug_last_store_pc = 0x80049464u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80049464u); -#endif - /* 0xBFC31468: 8FB30080 lw $s3, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049468u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30080u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3146C: AFBF005C sw $ra, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004946Cu); return; } g_debug_last_store_pc = 0x8004946Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF005Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004946Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049470u); -#endif - /* 0xBFC31470: 8FB40084 lw $s4, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049470u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40084u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80049470u); -#endif - /* 0xBFC31474: 8FB70078 lw $s7, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049474u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70078u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80049474u); -#endif - /* 0xBFC31478: 8FBE007C lw $fp, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049478u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE007Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80049478u); -#endif - /* 0xBFC3147C: 8FA30070 lw $v1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004947Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30070u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049480u); -#endif - /* 0xBFC31480: 8FA80074 lw $t0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049480u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80074u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC31484: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049484u); return; } g_debug_last_store_pc = 0x80049484u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC31488: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049488u); return; } g_debug_last_store_pc = 0x80049488u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80049488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800010u); -#endif - /* 0xBFC3148C: A4970384 sh $s7, 900($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (900)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004948Cu); return; } g_debug_last_store_pc = 0x8004948Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[23] & 0xFFFFu)); } - PGXP_STORE(0xA4970384u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40021u); -#endif - /* 0xBFC31490: 00A09021 addu $s2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A09021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC31494: 00C0A821 addu $s5, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400081u); -#endif - /* 0xBFC31498: 00E0B021 addu $s6, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC3149C: A492038C sh $s2, 908($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 908; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (908)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004949Cu); return; } g_debug_last_store_pc = 0x8004949Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } - PGXP_STORE(0xA492038Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004949Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200010u); -#endif - /* 0xBFC314A0: A4950380 sh $s5, 896($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (896)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800494A0u); return; } g_debug_last_store_pc = 0x800494A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[21] & 0xFFFFu)); } - PGXP_STORE(0xA4950380u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800494A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC314A4: A4960382 sh $s6, 898($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 898; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (898)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800494A4u); return; } g_debug_last_store_pc = 0x800494A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[22] & 0xFFFFu)); } - PGXP_STORE(0xA4960382u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800494A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000010u); -#endif - /* 0xBFC314A8: A49E0386 sh $fp, 902($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 902; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (902)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800494A8u); return; } g_debug_last_store_pc = 0x800494A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[30] & 0xFFFFu)); } - PGXP_STORE(0xA49E0386u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x800494A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC314AC: A4830388 sh $v1, 904($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (904)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800494ACu); return; } g_debug_last_store_pc = 0x800494ACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4830388u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800494ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC314B0: A488038A sh $t0, 906($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 906; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (906)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800494B0u); return; } g_debug_last_store_pc = 0x800494B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA488038Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800494B0u); -#endif - /* 0xBFC314B4: 926E0000 lbu $t6, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 14, 0x80000u); - PGXP_LOAD(0x926E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800494B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC314B8: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800494B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC314BC: A08E038E sb $t6, 910($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 910; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (910)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E038Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800494BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494C0u); -#endif - /* 0xBFC314C0: 926F0001 lbu $t7, 1($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 1; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (1)), 15, 0x80000u); - PGXP_LOAD(0x926F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800494C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC314C4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800494C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC314C8: A08F038F sb $t7, 911($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 911; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (911)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08F038Fu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800494C8u); -#endif - /* 0xBFC314CC: 92780002 lbu $t8, 2($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 2; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (2)), 24, 0x80000u); - PGXP_LOAD(0x92780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800494CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC314D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800494D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC314D4: A0980390 sb $t8, 912($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 912; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (912)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0980390u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800494D4u); -#endif - /* 0xBFC314D8: 92990000 lbu $t9, 0($s4) */ - { uint32_t _pgxa = cpu->gpr[20]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (0)), 25, 0x100000u); - PGXP_LOAD(0x92990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800494D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC314DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800494DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC314E0: A0990392 sb $t9, 914($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 914; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (914)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990392u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800494E0u); -#endif - /* 0xBFC314E4: 92890001 lbu $t1, 1($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (1)), 9, 0x100000u); - PGXP_LOAD(0x92890001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800494E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC314E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800494E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC314EC: A0890393 sb $t1, 915($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 915; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (915)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0890393u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800494ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800494F0u); -#endif - /* 0xBFC314F0: 928A0002 lbu $t2, 2($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (2)), 10, 0x100000u); - PGXP_LOAD(0x928A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800494F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC314F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800494F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC314F8: A08A0394 sb $t2, 916($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 916; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800494F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (916)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA08A0394u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800494F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC314FC: AFA30010 sw $v1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800494FCu); return; } g_debug_last_store_pc = 0x800494FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800494FCu); -#endif -label_BFC31500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC31500: AFA80014 sw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049500u); return; } g_debug_last_store_pc = 0x80049500u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC31504: AFB70018 sw $s7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049504u); return; } g_debug_last_store_pc = 0x80049504u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70018u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80049504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC31508: AFBE001C sw $fp, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049508u); return; } g_debug_last_store_pc = 0x80049508u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE001Cu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80049508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC3150C: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004950Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC31510: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049510u); return; } g_debug_last_store_pc = 0x80049510u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC31514: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049514u); return; } g_debug_last_store_pc = 0x80049514u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80049514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC31518: 2631001C addiu $s1, $s1, 28 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (28)); - PGXP_ALU(0x2631001Cu, cpu->gpr[17], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80049518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC3151C: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004951Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC31520: 02A03021 addu $a2, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400081u); -#endif - /* 0xBFC31524: 02C03821 addu $a3, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31528: 0C01258E jal 0xB0049638 */ - cpu->gpr[31] = 0x80049530u; /* jal link before delay slot */ - psx_delay_BFC31528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3152C: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004952Cu); return; } g_debug_last_store_pc = 0x8004952Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004952Cu); -#endif - if (psx_delay_BFC31528) { - psx_delay_BFC31528 = 0; - cpu->gpr[31] = 0x80049530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049638u); - cpu->pc = 0x80049638u; return; - } -label_BFC31530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC31530: 02128021 addu $s0, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[18]; - PGXP_ALU(0x02128021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC31534: 2A011000 slti $at, $s0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (4096) ? 1 : 0); - PGXP_ALU(0x2A011000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80049534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC31538: 10200006 beq $at, $zero, 0xBFC31554 */ - uint32_t psx_brA_BFC31538 = cpu->gpr[1]; uint32_t psx_brB_BFC31538 = cpu->gpr[0]; - psx_taken_BFC31538 = (psx_brA_BFC31538 == psx_brB_BFC31538); - psx_delay_BFC31538 = 1; - /* 0xBFC3153C: 8FBF005C lw $ra, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004953Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF005Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004953Cu); -#endif - if (psx_delay_BFC31538) { - psx_delay_BFC31538 = 0; - if (psx_taken_BFC31538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049554u); - goto label_BFC31554; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049540u); - } -label_BFC31540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049540u); -#endif - /* 0xBFC31540: 8FA80074 lw $t0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049540u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80074u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049540u); -#endif - /* 0xBFC31544: 8FA30070 lw $v1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049544u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30070u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31548: 1000FFED beq $zero, $zero, 0xBFC31500 */ - uint32_t psx_brA_BFC31548 = cpu->gpr[0]; uint32_t psx_brB_BFC31548 = cpu->gpr[0]; - psx_taken_BFC31548 = (psx_brA_BFC31548 == psx_brB_BFC31548); - psx_delay_BFC31548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3154C: AFA30010 sw $v1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004954Cu); return; } g_debug_last_store_pc = 0x8004954Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004954Cu); -#endif - if (psx_delay_BFC31548) { - psx_delay_BFC31548 = 0; - if (psx_taken_BFC31548) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049500u); - goto label_BFC31500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049550u); - } -label_BFC31550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049550u); -#endif - /* 0xBFC31550: 8FBF005C lw $ra, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049550u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF005Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049550u); -#endif -label_BFC31554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049554u); -#endif - /* 0xBFC31554: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049554u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049554u); -#endif - /* 0xBFC31558: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049558u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80049558u); -#endif - /* 0xBFC3155C: 8FB20040 lw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004955Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049560u); -#endif - /* 0xBFC31560: 8FB30044 lw $s3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049560u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30044u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049560u); -#endif - /* 0xBFC31564: 8FB40048 lw $s4, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049564u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40048u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80049564u); -#endif - /* 0xBFC31568: 8FB5004C lw $s5, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049568u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5004Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80049568u); -#endif - /* 0xBFC3156C: 8FB60050 lw $s6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004956Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60050u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004956Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049570u); -#endif - /* 0xBFC31570: 8FB70054 lw $s7, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049570u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70054u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80049570u); -#endif - /* 0xBFC31574: 8FBE0058 lw $fp, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049574u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0058u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80049574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31578: 03E00008 jr $ra */ - psx_delay_BFC31578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3157C: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8004957Cu); -#endif - if (psx_delay_BFC31578) { - psx_delay_BFC31578 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31580(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31580u); - int psx_delay_BFC315F4 = 0; - int psx_delay_BFC3160C = 0; - int psx_taken_BFC3160C = 0; - int psx_delay_BFC31630 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC315B8u: goto label_BFC315B8; - case 0xBFC315FCu: goto label_BFC315FC; - case 0xBFC31614u: goto label_BFC31614; - default: break; - } - } -label_BFC31580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31580: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC31584: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049584u); return; } g_debug_last_store_pc = 0x80049584u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31588: AFBF004C sw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049588u); return; } g_debug_last_store_pc = 0x80049588u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3158C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC31590: AFB50048 sw $s5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049590u); return; } g_debug_last_store_pc = 0x80049590u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50048u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80049590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC31594: AFB40044 sw $s4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049594u); return; } g_debug_last_store_pc = 0x80049594u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40044u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80049594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC31598: AFB30040 sw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049598u); return; } g_debug_last_store_pc = 0x80049598u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3159C: AFB2003C sw $s2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004959Cu); return; } g_debug_last_store_pc = 0x8004959Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2003Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004959Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC315A0: AFB10038 sw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495A0u); return; } g_debug_last_store_pc = 0x800495A0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800495A0u); -#endif - /* 0xBFC315A4: 8613038C lh $s3, 908($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (908)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495A4u); return; } cpu->gpr[19] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 19, 0x10000u); } - PGXP_LOAD(0x8613038Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800495A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50001u); -#endif - /* 0xBFC315A8: 02009021 addu $s2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800495A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC315AC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800495ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC315B0: 2614038E addiu $s4, $s0, 910 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[16] + (910)); - PGXP_ALU(0x2614038Eu, cpu->gpr[20], _pgx1, 0x0000038Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800495B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC315B4: 26150392 addiu $s5, $s0, 914 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[16] + (914)); - PGXP_ALU(0x26150392u, cpu->gpr[21], _pgx1, 0x00000392u); } -#ifdef PSX_COSIM - cosim_instr(0x800495B4u); -#endif -label_BFC315B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC315B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC315B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495B8u); -#endif - /* 0xBFC315B8: 860E0388 lh $t6, 904($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 904; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (904)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495B8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0388u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800495B8u); -#endif - /* 0xBFC315BC: 86060380 lh $a2, 896($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 896; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (896)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495BCu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x86060380u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800495BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495C0u); -#endif - /* 0xBFC315C0: 86070382 lh $a3, 898($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 898; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (898)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495C0u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070382u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800495C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC315C4: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495C4u); return; } g_debug_last_store_pc = 0x800495C4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800495C4u); -#endif - /* 0xBFC315C8: 860F038A lh $t7, 906($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 906; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (906)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495C8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x860F038Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800495C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC315CC: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800495CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC315D0: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495D0u); return; } g_debug_last_store_pc = 0x800495D0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800495D0u); -#endif - /* 0xBFC315D4: 86180384 lh $t8, 900($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 900; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (900)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495D4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x86180384u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800495D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC315D8: 2652001C addiu $s2, $s2, 28 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (28)); - PGXP_ALU(0x2652001Cu, cpu->gpr[18], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800495D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC315DC: AFB80018 sw $t8, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495DCu); return; } g_debug_last_store_pc = 0x800495DCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800495DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495E0u); -#endif - /* 0xBFC315E0: 86190386 lh $t9, 902($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 902; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (902)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495E0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x86190386u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800495E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC315E4: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495E4u); return; } g_debug_last_store_pc = 0x800495E4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800495E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC315E8: AFB50024 sw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495E8u); return; } g_debug_last_store_pc = 0x800495E8u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800495E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC315EC: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495ECu); return; } g_debug_last_store_pc = 0x800495ECu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800495ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC315F0: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800495F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC315F4: 0C01258E jal 0xB0049638 */ - cpu->gpr[31] = 0x800495FCu; /* jal link before delay slot */ - psx_delay_BFC315F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC315F8: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800495F8u); return; } g_debug_last_store_pc = 0x800495F8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800495F8u); -#endif - if (psx_delay_BFC315F4) { - psx_delay_BFC315F4 = 0; - cpu->gpr[31] = 0x800495FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049638u); - cpu->pc = 0x80049638u; return; - } -label_BFC315FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC315FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC315FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800495FCu); -#endif - /* 0xBFC315FC: 8613038C lh $s3, 908($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (908)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800495FCu); return; } cpu->gpr[19] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 19, 0x10000u); } - PGXP_LOAD(0x8613038Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800495FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31600: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC31604: 02338821 addu $s1, $s1, $s3 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[17] = cpu->gpr[17] + cpu->gpr[19]; - PGXP_ALU(0x02338821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC31608: 2A211000 slti $at, $s1, 4096 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[17] < (4096) ? 1 : 0); - PGXP_ALU(0x2A211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80049608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3160C: 1420FFEA bne $at, $zero, 0xBFC315B8 */ - uint32_t psx_brA_BFC3160C = cpu->gpr[1]; uint32_t psx_brB_BFC3160C = cpu->gpr[0]; - psx_taken_BFC3160C = (psx_brA_BFC3160C != psx_brB_BFC3160C); - psx_delay_BFC3160C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049610u); -#endif - if (psx_delay_BFC3160C) { - psx_delay_BFC3160C = 0; - if (psx_taken_BFC3160C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800495B8u); - goto label_BFC315B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049614u); - } -label_BFC31614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049614u); -#endif - /* 0xBFC31614: 8FBF004C lw $ra, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049614u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF004Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049614u); -#endif - /* 0xBFC31618: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049618u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049618u); -#endif - /* 0xBFC3161C: 8FB10038 lw $s1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004961Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10038u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004961Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049620u); -#endif - /* 0xBFC31620: 8FB2003C lw $s2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049620u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2003Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80049620u); -#endif - /* 0xBFC31624: 8FB30040 lw $s3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049624u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30040u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80049624u); -#endif - /* 0xBFC31628: 8FB40044 lw $s4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049628u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40044u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80049628u); -#endif - /* 0xBFC3162C: 8FB50048 lw $s5, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004962Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50048u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004962Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31630: 03E00008 jr $ra */ - psx_delay_BFC31630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31634: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80049634u); -#endif - if (psx_delay_BFC31630) { - psx_delay_BFC31630 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31638(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31638u); - int psx_delay_BFC31654 = 0; - int psx_delay_BFC316D4 = 0; - int psx_delay_BFC31700 = 0; - int psx_delay_BFC3171C = 0; - int psx_delay_BFC3173C = 0; - int psx_delay_BFC317BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3165Cu: goto label_BFC3165C; - case 0xBFC316DCu: goto label_BFC316DC; - case 0xBFC31708u: goto label_BFC31708; - case 0xBFC31724u: goto label_BFC31724; - case 0xBFC31744u: goto label_BFC31744; - default: break; - } - } -label_BFC31638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31638: 27BDFF98 addiu $sp, $sp, -104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-104)); - PGXP_ALU(0x27BDFF98u, cpu->gpr[29], _pgx1, 0xFFFFFF98u); } -#ifdef PSX_COSIM - cosim_instr(0x80049638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3163C: AFB00038 sw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004963Cu); return; } g_debug_last_store_pc = 0x8004963Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31640: AFBF003C sw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049640u); return; } g_debug_last_store_pc = 0x80049640u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC31644: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31648: AFA5006C sw $a1, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049648u); return; } g_debug_last_store_pc = 0x80049648u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5006Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80049648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3164C: AFA60070 sw $a2, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004964Cu); return; } g_debug_last_store_pc = 0x8004964Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60070u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC31650: AFA70074 sw $a3, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049650u); return; } g_debug_last_store_pc = 0x80049650u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70074u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31654: 0C014667 jal 0xB005199C */ - cpu->gpr[31] = 0x8004965Cu; /* jal link before delay slot */ - psx_delay_BFC31654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC31658: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049658u); -#endif - if (psx_delay_BFC31654) { - psx_delay_BFC31654 = 0; - cpu->gpr[31] = 0x8004965Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005199Cu); - cpu->pc = 0x8005199Cu; return; - } -label_BFC3165C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3165Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3165Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004965Cu); -#endif - /* 0xBFC3165C: 8FA6008C lw $a2, 140($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004965Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6008Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004965Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049660u); -#endif - /* 0xBFC31660: 8FA50088 lw $a1, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049660u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50088u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80049660u); -#endif - /* 0xBFC31664: 90CE0000 lbu $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 14, 0x40u); - PGXP_LOAD(0x90CE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31668: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC3166C: A20E0004 sb $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004966Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (4)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA20E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004966Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049670u); -#endif - /* 0xBFC31670: 90C20001 lbu $v0, 1($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (1)), 2, 0x40u); - PGXP_LOAD(0x90C20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC31678: A2020005 sb $v0, 5($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049678u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (5)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020005u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049678u); -#endif - /* 0xBFC3167C: 90C30002 lbu $v1, 2($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (2)), 3, 0x40u); - PGXP_LOAD(0x90C30002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004967Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC31684: A2030006 sb $v1, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049684u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (6)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA2030006u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049684u); -#endif - /* 0xBFC31688: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3168C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC31690: A20F000C sb $t7, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80049690u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (12)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA20F000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049690u); -#endif - /* 0xBFC31694: 90A20001 lbu $v0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 2, 0x20u); - PGXP_LOAD(0x90A20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC3169C: A202000D sb $v0, 13($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004969Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (13)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202000Du, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004969Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496A0u); -#endif - /* 0xBFC316A0: 90A30002 lbu $v1, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 3, 0x20u); - PGXP_LOAD(0x90A30002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800496A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC316A8: A203000E sb $v1, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800496A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (14)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA203000Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800496A8u); -#endif - /* 0xBFC316AC: 90B80000 lbu $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 24, 0x20u); - PGXP_LOAD(0x90B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800496ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC316B4: A2180014 sb $t8, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800496B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (20)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA2180014u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800496B4u); -#endif - /* 0xBFC316B8: 90A20001 lbu $v0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 2, 0x20u); - PGXP_LOAD(0x90A20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800496B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC316C0: A2020015 sb $v0, 21($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 21; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800496C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (21)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA2020015u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800496C0u); -#endif - /* 0xBFC316C4: 90A30002 lbu $v1, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 3, 0x20u); - PGXP_LOAD(0x90A30002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800496C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC316CC: A2030016 sb $v1, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800496CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (22)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA2030016u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800496CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496D0u); -#endif - /* 0xBFC316D0: 8FA4006C lw $a0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800496D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4006Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800496D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC316D4: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x800496DCu; /* jal link before delay slot */ - psx_delay_BFC316D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496D8u); -#endif - if (psx_delay_BFC316D4) { - psx_delay_BFC316D4 = 0; - cpu->gpr[31] = 0x800496DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC316DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC316DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC316DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496DCu); -#endif - /* 0xBFC316DC: 8FB90078 lw $t9, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800496DCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90078u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800496DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496E0u); -#endif - /* 0xBFC316E0: 8FAA006C lw $t2, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800496E0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA006Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800496E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC316E4: 03220019 multu $t9, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03220019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800496E4u); -#endif - /* 0xBFC316E8: 8FAB0090 lw $t3, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800496E8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0090u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800496E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC316EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800496ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800496F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC316F0: 014B2021 addu $a0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800496F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC316F4: AFA40040 sw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800496F4u); return; } g_debug_last_store_pc = 0x800496F4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800496F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC316F8: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800496F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC316FC: 00084B03 sra $t1, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 12u); - PGXP_ALU(0x00084B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800496FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31700: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x80049708u; /* jal link before delay slot */ - psx_delay_BFC31700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31704: AFA90064 sw $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049704u); return; } g_debug_last_store_pc = 0x80049704u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049704u); -#endif - if (psx_delay_BFC31700) { - psx_delay_BFC31700 = 0; - cpu->gpr[31] = 0x80049708u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC31708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049708u); -#endif - /* 0xBFC31708: 8FAC0078 lw $t4, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049708u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0078u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049708u); -#endif - /* 0xBFC3170C: 8FA4006C lw $a0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004970Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4006Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004970Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC31710: 01820019 multu $t4, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[12] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[12])); -#endif - PGXP_MULDIV(0x01820019u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80049710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC31714: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC31718: 000D7303 sra $t6, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D7303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80049718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3171C: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x80049724u; /* jal link before delay slot */ - psx_delay_BFC3171C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC31720: AFAE005C sw $t6, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049720u); return; } g_debug_last_store_pc = 0x80049720u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE005Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049720u); -#endif - if (psx_delay_BFC3171C) { - psx_delay_BFC3171C = 0; - cpu->gpr[31] = 0x80049724u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC31724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049724u); -#endif - /* 0xBFC31724: 8FAF007C lw $t7, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049724u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF007Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000005u); -#endif - /* 0xBFC31728: 0002C023 subu $t8, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x0002C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3172C: 01F80019 multu $t7, $t8 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[15] * (uint64_t)cpu->gpr[24]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[15])); -#endif - PGXP_MULDIV(0x01F80019u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[24]); -#ifdef PSX_COSIM - cosim_instr(0x8004972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049730u); -#endif - /* 0xBFC31730: 8FA40040 lw $a0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049730u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40040u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80049730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC31734: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC31738: 00194303 sra $t0, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] >> 12u); - PGXP_ALU(0x00194303u, cpu->gpr[8], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80049738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3173C: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x80049744u; /* jal link before delay slot */ - psx_delay_BFC3173C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC31740: AFA80060 sw $t0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049740u); return; } g_debug_last_store_pc = 0x80049740u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80060u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049740u); -#endif - if (psx_delay_BFC3173C) { - psx_delay_BFC3173C = 0; - cpu->gpr[31] = 0x80049744u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC31744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049744u); -#endif - /* 0xBFC31744: 8FA30070 lw $v1, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049744u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30070u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049744u); -#endif - /* 0xBFC31748: 8FA90080 lw $t1, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049748u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90080u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049748u); -#endif - /* 0xBFC3174C: 8FA40074 lw $a0, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004974Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40074u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004974Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC31750: 00695021 addu $t2, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[9]; - PGXP_ALU(0x00695021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC31754: A60A0008 sh $t2, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049754u); return; } g_debug_last_store_pc = 0x80049754u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049754u); -#endif - /* 0xBFC31758: 8FAB0084 lw $t3, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049758u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0084u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x405u); -#endif - /* 0xBFC3175C: 00025023 subu $t2, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00025023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC31760: 008B6021 addu $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[4] + cpu->gpr[11]; - PGXP_ALU(0x008B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC31764: A60C000A sh $t4, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049764u); return; } g_debug_last_store_pc = 0x80049764u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA60C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049764u); -#endif - /* 0xBFC31768: 8FAD0064 lw $t5, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049768u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0064u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3176C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004976Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6008u); -#endif - /* 0xBFC31770: 01A37021 addu $t6, $t5, $v1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[13] + cpu->gpr[3]; - PGXP_ALU(0x01A37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC31774: A60E0010 sh $t6, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049774u); return; } g_debug_last_store_pc = 0x80049774u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049774u); -#endif - /* 0xBFC31778: 8FAF0060 lw $t7, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049778u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0060u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3177C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004977Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC31780: 01E4C021 addu $t8, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[15] + cpu->gpr[4]; - PGXP_ALU(0x01E4C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC31784: A6180012 sh $t8, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049784u); return; } g_debug_last_store_pc = 0x80049784u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180012u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049784u); -#endif - /* 0xBFC31788: 8FB9005C lw $t9, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049788u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9005Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3178C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004978Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC31790: 03234021 addu $t0, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x03234021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC31794: A6080018 sh $t0, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049794u); return; } g_debug_last_store_pc = 0x80049794u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA6080018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049794u); -#endif - /* 0xBFC31798: 8FA9007C lw $t1, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049798u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9007Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3179C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC317A0: 012A0019 multu $t1, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012A0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x800497A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC317A4: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800497A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC317A8: 000B6303 sra $t4, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x800497A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC317AC: 01846821 addu $t5, $t4, $a0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[4]; - PGXP_ALU(0x01846821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800497ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC317B0: A60D001A sh $t5, 26($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800497B0u); return; } g_debug_last_store_pc = 0x800497B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D001Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800497B0u); -#endif - /* 0xBFC317B4: 8FBF003C lw $ra, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800497B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF003Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800497B4u); -#endif - /* 0xBFC317B8: 8FB00038 lw $s0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800497B8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00038u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800497B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC317BC: 03E00008 jr $ra */ - psx_delay_BFC317BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC317C0: 27BD0068 addiu $sp, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27BD0068u, cpu->gpr[29], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x800497C0u); -#endif - if (psx_delay_BFC317BC) { - psx_delay_BFC317BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC317D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC317D0u); - int psx_delay_BFC31804 = 0; - int psx_delay_BFC31820 = 0; - int psx_taken_BFC31820 = 0; - int psx_delay_BFC31850 = 0; - int psx_taken_BFC31850 = 0; - int psx_delay_BFC31858 = 0; - int psx_taken_BFC31858 = 0; - int psx_delay_BFC31864 = 0; - int psx_taken_BFC31864 = 0; - int psx_delay_BFC3186C = 0; - int psx_taken_BFC3186C = 0; - int psx_delay_BFC31878 = 0; - int psx_taken_BFC31878 = 0; - int psx_delay_BFC318BC = 0; - int psx_delay_BFC318D8 = 0; - int psx_taken_BFC318D8 = 0; - int psx_delay_BFC31908 = 0; - int psx_taken_BFC31908 = 0; - int psx_delay_BFC31910 = 0; - int psx_taken_BFC31910 = 0; - int psx_delay_BFC3191C = 0; - int psx_taken_BFC3191C = 0; - int psx_delay_BFC31924 = 0; - int psx_taken_BFC31924 = 0; - int psx_delay_BFC31930 = 0; - int psx_taken_BFC31930 = 0; - int psx_delay_BFC31950 = 0; - int psx_delay_BFC31960 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3180Cu: goto label_BFC3180C; - case 0xBFC31828u: goto label_BFC31828; - case 0xBFC3182Cu: goto label_BFC3182C; - case 0xBFC31858u: goto label_BFC31858; - case 0xBFC31860u: goto label_BFC31860; - case 0xBFC31864u: goto label_BFC31864; - case 0xBFC3186Cu: goto label_BFC3186C; - case 0xBFC31874u: goto label_BFC31874; - case 0xBFC31878u: goto label_BFC31878; - case 0xBFC31880u: goto label_BFC31880; - case 0xBFC31884u: goto label_BFC31884; - case 0xBFC318C4u: goto label_BFC318C4; - case 0xBFC318E0u: goto label_BFC318E0; - case 0xBFC318E4u: goto label_BFC318E4; - case 0xBFC31910u: goto label_BFC31910; - case 0xBFC31918u: goto label_BFC31918; - case 0xBFC3191Cu: goto label_BFC3191C; - case 0xBFC31924u: goto label_BFC31924; - case 0xBFC3192Cu: goto label_BFC3192C; - case 0xBFC31930u: goto label_BFC31930; - case 0xBFC31938u: goto label_BFC31938; - case 0xBFC3193Cu: goto label_BFC3193C; - case 0xBFC31958u: goto label_BFC31958; - default: break; - } - } -label_BFC317D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC317D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC317D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC317D0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800497D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC317D4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800497D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC317D8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800497D8u); return; } g_debug_last_store_pc = 0x800497D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800497D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC317DC: 00A04821 addu $t1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800497DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC317E0: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800497E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC317E4: 3C07800D lui $a3, 0x800D */ - cpu->gpr[7] = 0x800D0000u; - PGXP_ALU(0x3C07800Du, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800497E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC317E8: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800497E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC317EC: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800497ECu); return; } g_debug_last_store_pc = 0x800497ECu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800497ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800497F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC317F0: AFA90024 sw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800497F0u); return; } g_debug_last_store_pc = 0x800497F0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800497F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC317F4: 24E7DDF0 addiu $a3, $a3, -8720 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-8720)); - PGXP_ALU(0x24E7DDF0u, cpu->gpr[7], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800497F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC317F8: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800497F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC317FC: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800497FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC31800: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049800u); return; } g_debug_last_store_pc = 0x80049800u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31804: 0C0128B9 jal 0xB004A2E4 */ - cpu->gpr[31] = 0x8004980Cu; /* jal link before delay slot */ - psx_delay_BFC31804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31808: 24060200 addiu $a2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24060200u, cpu->gpr[6], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80049808u); -#endif - if (psx_delay_BFC31804) { - psx_delay_BFC31804 = 0; - cpu->gpr[31] = 0x8004980Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2E4u); - cpu->pc = 0x8004A2E4u; return; - } -label_BFC3180C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3180Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004980Cu); -#endif - /* 0xBFC3180C: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004980Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004980Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049810u); -#endif - /* 0xBFC31810: 8FA90024 lw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049810u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049810u); -#endif - /* 0xBFC31814: 846F0000 lh $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049814u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x846F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3181C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004981Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC31820: 05E10002 bgez $t7, 0xBFC3182C */ - uint32_t psx_brA_BFC31820 = cpu->gpr[15]; - psx_taken_BFC31820 = ((int32_t)psx_brA_BFC31820 >= 0); - psx_delay_BFC31820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8003u); -#endif - /* 0xBFC31824: 01E00821 addu $at, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049824u); -#endif - if (psx_delay_BFC31820) { - psx_delay_BFC31820 = 0; - if (psx_taken_BFC31820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004982Cu); - goto label_BFC3182C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049828u); - } -label_BFC31828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31828: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049828u); -#endif -label_BFC3182C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3182Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3182Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004982Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3182C: 0001C183 sra $t8, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x0001C183u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8004982Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31830: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC31834: A438DE10 sh $t8, -8688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049834u); return; } g_debug_last_store_pc = 0x80049834u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DE10u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049834u); -#endif - /* 0xBFC31838: 84790002 lh $t9, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049838u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x84790002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3183C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004983Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC31840: A439DE12 sh $t9, -8686($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8686; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8686)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049840u); return; } g_debug_last_store_pc = 0x80049840u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DE12u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049840u); -#endif - /* 0xBFC31844: 84680004 lh $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049844u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x84680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3184C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004984Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC31850: 05010004 bgez $t0, 0xBFC31864 */ - uint32_t psx_brA_BFC31850 = cpu->gpr[8]; - psx_taken_BFC31850 = ((int32_t)psx_brA_BFC31850 >= 0); - psx_delay_BFC31850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC31854: 310A003F andi $t2, $t0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0x3Fu; - PGXP_ALU(0x310A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049854u); -#endif - if (psx_delay_BFC31850) { - psx_delay_BFC31850 = 0; - if (psx_taken_BFC31850) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049864u); - goto label_BFC31864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049858u); - } -label_BFC31858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC31858: 11400002 beq $t2, $zero, 0xBFC31864 */ - uint32_t psx_brA_BFC31858 = cpu->gpr[10]; uint32_t psx_brB_BFC31858 = cpu->gpr[0]; - psx_taken_BFC31858 = (psx_brA_BFC31858 == psx_brB_BFC31858); - psx_delay_BFC31858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3185C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004985Cu); -#endif - if (psx_delay_BFC31858) { - psx_delay_BFC31858 = 0; - if (psx_taken_BFC31858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049864u); - goto label_BFC31864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049860u); - } -label_BFC31860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC31860: 254AFFC0 addiu $t2, $t2, -64 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-64)); - PGXP_ALU(0x254AFFC0u, cpu->gpr[10], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049860u); -#endif -label_BFC31864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC31864: 11400004 beq $t2, $zero, 0xBFC31878 */ - uint32_t psx_brA_BFC31864 = cpu->gpr[10]; uint32_t psx_brB_BFC31864 = cpu->gpr[0]; - psx_taken_BFC31864 = (psx_brA_BFC31864 == psx_brB_BFC31864); - psx_delay_BFC31864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31868: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049868u); -#endif - if (psx_delay_BFC31864) { - psx_delay_BFC31864 = 0; - if (psx_taken_BFC31864) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049878u); - goto label_BFC31878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004986Cu); - } -label_BFC3186C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3186Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004986Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3186C: 10000002 beq $zero, $zero, 0xBFC31878 */ - uint32_t psx_brA_BFC3186C = cpu->gpr[0]; uint32_t psx_brB_BFC3186C = cpu->gpr[0]; - psx_taken_BFC3186C = (psx_brA_BFC3186C == psx_brB_BFC3186C); - psx_delay_BFC3186C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31870: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049870u); -#endif - if (psx_delay_BFC3186C) { - psx_delay_BFC3186C = 0; - if (psx_taken_BFC3186C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049878u); - goto label_BFC31878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049874u); - } -label_BFC31874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31874: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049874u); -#endif -label_BFC31878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC31878: 05010002 bgez $t0, 0xBFC31884 */ - uint32_t psx_brA_BFC31878 = cpu->gpr[8]; - psx_taken_BFC31878 = ((int32_t)psx_brA_BFC31878 >= 0); - psx_delay_BFC31878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103u); -#endif - /* 0xBFC3187C: 01000821 addu $at, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004987Cu); -#endif - if (psx_delay_BFC31878) { - psx_delay_BFC31878 = 0; - if (psx_taken_BFC31878) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049884u); - goto label_BFC31884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049880u); - } -label_BFC31880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31880: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049880u); -#endif -label_BFC31884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC31884: 00015983 sra $t3, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00015983u, cpu->gpr[11], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31888: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC3188C: 01626021 addu $t4, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[11] + cpu->gpr[2]; - PGXP_ALU(0x01626021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004988Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC31890: A42CDE14 sh $t4, -8684($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8684)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049890u); return; } g_debug_last_store_pc = 0x80049890u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CDE14u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049890u); -#endif - /* 0xBFC31894: 846D0006 lh $t5, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049894u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x846D0006u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31898: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3189C: 3C07800D lui $a3, 0x800D */ - cpu->gpr[7] = 0x800D0000u; - PGXP_ALU(0x3C07800Du, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC318A0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800498A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC318A4: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800498A4u); return; } g_debug_last_store_pc = 0x800498A4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800498A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC318A8: AFA90024 sw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800498A8u); return; } g_debug_last_store_pc = 0x800498A8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800498A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC318AC: 24E75DF0 addiu $a3, $a3, 24048 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (24048)); - PGXP_ALU(0x24E75DF0u, cpu->gpr[7], _pgx1, 0x00005DF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800498ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC318B0: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x800498B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC318B4: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800498B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC318B8: 24060200 addiu $a2, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24060200u, cpu->gpr[6], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x800498B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC318BC: 0C0128B9 jal 0xB004A2E4 */ - cpu->gpr[31] = 0x800498C4u; /* jal link before delay slot */ - psx_delay_BFC318BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC318C0: A42DDE16 sh $t5, -8682($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8682; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8682)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498C0u); return; } g_debug_last_store_pc = 0x800498C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA42DDE16u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800498C0u); -#endif - if (psx_delay_BFC318BC) { - psx_delay_BFC318BC = 0; - cpu->gpr[31] = 0x800498C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2E4u); - cpu->pc = 0x8004A2E4u; return; - } -label_BFC318C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC318C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC318C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498C4u); -#endif - /* 0xBFC318C4: 8FA90024 lw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800498C4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800498C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC318C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800498C8u); -#endif - /* 0xBFC318CC: 852F0000 lh $t7, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498CCu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x200u); } - PGXP_LOAD(0x852F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800498CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC318D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800498D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC318D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800498D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC318D8: 05E10002 bgez $t7, 0xBFC318E4 */ - uint32_t psx_brA_BFC318D8 = cpu->gpr[15]; - psx_taken_BFC318D8 = ((int32_t)psx_brA_BFC318D8 >= 0); - psx_delay_BFC318D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8003u); -#endif - /* 0xBFC318DC: 01E00821 addu $at, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[15] + cpu->gpr[0]; - PGXP_ALU(0x01E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800498DCu); -#endif - if (psx_delay_BFC318D8) { - psx_delay_BFC318D8 = 0; - if (psx_taken_BFC318D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800498E4u); - goto label_BFC318E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800498E0u); - } -label_BFC318E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC318E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC318E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC318E0: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800498E0u); -#endif -label_BFC318E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC318E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC318E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC318E4: 0001C183 sra $t8, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x0001C183u, cpu->gpr[24], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800498E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC318E8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800498E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC318EC: A438DE18 sh $t8, -8680($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8680; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8680)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498ECu); return; } g_debug_last_store_pc = 0x800498ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438DE18u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800498ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800498F0u); -#endif - /* 0xBFC318F0: 85390002 lh $t9, 2($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498F0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x200u); } - PGXP_LOAD(0x85390002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800498F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC318F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800498F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC318F8: A439DE1A sh $t9, -8678($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8678; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8678)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498F8u); return; } g_debug_last_store_pc = 0x800498F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439DE1Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800498F8u); -#endif - /* 0xBFC318FC: 85230004 lh $v1, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800498FCu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x200u); } - PGXP_LOAD(0x85230004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800498FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31900: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31908: 04610004 bgez $v1, 0xBFC3191C */ - uint32_t psx_brA_BFC31908 = cpu->gpr[3]; - psx_taken_BFC31908 = ((int32_t)psx_brA_BFC31908 >= 0); - psx_delay_BFC31908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC3190C: 306A003F andi $t2, $v1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] & 0x3Fu; - PGXP_ALU(0x306A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004990Cu); -#endif - if (psx_delay_BFC31908) { - psx_delay_BFC31908 = 0; - if (psx_taken_BFC31908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004991Cu); - goto label_BFC3191C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049910u); - } -label_BFC31910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC31910: 11400002 beq $t2, $zero, 0xBFC3191C */ - uint32_t psx_brA_BFC31910 = cpu->gpr[10]; uint32_t psx_brB_BFC31910 = cpu->gpr[0]; - psx_taken_BFC31910 = (psx_brA_BFC31910 == psx_brB_BFC31910); - psx_delay_BFC31910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049914u); -#endif - if (psx_delay_BFC31910) { - psx_delay_BFC31910 = 0; - if (psx_taken_BFC31910) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004991Cu); - goto label_BFC3191C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049918u); - } -label_BFC31918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC31918: 254AFFC0 addiu $t2, $t2, -64 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-64)); - PGXP_ALU(0x254AFFC0u, cpu->gpr[10], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049918u); -#endif -label_BFC3191C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3191Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3191Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004991Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3191C: 11400004 beq $t2, $zero, 0xBFC31930 */ - uint32_t psx_brA_BFC3191C = cpu->gpr[10]; uint32_t psx_brB_BFC3191C = cpu->gpr[0]; - psx_taken_BFC3191C = (psx_brA_BFC3191C == psx_brB_BFC3191C); - psx_delay_BFC3191C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31920: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049920u); -#endif - if (psx_delay_BFC3191C) { - psx_delay_BFC3191C = 0; - if (psx_taken_BFC3191C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049930u); - goto label_BFC31930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049924u); - } -label_BFC31924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31924: 10000002 beq $zero, $zero, 0xBFC31930 */ - uint32_t psx_brA_BFC31924 = cpu->gpr[0]; uint32_t psx_brB_BFC31924 = cpu->gpr[0]; - psx_taken_BFC31924 = (psx_brA_BFC31924 == psx_brB_BFC31924); - psx_delay_BFC31924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31928: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049928u); -#endif - if (psx_delay_BFC31924) { - psx_delay_BFC31924 = 0; - if (psx_taken_BFC31924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049930u); - goto label_BFC31930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004992Cu); - } -label_BFC3192C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3192Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004992Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3192C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004992Cu); -#endif -label_BFC31930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31930: 04610002 bgez $v1, 0xBFC3193C */ - uint32_t psx_brA_BFC31930 = cpu->gpr[3]; - psx_taken_BFC31930 = ((int32_t)psx_brA_BFC31930 >= 0); - psx_delay_BFC31930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC31934: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049934u); -#endif - if (psx_delay_BFC31930) { - psx_delay_BFC31930 = 0; - if (psx_taken_BFC31930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004993Cu); - goto label_BFC3193C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049938u); - } -label_BFC31938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31938: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049938u); -#endif -label_BFC3193C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3193Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3193C: 00015983 sra $t3, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00015983u, cpu->gpr[11], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8004993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31940: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC31944: 01626021 addu $t4, $t3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[11] + cpu->gpr[2]; - PGXP_ALU(0x01626021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC31948: A42CDE1C sh $t4, -8676($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8676; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8676)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049948u); return; } g_debug_last_store_pc = 0x80049948u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CDE1Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049948u); -#endif - /* 0xBFC3194C: 852D0006 lh $t5, 6($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004994Cu); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x200u); } - PGXP_LOAD(0x852D0006u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31950: 0C01265A jal 0xB0049968 */ - cpu->gpr[31] = 0x80049958u; /* jal link before delay slot */ - psx_delay_BFC31950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC31954: A42DDE1E sh $t5, -8674($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -8674; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-8674)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049954u); return; } g_debug_last_store_pc = 0x80049954u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA42DDE1Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049954u); -#endif - if (psx_delay_BFC31950) { - psx_delay_BFC31950 = 0; - cpu->gpr[31] = 0x80049958u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049968u); - cpu->pc = 0x80049968u; return; - } -label_BFC31958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049958u); -#endif - /* 0xBFC31958: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049958u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3195C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31960: 03E00008 jr $ra */ - psx_delay_BFC31960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049964u); -#endif - if (psx_delay_BFC31960) { - psx_delay_BFC31960 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31968(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31968u); - int psx_delay_BFC31974 = 0; - int psx_delay_BFC3198C = 0; - int psx_delay_BFC319A4 = 0; - int psx_delay_BFC319B0 = 0; - int psx_delay_BFC319C8 = 0; - int psx_delay_BFC319D4 = 0; - int psx_delay_BFC319E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3197Cu: goto label_BFC3197C; - case 0xBFC31994u: goto label_BFC31994; - case 0xBFC319ACu: goto label_BFC319AC; - case 0xBFC319B8u: goto label_BFC319B8; - case 0xBFC319D0u: goto label_BFC319D0; - case 0xBFC319DCu: goto label_BFC319DC; - default: break; - } - } -label_BFC31968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31968: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3196C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004996Cu); return; } g_debug_last_store_pc = 0x8004996Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31970: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31974: 0C012804 jal 0xB004A010 */ - cpu->gpr[31] = 0x8004997Cu; /* jal link before delay slot */ - psx_delay_BFC31974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31978: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049978u); -#endif - if (psx_delay_BFC31974) { - psx_delay_BFC31974 = 0; - cpu->gpr[31] = 0x8004997Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A010u); - cpu->pc = 0x8004A010u; return; - } -label_BFC3197C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3197Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3197Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004997Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3197C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004997Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC31980: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC31984: 24A5DE10 addiu $a1, $a1, -8688 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8688)); - PGXP_ALU(0x24A5DE10u, cpu->gpr[5], _pgx1, 0xFFFFDE10u); } -#ifdef PSX_COSIM - cosim_instr(0x80049984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31988: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3198C: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x80049994u; /* jal link before delay slot */ - psx_delay_BFC3198C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31990: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049990u); -#endif - if (psx_delay_BFC3198C) { - psx_delay_BFC3198C = 0; - cpu->gpr[31] = 0x80049994u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC31994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31994: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC31998: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3199C: 24A5DE18 addiu $a1, $a1, -8680 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8680)); - PGXP_ALU(0x24A5DE18u, cpu->gpr[5], _pgx1, 0xFFFFDE18u); } -#ifdef PSX_COSIM - cosim_instr(0x8004999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319A0: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800499A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC319A4: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x800499ACu; /* jal link before delay slot */ - psx_delay_BFC319A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC319A8: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800499A8u); -#endif - if (psx_delay_BFC319A4) { - psx_delay_BFC319A4 = 0; - cpu->gpr[31] = 0x800499ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC319AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC319ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC319ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319AC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800499ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC319B0: 0C012804 jal 0xB004A010 */ - cpu->gpr[31] = 0x800499B8u; /* jal link before delay slot */ - psx_delay_BFC319B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319B4: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x800499B4u); -#endif - if (psx_delay_BFC319B0) { - psx_delay_BFC319B0 = 0; - cpu->gpr[31] = 0x800499B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A010u); - cpu->pc = 0x8004A010u; return; - } -label_BFC319B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC319B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC319B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319B8: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800499B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC319BC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800499BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC319C0: 24A5DE18 addiu $a1, $a1, -8680 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8680)); - PGXP_ALU(0x24A5DE18u, cpu->gpr[5], _pgx1, 0xFFFFDE18u); } -#ifdef PSX_COSIM - cosim_instr(0x800499C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319C4: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x800499C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC319C8: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x800499D0u; /* jal link before delay slot */ - psx_delay_BFC319C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC319CC: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800499CCu); -#endif - if (psx_delay_BFC319C8) { - psx_delay_BFC319C8 = 0; - cpu->gpr[31] = 0x800499D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC319D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC319D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC319D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319D0: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800499D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC319D4: 0C012810 jal 0xB004A040 */ - cpu->gpr[31] = 0x800499DCu; /* jal link before delay slot */ - psx_delay_BFC319D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC319D8: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x800499D8u); -#endif - if (psx_delay_BFC319D4) { - psx_delay_BFC319D4 = 0; - cpu->gpr[31] = 0x800499DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A040u); - cpu->pc = 0x8004A040u; return; - } -label_BFC319DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC319DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC319DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499DCu); -#endif - /* 0xBFC319DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800499DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800499DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC319E0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800499E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC319E4: 03E00008 jr $ra */ - psx_delay_BFC319E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC319E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800499E8u); -#endif - if (psx_delay_BFC319E4) { - psx_delay_BFC319E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC319EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC319ECu); - int psx_delay_BFC31A10 = 0; - int psx_taken_BFC31A10 = 0; - int psx_delay_BFC31A18 = 0; - int psx_taken_BFC31A18 = 0; - int psx_delay_BFC31A24 = 0; - int psx_taken_BFC31A24 = 0; - int psx_delay_BFC31A2C = 0; - int psx_taken_BFC31A2C = 0; - int psx_delay_BFC31A44 = 0; - int psx_taken_BFC31A44 = 0; - int psx_delay_BFC31A94 = 0; - int psx_delay_BFC31AA0 = 0; - int psx_taken_BFC31AA0 = 0; - int psx_delay_BFC31AEC = 0; - int psx_delay_BFC31B20 = 0; - int psx_taken_BFC31B20 = 0; - int psx_delay_BFC31B30 = 0; - int psx_taken_BFC31B30 = 0; - int psx_delay_BFC31B38 = 0; - int psx_taken_BFC31B38 = 0; - int psx_delay_BFC31B40 = 0; - int psx_taken_BFC31B40 = 0; - int psx_delay_BFC31B4C = 0; - int psx_taken_BFC31B4C = 0; - int psx_delay_BFC31B54 = 0; - int psx_taken_BFC31B54 = 0; - int psx_delay_BFC31B6C = 0; - int psx_taken_BFC31B6C = 0; - int psx_delay_BFC31BB8 = 0; - int psx_delay_BFC31BC4 = 0; - int psx_taken_BFC31BC4 = 0; - int psx_delay_BFC31C10 = 0; - int psx_delay_BFC31C44 = 0; - int psx_taken_BFC31C44 = 0; - int psx_delay_BFC31C5C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31A18u: goto label_BFC31A18; - case 0xBFC31A20u: goto label_BFC31A20; - case 0xBFC31A24u: goto label_BFC31A24; - case 0xBFC31A2Cu: goto label_BFC31A2C; - case 0xBFC31A34u: goto label_BFC31A34; - case 0xBFC31A38u: goto label_BFC31A38; - case 0xBFC31A4Cu: goto label_BFC31A4C; - case 0xBFC31A50u: goto label_BFC31A50; - case 0xBFC31A9Cu: goto label_BFC31A9C; - case 0xBFC31AA8u: goto label_BFC31AA8; - case 0xBFC31AF4u: goto label_BFC31AF4; - case 0xBFC31AFCu: goto label_BFC31AFC; - case 0xBFC31B28u: goto label_BFC31B28; - case 0xBFC31B38u: goto label_BFC31B38; - case 0xBFC31B40u: goto label_BFC31B40; - case 0xBFC31B48u: goto label_BFC31B48; - case 0xBFC31B4Cu: goto label_BFC31B4C; - case 0xBFC31B54u: goto label_BFC31B54; - case 0xBFC31B5Cu: goto label_BFC31B5C; - case 0xBFC31B60u: goto label_BFC31B60; - case 0xBFC31B74u: goto label_BFC31B74; - case 0xBFC31B78u: goto label_BFC31B78; - case 0xBFC31BC0u: goto label_BFC31BC0; - case 0xBFC31BCCu: goto label_BFC31BCC; - case 0xBFC31C18u: goto label_BFC31C18; - case 0xBFC31C20u: goto label_BFC31C20; - case 0xBFC31C4Cu: goto label_BFC31C4C; - case 0xBFC31C50u: goto label_BFC31C50; - default: break; - } - } -label_BFC319EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC319ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC319ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC319EC: 00041C00 sll $v1, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00041C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800499ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800499F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC319F0: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800499F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC319F4: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800499F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC319F8: AFB00030 sw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800499F8u); return; } g_debug_last_store_pc = 0x800499F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800499F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10040u); -#endif - /* 0xBFC319FC: 00068400 sll $s0, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[16] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00068400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800499FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31A00: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A00u); return; } g_debug_last_store_pc = 0x80049A00u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31A04: AFA5005C sw $a1, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A04u); return; } g_debug_last_store_pc = 0x80049A04u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5005Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31A08: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC31A0C: AFA70064 sw $a3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A0Cu); return; } g_debug_last_store_pc = 0x80049A0Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70064u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31A10: 04610004 bgez $v1, 0xBFC31A24 */ - uint32_t psx_brA_BFC31A10 = cpu->gpr[3]; - psx_taken_BFC31A10 = ((int32_t)psx_brA_BFC31A10 >= 0); - psx_delay_BFC31A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC31A14: 306E003F andi $t6, $v1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] & 0x3Fu; - PGXP_ALU(0x306E003Fu, cpu->gpr[14], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049A14u); -#endif - if (psx_delay_BFC31A10) { - psx_delay_BFC31A10 = 0; - if (psx_taken_BFC31A10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A24u); - goto label_BFC31A24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A18u); - } -label_BFC31A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC31A18: 11C00002 beq $t6, $zero, 0xBFC31A24 */ - uint32_t psx_brA_BFC31A18 = cpu->gpr[14]; uint32_t psx_brB_BFC31A18 = cpu->gpr[0]; - psx_taken_BFC31A18 = (psx_brA_BFC31A18 == psx_brB_BFC31A18); - psx_delay_BFC31A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31A1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049A1Cu); -#endif - if (psx_delay_BFC31A18) { - psx_delay_BFC31A18 = 0; - if (psx_taken_BFC31A18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A24u); - goto label_BFC31A24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A20u); - } -label_BFC31A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC31A20: 25CEFFC0 addiu $t6, $t6, -64 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-64)); - PGXP_ALU(0x25CEFFC0u, cpu->gpr[14], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A20u); -#endif -label_BFC31A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC31A24: 11C00004 beq $t6, $zero, 0xBFC31A38 */ - uint32_t psx_brA_BFC31A24 = cpu->gpr[14]; uint32_t psx_brB_BFC31A24 = cpu->gpr[0]; - psx_taken_BFC31A24 = (psx_brA_BFC31A24 == psx_brB_BFC31A24); - psx_delay_BFC31A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31A28: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049A28u); -#endif - if (psx_delay_BFC31A24) { - psx_delay_BFC31A24 = 0; - if (psx_taken_BFC31A24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A38u); - goto label_BFC31A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A2Cu); - } -label_BFC31A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31A2C: 10000002 beq $zero, $zero, 0xBFC31A38 */ - uint32_t psx_brA_BFC31A2C = cpu->gpr[0]; uint32_t psx_brB_BFC31A2C = cpu->gpr[0]; - psx_taken_BFC31A2C = (psx_brA_BFC31A2C == psx_brB_BFC31A2C); - psx_delay_BFC31A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31A30: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A30u); -#endif - if (psx_delay_BFC31A2C) { - psx_delay_BFC31A2C = 0; - if (psx_taken_BFC31A2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A38u); - goto label_BFC31A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A34u); - } -label_BFC31A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31A34: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049A34u); -#endif -label_BFC31A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31A38: A7A00040 sh $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A38u); return; } g_debug_last_store_pc = 0x80049A38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31A3C: A7A00042 sh $zero, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A3Cu); return; } g_debug_last_store_pc = 0x80049A3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00042u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31A40: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A40u); return; } g_debug_last_store_pc = 0x80049A40u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31A44: 04610002 bgez $v1, 0xBFC31A50 */ - uint32_t psx_brA_BFC31A44 = cpu->gpr[3]; - psx_taken_BFC31A44 = ((int32_t)psx_brA_BFC31A44 >= 0); - psx_delay_BFC31A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC31A48: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049A48u); -#endif - if (psx_delay_BFC31A44) { - psx_delay_BFC31A44 = 0; - if (psx_taken_BFC31A44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A50u); - goto label_BFC31A50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049A4Cu); - } -label_BFC31A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31A4C: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049A4Cu); -#endif -label_BFC31A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC31A50: 00017983 sra $t7, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00017983u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Cu); -#endif - /* 0xBFC31A54: 01E21821 addu $v1, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[2]; - PGXP_ALU(0x01E21821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31A58: 00031C00 sll $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00031C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC31A5C: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC31A60: A7A30058 sh $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A60u); return; } g_debug_last_store_pc = 0x80049A60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC31A64: 24180010 addiu $t8, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24180010u, cpu->gpr[24], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31A68: A7B80044 sh $t8, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A68u); return; } g_debug_last_store_pc = 0x80049A68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80044u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31A6C: 24190100 addiu $t9, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24190100u, cpu->gpr[25], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31A70: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049A70u); -#endif - /* 0xBFC31A74: 87A7005C lh $a3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A74u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x87A7005Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31A78: 27A90054 addiu $t1, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27A90054u, cpu->gpr[9], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31A7C: 27AA0050 addiu $t2, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27AA0050u, cpu->gpr[10], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC31A80: A7B90046 sh $t9, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A80u); return; } g_debug_last_store_pc = 0x80049A80u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90046u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31A84: AFAA0014 sw $t2, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A84u); return; } g_debug_last_store_pc = 0x80049A84u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0014u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31A88: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049A88u); return; } g_debug_last_store_pc = 0x80049A88u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31A8C: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC31A90: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31A94: 0C012914 jal 0xB004A450 */ - cpu->gpr[31] = 0x80049A9Cu; /* jal link before delay slot */ - psx_delay_BFC31A94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31A98: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80049A98u); -#endif - if (psx_delay_BFC31A94) { - psx_delay_BFC31A94 = 0; - cpu->gpr[31] = 0x80049A9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A450u); - cpu->pc = 0x8004A450u; return; - } -label_BFC31A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049A9Cu); -#endif - /* 0xBFC31A9C: 87A30058 lh $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049A9Cu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31AA0: 14400016 bne $v0, $zero, 0xBFC31AFC */ - uint32_t psx_brA_BFC31AA0 = cpu->gpr[2]; uint32_t psx_brB_BFC31AA0 = cpu->gpr[0]; - psx_taken_BFC31AA0 = (psx_brA_BFC31AA0 != psx_brB_BFC31AA0); - psx_delay_BFC31AA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC31AA4: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049AA4u); -#endif - if (psx_delay_BFC31AA0) { - psx_delay_BFC31AA0 = 0; - if (psx_taken_BFC31AA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049AFCu); - goto label_BFC31AFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049AA8u); - } -label_BFC31AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31AA8: A7A00040 sh $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AA8u); return; } g_debug_last_store_pc = 0x80049AA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31AAC: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049AACu); return; } g_debug_last_store_pc = 0x80049AACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC31AB0: A7A30058 sh $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AB0u); return; } g_debug_last_store_pc = 0x80049AB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC31AB4: 240B0100 addiu $t3, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240B0100u, cpu->gpr[11], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC31AB8: A7AB0042 sh $t3, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AB8u); return; } g_debug_last_store_pc = 0x80049AB8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0042u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC31ABC: 240C0010 addiu $t4, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240C0010u, cpu->gpr[12], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80049ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC31AC0: A7AC0044 sh $t4, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AC0u); return; } g_debug_last_store_pc = 0x80049AC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC0044u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC31AC4: 240D0100 addiu $t5, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240D0100u, cpu->gpr[13], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31AC8: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049AC8u); -#endif - /* 0xBFC31ACC: 87A7005C lh $a3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049ACCu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x87A7005Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC31AD0: 27AE0054 addiu $t6, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27AE0054u, cpu->gpr[14], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31AD4: 27AF0050 addiu $t7, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27AF0050u, cpu->gpr[15], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC31AD8: A7AD0046 sh $t5, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AD8u); return; } g_debug_last_store_pc = 0x80049AD8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0046u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31ADC: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049ADCu); return; } g_debug_last_store_pc = 0x80049ADCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC31AE0: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049AE0u); return; } g_debug_last_store_pc = 0x80049AE0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31AE4: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31AE8: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80049AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31AEC: 0C012914 jal 0xB004A450 */ - cpu->gpr[31] = 0x80049AF4u; /* jal link before delay slot */ - psx_delay_BFC31AEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC31AF0: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049AF0u); -#endif - if (psx_delay_BFC31AEC) { - psx_delay_BFC31AEC = 0; - cpu->gpr[31] = 0x80049AF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A450u); - cpu->pc = 0x8004A450u; return; - } -label_BFC31AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AF4u); -#endif - /* 0xBFC31AF4: 87A30058 lh $v1, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AF4u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30058u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC31AF8: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049AF8u); -#endif -label_BFC31AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049AFCu); -#endif - /* 0xBFC31AFC: 87B80054 lh $t8, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049AFCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80054u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B00u); -#endif - /* 0xBFC31B00: 8FA20068 lw $v0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049B00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20068u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC31B04: 0018C980 sll $t9, $t8, 6 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 6u; - PGXP_ALU(0x0018C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC31B08: A4590000 sh $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B08u); return; } g_debug_last_store_pc = 0x80049B08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B08u); -#endif - /* 0xBFC31B0C: 87A90050 lh $t1, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B0Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90050u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC31B10: 00035180 sll $t2, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 6u; - PGXP_ALU(0x00035180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC31B14: A44A0004 sh $t2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B14u); return; } g_debug_last_store_pc = 0x80049B14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA44A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC31B18: A4490002 sh $t1, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B18u); return; } g_debug_last_store_pc = 0x80049B18u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4490002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B18u); -#endif - /* 0xBFC31B1C: 87AB005C lh $t3, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B1Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB005Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31B20: 1A00004A blez $s0, 0xBFC31C4C */ - uint32_t psx_brA_BFC31B20 = cpu->gpr[16]; - psx_taken_BFC31B20 = ((int32_t)psx_brA_BFC31B20 <= 0); - psx_delay_BFC31B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC31B24: A44B0006 sh $t3, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B24u); return; } g_debug_last_store_pc = 0x80049B24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA44B0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B24u); -#endif - if (psx_delay_BFC31B20) { - psx_delay_BFC31B20 = 0; - if (psx_taken_BFC31B20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C4Cu); - goto label_BFC31C4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B28u); - } -label_BFC31B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B28u); -#endif - /* 0xBFC31B28: 87A70064 lh $a3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B28u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x87A70064u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31B30: 18E00047 blez $a3, 0xBFC31C50 */ - uint32_t psx_brA_BFC31B30 = cpu->gpr[7]; - psx_taken_BFC31B30 = ((int32_t)psx_brA_BFC31B30 <= 0); - psx_delay_BFC31B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC31B34: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B34u); -#endif - if (psx_delay_BFC31B30) { - psx_delay_BFC31B30 = 0; - if (psx_taken_BFC31B30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C50u); - goto label_BFC31C50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B38u); - } -label_BFC31B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31B38: 06010004 bgez $s0, 0xBFC31B4C */ - uint32_t psx_brA_BFC31B38 = cpu->gpr[16]; - psx_taken_BFC31B38 = ((int32_t)psx_brA_BFC31B38 >= 0); - psx_delay_BFC31B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC31B3C: 320C003F andi $t4, $s0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[16] & 0x3Fu; - PGXP_ALU(0x320C003Fu, cpu->gpr[12], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049B3Cu); -#endif - if (psx_delay_BFC31B38) { - psx_delay_BFC31B38 = 0; - if (psx_taken_BFC31B38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B4Cu); - goto label_BFC31B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B40u); - } -label_BFC31B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC31B40: 11800002 beq $t4, $zero, 0xBFC31B4C */ - uint32_t psx_brA_BFC31B40 = cpu->gpr[12]; uint32_t psx_brB_BFC31B40 = cpu->gpr[0]; - psx_taken_BFC31B40 = (psx_brA_BFC31B40 == psx_brB_BFC31B40); - psx_delay_BFC31B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31B44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049B44u); -#endif - if (psx_delay_BFC31B40) { - psx_delay_BFC31B40 = 0; - if (psx_taken_BFC31B40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B4Cu); - goto label_BFC31B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B48u); - } -label_BFC31B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC31B48: 258CFFC0 addiu $t4, $t4, -64 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-64)); - PGXP_ALU(0x258CFFC0u, cpu->gpr[12], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B48u); -#endif -label_BFC31B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC31B4C: 11800004 beq $t4, $zero, 0xBFC31B60 */ - uint32_t psx_brA_BFC31B4C = cpu->gpr[12]; uint32_t psx_brB_BFC31B4C = cpu->gpr[0]; - psx_taken_BFC31B4C = (psx_brA_BFC31B4C == psx_brB_BFC31B4C); - psx_delay_BFC31B4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31B50: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049B50u); -#endif - if (psx_delay_BFC31B4C) { - psx_delay_BFC31B4C = 0; - if (psx_taken_BFC31B4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B60u); - goto label_BFC31B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B54u); - } -label_BFC31B54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31B54: 10000002 beq $zero, $zero, 0xBFC31B60 */ - uint32_t psx_brA_BFC31B54 = cpu->gpr[0]; uint32_t psx_brB_BFC31B54 = cpu->gpr[0]; - psx_taken_BFC31B54 = (psx_brA_BFC31B54 == psx_brB_BFC31B54); - psx_delay_BFC31B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31B58: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B58u); -#endif - if (psx_delay_BFC31B54) { - psx_delay_BFC31B54 = 0; - if (psx_taken_BFC31B54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B60u); - goto label_BFC31B60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B5Cu); - } -label_BFC31B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31B5C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049B5Cu); -#endif -label_BFC31B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31B60: A7A00040 sh $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B60u); return; } g_debug_last_store_pc = 0x80049B60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31B64: A7A00042 sh $zero, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B64u); return; } g_debug_last_store_pc = 0x80049B64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00042u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31B68: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049B68u); return; } g_debug_last_store_pc = 0x80049B68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31B6C: 06010002 bgez $s0, 0xBFC31B78 */ - uint32_t psx_brA_BFC31B6C = cpu->gpr[16]; - psx_taken_BFC31B6C = ((int32_t)psx_brA_BFC31B6C >= 0); - psx_delay_BFC31B6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10003u); -#endif - /* 0xBFC31B70: 02000821 addu $at, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049B70u); -#endif - if (psx_delay_BFC31B6C) { - psx_delay_BFC31B6C = 0; - if (psx_taken_BFC31B6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B78u); - goto label_BFC31B78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049B74u); - } -label_BFC31B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31B74: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049B74u); -#endif -label_BFC31B78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31B78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC31B78: 00016983 sra $t5, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00016983u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12004u); -#endif - /* 0xBFC31B7C: 01A28021 addu $s0, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[13] + cpu->gpr[2]; - PGXP_ALU(0x01A28021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC31B80: AFA8004C sw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049B80u); return; } g_debug_last_store_pc = 0x80049B80u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31B84: 00108400 sll $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00108400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC31B88: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC31B8C: 240E0010 addiu $t6, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240E0010u, cpu->gpr[14], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC31B90: A7AE0044 sh $t6, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049B90u); return; } g_debug_last_store_pc = 0x80049B90u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0044u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC31B94: 240F0100 addiu $t7, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240F0100u, cpu->gpr[15], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31B98: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31B9C: 27B80054 addiu $t8, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27B80054u, cpu->gpr[24], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80049B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC31BA0: 27B90050 addiu $t9, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27B90050u, cpu->gpr[25], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31BA4: A7AF0046 sh $t7, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BA4u); return; } g_debug_last_store_pc = 0x80049BA4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0046u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC31BA8: AFB90014 sw $t9, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049BA8u); return; } g_debug_last_store_pc = 0x80049BA8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90014u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31BAC: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049BACu); return; } g_debug_last_store_pc = 0x80049BACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31BB0: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC31BB4: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31BB8: 0C012914 jal 0xB004A450 */ - cpu->gpr[31] = 0x80049BC0u; /* jal link before delay slot */ - psx_delay_BFC31BB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31BBC: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BBCu); -#endif - if (psx_delay_BFC31BB8) { - psx_delay_BFC31BB8 = 0; - cpu->gpr[31] = 0x80049BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A450u); - cpu->pc = 0x8004A450u; return; - } -label_BFC31BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BC0u); -#endif - /* 0xBFC31BC0: 8FA8004C lw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049BC0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31BC4: 14400016 bne $v0, $zero, 0xBFC31C20 */ - uint32_t psx_brA_BFC31BC4 = cpu->gpr[2]; uint32_t psx_brB_BFC31BC4 = cpu->gpr[0]; - psx_taken_BFC31BC4 = (psx_brA_BFC31BC4 != psx_brB_BFC31BC4); - psx_delay_BFC31BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC31BC8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049BC8u); -#endif - if (psx_delay_BFC31BC4) { - psx_delay_BFC31BC4 = 0; - if (psx_taken_BFC31BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C20u); - goto label_BFC31C20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049BCCu); - } -label_BFC31BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31BCC: A7A00040 sh $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BCCu); return; } g_debug_last_store_pc = 0x80049BCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC31BD0: AFA00018 sw $zero, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049BD0u); return; } g_debug_last_store_pc = 0x80049BD0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC31BD4: AFA8004C sw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049BD4u); return; } g_debug_last_store_pc = 0x80049BD4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC31BD8: 24090100 addiu $t1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24090100u, cpu->gpr[9], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31BDC: A7A90042 sh $t1, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BDCu); return; } g_debug_last_store_pc = 0x80049BDCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90042u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC31BE0: 240A0010 addiu $t2, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x240A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31BE4: A7AA0044 sh $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BE4u); return; } g_debug_last_store_pc = 0x80049BE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC31BE8: 240B0100 addiu $t3, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240B0100u, cpu->gpr[11], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31BEC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049BF0u); -#endif - /* 0xBFC31BF0: 87A70064 lh $a3, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BF0u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x87A70064u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC31BF4: 27AC0054 addiu $t4, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27AC0054u, cpu->gpr[12], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC31BF8: 27AD0050 addiu $t5, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27AD0050u, cpu->gpr[13], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80049BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC31BFC: A7AB0046 sh $t3, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049BFCu); return; } g_debug_last_store_pc = 0x80049BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0046u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80049BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC31C00: AFAD0014 sw $t5, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C00u); return; } g_debug_last_store_pc = 0x80049C00u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0014u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC31C04: AFAC0010 sw $t4, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C04u); return; } g_debug_last_store_pc = 0x80049C04u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31C08: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31C0C: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31C10: 0C012914 jal 0xB004A450 */ - cpu->gpr[31] = 0x80049C18u; /* jal link before delay slot */ - psx_delay_BFC31C10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC31C14: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049C14u); -#endif - if (psx_delay_BFC31C10) { - psx_delay_BFC31C10 = 0; - cpu->gpr[31] = 0x80049C18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A450u); - cpu->pc = 0x8004A450u; return; - } -label_BFC31C18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C18u); -#endif - /* 0xBFC31C18: 8FA8004C lw $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC31C1C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049C1Cu); -#endif -label_BFC31C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C20u); -#endif - /* 0xBFC31C20: 87AE0054 lh $t6, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C20u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0054u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C20u); -#endif - /* 0xBFC31C24: 8FA2006C lw $v0, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C24u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2006Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC31C28: 000E7980 sll $t7, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC31C2C: A44F0000 sh $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C2Cu); return; } g_debug_last_store_pc = 0x80049C2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C30u); -#endif - /* 0xBFC31C30: 87B80050 lh $t8, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C30u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80050u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC31C34: 0010C980 sll $t9, $s0, 6 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[16] << 6u; - PGXP_ALU(0x0010C980u, cpu->gpr[25], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC31C38: A4590004 sh $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C38u); return; } g_debug_last_store_pc = 0x80049C38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC31C3C: A4580002 sh $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C3Cu); return; } g_debug_last_store_pc = 0x80049C3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C40u); -#endif - /* 0xBFC31C40: 87A90064 lh $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C40u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31C44: 10000002 beq $zero, $zero, 0xBFC31C50 */ - uint32_t psx_brA_BFC31C44 = cpu->gpr[0]; uint32_t psx_brB_BFC31C44 = cpu->gpr[0]; - psx_taken_BFC31C44 = (psx_brA_BFC31C44 == psx_brB_BFC31C44); - psx_delay_BFC31C44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC31C48: A4490006 sh $t1, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C48u); return; } g_debug_last_store_pc = 0x80049C48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4490006u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C48u); -#endif - if (psx_delay_BFC31C44) { - psx_delay_BFC31C44 = 0; - if (psx_taken_BFC31C44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C50u); - goto label_BFC31C50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C4Cu); - } -label_BFC31C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC31C4C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C4Cu); -#endif -label_BFC31C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C50u); -#endif - /* 0xBFC31C50: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C50u); -#endif - /* 0xBFC31C54: 8FB00030 lw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C54u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31C58: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31C5C: 03E00008 jr $ra */ - psx_delay_BFC31C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Cu); -#endif - /* 0xBFC31C60: 01031024 and $v0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[8] & cpu->gpr[3]; - PGXP_ALU(0x01031024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049C60u); -#endif - if (psx_delay_BFC31C5C) { - psx_delay_BFC31C5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31C64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31C64u); - int psx_delay_BFC31C7C = 0; - int psx_taken_BFC31C7C = 0; - int psx_delay_BFC31CA8 = 0; - int psx_taken_BFC31CA8 = 0; - int psx_delay_BFC31CB0 = 0; - int psx_taken_BFC31CB0 = 0; - int psx_delay_BFC31CBC = 0; - int psx_taken_BFC31CBC = 0; - int psx_delay_BFC31CC4 = 0; - int psx_taken_BFC31CC4 = 0; - int psx_delay_BFC31CD0 = 0; - int psx_taken_BFC31CD0 = 0; - int psx_delay_BFC31CFC = 0; - int psx_delay_BFC31D0C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31C84u: goto label_BFC31C84; - case 0xBFC31C88u: goto label_BFC31C88; - case 0xBFC31CB0u: goto label_BFC31CB0; - case 0xBFC31CB8u: goto label_BFC31CB8; - case 0xBFC31CBCu: goto label_BFC31CBC; - case 0xBFC31CC4u: goto label_BFC31CC4; - case 0xBFC31CCCu: goto label_BFC31CCC; - case 0xBFC31CD0u: goto label_BFC31CD0; - case 0xBFC31CD8u: goto label_BFC31CD8; - case 0xBFC31CDCu: goto label_BFC31CDC; - case 0xBFC31D04u: goto label_BFC31D04; - default: break; - } - } -label_BFC31C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31C64: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31C68: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049C68u); return; } g_debug_last_store_pc = 0x80049C68u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC31C6C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C70u); -#endif - /* 0xBFC31C70: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C70u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31C74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC31C7C: 05C10002 bgez $t6, 0xBFC31C88 */ - uint32_t psx_brA_BFC31C7C = cpu->gpr[14]; - psx_taken_BFC31C7C = ((int32_t)psx_brA_BFC31C7C >= 0); - psx_delay_BFC31C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC31C80: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049C80u); -#endif - if (psx_delay_BFC31C7C) { - psx_delay_BFC31C7C = 0; - if (psx_taken_BFC31C7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C88u); - goto label_BFC31C88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049C84u); - } -label_BFC31C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31C84: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049C84u); -#endif -label_BFC31C88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31C88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC31C88: 00017983 sra $t7, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00017983u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31C8C: A7AF0020 sh $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C8Cu); return; } g_debug_last_store_pc = 0x80049C8Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049C90u); -#endif - /* 0xBFC31C90: 84780002 lh $t8, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C90u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31C94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31C98: A7B80022 sh $t8, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C98u); return; } g_debug_last_store_pc = 0x80049C98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80022u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C98u); -#endif - /* 0xBFC31C9C: 84670004 lh $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049C9Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x84670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31CA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31CA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31CA8: 04E10004 bgez $a3, 0xBFC31CBC */ - uint32_t psx_brA_BFC31CA8 = cpu->gpr[7]; - psx_taken_BFC31CA8 = ((int32_t)psx_brA_BFC31CA8 >= 0); - psx_delay_BFC31CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC31CAC: 30F9003F andi $t9, $a3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu; - PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049CACu); -#endif - if (psx_delay_BFC31CA8) { - psx_delay_BFC31CA8 = 0; - if (psx_taken_BFC31CA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CBCu); - goto label_BFC31CBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CB0u); - } -label_BFC31CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31CB0: 13200002 beq $t9, $zero, 0xBFC31CBC */ - uint32_t psx_brA_BFC31CB0 = cpu->gpr[25]; uint32_t psx_brB_BFC31CB0 = cpu->gpr[0]; - psx_taken_BFC31CB0 = (psx_brA_BFC31CB0 == psx_brB_BFC31CB0); - psx_delay_BFC31CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31CB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049CB4u); -#endif - if (psx_delay_BFC31CB0) { - psx_delay_BFC31CB0 = 0; - if (psx_taken_BFC31CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CBCu); - goto label_BFC31CBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CB8u); - } -label_BFC31CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC31CB8: 2739FFC0 addiu $t9, $t9, -64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-64)); - PGXP_ALU(0x2739FFC0u, cpu->gpr[25], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CB8u); -#endif -label_BFC31CBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31CBC: 13200004 beq $t9, $zero, 0xBFC31CD0 */ - uint32_t psx_brA_BFC31CBC = cpu->gpr[25]; uint32_t psx_brB_BFC31CBC = cpu->gpr[0]; - psx_taken_BFC31CBC = (psx_brA_BFC31CBC == psx_brB_BFC31CBC); - psx_delay_BFC31CBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31CC0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049CC0u); -#endif - if (psx_delay_BFC31CBC) { - psx_delay_BFC31CBC = 0; - if (psx_taken_BFC31CBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CD0u); - goto label_BFC31CD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CC4u); - } -label_BFC31CC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31CC4: 10000002 beq $zero, $zero, 0xBFC31CD0 */ - uint32_t psx_brA_BFC31CC4 = cpu->gpr[0]; uint32_t psx_brB_BFC31CC4 = cpu->gpr[0]; - psx_taken_BFC31CC4 = (psx_brA_BFC31CC4 == psx_brB_BFC31CC4); - psx_delay_BFC31CC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31CC8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CC8u); -#endif - if (psx_delay_BFC31CC4) { - psx_delay_BFC31CC4 = 0; - if (psx_taken_BFC31CC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CD0u); - goto label_BFC31CD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CCCu); - } -label_BFC31CCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31CCC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049CCCu); -#endif -label_BFC31CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31CD0: 04E10002 bgez $a3, 0xBFC31CDC */ - uint32_t psx_brA_BFC31CD0 = cpu->gpr[7]; - psx_taken_BFC31CD0 = ((int32_t)psx_brA_BFC31CD0 >= 0); - psx_delay_BFC31CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC31CD4: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049CD4u); -#endif - if (psx_delay_BFC31CD0) { - psx_delay_BFC31CD0 = 0; - if (psx_taken_BFC31CD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CDCu); - goto label_BFC31CDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049CD8u); - } -label_BFC31CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31CD8: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049CD8u); -#endif -label_BFC31CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC31CDC: 00014183 sra $t0, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00014183u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC31CE0: 01024821 addu $t1, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[2]; - PGXP_ALU(0x01024821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31CE4: A7A90024 sh $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049CE4u); return; } g_debug_last_store_pc = 0x80049CE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049CE4u); -#endif - /* 0xBFC31CE8: 846A0006 lh $t2, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049CE8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31CEC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31CF0: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31CF4: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31CF8: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31CFC: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x80049D04u; /* jal link before delay slot */ - psx_delay_BFC31CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31D00: A7AA0026 sh $t2, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D00u); return; } g_debug_last_store_pc = 0x80049D00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0026u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D00u); -#endif - if (psx_delay_BFC31CFC) { - psx_delay_BFC31CFC = 0; - cpu->gpr[31] = 0x80049D04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC31D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D04u); -#endif - /* 0xBFC31D04: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049D04u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31D08: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31D0C: 03E00008 jr $ra */ - psx_delay_BFC31D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31D10: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D10u); -#endif - if (psx_delay_BFC31D0C) { - psx_delay_BFC31D0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31D14(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31D14u); - int psx_delay_BFC31D2C = 0; - int psx_taken_BFC31D2C = 0; - int psx_delay_BFC31D58 = 0; - int psx_taken_BFC31D58 = 0; - int psx_delay_BFC31D60 = 0; - int psx_taken_BFC31D60 = 0; - int psx_delay_BFC31D6C = 0; - int psx_taken_BFC31D6C = 0; - int psx_delay_BFC31D74 = 0; - int psx_taken_BFC31D74 = 0; - int psx_delay_BFC31D80 = 0; - int psx_taken_BFC31D80 = 0; - int psx_delay_BFC31DAC = 0; - int psx_delay_BFC31DBC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31D34u: goto label_BFC31D34; - case 0xBFC31D38u: goto label_BFC31D38; - case 0xBFC31D60u: goto label_BFC31D60; - case 0xBFC31D68u: goto label_BFC31D68; - case 0xBFC31D6Cu: goto label_BFC31D6C; - case 0xBFC31D74u: goto label_BFC31D74; - case 0xBFC31D7Cu: goto label_BFC31D7C; - case 0xBFC31D80u: goto label_BFC31D80; - case 0xBFC31D88u: goto label_BFC31D88; - case 0xBFC31D8Cu: goto label_BFC31D8C; - case 0xBFC31DB4u: goto label_BFC31DB4; - default: break; - } - } -label_BFC31D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31D14: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31D18: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049D18u); return; } g_debug_last_store_pc = 0x80049D18u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC31D1C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D20u); -#endif - /* 0xBFC31D20: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D20u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC31D2C: 05C10002 bgez $t6, 0xBFC31D38 */ - uint32_t psx_brA_BFC31D2C = cpu->gpr[14]; - psx_taken_BFC31D2C = ((int32_t)psx_brA_BFC31D2C >= 0); - psx_delay_BFC31D2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC31D30: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D30u); -#endif - if (psx_delay_BFC31D2C) { - psx_delay_BFC31D2C = 0; - if (psx_taken_BFC31D2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D38u); - goto label_BFC31D38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D34u); - } -label_BFC31D34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31D34: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049D34u); -#endif -label_BFC31D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC31D38: 00017983 sra $t7, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00017983u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31D3C: A7AF0020 sh $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D3Cu); return; } g_debug_last_store_pc = 0x80049D3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D40u); -#endif - /* 0xBFC31D40: 84780002 lh $t8, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D40u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31D48: A7B80022 sh $t8, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D48u); return; } g_debug_last_store_pc = 0x80049D48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80022u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D48u); -#endif - /* 0xBFC31D4C: 84670004 lh $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D4Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x84670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31D58: 04E10004 bgez $a3, 0xBFC31D6C */ - uint32_t psx_brA_BFC31D58 = cpu->gpr[7]; - psx_taken_BFC31D58 = ((int32_t)psx_brA_BFC31D58 >= 0); - psx_delay_BFC31D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC31D5C: 30F9003F andi $t9, $a3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu; - PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049D5Cu); -#endif - if (psx_delay_BFC31D58) { - psx_delay_BFC31D58 = 0; - if (psx_taken_BFC31D58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D6Cu); - goto label_BFC31D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D60u); - } -label_BFC31D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31D60: 13200002 beq $t9, $zero, 0xBFC31D6C */ - uint32_t psx_brA_BFC31D60 = cpu->gpr[25]; uint32_t psx_brB_BFC31D60 = cpu->gpr[0]; - psx_taken_BFC31D60 = (psx_brA_BFC31D60 == psx_brB_BFC31D60); - psx_delay_BFC31D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049D64u); -#endif - if (psx_delay_BFC31D60) { - psx_delay_BFC31D60 = 0; - if (psx_taken_BFC31D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D6Cu); - goto label_BFC31D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D68u); - } -label_BFC31D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC31D68: 2739FFC0 addiu $t9, $t9, -64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-64)); - PGXP_ALU(0x2739FFC0u, cpu->gpr[25], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D68u); -#endif -label_BFC31D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31D6C: 13200004 beq $t9, $zero, 0xBFC31D80 */ - uint32_t psx_brA_BFC31D6C = cpu->gpr[25]; uint32_t psx_brB_BFC31D6C = cpu->gpr[0]; - psx_taken_BFC31D6C = (psx_brA_BFC31D6C == psx_brB_BFC31D6C); - psx_delay_BFC31D6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31D70: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D70u); -#endif - if (psx_delay_BFC31D6C) { - psx_delay_BFC31D6C = 0; - if (psx_taken_BFC31D6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D80u); - goto label_BFC31D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D74u); - } -label_BFC31D74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31D74: 10000002 beq $zero, $zero, 0xBFC31D80 */ - uint32_t psx_brA_BFC31D74 = cpu->gpr[0]; uint32_t psx_brB_BFC31D74 = cpu->gpr[0]; - psx_taken_BFC31D74 = (psx_brA_BFC31D74 == psx_brB_BFC31D74); - psx_delay_BFC31D74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31D78: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D78u); -#endif - if (psx_delay_BFC31D74) { - psx_delay_BFC31D74 = 0; - if (psx_taken_BFC31D74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D80u); - goto label_BFC31D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D7Cu); - } -label_BFC31D7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31D7C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D7Cu); -#endif -label_BFC31D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31D80: 04E10002 bgez $a3, 0xBFC31D8C */ - uint32_t psx_brA_BFC31D80 = cpu->gpr[7]; - psx_taken_BFC31D80 = ((int32_t)psx_brA_BFC31D80 >= 0); - psx_delay_BFC31D80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC31D84: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D84u); -#endif - if (psx_delay_BFC31D80) { - psx_delay_BFC31D80 = 0; - if (psx_taken_BFC31D80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D8Cu); - goto label_BFC31D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049D88u); - } -label_BFC31D88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31D88: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049D88u); -#endif -label_BFC31D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC31D8C: 00014183 sra $t0, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00014183u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC31D90: 01024821 addu $t1, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[2]; - PGXP_ALU(0x01024821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31D94: A7A90024 sh $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D94u); return; } g_debug_last_store_pc = 0x80049D94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D94u); -#endif - /* 0xBFC31D98: 846A0006 lh $t2, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049D98u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31D9C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31DA0: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31DA4: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31DA8: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31DAC: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x80049DB4u; /* jal link before delay slot */ - psx_delay_BFC31DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31DB0: A7AA0026 sh $t2, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DB0u); return; } g_debug_last_store_pc = 0x80049DB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0026u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DB0u); -#endif - if (psx_delay_BFC31DAC) { - psx_delay_BFC31DAC = 0; - cpu->gpr[31] = 0x80049DB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC31DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DB4u); -#endif - /* 0xBFC31DB4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049DB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31DB8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31DBC: 03E00008 jr $ra */ - psx_delay_BFC31DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31DC0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049DC0u); -#endif - if (psx_delay_BFC31DBC) { - psx_delay_BFC31DBC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31DC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31DC4u); - int psx_delay_BFC31DDC = 0; - int psx_taken_BFC31DDC = 0; - int psx_delay_BFC31E08 = 0; - int psx_taken_BFC31E08 = 0; - int psx_delay_BFC31E10 = 0; - int psx_taken_BFC31E10 = 0; - int psx_delay_BFC31E1C = 0; - int psx_taken_BFC31E1C = 0; - int psx_delay_BFC31E24 = 0; - int psx_taken_BFC31E24 = 0; - int psx_delay_BFC31E30 = 0; - int psx_taken_BFC31E30 = 0; - int psx_delay_BFC31E5C = 0; - int psx_delay_BFC31E6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31DE4u: goto label_BFC31DE4; - case 0xBFC31DE8u: goto label_BFC31DE8; - case 0xBFC31E10u: goto label_BFC31E10; - case 0xBFC31E18u: goto label_BFC31E18; - case 0xBFC31E1Cu: goto label_BFC31E1C; - case 0xBFC31E24u: goto label_BFC31E24; - case 0xBFC31E2Cu: goto label_BFC31E2C; - case 0xBFC31E30u: goto label_BFC31E30; - case 0xBFC31E38u: goto label_BFC31E38; - case 0xBFC31E3Cu: goto label_BFC31E3C; - case 0xBFC31E64u: goto label_BFC31E64; - default: break; - } - } -label_BFC31DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31DC4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31DC8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049DC8u); return; } g_debug_last_store_pc = 0x80049DC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC31DCC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DD0u); -#endif - /* 0xBFC31DD0: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DD0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31DD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC31DDC: 05C10002 bgez $t6, 0xBFC31DE8 */ - uint32_t psx_brA_BFC31DDC = cpu->gpr[14]; - psx_taken_BFC31DDC = ((int32_t)psx_brA_BFC31DDC >= 0); - psx_delay_BFC31DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC31DE0: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049DE0u); -#endif - if (psx_delay_BFC31DDC) { - psx_delay_BFC31DDC = 0; - if (psx_taken_BFC31DDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DE8u); - goto label_BFC31DE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049DE4u); - } -label_BFC31DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31DE4: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049DE4u); -#endif -label_BFC31DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC31DE8: 00017983 sra $t7, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00017983u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31DEC: A7AF0020 sh $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DECu); return; } g_debug_last_store_pc = 0x80049DECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049DF0u); -#endif - /* 0xBFC31DF0: 84780002 lh $t8, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DF0u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31DF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31DF8: A7B80022 sh $t8, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DF8u); return; } g_debug_last_store_pc = 0x80049DF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80022u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DF8u); -#endif - /* 0xBFC31DFC: 84670004 lh $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049DFCu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x84670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31E08: 04E10004 bgez $a3, 0xBFC31E1C */ - uint32_t psx_brA_BFC31E08 = cpu->gpr[7]; - psx_taken_BFC31E08 = ((int32_t)psx_brA_BFC31E08 >= 0); - psx_delay_BFC31E08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC31E0C: 30F9003F andi $t9, $a3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu; - PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049E0Cu); -#endif - if (psx_delay_BFC31E08) { - psx_delay_BFC31E08 = 0; - if (psx_taken_BFC31E08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E1Cu); - goto label_BFC31E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E10u); - } -label_BFC31E10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31E10: 13200002 beq $t9, $zero, 0xBFC31E1C */ - uint32_t psx_brA_BFC31E10 = cpu->gpr[25]; uint32_t psx_brB_BFC31E10 = cpu->gpr[0]; - psx_taken_BFC31E10 = (psx_brA_BFC31E10 == psx_brB_BFC31E10); - psx_delay_BFC31E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049E14u); -#endif - if (psx_delay_BFC31E10) { - psx_delay_BFC31E10 = 0; - if (psx_taken_BFC31E10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E1Cu); - goto label_BFC31E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E18u); - } -label_BFC31E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC31E18: 2739FFC0 addiu $t9, $t9, -64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-64)); - PGXP_ALU(0x2739FFC0u, cpu->gpr[25], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E18u); -#endif -label_BFC31E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31E1C: 13200004 beq $t9, $zero, 0xBFC31E30 */ - uint32_t psx_brA_BFC31E1C = cpu->gpr[25]; uint32_t psx_brB_BFC31E1C = cpu->gpr[0]; - psx_taken_BFC31E1C = (psx_brA_BFC31E1C == psx_brB_BFC31E1C); - psx_delay_BFC31E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31E20: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E20u); -#endif - if (psx_delay_BFC31E1C) { - psx_delay_BFC31E1C = 0; - if (psx_taken_BFC31E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E30u); - goto label_BFC31E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E24u); - } -label_BFC31E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E24: 10000002 beq $zero, $zero, 0xBFC31E30 */ - uint32_t psx_brA_BFC31E24 = cpu->gpr[0]; uint32_t psx_brB_BFC31E24 = cpu->gpr[0]; - psx_taken_BFC31E24 = (psx_brA_BFC31E24 == psx_brB_BFC31E24); - psx_delay_BFC31E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31E28: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E28u); -#endif - if (psx_delay_BFC31E24) { - psx_delay_BFC31E24 = 0; - if (psx_taken_BFC31E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E30u); - goto label_BFC31E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E2Cu); - } -label_BFC31E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31E2C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E2Cu); -#endif -label_BFC31E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31E30: 04E10002 bgez $a3, 0xBFC31E3C */ - uint32_t psx_brA_BFC31E30 = cpu->gpr[7]; - psx_taken_BFC31E30 = ((int32_t)psx_brA_BFC31E30 >= 0); - psx_delay_BFC31E30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC31E34: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E34u); -#endif - if (psx_delay_BFC31E30) { - psx_delay_BFC31E30 = 0; - if (psx_taken_BFC31E30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E3Cu); - goto label_BFC31E3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E38u); - } -label_BFC31E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31E38: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049E38u); -#endif -label_BFC31E3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC31E3C: 00014183 sra $t0, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00014183u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC31E40: 01024821 addu $t1, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[2]; - PGXP_ALU(0x01024821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31E44: A7A90024 sh $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049E44u); return; } g_debug_last_store_pc = 0x80049E44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E44u); -#endif - /* 0xBFC31E48: 846A0006 lh $t2, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049E48u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31E4C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31E50: 2484DDF0 addiu $a0, $a0, -8720 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8720)); - PGXP_ALU(0x2484DDF0u, cpu->gpr[4], _pgx1, 0xFFFFDDF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31E54: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31E58: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31E5C: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x80049E64u; /* jal link before delay slot */ - psx_delay_BFC31E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31E60: A7AA0026 sh $t2, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049E60u); return; } g_debug_last_store_pc = 0x80049E60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0026u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E60u); -#endif - if (psx_delay_BFC31E5C) { - psx_delay_BFC31E5C = 0; - cpu->gpr[31] = 0x80049E64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC31E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E64u); -#endif - /* 0xBFC31E64: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049E64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31E68: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31E6C: 03E00008 jr $ra */ - psx_delay_BFC31E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31E70: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E70u); -#endif - if (psx_delay_BFC31E6C) { - psx_delay_BFC31E6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC31E74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC31E74u); - int psx_delay_BFC31E8C = 0; - int psx_taken_BFC31E8C = 0; - int psx_delay_BFC31EB8 = 0; - int psx_taken_BFC31EB8 = 0; - int psx_delay_BFC31EC0 = 0; - int psx_taken_BFC31EC0 = 0; - int psx_delay_BFC31ECC = 0; - int psx_taken_BFC31ECC = 0; - int psx_delay_BFC31ED4 = 0; - int psx_taken_BFC31ED4 = 0; - int psx_delay_BFC31EE0 = 0; - int psx_taken_BFC31EE0 = 0; - int psx_delay_BFC31F0C = 0; - int psx_delay_BFC31F1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC31E94u: goto label_BFC31E94; - case 0xBFC31E98u: goto label_BFC31E98; - case 0xBFC31EC0u: goto label_BFC31EC0; - case 0xBFC31EC8u: goto label_BFC31EC8; - case 0xBFC31ECCu: goto label_BFC31ECC; - case 0xBFC31ED4u: goto label_BFC31ED4; - case 0xBFC31EDCu: goto label_BFC31EDC; - case 0xBFC31EE0u: goto label_BFC31EE0; - case 0xBFC31EE8u: goto label_BFC31EE8; - case 0xBFC31EECu: goto label_BFC31EEC; - case 0xBFC31F14u: goto label_BFC31F14; - default: break; - } - } -label_BFC31E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31E74: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC31E78: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049E78u); return; } g_debug_last_store_pc = 0x80049E78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC31E7C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E80u); -#endif - /* 0xBFC31E80: 846E0000 lh $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049E80u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x846E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC31E8C: 05C10002 bgez $t6, 0xBFC31E98 */ - uint32_t psx_brA_BFC31E8C = cpu->gpr[14]; - psx_taken_BFC31E8C = ((int32_t)psx_brA_BFC31E8C >= 0); - psx_delay_BFC31E8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4003u); -#endif - /* 0xBFC31E90: 01C00821 addu $at, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[14] + cpu->gpr[0]; - PGXP_ALU(0x01C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049E90u); -#endif - if (psx_delay_BFC31E8C) { - psx_delay_BFC31E8C = 0; - if (psx_taken_BFC31E8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E98u); - goto label_BFC31E98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049E94u); - } -label_BFC31E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31E94: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049E94u); -#endif -label_BFC31E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC31E98: 00017983 sra $t7, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00017983u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC31E9C: A7AF0020 sh $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049E9Cu); return; } g_debug_last_store_pc = 0x80049E9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80049E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EA0u); -#endif - /* 0xBFC31EA0: 84780002 lh $t8, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049EA0u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x84780002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31EA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC31EA8: A7B80022 sh $t8, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049EA8u); return; } g_debug_last_store_pc = 0x80049EA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80022u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80049EA8u); -#endif - /* 0xBFC31EAC: 84670004 lh $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049EACu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } - PGXP_LOAD(0x84670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80049EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31EB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31EB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31EB8: 04E10004 bgez $a3, 0xBFC31ECC */ - uint32_t psx_brA_BFC31EB8 = cpu->gpr[7]; - psx_taken_BFC31EB8 = ((int32_t)psx_brA_BFC31EB8 >= 0); - psx_delay_BFC31EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC31EBC: 30F9003F andi $t9, $a3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x3Fu; - PGXP_ALU(0x30F9003Fu, cpu->gpr[25], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049EBCu); -#endif - if (psx_delay_BFC31EB8) { - psx_delay_BFC31EB8 = 0; - if (psx_taken_BFC31EB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049ECCu); - goto label_BFC31ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EC0u); - } -label_BFC31EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31EC0: 13200002 beq $t9, $zero, 0xBFC31ECC */ - uint32_t psx_brA_BFC31EC0 = cpu->gpr[25]; uint32_t psx_brB_BFC31EC0 = cpu->gpr[0]; - psx_taken_BFC31EC0 = (psx_brA_BFC31EC0 == psx_brB_BFC31EC0); - psx_delay_BFC31EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31EC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80049EC4u); -#endif - if (psx_delay_BFC31EC0) { - psx_delay_BFC31EC0 = 0; - if (psx_taken_BFC31EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049ECCu); - goto label_BFC31ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EC8u); - } -label_BFC31EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC31EC8: 2739FFC0 addiu $t9, $t9, -64 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-64)); - PGXP_ALU(0x2739FFC0u, cpu->gpr[25], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80049EC8u); -#endif -label_BFC31ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC31ECC: 13200004 beq $t9, $zero, 0xBFC31EE0 */ - uint32_t psx_brA_BFC31ECC = cpu->gpr[25]; uint32_t psx_brB_BFC31ECC = cpu->gpr[0]; - psx_taken_BFC31ECC = (psx_brA_BFC31ECC == psx_brB_BFC31ECC); - psx_delay_BFC31ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31ED0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049ED0u); -#endif - if (psx_delay_BFC31ECC) { - psx_delay_BFC31ECC = 0; - if (psx_taken_BFC31ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EE0u); - goto label_BFC31EE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049ED4u); - } -label_BFC31ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC31ED4: 10000002 beq $zero, $zero, 0xBFC31EE0 */ - uint32_t psx_brA_BFC31ED4 = cpu->gpr[0]; uint32_t psx_brB_BFC31ED4 = cpu->gpr[0]; - psx_taken_BFC31ED4 = (psx_brA_BFC31ED4 == psx_brB_BFC31ED4); - psx_delay_BFC31ED4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31ED8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80049ED8u); -#endif - if (psx_delay_BFC31ED4) { - psx_delay_BFC31ED4 = 0; - if (psx_taken_BFC31ED4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EE0u); - goto label_BFC31EE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EDCu); - } -label_BFC31EDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31EDC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049EDCu); -#endif -label_BFC31EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC31EE0: 04E10002 bgez $a3, 0xBFC31EEC */ - uint32_t psx_brA_BFC31EE0 = cpu->gpr[7]; - psx_taken_BFC31EE0 = ((int32_t)psx_brA_BFC31EE0 >= 0); - psx_delay_BFC31EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC31EE4: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049EE4u); -#endif - if (psx_delay_BFC31EE0) { - psx_delay_BFC31EE0 = 0; - if (psx_taken_BFC31EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EECu); - goto label_BFC31EEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80049EE8u); - } -label_BFC31EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC31EE8: 2421003F addiu $at, $at, 63 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (63)); - PGXP_ALU(0x2421003Fu, cpu->gpr[1], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80049EE8u); -#endif -label_BFC31EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC31EEC: 00014183 sra $t0, $at, 6 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[1] >> 6u); - PGXP_ALU(0x00014183u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80049EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC31EF0: 01024821 addu $t1, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[2]; - PGXP_ALU(0x01024821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC31EF4: A7A90024 sh $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049EF4u); return; } g_debug_last_store_pc = 0x80049EF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80049EF4u); -#endif - /* 0xBFC31EF8: 846A0006 lh $t2, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049EF8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31EFC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80049EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC31F00: 2484DE00 addiu $a0, $a0, -8704 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8704)); - PGXP_ALU(0x2484DE00u, cpu->gpr[4], _pgx1, 0xFFFFDE00u); } -#ifdef PSX_COSIM - cosim_instr(0x80049F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC31F04: 27A50020 addiu $a1, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A50020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80049F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC31F08: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC31F0C: 0C012CD6 jal 0xB004B358 */ - cpu->gpr[31] = 0x80049F14u; /* jal link before delay slot */ - psx_delay_BFC31F0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC31F10: A7AA0026 sh $t2, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80049F10u); return; } g_debug_last_store_pc = 0x80049F10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0026u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80049F10u); -#endif - if (psx_delay_BFC31F0C) { - psx_delay_BFC31F0C = 0; - cpu->gpr[31] = 0x80049F14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B358u); - cpu->pc = 0x8004B358u; return; - } -label_BFC31F14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC31F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC31F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049F14u); -#endif - /* 0xBFC31F14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80049F14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80049F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC31F18: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80049F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC31F1C: 03E00008 jr $ra */ - psx_delay_BFC31F1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80049F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC31F20: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80049F20u); -#endif - if (psx_delay_BFC31F1C) { - psx_delay_BFC31F1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32010(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32010u); - int psx_delay_BFC3201C = 0; - int psx_taken_BFC3201C = 0; - int psx_delay_BFC32030 = 0; - int psx_taken_BFC32030 = 0; - int psx_delay_BFC32038 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32024u: goto label_BFC32024; - case 0xBFC32038u: goto label_BFC32038; - default: break; - } - } -label_BFC32010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A010u); -#endif - /* 0xBFC32010: 8C830008 lw $v1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A010u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A010u); -#endif - /* 0xBFC32014: 8C82000C lw $v0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A014u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC32018: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3201C: 10A00006 beq $a1, $zero, 0xBFC32038 */ - uint32_t psx_brA_BFC3201C = cpu->gpr[5]; uint32_t psx_brB_BFC3201C = cpu->gpr[0]; - psx_taken_BFC3201C = (psx_brA_BFC3201C == psx_brB_BFC3201C); - psx_delay_BFC3201C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32020: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A020u); -#endif - if (psx_delay_BFC3201C) { - psx_delay_BFC3201C = 0; - if (psx_taken_BFC3201C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A038u); - goto label_BFC32038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A024u); - } -label_BFC32024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC32024: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32028: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A028u); return; } g_debug_last_store_pc = 0x8004A028u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3202C: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC32030: 14A0FFFC bne $a1, $zero, 0xBFC32024 */ - uint32_t psx_brA_BFC32030 = cpu->gpr[5]; uint32_t psx_brB_BFC32030 = cpu->gpr[0]; - psx_taken_BFC32030 = (psx_brA_BFC32030 != psx_brB_BFC32030); - psx_delay_BFC32030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32034: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A034u); -#endif - if (psx_delay_BFC32030) { - psx_delay_BFC32030 = 0; - if (psx_taken_BFC32030) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A024u); - goto label_BFC32024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A038u); - } -label_BFC32038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32038: 03E00008 jr $ra */ - psx_delay_BFC32038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3203C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A03Cu); -#endif - if (psx_delay_BFC32038) { - psx_delay_BFC32038 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32040(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32040u); - int psx_delay_BFC3204C = 0; - int psx_taken_BFC3204C = 0; - int psx_delay_BFC32068 = 0; - int psx_taken_BFC32068 = 0; - int psx_delay_BFC32070 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32054u: goto label_BFC32054; - case 0xBFC32070u: goto label_BFC32070; - default: break; - } - } -label_BFC32040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A040u); -#endif - /* 0xBFC32040: 8C830008 lw $v1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A040u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830008u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A040u); -#endif - /* 0xBFC32044: 8C82000C lw $v0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A044u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC32048: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3204C: 10A00008 beq $a1, $zero, 0xBFC32070 */ - uint32_t psx_brA_BFC3204C = cpu->gpr[5]; uint32_t psx_brB_BFC3204C = cpu->gpr[0]; - psx_taken_BFC3204C = (psx_brA_BFC3204C == psx_brB_BFC3204C); - psx_delay_BFC3204C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32050: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A050u); -#endif - if (psx_delay_BFC3204C) { - psx_delay_BFC3204C = 0; - if (psx_taken_BFC3204C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A070u); - goto label_BFC32070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A054u); - } -label_BFC32054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A054u); -#endif - /* 0xBFC32054: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A054u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC32058: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC001u); -#endif - /* 0xBFC3205C: 01C07827 nor $t7, $t6, $zero */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = ~(cpu->gpr[14] | cpu->gpr[0]); - PGXP_ALU(0x01C07827u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC32060: AC4F0000 sw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A060u); return; } g_debug_last_store_pc = 0x8004A060u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32064: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC32068: 14A0FFFA bne $a1, $zero, 0xBFC32054 */ - uint32_t psx_brA_BFC32068 = cpu->gpr[5]; uint32_t psx_brB_BFC32068 = cpu->gpr[0]; - psx_taken_BFC32068 = (psx_brA_BFC32068 != psx_brB_BFC32068); - psx_delay_BFC32068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3206C: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A06Cu); -#endif - if (psx_delay_BFC32068) { - psx_delay_BFC32068 = 0; - if (psx_taken_BFC32068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A054u); - goto label_BFC32054; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A070u); - } -label_BFC32070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32070: 03E00008 jr $ra */ - psx_delay_BFC32070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A074u); -#endif - if (psx_delay_BFC32070) { - psx_delay_BFC32070 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32078(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32078u); - int psx_delay_BFC32088 = 0; - int psx_taken_BFC32088 = 0; - int psx_delay_BFC320A4 = 0; - int psx_taken_BFC320A4 = 0; - int psx_delay_BFC320AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32090u: goto label_BFC32090; - case 0xBFC320ACu: goto label_BFC320AC; - default: break; - } - } -label_BFC32078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A078u); -#endif - /* 0xBFC32078: 8C860008 lw $a2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A078u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x8C860008u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A078u); -#endif - /* 0xBFC3207C: 8C82000C lw $v0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A07Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A080u); -#endif - /* 0xBFC32080: 8CA3000C lw $v1, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A080u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } - PGXP_LOAD(0x8CA3000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC32084: 00C03821 addu $a3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC32088: 10E00008 beq $a3, $zero, 0xBFC320AC */ - uint32_t psx_brA_BFC32088 = cpu->gpr[7]; uint32_t psx_brB_BFC32088 = cpu->gpr[0]; - psx_taken_BFC32088 = (psx_brA_BFC32088 == psx_brB_BFC32088); - psx_delay_BFC32088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3208C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A08Cu); -#endif - if (psx_delay_BFC32088) { - psx_delay_BFC32088 = 0; - if (psx_taken_BFC32088) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0ACu); - goto label_BFC320AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A090u); - } -label_BFC32090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A090u); -#endif - /* 0xBFC32090: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A090u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC32094: 00C03821 addu $a3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32098: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3209C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC320A0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC320A4: 14E0FFFA bne $a3, $zero, 0xBFC32090 */ - uint32_t psx_brA_BFC320A4 = cpu->gpr[7]; uint32_t psx_brB_BFC320A4 = cpu->gpr[0]; - psx_taken_BFC320A4 = (psx_brA_BFC320A4 != psx_brB_BFC320A4); - psx_delay_BFC320A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC320A8: AC6EFFFC sw $t6, -4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0A8u); return; } g_debug_last_store_pc = 0x8004A0A8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0A8u); -#endif - if (psx_delay_BFC320A4) { - psx_delay_BFC320A4 = 0; - if (psx_taken_BFC320A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A090u); - goto label_BFC32090; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0ACu); - } -label_BFC320AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC320ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC320ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC320AC: 03E00008 jr $ra */ - psx_delay_BFC320AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC320B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A0B0u); -#endif - if (psx_delay_BFC320AC) { - psx_delay_BFC320AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC320B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC320B4u); - int psx_delay_BFC320C8 = 0; - int psx_taken_BFC320C8 = 0; - int psx_delay_BFC320F0 = 0; - int psx_taken_BFC320F0 = 0; - int psx_delay_BFC320F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC320D0u: goto label_BFC320D0; - case 0xBFC320F8u: goto label_BFC320F8; - default: break; - } - } -label_BFC320B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC320B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC320B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0B4u); -#endif - /* 0xBFC320B4: 8C880008 lw $t0, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0B4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0B4u); -#endif - /* 0xBFC320B8: 8C82000C lw $v0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0B8u); -#endif - /* 0xBFC320BC: 8CA3000C lw $v1, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0BCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } - PGXP_LOAD(0x8CA3000Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0C0u); -#endif - /* 0xBFC320C0: 8CC7000C lw $a3, 12($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0C0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x40u); } - PGXP_LOAD(0x8CC7000Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC320C4: 01004821 addu $t1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01004821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC320C8: 1120000B beq $t1, $zero, 0xBFC320F8 */ - uint32_t psx_brA_BFC320C8 = cpu->gpr[9]; uint32_t psx_brB_BFC320C8 = cpu->gpr[0]; - psx_taken_BFC320C8 = (psx_brA_BFC320C8 == psx_brB_BFC320C8); - psx_delay_BFC320C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC320CC: 2508FFFF addiu $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2508FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0CCu); -#endif - if (psx_delay_BFC320C8) { - psx_delay_BFC320C8 = 0; - if (psx_taken_BFC320C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0F8u); - goto label_BFC320F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0D0u); - } -label_BFC320D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC320D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC320D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0D0u); -#endif - /* 0xBFC320D0: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0D0u); -#endif - /* 0xBFC320D4: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0D4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x301u); -#endif - /* 0xBFC320D8: 01004821 addu $t1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01004821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC320DC: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC320E0: ACF80000 sw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A0E0u); return; } g_debug_last_store_pc = 0x8004A0E0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC320E4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC320E8: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC320EC: 24E70004 addiu $a3, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (4)); - PGXP_ALU(0x24E70004u, cpu->gpr[7], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC320F0: 1520FFF7 bne $t1, $zero, 0xBFC320D0 */ - uint32_t psx_brA_BFC320F0 = cpu->gpr[9]; uint32_t psx_brB_BFC320F0 = cpu->gpr[0]; - psx_taken_BFC320F0 = (psx_brA_BFC320F0 != psx_brB_BFC320F0); - psx_delay_BFC320F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC320F4: 2508FFFF addiu $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-1)); - PGXP_ALU(0x2508FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A0F4u); -#endif - if (psx_delay_BFC320F0) { - psx_delay_BFC320F0 = 0; - if (psx_taken_BFC320F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0D0u); - goto label_BFC320D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0F8u); - } -label_BFC320F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC320F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC320F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC320F8: 03E00008 jr $ra */ - psx_delay_BFC320F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC320FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A0FCu); -#endif - if (psx_delay_BFC320F8) { - psx_delay_BFC320F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32100(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32100u); - int psx_delay_BFC3210C = 0; - int psx_taken_BFC3210C = 0; - int psx_delay_BFC32114 = 0; - int psx_taken_BFC32114 = 0; - int psx_delay_BFC32128 = 0; - int psx_taken_BFC32128 = 0; - int psx_delay_BFC3213C = 0; - int psx_taken_BFC3213C = 0; - int psx_delay_BFC32144 = 0; - int psx_delay_BFC321C4 = 0; - int psx_taken_BFC321C4 = 0; - int psx_delay_BFC321D0 = 0; - int psx_taken_BFC321D0 = 0; - int psx_delay_BFC321DC = 0; - int psx_taken_BFC321DC = 0; - int psx_delay_BFC321E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32114u: goto label_BFC32114; - case 0xBFC3211Cu: goto label_BFC3211C; - case 0xBFC32130u: goto label_BFC32130; - case 0xBFC32144u: goto label_BFC32144; - case 0xBFC3214Cu: goto label_BFC3214C; - case 0xBFC321CCu: goto label_BFC321CC; - case 0xBFC321D0u: goto label_BFC321D0; - case 0xBFC321D8u: goto label_BFC321D8; - case 0xBFC321DCu: goto label_BFC321DC; - case 0xBFC321E4u: goto label_BFC321E4; - case 0xBFC321E8u: goto label_BFC321E8; - default: break; - } - } -label_BFC32100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32100: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32104: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32108: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3210C: 04A0000D bltz $a1, 0xBFC32144 */ - uint32_t psx_brA_BFC3210C = cpu->gpr[5]; - psx_taken_BFC3210C = ((int32_t)psx_brA_BFC3210C < 0); - psx_delay_BFC3210C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32110: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A110u); -#endif - if (psx_delay_BFC3210C) { - psx_delay_BFC3210C = 0; - if (psx_taken_BFC3210C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A144u); - goto label_BFC32144; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A114u); - } -label_BFC32114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32114: 04C0000B bltz $a2, 0xBFC32144 */ - uint32_t psx_brA_BFC32114 = cpu->gpr[6]; - psx_taken_BFC32114 = ((int32_t)psx_brA_BFC32114 < 0); - psx_delay_BFC32114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A118u); -#endif - if (psx_delay_BFC32114) { - psx_delay_BFC32114 = 0; - if (psx_taken_BFC32114) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A144u); - goto label_BFC32144; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A11Cu); - } -label_BFC3211C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3211Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3211Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A11Cu); -#endif - /* 0xBFC3211C: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A11Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32120: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4022u); -#endif - /* 0xBFC32124: 00AE082A slt $at, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x00AE082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32128: 10200006 beq $at, $zero, 0xBFC32144 */ - uint32_t psx_brA_BFC32128 = cpu->gpr[1]; uint32_t psx_brB_BFC32128 = cpu->gpr[0]; - psx_taken_BFC32128 = (psx_brA_BFC32128 == psx_brB_BFC32128); - psx_delay_BFC32128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3212C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A12Cu); -#endif - if (psx_delay_BFC32128) { - psx_delay_BFC32128 = 0; - if (psx_taken_BFC32128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A144u); - goto label_BFC32144; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A130u); - } -label_BFC32130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A130u); -#endif - /* 0xBFC32130: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A130u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8042u); -#endif - /* 0xBFC32138: 00CF082A slt $at, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x00CF082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3213C: 14200003 bne $at, $zero, 0xBFC3214C */ - uint32_t psx_brA_BFC3213C = cpu->gpr[1]; uint32_t psx_brB_BFC3213C = cpu->gpr[0]; - psx_taken_BFC3213C = (psx_brA_BFC3213C != psx_brB_BFC3213C); - psx_delay_BFC3213C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A140u); -#endif - if (psx_delay_BFC3213C) { - psx_delay_BFC3213C = 0; - if (psx_taken_BFC3213C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A14Cu); - goto label_BFC3214C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A144u); - } -label_BFC32144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32144: 03E00008 jr $ra */ - psx_delay_BFC32144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32148: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A148u); -#endif - if (psx_delay_BFC32144) { - psx_delay_BFC32144 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3214C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3214Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3214Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A14Cu); -#endif - /* 0xBFC3214C: 84880006 lh $t0, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A14Cu); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x84880006u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC32150: 24180020 addiu $t8, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24180020u, cpu->gpr[24], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC32154: 0308001B divu $t8, $t0 */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[8]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0308001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004A154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC32158: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A158u); -#endif - /* 0xBFC3215C: 84980004 lh $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A15Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC32160: 24190020 addiu $t9, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24190020u, cpu->gpr[25], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000900u); -#endif - /* 0xBFC32164: 03285823 subu $t3, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x03285823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC32168: 240DFFFF addiu $t5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6800u); -#endif - /* 0xBFC3216C: 016D7004 sllv $t6, $t5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[13] << (cpu->gpr[11] & 0x1Fu); - PGXP_ALU(0x016D7004u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A170u); -#endif - /* 0xBFC32170: 8C8F000C lw $t7, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A170u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x8C8F000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC32174: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3217C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC32180: 00E9001B divu $a3, $t1 */ - { uint32_t psx_n = cpu->gpr[7]; uint32_t psx_d = cpu->gpr[9]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00E9001Bu, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32184: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4408u); -#endif - /* 0xBFC32188: 006E5006 srlv $t2, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[14] >> (cpu->gpr[3] & 0x1Fu); - PGXP_ALU(0x006E5006u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3218C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC32190: 03060019 multu $t8, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[24] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[24])); -#endif - PGXP_MULDIV(0x03060019u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC32194: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC32198: 00196880 sll $t5, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00196880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xB000u); -#endif - /* 0xBFC3219C: 01ED6021 addu $t4, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[15] + cpu->gpr[13]; - PGXP_ALU(0x01ED6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC321A0: 00E9001B divu $a3, $t1 */ - { uint32_t psx_n = cpu->gpr[7]; uint32_t psx_d = cpu->gpr[9]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00E9001Bu, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2808u); -#endif - /* 0xBFC321A4: 01636823 subu $t5, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[11] - cpu->gpr[3]; - PGXP_ALU(0x01636823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC321A8: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC321AC: 000EC080 sll $t8, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000EC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001000u); -#endif - /* 0xBFC321B0: 01986021 addu $t4, $t4, $t8 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[24]; - PGXP_ALU(0x01986021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1B0u); -#endif - /* 0xBFC321B4: 8D990000 lw $t9, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A1B4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000u); } - PGXP_LOAD(0x8D990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC321B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008400u); -#endif - /* 0xBFC321BC: 032A7824 and $t7, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[25] & cpu->gpr[10]; - PGXP_ALU(0x032A7824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA004u); -#endif - /* 0xBFC321C0: 01AF1006 srlv $v0, $t7, $t5 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[15] >> (cpu->gpr[13] & 0x1Fu); - PGXP_ALU(0x01AF1006u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC321C4: 15000002 bne $t0, $zero, 0xBFC321D0 */ - uint32_t psx_brA_BFC321C4 = cpu->gpr[8]; uint32_t psx_brB_BFC321C4 = cpu->gpr[0]; - psx_taken_BFC321C4 = (psx_brA_BFC321C4 != psx_brB_BFC321C4); - psx_delay_BFC321C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC321C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A1C8u); -#endif - if (psx_delay_BFC321C4) { - psx_delay_BFC321C4 = 0; - if (psx_taken_BFC321C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1D0u); - goto label_BFC321D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1CCu); - } -label_BFC321CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC321CC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A1CCu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A1CCu); -#endif -label_BFC321D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC321D0: 15200002 bne $t1, $zero, 0xBFC321DC */ - uint32_t psx_brA_BFC321D0 = cpu->gpr[9]; uint32_t psx_brB_BFC321D0 = cpu->gpr[0]; - psx_taken_BFC321D0 = (psx_brA_BFC321D0 != psx_brB_BFC321D0); - psx_delay_BFC321D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC321D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A1D4u); -#endif - if (psx_delay_BFC321D0) { - psx_delay_BFC321D0 = 0; - if (psx_taken_BFC321D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1DCu); - goto label_BFC321DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1D8u); - } -label_BFC321D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC321D8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A1D8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A1D8u); -#endif -label_BFC321DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC321DC: 15200002 bne $t1, $zero, 0xBFC321E8 */ - uint32_t psx_brA_BFC321DC = cpu->gpr[9]; uint32_t psx_brB_BFC321DC = cpu->gpr[0]; - psx_taken_BFC321DC = (psx_brA_BFC321DC != psx_brB_BFC321DC); - psx_delay_BFC321DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC321E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A1E0u); -#endif - if (psx_delay_BFC321DC) { - psx_delay_BFC321DC = 0; - if (psx_taken_BFC321DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1E8u); - goto label_BFC321E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1E4u); - } -label_BFC321E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC321E4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A1E4u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A1E4u); -#endif -label_BFC321E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC321E8: 03E00008 jr $ra */ - psx_delay_BFC321E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC321EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A1ECu); -#endif - if (psx_delay_BFC321E8) { - psx_delay_BFC321E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC321F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC321F0u); - int psx_delay_BFC32200 = 0; - int psx_taken_BFC32200 = 0; - int psx_delay_BFC32208 = 0; - int psx_taken_BFC32208 = 0; - int psx_delay_BFC3221C = 0; - int psx_taken_BFC3221C = 0; - int psx_delay_BFC32230 = 0; - int psx_taken_BFC32230 = 0; - int psx_delay_BFC322B8 = 0; - int psx_taken_BFC322B8 = 0; - int psx_delay_BFC322C4 = 0; - int psx_taken_BFC322C4 = 0; - int psx_delay_BFC322D0 = 0; - int psx_taken_BFC322D0 = 0; - int psx_delay_BFC322DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32208u: goto label_BFC32208; - case 0xBFC32210u: goto label_BFC32210; - case 0xBFC32224u: goto label_BFC32224; - case 0xBFC32238u: goto label_BFC32238; - case 0xBFC322C0u: goto label_BFC322C0; - case 0xBFC322C4u: goto label_BFC322C4; - case 0xBFC322CCu: goto label_BFC322CC; - case 0xBFC322D0u: goto label_BFC322D0; - case 0xBFC322D8u: goto label_BFC322D8; - case 0xBFC322DCu: goto label_BFC322DC; - default: break; - } - } -label_BFC321F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC321F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC321F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC321F0: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC321F4: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC321F8: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC321FC: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32200: 04A00036 bltz $a1, 0xBFC322DC */ - uint32_t psx_brA_BFC32200 = cpu->gpr[5]; - psx_taken_BFC32200 = ((int32_t)psx_brA_BFC32200 < 0); - psx_delay_BFC32200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x881u); -#endif - /* 0xBFC32204: 00E05821 addu $t3, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E05821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A204u); -#endif - if (psx_delay_BFC32200) { - psx_delay_BFC32200 = 0; - if (psx_taken_BFC32200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2DCu); - goto label_BFC322DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A208u); - } -label_BFC32208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32208: 04C00034 bltz $a2, 0xBFC322DC */ - uint32_t psx_brA_BFC32208 = cpu->gpr[6]; - psx_taken_BFC32208 = ((int32_t)psx_brA_BFC32208 < 0); - psx_delay_BFC32208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3220C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A20Cu); -#endif - if (psx_delay_BFC32208) { - psx_delay_BFC32208 = 0; - if (psx_taken_BFC32208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2DCu); - goto label_BFC322DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A210u); - } -label_BFC32210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A210u); -#endif - /* 0xBFC32210: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A210u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32214: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4022u); -#endif - /* 0xBFC32218: 00AE082A slt $at, $a1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x00AE082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3221C: 1020002F beq $at, $zero, 0xBFC322DC */ - uint32_t psx_brA_BFC3221C = cpu->gpr[1]; uint32_t psx_brB_BFC3221C = cpu->gpr[0]; - psx_taken_BFC3221C = (psx_brA_BFC3221C == psx_brB_BFC3221C); - psx_delay_BFC3221C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32220: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A220u); -#endif - if (psx_delay_BFC3221C) { - psx_delay_BFC3221C = 0; - if (psx_taken_BFC3221C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2DCu); - goto label_BFC322DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A224u); - } -label_BFC32224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A224u); -#endif - /* 0xBFC32224: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A224u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8042u); -#endif - /* 0xBFC3222C: 00CF082A slt $at, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x00CF082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32230: 1020002A beq $at, $zero, 0xBFC322DC */ - uint32_t psx_brA_BFC32230 = cpu->gpr[1]; uint32_t psx_brB_BFC32230 = cpu->gpr[0]; - psx_taken_BFC32230 = (psx_brA_BFC32230 == psx_brB_BFC32230); - psx_delay_BFC32230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32234: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A234u); -#endif - if (psx_delay_BFC32230) { - psx_delay_BFC32230 = 0; - if (psx_taken_BFC32230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2DCu); - goto label_BFC322DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A238u); - } -label_BFC32238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A238u); -#endif - /* 0xBFC32238: 84870006 lh $a3, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A238u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x84870006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3223C: 24180020 addiu $t8, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24180020u, cpu->gpr[24], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC32240: 0307001B divu $t8, $a3 */ - { uint32_t psx_n = cpu->gpr[24]; uint32_t psx_d = cpu->gpr[7]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0307001Bu, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC32244: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC32248: 24190020 addiu $t9, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24190020u, cpu->gpr[25], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000480u); -#endif - /* 0xBFC3224C: 03275023 subu $t2, $t9, $a3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[10] = cpu->gpr[25] - cpu->gpr[7]; - PGXP_ALU(0x03275023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A250u); -#endif - /* 0xBFC32250: 84990004 lh $t9, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A250u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC32254: 240DFFFF addiu $t5, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6400u); -#endif - /* 0xBFC32258: 014D7004 sllv $t6, $t5, $t2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[13] << (cpu->gpr[10] & 0x1Fu); - PGXP_ALU(0x014D7004u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A258u); -#endif - /* 0xBFC3225C: 8C98000C lw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A25Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC32260: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32264: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3226C: 0068001B divu $v1, $t0 */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[8]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0068001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32270: 00001010 mfhi $v0 */ - cpu->gpr[2] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001010u, cpu->gpr[2], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8404u); -#endif - /* 0xBFC32274: 01427823 subu $t7, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[10] - cpu->gpr[2]; - PGXP_ALU(0x01427823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4204u); -#endif - /* 0xBFC32278: 004E4806 srlv $t1, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[14] >> (cpu->gpr[2] & 0x1Fu); - PGXP_ALU(0x004E4806u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC3227C: 03260019 multu $t9, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[25] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[25])); -#endif - PGXP_MULDIV(0x03260019u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004A27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8800u); -#endif - /* 0xBFC32280: 01EB5804 sllv $t3, $t3, $t7 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[11] = cpu->gpr[11] << (cpu->gpr[15] & 0x1Fu); - PGXP_ALU(0x01EB5804u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC32284: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC32288: 000D7080 sll $t6, $t5, 2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 2u; - PGXP_ALU(0x000D7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1005000u); -#endif - /* 0xBFC3228C: 030E6021 addu $t4, $t8, $t6 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[12] = cpu->gpr[24] + cpu->gpr[14]; - PGXP_ALU(0x030E6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC32290: 0068001B divu $v1, $t0 */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[8]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0068001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000201u); -#endif - /* 0xBFC32294: 0120C027 nor $t8, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = ~(cpu->gpr[9] | cpu->gpr[0]); - PGXP_ALU(0x0120C027u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC32298: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC3229C: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC322A0: 01996021 addu $t4, $t4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[25]; - PGXP_ALU(0x01996021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2A0u); -#endif - /* 0xBFC322A4: 8D8D0000 lw $t5, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A2A4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x8D8D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC322A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006000u); -#endif - /* 0xBFC322AC: 01B87024 and $t6, $t5, $t8 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[24]; - PGXP_ALU(0x01B87024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC800u); -#endif - /* 0xBFC322B0: 01CB7825 or $t7, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9000u); -#endif - /* 0xBFC322B4: AD8F0000 sw $t7, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A2B4u); return; } g_debug_last_store_pc = 0x8004A2B4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAD8F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC322B8: 14E00002 bne $a3, $zero, 0xBFC322C4 */ - uint32_t psx_brA_BFC322B8 = cpu->gpr[7]; uint32_t psx_brB_BFC322B8 = cpu->gpr[0]; - psx_taken_BFC322B8 = (psx_brA_BFC322B8 != psx_brB_BFC322B8); - psx_delay_BFC322B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC322BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A2BCu); -#endif - if (psx_delay_BFC322B8) { - psx_delay_BFC322B8 = 0; - if (psx_taken_BFC322B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2C4u); - goto label_BFC322C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2C0u); - } -label_BFC322C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC322C0: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A2C0u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A2C0u); -#endif -label_BFC322C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC322C4: 15000002 bne $t0, $zero, 0xBFC322D0 */ - uint32_t psx_brA_BFC322C4 = cpu->gpr[8]; uint32_t psx_brB_BFC322C4 = cpu->gpr[0]; - psx_taken_BFC322C4 = (psx_brA_BFC322C4 != psx_brB_BFC322C4); - psx_delay_BFC322C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC322C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A2C8u); -#endif - if (psx_delay_BFC322C4) { - psx_delay_BFC322C4 = 0; - if (psx_taken_BFC322C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2D0u); - goto label_BFC322D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2CCu); - } -label_BFC322CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC322CC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A2CCu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A2CCu); -#endif -label_BFC322D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC322D0: 15000002 bne $t0, $zero, 0xBFC322DC */ - uint32_t psx_brA_BFC322D0 = cpu->gpr[8]; uint32_t psx_brB_BFC322D0 = cpu->gpr[0]; - psx_taken_BFC322D0 = (psx_brA_BFC322D0 != psx_brB_BFC322D0); - psx_delay_BFC322D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC322D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A2D4u); -#endif - if (psx_delay_BFC322D0) { - psx_delay_BFC322D0 = 0; - if (psx_taken_BFC322D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2DCu); - goto label_BFC322DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A2D8u); - } -label_BFC322D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC322D8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A2D8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A2D8u); -#endif -label_BFC322DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC322DC: 03E00008 jr $ra */ - psx_delay_BFC322DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC322E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A2E0u); -#endif - if (psx_delay_BFC322DC) { - psx_delay_BFC322DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC322E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC322E4u); - int psx_delay_BFC3231C = 0; - int psx_delay_BFC32340 = 0; - int psx_delay_BFC3234C = 0; - int psx_delay_BFC32360 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32324u: goto label_BFC32324; - case 0xBFC32348u: goto label_BFC32348; - case 0xBFC32354u: goto label_BFC32354; - default: break; - } - } -label_BFC322E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC322E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC322E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC322E4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC322E8: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A2E8u); return; } g_debug_last_store_pc = 0x8004A2E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC322EC: 00051C00 sll $v1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00051C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC322F0: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A2F0u); return; } g_debug_last_store_pc = 0x8004A2F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2F0u); -#endif - /* 0xBFC322F4: 8FA50038 lw $a1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A2F4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50038u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC322F8: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC322FC: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC32300: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A300u); return; } g_debug_last_store_pc = 0x8004A300u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC32304: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A304u); return; } g_debug_last_store_pc = 0x8004A304u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC32308: A6030000 sh $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A308u); return; } g_debug_last_store_pc = 0x8004A308u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA6030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A308u); -#endif - /* 0xBFC3230C: 87AE0030 lh $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A30Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32310: A6050006 sh $a1, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A310u); return; } g_debug_last_store_pc = 0x8004A310u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA6050006u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC32314: A60E0002 sh $t6, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A314u); return; } g_debug_last_store_pc = 0x8004A314u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC32318: A7A3002C sh $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A318u); return; } g_debug_last_store_pc = 0x8004A318u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3231C: 0C0128DA jal 0xB004A368 */ - cpu->gpr[31] = 0x8004A324u; /* jal link before delay slot */ - psx_delay_BFC3231C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC32320: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A320u); -#endif - if (psx_delay_BFC3231C) { - psx_delay_BFC3231C = 0; - cpu->gpr[31] = 0x8004A324u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A368u); - cpu->pc = 0x8004A368u; return; - } -label_BFC32324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A324u); -#endif - /* 0xBFC32324: 87A3002C lh $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A324u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32328: A6020004 sh $v0, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A328u); return; } g_debug_last_store_pc = 0x8004A328u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA6020004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A328u); -#endif - /* 0xBFC3232C: 8FAF0034 lw $t7, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A32Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0034u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC32330: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC32334: AE0F000C sw $t7, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A334u); return; } g_debug_last_store_pc = 0x8004A334u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAE0F000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A334u); -#endif - /* 0xBFC32338: 8FA60038 lw $a2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A338u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60038u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A338u); -#endif - /* 0xBFC3233C: 87A50030 lh $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A33Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32340: 0C012904 jal 0xB004A410 */ - cpu->gpr[31] = 0x8004A348u; /* jal link before delay slot */ - psx_delay_BFC32340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32344: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A344u); -#endif - if (psx_delay_BFC32340) { - psx_delay_BFC32340 = 0; - cpu->gpr[31] = 0x8004A348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A410u); - cpu->pc = 0x8004A410u; return; - } -label_BFC32348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32348: AE020008 sw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A348u); return; } g_debug_last_store_pc = 0x8004A348u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3234C: 0C012804 jal 0xB004A010 */ - cpu->gpr[31] = 0x8004A354u; /* jal link before delay slot */ - psx_delay_BFC3234C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC32350: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A350u); -#endif - if (psx_delay_BFC3234C) { - psx_delay_BFC3234C = 0; - cpu->gpr[31] = 0x8004A354u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A010u); - cpu->pc = 0x8004A010u; return; - } -label_BFC32354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A354u); -#endif - /* 0xBFC32354: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A354u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A354u); -#endif - /* 0xBFC32358: 8E020008 lw $v0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A358u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A358u); -#endif - /* 0xBFC3235C: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A35Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32360: 03E00008 jr $ra */ - psx_delay_BFC32360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32364: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A364u); -#endif - if (psx_delay_BFC32360) { - psx_delay_BFC32360 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32368(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32368u); - int psx_delay_BFC32394 = 0; - int psx_taken_BFC32394 = 0; - int psx_delay_BFC323A0 = 0; - int psx_taken_BFC323A0 = 0; - int psx_delay_BFC323B0 = 0; - int psx_taken_BFC323B0 = 0; - int psx_delay_BFC323B8 = 0; - int psx_taken_BFC323B8 = 0; - int psx_delay_BFC323C4 = 0; - int psx_taken_BFC323C4 = 0; - int psx_delay_BFC323CC = 0; - int psx_taken_BFC323CC = 0; - int psx_delay_BFC323E4 = 0; - int psx_taken_BFC323E4 = 0; - int psx_delay_BFC323F4 = 0; - int psx_taken_BFC323F4 = 0; - int psx_delay_BFC323FC = 0; - int psx_taken_BFC323FC = 0; - int psx_delay_BFC32408 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3239Cu: goto label_BFC3239C; - case 0xBFC323A0u: goto label_BFC323A0; - case 0xBFC323A8u: goto label_BFC323A8; - case 0xBFC323ACu: goto label_BFC323AC; - case 0xBFC323B8u: goto label_BFC323B8; - case 0xBFC323C0u: goto label_BFC323C0; - case 0xBFC323C4u: goto label_BFC323C4; - case 0xBFC323CCu: goto label_BFC323CC; - case 0xBFC323D4u: goto label_BFC323D4; - case 0xBFC323D8u: goto label_BFC323D8; - case 0xBFC323ECu: goto label_BFC323EC; - case 0xBFC323F0u: goto label_BFC323F0; - case 0xBFC323FCu: goto label_BFC323FC; - case 0xBFC32404u: goto label_BFC32404; - case 0xBFC32408u: goto label_BFC32408; - default: break; - } - } -label_BFC32368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32368: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3236C: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC32370: 240E0020 addiu $t6, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240E0020u, cpu->gpr[14], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC32374: 01C5001B divu $t6, $a1 */ - { uint32_t psx_n = cpu->gpr[14]; uint32_t psx_d = cpu->gpr[5]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C5001Bu, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004A374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32378: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3237C: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32380: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3238C: 0083001A div $a0, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[4]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0083001Au, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8004A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC32390: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC32394: 14A00002 bne $a1, $zero, 0xBFC323A0 */ - uint32_t psx_brA_BFC32394 = cpu->gpr[5]; uint32_t psx_brB_BFC32394 = cpu->gpr[0]; - psx_taken_BFC32394 = (psx_brA_BFC32394 != psx_brB_BFC32394); - psx_delay_BFC32394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A398u); -#endif - if (psx_delay_BFC32394) { - psx_delay_BFC32394 = 0; - if (psx_taken_BFC32394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3A0u); - goto label_BFC323A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A39Cu); - } -label_BFC3239C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3239Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3239Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3239C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A39Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A39Cu); -#endif -label_BFC323A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC323A0: 14600002 bne $v1, $zero, 0xBFC323AC */ - uint32_t psx_brA_BFC323A0 = cpu->gpr[3]; uint32_t psx_brB_BFC323A0 = cpu->gpr[0]; - psx_taken_BFC323A0 = (psx_brA_BFC323A0 != psx_brB_BFC323A0); - psx_delay_BFC323A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC323A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A3A4u); -#endif - if (psx_delay_BFC323A0) { - psx_delay_BFC323A0 = 0; - if (psx_taken_BFC323A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3ACu); - goto label_BFC323AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3A8u); - } -label_BFC323A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC323A8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A3A8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A3A8u); -#endif -label_BFC323AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC323AC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC323B0: 14610004 bne $v1, $at, 0xBFC323C4 */ - uint32_t psx_brA_BFC323B0 = cpu->gpr[3]; uint32_t psx_brB_BFC323B0 = cpu->gpr[1]; - psx_taken_BFC323B0 = (psx_brA_BFC323B0 != psx_brB_BFC323B0); - psx_delay_BFC323B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC323B4: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A3B4u); -#endif - if (psx_delay_BFC323B0) { - psx_delay_BFC323B0 = 0; - if (psx_taken_BFC323B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3C4u); - goto label_BFC323C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3B8u); - } -label_BFC323B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC323B8: 14810002 bne $a0, $at, 0xBFC323C4 */ - uint32_t psx_brA_BFC323B8 = cpu->gpr[4]; uint32_t psx_brB_BFC323B8 = cpu->gpr[1]; - psx_taken_BFC323B8 = (psx_brA_BFC323B8 != psx_brB_BFC323B8); - psx_delay_BFC323B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC323BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A3BCu); -#endif - if (psx_delay_BFC323B8) { - psx_delay_BFC323B8 = 0; - if (psx_taken_BFC323B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3C4u); - goto label_BFC323C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3C0u); - } -label_BFC323C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC323C0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004A3C0u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A3C0u); -#endif -label_BFC323C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC323C4: 11E00004 beq $t7, $zero, 0xBFC323D8 */ - uint32_t psx_brA_BFC323C4 = cpu->gpr[15]; uint32_t psx_brB_BFC323C4 = cpu->gpr[0]; - psx_taken_BFC323C4 = (psx_brA_BFC323C4 == psx_brB_BFC323C4); - psx_delay_BFC323C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC323C8: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3C8u); -#endif - if (psx_delay_BFC323C4) { - psx_delay_BFC323C4 = 0; - if (psx_taken_BFC323C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3D8u); - goto label_BFC323D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3CCu); - } -label_BFC323CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC323CC: 10000002 beq $zero, $zero, 0xBFC323D8 */ - uint32_t psx_brA_BFC323CC = cpu->gpr[0]; uint32_t psx_brB_BFC323CC = cpu->gpr[0]; - psx_taken_BFC323CC = (psx_brA_BFC323CC == psx_brB_BFC323CC); - psx_delay_BFC323CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC323D0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3D0u); -#endif - if (psx_delay_BFC323CC) { - psx_delay_BFC323CC = 0; - if (psx_taken_BFC323CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3D8u); - goto label_BFC323D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3D4u); - } -label_BFC323D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC323D4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3D4u); -#endif -label_BFC323D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC323D8: 0083001A div $a0, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[4]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0083001Au, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x8004A3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC323DC: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000024u); -#endif - /* 0xBFC323E0: 03051021 addu $v0, $t8, $a1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[5]; - PGXP_ALU(0x03051021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC323E4: 14600002 bne $v1, $zero, 0xBFC323F0 */ - uint32_t psx_brA_BFC323E4 = cpu->gpr[3]; uint32_t psx_brB_BFC323E4 = cpu->gpr[0]; - psx_taken_BFC323E4 = (psx_brA_BFC323E4 != psx_brB_BFC323E4); - psx_delay_BFC323E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC323E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A3E8u); -#endif - if (psx_delay_BFC323E4) { - psx_delay_BFC323E4 = 0; - if (psx_taken_BFC323E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3F0u); - goto label_BFC323F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3ECu); - } -label_BFC323EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC323EC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004A3ECu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A3ECu); -#endif -label_BFC323F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC323F0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC323F4: 14610004 bne $v1, $at, 0xBFC32408 */ - uint32_t psx_brA_BFC323F4 = cpu->gpr[3]; uint32_t psx_brB_BFC323F4 = cpu->gpr[1]; - psx_taken_BFC323F4 = (psx_brA_BFC323F4 != psx_brB_BFC323F4); - psx_delay_BFC323F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC323F8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A3F8u); -#endif - if (psx_delay_BFC323F4) { - psx_delay_BFC323F4 = 0; - if (psx_taken_BFC323F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A408u); - goto label_BFC32408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A3FCu); - } -label_BFC323FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC323FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC323FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC323FC: 14810002 bne $a0, $at, 0xBFC32408 */ - uint32_t psx_brA_BFC323FC = cpu->gpr[4]; uint32_t psx_brB_BFC323FC = cpu->gpr[1]; - psx_taken_BFC323FC = (psx_brA_BFC323FC != psx_brB_BFC323FC); - psx_delay_BFC323FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32400: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A400u); -#endif - if (psx_delay_BFC323FC) { - psx_delay_BFC323FC = 0; - if (psx_taken_BFC323FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A408u); - goto label_BFC32408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A404u); - } -label_BFC32404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32404: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004A404u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004A404u); -#endif -label_BFC32408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32408: 03E00008 jr $ra */ - psx_delay_BFC32408 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3240C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A40Cu); -#endif - if (psx_delay_BFC32408) { - psx_delay_BFC32408 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32410(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32410u); - int psx_delay_BFC3242C = 0; - int psx_delay_BFC32448 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32434u: goto label_BFC32434; - default: break; - } - } -label_BFC32410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32410: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32414: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32418: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3241C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A41Cu); return; } g_debug_last_store_pc = 0x8004A41Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC32420: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A420u); return; } g_debug_last_store_pc = 0x8004A420u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32424: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32428: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3242C: 0C0128DA jal 0xB004A368 */ - cpu->gpr[31] = 0x8004A434u; /* jal link before delay slot */ - psx_delay_BFC3242C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC32430: 00C02821 addu $a1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A430u); -#endif - if (psx_delay_BFC3242C) { - psx_delay_BFC3242C = 0; - cpu->gpr[31] = 0x8004A434u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A368u); - cpu->pc = 0x8004A368u; return; - } -label_BFC32434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A434u); -#endif - /* 0xBFC32434: 87AE0024 lh $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A434u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A434u); -#endif - /* 0xBFC32438: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A438u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3243C: 004E0019 multu $v0, $t6 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[14]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x004E0019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[14]); -#ifdef PSX_COSIM - cosim_instr(0x8004A43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32440: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32444: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32448: 03E00008 jr $ra */ - psx_delay_BFC32448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3244C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A44Cu); -#endif - if (psx_delay_BFC32448) { - psx_delay_BFC32448 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32450(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32450u); - int psx_delay_BFC32488 = 0; - int psx_taken_BFC32488 = 0; - int psx_delay_BFC324A4 = 0; - int psx_taken_BFC324A4 = 0; - int psx_delay_BFC324C0 = 0; - int psx_delay_BFC324C8 = 0; - int psx_taken_BFC324C8 = 0; - int psx_delay_BFC324F0 = 0; - int psx_taken_BFC324F0 = 0; - int psx_delay_BFC3250C = 0; - int psx_taken_BFC3250C = 0; - int psx_delay_BFC3252C = 0; - int psx_taken_BFC3252C = 0; - int psx_delay_BFC32554 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32490u: goto label_BFC32490; - case 0xBFC324A4u: goto label_BFC324A4; - case 0xBFC324ACu: goto label_BFC324AC; - case 0xBFC324C8u: goto label_BFC324C8; - case 0xBFC324D0u: goto label_BFC324D0; - case 0xBFC324F8u: goto label_BFC324F8; - case 0xBFC32514u: goto label_BFC32514; - case 0xBFC3251Cu: goto label_BFC3251C; - case 0xBFC32534u: goto label_BFC32534; - case 0xBFC32540u: goto label_BFC32540; - case 0xBFC32548u: goto label_BFC32548; - default: break; - } - } -label_BFC32450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32450: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32454: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC32458: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3245C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A45Cu); return; } g_debug_last_store_pc = 0x8004A45Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC32460: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32464: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC32468: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3246C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A46Cu); return; } g_debug_last_store_pc = 0x8004A46Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32470: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A470u); return; } g_debug_last_store_pc = 0x8004A470u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC32474: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A474u); return; } g_debug_last_store_pc = 0x8004A474u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC32478: A7A60054 sh $a2, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A478u); return; } g_debug_last_store_pc = 0x8004A478u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA7A60054u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3247C: A7A70056 sh $a3, 86($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 86; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (86)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A47Cu); return; } g_debug_last_store_pc = 0x8004A47Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA7A70056u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A480u); -#endif - /* 0xBFC32480: 86230002 lh $v1, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A480u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x86230002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC32484: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32488: 1860002D blez $v1, 0xBFC32540 */ - uint32_t psx_brA_BFC32488 = cpu->gpr[3]; - psx_taken_BFC32488 = ((int32_t)psx_brA_BFC32488 <= 0); - psx_delay_BFC32488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC3248C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A48Cu); -#endif - if (psx_delay_BFC32488) { - psx_delay_BFC32488 = 0; - if (psx_taken_BFC32488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A540u); - goto label_BFC32540; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A490u); - } -label_BFC32490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC32490: AFB20030 sw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A490u); return; } g_debug_last_store_pc = 0x8004A490u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32494: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A494u); return; } g_debug_last_store_pc = 0x8004A494u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A494u); -#endif - /* 0xBFC32498: 86220000 lh $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A498u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x86220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A498u); -#endif - /* 0xBFC3249C: 8FB20078 lw $s2, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A49Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20078u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC324A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A4A0u); -#endif -label_BFC324A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC324A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC324A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC324A4: 1840001D blez $v0, 0xBFC3251C */ - uint32_t psx_brA_BFC324A4 = cpu->gpr[2]; - psx_taken_BFC324A4 = ((int32_t)psx_brA_BFC324A4 <= 0); - psx_delay_BFC324A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC324A8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4A8u); -#endif - if (psx_delay_BFC324A4) { - psx_delay_BFC324A4 = 0; - if (psx_taken_BFC324A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A51Cu); - goto label_BFC3251C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4ACu); - } -label_BFC324AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC324ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC324ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC324AC: A7B00050 sh $s0, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4ACu); return; } g_debug_last_store_pc = 0x8004A4ACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA7B00050u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC324B0: A7B30052 sh $s3, 82($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 82; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (82)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4B0u); return; } g_debug_last_store_pc = 0x8004A4B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA7B30052u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC324B4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC324B8: 27A50050 addiu $a1, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A50050u, cpu->gpr[5], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC324BC: 02803021 addu $a2, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC324C0: 0C012957 jal 0xB004A55C */ - cpu->gpr[31] = 0x8004A4C8u; /* jal link before delay slot */ - psx_delay_BFC324C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40081u); -#endif - /* 0xBFC324C4: 02403821 addu $a3, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4C4u); -#endif - if (psx_delay_BFC324C0) { - psx_delay_BFC324C0 = 0; - cpu->gpr[31] = 0x8004A4C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A55Cu); - cpu->pc = 0x8004A55Cu; return; - } -label_BFC324C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC324C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC324C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC324C8: 1440000B bne $v0, $zero, 0xBFC324F8 */ - uint32_t psx_brA_BFC324C8 = cpu->gpr[2]; uint32_t psx_brB_BFC324C8 = cpu->gpr[0]; - psx_taken_BFC324C8 = (psx_brA_BFC324C8 != psx_brB_BFC324C8); - psx_delay_BFC324C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC324CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A4CCu); -#endif - if (psx_delay_BFC324C8) { - psx_delay_BFC324C8 = 0; - if (psx_taken_BFC324C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4F8u); - goto label_BFC324F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4D0u); - } -label_BFC324D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC324D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC324D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4D0u); -#endif - /* 0xBFC324D0: 8FAE0070 lw $t6, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0070u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC324D4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC324D8: A5D00000 sh $s0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4D8u); return; } g_debug_last_store_pc = 0x8004A4D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA5D00000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4D8u); -#endif - /* 0xBFC324DC: 8FAF0074 lw $t7, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4DCu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0074u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC324E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88000u); -#endif - /* 0xBFC324E4: A5F30000 sh $s3, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4E4u); return; } g_debug_last_store_pc = 0x8004A4E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA5F30000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4E4u); -#endif - /* 0xBFC324E8: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4E8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4E8u); -#endif - /* 0xBFC324EC: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4ECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC324F0: 10000015 beq $zero, $zero, 0xBFC32548 */ - uint32_t psx_brA_BFC324F0 = cpu->gpr[0]; uint32_t psx_brB_BFC324F0 = cpu->gpr[0]; - psx_taken_BFC324F0 = (psx_brA_BFC324F0 == psx_brB_BFC324F0); - psx_delay_BFC324F0 = 1; - /* 0xBFC324F4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4F4u); -#endif - if (psx_delay_BFC324F0) { - psx_delay_BFC324F0 = 0; - if (psx_taken_BFC324F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A548u); - goto label_BFC32548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4F8u); - } -label_BFC324F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC324F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC324F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC324F8: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4F8u); -#endif - /* 0xBFC324FC: 86220000 lh $v0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A4FCu); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x86220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32500: 00108400 sll $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00108400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32504: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC32508: 0202082A slt $at, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3250C: 1420FFE7 bne $at, $zero, 0xBFC324AC */ - uint32_t psx_brA_BFC3250C = cpu->gpr[1]; uint32_t psx_brB_BFC3250C = cpu->gpr[0]; - psx_taken_BFC3250C = (psx_brA_BFC3250C != psx_brB_BFC3250C); - psx_delay_BFC3250C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A510u); -#endif - if (psx_delay_BFC3250C) { - psx_delay_BFC3250C = 0; - if (psx_taken_BFC3250C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4ACu); - goto label_BFC324AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A514u); - } -label_BFC32514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A514u); -#endif - /* 0xBFC32514: 86230002 lh $v1, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A514u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x86230002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32518: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A518u); -#endif -label_BFC3251C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3251Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3251Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3251C: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC32520: 00139C00 sll $s3, $s3, 16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = cpu->gpr[19] << 16u; - PGXP_ALU(0x00139C00u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC32524: 00139C03 sra $s3, $s3, 16 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] >> 16u); - PGXP_ALU(0x00139C03u, cpu->gpr[19], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000Au); -#endif - /* 0xBFC32528: 0263082A slt $at, $s3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0263082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3252C: 1420FFDD bne $at, $zero, 0xBFC324A4 */ - uint32_t psx_brA_BFC3252C = cpu->gpr[1]; uint32_t psx_brB_BFC3252C = cpu->gpr[0]; - psx_taken_BFC3252C = (psx_brA_BFC3252C != psx_brB_BFC3252C); - psx_delay_BFC3252C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A530u); -#endif - if (psx_delay_BFC3252C) { - psx_delay_BFC3252C = 0; - if (psx_taken_BFC3252C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A4A4u); - goto label_BFC324A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A534u); - } -label_BFC32534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A534u); -#endif - /* 0xBFC32534: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A534u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A534u); -#endif - /* 0xBFC32538: 8FB20030 lw $s2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A538u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20030u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3253C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A53Cu); -#endif -label_BFC32540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32540: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A540u); -#endif - /* 0xBFC32544: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A544u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A544u); -#endif -label_BFC32548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A548u); -#endif - /* 0xBFC32548: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A548u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A548u); -#endif - /* 0xBFC3254C: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A54Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A550u); -#endif - /* 0xBFC32550: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A550u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32554: 03E00008 jr $ra */ - psx_delay_BFC32554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32558: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A558u); -#endif - if (psx_delay_BFC32554) { - psx_delay_BFC32554 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3255C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3255Cu); - int psx_delay_BFC32584 = 0; - int psx_taken_BFC32584 = 0; - int psx_delay_BFC325A0 = 0; - int psx_taken_BFC325A0 = 0; - int psx_delay_BFC325A8 = 0; - int psx_taken_BFC325A8 = 0; - int psx_delay_BFC325C0 = 0; - int psx_taken_BFC325C0 = 0; - int psx_delay_BFC325DC = 0; - int psx_taken_BFC325DC = 0; - int psx_delay_BFC325E4 = 0; - int psx_taken_BFC325E4 = 0; - int psx_delay_BFC325FC = 0; - int psx_taken_BFC325FC = 0; - int psx_delay_BFC32604 = 0; - int psx_taken_BFC32604 = 0; - int psx_delay_BFC3261C = 0; - int psx_taken_BFC3261C = 0; - int psx_delay_BFC32624 = 0; - int psx_taken_BFC32624 = 0; - int psx_delay_BFC3263C = 0; - int psx_taken_BFC3263C = 0; - int psx_delay_BFC32654 = 0; - int psx_taken_BFC32654 = 0; - int psx_delay_BFC32664 = 0; - int psx_delay_BFC3266C = 0; - int psx_taken_BFC3266C = 0; - int psx_delay_BFC32674 = 0; - int psx_taken_BFC32674 = 0; - int psx_delay_BFC32684 = 0; - int psx_taken_BFC32684 = 0; - int psx_delay_BFC32694 = 0; - int psx_taken_BFC32694 = 0; - int psx_delay_BFC326B8 = 0; - int psx_taken_BFC326B8 = 0; - int psx_delay_BFC326E0 = 0; - int psx_taken_BFC326E0 = 0; - int psx_delay_BFC32708 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3258Cu: goto label_BFC3258C; - case 0xBFC325A8u: goto label_BFC325A8; - case 0xBFC325B0u: goto label_BFC325B0; - case 0xBFC325C8u: goto label_BFC325C8; - case 0xBFC325E4u: goto label_BFC325E4; - case 0xBFC325ECu: goto label_BFC325EC; - case 0xBFC32604u: goto label_BFC32604; - case 0xBFC3260Cu: goto label_BFC3260C; - case 0xBFC32624u: goto label_BFC32624; - case 0xBFC3262Cu: goto label_BFC3262C; - case 0xBFC32644u: goto label_BFC32644; - case 0xBFC3264Cu: goto label_BFC3264C; - case 0xBFC3265Cu: goto label_BFC3265C; - case 0xBFC32660u: goto label_BFC32660; - case 0xBFC3266Cu: goto label_BFC3266C; - case 0xBFC32674u: goto label_BFC32674; - case 0xBFC3267Cu: goto label_BFC3267C; - case 0xBFC3268Cu: goto label_BFC3268C; - case 0xBFC32690u: goto label_BFC32690; - case 0xBFC3269Cu: goto label_BFC3269C; - case 0xBFC326C0u: goto label_BFC326C0; - case 0xBFC326D0u: goto label_BFC326D0; - case 0xBFC326E8u: goto label_BFC326E8; - case 0xBFC326F0u: goto label_BFC326F0; - case 0xBFC326F8u: goto label_BFC326F8; - default: break; - } - } -label_BFC3255C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3255Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3255Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3255C: 27BDFFA0 addiu $sp, $sp, -96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-96)); - PGXP_ALU(0x27BDFFA0u, cpu->gpr[29], _pgx1, 0xFFFFFFA0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32560: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A560u); return; } g_debug_last_store_pc = 0x8004A560u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC32564: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A564u); return; } g_debug_last_store_pc = 0x8004A564u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32568: AFB40020 sw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A568u); return; } g_debug_last_store_pc = 0x8004A568u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3256C: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A56Cu); return; } g_debug_last_store_pc = 0x8004A56Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC32570: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A570u); -#endif - /* 0xBFC32574: 86230000 lh $v1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A574u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x86230000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A574u); -#endif - /* 0xBFC32578: 84C80000 lh $t0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A578u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x40u); } - PGXP_LOAD(0x84C80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC3257C: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC32580: 0068082A slt $at, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0068082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32584: 14200008 bne $at, $zero, 0xBFC325A8 */ - uint32_t psx_brA_BFC32584 = cpu->gpr[1]; uint32_t psx_brB_BFC32584 = cpu->gpr[0]; - psx_taken_BFC32584 = (psx_brA_BFC32584 != psx_brB_BFC32584); - psx_delay_BFC32584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC32588: 00E0A021 addu $s4, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A588u); -#endif - if (psx_delay_BFC32584) { - psx_delay_BFC32584 = 0; - if (psx_taken_BFC32584) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5A8u); - goto label_BFC325A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A58Cu); - } -label_BFC3258C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3258Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A58Cu); -#endif - /* 0xBFC3258C: 86290004 lh $t1, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A58Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x86290004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A590u); -#endif - /* 0xBFC32590: 84CE0004 lh $t6, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A590u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x84CE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Cu); -#endif - /* 0xBFC32594: 00691021 addu $v0, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[9]; - PGXP_ALU(0x00691021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC100u); -#endif - /* 0xBFC32598: 010E7821 addu $t7, $t0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[8] + cpu->gpr[14]; - PGXP_ALU(0x010E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC3259C: 01E2082A slt $at, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC325A0: 10200003 beq $at, $zero, 0xBFC325B0 */ - uint32_t psx_brA_BFC325A0 = cpu->gpr[1]; uint32_t psx_brB_BFC325A0 = cpu->gpr[0]; - psx_taken_BFC325A0 = (psx_brA_BFC325A0 == psx_brB_BFC325A0); - psx_delay_BFC325A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A5A4u); -#endif - if (psx_delay_BFC325A0) { - psx_delay_BFC325A0 = 0; - if (psx_taken_BFC325A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5B0u); - goto label_BFC325B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5A8u); - } -label_BFC325A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC325A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC325A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325A8: 10000053 beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC325A8 = cpu->gpr[0]; uint32_t psx_brB_BFC325A8 = cpu->gpr[0]; - psx_taken_BFC325A8 = (psx_brA_BFC325A8 == psx_brB_BFC325A8); - psx_delay_BFC325A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC325AC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5ACu); -#endif - if (psx_delay_BFC325A8) { - psx_delay_BFC325A8 = 0; - if (psx_taken_BFC325A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5B0u); - } -label_BFC325B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC325B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC325B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5B0u); -#endif - /* 0xBFC325B0: 86270002 lh $a3, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A5B0u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000u); } - PGXP_LOAD(0x86270002u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5B0u); -#endif - /* 0xBFC325B4: 84C50002 lh $a1, 2($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A5B4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x40u); } - PGXP_LOAD(0x84C50002u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA2u); -#endif - /* 0xBFC325BC: 00E5082A slt $at, $a3, $a1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x00E5082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC325C0: 14200008 bne $at, $zero, 0xBFC325E4 */ - uint32_t psx_brA_BFC325C0 = cpu->gpr[1]; uint32_t psx_brB_BFC325C0 = cpu->gpr[0]; - psx_taken_BFC325C0 = (psx_brA_BFC325C0 != psx_brB_BFC325C0); - psx_delay_BFC325C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A5C4u); -#endif - if (psx_delay_BFC325C0) { - psx_delay_BFC325C0 = 0; - if (psx_taken_BFC325C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5E4u); - goto label_BFC325E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5C8u); - } -label_BFC325C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC325C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC325C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5C8u); -#endif - /* 0xBFC325C8: 86280006 lh $t0, 6($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A5C8u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x86280006u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5C8u); -#endif - /* 0xBFC325CC: 84D80006 lh $t8, 6($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A5CCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x84D80006u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x190u); -#endif - /* 0xBFC325D0: 00E82021 addu $a0, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[8]; - PGXP_ALU(0x00E82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC325D4: 00B8C821 addu $t9, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC325D8: 0324082A slt $at, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0324082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC325DC: 10200003 beq $at, $zero, 0xBFC325EC */ - uint32_t psx_brA_BFC325DC = cpu->gpr[1]; uint32_t psx_brB_BFC325DC = cpu->gpr[0]; - psx_taken_BFC325DC = (psx_brA_BFC325DC == psx_brB_BFC325DC); - psx_delay_BFC325DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A5E0u); -#endif - if (psx_delay_BFC325DC) { - psx_delay_BFC325DC = 0; - if (psx_taken_BFC325DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5ECu); - goto label_BFC325EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5E4u); - } -label_BFC325E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC325E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC325E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325E4: 10000044 beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC325E4 = cpu->gpr[0]; uint32_t psx_brB_BFC325E4 = cpu->gpr[0]; - psx_taken_BFC325E4 = (psx_brA_BFC325E4 == psx_brB_BFC325E4); - psx_delay_BFC325E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC325E8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5E8u); -#endif - if (psx_delay_BFC325E4) { - psx_delay_BFC325E4 = 0; - if (psx_taken_BFC325E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A5ECu); - } -label_BFC325EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC325ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC325ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5ECu); -#endif - /* 0xBFC325EC: 866A0000 lh $t2, 0($s3) */ - { uint32_t _pgxa = cpu->gpr[19]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A5ECu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x80000u); } - PGXP_LOAD(0x866A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC325F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC08u); -#endif - /* 0xBFC325F4: 01435823 subu $t3, $t2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[10] - cpu->gpr[3]; - PGXP_ALU(0x01435823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA02u); -#endif - /* 0xBFC325F8: 0169082A slt $at, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0169082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC325FC: 10200003 beq $at, $zero, 0xBFC3260C */ - uint32_t psx_brA_BFC325FC = cpu->gpr[1]; uint32_t psx_brB_BFC325FC = cpu->gpr[0]; - psx_taken_BFC325FC = (psx_brA_BFC325FC == psx_brB_BFC325FC); - psx_delay_BFC325FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32600: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A600u); -#endif - if (psx_delay_BFC325FC) { - psx_delay_BFC325FC = 0; - if (psx_taken_BFC325FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A60Cu); - goto label_BFC3260C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A604u); - } -label_BFC32604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32604: 1000003C beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC32604 = cpu->gpr[0]; uint32_t psx_brB_BFC32604 = cpu->gpr[0]; - psx_taken_BFC32604 = (psx_brA_BFC32604 == psx_brB_BFC32604); - psx_delay_BFC32604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32608: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A608u); -#endif - if (psx_delay_BFC32604) { - psx_delay_BFC32604 = 0; - if (psx_taken_BFC32604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A60Cu); - } -label_BFC3260C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3260Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A60Cu); -#endif - /* 0xBFC3260C: 866C0002 lh $t4, 2($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A60Cu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x80000u); } - PGXP_LOAD(0x866C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3080u); -#endif - /* 0xBFC32614: 01876823 subu $t5, $t4, $a3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[13] = cpu->gpr[12] - cpu->gpr[7]; - PGXP_ALU(0x01876823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2102u); -#endif - /* 0xBFC32618: 01A8082A slt $at, $t5, $t0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x01A8082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3261C: 10200003 beq $at, $zero, 0xBFC3262C */ - uint32_t psx_brA_BFC3261C = cpu->gpr[1]; uint32_t psx_brB_BFC3261C = cpu->gpr[0]; - psx_taken_BFC3261C = (psx_brA_BFC3261C == psx_brB_BFC3261C); - psx_delay_BFC3261C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32620: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A620u); -#endif - if (psx_delay_BFC3261C) { - psx_delay_BFC3261C = 0; - if (psx_taken_BFC3261C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A62Cu); - goto label_BFC3262C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A624u); - } -label_BFC32624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32624: 10000034 beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC32624 = cpu->gpr[0]; uint32_t psx_brB_BFC32624 = cpu->gpr[0]; - psx_taken_BFC32624 = (psx_brA_BFC32624 == psx_brB_BFC32624); - psx_delay_BFC32624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32628: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A628u); -#endif - if (psx_delay_BFC32624) { - psx_delay_BFC32624 = 0; - if (psx_taken_BFC32624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A62Cu); - } -label_BFC3262C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3262Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3262C: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A62Cu); return; } g_debug_last_store_pc = 0x8004A62Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40080u); -#endif - /* 0xBFC32630: 00079400 sll $s2, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[18] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00079400u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32634: 00129403 sra $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 16u); - PGXP_ALU(0x00129403u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40012u); -#endif - /* 0xBFC32638: 0244082A slt $at, $s2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0244082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3263C: 1020002C beq $at, $zero, 0xBFC326F0 */ - uint32_t psx_brA_BFC3263C = cpu->gpr[1]; uint32_t psx_brB_BFC3263C = cpu->gpr[0]; - psx_taken_BFC3263C = (psx_brA_BFC3263C == psx_brB_BFC3263C); - psx_delay_BFC3263C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32640: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A640u); -#endif - if (psx_delay_BFC3263C) { - psx_delay_BFC3263C = 0; - if (psx_taken_BFC3263C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F0u); - goto label_BFC326F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A644u); - } -label_BFC32644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32644: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A644u); return; } g_debug_last_store_pc = 0x8004A644u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC32648: 00038400 sll $s0, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00038400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A648u); -#endif -label_BFC3264C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3264Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3264Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3264C: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC32650: 0202082A slt $at, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32654: 1020001E beq $at, $zero, 0xBFC326D0 */ - uint32_t psx_brA_BFC32654 = cpu->gpr[1]; uint32_t psx_brB_BFC32654 = cpu->gpr[0]; - psx_taken_BFC32654 = (psx_brA_BFC32654 == psx_brB_BFC32654); - psx_delay_BFC32654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A658u); -#endif - if (psx_delay_BFC32654) { - psx_delay_BFC32654 = 0; - if (psx_taken_BFC32654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6D0u); - goto label_BFC326D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A65Cu); - } -label_BFC3265C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3265Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC3265C: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A65Cu); -#endif -label_BFC32660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC32660: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32664: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x8004A66Cu; /* jal link before delay slot */ - psx_delay_BFC32664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC32668: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A668u); -#endif - if (psx_delay_BFC32664) { - psx_delay_BFC32664 = 0; - cpu->gpr[31] = 0x8004A66Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC3266C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3266Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC3266C: 1054000B beq $v0, $s4, 0xBFC3269C */ - uint32_t psx_brA_BFC3266C = cpu->gpr[2]; uint32_t psx_brB_BFC3266C = cpu->gpr[20]; - psx_taken_BFC3266C = (psx_brA_BFC3266C == psx_brB_BFC3266C); - psx_delay_BFC3266C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32670: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A670u); -#endif - if (psx_delay_BFC3266C) { - psx_delay_BFC3266C = 0; - if (psx_taken_BFC3266C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A69Cu); - goto label_BFC3269C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A674u); - } -label_BFC32674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32674: 16400006 bne $s2, $zero, 0xBFC32690 */ - uint32_t psx_brA_BFC32674 = cpu->gpr[18]; uint32_t psx_brB_BFC32674 = cpu->gpr[0]; - psx_taken_BFC32674 = (psx_brA_BFC32674 != psx_brB_BFC32674); - psx_delay_BFC32674 = 1; - /* 0xBFC32678: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A678u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A678u); -#endif - if (psx_delay_BFC32674) { - psx_delay_BFC32674 = 0; - if (psx_taken_BFC32674) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A690u); - goto label_BFC32690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A67Cu); - } -label_BFC3267C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3267Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A67Cu); -#endif - /* 0xBFC3267C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A67Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A680u); -#endif - /* 0xBFC32680: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A680u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32684: 1000001C beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC32684 = cpu->gpr[0]; uint32_t psx_brB_BFC32684 = cpu->gpr[0]; - psx_taken_BFC32684 = (psx_brA_BFC32684 == psx_brB_BFC32684); - psx_delay_BFC32684 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32688: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A688u); -#endif - if (psx_delay_BFC32684) { - psx_delay_BFC32684 = 0; - if (psx_taken_BFC32684) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A68Cu); - } -label_BFC3268C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3268Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A68Cu); -#endif - /* 0xBFC3268C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A68Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A68Cu); -#endif -label_BFC32690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A690u); -#endif - /* 0xBFC32690: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A690u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32694: 10000018 beq $zero, $zero, 0xBFC326F8 */ - uint32_t psx_brA_BFC32694 = cpu->gpr[0]; uint32_t psx_brB_BFC32694 = cpu->gpr[0]; - psx_taken_BFC32694 = (psx_brA_BFC32694 == psx_brB_BFC32694); - psx_delay_BFC32694 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC32698: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A698u); -#endif - if (psx_delay_BFC32694) { - psx_delay_BFC32694 = 0; - if (psx_taken_BFC32694) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6F8u); - goto label_BFC326F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A69Cu); - } -label_BFC3269C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3269Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A69Cu); -#endif - /* 0xBFC3269C: 86230000 lh $v1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A69Cu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000u); } - PGXP_LOAD(0x86230000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6A0u); -#endif - /* 0xBFC326A0: 862E0004 lh $t6, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6A0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000u); } - PGXP_LOAD(0x862E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC326A4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC326A8: 00108400 sll $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00108400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC326AC: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400Cu); -#endif - /* 0xBFC326B0: 006E1021 addu $v0, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10006u); -#endif - /* 0xBFC326B4: 0202082A slt $at, $s0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0202082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC326B8: 1420FFE9 bne $at, $zero, 0xBFC32660 */ - uint32_t psx_brA_BFC326B8 = cpu->gpr[1]; uint32_t psx_brB_BFC326B8 = cpu->gpr[0]; - psx_taken_BFC326B8 = (psx_brA_BFC326B8 != psx_brB_BFC326B8); - psx_delay_BFC326B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC326BC: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6BCu); -#endif - if (psx_delay_BFC326B8) { - psx_delay_BFC326B8 = 0; - if (psx_taken_BFC326B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A660u); - goto label_BFC32660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6C0u); - } -label_BFC326C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC326C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC326C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6C0u); -#endif - /* 0xBFC326C0: 862F0002 lh $t7, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6C0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x862F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6C0u); -#endif - /* 0xBFC326C4: 86380006 lh $t8, 6($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6C4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000u); } - PGXP_LOAD(0x86380006u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC326C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC326CC: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6CCu); -#endif -label_BFC326D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC326D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC326D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC326D0: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC326D4: 00129400 sll $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] << 16u; - PGXP_ALU(0x00129400u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC326D8: 00129403 sra $s2, $s2, 16 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 16u); - PGXP_ALU(0x00129403u, cpu->gpr[18], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40012u); -#endif - /* 0xBFC326DC: 0244082A slt $at, $s2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0244082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC326E0: 1420FFDA bne $at, $zero, 0xBFC3264C */ - uint32_t psx_brA_BFC326E0 = cpu->gpr[1]; uint32_t psx_brB_BFC326E0 = cpu->gpr[0]; - psx_taken_BFC326E0 = (psx_brA_BFC326E0 != psx_brB_BFC326E0); - psx_delay_BFC326E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC326E4: 00038400 sll $s0, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00038400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6E4u); -#endif - if (psx_delay_BFC326E0) { - psx_delay_BFC326E0 = 0; - if (psx_taken_BFC326E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A64Cu); - goto label_BFC3264C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A6E8u); - } -label_BFC326E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC326E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC326E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6E8u); -#endif - /* 0xBFC326E8: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC326EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A6ECu); -#endif -label_BFC326F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC326F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC326F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6F0u); -#endif - /* 0xBFC326F0: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6F0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC326F4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6F4u); -#endif -label_BFC326F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC326F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC326F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A6F8u); -#endif - /* 0xBFC326F8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6F8u); -#endif - /* 0xBFC326FC: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A6FCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A700u); -#endif - /* 0xBFC32700: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A700u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A700u); -#endif - /* 0xBFC32704: 8FB40020 lw $s4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A704u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40020u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32708: 03E00008 jr $ra */ - psx_delay_BFC32708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3270C: 27BD0060 addiu $sp, $sp, 96 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); - PGXP_ALU(0x27BD0060u, cpu->gpr[29], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A70Cu); -#endif - if (psx_delay_BFC32708) { - psx_delay_BFC32708 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32710(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32710u); - int psx_delay_BFC3271C = 0; -label_BFC32710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32710: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC32714: AC249EF0 sw $a0, -24848($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24848; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A714u); return; } g_debug_last_store_pc = 0x8004A714u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249EF0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32718: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3271C: 03E00008 jr $ra */ - psx_delay_BFC3271C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC32720: AC259EF4 sw $a1, -24844($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24844; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24844)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A720u); return; } g_debug_last_store_pc = 0x8004A720u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259EF4u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A720u); -#endif - if (psx_delay_BFC3271C) { - psx_delay_BFC3271C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32724(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32724u); - int psx_delay_BFC32750 = 0; - int psx_delay_BFC3275C = 0; - int psx_taken_BFC3275C = 0; - int psx_delay_BFC327BC = 0; - int psx_delay_BFC327C4 = 0; - int psx_taken_BFC327C4 = 0; - int psx_delay_BFC327D8 = 0; - int psx_delay_BFC327EC = 0; - int psx_delay_BFC327F8 = 0; - int psx_taken_BFC327F8 = 0; - int psx_delay_BFC32818 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32758u: goto label_BFC32758; - case 0xBFC32764u: goto label_BFC32764; - case 0xBFC3278Cu: goto label_BFC3278C; - case 0xBFC327C4u: goto label_BFC327C4; - case 0xBFC327CCu: goto label_BFC327CC; - case 0xBFC327E0u: goto label_BFC327E0; - case 0xBFC327F4u: goto label_BFC327F4; - case 0xBFC327F8u: goto label_BFC327F8; - case 0xBFC32800u: goto label_BFC32800; - case 0xBFC32808u: goto label_BFC32808; - default: break; - } - } -label_BFC32724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32724: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32728: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A728u); return; } g_debug_last_store_pc = 0x8004A728u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3272C: AFA50054 sw $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A72Cu); return; } g_debug_last_store_pc = 0x8004A72Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC32730: AFA60058 sw $a2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A730u); return; } g_debug_last_store_pc = 0x8004A730u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60058u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC32734: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC32738: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A738u); return; } g_debug_last_store_pc = 0x8004A738u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3273C: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A73Cu); return; } g_debug_last_store_pc = 0x8004A73Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A740u); -#endif - /* 0xBFC32740: 87A60058 lh $a2, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A740u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x87A60058u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A740u); -#endif - /* 0xBFC32744: 87A50054 lh $a1, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A744u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50054u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80081u); -#endif - /* 0xBFC32748: 00E09821 addu $s3, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3274C: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A74Cu); return; } g_debug_last_store_pc = 0x8004A74Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32750: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x8004A758u; /* jal link before delay slot */ - psx_delay_BFC32750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC32754: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A754u); -#endif - if (psx_delay_BFC32750) { - psx_delay_BFC32750 = 0; - cpu->gpr[31] = 0x8004A758u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC32758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32758: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3275C: 1041002A beq $v0, $at, 0xBFC32808 */ - uint32_t psx_brA_BFC3275C = cpu->gpr[2]; uint32_t psx_brB_BFC3275C = cpu->gpr[1]; - psx_taken_BFC3275C = (psx_brA_BFC3275C == psx_brB_BFC3275C); - psx_delay_BFC3275C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC32760: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A760u); -#endif - if (psx_delay_BFC3275C) { - psx_delay_BFC3275C = 0; - if (psx_taken_BFC3275C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A808u); - goto label_BFC32808; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A764u); - } -label_BFC32764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC32764: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A764u); -#endif - /* 0xBFC32768: 8DEF9EF0 lw $t7, -24848($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A768u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9EF0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A768u); -#endif - /* 0xBFC3276C: 87AE0054 lh $t6, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A76Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE0054u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32770: AFB0003C sw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A770u); return; } g_debug_last_store_pc = 0x8004A770u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC32774: A5EE0000 sh $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A774u); return; } g_debug_last_store_pc = 0x8004A774u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA5EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC32778: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A778u); -#endif - /* 0xBFC3277C: 8F399EF0 lw $t9, -24848($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A77Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399EF0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A780u); -#endif - /* 0xBFC32780: 87B80058 lh $t8, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A780u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80058u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC32784: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC32788: A7380002 sh $t8, 2($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A788u); return; } g_debug_last_store_pc = 0x8004A788u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7380002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A788u); -#endif -label_BFC3278C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3278Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3278C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A790u); -#endif - /* 0xBFC32790: 8D089EF0 lw $t0, -24848($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A790u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089EF0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32794: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC32798: 00104880 sll $t1, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC3279C: 01091021 addu $v0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7A0u); -#endif - /* 0xBFC327A0: 844A0000 lh $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7A0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x844A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC327A4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC327A8: A7AA0044 sh $t2, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7A8u); return; } g_debug_last_store_pc = 0x8004A7A8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0044u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7A8u); -#endif - /* 0xBFC327AC: 844B0002 lh $t3, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7ACu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x844B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7B0u); -#endif - /* 0xBFC327B0: 87A50044 lh $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7B0u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC327B4: A7AB0046 sh $t3, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7B4u); return; } g_debug_last_store_pc = 0x8004A7B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0046u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7B4u); -#endif - /* 0xBFC327B8: 87A60046 lh $a2, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7B8u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x87A60046u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC327BC: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x8004A7C4u; /* jal link before delay slot */ - psx_delay_BFC327BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC327C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A7C0u); -#endif - if (psx_delay_BFC327BC) { - psx_delay_BFC327BC = 0; - cpu->gpr[31] = 0x8004A7C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC327C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC327C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC327C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC327C4: 1452000C bne $v0, $s2, 0xBFC327F8 */ - uint32_t psx_brA_BFC327C4 = cpu->gpr[2]; uint32_t psx_brB_BFC327C4 = cpu->gpr[18]; - psx_taken_BFC327C4 = (psx_brA_BFC327C4 != psx_brB_BFC327C4); - psx_delay_BFC327C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC327C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A7C8u); -#endif - if (psx_delay_BFC327C4) { - psx_delay_BFC327C4 = 0; - if (psx_taken_BFC327C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A7F8u); - goto label_BFC327F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A7CCu); - } -label_BFC327CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC327CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC327CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7CCu); -#endif - /* 0xBFC327CC: 87A50044 lh $a1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7CCu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50044u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7D0u); -#endif - /* 0xBFC327D0: 87A60046 lh $a2, 70($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 70; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (70)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A7D0u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x87A60046u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC327D4: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC327D8: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004A7E0u; /* jal link before delay slot */ - psx_delay_BFC327D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80081u); -#endif - /* 0xBFC327DC: 02603821 addu $a3, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02603821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7DCu); -#endif - if (psx_delay_BFC327D8) { - psx_delay_BFC327D8 = 0; - cpu->gpr[31] = 0x8004A7E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC327E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC327E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC327E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC327E0: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC327E4: 27A50044 addiu $a1, $sp, 68 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (68)); - PGXP_ALU(0x27A50044u, cpu->gpr[5], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC327E8: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC327EC: 0C012A08 jal 0xB004A820 */ - cpu->gpr[31] = 0x8004A7F4u; /* jal link before delay slot */ - psx_delay_BFC327EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10081u); -#endif - /* 0xBFC327F0: 02003821 addu $a3, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7F0u); -#endif - if (psx_delay_BFC327EC) { - psx_delay_BFC327EC = 0; - cpu->gpr[31] = 0x8004A7F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A820u); - cpu->pc = 0x8004A820u; return; - } -label_BFC327F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC327F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC327F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC327F4: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A7F4u); -#endif -label_BFC327F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC327F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC327F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC327F8: 1E00FFE4 bgtz $s0, 0xBFC3278C */ - uint32_t psx_brA_BFC327F8 = cpu->gpr[16]; - psx_taken_BFC327F8 = ((int32_t)psx_brA_BFC327F8 > 0); - psx_delay_BFC327F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC327FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A7FCu); -#endif - if (psx_delay_BFC327F8) { - psx_delay_BFC327F8 = 0; - if (psx_taken_BFC327F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A78Cu); - goto label_BFC3278C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A800u); - } -label_BFC32800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A800u); -#endif - /* 0xBFC32800: 8FB0003C lw $s0, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A800u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0003Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32804: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A804u); -#endif -label_BFC32808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A808u); -#endif - /* 0xBFC32808: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A808u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A808u); -#endif - /* 0xBFC3280C: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A80Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A810u); -#endif - /* 0xBFC32810: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A810u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A810u); -#endif - /* 0xBFC32814: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A814u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32818: 03E00008 jr $ra */ - psx_delay_BFC32818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3281C: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A81Cu); -#endif - if (psx_delay_BFC32818) { - psx_delay_BFC32818 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32820(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32820u); - int psx_delay_BFC32864 = 0; - int psx_delay_BFC3286C = 0; - int psx_taken_BFC3286C = 0; - int psx_delay_BFC328B4 = 0; - int psx_taken_BFC328B4 = 0; - int psx_delay_BFC328C4 = 0; - int psx_taken_BFC328C4 = 0; - int psx_delay_BFC328EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3285Cu: goto label_BFC3285C; - case 0xBFC3286Cu: goto label_BFC3286C; - case 0xBFC32874u: goto label_BFC32874; - case 0xBFC328BCu: goto label_BFC328BC; - case 0xBFC328C0u: goto label_BFC328C0; - case 0xBFC328CCu: goto label_BFC328CC; - default: break; - } - } -label_BFC32820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32820: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC32824: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A824u); return; } g_debug_last_store_pc = 0x8004A824u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32828: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A828u); return; } g_debug_last_store_pc = 0x8004A828u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3282C: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A82Cu); return; } g_debug_last_store_pc = 0x8004A82Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC32830: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A830u); return; } g_debug_last_store_pc = 0x8004A830u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32834: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A834u); return; } g_debug_last_store_pc = 0x8004A834u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32838: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A838u); return; } g_debug_last_store_pc = 0x8004A838u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10081u); -#endif - /* 0xBFC3283C: 00E08021 addu $s0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC32840: 00809821 addu $s3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC32844: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200041u); -#endif - /* 0xBFC32848: 00C0A821 addu $s5, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3284C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A84Cu); return; } g_debug_last_store_pc = 0x8004A84Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32850: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32854: 24120004 addiu $s2, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24120004u, cpu->gpr[18], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC32858: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A858u); -#endif -label_BFC3285C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3285Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC3285C: 02802821 addu $a1, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC32860: 27A6003C addiu $a2, $sp, 60 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (60)); - PGXP_ALU(0x27A6003Cu, cpu->gpr[6], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32864: 0C012A3D jal 0xB004A8F4 */ - cpu->gpr[31] = 0x8004A86Cu; /* jal link before delay slot */ - psx_delay_BFC32864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20081u); -#endif - /* 0xBFC32868: 02203821 addu $a3, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02203821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A868u); -#endif - if (psx_delay_BFC32864) { - psx_delay_BFC32864 = 0; - cpu->gpr[31] = 0x8004A86Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A8F4u); - cpu->pc = 0x8004A8F4u; return; - } -label_BFC3286C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3286Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3286Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200004u); -#endif - /* 0xBFC3286C: 14550014 bne $v0, $s5, 0xBFC328C0 */ - uint32_t psx_brA_BFC3286C = cpu->gpr[2]; uint32_t psx_brB_BFC3286C = cpu->gpr[21]; - psx_taken_BFC3286C = (psx_brA_BFC3286C != psx_brB_BFC3286C); - psx_delay_BFC3286C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A870u); -#endif - if (psx_delay_BFC3286C) { - psx_delay_BFC3286C = 0; - if (psx_taken_BFC3286C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A8C0u); - goto label_BFC328C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A874u); - } -label_BFC32874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC32874: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A874u); -#endif - /* 0xBFC32878: 8DEF9EF0 lw $t7, -24848($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A878u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9EF0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A878u); -#endif - /* 0xBFC3287C: 87AE003C lh $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A87Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC32880: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC32884: 01F8C821 addu $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC32888: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3288C: A72E0000 sh $t6, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A88Cu); return; } g_debug_last_store_pc = 0x8004A88Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA72E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A890u); -#endif - /* 0xBFC32890: 8D299EF0 lw $t1, -24848($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A890u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299EF0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A890u); -#endif - /* 0xBFC32894: 87A8003E lh $t0, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A894u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A8003Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC32898: 00105080 sll $t2, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[10] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC3289C: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC328A0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004A8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC328A4: A5680002 sh $t0, 2($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8A4u); return; } g_debug_last_store_pc = 0x8004A8A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA5680002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8A4u); -#endif - /* 0xBFC328A8: 8D8C9EF4 lw $t4, -24844($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24844; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24844)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8A8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EF4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC328AC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11002u); -#endif - /* 0xBFC328B0: 020C082A slt $at, $s0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[12] ? 1 : 0); - PGXP_ALU(0x020C082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC328B4: 14200002 bne $at, $zero, 0xBFC328C0 */ - uint32_t psx_brA_BFC328B4 = cpu->gpr[1]; uint32_t psx_brB_BFC328B4 = cpu->gpr[0]; - psx_taken_BFC328B4 = (psx_brA_BFC328B4 != psx_brB_BFC328B4); - psx_delay_BFC328B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC328B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A8B8u); -#endif - if (psx_delay_BFC328B4) { - psx_delay_BFC328B4 = 0; - if (psx_taken_BFC328B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A8C0u); - goto label_BFC328C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A8BCu); - } -label_BFC328BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC328BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC328BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC328BC: 2610FFFF addiu $s0, $s0, -1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); - PGXP_ALU(0x2610FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8BCu); -#endif -label_BFC328C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC328C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC328C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC328C0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC328C4: 1632FFE5 bne $s1, $s2, 0xBFC3285C */ - uint32_t psx_brA_BFC328C4 = cpu->gpr[17]; uint32_t psx_brB_BFC328C4 = cpu->gpr[18]; - psx_taken_BFC328C4 = (psx_brA_BFC328C4 != psx_brB_BFC328C4); - psx_delay_BFC328C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC328C8: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8C8u); -#endif - if (psx_delay_BFC328C4) { - psx_delay_BFC328C4 = 0; - if (psx_taken_BFC328C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A85Cu); - goto label_BFC3285C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A8CCu); - } -label_BFC328CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC328CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC328CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8CCu); -#endif - /* 0xBFC328CC: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC328D0: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8D0u); -#endif - /* 0xBFC328D4: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8D4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8D4u); -#endif - /* 0xBFC328D8: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8D8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8D8u); -#endif - /* 0xBFC328DC: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8DCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8E0u); -#endif - /* 0xBFC328E0: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8E0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8E0u); -#endif - /* 0xBFC328E4: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8E4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8E4u); -#endif - /* 0xBFC328E8: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8E8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC328EC: 03E00008 jr $ra */ - psx_delay_BFC328EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC328F0: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8F0u); -#endif - if (psx_delay_BFC328EC) { - psx_delay_BFC328EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC328F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC328F4u); - int psx_delay_BFC32914 = 0; - int psx_delay_BFC3292C = 0; - int psx_delay_BFC3293C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3291Cu: goto label_BFC3291C; - case 0xBFC32934u: goto label_BFC32934; - default: break; - } - } -label_BFC328F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC328F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC328F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC328F4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC328F8: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC328FC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A8FCu); return; } g_debug_last_store_pc = 0x8004A8FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC32900: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A900u); return; } g_debug_last_store_pc = 0x8004A900u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC32904: 00A04021 addu $t0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC32908: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC3290C: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC32910: AFA30028 sw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A910u); return; } g_debug_last_store_pc = 0x8004A910u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32914: 0C012A51 jal 0xB004A944 */ - cpu->gpr[31] = 0x8004A91Cu; /* jal link before delay slot */ - psx_delay_BFC32914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC32918: 00E03021 addu $a2, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004A918u); -#endif - if (psx_delay_BFC32914) { - psx_delay_BFC32914 = 0; - cpu->gpr[31] = 0x8004A91Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A944u); - cpu->pc = 0x8004A944u; return; - } -label_BFC3291C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3291Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3291Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A91Cu); -#endif - /* 0xBFC3291C: 8FA30028 lw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A91Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A920u); -#endif - /* 0xBFC32920: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A920u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A920u); -#endif - /* 0xBFC32924: 84650000 lh $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A924u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x84650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A924u); -#endif - /* 0xBFC32928: 84660002 lh $a2, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A928u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x84660002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3292C: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x8004A934u; /* jal link before delay slot */ - psx_delay_BFC3292C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32930: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A930u); -#endif - if (psx_delay_BFC3292C) { - psx_delay_BFC3292C = 0; - cpu->gpr[31] = 0x8004A934u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC32934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A934u); -#endif - /* 0xBFC32934: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A934u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32938: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3293C: 03E00008 jr $ra */ - psx_delay_BFC3293C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32940: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A940u); -#endif - if (psx_delay_BFC3293C) { - psx_delay_BFC3293C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32944(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32944u); - int psx_delay_BFC32944 = 0; - int psx_taken_BFC32944 = 0; - int psx_delay_BFC32964 = 0; - int psx_delay_BFC32980 = 0; - int psx_delay_BFC329A0 = 0; - int psx_delay_BFC329A8 = 0; - int psx_taken_BFC329A8 = 0; - int psx_delay_BFC329B0 = 0; - int psx_taken_BFC329B0 = 0; - int psx_delay_BFC329B8 = 0; - int psx_taken_BFC329B8 = 0; - int psx_delay_BFC329DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3294Cu: goto label_BFC3294C; - case 0xBFC3296Cu: goto label_BFC3296C; - case 0xBFC32988u: goto label_BFC32988; - case 0xBFC329A8u: goto label_BFC329A8; - case 0xBFC329B0u: goto label_BFC329B0; - case 0xBFC329B8u: goto label_BFC329B8; - case 0xBFC329C0u: goto label_BFC329C0; - default: break; - } - } -label_BFC32944: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32944u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32944: 10000018 beq $zero, $zero, 0xBFC329A8 */ - uint32_t psx_brA_BFC32944 = cpu->gpr[0]; uint32_t psx_brB_BFC32944 = cpu->gpr[0]; - psx_taken_BFC32944 = (psx_brA_BFC32944 == psx_brB_BFC32944); - psx_delay_BFC32944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A948u); -#endif - if (psx_delay_BFC32944) { - psx_delay_BFC32944 = 0; - if (psx_taken_BFC32944) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A9A8u); - goto label_BFC329A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A94Cu); - } -label_BFC3294C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3294Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A94Cu); -#endif - /* 0xBFC3294C: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A94Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC32954: A4AE0000 sh $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A954u); return; } g_debug_last_store_pc = 0x8004A954u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA4AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A954u); -#endif - /* 0xBFC32958: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A958u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3295C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC32960: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32964: 03E00008 jr $ra */ - psx_delay_BFC32964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC32968: A4B80002 sh $t8, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A968u); return; } g_debug_last_store_pc = 0x8004A968u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4B80002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A968u); -#endif - if (psx_delay_BFC32964) { - psx_delay_BFC32964 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3296C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3296Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3296Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A96Cu); -#endif - /* 0xBFC3296C: 84990000 lh $t9, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A96Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC32974: 27280001 addiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27280001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC32978: A4A80000 sh $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A978u); return; } g_debug_last_store_pc = 0x8004A978u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A978u); -#endif - /* 0xBFC3297C: 84890002 lh $t1, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A97Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x84890002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32980: 03E00008 jr $ra */ - psx_delay_BFC32980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC32984: A4A90002 sh $t1, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A984u); return; } g_debug_last_store_pc = 0x8004A984u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A90002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A984u); -#endif - if (psx_delay_BFC32980) { - psx_delay_BFC32980 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC32988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A988u); -#endif - /* 0xBFC32988: 848A0000 lh $t2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A988u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3298C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC32990: A4AA0000 sh $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A990u); return; } g_debug_last_store_pc = 0x8004A990u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA4AA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A990u); -#endif - /* 0xBFC32994: 848B0002 lh $t3, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A994u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x848B0002u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32998: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3299C: 256C0001 addiu $t4, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x256C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC329A0: 03E00008 jr $ra */ - psx_delay_BFC329A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC329A4: A4AC0002 sh $t4, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9A4u); return; } g_debug_last_store_pc = 0x8004A9A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9A4u); -#endif - if (psx_delay_BFC329A0) { - psx_delay_BFC329A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC329A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC329A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC329A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC329A8: 10C0FFE8 beq $a2, $zero, 0xBFC3294C */ - uint32_t psx_brA_BFC329A8 = cpu->gpr[6]; uint32_t psx_brB_BFC329A8 = cpu->gpr[0]; - psx_taken_BFC329A8 = (psx_brA_BFC329A8 == psx_brB_BFC329A8); - psx_delay_BFC329A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC329AC: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9ACu); -#endif - if (psx_delay_BFC329A8) { - psx_delay_BFC329A8 = 0; - if (psx_taken_BFC329A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A94Cu); - goto label_BFC3294C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A9B0u); - } -label_BFC329B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC329B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC329B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC329B0: 10C1FFEE beq $a2, $at, 0xBFC3296C */ - uint32_t psx_brA_BFC329B0 = cpu->gpr[6]; uint32_t psx_brB_BFC329B0 = cpu->gpr[1]; - psx_taken_BFC329B0 = (psx_brA_BFC329B0 == psx_brB_BFC329B0); - psx_delay_BFC329B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC329B4: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9B4u); -#endif - if (psx_delay_BFC329B0) { - psx_delay_BFC329B0 = 0; - if (psx_taken_BFC329B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A96Cu); - goto label_BFC3296C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A9B8u); - } -label_BFC329B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC329B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC329B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC329B8: 10C1FFF3 beq $a2, $at, 0xBFC32988 */ - uint32_t psx_brA_BFC329B8 = cpu->gpr[6]; uint32_t psx_brB_BFC329B8 = cpu->gpr[1]; - psx_taken_BFC329B8 = (psx_brA_BFC329B8 == psx_brB_BFC329B8); - psx_delay_BFC329B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC329BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A9BCu); -#endif - if (psx_delay_BFC329B8) { - psx_delay_BFC329B8 = 0; - if (psx_taken_BFC329B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A988u); - goto label_BFC32988; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A9C0u); - } -label_BFC329C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC329C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC329C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9C0u); -#endif - /* 0xBFC329C0: 848D0000 lh $t5, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9C0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x848D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC329C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC329C8: 25AEFFFF addiu $t6, $t5, -1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); - PGXP_ALU(0x25AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC329CC: A4AE0000 sh $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9CCu); return; } g_debug_last_store_pc = 0x8004A9CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA4AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9D0u); -#endif - /* 0xBFC329D0: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9D0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC329D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC329D8: A4AF0002 sh $t7, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9D8u); return; } g_debug_last_store_pc = 0x8004A9D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC329DC: 03E00008 jr $ra */ - psx_delay_BFC329DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC329E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004A9E0u); -#endif - if (psx_delay_BFC329DC) { - psx_delay_BFC329DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC329F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC329F0u); - int psx_delay_BFC32A48 = 0; - int psx_delay_BFC32A54 = 0; - int psx_taken_BFC32A54 = 0; - int psx_delay_BFC32A64 = 0; - int psx_taken_BFC32A64 = 0; - int psx_delay_BFC32A9C = 0; - int psx_taken_BFC32A9C = 0; - int psx_delay_BFC32AB0 = 0; - int psx_taken_BFC32AB0 = 0; - int psx_delay_BFC32AE4 = 0; - int psx_taken_BFC32AE4 = 0; - int psx_delay_BFC32B04 = 0; - int psx_delay_BFC32B10 = 0; - int psx_taken_BFC32B10 = 0; - int psx_delay_BFC32C28 = 0; - int psx_delay_BFC32C48 = 0; - int psx_taken_BFC32C48 = 0; - int psx_delay_BFC32C88 = 0; - int psx_taken_BFC32C88 = 0; - int psx_delay_BFC32C94 = 0; - int psx_taken_BFC32C94 = 0; - int psx_delay_BFC32CC4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32A44u: goto label_BFC32A44; - case 0xBFC32A48u: goto label_BFC32A48; - case 0xBFC32A50u: goto label_BFC32A50; - case 0xBFC32A5Cu: goto label_BFC32A5C; - case 0xBFC32A6Cu: goto label_BFC32A6C; - case 0xBFC32AA4u: goto label_BFC32AA4; - case 0xBFC32AA8u: goto label_BFC32AA8; - case 0xBFC32AB8u: goto label_BFC32AB8; - case 0xBFC32ABCu: goto label_BFC32ABC; - case 0xBFC32AC4u: goto label_BFC32AC4; - case 0xBFC32AECu: goto label_BFC32AEC; - case 0xBFC32AF0u: goto label_BFC32AF0; - case 0xBFC32AF4u: goto label_BFC32AF4; - case 0xBFC32B0Cu: goto label_BFC32B0C; - case 0xBFC32B18u: goto label_BFC32B18; - case 0xBFC32B1Cu: goto label_BFC32B1C; - case 0xBFC32C30u: goto label_BFC32C30; - case 0xBFC32C50u: goto label_BFC32C50; - case 0xBFC32C90u: goto label_BFC32C90; - case 0xBFC32C9Cu: goto label_BFC32C9C; - default: break; - } - } -label_BFC329F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC329F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC329F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC329F0: 27BDFE98 addiu $sp, $sp, -360 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-360)); - PGXP_ALU(0x27BDFE98u, cpu->gpr[29], _pgx1, 0xFFFFFE98u); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC329F4: AFB50044 sw $s5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9F4u); return; } g_debug_last_store_pc = 0x8004A9F4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50044u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC329F8: AFBE0050 sw $fp, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9F8u); return; } g_debug_last_store_pc = 0x8004A9F8u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0050u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC329FC: AFBF0054 sw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004A9FCu); return; } g_debug_last_store_pc = 0x8004A9FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004A9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC32A00: AFB60048 sw $s6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA00u); return; } g_debug_last_store_pc = 0x8004AA00u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60048u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC32A04: AFB7004C sw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA04u); return; } g_debug_last_store_pc = 0x8004AA04u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32A08: AFB40040 sw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA08u); return; } g_debug_last_store_pc = 0x8004AA08u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC32A0C: 0080A821 addu $s5, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080A821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC32A10: AFB20038 sw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA10u); return; } g_debug_last_store_pc = 0x8004AA10u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC32A14: AFB3003C sw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA14u); return; } g_debug_last_store_pc = 0x8004AA14u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32A18: AFB00030 sw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA18u); return; } g_debug_last_store_pc = 0x8004AA18u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32A1C: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA1Cu); return; } g_debug_last_store_pc = 0x8004AA1Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA20u); -#endif - /* 0xBFC32A20: 86AE0004 lh $t6, 4($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA20u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x200000u); } - PGXP_LOAD(0x86AE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32A24: 24110003 addiu $s1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24110003u, cpu->gpr[17], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC32A28: AFAE00B0 sw $t6, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA28u); return; } g_debug_last_store_pc = 0x8004AA28u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00B0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA28u); -#endif - /* 0xBFC32A2C: 86AF0006 lh $t7, 6($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA2Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x200000u); } - PGXP_LOAD(0x86AF0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC32A30: 27B300B4 addiu $s3, $sp, 180 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[29] + (180)); - PGXP_ALU(0x27B300B4u, cpu->gpr[19], _pgx1, 0x000000B4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32A34: 27B400D8 addiu $s4, $sp, 216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[29] + (216)); - PGXP_ALU(0x27B400D8u, cpu->gpr[20], _pgx1, 0x000000D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC32A38: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC32A3C: AFAF00AC sw $t7, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA3Cu); return; } g_debug_last_store_pc = 0x8004AA3Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF00ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32A40: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA40u); -#endif -label_BFC32A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90001u); -#endif - /* 0xBFC32A44: 02608021 addu $s0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02608021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA44u); -#endif -label_BFC32A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32A48: 0C012C4E jal 0xB004B138 */ - cpu->gpr[31] = 0x8004AA50u; /* jal link before delay slot */ - psx_delay_BFC32A48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC32A4C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA4Cu); -#endif - if (psx_delay_BFC32A48) { - psx_delay_BFC32A48 = 0; - cpu->gpr[31] = 0x8004AA50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B138u); - cpu->pc = 0x8004B138u; return; - } -label_BFC32A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32A50: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000u); -#endif - /* 0xBFC32A54: 1651FFFC bne $s2, $s1, 0xBFC32A48 */ - uint32_t psx_brA_BFC32A54 = cpu->gpr[18]; uint32_t psx_brB_BFC32A54 = cpu->gpr[17]; - psx_taken_BFC32A54 = (psx_brA_BFC32A54 != psx_brB_BFC32A54); - psx_delay_BFC32A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32A58: 26100004 addiu $s0, $s0, 4 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (4)); - PGXP_ALU(0x26100004u, cpu->gpr[16], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA58u); -#endif - if (psx_delay_BFC32A54) { - psx_delay_BFC32A54 = 0; - if (psx_taken_BFC32A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AA48u); - goto label_BFC32A48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AA5Cu); - } -label_BFC32A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC32A5C: 2673000C addiu $s3, $s3, 12 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (12)); - PGXP_ALU(0x2673000Cu, cpu->gpr[19], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180002u); -#endif - /* 0xBFC32A60: 0274082B sltu $at, $s3, $s4 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[20] ? 1 : 0); - PGXP_ALU(0x0274082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32A64: 1420FFF7 bne $at, $zero, 0xBFC32A44 */ - uint32_t psx_brA_BFC32A64 = cpu->gpr[1]; uint32_t psx_brB_BFC32A64 = cpu->gpr[0]; - psx_taken_BFC32A64 = (psx_brA_BFC32A64 != psx_brB_BFC32A64); - psx_delay_BFC32A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32A68: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA68u); -#endif - if (psx_delay_BFC32A64) { - psx_delay_BFC32A64 = 0; - if (psx_taken_BFC32A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AA44u); - goto label_BFC32A44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AA6Cu); - } -label_BFC32A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA6Cu); -#endif - /* 0xBFC32A6C: 8FA400B0 lw $a0, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA70u); -#endif - /* 0xBFC32A70: 8FBE00AC lw $fp, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA70u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE00ACu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC32A74: 27B80168 addiu $t8, $sp, 360 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[29] + (360)); - PGXP_ALU(0x27B80168u, cpu->gpr[24], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000021u); -#endif - /* 0xBFC32A78: 03002821 addu $a1, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC32A7C: AFA5007C sw $a1, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA7Cu); return; } g_debug_last_store_pc = 0x8004AA7Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5007Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000005u); -#endif - /* 0xBFC32A80: 03001021 addu $v0, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC32A84: AFA2005C sw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA84u); return; } g_debug_last_store_pc = 0x8004AA84u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC32A88: 27A300D8 addiu $v1, $sp, 216 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (216)); - PGXP_ALU(0x27A300D8u, cpu->gpr[3], _pgx1, 0x000000D8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC32A8C: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC32A90: AFA6006C sw $a2, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA90u); return; } g_debug_last_store_pc = 0x8004AA90u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6006Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC32A94: AFA30084 sw $v1, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AA94u); return; } g_debug_last_store_pc = 0x8004AA94u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30084u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC32A98: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32A9C: 04810002 bgez $a0, 0xBFC32AA8 */ - uint32_t psx_brA_BFC32A9C = cpu->gpr[4]; - psx_taken_BFC32A9C = ((int32_t)psx_brA_BFC32A9C >= 0); - psx_delay_BFC32A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13u); -#endif - /* 0xBFC32AA0: 00800821 addu $at, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00800821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAA0u); -#endif - if (psx_delay_BFC32A9C) { - psx_delay_BFC32A9C = 0; - if (psx_taken_BFC32A9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAA8u); - goto label_BFC32AA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAA4u); - } -label_BFC32AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32AA4: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAA4u); -#endif -label_BFC32AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800002u); -#endif - /* 0xBFC32AA8: 0001B843 sra $s7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001B843u, cpu->gpr[23], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32AAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000000u); -#endif - /* 0xBFC32AB0: 07C10002 bgez $fp, 0xBFC32ABC */ - uint32_t psx_brA_BFC32AB0 = cpu->gpr[30]; - psx_taken_BFC32AB0 = ((int32_t)psx_brA_BFC32AB0 >= 0); - psx_delay_BFC32AB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000003u); -#endif - /* 0xBFC32AB4: 03C00821 addu $at, $fp, $zero */ - { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[30] + cpu->gpr[0]; - PGXP_ALU(0x03C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAB4u); -#endif - if (psx_delay_BFC32AB0) { - psx_delay_BFC32AB0 = 0; - if (psx_taken_BFC32AB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AABCu); - goto label_BFC32ABC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAB8u); - } -label_BFC32AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32AB8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAB8u); -#endif -label_BFC32ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000002u); -#endif - /* 0xBFC32ABC: 0001F043 sra $fp, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001F043u, cpu->gpr[30], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAC0u); -#endif - /* 0xBFC32AC0: 8FA6006C lw $a2, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAC0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6006Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAC0u); -#endif -label_BFC32AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAC4u); -#endif - /* 0xBFC32AC4: 8FA2005C lw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAC4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAC4u); -#endif - /* 0xBFC32AC8: 8FA30084 lw $v1, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAC8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30084u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAC8u); -#endif - /* 0xBFC32ACC: 8FA5007C lw $a1, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AACCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5007Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32AD0: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC32AD4: 0000B021 addu $s6, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC32AD8: 00408821 addu $s1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80009u); -#endif - /* 0xBFC32ADC: 00609821 addu $s3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00609821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC32AE0: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32AE4: 04C10002 bgez $a2, 0xBFC32AF0 */ - uint32_t psx_brA_BFC32AE4 = cpu->gpr[6]; - psx_taken_BFC32AE4 = ((int32_t)psx_brA_BFC32AE4 >= 0); - psx_delay_BFC32AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC32AE8: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAE8u); -#endif - if (psx_delay_BFC32AE4) { - psx_delay_BFC32AE4 = 0; - if (psx_taken_BFC32AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAF0u); - goto label_BFC32AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAECu); - } -label_BFC32AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32AEC: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAECu); -#endif -label_BFC32AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC32AF0: 0001A043 sra $s4, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x0001A043u, cpu->gpr[20], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAF0u); -#endif -label_BFC32AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AAF4u); -#endif - /* 0xBFC32AF4: 8FA2005C lw $v0, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAF4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2005Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAF4u); -#endif - /* 0xBFC32AF8: 8FA30084 lw $v1, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAF8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30084u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAF8u); -#endif - /* 0xBFC32AFC: 8FA5007C lw $a1, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AAFCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5007Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB00u); -#endif - /* 0xBFC32B00: 8FA6006C lw $a2, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB00u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6006Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32B04: 0C01468F jal 0xB0051A3C */ - cpu->gpr[31] = 0x8004AB0Cu; /* jal link before delay slot */ - psx_delay_BFC32B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC32B08: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB08u); -#endif - if (psx_delay_BFC32B04) { - psx_delay_BFC32B04 = 0; - cpu->gpr[31] = 0x8004AB0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051A3Cu); - cpu->pc = 0x80051A3Cu; return; - } -label_BFC32B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB0Cu); -#endif - /* 0xBFC32B0C: 86B90000 lh $t9, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB0Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x200000u); } - PGXP_LOAD(0x86B90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC32B10: 06C10002 bgez $s6, 0xBFC32B1C */ - uint32_t psx_brA_BFC32B10 = cpu->gpr[22]; - psx_taken_BFC32B10 = ((int32_t)psx_brA_BFC32B10 >= 0); - psx_delay_BFC32B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400003u); -#endif - /* 0xBFC32B14: 02C00821 addu $at, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB14u); -#endif - if (psx_delay_BFC32B10) { - psx_delay_BFC32B10 = 0; - if (psx_taken_BFC32B10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AB1Cu); - goto label_BFC32B1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AB18u); - } -label_BFC32B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32B18: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB18u); -#endif -label_BFC32B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC32B1C: 00011843 sra $v1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00011843u, cpu->gpr[3], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000108u); -#endif - /* 0xBFC32B20: 00794021 addu $t0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00794021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC32B24: A608FF78 sh $t0, -136($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-136)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB24u); return; } g_debug_last_store_pc = 0x8004AB24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608FF78u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB24u); -#endif - /* 0xBFC32B28: 86A90002 lh $t1, 2($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB28u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200000u); } - PGXP_LOAD(0x86A90002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100220u); -#endif - /* 0xBFC32B30: 02892821 addu $a1, $s4, $t1 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[9]; - PGXP_ALU(0x02892821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32B34: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC32B38: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32B3C: A605FF7A sh $a1, -134($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -134; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-134)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB3Cu); return; } g_debug_last_store_pc = 0x8004AB3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA605FF7Au, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB40u); -#endif - /* 0xBFC32B40: 86AA0000 lh $t2, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB40u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x200000u); } - PGXP_LOAD(0x86AA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB40u); -#endif - /* 0xBFC32B44: 9225FF4D lbu $a1, -179($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -179; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-179)), 5, 0x20000u); - PGXP_LOAD(0x9225FF4Du, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC08u); -#endif - /* 0xBFC32B48: 006A5821 addu $t3, $v1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[3] + cpu->gpr[10]; - PGXP_ALU(0x006A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800804u); -#endif - /* 0xBFC32B4C: 01771021 addu $v0, $t3, $s7 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[23]; - PGXP_ALU(0x01771021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32B50: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32B54: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32B58: A602FF80 sh $v0, -128($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-128)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB58u); return; } g_debug_last_store_pc = 0x8004AB58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602FF80u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB58u); -#endif - /* 0xBFC32B5C: 86AC0002 lh $t4, 2($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB5Cu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x200000u); } - PGXP_LOAD(0x86AC0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB60u); -#endif - /* 0xBFC32B60: 922AFF4C lbu $t2, -180($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -180; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-180)), 10, 0x20000u); - PGXP_LOAD(0x922AFF4Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101010u); -#endif - /* 0xBFC32B64: 028C2021 addu $a0, $s4, $t4 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[12]; - PGXP_ALU(0x028C2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32B68: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32B6C: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC32B70: A604FF82 sh $a0, -126($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -126; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-126)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB70u); return; } g_debug_last_store_pc = 0x8004AB70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA604FF82u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB70u); -#endif - /* 0xBFC32B74: 86AD0000 lh $t5, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB74u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x200000u); } - PGXP_LOAD(0x86AD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB74u); -#endif - /* 0xBFC32B78: 922BFF50 lbu $t3, -176($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -176; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-176)), 11, 0x20000u); - PGXP_LOAD(0x922BFF50u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2048u); -#endif - /* 0xBFC32B7C: 006D3021 addu $a2, $v1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[13]; - PGXP_ALU(0x006D3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32B80: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32B84: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10040u); -#endif - /* 0xBFC32B88: A606FF88 sh $a2, -120($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-120)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB88u); return; } g_debug_last_store_pc = 0x8004AB88u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA606FF88u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB88u); -#endif - /* 0xBFC32B8C: 86AE0002 lh $t6, 2($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AB8Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x200000u); } - PGXP_LOAD(0x86AE0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AB90u); -#endif - /* 0xBFC32B90: 922CFF58 lbu $t4, -168($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -168; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-168)), 12, 0x20000u); - PGXP_LOAD(0x922CFF58u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C000u); -#endif - /* 0xBFC32B94: 028E7821 addu $t7, $s4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[20] + cpu->gpr[14]; - PGXP_ALU(0x028E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008004u); -#endif - /* 0xBFC32B98: 01FE1021 addu $v0, $t7, $fp */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[30]; - PGXP_ALU(0x01FE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32B9C: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC32BA0: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32BA4: A602FF8A sh $v0, -118($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -118; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-118)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ABA4u); return; } g_debug_last_store_pc = 0x8004ABA4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602FF8Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABA4u); -#endif - /* 0xBFC32BA8: 86B80000 lh $t8, 0($s5) */ - { uint32_t _pgxa = cpu->gpr[21]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ABA8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x200000u); } - PGXP_LOAD(0x86B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABA8u); -#endif - /* 0xBFC32BAC: 9222FF4E lbu $v0, -178($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -178; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-178)), 2, 0x20000u); - PGXP_LOAD(0x9222FF4Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC32BB0: 0078C821 addu $t9, $v1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[3] + cpu->gpr[24]; - PGXP_ALU(0x0078C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800010u); -#endif - /* 0xBFC32BB4: 03372021 addu $a0, $t9, $s7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[23]; - PGXP_ALU(0x03372021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32BB8: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC32BBC: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC32BC0: A604FF90 sh $a0, -112($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ABC0u); return; } g_debug_last_store_pc = 0x8004ABC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA604FF90u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABC0u); -#endif - /* 0xBFC32BC4: 86A80002 lh $t0, 2($s5) */ - { uint32_t _pgxa = cpu->gpr[21] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ABC4u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x200000u); } - PGXP_LOAD(0x86A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32BC8: A205FF75 sb $a1, -139($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -139; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-139)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205FF75u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32BCC: A202FF76 sb $v0, -138($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -138; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-138)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202FF76u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC32BD0: A20AFF74 sb $t2, -140($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -140; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-140)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA20AFF74u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC32BD4: A20BFF7C sb $t3, -132($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -132; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-132)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA20BFF7Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC32BD8: A20CFF84 sb $t4, -124($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -124; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-124)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA20CFF84u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABD8u); -#endif - /* 0xBFC32BDC: 9222FF52 lbu $v0, -174($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -174; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-174)), 2, 0x20000u); - PGXP_LOAD(0x9222FF52u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABE0u); -#endif - /* 0xBFC32BE0: 9225FF51 lbu $a1, -175($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -175; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-175)), 5, 0x20000u); - PGXP_LOAD(0x9225FF51u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32BE4: A202FF7E sb $v0, -130($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -130; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABE4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-130)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202FF7Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32BE8: A205FF7D sb $a1, -131($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -131; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-131)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205FF7Du, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABE8u); -#endif - /* 0xBFC32BEC: 9225FF59 lbu $a1, -167($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -167; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-167)), 5, 0x20000u); - PGXP_LOAD(0x9225FF59u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ABF0u); -#endif - /* 0xBFC32BF0: 9222FF5A lbu $v0, -166($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -166; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-166)), 2, 0x20000u); - PGXP_LOAD(0x9222FF5Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32BF4: A205FF85 sb $a1, -123($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -123; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ABF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-123)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205FF85u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100300u); -#endif - /* 0xBFC32BF8: 02884821 addu $t1, $s4, $t0 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[20] + cpu->gpr[8]; - PGXP_ALU(0x02884821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000240u); -#endif - /* 0xBFC32BFC: 013E3021 addu $a2, $t1, $fp */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[6] = cpu->gpr[9] + cpu->gpr[30]; - PGXP_ALU(0x013E3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ABFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32C00: A202FF86 sb $v0, -122($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -122; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004AC00u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-122)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202FF86u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC00u); -#endif - /* 0xBFC32C04: 9222FF5E lbu $v0, -162($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -162; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-162)), 2, 0x20000u); - PGXP_LOAD(0x9222FF5Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC04u); -#endif - /* 0xBFC32C08: 9225FF5D lbu $a1, -163($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -163; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-163)), 5, 0x20000u); - PGXP_LOAD(0x9225FF5Du, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC08u); -#endif - /* 0xBFC32C0C: 922DFF5C lbu $t5, -164($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -164; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (-164)), 13, 0x20000u); - PGXP_LOAD(0x922DFF5Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32C10: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC32C14: A202FF8E sb $v0, -114($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -114; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004AC14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-114)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA202FF8Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC32C18: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10040u); -#endif - /* 0xBFC32C1C: A606FF92 sh $a2, -110($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -110; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-110)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC1Cu); return; } g_debug_last_store_pc = 0x8004AC1Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA606FF92u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32C20: A205FF8D sb $a1, -115($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -115; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004AC20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-115)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA205FF8Du, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC32C24: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32C28: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x8004AC30u; /* jal link before delay slot */ - psx_delay_BFC32C28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC32C2C: A20DFF8C sb $t5, -116($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -116; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004AC2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-116)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA20DFF8Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC2Cu); -#endif - if (psx_delay_BFC32C28) { - psx_delay_BFC32C28 = 0; - cpu->gpr[31] = 0x8004AC30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC32C30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32C30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC30u); -#endif - /* 0xBFC32C30: 8FAE00B0 lw $t6, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC30u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE00B0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32C34: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32C38: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC32C3C: 26730024 addiu $s3, $s3, 36 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (36)); - PGXP_ALU(0x26730024u, cpu->gpr[19], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32C40: 26100024 addiu $s0, $s0, 36 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (36)); - PGXP_ALU(0x26100024u, cpu->gpr[16], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC32C44: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC32C48: 1641FFAA bne $s2, $at, 0xBFC32AF4 */ - uint32_t psx_brA_BFC32C48 = cpu->gpr[18]; uint32_t psx_brB_BFC32C48 = cpu->gpr[1]; - psx_taken_BFC32C48 = (psx_brA_BFC32C48 != psx_brB_BFC32C48); - psx_delay_BFC32C48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404000u); -#endif - /* 0xBFC32C4C: 02CEB021 addu $s6, $s6, $t6 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[14]; - PGXP_ALU(0x02CEB021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC4Cu); -#endif - if (psx_delay_BFC32C48) { - psx_delay_BFC32C48 = 0; - if (psx_taken_BFC32C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAF4u); - goto label_BFC32AF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AC50u); - } -label_BFC32C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC50u); -#endif - /* 0xBFC32C50: 8FAC005C lw $t4, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC50u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC005Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC50u); -#endif - /* 0xBFC32C54: 8FAF0084 lw $t7, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC54u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0084u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC54u); -#endif - /* 0xBFC32C58: 8FB9007C lw $t9, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC58u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9007Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC58u); -#endif - /* 0xBFC32C5C: 8FA9006C lw $t1, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC5Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9006Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC60u); -#endif - /* 0xBFC32C60: 8FAA00AC lw $t2, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC60u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA00ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC32C64: 27AE0180 addiu $t6, $sp, 384 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[29] + (384)); - PGXP_ALU(0x27AE0180u, cpu->gpr[14], _pgx1, 0x00000180u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC32C68: 258D000C addiu $t5, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (12)); - PGXP_ALU(0x258D000Cu, cpu->gpr[13], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC32C6C: AFAD005C sw $t5, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC6Cu); return; } g_debug_last_store_pc = 0x8004AC6Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD005Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6002u); -#endif - /* 0xBFC32C70: 01AE082B sltu $at, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x01AE082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC32C74: 25F80048 addiu $t8, $t7, 72 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (72)); - PGXP_ALU(0x25F80048u, cpu->gpr[24], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC32C78: 27280048 addiu $t0, $t9, 72 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (72)); - PGXP_ALU(0x27280048u, cpu->gpr[8], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC32C7C: 012A5821 addu $t3, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC32C80: AFAB006C sw $t3, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC80u); return; } g_debug_last_store_pc = 0x8004AC80u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB006Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC32C84: AFA8007C sw $t0, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC84u); return; } g_debug_last_store_pc = 0x8004AC84u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8007Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32C88: 10200004 beq $at, $zero, 0xBFC32C9C */ - uint32_t psx_brA_BFC32C88 = cpu->gpr[1]; uint32_t psx_brB_BFC32C88 = cpu->gpr[0]; - psx_taken_BFC32C88 = (psx_brA_BFC32C88 == psx_brB_BFC32C88); - psx_delay_BFC32C88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC32C8C: AFB80084 sw $t8, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC8Cu); return; } g_debug_last_store_pc = 0x8004AC8Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80084u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC8Cu); -#endif - if (psx_delay_BFC32C88) { - psx_delay_BFC32C88 = 0; - if (psx_taken_BFC32C88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AC9Cu); - goto label_BFC32C9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AC90u); - } -label_BFC32C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC90u); -#endif - /* 0xBFC32C90: 8FA400B0 lw $a0, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA400B0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32C94: 1000FF8B beq $zero, $zero, 0xBFC32AC4 */ - uint32_t psx_brA_BFC32C94 = cpu->gpr[0]; uint32_t psx_brB_BFC32C94 = cpu->gpr[0]; - psx_taken_BFC32C94 = (psx_brA_BFC32C94 == psx_brB_BFC32C94); - psx_delay_BFC32C94 = 1; - /* 0xBFC32C98: 8FA6006C lw $a2, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC98u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6006Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC98u); -#endif - if (psx_delay_BFC32C94) { - psx_delay_BFC32C94 = 0; - if (psx_taken_BFC32C94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AAC4u); - goto label_BFC32AC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AC9Cu); - } -label_BFC32C9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32C9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AC9Cu); -#endif - /* 0xBFC32C9C: 8FBF0054 lw $ra, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AC9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0054u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACA0u); -#endif - /* 0xBFC32CA0: 8FB00030 lw $s0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACA0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00030u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACA0u); -#endif - /* 0xBFC32CA4: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACA4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACA4u); -#endif - /* 0xBFC32CA8: 8FB20038 lw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACA8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACA8u); -#endif - /* 0xBFC32CAC: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACACu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACB0u); -#endif - /* 0xBFC32CB0: 8FB40040 lw $s4, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACB0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40040u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACB0u); -#endif - /* 0xBFC32CB4: 8FB50044 lw $s5, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACB4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50044u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACB4u); -#endif - /* 0xBFC32CB8: 8FB60048 lw $s6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACB8u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60048u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACB8u); -#endif - /* 0xBFC32CBC: 8FB7004C lw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACBCu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACC0u); -#endif - /* 0xBFC32CC0: 8FBE0050 lw $fp, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACC0u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0050u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC32CC4: 03E00008 jr $ra */ - psx_delay_BFC32CC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32CC8: 27BD0168 addiu $sp, $sp, 360 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (360)); - PGXP_ALU(0x27BD0168u, cpu->gpr[29], _pgx1, 0x00000168u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACC8u); -#endif - if (psx_delay_BFC32CC4) { - psx_delay_BFC32CC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC32CCC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC32CCCu); - int psx_delay_BFC32D04 = 0; - int psx_delay_BFC32D10 = 0; - int psx_delay_BFC32D18 = 0; - int psx_taken_BFC32D18 = 0; - int psx_delay_BFC32D3C = 0; - int psx_delay_BFC32D4C = 0; - int psx_taken_BFC32D4C = 0; - int psx_delay_BFC32D5C = 0; - int psx_taken_BFC32D5C = 0; - int psx_delay_BFC32D64 = 0; - int psx_taken_BFC32D64 = 0; - int psx_delay_BFC32D70 = 0; - int psx_taken_BFC32D70 = 0; - int psx_delay_BFC32D78 = 0; - int psx_delay_BFC32D8C = 0; - int psx_taken_BFC32D8C = 0; - int psx_delay_BFC32D9C = 0; - int psx_taken_BFC32D9C = 0; - int psx_delay_BFC32DA4 = 0; - int psx_taken_BFC32DA4 = 0; - int psx_delay_BFC32DB0 = 0; - int psx_taken_BFC32DB0 = 0; - int psx_delay_BFC32DB8 = 0; - int psx_delay_BFC32DC8 = 0; - int psx_taken_BFC32DC8 = 0; - int psx_delay_BFC32DD8 = 0; - int psx_taken_BFC32DD8 = 0; - int psx_delay_BFC32DE0 = 0; - int psx_taken_BFC32DE0 = 0; - int psx_delay_BFC32DEC = 0; - int psx_delay_BFC32DFC = 0; - int psx_taken_BFC32DFC = 0; - int psx_delay_BFC32E0C = 0; - int psx_taken_BFC32E0C = 0; - int psx_delay_BFC32E14 = 0; - int psx_taken_BFC32E14 = 0; - int psx_delay_BFC32E20 = 0; - int psx_taken_BFC32E20 = 0; - int psx_delay_BFC32E28 = 0; - int psx_delay_BFC32E3C = 0; - int psx_taken_BFC32E3C = 0; - int psx_delay_BFC32E4C = 0; - int psx_taken_BFC32E4C = 0; - int psx_delay_BFC32E54 = 0; - int psx_taken_BFC32E54 = 0; - int psx_delay_BFC32E60 = 0; - int psx_taken_BFC32E60 = 0; - int psx_delay_BFC32E68 = 0; - int psx_delay_BFC32E78 = 0; - int psx_taken_BFC32E78 = 0; - int psx_delay_BFC32E88 = 0; - int psx_taken_BFC32E88 = 0; - int psx_delay_BFC32E90 = 0; - int psx_taken_BFC32E90 = 0; - int psx_delay_BFC32EA8 = 0; - int psx_delay_BFC32EB4 = 0; - int psx_taken_BFC32EB4 = 0; - int psx_delay_BFC32ECC = 0; - int psx_taken_BFC32ECC = 0; - int psx_delay_BFC32F04 = 0; - int psx_taken_BFC32F04 = 0; - int psx_delay_BFC32F14 = 0; - int psx_taken_BFC32F14 = 0; - int psx_delay_BFC32F24 = 0; - int psx_taken_BFC32F24 = 0; - int psx_delay_BFC32F34 = 0; - int psx_taken_BFC32F34 = 0; - int psx_delay_BFC32F44 = 0; - int psx_delay_BFC32F54 = 0; - int psx_taken_BFC32F54 = 0; - int psx_delay_BFC32F64 = 0; - int psx_taken_BFC32F64 = 0; - int psx_delay_BFC32F6C = 0; - int psx_taken_BFC32F6C = 0; - int psx_delay_BFC32F78 = 0; - int psx_taken_BFC32F78 = 0; - int psx_delay_BFC32F80 = 0; - int psx_delay_BFC32F94 = 0; - int psx_taken_BFC32F94 = 0; - int psx_delay_BFC32FA4 = 0; - int psx_taken_BFC32FA4 = 0; - int psx_delay_BFC32FAC = 0; - int psx_taken_BFC32FAC = 0; - int psx_delay_BFC32FB8 = 0; - int psx_taken_BFC32FB8 = 0; - int psx_delay_BFC32FC0 = 0; - int psx_delay_BFC32FD0 = 0; - int psx_taken_BFC32FD0 = 0; - int psx_delay_BFC32FE0 = 0; - int psx_taken_BFC32FE0 = 0; - int psx_delay_BFC32FE8 = 0; - int psx_taken_BFC32FE8 = 0; - int psx_delay_BFC32FF4 = 0; - int psx_delay_BFC33004 = 0; - int psx_taken_BFC33004 = 0; - int psx_delay_BFC33014 = 0; - int psx_taken_BFC33014 = 0; - int psx_delay_BFC3301C = 0; - int psx_taken_BFC3301C = 0; - int psx_delay_BFC33028 = 0; - int psx_taken_BFC33028 = 0; - int psx_delay_BFC33030 = 0; - int psx_delay_BFC33044 = 0; - int psx_taken_BFC33044 = 0; - int psx_delay_BFC33054 = 0; - int psx_taken_BFC33054 = 0; - int psx_delay_BFC3305C = 0; - int psx_taken_BFC3305C = 0; - int psx_delay_BFC33068 = 0; - int psx_taken_BFC33068 = 0; - int psx_delay_BFC33070 = 0; - int psx_delay_BFC33080 = 0; - int psx_taken_BFC33080 = 0; - int psx_delay_BFC33090 = 0; - int psx_taken_BFC33090 = 0; - int psx_delay_BFC33098 = 0; - int psx_taken_BFC33098 = 0; - int psx_delay_BFC330B0 = 0; - int psx_delay_BFC330BC = 0; - int psx_taken_BFC330BC = 0; - int psx_delay_BFC330DC = 0; - int psx_delay_BFC330E8 = 0; - int psx_delay_BFC330FC = 0; - int psx_delay_BFC3310C = 0; - int psx_delay_BFC33114 = 0; - int psx_delay_BFC33130 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC32D0Cu: goto label_BFC32D0C; - case 0xBFC32D18u: goto label_BFC32D18; - case 0xBFC32D20u: goto label_BFC32D20; - case 0xBFC32D3Cu: goto label_BFC32D3C; - case 0xBFC32D44u: goto label_BFC32D44; - case 0xBFC32D54u: goto label_BFC32D54; - case 0xBFC32D58u: goto label_BFC32D58; - case 0xBFC32D64u: goto label_BFC32D64; - case 0xBFC32D6Cu: goto label_BFC32D6C; - case 0xBFC32D70u: goto label_BFC32D70; - case 0xBFC32D78u: goto label_BFC32D78; - case 0xBFC32D80u: goto label_BFC32D80; - case 0xBFC32D94u: goto label_BFC32D94; - case 0xBFC32D98u: goto label_BFC32D98; - case 0xBFC32DA4u: goto label_BFC32DA4; - case 0xBFC32DACu: goto label_BFC32DAC; - case 0xBFC32DB0u: goto label_BFC32DB0; - case 0xBFC32DB8u: goto label_BFC32DB8; - case 0xBFC32DC0u: goto label_BFC32DC0; - case 0xBFC32DD0u: goto label_BFC32DD0; - case 0xBFC32DD4u: goto label_BFC32DD4; - case 0xBFC32DE0u: goto label_BFC32DE0; - case 0xBFC32DE8u: goto label_BFC32DE8; - case 0xBFC32DECu: goto label_BFC32DEC; - case 0xBFC32DF4u: goto label_BFC32DF4; - case 0xBFC32E04u: goto label_BFC32E04; - case 0xBFC32E08u: goto label_BFC32E08; - case 0xBFC32E14u: goto label_BFC32E14; - case 0xBFC32E1Cu: goto label_BFC32E1C; - case 0xBFC32E20u: goto label_BFC32E20; - case 0xBFC32E28u: goto label_BFC32E28; - case 0xBFC32E30u: goto label_BFC32E30; - case 0xBFC32E44u: goto label_BFC32E44; - case 0xBFC32E48u: goto label_BFC32E48; - case 0xBFC32E54u: goto label_BFC32E54; - case 0xBFC32E5Cu: goto label_BFC32E5C; - case 0xBFC32E60u: goto label_BFC32E60; - case 0xBFC32E68u: goto label_BFC32E68; - case 0xBFC32E70u: goto label_BFC32E70; - case 0xBFC32E80u: goto label_BFC32E80; - case 0xBFC32E84u: goto label_BFC32E84; - case 0xBFC32E90u: goto label_BFC32E90; - case 0xBFC32E98u: goto label_BFC32E98; - case 0xBFC32E9Cu: goto label_BFC32E9C; - case 0xBFC32EA0u: goto label_BFC32EA0; - case 0xBFC32EB0u: goto label_BFC32EB0; - case 0xBFC32EBCu: goto label_BFC32EBC; - case 0xBFC32ECCu: goto label_BFC32ECC; - case 0xBFC32ED4u: goto label_BFC32ED4; - case 0xBFC32F0Cu: goto label_BFC32F0C; - case 0xBFC32F10u: goto label_BFC32F10; - case 0xBFC32F1Cu: goto label_BFC32F1C; - case 0xBFC32F20u: goto label_BFC32F20; - case 0xBFC32F2Cu: goto label_BFC32F2C; - case 0xBFC32F30u: goto label_BFC32F30; - case 0xBFC32F3Cu: goto label_BFC32F3C; - case 0xBFC32F40u: goto label_BFC32F40; - case 0xBFC32F44u: goto label_BFC32F44; - case 0xBFC32F4Cu: goto label_BFC32F4C; - case 0xBFC32F5Cu: goto label_BFC32F5C; - case 0xBFC32F60u: goto label_BFC32F60; - case 0xBFC32F6Cu: goto label_BFC32F6C; - case 0xBFC32F74u: goto label_BFC32F74; - case 0xBFC32F78u: goto label_BFC32F78; - case 0xBFC32F80u: goto label_BFC32F80; - case 0xBFC32F88u: goto label_BFC32F88; - case 0xBFC32F9Cu: goto label_BFC32F9C; - case 0xBFC32FA0u: goto label_BFC32FA0; - case 0xBFC32FACu: goto label_BFC32FAC; - case 0xBFC32FB4u: goto label_BFC32FB4; - case 0xBFC32FB8u: goto label_BFC32FB8; - case 0xBFC32FC0u: goto label_BFC32FC0; - case 0xBFC32FC8u: goto label_BFC32FC8; - case 0xBFC32FD8u: goto label_BFC32FD8; - case 0xBFC32FDCu: goto label_BFC32FDC; - case 0xBFC32FE8u: goto label_BFC32FE8; - case 0xBFC32FF0u: goto label_BFC32FF0; - case 0xBFC32FF4u: goto label_BFC32FF4; - case 0xBFC32FFCu: goto label_BFC32FFC; - case 0xBFC3300Cu: goto label_BFC3300C; - case 0xBFC33010u: goto label_BFC33010; - case 0xBFC3301Cu: goto label_BFC3301C; - case 0xBFC33024u: goto label_BFC33024; - case 0xBFC33028u: goto label_BFC33028; - case 0xBFC33030u: goto label_BFC33030; - case 0xBFC33038u: goto label_BFC33038; - case 0xBFC3304Cu: goto label_BFC3304C; - case 0xBFC33050u: goto label_BFC33050; - case 0xBFC3305Cu: goto label_BFC3305C; - case 0xBFC33064u: goto label_BFC33064; - case 0xBFC33068u: goto label_BFC33068; - case 0xBFC33070u: goto label_BFC33070; - case 0xBFC33078u: goto label_BFC33078; - case 0xBFC33088u: goto label_BFC33088; - case 0xBFC3308Cu: goto label_BFC3308C; - case 0xBFC33098u: goto label_BFC33098; - case 0xBFC330A0u: goto label_BFC330A0; - case 0xBFC330A4u: goto label_BFC330A4; - case 0xBFC330A8u: goto label_BFC330A8; - case 0xBFC330B8u: goto label_BFC330B8; - case 0xBFC330C4u: goto label_BFC330C4; - case 0xBFC330D8u: goto label_BFC330D8; - case 0xBFC330E4u: goto label_BFC330E4; - case 0xBFC330F0u: goto label_BFC330F0; - case 0xBFC33104u: goto label_BFC33104; - case 0xBFC33114u: goto label_BFC33114; - case 0xBFC3311Cu: goto label_BFC3311C; - default: break; - } - } -label_BFC32CCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32CCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC32CCC: 27BDFF70 addiu $sp, $sp, -144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-144)); - PGXP_ALU(0x27BDFF70u, cpu->gpr[29], _pgx1, 0xFFFFFF70u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC32CD0: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACD0u); return; } g_debug_last_store_pc = 0x8004ACD0u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC32CD4: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACD4u); return; } g_debug_last_store_pc = 0x8004ACD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC32CD8: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC32CDC: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACDCu); return; } g_debug_last_store_pc = 0x8004ACDCu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC32CE0: AFB40028 sw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACE0u); return; } g_debug_last_store_pc = 0x8004ACE0u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC32CE4: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACE4u); return; } g_debug_last_store_pc = 0x8004ACE4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC32CE8: AFA50094 sw $a1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACE8u); return; } g_debug_last_store_pc = 0x8004ACE8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50094u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACE8u); -#endif - /* 0xBFC32CEC: 86CE0000 lh $t6, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACECu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x400000u); } - PGXP_LOAD(0x86CE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100041u); -#endif - /* 0xBFC32CF0: 00C0A021 addu $s4, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC32CF4: AFAE0080 sw $t6, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACF4u); return; } g_debug_last_store_pc = 0x8004ACF4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0080u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACF4u); -#endif - /* 0xBFC32CF8: 86CF0002 lh $t7, 2($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004ACF8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x400000u); } - PGXP_LOAD(0x86CF0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800081u); -#endif - /* 0xBFC32CFC: 00E0B821 addu $s7, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E0B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ACFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC32D00: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32D04: 0C012804 jal 0xB004A010 */ - cpu->gpr[31] = 0x8004AD0Cu; /* jal link before delay slot */ - psx_delay_BFC32D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC32D08: AFAF007C sw $t7, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD08u); return; } g_debug_last_store_pc = 0x8004AD08u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF007Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD08u); -#endif - if (psx_delay_BFC32D04) { - psx_delay_BFC32D04 = 0; - cpu->gpr[31] = 0x8004AD0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A010u); - cpu->pc = 0x8004A010u; return; - } -label_BFC32D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD0Cu); -#endif - /* 0xBFC32D0C: 8FA40094 lw $a0, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40094u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32D10: 0C012804 jal 0xB004A010 */ - cpu->gpr[31] = 0x8004AD18u; /* jal link before delay slot */ - psx_delay_BFC32D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD14u); -#endif - if (psx_delay_BFC32D10) { - psx_delay_BFC32D10 = 0; - cpu->gpr[31] = 0x8004AD18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A010u); - cpu->pc = 0x8004A010u; return; - } -label_BFC32D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC32D18: 1A80006C blez $s4, 0xBFC32ECC */ - uint32_t psx_brA_BFC32D18 = cpu->gpr[20]; - psx_taken_BFC32D18 = ((int32_t)psx_brA_BFC32D18 <= 0); - psx_delay_BFC32D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC32D1C: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD1Cu); -#endif - if (psx_delay_BFC32D18) { - psx_delay_BFC32D18 = 0; - if (psx_taken_BFC32D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AECCu); - goto label_BFC32ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD20u); - } -label_BFC32D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32D20: AFB10044 sw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD20u); return; } g_debug_last_store_pc = 0x8004AD20u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC32D24: AFB20040 sw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD24u); return; } g_debug_last_store_pc = 0x8004AD24u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD24u); -#endif - /* 0xBFC32D28: 8FB2007C lw $s2, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD28u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2007Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD28u); -#endif - /* 0xBFC32D2C: 8FB10080 lw $s1, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD2Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10080u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32D30: AFB00048 sw $s0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AD30u); return; } g_debug_last_store_pc = 0x8004AD30u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00048u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32D34: 2652FFFE addiu $s2, $s2, -2 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-2)); - PGXP_ALU(0x2652FFFEu, cpu->gpr[18], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC32D38: 2631FFFE addiu $s1, $s1, -2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-2)); - PGXP_ALU(0x2631FFFEu, cpu->gpr[17], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD38u); -#endif -label_BFC32D3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32D3C: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AD44u; /* jal link before delay slot */ - psx_delay_BFC32D3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD40u); -#endif - if (psx_delay_BFC32D3C) { - psx_delay_BFC32D3C = 0; - cpu->gpr[31] = 0x8004AD44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32D44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32D44: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004AD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC32D48: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32D4C: 16200002 bne $s1, $zero, 0xBFC32D58 */ - uint32_t psx_brA_BFC32D4C = cpu->gpr[17]; uint32_t psx_brB_BFC32D4C = cpu->gpr[0]; - psx_taken_BFC32D4C = (psx_brA_BFC32D4C != psx_brB_BFC32D4C); - psx_delay_BFC32D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD50u); -#endif - if (psx_delay_BFC32D4C) { - psx_delay_BFC32D4C = 0; - if (psx_taken_BFC32D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD58u); - goto label_BFC32D58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD54u); - } -label_BFC32D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32D54: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AD54u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AD54u); -#endif -label_BFC32D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32D58: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32D5C: 16210004 bne $s1, $at, 0xBFC32D70 */ - uint32_t psx_brA_BFC32D5C = cpu->gpr[17]; uint32_t psx_brB_BFC32D5C = cpu->gpr[1]; - psx_taken_BFC32D5C = (psx_brA_BFC32D5C != psx_brB_BFC32D5C); - psx_delay_BFC32D5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32D60: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AD60u); -#endif - if (psx_delay_BFC32D5C) { - psx_delay_BFC32D5C = 0; - if (psx_taken_BFC32D5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD70u); - goto label_BFC32D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD64u); - } -label_BFC32D64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32D64: 14410002 bne $v0, $at, 0xBFC32D70 */ - uint32_t psx_brA_BFC32D64 = cpu->gpr[2]; uint32_t psx_brB_BFC32D64 = cpu->gpr[1]; - psx_taken_BFC32D64 = (psx_brA_BFC32D64 != psx_brB_BFC32D64); - psx_delay_BFC32D64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD68u); -#endif - if (psx_delay_BFC32D64) { - psx_delay_BFC32D64 = 0; - if (psx_taken_BFC32D64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD70u); - goto label_BFC32D70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD6Cu); - } -label_BFC32D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32D6C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AD6Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AD6Cu); -#endif -label_BFC32D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC32D70: 07010011 bgez $t8, 0xBFC32DB8 */ - uint32_t psx_brA_BFC32D70 = cpu->gpr[24]; - psx_taken_BFC32D70 = ((int32_t)psx_brA_BFC32D70 >= 0); - psx_delay_BFC32D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD74u); -#endif - if (psx_delay_BFC32D70) { - psx_delay_BFC32D70 = 0; - if (psx_taken_BFC32D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADB8u); - goto label_BFC32DB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD78u); - } -label_BFC32D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32D78: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AD80u; /* jal link before delay slot */ - psx_delay_BFC32D78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD7Cu); -#endif - if (psx_delay_BFC32D78) { - psx_delay_BFC32D78 = 0; - cpu->gpr[31] = 0x8004AD80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32D80: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004AD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32D84: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC32D88: 00108023 subu $s0, $zero, $s0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[0] - cpu->gpr[16]; - PGXP_ALU(0x00108023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32D8C: 16200002 bne $s1, $zero, 0xBFC32D98 */ - uint32_t psx_brA_BFC32D8C = cpu->gpr[17]; uint32_t psx_brB_BFC32D8C = cpu->gpr[0]; - psx_taken_BFC32D8C = (psx_brA_BFC32D8C != psx_brB_BFC32D8C); - psx_delay_BFC32D8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AD90u); -#endif - if (psx_delay_BFC32D8C) { - psx_delay_BFC32D8C = 0; - if (psx_taken_BFC32D8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD98u); - goto label_BFC32D98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD94u); - } -label_BFC32D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32D94: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AD94u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AD94u); -#endif -label_BFC32D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32D98: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32D9C: 16210004 bne $s1, $at, 0xBFC32DB0 */ - uint32_t psx_brA_BFC32D9C = cpu->gpr[17]; uint32_t psx_brB_BFC32D9C = cpu->gpr[1]; - psx_taken_BFC32D9C = (psx_brA_BFC32D9C != psx_brB_BFC32D9C); - psx_delay_BFC32D9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32DA0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ADA0u); -#endif - if (psx_delay_BFC32D9C) { - psx_delay_BFC32D9C = 0; - if (psx_taken_BFC32D9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADB0u); - goto label_BFC32DB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADA4u); - } -label_BFC32DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32DA4: 14410002 bne $v0, $at, 0xBFC32DB0 */ - uint32_t psx_brA_BFC32DA4 = cpu->gpr[2]; uint32_t psx_brB_BFC32DA4 = cpu->gpr[1]; - psx_taken_BFC32DA4 = (psx_brA_BFC32DA4 != psx_brB_BFC32DA4); - psx_delay_BFC32DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADA8u); -#endif - if (psx_delay_BFC32DA4) { - psx_delay_BFC32DA4 = 0; - if (psx_taken_BFC32DA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADB0u); - goto label_BFC32DB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADACu); - } -label_BFC32DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32DAC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004ADACu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004ADACu); -#endif -label_BFC32DB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DB0: 1000000E beq $zero, $zero, 0xBFC32DEC */ - uint32_t psx_brA_BFC32DB0 = cpu->gpr[0]; uint32_t psx_brB_BFC32DB0 = cpu->gpr[0]; - psx_taken_BFC32DB0 = (psx_brA_BFC32DB0 == psx_brB_BFC32DB0); - psx_delay_BFC32DB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADB4u); -#endif - if (psx_delay_BFC32DB0) { - psx_delay_BFC32DB0 = 0; - if (psx_taken_BFC32DB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADECu); - goto label_BFC32DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADB8u); - } -label_BFC32DB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32DB8: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004ADC0u; /* jal link before delay slot */ - psx_delay_BFC32DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADBCu); -#endif - if (psx_delay_BFC32DB8) { - psx_delay_BFC32DB8 = 0; - cpu->gpr[31] = 0x8004ADC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32DC0: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004ADC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32DC4: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ADC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32DC8: 16200002 bne $s1, $zero, 0xBFC32DD4 */ - uint32_t psx_brA_BFC32DC8 = cpu->gpr[17]; uint32_t psx_brB_BFC32DC8 = cpu->gpr[0]; - psx_taken_BFC32DC8 = (psx_brA_BFC32DC8 != psx_brB_BFC32DC8); - psx_delay_BFC32DC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADCCu); -#endif - if (psx_delay_BFC32DC8) { - psx_delay_BFC32DC8 = 0; - if (psx_taken_BFC32DC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADD4u); - goto label_BFC32DD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADD0u); - } -label_BFC32DD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32DD0: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004ADD0u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004ADD0u); -#endif -label_BFC32DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32DD4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004ADD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32DD8: 16210004 bne $s1, $at, 0xBFC32DEC */ - uint32_t psx_brA_BFC32DD8 = cpu->gpr[17]; uint32_t psx_brB_BFC32DD8 = cpu->gpr[1]; - psx_taken_BFC32DD8 = (psx_brA_BFC32DD8 != psx_brB_BFC32DD8); - psx_delay_BFC32DD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32DDC: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ADDCu); -#endif - if (psx_delay_BFC32DD8) { - psx_delay_BFC32DD8 = 0; - if (psx_taken_BFC32DD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADECu); - goto label_BFC32DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADE0u); - } -label_BFC32DE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32DE0: 14410002 bne $v0, $at, 0xBFC32DEC */ - uint32_t psx_brA_BFC32DE0 = cpu->gpr[2]; uint32_t psx_brB_BFC32DE0 = cpu->gpr[1]; - psx_taken_BFC32DE0 = (psx_brA_BFC32DE0 != psx_brB_BFC32DE0); - psx_delay_BFC32DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADE4u); -#endif - if (psx_delay_BFC32DE0) { - psx_delay_BFC32DE0 = 0; - if (psx_taken_BFC32DE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADECu); - goto label_BFC32DEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ADE8u); - } -label_BFC32DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32DE8: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004ADE8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004ADE8u); -#endif -label_BFC32DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32DEC: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004ADF4u; /* jal link before delay slot */ - psx_delay_BFC32DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32DF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ADF0u); -#endif - if (psx_delay_BFC32DEC) { - psx_delay_BFC32DEC = 0; - cpu->gpr[31] = 0x8004ADF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ADF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC32DF4: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004ADF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC32DF8: 0000C810 mfhi $t9 */ - cpu->gpr[25] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C810u, cpu->gpr[25], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ADF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32DFC: 16400002 bne $s2, $zero, 0xBFC32E08 */ - uint32_t psx_brA_BFC32DFC = cpu->gpr[18]; uint32_t psx_brB_BFC32DFC = cpu->gpr[0]; - psx_taken_BFC32DFC = (psx_brA_BFC32DFC != psx_brB_BFC32DFC); - psx_delay_BFC32DFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE00u); -#endif - if (psx_delay_BFC32DFC) { - psx_delay_BFC32DFC = 0; - if (psx_taken_BFC32DFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE08u); - goto label_BFC32E08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE04u); - } -label_BFC32E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E04: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AE04u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE04u); -#endif -label_BFC32E08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32E08: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC32E0C: 16410004 bne $s2, $at, 0xBFC32E20 */ - uint32_t psx_brA_BFC32E0C = cpu->gpr[18]; uint32_t psx_brB_BFC32E0C = cpu->gpr[1]; - psx_taken_BFC32E0C = (psx_brA_BFC32E0C != psx_brB_BFC32E0C); - psx_delay_BFC32E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32E10: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AE10u); -#endif - if (psx_delay_BFC32E0C) { - psx_delay_BFC32E0C = 0; - if (psx_taken_BFC32E0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE20u); - goto label_BFC32E20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE14u); - } -label_BFC32E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32E14: 14410002 bne $v0, $at, 0xBFC32E20 */ - uint32_t psx_brA_BFC32E14 = cpu->gpr[2]; uint32_t psx_brB_BFC32E14 = cpu->gpr[1]; - psx_taken_BFC32E14 = (psx_brA_BFC32E14 != psx_brB_BFC32E14); - psx_delay_BFC32E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE18u); -#endif - if (psx_delay_BFC32E14) { - psx_delay_BFC32E14 = 0; - if (psx_taken_BFC32E14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE20u); - goto label_BFC32E20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE1Cu); - } -label_BFC32E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E1C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AE1Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE1Cu); -#endif -label_BFC32E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC32E20: 07210011 bgez $t9, 0xBFC32E68 */ - uint32_t psx_brA_BFC32E20 = cpu->gpr[25]; - psx_taken_BFC32E20 = ((int32_t)psx_brA_BFC32E20 >= 0); - psx_delay_BFC32E20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE24u); -#endif - if (psx_delay_BFC32E20) { - psx_delay_BFC32E20 = 0; - if (psx_taken_BFC32E20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE68u); - goto label_BFC32E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE28u); - } -label_BFC32E28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32E28: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AE30u; /* jal link before delay slot */ - psx_delay_BFC32E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE2Cu); -#endif - if (psx_delay_BFC32E28) { - psx_delay_BFC32E28 = 0; - cpu->gpr[31] = 0x8004AE30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC32E30: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004AE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32E34: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC32E38: 00031823 subu $v1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00031823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32E3C: 16400002 bne $s2, $zero, 0xBFC32E48 */ - uint32_t psx_brA_BFC32E3C = cpu->gpr[18]; uint32_t psx_brB_BFC32E3C = cpu->gpr[0]; - psx_taken_BFC32E3C = (psx_brA_BFC32E3C != psx_brB_BFC32E3C); - psx_delay_BFC32E3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE40u); -#endif - if (psx_delay_BFC32E3C) { - psx_delay_BFC32E3C = 0; - if (psx_taken_BFC32E3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE48u); - goto label_BFC32E48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE44u); - } -label_BFC32E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E44: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AE44u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE44u); -#endif -label_BFC32E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32E48: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC32E4C: 16410004 bne $s2, $at, 0xBFC32E60 */ - uint32_t psx_brA_BFC32E4C = cpu->gpr[18]; uint32_t psx_brB_BFC32E4C = cpu->gpr[1]; - psx_taken_BFC32E4C = (psx_brA_BFC32E4C != psx_brB_BFC32E4C); - psx_delay_BFC32E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32E50: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AE50u); -#endif - if (psx_delay_BFC32E4C) { - psx_delay_BFC32E4C = 0; - if (psx_taken_BFC32E4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE60u); - goto label_BFC32E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE54u); - } -label_BFC32E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32E54: 14410002 bne $v0, $at, 0xBFC32E60 */ - uint32_t psx_brA_BFC32E54 = cpu->gpr[2]; uint32_t psx_brB_BFC32E54 = cpu->gpr[1]; - psx_taken_BFC32E54 = (psx_brA_BFC32E54 != psx_brB_BFC32E54); - psx_delay_BFC32E54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE58u); -#endif - if (psx_delay_BFC32E54) { - psx_delay_BFC32E54 = 0; - if (psx_taken_BFC32E54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE60u); - goto label_BFC32E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE5Cu); - } -label_BFC32E5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E5C: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AE5Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE5Cu); -#endif -label_BFC32E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E60: 1000000F beq $zero, $zero, 0xBFC32EA0 */ - uint32_t psx_brA_BFC32E60 = cpu->gpr[0]; uint32_t psx_brB_BFC32E60 = cpu->gpr[0]; - psx_taken_BFC32E60 = (psx_brA_BFC32E60 == psx_brB_BFC32E60); - psx_delay_BFC32E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC32E64: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE64u); -#endif - if (psx_delay_BFC32E60) { - psx_delay_BFC32E60 = 0; - if (psx_taken_BFC32E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AEA0u); - goto label_BFC32EA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE68u); - } -label_BFC32E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32E68: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AE70u; /* jal link before delay slot */ - psx_delay_BFC32E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE6Cu); -#endif - if (psx_delay_BFC32E68) { - psx_delay_BFC32E68 = 0; - cpu->gpr[31] = 0x8004AE70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC32E70: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004AE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC32E74: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC32E78: 16400002 bne $s2, $zero, 0xBFC32E84 */ - uint32_t psx_brA_BFC32E78 = cpu->gpr[18]; uint32_t psx_brB_BFC32E78 = cpu->gpr[0]; - psx_taken_BFC32E78 = (psx_brA_BFC32E78 != psx_brB_BFC32E78); - psx_delay_BFC32E78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE7Cu); -#endif - if (psx_delay_BFC32E78) { - psx_delay_BFC32E78 = 0; - if (psx_taken_BFC32E78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE84u); - goto label_BFC32E84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE80u); - } -label_BFC32E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E80: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AE80u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE80u); -#endif -label_BFC32E84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32E84: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC32E88: 16410004 bne $s2, $at, 0xBFC32E9C */ - uint32_t psx_brA_BFC32E88 = cpu->gpr[18]; uint32_t psx_brB_BFC32E88 = cpu->gpr[1]; - psx_taken_BFC32E88 = (psx_brA_BFC32E88 != psx_brB_BFC32E88); - psx_delay_BFC32E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32E8C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AE8Cu); -#endif - if (psx_delay_BFC32E88) { - psx_delay_BFC32E88 = 0; - if (psx_taken_BFC32E88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE9Cu); - goto label_BFC32E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE90u); - } -label_BFC32E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32E90: 14410002 bne $v0, $at, 0xBFC32E9C */ - uint32_t psx_brA_BFC32E90 = cpu->gpr[2]; uint32_t psx_brB_BFC32E90 = cpu->gpr[1]; - psx_taken_BFC32E90 = (psx_brA_BFC32E90 != psx_brB_BFC32E90); - psx_delay_BFC32E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32E94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AE94u); -#endif - if (psx_delay_BFC32E90) { - psx_delay_BFC32E90 = 0; - if (psx_taken_BFC32E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE9Cu); - goto label_BFC32E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AE98u); - } -label_BFC32E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32E98: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AE98u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AE98u); -#endif -label_BFC32E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC32E9C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AE9Cu); -#endif -label_BFC32EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC32EA0: 26050001 addiu $a1, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC32EA4: 24660001 addiu $a2, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24660001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32EA8: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004AEB0u; /* jal link before delay slot */ - psx_delay_BFC32EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC32EAC: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEACu); -#endif - if (psx_delay_BFC32EA8) { - psx_delay_BFC32EA8 = 0; - cpu->gpr[31] = 0x8004AEB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC32EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC32EB0: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC32EB4: 1674FFA1 bne $s3, $s4, 0xBFC32D3C */ - uint32_t psx_brA_BFC32EB4 = cpu->gpr[19]; uint32_t psx_brB_BFC32EB4 = cpu->gpr[20]; - psx_taken_BFC32EB4 = (psx_brA_BFC32EB4 != psx_brB_BFC32EB4); - psx_delay_BFC32EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32EB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AEB8u); -#endif - if (psx_delay_BFC32EB4) { - psx_delay_BFC32EB4 = 0; - if (psx_taken_BFC32EB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AD3Cu); - goto label_BFC32D3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AEBCu); - } -label_BFC32EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEBCu); -#endif - /* 0xBFC32EBC: 8FB00048 lw $s0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEBCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00048u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEC0u); -#endif - /* 0xBFC32EC0: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEC0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEC0u); -#endif - /* 0xBFC32EC4: 8FB20040 lw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEC4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC32EC8: 00009821 addu $s3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEC8u); -#endif -label_BFC32ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC32ECC: 1AE00082 blez $s7, 0xBFC330D8 */ - uint32_t psx_brA_BFC32ECC = cpu->gpr[23]; - psx_taken_BFC32ECC = ((int32_t)psx_brA_BFC32ECC <= 0); - psx_delay_BFC32ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32ED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AED0u); -#endif - if (psx_delay_BFC32ECC) { - psx_delay_BFC32ECC = 0; - if (psx_taken_BFC32ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0D8u); - goto label_BFC330D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AED4u); - } -label_BFC32ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AED4u); -#endif - /* 0xBFC32ED4: 8FA80080 lw $t0, 128($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AED4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80080u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AED4u); -#endif - /* 0xBFC32ED8: 8FA9007C lw $t1, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AED8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9007Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC32EDC: AFB10044 sw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEDCu); return; } g_debug_last_store_pc = 0x8004AEDCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC32EE0: AFB20040 sw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEE0u); return; } g_debug_last_store_pc = 0x8004AEE0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC32EE4: 00088880 sll $s1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[17] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00088880u, cpu->gpr[17], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC32EE8: 02288823 subu $s1, $s1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[17] = cpu->gpr[17] - cpu->gpr[8]; - PGXP_ALU(0x02288823u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC32EEC: 00099080 sll $s2, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[18] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00099080u, cpu->gpr[18], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC32EF0: 00118840 sll $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 1u; - PGXP_ALU(0x00118840u, cpu->gpr[17], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200u); -#endif - /* 0xBFC32EF4: 02499023 subu $s2, $s2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[18] = cpu->gpr[18] - cpu->gpr[9]; - PGXP_ALU(0x02499023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32EF8: 00129040 sll $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] << 1u; - PGXP_ALU(0x00129040u, cpu->gpr[18], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC32EFC: AFB5003C sw $s5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AEFCu); return; } g_debug_last_store_pc = 0x8004AEFCu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5003Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC32F00: AFB00048 sw $s0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004AF00u); return; } g_debug_last_store_pc = 0x8004AF00u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00048u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC32F04: 06210002 bgez $s1, 0xBFC32F10 */ - uint32_t psx_brA_BFC32F04 = cpu->gpr[17]; - psx_taken_BFC32F04 = ((int32_t)psx_brA_BFC32F04 >= 0); - psx_delay_BFC32F04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20003u); -#endif - /* 0xBFC32F08: 02200821 addu $at, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF08u); -#endif - if (psx_delay_BFC32F04) { - psx_delay_BFC32F04 = 0; - if (psx_taken_BFC32F04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF10u); - goto label_BFC32F10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF0Cu); - } -label_BFC32F0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32F0C: 24210007 addiu $at, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (7)); - PGXP_ALU(0x24210007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF0Cu); -#endif -label_BFC32F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32F10: 000188C3 sra $s1, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[1] >> 3u); - PGXP_ALU(0x000188C3u, cpu->gpr[17], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC32F14: 06410002 bgez $s2, 0xBFC32F20 */ - uint32_t psx_brA_BFC32F14 = cpu->gpr[18]; - psx_taken_BFC32F14 = ((int32_t)psx_brA_BFC32F14 >= 0); - psx_delay_BFC32F14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40003u); -#endif - /* 0xBFC32F18: 02400821 addu $at, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF18u); -#endif - if (psx_delay_BFC32F14) { - psx_delay_BFC32F14 = 0; - if (psx_taken_BFC32F14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF20u); - goto label_BFC32F20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF1Cu); - } -label_BFC32F1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32F1C: 24210007 addiu $at, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (7)); - PGXP_ALU(0x24210007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF1Cu); -#endif -label_BFC32F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC32F20: 000190C3 sra $s2, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[1] >> 3u); - PGXP_ALU(0x000190C3u, cpu->gpr[18], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC32F24: 05010002 bgez $t0, 0xBFC32F30 */ - uint32_t psx_brA_BFC32F24 = cpu->gpr[8]; - psx_taken_BFC32F24 = ((int32_t)psx_brA_BFC32F24 >= 0); - psx_delay_BFC32F24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103u); -#endif - /* 0xBFC32F28: 01000821 addu $at, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF28u); -#endif - if (psx_delay_BFC32F24) { - psx_delay_BFC32F24 = 0; - if (psx_taken_BFC32F24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF30u); - goto label_BFC32F30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF2Cu); - } -label_BFC32F2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32F2C: 24210007 addiu $at, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (7)); - PGXP_ALU(0x24210007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF2Cu); -#endif -label_BFC32F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC32F30: 0001A0C3 sra $s4, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[1] >> 3u); - PGXP_ALU(0x0001A0C3u, cpu->gpr[20], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC32F34: 05210002 bgez $t1, 0xBFC32F40 */ - uint32_t psx_brA_BFC32F34 = cpu->gpr[9]; - psx_taken_BFC32F34 = ((int32_t)psx_brA_BFC32F34 >= 0); - psx_delay_BFC32F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x203u); -#endif - /* 0xBFC32F38: 01200821 addu $at, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF38u); -#endif - if (psx_delay_BFC32F34) { - psx_delay_BFC32F34 = 0; - if (psx_taken_BFC32F34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF40u); - goto label_BFC32F40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF3Cu); - } -label_BFC32F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32F3C: 24210007 addiu $at, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (7)); - PGXP_ALU(0x24210007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF3Cu); -#endif -label_BFC32F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200002u); -#endif - /* 0xBFC32F40: 0001A8C3 sra $s5, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[1] >> 3u); - PGXP_ALU(0x0001A8C3u, cpu->gpr[21], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF40u); -#endif -label_BFC32F44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32F44: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AF4Cu; /* jal link before delay slot */ - psx_delay_BFC32F44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF48u); -#endif - if (psx_delay_BFC32F44) { - psx_delay_BFC32F44 = 0; - cpu->gpr[31] = 0x8004AF4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32F4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32F4C: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004AF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC32F50: 00005010 mfhi $t2 */ - cpu->gpr[10] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005010u, cpu->gpr[10], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32F54: 16200002 bne $s1, $zero, 0xBFC32F60 */ - uint32_t psx_brA_BFC32F54 = cpu->gpr[17]; uint32_t psx_brB_BFC32F54 = cpu->gpr[0]; - psx_taken_BFC32F54 = (psx_brA_BFC32F54 != psx_brB_BFC32F54); - psx_delay_BFC32F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF58u); -#endif - if (psx_delay_BFC32F54) { - psx_delay_BFC32F54 = 0; - if (psx_taken_BFC32F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF60u); - goto label_BFC32F60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF5Cu); - } -label_BFC32F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32F5C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AF5Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AF5Cu); -#endif -label_BFC32F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32F60: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32F64: 16210004 bne $s1, $at, 0xBFC32F78 */ - uint32_t psx_brA_BFC32F64 = cpu->gpr[17]; uint32_t psx_brB_BFC32F64 = cpu->gpr[1]; - psx_taken_BFC32F64 = (psx_brA_BFC32F64 != psx_brB_BFC32F64); - psx_delay_BFC32F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32F68: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AF68u); -#endif - if (psx_delay_BFC32F64) { - psx_delay_BFC32F64 = 0; - if (psx_taken_BFC32F64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF78u); - goto label_BFC32F78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF6Cu); - } -label_BFC32F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32F6C: 14410002 bne $v0, $at, 0xBFC32F78 */ - uint32_t psx_brA_BFC32F6C = cpu->gpr[2]; uint32_t psx_brB_BFC32F6C = cpu->gpr[1]; - psx_taken_BFC32F6C = (psx_brA_BFC32F6C != psx_brB_BFC32F6C); - psx_delay_BFC32F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF70u); -#endif - if (psx_delay_BFC32F6C) { - psx_delay_BFC32F6C = 0; - if (psx_taken_BFC32F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF78u); - goto label_BFC32F78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF74u); - } -label_BFC32F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32F74: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AF74u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AF74u); -#endif -label_BFC32F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC32F78: 05410011 bgez $t2, 0xBFC32FC0 */ - uint32_t psx_brA_BFC32F78 = cpu->gpr[10]; - psx_taken_BFC32F78 = ((int32_t)psx_brA_BFC32F78 >= 0); - psx_delay_BFC32F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF7Cu); -#endif - if (psx_delay_BFC32F78) { - psx_delay_BFC32F78 = 0; - if (psx_taken_BFC32F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFC0u); - goto label_BFC32FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF80u); - } -label_BFC32F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32F80: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AF88u; /* jal link before delay slot */ - psx_delay_BFC32F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF84u); -#endif - if (psx_delay_BFC32F80) { - psx_delay_BFC32F80 = 0; - cpu->gpr[31] = 0x8004AF88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32F88: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004AF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32F8C: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC32F90: 00108023 subu $s0, $zero, $s0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[0] - cpu->gpr[16]; - PGXP_ALU(0x00108023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004AF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32F94: 16200002 bne $s1, $zero, 0xBFC32FA0 */ - uint32_t psx_brA_BFC32F94 = cpu->gpr[17]; uint32_t psx_brB_BFC32F94 = cpu->gpr[0]; - psx_taken_BFC32F94 = (psx_brA_BFC32F94 != psx_brB_BFC32F94); - psx_delay_BFC32F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32F98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AF98u); -#endif - if (psx_delay_BFC32F94) { - psx_delay_BFC32F94 = 0; - if (psx_taken_BFC32F94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFA0u); - goto label_BFC32FA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF9Cu); - } -label_BFC32F9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32F9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32F9C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AF9Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AF9Cu); -#endif -label_BFC32FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32FA0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32FA4: 16210004 bne $s1, $at, 0xBFC32FB8 */ - uint32_t psx_brA_BFC32FA4 = cpu->gpr[17]; uint32_t psx_brB_BFC32FA4 = cpu->gpr[1]; - psx_taken_BFC32FA4 = (psx_brA_BFC32FA4 != psx_brB_BFC32FA4); - psx_delay_BFC32FA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32FA8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AFA8u); -#endif - if (psx_delay_BFC32FA4) { - psx_delay_BFC32FA4 = 0; - if (psx_taken_BFC32FA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFB8u); - goto label_BFC32FB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFACu); - } -label_BFC32FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32FAC: 14410002 bne $v0, $at, 0xBFC32FB8 */ - uint32_t psx_brA_BFC32FAC = cpu->gpr[2]; uint32_t psx_brB_BFC32FAC = cpu->gpr[1]; - psx_taken_BFC32FAC = (psx_brA_BFC32FAC != psx_brB_BFC32FAC); - psx_delay_BFC32FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFB0u); -#endif - if (psx_delay_BFC32FAC) { - psx_delay_BFC32FAC = 0; - if (psx_taken_BFC32FAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFB8u); - goto label_BFC32FB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFB4u); - } -label_BFC32FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32FB4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AFB4u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AFB4u); -#endif -label_BFC32FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FB8: 1000000E beq $zero, $zero, 0xBFC32FF4 */ - uint32_t psx_brA_BFC32FB8 = cpu->gpr[0]; uint32_t psx_brB_BFC32FB8 = cpu->gpr[0]; - psx_taken_BFC32FB8 = (psx_brA_BFC32FB8 == psx_brB_BFC32FB8); - psx_delay_BFC32FB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFBCu); -#endif - if (psx_delay_BFC32FB8) { - psx_delay_BFC32FB8 = 0; - if (psx_taken_BFC32FB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFF4u); - goto label_BFC32FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFC0u); - } -label_BFC32FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32FC0: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AFC8u; /* jal link before delay slot */ - psx_delay_BFC32FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFC4u); -#endif - if (psx_delay_BFC32FC0) { - psx_delay_BFC32FC0 = 0; - cpu->gpr[31] = 0x8004AFC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC32FC8: 0051001A div $v0, $s1 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[17]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0051001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); -#ifdef PSX_COSIM - cosim_instr(0x8004AFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC32FCC: 00008010 mfhi $s0 */ - cpu->gpr[16] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00008010u, cpu->gpr[16], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC32FD0: 16200002 bne $s1, $zero, 0xBFC32FDC */ - uint32_t psx_brA_BFC32FD0 = cpu->gpr[17]; uint32_t psx_brB_BFC32FD0 = cpu->gpr[0]; - psx_taken_BFC32FD0 = (psx_brA_BFC32FD0 != psx_brB_BFC32FD0); - psx_delay_BFC32FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFD4u); -#endif - if (psx_delay_BFC32FD0) { - psx_delay_BFC32FD0 = 0; - if (psx_taken_BFC32FD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFDCu); - goto label_BFC32FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFD8u); - } -label_BFC32FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32FD8: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004AFD8u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AFD8u); -#endif -label_BFC32FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC32FDC: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004AFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC32FE0: 16210004 bne $s1, $at, 0xBFC32FF4 */ - uint32_t psx_brA_BFC32FE0 = cpu->gpr[17]; uint32_t psx_brB_BFC32FE0 = cpu->gpr[1]; - psx_taken_BFC32FE0 = (psx_brA_BFC32FE0 != psx_brB_BFC32FE0); - psx_delay_BFC32FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC32FE4: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004AFE4u); -#endif - if (psx_delay_BFC32FE0) { - psx_delay_BFC32FE0 = 0; - if (psx_taken_BFC32FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFF4u); - goto label_BFC32FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFE8u); - } -label_BFC32FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC32FE8: 14410002 bne $v0, $at, 0xBFC32FF4 */ - uint32_t psx_brA_BFC32FE8 = cpu->gpr[2]; uint32_t psx_brB_BFC32FE8 = cpu->gpr[1]; - psx_taken_BFC32FE8 = (psx_brA_BFC32FE8 != psx_brB_BFC32FE8); - psx_delay_BFC32FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFECu); -#endif - if (psx_delay_BFC32FE8) { - psx_delay_BFC32FE8 = 0; - if (psx_taken_BFC32FE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFF4u); - goto label_BFC32FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AFF0u); - } -label_BFC32FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC32FF0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004AFF0u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004AFF0u); -#endif -label_BFC32FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC32FF4: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004AFFCu; /* jal link before delay slot */ - psx_delay_BFC32FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC32FF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004AFF8u); -#endif - if (psx_delay_BFC32FF4) { - psx_delay_BFC32FF4 = 0; - cpu->gpr[31] = 0x8004AFFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC32FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC32FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC32FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004AFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC32FFC: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004AFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33000: 00005810 mfhi $t3 */ - cpu->gpr[11] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005810u, cpu->gpr[11], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC33004: 16400002 bne $s2, $zero, 0xBFC33010 */ - uint32_t psx_brA_BFC33004 = cpu->gpr[18]; uint32_t psx_brB_BFC33004 = cpu->gpr[0]; - psx_taken_BFC33004 = (psx_brA_BFC33004 != psx_brB_BFC33004); - psx_delay_BFC33004 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33008: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B008u); -#endif - if (psx_delay_BFC33004) { - psx_delay_BFC33004 = 0; - if (psx_taken_BFC33004) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B010u); - goto label_BFC33010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B00Cu); - } -label_BFC3300C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3300Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3300Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3300C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004B00Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B00Cu); -#endif -label_BFC33010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33010: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC33014: 16410004 bne $s2, $at, 0xBFC33028 */ - uint32_t psx_brA_BFC33014 = cpu->gpr[18]; uint32_t psx_brB_BFC33014 = cpu->gpr[1]; - psx_taken_BFC33014 = (psx_brA_BFC33014 != psx_brB_BFC33014); - psx_delay_BFC33014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC33018: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B018u); -#endif - if (psx_delay_BFC33014) { - psx_delay_BFC33014 = 0; - if (psx_taken_BFC33014) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B028u); - goto label_BFC33028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B01Cu); - } -label_BFC3301C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3301Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3301C: 14410002 bne $v0, $at, 0xBFC33028 */ - uint32_t psx_brA_BFC3301C = cpu->gpr[2]; uint32_t psx_brB_BFC3301C = cpu->gpr[1]; - psx_taken_BFC3301C = (psx_brA_BFC3301C != psx_brB_BFC3301C); - psx_delay_BFC3301C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B020u); -#endif - if (psx_delay_BFC3301C) { - psx_delay_BFC3301C = 0; - if (psx_taken_BFC3301C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B028u); - goto label_BFC33028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B024u); - } -label_BFC33024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33024: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004B024u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B024u); -#endif -label_BFC33028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33028: 05610011 bgez $t3, 0xBFC33070 */ - uint32_t psx_brA_BFC33028 = cpu->gpr[11]; - psx_taken_BFC33028 = ((int32_t)psx_brA_BFC33028 >= 0); - psx_delay_BFC33028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3302C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B02Cu); -#endif - if (psx_delay_BFC33028) { - psx_delay_BFC33028 = 0; - if (psx_taken_BFC33028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B070u); - goto label_BFC33070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B030u); - } -label_BFC33030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33030: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004B038u; /* jal link before delay slot */ - psx_delay_BFC33030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B034u); -#endif - if (psx_delay_BFC33030) { - psx_delay_BFC33030 = 0; - cpu->gpr[31] = 0x8004B038u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC33038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC33038: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004B038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3303C: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC33040: 00031823 subu $v1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00031823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC33044: 16400002 bne $s2, $zero, 0xBFC33050 */ - uint32_t psx_brA_BFC33044 = cpu->gpr[18]; uint32_t psx_brB_BFC33044 = cpu->gpr[0]; - psx_taken_BFC33044 = (psx_brA_BFC33044 != psx_brB_BFC33044); - psx_delay_BFC33044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B048u); -#endif - if (psx_delay_BFC33044) { - psx_delay_BFC33044 = 0; - if (psx_taken_BFC33044) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B050u); - goto label_BFC33050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B04Cu); - } -label_BFC3304C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3304Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3304Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3304C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004B04Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B04Cu); -#endif -label_BFC33050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33050: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC33054: 16410004 bne $s2, $at, 0xBFC33068 */ - uint32_t psx_brA_BFC33054 = cpu->gpr[18]; uint32_t psx_brB_BFC33054 = cpu->gpr[1]; - psx_taken_BFC33054 = (psx_brA_BFC33054 != psx_brB_BFC33054); - psx_delay_BFC33054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC33058: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B058u); -#endif - if (psx_delay_BFC33054) { - psx_delay_BFC33054 = 0; - if (psx_taken_BFC33054) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B068u); - goto label_BFC33068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B05Cu); - } -label_BFC3305C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3305Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3305Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3305C: 14410002 bne $v0, $at, 0xBFC33068 */ - uint32_t psx_brA_BFC3305C = cpu->gpr[2]; uint32_t psx_brB_BFC3305C = cpu->gpr[1]; - psx_taken_BFC3305C = (psx_brA_BFC3305C != psx_brB_BFC3305C); - psx_delay_BFC3305C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B060u); -#endif - if (psx_delay_BFC3305C) { - psx_delay_BFC3305C = 0; - if (psx_taken_BFC3305C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B068u); - goto label_BFC33068; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B064u); - } -label_BFC33064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33064: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004B064u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B064u); -#endif -label_BFC33068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33068: 1000000F beq $zero, $zero, 0xBFC330A8 */ - uint32_t psx_brA_BFC33068 = cpu->gpr[0]; uint32_t psx_brB_BFC33068 = cpu->gpr[0]; - psx_taken_BFC33068 = (psx_brA_BFC33068 == psx_brB_BFC33068); - psx_delay_BFC33068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC3306C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B06Cu); -#endif - if (psx_delay_BFC33068) { - psx_delay_BFC33068 = 0; - if (psx_taken_BFC33068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0A8u); - goto label_BFC330A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B070u); - } -label_BFC33070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33070: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004B078u; /* jal link before delay slot */ - psx_delay_BFC33070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B074u); -#endif - if (psx_delay_BFC33070) { - psx_delay_BFC33070 = 0; - cpu->gpr[31] = 0x8004B078u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC33078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC33078: 0052001A div $v0, $s2 */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[18]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0052001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004B078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3307C: 00001810 mfhi $v1 */ - cpu->gpr[3] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001810u, cpu->gpr[3], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC33080: 16400002 bne $s2, $zero, 0xBFC3308C */ - uint32_t psx_brA_BFC33080 = cpu->gpr[18]; uint32_t psx_brB_BFC33080 = cpu->gpr[0]; - psx_taken_BFC33080 = (psx_brA_BFC33080 != psx_brB_BFC33080); - psx_delay_BFC33080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B084u); -#endif - if (psx_delay_BFC33080) { - psx_delay_BFC33080 = 0; - if (psx_taken_BFC33080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B08Cu); - goto label_BFC3308C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B088u); - } -label_BFC33088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33088: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004B088u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B088u); -#endif -label_BFC3308C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3308Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3308C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC33090: 16410004 bne $s2, $at, 0xBFC330A4 */ - uint32_t psx_brA_BFC33090 = cpu->gpr[18]; uint32_t psx_brB_BFC33090 = cpu->gpr[1]; - psx_taken_BFC33090 = (psx_brA_BFC33090 != psx_brB_BFC33090); - psx_delay_BFC33090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC33094: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B094u); -#endif - if (psx_delay_BFC33090) { - psx_delay_BFC33090 = 0; - if (psx_taken_BFC33090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0A4u); - goto label_BFC330A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B098u); - } -label_BFC33098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC33098: 14410002 bne $v0, $at, 0xBFC330A4 */ - uint32_t psx_brA_BFC33098 = cpu->gpr[2]; uint32_t psx_brB_BFC33098 = cpu->gpr[1]; - psx_taken_BFC33098 = (psx_brA_BFC33098 != psx_brB_BFC33098); - psx_delay_BFC33098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3309C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B09Cu); -#endif - if (psx_delay_BFC33098) { - psx_delay_BFC33098 = 0; - if (psx_taken_BFC33098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0A4u); - goto label_BFC330A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0A0u); - } -label_BFC330A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC330A0: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004B0A0u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004B0A0u); -#endif -label_BFC330A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC330A4: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0A4u); -#endif -label_BFC330A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110020u); -#endif - /* 0xBFC330A8: 02142821 addu $a1, $s0, $s4 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[20]; - PGXP_ALU(0x02142821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200048u); -#endif - /* 0xBFC330AC: 00753021 addu $a2, $v1, $s5 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[21]; - PGXP_ALU(0x00753021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC330B0: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004B0B8u; /* jal link before delay slot */ - psx_delay_BFC330B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC330B4: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0B4u); -#endif - if (psx_delay_BFC330B0) { - psx_delay_BFC330B0 = 0; - cpu->gpr[31] = 0x8004B0B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC330B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC330B8: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880000u); -#endif - /* 0xBFC330BC: 1677FFA1 bne $s3, $s7, 0xBFC32F44 */ - uint32_t psx_brA_BFC330BC = cpu->gpr[19]; uint32_t psx_brB_BFC330BC = cpu->gpr[23]; - psx_taken_BFC330BC = (psx_brA_BFC330BC != psx_brB_BFC330BC); - psx_delay_BFC330BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC330C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B0C0u); -#endif - if (psx_delay_BFC330BC) { - psx_delay_BFC330BC = 0; - if (psx_taken_BFC330BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004AF44u); - goto label_BFC32F44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B0C4u); - } -label_BFC330C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0C4u); -#endif - /* 0xBFC330C4: 8FB00048 lw $s0, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0C4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00048u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0C4u); -#endif - /* 0xBFC330C8: 8FB10044 lw $s1, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0C8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10044u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0C8u); -#endif - /* 0xBFC330CC: 8FB20040 lw $s2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0CCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20040u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0D0u); -#endif - /* 0xBFC330D0: 8FB5003C lw $s5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0D0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5003Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC330D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B0D4u); -#endif -label_BFC330D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0D8u); -#endif - /* 0xBFC330D8: 8FA50094 lw $a1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0D8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50094u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC330DC: 0C01281E jal 0xB004A078 */ - cpu->gpr[31] = 0x8004B0E4u; /* jal link before delay slot */ - psx_delay_BFC330DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC330E0: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0E0u); -#endif - if (psx_delay_BFC330DC) { - psx_delay_BFC330DC = 0; - cpu->gpr[31] = 0x8004B0E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A078u); - cpu->pc = 0x8004A078u; return; - } -label_BFC330E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0E4u); -#endif - /* 0xBFC330E4: 8FA40094 lw $a0, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B0E4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40094u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC330E8: 0C012810 jal 0xB004A040 */ - cpu->gpr[31] = 0x8004B0F0u; /* jal link before delay slot */ - psx_delay_BFC330E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC330EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B0ECu); -#endif - if (psx_delay_BFC330E8) { - psx_delay_BFC330E8 = 0; - cpu->gpr[31] = 0x8004B0F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A040u); - cpu->pc = 0x8004A040u; return; - } -label_BFC330F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC330F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC330F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC330F0: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC330F4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC330F8: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC330FC: 0C0129C9 jal 0xB004A724 */ - cpu->gpr[31] = 0x8004B104u; /* jal link before delay slot */ - psx_delay_BFC330FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC33100: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B100u); -#endif - if (psx_delay_BFC330FC) { - psx_delay_BFC330FC = 0; - cpu->gpr[31] = 0x8004B104u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A724u); - cpu->pc = 0x8004A724u; return; - } -label_BFC33104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B104u); -#endif - /* 0xBFC33104: 8FA50094 lw $a1, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B104u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50094u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC33108: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3310C: 0C01282D jal 0xB004A0B4 */ - cpu->gpr[31] = 0x8004B114u; /* jal link before delay slot */ - psx_delay_BFC3310C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC33110: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B110u); -#endif - if (psx_delay_BFC3310C) { - psx_delay_BFC3310C = 0; - cpu->gpr[31] = 0x8004B114u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A0B4u); - cpu->pc = 0x8004A0B4u; return; - } -label_BFC33114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33114: 0C012D00 jal 0xB004B400 */ - cpu->gpr[31] = 0x8004B11Cu; /* jal link before delay slot */ - psx_delay_BFC33114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC33118: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B118u); -#endif - if (psx_delay_BFC33114) { - psx_delay_BFC33114 = 0; - cpu->gpr[31] = 0x8004B11Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B400u); - cpu->pc = 0x8004B400u; return; - } -label_BFC3311C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3311Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B11Cu); -#endif - /* 0xBFC3311C: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B11Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B120u); -#endif - /* 0xBFC33120: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B120u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B120u); -#endif - /* 0xBFC33124: 8FB40028 lw $s4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B124u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40028u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B124u); -#endif - /* 0xBFC33128: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B128u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B128u); -#endif - /* 0xBFC3312C: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B12Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33130: 03E00008 jr $ra */ - psx_delay_BFC33130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33134: 27BD0090 addiu $sp, $sp, 144 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (144)); - PGXP_ALU(0x27BD0090u, cpu->gpr[29], _pgx1, 0x00000090u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B134u); -#endif - if (psx_delay_BFC33130) { - psx_delay_BFC33130 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33138(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33138u); - int psx_delay_BFC33140 = 0; - int psx_delay_BFC33194 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33148u: goto label_BFC33148; - default: break; - } - } -label_BFC33138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33138: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3313C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B13Cu); return; } g_debug_last_store_pc = 0x8004B13Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33140: 0C016A3C jal 0xB005A8F0 */ - cpu->gpr[31] = 0x8004B148u; /* jal link before delay slot */ - psx_delay_BFC33140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC33144: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B144u); return; } g_debug_last_store_pc = 0x8004B144u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B144u); -#endif - if (psx_delay_BFC33140) { - psx_delay_BFC33140 = 0; - cpu->gpr[31] = 0x8004B148u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8F0u); - cpu->pc = 0x8005A8F0u; return; - } -label_BFC33148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33148: 24010006 addiu $at, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24010006u, cpu->gpr[1], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3314C: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8004B14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC33150: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC33154: 27188390 addiu $t8, $t8, -31856 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-31856)); - PGXP_ALU(0x27188390u, cpu->gpr[24], _pgx1, 0xFFFF8390u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B154u); -#endif - /* 0xBFC33158: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B158u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3315C: 00007010 mfhi $t6 */ - cpu->gpr[14] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007010u, cpu->gpr[14], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC33160: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC33164: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B164u); -#endif - /* 0xBFC33168: 90790000 lbu $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 25, 0x8u); - PGXP_LOAD(0x90790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3316C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC33170: A0990000 sb $t9, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B170u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B170u); -#endif - /* 0xBFC33174: 90680001 lbu $t0, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 8, 0x8u); - PGXP_LOAD(0x90680001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33178: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC3317C: A0880001 sb $t0, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B17Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (1)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0880001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B180u); -#endif - /* 0xBFC33180: 90690002 lbu $t1, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (2)), 9, 0x8u); - PGXP_LOAD(0x90690002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC33188: A0890002 sb $t1, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B188u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0890002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B188u); -#endif - /* 0xBFC3318C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B18Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33190: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33194: 03E00008 jr $ra */ - psx_delay_BFC33194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33198: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B198u); -#endif - if (psx_delay_BFC33194) { - psx_delay_BFC33194 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC331A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC331A0u); - int psx_delay_BFC331E0 = 0; - int psx_taken_BFC331E0 = 0; - int psx_delay_BFC331E8 = 0; - int psx_taken_BFC331E8 = 0; - int psx_delay_BFC33200 = 0; - int psx_taken_BFC33200 = 0; - int psx_delay_BFC33208 = 0; - int psx_taken_BFC33208 = 0; - int psx_delay_BFC33218 = 0; - int psx_taken_BFC33218 = 0; - int psx_delay_BFC33220 = 0; - int psx_taken_BFC33220 = 0; - int psx_delay_BFC33230 = 0; - int psx_taken_BFC33230 = 0; - int psx_delay_BFC33238 = 0; - int psx_taken_BFC33238 = 0; - int psx_delay_BFC33248 = 0; - int psx_taken_BFC33248 = 0; - int psx_delay_BFC33254 = 0; - int psx_taken_BFC33254 = 0; - int psx_delay_BFC33274 = 0; - int psx_delay_BFC33284 = 0; - int psx_taken_BFC33284 = 0; - int psx_delay_BFC332AC = 0; - int psx_taken_BFC332AC = 0; - int psx_delay_BFC332B8 = 0; - int psx_taken_BFC332B8 = 0; - int psx_delay_BFC332C4 = 0; - int psx_taken_BFC332C4 = 0; - int psx_delay_BFC332E4 = 0; - int psx_delay_BFC332F4 = 0; - int psx_taken_BFC332F4 = 0; - int psx_delay_BFC3331C = 0; - int psx_taken_BFC3331C = 0; - int psx_delay_BFC33350 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC331E8u: goto label_BFC331E8; - case 0xBFC331F0u: goto label_BFC331F0; - case 0xBFC331F4u: goto label_BFC331F4; - case 0xBFC33208u: goto label_BFC33208; - case 0xBFC33210u: goto label_BFC33210; - case 0xBFC33214u: goto label_BFC33214; - case 0xBFC33220u: goto label_BFC33220; - case 0xBFC33228u: goto label_BFC33228; - case 0xBFC3322Cu: goto label_BFC3322C; - case 0xBFC33238u: goto label_BFC33238; - case 0xBFC33240u: goto label_BFC33240; - case 0xBFC33244u: goto label_BFC33244; - case 0xBFC33250u: goto label_BFC33250; - case 0xBFC3325Cu: goto label_BFC3325C; - case 0xBFC33268u: goto label_BFC33268; - case 0xBFC3327Cu: goto label_BFC3327C; - case 0xBFC3328Cu: goto label_BFC3328C; - case 0xBFC3329Cu: goto label_BFC3329C; - case 0xBFC332B4u: goto label_BFC332B4; - case 0xBFC332C0u: goto label_BFC332C0; - case 0xBFC332C4u: goto label_BFC332C4; - case 0xBFC332CCu: goto label_BFC332CC; - case 0xBFC332D8u: goto label_BFC332D8; - case 0xBFC332ECu: goto label_BFC332EC; - case 0xBFC332FCu: goto label_BFC332FC; - case 0xBFC3330Cu: goto label_BFC3330C; - case 0xBFC33324u: goto label_BFC33324; - case 0xBFC3332Cu: goto label_BFC3332C; - case 0xBFC33330u: goto label_BFC33330; - default: break; - } - } -label_BFC331A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC331A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC331A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC331A0: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC331A4: AFB50024 sw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1A4u); return; } g_debug_last_store_pc = 0x8004B1A4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC331A8: AFB60028 sw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1A8u); return; } g_debug_last_store_pc = 0x8004B1A8u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC331AC: AFBE0030 sw $fp, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1ACu); return; } g_debug_last_store_pc = 0x8004B1ACu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0030u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC331B0: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1B0u); return; } g_debug_last_store_pc = 0x8004B1B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200020u); -#endif - /* 0xBFC331B4: 0005AC00 sll $s5, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[21] = cpu->gpr[5] << 16u; - PGXP_ALU(0x0005AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC331B8: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC331BC: AFB7002C sw $s7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1BCu); return; } g_debug_last_store_pc = 0x8004B1BCu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7002Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC331C0: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC331C4: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC331C8: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1C8u); return; } g_debug_last_store_pc = 0x8004B1C8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400040u); -#endif - /* 0xBFC331CC: 0006B400 sll $s6, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[22] = cpu->gpr[6] << 16u; - PGXP_ALU(0x0006B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200082u); -#endif - /* 0xBFC331D0: 02A7082A slt $at, $s5, $a3 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x02A7082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC331D4: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1D4u); return; } g_debug_last_store_pc = 0x8004B1D4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC331D8: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1D8u); return; } g_debug_last_store_pc = 0x8004B1D8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC331DC: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC331E0: 10200003 beq $at, $zero, 0xBFC331F0 */ - uint32_t psx_brA_BFC331E0 = cpu->gpr[1]; uint32_t psx_brB_BFC331E0 = cpu->gpr[0]; - psx_taken_BFC331E0 = (psx_brA_BFC331E0 == psx_brB_BFC331E0); - psx_delay_BFC331E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC331E4: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1E4u); return; } g_debug_last_store_pc = 0x8004B1E4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1E4u); -#endif - if (psx_delay_BFC331E0) { - psx_delay_BFC331E0 = 0; - if (psx_taken_BFC331E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B1F0u); - goto label_BFC331F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B1E8u); - } -label_BFC331E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC331E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC331E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC331E8: 10000002 beq $zero, $zero, 0xBFC331F4 */ - uint32_t psx_brA_BFC331E8 = cpu->gpr[0]; uint32_t psx_brB_BFC331E8 = cpu->gpr[0]; - psx_taken_BFC331E8 = (psx_brA_BFC331E8 == psx_brB_BFC331E8); - psx_delay_BFC331E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC331EC: 241E0001 addiu $fp, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x241E0001u, cpu->gpr[30], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1ECu); -#endif - if (psx_delay_BFC331E8) { - psx_delay_BFC331E8 = 0; - if (psx_taken_BFC331E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B1F4u); - goto label_BFC331F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B1F0u); - } -label_BFC331F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC331F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC331F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000001u); -#endif - /* 0xBFC331F0: 241EFFFF addiu $fp, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x241EFFFFu, cpu->gpr[30], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1F0u); -#endif -label_BFC331F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC331F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC331F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B1F4u); -#endif - /* 0xBFC331F4: 87A30068 lh $v1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B1F4u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30068u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC331F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000Au); -#endif - /* 0xBFC331FC: 02C3082A slt $at, $s6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[22] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x02C3082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33200: 10200004 beq $at, $zero, 0xBFC33214 */ - uint32_t psx_brA_BFC33200 = cpu->gpr[1]; uint32_t psx_brB_BFC33200 = cpu->gpr[0]; - psx_taken_BFC33200 = (psx_brA_BFC33200 == psx_brB_BFC33200); - psx_delay_BFC33200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC33204: 2417FFFF addiu $s7, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2417FFFFu, cpu->gpr[23], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B204u); -#endif - if (psx_delay_BFC33200) { - psx_delay_BFC33200 = 0; - if (psx_taken_BFC33200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B214u); - goto label_BFC33214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B208u); - } -label_BFC33208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33208: 10000002 beq $zero, $zero, 0xBFC33214 */ - uint32_t psx_brA_BFC33208 = cpu->gpr[0]; uint32_t psx_brB_BFC33208 = cpu->gpr[0]; - psx_taken_BFC33208 = (psx_brA_BFC33208 == psx_brB_BFC33208); - psx_delay_BFC33208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC3320C: 24170001 addiu $s7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24170001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B20Cu); -#endif - if (psx_delay_BFC33208) { - psx_delay_BFC33208 = 0; - if (psx_taken_BFC33208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B214u); - goto label_BFC33214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B210u); - } -label_BFC33210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC33210: 2417FFFF addiu $s7, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2417FFFFu, cpu->gpr[23], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B210u); -#endif -label_BFC33214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200084u); -#endif - /* 0xBFC33214: 00F51023 subu $v0, $a3, $s5 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = cpu->gpr[7] - cpu->gpr[21]; - PGXP_ALU(0x00F51023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC33218: 04410004 bgez $v0, 0xBFC3322C */ - uint32_t psx_brA_BFC33218 = cpu->gpr[2]; - psx_taken_BFC33218 = ((int32_t)psx_brA_BFC33218 >= 0); - psx_delay_BFC33218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC3321C: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B21Cu); -#endif - if (psx_delay_BFC33218) { - psx_delay_BFC33218 = 0; - if (psx_taken_BFC33218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B22Cu); - goto label_BFC3322C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B220u); - } -label_BFC33220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33220: 10000002 beq $zero, $zero, 0xBFC3322C */ - uint32_t psx_brA_BFC33220 = cpu->gpr[0]; uint32_t psx_brB_BFC33220 = cpu->gpr[0]; - psx_taken_BFC33220 = (psx_brA_BFC33220 == psx_brB_BFC33220); - psx_delay_BFC33220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC33224: 00029823 subu $s3, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[19] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00029823u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B224u); -#endif - if (psx_delay_BFC33220) { - psx_delay_BFC33220 = 0; - if (psx_taken_BFC33220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B22Cu); - goto label_BFC3322C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B228u); - } -label_BFC33228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC33228: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B228u); -#endif -label_BFC3322C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3322Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000Cu); -#endif - /* 0xBFC3322C: 00761023 subu $v0, $v1, $s6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[22]; - PGXP_ALU(0x00761023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC33230: 04410004 bgez $v0, 0xBFC33244 */ - uint32_t psx_brA_BFC33230 = cpu->gpr[2]; - psx_taken_BFC33230 = ((int32_t)psx_brA_BFC33230 >= 0); - psx_delay_BFC33230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC33234: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B234u); -#endif - if (psx_delay_BFC33230) { - psx_delay_BFC33230 = 0; - if (psx_taken_BFC33230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B244u); - goto label_BFC33244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B238u); - } -label_BFC33238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33238: 10000002 beq $zero, $zero, 0xBFC33244 */ - uint32_t psx_brA_BFC33238 = cpu->gpr[0]; uint32_t psx_brB_BFC33238 = cpu->gpr[0]; - psx_taken_BFC33238 = (psx_brA_BFC33238 == psx_brB_BFC33238); - psx_delay_BFC33238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC3323C: 00029023 subu $s2, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00029023u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B23Cu); -#endif - if (psx_delay_BFC33238) { - psx_delay_BFC33238 = 0; - if (psx_taken_BFC33238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B244u); - goto label_BFC33244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B240u); - } -label_BFC33240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC33240: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B240u); -#endif -label_BFC33244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0002u); -#endif - /* 0xBFC33244: 0253082A slt $at, $s2, $s3 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0253082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33248: 1020001E beq $at, $zero, 0xBFC332C4 */ - uint32_t psx_brA_BFC33248 = cpu->gpr[1]; uint32_t psx_brB_BFC33248 = cpu->gpr[0]; - psx_taken_BFC33248 = (psx_brA_BFC33248 == psx_brB_BFC33248); - psx_delay_BFC33248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC3324C: 00128043 sra $s0, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[18] >> 1u); - PGXP_ALU(0x00128043u, cpu->gpr[16], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B24Cu); -#endif - if (psx_delay_BFC33248) { - psx_delay_BFC33248 = 0; - if (psx_taken_BFC33248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2C4u); - goto label_BFC332C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B250u); - } -label_BFC33250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC33250: 00138043 sra $s0, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[19] >> 1u); - PGXP_ALU(0x00138043u, cpu->gpr[16], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC33254: 06600035 bltz $s3, 0xBFC3332C */ - uint32_t psx_brA_BFC33254 = cpu->gpr[19]; - psx_taken_BFC33254 = ((int32_t)psx_brA_BFC33254 < 0); - psx_delay_BFC33254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC33258: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B258u); -#endif - if (psx_delay_BFC33254) { - psx_delay_BFC33254 = 0; - if (psx_taken_BFC33254) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B32Cu); - goto label_BFC3332C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B25Cu); - } -label_BFC3325C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3325Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3325C: AFB40038 sw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B25Cu); return; } g_debug_last_store_pc = 0x8004B25Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B260u); -#endif - /* 0xBFC33260: 8FB4006C lw $s4, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B260u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4006Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC33264: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B264u); return; } g_debug_last_store_pc = 0x8004B264u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B264u); -#endif -label_BFC33268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B268u); -#endif - /* 0xBFC33268: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B268u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC3326C: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC33270: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33274: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004B27Cu; /* jal link before delay slot */ - psx_delay_BFC33274 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC33278: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B278u); -#endif - if (psx_delay_BFC33274) { - psx_delay_BFC33274 = 0; - cpu->gpr[31] = 0x8004B27Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC3327C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3327Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC3327C: 02128021 addu $s0, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[18]; - PGXP_ALU(0x02128021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90002u); -#endif - /* 0xBFC33280: 0270082A slt $at, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0270082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33284: 10200005 beq $at, $zero, 0xBFC3329C */ - uint32_t psx_brA_BFC33284 = cpu->gpr[1]; uint32_t psx_brB_BFC33284 = cpu->gpr[0]; - psx_taken_BFC33284 = (psx_brA_BFC33284 == psx_brB_BFC33284); - psx_delay_BFC33284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33288: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B288u); -#endif - if (psx_delay_BFC33284) { - psx_delay_BFC33284 = 0; - if (psx_taken_BFC33284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B29Cu); - goto label_BFC3329C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B28Cu); - } -label_BFC3328C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3328Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3328Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00000u); -#endif - /* 0xBFC3328C: 02D7B021 addu $s6, $s6, $s7 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[23]; - PGXP_ALU(0x02D7B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC33290: 0016B400 sll $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 16u; - PGXP_ALU(0x0016B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC33294: 02138023 subu $s0, $s0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[19]; - PGXP_ALU(0x02138023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC33298: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B298u); -#endif -label_BFC3329C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3329Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3329Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200000u); -#endif - /* 0xBFC3329C: 02BEA821 addu $s5, $s5, $fp */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[21] = cpu->gpr[21] + cpu->gpr[30]; - PGXP_ALU(0x02BEA821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC332A0: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC332A4: 0015AC00 sll $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] << 16u; - PGXP_ALU(0x0015AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0002u); -#endif - /* 0xBFC332A8: 0271082A slt $at, $s3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0271082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC332AC: 1020FFEE beq $at, $zero, 0xBFC33268 */ - uint32_t psx_brA_BFC332AC = cpu->gpr[1]; uint32_t psx_brB_BFC332AC = cpu->gpr[0]; - psx_taken_BFC332AC = (psx_brA_BFC332AC == psx_brB_BFC332AC); - psx_delay_BFC332AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC332B0: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2B0u); -#endif - if (psx_delay_BFC332AC) { - psx_delay_BFC332AC = 0; - if (psx_taken_BFC332AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B268u); - goto label_BFC33268; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2B4u); - } -label_BFC332B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2B4u); -#endif - /* 0xBFC332B4: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2B4u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC332B8: 1000001D beq $zero, $zero, 0xBFC33330 */ - uint32_t psx_brA_BFC332B8 = cpu->gpr[0]; uint32_t psx_brB_BFC332B8 = cpu->gpr[0]; - psx_taken_BFC332B8 = (psx_brA_BFC332B8 == psx_brB_BFC332B8); - psx_delay_BFC332B8 = 1; - /* 0xBFC332BC: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2BCu); -#endif - if (psx_delay_BFC332B8) { - psx_delay_BFC332B8 = 0; - if (psx_taken_BFC332B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B330u); - goto label_BFC33330; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2C0u); - } -label_BFC332C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC332C0: 00128043 sra $s0, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[18] >> 1u); - PGXP_ALU(0x00128043u, cpu->gpr[16], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2C0u); -#endif -label_BFC332C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC332C4: 06400019 bltz $s2, 0xBFC3332C */ - uint32_t psx_brA_BFC332C4 = cpu->gpr[18]; - psx_taken_BFC332C4 = ((int32_t)psx_brA_BFC332C4 < 0); - psx_delay_BFC332C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC332C8: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2C8u); -#endif - if (psx_delay_BFC332C4) { - psx_delay_BFC332C4 = 0; - if (psx_taken_BFC332C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B32Cu); - goto label_BFC3332C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2CCu); - } -label_BFC332CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC332CC: AFB40038 sw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2CCu); return; } g_debug_last_store_pc = 0x8004B2CCu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2D0u); -#endif - /* 0xBFC332D0: 8FB4006C lw $s4, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2D0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4006Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC332D4: AFA40058 sw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2D4u); return; } g_debug_last_store_pc = 0x8004B2D4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2D4u); -#endif -label_BFC332D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2D8u); -#endif - /* 0xBFC332D8: 8FA40058 lw $a0, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B2D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40058u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200021u); -#endif - /* 0xBFC332DC: 02A02821 addu $a1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400041u); -#endif - /* 0xBFC332E0: 02C03021 addu $a2, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC332E4: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004B2ECu; /* jal link before delay slot */ - psx_delay_BFC332E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100081u); -#endif - /* 0xBFC332E8: 02803821 addu $a3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2E8u); -#endif - if (psx_delay_BFC332E4) { - psx_delay_BFC332E4 = 0; - cpu->gpr[31] = 0x8004B2ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC332EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90000u); -#endif - /* 0xBFC332EC: 02138021 addu $s0, $s0, $s3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[19]; - PGXP_ALU(0x02138021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC332F0: 0250082A slt $at, $s2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[16] ? 1 : 0); - PGXP_ALU(0x0250082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC332F4: 10200005 beq $at, $zero, 0xBFC3330C */ - uint32_t psx_brA_BFC332F4 = cpu->gpr[1]; uint32_t psx_brB_BFC332F4 = cpu->gpr[0]; - psx_taken_BFC332F4 = (psx_brA_BFC332F4 == psx_brB_BFC332F4); - psx_delay_BFC332F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC332F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B2F8u); -#endif - if (psx_delay_BFC332F4) { - psx_delay_BFC332F4 = 0; - if (psx_taken_BFC332F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B30Cu); - goto label_BFC3330C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2FCu); - } -label_BFC332FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC332FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC332FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40200000u); -#endif - /* 0xBFC332FC: 02BEA821 addu $s5, $s5, $fp */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[21] = cpu->gpr[21] + cpu->gpr[30]; - PGXP_ALU(0x02BEA821u, cpu->gpr[21], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC33300: 0015AC00 sll $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] << 16u; - PGXP_ALU(0x0015AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50000u); -#endif - /* 0xBFC33304: 02128023 subu $s0, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[18]; - PGXP_ALU(0x02128023u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC33308: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B308u); -#endif -label_BFC3330C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3330Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00000u); -#endif - /* 0xBFC3330C: 02D7B021 addu $s6, $s6, $s7 */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[23]; - PGXP_ALU(0x02D7B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC33310: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC33314: 0016B400 sll $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] << 16u; - PGXP_ALU(0x0016B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60002u); -#endif - /* 0xBFC33318: 0251082A slt $at, $s2, $s1 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0251082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3331C: 1020FFEE beq $at, $zero, 0xBFC332D8 */ - uint32_t psx_brA_BFC3331C = cpu->gpr[1]; uint32_t psx_brB_BFC3331C = cpu->gpr[0]; - psx_taken_BFC3331C = (psx_brA_BFC3331C == psx_brB_BFC3331C); - psx_delay_BFC3331C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC33320: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B320u); -#endif - if (psx_delay_BFC3331C) { - psx_delay_BFC3331C = 0; - if (psx_taken_BFC3331C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B2D8u); - goto label_BFC332D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B324u); - } -label_BFC33324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B324u); -#endif - /* 0xBFC33324: 8FB40038 lw $s4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B324u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40038u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33328: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B328u); -#endif -label_BFC3332C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3332Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B32Cu); -#endif - /* 0xBFC3332C: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B32Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B32Cu); -#endif -label_BFC33330: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33330u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B330u); -#endif - /* 0xBFC33330: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B330u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B330u); -#endif - /* 0xBFC33334: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B334u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B334u); -#endif - /* 0xBFC33338: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B338u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B338u); -#endif - /* 0xBFC3333C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B33Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B340u); -#endif - /* 0xBFC33340: 8FB50024 lw $s5, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B340u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50024u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B340u); -#endif - /* 0xBFC33344: 8FB60028 lw $s6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B344u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60028u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B344u); -#endif - /* 0xBFC33348: 8FB7002C lw $s7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B348u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7002Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B348u); -#endif - /* 0xBFC3334C: 8FBE0030 lw $fp, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B34Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0030u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33350: 03E00008 jr $ra */ - psx_delay_BFC33350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33354: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B354u); -#endif - if (psx_delay_BFC33350) { - psx_delay_BFC33350 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33358(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33358u); - int psx_delay_BFC33390 = 0; - int psx_taken_BFC33390 = 0; - int psx_delay_BFC333B4 = 0; - int psx_delay_BFC333D8 = 0; - int psx_taken_BFC333D8 = 0; - int psx_delay_BFC333F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33398u: goto label_BFC33398; - case 0xBFC333BCu: goto label_BFC333BC; - case 0xBFC333E0u: goto label_BFC333E0; - default: break; - } - } -label_BFC33358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33358: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3335C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B35Cu); return; } g_debug_last_store_pc = 0x8004B35Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC33360: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC33364: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B364u); return; } g_debug_last_store_pc = 0x8004B364u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC33368: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B368u); return; } g_debug_last_store_pc = 0x8004B368u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3336C: AFB20024 sw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B36Cu); return; } g_debug_last_store_pc = 0x8004B36Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC33370: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B370u); return; } g_debug_last_store_pc = 0x8004B370u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B370u); -#endif - /* 0xBFC33374: 86220002 lh $v0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B374u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x86220002u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B374u); -#endif - /* 0xBFC33378: 862E0006 lh $t6, 6($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B378u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000u); } - PGXP_LOAD(0x862E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC3337C: 00028400 sll $s0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00028400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC33380: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC33384: 004E7821 addu $t7, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18002u); -#endif - /* 0xBFC33388: 020F082A slt $at, $s0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x020F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC3338C: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33390: 10200013 beq $at, $zero, 0xBFC333E0 */ - uint32_t psx_brA_BFC33390 = cpu->gpr[1]; uint32_t psx_brB_BFC33390 = cpu->gpr[0]; - psx_taken_BFC33390 = (psx_brA_BFC33390 == psx_brB_BFC33390); - psx_delay_BFC33390 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80041u); -#endif - /* 0xBFC33394: 00C09821 addu $s3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C09821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B394u); -#endif - if (psx_delay_BFC33390) { - psx_delay_BFC33390 = 0; - if (psx_taken_BFC33390) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B3E0u); - goto label_BFC333E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B398u); - } -label_BFC33398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B398u); -#endif - /* 0xBFC33398: 86250000 lh $a1, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B398u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000u); } - PGXP_LOAD(0x86250000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B398u); -#endif - /* 0xBFC3339C: 86380004 lh $t8, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B39Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000u); } - PGXP_LOAD(0x86380004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC333A0: AFB30014 sw $s3, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3A0u); return; } g_debug_last_store_pc = 0x8004B3A0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30014u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000A0u); -#endif - /* 0xBFC333A4: 00B83821 addu $a3, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B83821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC333A8: 24E7FFFF addiu $a3, $a3, -1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-1)); - PGXP_ALU(0x24E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC333AC: AFB00010 sw $s0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3ACu); return; } g_debug_last_store_pc = 0x8004B3ACu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC333B0: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC333B4: 0C012C68 jal 0xB004B1A0 */ - cpu->gpr[31] = 0x8004B3BCu; /* jal link before delay slot */ - psx_delay_BFC333B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10041u); -#endif - /* 0xBFC333B8: 02003021 addu $a2, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3B8u); -#endif - if (psx_delay_BFC333B4) { - psx_delay_BFC333B4 = 0; - cpu->gpr[31] = 0x8004B3BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B1A0u); - cpu->pc = 0x8004B1A0u; return; - } -label_BFC333BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC333BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC333BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3BCu); -#endif - /* 0xBFC333BC: 86390002 lh $t9, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3BCu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x86390002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3C0u); -#endif - /* 0xBFC333C0: 86280006 lh $t0, 6($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3C0u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000u); } - PGXP_LOAD(0x86280006u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC333C4: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC333C8: 00108400 sll $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 16u; - PGXP_ALU(0x00108400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC333CC: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC333D0: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10202u); -#endif - /* 0xBFC333D4: 0209082A slt $at, $s0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0209082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC333D8: 1420FFEF bne $at, $zero, 0xBFC33398 */ - uint32_t psx_brA_BFC333D8 = cpu->gpr[1]; uint32_t psx_brB_BFC333D8 = cpu->gpr[0]; - psx_taken_BFC333D8 = (psx_brA_BFC333D8 != psx_brB_BFC333D8); - psx_delay_BFC333D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC333DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B3DCu); -#endif - if (psx_delay_BFC333D8) { - psx_delay_BFC333D8 = 0; - if (psx_taken_BFC333D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B398u); - goto label_BFC33398; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B3E0u); - } -label_BFC333E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC333E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC333E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3E0u); -#endif - /* 0xBFC333E0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3E0u); -#endif - /* 0xBFC333E4: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3E4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3E4u); -#endif - /* 0xBFC333E8: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3E8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3E8u); -#endif - /* 0xBFC333EC: 8FB20024 lw $s2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3ECu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20024u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B3F0u); -#endif - /* 0xBFC333F0: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B3F0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC333F4: 03E00008 jr $ra */ - psx_delay_BFC333F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC333F8: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B3F8u); -#endif - if (psx_delay_BFC333F4) { - psx_delay_BFC333F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33400(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33400u); - int psx_delay_BFC33430 = 0; - int psx_taken_BFC33430 = 0; - int psx_delay_BFC33460 = 0; - int psx_taken_BFC33460 = 0; - int psx_delay_BFC33484 = 0; - int psx_delay_BFC33494 = 0; - int psx_taken_BFC33494 = 0; - int psx_delay_BFC334A4 = 0; - int psx_taken_BFC334A4 = 0; - int psx_delay_BFC334B4 = 0; - int psx_delay_BFC334BC = 0; - int psx_taken_BFC334BC = 0; - int psx_delay_BFC334C4 = 0; - int psx_taken_BFC334C4 = 0; - int psx_delay_BFC334D8 = 0; - int psx_delay_BFC334E8 = 0; - int psx_taken_BFC334E8 = 0; - int psx_delay_BFC334FC = 0; - int psx_taken_BFC334FC = 0; - int psx_delay_BFC33530 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33438u: goto label_BFC33438; - case 0xBFC33460u: goto label_BFC33460; - case 0xBFC33468u: goto label_BFC33468; - case 0xBFC33478u: goto label_BFC33478; - case 0xBFC3347Cu: goto label_BFC3347C; - case 0xBFC3348Cu: goto label_BFC3348C; - case 0xBFC3349Cu: goto label_BFC3349C; - case 0xBFC334ACu: goto label_BFC334AC; - case 0xBFC334BCu: goto label_BFC334BC; - case 0xBFC334C4u: goto label_BFC334C4; - case 0xBFC334CCu: goto label_BFC334CC; - case 0xBFC334D0u: goto label_BFC334D0; - case 0xBFC334E0u: goto label_BFC334E0; - case 0xBFC334F0u: goto label_BFC334F0; - case 0xBFC33504u: goto label_BFC33504; - case 0xBFC33528u: goto label_BFC33528; - default: break; - } - } -label_BFC33400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33400: 27BDFF68 addiu $sp, $sp, -152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-152)); - PGXP_ALU(0x27BDFF68u, cpu->gpr[29], _pgx1, 0xFFFFFF68u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC33404: AFB6001C sw $s6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B404u); return; } g_debug_last_store_pc = 0x8004B404u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6001Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC33408: 0080B021 addu $s6, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x0080B021u, cpu->gpr[22], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3340C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B40Cu); return; } g_debug_last_store_pc = 0x8004B40Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC33410: AFB70020 sw $s7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B410u); return; } g_debug_last_store_pc = 0x8004B410u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70020u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B410u); -#endif - /* 0xBFC33414: 86C20002 lh $v0, 2($s6) */ - { uint32_t _pgxa = cpu->gpr[22] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B414u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x400000u); } - PGXP_LOAD(0x86C20002u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B414u); -#endif - /* 0xBFC33418: 86C30000 lh $v1, 0($s6) */ - { uint32_t _pgxa = cpu->gpr[22]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004B418u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x400000u); } - PGXP_LOAD(0x86C30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3341C: 244EFFFF addiu $t6, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x244EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC33420: AFAE0050 sw $t6, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B420u); return; } g_debug_last_store_pc = 0x8004B420u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0050u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B420u); -#endif - /* 0xBFC33424: 8FAF0050 lw $t7, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B424u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0050u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC33428: 24170001 addiu $s7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24170001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3342C: 29E10002 slti $at, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (2) ? 1 : 0); - PGXP_ALU(0x29E10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33430: 1420003D bne $at, $zero, 0xBFC33528 */ - uint32_t psx_brA_BFC33430 = cpu->gpr[1]; uint32_t psx_brB_BFC33430 = cpu->gpr[0]; - psx_taken_BFC33430 = (psx_brA_BFC33430 != psx_brB_BFC33430); - psx_delay_BFC33430 = 1; - /* 0xBFC33434: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B434u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B434u); -#endif - if (psx_delay_BFC33430) { - psx_delay_BFC33430 = 0; - if (psx_taken_BFC33430) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B528u); - goto label_BFC33528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B438u); - } -label_BFC33438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC33438: AFB5002C sw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B438u); return; } g_debug_last_store_pc = 0x8004B438u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC3343C: AFBE0028 sw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B43Cu); return; } g_debug_last_store_pc = 0x8004B43Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC33440: AFB00040 sw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B440u); return; } g_debug_last_store_pc = 0x8004B440u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC33444: AFB1003C sw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B444u); return; } g_debug_last_store_pc = 0x8004B444u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC33448: AFB20038 sw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B448u); return; } g_debug_last_store_pc = 0x8004B448u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3344C: AFB30034 sw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B44Cu); return; } g_debug_last_store_pc = 0x8004B44Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000008u); -#endif - /* 0xBFC33450: 247EFFFF addiu $fp, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x247EFFFFu, cpu->gpr[30], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200001u); -#endif - /* 0xBFC33454: 24150002 addiu $s5, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24150002u, cpu->gpr[21], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC33458: AFB40030 sw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B458u); return; } g_debug_last_store_pc = 0x8004B458u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000002u); -#endif - /* 0xBFC3345C: 2BC10002 slti $at, $fp, 2 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0); - PGXP_ALU(0x2BC10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B45Cu); -#endif -label_BFC33460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33460: 14200023 bne $at, $zero, 0xBFC334F0 */ - uint32_t psx_brA_BFC33460 = cpu->gpr[1]; uint32_t psx_brB_BFC33460 = cpu->gpr[0]; - psx_taken_BFC33460 = (psx_brA_BFC33460 != psx_brB_BFC33460); - psx_delay_BFC33460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC33464: 24130001 addiu $s3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24130001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B464u); -#endif - if (psx_delay_BFC33460) { - psx_delay_BFC33460 = 0; - if (psx_taken_BFC33460) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4F0u); - goto label_BFC334F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B468u); - } -label_BFC33468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33468: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC3346C: 2414FFFF addiu $s4, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2414FFFFu, cpu->gpr[20], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC33470: 27B10098 addiu $s1, $sp, 152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[29] + (152)); - PGXP_ALU(0x27B10098u, cpu->gpr[17], _pgx1, 0x00000098u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC33474: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B474u); -#endif -label_BFC33478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x940000u); -#endif - /* 0xBFC33478: 02F49021 addu $s2, $s7, $s4 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[18] = cpu->gpr[23] + cpu->gpr[20]; - PGXP_ALU(0x02F49021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B478u); -#endif -label_BFC3347C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3347Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC3347C: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90020u); -#endif - /* 0xBFC33480: 02702821 addu $a1, $s3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[16]; - PGXP_ALU(0x02702821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33484: 0C012840 jal 0xB004A100 */ - cpu->gpr[31] = 0x8004B48Cu; /* jal link before delay slot */ - psx_delay_BFC33484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40041u); -#endif - /* 0xBFC33488: 02403021 addu $a2, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B488u); -#endif - if (psx_delay_BFC33484) { - psx_delay_BFC33484 = 0; - cpu->gpr[31] = 0x8004B48Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A100u); - cpu->pc = 0x8004A100u; return; - } -label_BFC3348C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3348Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3348Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3348C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC33490: AE22FFC0 sw $v0, -64($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B490u); return; } g_debug_last_store_pc = 0x8004B490u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE22FFC0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210000u); -#endif - /* 0xBFC33494: 1615FFF9 bne $s0, $s5, 0xBFC3347C */ - uint32_t psx_brA_BFC33494 = cpu->gpr[16]; uint32_t psx_brB_BFC33494 = cpu->gpr[21]; - psx_taken_BFC33494 = (psx_brA_BFC33494 != psx_brB_BFC33494); - psx_delay_BFC33494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC33498: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B498u); -#endif - if (psx_delay_BFC33494) { - psx_delay_BFC33494 = 0; - if (psx_taken_BFC33494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B47Cu); - goto label_BFC3347C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B49Cu); - } -label_BFC3349C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3349Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3349Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC3349C: 26940001 addiu $s4, $s4, 1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (1)); - PGXP_ALU(0x26940001u, cpu->gpr[20], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC334A0: 2A810002 slti $at, $s4, 2 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[20] < (2) ? 1 : 0); - PGXP_ALU(0x2A810002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC334A4: 1420FFF4 bne $at, $zero, 0xBFC33478 */ - uint32_t psx_brA_BFC334A4 = cpu->gpr[1]; uint32_t psx_brB_BFC334A4 = cpu->gpr[0]; - psx_taken_BFC334A4 = (psx_brA_BFC334A4 != psx_brB_BFC334A4); - psx_delay_BFC334A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC334A8: 2410FFFF addiu $s0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2410FFFFu, cpu->gpr[16], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4A8u); -#endif - if (psx_delay_BFC334A4) { - psx_delay_BFC334A4 = 0; - if (psx_taken_BFC334A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B478u); - goto label_BFC33478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4ACu); - } -label_BFC334AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC334AC: 27A40058 addiu $a0, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27A40058u, cpu->gpr[4], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC334B0: 27A50064 addiu $a1, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A50064u, cpu->gpr[5], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC334B4: 0C012D4E jal 0xB004B538 */ - cpu->gpr[31] = 0x8004B4BCu; /* jal link before delay slot */ - psx_delay_BFC334B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC334B8: 27A60070 addiu $a2, $sp, 112 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (112)); - PGXP_ALU(0x27A60070u, cpu->gpr[6], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4B8u); -#endif - if (psx_delay_BFC334B4) { - psx_delay_BFC334B4 = 0; - cpu->gpr[31] = 0x8004B4BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B538u); - cpu->pc = 0x8004B538u; return; - } -label_BFC334BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC334BC: 10400004 beq $v0, $zero, 0xBFC334D0 */ - uint32_t psx_brA_BFC334BC = cpu->gpr[2]; uint32_t psx_brB_BFC334BC = cpu->gpr[0]; - psx_taken_BFC334BC = (psx_brA_BFC334BC == psx_brB_BFC334BC); - psx_delay_BFC334BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC334C0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4C0u); -#endif - if (psx_delay_BFC334BC) { - psx_delay_BFC334BC = 0; - if (psx_taken_BFC334BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4D0u); - goto label_BFC334D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4C4u); - } -label_BFC334C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC334C4: 10000002 beq $zero, $zero, 0xBFC334D0 */ - uint32_t psx_brA_BFC334C4 = cpu->gpr[0]; uint32_t psx_brB_BFC334C4 = cpu->gpr[0]; - psx_taken_BFC334C4 = (psx_brA_BFC334C4 == psx_brB_BFC334C4); - psx_delay_BFC334C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC334C8: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4C8u); -#endif - if (psx_delay_BFC334C4) { - psx_delay_BFC334C4 = 0; - if (psx_taken_BFC334C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4D0u); - goto label_BFC334D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4CCu); - } -label_BFC334CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC334CC: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4CCu); -#endif -label_BFC334D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400011u); -#endif - /* 0xBFC334D0: 02C02021 addu $a0, $s6, $zero */ - { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[22] + cpu->gpr[0]; - PGXP_ALU(0x02C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80021u); -#endif - /* 0xBFC334D4: 02602821 addu $a1, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC334D8: 0C01287C jal 0xB004A1F0 */ - cpu->gpr[31] = 0x8004B4E0u; /* jal link before delay slot */ - psx_delay_BFC334D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800041u); -#endif - /* 0xBFC334DC: 02E03021 addu $a2, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4DCu); -#endif - if (psx_delay_BFC334D8) { - psx_delay_BFC334D8 = 0; - cpu->gpr[31] = 0x8004B4E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004A1F0u); - cpu->pc = 0x8004A1F0u; return; - } -label_BFC334E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC334E0: 26730001 addiu $s3, $s3, 1 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (1)); - PGXP_ALU(0x26730001u, cpu->gpr[19], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40080002u); -#endif - /* 0xBFC334E4: 027E082A slt $at, $s3, $fp */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[30] ? 1 : 0); - PGXP_ALU(0x027E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC334E8: 1420FFDF bne $at, $zero, 0xBFC33468 */ - uint32_t psx_brA_BFC334E8 = cpu->gpr[1]; uint32_t psx_brB_BFC334E8 = cpu->gpr[0]; - psx_taken_BFC334E8 = (psx_brA_BFC334E8 != psx_brB_BFC334E8); - psx_delay_BFC334E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC334EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B4ECu); -#endif - if (psx_delay_BFC334E8) { - psx_delay_BFC334E8 = 0; - if (psx_taken_BFC334E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B468u); - goto label_BFC33468; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B4F0u); - } -label_BFC334F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC334F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC334F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B4F0u); -#endif - /* 0xBFC334F0: 8FB80050 lw $t8, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B4F0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80050u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC334F4: 26F70001 addiu $s7, $s7, 1 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (1)); - PGXP_ALU(0x26F70001u, cpu->gpr[23], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800002u); -#endif - /* 0xBFC334F8: 02F8082A slt $at, $s7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x02F8082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC334FC: 1420FFD8 bne $at, $zero, 0xBFC33460 */ - uint32_t psx_brA_BFC334FC = cpu->gpr[1]; uint32_t psx_brB_BFC334FC = cpu->gpr[0]; - psx_taken_BFC334FC = (psx_brA_BFC334FC != psx_brB_BFC334FC); - psx_delay_BFC334FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000002u); -#endif - /* 0xBFC33500: 2BC10002 slti $at, $fp, 2 */ - { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[30] < (2) ? 1 : 0); - PGXP_ALU(0x2BC10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B500u); -#endif - if (psx_delay_BFC334FC) { - psx_delay_BFC334FC = 0; - if (psx_taken_BFC334FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B460u); - goto label_BFC33460; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B504u); - } -label_BFC33504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B504u); -#endif - /* 0xBFC33504: 8FB00040 lw $s0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B504u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00040u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B504u); -#endif - /* 0xBFC33508: 8FB1003C lw $s1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B508u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1003Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B508u); -#endif - /* 0xBFC3350C: 8FB20038 lw $s2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B50Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20038u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B510u); -#endif - /* 0xBFC33510: 8FB30034 lw $s3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B510u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30034u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B510u); -#endif - /* 0xBFC33514: 8FB40030 lw $s4, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B514u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40030u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B514u); -#endif - /* 0xBFC33518: 8FB5002C lw $s5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B518u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB5002Cu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B518u); -#endif - /* 0xBFC3351C: 8FBE0028 lw $fp, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B51Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0028u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33520: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B520u); -#endif - /* 0xBFC33524: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B524u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B524u); -#endif -label_BFC33528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B528u); -#endif - /* 0xBFC33528: 8FB6001C lw $s6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B528u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6001Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B528u); -#endif - /* 0xBFC3352C: 8FB70020 lw $s7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B52Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70020u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33530: 03E00008 jr $ra */ - psx_delay_BFC33530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC33534: 27BD0098 addiu $sp, $sp, 152 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (152)); - PGXP_ALU(0x27BD0098u, cpu->gpr[29], _pgx1, 0x00000098u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B534u); -#endif - if (psx_delay_BFC33530) { - psx_delay_BFC33530 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33538(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33538u); - int psx_delay_BFC33564 = 0; - int psx_taken_BFC33564 = 0; - int psx_delay_BFC33578 = 0; - int psx_taken_BFC33578 = 0; - int psx_delay_BFC3358C = 0; - int psx_taken_BFC3358C = 0; - int psx_delay_BFC335A0 = 0; - int psx_taken_BFC335A0 = 0; - int psx_delay_BFC335B4 = 0; - int psx_taken_BFC335B4 = 0; - int psx_delay_BFC335C4 = 0; - int psx_taken_BFC335C4 = 0; - int psx_delay_BFC335D8 = 0; - int psx_taken_BFC335D8 = 0; - int psx_delay_BFC335F0 = 0; - int psx_taken_BFC335F0 = 0; - int psx_delay_BFC33604 = 0; - int psx_taken_BFC33604 = 0; - int psx_delay_BFC33618 = 0; - int psx_taken_BFC33618 = 0; - int psx_delay_BFC3362C = 0; - int psx_taken_BFC3362C = 0; - int psx_delay_BFC3363C = 0; - int psx_taken_BFC3363C = 0; - int psx_delay_BFC33654 = 0; - int psx_taken_BFC33654 = 0; - int psx_delay_BFC3366C = 0; - int psx_taken_BFC3366C = 0; - int psx_delay_BFC3367C = 0; - int psx_taken_BFC3367C = 0; - int psx_delay_BFC33690 = 0; - int psx_taken_BFC33690 = 0; - int psx_delay_BFC336A0 = 0; - int psx_taken_BFC336A0 = 0; - int psx_delay_BFC336B4 = 0; - int psx_taken_BFC336B4 = 0; - int psx_delay_BFC336C8 = 0; - int psx_taken_BFC336C8 = 0; - int psx_delay_BFC336D8 = 0; - int psx_taken_BFC336D8 = 0; - int psx_delay_BFC336E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3356Cu: goto label_BFC3356C; - case 0xBFC33574u: goto label_BFC33574; - case 0xBFC33580u: goto label_BFC33580; - case 0xBFC33588u: goto label_BFC33588; - case 0xBFC33594u: goto label_BFC33594; - case 0xBFC3359Cu: goto label_BFC3359C; - case 0xBFC335A8u: goto label_BFC335A8; - case 0xBFC335B0u: goto label_BFC335B0; - case 0xBFC335BCu: goto label_BFC335BC; - case 0xBFC335C0u: goto label_BFC335C0; - case 0xBFC335CCu: goto label_BFC335CC; - case 0xBFC335D4u: goto label_BFC335D4; - case 0xBFC335E0u: goto label_BFC335E0; - case 0xBFC335E4u: goto label_BFC335E4; - case 0xBFC335F8u: goto label_BFC335F8; - case 0xBFC33600u: goto label_BFC33600; - case 0xBFC3360Cu: goto label_BFC3360C; - case 0xBFC33614u: goto label_BFC33614; - case 0xBFC33620u: goto label_BFC33620; - case 0xBFC33628u: goto label_BFC33628; - case 0xBFC33634u: goto label_BFC33634; - case 0xBFC33638u: goto label_BFC33638; - case 0xBFC33644u: goto label_BFC33644; - case 0xBFC3364Cu: goto label_BFC3364C; - case 0xBFC3365Cu: goto label_BFC3365C; - case 0xBFC33660u: goto label_BFC33660; - case 0xBFC33674u: goto label_BFC33674; - case 0xBFC3367Cu: goto label_BFC3367C; - case 0xBFC33684u: goto label_BFC33684; - case 0xBFC3368Cu: goto label_BFC3368C; - case 0xBFC33698u: goto label_BFC33698; - case 0xBFC3369Cu: goto label_BFC3369C; - case 0xBFC336A8u: goto label_BFC336A8; - case 0xBFC336ACu: goto label_BFC336AC; - case 0xBFC336BCu: goto label_BFC336BC; - case 0xBFC336C4u: goto label_BFC336C4; - case 0xBFC336D0u: goto label_BFC336D0; - case 0xBFC336D4u: goto label_BFC336D4; - case 0xBFC336E0u: goto label_BFC336E0; - case 0xBFC336E4u: goto label_BFC336E4; - default: break; - } - } -label_BFC33538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B538u); -#endif - /* 0xBFC33538: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B538u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B538u); -#endif - /* 0xBFC3353C: 8CAA0000 lw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B53Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC33540: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B540u); -#endif - /* 0xBFC33544: 8C830000 lw $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B544u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x8C830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B544u); -#endif - /* 0xBFC33548: 8C870004 lw $a3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B548u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8C870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3354C: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B550u); -#endif - /* 0xBFC33550: 8CA90000 lw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B550u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B550u); -#endif - /* 0xBFC33554: 8CA80004 lw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B554u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1404u); -#endif - /* 0xBFC33558: 01426023 subu $t4, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[10] - cpu->gpr[2]; - PGXP_ALU(0x01426023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3355C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33560: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33564: 05810003 bgez $t4, 0xBFC33574 */ - uint32_t psx_brA_BFC33564 = cpu->gpr[12]; - psx_taken_BFC33564 = ((int32_t)psx_brA_BFC33564 >= 0); - psx_delay_BFC33564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC33568: 01805821 addu $t3, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[12] + cpu->gpr[0]; - PGXP_ALU(0x01805821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B568u); -#endif - if (psx_delay_BFC33564) { - psx_delay_BFC33564 = 0; - if (psx_taken_BFC33564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B574u); - goto label_BFC33574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B56Cu); - } -label_BFC3356C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3356Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3356C: 004B1021 addu $v0, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[11]; - PGXP_ALU(0x004B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33570: 014B5023 subu $t2, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[11]; - PGXP_ALU(0x014B5023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B570u); -#endif -label_BFC33574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x228u); -#endif - /* 0xBFC33574: 01232823 subu $a1, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[9] - cpu->gpr[3]; - PGXP_ALU(0x01232823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33578: 04A10003 bgez $a1, 0xBFC33588 */ - uint32_t psx_brA_BFC33578 = cpu->gpr[5]; - psx_taken_BFC33578 = ((int32_t)psx_brA_BFC33578 >= 0); - psx_delay_BFC33578 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3357C: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B57Cu); -#endif - if (psx_delay_BFC33578) { - psx_delay_BFC33578 = 0; - if (psx_taken_BFC33578) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B588u); - goto label_BFC33588; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B580u); - } -label_BFC33580: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33580u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC33580: 00641821 addu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[4]; - PGXP_ALU(0x00641821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC33584: 01244823 subu $t1, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[4]; - PGXP_ALU(0x01244823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B584u); -#endif -label_BFC33588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1A0u); -#endif - /* 0xBFC33588: 01072823 subu $a1, $t0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[5] = cpu->gpr[8] - cpu->gpr[7]; - PGXP_ALU(0x01072823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3358C: 04A10003 bgez $a1, 0xBFC3359C */ - uint32_t psx_brA_BFC3358C = cpu->gpr[5]; - psx_taken_BFC3358C = ((int32_t)psx_brA_BFC3358C >= 0); - psx_delay_BFC3358C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC33590: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B590u); -#endif - if (psx_delay_BFC3358C) { - psx_delay_BFC3358C = 0; - if (psx_taken_BFC3358C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B59Cu); - goto label_BFC3359C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B594u); - } -label_BFC33594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC33594: 00E43821 addu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[4]; - PGXP_ALU(0x00E43821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC33598: 01044023 subu $t0, $t0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[4]; - PGXP_ALU(0x01044023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B598u); -#endif -label_BFC3359C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3359Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3359Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Cu); -#endif - /* 0xBFC3359C: 00622823 subu $a1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[3] - cpu->gpr[2]; - PGXP_ALU(0x00622823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC335A0: 04A10003 bgez $a1, 0xBFC335B0 */ - uint32_t psx_brA_BFC335A0 = cpu->gpr[5]; - psx_taken_BFC335A0 = ((int32_t)psx_brA_BFC335A0 >= 0); - psx_delay_BFC335A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC335A4: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5A4u); -#endif - if (psx_delay_BFC335A0) { - psx_delay_BFC335A0 = 0; - if (psx_taken_BFC335A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5B0u); - goto label_BFC335B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5A8u); - } -label_BFC335A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC335A8: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC335AC: 00641823 subu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[4]; - PGXP_ALU(0x00641823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5ACu); -#endif -label_BFC335B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA4u); -#endif - /* 0xBFC335B0: 00E22823 subu $a1, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E22823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC335B4: 04A10002 bgez $a1, 0xBFC335C0 */ - uint32_t psx_brA_BFC335B4 = cpu->gpr[5]; - psx_taken_BFC335B4 = ((int32_t)psx_brA_BFC335B4 >= 0); - psx_delay_BFC335B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC335B8: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5B8u); -#endif - if (psx_delay_BFC335B4) { - psx_delay_BFC335B4 = 0; - if (psx_taken_BFC335B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5C0u); - goto label_BFC335C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5BCu); - } -label_BFC335BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC335BC: 00E43823 subu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] - cpu->gpr[4]; - PGXP_ALU(0x00E43823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5BCu); -#endif -label_BFC335C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC335C0: 01092023 subu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] - cpu->gpr[9]; - PGXP_ALU(0x01092023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC335C4: 04810003 bgez $a0, 0xBFC335D4 */ - uint32_t psx_brA_BFC335C4 = cpu->gpr[4]; - psx_taken_BFC335C4 = ((int32_t)psx_brA_BFC335C4 >= 0); - psx_delay_BFC335C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC335C8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5C8u); -#endif - if (psx_delay_BFC335C4) { - psx_delay_BFC335C4 = 0; - if (psx_taken_BFC335C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5D4u); - goto label_BFC335D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5CCu); - } -label_BFC335CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC335CC: 01224821 addu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[2]; - PGXP_ALU(0x01224821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC335D0: 01024023 subu $t0, $t0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[2]; - PGXP_ALU(0x01024023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5D0u); -#endif -label_BFC335D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x510u); -#endif - /* 0xBFC335D4: 010A2023 subu $a0, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[8] - cpu->gpr[10]; - PGXP_ALU(0x010A2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC335D8: 04810002 bgez $a0, 0xBFC335E4 */ - uint32_t psx_brA_BFC335D8 = cpu->gpr[4]; - psx_taken_BFC335D8 = ((int32_t)psx_brA_BFC335D8 >= 0); - psx_delay_BFC335D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC335DC: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5DCu); -#endif - if (psx_delay_BFC335D8) { - psx_delay_BFC335D8 = 0; - if (psx_taken_BFC335D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5E4u); - goto label_BFC335E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5E0u); - } -label_BFC335E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC335E0: 01425021 addu $t2, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[2]; - PGXP_ALU(0x01425021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5E0u); -#endif -label_BFC335E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5E4u); -#endif - /* 0xBFC335E4: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B5E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC335E8: 24C60004 addiu $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (4)); - PGXP_ALU(0x24C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Cu); -#endif - /* 0xBFC335EC: 00622823 subu $a1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[3] - cpu->gpr[2]; - PGXP_ALU(0x00622823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC335F0: 04A10003 bgez $a1, 0xBFC33600 */ - uint32_t psx_brA_BFC335F0 = cpu->gpr[5]; - psx_taken_BFC335F0 = ((int32_t)psx_brA_BFC335F0 >= 0); - psx_delay_BFC335F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC335F4: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5F4u); -#endif - if (psx_delay_BFC335F0) { - psx_delay_BFC335F0 = 0; - if (psx_taken_BFC335F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B600u); - goto label_BFC33600; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B5F8u); - } -label_BFC335F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC335F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC335F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC335F8: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC335FC: 00641823 subu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[4]; - PGXP_ALU(0x00641823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B5FCu); -#endif -label_BFC33600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x580u); -#endif - /* 0xBFC33600: 01474023 subu $t0, $t2, $a3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[10] - cpu->gpr[7]; - PGXP_ALU(0x01474023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33604: 05010003 bgez $t0, 0xBFC33614 */ - uint32_t psx_brA_BFC33604 = cpu->gpr[8]; - psx_taken_BFC33604 = ((int32_t)psx_brA_BFC33604 >= 0); - psx_delay_BFC33604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC33608: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B608u); -#endif - if (psx_delay_BFC33604) { - psx_delay_BFC33604 = 0; - if (psx_taken_BFC33604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B614u); - goto label_BFC33614; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B60Cu); - } -label_BFC3360C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3360Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3360Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC3360C: 00E43821 addu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[4]; - PGXP_ALU(0x00E43821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC33610: 01445023 subu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[4]; - PGXP_ALU(0x01445023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B610u); -#endif -label_BFC33614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA4u); -#endif - /* 0xBFC33614: 00E22823 subu $a1, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E22823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33618: 04A10003 bgez $a1, 0xBFC33628 */ - uint32_t psx_brA_BFC33618 = cpu->gpr[5]; - psx_taken_BFC33618 = ((int32_t)psx_brA_BFC33618 >= 0); - psx_delay_BFC33618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3361C: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B61Cu); -#endif - if (psx_delay_BFC33618) { - psx_delay_BFC33618 = 0; - if (psx_taken_BFC33618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B628u); - goto label_BFC33628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B620u); - } -label_BFC33620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC33620: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC33624: 00E43823 subu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] - cpu->gpr[4]; - PGXP_ALU(0x00E43823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B624u); -#endif -label_BFC33628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x224u); -#endif - /* 0xBFC33628: 01222823 subu $a1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01222823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3362C: 04A10002 bgez $a1, 0xBFC33638 */ - uint32_t psx_brA_BFC3362C = cpu->gpr[5]; - psx_taken_BFC3362C = ((int32_t)psx_brA_BFC3362C >= 0); - psx_delay_BFC3362C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC33630: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B630u); -#endif - if (psx_delay_BFC3362C) { - psx_delay_BFC3362C = 0; - if (psx_taken_BFC3362C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B638u); - goto label_BFC33638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B634u); - } -label_BFC33634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC33634: 01244823 subu $t1, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[4]; - PGXP_ALU(0x01244823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B634u); -#endif -label_BFC33638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC33638: 012A2023 subu $a0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3363C: 04810003 bgez $a0, 0xBFC3364C */ - uint32_t psx_brA_BFC3363C = cpu->gpr[4]; - psx_taken_BFC3363C = ((int32_t)psx_brA_BFC3363C >= 0); - psx_delay_BFC3363C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC33640: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B640u); -#endif - if (psx_delay_BFC3363C) { - psx_delay_BFC3363C = 0; - if (psx_taken_BFC3363C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B64Cu); - goto label_BFC3364C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B644u); - } -label_BFC33644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC33644: 01425021 addu $t2, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[2]; - PGXP_ALU(0x01425021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC33648: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B648u); -#endif -label_BFC3364C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3364Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x228u); -#endif - /* 0xBFC3364C: 01232823 subu $a1, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[9] - cpu->gpr[3]; - PGXP_ALU(0x01232823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC33650: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33654: 04A10002 bgez $a1, 0xBFC33660 */ - uint32_t psx_brA_BFC33654 = cpu->gpr[5]; - psx_taken_BFC33654 = ((int32_t)psx_brA_BFC33654 >= 0); - psx_delay_BFC33654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x580u); -#endif - /* 0xBFC33658: 01474023 subu $t0, $t2, $a3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[10] - cpu->gpr[7]; - PGXP_ALU(0x01474023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B658u); -#endif - if (psx_delay_BFC33654) { - psx_delay_BFC33654 = 0; - if (psx_taken_BFC33654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B660u); - goto label_BFC33660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B65Cu); - } -label_BFC3365C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3365Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3365Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3365C: 00621821 addu $v1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00621821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B65Cu); -#endif -label_BFC33660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B660u); -#endif - /* 0xBFC33660: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B660u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33664: 24C60004 addiu $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (4)); - PGXP_ALU(0x24C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Cu); -#endif - /* 0xBFC33668: 00622823 subu $a1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[3] - cpu->gpr[2]; - PGXP_ALU(0x00622823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3366C: 04A10003 bgez $a1, 0xBFC3367C */ - uint32_t psx_brA_BFC3366C = cpu->gpr[5]; - psx_taken_BFC3366C = ((int32_t)psx_brA_BFC3366C >= 0); - psx_delay_BFC3366C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC33670: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B670u); -#endif - if (psx_delay_BFC3366C) { - psx_delay_BFC3366C = 0; - if (psx_taken_BFC3366C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B67Cu); - goto label_BFC3367C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B674u); - } -label_BFC33674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC33674: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC33678: 00641823 subu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[4]; - PGXP_ALU(0x00641823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B678u); -#endif -label_BFC3367C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3367Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3367Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3367C: 05010003 bgez $t0, 0xBFC3368C */ - uint32_t psx_brA_BFC3367C = cpu->gpr[8]; - psx_taken_BFC3367C = ((int32_t)psx_brA_BFC3367C >= 0); - psx_delay_BFC3367C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC33680: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B680u); -#endif - if (psx_delay_BFC3367C) { - psx_delay_BFC3367C = 0; - if (psx_taken_BFC3367C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B68Cu); - goto label_BFC3368C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B684u); - } -label_BFC33684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC33684: 00E43821 addu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[4]; - PGXP_ALU(0x00E43821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC33688: 01445023 subu $t2, $t2, $a0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[10] - cpu->gpr[4]; - PGXP_ALU(0x01445023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B688u); -#endif -label_BFC3368C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3368Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3368Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA4u); -#endif - /* 0xBFC3368C: 00E22823 subu $a1, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E22823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33690: 04A10002 bgez $a1, 0xBFC3369C */ - uint32_t psx_brA_BFC33690 = cpu->gpr[5]; - psx_taken_BFC33690 = ((int32_t)psx_brA_BFC33690 >= 0); - psx_delay_BFC33690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC33694: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B694u); -#endif - if (psx_delay_BFC33690) { - psx_delay_BFC33690 = 0; - if (psx_taken_BFC33690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B69Cu); - goto label_BFC3369C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B698u); - } -label_BFC33698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC33698: 00E43823 subu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] - cpu->gpr[4]; - PGXP_ALU(0x00E43823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B698u); -#endif -label_BFC3369C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3369Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3369Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x418u); -#endif - /* 0xBFC3369C: 01432023 subu $a0, $t2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[10] - cpu->gpr[3]; - PGXP_ALU(0x01432023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC336A0: 04810002 bgez $a0, 0xBFC336AC */ - uint32_t psx_brA_BFC336A0 = cpu->gpr[4]; - psx_taken_BFC336A0 = ((int32_t)psx_brA_BFC336A0 >= 0); - psx_delay_BFC336A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC336A4: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6A4u); -#endif - if (psx_delay_BFC336A0) { - psx_delay_BFC336A0 = 0; - if (psx_taken_BFC336A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6ACu); - goto label_BFC336AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6A8u); - } -label_BFC336A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC336A8: 00621821 addu $v1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[2]; - PGXP_ALU(0x00621821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6A8u); -#endif -label_BFC336AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6ACu); -#endif - /* 0xBFC336AC: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B6ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA8u); -#endif - /* 0xBFC336B0: 00E32823 subu $a1, $a3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[3]; - PGXP_ALU(0x00E32823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC336B4: 04A10003 bgez $a1, 0xBFC336C4 */ - uint32_t psx_brA_BFC336B4 = cpu->gpr[5]; - psx_taken_BFC336B4 = ((int32_t)psx_brA_BFC336B4 >= 0); - psx_delay_BFC336B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC336B8: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6B8u); -#endif - if (psx_delay_BFC336B4) { - psx_delay_BFC336B4 = 0; - if (psx_taken_BFC336B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6C4u); - goto label_BFC336C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6BCu); - } -label_BFC336BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC336BC: 00641821 addu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[4]; - PGXP_ALU(0x00641821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC336C0: 00E43823 subu $a3, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[7] - cpu->gpr[4]; - PGXP_ALU(0x00E43823u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6C0u); -#endif -label_BFC336C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA4u); -#endif - /* 0xBFC336C4: 00E22823 subu $a1, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E22823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC336C8: 04A10002 bgez $a1, 0xBFC336D4 */ - uint32_t psx_brA_BFC336C8 = cpu->gpr[5]; - psx_taken_BFC336C8 = ((int32_t)psx_brA_BFC336C8 >= 0); - psx_delay_BFC336C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC336CC: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6CCu); -#endif - if (psx_delay_BFC336C8) { - psx_delay_BFC336C8 = 0; - if (psx_taken_BFC336C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6D4u); - goto label_BFC336D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6D0u); - } -label_BFC336D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC336D0: 00441021 addu $v0, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00441021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6D0u); -#endif -label_BFC336D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Cu); -#endif - /* 0xBFC336D4: 00622823 subu $a1, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[3] - cpu->gpr[2]; - PGXP_ALU(0x00622823u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC336D8: 04A10002 bgez $a1, 0xBFC336E4 */ - uint32_t psx_brA_BFC336D8 = cpu->gpr[5]; - psx_taken_BFC336D8 = ((int32_t)psx_brA_BFC336D8 >= 0); - psx_delay_BFC336D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC336DC: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6DCu); -#endif - if (psx_delay_BFC336D8) { - psx_delay_BFC336D8 = 0; - if (psx_taken_BFC336D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6E4u); - goto label_BFC336E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B6E0u); - } -label_BFC336E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC336E0: 00641823 subu $v1, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[4]; - PGXP_ALU(0x00641823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6E0u); -#endif -label_BFC336E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC336E4: 03E00008 jr $ra */ - psx_delay_BFC336E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC336E8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6E8u); -#endif - if (psx_delay_BFC336E4) { - psx_delay_BFC336E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC336F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC336F0u); - int psx_delay_BFC33750 = 0; -label_BFC336F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC336F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC336F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC336F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC336F4: 40026000 mfc0 $v0, cop0[12] */ - cpu->gpr[2] = cpu->cop0[12]; -#ifdef PSX_ENABLE_BLOCK_CYCLES - cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; -#endif - PGXP_ALU(0x40026000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC336F8: 3C034000 lui $v1, 0x4000 */ - cpu->gpr[3] = 0x40000000u; - PGXP_ALU(0x3C034000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC336FC: 00431025 or $v0, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[3]; - PGXP_ALU(0x00431025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33700: 40826000 mtc0 $v0, cop0[12] */ - cpu->cop0[12] = cpu->gpr[2]; -#ifdef PSX_COSIM - cosim_instr(0x8004B700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC33708: 24080155 addiu $t0, $zero, 341 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (341)); - PGXP_ALU(0x24080155u, cpu->gpr[8], _pgx1, 0x00000155u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3370C: 48C8E800 ctc2 $t0, gte_ctrl[29] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 29, cpu->gpr[8]); - PGXP_COP2(0x48C8E800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33710: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC33714: 24080100 addiu $t0, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24080100u, cpu->gpr[8], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33718: 48C8F000 ctc2 $t0, gte_ctrl[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 30, cpu->gpr[8]); - PGXP_COP2(0x48C8F000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3371C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC33720: 240803E8 addiu $t0, $zero, 1000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1000)); - PGXP_ALU(0x240803E8u, cpu->gpr[8], _pgx1, 0x000003E8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33724: 48C8D000 ctc2 $t0, gte_ctrl[26] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 26, cpu->gpr[8]); - PGXP_COP2(0x48C8D000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33728: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3372C: 2408EF9E addiu $t0, $zero, -4194 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-4194)); - PGXP_ALU(0x2408EF9Eu, cpu->gpr[8], _pgx1, 0xFFFFEF9Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33730: 48C8D800 ctc2 $t0, gte_ctrl[27] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 27, cpu->gpr[8]); - PGXP_COP2(0x48C8D800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33734: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33738: 3C080140 lui $t0, 0x140 */ - cpu->gpr[8] = 0x01400000u; - PGXP_ALU(0x3C080140u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3373C: 48C8E000 ctc2 $t0, gte_ctrl[28] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[28] = cpu->gpr[8]; - PGXP_COP2(0x48C8E000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33744: 48C0C000 ctc2 $zero, gte_ctrl[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[24] = cpu->gpr[0]; - PGXP_COP2(0x48C0C000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33748: 48C0C800 ctc2 $zero, gte_ctrl[25] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[25] = cpu->gpr[0]; - PGXP_COP2(0x48C0C800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3374C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33750: 03E00008 jr $ra */ - psx_delay_BFC33750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33754: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B754u); -#endif - if (psx_delay_BFC33750) { - psx_delay_BFC33750 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33758(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33758u); - int psx_delay_BFC337A4 = 0; -label_BFC33758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33758: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3375C: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33760: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33764: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33768: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3376C: 4B98003D gte cmd 0x3D */ - gte_execute(cpu, 0x198003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33770: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33774: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33778: C8A90000 lwc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3377C: C8AA0004 lwc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33780: C8AB0008 lwc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33788: 4BA8003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A8003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B788u); -#endif - /* 0xBFC3378C: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B78Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33790: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33794: E9090000 swc2 gte[9], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B794u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE9090000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33798: E9090000 swc2 gte[9], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B798u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE9090000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3379C: E90A0004 swc2 gte[10], 4($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B79Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE90A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337A0: E90B0008 swc2 gte[11], 8($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B7A0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE90B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC337A4: 03E00008 jr $ra */ - psx_delay_BFC337A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC337A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B7A8u); -#endif - if (psx_delay_BFC337A4) { - psx_delay_BFC337A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC337AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC337ACu); - int psx_delay_BFC337F8 = 0; -label_BFC337AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC337ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC337ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337AC: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337B0: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337B4: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337B8: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC337BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337C0: 4B90003D gte cmd 0x3D */ - gte_execute(cpu, 0x190003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337C4: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337C8: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337CC: C8A90000 lwc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337D0: C8AA0004 lwc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337D4: C8AB0008 lwc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC337D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337DC: 4BA0003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A0003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7E0u); -#endif - /* 0xBFC337E0: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B7E0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC337E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337E8: E9090000 swc2 gte[9], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B7E8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE9090000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337EC: E9090000 swc2 gte[9], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B7ECu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE9090000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337F0: E90A0004 swc2 gte[10], 4($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B7F0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE90A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC337F4: E90B0008 swc2 gte[11], 8($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B7F4u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE90B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004B7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC337F8: 03E00008 jr $ra */ - psx_delay_BFC337F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC337FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B7FCu); -#endif - if (psx_delay_BFC337F8) { - psx_delay_BFC337F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33800(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33800u); - int psx_delay_BFC33884 = 0; -label_BFC33800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B800u); -#endif - /* 0xBFC33800: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B800u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B800u); -#endif - /* 0xBFC33804: 8C8A0004 lw $t2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B804u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33808: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3380C: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC33810: 314AFFFF andi $t2, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33814: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33818: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3381C: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33820: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33828: 4B98003D gte cmd 0x3D */ - gte_execute(cpu, 0x198003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B828u); -#endif - /* 0xBFC3382C: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B82Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B830u); -#endif - /* 0xBFC33830: 8CAA0004 lw $t2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B830u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33834: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33838: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3383C: 314AFFFF andi $t2, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33840: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33844: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33848: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3384C: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33850: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33854: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33858: 4BA8003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A8003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3385C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33860: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33864: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33868: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3386C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33870: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B870u); -#endif - /* 0xBFC33874: 8FAD0010 lw $t5, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B874u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33878: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC3387C: ADA80000 sw $t0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B87Cu); return; } g_debug_last_store_pc = 0x8004B87Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC33880: ADAA0004 sw $t2, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B880u); return; } g_debug_last_store_pc = 0x8004B880u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xADAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33884: 03E00008 jr $ra */ - psx_delay_BFC33884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33888: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B888u); -#endif - if (psx_delay_BFC33884) { - psx_delay_BFC33884 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3388C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3388Cu); - int psx_delay_BFC33910 = 0; -label_BFC3388C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3388Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B88Cu); -#endif - /* 0xBFC3388C: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B88Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B890u); -#endif - /* 0xBFC33890: 8C8A0004 lw $t2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B890u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33894: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33898: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3389C: 314AFFFF andi $t2, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338A0: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338A4: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338A8: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338AC: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC338B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338B4: 4B90003D gte cmd 0x3D */ - gte_execute(cpu, 0x190003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B8B4u); -#endif - /* 0xBFC338B8: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B8B8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8B8u); -#endif - /* 0xBFC338BC: 8CAA0004 lw $t2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B8BCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC338C0: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC338C4: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC338C8: 314AFFFF andi $t2, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338CC: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338D0: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338D4: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338D8: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338DC: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC338E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338E4: 4BA0003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A0003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338E8: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338EC: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC338F0: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC338F4: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC338F8: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC338FC: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004B8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B900u); -#endif - /* 0xBFC33900: 8FAD0010 lw $t5, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B900u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33904: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC33908: ADA80000 sw $t0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B908u); return; } g_debug_last_store_pc = 0x8004B908u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC3390C: ADAA0004 sw $t2, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B90Cu); return; } g_debug_last_store_pc = 0x8004B90Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xADAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33910: 03E00008 jr $ra */ - psx_delay_BFC33910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B914u); -#endif - if (psx_delay_BFC33910) { - psx_delay_BFC33910 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33918(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33918u); - int psx_delay_BFC33970 = 0; -label_BFC33918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B918u); -#endif - /* 0xBFC33918: 90880000 lbu $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 8, 0x10u); - PGXP_LOAD(0x90880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B918u); -#endif - /* 0xBFC3391C: 90890001 lbu $t1, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 9, 0x10u); - PGXP_LOAD(0x90890001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33920: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33924: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33928: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3392C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33930: 4B98003D gte cmd 0x3D */ - gte_execute(cpu, 0x198003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B930u); -#endif - /* 0xBFC33934: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B934u); -#endif - /* 0xBFC33938: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3393C: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33940: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33944: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33948: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3394C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33950: 4BA8003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A8003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33954: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33958: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3395C: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B960u); -#endif - /* 0xBFC33960: 8FAD0010 lw $t5, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B960u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC33968: A1A80000 sb $t0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B968u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC3396C: A1A90001 sb $t1, 1($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B96Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (1)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33970: 03E00008 jr $ra */ - psx_delay_BFC33970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33974: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B974u); -#endif - if (psx_delay_BFC33970) { - psx_delay_BFC33970 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33978(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33978u); - int psx_delay_BFC339E8 = 0; -label_BFC33978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B978u); -#endif - /* 0xBFC33978: 90880000 lbu $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 8, 0x10u); - PGXP_LOAD(0x90880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B978u); -#endif - /* 0xBFC3397C: 90890001 lbu $t1, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 9, 0x10u); - PGXP_LOAD(0x90890001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B980u); -#endif - /* 0xBFC33980: 908A0002 lbu $t2, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 10, 0x10u); - PGXP_LOAD(0x908A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33984: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33988: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3398C: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33990: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33998: 4B98003D gte cmd 0x3D */ - gte_execute(cpu, 0x198003D); -#ifdef PSX_COSIM - cosim_instr(0x8004B998u); -#endif - /* 0xBFC3399C: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9A0u); -#endif - /* 0xBFC339A0: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9A0u); -#endif - /* 0xBFC339A4: 90AA0002 lbu $t2, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 10, 0x20u); - PGXP_LOAD(0x90AA0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339A8: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339AC: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339B0: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339B4: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339B8: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC339BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339C0: 4BA8003E gte cmd 0x3E */ - gte_execute(cpu, 0x1A8003E); -#ifdef PSX_COSIM - cosim_instr(0x8004B9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339C4: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339C8: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339CC: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC339D0: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004B9D0u); -#endif - /* 0xBFC339D4: 8FAD0010 lw $t5, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B9D4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC339D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC339DC: A1A80000 sb $t0, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B9DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC339E0: A1A90001 sb $t1, 1($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B9E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (1)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC339E4: A1AA0002 sb $t2, 2($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004B9E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA1AA0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC339E8: 03E00008 jr $ra */ - psx_delay_BFC339E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC339EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004B9ECu); -#endif - if (psx_delay_BFC339E8) { - psx_delay_BFC339E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC339F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC339F0u); - int psx_delay_BFC33A50 = 0; - int psx_delay_BFC33AB0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33A58u: goto label_BFC33A58; - default: break; - } - } -label_BFC339F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC339F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC339F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004B9F0u); -#endif - /* 0xBFC339F0: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B9F0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9F0u); -#endif - /* 0xBFC339F4: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B9F4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC339F8: 01080019 multu $t0, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01080019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004B9F8u); -#endif - /* 0xBFC339FC: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004B9FCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004B9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33A00: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33A0C: 01290019 multu $t1, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x01290019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004BA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33A10: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC33A14: 016C5820 add $t3, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[11]; int32_t psx_b = (int32_t)cpu->gpr[12]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[11] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x016C5820u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC33A1C: 014A0019 multu $t2, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014A0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004BA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33A20: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2808u); -#endif - /* 0xBFC33A24: 016D1820 add $v1, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; { int32_t psx_a = (int32_t)cpu->gpr[11]; int32_t psx_b = (int32_t)cpu->gpr[13]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[3] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x016D1820u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8011u); -#endif - /* 0xBFC33A2C: 00807821 addu $t7, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00807821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000021u); -#endif - /* 0xBFC33A30: 00A0C021 addu $t8, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC33A34: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33A38: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33A3C: 24A583BC addiu $a1, $a1, -31812 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-31812)); - PGXP_ALU(0x24A583BCu, cpu->gpr[5], _pgx1, 0xFFFF83BCu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33A40: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33A44: 24C683C0 addiu $a2, $a2, -31808 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-31808)); - PGXP_ALU(0x24C683C0u, cpu->gpr[6], _pgx1, 0xFFFF83C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC33A48: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000002u); -#endif - /* 0xBFC33A4C: AC3F83B4 sw $ra, -31820($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA4Cu); return; } g_debug_last_store_pc = 0x8004BA4Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC3F83B4u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33A50: 0C012F26 jal 0xB004BC98 */ - cpu->gpr[31] = 0x8004BA58u; /* jal link before delay slot */ - psx_delay_BFC33A50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA54u); -#endif - if (psx_delay_BFC33A50) { - psx_delay_BFC33A50 = 0; - cpu->gpr[31] = 0x8004BA58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC98u); - cpu->pc = 0x8004BC98u; return; - } -label_BFC33A58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33A58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33A58: 3C1F8008 lui $ra, 0x8008 */ - cpu->gpr[31] = 0x80080000u; - PGXP_ALU(0x3C1F8008u, cpu->gpr[31], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA58u); -#endif - /* 0xBFC33A5C: 8FFF83B4 lw $ra, -31820($ra) */ - { uint32_t _pgxa = cpu->gpr[31] + -31820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[31] + (-31820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA5Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x80000000u); } - PGXP_LOAD(0x8FFF83B4u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33A60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33A64: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA64u); -#endif - /* 0xBFC33A68: 8D8C83BC lw $t4, -31812($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -31812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-31812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA68u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C83BCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33A6C: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA70u); -#endif - /* 0xBFC33A70: 8DAD83C0 lw $t5, -31808($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA70u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD83C0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA70u); -#endif - /* 0xBFC33A74: 8DE80000 lw $t0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA74u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA74u); -#endif - /* 0xBFC33A78: 8DE90004 lw $t1, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA78u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000u); } - PGXP_LOAD(0x8DE90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC33A7C: 010C0019 multu $t0, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x010C0019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA80u); -#endif - /* 0xBFC33A80: 8DEA0008 lw $t2, 8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA80u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8000u); } - PGXP_LOAD(0x8DEA0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC33A84: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33A88: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC33A8C: 01A84007 srav $t0, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01A84007u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC33A90: AF080000 sw $t0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BA90u); return; } g_debug_last_store_pc = 0x8004BA90u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAF080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC33A94: 012C0019 multu $t1, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012C0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33A98: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC33A9C: 01A94807 srav $t1, $t1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01A94807u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC33AA0: AF090004 sw $t1, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BAA0u); return; } g_debug_last_store_pc = 0x8004BAA0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAF090004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC33AA4: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC33AA8: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC33AAC: 01AA5007 srav $t2, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01AA5007u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33AB0: 03E00008 jr $ra */ - psx_delay_BFC33AB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC33AB4: AF0A0008 sw $t2, 8($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BAB4u); return; } g_debug_last_store_pc = 0x8004BAB4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAF0A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAB4u); -#endif - if (psx_delay_BFC33AB0) { - psx_delay_BFC33AB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33AB8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33AB8u); - int psx_delay_BFC33B18 = 0; - int psx_delay_BFC33B78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33B20u: goto label_BFC33B20; - default: break; - } - } -label_BFC33AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAB8u); -#endif - /* 0xBFC33AB8: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BAB8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAB8u); -#endif - /* 0xBFC33ABC: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BABCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33AC0: 01080019 multu $t0, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01080019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004BAC0u); -#endif - /* 0xBFC33AC4: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BAC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33AC8: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33ACC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33AD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33AD4: 01290019 multu $t1, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x01290019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004BAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33AD8: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC33ADC: 016C5820 add $t3, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[11]; int32_t psx_b = (int32_t)cpu->gpr[12]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[11] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x016C5820u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33AE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC33AE4: 014A0019 multu $t2, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014A0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004BAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33AE8: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2808u); -#endif - /* 0xBFC33AEC: 016D1820 add $v1, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; { int32_t psx_a = (int32_t)cpu->gpr[11]; int32_t psx_b = (int32_t)cpu->gpr[13]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[3] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x016D1820u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33AF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8011u); -#endif - /* 0xBFC33AF4: 00807821 addu $t7, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00807821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000021u); -#endif - /* 0xBFC33AF8: 00A0C021 addu $t8, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC33AFC: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33B00: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33B04: 24A583BC addiu $a1, $a1, -31812 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-31812)); - PGXP_ALU(0x24A583BCu, cpu->gpr[5], _pgx1, 0xFFFF83BCu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33B08: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33B0C: 24C683C0 addiu $a2, $a2, -31808 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-31808)); - PGXP_ALU(0x24C683C0u, cpu->gpr[6], _pgx1, 0xFFFF83C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC33B10: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000002u); -#endif - /* 0xBFC33B14: AC3F83B4 sw $ra, -31820($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -31820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-31820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB14u); return; } g_debug_last_store_pc = 0x8004BB14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC3F83B4u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33B18: 0C012F26 jal 0xB004BC98 */ - cpu->gpr[31] = 0x8004BB20u; /* jal link before delay slot */ - psx_delay_BFC33B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33B1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BB1Cu); -#endif - if (psx_delay_BFC33B18) { - psx_delay_BFC33B18 = 0; - cpu->gpr[31] = 0x8004BB20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC98u); - cpu->pc = 0x8004BC98u; return; - } -label_BFC33B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC33B20: 3C1F8008 lui $ra, 0x8008 */ - cpu->gpr[31] = 0x80080000u; - PGXP_ALU(0x3C1F8008u, cpu->gpr[31], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB20u); -#endif - /* 0xBFC33B24: 8FFF83B4 lw $ra, -31820($ra) */ - { uint32_t _pgxa = cpu->gpr[31] + -31820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[31] + (-31820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x80000000u); } - PGXP_LOAD(0x8FFF83B4u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33B28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33B2C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB30u); -#endif - /* 0xBFC33B30: 8D8C83BC lw $t4, -31812($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -31812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-31812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB30u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C83BCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33B34: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB34u); -#endif - /* 0xBFC33B38: 8DAD83C0 lw $t5, -31808($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB38u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD83C0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB38u); -#endif - /* 0xBFC33B3C: 8DE80000 lw $t0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB3Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB40u); -#endif - /* 0xBFC33B40: 8DE90004 lw $t1, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB40u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000u); } - PGXP_LOAD(0x8DE90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC33B44: 010C0019 multu $t0, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x010C0019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BB44u); -#endif - /* 0xBFC33B48: 8DEA0008 lw $t2, 8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB48u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8000u); } - PGXP_LOAD(0x8DEA0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC33B4C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33B50: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC33B54: 01A84007 srav $t0, $t0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01A84007u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC33B58: A7080000 sh $t0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB58u); return; } g_debug_last_store_pc = 0x8004BB58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC33B5C: 012C0019 multu $t1, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012C0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33B60: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC33B64: 01A94807 srav $t1, $t1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01A94807u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC33B68: A7090002 sh $t1, 2($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB68u); return; } g_debug_last_store_pc = 0x8004BB68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7090002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC33B6C: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004BB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC33B70: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC33B74: 01AA5007 srav $t2, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> (cpu->gpr[13] & 0x1Fu)); - PGXP_ALU(0x01AA5007u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33B78: 03E00008 jr $ra */ - psx_delay_BFC33B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC33B7C: A70A0004 sh $t2, 4($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BB7Cu); return; } g_debug_last_store_pc = 0x8004BB7Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA70A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB7Cu); -#endif - if (psx_delay_BFC33B78) { - psx_delay_BFC33B78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33B80u); - int psx_delay_BFC33B94 = 0; - int psx_taken_BFC33B94 = 0; - int psx_delay_BFC33BB8 = 0; - int psx_taken_BFC33BB8 = 0; - int psx_delay_BFC33BC4 = 0; - int psx_taken_BFC33BC4 = 0; - int psx_delay_BFC33BF4 = 0; - int psx_delay_BFC33BFC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33B9Cu: goto label_BFC33B9C; - case 0xBFC33BC0u: goto label_BFC33BC0; - case 0xBFC33BC8u: goto label_BFC33BC8; - case 0xBFC33BCCu: goto label_BFC33BCC; - case 0xBFC33BD4u: goto label_BFC33BD4; - case 0xBFC33BFCu: goto label_BFC33BFC; - default: break; - } - } -label_BFC33B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33B80: 4884F000 mtc2 $a0, gte_data[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 30, cpu->gpr[4]); - PGXP_COP2(0x4884F000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33B88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33B8C: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33B90: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC33B94: 10410019 beq $v0, $at, 0xBFC33BFC */ - uint32_t psx_brA_BFC33B94 = cpu->gpr[2]; uint32_t psx_brB_BFC33B94 = cpu->gpr[1]; - psx_taken_BFC33B94 = (psx_brA_BFC33B94 == psx_brB_BFC33B94); - psx_delay_BFC33B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33B98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BB98u); -#endif - if (psx_delay_BFC33B94) { - psx_delay_BFC33B94 = 0; - if (psx_taken_BFC33B94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BBFCu); - goto label_BFC33BFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BB9Cu); - } -label_BFC33B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC33B9C: 30480001 andi $t0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC33BA0: 240AFFFE addiu $t2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240AFFFEu, cpu->gpr[10], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC33BA4: 004A5024 and $t2, $v0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10]; - PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC33BA8: 2409001F addiu $t1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2409001Fu, cpu->gpr[9], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC33BAC: 012A4822 subu $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A4822u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33BB0: 00094843 sra $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 1u); - PGXP_ALU(0x00094843u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33BB4: 214BFFE8 addi $t3, $t2, -24 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (-24); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[11] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214BFFE8u, cpu->gpr[11], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33BB8: 05600003 bltz $t3, 0xBFC33BC8 */ - uint32_t psx_brA_BFC33BB8 = cpu->gpr[11]; - psx_taken_BFC33BB8 = ((int32_t)psx_brA_BFC33BB8 < 0); - psx_delay_BFC33BB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33BBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BBBCu); -#endif - if (psx_delay_BFC33BB8) { - psx_delay_BFC33BB8 = 0; - if (psx_taken_BFC33BB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BBC8u); - goto label_BFC33BC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BBC0u); - } -label_BFC33BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33BC0: 01646004 sllv $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[4] << (cpu->gpr[11] & 0x1Fu); - PGXP_ALU(0x01646004u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33BC4: 10000003 beq $zero, $zero, 0xBFC33BD4 */ - uint32_t psx_brA_BFC33BC4 = cpu->gpr[0]; uint32_t psx_brB_BFC33BC4 = cpu->gpr[0]; - psx_taken_BFC33BC4 = (psx_brA_BFC33BC4 == psx_brB_BFC33BC4); - psx_delay_BFC33BC4 = 1; -label_BFC33BC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33BC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC33BC8: 240B0018 addiu $t3, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240B0018u, cpu->gpr[11], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBC8u); -#endif - if (psx_delay_BFC33BC4) { - psx_delay_BFC33BC4 = 0; - if (psx_taken_BFC33BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BBD4u); - goto label_BFC33BD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BBCCu); - } -label_BFC33BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33BCC: 016A5822 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5822u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33BD0: 01646007 srav $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[4] >> (cpu->gpr[11] & 0x1Fu)); - PGXP_ALU(0x01646007u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBD0u); -#endif -label_BFC33BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33BD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33BD4: 218CFFC0 addi $t4, $t4, -64 */ - { uint32_t _pgx1 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[12]; int32_t psx_b = (-64); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[12] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x218CFFC0u, cpu->gpr[12], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33BD8: 000C6040 sll $t4, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33BDC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC33BE0: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBE0u); -#endif - /* 0xBFC33BE4: 85AD83C4 lh $t5, -31804($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31804; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31804)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BBE4u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x85AD83C4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33BE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC33BEC: 012D6804 sllv $t5, $t5, $t1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[13] = cpu->gpr[13] << (cpu->gpr[9] & 0x1Fu); - PGXP_ALU(0x012D6804u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC33BF0: 000D1302 srl $v0, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[13] >> 12u; - PGXP_ALU(0x000D1302u, cpu->gpr[2], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33BF4: 03E00008 jr $ra */ - psx_delay_BFC33BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33BF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BBF8u); -#endif - if (psx_delay_BFC33BF4) { - psx_delay_BFC33BF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC33BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33BFC: 03E00008 jr $ra */ - psx_delay_BFC33BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33C00: 24020000 addiu $v0, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24020000u, cpu->gpr[2], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC00u); -#endif - if (psx_delay_BFC33BFC) { - psx_delay_BFC33BFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33C04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33C04u); - int psx_delay_BFC33C18 = 0; - int psx_taken_BFC33C18 = 0; - int psx_delay_BFC33C3C = 0; - int psx_taken_BFC33C3C = 0; - int psx_delay_BFC33C48 = 0; - int psx_taken_BFC33C48 = 0; - int psx_delay_BFC33C70 = 0; - int psx_taken_BFC33C70 = 0; - int psx_delay_BFC33C7C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33C20u: goto label_BFC33C20; - case 0xBFC33C44u: goto label_BFC33C44; - case 0xBFC33C4Cu: goto label_BFC33C4C; - case 0xBFC33C50u: goto label_BFC33C50; - case 0xBFC33C58u: goto label_BFC33C58; - case 0xBFC33C78u: goto label_BFC33C78; - default: break; - } - } -label_BFC33C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33C04: 4884F000 mtc2 $a0, gte_data[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 30, cpu->gpr[4]); - PGXP_COP2(0x4884F000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33C10: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33C14: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC33C18: 1041001D beq $v0, $at, 0xBFC33C90 */ - uint32_t psx_brA_BFC33C18 = cpu->gpr[2]; uint32_t psx_brB_BFC33C18 = cpu->gpr[1]; - psx_taken_BFC33C18 = (psx_brA_BFC33C18 == psx_brB_BFC33C18); - psx_delay_BFC33C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC1Cu); -#endif - if (psx_delay_BFC33C18) { - psx_delay_BFC33C18 = 0; - if (psx_taken_BFC33C18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC90u); - cpu->pc = 0x8004BC90u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC20u); - } -label_BFC33C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC33C20: 30480001 andi $t0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC33C24: 240AFFFE addiu $t2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240AFFFEu, cpu->gpr[10], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC33C28: 004A5024 and $t2, $v0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10]; - PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC33C2C: 24090013 addiu $t1, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24090013u, cpu->gpr[9], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC33C30: 012A4822 subu $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A4822u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33C34: 00094843 sra $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 1u); - PGXP_ALU(0x00094843u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33C38: 214BFFE8 addi $t3, $t2, -24 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (-24); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[11] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214BFFE8u, cpu->gpr[11], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33C3C: 05600003 bltz $t3, 0xBFC33C4C */ - uint32_t psx_brA_BFC33C3C = cpu->gpr[11]; - psx_taken_BFC33C3C = ((int32_t)psx_brA_BFC33C3C < 0); - psx_delay_BFC33C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC40u); -#endif - if (psx_delay_BFC33C3C) { - psx_delay_BFC33C3C = 0; - if (psx_taken_BFC33C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC4Cu); - goto label_BFC33C4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC44u); - } -label_BFC33C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33C44: 01646004 sllv $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[4] << (cpu->gpr[11] & 0x1Fu); - PGXP_ALU(0x01646004u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C48: 10000003 beq $zero, $zero, 0xBFC33C58 */ - uint32_t psx_brA_BFC33C48 = cpu->gpr[0]; uint32_t psx_brB_BFC33C48 = cpu->gpr[0]; - psx_taken_BFC33C48 = (psx_brA_BFC33C48 == psx_brB_BFC33C48); - psx_delay_BFC33C48 = 1; -label_BFC33C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC33C4C: 240B0018 addiu $t3, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240B0018u, cpu->gpr[11], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC4Cu); -#endif - if (psx_delay_BFC33C48) { - psx_delay_BFC33C48 = 0; - if (psx_taken_BFC33C48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC58u); - goto label_BFC33C58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC50u); - } -label_BFC33C50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33C50: 016A5822 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5822u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33C54: 01646007 srav $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[4] >> (cpu->gpr[11] & 0x1Fu)); - PGXP_ALU(0x01646007u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC54u); -#endif -label_BFC33C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33C58: 218CFFC0 addi $t4, $t4, -64 */ - { uint32_t _pgx1 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[12]; int32_t psx_b = (-64); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[12] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x218CFFC0u, cpu->gpr[12], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33C5C: 000C6040 sll $t4, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33C60: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC33C64: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC64u); -#endif - /* 0xBFC33C68: 85AD83C4 lh $t5, -31804($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31804; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31804)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BC68u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x85AD83C4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33C70: 05200004 bltz $t1, 0xBFC33C84 */ - uint32_t psx_brA_BFC33C70 = cpu->gpr[9]; - psx_taken_BFC33C70 = ((int32_t)psx_brA_BFC33C70 < 0); - psx_delay_BFC33C70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC74u); -#endif - if (psx_delay_BFC33C70) { - psx_delay_BFC33C70 = 0; - if (psx_taken_BFC33C70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC84u); - cpu->pc = 0x8004BC84u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BC78u); - } -label_BFC33C78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2204u); -#endif - /* 0xBFC33C78: 012D1004 sllv $v0, $t5, $t1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[13] << (cpu->gpr[9] & 0x1Fu); - PGXP_ALU(0x012D1004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33C7C: 03E00008 jr $ra */ - psx_delay_BFC33C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC80u); -#endif - if (psx_delay_BFC33C7C) { - psx_delay_BFC33C7C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33C84(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33C84u); - int psx_delay_BFC33C88 = 0; -label_BFC33C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC33C84: 00094822 subu $t1, $zero, $t1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[0] - cpu->gpr[9]; - PGXP_ALU(0x00094822u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33C88: 03E00008 jr $ra */ - psx_delay_BFC33C88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2204u); -#endif - /* 0xBFC33C8C: 012D1006 srlv $v0, $t5, $t1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[13] >> (cpu->gpr[9] & 0x1Fu); - PGXP_ALU(0x012D1006u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC8Cu); -#endif - if (psx_delay_BFC33C88) { - psx_delay_BFC33C88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33C90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33C90u); - int psx_delay_BFC33C90 = 0; -label_BFC33C90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33C90: 03E00008 jr $ra */ - psx_delay_BFC33C90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33C94: 24020000 addiu $v0, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24020000u, cpu->gpr[2], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BC94u); -#endif - if (psx_delay_BFC33C90) { - psx_delay_BFC33C90 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33C98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33C98u); - int psx_delay_BFC33CAC = 0; - int psx_taken_BFC33CAC = 0; - int psx_delay_BFC33CB4 = 0; - int psx_taken_BFC33CB4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33CB4u: goto label_BFC33CB4; - case 0xBFC33CBCu: goto label_BFC33CBC; - default: break; - } - } -label_BFC33C98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33C98: 4884F000 mtc2 $a0, gte_data[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 30, cpu->gpr[4]); - PGXP_COP2(0x4884F000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33C9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33CA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33CA4: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC33CA8: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC33CAC: 1041001B beq $v0, $at, 0xBFC33D1C */ - uint32_t psx_brA_BFC33CAC = cpu->gpr[2]; uint32_t psx_brB_BFC33CAC = cpu->gpr[1]; - psx_taken_BFC33CAC = (psx_brA_BFC33CAC == psx_brB_BFC33CAC); - psx_delay_BFC33CAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33CB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BCB0u); -#endif - if (psx_delay_BFC33CAC) { - psx_delay_BFC33CAC = 0; - if (psx_taken_BFC33CAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BD1Cu); - cpu->pc = 0x8004BD1Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCB4u); - } -label_BFC33CB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33CB4: 10400019 beq $v0, $zero, 0xBFC33D1C */ - uint32_t psx_brA_BFC33CB4 = cpu->gpr[2]; uint32_t psx_brB_BFC33CB4 = cpu->gpr[0]; - psx_taken_BFC33CB4 = (psx_brA_BFC33CB4 == psx_brB_BFC33CB4); - psx_delay_BFC33CB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33CB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BCB8u); -#endif - if (psx_delay_BFC33CB4) { - psx_delay_BFC33CB4 = 0; - if (psx_taken_BFC33CB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BD1Cu); - cpu->pc = 0x8004BD1Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCBCu); - } -label_BFC33CBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC33CBC: 30480001 andi $t0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30480001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCC0u); - cpu->pc = 0x8004BCC0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC33CC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33CC0u); - int psx_delay_BFC33CD8 = 0; - int psx_taken_BFC33CD8 = 0; - int psx_delay_BFC33CE4 = 0; - int psx_taken_BFC33CE4 = 0; - int psx_delay_BFC33D14 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33CE0u: goto label_BFC33CE0; - case 0xBFC33CE8u: goto label_BFC33CE8; - case 0xBFC33CECu: goto label_BFC33CEC; - case 0xBFC33CF4u: goto label_BFC33CF4; - default: break; - } - } -label_BFC33CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC33CC0: 240AFFFE addiu $t2, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x240AFFFEu, cpu->gpr[10], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC33CC4: 004A5024 and $t2, $v0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[10]; - PGXP_ALU(0x004A5024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC33CC8: 2409001F addiu $t1, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2409001Fu, cpu->gpr[9], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC33CCC: 012A4822 subu $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A4822u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33CD0: 00094843 sra $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 1u); - PGXP_ALU(0x00094843u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33CD4: 214BFFE8 addi $t3, $t2, -24 */ - { uint32_t _pgx1 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (-24); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[11] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x214BFFE8u, cpu->gpr[11], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC33CD8: 05600003 bltz $t3, 0xBFC33CE8 */ - uint32_t psx_brA_BFC33CD8 = cpu->gpr[11]; - psx_taken_BFC33CD8 = ((int32_t)psx_brA_BFC33CD8 < 0); - psx_delay_BFC33CD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33CDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BCDCu); -#endif - if (psx_delay_BFC33CD8) { - psx_delay_BFC33CD8 = 0; - if (psx_taken_BFC33CD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCE8u); - goto label_BFC33CE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCE0u); - } -label_BFC33CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33CE0: 01646004 sllv $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[4] << (cpu->gpr[11] & 0x1Fu); - PGXP_ALU(0x01646004u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33CE4: 10000003 beq $zero, $zero, 0xBFC33CF4 */ - uint32_t psx_brA_BFC33CE4 = cpu->gpr[0]; uint32_t psx_brB_BFC33CE4 = cpu->gpr[0]; - psx_taken_BFC33CE4 = (psx_brA_BFC33CE4 == psx_brB_BFC33CE4); - psx_delay_BFC33CE4 = 1; -label_BFC33CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC33CE8: 240B0018 addiu $t3, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x240B0018u, cpu->gpr[11], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCE8u); -#endif - if (psx_delay_BFC33CE4) { - psx_delay_BFC33CE4 = 0; - if (psx_taken_BFC33CE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCF4u); - goto label_BFC33CF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BCECu); - } -label_BFC33CEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC33CEC: 016A5822 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5822u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC33CF0: 01646007 srav $t4, $a0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[4] >> (cpu->gpr[11] & 0x1Fu)); - PGXP_ALU(0x01646007u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCF0u); -#endif -label_BFC33CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33CF4: 218CFFC0 addi $t4, $t4, -64 */ - { uint32_t _pgx1 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[12]; int32_t psx_b = (-64); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[12] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x218CFFC0u, cpu->gpr[12], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC33CF8: 000C6040 sll $t4, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC33CFC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC33D00: 01AC6821 addu $t5, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[12]; - PGXP_ALU(0x01AC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD00u); -#endif - /* 0xBFC33D04: 85AD8544 lh $t5, -31420($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -31420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-31420)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD04u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x85AD8544u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC33D08: ACC90000 sw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD08u); return; } g_debug_last_store_pc = 0x8004BD08u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC33D0C: ACAD0000 sw $t5, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD0Cu); return; } g_debug_last_store_pc = 0x8004BD0Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xACAD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33D10: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33D14: 03E00008 jr $ra */ - psx_delay_BFC33D14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33D18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BD18u); -#endif - if (psx_delay_BFC33D14) { - psx_delay_BFC33D14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33D1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33D1Cu); - int psx_delay_BFC33D1C = 0; -label_BFC33D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33D1C: 03E00008 jr $ra */ - psx_delay_BFC33D1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC33D20: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD20u); -#endif - if (psx_delay_BFC33D1C) { - psx_delay_BFC33D1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33D24(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33D24u); - int psx_delay_BFC33D94 = 0; - int psx_taken_BFC33D94 = 0; - int psx_delay_BFC33D9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC33D30u: goto label_BFC33D30; - case 0xBFC33D9Cu: goto label_BFC33D9C; - default: break; - } - } -label_BFC33D24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33D24: 000630C0 sll $a2, $a2, 3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 3u; - PGXP_ALU(0x000630C0u, cpu->gpr[6], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC33D28: 00C53020 add $a2, $a2, $a1 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (int32_t)cpu->gpr[5]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x00C53020u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D2C: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD2Cu); -#endif -label_BFC33D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD30u); -#endif - /* 0xBFC33D30: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD30u); -#endif - /* 0xBFC33D34: 84AA0004 lh $t2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD34u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33D38: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33D3C: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D40: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D44: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D48: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33D4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D54: 4B98003D gte cmd 0x3D */ - gte_execute(cpu, 0x198003D); -#ifdef PSX_COSIM - cosim_instr(0x8004BD54u); -#endif - /* 0xBFC33D58: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD58u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD58u); -#endif - /* 0xBFC33D5C: 84870004 lh $a3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD5Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x84870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC33D60: 00021C03 sra $v1, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC33D64: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33D68: 20A50008 addi $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A50008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D6C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D70: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33D74: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC33D78: 00481020 add $v0, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[2]; int32_t psx_b = (int32_t)cpu->gpr[8]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[2] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x00481020u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC33D7C: 00691820 add $v1, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[3]; int32_t psx_b = (int32_t)cpu->gpr[9]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[3] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x00691820u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC33D80: 00EA3820 add $a3, $a3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; { int32_t psx_a = (int32_t)cpu->gpr[7]; int32_t psx_b = (int32_t)cpu->gpr[10]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[7] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x00EA3820u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC33D84: A4820000 sh $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD84u); return; } g_debug_last_store_pc = 0x8004BD84u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC33D88: A4830002 sh $v1, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD88u); return; } g_debug_last_store_pc = 0x8004BD88u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4830002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC33D8C: A4870004 sh $a3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BD8Cu); return; } g_debug_last_store_pc = 0x8004BD8Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC33D90: 20840008 addi $a0, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC33D94: 14A6FFE6 bne $a1, $a2, 0xBFC33D30 */ - uint32_t psx_brA_BFC33D94 = cpu->gpr[5]; uint32_t psx_brB_BFC33D94 = cpu->gpr[6]; - psx_taken_BFC33D94 = (psx_brA_BFC33D94 != psx_brB_BFC33D94); - psx_delay_BFC33D94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33D98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BD98u); -#endif - if (psx_delay_BFC33D94) { - psx_delay_BFC33D94 = 0; - if (psx_taken_BFC33D94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BD30u); - goto label_BFC33D30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BD9Cu); - } -label_BFC33D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33D9C: 03E00008 jr $ra */ - psx_delay_BFC33D9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33DA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BDA0u); -#endif - if (psx_delay_BFC33D9C) { - psx_delay_BFC33D9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33DA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33DA4u); - int psx_delay_BFC33E18 = 0; -label_BFC33DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDA4u); -#endif - /* 0xBFC33DA4: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BDA4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDA4u); -#endif - /* 0xBFC33DA8: 848A0004 lh $t2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BDA8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33DAC: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33DB0: 00084400 sll $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 16u; - PGXP_ALU(0x00084400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33DB4: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DB8: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DBC: 48C8A800 ctc2 $t0, gte_ctrl[21] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[21] = cpu->gpr[8]; - PGXP_COP2(0x48C8A800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DC0: 48C9B000 ctc2 $t1, gte_ctrl[22] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[22] = cpu->gpr[9]; - PGXP_COP2(0x48C9B000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DC4: 48CAB800 ctc2 $t2, gte_ctrl[23] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[23] = cpu->gpr[10]; - PGXP_COP2(0x48CAB800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDC4u); -#endif - /* 0xBFC33DC8: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BDC8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDC8u); -#endif - /* 0xBFC33DCC: 84AA0004 lh $t2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004BDCCu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33DD0: 00084C03 sra $t1, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33DD4: 00084400 sll $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 16u; - PGXP_ALU(0x00084400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33DD8: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DDC: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DE0: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DE4: 488A5800 mtc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[10]); - PGXP_COP2(0x488A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33DEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DF0: 4A980011 gte cmd 0x11 */ - gte_execute(cpu, 0x0980011); -#ifdef PSX_COSIM - cosim_instr(0x8004BDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DF4: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DF8: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33DFC: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E00: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC33E04: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC33E08: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC33E0C: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC33E10: ACE80000 sw $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BE10u); return; } g_debug_last_store_pc = 0x8004BE10u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC33E14: ACEA0004 sw $t2, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004BE14u); return; } g_debug_last_store_pc = 0x8004BE14u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACEA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33E18: 03E00008 jr $ra */ - psx_delay_BFC33E18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE1Cu); -#endif - if (psx_delay_BFC33E18) { - psx_delay_BFC33E18 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33E20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33E20u); - int psx_delay_BFC33E64 = 0; -label_BFC33E20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33E20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE20u); -#endif - /* 0xBFC33E20: 90880000 lbu $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 8, 0x10u); - PGXP_LOAD(0x90880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE20u); -#endif - /* 0xBFC33E24: 90890001 lbu $t1, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 9, 0x10u); - PGXP_LOAD(0x90890001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E28: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E2C: 48C8A800 ctc2 $t0, gte_ctrl[21] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[21] = cpu->gpr[8]; - PGXP_COP2(0x48C8A800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E30: 48C9B000 ctc2 $t1, gte_ctrl[22] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[22] = cpu->gpr[9]; - PGXP_COP2(0x48C9B000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE30u); -#endif - /* 0xBFC33E34: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE34u); -#endif - /* 0xBFC33E38: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E3C: 48884800 mtc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[8]); - PGXP_COP2(0x48884800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E40: 48895000 mtc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[9]); - PGXP_COP2(0x48895000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E4C: 4A980011 gte cmd 0x11 */ - gte_execute(cpu, 0x0980011); -#ifdef PSX_COSIM - cosim_instr(0x8004BE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E50: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E54: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E58: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC33E5C: A0E80000 sb $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004BE5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0E80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC33E60: A0E90001 sb $t1, 1($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004BE60u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (1)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0E90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33E64: 03E00008 jr $ra */ - psx_delay_BFC33E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE68u); -#endif - if (psx_delay_BFC33E64) { - psx_delay_BFC33E64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33E80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33E80u); - int psx_delay_BFC33E88 = 0; -label_BFC33E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E80: C8820000 lwc2 gte[2], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8820000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E84: C8830004 lwc2 gte[3], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8830004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33E88: 03E00008 jr $ra */ - psx_delay_BFC33E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE8Cu); -#endif - if (psx_delay_BFC33E88) { - psx_delay_BFC33E88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33E90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33E90u); - int psx_delay_BFC33E98 = 0; -label_BFC33E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E90: C8840000 lwc2 gte[4], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8840000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33E94: C8850004 lwc2 gte[5], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8850004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33E98: 03E00008 jr $ra */ - psx_delay_BFC33E98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33E9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BE9Cu); -#endif - if (psx_delay_BFC33E98) { - psx_delay_BFC33E98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33EA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33EA0u); - int psx_delay_BFC33EB8 = 0; -label_BFC33EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EA0: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EA4: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EA8: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EAC: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EB0: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EB4: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33EB8: 03E00008 jr $ra */ - psx_delay_BFC33EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BEBCu); -#endif - if (psx_delay_BFC33EB8) { - psx_delay_BFC33EB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33EC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33EC0u); - int psx_delay_BFC33EC4 = 0; -label_BFC33EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EC0: C8860000 lwc2 gte[6], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8860000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33EC4: 03E00008 jr $ra */ - psx_delay_BFC33EC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33EC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BEC8u); -#endif - if (psx_delay_BFC33EC4) { - psx_delay_BFC33EC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33ECC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33ECCu); - int psx_delay_BFC33ED8 = 0; -label_BFC33ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33ECC: C8940000 lwc2 gte[20], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[20] = _pgxv; PGXP_COP2(0xC8940000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33ED0: C8B50000 lwc2 gte[21], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[21] = _pgxv; PGXP_COP2(0xC8B50000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33ED4: C8D60000 lwc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[22] = _pgxv; PGXP_COP2(0xC8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004BED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33ED8: 03E00008 jr $ra */ - psx_delay_BFC33ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33EDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BEDCu); -#endif - if (psx_delay_BFC33ED8) { - psx_delay_BFC33ED8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33EE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33EE0u); - int psx_delay_BFC33EEC = 0; -label_BFC33EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EE0: 48844800 mtc2 $a0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 9, cpu->gpr[4]); - PGXP_COP2(0x48844800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EE4: 48855000 mtc2 $a1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 10, cpu->gpr[5]); - PGXP_COP2(0x48855000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EE8: 48865800 mtc2 $a2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 11, cpu->gpr[6]); - PGXP_COP2(0x48865800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33EEC: 03E00008 jr $ra */ - psx_delay_BFC33EEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33EF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BEF0u); -#endif - if (psx_delay_BFC33EEC) { - psx_delay_BFC33EEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33EF4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33EF4u); - int psx_delay_BFC33EF8 = 0; -label_BFC33EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33EF4: 48844000 mtc2 $a0, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[4]); - PGXP_COP2(0x48844000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33EF8: 03E00008 jr $ra */ - psx_delay_BFC33EF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33EFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BEFCu); -#endif - if (psx_delay_BFC33EF8) { - psx_delay_BFC33EF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F00u); - int psx_delay_BFC33F18 = 0; -label_BFC33F00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC33F00: 00042100 sll $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00042100u, cpu->gpr[4], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33F04: 00052900 sll $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 4u; - PGXP_ALU(0x00052900u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33F08: 00063100 sll $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 4u; - PGXP_ALU(0x00063100u, cpu->gpr[6], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F0C: 48C46800 ctc2 $a0, gte_ctrl[13] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[13] = cpu->gpr[4]; - PGXP_COP2(0x48C46800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F10: 48C57000 ctc2 $a1, gte_ctrl[14] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[14] = cpu->gpr[5]; - PGXP_COP2(0x48C57000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F14: 48C67800 ctc2 $a2, gte_ctrl[15] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[15] = cpu->gpr[6]; - PGXP_COP2(0x48C67800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F18: 03E00008 jr $ra */ - psx_delay_BFC33F18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF1Cu); -#endif - if (psx_delay_BFC33F18) { - psx_delay_BFC33F18 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F20u); - int psx_delay_BFC33F38 = 0; -label_BFC33F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC33F20: 00042100 sll $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00042100u, cpu->gpr[4], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33F24: 00052900 sll $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 4u; - PGXP_ALU(0x00052900u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC33F28: 00063100 sll $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 4u; - PGXP_ALU(0x00063100u, cpu->gpr[6], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F2C: 48C4A800 ctc2 $a0, gte_ctrl[21] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[21] = cpu->gpr[4]; - PGXP_COP2(0x48C4A800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F30: 48C5B000 ctc2 $a1, gte_ctrl[22] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[22] = cpu->gpr[5]; - PGXP_COP2(0x48C5B000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F34: 48C6B800 ctc2 $a2, gte_ctrl[23] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[23] = cpu->gpr[6]; - PGXP_COP2(0x48C6B800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F38: 03E00008 jr $ra */ - psx_delay_BFC33F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF3Cu); -#endif - if (psx_delay_BFC33F38) { - psx_delay_BFC33F38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F40u); - int psx_delay_BFC33F4C = 0; -label_BFC33F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F40: 48848800 mtc2 $a0, gte_data[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 17, cpu->gpr[4]); - PGXP_COP2(0x48848800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F44: 48859000 mtc2 $a1, gte_data[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 18, cpu->gpr[5]); - PGXP_COP2(0x48859000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F48: 48869800 mtc2 $a2, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 19, cpu->gpr[6]); - PGXP_COP2(0x48869800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F4C: 03E00008 jr $ra */ - psx_delay_BFC33F4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF50u); -#endif - if (psx_delay_BFC33F4C) { - psx_delay_BFC33F4C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F54u); - int psx_delay_BFC33F64 = 0; -label_BFC33F54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F54: 48848000 mtc2 $a0, gte_data[16] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 16, cpu->gpr[4]); - PGXP_COP2(0x48848000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F58: 48858800 mtc2 $a1, gte_data[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 17, cpu->gpr[5]); - PGXP_COP2(0x48858800u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F5C: 48869000 mtc2 $a2, gte_data[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 18, cpu->gpr[6]); - PGXP_COP2(0x48869000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F60: 48879800 mtc2 $a3, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 19, cpu->gpr[7]); - PGXP_COP2(0x48879800u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F64: 03E00008 jr $ra */ - psx_delay_BFC33F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF68u); -#endif - if (psx_delay_BFC33F64) { - psx_delay_BFC33F64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F6Cu); - int psx_delay_BFC33F78 = 0; -label_BFC33F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F6C: 48846000 mtc2 $a0, gte_data[12] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 12, cpu->gpr[4]); - PGXP_COP2(0x48846000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F70: 48856800 mtc2 $a1, gte_data[13] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 13, cpu->gpr[5]); - PGXP_COP2(0x48856800u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F74: 48867000 mtc2 $a2, gte_data[14] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 14, cpu->gpr[6]); - PGXP_COP2(0x48867000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F78: 03E00008 jr $ra */ - psx_delay_BFC33F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF7Cu); -#endif - if (psx_delay_BFC33F78) { - psx_delay_BFC33F78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F80u); - int psx_delay_BFC33F8C = 0; -label_BFC33F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F80: 48C40000 ctc2 $a0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[4]; - PGXP_COP2(0x48C40000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F84: 48C51000 ctc2 $a1, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[5]; - PGXP_COP2(0x48C51000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F88: 48C62000 ctc2 $a2, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[6]); - PGXP_COP2(0x48C62000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33F8C: 03E00008 jr $ra */ - psx_delay_BFC33F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BF90u); -#endif - if (psx_delay_BFC33F8C) { - psx_delay_BFC33F8C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33F94(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33F94u); - int psx_delay_BFC33FA0 = 0; -label_BFC33F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F94: 4884C800 mtc2 $a0, gte_data[25] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[25] = cpu->gpr[4]; - PGXP_COP2(0x4884C800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F98: 4885D000 mtc2 $a1, gte_data[26] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[26] = cpu->gpr[5]; - PGXP_COP2(0x4885D000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33F9C: 4886D800 mtc2 $a2, gte_data[27] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[27] = cpu->gpr[6]; - PGXP_COP2(0x4886D800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FA0: 03E00008 jr $ra */ - psx_delay_BFC33FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFA4u); -#endif - if (psx_delay_BFC33FA0) { - psx_delay_BFC33FA0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FA8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FA8u); - int psx_delay_BFC33FAC = 0; -label_BFC33FA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FA8: 4884F000 mtc2 $a0, gte_data[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 30, cpu->gpr[4]); - PGXP_COP2(0x4884F000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FAC: 03E00008 jr $ra */ - psx_delay_BFC33FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFB0u); -#endif - if (psx_delay_BFC33FAC) { - psx_delay_BFC33FAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FB4u); - int psx_delay_BFC33FC4 = 0; -label_BFC33FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC33FB4: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC33FB8: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004BFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FBC: 48C4C000 ctc2 $a0, gte_ctrl[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[24] = cpu->gpr[4]; - PGXP_COP2(0x48C4C000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FC0: 48C5C800 ctc2 $a1, gte_ctrl[25] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[25] = cpu->gpr[5]; - PGXP_COP2(0x48C5C800u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FC4: 03E00008 jr $ra */ - psx_delay_BFC33FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFC8u); -#endif - if (psx_delay_BFC33FC4) { - psx_delay_BFC33FC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FCC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FCCu); - int psx_delay_BFC33FD0 = 0; -label_BFC33FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FCC: 48C4D000 ctc2 $a0, gte_ctrl[26] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 26, cpu->gpr[4]); - PGXP_COP2(0x48C4D000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FD0: 03E00008 jr $ra */ - psx_delay_BFC33FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFD4u); -#endif - if (psx_delay_BFC33FD0) { - psx_delay_BFC33FD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FD8u); - int psx_delay_BFC33FDC = 0; -label_BFC33FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FD8: 48C4D800 ctc2 $a0, gte_ctrl[27] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 27, cpu->gpr[4]); - PGXP_COP2(0x48C4D800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FDC: 03E00008 jr $ra */ - psx_delay_BFC33FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFE0u); -#endif - if (psx_delay_BFC33FDC) { - psx_delay_BFC33FDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FE4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FE4u); - int psx_delay_BFC33FE8 = 0; -label_BFC33FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FE4: 48C4E000 ctc2 $a0, gte_ctrl[28] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[28] = cpu->gpr[4]; - PGXP_COP2(0x48C4E000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FE8: 03E00008 jr $ra */ - psx_delay_BFC33FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFECu); -#endif - if (psx_delay_BFC33FE8) { - psx_delay_BFC33FE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FF0u); - int psx_delay_BFC33FF4 = 0; -label_BFC33FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FF0: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC33FF4: 03E00008 jr $ra */ - psx_delay_BFC33FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC33FF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004BFF8u); -#endif - if (psx_delay_BFC33FF4) { - psx_delay_BFC33FF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC33FFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC33FFCu); - int psx_delay_BFC34000 = 0; -label_BFC33FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC33FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC33FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC33FFC: 48024000 mfc2 $v0, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 8); - PGXP_COP2(0x48024000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004BFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34000: 03E00008 jr $ra */ - psx_delay_BFC34000 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34004: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C004u); -#endif - if (psx_delay_BFC34000) { - psx_delay_BFC34000 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34008(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34008u); - int psx_delay_BFC34014 = 0; -label_BFC34008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34008: E8890000 swc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C008u; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3400C: E8AA0000 swc2 gte[10], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C00Cu; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8AA0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34010: E8CB0000 swc2 gte[11], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C010u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8CB0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34014: 03E00008 jr $ra */ - psx_delay_BFC34014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C018u); -#endif - if (psx_delay_BFC34014) { - psx_delay_BFC34014 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3401C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3401Cu); - int psx_delay_BFC34020 = 0; -label_BFC3401C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3401Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3401Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3401C: E8930000 swc2 gte[19], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C01Cu; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = gte_read_data(cpu, 19); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 19); PGXP_COP2(0xE8930000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34020: 03E00008 jr $ra */ - psx_delay_BFC34020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C024u); -#endif - if (psx_delay_BFC34020) { - psx_delay_BFC34020 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34028(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34028u); - int psx_delay_BFC34034 = 0; -label_BFC34028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34028: E8910000 swc2 gte[17], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C028u; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = gte_read_data(cpu, 17); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 17); PGXP_COP2(0xE8910000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3402C: E8B20000 swc2 gte[18], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C02Cu; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 18); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 18); PGXP_COP2(0xE8B20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34030: E8D30000 swc2 gte[19], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C030u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 19); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 19); PGXP_COP2(0xE8D30000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34034: 03E00008 jr $ra */ - psx_delay_BFC34034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C038u); -#endif - if (psx_delay_BFC34034) { - psx_delay_BFC34034 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3403C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3403Cu); - int psx_delay_BFC3404C = 0; -label_BFC3403C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3403Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3403C: E8900000 swc2 gte[16], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C03Cu; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = gte_read_data(cpu, 16); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 16); PGXP_COP2(0xE8900000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34040: E8B10000 swc2 gte[17], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C040u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 17); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 17); PGXP_COP2(0xE8B10000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34044: E8D20000 swc2 gte[18], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C044u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 18); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 18); PGXP_COP2(0xE8D20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34048: E8F30000 swc2 gte[19], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C048u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = gte_read_data(cpu, 19); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 19); PGXP_COP2(0xE8F30000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3404C: 03E00008 jr $ra */ - psx_delay_BFC3404C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C050u); -#endif - if (psx_delay_BFC3404C) { - psx_delay_BFC3404C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34054(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34054u); - int psx_delay_BFC34060 = 0; -label_BFC34054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34054: E88C0000 swc2 gte[12], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C054u; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE88C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34058: E8AD0000 swc2 gte[13], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C058u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE8AD0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3405C: E8CE0000 swc2 gte[14], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C05Cu; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8CE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34060: 03E00008 jr $ra */ - psx_delay_BFC34060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C064u); -#endif - if (psx_delay_BFC34060) { - psx_delay_BFC34060 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34068(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34068u); - int psx_delay_BFC34074 = 0; -label_BFC34068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34068: E8940000 swc2 gte[20], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C068u; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE8940000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3406C: E8B50000 swc2 gte[21], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C06Cu; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE8B50000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34070: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C070u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34074: 03E00008 jr $ra */ - psx_delay_BFC34074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C078u); -#endif - if (psx_delay_BFC34074) { - psx_delay_BFC34074 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3407C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3407Cu); - int psx_delay_BFC34080 = 0; -label_BFC3407C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3407Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3407Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3407C: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34080: 03E00008 jr $ra */ - psx_delay_BFC34080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C084u); -#endif - if (psx_delay_BFC34080) { - psx_delay_BFC34080 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34088(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34088u); - int psx_delay_BFC34094 = 0; -label_BFC34088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34088: E8990000 swc2 gte[25], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C088u; { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8990000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3408C: E8BA0000 swc2 gte[26], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C08Cu; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8BA0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34090: E8DB0000 swc2 gte[27], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004C090u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8DB0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004C090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34094: 03E00008 jr $ra */ - psx_delay_BFC34094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34098: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C098u); -#endif - if (psx_delay_BFC34094) { - psx_delay_BFC34094 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3409C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3409Cu); - int psx_delay_BFC340C4 = 0; -label_BFC3409C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3409Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3409C: 4808E800 mfc2 $t0, gte_data[29] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 29); - PGXP_COP2(0x4808E800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC340A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC340A4: 3109001F andi $t1, $t0, 0x1F */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1Fu; - PGXP_ALU(0x3109001Fu, cpu->gpr[9], _pgx1, 0x001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC340A8: AC890000 sw $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C0A8u); return; } g_debug_last_store_pc = 0x8004C0A8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC340AC: 310903E0 andi $t1, $t0, 0x3E0 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3E0u; - PGXP_ALU(0x310903E0u, cpu->gpr[9], _pgx1, 0x03E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC340B0: 00094942 srl $t1, $t1, 5 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] >> 5u; - PGXP_ALU(0x00094942u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC340B4: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C0B4u); return; } g_debug_last_store_pc = 0x8004C0B4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC340B8: 31097C00 andi $t1, $t0, 0x7C00 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x7C00u; - PGXP_ALU(0x31097C00u, cpu->gpr[9], _pgx1, 0x7C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC340BC: 00094A82 srl $t1, $t1, 10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] >> 10u; - PGXP_ALU(0x00094A82u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC340C0: AC890008 sw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C0C0u); return; } g_debug_last_store_pc = 0x8004C0C0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC340C4: 03E00008 jr $ra */ - psx_delay_BFC340C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC340C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C0C8u); -#endif - if (psx_delay_BFC340C4) { - psx_delay_BFC340C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC340CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC340CCu); - int psx_delay_BFC340D0 = 0; -label_BFC340CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC340CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC340CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC340CC: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC340D0: 03E00008 jr $ra */ - psx_delay_BFC340D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC340D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C0D4u); -#endif - if (psx_delay_BFC340D0) { - psx_delay_BFC340D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC340D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC340D8u); - int psx_delay_BFC340DC = 0; -label_BFC340D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC340D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC340D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC340D8: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC340DC: 03E00008 jr $ra */ - psx_delay_BFC340DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC340E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C0E0u); -#endif - if (psx_delay_BFC340DC) { - psx_delay_BFC340DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC340E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC340E4u); - int psx_delay_BFC340FC = 0; -label_BFC340E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC340E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC340E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC340E4: 4848C000 cfc2 $t0, gte_ctrl[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[24]; - PGXP_COP2(0x4848C000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC340E8: 4849C800 cfc2 $t1, gte_ctrl[25] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[25]; - PGXP_COP2(0x4849C800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC340EC: 00084403 sra $t0, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00084403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC340F0: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC340F4: AC880000 sw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C0F4u); return; } g_debug_last_store_pc = 0x8004C0F4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC340F8: ACA90000 sw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C0F8u); return; } g_debug_last_store_pc = 0x8004C0F8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC340FC: 03E00008 jr $ra */ - psx_delay_BFC340FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C100u); -#endif - if (psx_delay_BFC340FC) { - psx_delay_BFC340FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34104(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34104u); - int psx_delay_BFC34108 = 0; -label_BFC34104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34104: 4842D000 cfc2 $v0, gte_ctrl[26] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 26); - PGXP_COP2(0x4842D000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34108: 03E00008 jr $ra */ - psx_delay_BFC34108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3410C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C10Cu); -#endif - if (psx_delay_BFC34108) { - psx_delay_BFC34108 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34110(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34110u); - int psx_delay_BFC34140 = 0; - int psx_taken_BFC34140 = 0; - int psx_delay_BFC34150 = 0; - int psx_taken_BFC34150 = 0; - int psx_delay_BFC34158 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34120u: goto label_BFC34120; - case 0xBFC34130u: goto label_BFC34130; - case 0xBFC34148u: goto label_BFC34148; - case 0xBFC34158u: goto label_BFC34158; - default: break; - } - } -label_BFC34110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC34110: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34114: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC34118: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3411C: 24090003 addiu $t1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24090003u, cpu->gpr[9], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C11Cu); -#endif -label_BFC34120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC34120: 00027040 sll $t6, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00027040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4180u); -#endif - /* 0xBFC34124: 00EE4021 addu $t0, $a3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[8] = cpu->gpr[7] + cpu->gpr[14]; - PGXP_ALU(0x00EE4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC34128: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3412C: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C12Cu); -#endif -label_BFC34130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C130u); -#endif - /* 0xBFC34130: 850F0000 lh $t7, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C130u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x100u); } - PGXP_LOAD(0x850F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34134: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34138: 24840002 addiu $a0, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (2)); - PGXP_ALU(0x24840002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3413C: 25080006 addiu $t0, $t0, 6 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (6)); - PGXP_ALU(0x25080006u, cpu->gpr[8], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC34140: 1469FFFB bne $v1, $t1, 0xBFC34130 */ - uint32_t psx_brA_BFC34140 = cpu->gpr[3]; uint32_t psx_brB_BFC34140 = cpu->gpr[9]; - psx_taken_BFC34140 = (psx_brA_BFC34140 != psx_brB_BFC34140); - psx_delay_BFC34140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC34144: A48FFFFE sh $t7, -2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C144u); return; } g_debug_last_store_pc = 0x8004C144u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48FFFFEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C144u); -#endif - if (psx_delay_BFC34140) { - psx_delay_BFC34140 = 0; - if (psx_taken_BFC34140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C130u); - goto label_BFC34130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C148u); - } -label_BFC34148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34148: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3414C: 28410003 slti $at, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3) ? 1 : 0); - PGXP_ALU(0x28410003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34150: 1420FFF3 bne $at, $zero, 0xBFC34120 */ - uint32_t psx_brA_BFC34150 = cpu->gpr[1]; uint32_t psx_brB_BFC34150 = cpu->gpr[0]; - psx_taken_BFC34150 = (psx_brA_BFC34150 != psx_brB_BFC34150); - psx_delay_BFC34150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC34154: 24C60006 addiu $a2, $a2, 6 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (6)); - PGXP_ALU(0x24C60006u, cpu->gpr[6], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C154u); -#endif - if (psx_delay_BFC34150) { - psx_delay_BFC34150 = 0; - if (psx_taken_BFC34150) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C120u); - goto label_BFC34120; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C158u); - } -label_BFC34158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34158: 03E00008 jr $ra */ - psx_delay_BFC34158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3415C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C15Cu); -#endif - if (psx_delay_BFC34158) { - psx_delay_BFC34158 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34160(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34160u); - int psx_delay_BFC34180 = 0; - int psx_delay_BFC3418C = 0; - int psx_delay_BFC34198 = 0; - int psx_delay_BFC341A8 = 0; - int psx_delay_BFC341BC = 0; - int psx_delay_BFC341D4 = 0; - int psx_delay_BFC342FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34188u: goto label_BFC34188; - case 0xBFC34194u: goto label_BFC34194; - case 0xBFC341A0u: goto label_BFC341A0; - case 0xBFC341B0u: goto label_BFC341B0; - case 0xBFC341C4u: goto label_BFC341C4; - case 0xBFC341DCu: goto label_BFC341DC; - default: break; - } - } -label_BFC34160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34160: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC34164: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C164u); return; } g_debug_last_store_pc = 0x8004C164u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC34168: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3416C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C16Cu); return; } g_debug_last_store_pc = 0x8004C16Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC34170: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C170u); return; } g_debug_last_store_pc = 0x8004C170u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC34174: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C174u); return; } g_debug_last_store_pc = 0x8004C174u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC34178: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C178u); return; } g_debug_last_store_pc = 0x8004C178u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C178u); -#endif - /* 0xBFC3417C: 86240000 lh $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C17Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34180: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C188u; /* jal link before delay slot */ - psx_delay_BFC34180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC34184: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C184u); -#endif - if (psx_delay_BFC34180) { - psx_delay_BFC34180 = 0; - cpu->gpr[31] = 0x8004C188u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC34188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C188u); -#endif - /* 0xBFC34188: 86240002 lh $a0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C188u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3418C: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C194u; /* jal link before delay slot */ - psx_delay_BFC3418C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC34190: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C190u); -#endif - if (psx_delay_BFC3418C) { - psx_delay_BFC3418C = 0; - cpu->gpr[31] = 0x8004C194u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC34194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C194u); -#endif - /* 0xBFC34194: 86240004 lh $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C194u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34198: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C1A0u; /* jal link before delay slot */ - psx_delay_BFC34198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC3419C: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C19Cu); -#endif - if (psx_delay_BFC34198) { - psx_delay_BFC34198 = 0; - cpu->gpr[31] = 0x8004C1A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC341A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC341A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC341A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC341A0: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1A0u); -#endif - /* 0xBFC341A4: 86240000 lh $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1A4u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC341A8: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C1B0u; /* jal link before delay slot */ - psx_delay_BFC341A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC341AC: AFA70034 sw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1ACu); return; } g_debug_last_store_pc = 0x8004C1ACu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1ACu); -#endif - if (psx_delay_BFC341A8) { - psx_delay_BFC341A8 = 0; - cpu->gpr[31] = 0x8004C1B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC341B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC341B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC341B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1B0u); -#endif - /* 0xBFC341B0: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1B0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC341B4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1B4u); -#endif - /* 0xBFC341B8: 86240002 lh $a0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1B8u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC341BC: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C1C4u; /* jal link before delay slot */ - psx_delay_BFC341BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC341C0: AFA50030 sw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1C0u); return; } g_debug_last_store_pc = 0x8004C1C0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1C0u); -#endif - if (psx_delay_BFC341BC) { - psx_delay_BFC341BC = 0; - cpu->gpr[31] = 0x8004C1C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC341C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC341C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC341C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1C4u); -#endif - /* 0xBFC341C4: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1C4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1C4u); -#endif - /* 0xBFC341C8: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1C8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC341CC: 00023023 subu $a2, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00023023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1D0u); -#endif - /* 0xBFC341D0: 86240004 lh $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1D0u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC341D4: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C1DCu; /* jal link before delay slot */ - psx_delay_BFC341D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC341D8: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1D8u); return; } g_debug_last_store_pc = 0x8004C1D8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1D8u); -#endif - if (psx_delay_BFC341D4) { - psx_delay_BFC341D4 = 0; - cpu->gpr[31] = 0x8004C1DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC341DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC341DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC341DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1DCu); -#endif - /* 0xBFC341DC: 8FA70034 lw $a3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1DCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70034u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1E0u); -#endif - /* 0xBFC341E0: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1E0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80080u); -#endif - /* 0xBFC341E4: 00F30019 multu $a3, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[7] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[7])); -#endif - PGXP_MULDIV(0x00F30019u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C1E4u); -#endif - /* 0xBFC341E8: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1E8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC341EC: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC341F0: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC341F4: A60F0000 sh $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C1F4u); return; } g_debug_last_store_pc = 0x8004C1F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC341F8: 00E60019 multu $a3, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[7] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[7])); -#endif - PGXP_MULDIV(0x00E60019u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC341FC: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34200: 00031B03 sra $v1, $v1, 12 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 12u); - PGXP_ALU(0x00031B03u, cpu->gpr[3], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34204: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC34208: 00520019 multu $v0, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00520019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004C208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3420C: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC34210: 0018CB03 sra $t9, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] >> 12u); - PGXP_ALU(0x0018CB03u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34214: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC34218: 00650019 multu $v1, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00650019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3421C: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC34220: 00084B03 sra $t1, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 12u); - PGXP_ALU(0x00084B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC34224: 03295023 subu $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] - cpu->gpr[9]; - PGXP_ALU(0x03295023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC34228: 00450019 multu $v0, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00450019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004C228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC3422C: A60A0006 sh $t2, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C22Cu); return; } g_debug_last_store_pc = 0x8004C22Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34230: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC34234: 000B6303 sra $t4, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34238: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40008u); -#endif - /* 0xBFC3423C: 00720019 multu $v1, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00720019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004C23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34240: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC34244: 000D7303 sra $t6, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D7303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC34248: 018E7821 addu $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC3424C: 00530019 multu $v0, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00530019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC34250: A60F000C sh $t7, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C250u); return; } g_debug_last_store_pc = 0x8004C250u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34254: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000101u); -#endif - /* 0xBFC34258: 00184023 subu $t0, $zero, $t8 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[8] = cpu->gpr[0] - cpu->gpr[24]; - PGXP_ALU(0x00184023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3425C: 0008CB03 sra $t9, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] >> 12u); - PGXP_ALU(0x0008CB03u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC34260: 00460019 multu $v0, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00460019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC34264: A6190002 sh $t9, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C264u); return; } g_debug_last_store_pc = 0x8004C264u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA6190002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC34268: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3426C: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34270: 00042303 sra $a0, $a0, 12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 12u); - PGXP_ALU(0x00042303u, cpu->gpr[4], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34274: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40080u); -#endif - /* 0xBFC34278: 00F20019 multu $a3, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[7] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[7])); -#endif - PGXP_MULDIV(0x00F20019u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004C278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3427C: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC34280: 00095303 sra $t2, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00095303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC34284: 00064823 subu $t1, $zero, $a2 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[0] - cpu->gpr[6]; - PGXP_ALU(0x00064823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC34288: 00850019 multu $a0, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00850019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004C288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC3428C: A6090004 sh $t1, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C28Cu); return; } g_debug_last_store_pc = 0x8004C28Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34290: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC34294: 000B6B03 sra $t5, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3400u); -#endif - /* 0xBFC34298: 014D6021 addu $t4, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[13]; - PGXP_ALU(0x014D6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3429C: 00E50019 multu $a3, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[7] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[7])); -#endif - PGXP_MULDIV(0x00E50019u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004C29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11000u); -#endif - /* 0xBFC342A0: A60C0008 sh $t4, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2A0u); return; } g_debug_last_store_pc = 0x8004C2A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA60C0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC342A4: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC342A8: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC342AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40010u); -#endif - /* 0xBFC342B0: 00920019 multu $a0, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00920019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004C2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC342B4: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC342B8: 00184303 sra $t0, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[24] >> 12u); - PGXP_ALU(0x00184303u, cpu->gpr[8], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC342BC: 01E8C823 subu $t9, $t7, $t0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[8]; - PGXP_ALU(0x01E8C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80020u); -#endif - /* 0xBFC342C0: 02650019 multu $s3, $a1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[19] * (uint64_t)cpu->gpr[5]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[19])); -#endif - PGXP_MULDIV(0x02650019u, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC342C4: A619000E sh $t9, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2C4u); return; } g_debug_last_store_pc = 0x8004C2C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA619000Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC342C8: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC01u); -#endif - /* 0xBFC342CC: 000B5023 subu $t2, $zero, $t3 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[10] = cpu->gpr[0] - cpu->gpr[11]; - PGXP_ALU(0x000B5023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC342D0: 000A6B03 sra $t5, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC342D4: 02720019 multu $s3, $s2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[19] * (uint64_t)cpu->gpr[18]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[19])); -#endif - PGXP_MULDIV(0x02720019u, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[18]); -#ifdef PSX_COSIM - cosim_instr(0x8004C2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC342D8: A60D000A sh $t5, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2D8u); return; } g_debug_last_store_pc = 0x8004C2D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC342DC: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC342E0: 000C7303 sra $t6, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] >> 12u); - PGXP_ALU(0x000C7303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC342E4: A60E0010 sh $t6, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2E4u); return; } g_debug_last_store_pc = 0x8004C2E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2E4u); -#endif - /* 0xBFC342E8: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2E8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2E8u); -#endif - /* 0xBFC342EC: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2ECu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C2F0u); -#endif - /* 0xBFC342F0: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2F0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2F0u); -#endif - /* 0xBFC342F4: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2F4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2F4u); -#endif - /* 0xBFC342F8: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C2F8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC342FC: 03E00008 jr $ra */ - psx_delay_BFC342FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34300: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C300u); -#endif - if (psx_delay_BFC342FC) { - psx_delay_BFC342FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34304(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34304u); - int psx_delay_BFC34324 = 0; - int psx_delay_BFC34330 = 0; - int psx_delay_BFC3433C = 0; - int psx_delay_BFC3434C = 0; - int psx_delay_BFC34360 = 0; - int psx_delay_BFC34378 = 0; - int psx_delay_BFC3449C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3432Cu: goto label_BFC3432C; - case 0xBFC34338u: goto label_BFC34338; - case 0xBFC34344u: goto label_BFC34344; - case 0xBFC34354u: goto label_BFC34354; - case 0xBFC34368u: goto label_BFC34368; - case 0xBFC34380u: goto label_BFC34380; - default: break; - } - } -label_BFC34304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34304: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC34308: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C308u); return; } g_debug_last_store_pc = 0x8004C308u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC3430C: 00808821 addu $s1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34310: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C310u); return; } g_debug_last_store_pc = 0x8004C310u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC34314: AFB30020 sw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C314u); return; } g_debug_last_store_pc = 0x8004C314u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC34318: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C318u); return; } g_debug_last_store_pc = 0x8004C318u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3431C: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C31Cu); return; } g_debug_last_store_pc = 0x8004C31Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C320u); -#endif - /* 0xBFC34320: 86240000 lh $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C320u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34324: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C32Cu; /* jal link before delay slot */ - psx_delay_BFC34324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC34328: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C328u); -#endif - if (psx_delay_BFC34324) { - psx_delay_BFC34324 = 0; - cpu->gpr[31] = 0x8004C32Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC3432C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3432Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3432Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C32Cu); -#endif - /* 0xBFC3432C: 86240002 lh $a0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C32Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34330: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C338u; /* jal link before delay slot */ - psx_delay_BFC34330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80005u); -#endif - /* 0xBFC34334: 00409821 addu $s3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C334u); -#endif - if (psx_delay_BFC34330) { - psx_delay_BFC34330 = 0; - cpu->gpr[31] = 0x8004C338u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC34338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C338u); -#endif - /* 0xBFC34338: 86240004 lh $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C338u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3433C: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C344u; /* jal link before delay slot */ - psx_delay_BFC3433C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40005u); -#endif - /* 0xBFC34340: 00409021 addu $s2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00409021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C340u); -#endif - if (psx_delay_BFC3433C) { - psx_delay_BFC3433C = 0; - cpu->gpr[31] = 0x8004C344u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC34344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC34344: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C344u); -#endif - /* 0xBFC34348: 86240000 lh $a0, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C348u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3434C: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C354u; /* jal link before delay slot */ - psx_delay_BFC3434C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC34350: AFA60034 sw $a2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C350u); return; } g_debug_last_store_pc = 0x8004C350u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60034u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C350u); -#endif - if (psx_delay_BFC3434C) { - psx_delay_BFC3434C = 0; - cpu->gpr[31] = 0x8004C354u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC34354: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34354u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C354u); -#endif - /* 0xBFC34354: 8FA60034 lw $a2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C354u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60034u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC34358: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C358u); -#endif - /* 0xBFC3435C: 86240002 lh $a0, 2($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C35Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34360: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C368u; /* jal link before delay slot */ - psx_delay_BFC34360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC34364: AFA70030 sw $a3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C364u); return; } g_debug_last_store_pc = 0x8004C364u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70030u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C364u); -#endif - if (psx_delay_BFC34360) { - psx_delay_BFC34360 = 0; - cpu->gpr[31] = 0x8004C368u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC34368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C368u); -#endif - /* 0xBFC34368: 8FA60034 lw $a2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C368u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60034u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C368u); -#endif - /* 0xBFC3436C: 8FA70030 lw $a3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C36Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70030u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC34370: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C370u); -#endif - /* 0xBFC34374: 86240004 lh $a0, 4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C374u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000u); } - PGXP_LOAD(0x86240004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34378: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C380u; /* jal link before delay slot */ - psx_delay_BFC34378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3437C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C37Cu); return; } g_debug_last_store_pc = 0x8004C37Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C37Cu); -#endif - if (psx_delay_BFC34378) { - psx_delay_BFC34378 = 0; - cpu->gpr[31] = 0x8004C380u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC34380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C380u); -#endif - /* 0xBFC34380: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C380u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C380u); -#endif - /* 0xBFC34384: 8FA70030 lw $a3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C384u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70030u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C384u); -#endif - /* 0xBFC34388: 8FA60034 lw $a2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C388u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60034u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3438C: 00A70019 multu $a1, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[5] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[5])); -#endif - PGXP_MULDIV(0x00A70019u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34390: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34394: 00031B03 sra $v1, $v1, 12 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 12u); - PGXP_ALU(0x00031B03u, cpu->gpr[3], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40040u); -#endif - /* 0xBFC3439C: 02460019 multu $s2, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02460019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC343A0: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC343A4: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC343A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC343AC: 00620019 multu $v1, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00620019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x8004C3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC343B0: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC343B4: 0018CB03 sra $t9, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] >> 12u); - PGXP_ALU(0x0018CB03u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC343B8: 01F94021 addu $t0, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[15] + cpu->gpr[25]; - PGXP_ALU(0x01F94021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC343BC: 00530019 multu $v0, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00530019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC343C0: A6080000 sh $t0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C3C0u); return; } g_debug_last_store_pc = 0x8004C3C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA6080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC343C4: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC343C8: 00095303 sra $t2, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00095303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC343CC: A60A0006 sh $t2, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C3CCu); return; } g_debug_last_store_pc = 0x8004C3CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40080u); -#endif - /* 0xBFC343D0: 02470019 multu $s2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02470019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC343D4: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC343D8: 00042303 sra $a0, $a0, 12 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 12u); - PGXP_ALU(0x00042303u, cpu->gpr[4], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC343DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC343E0: 00820019 multu $a0, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00820019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x8004C3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC343E4: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC343E8: 000B6303 sra $t4, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC343EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC343F0: 00A60019 multu $a1, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[5] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[5])); -#endif - PGXP_MULDIV(0x00A60019u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC343F4: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC343F8: 000D7303 sra $t6, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D7303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1005000u); -#endif - /* 0xBFC343FC: 018EC023 subu $t8, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[12] - cpu->gpr[14]; - PGXP_ALU(0x018EC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC34400: 00660019 multu $v1, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00660019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC34404: A618000C sh $t8, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C404u); return; } g_debug_last_store_pc = 0x8004C404u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA618000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34408: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC3440C: 000FCB03 sra $t9, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[15] >> 12u); - PGXP_ALU(0x000FCB03u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC34414: 02420019 multu $s2, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02420019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x8004C414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC34418: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3441C: 00084B03 sra $t1, $t0, 12 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 12u); - PGXP_ALU(0x00084B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC34420: 03295023 subu $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] - cpu->gpr[9]; - PGXP_ALU(0x03295023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80040u); -#endif - /* 0xBFC34424: 00D30019 multu $a2, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00D30019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC34428: A60A0002 sh $t2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C428u); return; } g_debug_last_store_pc = 0x8004C428u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x481u); -#endif - /* 0xBFC3442C: 00075023 subu $t2, $zero, $a3 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[10] = cpu->gpr[0] - cpu->gpr[7]; - PGXP_ALU(0x00075023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC34430: A60A000A sh $t2, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C430u); return; } g_debug_last_store_pc = 0x8004C430u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34434: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC34438: 000B6B03 sra $t5, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC3443C: A60D0008 sh $t5, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C43Cu); return; } g_debug_last_store_pc = 0x8004C43Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC34440: 00A20019 multu $a1, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[5] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[5])); -#endif - PGXP_MULDIV(0x00A20019u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x8004C440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC34444: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34448: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC3444C: 000C7303 sra $t6, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[12] >> 12u); - PGXP_ALU(0x000C7303u, cpu->gpr[14], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC34454: 00860019 multu $a0, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00860019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34458: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3445C: 00187B03 sra $t7, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[24] >> 12u); - PGXP_ALU(0x00187B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC100u); -#endif - /* 0xBFC34460: 01CF4021 addu $t0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[8] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF4021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80020u); -#endif - /* 0xBFC34464: 00B30019 multu $a1, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[5] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[5])); -#endif - PGXP_MULDIV(0x00B30019u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC34468: A608000E sh $t0, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C468u); return; } g_debug_last_store_pc = 0x8004C468u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA608000Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3446C: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC34470: 00194B03 sra $t1, $t9, 12 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[25] >> 12u); - PGXP_ALU(0x00194B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10200u); -#endif - /* 0xBFC34474: A6090004 sh $t1, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C474u); return; } g_debug_last_store_pc = 0x8004C474u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA6090004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0000u); -#endif - /* 0xBFC34478: 02530019 multu $s2, $s3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[18] * (uint64_t)cpu->gpr[19]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[18])); -#endif - PGXP_MULDIV(0x02530019u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[19]); -#ifdef PSX_COSIM - cosim_instr(0x8004C478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3447C: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC34480: 000B6B03 sra $t5, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC34484: A60D0010 sh $t5, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C484u); return; } g_debug_last_store_pc = 0x8004C484u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D0010u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C484u); -#endif - /* 0xBFC34488: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C488u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C488u); -#endif - /* 0xBFC3448C: 8FB30020 lw $s3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C48Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30020u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C490u); -#endif - /* 0xBFC34490: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C490u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C490u); -#endif - /* 0xBFC34494: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C494u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C494u); -#endif - /* 0xBFC34498: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C498u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3449C: 03E00008 jr $ra */ - psx_delay_BFC3449C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC344A0: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4A0u); -#endif - if (psx_delay_BFC3449C) { - psx_delay_BFC3449C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC344A4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC344A4u); - int psx_delay_BFC344B4 = 0; - int psx_delay_BFC344C8 = 0; - int psx_delay_BFC345EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC344BCu: goto label_BFC344BC; - case 0xBFC344D0u: goto label_BFC344D0; - default: break; - } - } -label_BFC344A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC344A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC344A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC344A4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC344A8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4A8u); return; } g_debug_last_store_pc = 0x8004C4A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC344AC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4ACu); return; } g_debug_last_store_pc = 0x8004C4ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4B0u); -#endif - /* 0xBFC344B0: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4B0u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC344B4: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C4BCu; /* jal link before delay slot */ - psx_delay_BFC344B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC344B8: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4B8u); return; } g_debug_last_store_pc = 0x8004C4B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4B8u); -#endif - if (psx_delay_BFC344B4) { - psx_delay_BFC344B4 = 0; - cpu->gpr[31] = 0x8004C4BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC344BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC344BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC344BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4BCu); -#endif - /* 0xBFC344BC: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4BCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC344C0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4C0u); -#endif - /* 0xBFC344C4: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4C4u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC344C8: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C4D0u; /* jal link before delay slot */ - psx_delay_BFC344C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC344CC: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4CCu); return; } g_debug_last_store_pc = 0x8004C4CCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4CCu); -#endif - if (psx_delay_BFC344C8) { - psx_delay_BFC344C8 = 0; - cpu->gpr[31] = 0x8004C4D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC344D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC344D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC344D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4D0u); -#endif - /* 0xBFC344D0: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4D0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4D0u); -#endif - /* 0xBFC344D4: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4D4u); -#endif - /* 0xBFC344D8: 84A40006 lh $a0, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4D8u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20u); } - PGXP_LOAD(0x84A40006u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4D8u); -#endif - /* 0xBFC344DC: 84A6000C lh $a2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4DCu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x84A6000Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC344E0: 00640019 multu $v1, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00640019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C4E0u); -#endif - /* 0xBFC344E4: 84A70008 lh $a3, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4E4u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20u); } - PGXP_LOAD(0x84A70008u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4E4u); -#endif - /* 0xBFC344E8: 84A8000E lh $t0, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4E8u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x84A8000Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4E8u); -#endif - /* 0xBFC344EC: 84A9000A lh $t1, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4ECu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x84A9000Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C4F0u); -#endif - /* 0xBFC344F0: 84AA0010 lh $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C4F0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC344F4: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC344F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC344FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC34500: 00460019 multu $v0, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00460019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34504: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC800u); -#endif - /* 0xBFC34508: 01CF5823 subu $t3, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[11] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3450C: 000B5B03 sra $t3, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B5B03u, cpu->gpr[11], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC34510: 00670019 multu $v1, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00670019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34514: 000B5C00 sll $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B5C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34518: 000B5C03 sra $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 16u); - PGXP_ALU(0x000B5C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3451C: A4AB0006 sh $t3, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C51Cu); return; } g_debug_last_store_pc = 0x8004C51Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34520: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34524: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3452C: 00480019 multu $v0, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00480019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34530: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3001000u); -#endif - /* 0xBFC34534: 03196023 subu $t4, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[12] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03196023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34538: 000C6303 sra $t4, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 12u); - PGXP_ALU(0x000C6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3453C: 00690019 multu $v1, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00690019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34540: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34544: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC34548: A4AC0008 sh $t4, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C548u); return; } g_debug_last_store_pc = 0x8004C548u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0008u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3454C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34550: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC34558: 004A0019 multu $v0, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x004A0019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3455C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC34560: 01CF6823 subu $t5, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34564: 000D6B03 sra $t5, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC34568: 00440019 multu $v0, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00440019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3456C: 000D6C00 sll $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 16u; - PGXP_ALU(0x000D6C00u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34570: 000D6C03 sra $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 16u); - PGXP_ALU(0x000D6C03u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC34574: A4AD000A sh $t5, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C574u); return; } g_debug_last_store_pc = 0x8004C574u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34578: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3457C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC34584: 00660019 multu $v1, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00660019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34588: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC3458C: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34590: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC34594: 00470019 multu $v0, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00470019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34598: A4AF000C sh $t7, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C598u); return; } g_debug_last_store_pc = 0x8004C598u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3459C: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC345A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC345A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC345A8: 00680019 multu $v1, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00680019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC345AC: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC345B0: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC345B4: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC345B8: 00490019 multu $v0, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00490019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC345BC: A4AF000E sh $t7, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C5BCu); return; } g_debug_last_store_pc = 0x8004C5BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC345C0: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC345C4: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC345C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC345CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC345D0: 006A0019 multu $v1, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006A0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC345D4: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC345D8: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC345DC: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC345E0: A4AF0010 sh $t7, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C5E0u); return; } g_debug_last_store_pc = 0x8004C5E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5E0u); -#endif - /* 0xBFC345E4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C5E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC345E8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC345EC: 03E00008 jr $ra */ - psx_delay_BFC345EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC345F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C5F0u); -#endif - if (psx_delay_BFC345EC) { - psx_delay_BFC345EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC345F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC345F4u); - int psx_delay_BFC34604 = 0; - int psx_delay_BFC34618 = 0; - int psx_delay_BFC34740 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3460Cu: goto label_BFC3460C; - case 0xBFC34620u: goto label_BFC34620; - default: break; - } - } -label_BFC345F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC345F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC345F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC345F4: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC345F8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C5F8u); return; } g_debug_last_store_pc = 0x8004C5F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC345FC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C5FCu); return; } g_debug_last_store_pc = 0x8004C5FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C600u); -#endif - /* 0xBFC34600: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C600u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34604: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C60Cu; /* jal link before delay slot */ - psx_delay_BFC34604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34608: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C608u); return; } g_debug_last_store_pc = 0x8004C608u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C608u); -#endif - if (psx_delay_BFC34604) { - psx_delay_BFC34604 = 0; - cpu->gpr[31] = 0x8004C60Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC3460C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3460Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3460Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C60Cu); -#endif - /* 0xBFC3460C: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C60Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC34610: 00403021 addu $a2, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C610u); -#endif - /* 0xBFC34614: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C614u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34618: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C620u; /* jal link before delay slot */ - psx_delay_BFC34618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3461C: AFA60024 sw $a2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C61Cu); return; } g_debug_last_store_pc = 0x8004C61Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60024u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C61Cu); -#endif - if (psx_delay_BFC34618) { - psx_delay_BFC34618 = 0; - cpu->gpr[31] = 0x8004C620u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC34620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C620u); -#endif - /* 0xBFC34620: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C620u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C620u); -#endif - /* 0xBFC34624: 8FA60024 lw $a2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C624u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60024u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C624u); -#endif - /* 0xBFC34628: 84A40000 lh $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C628u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20u); } - PGXP_LOAD(0x84A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C628u); -#endif - /* 0xBFC3462C: 84A7000C lh $a3, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C62Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20u); } - PGXP_LOAD(0x84A7000Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC34630: 00C40019 multu $a2, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C40019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC34634: 00021823 subu $v1, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C634u); -#endif - /* 0xBFC34638: 84A80002 lh $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C638u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x84A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C638u); -#endif - /* 0xBFC3463C: 84A9000E lh $t1, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C63Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x84A9000Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C640u); -#endif - /* 0xBFC34640: 84AA0004 lh $t2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C640u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C640u); -#endif - /* 0xBFC34644: 84AB0010 lh $t3, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C644u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20u); } - PGXP_LOAD(0x84AB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC34648: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3464C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34654: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC34658: 00670019 multu $v1, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00670019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3465C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC34660: 01CF6023 subu $t4, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[12] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34664: 000C6303 sra $t4, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 12u); - PGXP_ALU(0x000C6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC34668: 00C80019 multu $a2, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C80019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3466C: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC34670: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC34674: A4AC0000 sh $t4, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C674u); return; } g_debug_last_store_pc = 0x8004C674u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34678: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3467C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC34684: 00690019 multu $v1, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00690019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34688: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3002000u); -#endif - /* 0xBFC3468C: 03196823 subu $t5, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03196823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34690: 000D6B03 sra $t5, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC34694: 00CA0019 multu $a2, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00CA0019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34698: 000D6C00 sll $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 16u; - PGXP_ALU(0x000D6C00u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3469C: 000D6C03 sra $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 16u); - PGXP_ALU(0x000D6C03u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC346A0: A4AD0002 sh $t5, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C6A0u); return; } g_debug_last_store_pc = 0x8004C6A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD0002u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC346A4: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC346B0: 006B0019 multu $v1, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006B0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004C6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC346B4: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000C000u); -#endif - /* 0xBFC346B8: 01CFF823 subu $ra, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[31] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CFF823u, cpu->gpr[31], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC346BC: 001FFB03 sra $ra, $ra, 12 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] >> 12u); - PGXP_ALU(0x001FFB03u, cpu->gpr[31], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC346C0: 00640019 multu $v1, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00640019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC346C4: 001FFC00 sll $ra, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = cpu->gpr[31] << 16u; - PGXP_ALU(0x001FFC00u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC346C8: 001FFC03 sra $ra, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] >> 16u); - PGXP_ALU(0x001FFC03u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000020u); -#endif - /* 0xBFC346CC: A4BF0004 sh $ra, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C6CCu); return; } g_debug_last_store_pc = 0x8004C6CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[31] & 0xFFFFu)); } - PGXP_STORE(0xA4BF0004u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC346D0: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC346DC: 00C70019 multu $a2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C70019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC346E0: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC346E4: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC346E8: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC346EC: 00680019 multu $v1, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00680019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC346F0: A4AF000C sh $t7, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C6F0u); return; } g_debug_last_store_pc = 0x8004C6F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC346F4: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC346FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC34700: 00C90019 multu $a2, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C90019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34704: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC34708: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3470C: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC34710: 006A0019 multu $v1, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006A0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34714: A4AF000E sh $t7, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C714u); return; } g_debug_last_store_pc = 0x8004C714u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34718: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3471C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34720: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC34724: 00CB0019 multu $a2, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00CB0019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004C724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34728: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC3472C: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34730: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34734: A4AF0010 sh $t7, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C734u); return; } g_debug_last_store_pc = 0x8004C734u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C734u); -#endif - /* 0xBFC34738: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C738u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3473C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34740: 03E00008 jr $ra */ - psx_delay_BFC34740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34744: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C744u); -#endif - if (psx_delay_BFC34740) { - psx_delay_BFC34740 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34748(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34748u); - int psx_delay_BFC34758 = 0; - int psx_delay_BFC3476C = 0; - int psx_delay_BFC34890 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34760u: goto label_BFC34760; - case 0xBFC34774u: goto label_BFC34774; - default: break; - } - } -label_BFC34748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34748: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3474C: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C74Cu); return; } g_debug_last_store_pc = 0x8004C74Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34750: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C750u); return; } g_debug_last_store_pc = 0x8004C750u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C750u); -#endif - /* 0xBFC34754: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C754u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34758: 0C01326E jal 0xB004C9B8 */ - cpu->gpr[31] = 0x8004C760u; /* jal link before delay slot */ - psx_delay_BFC34758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3475C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C75Cu); return; } g_debug_last_store_pc = 0x8004C75Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C75Cu); -#endif - if (psx_delay_BFC34758) { - psx_delay_BFC34758 = 0; - cpu->gpr[31] = 0x8004C760u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B8u); - cpu->pc = 0x8004C9B8u; return; - } -label_BFC34760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C760u); -#endif - /* 0xBFC34760: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C760u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC34764: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C764u); -#endif - /* 0xBFC34768: 87A40028 lh $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C768u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3476C: 0C013226 jal 0xB004C898 */ - cpu->gpr[31] = 0x8004C774u; /* jal link before delay slot */ - psx_delay_BFC3476C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC34770: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C770u); return; } g_debug_last_store_pc = 0x8004C770u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C770u); -#endif - if (psx_delay_BFC3476C) { - psx_delay_BFC3476C = 0; - cpu->gpr[31] = 0x8004C774u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C898u); - cpu->pc = 0x8004C898u; return; - } -label_BFC34774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C774u); -#endif - /* 0xBFC34774: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C774u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C774u); -#endif - /* 0xBFC34778: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C778u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C778u); -#endif - /* 0xBFC3477C: 84A40000 lh $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C77Cu); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20u); } - PGXP_LOAD(0x84A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C780u); -#endif - /* 0xBFC34780: 84A60006 lh $a2, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C780u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x84A60006u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC34784: 00640019 multu $v1, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00640019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C784u); -#endif - /* 0xBFC34788: 84A70002 lh $a3, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C788u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20u); } - PGXP_LOAD(0x84A70002u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C788u); -#endif - /* 0xBFC3478C: 84A80008 lh $t0, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C78Cu); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x84A80008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C790u); -#endif - /* 0xBFC34790: 84A90004 lh $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C790u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x84A90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C790u); -#endif - /* 0xBFC34794: 84AA000A lh $t2, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C794u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC34798: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3479C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC347A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC347A4: 00460019 multu $v0, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00460019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC347A8: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC800u); -#endif - /* 0xBFC347AC: 01CF5823 subu $t3, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[11] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC347B0: 000B5B03 sra $t3, $t3, 12 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 12u); - PGXP_ALU(0x000B5B03u, cpu->gpr[11], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC347B4: 00670019 multu $v1, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00670019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC347B8: 000B5C00 sll $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B5C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC347BC: 000B5C03 sra $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 16u); - PGXP_ALU(0x000B5C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC347C0: A4AB0000 sh $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C7C0u); return; } g_debug_last_store_pc = 0x8004C7C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC347C4: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC347C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC347CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC347D0: 00480019 multu $v0, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00480019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC347D4: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3001000u); -#endif - /* 0xBFC347D8: 03196023 subu $t4, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[12] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03196023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC347DC: 000C6303 sra $t4, $t4, 12 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 12u); - PGXP_ALU(0x000C6303u, cpu->gpr[12], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC347E0: 00690019 multu $v1, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00690019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC347E4: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC347E8: 000C6403 sra $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 16u); - PGXP_ALU(0x000C6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC347EC: A4AC0002 sh $t4, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C7ECu); return; } g_debug_last_store_pc = 0x8004C7ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC347F0: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC347F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC347F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC347FC: 004A0019 multu $v0, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x004A0019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34800: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC34804: 01CF6823 subu $t5, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34808: 000D6B03 sra $t5, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 12u); - PGXP_ALU(0x000D6B03u, cpu->gpr[13], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3480C: 00440019 multu $v0, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00440019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x8004C80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34810: 000D6C00 sll $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] << 16u; - PGXP_ALU(0x000D6C00u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC34814: 000D6C03 sra $t5, $t5, 16 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] >> 16u); - PGXP_ALU(0x000D6C03u, cpu->gpr[13], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC34818: A4AD0004 sh $t5, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C818u); return; } g_debug_last_store_pc = 0x8004C818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3481C: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC34828: 00660019 multu $v1, $a2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[6]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00660019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[6]); -#ifdef PSX_COSIM - cosim_instr(0x8004C828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3482C: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC34830: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34834: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC34838: 00470019 multu $v0, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00470019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004C838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3483C: A4AF0006 sh $t7, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C83Cu); return; } g_debug_last_store_pc = 0x8004C83Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34840: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3484C: 00680019 multu $v1, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00680019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x8004C84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34850: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC34854: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34858: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3485C: 00490019 multu $v0, $t1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[9]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00490019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[9]); -#ifdef PSX_COSIM - cosim_instr(0x8004C85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34860: A4AF0008 sh $t7, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C860u); return; } g_debug_last_store_pc = 0x8004C860u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC34864: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34868: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3486C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC34874: 006A0019 multu $v1, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006A0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34878: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC3487C: 03197021 addu $t6, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03197021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34880: 000E7B03 sra $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 12u); - PGXP_ALU(0x000E7B03u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34884: A4AF000A sh $t7, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C884u); return; } g_debug_last_store_pc = 0x8004C884u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF000Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C884u); -#endif - /* 0xBFC34888: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C888u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3488C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34890: 03E00008 jr $ra */ - psx_delay_BFC34890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34894: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C894u); -#endif - if (psx_delay_BFC34890) { - psx_delay_BFC34890 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34898(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34898u); - int psx_delay_BFC348A0 = 0; - int psx_taken_BFC348A0 = 0; - int psx_delay_BFC348AC = 0; - int psx_taken_BFC348AC = 0; - int psx_delay_BFC348B4 = 0; - int psx_taken_BFC348B4 = 0; - int psx_delay_BFC348C0 = 0; - int psx_delay_BFC348C8 = 0; - int psx_taken_BFC348C8 = 0; - int psx_delay_BFC348D0 = 0; - int psx_taken_BFC348D0 = 0; - int psx_delay_BFC348D8 = 0; - int psx_taken_BFC348D8 = 0; - int psx_delay_BFC348E4 = 0; - int psx_delay_BFC348F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC348A8u: goto label_BFC348A8; - case 0xBFC348B4u: goto label_BFC348B4; - case 0xBFC348BCu: goto label_BFC348BC; - case 0xBFC348C0u: goto label_BFC348C0; - case 0xBFC348C8u: goto label_BFC348C8; - case 0xBFC348D0u: goto label_BFC348D0; - case 0xBFC348D8u: goto label_BFC348D8; - case 0xBFC348E0u: goto label_BFC348E0; - case 0xBFC348E4u: goto label_BFC348E4; - case 0xBFC348ECu: goto label_BFC348EC; - default: break; - } - } -label_BFC34898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34898: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3489C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348A0: 0461000B bgez $v1, 0xBFC348D0 */ - uint32_t psx_brA_BFC348A0 = cpu->gpr[3]; - psx_taken_BFC348A0 = ((int32_t)psx_brA_BFC348A0 >= 0); - psx_delay_BFC348A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC348A4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C8A4u); return; } g_debug_last_store_pc = 0x8004C8A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8A4u); -#endif - if (psx_delay_BFC348A0) { - psx_delay_BFC348A0 = 0; - if (psx_taken_BFC348A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8D0u); - goto label_BFC348D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8A8u); - } -label_BFC348A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC348A8: 00031823 subu $v1, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00031823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348AC: 04610004 bgez $v1, 0xBFC348C0 */ - uint32_t psx_brA_BFC348AC = cpu->gpr[3]; - psx_taken_BFC348AC = ((int32_t)psx_brA_BFC348AC >= 0); - psx_delay_BFC348AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348B0: 30630FFF andi $v1, $v1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFu; - PGXP_ALU(0x30630FFFu, cpu->gpr[3], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8B0u); -#endif - if (psx_delay_BFC348AC) { - psx_delay_BFC348AC = 0; - if (psx_taken_BFC348AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8C0u); - goto label_BFC348C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8B4u); - } -label_BFC348B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC348B4: 10600002 beq $v1, $zero, 0xBFC348C0 */ - uint32_t psx_brA_BFC348B4 = cpu->gpr[3]; uint32_t psx_brB_BFC348B4 = cpu->gpr[0]; - psx_taken_BFC348B4 = (psx_brA_BFC348B4 == psx_brB_BFC348B4); - psx_delay_BFC348B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC348B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C8B8u); -#endif - if (psx_delay_BFC348B4) { - psx_delay_BFC348B4 = 0; - if (psx_taken_BFC348B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8C0u); - goto label_BFC348C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8BCu); - } -label_BFC348BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348BC: 2463F000 addiu $v1, $v1, -4096 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-4096)); - PGXP_ALU(0x2463F000u, cpu->gpr[3], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8BCu); -#endif -label_BFC348C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC348C0: 0C01323F jal 0xB004C8FC */ - cpu->gpr[31] = 0x8004C8C8u; /* jal link before delay slot */ - psx_delay_BFC348C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC348C4: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8C4u); -#endif - if (psx_delay_BFC348C0) { - psx_delay_BFC348C0 = 0; - cpu->gpr[31] = 0x8004C8C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8FCu); - cpu->pc = 0x8004C8FCu; return; - } -label_BFC348C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC348C8: 10000008 beq $zero, $zero, 0xBFC348EC */ - uint32_t psx_brA_BFC348C8 = cpu->gpr[0]; uint32_t psx_brB_BFC348C8 = cpu->gpr[0]; - psx_taken_BFC348C8 = (psx_brA_BFC348C8 == psx_brB_BFC348C8); - psx_delay_BFC348C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC348CC: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8CCu); -#endif - if (psx_delay_BFC348C8) { - psx_delay_BFC348C8 = 0; - if (psx_taken_BFC348C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8ECu); - goto label_BFC348EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8D0u); - } -label_BFC348D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348D0: 04610004 bgez $v1, 0xBFC348E4 */ - uint32_t psx_brA_BFC348D0 = cpu->gpr[3]; - psx_taken_BFC348D0 = ((int32_t)psx_brA_BFC348D0 >= 0); - psx_delay_BFC348D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348D4: 30630FFF andi $v1, $v1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFu; - PGXP_ALU(0x30630FFFu, cpu->gpr[3], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8D4u); -#endif - if (psx_delay_BFC348D0) { - psx_delay_BFC348D0 = 0; - if (psx_taken_BFC348D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8E4u); - goto label_BFC348E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8D8u); - } -label_BFC348D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC348D8: 10600002 beq $v1, $zero, 0xBFC348E4 */ - uint32_t psx_brA_BFC348D8 = cpu->gpr[3]; uint32_t psx_brB_BFC348D8 = cpu->gpr[0]; - psx_taken_BFC348D8 = (psx_brA_BFC348D8 == psx_brB_BFC348D8); - psx_delay_BFC348D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC348DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C8DCu); -#endif - if (psx_delay_BFC348D8) { - psx_delay_BFC348D8 = 0; - if (psx_taken_BFC348D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8E4u); - goto label_BFC348E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8E0u); - } -label_BFC348E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC348E0: 2463F000 addiu $v1, $v1, -4096 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-4096)); - PGXP_ALU(0x2463F000u, cpu->gpr[3], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8E0u); -#endif -label_BFC348E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC348E4: 0C01323F jal 0xB004C8FC */ - cpu->gpr[31] = 0x8004C8ECu; /* jal link before delay slot */ - psx_delay_BFC348E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC348E8: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8E8u); -#endif - if (psx_delay_BFC348E4) { - psx_delay_BFC348E4 = 0; - cpu->gpr[31] = 0x8004C8ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C8FCu); - cpu->pc = 0x8004C8FCu; return; - } -label_BFC348EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8ECu); -#endif - /* 0xBFC348EC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004C8ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC348F0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC348F4: 03E00008 jr $ra */ - psx_delay_BFC348F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC348F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C8F8u); -#endif - if (psx_delay_BFC348F4) { - psx_delay_BFC348F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC348FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC348FCu); - int psx_delay_BFC348FC = 0; - int psx_taken_BFC348FC = 0; - int psx_delay_BFC34904 = 0; - int psx_taken_BFC34904 = 0; - int psx_delay_BFC3491C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34904u: goto label_BFC34904; - case 0xBFC3490Cu: goto label_BFC3490C; - default: break; - } - } -label_BFC348FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC348FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC348FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC348FC: 04800009 bltz $a0, 0xBFC34924 */ - uint32_t psx_brA_BFC348FC = cpu->gpr[4]; - psx_taken_BFC348FC = ((int32_t)psx_brA_BFC348FC < 0); - psx_delay_BFC348FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34900: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C900u); -#endif - if (psx_delay_BFC348FC) { - psx_delay_BFC348FC = 0; - if (psx_taken_BFC348FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C924u); - cpu->pc = 0x8004C924u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C904u); - } -label_BFC34904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34904: 10200008 beq $at, $zero, 0xBFC34928 */ - uint32_t psx_brA_BFC34904 = cpu->gpr[1]; uint32_t psx_brB_BFC34904 = cpu->gpr[0]; - psx_taken_BFC34904 = (psx_brA_BFC34904 == psx_brB_BFC34904); - psx_delay_BFC34904 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34908: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C908u); -#endif - if (psx_delay_BFC34904) { - psx_delay_BFC34904 = 0; - if (psx_taken_BFC34904) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C928u); - cpu->pc = 0x8004C928u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C90Cu); - } -label_BFC3490C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3490Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3490C: 00047040 sll $t6, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00047040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34910: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC34914: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C914u); -#endif - /* 0xBFC34918: 844286D0 lh $v0, -31024($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -31024; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31024)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C918u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x844286D0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3491C: 03E00008 jr $ra */ - psx_delay_BFC3491C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C920u); -#endif - if (psx_delay_BFC3491C) { - psx_delay_BFC3491C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34924(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34924u); -label_BFC34924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34924: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C928u); - cpu->pc = 0x8004C928u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34928(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34928u); - int psx_delay_BFC34928 = 0; - int psx_taken_BFC34928 = 0; - int psx_delay_BFC34930 = 0; - int psx_taken_BFC34930 = 0; - int psx_delay_BFC3494C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34930u: goto label_BFC34930; - case 0xBFC34938u: goto label_BFC34938; - default: break; - } - } -label_BFC34928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34928: 1420000A bne $at, $zero, 0xBFC34954 */ - uint32_t psx_brA_BFC34928 = cpu->gpr[1]; uint32_t psx_brB_BFC34928 = cpu->gpr[0]; - psx_taken_BFC34928 = (psx_brA_BFC34928 != psx_brB_BFC34928); - psx_delay_BFC34928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3492C: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C92Cu); -#endif - if (psx_delay_BFC34928) { - psx_delay_BFC34928 = 0; - if (psx_taken_BFC34928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C954u); - cpu->pc = 0x8004C954u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C930u); - } -label_BFC34930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34930: 10200009 beq $at, $zero, 0xBFC34958 */ - uint32_t psx_brA_BFC34930 = cpu->gpr[1]; uint32_t psx_brB_BFC34930 = cpu->gpr[0]; - psx_taken_BFC34930 = (psx_brA_BFC34930 == psx_brB_BFC34930); - psx_delay_BFC34930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34934: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C934u); -#endif - if (psx_delay_BFC34930) { - psx_delay_BFC34930 = 0; - if (psx_taken_BFC34930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C958u); - cpu->pc = 0x8004C958u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C938u); - } -label_BFC34938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC34938: 00047840 sll $t7, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00047840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3493C: 000F7823 subu $t7, $zero, $t7 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[0] - cpu->gpr[15]; - PGXP_ALU(0x000F7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34940: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC34944: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C944u); -#endif - /* 0xBFC34948: 844296CE lh $v0, -26930($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -26930; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-26930)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C948u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x844296CEu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3494C: 03E00008 jr $ra */ - psx_delay_BFC3494C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C950u); -#endif - if (psx_delay_BFC3494C) { - psx_delay_BFC3494C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34954(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34954u); -label_BFC34954: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34954u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34954: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C958u); - cpu->pc = 0x8004C958u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34958(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34958u); - int psx_delay_BFC34958 = 0; - int psx_taken_BFC34958 = 0; - int psx_delay_BFC34960 = 0; - int psx_taken_BFC34960 = 0; - int psx_delay_BFC34978 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34960u: goto label_BFC34960; - case 0xBFC34968u: goto label_BFC34968; - default: break; - } - } -label_BFC34958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34958: 14200009 bne $at, $zero, 0xBFC34980 */ - uint32_t psx_brA_BFC34958 = cpu->gpr[1]; uint32_t psx_brB_BFC34958 = cpu->gpr[0]; - psx_taken_BFC34958 = (psx_brA_BFC34958 != psx_brB_BFC34958); - psx_delay_BFC34958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3495C: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C95Cu); -#endif - if (psx_delay_BFC34958) { - psx_delay_BFC34958 = 0; - if (psx_taken_BFC34958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C980u); - cpu->pc = 0x8004C980u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C960u); - } -label_BFC34960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34960: 10200008 beq $at, $zero, 0xBFC34984 */ - uint32_t psx_brA_BFC34960 = cpu->gpr[1]; uint32_t psx_brB_BFC34960 = cpu->gpr[0]; - psx_taken_BFC34960 = (psx_brA_BFC34960 == psx_brB_BFC34960); - psx_delay_BFC34960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34964: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C964u); -#endif - if (psx_delay_BFC34960) { - psx_delay_BFC34960 = 0; - if (psx_taken_BFC34960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C984u); - cpu->pc = 0x8004C984u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C968u); - } -label_BFC34968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC34968: 0004C040 sll $t8, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 1u; - PGXP_ALU(0x0004C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3496C: 3C028007 lui $v0, 0x8007 */ - cpu->gpr[2] = 0x80070000u; - PGXP_ALU(0x3C028007u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC34970: 00581021 addu $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x00581021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C970u); -#endif - /* 0xBFC34974: 844276D0 lh $v0, 30416($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 30416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (30416)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C974u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x844276D0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34978: 03E00008 jr $ra */ - psx_delay_BFC34978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3497C: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C97Cu); -#endif - if (psx_delay_BFC34978) { - psx_delay_BFC34978 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34980u); -label_BFC34980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34980: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C984u); - cpu->pc = 0x8004C984u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34984(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34984u); - int psx_delay_BFC34984 = 0; - int psx_taken_BFC34984 = 0; - int psx_delay_BFC3498C = 0; - int psx_taken_BFC3498C = 0; - int psx_delay_BFC349B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3498Cu: goto label_BFC3498C; - case 0xBFC34994u: goto label_BFC34994; - case 0xBFC349B0u: goto label_BFC349B0; - default: break; - } - } -label_BFC34984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34984: 1420000A bne $at, $zero, 0xBFC349B0 */ - uint32_t psx_brA_BFC34984 = cpu->gpr[1]; uint32_t psx_brB_BFC34984 = cpu->gpr[0]; - psx_taken_BFC34984 = (psx_brA_BFC34984 != psx_brB_BFC34984); - psx_delay_BFC34984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34988: 28811000 slti $at, $a0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0); - PGXP_ALU(0x28811000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C988u); -#endif - if (psx_delay_BFC34984) { - psx_delay_BFC34984 = 0; - if (psx_taken_BFC34984) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B0u); - goto label_BFC349B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C98Cu); - } -label_BFC3498C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3498Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3498Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3498C: 10200008 beq $at, $zero, 0xBFC349B0 */ - uint32_t psx_brA_BFC3498C = cpu->gpr[1]; uint32_t psx_brB_BFC3498C = cpu->gpr[0]; - psx_taken_BFC3498C = (psx_brA_BFC3498C == psx_brB_BFC3498C); - psx_delay_BFC3498C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C990u); -#endif - if (psx_delay_BFC3498C) { - psx_delay_BFC3498C = 0; - if (psx_taken_BFC3498C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9B0u); - goto label_BFC349B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C994u); - } -label_BFC34994: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34994u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC34994: 0004C840 sll $t9, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 1u; - PGXP_ALU(0x0004C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC34998: 0019C823 subu $t9, $zero, $t9 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[0] - cpu->gpr[25]; - PGXP_ALU(0x0019C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3499C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC349A0: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9A0u); -#endif - /* 0xBFC349A4: 8442A6CE lh $v0, -22834($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -22834; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-22834)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C9A4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8442A6CEu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC349A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC349AC: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9ACu); -#endif -label_BFC349B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC349B0: 03E00008 jr $ra */ - psx_delay_BFC349B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC349B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C9B4u); -#endif - if (psx_delay_BFC349B0) { - psx_delay_BFC349B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC349B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC349B8u); - int psx_delay_BFC349B8 = 0; - int psx_taken_BFC349B8 = 0; - int psx_delay_BFC349C4 = 0; - int psx_taken_BFC349C4 = 0; - int psx_delay_BFC349CC = 0; - int psx_taken_BFC349CC = 0; - int psx_delay_BFC349D8 = 0; - int psx_taken_BFC349D8 = 0; - int psx_delay_BFC349E0 = 0; - int psx_taken_BFC349E0 = 0; - int psx_delay_BFC349FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC349C0u: goto label_BFC349C0; - case 0xBFC349C4u: goto label_BFC349C4; - case 0xBFC349CCu: goto label_BFC349CC; - case 0xBFC349D4u: goto label_BFC349D4; - case 0xBFC349D8u: goto label_BFC349D8; - case 0xBFC349E0u: goto label_BFC349E0; - case 0xBFC349E8u: goto label_BFC349E8; - default: break; - } - } -label_BFC349B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC349B8: 04810002 bgez $a0, 0xBFC349C4 */ - uint32_t psx_brA_BFC349B8 = cpu->gpr[4]; - psx_taken_BFC349B8 = ((int32_t)psx_brA_BFC349B8 >= 0); - psx_delay_BFC349B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC349BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C9BCu); -#endif - if (psx_delay_BFC349B8) { - psx_delay_BFC349B8 = 0; - if (psx_taken_BFC349B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9C4u); - goto label_BFC349C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9C0u); - } -label_BFC349C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC349C0: 00042023 subu $a0, $zero, $a0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[0] - cpu->gpr[4]; - PGXP_ALU(0x00042023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9C0u); -#endif -label_BFC349C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC349C4: 04810004 bgez $a0, 0xBFC349D8 */ - uint32_t psx_brA_BFC349C4 = cpu->gpr[4]; - psx_taken_BFC349C4 = ((int32_t)psx_brA_BFC349C4 >= 0); - psx_delay_BFC349C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC349C8: 30840FFF andi $a0, $a0, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFu; - PGXP_ALU(0x30840FFFu, cpu->gpr[4], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9C8u); -#endif - if (psx_delay_BFC349C4) { - psx_delay_BFC349C4 = 0; - if (psx_taken_BFC349C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9D8u); - goto label_BFC349D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9CCu); - } -label_BFC349CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC349CC: 10800002 beq $a0, $zero, 0xBFC349D8 */ - uint32_t psx_brA_BFC349CC = cpu->gpr[4]; uint32_t psx_brB_BFC349CC = cpu->gpr[0]; - psx_taken_BFC349CC = (psx_brA_BFC349CC == psx_brB_BFC349CC); - psx_delay_BFC349CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC349D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004C9D0u); -#endif - if (psx_delay_BFC349CC) { - psx_delay_BFC349CC = 0; - if (psx_taken_BFC349CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9D8u); - goto label_BFC349D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9D4u); - } -label_BFC349D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC349D4: 2484F000 addiu $a0, $a0, -4096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-4096)); - PGXP_ALU(0x2484F000u, cpu->gpr[4], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9D4u); -#endif -label_BFC349D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC349D8: 0480000A bltz $a0, 0xBFC34A04 */ - uint32_t psx_brA_BFC349D8 = cpu->gpr[4]; - psx_taken_BFC349D8 = ((int32_t)psx_brA_BFC349D8 < 0); - psx_delay_BFC349D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC349DC: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9DCu); -#endif - if (psx_delay_BFC349D8) { - psx_delay_BFC349D8 = 0; - if (psx_taken_BFC349D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA04u); - cpu->pc = 0x8004CA04u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9E0u); - } -label_BFC349E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC349E0: 10200009 beq $at, $zero, 0xBFC34A08 */ - uint32_t psx_brA_BFC349E0 = cpu->gpr[1]; uint32_t psx_brB_BFC349E0 = cpu->gpr[0]; - psx_taken_BFC349E0 = (psx_brA_BFC349E0 == psx_brB_BFC349E0); - psx_delay_BFC349E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC349E4: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9E4u); -#endif - if (psx_delay_BFC349E0) { - psx_delay_BFC349E0 = 0; - if (psx_taken_BFC349E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA08u); - cpu->pc = 0x8004CA08u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004C9E8u); - } -label_BFC349E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC349E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC349E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC349E8: 00047040 sll $t6, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00047040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC349EC: 000E7023 subu $t6, $zero, $t6 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[14]; - PGXP_ALU(0x000E7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC349F0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004C9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC349F4: 004E1021 addu $v0, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[14]; - PGXP_ALU(0x004E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9F4u); -#endif - /* 0xBFC349F8: 84428ECE lh $v0, -28978($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28978; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28978)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004C9F8u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x84428ECEu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004C9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC349FC: 03E00008 jr $ra */ - psx_delay_BFC349FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34A00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CA00u); -#endif - if (psx_delay_BFC349FC) { - psx_delay_BFC349FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34A04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A04u); -label_BFC34A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A04: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA08u); - cpu->pc = 0x8004CA08u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34A08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A08u); - int psx_delay_BFC34A08 = 0; - int psx_taken_BFC34A08 = 0; - int psx_delay_BFC34A10 = 0; - int psx_taken_BFC34A10 = 0; - int psx_delay_BFC34A28 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34A10u: goto label_BFC34A10; - case 0xBFC34A18u: goto label_BFC34A18; - default: break; - } - } -label_BFC34A08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A08: 14200009 bne $at, $zero, 0xBFC34A30 */ - uint32_t psx_brA_BFC34A08 = cpu->gpr[1]; uint32_t psx_brB_BFC34A08 = cpu->gpr[0]; - psx_taken_BFC34A08 = (psx_brA_BFC34A08 != psx_brB_BFC34A08); - psx_delay_BFC34A08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A0C: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA0Cu); -#endif - if (psx_delay_BFC34A08) { - psx_delay_BFC34A08 = 0; - if (psx_taken_BFC34A08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA30u); - cpu->pc = 0x8004CA30u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA10u); - } -label_BFC34A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A10: 10200008 beq $at, $zero, 0xBFC34A34 */ - uint32_t psx_brA_BFC34A10 = cpu->gpr[1]; uint32_t psx_brB_BFC34A10 = cpu->gpr[0]; - psx_taken_BFC34A10 = (psx_brA_BFC34A10 == psx_brB_BFC34A10); - psx_delay_BFC34A10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A14: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA14u); -#endif - if (psx_delay_BFC34A10) { - psx_delay_BFC34A10 = 0; - if (psx_taken_BFC34A10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA34u); - cpu->pc = 0x8004CA34u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA18u); - } -label_BFC34A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC34A18: 00047840 sll $t7, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00047840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34A1C: 3C028007 lui $v0, 0x8007 */ - cpu->gpr[2] = 0x80070000u; - PGXP_ALU(0x3C028007u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC34A20: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA20u); -#endif - /* 0xBFC34A24: 84427ED0 lh $v0, 32464($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32464; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32464)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CA24u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x84427ED0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34A28: 03E00008 jr $ra */ - psx_delay_BFC34A28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34A2C: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA2Cu); -#endif - if (psx_delay_BFC34A28) { - psx_delay_BFC34A28 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34A30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A30u); -label_BFC34A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A30: 28810800 slti $at, $a0, 2048 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (2048) ? 1 : 0); - PGXP_ALU(0x28810800u, cpu->gpr[1], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA34u); - cpu->pc = 0x8004CA34u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34A34(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A34u); - int psx_delay_BFC34A34 = 0; - int psx_taken_BFC34A34 = 0; - int psx_delay_BFC34A3C = 0; - int psx_taken_BFC34A3C = 0; - int psx_delay_BFC34A58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34A3Cu: goto label_BFC34A3C; - case 0xBFC34A44u: goto label_BFC34A44; - default: break; - } - } -label_BFC34A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A34: 1420000A bne $at, $zero, 0xBFC34A60 */ - uint32_t psx_brA_BFC34A34 = cpu->gpr[1]; uint32_t psx_brB_BFC34A34 = cpu->gpr[0]; - psx_taken_BFC34A34 = (psx_brA_BFC34A34 != psx_brB_BFC34A34); - psx_delay_BFC34A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A38: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA38u); -#endif - if (psx_delay_BFC34A34) { - psx_delay_BFC34A34 = 0; - if (psx_taken_BFC34A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA60u); - cpu->pc = 0x8004CA60u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA3Cu); - } -label_BFC34A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A3C: 10200009 beq $at, $zero, 0xBFC34A64 */ - uint32_t psx_brA_BFC34A3C = cpu->gpr[1]; uint32_t psx_brB_BFC34A3C = cpu->gpr[0]; - psx_taken_BFC34A3C = (psx_brA_BFC34A3C == psx_brB_BFC34A3C); - psx_delay_BFC34A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A40: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA40u); -#endif - if (psx_delay_BFC34A3C) { - psx_delay_BFC34A3C = 0; - if (psx_taken_BFC34A3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA64u); - cpu->pc = 0x8004CA64u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA44u); - } -label_BFC34A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC34A44: 0004C040 sll $t8, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 1u; - PGXP_ALU(0x0004C040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC34A48: 0018C023 subu $t8, $zero, $t8 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[0] - cpu->gpr[24]; - PGXP_ALU(0x0018C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34A4C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC34A50: 00581021 addu $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x00581021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA50u); -#endif - /* 0xBFC34A54: 84429ECE lh $v0, -24882($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24882; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24882)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CA54u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x84429ECEu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34A58: 03E00008 jr $ra */ - psx_delay_BFC34A58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34A5C: 00021023 subu $v0, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00021023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA5Cu); -#endif - if (psx_delay_BFC34A58) { - psx_delay_BFC34A58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34A60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A60u); -label_BFC34A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A60: 28810C00 slti $at, $a0, 3072 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3072) ? 1 : 0); - PGXP_ALU(0x28810C00u, cpu->gpr[1], _pgx1, 0x0C00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA64u); - cpu->pc = 0x8004CA64u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34A64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A64u); - int psx_delay_BFC34A64 = 0; - int psx_taken_BFC34A64 = 0; - int psx_delay_BFC34A6C = 0; - int psx_taken_BFC34A6C = 0; - int psx_delay_BFC34A88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34A6Cu: goto label_BFC34A6C; - case 0xBFC34A74u: goto label_BFC34A74; - case 0xBFC34A88u: goto label_BFC34A88; - default: break; - } - } -label_BFC34A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A64: 14200008 bne $at, $zero, 0xBFC34A88 */ - uint32_t psx_brA_BFC34A64 = cpu->gpr[1]; uint32_t psx_brB_BFC34A64 = cpu->gpr[0]; - psx_taken_BFC34A64 = (psx_brA_BFC34A64 != psx_brB_BFC34A64); - psx_delay_BFC34A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC34A68: 28811000 slti $at, $a0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (4096) ? 1 : 0); - PGXP_ALU(0x28811000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA68u); -#endif - if (psx_delay_BFC34A64) { - psx_delay_BFC34A64 = 0; - if (psx_taken_BFC34A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA88u); - goto label_BFC34A88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA6Cu); - } -label_BFC34A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34A6C: 10200006 beq $at, $zero, 0xBFC34A88 */ - uint32_t psx_brA_BFC34A6C = cpu->gpr[1]; uint32_t psx_brB_BFC34A6C = cpu->gpr[0]; - psx_taken_BFC34A6C = (psx_brA_BFC34A6C == psx_brB_BFC34A6C); - psx_delay_BFC34A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34A70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CA70u); -#endif - if (psx_delay_BFC34A6C) { - psx_delay_BFC34A6C = 0; - if (psx_taken_BFC34A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA88u); - goto label_BFC34A88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CA74u); - } -label_BFC34A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC34A74: 0004C840 sll $t9, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 1u; - PGXP_ALU(0x0004C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34A78: 3C028007 lui $v0, 0x8007 */ - cpu->gpr[2] = 0x80070000u; - PGXP_ALU(0x3C028007u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC34A7C: 00591021 addu $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00591021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA80u); -#endif - /* 0xBFC34A80: 84426ED0 lh $v0, 28368($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28368; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28368)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CA80u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x84426ED0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34A84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CA84u); -#endif -label_BFC34A88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34A88: 03E00008 jr $ra */ - psx_delay_BFC34A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34A8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CA8Cu); -#endif - if (psx_delay_BFC34A88) { - psx_delay_BFC34A88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34A90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34A90u); -label_BFC34A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC34A90: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4009u); -#endif - /* 0xBFC34A94: 00037023 subu $t6, $zero, $v1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[3]; - PGXP_ALU(0x00037023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34A98: 000E7980 sll $t7, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7980u, cpu->gpr[15], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC34A9C: 01E5001A div $t7, $a1 */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[5]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E5001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004CA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAA0u); - cpu->pc = 0x8004CAA0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34AA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34AA0u); - int psx_delay_BFC34AAC = 0; - int psx_taken_BFC34AAC = 0; - int psx_delay_BFC34ABC = 0; - int psx_taken_BFC34ABC = 0; - int psx_delay_BFC34AC4 = 0; - int psx_taken_BFC34AC4 = 0; - int psx_delay_BFC34AD0 = 0; - int psx_delay_BFC34AD8 = 0; - int psx_delay_BFC34AE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34AB4u: goto label_BFC34AB4; - case 0xBFC34AB8u: goto label_BFC34AB8; - case 0xBFC34AC4u: goto label_BFC34AC4; - case 0xBFC34ACCu: goto label_BFC34ACC; - case 0xBFC34AD0u: goto label_BFC34AD0; - case 0xBFC34AD8u: goto label_BFC34AD8; - case 0xBFC34AE0u: goto label_BFC34AE0; - default: break; - } - } -label_BFC34AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34AA0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34AA4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CAA4u); return; } g_debug_last_store_pc = 0x8004CAA4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34AA8: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC34AAC: 14A00002 bne $a1, $zero, 0xBFC34AB8 */ - uint32_t psx_brA_BFC34AAC = cpu->gpr[5]; uint32_t psx_brB_BFC34AAC = cpu->gpr[0]; - psx_taken_BFC34AAC = (psx_brA_BFC34AAC != psx_brB_BFC34AAC); - psx_delay_BFC34AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34AB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CAB0u); -#endif - if (psx_delay_BFC34AAC) { - psx_delay_BFC34AAC = 0; - if (psx_taken_BFC34AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAB8u); - goto label_BFC34AB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAB4u); - } -label_BFC34AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34AB4: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004CAB4u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004CAB4u); -#endif -label_BFC34AB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34AB8: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC34ABC: 14A10004 bne $a1, $at, 0xBFC34AD0 */ - uint32_t psx_brA_BFC34ABC = cpu->gpr[5]; uint32_t psx_brB_BFC34ABC = cpu->gpr[1]; - psx_taken_BFC34ABC = (psx_brA_BFC34ABC != psx_brB_BFC34ABC); - psx_delay_BFC34ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC34AC0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CAC0u); -#endif - if (psx_delay_BFC34ABC) { - psx_delay_BFC34ABC = 0; - if (psx_taken_BFC34ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAD0u); - goto label_BFC34AD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAC4u); - } -label_BFC34AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC34AC4: 15E10002 bne $t7, $at, 0xBFC34AD0 */ - uint32_t psx_brA_BFC34AC4 = cpu->gpr[15]; uint32_t psx_brB_BFC34AC4 = cpu->gpr[1]; - psx_taken_BFC34AC4 = (psx_brA_BFC34AC4 != psx_brB_BFC34AC4); - psx_delay_BFC34AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34AC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CAC8u); -#endif - if (psx_delay_BFC34AC4) { - psx_delay_BFC34AC4 = 0; - if (psx_taken_BFC34AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CAD0u); - goto label_BFC34AD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CACCu); - } -label_BFC34ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34ACC: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004CACCu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004CACCu); -#endif -label_BFC34AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34AD0: 0C012FF6 jal 0xB004BFD8 */ - cpu->gpr[31] = 0x8004CAD8u; /* jal link before delay slot */ - psx_delay_BFC34AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34AD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CAD4u); -#endif - if (psx_delay_BFC34AD0) { - psx_delay_BFC34AD0 = 0; - cpu->gpr[31] = 0x8004CAD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFD8u); - cpu->pc = 0x8004BFD8u; return; - } -label_BFC34AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34AD8: 0C012FF9 jal 0xB004BFE4 */ - cpu->gpr[31] = 0x8004CAE0u; /* jal link before delay slot */ - psx_delay_BFC34AD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34ADC: 3C040140 lui $a0, 0x140 */ - cpu->gpr[4] = 0x01400000u; - PGXP_ALU(0x3C040140u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CADCu); -#endif - if (psx_delay_BFC34AD8) { - psx_delay_BFC34AD8 = 0; - cpu->gpr[31] = 0x8004CAE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFE4u); - cpu->pc = 0x8004BFE4u; return; - } -label_BFC34AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAE0u); -#endif - /* 0xBFC34AE0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CAE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34AE4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34AE8: 03E00008 jr $ra */ - psx_delay_BFC34AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CAECu); -#endif - if (psx_delay_BFC34AE8) { - psx_delay_BFC34AE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34AF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34AF0u); -label_BFC34AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC34AF0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC34AF4: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC34AF8: 01C37021 addu $t6, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[3]; - PGXP_ALU(0x01C37021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC34AFC: 000E7180 sll $t6, $t6, 6 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 6u; - PGXP_ALU(0x000E7180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC34B00: 000E7023 subu $t6, $zero, $t6 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[14]; - PGXP_ALU(0x000E7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC34B04: 01C5001A div $t6, $a1 */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[5]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C5001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[5]); -#ifdef PSX_COSIM - cosim_instr(0x8004CB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB08u); - cpu->pc = 0x8004CB08u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34B08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34B08u); - int psx_delay_BFC34B14 = 0; - int psx_taken_BFC34B14 = 0; - int psx_delay_BFC34B24 = 0; - int psx_taken_BFC34B24 = 0; - int psx_delay_BFC34B2C = 0; - int psx_taken_BFC34B2C = 0; - int psx_delay_BFC34B38 = 0; - int psx_delay_BFC34B40 = 0; - int psx_delay_BFC34B50 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34B1Cu: goto label_BFC34B1C; - case 0xBFC34B20u: goto label_BFC34B20; - case 0xBFC34B2Cu: goto label_BFC34B2C; - case 0xBFC34B34u: goto label_BFC34B34; - case 0xBFC34B38u: goto label_BFC34B38; - case 0xBFC34B40u: goto label_BFC34B40; - case 0xBFC34B48u: goto label_BFC34B48; - default: break; - } - } -label_BFC34B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34B08: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34B0C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB0Cu); return; } g_debug_last_store_pc = 0x8004CB0Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34B10: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC34B14: 14A00002 bne $a1, $zero, 0xBFC34B20 */ - uint32_t psx_brA_BFC34B14 = cpu->gpr[5]; uint32_t psx_brB_BFC34B14 = cpu->gpr[0]; - psx_taken_BFC34B14 = (psx_brA_BFC34B14 != psx_brB_BFC34B14); - psx_delay_BFC34B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34B18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CB18u); -#endif - if (psx_delay_BFC34B14) { - psx_delay_BFC34B14 = 0; - if (psx_taken_BFC34B14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB20u); - goto label_BFC34B20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB1Cu); - } -label_BFC34B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34B1C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x8004CB1Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x8004CB1Cu); -#endif -label_BFC34B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34B20: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC34B24: 14A10004 bne $a1, $at, 0xBFC34B38 */ - uint32_t psx_brA_BFC34B24 = cpu->gpr[5]; uint32_t psx_brB_BFC34B24 = cpu->gpr[1]; - psx_taken_BFC34B24 = (psx_brA_BFC34B24 != psx_brB_BFC34B24); - psx_delay_BFC34B24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC34B28: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CB28u); -#endif - if (psx_delay_BFC34B24) { - psx_delay_BFC34B24 = 0; - if (psx_taken_BFC34B24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB38u); - goto label_BFC34B38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB2Cu); - } -label_BFC34B2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC34B2C: 15C10002 bne $t6, $at, 0xBFC34B38 */ - uint32_t psx_brA_BFC34B2C = cpu->gpr[14]; uint32_t psx_brB_BFC34B2C = cpu->gpr[1]; - psx_taken_BFC34B2C = (psx_brA_BFC34B2C != psx_brB_BFC34B2C); - psx_delay_BFC34B2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34B30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CB30u); -#endif - if (psx_delay_BFC34B2C) { - psx_delay_BFC34B2C = 0; - if (psx_taken_BFC34B2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB38u); - goto label_BFC34B38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CB34u); - } -label_BFC34B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34B34: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x8004CB34u); return; -#ifdef PSX_COSIM - cosim_instr(0x8004CB34u); -#endif -label_BFC34B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34B38: 0C012FF6 jal 0xB004BFD8 */ - cpu->gpr[31] = 0x8004CB40u; /* jal link before delay slot */ - psx_delay_BFC34B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34B3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CB3Cu); -#endif - if (psx_delay_BFC34B38) { - psx_delay_BFC34B38 = 0; - cpu->gpr[31] = 0x8004CB40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFD8u); - cpu->pc = 0x8004BFD8u; return; - } -label_BFC34B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34B40: 0C012FF9 jal 0xB004BFE4 */ - cpu->gpr[31] = 0x8004CB48u; /* jal link before delay slot */ - psx_delay_BFC34B40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34B44: 3C040140 lui $a0, 0x140 */ - cpu->gpr[4] = 0x01400000u; - PGXP_ALU(0x3C040140u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CB44u); -#endif - if (psx_delay_BFC34B40) { - psx_delay_BFC34B40 = 0; - cpu->gpr[31] = 0x8004CB48u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004BFE4u); - cpu->pc = 0x8004BFE4u; return; - } -label_BFC34B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB48u); -#endif - /* 0xBFC34B48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34B4C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34B50: 03E00008 jr $ra */ - psx_delay_BFC34B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34B54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CB54u); -#endif - if (psx_delay_BFC34B50) { - psx_delay_BFC34B50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34B58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34B58u); - int psx_delay_BFC34CD8 = 0; - int psx_taken_BFC34CD8 = 0; - int psx_delay_BFC34CEC = 0; - int psx_taken_BFC34CEC = 0; - int psx_delay_BFC34CFC = 0; - int psx_taken_BFC34CFC = 0; - int psx_delay_BFC34D38 = 0; - int psx_taken_BFC34D38 = 0; - int psx_delay_BFC34D58 = 0; - int psx_taken_BFC34D58 = 0; - int psx_delay_BFC34D68 = 0; - int psx_taken_BFC34D68 = 0; - int psx_delay_BFC34D78 = 0; - int psx_taken_BFC34D78 = 0; - int psx_delay_BFC34D94 = 0; - int psx_delay_BFC34DC0 = 0; - int psx_taken_BFC34DC0 = 0; - int psx_delay_BFC34DE8 = 0; - int psx_taken_BFC34DE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34CC8u: goto label_BFC34CC8; - case 0xBFC34CD0u: goto label_BFC34CD0; - case 0xBFC34CE0u: goto label_BFC34CE0; - case 0xBFC34CE8u: goto label_BFC34CE8; - case 0xBFC34CF4u: goto label_BFC34CF4; - case 0xBFC34D04u: goto label_BFC34D04; - case 0xBFC34D24u: goto label_BFC34D24; - case 0xBFC34D2Cu: goto label_BFC34D2C; - case 0xBFC34D40u: goto label_BFC34D40; - case 0xBFC34D54u: goto label_BFC34D54; - case 0xBFC34D60u: goto label_BFC34D60; - case 0xBFC34D70u: goto label_BFC34D70; - case 0xBFC34D80u: goto label_BFC34D80; - case 0xBFC34D9Cu: goto label_BFC34D9C; - case 0xBFC34DC8u: goto label_BFC34DC8; - case 0xBFC34DF0u: goto label_BFC34DF0; - default: break; - } - } -label_BFC34B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34B58: 27BDFF00 addiu $sp, $sp, -256 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-256)); - PGXP_ALU(0x27BDFF00u, cpu->gpr[29], _pgx1, 0xFFFFFF00u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34B5C: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB5Cu); return; } g_debug_last_store_pc = 0x8004CB5Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC34B60: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB60u); return; } g_debug_last_store_pc = 0x8004CB60u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB60u); -#endif - /* 0xBFC34B64: 848E000A lh $t6, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB64u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB64u); -#endif - /* 0xBFC34B68: 848B0000 lh $t3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB68u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x848B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB68u); -#endif - /* 0xBFC34B6C: 84860002 lh $a2, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB6Cu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x84860002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB70u); -#endif - /* 0xBFC34B70: 84880004 lh $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB70u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x84880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB70u); -#endif - /* 0xBFC34B74: 848C0006 lh $t4, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB74u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x848C0006u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB74u); -#endif - /* 0xBFC34B78: 848A0008 lh $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB78u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34B7C: A7AE00EA sh $t6, 234($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 234; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB7Cu); return; } g_debug_last_store_pc = 0x8004CB7Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE00EAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB80u); -#endif - /* 0xBFC34B80: 849F0010 lh $ra, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CB80u); return; } cpu->gpr[31] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 31, 0x10u); } - PGXP_LOAD(0x849F0010u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC34B84: 254AF000 addiu $t2, $t2, -4096 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-4096)); - PGXP_ALU(0x254AF000u, cpu->gpr[10], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34B88: 27FFF000 addiu $ra, $ra, -4096 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] + (-4096)); - PGXP_ALU(0x27FFF000u, cpu->gpr[31], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC34B8C: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34B90: 001FFC00 sll $ra, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = cpu->gpr[31] << 16u; - PGXP_ALU(0x001FFC00u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC34B94: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34B98: 001FFC03 sra $ra, $ra, 16 */ - { uint32_t _pgx1 = cpu->gpr[31]; cpu->gpr[31] = (uint32_t)((int32_t)cpu->gpr[31] >> 16u); - PGXP_ALU(0x001FFC03u, cpu->gpr[31], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC34B9C: 015F0019 multu $t2, $ra */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[31]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x015F0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[31]); -#ifdef PSX_COSIM - cosim_instr(0x8004CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBA0u); -#endif - /* 0xBFC34BA0: 848D000E lh $t5, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBA0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x848D000Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBA0u); -#endif - /* 0xBFC34BA4: 87B800EA lh $t8, 234($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBA4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B800EAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBA4u); -#endif - /* 0xBFC34BA8: 8487000C lh $a3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBA8u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x8487000Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34BAC: 256BF000 addiu $t3, $t3, -4096 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-4096)); - PGXP_ALU(0x256BF000u, cpu->gpr[11], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34BB0: 000B5C00 sll $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B5C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC34BB4: 000B5C03 sra $t3, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] >> 16u); - PGXP_ALU(0x000B5C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC34BB8: A7A700EC sh $a3, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBB8u); return; } g_debug_last_store_pc = 0x8004CBB8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA7A700ECu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC34BBC: A7AA00E8 sh $t2, 232($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBBCu); return; } g_debug_last_store_pc = 0x8004CBBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA00E8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC34BC0: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34BC4: 27A50124 addiu $a1, $sp, 292 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (292)); - PGXP_ALU(0x27A50124u, cpu->gpr[5], _pgx1, 0x00000124u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC34BC8: 27A90100 addiu $t1, $sp, 256 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (256)); - PGXP_ALU(0x27A90100u, cpu->gpr[9], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34BCC: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34BD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34BD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC34BD8: 030D0019 multu $t8, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[24] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[24])); -#endif - PGXP_MULDIV(0x030D0019u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004CBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34BDC: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC34BE0: 01F97023 subu $t6, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[15] - cpu->gpr[25]; - PGXP_ALU(0x01F97023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34BE4: AFAE00BC sw $t6, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CBE4u); return; } g_debug_last_store_pc = 0x8004CBE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00BCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC34BE8: 01070019 multu $t0, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x01070019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004CBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34BEC: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34BF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34BF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001000u); -#endif - /* 0xBFC34BF8: 019F0019 multu $t4, $ra */ - { uint64_t psx_p = (uint64_t)cpu->gpr[12] * (uint64_t)cpu->gpr[31]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[12])); -#endif - PGXP_MULDIV(0x019F0019u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[31]); -#ifdef PSX_COSIM - cosim_instr(0x8004CBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34BFC: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008004u); -#endif - /* 0xBFC34C00: 01E2C823 subu $t9, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[15] - cpu->gpr[2]; - PGXP_ALU(0x01E2C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34C04: AFB900C0 sw $t9, 192($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC04u); return; } g_debug_last_store_pc = 0x8004CC04u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900C0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC34C08: 018D0019 multu $t4, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[12] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[12])); -#endif - PGXP_MULDIV(0x018D0019u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC34C0C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC34C18: 01470019 multu $t2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x01470019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34C1C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC34C20: 01CFC823 subu $t9, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CFC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34C24: AFB900C4 sw $t9, 196($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC24u); return; } g_debug_last_store_pc = 0x8004CC24u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900C4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000040u); -#endif - /* 0xBFC34C28: 00DF0019 multu $a2, $ra */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[31]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00DF0019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[31]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC34C2C: 00007012 mflo $t6 */ - cpu->gpr[14] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007012u, cpu->gpr[14], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC34C38: 010D0019 multu $t0, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x010D0019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34C3C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC34C40: 01CF1823 subu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC34C44: AFA300C8 sw $v1, 200($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC44u); return; } g_debug_last_store_pc = 0x8004CC44u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300C8u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC34C48: 017F0019 multu $t3, $ra */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[31]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x017F0019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[31]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC34C4C: AFA300D4 sw $v1, 212($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC4Cu); return; } g_debug_last_store_pc = 0x8004CC4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA300D4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34C50: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004004u); -#endif - /* 0xBFC34C54: 03227023 subu $t6, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[25] - cpu->gpr[2]; - PGXP_ALU(0x03227023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34C58: AFAE00CC sw $t6, 204($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (204)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC58u); return; } g_debug_last_store_pc = 0x8004CC58u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00CCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC34C5C: 016D0019 multu $t3, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x016D0019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34C60: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34C64: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC34C70: 00C70019 multu $a2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C70019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC34C74: 24070003 addiu $a3, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24070003u, cpu->gpr[7], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34C78: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC34C7C: 01F97023 subu $t6, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[15] - cpu->gpr[25]; - PGXP_ALU(0x01F97023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34C80: AFAE00D0 sw $t6, 208($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CC80u); return; } g_debug_last_store_pc = 0x8004CC80u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00D0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000800u); -#endif - /* 0xBFC34C84: 01780019 multu $t3, $t8 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[24]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x01780019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[24]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34C88: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34C90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC34C94: 010C0019 multu $t0, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[8] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[8])); -#endif - PGXP_MULDIV(0x010C0019u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004CC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC34C98: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC34C9C: 01F97023 subu $t6, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[15] - cpu->gpr[25]; - PGXP_ALU(0x01F97023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34CA0: AFAE00D8 sw $t6, 216($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CCA0u); return; } g_debug_last_store_pc = 0x8004CCA0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE00D8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC34CA4: 016A0019 multu $t3, $t2 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[10]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x016A0019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[10]); -#ifdef PSX_COSIM - cosim_instr(0x8004CCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC34CA8: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34CB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC34CB4: 00CC0019 multu $a2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00CC0019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004CCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC34CB8: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC34CBC: 030FC823 subu $t9, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34CC0: AFB900DC sw $t9, 220($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CCC0u); return; } g_debug_last_store_pc = 0x8004CCC0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900DCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCC0u); -#endif - /* 0xBFC34CC4: 87AA00E8 lh $t2, 232($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CCC4u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA00E8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCC4u); -#endif -label_BFC34CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC34CC8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC34CCC: 01202021 addu $a0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCCCu); -#endif -label_BFC34CD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34CD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCD0u); -#endif - /* 0xBFC34CD0: 8C82FFBC lw $v0, -68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CCD0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C82FFBCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34CD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC34CD8: 04410003 bgez $v0, 0xBFC34CE8 */ - uint32_t psx_brA_BFC34CD8 = cpu->gpr[2]; - psx_taken_BFC34CD8 = ((int32_t)psx_brA_BFC34CD8 >= 0); - psx_delay_BFC34CD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34CDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CCDCu); -#endif - if (psx_delay_BFC34CD8) { - psx_delay_BFC34CD8 = 0; - if (psx_taken_BFC34CD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CCE8u); - goto label_BFC34CE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CCE0u); - } -label_BFC34CE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34CE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4005u); -#endif - /* 0xBFC34CE0: 00027023 subu $t6, $zero, $v0 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[0] - cpu->gpr[2]; - PGXP_ALU(0x00027023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC34CE4: AC8EFFBC sw $t6, -68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CCE4u); return; } g_debug_last_store_pc = 0x8004CCE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8EFFBCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCE4u); -#endif -label_BFC34CE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34CE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34CE8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC34CEC: 1467FFF8 bne $v1, $a3, 0xBFC34CD0 */ - uint32_t psx_brA_BFC34CEC = cpu->gpr[3]; uint32_t psx_brB_BFC34CEC = cpu->gpr[7]; - psx_taken_BFC34CEC = (psx_brA_BFC34CEC != psx_brB_BFC34CEC); - psx_delay_BFC34CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34CF0: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCF0u); -#endif - if (psx_delay_BFC34CEC) { - psx_delay_BFC34CEC = 0; - if (psx_taken_BFC34CEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CCD0u); - goto label_BFC34CD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CCF4u); - } -label_BFC34CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC34CF4: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x222u); -#endif - /* 0xBFC34CF8: 0125082B sltu $at, $t1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0125082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34CFC: 1420FFF2 bne $at, $zero, 0xBFC34CC8 */ - uint32_t psx_brA_BFC34CFC = cpu->gpr[1]; uint32_t psx_brB_BFC34CFC = cpu->gpr[0]; - psx_taken_BFC34CFC = (psx_brA_BFC34CFC != psx_brB_BFC34CFC); - psx_delay_BFC34CFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD00u); -#endif - /* 0xBFC34D00: 87AA00E8 lh $t2, 232($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD00u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA00E8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD00u); -#endif - if (psx_delay_BFC34CFC) { - psx_delay_BFC34CFC = 0; - if (psx_taken_BFC34CFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CCC8u); - goto label_BFC34CC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD04u); - } -label_BFC34D04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC34D04: A7A600E2 sh $a2, 226($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 226; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (226)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD04u); return; } g_debug_last_store_pc = 0x8004CD04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA7A600E2u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC34D08: A7A800E4 sh $t0, 228($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 228; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (228)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD08u); return; } g_debug_last_store_pc = 0x8004CD08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A800E4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD08u); -#endif - /* 0xBFC34D0C: 8FA500BC lw $a1, 188($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD0Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA500BCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC34D10: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC34D14: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34D18: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC34D1C: 27A90100 addiu $t1, $sp, 256 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[29] + (256)); - PGXP_ALU(0x27A90100u, cpu->gpr[9], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC34D20: 27AA0124 addiu $t2, $sp, 292 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[29] + (292)); - PGXP_ALU(0x27AA0124u, cpu->gpr[10], _pgx1, 0x00000124u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD20u); -#endif -label_BFC34D24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC34D24: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC34D28: 01202021 addu $a0, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD28u); -#endif -label_BFC34D2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD2Cu); -#endif - /* 0xBFC34D2C: 8C98FFBC lw $t8, -68($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD2Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98FFBCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34D30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000022u); -#endif - /* 0xBFC34D34: 00B8082A slt $at, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x00B8082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34D38: 10200006 beq $at, $zero, 0xBFC34D54 */ - uint32_t psx_brA_BFC34D38 = cpu->gpr[1]; uint32_t psx_brB_BFC34D38 = cpu->gpr[0]; - psx_taken_BFC34D38 = (psx_brA_BFC34D38 == psx_brB_BFC34D38); - psx_delay_BFC34D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34D3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CD3Cu); -#endif - if (psx_delay_BFC34D38) { - psx_delay_BFC34D38 = 0; - if (psx_taken_BFC34D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD54u); - goto label_BFC34D54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD40u); - } -label_BFC34D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4Cu); -#endif - /* 0xBFC34D40: 00C31021 addu $v0, $a2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[3]; - PGXP_ALU(0x00C31021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC34D44: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008020u); -#endif - /* 0xBFC34D48: 03AF2821 addu $a1, $sp, $t7 */ - { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[29] + cpu->gpr[15]; - PGXP_ALU(0x03AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD48u); -#endif - /* 0xBFC34D4C: 8CA500BC lw $a1, 188($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD4Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA500BCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC34D50: 00404021 addu $t0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD50u); -#endif -label_BFC34D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34D54: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC34D58: 1467FFF4 bne $v1, $a3, 0xBFC34D2C */ - uint32_t psx_brA_BFC34D58 = cpu->gpr[3]; uint32_t psx_brB_BFC34D58 = cpu->gpr[7]; - psx_taken_BFC34D58 = (psx_brA_BFC34D58 != psx_brB_BFC34D58); - psx_delay_BFC34D58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34D5C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD5Cu); -#endif - if (psx_delay_BFC34D58) { - psx_delay_BFC34D58 = 0; - if (psx_taken_BFC34D58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD2Cu); - goto label_BFC34D2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD60u); - } -label_BFC34D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC34D60: 2529000C addiu $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (12)); - PGXP_ALU(0x2529000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC34D64: 012A082B sltu $at, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[9] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x012A082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34D68: 1420FFEE bne $at, $zero, 0xBFC34D24 */ - uint32_t psx_brA_BFC34D68 = cpu->gpr[1]; uint32_t psx_brB_BFC34D68 = cpu->gpr[0]; - psx_taken_BFC34D68 = (psx_brA_BFC34D68 != psx_brB_BFC34D68); - psx_delay_BFC34D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC34D6C: 24C60003 addiu $a2, $a2, 3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (3)); - PGXP_ALU(0x24C60003u, cpu->gpr[6], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD6Cu); -#endif - if (psx_delay_BFC34D68) { - psx_delay_BFC34D68 = 0; - if (psx_taken_BFC34D68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD24u); - goto label_BFC34D24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD70u); - } -label_BFC34D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC34D70: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC34D74: 2C410009 sltiu $at, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0); - PGXP_ALU(0x2C410009u, cpu->gpr[1], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34D78: 10200027 beq $at, $zero, 0xBFC34E18 */ - uint32_t psx_brA_BFC34D78 = cpu->gpr[1]; uint32_t psx_brB_BFC34D78 = cpu->gpr[0]; - psx_taken_BFC34D78 = (psx_brA_BFC34D78 == psx_brB_BFC34D78); - psx_delay_BFC34D78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34D7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CD7Cu); -#endif - if (psx_delay_BFC34D78) { - psx_delay_BFC34D78 = 0; - if (psx_taken_BFC34D78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE18u); - cpu->pc = 0x8004CE18u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD80u); - } -label_BFC34D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC34D80: 0002C880 sll $t9, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC34D84: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC34D88: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD88u); -#endif - /* 0xBFC34D8C: 8C39ADC0 lw $t9, -21056($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21056; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21056)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD8Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2u); } - PGXP_LOAD(0x8C39ADC0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC34D94: 03200008 jr $t9 */ - psx_delay_BFC34D94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34D98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CD98u); -#endif - if (psx_delay_BFC34D94) { - psx_delay_BFC34D94 = 0; - /* jump table at 0x8005ADC0, 9 entries */ - switch (cpu->gpr[25]) { - case 0x8004CDF0u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CDF0u); - goto label_BFC34DF0; - case 0x8004CDC8u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CDC8u); - goto label_BFC34DC8; - case 0x8004CD9Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CD9Cu); - goto label_BFC34D9C; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[25]); - cpu->pc = cpu->gpr[25]; return; - } - } -label_BFC34D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC34D9C: AFAB0094 sw $t3, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CD9Cu); return; } g_debug_last_store_pc = 0x8004CD9Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0094u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC34DA0: AFAC00A4 sw $t4, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDA0u); return; } g_debug_last_store_pc = 0x8004CDA0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC00A4u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDA0u); -#endif - /* 0xBFC34DA4: 87AE00E2 lh $t6, 226($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 226; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (226)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDA4u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE00E2u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDA4u); -#endif - /* 0xBFC34DA8: 87B800E4 lh $t8, 228($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 228; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (228)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDA8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B800E4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDA8u); -#endif - /* 0xBFC34DAC: 87AF00E8 lh $t7, 232($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDACu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF00E8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDB0u); -#endif - /* 0xBFC34DB0: 87B900EA lh $t9, 234($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDB0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B900EAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34DB4: AFAE0098 sw $t6, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDB4u); return; } g_debug_last_store_pc = 0x8004CDB4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0098u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC34DB8: AFB8009C sw $t8, 156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDB8u); return; } g_debug_last_store_pc = 0x8004CDB8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB8009Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC34DBC: AFAF00A8 sw $t7, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDBCu); return; } g_debug_last_store_pc = 0x8004CDBCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF00A8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34DC0: 10000015 beq $zero, $zero, 0xBFC34E18 */ - uint32_t psx_brA_BFC34DC0 = cpu->gpr[0]; uint32_t psx_brB_BFC34DC0 = cpu->gpr[0]; - psx_taken_BFC34DC0 = (psx_brA_BFC34DC0 == psx_brB_BFC34DC0); - psx_delay_BFC34DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34DC4: AFB900AC sw $t9, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDC4u); return; } g_debug_last_store_pc = 0x8004CDC4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB900ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDC4u); -#endif - if (psx_delay_BFC34DC0) { - psx_delay_BFC34DC0 = 0; - if (psx_taken_BFC34DC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE18u); - cpu->pc = 0x8004CE18u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CDC8u); - } -label_BFC34DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC34DC8: AFAB0094 sw $t3, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDC8u); return; } g_debug_last_store_pc = 0x8004CDC8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0094u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC34DCC: AFAD00A8 sw $t5, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDCCu); return; } g_debug_last_store_pc = 0x8004CDCCu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD00A8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDD0u); -#endif - /* 0xBFC34DD0: 87AE00E2 lh $t6, 226($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 226; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (226)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDD0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE00E2u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDD0u); -#endif - /* 0xBFC34DD4: 87B800E4 lh $t8, 228($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 228; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (228)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDD4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B800E4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDD4u); -#endif - /* 0xBFC34DD8: 87AF00EC lh $t7, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDD8u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF00ECu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34DDC: AFBF00AC sw $ra, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDDCu); return; } g_debug_last_store_pc = 0x8004CDDCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF00ACu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34DE0: AFAE0098 sw $t6, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDE0u); return; } g_debug_last_store_pc = 0x8004CDE0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0098u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC34DE4: AFB8009C sw $t8, 156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDE4u); return; } g_debug_last_store_pc = 0x8004CDE4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB8009Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34DE8: 1000000B beq $zero, $zero, 0xBFC34E18 */ - uint32_t psx_brA_BFC34DE8 = cpu->gpr[0]; uint32_t psx_brB_BFC34DE8 = cpu->gpr[0]; - psx_taken_BFC34DE8 = (psx_brA_BFC34DE8 == psx_brB_BFC34DE8); - psx_delay_BFC34DE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC34DEC: AFAF00A4 sw $t7, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDECu); return; } g_debug_last_store_pc = 0x8004CDECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF00A4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDECu); -#endif - if (psx_delay_BFC34DE8) { - psx_delay_BFC34DE8 = 0; - if (psx_taken_BFC34DE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE18u); - cpu->pc = 0x8004CE18u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CDF0u); - } -label_BFC34DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC34DF0: AFAC0094 sw $t4, 148($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDF0u); return; } g_debug_last_store_pc = 0x8004CDF0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0094u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC34DF4: AFAD00A8 sw $t5, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDF4u); return; } g_debug_last_store_pc = 0x8004CDF4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD00A8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDF4u); -#endif - /* 0xBFC34DF8: 87B900E8 lh $t9, 232($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 232; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (232)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDF8u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B900E8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDF8u); -#endif - /* 0xBFC34DFC: 87AE00EA lh $t6, 234($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 234; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (234)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CDFCu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE00EAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE00u); - cpu->pc = 0x8004CE00u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34E00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34E00u); - int psx_delay_BFC34E10 = 0; - int psx_taken_BFC34E10 = 0; - int psx_delay_BFC34E20 = 0; - int psx_delay_BFC34E2C = 0; - int psx_delay_BFC34E50 = 0; - int psx_delay_BFC34E78 = 0; - int psx_delay_BFC34E84 = 0; - int psx_delay_BFC34EB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34E18u: goto label_BFC34E18; - case 0xBFC34E28u: goto label_BFC34E28; - case 0xBFC34E34u: goto label_BFC34E34; - case 0xBFC34E58u: goto label_BFC34E58; - case 0xBFC34E80u: goto label_BFC34E80; - case 0xBFC34E8Cu: goto label_BFC34E8C; - default: break; - } - } -label_BFC34E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE00u); -#endif - /* 0xBFC34E00: 87B800EC lh $t8, 236($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 236; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (236)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE00u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B800ECu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC34E04: AFBF00AC sw $ra, 172($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE04u); return; } g_debug_last_store_pc = 0x8004CE04u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF00ACu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34E08: AFB90098 sw $t9, 152($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE08u); return; } g_debug_last_store_pc = 0x8004CE08u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90098u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34E0C: AFAE009C sw $t6, 156($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE0Cu); return; } g_debug_last_store_pc = 0x8004CE0Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE009Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34E10: 10000001 beq $zero, $zero, 0xBFC34E18 */ - uint32_t psx_brA_BFC34E10 = cpu->gpr[0]; uint32_t psx_brB_BFC34E10 = cpu->gpr[0]; - psx_taken_BFC34E10 = (psx_brA_BFC34E10 == psx_brB_BFC34E10); - psx_delay_BFC34E10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC34E14: AFB800A4 sw $t8, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE14u); return; } g_debug_last_store_pc = 0x8004CE14u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB800A4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE14u); -#endif - if (psx_delay_BFC34E10) { - psx_delay_BFC34E10 = 0; - if (psx_taken_BFC34E10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE18u); - goto label_BFC34E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CE18u); - } -label_BFC34E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC34E18: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34E1C: 27A500A4 addiu $a1, $sp, 164 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (164)); - PGXP_ALU(0x27A500A4u, cpu->gpr[5], _pgx1, 0x000000A4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34E20: 0C0138B4 jal 0xB004E2D0 */ - cpu->gpr[31] = 0x8004CE28u; /* jal link before delay slot */ - psx_delay_BFC34E20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC34E24: 27A60084 addiu $a2, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A60084u, cpu->gpr[6], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE24u); -#endif - if (psx_delay_BFC34E20) { - psx_delay_BFC34E20 = 0; - cpu->gpr[31] = 0x8004CE28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E2D0u); - cpu->pc = 0x8004E2D0u; return; - } -label_BFC34E28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC34E28: 27A40084 addiu $a0, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A40084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34E2C: 0C012E7C jal 0xB004B9F0 */ - cpu->gpr[31] = 0x8004CE34u; /* jal link before delay slot */ - psx_delay_BFC34E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34E30: 27A50074 addiu $a1, $sp, 116 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (116)); - PGXP_ALU(0x27A50074u, cpu->gpr[5], _pgx1, 0x00000074u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE30u); -#endif - if (psx_delay_BFC34E2C) { - psx_delay_BFC34E2C = 0; - cpu->gpr[31] = 0x8004CE34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B9F0u); - cpu->pc = 0x8004B9F0u; return; - } -label_BFC34E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE34u); -#endif - /* 0xBFC34E34: 8FAF0074 lw $t7, 116($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE34u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0074u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC34E38: 27A40094 addiu $a0, $sp, 148 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (148)); - PGXP_ALU(0x27A40094u, cpu->gpr[4], _pgx1, 0x00000094u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC34E3C: A60F0000 sh $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE3Cu); return; } g_debug_last_store_pc = 0x8004CE3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE40u); -#endif - /* 0xBFC34E40: 8FB90078 lw $t9, 120($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE40u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90078u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34E44: 27A50054 addiu $a1, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27A50054u, cpu->gpr[5], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC34E48: A6190006 sh $t9, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE48u); return; } g_debug_last_store_pc = 0x8004CE48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA6190006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE48u); -#endif - /* 0xBFC34E4C: 8FAE007C lw $t6, 124($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE4Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE007Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34E50: 0C012E7C jal 0xB004B9F0 */ - cpu->gpr[31] = 0x8004CE58u; /* jal link before delay slot */ - psx_delay_BFC34E50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC34E54: A60E000C sh $t6, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE54u); return; } g_debug_last_store_pc = 0x8004CE54u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE54u); -#endif - if (psx_delay_BFC34E50) { - psx_delay_BFC34E50 = 0; - cpu->gpr[31] = 0x8004CE58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B9F0u); - cpu->pc = 0x8004B9F0u; return; - } -label_BFC34E58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE58u); -#endif - /* 0xBFC34E58: 8FB80054 lw $t8, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE58u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80054u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC34E5C: 27A40074 addiu $a0, $sp, 116 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (116)); - PGXP_ALU(0x27A40074u, cpu->gpr[4], _pgx1, 0x00000074u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC34E60: A6180002 sh $t8, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE60u); return; } g_debug_last_store_pc = 0x8004CE60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA6180002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE60u); -#endif - /* 0xBFC34E64: 8FAF0058 lw $t7, 88($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE64u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0058u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34E68: 27A50054 addiu $a1, $sp, 84 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (84)); - PGXP_ALU(0x27A50054u, cpu->gpr[5], _pgx1, 0x00000054u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC34E6C: A60F0008 sh $t7, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE6Cu); return; } g_debug_last_store_pc = 0x8004CE6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE70u); -#endif - /* 0xBFC34E70: 8FB9005C lw $t9, 92($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE70u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9005Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC34E74: 27A60084 addiu $a2, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A60084u, cpu->gpr[6], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34E78: 0C0138B4 jal 0xB004E2D0 */ - cpu->gpr[31] = 0x8004CE80u; /* jal link before delay slot */ - psx_delay_BFC34E78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC34E7C: A619000E sh $t9, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE7Cu); return; } g_debug_last_store_pc = 0x8004CE7Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA619000Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE7Cu); -#endif - if (psx_delay_BFC34E78) { - psx_delay_BFC34E78 = 0; - cpu->gpr[31] = 0x8004CE80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E2D0u); - cpu->pc = 0x8004E2D0u; return; - } -label_BFC34E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC34E80: 27A40084 addiu $a0, $sp, 132 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (132)); - PGXP_ALU(0x27A40084u, cpu->gpr[4], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC34E84: 0C012E7C jal 0xB004B9F0 */ - cpu->gpr[31] = 0x8004CE8Cu; /* jal link before delay slot */ - psx_delay_BFC34E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34E88: 27A50064 addiu $a1, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A50064u, cpu->gpr[5], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE88u); -#endif - if (psx_delay_BFC34E84) { - psx_delay_BFC34E84 = 0; - cpu->gpr[31] = 0x8004CE8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004B9F0u); - cpu->pc = 0x8004B9F0u; return; - } -label_BFC34E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE8Cu); -#endif - /* 0xBFC34E8C: 8FAE0064 lw $t6, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE8Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0064u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34E90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC34E94: A60E0004 sh $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE94u); return; } g_debug_last_store_pc = 0x8004CE94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA60E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE94u); -#endif - /* 0xBFC34E98: 8FB80068 lw $t8, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CE98u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80068u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34E9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC34EA0: A618000A sh $t8, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEA0u); return; } g_debug_last_store_pc = 0x8004CEA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA618000Au, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEA0u); -#endif - /* 0xBFC34EA4: 8FAF006C lw $t7, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEA4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF006Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34EA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC34EAC: A60F0010 sh $t7, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEACu); return; } g_debug_last_store_pc = 0x8004CEACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEB0u); -#endif - /* 0xBFC34EB0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEB0u); -#endif - /* 0xBFC34EB4: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEB4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34EB8: 03E00008 jr $ra */ - psx_delay_BFC34EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34EBC: 27BD0100 addiu $sp, $sp, 256 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (256)); - PGXP_ALU(0x27BD0100u, cpu->gpr[29], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEBCu); -#endif - if (psx_delay_BFC34EB8) { - psx_delay_BFC34EB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34EC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34EC0u); -label_BFC34EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEC0u); -#endif - /* 0xBFC34EC0: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEC0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CEC4u); - cpu->pc = 0x8004CEC4u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC34EC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34EC4u); - int psx_delay_BFC34F48 = 0; - int psx_taken_BFC34F48 = 0; - int psx_delay_BFC34F68 = 0; - int psx_taken_BFC34F68 = 0; - int psx_delay_BFC34F78 = 0; - int psx_taken_BFC34F78 = 0; - int psx_delay_BFC34F80 = 0; - int psx_taken_BFC34F80 = 0; - int psx_delay_BFC34F88 = 0; - int psx_taken_BFC34F88 = 0; - int psx_delay_BFC34F94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC34F38u: goto label_BFC34F38; - case 0xBFC34F40u: goto label_BFC34F40; - case 0xBFC34F50u: goto label_BFC34F50; - case 0xBFC34F60u: goto label_BFC34F60; - case 0xBFC34F70u: goto label_BFC34F70; - case 0xBFC34F80u: goto label_BFC34F80; - case 0xBFC34F88u: goto label_BFC34F88; - case 0xBFC34F90u: goto label_BFC34F90; - case 0xBFC34F94u: goto label_BFC34F94; - default: break; - } - } -label_BFC34EC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34EC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34EC4: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC34EC8: 25CFF000 addiu $t7, $t6, -4096 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-4096)); - PGXP_ALU(0x25CFF000u, cpu->gpr[15], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC34ECC: AFAF0014 sw $t7, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CECCu); return; } g_debug_last_store_pc = 0x8004CECCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CED0u); -#endif - /* 0xBFC34ED0: 84980002 lh $t8, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CED0u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34ED4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC34ED8: AFB80018 sw $t8, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CED8u); return; } g_debug_last_store_pc = 0x8004CED8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80018u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CED8u); -#endif - /* 0xBFC34EDC: 84990004 lh $t9, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEDCu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC34EE0: 27A50040 addiu $a1, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27A50040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC34EE4: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEE4u); return; } g_debug_last_store_pc = 0x8004CEE4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEE4u); -#endif - /* 0xBFC34EE8: 84890006 lh $t1, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEE8u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x84890006u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC34EEC: 27A80064 addiu $t0, $sp, 100 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[29] + (100)); - PGXP_ALU(0x27A80064u, cpu->gpr[8], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC34EF0: AFA90020 sw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEF0u); return; } g_debug_last_store_pc = 0x8004CEF0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEF0u); -#endif - /* 0xBFC34EF4: 848A0008 lh $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CEF4u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC34EF8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC34EFC: 254BF000 addiu $t3, $t2, -4096 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (-4096)); - PGXP_ALU(0x254BF000u, cpu->gpr[11], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC34F00: AFAB0024 sw $t3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF00u); return; } g_debug_last_store_pc = 0x8004CF00u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0024u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF00u); -#endif - /* 0xBFC34F04: 848C000A lh $t4, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF04u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x848C000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC34F08: 24070003 addiu $a3, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24070003u, cpu->gpr[7], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC34F0C: AFAC0028 sw $t4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF0Cu); return; } g_debug_last_store_pc = 0x8004CF0Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0028u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF10u); -#endif - /* 0xBFC34F10: 848D000C lh $t5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF10u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x848D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC34F18: AFAD002C sw $t5, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF18u); return; } g_debug_last_store_pc = 0x8004CF18u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD002Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF18u); -#endif - /* 0xBFC34F1C: 848E000E lh $t6, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF1Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E000Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC34F24: AFAE0030 sw $t6, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF24u); return; } g_debug_last_store_pc = 0x8004CF24u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0030u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF24u); -#endif - /* 0xBFC34F28: 848F0010 lh $t7, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF28u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC34F30: 25F8F000 addiu $t8, $t7, -4096 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-4096)); - PGXP_ALU(0x25F8F000u, cpu->gpr[24], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC34F34: AFB80034 sw $t8, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF34u); return; } g_debug_last_store_pc = 0x8004CF34u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80034u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF34u); -#endif -label_BFC34F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC34F38: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC34F3C: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF3Cu); -#endif -label_BFC34F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF40u); -#endif - /* 0xBFC34F40: 8C86FFD4 lw $a2, -44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF40u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x8C86FFD4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC34F48: 04C10005 bgez $a2, 0xBFC34F60 */ - uint32_t psx_brA_BFC34F48 = cpu->gpr[6]; - psx_taken_BFC34F48 = ((int32_t)psx_brA_BFC34F48 >= 0); - psx_delay_BFC34F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF4Cu); -#endif - if (psx_delay_BFC34F48) { - psx_delay_BFC34F48 = 0; - if (psx_taken_BFC34F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF60u); - goto label_BFC34F60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF50u); - } -label_BFC34F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000041u); -#endif - /* 0xBFC34F50: 0006C823 subu $t9, $zero, $a2 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[0] - cpu->gpr[6]; - PGXP_ALU(0x0006C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC34F54: AC99FFD4 sw $t9, -44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF54u); return; } g_debug_last_store_pc = 0x8004CF54u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC99FFD4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF54u); -#endif - /* 0xBFC34F58: 8C86FFD4 lw $a2, -44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CF58u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x8C86FFD4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CF5Cu); -#endif -label_BFC34F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC34F60: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC34F64: 00461021 addu $v0, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[6]; - PGXP_ALU(0x00461021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC34F68: 1467FFF5 bne $v1, $a3, 0xBFC34F40 */ - uint32_t psx_brA_BFC34F68 = cpu->gpr[3]; uint32_t psx_brB_BFC34F68 = cpu->gpr[7]; - psx_taken_BFC34F68 = (psx_brA_BFC34F68 != psx_brB_BFC34F68); - psx_delay_BFC34F68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC34F6C: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF6Cu); -#endif - if (psx_delay_BFC34F68) { - psx_delay_BFC34F68 = 0; - if (psx_taken_BFC34F68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF40u); - goto label_BFC34F40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF70u); - } -label_BFC34F70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC34F70: 24A5000C addiu $a1, $a1, 12 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (12)); - PGXP_ALU(0x24A5000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC34F74: 00A8082B sltu $at, $a1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x00A8082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34F78: 1420FFEF bne $at, $zero, 0xBFC34F38 */ - uint32_t psx_brA_BFC34F78 = cpu->gpr[1]; uint32_t psx_brB_BFC34F78 = cpu->gpr[0]; - psx_taken_BFC34F78 = (psx_brA_BFC34F78 != psx_brB_BFC34F78); - psx_delay_BFC34F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC34F7C: 28410014 slti $at, $v0, 20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0); - PGXP_ALU(0x28410014u, cpu->gpr[1], _pgx1, 0x0014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF7Cu); -#endif - if (psx_delay_BFC34F78) { - psx_delay_BFC34F78 = 0; - if (psx_taken_BFC34F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF38u); - goto label_BFC34F38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF80u); - } -label_BFC34F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC34F80: 10200004 beq $at, $zero, 0xBFC34F94 */ - uint32_t psx_brA_BFC34F80 = cpu->gpr[1]; uint32_t psx_brB_BFC34F80 = cpu->gpr[0]; - psx_taken_BFC34F80 = (psx_brA_BFC34F80 == psx_brB_BFC34F80); - psx_delay_BFC34F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34F84: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF84u); -#endif - if (psx_delay_BFC34F80) { - psx_delay_BFC34F80 = 0; - if (psx_taken_BFC34F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF94u); - goto label_BFC34F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF88u); - } -label_BFC34F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34F88: 10000002 beq $zero, $zero, 0xBFC34F94 */ - uint32_t psx_brA_BFC34F88 = cpu->gpr[0]; uint32_t psx_brB_BFC34F88 = cpu->gpr[0]; - psx_taken_BFC34F88 = (psx_brA_BFC34F88 == psx_brB_BFC34F88); - psx_delay_BFC34F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34F8C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF8Cu); -#endif - if (psx_delay_BFC34F88) { - psx_delay_BFC34F88 = 0; - if (psx_taken_BFC34F88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF94u); - goto label_BFC34F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004CF90u); - } -label_BFC34F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC34F90: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF90u); -#endif -label_BFC34F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC34F94: 03E00008 jr $ra */ - psx_delay_BFC34F94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC34F98: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004CF98u); -#endif - if (psx_delay_BFC34F94) { - psx_delay_BFC34F94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC34FA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC34FA0u); - int psx_delay_BFC35120 = 0; -label_BFC34FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC34FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC34FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFA0u); -#endif - /* 0xBFC34FA0: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFA0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFA0u); -#endif - /* 0xBFC34FA4: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFA4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFA4u); -#endif - /* 0xBFC34FA8: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFA8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFA8u); -#endif - /* 0xBFC34FAC: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFACu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFB0u); -#endif - /* 0xBFC34FB0: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFB0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FB4: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FB8: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FBC: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FC0: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FC4: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FC8: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FCC: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FD0: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFD0u); -#endif - /* 0xBFC34FD4: 94A80000 lhu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFD4u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFD4u); -#endif - /* 0xBFC34FD8: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFD8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFD8u); -#endif - /* 0xBFC34FDC: 8CAA000C lw $t2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFDCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC34FE0: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC34FE4: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC34FE8: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FEC: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FF0: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC34FF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004CFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC34FF8: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004CFF8u); -#endif - /* 0xBFC34FFC: 94A80002 lhu $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004CFFCu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004CFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D000u); -#endif - /* 0xBFC35000: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D000u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D000u); -#endif - /* 0xBFC35004: 84AA000E lh $t2, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D004u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35008: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3500C: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35010: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35014: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35018: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3501C: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35020: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35024: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3502C: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D030u); -#endif - /* 0xBFC35030: 94A80004 lhu $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D030u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D030u); -#endif - /* 0xBFC35034: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D034u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D034u); -#endif - /* 0xBFC35038: 8CAA0010 lw $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D038u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3503C: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC35040: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35044: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35048: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3504C: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35050: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35054: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35058: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3505C: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35064: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC35068: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3506C: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC35070: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC35074: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D074u); return; } g_debug_last_store_pc = 0x8004D074u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC35078: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3507C: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35080: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC35084: ACD8000C sw $t8, 12($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D084u); return; } g_debug_last_store_pc = 0x8004D084u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACD8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35088: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3508C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D08Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35090: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35094: E8CB0010 swc2 gte[11], 16($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D094u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8CB0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35098: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3509C: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350A0: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0A0u); -#endif - /* 0xBFC350A4: 94AD0014 lhu $t5, 20($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0A4u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x94AD0014u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0A4u); -#endif - /* 0xBFC350A8: 8CAE0018 lw $t6, 24($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0A8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0A8u); -#endif - /* 0xBFC350AC: 8CAA001C lw $t2, 28($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0ACu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC350B0: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC350B4: 01AE6825 or $t5, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[13] = cpu->gpr[13] | cpu->gpr[14]; - PGXP_ALU(0x01AE6825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350B8: 488D0000 mtc2 $t5, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[13]; - PGXP_COP2(0x488D0000u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350BC: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC350C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350C4: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC350C8: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC350CC: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC350D0: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC350D4: ACC80004 sw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0D4u); return; } g_debug_last_store_pc = 0x8004D0D4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC350D8: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC350DC: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC350E0: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC350E4: ACC90008 sw $t1, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0E4u); return; } g_debug_last_store_pc = 0x8004D0E4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACC90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350E8: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350EC: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350F0: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC350F4: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D0F4u); -#endif - /* 0xBFC350F8: 8C8B0014 lw $t3, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0F8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B0014u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0F8u); -#endif - /* 0xBFC350FC: 8C8C0018 lw $t4, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D0FCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D100u); -#endif - /* 0xBFC35100: 8C8D001C lw $t5, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D100u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D001Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC35104: 010B4020 add $t0, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (int32_t)cpu->gpr[11]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x010B4020u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC35108: 012C4820 add $t1, $t1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[12]; { int32_t psx_a = (int32_t)cpu->gpr[9]; int32_t psx_b = (int32_t)cpu->gpr[12]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[9] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x012C4820u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC3510C: 014D5020 add $t2, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; { int32_t psx_a = (int32_t)cpu->gpr[10]; int32_t psx_b = (int32_t)cpu->gpr[13]; int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[10] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x014D5020u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC35110: ACC80014 sw $t0, 20($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D110u); return; } g_debug_last_store_pc = 0x8004D110u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACC80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC35114: ACC90018 sw $t1, 24($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D114u); return; } g_debug_last_store_pc = 0x8004D114u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACC90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC35118: ACCA001C sw $t2, 28($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D118u); return; } g_debug_last_store_pc = 0x8004D118u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACCA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC3511C: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35120: 03E00008 jr $ra */ - psx_delay_BFC35120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D124u); -#endif - if (psx_delay_BFC35120) { - psx_delay_BFC35120 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35128(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35128u); - int psx_delay_BFC35244 = 0; -label_BFC35128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D128u); -#endif - /* 0xBFC35128: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D128u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D128u); -#endif - /* 0xBFC3512C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D12Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D130u); -#endif - /* 0xBFC35130: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D130u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D130u); -#endif - /* 0xBFC35134: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D134u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D134u); -#endif - /* 0xBFC35138: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D138u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3513C: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35140: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35144: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35148: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3514C: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35150: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35154: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35158: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D158u); -#endif - /* 0xBFC3515C: 94A80000 lhu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D15Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D160u); -#endif - /* 0xBFC35160: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D160u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D160u); -#endif - /* 0xBFC35164: 8CAA000C lw $t2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D164u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35168: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3516C: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35170: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35174: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35178: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3517C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35180: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D180u); -#endif - /* 0xBFC35184: 94A80002 lhu $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D184u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D184u); -#endif - /* 0xBFC35188: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D188u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D188u); -#endif - /* 0xBFC3518C: 84AA000E lh $t2, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D18Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35190: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35194: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35198: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3519C: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351A0: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351A4: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351A8: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351AC: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC351B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351B4: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D1B4u); -#endif - /* 0xBFC351B8: 94A80004 lhu $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D1B8u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1B8u); -#endif - /* 0xBFC351BC: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D1BCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1C0u); -#endif - /* 0xBFC351C0: 8CAA0010 lw $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D1C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC351C4: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC351C8: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC351CC: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351D0: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351D4: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351D8: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351DC: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351E0: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351E4: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC351E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC351EC: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC351F0: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC351F4: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC351F8: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC351FC: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D1FCu); return; } g_debug_last_store_pc = 0x8004D1FCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC35200: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35204: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35208: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC3520C: ACD8000C sw $t8, 12($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D20Cu); return; } g_debug_last_store_pc = 0x8004D20Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACD8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35210: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35214: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35218: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3521C: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC35220: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35224: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC35228: ACC80004 sw $t0, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D228u); return; } g_debug_last_store_pc = 0x8004D228u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACC80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3522C: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35230: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35234: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC35238: ACC90008 sw $t1, 8($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D238u); return; } g_debug_last_store_pc = 0x8004D238u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACC90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3523C: E8CB0010 swc2 gte[11], 16($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D23Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8CB0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC35240: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35244: 03E00008 jr $ra */ - psx_delay_BFC35244 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D248u); -#endif - if (psx_delay_BFC35244) { - psx_delay_BFC35244 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3524C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3524Cu); - int psx_delay_BFC35340 = 0; -label_BFC3524C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3524Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3524Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3524C: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35250: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35254: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D254u); -#endif - /* 0xBFC35258: 94880000 lhu $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D258u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D258u); -#endif - /* 0xBFC3525C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D25Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D260u); -#endif - /* 0xBFC35260: 8C8A000C lw $t2, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D260u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35264: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC35268: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3526C: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35270: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35274: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35278: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3527C: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D280u); -#endif - /* 0xBFC35280: 94880002 lhu $t0, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D280u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D280u); -#endif - /* 0xBFC35284: 8C890008 lw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D284u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D284u); -#endif - /* 0xBFC35288: 848A000E lh $t2, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D288u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3528C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35290: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35294: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35298: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3529C: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352A0: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352A4: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352A8: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC352AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352B0: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D2B0u); -#endif - /* 0xBFC352B4: 94880004 lhu $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D2B4u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2B4u); -#endif - /* 0xBFC352B8: 8C890008 lw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D2B8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2B8u); -#endif - /* 0xBFC352BC: 8C8A0010 lw $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D2BCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC352C0: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC352C4: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC352C8: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352CC: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352D0: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352D4: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352D8: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352DC: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352E0: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC352E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC352E8: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC352EC: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC352F0: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC352F4: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC352F8: ACAE0000 sw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D2F8u); return; } g_debug_last_store_pc = 0x8004D2F8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC352FC: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35300: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35304: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC35308: ACB8000C sw $t8, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D308u); return; } g_debug_last_store_pc = 0x8004D308u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3530C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35310: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35314: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC35318: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3531C: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35320: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC35324: ACA80004 sw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D324u); return; } g_debug_last_store_pc = 0x8004D324u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35328: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3532C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35330: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC35334: ACA90008 sw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D334u); return; } g_debug_last_store_pc = 0x8004D334u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35338: E8AB0010 swc2 gte[11], 16($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D338u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3533C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35340: 03E00008 jr $ra */ - psx_delay_BFC35340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35344: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D344u); -#endif - if (psx_delay_BFC35340) { - psx_delay_BFC35340 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35348(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35348u); - int psx_delay_BFC35468 = 0; -label_BFC35348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D348u); -#endif - /* 0xBFC35348: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D348u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D348u); -#endif - /* 0xBFC3534C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D34Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D350u); -#endif - /* 0xBFC35350: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D350u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D350u); -#endif - /* 0xBFC35354: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D354u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D354u); -#endif - /* 0xBFC35358: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D358u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3535C: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35360: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35364: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35368: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3536C: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35370: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35374: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35378: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3537C: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D380u); -#endif - /* 0xBFC35380: 94A80000 lhu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D380u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D380u); -#endif - /* 0xBFC35384: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D384u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D384u); -#endif - /* 0xBFC35388: 8CAA000C lw $t2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D388u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3538C: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC35390: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35394: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35398: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3539C: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC353A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353A4: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D3A4u); -#endif - /* 0xBFC353A8: 94A80002 lhu $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3A8u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3A8u); -#endif - /* 0xBFC353AC: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3ACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3B0u); -#endif - /* 0xBFC353B0: 84AA000E lh $t2, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3B0u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC353B4: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC353B8: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353BC: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353C0: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353C4: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353C8: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353CC: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353D0: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC353D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353D8: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D3D8u); -#endif - /* 0xBFC353DC: 94A80004 lhu $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3DCu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3E0u); -#endif - /* 0xBFC353E0: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3E0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3E0u); -#endif - /* 0xBFC353E4: 8CAA0010 lw $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D3E4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC353E8: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC353EC: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC353F0: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353F4: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353F8: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC353FC: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35400: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35404: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35408: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3540C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35410: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC35414: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35418: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC3541C: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC35420: AC8E0000 sw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D420u); return; } g_debug_last_store_pc = 0x8004D420u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC35424: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35428: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC3542C: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC35430: AC98000C sw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D430u); return; } g_debug_last_store_pc = 0x8004D430u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35434: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35438: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3543C: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC35440: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC35444: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35448: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC3544C: AC880004 sw $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D44Cu); return; } g_debug_last_store_pc = 0x8004D44Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35450: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35454: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35458: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3545C: AC890008 sw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D45Cu); return; } g_debug_last_store_pc = 0x8004D45Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35460: E88B0010 swc2 gte[11], 16($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D460u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE88B0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC35464: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35468: 03E00008 jr $ra */ - psx_delay_BFC35468 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3546C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D46Cu); -#endif - if (psx_delay_BFC35468) { - psx_delay_BFC35468 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35470(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35470u); - int psx_delay_BFC35590 = 0; -label_BFC35470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D470u); -#endif - /* 0xBFC35470: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D470u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D470u); -#endif - /* 0xBFC35474: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D474u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D474u); -#endif - /* 0xBFC35478: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D478u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D478u); -#endif - /* 0xBFC3547C: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D47Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D480u); -#endif - /* 0xBFC35480: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D480u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35484: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35488: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3548C: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35490: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35494: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35498: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3549C: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354A0: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354A4: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4A4u); -#endif - /* 0xBFC354A8: 94A80000 lhu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4A8u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4A8u); -#endif - /* 0xBFC354AC: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4ACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4B0u); -#endif - /* 0xBFC354B0: 8CAA000C lw $t2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4B0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC354B4: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC354B8: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC354BC: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354C0: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354C4: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC354C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354CC: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4D0u); -#endif - /* 0xBFC354D0: 94A80002 lhu $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4D0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4D0u); -#endif - /* 0xBFC354D4: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4D4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4D4u); -#endif - /* 0xBFC354D8: 84AA000E lh $t2, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D4D8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC354DC: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC354E0: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354E4: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354E8: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354EC: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354F0: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354F4: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC354F8: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC354FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35500: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D500u); -#endif - /* 0xBFC35504: 94A80004 lhu $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D504u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D504u); -#endif - /* 0xBFC35508: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D508u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D508u); -#endif - /* 0xBFC3550C: 8CAA0010 lw $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D50Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35510: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC35514: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35518: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3551C: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35520: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35524: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35528: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3552C: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35530: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35534: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35538: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3553C: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35540: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC35544: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC35548: ACAE0000 sw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D548u); return; } g_debug_last_store_pc = 0x8004D548u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3554C: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35550: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35554: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC35558: ACB8000C sw $t8, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D558u); return; } g_debug_last_store_pc = 0x8004D558u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB8000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3555C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35560: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35564: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC35568: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3556C: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35570: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC35574: ACA80004 sw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D574u); return; } g_debug_last_store_pc = 0x8004D574u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35578: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3557C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35580: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC35584: ACA90008 sw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D584u); return; } g_debug_last_store_pc = 0x8004D584u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35588: E8AB0010 swc2 gte[11], 16($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D588u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3558C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35590: 03E00008 jr $ra */ - psx_delay_BFC35590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D594u); -#endif - if (psx_delay_BFC35590) { - psx_delay_BFC35590 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35598(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35598u); - int psx_delay_BFC35690 = 0; -label_BFC35598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35598: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3559C: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355A0: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5A0u); -#endif - /* 0xBFC355A4: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5A4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5A4u); -#endif - /* 0xBFC355A8: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5A8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5A8u); -#endif - /* 0xBFC355AC: 8C8A000C lw $t2, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5ACu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC355B0: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC355B4: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC355B8: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC355BC: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355C0: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355C4: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC355C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355CC: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5D0u); -#endif - /* 0xBFC355D0: 94880002 lhu $t0, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5D0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5D0u); -#endif - /* 0xBFC355D4: 8C890008 lw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5D4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5D4u); -#endif - /* 0xBFC355D8: 848A000E lh $t2, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D5D8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x848A000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC355DC: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC355E0: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355E4: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355E8: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355EC: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355F0: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355F4: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC355F8: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC355FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35600: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D600u); -#endif - /* 0xBFC35604: 94880004 lhu $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D604u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D604u); -#endif - /* 0xBFC35608: 8C890008 lw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D608u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D608u); -#endif - /* 0xBFC3560C: 8C8A0010 lw $t2, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D60Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35610: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC35614: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35618: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3561C: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35620: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35624: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35628: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3562C: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35630: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35634: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35638: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3563C: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35640: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC35644: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC35648: AC8E0000 sw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D648u); return; } g_debug_last_store_pc = 0x8004D648u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3564C: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35650: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35654: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC35658: AC98000C sw $t8, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D658u); return; } g_debug_last_store_pc = 0x8004D658u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC98000Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3565C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35660: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35664: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC35668: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3566C: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35670: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35674: AC880004 sw $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D674u); return; } g_debug_last_store_pc = 0x8004D674u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35678: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3567C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35680: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35684: AC890008 sw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D684u); return; } g_debug_last_store_pc = 0x8004D684u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35688: E88B0010 swc2 gte[11], 16($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D688u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (16)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE88B0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3568C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35690: 03E00008 jr $ra */ - psx_delay_BFC35690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D694u); -#endif - if (psx_delay_BFC35690) { - psx_delay_BFC35690 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35698(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35698u); - int psx_delay_BFC357BC = 0; -label_BFC35698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D698u); -#endif - /* 0xBFC35698: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D698u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D698u); -#endif - /* 0xBFC3569C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D69Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6A0u); -#endif - /* 0xBFC356A0: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6A0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6A0u); -#endif - /* 0xBFC356A4: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6A4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6A4u); -#endif - /* 0xBFC356A8: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6A8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356AC: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356B0: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356B4: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356B8: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356BC: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356C0: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356C4: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356C8: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356CC: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6D0u); -#endif - /* 0xBFC356D0: 94A80000 lhu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6D0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6D0u); -#endif - /* 0xBFC356D4: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6D4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6D4u); -#endif - /* 0xBFC356D8: 8CAA000C lw $t2, 12($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6D8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA000Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC356DC: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC356E0: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC356E4: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356E8: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356EC: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC356F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC356F4: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D6F4u); -#endif - /* 0xBFC356F8: 94A80002 lhu $t0, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6F8u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80002u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6F8u); -#endif - /* 0xBFC356FC: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D6FCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D700u); -#endif - /* 0xBFC35700: 84AA000E lh $t2, 14($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D700u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x84AA000Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35704: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35708: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3570C: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35710: 480B4800 mfc2 $t3, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_data(cpu, 9); - PGXP_COP2(0x480B4800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35714: 480C5000 mfc2 $t4, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 10); - PGXP_COP2(0x480C5000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35718: 480D5800 mfc2 $t5, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = gte_read_data(cpu, 11); - PGXP_COP2(0x480D5800u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3571C: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35720: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35724: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35728: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D728u); -#endif - /* 0xBFC3572C: 94A80004 lhu $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004D72Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D730u); -#endif - /* 0xBFC35730: 8CA90008 lw $t1, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D730u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D730u); -#endif - /* 0xBFC35734: 8CAA0010 lw $t2, 16($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D734u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0010u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35738: 3C01FFFF lui $at, 0xFFFF */ - cpu->gpr[1] = 0xFFFF0000u; - PGXP_ALU(0x3C01FFFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3573C: 01214824 and $t1, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01214824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35740: 01094025 or $t0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[9]; - PGXP_ALU(0x01094025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35744: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35748: 480E4800 mfc2 $t6, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = gte_read_data(cpu, 9); - PGXP_COP2(0x480E4800u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3574C: 480F5000 mfc2 $t7, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_data(cpu, 10); - PGXP_COP2(0x480F5000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35750: 48185800 mfc2 $t8, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 24); -#endif - cpu->gpr[24] = gte_read_data(cpu, 11); - PGXP_COP2(0x48185800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35754: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35758: 488A0800 mtc2 $t2, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[10]); - PGXP_COP2(0x488A0800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3575C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35760: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC35764: 316BFFFF andi $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35768: 000E7400 sll $t6, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4800u); -#endif - /* 0xBFC3576C: 01CB7025 or $t6, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[14] | cpu->gpr[11]; - PGXP_ALU(0x01CB7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC35770: 31ADFFFF andi $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC35774: 0018C400 sll $t8, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018C400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC35778: 030DC025 or $t8, $t8, $t5 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[24] | cpu->gpr[13]; - PGXP_ALU(0x030DC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3577C: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35780: 48084800 mfc2 $t0, gte_data[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 9); - PGXP_COP2(0x48084800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35784: 48095000 mfc2 $t1, gte_data[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_data(cpu, 10); - PGXP_COP2(0x48095000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35788: 480A5800 mfc2 $t2, gte_data[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = gte_read_data(cpu, 11); - PGXP_COP2(0x480A5800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3578C: 3108FFFF andi $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC35790: 000C6400 sll $t4, $t4, 16 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 16u; - PGXP_ALU(0x000C6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC35794: 010C4025 or $t0, $t0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[12]; - PGXP_ALU(0x010C4025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35798: 31EFFFFF andi $t7, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31EFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3579C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC357A0: 012F4825 or $t1, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[15]; - PGXP_ALU(0x012F4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357A4: 48CE0000 ctc2 $t6, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[14]; - PGXP_COP2(0x48CE0000u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357A8: 48C80800 ctc2 $t0, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[8]; - PGXP_COP2(0x48C80800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357AC: 48C91000 ctc2 $t1, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[9]; - PGXP_COP2(0x48C91000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357B0: 48D81800 ctc2 $t8, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[24]; - PGXP_COP2(0x48D81800u, cpu->gpr[24], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357B4: 48CA2000 ctc2 $t2, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[10]); - PGXP_COP2(0x48CA2000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC357B8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC357BC: 03E00008 jr $ra */ - psx_delay_BFC357BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC357C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D7C0u); -#endif - if (psx_delay_BFC357BC) { - psx_delay_BFC357BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC357C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC357C4u); - int psx_delay_BFC35824 = 0; -label_BFC357C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC357C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC357C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7C4u); -#endif - /* 0xBFC357C4: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7C4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7C4u); -#endif - /* 0xBFC357C8: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7C8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7C8u); -#endif - /* 0xBFC357CC: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7CCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7D0u); -#endif - /* 0xBFC357D0: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7D0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7D0u); -#endif - /* 0xBFC357D4: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7D4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357D8: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357DC: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357E0: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357E4: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357E8: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357EC: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357F0: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC357F4: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D7F4u); -#endif - /* 0xBFC357F8: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7F8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7F8u); -#endif - /* 0xBFC357FC: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D7FCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35800: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35804: 48890800 mtc2 $t1, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[9]); - PGXP_COP2(0x48890800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3580C: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35810: E8C90000 swc2 gte[9], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D810u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8C90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35814: E8C90000 swc2 gte[9], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D814u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8C90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35818: E8CA0004 swc2 gte[10], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D818u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8CA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3581C: E8CB0008 swc2 gte[11], 8($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D81Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8CB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC35820: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35824: 03E00008 jr $ra */ - psx_delay_BFC35824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D828u); -#endif - if (psx_delay_BFC35824) { - psx_delay_BFC35824 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3582C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3582Cu); - int psx_delay_BFC35864 = 0; -label_BFC3582C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3582Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3582Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3582C: 48C02800 ctc2 $zero, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[0]; - PGXP_COP2(0x48C02800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35830: 48C03000 ctc2 $zero, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[0]; - PGXP_COP2(0x48C03000u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35834: 48C03800 ctc2 $zero, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[0]; - PGXP_COP2(0x48C03800u, cpu->gpr[0], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D834u); -#endif - /* 0xBFC35838: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D838u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D838u); -#endif - /* 0xBFC3583C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D83Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35840: 48880000 mtc2 $t0, gte_data[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_data[0] = cpu->gpr[8]; - PGXP_COP2(0x48880000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35844: 48890800 mtc2 $t1, gte_data[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 1, cpu->gpr[9]); - PGXP_COP2(0x48890800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35848: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3584C: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004D84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35850: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D850u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35854: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D854u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35858: E8AA0004 swc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D858u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3585C: E8AB0008 swc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004D85Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004D85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC35860: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35864: 03E00008 jr $ra */ - psx_delay_BFC35864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D868u); -#endif - if (psx_delay_BFC35864) { - psx_delay_BFC35864 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3586C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3586Cu); - int psx_delay_BFC35888 = 0; -label_BFC3586C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3586Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3586Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D86Cu); -#endif - /* 0xBFC3586C: 8CA80000 lw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D86Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x8CA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D870u); -#endif - /* 0xBFC35870: 8CA90004 lw $t1, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D870u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D870u); -#endif - /* 0xBFC35874: 8CAA0008 lw $t2, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D874u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x8CAA0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35878: AC880014 sw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D878u); return; } g_debug_last_store_pc = 0x8004D878u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3587C: AC890018 sw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D87Cu); return; } g_debug_last_store_pc = 0x8004D87Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35880: AC8A001C sw $t2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D880u); return; } g_debug_last_store_pc = 0x8004D880u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC35884: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35888: 03E00008 jr $ra */ - psx_delay_BFC35888 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3588C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004D88Cu); -#endif - if (psx_delay_BFC35888) { - psx_delay_BFC35888 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35890(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35890u); - int psx_delay_BFC359AC = 0; -label_BFC35890: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35890u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D890u); -#endif - /* 0xBFC35890: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D890u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D890u); -#endif - /* 0xBFC35894: 8CAB0000 lw $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D894u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20u); } - PGXP_LOAD(0x8CAB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35898: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3589C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358A0: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC358A4: 012B0019 multu $t1, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012B0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004D8A4u); -#endif - /* 0xBFC358A8: 8CAC0004 lw $t4, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D8A8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x8CAC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC358AC: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8B0u); -#endif - /* 0xBFC358B0: 8CAD0008 lw $t5, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D8B0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x8CAD0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8B0u); -#endif - /* 0xBFC358B4: 8C880004 lw $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D8B4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC358B8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358BC: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358C0: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358C4: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC358C8: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004D8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC358CC: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC358D0: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC358D4: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC358D8: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC358DC: AC890000 sw $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D8DCu); return; } g_debug_last_store_pc = 0x8004D8DCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC358E0: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358E4: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358E8: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC358EC: 012D0019 multu $t1, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012D0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004D8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC358F0: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8F0u); -#endif - /* 0xBFC358F4: 8C880008 lw $t0, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D8F4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358F8: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC358FC: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35900: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC35904: 014B0019 multu $t2, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014B0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004D904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35908: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3590C: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35910: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC35914: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35918: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D918u); return; } g_debug_last_store_pc = 0x8004D918u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3591C: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35920: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35924: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC35928: 012C0019 multu $t1, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012C0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004D928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC3592C: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D930u); -#endif - /* 0xBFC35930: 8C88000C lw $t0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D930u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C88000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35934: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35938: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3593C: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC35940: 014D0019 multu $t2, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014D0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004D940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35944: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35948: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3594C: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC35950: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35954: AC890008 sw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D954u); return; } g_debug_last_store_pc = 0x8004D954u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35958: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3595C: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35960: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC35964: 012B0019 multu $t1, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012B0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004D964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC35968: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D968u); -#endif - /* 0xBFC3596C: 8C880010 lw $t0, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D96Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35970: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35974: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35978: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC3597C: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004D97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35980: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35984: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35988: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3598C: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35990: AC89000C sw $t1, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D990u); return; } g_debug_last_store_pc = 0x8004D990u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC89000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35994: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35998: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3599C: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC359A0: 012D0019 multu $t1, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012D0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359A4: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359A8: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC359AC: 03E00008 jr $ra */ - psx_delay_BFC359AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC359B0: AC890010 sw $t1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9B0u); return; } g_debug_last_store_pc = 0x8004D9B0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9B0u); -#endif - if (psx_delay_BFC359AC) { - psx_delay_BFC359AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC359B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC359B4u); - int psx_delay_BFC35AD0 = 0; -label_BFC359B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC359B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC359B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9B4u); -#endif - /* 0xBFC359B4: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9B4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9B4u); -#endif - /* 0xBFC359B8: 8CAB0000 lw $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20u); } - PGXP_LOAD(0x8CAB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC359BC: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359C0: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359C4: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC359C8: 012B0019 multu $t1, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012B0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004D9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC359CC: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9D0u); -#endif - /* 0xBFC359D0: 8CAC0004 lw $t4, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9D0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x8CAC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9D0u); -#endif - /* 0xBFC359D4: 8CAD0008 lw $t5, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9D4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x8CAD0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9D4u); -#endif - /* 0xBFC359D8: 8C880004 lw $t0, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004D9D8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC359DC: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359E0: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359E4: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC359E8: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC359EC: 014B0019 multu $t2, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014B0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004D9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC359F0: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004D9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC359F4: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC359F8: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC359FC: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004D9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35A00: AC890000 sw $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA00u); return; } g_debug_last_store_pc = 0x8004DA00u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35A04: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A08: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A0C: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC35A10: 012B0019 multu $t1, $t3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[11]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012B0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[11]); -#ifdef PSX_COSIM - cosim_instr(0x8004DA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC35A14: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA14u); -#endif - /* 0xBFC35A18: 8C880008 lw $t0, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA18u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A1C: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A20: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A24: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC35A28: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004DA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A2C: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A30: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A34: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC35A38: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35A3C: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA3Cu); return; } g_debug_last_store_pc = 0x8004DA3Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35A40: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A44: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A48: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC35A4C: 012C0019 multu $t1, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012C0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004DA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC35A50: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA50u); -#endif - /* 0xBFC35A54: 8C88000C lw $t0, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA54u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C88000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A58: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A5C: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A60: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC35A64: 014C0019 multu $t2, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014C0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x8004DA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A68: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A6C: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35A70: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC35A74: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35A78: AC890008 sw $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA78u); return; } g_debug_last_store_pc = 0x8004DA78u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35A7C: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A80: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A84: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC35A88: 012D0019 multu $t1, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012D0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004DA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC35A8C: 00085403 sra $t2, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x00085403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DA90u); -#endif - /* 0xBFC35A90: 8C880010 lw $t0, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DA90u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A94: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A98: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35A9C: 3129FFFF andi $t1, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x3129FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC35AA0: 014D0019 multu $t2, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[10] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[10])); -#endif - PGXP_MULDIV(0x014D0019u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004DAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35AA4: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35AA8: 000A5303 sra $t2, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 12u); - PGXP_ALU(0x000A5303u, cpu->gpr[10], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC35AAC: 000A5400 sll $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC35AB0: 012A4825 or $t1, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A4825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35AB4: AC89000C sw $t1, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAB4u); return; } g_debug_last_store_pc = 0x8004DAB4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC89000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC35AB8: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35ABC: 00094C00 sll $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00094C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35AC0: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC35AC4: 012D0019 multu $t1, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x012D0019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8004DAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35AC8: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC35ACC: 00094B03 sra $t1, $t1, 12 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 12u); - PGXP_ALU(0x00094B03u, cpu->gpr[9], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35AD0: 03E00008 jr $ra */ - psx_delay_BFC35AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35AD4: AC890010 sw $t1, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAD4u); return; } g_debug_last_store_pc = 0x8004DAD4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAD4u); -#endif - if (psx_delay_BFC35AD0) { - psx_delay_BFC35AD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35AD8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35AD8u); - int psx_delay_BFC35B00 = 0; -label_BFC35AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAD8u); -#endif - /* 0xBFC35AD8: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAD8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAD8u); -#endif - /* 0xBFC35ADC: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DADCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAE0u); -#endif - /* 0xBFC35AE0: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAE0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAE0u); -#endif - /* 0xBFC35AE4: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAE4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAE4u); -#endif - /* 0xBFC35AE8: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DAE8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35AEC: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35AF0: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35AF4: 48CA1000 ctc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[10]; - PGXP_COP2(0x48CA1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35AF8: 48CB1800 ctc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[11]; - PGXP_COP2(0x48CB1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35AFC: 48CC2000 ctc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[12]); - PGXP_COP2(0x48CC2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35B00: 03E00008 jr $ra */ - psx_delay_BFC35B00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DB04u); -#endif - if (psx_delay_BFC35B00) { - psx_delay_BFC35B00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35B08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35B08u); - int psx_delay_BFC35B30 = 0; -label_BFC35B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB08u); -#endif - /* 0xBFC35B08: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB08u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB08u); -#endif - /* 0xBFC35B0C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB0Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB10u); -#endif - /* 0xBFC35B10: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB10u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB10u); -#endif - /* 0xBFC35B14: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB14u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB14u); -#endif - /* 0xBFC35B18: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB18u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B1C: 48C84000 ctc2 $t0, gte_ctrl[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[8] = cpu->gpr[8]; - PGXP_COP2(0x48C84000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B20: 48C94800 ctc2 $t1, gte_ctrl[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[9] = cpu->gpr[9]; - PGXP_COP2(0x48C94800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B24: 48CA5000 ctc2 $t2, gte_ctrl[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[10] = cpu->gpr[10]; - PGXP_COP2(0x48CA5000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B28: 48CB5800 ctc2 $t3, gte_ctrl[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[11] = cpu->gpr[11]; - PGXP_COP2(0x48CB5800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B2C: 48CC6000 ctc2 $t4, gte_ctrl[12] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 12, cpu->gpr[12]); - PGXP_COP2(0x48CC6000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35B30: 03E00008 jr $ra */ - psx_delay_BFC35B30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35B34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DB34u); -#endif - if (psx_delay_BFC35B30) { - psx_delay_BFC35B30 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35B38(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35B38u); - int psx_delay_BFC35B60 = 0; -label_BFC35B38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35B38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB38u); -#endif - /* 0xBFC35B38: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB38u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB38u); -#endif - /* 0xBFC35B3C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB3Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB40u); -#endif - /* 0xBFC35B40: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB40u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB40u); -#endif - /* 0xBFC35B44: 8C8B000C lw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB44u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x8C8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB44u); -#endif - /* 0xBFC35B48: 8C8C0010 lw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB48u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x8C8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B4C: 48C88000 ctc2 $t0, gte_ctrl[16] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[16] = cpu->gpr[8]; - PGXP_COP2(0x48C88000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B50: 48C98800 ctc2 $t1, gte_ctrl[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[17] = cpu->gpr[9]; - PGXP_COP2(0x48C98800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B54: 48CA9000 ctc2 $t2, gte_ctrl[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[18] = cpu->gpr[10]; - PGXP_COP2(0x48CA9000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B58: 48CB9800 ctc2 $t3, gte_ctrl[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[19] = cpu->gpr[11]; - PGXP_COP2(0x48CB9800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B5C: 48CCA000 ctc2 $t4, gte_ctrl[20] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 20, cpu->gpr[12]); - PGXP_COP2(0x48CCA000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35B60: 03E00008 jr $ra */ - psx_delay_BFC35B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DB64u); -#endif - if (psx_delay_BFC35B60) { - psx_delay_BFC35B60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35B68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35B68u); - int psx_delay_BFC35B80 = 0; -label_BFC35B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB68u); -#endif - /* 0xBFC35B68: 8C880014 lw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB68u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB68u); -#endif - /* 0xBFC35B6C: 8C890018 lw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB6Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB70u); -#endif - /* 0xBFC35B70: 8C8A001C lw $t2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB70u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B74: 48C82800 ctc2 $t0, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[8]; - PGXP_COP2(0x48C82800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B78: 48C93000 ctc2 $t1, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[9]; - PGXP_COP2(0x48C93000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35B7C: 48CA3800 ctc2 $t2, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[10]; - PGXP_COP2(0x48CA3800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35B80: 03E00008 jr $ra */ - psx_delay_BFC35B80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35B84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DB84u); -#endif - if (psx_delay_BFC35B80) { - psx_delay_BFC35B80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35B88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35B88u); - int psx_delay_BFC35B98 = 0; - int psx_taken_BFC35B98 = 0; - int psx_delay_BFC35BA8 = 0; - int psx_delay_BFC35BBC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC35BA0u: goto label_BFC35BA0; - case 0xBFC35BB0u: goto label_BFC35BB0; - default: break; - } - } -label_BFC35B88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35B88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35B88: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB88u); -#endif - /* 0xBFC35B8C: 8DCE8EDC lw $t6, -28964($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DB8Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8EDCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35B90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC35B94: 29C10280 slti $at, $t6, 640 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (640) ? 1 : 0); - PGXP_ALU(0x29C10280u, cpu->gpr[1], _pgx1, 0x0280u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC35B98: 1420000A bne $at, $zero, 0xBFC35BC4 */ - uint32_t psx_brA_BFC35B98 = cpu->gpr[1]; uint32_t psx_brB_BFC35B98 = cpu->gpr[0]; - psx_taken_BFC35B98 = (psx_brA_BFC35B98 != psx_brB_BFC35B98); - psx_delay_BFC35B98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35B9C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DB9Cu); -#endif - if (psx_delay_BFC35B98) { - psx_delay_BFC35B98 = 0; - if (psx_taken_BFC35B98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DBC4u); - cpu->pc = 0x8004DBC4u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DBA0u); - } -label_BFC35BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000002u); -#endif - /* 0xBFC35BA0: AC3F8ED0 sw $ra, -28976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBA0u); return; } g_debug_last_store_pc = 0x8004DBA0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC3F8ED0u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC35BA4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC35BA8: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8004DBB0u; /* jal link before delay slot */ - psx_delay_BFC35BA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC35BAC: 24849160 addiu $a0, $a0, -28320 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28320)); - PGXP_ALU(0x24849160u, cpu->gpr[4], _pgx1, 0xFFFF9160u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBACu); -#endif - if (psx_delay_BFC35BA8) { - psx_delay_BFC35BA8 = 0; - cpu->gpr[31] = 0x8004DBB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC35BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC35BB0: 3C1F8008 lui $ra, 0x8008 */ - cpu->gpr[31] = 0x80080000u; - PGXP_ALU(0x3C1F8008u, cpu->gpr[31], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBB0u); -#endif - /* 0xBFC35BB4: 8FFF8ED0 lw $ra, -28976($ra) */ - { uint32_t _pgxa = cpu->gpr[31] + -28976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[31] + (-28976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x80000000u); } - PGXP_LOAD(0x8FFF8ED0u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35BBC: 03E00008 jr $ra */ - psx_delay_BFC35BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35BC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DBC0u); -#endif - if (psx_delay_BFC35BBC) { - psx_delay_BFC35BBC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35BC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35BC4u); - int psx_delay_BFC35C20 = 0; -label_BFC35BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35BC4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC35BC8: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35BCC: 25EF8EE0 addiu $t7, $t7, -28960 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-28960)); - PGXP_ALU(0x25EF8EE0u, cpu->gpr[15], _pgx1, 0xFFFF8EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BD0: 48480000 cfc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[0]; - PGXP_COP2(0x48480000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BD4: 48490800 cfc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[1]; - PGXP_COP2(0x48490800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC35BD8: ADE80000 sw $t0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBD8u); return; } g_debug_last_store_pc = 0x8004DBD8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35BDC: ADE90004 sw $t1, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBDCu); return; } g_debug_last_store_pc = 0x8004DBDCu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xADE90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BE0: 48481000 cfc2 $t0, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[2]; - PGXP_COP2(0x48481000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BE4: 48491800 cfc2 $t1, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[3]; - PGXP_COP2(0x48491800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC35BE8: ADE80008 sw $t0, 8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBE8u); return; } g_debug_last_store_pc = 0x8004DBE8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADE80008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35BEC: ADE9000C sw $t1, 12($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBECu); return; } g_debug_last_store_pc = 0x8004DBECu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xADE9000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BF0: 48482000 cfc2 $t0, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_ctrl(cpu, 4); - PGXP_COP2(0x48482000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35BF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC35BF8: ADE80010 sw $t0, 16($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DBF8u); return; } g_debug_last_store_pc = 0x8004DBF8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADE80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35BFC: 48482800 cfc2 $t0, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[5]; - PGXP_COP2(0x48482800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C00: 48493000 cfc2 $t1, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[6]; - PGXP_COP2(0x48493000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C04: 484A3800 cfc2 $t2, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[7]; - PGXP_COP2(0x484A3800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC35C08: ADE80014 sw $t0, 20($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC08u); return; } g_debug_last_store_pc = 0x8004DC08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xADE80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC35C0C: ADE90018 sw $t1, 24($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC0Cu); return; } g_debug_last_store_pc = 0x8004DC0Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xADE90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8400u); -#endif - /* 0xBFC35C10: ADEA001C sw $t2, 28($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC10u); return; } g_debug_last_store_pc = 0x8004DC10u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xADEA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35C14: 21CE0020 addi $t6, $t6, 32 */ - { uint32_t _pgx1 = cpu->gpr[14]; { int32_t psx_a = (int32_t)cpu->gpr[14]; int32_t psx_b = (32); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[14] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x21CE0020u, cpu->gpr[14], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35C18: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC35C1C: AC2E8EDC sw $t6, -28964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC1Cu); return; } g_debug_last_store_pc = 0x8004DC1Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8EDCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35C20: 03E00008 jr $ra */ - psx_delay_BFC35C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35C24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DC24u); -#endif - if (psx_delay_BFC35C20) { - psx_delay_BFC35C20 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35C28(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35C28u); - int psx_delay_BFC35C34 = 0; - int psx_taken_BFC35C34 = 0; - int psx_delay_BFC35C44 = 0; - int psx_delay_BFC35C58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC35C3Cu: goto label_BFC35C3C; - case 0xBFC35C4Cu: goto label_BFC35C4C; - default: break; - } - } -label_BFC35C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35C28: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC28u); -#endif - /* 0xBFC35C2C: 8DCE8EDC lw $t6, -28964($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC2Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE8EDCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35C34: 1DC0000A bgtz $t6, 0xBFC35C60 */ - uint32_t psx_brA_BFC35C34 = cpu->gpr[14]; - psx_taken_BFC35C34 = ((int32_t)psx_brA_BFC35C34 > 0); - psx_delay_BFC35C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35C38: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC38u); -#endif - if (psx_delay_BFC35C34) { - psx_delay_BFC35C34 = 0; - if (psx_taken_BFC35C34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DC60u); - cpu->pc = 0x8004DC60u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004DC3Cu); - } -label_BFC35C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000002u); -#endif - /* 0xBFC35C3C: AC3F8ED0 sw $ra, -28976($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC3Cu); return; } g_debug_last_store_pc = 0x8004DC3Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAC3F8ED0u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC35C40: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC35C44: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8004DC4Cu; /* jal link before delay slot */ - psx_delay_BFC35C44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC35C48: 24849191 addiu $a0, $a0, -28271 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28271)); - PGXP_ALU(0x24849191u, cpu->gpr[4], _pgx1, 0xFFFF9191u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC48u); -#endif - if (psx_delay_BFC35C44) { - psx_delay_BFC35C44 = 0; - cpu->gpr[31] = 0x8004DC4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC35C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC35C4C: 3C1F8008 lui $ra, 0x8008 */ - cpu->gpr[31] = 0x80080000u; - PGXP_ALU(0x3C1F8008u, cpu->gpr[31], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC50u); -#endif - /* 0xBFC35C50: 8FFF8ED0 lw $ra, -28976($ra) */ - { uint32_t _pgxa = cpu->gpr[31] + -28976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[31] + (-28976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x80000000u); } - PGXP_LOAD(0x8FFF8ED0u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35C54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35C58: 03E00008 jr $ra */ - psx_delay_BFC35C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35C5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DC5Cu); -#endif - if (psx_delay_BFC35C58) { - psx_delay_BFC35C58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35C60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35C60u); - int psx_delay_BFC35CC0 = 0; -label_BFC35C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC35C60: 21CEFFE0 addi $t6, $t6, -32 */ - { uint32_t _pgx1 = cpu->gpr[14]; { int32_t psx_a = (int32_t)cpu->gpr[14]; int32_t psx_b = (-32); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[14] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x21CEFFE0u, cpu->gpr[14], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC35C64: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC35C68: AC2E8EDC sw $t6, -28964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC68u); return; } g_debug_last_store_pc = 0x8004DC68u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E8EDCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35C6C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC35C70: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC35C74: 25EF8EE0 addiu $t7, $t7, -28960 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-28960)); - PGXP_ALU(0x25EF8EE0u, cpu->gpr[15], _pgx1, 0xFFFF8EE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC74u); -#endif - /* 0xBFC35C78: 8DE80000 lw $t0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC78u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC78u); -#endif - /* 0xBFC35C7C: 8DE90004 lw $t1, 4($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC7Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000u); } - PGXP_LOAD(0x8DE90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C80: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C84: 48C90800 ctc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[1] = cpu->gpr[9]; - PGXP_COP2(0x48C90800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC84u); -#endif - /* 0xBFC35C88: 8DE80008 lw $t0, 8($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC88u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80008u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC88u); -#endif - /* 0xBFC35C8C: 8DE9000C lw $t1, 12($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC8Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000u); } - PGXP_LOAD(0x8DE9000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C90: 48C81000 ctc2 $t0, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[8]; - PGXP_COP2(0x48C81000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35C94: 48C91800 ctc2 $t1, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[3] = cpu->gpr[9]; - PGXP_COP2(0x48C91800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DC94u); -#endif - /* 0xBFC35C98: 8DE80010 lw $t0, 16($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DC98u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35C9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CA0: 48C82000 ctc2 $t0, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[8]); - PGXP_COP2(0x48C82000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35CA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DCA4u); -#endif - /* 0xBFC35CA8: 8DE80014 lw $t0, 20($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCA8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000u); } - PGXP_LOAD(0x8DE80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCA8u); -#endif - /* 0xBFC35CAC: 8DE90018 lw $t1, 24($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000u); } - PGXP_LOAD(0x8DE90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCB0u); -#endif - /* 0xBFC35CB0: 8DEA001C lw $t2, 28($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCB0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8000u); } - PGXP_LOAD(0x8DEA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CB4: 48C82800 ctc2 $t0, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[5] = cpu->gpr[8]; - PGXP_COP2(0x48C82800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CB8: 48C93000 ctc2 $t1, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[6] = cpu->gpr[9]; - PGXP_COP2(0x48C93000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CBC: 48CA3800 ctc2 $t2, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[7] = cpu->gpr[10]; - PGXP_COP2(0x48CA3800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35CC0: 03E00008 jr $ra */ - psx_delay_BFC35CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35CC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DCC4u); -#endif - if (psx_delay_BFC35CC0) { - psx_delay_BFC35CC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35CC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35CC8u); - int psx_delay_BFC35D08 = 0; -label_BFC35CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CC8: 48480000 cfc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[0]; - PGXP_COP2(0x48480000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CCC: 48490800 cfc2 $t1, gte_ctrl[1] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[1]; - PGXP_COP2(0x48490800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CD0: 484A1000 cfc2 $t2, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[2]; - PGXP_COP2(0x484A1000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CD4: 484B1800 cfc2 $t3, gte_ctrl[3] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = cpu->gte_ctrl[3]; - PGXP_COP2(0x484B1800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CD8: 484C2000 cfc2 $t4, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_ctrl(cpu, 4); - PGXP_COP2(0x484C2000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35CDC: AC880000 sw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCDCu); return; } g_debug_last_store_pc = 0x8004DCDCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35CE0: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCE0u); return; } g_debug_last_store_pc = 0x8004DCE0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35CE4: AC8A0008 sw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCE4u); return; } g_debug_last_store_pc = 0x8004DCE4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC35CE8: AC8B000C sw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCE8u); return; } g_debug_last_store_pc = 0x8004DCE8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC35CEC: AC8C0010 sw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCECu); return; } g_debug_last_store_pc = 0x8004DCECu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CF0: 48482800 cfc2 $t0, gte_ctrl[5] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[5]; - PGXP_COP2(0x48482800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CF4: 48493000 cfc2 $t1, gte_ctrl[6] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[6]; - PGXP_COP2(0x48493000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35CF8: 484A3800 cfc2 $t2, gte_ctrl[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[7]; - PGXP_COP2(0x484A3800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35CFC: AC880014 sw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DCFCu); return; } g_debug_last_store_pc = 0x8004DCFCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35D00: AC890018 sw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD00u); return; } g_debug_last_store_pc = 0x8004DD00u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35D04: AC8A001C sw $t2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD04u); return; } g_debug_last_store_pc = 0x8004DD04u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35D08: 03E00008 jr $ra */ - psx_delay_BFC35D08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35D0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DD0Cu); -#endif - if (psx_delay_BFC35D08) { - psx_delay_BFC35D08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35D10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35D10u); - int psx_delay_BFC35D50 = 0; -label_BFC35D10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35D10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D10: 48484000 cfc2 $t0, gte_ctrl[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[8]; - PGXP_COP2(0x48484000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D14: 48494800 cfc2 $t1, gte_ctrl[9] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[9]; - PGXP_COP2(0x48494800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D18: 484A5000 cfc2 $t2, gte_ctrl[10] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[10]; - PGXP_COP2(0x484A5000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D1C: 484B5800 cfc2 $t3, gte_ctrl[11] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = cpu->gte_ctrl[11]; - PGXP_COP2(0x484B5800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D20: 484C6000 cfc2 $t4, gte_ctrl[12] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_ctrl(cpu, 12); - PGXP_COP2(0x484C6000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35D24: AC880000 sw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD24u); return; } g_debug_last_store_pc = 0x8004DD24u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35D28: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD28u); return; } g_debug_last_store_pc = 0x8004DD28u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35D2C: AC8A0008 sw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD2Cu); return; } g_debug_last_store_pc = 0x8004DD2Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC35D30: AC8B000C sw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD30u); return; } g_debug_last_store_pc = 0x8004DD30u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC35D34: AC8C0010 sw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD34u); return; } g_debug_last_store_pc = 0x8004DD34u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D38: 48486800 cfc2 $t0, gte_ctrl[13] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[13]; - PGXP_COP2(0x48486800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D3C: 48497000 cfc2 $t1, gte_ctrl[14] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[14]; - PGXP_COP2(0x48497000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D40: 484A7800 cfc2 $t2, gte_ctrl[15] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[15]; - PGXP_COP2(0x484A7800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35D44: AC880014 sw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD44u); return; } g_debug_last_store_pc = 0x8004DD44u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35D48: AC890018 sw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD48u); return; } g_debug_last_store_pc = 0x8004DD48u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35D4C: AC8A001C sw $t2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD4Cu); return; } g_debug_last_store_pc = 0x8004DD4Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35D50: 03E00008 jr $ra */ - psx_delay_BFC35D50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35D54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DD54u); -#endif - if (psx_delay_BFC35D50) { - psx_delay_BFC35D50 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35D58(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35D58u); - int psx_delay_BFC35D98 = 0; -label_BFC35D58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35D58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D58: 48488000 cfc2 $t0, gte_ctrl[16] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[16]; - PGXP_COP2(0x48488000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D5C: 48498800 cfc2 $t1, gte_ctrl[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[17]; - PGXP_COP2(0x48498800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D60: 484A9000 cfc2 $t2, gte_ctrl[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[18]; - PGXP_COP2(0x484A9000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D64: 484B9800 cfc2 $t3, gte_ctrl[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = cpu->gte_ctrl[19]; - PGXP_COP2(0x484B9800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D68: 484CA000 cfc2 $t4, gte_ctrl[20] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_ctrl(cpu, 20); - PGXP_COP2(0x484CA000u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35D6C: AC880000 sw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD6Cu); return; } g_debug_last_store_pc = 0x8004DD6Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35D70: AC890004 sw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD70u); return; } g_debug_last_store_pc = 0x8004DD70u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35D74: AC8A0008 sw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD74u); return; } g_debug_last_store_pc = 0x8004DD74u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC35D78: AC8B000C sw $t3, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD78u); return; } g_debug_last_store_pc = 0x8004DD78u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B000Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC35D7C: AC8C0010 sw $t4, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD7Cu); return; } g_debug_last_store_pc = 0x8004DD7Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC8C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D80: 4848A800 cfc2 $t0, gte_ctrl[21] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = cpu->gte_ctrl[21]; - PGXP_COP2(0x4848A800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D84: 4849B000 cfc2 $t1, gte_ctrl[22] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_ctrl[22]; - PGXP_COP2(0x4849B000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35D88: 484AB800 cfc2 $t2, gte_ctrl[23] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 10); -#endif - cpu->gpr[10] = cpu->gte_ctrl[23]; - PGXP_COP2(0x484AB800u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC35D8C: AC880014 sw $t0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD8Cu); return; } g_debug_last_store_pc = 0x8004DD8Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC880014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC35D90: AC890018 sw $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD90u); return; } g_debug_last_store_pc = 0x8004DD90u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC35D94: AC8A001C sw $t2, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DD94u); return; } g_debug_last_store_pc = 0x8004DD94u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC8A001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35D98: 03E00008 jr $ra */ - psx_delay_BFC35D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35D9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DD9Cu); -#endif - if (psx_delay_BFC35D98) { - psx_delay_BFC35D98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35DA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35DA0u); - int psx_delay_BFC35DCC = 0; -label_BFC35DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DA0: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DA4: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35DA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DAC: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004DDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DB0: E8AE0000 swc2 gte[14], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DDB0u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8AE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DB4: E8AE0000 swc2 gte[14], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DDB4u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8AE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DB8: E8C80000 swc2 gte[8], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DDB8u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE8C80000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DBC: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DC0: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC35DC4: ACE30000 sw $v1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DDC4u); return; } g_debug_last_store_pc = 0x8004DDC4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xACE30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC35DC8: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35DCC: 03E00008 jr $ra */ - psx_delay_BFC35DCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35DD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DDD0u); -#endif - if (psx_delay_BFC35DCC) { - psx_delay_BFC35DCC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35DD4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35DD4u); - int psx_delay_BFC35E28 = 0; -label_BFC35DD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35DD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DD4: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DD8: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DDC: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DE0: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DE4: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DE8: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35DEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35DF0: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004DDF0u); -#endif - /* 0xBFC35DF4: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DDF4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDF4u); -#endif - /* 0xBFC35DF8: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DDF8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDF8u); -#endif - /* 0xBFC35DFC: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DDFCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE00u); -#endif - /* 0xBFC35E00: 8FAB001C lw $t3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DE00u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB001Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E04: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE04u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E08: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE08u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E0C: E90D0000 swc2 gte[13], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE0Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE90D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E10: E92E0000 swc2 gte[14], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE10u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE92E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E14: E9480000 swc2 gte[8], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE14u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9480000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E18: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E1C: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC35E20: AD630000 sw $v1, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DE20u); return; } g_debug_last_store_pc = 0x8004DE20u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAD630000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC35E24: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35E28: 03E00008 jr $ra */ - psx_delay_BFC35E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE2Cu); -#endif - if (psx_delay_BFC35E28) { - psx_delay_BFC35E28 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35E30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35E30u); - int psx_delay_BFC35E5C = 0; -label_BFC35E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E30: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E34: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E3C: 4A480012 gte cmd 0x12 */ - gte_execute(cpu, 0x0480012); -#ifdef PSX_COSIM - cosim_instr(0x8004DE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E40: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE40u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E44: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE44u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E48: E8BA0004 swc2 gte[26], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE48u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8BA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E4C: E8BB0008 swc2 gte[27], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE4Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8BB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E50: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC35E58: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DE58u); return; } g_debug_last_store_pc = 0x8004DE58u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35E5C: 03E00008 jr $ra */ - psx_delay_BFC35E5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE60u); -#endif - if (psx_delay_BFC35E5C) { - psx_delay_BFC35E5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35E64(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35E64u); - int psx_delay_BFC35E90 = 0; -label_BFC35E64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35E64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E64: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E68: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E70: 4A400012 gte cmd 0x12 */ - gte_execute(cpu, 0x0400012); -#ifdef PSX_COSIM - cosim_instr(0x8004DE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E74: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE74u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E78: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE78u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E7C: E8BA0004 swc2 gte[26], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE7Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8BA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E80: E8BB0008 swc2 gte[27], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DE80u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8BB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E84: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC35E8C: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DE8Cu); return; } g_debug_last_store_pc = 0x8004DE8Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35E90: 03E00008 jr $ra */ - psx_delay_BFC35E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35E94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DE94u); -#endif - if (psx_delay_BFC35E90) { - psx_delay_BFC35E90 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35E98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35E98u); - int psx_delay_BFC35EB8 = 0; -label_BFC35E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E98: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35E9C: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35EA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EA4: 4A4A6412 gte cmd 0x12 */ - gte_execute(cpu, 0x04A6412); -#ifdef PSX_COSIM - cosim_instr(0x8004DEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EA8: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEA8u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EAC: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEACu; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EB0: E8AA0004 swc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEB0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EB4: E8AB0008 swc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEB4u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35EB8: 03E00008 jr $ra */ - psx_delay_BFC35EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DEBCu); -#endif - if (psx_delay_BFC35EB8) { - psx_delay_BFC35EB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35EC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35EC0u); - int psx_delay_BFC35EE4 = 0; -label_BFC35EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EC0: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EC4: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EC8: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35ECC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35ED0: 4A4DA412 gte cmd 0x12 */ - gte_execute(cpu, 0x04DA412); -#ifdef PSX_COSIM - cosim_instr(0x8004DED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35ED4: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DED4u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35ED8: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DED8u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EDC: E8AA0004 swc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEDCu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EE0: E8AB0008 swc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DEE0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35EE4: 03E00008 jr $ra */ - psx_delay_BFC35EE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35EE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DEE8u); -#endif - if (psx_delay_BFC35EE4) { - psx_delay_BFC35EE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35EEC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35EECu); - int psx_delay_BFC35F10 = 0; -label_BFC35EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EEC: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EF0: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EF4: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EF8: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35EFC: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F04: 4A680029 gte cmd 0x29 */ - gte_execute(cpu, 0x0680029); -#ifdef PSX_COSIM - cosim_instr(0x8004DF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F08: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF08u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F0C: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF0Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35F10: 03E00008 jr $ra */ - psx_delay_BFC35F10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF14u); -#endif - if (psx_delay_BFC35F10) { - psx_delay_BFC35F10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35F18(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35F18u); - int psx_delay_BFC35F30 = 0; -label_BFC35F18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35F18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F18: C8860000 lwc2 gte[6], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8860000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F1C: 48854000 mtc2 $a1, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[5]); - PGXP_COP2(0x48854000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F24: 4A780010 gte cmd 0x10 */ - gte_execute(cpu, 0x0780010); -#ifdef PSX_COSIM - cosim_instr(0x8004DF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F28: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF28u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F2C: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF2Cu; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35F30: 03E00008 jr $ra */ - psx_delay_BFC35F30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF34u); -#endif - if (psx_delay_BFC35F30) { - psx_delay_BFC35F30 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35F38(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35F38u); - int psx_delay_BFC35F70 = 0; -label_BFC35F38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35F38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F38: C8940000 lwc2 gte[20], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[20] = _pgxv; PGXP_COP2(0xC8940000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F3C: C8B50000 lwc2 gte[21], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[21] = _pgxv; PGXP_COP2(0xC8B50000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F40: C8D60000 lwc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[22] = _pgxv; PGXP_COP2(0xC8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F44: C8C60000 lwc2 gte[6], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8C60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F48: 48874000 mtc2 $a3, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[7]); - PGXP_COP2(0x48874000u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DF48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F50: 4AF8002A gte cmd 0x2A */ - gte_execute(cpu, 0x0F8002A); -#ifdef PSX_COSIM - cosim_instr(0x8004DF50u); -#endif - /* 0xBFC35F54: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DF54u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF54u); -#endif - /* 0xBFC35F58: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DF58u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF58u); -#endif - /* 0xBFC35F5C: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004DF5Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F60: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF60u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F64: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF64u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F68: E9350000 swc2 gte[21], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF68u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9350000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F6C: E9560000 swc2 gte[22], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF6Cu; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9560000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35F70: 03E00008 jr $ra */ - psx_delay_BFC35F70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF74u); -#endif - if (psx_delay_BFC35F70) { - psx_delay_BFC35F70 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35F78(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35F78u); - int psx_delay_BFC35F98 = 0; -label_BFC35F78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35F78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F78: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F7C: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F80: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F84: 48854000 mtc2 $a1, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[5]); - PGXP_COP2(0x48854000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004DF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F8C: 4A980011 gte cmd 0x11 */ - gte_execute(cpu, 0x0980011); -#ifdef PSX_COSIM - cosim_instr(0x8004DF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F90: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF90u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35F94: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DF94u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35F98: 03E00008 jr $ra */ - psx_delay_BFC35F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35F9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DF9Cu); -#endif - if (psx_delay_BFC35F98) { - psx_delay_BFC35F98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35FA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35FA0u); - int psx_delay_BFC35FC8 = 0; -label_BFC35FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FA0: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FA4: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FA8: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DFACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FB0: 4AA80428 gte cmd 0x28 */ - gte_execute(cpu, 0x0A80428); -#ifdef PSX_COSIM - cosim_instr(0x8004DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FB4: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFB4u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FB8: E8A90000 swc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFB8u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = gte_read_data(cpu, 9); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 9); PGXP_COP2(0xE8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FBC: E8AA0004 swc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFBCu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = gte_read_data(cpu, 10); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 10); PGXP_COP2(0xE8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FC0: E8AB0008 swc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFC0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = gte_read_data(cpu, 11); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 11); PGXP_COP2(0xE8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC35FC4: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35FC8: 03E00008 jr $ra */ - psx_delay_BFC35FC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35FCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DFCCu); -#endif - if (psx_delay_BFC35FC8) { - psx_delay_BFC35FC8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC35FD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC35FD0u); - int psx_delay_BFC35FF8 = 0; -label_BFC35FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC35FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC35FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FD0: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FD4: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FD8: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FE0: 4AA00428 gte cmd 0x28 */ - gte_execute(cpu, 0x0A00428); -#ifdef PSX_COSIM - cosim_instr(0x8004DFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FE4: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFE4u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FE8: E8B90000 swc2 gte[25], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFE8u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8B90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FEC: E8BA0004 swc2 gte[26], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFECu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8BA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004DFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC35FF0: E8BB0008 swc2 gte[27], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004DFF0u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8BB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC35FF4: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004DFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC35FF8: 03E00008 jr $ra */ - psx_delay_BFC35FF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC35FFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004DFFCu); -#endif - if (psx_delay_BFC35FF8) { - psx_delay_BFC35FF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36000(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36000u); - int psx_delay_BFC3601C = 0; -label_BFC36000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36000: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36004: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36008: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3600C: 4AC8041E gte cmd 0x1E */ - gte_execute(cpu, 0x0C8041E); -#ifdef PSX_COSIM - cosim_instr(0x8004E00Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36010: E8B60000 swc2 gte[22], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E010u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8B60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36014: E8B60000 swc2 gte[22], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E014u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8B60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36018: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3601C: 03E00008 jr $ra */ - psx_delay_BFC3601C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E020u); -#endif - if (psx_delay_BFC3601C) { - psx_delay_BFC3601C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36024(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36024u); - int psx_delay_BFC36060 = 0; -label_BFC36024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36024: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36028: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3602C: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36030: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36034: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36038: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3603C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36040: 4AD80420 gte cmd 0x20 */ - gte_execute(cpu, 0x0D80420); -#ifdef PSX_COSIM - cosim_instr(0x8004E040u); -#endif - /* 0xBFC36044: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E044u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E044u); -#endif - /* 0xBFC36048: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E048u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3604C: E8F40000 swc2 gte[20], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E04Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE8F40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36050: E8F40000 swc2 gte[20], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E050u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE8F40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36054: E9150000 swc2 gte[21], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E054u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9150000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36058: E9360000 swc2 gte[22], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E058u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9360000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3605C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36060: 03E00008 jr $ra */ - psx_delay_BFC36060 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E064u); -#endif - if (psx_delay_BFC36060) { - psx_delay_BFC36060 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36068(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36068u); - int psx_delay_BFC3608C = 0; -label_BFC36068: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36068u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36068: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3606C: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36070: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36074: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3607C: 4AE80413 gte cmd 0x13 */ - gte_execute(cpu, 0x0E80413); -#ifdef PSX_COSIM - cosim_instr(0x8004E07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36080: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E080u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36084: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E084u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36088: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3608C: 03E00008 jr $ra */ - psx_delay_BFC3608C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36090: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E090u); -#endif - if (psx_delay_BFC3608C) { - psx_delay_BFC3608C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36094(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36094u); - int psx_delay_BFC360D8 = 0; -label_BFC36094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36094: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36098: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3609C: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360A0: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360A4: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360A8: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360AC: C8E60000 lwc2 gte[6], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8E60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360B0: CBA80010 lwc2 gte[8], 16($sp) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[29] + (16)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 8, _pgxv); PGXP_COP2(0xCBA80010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC360B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360B8: 4AF80416 gte cmd 0x16 */ - gte_execute(cpu, 0x0F80416); -#ifdef PSX_COSIM - cosim_instr(0x8004E0B8u); -#endif - /* 0xBFC360BC: 8FA80014 lw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E0BCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0C0u); -#endif - /* 0xBFC360C0: 8FA90018 lw $t1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E0C0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0C0u); -#endif - /* 0xBFC360C4: 8FAA001C lw $t2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E0C4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA001Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360C8: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0C8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360CC: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0CCu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360D0: E9350000 swc2 gte[21], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0D0u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9350000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360D4: E9560000 swc2 gte[22], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0D4u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9560000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC360D8: 03E00008 jr $ra */ - psx_delay_BFC360D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC360DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E0DCu); -#endif - if (psx_delay_BFC360D8) { - psx_delay_BFC360D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC360E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC360E0u); - int psx_delay_BFC360FC = 0; -label_BFC360E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC360E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC360E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360E0: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360E4: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360E8: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC360EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E0ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360F0: 4B08041B gte cmd 0x1B */ - gte_execute(cpu, 0x108041B); -#ifdef PSX_COSIM - cosim_instr(0x8004E0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360F4: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0F4u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC360F8: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E0F8u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC360FC: 03E00008 jr $ra */ - psx_delay_BFC360FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E100u); -#endif - if (psx_delay_BFC360FC) { - psx_delay_BFC360FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36104(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36104u); - int psx_delay_BFC36144 = 0; -label_BFC36104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36104: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36108: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3610C: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36110: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36114: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36118: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3611C: C8E60000 lwc2 gte[6], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8E60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36120: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36124: 4B18043F gte cmd 0x3F */ - gte_execute(cpu, 0x118043F); -#ifdef PSX_COSIM - cosim_instr(0x8004E124u); -#endif - /* 0xBFC36128: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E128u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E128u); -#endif - /* 0xBFC3612C: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E12Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E130u); -#endif - /* 0xBFC36130: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E130u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36134: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E134u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36138: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E138u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3613C: E9350000 swc2 gte[21], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E13Cu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9350000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36140: E9560000 swc2 gte[22], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E140u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9560000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36144: 03E00008 jr $ra */ - psx_delay_BFC36144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E148u); -#endif - if (psx_delay_BFC36144) { - psx_delay_BFC36144 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3614C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3614Cu); - int psx_delay_BFC36170 = 0; -label_BFC3614C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3614Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3614C: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36150: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36154: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36158: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3615C: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36164: 4B280414 gte cmd 0x14 */ - gte_execute(cpu, 0x1280414); -#ifdef PSX_COSIM - cosim_instr(0x8004E164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36168: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E168u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3616C: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E16Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36170: 03E00008 jr $ra */ - psx_delay_BFC36170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E174u); -#endif - if (psx_delay_BFC36170) { - psx_delay_BFC36170 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36178(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36178u); - int psx_delay_BFC36198 = 0; -label_BFC36178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36178: C8890000 lwc2 gte[9], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8890000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3617C: C88A0004 lwc2 gte[10], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC88A0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36180: C88B0008 lwc2 gte[11], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC88B0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36184: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36188: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3618C: 4B38041C gte cmd 0x1C */ - gte_execute(cpu, 0x138041C); -#ifdef PSX_COSIM - cosim_instr(0x8004E18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36190: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E190u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36194: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E194u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36198: 03E00008 jr $ra */ - psx_delay_BFC36198 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3619C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E19Cu); -#endif - if (psx_delay_BFC36198) { - psx_delay_BFC36198 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC361A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC361A0u); - int psx_delay_BFC361C4 = 0; -label_BFC361A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC361A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC361A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361A0: 48846000 mtc2 $a0, gte_data[12] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 12, cpu->gpr[4]); - PGXP_COP2(0x48846000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361A4: 48867000 mtc2 $a2, gte_data[14] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 14, cpu->gpr[6]); - PGXP_COP2(0x48867000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361A8: 48856800 mtc2 $a1, gte_data[13] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 13, cpu->gpr[5]); - PGXP_COP2(0x48856800u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361B4: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361B8: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361BC: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC361C4: 03E00008 jr $ra */ - psx_delay_BFC361C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1C8u); -#endif - if (psx_delay_BFC361C4) { - psx_delay_BFC361C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC361CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC361CCu); - int psx_delay_BFC361EC = 0; -label_BFC361CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC361CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC361CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361CC: C88C0000 lwc2 gte[12], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 12, _pgxv); PGXP_COP2(0xC88C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361D0: C88E0008 lwc2 gte[14], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 14, _pgxv); PGXP_COP2(0xC88E0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361D4: C88D0004 lwc2 gte[13], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 13, _pgxv); PGXP_COP2(0xC88D0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361DC: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361E0: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361E4: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC361EC: 03E00008 jr $ra */ - psx_delay_BFC361EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC361F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E1F0u); -#endif - if (psx_delay_BFC361EC) { - psx_delay_BFC361EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC361F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC361F4u); - int psx_delay_BFC36214 = 0; -label_BFC361F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC361F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC361F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361F4: C88C0000 lwc2 gte[12], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 12, _pgxv); PGXP_COP2(0xC88C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361F8: C88E0010 lwc2 gte[14], 16($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (16)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 14, _pgxv); PGXP_COP2(0xC88E0010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC361FC: C88D0008 lwc2 gte[13], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 13, _pgxv); PGXP_COP2(0xC88D0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36200: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36204: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36208: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3620C: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36210: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36214: 03E00008 jr $ra */ - psx_delay_BFC36214 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36218: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E218u); -#endif - if (psx_delay_BFC36214) { - psx_delay_BFC36214 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3621C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3621Cu); - int psx_delay_BFC3623C = 0; -label_BFC3621C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3621Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3621Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3621C: C88C0000 lwc2 gte[12], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 12, _pgxv); PGXP_COP2(0xC88C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36220: C88E0018 lwc2 gte[14], 24($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (24)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 14, _pgxv); PGXP_COP2(0xC88E0018u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36224: C88D000C lwc2 gte[13], 12($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (12)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 13, _pgxv); PGXP_COP2(0xC88D000Cu, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3622C: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36230: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36234: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36238: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3623C: 03E00008 jr $ra */ - psx_delay_BFC3623C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E240u); -#endif - if (psx_delay_BFC3623C) { - psx_delay_BFC3623C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36244(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36244u); - int psx_delay_BFC36254 = 0; -label_BFC36244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36244: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36248: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3624C: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36250: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36254: 03E00008 jr $ra */ - psx_delay_BFC36254 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36258: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E258u); -#endif - if (psx_delay_BFC36254) { - psx_delay_BFC36254 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3625C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3625Cu); - int psx_delay_BFC36278 = 0; -label_BFC3625C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3625Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3625C: 48848800 mtc2 $a0, gte_data[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 17, cpu->gpr[4]); - PGXP_COP2(0x48848800u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36260: 48859000 mtc2 $a1, gte_data[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 18, cpu->gpr[5]); - PGXP_COP2(0x48859000u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36264: 48869800 mtc2 $a2, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 19, cpu->gpr[6]); - PGXP_COP2(0x48869800u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36268: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3626C: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004E26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36270: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36274: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36278: 03E00008 jr $ra */ - psx_delay_BFC36278 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3627C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E27Cu); -#endif - if (psx_delay_BFC36278) { - psx_delay_BFC36278 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36280(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36280u); - int psx_delay_BFC3628C = 0; -label_BFC36280: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36280u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36280: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004E280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36284: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36288: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3628C: 03E00008 jr $ra */ - psx_delay_BFC3628C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36290: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E290u); -#endif - if (psx_delay_BFC3628C) { - psx_delay_BFC3628C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36294(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36294u); - int psx_delay_BFC362B4 = 0; -label_BFC36294: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36294u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36294: 48848000 mtc2 $a0, gte_data[16] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 16, cpu->gpr[4]); - PGXP_COP2(0x48848000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36298: 48858800 mtc2 $a1, gte_data[17] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 17, cpu->gpr[5]); - PGXP_COP2(0x48858800u, cpu->gpr[5], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3629C: 48869000 mtc2 $a2, gte_data[18] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 18, cpu->gpr[6]); - PGXP_COP2(0x48869000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362A0: 48879800 mtc2 $a3, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 19, cpu->gpr[7]); - PGXP_COP2(0x48879800u, cpu->gpr[7], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC362A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362A8: 4B68002E gte cmd 0x2E */ - gte_execute(cpu, 0x168002E); -#ifdef PSX_COSIM - cosim_instr(0x8004E2A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362AC: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362B0: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC362B4: 03E00008 jr $ra */ - psx_delay_BFC362B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC362B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E2B8u); -#endif - if (psx_delay_BFC362B4) { - psx_delay_BFC362B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC362BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC362BCu); - int psx_delay_BFC362C8 = 0; -label_BFC362BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC362BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC362BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362BC: 4B68002E gte cmd 0x2E */ - gte_execute(cpu, 0x168002E); -#ifdef PSX_COSIM - cosim_instr(0x8004E2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362C0: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362C4: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC362C8: 03E00008 jr $ra */ - psx_delay_BFC362C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC362CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E2CCu); -#endif - if (psx_delay_BFC362C8) { - psx_delay_BFC362C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC362D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC362D0u); - int psx_delay_BFC36324 = 0; -label_BFC362D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC362D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC362D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362D0: 484D0000 cfc2 $t5, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = cpu->gte_ctrl[0]; - PGXP_COP2(0x484D0000u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362D4: 484E1000 cfc2 $t6, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = cpu->gte_ctrl[2]; - PGXP_COP2(0x484E1000u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362D8: 484F2000 cfc2 $t7, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_ctrl(cpu, 4); - PGXP_COP2(0x484F2000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2D8u); -#endif - /* 0xBFC362DC: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E2DCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2E0u); -#endif - /* 0xBFC362E0: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E2E0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2E0u); -#endif - /* 0xBFC362E4: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E2E4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362E8: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362EC: 48C91000 ctc2 $t1, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[9]; - PGXP_COP2(0x48C91000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362F0: 48CA2000 ctc2 $t2, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[10]); - PGXP_COP2(0x48CA2000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362F4: C8AB0008 lwc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362F8: C8A90000 lwc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC362FC: C8AA0004 lwc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36300: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36304: 4B78000C gte cmd 0x0C */ - gte_execute(cpu, 0x178000C); -#ifdef PSX_COSIM - cosim_instr(0x8004E304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36308: E8D90000 swc2 gte[25], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E308u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8D90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3630C: E8D90000 swc2 gte[25], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E30Cu; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8D90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36310: E8DA0004 swc2 gte[26], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E310u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8DA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36314: E8DB0008 swc2 gte[27], 8($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E314u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (8)); uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8DB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36318: 48CD0000 ctc2 $t5, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[13]; - PGXP_COP2(0x48CD0000u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3631C: 48CE1000 ctc2 $t6, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[14]; - PGXP_COP2(0x48CE1000u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36320: 48CF2000 ctc2 $t7, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[15]); - PGXP_COP2(0x48CF2000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36324: 03E00008 jr $ra */ - psx_delay_BFC36324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36328: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E328u); -#endif - if (psx_delay_BFC36324) { - psx_delay_BFC36324 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3632C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3632Cu); - int psx_delay_BFC36380 = 0; -label_BFC3632C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3632Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3632C: 484D0000 cfc2 $t5, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 13); -#endif - cpu->gpr[13] = cpu->gte_ctrl[0]; - PGXP_COP2(0x484D0000u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36330: 484E1000 cfc2 $t6, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 14); -#endif - cpu->gpr[14] = cpu->gte_ctrl[2]; - PGXP_COP2(0x484E1000u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36334: 484F2000 cfc2 $t7, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 15); -#endif - cpu->gpr[15] = gte_read_ctrl(cpu, 4); - PGXP_COP2(0x484F2000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E334u); -#endif - /* 0xBFC36338: 8C880000 lw $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E338u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x8C880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E338u); -#endif - /* 0xBFC3633C: 8C890004 lw $t1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E33Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E340u); -#endif - /* 0xBFC36340: 8C8A0008 lw $t2, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E340u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x10u); } - PGXP_LOAD(0x8C8A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36344: 48C80000 ctc2 $t0, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[8]; - PGXP_COP2(0x48C80000u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36348: 48C91000 ctc2 $t1, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[9]; - PGXP_COP2(0x48C91000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3634C: 48CA2000 ctc2 $t2, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[10]); - PGXP_COP2(0x48CA2000u, cpu->gpr[10], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36350: C8AB0008 lwc2 gte[11], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 11, _pgxv); PGXP_COP2(0xC8AB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36354: C8A90000 lwc2 gte[9], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 9, _pgxv); PGXP_COP2(0xC8A90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36358: C8AA0004 lwc2 gte[10], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 10, _pgxv); PGXP_COP2(0xC8AA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3635C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36360: 4B70000C gte cmd 0x0C */ - gte_execute(cpu, 0x170000C); -#ifdef PSX_COSIM - cosim_instr(0x8004E360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36364: E8D90000 swc2 gte[25], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E364u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8D90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36368: E8D90000 swc2 gte[25], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E368u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[25]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 25); PGXP_COP2(0xE8D90000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3636C: E8DA0004 swc2 gte[26], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E36Cu; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = cpu->gte_data[26]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 26); PGXP_COP2(0xE8DA0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36370: E8DB0008 swc2 gte[27], 8($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E370u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (8)); uint32_t _pgxv = cpu->gte_data[27]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 27); PGXP_COP2(0xE8DB0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36374: 48CD0000 ctc2 $t5, gte_ctrl[0] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[0] = cpu->gpr[13]; - PGXP_COP2(0x48CD0000u, cpu->gpr[13], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36378: 48CE1000 ctc2 $t6, gte_ctrl[2] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - cpu->gte_ctrl[2] = cpu->gpr[14]; - PGXP_COP2(0x48CE1000u, cpu->gpr[14], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3637C: 48CF2000 ctc2 $t7, gte_ctrl[4] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_ctrl(cpu, 4, cpu->gpr[15]); - PGXP_COP2(0x48CF2000u, cpu->gpr[15], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36380: 03E00008 jr $ra */ - psx_delay_BFC36380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36384: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E384u); -#endif - if (psx_delay_BFC36380) { - psx_delay_BFC36380 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36388(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36388u); - int psx_delay_BFC36398 = 0; -label_BFC36388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36388: 4884F000 mtc2 $a0, gte_data[30] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 30, cpu->gpr[4]); - PGXP_COP2(0x4884F000u, cpu->gpr[4], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3638C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36394: 4802F800 mfc2 $v0, gte_data[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 31); - PGXP_COP2(0x4802F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36398: 03E00008 jr $ra */ - psx_delay_BFC36398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3639C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E39Cu); -#endif - if (psx_delay_BFC36398) { - psx_delay_BFC36398 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC363A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC363A0u); - int psx_delay_BFC363E0 = 0; - int psx_taken_BFC363E0 = 0; - int psx_delay_BFC363E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC363A8u: goto label_BFC363A8; - case 0xBFC363E8u: goto label_BFC363E8; - default: break; - } - } -label_BFC363A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC363A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC363A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3A0u); -#endif - /* 0xBFC363A0: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E3A0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC363A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E3A4u); -#endif -label_BFC363A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC363A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC363A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363A8: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363AC: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC363B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363B4: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC363B8: 20840008 addi $a0, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (8); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363BC: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363C0: E8AC0000 swc2 gte[12], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E3C0u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8AC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363C4: E8C80000 swc2 gte[8], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E3C4u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE8C80000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363C8: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC363CC: 20A50004 addi $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC363D0: ACE90000 sw $t1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E3D0u); return; } g_debug_last_store_pc = 0x8004E3D0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC363D4: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC363D8: 20E70004 addi $a3, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; { int32_t psx_a = (int32_t)cpu->gpr[7]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[7] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20E70004u, cpu->gpr[7], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC363DC: 2108FFFF addi $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-1); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC363E0: 1D00FFF1 bgtz $t0, 0xBFC363A8 */ - uint32_t psx_brA_BFC363E0 = cpu->gpr[8]; - psx_taken_BFC363E0 = ((int32_t)psx_brA_BFC363E0 > 0); - psx_delay_BFC363E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC363E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E3E4u); -#endif - if (psx_delay_BFC363E0) { - psx_delay_BFC363E0 = 0; - if (psx_taken_BFC363E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E3A8u); - goto label_BFC363A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E3E8u); - } -label_BFC363E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC363E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC363E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC363E8: 03E00008 jr $ra */ - psx_delay_BFC363E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC363EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E3ECu); -#endif - if (psx_delay_BFC363E8) { - psx_delay_BFC363E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC363F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC363F0u); - int psx_delay_BFC36448 = 0; - int psx_taken_BFC36448 = 0; - int psx_delay_BFC36450 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC363F8u: goto label_BFC363F8; - case 0xBFC36450u: goto label_BFC36450; - default: break; - } - } -label_BFC363F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC363F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC363F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3F0u); -#endif - /* 0xBFC363F0: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E3F0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC363F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E3F4u); -#endif -label_BFC363F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC363F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC363F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363F8: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC363FC: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36400: C8820008 lwc2 gte[2], 8($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (8)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8820008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36404: C883000C lwc2 gte[3], 12($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (12)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC883000Cu, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36408: C8820010 lwc2 gte[2], 16($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (16)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8820010u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3640C: C8830014 lwc2 gte[3], 20($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (20)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8830014u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36414: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC36418: 20840018 addi $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; { int32_t psx_a = (int32_t)cpu->gpr[4]; int32_t psx_b = (24); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[4] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20840018u, cpu->gpr[4], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3641C: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36420: E8AC0000 swc2 gte[12], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E420u; { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8AC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36424: E8AD0004 swc2 gte[13], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E424u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE8AD0004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36428: E8AE0008 swc2 gte[14], 8($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E428u; { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (8)); uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8AE0008u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3642C: E8C80000 swc2 gte[8], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E42Cu; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE8C80000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E42Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36430: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC36434: 20A5000C addi $a1, $a1, 12 */ - { uint32_t _pgx1 = cpu->gpr[5]; { int32_t psx_a = (int32_t)cpu->gpr[5]; int32_t psx_b = (12); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[5] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20A5000Cu, cpu->gpr[5], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004E434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC36438: ACE90000 sw $t1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E438u); return; } g_debug_last_store_pc = 0x8004E438u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACE90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3643C: 20C60004 addi $a2, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; { int32_t psx_a = (int32_t)cpu->gpr[6]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[6] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20C60004u, cpu->gpr[6], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC36440: 20E70004 addi $a3, $a3, 4 */ - { uint32_t _pgx1 = cpu->gpr[7]; { int32_t psx_a = (int32_t)cpu->gpr[7]; int32_t psx_b = (4); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[7] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x20E70004u, cpu->gpr[7], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36444: 2108FFFF addi $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-1); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004E444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36448: 1D00FFEB bgtz $t0, 0xBFC363F8 */ - uint32_t psx_brA_BFC36448 = cpu->gpr[8]; - psx_taken_BFC36448 = ((int32_t)psx_brA_BFC36448 > 0); - psx_delay_BFC36448 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3644C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E44Cu); -#endif - if (psx_delay_BFC36448) { - psx_delay_BFC36448 = 0; - if (psx_taken_BFC36448) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E3F8u); - goto label_BFC363F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E450u); - } -label_BFC36450: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36450u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36450: 03E00008 jr $ra */ - psx_delay_BFC36450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E454u); -#endif - if (psx_delay_BFC36450) { - psx_delay_BFC36450 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36458(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36458u); - int psx_delay_BFC364D4 = 0; -label_BFC36458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36458: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3645C: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36460: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36464: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36468: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3646C: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36470: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36474: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E474u); -#endif - /* 0xBFC36478: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E478u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E478u); -#endif - /* 0xBFC3647C: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E47Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E480u); -#endif - /* 0xBFC36480: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E480u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36484: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E484u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36488: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E488u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3648C: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E48Cu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36490: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E490u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36494: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36498: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3649C: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC364A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364A4: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E4A4u); -#endif - /* 0xBFC364A8: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E4A8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4A8u); -#endif - /* 0xBFC364AC: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E4ACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4B0u); -#endif - /* 0xBFC364B0: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E4B0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364B4: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E4B4u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364B8: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E4B8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364BC: E9280000 swc2 gte[8], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E4BCu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9280000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364C0: 4848F800 cfc2 $t0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4848F800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364C4: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC364C8: 01034025 or $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[3]; - PGXP_ALU(0x01034025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC364CC: AD480000 sw $t0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E4CCu); return; } g_debug_last_store_pc = 0x8004E4CCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC364D0: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC364D4: 03E00008 jr $ra */ - psx_delay_BFC364D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC364D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E4D8u); -#endif - if (psx_delay_BFC364D4) { - psx_delay_BFC364D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC364DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC364DCu); - int psx_delay_BFC36534 = 0; -label_BFC364DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC364DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC364DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364DC: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364E0: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364E4: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364E8: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364EC: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364F0: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC364F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC364F8: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E4F8u); -#endif - /* 0xBFC364FC: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E4FCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E500u); -#endif - /* 0xBFC36500: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E500u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E500u); -#endif - /* 0xBFC36504: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E504u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E504u); -#endif - /* 0xBFC36508: 8FAB001C lw $t3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E508u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB001Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3650C: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E50Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36510: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E510u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36514: E90D0000 swc2 gte[13], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E514u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE90D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36518: E92E0000 swc2 gte[14], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E518u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE92E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3651C: 4848F800 cfc2 $t0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4848F800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36520: E9480000 swc2 gte[8], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E520u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9480000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC36524: AD680000 sw $t0, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E524u); return; } g_debug_last_store_pc = 0x8004E524u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36528: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004E528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3652C: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36530: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36534: 03E00008 jr $ra */ - psx_delay_BFC36534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E538u); -#endif - if (psx_delay_BFC36534) { - psx_delay_BFC36534 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3653C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3653Cu); - int psx_delay_BFC365BC = 0; -label_BFC3653C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3653Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3653Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3653C: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36540: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36544: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36548: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3654C: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36550: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36554: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36558: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E558u); -#endif - /* 0xBFC3655C: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E55Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E560u); -#endif - /* 0xBFC36560: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E560u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E560u); -#endif - /* 0xBFC36564: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E564u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36568: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E568u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3656C: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E56Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36570: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E570u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36574: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E574u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36578: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3657C: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36580: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36584: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36588: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E588u); -#endif - /* 0xBFC3658C: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E58Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E590u); -#endif - /* 0xBFC36590: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E590u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E590u); -#endif - /* 0xBFC36594: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E594u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36598: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E598u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3659C: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E59Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365A0: 4848F800 cfc2 $t0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4848F800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365A4: E9280000 swc2 gte[8], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E5A4u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9280000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC365A8: 01034025 or $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] | cpu->gpr[3]; - PGXP_ALU(0x01034025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC365AC: AD480000 sw $t0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E5ACu); return; } g_debug_last_store_pc = 0x8004E5ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365B0: 4B68002E gte cmd 0x2E */ - gte_execute(cpu, 0x168002E); -#ifdef PSX_COSIM - cosim_instr(0x8004E5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365B4: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365B8: 48023800 mfc2 $v0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 7); - PGXP_COP2(0x48023800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC365BC: 03E00008 jr $ra */ - psx_delay_BFC365BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC365C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E5C0u); -#endif - if (psx_delay_BFC365BC) { - psx_delay_BFC365BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC365C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC365C4u); - int psx_delay_BFC365F0 = 0; -label_BFC365C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC365C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC365C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365C4: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365C8: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC365CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365D0: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365D4: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365D8: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC365DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC365E0: ACA20000 sw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E5E0u); return; } g_debug_last_store_pc = 0x8004E5E0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365E4: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365E8: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365EC: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC365F0: 03E00008 jr $ra */ - psx_delay_BFC365F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC365F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E5F4u); -#endif - if (psx_delay_BFC365F0) { - psx_delay_BFC365F0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC365F8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC365F8u); - int psx_delay_BFC3664C = 0; - int psx_taken_BFC3664C = 0; - int psx_delay_BFC36654 = 0; - int psx_taken_BFC36654 = 0; - int psx_delay_BFC3667C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36654u: goto label_BFC36654; - case 0xBFC3665Cu: goto label_BFC3665C; - case 0xBFC3667Cu: goto label_BFC3667C; - default: break; - } - } -label_BFC365F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC365F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC365F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365F8: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC365FC: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36600: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36604: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36608: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3660C: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36610: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36614: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E614u); -#endif - /* 0xBFC36618: 8FA80020 lw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E618u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3661C: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36620: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36628: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3662C: AD020000 sw $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E62Cu); return; } g_debug_last_store_pc = 0x8004E62Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36630: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E630u); -#endif - /* 0xBFC36634: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E634u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E634u); -#endif - /* 0xBFC36638: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E638u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E638u); -#endif - /* 0xBFC3663C: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E63Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36640: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36644: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3664C: 1C400003 bgtz $v0, 0xBFC3665C */ - uint32_t psx_brA_BFC3664C = cpu->gpr[2]; - psx_taken_BFC3664C = ((int32_t)psx_brA_BFC3664C > 0); - psx_delay_BFC3664C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36650: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E650u); -#endif - if (psx_delay_BFC3664C) { - psx_delay_BFC3664C = 0; - if (psx_taken_BFC3664C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E65Cu); - goto label_BFC3665C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E654u); - } -label_BFC36654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36654: 10000009 beq $zero, $zero, 0xBFC3667C */ - uint32_t psx_brA_BFC36654 = cpu->gpr[0]; uint32_t psx_brB_BFC36654 = cpu->gpr[0]; - psx_taken_BFC36654 = (psx_brA_BFC36654 == psx_brB_BFC36654); - psx_delay_BFC36654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E658u); -#endif - if (psx_delay_BFC36654) { - psx_delay_BFC36654 = 0; - if (psx_taken_BFC36654) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E67Cu); - goto label_BFC3667C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E65Cu); - } -label_BFC3665C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3665Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3665Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3665C: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E65Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36660: E90D0000 swc2 gte[13], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E660u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE90D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36664: E92E0000 swc2 gte[14], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E664u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE92E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36668: E9480000 swc2 gte[8], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E668u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9480000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3666C: 48089800 mfc2 $t0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 19); - PGXP_COP2(0x48089800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E670u); -#endif - /* 0xBFC36670: 8FA9001C lw $t1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E670u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36674: 00084083 sra $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 2u); - PGXP_ALU(0x00084083u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36678: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E678u); return; } g_debug_last_store_pc = 0x8004E678u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E678u); -#endif -label_BFC3667C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3667Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3667C: 03E00008 jr $ra */ - psx_delay_BFC3667C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E680u); -#endif - if (psx_delay_BFC3667C) { - psx_delay_BFC3667C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36684(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36684u); - int psx_delay_BFC366D8 = 0; - int psx_taken_BFC366D8 = 0; - int psx_delay_BFC366E0 = 0; - int psx_taken_BFC366E0 = 0; - int psx_delay_BFC36738 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC366E0u: goto label_BFC366E0; - case 0xBFC366E8u: goto label_BFC366E8; - case 0xBFC36738u: goto label_BFC36738; - default: break; - } - } -label_BFC36684: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36684u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36684: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36688: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3668C: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36690: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36694: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36698: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3669C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366A0: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E6A0u); -#endif - /* 0xBFC366A4: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E6A4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366A8: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366AC: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366B4: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC366B8: AD030000 sw $v1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E6B8u); return; } g_debug_last_store_pc = 0x8004E6B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAD030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6C0u); -#endif - /* 0xBFC366C0: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E6C0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6C0u); -#endif - /* 0xBFC366C4: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E6C4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6C4u); -#endif - /* 0xBFC366C8: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E6C8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366CC: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366D0: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC366D8: 1C400003 bgtz $v0, 0xBFC366E8 */ - uint32_t psx_brA_BFC366D8 = cpu->gpr[2]; - psx_taken_BFC366D8 = ((int32_t)psx_brA_BFC366D8 > 0); - psx_delay_BFC366D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6DCu); -#endif - if (psx_delay_BFC366D8) { - psx_delay_BFC366D8 = 0; - if (psx_taken_BFC366D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E6E8u); - goto label_BFC366E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E6E0u); - } -label_BFC366E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC366E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC366E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366E0: 10000015 beq $zero, $zero, 0xBFC36738 */ - uint32_t psx_brA_BFC366E0 = cpu->gpr[0]; uint32_t psx_brB_BFC366E0 = cpu->gpr[0]; - psx_taken_BFC366E0 = (psx_brA_BFC366E0 == psx_brB_BFC366E0); - psx_delay_BFC366E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6E4u); -#endif - if (psx_delay_BFC366E0) { - psx_delay_BFC366E0 = 0; - if (psx_taken_BFC366E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E738u); - goto label_BFC36738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E6E8u); - } -label_BFC366E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC366E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC366E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366E8: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E6E8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366EC: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E6ECu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366F0: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E6F0u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366F4: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC366F8: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC366FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36700: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E700u); -#endif - /* 0xBFC36704: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E704u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E704u); -#endif - /* 0xBFC36708: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E708u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E708u); -#endif - /* 0xBFC3670C: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E70Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E710u); -#endif - /* 0xBFC36710: 8FAB0028 lw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E710u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36714: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E714u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36718: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E718u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3671C: 480C9800 mfc2 $t4, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 12); -#endif - cpu->gpr[12] = gte_read_data(cpu, 19); - PGXP_COP2(0x480C9800u, cpu->gpr[12], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36720: E9280000 swc2 gte[8], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E720u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9280000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36724: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC36728: 000C6083 sra $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] >> 2u); - PGXP_ALU(0x000C6083u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC3672C: AD4C0000 sw $t4, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E72Cu); return; } g_debug_last_store_pc = 0x8004E72Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAD4C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E72Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC36730: 00431025 or $v0, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[3]; - PGXP_ALU(0x00431025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC36734: AD620000 sw $v0, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E734u); return; } g_debug_last_store_pc = 0x8004E734u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E734u); -#endif -label_BFC36738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36738: 03E00008 jr $ra */ - psx_delay_BFC36738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3673C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E73Cu); -#endif - if (psx_delay_BFC36738) { - psx_delay_BFC36738 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36740(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36740u); - int psx_delay_BFC36790 = 0; - int psx_taken_BFC36790 = 0; - int psx_delay_BFC36798 = 0; - int psx_taken_BFC36798 = 0; - int psx_delay_BFC367CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36798u: goto label_BFC36798; - case 0xBFC367A0u: goto label_BFC367A0; - case 0xBFC367CCu: goto label_BFC367CC; - default: break; - } - } -label_BFC36740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36740: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36744: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36748: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3674C: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36750: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36754: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36758: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3675C: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E760u); -#endif - /* 0xBFC36760: 8FA80020 lw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E760u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36764: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36768: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3676C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36770: AD090000 sw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E770u); return; } g_debug_last_store_pc = 0x8004E770u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36774: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E774u); -#endif - /* 0xBFC36778: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E778u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E778u); -#endif - /* 0xBFC3677C: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E77Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E780u); -#endif - /* 0xBFC36780: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E780u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36784: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36788: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3678C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36790: 1C400003 bgtz $v0, 0xBFC367A0 */ - uint32_t psx_brA_BFC36790 = cpu->gpr[2]; - psx_taken_BFC36790 = ((int32_t)psx_brA_BFC36790 > 0); - psx_delay_BFC36790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E794u); -#endif - if (psx_delay_BFC36790) { - psx_delay_BFC36790 = 0; - if (psx_taken_BFC36790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E7A0u); - goto label_BFC367A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E798u); - } -label_BFC36798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36798: 1000000C beq $zero, $zero, 0xBFC367CC */ - uint32_t psx_brA_BFC36798 = cpu->gpr[0]; uint32_t psx_brB_BFC36798 = cpu->gpr[0]; - psx_taken_BFC36798 = (psx_brA_BFC36798 == psx_brB_BFC36798); - psx_delay_BFC36798 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3679C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E79Cu); -#endif - if (psx_delay_BFC36798) { - psx_delay_BFC36798 = 0; - if (psx_taken_BFC36798) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E7CCu); - goto label_BFC367CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E7A0u); - } -label_BFC367A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC367A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC367A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367A0: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E7A0u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367A4: E90D0000 swc2 gte[13], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E7A4u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE90D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367A8: E92E0000 swc2 gte[14], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E7A8u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE92E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367AC: E9480000 swc2 gte[8], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E7ACu; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9480000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC367B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367B4: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004E7B4u); -#endif - /* 0xBFC367B8: 8FA9001C lw $t1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E7B8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367BC: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367C0: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC367C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC367C8: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E7C8u); return; } g_debug_last_store_pc = 0x8004E7C8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7C8u); -#endif -label_BFC367CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC367CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC367CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC367CC: 03E00008 jr $ra */ - psx_delay_BFC367CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC367D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E7D0u); -#endif - if (psx_delay_BFC367CC) { - psx_delay_BFC367CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC367D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC367D4u); - int psx_delay_BFC36820 = 0; - int psx_taken_BFC36820 = 0; - int psx_delay_BFC3682C = 0; - int psx_taken_BFC3682C = 0; - int psx_delay_BFC36878 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36828u: goto label_BFC36828; - case 0xBFC36830u: goto label_BFC36830; - case 0xBFC36834u: goto label_BFC36834; - case 0xBFC36878u: goto label_BFC36878; - default: break; - } - } -label_BFC367D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC367D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC367D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367D4: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367D8: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367DC: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367E0: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367E4: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367E8: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC367EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367F0: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E7F0u); -#endif - /* 0xBFC367F4: 8FA80024 lw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E7F4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367F8: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC367FC: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC36804: AD020000 sw $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E804u); return; } g_debug_last_store_pc = 0x8004E804u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36808: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3680C: 4809C000 mfc2 $t1, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_data[24]; - PGXP_COP2(0x4809C000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36810: 4809C000 mfc2 $t1, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = cpu->gte_data[24]; - PGXP_COP2(0x4809C000u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E810u); -#endif - /* 0xBFC36814: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E814u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3681C: AD090000 sw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E81Cu); return; } g_debug_last_store_pc = 0x8004E81Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC36820: 05200003 bltz $t1, 0xBFC36830 */ - uint32_t psx_brA_BFC36820 = cpu->gpr[9]; - psx_taken_BFC36820 = ((int32_t)psx_brA_BFC36820 < 0); - psx_delay_BFC36820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E824u); -#endif - if (psx_delay_BFC36820) { - psx_delay_BFC36820 = 0; - if (psx_taken_BFC36820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E830u); - goto label_BFC36830; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E828u); - } -label_BFC36828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC36828: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004E828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3682C: 10000012 beq $zero, $zero, 0xBFC36878 */ - uint32_t psx_brA_BFC3682C = cpu->gpr[0]; uint32_t psx_brB_BFC3682C = cpu->gpr[0]; - psx_taken_BFC3682C = (psx_brA_BFC3682C == psx_brB_BFC3682C); - psx_delay_BFC3682C = 1; -label_BFC36830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36830: E8EC0000 swc2 gte[12], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E830u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE8EC0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E830u); -#endif - if (psx_delay_BFC3682C) { - psx_delay_BFC3682C = 0; - if (psx_taken_BFC3682C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E878u); - goto label_BFC36878; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E834u); - } -label_BFC36834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E834u); -#endif - /* 0xBFC36834: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E834u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3683C: E90D0000 swc2 gte[13], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E83Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE90D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E840u); -#endif - /* 0xBFC36840: 8FA80014 lw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E840u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36848: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E848u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E848u); -#endif - /* 0xBFC3684C: 8FA80018 lw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E84Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36850: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36854: E9080000 swc2 gte[8], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E854u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9080000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3685C: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004E85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36860: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36864: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E864u); -#endif - /* 0xBFC36868: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E868u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3686C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36870: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E870u); return; } g_debug_last_store_pc = 0x8004E870u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC36874: 24020000 addiu $v0, $zero, 0 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); - PGXP_ALU(0x24020000u, cpu->gpr[2], _pgx1, 0x00000000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E874u); -#endif -label_BFC36878: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36878u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36878: 03E00008 jr $ra */ - psx_delay_BFC36878 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3687C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E87Cu); -#endif - if (psx_delay_BFC36878) { - psx_delay_BFC36878 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36880(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36880u); - int psx_delay_BFC368D0 = 0; - int psx_taken_BFC368D0 = 0; - int psx_delay_BFC368D8 = 0; - int psx_taken_BFC368D8 = 0; - int psx_delay_BFC36938 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC368D8u: goto label_BFC368D8; - case 0xBFC368E0u: goto label_BFC368E0; - case 0xBFC36938u: goto label_BFC36938; - default: break; - } - } -label_BFC36880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36880: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36884: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36888: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3688C: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36890: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36894: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36898: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3689C: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8A0u); -#endif - /* 0xBFC368A0: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8A0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368A4: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368A8: 4843F800 cfc2 $v1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 3); -#endif - cpu->gpr[3] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4843F800u, cpu->gpr[3], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC368B0: AD030000 sw $v1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8B0u); return; } g_debug_last_store_pc = 0x8004E8B0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAD030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368B4: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004E8B4u); -#endif - /* 0xBFC368B8: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8B8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8B8u); -#endif - /* 0xBFC368BC: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8BCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8C0u); -#endif - /* 0xBFC368C0: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368C4: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368C8: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC368D0: 1C400003 bgtz $v0, 0xBFC368E0 */ - uint32_t psx_brA_BFC368D0 = cpu->gpr[2]; - psx_taken_BFC368D0 = ((int32_t)psx_brA_BFC368D0 > 0); - psx_delay_BFC368D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E8D4u); -#endif - if (psx_delay_BFC368D0) { - psx_delay_BFC368D0 = 0; - if (psx_taken_BFC368D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E8E0u); - goto label_BFC368E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E8D8u); - } -label_BFC368D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC368D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC368D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368D8: 10000017 beq $zero, $zero, 0xBFC36938 */ - uint32_t psx_brA_BFC368D8 = cpu->gpr[0]; uint32_t psx_brB_BFC368D8 = cpu->gpr[0]; - psx_taken_BFC368D8 = (psx_brA_BFC368D8 == psx_brB_BFC368D8); - psx_delay_BFC368D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E8DCu); -#endif - if (psx_delay_BFC368D8) { - psx_delay_BFC368D8 = 0; - if (psx_taken_BFC368D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E938u); - goto label_BFC36938; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004E8E0u); - } -label_BFC368E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC368E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC368E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368E0: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E8E0u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368E4: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E8E4u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368E8: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E8E8u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368EC: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368F0: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC368F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC368F8: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E8F8u); -#endif - /* 0xBFC368FC: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E8FCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E900u); -#endif - /* 0xBFC36900: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E900u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E900u); -#endif - /* 0xBFC36904: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E904u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36908: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E908u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3690C: E90E0000 swc2 gte[14], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E90Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE90E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36910: 484BF800 cfc2 $t3, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 11); -#endif - cpu->gpr[11] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x484BF800u, cpu->gpr[11], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36914: E9280000 swc2 gte[8], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E914u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = gte_read_data(cpu, 8); cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 8); PGXP_COP2(0xE9280000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC36918: 01635825 or $t3, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[11] = cpu->gpr[11] | cpu->gpr[3]; - PGXP_ALU(0x01635825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004E918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3691C: AD4B0000 sw $t3, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E91Cu); return; } g_debug_last_store_pc = 0x8004E91Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36920: 4B68002E gte cmd 0x2E */ - gte_execute(cpu, 0x168002E); -#ifdef PSX_COSIM - cosim_instr(0x8004E920u); -#endif - /* 0xBFC36924: 8FA90024 lw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E924u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36928: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3692C: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36930: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36934: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E934u); return; } g_debug_last_store_pc = 0x8004E934u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E934u); -#endif -label_BFC36938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36938: 03E00008 jr $ra */ - psx_delay_BFC36938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3693C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E93Cu); -#endif - if (psx_delay_BFC36938) { - psx_delay_BFC36938 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36940(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36940u); - int psx_delay_BFC36990 = 0; -label_BFC36940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36940: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36944: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3694C: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004E94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E950u); -#endif - /* 0xBFC36950: 8FA80014 lw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E950u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36954: E8EE0000 swc2 gte[14], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E954u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8EE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36958: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3695C: E8EE0000 swc2 gte[14], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E95Cu; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8EE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC36960: AD020000 sw $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E960u); return; } g_debug_last_store_pc = 0x8004E960u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36964: C8A00000 lwc2 gte[0], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8A00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36968: C8A10004 lwc2 gte[1], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8A10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3696C: C8C60000 lwc2 gte[6], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8C60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36970: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36974: 4AE80413 gte cmd 0x13 */ - gte_execute(cpu, 0x0E80413); -#ifdef PSX_COSIM - cosim_instr(0x8004E974u); -#endif - /* 0xBFC36978: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E978u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3697C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36980: E9160000 swc2 gte[22], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E980u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9160000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36984: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36988: E9160000 swc2 gte[22], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E988u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9160000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3698C: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004E98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36990: 03E00008 jr $ra */ - psx_delay_BFC36990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E994u); -#endif - if (psx_delay_BFC36990) { - psx_delay_BFC36990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36998(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36998u); - int psx_delay_BFC36A34 = 0; -label_BFC36998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36998: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3699C: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369A0: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369A4: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369A8: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369AC: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC369B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004E9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369B4: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004E9B4u); -#endif - /* 0xBFC369B8: 8FAB0010 lw $t3, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9B8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9B8u); -#endif - /* 0xBFC369BC: 8FAC0014 lw $t4, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9BCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0014u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9C0u); -#endif - /* 0xBFC369C0: 8FAD0018 lw $t5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9C0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9C0u); -#endif - /* 0xBFC369C4: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9C4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9C4u); -#endif - /* 0xBFC369C8: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9C8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9C8u); -#endif - /* 0xBFC369CC: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9CCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9D0u); -#endif - /* 0xBFC369D0: 8FAE0034 lw $t6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0034u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369D4: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E9D4u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369D8: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E9D8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369DC: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E9DCu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369E0: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004E9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369E4: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004E9E4u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC369E8: ADC20000 sw $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004E9E8u); return; } g_debug_last_store_pc = 0x8004E9E8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xADC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369EC: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004E9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369F0: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369F4: C9620000 lwc2 gte[2], 0($t3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[11]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC9620000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369F8: C9630004 lwc2 gte[3], 4($t3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[11] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC9630004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC369FC: C9840000 lwc2 gte[4], 0($t4) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[12]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC9840000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004E9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A00: C9850004 lwc2 gte[5], 4($t4) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[12] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC9850004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A04: C9A60000 lwc2 gte[6], 0($t5) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[13]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC9A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A0C: 4AF80416 gte cmd 0x16 */ - gte_execute(cpu, 0x0F80416); -#ifdef PSX_COSIM - cosim_instr(0x8004EA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA10u); -#endif - /* 0xBFC36A10: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA10u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA10u); -#endif - /* 0xBFC36A14: 8FA9002C lw $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA14u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA14u); -#endif - /* 0xBFC36A18: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA18u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A1C: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EA1Cu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A20: E9140000 swc2 gte[20], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EA20u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9140000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A24: E9350000 swc2 gte[21], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EA24u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9350000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A28: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EA28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A2C: E9560000 swc2 gte[22], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EA2Cu; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9560000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36A30: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36A34: 03E00008 jr $ra */ - psx_delay_BFC36A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA38u); -#endif - if (psx_delay_BFC36A34) { - psx_delay_BFC36A34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36A3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36A3Cu); - int psx_delay_BFC36A8C = 0; - int psx_taken_BFC36A8C = 0; - int psx_delay_BFC36A94 = 0; - int psx_taken_BFC36A94 = 0; - int psx_delay_BFC36B0C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36A94u: goto label_BFC36A94; - case 0xBFC36A98u: goto label_BFC36A98; - case 0xBFC36A9Cu: goto label_BFC36A9C; - case 0xBFC36B0Cu: goto label_BFC36B0C; - default: break; - } - } -label_BFC36A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A3C: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A40: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A44: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A48: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A4C: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A50: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A58: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004EA58u); -#endif - /* 0xBFC36A5C: 8FA80038 lw $t0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA5Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80038u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A60: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A64: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36A6C: AD090000 sw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA6Cu); return; } g_debug_last_store_pc = 0x8004EA6Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A70: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004EA70u); -#endif - /* 0xBFC36A74: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA74u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA74u); -#endif - /* 0xBFC36A78: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA78u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA78u); -#endif - /* 0xBFC36A7C: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EA7Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A80: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A84: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36A8C: 1C400002 bgtz $v0, 0xBFC36A98 */ - uint32_t psx_brA_BFC36A8C = cpu->gpr[2]; - psx_taken_BFC36A8C = ((int32_t)psx_brA_BFC36A8C > 0); - psx_delay_BFC36A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EA90u); -#endif - if (psx_delay_BFC36A8C) { - psx_delay_BFC36A8C = 0; - if (psx_taken_BFC36A8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EA98u); - goto label_BFC36A98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EA94u); - } -label_BFC36A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36A94: 1000001D beq $zero, $zero, 0xBFC36B0C */ - uint32_t psx_brA_BFC36A94 = cpu->gpr[0]; uint32_t psx_brB_BFC36A94 = cpu->gpr[0]; - psx_taken_BFC36A94 = (psx_brA_BFC36A94 == psx_brB_BFC36A94); - psx_delay_BFC36A94 = 1; -label_BFC36A98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36A98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A98: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA98u); -#endif - if (psx_delay_BFC36A94) { - psx_delay_BFC36A94 = 0; - if (psx_taken_BFC36A94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EB0Cu); - goto label_BFC36B0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EA9Cu); - } -label_BFC36A9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36A9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36A9C: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AA0: C9020000 lwc2 gte[2], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC9020000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AA4: C9030004 lwc2 gte[3], 4($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC9030004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AA8: C9240000 lwc2 gte[4], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC9240000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AAC: C9250004 lwc2 gte[5], 4($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[9] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC9250004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AB0: C9460000 lwc2 gte[6], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC9460000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36AB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AB8: 4AF80416 gte cmd 0x16 */ - gte_execute(cpu, 0x0F80416); -#ifdef PSX_COSIM - cosim_instr(0x8004EAB8u); -#endif - /* 0xBFC36ABC: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EABCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAC0u); -#endif - /* 0xBFC36AC0: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EAC0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAC0u); -#endif - /* 0xBFC36AC4: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EAC4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAC4u); -#endif - /* 0xBFC36AC8: 8FAB0028 lw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EAC8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAC8u); -#endif - /* 0xBFC36ACC: 8FAC002C lw $t4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EACCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAD0u); -#endif - /* 0xBFC36AD0: 8FAD0030 lw $t5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EAD0u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0030u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AD4: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAD4u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AD8: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAD8u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36ADC: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EADCu; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AE0: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAE0u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AE4: E9740000 swc2 gte[20], 0($t3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAE4u; { uint32_t _pgxa = cpu->gpr[11]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9740000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AE8: E9950000 swc2 gte[21], 0($t4) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAE8u; { uint32_t _pgxa = cpu->gpr[12]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9950000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AEC: E9B60000 swc2 gte[22], 0($t5) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EAECu; { uint32_t _pgxa = cpu->gpr[13]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9B60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36AF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AF4: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004EAF4u); -#endif - /* 0xBFC36AF8: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EAF8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EAF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36AFC: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B00: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36B08: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB08u); return; } g_debug_last_store_pc = 0x8004EB08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB08u); -#endif -label_BFC36B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36B0C: 03E00008 jr $ra */ - psx_delay_BFC36B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB10u); -#endif - if (psx_delay_BFC36B0C) { - psx_delay_BFC36B0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36B14(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36B14u); - int psx_delay_BFC36B64 = 0; - int psx_taken_BFC36B64 = 0; - int psx_delay_BFC36B6C = 0; - int psx_taken_BFC36B6C = 0; - int psx_delay_BFC36BE4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36B6Cu: goto label_BFC36B6C; - case 0xBFC36B70u: goto label_BFC36B70; - case 0xBFC36B74u: goto label_BFC36B74; - case 0xBFC36BE4u: goto label_BFC36BE4; - default: break; - } - } -label_BFC36B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B14: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B18: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B1C: C8A20000 lwc2 gte[2], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC8A20000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B20: C8A30004 lwc2 gte[3], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC8A30004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B24: C8C40000 lwc2 gte[4], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC8C40000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B28: C8C50004 lwc2 gte[5], 4($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[6] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC8C50004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B30: 4A280030 gte cmd 0x30 */ - gte_execute(cpu, 0x0280030); -#ifdef PSX_COSIM - cosim_instr(0x8004EB30u); -#endif - /* 0xBFC36B34: 8FA80038 lw $t0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB34u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80038u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B38: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EB38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B3C: 4849F800 cfc2 $t1, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 9); -#endif - cpu->gpr[9] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4849F800u, cpu->gpr[9], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36B44: AD090000 sw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB44u); return; } g_debug_last_store_pc = 0x8004EB44u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B48: 4B400006 gte cmd 0x06 */ - gte_execute(cpu, 0x1400006); -#ifdef PSX_COSIM - cosim_instr(0x8004EB48u); -#endif - /* 0xBFC36B4C: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB4Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB50u); -#endif - /* 0xBFC36B50: 8FA90014 lw $t1, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB50u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB50u); -#endif - /* 0xBFC36B54: 8FAA0018 lw $t2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB54u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B58: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B5C: 4802C000 mfc2 $v0, gte_data[24] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = cpu->gte_data[24]; - PGXP_COP2(0x4802C000u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36B64: 1C400002 bgtz $v0, 0xBFC36B70 */ - uint32_t psx_brA_BFC36B64 = cpu->gpr[2]; - psx_taken_BFC36B64 = ((int32_t)psx_brA_BFC36B64 > 0); - psx_delay_BFC36B64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB68u); -#endif - if (psx_delay_BFC36B64) { - psx_delay_BFC36B64 = 0; - if (psx_taken_BFC36B64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EB70u); - goto label_BFC36B70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EB6Cu); - } -label_BFC36B6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36B6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B6C: 1000001D beq $zero, $zero, 0xBFC36BE4 */ - uint32_t psx_brA_BFC36B6C = cpu->gpr[0]; uint32_t psx_brB_BFC36B6C = cpu->gpr[0]; - psx_taken_BFC36B6C = (psx_brA_BFC36B6C == psx_brB_BFC36B6C); - psx_delay_BFC36B6C = 1; -label_BFC36B70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B70: C8E00000 lwc2 gte[0], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8E00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB70u); -#endif - if (psx_delay_BFC36B6C) { - psx_delay_BFC36B6C = 0; - if (psx_taken_BFC36B6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EBE4u); - goto label_BFC36BE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EB74u); - } -label_BFC36B74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36B74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B74: C8E10004 lwc2 gte[1], 4($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[7] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8E10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B78: C9020000 lwc2 gte[2], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[2] = _pgxv; PGXP_COP2(0xC9020000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B7C: C9030004 lwc2 gte[3], 4($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[8] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 3, _pgxv); PGXP_COP2(0xC9030004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B80: C9240000 lwc2 gte[4], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[4] = _pgxv; PGXP_COP2(0xC9240000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B84: C9250004 lwc2 gte[5], 4($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[9] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 5, _pgxv); PGXP_COP2(0xC9250004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B88: C9460000 lwc2 gte[6], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC9460000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36B8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36B90: 4B18043F gte cmd 0x3F */ - gte_execute(cpu, 0x118043F); -#ifdef PSX_COSIM - cosim_instr(0x8004EB90u); -#endif - /* 0xBFC36B94: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB94u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB94u); -#endif - /* 0xBFC36B98: 8FA90020 lw $t1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB98u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB98u); -#endif - /* 0xBFC36B9C: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EB9Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBA0u); -#endif - /* 0xBFC36BA0: 8FAB0028 lw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBA0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBA0u); -#endif - /* 0xBFC36BA4: 8FAC002C lw $t4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBA4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBA4u); -#endif - /* 0xBFC36BA8: 8FAD0030 lw $t5, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0030u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BAC: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBACu; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BB0: E90C0000 swc2 gte[12], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBB0u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[12]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 12); PGXP_COP2(0xE90C0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BB4: E92D0000 swc2 gte[13], 0($t1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBB4u; { uint32_t _pgxa = cpu->gpr[9]; uint32_t _pgxv = cpu->gte_data[13]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 13); PGXP_COP2(0xE92D0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BB8: E94E0000 swc2 gte[14], 0($t2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBB8u; { uint32_t _pgxa = cpu->gpr[10]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE94E0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BBC: E9740000 swc2 gte[20], 0($t3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBBCu; { uint32_t _pgxa = cpu->gpr[11]; uint32_t _pgxv = cpu->gte_data[20]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 20); PGXP_COP2(0xE9740000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BC0: E9950000 swc2 gte[21], 0($t4) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBC0u; { uint32_t _pgxa = cpu->gpr[12]; uint32_t _pgxv = cpu->gte_data[21]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 21); PGXP_COP2(0xE9950000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BC4: E9B60000 swc2 gte[22], 0($t5) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EBC4u; { uint32_t _pgxa = cpu->gpr[13]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9B60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36BC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BCC: 4B58002D gte cmd 0x2D */ - gte_execute(cpu, 0x158002D); -#ifdef PSX_COSIM - cosim_instr(0x8004EBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBD0u); -#endif - /* 0xBFC36BD0: 8FA90034 lw $t1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBD0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BD4: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BD8: 48083800 mfc2 $t0, gte_data[7] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 8); -#endif - cpu->gpr[8] = gte_read_data(cpu, 7); - PGXP_COP2(0x48083800u, cpu->gpr[8], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36BDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EBDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC36BE0: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBE0u); return; } g_debug_last_store_pc = 0x8004EBE0u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBE0u); -#endif -label_BFC36BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36BE4: 03E00008 jr $ra */ - psx_delay_BFC36BE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36BE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EBE8u); -#endif - if (psx_delay_BFC36BE4) { - psx_delay_BFC36BE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36BEC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36BECu); - int psx_delay_BFC36C2C = 0; - int psx_taken_BFC36C2C = 0; - int psx_delay_BFC36C58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36C24u: goto label_BFC36C24; - case 0xBFC36C34u: goto label_BFC36C34; - default: break; - } - } -label_BFC36BEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BEC: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BF0: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36BF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EBF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36BF8: 4A180001 gte cmd 0x01 */ - gte_execute(cpu, 0x0180001); -#ifdef PSX_COSIM - cosim_instr(0x8004EBF8u); -#endif - /* 0xBFC36BFC: 8FA80018 lw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EBFCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C00: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C04: 4842F800 cfc2 $v0, gte_ctrl[31] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_ctrl(cpu, 31); - PGXP_COP2(0x4842F800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC36C0C: AD020000 sw $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EC0Cu); return; } g_debug_last_store_pc = 0x8004EC0Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C10: C8A00000 lwc2 gte[0], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8A00000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C14: C8A10004 lwc2 gte[1], 4($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[5] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8A10004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C1C: 4A4A6412 gte cmd 0x12 */ - gte_execute(cpu, 0x04A6412); -#ifdef PSX_COSIM - cosim_instr(0x8004EC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC20u); -#endif - /* 0xBFC36C20: 8FA80014 lw $t0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EC20u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC20u); -#endif -label_BFC36C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C24: 4AA80428 gte cmd 0x28 */ - gte_execute(cpu, 0x0A80428); -#ifdef PSX_COSIM - cosim_instr(0x8004EC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36C28: 2108FFFF addi $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-1); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36C2C: 1D00FFFD bgtz $t0, 0xBFC36C24 */ - uint32_t psx_brA_BFC36C2C = cpu->gpr[8]; - psx_taken_BFC36C2C = ((int32_t)psx_brA_BFC36C2C > 0); - psx_delay_BFC36C2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC30u); -#endif - if (psx_delay_BFC36C2C) { - psx_delay_BFC36C2C = 0; - if (psx_taken_BFC36C2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EC24u); - goto label_BFC36C24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EC34u); - } -label_BFC36C34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36C34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C34: C8C60000 lwc2 gte[6], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8C60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C3C: 4B280414 gte cmd 0x14 */ - gte_execute(cpu, 0x1280414); -#ifdef PSX_COSIM - cosim_instr(0x8004EC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC40u); -#endif - /* 0xBFC36C40: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EC40u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C44: E8EE0000 swc2 gte[14], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EC44u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8EE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C48: E8EE0000 swc2 gte[14], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EC48u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[14]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 14); PGXP_COP2(0xE8EE0000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C4C: 48029800 mfc2 $v0, gte_data[19] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_read(cpu, 2); -#endif - cpu->gpr[2] = gte_read_data(cpu, 19); - PGXP_COP2(0x48029800u, cpu->gpr[2], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C50: E9160000 swc2 gte[22], 0($t0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EC50u; { uint32_t _pgxa = cpu->gpr[8]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE9160000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36C54: 00021083 sra $v0, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 2u); - PGXP_ALU(0x00021083u, cpu->gpr[2], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36C58: 03E00008 jr $ra */ - psx_delay_BFC36C58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC5Cu); -#endif - if (psx_delay_BFC36C58) { - psx_delay_BFC36C58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36C60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36C60u); - int psx_delay_BFC36C7C = 0; - int psx_taken_BFC36C7C = 0; - int psx_delay_BFC36C9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36C74u: goto label_BFC36C74; - case 0xBFC36C84u: goto label_BFC36C84; - default: break; - } - } -label_BFC36C60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36C60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C60: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C64: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C6C: 4A4A6412 gte cmd 0x12 */ - gte_execute(cpu, 0x04A6412); -#ifdef PSX_COSIM - cosim_instr(0x8004EC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC70u); -#endif - /* 0xBFC36C70: 8FA80010 lw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EC70u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC70u); -#endif -label_BFC36C74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36C74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C74: 4AA80428 gte cmd 0x28 */ - gte_execute(cpu, 0x0A80428); -#ifdef PSX_COSIM - cosim_instr(0x8004EC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36C78: 2108FFFF addi $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-1); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36C7C: 1D00FFFD bgtz $t0, 0xBFC36C74 */ - uint32_t psx_brA_BFC36C7C = cpu->gpr[8]; - psx_taken_BFC36C7C = ((int32_t)psx_brA_BFC36C7C > 0); - psx_delay_BFC36C7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC80u); -#endif - if (psx_delay_BFC36C7C) { - psx_delay_BFC36C7C = 0; - if (psx_taken_BFC36C7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EC74u); - goto label_BFC36C74; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EC84u); - } -label_BFC36C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C84: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C88: 48864000 mtc2 $a2, gte_data[8] */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - gte_write_data(cpu, 8, cpu->gpr[6]); - PGXP_COP2(0x48864000u, cpu->gpr[6], 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36C8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C90: 4B280414 gte cmd 0x14 */ - gte_execute(cpu, 0x1280414); -#ifdef PSX_COSIM - cosim_instr(0x8004EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C94: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EC94u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36C98: E8F60000 swc2 gte[22], 0($a3) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004EC98u; { uint32_t _pgxa = cpu->gpr[7]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8F60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004EC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36C9C: 03E00008 jr $ra */ - psx_delay_BFC36C9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36CA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ECA0u); -#endif - if (psx_delay_BFC36C9C) { - psx_delay_BFC36C9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36CA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36CA4u); - int psx_delay_BFC36CC0 = 0; - int psx_taken_BFC36CC0 = 0; - int psx_delay_BFC36CDC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36CB8u: goto label_BFC36CB8; - case 0xBFC36CC8u: goto label_BFC36CC8; - default: break; - } - } -label_BFC36CA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36CA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CA4: C8800000 lwc2 gte[0], 0($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[4]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[0] = _pgxv; PGXP_COP2(0xC8800000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CA8: C8810004 lwc2 gte[1], 4($a0) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = (uint32_t)((int32_t)cpu->gpr[4] + (4)); uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); gte_write_data(cpu, 1, _pgxv); PGXP_COP2(0xC8810004u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ECACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CB0: 4A4A6412 gte cmd 0x12 */ - gte_execute(cpu, 0x04A6412); -#ifdef PSX_COSIM - cosim_instr(0x8004ECB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x181u); -#endif - /* 0xBFC36CB4: 00E04021 addu $t0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECB4u); -#endif -label_BFC36CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CB8: 4AA80428 gte cmd 0x28 */ - gte_execute(cpu, 0x0A80428); -#ifdef PSX_COSIM - cosim_instr(0x8004ECB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36CBC: 2108FFFF addi $t0, $t0, -1 */ - { uint32_t _pgx1 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[8]; int32_t psx_b = (-1); int64_t psx_r = (int64_t)psx_a + (int64_t)psx_b; if (psx_r < (int64_t)INT32_MIN || psx_r > (int64_t)INT32_MAX) { psx_arith_overflow(cpu); return; } cpu->gpr[8] = (uint32_t)(int32_t)psx_r; } - PGXP_ALU(0x2108FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36CC0: 1D00FFFD bgtz $t0, 0xBFC36CB8 */ - uint32_t psx_brA_BFC36CC0 = cpu->gpr[8]; - psx_taken_BFC36CC0 = ((int32_t)psx_brA_BFC36CC0 > 0); - psx_delay_BFC36CC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36CC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ECC4u); -#endif - if (psx_delay_BFC36CC0) { - psx_delay_BFC36CC0 = 0; - if (psx_taken_BFC36CC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ECB8u); - goto label_BFC36CB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ECC8u); - } -label_BFC36CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CC8: C8A60000 lwc2 gte[6], 0($a1) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - { uint32_t _pgxa = cpu->gpr[5]; uint32_t _pgxv = psx_cyc_lwc2_read(cpu, _pgxa); cpu->gte_data[6] = _pgxv; PGXP_COP2(0xC8A60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36CCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ECCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CD0: 4B38041C gte cmd 0x1C */ - gte_execute(cpu, 0x138041C); -#ifdef PSX_COSIM - cosim_instr(0x8004ECD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CD4: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ECD4u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC36CD8: E8D60000 swc2 gte[22], 0($a2) */ - -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_gte_stall(cpu); -#endif - psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8004ECD8u; { uint32_t _pgxa = cpu->gpr[6]; uint32_t _pgxv = cpu->gte_data[22]; cpu->write_word(_pgxa, _pgxv); gte_precision_store_word(_pgxa, 22); PGXP_COP2(0xE8D60000u, _pgxv, _pgxa); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36CDC: 03E00008 jr $ra */ - psx_delay_BFC36CDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36CE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ECE0u); -#endif - if (psx_delay_BFC36CDC) { - psx_delay_BFC36CDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36CF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36CF0u); - int psx_delay_BFC36D04 = 0; - int psx_delay_BFC36D14 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36D0Cu: goto label_BFC36D0C; - default: break; - } - } -label_BFC36CF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36CF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ECF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36CF0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36CF4: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ECF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC36CF8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ECF8u); return; } g_debug_last_store_pc = 0x8004ECF8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC36CFC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ECFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36D00: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC36D04: 0C016ADC jal 0xB005AB70 */ - cpu->gpr[31] = 0x8004ED0Cu; /* jal link before delay slot */ - psx_delay_BFC36D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC36D08: 00612024 and $a0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED08u); -#endif - if (psx_delay_BFC36D04) { - psx_delay_BFC36D04 = 0; - cpu->gpr[31] = 0x8004ED0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB70u); - cpu->pc = 0x8005AB70u; return; - } -label_BFC36D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED0Cu); -#endif - /* 0xBFC36D0C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36D10: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36D14: 03E00008 jr $ra */ - psx_delay_BFC36D14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED18u); -#endif - if (psx_delay_BFC36D14) { - psx_delay_BFC36D14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36D1C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36D1Cu); - int psx_delay_BFC36D40 = 0; -label_BFC36D1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36D1C: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC36D20: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED20u); return; } g_debug_last_store_pc = 0x8004ED20u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED20u); -#endif - /* 0xBFC36D24: 8FA30028 lw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED24u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36D28: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ED28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36D2C: 30630003 andi $v1, $v1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x3u; - PGXP_ALU(0x30630003u, cpu->gpr[3], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC36D30: 00037080 sll $t6, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00037080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC36D34: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED34u); -#endif - /* 0xBFC36D38: 8C2EADF0 lw $t6, -21008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -21008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-21008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED38u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2u); } - PGXP_LOAD(0x8C2EADF0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC36D3C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED3Cu); return; } g_debug_last_store_pc = 0x8004ED3Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC36D40: 01C00008 jr $t6 */ - psx_delay_BFC36D40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED44u); -#endif - if (psx_delay_BFC36D40) { - psx_delay_BFC36D40 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[14]); - cpu->pc = cpu->gpr[14]; return; - } -} - -void SCPH1001_func_1FC36D48(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36D48u); - int psx_delay_BFC36D48 = 0; - int psx_delay_BFC36D60 = 0; - int psx_delay_BFC36D70 = 0; - int psx_delay_BFC36D8C = 0; - int psx_delay_BFC36D98 = 0; - int psx_delay_BFC36DA0 = 0; - int psx_taken_BFC36DA0 = 0; - int psx_delay_BFC36DBC = 0; - int psx_delay_BFC36DC8 = 0; - int psx_taken_BFC36DC8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36D50u: goto label_BFC36D50; - case 0xBFC36D68u: goto label_BFC36D68; - case 0xBFC36D78u: goto label_BFC36D78; - case 0xBFC36D94u: goto label_BFC36D94; - case 0xBFC36DA0u: goto label_BFC36DA0; - case 0xBFC36DA8u: goto label_BFC36DA8; - case 0xBFC36DC4u: goto label_BFC36DC4; - default: break; - } - } -label_BFC36D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC36D48: 0C016818 jal 0xB005A060 */ - cpu->gpr[31] = 0x8004ED50u; /* jal link before delay slot */ - psx_delay_BFC36D48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED4Cu); -#endif - if (psx_delay_BFC36D48) { - psx_delay_BFC36D48 = 0; - cpu->gpr[31] = 0x8004ED50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A060u); - cpu->pc = 0x8005A060u; return; - } -label_BFC36D50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC36D50: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ED50u); -#endif - /* 0xBFC36D54: 8DEF924C lw $t7, -28084($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED54u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF924Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36D58: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED58u); -#endif - /* 0xBFC36D5C: 8DE50024 lw $a1, 36($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED5Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8000u); } - PGXP_LOAD(0x8DE50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC36D60: 0C016830 jal 0xB005A0C0 */ - cpu->gpr[31] = 0x8004ED68u; /* jal link before delay slot */ - psx_delay_BFC36D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED64u); -#endif - if (psx_delay_BFC36D60) { - psx_delay_BFC36D60 = 0; - cpu->gpr[31] = 0x8004ED68u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A0C0u); - cpu->pc = 0x8005A0C0u; return; - } -label_BFC36D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC36D68: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ED68u); -#endif - /* 0xBFC36D6C: 8C84924C lw $a0, -28084($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84924Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC36D70: 0C013B3C jal 0xB004ECF0 */ - cpu->gpr[31] = 0x8004ED78u; /* jal link before delay slot */ - psx_delay_BFC36D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED74u); -#endif - if (psx_delay_BFC36D70) { - psx_delay_BFC36D70 = 0; - cpu->gpr[31] = 0x8004ED78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004ECF0u); - cpu->pc = 0x8004ECF0u; return; - } -label_BFC36D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC36D78: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ED78u); -#endif - /* 0xBFC36D7C: 8F18924C lw $t8, -28084($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED7Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18924Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36D80: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED80u); -#endif - /* 0xBFC36D84: 8F190034 lw $t9, 52($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED84u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC36D8C: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x8004ED94u; /* jalr link before delay slot */ - psx_delay_BFC36D8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004ED90u); -#endif - if (psx_delay_BFC36D8C) { - psx_delay_BFC36D8C = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x8004ED94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004ED94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36D94: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004ED94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC36D98: 0C01429F jal 0xB0050A7C */ - cpu->gpr[31] = 0x8004EDA0u; /* jal link before delay slot */ - psx_delay_BFC36D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC36D9C: AC229254 sw $v0, -28076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004ED9Cu); return; } g_debug_last_store_pc = 0x8004ED9Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004ED9Cu); -#endif - if (psx_delay_BFC36D98) { - psx_delay_BFC36D98 = 0; - cpu->gpr[31] = 0x8004EDA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A7Cu); - cpu->pc = 0x80050A7Cu; return; - } -label_BFC36DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DA0: 10000015 beq $zero, $zero, 0xBFC36DF8 */ - uint32_t psx_brA_BFC36DA0 = cpu->gpr[0]; uint32_t psx_brB_BFC36DA0 = cpu->gpr[0]; - psx_taken_BFC36DA0 = (psx_brA_BFC36DA0 == psx_brB_BFC36DA0); - psx_delay_BFC36DA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EDA4u); -#endif - if (psx_delay_BFC36DA0) { - psx_delay_BFC36DA0 = 0; - if (psx_taken_BFC36DA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDF8u); - cpu->pc = 0x8004EDF8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDA8u); - } -label_BFC36DA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC36DA8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EDA8u); -#endif - /* 0xBFC36DAC: 8D08924C lw $t0, -28084($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08924Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36DB0: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDB0u); -#endif - /* 0xBFC36DB4: 8D090034 lw $t1, 52($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDB4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090034u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC36DBC: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x8004EDC4u; /* jalr link before delay slot */ - psx_delay_BFC36DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EDC0u); -#endif - if (psx_delay_BFC36DBC) { - psx_delay_BFC36DBC = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x8004EDC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36DC4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DC8: 1000000B beq $zero, $zero, 0xBFC36DF8 */ - uint32_t psx_brA_BFC36DC8 = cpu->gpr[0]; uint32_t psx_brB_BFC36DC8 = cpu->gpr[0]; - psx_taken_BFC36DC8 = (psx_brA_BFC36DC8 == psx_brB_BFC36DC8); - psx_delay_BFC36DC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC36DCC: AC229254 sw $v0, -28076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDCCu); return; } g_debug_last_store_pc = 0x8004EDCCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDCCu); -#endif - if (psx_delay_BFC36DC8) { - psx_delay_BFC36DC8 = 0; - if (psx_taken_BFC36DC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDF8u); - cpu->pc = 0x8004EDF8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDD0u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDD0u); - cpu->pc = 0x8004EDD0u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC36DD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36DD0u); - int psx_delay_BFC36DE4 = 0; - int psx_delay_BFC36DF0 = 0; - int psx_taken_BFC36DF0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36DECu: goto label_BFC36DEC; - default: break; - } - } -label_BFC36DD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC36DD0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EDD0u); -#endif - /* 0xBFC36DD4: 8D4A924C lw $t2, -28084($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDD4u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A924Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36DD8: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDD8u); -#endif - /* 0xBFC36DDC: 8D4B0034 lw $t3, 52($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDDCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x8D4B0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC36DE4: 0160F809 jalr $ra, $t3 */ - cpu->gpr[31] = 0x8004EDECu; /* jalr link before delay slot */ - psx_delay_BFC36DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EDE8u); -#endif - if (psx_delay_BFC36DE4) { - psx_delay_BFC36DE4 = 0; - { uint32_t _t = cpu->gpr[11]; - cpu->gpr[31] = 0x8004EDECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36DEC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36DF0: 10000001 beq $zero, $zero, 0xBFC36DF8 */ - uint32_t psx_brA_BFC36DF0 = cpu->gpr[0]; uint32_t psx_brB_BFC36DF0 = cpu->gpr[0]; - psx_taken_BFC36DF0 = (psx_brA_BFC36DF0 == psx_brB_BFC36DF0); - psx_delay_BFC36DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC36DF4: AC229254 sw $v0, -28076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDF4u); return; } g_debug_last_store_pc = 0x8004EDF4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDF4u); -#endif - if (psx_delay_BFC36DF0) { - psx_delay_BFC36DF0 = 0; - if (psx_taken_BFC36DF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDF8u); - cpu->pc = 0x8004EDF8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDF8u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EDF8u); - cpu->pc = 0x8004EDF8u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC36DF8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36DF8u); - int psx_delay_BFC36E04 = 0; - int psx_taken_BFC36E04 = 0; - int psx_delay_BFC36E0C = 0; - int psx_taken_BFC36E0C = 0; - int psx_delay_BFC36E2C = 0; - int psx_delay_BFC36E4C = 0; - int psx_delay_BFC36E60 = 0; - int psx_taken_BFC36E60 = 0; - int psx_delay_BFC36E78 = 0; - int psx_taken_BFC36E78 = 0; - int psx_delay_BFC36E84 = 0; - int psx_taken_BFC36E84 = 0; - int psx_delay_BFC36EA8 = 0; - int psx_delay_BFC36EB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36E0Cu: goto label_BFC36E0C; - case 0xBFC36E14u: goto label_BFC36E14; - case 0xBFC36E18u: goto label_BFC36E18; - case 0xBFC36E34u: goto label_BFC36E34; - case 0xBFC36E54u: goto label_BFC36E54; - case 0xBFC36E68u: goto label_BFC36E68; - case 0xBFC36E80u: goto label_BFC36E80; - case 0xBFC36E8Cu: goto label_BFC36E8C; - case 0xBFC36E94u: goto label_BFC36E94; - case 0xBFC36EB0u: goto label_BFC36EB0; - case 0xBFC36EB4u: goto label_BFC36EB4; - default: break; - } - } -label_BFC36DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC36DF8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EDF8u); -#endif - /* 0xBFC36DFC: 8D8C9258 lw $t4, -28072($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EDFCu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9258u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EDFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36E00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC36E04: 11800004 beq $t4, $zero, 0xBFC36E18 */ - uint32_t psx_brA_BFC36E04 = cpu->gpr[12]; uint32_t psx_brB_BFC36E04 = cpu->gpr[0]; - psx_taken_BFC36E04 = (psx_brA_BFC36E04 == psx_brB_BFC36E04); - psx_delay_BFC36E04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC36E08: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE08u); -#endif - if (psx_delay_BFC36E04) { - psx_delay_BFC36E04 = 0; - if (psx_taken_BFC36E04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE18u); - goto label_BFC36E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE0Cu); - } -label_BFC36E0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36E0C: 10000002 beq $zero, $zero, 0xBFC36E18 */ - uint32_t psx_brA_BFC36E0C = cpu->gpr[0]; uint32_t psx_brB_BFC36E0C = cpu->gpr[0]; - psx_taken_BFC36E0C = (psx_brA_BFC36E0C == psx_brB_BFC36E0C); - psx_delay_BFC36E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC36E10: 24030080 addiu $v1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24030080u, cpu->gpr[3], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE10u); -#endif - if (psx_delay_BFC36E0C) { - psx_delay_BFC36E0C = 0; - if (psx_taken_BFC36E0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE18u); - goto label_BFC36E18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE14u); - } -label_BFC36E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC36E14: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE14u); -#endif -label_BFC36E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC36E18: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE18u); -#endif - /* 0xBFC36E1C: 8DAD924C lw $t5, -28084($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE1Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD924Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC36E20: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE20u); return; } g_debug_last_store_pc = 0x8004EE20u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE20u); -#endif - /* 0xBFC36E24: 8DAE0028 lw $t6, 40($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE24u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x8DAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36E28: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC36E2C: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x8004EE34u; /* jalr link before delay slot */ - psx_delay_BFC36E2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36E30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EE30u); -#endif - if (psx_delay_BFC36E2C) { - psx_delay_BFC36E2C = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x8004EE34u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36E34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC36E34: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE34u); -#endif - /* 0xBFC36E38: 8DEF924C lw $t7, -28084($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE38u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF924Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE38u); -#endif - /* 0xBFC36E3C: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE3Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE40u); -#endif - /* 0xBFC36E40: 8DF80010 lw $t8, 16($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE40u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36E44: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC36E48: 00622025 or $a0, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[3] | cpu->gpr[2]; - PGXP_ALU(0x00622025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC36E4C: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x8004EE54u; /* jalr link before delay slot */ - psx_delay_BFC36E4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC36E50: 00812025 or $a0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x00812025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE50u); -#endif - if (psx_delay_BFC36E4C) { - psx_delay_BFC36E4C = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x8004EE54u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36E54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE54u); -#endif - /* 0xBFC36E54: 8FB90028 lw $t9, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE54u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90028u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36E58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC36E5C: 33280008 andi $t0, $t9, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8u; - PGXP_ALU(0x33280008u, cpu->gpr[8], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC36E60: 11000014 beq $t0, $zero, 0xBFC36EB4 */ - uint32_t psx_brA_BFC36E60 = cpu->gpr[8]; uint32_t psx_brB_BFC36E60 = cpu->gpr[0]; - psx_taken_BFC36E60 = (psx_brA_BFC36E60 == psx_brB_BFC36E60); - psx_delay_BFC36E60 = 1; - /* 0xBFC36E64: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE64u); -#endif - if (psx_delay_BFC36E60) { - psx_delay_BFC36E60 = 0; - if (psx_taken_BFC36E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EEB4u); - goto label_BFC36EB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE68u); - } -label_BFC36E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC36E68: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE68u); -#endif - /* 0xBFC36E6C: 8D4A9258 lw $t2, -28072($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE6Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9258u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC36E70: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36E74: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC36E78: 11400004 beq $t2, $zero, 0xBFC36E8C */ - uint32_t psx_brA_BFC36E78 = cpu->gpr[10]; uint32_t psx_brB_BFC36E78 = cpu->gpr[0]; - psx_taken_BFC36E78 = (psx_brA_BFC36E78 == psx_brB_BFC36E78); - psx_delay_BFC36E78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC36E7C: AC299254 sw $t1, -28076($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28076; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE7Cu); return; } g_debug_last_store_pc = 0x8004EE7Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299254u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE7Cu); -#endif - if (psx_delay_BFC36E78) { - psx_delay_BFC36E78 = 0; - if (psx_taken_BFC36E78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE8Cu); - goto label_BFC36E8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE80u); - } -label_BFC36E80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36E80: 3C032000 lui $v1, 0x2000 */ - cpu->gpr[3] = 0x20000000u; - PGXP_ALU(0x3C032000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36E84: 10000003 beq $zero, $zero, 0xBFC36E94 */ - uint32_t psx_brA_BFC36E84 = cpu->gpr[0]; uint32_t psx_brB_BFC36E84 = cpu->gpr[0]; - psx_taken_BFC36E84 = (psx_brA_BFC36E84 == psx_brB_BFC36E84); - psx_delay_BFC36E84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36E88: 34630501 ori $v1, $v1, 0x501 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x501u; - PGXP_ALU(0x34630501u, cpu->gpr[3], _pgx1, 0x0501u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE88u); -#endif - if (psx_delay_BFC36E84) { - psx_delay_BFC36E84 = 0; - if (psx_taken_BFC36E84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE94u); - goto label_BFC36E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EE8Cu); - } -label_BFC36E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36E8C: 3C032000 lui $v1, 0x2000 */ - cpu->gpr[3] = 0x20000000u; - PGXP_ALU(0x3C032000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36E90: 34630504 ori $v1, $v1, 0x504 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x504u; - PGXP_ALU(0x34630504u, cpu->gpr[3], _pgx1, 0x0504u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE90u); -#endif -label_BFC36E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC36E94: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EE94u); -#endif - /* 0xBFC36E98: 8D6B924C lw $t3, -28084($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EE98u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B924Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC36E9C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEA0u); -#endif - /* 0xBFC36EA0: 8D6C0010 lw $t4, 16($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEA0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36EA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001000u); -#endif - /* 0xBFC36EA8: 0180F809 jalr $ra, $t4 */ - cpu->gpr[31] = 0x8004EEB0u; /* jalr link before delay slot */ - psx_delay_BFC36EA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36EAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EEACu); -#endif - if (psx_delay_BFC36EA8) { - psx_delay_BFC36EA8 = 0; - { uint32_t _t = cpu->gpr[12]; - cpu->gpr[31] = 0x8004EEB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36EB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEB0u); -#endif - /* 0xBFC36EB0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEB0u); -#endif -label_BFC36EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36EB4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36EB8: 03E00008 jr $ra */ - psx_delay_BFC36EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EEBCu); -#endif - if (psx_delay_BFC36EB8) { - psx_delay_BFC36EB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36EC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36EC0u); - int psx_delay_BFC36ED8 = 0; - int psx_taken_BFC36ED8 = 0; - int psx_delay_BFC36EE0 = 0; - int psx_taken_BFC36EE0 = 0; - int psx_delay_BFC36F00 = 0; - int psx_delay_BFC36F20 = 0; - int psx_delay_BFC36F34 = 0; - int psx_taken_BFC36F34 = 0; - int psx_delay_BFC36F48 = 0; - int psx_taken_BFC36F48 = 0; - int psx_delay_BFC36F54 = 0; - int psx_taken_BFC36F54 = 0; - int psx_delay_BFC36F78 = 0; - int psx_delay_BFC36F88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36EE0u: goto label_BFC36EE0; - case 0xBFC36EE8u: goto label_BFC36EE8; - case 0xBFC36EECu: goto label_BFC36EEC; - case 0xBFC36F08u: goto label_BFC36F08; - case 0xBFC36F28u: goto label_BFC36F28; - case 0xBFC36F3Cu: goto label_BFC36F3C; - case 0xBFC36F50u: goto label_BFC36F50; - case 0xBFC36F5Cu: goto label_BFC36F5C; - case 0xBFC36F60u: goto label_BFC36F60; - case 0xBFC36F64u: goto label_BFC36F64; - case 0xBFC36F80u: goto label_BFC36F80; - case 0xBFC36F84u: goto label_BFC36F84; - default: break; - } - } -label_BFC36EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC36EC0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EEC0u); -#endif - /* 0xBFC36EC4: 8DCE9258 lw $t6, -28072($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEC4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9258u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36EC8: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36ECC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC36ED0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EED0u); return; } g_debug_last_store_pc = 0x8004EED0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC36ED4: AC249258 sw $a0, -28072($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28072; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EED4u); return; } g_debug_last_store_pc = 0x8004EED4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249258u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36ED8: 10800003 beq $a0, $zero, 0xBFC36EE8 */ - uint32_t psx_brA_BFC36ED8 = cpu->gpr[4]; uint32_t psx_brB_BFC36ED8 = cpu->gpr[0]; - psx_taken_BFC36ED8 = (psx_brA_BFC36ED8 == psx_brB_BFC36ED8); - psx_delay_BFC36ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC36EDC: AFAE0024 sw $t6, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEDCu); return; } g_debug_last_store_pc = 0x8004EEDCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0024u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEDCu); -#endif - if (psx_delay_BFC36ED8) { - psx_delay_BFC36ED8 = 0; - if (psx_taken_BFC36ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EEE8u); - goto label_BFC36EE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EEE0u); - } -label_BFC36EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36EE0: 10000002 beq $zero, $zero, 0xBFC36EEC */ - uint32_t psx_brA_BFC36EE0 = cpu->gpr[0]; uint32_t psx_brB_BFC36EE0 = cpu->gpr[0]; - psx_taken_BFC36EE0 = (psx_brA_BFC36EE0 == psx_brB_BFC36EE0); - psx_delay_BFC36EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC36EE4: 24030080 addiu $v1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24030080u, cpu->gpr[3], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEE4u); -#endif - if (psx_delay_BFC36EE0) { - psx_delay_BFC36EE0 = 0; - if (psx_taken_BFC36EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EEECu); - goto label_BFC36EEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EEE8u); - } -label_BFC36EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC36EE8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEE8u); -#endif -label_BFC36EEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36EECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC36EEC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EEF0u); -#endif - /* 0xBFC36EF0: 8DEF924C lw $t7, -28084($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEF0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF924Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC36EF4: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEF4u); return; } g_debug_last_store_pc = 0x8004EEF4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEF4u); -#endif - /* 0xBFC36EF8: 8DF80028 lw $t8, 40($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EEF8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF80028u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC36EFC: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC36F00: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x8004EF08u; /* jalr link before delay slot */ - psx_delay_BFC36F00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36F04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EF04u); -#endif - if (psx_delay_BFC36F00) { - psx_delay_BFC36F00 = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x8004EF08u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC36F08: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF08u); -#endif - /* 0xBFC36F0C: 8F39924C lw $t9, -28084($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF0Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39924Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF10u); -#endif - /* 0xBFC36F10: 8FA30020 lw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF10u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF10u); -#endif - /* 0xBFC36F14: 8F280010 lw $t0, 16($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF14u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x2000000u); } - PGXP_LOAD(0x8F280010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36F18: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Cu); -#endif - /* 0xBFC36F1C: 00622025 or $a0, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[3] | cpu->gpr[2]; - PGXP_ALU(0x00622025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC36F20: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x8004EF28u; /* jalr link before delay slot */ - psx_delay_BFC36F20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC36F24: 00812025 or $a0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x00812025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF24u); -#endif - if (psx_delay_BFC36F20) { - psx_delay_BFC36F20 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x8004EF28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC36F28: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF28u); -#endif - /* 0xBFC36F2C: 8D299254 lw $t1, -28076($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF2Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299254u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC36F30: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC36F34: 15210013 bne $t1, $at, 0xBFC36F84 */ - uint32_t psx_brA_BFC36F34 = cpu->gpr[9]; uint32_t psx_brB_BFC36F34 = cpu->gpr[1]; - psx_taken_BFC36F34 = (psx_brA_BFC36F34 != psx_brB_BFC36F34); - psx_delay_BFC36F34 = 1; - /* 0xBFC36F38: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF38u); -#endif - if (psx_delay_BFC36F34) { - psx_delay_BFC36F34 = 0; - if (psx_taken_BFC36F34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF84u); - goto label_BFC36F84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF3Cu); - } -label_BFC36F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC36F3C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF40u); -#endif - /* 0xBFC36F40: 8D4A9258 lw $t2, -28072($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF40u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9258u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36F44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC36F48: 11400005 beq $t2, $zero, 0xBFC36F60 */ - uint32_t psx_brA_BFC36F48 = cpu->gpr[10]; uint32_t psx_brB_BFC36F48 = cpu->gpr[0]; - psx_taken_BFC36F48 = (psx_brA_BFC36F48 == psx_brB_BFC36F48); - psx_delay_BFC36F48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F4C: 3C032000 lui $v1, 0x2000 */ - cpu->gpr[3] = 0x20000000u; - PGXP_ALU(0x3C032000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF4Cu); -#endif - if (psx_delay_BFC36F48) { - psx_delay_BFC36F48 = 0; - if (psx_taken_BFC36F48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF60u); - goto label_BFC36F60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF50u); - } -label_BFC36F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F50: 3C032000 lui $v1, 0x2000 */ - cpu->gpr[3] = 0x20000000u; - PGXP_ALU(0x3C032000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36F54: 10000003 beq $zero, $zero, 0xBFC36F64 */ - uint32_t psx_brA_BFC36F54 = cpu->gpr[0]; uint32_t psx_brB_BFC36F54 = cpu->gpr[0]; - psx_taken_BFC36F54 = (psx_brA_BFC36F54 == psx_brB_BFC36F54); - psx_delay_BFC36F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F58: 34630501 ori $v1, $v1, 0x501 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x501u; - PGXP_ALU(0x34630501u, cpu->gpr[3], _pgx1, 0x0501u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF58u); -#endif - if (psx_delay_BFC36F54) { - psx_delay_BFC36F54 = 0; - if (psx_taken_BFC36F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF64u); - goto label_BFC36F64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EF5Cu); - } -label_BFC36F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F5C: 3C032000 lui $v1, 0x2000 */ - cpu->gpr[3] = 0x20000000u; - PGXP_ALU(0x3C032000u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF5Cu); -#endif -label_BFC36F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F60: 34630504 ori $v1, $v1, 0x504 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x504u; - PGXP_ALU(0x34630504u, cpu->gpr[3], _pgx1, 0x0504u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF60u); -#endif -label_BFC36F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC36F64: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF64u); -#endif - /* 0xBFC36F68: 8D6B924C lw $t3, -28084($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF68u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B924Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC36F6C: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF70u); -#endif - /* 0xBFC36F70: 8D6C0010 lw $t4, 16($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF70u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001000u); -#endif - /* 0xBFC36F78: 0180F809 jalr $ra, $t4 */ - cpu->gpr[31] = 0x8004EF80u; /* jalr link before delay slot */ - psx_delay_BFC36F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EF7Cu); -#endif - if (psx_delay_BFC36F78) { - psx_delay_BFC36F78 = 0; - { uint32_t _t = cpu->gpr[12]; - cpu->gpr[31] = 0x8004EF80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF80u); -#endif - /* 0xBFC36F80: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF80u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF80u); -#endif -label_BFC36F84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF84u); -#endif - /* 0xBFC36F84: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36F88: 03E00008 jr $ra */ - psx_delay_BFC36F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36F8C: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF8Cu); -#endif - if (psx_delay_BFC36F88) { - psx_delay_BFC36F88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36F90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36F90u); - int psx_delay_BFC36FA8 = 0; - int psx_taken_BFC36FA8 = 0; - int psx_delay_BFC36FD0 = 0; - int psx_delay_BFC36FE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC36FB0u: goto label_BFC36FB0; - case 0xBFC36FD8u: goto label_BFC36FD8; - case 0xBFC36FE0u: goto label_BFC36FE0; - default: break; - } - } -label_BFC36F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC36F90: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36F94: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC36F98: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF98u); -#endif - /* 0xBFC36F9C: 8C639250 lw $v1, -28080($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EF9Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639250u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC36FA0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC36FA4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFA4u); return; } g_debug_last_store_pc = 0x8004EFA4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC36FA8: 10A0000D beq $a1, $zero, 0xBFC36FE0 */ - uint32_t psx_brA_BFC36FA8 = cpu->gpr[5]; uint32_t psx_brB_BFC36FA8 = cpu->gpr[0]; - psx_taken_BFC36FA8 = (psx_brA_BFC36FA8 == psx_brB_BFC36FA8); - psx_delay_BFC36FA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC36FAC: AC259250 sw $a1, -28080($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28080; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFACu); return; } g_debug_last_store_pc = 0x8004EFACu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC259250u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFACu); -#endif - if (psx_delay_BFC36FA8) { - psx_delay_BFC36FA8 = 0; - if (psx_taken_BFC36FA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EFE0u); - goto label_BFC36FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EFB0u); - } -label_BFC36FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36FB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC36FB0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFB0u); -#endif - /* 0xBFC36FB4: 8DCE92F8 lw $t6, -27912($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFB4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92F8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC36FB8: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC36FBC: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFC0u); -#endif - /* 0xBFC36FC0: 8CE79258 lw $a3, -28072($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFC0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79258u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFC0u); -#endif - /* 0xBFC36FC4: 8CC69254 lw $a2, -28076($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFC4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69254u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC36FC8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC36FCC: 24849260 addiu $a0, $a0, -28064 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28064)); - PGXP_ALU(0x24849260u, cpu->gpr[4], _pgx1, 0xFFFF9260u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC36FD0: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x8004EFD8u; /* jalr link before delay slot */ - psx_delay_BFC36FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC36FD4: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFD4u); return; } g_debug_last_store_pc = 0x8004EFD4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFD4u); -#endif - if (psx_delay_BFC36FD0) { - psx_delay_BFC36FD0 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x8004EFD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC36FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFD8u); -#endif - /* 0xBFC36FD8: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFD8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36FDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EFDCu); -#endif -label_BFC36FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFE0u); -#endif - /* 0xBFC36FE0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC36FE4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36FE8: 03E00008 jr $ra */ - psx_delay_BFC36FE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC36FEC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFECu); -#endif - if (psx_delay_BFC36FE8) { - psx_delay_BFC36FE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC36FF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC36FF0u); - int psx_delay_BFC36FF8 = 0; -label_BFC36FF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC36FF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC36FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004EFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC36FF0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004EFF0u); -#endif - /* 0xBFC36FF4: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004EFF4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004EFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC36FF8: 03E00008 jr $ra */ - psx_delay_BFC36FF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC36FFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004EFFCu); -#endif - if (psx_delay_BFC36FF8) { - psx_delay_BFC36FF8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37028(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37028u); - int psx_delay_BFC3702C = 0; - int psx_taken_BFC3702C = 0; - int psx_delay_BFC37034 = 0; - int psx_taken_BFC37034 = 0; - int psx_delay_BFC37058 = 0; - int psx_delay_BFC37068 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37034u: goto label_BFC37034; - case 0xBFC3703Cu: goto label_BFC3703C; - case 0xBFC37044u: goto label_BFC37044; - case 0xBFC37060u: goto label_BFC37060; - default: break; - } - } -label_BFC37028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37028: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3702C: 10800003 beq $a0, $zero, 0xBFC3703C */ - uint32_t psx_brA_BFC3702C = cpu->gpr[4]; uint32_t psx_brB_BFC3702C = cpu->gpr[0]; - psx_taken_BFC3702C = (psx_brA_BFC3702C == psx_brB_BFC3702C); - psx_delay_BFC3702C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37030: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F030u); return; } g_debug_last_store_pc = 0x8004F030u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F030u); -#endif - if (psx_delay_BFC3702C) { - psx_delay_BFC3702C = 0; - if (psx_taken_BFC3702C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F03Cu); - goto label_BFC3703C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F034u); - } -label_BFC37034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37034: 10000003 beq $zero, $zero, 0xBFC37044 */ - uint32_t psx_brA_BFC37034 = cpu->gpr[0]; uint32_t psx_brB_BFC37034 = cpu->gpr[0]; - psx_taken_BFC37034 = (psx_brA_BFC37034 == psx_brB_BFC37034); - psx_delay_BFC37034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37038: 3C040300 lui $a0, 0x300 */ - cpu->gpr[4] = 0x03000000u; - PGXP_ALU(0x3C040300u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F038u); -#endif - if (psx_delay_BFC37034) { - psx_delay_BFC37034 = 0; - if (psx_taken_BFC37034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F044u); - goto label_BFC37044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F03Cu); - } -label_BFC3703C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3703Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3703Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3703C: 3C040300 lui $a0, 0x300 */ - cpu->gpr[4] = 0x03000000u; - PGXP_ALU(0x3C040300u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37040: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F040u); -#endif -label_BFC37044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37044: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F044u); -#endif - /* 0xBFC37048: 8DCE924C lw $t6, -28084($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F048u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE924Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3704C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F050u); -#endif - /* 0xBFC37050: 8DCF0010 lw $t7, 16($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F050u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC37058: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8004F060u; /* jalr link before delay slot */ - psx_delay_BFC37058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3705C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F05Cu); -#endif - if (psx_delay_BFC37058) { - psx_delay_BFC37058 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8004F060u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F060u); -#endif - /* 0xBFC37060: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F060u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37064: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37068: 03E00008 jr $ra */ - psx_delay_BFC37068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3706C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F06Cu); -#endif - if (psx_delay_BFC37068) { - psx_delay_BFC37068 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37070(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37070u); - int psx_delay_BFC37088 = 0; - int psx_delay_BFC37098 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37090u: goto label_BFC37090; - default: break; - } - } -label_BFC37070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37070: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F070u); -#endif - /* 0xBFC37074: 8DCE924C lw $t6, -28084($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F074u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE924Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37078: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3707C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F07Cu); return; } g_debug_last_store_pc = 0x8004F07Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F080u); -#endif - /* 0xBFC37080: 8DCF003C lw $t7, 60($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F080u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37084: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC37088: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8004F090u; /* jalr link before delay slot */ - psx_delay_BFC37088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3708C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F08Cu); -#endif - if (psx_delay_BFC37088) { - psx_delay_BFC37088 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8004F090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F090u); -#endif - /* 0xBFC37090: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F090u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37094: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37098: 03E00008 jr $ra */ - psx_delay_BFC37098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3709C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F09Cu); -#endif - if (psx_delay_BFC37098) { - psx_delay_BFC37098 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC370A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC370A0u); - int psx_delay_BFC370DC = 0; - int psx_delay_BFC370EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC370E4u: goto label_BFC370E4; - default: break; - } - } -label_BFC370A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC370A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC370A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC370A0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC370A4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F0A4u); -#endif - /* 0xBFC370A8: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC370AC: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0ACu); return; } g_debug_last_store_pc = 0x8004F0ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC370B0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0B0u); return; } g_debug_last_store_pc = 0x8004F0B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC370B4: 30C800FF andi $t0, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30C800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC370B8: 30E300FF andi $v1, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30E300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0B8u); -#endif - /* 0xBFC370BC: 8C590008 lw $t9, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0BCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC370C0: 30A900FF andi $t1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC370C4: 00037400 sll $t6, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00037400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC370C8: 00087A00 sll $t7, $t0, 8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 8u; - PGXP_ALU(0x00087A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0C8u); -#endif - /* 0xBFC370CC: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0CCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC370D0: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0D0u); -#endif - /* 0xBFC370D4: 8C44000C lw $a0, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C44000Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000280u); -#endif - /* 0xBFC370D8: 03093825 or $a3, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[7] = cpu->gpr[24] | cpu->gpr[9]; - PGXP_ALU(0x03093825u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC370DC: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x8004F0E4u; /* jalr link before delay slot */ - psx_delay_BFC370DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC370E0: 24060008 addiu $a2, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24060008u, cpu->gpr[6], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0E0u); -#endif - if (psx_delay_BFC370DC) { - psx_delay_BFC370DC = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x8004F0E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC370E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC370E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC370E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0E4u); -#endif - /* 0xBFC370E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC370E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC370EC: 03E00008 jr $ra */ - psx_delay_BFC370EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC370F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F0F0u); -#endif - if (psx_delay_BFC370EC) { - psx_delay_BFC370EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC370F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC370F4u); - int psx_delay_BFC37118 = 0; - int psx_delay_BFC37128 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37120u: goto label_BFC37120; - default: break; - } - } -label_BFC370F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC370F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC370F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC370F4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC370F8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F0F8u); -#endif - /* 0xBFC370FC: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F0FCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC37100: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F100u); return; } g_debug_last_store_pc = 0x8004F100u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37104: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F104u); return; } g_debug_last_store_pc = 0x8004F104u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F104u); -#endif - /* 0xBFC37108: 8C4E0008 lw $t6, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F108u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC3710C: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F10Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F110u); -#endif - /* 0xBFC37110: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F110u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F110u); -#endif - /* 0xBFC37114: 8C440020 lw $a0, 32($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F114u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC37118: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x8004F120u; /* jalr link before delay slot */ - psx_delay_BFC37118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3711C: 24060008 addiu $a2, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24060008u, cpu->gpr[6], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F11Cu); -#endif - if (psx_delay_BFC37118) { - psx_delay_BFC37118 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x8004F120u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F120u); -#endif - /* 0xBFC37120: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F120u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37124: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37128: 03E00008 jr $ra */ - psx_delay_BFC37128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3712C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F12Cu); -#endif - if (psx_delay_BFC37128) { - psx_delay_BFC37128 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37130(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37130u); - int psx_delay_BFC37154 = 0; - int psx_delay_BFC37164 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3715Cu: goto label_BFC3715C; - default: break; - } - } -label_BFC37130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37130: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37134: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F134u); -#endif - /* 0xBFC37138: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F138u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3713C: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F13Cu); return; } g_debug_last_store_pc = 0x8004F13Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37140: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F140u); return; } g_debug_last_store_pc = 0x8004F140u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F140u); -#endif - /* 0xBFC37144: 8C4E0008 lw $t6, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F144u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC37148: 00A03821 addu $a3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F148u); -#endif - /* 0xBFC3714C: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F14Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F14Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F150u); -#endif - /* 0xBFC37150: 8C44001C lw $a0, 28($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F150u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C44001Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC37154: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x8004F15Cu; /* jalr link before delay slot */ - psx_delay_BFC37154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37158: 24060008 addiu $a2, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24060008u, cpu->gpr[6], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F158u); -#endif - if (psx_delay_BFC37154) { - psx_delay_BFC37154 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x8004F15Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3715C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3715Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F15Cu); -#endif - /* 0xBFC3715C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F15Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37160: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37164: 03E00008 jr $ra */ - psx_delay_BFC37164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F168u); -#endif - if (psx_delay_BFC37164) { - psx_delay_BFC37164 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3716C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3716Cu); - int psx_delay_BFC371CC = 0; - int psx_delay_BFC371DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC371D4u: goto label_BFC371D4; - default: break; - } - } -label_BFC3716C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3716Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3716Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3716C: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37170: 3C0E04FF lui $t6, 0x4FF */ - cpu->gpr[14] = 0x04FF0000u; - PGXP_ALU(0x3C0E04FFu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37174: 35CEFFFF ori $t6, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0xFFFFu; - PGXP_ALU(0x35CEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC37178: 3C0F8000 lui $t7, 0x8000 */ - cpu->gpr[15] = 0x80000000u; - PGXP_ALU(0x3C0F8000u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3717C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F17Cu); return; } g_debug_last_store_pc = 0x8004F17Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC37180: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC37184: 00A04821 addu $t1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x141u); -#endif - /* 0xBFC37188: 00C04021 addu $t0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3718C: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F18Cu); return; } g_debug_last_store_pc = 0x8004F18Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC37190: AFAF0020 sw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F190u); return; } g_debug_last_store_pc = 0x8004F190u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F190u); -#endif - /* 0xBFC37194: 8C780000 lw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F194u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC37198: 0008CC00 sll $t9, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[8] << 16u; - PGXP_ALU(0x0008CC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3719C: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000C00u); -#endif - /* 0xBFC371A0: 032A5825 or $t3, $t9, $t2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[25] | cpu->gpr[10]; - PGXP_ALU(0x032A5825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC371A4: AFAB0028 sw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1A4u); return; } g_debug_last_store_pc = 0x8004F1A4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC371A8: AFB80024 sw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1A8u); return; } g_debug_last_store_pc = 0x8004F1A8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1A8u); -#endif - /* 0xBFC371AC: 8C6C0004 lw $t4, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1ACu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x8C6C0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC371B0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F1B0u); -#endif - /* 0xBFC371B4: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC371B8: AFAC002C sw $t4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1B8u); return; } g_debug_last_store_pc = 0x8004F1B8u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1B8u); -#endif - /* 0xBFC371BC: 8C4D0008 lw $t5, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1BCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1C0u); -#endif - /* 0xBFC371C0: 8C440018 lw $a0, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC371C4: 24060014 addiu $a2, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24060014u, cpu->gpr[6], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC371C8: 27A5001C addiu $a1, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A5001Cu, cpu->gpr[5], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002000u); -#endif - /* 0xBFC371CC: 01A0F809 jalr $ra, $t5 */ - cpu->gpr[31] = 0x8004F1D4u; /* jalr link before delay slot */ - psx_delay_BFC371CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC371D0: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1D0u); -#endif - if (psx_delay_BFC371CC) { - psx_delay_BFC371CC = 0; - { uint32_t _t = cpu->gpr[13]; - cpu->gpr[31] = 0x8004F1D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC371D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC371D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC371D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1D4u); -#endif - /* 0xBFC371D4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F1D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC371D8: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC371DC: 03E00008 jr $ra */ - psx_delay_BFC371DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC371E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F1E0u); -#endif - if (psx_delay_BFC371DC) { - psx_delay_BFC371DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37334(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37334u); - int psx_delay_BFC37350 = 0; - int psx_delay_BFC37360 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37358u: goto label_BFC37358; - default: break; - } - } -label_BFC37334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37334: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37338: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F338u); -#endif - /* 0xBFC3733C: 8DCE924C lw $t6, -28084($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F33Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE924Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37340: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F340u); return; } g_debug_last_store_pc = 0x8004F340u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC37344: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F344u); return; } g_debug_last_store_pc = 0x8004F344u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F344u); -#endif - /* 0xBFC37348: 8DCF002C lw $t7, 44($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F348u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F348u); -#endif - /* 0xBFC3734C: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F34Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC37350: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8004F358u; /* jalr link before delay slot */ - psx_delay_BFC37350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F354u); -#endif - if (psx_delay_BFC37350) { - psx_delay_BFC37350 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8004F358u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F358u); -#endif - /* 0xBFC37358: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F358u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F358u); -#endif - /* 0xBFC3735C: 8FA20020 lw $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F35Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37360: 03E00008 jr $ra */ - psx_delay_BFC37360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37364: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F364u); -#endif - if (psx_delay_BFC37360) { - psx_delay_BFC37360 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37368(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37368u); - int psx_delay_BFC37378 = 0; - int psx_taken_BFC37378 = 0; - int psx_delay_BFC37388 = 0; - int psx_delay_BFC373A4 = 0; - int psx_delay_BFC373C8 = 0; - int psx_delay_BFC373D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37380u: goto label_BFC37380; - case 0xBFC37390u: goto label_BFC37390; - case 0xBFC373ACu: goto label_BFC373AC; - case 0xBFC373D0u: goto label_BFC373D0; - default: break; - } - } -label_BFC37368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37368: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F368u); -#endif - /* 0xBFC3736C: 8DCE9250 lw $t6, -28080($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F36Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9250u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37370: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37374: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F374u); return; } g_debug_last_store_pc = 0x8004F374u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC37378: 11C00005 beq $t6, $zero, 0xBFC37390 */ - uint32_t psx_brA_BFC37378 = cpu->gpr[14]; uint32_t psx_brB_BFC37378 = cpu->gpr[0]; - psx_taken_BFC37378 = (psx_brA_BFC37378 == psx_brB_BFC37378); - psx_delay_BFC37378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3737C: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F37Cu); return; } g_debug_last_store_pc = 0x8004F37Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F37Cu); -#endif - if (psx_delay_BFC37378) { - psx_delay_BFC37378 = 0; - if (psx_taken_BFC37378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F390u); - goto label_BFC37390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F380u); - } -label_BFC37380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37380: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F380u); -#endif - /* 0xBFC37384: 8FA50020 lw $a1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F384u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50020u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37388: 0C01488A jal 0xB0052228 */ - cpu->gpr[31] = 0x8004F390u; /* jal link before delay slot */ - psx_delay_BFC37388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3738C: 2484928C addiu $a0, $a0, -28020 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-28020)); - PGXP_ALU(0x2484928Cu, cpu->gpr[4], _pgx1, 0xFFFF928Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F38Cu); -#endif - if (psx_delay_BFC37388) { - psx_delay_BFC37388 = 0; - cpu->gpr[31] = 0x8004F390u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052228u); - cpu->pc = 0x80052228u; return; - } -label_BFC37390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC37390: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F390u); -#endif - /* 0xBFC37394: 8DEF924C lw $t7, -28084($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F394u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF924Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37398: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F398u); -#endif - /* 0xBFC3739C: 8DF8003C lw $t8, 60($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F39Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF8003Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC373A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC373A4: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x8004F3ACu; /* jalr link before delay slot */ - psx_delay_BFC373A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC373A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F3A8u); -#endif - if (psx_delay_BFC373A4) { - psx_delay_BFC373A4 = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x8004F3ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC373AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC373ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC373ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3ACu); -#endif - /* 0xBFC373AC: 8FB90020 lw $t9, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3ACu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC373B0: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F3B0u); -#endif - /* 0xBFC373B4: 8D08924C lw $t0, -28084($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3B4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08924Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3B4u); -#endif - /* 0xBFC373B8: 8F250000 lw $a1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3B8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x2000000u); } - PGXP_LOAD(0x8F250000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3B8u); -#endif - /* 0xBFC373BC: 8D090014 lw $t1, 20($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3BCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090014u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC373C0: 00052E02 srl $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] >> 24u; - PGXP_ALU(0x00052E02u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC373C4: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC373C8: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x8004F3D0u; /* jalr link before delay slot */ - psx_delay_BFC373C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC373CC: 27240004 addiu $a0, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[25] + (4)); - PGXP_ALU(0x27240004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3CCu); -#endif - if (psx_delay_BFC373C8) { - psx_delay_BFC373C8 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x8004F3D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC373D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC373D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC373D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3D0u); -#endif - /* 0xBFC373D0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC373D4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC373D8: 03E00008 jr $ra */ - psx_delay_BFC373D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC373DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F3DCu); -#endif - if (psx_delay_BFC373D8) { - psx_delay_BFC373D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC373E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC373E0u); - int psx_delay_BFC373F0 = 0; - int psx_taken_BFC373F0 = 0; - int psx_delay_BFC373F8 = 0; - int psx_delay_BFC37400 = 0; - int psx_taken_BFC37400 = 0; - int psx_delay_BFC3741C = 0; - int psx_delay_BFC3742C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC373F8u: goto label_BFC373F8; - case 0xBFC37400u: goto label_BFC37400; - case 0xBFC37408u: goto label_BFC37408; - case 0xBFC37424u: goto label_BFC37424; - case 0xBFC37428u: goto label_BFC37428; - default: break; - } - } -label_BFC373E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC373E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC373E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC373E0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F3E0u); -#endif - /* 0xBFC373E4: 8DCE9250 lw $t6, -28080($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28080; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28080)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3E4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9250u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC373E8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC373EC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F3ECu); return; } g_debug_last_store_pc = 0x8004F3ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC373F0: 11C00005 beq $t6, $zero, 0xBFC37408 */ - uint32_t psx_brA_BFC373F0 = cpu->gpr[14]; uint32_t psx_brB_BFC373F0 = cpu->gpr[0]; - psx_taken_BFC373F0 = (psx_brA_BFC373F0 == psx_brB_BFC373F0); - psx_delay_BFC373F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC373F4: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3F4u); -#endif - if (psx_delay_BFC373F0) { - psx_delay_BFC373F0 = 0; - if (psx_taken_BFC373F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F408u); - goto label_BFC37408; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F3F8u); - } -label_BFC373F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC373F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC373F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC373F8: 0C0147F9 jal 0xB0051FE4 */ - cpu->gpr[31] = 0x8004F400u; /* jal link before delay slot */ - psx_delay_BFC373F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC373FC: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F3FCu); -#endif - if (psx_delay_BFC373F8) { - psx_delay_BFC373F8 = 0; - cpu->gpr[31] = 0x8004F400u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FE4u); - cpu->pc = 0x80051FE4u; return; - } -label_BFC37400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37400: 10000009 beq $zero, $zero, 0xBFC37428 */ - uint32_t psx_brA_BFC37400 = cpu->gpr[0]; uint32_t psx_brB_BFC37400 = cpu->gpr[0]; - psx_taken_BFC37400 = (psx_brA_BFC37400 == psx_brB_BFC37400); - psx_delay_BFC37400 = 1; - /* 0xBFC37404: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F404u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F404u); -#endif - if (psx_delay_BFC37400) { - psx_delay_BFC37400 = 0; - if (psx_taken_BFC37400) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F428u); - goto label_BFC37428; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F408u); - } -label_BFC37408: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37408u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37408: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F408u); -#endif - /* 0xBFC3740C: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F40Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37410: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F410u); -#endif - /* 0xBFC37414: 8C4F0004 lw $t7, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F414u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x8C4F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F414u); -#endif - /* 0xBFC37418: 8C440018 lw $a0, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F418u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC3741C: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8004F424u; /* jalr link before delay slot */ - psx_delay_BFC3741C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37420: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F420u); -#endif - if (psx_delay_BFC3741C) { - psx_delay_BFC3741C = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8004F424u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F424u); -#endif - /* 0xBFC37424: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F424u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F424u); -#endif -label_BFC37428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37428: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3742C: 03E00008 jr $ra */ - psx_delay_BFC3742C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37430: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F430u); -#endif - if (psx_delay_BFC3742C) { - psx_delay_BFC3742C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37434(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37434u); - int psx_delay_BFC37450 = 0; - int psx_delay_BFC3748C = 0; - int psx_delay_BFC374A0 = 0; - int psx_delay_BFC374B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37458u: goto label_BFC37458; - case 0xBFC37494u: goto label_BFC37494; - case 0xBFC374A8u: goto label_BFC374A8; - default: break; - } - } -label_BFC37434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37434: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC37438: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F438u); return; } g_debug_last_store_pc = 0x8004F438u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3743C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37440: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F440u); return; } g_debug_last_store_pc = 0x8004F440u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10008u); -#endif - /* 0xBFC37444: 2603001C addiu $v1, $s0, 28 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[16] + (28)); - PGXP_ALU(0x2603001Cu, cpu->gpr[3], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC37448: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3744C: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F44Cu); return; } g_debug_last_store_pc = 0x8004F44Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37450: 0C013EB1 jal 0xB004FAC4 */ - cpu->gpr[31] = 0x8004F458u; /* jal link before delay slot */ - psx_delay_BFC37450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC37454: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F454u); -#endif - if (psx_delay_BFC37450) { - psx_delay_BFC37450 = 0; - cpu->gpr[31] = 0x8004F458u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FAC4u); - cpu->pc = 0x8004FAC4u; return; - } -label_BFC37458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F458u); -#endif - /* 0xBFC37458: 8E0E001C lw $t6, 28($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F458u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x8E0E001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3745C: 3C01FF00 lui $at, 0xFF00 */ - cpu->gpr[1] = 0xFF000000u; - PGXP_ALU(0x3C01FF00u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC37460: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37464: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37468: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F468u); -#endif - /* 0xBFC3746C: 8C42924C lw $v0, -28084($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F46Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42924Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37470: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F470u); -#endif - /* 0xBFC37474: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F474u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC37478: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC3747C: AE18001C sw $t8, 28($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F47Cu); return; } g_debug_last_store_pc = 0x8004F47Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE18001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F480u); -#endif - /* 0xBFC37480: 8C590004 lw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F480u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F480u); -#endif - /* 0xBFC37484: 8C440018 lw $a0, 24($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F484u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37488: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC3748C: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x8004F494u; /* jalr link before delay slot */ - psx_delay_BFC3748C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC37490: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F490u); -#endif - if (psx_delay_BFC3748C) { - psx_delay_BFC3748C = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x8004F494u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37494: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37498: 2484DE20 addiu $a0, $a0, -8672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8672)); - PGXP_ALU(0x2484DE20u, cpu->gpr[4], _pgx1, 0xFFFFDE20u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC3749C: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC374A0: 0C0144F3 jal 0xB00513CC */ - cpu->gpr[31] = 0x8004F4A8u; /* jal link before delay slot */ - psx_delay_BFC374A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC374A4: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4A4u); -#endif - if (psx_delay_BFC374A0) { - psx_delay_BFC374A0 = 0; - cpu->gpr[31] = 0x8004F4A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513CCu); - cpu->pc = 0x800513CCu; return; - } -label_BFC374A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC374A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC374A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4A8u); -#endif - /* 0xBFC374A8: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC374AC: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4B0u); -#endif - /* 0xBFC374B0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC374B4: 03E00008 jr $ra */ - psx_delay_BFC374B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC374B8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4B8u); -#endif - if (psx_delay_BFC374B4) { - psx_delay_BFC374B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC374BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC374BCu); - int psx_delay_BFC374D4 = 0; - int psx_delay_BFC374E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC374DCu: goto label_BFC374DC; - default: break; - } - } -label_BFC374BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC374BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC374BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC374BC: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC374C0: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4C0u); return; } g_debug_last_store_pc = 0x8004F4C0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC374C4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4C4u); return; } g_debug_last_store_pc = 0x8004F4C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4C4u); -#endif - /* 0xBFC374C8: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC374CC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC374D0: 24A5DE20 addiu $a1, $a1, -8672 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8672)); - PGXP_ALU(0x24A5DE20u, cpu->gpr[5], _pgx1, 0xFFFFDE20u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC374D4: 0C0144F3 jal 0xB00513CC */ - cpu->gpr[31] = 0x8004F4DCu; /* jal link before delay slot */ - psx_delay_BFC374D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC374D8: 2406005C addiu $a2, $zero, 92 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); - PGXP_ALU(0x2406005Cu, cpu->gpr[6], _pgx1, 0x0000005Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4D8u); -#endif - if (psx_delay_BFC374D4) { - psx_delay_BFC374D4 = 0; - cpu->gpr[31] = 0x8004F4DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513CCu); - cpu->pc = 0x800513CCu; return; - } -label_BFC374DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC374DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC374DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4DCu); -#endif - /* 0xBFC374DC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4E0u); -#endif - /* 0xBFC374E0: 8FA20020 lw $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC374E4: 03E00008 jr $ra */ - psx_delay_BFC374E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC374E8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4E8u); -#endif - if (psx_delay_BFC374E4) { - psx_delay_BFC374E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC374EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC374ECu); - int psx_delay_BFC37500 = 0; - int psx_taken_BFC37500 = 0; - int psx_delay_BFC37510 = 0; - int psx_delay_BFC37530 = 0; - int psx_taken_BFC37530 = 0; - int psx_delay_BFC37568 = 0; - int psx_delay_BFC37598 = 0; - int psx_taken_BFC37598 = 0; - int psx_delay_BFC375A0 = 0; - int psx_taken_BFC375A0 = 0; - int psx_delay_BFC375BC = 0; - int psx_taken_BFC375BC = 0; - int psx_delay_BFC375C4 = 0; - int psx_taken_BFC375C4 = 0; - int psx_delay_BFC375D4 = 0; - int psx_taken_BFC375D4 = 0; - int psx_delay_BFC375DC = 0; - int psx_taken_BFC375DC = 0; - int psx_delay_BFC375E8 = 0; - int psx_taken_BFC375E8 = 0; - int psx_delay_BFC375F0 = 0; - int psx_taken_BFC375F0 = 0; - int psx_delay_BFC37608 = 0; - int psx_taken_BFC37608 = 0; - int psx_delay_BFC37610 = 0; - int psx_taken_BFC37610 = 0; - int psx_delay_BFC3761C = 0; - int psx_taken_BFC3761C = 0; - int psx_delay_BFC37624 = 0; - int psx_taken_BFC37624 = 0; - int psx_delay_BFC37634 = 0; - int psx_taken_BFC37634 = 0; - int psx_delay_BFC3763C = 0; - int psx_taken_BFC3763C = 0; - int psx_delay_BFC37648 = 0; - int psx_taken_BFC37648 = 0; - int psx_delay_BFC37650 = 0; - int psx_taken_BFC37650 = 0; - int psx_delay_BFC37664 = 0; - int psx_taken_BFC37664 = 0; - int psx_delay_BFC3766C = 0; - int psx_taken_BFC3766C = 0; - int psx_delay_BFC37678 = 0; - int psx_taken_BFC37678 = 0; - int psx_delay_BFC37680 = 0; - int psx_taken_BFC37680 = 0; - int psx_delay_BFC376C0 = 0; - int psx_delay_BFC376F8 = 0; - int psx_delay_BFC37710 = 0; - int psx_taken_BFC37710 = 0; - int psx_delay_BFC37728 = 0; - int psx_taken_BFC37728 = 0; - int psx_delay_BFC3773C = 0; - int psx_taken_BFC3773C = 0; - int psx_delay_BFC37754 = 0; - int psx_taken_BFC37754 = 0; - int psx_delay_BFC3776C = 0; - int psx_taken_BFC3776C = 0; - int psx_delay_BFC37774 = 0; - int psx_taken_BFC37774 = 0; - int psx_delay_BFC37780 = 0; - int psx_taken_BFC37780 = 0; - int psx_delay_BFC37788 = 0; - int psx_taken_BFC37788 = 0; - int psx_delay_BFC37794 = 0; - int psx_taken_BFC37794 = 0; - int psx_delay_BFC3779C = 0; - int psx_taken_BFC3779C = 0; - int psx_delay_BFC377A8 = 0; - int psx_taken_BFC377A8 = 0; - int psx_delay_BFC377B0 = 0; - int psx_taken_BFC377B0 = 0; - int psx_delay_BFC377BC = 0; - int psx_taken_BFC377BC = 0; - int psx_delay_BFC377C4 = 0; - int psx_taken_BFC377C4 = 0; - int psx_delay_BFC377DC = 0; - int psx_taken_BFC377DC = 0; - int psx_delay_BFC377E4 = 0; - int psx_taken_BFC377E4 = 0; - int psx_delay_BFC37804 = 0; - int psx_delay_BFC3781C = 0; - int psx_delay_BFC37830 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37508u: goto label_BFC37508; - case 0xBFC37518u: goto label_BFC37518; - case 0xBFC37538u: goto label_BFC37538; - case 0xBFC37550u: goto label_BFC37550; - case 0xBFC37570u: goto label_BFC37570; - case 0xBFC375A0u: goto label_BFC375A0; - case 0xBFC375A8u: goto label_BFC375A8; - case 0xBFC375ACu: goto label_BFC375AC; - case 0xBFC375C4u: goto label_BFC375C4; - case 0xBFC375CCu: goto label_BFC375CC; - case 0xBFC375D0u: goto label_BFC375D0; - case 0xBFC375DCu: goto label_BFC375DC; - case 0xBFC375E4u: goto label_BFC375E4; - case 0xBFC375F0u: goto label_BFC375F0; - case 0xBFC375F8u: goto label_BFC375F8; - case 0xBFC375FCu: goto label_BFC375FC; - case 0xBFC37600u: goto label_BFC37600; - case 0xBFC37610u: goto label_BFC37610; - case 0xBFC37618u: goto label_BFC37618; - case 0xBFC3761Cu: goto label_BFC3761C; - case 0xBFC37624u: goto label_BFC37624; - case 0xBFC3762Cu: goto label_BFC3762C; - case 0xBFC37630u: goto label_BFC37630; - case 0xBFC37634u: goto label_BFC37634; - case 0xBFC3763Cu: goto label_BFC3763C; - case 0xBFC37644u: goto label_BFC37644; - case 0xBFC37648u: goto label_BFC37648; - case 0xBFC37650u: goto label_BFC37650; - case 0xBFC37658u: goto label_BFC37658; - case 0xBFC3765Cu: goto label_BFC3765C; - case 0xBFC37660u: goto label_BFC37660; - case 0xBFC3766Cu: goto label_BFC3766C; - case 0xBFC37674u: goto label_BFC37674; - case 0xBFC37678u: goto label_BFC37678; - case 0xBFC37680u: goto label_BFC37680; - case 0xBFC37688u: goto label_BFC37688; - case 0xBFC3768Cu: goto label_BFC3768C; - case 0xBFC37690u: goto label_BFC37690; - case 0xBFC376C8u: goto label_BFC376C8; - case 0xBFC37700u: goto label_BFC37700; - case 0xBFC37718u: goto label_BFC37718; - case 0xBFC37720u: goto label_BFC37720; - case 0xBFC37730u: goto label_BFC37730; - case 0xBFC37734u: goto label_BFC37734; - case 0xBFC37744u: goto label_BFC37744; - case 0xBFC37748u: goto label_BFC37748; - case 0xBFC3775Cu: goto label_BFC3775C; - case 0xBFC37760u: goto label_BFC37760; - case 0xBFC37774u: goto label_BFC37774; - case 0xBFC3777Cu: goto label_BFC3777C; - case 0xBFC37780u: goto label_BFC37780; - case 0xBFC37788u: goto label_BFC37788; - case 0xBFC37790u: goto label_BFC37790; - case 0xBFC37794u: goto label_BFC37794; - case 0xBFC3779Cu: goto label_BFC3779C; - case 0xBFC377A4u: goto label_BFC377A4; - case 0xBFC377A8u: goto label_BFC377A8; - case 0xBFC377B0u: goto label_BFC377B0; - case 0xBFC377B8u: goto label_BFC377B8; - case 0xBFC377BCu: goto label_BFC377BC; - case 0xBFC377C4u: goto label_BFC377C4; - case 0xBFC377CCu: goto label_BFC377CC; - case 0xBFC377D0u: goto label_BFC377D0; - case 0xBFC377E4u: goto label_BFC377E4; - case 0xBFC377ECu: goto label_BFC377EC; - case 0xBFC377F0u: goto label_BFC377F0; - case 0xBFC3780Cu: goto label_BFC3780C; - case 0xBFC37824u: goto label_BFC37824; - default: break; - } - } -label_BFC374EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC374ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC374ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC374EC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F4F0u); -#endif - /* 0xBFC374F0: 8DCE9254 lw $t6, -28076($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4F0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9254u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC374F4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC374F8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F4F8u); return; } g_debug_last_store_pc = 0x8004F4F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x411u); -#endif - /* 0xBFC374FC: 00805021 addu $t2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00805021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC37500: 11C0000D beq $t6, $zero, 0xBFC37538 */ - uint32_t psx_brA_BFC37500 = cpu->gpr[14]; uint32_t psx_brB_BFC37500 = cpu->gpr[0]; - psx_taken_BFC37500 = (psx_brA_BFC37500 == psx_brB_BFC37500); - psx_delay_BFC37500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37504: 3C050800 lui $a1, 0x800 */ - cpu->gpr[5] = 0x08000000u; - PGXP_ALU(0x3C050800u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F504u); -#endif - if (psx_delay_BFC37500) { - psx_delay_BFC37500 = 0; - if (psx_taken_BFC37500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F538u); - goto label_BFC37538; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F508u); - } -label_BFC37508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC37508: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F508u); return; } g_debug_last_store_pc = 0x8004F508u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x411u); -#endif - /* 0xBFC3750C: 01402021 addu $a0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37510: 0C014042 jal 0xB0050108 */ - cpu->gpr[31] = 0x8004F518u; /* jal link before delay slot */ - psx_delay_BFC37510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC37514: AFAA0030 sw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F514u); return; } g_debug_last_store_pc = 0x8004F514u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F514u); -#endif - if (psx_delay_BFC37510) { - psx_delay_BFC37510 = 0; - cpu->gpr[31] = 0x8004F518u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050108u); - cpu->pc = 0x80050108u; return; - } -label_BFC37518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F518u); -#endif - /* 0xBFC37518: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F518u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F518u); -#endif - /* 0xBFC3751C: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F51Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F51Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F520u); -#endif - /* 0xBFC37520: 854F0002 lh $t7, 2($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F520u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x400u); } - PGXP_LOAD(0x854F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC37524: 304B0FFF andi $t3, $v0, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0xFFFu; - PGXP_ALU(0x304B0FFFu, cpu->gpr[11], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC37528: 31F80FFF andi $t8, $t7, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFFu; - PGXP_ALU(0x31F80FFFu, cpu->gpr[24], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3752C: 0018CB00 sll $t9, $t8, 12 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 12u; - PGXP_ALU(0x0018CB00u, cpu->gpr[25], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37530: 10000007 beq $zero, $zero, 0xBFC37550 */ - uint32_t psx_brA_BFC37530 = cpu->gpr[0]; uint32_t psx_brB_BFC37530 = cpu->gpr[0]; - psx_taken_BFC37530 = (psx_brA_BFC37530 == psx_brB_BFC37530); - psx_delay_BFC37530 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000808u); -#endif - /* 0xBFC37534: 032B1825 or $v1, $t9, $t3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[25] | cpu->gpr[11]; - PGXP_ALU(0x032B1825u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F534u); -#endif - if (psx_delay_BFC37530) { - psx_delay_BFC37530 = 0; - if (psx_taken_BFC37530) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F550u); - goto label_BFC37550; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F538u); - } -label_BFC37538: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37538u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F538u); -#endif - /* 0xBFC37538: 854C0002 lh $t4, 2($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F538u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x400u); } - PGXP_LOAD(0x854C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F538u); -#endif - /* 0xBFC3753C: 854F0000 lh $t7, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F53Cu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x400u); } - PGXP_LOAD(0x854F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC37540: 318D01FF andi $t5, $t4, 0x1FF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x1FFu; - PGXP_ALU(0x318D01FFu, cpu->gpr[13], _pgx1, 0x01FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC37544: 000D7280 sll $t6, $t5, 10 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 10u; - PGXP_ALU(0x000D7280u, cpu->gpr[14], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC37548: 31F803FF andi $t8, $t7, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x3FFu; - PGXP_ALU(0x31F803FFu, cpu->gpr[24], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004008u); -#endif - /* 0xBFC3754C: 01D81825 or $v1, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D81825u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F54Cu); -#endif -label_BFC37550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC37550: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F550u); -#endif - /* 0xBFC37554: 8F39924C lw $t9, -28084($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F554u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39924Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC37558: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F558u); return; } g_debug_last_store_pc = 0x8004F558u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC3755C: AFAA0030 sw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F55Cu); return; } g_debug_last_store_pc = 0x8004F55Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F560u); -#endif - /* 0xBFC37560: 8F2B0010 lw $t3, 16($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F560u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x2000000u); } - PGXP_LOAD(0x8F2B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37564: 3C010500 lui $at, 0x500 */ - cpu->gpr[1] = 0x05000000u; - PGXP_ALU(0x3C010500u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC37568: 0160F809 jalr $ra, $t3 */ - cpu->gpr[31] = 0x8004F570u; /* jalr link before delay slot */ - psx_delay_BFC37568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC3756C: 00612025 or $a0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] | cpu->gpr[1]; - PGXP_ALU(0x00612025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F56Cu); -#endif - if (psx_delay_BFC37568) { - psx_delay_BFC37568 = 0; - { uint32_t _t = cpu->gpr[11]; - cpu->gpr[31] = 0x8004F570u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F570u); -#endif - /* 0xBFC37570: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F570u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F570u); -#endif - /* 0xBFC37574: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F574u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F574u); -#endif - /* 0xBFC37578: 85470008 lh $a3, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F578u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x400u); } - PGXP_LOAD(0x85470008u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F578u); -#endif - /* 0xBFC3757C: 8546000A lh $a2, 10($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F57Cu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x400u); } - PGXP_LOAD(0x8546000Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC37580: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC37584: 00013880 sll $a3, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[7] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00013880u, cpu->gpr[7], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F584u); -#endif - /* 0xBFC37588: 8542000C lh $v0, 12($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F588u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x400u); } - PGXP_LOAD(0x8542000Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3758C: 00E13821 addu $a3, $a3, $at */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[1]; - PGXP_ALU(0x00E13821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC37590: 00073840 sll $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 1u; - PGXP_ALU(0x00073840u, cpu->gpr[7], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC37594: 24E70260 addiu $a3, $a3, 608 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (608)); - PGXP_ALU(0x24E70260u, cpu->gpr[7], _pgx1, 0x00000260u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37598: 10400003 beq $v0, $zero, 0xBFC375A8 */ - uint32_t psx_brA_BFC37598 = cpu->gpr[2]; uint32_t psx_brB_BFC37598 = cpu->gpr[0]; - psx_taken_BFC37598 = (psx_brA_BFC37598 == psx_brB_BFC37598); - psx_delay_BFC37598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3759C: 24C60010 addiu $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (16)); - PGXP_ALU(0x24C60010u, cpu->gpr[6], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F59Cu); -#endif - if (psx_delay_BFC37598) { - psx_delay_BFC37598 = 0; - if (psx_taken_BFC37598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5A8u); - goto label_BFC375A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5A0u); - } -label_BFC375A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC375A0: 10000002 beq $zero, $zero, 0xBFC375AC */ - uint32_t psx_brA_BFC375A0 = cpu->gpr[0]; uint32_t psx_brB_BFC375A0 = cpu->gpr[0]; - psx_taken_BFC375A0 = (psx_brA_BFC375A0 == psx_brB_BFC375A0); - psx_delay_BFC375A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC375A4: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5A4u); -#endif - if (psx_delay_BFC375A0) { - psx_delay_BFC375A0 = 0; - if (psx_taken_BFC375A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5ACu); - goto label_BFC375AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5A8u); - } -label_BFC375A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC375A8: 24030100 addiu $v1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24030100u, cpu->gpr[3], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5A8u); -#endif -label_BFC375AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC375AC: 00036080 sll $t4, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00036080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5B0u); -#endif - /* 0xBFC375B0: 8542000E lh $v0, 14($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F5B0u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x400u); } - PGXP_LOAD(0x8542000Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC375B4: 01836021 addu $t4, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[12] + cpu->gpr[3]; - PGXP_ALU(0x01836021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC375B8: 000C6040 sll $t4, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6040u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC375BC: 10400003 beq $v0, $zero, 0xBFC375CC */ - uint32_t psx_brA_BFC375BC = cpu->gpr[2]; uint32_t psx_brB_BFC375BC = cpu->gpr[0]; - psx_taken_BFC375BC = (psx_brA_BFC375BC == psx_brB_BFC375BC); - psx_delay_BFC375BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1280u); -#endif - /* 0xBFC375C0: 00EC4821 addu $t1, $a3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[9] = cpu->gpr[7] + cpu->gpr[12]; - PGXP_ALU(0x00EC4821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5C0u); -#endif - if (psx_delay_BFC375BC) { - psx_delay_BFC375BC = 0; - if (psx_taken_BFC375BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5CCu); - goto label_BFC375CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5C4u); - } -label_BFC375C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC375C4: 10000002 beq $zero, $zero, 0xBFC375D0 */ - uint32_t psx_brA_BFC375C4 = cpu->gpr[0]; uint32_t psx_brB_BFC375C4 = cpu->gpr[0]; - psx_taken_BFC375C4 = (psx_brA_BFC375C4 == psx_brB_BFC375C4); - psx_delay_BFC375C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC375C8: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5C8u); -#endif - if (psx_delay_BFC375C4) { - psx_delay_BFC375C4 = 0; - if (psx_taken_BFC375C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5D0u); - goto label_BFC375D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5CCu); - } -label_BFC375CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC375CC: 240300F0 addiu $v1, $zero, 240 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (240)); - PGXP_ALU(0x240300F0u, cpu->gpr[3], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5CCu); -#endif -label_BFC375D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC375D0: 28E101F4 slti $at, $a3, 500 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (500) ? 1 : 0); - PGXP_ALU(0x28E101F4u, cpu->gpr[1], _pgx1, 0x01F4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC375D4: 10200003 beq $at, $zero, 0xBFC375E4 */ - uint32_t psx_brA_BFC375D4 = cpu->gpr[1]; uint32_t psx_brB_BFC375D4 = cpu->gpr[0]; - psx_taken_BFC375D4 = (psx_brA_BFC375D4 == psx_brB_BFC375D4); - psx_delay_BFC375D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x148u); -#endif - /* 0xBFC375D8: 00C34021 addu $t0, $a2, $v1 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[3]; - PGXP_ALU(0x00C34021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5D8u); -#endif - if (psx_delay_BFC375D4) { - psx_delay_BFC375D4 = 0; - if (psx_taken_BFC375D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5E4u); - goto label_BFC375E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5DCu); - } -label_BFC375DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC375DC: 10000008 beq $zero, $zero, 0xBFC37600 */ - uint32_t psx_brA_BFC375DC = cpu->gpr[0]; uint32_t psx_brB_BFC375DC = cpu->gpr[0]; - psx_taken_BFC375DC = (psx_brA_BFC375DC == psx_brB_BFC375DC); - psx_delay_BFC375DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC375E0: 240701F4 addiu $a3, $zero, 500 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (500)); - PGXP_ALU(0x240701F4u, cpu->gpr[7], _pgx1, 0x000001F4u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5E0u); -#endif - if (psx_delay_BFC375DC) { - psx_delay_BFC375DC = 0; - if (psx_taken_BFC375DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F600u); - goto label_BFC37600; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5E4u); - } -label_BFC375E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC375E4: 28E10CDB slti $at, $a3, 3291 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (3291) ? 1 : 0); - PGXP_ALU(0x28E10CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC375E8: 14200004 bne $at, $zero, 0xBFC375FC */ - uint32_t psx_brA_BFC375E8 = cpu->gpr[1]; uint32_t psx_brB_BFC375E8 = cpu->gpr[0]; - psx_taken_BFC375E8 = (psx_brA_BFC375E8 != psx_brB_BFC375E8); - psx_delay_BFC375E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC375EC: 00E01821 addu $v1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5ECu); -#endif - if (psx_delay_BFC375E8) { - psx_delay_BFC375E8 = 0; - if (psx_taken_BFC375E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5FCu); - goto label_BFC375FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5F0u); - } -label_BFC375F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC375F0: 10000002 beq $zero, $zero, 0xBFC375FC */ - uint32_t psx_brA_BFC375F0 = cpu->gpr[0]; uint32_t psx_brB_BFC375F0 = cpu->gpr[0]; - psx_taken_BFC375F0 = (psx_brA_BFC375F0 == psx_brB_BFC375F0); - psx_delay_BFC375F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC375F4: 24030CDA addiu $v1, $zero, 3290 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3290)); - PGXP_ALU(0x24030CDAu, cpu->gpr[3], _pgx1, 0x00000CDAu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5F4u); -#endif - if (psx_delay_BFC375F0) { - psx_delay_BFC375F0 = 0; - if (psx_taken_BFC375F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5FCu); - goto label_BFC375FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F5F8u); - } -label_BFC375F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC375F8: 00E01821 addu $v1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5F8u); -#endif -label_BFC375FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC375FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC375FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC375FC: 00603821 addu $a3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F5FCu); -#endif -label_BFC37600: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37600u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC37600: 24E20050 addiu $v0, $a3, 80 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[7] + (80)); - PGXP_ALU(0x24E20050u, cpu->gpr[2], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x206u); -#endif - /* 0xBFC37604: 0122082A slt $at, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0122082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37608: 10200004 beq $at, $zero, 0xBFC3761C */ - uint32_t psx_brA_BFC37608 = cpu->gpr[1]; uint32_t psx_brB_BFC37608 = cpu->gpr[0]; - psx_taken_BFC37608 = (psx_brA_BFC37608 == psx_brB_BFC37608); - psx_delay_BFC37608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3760C: 29210CDB slti $at, $t1, 3291 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0); - PGXP_ALU(0x29210CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F60Cu); -#endif - if (psx_delay_BFC37608) { - psx_delay_BFC37608 = 0; - if (psx_taken_BFC37608) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F61Cu); - goto label_BFC3761C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F610u); - } -label_BFC37610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37610: 10000008 beq $zero, $zero, 0xBFC37634 */ - uint32_t psx_brA_BFC37610 = cpu->gpr[0]; uint32_t psx_brB_BFC37610 = cpu->gpr[0]; - psx_taken_BFC37610 = (psx_brA_BFC37610 == psx_brB_BFC37610); - psx_delay_BFC37610 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x205u); -#endif - /* 0xBFC37614: 00404821 addu $t1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00404821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F614u); -#endif - if (psx_delay_BFC37610) { - psx_delay_BFC37610 = 0; - if (psx_taken_BFC37610) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F634u); - goto label_BFC37634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F618u); - } -label_BFC37618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC37618: 29210CDB slti $at, $t1, 3291 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (3291) ? 1 : 0); - PGXP_ALU(0x29210CDBu, cpu->gpr[1], _pgx1, 0x0CDBu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F618u); -#endif -label_BFC3761C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3761Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3761Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F61Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3761C: 14200004 bne $at, $zero, 0xBFC37630 */ - uint32_t psx_brA_BFC3761C = cpu->gpr[1]; uint32_t psx_brB_BFC3761C = cpu->gpr[0]; - psx_taken_BFC3761C = (psx_brA_BFC3761C != psx_brB_BFC3761C); - psx_delay_BFC3761C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x209u); -#endif - /* 0xBFC37620: 01201821 addu $v1, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01201821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F620u); -#endif - if (psx_delay_BFC3761C) { - psx_delay_BFC3761C = 0; - if (psx_taken_BFC3761C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F630u); - goto label_BFC37630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F624u); - } -label_BFC37624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37624: 10000002 beq $zero, $zero, 0xBFC37630 */ - uint32_t psx_brA_BFC37624 = cpu->gpr[0]; uint32_t psx_brB_BFC37624 = cpu->gpr[0]; - psx_taken_BFC37624 = (psx_brA_BFC37624 == psx_brB_BFC37624); - psx_delay_BFC37624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37628: 24030CDA addiu $v1, $zero, 3290 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3290)); - PGXP_ALU(0x24030CDAu, cpu->gpr[3], _pgx1, 0x00000CDAu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F628u); -#endif - if (psx_delay_BFC37624) { - psx_delay_BFC37624 = 0; - if (psx_taken_BFC37624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F630u); - goto label_BFC37630; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F62Cu); - } -label_BFC3762C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3762Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3762Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x209u); -#endif - /* 0xBFC3762C: 01201821 addu $v1, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01201821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F62Cu); -#endif -label_BFC37630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x209u); -#endif - /* 0xBFC37630: 00604821 addu $t1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00604821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F630u); -#endif -label_BFC37634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC37634: 04C10004 bgez $a2, 0xBFC37648 */ - uint32_t psx_brA_BFC37634 = cpu->gpr[6]; - psx_taken_BFC37634 = ((int32_t)psx_brA_BFC37634 >= 0); - psx_delay_BFC37634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC37638: 28C10138 slti $at, $a2, 312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0); - PGXP_ALU(0x28C10138u, cpu->gpr[1], _pgx1, 0x0138u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F638u); -#endif - if (psx_delay_BFC37634) { - psx_delay_BFC37634 = 0; - if (psx_taken_BFC37634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F648u); - goto label_BFC37648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F63Cu); - } -label_BFC3763C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3763Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3763Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3763C: 10000008 beq $zero, $zero, 0xBFC37660 */ - uint32_t psx_brA_BFC3763C = cpu->gpr[0]; uint32_t psx_brB_BFC3763C = cpu->gpr[0]; - psx_taken_BFC3763C = (psx_brA_BFC3763C == psx_brB_BFC3763C); - psx_delay_BFC3763C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37640: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F640u); -#endif - if (psx_delay_BFC3763C) { - psx_delay_BFC3763C = 0; - if (psx_taken_BFC3763C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F660u); - goto label_BFC37660; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F644u); - } -label_BFC37644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC37644: 28C10138 slti $at, $a2, 312 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (312) ? 1 : 0); - PGXP_ALU(0x28C10138u, cpu->gpr[1], _pgx1, 0x0138u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F644u); -#endif -label_BFC37648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37648: 14200004 bne $at, $zero, 0xBFC3765C */ - uint32_t psx_brA_BFC37648 = cpu->gpr[1]; uint32_t psx_brB_BFC37648 = cpu->gpr[0]; - psx_taken_BFC37648 = (psx_brA_BFC37648 != psx_brB_BFC37648); - psx_delay_BFC37648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC3764C: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F64Cu); -#endif - if (psx_delay_BFC37648) { - psx_delay_BFC37648 = 0; - if (psx_taken_BFC37648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F65Cu); - goto label_BFC3765C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F650u); - } -label_BFC37650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37650: 10000002 beq $zero, $zero, 0xBFC3765C */ - uint32_t psx_brA_BFC37650 = cpu->gpr[0]; uint32_t psx_brB_BFC37650 = cpu->gpr[0]; - psx_taken_BFC37650 = (psx_brA_BFC37650 == psx_brB_BFC37650); - psx_delay_BFC37650 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37654: 24030137 addiu $v1, $zero, 311 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (311)); - PGXP_ALU(0x24030137u, cpu->gpr[3], _pgx1, 0x00000137u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F654u); -#endif - if (psx_delay_BFC37650) { - psx_delay_BFC37650 = 0; - if (psx_taken_BFC37650) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F65Cu); - goto label_BFC3765C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F658u); - } -label_BFC37658: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37658u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC37658: 00C01821 addu $v1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F658u); -#endif -label_BFC3765C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3765Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3765Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC3765C: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F65Cu); -#endif -label_BFC37660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x142u); -#endif - /* 0xBFC37660: 0106082A slt $at, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0106082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37664: 10200004 beq $at, $zero, 0xBFC37678 */ - uint32_t psx_brA_BFC37664 = cpu->gpr[1]; uint32_t psx_brB_BFC37664 = cpu->gpr[0]; - psx_taken_BFC37664 = (psx_brA_BFC37664 == psx_brB_BFC37664); - psx_delay_BFC37664 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC37668: 29010138 slti $at, $t0, 312 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0); - PGXP_ALU(0x29010138u, cpu->gpr[1], _pgx1, 0x0138u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F668u); -#endif - if (psx_delay_BFC37664) { - psx_delay_BFC37664 = 0; - if (psx_taken_BFC37664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F678u); - goto label_BFC37678; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F66Cu); - } -label_BFC3766C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3766Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3766Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3766C: 10000008 beq $zero, $zero, 0xBFC37690 */ - uint32_t psx_brA_BFC3766C = cpu->gpr[0]; uint32_t psx_brB_BFC3766C = cpu->gpr[0]; - psx_taken_BFC3766C = (psx_brA_BFC3766C == psx_brB_BFC3766C); - psx_delay_BFC3766C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x141u); -#endif - /* 0xBFC37670: 00C04021 addu $t0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F670u); -#endif - if (psx_delay_BFC3766C) { - psx_delay_BFC3766C = 0; - if (psx_taken_BFC3766C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F690u); - goto label_BFC37690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F674u); - } -label_BFC37674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC37674: 29010138 slti $at, $t0, 312 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (312) ? 1 : 0); - PGXP_ALU(0x29010138u, cpu->gpr[1], _pgx1, 0x0138u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F674u); -#endif -label_BFC37678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37678: 14200004 bne $at, $zero, 0xBFC3768C */ - uint32_t psx_brA_BFC37678 = cpu->gpr[1]; uint32_t psx_brB_BFC37678 = cpu->gpr[0]; - psx_taken_BFC37678 = (psx_brA_BFC37678 != psx_brB_BFC37678); - psx_delay_BFC37678 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC3767C: 01001821 addu $v1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F67Cu); -#endif - if (psx_delay_BFC37678) { - psx_delay_BFC37678 = 0; - if (psx_taken_BFC37678) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F68Cu); - goto label_BFC3768C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F680u); - } -label_BFC37680: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37680u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37680: 10000002 beq $zero, $zero, 0xBFC3768C */ - uint32_t psx_brA_BFC37680 = cpu->gpr[0]; uint32_t psx_brB_BFC37680 = cpu->gpr[0]; - psx_taken_BFC37680 = (psx_brA_BFC37680 == psx_brB_BFC37680); - psx_delay_BFC37680 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37684: 24030137 addiu $v1, $zero, 311 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (311)); - PGXP_ALU(0x24030137u, cpu->gpr[3], _pgx1, 0x00000137u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F684u); -#endif - if (psx_delay_BFC37680) { - psx_delay_BFC37680 = 0; - if (psx_taken_BFC37680) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F68Cu); - goto label_BFC3768C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F688u); - } -label_BFC37688: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37688u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC37688: 01001821 addu $v1, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F688u); -#endif -label_BFC3768C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3768Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3768Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x109u); -#endif - /* 0xBFC3768C: 00604021 addu $t0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00604021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F68Cu); -#endif -label_BFC37690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC37690: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F690u); -#endif - /* 0xBFC37694: 8F39924C lw $t9, -28084($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F694u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39924Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2200u); -#endif - /* 0xBFC37698: 312D0FFF andi $t5, $t1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[13] = cpu->gpr[9] & 0xFFFu; - PGXP_ALU(0x312D0FFFu, cpu->gpr[13], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3769C: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F69Cu); return; } g_debug_last_store_pc = 0x8004F69Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F69Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC376A0: AFA60020 sw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6A0u); return; } g_debug_last_store_pc = 0x8004F6A0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC376A4: AFA8001C sw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6A4u); return; } g_debug_last_store_pc = 0x8004F6A4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC376A8: AFAA0030 sw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6A8u); return; } g_debug_last_store_pc = 0x8004F6A8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6A8u); -#endif - /* 0xBFC376AC: 8F2B0010 lw $t3, 16($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6ACu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x2000000u); } - PGXP_LOAD(0x8F2B0010u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA000u); -#endif - /* 0xBFC376B0: 000D7B00 sll $t7, $t5, 12 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[13] << 12u; - PGXP_ALU(0x000D7B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC376B4: 3C010600 lui $at, 0x600 */ - cpu->gpr[1] = 0x06000000u; - PGXP_ALU(0x3C010600u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F6B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC376B8: 01E17025 or $t6, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC376BC: 30F80FFF andi $t8, $a3, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0xFFFu; - PGXP_ALU(0x30F80FFFu, cpu->gpr[24], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000800u); -#endif - /* 0xBFC376C0: 0160F809 jalr $ra, $t3 */ - cpu->gpr[31] = 0x8004F6C8u; /* jalr link before delay slot */ - psx_delay_BFC376C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004010u); -#endif - /* 0xBFC376C4: 01D82025 or $a0, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D82025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6C4u); -#endif - if (psx_delay_BFC376C0) { - psx_delay_BFC376C0 = 0; - { uint32_t _t = cpu->gpr[11]; - cpu->gpr[31] = 0x8004F6C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC376C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC376C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC376C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6C8u); -#endif - /* 0xBFC376C8: 8FA8001C lw $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6C8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC376CC: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6D0u); -#endif - /* 0xBFC376D0: 8F18924C lw $t8, -28084($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6D0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18924Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6D0u); -#endif - /* 0xBFC376D4: 8FA60020 lw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6D4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC376D8: 310C03FF andi $t4, $t0, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[8] & 0x3FFu; - PGXP_ALU(0x310C03FFu, cpu->gpr[12], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6D8u); -#endif - /* 0xBFC376DC: 8F190010 lw $t9, 16($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6DCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC376E0: 000C6A80 sll $t5, $t4, 10 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 10u; - PGXP_ALU(0x000C6A80u, cpu->gpr[13], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC376E4: 3C010700 lui $at, 0x700 */ - cpu->gpr[1] = 0x07000000u; - PGXP_ALU(0x3C010700u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F6E4u); -#endif - /* 0xBFC376E8: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6E8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6E8u); -#endif - /* 0xBFC376EC: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F6ECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA002u); -#endif - /* 0xBFC376F0: 01A17825 or $t7, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[13] | cpu->gpr[1]; - PGXP_ALU(0x01A17825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC376F4: 30CE03FF andi $t6, $a2, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] & 0x3FFu; - PGXP_ALU(0x30CE03FFu, cpu->gpr[14], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC376F8: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x8004F700u; /* jalr link before delay slot */ - psx_delay_BFC376F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC376FC: 01EE2025 or $a0, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[15] | cpu->gpr[14]; - PGXP_ALU(0x01EE2025u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F6FCu); -#endif - if (psx_delay_BFC376F8) { - psx_delay_BFC376F8 = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x8004F700u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F700u); -#endif - /* 0xBFC37700: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F700u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F700u); -#endif - /* 0xBFC37704: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F704u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F704u); -#endif - /* 0xBFC37708: 91430012 lbu $v1, 18($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 18; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (18)), 3, 0x400u); - PGXP_LOAD(0x91430012u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3770C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC37710: 14610003 bne $v1, $at, 0xBFC37720 */ - uint32_t psx_brA_BFC37710 = cpu->gpr[3]; uint32_t psx_brB_BFC37710 = cpu->gpr[1]; - psx_taken_BFC37710 = (psx_brA_BFC37710 != psx_brB_BFC37710); - psx_delay_BFC37710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F714u); -#endif - if (psx_delay_BFC37710) { - psx_delay_BFC37710 = 0; - if (psx_taken_BFC37710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F720u); - goto label_BFC37720; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F718u); - } -label_BFC37718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37718: 3C050800 lui $a1, 0x800 */ - cpu->gpr[5] = 0x08000000u; - PGXP_ALU(0x3C050800u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3771C: 34A50008 ori $a1, $a1, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x8u; - PGXP_ALU(0x34A50008u, cpu->gpr[5], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F71Cu); -#endif -label_BFC37720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F720u); -#endif - /* 0xBFC37720: 914B0011 lbu $t3, 17($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 17; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (17)), 11, 0x400u); - PGXP_LOAD(0x914B0011u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37724: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC37728: 11600002 beq $t3, $zero, 0xBFC37734 */ - uint32_t psx_brA_BFC37728 = cpu->gpr[11]; uint32_t psx_brB_BFC37728 = cpu->gpr[0]; - psx_taken_BFC37728 = (psx_brA_BFC37728 == psx_brB_BFC37728); - psx_delay_BFC37728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3772C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F72Cu); -#endif - if (psx_delay_BFC37728) { - psx_delay_BFC37728 = 0; - if (psx_taken_BFC37728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F734u); - goto label_BFC37734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F730u); - } -label_BFC37730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37730: 34A50010 ori $a1, $a1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x10u; - PGXP_ALU(0x34A50010u, cpu->gpr[5], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F730u); -#endif -label_BFC37734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F734u); -#endif - /* 0xBFC37734: 914C0010 lbu $t4, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (16)), 12, 0x400u); - PGXP_LOAD(0x914C0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37738: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3773C: 11800002 beq $t4, $zero, 0xBFC37748 */ - uint32_t psx_brA_BFC3773C = cpu->gpr[12]; uint32_t psx_brB_BFC3773C = cpu->gpr[0]; - psx_taken_BFC3773C = (psx_brA_BFC3773C == psx_brB_BFC3773C); - psx_delay_BFC3773C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F740u); -#endif - if (psx_delay_BFC3773C) { - psx_delay_BFC3773C = 0; - if (psx_taken_BFC3773C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F748u); - goto label_BFC37748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F744u); - } -label_BFC37744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37744: 34A50020 ori $a1, $a1, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x20u; - PGXP_ALU(0x34A50020u, cpu->gpr[5], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F744u); -#endif -label_BFC37748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC37748: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F748u); -#endif - /* 0xBFC3774C: 8DAD9258 lw $t5, -28072($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F74Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9258u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37750: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC37754: 11A00002 beq $t5, $zero, 0xBFC37760 */ - uint32_t psx_brA_BFC37754 = cpu->gpr[13]; uint32_t psx_brB_BFC37754 = cpu->gpr[0]; - psx_taken_BFC37754 = (psx_brA_BFC37754 == psx_brB_BFC37754); - psx_delay_BFC37754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37758: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F758u); -#endif - if (psx_delay_BFC37754) { - psx_delay_BFC37754 = 0; - if (psx_taken_BFC37754) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F760u); - goto label_BFC37760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F75Cu); - } -label_BFC3775C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3775Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3775C: 34A50080 ori $a1, $a1, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x80u; - PGXP_ALU(0x34A50080u, cpu->gpr[5], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F75Cu); -#endif -label_BFC37760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F760u); -#endif - /* 0xBFC37760: 85420004 lh $v0, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F760u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x400u); } - PGXP_LOAD(0x85420004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37764: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC37768: 28410119 slti $at, $v0, 281 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (281) ? 1 : 0); - PGXP_ALU(0x28410119u, cpu->gpr[1], _pgx1, 0x0119u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3776C: 10200004 beq $at, $zero, 0xBFC37780 */ - uint32_t psx_brA_BFC3776C = cpu->gpr[1]; uint32_t psx_brB_BFC3776C = cpu->gpr[0]; - psx_taken_BFC3776C = (psx_brA_BFC3776C == psx_brB_BFC3776C); - psx_delay_BFC3776C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC37770: 28410161 slti $at, $v0, 353 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0); - PGXP_ALU(0x28410161u, cpu->gpr[1], _pgx1, 0x0161u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F770u); -#endif - if (psx_delay_BFC3776C) { - psx_delay_BFC3776C = 0; - if (psx_taken_BFC3776C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F780u); - goto label_BFC37780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F774u); - } -label_BFC37774: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37774u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37774: 10000011 beq $zero, $zero, 0xBFC377BC */ - uint32_t psx_brA_BFC37774 = cpu->gpr[0]; uint32_t psx_brB_BFC37774 = cpu->gpr[0]; - psx_taken_BFC37774 = (psx_brA_BFC37774 == psx_brB_BFC37774); - psx_delay_BFC37774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F778u); -#endif - if (psx_delay_BFC37774) { - psx_delay_BFC37774 = 0; - if (psx_taken_BFC37774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7BCu); - goto label_BFC377BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F77Cu); - } -label_BFC3777C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3777Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3777C: 28410161 slti $at, $v0, 353 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (353) ? 1 : 0); - PGXP_ALU(0x28410161u, cpu->gpr[1], _pgx1, 0x0161u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F77Cu); -#endif -label_BFC37780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37780: 10200004 beq $at, $zero, 0xBFC37794 */ - uint32_t psx_brA_BFC37780 = cpu->gpr[1]; uint32_t psx_brB_BFC37780 = cpu->gpr[0]; - psx_taken_BFC37780 = (psx_brA_BFC37780 == psx_brB_BFC37780); - psx_delay_BFC37780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC37784: 28410191 slti $at, $v0, 401 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0); - PGXP_ALU(0x28410191u, cpu->gpr[1], _pgx1, 0x0191u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F784u); -#endif - if (psx_delay_BFC37780) { - psx_delay_BFC37780 = 0; - if (psx_taken_BFC37780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F794u); - goto label_BFC37794; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F788u); - } -label_BFC37788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37788: 1000000C beq $zero, $zero, 0xBFC377BC */ - uint32_t psx_brA_BFC37788 = cpu->gpr[0]; uint32_t psx_brB_BFC37788 = cpu->gpr[0]; - psx_taken_BFC37788 = (psx_brA_BFC37788 == psx_brB_BFC37788); - psx_delay_BFC37788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3778C: 34A50001 ori $a1, $a1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x1u; - PGXP_ALU(0x34A50001u, cpu->gpr[5], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F78Cu); -#endif - if (psx_delay_BFC37788) { - psx_delay_BFC37788 = 0; - if (psx_taken_BFC37788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7BCu); - goto label_BFC377BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F790u); - } -label_BFC37790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC37790: 28410191 slti $at, $v0, 401 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (401) ? 1 : 0); - PGXP_ALU(0x28410191u, cpu->gpr[1], _pgx1, 0x0191u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F790u); -#endif -label_BFC37794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37794: 10200004 beq $at, $zero, 0xBFC377A8 */ - uint32_t psx_brA_BFC37794 = cpu->gpr[1]; uint32_t psx_brB_BFC37794 = cpu->gpr[0]; - psx_taken_BFC37794 = (psx_brA_BFC37794 == psx_brB_BFC37794); - psx_delay_BFC37794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC37798: 28410231 slti $at, $v0, 561 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0); - PGXP_ALU(0x28410231u, cpu->gpr[1], _pgx1, 0x0231u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F798u); -#endif - if (psx_delay_BFC37794) { - psx_delay_BFC37794 = 0; - if (psx_taken_BFC37794) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7A8u); - goto label_BFC377A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F79Cu); - } -label_BFC3779C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3779Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3779C: 10000007 beq $zero, $zero, 0xBFC377BC */ - uint32_t psx_brA_BFC3779C = cpu->gpr[0]; uint32_t psx_brB_BFC3779C = cpu->gpr[0]; - psx_taken_BFC3779C = (psx_brA_BFC3779C == psx_brB_BFC3779C); - psx_delay_BFC3779C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC377A0: 34A50040 ori $a1, $a1, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x40u; - PGXP_ALU(0x34A50040u, cpu->gpr[5], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7A0u); -#endif - if (psx_delay_BFC3779C) { - psx_delay_BFC3779C = 0; - if (psx_taken_BFC3779C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7BCu); - goto label_BFC377BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7A4u); - } -label_BFC377A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC377A4: 28410231 slti $at, $v0, 561 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (561) ? 1 : 0); - PGXP_ALU(0x28410231u, cpu->gpr[1], _pgx1, 0x0231u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7A4u); -#endif -label_BFC377A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC377A8: 10200003 beq $at, $zero, 0xBFC377B8 */ - uint32_t psx_brA_BFC377A8 = cpu->gpr[1]; uint32_t psx_brB_BFC377A8 = cpu->gpr[0]; - psx_taken_BFC377A8 = (psx_brA_BFC377A8 == psx_brB_BFC377A8); - psx_delay_BFC377A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F7ACu); -#endif - if (psx_delay_BFC377A8) { - psx_delay_BFC377A8 = 0; - if (psx_taken_BFC377A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7B8u); - goto label_BFC377B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7B0u); - } -label_BFC377B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377B0: 10000002 beq $zero, $zero, 0xBFC377BC */ - uint32_t psx_brA_BFC377B0 = cpu->gpr[0]; uint32_t psx_brB_BFC377B0 = cpu->gpr[0]; - psx_taken_BFC377B0 = (psx_brA_BFC377B0 == psx_brB_BFC377B0); - psx_delay_BFC377B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC377B4: 34A50002 ori $a1, $a1, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x2u; - PGXP_ALU(0x34A50002u, cpu->gpr[5], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7B4u); -#endif - if (psx_delay_BFC377B0) { - psx_delay_BFC377B0 = 0; - if (psx_taken_BFC377B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7BCu); - goto label_BFC377BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7B8u); - } -label_BFC377B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC377B8: 34A50003 ori $a1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x3u; - PGXP_ALU(0x34A50003u, cpu->gpr[5], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7B8u); -#endif -label_BFC377BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC377BC: 10600004 beq $v1, $zero, 0xBFC377D0 */ - uint32_t psx_brA_BFC377BC = cpu->gpr[3]; uint32_t psx_brB_BFC377BC = cpu->gpr[0]; - psx_taken_BFC377BC = (psx_brA_BFC377BC == psx_brB_BFC377BC); - psx_delay_BFC377BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC377C0: 24030100 addiu $v1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24030100u, cpu->gpr[3], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7C0u); -#endif - if (psx_delay_BFC377BC) { - psx_delay_BFC377BC = 0; - if (psx_taken_BFC377BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7D0u); - goto label_BFC377D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7C4u); - } -label_BFC377C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377C4: 10000002 beq $zero, $zero, 0xBFC377D0 */ - uint32_t psx_brA_BFC377C4 = cpu->gpr[0]; uint32_t psx_brB_BFC377C4 = cpu->gpr[0]; - psx_taken_BFC377C4 = (psx_brA_BFC377C4 == psx_brB_BFC377C4); - psx_delay_BFC377C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC377C8: 24030120 addiu $v1, $zero, 288 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (288)); - PGXP_ALU(0x24030120u, cpu->gpr[3], _pgx1, 0x00000120u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7C8u); -#endif - if (psx_delay_BFC377C4) { - psx_delay_BFC377C4 = 0; - if (psx_taken_BFC377C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7D0u); - goto label_BFC377D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7CCu); - } -label_BFC377CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC377CC: 24030100 addiu $v1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24030100u, cpu->gpr[3], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7CCu); -#endif -label_BFC377D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7D0u); -#endif - /* 0xBFC377D0: 854F0006 lh $t7, 6($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F7D0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x400u); } - PGXP_LOAD(0x854F0006u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F7D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Au); -#endif - /* 0xBFC377D8: 006F082A slt $at, $v1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x006F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC377DC: 14200003 bne $at, $zero, 0xBFC377EC */ - uint32_t psx_brA_BFC377DC = cpu->gpr[1]; uint32_t psx_brB_BFC377DC = cpu->gpr[0]; - psx_taken_BFC377DC = (psx_brA_BFC377DC != psx_brB_BFC377DC); - psx_delay_BFC377DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F7E0u); -#endif - if (psx_delay_BFC377DC) { - psx_delay_BFC377DC = 0; - if (psx_taken_BFC377DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7ECu); - goto label_BFC377EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7E4u); - } -label_BFC377E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377E4: 10000002 beq $zero, $zero, 0xBFC377F0 */ - uint32_t psx_brA_BFC377E4 = cpu->gpr[0]; uint32_t psx_brB_BFC377E4 = cpu->gpr[0]; - psx_taken_BFC377E4 = (psx_brA_BFC377E4 == psx_brB_BFC377E4); - psx_delay_BFC377E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC377E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F7E8u); -#endif - if (psx_delay_BFC377E4) { - psx_delay_BFC377E4 = 0; - if (psx_taken_BFC377E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7F0u); - goto label_BFC377F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F7ECu); - } -label_BFC377EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC377EC: 34A50024 ori $a1, $a1, 0x24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x24u; - PGXP_ALU(0x34A50024u, cpu->gpr[5], _pgx1, 0x0024u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7ECu); -#endif -label_BFC377F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC377F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC377F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC377F0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F7F0u); -#endif - /* 0xBFC377F4: 8DCE924C lw $t6, -28084($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F7F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE924Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC377F8: AFAA0030 sw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F7F8u); return; } g_debug_last_store_pc = 0x8004F7F8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAFAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7F8u); -#endif - /* 0xBFC377FC: 8DD80010 lw $t8, 16($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F7FCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4000u); } - PGXP_LOAD(0x8DD80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC37800: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC37804: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x8004F80Cu; /* jalr link before delay slot */ - psx_delay_BFC37804 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37808: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F808u); -#endif - if (psx_delay_BFC37804) { - psx_delay_BFC37804 = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x8004F80Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3780C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3780Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3780Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F80Cu); -#endif - /* 0xBFC3780C: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F80Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37810: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37814: 2484DE80 addiu $a0, $a0, -8576 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-8576)); - PGXP_ALU(0x2484DE80u, cpu->gpr[4], _pgx1, 0xFFFFDE80u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37818: 24060014 addiu $a2, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24060014u, cpu->gpr[6], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3781C: 0C0144F3 jal 0xB00513CC */ - cpu->gpr[31] = 0x8004F824u; /* jal link before delay slot */ - psx_delay_BFC3781C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x421u); -#endif - /* 0xBFC37820: 01402821 addu $a1, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F820u); -#endif - if (psx_delay_BFC3781C) { - psx_delay_BFC3781C = 0; - cpu->gpr[31] = 0x8004F824u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513CCu); - cpu->pc = 0x800513CCu; return; - } -label_BFC37824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F824u); -#endif - /* 0xBFC37824: 8FAA0030 lw $t2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F824u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0030u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F824u); -#endif - /* 0xBFC37828: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F828u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3782C: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37830: 03E00008 jr $ra */ - psx_delay_BFC37830 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x405u); -#endif - /* 0xBFC37834: 01401021 addu $v0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F834u); -#endif - if (psx_delay_BFC37830) { - psx_delay_BFC37830 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37838(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37838u); - int psx_delay_BFC37850 = 0; - int psx_delay_BFC37860 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37858u: goto label_BFC37858; - default: break; - } - } -label_BFC37838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37838: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3783C: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F83Cu); return; } g_debug_last_store_pc = 0x8004F83Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37840: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F840u); return; } g_debug_last_store_pc = 0x8004F840u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F840u); -#endif - /* 0xBFC37844: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F844u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37848: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3784C: 24A5DE80 addiu $a1, $a1, -8576 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-8576)); - PGXP_ALU(0x24A5DE80u, cpu->gpr[5], _pgx1, 0xFFFFDE80u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37850: 0C0144F3 jal 0xB00513CC */ - cpu->gpr[31] = 0x8004F858u; /* jal link before delay slot */ - psx_delay_BFC37850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC37854: 24060014 addiu $a2, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24060014u, cpu->gpr[6], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F854u); -#endif - if (psx_delay_BFC37850) { - psx_delay_BFC37850 = 0; - cpu->gpr[31] = 0x8004F858u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513CCu); - cpu->pc = 0x800513CCu; return; - } -label_BFC37858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F858u); -#endif - /* 0xBFC37858: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F858u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F858u); -#endif - /* 0xBFC3785C: 8FA20020 lw $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F85Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37860: 03E00008 jr $ra */ - psx_delay_BFC37860 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37864: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F864u); -#endif - if (psx_delay_BFC37860) { - psx_delay_BFC37860 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37868(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37868u); - int psx_delay_BFC37880 = 0; - int psx_delay_BFC37890 = 0; - int psx_taken_BFC37890 = 0; - int psx_delay_BFC37898 = 0; - int psx_taken_BFC37898 = 0; - int psx_delay_BFC378AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37888u: goto label_BFC37888; - case 0xBFC37898u: goto label_BFC37898; - case 0xBFC378A0u: goto label_BFC378A0; - case 0xBFC378A4u: goto label_BFC378A4; - default: break; - } - } -label_BFC37868: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37868u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37868: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F868u); -#endif - /* 0xBFC3786C: 8DCE924C lw $t6, -28084($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28084; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28084)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F86Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE924Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37870: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37874: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F874u); return; } g_debug_last_store_pc = 0x8004F874u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F874u); -#endif - /* 0xBFC37878: 8DCF0038 lw $t7, 56($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F878u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0038u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3787C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC37880: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8004F888u; /* jalr link before delay slot */ - psx_delay_BFC37880 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37884: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F884u); -#endif - if (psx_delay_BFC37880) { - psx_delay_BFC37880 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8004F888u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC37888: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37888u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37888: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3788C: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC37890: 13000004 beq $t8, $zero, 0xBFC378A4 */ - uint32_t psx_brA_BFC37890 = cpu->gpr[24]; uint32_t psx_brB_BFC37890 = cpu->gpr[0]; - psx_taken_BFC37890 = (psx_brA_BFC37890 == psx_brB_BFC37890); - psx_delay_BFC37890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37894: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F894u); -#endif - if (psx_delay_BFC37890) { - psx_delay_BFC37890 = 0; - if (psx_taken_BFC37890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F8A4u); - goto label_BFC378A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F898u); - } -label_BFC37898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37898: 10000002 beq $zero, $zero, 0xBFC378A4 */ - uint32_t psx_brA_BFC37898 = cpu->gpr[0]; uint32_t psx_brB_BFC37898 = cpu->gpr[0]; - psx_taken_BFC37898 = (psx_brA_BFC37898 == psx_brB_BFC37898); - psx_delay_BFC37898 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3789C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F89Cu); -#endif - if (psx_delay_BFC37898) { - psx_delay_BFC37898 = 0; - if (psx_taken_BFC37898) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F8A4u); - goto label_BFC378A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F8A0u); - } -label_BFC378A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC378A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC378A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC378A0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8A0u); -#endif -label_BFC378A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC378A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC378A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8A4u); -#endif - /* 0xBFC378A4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC378A8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC378AC: 03E00008 jr $ra */ - psx_delay_BFC378AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC378B0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8B0u); -#endif - if (psx_delay_BFC378AC) { - psx_delay_BFC378AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC378B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC378B4u); - int psx_delay_BFC378E0 = 0; - int psx_delay_BFC37900 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC378E8u: goto label_BFC378E8; - default: break; - } - } -label_BFC378B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC378B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC378B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC378B4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC378B8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8B8u); return; } g_debug_last_store_pc = 0x8004F8B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC378BC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8C0u); -#endif - /* 0xBFC378C0: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8C0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC378C4: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F8C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC378C8: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC378CC: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC378D0: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC378D4: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC378D8: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8D8u); return; } g_debug_last_store_pc = 0x8004F8D8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC378DC: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8DCu); return; } g_debug_last_store_pc = 0x8004F8DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC378E0: 0C014024 jal 0xB0050090 */ - cpu->gpr[31] = 0x8004F8E8u; /* jal link before delay slot */ - psx_delay_BFC378E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC378E4: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8E4u); -#endif - if (psx_delay_BFC378E0) { - psx_delay_BFC378E0 = 0; - cpu->gpr[31] = 0x8004F8E8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050090u); - cpu->pc = 0x80050090u; return; - } -label_BFC378E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC378E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC378E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8E8u); -#endif - /* 0xBFC378E8: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC378EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F8ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC378F0: AC620004 sw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8F0u); return; } g_debug_last_store_pc = 0x8004F8F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC378F4: AC600008 sw $zero, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8F4u); return; } g_debug_last_store_pc = 0x8004F8F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8F4u); -#endif - /* 0xBFC378F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F8F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC378FC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37900: 03E00008 jr $ra */ - psx_delay_BFC37900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F904u); -#endif - if (psx_delay_BFC37900) { - psx_delay_BFC37900 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37908(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37908u); - int psx_delay_BFC37940 = 0; - int psx_delay_BFC37974 = 0; - int psx_delay_BFC37990 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37948u: goto label_BFC37948; - case 0xBFC3797Cu: goto label_BFC3797C; - default: break; - } - } -label_BFC37908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37908: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3790C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F90Cu); return; } g_debug_last_store_pc = 0x8004F90Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F90Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC37910: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F910u); -#endif - /* 0xBFC37914: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F914u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37918: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3791C: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC37920: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37924: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC37928: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC3792C: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC37930: ACD80000 sw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F930u); return; } g_debug_last_store_pc = 0x8004F930u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F930u); -#endif - /* 0xBFC37934: 84650002 lh $a1, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F934u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x84650002u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F934u); -#endif - /* 0xBFC37938: 84640000 lh $a0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F938u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } - PGXP_LOAD(0x84640000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3793C: AFA60020 sw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F93Cu); return; } g_debug_last_store_pc = 0x8004F93Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37940: 0C013F98 jal 0xB004FE60 */ - cpu->gpr[31] = 0x8004F948u; /* jal link before delay slot */ - psx_delay_BFC37940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC37944: AFA30024 sw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F944u); return; } g_debug_last_store_pc = 0x8004F944u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F944u); -#endif - if (psx_delay_BFC37940) { - psx_delay_BFC37940 = 0; - cpu->gpr[31] = 0x8004F948u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE60u); - cpu->pc = 0x8004FE60u; return; - } -label_BFC37948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F948u); -#endif - /* 0xBFC37948: 8FA30024 lw $v1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F948u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30024u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F948u); -#endif - /* 0xBFC3794C: 8FB90020 lw $t9, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F94Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC37954: AF220004 sw $v0, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F954u); return; } g_debug_last_store_pc = 0x8004F954u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAF220004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F954u); -#endif - /* 0xBFC37958: 846B0006 lh $t3, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F958u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x846B0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F958u); -#endif - /* 0xBFC3795C: 846A0002 lh $t2, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F95Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x846A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F960u); -#endif - /* 0xBFC37960: 84690004 lh $t1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F960u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x8u); } - PGXP_LOAD(0x84690004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F960u); -#endif - /* 0xBFC37964: 84680000 lh $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F964u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x84680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC37968: 014B2821 addu $a1, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC3796C: 01092021 addu $a0, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F96Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37970: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37974: 0C013FD3 jal 0xB004FF4C */ - cpu->gpr[31] = 0x8004F97Cu; /* jal link before delay slot */ - psx_delay_BFC37974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37978: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F978u); -#endif - if (psx_delay_BFC37974) { - psx_delay_BFC37974 = 0; - cpu->gpr[31] = 0x8004F97Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF4Cu); - cpu->pc = 0x8004FF4Cu; return; - } -label_BFC3797C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3797Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3797Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F97Cu); -#endif - /* 0xBFC3797C: 8FAC0020 lw $t4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F97Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0020u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F97Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37980: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC37984: AD820008 sw $v0, 8($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F984u); return; } g_debug_last_store_pc = 0x8004F984u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD820008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F984u); -#endif - /* 0xBFC37988: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F988u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3798C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37990: 03E00008 jr $ra */ - psx_delay_BFC37990 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37994: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F994u); -#endif - if (psx_delay_BFC37990) { - psx_delay_BFC37990 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37998(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37998u); - int psx_delay_BFC379CC = 0; - int psx_delay_BFC379EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC379D4u: goto label_BFC379D4; - default: break; - } - } -label_BFC37998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37998: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3799C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F99Cu); return; } g_debug_last_store_pc = 0x8004F99Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC379A0: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9A0u); -#endif - /* 0xBFC379A4: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9A4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC379A8: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F9A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC379AC: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC379B0: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC379B4: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004F9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC379B8: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC379BC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC379C0: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9C0u); return; } g_debug_last_store_pc = 0x8004F9C0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9C0u); -#endif - /* 0xBFC379C4: 84C50002 lh $a1, 2($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9C4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x40u); } - PGXP_LOAD(0x84C50002u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9C4u); -#endif - /* 0xBFC379C8: 84C40000 lh $a0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9C8u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x40u); } - PGXP_LOAD(0x84C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC379CC: 0C01400E jal 0xB0050038 */ - cpu->gpr[31] = 0x8004F9D4u; /* jal link before delay slot */ - psx_delay_BFC379CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC379D0: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9D0u); return; } g_debug_last_store_pc = 0x8004F9D0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9D0u); -#endif - if (psx_delay_BFC379CC) { - psx_delay_BFC379CC = 0; - cpu->gpr[31] = 0x8004F9D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050038u); - cpu->pc = 0x80050038u; return; - } -label_BFC379D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC379D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC379D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9D4u); -#endif - /* 0xBFC379D4: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC379D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F9D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC379DC: AC620004 sw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9DCu); return; } g_debug_last_store_pc = 0x8004F9DCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC379E0: AC600008 sw $zero, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9E0u); return; } g_debug_last_store_pc = 0x8004F9E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9E0u); -#endif - /* 0xBFC379E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004F9E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC379E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8004F9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC379EC: 03E00008 jr $ra */ - psx_delay_BFC379EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004F9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC379F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004F9F0u); -#endif - if (psx_delay_BFC379EC) { - psx_delay_BFC379EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37A4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37A4Cu); - int psx_delay_BFC37A88 = 0; - int psx_delay_BFC37AA0 = 0; - int psx_delay_BFC37ABC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37A90u: goto label_BFC37A90; - case 0xBFC37AA8u: goto label_BFC37AA8; - default: break; - } - } -label_BFC37A4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37A4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37A4C: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37A50: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA50u); return; } g_debug_last_store_pc = 0x8004FA50u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC37A54: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA54u); -#endif - /* 0xBFC37A58: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA58u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37A5C: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37A60: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC37A64: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37A68: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FA68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC37A6C: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC37A70: 00A04021 addu $t0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC37A74: 00C04821 addu $t1, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC37A78: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA78u); return; } g_debug_last_store_pc = 0x8004FA78u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC37A7C: AFA30020 sw $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA7Cu); return; } g_debug_last_store_pc = 0x8004FA7Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC37A80: 01202821 addu $a1, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC37A84: 30E6FFFF andi $a2, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[6] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30E6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37A88: 0C013F72 jal 0xB004FDC8 */ - cpu->gpr[31] = 0x8004FA90u; /* jal link before delay slot */ - psx_delay_BFC37A88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC37A8C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA8Cu); -#endif - if (psx_delay_BFC37A88) { - psx_delay_BFC37A88 = 0; - cpu->gpr[31] = 0x8004FA90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDC8u); - cpu->pc = 0x8004FDC8u; return; - } -label_BFC37A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FA90u); -#endif - /* 0xBFC37A90: 8FB90020 lw $t9, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA90u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90020u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37A94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC37A98: AF220004 sw $v0, 4($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA98u); return; } g_debug_last_store_pc = 0x8004FA98u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAF220004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA98u); -#endif - /* 0xBFC37A9C: 8FA40030 lw $a0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FA9Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40030u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37AA0: 0C014024 jal 0xB0050090 */ - cpu->gpr[31] = 0x8004FAA8u; /* jal link before delay slot */ - psx_delay_BFC37AA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37AA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FAA4u); -#endif - if (psx_delay_BFC37AA0) { - psx_delay_BFC37AA0 = 0; - cpu->gpr[31] = 0x8004FAA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050090u); - cpu->pc = 0x80050090u; return; - } -label_BFC37AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAA8u); -#endif - /* 0xBFC37AA8: 8FAA0020 lw $t2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAA8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0020u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37AAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC37AB0: AD420008 sw $v0, 8($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAB0u); return; } g_debug_last_store_pc = 0x8004FAB0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD420008u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAB0u); -#endif - /* 0xBFC37AB4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37AB8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37ABC: 03E00008 jr $ra */ - psx_delay_BFC37ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37AC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FAC0u); -#endif - if (psx_delay_BFC37ABC) { - psx_delay_BFC37ABC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37AC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37AC4u); - int psx_delay_BFC37AE8 = 0; - int psx_delay_BFC37B14 = 0; - int psx_delay_BFC37B38 = 0; - int psx_delay_BFC37B5C = 0; - int psx_delay_BFC37B78 = 0; - int psx_delay_BFC37BA0 = 0; - int psx_taken_BFC37BA0 = 0; - int psx_delay_BFC37BD8 = 0; - int psx_taken_BFC37BD8 = 0; - int psx_delay_BFC37BE0 = 0; - int psx_taken_BFC37BE0 = 0; - int psx_delay_BFC37BF4 = 0; - int psx_taken_BFC37BF4 = 0; - int psx_delay_BFC37BFC = 0; - int psx_taken_BFC37BFC = 0; - int psx_delay_BFC37C18 = 0; - int psx_taken_BFC37C18 = 0; - int psx_delay_BFC37C20 = 0; - int psx_taken_BFC37C20 = 0; - int psx_delay_BFC37C34 = 0; - int psx_taken_BFC37C34 = 0; - int psx_delay_BFC37C3C = 0; - int psx_taken_BFC37C3C = 0; - int psx_delay_BFC37C54 = 0; - int psx_taken_BFC37C54 = 0; - int psx_delay_BFC37C5C = 0; - int psx_taken_BFC37C5C = 0; - int psx_delay_BFC37C64 = 0; - int psx_taken_BFC37C64 = 0; - int psx_delay_BFC37C70 = 0; - int psx_taken_BFC37C70 = 0; - int psx_delay_BFC37C90 = 0; - int psx_taken_BFC37C90 = 0; - int psx_delay_BFC37CA4 = 0; - int psx_taken_BFC37CA4 = 0; - int psx_delay_BFC37D38 = 0; - int psx_taken_BFC37D38 = 0; - int psx_delay_BFC37DC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37AF0u: goto label_BFC37AF0; - case 0xBFC37B1Cu: goto label_BFC37B1C; - case 0xBFC37B40u: goto label_BFC37B40; - case 0xBFC37B64u: goto label_BFC37B64; - case 0xBFC37B80u: goto label_BFC37B80; - case 0xBFC37BA8u: goto label_BFC37BA8; - case 0xBFC37BE0u: goto label_BFC37BE0; - case 0xBFC37BE8u: goto label_BFC37BE8; - case 0xBFC37BECu: goto label_BFC37BEC; - case 0xBFC37BFCu: goto label_BFC37BFC; - case 0xBFC37C04u: goto label_BFC37C04; - case 0xBFC37C08u: goto label_BFC37C08; - case 0xBFC37C0Cu: goto label_BFC37C0C; - case 0xBFC37C10u: goto label_BFC37C10; - case 0xBFC37C20u: goto label_BFC37C20; - case 0xBFC37C28u: goto label_BFC37C28; - case 0xBFC37C3Cu: goto label_BFC37C3C; - case 0xBFC37C44u: goto label_BFC37C44; - case 0xBFC37C48u: goto label_BFC37C48; - case 0xBFC37C5Cu: goto label_BFC37C5C; - case 0xBFC37C64u: goto label_BFC37C64; - case 0xBFC37C6Cu: goto label_BFC37C6C; - case 0xBFC37C70u: goto label_BFC37C70; - case 0xBFC37C78u: goto label_BFC37C78; - case 0xBFC37C80u: goto label_BFC37C80; - case 0xBFC37C84u: goto label_BFC37C84; - case 0xBFC37C98u: goto label_BFC37C98; - case 0xBFC37CACu: goto label_BFC37CAC; - case 0xBFC37CB0u: goto label_BFC37CB0; - case 0xBFC37D40u: goto label_BFC37D40; - case 0xBFC37D90u: goto label_BFC37D90; - default: break; - } - } -label_BFC37AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37AC4: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC37AC8: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAC8u); return; } g_debug_last_store_pc = 0x8004FAC8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC37ACC: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FACCu); return; } g_debug_last_store_pc = 0x8004FACCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC37AD0: 00A08021 addu $s0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC37AD4: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAD4u); return; } g_debug_last_store_pc = 0x8004FAD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC37AD8: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAD8u); return; } g_debug_last_store_pc = 0x8004FAD8u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC37ADC: 00809021 addu $s2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00809021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAE0u); -#endif - /* 0xBFC37AE0: 86040000 lh $a0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAE0u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x86040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAE0u); -#endif - /* 0xBFC37AE4: 86050002 lh $a1, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAE4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x86050002u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37AE8: 0C013F98 jal 0xB004FE60 */ - cpu->gpr[31] = 0x8004FAF0u; /* jal link before delay slot */ - psx_delay_BFC37AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37AEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FAECu); -#endif - if (psx_delay_BFC37AE8) { - psx_delay_BFC37AE8 = 0; - cpu->gpr[31] = 0x8004FAF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE60u); - cpu->pc = 0x8004FE60u; return; - } -label_BFC37AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC37AF0: AE420004 sw $v0, 4($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAF0u); return; } g_debug_last_store_pc = 0x8004FAF0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAE420004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAF0u); -#endif - /* 0xBFC37AF4: 86190006 lh $t9, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAF4u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x86190006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAF4u); -#endif - /* 0xBFC37AF8: 86180002 lh $t8, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAF8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x86180002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAF8u); -#endif - /* 0xBFC37AFC: 860F0000 lh $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FAFCu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x860F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB00u); -#endif - /* 0xBFC37B00: 860E0004 lh $t6, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB00u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC37B04: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC37B08: 01CF2021 addu $a0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC37B0C: 24110002 addiu $s1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24110002u, cpu->gpr[17], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37B10: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37B14: 0C013FD3 jal 0xB004FF4C */ - cpu->gpr[31] = 0x8004FB1Cu; /* jal link before delay slot */ - psx_delay_BFC37B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37B18: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB18u); -#endif - if (psx_delay_BFC37B14) { - psx_delay_BFC37B14 = 0; - cpu->gpr[31] = 0x8004FB1Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF4Cu); - cpu->pc = 0x8004FF4Cu; return; - } -label_BFC37B1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37B1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC37B1C: 00114080 sll $t0, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40108u); -#endif - /* 0xBFC37B20: 02481821 addu $v1, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[18] + cpu->gpr[8]; - PGXP_ALU(0x02481821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC37B24: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB24u); return; } g_debug_last_store_pc = 0x8004FB24u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37B28: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB28u); -#endif - /* 0xBFC37B2C: 8605000A lh $a1, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB2Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8605000Au, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB30u); -#endif - /* 0xBFC37B30: 86040008 lh $a0, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB30u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10000u); } - PGXP_LOAD(0x86040008u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37B34: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37B38: 0C01400E jal 0xB0050038 */ - cpu->gpr[31] = 0x8004FB40u; /* jal link before delay slot */ - psx_delay_BFC37B38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC37B3C: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB3Cu); return; } g_debug_last_store_pc = 0x8004FB3Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB3Cu); -#endif - if (psx_delay_BFC37B38) { - psx_delay_BFC37B38 = 0; - cpu->gpr[31] = 0x8004FB40u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050038u); - cpu->pc = 0x80050038u; return; - } -label_BFC37B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB40u); -#endif - /* 0xBFC37B40: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB40u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37B44: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC37B48: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB48u); return; } g_debug_last_store_pc = 0x8004FB48u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB48u); -#endif - /* 0xBFC37B4C: 96060014 lhu $a2, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB4Cu); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x96060014u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB50u); -#endif - /* 0xBFC37B50: 92050016 lbu $a1, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (22)), 5, 0x10000u); - PGXP_LOAD(0x92050016u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB50u); -#endif - /* 0xBFC37B54: 92040017 lbu $a0, 23($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 23; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (23)), 4, 0x10000u); - PGXP_LOAD(0x92040017u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37B58: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37B5C: 0C013F72 jal 0xB004FDC8 */ - cpu->gpr[31] = 0x8004FB64u; /* jal link before delay slot */ - psx_delay_BFC37B5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC37B60: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB60u); return; } g_debug_last_store_pc = 0x8004FB60u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB60u); -#endif - if (psx_delay_BFC37B5C) { - psx_delay_BFC37B5C = 0; - cpu->gpr[31] = 0x8004FB64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDC8u); - cpu->pc = 0x8004FDC8u; return; - } -label_BFC37B64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37B64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB64u); -#endif - /* 0xBFC37B64: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB64u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37B68: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC37B6C: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB6Cu); return; } g_debug_last_store_pc = 0x8004FB6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37B70: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC37B74: AFA3002C sw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB74u); return; } g_debug_last_store_pc = 0x8004FB74u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC37B78: 0C014024 jal 0xB0050090 */ - cpu->gpr[31] = 0x8004FB80u; /* jal link before delay slot */ - psx_delay_BFC37B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10010u); -#endif - /* 0xBFC37B7C: 2604000C addiu $a0, $s0, 12 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (12)); - PGXP_ALU(0x2604000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB7Cu); -#endif - if (psx_delay_BFC37B78) { - psx_delay_BFC37B78 = 0; - cpu->gpr[31] = 0x8004FB80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050090u); - cpu->pc = 0x80050090u; return; - } -label_BFC37B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB80u); -#endif - /* 0xBFC37B80: 8FA3002C lw $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB80u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC37B84: 3C09E600 lui $t1, 0xE600 */ - cpu->gpr[9] = 0xE6000000u; - PGXP_ALU(0x3C09E600u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FB84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC37B88: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB88u); return; } g_debug_last_store_pc = 0x8004FB88u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC37B8C: AC690004 sw $t1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FB8Cu); return; } g_debug_last_store_pc = 0x8004FB8Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FB90u); -#endif - /* 0xBFC37B90: 920A0018 lbu $t2, 24($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 24; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (24)), 10, 0x10000u); - PGXP_LOAD(0x920A0018u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37B94: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37B98: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37B9C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC37BA0: 1140007B beq $t2, $zero, 0xBFC37D90 */ - uint32_t psx_brA_BFC37BA0 = cpu->gpr[10]; uint32_t psx_brB_BFC37BA0 = cpu->gpr[0]; - psx_taken_BFC37BA0 = (psx_brA_BFC37BA0 == psx_brB_BFC37BA0); - psx_delay_BFC37BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37BA4: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBA4u); -#endif - if (psx_delay_BFC37BA0) { - psx_delay_BFC37BA0 = 0; - if (psx_taken_BFC37BA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FD90u); - goto label_BFC37D90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FBA8u); - } -label_BFC37BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBA8u); -#endif - /* 0xBFC37BA8: 860B0000 lh $t3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBA8u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x860B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FBACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC37BB0: A7AB003C sh $t3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBB0u); return; } g_debug_last_store_pc = 0x8004FBB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB003Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBB0u); -#endif - /* 0xBFC37BB4: 860C0002 lh $t4, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBB4u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x860C0002u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC37BBC: A7AC003E sh $t4, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBBCu); return; } g_debug_last_store_pc = 0x8004FBBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC003Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBC0u); -#endif - /* 0xBFC37BC0: 860D0004 lh $t5, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBC0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x860D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FBC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC37BC8: A7AD0040 sh $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBC8u); return; } g_debug_last_store_pc = 0x8004FBC8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA7AD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBC8u); -#endif - /* 0xBFC37BCC: 860E0006 lh $t6, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBCCu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBD0u); -#endif - /* 0xBFC37BD0: 87AF0040 lh $t7, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBD0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0040u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC37BD4: A7AE0042 sh $t6, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBD4u); return; } g_debug_last_store_pc = 0x8004FBD4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0042u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC37BD8: 05E10004 bgez $t7, 0xBFC37BEC */ - uint32_t psx_brA_BFC37BD8 = cpu->gpr[15]; - psx_taken_BFC37BD8 = ((int32_t)psx_brA_BFC37BD8 >= 0); - psx_delay_BFC37BD8 = 1; - /* 0xBFC37BDC: 87B80040 lh $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBDCu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBDCu); -#endif - if (psx_delay_BFC37BD8) { - psx_delay_BFC37BD8 = 0; - if (psx_taken_BFC37BD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FBECu); - goto label_BFC37BEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FBE0u); - } -label_BFC37BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BE0: 1000000B beq $zero, $zero, 0xBFC37C10 */ - uint32_t psx_brA_BFC37BE0 = cpu->gpr[0]; uint32_t psx_brB_BFC37BE0 = cpu->gpr[0]; - psx_taken_BFC37BE0 = (psx_brA_BFC37BE0 == psx_brB_BFC37BE0); - psx_delay_BFC37BE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC37BE4: A7A00040 sh $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBE4u); return; } g_debug_last_store_pc = 0x8004FBE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBE4u); -#endif - if (psx_delay_BFC37BE0) { - psx_delay_BFC37BE0 = 0; - if (psx_taken_BFC37BE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC10u); - goto label_BFC37C10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FBE8u); - } -label_BFC37BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBE8u); -#endif - /* 0xBFC37BE8: 87B80040 lh $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBE8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBE8u); -#endif -label_BFC37BEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37BECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC37BF0: 2B010400 slti $at, $t8, 1024 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (1024) ? 1 : 0); - PGXP_ALU(0x2B010400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37BF4: 14200004 bne $at, $zero, 0xBFC37C08 */ - uint32_t psx_brA_BFC37BF4 = cpu->gpr[1]; uint32_t psx_brB_BFC37BF4 = cpu->gpr[0]; - psx_taken_BFC37BF4 = (psx_brA_BFC37BF4 != psx_brB_BFC37BF4); - psx_delay_BFC37BF4 = 1; - /* 0xBFC37BF8: 87A20040 lh $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FBF8u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FBF8u); -#endif - if (psx_delay_BFC37BF4) { - psx_delay_BFC37BF4 = 0; - if (psx_taken_BFC37BF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC08u); - goto label_BFC37C08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FBFCu); - } -label_BFC37BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FBFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37BFC: 10000003 beq $zero, $zero, 0xBFC37C0C */ - uint32_t psx_brA_BFC37BFC = cpu->gpr[0]; uint32_t psx_brB_BFC37BFC = cpu->gpr[0]; - psx_taken_BFC37BFC = (psx_brA_BFC37BFC == psx_brB_BFC37BFC); - psx_delay_BFC37BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C00: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC00u); -#endif - if (psx_delay_BFC37BFC) { - psx_delay_BFC37BFC = 0; - if (psx_taken_BFC37BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC0Cu); - goto label_BFC37C0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC04u); - } -label_BFC37C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC04u); -#endif - /* 0xBFC37C04: 87A20040 lh $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC04u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC04u); -#endif -label_BFC37C08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC08u); -#endif -label_BFC37C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC37C0C: A7A20040 sh $v0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC0Cu); return; } g_debug_last_store_pc = 0x8004FC0Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A20040u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC0Cu); -#endif -label_BFC37C10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC10u); -#endif - /* 0xBFC37C10: 87B90042 lh $t9, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC10u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90042u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC37C18: 07210003 bgez $t9, 0xBFC37C28 */ - uint32_t psx_brA_BFC37C18 = cpu->gpr[25]; - psx_taken_BFC37C18 = ((int32_t)psx_brA_BFC37C18 >= 0); - psx_delay_BFC37C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC1Cu); -#endif - if (psx_delay_BFC37C18) { - psx_delay_BFC37C18 = 0; - if (psx_taken_BFC37C18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC28u); - goto label_BFC37C28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC20u); - } -label_BFC37C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C20: 10000018 beq $zero, $zero, 0xBFC37C84 */ - uint32_t psx_brA_BFC37C20 = cpu->gpr[0]; uint32_t psx_brB_BFC37C20 = cpu->gpr[0]; - psx_taken_BFC37C20 = (psx_brA_BFC37C20 == psx_brB_BFC37C20); - psx_delay_BFC37C20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC37C24: A7A00042 sh $zero, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC24u); return; } g_debug_last_store_pc = 0x8004FC24u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A00042u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC24u); -#endif - if (psx_delay_BFC37C20) { - psx_delay_BFC37C20 = 0; - if (psx_taken_BFC37C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC84u); - goto label_BFC37C84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC28u); - } -label_BFC37C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37C28: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FC28u); -#endif - /* 0xBFC37C2C: 8C849254 lw $a0, -28076($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC2Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849254u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37C34: 10800004 beq $a0, $zero, 0xBFC37C48 */ - uint32_t psx_brA_BFC37C34 = cpu->gpr[4]; uint32_t psx_brB_BFC37C34 = cpu->gpr[0]; - psx_taken_BFC37C34 = (psx_brA_BFC37C34 == psx_brB_BFC37C34); - psx_delay_BFC37C34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C38: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC38u); -#endif - if (psx_delay_BFC37C34) { - psx_delay_BFC37C34 = 0; - if (psx_taken_BFC37C34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC48u); - goto label_BFC37C48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC3Cu); - } -label_BFC37C3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C3C: 10000002 beq $zero, $zero, 0xBFC37C48 */ - uint32_t psx_brA_BFC37C3C = cpu->gpr[0]; uint32_t psx_brB_BFC37C3C = cpu->gpr[0]; - psx_taken_BFC37C3C = (psx_brA_BFC37C3C == psx_brB_BFC37C3C); - psx_delay_BFC37C3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C40: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC40u); -#endif - if (psx_delay_BFC37C3C) { - psx_delay_BFC37C3C = 0; - if (psx_taken_BFC37C3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC48u); - goto label_BFC37C48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC44u); - } -label_BFC37C44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C44: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC44u); -#endif -label_BFC37C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC48u); -#endif - /* 0xBFC37C48: 87A80042 lh $t0, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC48u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A80042u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC37C50: 0048082A slt $at, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0048082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37C54: 10200008 beq $at, $zero, 0xBFC37C78 */ - uint32_t psx_brA_BFC37C54 = cpu->gpr[1]; uint32_t psx_brB_BFC37C54 = cpu->gpr[0]; - psx_taken_BFC37C54 = (psx_brA_BFC37C54 == psx_brB_BFC37C54); - psx_delay_BFC37C54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC58u); -#endif - if (psx_delay_BFC37C54) { - psx_delay_BFC37C54 = 0; - if (psx_taken_BFC37C54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC78u); - goto label_BFC37C78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC5Cu); - } -label_BFC37C5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37C5C: 10800004 beq $a0, $zero, 0xBFC37C70 */ - uint32_t psx_brA_BFC37C5C = cpu->gpr[4]; uint32_t psx_brB_BFC37C5C = cpu->gpr[0]; - psx_taken_BFC37C5C = (psx_brA_BFC37C5C == psx_brB_BFC37C5C); - psx_delay_BFC37C5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C60: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC60u); -#endif - if (psx_delay_BFC37C5C) { - psx_delay_BFC37C5C = 0; - if (psx_taken_BFC37C5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC70u); - goto label_BFC37C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC64u); - } -label_BFC37C64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C64: 10000002 beq $zero, $zero, 0xBFC37C70 */ - uint32_t psx_brA_BFC37C64 = cpu->gpr[0]; uint32_t psx_brB_BFC37C64 = cpu->gpr[0]; - psx_taken_BFC37C64 = (psx_brA_BFC37C64 == psx_brB_BFC37C64); - psx_delay_BFC37C64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C68: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC68u); -#endif - if (psx_delay_BFC37C64) { - psx_delay_BFC37C64 = 0; - if (psx_taken_BFC37C64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC70u); - goto label_BFC37C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC6Cu); - } -label_BFC37C6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37C6C: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC6Cu); -#endif -label_BFC37C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C70: 10000003 beq $zero, $zero, 0xBFC37C80 */ - uint32_t psx_brA_BFC37C70 = cpu->gpr[0]; uint32_t psx_brB_BFC37C70 = cpu->gpr[0]; - psx_taken_BFC37C70 = (psx_brA_BFC37C70 == psx_brB_BFC37C70); - psx_delay_BFC37C70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC37C74: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC74u); -#endif - if (psx_delay_BFC37C70) { - psx_delay_BFC37C70 = 0; - if (psx_taken_BFC37C70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC80u); - goto label_BFC37C80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC78u); - } -label_BFC37C78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC78u); -#endif - /* 0xBFC37C78: 87A40042 lh $a0, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC78u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40042u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC7Cu); -#endif -label_BFC37C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC37C80: A7A40042 sh $a0, 66($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 66; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC80u); return; } g_debug_last_store_pc = 0x8004FC80u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA7A40042u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC80u); -#endif -label_BFC37C84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC84u); -#endif - /* 0xBFC37C84: 87A9003C lh $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC84u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC37C8C: 312A003F andi $t2, $t1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x3Fu; - PGXP_ALU(0x312A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC37C90: 15400007 bne $t2, $zero, 0xBFC37CB0 */ - uint32_t psx_brA_BFC37C90 = cpu->gpr[10]; uint32_t psx_brB_BFC37C90 = cpu->gpr[0]; - psx_taken_BFC37C90 = (psx_brA_BFC37C90 != psx_brB_BFC37C90); - psx_delay_BFC37C90 = 1; - /* 0xBFC37C94: 87AD003C lh $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC94u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC94u); -#endif - if (psx_delay_BFC37C90) { - psx_delay_BFC37C90 = 0; - if (psx_taken_BFC37C90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FCB0u); - goto label_BFC37CB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FC98u); - } -label_BFC37C98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37C98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FC98u); -#endif - /* 0xBFC37C98: 87AB0040 lh $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FC98u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FC98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37C9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC37CA0: 316C003F andi $t4, $t3, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x3Fu; - PGXP_ALU(0x316C003Fu, cpu->gpr[12], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC37CA4: 11800026 beq $t4, $zero, 0xBFC37D40 */ - uint32_t psx_brA_BFC37CA4 = cpu->gpr[12]; uint32_t psx_brB_BFC37CA4 = cpu->gpr[0]; - psx_taken_BFC37CA4 = (psx_brA_BFC37CA4 == psx_brB_BFC37CA4); - psx_delay_BFC37CA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37CA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FCA8u); -#endif - if (psx_delay_BFC37CA4) { - psx_delay_BFC37CA4 = 0; - if (psx_taken_BFC37CA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FD40u); - goto label_BFC37D40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FCACu); - } -label_BFC37CAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37CACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCACu); -#endif - /* 0xBFC37CAC: 87AD003C lh $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCACu); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCACu); -#endif -label_BFC37CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCB0u); -#endif - /* 0xBFC37CB0: 860E0008 lh $t6, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCB0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCB0u); -#endif - /* 0xBFC37CB4: 87B8003E lh $t8, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCB4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B8003Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC37CB8: 01AE7823 subu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] - cpu->gpr[14]; - PGXP_ALU(0x01AE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC37CBC: A7AF003C sh $t7, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCBCu); return; } g_debug_last_store_pc = 0x8004FCBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF003Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCC0u); -#endif - /* 0xBFC37CC0: 8619000A lh $t9, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCC0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8619000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37CC4: 3C016000 lui $at, 0x6000 */ - cpu->gpr[1] = 0x60000000u; - PGXP_ALU(0x3C016000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC37CC8: 03194023 subu $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC37CCC: A7A8003E sh $t0, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCCCu); return; } g_debug_last_store_pc = 0x8004FCCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A8003Eu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCD0u); -#endif - /* 0xBFC37CD0: 9209001B lbu $t1, 27($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 27; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (27)), 9, 0x10000u); - PGXP_LOAD(0x9209001Bu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCD0u); -#endif - /* 0xBFC37CD4: 920C001A lbu $t4, 26($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 26; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (26)), 12, 0x10000u); - PGXP_LOAD(0x920C001Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC37CD8: 00095400 sll $t2, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00095400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCD8u); -#endif - /* 0xBFC37CDC: 920F0019 lbu $t7, 25($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 25; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (25)), 15, 0x10000u); - PGXP_LOAD(0x920F0019u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC02u); -#endif - /* 0xBFC37CE0: 01415825 or $t3, $t2, $at */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[10] | cpu->gpr[1]; - PGXP_ALU(0x01415825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC37CE4: 000C6A00 sll $t5, $t4, 8 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 8u; - PGXP_ALU(0x000C6A00u, cpu->gpr[13], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6800u); -#endif - /* 0xBFC37CE8: 016D7025 or $t6, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[11] | cpu->gpr[13]; - PGXP_ALU(0x016D7025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC37CEC: 01CFC025 or $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[15]; - PGXP_ALU(0x01CFC025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC37CF0: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCF0u); return; } g_debug_last_store_pc = 0x8004FCF0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCF0u); -#endif - /* 0xBFC37CF4: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCF4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37CF8: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC37CFC: AC790004 sw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FCFCu); return; } g_debug_last_store_pc = 0x8004FCFCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD00u); -#endif - /* 0xBFC37D00: 8FA80040 lw $t0, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD00u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80040u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D04: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC37D08: AC680004 sw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD08u); return; } g_debug_last_store_pc = 0x8004FD08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD08u); -#endif - /* 0xBFC37D0C: 87A9003C lh $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD0Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD10u); -#endif - /* 0xBFC37D10: 860A0008 lh $t2, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD10u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x860A0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD10u); -#endif - /* 0xBFC37D14: 87AB003E lh $t3, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD14u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB003Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1600u); -#endif - /* 0xBFC37D18: 012A6021 addu $t4, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC37D1C: A7AC003C sh $t4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD1Cu); return; } g_debug_last_store_pc = 0x8004FD1Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC003Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD20u); -#endif - /* 0xBFC37D20: 860D000A lh $t5, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD20u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10000u); } - PGXP_LOAD(0x860D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D24: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37D28: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6800u); -#endif - /* 0xBFC37D2C: 016D7021 addu $t6, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[11] + cpu->gpr[13]; - PGXP_ALU(0x016D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37D30: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D34: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37D38: 10000015 beq $zero, $zero, 0xBFC37D90 */ - uint32_t psx_brA_BFC37D38 = cpu->gpr[0]; uint32_t psx_brB_BFC37D38 = cpu->gpr[0]; - psx_taken_BFC37D38 = (psx_brA_BFC37D38 == psx_brB_BFC37D38); - psx_delay_BFC37D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC37D3C: A7AE003E sh $t6, 62($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 62; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD3Cu); return; } g_debug_last_store_pc = 0x8004FD3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE003Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD3Cu); -#endif - if (psx_delay_BFC37D38) { - psx_delay_BFC37D38 = 0; - if (psx_taken_BFC37D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FD90u); - goto label_BFC37D90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FD40u); - } -label_BFC37D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD40u); -#endif - /* 0xBFC37D40: 920F001B lbu $t7, 27($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 27; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (27)), 15, 0x10000u); - PGXP_LOAD(0x920F001Bu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD40u); -#endif - /* 0xBFC37D44: 9208001A lbu $t0, 26($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 26; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (26)), 8, 0x10000u); - PGXP_LOAD(0x9208001Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37D48: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC37D4C: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD50u); -#endif - /* 0xBFC37D50: 920C0019 lbu $t4, 25($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 25; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (25)), 12, 0x10000u); - PGXP_LOAD(0x920C0019u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC37D54: 0301C825 or $t9, $t8, $at */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[1]; - PGXP_ALU(0x0301C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC37D58: 00084A00 sll $t1, $t0, 8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 8u; - PGXP_ALU(0x00084A00u, cpu->gpr[9], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC37D5C: 03295025 or $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] | cpu->gpr[9]; - PGXP_ALU(0x03295025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC37D60: 014C5825 or $t3, $t2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[11] = cpu->gpr[10] | cpu->gpr[12]; - PGXP_ALU(0x014C5825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC37D64: AC6B0000 sw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD64u); return; } g_debug_last_store_pc = 0x8004FD64u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD64u); -#endif - /* 0xBFC37D68: 8FAD003C lw $t5, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD68u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD003Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37D6C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC37D70: AC6D0004 sw $t5, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD70u); return; } g_debug_last_store_pc = 0x8004FD70u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD70u); -#endif - /* 0xBFC37D74: 8FAE0040 lw $t6, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD74u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0040u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D78: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D7C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37D80: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC37D84: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC37D88: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC37D8C: AC6EFFFC sw $t6, -4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD8Cu); return; } g_debug_last_store_pc = 0x8004FD8Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6EFFFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD8Cu); -#endif -label_BFC37D90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37D90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FD90u); -#endif - /* 0xBFC37D90: 8E420000 lw $v0, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FD90u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } - PGXP_LOAD(0x8E420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28000u); -#endif - /* 0xBFC37D94: 322F00FF andi $t7, $s1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[15] = cpu->gpr[17] & 0xFFu; - PGXP_ALU(0x322F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC37D98: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC37D9C: 00024602 srl $t0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] >> 24u; - PGXP_ALU(0x00024602u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FD9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC37DA0: 0308C826 xor $t9, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[8]; - PGXP_ALU(0x0308C826u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC37DA4: 00194E00 sll $t1, $t9, 24 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 24u; - PGXP_ALU(0x00194E00u, cpu->gpr[9], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC37DA8: 01225026 xor $t2, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[2]; - PGXP_ALU(0x01225026u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40400u); -#endif - /* 0xBFC37DAC: AE4A0000 sw $t2, 0($s2) */ - { uint32_t _pgxa = cpu->gpr[18]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDACu); return; } g_debug_last_store_pc = 0x8004FDACu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAE4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDB0u); -#endif - /* 0xBFC37DB0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDB0u); -#endif - /* 0xBFC37DB4: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDB4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDB4u); -#endif - /* 0xBFC37DB8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDB8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDB8u); -#endif - /* 0xBFC37DBC: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDBCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37DC0: 03E00008 jr $ra */ - psx_delay_BFC37DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC37DC4: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDC4u); -#endif - if (psx_delay_BFC37DC0) { - psx_delay_BFC37DC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37DC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37DC8u); - int psx_delay_BFC37DD4 = 0; - int psx_taken_BFC37DD4 = 0; - int psx_delay_BFC37DDC = 0; - int psx_taken_BFC37DDC = 0; - int psx_delay_BFC37DE4 = 0; - int psx_taken_BFC37DE4 = 0; - int psx_delay_BFC37DF0 = 0; - int psx_taken_BFC37DF0 = 0; - int psx_delay_BFC37DF8 = 0; - int psx_taken_BFC37DF8 = 0; - int psx_delay_BFC37E14 = 0; - int psx_delay_BFC37E1C = 0; - int psx_taken_BFC37E1C = 0; - int psx_delay_BFC37E24 = 0; - int psx_taken_BFC37E24 = 0; - int psx_delay_BFC37E30 = 0; - int psx_taken_BFC37E30 = 0; - int psx_delay_BFC37E38 = 0; - int psx_taken_BFC37E38 = 0; - int psx_delay_BFC37E58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37DDCu: goto label_BFC37DDC; - case 0xBFC37DE4u: goto label_BFC37DE4; - case 0xBFC37DECu: goto label_BFC37DEC; - case 0xBFC37DF0u: goto label_BFC37DF0; - case 0xBFC37DF8u: goto label_BFC37DF8; - case 0xBFC37E00u: goto label_BFC37E00; - case 0xBFC37E04u: goto label_BFC37E04; - case 0xBFC37E1Cu: goto label_BFC37E1C; - case 0xBFC37E24u: goto label_BFC37E24; - case 0xBFC37E2Cu: goto label_BFC37E2C; - case 0xBFC37E30u: goto label_BFC37E30; - case 0xBFC37E38u: goto label_BFC37E38; - case 0xBFC37E40u: goto label_BFC37E40; - case 0xBFC37E44u: goto label_BFC37E44; - default: break; - } - } -label_BFC37DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC37DC8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FDC8u); -#endif - /* 0xBFC37DCC: 8DCE9254 lw $t6, -28076($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FDCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9254u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC37DD0: 30C6FFFF andi $a2, $a2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu; - PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC37DD4: 11C00011 beq $t6, $zero, 0xBFC37E1C */ - uint32_t psx_brA_BFC37DD4 = cpu->gpr[14]; uint32_t psx_brB_BFC37DD4 = cpu->gpr[0]; - psx_taken_BFC37DD4 = (psx_brA_BFC37DD4 == psx_brB_BFC37DD4); - psx_delay_BFC37DD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37DD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FDD8u); -#endif - if (psx_delay_BFC37DD4) { - psx_delay_BFC37DD4 = 0; - if (psx_taken_BFC37DD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE1Cu); - goto label_BFC37E1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDDCu); - } -label_BFC37DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC37DDC: 10A00004 beq $a1, $zero, 0xBFC37DF0 */ - uint32_t psx_brA_BFC37DDC = cpu->gpr[5]; uint32_t psx_brB_BFC37DDC = cpu->gpr[0]; - psx_taken_BFC37DDC = (psx_brA_BFC37DDC == psx_brB_BFC37DDC); - psx_delay_BFC37DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37DE0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDE0u); -#endif - if (psx_delay_BFC37DDC) { - psx_delay_BFC37DDC = 0; - if (psx_taken_BFC37DDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDF0u); - goto label_BFC37DF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDE4u); - } -label_BFC37DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37DE4: 10000002 beq $zero, $zero, 0xBFC37DF0 */ - uint32_t psx_brA_BFC37DE4 = cpu->gpr[0]; uint32_t psx_brB_BFC37DE4 = cpu->gpr[0]; - psx_taken_BFC37DE4 = (psx_brA_BFC37DE4 == psx_brB_BFC37DE4); - psx_delay_BFC37DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37DE8: 24030800 addiu $v1, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24030800u, cpu->gpr[3], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDE8u); -#endif - if (psx_delay_BFC37DE4) { - psx_delay_BFC37DE4 = 0; - if (psx_taken_BFC37DE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDF0u); - goto label_BFC37DF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDECu); - } -label_BFC37DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37DEC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDECu); -#endif -label_BFC37DF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37DF0: 10800004 beq $a0, $zero, 0xBFC37E04 */ - uint32_t psx_brA_BFC37DF0 = cpu->gpr[4]; uint32_t psx_brB_BFC37DF0 = cpu->gpr[0]; - psx_taken_BFC37DF0 = (psx_brA_BFC37DF0 == psx_brB_BFC37DF0); - psx_delay_BFC37DF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37DF4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDF4u); -#endif - if (psx_delay_BFC37DF0) { - psx_delay_BFC37DF0 = 0; - if (psx_taken_BFC37DF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE04u); - goto label_BFC37E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FDF8u); - } -label_BFC37DF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37DF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37DF8: 10000002 beq $zero, $zero, 0xBFC37E04 */ - uint32_t psx_brA_BFC37DF8 = cpu->gpr[0]; uint32_t psx_brB_BFC37DF8 = cpu->gpr[0]; - psx_taken_BFC37DF8 = (psx_brA_BFC37DF8 == psx_brB_BFC37DF8); - psx_delay_BFC37DF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37DFC: 24041000 addiu $a0, $zero, 4096 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); - PGXP_ALU(0x24041000u, cpu->gpr[4], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FDFCu); -#endif - if (psx_delay_BFC37DF8) { - psx_delay_BFC37DF8 = 0; - if (psx_taken_BFC37DF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE04u); - goto label_BFC37E04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE00u); - } -label_BFC37E00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E00: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE00u); -#endif -label_BFC37E04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37E04: 3C01E100 lui $at, 0xE100 */ - cpu->gpr[1] = 0xE1000000u; - PGXP_ALU(0x3C01E100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800Au); -#endif - /* 0xBFC37E08: 00617825 or $t7, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[3] | cpu->gpr[1]; - PGXP_ALU(0x00617825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC37E0C: 01E4C025 or $t8, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[4]; - PGXP_ALU(0x01E4C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC37E10: 30D927FF andi $t9, $a2, 0x27FF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x27FFu; - PGXP_ALU(0x30D927FFu, cpu->gpr[25], _pgx1, 0x27FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37E14: 03E00008 jr $ra */ - psx_delay_BFC37E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC37E18: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE18u); -#endif - if (psx_delay_BFC37E14) { - psx_delay_BFC37E14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC37E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC37E1C: 10A00004 beq $a1, $zero, 0xBFC37E30 */ - uint32_t psx_brA_BFC37E1C = cpu->gpr[5]; uint32_t psx_brB_BFC37E1C = cpu->gpr[0]; - psx_taken_BFC37E1C = (psx_brA_BFC37E1C == psx_brB_BFC37E1C); - psx_delay_BFC37E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37E20: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE20u); -#endif - if (psx_delay_BFC37E1C) { - psx_delay_BFC37E1C = 0; - if (psx_taken_BFC37E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE30u); - goto label_BFC37E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE24u); - } -label_BFC37E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37E24: 10000002 beq $zero, $zero, 0xBFC37E30 */ - uint32_t psx_brA_BFC37E24 = cpu->gpr[0]; uint32_t psx_brB_BFC37E24 = cpu->gpr[0]; - psx_taken_BFC37E24 = (psx_brA_BFC37E24 == psx_brB_BFC37E24); - psx_delay_BFC37E24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37E28: 24030200 addiu $v1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24030200u, cpu->gpr[3], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE28u); -#endif - if (psx_delay_BFC37E24) { - psx_delay_BFC37E24 = 0; - if (psx_taken_BFC37E24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE30u); - goto label_BFC37E30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE2Cu); - } -label_BFC37E2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37E2C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE2Cu); -#endif -label_BFC37E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E30: 10800004 beq $a0, $zero, 0xBFC37E44 */ - uint32_t psx_brA_BFC37E30 = cpu->gpr[4]; uint32_t psx_brB_BFC37E30 = cpu->gpr[0]; - psx_taken_BFC37E30 = (psx_brA_BFC37E30 == psx_brB_BFC37E30); - psx_delay_BFC37E30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E34: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE34u); -#endif - if (psx_delay_BFC37E30) { - psx_delay_BFC37E30 = 0; - if (psx_taken_BFC37E30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE44u); - goto label_BFC37E44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE38u); - } -label_BFC37E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37E38: 10000002 beq $zero, $zero, 0xBFC37E44 */ - uint32_t psx_brA_BFC37E38 = cpu->gpr[0]; uint32_t psx_brB_BFC37E38 = cpu->gpr[0]; - psx_taken_BFC37E38 = (psx_brA_BFC37E38 == psx_brB_BFC37E38); - psx_delay_BFC37E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E3C: 24040400 addiu $a0, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x24040400u, cpu->gpr[4], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE3Cu); -#endif - if (psx_delay_BFC37E38) { - psx_delay_BFC37E38 = 0; - if (psx_taken_BFC37E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE44u); - goto label_BFC37E44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE40u); - } -label_BFC37E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E40: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE40u); -#endif -label_BFC37E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37E44: 3C01E100 lui $at, 0xE100 */ - cpu->gpr[1] = 0xE1000000u; - PGXP_ALU(0x3C01E100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC37E48: 00614025 or $t0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[3] | cpu->gpr[1]; - PGXP_ALU(0x00614025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC37E4C: 01044825 or $t1, $t0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[8] | cpu->gpr[4]; - PGXP_ALU(0x01044825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC37E50: 30CA01FF andi $t2, $a2, 0x1FF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[10] = cpu->gpr[6] & 0x1FFu; - PGXP_ALU(0x30CA01FFu, cpu->gpr[10], _pgx1, 0x01FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC37E54: 012A1025 or $v0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37E58: 03E00008 jr $ra */ - psx_delay_BFC37E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37E5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FE5Cu); -#endif - if (psx_delay_BFC37E58) { - psx_delay_BFC37E58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37E60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37E60u); - int psx_delay_BFC37E6C = 0; - int psx_taken_BFC37E6C = 0; - int psx_delay_BFC37E74 = 0; - int psx_taken_BFC37E74 = 0; - int psx_delay_BFC37E80 = 0; - int psx_taken_BFC37E80 = 0; - int psx_delay_BFC37E88 = 0; - int psx_taken_BFC37E88 = 0; - int psx_delay_BFC37E9C = 0; - int psx_taken_BFC37E9C = 0; - int psx_delay_BFC37EAC = 0; - int psx_taken_BFC37EAC = 0; - int psx_delay_BFC37EC0 = 0; - int psx_taken_BFC37EC0 = 0; - int psx_delay_BFC37EC8 = 0; - int psx_taken_BFC37EC8 = 0; - int psx_delay_BFC37ED8 = 0; - int psx_taken_BFC37ED8 = 0; - int psx_delay_BFC37EE0 = 0; - int psx_taken_BFC37EE0 = 0; - int psx_delay_BFC37EE8 = 0; - int psx_taken_BFC37EE8 = 0; - int psx_delay_BFC37EF4 = 0; - int psx_taken_BFC37EF4 = 0; - int psx_delay_BFC37F08 = 0; - int psx_taken_BFC37F08 = 0; - int psx_delay_BFC37F24 = 0; - int psx_delay_BFC37F44 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37E74u: goto label_BFC37E74; - case 0xBFC37E7Cu: goto label_BFC37E7C; - case 0xBFC37E88u: goto label_BFC37E88; - case 0xBFC37E90u: goto label_BFC37E90; - case 0xBFC37E94u: goto label_BFC37E94; - case 0xBFC37E9Cu: goto label_BFC37E9C; - case 0xBFC37EA4u: goto label_BFC37EA4; - case 0xBFC37EB4u: goto label_BFC37EB4; - case 0xBFC37EC8u: goto label_BFC37EC8; - case 0xBFC37ED0u: goto label_BFC37ED0; - case 0xBFC37ED4u: goto label_BFC37ED4; - case 0xBFC37EE0u: goto label_BFC37EE0; - case 0xBFC37EE8u: goto label_BFC37EE8; - case 0xBFC37EF0u: goto label_BFC37EF0; - case 0xBFC37EF4u: goto label_BFC37EF4; - case 0xBFC37EFCu: goto label_BFC37EFC; - case 0xBFC37F00u: goto label_BFC37F00; - case 0xBFC37F08u: goto label_BFC37F08; - case 0xBFC37F10u: goto label_BFC37F10; - case 0xBFC37F30u: goto label_BFC37F30; - default: break; - } - } -label_BFC37E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37E60: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37E64: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37E68: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37E6C: 04810003 bgez $a0, 0xBFC37E7C */ - uint32_t psx_brA_BFC37E6C = cpu->gpr[4]; - psx_taken_BFC37E6C = ((int32_t)psx_brA_BFC37E6C >= 0); - psx_delay_BFC37E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37E70: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE70u); -#endif - if (psx_delay_BFC37E6C) { - psx_delay_BFC37E6C = 0; - if (psx_taken_BFC37E6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE7Cu); - goto label_BFC37E7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE74u); - } -label_BFC37E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37E74: 10000009 beq $zero, $zero, 0xBFC37E9C */ - uint32_t psx_brA_BFC37E74 = cpu->gpr[0]; uint32_t psx_brB_BFC37E74 = cpu->gpr[0]; - psx_taken_BFC37E74 = (psx_brA_BFC37E74 == psx_brB_BFC37E74); - psx_delay_BFC37E74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37E78: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE78u); -#endif - if (psx_delay_BFC37E74) { - psx_delay_BFC37E74 = 0; - if (psx_taken_BFC37E74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE9Cu); - goto label_BFC37E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE7Cu); - } -label_BFC37E7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC37E7C: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37E80: 14200004 bne $at, $zero, 0xBFC37E94 */ - uint32_t psx_brA_BFC37E80 = cpu->gpr[1]; uint32_t psx_brB_BFC37E80 = cpu->gpr[0]; - psx_taken_BFC37E80 = (psx_brA_BFC37E80 != psx_brB_BFC37E80); - psx_delay_BFC37E80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC37E84: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE84u); -#endif - if (psx_delay_BFC37E80) { - psx_delay_BFC37E80 = 0; - if (psx_taken_BFC37E80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE94u); - goto label_BFC37E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE88u); - } -label_BFC37E88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37E88: 10000002 beq $zero, $zero, 0xBFC37E94 */ - uint32_t psx_brA_BFC37E88 = cpu->gpr[0]; uint32_t psx_brB_BFC37E88 = cpu->gpr[0]; - psx_taken_BFC37E88 = (psx_brA_BFC37E88 == psx_brB_BFC37E88); - psx_delay_BFC37E88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37E8C: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE8Cu); -#endif - if (psx_delay_BFC37E88) { - psx_delay_BFC37E88 = 0; - if (psx_taken_BFC37E88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE94u); - goto label_BFC37E94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FE90u); - } -label_BFC37E90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC37E90: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE90u); -#endif -label_BFC37E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC37E94: 00022400 sll $a0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00022400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37E98: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FE98u); -#endif -label_BFC37E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FE9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37E9C: 04A10005 bgez $a1, 0xBFC37EB4 */ - uint32_t psx_brA_BFC37E9C = cpu->gpr[5]; - psx_taken_BFC37E9C = ((int32_t)psx_brA_BFC37E9C >= 0); - psx_delay_BFC37E9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FEA0u); -#endif - if (psx_delay_BFC37E9C) { - psx_delay_BFC37E9C = 0; - if (psx_taken_BFC37E9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEB4u); - goto label_BFC37EB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEA4u); - } -label_BFC37EA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37EA4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FEA4u); -#endif - /* 0xBFC37EA8: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FEA8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EAC: 10000016 beq $zero, $zero, 0xBFC37F08 */ - uint32_t psx_brA_BFC37EAC = cpu->gpr[0]; uint32_t psx_brB_BFC37EAC = cpu->gpr[0]; - psx_taken_BFC37EAC = (psx_brA_BFC37EAC == psx_brB_BFC37EAC); - psx_delay_BFC37EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC37EB0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEB0u); -#endif - if (psx_delay_BFC37EAC) { - psx_delay_BFC37EAC = 0; - if (psx_taken_BFC37EAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF08u); - goto label_BFC37F08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEB4u); - } -label_BFC37EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37EB4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FEB4u); -#endif - /* 0xBFC37EB8: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FEB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37EC0: 10400004 beq $v0, $zero, 0xBFC37ED4 */ - uint32_t psx_brA_BFC37EC0 = cpu->gpr[2]; uint32_t psx_brB_BFC37EC0 = cpu->gpr[0]; - psx_taken_BFC37EC0 = (psx_brA_BFC37EC0 == psx_brB_BFC37EC0); - psx_delay_BFC37EC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37EC4: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEC4u); -#endif - if (psx_delay_BFC37EC0) { - psx_delay_BFC37EC0 = 0; - if (psx_taken_BFC37EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FED4u); - goto label_BFC37ED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEC8u); - } -label_BFC37EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EC8: 10000002 beq $zero, $zero, 0xBFC37ED4 */ - uint32_t psx_brA_BFC37EC8 = cpu->gpr[0]; uint32_t psx_brB_BFC37EC8 = cpu->gpr[0]; - psx_taken_BFC37EC8 = (psx_brA_BFC37EC8 == psx_brB_BFC37EC8); - psx_delay_BFC37EC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37ECC: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FECCu); -#endif - if (psx_delay_BFC37EC8) { - psx_delay_BFC37EC8 = 0; - if (psx_taken_BFC37EC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FED4u); - goto label_BFC37ED4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FED0u); - } -label_BFC37ED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37ED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37ED0: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FED0u); -#endif -label_BFC37ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC37ED4: 0065082A slt $at, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37ED8: 10200009 beq $at, $zero, 0xBFC37F00 */ - uint32_t psx_brA_BFC37ED8 = cpu->gpr[1]; uint32_t psx_brB_BFC37ED8 = cpu->gpr[0]; - psx_taken_BFC37ED8 = (psx_brA_BFC37ED8 == psx_brB_BFC37ED8); - psx_delay_BFC37ED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC37EDC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEDCu); -#endif - if (psx_delay_BFC37ED8) { - psx_delay_BFC37ED8 = 0; - if (psx_taken_BFC37ED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF00u); - goto label_BFC37F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEE0u); - } -label_BFC37EE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37EE0: 10400004 beq $v0, $zero, 0xBFC37EF4 */ - uint32_t psx_brA_BFC37EE0 = cpu->gpr[2]; uint32_t psx_brB_BFC37EE0 = cpu->gpr[0]; - psx_taken_BFC37EE0 = (psx_brA_BFC37EE0 == psx_brB_BFC37EE0); - psx_delay_BFC37EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37EE4: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEE4u); -#endif - if (psx_delay_BFC37EE0) { - psx_delay_BFC37EE0 = 0; - if (psx_taken_BFC37EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEF4u); - goto label_BFC37EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEE8u); - } -label_BFC37EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EE8: 10000002 beq $zero, $zero, 0xBFC37EF4 */ - uint32_t psx_brA_BFC37EE8 = cpu->gpr[0]; uint32_t psx_brB_BFC37EE8 = cpu->gpr[0]; - psx_taken_BFC37EE8 = (psx_brA_BFC37EE8 == psx_brB_BFC37EE8); - psx_delay_BFC37EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37EEC: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEECu); -#endif - if (psx_delay_BFC37EE8) { - psx_delay_BFC37EE8 = 0; - if (psx_taken_BFC37EE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEF4u); - goto label_BFC37EF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEF0u); - } -label_BFC37EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37EF0: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEF0u); -#endif -label_BFC37EF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37EF4: 10000002 beq $zero, $zero, 0xBFC37F00 */ - uint32_t psx_brA_BFC37EF4 = cpu->gpr[0]; uint32_t psx_brB_BFC37EF4 = cpu->gpr[0]; - psx_taken_BFC37EF4 = (psx_brA_BFC37EF4 == psx_brB_BFC37EF4); - psx_delay_BFC37EF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC37EF8: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEF8u); -#endif - if (psx_delay_BFC37EF4) { - psx_delay_BFC37EF4 = 0; - if (psx_taken_BFC37EF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF00u); - goto label_BFC37F00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FEFCu); - } -label_BFC37EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC37EFC: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FEFCu); -#endif -label_BFC37F00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC37F00: 00062C00 sll $a1, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00062C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37F04: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF04u); -#endif -label_BFC37F08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37F08: 10400009 beq $v0, $zero, 0xBFC37F30 */ - uint32_t psx_brA_BFC37F08 = cpu->gpr[2]; uint32_t psx_brB_BFC37F08 = cpu->gpr[0]; - psx_taken_BFC37F08 = (psx_brA_BFC37F08 == psx_brB_BFC37F08); - psx_delay_BFC37F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC37F0C: 30A803FF andi $t0, $a1, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] & 0x3FFu; - PGXP_ALU(0x30A803FFu, cpu->gpr[8], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF0Cu); -#endif - if (psx_delay_BFC37F08) { - psx_delay_BFC37F08 = 0; - if (psx_taken_BFC37F08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF30u); - goto label_BFC37F30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF10u); - } -label_BFC37F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC37F10: 30AE0FFF andi $t6, $a1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFu; - PGXP_ALU(0x30AE0FFFu, cpu->gpr[14], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC37F14: 000E7B00 sll $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 12u; - PGXP_ALU(0x000E7B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37F18: 3C01E300 lui $at, 0xE300 */ - cpu->gpr[1] = 0xE3000000u; - PGXP_ALU(0x3C01E300u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FF18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC37F1C: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC37F20: 30990FFF andi $t9, $a0, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFFu; - PGXP_ALU(0x30990FFFu, cpu->gpr[25], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37F24: 03E00008 jr $ra */ - psx_delay_BFC37F24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC37F28: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF28u); -#endif - if (psx_delay_BFC37F24) { - psx_delay_BFC37F24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC37F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC37F30: 00084A80 sll $t1, $t0, 10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 10u; - PGXP_ALU(0x00084A80u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC37F34: 3C01E300 lui $at, 0xE300 */ - cpu->gpr[1] = 0xE3000000u; - PGXP_ALU(0x3C01E300u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FF34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC37F38: 01215025 or $t2, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[9] | cpu->gpr[1]; - PGXP_ALU(0x01215025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC37F3C: 308B03FF andi $t3, $a0, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0x3FFu; - PGXP_ALU(0x308B03FFu, cpu->gpr[11], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC37F40: 014B1025 or $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] | cpu->gpr[11]; - PGXP_ALU(0x014B1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC37F44: 03E00008 jr $ra */ - psx_delay_BFC37F44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37F48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FF48u); -#endif - if (psx_delay_BFC37F44) { - psx_delay_BFC37F44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC37F4C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC37F4Cu); - int psx_delay_BFC37F58 = 0; - int psx_taken_BFC37F58 = 0; - int psx_delay_BFC37F60 = 0; - int psx_taken_BFC37F60 = 0; - int psx_delay_BFC37F6C = 0; - int psx_taken_BFC37F6C = 0; - int psx_delay_BFC37F74 = 0; - int psx_taken_BFC37F74 = 0; - int psx_delay_BFC37F88 = 0; - int psx_taken_BFC37F88 = 0; - int psx_delay_BFC37F98 = 0; - int psx_taken_BFC37F98 = 0; - int psx_delay_BFC37FAC = 0; - int psx_taken_BFC37FAC = 0; - int psx_delay_BFC37FB4 = 0; - int psx_taken_BFC37FB4 = 0; - int psx_delay_BFC37FC4 = 0; - int psx_taken_BFC37FC4 = 0; - int psx_delay_BFC37FCC = 0; - int psx_taken_BFC37FCC = 0; - int psx_delay_BFC37FD4 = 0; - int psx_taken_BFC37FD4 = 0; - int psx_delay_BFC37FE0 = 0; - int psx_taken_BFC37FE0 = 0; - int psx_delay_BFC37FF4 = 0; - int psx_taken_BFC37FF4 = 0; - int psx_delay_BFC38010 = 0; - int psx_delay_BFC38030 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC37F60u: goto label_BFC37F60; - case 0xBFC37F68u: goto label_BFC37F68; - case 0xBFC37F74u: goto label_BFC37F74; - case 0xBFC37F7Cu: goto label_BFC37F7C; - case 0xBFC37F80u: goto label_BFC37F80; - case 0xBFC37F88u: goto label_BFC37F88; - case 0xBFC37F90u: goto label_BFC37F90; - case 0xBFC37FA0u: goto label_BFC37FA0; - case 0xBFC37FB4u: goto label_BFC37FB4; - case 0xBFC37FBCu: goto label_BFC37FBC; - case 0xBFC37FC0u: goto label_BFC37FC0; - case 0xBFC37FCCu: goto label_BFC37FCC; - case 0xBFC37FD4u: goto label_BFC37FD4; - case 0xBFC37FDCu: goto label_BFC37FDC; - case 0xBFC37FE0u: goto label_BFC37FE0; - case 0xBFC37FE8u: goto label_BFC37FE8; - case 0xBFC37FECu: goto label_BFC37FEC; - case 0xBFC37FF4u: goto label_BFC37FF4; - case 0xBFC37FFCu: goto label_BFC37FFC; - case 0xBFC3801Cu: goto label_BFC3801C; - default: break; - } - } -label_BFC37F4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37F4C: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37F50: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37F54: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37F58: 04810003 bgez $a0, 0xBFC37F68 */ - uint32_t psx_brA_BFC37F58 = cpu->gpr[4]; - psx_taken_BFC37F58 = ((int32_t)psx_brA_BFC37F58 >= 0); - psx_delay_BFC37F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37F5C: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF5Cu); -#endif - if (psx_delay_BFC37F58) { - psx_delay_BFC37F58 = 0; - if (psx_taken_BFC37F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF68u); - goto label_BFC37F68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF60u); - } -label_BFC37F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37F60: 10000009 beq $zero, $zero, 0xBFC37F88 */ - uint32_t psx_brA_BFC37F60 = cpu->gpr[0]; uint32_t psx_brB_BFC37F60 = cpu->gpr[0]; - psx_taken_BFC37F60 = (psx_brA_BFC37F60 == psx_brB_BFC37F60); - psx_delay_BFC37F60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC37F64: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF64u); -#endif - if (psx_delay_BFC37F60) { - psx_delay_BFC37F60 = 0; - if (psx_taken_BFC37F60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF88u); - goto label_BFC37F88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF68u); - } -label_BFC37F68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC37F68: 28810400 slti $at, $a0, 1024 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (1024) ? 1 : 0); - PGXP_ALU(0x28810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37F6C: 14200004 bne $at, $zero, 0xBFC37F80 */ - uint32_t psx_brA_BFC37F6C = cpu->gpr[1]; uint32_t psx_brB_BFC37F6C = cpu->gpr[0]; - psx_taken_BFC37F6C = (psx_brA_BFC37F6C != psx_brB_BFC37F6C); - psx_delay_BFC37F6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC37F70: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF70u); -#endif - if (psx_delay_BFC37F6C) { - psx_delay_BFC37F6C = 0; - if (psx_taken_BFC37F6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF80u); - goto label_BFC37F80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF74u); - } -label_BFC37F74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37F74: 10000002 beq $zero, $zero, 0xBFC37F80 */ - uint32_t psx_brA_BFC37F74 = cpu->gpr[0]; uint32_t psx_brB_BFC37F74 = cpu->gpr[0]; - psx_taken_BFC37F74 = (psx_brA_BFC37F74 == psx_brB_BFC37F74); - psx_delay_BFC37F74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37F78: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF78u); -#endif - if (psx_delay_BFC37F74) { - psx_delay_BFC37F74 = 0; - if (psx_taken_BFC37F74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF80u); - goto label_BFC37F80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF7Cu); - } -label_BFC37F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC37F7C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF7Cu); -#endif -label_BFC37F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC37F80: 00022400 sll $a0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00022400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC37F84: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF84u); -#endif -label_BFC37F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37F88: 04A10005 bgez $a1, 0xBFC37FA0 */ - uint32_t psx_brA_BFC37F88 = cpu->gpr[5]; - psx_taken_BFC37F88 = ((int32_t)psx_brA_BFC37F88 >= 0); - psx_delay_BFC37F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37F8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FF8Cu); -#endif - if (psx_delay_BFC37F88) { - psx_delay_BFC37F88 = 0; - if (psx_taken_BFC37F88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFA0u); - goto label_BFC37FA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FF90u); - } -label_BFC37F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37F90: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FF90u); -#endif - /* 0xBFC37F94: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FF94u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37F98: 10000016 beq $zero, $zero, 0xBFC37FF4 */ - uint32_t psx_brA_BFC37F98 = cpu->gpr[0]; uint32_t psx_brB_BFC37F98 = cpu->gpr[0]; - psx_taken_BFC37F98 = (psx_brA_BFC37F98 == psx_brB_BFC37F98); - psx_delay_BFC37F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC37F9C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FF9Cu); -#endif - if (psx_delay_BFC37F98) { - psx_delay_BFC37F98 = 0; - if (psx_taken_BFC37F98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFF4u); - goto label_BFC37FF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFA0u); - } -label_BFC37FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC37FA0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8004FFA0u); -#endif - /* 0xBFC37FA4: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8004FFA4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37FA8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8004FFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37FAC: 10400004 beq $v0, $zero, 0xBFC37FC0 */ - uint32_t psx_brA_BFC37FAC = cpu->gpr[2]; uint32_t psx_brB_BFC37FAC = cpu->gpr[0]; - psx_taken_BFC37FAC = (psx_brA_BFC37FAC == psx_brB_BFC37FAC); - psx_delay_BFC37FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FB0: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFB0u); -#endif - if (psx_delay_BFC37FAC) { - psx_delay_BFC37FAC = 0; - if (psx_taken_BFC37FAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFC0u); - goto label_BFC37FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFB4u); - } -label_BFC37FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37FB4: 10000002 beq $zero, $zero, 0xBFC37FC0 */ - uint32_t psx_brA_BFC37FB4 = cpu->gpr[0]; uint32_t psx_brB_BFC37FB4 = cpu->gpr[0]; - psx_taken_BFC37FB4 = (psx_brA_BFC37FB4 == psx_brB_BFC37FB4); - psx_delay_BFC37FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FB8: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFB8u); -#endif - if (psx_delay_BFC37FB4) { - psx_delay_BFC37FB4 = 0; - if (psx_taken_BFC37FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFC0u); - goto label_BFC37FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFBCu); - } -label_BFC37FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FBC: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFBCu); -#endif -label_BFC37FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2Au); -#endif - /* 0xBFC37FC0: 0065082A slt $at, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0065082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC37FC4: 10200009 beq $at, $zero, 0xBFC37FEC */ - uint32_t psx_brA_BFC37FC4 = cpu->gpr[1]; uint32_t psx_brB_BFC37FC4 = cpu->gpr[0]; - psx_taken_BFC37FC4 = (psx_brA_BFC37FC4 == psx_brB_BFC37FC4); - psx_delay_BFC37FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC37FC8: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFC8u); -#endif - if (psx_delay_BFC37FC4) { - psx_delay_BFC37FC4 = 0; - if (psx_taken_BFC37FC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFECu); - goto label_BFC37FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFCCu); - } -label_BFC37FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37FCC: 10400004 beq $v0, $zero, 0xBFC37FE0 */ - uint32_t psx_brA_BFC37FCC = cpu->gpr[2]; uint32_t psx_brB_BFC37FCC = cpu->gpr[0]; - psx_taken_BFC37FCC = (psx_brA_BFC37FCC == psx_brB_BFC37FCC); - psx_delay_BFC37FCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FD0: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFD0u); -#endif - if (psx_delay_BFC37FCC) { - psx_delay_BFC37FCC = 0; - if (psx_taken_BFC37FCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFE0u); - goto label_BFC37FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFD4u); - } -label_BFC37FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37FD4: 10000002 beq $zero, $zero, 0xBFC37FE0 */ - uint32_t psx_brA_BFC37FD4 = cpu->gpr[0]; uint32_t psx_brB_BFC37FD4 = cpu->gpr[0]; - psx_taken_BFC37FD4 = (psx_brA_BFC37FD4 == psx_brB_BFC37FD4); - psx_delay_BFC37FD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FD8: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFD8u); -#endif - if (psx_delay_BFC37FD4) { - psx_delay_BFC37FD4 = 0; - if (psx_taken_BFC37FD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFE0u); - goto label_BFC37FE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFDCu); - } -label_BFC37FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC37FDC: 240301FF addiu $v1, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240301FFu, cpu->gpr[3], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFDCu); -#endif -label_BFC37FE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC37FE0: 10000002 beq $zero, $zero, 0xBFC37FEC */ - uint32_t psx_brA_BFC37FE0 = cpu->gpr[0]; uint32_t psx_brB_BFC37FE0 = cpu->gpr[0]; - psx_taken_BFC37FE0 = (psx_brA_BFC37FE0 == psx_brB_BFC37FE0); - psx_delay_BFC37FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC37FE4: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFE4u); -#endif - if (psx_delay_BFC37FE0) { - psx_delay_BFC37FE0 = 0; - if (psx_taken_BFC37FE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFECu); - goto label_BFC37FEC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFE8u); - } -label_BFC37FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC37FE8: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFE8u); -#endif -label_BFC37FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC37FEC: 00062C00 sll $a1, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00062C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC37FF0: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFF0u); -#endif -label_BFC37FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC37FF4: 10400009 beq $v0, $zero, 0xBFC3801C */ - uint32_t psx_brA_BFC37FF4 = cpu->gpr[2]; uint32_t psx_brB_BFC37FF4 = cpu->gpr[0]; - psx_taken_BFC37FF4 = (psx_brA_BFC37FF4 == psx_brB_BFC37FF4); - psx_delay_BFC37FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC37FF8: 30A801FF andi $t0, $a1, 0x1FF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] & 0x1FFu; - PGXP_ALU(0x30A801FFu, cpu->gpr[8], _pgx1, 0x01FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFF8u); -#endif - if (psx_delay_BFC37FF4) { - psx_delay_BFC37FF4 = 0; - if (psx_taken_BFC37FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005001Cu); - goto label_BFC3801C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004FFFCu); - } -label_BFC37FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC37FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC37FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8004FFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC37FFC: 30AE0FFF andi $t6, $a1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFu; - PGXP_ALU(0x30AE0FFFu, cpu->gpr[14], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8004FFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38000: 000E7B00 sll $t7, $t6, 12 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 12u; - PGXP_ALU(0x000E7B00u, cpu->gpr[15], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80050000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38004: 3C01E400 lui $at, 0xE400 */ - cpu->gpr[1] = 0xE4000000u; - PGXP_ALU(0x3C01E400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC38008: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3800C: 30990FFF andi $t9, $a0, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFFu; - PGXP_ALU(0x30990FFFu, cpu->gpr[25], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005000Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38010: 03E00008 jr $ra */ - psx_delay_BFC38010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC38014: 03191025 or $v0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03191025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050014u); -#endif - if (psx_delay_BFC38010) { - psx_delay_BFC38010 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3801C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3801Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3801Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3801C: 00084A80 sll $t1, $t0, 10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 10u; - PGXP_ALU(0x00084A80u, cpu->gpr[9], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x8005001Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38020: 3C01E400 lui $at, 0xE400 */ - cpu->gpr[1] = 0xE4000000u; - PGXP_ALU(0x3C01E400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC38024: 01215025 or $t2, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[9] | cpu->gpr[1]; - PGXP_ALU(0x01215025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC38028: 308B03FF andi $t3, $a0, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] & 0x3FFu; - PGXP_ALU(0x308B03FFu, cpu->gpr[11], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC3802C: 014B1025 or $v0, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[10] | cpu->gpr[11]; - PGXP_ALU(0x014B1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005002Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38030: 03E00008 jr $ra */ - psx_delay_BFC38030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050034u); -#endif - if (psx_delay_BFC38030) { - psx_delay_BFC38030 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38038(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38038u); - int psx_delay_BFC3804C = 0; - int psx_taken_BFC3804C = 0; - int psx_delay_BFC38068 = 0; - int psx_delay_BFC38088 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38054u: goto label_BFC38054; - case 0xBFC38070u: goto label_BFC38070; - default: break; - } - } -label_BFC38038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38038: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050038u); -#endif - /* 0xBFC3803C: 8DCE9254 lw $t6, -28076($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005003Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9254u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005003Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38040: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80050040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC38044: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80050044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC38048: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80050048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3804C: 11C00008 beq $t6, $zero, 0xBFC38070 */ - uint32_t psx_brA_BFC3804C = cpu->gpr[14]; uint32_t psx_brB_BFC3804C = cpu->gpr[0]; - psx_taken_BFC3804C = (psx_brA_BFC3804C == psx_brB_BFC3804C); - psx_delay_BFC3804C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38050: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80050050u); -#endif - if (psx_delay_BFC3804C) { - psx_delay_BFC3804C = 0; - if (psx_taken_BFC3804C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050070u); - goto label_BFC38070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050054u); - } -label_BFC38054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC38054: 30AF0FFF andi $t7, $a1, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0xFFFu; - PGXP_ALU(0x30AF0FFFu, cpu->gpr[15], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC38058: 000FC300 sll $t8, $t7, 12 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 12u; - PGXP_ALU(0x000FC300u, cpu->gpr[24], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80050058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3805C: 3C01E500 lui $at, 0xE500 */ - cpu->gpr[1] = 0xE5000000u; - PGXP_ALU(0x3C01E500u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005005Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC38060: 0301C825 or $t9, $t8, $at */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[1]; - PGXP_ALU(0x0301C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC38064: 30880FFF andi $t0, $a0, 0xFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] & 0xFFFu; - PGXP_ALU(0x30880FFFu, cpu->gpr[8], _pgx1, 0x0FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38068: 03E00008 jr $ra */ - psx_delay_BFC38068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC3806C: 03281025 or $v0, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[25] | cpu->gpr[8]; - PGXP_ALU(0x03281025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005006Cu); -#endif - if (psx_delay_BFC38068) { - psx_delay_BFC38068 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC38070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC38070: 30A907FF andi $t1, $a1, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] & 0x7FFu; - PGXP_ALU(0x30A907FFu, cpu->gpr[9], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC38074: 000952C0 sll $t2, $t1, 11 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 11u; - PGXP_ALU(0x000952C0u, cpu->gpr[10], _pgx1, 11u); } -#ifdef PSX_COSIM - cosim_instr(0x80050074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38078: 3C01E500 lui $at, 0xE500 */ - cpu->gpr[1] = 0xE5000000u; - PGXP_ALU(0x3C01E500u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC02u); -#endif - /* 0xBFC3807C: 01415825 or $t3, $t2, $at */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[10] | cpu->gpr[1]; - PGXP_ALU(0x01415825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005007Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC38080: 308C07FF andi $t4, $a0, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[4] & 0x7FFu; - PGXP_ALU(0x308C07FFu, cpu->gpr[12], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC38084: 016C1025 or $v0, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[11] | cpu->gpr[12]; - PGXP_ALU(0x016C1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38088: 03E00008 jr $ra */ - psx_delay_BFC38088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3808C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005008Cu); -#endif - if (psx_delay_BFC38088) { - psx_delay_BFC38088 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38090(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38090u); - int psx_delay_BFC38090 = 0; - int psx_taken_BFC38090 = 0; - int psx_delay_BFC380F4 = 0; - int psx_delay_BFC38100 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38098u: goto label_BFC38098; - case 0xBFC38100u: goto label_BFC38100; - default: break; - } - } -label_BFC38090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC38090: 1080001B beq $a0, $zero, 0xBFC38100 */ - uint32_t psx_brA_BFC38090 = cpu->gpr[4]; uint32_t psx_brB_BFC38090 = cpu->gpr[0]; - psx_taken_BFC38090 = (psx_brA_BFC38090 == psx_brB_BFC38090); - psx_delay_BFC38090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38094: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050094u); -#endif - if (psx_delay_BFC38090) { - psx_delay_BFC38090 = 0; - if (psx_taken_BFC38090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050100u); - goto label_BFC38100; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050098u); - } -label_BFC38098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050098u); -#endif - /* 0xBFC38098: 84860002 lh $a2, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050098u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10u); } - PGXP_LOAD(0x84860002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050098u); -#endif - /* 0xBFC3809C: 84870006 lh $a3, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005009Cu); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x84870006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005009Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500A0u); -#endif - /* 0xBFC380A0: 84830000 lh $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800500A0u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x84830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800500A0u); -#endif - /* 0xBFC380A4: 84850004 lh $a1, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800500A4u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10u); } - PGXP_LOAD(0x84850004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800500A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC380A8: 30C600FF andi $a2, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30C600FFu, cpu->gpr[6], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC380AC: 24E7FFFF addiu $a3, $a3, -1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-1)); - PGXP_ALU(0x24E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC380B0: 000630C3 sra $a2, $a2, 3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 3u); - PGXP_ALU(0x000630C3u, cpu->gpr[6], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800500B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC380B4: 00E03827 nor $a3, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = ~(cpu->gpr[7] | cpu->gpr[0]); - PGXP_ALU(0x00E03827u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC380B8: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC380BC: 000318C3 sra $v1, $v1, 3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 3u); - PGXP_ALU(0x000318C3u, cpu->gpr[3], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800500BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC380C0: 30E700FF andi $a3, $a3, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFu; - PGXP_ALU(0x30E700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC380C4: 000673C0 sll $t6, $a2, 15 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[6] << 15u; - PGXP_ALU(0x000673C0u, cpu->gpr[14], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x800500C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC380C8: 3C01E200 lui $at, 0xE200 */ - cpu->gpr[1] = 0xE2000000u; - PGXP_ALU(0x3C01E200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800500C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC380CC: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC380D0: 00A02827 nor $a1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = ~(cpu->gpr[5] | cpu->gpr[0]); - PGXP_ALU(0x00A02827u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC380D4: 000738C3 sra $a3, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 3u); - PGXP_ALU(0x000738C3u, cpu->gpr[7], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800500D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC380D8: 01C17825 or $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C17825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC380DC: 0003C280 sll $t8, $v1, 10 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 10u; - PGXP_ALU(0x0003C280u, cpu->gpr[24], _pgx1, 10u); } -#ifdef PSX_COSIM - cosim_instr(0x800500DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC380E0: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800500E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC380E4: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC380E8: 00074140 sll $t0, $a3, 5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] << 5u; - PGXP_ALU(0x00074140u, cpu->gpr[8], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800500E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC380EC: 000528C3 sra $a1, $a1, 3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 3u); - PGXP_ALU(0x000528C3u, cpu->gpr[5], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800500ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800500F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC380F0: 03284825 or $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] | cpu->gpr[8]; - PGXP_ALU(0x03284825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC380F4: 03E00008 jr $ra */ - psx_delay_BFC380F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x224u); -#endif - /* 0xBFC380F8: 01251025 or $v0, $t1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[9] | cpu->gpr[5]; - PGXP_ALU(0x01251025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800500F8u); -#endif - if (psx_delay_BFC380F4) { - psx_delay_BFC380F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC38100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38100: 03E00008 jr $ra */ - psx_delay_BFC38100 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050104u); -#endif - if (psx_delay_BFC38100) { - psx_delay_BFC38100 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38108(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38108u); - int psx_delay_BFC38108 = 0; - int psx_taken_BFC38108 = 0; - int psx_delay_BFC38114 = 0; - int psx_delay_BFC38128 = 0; - int psx_taken_BFC38128 = 0; - int psx_delay_BFC38140 = 0; - int psx_taken_BFC38140 = 0; - int psx_delay_BFC38150 = 0; - int psx_delay_BFC38164 = 0; - int psx_taken_BFC38164 = 0; - int psx_delay_BFC38180 = 0; - int psx_taken_BFC38180 = 0; - int psx_delay_BFC38194 = 0; - int psx_taken_BFC38194 = 0; - int psx_delay_BFC381A8 = 0; - int psx_taken_BFC381A8 = 0; - int psx_delay_BFC381B8 = 0; - int psx_delay_BFC381CC = 0; - int psx_taken_BFC381CC = 0; - int psx_delay_BFC381D4 = 0; - int psx_taken_BFC381D4 = 0; - int psx_delay_BFC381DC = 0; - int psx_taken_BFC381DC = 0; - int psx_delay_BFC381E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38110u: goto label_BFC38110; - case 0xBFC3811Cu: goto label_BFC3811C; - case 0xBFC38130u: goto label_BFC38130; - case 0xBFC38148u: goto label_BFC38148; - case 0xBFC38150u: goto label_BFC38150; - case 0xBFC38158u: goto label_BFC38158; - case 0xBFC3816Cu: goto label_BFC3816C; - case 0xBFC38188u: goto label_BFC38188; - case 0xBFC3818Cu: goto label_BFC3818C; - case 0xBFC3819Cu: goto label_BFC3819C; - case 0xBFC381B0u: goto label_BFC381B0; - case 0xBFC381B4u: goto label_BFC381B4; - case 0xBFC381B8u: goto label_BFC381B8; - case 0xBFC381C0u: goto label_BFC381C0; - case 0xBFC381D4u: goto label_BFC381D4; - case 0xBFC381DCu: goto label_BFC381DC; - case 0xBFC381E4u: goto label_BFC381E4; - default: break; - } - } -label_BFC38108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38108: 1000002D beq $zero, $zero, 0xBFC381C0 */ - uint32_t psx_brA_BFC38108 = cpu->gpr[0]; uint32_t psx_brB_BFC38108 = cpu->gpr[0]; - psx_taken_BFC38108 = (psx_brA_BFC38108 == psx_brB_BFC38108); - psx_delay_BFC38108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3810C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005010Cu); -#endif - if (psx_delay_BFC38108) { - psx_delay_BFC38108 = 0; - if (psx_taken_BFC38108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501C0u); - goto label_BFC381C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050110u); - } -label_BFC38110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050110u); -#endif - /* 0xBFC38110: 84820000 lh $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050110u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x84820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38114: 03E00008 jr $ra */ - psx_delay_BFC38114 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38118: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050118u); -#endif - if (psx_delay_BFC38114) { - psx_delay_BFC38114 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3811C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3811Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3811Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005011Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3811C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005011Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050120u); -#endif - /* 0xBFC38120: 8DCE9258 lw $t6, -28072($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050120u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9258u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38124: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC38128: 11C00007 beq $t6, $zero, 0xBFC38148 */ - uint32_t psx_brA_BFC38128 = cpu->gpr[14]; uint32_t psx_brB_BFC38128 = cpu->gpr[0]; - psx_taken_BFC38128 = (psx_brA_BFC38128 == psx_brB_BFC38128); - psx_delay_BFC38128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3812C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005012Cu); -#endif - if (psx_delay_BFC38128) { - psx_delay_BFC38128 = 0; - if (psx_taken_BFC38128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050148u); - goto label_BFC38148; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050130u); - } -label_BFC38130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050130u); -#endif - /* 0xBFC38130: 848F0000 lh $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050130u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050130u); -#endif - /* 0xBFC38134: 84990004 lh $t9, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050134u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008001u); -#endif - /* 0xBFC38138: 000FC023 subu $t8, $zero, $t7 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[0] - cpu->gpr[15]; - PGXP_ALU(0x000FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC3813C: 03191823 subu $v1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[24] - cpu->gpr[25]; - PGXP_ALU(0x03191823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005013Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38140: 10000003 beq $zero, $zero, 0xBFC38150 */ - uint32_t psx_brA_BFC38140 = cpu->gpr[0]; uint32_t psx_brB_BFC38140 = cpu->gpr[0]; - psx_taken_BFC38140 = (psx_brA_BFC38140 == psx_brB_BFC38140); - psx_delay_BFC38140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38144: 24630400 addiu $v1, $v1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1024)); - PGXP_ALU(0x24630400u, cpu->gpr[3], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80050144u); -#endif - if (psx_delay_BFC38140) { - psx_delay_BFC38140 = 0; - if (psx_taken_BFC38140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050150u); - goto label_BFC38150; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050148u); - } -label_BFC38148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050148u); -#endif - /* 0xBFC38148: 84830000 lh $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050148u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x84830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3814C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005014Cu); -#endif -label_BFC38150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38150: 03E00008 jr $ra */ - psx_delay_BFC38150 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC38154: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050154u); -#endif - if (psx_delay_BFC38150) { - psx_delay_BFC38150 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC38158: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38158u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38158: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050158u); -#endif - /* 0xBFC3815C: 8D089258 lw $t0, -28072($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28072; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28072)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005015Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089258u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005015Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC38164: 1100000D beq $t0, $zero, 0xBFC3819C */ - uint32_t psx_brA_BFC38164 = cpu->gpr[8]; uint32_t psx_brB_BFC38164 = cpu->gpr[0]; - psx_taken_BFC38164 = (psx_brA_BFC38164 == psx_brB_BFC38164); - psx_delay_BFC38164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050168u); -#endif - if (psx_delay_BFC38164) { - psx_delay_BFC38164 = 0; - if (psx_taken_BFC38164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005019Cu); - goto label_BFC3819C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005016Cu); - } -label_BFC3816C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3816Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3816Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005016Cu); -#endif - /* 0xBFC3816C: 848B0004 lh $t3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005016Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x848B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005016Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050170u); -#endif - /* 0xBFC38170: 84890000 lh $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050170u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x84890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x601u); -#endif - /* 0xBFC38178: 00095023 subu $t2, $zero, $t1 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[0] - cpu->gpr[9]; - PGXP_ALU(0x00095023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3817C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005017Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38180: 05610002 bgez $t3, 0xBFC3818C */ - uint32_t psx_brA_BFC38180 = cpu->gpr[11]; - psx_taken_BFC38180 = ((int32_t)psx_brA_BFC38180 >= 0); - psx_delay_BFC38180 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x803u); -#endif - /* 0xBFC38184: 01600821 addu $at, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050184u); -#endif - if (psx_delay_BFC38180) { - psx_delay_BFC38180 = 0; - if (psx_taken_BFC38180) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005018Cu); - goto label_BFC3818C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050188u); - } -label_BFC38188: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38188u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38188: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050188u); -#endif -label_BFC3818C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3818Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3818Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005018Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3818C: 00016043 sra $t4, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00016043u, cpu->gpr[12], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005018Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1408u); -#endif - /* 0xBFC38190: 014C1823 subu $v1, $t2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[10] - cpu->gpr[12]; - PGXP_ALU(0x014C1823u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38194: 10000008 beq $zero, $zero, 0xBFC381B8 */ - uint32_t psx_brA_BFC38194 = cpu->gpr[0]; uint32_t psx_brB_BFC38194 = cpu->gpr[0]; - psx_taken_BFC38194 = (psx_brA_BFC38194 == psx_brB_BFC38194); - psx_delay_BFC38194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38198: 24630400 addiu $v1, $v1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1024)); - PGXP_ALU(0x24630400u, cpu->gpr[3], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80050198u); -#endif - if (psx_delay_BFC38194) { - psx_delay_BFC38194 = 0; - if (psx_taken_BFC38194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501B8u); - goto label_BFC381B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005019Cu); - } -label_BFC3819C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3819Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005019Cu); -#endif - /* 0xBFC3819C: 84830000 lh $v1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005019Cu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } - PGXP_LOAD(0x84830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005019Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC381A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800501A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC381A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800501A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC381A8: 04610002 bgez $v1, 0xBFC381B4 */ - uint32_t psx_brA_BFC381A8 = cpu->gpr[3]; - psx_taken_BFC381A8 = ((int32_t)psx_brA_BFC381A8 >= 0); - psx_delay_BFC381A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC381AC: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800501ACu); -#endif - if (psx_delay_BFC381A8) { - psx_delay_BFC381A8 = 0; - if (psx_taken_BFC381A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501B4u); - goto label_BFC381B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501B0u); - } -label_BFC381B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC381B0: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800501B0u); -#endif -label_BFC381B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC381B4: 00011843 sra $v1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00011843u, cpu->gpr[3], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800501B4u); -#endif -label_BFC381B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC381B8: 03E00008 jr $ra */ - psx_delay_BFC381B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC381BC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800501BCu); -#endif - if (psx_delay_BFC381B8) { - psx_delay_BFC381B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC381C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC381C0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800501C0u); -#endif - /* 0xBFC381C4: 8C429254 lw $v0, -28076($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800501C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429254u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800501C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC381C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800501C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC381CC: 1040FFD0 beq $v0, $zero, 0xBFC38110 */ - uint32_t psx_brA_BFC381CC = cpu->gpr[2]; uint32_t psx_brB_BFC381CC = cpu->gpr[0]; - psx_taken_BFC381CC = (psx_brA_BFC381CC == psx_brB_BFC381CC); - psx_delay_BFC381CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC381D0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800501D0u); -#endif - if (psx_delay_BFC381CC) { - psx_delay_BFC381CC = 0; - if (psx_taken_BFC381CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050110u); - goto label_BFC38110; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501D4u); - } -label_BFC381D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC381D4: 1041FFD1 beq $v0, $at, 0xBFC3811C */ - uint32_t psx_brA_BFC381D4 = cpu->gpr[2]; uint32_t psx_brB_BFC381D4 = cpu->gpr[1]; - psx_taken_BFC381D4 = (psx_brA_BFC381D4 == psx_brB_BFC381D4); - psx_delay_BFC381D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC381D8: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800501D8u); -#endif - if (psx_delay_BFC381D4) { - psx_delay_BFC381D4 = 0; - if (psx_taken_BFC381D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005011Cu); - goto label_BFC3811C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501DCu); - } -label_BFC381DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC381DC: 1041FFDE beq $v0, $at, 0xBFC38158 */ - uint32_t psx_brA_BFC381DC = cpu->gpr[2]; uint32_t psx_brB_BFC381DC = cpu->gpr[1]; - psx_taken_BFC381DC = (psx_brA_BFC381DC == psx_brB_BFC381DC); - psx_delay_BFC381DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC381E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800501E0u); -#endif - if (psx_delay_BFC381DC) { - psx_delay_BFC381DC = 0; - if (psx_taken_BFC381DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050158u); - goto label_BFC38158; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800501E4u); - } -label_BFC381E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC381E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC381E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800501E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC381E4: 03E00008 jr $ra */ - psx_delay_BFC381E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC381E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800501E8u); -#endif - if (psx_delay_BFC381E4) { - psx_delay_BFC381E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38204(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38204u); - int psx_delay_BFC38268 = 0; - int psx_delay_BFC38288 = 0; - int psx_taken_BFC38288 = 0; - int psx_delay_BFC38290 = 0; - int psx_delay_BFC38298 = 0; - int psx_taken_BFC38298 = 0; - int psx_delay_BFC382A0 = 0; - int psx_taken_BFC382A0 = 0; - int psx_delay_BFC382C0 = 0; - int psx_taken_BFC382C0 = 0; - int psx_delay_BFC382D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38270u: goto label_BFC38270; - case 0xBFC38290u: goto label_BFC38290; - case 0xBFC38298u: goto label_BFC38298; - case 0xBFC382A0u: goto label_BFC382A0; - case 0xBFC382A8u: goto label_BFC382A8; - case 0xBFC382C8u: goto label_BFC382C8; - case 0xBFC382CCu: goto label_BFC382CC; - case 0xBFC382D0u: goto label_BFC382D0; - default: break; - } - } -label_BFC38204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38204: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38208: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050208u); -#endif - /* 0xBFC3820C: 8C4292C0 lw $v0, -27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005020Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005020Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38210: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050210u); return; } g_debug_last_store_pc = 0x80050210u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC38214: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050214u); return; } g_debug_last_store_pc = 0x80050214u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050214u); -#endif - /* 0xBFC38218: 8C400000 lw $zero, 0($v0) */ - { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050218u); return; } (void)psx_cyc_load_word(cpu, psx_addr, 0, 0x4u); } -#ifdef PSX_COSIM - cosim_instr(0x80050218u); -#endif - /* 0xBFC3821C: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005021Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005021Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38220: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050220u); -#endif - /* 0xBFC38224: 8C6392BC lw $v1, -27972($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050224u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6392BCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38228: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC3822C: 01C17825 or $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C17825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005022Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC38230: AC4F0000 sw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050230u); return; } g_debug_last_store_pc = 0x80050230u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC38234: 0005C080 sll $t8, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 2u; - PGXP_ALU(0x0005C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38238: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3823C: AC600000 sw $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005023Cu); return; } g_debug_last_store_pc = 0x8005023Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005023Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050240u); -#endif - /* 0xBFC38240: 8D2992B4 lw $t1, -27980($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27980; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27980)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050240u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2992B4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC38244: 0098C821 addu $t9, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x0098C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38248: 2728FFFC addiu $t0, $t9, -4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (-4)); - PGXP_ALU(0x2728FFFCu, cpu->gpr[8], _pgx1, 0xFFFFFFFCu); } -#ifdef PSX_COSIM - cosim_instr(0x80050248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3824C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005024Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38250: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050250u); return; } g_debug_last_store_pc = 0x80050250u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050250u); -#endif - /* 0xBFC38254: 8D4A92B8 lw $t2, -27976($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050254u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92B8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38258: 3C0B1100 lui $t3, 0x1100 */ - cpu->gpr[11] = 0x11000000u; - PGXP_ALU(0x3C0B1100u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3825C: 356B0002 ori $t3, $t3, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] | 0x2u; - PGXP_ALU(0x356B0002u, cpu->gpr[11], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005025Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC38260: AD450000 sw $a1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050260u); return; } g_debug_last_store_pc = 0x80050260u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAD450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80050260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x808u); -#endif - /* 0xBFC38264: AC6B0000 sw $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050264u); return; } g_debug_last_store_pc = 0x80050264u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38268: 0C0144BA jal 0xB00512E8 */ - cpu->gpr[31] = 0x80050270u; /* jal link before delay slot */ - psx_delay_BFC38268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3826C: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005026Cu); return; } g_debug_last_store_pc = 0x8005026Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005026Cu); -#endif - if (psx_delay_BFC38268) { - psx_delay_BFC38268 = 0; - cpu->gpr[31] = 0x80050270u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512E8u); - cpu->pc = 0x800512E8u; return; - } -label_BFC38270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38270: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050270u); -#endif - /* 0xBFC38274: 8D8C92BC lw $t4, -27972($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050274u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C92BCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38278: 3C100100 lui $s0, 0x100 */ - cpu->gpr[16] = 0x01000000u; - PGXP_ALU(0x3C100100u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050278u); -#endif - /* 0xBFC3827C: 8D8D0000 lw $t5, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005027Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x8D8D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005027Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38280: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16000u); -#endif - /* 0xBFC38284: 01B07024 and $t6, $t5, $s0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[16]; - PGXP_ALU(0x01B07024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC38288: 11C00010 beq $t6, $zero, 0xBFC382CC */ - uint32_t psx_brA_BFC38288 = cpu->gpr[14]; uint32_t psx_brB_BFC38288 = cpu->gpr[0]; - psx_taken_BFC38288 = (psx_brA_BFC38288 == psx_brB_BFC38288); - psx_delay_BFC38288 = 1; - /* 0xBFC3828C: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005028Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005028Cu); -#endif - if (psx_delay_BFC38288) { - psx_delay_BFC38288 = 0; - if (psx_taken_BFC38288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502CCu); - goto label_BFC382CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050290u); - } -label_BFC38290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38290: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80050298u; /* jal link before delay slot */ - psx_delay_BFC38290 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050294u); -#endif - if (psx_delay_BFC38290) { - psx_delay_BFC38290 = 0; - cpu->gpr[31] = 0x80050298u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC38298: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38298u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38298: 10400003 beq $v0, $zero, 0xBFC382A8 */ - uint32_t psx_brA_BFC38298 = cpu->gpr[2]; uint32_t psx_brB_BFC38298 = cpu->gpr[0]; - psx_taken_BFC38298 = (psx_brA_BFC38298 == psx_brB_BFC38298); - psx_delay_BFC38298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3829C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005029Cu); -#endif - if (psx_delay_BFC38298) { - psx_delay_BFC38298 = 0; - if (psx_taken_BFC38298) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502A8u); - goto label_BFC382A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502A0u); - } -label_BFC382A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382A0: 1000000B beq $zero, $zero, 0xBFC382D0 */ - uint32_t psx_brA_BFC382A0 = cpu->gpr[0]; uint32_t psx_brB_BFC382A0 = cpu->gpr[0]; - psx_taken_BFC382A0 = (psx_brA_BFC382A0 == psx_brB_BFC382A0); - psx_delay_BFC382A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC382A4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800502A4u); -#endif - if (psx_delay_BFC382A0) { - psx_delay_BFC382A0 = 0; - if (psx_taken_BFC382A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502D0u); - goto label_BFC382D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502A8u); - } -label_BFC382A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC382A8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800502A8u); -#endif - /* 0xBFC382AC: 8DEF92BC lw $t7, -27972($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27972; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27972)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502ACu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92BCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800502ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502B0u); -#endif - /* 0xBFC382B4: 8DF80000 lw $t8, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502B4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800502B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC382BC: 0310C824 and $t9, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16]; - PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800502BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC382C0: 1720FFF3 bne $t9, $zero, 0xBFC38290 */ - uint32_t psx_brA_BFC382C0 = cpu->gpr[25]; uint32_t psx_brB_BFC382C0 = cpu->gpr[0]; - psx_taken_BFC382C0 = (psx_brA_BFC382C0 != psx_brB_BFC382C0); - psx_delay_BFC382C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502C4u); -#endif - if (psx_delay_BFC382C0) { - psx_delay_BFC382C0 = 0; - if (psx_taken_BFC382C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050290u); - goto label_BFC38290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800502C8u); - } -label_BFC382C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502C8u); -#endif - /* 0xBFC382C8: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800502C8u); -#endif -label_BFC382CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502CCu); -#endif -label_BFC382D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502D0u); -#endif - /* 0xBFC382D0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800502D0u); -#endif - /* 0xBFC382D4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502D4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800502D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC382D8: 03E00008 jr $ra */ - psx_delay_BFC382D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC382DC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800502DCu); -#endif - if (psx_delay_BFC382D8) { - psx_delay_BFC382D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC382E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC382E0u); - int psx_delay_BFC38318 = 0; - int psx_taken_BFC38318 = 0; - int psx_delay_BFC38320 = 0; - int psx_taken_BFC38320 = 0; - int psx_delay_BFC38334 = 0; - int psx_taken_BFC38334 = 0; - int psx_delay_BFC3833C = 0; - int psx_taken_BFC3833C = 0; - int psx_delay_BFC38358 = 0; - int psx_taken_BFC38358 = 0; - int psx_delay_BFC38360 = 0; - int psx_taken_BFC38360 = 0; - int psx_delay_BFC38374 = 0; - int psx_taken_BFC38374 = 0; - int psx_delay_BFC3837C = 0; - int psx_taken_BFC3837C = 0; - int psx_delay_BFC38394 = 0; - int psx_taken_BFC38394 = 0; - int psx_delay_BFC3839C = 0; - int psx_taken_BFC3839C = 0; - int psx_delay_BFC383A4 = 0; - int psx_taken_BFC383A4 = 0; - int psx_delay_BFC383B0 = 0; - int psx_taken_BFC383B0 = 0; - int psx_delay_BFC383D0 = 0; - int psx_taken_BFC383D0 = 0; - int psx_delay_BFC383E4 = 0; - int psx_taken_BFC383E4 = 0; - int psx_delay_BFC38474 = 0; - int psx_delay_BFC3848C = 0; - int psx_delay_BFC384A4 = 0; - int psx_delay_BFC384B8 = 0; - int psx_taken_BFC384B8 = 0; - int psx_delay_BFC3850C = 0; - int psx_delay_BFC3851C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38320u: goto label_BFC38320; - case 0xBFC38328u: goto label_BFC38328; - case 0xBFC3832Cu: goto label_BFC3832C; - case 0xBFC3833Cu: goto label_BFC3833C; - case 0xBFC38344u: goto label_BFC38344; - case 0xBFC38348u: goto label_BFC38348; - case 0xBFC3834Cu: goto label_BFC3834C; - case 0xBFC38350u: goto label_BFC38350; - case 0xBFC38360u: goto label_BFC38360; - case 0xBFC38368u: goto label_BFC38368; - case 0xBFC3837Cu: goto label_BFC3837C; - case 0xBFC38384u: goto label_BFC38384; - case 0xBFC38388u: goto label_BFC38388; - case 0xBFC3839Cu: goto label_BFC3839C; - case 0xBFC383A4u: goto label_BFC383A4; - case 0xBFC383ACu: goto label_BFC383AC; - case 0xBFC383B0u: goto label_BFC383B0; - case 0xBFC383B8u: goto label_BFC383B8; - case 0xBFC383C0u: goto label_BFC383C0; - case 0xBFC383C4u: goto label_BFC383C4; - case 0xBFC383D8u: goto label_BFC383D8; - case 0xBFC383ECu: goto label_BFC383EC; - case 0xBFC383F0u: goto label_BFC383F0; - case 0xBFC3847Cu: goto label_BFC3847C; - case 0xBFC38494u: goto label_BFC38494; - case 0xBFC384ACu: goto label_BFC384AC; - case 0xBFC384C0u: goto label_BFC384C0; - case 0xBFC384C4u: goto label_BFC384C4; - case 0xBFC38508u: goto label_BFC38508; - case 0xBFC38514u: goto label_BFC38514; - default: break; - } - } -label_BFC382E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC382E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC382E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC382E0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800502E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC382E4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800502E4u); return; } g_debug_last_store_pc = 0x800502E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800502E4u); -#endif - /* 0xBFC382E8: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800502E8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800502E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800502F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC382F0: A7AE0018 sh $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800502F0u); return; } g_debug_last_store_pc = 0x800502F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800502F0u); -#endif - /* 0xBFC382F4: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800502F4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800502F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC382F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800502F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC382FC: A7AF001A sh $t7, 26($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800502FCu); return; } g_debug_last_store_pc = 0x800502FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF001Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800502FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050300u); -#endif - /* 0xBFC38300: 84980004 lh $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050300u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC38308: A7B8001C sh $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050308u); return; } g_debug_last_store_pc = 0x80050308u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050308u); -#endif - /* 0xBFC3830C: 84990006 lh $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005030Cu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005030Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050310u); -#endif - /* 0xBFC38310: 87A8001C lh $t0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050310u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A8001Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC38314: A7B9001E sh $t9, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050314u); return; } g_debug_last_store_pc = 0x80050314u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9001Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38318: 05010004 bgez $t0, 0xBFC3832C */ - uint32_t psx_brA_BFC38318 = cpu->gpr[8]; - psx_taken_BFC38318 = ((int32_t)psx_brA_BFC38318 >= 0); - psx_delay_BFC38318 = 1; - /* 0xBFC3831C: 87A9001C lh $t1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005031Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005031Cu); -#endif - if (psx_delay_BFC38318) { - psx_delay_BFC38318 = 0; - if (psx_taken_BFC38318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005032Cu); - goto label_BFC3832C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050320u); - } -label_BFC38320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38320: 1000000B beq $zero, $zero, 0xBFC38350 */ - uint32_t psx_brA_BFC38320 = cpu->gpr[0]; uint32_t psx_brB_BFC38320 = cpu->gpr[0]; - psx_taken_BFC38320 = (psx_brA_BFC38320 == psx_brB_BFC38320); - psx_delay_BFC38320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC38324: A7A0001C sh $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050324u); return; } g_debug_last_store_pc = 0x80050324u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050324u); -#endif - if (psx_delay_BFC38320) { - psx_delay_BFC38320 = 0; - if (psx_taken_BFC38320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050350u); - goto label_BFC38350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050328u); - } -label_BFC38328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050328u); -#endif - /* 0xBFC38328: 87A9001C lh $t1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050328u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050328u); -#endif -label_BFC3832C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3832Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005032Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3832C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005032Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC38330: 29210400 slti $at, $t1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0); - PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80050330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC38334: 14200004 bne $at, $zero, 0xBFC38348 */ - uint32_t psx_brA_BFC38334 = cpu->gpr[1]; uint32_t psx_brB_BFC38334 = cpu->gpr[0]; - psx_taken_BFC38334 = (psx_brA_BFC38334 != psx_brB_BFC38334); - psx_delay_BFC38334 = 1; - /* 0xBFC38338: 87A2001C lh $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050338u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050338u); -#endif - if (psx_delay_BFC38334) { - psx_delay_BFC38334 = 0; - if (psx_taken_BFC38334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050348u); - goto label_BFC38348; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005033Cu); - } -label_BFC3833C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3833Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3833Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005033Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3833C: 10000003 beq $zero, $zero, 0xBFC3834C */ - uint32_t psx_brA_BFC3833C = cpu->gpr[0]; uint32_t psx_brB_BFC3833C = cpu->gpr[0]; - psx_taken_BFC3833C = (psx_brA_BFC3833C == psx_brB_BFC3833C); - psx_delay_BFC3833C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38340: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050340u); -#endif - if (psx_delay_BFC3833C) { - psx_delay_BFC3833C = 0; - if (psx_taken_BFC3833C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005034Cu); - goto label_BFC3834C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050344u); - } -label_BFC38344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050344u); -#endif - /* 0xBFC38344: 87A2001C lh $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050344u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050344u); -#endif -label_BFC38348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050348u); -#endif -label_BFC3834C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3834Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3834Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005034Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3834C: A7A2001C sh $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005034Cu); return; } g_debug_last_store_pc = 0x8005034Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA7A2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005034Cu); -#endif -label_BFC38350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050350u); -#endif - /* 0xBFC38350: 87AA001E lh $t2, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050350u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA001Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38354: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38358: 05410003 bgez $t2, 0xBFC38368 */ - uint32_t psx_brA_BFC38358 = cpu->gpr[10]; - psx_taken_BFC38358 = ((int32_t)psx_brA_BFC38358 >= 0); - psx_delay_BFC38358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3835C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005035Cu); -#endif - if (psx_delay_BFC38358) { - psx_delay_BFC38358 = 0; - if (psx_taken_BFC38358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050368u); - goto label_BFC38368; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050360u); - } -label_BFC38360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38360: 10000018 beq $zero, $zero, 0xBFC383C4 */ - uint32_t psx_brA_BFC38360 = cpu->gpr[0]; uint32_t psx_brB_BFC38360 = cpu->gpr[0]; - psx_taken_BFC38360 = (psx_brA_BFC38360 == psx_brB_BFC38360); - psx_delay_BFC38360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC38364: A7A0001E sh $zero, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050364u); return; } g_debug_last_store_pc = 0x80050364u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0001Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050364u); -#endif - if (psx_delay_BFC38360) { - psx_delay_BFC38360 = 0; - if (psx_taken_BFC38360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503C4u); - goto label_BFC383C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050368u); - } -label_BFC38368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38368: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050368u); -#endif - /* 0xBFC3836C: 8C639254 lw $v1, -28076($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005036Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639254u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005036Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38370: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC38374: 10600004 beq $v1, $zero, 0xBFC38388 */ - uint32_t psx_brA_BFC38374 = cpu->gpr[3]; uint32_t psx_brB_BFC38374 = cpu->gpr[0]; - psx_taken_BFC38374 = (psx_brA_BFC38374 == psx_brB_BFC38374); - psx_delay_BFC38374 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38378: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050378u); -#endif - if (psx_delay_BFC38374) { - psx_delay_BFC38374 = 0; - if (psx_taken_BFC38374) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050388u); - goto label_BFC38388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005037Cu); - } -label_BFC3837C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3837Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005037Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3837C: 10000002 beq $zero, $zero, 0xBFC38388 */ - uint32_t psx_brA_BFC3837C = cpu->gpr[0]; uint32_t psx_brB_BFC3837C = cpu->gpr[0]; - psx_taken_BFC3837C = (psx_brA_BFC3837C == psx_brB_BFC3837C); - psx_delay_BFC3837C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38380: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050380u); -#endif - if (psx_delay_BFC3837C) { - psx_delay_BFC3837C = 0; - if (psx_taken_BFC3837C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050388u); - goto label_BFC38388; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050384u); - } -label_BFC38384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38384: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050384u); -#endif -label_BFC38388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050388u); -#endif - /* 0xBFC38388: 87AB001E lh $t3, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050388u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB001Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3838C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005038Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x806u); -#endif - /* 0xBFC38390: 004B082A slt $at, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC38394: 10200008 beq $at, $zero, 0xBFC383B8 */ - uint32_t psx_brA_BFC38394 = cpu->gpr[1]; uint32_t psx_brB_BFC38394 = cpu->gpr[0]; - psx_taken_BFC38394 = (psx_brA_BFC38394 == psx_brB_BFC38394); - psx_delay_BFC38394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050398u); -#endif - if (psx_delay_BFC38394) { - psx_delay_BFC38394 = 0; - if (psx_taken_BFC38394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503B8u); - goto label_BFC383B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005039Cu); - } -label_BFC3839C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3839Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005039Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3839C: 10600004 beq $v1, $zero, 0xBFC383B0 */ - uint32_t psx_brA_BFC3839C = cpu->gpr[3]; uint32_t psx_brB_BFC3839C = cpu->gpr[0]; - psx_taken_BFC3839C = (psx_brA_BFC3839C == psx_brB_BFC3839C); - psx_delay_BFC3839C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC383A0: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800503A0u); -#endif - if (psx_delay_BFC3839C) { - psx_delay_BFC3839C = 0; - if (psx_taken_BFC3839C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503B0u); - goto label_BFC383B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503A4u); - } -label_BFC383A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC383A4: 10000002 beq $zero, $zero, 0xBFC383B0 */ - uint32_t psx_brA_BFC383A4 = cpu->gpr[0]; uint32_t psx_brB_BFC383A4 = cpu->gpr[0]; - psx_taken_BFC383A4 = (psx_brA_BFC383A4 == psx_brB_BFC383A4); - psx_delay_BFC383A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC383A8: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800503A8u); -#endif - if (psx_delay_BFC383A4) { - psx_delay_BFC383A4 = 0; - if (psx_taken_BFC383A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503B0u); - goto label_BFC383B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503ACu); - } -label_BFC383AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC383AC: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800503ACu); -#endif -label_BFC383B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC383B0: 10000003 beq $zero, $zero, 0xBFC383C0 */ - uint32_t psx_brA_BFC383B0 = cpu->gpr[0]; uint32_t psx_brB_BFC383B0 = cpu->gpr[0]; - psx_taken_BFC383B0 = (psx_brA_BFC383B0 == psx_brB_BFC383B0); - psx_delay_BFC383B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC383B4: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800503B4u); -#endif - if (psx_delay_BFC383B0) { - psx_delay_BFC383B0 = 0; - if (psx_taken_BFC383B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503C0u); - goto label_BFC383C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503B8u); - } -label_BFC383B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503B8u); -#endif - /* 0xBFC383B8: 87A3001E lh $v1, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800503B8u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3001Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800503B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC383BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800503BCu); -#endif -label_BFC383C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC383C0: A7A3001E sh $v1, 30($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800503C0u); return; } g_debug_last_store_pc = 0x800503C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3001Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800503C0u); -#endif -label_BFC383C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503C4u); -#endif - /* 0xBFC383C4: 87AC0018 lh $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800503C4u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800503C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC383C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800503C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC383CC: 318D003F andi $t5, $t4, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x3Fu; - PGXP_ALU(0x318D003Fu, cpu->gpr[13], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800503CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC383D0: 15A00007 bne $t5, $zero, 0xBFC383F0 */ - uint32_t psx_brA_BFC383D0 = cpu->gpr[13]; uint32_t psx_brB_BFC383D0 = cpu->gpr[0]; - psx_taken_BFC383D0 = (psx_brA_BFC383D0 != psx_brB_BFC383D0); - psx_delay_BFC383D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC383D4: 3C0200FF lui $v0, 0xFF */ - cpu->gpr[2] = 0x00FF0000u; - PGXP_ALU(0x3C0200FFu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800503D4u); -#endif - if (psx_delay_BFC383D0) { - psx_delay_BFC383D0 = 0; - if (psx_taken_BFC383D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503F0u); - goto label_BFC383F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503D8u); - } -label_BFC383D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503D8u); -#endif - /* 0xBFC383D8: 87AE001C lh $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800503D8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800503D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC383DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800503DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC383E0: 31CF003F andi $t7, $t6, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x3Fu; - PGXP_ALU(0x31CF003Fu, cpu->gpr[15], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800503E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC383E4: 11E00037 beq $t7, $zero, 0xBFC384C4 */ - uint32_t psx_brA_BFC383E4 = cpu->gpr[15]; uint32_t psx_brB_BFC383E4 = cpu->gpr[0]; - psx_taken_BFC383E4 = (psx_brA_BFC383E4 == psx_brB_BFC383E4); - psx_delay_BFC383E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC383E8: 3C0B04FF lui $t3, 0x4FF */ - cpu->gpr[11] = 0x04FF0000u; - PGXP_ALU(0x3C0B04FFu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800503E8u); -#endif - if (psx_delay_BFC383E4) { - psx_delay_BFC383E4 = 0; - if (psx_taken_BFC383E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800504C4u); - goto label_BFC384C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800503ECu); - } -label_BFC383EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC383EC: 3C0200FF lui $v0, 0xFF */ - cpu->gpr[2] = 0x00FF0000u; - PGXP_ALU(0x3C0200FFu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800503ECu); -#endif -label_BFC383F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC383F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC383F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800503F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC383F0: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800503F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC383F4: 3442FFFF ori $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0xFFFFu; - PGXP_ALU(0x3442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800503F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC383F8: 2718E9B8 addiu $t8, $t8, -5704 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-5704)); - PGXP_ALU(0x2718E9B8u, cpu->gpr[24], _pgx1, 0xFFFFE9B8u); } -#ifdef PSX_COSIM - cosim_instr(0x800503F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC383FC: 0302C824 and $t9, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2]; - PGXP_ALU(0x0302C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800503FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38400: 3C010700 lui $at, 0x700 */ - cpu->gpr[1] = 0x07000000u; - PGXP_ALU(0x3C010700u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000102u); -#endif - /* 0xBFC38404: 03214025 or $t0, $t9, $at */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[25] | cpu->gpr[1]; - PGXP_ALU(0x03214025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38408: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3840C: 3C09E300 lui $t1, 0xE300 */ - cpu->gpr[9] = 0xE3000000u; - PGXP_ALU(0x3C09E300u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005040Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC38410: AC28E998 sw $t0, -5736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050410u); return; } g_debug_last_store_pc = 0x80050410u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28E998u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC38414: AC29E99C sw $t1, -5732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050414u); return; } g_debug_last_store_pc = 0x80050414u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29E99Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38418: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3841C: 3C0AE4FF lui $t2, 0xE4FF */ - cpu->gpr[10] = 0xE4FF0000u; - PGXP_ALU(0x3C0AE4FFu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005041Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38420: 354AFFFF ori $t2, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] | 0xFFFFu; - PGXP_ALU(0x354AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38424: 3C0BE500 lui $t3, 0xE500 */ - cpu->gpr[11] = 0xE5000000u; - PGXP_ALU(0x3C0BE500u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC38428: AC2AE9A0 sw $t2, -5728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050428u); return; } g_debug_last_store_pc = 0x80050428u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AE9A0u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3842C: AC2BE9A4 sw $t3, -5724($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5724; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5724)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005042Cu); return; } g_debug_last_store_pc = 0x8005042Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BE9A4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005042Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38430: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38434: 3C0CE600 lui $t4, 0xE600 */ - cpu->gpr[12] = 0xE6000000u; - PGXP_ALU(0x3C0CE600u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC38438: AC2CE9A8 sw $t4, -5720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050438u); return; } g_debug_last_store_pc = 0x80050438u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CE9A8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3843C: 3C016000 lui $at, 0x6000 */ - cpu->gpr[1] = 0x60000000u; - PGXP_ALU(0x3C016000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005043Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024u); -#endif - /* 0xBFC38440: 00A26824 and $t5, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2]; - PGXP_ALU(0x00A26824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6002u); -#endif - /* 0xBFC38444: 01A17025 or $t6, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[13] | cpu->gpr[1]; - PGXP_ALU(0x01A17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38448: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3844C: AC2EE9AC sw $t6, -5716($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005044Cu); return; } g_debug_last_store_pc = 0x8005044Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EE9ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005044Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050450u); -#endif - /* 0xBFC38450: 8FAF0018 lw $t7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050450u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050450u); -#endif - /* 0xBFC38454: 8FB8001C lw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050454u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38458: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3845C: 3C1903FF lui $t9, 0x3FF */ - cpu->gpr[25] = 0x03FF0000u; - PGXP_ALU(0x3C1903FFu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005045Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC38460: AC2FE9B0 sw $t7, -5712($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050460u); return; } g_debug_last_store_pc = 0x80050460u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FE9B0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC38464: AC38E9B4 sw $t8, -5708($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050464u); return; } g_debug_last_store_pc = 0x80050464u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38E9B4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38468: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3846C: 3739FFFF ori $t9, $t9, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] | 0xFFFFu; - PGXP_ALU(0x3739FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005046Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC38470: AC39E9B8 sw $t9, -5704($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050470u); return; } g_debug_last_store_pc = 0x80050470u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39E9B8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38474: 0C0142E0 jal 0xB0050B80 */ - cpu->gpr[31] = 0x8005047Cu; /* jal link before delay slot */ - psx_delay_BFC38474 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC38478: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80050478u); -#endif - if (psx_delay_BFC38474) { - psx_delay_BFC38474 = 0; - cpu->gpr[31] = 0x8005047Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B80u); - cpu->pc = 0x80050B80u; return; - } -label_BFC3847C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3847Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3847Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005047Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3847C: 3C01E300 lui $at, 0xE300 */ - cpu->gpr[1] = 0xE3000000u; - PGXP_ALU(0x3C01E300u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005047Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC38480: 00414025 or $t0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00414025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38484: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC38488: AC28E9BC sw $t0, -5700($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5700; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5700)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050488u); return; } g_debug_last_store_pc = 0x80050488u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28E9BCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3848C: 0C0142E0 jal 0xB0050B80 */ - cpu->gpr[31] = 0x80050494u; /* jal link before delay slot */ - psx_delay_BFC3848C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC38490: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80050490u); -#endif - if (psx_delay_BFC3848C) { - psx_delay_BFC3848C = 0; - cpu->gpr[31] = 0x80050494u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B80u); - cpu->pc = 0x80050B80u; return; - } -label_BFC38494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38494: 3C01E400 lui $at, 0xE400 */ - cpu->gpr[1] = 0xE4000000u; - PGXP_ALU(0x3C01E400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x206u); -#endif - /* 0xBFC38498: 00414825 or $t1, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00414825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3849C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005049Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC384A0: AC29E9C0 sw $t1, -5696($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504A0u); return; } g_debug_last_store_pc = 0x800504A0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29E9C0u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800504A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC384A4: 0C0142E0 jal 0xB0050B80 */ - cpu->gpr[31] = 0x800504ACu; /* jal link before delay slot */ - psx_delay_BFC384A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC384A8: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800504A8u); -#endif - if (psx_delay_BFC384A4) { - psx_delay_BFC384A4 = 0; - cpu->gpr[31] = 0x800504ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B80u); - cpu->pc = 0x80050B80u; return; - } -label_BFC384AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC384ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC384ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC384AC: 3C01E500 lui $at, 0xE500 */ - cpu->gpr[1] = 0xE5000000u; - PGXP_ALU(0x3C01E500u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC384B0: 00415025 or $t2, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00415025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800504B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC384B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC384B8: 10000013 beq $zero, $zero, 0xBFC38508 */ - uint32_t psx_brA_BFC384B8 = cpu->gpr[0]; uint32_t psx_brB_BFC384B8 = cpu->gpr[0]; - psx_taken_BFC384B8 = (psx_brA_BFC384B8 == psx_brB_BFC384B8); - psx_delay_BFC384B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC384BC: AC2AE9C4 sw $t2, -5692($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504BCu); return; } g_debug_last_store_pc = 0x800504BCu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AE9C4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800504BCu); -#endif - if (psx_delay_BFC384B8) { - psx_delay_BFC384B8 = 0; - if (psx_taken_BFC384B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050508u); - goto label_BFC38508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800504C0u); - } -label_BFC384C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC384C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC384C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC384C0: 3C0B04FF lui $t3, 0x4FF */ - cpu->gpr[11] = 0x04FF0000u; - PGXP_ALU(0x3C0B04FFu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504C0u); -#endif -label_BFC384C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC384C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC384C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC384C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC384C8: 3C0200FF lui $v0, 0xFF */ - cpu->gpr[2] = 0x00FF0000u; - PGXP_ALU(0x3C0200FFu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC384CC: 356BFFFF ori $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] | 0xFFFFu; - PGXP_ALU(0x356BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800504CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC384D0: 3C0CE600 lui $t4, 0xE600 */ - cpu->gpr[12] = 0xE6000000u; - PGXP_ALU(0x3C0CE600u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC384D4: 3442FFFF ori $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0xFFFFu; - PGXP_ALU(0x3442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800504D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC384D8: AC2BE998 sw $t3, -5736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504D8u); return; } g_debug_last_store_pc = 0x800504D8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BE998u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800504D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC384DC: AC2CE99C sw $t4, -5732($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504DCu); return; } g_debug_last_store_pc = 0x800504DCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CE99Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800504DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC384E0: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024u); -#endif - /* 0xBFC384E4: 00A26824 and $t5, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[5] & cpu->gpr[2]; - PGXP_ALU(0x00A26824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800504E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6002u); -#endif - /* 0xBFC384E8: 01A17025 or $t6, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[13] | cpu->gpr[1]; - PGXP_ALU(0x01A17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800504E8u); -#endif - /* 0xBFC384EC: 8FAF0018 lw $t7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504ECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800504ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800504F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC384F0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800504F0u); -#endif - /* 0xBFC384F4: 8FB8001C lw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504F4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800504F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC384F8: AC2EE9A0 sw $t6, -5728($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504F8u); return; } g_debug_last_store_pc = 0x800504F8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EE9A0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800504F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC384FC: AC2FE9A4 sw $t7, -5724($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5724; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5724)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800504FCu); return; } g_debug_last_store_pc = 0x800504FCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FE9A4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800504FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38500: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC38504: AC38E9A8 sw $t8, -5720($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050504u); return; } g_debug_last_store_pc = 0x80050504u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38E9A8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050504u); -#endif -label_BFC38508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38508: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3850C: 0C0142CA jal 0xB0050B28 */ - cpu->gpr[31] = 0x80050514u; /* jal link before delay slot */ - psx_delay_BFC3850C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38510: 2484E998 addiu $a0, $a0, -5736 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-5736)); - PGXP_ALU(0x2484E998u, cpu->gpr[4], _pgx1, 0xFFFFE998u); } -#ifdef PSX_COSIM - cosim_instr(0x80050510u); -#endif - if (psx_delay_BFC3850C) { - psx_delay_BFC3850C = 0; - cpu->gpr[31] = 0x80050514u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B28u); - cpu->pc = 0x80050B28u; return; - } -label_BFC38514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050514u); -#endif - /* 0xBFC38514: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050514u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38518: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80050518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3851C: 03E00008 jr $ra */ - psx_delay_BFC3851C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38520: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050520u); -#endif - if (psx_delay_BFC3851C) { - psx_delay_BFC3851C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38524(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38524u); - int psx_delay_BFC38564 = 0; - int psx_taken_BFC38564 = 0; - int psx_delay_BFC3856C = 0; - int psx_taken_BFC3856C = 0; - int psx_delay_BFC38580 = 0; - int psx_taken_BFC38580 = 0; - int psx_delay_BFC38588 = 0; - int psx_taken_BFC38588 = 0; - int psx_delay_BFC385A4 = 0; - int psx_taken_BFC385A4 = 0; - int psx_delay_BFC385AC = 0; - int psx_taken_BFC385AC = 0; - int psx_delay_BFC385C0 = 0; - int psx_taken_BFC385C0 = 0; - int psx_delay_BFC385C8 = 0; - int psx_taken_BFC385C8 = 0; - int psx_delay_BFC385E0 = 0; - int psx_taken_BFC385E0 = 0; - int psx_delay_BFC385E8 = 0; - int psx_taken_BFC385E8 = 0; - int psx_delay_BFC385F0 = 0; - int psx_taken_BFC385F0 = 0; - int psx_delay_BFC385FC = 0; - int psx_taken_BFC385FC = 0; - int psx_delay_BFC3861C = 0; - int psx_taken_BFC3861C = 0; - int psx_delay_BFC38628 = 0; - int psx_taken_BFC38628 = 0; - int psx_delay_BFC38658 = 0; - int psx_taken_BFC38658 = 0; - int psx_delay_BFC38668 = 0; - int psx_delay_BFC38688 = 0; - int psx_taken_BFC38688 = 0; - int psx_delay_BFC38690 = 0; - int psx_delay_BFC38698 = 0; - int psx_taken_BFC38698 = 0; - int psx_delay_BFC386B8 = 0; - int psx_taken_BFC386B8 = 0; - int psx_delay_BFC386D8 = 0; - int psx_taken_BFC386D8 = 0; - int psx_delay_BFC386E4 = 0; - int psx_taken_BFC386E4 = 0; - int psx_delay_BFC38710 = 0; - int psx_taken_BFC38710 = 0; - int psx_delay_BFC38718 = 0; - int psx_taken_BFC38718 = 0; - int psx_delay_BFC38728 = 0; - int psx_taken_BFC38728 = 0; - int psx_delay_BFC38740 = 0; - int psx_taken_BFC38740 = 0; - int psx_delay_BFC38748 = 0; - int psx_taken_BFC38748 = 0; - int psx_delay_BFC38758 = 0; - int psx_taken_BFC38758 = 0; - int psx_delay_BFC387CC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3856Cu: goto label_BFC3856C; - case 0xBFC38574u: goto label_BFC38574; - case 0xBFC38578u: goto label_BFC38578; - case 0xBFC38588u: goto label_BFC38588; - case 0xBFC38590u: goto label_BFC38590; - case 0xBFC38594u: goto label_BFC38594; - case 0xBFC38598u: goto label_BFC38598; - case 0xBFC3859Cu: goto label_BFC3859C; - case 0xBFC385ACu: goto label_BFC385AC; - case 0xBFC385B4u: goto label_BFC385B4; - case 0xBFC385C8u: goto label_BFC385C8; - case 0xBFC385D0u: goto label_BFC385D0; - case 0xBFC385D4u: goto label_BFC385D4; - case 0xBFC385E8u: goto label_BFC385E8; - case 0xBFC385F0u: goto label_BFC385F0; - case 0xBFC385F8u: goto label_BFC385F8; - case 0xBFC385FCu: goto label_BFC385FC; - case 0xBFC38604u: goto label_BFC38604; - case 0xBFC3860Cu: goto label_BFC3860C; - case 0xBFC38610u: goto label_BFC38610; - case 0xBFC38624u: goto label_BFC38624; - case 0xBFC38630u: goto label_BFC38630; - case 0xBFC38634u: goto label_BFC38634; - case 0xBFC38644u: goto label_BFC38644; - case 0xBFC38660u: goto label_BFC38660; - case 0xBFC38664u: goto label_BFC38664; - case 0xBFC38670u: goto label_BFC38670; - case 0xBFC38690u: goto label_BFC38690; - case 0xBFC38698u: goto label_BFC38698; - case 0xBFC386A0u: goto label_BFC386A0; - case 0xBFC386C0u: goto label_BFC386C0; - case 0xBFC386E0u: goto label_BFC386E0; - case 0xBFC386ECu: goto label_BFC386EC; - case 0xBFC386F0u: goto label_BFC386F0; - case 0xBFC386F4u: goto label_BFC386F4; - case 0xBFC38718u: goto label_BFC38718; - case 0xBFC38720u: goto label_BFC38720; - case 0xBFC38724u: goto label_BFC38724; - case 0xBFC38730u: goto label_BFC38730; - case 0xBFC38748u: goto label_BFC38748; - case 0xBFC38750u: goto label_BFC38750; - case 0xBFC38754u: goto label_BFC38754; - case 0xBFC38760u: goto label_BFC38760; - case 0xBFC387C0u: goto label_BFC387C0; - default: break; - } - } -label_BFC38524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38524: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38528: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050528u); return; } g_debug_last_store_pc = 0x80050528u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3852C: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005052Cu); return; } g_debug_last_store_pc = 0x8005052Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005052Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC38530: AFB0001C sw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050530u); return; } g_debug_last_store_pc = 0x80050530u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050530u); -#endif - /* 0xBFC38534: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050534u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC38538: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3853C: A7AE0028 sh $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005053Cu); return; } g_debug_last_store_pc = 0x8005053Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005053Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050540u); -#endif - /* 0xBFC38540: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050540u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC38544: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC38548: A7AF002A sh $t7, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050548u); return; } g_debug_last_store_pc = 0x80050548u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF002Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050548u); -#endif - /* 0xBFC3854C: 84980004 lh $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005054Cu); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005054Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38550: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC38554: A7B8002C sh $t8, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050554u); return; } g_debug_last_store_pc = 0x80050554u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8002Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050554u); -#endif - /* 0xBFC38558: 84990006 lh $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050558u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050558u); -#endif - /* 0xBFC3855C: 87A8002C lh $t0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005055Cu); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A8002Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005055Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC38560: A7B9002E sh $t9, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050560u); return; } g_debug_last_store_pc = 0x80050560u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9002Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38564: 05010004 bgez $t0, 0xBFC38578 */ - uint32_t psx_brA_BFC38564 = cpu->gpr[8]; - psx_taken_BFC38564 = ((int32_t)psx_brA_BFC38564 >= 0); - psx_delay_BFC38564 = 1; - /* 0xBFC38568: 87A9002C lh $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050568u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050568u); -#endif - if (psx_delay_BFC38564) { - psx_delay_BFC38564 = 0; - if (psx_taken_BFC38564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050578u); - goto label_BFC38578; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005056Cu); - } -label_BFC3856C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3856Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3856C: 1000000B beq $zero, $zero, 0xBFC3859C */ - uint32_t psx_brA_BFC3856C = cpu->gpr[0]; uint32_t psx_brB_BFC3856C = cpu->gpr[0]; - psx_taken_BFC3856C = (psx_brA_BFC3856C == psx_brB_BFC3856C); - psx_delay_BFC3856C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC38570: A7A0002C sh $zero, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050570u); return; } g_debug_last_store_pc = 0x80050570u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0002Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050570u); -#endif - if (psx_delay_BFC3856C) { - psx_delay_BFC3856C = 0; - if (psx_taken_BFC3856C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005059Cu); - goto label_BFC3859C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050574u); - } -label_BFC38574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050574u); -#endif - /* 0xBFC38574: 87A9002C lh $t1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050574u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9002Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050574u); -#endif -label_BFC38578: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38578u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38578: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3857C: 29210400 slti $at, $t1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0); - PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x8005057Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC38580: 14200004 bne $at, $zero, 0xBFC38594 */ - uint32_t psx_brA_BFC38580 = cpu->gpr[1]; uint32_t psx_brB_BFC38580 = cpu->gpr[0]; - psx_taken_BFC38580 = (psx_brA_BFC38580 != psx_brB_BFC38580); - psx_delay_BFC38580 = 1; - /* 0xBFC38584: 87A3002C lh $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050584u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050584u); -#endif - if (psx_delay_BFC38580) { - psx_delay_BFC38580 = 0; - if (psx_taken_BFC38580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050594u); - goto label_BFC38594; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050588u); - } -label_BFC38588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38588: 10000003 beq $zero, $zero, 0xBFC38598 */ - uint32_t psx_brA_BFC38588 = cpu->gpr[0]; uint32_t psx_brB_BFC38588 = cpu->gpr[0]; - psx_taken_BFC38588 = (psx_brA_BFC38588 == psx_brB_BFC38588); - psx_delay_BFC38588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3858C: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005058Cu); -#endif - if (psx_delay_BFC38588) { - psx_delay_BFC38588 = 0; - if (psx_taken_BFC38588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050598u); - goto label_BFC38598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050590u); - } -label_BFC38590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050590u); -#endif - /* 0xBFC38590: 87A3002C lh $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050590u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050590u); -#endif -label_BFC38594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38594: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050594u); -#endif -label_BFC38598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC38598: A7A3002C sh $v1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050598u); return; } g_debug_last_store_pc = 0x80050598u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3002Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050598u); -#endif -label_BFC3859C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3859Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005059Cu); -#endif - /* 0xBFC3859C: 87AA002E lh $t2, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005059Cu); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA002Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005059Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800505A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC385A4: 05410003 bgez $t2, 0xBFC385B4 */ - uint32_t psx_brA_BFC385A4 = cpu->gpr[10]; - psx_taken_BFC385A4 = ((int32_t)psx_brA_BFC385A4 >= 0); - psx_delay_BFC385A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800505A8u); -#endif - if (psx_delay_BFC385A4) { - psx_delay_BFC385A4 = 0; - if (psx_taken_BFC385A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505B4u); - goto label_BFC385B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505ACu); - } -label_BFC385AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385AC: 10000018 beq $zero, $zero, 0xBFC38610 */ - uint32_t psx_brA_BFC385AC = cpu->gpr[0]; uint32_t psx_brB_BFC385AC = cpu->gpr[0]; - psx_taken_BFC385AC = (psx_brA_BFC385AC == psx_brB_BFC385AC); - psx_delay_BFC385AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC385B0: A7A0002E sh $zero, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800505B0u); return; } g_debug_last_store_pc = 0x800505B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0002Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800505B0u); -#endif - if (psx_delay_BFC385AC) { - psx_delay_BFC385AC = 0; - if (psx_taken_BFC385AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050610u); - goto label_BFC38610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505B4u); - } -label_BFC385B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC385B4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800505B4u); -#endif - /* 0xBFC385B8: 8C639254 lw $v1, -28076($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800505B8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639254u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800505B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800505BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC385C0: 10600004 beq $v1, $zero, 0xBFC385D4 */ - uint32_t psx_brA_BFC385C0 = cpu->gpr[3]; uint32_t psx_brB_BFC385C0 = cpu->gpr[0]; - psx_taken_BFC385C0 = (psx_brA_BFC385C0 == psx_brB_BFC385C0); - psx_delay_BFC385C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385C4: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505C4u); -#endif - if (psx_delay_BFC385C0) { - psx_delay_BFC385C0 = 0; - if (psx_taken_BFC385C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505D4u); - goto label_BFC385D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505C8u); - } -label_BFC385C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385C8: 10000002 beq $zero, $zero, 0xBFC385D4 */ - uint32_t psx_brA_BFC385C8 = cpu->gpr[0]; uint32_t psx_brB_BFC385C8 = cpu->gpr[0]; - psx_taken_BFC385C8 = (psx_brA_BFC385C8 == psx_brB_BFC385C8); - psx_delay_BFC385C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385CC: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505CCu); -#endif - if (psx_delay_BFC385C8) { - psx_delay_BFC385C8 = 0; - if (psx_taken_BFC385C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505D4u); - goto label_BFC385D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505D0u); - } -label_BFC385D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385D0: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505D0u); -#endif -label_BFC385D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505D4u); -#endif - /* 0xBFC385D4: 87AB002E lh $t3, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800505D4u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB002Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800505D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800505D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x806u); -#endif - /* 0xBFC385DC: 004B082A slt $at, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800505DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC385E0: 10200008 beq $at, $zero, 0xBFC38604 */ - uint32_t psx_brA_BFC385E0 = cpu->gpr[1]; uint32_t psx_brB_BFC385E0 = cpu->gpr[0]; - psx_taken_BFC385E0 = (psx_brA_BFC385E0 == psx_brB_BFC385E0); - psx_delay_BFC385E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800505E4u); -#endif - if (psx_delay_BFC385E0) { - psx_delay_BFC385E0 = 0; - if (psx_taken_BFC385E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050604u); - goto label_BFC38604; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505E8u); - } -label_BFC385E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC385E8: 10600004 beq $v1, $zero, 0xBFC385FC */ - uint32_t psx_brA_BFC385E8 = cpu->gpr[3]; uint32_t psx_brB_BFC385E8 = cpu->gpr[0]; - psx_taken_BFC385E8 = (psx_brA_BFC385E8 == psx_brB_BFC385E8); - psx_delay_BFC385E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385EC: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505ECu); -#endif - if (psx_delay_BFC385E8) { - psx_delay_BFC385E8 = 0; - if (psx_taken_BFC385E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505FCu); - goto label_BFC385FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505F0u); - } -label_BFC385F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385F0: 10000002 beq $zero, $zero, 0xBFC385FC */ - uint32_t psx_brA_BFC385F0 = cpu->gpr[0]; uint32_t psx_brB_BFC385F0 = cpu->gpr[0]; - psx_taken_BFC385F0 = (psx_brA_BFC385F0 == psx_brB_BFC385F0); - psx_delay_BFC385F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385F4: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505F4u); -#endif - if (psx_delay_BFC385F0) { - psx_delay_BFC385F0 = 0; - if (psx_taken_BFC385F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505FCu); - goto label_BFC385FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800505F8u); - } -label_BFC385F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC385F8: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800505F8u); -#endif -label_BFC385FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC385FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC385FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800505FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC385FC: 10000003 beq $zero, $zero, 0xBFC3860C */ - uint32_t psx_brA_BFC385FC = cpu->gpr[0]; uint32_t psx_brB_BFC385FC = cpu->gpr[0]; - psx_taken_BFC385FC = (psx_brA_BFC385FC == psx_brB_BFC385FC); - psx_delay_BFC385FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC38600: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050600u); -#endif - if (psx_delay_BFC385FC) { - psx_delay_BFC385FC = 0; - if (psx_taken_BFC385FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005060Cu); - goto label_BFC3860C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050604u); - } -label_BFC38604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050604u); -#endif - /* 0xBFC38604: 87A3002E lh $v1, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050604u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3002Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38608: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050608u); -#endif -label_BFC3860C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3860Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3860Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005060Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3860C: A7A3002E sh $v1, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005060Cu); return; } g_debug_last_store_pc = 0x8005060Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3002Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005060Cu); -#endif -label_BFC38610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050610u); -#endif - /* 0xBFC38610: 87AC0028 lh $t4, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050610u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC0028u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38614: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC38618: 29810400 slti $at, $t4, 1024 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (1024) ? 1 : 0); - PGXP_ALU(0x29810400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80050618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3861C: 14200009 bne $at, $zero, 0xBFC38644 */ - uint32_t psx_brA_BFC3861C = cpu->gpr[1]; uint32_t psx_brB_BFC3861C = cpu->gpr[0]; - psx_taken_BFC3861C = (psx_brA_BFC3861C != psx_brB_BFC3861C); - psx_delay_BFC3861C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050620u); -#endif - /* 0xBFC38620: 87AF002C lh $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050620u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050620u); -#endif - if (psx_delay_BFC3861C) { - psx_delay_BFC3861C = 0; - if (psx_taken_BFC3861C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050644u); - goto label_BFC38644; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050624u); - } -label_BFC38624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC38624: 258DFC00 addiu $t5, $t4, -1024 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] + (-1024)); - PGXP_ALU(0x258DFC00u, cpu->gpr[13], _pgx1, 0xFFFFFC00u); } -#ifdef PSX_COSIM - cosim_instr(0x80050624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC38628: 05A10002 bgez $t5, 0xBFC38634 */ - uint32_t psx_brA_BFC38628 = cpu->gpr[13]; - psx_taken_BFC38628 = ((int32_t)psx_brA_BFC38628 >= 0); - psx_delay_BFC38628 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2003u); -#endif - /* 0xBFC3862C: 01A00821 addu $at, $t5, $zero */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[13] + cpu->gpr[0]; - PGXP_ALU(0x01A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005062Cu); -#endif - if (psx_delay_BFC38628) { - psx_delay_BFC38628 = 0; - if (psx_taken_BFC38628) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050634u); - goto label_BFC38634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050630u); - } -label_BFC38630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38630: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050630u); -#endif -label_BFC38634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC38634: 00017043 sra $t6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017043u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80050634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC38638: A7AE0028 sh $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050638u); return; } g_debug_last_store_pc = 0x80050638u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3863C: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005063Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050640u); -#endif - /* 0xBFC38640: 87AF002C lh $t7, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050640u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050640u); -#endif -label_BFC38644: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38644u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050644u); -#endif - /* 0xBFC38644: 87B8002E lh $t8, 46($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 46; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050644u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B8002Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC38648: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050648u); return; } g_debug_last_store_pc = 0x80050648u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3864C: 01F80019 multu $t7, $t8 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[15] * (uint64_t)cpu->gpr[24]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[15])); -#endif - PGXP_MULDIV(0x01F80019u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[24]); -#ifdef PSX_COSIM - cosim_instr(0x8005064Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38650: 0000C812 mflo $t9 */ - cpu->gpr[25] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C812u, cpu->gpr[25], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38654: 27280001 addiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27280001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38658: 05010002 bgez $t0, 0xBFC38664 */ - uint32_t psx_brA_BFC38658 = cpu->gpr[8]; - psx_taken_BFC38658 = ((int32_t)psx_brA_BFC38658 >= 0); - psx_delay_BFC38658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x103u); -#endif - /* 0xBFC3865C: 01000821 addu $at, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005065Cu); -#endif - if (psx_delay_BFC38658) { - psx_delay_BFC38658 = 0; - if (psx_taken_BFC38658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050664u); - goto label_BFC38664; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050660u); - } -label_BFC38660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38660: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050660u); -#endif -label_BFC38664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC38664: 00014843 sra $t1, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00014843u, cpu->gpr[9], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80050664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38668: 0C0144BA jal 0xB00512E8 */ - cpu->gpr[31] = 0x80050670u; /* jal link before delay slot */ - psx_delay_BFC38668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3866C: AFA9003C sw $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005066Cu); return; } g_debug_last_store_pc = 0x8005066Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005066Cu); -#endif - if (psx_delay_BFC38668) { - psx_delay_BFC38668 = 0; - cpu->gpr[31] = 0x80050670u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512E8u); - cpu->pc = 0x800512E8u; return; - } -label_BFC38670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38670: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050670u); -#endif - /* 0xBFC38674: 8D4A92A4 lw $t2, -27996($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050674u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92A4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38678: 3C100400 lui $s0, 0x400 */ - cpu->gpr[16] = 0x04000000u; - PGXP_ALU(0x3C100400u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050678u); -#endif - /* 0xBFC3867C: 8D4B0000 lw $t3, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005067Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x8D4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005067Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC38684: 01706024 and $t4, $t3, $s0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[16]; - PGXP_ALU(0x01706024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC38688: 1580000D bne $t4, $zero, 0xBFC386C0 */ - uint32_t psx_brA_BFC38688 = cpu->gpr[12]; uint32_t psx_brB_BFC38688 = cpu->gpr[0]; - psx_taken_BFC38688 = (psx_brA_BFC38688 != psx_brB_BFC38688); - psx_delay_BFC38688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3868C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005068Cu); -#endif - if (psx_delay_BFC38688) { - psx_delay_BFC38688 = 0; - if (psx_taken_BFC38688) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506C0u); - goto label_BFC386C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050690u); - } -label_BFC38690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38690: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80050698u; /* jal link before delay slot */ - psx_delay_BFC38690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050694u); -#endif - if (psx_delay_BFC38690) { - psx_delay_BFC38690 = 0; - cpu->gpr[31] = 0x80050698u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC38698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38698: 14400009 bne $v0, $zero, 0xBFC386C0 */ - uint32_t psx_brA_BFC38698 = cpu->gpr[2]; uint32_t psx_brB_BFC38698 = cpu->gpr[0]; - psx_taken_BFC38698 = (psx_brA_BFC38698 != psx_brB_BFC38698); - psx_delay_BFC38698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3869C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005069Cu); -#endif - if (psx_delay_BFC38698) { - psx_delay_BFC38698 = 0; - if (psx_taken_BFC38698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506C0u); - goto label_BFC386C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506A0u); - } -label_BFC386A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC386A0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506A0u); -#endif - /* 0xBFC386A4: 8DAD92A4 lw $t5, -27996($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506A4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD92A4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800506A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800506A8u); -#endif - /* 0xBFC386AC: 8DAE0000 lw $t6, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x8DAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800506ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800506B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC386B4: 01D07824 and $t7, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16]; - PGXP_ALU(0x01D07824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800506B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC386B8: 11E0FFF5 beq $t7, $zero, 0xBFC38690 */ - uint32_t psx_brA_BFC386B8 = cpu->gpr[15]; uint32_t psx_brB_BFC386B8 = cpu->gpr[0]; - psx_taken_BFC386B8 = (psx_brA_BFC386B8 == psx_brB_BFC386B8); - psx_delay_BFC386B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800506BCu); -#endif - if (psx_delay_BFC386B8) { - psx_delay_BFC386B8 = 0; - if (psx_taken_BFC386B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050690u); - goto label_BFC38690; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506C0u); - } -label_BFC386C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC386C0: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506C0u); -#endif - /* 0xBFC386C4: 8CA592A0 lw $a1, -28000($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506C4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA592A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800506C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC386C8: 3C180100 lui $t8, 0x100 */ - cpu->gpr[24] = 0x01000000u; - PGXP_ALU(0x3C180100u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC386CC: ACB80000 sw $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506CCu); return; } g_debug_last_store_pc = 0x800506CCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800506CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506D0u); -#endif - /* 0xBFC386D0: 8FB90030 lw $t9, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506D0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90030u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800506D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800506D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC386D8: 13200005 beq $t9, $zero, 0xBFC386F0 */ - uint32_t psx_brA_BFC386D8 = cpu->gpr[25]; uint32_t psx_brB_BFC386D8 = cpu->gpr[0]; - psx_taken_BFC386D8 = (psx_brA_BFC386D8 == psx_brB_BFC386D8); - psx_delay_BFC386D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC386DC: 3C09A000 lui $t1, 0xA000 */ - cpu->gpr[9] = 0xA0000000u; - PGXP_ALU(0x3C09A000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506DCu); -#endif - if (psx_delay_BFC386D8) { - psx_delay_BFC386D8 = 0; - if (psx_taken_BFC386D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506F0u); - goto label_BFC386F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506E0u); - } -label_BFC386E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC386E0: 3C08B000 lui $t0, 0xB000 */ - cpu->gpr[8] = 0xB0000000u; - PGXP_ALU(0x3C08B000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386E4: 10000003 beq $zero, $zero, 0xBFC386F4 */ - uint32_t psx_brA_BFC386E4 = cpu->gpr[0]; uint32_t psx_brB_BFC386E4 = cpu->gpr[0]; - psx_taken_BFC386E4 = (psx_brA_BFC386E4 == psx_brB_BFC386E4); - psx_delay_BFC386E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC386E8: ACA80000 sw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506E8u); return; } g_debug_last_store_pc = 0x800506E8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800506E8u); -#endif - if (psx_delay_BFC386E4) { - psx_delay_BFC386E4 = 0; - if (psx_taken_BFC386E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506F4u); - goto label_BFC386F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800506ECu); - } -label_BFC386EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC386EC: 3C09A000 lui $t1, 0xA000 */ - cpu->gpr[9] = 0xA0000000u; - PGXP_ALU(0x3C09A000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800506ECu); -#endif -label_BFC386F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC386F0: ACA90000 sw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506F0u); return; } g_debug_last_store_pc = 0x800506F0u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800506F0u); -#endif -label_BFC386F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC386F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC386F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800506F4u); -#endif - /* 0xBFC386F4: 8FA6003C lw $a2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506F4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6003Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800506F4u); -#endif - /* 0xBFC386F8: 8FAA0028 lw $t2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800506F8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0028u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800506F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC386FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800506FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC38700: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050700u); return; } g_debug_last_store_pc = 0x80050700u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050700u); -#endif - /* 0xBFC38704: 8FAB002C lw $t3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050704u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB002Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38708: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3870C: ACAB0000 sw $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005070Cu); return; } g_debug_last_store_pc = 0x8005070Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACAB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005070Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC38710: 04C10004 bgez $a2, 0xBFC38724 */ - uint32_t psx_brA_BFC38710 = cpu->gpr[6]; - psx_taken_BFC38710 = ((int32_t)psx_brA_BFC38710 >= 0); - psx_delay_BFC38710 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC38714: 30C4000F andi $a0, $a2, 0xF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFu; - PGXP_ALU(0x30C4000Fu, cpu->gpr[4], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050714u); -#endif - if (psx_delay_BFC38710) { - psx_delay_BFC38710 = 0; - if (psx_taken_BFC38710) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050724u); - goto label_BFC38724; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050718u); - } -label_BFC38718: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38718u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC38718: 10800002 beq $a0, $zero, 0xBFC38724 */ - uint32_t psx_brA_BFC38718 = cpu->gpr[4]; uint32_t psx_brB_BFC38718 = cpu->gpr[0]; - psx_taken_BFC38718 = (psx_brA_BFC38718 == psx_brB_BFC38718); - psx_delay_BFC38718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3871C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005071Cu); -#endif - if (psx_delay_BFC38718) { - psx_delay_BFC38718 = 0; - if (psx_taken_BFC38718) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050724u); - goto label_BFC38724; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050720u); - } -label_BFC38720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38720: 2484FFF0 addiu $a0, $a0, -16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-16)); - PGXP_ALU(0x2484FFF0u, cpu->gpr[4], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050720u); -#endif -label_BFC38724: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38724u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC38724: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC38728: 10600007 beq $v1, $zero, 0xBFC38748 */ - uint32_t psx_brA_BFC38728 = cpu->gpr[3]; uint32_t psx_brB_BFC38728 = cpu->gpr[0]; - psx_taken_BFC38728 = (psx_brA_BFC38728 == psx_brB_BFC38728); - psx_delay_BFC38728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3872C: 2482FFFF addiu $v0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2482FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005072Cu); -#endif - if (psx_delay_BFC38728) { - psx_delay_BFC38728 = 0; - if (psx_taken_BFC38728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050748u); - goto label_BFC38748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050730u); - } -label_BFC38730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050730u); -#endif - /* 0xBFC38730: 8E2C0000 lw $t4, 0($s1) */ - { uint32_t _pgxa = cpu->gpr[17]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050730u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000u); } - PGXP_LOAD(0x8E2C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC38734: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38738: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3873C: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005073Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC38740: 1460FFFB bne $v1, $zero, 0xBFC38730 */ - uint32_t psx_brA_BFC38740 = cpu->gpr[3]; uint32_t psx_brB_BFC38740 = cpu->gpr[0]; - psx_taken_BFC38740 = (psx_brA_BFC38740 != psx_brB_BFC38740); - psx_delay_BFC38740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC38744: ACAC0000 sw $t4, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050744u); return; } g_debug_last_store_pc = 0x80050744u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xACAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050744u); -#endif - if (psx_delay_BFC38740) { - psx_delay_BFC38740 = 0; - if (psx_taken_BFC38740) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050730u); - goto label_BFC38730; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050748u); - } -label_BFC38748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC38748: 04C10002 bgez $a2, 0xBFC38754 */ - uint32_t psx_brA_BFC38748 = cpu->gpr[6]; - psx_taken_BFC38748 = ((int32_t)psx_brA_BFC38748 >= 0); - psx_delay_BFC38748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x43u); -#endif - /* 0xBFC3874C: 00C00821 addu $at, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005074Cu); -#endif - if (psx_delay_BFC38748) { - psx_delay_BFC38748 = 0; - if (psx_taken_BFC38748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050754u); - goto label_BFC38754; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050750u); - } -label_BFC38750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38750: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050750u); -#endif -label_BFC38754: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38754u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC38754: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80050754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38758: 10400019 beq $v0, $zero, 0xBFC387C0 */ - uint32_t psx_brA_BFC38758 = cpu->gpr[2]; uint32_t psx_brB_BFC38758 = cpu->gpr[0]; - psx_taken_BFC38758 = (psx_brA_BFC38758 == psx_brB_BFC38758); - psx_delay_BFC38758 = 1; - /* 0xBFC3875C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005075Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005075Cu); -#endif - if (psx_delay_BFC38758) { - psx_delay_BFC38758 = 0; - if (psx_taken_BFC38758) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800507C0u); - goto label_BFC387C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050760u); - } -label_BFC38760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38760: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38764: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050764u); -#endif - /* 0xBFC38768: 8C6392C0 lw $v1, -27968($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050768u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6392C0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050768u); -#endif - /* 0xBFC3876C: 8DCE92A4 lw $t6, -27996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005076Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92A4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005076Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC38770: 3C0D0400 lui $t5, 0x400 */ - cpu->gpr[13] = 0x04000000u; - PGXP_ALU(0x3C0D0400u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC38774: 35AD0002 ori $t5, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] | 0x2u; - PGXP_ALU(0x35AD0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80050774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC38778: ADCD0000 sw $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050778u); return; } g_debug_last_store_pc = 0x80050778u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xADCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80050778u); -#endif - /* 0xBFC3877C: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005077Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005077Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38780: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC38784: 35F80800 ori $t8, $t7, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x800u; - PGXP_ALU(0x35F80800u, cpu->gpr[24], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80050784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC38788: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050788u); return; } g_debug_last_store_pc = 0x80050788u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050788u); -#endif - /* 0xBFC3878C: 8F3992A8 lw $t9, -27992($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -27992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-27992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005078Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3992A8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005078Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38790: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020000u); -#endif - /* 0xBFC38794: AF310000 sw $s1, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050794u); return; } g_debug_last_store_pc = 0x80050794u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAF310000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80050794u); -#endif - /* 0xBFC38798: 8D4A92AC lw $t2, -27988($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050798u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92ACu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3879C: 00024400 sll $t0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00024400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005079Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC387A0: 35090010 ori $t1, $t0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x10u; - PGXP_ALU(0x35090010u, cpu->gpr[9], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800507A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC387A4: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800507A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC387A8: AD490000 sw $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507A8u); return; } g_debug_last_store_pc = 0x800507A8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAD490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800507A8u); -#endif - /* 0xBFC387AC: 8D8C92B0 lw $t4, -27984($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507ACu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C92B0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800507ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC387B0: 3C0B0100 lui $t3, 0x100 */ - cpu->gpr[11] = 0x01000000u; - PGXP_ALU(0x3C0B0100u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800507B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC387B4: 356B0201 ori $t3, $t3, 0x201 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] | 0x201u; - PGXP_ALU(0x356B0201u, cpu->gpr[11], _pgx1, 0x0201u); } -#ifdef PSX_COSIM - cosim_instr(0x800507B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC387B8: AD8B0000 sw $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507B8u); return; } g_debug_last_store_pc = 0x800507B8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800507B8u); -#endif - /* 0xBFC387BC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800507BCu); -#endif -label_BFC387C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC387C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC387C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507C0u); -#endif - /* 0xBFC387C0: 8FB0001C lw $s0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507C0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0001Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800507C0u); -#endif - /* 0xBFC387C4: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507C4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800507C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC387C8: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800507C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC387CC: 03E00008 jr $ra */ - psx_delay_BFC387CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC387D0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800507D0u); -#endif - if (psx_delay_BFC387CC) { - psx_delay_BFC387CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC387D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC387D4u); - int psx_delay_BFC38810 = 0; - int psx_taken_BFC38810 = 0; - int psx_delay_BFC38818 = 0; - int psx_taken_BFC38818 = 0; - int psx_delay_BFC3882C = 0; - int psx_taken_BFC3882C = 0; - int psx_delay_BFC38834 = 0; - int psx_taken_BFC38834 = 0; - int psx_delay_BFC38850 = 0; - int psx_taken_BFC38850 = 0; - int psx_delay_BFC38858 = 0; - int psx_taken_BFC38858 = 0; - int psx_delay_BFC3886C = 0; - int psx_taken_BFC3886C = 0; - int psx_delay_BFC38874 = 0; - int psx_taken_BFC38874 = 0; - int psx_delay_BFC3888C = 0; - int psx_taken_BFC3888C = 0; - int psx_delay_BFC38894 = 0; - int psx_taken_BFC38894 = 0; - int psx_delay_BFC3889C = 0; - int psx_taken_BFC3889C = 0; - int psx_delay_BFC388A8 = 0; - int psx_taken_BFC388A8 = 0; - int psx_delay_BFC388D4 = 0; - int psx_taken_BFC388D4 = 0; - int psx_delay_BFC388E4 = 0; - int psx_taken_BFC388E4 = 0; - int psx_delay_BFC388EC = 0; - int psx_taken_BFC388EC = 0; - int psx_delay_BFC3890C = 0; - int psx_taken_BFC3890C = 0; - int psx_delay_BFC3891C = 0; - int psx_delay_BFC38924 = 0; - int psx_taken_BFC38924 = 0; - int psx_delay_BFC38938 = 0; - int psx_taken_BFC38938 = 0; - int psx_delay_BFC38958 = 0; - int psx_taken_BFC38958 = 0; - int psx_delay_BFC389A4 = 0; - int psx_taken_BFC389A4 = 0; - int psx_delay_BFC389B8 = 0; - int psx_taken_BFC389B8 = 0; - int psx_delay_BFC389C0 = 0; - int psx_taken_BFC389C0 = 0; - int psx_delay_BFC389C8 = 0; - int psx_taken_BFC389C8 = 0; - int psx_delay_BFC389D8 = 0; - int psx_taken_BFC389D8 = 0; - int psx_delay_BFC389F0 = 0; - int psx_taken_BFC389F0 = 0; - int psx_delay_BFC389F8 = 0; - int psx_taken_BFC389F8 = 0; - int psx_delay_BFC38A08 = 0; - int psx_taken_BFC38A08 = 0; - int psx_delay_BFC38A74 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38818u: goto label_BFC38818; - case 0xBFC38820u: goto label_BFC38820; - case 0xBFC38824u: goto label_BFC38824; - case 0xBFC38834u: goto label_BFC38834; - case 0xBFC3883Cu: goto label_BFC3883C; - case 0xBFC38840u: goto label_BFC38840; - case 0xBFC38844u: goto label_BFC38844; - case 0xBFC38848u: goto label_BFC38848; - case 0xBFC38858u: goto label_BFC38858; - case 0xBFC38860u: goto label_BFC38860; - case 0xBFC38874u: goto label_BFC38874; - case 0xBFC3887Cu: goto label_BFC3887C; - case 0xBFC38880u: goto label_BFC38880; - case 0xBFC38894u: goto label_BFC38894; - case 0xBFC3889Cu: goto label_BFC3889C; - case 0xBFC388A4u: goto label_BFC388A4; - case 0xBFC388A8u: goto label_BFC388A8; - case 0xBFC388B0u: goto label_BFC388B0; - case 0xBFC388B8u: goto label_BFC388B8; - case 0xBFC388BCu: goto label_BFC388BC; - case 0xBFC388DCu: goto label_BFC388DC; - case 0xBFC388E0u: goto label_BFC388E0; - case 0xBFC388ECu: goto label_BFC388EC; - case 0xBFC388F4u: goto label_BFC388F4; - case 0xBFC38914u: goto label_BFC38914; - case 0xBFC3891Cu: goto label_BFC3891C; - case 0xBFC38924u: goto label_BFC38924; - case 0xBFC3892Cu: goto label_BFC3892C; - case 0xBFC38940u: goto label_BFC38940; - case 0xBFC38960u: goto label_BFC38960; - case 0xBFC38968u: goto label_BFC38968; - case 0xBFC389ACu: goto label_BFC389AC; - case 0xBFC389C0u: goto label_BFC389C0; - case 0xBFC389C8u: goto label_BFC389C8; - case 0xBFC389D0u: goto label_BFC389D0; - case 0xBFC389D4u: goto label_BFC389D4; - case 0xBFC389E0u: goto label_BFC389E0; - case 0xBFC389F8u: goto label_BFC389F8; - case 0xBFC38A00u: goto label_BFC38A00; - case 0xBFC38A04u: goto label_BFC38A04; - case 0xBFC38A10u: goto label_BFC38A10; - case 0xBFC38A68u: goto label_BFC38A68; - case 0xBFC38A6Cu: goto label_BFC38A6C; - default: break; - } - } -label_BFC387D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC387D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC387D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC387D4: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x800507D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC387D8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507D8u); return; } g_debug_last_store_pc = 0x800507D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800507D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC387DC: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800507DCu); return; } g_debug_last_store_pc = 0x800507DCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800507DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507E0u); -#endif - /* 0xBFC387E0: 848E0000 lh $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800507E0u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x848E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800507E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC387E4: 00A08821 addu $s1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800507E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC387E8: A7AE0048 sh $t6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800507E8u); return; } g_debug_last_store_pc = 0x800507E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800507E8u); -#endif - /* 0xBFC387EC: 848F0002 lh $t7, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800507ECu); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x848F0002u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800507ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800507F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC387F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800507F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC387F4: A7AF004A sh $t7, 74($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 74; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (74)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800507F4u); return; } g_debug_last_store_pc = 0x800507F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF004Au, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800507F4u); -#endif - /* 0xBFC387F8: 84980004 lh $t8, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800507F8u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x84980004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800507F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC387FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800507FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC38800: A7B8004C sh $t8, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050800u); return; } g_debug_last_store_pc = 0x80050800u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050800u); -#endif - /* 0xBFC38804: 84990006 lh $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050804u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x84990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050804u); -#endif - /* 0xBFC38808: 87A8004C lh $t0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050808u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x87A8004Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3880C: A7B9004E sh $t9, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005080Cu); return; } g_debug_last_store_pc = 0x8005080Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B9004Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005080Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38810: 05010004 bgez $t0, 0xBFC38824 */ - uint32_t psx_brA_BFC38810 = cpu->gpr[8]; - psx_taken_BFC38810 = ((int32_t)psx_brA_BFC38810 >= 0); - psx_delay_BFC38810 = 1; - /* 0xBFC38814: 87A9004C lh $t1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050814u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050814u); -#endif - if (psx_delay_BFC38810) { - psx_delay_BFC38810 = 0; - if (psx_taken_BFC38810) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050824u); - goto label_BFC38824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050818u); - } -label_BFC38818: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38818u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38818: 1000000B beq $zero, $zero, 0xBFC38848 */ - uint32_t psx_brA_BFC38818 = cpu->gpr[0]; uint32_t psx_brB_BFC38818 = cpu->gpr[0]; - psx_taken_BFC38818 = (psx_brA_BFC38818 == psx_brB_BFC38818); - psx_delay_BFC38818 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3881C: A7A0004C sh $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005081Cu); return; } g_debug_last_store_pc = 0x8005081Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005081Cu); -#endif - if (psx_delay_BFC38818) { - psx_delay_BFC38818 = 0; - if (psx_taken_BFC38818) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050848u); - goto label_BFC38848; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050820u); - } -label_BFC38820: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38820u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050820u); -#endif - /* 0xBFC38820: 87A9004C lh $t1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050820u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9004Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050820u); -#endif -label_BFC38824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38824: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC38828: 29210400 slti $at, $t1, 1024 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (1024) ? 1 : 0); - PGXP_ALU(0x29210400u, cpu->gpr[1], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80050828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3882C: 14200004 bne $at, $zero, 0xBFC38840 */ - uint32_t psx_brA_BFC3882C = cpu->gpr[1]; uint32_t psx_brB_BFC3882C = cpu->gpr[0]; - psx_taken_BFC3882C = (psx_brA_BFC3882C != psx_brB_BFC3882C); - psx_delay_BFC3882C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050830u); -#endif - /* 0xBFC38830: 87A3004C lh $v1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050830u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3004Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050830u); -#endif - if (psx_delay_BFC3882C) { - psx_delay_BFC3882C = 0; - if (psx_taken_BFC3882C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050840u); - goto label_BFC38840; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050834u); - } -label_BFC38834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38834: 10000003 beq $zero, $zero, 0xBFC38844 */ - uint32_t psx_brA_BFC38834 = cpu->gpr[0]; uint32_t psx_brB_BFC38834 = cpu->gpr[0]; - psx_taken_BFC38834 = (psx_brA_BFC38834 == psx_brB_BFC38834); - psx_delay_BFC38834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC38838: 240303FF addiu $v1, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240303FFu, cpu->gpr[3], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050838u); -#endif - if (psx_delay_BFC38834) { - psx_delay_BFC38834 = 0; - if (psx_taken_BFC38834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050844u); - goto label_BFC38844; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005083Cu); - } -label_BFC3883C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3883Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3883Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005083Cu); -#endif - /* 0xBFC3883C: 87A3004C lh $v1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005083Cu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3004Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005083Cu); -#endif -label_BFC38840: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38840u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38840: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050840u); -#endif -label_BFC38844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC38844: A7A3004C sh $v1, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050844u); return; } g_debug_last_store_pc = 0x80050844u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3004Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050844u); -#endif -label_BFC38848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050848u); -#endif - /* 0xBFC38848: 87AA004E lh $t2, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050848u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA004Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3884C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005084Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38850: 05410003 bgez $t2, 0xBFC38860 */ - uint32_t psx_brA_BFC38850 = cpu->gpr[10]; - psx_taken_BFC38850 = ((int32_t)psx_brA_BFC38850 >= 0); - psx_delay_BFC38850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38854: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050854u); -#endif - if (psx_delay_BFC38850) { - psx_delay_BFC38850 = 0; - if (psx_taken_BFC38850) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050860u); - goto label_BFC38860; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050858u); - } -label_BFC38858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38858: 10000018 beq $zero, $zero, 0xBFC388BC */ - uint32_t psx_brA_BFC38858 = cpu->gpr[0]; uint32_t psx_brB_BFC38858 = cpu->gpr[0]; - psx_taken_BFC38858 = (psx_brA_BFC38858 == psx_brB_BFC38858); - psx_delay_BFC38858 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3885C: A7A0004E sh $zero, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005085Cu); return; } g_debug_last_store_pc = 0x8005085Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7A0004Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005085Cu); -#endif - if (psx_delay_BFC38858) { - psx_delay_BFC38858 = 0; - if (psx_taken_BFC38858) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508BCu); - goto label_BFC388BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050860u); - } -label_BFC38860: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38860u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38860: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050860u); -#endif - /* 0xBFC38864: 8C639254 lw $v1, -28076($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28076; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28076)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050864u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639254u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3886C: 10600004 beq $v1, $zero, 0xBFC38880 */ - uint32_t psx_brA_BFC3886C = cpu->gpr[3]; uint32_t psx_brB_BFC3886C = cpu->gpr[0]; - psx_taken_BFC3886C = (psx_brA_BFC3886C == psx_brB_BFC3886C); - psx_delay_BFC3886C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38870: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050870u); -#endif - if (psx_delay_BFC3886C) { - psx_delay_BFC3886C = 0; - if (psx_taken_BFC3886C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050880u); - goto label_BFC38880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050874u); - } -label_BFC38874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38874: 10000002 beq $zero, $zero, 0xBFC38880 */ - uint32_t psx_brA_BFC38874 = cpu->gpr[0]; uint32_t psx_brB_BFC38874 = cpu->gpr[0]; - psx_taken_BFC38874 = (psx_brA_BFC38874 == psx_brB_BFC38874); - psx_delay_BFC38874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38878: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050878u); -#endif - if (psx_delay_BFC38874) { - psx_delay_BFC38874 = 0; - if (psx_taken_BFC38874) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050880u); - goto label_BFC38880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005087Cu); - } -label_BFC3887C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3887Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3887C: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005087Cu); -#endif -label_BFC38880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050880u); -#endif - /* 0xBFC38880: 87AB004E lh $t3, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80050880u); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x87AB004Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38884: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x806u); -#endif - /* 0xBFC38888: 004B082A slt $at, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x004B082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3888C: 10200008 beq $at, $zero, 0xBFC388B0 */ - uint32_t psx_brA_BFC3888C = cpu->gpr[1]; uint32_t psx_brB_BFC3888C = cpu->gpr[0]; - psx_taken_BFC3888C = (psx_brA_BFC3888C == psx_brB_BFC3888C); - psx_delay_BFC3888C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38890: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050890u); -#endif - if (psx_delay_BFC3888C) { - psx_delay_BFC3888C = 0; - if (psx_taken_BFC3888C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508B0u); - goto label_BFC388B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050894u); - } -label_BFC38894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC38894: 10600004 beq $v1, $zero, 0xBFC388A8 */ - uint32_t psx_brA_BFC38894 = cpu->gpr[3]; uint32_t psx_brB_BFC38894 = cpu->gpr[0]; - psx_taken_BFC38894 = (psx_brA_BFC38894 == psx_brB_BFC38894); - psx_delay_BFC38894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38898: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050898u); -#endif - if (psx_delay_BFC38894) { - psx_delay_BFC38894 = 0; - if (psx_taken_BFC38894) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508A8u); - goto label_BFC388A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005089Cu); - } -label_BFC3889C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3889Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3889Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005089Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3889C: 10000002 beq $zero, $zero, 0xBFC388A8 */ - uint32_t psx_brA_BFC3889C = cpu->gpr[0]; uint32_t psx_brB_BFC3889C = cpu->gpr[0]; - psx_taken_BFC3889C = (psx_brA_BFC3889C == psx_brB_BFC3889C); - psx_delay_BFC3889C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC388A0: 240203FF addiu $v0, $zero, 1023 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); - PGXP_ALU(0x240203FFu, cpu->gpr[2], _pgx1, 0x000003FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800508A0u); -#endif - if (psx_delay_BFC3889C) { - psx_delay_BFC3889C = 0; - if (psx_taken_BFC3889C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508A8u); - goto label_BFC388A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508A4u); - } -label_BFC388A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC388A4: 240201FF addiu $v0, $zero, 511 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); - PGXP_ALU(0x240201FFu, cpu->gpr[2], _pgx1, 0x000001FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800508A4u); -#endif -label_BFC388A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC388A8: 10000003 beq $zero, $zero, 0xBFC388B8 */ - uint32_t psx_brA_BFC388A8 = cpu->gpr[0]; uint32_t psx_brB_BFC388A8 = cpu->gpr[0]; - psx_taken_BFC388A8 = (psx_brA_BFC388A8 == psx_brB_BFC388A8); - psx_delay_BFC388A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC388AC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800508ACu); -#endif - if (psx_delay_BFC388A8) { - psx_delay_BFC388A8 = 0; - if (psx_taken_BFC388A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508B8u); - goto label_BFC388B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508B0u); - } -label_BFC388B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508B0u); -#endif - /* 0xBFC388B0: 87A3004E lh $v1, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800508B0u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A3004Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800508B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC388B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800508B4u); -#endif -label_BFC388B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC388B8: A7A3004E sh $v1, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800508B8u); return; } g_debug_last_store_pc = 0x800508B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A3004Eu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800508B8u); -#endif -label_BFC388BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508BCu); -#endif - /* 0xBFC388BC: 87AC004C lh $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800508BCu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800508BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508C0u); -#endif - /* 0xBFC388C0: 87AD004E lh $t5, 78($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 78; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (78)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800508C0u); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x87AD004Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800508C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC388C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800508C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC388C8: 018D0019 multu $t4, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[12] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[12])); -#endif - PGXP_MULDIV(0x018D0019u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x800508C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC388CC: 00003812 mflo $a3 */ - cpu->gpr[7] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003812u, cpu->gpr[7], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800508CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC388D0: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800508D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC388D4: 04E10002 bgez $a3, 0xBFC388E0 */ - uint32_t psx_brA_BFC388D4 = cpu->gpr[7]; - psx_taken_BFC388D4 = ((int32_t)psx_brA_BFC388D4 >= 0); - psx_delay_BFC388D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC388D8: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800508D8u); -#endif - if (psx_delay_BFC388D4) { - psx_delay_BFC388D4 = 0; - if (psx_taken_BFC388D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508E0u); - goto label_BFC388E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508DCu); - } -label_BFC388DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC388DC: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800508DCu); -#endif -label_BFC388E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC388E0: 00013843 sra $a3, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00013843u, cpu->gpr[7], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800508E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC388E4: 14E00003 bne $a3, $zero, 0xBFC388F4 */ - uint32_t psx_brA_BFC388E4 = cpu->gpr[7]; uint32_t psx_brB_BFC388E4 = cpu->gpr[0]; - psx_taken_BFC388E4 = (psx_brA_BFC388E4 != psx_brB_BFC388E4); - psx_delay_BFC388E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC388E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800508E8u); -#endif - if (psx_delay_BFC388E4) { - psx_delay_BFC388E4 = 0; - if (psx_taken_BFC388E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508F4u); - goto label_BFC388F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508ECu); - } -label_BFC388EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC388EC: 1000005F beq $zero, $zero, 0xBFC38A6C */ - uint32_t psx_brA_BFC388EC = cpu->gpr[0]; uint32_t psx_brB_BFC388EC = cpu->gpr[0]; - psx_taken_BFC388EC = (psx_brA_BFC388EC == psx_brB_BFC388EC); - psx_delay_BFC388EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC388F0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800508F0u); -#endif - if (psx_delay_BFC388EC) { - psx_delay_BFC388EC = 0; - if (psx_taken_BFC388EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A6Cu); - goto label_BFC38A6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800508F4u); - } -label_BFC388F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC388F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC388F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800508F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC388F4: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800508F4u); -#endif - /* 0xBFC388F8: 8CC692A4 lw $a2, -27996($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800508F8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC692A4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800508F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC388FC: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800508FCu); return; } g_debug_last_store_pc = 0x800508FCu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800508FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050900u); -#endif - /* 0xBFC38900: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050900u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38904: 3C100400 lui $s0, 0x400 */ - cpu->gpr[16] = 0x04000000u; - PGXP_ALU(0x3C100400u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C000u); -#endif - /* 0xBFC38908: 01D07824 and $t7, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[16]; - PGXP_ALU(0x01D07824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3890C: 15E00016 bne $t7, $zero, 0xBFC38968 */ - uint32_t psx_brA_BFC3890C = cpu->gpr[15]; uint32_t psx_brB_BFC3890C = cpu->gpr[0]; - psx_taken_BFC3890C = (psx_brA_BFC3890C != psx_brB_BFC3890C); - psx_delay_BFC3890C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38910: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050910u); -#endif - if (psx_delay_BFC3890C) { - psx_delay_BFC3890C = 0; - if (psx_taken_BFC3890C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050968u); - goto label_BFC38968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050914u); - } -label_BFC38914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC38914: AFA70044 sw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050914u); return; } g_debug_last_store_pc = 0x80050914u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80050914u); -#endif - /* 0xBFC38918: 8FA70044 lw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050918u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80050918u); -#endif -label_BFC3891C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3891Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3891Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005091Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3891C: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80050924u; /* jal link before delay slot */ - psx_delay_BFC3891C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38920: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050920u); -#endif - if (psx_delay_BFC3891C) { - psx_delay_BFC3891C = 0; - cpu->gpr[31] = 0x80050924u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC38924: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38924u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38924: 10400006 beq $v0, $zero, 0xBFC38940 */ - uint32_t psx_brA_BFC38924 = cpu->gpr[2]; uint32_t psx_brB_BFC38924 = cpu->gpr[0]; - psx_taken_BFC38924 = (psx_brA_BFC38924 == psx_brB_BFC38924); - psx_delay_BFC38924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050928u); -#endif - if (psx_delay_BFC38924) { - psx_delay_BFC38924 = 0; - if (psx_taken_BFC38924) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050940u); - goto label_BFC38940; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005092Cu); - } -label_BFC3892C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3892Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3892Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005092Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3892C: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005092Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050930u); -#endif - /* 0xBFC38930: 8CC692A4 lw $a2, -27996($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050930u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC692A4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050930u); -#endif - /* 0xBFC38934: 8FA70044 lw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050934u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80050934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38938: 1000000B beq $zero, $zero, 0xBFC38968 */ - uint32_t psx_brA_BFC38938 = cpu->gpr[0]; uint32_t psx_brB_BFC38938 = cpu->gpr[0]; - psx_taken_BFC38938 = (psx_brA_BFC38938 == psx_brB_BFC38938); - psx_delay_BFC38938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3893C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005093Cu); -#endif - if (psx_delay_BFC38938) { - psx_delay_BFC38938 = 0; - if (psx_taken_BFC38938) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050968u); - goto label_BFC38968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050940u); - } -label_BFC38940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC38940: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050940u); -#endif - /* 0xBFC38944: 8CC692A4 lw $a2, -27996($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050944u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC692A4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050948u); -#endif - /* 0xBFC3894C: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005094Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005094Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38950: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC38954: 0310C824 and $t9, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16]; - PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC38958: 1320FFF0 beq $t9, $zero, 0xBFC3891C */ - uint32_t psx_brA_BFC38958 = cpu->gpr[25]; uint32_t psx_brB_BFC38958 = cpu->gpr[0]; - psx_taken_BFC38958 = (psx_brA_BFC38958 == psx_brB_BFC38958); - psx_delay_BFC38958 = 1; - /* 0xBFC3895C: 8FA70044 lw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005095Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005095Cu); -#endif - if (psx_delay_BFC38958) { - psx_delay_BFC38958 = 0; - if (psx_taken_BFC38958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005091Cu); - goto label_BFC3891C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050960u); - } -label_BFC38960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050960u); -#endif - /* 0xBFC38960: 8FA70044 lw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050960u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80050960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050964u); -#endif -label_BFC38968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC38968: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050968u); -#endif - /* 0xBFC3896C: 8CA592A0 lw $a1, -28000($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005096Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA592A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005096Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38970: 3C080100 lui $t0, 0x100 */ - cpu->gpr[8] = 0x01000000u; - PGXP_ALU(0x3C080100u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38974: 3C09C000 lui $t1, 0xC000 */ - cpu->gpr[9] = 0xC0000000u; - PGXP_ALU(0x3C09C000u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC38978: ACA80000 sw $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050978u); return; } g_debug_last_store_pc = 0x80050978u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3897C: ACA90000 sw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005097Cu); return; } g_debug_last_store_pc = 0x8005097Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050980u); -#endif - /* 0xBFC38980: 8FAA0048 lw $t2, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050980u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0048u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38984: 3C020800 lui $v0, 0x800 */ - cpu->gpr[2] = 0x08000000u; - PGXP_ALU(0x3C020800u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC38988: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050988u); return; } g_debug_last_store_pc = 0x80050988u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050988u); -#endif - /* 0xBFC3898C: 8FAB004C lw $t3, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005098Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB004Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005098Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC38994: ACAB0000 sw $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050994u); return; } g_debug_last_store_pc = 0x80050994u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACAB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050994u); -#endif - /* 0xBFC38998: 8CCC0000 lw $t4, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050998u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x40u); } - PGXP_LOAD(0x8CCC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3899C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005099Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC389A0: 01826824 and $t5, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[2]; - PGXP_ALU(0x01826824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800509A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC389A4: 15A00006 bne $t5, $zero, 0xBFC389C0 */ - uint32_t psx_brA_BFC389A4 = cpu->gpr[13]; uint32_t psx_brB_BFC389A4 = cpu->gpr[0]; - psx_taken_BFC389A4 = (psx_brA_BFC389A4 != psx_brB_BFC389A4); - psx_delay_BFC389A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC389A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800509A8u); -#endif - if (psx_delay_BFC389A4) { - psx_delay_BFC389A4 = 0; - if (psx_taken_BFC389A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509C0u); - goto label_BFC389C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509ACu); - } -label_BFC389AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509ACu); -#endif - /* 0xBFC389AC: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800509ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800509ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC389B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800509B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC389B4: 01C27824 and $t7, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[2]; - PGXP_ALU(0x01C27824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800509B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC389B8: 11E0FFFC beq $t7, $zero, 0xBFC389AC */ - uint32_t psx_brA_BFC389B8 = cpu->gpr[15]; uint32_t psx_brB_BFC389B8 = cpu->gpr[0]; - psx_taken_BFC389B8 = (psx_brA_BFC389B8 == psx_brB_BFC389B8); - psx_delay_BFC389B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC389BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800509BCu); -#endif - if (psx_delay_BFC389B8) { - psx_delay_BFC389B8 = 0; - if (psx_taken_BFC389B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509ACu); - goto label_BFC389AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509C0u); - } -label_BFC389C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC389C0: 04E10004 bgez $a3, 0xBFC389D4 */ - uint32_t psx_brA_BFC389C0 = cpu->gpr[7]; - psx_taken_BFC389C0 = ((int32_t)psx_brA_BFC389C0 >= 0); - psx_delay_BFC389C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC389C4: 30E4000F andi $a0, $a3, 0xF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[7] & 0xFu; - PGXP_ALU(0x30E4000Fu, cpu->gpr[4], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800509C4u); -#endif - if (psx_delay_BFC389C0) { - psx_delay_BFC389C0 = 0; - if (psx_taken_BFC389C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509D4u); - goto label_BFC389D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509C8u); - } -label_BFC389C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC389C8: 10800002 beq $a0, $zero, 0xBFC389D4 */ - uint32_t psx_brA_BFC389C8 = cpu->gpr[4]; uint32_t psx_brB_BFC389C8 = cpu->gpr[0]; - psx_taken_BFC389C8 = (psx_brA_BFC389C8 == psx_brB_BFC389C8); - psx_delay_BFC389C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC389CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800509CCu); -#endif - if (psx_delay_BFC389C8) { - psx_delay_BFC389C8 = 0; - if (psx_taken_BFC389C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509D4u); - goto label_BFC389D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509D0u); - } -label_BFC389D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC389D0: 2484FFF0 addiu $a0, $a0, -16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-16)); - PGXP_ALU(0x2484FFF0u, cpu->gpr[4], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800509D0u); -#endif -label_BFC389D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC389D4: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800509D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC389D8: 10600007 beq $v1, $zero, 0xBFC389F8 */ - uint32_t psx_brA_BFC389D8 = cpu->gpr[3]; uint32_t psx_brB_BFC389D8 = cpu->gpr[0]; - psx_taken_BFC389D8 = (psx_brA_BFC389D8 == psx_brB_BFC389D8); - psx_delay_BFC389D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC389DC: 2482FFFF addiu $v0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2482FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800509DCu); -#endif - if (psx_delay_BFC389D8) { - psx_delay_BFC389D8 = 0; - if (psx_taken_BFC389D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509F8u); - goto label_BFC389F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509E0u); - } -label_BFC389E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509E0u); -#endif - /* 0xBFC389E0: 8CB80000 lw $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800509E0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x8CB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800509E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC389E4: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800509E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC389E8: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800509E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC389EC: 26310004 addiu $s1, $s1, 4 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (4)); - PGXP_ALU(0x26310004u, cpu->gpr[17], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800509ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC389F0: 1460FFFB bne $v1, $zero, 0xBFC389E0 */ - uint32_t psx_brA_BFC389F0 = cpu->gpr[3]; uint32_t psx_brB_BFC389F0 = cpu->gpr[0]; - psx_taken_BFC389F0 = (psx_brA_BFC389F0 != psx_brB_BFC389F0); - psx_delay_BFC389F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC389F4: AE38FFFC sw $t8, -4($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800509F4u); return; } g_debug_last_store_pc = 0x800509F4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAE38FFFCu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800509F4u); -#endif - if (psx_delay_BFC389F0) { - psx_delay_BFC389F0 = 0; - if (psx_taken_BFC389F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509E0u); - goto label_BFC389E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800509F8u); - } -label_BFC389F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC389F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC389F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800509F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC389F8: 04E10002 bgez $a3, 0xBFC38A04 */ - uint32_t psx_brA_BFC389F8 = cpu->gpr[7]; - psx_taken_BFC389F8 = ((int32_t)psx_brA_BFC389F8 >= 0); - psx_delay_BFC389F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x83u); -#endif - /* 0xBFC389FC: 00E00821 addu $at, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800509FCu); -#endif - if (psx_delay_BFC389F8) { - psx_delay_BFC389F8 = 0; - if (psx_taken_BFC389F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A04u); - goto label_BFC38A04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A00u); - } -label_BFC38A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38A00: 2421000F addiu $at, $at, 15 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (15)); - PGXP_ALU(0x2421000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050A00u); -#endif -label_BFC38A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC38A04: 00011103 sra $v0, $at, 4 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[1] >> 4u); - PGXP_ALU(0x00011103u, cpu->gpr[2], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38A08: 10400017 beq $v0, $zero, 0xBFC38A68 */ - uint32_t psx_brA_BFC38A08 = cpu->gpr[2]; uint32_t psx_brB_BFC38A08 = cpu->gpr[0]; - psx_taken_BFC38A08 = (psx_brA_BFC38A08 == psx_brB_BFC38A08); - psx_delay_BFC38A08 = 1; - /* 0xBFC38A0C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A0Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A0Cu); -#endif - if (psx_delay_BFC38A08) { - psx_delay_BFC38A08 = 0; - if (psx_taken_BFC38A08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A68u); - goto label_BFC38A68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050A10u); - } -label_BFC38A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38A10: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A10u); -#endif - /* 0xBFC38A14: 8C6392C0 lw $v1, -27968($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A14u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6392C0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38A18: 3C190400 lui $t9, 0x400 */ - cpu->gpr[25] = 0x04000000u; - PGXP_ALU(0x3C190400u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38A1C: 37390003 ori $t9, $t9, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] | 0x3u; - PGXP_ALU(0x37390003u, cpu->gpr[25], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC38A20: ACD90000 sw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A20u); return; } g_debug_last_store_pc = 0x80050A20u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A20u); -#endif - /* 0xBFC38A24: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A24u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38A28: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38A2C: 35090800 ori $t1, $t0, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] | 0x800u; - PGXP_ALU(0x35090800u, cpu->gpr[9], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC38A30: AC690000 sw $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A30u); return; } g_debug_last_store_pc = 0x80050A30u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A30u); -#endif - /* 0xBFC38A34: 8D4A92A8 lw $t2, -27992($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A34u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92A8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC38A38: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400u); -#endif - /* 0xBFC38A3C: AD510000 sw $s1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A3Cu); return; } g_debug_last_store_pc = 0x80050A3Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAD510000u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A40u); -#endif - /* 0xBFC38A40: 8DAD92AC lw $t5, -27988($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -27988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-27988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A40u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD92ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC38A44: 00025C00 sll $t3, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00025C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38A48: 356C0010 ori $t4, $t3, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] | 0x10u; - PGXP_ALU(0x356C0010u, cpu->gpr[12], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38A4C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC38A50: ADAC0000 sw $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A50u); return; } g_debug_last_store_pc = 0x80050A50u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xADAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A50u); -#endif - /* 0xBFC38A54: 8DEF92B0 lw $t7, -27984($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A54u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92B0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38A58: 3C0E0100 lui $t6, 0x100 */ - cpu->gpr[14] = 0x01000000u; - PGXP_ALU(0x3C0E0100u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38A5C: 35CE0200 ori $t6, $t6, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x200u; - PGXP_ALU(0x35CE0200u, cpu->gpr[14], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38A60: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A60u); return; } g_debug_last_store_pc = 0x80050A60u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A60u); -#endif - /* 0xBFC38A64: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A64u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A64u); -#endif -label_BFC38A68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38A68: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050A68u); -#endif -label_BFC38A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A6Cu); -#endif - /* 0xBFC38A6C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A6Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A70u); -#endif - /* 0xBFC38A70: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A70u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38A74: 03E00008 jr $ra */ - psx_delay_BFC38A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38A78: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A78u); -#endif - if (psx_delay_BFC38A74) { - psx_delay_BFC38A74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38A7C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38A7Cu); - int psx_delay_BFC38A8C = 0; - int psx_delay_BFC38A9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38A94u: goto label_BFC38A94; - default: break; - } - } -label_BFC38A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38A7C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38A80: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A80u); return; } g_debug_last_store_pc = 0x80050A80u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38A84: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38A88: 2484E9D8 addiu $a0, $a0, -5672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-5672)); - PGXP_ALU(0x2484E9D8u, cpu->gpr[4], _pgx1, 0xFFFFE9D8u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38A8C: 0C016AE0 jal 0xB005AB80 */ - cpu->gpr[31] = 0x80050A94u; /* jal link before delay slot */ - psx_delay_BFC38A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC38A90: 24050084 addiu $a1, $zero, 132 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (132)); - PGXP_ALU(0x24050084u, cpu->gpr[5], _pgx1, 0x00000084u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A90u); -#endif - if (psx_delay_BFC38A8C) { - psx_delay_BFC38A8C = 0; - cpu->gpr[31] = 0x80050A94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB80u); - cpu->pc = 0x8005AB80u; return; - } -label_BFC38A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050A94u); -#endif - /* 0xBFC38A94: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050A94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38A98: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80050A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38A9C: 03E00008 jr $ra */ - psx_delay_BFC38A9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38AA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050AA0u); -#endif - if (psx_delay_BFC38A9C) { - psx_delay_BFC38A9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38AA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38AA4u); - int psx_delay_BFC38ACC = 0; -label_BFC38AA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38AA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38AA4: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38AA8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38AAC: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AB0u); -#endif - /* 0xBFC38AB0: 8DCE92A4 lw $t6, -27996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050AB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92A4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8012u); -#endif - /* 0xBFC38AB4: 00817824 and $t7, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00817824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC38AB8: 0004C602 srl $t8, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] >> 24u; - PGXP_ALU(0x0004C602u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80050AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC38ABC: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38AC0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC38AC4: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC38AC8: ADC40000 sw $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050AC8u); return; } g_debug_last_store_pc = 0x80050AC8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xADC40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38ACC: 03E00008 jr $ra */ - psx_delay_BFC38ACC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC38AD0: AC2FE9D8 sw $t7, -5672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050AD0u); return; } g_debug_last_store_pc = 0x80050AD0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FE9D8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050AD0u); -#endif - if (psx_delay_BFC38ACC) { - psx_delay_BFC38ACC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38AD4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38AD4u); - int psx_delay_BFC38AE8 = 0; -label_BFC38AD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38AD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC38AD4: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38AD8: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38ADC: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AE0u); -#endif - /* 0xBFC38AE0: 8DEFE9D8 lw $t7, -5672($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -5672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-5672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050AE0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE9D8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC38AE4: 0004C600 sll $t8, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 24u; - PGXP_ALU(0x0004C600u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80050AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38AE8: 03E00008 jr $ra */ - psx_delay_BFC38AE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC38AEC: 01F81025 or $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F81025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050AECu); -#endif - if (psx_delay_BFC38AE8) { - psx_delay_BFC38AE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38AF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38AF0u); - int psx_delay_BFC38AF4 = 0; - int psx_taken_BFC38AF4 = 0; - int psx_delay_BFC38B18 = 0; - int psx_taken_BFC38B18 = 0; - int psx_delay_BFC38B20 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38AFCu: goto label_BFC38AFC; - case 0xBFC38B08u: goto label_BFC38B08; - case 0xBFC38B20u: goto label_BFC38B20; - default: break; - } - } -label_BFC38AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC38AF0: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38AF4: 1040000A beq $v0, $zero, 0xBFC38B20 */ - uint32_t psx_brA_BFC38AF4 = cpu->gpr[2]; uint32_t psx_brB_BFC38AF4 = cpu->gpr[0]; - psx_taken_BFC38AF4 = (psx_brA_BFC38AF4 == psx_brB_BFC38AF4); - psx_delay_BFC38AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC38AF8: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050AF8u); -#endif - if (psx_delay_BFC38AF4) { - psx_delay_BFC38AF4 = 0; - if (psx_taken_BFC38AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B20u); - goto label_BFC38B20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050AFCu); - } -label_BFC38AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC38AFC: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B00u); -#endif - /* 0xBFC38B00: 8C6392A0 lw $v1, -28000($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B00u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6392A0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38B04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050B04u); -#endif -label_BFC38B08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38B08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B08u); -#endif - /* 0xBFC38B08: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B08u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC38B0C: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC38B10: 24A5FFFF addiu $a1, $a1, -1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); - PGXP_ALU(0x24A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC38B14: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80050B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38B18: 1440FFFB bne $v0, $zero, 0xBFC38B08 */ - uint32_t psx_brA_BFC38B18 = cpu->gpr[2]; uint32_t psx_brB_BFC38B18 = cpu->gpr[0]; - psx_taken_BFC38B18 = (psx_brA_BFC38B18 != psx_brB_BFC38B18); - psx_delay_BFC38B18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC38B1C: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B1Cu); return; } g_debug_last_store_pc = 0x80050B1Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B1Cu); -#endif - if (psx_delay_BFC38B18) { - psx_delay_BFC38B18 = 0; - if (psx_taken_BFC38B18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B08u); - goto label_BFC38B08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050B20u); - } -label_BFC38B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38B20: 03E00008 jr $ra */ - psx_delay_BFC38B20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38B24: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050B24u); -#endif - if (psx_delay_BFC38B20) { - psx_delay_BFC38B20 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38B28(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38B28u); - int psx_delay_BFC38B78 = 0; -label_BFC38B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38B28: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38B2C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B30u); -#endif - /* 0xBFC38B30: 8C4292C0 lw $v0, -27968($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27968; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27968)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B30u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292C0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B30u); -#endif - /* 0xBFC38B34: 8DEF92A4 lw $t7, -27996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B34u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92A4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38B38: 3C0E0400 lui $t6, 0x400 */ - cpu->gpr[14] = 0x04000000u; - PGXP_ALU(0x3C0E0400u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38B3C: 35CE0002 ori $t6, $t6, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x2u; - PGXP_ALU(0x35CE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80050B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38B40: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B40u); return; } g_debug_last_store_pc = 0x80050B40u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B40u); -#endif - /* 0xBFC38B44: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B44u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38B48: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC38B4C: 37190800 ori $t9, $t8, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x800u; - PGXP_ALU(0x37190800u, cpu->gpr[25], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80050B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC38B50: AC590000 sw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B50u); return; } g_debug_last_store_pc = 0x80050B50u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B50u); -#endif - /* 0xBFC38B54: 8D0892A8 lw $t0, -27992($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B54u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892A8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38B58: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC38B5C: AD040000 sw $a0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B5Cu); return; } g_debug_last_store_pc = 0x80050B5Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAD040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B60u); -#endif - /* 0xBFC38B60: 8D2992AC lw $t1, -27988($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27988; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27988)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B60u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2992ACu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38B64: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC38B68: AD200000 sw $zero, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B68u); return; } g_debug_last_store_pc = 0x80050B68u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAD200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B68u); -#endif - /* 0xBFC38B6C: 8D6B92B0 lw $t3, -27984($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B6Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B92B0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38B70: 3C0A0100 lui $t2, 0x100 */ - cpu->gpr[10] = 0x01000000u; - PGXP_ALU(0x3C0A0100u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38B74: 354A0401 ori $t2, $t2, 0x401 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] | 0x401u; - PGXP_ALU(0x354A0401u, cpu->gpr[10], _pgx1, 0x0401u); } -#ifdef PSX_COSIM - cosim_instr(0x80050B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38B78: 03E00008 jr $ra */ - psx_delay_BFC38B78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC38B7C: AD6A0000 sw $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B7Cu); return; } g_debug_last_store_pc = 0x80050B7Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B7Cu); -#endif - if (psx_delay_BFC38B78) { - psx_delay_BFC38B78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38B80u); - int psx_delay_BFC38BA8 = 0; -label_BFC38B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38B80: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B80u); -#endif - /* 0xBFC38B84: 8DEF92A4 lw $t7, -27996($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B84u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92A4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38B88: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4012u); -#endif - /* 0xBFC38B8C: 00817025 or $t6, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x00817025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38B90: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38B94: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B94u); return; } g_debug_last_store_pc = 0x80050B94u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B94u); -#endif - /* 0xBFC38B98: 8F1892A0 lw $t8, -28000($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -28000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-28000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050B98u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892A0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38B9C: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050BA0u); -#endif - /* 0xBFC38BA0: 8F020000 lw $v0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050BA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x1000000u); } - PGXP_LOAD(0x8F020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38BA4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38BA8: 03E00008 jr $ra */ - psx_delay_BFC38BA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC38BAC: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050BACu); -#endif - if (psx_delay_BFC38BA8) { - psx_delay_BFC38BA8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38BE8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38BE8u); - int psx_delay_BFC38C1C = 0; - int psx_delay_BFC38C50 = 0; - int psx_delay_BFC38C60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38C24u: goto label_BFC38C24; - case 0xBFC38C58u: goto label_BFC38C58; - default: break; - } - } -label_BFC38BE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38BE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38BE8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050BE8u); -#endif - /* 0xBFC38BEC: 8DCE9298 lw $t6, -28008($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050BECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9298u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38BF0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38BF4: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38BF8: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38BFC: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38C00: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38C04: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38C08: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C08u); return; } g_debug_last_store_pc = 0x80050C08u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC38C0C: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C0Cu); return; } g_debug_last_store_pc = 0x80050C0Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38C10: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38C14: 2718DEA4 addiu $t8, $t8, -8540 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-8540)); - PGXP_ALU(0x2718DEA4u, cpu->gpr[24], _pgx1, 0xFFFFDEA4u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC38C18: AFA7002C sw $a3, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C18u); return; } g_debug_last_store_pc = 0x80050C18u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38C1C: 0C0144F3 jal 0xB00513CC */ - cpu->gpr[31] = 0x80050C24u; /* jal link before delay slot */ - psx_delay_BFC38C1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC38C20: 01F82021 addu $a0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050C20u); -#endif - if (psx_delay_BFC38C1C) { - psx_delay_BFC38C1C = 0; - cpu->gpr[31] = 0x80050C24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513CCu); - cpu->pc = 0x800513CCu; return; - } -label_BFC38C24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38C24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38C24: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050C24u); -#endif - /* 0xBFC38C28: 8F399298 lw $t9, -28008($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C28u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399298u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38C2C: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38C30: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38C34: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38C38: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38C3C: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38C40: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38C44: 2529DEA4 addiu $t1, $t1, -8540 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-8540)); - PGXP_ALU(0x2529DEA4u, cpu->gpr[9], _pgx1, 0xFFFFDEA4u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C44u); -#endif - /* 0xBFC38C48: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C48u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C48u); -#endif - /* 0xBFC38C4C: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C4Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38C50: 0C01431A jal 0xB0050C68 */ - cpu->gpr[31] = 0x80050C58u; /* jal link before delay slot */ - psx_delay_BFC38C50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x320u); -#endif - /* 0xBFC38C54: 01092821 addu $a1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01092821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050C54u); -#endif - if (psx_delay_BFC38C50) { - psx_delay_BFC38C50 = 0; - cpu->gpr[31] = 0x80050C58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050C68u); - cpu->pc = 0x80050C68u; return; - } -label_BFC38C58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38C58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C58u); -#endif - /* 0xBFC38C58: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38C5C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38C60: 03E00008 jr $ra */ - psx_delay_BFC38C60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38C64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050C64u); -#endif - if (psx_delay_BFC38C60) { - psx_delay_BFC38C60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38C68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38C68u); - int psx_delay_BFC38C8C = 0; - int psx_delay_BFC38CA0 = 0; - int psx_taken_BFC38CA0 = 0; - int psx_delay_BFC38CA8 = 0; - int psx_delay_BFC38CB0 = 0; - int psx_taken_BFC38CB0 = 0; - int psx_delay_BFC38CB8 = 0; - int psx_taken_BFC38CB8 = 0; - int psx_delay_BFC38CCC = 0; - int psx_taken_BFC38CCC = 0; - int psx_delay_BFC38D70 = 0; - int psx_taken_BFC38D70 = 0; - int psx_delay_BFC38D78 = 0; - int psx_delay_BFC38DA4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38C94u: goto label_BFC38C94; - case 0xBFC38CA8u: goto label_BFC38CA8; - case 0xBFC38CB0u: goto label_BFC38CB0; - case 0xBFC38CB8u: goto label_BFC38CB8; - case 0xBFC38CC0u: goto label_BFC38CC0; - case 0xBFC38CD4u: goto label_BFC38CD4; - case 0xBFC38CD8u: goto label_BFC38CD8; - case 0xBFC38D78u: goto label_BFC38D78; - case 0xBFC38D80u: goto label_BFC38D80; - case 0xBFC38D9Cu: goto label_BFC38D9C; - default: break; - } - } -label_BFC38C68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38C68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38C68: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC38C6C: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C6Cu); return; } g_debug_last_store_pc = 0x80050C6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38C70: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050C70u); -#endif - /* 0xBFC38C74: 8E109298 lw $s0, -28008($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C74u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E109298u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38C78: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C78u); return; } g_debug_last_store_pc = 0x80050C78u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38C7C: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC38C80: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C80u); return; } g_debug_last_store_pc = 0x80050C80u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC38C84: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C84u); return; } g_debug_last_store_pc = 0x80050C84u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC38C88: AFA60028 sw $a2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C88u); return; } g_debug_last_store_pc = 0x80050C88u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38C8C: 0C0144BA jal 0xB00512E8 */ - cpu->gpr[31] = 0x80050C94u; /* jal link before delay slot */ - psx_delay_BFC38C8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38C90: 3210003F andi $s0, $s0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0x3Fu; - PGXP_ALU(0x3210003Fu, cpu->gpr[16], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050C90u); -#endif - if (psx_delay_BFC38C8C) { - psx_delay_BFC38C8C = 0; - cpu->gpr[31] = 0x80050C94u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512E8u); - cpu->pc = 0x800512E8u; return; - } -label_BFC38C94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38C94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38C94: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050C94u); -#endif - /* 0xBFC38C98: 8DCE929C lw $t6, -28004($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050C98u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE929Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38C9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC38CA0: 160E000D bne $s0, $t6, 0xBFC38CD8 */ - uint32_t psx_brA_BFC38CA0 = cpu->gpr[16]; uint32_t psx_brB_BFC38CA0 = cpu->gpr[14]; - psx_taken_BFC38CA0 = (psx_brA_BFC38CA0 != psx_brB_BFC38CA0); - psx_delay_BFC38CA0 = 1; - /* 0xBFC38CA4: 8FB80020 lw $t8, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050CA4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80020u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050CA4u); -#endif - if (psx_delay_BFC38CA0) { - psx_delay_BFC38CA0 = 0; - if (psx_taken_BFC38CA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CD8u); - goto label_BFC38CD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CA8u); - } -label_BFC38CA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38CA8: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80050CB0u; /* jal link before delay slot */ - psx_delay_BFC38CA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38CAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050CACu); -#endif - if (psx_delay_BFC38CA8) { - psx_delay_BFC38CA8 = 0; - cpu->gpr[31] = 0x80050CB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC38CB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38CB0: 10400003 beq $v0, $zero, 0xBFC38CC0 */ - uint32_t psx_brA_BFC38CB0 = cpu->gpr[2]; uint32_t psx_brB_BFC38CB0 = cpu->gpr[0]; - psx_taken_BFC38CB0 = (psx_brA_BFC38CB0 == psx_brB_BFC38CB0); - psx_delay_BFC38CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38CB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050CB4u); -#endif - if (psx_delay_BFC38CB0) { - psx_delay_BFC38CB0 = 0; - if (psx_taken_BFC38CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CC0u); - goto label_BFC38CC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CB8u); - } -label_BFC38CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38CB8: 10000038 beq $zero, $zero, 0xBFC38D9C */ - uint32_t psx_brA_BFC38CB8 = cpu->gpr[0]; uint32_t psx_brB_BFC38CB8 = cpu->gpr[0]; - psx_taken_BFC38CB8 = (psx_brA_BFC38CB8 == psx_brB_BFC38CB8); - psx_delay_BFC38CB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38CBC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050CBCu); -#endif - if (psx_delay_BFC38CB8) { - psx_delay_BFC38CB8 = 0; - if (psx_taken_BFC38CB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050D9Cu); - goto label_BFC38D9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CC0u); - } -label_BFC38CC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38CC0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050CC0u); -#endif - /* 0xBFC38CC4: 8DEF929C lw $t7, -28004($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050CC4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF929Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38CC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC38CCC: 120FFFF6 beq $s0, $t7, 0xBFC38CA8 */ - uint32_t psx_brA_BFC38CCC = cpu->gpr[16]; uint32_t psx_brB_BFC38CCC = cpu->gpr[15]; - psx_taken_BFC38CCC = (psx_brA_BFC38CCC == psx_brB_BFC38CCC); - psx_delay_BFC38CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38CD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050CD0u); -#endif - if (psx_delay_BFC38CCC) { - psx_delay_BFC38CCC = 0; - if (psx_taken_BFC38CCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CA8u); - goto label_BFC38CA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050CD4u); - } -label_BFC38CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CD4u); -#endif - /* 0xBFC38CD4: 8FB80020 lw $t8, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050CD4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80020u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050CD4u); -#endif -label_BFC38CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38CD8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050CD8u); -#endif - /* 0xBFC38CDC: 8F399298 lw $t9, -28008($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050CDCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399298u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38CE0: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38CE4: 00194080 sll $t0, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 2u; - PGXP_ALU(0x00194080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38CE8: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38CEC: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38CF0: 01194023 subu $t0, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[25]; - PGXP_ALU(0x01194023u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38CF4: 00084080 sll $t0, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38CF8: 2442DE98 addiu $v0, $v0, -8552 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-8552)); - PGXP_ALU(0x2442DE98u, cpu->gpr[2], _pgx1, 0xFFFFDE98u); } -#ifdef PSX_COSIM - cosim_instr(0x80050CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x304u); -#endif - /* 0xBFC38CFC: 00484821 addu $t1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[8]; - PGXP_ALU(0x00484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC38D00: AD380000 sw $t8, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D00u); return; } g_debug_last_store_pc = 0x80050D00u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAD380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D00u); -#endif - /* 0xBFC38D04: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D04u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38D08: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D08u); -#endif - /* 0xBFC38D0C: 8D6B9298 lw $t3, -28008($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D0Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9298u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38D10: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38D14: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38D18: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38D1C: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38D20: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38D24: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004u); -#endif - /* 0xBFC38D28: 004C6821 addu $t5, $v0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[2] + cpu->gpr[12]; - PGXP_ALU(0x004C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC38D2C: ADAA0004 sw $t2, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D2Cu); return; } g_debug_last_store_pc = 0x80050D2Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xADAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D30u); -#endif - /* 0xBFC38D30: 8FAE0028 lw $t6, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D30u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0028u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D30u); -#endif - /* 0xBFC38D34: 8DEF9298 lw $t7, -28008($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D34u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9298u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38D38: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC38D3C: 000FC880 sll $t9, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC38D40: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38D44: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC38D48: 032FC823 subu $t9, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[15]; - PGXP_ALU(0x032FC823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38D4C: 0019C880 sll $t9, $t9, 2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 2u; - PGXP_ALU(0x0019C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000104u); -#endif - /* 0xBFC38D50: 00594021 addu $t0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00594021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC38D54: AD0E0008 sw $t6, 8($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D54u); return; } g_debug_last_store_pc = 0x80050D54u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAD0E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D54u); -#endif - /* 0xBFC38D58: 8F1892B0 lw $t8, -27984($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D58u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892B0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38D5C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC38D60: AC309298 sw $s0, -28008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D60u); return; } g_debug_last_store_pc = 0x80050D60u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC309298u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D60u); -#endif - /* 0xBFC38D64: 8F090000 lw $t1, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D64u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x1000000u); } - PGXP_LOAD(0x8F090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38D68: 3C010100 lui $at, 0x100 */ - cpu->gpr[1] = 0x01000000u; - PGXP_ALU(0x3C010100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA02u); -#endif - /* 0xBFC38D6C: 01215824 and $t3, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[11] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01215824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC38D70: 15600003 bne $t3, $zero, 0xBFC38D80 */ - uint32_t psx_brA_BFC38D70 = cpu->gpr[11]; uint32_t psx_brB_BFC38D70 = cpu->gpr[0]; - psx_taken_BFC38D70 = (psx_brA_BFC38D70 != psx_brB_BFC38D70); - psx_delay_BFC38D70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38D74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050D74u); -#endif - if (psx_delay_BFC38D70) { - psx_delay_BFC38D70 = 0; - if (psx_taken_BFC38D70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050D80u); - goto label_BFC38D80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050D78u); - } -label_BFC38D78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38D78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38D78: 0C01436B jal 0xB0050DAC */ - cpu->gpr[31] = 0x80050D80u; /* jal link before delay slot */ - psx_delay_BFC38D78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38D7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050D7Cu); -#endif - if (psx_delay_BFC38D78) { - psx_delay_BFC38D78 = 0; - cpu->gpr[31] = 0x80050D80u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DACu); - cpu->pc = 0x80050DACu; return; - } -label_BFC38D80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38D80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38D80: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D80u); -#endif - /* 0xBFC38D84: 8D8C9298 lw $t4, -28008($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D84u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9298u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38D88: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050D88u); -#endif - /* 0xBFC38D8C: 8D4A929C lw $t2, -28004($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D8Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A929Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38D90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1404u); -#endif - /* 0xBFC38D94: 018A1023 subu $v0, $t4, $t2 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[12] - cpu->gpr[10]; - PGXP_ALU(0x018A1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38D98: 3042003F andi $v0, $v0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Fu; - PGXP_ALU(0x3042003Fu, cpu->gpr[2], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050D98u); -#endif -label_BFC38D9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38D9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050D9Cu); -#endif - /* 0xBFC38D9C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050D9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DA0u); -#endif - /* 0xBFC38DA0: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DA0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38DA4: 03E00008 jr $ra */ - psx_delay_BFC38DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38DA8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80050DA8u); -#endif - if (psx_delay_BFC38DA4) { - psx_delay_BFC38DA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38DAC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38DACu); - int psx_delay_BFC38DB8 = 0; - int psx_taken_BFC38DB8 = 0; - int psx_delay_BFC38DC0 = 0; - int psx_taken_BFC38DC0 = 0; - int psx_delay_BFC38DE0 = 0; - int psx_delay_BFC38E14 = 0; - int psx_taken_BFC38E14 = 0; - int psx_delay_BFC38E1C = 0; - int psx_taken_BFC38E1C = 0; - int psx_delay_BFC38E38 = 0; - int psx_taken_BFC38E38 = 0; - int psx_delay_BFC38E40 = 0; - int psx_taken_BFC38E40 = 0; - int psx_delay_BFC38E60 = 0; - int psx_taken_BFC38E60 = 0; - int psx_delay_BFC38E68 = 0; - int psx_delay_BFC38E70 = 0; - int psx_taken_BFC38E70 = 0; - int psx_delay_BFC38E90 = 0; - int psx_taken_BFC38E90 = 0; - int psx_delay_BFC38F18 = 0; - int psx_delay_BFC38F34 = 0; - int psx_taken_BFC38F34 = 0; - int psx_delay_BFC38F40 = 0; - int psx_taken_BFC38F40 = 0; - int psx_delay_BFC38F54 = 0; - int psx_taken_BFC38F54 = 0; - int psx_delay_BFC38F5C = 0; - int psx_delay_BFC38F84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38DC0u: goto label_BFC38DC0; - case 0xBFC38DC8u: goto label_BFC38DC8; - case 0xBFC38DE8u: goto label_BFC38DE8; - case 0xBFC38DFCu: goto label_BFC38DFC; - case 0xBFC38E1Cu: goto label_BFC38E1C; - case 0xBFC38E24u: goto label_BFC38E24; - case 0xBFC38E40u: goto label_BFC38E40; - case 0xBFC38E48u: goto label_BFC38E48; - case 0xBFC38E68u: goto label_BFC38E68; - case 0xBFC38E70u: goto label_BFC38E70; - case 0xBFC38E78u: goto label_BFC38E78; - case 0xBFC38E98u: goto label_BFC38E98; - case 0xBFC38F20u: goto label_BFC38F20; - case 0xBFC38F3Cu: goto label_BFC38F3C; - case 0xBFC38F48u: goto label_BFC38F48; - case 0xBFC38F5Cu: goto label_BFC38F5C; - case 0xBFC38F64u: goto label_BFC38F64; - case 0xBFC38F7Cu: goto label_BFC38F7C; - default: break; - } - } -label_BFC38DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38DAC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DB0u); -#endif - /* 0xBFC38DB0: 8DCE92C4 lw $t6, -27964($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27964; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DB0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92C4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38DB4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80050DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC38DB8: 11C00003 beq $t6, $zero, 0xBFC38DC8 */ - uint32_t psx_brA_BFC38DB8 = cpu->gpr[14]; uint32_t psx_brB_BFC38DB8 = cpu->gpr[0]; - psx_taken_BFC38DB8 = (psx_brA_BFC38DB8 == psx_brB_BFC38DB8); - psx_delay_BFC38DB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC38DBC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DBCu); return; } g_debug_last_store_pc = 0x80050DBCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DBCu); -#endif - if (psx_delay_BFC38DB8) { - psx_delay_BFC38DB8 = 0; - if (psx_taken_BFC38DB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DC8u); - goto label_BFC38DC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DC0u); - } -label_BFC38DC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38DC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38DC0: 1000006E beq $zero, $zero, 0xBFC38F7C */ - uint32_t psx_brA_BFC38DC0 = cpu->gpr[0]; uint32_t psx_brB_BFC38DC0 = cpu->gpr[0]; - psx_taken_BFC38DC0 = (psx_brA_BFC38DC0 == psx_brB_BFC38DC0); - psx_delay_BFC38DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38DC4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80050DC4u); -#endif - if (psx_delay_BFC38DC0) { - psx_delay_BFC38DC0 = 0; - if (psx_taken_BFC38DC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F7Cu); - goto label_BFC38F7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DC8u); - } -label_BFC38DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC38DC8: AFB00028 sw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DC8u); return; } g_debug_last_store_pc = 0x80050DC8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC38DCC: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DCCu); return; } g_debug_last_store_pc = 0x80050DCCu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC38DD0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38DD4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC38DD8: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DD8u); return; } g_debug_last_store_pc = 0x80050DD8u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC38DDC: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DDCu); return; } g_debug_last_store_pc = 0x80050DDCu; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38DE0: 0C0144BA jal 0xB00512E8 */ - cpu->gpr[31] = 0x80050DE8u; /* jal link before delay slot */ - psx_delay_BFC38DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC38DE4: AC2F92C4 sw $t7, -27964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -27964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-27964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050DE4u); return; } g_debug_last_store_pc = 0x80050DE4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F92C4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050DE4u); -#endif - if (psx_delay_BFC38DE0) { - psx_delay_BFC38DE0 = 0; - cpu->gpr[31] = 0x80050DE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512E8u); - cpu->pc = 0x800512E8u; return; - } -label_BFC38DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC38DE8: 3C11800E lui $s1, 0x800E */ - cpu->gpr[17] = 0x800E0000u; - PGXP_ALU(0x3C11800Eu, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC38DEC: 2631DE98 addiu $s1, $s1, -8552 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-8552)); - PGXP_ALU(0x2631DE98u, cpu->gpr[17], _pgx1, 0xFFFFDE98u); } -#ifdef PSX_COSIM - cosim_instr(0x80050DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC38DF0: 3C101000 lui $s0, 0x1000 */ - cpu->gpr[16] = 0x10000000u; - PGXP_ALU(0x3C101000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC38DF4: 3C120100 lui $s2, 0x100 */ - cpu->gpr[18] = 0x01000000u; - PGXP_ALU(0x3C120100u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC38DF8: 3C130400 lui $s3, 0x400 */ - cpu->gpr[19] = 0x04000000u; - PGXP_ALU(0x3C130400u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DF8u); -#endif -label_BFC38DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38DFC: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E00u); -#endif - /* 0xBFC38E00: 8F1892B0 lw $t8, -27984($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E00u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892B0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E04u); -#endif - /* 0xBFC38E08: 8F190000 lw $t9, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E08u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040100u); -#endif - /* 0xBFC38E10: 03324024 and $t0, $t9, $s2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[18]; - PGXP_ALU(0x03324024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC38E14: 11000003 beq $t0, $zero, 0xBFC38E24 */ - uint32_t psx_brA_BFC38E14 = cpu->gpr[8]; uint32_t psx_brB_BFC38E14 = cpu->gpr[0]; - psx_taken_BFC38E14 = (psx_brA_BFC38E14 == psx_brB_BFC38E14); - psx_delay_BFC38E14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E18u); -#endif - if (psx_delay_BFC38E14) { - psx_delay_BFC38E14 = 0; - if (psx_taken_BFC38E14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E24u); - goto label_BFC38E24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E1Cu); - } -label_BFC38E1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E1C: 10000047 beq $zero, $zero, 0xBFC38F3C */ - uint32_t psx_brA_BFC38E1C = cpu->gpr[0]; uint32_t psx_brB_BFC38E1C = cpu->gpr[0]; - psx_taken_BFC38E1C = (psx_brA_BFC38E1C == psx_brB_BFC38E1C); - psx_delay_BFC38E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC38E20: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050E20u); -#endif - if (psx_delay_BFC38E1C) { - psx_delay_BFC38E1C = 0; - if (psx_taken_BFC38E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F3Cu); - goto label_BFC38F3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E24u); - } -label_BFC38E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38E24: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050E24u); -#endif - /* 0xBFC38E28: 8D299298 lw $t1, -28008($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E28u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299298u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38E2C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E30u); -#endif - /* 0xBFC38E30: 8D4A929C lw $t2, -28004($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E30u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A929Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC38E38: 152A0003 bne $t1, $t2, 0xBFC38E48 */ - uint32_t psx_brA_BFC38E38 = cpu->gpr[9]; uint32_t psx_brB_BFC38E38 = cpu->gpr[10]; - psx_taken_BFC38E38 = (psx_brA_BFC38E38 != psx_brB_BFC38E38); - psx_delay_BFC38E38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E3Cu); -#endif - if (psx_delay_BFC38E38) { - psx_delay_BFC38E38 = 0; - if (psx_taken_BFC38E38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E48u); - goto label_BFC38E48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E40u); - } -label_BFC38E40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E40: 1000003E beq $zero, $zero, 0xBFC38F3C */ - uint32_t psx_brA_BFC38E40 = cpu->gpr[0]; uint32_t psx_brB_BFC38E40 = cpu->gpr[0]; - psx_taken_BFC38E40 = (psx_brA_BFC38E40 == psx_brB_BFC38E40); - psx_delay_BFC38E40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC38E44: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050E44u); -#endif - if (psx_delay_BFC38E40) { - psx_delay_BFC38E40 = 0; - if (psx_taken_BFC38E40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F3Cu); - goto label_BFC38F3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E48u); - } -label_BFC38E48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38E48: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050E48u); -#endif - /* 0xBFC38E4C: 8D6B92A4 lw $t3, -27996($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E4Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B92A4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E50u); -#endif - /* 0xBFC38E54: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E54u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x13000u); -#endif - /* 0xBFC38E5C: 01906824 and $t5, $t4, $s0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[12] & cpu->gpr[16]; - PGXP_ALU(0x01906824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC38E60: 15A0000D bne $t5, $zero, 0xBFC38E98 */ - uint32_t psx_brA_BFC38E60 = cpu->gpr[13]; uint32_t psx_brB_BFC38E60 = cpu->gpr[0]; - psx_taken_BFC38E60 = (psx_brA_BFC38E60 != psx_brB_BFC38E60); - psx_delay_BFC38E60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E64u); -#endif - if (psx_delay_BFC38E60) { - psx_delay_BFC38E60 = 0; - if (psx_taken_BFC38E60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E98u); - goto label_BFC38E98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E68u); - } -label_BFC38E68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC38E68: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80050E70u; /* jal link before delay slot */ - psx_delay_BFC38E68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E6Cu); -#endif - if (psx_delay_BFC38E68) { - psx_delay_BFC38E68 = 0; - cpu->gpr[31] = 0x80050E70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC38E70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38E70: 14400009 bne $v0, $zero, 0xBFC38E98 */ - uint32_t psx_brA_BFC38E70 = cpu->gpr[2]; uint32_t psx_brB_BFC38E70 = cpu->gpr[0]; - psx_taken_BFC38E70 = (psx_brA_BFC38E70 != psx_brB_BFC38E70); - psx_delay_BFC38E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E74u); -#endif - if (psx_delay_BFC38E70) { - psx_delay_BFC38E70 = 0; - if (psx_taken_BFC38E70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E98u); - goto label_BFC38E98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E78u); - } -label_BFC38E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38E78: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050E78u); -#endif - /* 0xBFC38E7C: 8DCE92A4 lw $t6, -27996($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E7Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92A4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E80u); -#endif - /* 0xBFC38E84: 8DCF0000 lw $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E84u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC38E8C: 01F0C024 and $t8, $t7, $s0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[16]; - PGXP_ALU(0x01F0C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC38E90: 1300FFF5 beq $t8, $zero, 0xBFC38E68 */ - uint32_t psx_brA_BFC38E90 = cpu->gpr[24]; uint32_t psx_brB_BFC38E90 = cpu->gpr[0]; - psx_taken_BFC38E90 = (psx_brA_BFC38E90 == psx_brB_BFC38E90); - psx_delay_BFC38E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38E94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050E94u); -#endif - if (psx_delay_BFC38E90) { - psx_delay_BFC38E90 = 0; - if (psx_taken_BFC38E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E68u); - goto label_BFC38E68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050E98u); - } -label_BFC38E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC38E98: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050E98u); -#endif - /* 0xBFC38E9C: 8F3992A4 lw $t9, -27996($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050E9Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3992A4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38EA0: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080000u); -#endif - /* 0xBFC38EA4: AF330000 sw $s3, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050EA4u); return; } g_debug_last_store_pc = 0x80050EA4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAF330000u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80050EA4u); -#endif - /* 0xBFC38EA8: 8D08929C lw $t0, -28004($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050EA8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08929Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38EAC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38EB0: 00084880 sll $t1, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00084880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38EB4: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38EB8: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38EBC: 01284823 subu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[8]; - PGXP_ALU(0x01284823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38EC0: 00094880 sll $t1, $t1, 2 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 2u; - PGXP_ALU(0x00094880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20600u); -#endif - /* 0xBFC38EC4: 02295021 addu $t2, $s1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[17] + cpu->gpr[9]; - PGXP_ALU(0x02295021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EC4u); -#endif - /* 0xBFC38EC8: 8D440004 lw $a0, 4($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050EC8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400u); } - PGXP_LOAD(0x8D440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80050EC8u); -#endif - /* 0xBFC38ECC: 8D6B929C lw $t3, -28004($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050ECCu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B929Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC38ED0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38ED4: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38ED8: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38EDC: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC38EE0: 018B6023 subu $t4, $t4, $t3 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[12] - cpu->gpr[11]; - PGXP_ALU(0x018B6023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC38EE4: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23000u); -#endif - /* 0xBFC38EE8: 022C6821 addu $t5, $s1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[17] + cpu->gpr[12]; - PGXP_ALU(0x022C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EE8u); -#endif - /* 0xBFC38EEC: 8DA50008 lw $a1, 8($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050EECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x2000u); } - PGXP_LOAD(0x8DA50008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80050EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050EF0u); -#endif - /* 0xBFC38EF0: 8DCE929C lw $t6, -28004($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050EF0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE929Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38EF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38EF8: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38EFC: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38F00: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38F04: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38F08: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80050F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1028000u); -#endif - /* 0xBFC38F0C: 022FC021 addu $t8, $s1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[17] + cpu->gpr[15]; - PGXP_ALU(0x022FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F10u); -#endif - /* 0xBFC38F10: 8F190000 lw $t9, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F10u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC38F18: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x80050F20u; /* jalr link before delay slot */ - psx_delay_BFC38F18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F1Cu); -#endif - if (psx_delay_BFC38F18) { - psx_delay_BFC38F18 = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x80050F20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC38F20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38F20: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F20u); -#endif - /* 0xBFC38F24: 8D08929C lw $t0, -28004($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F24u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08929Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38F28: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC38F2C: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80050F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC38F30: 312A003F andi $t2, $t1, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x3Fu; - PGXP_ALU(0x312A003Fu, cpu->gpr[10], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80050F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F34: 1000FFB1 beq $zero, $zero, 0xBFC38DFC */ - uint32_t psx_brA_BFC38F34 = cpu->gpr[0]; uint32_t psx_brB_BFC38F34 = cpu->gpr[0]; - psx_taken_BFC38F34 = (psx_brA_BFC38F34 == psx_brB_BFC38F34); - psx_delay_BFC38F34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC38F38: AC2A929C sw $t2, -28004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F38u); return; } g_debug_last_store_pc = 0x80050F38u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2A929Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F38u); -#endif - if (psx_delay_BFC38F34) { - psx_delay_BFC38F34 = 0; - if (psx_taken_BFC38F34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DFCu); - goto label_BFC38DFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F3Cu); - } -label_BFC38F3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38F3C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC38F40: 16000008 bne $s0, $zero, 0xBFC38F64 */ - uint32_t psx_brA_BFC38F40 = cpu->gpr[16]; uint32_t psx_brB_BFC38F40 = cpu->gpr[0]; - psx_taken_BFC38F40 = (psx_brA_BFC38F40 != psx_brB_BFC38F40); - psx_delay_BFC38F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC38F44: AC2092C4 sw $zero, -27964($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -27964; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-27964)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F44u); return; } g_debug_last_store_pc = 0x80050F44u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC2092C4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F44u); -#endif - if (psx_delay_BFC38F40) { - psx_delay_BFC38F40 = 0; - if (psx_taken_BFC38F40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F64u); - goto label_BFC38F64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F48u); - } -label_BFC38F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38F48: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F48u); -#endif - /* 0xBFC38F4C: 8C42925C lw $v0, -28068($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -28068; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-28068)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42925Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38F54: 10400003 beq $v0, $zero, 0xBFC38F64 */ - uint32_t psx_brA_BFC38F54 = cpu->gpr[2]; uint32_t psx_brB_BFC38F54 = cpu->gpr[0]; - psx_taken_BFC38F54 = (psx_brA_BFC38F54 == psx_brB_BFC38F54); - psx_delay_BFC38F54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F58u); -#endif - if (psx_delay_BFC38F54) { - psx_delay_BFC38F54 = 0; - if (psx_taken_BFC38F54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F64u); - goto label_BFC38F64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F5Cu); - } -label_BFC38F5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC38F5C: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x80050F64u; /* jalr link before delay slot */ - psx_delay_BFC38F5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F60u); -#endif - if (psx_delay_BFC38F5C) { - psx_delay_BFC38F5C = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x80050F64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC38F64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC38F64: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80050F64u); -#endif - /* 0xBFC38F68: 8FB00028 lw $s0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F68u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00028u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F68u); -#endif - /* 0xBFC38F6C: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F6Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F70u); -#endif - /* 0xBFC38F70: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F70u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F70u); -#endif - /* 0xBFC38F74: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F74u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F78u); -#endif -label_BFC38F7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F7Cu); -#endif - /* 0xBFC38F7C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC38F80: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80050F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC38F84: 03E00008 jr $ra */ - psx_delay_BFC38F84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F88u); -#endif - if (psx_delay_BFC38F84) { - psx_delay_BFC38F84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC38F8C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC38F8Cu); - int psx_delay_BFC38F8C = 0; - int psx_taken_BFC38F8C = 0; - int psx_delay_BFC38FC4 = 0; - int psx_taken_BFC38FC4 = 0; - int psx_delay_BFC39010 = 0; - int psx_taken_BFC39010 = 0; - int psx_delay_BFC39018 = 0; - int psx_taken_BFC39018 = 0; - int psx_delay_BFC39020 = 0; - int psx_taken_BFC39020 = 0; - int psx_delay_BFC39064 = 0; - int psx_taken_BFC39064 = 0; - int psx_delay_BFC3906C = 0; - int psx_taken_BFC3906C = 0; - int psx_delay_BFC39078 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC38F94u: goto label_BFC38F94; - case 0xBFC38FCCu: goto label_BFC38FCC; - case 0xBFC39018u: goto label_BFC39018; - case 0xBFC39020u: goto label_BFC39020; - case 0xBFC39028u: goto label_BFC39028; - case 0xBFC39034u: goto label_BFC39034; - case 0xBFC3906Cu: goto label_BFC3906C; - case 0xBFC39074u: goto label_BFC39074; - case 0xBFC39078u: goto label_BFC39078; - default: break; - } - } -label_BFC38F8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F8C: 10000022 beq $zero, $zero, 0xBFC39018 */ - uint32_t psx_brA_BFC38F8C = cpu->gpr[0]; uint32_t psx_brB_BFC38F8C = cpu->gpr[0]; - psx_taken_BFC38F8C = (psx_brA_BFC38F8C == psx_brB_BFC38F8C); - psx_delay_BFC38F8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38F90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80050F90u); -#endif - if (psx_delay_BFC38F8C) { - psx_delay_BFC38F8C = 0; - if (psx_taken_BFC38F8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051018u); - goto label_BFC39018; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F94u); - } -label_BFC38F94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38F94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38F94: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC38F98: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050F98u); -#endif - /* 0xBFC38F9C: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050F9Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FA0u); -#endif - /* 0xBFC38FA0: 8DEF92B0 lw $t7, -27984($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FA0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92B0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC38FA4: 240E0401 addiu $t6, $zero, 1025 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1025)); - PGXP_ALU(0x240E0401u, cpu->gpr[14], _pgx1, 0x00000401u); } -#ifdef PSX_COSIM - cosim_instr(0x80050FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC38FA8: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FA8u); return; } g_debug_last_store_pc = 0x80050FA8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38FAC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC38FB0: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FB0u); return; } g_debug_last_store_pc = 0x80050FB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC38FB4: AC20929C sw $zero, -28004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FB4u); return; } g_debug_last_store_pc = 0x80050FB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20929Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC38FB8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FB8u); -#endif - /* 0xBFC38FBC: 8F18929C lw $t8, -28004($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FBCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18929Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38FC0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC38FC4: 1000001B beq $zero, $zero, 0xBFC39034 */ - uint32_t psx_brA_BFC38FC4 = cpu->gpr[0]; uint32_t psx_brB_BFC38FC4 = cpu->gpr[0]; - psx_taken_BFC38FC4 = (psx_brA_BFC38FC4 == psx_brB_BFC38FC4); - psx_delay_BFC38FC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC38FC8: AC389298 sw $t8, -28008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FC8u); return; } g_debug_last_store_pc = 0x80050FC8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389298u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FC8u); -#endif - if (psx_delay_BFC38FC4) { - psx_delay_BFC38FC4 = 0; - if (psx_taken_BFC38FC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051034u); - goto label_BFC39034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050FCCu); - } -label_BFC38FCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC38FCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC38FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC38FCC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC38FD0: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FD0u); -#endif - /* 0xBFC38FD4: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FD4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FD4u); -#endif - /* 0xBFC38FD8: 8D0892B0 lw $t0, -27984($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FD8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892B0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC38FDC: 24190401 addiu $t9, $zero, 1025 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1025)); - PGXP_ALU(0x24190401u, cpu->gpr[25], _pgx1, 0x00000401u); } -#ifdef PSX_COSIM - cosim_instr(0x80050FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC38FE0: 3C090400 lui $t1, 0x400 */ - cpu->gpr[9] = 0x04000000u; - PGXP_ALU(0x3C090400u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC38FE4: AD190000 sw $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FE4u); return; } g_debug_last_store_pc = 0x80050FE4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAD190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC38FE8: 3C0A0200 lui $t2, 0x200 */ - cpu->gpr[10] = 0x02000000u; - PGXP_ALU(0x3C0A0200u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC38FEC: AC490000 sw $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FECu); return; } g_debug_last_store_pc = 0x80050FECu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80050FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC38FF0: 3C0B0100 lui $t3, 0x100 */ - cpu->gpr[11] = 0x01000000u; - PGXP_ALU(0x3C0B0100u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC38FF4: AC4A0000 sw $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FF4u); return; } g_debug_last_store_pc = 0x80050FF4u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC38FF8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80050FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC38FFC: AC4B0000 sw $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80050FFCu); return; } g_debug_last_store_pc = 0x80050FFCu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80050FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39000: AC20929C sw $zero, -28004($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28004; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051000u); return; } g_debug_last_store_pc = 0x80051000u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20929Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC39004: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051004u); -#endif - /* 0xBFC39008: 8D8C929C lw $t4, -28004($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051008u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C929Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3900C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39010: 10000008 beq $zero, $zero, 0xBFC39034 */ - uint32_t psx_brA_BFC39010 = cpu->gpr[0]; uint32_t psx_brB_BFC39010 = cpu->gpr[0]; - psx_taken_BFC39010 = (psx_brA_BFC39010 == psx_brB_BFC39010); - psx_delay_BFC39010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC39014: AC2C9298 sw $t4, -28008($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -28008; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051014u); return; } g_debug_last_store_pc = 0x80051014u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2C9298u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051014u); -#endif - if (psx_delay_BFC39010) { - psx_delay_BFC39010 = 0; - if (psx_taken_BFC39010) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051034u); - goto label_BFC39034; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051018u); - } -label_BFC39018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39018: 1080FFDE beq $a0, $zero, 0xBFC38F94 */ - uint32_t psx_brA_BFC39018 = cpu->gpr[4]; uint32_t psx_brB_BFC39018 = cpu->gpr[0]; - psx_taken_BFC39018 = (psx_brA_BFC39018 == psx_brB_BFC39018); - psx_delay_BFC39018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3901C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005101Cu); -#endif - if (psx_delay_BFC39018) { - psx_delay_BFC39018 = 0; - if (psx_taken_BFC39018) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F94u); - goto label_BFC38F94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051020u); - } -label_BFC39020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39020: 1081FFEA beq $a0, $at, 0xBFC38FCC */ - uint32_t psx_brA_BFC39020 = cpu->gpr[4]; uint32_t psx_brB_BFC39020 = cpu->gpr[1]; - psx_taken_BFC39020 = (psx_brA_BFC39020 == psx_brB_BFC39020); - psx_delay_BFC39020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051024u); -#endif - if (psx_delay_BFC39020) { - psx_delay_BFC39020 = 0; - if (psx_taken_BFC39020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050FCCu); - goto label_BFC38FCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051028u); - } -label_BFC39028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39028: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051028u); -#endif - /* 0xBFC3902C: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005102Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051030u); -#endif -label_BFC39034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051034u); -#endif - /* 0xBFC39034: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051034u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80051034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC39038: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3903C: 3C01E100 lui $at, 0xE100 */ - cpu->gpr[1] = 0xE1000000u; - PGXP_ALU(0x3C01E100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005103Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051040u); -#endif - /* 0xBFC39040: 8C6392A0 lw $v1, -28000($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -28000; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-28000)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051040u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6392A0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80051040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39044: 34211000 ori $at, $at, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1000u; - PGXP_ALU(0x34211000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80051044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC39048: 31AE3FFF andi $t6, $t5, 0x3FFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x3FFFu; - PGXP_ALU(0x31AE3FFFu, cpu->gpr[14], _pgx1, 0x3FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC3904C: 01C17825 or $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C17825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005104Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC39050: AC6F0000 sw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051050u); return; } g_debug_last_store_pc = 0x80051050u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051050u); -#endif - /* 0xBFC39054: 8C600000 lw $zero, 0($v1) */ - { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051054u); return; } (void)psx_cyc_load_word(cpu, psx_addr, 0, 0x8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051054u); -#endif - /* 0xBFC39058: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051058u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3905C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005105Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC39060: 33191000 andi $t9, $t8, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1000u; - PGXP_ALU(0x33191000u, cpu->gpr[25], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80051060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39064: 13200004 beq $t9, $zero, 0xBFC39078 */ - uint32_t psx_brA_BFC39064 = cpu->gpr[25]; uint32_t psx_brB_BFC39064 = cpu->gpr[0]; - psx_taken_BFC39064 = (psx_brA_BFC39064 == psx_brB_BFC39064); - psx_delay_BFC39064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39068: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051068u); -#endif - if (psx_delay_BFC39064) { - psx_delay_BFC39064 = 0; - if (psx_taken_BFC39064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051078u); - goto label_BFC39078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005106Cu); - } -label_BFC3906C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3906Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3906C: 10000002 beq $zero, $zero, 0xBFC39078 */ - uint32_t psx_brA_BFC3906C = cpu->gpr[0]; uint32_t psx_brB_BFC3906C = cpu->gpr[0]; - psx_taken_BFC3906C = (psx_brA_BFC3906C == psx_brB_BFC3906C); - psx_delay_BFC3906C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39070: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051070u); -#endif - if (psx_delay_BFC3906C) { - psx_delay_BFC3906C = 0; - if (psx_taken_BFC3906C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051078u); - goto label_BFC39078; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051074u); - } -label_BFC39074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39074: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051074u); -#endif -label_BFC39078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39078: 03E00008 jr $ra */ - psx_delay_BFC39078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3907C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005107Cu); -#endif - if (psx_delay_BFC39078) { - psx_delay_BFC39078 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39080(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39080u); - int psx_delay_BFC39084 = 0; - int psx_taken_BFC39084 = 0; - int psx_delay_BFC39094 = 0; - int psx_delay_BFC390B0 = 0; - int psx_taken_BFC390B0 = 0; - int psx_delay_BFC390C0 = 0; - int psx_taken_BFC390C0 = 0; - int psx_delay_BFC390CC = 0; - int psx_delay_BFC390D4 = 0; - int psx_taken_BFC390D4 = 0; - int psx_delay_BFC390E8 = 0; - int psx_taken_BFC390E8 = 0; - int psx_delay_BFC39108 = 0; - int psx_taken_BFC39108 = 0; - int psx_delay_BFC39110 = 0; - int psx_delay_BFC3912C = 0; - int psx_taken_BFC3912C = 0; - int psx_delay_BFC3913C = 0; - int psx_delay_BFC39144 = 0; - int psx_taken_BFC39144 = 0; - int psx_delay_BFC39158 = 0; - int psx_taken_BFC39158 = 0; - int psx_delay_BFC39178 = 0; - int psx_taken_BFC39178 = 0; - int psx_delay_BFC3918C = 0; - int psx_taken_BFC3918C = 0; - int psx_delay_BFC39194 = 0; - int psx_taken_BFC39194 = 0; - int psx_delay_BFC391B4 = 0; - int psx_taken_BFC391B4 = 0; - int psx_delay_BFC391C0 = 0; - int psx_taken_BFC391C0 = 0; - int psx_delay_BFC391D4 = 0; - int psx_taken_BFC391D4 = 0; - int psx_delay_BFC391DC = 0; - int psx_delay_BFC391E4 = 0; - int psx_taken_BFC391E4 = 0; - int psx_delay_BFC391F8 = 0; - int psx_taken_BFC391F8 = 0; - int psx_delay_BFC39218 = 0; - int psx_taken_BFC39218 = 0; - int psx_delay_BFC39220 = 0; - int psx_taken_BFC39220 = 0; - int psx_delay_BFC3923C = 0; - int psx_taken_BFC3923C = 0; - int psx_delay_BFC3925C = 0; - int psx_taken_BFC3925C = 0; - int psx_delay_BFC3927C = 0; - int psx_taken_BFC3927C = 0; - int psx_delay_BFC39288 = 0; - int psx_taken_BFC39288 = 0; - int psx_delay_BFC392A0 = 0; - int psx_taken_BFC392A0 = 0; - int psx_delay_BFC392B0 = 0; - int psx_taken_BFC392B0 = 0; - int psx_delay_BFC392C0 = 0; - int psx_taken_BFC392C0 = 0; - int psx_delay_BFC392E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3908Cu: goto label_BFC3908C; - case 0xBFC3909Cu: goto label_BFC3909C; - case 0xBFC390B8u: goto label_BFC390B8; - case 0xBFC390C8u: goto label_BFC390C8; - case 0xBFC390CCu: goto label_BFC390CC; - case 0xBFC390D4u: goto label_BFC390D4; - case 0xBFC390DCu: goto label_BFC390DC; - case 0xBFC390F0u: goto label_BFC390F0; - case 0xBFC39110u: goto label_BFC39110; - case 0xBFC39118u: goto label_BFC39118; - case 0xBFC39134u: goto label_BFC39134; - case 0xBFC3913Cu: goto label_BFC3913C; - case 0xBFC39144u: goto label_BFC39144; - case 0xBFC3914Cu: goto label_BFC3914C; - case 0xBFC39160u: goto label_BFC39160; - case 0xBFC39180u: goto label_BFC39180; - case 0xBFC39194u: goto label_BFC39194; - case 0xBFC3919Cu: goto label_BFC3919C; - case 0xBFC391BCu: goto label_BFC391BC; - case 0xBFC391C8u: goto label_BFC391C8; - case 0xBFC391DCu: goto label_BFC391DC; - case 0xBFC391E4u: goto label_BFC391E4; - case 0xBFC391ECu: goto label_BFC391EC; - case 0xBFC39200u: goto label_BFC39200; - case 0xBFC39220u: goto label_BFC39220; - case 0xBFC39228u: goto label_BFC39228; - case 0xBFC39244u: goto label_BFC39244; - case 0xBFC39264u: goto label_BFC39264; - case 0xBFC39284u: goto label_BFC39284; - case 0xBFC39290u: goto label_BFC39290; - case 0xBFC392A8u: goto label_BFC392A8; - case 0xBFC392B8u: goto label_BFC392B8; - case 0xBFC392BCu: goto label_BFC392BC; - case 0xBFC392C8u: goto label_BFC392C8; - case 0xBFC392CCu: goto label_BFC392CC; - case 0xBFC392D8u: goto label_BFC392D8; - default: break; - } - } -label_BFC39080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39080: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39084: 14800068 bne $a0, $zero, 0xBFC39228 */ - uint32_t psx_brA_BFC39084 = cpu->gpr[4]; uint32_t psx_brB_BFC39084 = cpu->gpr[0]; - psx_taken_BFC39084 = (psx_brA_BFC39084 != psx_brB_BFC39084); - psx_delay_BFC39084 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39088: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051088u); return; } g_debug_last_store_pc = 0x80051088u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051088u); -#endif - if (psx_delay_BFC39084) { - psx_delay_BFC39084 = 0; - if (psx_taken_BFC39084) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051228u); - goto label_BFC39228; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005108Cu); - } -label_BFC3908C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3908Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3908Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3908C: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005108Cu); return; } g_debug_last_store_pc = 0x8005108Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005108Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC39090: AFB10020 sw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051090u); return; } g_debug_last_store_pc = 0x80051090u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80051090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39094: 0C0144BA jal 0xB00512E8 */ - cpu->gpr[31] = 0x8005109Cu; /* jal link before delay slot */ - psx_delay_BFC39094 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC39098: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051098u); return; } g_debug_last_store_pc = 0x80051098u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80051098u); -#endif - if (psx_delay_BFC39094) { - psx_delay_BFC39094 = 0; - cpu->gpr[31] = 0x8005109Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512E8u); - cpu->pc = 0x800512E8u; return; - } -label_BFC3909C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3909Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3909Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3909C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510A0u); -#endif - /* 0xBFC390A0: 8DCE9298 lw $t6, -28008($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510A0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9298u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800510A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC390A4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510A4u); -#endif - /* 0xBFC390A8: 8DEF929C lw $t7, -28004($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510A8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF929Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800510A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800510ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC390B0: 15CF0006 bne $t6, $t7, 0xBFC390CC */ - uint32_t psx_brA_BFC390B0 = cpu->gpr[14]; uint32_t psx_brB_BFC390B0 = cpu->gpr[15]; - psx_taken_BFC390B0 = (psx_brA_BFC390B0 != psx_brB_BFC390B0); - psx_delay_BFC390B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC390B4: 3C100100 lui $s0, 0x100 */ - cpu->gpr[16] = 0x01000000u; - PGXP_ALU(0x3C100100u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510B4u); -#endif - if (psx_delay_BFC390B0) { - psx_delay_BFC390B0 = 0; - if (psx_taken_BFC390B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510CCu); - goto label_BFC390CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510B8u); - } -label_BFC390B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC390B8: 3C121000 lui $s2, 0x1000 */ - cpu->gpr[18] = 0x10000000u; - PGXP_ALU(0x3C121000u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC390BC: 3C116000 lui $s1, 0x6000 */ - cpu->gpr[17] = 0x60000000u; - PGXP_ALU(0x3C116000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390C0: 1000001E beq $zero, $zero, 0xBFC3913C */ - uint32_t psx_brA_BFC390C0 = cpu->gpr[0]; uint32_t psx_brB_BFC390C0 = cpu->gpr[0]; - psx_taken_BFC390C0 = (psx_brA_BFC390C0 == psx_brB_BFC390C0); - psx_delay_BFC390C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC390C4: 3C100100 lui $s0, 0x100 */ - cpu->gpr[16] = 0x01000000u; - PGXP_ALU(0x3C100100u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510C4u); -#endif - if (psx_delay_BFC390C0) { - psx_delay_BFC390C0 = 0; - if (psx_taken_BFC390C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005113Cu); - goto label_BFC3913C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510C8u); - } -label_BFC390C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC390C8: 3C100100 lui $s0, 0x100 */ - cpu->gpr[16] = 0x01000000u; - PGXP_ALU(0x3C100100u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510C8u); -#endif -label_BFC390CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC390CC: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x800510D4u; /* jal link before delay slot */ - psx_delay_BFC390CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800510D0u); -#endif - if (psx_delay_BFC390CC) { - psx_delay_BFC390CC = 0; - cpu->gpr[31] = 0x800510D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC390D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC390D4: 10400006 beq $v0, $zero, 0xBFC390F0 */ - uint32_t psx_brA_BFC390D4 = cpu->gpr[2]; uint32_t psx_brB_BFC390D4 = cpu->gpr[0]; - psx_taken_BFC390D4 = (psx_brA_BFC390D4 == psx_brB_BFC390D4); - psx_delay_BFC390D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800510D8u); -#endif - if (psx_delay_BFC390D4) { - psx_delay_BFC390D4 = 0; - if (psx_taken_BFC390D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510F0u); - goto label_BFC390F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510DCu); - } -label_BFC390DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510DCu); -#endif - /* 0xBFC390DC: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800510DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510E0u); -#endif - /* 0xBFC390E0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510E0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800510E0u); -#endif - /* 0xBFC390E4: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510E4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800510E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390E8: 1000007B beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC390E8 = cpu->gpr[0]; uint32_t psx_brB_BFC390E8 = cpu->gpr[0]; - psx_taken_BFC390E8 = (psx_brA_BFC390E8 == psx_brB_BFC390E8); - psx_delay_BFC390E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC390EC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800510ECu); -#endif - if (psx_delay_BFC390E8) { - psx_delay_BFC390E8 = 0; - if (psx_taken_BFC390E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510F0u); - } -label_BFC390F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC390F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC390F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800510F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC390F0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800510F0u); -#endif - /* 0xBFC390F4: 8F1892B0 lw $t8, -27984($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510F4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892B0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800510F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC390F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800510F8u); -#endif - /* 0xBFC390FC: 8F190000 lw $t9, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800510FCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800510FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39100: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010100u); -#endif - /* 0xBFC39104: 03304024 and $t0, $t9, $s0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[16]; - PGXP_ALU(0x03304024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC39108: 15000003 bne $t0, $zero, 0xBFC39118 */ - uint32_t psx_brA_BFC39108 = cpu->gpr[8]; uint32_t psx_brB_BFC39108 = cpu->gpr[0]; - psx_taken_BFC39108 = (psx_brA_BFC39108 != psx_brB_BFC39108); - psx_delay_BFC39108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3910C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005110Cu); -#endif - if (psx_delay_BFC39108) { - psx_delay_BFC39108 = 0; - if (psx_taken_BFC39108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051118u); - goto label_BFC39118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051110u); - } -label_BFC39110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39110: 0C01436B jal 0xB0050DAC */ - cpu->gpr[31] = 0x80051118u; /* jal link before delay slot */ - psx_delay_BFC39110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39114: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051114u); -#endif - if (psx_delay_BFC39110) { - psx_delay_BFC39110 = 0; - cpu->gpr[31] = 0x80051118u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050DACu); - cpu->pc = 0x80050DACu; return; - } -label_BFC39118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC39118: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051118u); -#endif - /* 0xBFC3911C: 8D299298 lw $t1, -28008($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005111Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299298u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC39120: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051120u); -#endif - /* 0xBFC39124: 8D4A929C lw $t2, -28004($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051124u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A929Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80051124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39128: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3912C: 152AFFE7 bne $t1, $t2, 0xBFC390CC */ - uint32_t psx_brA_BFC3912C = cpu->gpr[9]; uint32_t psx_brB_BFC3912C = cpu->gpr[10]; - psx_taken_BFC3912C = (psx_brA_BFC3912C != psx_brB_BFC3912C); - psx_delay_BFC3912C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39130: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051130u); -#endif - if (psx_delay_BFC3912C) { - psx_delay_BFC3912C = 0; - if (psx_taken_BFC3912C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800510CCu); - goto label_BFC390CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051134u); - } -label_BFC39134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC39134: 3C116000 lui $s1, 0x6000 */ - cpu->gpr[17] = 0x60000000u; - PGXP_ALU(0x3C116000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC39138: 3C121000 lui $s2, 0x1000 */ - cpu->gpr[18] = 0x10000000u; - PGXP_ALU(0x3C121000u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051138u); -#endif -label_BFC3913C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3913Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3913Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005113Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3913C: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x80051144u; /* jal link before delay slot */ - psx_delay_BFC3913C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39140: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051140u); -#endif - if (psx_delay_BFC3913C) { - psx_delay_BFC3913C = 0; - cpu->gpr[31] = 0x80051144u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC39144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39144: 10400006 beq $v0, $zero, 0xBFC39160 */ - uint32_t psx_brA_BFC39144 = cpu->gpr[2]; uint32_t psx_brB_BFC39144 = cpu->gpr[0]; - psx_taken_BFC39144 = (psx_brA_BFC39144 == psx_brB_BFC39144); - psx_delay_BFC39144 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39148: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051148u); -#endif - if (psx_delay_BFC39144) { - psx_delay_BFC39144 = 0; - if (psx_taken_BFC39144) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051160u); - goto label_BFC39160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005114Cu); - } -label_BFC3914C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3914Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3914Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005114Cu); -#endif - /* 0xBFC3914C: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005114Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005114Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051150u); -#endif - /* 0xBFC39150: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051150u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80051150u); -#endif - /* 0xBFC39154: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051154u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80051154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39158: 1000005F beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC39158 = cpu->gpr[0]; uint32_t psx_brB_BFC39158 = cpu->gpr[0]; - psx_taken_BFC39158 = (psx_brA_BFC39158 == psx_brB_BFC39158); - psx_delay_BFC39158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3915C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005115Cu); -#endif - if (psx_delay_BFC39158) { - psx_delay_BFC39158 = 0; - if (psx_taken_BFC39158) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051160u); - } -label_BFC39160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39160: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051160u); -#endif - /* 0xBFC39164: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051164u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39168: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051168u); -#endif - /* 0xBFC3916C: 8C4B0000 lw $t3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005116Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } - PGXP_LOAD(0x8C4B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005116Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39170: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21800u); -#endif - /* 0xBFC39174: 01716024 and $t4, $t3, $s1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[12] = cpu->gpr[11] & cpu->gpr[17]; - PGXP_ALU(0x01716024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC39178: 15800008 bne $t4, $zero, 0xBFC3919C */ - uint32_t psx_brA_BFC39178 = cpu->gpr[12]; uint32_t psx_brB_BFC39178 = cpu->gpr[0]; - psx_taken_BFC39178 = (psx_brA_BFC39178 != psx_brB_BFC39178); - psx_delay_BFC39178 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3917C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005117Cu); -#endif - if (psx_delay_BFC39178) { - psx_delay_BFC39178 = 0; - if (psx_taken_BFC39178) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005119Cu); - goto label_BFC3919C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051180u); - } -label_BFC39180: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39180u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051180u); -#endif - /* 0xBFC39180: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051180u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80051180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46000u); -#endif - /* 0xBFC39188: 01B27024 and $t6, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[18]; - PGXP_ALU(0x01B27024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3918C: 11C0FFEB beq $t6, $zero, 0xBFC3913C */ - uint32_t psx_brA_BFC3918C = cpu->gpr[14]; uint32_t psx_brB_BFC3918C = cpu->gpr[0]; - psx_taken_BFC3918C = (psx_brA_BFC3918C == psx_brB_BFC3918C); - psx_delay_BFC3918C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39190: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051190u); -#endif - if (psx_delay_BFC3918C) { - psx_delay_BFC3918C = 0; - if (psx_taken_BFC3918C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005113Cu); - goto label_BFC3913C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051194u); - } -label_BFC39194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39194: 1000000C beq $zero, $zero, 0xBFC391C8 */ - uint32_t psx_brA_BFC39194 = cpu->gpr[0]; uint32_t psx_brB_BFC39194 = cpu->gpr[0]; - psx_taken_BFC39194 = (psx_brA_BFC39194 == psx_brB_BFC39194); - psx_delay_BFC39194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC39198: 3C100400 lui $s0, 0x400 */ - cpu->gpr[16] = 0x04000000u; - PGXP_ALU(0x3C100400u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051198u); -#endif - if (psx_delay_BFC39194) { - psx_delay_BFC39194 = 0; - if (psx_taken_BFC39194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511C8u); - goto label_BFC391C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005119Cu); - } -label_BFC3919C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3919Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3919Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3919C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005119Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511A0u); -#endif - /* 0xBFC391A0: 8DEF92B0 lw $t7, -27984($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511A0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92B0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800511A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511A4u); -#endif - /* 0xBFC391A8: 8DF80000 lw $t8, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511A8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } - PGXP_LOAD(0x8DF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800511A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC391B0: 0310C824 and $t9, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16]; - PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800511B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC391B4: 1720FFE1 bne $t9, $zero, 0xBFC3913C */ - uint32_t psx_brA_BFC391B4 = cpu->gpr[25]; uint32_t psx_brB_BFC391B4 = cpu->gpr[0]; - psx_taken_BFC391B4 = (psx_brA_BFC391B4 != psx_brB_BFC391B4); - psx_delay_BFC391B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511B8u); -#endif - if (psx_delay_BFC391B4) { - psx_delay_BFC391B4 = 0; - if (psx_taken_BFC391B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005113Cu); - goto label_BFC3913C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511BCu); - } -label_BFC391BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC391BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC391BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC391BC: 3C100400 lui $s0, 0x400 */ - cpu->gpr[16] = 0x04000000u; - PGXP_ALU(0x3C100400u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800511BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391C0: 10000001 beq $zero, $zero, 0xBFC391C8 */ - uint32_t psx_brA_BFC391C0 = cpu->gpr[0]; uint32_t psx_brB_BFC391C0 = cpu->gpr[0]; - psx_taken_BFC391C0 = (psx_brA_BFC391C0 == psx_brB_BFC391C0); - psx_delay_BFC391C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC391C4: AC500000 sw $s0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511C4u); return; } g_debug_last_store_pc = 0x800511C4u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAC500000u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800511C4u); -#endif - if (psx_delay_BFC391C0) { - psx_delay_BFC391C0 = 0; - if (psx_taken_BFC391C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511C8u); - goto label_BFC391C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511C8u); - } -label_BFC391C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC391C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC391C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511C8u); -#endif - /* 0xBFC391C8: 8C480000 lw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511C8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800511C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10300u); -#endif - /* 0xBFC391D0: 01104824 and $t1, $t0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16]; - PGXP_ALU(0x01104824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800511D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC391D4: 1520003C bne $t1, $zero, 0xBFC392C8 */ - uint32_t psx_brA_BFC391D4 = cpu->gpr[9]; uint32_t psx_brB_BFC391D4 = cpu->gpr[0]; - psx_taken_BFC391D4 = (psx_brA_BFC391D4 != psx_brB_BFC391D4); - psx_delay_BFC391D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511D8u); -#endif - if (psx_delay_BFC391D4) { - psx_delay_BFC391D4 = 0; - if (psx_taken_BFC391D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512C8u); - goto label_BFC392C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511DCu); - } -label_BFC391DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC391DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC391DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC391DC: 0C0144C0 jal 0xB0051300 */ - cpu->gpr[31] = 0x800511E4u; /* jal link before delay slot */ - psx_delay_BFC391DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511E0u); -#endif - if (psx_delay_BFC391DC) { - psx_delay_BFC391DC = 0; - cpu->gpr[31] = 0x800511E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051300u); - cpu->pc = 0x80051300u; return; - } -label_BFC391E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC391E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC391E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC391E4: 10400006 beq $v0, $zero, 0xBFC39200 */ - uint32_t psx_brA_BFC391E4 = cpu->gpr[2]; uint32_t psx_brB_BFC391E4 = cpu->gpr[0]; - psx_taken_BFC391E4 = (psx_brA_BFC391E4 == psx_brB_BFC391E4); - psx_delay_BFC391E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800511E8u); -#endif - if (psx_delay_BFC391E4) { - psx_delay_BFC391E4 = 0; - if (psx_taken_BFC391E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051200u); - goto label_BFC39200; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511ECu); - } -label_BFC391EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC391ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC391ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511ECu); -#endif - /* 0xBFC391EC: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511ECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800511ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800511F0u); -#endif - /* 0xBFC391F0: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511F0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800511F0u); -#endif - /* 0xBFC391F4: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800511F4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800511F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC391F8: 10000037 beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC391F8 = cpu->gpr[0]; uint32_t psx_brB_BFC391F8 = cpu->gpr[0]; - psx_taken_BFC391F8 = (psx_brA_BFC391F8 == psx_brB_BFC391F8); - psx_delay_BFC391F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC391FC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800511FCu); -#endif - if (psx_delay_BFC391F8) { - psx_delay_BFC391F8 = 0; - if (psx_taken_BFC391F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051200u); - } -label_BFC39200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39200: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051200u); -#endif - /* 0xBFC39204: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051204u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39208: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051208u); -#endif - /* 0xBFC3920C: 8C4A0000 lw $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005120Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x8C4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39210: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10C00u); -#endif - /* 0xBFC39214: 01505824 and $t3, $t2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[16]; - PGXP_ALU(0x01505824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC39218: 1160FFF0 beq $t3, $zero, 0xBFC391DC */ - uint32_t psx_brA_BFC39218 = cpu->gpr[11]; uint32_t psx_brB_BFC39218 = cpu->gpr[0]; - psx_taken_BFC39218 = (psx_brA_BFC39218 == psx_brB_BFC39218); - psx_delay_BFC39218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3921C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005121Cu); -#endif - if (psx_delay_BFC39218) { - psx_delay_BFC39218 = 0; - if (psx_taken_BFC39218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800511DCu); - goto label_BFC391DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051220u); - } -label_BFC39220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39220: 1000002A beq $zero, $zero, 0xBFC392CC */ - uint32_t psx_brA_BFC39220 = cpu->gpr[0]; uint32_t psx_brB_BFC39220 = cpu->gpr[0]; - psx_taken_BFC39220 = (psx_brA_BFC39220 == psx_brB_BFC39220); - psx_delay_BFC39220 = 1; - /* 0xBFC39224: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051224u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051224u); -#endif - if (psx_delay_BFC39220) { - psx_delay_BFC39220 = 0; - if (psx_taken_BFC39220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512CCu); - goto label_BFC392CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051228u); - } -label_BFC39228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC39228: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051228u); -#endif - /* 0xBFC3922C: 8D8C9298 lw $t4, -28008($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005122Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9298u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005122Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC39230: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051230u); -#endif - /* 0xBFC39234: 8DAD929C lw $t5, -28004($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051234u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD929Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80051234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39238: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3923C: 118D0009 beq $t4, $t5, 0xBFC39264 */ - uint32_t psx_brA_BFC3923C = cpu->gpr[12]; uint32_t psx_brB_BFC3923C = cpu->gpr[13]; - psx_taken_BFC3923C = (psx_brA_BFC3923C == psx_brB_BFC3923C); - psx_delay_BFC3923C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051240u); -#endif - if (psx_delay_BFC3923C) { - psx_delay_BFC3923C = 0; - if (psx_taken_BFC3923C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051264u); - goto label_BFC39264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051244u); - } -label_BFC39244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC39244: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051244u); -#endif - /* 0xBFC39248: 8DCE9298 lw $t6, -28008($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051248u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9298u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3924C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005124Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051250u); -#endif - /* 0xBFC39250: 8DEF929C lw $t7, -28004($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051250u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF929Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC39258: 01CF1023 subu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] - cpu->gpr[15]; - PGXP_ALU(0x01CF1023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3925C: 1000001E beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC3925C = cpu->gpr[0]; uint32_t psx_brB_BFC3925C = cpu->gpr[0]; - psx_taken_BFC3925C = (psx_brA_BFC3925C == psx_brB_BFC3925C); - psx_delay_BFC3925C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39260: 3042003F andi $v0, $v0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x3Fu; - PGXP_ALU(0x3042003Fu, cpu->gpr[2], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80051260u); -#endif - if (psx_delay_BFC3925C) { - psx_delay_BFC3925C = 0; - if (psx_taken_BFC3925C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051264u); - } -label_BFC39264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39264: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051264u); -#endif - /* 0xBFC39268: 8C4292A4 lw $v0, -27996($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051268u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4292A4u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3926C: AFB2001C sw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005126Cu); return; } g_debug_last_store_pc = 0x8005126Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005126Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051270u); -#endif - /* 0xBFC39270: 8C580000 lw $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051270u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8C580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC39274: 3C121000 lui $s2, 0x1000 */ - cpu->gpr[18] = 0x10000000u; - PGXP_ALU(0x3C121000u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3040000u); -#endif - /* 0xBFC39278: 0312C824 and $t9, $t8, $s2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[18]; - PGXP_ALU(0x0312C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3927C: 17200004 bne $t9, $zero, 0xBFC39290 */ - uint32_t psx_brA_BFC3927C = cpu->gpr[25]; uint32_t psx_brB_BFC3927C = cpu->gpr[0]; - psx_taken_BFC3927C = (psx_brA_BFC3927C != psx_brB_BFC3927C); - psx_delay_BFC3927C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39280: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051280u); -#endif - if (psx_delay_BFC3927C) { - psx_delay_BFC3927C = 0; - if (psx_taken_BFC3927C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051290u); - goto label_BFC39290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051284u); - } -label_BFC39284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051284u); -#endif - /* 0xBFC39284: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051284u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80051284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39288: 10000013 beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC39288 = cpu->gpr[0]; uint32_t psx_brB_BFC39288 = cpu->gpr[0]; - psx_taken_BFC39288 = (psx_brA_BFC39288 == psx_brB_BFC39288); - psx_delay_BFC39288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3928C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005128Cu); -#endif - if (psx_delay_BFC39288) { - psx_delay_BFC39288 = 0; - if (psx_taken_BFC39288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051290u); - } -label_BFC39290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC39290: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051290u); return; } g_debug_last_store_pc = 0x80051290u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051290u); -#endif - /* 0xBFC39294: 8C480000 lw $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051294u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x8C480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC39298: 3C100400 lui $s0, 0x400 */ - cpu->gpr[16] = 0x04000000u; - PGXP_ALU(0x3C100400u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10300u); -#endif - /* 0xBFC3929C: 01104824 and $t1, $t0, $s0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[9] = cpu->gpr[8] & cpu->gpr[16]; - PGXP_ALU(0x01104824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC392A0: 11200006 beq $t1, $zero, 0xBFC392BC */ - uint32_t psx_brA_BFC392A0 = cpu->gpr[9]; uint32_t psx_brB_BFC392A0 = cpu->gpr[0]; - psx_taken_BFC392A0 = (psx_brA_BFC392A0 == psx_brB_BFC392A0); - psx_delay_BFC392A0 = 1; - /* 0xBFC392A4: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512A4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800512A4u); -#endif - if (psx_delay_BFC392A0) { - psx_delay_BFC392A0 = 0; - if (psx_taken_BFC392A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512BCu); - goto label_BFC392BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512A8u); - } -label_BFC392A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512A8u); -#endif - /* 0xBFC392A8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512A8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800512A8u); -#endif - /* 0xBFC392AC: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512ACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800512ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC392B0: 10000009 beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC392B0 = cpu->gpr[0]; uint32_t psx_brB_BFC392B0 = cpu->gpr[0]; - psx_taken_BFC392B0 = (psx_brA_BFC392B0 == psx_brB_BFC392B0); - psx_delay_BFC392B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC392B4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800512B4u); -#endif - if (psx_delay_BFC392B0) { - psx_delay_BFC392B0 = 0; - if (psx_taken_BFC392B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512B8u); - } -label_BFC392B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512B8u); -#endif - /* 0xBFC392B8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512B8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800512B8u); -#endif -label_BFC392BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512BCu); -#endif - /* 0xBFC392BC: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512BCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800512BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC392C0: 10000005 beq $zero, $zero, 0xBFC392D8 */ - uint32_t psx_brA_BFC392C0 = cpu->gpr[0]; uint32_t psx_brB_BFC392C0 = cpu->gpr[0]; - psx_taken_BFC392C0 = (psx_brA_BFC392C0 == psx_brB_BFC392C0); - psx_delay_BFC392C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC392C4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800512C4u); -#endif - if (psx_delay_BFC392C0) { - psx_delay_BFC392C0 = 0; - if (psx_taken_BFC392C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512D8u); - goto label_BFC392D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800512C8u); - } -label_BFC392C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512C8u); -#endif - /* 0xBFC392C8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512C8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800512C8u); -#endif -label_BFC392CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512CCu); -#endif - /* 0xBFC392CC: 8FB10020 lw $s1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512CCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10020u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800512CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512D0u); -#endif - /* 0xBFC392D0: 8FB2001C lw $s2, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512D0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2001Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800512D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC392D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800512D4u); -#endif -label_BFC392D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512D8u); -#endif - /* 0xBFC392D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800512D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC392DC: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800512DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC392E0: 03E00008 jr $ra */ - psx_delay_BFC392E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC392E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800512E4u); -#endif - if (psx_delay_BFC392E0) { - psx_delay_BFC392E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC392E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC392E8u); - int psx_delay_BFC392F8 = 0; -label_BFC392E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC392E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC392E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC392E8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800512E8u); -#endif - /* 0xBFC392EC: 8DCE9D9C lw $t6, -25188($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512ECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D9Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800512ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800512F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC392F0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800512F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC392F4: 25CF00F0 addiu $t7, $t6, 240 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (240)); - PGXP_ALU(0x25CF00F0u, cpu->gpr[15], _pgx1, 0x000000F0u); } -#ifdef PSX_COSIM - cosim_instr(0x800512F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC392F8: 03E00008 jr $ra */ - psx_delay_BFC392F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC392FC: AC2FEA5C sw $t7, -5540($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-5540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800512FCu); return; } g_debug_last_store_pc = 0x800512FCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEA5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800512FCu); -#endif - if (psx_delay_BFC392F8) { - psx_delay_BFC392F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39300(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39300u); - int psx_delay_BFC39318 = 0; - int psx_taken_BFC39318 = 0; - int psx_delay_BFC39338 = 0; - int psx_taken_BFC39338 = 0; - int psx_delay_BFC39340 = 0; - int psx_taken_BFC39340 = 0; - int psx_delay_BFC39364 = 0; - int psx_taken_BFC39364 = 0; - int psx_delay_BFC3936C = 0; - int psx_taken_BFC3936C = 0; - int psx_delay_BFC393A0 = 0; - int psx_delay_BFC393A8 = 0; - int psx_delay_BFC393B0 = 0; - int psx_taken_BFC393B0 = 0; - int psx_delay_BFC393C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39320u: goto label_BFC39320; - case 0xBFC39340u: goto label_BFC39340; - case 0xBFC39348u: goto label_BFC39348; - case 0xBFC3934Cu: goto label_BFC3934C; - case 0xBFC3936Cu: goto label_BFC3936C; - case 0xBFC39374u: goto label_BFC39374; - case 0xBFC39378u: goto label_BFC39378; - case 0xBFC393A8u: goto label_BFC393A8; - case 0xBFC393B0u: goto label_BFC393B0; - case 0xBFC393B8u: goto label_BFC393B8; - case 0xBFC393BCu: goto label_BFC393BC; - default: break; - } - } -label_BFC39300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC39300: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC39304: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051304u); -#endif - /* 0xBFC39308: 8DEF9D9C lw $t7, -25188($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051308u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9D9Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051308u); -#endif - /* 0xBFC3930C: 8DCEEA5C lw $t6, -5540($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -5540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-5540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005130Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEA5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39310: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39314: 01CF082A slt $at, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x01CF082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39318: 10200027 beq $at, $zero, 0xBFC393B8 */ - uint32_t psx_brA_BFC39318 = cpu->gpr[1]; uint32_t psx_brB_BFC39318 = cpu->gpr[0]; - psx_taken_BFC39318 = (psx_brA_BFC39318 == psx_brB_BFC39318); - psx_delay_BFC39318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3931C: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005131Cu); return; } g_debug_last_store_pc = 0x8005131Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005131Cu); -#endif - if (psx_delay_BFC39318) { - psx_delay_BFC39318 = 0; - if (psx_taken_BFC39318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513B8u); - goto label_BFC393B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051320u); - } -label_BFC39320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC39320: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051320u); -#endif - /* 0xBFC39324: 8F1892A4 lw $t8, -27996($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27996; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27996)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051324u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892A4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39328: 3C010400 lui $at, 0x400 */ - cpu->gpr[1] = 0x04000000u; - PGXP_ALU(0x3C010400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051328u); -#endif - /* 0xBFC3932C: 8F020000 lw $v0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005132Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x1000000u); } - PGXP_LOAD(0x8F020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39330: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000006u); -#endif - /* 0xBFC39334: 0041C824 and $t9, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39338: 13200004 beq $t9, $zero, 0xBFC3934C */ - uint32_t psx_brA_BFC39338 = cpu->gpr[25]; uint32_t psx_brB_BFC39338 = cpu->gpr[0]; - psx_taken_BFC39338 = (psx_brA_BFC39338 == psx_brB_BFC39338); - psx_delay_BFC39338 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3933C: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005133Cu); -#endif - if (psx_delay_BFC39338) { - psx_delay_BFC39338 = 0; - if (psx_taken_BFC39338) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005134Cu); - goto label_BFC3934C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051340u); - } -label_BFC39340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39340: 10000002 beq $zero, $zero, 0xBFC3934C */ - uint32_t psx_brA_BFC39340 = cpu->gpr[0]; uint32_t psx_brB_BFC39340 = cpu->gpr[0]; - psx_taken_BFC39340 = (psx_brA_BFC39340 == psx_brB_BFC39340); - psx_delay_BFC39340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC39344: 24070001 addiu $a3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24070001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051344u); -#endif - if (psx_delay_BFC39340) { - psx_delay_BFC39340 = 0; - if (psx_taken_BFC39340) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005134Cu); - goto label_BFC3934C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051348u); - } -label_BFC39348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC39348: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051348u); -#endif -label_BFC3934C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3934Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005134Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3934C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005134Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051350u); -#endif - /* 0xBFC39350: 8D0892B0 lw $t0, -27984($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27984; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27984)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051350u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892B0u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39354: 3C010100 lui $at, 0x100 */ - cpu->gpr[1] = 0x01000000u; - PGXP_ALU(0x3C010100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051354u); -#endif - /* 0xBFC39358: 8D090000 lw $t1, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051358u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x100u); } - PGXP_LOAD(0x8D090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80051358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3935C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x602u); -#endif - /* 0xBFC39360: 01215024 and $t2, $t1, $at */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[1]; - PGXP_ALU(0x01215024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC39364: 11400004 beq $t2, $zero, 0xBFC39378 */ - uint32_t psx_brA_BFC39364 = cpu->gpr[10]; uint32_t psx_brB_BFC39364 = cpu->gpr[0]; - psx_taken_BFC39364 = (psx_brA_BFC39364 == psx_brB_BFC39364); - psx_delay_BFC39364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39368: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051368u); -#endif - if (psx_delay_BFC39364) { - psx_delay_BFC39364 = 0; - if (psx_taken_BFC39364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051378u); - goto label_BFC39378; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005136Cu); - } -label_BFC3936C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3936Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3936Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005136Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3936C: 10000002 beq $zero, $zero, 0xBFC39378 */ - uint32_t psx_brA_BFC3936C = cpu->gpr[0]; uint32_t psx_brB_BFC3936C = cpu->gpr[0]; - psx_taken_BFC3936C = (psx_brA_BFC3936C == psx_brB_BFC3936C); - psx_delay_BFC3936C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39370: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051370u); -#endif - if (psx_delay_BFC3936C) { - psx_delay_BFC3936C = 0; - if (psx_taken_BFC3936C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051378u); - goto label_BFC39378; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051374u); - } -label_BFC39374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39374: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051374u); -#endif -label_BFC39378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC39378: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3937C: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005137Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051380u); -#endif - /* 0xBFC39380: 8D6B92A8 lw $t3, -27992($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -27992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-27992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051380u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B92A8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80051380u); -#endif - /* 0xBFC39384: 8CA59298 lw $a1, -28008($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -28008; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-28008)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051384u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59298u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC39388: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051388u); -#endif - /* 0xBFC3938C: 8CC6929C lw $a2, -28004($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -28004; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-28004)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005138Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6929Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005138Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC39390: AFA20010 sw $v0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051390u); return; } g_debug_last_store_pc = 0x80051390u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051390u); -#endif - /* 0xBFC39394: 8D6C0000 lw $t4, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051394u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x8D6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39398: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3939C: 248492C8 addiu $a0, $a0, -27960 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27960)); - PGXP_ALU(0x248492C8u, cpu->gpr[4], _pgx1, 0xFFFF92C8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005139Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC393A0: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x800513A8u; /* jal link before delay slot */ - psx_delay_BFC393A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC393A4: AFAC0014 sw $t4, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800513A4u); return; } g_debug_last_store_pc = 0x800513A4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0014u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800513A4u); -#endif - if (psx_delay_BFC393A0) { - psx_delay_BFC393A0 = 0; - cpu->gpr[31] = 0x800513A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC393A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC393A8: 0C0143E3 jal 0xB0050F8C */ - cpu->gpr[31] = 0x800513B0u; /* jal link before delay slot */ - psx_delay_BFC393A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC393AC: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800513ACu); -#endif - if (psx_delay_BFC393A8) { - psx_delay_BFC393A8 = 0; - cpu->gpr[31] = 0x800513B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80050F8Cu); - cpu->pc = 0x80050F8Cu; return; - } -label_BFC393B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC393B0: 10000002 beq $zero, $zero, 0xBFC393BC */ - uint32_t psx_brA_BFC393B0 = cpu->gpr[0]; uint32_t psx_brB_BFC393B0 = cpu->gpr[0]; - psx_taken_BFC393B0 = (psx_brA_BFC393B0 == psx_brB_BFC393B0); - psx_delay_BFC393B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC393B4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800513B4u); -#endif - if (psx_delay_BFC393B0) { - psx_delay_BFC393B0 = 0; - if (psx_taken_BFC393B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513BCu); - goto label_BFC393BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513B8u); - } -label_BFC393B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC393B8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800513B8u); -#endif -label_BFC393BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513BCu); -#endif - /* 0xBFC393BC: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800513BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800513BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC393C0: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800513C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC393C4: 03E00008 jr $ra */ - psx_delay_BFC393C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC393C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800513C8u); -#endif - if (psx_delay_BFC393C4) { - psx_delay_BFC393C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC393CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC393CCu); - int psx_delay_BFC393D0 = 0; - int psx_taken_BFC393D0 = 0; - int psx_delay_BFC393EC = 0; - int psx_taken_BFC393EC = 0; - int psx_delay_BFC393F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC393D8u: goto label_BFC393D8; - case 0xBFC393F4u: goto label_BFC393F4; - default: break; - } - } -label_BFC393CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC393CC: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800513CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC393D0: 10400008 beq $v0, $zero, 0xBFC393F4 */ - uint32_t psx_brA_BFC393D0 = cpu->gpr[2]; uint32_t psx_brB_BFC393D0 = cpu->gpr[0]; - psx_taken_BFC393D0 = (psx_brA_BFC393D0 == psx_brB_BFC393D0); - psx_delay_BFC393D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC393D4: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800513D4u); -#endif - if (psx_delay_BFC393D0) { - psx_delay_BFC393D0 = 0; - if (psx_taken_BFC393D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513F4u); - goto label_BFC393F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513D8u); - } -label_BFC393D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513D8u); -#endif - /* 0xBFC393D8: 90AE0000 lbu $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x90AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800513D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC393DC: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800513DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC393E0: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800513E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC393E4: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800513E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC393E8: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800513E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC393EC: 1440FFFA bne $v0, $zero, 0xBFC393D8 */ - uint32_t psx_brA_BFC393EC = cpu->gpr[2]; uint32_t psx_brB_BFC393EC = cpu->gpr[0]; - psx_taken_BFC393EC = (psx_brA_BFC393EC != psx_brB_BFC393EC); - psx_delay_BFC393EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC393F0: A08EFFFF sb $t6, -1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800513F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08EFFFFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800513F0u); -#endif - if (psx_delay_BFC393EC) { - psx_delay_BFC393EC = 0; - if (psx_taken_BFC393EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513D8u); - goto label_BFC393D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800513F4u); - } -label_BFC393F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC393F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC393F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800513F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC393F4: 03E00008 jr $ra */ - psx_delay_BFC393F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC393F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800513F8u); -#endif - if (psx_delay_BFC393F4) { - psx_delay_BFC393F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39410(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39410u); - int psx_delay_BFC39438 = 0; - int psx_taken_BFC39438 = 0; - int psx_delay_BFC3944C = 0; - int psx_taken_BFC3944C = 0; - int psx_delay_BFC3945C = 0; - int psx_taken_BFC3945C = 0; - int psx_delay_BFC39470 = 0; - int psx_taken_BFC39470 = 0; - int psx_delay_BFC39480 = 0; - int psx_taken_BFC39480 = 0; - int psx_delay_BFC3948C = 0; - int psx_taken_BFC3948C = 0; - int psx_delay_BFC39494 = 0; - int psx_taken_BFC39494 = 0; - int psx_delay_BFC3949C = 0; - int psx_taken_BFC3949C = 0; - int psx_delay_BFC394A4 = 0; - int psx_taken_BFC394A4 = 0; - int psx_delay_BFC394B8 = 0; - int psx_delay_BFC394D4 = 0; - int psx_delay_BFC394E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39440u: goto label_BFC39440; - case 0xBFC39454u: goto label_BFC39454; - case 0xBFC39458u: goto label_BFC39458; - case 0xBFC39464u: goto label_BFC39464; - case 0xBFC39478u: goto label_BFC39478; - case 0xBFC3947Cu: goto label_BFC3947C; - case 0xBFC39488u: goto label_BFC39488; - case 0xBFC3948Cu: goto label_BFC3948C; - case 0xBFC39494u: goto label_BFC39494; - case 0xBFC3949Cu: goto label_BFC3949C; - case 0xBFC394A4u: goto label_BFC394A4; - case 0xBFC394ACu: goto label_BFC394AC; - case 0xBFC394C0u: goto label_BFC394C0; - case 0xBFC394DCu: goto label_BFC394DC; - default: break; - } - } -label_BFC39410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39410: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39414: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051414u); return; } g_debug_last_store_pc = 0x80051414u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051414u); -#endif - /* 0xBFC39418: 8FAE0048 lw $t6, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051418u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0048u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051418u); -#endif - /* 0xBFC3941C: 8FAF0050 lw $t7, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005141Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0050u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC39420: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051420u); return; } g_debug_last_store_pc = 0x80051420u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x181u); -#endif - /* 0xBFC39424: 00E04021 addu $t0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC39428: A7A80030 sh $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051428u); return; } g_debug_last_store_pc = 0x80051428u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3942C: A7AE0032 sh $t6, 50($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 50; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005142Cu); return; } g_debug_last_store_pc = 0x8005142Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0032u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC39430: 00804821 addu $t1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC39434: 00A01821 addu $v1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39438: 10000016 beq $zero, $zero, 0xBFC39494 */ - uint32_t psx_brA_BFC39438 = cpu->gpr[0]; uint32_t psx_brB_BFC39438 = cpu->gpr[0]; - psx_taken_BFC39438 = (psx_brA_BFC39438 == psx_brB_BFC39438); - psx_delay_BFC39438 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3943C: A7AF0036 sh $t7, 54($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 54; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005143Cu); return; } g_debug_last_store_pc = 0x8005143Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0036u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005143Cu); -#endif - if (psx_delay_BFC39438) { - psx_delay_BFC39438 = 0; - if (psx_taken_BFC39438) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051494u); - goto label_BFC39494; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051440u); - } -label_BFC39440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051440u); -#endif - /* 0xBFC39440: 8FB8004C lw $t8, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051440u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8004Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39444: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39448: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3944C: 07010002 bgez $t8, 0xBFC39458 */ - uint32_t psx_brA_BFC3944C = cpu->gpr[24]; - psx_taken_BFC3944C = ((int32_t)psx_brA_BFC3944C >= 0); - psx_delay_BFC3944C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000003u); -#endif - /* 0xBFC39450: 03000821 addu $at, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[24] + cpu->gpr[0]; - PGXP_ALU(0x03000821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051450u); -#endif - if (psx_delay_BFC3944C) { - psx_delay_BFC3944C = 0; - if (psx_taken_BFC3944C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051458u); - goto label_BFC39458; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051454u); - } -label_BFC39454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39454: 24210003 addiu $at, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (3)); - PGXP_ALU(0x24210003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051454u); -#endif -label_BFC39458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC39458: 0001C883 sra $t9, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[1] >> 2u); - PGXP_ALU(0x0001C883u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80051458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3945C: 10000013 beq $zero, $zero, 0xBFC394AC */ - uint32_t psx_brA_BFC3945C = cpu->gpr[0]; uint32_t psx_brB_BFC3945C = cpu->gpr[0]; - psx_taken_BFC3945C = (psx_brA_BFC3945C == psx_brB_BFC3945C); - psx_delay_BFC3945C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC39460: A7B90034 sh $t9, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051460u); return; } g_debug_last_store_pc = 0x80051460u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051460u); -#endif - if (psx_delay_BFC3945C) { - psx_delay_BFC3945C = 0; - if (psx_taken_BFC3945C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800514ACu); - goto label_BFC394AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051464u); - } -label_BFC39464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051464u); -#endif - /* 0xBFC39464: 8FAA004C lw $t2, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051464u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA004Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80051464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39468: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3946C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005146Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC39470: 05410002 bgez $t2, 0xBFC3947C */ - uint32_t psx_brA_BFC39470 = cpu->gpr[10]; - psx_taken_BFC39470 = ((int32_t)psx_brA_BFC39470 >= 0); - psx_delay_BFC39470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x403u); -#endif - /* 0xBFC39474: 01400821 addu $at, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01400821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051474u); -#endif - if (psx_delay_BFC39470) { - psx_delay_BFC39470 = 0; - if (psx_taken_BFC39470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005147Cu); - goto label_BFC3947C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051478u); - } -label_BFC39478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39478: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051478u); -#endif -label_BFC3947C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3947Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3947C: 00015843 sra $t3, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015843u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005147Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39480: 1000000A beq $zero, $zero, 0xBFC394AC */ - uint32_t psx_brA_BFC39480 = cpu->gpr[0]; uint32_t psx_brB_BFC39480 = cpu->gpr[0]; - psx_taken_BFC39480 = (psx_brA_BFC39480 == psx_brB_BFC39480); - psx_delay_BFC39480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC39484: A7AB0034 sh $t3, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051484u); return; } g_debug_last_store_pc = 0x80051484u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA7AB0034u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80051484u); -#endif - if (psx_delay_BFC39480) { - psx_delay_BFC39480 = 0; - if (psx_taken_BFC39480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800514ACu); - goto label_BFC394AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051488u); - } -label_BFC39488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051488u); -#endif - /* 0xBFC39488: 8FAC004C lw $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051488u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051488u); -#endif -label_BFC3948C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3948Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3948C: 10000007 beq $zero, $zero, 0xBFC394AC */ - uint32_t psx_brA_BFC3948C = cpu->gpr[0]; uint32_t psx_brB_BFC3948C = cpu->gpr[0]; - psx_taken_BFC3948C = (psx_brA_BFC3948C == psx_brB_BFC3948C); - psx_delay_BFC3948C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC39490: A7AC0034 sh $t4, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051490u); return; } g_debug_last_store_pc = 0x80051490u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC0034u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051490u); -#endif - if (psx_delay_BFC3948C) { - psx_delay_BFC3948C = 0; - if (psx_taken_BFC3948C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800514ACu); - goto label_BFC394AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051494u); - } -label_BFC39494: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39494u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39494: 1060FFEA beq $v1, $zero, 0xBFC39440 */ - uint32_t psx_brA_BFC39494 = cpu->gpr[3]; uint32_t psx_brB_BFC39494 = cpu->gpr[0]; - psx_taken_BFC39494 = (psx_brA_BFC39494 == psx_brB_BFC39494); - psx_delay_BFC39494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39498: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051498u); -#endif - if (psx_delay_BFC39494) { - psx_delay_BFC39494 = 0; - if (psx_taken_BFC39494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051440u); - goto label_BFC39440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005149Cu); - } -label_BFC3949C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3949Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3949Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005149Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3949C: 1061FFF1 beq $v1, $at, 0xBFC39464 */ - uint32_t psx_brA_BFC3949C = cpu->gpr[3]; uint32_t psx_brB_BFC3949C = cpu->gpr[1]; - psx_taken_BFC3949C = (psx_brA_BFC3949C == psx_brB_BFC3949C); - psx_delay_BFC3949C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC394A0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800514A0u); -#endif - if (psx_delay_BFC3949C) { - psx_delay_BFC3949C = 0; - if (psx_taken_BFC3949C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051464u); - goto label_BFC39464; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800514A4u); - } -label_BFC394A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC394A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC394A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC394A4: 1061FFF9 beq $v1, $at, 0xBFC3948C */ - uint32_t psx_brA_BFC394A4 = cpu->gpr[3]; uint32_t psx_brB_BFC394A4 = cpu->gpr[1]; - psx_taken_BFC394A4 = (psx_brA_BFC394A4 == psx_brB_BFC394A4); - psx_delay_BFC394A4 = 1; - /* 0xBFC394A8: 8FAC004C lw $t4, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514A8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC004Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800514A8u); -#endif - if (psx_delay_BFC394A4) { - psx_delay_BFC394A4 = 0; - if (psx_taken_BFC394A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005148Cu); - goto label_BFC3948C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800514ACu); - } -label_BFC394AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC394ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC394ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC394AC: AFA3003C sw $v1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514ACu); return; } g_debug_last_store_pc = 0x800514ACu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3003Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800514ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC394B0: 27A40030 addiu $a0, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27A40030u, cpu->gpr[4], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800514B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC394B4: 01202821 addu $a1, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800514B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC394B8: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x800514C0u; /* jal link before delay slot */ - psx_delay_BFC394B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC394BC: AFA80044 sw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514BCu); return; } g_debug_last_store_pc = 0x800514BCu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800514BCu); -#endif - if (psx_delay_BFC394B8) { - psx_delay_BFC394B8 = 0; - cpu->gpr[31] = 0x800514C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC394C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC394C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC394C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514C0u); -#endif - /* 0xBFC394C0: 8FA3003C lw $v1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3003Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800514C0u); -#endif - /* 0xBFC394C4: 8FA80044 lw $t0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514C4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80044u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800514C4u); -#endif - /* 0xBFC394C8: 8FA50040 lw $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514C8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800514C8u); -#endif - /* 0xBFC394CC: 8FA70048 lw $a3, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514CCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70048u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800514CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC394D0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800514D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC394D4: 0C01458C jal 0xB0051630 */ - cpu->gpr[31] = 0x800514DCu; /* jal link before delay slot */ - psx_delay_BFC394D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x141u); -#endif - /* 0xBFC394D8: 01003021 addu $a2, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800514D8u); -#endif - if (psx_delay_BFC394D4) { - psx_delay_BFC394D4 = 0; - cpu->gpr[31] = 0x800514DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051630u); - cpu->pc = 0x80051630u; return; - } -label_BFC394DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC394DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC394DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514DCu); -#endif - /* 0xBFC394DC: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800514DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC394E0: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x800514E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC394E4: 03E00008 jr $ra */ - psx_delay_BFC394E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC394E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800514E8u); -#endif - if (psx_delay_BFC394E4) { - psx_delay_BFC394E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC394EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC394ECu); - int psx_delay_BFC39524 = 0; - int psx_delay_BFC39534 = 0; - int psx_delay_BFC39544 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3952Cu: goto label_BFC3952C; - case 0xBFC3953Cu: goto label_BFC3953C; - default: break; - } - } -label_BFC394EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC394ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC394ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC394EC: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x800514ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800514F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC394F0: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514F0u); return; } g_debug_last_store_pc = 0x800514F0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800514F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC394F4: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514F4u); return; } g_debug_last_store_pc = 0x800514F4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800514F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC394F8: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514F8u); return; } g_debug_last_store_pc = 0x800514F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800514F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC394FC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800514FCu); return; } g_debug_last_store_pc = 0x800514FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800514FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051500u); -#endif - /* 0xBFC39500: 8FAF0030 lw $t7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051500u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0030u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051500u); -#endif - /* 0xBFC39504: 8FAE002C lw $t6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051504u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE002Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC39508: A7AF0022 sh $t7, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051508u); return; } g_debug_last_store_pc = 0x80051508u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF0022u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051508u); -#endif - /* 0xBFC3950C: 8FA50028 lw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005150Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005150Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC39510: 24180100 addiu $t8, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24180100u, cpu->gpr[24], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80051510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39514: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC39518: A7B90026 sh $t9, 38($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051518u); return; } g_debug_last_store_pc = 0x80051518u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA7B90026u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3951C: A7B80024 sh $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005151Cu); return; } g_debug_last_store_pc = 0x8005151Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005151Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC39520: 27A40020 addiu $a0, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27A40020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80051520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39524: 0C013C3D jal 0xB004F0F4 */ - cpu->gpr[31] = 0x8005152Cu; /* jal link before delay slot */ - psx_delay_BFC39524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC39528: A7AE0020 sh $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051528u); return; } g_debug_last_store_pc = 0x80051528u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051528u); -#endif - if (psx_delay_BFC39524) { - psx_delay_BFC39524 = 0; - cpu->gpr[31] = 0x8005152Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F0F4u); - cpu->pc = 0x8004F0F4u; return; - } -label_BFC3952C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3952Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3952Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005152Cu); -#endif - /* 0xBFC3952C: 8FA4002C lw $a0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005152Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA4002Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005152Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051530u); -#endif - /* 0xBFC39530: 8FA50030 lw $a1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051530u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50030u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39534: 0C0145B4 jal 0xB00516D0 */ - cpu->gpr[31] = 0x8005153Cu; /* jal link before delay slot */ - psx_delay_BFC39534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051538u); -#endif - if (psx_delay_BFC39534) { - psx_delay_BFC39534 = 0; - cpu->gpr[31] = 0x8005153Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800516D0u); - cpu->pc = 0x800516D0u; return; - } -label_BFC3953C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3953Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3953Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005153Cu); -#endif - /* 0xBFC3953C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005153Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005153Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39540: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80051540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39544: 03E00008 jr $ra */ - psx_delay_BFC39544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39548: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051548u); -#endif - if (psx_delay_BFC39544) { - psx_delay_BFC39544 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3954C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3954Cu); - int psx_delay_BFC39598 = 0; - int psx_taken_BFC39598 = 0; - int psx_delay_BFC395A0 = 0; - int psx_taken_BFC395A0 = 0; - int psx_delay_BFC395C4 = 0; - int psx_delay_BFC395E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC395A0u: goto label_BFC395A0; - case 0xBFC395A8u: goto label_BFC395A8; - case 0xBFC395ACu: goto label_BFC395AC; - case 0xBFC395CCu: goto label_BFC395CC; - default: break; - } - } -label_BFC3954C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3954Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3954Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3954C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005154Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39550: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051550u); return; } g_debug_last_store_pc = 0x80051550u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051550u); -#endif - /* 0xBFC39554: 8FA80028 lw $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051554u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC39558: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC3955C: A4670004 sh $a3, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005155Cu); return; } g_debug_last_store_pc = 0x8005155Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4670004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005155Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39560: A460000C sh $zero, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051560u); return; } g_debug_last_store_pc = 0x80051560u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39564: A460000E sh $zero, 14($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051564u); return; } g_debug_last_store_pc = 0x80051564u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39568: A4600010 sh $zero, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051568u); return; } g_debug_last_store_pc = 0x80051568u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3956C: A4600012 sh $zero, 18($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005156Cu); return; } g_debug_last_store_pc = 0x8005156Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600012u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005156Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39570: A0600019 sb $zero, 25($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 25; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051570u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (25)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600019u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39574: A060001A sb $zero, 26($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 26; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051574u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (26)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA060001Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC39578: A060001B sb $zero, 27($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 27; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051578u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (27)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA060001Bu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3957C: A4680006 sh $t0, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005157Cu); return; } g_debug_last_store_pc = 0x8005157Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4680006u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005157Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC39580: 00A04821 addu $t1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x441u); -#endif - /* 0xBFC39584: 00C05021 addu $t2, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C05021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39588: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3958C: 240101E0 addiu $at, $zero, 480 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (480)); - PGXP_ALU(0x240101E0u, cpu->gpr[1], _pgx1, 0x000001E0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005158Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC39590: A46A0002 sh $t2, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051590u); return; } g_debug_last_store_pc = 0x80051590u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80051590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC39594: A4690000 sh $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051594u); return; } g_debug_last_store_pc = 0x80051594u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80051594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC39598: 15010003 bne $t0, $at, 0xBFC395A8 */ - uint32_t psx_brA_BFC39598 = cpu->gpr[8]; uint32_t psx_brB_BFC39598 = cpu->gpr[1]; - psx_taken_BFC39598 = (psx_brA_BFC39598 != psx_brB_BFC39598); - psx_delay_BFC39598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3959C: A0620016 sb $v0, 22($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 22; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005159Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (22)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0620016u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005159Cu); -#endif - if (psx_delay_BFC39598) { - psx_delay_BFC39598 = 0; - if (psx_taken_BFC39598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515A8u); - goto label_BFC395A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515A0u); - } -label_BFC395A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC395A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC395A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC395A0: 10000002 beq $zero, $zero, 0xBFC395AC */ - uint32_t psx_brA_BFC395A0 = cpu->gpr[0]; uint32_t psx_brB_BFC395A0 = cpu->gpr[0]; - psx_taken_BFC395A0 = (psx_brA_BFC395A0 == psx_brB_BFC395A0); - psx_delay_BFC395A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC395A4: A0600017 sb $zero, 23($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800515A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (23)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600017u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800515A4u); -#endif - if (psx_delay_BFC395A0) { - psx_delay_BFC395A0 = 0; - if (psx_taken_BFC395A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515ACu); - goto label_BFC395AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800515A8u); - } -label_BFC395A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC395A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC395A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC395A8: A0620017 sb $v0, 23($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800515A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (23)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0620017u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800515A8u); -#endif -label_BFC395AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC395ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC395ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC395AC: A4690008 sh $t1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515ACu); return; } g_debug_last_store_pc = 0x800515ACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4690008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800515ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC395B0: A46A000A sh $t2, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515B0u); return; } g_debug_last_store_pc = 0x800515B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA46A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800515B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC395B4: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800515B4u); return; } g_debug_last_store_pc = 0x800515B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800515B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC395B8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800515B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC395BC: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800515BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC395C0: 24060280 addiu $a2, $zero, 640 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); - PGXP_ALU(0x24060280u, cpu->gpr[6], _pgx1, 0x00000280u); } -#ifdef PSX_COSIM - cosim_instr(0x800515C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC395C4: 0C01458C jal 0xB0051630 */ - cpu->gpr[31] = 0x800515CCu; /* jal link before delay slot */ - psx_delay_BFC395C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC395C8: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800515C8u); -#endif - if (psx_delay_BFC395C4) { - psx_delay_BFC395C4 = 0; - cpu->gpr[31] = 0x800515CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051630u); - cpu->pc = 0x80051630u; return; - } -label_BFC395CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC395CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC395CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515CCu); -#endif - /* 0xBFC395CC: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800515CCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800515CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC395D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800515D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC395D4: A4620014 sh $v0, 20($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515D4u); return; } g_debug_last_store_pc = 0x800515D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4620014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800515D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC395D8: A0600018 sb $zero, 24($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 24; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800515D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (24)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600018u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800515D8u); -#endif - /* 0xBFC395DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800515DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800515DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC395E0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800515E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC395E4: 03E00008 jr $ra */ - psx_delay_BFC395E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC395E8: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800515E8u); -#endif - if (psx_delay_BFC395E4) { - psx_delay_BFC395E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC395EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC395ECu); - int psx_delay_BFC39620 = 0; -label_BFC395EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC395ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC395ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC395EC: A4850000 sh $a1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515ECu); return; } g_debug_last_store_pc = 0x800515ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4850000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800515ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800515F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC395F0: A4860002 sh $a2, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515F0u); return; } g_debug_last_store_pc = 0x800515F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800515F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC395F4: A4870004 sh $a3, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515F4u); return; } g_debug_last_store_pc = 0x800515F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800515F4u); -#endif - /* 0xBFC395F8: 8FAE0010 lw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800515F8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800515F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC395FC: A480000E sh $zero, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800515FCu); return; } g_debug_last_store_pc = 0x800515FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA480000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800515FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39600: A480000C sh $zero, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051600u); return; } g_debug_last_store_pc = 0x80051600u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA480000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39604: A480000A sh $zero, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051604u); return; } g_debug_last_store_pc = 0x80051604u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA480000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39608: A4800008 sh $zero, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051608u); return; } g_debug_last_store_pc = 0x80051608u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4800008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3960C: A0800011 sb $zero, 17($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 17; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005160Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (17)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800011u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005160Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39610: A0800010 sb $zero, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051610u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (16)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39614: A0800012 sb $zero, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051614u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (18)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800012u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC39618: A0800013 sb $zero, 19($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 19; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051618u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (19)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0800013u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80051618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3961C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005161Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39620: 03E00008 jr $ra */ - psx_delay_BFC39620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39624: A48E0006 sh $t6, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051624u); return; } g_debug_last_store_pc = 0x80051624u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051624u); -#endif - if (psx_delay_BFC39620) { - psx_delay_BFC39620 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39630(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39630u); - int psx_delay_BFC39644 = 0; - int psx_delay_BFC3965C = 0; - int psx_taken_BFC3965C = 0; - int psx_delay_BFC3968C = 0; - int psx_taken_BFC3968C = 0; - int psx_delay_BFC396C8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3964Cu: goto label_BFC3964C; - case 0xBFC39664u: goto label_BFC39664; - case 0xBFC39694u: goto label_BFC39694; - case 0xBFC39698u: goto label_BFC39698; - case 0xBFC396C0u: goto label_BFC396C0; - default: break; - } - } -label_BFC39630: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39630u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39630: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39634: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051634u); return; } g_debug_last_store_pc = 0x80051634u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC39638: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051638u); return; } g_debug_last_store_pc = 0x80051638u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80051638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3963C: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005163Cu); return; } g_debug_last_store_pc = 0x8005163Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005163Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC39640: AFA60020 sw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051640u); return; } g_debug_last_store_pc = 0x80051640u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39644: 0C013BFC jal 0xB004EFF0 */ - cpu->gpr[31] = 0x8005164Cu; /* jal link before delay slot */ - psx_delay_BFC39644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC39648: AFA70024 sw $a3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051648u); return; } g_debug_last_store_pc = 0x80051648u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70024u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051648u); -#endif - if (psx_delay_BFC39644) { - psx_delay_BFC39644 = 0; - cpu->gpr[31] = 0x8005164Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EFF0u); - cpu->pc = 0x8004EFF0u; return; - } -label_BFC3964C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3964Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005164Cu); -#endif - /* 0xBFC3964C: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005164Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005164Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051650u); -#endif - /* 0xBFC39650: 8FA5001C lw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051650u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051650u); -#endif - /* 0xBFC39654: 8FA60024 lw $a2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051654u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60024u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051654u); -#endif - /* 0xBFC39658: 8FA70020 lw $a3, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051658u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70020u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3965C: 1040000E beq $v0, $zero, 0xBFC39698 */ - uint32_t psx_brA_BFC3965C = cpu->gpr[2]; uint32_t psx_brB_BFC3965C = cpu->gpr[0]; - psx_taken_BFC3965C = (psx_brA_BFC3965C == psx_brB_BFC3965C); - psx_delay_BFC3965C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39660: 308E0003 andi $t6, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u; - PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051660u); -#endif - if (psx_delay_BFC3965C) { - psx_delay_BFC3965C = 0; - if (psx_taken_BFC3965C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051698u); - goto label_BFC39698; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051664u); - } -label_BFC39664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39664: 308E0003 andi $t6, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u; - PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC39668: 30B80003 andi $t8, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30B80003u, cpu->gpr[24], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3966C: 0018C9C0 sll $t9, $t8, 7 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 7u; - PGXP_ALU(0x0018C9C0u, cpu->gpr[25], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8005166Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC39670: 000E7A40 sll $t7, $t6, 9 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 9u; - PGXP_ALU(0x000E7A40u, cpu->gpr[15], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80051670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC39674: 30C90300 andi $t1, $a2, 0x300 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] & 0x300u; - PGXP_ALU(0x30C90300u, cpu->gpr[9], _pgx1, 0x0300u); } -#ifdef PSX_COSIM - cosim_instr(0x80051674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC39678: 000950C3 sra $t2, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[9] >> 3u); - PGXP_ALU(0x000950C3u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80051678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC3967C: 01F94025 or $t0, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[15] | cpu->gpr[25]; - PGXP_ALU(0x01F94025u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005167Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1080u); -#endif - /* 0xBFC39680: 30EC03FF andi $t4, $a3, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[7] & 0x3FFu; - PGXP_ALU(0x30EC03FFu, cpu->gpr[12], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC39684: 000C6983 sra $t5, $t4, 6 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] >> 6u); - PGXP_ALU(0x000C6983u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80051684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD00u); -#endif - /* 0xBFC39688: 010A5825 or $t3, $t0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[8] | cpu->gpr[10]; - PGXP_ALU(0x010A5825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3968C: 1000000C beq $zero, $zero, 0xBFC396C0 */ - uint32_t psx_brA_BFC3968C = cpu->gpr[0]; uint32_t psx_brB_BFC3968C = cpu->gpr[0]; - psx_taken_BFC3968C = (psx_brA_BFC3968C == psx_brB_BFC3968C); - psx_delay_BFC3968C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2808u); -#endif - /* 0xBFC39690: 016D1825 or $v1, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[3] = cpu->gpr[11] | cpu->gpr[13]; - PGXP_ALU(0x016D1825u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051690u); -#endif - if (psx_delay_BFC3968C) { - psx_delay_BFC3968C = 0; - if (psx_taken_BFC3968C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800516C0u); - goto label_BFC396C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051694u); - } -label_BFC39694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39694: 308E0003 andi $t6, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x3u; - PGXP_ALU(0x308E0003u, cpu->gpr[14], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051694u); -#endif -label_BFC39698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC39698: 30AF0003 andi $t7, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[15] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30AF0003u, cpu->gpr[15], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC3969C: 000FC940 sll $t9, $t7, 5 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 5u; - PGXP_ALU(0x000FC940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8005169Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC396A0: 000EC1C0 sll $t8, $t6, 7 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] << 7u; - PGXP_ALU(0x000EC1C0u, cpu->gpr[24], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x800516A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC396A4: 30C80100 andi $t0, $a2, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] & 0x100u; - PGXP_ALU(0x30C80100u, cpu->gpr[8], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x800516A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC396A8: 00085103 sra $t2, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[8] >> 4u); - PGXP_ALU(0x00085103u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800516A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000200u); -#endif - /* 0xBFC396AC: 03194825 or $t1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03194825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800516ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC396B0: 30EB03FF andi $t3, $a3, 0x3FF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] & 0x3FFu; - PGXP_ALU(0x30EB03FFu, cpu->gpr[11], _pgx1, 0x03FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800516B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800u); -#endif - /* 0xBFC396B4: 000B6983 sra $t5, $t3, 6 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[11] >> 6u); - PGXP_ALU(0x000B6983u, cpu->gpr[13], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800516B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1600u); -#endif - /* 0xBFC396B8: 012A6025 or $t4, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[9] | cpu->gpr[10]; - PGXP_ALU(0x012A6025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800516B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008u); -#endif - /* 0xBFC396BC: 018D1825 or $v1, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[3] = cpu->gpr[12] | cpu->gpr[13]; - PGXP_ALU(0x018D1825u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800516BCu); -#endif -label_BFC396C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC396C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC396C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516C0u); -#endif - /* 0xBFC396C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800516C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800516C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC396C4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800516C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC396C8: 03E00008 jr $ra */ - psx_delay_BFC396C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC396CC: 3062FFFF andi $v0, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x3062FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800516CCu); -#endif - if (psx_delay_BFC396C8) { - psx_delay_BFC396C8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC396D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC396D0u); - int psx_delay_BFC396E0 = 0; -label_BFC396D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC396D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC396D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC396D0: 00047903 sra $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[4] >> 4u); - PGXP_ALU(0x00047903u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800516D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC396D4: 31F8003F andi $t8, $t7, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x3Fu; - PGXP_ALU(0x31F8003Fu, cpu->gpr[24], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800516D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC396D8: 00057180 sll $t6, $a1, 6 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] << 6u; - PGXP_ALU(0x00057180u, cpu->gpr[14], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800516D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004004u); -#endif - /* 0xBFC396DC: 01D81025 or $v0, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D81025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800516DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC396E0: 03E00008 jr $ra */ - psx_delay_BFC396E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC396E4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800516E4u); -#endif - if (psx_delay_BFC396E0) { - psx_delay_BFC396E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC396E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC396E8u); - int psx_delay_BFC396F4 = 0; - int psx_delay_BFC39700 = 0; - int psx_taken_BFC39700 = 0; - int psx_delay_BFC39738 = 0; - int psx_delay_BFC39740 = 0; - int psx_taken_BFC39740 = 0; - int psx_delay_BFC39778 = 0; - int psx_delay_BFC39788 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC396FCu: goto label_BFC396FC; - case 0xBFC39708u: goto label_BFC39708; - case 0xBFC39740u: goto label_BFC39740; - case 0xBFC39748u: goto label_BFC39748; - case 0xBFC39780u: goto label_BFC39780; - case 0xBFC39784u: goto label_BFC39784; - default: break; - } - } -label_BFC396E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC396E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC396E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC396E8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800516E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC396EC: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800516ECu); return; } g_debug_last_store_pc = 0x800516ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800516ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC396F0: 3083FFFF andi $v1, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3083FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800516F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC396F4: 0C013BFC jal 0xB004EFF0 */ - cpu->gpr[31] = 0x800516FCu; /* jal link before delay slot */ - psx_delay_BFC396F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC396F8: A7A30020 sh $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800516F8u); return; } g_debug_last_store_pc = 0x800516F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800516F8u); -#endif - if (psx_delay_BFC396F4) { - psx_delay_BFC396F4 = 0; - cpu->gpr[31] = 0x800516FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EFF0u); - cpu->pc = 0x8004EFF0u; return; - } -label_BFC396FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC396FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC396FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800516FCu); -#endif - /* 0xBFC396FC: 97A30020 lhu $v1, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800516FCu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x97A30020u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800516FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39700: 10400011 beq $v0, $zero, 0xBFC39748 */ - uint32_t psx_brA_BFC39700 = cpu->gpr[2]; uint32_t psx_brB_BFC39700 = cpu->gpr[0]; - psx_taken_BFC39700 = (psx_brA_BFC39700 == psx_brB_BFC39700); - psx_delay_BFC39700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051704u); -#endif - if (psx_delay_BFC39700) { - psx_delay_BFC39700 = 0; - if (psx_taken_BFC39700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051748u); - goto label_BFC39748; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051708u); - } -label_BFC39708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC39708: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051708u); -#endif - /* 0xBFC3970C: 8F1892F8 lw $t8, -27912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005170Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892F8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005170Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC39710: 000370C0 sll $t6, $v1, 3 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] << 3u; - PGXP_ALU(0x000370C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80051710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC39714: 31CF0300 andi $t7, $t6, 0x300 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x300u; - PGXP_ALU(0x31CF0300u, cpu->gpr[15], _pgx1, 0x0300u); } -#ifdef PSX_COSIM - cosim_instr(0x80051714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39718: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3971C: 00032A42 srl $a1, $v1, 9 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] >> 9u; - PGXP_ALU(0x00032A42u, cpu->gpr[5], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8005171Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC39720: 000331C2 srl $a2, $v1, 7 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[3] >> 7u; - PGXP_ALU(0x000331C2u, cpu->gpr[6], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80051720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC39724: 00033980 sll $a3, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[3] << 6u; - PGXP_ALU(0x00033980u, cpu->gpr[7], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80051724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC39728: 30E707C0 andi $a3, $a3, 0x7C0 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u; - PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3972C: 30C60003 andi $a2, $a2, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u; - PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005172Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC39730: 30A50003 andi $a1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39734: 2484935C addiu $a0, $a0, -27812 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27812)); - PGXP_ALU(0x2484935Cu, cpu->gpr[4], _pgx1, 0xFFFF935Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80051734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC39738: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x80051740u; /* jalr link before delay slot */ - psx_delay_BFC39738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3973C: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005173Cu); return; } g_debug_last_store_pc = 0x8005173Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005173Cu); -#endif - if (psx_delay_BFC39738) { - psx_delay_BFC39738 = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x80051740u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39740: 10000010 beq $zero, $zero, 0xBFC39784 */ - uint32_t psx_brA_BFC39740 = cpu->gpr[0]; uint32_t psx_brB_BFC39740 = cpu->gpr[0]; - psx_taken_BFC39740 = (psx_brA_BFC39740 == psx_brB_BFC39740); - psx_delay_BFC39740 = 1; - /* 0xBFC39744: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051744u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051744u); -#endif - if (psx_delay_BFC39740) { - psx_delay_BFC39740 = 0; - if (psx_taken_BFC39740) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051784u); - goto label_BFC39784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051748u); - } -label_BFC39748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC39748: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051748u); -#endif - /* 0xBFC3974C: 8D2992F8 lw $t1, -27912($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005174Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2992F8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005174Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC39750: 0003C900 sll $t9, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[3] << 4u; - PGXP_ALU(0x0003C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80051750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC39754: 33280100 andi $t0, $t9, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x100u; - PGXP_ALU(0x33280100u, cpu->gpr[8], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80051754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39758: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3975C: 000329C2 srl $a1, $v1, 7 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] >> 7u; - PGXP_ALU(0x000329C2u, cpu->gpr[5], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x8005175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC39760: 00033142 srl $a2, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[3] >> 5u; - PGXP_ALU(0x00033142u, cpu->gpr[6], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80051760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC39764: 00033980 sll $a3, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[3] << 6u; - PGXP_ALU(0x00033980u, cpu->gpr[7], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80051764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC39768: 30E707C0 andi $a3, $a3, 0x7C0 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u; - PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3976C: 30C60003 andi $a2, $a2, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u; - PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005176Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC39770: 30A50003 andi $a1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39774: 24849374 addiu $a0, $a0, -27788 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27788)); - PGXP_ALU(0x24849374u, cpu->gpr[4], _pgx1, 0xFFFF9374u); } -#ifdef PSX_COSIM - cosim_instr(0x80051774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC39778: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x80051780u; /* jalr link before delay slot */ - psx_delay_BFC39778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3977C: AFA80010 sw $t0, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005177Cu); return; } g_debug_last_store_pc = 0x8005177Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80010u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005177Cu); -#endif - if (psx_delay_BFC39778) { - psx_delay_BFC39778 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x80051780u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051780u); -#endif - /* 0xBFC39780: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051780u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051780u); -#endif -label_BFC39784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39784: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80051784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39788: 03E00008 jr $ra */ - psx_delay_BFC39788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3978C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005178Cu); -#endif - if (psx_delay_BFC39788) { - psx_delay_BFC39788 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39804(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39804u); - int psx_delay_BFC39840 = 0; -label_BFC39804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051804u); -#endif - /* 0xBFC39804: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051804u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051804u); -#endif - /* 0xBFC39808: 8CA30000 lw $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051808u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } - PGXP_LOAD(0x8CA30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80051808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3980C: 000E7A00 sll $t7, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000E7A00u, cpu->gpr[15], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005180Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC39810: 000FC202 srl $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] >> 8u; - PGXP_ALU(0x000FC202u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC39814: 0303C826 xor $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] ^ cpu->gpr[3]; - PGXP_ALU(0x0303C826u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC39818: 00194200 sll $t0, $t9, 8 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] << 8u; - PGXP_ALU(0x00194200u, cpu->gpr[8], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3981C: 00084A02 srl $t1, $t0, 8 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] >> 8u; - PGXP_ALU(0x00084A02u, cpu->gpr[9], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005181Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC39820: 01235026 xor $t2, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[9] ^ cpu->gpr[3]; - PGXP_ALU(0x01235026u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC39824: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051824u); return; } g_debug_last_store_pc = 0x80051824u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80051824u); -#endif - /* 0xBFC39828: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051828u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3982C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005182Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x824u); -#endif - /* 0xBFC39830: 00A25826 xor $t3, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[5] ^ cpu->gpr[2]; - PGXP_ALU(0x00A25826u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC39834: 000B6200 sll $t4, $t3, 8 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 8u; - PGXP_ALU(0x000B6200u, cpu->gpr[12], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC39838: 000C6A02 srl $t5, $t4, 8 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] >> 8u; - PGXP_ALU(0x000C6A02u, cpu->gpr[13], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC3983C: 01A27026 xor $t6, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] ^ cpu->gpr[2]; - PGXP_ALU(0x01A27026u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005183Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39840: 03E00008 jr $ra */ - psx_delay_BFC39840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39844: AC8E0000 sw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051844u); return; } g_debug_last_store_pc = 0x80051844u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051844u); -#endif - if (psx_delay_BFC39840) { - psx_delay_BFC39840 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC398D4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC398D4u); - int psx_delay_BFC398D4 = 0; - int psx_taken_BFC398D4 = 0; - int psx_delay_BFC398EC = 0; - int psx_delay_BFC39908 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC398DCu: goto label_BFC398DC; - case 0xBFC398F4u: goto label_BFC398F4; - default: break; - } - } -label_BFC398D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC398D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC398D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800518D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC398D4: 10A00007 beq $a1, $zero, 0xBFC398F4 */ - uint32_t psx_brA_BFC398D4 = cpu->gpr[5]; uint32_t psx_brB_BFC398D4 = cpu->gpr[0]; - psx_taken_BFC398D4 = (psx_brA_BFC398D4 == psx_brB_BFC398D4); - psx_delay_BFC398D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC398D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800518D8u); -#endif - if (psx_delay_BFC398D4) { - psx_delay_BFC398D4 = 0; - if (psx_taken_BFC398D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800518F4u); - goto label_BFC398F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800518DCu); - } -label_BFC398DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC398DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC398DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800518DCu); -#endif - /* 0xBFC398DC: 90820007 lbu $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (7)), 2, 0x10u); - PGXP_LOAD(0x90820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800518DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800518E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC398E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800518E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC398E4: 34420002 ori $v0, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x2u; - PGXP_ALU(0x34420002u, cpu->gpr[2], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x800518E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC398E8: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800518E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC398EC: 03E00008 jr $ra */ - psx_delay_BFC398EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800518F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC398F0: A0820007 sb $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800518F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800518F0u); -#endif - if (psx_delay_BFC398EC) { - psx_delay_BFC398EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC398F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC398F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC398F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800518F4u); -#endif - /* 0xBFC398F4: 90820007 lbu $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (7)), 2, 0x10u); - PGXP_LOAD(0x90820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800518F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC398F8: 2401FFFD addiu $at, $zero, -3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-3)); - PGXP_ALU(0x2401FFFDu, cpu->gpr[1], _pgx1, 0xFFFFFFFDu); } -#ifdef PSX_COSIM - cosim_instr(0x800518F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC398FC: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800518FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39900: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC39904: A0820007 sb $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051904u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39908: 03E00008 jr $ra */ - psx_delay_BFC39908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3990C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005190Cu); -#endif - if (psx_delay_BFC39908) { - psx_delay_BFC39908 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39910u); - int psx_delay_BFC39910 = 0; - int psx_taken_BFC39910 = 0; - int psx_delay_BFC39928 = 0; - int psx_delay_BFC39944 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39918u: goto label_BFC39918; - case 0xBFC39930u: goto label_BFC39930; - default: break; - } - } -label_BFC39910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC39910: 10A00007 beq $a1, $zero, 0xBFC39930 */ - uint32_t psx_brA_BFC39910 = cpu->gpr[5]; uint32_t psx_brB_BFC39910 = cpu->gpr[0]; - psx_taken_BFC39910 = (psx_brA_BFC39910 == psx_brB_BFC39910); - psx_delay_BFC39910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39914: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051914u); -#endif - if (psx_delay_BFC39910) { - psx_delay_BFC39910 = 0; - if (psx_taken_BFC39910) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051930u); - goto label_BFC39930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051918u); - } -label_BFC39918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051918u); -#endif - /* 0xBFC39918: 90820007 lbu $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (7)), 2, 0x10u); - PGXP_LOAD(0x90820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3991C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005191Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39920: 34420001 ori $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1u; - PGXP_ALU(0x34420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80051920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39924: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39928: 03E00008 jr $ra */ - psx_delay_BFC39928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3992C: A0820007 sb $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005192Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005192Cu); -#endif - if (psx_delay_BFC39928) { - psx_delay_BFC39928 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC39930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051930u); -#endif - /* 0xBFC39930: 90820007 lbu $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (7)), 2, 0x10u); - PGXP_LOAD(0x90820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39934: 2401FFFE addiu $at, $zero, -2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); - PGXP_ALU(0x2401FFFEu, cpu->gpr[1], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80051934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC39938: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3993C: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005193Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC39940: A0820007 sb $v0, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051940u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA0820007u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39944: 03E00008 jr $ra */ - psx_delay_BFC39944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39948: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051948u); -#endif - if (psx_delay_BFC39944) { - psx_delay_BFC39944 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3994C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3994Cu); - int psx_delay_BFC3996C = 0; -label_BFC3994C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3994Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005194Cu); -#endif - /* 0xBFC3994C: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005194Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005194Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39950: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39954: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39958: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3995C: 3C010400 lui $at, 0x400 */ - cpu->gpr[1] = 0x04000000u; - PGXP_ALU(0x3C010400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005195Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39960: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39964: 24190020 addiu $t9, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24190020u, cpu->gpr[25], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80051964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39968: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051968u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3996C: 03E00008 jr $ra */ - psx_delay_BFC3996C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39970: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051970u); return; } g_debug_last_store_pc = 0x80051970u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051970u); -#endif - if (psx_delay_BFC3996C) { - psx_delay_BFC3996C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3999C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3999Cu); - int psx_delay_BFC399BC = 0; -label_BFC3999C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3999Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005199Cu); -#endif - /* 0xBFC3999C: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005199Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005199Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800519A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399A0: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800519A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399A4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800519A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC399A8: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800519A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399AC: 3C010600 lui $at, 0x600 */ - cpu->gpr[1] = 0x06000000u; - PGXP_ALU(0x3C010600u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800519ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800519B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC399B0: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800519B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC399B4: 24190030 addiu $t9, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x24190030u, cpu->gpr[25], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x800519B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC399B8: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800519B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800519B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC399BC: 03E00008 jr $ra */ - psx_delay_BFC399BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800519C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC399C0: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800519C0u); return; } g_debug_last_store_pc = 0x800519C0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800519C0u); -#endif - if (psx_delay_BFC399BC) { - psx_delay_BFC399BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC399EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC399ECu); - int psx_delay_BFC39A0C = 0; -label_BFC399EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC399ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC399ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800519ECu); -#endif - /* 0xBFC399EC: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800519ECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800519ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800519F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399F0: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800519F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399F4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800519F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC399F8: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800519F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC399FC: 3C010500 lui $at, 0x500 */ - cpu->gpr[1] = 0x05000000u; - PGXP_ALU(0x3C010500u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800519FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39A00: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39A04: 24190028 addiu $t9, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24190028u, cpu->gpr[25], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80051A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39A08: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051A08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39A0C: 03E00008 jr $ra */ - psx_delay_BFC39A0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39A10: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051A10u); return; } g_debug_last_store_pc = 0x80051A10u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A10u); -#endif - if (psx_delay_BFC39A0C) { - psx_delay_BFC39A0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39A14(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39A14u); - int psx_delay_BFC39A34 = 0; -label_BFC39A14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39A14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A14u); -#endif - /* 0xBFC39A14: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051A14u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A18: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A1C: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39A20: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A24: 3C010900 lui $at, 0x900 */ - cpu->gpr[1] = 0x09000000u; - PGXP_ALU(0x3C010900u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39A28: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39A2C: 2419002C addiu $t9, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2419002Cu, cpu->gpr[25], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80051A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39A30: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051A30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39A34: 03E00008 jr $ra */ - psx_delay_BFC39A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39A38: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051A38u); return; } g_debug_last_store_pc = 0x80051A38u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A38u); -#endif - if (psx_delay_BFC39A34) { - psx_delay_BFC39A34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39A3C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39A3Cu); - int psx_delay_BFC39A5C = 0; -label_BFC39A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A3Cu); -#endif - /* 0xBFC39A3C: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051A3Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A40: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A44: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39A48: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39A4C: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39A50: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39A54: 24190038 addiu $t9, $zero, 56 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (56)); - PGXP_ALU(0x24190038u, cpu->gpr[25], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80051A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39A58: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051A58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39A5C: 03E00008 jr $ra */ - psx_delay_BFC39A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39A60: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051A60u); return; } g_debug_last_store_pc = 0x80051A60u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051A60u); -#endif - if (psx_delay_BFC39A5C) { - psx_delay_BFC39A5C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39ADC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39ADCu); - int psx_delay_BFC39AFC = 0; -label_BFC39ADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39ADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051ADCu); -#endif - /* 0xBFC39ADC: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051ADCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39AE0: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39AE4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39AE8: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39AEC: 3C010400 lui $at, 0x400 */ - cpu->gpr[1] = 0x04000000u; - PGXP_ALU(0x3C010400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39AF0: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39AF4: 24190064 addiu $t9, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24190064u, cpu->gpr[25], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80051AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39AF8: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051AF8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39AFC: 03E00008 jr $ra */ - psx_delay_BFC39AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39B00: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051B00u); return; } g_debug_last_store_pc = 0x80051B00u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051B00u); -#endif - if (psx_delay_BFC39AFC) { - psx_delay_BFC39AFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39BA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39BA4u); - int psx_delay_BFC39BC4 = 0; -label_BFC39BA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39BA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BA4u); -#endif - /* 0xBFC39BA4: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051BA4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BA8: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BAC: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39BB0: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BB4: 3C010300 lui $at, 0x300 */ - cpu->gpr[1] = 0x03000000u; - PGXP_ALU(0x3C010300u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39BB8: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39BBC: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80051BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39BC0: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051BC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39BC4: 03E00008 jr $ra */ - psx_delay_BFC39BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39BC8: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051BC8u); return; } g_debug_last_store_pc = 0x80051BC8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BC8u); -#endif - if (psx_delay_BFC39BC4) { - psx_delay_BFC39BC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39BCC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39BCCu); - int psx_delay_BFC39BEC = 0; -label_BFC39BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BCCu); -#endif - /* 0xBFC39BCC: 8C8E0000 lw $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051BCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BD0: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BD4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC39BD8: 01C17824 and $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C17824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC39BDC: 3C010300 lui $at, 0x300 */ - cpu->gpr[1] = 0x03000000u; - PGXP_ALU(0x3C010300u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC39BE0: 01E1C025 or $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC39BE4: 24190040 addiu $t9, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24190040u, cpu->gpr[25], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80051BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC39BE8: A0990007 sb $t9, 7($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80051BE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (7)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990007u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39BEC: 03E00008 jr $ra */ - psx_delay_BFC39BEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC39BF0: AC980000 sw $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051BF0u); return; } g_debug_last_store_pc = 0x80051BF0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051BF0u); -#endif - if (psx_delay_BFC39BEC) { - psx_delay_BFC39BEC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39D38(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39D38u); - int psx_delay_BFC39D68 = 0; - int psx_delay_BFC39D84 = 0; - int psx_delay_BFC39DAC = 0; - int psx_delay_BFC39DC4 = 0; - int psx_delay_BFC39DDC = 0; - int psx_delay_BFC39DE4 = 0; - int psx_delay_BFC39DEC = 0; - int psx_taken_BFC39DEC = 0; - int psx_delay_BFC39E28 = 0; - int psx_delay_BFC39E30 = 0; - int psx_taken_BFC39E30 = 0; - int psx_delay_BFC39E6C = 0; - int psx_delay_BFC39E7C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39D70u: goto label_BFC39D70; - case 0xBFC39D8Cu: goto label_BFC39D8C; - case 0xBFC39DB4u: goto label_BFC39DB4; - case 0xBFC39DCCu: goto label_BFC39DCC; - case 0xBFC39DE4u: goto label_BFC39DE4; - case 0xBFC39DECu: goto label_BFC39DEC; - case 0xBFC39DF4u: goto label_BFC39DF4; - case 0xBFC39E30u: goto label_BFC39E30; - case 0xBFC39E38u: goto label_BFC39E38; - case 0xBFC39E74u: goto label_BFC39E74; - case 0xBFC39E78u: goto label_BFC39E78; - default: break; - } - } -label_BFC39D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39D38: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC39D3C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D3Cu); return; } g_debug_last_store_pc = 0x80051D3Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC39D40: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39D44: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D44u); return; } g_debug_last_store_pc = 0x80051D44u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC39D48: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D48u); -#endif - /* 0xBFC39D4C: 8DEF92F8 lw $t7, -27912($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D4Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92F8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D50u); -#endif - /* 0xBFC39D50: 860E0006 lh $t6, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D50u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D50u); -#endif - /* 0xBFC39D54: 86070004 lh $a3, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D54u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D54u); -#endif - /* 0xBFC39D58: 86060002 lh $a2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D58u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x86060002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D58u); -#endif - /* 0xBFC39D5C: 86050000 lh $a1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D5Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x86050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39D60: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39D64: 2484939C addiu $a0, $a0, -27748 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27748)); - PGXP_ALU(0x2484939Cu, cpu->gpr[4], _pgx1, 0xFFFF939Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80051D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC39D68: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x80051D70u; /* jalr link before delay slot */ - psx_delay_BFC39D68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC39D6C: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D6Cu); return; } g_debug_last_store_pc = 0x80051D6Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D6Cu); -#endif - if (psx_delay_BFC39D68) { - psx_delay_BFC39D68 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x80051D70u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39D70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39D70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC39D70: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D70u); -#endif - /* 0xBFC39D74: 8F1892F8 lw $t8, -27912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D74u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892F8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39D78: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D78u); -#endif - /* 0xBFC39D7C: 86050008 lh $a1, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D7Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x86050008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D80u); -#endif - /* 0xBFC39D80: 8606000A lh $a2, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D80u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8606000Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC39D84: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x80051D8Cu; /* jalr link before delay slot */ - psx_delay_BFC39D84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39D88: 248493B4 addiu $a0, $a0, -27724 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27724)); - PGXP_ALU(0x248493B4u, cpu->gpr[4], _pgx1, 0xFFFF93B4u); } -#ifdef PSX_COSIM - cosim_instr(0x80051D88u); -#endif - if (psx_delay_BFC39D84) { - psx_delay_BFC39D84 = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x80051D8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC39D8C: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051D90u); -#endif - /* 0xBFC39D90: 8D0892F8 lw $t0, -27912($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051D90u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892F8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D90u); -#endif - /* 0xBFC39D94: 86190012 lh $t9, 18($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D94u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x86190012u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39D98: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051D98u); -#endif - /* 0xBFC39D9C: 8605000C lh $a1, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051D9Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x8605000Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DA0u); -#endif - /* 0xBFC39DA0: 8606000E lh $a2, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051DA0u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8606000Eu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DA0u); -#endif - /* 0xBFC39DA4: 86070010 lh $a3, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051DA4u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070010u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39DA8: 248493C4 addiu $a0, $a0, -27708 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27708)); - PGXP_ALU(0x248493C4u, cpu->gpr[4], _pgx1, 0xFFFF93C4u); } -#ifdef PSX_COSIM - cosim_instr(0x80051DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC39DAC: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x80051DB4u; /* jalr link before delay slot */ - psx_delay_BFC39DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC39DB0: AFB90010 sw $t9, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051DB0u); return; } g_debug_last_store_pc = 0x80051DB0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DB0u); -#endif - if (psx_delay_BFC39DAC) { - psx_delay_BFC39DAC = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x80051DB4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC39DB4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051DB4u); -#endif - /* 0xBFC39DB8: 8D2992F8 lw $t1, -27912($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051DB8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2992F8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39DBC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DC0u); -#endif - /* 0xBFC39DC0: 92050016 lbu $a1, 22($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 22; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (22)), 5, 0x10000u); - PGXP_LOAD(0x92050016u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC39DC4: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x80051DCCu; /* jalr link before delay slot */ - psx_delay_BFC39DC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39DC8: 248493DC addiu $a0, $a0, -27684 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27684)); - PGXP_ALU(0x248493DCu, cpu->gpr[4], _pgx1, 0xFFFF93DCu); } -#ifdef PSX_COSIM - cosim_instr(0x80051DC8u); -#endif - if (psx_delay_BFC39DC4) { - psx_delay_BFC39DC4 = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x80051DCCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39DCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39DCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC39DCC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DD0u); -#endif - /* 0xBFC39DD0: 8D4A92F8 lw $t2, -27912($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051DD0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92F8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39DD4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051DD4u); -#endif - /* 0xBFC39DD8: 92050017 lbu $a1, 23($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 23; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (23)), 5, 0x10000u); - PGXP_LOAD(0x92050017u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC39DDC: 0140F809 jalr $ra, $t2 */ - cpu->gpr[31] = 0x80051DE4u; /* jalr link before delay slot */ - psx_delay_BFC39DDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39DE0: 248493E8 addiu $a0, $a0, -27672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27672)); - PGXP_ALU(0x248493E8u, cpu->gpr[4], _pgx1, 0xFFFF93E8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051DE0u); -#endif - if (psx_delay_BFC39DDC) { - psx_delay_BFC39DDC = 0; - { uint32_t _t = cpu->gpr[10]; - cpu->gpr[31] = 0x80051DE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39DE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39DE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC39DE4: 0C013BFC jal 0xB004EFF0 */ - cpu->gpr[31] = 0x80051DECu; /* jal link before delay slot */ - psx_delay_BFC39DE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39DE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051DE8u); -#endif - if (psx_delay_BFC39DE4) { - psx_delay_BFC39DE4 = 0; - cpu->gpr[31] = 0x80051DECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004EFF0u); - cpu->pc = 0x8004EFF0u; return; - } -label_BFC39DEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39DECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39DEC: 10400012 beq $v0, $zero, 0xBFC39E38 */ - uint32_t psx_brA_BFC39DEC = cpu->gpr[2]; uint32_t psx_brB_BFC39DEC = cpu->gpr[0]; - psx_taken_BFC39DEC = (psx_brA_BFC39DEC == psx_brB_BFC39DEC); - psx_delay_BFC39DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39DF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051DF0u); -#endif - if (psx_delay_BFC39DEC) { - psx_delay_BFC39DEC = 0; - if (psx_taken_BFC39DEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051E38u); - goto label_BFC39E38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051DF4u); - } -label_BFC39DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051DF4u); -#endif - /* 0xBFC39DF4: 96020014 lhu $v0, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051DF4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x96020014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC39DF8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051DF8u); -#endif - /* 0xBFC39DFC: 8DAD92F8 lw $t5, -27912($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051DFCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD92F8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80051DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC39E00: 000258C0 sll $t3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000258C0u, cpu->gpr[11], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC39E04: 316C0300 andi $t4, $t3, 0x300 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x300u; - PGXP_ALU(0x316C0300u, cpu->gpr[12], _pgx1, 0x0300u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39E08: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC39E0C: 00022A42 srl $a1, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 9u; - PGXP_ALU(0x00022A42u, cpu->gpr[5], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC39E10: 000231C2 srl $a2, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x000231C2u, cpu->gpr[6], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC39E14: 00023980 sll $a3, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 6u; - PGXP_ALU(0x00023980u, cpu->gpr[7], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC39E18: 30E707C0 andi $a3, $a3, 0x7C0 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u; - PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC39E1C: 30C60003 andi $a2, $a2, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u; - PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC39E20: 30A50003 andi $a1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39E24: 248493F4 addiu $a0, $a0, -27660 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27660)); - PGXP_ALU(0x248493F4u, cpu->gpr[4], _pgx1, 0xFFFF93F4u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80002000u); -#endif - /* 0xBFC39E28: 01A0F809 jalr $ra, $t5 */ - cpu->gpr[31] = 0x80051E30u; /* jalr link before delay slot */ - psx_delay_BFC39E28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC39E2C: AFAC0010 sw $t4, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E2Cu); return; } g_debug_last_store_pc = 0x80051E2Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E2Cu); -#endif - if (psx_delay_BFC39E28) { - psx_delay_BFC39E28 = 0; - { uint32_t _t = cpu->gpr[13]; - cpu->gpr[31] = 0x80051E30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39E30: 10000011 beq $zero, $zero, 0xBFC39E78 */ - uint32_t psx_brA_BFC39E30 = cpu->gpr[0]; uint32_t psx_brB_BFC39E30 = cpu->gpr[0]; - psx_taken_BFC39E30 = (psx_brA_BFC39E30 == psx_brB_BFC39E30); - psx_delay_BFC39E30 = 1; - /* 0xBFC39E34: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E34u); -#endif - if (psx_delay_BFC39E30) { - psx_delay_BFC39E30 = 0; - if (psx_taken_BFC39E30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051E78u); - goto label_BFC39E78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051E38u); - } -label_BFC39E38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39E38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E38u); -#endif - /* 0xBFC39E38: 96020014 lhu $v0, 20($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051E38u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x96020014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC39E3C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E40u); -#endif - /* 0xBFC39E40: 8F1892F8 lw $t8, -27912($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E40u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1892F8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC39E44: 00027100 sll $t6, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 4u; - PGXP_ALU(0x00027100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC39E48: 31CF0100 andi $t7, $t6, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x100u; - PGXP_ALU(0x31CF0100u, cpu->gpr[15], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39E4C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC39E50: 000229C2 srl $a1, $v0, 7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] >> 7u; - PGXP_ALU(0x000229C2u, cpu->gpr[5], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC39E54: 00023142 srl $a2, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[2] >> 5u; - PGXP_ALU(0x00023142u, cpu->gpr[6], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC39E58: 00023980 sll $a3, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 6u; - PGXP_ALU(0x00023980u, cpu->gpr[7], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC39E5C: 30E707C0 andi $a3, $a3, 0x7C0 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7C0u; - PGXP_ALU(0x30E707C0u, cpu->gpr[7], _pgx1, 0x07C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC39E60: 30C60003 andi $a2, $a2, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x3u; - PGXP_ALU(0x30C60003u, cpu->gpr[6], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC39E64: 30A50003 andi $a1, $a1, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3u; - PGXP_ALU(0x30A50003u, cpu->gpr[5], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39E68: 24849410 addiu $a0, $a0, -27632 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27632)); - PGXP_ALU(0x24849410u, cpu->gpr[4], _pgx1, 0xFFFF9410u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81000000u); -#endif - /* 0xBFC39E6C: 0300F809 jalr $ra, $t8 */ - cpu->gpr[31] = 0x80051E74u; /* jalr link before delay slot */ - psx_delay_BFC39E6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC39E70: AFAF0010 sw $t7, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E70u); return; } g_debug_last_store_pc = 0x80051E70u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E70u); -#endif - if (psx_delay_BFC39E6C) { - psx_delay_BFC39E6C = 0; - { uint32_t _t = cpu->gpr[24]; - cpu->gpr[31] = 0x80051E74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39E74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39E74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E74u); -#endif - /* 0xBFC39E74: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E74u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E74u); -#endif -label_BFC39E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E78u); -#endif - /* 0xBFC39E78: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E78u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39E7C: 03E00008 jr $ra */ - psx_delay_BFC39E7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39E80: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E80u); -#endif - if (psx_delay_BFC39E7C) { - psx_delay_BFC39E7C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39E84(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39E84u); - int psx_delay_BFC39EB4 = 0; - int psx_delay_BFC39EDC = 0; - int psx_delay_BFC39EF4 = 0; - int psx_delay_BFC39F0C = 0; - int psx_delay_BFC39F1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39EBCu: goto label_BFC39EBC; - case 0xBFC39EE4u: goto label_BFC39EE4; - case 0xBFC39EFCu: goto label_BFC39EFC; - case 0xBFC39F14u: goto label_BFC39F14; - default: break; - } - } -label_BFC39E84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39E84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39E84: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80051E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC39E88: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E88u); return; } g_debug_last_store_pc = 0x80051E88u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC39E8C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39E90: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E90u); return; } g_debug_last_store_pc = 0x80051E90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC39E94: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051E94u); -#endif - /* 0xBFC39E98: 8DEF92F8 lw $t7, -27912($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051E98u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF92F8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E98u); -#endif - /* 0xBFC39E9C: 860E0006 lh $t6, 6($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051E9Cu); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x860E0006u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EA0u); -#endif - /* 0xBFC39EA0: 86070004 lh $a3, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051EA0u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x86070004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EA0u); -#endif - /* 0xBFC39EA4: 86060002 lh $a2, 2($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051EA4u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x86060002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EA4u); -#endif - /* 0xBFC39EA8: 86050000 lh $a1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051EA8u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x86050000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39EAC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39EB0: 2484942C addiu $a0, $a0, -27604 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27604)); - PGXP_ALU(0x2484942Cu, cpu->gpr[4], _pgx1, 0xFFFF942Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80051EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC39EB4: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x80051EBCu; /* jalr link before delay slot */ - psx_delay_BFC39EB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC39EB8: AFAE0010 sw $t6, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051EB8u); return; } g_debug_last_store_pc = 0x80051EB8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0010u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EB8u); -#endif - if (psx_delay_BFC39EB4) { - psx_delay_BFC39EB4 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x80051EBCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC39EBC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EC0u); -#endif - /* 0xBFC39EC0: 8F3992F8 lw $t9, -27912($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051EC0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3992F8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EC0u); -#endif - /* 0xBFC39EC4: 8618000E lh $t8, 14($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051EC4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x8618000Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39EC8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EC8u); -#endif - /* 0xBFC39ECC: 86050008 lh $a1, 8($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051ECCu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x10000u); } - PGXP_LOAD(0x86050008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051ED0u); -#endif - /* 0xBFC39ED0: 8606000A lh $a2, 10($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051ED0u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8606000Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80051ED0u); -#endif - /* 0xBFC39ED4: 8607000C lh $a3, 12($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80051ED4u); return; } cpu->gpr[7] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x8607000Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80051ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39ED8: 24849448 addiu $a0, $a0, -27576 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27576)); - PGXP_ALU(0x24849448u, cpu->gpr[4], _pgx1, 0xFFFF9448u); } -#ifdef PSX_COSIM - cosim_instr(0x80051ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82000000u); -#endif - /* 0xBFC39EDC: 0320F809 jalr $ra, $t9 */ - cpu->gpr[31] = 0x80051EE4u; /* jalr link before delay slot */ - psx_delay_BFC39EDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC39EE0: AFB80010 sw $t8, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051EE0u); return; } g_debug_last_store_pc = 0x80051EE0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EE0u); -#endif - if (psx_delay_BFC39EDC) { - psx_delay_BFC39EDC = 0; - { uint32_t _t = cpu->gpr[25]; - cpu->gpr[31] = 0x80051EE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39EE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39EE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC39EE4: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EE4u); -#endif - /* 0xBFC39EE8: 8D0892F8 lw $t0, -27912($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051EE8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892F8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39EEC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EF0u); -#endif - /* 0xBFC39EF0: 92050010 lbu $a1, 16($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 16; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (16)), 5, 0x10000u); - PGXP_LOAD(0x92050010u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC39EF4: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x80051EFCu; /* jalr link before delay slot */ - psx_delay_BFC39EF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39EF8: 24849464 addiu $a0, $a0, -27548 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27548)); - PGXP_ALU(0x24849464u, cpu->gpr[4], _pgx1, 0xFFFF9464u); } -#ifdef PSX_COSIM - cosim_instr(0x80051EF8u); -#endif - if (psx_delay_BFC39EF4) { - psx_delay_BFC39EF4 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x80051EFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39EFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39EFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC39EFC: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F00u); -#endif - /* 0xBFC39F00: 8D2992F8 lw $t1, -27912($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051F00u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2992F8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80051F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39F04: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051F04u); -#endif - /* 0xBFC39F08: 92050011 lbu $a1, 17($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 17; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (17)), 5, 0x10000u); - PGXP_LOAD(0x92050011u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80051F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000200u); -#endif - /* 0xBFC39F0C: 0120F809 jalr $ra, $t1 */ - cpu->gpr[31] = 0x80051F14u; /* jalr link before delay slot */ - psx_delay_BFC39F0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39F10: 24849470 addiu $a0, $a0, -27536 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27536)); - PGXP_ALU(0x24849470u, cpu->gpr[4], _pgx1, 0xFFFF9470u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F10u); -#endif - if (psx_delay_BFC39F0C) { - psx_delay_BFC39F0C = 0; - { uint32_t _t = cpu->gpr[9]; - cpu->gpr[31] = 0x80051F14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC39F14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F14u); -#endif - /* 0xBFC39F14: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051F14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051F14u); -#endif - /* 0xBFC39F18: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051F18u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39F1C: 03E00008 jr $ra */ - psx_delay_BFC39F1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39F20: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F20u); -#endif - if (psx_delay_BFC39F1C) { - psx_delay_BFC39F1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39F30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39F30u); - int psx_delay_BFC39F38 = 0; - int psx_taken_BFC39F38 = 0; - int psx_delay_BFC39F44 = 0; - int psx_delay_BFC39F50 = 0; - int psx_taken_BFC39F50 = 0; - int psx_delay_BFC39F58 = 0; - int psx_taken_BFC39F58 = 0; - int psx_delay_BFC39F78 = 0; - int psx_delay_BFC39F88 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39F40u: goto label_BFC39F40; - case 0xBFC39F50u: goto label_BFC39F50; - case 0xBFC39F58u: goto label_BFC39F58; - case 0xBFC39F60u: goto label_BFC39F60; - case 0xBFC39F80u: goto label_BFC39F80; - default: break; - } - } -label_BFC39F30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39F30: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39F34: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39F38: 14810005 bne $a0, $at, 0xBFC39F50 */ - uint32_t psx_brA_BFC39F38 = cpu->gpr[4]; uint32_t psx_brB_BFC39F38 = cpu->gpr[1]; - psx_taken_BFC39F38 = (psx_brA_BFC39F38 != psx_brB_BFC39F38); - psx_delay_BFC39F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39F3C: 2C810020 sltiu $at, $a0, 32 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0); - PGXP_ALU(0x2C810020u, cpu->gpr[1], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F3Cu); -#endif - if (psx_delay_BFC39F38) { - psx_delay_BFC39F38 = 0; - if (psx_taken_BFC39F38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F50u); - goto label_BFC39F50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F40u); - } -label_BFC39F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39F40: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39F44: 03E00008 jr $ra */ - psx_delay_BFC39F44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39F48: 24429584 addiu $v0, $v0, -27260 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-27260)); - PGXP_ALU(0x24429584u, cpu->gpr[2], _pgx1, 0xFFFF9584u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F48u); -#endif - if (psx_delay_BFC39F44) { - psx_delay_BFC39F44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC39F50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39F50: 1420000B bne $at, $zero, 0xBFC39F80 */ - uint32_t psx_brA_BFC39F50 = cpu->gpr[1]; uint32_t psx_brB_BFC39F50 = cpu->gpr[0]; - psx_taken_BFC39F50 = (psx_brA_BFC39F50 != psx_brB_BFC39F50); - psx_delay_BFC39F50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39F54: 2C810080 sltiu $at, $a0, 128 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C810080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F54u); -#endif - if (psx_delay_BFC39F50) { - psx_delay_BFC39F50 = 0; - if (psx_taken_BFC39F50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F80u); - goto label_BFC39F80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F58u); - } -label_BFC39F58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39F58: 10200009 beq $at, $zero, 0xBFC39F80 */ - uint32_t psx_brA_BFC39F58 = cpu->gpr[1]; uint32_t psx_brB_BFC39F58 = cpu->gpr[0]; - psx_taken_BFC39F58 = (psx_brA_BFC39F58 == psx_brB_BFC39F58); - psx_delay_BFC39F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39F5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051F5Cu); -#endif - if (psx_delay_BFC39F58) { - psx_delay_BFC39F58 = 0; - if (psx_taken_BFC39F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F80u); - goto label_BFC39F80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F60u); - } -label_BFC39F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39F60: 248EFFE0 addiu $t6, $a0, -32 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[4] + (-32)); - PGXP_ALU(0x248EFFE0u, cpu->gpr[14], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC39F64: 000E7882 srl $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 2u; - PGXP_ALU(0x000E7882u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC39F68: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39F6C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC39F70: 00581021 addu $v0, $v0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[24]; - PGXP_ALU(0x00581021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051F70u); -#endif - /* 0xBFC39F74: 8C4294AC lw $v0, -27476($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051F74u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4294ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39F78: 03E00008 jr $ra */ - psx_delay_BFC39F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051F7Cu); -#endif - if (psx_delay_BFC39F78) { - psx_delay_BFC39F78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC39F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39F80: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39F84: 24429588 addiu $v0, $v0, -27256 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-27256)); - PGXP_ALU(0x24429588u, cpu->gpr[2], _pgx1, 0xFFFF9588u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39F88: 03E00008 jr $ra */ - psx_delay_BFC39F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39F8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051F8Cu); -#endif - if (psx_delay_BFC39F88) { - psx_delay_BFC39F88 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39F90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39F90u); - int psx_delay_BFC39F98 = 0; - int psx_taken_BFC39F98 = 0; - int psx_delay_BFC39FA0 = 0; - int psx_delay_BFC39FAC = 0; - int psx_taken_BFC39FAC = 0; - int psx_delay_BFC39FB4 = 0; - int psx_taken_BFC39FB4 = 0; - int psx_delay_BFC39FD0 = 0; - int psx_delay_BFC39FDC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC39FA0u: goto label_BFC39FA0; - case 0xBFC39FACu: goto label_BFC39FAC; - case 0xBFC39FB4u: goto label_BFC39FB4; - case 0xBFC39FBCu: goto label_BFC39FBC; - case 0xBFC39FD8u: goto label_BFC39FD8; - case 0xBFC39FDCu: goto label_BFC39FDC; - default: break; - } - } -label_BFC39F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC39F90: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80051F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39F94: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39F98: 14810004 bne $a0, $at, 0xBFC39FAC */ - uint32_t psx_brA_BFC39F98 = cpu->gpr[4]; uint32_t psx_brB_BFC39F98 = cpu->gpr[1]; - psx_taken_BFC39F98 = (psx_brA_BFC39F98 != psx_brB_BFC39F98); - psx_delay_BFC39F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39F9C: 2C810020 sltiu $at, $a0, 32 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000020u ? 1 : 0); - PGXP_ALU(0x2C810020u, cpu->gpr[1], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80051F9Cu); -#endif - if (psx_delay_BFC39F98) { - psx_delay_BFC39F98 = 0; - if (psx_taken_BFC39F98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FACu); - goto label_BFC39FAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FA0u); - } -label_BFC39FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39FA0: 03E00008 jr $ra */ - psx_delay_BFC39FA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39FA4: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80051FA4u); -#endif - if (psx_delay_BFC39FA0) { - psx_delay_BFC39FA0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC39FAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39FAC: 1420000A bne $at, $zero, 0xBFC39FD8 */ - uint32_t psx_brA_BFC39FAC = cpu->gpr[1]; uint32_t psx_brB_BFC39FAC = cpu->gpr[0]; - psx_taken_BFC39FAC = (psx_brA_BFC39FAC != psx_brB_BFC39FAC); - psx_delay_BFC39FAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC39FB0: 2C810080 sltiu $at, $a0, 128 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000080u ? 1 : 0); - PGXP_ALU(0x2C810080u, cpu->gpr[1], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80051FB0u); -#endif - if (psx_delay_BFC39FAC) { - psx_delay_BFC39FAC = 0; - if (psx_taken_BFC39FAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FD8u); - goto label_BFC39FD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FB4u); - } -label_BFC39FB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC39FB4: 10200009 beq $at, $zero, 0xBFC39FDC */ - uint32_t psx_brA_BFC39FB4 = cpu->gpr[1]; uint32_t psx_brB_BFC39FB4 = cpu->gpr[0]; - psx_taken_BFC39FB4 = (psx_brA_BFC39FB4 == psx_brB_BFC39FB4); - psx_delay_BFC39FB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39FB8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051FB8u); -#endif - if (psx_delay_BFC39FB4) { - psx_delay_BFC39FB4 = 0; - if (psx_taken_BFC39FB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FDCu); - goto label_BFC39FDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051FBCu); - } -label_BFC39FBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC39FBC: 248EFFE0 addiu $t6, $a0, -32 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[4] + (-32)); - PGXP_ALU(0x248EFFE0u, cpu->gpr[14], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC39FC0: 000E7882 srl $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 2u; - PGXP_ALU(0x000E7882u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80051FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC39FC4: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC39FC8: 004F1021 addu $v0, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[15]; - PGXP_ALU(0x004F1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051FC8u); -#endif - /* 0xBFC39FCC: 9042956C lbu $v0, -27284($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -27284; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-27284)), 2, 0x4u); - PGXP_LOAD(0x9042956Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80051FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39FD0: 03E00008 jr $ra */ - psx_delay_BFC39FD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39FD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051FD4u); -#endif - if (psx_delay_BFC39FD0) { - psx_delay_BFC39FD0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC39FD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC39FD8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051FD8u); -#endif -label_BFC39FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC39FDC: 03E00008 jr $ra */ - psx_delay_BFC39FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC39FE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80051FE0u); -#endif - if (psx_delay_BFC39FDC) { - psx_delay_BFC39FDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC39FE4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC39FE4u); - int psx_delay_BFC3A00C = 0; - int psx_taken_BFC3A00C = 0; - int psx_delay_BFC3A024 = 0; - int psx_taken_BFC3A024 = 0; - int psx_delay_BFC3A02C = 0; - int psx_delay_BFC3A058 = 0; - int psx_taken_BFC3A058 = 0; - int psx_delay_BFC3A070 = 0; - int psx_taken_BFC3A070 = 0; - int psx_delay_BFC3A078 = 0; - int psx_delay_BFC3A08C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A014u: goto label_BFC3A014; - case 0xBFC3A020u: goto label_BFC3A020; - case 0xBFC3A02Cu: goto label_BFC3A02C; - case 0xBFC3A034u: goto label_BFC3A034; - case 0xBFC3A044u: goto label_BFC3A044; - case 0xBFC3A060u: goto label_BFC3A060; - case 0xBFC3A06Cu: goto label_BFC3A06C; - case 0xBFC3A078u: goto label_BFC3A078; - case 0xBFC3A080u: goto label_BFC3A080; - case 0xBFC3A084u: goto label_BFC3A084; - default: break; - } - } -label_BFC39FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC39FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC39FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC39FE4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80051FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC39FE8: AFB00014 sw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051FE8u); return; } g_debug_last_store_pc = 0x80051FE8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80051FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC39FEC: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80051FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80051FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC39FF0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051FF0u); return; } g_debug_last_store_pc = 0x80051FF0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80051FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC39FF4: AFB20018 sw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051FF4u); return; } g_debug_last_store_pc = 0x80051FF4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80051FF4u); -#endif - /* 0xBFC39FF8: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80051FF8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80051FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC39FFC: 3C1200FF lui $s2, 0xFF */ - cpu->gpr[18] = 0x00FF0000u; - PGXP_ALU(0x3C1200FFu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80051FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A000: 00031200 sll $v0, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 8u; - PGXP_ALU(0x00031200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3A004: 3652FFFF ori $s2, $s2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] | 0xFFFFu; - PGXP_ALU(0x3652FFFFu, cpu->gpr[18], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A008: 00021202 srl $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00021202u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC3A00C: 12420017 beq $s2, $v0, 0xBFC3A06C */ - uint32_t psx_brA_BFC3A00C = cpu->gpr[18]; uint32_t psx_brB_BFC3A00C = cpu->gpr[2]; - psx_taken_BFC3A00C = (psx_brA_BFC3A00C == psx_brB_BFC3A00C); - psx_delay_BFC3A00C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3A010: 0003C602 srl $t8, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x0003C602u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052010u); -#endif - if (psx_delay_BFC3A00C) { - psx_delay_BFC3A00C = 0; - if (psx_taken_BFC3A00C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005206Cu); - goto label_BFC3A06C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052014u); - } -label_BFC3A014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3A014: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052014u); return; } g_debug_last_store_pc = 0x80052014u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3A018: 3C118000 lui $s1, 0x8000 */ - cpu->gpr[17] = 0x80000000u; - PGXP_ALU(0x3C118000u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3A01C: 00037602 srl $t6, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x00037602u, cpu->gpr[14], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8005201Cu); -#endif -label_BFC3A020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3A020: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3A024: 11E00007 beq $t7, $zero, 0xBFC3A044 */ - uint32_t psx_brA_BFC3A024 = cpu->gpr[15]; uint32_t psx_brB_BFC3A024 = cpu->gpr[0]; - psx_taken_BFC3A024 = (psx_brA_BFC3A024 == psx_brB_BFC3A024); - psx_delay_BFC3A024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052028u); -#endif - if (psx_delay_BFC3A024) { - psx_delay_BFC3A024 = 0; - if (psx_taken_BFC3A024) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052044u); - goto label_BFC3A044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005202Cu); - } -label_BFC3A02C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A02Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005202Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A02C: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80052034u; /* jal link before delay slot */ - psx_delay_BFC3A02C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3A030: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052030u); -#endif - if (psx_delay_BFC3A02C) { - psx_delay_BFC3A02C = 0; - cpu->gpr[31] = 0x80052034u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC3A034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052034u); -#endif - /* 0xBFC3A034: 8E020000 lw $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052034u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x8E020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A03C: 00021200 sll $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 8u; - PGXP_ALU(0x00021200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A040: 00021202 srl $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00021202u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052040u); -#endif -label_BFC3A044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30004u); -#endif - /* 0xBFC3A044: 00518025 or $s0, $v0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[16] = cpu->gpr[2] | cpu->gpr[17]; - PGXP_ALU(0x00518025u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052044u); -#endif - /* 0xBFC3A048: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052048u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80052048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A04C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005204Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A050: 00031200 sll $v0, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 8u; - PGXP_ALU(0x00031200u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A054: 00021202 srl $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 8u; - PGXP_ALU(0x00021202u, cpu->gpr[2], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC3A058: 1642FFF1 bne $s2, $v0, 0xBFC3A020 */ - uint32_t psx_brA_BFC3A058 = cpu->gpr[18]; uint32_t psx_brB_BFC3A058 = cpu->gpr[2]; - psx_taken_BFC3A058 = (psx_brA_BFC3A058 != psx_brB_BFC3A058); - psx_delay_BFC3A058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3A05C: 00037602 srl $t6, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x00037602u, cpu->gpr[14], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8005205Cu); -#endif - if (psx_delay_BFC3A058) { - psx_delay_BFC3A058 = 0; - if (psx_taken_BFC3A058) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052020u); - goto label_BFC3A020; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052060u); - } -label_BFC3A060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052060u); -#endif - /* 0xBFC3A060: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052060u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A064: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3A068: 0003C602 srl $t8, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x0003C602u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052068u); -#endif -label_BFC3A06C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A06Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3A06C: 331900FF andi $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x331900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005206Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3A070: 13200004 beq $t9, $zero, 0xBFC3A084 */ - uint32_t psx_brA_BFC3A070 = cpu->gpr[25]; uint32_t psx_brB_BFC3A070 = cpu->gpr[0]; - psx_taken_BFC3A070 = (psx_brA_BFC3A070 == psx_brB_BFC3A070); - psx_delay_BFC3A070 = 1; - /* 0xBFC3A074: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052074u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80052074u); -#endif - if (psx_delay_BFC3A070) { - psx_delay_BFC3A070 = 0; - if (psx_taken_BFC3A070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052084u); - goto label_BFC3A084; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052078u); - } -label_BFC3A078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A078: 0C013CDA jal 0xB004F368 */ - cpu->gpr[31] = 0x80052080u; /* jal link before delay slot */ - psx_delay_BFC3A078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3A07C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005207Cu); -#endif - if (psx_delay_BFC3A078) { - psx_delay_BFC3A078 = 0; - cpu->gpr[31] = 0x80052080u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8004F368u); - cpu->pc = 0x8004F368u; return; - } -label_BFC3A080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052080u); -#endif - /* 0xBFC3A080: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052080u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80052080u); -#endif -label_BFC3A084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052084u); -#endif - /* 0xBFC3A084: 8FB00014 lw $s0, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052084u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00014u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052084u); -#endif - /* 0xBFC3A088: 8FB20018 lw $s2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052088u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20018u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80052088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A08C: 03E00008 jr $ra */ - psx_delay_BFC3A08C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A090: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80052090u); -#endif - if (psx_delay_BFC3A08C) { - psx_delay_BFC3A08C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A094(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A094u); - int psx_delay_BFC3A0C0 = 0; - int psx_delay_BFC3A0DC = 0; - int psx_taken_BFC3A0DC = 0; - int psx_delay_BFC3A118 = 0; - int psx_taken_BFC3A118 = 0; - int psx_delay_BFC3A134 = 0; - int psx_taken_BFC3A134 = 0; - int psx_delay_BFC3A148 = 0; - int psx_delay_BFC3A164 = 0; - int psx_taken_BFC3A164 = 0; - int psx_delay_BFC3A170 = 0; - int psx_delay_BFC3A17C = 0; - int psx_delay_BFC3A190 = 0; - int psx_delay_BFC3A1C0 = 0; - int psx_taken_BFC3A1C0 = 0; - int psx_delay_BFC3A1E4 = 0; - int psx_delay_BFC3A1F0 = 0; - int psx_delay_BFC3A208 = 0; - int psx_delay_BFC3A220 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A0C8u: goto label_BFC3A0C8; - case 0xBFC3A0E4u: goto label_BFC3A0E4; - case 0xBFC3A114u: goto label_BFC3A114; - case 0xBFC3A120u: goto label_BFC3A120; - case 0xBFC3A13Cu: goto label_BFC3A13C; - case 0xBFC3A150u: goto label_BFC3A150; - case 0xBFC3A164u: goto label_BFC3A164; - case 0xBFC3A16Cu: goto label_BFC3A16C; - case 0xBFC3A178u: goto label_BFC3A178; - case 0xBFC3A184u: goto label_BFC3A184; - case 0xBFC3A198u: goto label_BFC3A198; - case 0xBFC3A1ACu: goto label_BFC3A1AC; - case 0xBFC3A1C8u: goto label_BFC3A1C8; - case 0xBFC3A1DCu: goto label_BFC3A1DC; - case 0xBFC3A1ECu: goto label_BFC3A1EC; - case 0xBFC3A1F8u: goto label_BFC3A1F8; - case 0xBFC3A210u: goto label_BFC3A210; - default: break; - } - } -label_BFC3A094: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A094u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A094: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80052094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3A098: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052098u); return; } g_debug_last_store_pc = 0x80052098u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A09C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005209Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520A0u); -#endif - /* 0xBFC3A0A0: 8DCE92F8 lw $t6, -27912($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520A0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92F8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800520A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3A0A4: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800520A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3A0A8: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520A8u); return; } g_debug_last_store_pc = 0x800520A8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800520A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3A0AC: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520ACu); return; } g_debug_last_store_pc = 0x800520ACu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800520ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A0B0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800520B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC3A0B4: AFB60020 sw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520B4u); return; } g_debug_last_store_pc = 0x800520B4u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x800520B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A0B8: 2484958C addiu $a0, $a0, -27252 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27252)); - PGXP_ALU(0x2484958Cu, cpu->gpr[4], _pgx1, 0xFFFF958Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800520B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC3A0BC: 24110001 addiu $s1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24110001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800520BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC3A0C0: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x800520C8u; /* jalr link before delay slot */ - psx_delay_BFC3A0C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A0C4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800520C4u); -#endif - if (psx_delay_BFC3A0C0) { - psx_delay_BFC3A0C0 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x800520C8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3A0C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A0C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520C8u); -#endif - /* 0xBFC3A0C8: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800520C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC3A0CC: 3C1600FF lui $s6, 0xFF */ - cpu->gpr[22] = 0x00FF0000u; - PGXP_ALU(0x3C1600FFu, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800520CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3A0D0: 00032200 sll $a0, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 8u; - PGXP_ALU(0x00032200u, cpu->gpr[4], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800520D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC3A0D4: 36D6FFFF ori $s6, $s6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = cpu->gpr[22] | 0xFFFFu; - PGXP_ALU(0x36D6FFFFu, cpu->gpr[22], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800520D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A0D8: 00042202 srl $a0, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 8u; - PGXP_ALU(0x00042202u, cpu->gpr[4], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800520D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC3A0DC: 12C4003F beq $s6, $a0, 0xBFC3A1DC */ - uint32_t psx_brA_BFC3A0DC = cpu->gpr[22]; uint32_t psx_brB_BFC3A0DC = cpu->gpr[4]; - psx_taken_BFC3A0DC = (psx_brA_BFC3A0DC == psx_brB_BFC3A0DC); - psx_delay_BFC3A0DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A0E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800520E0u); -#endif - if (psx_delay_BFC3A0DC) { - psx_delay_BFC3A0DC = 0; - if (psx_taken_BFC3A0DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800521DCu); - goto label_BFC3A1DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800520E4u); - } -label_BFC3A0E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A0E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3A0E4: AFB30030 sw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520E4u); return; } g_debug_last_store_pc = 0x800520E4u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800520E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3A0E8: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520E8u); return; } g_debug_last_store_pc = 0x800520E8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800520E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC3A0EC: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520ECu); return; } g_debug_last_store_pc = 0x800520ECu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800520ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800520F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3A0F0: 3C158008 lui $s5, 0x8008 */ - cpu->gpr[21] = 0x80080000u; - PGXP_ALU(0x3C158008u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800520F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC3A0F4: 3C148008 lui $s4, 0x8008 */ - cpu->gpr[20] = 0x80080000u; - PGXP_ALU(0x3C148008u, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800520F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3A0F8: 3C138008 lui $s3, 0x8008 */ - cpu->gpr[19] = 0x80080000u; - PGXP_ALU(0x3C138008u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800520F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3A0FC: AFB20034 sw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800520FCu); return; } g_debug_last_store_pc = 0x800520FCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800520FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3A100: 3C128000 lui $s2, 0x8000 */ - cpu->gpr[18] = 0x80000000u; - PGXP_ALU(0x3C128000u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3A104: 2673959C addiu $s3, $s3, -27236 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-27236)); - PGXP_ALU(0x2673959Cu, cpu->gpr[19], _pgx1, 0xFFFF959Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80052104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC3A108: 269495A4 addiu $s4, $s4, -27228 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-27228)); - PGXP_ALU(0x269495A4u, cpu->gpr[20], _pgx1, 0xFFFF95A4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3A10C: 26B595B0 addiu $s5, $s5, -27216 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-27216)); - PGXP_ALU(0x26B595B0u, cpu->gpr[21], _pgx1, 0xFFFF95B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005210Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3A110: 00037E02 srl $t7, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x00037E02u, cpu->gpr[15], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052110u); -#endif -label_BFC3A114: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A114u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3A114: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3A118: 17000014 bne $t8, $zero, 0xBFC3A16C */ - uint32_t psx_brA_BFC3A118 = cpu->gpr[24]; uint32_t psx_brB_BFC3A118 = cpu->gpr[0]; - psx_taken_BFC3A118 = (psx_brA_BFC3A118 != psx_brB_BFC3A118); - psx_delay_BFC3A118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A11C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005211Cu); -#endif - if (psx_delay_BFC3A118) { - psx_delay_BFC3A118 = 0; - if (psx_taken_BFC3A118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005216Cu); - goto label_BFC3A16C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052120u); - } -label_BFC3A120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40014u); -#endif - /* 0xBFC3A120: 00921025 or $v0, $a0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[4] | cpu->gpr[18]; - PGXP_ALU(0x00921025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052120u); -#endif - /* 0xBFC3A124: 8C590000 lw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052124u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A128: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3A12C: 00194602 srl $t0, $t9, 24 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] >> 24u; - PGXP_ALU(0x00194602u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8005212Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3A130: 310900FF andi $t1, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3A134: 1120000B beq $t1, $zero, 0xBFC3A164 */ - uint32_t psx_brA_BFC3A134 = cpu->gpr[9]; uint32_t psx_brB_BFC3A134 = cpu->gpr[0]; - psx_taken_BFC3A134 = (psx_brA_BFC3A134 == psx_brB_BFC3A134); - psx_delay_BFC3A134 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A138: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052138u); -#endif - if (psx_delay_BFC3A134) { - psx_delay_BFC3A134 = 0; - if (psx_taken_BFC3A134) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052164u); - goto label_BFC3A164; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005213Cu); - } -label_BFC3A13C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A13Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3A13C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005213Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052140u); -#endif - /* 0xBFC3A140: 8D4A92F8 lw $t2, -27912($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052140u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92F8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80011u); -#endif - /* 0xBFC3A144: 02602021 addu $a0, $s3, $zero */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[0]; - PGXP_ALU(0x02602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC3A148: 0140F809 jalr $ra, $t2 */ - cpu->gpr[31] = 0x80052150u; /* jalr link before delay slot */ - psx_delay_BFC3A148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC3A14C: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005214Cu); -#endif - if (psx_delay_BFC3A148) { - psx_delay_BFC3A148 = 0; - { uint32_t _t = cpu->gpr[10]; - cpu->gpr[31] = 0x80052150u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3A150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052150u); -#endif - /* 0xBFC3A150: 8E0B0000 lw $t3, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052150u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x8E0B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3A158: 000B6200 sll $t4, $t3, 8 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 8u; - PGXP_ALU(0x000B6200u, cpu->gpr[12], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3A15C: 000C6A02 srl $t5, $t4, 8 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] >> 8u; - PGXP_ALU(0x000C6A02u, cpu->gpr[13], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005215Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42004u); -#endif - /* 0xBFC3A160: 01B21025 or $v0, $t5, $s2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[13] | cpu->gpr[18]; - PGXP_ALU(0x01B21025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052160u); -#endif -label_BFC3A164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A164: 10000011 beq $zero, $zero, 0xBFC3A1AC */ - uint32_t psx_brA_BFC3A164 = cpu->gpr[0]; uint32_t psx_brB_BFC3A164 = cpu->gpr[0]; - psx_taken_BFC3A164 = (psx_brA_BFC3A164 == psx_brB_BFC3A164); - psx_delay_BFC3A164 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3A168: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052168u); -#endif - if (psx_delay_BFC3A164) { - psx_delay_BFC3A164 = 0; - if (psx_taken_BFC3A164) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800521ACu); - goto label_BFC3A1AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005216Cu); - } -label_BFC3A16C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A16Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A16Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100011u); -#endif - /* 0xBFC3A16C: 02802021 addu $a0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02802021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005216Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A170: 0C01488A jal 0xB0052228 */ - cpu->gpr[31] = 0x80052178u; /* jal link before delay slot */ - psx_delay_BFC3A170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC3A174: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052174u); -#endif - if (psx_delay_BFC3A170) { - psx_delay_BFC3A170 = 0; - cpu->gpr[31] = 0x80052178u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052228u); - cpu->pc = 0x80052228u; return; - } -label_BFC3A178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052178u); -#endif - /* 0xBFC3A178: 92040007 lbu $a0, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 4, 0x10000u); - PGXP_LOAD(0x92040007u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A17C: 0C0147CC jal 0xB0051F30 */ - cpu->gpr[31] = 0x80052184u; /* jal link before delay slot */ - psx_delay_BFC3A17C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A180: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052180u); -#endif - if (psx_delay_BFC3A17C) { - psx_delay_BFC3A17C = 0; - cpu->gpr[31] = 0x80052184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F30u); - cpu->pc = 0x80051F30u; return; - } -label_BFC3A184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A184: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052184u); -#endif - /* 0xBFC3A188: 8DCE92F8 lw $t6, -27912($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052188u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE92F8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200011u); -#endif - /* 0xBFC3A18C: 02A02021 addu $a0, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005218Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004000u); -#endif - /* 0xBFC3A190: 01C0F809 jalr $ra, $t6 */ - cpu->gpr[31] = 0x80052198u; /* jalr link before delay slot */ - psx_delay_BFC3A190 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3A194: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052194u); -#endif - if (psx_delay_BFC3A190) { - psx_delay_BFC3A190 = 0; - { uint32_t _t = cpu->gpr[14]; - cpu->gpr[31] = 0x80052198u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3A198: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A198u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052198u); -#endif - /* 0xBFC3A198: 8E0F0000 lw $t7, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052198u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10000u); } - PGXP_LOAD(0x8E0F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A19C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005219Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3A1A0: 000FC200 sll $t8, $t7, 8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 8u; - PGXP_ALU(0x000FC200u, cpu->gpr[24], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800521A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3A1A4: 0018CA02 srl $t9, $t8, 8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 8u; - PGXP_ALU(0x0018CA02u, cpu->gpr[25], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800521A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040004u); -#endif - /* 0xBFC3A1A8: 03321025 or $v0, $t9, $s2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[25] | cpu->gpr[18]; - PGXP_ALU(0x03321025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800521A8u); -#endif -label_BFC3A1AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A1ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC3A1AC: 00408021 addu $s0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00408021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800521ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521B0u); -#endif - /* 0xBFC3A1B0: 8E030000 lw $v1, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } - PGXP_LOAD(0x8E030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800521B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A1B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800521B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3A1B8: 00032200 sll $a0, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 8u; - PGXP_ALU(0x00032200u, cpu->gpr[4], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800521B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A1BC: 00042202 srl $a0, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 8u; - PGXP_ALU(0x00042202u, cpu->gpr[4], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x800521BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC3A1C0: 16C4FFD4 bne $s6, $a0, 0xBFC3A114 */ - uint32_t psx_brA_BFC3A1C0 = cpu->gpr[22]; uint32_t psx_brB_BFC3A1C0 = cpu->gpr[4]; - psx_taken_BFC3A1C0 = (psx_brA_BFC3A1C0 != psx_brB_BFC3A1C0); - psx_delay_BFC3A1C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3A1C4: 00037E02 srl $t7, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] >> 24u; - PGXP_ALU(0x00037E02u, cpu->gpr[15], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x800521C4u); -#endif - if (psx_delay_BFC3A1C0) { - psx_delay_BFC3A1C0 = 0; - if (psx_taken_BFC3A1C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052114u); - goto label_BFC3A114; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800521C8u); - } -label_BFC3A1C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A1C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521C8u); -#endif - /* 0xBFC3A1C8: 8FB20034 lw $s2, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521C8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20034u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800521C8u); -#endif - /* 0xBFC3A1CC: 8FB30030 lw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521CCu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800521CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521D0u); -#endif - /* 0xBFC3A1D0: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521D0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800521D0u); -#endif - /* 0xBFC3A1D4: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521D4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800521D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A1D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800521D8u); -#endif -label_BFC3A1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A1DC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800521DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A1E0: 248495B4 addiu $a0, $a0, -27212 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27212)); - PGXP_ALU(0x248495B4u, cpu->gpr[4], _pgx1, 0xFFFF95B4u); } -#ifdef PSX_COSIM - cosim_instr(0x800521E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A1E4: 0C01488A jal 0xB0052228 */ - cpu->gpr[31] = 0x800521ECu; /* jal link before delay slot */ - psx_delay_BFC3A1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC3A1E8: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800521E8u); -#endif - if (psx_delay_BFC3A1E4) { - psx_delay_BFC3A1E4 = 0; - cpu->gpr[31] = 0x800521ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052228u); - cpu->pc = 0x80052228u; return; - } -label_BFC3A1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521ECu); -#endif - /* 0xBFC3A1EC: 92040007 lbu $a0, 7($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 4, 0x10000u); - PGXP_LOAD(0x92040007u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800521ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A1F0: 0C0147CC jal 0xB0051F30 */ - cpu->gpr[31] = 0x800521F8u; /* jal link before delay slot */ - psx_delay_BFC3A1F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A1F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800521F4u); -#endif - if (psx_delay_BFC3A1F0) { - psx_delay_BFC3A1F0 = 0; - cpu->gpr[31] = 0x800521F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F30u); - cpu->pc = 0x80051F30u; return; - } -label_BFC3A1F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A1F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800521F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A1F8: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800521F8u); -#endif - /* 0xBFC3A1FC: 8D0892F8 lw $t0, -27912($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800521FCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0892F8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800521FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A200: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A204: 248495C0 addiu $a0, $a0, -27200 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27200)); - PGXP_ALU(0x248495C0u, cpu->gpr[4], _pgx1, 0xFFFF95C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80052204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000100u); -#endif - /* 0xBFC3A208: 0100F809 jalr $ra, $t0 */ - cpu->gpr[31] = 0x80052210u; /* jalr link before delay slot */ - psx_delay_BFC3A208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3A20C: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005220Cu); -#endif - if (psx_delay_BFC3A208) { - psx_delay_BFC3A208 = 0; - { uint32_t _t = cpu->gpr[8]; - cpu->gpr[31] = 0x80052210u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3A210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052210u); -#endif - /* 0xBFC3A210: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052210u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80052210u); -#endif - /* 0xBFC3A214: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052214u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052214u); -#endif - /* 0xBFC3A218: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052218u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052218u); -#endif - /* 0xBFC3A21C: 8FB60020 lw $s6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005221Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60020u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8005221Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A220: 03E00008 jr $ra */ - psx_delay_BFC3A220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A224: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80052224u); -#endif - if (psx_delay_BFC3A220) { - psx_delay_BFC3A220 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A228(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A228u); - int psx_delay_BFC3A23C = 0; - int psx_delay_BFC3A248 = 0; - int psx_taken_BFC3A248 = 0; - int psx_delay_BFC3A260 = 0; - int psx_taken_BFC3A260 = 0; - int psx_delay_BFC3A26C = 0; - int psx_delay_BFC3A29C = 0; - int psx_delay_BFC3A2A4 = 0; - int psx_taken_BFC3A2A4 = 0; - int psx_delay_BFC3A2B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A244u: goto label_BFC3A244; - case 0xBFC3A250u: goto label_BFC3A250; - case 0xBFC3A268u: goto label_BFC3A268; - case 0xBFC3A274u: goto label_BFC3A274; - case 0xBFC3A2A4u: goto label_BFC3A2A4; - case 0xBFC3A2ACu: goto label_BFC3A2AC; - case 0xBFC3A2B0u: goto label_BFC3A2B0; - default: break; - } - } -label_BFC3A228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A228: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3A22C: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005222Cu); return; } g_debug_last_store_pc = 0x8005222Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005222Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3A230: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052230u); return; } g_debug_last_store_pc = 0x80052230u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x61u); -#endif - /* 0xBFC3A234: 00A03021 addu $a2, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A03021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052234u); -#endif - /* 0xBFC3A238: 90C40007 lbu $a0, 7($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 7; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (7)), 4, 0x40u); - PGXP_LOAD(0x90C40007u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A23C: 0C0147E4 jal 0xB0051F90 */ - cpu->gpr[31] = 0x80052244u; /* jal link before delay slot */ - psx_delay_BFC3A23C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3A240: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052240u); return; } g_debug_last_store_pc = 0x80052240u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052240u); -#endif - if (psx_delay_BFC3A23C) { - psx_delay_BFC3A23C = 0; - cpu->gpr[31] = 0x80052244u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F90u); - cpu->pc = 0x80051F90u; return; - } -label_BFC3A244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052244u); -#endif - /* 0xBFC3A244: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052244u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A248: 10400018 beq $v0, $zero, 0xBFC3A2AC */ - uint32_t psx_brA_BFC3A248 = cpu->gpr[2]; uint32_t psx_brB_BFC3A248 = cpu->gpr[0]; - psx_taken_BFC3A248 = (psx_brA_BFC3A248 == psx_brB_BFC3A248); - psx_delay_BFC3A248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A24C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005224Cu); -#endif - if (psx_delay_BFC3A248) { - psx_delay_BFC3A248 = 0; - if (psx_taken_BFC3A248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800522ACu); - goto label_BFC3A2AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052250u); - } -label_BFC3A250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052250u); -#endif - /* 0xBFC3A250: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052250u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3A258: 000E7E02 srl $t7, $t6, 24 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] >> 24u; - PGXP_ALU(0x000E7E02u, cpu->gpr[15], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3A25C: 31F800FF andi $t8, $t7, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFu; - PGXP_ALU(0x31F800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005225Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3A260: 10580013 beq $v0, $t8, 0xBFC3A2B0 */ - uint32_t psx_brA_BFC3A260 = cpu->gpr[2]; uint32_t psx_brB_BFC3A260 = cpu->gpr[24]; - psx_taken_BFC3A260 = (psx_brA_BFC3A260 == psx_brB_BFC3A260); - psx_delay_BFC3A260 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A264: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052264u); -#endif - if (psx_delay_BFC3A260) { - psx_delay_BFC3A260 = 0; - if (psx_taken_BFC3A260) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800522B0u); - goto label_BFC3A2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052268u); - } -label_BFC3A268: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A268u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052268u); -#endif - /* 0xBFC3A268: 90C40007 lbu $a0, 7($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 7; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (7)), 4, 0x40u); - PGXP_LOAD(0x90C40007u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A26C: 0C0147CC jal 0xB0051F30 */ - cpu->gpr[31] = 0x80052274u; /* jal link before delay slot */ - psx_delay_BFC3A26C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3A270: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052270u); return; } g_debug_last_store_pc = 0x80052270u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052270u); -#endif - if (psx_delay_BFC3A26C) { - psx_delay_BFC3A26C = 0; - cpu->gpr[31] = 0x80052274u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80051F30u); - cpu->pc = 0x80051F30u; return; - } -label_BFC3A274: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A274u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052274u); -#endif - /* 0xBFC3A274: 8FA6002C lw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052274u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3A278: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052278u); -#endif - /* 0xBFC3A27C: 8CD90000 lw $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005227Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x8CD90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005227Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052280u); -#endif - /* 0xBFC3A280: 8D4A92F8 lw $t2, -27912($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052280u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A92F8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3A284: 00194602 srl $t0, $t9, 24 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] >> 24u; - PGXP_ALU(0x00194602u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3A288: 310900FF andi $t1, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A28C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005228Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052290u); -#endif - /* 0xBFC3A290: 8FA50028 lw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052290u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A294: 248495C8 addiu $a0, $a0, -27192 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27192)); - PGXP_ALU(0x248495C8u, cpu->gpr[4], _pgx1, 0xFFFF95C8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3A298: AFA90010 sw $t1, 16($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052298u); return; } g_debug_last_store_pc = 0x80052298u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000400u); -#endif - /* 0xBFC3A29C: 0140F809 jalr $ra, $t2 */ - cpu->gpr[31] = 0x800522A4u; /* jalr link before delay slot */ - psx_delay_BFC3A29C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC3A2A0: 00403821 addu $a3, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800522A0u); -#endif - if (psx_delay_BFC3A29C) { - psx_delay_BFC3A29C = 0; - { uint32_t _t = cpu->gpr[10]; - cpu->gpr[31] = 0x800522A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC3A2A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A2A4: 10000002 beq $zero, $zero, 0xBFC3A2B0 */ - uint32_t psx_brA_BFC3A2A4 = cpu->gpr[0]; uint32_t psx_brB_BFC3A2A4 = cpu->gpr[0]; - psx_taken_BFC3A2A4 = (psx_brA_BFC3A2A4 == psx_brB_BFC3A2A4); - psx_delay_BFC3A2A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A2A8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800522A8u); -#endif - if (psx_delay_BFC3A2A4) { - psx_delay_BFC3A2A4 = 0; - if (psx_taken_BFC3A2A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800522B0u); - goto label_BFC3A2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800522ACu); - } -label_BFC3A2AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A2AC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800522ACu); -#endif -label_BFC3A2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522B0u); -#endif - /* 0xBFC3A2B0: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800522B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800522B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A2B4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x800522B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A2B8: 03E00008 jr $ra */ - psx_delay_BFC3A2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A2BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800522BCu); -#endif - if (psx_delay_BFC3A2B8) { - psx_delay_BFC3A2B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A2C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A2C0u); - int psx_delay_BFC3A2CC = 0; - int psx_delay_BFC3A2EC = 0; - int psx_delay_BFC3A314 = 0; - int psx_taken_BFC3A314 = 0; - int psx_delay_BFC3A32C = 0; - int psx_taken_BFC3A32C = 0; - int psx_delay_BFC3A334 = 0; - int psx_taken_BFC3A334 = 0; - int psx_delay_BFC3A350 = 0; - int psx_taken_BFC3A350 = 0; - int psx_delay_BFC3A3B0 = 0; - int psx_taken_BFC3A3B0 = 0; - int psx_delay_BFC3A3EC = 0; - int psx_taken_BFC3A3EC = 0; - int psx_delay_BFC3A444 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A2D4u: goto label_BFC3A2D4; - case 0xBFC3A2F4u: goto label_BFC3A2F4; - case 0xBFC3A308u: goto label_BFC3A308; - case 0xBFC3A31Cu: goto label_BFC3A31C; - case 0xBFC3A334u: goto label_BFC3A334; - case 0xBFC3A33Cu: goto label_BFC3A33C; - case 0xBFC3A340u: goto label_BFC3A340; - case 0xBFC3A344u: goto label_BFC3A344; - case 0xBFC3A358u: goto label_BFC3A358; - case 0xBFC3A36Cu: goto label_BFC3A36C; - case 0xBFC3A3B8u: goto label_BFC3A3B8; - case 0xBFC3A3BCu: goto label_BFC3A3BC; - case 0xBFC3A3CCu: goto label_BFC3A3CC; - case 0xBFC3A3F4u: goto label_BFC3A3F4; - default: break; - } - } -label_BFC3A2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A2C0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800522C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3A2C4: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800522C4u); return; } g_debug_last_store_pc = 0x800522C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800522C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3A2C8: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800522C8u); return; } g_debug_last_store_pc = 0x800522C8u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800522C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A2CC: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x800522D4u; /* jal link before delay slot */ - psx_delay_BFC3A2CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A2D0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800522D0u); -#endif - if (psx_delay_BFC3A2CC) { - psx_delay_BFC3A2CC = 0; - cpu->gpr[31] = 0x800522D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3A2D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A2D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800522D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A2D8: A4209780 sh $zero, -26752($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -26752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-26752)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800522D8u); return; } g_debug_last_store_pc = 0x800522D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209780u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800522D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A2DC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800522DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A2E0: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800522E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A2E4: A420EDB8 sh $zero, -4680($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4680; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4680)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800522E4u); return; } g_debug_last_store_pc = 0x800522E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420EDB8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800522E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A2E8: 24A5EE10 addiu $a1, $a1, -4592 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4592)); - PGXP_ALU(0x24A5EE10u, cpu->gpr[5], _pgx1, 0xFFFFEE10u); } -#ifdef PSX_COSIM - cosim_instr(0x800522E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3A2EC: 0C0158C9 jal 0xB0056324 */ - cpu->gpr[31] = 0x800522F4u; /* jal link before delay slot */ - psx_delay_BFC3A2EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A2F0: 24040020 addiu $a0, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24040020u, cpu->gpr[4], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800522F0u); -#endif - if (psx_delay_BFC3A2EC) { - psx_delay_BFC3A2EC = 0; - cpu->gpr[31] = 0x800522F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056324u); - cpu->pc = 0x80056324u; return; - } -label_BFC3A2F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A2F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A2F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800522F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A2F4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800522F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A2F8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800522F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A2FC: A420EDB0 sh $zero, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800522FCu); return; } g_debug_last_store_pc = 0x800522FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420EDB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800522FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A300: 2442EDB2 addiu $v0, $v0, -4686 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4686)); - PGXP_ALU(0x2442EDB2u, cpu->gpr[2], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A304: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052304u); -#endif -label_BFC3A308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC3A308: 00447021 addu $t6, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[2] + cpu->gpr[4]; - PGXP_ALU(0x00447021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A30C: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005230Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A310: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A314: 1080FFFC beq $a0, $zero, 0xBFC3A308 */ - uint32_t psx_brA_BFC3A314 = cpu->gpr[4]; uint32_t psx_brB_BFC3A314 = cpu->gpr[0]; - psx_taken_BFC3A314 = (psx_brA_BFC3A314 == psx_brB_BFC3A314); - psx_delay_BFC3A314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3A318: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052318u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052318u); -#endif - if (psx_delay_BFC3A314) { - psx_delay_BFC3A314 = 0; - if (psx_taken_BFC3A314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052308u); - goto label_BFC3A308; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005231Cu); - } -label_BFC3A31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005231Cu); -#endif - /* 0xBFC3A31C: 83A20020 lb $v0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 2, 0x20000000u); - PGXP_LOAD(0x83A20020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A324: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A328: 2C410018 sltiu $at, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000018u ? 1 : 0); - PGXP_ALU(0x2C410018u, cpu->gpr[1], _pgx1, 0x0018u); } -#ifdef PSX_COSIM - cosim_instr(0x80052328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A32C: 14200004 bne $at, $zero, 0xBFC3A340 */ - uint32_t psx_brA_BFC3A32C = cpu->gpr[1]; uint32_t psx_brB_BFC3A32C = cpu->gpr[0]; - psx_taken_BFC3A32C = (psx_brA_BFC3A32C != psx_brB_BFC3A32C); - psx_delay_BFC3A32C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A330: 00021E00 sll $v1, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021E00u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052330u); -#endif - if (psx_delay_BFC3A32C) { - psx_delay_BFC3A32C = 0; - if (psx_taken_BFC3A32C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052340u); - goto label_BFC3A340; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052334u); - } -label_BFC3A334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A334: 10000003 beq $zero, $zero, 0xBFC3A344 */ - uint32_t psx_brA_BFC3A334 = cpu->gpr[0]; uint32_t psx_brB_BFC3A334 = cpu->gpr[0]; - psx_taken_BFC3A334 = (psx_brA_BFC3A334 == psx_brB_BFC3A334); - psx_delay_BFC3A334 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A338: 24030018 addiu $v1, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24030018u, cpu->gpr[3], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80052338u); -#endif - if (psx_delay_BFC3A334) { - psx_delay_BFC3A334 = 0; - if (psx_taken_BFC3A334) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052344u); - goto label_BFC3A344; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005233Cu); - } -label_BFC3A33C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A33Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005233Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A33C: 00021E00 sll $v1, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021E00u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x8005233Cu); -#endif -label_BFC3A340: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A340u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A340: 00031E03 sra $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 24u); - PGXP_ALU(0x00031E03u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052340u); -#endif -label_BFC3A344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC3A344: 00603821 addu $a3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A348: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3A34C: A023EA60 sb $v1, -5536($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -5536; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005234Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-5536)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EA60u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005234Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3A350: 10E0001A beq $a3, $zero, 0xBFC3A3BC */ - uint32_t psx_brA_BFC3A350 = cpu->gpr[7]; uint32_t psx_brB_BFC3A350 = cpu->gpr[0]; - psx_taken_BFC3A350 = (psx_brA_BFC3A350 == psx_brB_BFC3A350); - psx_delay_BFC3A350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A354: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052354u); -#endif - if (psx_delay_BFC3A350) { - psx_delay_BFC3A350 = 0; - if (psx_taken_BFC3A350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800523BCu); - goto label_BFC3A3BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052358u); - } -label_BFC3A358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A358: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A35C: 24A5EA68 addiu $a1, $a1, -5528 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-5528)); - PGXP_ALU(0x24A5EA68u, cpu->gpr[5], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x8005235Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A360: 240300FF addiu $v1, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240300FFu, cpu->gpr[3], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3A364: 24060018 addiu $a2, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24060018u, cpu->gpr[6], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80052364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3A368: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052368u); -#endif -label_BFC3A36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005236Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3A36C: 01E47823 subu $t7, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[4]; - PGXP_ALU(0x01E47823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005236Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3A370: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8024u); -#endif - /* 0xBFC3A374: 00AF1021 addu $v0, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC3A378: A4460002 sh $a2, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052378u); return; } g_debug_last_store_pc = 0x80052378u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4460002u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A37C: A4430000 sh $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005237Cu); return; } g_debug_last_store_pc = 0x8005237Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005237Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A380: A0400017 sb $zero, 23($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052380u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (23)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400017u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A384: A4400004 sh $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052384u); return; } g_debug_last_store_pc = 0x80052384u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A388: A4400006 sh $zero, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052388u); return; } g_debug_last_store_pc = 0x80052388u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400006u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A38C: A443000A sh $v1, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005238Cu); return; } g_debug_last_store_pc = 0x8005238Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA443000Au, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005238Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A390: A440000C sh $zero, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052390u); return; } g_debug_last_store_pc = 0x80052390u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440000Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A394: A440000E sh $zero, 14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052394u); return; } g_debug_last_store_pc = 0x80052394u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440000Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A398: A4430010 sh $v1, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052398u); return; } g_debug_last_store_pc = 0x80052398u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430010u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80052398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A39C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005239Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3A3A0: A424EDF0 sh $a0, -4624($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4624; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523A0u); return; } g_debug_last_store_pc = 0x800523A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA424EDF0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800523A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A3A4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800523A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A3A8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800523A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x92u); -#endif - /* 0xBFC3A3AC: 0087082B sltu $at, $a0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x0087082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800523ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A3B0: 1420FFEE bne $at, $zero, 0xBFC3A36C */ - uint32_t psx_brA_BFC3A3B0 = cpu->gpr[1]; uint32_t psx_brB_BFC3A3B0 = cpu->gpr[0]; - psx_taken_BFC3A3B0 = (psx_brA_BFC3A3B0 != psx_brB_BFC3A3B0); - psx_delay_BFC3A3B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3A3B4: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800523B4u); -#endif - if (psx_delay_BFC3A3B0) { - psx_delay_BFC3A3B0 = 0; - if (psx_taken_BFC3A3B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005236Cu); - goto label_BFC3A36C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800523B8u); - } -label_BFC3A3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A3B8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800523B8u); -#endif -label_BFC3A3BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A3BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A3BC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800523BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A3C0: 24A5ECA8 addiu $a1, $a1, -4952 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4952)); - PGXP_ALU(0x24A5ECA8u, cpu->gpr[5], _pgx1, 0xFFFFECA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800523C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A3C4: 2403007F addiu $v1, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2403007Fu, cpu->gpr[3], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800523C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3A3C8: 24060040 addiu $a2, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24060040u, cpu->gpr[6], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800523C8u); -#endif -label_BFC3A3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC3A3CC: 0004C0C0 sll $t8, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 3u; - PGXP_ALU(0x0004C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800523CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000024u); -#endif - /* 0xBFC3A3D0: 00B81021 addu $v0, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800523D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A3D4: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800523D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A3D8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800523D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A3DC: A4430000 sh $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523DCu); return; } g_debug_last_store_pc = 0x800523DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800523DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3A3E0: 2C810021 sltiu $at, $a0, 33 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00000021u ? 1 : 0); - PGXP_ALU(0x2C810021u, cpu->gpr[1], _pgx1, 0x0021u); } -#ifdef PSX_COSIM - cosim_instr(0x800523E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A3E4: A4430002 sh $v1, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523E4u); return; } g_debug_last_store_pc = 0x800523E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430002u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800523E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3A3E8: A4430004 sh $v1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523E8u); return; } g_debug_last_store_pc = 0x800523E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA4430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800523E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A3EC: 1420FFF7 bne $at, $zero, 0xBFC3A3CC */ - uint32_t psx_brA_BFC3A3EC = cpu->gpr[1]; uint32_t psx_brB_BFC3A3EC = cpu->gpr[0]; - psx_taken_BFC3A3EC = (psx_brA_BFC3A3EC != psx_brB_BFC3A3EC); - psx_delay_BFC3A3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC3A3F0: A4460006 sh $a2, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523F0u); return; } g_debug_last_store_pc = 0x800523F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4460006u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800523F0u); -#endif - if (psx_delay_BFC3A3EC) { - psx_delay_BFC3A3EC = 0; - if (psx_taken_BFC3A3EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800523CCu); - goto label_BFC3A3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800523F4u); - } -label_BFC3A3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800523F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A3F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800523F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A3F8: A4209F0C sh $zero, -24820($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800523F8u); return; } g_debug_last_store_pc = 0x800523F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F0Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800523F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A3FC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800523FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A400: A4209F0E sh $zero, -24818($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24818; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052400u); return; } g_debug_last_store_pc = 0x80052400u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F0Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A404: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A408: A4209F10 sh $zero, -24816($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052408u); return; } g_debug_last_store_pc = 0x80052408u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F10u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A40C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005240Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A410: A4209F14 sh $zero, -24812($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052410u); return; } g_debug_last_store_pc = 0x80052410u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F14u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A414: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A418: A4209F16 sh $zero, -24810($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24810; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052418u); return; } g_debug_last_store_pc = 0x80052418u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F16u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A41C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005241Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A420: AC20EDC0 sw $zero, -4672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052420u); return; } g_debug_last_store_pc = 0x80052420u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EDC0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A424: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3A428: 24193FFF addiu $t9, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24193FFFu, cpu->gpr[25], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3A42C: 24083FFF addiu $t0, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24083FFFu, cpu->gpr[8], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005242Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052430u); -#endif - /* 0xBFC3A430: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052430u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80052430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3A434: A439EDC8 sh $t9, -4664($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4664)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052434u); return; } g_debug_last_store_pc = 0x80052434u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439EDC8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3A438: A428EDCA sh $t0, -4662($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4662; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4662)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052438u); return; } g_debug_last_store_pc = 0x80052438u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA428EDCAu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A43C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005243Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A440: AC20EDC4 sw $zero, -4668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052440u); return; } g_debug_last_store_pc = 0x80052440u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EDC4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A444: 03E00008 jr $ra */ - psx_delay_BFC3A444 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A448: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80052448u); -#endif - if (psx_delay_BFC3A444) { - psx_delay_BFC3A444 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A44C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A44Cu); - int psx_delay_BFC3A478 = 0; - int psx_taken_BFC3A478 = 0; - int psx_delay_BFC3A490 = 0; - int psx_taken_BFC3A490 = 0; - int psx_delay_BFC3A4C4 = 0; - int psx_taken_BFC3A4C4 = 0; - int psx_delay_BFC3A4D4 = 0; - int psx_taken_BFC3A4D4 = 0; - int psx_delay_BFC3A4DC = 0; - int psx_taken_BFC3A4DC = 0; - int psx_delay_BFC3A4F0 = 0; - int psx_taken_BFC3A4F0 = 0; - int psx_delay_BFC3A500 = 0; - int psx_taken_BFC3A500 = 0; - int psx_delay_BFC3A508 = 0; - int psx_taken_BFC3A508 = 0; - int psx_delay_BFC3A510 = 0; - int psx_taken_BFC3A510 = 0; - int psx_delay_BFC3A51C = 0; - int psx_taken_BFC3A51C = 0; - int psx_delay_BFC3A524 = 0; - int psx_taken_BFC3A524 = 0; - int psx_delay_BFC3A538 = 0; - int psx_taken_BFC3A538 = 0; - int psx_delay_BFC3A548 = 0; - int psx_taken_BFC3A548 = 0; - int psx_delay_BFC3A558 = 0; - int psx_taken_BFC3A558 = 0; - int psx_delay_BFC3A560 = 0; - int psx_taken_BFC3A560 = 0; - int psx_delay_BFC3A574 = 0; - int psx_taken_BFC3A574 = 0; - int psx_delay_BFC3A598 = 0; - int psx_taken_BFC3A598 = 0; - int psx_delay_BFC3A5A0 = 0; - int psx_taken_BFC3A5A0 = 0; - int psx_delay_BFC3A5A8 = 0; - int psx_taken_BFC3A5A8 = 0; - int psx_delay_BFC3A5B0 = 0; - int psx_taken_BFC3A5B0 = 0; - int psx_delay_BFC3A5B8 = 0; - int psx_taken_BFC3A5B8 = 0; - int psx_delay_BFC3A5C8 = 0; - int psx_taken_BFC3A5C8 = 0; - int psx_delay_BFC3A5EC = 0; - int psx_taken_BFC3A5EC = 0; - int psx_delay_BFC3A600 = 0; - int psx_taken_BFC3A600 = 0; - int psx_delay_BFC3A61C = 0; - int psx_taken_BFC3A61C = 0; - int psx_delay_BFC3A630 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A480u: goto label_BFC3A480; - case 0xBFC3A498u: goto label_BFC3A498; - case 0xBFC3A4ACu: goto label_BFC3A4AC; - case 0xBFC3A4CCu: goto label_BFC3A4CC; - case 0xBFC3A4DCu: goto label_BFC3A4DC; - case 0xBFC3A4E4u: goto label_BFC3A4E4; - case 0xBFC3A4F8u: goto label_BFC3A4F8; - case 0xBFC3A508u: goto label_BFC3A508; - case 0xBFC3A510u: goto label_BFC3A510; - case 0xBFC3A518u: goto label_BFC3A518; - case 0xBFC3A524u: goto label_BFC3A524; - case 0xBFC3A52Cu: goto label_BFC3A52C; - case 0xBFC3A540u: goto label_BFC3A540; - case 0xBFC3A550u: goto label_BFC3A550; - case 0xBFC3A560u: goto label_BFC3A560; - case 0xBFC3A568u: goto label_BFC3A568; - case 0xBFC3A57Cu: goto label_BFC3A57C; - case 0xBFC3A584u: goto label_BFC3A584; - case 0xBFC3A5A0u: goto label_BFC3A5A0; - case 0xBFC3A5A8u: goto label_BFC3A5A8; - case 0xBFC3A5B0u: goto label_BFC3A5B0; - case 0xBFC3A5B8u: goto label_BFC3A5B8; - case 0xBFC3A5C0u: goto label_BFC3A5C0; - case 0xBFC3A5C4u: goto label_BFC3A5C4; - case 0xBFC3A5D0u: goto label_BFC3A5D0; - case 0xBFC3A5D4u: goto label_BFC3A5D4; - case 0xBFC3A5F4u: goto label_BFC3A5F4; - case 0xBFC3A608u: goto label_BFC3A608; - case 0xBFC3A610u: goto label_BFC3A610; - case 0xBFC3A624u: goto label_BFC3A624; - case 0xBFC3A628u: goto label_BFC3A628; - default: break; - } - } -label_BFC3A44C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A44Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005244Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3A44C: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005244Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052450u); -#endif - /* 0xBFC3A450: 8129EA60 lb $t1, -5536($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -5536; cpu->gpr[9] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (-5536)), 9, 0x200u); - PGXP_LOAD(0x8129EA60u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A454: 27BDFFF0 addiu $sp, $sp, -16 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-16)); - PGXP_ALU(0x27BDFFF0u, cpu->gpr[29], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x80052454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3A458: AFB00008 sw $s0, 8($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052458u); return; } g_debug_last_store_pc = 0x80052458u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3A45C: AFB1000C sw $s1, 12($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005245Cu); return; } g_debug_last_store_pc = 0x8005245Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1000Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005245Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3A460: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A464: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A468: 3404FFFF ori $a0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3404FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A46C: 3405FFFF ori $a1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005246Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3A470: 24060063 addiu $a2, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24060063u, cpu->gpr[6], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80052470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3A474: 24070063 addiu $a3, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24070063u, cpu->gpr[7], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80052474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3A478: 15200007 bne $t1, $zero, 0xBFC3A498 */ - uint32_t psx_brA_BFC3A478 = cpu->gpr[9]; uint32_t psx_brB_BFC3A478 = cpu->gpr[0]; - psx_taken_BFC3A478 = (psx_brA_BFC3A478 != psx_brB_BFC3A478); - psx_delay_BFC3A478 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3A47C: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005247Cu); -#endif - if (psx_delay_BFC3A478) { - psx_delay_BFC3A478 = 0; - if (psx_taken_BFC3A478) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052498u); - goto label_BFC3A498; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052480u); - } -label_BFC3A480: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A480u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3A480: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052480u); -#endif - /* 0xBFC3A484: 81ADEDE8 lb $t5, -4632($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4632; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-4632)), 13, 0x2000u); - PGXP_LOAD(0x81ADEDE8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3A488: 3C10800E lui $s0, 0x800E */ - cpu->gpr[16] = 0x800E0000u; - PGXP_ALU(0x3C10800Eu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3A48C: 2610EA68 addiu $s0, $s0, -5528 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-5528)); - PGXP_ALU(0x2610EA68u, cpu->gpr[16], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x8005248Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A490: 10000043 beq $zero, $zero, 0xBFC3A5A0 */ - uint32_t psx_brA_BFC3A490 = cpu->gpr[0]; uint32_t psx_brB_BFC3A490 = cpu->gpr[0]; - psx_taken_BFC3A490 = (psx_brA_BFC3A490 == psx_brB_BFC3A490); - psx_delay_BFC3A490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC3A494: 24110063 addiu $s1, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24110063u, cpu->gpr[17], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80052494u); -#endif - if (psx_delay_BFC3A490) { - psx_delay_BFC3A490 = 0; - if (psx_taken_BFC3A490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525A0u); - goto label_BFC3A5A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052498u); - } -label_BFC3A498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3A498: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3A49C: 3C10800E lui $s0, 0x800E */ - cpu->gpr[16] = 0x800E0000u; - PGXP_ALU(0x3C10800Eu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005249Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524A0u); -#endif - /* 0xBFC3A4A0: 81ADEDE8 lb $t5, -4632($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4632; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-4632)), 13, 0x2000u); - PGXP_LOAD(0x81ADEDE8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800524A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3A4A4: 2610EA68 addiu $s0, $s0, -5528 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-5528)); - PGXP_ALU(0x2610EA68u, cpu->gpr[16], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x800524A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC3A4A8: 24110063 addiu $s1, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24110063u, cpu->gpr[17], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x800524A8u); -#endif -label_BFC3A4AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A4ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC3A4AC: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800524ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC3A4B0: 01C87023 subu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[8]; - PGXP_ALU(0x01C87023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800524B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A4B4: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800524B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14400u); -#endif - /* 0xBFC3A4B8: 020E5021 addu $t2, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[10] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800524B8u); -#endif - /* 0xBFC3A4BC: 814F0017 lb $t7, 23($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 23; cpu->gpr[15] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (23)), 15, 0x400u); - PGXP_LOAD(0x814F0017u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800524BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3A4C4: 15E00017 bne $t7, $zero, 0xBFC3A524 */ - uint32_t psx_brA_BFC3A4C4 = cpu->gpr[15]; uint32_t psx_brB_BFC3A4C4 = cpu->gpr[0]; - psx_taken_BFC3A4C4 = (psx_brA_BFC3A4C4 != psx_brB_BFC3A4C4); - psx_delay_BFC3A4C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524C8u); -#endif - if (psx_delay_BFC3A4C4) { - psx_delay_BFC3A4C4 = 0; - if (psx_taken_BFC3A4C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052524u); - goto label_BFC3A524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524CCu); - } -label_BFC3A4CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A4CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524CCu); -#endif - /* 0xBFC3A4CC: 954B0006 lhu $t3, 6($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800524CCu); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x954B0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800524CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3A4D4: 15600003 bne $t3, $zero, 0xBFC3A4E4 */ - uint32_t psx_brA_BFC3A4D4 = cpu->gpr[11]; uint32_t psx_brB_BFC3A4D4 = cpu->gpr[0]; - psx_taken_BFC3A4D4 = (psx_brA_BFC3A4D4 != psx_brB_BFC3A4D4); - psx_delay_BFC3A4D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524D8u); -#endif - if (psx_delay_BFC3A4D4) { - psx_delay_BFC3A4D4 = 0; - if (psx_taken_BFC3A4D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524E4u); - goto label_BFC3A4E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524DCu); - } -label_BFC3A4DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A4DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4DC: 10000052 beq $zero, $zero, 0xBFC3A628 */ - uint32_t psx_brA_BFC3A4DC = cpu->gpr[0]; uint32_t psx_brB_BFC3A4DC = cpu->gpr[0]; - psx_taken_BFC3A4DC = (psx_brA_BFC3A4DC == psx_brB_BFC3A4DC); - psx_delay_BFC3A4DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC3A4E0: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800524E0u); -#endif - if (psx_delay_BFC3A4DC) { - psx_delay_BFC3A4DC = 0; - if (psx_taken_BFC3A4DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052628u); - goto label_BFC3A628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524E4u); - } -label_BFC3A4E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A4E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524E4u); -#endif - /* 0xBFC3A4E4: 854C0014 lh $t4, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800524E4u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x400u); } - PGXP_LOAD(0x854C0014u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800524E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC3A4EC: 0182082B sltu $at, $t4, $v0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0182082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800524ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A4F0: 10200005 beq $at, $zero, 0xBFC3A508 */ - uint32_t psx_brA_BFC3A4F0 = cpu->gpr[1]; uint32_t psx_brB_BFC3A4F0 = cpu->gpr[0]; - psx_taken_BFC3A4F0 = (psx_brA_BFC3A4F0 == psx_brB_BFC3A4F0); - psx_delay_BFC3A4F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A4F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800524F4u); -#endif - if (psx_delay_BFC3A4F0) { - psx_delay_BFC3A4F0 = 0; - if (psx_taken_BFC3A4F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052508u); - goto label_BFC3A508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524F8u); - } -label_BFC3A4F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A4F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800524F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3A4F8: 3182FFFF andi $v0, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[12] & 0xFFFFu; - PGXP_ALU(0x3182FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800524F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3A4FC: 3164FFFF andi $a0, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x3164FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800524FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A500: 10000020 beq $zero, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A500 = cpu->gpr[0]; uint32_t psx_brB_BFC3A500 = cpu->gpr[0]; - psx_taken_BFC3A500 = (psx_brA_BFC3A500 == psx_brB_BFC3A500); - psx_delay_BFC3A500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC3A504: 310600FF andi $a2, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310600FFu, cpu->gpr[6], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052504u); -#endif - if (psx_delay_BFC3A500) { - psx_delay_BFC3A500 = 0; - if (psx_taken_BFC3A500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052508u); - } -label_BFC3A508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3A508: 144C001E bne $v0, $t4, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A508 = cpu->gpr[2]; uint32_t psx_brB_BFC3A508 = cpu->gpr[12]; - psx_taken_BFC3A508 = (psx_brA_BFC3A508 != psx_brB_BFC3A508); - psx_delay_BFC3A508 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x812u); -#endif - /* 0xBFC3A50C: 0164082B sltu $at, $t3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0164082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005250Cu); -#endif - if (psx_delay_BFC3A508) { - psx_delay_BFC3A508 = 0; - if (psx_taken_BFC3A508) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052510u); - } -label_BFC3A510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A510: 1020001C beq $at, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A510 = cpu->gpr[1]; uint32_t psx_brB_BFC3A510 = cpu->gpr[0]; - psx_taken_BFC3A510 = (psx_brA_BFC3A510 == psx_brB_BFC3A510); - psx_delay_BFC3A510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052514u); -#endif - if (psx_delay_BFC3A510) { - psx_delay_BFC3A510 = 0; - if (psx_taken_BFC3A510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052518u); - } -label_BFC3A518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3A518: 3164FFFF andi $a0, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x3164FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A51C: 10000019 beq $zero, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A51C = cpu->gpr[0]; uint32_t psx_brB_BFC3A51C = cpu->gpr[0]; - psx_taken_BFC3A51C = (psx_brA_BFC3A51C == psx_brB_BFC3A51C); - psx_delay_BFC3A51C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC3A520: 310600FF andi $a2, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310600FFu, cpu->gpr[6], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052520u); -#endif - if (psx_delay_BFC3A51C) { - psx_delay_BFC3A51C = 0; - if (psx_taken_BFC3A51C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052524u); - } -label_BFC3A524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040u); -#endif - /* 0xBFC3A524: 14D10017 bne $a2, $s1, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A524 = cpu->gpr[6]; uint32_t psx_brB_BFC3A524 = cpu->gpr[17]; - psx_taken_BFC3A524 = (psx_brA_BFC3A524 != psx_brB_BFC3A524); - psx_delay_BFC3A524 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052528u); -#endif - if (psx_delay_BFC3A524) { - psx_delay_BFC3A524 = 0; - if (psx_taken_BFC3A524) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005252Cu); - } -label_BFC3A52C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A52Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A52Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005252Cu); -#endif - /* 0xBFC3A52C: 854B0014 lh $t3, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005252Cu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x854B0014u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005252Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2802u); -#endif - /* 0xBFC3A534: 01AB082A slt $at, $t5, $t3 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x01AB082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A538: 14200012 bne $at, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A538 = cpu->gpr[1]; uint32_t psx_brB_BFC3A538 = cpu->gpr[0]; - psx_taken_BFC3A538 = (psx_brA_BFC3A538 != psx_brB_BFC3A538); - psx_delay_BFC3A538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A53C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005253Cu); -#endif - if (psx_delay_BFC3A538) { - psx_delay_BFC3A538 = 0; - if (psx_taken_BFC3A538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052540u); - } -label_BFC3A540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC3A540: 01606021 addu $t4, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[11] + cpu->gpr[0]; - PGXP_ALU(0x01606021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100Au); -#endif - /* 0xBFC3A544: 0183082B sltu $at, $t4, $v1 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0183082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A548: 10200005 beq $at, $zero, 0xBFC3A560 */ - uint32_t psx_brA_BFC3A548 = cpu->gpr[1]; uint32_t psx_brB_BFC3A548 = cpu->gpr[0]; - psx_taken_BFC3A548 = (psx_brA_BFC3A548 == psx_brB_BFC3A548); - psx_delay_BFC3A548 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A54C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005254Cu); -#endif - if (psx_delay_BFC3A548) { - psx_delay_BFC3A548 = 0; - if (psx_taken_BFC3A548) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052560u); - goto label_BFC3A560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052550u); - } -label_BFC3A550: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A550u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052550u); -#endif - /* 0xBFC3A550: 95450006 lhu $a1, 6($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052550u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x400u); } - PGXP_LOAD(0x95450006u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3A554: 3183FFFF andi $v1, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[12] & 0xFFFFu; - PGXP_ALU(0x3183FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A558: 1000000A beq $zero, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A558 = cpu->gpr[0]; uint32_t psx_brB_BFC3A558 = cpu->gpr[0]; - psx_taken_BFC3A558 = (psx_brA_BFC3A558 == psx_brB_BFC3A558); - psx_delay_BFC3A558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3A55C: 310700FF andi $a3, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005255Cu); -#endif - if (psx_delay_BFC3A558) { - psx_delay_BFC3A558 = 0; - if (psx_taken_BFC3A558) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052560u); - } -label_BFC3A560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3A560: 146C0008 bne $v1, $t4, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A560 = cpu->gpr[3]; uint32_t psx_brB_BFC3A560 = cpu->gpr[12]; - psx_taken_BFC3A560 = (psx_brA_BFC3A560 != psx_brB_BFC3A560); - psx_delay_BFC3A560 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A564: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052564u); -#endif - if (psx_delay_BFC3A560) { - psx_delay_BFC3A560 = 0; - if (psx_taken_BFC3A560) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052568u); - } -label_BFC3A568: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A568u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052568u); -#endif - /* 0xBFC3A568: 954B0006 lhu $t3, 6($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052568u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x954B0006u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A56C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005256Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x822u); -#endif - /* 0xBFC3A570: 0165082B sltu $at, $t3, $a1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0165082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A574: 10200003 beq $at, $zero, 0xBFC3A584 */ - uint32_t psx_brA_BFC3A574 = cpu->gpr[1]; uint32_t psx_brB_BFC3A574 = cpu->gpr[0]; - psx_taken_BFC3A574 = (psx_brA_BFC3A574 == psx_brB_BFC3A574); - psx_delay_BFC3A574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A578: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052578u); -#endif - if (psx_delay_BFC3A574) { - psx_delay_BFC3A574 = 0; - if (psx_taken_BFC3A574) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052584u); - goto label_BFC3A584; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005257Cu); - } -label_BFC3A57C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A57Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005257Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3A57C: 3165FFFF andi $a1, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x3165FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005257Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3A580: 310700FF andi $a3, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052580u); -#endif -label_BFC3A584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052584u); -#endif - /* 0xBFC3A584: 85580002 lh $t8, 2($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052584u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x400u); } - PGXP_LOAD(0x85580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A588: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A58C: 310800FF andi $t0, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005258Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC3A590: 0109082B sltu $at, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0109082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3A594: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A598: 1420FFC4 bne $at, $zero, 0xBFC3A4AC */ - uint32_t psx_brA_BFC3A598 = cpu->gpr[1]; uint32_t psx_brB_BFC3A598 = cpu->gpr[0]; - psx_taken_BFC3A598 = (psx_brA_BFC3A598 != psx_brB_BFC3A598); - psx_delay_BFC3A598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3A59C: A5590002 sh $t9, 2($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005259Cu); return; } g_debug_last_store_pc = 0x8005259Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA5590002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005259Cu); -#endif - if (psx_delay_BFC3A598) { - psx_delay_BFC3A598 = 0; - if (psx_taken_BFC3A598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800524ACu); - goto label_BFC3A4AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525A0u); - } -label_BFC3A5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040u); -#endif - /* 0xBFC3A5A0: 10D10003 beq $a2, $s1, 0xBFC3A5B0 */ - uint32_t psx_brA_BFC3A5A0 = cpu->gpr[6]; uint32_t psx_brB_BFC3A5A0 = cpu->gpr[17]; - psx_taken_BFC3A5A0 = (psx_brA_BFC3A5A0 == psx_brB_BFC3A5A0); - psx_delay_BFC3A5A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800525A4u); -#endif - if (psx_delay_BFC3A5A0) { - psx_delay_BFC3A5A0 = 0; - if (psx_taken_BFC3A5A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525B0u); - goto label_BFC3A5B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525A8u); - } -label_BFC3A5A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5A8: 1000001F beq $zero, $zero, 0xBFC3A628 */ - uint32_t psx_brA_BFC3A5A8 = cpu->gpr[0]; uint32_t psx_brB_BFC3A5A8 = cpu->gpr[0]; - psx_taken_BFC3A5A8 = (psx_brA_BFC3A5A8 == psx_brB_BFC3A5A8); - psx_delay_BFC3A5A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC3A5AC: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525ACu); -#endif - if (psx_delay_BFC3A5A8) { - psx_delay_BFC3A5A8 = 0; - if (psx_taken_BFC3A5A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052628u); - goto label_BFC3A628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525B0u); - } -label_BFC3A5B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080u); -#endif - /* 0xBFC3A5B0: 10F10004 beq $a3, $s1, 0xBFC3A5C4 */ - uint32_t psx_brA_BFC3A5B0 = cpu->gpr[7]; uint32_t psx_brB_BFC3A5B0 = cpu->gpr[17]; - psx_taken_BFC3A5B0 = (psx_brA_BFC3A5B0 == psx_brB_BFC3A5B0); - psx_delay_BFC3A5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A5B4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525B4u); -#endif - if (psx_delay_BFC3A5B0) { - psx_delay_BFC3A5B0 = 0; - if (psx_taken_BFC3A5B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525C4u); - goto label_BFC3A5C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525B8u); - } -label_BFC3A5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5B8: 1000001B beq $zero, $zero, 0xBFC3A628 */ - uint32_t psx_brA_BFC3A5B8 = cpu->gpr[0]; uint32_t psx_brB_BFC3A5B8 = cpu->gpr[0]; - psx_taken_BFC3A5B8 = (psx_brA_BFC3A5B8 == psx_brB_BFC3A5B8); - psx_delay_BFC3A5B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC3A5BC: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525BCu); -#endif - if (psx_delay_BFC3A5B8) { - psx_delay_BFC3A5B8 = 0; - if (psx_taken_BFC3A5B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052628u); - goto label_BFC3A628; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525C0u); - } -label_BFC3A5C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A5C0: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525C0u); -#endif -label_BFC3A5C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC3A5C4: 312700FF andi $a3, $t1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[7] = cpu->gpr[9] & 0xFFu; - PGXP_ALU(0x312700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800525C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3A5C8: 11200016 beq $t1, $zero, 0xBFC3A624 */ - uint32_t psx_brA_BFC3A5C8 = cpu->gpr[9]; uint32_t psx_brB_BFC3A5C8 = cpu->gpr[0]; - psx_taken_BFC3A5C8 = (psx_brA_BFC3A5C8 == psx_brB_BFC3A5C8); - psx_delay_BFC3A5C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3A5CC: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525CCu); -#endif - if (psx_delay_BFC3A5C8) { - psx_delay_BFC3A5C8 = 0; - if (psx_taken_BFC3A5C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052624u); - goto label_BFC3A624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525D0u); - } -label_BFC3A5D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC3A5D0: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800525D0u); -#endif -label_BFC3A5D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC3A5D4: 01C87023 subu $t6, $t6, $t0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[8]; - PGXP_ALU(0x01C87023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A5D8: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800525D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14400u); -#endif - /* 0xBFC3A5DC: 020E5021 addu $t2, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[10] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E5021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525E0u); -#endif - /* 0xBFC3A5E0: 854F0014 lh $t7, 20($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800525E0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x400u); } - PGXP_LOAD(0x854F0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800525E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800525E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA002u); -#endif - /* 0xBFC3A5E8: 01AF082A slt $at, $t5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x01AF082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A5EC: 14200008 bne $at, $zero, 0xBFC3A610 */ - uint32_t psx_brA_BFC3A5EC = cpu->gpr[1]; uint32_t psx_brB_BFC3A5EC = cpu->gpr[0]; - psx_taken_BFC3A5EC = (psx_brA_BFC3A5EC != psx_brB_BFC3A5EC); - psx_delay_BFC3A5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800525F0u); -#endif - if (psx_delay_BFC3A5EC) { - psx_delay_BFC3A5EC = 0; - if (psx_taken_BFC3A5EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052610u); - goto label_BFC3A610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525F4u); - } -label_BFC3A5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800525F4u); -#endif - /* 0xBFC3A5F4: 85420002 lh $v0, 2($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800525F4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x400u); } - PGXP_LOAD(0x85420002u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800525F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A5F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800525F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x26u); -#endif - /* 0xBFC3A5FC: 00A2082B sltu $at, $a1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x00A2082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800525FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A600: 10200003 beq $at, $zero, 0xBFC3A610 */ - uint32_t psx_brA_BFC3A600 = cpu->gpr[1]; uint32_t psx_brB_BFC3A600 = cpu->gpr[0]; - psx_taken_BFC3A600 = (psx_brA_BFC3A600 == psx_brB_BFC3A600); - psx_delay_BFC3A600 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052604u); -#endif - if (psx_delay_BFC3A600) { - psx_delay_BFC3A600 = 0; - if (psx_taken_BFC3A600) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052610u); - goto label_BFC3A610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052608u); - } -label_BFC3A608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3A608: 3045FFFF andi $a1, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3A60C: 310700FF andi $a3, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310700FFu, cpu->gpr[7], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005260Cu); -#endif -label_BFC3A610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A610: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A614: 310800FF andi $t0, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310800FFu, cpu->gpr[8], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC3A618: 0109082B sltu $at, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0109082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A61C: 1420FFED bne $at, $zero, 0xBFC3A5D4 */ - uint32_t psx_brA_BFC3A61C = cpu->gpr[1]; uint32_t psx_brB_BFC3A61C = cpu->gpr[0]; - psx_taken_BFC3A61C = (psx_brA_BFC3A61C != psx_brB_BFC3A61C); - psx_delay_BFC3A61C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4100u); -#endif - /* 0xBFC3A620: 00087080 sll $t6, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[8] << 2u; - PGXP_ALU(0x00087080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052620u); -#endif - if (psx_delay_BFC3A61C) { - psx_delay_BFC3A61C = 0; - if (psx_taken_BFC3A61C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800525D4u); - goto label_BFC3A5D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052624u); - } -label_BFC3A624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x85u); -#endif - /* 0xBFC3A624: 00E01021 addu $v0, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052624u); -#endif -label_BFC3A628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052628u); -#endif - /* 0xBFC3A628: 8FB00008 lw $s0, 8($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052628u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00008u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052628u); -#endif - /* 0xBFC3A62C: 8FB1000C lw $s1, 12($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005262Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1000Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005262Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A630: 03E00008 jr $ra */ - psx_delay_BFC3A630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3A634: 27BD0010 addiu $sp, $sp, 16 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); - PGXP_ALU(0x27BD0010u, cpu->gpr[29], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80052634u); -#endif - if (psx_delay_BFC3A630) { - psx_delay_BFC3A630 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A638(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A638u); - int psx_delay_BFC3A70C = 0; - int psx_taken_BFC3A70C = 0; - int psx_delay_BFC3A728 = 0; - int psx_taken_BFC3A728 = 0; - int psx_delay_BFC3A75C = 0; - int psx_taken_BFC3A75C = 0; - int psx_delay_BFC3A770 = 0; - int psx_taken_BFC3A770 = 0; - int psx_delay_BFC3A79C = 0; - int psx_taken_BFC3A79C = 0; - int psx_delay_BFC3A7B0 = 0; - int psx_taken_BFC3A7B0 = 0; - int psx_delay_BFC3A7D8 = 0; - int psx_taken_BFC3A7D8 = 0; - int psx_delay_BFC3A7E0 = 0; - int psx_taken_BFC3A7E0 = 0; - int psx_delay_BFC3A7E8 = 0; - int psx_taken_BFC3A7E8 = 0; - int psx_delay_BFC3A88C = 0; - int psx_taken_BFC3A88C = 0; - int psx_delay_BFC3A8A0 = 0; - int psx_taken_BFC3A8A0 = 0; - int psx_delay_BFC3A8CC = 0; - int psx_taken_BFC3A8CC = 0; - int psx_delay_BFC3A8F8 = 0; - int psx_taken_BFC3A8F8 = 0; - int psx_delay_BFC3A954 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A714u: goto label_BFC3A714; - case 0xBFC3A730u: goto label_BFC3A730; - case 0xBFC3A734u: goto label_BFC3A734; - case 0xBFC3A74Cu: goto label_BFC3A74C; - case 0xBFC3A764u: goto label_BFC3A764; - case 0xBFC3A778u: goto label_BFC3A778; - case 0xBFC3A77Cu: goto label_BFC3A77C; - case 0xBFC3A78Cu: goto label_BFC3A78C; - case 0xBFC3A7A4u: goto label_BFC3A7A4; - case 0xBFC3A7B8u: goto label_BFC3A7B8; - case 0xBFC3A7BCu: goto label_BFC3A7BC; - case 0xBFC3A7CCu: goto label_BFC3A7CC; - case 0xBFC3A7E0u: goto label_BFC3A7E0; - case 0xBFC3A7E8u: goto label_BFC3A7E8; - case 0xBFC3A7F0u: goto label_BFC3A7F0; - case 0xBFC3A7F4u: goto label_BFC3A7F4; - case 0xBFC3A894u: goto label_BFC3A894; - case 0xBFC3A8A8u: goto label_BFC3A8A8; - case 0xBFC3A8BCu: goto label_BFC3A8BC; - case 0xBFC3A8D4u: goto label_BFC3A8D4; - case 0xBFC3A900u: goto label_BFC3A900; - case 0xBFC3A930u: goto label_BFC3A930; - default: break; - } - } -label_BFC3A638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A638: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052638u); -#endif - /* 0xBFC3A63C: 81CEEDD8 lb $t6, -4648($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4648; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4648)), 14, 0x4000u); - PGXP_LOAD(0x81CEEDD8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005263Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3A640: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3A644: 2718ECA8 addiu $t8, $t8, -4952 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-4952)); - PGXP_ALU(0x2718ECA8u, cpu->gpr[24], _pgx1, 0xFFFFECA8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3A648: 000E78C0 sll $t7, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3A64C: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005264Cu); return; } g_debug_last_store_pc = 0x8005264Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005264Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC3A650: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052650u); -#endif - /* 0xBFC3A654: 94790002 lhu $t9, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052654u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x94790002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A658: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052658u); -#endif - /* 0xBFC3A65C: 8084EDDC lb $a0, -4644($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4644; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-4644)), 4, 0x10u); - PGXP_LOAD(0x8084EDDCu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3A660: 00194B80 sll $t1, $t9, 14 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 14u; - PGXP_ALU(0x00194B80u, cpu->gpr[9], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80052660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3A664: 01394823 subu $t1, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[25]; - PGXP_ALU(0x01394823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3A668: 01240019 multu $t1, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[9] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[9])); -#endif - PGXP_MULDIV(0x01240019u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x80052668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A66C: 24013F01 addiu $at, $zero, 16129 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16129)); - PGXP_ALU(0x24013F01u, cpu->gpr[1], _pgx1, 0x00003F01u); } -#ifdef PSX_COSIM - cosim_instr(0x8005266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052670u); -#endif - /* 0xBFC3A670: 946A0004 lhu $t2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052670u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3A674: 3C07800E lui $a3, 0x800E */ - cpu->gpr[7] = 0x800E0000u; - PGXP_ALU(0x3C07800Eu, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3A678: 000A5B80 sll $t3, $t2, 14 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 14u; - PGXP_ALU(0x000A5B80u, cpu->gpr[11], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80052678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3A67C: 016A5823 subu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[10]; - PGXP_ALU(0x016A5823u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005267Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052680u); -#endif - /* 0xBFC3A680: 80E7EDE2 lb $a3, -4638($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -4638; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-4638)), 7, 0x80u); - PGXP_LOAD(0x80E7EDE2u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80052680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A684: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052684u); -#endif - /* 0xBFC3A688: 9108EDE7 lbu $t0, -4633($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4633; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-4633)), 8, 0x100u); - PGXP_LOAD(0x9108EDE7u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A68C: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005268Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A690: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A694: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A698: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A69C: 0041001B divu $v0, $at */ - { uint32_t psx_n = cpu->gpr[2]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x8005269Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A6A0: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3A6AC: 01640019 multu $t3, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[11] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[11])); -#endif - PGXP_MULDIV(0x01640019u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x800526ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3A6B0: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3A6BC: 00C1001B divu $a2, $at */ - { uint32_t psx_n = cpu->gpr[6]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Bu, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800526BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A6C0: 2401007F addiu $at, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2401007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800526C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3A6C4: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC3A6D0: 00470019 multu $v0, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x00470019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x800526D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A6D4: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A6E0: 0041001B divu $v0, $at */ - { uint32_t psx_n = cpu->gpr[2]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800526E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A6E4: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800526F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC3A6F0: 00C70019 multu $a2, $a3 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[7]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C70019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[7]); -#ifdef PSX_COSIM - cosim_instr(0x800526F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3A6F4: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800526F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A6FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800526FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3A700: 00C1001B divu $a2, $at */ - { uint32_t psx_n = cpu->gpr[6]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Bu, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80052700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3A704: 2D010040 sltiu $at, $t0, 64 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2D010040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80052704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3A708: 00003012 mflo $a2 */ - cpu->gpr[6] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003012u, cpu->gpr[6], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A70C: 10200009 beq $at, $zero, 0xBFC3A734 */ - uint32_t psx_brA_BFC3A70C = cpu->gpr[1]; uint32_t psx_brB_BFC3A70C = cpu->gpr[0]; - psx_taken_BFC3A70C = (psx_brA_BFC3A70C == psx_brB_BFC3A70C); - psx_delay_BFC3A70C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3A710: 2407007F addiu $a3, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2407007Fu, cpu->gpr[7], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80052710u); -#endif - if (psx_delay_BFC3A70C) { - psx_delay_BFC3A70C = 0; - if (psx_taken_BFC3A70C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052734u); - goto label_BFC3A734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052714u); - } -label_BFC3A714: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A714u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC3A714: 00C80019 multu $a2, $t0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[6] * (uint64_t)cpu->gpr[8]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[6])); -#endif - PGXP_MULDIV(0x00C80019u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x80052714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3A718: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3A71C: 2407007F addiu $a3, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2407007Fu, cpu->gpr[7], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8005271Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A720: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A724: 00042182 srl $a0, $a0, 6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 6u; - PGXP_ALU(0x00042182u, cpu->gpr[4], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80052724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A728: 10000008 beq $zero, $zero, 0xBFC3A74C */ - uint32_t psx_brA_BFC3A728 = cpu->gpr[0]; uint32_t psx_brB_BFC3A728 = cpu->gpr[0]; - psx_taken_BFC3A728 = (psx_brA_BFC3A728 == psx_brB_BFC3A728); - psx_delay_BFC3A728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A72C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005272Cu); -#endif - if (psx_delay_BFC3A728) { - psx_delay_BFC3A728 = 0; - if (psx_taken_BFC3A728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005274Cu); - goto label_BFC3A74C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052730u); - } -label_BFC3A730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3A730: 2407007F addiu $a3, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2407007Fu, cpu->gpr[7], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80052730u); -#endif -label_BFC3A734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1180u); -#endif - /* 0xBFC3A734: 00E86023 subu $t4, $a3, $t0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[12] = cpu->gpr[7] - cpu->gpr[8]; - PGXP_ALU(0x00E86023u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3A738: 004C0019 multu $v0, $t4 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[2] * (uint64_t)cpu->gpr[12]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[2])); -#endif - PGXP_MULDIV(0x004C0019u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[12]); -#ifdef PSX_COSIM - cosim_instr(0x80052738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3A73C: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005273Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A740: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A744: 00031982 srl $v1, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 6u; - PGXP_ALU(0x00031982u, cpu->gpr[3], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80052744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A748: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052748u); -#endif -label_BFC3A74C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A74Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A74C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005274Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052750u); -#endif - /* 0xBFC3A750: 9042EDE3 lbu $v0, -4637($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4637; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-4637)), 2, 0x4u); - PGXP_LOAD(0x9042EDE3u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A754: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A758: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80052758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A75C: 10200007 beq $at, $zero, 0xBFC3A77C */ - uint32_t psx_brA_BFC3A75C = cpu->gpr[1]; uint32_t psx_brB_BFC3A75C = cpu->gpr[0]; - psx_taken_BFC3A75C = (psx_brA_BFC3A75C == psx_brB_BFC3A75C); - psx_delay_BFC3A75C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2084u); -#endif - /* 0xBFC3A760: 00E26823 subu $t5, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052760u); -#endif - if (psx_delay_BFC3A75C) { - psx_delay_BFC3A75C = 0; - if (psx_taken_BFC3A75C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005277Cu); - goto label_BFC3A77C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052764u); - } -label_BFC3A764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3A764: 00820019 multu $a0, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00820019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80052764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A768: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A76C: 00042182 srl $a0, $a0, 6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 6u; - PGXP_ALU(0x00042182u, cpu->gpr[4], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x8005276Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A770: 10000006 beq $zero, $zero, 0xBFC3A78C */ - uint32_t psx_brA_BFC3A770 = cpu->gpr[0]; uint32_t psx_brB_BFC3A770 = cpu->gpr[0]; - psx_taken_BFC3A770 = (psx_brA_BFC3A770 == psx_brB_BFC3A770); - psx_delay_BFC3A770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052774u); -#endif - if (psx_delay_BFC3A770) { - psx_delay_BFC3A770 = 0; - if (psx_taken_BFC3A770) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005278Cu); - goto label_BFC3A78C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052778u); - } -label_BFC3A778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2084u); -#endif - /* 0xBFC3A778: 00E26823 subu $t5, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E26823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052778u); -#endif -label_BFC3A77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3A77C: 006D0019 multu $v1, $t5 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[13]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006D0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[13]); -#ifdef PSX_COSIM - cosim_instr(0x8005277Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A780: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A784: 00031982 srl $v1, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 6u; - PGXP_ALU(0x00031982u, cpu->gpr[3], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80052784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A788: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052788u); -#endif -label_BFC3A78C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A78Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A78C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005278Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052790u); -#endif - /* 0xBFC3A790: 9042EDDD lbu $v0, -4643($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4643; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-4643)), 2, 0x4u); - PGXP_LOAD(0x9042EDDDu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A798: 2C410040 sltiu $at, $v0, 64 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); - PGXP_ALU(0x2C410040u, cpu->gpr[1], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80052798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A79C: 10200007 beq $at, $zero, 0xBFC3A7BC */ - uint32_t psx_brA_BFC3A79C = cpu->gpr[1]; uint32_t psx_brB_BFC3A79C = cpu->gpr[0]; - psx_taken_BFC3A79C = (psx_brA_BFC3A79C == psx_brB_BFC3A79C); - psx_delay_BFC3A79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4084u); -#endif - /* 0xBFC3A7A0: 00E27023 subu $t6, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800527A0u); -#endif - if (psx_delay_BFC3A79C) { - psx_delay_BFC3A79C = 0; - if (psx_taken_BFC3A79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527BCu); - goto label_BFC3A7BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527A4u); - } -label_BFC3A7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3A7A4: 00820019 multu $a0, $v0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[2]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00820019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x800527A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A7A8: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800527A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A7AC: 00042182 srl $a0, $a0, 6 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 6u; - PGXP_ALU(0x00042182u, cpu->gpr[4], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800527ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A7B0: 10000006 beq $zero, $zero, 0xBFC3A7CC */ - uint32_t psx_brA_BFC3A7B0 = cpu->gpr[0]; uint32_t psx_brB_BFC3A7B0 = cpu->gpr[0]; - psx_taken_BFC3A7B0 = (psx_brA_BFC3A7B0 == psx_brB_BFC3A7B0); - psx_delay_BFC3A7B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A7B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800527B4u); -#endif - if (psx_delay_BFC3A7B0) { - psx_delay_BFC3A7B0 = 0; - if (psx_taken_BFC3A7B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527CCu); - goto label_BFC3A7CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527B8u); - } -label_BFC3A7B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4084u); -#endif - /* 0xBFC3A7B8: 00E27023 subu $t6, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[7] - cpu->gpr[2]; - PGXP_ALU(0x00E27023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800527B8u); -#endif -label_BFC3A7BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3A7BC: 006E0019 multu $v1, $t6 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[14]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x006E0019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[14]); -#ifdef PSX_COSIM - cosim_instr(0x800527BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A7C0: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800527C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A7C4: 00031982 srl $v1, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 6u; - PGXP_ALU(0x00031982u, cpu->gpr[3], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x800527C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A7C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800527C8u); -#endif -label_BFC3A7CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3A7CC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800527CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527D0u); -#endif - /* 0xBFC3A7D0: 85EF95F8 lh $t7, -27144($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27144)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800527D0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EF95F8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800527D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3A7D4: 24080001 addiu $t0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800527D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC3A7D8: 15E80006 bne $t7, $t0, 0xBFC3A7F4 */ - uint32_t psx_brA_BFC3A7D8 = cpu->gpr[15]; uint32_t psx_brB_BFC3A7D8 = cpu->gpr[8]; - psx_taken_BFC3A7D8 = (psx_brA_BFC3A7D8 != psx_brB_BFC3A7D8); - psx_delay_BFC3A7D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC3A7DC: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800527DCu); -#endif - if (psx_delay_BFC3A7D8) { - psx_delay_BFC3A7D8 = 0; - if (psx_taken_BFC3A7D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527F4u); - goto label_BFC3A7F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527E0u); - } -label_BFC3A7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A7E0: 10200003 beq $at, $zero, 0xBFC3A7F0 */ - uint32_t psx_brA_BFC3A7E0 = cpu->gpr[1]; uint32_t psx_brB_BFC3A7E0 = cpu->gpr[0]; - psx_taken_BFC3A7E0 = (psx_brA_BFC3A7E0 == psx_brB_BFC3A7E0); - psx_delay_BFC3A7E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A7E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800527E4u); -#endif - if (psx_delay_BFC3A7E0) { - psx_delay_BFC3A7E0 = 0; - if (psx_taken_BFC3A7E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527F0u); - goto label_BFC3A7F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527E8u); - } -label_BFC3A7E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A7E8: 10000002 beq $zero, $zero, 0xBFC3A7F4 */ - uint32_t psx_brA_BFC3A7E8 = cpu->gpr[0]; uint32_t psx_brB_BFC3A7E8 = cpu->gpr[0]; - psx_taken_BFC3A7E8 = (psx_brA_BFC3A7E8 == psx_brB_BFC3A7E8); - psx_delay_BFC3A7E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3A7EC: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800527ECu); -#endif - if (psx_delay_BFC3A7E8) { - psx_delay_BFC3A7E8 = 0; - if (psx_taken_BFC3A7E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527F4u); - goto label_BFC3A7F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800527F0u); - } -label_BFC3A7F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3A7F0: 00602021 addu $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800527F0u); -#endif -label_BFC3A7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800527F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A7F4: 00630019 multu $v1, $v1 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[3] * (uint64_t)cpu->gpr[3]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[3])); -#endif - PGXP_MULDIV(0x00630019u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x800527F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A7F8: 24013FFF addiu $at, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24013FFFu, cpu->gpr[1], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800527F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A7FC: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800527FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052800u); -#endif - /* 0xBFC3A800: 8442EDF0 lh $v0, -4624($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052800u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8442EDF0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3A804: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC3A808: 000238C0 sll $a3, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000238C0u, cpu->gpr[7], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052808u); -#endif - /* 0xBFC3A80C: 8F1895F4 lw $t8, -27148($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005280Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1895F4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005280Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3A810: 30E7FFFF andi $a3, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3A814: 0007C840 sll $t9, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 1u; - PGXP_ALU(0x0007C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000200u); -#endif - /* 0xBFC3A818: 03194821 addu $t1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03194821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3A81C: A5250004 sh $a1, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005281Cu); return; } g_debug_last_store_pc = 0x8005281Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA5250004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005281Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3A820: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A824: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052824u); -#endif - /* 0xBFC3A828: 8D4A95F4 lw $t2, -27148($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052828u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A95F4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC3A82C: 00075840 sll $t3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[7] << 1u; - PGXP_ALU(0x00075840u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005282Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3A830: 0061001B divu $v1, $at */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0061001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80052830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC3A834: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3A838: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3A83C: 0002C080 sll $t8, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005283Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC3A840: 00077040 sll $t6, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[14] = cpu->gpr[7] << 1u; - PGXP_ALU(0x00077040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3A844: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3A848: 0302C023 subu $t8, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[2]; - PGXP_ALU(0x0302C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3A84C: 0018C0C0 sll $t8, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] << 3u; - PGXP_ALU(0x0018C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8005284Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3A850: 2739EA68 addiu $t9, $t9, -5528 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-5528)); - PGXP_ALU(0x2739EA68u, cpu->gpr[25], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x80052850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC3A854: 03193021 addu $a2, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03193021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A858: 00001812 mflo $v1 */ - cpu->gpr[3] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001812u, cpu->gpr[3], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3A85C: A5830000 sh $v1, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005285Cu); return; } g_debug_last_store_pc = 0x8005285Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA5830000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005285Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052860u); -#endif - /* 0xBFC3A860: 8DAD95F4 lw $t5, -27148($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052860u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD95F4u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A864: 00840019 multu $a0, $a0 */ - { uint64_t psx_p = (uint64_t)cpu->gpr[4] * (uint64_t)cpu->gpr[4]; cpu->lo = (uint32_t)(psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)(psx_p >> 32); } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, psx_mult_latency_u(cpu->gpr[4])); -#endif - PGXP_MULDIV(0x00840019u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[4]); -#ifdef PSX_COSIM - cosim_instr(0x80052864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC3A868: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A86C: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005286Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A874: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3A878: 0081001B divu $a0, $at */ - { uint32_t psx_n = cpu->gpr[4]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0081001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80052878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A87C: 28410010 slti $at, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0); - PGXP_ALU(0x28410010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005287Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A880: 00002012 mflo $a0 */ - cpu->gpr[4] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00002012u, cpu->gpr[4], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3A884: A5E40002 sh $a0, 2($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052884u); return; } g_debug_last_store_pc = 0x80052884u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA5E40002u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC3A888: A4C50004 sh $a1, 4($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052888u); return; } g_debug_last_store_pc = 0x80052888u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4C50004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A88C: 10200006 beq $at, $zero, 0xBFC3A8A8 */ - uint32_t psx_brA_BFC3A88C = cpu->gpr[1]; uint32_t psx_brB_BFC3A88C = cpu->gpr[0]; - psx_taken_BFC3A88C = (psx_brA_BFC3A88C == psx_brB_BFC3A88C); - psx_delay_BFC3A88C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC3A890: A0C80017 sb $t0, 23($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052890u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (23)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0C80017u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052890u); -#endif - if (psx_delay_BFC3A88C) { - psx_delay_BFC3A88C = 0; - if (psx_taken_BFC3A88C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800528A8u); - goto label_BFC3A8A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052894u); - } -label_BFC3A894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3A894: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20Cu); -#endif - /* 0xBFC3A898: 00491804 sllv $v1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[9] << (cpu->gpr[2] & 0x1Fu); - PGXP_ALU(0x00491804u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A89C: 3063FFFF andi $v1, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005289Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A8A0: 10000006 beq $zero, $zero, 0xBFC3A8BC */ - uint32_t psx_brA_BFC3A8A0 = cpu->gpr[0]; uint32_t psx_brB_BFC3A8A0 = cpu->gpr[0]; - psx_taken_BFC3A8A0 = (psx_brA_BFC3A8A0 == psx_brB_BFC3A8A0); - psx_delay_BFC3A8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A8A4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800528A4u); -#endif - if (psx_delay_BFC3A8A0) { - psx_delay_BFC3A8A0 = 0; - if (psx_taken_BFC3A8A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800528BCu); - goto label_BFC3A8BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800528A8u); - } -label_BFC3A8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3A8A8: 244A0010 addiu $t2, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x244A0010u, cpu->gpr[10], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800528A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3A8AC: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800528ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC10u); -#endif - /* 0xBFC3A8B0: 014B2004 sllv $a0, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[4] = cpu->gpr[11] << (cpu->gpr[10] & 0x1Fu); - PGXP_ALU(0x014B2004u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800528B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A8B4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800528B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A8B8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800528B8u); -#endif -label_BFC3A8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3A8BC: 3C0C800E lui $t4, 0x800E */ - cpu->gpr[12] = 0x800E0000u; - PGXP_ALU(0x3C0C800Eu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800528BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528C0u); -#endif - /* 0xBFC3A8C0: 818CEDED lb $t4, -4627($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -4627; cpu->gpr[12] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-4627)), 12, 0x1000u); - PGXP_LOAD(0x818CEDEDu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800528C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A8C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800528C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3A8C8: 318D0004 andi $t5, $t4, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x4u; - PGXP_ALU(0x318D0004u, cpu->gpr[13], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800528C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3A8CC: 11A0000C beq $t5, $zero, 0xBFC3A900 */ - uint32_t psx_brA_BFC3A8CC = cpu->gpr[13]; uint32_t psx_brB_BFC3A8CC = cpu->gpr[0]; - psx_taken_BFC3A8CC = (psx_brA_BFC3A8CC == psx_brB_BFC3A8CC); - psx_delay_BFC3A8CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A8D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800528D0u); -#endif - if (psx_delay_BFC3A8CC) { - psx_delay_BFC3A8CC = 0; - if (psx_taken_BFC3A8CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052900u); - goto label_BFC3A900; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800528D4u); - } -label_BFC3A8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3A8D4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800528D4u); -#endif - /* 0xBFC3A8D8: 95CE9F14 lhu $t6, -24812($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800528D8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x95CE9F14u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800528D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3A8DC: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800528DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528E0u); -#endif - /* 0xBFC3A8E0: 97189F16 lhu $t8, -24810($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24810; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800528E0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x97189F16u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800528E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A8E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800528E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC3A8E8: 01C37825 or $t7, $t6, $v1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[3]; - PGXP_ALU(0x01C37825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800528E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3A8EC: A42F9F14 sh $t7, -24812($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800528ECu); return; } g_debug_last_store_pc = 0x800528ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42F9F14u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800528ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800528F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A8F0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800528F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC3A8F4: 0304C825 or $t9, $t8, $a0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[24] | cpu->gpr[4]; - PGXP_ALU(0x0304C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800528F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A8F8: 1000000D beq $zero, $zero, 0xBFC3A930 */ - uint32_t psx_brA_BFC3A8F8 = cpu->gpr[0]; uint32_t psx_brB_BFC3A8F8 = cpu->gpr[0]; - psx_taken_BFC3A8F8 = (psx_brA_BFC3A8F8 == psx_brB_BFC3A8F8); - psx_delay_BFC3A8F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3A8FC: A4399F16 sh $t9, -24810($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24810; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800528FCu); return; } g_debug_last_store_pc = 0x800528FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4399F16u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800528FCu); -#endif - if (psx_delay_BFC3A8F8) { - psx_delay_BFC3A8F8 = 0; - if (psx_taken_BFC3A8F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052930u); - goto label_BFC3A930; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052900u); - } -label_BFC3A900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3A900: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052900u); -#endif - /* 0xBFC3A904: 95299F14 lhu $t1, -24812($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052904u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x95299F14u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x809u); -#endif - /* 0xBFC3A908: 00605827 nor $t3, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = ~(cpu->gpr[3] | cpu->gpr[0]); - PGXP_ALU(0x00605827u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3A90C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005290Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052910u); -#endif - /* 0xBFC3A910: 958C9F16 lhu $t4, -24810($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24810; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052910u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x958C9F16u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A914: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE00u); -#endif - /* 0xBFC3A918: 012B5024 and $t2, $t1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[10] = cpu->gpr[9] & cpu->gpr[11]; - PGXP_ALU(0x012B5024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3A91C: A42A9F14 sh $t2, -24812($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005291Cu); return; } g_debug_last_store_pc = 0x8005291Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA42A9F14u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005291Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2011u); -#endif - /* 0xBFC3A920: 00806827 nor $t5, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = ~(cpu->gpr[4] | cpu->gpr[0]); - PGXP_ALU(0x00806827u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A924: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC3A928: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3A92C: A42E9F16 sh $t6, -24810($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24810; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005292Cu); return; } g_debug_last_store_pc = 0x8005292Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42E9F16u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005292Cu); -#endif -label_BFC3A930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3A930: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052930u); -#endif - /* 0xBFC3A934: 95EF9F0C lhu $t7, -24820($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052934u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x95EF9F0Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3A938: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052938u); -#endif - /* 0xBFC3A93C: 97399F0E lhu $t9, -24818($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24818; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005293Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x97399F0Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005293Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A940: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC3A944: 01E3C025 or $t8, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[3]; - PGXP_ALU(0x01E3C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3A948: A4389F0C sh $t8, -24820($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052948u); return; } g_debug_last_store_pc = 0x80052948u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4389F0Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A94C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005294Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000210u); -#endif - /* 0xBFC3A950: 03244825 or $t1, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[25] | cpu->gpr[4]; - PGXP_ALU(0x03244825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A954: 03E00008 jr $ra */ - psx_delay_BFC3A954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3A958: A4299F0E sh $t1, -24818($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24818; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052958u); return; } g_debug_last_store_pc = 0x80052958u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4299F0Eu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052958u); -#endif - if (psx_delay_BFC3A954) { - psx_delay_BFC3A954 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A95C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A95Cu); - int psx_delay_BFC3A96C = 0; - int psx_taken_BFC3A96C = 0; - int psx_delay_BFC3A980 = 0; - int psx_taken_BFC3A980 = 0; - int psx_delay_BFC3A9E4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3A974u: goto label_BFC3A974; - case 0xBFC3A988u: goto label_BFC3A988; - case 0xBFC3A98Cu: goto label_BFC3A98C; - case 0xBFC3A99Cu: goto label_BFC3A99C; - default: break; - } - } -label_BFC3A95C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A95Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A95Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A95C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005295Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052960u); -#endif - /* 0xBFC3A960: 9442EDF0 lhu $v0, -4624($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052960u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x9442EDF0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3A964: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052964u); return; } g_debug_last_store_pc = 0x80052964u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3A968: 2C410010 sltiu $at, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < 0x00000010u ? 1 : 0); - PGXP_ALU(0x2C410010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80052968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3A96C: 10200007 beq $at, $zero, 0xBFC3A98C */ - uint32_t psx_brA_BFC3A96C = cpu->gpr[1]; uint32_t psx_brB_BFC3A96C = cpu->gpr[0]; - psx_taken_BFC3A96C = (psx_brA_BFC3A96C == psx_brB_BFC3A96C); - psx_delay_BFC3A96C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3A970: 244F0010 addiu $t7, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x244F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80052970u); -#endif - if (psx_delay_BFC3A96C) { - psx_delay_BFC3A96C = 0; - if (psx_taken_BFC3A96C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005298Cu); - goto label_BFC3A98C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052974u); - } -label_BFC3A974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3A974: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400Cu); -#endif - /* 0xBFC3A978: 004E1804 sllv $v1, $t6, $v0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[14] << (cpu->gpr[2] & 0x1Fu); - PGXP_ALU(0x004E1804u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A97C: 3063FFFF andi $v1, $v1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFFFu; - PGXP_ALU(0x3063FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005297Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3A980: 10000006 beq $zero, $zero, 0xBFC3A99C */ - uint32_t psx_brA_BFC3A980 = cpu->gpr[0]; uint32_t psx_brB_BFC3A980 = cpu->gpr[0]; - psx_taken_BFC3A980 = (psx_brA_BFC3A980 == psx_brB_BFC3A980); - psx_delay_BFC3A980 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3A984: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052984u); -#endif - if (psx_delay_BFC3A980) { - psx_delay_BFC3A980 = 0; - if (psx_taken_BFC3A980) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005299Cu); - goto label_BFC3A99C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052988u); - } -label_BFC3A988: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A988u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3A988: 244F0010 addiu $t7, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x244F0010u, cpu->gpr[15], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80052988u); -#endif -label_BFC3A98C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A98Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3A98C: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005298Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC3A990: 01F82004 sllv $a0, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[4] = cpu->gpr[24] << (cpu->gpr[15] & 0x1Fu); - PGXP_ALU(0x01F82004u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3A994: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3A998: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052998u); -#endif -label_BFC3A99C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A99Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005299Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3A99C: 0002C880 sll $t9, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 2u; - PGXP_ALU(0x0002C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005299Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3A9A0: 0322C823 subu $t9, $t9, $v0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[2]; - PGXP_ALU(0x0322C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800529A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A9A4: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3A9A8: 2508EA68 addiu $t0, $t0, -5528 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (-5528)); - PGXP_ALU(0x2508EA68u, cpu->gpr[8], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x800529A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3A9AC: 0019C8C0 sll $t9, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] << 3u; - PGXP_ALU(0x0019C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800529ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000120u); -#endif - /* 0xBFC3A9B0: 03282821 addu $a1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03282821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800529B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A9B4: A4A00004 sh $zero, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529B4u); return; } g_debug_last_store_pc = 0x800529B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800529B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A9B8: A0A00017 sb $zero, 23($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800529B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (23)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0A00017u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800529B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3A9BC: A4A00000 sh $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529BCu); return; } g_debug_last_store_pc = 0x800529BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800529BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3A9C0: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529C0u); -#endif - /* 0xBFC3A9C4: 95299F10 lhu $t1, -24816($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24816; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529C4u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x95299F10u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800529C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3A9C8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529C8u); -#endif - /* 0xBFC3A9CC: 956B9F12 lhu $t3, -24814($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24814; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529CCu); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x956B9F12u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800529CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A9D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC3A9D4: 01235025 or $t2, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[9] | cpu->gpr[3]; - PGXP_ALU(0x01235025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800529D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3A9D8: A42A9F10 sh $t2, -24816($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529D8u); return; } g_debug_last_store_pc = 0x800529D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA42A9F10u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800529D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3A9DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC3A9E0: 01646025 or $t4, $t3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[11] | cpu->gpr[4]; - PGXP_ALU(0x01646025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800529E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3A9E4: 03E00008 jr $ra */ - psx_delay_BFC3A9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3A9E8: A42C9F12 sh $t4, -24814($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24814; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800529E8u); return; } g_debug_last_store_pc = 0x800529E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42C9F12u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800529E8u); -#endif - if (psx_delay_BFC3A9E4) { - psx_delay_BFC3A9E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3A9EC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3A9ECu); - int psx_delay_BFC3AA18 = 0; - int psx_taken_BFC3AA18 = 0; - int psx_delay_BFC3AA44 = 0; - int psx_taken_BFC3AA44 = 0; - int psx_delay_BFC3AA94 = 0; - int psx_taken_BFC3AA94 = 0; - int psx_delay_BFC3AAA0 = 0; - int psx_taken_BFC3AAA0 = 0; - int psx_delay_BFC3AAA8 = 0; - int psx_taken_BFC3AAA8 = 0; - int psx_delay_BFC3AABC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3AA20u: goto label_BFC3AA20; - case 0xBFC3AA24u: goto label_BFC3AA24; - case 0xBFC3AA4Cu: goto label_BFC3AA4C; - case 0xBFC3AA50u: goto label_BFC3AA50; - case 0xBFC3AA9Cu: goto label_BFC3AA9C; - case 0xBFC3AAA8u: goto label_BFC3AAA8; - case 0xBFC3AAB0u: goto label_BFC3AAB0; - case 0xBFC3AABCu: goto label_BFC3AABC; - default: break; - } - } -label_BFC3A9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3A9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3A9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3A9EC: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800529F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3A9F0: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529F0u); -#endif - /* 0xBFC3A9F4: 8063EDE9 lb $v1, -4631($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4631; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-4631)), 3, 0x8u); - PGXP_LOAD(0x8063EDE9u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800529F4u); -#endif - /* 0xBFC3A9F8: 8042EDDA lb $v0, -4646($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4646; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (-4646)), 2, 0x4u); - PGXP_LOAD(0x8042EDDAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800529F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3A9FC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800529FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A00u); -#endif - /* 0xBFC3AA00: 80A5EDEA lb $a1, -4630($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4630; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-4630)), 5, 0x20u); - PGXP_LOAD(0x80A5EDEAu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4Cu); -#endif - /* 0xBFC3AA04: 00433023 subu $a2, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[2] - cpu->gpr[3]; - PGXP_ALU(0x00433023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3AA08: 24C6003C addiu $a2, $a2, 60 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (60)); - PGXP_ALU(0x24C6003Cu, cpu->gpr[6], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3AA0C: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3AA10: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AA14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3AA18: 04A10002 bgez $a1, 0xBFC3AA24 */ - uint32_t psx_brA_BFC3AA18 = cpu->gpr[5]; - psx_taken_BFC3AA18 = ((int32_t)psx_brA_BFC3AA18 >= 0); - psx_delay_BFC3AA18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC3AA1C: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052A1Cu); -#endif - if (psx_delay_BFC3AA18) { - psx_delay_BFC3AA18 = 0; - if (psx_taken_BFC3AA18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052A24u); - goto label_BFC3AA24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052A20u); - } -label_BFC3AA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AA20: 24210007 addiu $at, $at, 7 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (7)); - PGXP_ALU(0x24210007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A20u); -#endif -label_BFC3AA24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AA24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3AA24: 000128C3 sra $a1, $at, 3 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[1] >> 3u); - PGXP_ALU(0x000128C3u, cpu->gpr[5], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AA28: 2401000C addiu $at, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2401000Cu, cpu->gpr[1], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3AA2C: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80052A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3AA30: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC3AA34: 30AEFFFF andi $t6, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[14] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3AA38: 00083C00 sll $a3, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] << 16u; - PGXP_ALU(0x00083C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3AA3C: 2DC10010 sltiu $at, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[14] < 0x00000010u ? 1 : 0); - PGXP_ALU(0x2DC10010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC3AA40: 30A4FFFF andi $a0, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A4FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AA44: 14200002 bne $at, $zero, 0xBFC3AA50 */ - uint32_t psx_brA_BFC3AA44 = cpu->gpr[1]; uint32_t psx_brB_BFC3AA44 = cpu->gpr[0]; - psx_taken_BFC3AA44 = (psx_brA_BFC3AA44 != psx_brB_BFC3AA44); - psx_delay_BFC3AA44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA48: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A48u); -#endif - if (psx_delay_BFC3AA44) { - psx_delay_BFC3AA44 = 0; - if (psx_taken_BFC3AA44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052A50u); - goto label_BFC3AA50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052A4Cu); - } -label_BFC3AA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3AA4C: 2404000F addiu $a0, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2404000Fu, cpu->gpr[4], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A4Cu); -#endif -label_BFC3AA50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AA50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AA50: 2401000C addiu $at, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2401000Cu, cpu->gpr[1], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3AA54: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80052A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3AA58: 00083C00 sll $a3, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] << 16u; - PGXP_ALU(0x00083C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3AA5C: 00045840 sll $t3, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[11] = cpu->gpr[4] << 1u; - PGXP_ALU(0x00045840u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA60: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3AA64: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA68: 24E7FFFB addiu $a3, $a3, -5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-5)); - PGXP_ALU(0x24E7FFFBu, cpu->gpr[7], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x80052A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA6C: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA70: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3AA74: 00007810 mfhi $t7 */ - cpu->gpr[15] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007810u, cpu->gpr[15], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3AA78: 000FC400 sll $t8, $t7, 16 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 16u; - PGXP_ALU(0x000FC400u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3AA7C: 0018CC03 sra $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] >> 16u); - PGXP_ALU(0x0018CC03u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3AA80: 00194900 sll $t1, $t9, 4 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] << 4u; - PGXP_ALU(0x00194900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3AA84: 00095040 sll $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 1u; - PGXP_ALU(0x00095040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC3AA88: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC3AA8C: 00AC2821 addu $a1, $a1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[12]; - PGXP_ALU(0x00AC2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A90u); -#endif - /* 0xBFC3AA90: 94A595FC lhu $a1, -27140($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -27140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-27140)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052A90u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x94A595FCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AA94: 18E00004 blez $a3, 0xBFC3AAA8 */ - uint32_t psx_brA_BFC3AA94 = cpu->gpr[7]; - psx_taken_BFC3AA94 = ((int32_t)psx_brA_BFC3AA94 <= 0); - psx_delay_BFC3AA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AA98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052A98u); -#endif - if (psx_delay_BFC3AA94) { - psx_delay_BFC3AA94 = 0; - if (psx_taken_BFC3AA94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AA8u); - goto label_BFC3AAA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052A9Cu); - } -label_BFC3AA9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AA9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3AA9C: 00E52804 sllv $a1, $a1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[5] = cpu->gpr[5] << (cpu->gpr[7] & 0x1Fu); - PGXP_ALU(0x00E52804u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AAA0: 10000006 beq $zero, $zero, 0xBFC3AABC */ - uint32_t psx_brA_BFC3AAA0 = cpu->gpr[0]; uint32_t psx_brB_BFC3AAA0 = cpu->gpr[0]; - psx_taken_BFC3AAA0 = (psx_brA_BFC3AAA0 == psx_brB_BFC3AAA0); - psx_delay_BFC3AAA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3AAA4: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052AA4u); -#endif - if (psx_delay_BFC3AAA0) { - psx_delay_BFC3AAA0 = 0; - if (psx_taken_BFC3AAA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052ABCu); - goto label_BFC3AABC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AA8u); - } -label_BFC3AAA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AAA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AAA8: 04E10004 bgez $a3, 0xBFC3AABC */ - uint32_t psx_brA_BFC3AAA8 = cpu->gpr[7]; - psx_taken_BFC3AAA8 = ((int32_t)psx_brA_BFC3AAA8 >= 0); - psx_delay_BFC3AAA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AAAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052AACu); -#endif - if (psx_delay_BFC3AAA8) { - psx_delay_BFC3AAA8 = 0; - if (psx_taken_BFC3AAA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052ABCu); - goto label_BFC3AABC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AB0u); - } -label_BFC3AAB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AAB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2081u); -#endif - /* 0xBFC3AAB0: 00076823 subu $t5, $zero, $a3 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[13] = cpu->gpr[0] - cpu->gpr[7]; - PGXP_ALU(0x00076823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3AAB4: 01A52806 srlv $a1, $a1, $t5 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[5] = cpu->gpr[5] >> (cpu->gpr[13] & 0x1Fu); - PGXP_ALU(0x01A52806u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3AAB8: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052AB8u); -#endif -label_BFC3AABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3AABC: 03E00008 jr $ra */ - psx_delay_BFC3AABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3AAC0: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052AC0u); -#endif - if (psx_delay_BFC3AABC) { - psx_delay_BFC3AABC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3AAC4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3AAC4u); - int psx_delay_BFC3AAD8 = 0; - int psx_taken_BFC3AAD8 = 0; - int psx_delay_BFC3AB18 = 0; - int psx_taken_BFC3AB18 = 0; - int psx_delay_BFC3AB2C = 0; - int psx_taken_BFC3AB2C = 0; - int psx_delay_BFC3AB60 = 0; - int psx_taken_BFC3AB60 = 0; - int psx_delay_BFC3AB68 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3AAE0u: goto label_BFC3AAE0; - case 0xBFC3AAF4u: goto label_BFC3AAF4; - case 0xBFC3AB20u: goto label_BFC3AB20; - case 0xBFC3AB34u: goto label_BFC3AB34; - case 0xBFC3AB50u: goto label_BFC3AB50; - case 0xBFC3AB68u: goto label_BFC3AB68; - default: break; - } - } -label_BFC3AAC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AAC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3AAC4: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052AC4u); -#endif - /* 0xBFC3AAC8: 80C6EDE4 lb $a2, -4636($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4636; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (-4636)), 6, 0x40u); - PGXP_LOAD(0x80C6EDE4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x211u); -#endif - /* 0xBFC3AACC: 00804821 addu $t1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x121u); -#endif - /* 0xBFC3AAD0: 00A04021 addu $t0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3AAD4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3AAD8: 18C00023 blez $a2, 0xBFC3AB68 */ - uint32_t psx_brA_BFC3AAD8 = cpu->gpr[6]; - psx_taken_BFC3AAD8 = ((int32_t)psx_brA_BFC3AAD8 <= 0); - psx_delay_BFC3AAD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3AADC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052ADCu); -#endif - if (psx_delay_BFC3AAD8) { - psx_delay_BFC3AAD8 = 0; - if (psx_taken_BFC3AAD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B68u); - goto label_BFC3AB68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AE0u); - } -label_BFC3AAE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AAE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3AAE0: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052AE0u); -#endif - /* 0xBFC3AAE4: 8084EDDF lb $a0, -4641($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4641; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-4641)), 4, 0x10u); - PGXP_LOAD(0x8084EDDFu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3AAE8: 3C07800E lui $a3, 0x800E */ - cpu->gpr[7] = 0x800E0000u; - PGXP_ALU(0x3C07800Eu, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052AE8u); -#endif - /* 0xBFC3AAEC: 80E7EDDA lb $a3, -4646($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -4646; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (-4646)), 7, 0x80u); - PGXP_LOAD(0x80E7EDDAu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80052AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3AAF0: 00042100 sll $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00042100u, cpu->gpr[4], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052AF0u); -#endif -label_BFC3AAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3AAF4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052AF4u); -#endif - /* 0xBFC3AAF8: 8DCE9F00 lw $t6, -24832($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052AF8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F00u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3AAFC: 00047940 sll $t7, $a0, 5 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 5u; - PGXP_ALU(0x00047940u, cpu->gpr[15], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80052AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3AB00: 0002C940 sll $t9, $v0, 5 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 5u; - PGXP_ALU(0x0002C940u, cpu->gpr[25], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC3AB04: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC3AB08: 03192821 addu $a1, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B08u); -#endif - /* 0xBFC3AB0C: 90AA0006 lbu $t2, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (6)), 10, 0x20u); - PGXP_LOAD(0x90AA0006u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AB10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x482u); -#endif - /* 0xBFC3AB14: 00EA082B sltu $at, $a3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)(cpu->gpr[7] < cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x00EA082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AB18: 1420000D bne $at, $zero, 0xBFC3AB50 */ - uint32_t psx_brA_BFC3AB18 = cpu->gpr[1]; uint32_t psx_brB_BFC3AB18 = cpu->gpr[0]; - psx_taken_BFC3AB18 = (psx_brA_BFC3AB18 != psx_brB_BFC3AB18); - psx_delay_BFC3AB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AB1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052B1Cu); -#endif - if (psx_delay_BFC3AB18) { - psx_delay_BFC3AB18 = 0; - if (psx_taken_BFC3AB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B50u); - goto label_BFC3AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B20u); - } -label_BFC3AB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B20u); -#endif - /* 0xBFC3AB20: 90AB0007 lbu $t3, 7($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 7; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (7)), 11, 0x20u); - PGXP_LOAD(0x90AB0007u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x882u); -#endif - /* 0xBFC3AB28: 0167082B sltu $at, $t3, $a3 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[11] < cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x0167082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AB2C: 14200008 bne $at, $zero, 0xBFC3AB50 */ - uint32_t psx_brA_BFC3AB2C = cpu->gpr[1]; uint32_t psx_brB_BFC3AB2C = cpu->gpr[0]; - psx_taken_BFC3AB2C = (psx_brA_BFC3AB2C != psx_brB_BFC3AB2C); - psx_delay_BFC3AB2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AB30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052B30u); -#endif - if (psx_delay_BFC3AB2C) { - psx_delay_BFC3AB2C = 0; - if (psx_taken_BFC3AB2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B50u); - goto label_BFC3AB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B34u); - } -label_BFC3AB34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AB34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B34u); -#endif - /* 0xBFC3AB34: 84AC0016 lh $t4, 22($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052B34u); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x84AC0016u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2108u); -#endif - /* 0xBFC3AB38: 01036821 addu $t5, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[8] + cpu->gpr[3]; - PGXP_ALU(0x01036821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4208u); -#endif - /* 0xBFC3AB3C: 01237021 addu $t6, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[14] = cpu->gpr[9] + cpu->gpr[3]; - PGXP_ALU(0x01237021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3AB40: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3AB44: A1AC0000 sb $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052B44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA1AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3AB48: A1C20000 sb $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052B48u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA1C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3AB4C: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052B4Cu); -#endif -label_BFC3AB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB50: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB54: 00021600 sll $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 24u; - PGXP_ALU(0x00021600u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB58: 00021603 sra $v0, $v0, 24 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 24u); - PGXP_ALU(0x00021603u, cpu->gpr[2], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x46u); -#endif - /* 0xBFC3AB5C: 0046082A slt $at, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0046082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AB60: 1420FFE4 bne $at, $zero, 0xBFC3AAF4 */ - uint32_t psx_brA_BFC3AB60 = cpu->gpr[1]; uint32_t psx_brB_BFC3AB60 = cpu->gpr[0]; - psx_taken_BFC3AB60 = (psx_brA_BFC3AB60 != psx_brB_BFC3AB60); - psx_delay_BFC3AB60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AB64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052B64u); -#endif - if (psx_delay_BFC3AB60) { - psx_delay_BFC3AB60 = 0; - if (psx_taken_BFC3AB60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AF4u); - goto label_BFC3AAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B68u); - } -label_BFC3AB68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AB68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3AB68: 03E00008 jr $ra */ - psx_delay_BFC3AB68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3AB6C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052B6Cu); -#endif - if (psx_delay_BFC3AB68) { - psx_delay_BFC3AB68 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3AB70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3AB70u); - int psx_delay_BFC3ABAC = 0; - int psx_taken_BFC3ABAC = 0; - int psx_delay_BFC3ABD0 = 0; - int psx_taken_BFC3ABD0 = 0; - int psx_delay_BFC3ABEC = 0; - int psx_taken_BFC3ABEC = 0; - int psx_delay_BFC3AC10 = 0; - int psx_taken_BFC3AC10 = 0; - int psx_delay_BFC3AC94 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3ABB4u: goto label_BFC3ABB4; - case 0xBFC3ABD8u: goto label_BFC3ABD8; - case 0xBFC3ABDCu: goto label_BFC3ABDC; - case 0xBFC3ABF4u: goto label_BFC3ABF4; - case 0xBFC3AC18u: goto label_BFC3AC18; - case 0xBFC3AC1Cu: goto label_BFC3AC1C; - case 0xBFC3AC34u: goto label_BFC3AC34; - default: break; - } - } -label_BFC3AB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB70: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3AB74: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052B74u); -#endif - /* 0xBFC3AB78: 8442EDF0 lh $v0, -4624($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052B78u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8442EDF0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B78u); -#endif - /* 0xBFC3AB7C: 81CEEDDF lb $t6, -4641($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4641; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4641)), 14, 0x4000u); - PGXP_LOAD(0x81CEEDDFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3AB80: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3AB84: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052B84u); -#endif - /* 0xBFC3AB88: 8484EDEE lh $a0, -4626($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4626; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052B88u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8484EDEEu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B88u); -#endif - /* 0xBFC3AB8C: 8318EDE5 lb $t8, -4635($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4635; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-4635)), 24, 0x1000000u); - PGXP_LOAD(0x8318EDE5u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB90: 000210C0 sll $v0, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000210C0u, cpu->gpr[2], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3AB94: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3AB98: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AB9C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3ABA0: 30990001 andi $t9, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x1u; - PGXP_ALU(0x30990001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC3ABA4: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3ABA8: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3ABAC: 1B200011 blez $t9, 0xBFC3ABF4 */ - uint32_t psx_brA_BFC3ABAC = cpu->gpr[25]; - psx_taken_BFC3ABAC = ((int32_t)psx_brA_BFC3ABAC <= 0); - psx_delay_BFC3ABAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3ABB0: A423EDF4 sh $v1, -4620($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4620; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4620)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052BB0u); return; } g_debug_last_store_pc = 0x80052BB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423EDF4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BB0u); -#endif - if (psx_delay_BFC3ABAC) { - psx_delay_BFC3ABAC = 0; - if (psx_taken_BFC3ABAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052BF4u); - goto label_BFC3ABF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052BB4u); - } -label_BFC3ABB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ABB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ABB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3ABB4: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3ABB8: 2489FFFF addiu $t1, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2489FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052BB8u); -#endif - /* 0xBFC3ABBC: 8D089EFC lw $t0, -24836($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052BBCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089EFCu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3ABC0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052BC0u); -#endif - /* 0xBFC3ABC4: 8DCE95F4 lw $t6, -27148($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052BC4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE95F4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3ABC8: 00027840 sll $t7, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00027840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC3ABCC: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3ABD0: 05210002 bgez $t1, 0xBFC3ABDC */ - uint32_t psx_brA_BFC3ABD0 = cpu->gpr[9]; - psx_taken_BFC3ABD0 = ((int32_t)psx_brA_BFC3ABD0 >= 0); - psx_delay_BFC3ABD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x203u); -#endif - /* 0xBFC3ABD4: 01200821 addu $at, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052BD4u); -#endif - if (psx_delay_BFC3ABD0) { - psx_delay_BFC3ABD0 = 0; - if (psx_taken_BFC3ABD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052BDCu); - goto label_BFC3ABDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052BD8u); - } -label_BFC3ABD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ABD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ABD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3ABD8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BD8u); -#endif -label_BFC3ABDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ABDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ABDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3ABDC: 00015043 sra $t2, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015043u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3ABE0: 000A5900 sll $t3, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A5900u, cpu->gpr[11], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1900u); -#endif - /* 0xBFC3ABE4: 010B6021 addu $t4, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[8] + cpu->gpr[11]; - PGXP_ALU(0x010B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052BE4u); -#endif - /* 0xBFC3ABE8: 958D000C lhu $t5, 12($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052BE8u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x1000u); } - PGXP_LOAD(0x958D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ABEC: 10000011 beq $zero, $zero, 0xBFC3AC34 */ - uint32_t psx_brA_BFC3ABEC = cpu->gpr[0]; uint32_t psx_brB_BFC3ABEC = cpu->gpr[0]; - psx_taken_BFC3ABEC = (psx_brA_BFC3ABEC == psx_brB_BFC3ABEC); - psx_delay_BFC3ABEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC3ABF0: A70D0006 sh $t5, 6($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052BF0u); return; } g_debug_last_store_pc = 0x80052BF0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA70D0006u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BF0u); -#endif - if (psx_delay_BFC3ABEC) { - psx_delay_BFC3ABEC = 0; - if (psx_taken_BFC3ABEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052C34u); - goto label_BFC3AC34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052BF4u); - } -label_BFC3ABF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ABF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ABF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3ABF4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3ABF8: 2489FFFF addiu $t1, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2489FFFFu, cpu->gpr[9], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052BF8u); -#endif - /* 0xBFC3ABFC: 8F399EFC lw $t9, -24836($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052BFCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399EFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3AC00: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C00u); -#endif - /* 0xBFC3AC04: 8DCE95F4 lw $t6, -27148($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052C04u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE95F4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3AC08: 00027840 sll $t7, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00027840u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC3AC0C: 01CF6821 addu $t5, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3AC10: 05210002 bgez $t1, 0xBFC3AC1C */ - uint32_t psx_brA_BFC3AC10 = cpu->gpr[9]; - psx_taken_BFC3AC10 = ((int32_t)psx_brA_BFC3AC10 >= 0); - psx_delay_BFC3AC10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x203u); -#endif - /* 0xBFC3AC14: 01200821 addu $at, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01200821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C14u); -#endif - if (psx_delay_BFC3AC10) { - psx_delay_BFC3AC10 = 0; - if (psx_taken_BFC3AC10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052C1Cu); - goto label_BFC3AC1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052C18u); - } -label_BFC3AC18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AC18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AC18: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C18u); -#endif -label_BFC3AC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3AC1C: 00015043 sra $t2, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00015043u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC3AC20: 000A4100 sll $t0, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A4100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000900u); -#endif - /* 0xBFC3AC24: 03285821 addu $t3, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[11] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03285821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C24u); -#endif - /* 0xBFC3AC28: 956C000E lhu $t4, 14($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C28u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x800u); } - PGXP_LOAD(0x956C000Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AC2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3AC30: A5AC0006 sh $t4, 6($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C30u); return; } g_debug_last_store_pc = 0x80052C30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA5AC0006u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C30u); -#endif -label_BFC3AC34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AC34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3AC34: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C34u); -#endif - /* 0xBFC3AC38: 8F189F00 lw $t8, -24832($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052C38u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189F00u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3AC3C: 00034940 sll $t1, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00034940u, cpu->gpr[9], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3AC40: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C40u); -#endif - /* 0xBFC3AC44: 8D0895F4 lw $t0, -27148($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052C44u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0895F4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC3AC48: 03095021 addu $t2, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C48u); -#endif - /* 0xBFC3AC4C: 95590010 lhu $t9, 16($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C4Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x400u); } - PGXP_LOAD(0x95590010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3AC50: 00025840 sll $t3, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00025840u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4900u); -#endif - /* 0xBFC3AC54: 010B7021 addu $t6, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[8] + cpu->gpr[11]; - PGXP_ALU(0x010B7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3AC58: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3AC5C: A5D90008 sh $t9, 8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C5Cu); return; } g_debug_last_store_pc = 0x80052C5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA5D90008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C60u); -#endif - /* 0xBFC3AC60: 8DEF9F00 lw $t7, -24832($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052C60u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F00u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3AC64: 00036140 sll $t4, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00036140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3AC68: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3AC6C: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xB000u); -#endif - /* 0xBFC3AC70: 01EC6821 addu $t5, $t7, $t4 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[15] + cpu->gpr[12]; - PGXP_ALU(0x01EC6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C70u); -#endif - /* 0xBFC3AC74: 95B80012 lhu $t8, 18($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C74u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x2000u); } - PGXP_LOAD(0x95B80012u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C74u); -#endif - /* 0xBFC3AC78: 9529EDB8 lhu $t1, -4680($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4680; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4680)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C78u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x9529EDB8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C78u); -#endif - /* 0xBFC3AC7C: 8D0895F4 lw $t0, -27148($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052C7Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D0895F4u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3AC80: 00025840 sll $t3, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00025840u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC3AC84: 03095021 addu $t2, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[24] + cpu->gpr[9]; - PGXP_ALU(0x03095021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000900u); -#endif - /* 0xBFC3AC88: 010BC821 addu $t9, $t0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[8] + cpu->gpr[11]; - PGXP_ALU(0x010BC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3AC8C: A72A000A sh $t2, 10($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C8Cu); return; } g_debug_last_store_pc = 0x80052C8Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA72A000Au, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AC90: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3AC94: 03E00008 jr $ra */ - psx_delay_BFC3AC94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3AC98: A422EDF2 sh $v0, -4622($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4622; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4622)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052C98u); return; } g_debug_last_store_pc = 0x80052C98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422EDF2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052C98u); -#endif - if (psx_delay_BFC3AC94) { - psx_delay_BFC3AC94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3AC9C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3AC9Cu); - int psx_delay_BFC3ACA8 = 0; - int psx_taken_BFC3ACA8 = 0; - int psx_delay_BFC3ACB0 = 0; - int psx_taken_BFC3ACB0 = 0; - int psx_delay_BFC3ACC8 = 0; - int psx_taken_BFC3ACC8 = 0; - int psx_delay_BFC3ACE0 = 0; - int psx_taken_BFC3ACE0 = 0; - int psx_delay_BFC3ACE8 = 0; - int psx_delay_BFC3AD60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3ACB0u: goto label_BFC3ACB0; - case 0xBFC3ACB8u: goto label_BFC3ACB8; - case 0xBFC3ACD0u: goto label_BFC3ACD0; - case 0xBFC3ACE8u: goto label_BFC3ACE8; - case 0xBFC3ACF4u: goto label_BFC3ACF4; - default: break; - } - } -label_BFC3AC9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AC9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3AC9C: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3ACA0: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3ACA4: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3ACA8: 1C80000F bgtz $a0, 0xBFC3ACE8 */ - uint32_t psx_brA_BFC3ACA8 = cpu->gpr[4]; - psx_taken_BFC3ACA8 = ((int32_t)psx_brA_BFC3ACA8 > 0); - psx_delay_BFC3ACA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3ACAC: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052CACu); -#endif - if (psx_delay_BFC3ACA8) { - psx_delay_BFC3ACA8 = 0; - if (psx_taken_BFC3ACA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CE8u); - goto label_BFC3ACE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CB0u); - } -label_BFC3ACB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ACB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ACB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3ACB0: 0480000D bltz $a0, 0xBFC3ACE8 */ - uint32_t psx_brA_BFC3ACB0 = cpu->gpr[4]; - psx_taken_BFC3ACB0 = ((int32_t)psx_brA_BFC3ACB0 < 0); - psx_delay_BFC3ACB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ACB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052CB4u); -#endif - if (psx_delay_BFC3ACB0) { - psx_delay_BFC3ACB0 = 0; - if (psx_taken_BFC3ACB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CE8u); - goto label_BFC3ACE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CB8u); - } -label_BFC3ACB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ACB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ACB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3ACB8: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3ACBC: 01C47021 addu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[4]; - PGXP_ALU(0x01C47021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CC0u); -#endif - /* 0xBFC3ACC0: 91CEEDB2 lbu $t6, -4686($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4686; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4686)), 14, 0x4000u); - PGXP_LOAD(0x91CEEDB2u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3ACC4: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3ACC8: 15C10007 bne $t6, $at, 0xBFC3ACE8 */ - uint32_t psx_brA_BFC3ACC8 = cpu->gpr[14]; uint32_t psx_brB_BFC3ACC8 = cpu->gpr[1]; - psx_taken_BFC3ACC8 = (psx_brA_BFC3ACC8 != psx_brB_BFC3ACC8); - psx_delay_BFC3ACC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ACCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052CCCu); -#endif - if (psx_delay_BFC3ACC8) { - psx_delay_BFC3ACC8 = 0; - if (psx_taken_BFC3ACC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CE8u); - goto label_BFC3ACE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CD0u); - } -label_BFC3ACD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ACD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ACD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3ACD0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052CD0u); -#endif - /* 0xBFC3ACD4: 85EF95F0 lh $t7, -27152($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052CD4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EF95F0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ACD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8022u); -#endif - /* 0xBFC3ACDC: 00AF082A slt $at, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x00AF082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3ACE0: 14200004 bne $at, $zero, 0xBFC3ACF4 */ - uint32_t psx_brA_BFC3ACE0 = cpu->gpr[1]; uint32_t psx_brB_BFC3ACE0 = cpu->gpr[0]; - psx_taken_BFC3ACE0 = (psx_brA_BFC3ACE0 != psx_brB_BFC3ACE0); - psx_delay_BFC3ACE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC3ACE4: 0004C080 sll $t8, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[4] << 2u; - PGXP_ALU(0x0004C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052CE4u); -#endif - if (psx_delay_BFC3ACE0) { - psx_delay_BFC3ACE0 = 0; - if (psx_taken_BFC3ACE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CF4u); - goto label_BFC3ACF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052CE8u); - } -label_BFC3ACE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ACE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ACE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3ACE8: 03E00008 jr $ra */ - psx_delay_BFC3ACE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ACEC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052CECu); -#endif - if (psx_delay_BFC3ACE8) { - psx_delay_BFC3ACE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3ACF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ACF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ACF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3ACF4: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3ACF8: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052CF8u); -#endif - /* 0xBFC3ACFC: 8F39EDF8 lw $t9, -4616($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4616; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4616)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052CFCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39EDF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC3AD00: 00044080 sll $t0, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00044080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3AD04: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AD08: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3AD0C: 01284821 addu $t1, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D10u); -#endif - /* 0xBFC3AD10: 8D29EDFC lw $t1, -4612($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D10u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29EDFCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC3AD14: 00045080 sll $t2, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00045080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3AD18: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3AD1C: AC399EF8 sw $t9, -24840($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24840; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24840)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D1Cu); return; } g_debug_last_store_pc = 0x80052D1Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399EF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AD20: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3AD24: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052D24u); -#endif - /* 0xBFC3AD28: 8D6BEE00 lw $t3, -4608($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -4608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-4608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D28u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BEE00u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3AD2C: AC299EFC sw $t1, -24836($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D2Cu); return; } g_debug_last_store_pc = 0x80052D2Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299EFCu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AD30: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3AD34: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3AD38: AC2B9F00 sw $t3, -24832($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24832; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D38u); return; } g_debug_last_store_pc = 0x80052D38u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2B9F00u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D38u); -#endif - /* 0xBFC3AD3C: 8D8C9EFC lw $t4, -24836($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D3Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EFCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AD40: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3AD44: 00056900 sll $t5, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[5] << 4u; - PGXP_ALU(0x00056900u, cpu->gpr[13], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3AD48: A024EDD9 sb $a0, -4647($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4647; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052D48u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4647)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA024EDD9u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3AD4C: A025EDDE sb $a1, -4642($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4642; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052D4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4642)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA025EDDEu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC3AD50: 018D7021 addu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] + cpu->gpr[13]; - PGXP_ALU(0x018D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052D50u); -#endif - /* 0xBFC3AD54: 8DCF0008 lw $t7, 8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D54u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3AD58: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3AD5C: A02FEDDF sb $t7, -4641($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4641; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052D5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4641)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEDDFu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3AD60: 03E00008 jr $ra */ - psx_delay_BFC3AD60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AD64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052D64u); -#endif - if (psx_delay_BFC3AD60) { - psx_delay_BFC3AD60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3AD68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3AD68u); - int psx_delay_BFC3AD98 = 0; - int psx_delay_BFC3ADA0 = 0; - int psx_taken_BFC3ADA0 = 0; - int psx_delay_BFC3ADA8 = 0; - int psx_taken_BFC3ADA8 = 0; - int psx_delay_BFC3AE2C = 0; - int psx_taken_BFC3AE2C = 0; - int psx_delay_BFC3AE40 = 0; - int psx_taken_BFC3AE40 = 0; - int psx_delay_BFC3AE48 = 0; - int psx_taken_BFC3AE48 = 0; - int psx_delay_BFC3AE58 = 0; - int psx_delay_BFC3AE60 = 0; - int psx_taken_BFC3AE60 = 0; - int psx_delay_BFC3AE6C = 0; - int psx_delay_BFC3AE7C = 0; - int psx_taken_BFC3AE7C = 0; - int psx_delay_BFC3AF3C = 0; - int psx_delay_BFC3AF60 = 0; - int psx_taken_BFC3AF60 = 0; - int psx_delay_BFC3AF68 = 0; - int psx_taken_BFC3AF68 = 0; - int psx_delay_BFC3AFD0 = 0; - int psx_delay_BFC3AFD8 = 0; - int psx_delay_BFC3AFE4 = 0; - int psx_delay_BFC3B010 = 0; - int psx_taken_BFC3B010 = 0; - int psx_delay_BFC3B04C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3ADA0u: goto label_BFC3ADA0; - case 0xBFC3ADA8u: goto label_BFC3ADA8; - case 0xBFC3ADB0u: goto label_BFC3ADB0; - case 0xBFC3AE34u: goto label_BFC3AE34; - case 0xBFC3AE48u: goto label_BFC3AE48; - case 0xBFC3AE50u: goto label_BFC3AE50; - case 0xBFC3AE60u: goto label_BFC3AE60; - case 0xBFC3AE68u: goto label_BFC3AE68; - case 0xBFC3AE6Cu: goto label_BFC3AE6C; - case 0xBFC3AE74u: goto label_BFC3AE74; - case 0xBFC3AE84u: goto label_BFC3AE84; - case 0xBFC3AEB0u: goto label_BFC3AEB0; - case 0xBFC3AF44u: goto label_BFC3AF44; - case 0xBFC3AF68u: goto label_BFC3AF68; - case 0xBFC3AF70u: goto label_BFC3AF70; - case 0xBFC3AFD8u: goto label_BFC3AFD8; - case 0xBFC3AFE0u: goto label_BFC3AFE0; - case 0xBFC3AFECu: goto label_BFC3AFEC; - case 0xBFC3B004u: goto label_BFC3B004; - case 0xBFC3B018u: goto label_BFC3B018; - case 0xBFC3B028u: goto label_BFC3B028; - case 0xBFC3B02Cu: goto label_BFC3B02C; - case 0xBFC3B03Cu: goto label_BFC3B03C; - default: break; - } - } -label_BFC3AD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3AD68: 27BDFE90 addiu $sp, $sp, -368 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-368)); - PGXP_ALU(0x27BDFE90u, cpu->gpr[29], _pgx1, 0xFFFFFE90u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3AD6C: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D6Cu); return; } g_debug_last_store_pc = 0x80052D6Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC3AD70: 00058400 sll $s0, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[16] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00058400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3AD74: AFB10024 sw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D74u); return; } g_debug_last_store_pc = 0x80052D74u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3AD78: AFA60178 sw $a2, 376($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 376; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (376)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D78u); return; } g_debug_last_store_pc = 0x80052D78u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60178u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010u); -#endif - /* 0xBFC3AD7C: 00048C00 sll $s1, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00048C00u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3AD80: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3AD84: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D84u); return; } g_debug_last_store_pc = 0x80052D84u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3AD88: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052D88u); return; } g_debug_last_store_pc = 0x80052D88u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D88u); -#endif - /* 0xBFC3AD8C: 87A50178 lh $a1, 376($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 376; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (376)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052D8Cu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50178u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80052D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40080u); -#endif - /* 0xBFC3AD90: 30F2FFFF andi $s2, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[18] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30F2FFFFu, cpu->gpr[18], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3AD94: 00118C03 sra $s1, $s1, 16 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 16u); - PGXP_ALU(0x00118C03u, cpu->gpr[17], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AD98: 0C014B27 jal 0xB0052C9C */ - cpu->gpr[31] = 0x80052DA0u; /* jal link before delay slot */ - psx_delay_BFC3AD98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3AD9C: 02002021 addu $a0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052D9Cu); -#endif - if (psx_delay_BFC3AD98) { - psx_delay_BFC3AD98 = 0; - cpu->gpr[31] = 0x80052DA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052C9Cu); - cpu->pc = 0x80052C9Cu; return; - } -label_BFC3ADA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ADA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ADA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ADA0: 10400003 beq $v0, $zero, 0xBFC3ADB0 */ - uint32_t psx_brA_BFC3ADA0 = cpu->gpr[2]; uint32_t psx_brB_BFC3ADA0 = cpu->gpr[0]; - psx_taken_BFC3ADA0 = (psx_brA_BFC3ADA0 == psx_brB_BFC3ADA0); - psx_delay_BFC3ADA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ADA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052DA4u); -#endif - if (psx_delay_BFC3ADA0) { - psx_delay_BFC3ADA0 = 0; - if (psx_taken_BFC3ADA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052DB0u); - goto label_BFC3ADB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052DA8u); - } -label_BFC3ADA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ADA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ADA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ADA8: 100000A4 beq $zero, $zero, 0xBFC3B03C */ - uint32_t psx_brA_BFC3ADA8 = cpu->gpr[0]; uint32_t psx_brB_BFC3ADA8 = cpu->gpr[0]; - psx_taken_BFC3ADA8 = (psx_brA_BFC3ADA8 == psx_brB_BFC3ADA8); - psx_delay_BFC3ADA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ADAC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052DACu); -#endif - if (psx_delay_BFC3ADA8) { - psx_delay_BFC3ADA8 = 0; - if (psx_taken_BFC3ADA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005303Cu); - goto label_BFC3B03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052DB0u); - } -label_BFC3ADB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ADB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ADB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3ADB0: AFB30050 sw $s3, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052DB0u); return; } g_debug_last_store_pc = 0x80052DB0u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30050u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3ADB4: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052DB4u); -#endif - /* 0xBFC3ADB8: 8273EDDF lb $s3, -4641($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -4641; cpu->gpr[19] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (-4641)), 19, 0x80000u); - PGXP_LOAD(0x8273EDDFu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3ADBC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DC0u); -#endif - /* 0xBFC3ADC0: 87A60178 lh $a2, 376($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 376; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (376)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052DC0u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x87A60178u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3ADC4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052DC4u); -#endif - /* 0xBFC3ADC8: 97A30180 lhu $v1, 384($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052DC8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x97A30180u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DC8u); -#endif - /* 0xBFC3ADCC: 97AE0184 lhu $t6, 388($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 388; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052DCCu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x97AE0184u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DD0u); -#endif - /* 0xBFC3ADD0: 8DEF9EFC lw $t7, -24836($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052DD0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9EFCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60000000u); -#endif - /* 0xBFC3ADD4: AFBE0048 sw $fp, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052DD4u); return; } g_debug_last_store_pc = 0x80052DD4u; cpu->write_word(psx_addr, cpu->gpr[30]); } - PGXP_STORE(0xAFBE0048u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40040001u); -#endif - /* 0xBFC3ADD8: 0240F021 addu $fp, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x0240F021u, cpu->gpr[30], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000040u); -#endif - /* 0xBFC3ADDC: 0006C100 sll $t8, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[6] << 4u; - PGXP_ALU(0x0006C100u, cpu->gpr[24], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC3ADE0: AFB7004C sw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052DE0u); return; } g_debug_last_store_pc = 0x80052DE0u; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC3ADE4: A031EDD8 sb $s1, -4648($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4648; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052DE4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4648)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA031EDD8u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000002u); -#endif - /* 0xBFC3ADE8: A03EEDDA sb $fp, -4646($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4646; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052DE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4646)), (uint8_t)(cpu->gpr[30] & 0xFFu)); - PGXP_STORE(0xA03EEDDAu, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3ADEC: A020EDDB sb $zero, -4645($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4645; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052DECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4645)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA020EDDBu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3ADF0: A023EDDC sb $v1, -4644($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4644; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052DF0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4644)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EDDCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3ADF4: A02EEDDD sb $t6, -4643($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4643; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052DF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4643)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EEDDDu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC3ADF8: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052DF8u); -#endif - /* 0xBFC3ADFC: 90590001 lbu $t9, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 25, 0x4u); - PGXP_LOAD(0x90590001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AE00: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3AE04: A039EDE2 sb $t9, -4638($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4638; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052E04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4638)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA039EDE2u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E04u); -#endif - /* 0xBFC3AE08: 90480004 lbu $t0, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 8, 0x4u); - PGXP_LOAD(0x90480004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3AE0C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3AE10: A028EDE3 sb $t0, -4637($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4637; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052E10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4637)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA028EDE3u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E10u); -#endif - /* 0xBFC3AE14: 90490000 lbu $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 9, 0x4u); - PGXP_LOAD(0x90490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E14u); -#endif - /* 0xBFC3AE18: 8D4A9EF8 lw $t2, -24840($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -24840; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-24840)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E18u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9EF8u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3AE1C: A029EDE4 sb $t1, -4636($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4636; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052E1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4636)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA029EDE4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E20u); -#endif - /* 0xBFC3AE20: 954B0012 lhu $t3, 18($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052E20u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x400u); } - PGXP_LOAD(0x954B0012u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800001u); -#endif - /* 0xBFC3AE24: 0000B821 addu $s7, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x0000B821u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80802u); -#endif - /* 0xBFC3AE28: 026B082B sltu $at, $s3, $t3 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[1] = (uint32_t)(cpu->gpr[19] < cpu->gpr[11] ? 1 : 0); - PGXP_ALU(0x026B082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AE2C: 14200006 bne $at, $zero, 0xBFC3AE48 */ - uint32_t psx_brA_BFC3AE2C = cpu->gpr[1]; uint32_t psx_brB_BFC3AE2C = cpu->gpr[0]; - psx_taken_BFC3AE2C = (psx_brA_BFC3AE2C != psx_brB_BFC3AE2C); - psx_delay_BFC3AE2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AE30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052E30u); -#endif - if (psx_delay_BFC3AE2C) { - psx_delay_BFC3AE2C = 0; - if (psx_taken_BFC3AE2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E48u); - goto label_BFC3AE48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E34u); - } -label_BFC3AE34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E34u); -#endif - /* 0xBFC3AE34: 8FB30050 lw $s3, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E34u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30050u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E34u); -#endif - /* 0xBFC3AE38: 8FB7004C lw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E38u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E38u); -#endif - /* 0xBFC3AE3C: 8FBE0048 lw $fp, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E3Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0048u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AE40: 1000007E beq $zero, $zero, 0xBFC3B03C */ - uint32_t psx_brA_BFC3AE40 = cpu->gpr[0]; uint32_t psx_brB_BFC3AE40 = cpu->gpr[0]; - psx_taken_BFC3AE40 = (psx_brA_BFC3AE40 == psx_brB_BFC3AE40); - psx_delay_BFC3AE40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3AE44: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052E44u); -#endif - if (psx_delay_BFC3AE40) { - psx_delay_BFC3AE40 = 0; - if (psx_taken_BFC3AE40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005303Cu); - goto label_BFC3B03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E48u); - } -label_BFC3AE48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3AE48: 14600008 bne $v1, $zero, 0xBFC3AE6C */ - uint32_t psx_brA_BFC3AE48 = cpu->gpr[3]; uint32_t psx_brB_BFC3AE48 = cpu->gpr[0]; - psx_taken_BFC3AE48 = (psx_brA_BFC3AE48 != psx_brB_BFC3AE48); - psx_delay_BFC3AE48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3AE4C: 27A40068 addiu $a0, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27A40068u, cpu->gpr[4], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x80052E4Cu); -#endif - if (psx_delay_BFC3AE48) { - psx_delay_BFC3AE48 = 0; - if (psx_taken_BFC3AE48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E6Cu); - goto label_BFC3AE6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E50u); - } -label_BFC3AE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20011u); -#endif - /* 0xBFC3AE50: 02202021 addu $a0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10021u); -#endif - /* 0xBFC3AE54: 02002821 addu $a1, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AE58: 0C014C15 jal 0xB0053054 */ - cpu->gpr[31] = 0x80052E60u; /* jal link before delay slot */ - psx_delay_BFC3AE58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40081u); -#endif - /* 0xBFC3AE5C: 02403821 addu $a3, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02403821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E5Cu); -#endif - if (psx_delay_BFC3AE58) { - psx_delay_BFC3AE58 = 0; - cpu->gpr[31] = 0x80052E60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053054u); - cpu->pc = 0x80053054u; return; - } -label_BFC3AE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AE60: 10000072 beq $zero, $zero, 0xBFC3B02C */ - uint32_t psx_brA_BFC3AE60 = cpu->gpr[0]; uint32_t psx_brB_BFC3AE60 = cpu->gpr[0]; - psx_taken_BFC3AE60 = (psx_brA_BFC3AE60 == psx_brB_BFC3AE60); - psx_delay_BFC3AE60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800005u); -#endif - /* 0xBFC3AE64: 02E01021 addu $v0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E64u); -#endif - if (psx_delay_BFC3AE60) { - psx_delay_BFC3AE60 = 0; - if (psx_taken_BFC3AE60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005302Cu); - goto label_BFC3B02C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E68u); - } -label_BFC3AE68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3AE68: 27A40068 addiu $a0, $sp, 104 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (104)); - PGXP_ALU(0x27A40068u, cpu->gpr[4], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x80052E68u); -#endif -label_BFC3AE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AE6C: 0C014AB1 jal 0xB0052AC4 */ - cpu->gpr[31] = 0x80052E74u; /* jal link before delay slot */ - psx_delay_BFC3AE6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3AE70: 27A500E8 addiu $a1, $sp, 232 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (232)); - PGXP_ALU(0x27A500E8u, cpu->gpr[5], _pgx1, 0x000000E8u); } -#ifdef PSX_COSIM - cosim_instr(0x80052E70u); -#endif - if (psx_delay_BFC3AE6C) { - psx_delay_BFC3AE6C = 0; - cpu->gpr[31] = 0x80052E74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052AC4u); - cpu->pc = 0x80052AC4u; return; - } -label_BFC3AE74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3AE74: 304C00FF andi $t4, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304C00FFu, cpu->gpr[12], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40004u); -#endif - /* 0xBFC3AE78: 305200FF andi $s2, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[18] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x305200FFu, cpu->gpr[18], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3AE7C: 1180006A beq $t4, $zero, 0xBFC3B028 */ - uint32_t psx_brA_BFC3AE7C = cpu->gpr[12]; uint32_t psx_brB_BFC3AE7C = cpu->gpr[0]; - psx_taken_BFC3AE7C = (psx_brA_BFC3AE7C == psx_brB_BFC3AE7C); - psx_delay_BFC3AE7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3AE80: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052E80u); -#endif - if (psx_delay_BFC3AE7C) { - psx_delay_BFC3AE7C = 0; - if (psx_taken_BFC3AE7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053028u); - goto label_BFC3B028; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052E84u); - } -label_BFC3AE84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AE84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3AE84: AFB4003C sw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E84u); return; } g_debug_last_store_pc = 0x80052E84u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC3AE88: 3C14800E lui $s4, 0x800E */ - cpu->gpr[20] = 0x800E0000u; - PGXP_ALU(0x3C14800Eu, cpu->gpr[20], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC3AE8C: AFB50038 sw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E8Cu); return; } g_debug_last_store_pc = 0x80052E8Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3AE90: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3AE94: 3C15800E lui $s5, 0x800E */ - cpu->gpr[21] = 0x800E0000u; - PGXP_ALU(0x3C15800Eu, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC3AE98: AFB60034 sw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052E98u); return; } g_debug_last_store_pc = 0x80052E98u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E98u); -#endif - /* 0xBFC3AE9C: 8273EDDF lb $s3, -4641($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -4641; cpu->gpr[19] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (-4641)), 19, 0x80000u); - PGXP_LOAD(0x8273EDDFu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052EA0u); -#endif - /* 0xBFC3AEA0: 8294EDD9 lb $s4, -4647($s4) */ - { uint32_t _pgxa = cpu->gpr[20] + -4647; cpu->gpr[20] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (-4647)), 20, 0x100000u); - PGXP_LOAD(0x8294EDD9u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400001u); -#endif - /* 0xBFC3AEA4: 24160001 addiu $s6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24160001u, cpu->gpr[22], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80052EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3AEA8: 26B5EA68 addiu $s5, $s5, -5528 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-5528)); - PGXP_ALU(0x26B5EA68u, cpu->gpr[21], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x80052EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC3AEAC: 27AD0170 addiu $t5, $sp, 368 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (368)); - PGXP_ALU(0x27AD0170u, cpu->gpr[13], _pgx1, 0x00000170u); } -#ifdef PSX_COSIM - cosim_instr(0x80052EACu); -#endif -label_BFC3AEB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AEB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16000u); -#endif - /* 0xBFC3AEB0: 020D7021 addu $t6, $s0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[16] + cpu->gpr[13]; - PGXP_ALU(0x020D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052EB0u); -#endif - /* 0xBFC3AEB4: 91CFFF78 lbu $t7, -136($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -136; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-136)), 15, 0x4000u); - PGXP_LOAD(0x91CFFF78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AEB8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1012000u); -#endif - /* 0xBFC3AEBC: 020DC021 addu $t8, $s0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[16] + cpu->gpr[13]; - PGXP_ALU(0x020DC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3AEC0: A42FEDEE sh $t7, -4626($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4626; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052EC0u); return; } g_debug_last_store_pc = 0x80052EC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FEDEEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EC0u); -#endif - /* 0xBFC3AEC4: 8311FEF8 lb $s1, -264($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -264; cpu->gpr[17] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-264)), 17, 0x1000000u); - PGXP_LOAD(0x8311FEF8u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80100u); -#endif - /* 0xBFC3AEC8: 00134100 sll $t0, $s3, 4 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[8] = cpu->gpr[19] << 4u; - PGXP_ALU(0x00134100u, cpu->gpr[8], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3AECC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20300u); -#endif - /* 0xBFC3AED0: 01114821 addu $t1, $t0, $s1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[9] = cpu->gpr[8] + cpu->gpr[17]; - PGXP_ALU(0x01114821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052ED0u); -#endif - /* 0xBFC3AED4: 8F399F00 lw $t9, -24832($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80052ED4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F00u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3AED8: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3AEDC: 000A5940 sll $t3, $t2, 5 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 5u; - PGXP_ALU(0x000A5940u, cpu->gpr[11], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80052EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000804u); -#endif - /* 0xBFC3AEE0: 032B1021 addu $v0, $t9, $t3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[25] + cpu->gpr[11]; - PGXP_ALU(0x032B1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052EE0u); -#endif - /* 0xBFC3AEE4: 904C0000 lbu $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 12, 0x4u); - PGXP_LOAD(0x904C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AEE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3AEEC: A02CEDE8 sb $t4, -4632($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4632; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052EECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4632)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA02CEDE8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052EF0u); -#endif - /* 0xBFC3AEF0: 904E0002 lbu $t6, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 14, 0x4u); - PGXP_LOAD(0x904E0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AEF4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3AEF8: A02EEDE6 sb $t6, -4634($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4634; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052EF8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4634)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EEDE6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EF8u); -#endif - /* 0xBFC3AEFC: 904F0003 lbu $t7, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 15, 0x4u); - PGXP_LOAD(0x904F0003u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AF00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3AF04: A02FEDE7 sb $t7, -4633($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4633; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4633)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEDE7u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F04u); -#endif - /* 0xBFC3AF08: 904D0004 lbu $t5, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[13] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 13, 0x4u); - PGXP_LOAD(0x904D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AF0C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC3AF10: A02DEDE9 sb $t5, -4631($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4631; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4631)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA02DEDE9u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F10u); -#endif - /* 0xBFC3AF14: 90580005 lbu $t8, 5($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 5; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (5)), 24, 0x4u); - PGXP_LOAD(0x90580005u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AF18: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3AF1C: A038EDEA sb $t8, -4630($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4630; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4630)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038EDEAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F20u); -#endif - /* 0xBFC3AF20: 90480001 lbu $t0, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 8, 0x4u); - PGXP_LOAD(0x90480001u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AF24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3AF28: A028EDED sb $t0, -4627($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4627; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4627)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA028EDEDu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F28u); -#endif - /* 0xBFC3AF2C: 90490006 lbu $t1, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6)), 9, 0x4u); - PGXP_LOAD(0x90490006u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AF30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3AF34: A029EDEB sb $t1, -4629($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4629; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4629)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA029EDEBu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F34u); -#endif - /* 0xBFC3AF38: 904A0007 lbu $t2, 7($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 7; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (7)), 10, 0x4u); - PGXP_LOAD(0x904A0007u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AF3C: 0C014913 jal 0xB005244C */ - cpu->gpr[31] = 0x80052F44u; /* jal link before delay slot */ - psx_delay_BFC3AF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3AF40: A02AEDEC sb $t2, -4628($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4628; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4628)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA02AEDECu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F40u); -#endif - if (psx_delay_BFC3AF3C) { - psx_delay_BFC3AF3C = 0; - cpu->gpr[31] = 0x80052F44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005244Cu); - cpu->pc = 0x8005244Cu; return; - } -label_BFC3AF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3AF44: 3C0C800E lui $t4, 0x800E */ - cpu->gpr[12] = 0x800E0000u; - PGXP_ALU(0x3C0C800Eu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F44u); -#endif - /* 0xBFC3AF48: 818CEA60 lb $t4, -5536($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -5536; cpu->gpr[12] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (-5536)), 12, 0x1000u); - PGXP_LOAD(0x818CEA60u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AF4C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3AF50: 0002CC00 sll $t9, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] << 16u; - PGXP_ALU(0x0002CC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC3AF54: 00195C03 sra $t3, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[25] >> 16u); - PGXP_ALU(0x00195C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80052F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3AF58: A422EDF0 sh $v0, -4624($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4624; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052F58u); return; } g_debug_last_store_pc = 0x80052F58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA422EDF0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1802u); -#endif - /* 0xBFC3AF5C: 016C082A slt $at, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[12] ? 1 : 0); - PGXP_ALU(0x016C082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3AF60: 14200003 bne $at, $zero, 0xBFC3AF70 */ - uint32_t psx_brA_BFC3AF60 = cpu->gpr[1]; uint32_t psx_brB_BFC3AF60 = cpu->gpr[0]; - psx_taken_BFC3AF60 = (psx_brA_BFC3AF60 != psx_brB_BFC3AF60); - psx_delay_BFC3AF60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AF64: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F64u); -#endif - if (psx_delay_BFC3AF60) { - psx_delay_BFC3AF60 = 0; - if (psx_taken_BFC3AF60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052F70u); - goto label_BFC3AF70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052F68u); - } -label_BFC3AF68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AF68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AF68: 10000026 beq $zero, $zero, 0xBFC3B004 */ - uint32_t psx_brA_BFC3AF68 = cpu->gpr[0]; uint32_t psx_brB_BFC3AF68 = cpu->gpr[0]; - psx_taken_BFC3AF68 = (psx_brA_BFC3AF68 == psx_brB_BFC3AF68); - psx_delay_BFC3AF68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC3AF6C: A031EDE5 sb $s1, -4635($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4635; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F6Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4635)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA031EDE5u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F6Cu); -#endif - if (psx_delay_BFC3AF68) { - psx_delay_BFC3AF68 = 0; - if (psx_taken_BFC3AF68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053004u); - goto label_BFC3B004; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052F70u); - } -label_BFC3AF70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AF70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3AF70: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F70u); -#endif - /* 0xBFC3AF74: 85CEEDF0 lh $t6, -4624($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052F74u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CEEDF0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3AF78: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3AF7C: 000E7880 sll $t7, $t6, 2 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 2u; - PGXP_ALU(0x000E7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80052F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3AF80: 01EE7823 subu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EE7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3AF84: 000F78C0 sll $t7, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000F78C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80052F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208004u); -#endif - /* 0xBFC3AF88: 02AF1021 addu $v0, $s5, $t7 */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[15]; - PGXP_ALU(0x02AF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400004u); -#endif - /* 0xBFC3AF8C: A0560017 sb $s6, 23($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052F8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (23)), (uint8_t)(cpu->gpr[22] & 0xFFu)); - PGXP_STORE(0xA0560017u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3AF90: A4400002 sh $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052F90u); return; } g_debug_last_store_pc = 0x80052F90u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F90u); -#endif - /* 0xBFC3AF94: 81ADEDD8 lb $t5, -4648($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4648; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-4648)), 13, 0x2000u); - PGXP_LOAD(0x81ADEDD8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100004u); -#endif - /* 0xBFC3AF98: A4540012 sh $s4, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052F98u); return; } g_debug_last_store_pc = 0x80052F98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[20] & 0xFFFFu)); } - PGXP_STORE(0xA4540012u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80004u); -#endif - /* 0xBFC3AF9C: A453000C sh $s3, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052F9Cu); return; } g_debug_last_store_pc = 0x80052F9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[19] & 0xFFFFu)); } - PGXP_STORE(0xA453000Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3AFA0: A44D000A sh $t5, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FA0u); return; } g_debug_last_store_pc = 0x80052FA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA44D000Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FA0u); -#endif - /* 0xBFC3AFA4: 87B80178 lh $t8, 376($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 376; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (376)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FA4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80178u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC3AFA8: A4510010 sh $s1, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FA8u); return; } g_debug_last_store_pc = 0x80052FA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[17] & 0xFFFFu)); } - PGXP_STORE(0xA4510010u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000004u); -#endif - /* 0xBFC3AFAC: A45E0008 sh $fp, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FACu); return; } g_debug_last_store_pc = 0x80052FACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[30] & 0xFFFFu)); } - PGXP_STORE(0xA45E0008u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3AFB0: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3AFB4: A458000E sh $t8, 14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FB4u); return; } g_debug_last_store_pc = 0x80052FB4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA458000Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FB4u); -#endif - /* 0xBFC3AFB8: 8108EDE8 lb $t0, -4632($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4632; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (-4632)), 8, 0x100u); - PGXP_LOAD(0x8108EDE8u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3AFBC: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3AFC0: A4480014 sh $t0, 20($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FC0u); return; } g_debug_last_store_pc = 0x80052FC0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA4480014u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FC0u); -#endif - /* 0xBFC3AFC4: 8529EDEE lh $t1, -4626($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -4626; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FC4u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8529EDEEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3AFC8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3AFCC: A4490000 sh $t1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FCCu); return; } g_debug_last_store_pc = 0x80052FCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AFD0: 0C014ADC jal 0xB0052B70 */ - cpu->gpr[31] = 0x80052FD8u; /* jal link before delay slot */ - psx_delay_BFC3AFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002u); -#endif - /* 0xBFC3AFD4: A031EDE5 sb $s1, -4635($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4635; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80052FD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4635)), (uint8_t)(cpu->gpr[17] & 0xFFu)); - PGXP_STORE(0xA031EDE5u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FD4u); -#endif - if (psx_delay_BFC3AFD0) { - psx_delay_BFC3AFD0 = 0; - cpu->gpr[31] = 0x80052FD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B70u); - cpu->pc = 0x80052B70u; return; - } -label_BFC3AFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AFD8: 0C014A7B jal 0xB00529EC */ - cpu->gpr[31] = 0x80052FE0u; /* jal link before delay slot */ - psx_delay_BFC3AFD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3AFDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80052FDCu); -#endif - if (psx_delay_BFC3AFD8) { - psx_delay_BFC3AFD8 = 0; - cpu->gpr[31] = 0x80052FE0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800529ECu); - cpu->pc = 0x800529ECu; return; - } -label_BFC3AFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC3AFE0: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80052FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3AFE4: 0C01498E jal 0xB0052638 */ - cpu->gpr[31] = 0x80052FECu; /* jal link before delay slot */ - psx_delay_BFC3AFE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3AFE8: 3045FFFF andi $a1, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80052FE8u); -#endif - if (psx_delay_BFC3AFE4) { - psx_delay_BFC3AFE4 = 0; - cpu->gpr[31] = 0x80052FECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052638u); - cpu->pc = 0x80052638u; return; - } -label_BFC3AFEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3AFECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3AFECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3AFEC: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80052FF0u); -#endif - /* 0xBFC3AFF0: 8739EDF0 lh $t9, -4624($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4624; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80052FF0u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8739EDF0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3AFF4: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80052FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800400u); -#endif - /* 0xBFC3AFF8: 00175100 sll $t2, $s7, 4 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[10] = cpu->gpr[23] << 4u; - PGXP_ALU(0x00175100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80052FF8u); -#endif - /* 0xBFC3AFFC: 8273EDDF lb $s3, -4641($s3) */ - { uint32_t _pgxa = cpu->gpr[19] + -4641; cpu->gpr[19] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (-4641)), 19, 0x80000u); - PGXP_LOAD(0x8273EDDFu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80052FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2800400u); -#endif - /* 0xBFC3B000: 0159B825 or $s7, $t2, $t9 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[23] = cpu->gpr[10] | cpu->gpr[25]; - PGXP_ALU(0x0159B825u, cpu->gpr[23], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053000u); -#endif -label_BFC3B004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B004: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B008: 321000FF andi $s0, $s0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFu; - PGXP_ALU(0x321000FFu, cpu->gpr[16], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC3B00C: 0212082B sltu $at, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0212082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005300Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B010: 1420FFA7 bne $at, $zero, 0xBFC3AEB0 */ - uint32_t psx_brA_BFC3B010 = cpu->gpr[1]; uint32_t psx_brB_BFC3B010 = cpu->gpr[0]; - psx_taken_BFC3B010 = (psx_brA_BFC3B010 != psx_brB_BFC3B010); - psx_delay_BFC3B010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC3B014: 27AD0170 addiu $t5, $sp, 368 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[29] + (368)); - PGXP_ALU(0x27AD0170u, cpu->gpr[13], _pgx1, 0x00000170u); } -#ifdef PSX_COSIM - cosim_instr(0x80053014u); -#endif - if (psx_delay_BFC3B010) { - psx_delay_BFC3B010 = 0; - if (psx_taken_BFC3B010) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052EB0u); - goto label_BFC3AEB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053018u); - } -label_BFC3B018: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B018u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053018u); -#endif - /* 0xBFC3B018: 8FB4003C lw $s4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053018u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4003Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80053018u); -#endif - /* 0xBFC3B01C: 8FB50038 lw $s5, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005301Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50038u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8005301Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053020u); -#endif - /* 0xBFC3B020: 8FB60034 lw $s6, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053020u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60034u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80053020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053024u); -#endif -label_BFC3B028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800005u); -#endif - /* 0xBFC3B028: 02E01021 addu $v0, $s7, $zero */ - { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[0]; - PGXP_ALU(0x02E01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053028u); -#endif -label_BFC3B02C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B02Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005302Cu); -#endif - /* 0xBFC3B02C: 8FB7004C lw $s7, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005302Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB7004Cu, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8005302Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053030u); -#endif - /* 0xBFC3B030: 8FB30050 lw $s3, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053030u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30050u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80053030u); -#endif - /* 0xBFC3B034: 8FBE0048 lw $fp, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053034u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } - PGXP_LOAD(0x8FBE0048u, _pgxa, cpu->gpr[30]); } -#ifdef PSX_COSIM - cosim_instr(0x80053034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B038: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053038u); -#endif -label_BFC3B03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005303Cu); -#endif - /* 0xBFC3B03C: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005303Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005303Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053040u); -#endif - /* 0xBFC3B040: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053040u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053040u); -#endif - /* 0xBFC3B044: 8FB10024 lw $s1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053044u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10024u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80053044u); -#endif - /* 0xBFC3B048: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053048u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80053048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B04C: 03E00008 jr $ra */ - psx_delay_BFC3B04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B050: 27BD0170 addiu $sp, $sp, 368 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (368)); - PGXP_ALU(0x27BD0170u, cpu->gpr[29], _pgx1, 0x00000170u); } -#ifdef PSX_COSIM - cosim_instr(0x80053050u); -#endif - if (psx_delay_BFC3B04C) { - psx_delay_BFC3B04C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B054(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B054u); - int psx_delay_BFC3B0A0 = 0; - int psx_taken_BFC3B0A0 = 0; - int psx_delay_BFC3B0CC = 0; - int psx_taken_BFC3B0CC = 0; - int psx_delay_BFC3B0DC = 0; - int psx_taken_BFC3B0DC = 0; - int psx_delay_BFC3B0EC = 0; - int psx_taken_BFC3B0EC = 0; - int psx_delay_BFC3B0FC = 0; - int psx_taken_BFC3B0FC = 0; - int psx_delay_BFC3B108 = 0; - int psx_delay_BFC3B124 = 0; - int psx_taken_BFC3B124 = 0; - int psx_delay_BFC3B158 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B0A8u: goto label_BFC3B0A8; - case 0xBFC3B0B8u: goto label_BFC3B0B8; - case 0xBFC3B0D4u: goto label_BFC3B0D4; - case 0xBFC3B0E4u: goto label_BFC3B0E4; - case 0xBFC3B0F4u: goto label_BFC3B0F4; - case 0xBFC3B104u: goto label_BFC3B104; - case 0xBFC3B110u: goto label_BFC3B110; - case 0xBFC3B118u: goto label_BFC3B118; - case 0xBFC3B12Cu: goto label_BFC3B12C; - case 0xBFC3B134u: goto label_BFC3B134; - default: break; - } - } -label_BFC3B054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B054: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80053054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3B058: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053058u); return; } g_debug_last_store_pc = 0x80053058u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80053058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20800000u); -#endif - /* 0xBFC3B05C: AFB70030 sw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005305Cu); return; } g_debug_last_store_pc = 0x8005305Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } - PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x8005305Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC3B060: AFB6002C sw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053060u); return; } g_debug_last_store_pc = 0x80053060u; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80053060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3B064: 3C12800E lui $s2, 0x800E */ - cpu->gpr[18] = 0x800E0000u; - PGXP_ALU(0x3C12800Eu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC3B068: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053068u); return; } g_debug_last_store_pc = 0x80053068u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80053068u); -#endif - /* 0xBFC3B06C: 8252EA60 lb $s2, -5536($s2) */ - { uint32_t _pgxa = cpu->gpr[18] + -5536; cpu->gpr[18] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[18] + (-5536)), 18, 0x40000u); - PGXP_LOAD(0x8252EA60u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005306Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3B070: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053070u); return; } g_debug_last_store_pc = 0x80053070u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80053070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200040u); -#endif - /* 0xBFC3B074: 0006AC00 sll $s5, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[21] = cpu->gpr[6] << 16u; - PGXP_ALU(0x0006AC00u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400010u); -#endif - /* 0xBFC3B078: 0004B400 sll $s6, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[22] = cpu->gpr[4] << 16u; - PGXP_ALU(0x0004B400u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800020u); -#endif - /* 0xBFC3B07C: 0005BC00 sll $s7, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[23] = cpu->gpr[5] << 16u; - PGXP_ALU(0x0005BC00u, cpu->gpr[23], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005307Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3B080: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053080u); return; } g_debug_last_store_pc = 0x80053080u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3B084: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053084u); return; } g_debug_last_store_pc = 0x80053084u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80053084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800000u); -#endif - /* 0xBFC3B088: 0017BC03 sra $s7, $s7, 16 */ - { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] >> 16u); - PGXP_ALU(0x0017BC03u, cpu->gpr[23], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC3B08C: 0016B403 sra $s6, $s6, 16 */ - { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 16u); - PGXP_ALU(0x0016B403u, cpu->gpr[22], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005308Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3B090: 0015AC03 sra $s5, $s5, 16 */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] >> 16u); - PGXP_ALU(0x0015AC03u, cpu->gpr[21], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100080u); -#endif - /* 0xBFC3B094: 30F4FFFF andi $s4, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[20] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30F4FFFFu, cpu->gpr[20], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3B098: AFBF0034 sw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053098u); return; } g_debug_last_store_pc = 0x80053098u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC3B09C: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005309Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3B0A0: 12400024 beq $s2, $zero, 0xBFC3B134 */ - uint32_t psx_brA_BFC3B0A0 = cpu->gpr[18]; uint32_t psx_brB_BFC3B0A0 = cpu->gpr[0]; - psx_taken_BFC3B0A0 = (psx_brA_BFC3B0A0 == psx_brB_BFC3B0A0); - psx_delay_BFC3B0A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3B0A4: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800530A4u); -#endif - if (psx_delay_BFC3B0A0) { - psx_delay_BFC3B0A0 = 0; - if (psx_taken_BFC3B0A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053134u); - goto label_BFC3B134; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800530A8u); - } -label_BFC3B0A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B0A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B0A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3B0A8: AFB3003C sw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800530A8u); return; } g_debug_last_store_pc = 0x800530A8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x800530A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3B0AC: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800530ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3B0B0: 2673EA68 addiu $s3, $s3, -5528 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-5528)); - PGXP_ALU(0x2673EA68u, cpu->gpr[19], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x800530B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC3B0B4: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800530B4u); -#endif -label_BFC3B0B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B0B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B0B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC3B0B8: 01D07023 subu $t6, $t6, $s0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[16]; - PGXP_ALU(0x01D07023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800530B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B0BC: 000E70C0 sll $t6, $t6, 3 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 3u; - PGXP_ALU(0x000E70C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800530BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84004u); -#endif - /* 0xBFC3B0C0: 026E1021 addu $v0, $s3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[14]; - PGXP_ALU(0x026E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800530C0u); -#endif - /* 0xBFC3B0C4: 844F0008 lh $t7, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800530C4u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x4u); } - PGXP_LOAD(0x844F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800530C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108000u); -#endif - /* 0xBFC3B0CC: 168F0012 bne $s4, $t7, 0xBFC3B118 */ - uint32_t psx_brA_BFC3B0CC = cpu->gpr[20]; uint32_t psx_brB_BFC3B0CC = cpu->gpr[15]; - psx_taken_BFC3B0CC = (psx_brA_BFC3B0CC != psx_brB_BFC3B0CC); - psx_delay_BFC3B0CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530D0u); -#endif - if (psx_delay_BFC3B0CC) { - psx_delay_BFC3B0CC = 0; - if (psx_taken_BFC3B0CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053118u); - goto label_BFC3B118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800530D4u); - } -label_BFC3B0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530D4u); -#endif - /* 0xBFC3B0D4: 8458000E lh $t8, 14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800530D4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x4u); } - PGXP_LOAD(0x8458000Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800530D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC3B0DC: 16B8000E bne $s5, $t8, 0xBFC3B118 */ - uint32_t psx_brA_BFC3B0DC = cpu->gpr[21]; uint32_t psx_brB_BFC3B0DC = cpu->gpr[24]; - psx_taken_BFC3B0DC = (psx_brA_BFC3B0DC != psx_brB_BFC3B0DC); - psx_delay_BFC3B0DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530E0u); -#endif - if (psx_delay_BFC3B0DC) { - psx_delay_BFC3B0DC = 0; - if (psx_taken_BFC3B0DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053118u); - goto label_BFC3B118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800530E4u); - } -label_BFC3B0E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B0E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530E4u); -#endif - /* 0xBFC3B0E4: 8459000A lh $t9, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800530E4u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8459000Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800530E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400000u); -#endif - /* 0xBFC3B0EC: 16D9000A bne $s6, $t9, 0xBFC3B118 */ - uint32_t psx_brA_BFC3B0EC = cpu->gpr[22]; uint32_t psx_brB_BFC3B0EC = cpu->gpr[25]; - psx_taken_BFC3B0EC = (psx_brA_BFC3B0EC != psx_brB_BFC3B0EC); - psx_delay_BFC3B0EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530F0u); -#endif - if (psx_delay_BFC3B0EC) { - psx_delay_BFC3B0EC = 0; - if (psx_taken_BFC3B0EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053118u); - goto label_BFC3B118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800530F4u); - } -label_BFC3B0F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B0F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800530F4u); -#endif - /* 0xBFC3B0F4: 84480012 lh $t0, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800530F4u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x4u); } - PGXP_LOAD(0x84480012u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800530F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B0F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800530F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800100u); -#endif - /* 0xBFC3B0FC: 16E80006 bne $s7, $t0, 0xBFC3B118 */ - uint32_t psx_brA_BFC3B0FC = cpu->gpr[23]; uint32_t psx_brB_BFC3B0FC = cpu->gpr[8]; - psx_taken_BFC3B0FC = (psx_brA_BFC3B0FC != psx_brB_BFC3B0FC); - psx_delay_BFC3B0FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B100: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053100u); -#endif - if (psx_delay_BFC3B0FC) { - psx_delay_BFC3B0FC = 0; - if (psx_taken_BFC3B0FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053118u); - goto label_BFC3B118; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053104u); - } -label_BFC3B104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC3B104: A430EDF0 sh $s0, -4624($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4624; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053104u); return; } g_debug_last_store_pc = 0x80053104u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[16] & 0xFFFFu)); } - PGXP_STORE(0xA430EDF0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B108: 0C014A57 jal 0xB005295C */ - cpu->gpr[31] = 0x80053110u; /* jal link before delay slot */ - psx_delay_BFC3B108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B10C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005310Cu); -#endif - if (psx_delay_BFC3B108) { - psx_delay_BFC3B108 = 0; - cpu->gpr[31] = 0x80053110u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005295Cu); - cpu->pc = 0x8005295Cu; return; - } -label_BFC3B110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3B110: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3B114: 323100FF andi $s1, $s1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] & 0xFFu; - PGXP_ALU(0x323100FFu, cpu->gpr[17], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053114u); -#endif -label_BFC3B118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B118: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B11C: 321000FF andi $s0, $s0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFu; - PGXP_ALU(0x321000FFu, cpu->gpr[16], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005311Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50002u); -#endif - /* 0xBFC3B120: 0212082B sltu $at, $s0, $s2 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0); - PGXP_ALU(0x0212082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B124: 1420FFE4 bne $at, $zero, 0xBFC3B0B8 */ - uint32_t psx_brA_BFC3B124 = cpu->gpr[1]; uint32_t psx_brB_BFC3B124 = cpu->gpr[0]; - psx_taken_BFC3B124 = (psx_brA_BFC3B124 != psx_brB_BFC3B124); - psx_delay_BFC3B124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14000u); -#endif - /* 0xBFC3B128: 00107080 sll $t6, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[14] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00107080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053128u); -#endif - if (psx_delay_BFC3B124) { - psx_delay_BFC3B124 = 0; - if (psx_taken_BFC3B124) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800530B8u); - goto label_BFC3B0B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005312Cu); - } -label_BFC3B12C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B12Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005312Cu); -#endif - /* 0xBFC3B12C: 8FB3003C lw $s3, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005312Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3003Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005312Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B130: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053130u); -#endif -label_BFC3B134: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B134u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053134u); -#endif - /* 0xBFC3B134: 8FBF0034 lw $ra, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053134u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0034u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20005u); -#endif - /* 0xBFC3B138: 02201021 addu $v0, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02201021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053138u); -#endif - /* 0xBFC3B13C: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005313Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005313Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053140u); -#endif - /* 0xBFC3B140: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053140u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053140u); -#endif - /* 0xBFC3B144: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053144u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80053144u); -#endif - /* 0xBFC3B148: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053148u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80053148u); -#endif - /* 0xBFC3B14C: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005314Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8005314Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053150u); -#endif - /* 0xBFC3B150: 8FB6002C lw $s6, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053150u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB6002Cu, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x80053150u); -#endif - /* 0xBFC3B154: 8FB70030 lw $s7, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053154u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } - PGXP_LOAD(0x8FB70030u, _pgxa, cpu->gpr[23]); } -#ifdef PSX_COSIM - cosim_instr(0x80053154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B158: 03E00008 jr $ra */ - psx_delay_BFC3B158 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B15C: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8005315Cu); -#endif - if (psx_delay_BFC3B158) { - psx_delay_BFC3B158 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B160(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B160u); - int psx_delay_BFC3B16C = 0; - int psx_taken_BFC3B16C = 0; - int psx_delay_BFC3B1B0 = 0; - int psx_taken_BFC3B1B0 = 0; - int psx_delay_BFC3B288 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B174u: goto label_BFC3B174; - case 0xBFC3B17Cu: goto label_BFC3B17C; - case 0xBFC3B1B8u: goto label_BFC3B1B8; - default: break; - } - } -label_BFC3B160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B160: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053160u); -#endif - /* 0xBFC3B164: 8063EA60 lb $v1, -5536($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -5536; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-5536)), 3, 0x8u); - PGXP_LOAD(0x8063EA60u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B168: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3B16C: 10600012 beq $v1, $zero, 0xBFC3B1B8 */ - uint32_t psx_brA_BFC3B16C = cpu->gpr[3]; uint32_t psx_brB_BFC3B16C = cpu->gpr[0]; - psx_taken_BFC3B16C = (psx_brA_BFC3B16C == psx_brB_BFC3B16C); - psx_delay_BFC3B16C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B170: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053170u); -#endif - if (psx_delay_BFC3B16C) { - psx_delay_BFC3B16C = 0; - if (psx_taken_BFC3B16C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800531B8u); - goto label_BFC3B1B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053174u); - } -label_BFC3B174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B174: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B178: 2484EA68 addiu $a0, $a0, -5528 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-5528)); - PGXP_ALU(0x2484EA68u, cpu->gpr[4], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x80053178u); -#endif -label_BFC3B17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B17C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005317Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053180u); -#endif - /* 0xBFC3B180: 8DCE95F4 lw $t6, -27148($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053180u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE95F4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3B184: 000278C0 sll $t7, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000278C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80053184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3B188: 00024880 sll $t1, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00024880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3B18C: 01224823 subu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[2]; - PGXP_ALU(0x01224823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005318Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3B190: 000FC040 sll $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 1u; - PGXP_ALU(0x000FC040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80053190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B194: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC3B198: 01D8C821 addu $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] + cpu->gpr[24]; - PGXP_ALU(0x01D8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053198u); -#endif - /* 0xBFC3B19C: 9728000C lhu $t0, 12($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005319Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x2000000u); } - PGXP_LOAD(0x9728000Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005319Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B1A0: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800531A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B1A4: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800531A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x610u); -#endif - /* 0xBFC3B1A8: 00895021 addu $t2, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[4] + cpu->gpr[9]; - PGXP_ALU(0x00895021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC3B1AC: 0043082B sltu $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B1B0: 1420FFF2 bne $at, $zero, 0xBFC3B17C */ - uint32_t psx_brA_BFC3B1B0 = cpu->gpr[1]; uint32_t psx_brB_BFC3B1B0 = cpu->gpr[0]; - psx_taken_BFC3B1B0 = (psx_brA_BFC3B1B0 != psx_brB_BFC3B1B0); - psx_delay_BFC3B1B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC3B1B4: A5480006 sh $t0, 6($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531B4u); return; } g_debug_last_store_pc = 0x800531B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA5480006u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800531B4u); -#endif - if (psx_delay_BFC3B1B0) { - psx_delay_BFC3B1B0 = 0; - if (psx_taken_BFC3B1B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005317Cu); - goto label_BFC3B17C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800531B8u); - } -label_BFC3B1B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B1B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3B1B8: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531B8u); -#endif - /* 0xBFC3B1BC: 958C9F0C lhu $t4, -24820($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531BCu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x958C9F0Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800531BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B1C0: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531C0u); -#endif - /* 0xBFC3B1C4: 956B9F10 lhu $t3, -24816($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24816; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531C4u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x956B9F10u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800531C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3B1C8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531C8u); -#endif - /* 0xBFC3B1CC: 97189F0E lhu $t8, -24818($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -24818; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531CCu); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x97189F0Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800531CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B1D0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3001u); -#endif - /* 0xBFC3B1D4: 01806827 nor $t5, $t4, $zero */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = ~(cpu->gpr[12] | cpu->gpr[0]); - PGXP_ALU(0x01806827u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531D4u); -#endif - /* 0xBFC3B1D8: 95CE9F12 lhu $t6, -24814($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24814; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531D8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x95CE9F12u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800531D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B1DC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA800u); -#endif - /* 0xBFC3B1E0: 016D7824 and $t7, $t3, $t5 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[13]; - PGXP_ALU(0x016D7824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B1E4: A42F9F10 sh $t7, -24816($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531E4u); return; } g_debug_last_store_pc = 0x800531E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42F9F10u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800531E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3B1E8: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000001u); -#endif - /* 0xBFC3B1EC: 0300C827 nor $t9, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]); - PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800531F0u); -#endif - /* 0xBFC3B1F0: 8D4A95F4 lw $t2, -27148($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800531F0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A95F4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800531F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B1F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800531F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004200u); -#endif - /* 0xBFC3B1F8: 01D94824 and $t1, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[14] & cpu->gpr[25]; - PGXP_ALU(0x01D94824u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800531F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3B1FC: A4299F12 sh $t1, -24814($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24814; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800531FCu); return; } g_debug_last_store_pc = 0x800531FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4299F12u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800531FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC3B200: 31E8FFFF andi $t0, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[8] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31E8FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC3B204: A548018C sh $t0, 396($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (396)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053204u); return; } g_debug_last_store_pc = 0x80053204u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA548018Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80053204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B208: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3B20C: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005320Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053210u); -#endif - /* 0xBFC3B210: 958C9F12 lhu $t4, -24814($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24814; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053210u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x958C9F12u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053210u); -#endif - /* 0xBFC3B214: 8D6B95F4 lw $t3, -27148($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053214u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B95F4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80053214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3B218: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3B21C: A56C018E sh $t4, 398($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + 398; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (398)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005321Cu); return; } g_debug_last_store_pc = 0x8005321Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA56C018Eu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005321Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3B220: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053220u); -#endif - /* 0xBFC3B224: 95AD9F0C lhu $t5, -24820($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053224u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x95AD9F0Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053224u); -#endif - /* 0xBFC3B228: 8F1895F4 lw $t8, -27148($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053228u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1895F4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B22C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005322Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002000u); -#endif - /* 0xBFC3B230: A70D0188 sh $t5, 392($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (392)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053230u); return; } g_debug_last_store_pc = 0x80053230u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA70D0188u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B234: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053234u); -#endif - /* 0xBFC3B238: 95CE9F0E lhu $t6, -24818($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24818; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053238u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x95CE9F0Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053238u); -#endif - /* 0xBFC3B23C: 8F3995F4 lw $t9, -27148($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005323Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F3995F4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005323Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3B240: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3B244: A72E018A sh $t6, 394($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 394; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (394)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053244u); return; } g_debug_last_store_pc = 0x80053244u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA72E018Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B248: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053248u); -#endif - /* 0xBFC3B24C: 95299F14 lhu $t1, -24812($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -24812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-24812)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005324Cu); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x95299F14u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005324Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053250u); -#endif - /* 0xBFC3B250: 8DEF95F4 lw $t7, -27148($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053250u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF95F4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3B254: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC3B258: A5E90198 sh $t1, 408($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053258u); return; } g_debug_last_store_pc = 0x80053258u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA5E90198u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3B25C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005325Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053260u); -#endif - /* 0xBFC3B260: 8D4A95F4 lw $t2, -27148($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053260u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A95F4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80053260u); -#endif - /* 0xBFC3B264: 95089F16 lhu $t0, -24810($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -24810; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-24810)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053264u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x95089F16u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80053264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B268: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x500u); -#endif - /* 0xBFC3B26C: A548019A sh $t0, 410($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + 410; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005326Cu); return; } g_debug_last_store_pc = 0x8005326Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA548019Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005326Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B270: A4209F10 sh $zero, -24816($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24816)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053270u); return; } g_debug_last_store_pc = 0x80053270u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F10u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B274: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B278: A4209F12 sh $zero, -24814($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24814; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24814)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053278u); return; } g_debug_last_store_pc = 0x80053278u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F12u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B27C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005327Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B280: A4209F0C sh $zero, -24820($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24820)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053280u); return; } g_debug_last_store_pc = 0x80053280u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F0Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B284: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B288: 03E00008 jr $ra */ - psx_delay_BFC3B288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B28C: A4209F0E sh $zero, -24818($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24818; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24818)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005328Cu); return; } g_debug_last_store_pc = 0x8005328Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4209F0Eu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005328Cu); -#endif - if (psx_delay_BFC3B288) { - psx_delay_BFC3B288 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B30C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B30Cu); - int psx_delay_BFC3B318 = 0; - int psx_delay_BFC3B330 = 0; - int psx_taken_BFC3B330 = 0; - int psx_delay_BFC3B348 = 0; - int psx_delay_BFC3B360 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B320u: goto label_BFC3B320; - case 0xBFC3B338u: goto label_BFC3B338; - case 0xBFC3B350u: goto label_BFC3B350; - case 0xBFC3B358u: goto label_BFC3B358; - default: break; - } - } -label_BFC3B30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B30C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005330Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3B310: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053310u); return; } g_debug_last_store_pc = 0x80053310u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3B314: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053314u); return; } g_debug_last_store_pc = 0x80053314u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B318: 0C014CDA jal 0xB0053368 */ - cpu->gpr[31] = 0x80053320u; /* jal link before delay slot */ - psx_delay_BFC3B318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B31C: 2405FFFF addiu $a1, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2405FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005331Cu); -#endif - if (psx_delay_BFC3B318) { - psx_delay_BFC3B318 = 0; - cpu->gpr[31] = 0x80053320u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053368u); - cpu->pc = 0x80053368u; return; - } -label_BFC3B320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3B320: 00027400 sll $t6, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00027400u, cpu->gpr[14], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3B324: 00022C00 sll $a1, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00022C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B328: 000E7C03 sra $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] >> 16u); - PGXP_ALU(0x000E7C03u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B32C: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005332Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B330: 11E10009 beq $t7, $at, 0xBFC3B358 */ - uint32_t psx_brA_BFC3B330 = cpu->gpr[15]; uint32_t psx_brB_BFC3B330 = cpu->gpr[1]; - psx_taken_BFC3B330 = (psx_brA_BFC3B330 == psx_brB_BFC3B330); - psx_delay_BFC3B330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3B334: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053334u); -#endif - if (psx_delay_BFC3B330) { - psx_delay_BFC3B330 = 0; - if (psx_taken_BFC3B330) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053358u); - goto label_BFC3B358; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053338u); - } -label_BFC3B338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3B338: 0005C080 sll $t8, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[5] << 2u; - PGXP_ALU(0x0005C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B33C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005333Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC3B340: 00982021 addu $a0, $a0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[24]; - PGXP_ALU(0x00982021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053340u); -#endif - /* 0xBFC3B344: 8C84EDB4 lw $a0, -4684($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053344u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EDB4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B348: 0C014E17 jal 0xB005385C */ - cpu->gpr[31] = 0x80053350u; /* jal link before delay slot */ - psx_delay_BFC3B348 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B34C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005334Cu); -#endif - if (psx_delay_BFC3B348) { - psx_delay_BFC3B348 = 0; - cpu->gpr[31] = 0x80053350u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005385Cu); - cpu->pc = 0x8005385Cu; return; - } -label_BFC3B350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3B350: 00022C00 sll $a1, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00022C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3B354: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053354u); -#endif -label_BFC3B358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053358u); -#endif - /* 0xBFC3B358: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053358u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B35C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005335Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B360: 03E00008 jr $ra */ - psx_delay_BFC3B360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3B364: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053364u); -#endif - if (psx_delay_BFC3B360) { - psx_delay_BFC3B360 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B368(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B368u); - int psx_delay_BFC3B380 = 0; - int psx_delay_BFC3B394 = 0; - int psx_taken_BFC3B394 = 0; - int psx_delay_BFC3B39C = 0; - int psx_taken_BFC3B39C = 0; - int psx_delay_BFC3B3AC = 0; - int psx_delay_BFC3B3BC = 0; - int psx_taken_BFC3B3BC = 0; - int psx_delay_BFC3B3C4 = 0; - int psx_delay_BFC3B3CC = 0; - int psx_taken_BFC3B3CC = 0; - int psx_delay_BFC3B3D8 = 0; - int psx_taken_BFC3B3D8 = 0; - int psx_delay_BFC3B3F4 = 0; - int psx_taken_BFC3B3F4 = 0; - int psx_delay_BFC3B41C = 0; - int psx_taken_BFC3B41C = 0; - int psx_delay_BFC3B428 = 0; - int psx_taken_BFC3B428 = 0; - int psx_delay_BFC3B43C = 0; - int psx_taken_BFC3B43C = 0; - int psx_delay_BFC3B458 = 0; - int psx_taken_BFC3B458 = 0; - int psx_delay_BFC3B464 = 0; - int psx_taken_BFC3B464 = 0; - int psx_delay_BFC3B490 = 0; - int psx_taken_BFC3B490 = 0; - int psx_delay_BFC3B4A0 = 0; - int psx_delay_BFC3B4BC = 0; - int psx_taken_BFC3B4BC = 0; - int psx_delay_BFC3B4E8 = 0; - int psx_taken_BFC3B4E8 = 0; - int psx_delay_BFC3B4F4 = 0; - int psx_taken_BFC3B4F4 = 0; - int psx_delay_BFC3B504 = 0; - int psx_delay_BFC3B520 = 0; - int psx_taken_BFC3B520 = 0; - int psx_delay_BFC3B528 = 0; - int psx_taken_BFC3B528 = 0; - int psx_delay_BFC3B53C = 0; - int psx_taken_BFC3B53C = 0; - int psx_delay_BFC3B54C = 0; - int psx_taken_BFC3B54C = 0; - int psx_delay_BFC3B574 = 0; - int psx_taken_BFC3B574 = 0; - int psx_delay_BFC3B584 = 0; - int psx_delay_BFC3B5A0 = 0; - int psx_taken_BFC3B5A0 = 0; - int psx_delay_BFC3B5D8 = 0; - int psx_taken_BFC3B5D8 = 0; - int psx_delay_BFC3B608 = 0; - int psx_taken_BFC3B608 = 0; - int psx_delay_BFC3B624 = 0; - int psx_taken_BFC3B624 = 0; - int psx_delay_BFC3B66C = 0; - int psx_taken_BFC3B66C = 0; - int psx_delay_BFC3B690 = 0; - int psx_taken_BFC3B690 = 0; - int psx_delay_BFC3B69C = 0; - int psx_taken_BFC3B69C = 0; - int psx_delay_BFC3B6BC = 0; - int psx_taken_BFC3B6BC = 0; - int psx_delay_BFC3B6E4 = 0; - int psx_delay_BFC3B704 = 0; - int psx_taken_BFC3B704 = 0; - int psx_delay_BFC3B714 = 0; - int psx_delay_BFC3B730 = 0; - int psx_taken_BFC3B730 = 0; - int psx_delay_BFC3B748 = 0; - int psx_taken_BFC3B748 = 0; - int psx_delay_BFC3B758 = 0; - int psx_delay_BFC3B774 = 0; - int psx_taken_BFC3B774 = 0; - int psx_delay_BFC3B7A4 = 0; - int psx_taken_BFC3B7A4 = 0; - int psx_delay_BFC3B7AC = 0; - int psx_taken_BFC3B7AC = 0; - int psx_delay_BFC3B7B8 = 0; - int psx_taken_BFC3B7B8 = 0; - int psx_delay_BFC3B7D0 = 0; - int psx_taken_BFC3B7D0 = 0; - int psx_delay_BFC3B7E8 = 0; - int psx_taken_BFC3B7E8 = 0; - int psx_delay_BFC3B800 = 0; - int psx_taken_BFC3B800 = 0; - int psx_delay_BFC3B824 = 0; - int psx_taken_BFC3B824 = 0; - int psx_delay_BFC3B854 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B388u: goto label_BFC3B388; - case 0xBFC3B39Cu: goto label_BFC3B39C; - case 0xBFC3B3A4u: goto label_BFC3B3A4; - case 0xBFC3B3B4u: goto label_BFC3B3B4; - case 0xBFC3B3C4u: goto label_BFC3B3C4; - case 0xBFC3B3CCu: goto label_BFC3B3CC; - case 0xBFC3B3D4u: goto label_BFC3B3D4; - case 0xBFC3B3E0u: goto label_BFC3B3E0; - case 0xBFC3B3ECu: goto label_BFC3B3EC; - case 0xBFC3B3FCu: goto label_BFC3B3FC; - case 0xBFC3B424u: goto label_BFC3B424; - case 0xBFC3B430u: goto label_BFC3B430; - case 0xBFC3B438u: goto label_BFC3B438; - case 0xBFC3B444u: goto label_BFC3B444; - case 0xBFC3B460u: goto label_BFC3B460; - case 0xBFC3B46Cu: goto label_BFC3B46C; - case 0xBFC3B470u: goto label_BFC3B470; - case 0xBFC3B490u: goto label_BFC3B490; - case 0xBFC3B498u: goto label_BFC3B498; - case 0xBFC3B4A8u: goto label_BFC3B4A8; - case 0xBFC3B4C4u: goto label_BFC3B4C4; - case 0xBFC3B4C8u: goto label_BFC3B4C8; - case 0xBFC3B4F0u: goto label_BFC3B4F0; - case 0xBFC3B4FCu: goto label_BFC3B4FC; - case 0xBFC3B50Cu: goto label_BFC3B50C; - case 0xBFC3B528u: goto label_BFC3B528; - case 0xBFC3B530u: goto label_BFC3B530; - case 0xBFC3B544u: goto label_BFC3B544; - case 0xBFC3B548u: goto label_BFC3B548; - case 0xBFC3B554u: goto label_BFC3B554; - case 0xBFC3B558u: goto label_BFC3B558; - case 0xBFC3B560u: goto label_BFC3B560; - case 0xBFC3B57Cu: goto label_BFC3B57C; - case 0xBFC3B58Cu: goto label_BFC3B58C; - case 0xBFC3B5A8u: goto label_BFC3B5A8; - case 0xBFC3B5ACu: goto label_BFC3B5AC; - case 0xBFC3B5E0u: goto label_BFC3B5E0; - case 0xBFC3B5ECu: goto label_BFC3B5EC; - case 0xBFC3B610u: goto label_BFC3B610; - case 0xBFC3B614u: goto label_BFC3B614; - case 0xBFC3B62Cu: goto label_BFC3B62C; - case 0xBFC3B634u: goto label_BFC3B634; - case 0xBFC3B668u: goto label_BFC3B668; - case 0xBFC3B674u: goto label_BFC3B674; - case 0xBFC3B698u: goto label_BFC3B698; - case 0xBFC3B6A4u: goto label_BFC3B6A4; - case 0xBFC3B6ACu: goto label_BFC3B6AC; - case 0xBFC3B6B8u: goto label_BFC3B6B8; - case 0xBFC3B6C4u: goto label_BFC3B6C4; - case 0xBFC3B6ECu: goto label_BFC3B6EC; - case 0xBFC3B70Cu: goto label_BFC3B70C; - case 0xBFC3B71Cu: goto label_BFC3B71C; - case 0xBFC3B738u: goto label_BFC3B738; - case 0xBFC3B750u: goto label_BFC3B750; - case 0xBFC3B760u: goto label_BFC3B760; - case 0xBFC3B77Cu: goto label_BFC3B77C; - case 0xBFC3B780u: goto label_BFC3B780; - case 0xBFC3B798u: goto label_BFC3B798; - case 0xBFC3B7ACu: goto label_BFC3B7AC; - case 0xBFC3B7B4u: goto label_BFC3B7B4; - case 0xBFC3B7B8u: goto label_BFC3B7B8; - case 0xBFC3B7C0u: goto label_BFC3B7C0; - case 0xBFC3B7D8u: goto label_BFC3B7D8; - case 0xBFC3B7DCu: goto label_BFC3B7DC; - case 0xBFC3B7F0u: goto label_BFC3B7F0; - case 0xBFC3B808u: goto label_BFC3B808; - case 0xBFC3B80Cu: goto label_BFC3B80C; - case 0xBFC3B81Cu: goto label_BFC3B81C; - case 0xBFC3B82Cu: goto label_BFC3B82C; - case 0xBFC3B84Cu: goto label_BFC3B84C; - default: break; - } - } -label_BFC3B368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B368: 27BDFBB8 addiu $sp, $sp, -1096 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-1096)); - PGXP_ALU(0x27BDFBB8u, cpu->gpr[29], _pgx1, 0xFFFFFBB8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3B36C: 00054C00 sll $t1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[9] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00054C00u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005336Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B370: 00094C03 sra $t1, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 16u); - PGXP_ALU(0x00094C03u, cpu->gpr[9], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3B374: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053374u); return; } g_debug_last_store_pc = 0x80053374u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC3B378: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3B37C: AFA70448 sw $a3, 1096($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005337Cu); return; } g_debug_last_store_pc = 0x8005337Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70448u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005337Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B380: 0C01583A jal 0xB00560E8 */ - cpu->gpr[31] = 0x80053388u; /* jal link before delay slot */ - psx_delay_BFC3B380 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3B384: A7A9044C sh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053384u); return; } g_debug_last_store_pc = 0x80053384u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053384u); -#endif - if (psx_delay_BFC3B380) { - psx_delay_BFC3B380 = 0; - cpu->gpr[31] = 0x80053388u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560E8u); - cpu->pc = 0x800560E8u; return; - } -label_BFC3B388: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B388u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B388: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053388u); -#endif - /* 0xBFC3B38C: 8FA70448 lw $a3, 1096($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005338Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70448u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005338Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053390u); -#endif - /* 0xBFC3B390: 87A9044C lh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053390u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3B394: 14450003 bne $v0, $a1, 0xBFC3B3A4 */ - uint32_t psx_brA_BFC3B394 = cpu->gpr[2]; uint32_t psx_brB_BFC3B394 = cpu->gpr[5]; - psx_taken_BFC3B394 = (psx_brA_BFC3B394 != psx_brB_BFC3B394); - psx_delay_BFC3B394 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053398u); -#endif - if (psx_delay_BFC3B394) { - psx_delay_BFC3B394 = 0; - if (psx_taken_BFC3B394) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533A4u); - goto label_BFC3B3A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005339Cu); - } -label_BFC3B39C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B39Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B39Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005339Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B39C: 1000012B beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B39C = cpu->gpr[0]; uint32_t psx_brB_BFC3B39C = cpu->gpr[0]; - psx_taken_BFC3B39C = (psx_brA_BFC3B39C == psx_brB_BFC3B39C); - psx_delay_BFC3B39C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B3A0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800533A0u); -#endif - if (psx_delay_BFC3B39C) { - psx_delay_BFC3B39C = 0; - if (psx_taken_BFC3B39C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533A4u); - } -label_BFC3B3A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3B3A4: AFA70448 sw $a3, 1096($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800533A4u); return; } g_debug_last_store_pc = 0x800533A4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70448u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800533A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3B3A8: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800533A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B3AC: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x800533B4u; /* jal link before delay slot */ - psx_delay_BFC3B3AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3B3B0: A7A9044C sh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800533B0u); return; } g_debug_last_store_pc = 0x800533B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800533B0u); -#endif - if (psx_delay_BFC3B3AC) { - psx_delay_BFC3B3AC = 0; - cpu->gpr[31] = 0x800533B4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B3B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533B4u); -#endif - /* 0xBFC3B3B4: 87A9044C lh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800533B4u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800533B4u); -#endif - /* 0xBFC3B3B8: 8FA70448 lw $a3, 1096($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1096; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800533B8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA70448u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800533B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B3BC: 19200005 blez $t1, 0xBFC3B3D4 */ - uint32_t psx_brA_BFC3B3BC = cpu->gpr[9]; - psx_taken_BFC3B3BC = ((int32_t)psx_brA_BFC3B3BC <= 0); - psx_delay_BFC3B3BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B3C0: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800533C0u); -#endif - if (psx_delay_BFC3B3BC) { - psx_delay_BFC3B3BC = 0; - if (psx_taken_BFC3B3BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533D4u); - goto label_BFC3B3D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533C4u); - } -label_BFC3B3C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B3C4: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x800533CCu; /* jal link before delay slot */ - psx_delay_BFC3B3C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B3C8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800533C8u); -#endif - if (psx_delay_BFC3B3C4) { - psx_delay_BFC3B3C4 = 0; - cpu->gpr[31] = 0x800533CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B3CC: 1000011F beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B3CC = cpu->gpr[0]; uint32_t psx_brB_BFC3B3CC = cpu->gpr[0]; - psx_taken_BFC3B3CC = (psx_brA_BFC3B3CC == psx_brB_BFC3B3CC); - psx_delay_BFC3B3CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B3D0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800533D0u); -#endif - if (psx_delay_BFC3B3CC) { - psx_delay_BFC3B3CC = 0; - if (psx_taken_BFC3B3CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533D4u); - } -label_BFC3B3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B3D4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800533D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3B3D8: 1521001A bne $t1, $at, 0xBFC3B444 */ - uint32_t psx_brA_BFC3B3D8 = cpu->gpr[9]; uint32_t psx_brB_BFC3B3D8 = cpu->gpr[1]; - psx_taken_BFC3B3D8 = (psx_brA_BFC3B3D8 != psx_brB_BFC3B3D8); - psx_delay_BFC3B3D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B3DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800533DCu); -#endif - if (psx_delay_BFC3B3D8) { - psx_delay_BFC3B3D8 = 0; - if (psx_taken_BFC3B3D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053444u); - goto label_BFC3B444; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533E0u); - } -label_BFC3B3E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B3E0: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800533E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B3E4: 2442EDB2 addiu $v0, $v0, -4686 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4686)); - PGXP_ALU(0x2442EDB2u, cpu->gpr[2], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x800533E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3B3E8: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800533E8u); -#endif -label_BFC3B3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533ECu); -#endif - /* 0xBFC3B3EC: 904E0000 lbu $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 14, 0x4u); - PGXP_LOAD(0x904E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800533ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B3F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800533F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3B3F4: 15C0000B bne $t6, $zero, 0xBFC3B424 */ - uint32_t psx_brA_BFC3B3F4 = cpu->gpr[14]; uint32_t psx_brB_BFC3B3F4 = cpu->gpr[0]; - psx_taken_BFC3B3F4 = (psx_brA_BFC3B3F4 != psx_brB_BFC3B3F4); - psx_delay_BFC3B3F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B3F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800533F8u); -#endif - if (psx_delay_BFC3B3F4) { - psx_delay_BFC3B3F4 = 0; - if (psx_taken_BFC3B3F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053424u); - goto label_BFC3B424; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533FCu); - } -label_BFC3B3FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B3FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800533FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3B3FC: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800533FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3B400: A04F0000 sb $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053400u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3B404: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053404u); -#endif - /* 0xBFC3B408: 8718EDB0 lh $t8, -4688($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053408u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8718EDB0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC3B40C: 00035400 sll $t2, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00035400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005340Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B410: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3B414: 27190001 addiu $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (1)); - PGXP_ALU(0x27190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3B418: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B41C: 10000006 beq $zero, $zero, 0xBFC3B438 */ - uint32_t psx_brA_BFC3B41C = cpu->gpr[0]; uint32_t psx_brB_BFC3B41C = cpu->gpr[0]; - psx_taken_BFC3B41C = (psx_brA_BFC3B41C == psx_brB_BFC3B41C); - psx_delay_BFC3B41C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3B420: A439EDB0 sh $t9, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053420u); return; } g_debug_last_store_pc = 0x80053420u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA439EDB0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053420u); -#endif - if (psx_delay_BFC3B41C) { - psx_delay_BFC3B41C = 0; - if (psx_taken_BFC3B41C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053438u); - goto label_BFC3B438; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053424u); - } -label_BFC3B424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B424: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3B428: 1465FFF0 bne $v1, $a1, 0xBFC3B3EC */ - uint32_t psx_brA_BFC3B428 = cpu->gpr[3]; uint32_t psx_brB_BFC3B428 = cpu->gpr[5]; - psx_taken_BFC3B428 = (psx_brA_BFC3B428 != psx_brB_BFC3B428); - psx_delay_BFC3B428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B42C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005342Cu); -#endif - if (psx_delay_BFC3B428) { - psx_delay_BFC3B428 = 0; - if (psx_taken_BFC3B428) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800533ECu); - goto label_BFC3B3EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053430u); - } -label_BFC3B430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053430u); -#endif - /* 0xBFC3B430: 87AA0440 lh $t2, 1088($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1088)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053430u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0440u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80053430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B434: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053434u); -#endif -label_BFC3B438: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B438u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B438: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B43C: 10000014 beq $zero, $zero, 0xBFC3B490 */ - uint32_t psx_brA_BFC3B43C = cpu->gpr[0]; uint32_t psx_brB_BFC3B43C = cpu->gpr[0]; - psx_taken_BFC3B43C = (psx_brA_BFC3B43C == psx_brB_BFC3B43C); - psx_delay_BFC3B43C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B440: 256BEDB2 addiu $t3, $t3, -4686 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-4686)); - PGXP_ALU(0x256BEDB2u, cpu->gpr[11], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053440u); -#endif - if (psx_delay_BFC3B43C) { - psx_delay_BFC3B43C = 0; - if (psx_taken_BFC3B43C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053490u); - goto label_BFC3B490; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053444u); - } -label_BFC3B444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B444: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B448: 256BEDB2 addiu $t3, $t3, -4686 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-4686)); - PGXP_ALU(0x256BEDB2u, cpu->gpr[11], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA04u); -#endif - /* 0xBFC3B44C: 01691021 addu $v0, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x01691021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005344Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053450u); -#endif - /* 0xBFC3B450: 904C0000 lbu $t4, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 12, 0x4u); - PGXP_LOAD(0x904C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3B458: 11800005 beq $t4, $zero, 0xBFC3B470 */ - uint32_t psx_brA_BFC3B458 = cpu->gpr[12]; uint32_t psx_brB_BFC3B458 = cpu->gpr[0]; - psx_taken_BFC3B458 = (psx_brA_BFC3B458 == psx_brB_BFC3B458); - psx_delay_BFC3B458 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B45C: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005345Cu); -#endif - if (psx_delay_BFC3B458) { - psx_delay_BFC3B458 = 0; - if (psx_taken_BFC3B458) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053470u); - goto label_BFC3B470; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053460u); - } -label_BFC3B460: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B460u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053460u); -#endif - /* 0xBFC3B460: 87AA0440 lh $t2, 1088($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1088)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053460u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0440u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80053460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B464: 1000000A beq $zero, $zero, 0xBFC3B490 */ - uint32_t psx_brA_BFC3B464 = cpu->gpr[0]; uint32_t psx_brB_BFC3B464 = cpu->gpr[0]; - psx_taken_BFC3B464 = (psx_brA_BFC3B464 == psx_brB_BFC3B464); - psx_delay_BFC3B464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B468: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053468u); -#endif - if (psx_delay_BFC3B464) { - psx_delay_BFC3B464 = 0; - if (psx_taken_BFC3B464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053490u); - goto label_BFC3B490; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005346Cu); - } -label_BFC3B46C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B46Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005346Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B46C: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005346Cu); -#endif -label_BFC3B470: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B470u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3B470: A04D0000 sb $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053470u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA04D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B474: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053474u); -#endif - /* 0xBFC3B478: 85CEEDB0 lh $t6, -4688($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053478u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CEEDB0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B47C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005347Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3B480: 00095400 sll $t2, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00095400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B484: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B488: A42FEDB0 sh $t7, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053488u); return; } g_debug_last_store_pc = 0x80053488u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FEDB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3B48C: 000A5403 sra $t2, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5403u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005348Cu); -#endif -label_BFC3B490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3B490: 1940000D blez $t2, 0xBFC3B4C8 */ - uint32_t psx_brA_BFC3B490 = cpu->gpr[10]; - psx_taken_BFC3B490 = ((int32_t)psx_brA_BFC3B490 <= 0); - psx_delay_BFC3B490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC3B494: 000A6880 sll $t5, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[13] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053494u); -#endif - if (psx_delay_BFC3B490) { - psx_delay_BFC3B490 = 0; - if (psx_taken_BFC3B490) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800534C8u); - goto label_BFC3B4C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053498u); - } -label_BFC3B498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000A00u); -#endif - /* 0xBFC3B498: 0169C021 addu $t8, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x0169C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3B49C: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005349Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005349Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B4A0: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x800534A8u; /* jal link before delay slot */ - psx_delay_BFC3B4A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B4A4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800534A4u); -#endif - if (psx_delay_BFC3B4A0) { - psx_delay_BFC3B4A0 = 0; - cpu->gpr[31] = 0x800534A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B4A8: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534A8u); -#endif - /* 0xBFC3B4AC: 8739EDB0 lh $t9, -4688($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800534ACu); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8739EDB0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800534ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B4B0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC3B4B4: 272CFFFF addiu $t4, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x272CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800534B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3B4B8: A42CEDB0 sh $t4, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800534B8u); return; } g_debug_last_store_pc = 0x800534B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CEDB0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800534B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B4BC: 100000E3 beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B4BC = cpu->gpr[0]; uint32_t psx_brB_BFC3B4BC = cpu->gpr[0]; - psx_taken_BFC3B4BC = (psx_brA_BFC3B4BC == psx_brB_BFC3B4BC); - psx_delay_BFC3B4BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B4C0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800534C0u); -#endif - if (psx_delay_BFC3B4BC) { - psx_delay_BFC3B4BC = 0; - if (psx_taken_BFC3B4BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800534C4u); - } -label_BFC3B4C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B4C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2400u); -#endif - /* 0xBFC3B4C4: 000A6880 sll $t5, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[13] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A6880u, cpu->gpr[13], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800534C4u); -#endif -label_BFC3B4C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B4C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B4C8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC3B4CC: 002D0821 addu $at, $at, $t5 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[13]; - PGXP_ALU(0x002D0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800534CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3B4D0: AC27EDF8 sw $a3, -4616($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4616; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4616)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800534D0u); return; } g_debug_last_store_pc = 0x800534D0u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC27EDF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800534D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B4D4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3B4D8: AC279EF8 sw $a3, -24840($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24840; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24840)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800534D8u); return; } g_debug_last_store_pc = 0x800534D8u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279EF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800534D8u); -#endif - /* 0xBFC3B4DC: 8CE20000 lw $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800534DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80u); } - PGXP_LOAD(0x8CE20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800534DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B4E0: 3C035641 lui $v1, 0x5641 */ - cpu->gpr[3] = 0x56410000u; - PGXP_ALU(0x3C035641u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B4E4: 34634220 ori $v1, $v1, 0x4220 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x4220u; - PGXP_ALU(0x34634220u, cpu->gpr[3], _pgx1, 0x4220u); } -#ifdef PSX_COSIM - cosim_instr(0x800534E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3B4E8: 1043000F beq $v0, $v1, 0xBFC3B528 */ - uint32_t psx_brA_BFC3B4E8 = cpu->gpr[2]; uint32_t psx_brB_BFC3B4E8 = cpu->gpr[3]; - psx_taken_BFC3B4E8 = (psx_brA_BFC3B4E8 == psx_brB_BFC3B4E8); - psx_delay_BFC3B4E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B4EC: 3C015641 lui $at, 0x5641 */ - cpu->gpr[1] = 0x56410000u; - PGXP_ALU(0x3C015641u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800534ECu); -#endif - if (psx_delay_BFC3B4E8) { - psx_delay_BFC3B4E8 = 0; - if (psx_taken_BFC3B4E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053528u); - goto label_BFC3B528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800534F0u); - } -label_BFC3B4F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B4F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B4F0: 34214270 ori $at, $at, 0x4270 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x4270u; - PGXP_ALU(0x34214270u, cpu->gpr[1], _pgx1, 0x4270u); } -#ifdef PSX_COSIM - cosim_instr(0x800534F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B4F4: 1041000C beq $v0, $at, 0xBFC3B528 */ - uint32_t psx_brA_BFC3B4F4 = cpu->gpr[2]; uint32_t psx_brB_BFC3B4F4 = cpu->gpr[1]; - psx_taken_BFC3B4F4 = (psx_brA_BFC3B4F4 == psx_brB_BFC3B4F4); - psx_delay_BFC3B4F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B4F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800534F8u); -#endif - if (psx_delay_BFC3B4F4) { - psx_delay_BFC3B4F4 = 0; - if (psx_taken_BFC3B4F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053528u); - goto label_BFC3B528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800534FCu); - } -label_BFC3B4FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B4FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800534FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4A00u); -#endif - /* 0xBFC3B4FC: 01697021 addu $t6, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x01697021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800534FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3B500: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053500u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B504: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x8005350Cu; /* jal link before delay slot */ - psx_delay_BFC3B504 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B508: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053508u); -#endif - if (psx_delay_BFC3B504) { - psx_delay_BFC3B504 = 0; - cpu->gpr[31] = 0x8005350Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B50C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B50Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B50Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3B50C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005350Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053510u); -#endif - /* 0xBFC3B510: 85EFEDB0 lh $t7, -4688($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053510u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EFEDB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B514: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3B518: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3B51C: A438EDB0 sh $t8, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005351Cu); return; } g_debug_last_store_pc = 0x8005351Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438EDB0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005351Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B520: 100000CA beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B520 = cpu->gpr[0]; uint32_t psx_brB_BFC3B520 = cpu->gpr[0]; - psx_taken_BFC3B520 = (psx_brA_BFC3B520 == psx_brB_BFC3B520); - psx_delay_BFC3B520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B524: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053524u); -#endif - if (psx_delay_BFC3B520) { - psx_delay_BFC3B520 = 0; - if (psx_taken_BFC3B520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053528u); - } -label_BFC3B528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3B528: 10430007 beq $v0, $v1, 0xBFC3B548 */ - uint32_t psx_brA_BFC3B528 = cpu->gpr[2]; uint32_t psx_brB_BFC3B528 = cpu->gpr[3]; - psx_taken_BFC3B528 = (psx_brA_BFC3B528 == psx_brB_BFC3B528); - psx_delay_BFC3B528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3B52C: 240C0040 addiu $t4, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240C0040u, cpu->gpr[12], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8005352Cu); -#endif - if (psx_delay_BFC3B528) { - psx_delay_BFC3B528 = 0; - if (psx_taken_BFC3B528) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053548u); - goto label_BFC3B548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053530u); - } -label_BFC3B530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053530u); -#endif - /* 0xBFC3B530: 8CF90004 lw $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053530u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x8CF90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B534: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3B538: 2B210005 slti $at, $t9, 5 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (5) ? 1 : 0); - PGXP_ALU(0x2B210005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x80053538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B53C: 10200006 beq $at, $zero, 0xBFC3B558 */ - uint32_t psx_brA_BFC3B53C = cpu->gpr[1]; uint32_t psx_brB_BFC3B53C = cpu->gpr[0]; - psx_taken_BFC3B53C = (psx_brA_BFC3B53C == psx_brB_BFC3B53C); - psx_delay_BFC3B53C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B540: 240D0080 addiu $t5, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240D0080u, cpu->gpr[13], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80053540u); -#endif - if (psx_delay_BFC3B53C) { - psx_delay_BFC3B53C = 0; - if (psx_taken_BFC3B53C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053558u); - goto label_BFC3B558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053544u); - } -label_BFC3B544: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B544u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3B544: 240C0040 addiu $t4, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x240C0040u, cpu->gpr[12], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80053544u); -#endif -label_BFC3B548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B548: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B54C: 10000004 beq $zero, $zero, 0xBFC3B560 */ - uint32_t psx_brA_BFC3B54C = cpu->gpr[0]; uint32_t psx_brB_BFC3B54C = cpu->gpr[0]; - psx_taken_BFC3B54C = (psx_brA_BFC3B54C == psx_brB_BFC3B54C); - psx_delay_BFC3B54C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3B550: A42C95F0 sh $t4, -27152($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -27152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053550u); return; } g_debug_last_store_pc = 0x80053550u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42C95F0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053550u); -#endif - if (psx_delay_BFC3B54C) { - psx_delay_BFC3B54C = 0; - if (psx_taken_BFC3B54C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053560u); - goto label_BFC3B560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053554u); - } -label_BFC3B554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B554: 240D0080 addiu $t5, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240D0080u, cpu->gpr[13], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80053554u); -#endif -label_BFC3B558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B558: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC3B55C: A42D95F0 sh $t5, -27152($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -27152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005355Cu); return; } g_debug_last_store_pc = 0x8005355Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA42D95F0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005355Cu); -#endif -label_BFC3B560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B560: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053560u); -#endif - /* 0xBFC3B564: 848495F0 lh $a0, -27152($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -27152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053564u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x848495F0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053564u); -#endif - /* 0xBFC3B568: 94E20012 lhu $v0, 18($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053568u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } - PGXP_LOAD(0x94E20012u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B56C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005356Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x16u); -#endif - /* 0xBFC3B570: 0082082B sltu $at, $a0, $v0 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0082082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B574: 1020000D beq $at, $zero, 0xBFC3B5AC */ - uint32_t psx_brA_BFC3B574 = cpu->gpr[1]; uint32_t psx_brB_BFC3B574 = cpu->gpr[0]; - psx_taken_BFC3B574 = (psx_brA_BFC3B574 == psx_brB_BFC3B574); - psx_delay_BFC3B574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3B578: 000AC880 sll $t9, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000AC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053578u); -#endif - if (psx_delay_BFC3B574) { - psx_delay_BFC3B574 = 0; - if (psx_taken_BFC3B574) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800535ACu); - goto label_BFC3B5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005357Cu); - } -label_BFC3B57C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B57Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4A00u); -#endif - /* 0xBFC3B57C: 01697021 addu $t6, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x01697021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005357Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3B580: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053580u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B584: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x8005358Cu; /* jal link before delay slot */ - psx_delay_BFC3B584 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B588: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053588u); -#endif - if (psx_delay_BFC3B584) { - psx_delay_BFC3B584 = 0; - cpu->gpr[31] = 0x8005358Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3B58C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005358Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053590u); -#endif - /* 0xBFC3B590: 85EFEDB0 lh $t7, -4688($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053590u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EFEDB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B594: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3B598: 25F8FFFF addiu $t8, $t7, -1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (-1)); - PGXP_ALU(0x25F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3B59C: A438EDB0 sh $t8, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005359Cu); return; } g_debug_last_store_pc = 0x8005359Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438EDB0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005359Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B5A0: 100000AA beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B5A0 = cpu->gpr[0]; uint32_t psx_brB_BFC3B5A0 = cpu->gpr[0]; - psx_taken_BFC3B5A0 = (psx_brA_BFC3B5A0 == psx_brB_BFC3B5A0); - psx_delay_BFC3B5A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B5A4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800535A4u); -#endif - if (psx_delay_BFC3B5A0) { - psx_delay_BFC3B5A0 = 0; - if (psx_taken_BFC3B5A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800535A8u); - } -label_BFC3B5A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B5A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B5A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3B5A8: 000AC880 sll $t9, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000AC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800535A8u); -#endif -label_BFC3B5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B5AC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800535ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3B5B0: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800535B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC3B5B4: 24E20020 addiu $v0, $a3, 32 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[7] + (32)); - PGXP_ALU(0x24E20020u, cpu->gpr[2], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800535B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3B5B8: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800535B8u); -#endif - /* 0xBFC3B5BC: 85AD95F0 lh $t5, -27152($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -27152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800535BCu); return; } cpu->gpr[13] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x85AD95F0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800535BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B5C0: AC22EDFC sw $v0, -4612($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4612; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800535C0u); return; } g_debug_last_store_pc = 0x800535C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EDFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800535C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B5C4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800535C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010u); -#endif - /* 0xBFC3B5C8: 00046100 sll $t4, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00046100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800535C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B5CC: AC229EFC sw $v0, -24836($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800535CCu); return; } g_debug_last_store_pc = 0x800535CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229EFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800535CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1044u); -#endif - /* 0xBFC3B5D0: 004C3021 addu $a2, $v0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[12]; - PGXP_ALU(0x004C3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800535D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B5D4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800535D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3B5D8: 19A00016 blez $t5, 0xBFC3B634 */ - uint32_t psx_brA_BFC3B5D8 = cpu->gpr[13]; - psx_taken_BFC3B5D8 = ((int32_t)psx_brA_BFC3B5D8 <= 0); - psx_delay_BFC3B5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3B5DC: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800535DCu); -#endif - if (psx_delay_BFC3B5D8) { - psx_delay_BFC3B5D8 = 0; - if (psx_taken_BFC3B5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053634u); - goto label_BFC3B634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800535E0u); - } -label_BFC3B5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B5E0: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800535E0u); -#endif - /* 0xBFC3B5E4: 8C429EFC lw $v0, -24836($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800535E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429EFCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800535E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B5E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800535E8u); -#endif -label_BFC3B5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3B5EC: AC450008 sw $a1, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800535ECu); return; } g_debug_last_store_pc = 0x800535ECu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC450008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800535ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800535F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B5F0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800535F0u); -#endif - /* 0xBFC3B5F4: 8DCE9EFC lw $t6, -24836($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800535F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9EFCu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800535F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3B5F8: 00037900 sll $t7, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 4u; - PGXP_ALU(0x00037900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800535F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC3B5FC: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800535FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053600u); -#endif - /* 0xBFC3B600: 90580000 lbu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 24, 0x4u); - PGXP_LOAD(0x90580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B604: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3B608: 13000002 beq $t8, $zero, 0xBFC3B614 */ - uint32_t psx_brA_BFC3B608 = cpu->gpr[24]; uint32_t psx_brB_BFC3B608 = cpu->gpr[0]; - psx_taken_BFC3B608 = (psx_brA_BFC3B608 == psx_brB_BFC3B608); - psx_delay_BFC3B608 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B60C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005360Cu); -#endif - if (psx_delay_BFC3B608) { - psx_delay_BFC3B608 = 0; - if (psx_taken_BFC3B608) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053614u); - goto label_BFC3B614; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053610u); - } -label_BFC3B610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3B610: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053610u); -#endif -label_BFC3B614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B614: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053614u); -#endif - /* 0xBFC3B618: 873995F0 lh $t9, -27152($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -27152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-27152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053618u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x873995F0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B61C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005361Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000Au); -#endif - /* 0xBFC3B620: 0079082A slt $at, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0079082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B624: 1420FFF1 bne $at, $zero, 0xBFC3B5EC */ - uint32_t psx_brA_BFC3B624 = cpu->gpr[1]; uint32_t psx_brB_BFC3B624 = cpu->gpr[0]; - psx_taken_BFC3B624 = (psx_brA_BFC3B624 != psx_brB_BFC3B624); - psx_delay_BFC3B624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B628: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80053628u); -#endif - if (psx_delay_BFC3B624) { - psx_delay_BFC3B624 = 0; - if (psx_taken_BFC3B624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800535ECu); - goto label_BFC3B5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005362Cu); - } -label_BFC3B62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3B62C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005362Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B630: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053630u); -#endif -label_BFC3B634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC3B634: 000A6080 sll $t4, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B638: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3B63C: 002C0821 addu $at, $at, $t4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[12]; - PGXP_ALU(0x002C0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005363Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3B640: AC26EE00 sw $a2, -4608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053640u); return; } g_debug_last_store_pc = 0x80053640u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EE00u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3B644: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053644u); -#endif - /* 0xBFC3B648: 8DAD9EF8 lw $t5, -24840($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24840; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24840)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053648u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9EF8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B64C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005364Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3B650: AC269F00 sw $a2, -24832($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24832; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053650u); return; } g_debug_last_store_pc = 0x80053650u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC269F00u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053650u); -#endif - /* 0xBFC3B654: 95AE0012 lhu $t6, 18($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053654u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x95AE0012u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053654u); -#endif - /* 0xBFC3B658: 91A80016 lbu $t0, 22($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 22; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (22)), 8, 0x2000u); - PGXP_LOAD(0x91A80016u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80053658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B65C: 000E7A40 sll $t7, $t6, 9 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 9u; - PGXP_ALU(0x000E7A40u, cpu->gpr[15], _pgx1, 9u); } -#ifdef PSX_COSIM - cosim_instr(0x8005365Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC3B660: 00CF3021 addu $a2, $a2, $t7 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[15]; - PGXP_ALU(0x00CF3021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3B664: 24070100 addiu $a3, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24070100u, cpu->gpr[7], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80053664u); -#endif -label_BFC3B668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC3B668: 0103082B sltu $at, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B66C: 14200012 bne $at, $zero, 0xBFC3B6B8 */ - uint32_t psx_brA_BFC3B66C = cpu->gpr[1]; uint32_t psx_brB_BFC3B66C = cpu->gpr[0]; - psx_taken_BFC3B66C = (psx_brA_BFC3B66C != psx_brB_BFC3B66C); - psx_delay_BFC3B66C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B670: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053670u); -#endif - if (psx_delay_BFC3B66C) { - psx_delay_BFC3B66C = 0; - if (psx_taken_BFC3B66C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800536B8u); - goto label_BFC3B6B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053674u); - } -label_BFC3B674: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B674u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3B674: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053674u); -#endif - /* 0xBFC3B678: 8D8C9EF8 lw $t4, -24840($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24840; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24840)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053678u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EF8u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053678u); -#endif - /* 0xBFC3B67C: 94C20000 lhu $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005367Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x94C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005367Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053680u); -#endif - /* 0xBFC3B680: 8D8E0004 lw $t6, 4($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053680u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x1000u); } - PGXP_LOAD(0x8D8E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3B684: 0003C080 sll $t8, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = cpu->gpr[3] << 2u; - PGXP_ALU(0x0003C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3B688: 27B90448 addiu $t9, $sp, 1096 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); - PGXP_ALU(0x27B90448u, cpu->gpr[25], _pgx1, 0x00000448u); } -#ifdef PSX_COSIM - cosim_instr(0x80053688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3B68C: 29C10005 slti $at, $t6, 5 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (5) ? 1 : 0); - PGXP_ALU(0x29C10005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005368Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B690: 10200004 beq $at, $zero, 0xBFC3B6A4 */ - uint32_t psx_brA_BFC3B690 = cpu->gpr[1]; uint32_t psx_brB_BFC3B690 = cpu->gpr[0]; - psx_taken_BFC3B690 = (psx_brA_BFC3B690 == psx_brB_BFC3B690); - psx_delay_BFC3B690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000010u); -#endif - /* 0xBFC3B694: 03192021 addu $a0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03192021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053694u); -#endif - if (psx_delay_BFC3B690) { - psx_delay_BFC3B690 = 0; - if (psx_taken_BFC3B690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800536A4u); - goto label_BFC3B6A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053698u); - } -label_BFC3B698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3B698: 00027880 sll $t7, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00027880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B69C: 10000003 beq $zero, $zero, 0xBFC3B6AC */ - uint32_t psx_brA_BFC3B69C = cpu->gpr[0]; uint32_t psx_brB_BFC3B69C = cpu->gpr[0]; - psx_taken_BFC3B69C = (psx_brA_BFC3B69C == psx_brB_BFC3B69C); - psx_delay_BFC3B69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3B6A0: AC8FFBE8 sw $t7, -1048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-1048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536A0u); return; } g_debug_last_store_pc = 0x800536A0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8FFBE8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800536A0u); -#endif - if (psx_delay_BFC3B69C) { - psx_delay_BFC3B69C = 0; - if (psx_taken_BFC3B69C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800536ACu); - goto label_BFC3B6AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800536A4u); - } -label_BFC3B6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3B6A4: 000268C0 sll $t5, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] << 3u; - PGXP_ALU(0x000268C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800536A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC3B6A8: AC8DFBE8 sw $t5, -1048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1048; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-1048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536A8u); return; } g_debug_last_store_pc = 0x800536A8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC8DFBE8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800536A8u); -#endif -label_BFC3B6AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B6ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536ACu); -#endif - /* 0xBFC3B6AC: 8C98FBE8 lw $t8, -1048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-1048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536ACu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x8C98FBE8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800536ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B6B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800536B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3B6B4: 00B82821 addu $a1, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800536B4u); -#endif -label_BFC3B6B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B6B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B6B8: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800536B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC3B6BC: 1467FFEA bne $v1, $a3, 0xBFC3B668 */ - uint32_t psx_brA_BFC3B6BC = cpu->gpr[3]; uint32_t psx_brB_BFC3B6BC = cpu->gpr[7]; - psx_taken_BFC3B6BC = (psx_brA_BFC3B6BC != psx_brB_BFC3B6BC); - psx_delay_BFC3B6BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3B6C0: 24C60002 addiu $a2, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (2)); - PGXP_ALU(0x24C60002u, cpu->gpr[6], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800536C0u); -#endif - if (psx_delay_BFC3B6BC) { - psx_delay_BFC3B6BC = 0; - if (psx_taken_BFC3B6BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053668u); - goto label_BFC3B668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800536C4u); - } -label_BFC3B6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3B6C4: AFA50028 sw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536C4u); return; } g_debug_last_store_pc = 0x800536C4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800536C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3B6C8: 000AC880 sll $t9, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000AC880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800536C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B6CC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800536CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3B6D0: A3A80438 sb $t0, 1080($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1080; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800536D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (1080)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA3A80438u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800536D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3B6D4: 00390821 addu $at, $at, $t9 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[25]; - PGXP_ALU(0x00390821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800536D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3B6D8: AC26EDB4 sw $a2, -4684($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536D8u); return; } g_debug_last_store_pc = 0x800536D8u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EDB4u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800536D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3B6DC: A7A9044C sh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800536DCu); return; } g_debug_last_store_pc = 0x800536DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800536DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3B6E0: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800536E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B6E4: 0C0158E4 jal 0xB0056390 */ - cpu->gpr[31] = 0x800536ECu; /* jal link before delay slot */ - psx_delay_BFC3B6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC3B6E8: A7AA0440 sh $t2, 1088($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1088; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1088)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800536E8u); return; } g_debug_last_store_pc = 0x800536E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA0440u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800536E8u); -#endif - if (psx_delay_BFC3B6E4) { - psx_delay_BFC3B6E4 = 0; - cpu->gpr[31] = 0x800536ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056390u); - cpu->pc = 0x80056390u; return; - } -label_BFC3B6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536ECu); -#endif - /* 0xBFC3B6EC: 8FA50028 lw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800536ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800536ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800536F0u); -#endif - /* 0xBFC3B6F0: 93A80438 lbu $t0, 1080($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1080; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (1080)), 8, 0x20000000u); - PGXP_LOAD(0x93A80438u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800536F0u); -#endif - /* 0xBFC3B6F4: 87A9044C lh $t1, 1100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800536F4u); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x87A9044Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800536F4u); -#endif - /* 0xBFC3B6F8: 87AA0440 lh $t2, 1088($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 1088; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (1088)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800536F8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x87AA0440u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800536F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B6FC: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800536FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B700: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B704: 1441000C bne $v0, $at, 0xBFC3B738 */ - uint32_t psx_brA_BFC3B704 = cpu->gpr[2]; uint32_t psx_brB_BFC3B704 = cpu->gpr[1]; - psx_taken_BFC3B704 = (psx_brA_BFC3B704 != psx_brB_BFC3B704); - psx_delay_BFC3B704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B708: 256BEDB2 addiu $t3, $t3, -4686 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-4686)); - PGXP_ALU(0x256BEDB2u, cpu->gpr[11], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053708u); -#endif - if (psx_delay_BFC3B704) { - psx_delay_BFC3B704 = 0; - if (psx_taken_BFC3B704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053738u); - goto label_BFC3B738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005370Cu); - } -label_BFC3B70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1A00u); -#endif - /* 0xBFC3B70C: 01696021 addu $t4, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[12] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x01696021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005370Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3B710: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053710u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B714: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x8005371Cu; /* jal link before delay slot */ - psx_delay_BFC3B714 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B718: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053718u); -#endif - if (psx_delay_BFC3B714) { - psx_delay_BFC3B714 = 0; - cpu->gpr[31] = 0x8005371Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B71C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B71Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B71C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005371Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053720u); -#endif - /* 0xBFC3B720: 85CEEDB0 lh $t6, -4688($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053720u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x85CEEDB0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B724: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B728: 25CFFFFF addiu $t7, $t6, -1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (-1)); - PGXP_ALU(0x25CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B72C: A42FEDB0 sh $t7, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005372Cu); return; } g_debug_last_store_pc = 0x8005372Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA42FEDB0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005372Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B730: 10000046 beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B730 = cpu->gpr[0]; uint32_t psx_brB_BFC3B730 = cpu->gpr[0]; - psx_taken_BFC3B730 = (psx_brA_BFC3B730 == psx_brB_BFC3B730); - psx_delay_BFC3B730 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B734: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053734u); -#endif - if (psx_delay_BFC3B730) { - psx_delay_BFC3B730 = 0; - if (psx_taken_BFC3B730) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053738u); - } -label_BFC3B738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B738: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B73C: 34210001 ori $at, $at, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0x1u; - PGXP_ALU(0x34210001u, cpu->gpr[1], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005373Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2024u); -#endif - /* 0xBFC3B740: 00456821 addu $t5, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[2] + cpu->gpr[5]; - PGXP_ALU(0x00456821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC3B744: 01A1082B sltu $at, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[13] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x01A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B748: 1420000D bne $at, $zero, 0xBFC3B780 */ - uint32_t psx_brA_BFC3B748 = cpu->gpr[1]; uint32_t psx_brB_BFC3B748 = cpu->gpr[0]; - psx_taken_BFC3B748 = (psx_brA_BFC3B748 != psx_brB_BFC3B748); - psx_delay_BFC3B748 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400u); -#endif - /* 0xBFC3B74C: 000A7080 sll $t6, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005374Cu); -#endif - if (psx_delay_BFC3B748) { - psx_delay_BFC3B748 = 0; - if (psx_taken_BFC3B748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053780u); - goto label_BFC3B780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053750u); - } -label_BFC3B750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000A00u); -#endif - /* 0xBFC3B750: 0169C021 addu $t8, $t3, $t1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[11] + cpu->gpr[9]; - PGXP_ALU(0x0169C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3B754: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053754u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B758: 0C015830 jal 0xB00560C0 */ - cpu->gpr[31] = 0x80053760u; /* jal link before delay slot */ - psx_delay_BFC3B758 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B75C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005375Cu); -#endif - if (psx_delay_BFC3B758) { - psx_delay_BFC3B758 = 0; - cpu->gpr[31] = 0x80053760u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560C0u); - cpu->pc = 0x800560C0u; return; - } -label_BFC3B760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B760: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053760u); -#endif - /* 0xBFC3B764: 8739EDB0 lh $t9, -4688($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053764u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8739EDB0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B768: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001000u); -#endif - /* 0xBFC3B76C: 272CFFFF addiu $t4, $t9, -1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[25] + (-1)); - PGXP_ALU(0x272CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005376Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3B770: A42CEDB0 sh $t4, -4688($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4688; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4688)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053770u); return; } g_debug_last_store_pc = 0x80053770u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA42CEDB0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B774: 10000035 beq $zero, $zero, 0xBFC3B84C */ - uint32_t psx_brA_BFC3B774 = cpu->gpr[0]; uint32_t psx_brB_BFC3B774 = cpu->gpr[0]; - psx_taken_BFC3B774 = (psx_brA_BFC3B774 == psx_brB_BFC3B774); - psx_delay_BFC3B774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B778: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053778u); -#endif - if (psx_delay_BFC3B774) { - psx_delay_BFC3B774 = 0; - if (psx_taken_BFC3B774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005384Cu); - goto label_BFC3B84C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005377Cu); - } -label_BFC3B77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005377Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4400u); -#endif - /* 0xBFC3B77C: 000A7080 sll $t6, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[14] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A7080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005377Cu); -#endif -label_BFC3B780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B780: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3B784: 002E0821 addu $at, $at, $t6 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[14]; - PGXP_ALU(0x002E0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B788: AC22EE04 sw $v0, -4604($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4604; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4604)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053788u); return; } g_debug_last_store_pc = 0x80053788u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE04u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3B78C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005378Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3B790: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3B794: 27A40448 addiu $a0, $sp, 1096 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); - PGXP_ALU(0x27A40448u, cpu->gpr[4], _pgx1, 0x00000448u); } -#ifdef PSX_COSIM - cosim_instr(0x80053794u); -#endif -label_BFC3B798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053798u); -#endif - /* 0xBFC3B798: 8C8FFBE8 lw $t7, -1048($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -1048; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-1048)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053798u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x8C8FFBE8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B79C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005379Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3B7A0: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800537A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B7A4: 04610004 bgez $v1, 0xBFC3B7B8 */ - uint32_t psx_brA_BFC3B7A4 = cpu->gpr[3]; - psx_taken_BFC3B7A4 = ((int32_t)psx_brA_BFC3B7A4 >= 0); - psx_delay_BFC3B7A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3B7A8: 306D0001 andi $t5, $v1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] & 0x1u; - PGXP_ALU(0x306D0001u, cpu->gpr[13], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800537A8u); -#endif - if (psx_delay_BFC3B7A4) { - psx_delay_BFC3B7A4 = 0; - if (psx_taken_BFC3B7A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537B8u); - goto label_BFC3B7B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537ACu); - } -label_BFC3B7AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B7AC: 11A00002 beq $t5, $zero, 0xBFC3B7B8 */ - uint32_t psx_brA_BFC3B7AC = cpu->gpr[13]; uint32_t psx_brB_BFC3B7AC = cpu->gpr[0]; - psx_taken_BFC3B7AC = (psx_brA_BFC3B7AC == psx_brB_BFC3B7AC); - psx_delay_BFC3B7AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B7B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800537B0u); -#endif - if (psx_delay_BFC3B7AC) { - psx_delay_BFC3B7AC = 0; - if (psx_taken_BFC3B7AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537B8u); - goto label_BFC3B7B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537B4u); - } -label_BFC3B7B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3B7B4: 25ADFFFE addiu $t5, $t5, -2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (-2)); - PGXP_ALU(0x25ADFFFEu, cpu->gpr[13], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x800537B4u); -#endif -label_BFC3B7B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3B7B8: 15A0000D bne $t5, $zero, 0xBFC3B7F0 */ - uint32_t psx_brA_BFC3B7B8 = cpu->gpr[13]; uint32_t psx_brB_BFC3B7B8 = cpu->gpr[0]; - psx_taken_BFC3B7B8 = (psx_brA_BFC3B7B8 != psx_brB_BFC3B7B8); - psx_delay_BFC3B7B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B7BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800537BCu); -#endif - if (psx_delay_BFC3B7B8) { - psx_delay_BFC3B7B8 = 0; - if (psx_taken_BFC3B7B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537F0u); - goto label_BFC3B7F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537C0u); - } -label_BFC3B7C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3B7C0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800537C0u); -#endif - /* 0xBFC3B7C4: 8D8C9EFC lw $t4, -24836($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800537C4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EFCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800537C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000024u); -#endif - /* 0xBFC3B7C8: 0045C021 addu $t8, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[2] + cpu->gpr[5]; - PGXP_ALU(0x0045C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800537C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3B7CC: 0018C8C2 srl $t9, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 3u; - PGXP_ALU(0x0018C8C2u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800537CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B7D0: 04610002 bgez $v1, 0xBFC3B7DC */ - uint32_t psx_brA_BFC3B7D0 = cpu->gpr[3]; - psx_taken_BFC3B7D0 = ((int32_t)psx_brA_BFC3B7D0 >= 0); - psx_delay_BFC3B7D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC3B7D4: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800537D4u); -#endif - if (psx_delay_BFC3B7D0) { - psx_delay_BFC3B7D0 = 0; - if (psx_taken_BFC3B7D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537DCu); - goto label_BFC3B7DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537D8u); - } -label_BFC3B7D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B7D8: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800537D8u); -#endif -label_BFC3B7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3B7DC: 00017043 sra $t6, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017043u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800537DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B7E0: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800537E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xB000u); -#endif - /* 0xBFC3B7E4: 018F6821 addu $t5, $t4, $t7 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[15]; - PGXP_ALU(0x018F6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800537E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B7E8: 1000000C beq $zero, $zero, 0xBFC3B81C */ - uint32_t psx_brA_BFC3B7E8 = cpu->gpr[0]; uint32_t psx_brB_BFC3B7E8 = cpu->gpr[0]; - psx_taken_BFC3B7E8 = (psx_brA_BFC3B7E8 == psx_brB_BFC3B7E8); - psx_delay_BFC3B7E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC3B7EC: A5B9000C sh $t9, 12($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800537ECu); return; } g_debug_last_store_pc = 0x800537ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA5B9000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800537ECu); -#endif - if (psx_delay_BFC3B7E8) { - psx_delay_BFC3B7E8 = 0; - if (psx_taken_BFC3B7E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005381Cu); - goto label_BFC3B81C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800537F0u); - } -label_BFC3B7F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B7F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800537F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3B7F0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800537F0u); -#endif - /* 0xBFC3B7F4: 8D8C9EFC lw $t4, -24836($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -24836; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-24836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800537F4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9EFCu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800537F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000024u); -#endif - /* 0xBFC3B7F8: 0045C021 addu $t8, $v0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[2] + cpu->gpr[5]; - PGXP_ALU(0x0045C021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800537F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC3B7FC: 001870C2 srl $t6, $t8, 3 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[14] = cpu->gpr[24] >> 3u; - PGXP_ALU(0x001870C2u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800537FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B800: 04610002 bgez $v1, 0xBFC3B80C */ - uint32_t psx_brA_BFC3B800 = cpu->gpr[3]; - psx_taken_BFC3B800 = ((int32_t)psx_brA_BFC3B800 >= 0); - psx_delay_BFC3B800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC3B804: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053804u); -#endif - if (psx_delay_BFC3B800) { - psx_delay_BFC3B800 = 0; - if (psx_taken_BFC3B800) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005380Cu); - goto label_BFC3B80C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053808u); - } -label_BFC3B808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B808: 24210001 addiu $at, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[1] + (1)); - PGXP_ALU(0x24210001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053808u); -#endif -label_BFC3B80C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B80Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B80Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B80C: 00017843 sra $t7, $at, 1 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[1] >> 1u); - PGXP_ALU(0x00017843u, cpu->gpr[15], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005380Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC3B810: 000FC900 sll $t9, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[25] = cpu->gpr[15] << 4u; - PGXP_ALU(0x000FC900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80053810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2003000u); -#endif - /* 0xBFC3B814: 01996821 addu $t5, $t4, $t9 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[12] + cpu->gpr[25]; - PGXP_ALU(0x01996821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3B818: A5AE000E sh $t6, 14($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053818u); return; } g_debug_last_store_pc = 0x80053818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA5AE000Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053818u); -#endif -label_BFC3B81C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B81Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B81Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005381Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B81C: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005381Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC3B820: 0103082B sltu $at, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0103082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B824: 1020FFDC beq $at, $zero, 0xBFC3B798 */ - uint32_t psx_brA_BFC3B824 = cpu->gpr[1]; uint32_t psx_brB_BFC3B824 = cpu->gpr[0]; - psx_taken_BFC3B824 = (psx_brA_BFC3B824 == psx_brB_BFC3B824); - psx_delay_BFC3B824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B828: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80053828u); -#endif - if (psx_delay_BFC3B824) { - psx_delay_BFC3B824 = 0; - if (psx_taken_BFC3B824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053798u); - goto label_BFC3B798; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005382Cu); - } -label_BFC3B82C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B82Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC3B82C: 000AC080 sll $t8, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000AC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005382Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3B830: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3B834: 00380821 addu $at, $at, $t8 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[24]; - PGXP_ALU(0x00380821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3B838: AC25EE08 sw $a1, -4600($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4600; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4600)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053838u); return; } g_debug_last_store_pc = 0x80053838u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE08u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3B83C: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005383Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC3B840: 016A6021 addu $t4, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[12] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9000u); -#endif - /* 0xBFC3B844: A18F0000 sb $t7, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053844u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA18F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x405u); -#endif - /* 0xBFC3B848: 01401021 addu $v0, $t2, $zero */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[0]; - PGXP_ALU(0x01401021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053848u); -#endif -label_BFC3B84C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B84Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005384Cu); -#endif - /* 0xBFC3B84C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005384Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005384Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B850: 27BD0448 addiu $sp, $sp, 1096 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (1096)); - PGXP_ALU(0x27BD0448u, cpu->gpr[29], _pgx1, 0x00000448u); } -#ifdef PSX_COSIM - cosim_instr(0x80053850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B854: 03E00008 jr $ra */ - psx_delay_BFC3B854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053858u); -#endif - if (psx_delay_BFC3B854) { - psx_delay_BFC3B854 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B85C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B85Cu); - int psx_delay_BFC3B874 = 0; - int psx_taken_BFC3B874 = 0; - int psx_delay_BFC3B87C = 0; - int psx_taken_BFC3B87C = 0; - int psx_delay_BFC3B884 = 0; - int psx_taken_BFC3B884 = 0; - int psx_delay_BFC3B8A0 = 0; - int psx_taken_BFC3B8A0 = 0; - int psx_delay_BFC3B8A8 = 0; - int psx_taken_BFC3B8A8 = 0; - int psx_delay_BFC3B8C8 = 0; - int psx_delay_BFC3B8D4 = 0; - int psx_delay_BFC3B8F4 = 0; - int psx_delay_BFC3B90C = 0; - int psx_taken_BFC3B90C = 0; - int psx_delay_BFC3B914 = 0; - int psx_taken_BFC3B914 = 0; - int psx_delay_BFC3B934 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B87Cu: goto label_BFC3B87C; - case 0xBFC3B884u: goto label_BFC3B884; - case 0xBFC3B88Cu: goto label_BFC3B88C; - case 0xBFC3B8A8u: goto label_BFC3B8A8; - case 0xBFC3B8B0u: goto label_BFC3B8B0; - case 0xBFC3B8B4u: goto label_BFC3B8B4; - case 0xBFC3B8D0u: goto label_BFC3B8D0; - case 0xBFC3B8DCu: goto label_BFC3B8DC; - case 0xBFC3B8FCu: goto label_BFC3B8FC; - case 0xBFC3B914u: goto label_BFC3B914; - case 0xBFC3B91Cu: goto label_BFC3B91C; - case 0xBFC3B920u: goto label_BFC3B920; - case 0xBFC3B92Cu: goto label_BFC3B92C; - default: break; - } - } -label_BFC3B85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B85C: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005385Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3B860: AFB00020 sw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053860u); return; } g_debug_last_store_pc = 0x80053860u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10020u); -#endif - /* 0xBFC3B864: 00058400 sll $s0, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[16] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00058400u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B868: 00108403 sra $s0, $s0, 16 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 16u); - PGXP_ALU(0x00108403u, cpu->gpr[16], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10002u); -#endif - /* 0xBFC3B86C: 2A010002 slti $at, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[16] < (2) ? 1 : 0); - PGXP_ALU(0x2A010002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005386Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3B870: AFBF0024 sw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053870u); return; } g_debug_last_store_pc = 0x80053870u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B874: 10200003 beq $at, $zero, 0xBFC3B884 */ - uint32_t psx_brA_BFC3B874 = cpu->gpr[1]; uint32_t psx_brB_BFC3B874 = cpu->gpr[0]; - psx_taken_BFC3B874 = (psx_brA_BFC3B874 == psx_brB_BFC3B874); - psx_delay_BFC3B874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3B878: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053878u); return; } g_debug_last_store_pc = 0x80053878u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053878u); -#endif - if (psx_delay_BFC3B874) { - psx_delay_BFC3B874 = 0; - if (psx_taken_BFC3B874) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053884u); - goto label_BFC3B884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005387Cu); - } -label_BFC3B87C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B87Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005387Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3B87C: 06010003 bgez $s0, 0xBFC3B88C */ - uint32_t psx_brA_BFC3B87C = cpu->gpr[16]; - psx_taken_BFC3B87C = ((int32_t)psx_brA_BFC3B87C >= 0); - psx_delay_BFC3B87C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B880: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053880u); -#endif - if (psx_delay_BFC3B87C) { - psx_delay_BFC3B87C = 0; - if (psx_taken_BFC3B87C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005388Cu); - goto label_BFC3B88C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053884u); - } -label_BFC3B884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B884: 10000029 beq $zero, $zero, 0xBFC3B92C */ - uint32_t psx_brA_BFC3B884 = cpu->gpr[0]; uint32_t psx_brB_BFC3B884 = cpu->gpr[0]; - psx_taken_BFC3B884 = (psx_brA_BFC3B884 == psx_brB_BFC3B884); - psx_delay_BFC3B884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B888: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053888u); -#endif - if (psx_delay_BFC3B884) { - psx_delay_BFC3B884 = 0; - if (psx_taken_BFC3B884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005392Cu); - goto label_BFC3B92C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005388Cu); - } -label_BFC3B88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B88C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005388Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B890: 25CEEDB2 addiu $t6, $t6, -4686 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (-4686)); - PGXP_ALU(0x25CEEDB2u, cpu->gpr[14], _pgx1, 0xFFFFEDB2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14004u); -#endif - /* 0xBFC3B894: 020E1021 addu $v0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053894u); -#endif - /* 0xBFC3B898: 904F0000 lbu $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 15, 0x4u); - PGXP_LOAD(0x904F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B89C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005389Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3B8A0: 11E10004 beq $t7, $at, 0xBFC3B8B4 */ - uint32_t psx_brA_BFC3B8A0 = cpu->gpr[15]; uint32_t psx_brB_BFC3B8A0 = cpu->gpr[1]; - psx_taken_BFC3B8A0 = (psx_brA_BFC3B8A0 == psx_brB_BFC3B8A0); - psx_delay_BFC3B8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC3B8A4: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800538A4u); -#endif - if (psx_delay_BFC3B8A0) { - psx_delay_BFC3B8A0 = 0; - if (psx_taken_BFC3B8A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800538B4u); - goto label_BFC3B8B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800538A8u); - } -label_BFC3B8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B8A8: 10000020 beq $zero, $zero, 0xBFC3B92C */ - uint32_t psx_brA_BFC3B8A8 = cpu->gpr[0]; uint32_t psx_brB_BFC3B8A8 = cpu->gpr[0]; - psx_taken_BFC3B8A8 = (psx_brA_BFC3B8A8 == psx_brB_BFC3B8A8); - psx_delay_BFC3B8A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B8AC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800538ACu); -#endif - if (psx_delay_BFC3B8A8) { - psx_delay_BFC3B8A8 = 0; - if (psx_taken_BFC3B8A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005392Cu); - goto label_BFC3B92C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800538B0u); - } -label_BFC3B8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC3B8B0: 0010C080 sll $t8, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[16] << 2u; - PGXP_ALU(0x0010C080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800538B0u); -#endif -label_BFC3B8B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B8B4: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800538B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3B8B8: 0338C821 addu $t9, $t9, $t8 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[25] + cpu->gpr[24]; - PGXP_ALU(0x0338C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800538B8u); -#endif - /* 0xBFC3B8BC: 8F39EE04 lw $t9, -4604($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4604; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4604)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538BCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39EE04u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800538BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3B8C0: AFA2002C sw $v0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538C0u); return; } g_debug_last_store_pc = 0x800538C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA2002Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800538C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3B8C4: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800538C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B8C8: 0C0157C8 jal 0xB0055F20 */ - cpu->gpr[31] = 0x800538D0u; /* jal link before delay slot */ - psx_delay_BFC3B8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3B8CC: AFB90034 sw $t9, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538CCu); return; } g_debug_last_store_pc = 0x800538CCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB90034u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800538CCu); -#endif - if (psx_delay_BFC3B8C8) { - psx_delay_BFC3B8C8 = 0; - cpu->gpr[31] = 0x800538D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F20u); - cpu->pc = 0x80055F20u; return; - } -label_BFC3B8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538D0u); -#endif - /* 0xBFC3B8D0: 8FA40034 lw $a0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40034u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800538D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B8D4: 0C0157E4 jal 0xB0055F90 */ - cpu->gpr[31] = 0x800538DCu; /* jal link before delay slot */ - psx_delay_BFC3B8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B8D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800538D8u); -#endif - if (psx_delay_BFC3B8D4) { - psx_delay_BFC3B8D4 = 0; - cpu->gpr[31] = 0x800538DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F90u); - cpu->pc = 0x80055F90u; return; - } -label_BFC3B8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B8DC: 3C09800E lui $t1, 0x800E */ - cpu->gpr[9] = 0x800E0000u; - PGXP_ALU(0x3C09800Eu, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800538DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3B8E0: 2529EE08 addiu $t1, $t1, -4600 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-4600)); - PGXP_ALU(0x2529EE08u, cpu->gpr[9], _pgx1, 0xFFFFEE08u); } -#ifdef PSX_COSIM - cosim_instr(0x800538E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10100u); -#endif - /* 0xBFC3B8E4: 00104080 sll $t0, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[8] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00104080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800538E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x308u); -#endif - /* 0xBFC3B8E8: 01091821 addu $v1, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[9]; - PGXP_ALU(0x01091821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800538E8u); -#endif - /* 0xBFC3B8EC: 8C650000 lw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538ECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x8C650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800538ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538F0u); -#endif - /* 0xBFC3B8F0: 8FA40038 lw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538F0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800538F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B8F4: 0C0157B4 jal 0xB0055ED0 */ - cpu->gpr[31] = 0x800538FCu; /* jal link before delay slot */ - psx_delay_BFC3B8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3B8F8: AFA30028 sw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538F8u); return; } g_debug_last_store_pc = 0x800538F8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800538F8u); -#endif - if (psx_delay_BFC3B8F4) { - psx_delay_BFC3B8F4 = 0; - cpu->gpr[31] = 0x800538FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055ED0u); - cpu->pc = 0x80055ED0u; return; - } -label_BFC3B8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800538FCu); -#endif - /* 0xBFC3B8FC: 8FA30028 lw $v1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800538FCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30028u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800538FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B900: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053900u); -#endif - /* 0xBFC3B904: 8C6A0000 lw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053904u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x8C6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80053904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B908: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3B90C: 104A0004 beq $v0, $t2, 0xBFC3B920 */ - uint32_t psx_brA_BFC3B90C = cpu->gpr[2]; uint32_t psx_brB_BFC3B90C = cpu->gpr[10]; - psx_taken_BFC3B90C = (psx_brA_BFC3B90C == psx_brB_BFC3B90C); - psx_delay_BFC3B90C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053910u); -#endif - /* 0xBFC3B910: 8FAC002C lw $t4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053910u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053910u); -#endif - if (psx_delay_BFC3B90C) { - psx_delay_BFC3B90C = 0; - if (psx_taken_BFC3B90C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053920u); - goto label_BFC3B920; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053914u); - } -label_BFC3B914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3B914: 10000005 beq $zero, $zero, 0xBFC3B92C */ - uint32_t psx_brA_BFC3B914 = cpu->gpr[0]; uint32_t psx_brB_BFC3B914 = cpu->gpr[0]; - psx_taken_BFC3B914 = (psx_brA_BFC3B914 == psx_brB_BFC3B914); - psx_delay_BFC3B914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3B918: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053918u); -#endif - if (psx_delay_BFC3B914) { - psx_delay_BFC3B914 = 0; - if (psx_taken_BFC3B914) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005392Cu); - goto label_BFC3B92C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005391Cu); - } -label_BFC3B91C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B91Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005391Cu); -#endif - /* 0xBFC3B91C: 8FAC002C lw $t4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005391Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC002Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005391Cu); -#endif -label_BFC3B920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3B920: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10005u); -#endif - /* 0xBFC3B924: 02001021 addu $v0, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[0]; - PGXP_ALU(0x02001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3B928: A18B0000 sb $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053928u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80053928u); -#endif -label_BFC3B92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005392Cu); -#endif - /* 0xBFC3B92C: 8FBF0024 lw $ra, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005392Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0024u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005392Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053930u); -#endif - /* 0xBFC3B930: 8FB00020 lw $s0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053930u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00020u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80053930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B934: 03E00008 jr $ra */ - psx_delay_BFC3B934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B938: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80053938u); -#endif - if (psx_delay_BFC3B934) { - psx_delay_BFC3B934 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B93C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B93Cu); - int psx_delay_BFC3B948 = 0; - int psx_delay_BFC3B95C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B950u: goto label_BFC3B950; - default: break; - } - } -label_BFC3B93C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B93Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005393Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B93C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005393Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3B940: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053940u); return; } g_debug_last_store_pc = 0x80053940u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B944: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3B948: 0C015808 jal 0xB0056020 */ - cpu->gpr[31] = 0x80053950u; /* jal link before delay slot */ - psx_delay_BFC3B948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B94C: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005394Cu); -#endif - if (psx_delay_BFC3B948) { - psx_delay_BFC3B948 = 0; - cpu->gpr[31] = 0x80053950u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056020u); - cpu->pc = 0x80056020u; return; - } -label_BFC3B950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053950u); -#endif - /* 0xBFC3B950: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053950u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B954: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B958: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3B95C: 03E00008 jr $ra */ - psx_delay_BFC3B95C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3B960: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053960u); -#endif - if (psx_delay_BFC3B95C) { - psx_delay_BFC3B95C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3B964(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3B964u); - int psx_delay_BFC3B9B4 = 0; - int psx_taken_BFC3B9B4 = 0; - int psx_delay_BFC3BA44 = 0; - int psx_taken_BFC3BA44 = 0; - int psx_delay_BFC3BA50 = 0; - int psx_taken_BFC3BA50 = 0; - int psx_delay_BFC3BA58 = 0; - int psx_taken_BFC3BA58 = 0; - int psx_delay_BFC3BA6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3B9BCu: goto label_BFC3B9BC; - case 0xBFC3B9CCu: goto label_BFC3B9CC; - case 0xBFC3BA4Cu: goto label_BFC3BA4C; - case 0xBFC3BA58u: goto label_BFC3BA58; - case 0xBFC3BA60u: goto label_BFC3BA60; - case 0xBFC3BA6Cu: goto label_BFC3BA6C; - default: break; - } - } -label_BFC3B964: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B964u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3B964: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053964u); -#endif - /* 0xBFC3B968: 81CEEDDF lb $t6, -4641($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4641; cpu->gpr[14] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4641)), 14, 0x4000u); - PGXP_LOAD(0x81CEEDDFu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3B96C: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005396Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053970u); -#endif - /* 0xBFC3B970: 8318EDE5 lb $t8, -4635($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4635; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-4635)), 24, 0x1000000u); - PGXP_LOAD(0x8318EDE5u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3B974: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80053974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008008u); -#endif - /* 0xBFC3B978: 01F81821 addu $v1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[3] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B97C: 00031C00 sll $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 16u; - PGXP_ALU(0x00031C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x8005397Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3B980: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053980u); -#endif - /* 0xBFC3B984: 8F399F00 lw $t9, -24832($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053984u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399F00u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3B988: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3B98C: 00034140 sll $t0, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00034140u, cpu->gpr[8], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x8005398Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC3B990: 03284821 addu $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] + cpu->gpr[8]; - PGXP_ALU(0x03284821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053990u); -#endif - /* 0xBFC3B994: 912A0005 lbu $t2, 5($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 5; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (5)), 10, 0x200u); - PGXP_LOAD(0x912A0005u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80053994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3B998: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x424u); -#endif - /* 0xBFC3B99C: 00AA1021 addu $v0, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[10]; - PGXP_ALU(0x00AA1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005399Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9A0: 000210C2 srl $v0, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 3u; - PGXP_ALU(0x000210C2u, cpu->gpr[2], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800539A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9A4: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9A8: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3B9AC: 28410010 slti $at, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (16) ? 1 : 0); - PGXP_ALU(0x28410010u, cpu->gpr[1], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800539ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3B9B0: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800539B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B9B4: 14200005 bne $at, $zero, 0xBFC3B9CC */ - uint32_t psx_brA_BFC3B9B4 = cpu->gpr[1]; uint32_t psx_brB_BFC3B9B4 = cpu->gpr[0]; - psx_taken_BFC3B9B4 = (psx_brA_BFC3B9B4 != psx_brB_BFC3B9B4); - psx_delay_BFC3B9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3B9B8: 00003021 addu $a2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800539B8u); -#endif - if (psx_delay_BFC3B9B4) { - psx_delay_BFC3B9B4 = 0; - if (psx_taken_BFC3B9B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800539CCu); - goto label_BFC3B9CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800539BCu); - } -label_BFC3B9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9BC: 2442FFF0 addiu $v0, $v0, -16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-16)); - PGXP_ALU(0x2442FFF0u, cpu->gpr[2], _pgx1, 0xFFFFFFF0u); } -#ifdef PSX_COSIM - cosim_instr(0x800539BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9C0: 00021400 sll $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021400u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3B9C4: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800539C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3B9C8: 00021403 sra $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 16u); - PGXP_ALU(0x00021403u, cpu->gpr[2], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539C8u); -#endif -label_BFC3B9CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3B9CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3B9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3B9CC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800539CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539D0u); -#endif - /* 0xBFC3B9D0: 8D6B9F00 lw $t3, -24832($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800539D0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9F00u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800539D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3B9D4: 00036140 sll $t4, $v1, 5 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = cpu->gpr[3] << 5u; - PGXP_ALU(0x00036140u, cpu->gpr[12], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x800539D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3800u); -#endif - /* 0xBFC3B9D8: 016C6821 addu $t5, $t3, $t4 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[11] + cpu->gpr[12]; - PGXP_ALU(0x016C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800539D8u); -#endif - /* 0xBFC3B9DC: 91AE0004 lbu $t6, 4($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 4; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (4)), 14, 0x2000u); - PGXP_LOAD(0x91AE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800539DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3B9E0: 2401000C addiu $at, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2401000Cu, cpu->gpr[1], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800539E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC010u); -#endif - /* 0xBFC3B9E4: 008E7823 subu $t7, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[4] - cpu->gpr[14]; - PGXP_ALU(0x008E7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800539E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3B9E8: 25F8003C addiu $t8, $t7, 60 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[15] + (60)); - PGXP_ALU(0x25F8003Cu, cpu->gpr[24], _pgx1, 0x0000003Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800539E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3B9EC: 0018CC00 sll $t9, $t8, 16 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 16u; - PGXP_ALU(0x0018CC00u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800539F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3B9F0: 00194403 sra $t0, $t9, 16 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] >> 16u); - PGXP_ALU(0x00194403u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x140u); -#endif - /* 0xBFC3B9F4: 00C83021 addu $a2, $a2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[8]; - PGXP_ALU(0x00C83021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800539F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3B9F8: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3B9FC: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800539FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3BA00: 00C1001A div $a2, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[6]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x00C1001Au, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80053A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3BA04: 00027040 sll $t6, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] << 1u; - PGXP_ALU(0x00027040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BA08: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3BA0C: 00004810 mfhi $t1 */ - cpu->gpr[9] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004810u, cpu->gpr[9], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3BA10: 00095400 sll $t2, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 16u; - PGXP_ALU(0x00095400u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3BA14: 000A5C03 sra $t3, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); - PGXP_ALU(0x000A5C03u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA18: 00003812 mflo $a3 */ - cpu->gpr[7] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00003812u, cpu->gpr[7], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3BA1C: 000B6100 sll $t4, $t3, 4 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 4u; - PGXP_ALU(0x000B6100u, cpu->gpr[12], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA20: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3BA24: 000C6840 sll $t5, $t4, 1 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 1u; - PGXP_ALU(0x000C6840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA28: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC3BA2C: 01AE7821 addu $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA30: 24E7FFFB addiu $a3, $a3, -5 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (-5)); - PGXP_ALU(0x24E7FFFBu, cpu->gpr[7], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x80053A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3BA34: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA38: 00073C00 sll $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 16u; - PGXP_ALU(0x00073C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A38u); -#endif - /* 0xBFC3BA3C: 94A595FC lhu $a1, -27140($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -27140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-27140)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053A3Cu); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x94A595FCu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA40: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA44: 18E00004 blez $a3, 0xBFC3BA58 */ - uint32_t psx_brA_BFC3BA44 = cpu->gpr[7]; - psx_taken_BFC3BA44 = ((int32_t)psx_brA_BFC3BA44 <= 0); - psx_delay_BFC3BA44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BA48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053A48u); -#endif - if (psx_delay_BFC3BA44) { - psx_delay_BFC3BA44 = 0; - if (psx_taken_BFC3BA44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A58u); - goto label_BFC3BA58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A4Cu); - } -label_BFC3BA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3BA4C: 00E52804 sllv $a1, $a1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[5] = cpu->gpr[5] << (cpu->gpr[7] & 0x1Fu); - PGXP_ALU(0x00E52804u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BA50: 10000006 beq $zero, $zero, 0xBFC3BA6C */ - uint32_t psx_brA_BFC3BA50 = cpu->gpr[0]; uint32_t psx_brB_BFC3BA50 = cpu->gpr[0]; - psx_taken_BFC3BA50 = (psx_brA_BFC3BA50 == psx_brB_BFC3BA50); - psx_delay_BFC3BA50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BA54: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053A54u); -#endif - if (psx_delay_BFC3BA50) { - psx_delay_BFC3BA50 = 0; - if (psx_taken_BFC3BA50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A6Cu); - goto label_BFC3BA6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A58u); - } -label_BFC3BA58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BA58: 04E10004 bgez $a3, 0xBFC3BA6C */ - uint32_t psx_brA_BFC3BA58 = cpu->gpr[7]; - psx_taken_BFC3BA58 = ((int32_t)psx_brA_BFC3BA58 >= 0); - psx_delay_BFC3BA58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BA5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053A5Cu); -#endif - if (psx_delay_BFC3BA58) { - psx_delay_BFC3BA58 = 0; - if (psx_taken_BFC3BA58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A6Cu); - goto label_BFC3BA6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053A60u); - } -label_BFC3BA60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000081u); -#endif - /* 0xBFC3BA60: 0007C023 subu $t8, $zero, $a3 */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[0] - cpu->gpr[7]; - PGXP_ALU(0x0007C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3BA64: 03052806 srlv $a1, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[5] >> (cpu->gpr[24] & 0x1Fu); - PGXP_ALU(0x03052806u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BA68: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053A68u); -#endif -label_BFC3BA6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BA6C: 03E00008 jr $ra */ - psx_delay_BFC3BA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3BA70: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053A70u); -#endif - if (psx_delay_BFC3BA6C) { - psx_delay_BFC3BA6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BA74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BA74u); - int psx_delay_BFC3BA90 = 0; - int psx_delay_BFC3BA9C = 0; - int psx_taken_BFC3BA9C = 0; - int psx_delay_BFC3BAA4 = 0; - int psx_taken_BFC3BAA4 = 0; - int psx_delay_BFC3BAD4 = 0; - int psx_taken_BFC3BAD4 = 0; - int psx_delay_BFC3BAE8 = 0; - int psx_taken_BFC3BAE8 = 0; - int psx_delay_BFC3BAF4 = 0; - int psx_taken_BFC3BAF4 = 0; - int psx_delay_BFC3BB08 = 0; - int psx_taken_BFC3BB08 = 0; - int psx_delay_BFC3BB18 = 0; - int psx_taken_BFC3BB18 = 0; - int psx_delay_BFC3BB20 = 0; - int psx_taken_BFC3BB20 = 0; - int psx_delay_BFC3BB34 = 0; - int psx_taken_BFC3BB34 = 0; - int psx_delay_BFC3BB58 = 0; - int psx_taken_BFC3BB58 = 0; - int psx_delay_BFC3BB68 = 0; - int psx_taken_BFC3BB68 = 0; - int psx_delay_BFC3BB70 = 0; - int psx_taken_BFC3BB70 = 0; - int psx_delay_BFC3BBCC = 0; - int psx_taken_BFC3BBCC = 0; - int psx_delay_BFC3BBD8 = 0; - int psx_taken_BFC3BBD8 = 0; - int psx_delay_BFC3BBE4 = 0; - int psx_delay_BFC3BC04 = 0; - int psx_taken_BFC3BC04 = 0; - int psx_delay_BFC3BC0C = 0; - int psx_taken_BFC3BC0C = 0; - int psx_delay_BFC3BC84 = 0; - int psx_delay_BFC3BC94 = 0; - int psx_delay_BFC3BCA0 = 0; - int psx_delay_BFC3BCB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BA98u: goto label_BFC3BA98; - case 0xBFC3BAA4u: goto label_BFC3BAA4; - case 0xBFC3BAACu: goto label_BFC3BAAC; - case 0xBFC3BADCu: goto label_BFC3BADC; - case 0xBFC3BAF0u: goto label_BFC3BAF0; - case 0xBFC3BAFCu: goto label_BFC3BAFC; - case 0xBFC3BB10u: goto label_BFC3BB10; - case 0xBFC3BB14u: goto label_BFC3BB14; - case 0xBFC3BB20u: goto label_BFC3BB20; - case 0xBFC3BB28u: goto label_BFC3BB28; - case 0xBFC3BB2Cu: goto label_BFC3BB2C; - case 0xBFC3BB3Cu: goto label_BFC3BB3C; - case 0xBFC3BB40u: goto label_BFC3BB40; - case 0xBFC3BB60u: goto label_BFC3BB60; - case 0xBFC3BB64u: goto label_BFC3BB64; - case 0xBFC3BB70u: goto label_BFC3BB70; - case 0xBFC3BB78u: goto label_BFC3BB78; - case 0xBFC3BB7Cu: goto label_BFC3BB7C; - case 0xBFC3BB88u: goto label_BFC3BB88; - case 0xBFC3BBD4u: goto label_BFC3BBD4; - case 0xBFC3BBE0u: goto label_BFC3BBE0; - case 0xBFC3BBECu: goto label_BFC3BBEC; - case 0xBFC3BC0Cu: goto label_BFC3BC0C; - case 0xBFC3BC14u: goto label_BFC3BC14; - case 0xBFC3BC8Cu: goto label_BFC3BC8C; - case 0xBFC3BC9Cu: goto label_BFC3BC9C; - case 0xBFC3BCA8u: goto label_BFC3BCA8; - case 0xBFC3BCB0u: goto label_BFC3BCB0; - default: break; - } - } -label_BFC3BA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BA74: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3BA78: AFA40038 sw $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053A78u); return; } g_debug_last_store_pc = 0x80053A78u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3BA7C: AFA5003C sw $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053A7Cu); return; } g_debug_last_store_pc = 0x80053A7Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BA80: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053A80u); return; } g_debug_last_store_pc = 0x80053A80u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A80u); -#endif - /* 0xBFC3BA84: 87A5003C lh $a1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053A84u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A5003Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A84u); -#endif - /* 0xBFC3BA88: 87A40038 lh $a0, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053A88u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x87A40038u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BA8C: AFA60040 sw $a2, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053A8Cu); return; } g_debug_last_store_pc = 0x80053A8Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BA90: 0C014B27 jal 0xB0052C9C */ - cpu->gpr[31] = 0x80053A98u; /* jal link before delay slot */ - psx_delay_BFC3BA90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3BA94: AFA70044 sw $a3, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053A94u); return; } g_debug_last_store_pc = 0x80053A94u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA70044u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A94u); -#endif - if (psx_delay_BFC3BA90) { - psx_delay_BFC3BA90 = 0; - cpu->gpr[31] = 0x80053A98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052C9Cu); - cpu->pc = 0x80052C9Cu; return; - } -label_BFC3BA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053A98u); -#endif - /* 0xBFC3BA98: 87A50040 lh $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053A98u); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BA9C: 10400003 beq $v0, $zero, 0xBFC3BAAC */ - uint32_t psx_brA_BFC3BA9C = cpu->gpr[2]; uint32_t psx_brB_BFC3BA9C = cpu->gpr[0]; - psx_taken_BFC3BA9C = (psx_brA_BFC3BA9C == psx_brB_BFC3BA9C); - psx_delay_BFC3BA9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BAA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053AA0u); -#endif - if (psx_delay_BFC3BA9C) { - psx_delay_BFC3BA9C = 0; - if (psx_taken_BFC3BA9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AACu); - goto label_BFC3BAAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AA4u); - } -label_BFC3BAA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BAA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BAA4: 10000082 beq $zero, $zero, 0xBFC3BCB0 */ - uint32_t psx_brA_BFC3BAA4 = cpu->gpr[0]; uint32_t psx_brB_BFC3BAA4 = cpu->gpr[0]; - psx_taken_BFC3BAA4 = (psx_brA_BFC3BAA4 == psx_brB_BFC3BAA4); - psx_delay_BFC3BAA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BAA8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053AA8u); -#endif - if (psx_delay_BFC3BAA4) { - psx_delay_BFC3BAA4 = 0; - if (psx_taken_BFC3BAA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053CB0u); - goto label_BFC3BCB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AACu); - } -label_BFC3BAAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BAACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BAACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BAAC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AB0u); -#endif - /* 0xBFC3BAB0: 87AF0044 lh $t7, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053AB0u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x87AF0044u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AB0u); -#endif - /* 0xBFC3BAB4: 87B80048 lh $t8, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053AB4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x87B80048u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3BAB8: 240E0020 addiu $t6, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240E0020u, cpu->gpr[14], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80053AB8u); -#endif - /* 0xBFC3BABC: 87A2004C lh $v0, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053ABCu); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A2004Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AC0u); -#endif - /* 0xBFC3BAC0: 87A30050 lh $v1, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053AC0u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30050u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3BAC4: A02EEDD8 sb $t6, -4648($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4648; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053AC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4648)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EEDD8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3BAC8: A02FEDDA sb $t7, -4646($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4646; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053AC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4646)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEDDAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3BACC: A038EDDB sb $t8, -4645($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4645; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053ACCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4645)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038EDDBu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BAD0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3BAD4: 14430006 bne $v0, $v1, 0xBFC3BAF0 */ - uint32_t psx_brA_BFC3BAD4 = cpu->gpr[2]; uint32_t psx_brB_BFC3BAD4 = cpu->gpr[3]; - psx_taken_BFC3BAD4 = (psx_brA_BFC3BAD4 != psx_brB_BFC3BAD4); - psx_delay_BFC3BAD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3BAD8: A025EDE5 sb $a1, -4635($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4635; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053AD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4635)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA025EDE5u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AD8u); -#endif - if (psx_delay_BFC3BAD4) { - psx_delay_BFC3BAD4 = 0; - if (psx_taken_BFC3BAD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AF0u); - goto label_BFC3BAF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053ADCu); - } -label_BFC3BADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3BADC: 24190040 addiu $t9, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24190040u, cpu->gpr[25], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80053ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BAE0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3BAE4: A039EDDD sb $t9, -4643($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4643; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053AE4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4643)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA039EDDDu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BAE8: 10000027 beq $zero, $zero, 0xBFC3BB88 */ - uint32_t psx_brA_BFC3BAE8 = cpu->gpr[0]; uint32_t psx_brB_BFC3BAE8 = cpu->gpr[0]; - psx_taken_BFC3BAE8 = (psx_brA_BFC3BAE8 == psx_brB_BFC3BAE8); - psx_delay_BFC3BAE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3BAEC: A022EDDC sb $v0, -4644($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4644; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053AECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4644)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA022EDDCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053AECu); -#endif - if (psx_delay_BFC3BAE8) { - psx_delay_BFC3BAE8 = 0; - if (psx_taken_BFC3BAE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B88u); - goto label_BFC3BB88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AF0u); - } -label_BFC3BAF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BAF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC3BAF0: 0062082A slt $at, $v1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x0062082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BAF4: 10200012 beq $at, $zero, 0xBFC3BB40 */ - uint32_t psx_brA_BFC3BAF4 = cpu->gpr[1]; uint32_t psx_brB_BFC3BAF4 = cpu->gpr[0]; - psx_taken_BFC3BAF4 = (psx_brA_BFC3BAF4 == psx_brB_BFC3BAF4); - psx_delay_BFC3BAF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3BAF8: 00025180 sll $t2, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 6u; - PGXP_ALU(0x00025180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80053AF8u); -#endif - if (psx_delay_BFC3BAF4) { - psx_delay_BFC3BAF4 = 0; - if (psx_taken_BFC3BAF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B40u); - goto label_BFC3BB40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053AFCu); - } -label_BFC3BAFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BAFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BAFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3BAFC: 00034180 sll $t0, $v1, 6 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] << 6u; - PGXP_ALU(0x00034180u, cpu->gpr[8], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80053AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3BB00: 0102001A div $t0, $v0 */ - { int32_t psx_n = (int32_t)cpu->gpr[8]; int32_t psx_d = (int32_t)cpu->gpr[2]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0102001Au, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[2]); -#ifdef PSX_COSIM - cosim_instr(0x80053B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3BB04: 00004812 mflo $t1 */ - cpu->gpr[9] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004812u, cpu->gpr[9], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BB08: 14400002 bne $v0, $zero, 0xBFC3BB14 */ - uint32_t psx_brA_BFC3BB08 = cpu->gpr[2]; uint32_t psx_brB_BFC3BB08 = cpu->gpr[0]; - psx_taken_BFC3BB08 = (psx_brA_BFC3BB08 != psx_brB_BFC3BB08); - psx_delay_BFC3BB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BB0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053B0Cu); -#endif - if (psx_delay_BFC3BB08) { - psx_delay_BFC3BB08 = 0; - if (psx_taken_BFC3BB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B14u); - goto label_BFC3BB14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B10u); - } -label_BFC3BB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3BB10: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80053B10u); return; -#ifdef PSX_COSIM - cosim_instr(0x80053B10u); -#endif -label_BFC3BB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BB14: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3BB18: 14410004 bne $v0, $at, 0xBFC3BB2C */ - uint32_t psx_brA_BFC3BB18 = cpu->gpr[2]; uint32_t psx_brB_BFC3BB18 = cpu->gpr[1]; - psx_taken_BFC3BB18 = (psx_brA_BFC3BB18 != psx_brB_BFC3BB18); - psx_delay_BFC3BB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BB1C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B1Cu); -#endif - if (psx_delay_BFC3BB18) { - psx_delay_BFC3BB18 = 0; - if (psx_taken_BFC3BB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B2Cu); - goto label_BFC3BB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B20u); - } -label_BFC3BB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3BB20: 15010002 bne $t0, $at, 0xBFC3BB2C */ - uint32_t psx_brA_BFC3BB20 = cpu->gpr[8]; uint32_t psx_brB_BFC3BB20 = cpu->gpr[1]; - psx_taken_BFC3BB20 = (psx_brA_BFC3BB20 != psx_brB_BFC3BB20); - psx_delay_BFC3BB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053B24u); -#endif - if (psx_delay_BFC3BB20) { - psx_delay_BFC3BB20 = 0; - if (psx_taken_BFC3BB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B2Cu); - goto label_BFC3BB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B28u); - } -label_BFC3BB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3BB28: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80053B28u); return; -#ifdef PSX_COSIM - cosim_instr(0x80053B28u); -#endif -label_BFC3BB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BB2C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3BB30: A029EDDD sb $t1, -4643($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4643; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053B30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4643)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA029EDDDu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BB34: 10000014 beq $zero, $zero, 0xBFC3BB88 */ - uint32_t psx_brA_BFC3BB34 = cpu->gpr[0]; uint32_t psx_brB_BFC3BB34 = cpu->gpr[0]; - psx_taken_BFC3BB34 = (psx_brA_BFC3BB34 == psx_brB_BFC3BB34); - psx_delay_BFC3BB34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3BB38: A022EDDC sb $v0, -4644($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4644; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053B38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4644)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA022EDDCu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053B38u); -#endif - if (psx_delay_BFC3BB34) { - psx_delay_BFC3BB34 = 0; - if (psx_taken_BFC3BB34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B88u); - goto label_BFC3BB88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B3Cu); - } -label_BFC3BB3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3BB3C: 00025180 sll $t2, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 6u; - PGXP_ALU(0x00025180u, cpu->gpr[10], _pgx1, 6u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B3Cu); -#endif -label_BFC3BB40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC3BB40: 0143001A div $t2, $v1 */ - { int32_t psx_n = (int32_t)cpu->gpr[10]; int32_t psx_d = (int32_t)cpu->gpr[3]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0143001Au, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); -#ifdef PSX_COSIM - cosim_instr(0x80053B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3BB44: 240E007F addiu $t6, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x240E007Fu, cpu->gpr[14], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80053B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3BB48: 00005812 mflo $t3 */ - cpu->gpr[11] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005812u, cpu->gpr[11], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3BB4C: 000B6600 sll $t4, $t3, 24 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 24u; - PGXP_ALU(0x000B6600u, cpu->gpr[12], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3BB50: 000C6E03 sra $t5, $t4, 24 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[12] >> 24u); - PGXP_ALU(0x000C6E03u, cpu->gpr[13], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC3BB54: 01CD7823 subu $t7, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3BB58: 14600002 bne $v1, $zero, 0xBFC3BB64 */ - uint32_t psx_brA_BFC3BB58 = cpu->gpr[3]; uint32_t psx_brB_BFC3BB58 = cpu->gpr[0]; - psx_taken_BFC3BB58 = (psx_brA_BFC3BB58 != psx_brB_BFC3BB58); - psx_delay_BFC3BB58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BB5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053B5Cu); -#endif - if (psx_delay_BFC3BB58) { - psx_delay_BFC3BB58 = 0; - if (psx_taken_BFC3BB58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B64u); - goto label_BFC3BB64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B60u); - } -label_BFC3BB60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3BB60: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80053B60u); return; -#ifdef PSX_COSIM - cosim_instr(0x80053B60u); -#endif -label_BFC3BB64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BB64: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3BB68: 14610004 bne $v1, $at, 0xBFC3BB7C */ - uint32_t psx_brA_BFC3BB68 = cpu->gpr[3]; uint32_t psx_brB_BFC3BB68 = cpu->gpr[1]; - psx_taken_BFC3BB68 = (psx_brA_BFC3BB68 != psx_brB_BFC3BB68); - psx_delay_BFC3BB68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BB6C: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B6Cu); -#endif - if (psx_delay_BFC3BB68) { - psx_delay_BFC3BB68 = 0; - if (psx_taken_BFC3BB68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B7Cu); - goto label_BFC3BB7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B70u); - } -label_BFC3BB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3BB70: 15410002 bne $t2, $at, 0xBFC3BB7C */ - uint32_t psx_brA_BFC3BB70 = cpu->gpr[10]; uint32_t psx_brB_BFC3BB70 = cpu->gpr[1]; - psx_taken_BFC3BB70 = (psx_brA_BFC3BB70 != psx_brB_BFC3BB70); - psx_delay_BFC3BB70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BB74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053B74u); -#endif - if (psx_delay_BFC3BB70) { - psx_delay_BFC3BB70 = 0; - if (psx_taken_BFC3BB70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B7Cu); - goto label_BFC3BB7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053B78u); - } -label_BFC3BB78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3BB78: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80053B78u); return; -#ifdef PSX_COSIM - cosim_instr(0x80053B78u); -#endif -label_BFC3BB7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BB7C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3BB80: A02FEDDD sb $t7, -4643($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4643; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053B80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4643)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEDDDu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3BB84: A023EDDC sb $v1, -4644($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4644; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053B84u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4644)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EDDCu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053B84u); -#endif -label_BFC3BB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3BB88: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053B88u); -#endif - /* 0xBFC3BB8C: 8318EDDF lb $t8, -4641($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4641; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-4641)), 24, 0x1000000u); - PGXP_LOAD(0x8318EDDFu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC3BB90: 00054600 sll $t0, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00054600u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3BB94: 00084E03 sra $t1, $t0, 24 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] >> 24u); - PGXP_ALU(0x00084E03u, cpu->gpr[9], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3BB98: 0018C900 sll $t9, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 4u; - PGXP_ALU(0x0018C900u, cpu->gpr[25], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80053B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000600u); -#endif - /* 0xBFC3BB9C: 03295021 addu $t2, $t9, $t1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[25] + cpu->gpr[9]; - PGXP_ALU(0x03295021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3BBA0: 000A5C00 sll $t3, $t2, 16 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 16u; - PGXP_ALU(0x000A5C00u, cpu->gpr[11], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3BBA4: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053BA4u); -#endif - /* 0xBFC3BBA8: 8DAD9F00 lw $t5, -24832($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -24832; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-24832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053BA8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9F00u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3BBAC: 000B6403 sra $t4, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[11] >> 16u); - PGXP_ALU(0x000B6403u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5000u); -#endif - /* 0xBFC3BBB0: 000C7140 sll $t6, $t4, 5 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[14] = cpu->gpr[12] << 5u; - PGXP_ALU(0x000C7140u, cpu->gpr[14], _pgx1, 5u); } -#ifdef PSX_COSIM - cosim_instr(0x80053BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC3BBB4: 01AE1021 addu $v0, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[13] + cpu->gpr[14]; - PGXP_ALU(0x01AE1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053BB4u); -#endif - /* 0xBFC3BBB8: 904F0000 lbu $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 15, 0x4u); - PGXP_LOAD(0x904F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BBBC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3BBC0: A02FEDE8 sb $t7, -4632($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4632; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053BC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4632)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEDE8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BC0u); -#endif - /* 0xBFC3BBC4: 84440016 lh $a0, 22($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053BC4u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x84440016u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BBC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BBCC: 14800004 bne $a0, $zero, 0xBFC3BBE0 */ - uint32_t psx_brA_BFC3BBCC = cpu->gpr[4]; uint32_t psx_brB_BFC3BBCC = cpu->gpr[0]; - psx_taken_BFC3BBCC = (psx_brA_BFC3BBCC != psx_brB_BFC3BBCC); - psx_delay_BFC3BBCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BBD0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053BD0u); -#endif - if (psx_delay_BFC3BBCC) { - psx_delay_BFC3BBCC = 0; - if (psx_taken_BFC3BBCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053BE0u); - goto label_BFC3BBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053BD4u); - } -label_BFC3BBD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BBD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BBD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3BBD4: A424EDEE sh $a0, -4626($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4626; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053BD4u); return; } g_debug_last_store_pc = 0x80053BD4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA424EDEEu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BBD8: 10000035 beq $zero, $zero, 0xBFC3BCB0 */ - uint32_t psx_brA_BFC3BBD8 = cpu->gpr[0]; uint32_t psx_brB_BFC3BBD8 = cpu->gpr[0]; - psx_taken_BFC3BBD8 = (psx_brA_BFC3BBD8 == psx_brB_BFC3BBD8); - psx_delay_BFC3BBD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BBDC: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053BDCu); -#endif - if (psx_delay_BFC3BBD8) { - psx_delay_BFC3BBD8 = 0; - if (psx_taken_BFC3BBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053CB0u); - goto label_BFC3BCB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053BE0u); - } -label_BFC3BBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BBE0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BBE4: 0C014913 jal 0xB005244C */ - cpu->gpr[31] = 0x80053BECu; /* jal link before delay slot */ - psx_delay_BFC3BBE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3BBE8: A424EDEE sh $a0, -4626($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4626; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053BE8u); return; } g_debug_last_store_pc = 0x80053BE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } - PGXP_STORE(0xA424EDEEu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BE8u); -#endif - if (psx_delay_BFC3BBE4) { - psx_delay_BFC3BBE4 = 0; - cpu->gpr[31] = 0x80053BECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005244Cu); - cpu->pc = 0x8005244Cu; return; - } -label_BFC3BBEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BBECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3BBEC: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053BF0u); -#endif - /* 0xBFC3BBF0: 8318EA60 lb $t8, -5536($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -5536; cpu->gpr[24] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-5536)), 24, 0x1000000u); - PGXP_LOAD(0x8318EA60u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3BBF4: 00024400 sll $t0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00024400u, cpu->gpr[8], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3BBF8: 0008CC03 sra $t9, $t0, 16 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] >> 16u); - PGXP_ALU(0x0008CC03u, cpu->gpr[25], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053BF8u); -#endif - /* 0xBFC3BBFC: 87A50040 lh $a1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053BFCu); return; } cpu->gpr[5] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x87A50040u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3BC00: 00021C00 sll $v1, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 16u; - PGXP_ALU(0x00021C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3BC04: 17190003 bne $t8, $t9, 0xBFC3BC14 */ - uint32_t psx_brA_BFC3BC04 = cpu->gpr[24]; uint32_t psx_brB_BFC3BC04 = cpu->gpr[25]; - psx_taken_BFC3BC04 = (psx_brA_BFC3BC04 != psx_brB_BFC3BC04); - psx_delay_BFC3BC04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3BC08: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C08u); -#endif - if (psx_delay_BFC3BC04) { - psx_delay_BFC3BC04 = 0; - if (psx_taken_BFC3BC04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053C14u); - goto label_BFC3BC14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053C0Cu); - } -label_BFC3BC0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BC0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BC0C: 10000028 beq $zero, $zero, 0xBFC3BCB0 */ - uint32_t psx_brA_BFC3BC0C = cpu->gpr[0]; uint32_t psx_brB_BFC3BC0C = cpu->gpr[0]; - psx_taken_BFC3BC0C = (psx_brA_BFC3BC0C == psx_brB_BFC3BC0C); - psx_delay_BFC3BC0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BC10: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053C10u); -#endif - if (psx_delay_BFC3BC0C) { - psx_delay_BFC3BC0C = 0; - if (psx_taken_BFC3BC0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053CB0u); - goto label_BFC3BCB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053C14u); - } -label_BFC3BC14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BC14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3BC14: 00034880 sll $t1, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[3] << 2u; - PGXP_ALU(0x00034880u, cpu->gpr[9], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3BC18: 01234823 subu $t1, $t1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[9] = cpu->gpr[9] - cpu->gpr[3]; - PGXP_ALU(0x01234823u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3BC1C: 3C0A800E lui $t2, 0x800E */ - cpu->gpr[10] = 0x800E0000u; - PGXP_ALU(0x3C0A800Eu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BC20: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3BC24: 254AEA68 addiu $t2, $t2, -5528 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-5528)); - PGXP_ALU(0x254AEA68u, cpu->gpr[10], _pgx1, 0xFFFFEA68u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3BC28: 000948C0 sll $t1, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000948C0u, cpu->gpr[9], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3BC2C: A423EDF0 sh $v1, -4624($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4624; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4624)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C2Cu); return; } g_debug_last_store_pc = 0x80053C2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA423EDF0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x604u); -#endif - /* 0xBFC3BC30: 012A1021 addu $v0, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[9] + cpu->gpr[10]; - PGXP_ALU(0x012A1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3BC34: 240B0020 addiu $t3, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240B0020u, cpu->gpr[11], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3BC38: A44B000A sh $t3, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C38u); return; } g_debug_last_store_pc = 0x80053C38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA44B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C38u); -#endif - /* 0xBFC3BC3C: 87AC0038 lh $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C3Cu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x87AC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3BC40: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3BC44: A44C0012 sh $t4, 18($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C44u); return; } g_debug_last_store_pc = 0x80053C44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA44C0012u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C44u); -#endif - /* 0xBFC3BC48: 81ADEDDF lb $t5, -4641($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4641; cpu->gpr[13] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (-4641)), 13, 0x2000u); - PGXP_LOAD(0x81ADEDDFu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3BC4C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3BC50: A44D000C sh $t5, 12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C50u); return; } g_debug_last_store_pc = 0x80053C50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA44D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C50u); -#endif - /* 0xBFC3BC54: 87AE003C lh $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C54u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x87AE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC3BC58: 00054600 sll $t0, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00054600u, cpu->gpr[8], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3BC5C: A44E000E sh $t6, 14($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C5Cu); return; } g_debug_last_store_pc = 0x80053C5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA44E000Eu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C60u); -#endif - /* 0xBFC3BC60: 85EFEDEE lh $t7, -4626($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4626; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4626)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C60u); return; } cpu->gpr[15] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x85EFEDEEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000100u); -#endif - /* 0xBFC3BC64: 0008C603 sra $t8, $t0, 24 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[8] >> 24u); - PGXP_ALU(0x0008C603u, cpu->gpr[24], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3BC68: A4580010 sh $t8, 16($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C68u); return; } g_debug_last_store_pc = 0x80053C68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4580010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3BC6C: A44F0000 sh $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C6Cu); return; } g_debug_last_store_pc = 0x80053C6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA44F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C70u); -#endif - /* 0xBFC3BC70: 87B90044 lh $t9, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C70u); return; } cpu->gpr[25] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x87B90044u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3BC74: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3BC78: A0490017 sb $t1, 23($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 23; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80053C78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (23)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0490017u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BC7C: A4400002 sh $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C7Cu); return; } g_debug_last_store_pc = 0x80053C7Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3BC80: A4590008 sh $t9, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C80u); return; } g_debug_last_store_pc = 0x80053C80u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4590008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BC84: 0C014ADC jal 0xB0052B70 */ - cpu->gpr[31] = 0x80053C8Cu; /* jal link before delay slot */ - psx_delay_BFC3BC84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3BC88: A7A30034 sh $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C88u); return; } g_debug_last_store_pc = 0x80053C88u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C88u); -#endif - if (psx_delay_BFC3BC84) { - psx_delay_BFC3BC84 = 0; - cpu->gpr[31] = 0x80053C8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052B70u); - cpu->pc = 0x80052B70u; return; - } -label_BFC3BC8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BC8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BC8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C8Cu); -#endif - /* 0xBFC3BC8C: 97A40044 lhu $a0, 68($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (68)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C8Cu); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x97A40044u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C90u); -#endif - /* 0xBFC3BC90: 97A50048 lhu $a1, 72($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (72)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053C90u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x97A50048u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80053C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BC94: 0C014E59 jal 0xB0053964 */ - cpu->gpr[31] = 0x80053C9Cu; /* jal link before delay slot */ - psx_delay_BFC3BC94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BC98: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053C98u); -#endif - if (psx_delay_BFC3BC94) { - psx_delay_BFC3BC94 = 0; - cpu->gpr[31] = 0x80053C9Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053964u); - cpu->pc = 0x80053964u; return; - } -label_BFC3BC9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BC9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BC9C: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BCA0: 0C01498E jal 0xB0052638 */ - cpu->gpr[31] = 0x80053CA8u; /* jal link before delay slot */ - psx_delay_BFC3BCA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3BCA4: 00402821 addu $a1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053CA4u); -#endif - if (psx_delay_BFC3BCA0) { - psx_delay_BFC3BCA0 = 0; - cpu->gpr[31] = 0x80053CA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80052638u); - cpu->pc = 0x80052638u; return; - } -label_BFC3BCA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BCA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BCA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053CA8u); -#endif - /* 0xBFC3BCA8: 87A20034 lh $v0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053CA8u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x87A20034u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80053CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BCAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053CACu); -#endif -label_BFC3BCB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BCB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BCB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053CB0u); -#endif - /* 0xBFC3BCB0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053CB0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BCB4: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80053CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BCB8: 03E00008 jr $ra */ - psx_delay_BFC3BCB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BCBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053CBCu); -#endif - if (psx_delay_BFC3BCB8) { - psx_delay_BFC3BCB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BD78(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BD78u); - int psx_delay_BFC3BD80 = 0; - int psx_delay_BFC3BD90 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BD88u: goto label_BFC3BD88; - default: break; - } - } -label_BFC3BD78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BD78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BD78: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BD7C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053D7Cu); return; } g_debug_last_store_pc = 0x80053D7Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BD80: 0C01561C jal 0xB0055870 */ - cpu->gpr[31] = 0x80053D88u; /* jal link before delay slot */ - psx_delay_BFC3BD80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BD84: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053D84u); -#endif - if (psx_delay_BFC3BD80) { - psx_delay_BFC3BD80 = 0; - cpu->gpr[31] = 0x80053D88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055870u); - cpu->pc = 0x80055870u; return; - } -label_BFC3BD88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BD88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BD88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053D88u); -#endif - /* 0xBFC3BD88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053D88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BD8C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BD90: 03E00008 jr $ra */ - psx_delay_BFC3BD90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BD94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053D94u); -#endif - if (psx_delay_BFC3BD90) { - psx_delay_BFC3BD90 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BD98(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BD98u); - int psx_delay_BFC3BDA0 = 0; - int psx_delay_BFC3BDB0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BDA8u: goto label_BFC3BDA8; - default: break; - } - } -label_BFC3BD98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BD98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BD98: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BD9C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053D9Cu); return; } g_debug_last_store_pc = 0x80053D9Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BDA0: 0C01561C jal 0xB0055870 */ - cpu->gpr[31] = 0x80053DA8u; /* jal link before delay slot */ - psx_delay_BFC3BDA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BDA4: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053DA4u); -#endif - if (psx_delay_BFC3BDA0) { - psx_delay_BFC3BDA0 = 0; - cpu->gpr[31] = 0x80053DA8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055870u); - cpu->pc = 0x80055870u; return; - } -label_BFC3BDA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BDA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DA8u); -#endif - /* 0xBFC3BDA8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053DA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BDAC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BDB0: 03E00008 jr $ra */ - psx_delay_BFC3BDB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BDB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053DB4u); -#endif - if (psx_delay_BFC3BDB0) { - psx_delay_BFC3BDB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BDB8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BDB8u); - int psx_delay_BFC3BDC4 = 0; - int psx_taken_BFC3BDC4 = 0; - int psx_delay_BFC3BDD0 = 0; - int psx_taken_BFC3BDD0 = 0; - int psx_delay_BFC3BDF0 = 0; - int psx_delay_BFC3BDFC = 0; - int psx_taken_BFC3BDFC = 0; - int psx_delay_BFC3BE10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BDCCu: goto label_BFC3BDCC; - case 0xBFC3BDD8u: goto label_BFC3BDD8; - case 0xBFC3BDF8u: goto label_BFC3BDF8; - case 0xBFC3BE04u: goto label_BFC3BE04; - case 0xBFC3BE08u: goto label_BFC3BE08; - default: break; - } - } -label_BFC3BDB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BDB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3BDB8: 00041C00 sll $v1, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00041C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3BDBC: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BDC0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3BDC4: 0460000F bltz $v1, 0xBFC3BE04 */ - uint32_t psx_brA_BFC3BDC4 = cpu->gpr[3]; - psx_taken_BFC3BDC4 = ((int32_t)psx_brA_BFC3BDC4 < 0); - psx_delay_BFC3BDC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BDC8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053DC8u); return; } g_debug_last_store_pc = 0x80053DC8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DC8u); -#endif - if (psx_delay_BFC3BDC4) { - psx_delay_BFC3BDC4 = 0; - if (psx_taken_BFC3BDC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E04u); - goto label_BFC3BE04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DCCu); - } -label_BFC3BDCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BDCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BDCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3BDCC: 2861000A slti $at, $v1, 10 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (10) ? 1 : 0); - PGXP_ALU(0x2861000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80053DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BDD0: 1020000D beq $at, $zero, 0xBFC3BE08 */ - uint32_t psx_brA_BFC3BDD0 = cpu->gpr[1]; uint32_t psx_brB_BFC3BDD0 = cpu->gpr[0]; - psx_taken_BFC3BDD0 = (psx_brA_BFC3BDD0 == psx_brB_BFC3BDD0); - psx_delay_BFC3BDD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BDD4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053DD4u); -#endif - if (psx_delay_BFC3BDD0) { - psx_delay_BFC3BDD0 = 0; - if (psx_taken_BFC3BDD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E08u); - goto label_BFC3BE08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053DD8u); - } -label_BFC3BDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3BDD8: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3BDDC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BDE0: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3BDE4: AC2EEDC0 sw $t6, -4672($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053DE4u); return; } g_debug_last_store_pc = 0x80053DE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEDC0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3BDE8: AC23EDC4 sw $v1, -4668($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053DE8u); return; } g_debug_last_store_pc = 0x80053DE8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EDC4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BDEC: 2484EDC0 addiu $a0, $a0, -4672 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-4672)); - PGXP_ALU(0x2484EDC0u, cpu->gpr[4], _pgx1, 0xFFFFEDC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80053DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BDF0: 0C015630 jal 0xB00558C0 */ - cpu->gpr[31] = 0x80053DF8u; /* jal link before delay slot */ - psx_delay_BFC3BDF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3BDF4: A7A30018 sh $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053DF4u); return; } g_debug_last_store_pc = 0x80053DF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } - PGXP_STORE(0xA7A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DF4u); -#endif - if (psx_delay_BFC3BDF0) { - psx_delay_BFC3BDF0 = 0; - cpu->gpr[31] = 0x80053DF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800558C0u); - cpu->pc = 0x800558C0u; return; - } -label_BFC3BDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053DF8u); -#endif - /* 0xBFC3BDF8: 87A30018 lh $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053DF8u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x87A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80053DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BDFC: 10000002 beq $zero, $zero, 0xBFC3BE08 */ - uint32_t psx_brA_BFC3BDFC = cpu->gpr[0]; uint32_t psx_brB_BFC3BDFC = cpu->gpr[0]; - psx_taken_BFC3BDFC = (psx_brA_BFC3BDFC == psx_brB_BFC3BDFC); - psx_delay_BFC3BDFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3BE00: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053E00u); -#endif - if (psx_delay_BFC3BDFC) { - psx_delay_BFC3BDFC = 0; - if (psx_taken_BFC3BDFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E08u); - goto label_BFC3BE08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053E04u); - } -label_BFC3BE04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BE04: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80053E04u); -#endif -label_BFC3BE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E08u); -#endif - /* 0xBFC3BE08: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053E08u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BE0C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BE10: 03E00008 jr $ra */ - psx_delay_BFC3BE10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BE14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053E14u); -#endif - if (psx_delay_BFC3BE10) { - psx_delay_BFC3BE10 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BE18(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BE18u); - int psx_delay_BFC3BE64 = 0; -label_BFC3BE18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BE18: 00042400 sll $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00042400u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BE1C: 00042403 sra $a0, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 16u); - PGXP_ALU(0x00042403u, cpu->gpr[4], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3BE20: 000473C0 sll $t6, $a0, 15 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 15u; - PGXP_ALU(0x000473C0u, cpu->gpr[14], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3BE24: 01C47023 subu $t6, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[14] - cpu->gpr[4]; - PGXP_ALU(0x01C47023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BE28: 2401007F addiu $at, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2401007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80053E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3BE2C: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80053E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BE30: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BE34: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3BE38: 0005CBC0 sll $t9, $a1, 15 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 15u; - PGXP_ALU(0x0005CBC0u, cpu->gpr[25], _pgx1, 15u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3BE3C: 0325C823 subu $t9, $t9, $a1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[5]; - PGXP_ALU(0x0325C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3BE40: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053E40u); -#endif - /* 0xBFC3BE44: 8F1895F4 lw $t8, -27148($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053E44u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F1895F4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3BE48: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3BE4C: 00007812 mflo $t7 */ - cpu->gpr[15] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00007812u, cpu->gpr[15], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3BE50: A70F0184 sh $t7, 388($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053E50u); return; } g_debug_last_store_pc = 0x80053E50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA70F0184u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E50u); -#endif - /* 0xBFC3BE54: 8D2995F4 lw $t1, -27148($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -27148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-27148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053E54u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D2995F4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3BE58: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80053E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3BE5C: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3BE60: A5280186 sh $t0, 390($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053E60u); return; } g_debug_last_store_pc = 0x80053E60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA5280186u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BE64: 03E00008 jr $ra */ - psx_delay_BFC3BE64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BE68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053E68u); -#endif - if (psx_delay_BFC3BE64) { - psx_delay_BFC3BE64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BE6C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BE6Cu); - int psx_delay_BFC3BE74 = 0; - int psx_delay_BFC3BE84 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BE7Cu: goto label_BFC3BE7C; - default: break; - } - } -label_BFC3BE6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BE6C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BE70: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053E70u); return; } g_debug_last_store_pc = 0x80053E70u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BE74: 0C014C58 jal 0xB0053160 */ - cpu->gpr[31] = 0x80053E7Cu; /* jal link before delay slot */ - psx_delay_BFC3BE74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BE78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053E78u); -#endif - if (psx_delay_BFC3BE74) { - psx_delay_BFC3BE74 = 0; - cpu->gpr[31] = 0x80053E7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053160u); - cpu->pc = 0x80053160u; return; - } -label_BFC3BE7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E7Cu); -#endif - /* 0xBFC3BE7C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053E7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BE80: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BE84: 03E00008 jr $ra */ - psx_delay_BFC3BE84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BE88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053E88u); -#endif - if (psx_delay_BFC3BE84) { - psx_delay_BFC3BE84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BE90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BE90u); - int psx_delay_BFC3BEEC = 0; - int psx_delay_BFC3BEFC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BEF4u: goto label_BFC3BEF4; - default: break; - } - } -label_BFC3BE90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BE90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BE90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3BE90: 00041C00 sll $v1, $a0, 16 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 16u; - PGXP_ALU(0x00041C00u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3BE94: 00031C03 sra $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 16u); - PGXP_ALU(0x00031C03u, cpu->gpr[3], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3BE98: 00037B80 sll $t7, $v1, 14 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[3] << 14u; - PGXP_ALU(0x00037B80u, cpu->gpr[15], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80053E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3BE9C: 01E37823 subu $t7, $t7, $v1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[15] - cpu->gpr[3]; - PGXP_ALU(0x01E37823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3BEA0: 2401007F addiu $at, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2401007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80053EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3BEA4: 01E1001A div $t7, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[15]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01E1001Au, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80053EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3BEA8: 00053C00 sll $a3, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00053C00u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3BEAC: 00073C03 sra $a3, $a3, 16 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 16u); - PGXP_ALU(0x00073C03u, cpu->gpr[7], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3BEB0: 0007CB80 sll $t9, $a3, 14 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 14u; - PGXP_ALU(0x0007CB80u, cpu->gpr[25], _pgx1, 14u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3BEB4: 0327C823 subu $t9, $t9, $a3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[7]; - PGXP_ALU(0x0327C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BEB8: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BEBC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053EBCu); return; } g_debug_last_store_pc = 0x80053EBCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3BEC0: 240E0003 addiu $t6, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x240E0003u, cpu->gpr[14], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3BEC4: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053EC4u); return; } g_debug_last_store_pc = 0x80053EC4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BEC8: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80053EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3BECC: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80053ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BED0: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3BED4: 0000C012 mflo $t8 */ - cpu->gpr[24] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C012u, cpu->gpr[24], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3BED8: A7B80020 sh $t8, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053ED8u); return; } g_debug_last_store_pc = 0x80053ED8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80020u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BEDC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3BEE0: 0321001A div $t9, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[25]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0321001Au, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80053EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3BEE4: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80053EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3BEE8: A7A80022 sh $t0, 34($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 34; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80053EE8u); return; } g_debug_last_store_pc = 0x80053EE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } - PGXP_STORE(0xA7A80022u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80053EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BEEC: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80053EF4u; /* jal link before delay slot */ - psx_delay_BFC3BEEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BEF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053EF0u); -#endif - if (psx_delay_BFC3BEEC) { - psx_delay_BFC3BEEC = 0; - cpu->gpr[31] = 0x80053EF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3BEF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BEF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BEF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053EF4u); -#endif - /* 0xBFC3BEF4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053EF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BEF8: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80053EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BEFC: 03E00008 jr $ra */ - psx_delay_BFC3BEFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BF00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053F00u); -#endif - if (psx_delay_BFC3BEFC) { - psx_delay_BFC3BEFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BF10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BF10u); - int psx_delay_BFC3BF28 = 0; - int psx_delay_BFC3BF38 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BF30u: goto label_BFC3BF30; - default: break; - } - } -label_BFC3BF10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BF10: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3BF14: 00041E00 sll $v1, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00041E00u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3BF18: 00031E03 sra $v1, $v1, 24 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 24u); - PGXP_ALU(0x00031E03u, cpu->gpr[3], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BF1C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F1Cu); return; } g_debug_last_store_pc = 0x80053F1Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x49u); -#endif - /* 0xBFC3BF20: 00603021 addu $a2, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00603021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BF24: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BF28: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80053F30u; /* jal link before delay slot */ - psx_delay_BFC3BF28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3BF2C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F2Cu); -#endif - if (psx_delay_BFC3BF28) { - psx_delay_BFC3BF28 = 0; - cpu->gpr[31] = 0x80053F30u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3BF30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F30u); -#endif - /* 0xBFC3BF30: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BF34: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BF38: 03E00008 jr $ra */ - psx_delay_BFC3BF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BF3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053F3Cu); -#endif - if (psx_delay_BFC3BF38) { - psx_delay_BFC3BF38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BF40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BF40u); - int psx_delay_BFC3BF5C = 0; - int psx_taken_BFC3BF5C = 0; - int psx_delay_BFC3BF64 = 0; - int psx_taken_BFC3BF64 = 0; - int psx_delay_BFC3BF6C = 0; - int psx_taken_BFC3BF6C = 0; - int psx_delay_BFC3BF84 = 0; - int psx_taken_BFC3BF84 = 0; - int psx_delay_BFC3BF98 = 0; - int psx_taken_BFC3BF98 = 0; - int psx_delay_BFC3BFA0 = 0; - int psx_taken_BFC3BFA0 = 0; - int psx_delay_BFC3BFB4 = 0; - int psx_taken_BFC3BFB4 = 0; - int psx_delay_BFC3BFD0 = 0; - int psx_delay_BFC3BFE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3BF64u: goto label_BFC3BF64; - case 0xBFC3BF6Cu: goto label_BFC3BF6C; - case 0xBFC3BF74u: goto label_BFC3BF74; - case 0xBFC3BF84u: goto label_BFC3BF84; - case 0xBFC3BF8Cu: goto label_BFC3BF8C; - case 0xBFC3BF98u: goto label_BFC3BF98; - case 0xBFC3BFA0u: goto label_BFC3BFA0; - case 0xBFC3BFA8u: goto label_BFC3BFA8; - case 0xBFC3BFB4u: goto label_BFC3BFB4; - case 0xBFC3BFBCu: goto label_BFC3BFBC; - case 0xBFC3BFCCu: goto label_BFC3BFCC; - case 0xBFC3BFD8u: goto label_BFC3BFD8; - default: break; - } - } -label_BFC3BF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BF40: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BF44: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BF48: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BF4C: 00052E00 sll $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 24u; - PGXP_ALU(0x00052E00u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3BF50: 00063600 sll $a2, $a2, 24 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 24u; - PGXP_ALU(0x00063600u, cpu->gpr[6], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3BF54: 00063603 sra $a2, $a2, 24 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 24u); - PGXP_ALU(0x00063603u, cpu->gpr[6], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BF58: 00052E03 sra $a1, $a1, 24 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 24u); - PGXP_ALU(0x00052E03u, cpu->gpr[5], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BF5C: 10800003 beq $a0, $zero, 0xBFC3BF6C */ - uint32_t psx_brA_BFC3BF5C = cpu->gpr[4]; uint32_t psx_brB_BFC3BF5C = cpu->gpr[0]; - psx_taken_BFC3BF5C = (psx_brA_BFC3BF5C == psx_brB_BFC3BF5C); - psx_delay_BFC3BF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3BF60: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F60u); return; } g_debug_last_store_pc = 0x80053F60u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F60u); -#endif - if (psx_delay_BFC3BF5C) { - psx_delay_BFC3BF5C = 0; - if (psx_taken_BFC3BF5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F6Cu); - goto label_BFC3BF6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F64u); - } -label_BFC3BF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BF64: 1000000C beq $zero, $zero, 0xBFC3BF98 */ - uint32_t psx_brA_BFC3BF64 = cpu->gpr[0]; uint32_t psx_brB_BFC3BF64 = cpu->gpr[0]; - psx_taken_BFC3BF64 = (psx_brA_BFC3BF64 == psx_brB_BFC3BF64); - psx_delay_BFC3BF64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BF68: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F68u); -#endif - if (psx_delay_BFC3BF64) { - psx_delay_BFC3BF64 = 0; - if (psx_taken_BFC3BF64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F98u); - goto label_BFC3BF98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F6Cu); - } -label_BFC3BF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3BF6C: 14A00005 bne $a1, $zero, 0xBFC3BF84 */ - uint32_t psx_brA_BFC3BF6C = cpu->gpr[5]; uint32_t psx_brB_BFC3BF6C = cpu->gpr[0]; - psx_taken_BFC3BF6C = (psx_brA_BFC3BF6C != psx_brB_BFC3BF6C); - psx_delay_BFC3BF6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BF70: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F70u); -#endif - if (psx_delay_BFC3BF6C) { - psx_delay_BFC3BF6C = 0; - if (psx_taken_BFC3BF6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F84u); - goto label_BFC3BF84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F74u); - } -label_BFC3BF74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3BF74: 240E0400 addiu $t6, $zero, 1024 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); - PGXP_ALU(0x240E0400u, cpu->gpr[14], _pgx1, 0x00000400u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3BF78: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F78u); return; } g_debug_last_store_pc = 0x80053F78u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BF7C: AFA60030 sw $a2, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F7Cu); return; } g_debug_last_store_pc = 0x80053F7Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3BF80: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F80u); -#endif -label_BFC3BF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3BF84: 14A20004 bne $a1, $v0, 0xBFC3BF98 */ - uint32_t psx_brA_BFC3BF84 = cpu->gpr[5]; uint32_t psx_brB_BFC3BF84 = cpu->gpr[2]; - psx_taken_BFC3BF84 = (psx_brA_BFC3BF84 != psx_brB_BFC3BF84); - psx_delay_BFC3BF84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BF88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053F88u); -#endif - if (psx_delay_BFC3BF84) { - psx_delay_BFC3BF84 = 0; - if (psx_taken_BFC3BF84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F98u); - goto label_BFC3BF98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053F8Cu); - } -label_BFC3BF8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3BF8C: 240F0100 addiu $t7, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x240F0100u, cpu->gpr[15], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80053F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3BF90: AFAF001C sw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F90u); return; } g_debug_last_store_pc = 0x80053F90u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BF94: AFA6002C sw $a2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053F94u); return; } g_debug_last_store_pc = 0x80053F94u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6002Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053F94u); -#endif -label_BFC3BF98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BF98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3BF98: 1482000C bne $a0, $v0, 0xBFC3BFCC */ - uint32_t psx_brA_BFC3BF98 = cpu->gpr[4]; uint32_t psx_brB_BFC3BF98 = cpu->gpr[2]; - psx_taken_BFC3BF98 = (psx_brA_BFC3BF98 != psx_brB_BFC3BF98); - psx_delay_BFC3BF98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BF9C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053F9Cu); -#endif - if (psx_delay_BFC3BF98) { - psx_delay_BFC3BF98 = 0; - if (psx_taken_BFC3BF98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FCCu); - goto label_BFC3BFCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FA0u); - } -label_BFC3BFA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3BFA0: 14A00004 bne $a1, $zero, 0xBFC3BFB4 */ - uint32_t psx_brA_BFC3BFA0 = cpu->gpr[5]; uint32_t psx_brB_BFC3BFA0 = cpu->gpr[0]; - psx_taken_BFC3BFA0 = (psx_brA_BFC3BFA0 != psx_brB_BFC3BFA0); - psx_delay_BFC3BFA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BFA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053FA4u); -#endif - if (psx_delay_BFC3BFA0) { - psx_delay_BFC3BFA0 = 0; - if (psx_taken_BFC3BFA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FB4u); - goto label_BFC3BFB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FA8u); - } -label_BFC3BFA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3BFA8: 24180800 addiu $t8, $zero, 2048 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); - PGXP_ALU(0x24180800u, cpu->gpr[24], _pgx1, 0x00000800u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3BFAC: AFB8001C sw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053FACu); return; } g_debug_last_store_pc = 0x80053FACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80053FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BFB0: AFA6003C sw $a2, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053FB0u); return; } g_debug_last_store_pc = 0x80053FB0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA6003Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053FB0u); -#endif -label_BFC3BFB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3BFB4: 14A20005 bne $a1, $v0, 0xBFC3BFCC */ - uint32_t psx_brA_BFC3BFB4 = cpu->gpr[5]; uint32_t psx_brB_BFC3BFB4 = cpu->gpr[2]; - psx_taken_BFC3BFB4 = (psx_brA_BFC3BFB4 != psx_brB_BFC3BFB4); - psx_delay_BFC3BFB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BFB8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053FB8u); -#endif - if (psx_delay_BFC3BFB4) { - psx_delay_BFC3BFB4 = 0; - if (psx_taken_BFC3BFB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FCCu); - goto label_BFC3BFCC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80053FBCu); - } -label_BFC3BFBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3BFBC: 24190200 addiu $t9, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24190200u, cpu->gpr[25], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3BFC0: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053FC0u); return; } g_debug_last_store_pc = 0x80053FC0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80053FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BFC4: AFA60038 sw $a2, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053FC4u); return; } g_debug_last_store_pc = 0x80053FC4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60038u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80053FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3BFC8: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80053FC8u); -#endif -label_BFC3BFCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3BFCC: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3BFD0: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80053FD8u; /* jal link before delay slot */ - psx_delay_BFC3BFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3BFD4: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80053FD4u); -#endif - if (psx_delay_BFC3BFD0) { - psx_delay_BFC3BFD0 = 0; - cpu->gpr[31] = 0x80053FD8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3BFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FD8u); -#endif - /* 0xBFC3BFD8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80053FD8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80053FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BFDC: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3BFE0: 03E00008 jr $ra */ - psx_delay_BFC3BFE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3BFE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80053FE4u); -#endif - if (psx_delay_BFC3BFE0) { - psx_delay_BFC3BFE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3BFF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3BFF0u); - int psx_delay_BFC3C00C = 0; - int psx_taken_BFC3C00C = 0; - int psx_delay_BFC3C028 = 0; - int psx_taken_BFC3C028 = 0; - int psx_delay_BFC3C048 = 0; - int psx_delay_BFC3C058 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C014u: goto label_BFC3C014; - case 0xBFC3C024u: goto label_BFC3C024; - case 0xBFC3C030u: goto label_BFC3C030; - case 0xBFC3C044u: goto label_BFC3C044; - case 0xBFC3C050u: goto label_BFC3C050; - default: break; - } - } -label_BFC3BFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3BFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3BFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80053FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BFF0: 00042600 sll $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 24u; - PGXP_ALU(0x00042600u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3BFF4: 00042603 sra $a0, $a0, 24 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 24u); - PGXP_ALU(0x00042603u, cpu->gpr[4], _pgx1, 24u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3BFF8: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3BFFC: 00052C00 sll $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 16u; - PGXP_ALU(0x00052C00u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80053FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3C000: 00063400 sll $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 16u; - PGXP_ALU(0x00063400u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3C004: 00063403 sra $a2, $a2, 16 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 16u); - PGXP_ALU(0x00063403u, cpu->gpr[6], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C008: 00052C03 sra $a1, $a1, 16 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 16u); - PGXP_ALU(0x00052C03u, cpu->gpr[5], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C00C: 14800005 bne $a0, $zero, 0xBFC3C024 */ - uint32_t psx_brA_BFC3C00C = cpu->gpr[4]; uint32_t psx_brB_BFC3C00C = cpu->gpr[0]; - psx_taken_BFC3C00C = (psx_brA_BFC3C00C != psx_brB_BFC3C00C); - psx_delay_BFC3C00C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C010: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054010u); return; } g_debug_last_store_pc = 0x80054010u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054010u); -#endif - if (psx_delay_BFC3C00C) { - psx_delay_BFC3C00C = 0; - if (psx_taken_BFC3C00C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054024u); - goto label_BFC3C024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054014u); - } -label_BFC3C014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3C014: A7A50028 sh $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054014u); return; } g_debug_last_store_pc = 0x80054014u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA7A50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3C018: 240E0030 addiu $t6, $zero, 48 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (48)); - PGXP_ALU(0x240E0030u, cpu->gpr[14], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80054018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3C01C: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005401Cu); return; } g_debug_last_store_pc = 0x8005401Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005401Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3C020: A7A6002A sh $a2, 42($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054020u); return; } g_debug_last_store_pc = 0x80054020u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA7A6002Au, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80054020u); -#endif -label_BFC3C024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C024: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3C028: 14810006 bne $a0, $at, 0xBFC3C044 */ - uint32_t psx_brA_BFC3C028 = cpu->gpr[4]; uint32_t psx_brB_BFC3C028 = cpu->gpr[1]; - psx_taken_BFC3C028 = (psx_brA_BFC3C028 != psx_brB_BFC3C028); - psx_delay_BFC3C028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C02C: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005402Cu); -#endif - if (psx_delay_BFC3C028) { - psx_delay_BFC3C028 = 0; - if (psx_taken_BFC3C028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054044u); - goto label_BFC3C044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054030u); - } -label_BFC3C030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3C030: A7A50034 sh $a1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054030u); return; } g_debug_last_store_pc = 0x80054030u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA7A50034u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3C034: 240F00C0 addiu $t7, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240F00C0u, cpu->gpr[15], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3C038: AFAF001C sw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054038u); return; } g_debug_last_store_pc = 0x80054038u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3C03C: A7A60036 sh $a2, 54($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 54; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005403Cu); return; } g_debug_last_store_pc = 0x8005403Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA7A60036u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005403Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C040: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054040u); -#endif -label_BFC3C044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C044: 24050100 addiu $a1, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24050100u, cpu->gpr[5], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80054044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C048: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80054050u; /* jal link before delay slot */ - psx_delay_BFC3C048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3C04C: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005404Cu); -#endif - if (psx_delay_BFC3C048) { - psx_delay_BFC3C048 = 0; - cpu->gpr[31] = 0x80054050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3C050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054050u); -#endif - /* 0xBFC3C050: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054050u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C054: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80054054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C058: 03E00008 jr $ra */ - psx_delay_BFC3C058 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C05C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005405Cu); -#endif - if (psx_delay_BFC3C058) { - psx_delay_BFC3C058 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C060(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C060u); - int psx_delay_BFC3C068 = 0; - int psx_delay_BFC3C078 = 0; - int psx_delay_BFC3C0D0 = 0; - int psx_delay_BFC3C0E8 = 0; - int psx_taken_BFC3C0E8 = 0; - int psx_delay_BFC3C0F8 = 0; - int psx_delay_BFC3C110 = 0; - int psx_delay_BFC3C120 = 0; - int psx_delay_BFC3C128 = 0; - int psx_delay_BFC3C138 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C070u: goto label_BFC3C070; - case 0xBFC3C080u: goto label_BFC3C080; - case 0xBFC3C0D8u: goto label_BFC3C0D8; - case 0xBFC3C0F0u: goto label_BFC3C0F0; - case 0xBFC3C100u: goto label_BFC3C100; - case 0xBFC3C118u: goto label_BFC3C118; - case 0xBFC3C128u: goto label_BFC3C128; - case 0xBFC3C130u: goto label_BFC3C130; - default: break; - } - } -label_BFC3C060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C060: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C064: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054064u); return; } g_debug_last_store_pc = 0x80054064u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C068: 0C015067 jal 0xB005419C */ - cpu->gpr[31] = 0x80054070u; /* jal link before delay slot */ - psx_delay_BFC3C068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C06C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005406Cu); -#endif - if (psx_delay_BFC3C068) { - psx_delay_BFC3C068 = 0; - cpu->gpr[31] = 0x80054070u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005419Cu); - cpu->pc = 0x8005419Cu; return; - } -label_BFC3C070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C070: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C074: 24849794 addiu $a0, $a0, -26732 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26732)); - PGXP_ALU(0x24849794u, cpu->gpr[4], _pgx1, 0xFFFF9794u); } -#ifdef PSX_COSIM - cosim_instr(0x80054074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C078: 0C015106 jal 0xB0054418 */ - cpu->gpr[31] = 0x80054080u; /* jal link before delay slot */ - psx_delay_BFC3C078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C07C: 24050003 addiu $a1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24050003u, cpu->gpr[5], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005407Cu); -#endif - if (psx_delay_BFC3C078) { - psx_delay_BFC3C078 = 0; - cpu->gpr[31] = 0x80054080u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054418u); - cpu->pc = 0x80054418u; return; - } -label_BFC3C080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C080: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C084: AC229F18 sw $v0, -24808($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24808; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054084u); return; } g_debug_last_store_pc = 0x80054084u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F18u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C088: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C08C: AC20E40C sw $zero, -7156($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005408Cu); return; } g_debug_last_store_pc = 0x8005408Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E40Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005408Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C090: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C094: A420E410 sh $zero, -7152($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054094u); return; } g_debug_last_store_pc = 0x80054094u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420E410u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C098: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C09C: A420E412 sh $zero, -7150($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7150; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7150)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005409Cu); return; } g_debug_last_store_pc = 0x8005409Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420E412u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005409Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0A0: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C0A4: AC20E414 sw $zero, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540A4u); return; } g_debug_last_store_pc = 0x800540A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E414u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800540A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0A8: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C0AC: AC20E418 sw $zero, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540ACu); return; } g_debug_last_store_pc = 0x800540ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E418u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800540ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0B0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C0B4: AC209F1C sw $zero, -24804($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24804; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24804)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540B4u); return; } g_debug_last_store_pc = 0x800540B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F1Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800540B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0B8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3C0BC: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800540BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C0C0: AC209F20 sw $zero, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540C0u); return; } g_debug_last_store_pc = 0x800540C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F20u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800540C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3C0C4: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540C4u); return; } g_debug_last_store_pc = 0x800540C4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800540C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3C0C8: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800540C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C0CC: 24050021 addiu $a1, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24050021u, cpu->gpr[5], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x800540CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C0D0: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x800540D8u; /* jal link before delay slot */ - psx_delay_BFC3C0D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3C0D4: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800540D4u); -#endif - if (psx_delay_BFC3C0D0) { - psx_delay_BFC3C0D0 = 0; - cpu->gpr[31] = 0x800540D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3C0D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C0D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C0D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3C0D8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540D8u); -#endif - /* 0xBFC3C0DC: 8F189790 lw $t8, -26736($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -26736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-26736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540DCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189790u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800540DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3C0E0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800540E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0E4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3C0E8: 17000011 bne $t8, $zero, 0xBFC3C130 */ - uint32_t psx_brA_BFC3C0E8 = cpu->gpr[24]; uint32_t psx_brB_BFC3C0E8 = cpu->gpr[0]; - psx_taken_BFC3C0E8 = (psx_brA_BFC3C0E8 != psx_brB_BFC3C0E8); - psx_delay_BFC3C0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3C0EC: AC2F9F28 sw $t7, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540ECu); return; } g_debug_last_store_pc = 0x800540ECu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9F28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800540ECu); -#endif - if (psx_delay_BFC3C0E8) { - psx_delay_BFC3C0E8 = 0; - if (psx_taken_BFC3C0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054130u); - goto label_BFC3C130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800540F0u); - } -label_BFC3C0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800540F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3C0F0: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800540F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C0F4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800540F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C0F8: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x80054100u; /* jal link before delay slot */ - psx_delay_BFC3C0F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3C0FC: AC399790 sw $t9, -26736($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -26736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-26736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800540FCu); return; } g_debug_last_store_pc = 0x800540FCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399790u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800540FCu); -#endif - if (psx_delay_BFC3C0F8) { - psx_delay_BFC3C0F8 = 0; - cpu->gpr[31] = 0x80054100u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC3C100: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C100u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C100: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C104: 34840009 ori $a0, $a0, 0x9 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x9u; - PGXP_ALU(0x34840009u, cpu->gpr[4], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0x80054104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C108: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80054108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C10C: 24062000 addiu $a2, $zero, 8192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); - PGXP_ALU(0x24062000u, cpu->gpr[6], _pgx1, 0x00002000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005410Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C110: 0C016A74 jal 0xB005A9D0 */ - cpu->gpr[31] = 0x80054118u; /* jal link before delay slot */ - psx_delay_BFC3C110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3C114: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054114u); -#endif - if (psx_delay_BFC3C110) { - psx_delay_BFC3C110 = 0; - cpu->gpr[31] = 0x80054118u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9D0u); - cpu->pc = 0x8005A9D0u; return; - } -label_BFC3C118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C118: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C11C: AC229F24 sw $v0, -24796($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24796; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005411Cu); return; } g_debug_last_store_pc = 0x8005411Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229F24u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005411Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C120: 0C016A78 jal 0xB005A9E0 */ - cpu->gpr[31] = 0x80054128u; /* jal link before delay slot */ - psx_delay_BFC3C120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3C124: 00402021 addu $a0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054124u); -#endif - if (psx_delay_BFC3C120) { - psx_delay_BFC3C120 = 0; - cpu->gpr[31] = 0x80054128u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A9E0u); - cpu->pc = 0x8005A9E0u; return; - } -label_BFC3C128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C128: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80054130u; /* jal link before delay slot */ - psx_delay_BFC3C128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C12C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005412Cu); -#endif - if (psx_delay_BFC3C128) { - psx_delay_BFC3C128 = 0; - cpu->gpr[31] = 0x80054130u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC3C130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054130u); -#endif - /* 0xBFC3C130: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054130u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C134: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80054134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C138: 03E00008 jr $ra */ - psx_delay_BFC3C138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C13C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005413Cu); -#endif - if (psx_delay_BFC3C138) { - psx_delay_BFC3C138 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C140(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C140u); - int psx_delay_BFC3C154 = 0; - int psx_taken_BFC3C154 = 0; - int psx_delay_BFC3C18C = 0; - int psx_taken_BFC3C18C = 0; - int psx_delay_BFC3C194 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C15Cu: goto label_BFC3C15C; - case 0xBFC3C160u: goto label_BFC3C160; - case 0xBFC3C194u: goto label_BFC3C194; - default: break; - } - } -label_BFC3C140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C140: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80054140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3C144: AFA00004 sw $zero, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054144u); return; } g_debug_last_store_pc = 0x80054144u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054144u); -#endif - /* 0xBFC3C148: 8FAE0004 lw $t6, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054148u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C14C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005414Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3C150: 29C100F0 slti $at, $t6, 240 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (240) ? 1 : 0); - PGXP_ALU(0x29C100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C154: 1020000F beq $at, $zero, 0xBFC3C194 */ - uint32_t psx_brA_BFC3C154 = cpu->gpr[1]; uint32_t psx_brB_BFC3C154 = cpu->gpr[0]; - psx_taken_BFC3C154 = (psx_brA_BFC3C154 == psx_brB_BFC3C154); - psx_delay_BFC3C154 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C158: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054158u); -#endif - if (psx_delay_BFC3C154) { - psx_delay_BFC3C154 = 0; - if (psx_taken_BFC3C154) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054194u); - goto label_BFC3C194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005415Cu); - } -label_BFC3C15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005415Cu); -#endif - /* 0xBFC3C15C: 8FAF0000 lw $t7, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005415Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005415Cu); -#endif -label_BFC3C160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C160: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C164: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80054164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C168: 030FC023 subu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] - cpu->gpr[15]; - PGXP_ALU(0x030FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3C16C: AFB80000 sw $t8, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005416Cu); return; } g_debug_last_store_pc = 0x8005416Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005416Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054170u); -#endif - /* 0xBFC3C170: 8FB90004 lw $t9, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054170u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C178: 27280001 addiu $t0, $t9, 1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (1)); - PGXP_ALU(0x27280001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3C17C: AFA80004 sw $t0, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005417Cu); return; } g_debug_last_store_pc = 0x8005417Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005417Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054180u); -#endif - /* 0xBFC3C180: 8FA90004 lw $t1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054180u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C184: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3C188: 292100F0 slti $at, $t1, 240 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (240) ? 1 : 0); - PGXP_ALU(0x292100F0u, cpu->gpr[1], _pgx1, 0x00F0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C18C: 1420FFF4 bne $at, $zero, 0xBFC3C160 */ - uint32_t psx_brA_BFC3C18C = cpu->gpr[1]; uint32_t psx_brB_BFC3C18C = cpu->gpr[0]; - psx_taken_BFC3C18C = (psx_brA_BFC3C18C != psx_brB_BFC3C18C); - psx_delay_BFC3C18C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054190u); -#endif - /* 0xBFC3C190: 8FAF0000 lw $t7, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054190u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054190u); -#endif - if (psx_delay_BFC3C18C) { - psx_delay_BFC3C18C = 0; - if (psx_taken_BFC3C18C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054160u); - goto label_BFC3C160; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054194u); - } -label_BFC3C194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C194: 03E00008 jr $ra */ - psx_delay_BFC3C194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C198: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80054198u); -#endif - if (psx_delay_BFC3C194) { - psx_delay_BFC3C194 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C19C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C19Cu); - int psx_delay_BFC3C1E4 = 0; - int psx_delay_BFC3C1F8 = 0; - int psx_taken_BFC3C1F8 = 0; - int psx_delay_BFC3C200 = 0; - int psx_taken_BFC3C200 = 0; - int psx_delay_BFC3C210 = 0; - int psx_taken_BFC3C210 = 0; - int psx_delay_BFC3C228 = 0; - int psx_delay_BFC3C238 = 0; - int psx_taken_BFC3C238 = 0; - int psx_delay_BFC3C24C = 0; - int psx_taken_BFC3C24C = 0; - int psx_delay_BFC3C2B8 = 0; - int psx_delay_BFC3C37C = 0; - int psx_taken_BFC3C37C = 0; - int psx_delay_BFC3C3A0 = 0; - int psx_delay_BFC3C3A8 = 0; - int psx_delay_BFC3C3B0 = 0; - int psx_delay_BFC3C3B8 = 0; - int psx_delay_BFC3C3DC = 0; - int psx_delay_BFC3C3E4 = 0; - int psx_delay_BFC3C3EC = 0; - int psx_delay_BFC3C3F4 = 0; - int psx_delay_BFC3C410 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C1ECu: goto label_BFC3C1EC; - case 0xBFC3C200u: goto label_BFC3C200; - case 0xBFC3C208u: goto label_BFC3C208; - case 0xBFC3C218u: goto label_BFC3C218; - case 0xBFC3C230u: goto label_BFC3C230; - case 0xBFC3C240u: goto label_BFC3C240; - case 0xBFC3C254u: goto label_BFC3C254; - case 0xBFC3C258u: goto label_BFC3C258; - case 0xBFC3C25Cu: goto label_BFC3C25C; - case 0xBFC3C2C0u: goto label_BFC3C2C0; - case 0xBFC3C2E0u: goto label_BFC3C2E0; - case 0xBFC3C384u: goto label_BFC3C384; - case 0xBFC3C3A8u: goto label_BFC3C3A8; - case 0xBFC3C3B0u: goto label_BFC3C3B0; - case 0xBFC3C3B8u: goto label_BFC3C3B8; - case 0xBFC3C3C0u: goto label_BFC3C3C0; - case 0xBFC3C3E4u: goto label_BFC3C3E4; - case 0xBFC3C3ECu: goto label_BFC3C3EC; - case 0xBFC3C3F4u: goto label_BFC3C3F4; - case 0xBFC3C3FCu: goto label_BFC3C3FC; - default: break; - } - } -label_BFC3C19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005419Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C19C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005419Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C1A0: AC20EE28 sw $zero, -4568($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4568; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541A0u); return; } g_debug_last_store_pc = 0x800541A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800541A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C1A4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C1A8: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800541A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C1AC: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C1B0: AC20EE30 sw $zero, -4560($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541B0u); return; } g_debug_last_store_pc = 0x800541B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800541B0u); -#endif - /* 0xBFC3C1B4: 8C4297B0 lw $v0, -26704($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -26704; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-26704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C4297B0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800541B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3C1B8: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541B8u); return; } g_debug_last_store_pc = 0x800541B8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800541B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C1BC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C1C0: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541C0u); return; } g_debug_last_store_pc = 0x800541C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800541C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C1C4: A420EE24 sh $zero, -4572($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800541C4u); return; } g_debug_last_store_pc = 0x800541C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA420EE24u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800541C4u); -#endif - /* 0xBFC3C1C8: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800541C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3C1CC: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541D0u); -#endif - /* 0xBFC3C1D0: 8E1097A0 lw $s0, -26720($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541D0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E1097A0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800541D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C1D4: 3C01000B lui $at, 0xB */ - cpu->gpr[1] = 0x000B0000u; - PGXP_ALU(0x3C01000Bu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC3C1D8: 01C17825 or $t7, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C17825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800541D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3C1DC: 34188000 ori $t8, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34188000u, cpu->gpr[24], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x800541DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3C1E0: AC4F0000 sw $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800541E0u); return; } g_debug_last_store_pc = 0x800541E0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC4F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800541E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C1E4: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800541ECu; /* jal link before delay slot */ - psx_delay_BFC3C1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010000u); -#endif - /* 0xBFC3C1E8: A61801AA sh $t8, 426($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800541E8u); return; } g_debug_last_store_pc = 0x800541E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA61801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800541E8u); -#endif - if (psx_delay_BFC3C1E4) { - psx_delay_BFC3C1E4 = 0; - cpu->gpr[31] = 0x800541ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541ECu); -#endif - /* 0xBFC3C1EC: 961901AE lhu $t9, 430($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800541ECu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x961901AEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800541ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800541F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C1F0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800541F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3C1F4: 332A07FF andi $t2, $t9, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[25] & 0x7FFu; - PGXP_ALU(0x332A07FFu, cpu->gpr[10], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800541F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3C1F8: 15400003 bne $t2, $zero, 0xBFC3C208 */ - uint32_t psx_brA_BFC3C1F8 = cpu->gpr[10]; uint32_t psx_brB_BFC3C1F8 = cpu->gpr[0]; - psx_taken_BFC3C1F8 = (psx_brA_BFC3C1F8 != psx_brB_BFC3C1F8); - psx_delay_BFC3C1F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C1FC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800541FCu); -#endif - if (psx_delay_BFC3C1F8) { - psx_delay_BFC3C1F8 = 0; - if (psx_taken_BFC3C1F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054208u); - goto label_BFC3C208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054200u); - } -label_BFC3C200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C200: 10000015 beq $zero, $zero, 0xBFC3C258 */ - uint32_t psx_brA_BFC3C200 = cpu->gpr[0]; uint32_t psx_brB_BFC3C200 = cpu->gpr[0]; - psx_taken_BFC3C200 = (psx_brA_BFC3C200 == psx_brB_BFC3C200); - psx_delay_BFC3C200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C204: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054204u); return; } g_debug_last_store_pc = 0x80054204u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054204u); -#endif - if (psx_delay_BFC3C200) { - psx_delay_BFC3C200 = 0; - if (psx_taken_BFC3C200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054258u); - goto label_BFC3C258; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054208u); - } -label_BFC3C208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C208: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C20C: 28411389 slti $at, $v0, 5001 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0); - PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x8005420Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C210: 1420000B bne $at, $zero, 0xBFC3C240 */ - uint32_t psx_brA_BFC3C210 = cpu->gpr[1]; uint32_t psx_brB_BFC3C210 = cpu->gpr[0]; - psx_taken_BFC3C210 = (psx_brA_BFC3C210 != psx_brB_BFC3C210); - psx_delay_BFC3C210 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C214: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054214u); -#endif - if (psx_delay_BFC3C210) { - psx_delay_BFC3C210 = 0; - if (psx_taken_BFC3C210) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054240u); - goto label_BFC3C240; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054218u); - } -label_BFC3C218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C218: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C21C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005421Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C220: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054220u); return; } g_debug_last_store_pc = 0x80054220u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C224: 24A597E0 addiu $a1, $a1, -26656 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26656)); - PGXP_ALU(0x24A597E0u, cpu->gpr[5], _pgx1, 0xFFFF97E0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C228: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80054230u; /* jal link before delay slot */ - psx_delay_BFC3C228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C22C: 248497CC addiu $a0, $a0, -26676 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26676)); - PGXP_ALU(0x248497CCu, cpu->gpr[4], _pgx1, 0xFFFF97CCu); } -#ifdef PSX_COSIM - cosim_instr(0x8005422Cu); -#endif - if (psx_delay_BFC3C228) { - psx_delay_BFC3C228 = 0; - cpu->gpr[31] = 0x80054230u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3C230: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054230u); -#endif - /* 0xBFC3C234: 8E1097A0 lw $s0, -26720($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054234u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E1097A0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80054234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C238: 10000008 beq $zero, $zero, 0xBFC3C25C */ - uint32_t psx_brA_BFC3C238 = cpu->gpr[0]; uint32_t psx_brB_BFC3C238 = cpu->gpr[0]; - psx_taken_BFC3C238 = (psx_brA_BFC3C238 == psx_brB_BFC3C238); - psx_delay_BFC3C238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C23C: A6000180 sh $zero, 384($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005423Cu); return; } g_debug_last_store_pc = 0x8005423Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005423Cu); -#endif - if (psx_delay_BFC3C238) { - psx_delay_BFC3C238 = 0; - if (psx_taken_BFC3C238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005425Cu); - goto label_BFC3C25C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054240u); - } -label_BFC3C240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054240u); -#endif - /* 0xBFC3C240: 960B01AE lhu $t3, 430($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054240u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10000u); } - PGXP_LOAD(0x960B01AEu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C244: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3C248: 316C07FF andi $t4, $t3, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x7FFu; - PGXP_ALU(0x316C07FFu, cpu->gpr[12], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3C24C: 1580FFEE bne $t4, $zero, 0xBFC3C208 */ - uint32_t psx_brA_BFC3C24C = cpu->gpr[12]; uint32_t psx_brB_BFC3C24C = cpu->gpr[0]; - psx_taken_BFC3C24C = (psx_brA_BFC3C24C != psx_brB_BFC3C24C); - psx_delay_BFC3C24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C250: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054250u); -#endif - if (psx_delay_BFC3C24C) { - psx_delay_BFC3C24C = 0; - if (psx_taken_BFC3C24C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054208u); - goto label_BFC3C208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054254u); - } -label_BFC3C254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C254: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054254u); return; } g_debug_last_store_pc = 0x80054254u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054254u); -#endif -label_BFC3C258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C258: A6000180 sh $zero, 384($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054258u); return; } g_debug_last_store_pc = 0x80054258u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000180u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054258u); -#endif -label_BFC3C25C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C25Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C25C: A6000182 sh $zero, 386($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005425Cu); return; } g_debug_last_store_pc = 0x8005425Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000182u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005425Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C260: A6000184 sh $zero, 388($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054260u); return; } g_debug_last_store_pc = 0x80054260u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C264: A6000186 sh $zero, 390($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054264u); return; } g_debug_last_store_pc = 0x80054264u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C268: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC3C26C: A602018C sh $v0, 396($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (396)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005426Cu); return; } g_debug_last_store_pc = 0x8005426Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602018Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005426Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10004u); -#endif - /* 0xBFC3C270: A602018E sh $v0, 398($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 398; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (398)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054270u); return; } g_debug_last_store_pc = 0x80054270u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA602018Eu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C274: A6000190 sh $zero, 400($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 400; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (400)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054274u); return; } g_debug_last_store_pc = 0x80054274u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000190u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C278: A6000192 sh $zero, 402($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 402; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (402)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054278u); return; } g_debug_last_store_pc = 0x80054278u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000192u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C27C: A6000194 sh $zero, 404($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 404; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (404)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005427Cu); return; } g_debug_last_store_pc = 0x8005427Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000194u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005427Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C280: A6000196 sh $zero, 406($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 406; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (406)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054280u); return; } g_debug_last_store_pc = 0x80054280u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000196u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C284: A6000198 sh $zero, 408($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054284u); return; } g_debug_last_store_pc = 0x80054284u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA6000198u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C288: A600019A sh $zero, 410($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 410; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054288u); return; } g_debug_last_store_pc = 0x80054288u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA600019Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C28C: A60001B0 sh $zero, 432($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 432; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (432)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005428Cu); return; } g_debug_last_store_pc = 0x8005428Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA60001B0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005428Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C290: A60001B2 sh $zero, 434($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 434; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (434)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054290u); return; } g_debug_last_store_pc = 0x80054290u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA60001B2u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C294: A60001B4 sh $zero, 436($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 436; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (436)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054294u); return; } g_debug_last_store_pc = 0x80054294u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA60001B4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC3C298: A60001B6 sh $zero, 438($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 438; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (438)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054298u); return; } g_debug_last_store_pc = 0x80054298u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA60001B6u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3C29C: 240D0004 addiu $t5, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x240D0004u, cpu->gpr[13], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005429Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC3C2A0: A60D01AC sh $t5, 428($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542A0u); return; } g_debug_last_store_pc = 0x800542A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D01ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800542A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3C2A4: 240E0200 addiu $t6, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x240E0200u, cpu->gpr[14], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x800542A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C2A8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800542A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C2AC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800542ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3C2B0: A42EEE24 sh $t6, -4572($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542B0u); return; } g_debug_last_store_pc = 0x800542B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EEE24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800542B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C2B4: 248497BC addiu $a0, $a0, -26692 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26692)); - PGXP_ALU(0x248497BCu, cpu->gpr[4], _pgx1, 0xFFFF97BCu); } -#ifdef PSX_COSIM - cosim_instr(0x800542B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C2B8: 0C015138 jal 0xB00544E0 */ - cpu->gpr[31] = 0x800542C0u; /* jal link before delay slot */ - psx_delay_BFC3C2B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C2BC: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800542BCu); -#endif - if (psx_delay_BFC3C2B8) { - psx_delay_BFC3C2B8 = 0; - cpu->gpr[31] = 0x800542C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544E0u); - cpu->pc = 0x800544E0u; return; - } -label_BFC3C2C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C2C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C2C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3C2C0: 3C108008 lui $s0, 0x8008 */ - cpu->gpr[16] = 0x80080000u; - PGXP_ALU(0x3C108008u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800542C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C2C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800542C4u); -#endif - /* 0xBFC3C2C8: 8E1097A0 lw $s0, -26720($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800542C8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E1097A0u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800542C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C2CC: AC20EE30 sw $zero, -4560($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800542CCu); return; } g_debug_last_store_pc = 0x800542CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE30u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800542CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3C2D0: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800542D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C2D4: 24063FFF addiu $a2, $zero, 16383 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (16383)); - PGXP_ALU(0x24063FFFu, cpu->gpr[6], _pgx1, 0x00003FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800542D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3C2D8: 24070200 addiu $a3, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24070200u, cpu->gpr[7], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x800542D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3C2DC: 24090018 addiu $t1, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24090018u, cpu->gpr[9], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800542DCu); -#endif -label_BFC3C2E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C2E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC3C2E0: 000878C0 sll $t7, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[8] << 3u; - PGXP_ALU(0x000878C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800542E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C2E4: 000FC040 sll $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 1u; - PGXP_ALU(0x000FC040u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800542E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010004u); -#endif - /* 0xBFC3C2E8: 02181021 addu $v0, $s0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[24]; - PGXP_ALU(0x02181021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800542E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C2EC: A4400000 sh $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542ECu); return; } g_debug_last_store_pc = 0x800542ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800542ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800542F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C2F0: A4400002 sh $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542F0u); return; } g_debug_last_store_pc = 0x800542F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800542F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC3C2F4: A4460004 sh $a2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542F4u); return; } g_debug_last_store_pc = 0x800542F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4460004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800542F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C2F8: A4400008 sh $zero, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542F8u); return; } g_debug_last_store_pc = 0x800542F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800542F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C2FC: A440000A sh $zero, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800542FCu); return; } g_debug_last_store_pc = 0x800542FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA440000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800542FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x84u); -#endif - /* 0xBFC3C300: A4470006 sh $a3, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054300u); return; } g_debug_last_store_pc = 0x80054300u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4470006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C304: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3C308: 001950C0 sll $t2, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[10] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001950C0u, cpu->gpr[10], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80054308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3C30C: 000A5840 sll $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 1u; - PGXP_ALU(0x000A5840u, cpu->gpr[11], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005430Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10808u); -#endif - /* 0xBFC3C310: 020B1821 addu $v1, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[16] + cpu->gpr[11]; - PGXP_ALU(0x020B1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3C314: A4600000 sh $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054314u); return; } g_debug_last_store_pc = 0x80054314u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3C318: A4600002 sh $zero, 2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054318u); return; } g_debug_last_store_pc = 0x80054318u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC3C31C: A4660004 sh $a2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005431Cu); return; } g_debug_last_store_pc = 0x8005431Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4660004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005431Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3C320: A4600008 sh $zero, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054320u); return; } g_debug_last_store_pc = 0x80054320u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3C324: A460000A sh $zero, 10($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054324u); return; } g_debug_last_store_pc = 0x80054324u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA460000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x88u); -#endif - /* 0xBFC3C328: A4670006 sh $a3, 6($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054328u); return; } g_debug_last_store_pc = 0x80054328u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4670006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1100u); -#endif - /* 0xBFC3C32C: 250C0002 addiu $t4, $t0, 2 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[8] + (2)); - PGXP_ALU(0x250C0002u, cpu->gpr[12], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005432Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3C330: 000C68C0 sll $t5, $t4, 3 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] << 3u; - PGXP_ALU(0x000C68C0u, cpu->gpr[13], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80054330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3C334: 000D7040 sll $t6, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 1u; - PGXP_ALU(0x000D7040u, cpu->gpr[14], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80054334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14010u); -#endif - /* 0xBFC3C338: 020E2021 addu $a0, $s0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[14]; - PGXP_ALU(0x020E2021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C33C: A4800000 sh $zero, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005433Cu); return; } g_debug_last_store_pc = 0x8005433Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005433Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C340: A4800002 sh $zero, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054340u); return; } g_debug_last_store_pc = 0x80054340u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4800002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3C344: A4860004 sh $a2, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054344u); return; } g_debug_last_store_pc = 0x80054344u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4860004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80054344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C348: A4800008 sh $zero, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054348u); return; } g_debug_last_store_pc = 0x80054348u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4800008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8100u); -#endif - /* 0xBFC3C34C: 250F0003 addiu $t7, $t0, 3 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[8] + (3)); - PGXP_ALU(0x250F0003u, cpu->gpr[15], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005434Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3C350: A480000A sh $zero, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054350u); return; } g_debug_last_store_pc = 0x80054350u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA480000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C354: 000FC0C0 sll $t8, $t7, 3 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 3u; - PGXP_ALU(0x000FC0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80054354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3C358: 0018C840 sll $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 1u; - PGXP_ALU(0x0018C840u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80054358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC3C35C: A4870006 sh $a3, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005435Cu); return; } g_debug_last_store_pc = 0x8005435Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4870006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005435Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010020u); -#endif - /* 0xBFC3C360: 02192821 addu $a1, $s0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[25]; - PGXP_ALU(0x02192821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C364: A4A00000 sh $zero, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054364u); return; } g_debug_last_store_pc = 0x80054364u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C368: A4A00002 sh $zero, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054368u); return; } g_debug_last_store_pc = 0x80054368u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A00002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC3C36C: A4A60004 sh $a2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005436Cu); return; } g_debug_last_store_pc = 0x8005436Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4A60004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005436Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C370: A4A00008 sh $zero, 8($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054370u); return; } g_debug_last_store_pc = 0x80054370u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A00008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3C374: A4A0000A sh $zero, 10($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054374u); return; } g_debug_last_store_pc = 0x80054374u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4A0000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3C378: 25080004 addiu $t0, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (4)); - PGXP_ALU(0x25080004u, cpu->gpr[8], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80054378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3C37C: 1509FFD8 bne $t0, $t1, 0xBFC3C2E0 */ - uint32_t psx_brA_BFC3C37C = cpu->gpr[8]; uint32_t psx_brB_BFC3C37C = cpu->gpr[9]; - psx_taken_BFC3C37C = (psx_brA_BFC3C37C != psx_brB_BFC3C37C); - psx_delay_BFC3C37C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3C380: A4A70006 sh $a3, 6($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054380u); return; } g_debug_last_store_pc = 0x80054380u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA4A70006u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054380u); -#endif - if (psx_delay_BFC3C37C) { - psx_delay_BFC3C37C = 0; - if (psx_taken_BFC3C37C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800542E0u); - goto label_BFC3C2E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054384u); - } -label_BFC3C384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054384u); -#endif - /* 0xBFC3C384: 960A0188 lhu $t2, 392($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 392; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (392)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054384u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x10000u); } - PGXP_LOAD(0x960A0188u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80054384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3C38C: 354BFFFF ori $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0xFFFFu; - PGXP_ALU(0x354BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005438Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC3C390: A60B0188 sh $t3, 392($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (392)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054390u); return; } g_debug_last_store_pc = 0x80054390u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA60B0188u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054390u); -#endif - /* 0xBFC3C394: 960C018A lhu $t4, 394($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 394; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (394)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054394u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10000u); } - PGXP_LOAD(0x960C018Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80054394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C398: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3C39C: 358D00FF ori $t5, $t4, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0xFFu; - PGXP_ALU(0x358D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005439Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3A0: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543A8u; /* jal link before delay slot */ - psx_delay_BFC3C3A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12000u); -#endif - /* 0xBFC3C3A4: A60D018A sh $t5, 394($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 394; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (394)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800543A4u); return; } g_debug_last_store_pc = 0x800543A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA60D018Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800543A4u); -#endif - if (psx_delay_BFC3C3A0) { - psx_delay_BFC3C3A0 = 0; - cpu->gpr[31] = 0x800543A8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3A8: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543B0u; /* jal link before delay slot */ - psx_delay_BFC3C3A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543ACu); -#endif - if (psx_delay_BFC3C3A8) { - psx_delay_BFC3C3A8 = 0; - cpu->gpr[31] = 0x800543B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3B0: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543B8u; /* jal link before delay slot */ - psx_delay_BFC3C3B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543B4u); -#endif - if (psx_delay_BFC3C3B0) { - psx_delay_BFC3C3B0 = 0; - cpu->gpr[31] = 0x800543B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3B8: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543C0u; /* jal link before delay slot */ - psx_delay_BFC3C3B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543BCu); -#endif - if (psx_delay_BFC3C3B8) { - psx_delay_BFC3C3B8 = 0; - cpu->gpr[31] = 0x800543C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543C0u); -#endif - /* 0xBFC3C3C0: 960E018C lhu $t6, 396($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 396; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (396)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800543C0u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10000u); } - PGXP_LOAD(0x960E018Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800543C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3C3C8: 35CFFFFF ori $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0xFFFFu; - PGXP_ALU(0x35CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800543C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18000u); -#endif - /* 0xBFC3C3CC: A60F018C sh $t7, 396($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (396)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800543CCu); return; } g_debug_last_store_pc = 0x800543CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA60F018Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800543CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543D0u); -#endif - /* 0xBFC3C3D0: 9618018E lhu $t8, 398($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 398; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (398)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800543D0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10000u); } - PGXP_LOAD(0x9618018Eu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800543D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3C3D8: 371900FF ori $t9, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0xFFu; - PGXP_ALU(0x371900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800543D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3DC: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543E4u; /* jal link before delay slot */ - psx_delay_BFC3C3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010000u); -#endif - /* 0xBFC3C3E0: A619018E sh $t9, 398($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 398; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (398)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800543E0u); return; } g_debug_last_store_pc = 0x800543E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA619018Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800543E0u); -#endif - if (psx_delay_BFC3C3DC) { - psx_delay_BFC3C3DC = 0; - cpu->gpr[31] = 0x800543E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3E4: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543ECu; /* jal link before delay slot */ - psx_delay_BFC3C3E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543E8u); -#endif - if (psx_delay_BFC3C3E4) { - psx_delay_BFC3C3E4 = 0; - cpu->gpr[31] = 0x800543ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3EC: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543F4u; /* jal link before delay slot */ - psx_delay_BFC3C3EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543F0u); -#endif - if (psx_delay_BFC3C3EC) { - psx_delay_BFC3C3EC = 0; - cpu->gpr[31] = 0x800543F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C3F4: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800543FCu; /* jal link before delay slot */ - psx_delay_BFC3C3F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C3F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800543F8u); -#endif - if (psx_delay_BFC3C3F4) { - psx_delay_BFC3C3F4 = 0; - cpu->gpr[31] = 0x800543FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C3FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C3FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800543FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3C3FC: 340AC000 ori $t2, $zero, 0xC000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xC000u; - PGXP_ALU(0x340AC000u, cpu->gpr[10], _pgx1, 0xC000u); } -#ifdef PSX_COSIM - cosim_instr(0x800543FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10400u); -#endif - /* 0xBFC3C400: A60A01AA sh $t2, 426($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054400u); return; } g_debug_last_store_pc = 0x80054400u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA60A01AAu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80054400u); -#endif - /* 0xBFC3C404: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054404u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054404u); -#endif - /* 0xBFC3C408: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054408u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80054408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C40C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8005440Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C410: 03E00008 jr $ra */ - psx_delay_BFC3C410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C414: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054414u); -#endif - if (psx_delay_BFC3C410) { - psx_delay_BFC3C410 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C418(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C418u); - int psx_delay_BFC3C420 = 0; -label_BFC3C418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3C418: AFA40000 sw $a0, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054418u); return; } g_debug_last_store_pc = 0x80054418u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3C41C: AFA50004 sw $a1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005441Cu); return; } g_debug_last_store_pc = 0x8005441Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50004u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005441Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C420: 03E00008 jr $ra */ - psx_delay_BFC3C420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C424: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80054424u); -#endif - if (psx_delay_BFC3C420) { - psx_delay_BFC3C420 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C428(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C428u); - int psx_delay_BFC3C464 = 0; - int psx_taken_BFC3C464 = 0; - int psx_delay_BFC3C470 = 0; - int psx_taken_BFC3C470 = 0; - int psx_delay_BFC3C480 = 0; - int psx_taken_BFC3C480 = 0; - int psx_delay_BFC3C498 = 0; - int psx_delay_BFC3C4A0 = 0; - int psx_taken_BFC3C4A0 = 0; - int psx_delay_BFC3C4B4 = 0; - int psx_taken_BFC3C4B4 = 0; - int psx_delay_BFC3C4C8 = 0; - int psx_delay_BFC3C4D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C46Cu: goto label_BFC3C46C; - case 0xBFC3C478u: goto label_BFC3C478; - case 0xBFC3C488u: goto label_BFC3C488; - case 0xBFC3C4A0u: goto label_BFC3C4A0; - case 0xBFC3C4A8u: goto label_BFC3C4A8; - case 0xBFC3C4BCu: goto label_BFC3C4BC; - case 0xBFC3C4C0u: goto label_BFC3C4C0; - case 0xBFC3C4C4u: goto label_BFC3C4C4; - case 0xBFC3C4D0u: goto label_BFC3C4D0; - default: break; - } - } -label_BFC3C428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C428: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80054428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3C42C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005442Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054430u); -#endif - /* 0xBFC3C430: 8C6397A0 lw $v1, -26720($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054430u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6397A0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80054430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C434: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054434u); return; } g_debug_last_store_pc = 0x80054434u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3C438: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054438u); return; } g_debug_last_store_pc = 0x80054438u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3C43C: AFA50024 sw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005443Cu); return; } g_debug_last_store_pc = 0x8005443Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005443Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054440u); -#endif - /* 0xBFC3C440: 946601AE lhu $a2, 430($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054440u); return; } cpu->gpr[6] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } - PGXP_LOAD(0x946601AEu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80054440u); -#endif - /* 0xBFC3C444: 946201AA lhu $v0, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054444u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x946201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3C448: 30C607FF andi $a2, $a2, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x7FFu; - PGXP_ALU(0x30C607FFu, cpu->gpr[6], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C44C: 3042FFCF andi $v0, $v0, 0xFFCF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu; - PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005444Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C450: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3C454: A46201AA sh $v0, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054454u); return; } g_debug_last_store_pc = 0x80054454u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA46201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054454u); -#endif - /* 0xBFC3C458: 946E01AE lhu $t6, 430($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054458u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E01AEu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3C45C: 30C6FFFF andi $a2, $a2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu; - PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005445Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3C460: 31CF07FF andi $t7, $t6, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu; - PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC3C464: 14CF0004 bne $a2, $t7, 0xBFC3C478 */ - uint32_t psx_brA_BFC3C464 = cpu->gpr[6]; uint32_t psx_brB_BFC3C464 = cpu->gpr[15]; - psx_taken_BFC3C464 = (psx_brA_BFC3C464 != psx_brB_BFC3C464); - psx_delay_BFC3C464 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81u); -#endif - /* 0xBFC3C468: 00003821 addu $a3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054468u); -#endif - if (psx_delay_BFC3C464) { - psx_delay_BFC3C464 = 0; - if (psx_taken_BFC3C464) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054478u); - goto label_BFC3C478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005446Cu); - } -label_BFC3C46C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C46Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005446Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C46C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005446Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C470: 10000013 beq $zero, $zero, 0xBFC3C4C0 */ - uint32_t psx_brA_BFC3C470 = cpu->gpr[0]; uint32_t psx_brB_BFC3C470 = cpu->gpr[0]; - psx_taken_BFC3C470 = (psx_brA_BFC3C470 == psx_brB_BFC3C470); - psx_delay_BFC3C470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3C474: AC27EE20 sw $a3, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054474u); return; } g_debug_last_store_pc = 0x80054474u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC27EE20u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054474u); -#endif - if (psx_delay_BFC3C470) { - psx_delay_BFC3C470 = 0; - if (psx_taken_BFC3C470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544C0u); - goto label_BFC3C4C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054478u); - } -label_BFC3C478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3C478: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3C47C: 28E11389 slti $at, $a3, 5001 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (5001) ? 1 : 0); - PGXP_ALU(0x28E11389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x8005447Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C480: 14200009 bne $at, $zero, 0xBFC3C4A8 */ - uint32_t psx_brA_BFC3C480 = cpu->gpr[1]; uint32_t psx_brB_BFC3C480 = cpu->gpr[0]; - psx_taken_BFC3C480 = (psx_brA_BFC3C480 != psx_brB_BFC3C480); - psx_delay_BFC3C480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C484: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054484u); -#endif - if (psx_delay_BFC3C480) { - psx_delay_BFC3C480 = 0; - if (psx_taken_BFC3C480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544A8u); - goto label_BFC3C4A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054488u); - } -label_BFC3C488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C488: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C48C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005448Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3C490: AC27EE20 sw $a3, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054490u); return; } g_debug_last_store_pc = 0x80054490u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC27EE20u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C494: 24A59804 addiu $a1, $a1, -26620 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26620)); - PGXP_ALU(0x24A59804u, cpu->gpr[5], _pgx1, 0xFFFF9804u); } -#ifdef PSX_COSIM - cosim_instr(0x80054494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C498: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x800544A0u; /* jal link before delay slot */ - psx_delay_BFC3C498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C49C: 248497F0 addiu $a0, $a0, -26640 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26640)); - PGXP_ALU(0x248497F0u, cpu->gpr[4], _pgx1, 0xFFFF97F0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005449Cu); -#endif - if (psx_delay_BFC3C498) { - psx_delay_BFC3C498 = 0; - cpu->gpr[31] = 0x800544A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C4A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C4A0: 10000008 beq $zero, $zero, 0xBFC3C4C4 */ - uint32_t psx_brA_BFC3C4A0 = cpu->gpr[0]; uint32_t psx_brB_BFC3C4A0 = cpu->gpr[0]; - psx_taken_BFC3C4A0 = (psx_brA_BFC3C4A0 == psx_brB_BFC3C4A0); - psx_delay_BFC3C4A0 = 1; - /* 0xBFC3C4A4: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800544A4u); -#endif - if (psx_delay_BFC3C4A0) { - psx_delay_BFC3C4A0 = 0; - if (psx_taken_BFC3C4A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544C4u); - goto label_BFC3C4C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544A8u); - } -label_BFC3C4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544A8u); -#endif - /* 0xBFC3C4A8: 947801AE lhu $t8, 430($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800544A8u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x947801AEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800544A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800544ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3C4B0: 331907FF andi $t9, $t8, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x7FFu; - PGXP_ALU(0x331907FFu, cpu->gpr[25], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800544B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC3C4B4: 14D9FFF0 bne $a2, $t9, 0xBFC3C478 */ - uint32_t psx_brA_BFC3C4B4 = cpu->gpr[6]; uint32_t psx_brB_BFC3C4B4 = cpu->gpr[25]; - psx_taken_BFC3C4B4 = (psx_brA_BFC3C4B4 != psx_brB_BFC3C4B4); - psx_delay_BFC3C4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C4B8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800544B8u); -#endif - if (psx_delay_BFC3C4B4) { - psx_delay_BFC3C4B4 = 0; - if (psx_taken_BFC3C4B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054478u); - goto label_BFC3C478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544BCu); - } -label_BFC3C4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3C4BC: AC27EE20 sw $a3, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544BCu); return; } g_debug_last_store_pc = 0x800544BCu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC27EE20u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800544BCu); -#endif -label_BFC3C4C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544C0u); -#endif - /* 0xBFC3C4C0: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800544C0u); -#endif -label_BFC3C4C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544C4u); -#endif - /* 0xBFC3C4C4: 8FA50024 lw $a1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544C4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50024u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800544C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C4C8: 0C015138 jal 0xB00544E0 */ - cpu->gpr[31] = 0x800544D0u; /* jal link before delay slot */ - psx_delay_BFC3C4C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C4CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800544CCu); -#endif - if (psx_delay_BFC3C4C8) { - psx_delay_BFC3C4C8 = 0; - cpu->gpr[31] = 0x800544D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800544E0u); - cpu->pc = 0x800544E0u; return; - } -label_BFC3C4D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544D0u); -#endif - /* 0xBFC3C4D0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800544D0u); -#endif - /* 0xBFC3C4D4: 8FA20024 lw $v0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20024u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800544D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C4D8: 03E00008 jr $ra */ - psx_delay_BFC3C4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C4DC: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800544DCu); -#endif - if (psx_delay_BFC3C4D8) { - psx_delay_BFC3C4D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C4E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C4E0u); - int psx_delay_BFC3C520 = 0; - int psx_delay_BFC3C534 = 0; - int psx_taken_BFC3C534 = 0; - int psx_delay_BFC3C544 = 0; - int psx_taken_BFC3C544 = 0; - int psx_delay_BFC3C55C = 0; - int psx_delay_BFC3C56C = 0; - int psx_taken_BFC3C56C = 0; - int psx_delay_BFC3C580 = 0; - int psx_taken_BFC3C580 = 0; - int psx_delay_BFC3C58C = 0; - int psx_taken_BFC3C58C = 0; - int psx_delay_BFC3C59C = 0; - int psx_taken_BFC3C59C = 0; - int psx_delay_BFC3C5A4 = 0; - int psx_taken_BFC3C5A4 = 0; - int psx_delay_BFC3C5B0 = 0; - int psx_taken_BFC3C5B0 = 0; - int psx_delay_BFC3C5C8 = 0; - int psx_taken_BFC3C5C8 = 0; - int psx_delay_BFC3C5E8 = 0; - int psx_delay_BFC3C5FC = 0; - int psx_taken_BFC3C5FC = 0; - int psx_delay_BFC3C60C = 0; - int psx_taken_BFC3C60C = 0; - int psx_delay_BFC3C624 = 0; - int psx_delay_BFC3C634 = 0; - int psx_taken_BFC3C634 = 0; - int psx_delay_BFC3C648 = 0; - int psx_taken_BFC3C648 = 0; - int psx_delay_BFC3C654 = 0; - int psx_delay_BFC3C65C = 0; - int psx_delay_BFC3C668 = 0; - int psx_taken_BFC3C668 = 0; - int psx_delay_BFC3C698 = 0; - int psx_taken_BFC3C698 = 0; - int psx_delay_BFC3C6A0 = 0; - int psx_taken_BFC3C6A0 = 0; - int psx_delay_BFC3C6B0 = 0; - int psx_taken_BFC3C6B0 = 0; - int psx_delay_BFC3C6C8 = 0; - int psx_delay_BFC3C6D0 = 0; - int psx_taken_BFC3C6D0 = 0; - int psx_delay_BFC3C6E4 = 0; - int psx_taken_BFC3C6E4 = 0; - int psx_delay_BFC3C708 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C528u: goto label_BFC3C528; - case 0xBFC3C53Cu: goto label_BFC3C53C; - case 0xBFC3C540u: goto label_BFC3C540; - case 0xBFC3C54Cu: goto label_BFC3C54C; - case 0xBFC3C564u: goto label_BFC3C564; - case 0xBFC3C574u: goto label_BFC3C574; - case 0xBFC3C588u: goto label_BFC3C588; - case 0xBFC3C58Cu: goto label_BFC3C58C; - case 0xBFC3C594u: goto label_BFC3C594; - case 0xBFC3C59Cu: goto label_BFC3C59C; - case 0xBFC3C5A4u: goto label_BFC3C5A4; - case 0xBFC3C5ACu: goto label_BFC3C5AC; - case 0xBFC3C5B0u: goto label_BFC3C5B0; - case 0xBFC3C5B8u: goto label_BFC3C5B8; - case 0xBFC3C5D0u: goto label_BFC3C5D0; - case 0xBFC3C5F0u: goto label_BFC3C5F0; - case 0xBFC3C604u: goto label_BFC3C604; - case 0xBFC3C608u: goto label_BFC3C608; - case 0xBFC3C614u: goto label_BFC3C614; - case 0xBFC3C62Cu: goto label_BFC3C62C; - case 0xBFC3C63Cu: goto label_BFC3C63C; - case 0xBFC3C650u: goto label_BFC3C650; - case 0xBFC3C654u: goto label_BFC3C654; - case 0xBFC3C65Cu: goto label_BFC3C65C; - case 0xBFC3C664u: goto label_BFC3C664; - case 0xBFC3C670u: goto label_BFC3C670; - case 0xBFC3C678u: goto label_BFC3C678; - case 0xBFC3C6A0u: goto label_BFC3C6A0; - case 0xBFC3C6A8u: goto label_BFC3C6A8; - case 0xBFC3C6B8u: goto label_BFC3C6B8; - case 0xBFC3C6D0u: goto label_BFC3C6D0; - case 0xBFC3C6D8u: goto label_BFC3C6D8; - case 0xBFC3C6ECu: goto label_BFC3C6EC; - case 0xBFC3C6F0u: goto label_BFC3C6F0; - case 0xBFC3C6F4u: goto label_BFC3C6F4; - default: break; - } - } -label_BFC3C4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C4E0: 27BDFFA8 addiu $sp, $sp, -88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-88)); - PGXP_ALU(0x27BDFFA8u, cpu->gpr[29], _pgx1, 0xFFFFFFA8u); } -#ifdef PSX_COSIM - cosim_instr(0x800544E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3C4E4: AFB1001C sw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544E4u); return; } g_debug_last_store_pc = 0x800544E4u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800544E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3C4E8: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800544E8u); -#endif - /* 0xBFC3C4EC: 8E3197A0 lw $s1, -26720($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544ECu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E3197A0u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800544ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800544F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C4F0: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544F0u); return; } g_debug_last_store_pc = 0x800544F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800544F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC3C4F4: AFB50028 sw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544F4u); return; } g_debug_last_store_pc = 0x800544F4u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x800544F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC3C4F8: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544F8u); return; } g_debug_last_store_pc = 0x800544F8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x800544F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3C4FC: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800544FCu); return; } g_debug_last_store_pc = 0x800544FCu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800544FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3C500: AFB00018 sw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054500u); return; } g_debug_last_store_pc = 0x80054500u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80054500u); -#endif - /* 0xBFC3C504: 963501AE lhu $s5, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054504u); return; } cpu->gpr[21] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 21, 0x20000u); } - PGXP_LOAD(0x963501AEu, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80054504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3C508: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054508u); -#endif - /* 0xBFC3C50C: 95CEEE24 lhu $t6, -4572($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005450Cu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x95CEEE24u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005450Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3C510: 32B507FF andi $s5, $s5, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] & 0x7FFu; - PGXP_ALU(0x32B507FFu, cpu->gpr[21], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100021u); -#endif - /* 0xBFC3C514: 00A0A021 addu $s4, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A0A021u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC3C518: 32B5FFFF andi $s5, $s5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] & 0xFFFFu; - PGXP_ALU(0x32B5FFFFu, cpu->gpr[21], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10011u); -#endif - /* 0xBFC3C51C: 00808021 addu $s0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00808021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005451Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C520: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054528u; /* jal link before delay slot */ - psx_delay_BFC3C520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24000u); -#endif - /* 0xBFC3C524: A62E01A6 sh $t6, 422($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 422; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (422)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054524u); return; } g_debug_last_store_pc = 0x80054524u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA62E01A6u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054524u); -#endif - if (psx_delay_BFC3C520) { - psx_delay_BFC3C520 = 0; - cpu->gpr[31] = 0x80054528u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054528u); -#endif - /* 0xBFC3C528: 962F01AE lhu $t7, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054528u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F01AEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3C52C: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005452Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C530: 31F807FF andi $t8, $t7, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu; - PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC3C534: 12B80015 beq $s5, $t8, 0xBFC3C58C */ - uint32_t psx_brA_BFC3C534 = cpu->gpr[21]; uint32_t psx_brB_BFC3C534 = cpu->gpr[24]; - psx_taken_BFC3C534 = (psx_brA_BFC3C534 == psx_brB_BFC3C534); - psx_delay_BFC3C534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054538u); -#endif - if (psx_delay_BFC3C534) { - psx_delay_BFC3C534 = 0; - if (psx_taken_BFC3C534) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005458Cu); - goto label_BFC3C58C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005453Cu); - } -label_BFC3C53C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C53Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C53Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005453Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3C53C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005453Cu); -#endif -label_BFC3C540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C540: 2A411389 slti $at, $s2, 5001 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0); - PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x80054540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C544: 1420000B bne $at, $zero, 0xBFC3C574 */ - uint32_t psx_brA_BFC3C544 = cpu->gpr[1]; uint32_t psx_brB_BFC3C544 = cpu->gpr[0]; - psx_taken_BFC3C544 = (psx_brA_BFC3C544 != psx_brB_BFC3C544); - psx_delay_BFC3C544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C548: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054548u); -#endif - if (psx_delay_BFC3C544) { - psx_delay_BFC3C544 = 0; - if (psx_taken_BFC3C544) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054574u); - goto label_BFC3C574; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005454Cu); - } -label_BFC3C54C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C54Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005454Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C54C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005454Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C550: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C554: AC32EE20 sw $s2, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054554u); return; } g_debug_last_store_pc = 0x80054554u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC32EE20u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80054554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C558: 24A59834 addiu $a1, $a1, -26572 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26572)); - PGXP_ALU(0x24A59834u, cpu->gpr[5], _pgx1, 0xFFFF9834u); } -#ifdef PSX_COSIM - cosim_instr(0x80054558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C55C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80054564u; /* jal link before delay slot */ - psx_delay_BFC3C55C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C560: 24849820 addiu $a0, $a0, -26592 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26592)); - PGXP_ALU(0x24849820u, cpu->gpr[4], _pgx1, 0xFFFF9820u); } -#ifdef PSX_COSIM - cosim_instr(0x80054560u); -#endif - if (psx_delay_BFC3C55C) { - psx_delay_BFC3C55C = 0; - cpu->gpr[31] = 0x80054564u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3C564: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054564u); -#endif - /* 0xBFC3C568: 8E3197A0 lw $s1, -26720($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054568u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E3197A0u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80054568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C56C: 10000007 beq $zero, $zero, 0xBFC3C58C */ - uint32_t psx_brA_BFC3C56C = cpu->gpr[0]; uint32_t psx_brB_BFC3C56C = cpu->gpr[0]; - psx_taken_BFC3C56C = (psx_brA_BFC3C56C == psx_brB_BFC3C56C); - psx_delay_BFC3C56C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3C570: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054570u); -#endif - if (psx_delay_BFC3C56C) { - psx_delay_BFC3C56C = 0; - if (psx_taken_BFC3C56C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005458Cu); - goto label_BFC3C58C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054574u); - } -label_BFC3C574: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C574u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054574u); -#endif - /* 0xBFC3C574: 963901AE lhu $t9, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054574u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000u); } - PGXP_LOAD(0x963901AEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C578: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C57C: 332807FF andi $t0, $t9, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x7FFu; - PGXP_ALU(0x332807FFu, cpu->gpr[8], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005457Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200100u); -#endif - /* 0xBFC3C580: 16A8FFEF bne $s5, $t0, 0xBFC3C540 */ - uint32_t psx_brA_BFC3C580 = cpu->gpr[21]; uint32_t psx_brB_BFC3C580 = cpu->gpr[8]; - psx_taken_BFC3C580 = (psx_brA_BFC3C580 != psx_brB_BFC3C580); - psx_delay_BFC3C580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3C584: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054584u); -#endif - if (psx_delay_BFC3C580) { - psx_delay_BFC3C580 = 0; - if (psx_taken_BFC3C580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054540u); - goto label_BFC3C540; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054588u); - } -label_BFC3C588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3C588: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054588u); -#endif -label_BFC3C58C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C58Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C58Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005458Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC3C58C: 1280003A beq $s4, $zero, 0xBFC3C678 */ - uint32_t psx_brA_BFC3C58C = cpu->gpr[20]; uint32_t psx_brB_BFC3C58C = cpu->gpr[0]; - psx_taken_BFC3C58C = (psx_brA_BFC3C58C == psx_brB_BFC3C58C); - psx_delay_BFC3C58C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C590: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054590u); -#endif - if (psx_delay_BFC3C58C) { - psx_delay_BFC3C58C = 0; - if (psx_taken_BFC3C58C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054678u); - goto label_BFC3C678; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054594u); - } -label_BFC3C594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3C594: AFB30030 sw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054594u); return; } g_debug_last_store_pc = 0x80054594u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80054594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC3C598: 2E810041 sltiu $at, $s4, 65 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0); - PGXP_ALU(0x2E810041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x80054598u); -#endif -label_BFC3C59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005459Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C59C: 14200003 bne $at, $zero, 0xBFC3C5AC */ - uint32_t psx_brA_BFC3C59C = cpu->gpr[1]; uint32_t psx_brB_BFC3C59C = cpu->gpr[0]; - psx_taken_BFC3C59C = (psx_brA_BFC3C59C != psx_brB_BFC3C59C); - psx_delay_BFC3C59C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3C5A0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800545A0u); -#endif - if (psx_delay_BFC3C59C) { - psx_delay_BFC3C59C = 0; - if (psx_taken_BFC3C59C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545ACu); - goto label_BFC3C5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545A4u); - } -label_BFC3C5A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C5A4: 10000002 beq $zero, $zero, 0xBFC3C5B0 */ - uint32_t psx_brA_BFC3C5A4 = cpu->gpr[0]; uint32_t psx_brB_BFC3C5A4 = cpu->gpr[0]; - psx_taken_BFC3C5A4 = (psx_brA_BFC3C5A4 == psx_brB_BFC3C5A4); - psx_delay_BFC3C5A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC3C5A8: 24130040 addiu $s3, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24130040u, cpu->gpr[19], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800545A8u); -#endif - if (psx_delay_BFC3C5A4) { - psx_delay_BFC3C5A4 = 0; - if (psx_taken_BFC3C5A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545B0u); - goto label_BFC3C5B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545ACu); - } -label_BFC3C5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180001u); -#endif - /* 0xBFC3C5AC: 02809821 addu $s3, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02809821u, cpu->gpr[19], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800545ACu); -#endif -label_BFC3C5B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3C5B0: 1A600007 blez $s3, 0xBFC3C5D0 */ - uint32_t psx_brA_BFC3C5B0 = cpu->gpr[19]; - psx_taken_BFC3C5B0 = ((int32_t)psx_brA_BFC3C5B0 <= 0); - psx_delay_BFC3C5B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C5B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800545B4u); -#endif - if (psx_delay_BFC3C5B0) { - psx_delay_BFC3C5B0 = 0; - if (psx_taken_BFC3C5B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545D0u); - goto label_BFC3C5D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545B8u); - } -label_BFC3C5B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545B8u); -#endif - /* 0xBFC3C5B8: 96020000 lhu $v0, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800545B8u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } - PGXP_LOAD(0x96020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800545B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3C5BC: 24630002 addiu $v1, $v1, 2 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (2)); - PGXP_ALU(0x24630002u, cpu->gpr[3], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800545BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000Au); -#endif - /* 0xBFC3C5C0: 0073082A slt $at, $v1, $s3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0); - PGXP_ALU(0x0073082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800545C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3C5C4: 26100002 addiu $s0, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (2)); - PGXP_ALU(0x26100002u, cpu->gpr[16], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800545C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C5C8: 1420FFFB bne $at, $zero, 0xBFC3C5B8 */ - uint32_t psx_brA_BFC3C5C8 = cpu->gpr[1]; uint32_t psx_brB_BFC3C5C8 = cpu->gpr[0]; - psx_taken_BFC3C5C8 = (psx_brA_BFC3C5C8 != psx_brB_BFC3C5C8); - psx_delay_BFC3C5C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC3C5CC: A62201A8 sh $v0, 424($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 424; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (424)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800545CCu); return; } g_debug_last_store_pc = 0x800545CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA62201A8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800545CCu); -#endif - if (psx_delay_BFC3C5C8) { - psx_delay_BFC3C5C8 = 0; - if (psx_taken_BFC3C5C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545B8u); - goto label_BFC3C5B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800545D0u); - } -label_BFC3C5D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545D0u); -#endif - /* 0xBFC3C5D0: 962201AA lhu $v0, 426($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800545D0u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x962201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800545D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C5D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800545D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C5D8: 3042FFCF andi $v0, $v0, 0xFFCF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu; - PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); } -#ifdef PSX_COSIM - cosim_instr(0x800545D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C5DC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800545DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C5E0: 34420010 ori $v0, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x10u; - PGXP_ALU(0x34420010u, cpu->gpr[2], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800545E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C5E4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800545E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C5E8: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x800545F0u; /* jal link before delay slot */ - psx_delay_BFC3C5E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC3C5EC: A62201AA sh $v0, 426($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800545ECu); return; } g_debug_last_store_pc = 0x800545ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA62201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800545ECu); -#endif - if (psx_delay_BFC3C5E8) { - psx_delay_BFC3C5E8 = 0; - cpu->gpr[31] = 0x800545F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C5F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C5F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800545F0u); -#endif - /* 0xBFC3C5F0: 962901AE lhu $t1, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800545F0u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x20000u); } - PGXP_LOAD(0x962901AEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800545F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C5F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800545F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3C5F8: 312A0400 andi $t2, $t1, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x400u; - PGXP_ALU(0x312A0400u, cpu->gpr[10], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x800545F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3C5FC: 11400015 beq $t2, $zero, 0xBFC3C654 */ - uint32_t psx_brA_BFC3C5FC = cpu->gpr[10]; uint32_t psx_brB_BFC3C5FC = cpu->gpr[0]; - psx_taken_BFC3C5FC = (psx_brA_BFC3C5FC == psx_brB_BFC3C5FC); - psx_delay_BFC3C5FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C600: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054600u); -#endif - if (psx_delay_BFC3C5FC) { - psx_delay_BFC3C5FC = 0; - if (psx_taken_BFC3C5FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054654u); - goto label_BFC3C654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054604u); - } -label_BFC3C604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3C604: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054604u); -#endif -label_BFC3C608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C608: 2A411389 slti $at, $s2, 5001 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0); - PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x80054608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C60C: 1420000B bne $at, $zero, 0xBFC3C63C */ - uint32_t psx_brA_BFC3C60C = cpu->gpr[1]; uint32_t psx_brB_BFC3C60C = cpu->gpr[0]; - psx_taken_BFC3C60C = (psx_brA_BFC3C60C != psx_brB_BFC3C60C); - psx_delay_BFC3C60C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C610: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054610u); -#endif - if (psx_delay_BFC3C60C) { - psx_delay_BFC3C60C = 0; - if (psx_taken_BFC3C60C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005463Cu); - goto label_BFC3C63C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054614u); - } -label_BFC3C614: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C614u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C614: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C618: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C61C: AC32EE20 sw $s2, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005461Cu); return; } g_debug_last_store_pc = 0x8005461Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC32EE20u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005461Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C620: 24A5985C addiu $a1, $a1, -26532 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26532)); - PGXP_ALU(0x24A5985Cu, cpu->gpr[5], _pgx1, 0xFFFF985Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80054620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C624: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005462Cu; /* jal link before delay slot */ - psx_delay_BFC3C624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C628: 24849848 addiu $a0, $a0, -26552 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26552)); - PGXP_ALU(0x24849848u, cpu->gpr[4], _pgx1, 0xFFFF9848u); } -#ifdef PSX_COSIM - cosim_instr(0x80054628u); -#endif - if (psx_delay_BFC3C624) { - psx_delay_BFC3C624 = 0; - cpu->gpr[31] = 0x8005462Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3C62C: 3C118008 lui $s1, 0x8008 */ - cpu->gpr[17] = 0x80080000u; - PGXP_ALU(0x3C118008u, cpu->gpr[17], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005462Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054630u); -#endif - /* 0xBFC3C630: 8E3197A0 lw $s1, -26720($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054630u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000u); } - PGXP_LOAD(0x8E3197A0u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80054630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C634: 10000007 beq $zero, $zero, 0xBFC3C654 */ - uint32_t psx_brA_BFC3C634 = cpu->gpr[0]; uint32_t psx_brB_BFC3C634 = cpu->gpr[0]; - psx_taken_BFC3C634 = (psx_brA_BFC3C634 == psx_brB_BFC3C634); - psx_delay_BFC3C634 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3C638: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054638u); -#endif - if (psx_delay_BFC3C634) { - psx_delay_BFC3C634 = 0; - if (psx_taken_BFC3C634) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054654u); - goto label_BFC3C654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005463Cu); - } -label_BFC3C63C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C63Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C63Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005463Cu); -#endif - /* 0xBFC3C63C: 962B01AE lhu $t3, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005463Cu); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000u); } - PGXP_LOAD(0x962B01AEu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005463Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C640: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3C644: 316C0400 andi $t4, $t3, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x400u; - PGXP_ALU(0x316C0400u, cpu->gpr[12], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80054644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3C648: 1580FFEF bne $t4, $zero, 0xBFC3C608 */ - uint32_t psx_brA_BFC3C648 = cpu->gpr[12]; uint32_t psx_brB_BFC3C648 = cpu->gpr[0]; - psx_taken_BFC3C648 = (psx_brA_BFC3C648 != psx_brB_BFC3C648); - psx_delay_BFC3C648 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3C64C: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005464Cu); -#endif - if (psx_delay_BFC3C648) { - psx_delay_BFC3C648 = 0; - if (psx_taken_BFC3C648) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054608u); - goto label_BFC3C608; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054650u); - } -label_BFC3C650: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C650u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40001u); -#endif - /* 0xBFC3C650: 00009021 addu $s2, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00009021u, cpu->gpr[18], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054650u); -#endif -label_BFC3C654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C654: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x8005465Cu; /* jal link before delay slot */ - psx_delay_BFC3C654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C658: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054658u); -#endif - if (psx_delay_BFC3C654) { - psx_delay_BFC3C654 = 0; - cpu->gpr[31] = 0x8005465Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005465Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C65C: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054664u; /* jal link before delay slot */ - psx_delay_BFC3C65C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C660: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054660u); -#endif - if (psx_delay_BFC3C65C) { - psx_delay_BFC3C65C = 0; - cpu->gpr[31] = 0x80054664u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180000u); -#endif - /* 0xBFC3C664: 0293A023 subu $s4, $s4, $s3 */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[20] = cpu->gpr[20] - cpu->gpr[19]; - PGXP_ALU(0x0293A023u, cpu->gpr[20], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC3C668: 1680FFCC bne $s4, $zero, 0xBFC3C59C */ - uint32_t psx_brA_BFC3C668 = cpu->gpr[20]; uint32_t psx_brB_BFC3C668 = cpu->gpr[0]; - psx_taken_BFC3C668 = (psx_brA_BFC3C668 != psx_brB_BFC3C668); - psx_delay_BFC3C668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100002u); -#endif - /* 0xBFC3C66C: 2E810041 sltiu $at, $s4, 65 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[1] = (uint32_t)(cpu->gpr[20] < 0x00000041u ? 1 : 0); - PGXP_ALU(0x2E810041u, cpu->gpr[1], _pgx1, 0x0041u); } -#ifdef PSX_COSIM - cosim_instr(0x8005466Cu); -#endif - if (psx_delay_BFC3C668) { - psx_delay_BFC3C668 = 0; - if (psx_taken_BFC3C668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005459Cu); - goto label_BFC3C59C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054670u); - } -label_BFC3C670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054670u); -#endif - /* 0xBFC3C670: 8FB30030 lw $s3, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054670u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30030u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80054670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C674: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054674u); -#endif -label_BFC3C678: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C678u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054678u); -#endif - /* 0xBFC3C678: 962201AA lhu $v0, 426($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054678u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20000u); } - PGXP_LOAD(0x962201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C67C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005467Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C680: 3042FFCF andi $v0, $v0, 0xFFCF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu; - PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C684: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004u); -#endif - /* 0xBFC3C688: A62201AA sh $v0, 426($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054688u); return; } g_debug_last_store_pc = 0x80054688u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA62201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054688u); -#endif - /* 0xBFC3C68C: 962D01AE lhu $t5, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005468Cu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000u); } - PGXP_LOAD(0x962D01AEu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005468Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C690: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3C694: 31AE07FF andi $t6, $t5, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x7FFu; - PGXP_ALU(0x31AE07FFu, cpu->gpr[14], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204000u); -#endif - /* 0xBFC3C698: 16AE0003 bne $s5, $t6, 0xBFC3C6A8 */ - uint32_t psx_brA_BFC3C698 = cpu->gpr[21]; uint32_t psx_brB_BFC3C698 = cpu->gpr[14]; - psx_taken_BFC3C698 = (psx_brA_BFC3C698 != psx_brB_BFC3C698); - psx_delay_BFC3C698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C69C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005469Cu); -#endif - if (psx_delay_BFC3C698) { - psx_delay_BFC3C698 = 0; - if (psx_taken_BFC3C698) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546A8u); - goto label_BFC3C6A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546A0u); - } -label_BFC3C6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C6A0: 10000013 beq $zero, $zero, 0xBFC3C6F0 */ - uint32_t psx_brA_BFC3C6A0 = cpu->gpr[0]; uint32_t psx_brB_BFC3C6A0 = cpu->gpr[0]; - psx_taken_BFC3C6A0 = (psx_brA_BFC3C6A0 == psx_brB_BFC3C6A0); - psx_delay_BFC3C6A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C6A4: AC32EE20 sw $s2, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546A4u); return; } g_debug_last_store_pc = 0x800546A4u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC32EE20u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800546A4u); -#endif - if (psx_delay_BFC3C6A0) { - psx_delay_BFC3C6A0 = 0; - if (psx_taken_BFC3C6A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546F0u); - goto label_BFC3C6F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546A8u); - } -label_BFC3C6A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3C6A8: 26520001 addiu $s2, $s2, 1 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); - PGXP_ALU(0x26520001u, cpu->gpr[18], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800546A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C6AC: 2A411389 slti $at, $s2, 5001 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[18] < (5001) ? 1 : 0); - PGXP_ALU(0x2A411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x800546ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C6B0: 14200009 bne $at, $zero, 0xBFC3C6D8 */ - uint32_t psx_brA_BFC3C6B0 = cpu->gpr[1]; uint32_t psx_brB_BFC3C6B0 = cpu->gpr[0]; - psx_taken_BFC3C6B0 = (psx_brA_BFC3C6B0 != psx_brB_BFC3C6B0); - psx_delay_BFC3C6B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C6B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800546B4u); -#endif - if (psx_delay_BFC3C6B0) { - psx_delay_BFC3C6B0 = 0; - if (psx_taken_BFC3C6B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546D8u); - goto label_BFC3C6D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546B8u); - } -label_BFC3C6B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C6B8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800546B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C6BC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800546BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C6C0: AC32EE20 sw $s2, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546C0u); return; } g_debug_last_store_pc = 0x800546C0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC32EE20u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800546C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C6C4: 24A59884 addiu $a1, $a1, -26492 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26492)); - PGXP_ALU(0x24A59884u, cpu->gpr[5], _pgx1, 0xFFFF9884u); } -#ifdef PSX_COSIM - cosim_instr(0x800546C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C6C8: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x800546D0u; /* jal link before delay slot */ - psx_delay_BFC3C6C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C6CC: 24849870 addiu $a0, $a0, -26512 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26512)); - PGXP_ALU(0x24849870u, cpu->gpr[4], _pgx1, 0xFFFF9870u); } -#ifdef PSX_COSIM - cosim_instr(0x800546CCu); -#endif - if (psx_delay_BFC3C6C8) { - psx_delay_BFC3C6C8 = 0; - cpu->gpr[31] = 0x800546D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C6D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C6D0: 10000008 beq $zero, $zero, 0xBFC3C6F4 */ - uint32_t psx_brA_BFC3C6D0 = cpu->gpr[0]; uint32_t psx_brB_BFC3C6D0 = cpu->gpr[0]; - psx_taken_BFC3C6D0 = (psx_brA_BFC3C6D0 == psx_brB_BFC3C6D0); - psx_delay_BFC3C6D0 = 1; - /* 0xBFC3C6D4: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800546D4u); -#endif - if (psx_delay_BFC3C6D0) { - psx_delay_BFC3C6D0 = 0; - if (psx_taken_BFC3C6D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546F4u); - goto label_BFC3C6F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546D8u); - } -label_BFC3C6D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546D8u); -#endif - /* 0xBFC3C6D8: 962F01AE lhu $t7, 430($s1) */ - { uint32_t _pgxa = cpu->gpr[17] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800546D8u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000u); } - PGXP_LOAD(0x962F01AEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800546D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C6DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800546DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C6E0: 31F807FF andi $t8, $t7, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu; - PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800546E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200000u); -#endif - /* 0xBFC3C6E4: 16B8FFF0 bne $s5, $t8, 0xBFC3C6A8 */ - uint32_t psx_brA_BFC3C6E4 = cpu->gpr[21]; uint32_t psx_brB_BFC3C6E4 = cpu->gpr[24]; - psx_taken_BFC3C6E4 = (psx_brA_BFC3C6E4 != psx_brB_BFC3C6E4); - psx_delay_BFC3C6E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C6E8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800546E8u); -#endif - if (psx_delay_BFC3C6E4) { - psx_delay_BFC3C6E4 = 0; - if (psx_taken_BFC3C6E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546A8u); - goto label_BFC3C6A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800546ECu); - } -label_BFC3C6EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40002u); -#endif - /* 0xBFC3C6EC: AC32EE20 sw $s2, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546ECu); return; } g_debug_last_store_pc = 0x800546ECu; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAC32EE20u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800546ECu); -#endif -label_BFC3C6F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546F0u); -#endif - /* 0xBFC3C6F0: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800546F0u); -#endif -label_BFC3C6F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C6F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C6F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800546F4u); -#endif - /* 0xBFC3C6F4: 8FB00018 lw $s0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546F4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00018u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x800546F4u); -#endif - /* 0xBFC3C6F8: 8FB1001C lw $s1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546F8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB1001Cu, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x800546F8u); -#endif - /* 0xBFC3C6FC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800546FCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x800546FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054700u); -#endif - /* 0xBFC3C700: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054700u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x80054700u); -#endif - /* 0xBFC3C704: 8FB50028 lw $s5, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054704u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50028u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x80054704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3C708: 03E00008 jr $ra */ - psx_delay_BFC3C708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C70C: 27BD0058 addiu $sp, $sp, 88 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (88)); - PGXP_ALU(0x27BD0058u, cpu->gpr[29], _pgx1, 0x00000058u); } -#ifdef PSX_COSIM - cosim_instr(0x8005470Cu); -#endif - if (psx_delay_BFC3C708) { - psx_delay_BFC3C708 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3C710(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3C710u); - int psx_delay_BFC3C738 = 0; - int psx_taken_BFC3C738 = 0; - int psx_delay_BFC3C740 = 0; - int psx_delay_BFC3C748 = 0; - int psx_taken_BFC3C748 = 0; - int psx_delay_BFC3C750 = 0; - int psx_taken_BFC3C750 = 0; - int psx_delay_BFC3C764 = 0; - int psx_taken_BFC3C764 = 0; - int psx_delay_BFC3C778 = 0; - int psx_taken_BFC3C778 = 0; - int psx_delay_BFC3C78C = 0; - int psx_taken_BFC3C78C = 0; - int psx_delay_BFC3C794 = 0; - int psx_taken_BFC3C794 = 0; - int psx_delay_BFC3C7A0 = 0; - int psx_taken_BFC3C7A0 = 0; - int psx_delay_BFC3C7A8 = 0; - int psx_taken_BFC3C7A8 = 0; - int psx_delay_BFC3C7C0 = 0; - int psx_taken_BFC3C7C0 = 0; - int psx_delay_BFC3C7D8 = 0; - int psx_taken_BFC3C7D8 = 0; - int psx_delay_BFC3C7EC = 0; - int psx_taken_BFC3C7EC = 0; - int psx_delay_BFC3C7F8 = 0; - int psx_taken_BFC3C7F8 = 0; - int psx_delay_BFC3C800 = 0; - int psx_taken_BFC3C800 = 0; - int psx_delay_BFC3C820 = 0; - int psx_delay_BFC3C834 = 0; - int psx_delay_BFC3C854 = 0; - int psx_taken_BFC3C854 = 0; - int psx_delay_BFC3C85C = 0; - int psx_taken_BFC3C85C = 0; - int psx_delay_BFC3C86C = 0; - int psx_taken_BFC3C86C = 0; - int psx_delay_BFC3C884 = 0; - int psx_delay_BFC3C88C = 0; - int psx_taken_BFC3C88C = 0; - int psx_delay_BFC3C8A0 = 0; - int psx_taken_BFC3C8A0 = 0; - int psx_delay_BFC3C8A8 = 0; - int psx_taken_BFC3C8A8 = 0; - int psx_delay_BFC3C8B4 = 0; - int psx_taken_BFC3C8B4 = 0; - int psx_delay_BFC3C8C4 = 0; - int psx_taken_BFC3C8C4 = 0; - int psx_delay_BFC3C8D4 = 0; - int psx_taken_BFC3C8D4 = 0; - int psx_delay_BFC3C8DC = 0; - int psx_taken_BFC3C8DC = 0; - int psx_delay_BFC3C8E8 = 0; - int psx_taken_BFC3C8E8 = 0; - int psx_delay_BFC3C910 = 0; - int psx_delay_BFC3C924 = 0; - int psx_delay_BFC3C938 = 0; - int psx_delay_BFC3C958 = 0; - int psx_taken_BFC3C958 = 0; - int psx_delay_BFC3C960 = 0; - int psx_taken_BFC3C960 = 0; - int psx_delay_BFC3C970 = 0; - int psx_taken_BFC3C970 = 0; - int psx_delay_BFC3C988 = 0; - int psx_delay_BFC3C990 = 0; - int psx_taken_BFC3C990 = 0; - int psx_delay_BFC3C9A4 = 0; - int psx_taken_BFC3C9A4 = 0; - int psx_delay_BFC3C9AC = 0; - int psx_taken_BFC3C9AC = 0; - int psx_delay_BFC3C9B8 = 0; - int psx_taken_BFC3C9B8 = 0; - int psx_delay_BFC3C9C8 = 0; - int psx_taken_BFC3C9C8 = 0; - int psx_delay_BFC3C9D8 = 0; - int psx_taken_BFC3C9D8 = 0; - int psx_delay_BFC3C9E0 = 0; - int psx_taken_BFC3C9E0 = 0; - int psx_delay_BFC3C9EC = 0; - int psx_taken_BFC3C9EC = 0; - int psx_delay_BFC3CA0C = 0; - int psx_taken_BFC3CA0C = 0; - int psx_delay_BFC3CA1C = 0; - int psx_taken_BFC3CA1C = 0; - int psx_delay_BFC3CA34 = 0; - int psx_taken_BFC3CA34 = 0; - int psx_delay_BFC3CA44 = 0; - int psx_taken_BFC3CA44 = 0; - int psx_delay_BFC3CA54 = 0; - int psx_taken_BFC3CA54 = 0; - int psx_delay_BFC3CA6C = 0; - int psx_delay_BFC3CA74 = 0; - int psx_taken_BFC3CA74 = 0; - int psx_delay_BFC3CA90 = 0; - int psx_taken_BFC3CA90 = 0; - int psx_delay_BFC3CAAC = 0; - int psx_taken_BFC3CAAC = 0; - int psx_delay_BFC3CAC4 = 0; - int psx_taken_BFC3CAC4 = 0; - int psx_delay_BFC3CAEC = 0; - int psx_taken_BFC3CAEC = 0; - int psx_delay_BFC3CB00 = 0; - int psx_taken_BFC3CB00 = 0; - int psx_delay_BFC3CB0C = 0; - int psx_taken_BFC3CB0C = 0; - int psx_delay_BFC3CB14 = 0; - int psx_taken_BFC3CB14 = 0; - int psx_delay_BFC3CB28 = 0; - int psx_taken_BFC3CB28 = 0; - int psx_delay_BFC3CB34 = 0; - int psx_taken_BFC3CB34 = 0; - int psx_delay_BFC3CB44 = 0; - int psx_taken_BFC3CB44 = 0; - int psx_delay_BFC3CB54 = 0; - int psx_taken_BFC3CB54 = 0; - int psx_delay_BFC3CB5C = 0; - int psx_taken_BFC3CB5C = 0; - int psx_delay_BFC3CB68 = 0; - int psx_taken_BFC3CB68 = 0; - int psx_delay_BFC3CB80 = 0; - int psx_taken_BFC3CB80 = 0; - int psx_delay_BFC3CB94 = 0; - int psx_taken_BFC3CB94 = 0; - int psx_delay_BFC3CBB0 = 0; - int psx_taken_BFC3CBB0 = 0; - int psx_delay_BFC3CBB8 = 0; - int psx_delay_BFC3CBC0 = 0; - int psx_taken_BFC3CBC0 = 0; - int psx_delay_BFC3CC00 = 0; - int psx_taken_BFC3CC00 = 0; - int psx_delay_BFC3CC20 = 0; - int psx_taken_BFC3CC20 = 0; - int psx_delay_BFC3CC68 = 0; - int psx_taken_BFC3CC68 = 0; - int psx_delay_BFC3CC70 = 0; - int psx_delay_BFC3CC78 = 0; - int psx_taken_BFC3CC78 = 0; - int psx_delay_BFC3CC80 = 0; - int psx_delay_BFC3CC88 = 0; - int psx_taken_BFC3CC88 = 0; - int psx_delay_BFC3CC94 = 0; - int psx_taken_BFC3CC94 = 0; - int psx_delay_BFC3CC9C = 0; - int psx_taken_BFC3CC9C = 0; - int psx_delay_BFC3CCA4 = 0; - int psx_taken_BFC3CCA4 = 0; - int psx_delay_BFC3CCAC = 0; - int psx_taken_BFC3CCAC = 0; - int psx_delay_BFC3CCB4 = 0; - int psx_taken_BFC3CCB4 = 0; - int psx_delay_BFC3CCBC = 0; - int psx_taken_BFC3CCBC = 0; - int psx_delay_BFC3CCC4 = 0; - int psx_taken_BFC3CCC4 = 0; - int psx_delay_BFC3CCCC = 0; - int psx_taken_BFC3CCCC = 0; - int psx_delay_BFC3CCD4 = 0; - int psx_taken_BFC3CCD4 = 0; - int psx_delay_BFC3CCDC = 0; - int psx_taken_BFC3CCDC = 0; - int psx_delay_BFC3CCE8 = 0; - int psx_taken_BFC3CCE8 = 0; - int psx_delay_BFC3CCF4 = 0; - int psx_delay_BFC3CCFC = 0; - int psx_taken_BFC3CCFC = 0; - int psx_delay_BFC3CD08 = 0; - int psx_taken_BFC3CD08 = 0; - int psx_delay_BFC3CD10 = 0; - int psx_taken_BFC3CD10 = 0; - int psx_delay_BFC3CD18 = 0; - int psx_taken_BFC3CD18 = 0; - int psx_delay_BFC3CD20 = 0; - int psx_taken_BFC3CD20 = 0; - int psx_delay_BFC3CD2C = 0; - int psx_taken_BFC3CD2C = 0; - int psx_delay_BFC3CD34 = 0; - int psx_taken_BFC3CD34 = 0; - int psx_delay_BFC3CD40 = 0; - int psx_taken_BFC3CD40 = 0; - int psx_delay_BFC3CD48 = 0; - int psx_taken_BFC3CD48 = 0; - int psx_delay_BFC3CD50 = 0; - int psx_taken_BFC3CD50 = 0; - int psx_delay_BFC3CD58 = 0; - int psx_taken_BFC3CD58 = 0; - int psx_delay_BFC3CD60 = 0; - int psx_taken_BFC3CD60 = 0; - int psx_delay_BFC3CD68 = 0; - int psx_taken_BFC3CD68 = 0; - int psx_delay_BFC3CD74 = 0; - int psx_taken_BFC3CD74 = 0; - int psx_delay_BFC3CD7C = 0; - int psx_taken_BFC3CD7C = 0; - int psx_delay_BFC3CD88 = 0; - int psx_taken_BFC3CD88 = 0; - int psx_delay_BFC3CD90 = 0; - int psx_taken_BFC3CD90 = 0; - int psx_delay_BFC3CD98 = 0; - int psx_taken_BFC3CD98 = 0; - int psx_delay_BFC3CDA0 = 0; - int psx_taken_BFC3CDA0 = 0; - int psx_delay_BFC3CDAC = 0; - int psx_taken_BFC3CDAC = 0; - int psx_delay_BFC3CDB4 = 0; - int psx_taken_BFC3CDB4 = 0; - int psx_delay_BFC3CDC0 = 0; - int psx_taken_BFC3CDC0 = 0; - int psx_delay_BFC3CDC8 = 0; - int psx_taken_BFC3CDC8 = 0; - int psx_delay_BFC3CDD0 = 0; - int psx_taken_BFC3CDD0 = 0; - int psx_delay_BFC3CDD8 = 0; - int psx_taken_BFC3CDD8 = 0; - int psx_delay_BFC3CDE0 = 0; - int psx_taken_BFC3CDE0 = 0; - int psx_delay_BFC3CDE8 = 0; - int psx_taken_BFC3CDE8 = 0; - int psx_delay_BFC3CDF0 = 0; - int psx_taken_BFC3CDF0 = 0; - int psx_delay_BFC3CDF8 = 0; - int psx_taken_BFC3CDF8 = 0; - int psx_delay_BFC3CE04 = 0; - int psx_taken_BFC3CE04 = 0; - int psx_delay_BFC3CE0C = 0; - int psx_taken_BFC3CE0C = 0; - int psx_delay_BFC3CE18 = 0; - int psx_taken_BFC3CE18 = 0; - int psx_delay_BFC3CE20 = 0; - int psx_taken_BFC3CE20 = 0; - int psx_delay_BFC3CE28 = 0; - int psx_taken_BFC3CE28 = 0; - int psx_delay_BFC3CE30 = 0; - int psx_taken_BFC3CE30 = 0; - int psx_delay_BFC3CE3C = 0; - int psx_taken_BFC3CE3C = 0; - int psx_delay_BFC3CE44 = 0; - int psx_taken_BFC3CE44 = 0; - int psx_delay_BFC3CE50 = 0; - int psx_taken_BFC3CE50 = 0; - int psx_delay_BFC3CE58 = 0; - int psx_taken_BFC3CE58 = 0; - int psx_delay_BFC3CE60 = 0; - int psx_taken_BFC3CE60 = 0; - int psx_delay_BFC3CE68 = 0; - int psx_taken_BFC3CE68 = 0; - int psx_delay_BFC3CE70 = 0; - int psx_taken_BFC3CE70 = 0; - int psx_delay_BFC3CE78 = 0; - int psx_taken_BFC3CE78 = 0; - int psx_delay_BFC3CE84 = 0; - int psx_taken_BFC3CE84 = 0; - int psx_delay_BFC3CE8C = 0; - int psx_taken_BFC3CE8C = 0; - int psx_delay_BFC3CE98 = 0; - int psx_taken_BFC3CE98 = 0; - int psx_delay_BFC3CEA0 = 0; - int psx_taken_BFC3CEA0 = 0; - int psx_delay_BFC3CEA8 = 0; - int psx_taken_BFC3CEA8 = 0; - int psx_delay_BFC3CEB0 = 0; - int psx_taken_BFC3CEB0 = 0; - int psx_delay_BFC3CEC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3C740u: goto label_BFC3C740; - case 0xBFC3C748u: goto label_BFC3C748; - case 0xBFC3C750u: goto label_BFC3C750; - case 0xBFC3C758u: goto label_BFC3C758; - case 0xBFC3C76Cu: goto label_BFC3C76C; - case 0xBFC3C780u: goto label_BFC3C780; - case 0xBFC3C794u: goto label_BFC3C794; - case 0xBFC3C79Cu: goto label_BFC3C79C; - case 0xBFC3C7A0u: goto label_BFC3C7A0; - case 0xBFC3C7A8u: goto label_BFC3C7A8; - case 0xBFC3C7B0u: goto label_BFC3C7B0; - case 0xBFC3C7C8u: goto label_BFC3C7C8; - case 0xBFC3C7E0u: goto label_BFC3C7E0; - case 0xBFC3C7F4u: goto label_BFC3C7F4; - case 0xBFC3C800u: goto label_BFC3C800; - case 0xBFC3C808u: goto label_BFC3C808; - case 0xBFC3C828u: goto label_BFC3C828; - case 0xBFC3C83Cu: goto label_BFC3C83C; - case 0xBFC3C85Cu: goto label_BFC3C85C; - case 0xBFC3C864u: goto label_BFC3C864; - case 0xBFC3C874u: goto label_BFC3C874; - case 0xBFC3C88Cu: goto label_BFC3C88C; - case 0xBFC3C894u: goto label_BFC3C894; - case 0xBFC3C8A8u: goto label_BFC3C8A8; - case 0xBFC3C8B0u: goto label_BFC3C8B0; - case 0xBFC3C8BCu: goto label_BFC3C8BC; - case 0xBFC3C8CCu: goto label_BFC3C8CC; - case 0xBFC3C8D0u: goto label_BFC3C8D0; - case 0xBFC3C8DCu: goto label_BFC3C8DC; - case 0xBFC3C8E4u: goto label_BFC3C8E4; - case 0xBFC3C8E8u: goto label_BFC3C8E8; - case 0xBFC3C8F0u: goto label_BFC3C8F0; - case 0xBFC3C8F8u: goto label_BFC3C8F8; - case 0xBFC3C918u: goto label_BFC3C918; - case 0xBFC3C92Cu: goto label_BFC3C92C; - case 0xBFC3C940u: goto label_BFC3C940; - case 0xBFC3C960u: goto label_BFC3C960; - case 0xBFC3C968u: goto label_BFC3C968; - case 0xBFC3C978u: goto label_BFC3C978; - case 0xBFC3C990u: goto label_BFC3C990; - case 0xBFC3C998u: goto label_BFC3C998; - case 0xBFC3C9ACu: goto label_BFC3C9AC; - case 0xBFC3C9B4u: goto label_BFC3C9B4; - case 0xBFC3C9C0u: goto label_BFC3C9C0; - case 0xBFC3C9D0u: goto label_BFC3C9D0; - case 0xBFC3C9D4u: goto label_BFC3C9D4; - case 0xBFC3C9E0u: goto label_BFC3C9E0; - case 0xBFC3C9E8u: goto label_BFC3C9E8; - case 0xBFC3C9ECu: goto label_BFC3C9EC; - case 0xBFC3C9F4u: goto label_BFC3C9F4; - case 0xBFC3C9FCu: goto label_BFC3C9FC; - case 0xBFC3CA14u: goto label_BFC3CA14; - case 0xBFC3CA24u: goto label_BFC3CA24; - case 0xBFC3CA3Cu: goto label_BFC3CA3C; - case 0xBFC3CA4Cu: goto label_BFC3CA4C; - case 0xBFC3CA5Cu: goto label_BFC3CA5C; - case 0xBFC3CA74u: goto label_BFC3CA74; - case 0xBFC3CA7Cu: goto label_BFC3CA7C; - case 0xBFC3CA98u: goto label_BFC3CA98; - case 0xBFC3CAB4u: goto label_BFC3CAB4; - case 0xBFC3CACCu: goto label_BFC3CACC; - case 0xBFC3CAF4u: goto label_BFC3CAF4; - case 0xBFC3CB08u: goto label_BFC3CB08; - case 0xBFC3CB14u: goto label_BFC3CB14; - case 0xBFC3CB1Cu: goto label_BFC3CB1C; - case 0xBFC3CB30u: goto label_BFC3CB30; - case 0xBFC3CB3Cu: goto label_BFC3CB3C; - case 0xBFC3CB4Cu: goto label_BFC3CB4C; - case 0xBFC3CB50u: goto label_BFC3CB50; - case 0xBFC3CB5Cu: goto label_BFC3CB5C; - case 0xBFC3CB64u: goto label_BFC3CB64; - case 0xBFC3CB68u: goto label_BFC3CB68; - case 0xBFC3CB70u: goto label_BFC3CB70; - case 0xBFC3CB78u: goto label_BFC3CB78; - case 0xBFC3CB88u: goto label_BFC3CB88; - case 0xBFC3CB9Cu: goto label_BFC3CB9C; - case 0xBFC3CBB8u: goto label_BFC3CBB8; - case 0xBFC3CBC0u: goto label_BFC3CBC0; - case 0xBFC3CBC8u: goto label_BFC3CBC8; - case 0xBFC3CC08u: goto label_BFC3CC08; - case 0xBFC3CC28u: goto label_BFC3CC28; - case 0xBFC3CC70u: goto label_BFC3CC70; - case 0xBFC3CC78u: goto label_BFC3CC78; - case 0xBFC3CC80u: goto label_BFC3CC80; - case 0xBFC3CC88u: goto label_BFC3CC88; - case 0xBFC3CC90u: goto label_BFC3CC90; - case 0xBFC3CC9Cu: goto label_BFC3CC9C; - case 0xBFC3CCA4u: goto label_BFC3CCA4; - case 0xBFC3CCACu: goto label_BFC3CCAC; - case 0xBFC3CCB4u: goto label_BFC3CCB4; - case 0xBFC3CCBCu: goto label_BFC3CCBC; - case 0xBFC3CCC4u: goto label_BFC3CCC4; - case 0xBFC3CCCCu: goto label_BFC3CCCC; - case 0xBFC3CCD4u: goto label_BFC3CCD4; - case 0xBFC3CCDCu: goto label_BFC3CCDC; - case 0xBFC3CCE4u: goto label_BFC3CCE4; - case 0xBFC3CCE8u: goto label_BFC3CCE8; - case 0xBFC3CCF0u: goto label_BFC3CCF0; - case 0xBFC3CCFCu: goto label_BFC3CCFC; - case 0xBFC3CD04u: goto label_BFC3CD04; - case 0xBFC3CD10u: goto label_BFC3CD10; - case 0xBFC3CD18u: goto label_BFC3CD18; - case 0xBFC3CD20u: goto label_BFC3CD20; - case 0xBFC3CD28u: goto label_BFC3CD28; - case 0xBFC3CD34u: goto label_BFC3CD34; - case 0xBFC3CD3Cu: goto label_BFC3CD3C; - case 0xBFC3CD48u: goto label_BFC3CD48; - case 0xBFC3CD50u: goto label_BFC3CD50; - case 0xBFC3CD58u: goto label_BFC3CD58; - case 0xBFC3CD60u: goto label_BFC3CD60; - case 0xBFC3CD68u: goto label_BFC3CD68; - case 0xBFC3CD70u: goto label_BFC3CD70; - case 0xBFC3CD7Cu: goto label_BFC3CD7C; - case 0xBFC3CD84u: goto label_BFC3CD84; - case 0xBFC3CD90u: goto label_BFC3CD90; - case 0xBFC3CD98u: goto label_BFC3CD98; - case 0xBFC3CDA0u: goto label_BFC3CDA0; - case 0xBFC3CDA8u: goto label_BFC3CDA8; - case 0xBFC3CDB4u: goto label_BFC3CDB4; - case 0xBFC3CDBCu: goto label_BFC3CDBC; - case 0xBFC3CDC8u: goto label_BFC3CDC8; - case 0xBFC3CDD0u: goto label_BFC3CDD0; - case 0xBFC3CDD8u: goto label_BFC3CDD8; - case 0xBFC3CDE0u: goto label_BFC3CDE0; - case 0xBFC3CDE8u: goto label_BFC3CDE8; - case 0xBFC3CDF0u: goto label_BFC3CDF0; - case 0xBFC3CDF8u: goto label_BFC3CDF8; - case 0xBFC3CE00u: goto label_BFC3CE00; - case 0xBFC3CE0Cu: goto label_BFC3CE0C; - case 0xBFC3CE14u: goto label_BFC3CE14; - case 0xBFC3CE20u: goto label_BFC3CE20; - case 0xBFC3CE28u: goto label_BFC3CE28; - case 0xBFC3CE30u: goto label_BFC3CE30; - case 0xBFC3CE38u: goto label_BFC3CE38; - case 0xBFC3CE44u: goto label_BFC3CE44; - case 0xBFC3CE4Cu: goto label_BFC3CE4C; - case 0xBFC3CE58u: goto label_BFC3CE58; - case 0xBFC3CE60u: goto label_BFC3CE60; - case 0xBFC3CE68u: goto label_BFC3CE68; - case 0xBFC3CE70u: goto label_BFC3CE70; - case 0xBFC3CE78u: goto label_BFC3CE78; - case 0xBFC3CE80u: goto label_BFC3CE80; - case 0xBFC3CE8Cu: goto label_BFC3CE8C; - case 0xBFC3CE94u: goto label_BFC3CE94; - case 0xBFC3CEA0u: goto label_BFC3CEA0; - case 0xBFC3CEA8u: goto label_BFC3CEA8; - case 0xBFC3CEB0u: goto label_BFC3CEB0; - case 0xBFC3CEB8u: goto label_BFC3CEB8; - case 0xBFC3CEBCu: goto label_BFC3CEBC; - default: break; - } - } -label_BFC3C710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3C710: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80054710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3C714: AFA40028 sw $a0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054714u); return; } g_debug_last_store_pc = 0x80054714u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C718: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054718u); -#endif - /* 0xBFC3C71C: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005471Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005471Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3C720: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054720u); return; } g_debug_last_store_pc = 0x80054720u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054720u); -#endif - /* 0xBFC3C724: 948701AE lhu $a3, 430($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054724u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x10u); } - PGXP_LOAD(0x948701AEu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054724u); -#endif - /* 0xBFC3C728: 948801AC lhu $t0, 428($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054728u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x948801ACu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80054728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3C72C: 30E707FF andi $a3, $a3, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0x7FFu; - PGXP_ALU(0x30E707FFu, cpu->gpr[7], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005472Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3C730: 3108000E andi $t0, $t0, 0xE */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xEu; - PGXP_ALU(0x3108000Eu, cpu->gpr[8], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80054730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3C734: 30E7FFFF andi $a3, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C738: 10000155 beq $zero, $zero, 0xBFC3CC90 */ - uint32_t psx_brA_BFC3C738 = cpu->gpr[0]; uint32_t psx_brB_BFC3C738 = cpu->gpr[0]; - psx_taken_BFC3C738 = (psx_brA_BFC3C738 == psx_brB_BFC3C738); - psx_delay_BFC3C738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3C73C: 00084042 srl $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 1u; - PGXP_ALU(0x00084042u, cpu->gpr[8], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005473Cu); -#endif - if (psx_delay_BFC3C738) { - psx_delay_BFC3C738 = 0; - if (psx_taken_BFC3C738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C90u); - goto label_BFC3CC90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054740u); - } -label_BFC3C740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C740: 0C015067 jal 0xB005419C */ - cpu->gpr[31] = 0x80054748u; /* jal link before delay slot */ - psx_delay_BFC3C740 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C744: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054744u); -#endif - if (psx_delay_BFC3C740) { - psx_delay_BFC3C740 = 0; - cpu->gpr[31] = 0x80054748u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005419Cu); - cpu->pc = 0x8005419Cu; return; - } -label_BFC3C748: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C748u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C748: 100001DC beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3C748 = cpu->gpr[0]; uint32_t psx_brB_BFC3C748 = cpu->gpr[0]; - psx_taken_BFC3C748 = (psx_brA_BFC3C748 == psx_brB_BFC3C748); - psx_delay_BFC3C748 = 1; - /* 0xBFC3C74C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005474Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005474Cu); -#endif - if (psx_delay_BFC3C748) { - psx_delay_BFC3C748 = 0; - if (psx_taken_BFC3C748) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054750u); - } -label_BFC3C750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C750: 14C00006 bne $a2, $zero, 0xBFC3C76C */ - uint32_t psx_brA_BFC3C750 = cpu->gpr[6]; uint32_t psx_brB_BFC3C750 = cpu->gpr[0]; - psx_taken_BFC3C750 = (psx_brA_BFC3C750 != psx_brB_BFC3C750); - psx_delay_BFC3C750 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C754: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054754u); -#endif - if (psx_delay_BFC3C750) { - psx_delay_BFC3C750 = 0; - if (psx_taken_BFC3C750) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005476Cu); - goto label_BFC3C76C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054758u); - } -label_BFC3C758: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C758u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054758u); -#endif - /* 0xBFC3C758: 948E01AA lhu $t6, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054758u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x948E01AAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C75C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005475Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3C760: 35CF4000 ori $t7, $t6, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] | 0x4000u; - PGXP_ALU(0x35CF4000u, cpu->gpr[15], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x80054760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C764: 100001D4 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C764 = cpu->gpr[0]; uint32_t psx_brB_BFC3C764 = cpu->gpr[0]; - psx_taken_BFC3C764 = (psx_brA_BFC3C764 == psx_brB_BFC3C764); - psx_delay_BFC3C764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3C768: A48F01AA sh $t7, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054768u); return; } g_debug_last_store_pc = 0x80054768u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F01AAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054768u); -#endif - if (psx_delay_BFC3C764) { - psx_delay_BFC3C764 = 0; - if (psx_taken_BFC3C764) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005476Cu); - } -label_BFC3C76C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C76Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005476Cu); -#endif - /* 0xBFC3C76C: 949801AA lhu $t8, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005476Cu); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x949801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005476Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3C774: 3319BFFF andi $t9, $t8, 0xBFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xBFFFu; - PGXP_ALU(0x3319BFFFu, cpu->gpr[25], _pgx1, 0xBFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C778: 100001CF beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C778 = cpu->gpr[0]; uint32_t psx_brB_BFC3C778 = cpu->gpr[0]; - psx_taken_BFC3C778 = (psx_brA_BFC3C778 == psx_brB_BFC3C778); - psx_delay_BFC3C778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3C77C: A49901AA sh $t9, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005477Cu); return; } g_debug_last_store_pc = 0x8005477Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA49901AAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005477Cu); -#endif - if (psx_delay_BFC3C778) { - psx_delay_BFC3C778 = 0; - if (psx_taken_BFC3C778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054780u); - } -label_BFC3C780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054780u); -#endif - /* 0xBFC3C780: 948901AA lhu $t1, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054780u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x948901AAu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3C788: 312A4000 andi $t2, $t1, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x4000u; - PGXP_ALU(0x312A4000u, cpu->gpr[10], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x80054788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3C78C: 11400004 beq $t2, $zero, 0xBFC3C7A0 */ - uint32_t psx_brA_BFC3C78C = cpu->gpr[10]; uint32_t psx_brB_BFC3C78C = cpu->gpr[0]; - psx_taken_BFC3C78C = (psx_brA_BFC3C78C == psx_brB_BFC3C78C); - psx_delay_BFC3C78C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3C790: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054790u); -#endif - if (psx_delay_BFC3C78C) { - psx_delay_BFC3C78C = 0; - if (psx_taken_BFC3C78C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547A0u); - goto label_BFC3C7A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054794u); - } -label_BFC3C794: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C794u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C794: 100001C8 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C794 = cpu->gpr[0]; uint32_t psx_brB_BFC3C794 = cpu->gpr[0]; - psx_taken_BFC3C794 = (psx_brA_BFC3C794 == psx_brB_BFC3C794); - psx_delay_BFC3C794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C798: ACC00000 sw $zero, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054798u); return; } g_debug_last_store_pc = 0x80054798u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054798u); -#endif - if (psx_delay_BFC3C794) { - psx_delay_BFC3C794 = 0; - if (psx_taken_BFC3C794) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005479Cu); - } -label_BFC3C79C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C79Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005479Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3C79C: 240B0001 addiu $t3, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005479Cu); -#endif -label_BFC3C7A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7A0: 100001C5 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C7A0 = cpu->gpr[0]; uint32_t psx_brB_BFC3C7A0 = cpu->gpr[0]; - psx_taken_BFC3C7A0 = (psx_brA_BFC3C7A0 == psx_brB_BFC3C7A0); - psx_delay_BFC3C7A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x840u); -#endif - /* 0xBFC3C7A4: ACCB0000 sw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800547A4u); return; } g_debug_last_store_pc = 0x800547A4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xACCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800547A4u); -#endif - if (psx_delay_BFC3C7A0) { - psx_delay_BFC3C7A0 = 0; - if (psx_taken_BFC3C7A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547A8u); - } -label_BFC3C7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C7A8: 14C00007 bne $a2, $zero, 0xBFC3C7C8 */ - uint32_t psx_brA_BFC3C7A8 = cpu->gpr[6]; uint32_t psx_brB_BFC3C7A8 = cpu->gpr[0]; - psx_taken_BFC3C7A8 = (psx_brA_BFC3C7A8 != psx_brB_BFC3C7A8); - psx_delay_BFC3C7A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800547ACu); -#endif - if (psx_delay_BFC3C7A8) { - psx_delay_BFC3C7A8 = 0; - if (psx_taken_BFC3C7A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547C8u); - goto label_BFC3C7C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547B0u); - } -label_BFC3C7B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547B0u); -#endif - /* 0xBFC3C7B0: 948201AA lhu $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800547B0u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800547B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800547B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C7B8: 3042FFBF andi $v0, $v0, 0xFFBF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFBFu; - PGXP_ALU(0x3042FFBFu, cpu->gpr[2], _pgx1, 0xFFBFu); } -#ifdef PSX_COSIM - cosim_instr(0x800547B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C7BC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800547BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7C0: 100001BD beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C7C0 = cpu->gpr[0]; uint32_t psx_brB_BFC3C7C0 = cpu->gpr[0]; - psx_taken_BFC3C7C0 = (psx_brA_BFC3C7C0 == psx_brB_BFC3C7C0); - psx_delay_BFC3C7C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3C7C4: A48201AA sh $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800547C4u); return; } g_debug_last_store_pc = 0x800547C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA48201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800547C4u); -#endif - if (psx_delay_BFC3C7C0) { - psx_delay_BFC3C7C0 = 0; - if (psx_taken_BFC3C7C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547C8u); - } -label_BFC3C7C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547C8u); -#endif - /* 0xBFC3C7C8: 948201AA lhu $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800547C8u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800547C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800547CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C7D0: 34420040 ori $v0, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x40u; - PGXP_ALU(0x34420040u, cpu->gpr[2], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x800547D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C7D4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800547D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7D8: 100001B7 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C7D8 = cpu->gpr[0]; uint32_t psx_brB_BFC3C7D8 = cpu->gpr[0]; - psx_taken_BFC3C7D8 = (psx_brA_BFC3C7D8 == psx_brB_BFC3C7D8); - psx_delay_BFC3C7D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3C7DC: A48201AA sh $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800547DCu); return; } g_debug_last_store_pc = 0x800547DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA48201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800547DCu); -#endif - if (psx_delay_BFC3C7D8) { - psx_delay_BFC3C7D8 = 0; - if (psx_taken_BFC3C7D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547E0u); - } -label_BFC3C7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547E0u); -#endif - /* 0xBFC3C7E0: 948C01AA lhu $t4, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800547E0u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x948C01AAu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800547E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800547E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3C7E8: 318D0040 andi $t5, $t4, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x40u; - PGXP_ALU(0x318D0040u, cpu->gpr[13], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x800547E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3C7EC: 11A00004 beq $t5, $zero, 0xBFC3C800 */ - uint32_t psx_brA_BFC3C7EC = cpu->gpr[13]; uint32_t psx_brB_BFC3C7EC = cpu->gpr[0]; - psx_taken_BFC3C7EC = (psx_brA_BFC3C7EC == psx_brB_BFC3C7EC); - psx_delay_BFC3C7EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800547F0u); -#endif - if (psx_delay_BFC3C7EC) { - psx_delay_BFC3C7EC = 0; - if (psx_taken_BFC3C7EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054800u); - goto label_BFC3C800; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547F4u); - } -label_BFC3C7F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C7F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C7F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800547F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3C7F4: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800547F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C7F8: 100001AF beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C7F8 = cpu->gpr[0]; uint32_t psx_brB_BFC3C7F8 = cpu->gpr[0]; - psx_taken_BFC3C7F8 = (psx_brA_BFC3C7F8 == psx_brB_BFC3C7F8); - psx_delay_BFC3C7F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC3C7FC: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800547FCu); return; } g_debug_last_store_pc = 0x800547FCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800547FCu); -#endif - if (psx_delay_BFC3C7F8) { - psx_delay_BFC3C7F8 = 0; - if (psx_taken_BFC3C7F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054800u); - } -label_BFC3C800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C800: 100001AD beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C800 = cpu->gpr[0]; uint32_t psx_brB_BFC3C800 = cpu->gpr[0]; - psx_taken_BFC3C800 = (psx_brA_BFC3C800 == psx_brB_BFC3C800); - psx_delay_BFC3C800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3C804: ACC00000 sw $zero, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054804u); return; } g_debug_last_store_pc = 0x80054804u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054804u); -#endif - if (psx_delay_BFC3C800) { - psx_delay_BFC3C800 = 0; - if (psx_taken_BFC3C800) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054808u); - } -label_BFC3C808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054808u); -#endif - /* 0xBFC3C808: 94C50000 lhu $a1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054808u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x40u); } - PGXP_LOAD(0x94C50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C80C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005480Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C810: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C814: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC3C818: A48501A6 sh $a1, 422($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 422; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (422)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054818u); return; } g_debug_last_store_pc = 0x80054818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA48501A6u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3C81C: A7A70018 sh $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005481Cu); return; } g_debug_last_store_pc = 0x8005481Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA7A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005481Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C820: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054828u; /* jal link before delay slot */ - psx_delay_BFC3C820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3C824: A425EE24 sh $a1, -4572($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054824u); return; } g_debug_last_store_pc = 0x80054824u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425EE24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054824u); -#endif - if (psx_delay_BFC3C820) { - psx_delay_BFC3C820 = 0; - cpu->gpr[31] = 0x80054828u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C828: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054828u); -#endif - /* 0xBFC3C82C: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005482Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005482Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054830u); -#endif - /* 0xBFC3C830: 97A70018 lhu $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054830u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x97A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C834: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x8005483Cu; /* jal link before delay slot */ - psx_delay_BFC3C834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C838: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054838u); -#endif - if (psx_delay_BFC3C834) { - psx_delay_BFC3C834 = 0; - cpu->gpr[31] = 0x8005483Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C83C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C83Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C83C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005483Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054840u); -#endif - /* 0xBFC3C840: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054840u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054840u); -#endif - /* 0xBFC3C844: 97A70018 lhu $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054844u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x97A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054844u); -#endif - /* 0xBFC3C848: 948F01AE lhu $t7, 430($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054848u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F01AEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C84C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005484Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3C850: 31F807FF andi $t8, $t7, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x7FFu; - PGXP_ALU(0x31F807FFu, cpu->gpr[24], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC3C854: 14F80003 bne $a3, $t8, 0xBFC3C864 */ - uint32_t psx_brA_BFC3C854 = cpu->gpr[7]; uint32_t psx_brB_BFC3C854 = cpu->gpr[24]; - psx_taken_BFC3C854 = (psx_brA_BFC3C854 != psx_brB_BFC3C854); - psx_delay_BFC3C854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C858: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054858u); -#endif - if (psx_delay_BFC3C854) { - psx_delay_BFC3C854 = 0; - if (psx_taken_BFC3C854) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054864u); - goto label_BFC3C864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005485Cu); - } -label_BFC3C85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005485Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C85C: 10000196 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C85C = cpu->gpr[0]; uint32_t psx_brB_BFC3C85C = cpu->gpr[0]; - psx_taken_BFC3C85C = (psx_brA_BFC3C85C == psx_brB_BFC3C85C); - psx_delay_BFC3C85C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C860: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054860u); return; } g_debug_last_store_pc = 0x80054860u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054860u); -#endif - if (psx_delay_BFC3C85C) { - psx_delay_BFC3C85C = 0; - if (psx_taken_BFC3C85C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054864u); - } -label_BFC3C864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C864: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C868: 28411389 slti $at, $v0, 5001 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0); - PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x80054868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C86C: 14200009 bne $at, $zero, 0xBFC3C894 */ - uint32_t psx_brA_BFC3C86C = cpu->gpr[1]; uint32_t psx_brB_BFC3C86C = cpu->gpr[0]; - psx_taken_BFC3C86C = (psx_brA_BFC3C86C != psx_brB_BFC3C86C); - psx_delay_BFC3C86C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C870: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054870u); -#endif - if (psx_delay_BFC3C86C) { - psx_delay_BFC3C86C = 0; - if (psx_taken_BFC3C86C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054894u); - goto label_BFC3C894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054874u); - } -label_BFC3C874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C874: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C878: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C87C: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005487Cu); return; } g_debug_last_store_pc = 0x8005487Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005487Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C880: 24A598AC addiu $a1, $a1, -26452 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26452)); - PGXP_ALU(0x24A598ACu, cpu->gpr[5], _pgx1, 0xFFFF98ACu); } -#ifdef PSX_COSIM - cosim_instr(0x80054880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C884: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005488Cu; /* jal link before delay slot */ - psx_delay_BFC3C884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C888: 24849898 addiu $a0, $a0, -26472 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26472)); - PGXP_ALU(0x24849898u, cpu->gpr[4], _pgx1, 0xFFFF9898u); } -#ifdef PSX_COSIM - cosim_instr(0x80054888u); -#endif - if (psx_delay_BFC3C884) { - psx_delay_BFC3C884 = 0; - cpu->gpr[31] = 0x8005488Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005488Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C88C: 1000018B beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3C88C = cpu->gpr[0]; uint32_t psx_brB_BFC3C88C = cpu->gpr[0]; - psx_taken_BFC3C88C = (psx_brA_BFC3C88C == psx_brB_BFC3C88C); - psx_delay_BFC3C88C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054890u); -#endif - /* 0xBFC3C890: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054890u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054890u); -#endif - if (psx_delay_BFC3C88C) { - psx_delay_BFC3C88C = 0; - if (psx_taken_BFC3C88C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054894u); - } -label_BFC3C894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054894u); -#endif - /* 0xBFC3C894: 949901AE lhu $t9, 430($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054894u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x949901AEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C898: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3C89C: 332907FF andi $t1, $t9, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0x7FFu; - PGXP_ALU(0x332907FFu, cpu->gpr[9], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005489Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC3C8A0: 14E9FFF0 bne $a3, $t1, 0xBFC3C864 */ - uint32_t psx_brA_BFC3C8A0 = cpu->gpr[7]; uint32_t psx_brB_BFC3C8A0 = cpu->gpr[9]; - psx_taken_BFC3C8A0 = (psx_brA_BFC3C8A0 != psx_brB_BFC3C8A0); - psx_delay_BFC3C8A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C8A4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800548A4u); -#endif - if (psx_delay_BFC3C8A0) { - psx_delay_BFC3C8A0 = 0; - if (psx_taken_BFC3C8A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054864u); - goto label_BFC3C864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548A8u); - } -label_BFC3C8A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C8A8: 10000183 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C8A8 = cpu->gpr[0]; uint32_t psx_brB_BFC3C8A8 = cpu->gpr[0]; - psx_taken_BFC3C8A8 = (psx_brA_BFC3C8A8 == psx_brB_BFC3C8A8); - psx_delay_BFC3C8A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C8AC: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800548ACu); return; } g_debug_last_store_pc = 0x800548ACu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800548ACu); -#endif - if (psx_delay_BFC3C8A8) { - psx_delay_BFC3C8A8 = 0; - if (psx_taken_BFC3C8A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548B0u); - } -label_BFC3C8B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548B0u); -#endif - /* 0xBFC3C8B0: 8CC30000 lw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800548B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x8CC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800548B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3C8B4: 11000010 beq $t0, $zero, 0xBFC3C8F8 */ - uint32_t psx_brA_BFC3C8B4 = cpu->gpr[8]; uint32_t psx_brB_BFC3C8B4 = cpu->gpr[0]; - psx_taken_BFC3C8B4 = (psx_brA_BFC3C8B4 == psx_brB_BFC3C8B4); - psx_delay_BFC3C8B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC3C8B8: 250B0001 addiu $t3, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x250B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800548B8u); -#endif - if (psx_delay_BFC3C8B4) { - psx_delay_BFC3C8B4 = 0; - if (psx_taken_BFC3C8B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548F8u); - goto label_BFC3C8F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548BCu); - } -label_BFC3C8BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3C8BC: 0068001A div $v1, $t0 */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[8]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0068001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x800548BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3C8C0: 00005010 mfhi $t2 */ - cpu->gpr[10] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005010u, cpu->gpr[10], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800548C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3C8C4: 15000002 bne $t0, $zero, 0xBFC3C8D0 */ - uint32_t psx_brA_BFC3C8C4 = cpu->gpr[8]; uint32_t psx_brB_BFC3C8C4 = cpu->gpr[0]; - psx_taken_BFC3C8C4 = (psx_brA_BFC3C8C4 != psx_brB_BFC3C8C4); - psx_delay_BFC3C8C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C8C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800548C8u); -#endif - if (psx_delay_BFC3C8C4) { - psx_delay_BFC3C8C4 = 0; - if (psx_taken_BFC3C8C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548D0u); - goto label_BFC3C8D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548CCu); - } -label_BFC3C8CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3C8CC: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800548CCu); return; -#ifdef PSX_COSIM - cosim_instr(0x800548CCu); -#endif -label_BFC3C8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C8D0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800548D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3C8D4: 15010004 bne $t0, $at, 0xBFC3C8E8 */ - uint32_t psx_brA_BFC3C8D4 = cpu->gpr[8]; uint32_t psx_brB_BFC3C8D4 = cpu->gpr[1]; - psx_taken_BFC3C8D4 = (psx_brA_BFC3C8D4 != psx_brB_BFC3C8D4); - psx_delay_BFC3C8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C8D8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800548D8u); -#endif - if (psx_delay_BFC3C8D4) { - psx_delay_BFC3C8D4 = 0; - if (psx_taken_BFC3C8D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548E8u); - goto label_BFC3C8E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548DCu); - } -label_BFC3C8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3C8DC: 14610002 bne $v1, $at, 0xBFC3C8E8 */ - uint32_t psx_brA_BFC3C8DC = cpu->gpr[3]; uint32_t psx_brB_BFC3C8DC = cpu->gpr[1]; - psx_taken_BFC3C8DC = (psx_brA_BFC3C8DC != psx_brB_BFC3C8DC); - psx_delay_BFC3C8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C8E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800548E0u); -#endif - if (psx_delay_BFC3C8DC) { - psx_delay_BFC3C8DC = 0; - if (psx_taken_BFC3C8DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548E8u); - goto label_BFC3C8E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548E4u); - } -label_BFC3C8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3C8E4: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800548E4u); return; -#ifdef PSX_COSIM - cosim_instr(0x800548E4u); -#endif -label_BFC3C8E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3C8E8: 11400003 beq $t2, $zero, 0xBFC3C8F8 */ - uint32_t psx_brA_BFC3C8E8 = cpu->gpr[10]; uint32_t psx_brB_BFC3C8E8 = cpu->gpr[0]; - psx_taken_BFC3C8E8 = (psx_brA_BFC3C8E8 == psx_brB_BFC3C8E8); - psx_delay_BFC3C8E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC3C8EC: 250B0001 addiu $t3, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x250B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800548ECu); -#endif - if (psx_delay_BFC3C8E8) { - psx_delay_BFC3C8E8 = 0; - if (psx_taken_BFC3C8E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548F8u); - goto label_BFC3C8F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548F0u); - } -label_BFC3C8F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3C8F0: 00681821 addu $v1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00681821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800548F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x900u); -#endif - /* 0xBFC3C8F4: 250B0001 addiu $t3, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x250B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800548F4u); -#endif -label_BFC3C8F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C8F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C8F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800548F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80Cu); -#endif - /* 0xBFC3C8F8: 01631007 srav $v0, $v1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] >> (cpu->gpr[11] & 0x1Fu)); - PGXP_ALU(0x01631007u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800548F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C8FC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800548FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3C900: 3045FFFF andi $a1, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3045FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3C904: A48201A6 sh $v0, 422($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 422; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (422)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054904u); return; } g_debug_last_store_pc = 0x80054904u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA48201A6u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C908: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3C90C: A425EE24 sh $a1, -4572($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005490Cu); return; } g_debug_last_store_pc = 0x8005490Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425EE24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005490Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C910: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054918u; /* jal link before delay slot */ - psx_delay_BFC3C910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3C914: A7A70018 sh $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054914u); return; } g_debug_last_store_pc = 0x80054914u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } - PGXP_STORE(0xA7A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054914u); -#endif - if (psx_delay_BFC3C910) { - psx_delay_BFC3C910 = 0; - cpu->gpr[31] = 0x80054918u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C918: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054918u); -#endif - /* 0xBFC3C91C: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005491Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005491Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054920u); -#endif - /* 0xBFC3C920: 97A70018 lhu $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054920u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x97A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C924: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x8005492Cu; /* jal link before delay slot */ - psx_delay_BFC3C924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054928u); -#endif - if (psx_delay_BFC3C924) { - psx_delay_BFC3C924 = 0; - cpu->gpr[31] = 0x8005492Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C92C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C92Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C92Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005492Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C92C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005492Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054930u); -#endif - /* 0xBFC3C930: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054930u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054930u); -#endif - /* 0xBFC3C934: 97A70018 lhu $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054934u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x97A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C938: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054940u; /* jal link before delay slot */ - psx_delay_BFC3C938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C93C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005493Cu); -#endif - if (psx_delay_BFC3C938) { - psx_delay_BFC3C938 = 0; - cpu->gpr[31] = 0x80054940u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3C940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C940: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054940u); -#endif - /* 0xBFC3C944: 8C8497A0 lw $a0, -26720($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054944u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C8497A0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80054944u); -#endif - /* 0xBFC3C948: 97A70018 lhu $a3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054948u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x97A70018u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80054948u); -#endif - /* 0xBFC3C94C: 948C01AE lhu $t4, 430($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005494Cu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x10u); } - PGXP_LOAD(0x948C01AEu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005494Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3C950: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3C954: 318D07FF andi $t5, $t4, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0x7FFu; - PGXP_ALU(0x318D07FFu, cpu->gpr[13], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080u); -#endif - /* 0xBFC3C958: 14ED0003 bne $a3, $t5, 0xBFC3C968 */ - uint32_t psx_brA_BFC3C958 = cpu->gpr[7]; uint32_t psx_brB_BFC3C958 = cpu->gpr[13]; - psx_taken_BFC3C958 = (psx_brA_BFC3C958 != psx_brB_BFC3C958); - psx_delay_BFC3C958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C95C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005495Cu); -#endif - if (psx_delay_BFC3C958) { - psx_delay_BFC3C958 = 0; - if (psx_taken_BFC3C958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054968u); - goto label_BFC3C968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054960u); - } -label_BFC3C960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C960: 10000155 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C960 = cpu->gpr[0]; uint32_t psx_brB_BFC3C960 = cpu->gpr[0]; - psx_taken_BFC3C960 = (psx_brA_BFC3C960 == psx_brB_BFC3C960); - psx_delay_BFC3C960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C964: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054964u); return; } g_debug_last_store_pc = 0x80054964u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054964u); -#endif - if (psx_delay_BFC3C960) { - psx_delay_BFC3C960 = 0; - if (psx_taken_BFC3C960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054968u); - } -label_BFC3C968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3C968: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C96C: 28411389 slti $at, $v0, 5001 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (5001) ? 1 : 0); - PGXP_ALU(0x28411389u, cpu->gpr[1], _pgx1, 0x1389u); } -#ifdef PSX_COSIM - cosim_instr(0x8005496Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C970: 14200009 bne $at, $zero, 0xBFC3C998 */ - uint32_t psx_brA_BFC3C970 = cpu->gpr[1]; uint32_t psx_brB_BFC3C970 = cpu->gpr[0]; - psx_taken_BFC3C970 = (psx_brA_BFC3C970 != psx_brB_BFC3C970); - psx_delay_BFC3C970 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C974: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054974u); -#endif - if (psx_delay_BFC3C970) { - psx_delay_BFC3C970 = 0; - if (psx_taken_BFC3C970) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054998u); - goto label_BFC3C998; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054978u); - } -label_BFC3C978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C978: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C97C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005497Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C980: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054980u); return; } g_debug_last_store_pc = 0x80054980u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3C984: 24A598D4 addiu $a1, $a1, -26412 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26412)); - PGXP_ALU(0x24A598D4u, cpu->gpr[5], _pgx1, 0xFFFF98D4u); } -#ifdef PSX_COSIM - cosim_instr(0x80054984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3C988: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80054990u; /* jal link before delay slot */ - psx_delay_BFC3C988 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3C98C: 248498C0 addiu $a0, $a0, -26432 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26432)); - PGXP_ALU(0x248498C0u, cpu->gpr[4], _pgx1, 0xFFFF98C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005498Cu); -#endif - if (psx_delay_BFC3C988) { - psx_delay_BFC3C988 = 0; - cpu->gpr[31] = 0x80054990u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3C990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C990: 1000014A beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3C990 = cpu->gpr[0]; uint32_t psx_brB_BFC3C990 = cpu->gpr[0]; - psx_taken_BFC3C990 = (psx_brA_BFC3C990 == psx_brB_BFC3C990); - psx_delay_BFC3C990 = 1; - /* 0xBFC3C994: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054994u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054994u); -#endif - if (psx_delay_BFC3C990) { - psx_delay_BFC3C990 = 0; - if (psx_taken_BFC3C990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054998u); - } -label_BFC3C998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054998u); -#endif - /* 0xBFC3C998: 948E01AE lhu $t6, 430($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054998u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x948E01AEu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C99C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005499Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3C9A0: 31CF07FF andi $t7, $t6, 0x7FF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x7FFu; - PGXP_ALU(0x31CF07FFu, cpu->gpr[15], _pgx1, 0x07FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800549A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC3C9A4: 14EFFFF0 bne $a3, $t7, 0xBFC3C968 */ - uint32_t psx_brA_BFC3C9A4 = cpu->gpr[7]; uint32_t psx_brB_BFC3C9A4 = cpu->gpr[15]; - psx_taken_BFC3C9A4 = (psx_brA_BFC3C9A4 != psx_brB_BFC3C9A4); - psx_delay_BFC3C9A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C9A8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800549A8u); -#endif - if (psx_delay_BFC3C9A4) { - psx_delay_BFC3C9A4 = 0; - if (psx_taken_BFC3C9A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054968u); - goto label_BFC3C968; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549ACu); - } -label_BFC3C9AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C9AC: 10000142 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3C9AC = cpu->gpr[0]; uint32_t psx_brB_BFC3C9AC = cpu->gpr[0]; - psx_taken_BFC3C9AC = (psx_brA_BFC3C9AC == psx_brB_BFC3C9AC); - psx_delay_BFC3C9AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3C9B0: AC22EE20 sw $v0, -4576($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800549B0u); return; } g_debug_last_store_pc = 0x800549B0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE20u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800549B0u); -#endif - if (psx_delay_BFC3C9AC) { - psx_delay_BFC3C9AC = 0; - if (psx_taken_BFC3C9AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549B4u); - } -label_BFC3C9B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549B4u); -#endif - /* 0xBFC3C9B4: 8CC30000 lw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800549B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x8CC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800549B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3C9B8: 11000010 beq $t0, $zero, 0xBFC3C9FC */ - uint32_t psx_brA_BFC3C9B8 = cpu->gpr[8]; uint32_t psx_brB_BFC3C9B8 = cpu->gpr[0]; - psx_taken_BFC3C9B8 = (psx_brA_BFC3C9B8 == psx_brB_BFC3C9B8); - psx_delay_BFC3C9B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C9BC: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800549BCu); -#endif - if (psx_delay_BFC3C9B8) { - psx_delay_BFC3C9B8 = 0; - if (psx_taken_BFC3C9B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549FCu); - goto label_BFC3C9FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549C0u); - } -label_BFC3C9C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3C9C0: 0068001A div $v1, $t0 */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[8]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0068001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x800549C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3C9C4: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800549C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3C9C8: 15000002 bne $t0, $zero, 0xBFC3C9D4 */ - uint32_t psx_brA_BFC3C9C8 = cpu->gpr[8]; uint32_t psx_brB_BFC3C9C8 = cpu->gpr[0]; - psx_taken_BFC3C9C8 = (psx_brA_BFC3C9C8 != psx_brB_BFC3C9C8); - psx_delay_BFC3C9C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C9CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800549CCu); -#endif - if (psx_delay_BFC3C9C8) { - psx_delay_BFC3C9C8 = 0; - if (psx_taken_BFC3C9C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549D4u); - goto label_BFC3C9D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549D0u); - } -label_BFC3C9D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3C9D0: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x800549D0u); return; -#ifdef PSX_COSIM - cosim_instr(0x800549D0u); -#endif -label_BFC3C9D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3C9D4: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800549D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3C9D8: 15010004 bne $t0, $at, 0xBFC3C9EC */ - uint32_t psx_brA_BFC3C9D8 = cpu->gpr[8]; uint32_t psx_brB_BFC3C9D8 = cpu->gpr[1]; - psx_taken_BFC3C9D8 = (psx_brA_BFC3C9D8 != psx_brB_BFC3C9D8); - psx_delay_BFC3C9D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3C9DC: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800549DCu); -#endif - if (psx_delay_BFC3C9D8) { - psx_delay_BFC3C9D8 = 0; - if (psx_taken_BFC3C9D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549ECu); - goto label_BFC3C9EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549E0u); - } -label_BFC3C9E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3C9E0: 14610002 bne $v1, $at, 0xBFC3C9EC */ - uint32_t psx_brA_BFC3C9E0 = cpu->gpr[3]; uint32_t psx_brB_BFC3C9E0 = cpu->gpr[1]; - psx_taken_BFC3C9E0 = (psx_brA_BFC3C9E0 != psx_brB_BFC3C9E0); - psx_delay_BFC3C9E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3C9E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800549E4u); -#endif - if (psx_delay_BFC3C9E0) { - psx_delay_BFC3C9E0 = 0; - if (psx_taken_BFC3C9E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549ECu); - goto label_BFC3C9EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549E8u); - } -label_BFC3C9E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3C9E8: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x800549E8u); return; -#ifdef PSX_COSIM - cosim_instr(0x800549E8u); -#endif -label_BFC3C9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3C9EC: 13000003 beq $t8, $zero, 0xBFC3C9FC */ - uint32_t psx_brA_BFC3C9EC = cpu->gpr[24]; uint32_t psx_brB_BFC3C9EC = cpu->gpr[0]; - psx_taken_BFC3C9EC = (psx_brA_BFC3C9EC == psx_brB_BFC3C9EC); - psx_delay_BFC3C9EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C9F0: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800549F0u); -#endif - if (psx_delay_BFC3C9EC) { - psx_delay_BFC3C9EC = 0; - if (psx_taken_BFC3C9EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549FCu); - goto label_BFC3C9FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549F4u); - } -label_BFC3C9F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3C9F4: 00681821 addu $v1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00681821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800549F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3C9F8: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800549F8u); -#endif -label_BFC3C9FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3C9FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3C9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800549FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000028u); -#endif - /* 0xBFC3C9FC: 03232807 srav $a1, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] >> (cpu->gpr[25] & 0x1Fu)); - PGXP_ALU(0x03232807u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800549FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CA00: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CA04: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3CA08: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA0C: 1000012A beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CA0C = cpu->gpr[0]; uint32_t psx_brB_BFC3CA0C = cpu->gpr[0]; - psx_taken_BFC3CA0C = (psx_brA_BFC3CA0C == psx_brB_BFC3CA0C); - psx_delay_BFC3CA0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CA10: A425EE24 sh $a1, -4572($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A10u); return; } g_debug_last_store_pc = 0x80054A10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA425EE24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A10u); -#endif - if (psx_delay_BFC3CA0C) { - psx_delay_BFC3CA0C = 0; - if (psx_taken_BFC3CA0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A14u); - } -label_BFC3CA14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CA14: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054A14u); -#endif - /* 0xBFC3CA18: 94A5EE24 lhu $a1, -4572($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A18u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x94A5EE24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA1C: 10000126 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CA1C = cpu->gpr[0]; uint32_t psx_brB_BFC3CA1C = cpu->gpr[0]; - psx_taken_BFC3CA1C = (psx_brA_BFC3CA1C == psx_brB_BFC3CA1C); - psx_delay_BFC3CA1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC3CA20: A4C50000 sh $a1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A20u); return; } g_debug_last_store_pc = 0x80054A20u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4C50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A20u); -#endif - if (psx_delay_BFC3CA1C) { - psx_delay_BFC3CA1C = 0; - if (psx_taken_BFC3CA1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A24u); - } -label_BFC3CA24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CA24: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054A24u); -#endif - /* 0xBFC3CA28: 94A5EE24 lhu $a1, -4572($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A28u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x94A5EE24u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3CA2C: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x620u); -#endif - /* 0xBFC3CA30: 01255004 sllv $t2, $a1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[5] << (cpu->gpr[9] & 0x1Fu); - PGXP_ALU(0x01255004u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA34: 10000120 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CA34 = cpu->gpr[0]; uint32_t psx_brB_BFC3CA34 = cpu->gpr[0]; - psx_taken_BFC3CA34 = (psx_brA_BFC3CA34 == psx_brB_BFC3CA34); - psx_delay_BFC3CA34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC3CA38: ACCA0000 sw $t2, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A38u); return; } g_debug_last_store_pc = 0x80054A38u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACCA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A38u); -#endif - if (psx_delay_BFC3CA34) { - psx_delay_BFC3CA34 = 0; - if (psx_taken_BFC3CA34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A3Cu); - } -label_BFC3CA3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A3Cu); -#endif - /* 0xBFC3CA3C: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A3Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3CA40: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA44: 1000011C beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CA44 = cpu->gpr[0]; uint32_t psx_brB_BFC3CA44 = cpu->gpr[0]; - psx_taken_BFC3CA44 = (psx_brA_BFC3CA44 == psx_brB_BFC3CA44); - psx_delay_BFC3CA44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3CA48: AC2BEE28 sw $t3, -4568($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4568; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A48u); return; } g_debug_last_store_pc = 0x80054A48u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BEE28u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A48u); -#endif - if (psx_delay_BFC3CA44) { - psx_delay_BFC3CA44 = 0; - if (psx_taken_BFC3CA44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A4Cu); - } -label_BFC3CA4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3CA4C: 3C0C800E lui $t4, 0x800E */ - cpu->gpr[12] = 0x800E0000u; - PGXP_ALU(0x3C0C800Eu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A50u); -#endif - /* 0xBFC3CA50: 8D8CEE28 lw $t4, -4568($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -4568; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-4568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A50u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CEE28u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA54: 10000118 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CA54 = cpu->gpr[0]; uint32_t psx_brB_BFC3CA54 = cpu->gpr[0]; - psx_taken_BFC3CA54 = (psx_brA_BFC3CA54 == psx_brB_BFC3CA54); - psx_delay_BFC3CA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC3CA58: ACCC0000 sw $t4, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A58u); return; } g_debug_last_store_pc = 0x80054A58u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xACCC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A58u); -#endif - if (psx_delay_BFC3CA54) { - psx_delay_BFC3CA54 = 0; - if (psx_taken_BFC3CA54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A5Cu); - } -label_BFC3CA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A5Cu); -#endif - /* 0xBFC3CA5C: 948201AA lhu $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A5Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CA64: 3042FFCF andi $v0, $v0, 0xFFCF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFCFu; - PGXP_ALU(0x3042FFCFu, cpu->gpr[2], _pgx1, 0xFFCFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CA68: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3CA6C: 0C015050 jal 0xB0054140 */ - cpu->gpr[31] = 0x80054A74u; /* jal link before delay slot */ - psx_delay_BFC3CA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CA70: A48201AA sh $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A70u); return; } g_debug_last_store_pc = 0x80054A70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA48201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A70u); -#endif - if (psx_delay_BFC3CA6C) { - psx_delay_BFC3CA6C = 0; - cpu->gpr[31] = 0x80054A74u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054140u); - cpu->pc = 0x80054140u; return; - } -label_BFC3CA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CA74: 10000111 beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CA74 = cpu->gpr[0]; uint32_t psx_brB_BFC3CA74 = cpu->gpr[0]; - psx_taken_BFC3CA74 = (psx_brA_BFC3CA74 == psx_brB_BFC3CA74); - psx_delay_BFC3CA74 = 1; - /* 0xBFC3CA78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A78u); -#endif - if (psx_delay_BFC3CA74) { - psx_delay_BFC3CA74 = 0; - if (psx_taken_BFC3CA74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A7Cu); - } -label_BFC3CA7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A7Cu); -#endif - /* 0xBFC3CA7C: 948201AC lhu $v0, 428($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A7Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A80u); -#endif - /* 0xBFC3CA80: 94C30000 lhu $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A80u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x94C30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CA84: 3042000E andi $v0, $v0, 0xE */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xEu; - PGXP_ALU(0x3042000Eu, cpu->gpr[2], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CA88: 00021042 srl $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 1u; - PGXP_ALU(0x00021042u, cpu->gpr[2], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80054A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CA8C: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3CA90: 1043010A beq $v0, $v1, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CA90 = cpu->gpr[2]; uint32_t psx_brB_BFC3CA90 = cpu->gpr[3]; - psx_taken_BFC3CA90 = (psx_brA_BFC3CA90 == psx_brB_BFC3CA90); - psx_delay_BFC3CA90 = 1; - /* 0xBFC3CA94: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054A94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A94u); -#endif - if (psx_delay_BFC3CA90) { - psx_delay_BFC3CA90 = 0; - if (psx_taken_BFC3CA90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A98u); - } -label_BFC3CA98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CA98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CA98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054A98u); -#endif - /* 0xBFC3CA98: 948201AC lhu $v0, 428($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054A98u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201ACu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3CA9C: 00036840 sll $t5, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[13] = cpu->gpr[3] << 1u; - PGXP_ALU(0x00036840u, cpu->gpr[13], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80054A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CAA0: 30420001 andi $v0, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x30420001u, cpu->gpr[2], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CAA4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC3CAA8: 01A27025 or $t6, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] | cpu->gpr[2]; - PGXP_ALU(0x01A27025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CAAC: 10000102 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CAAC = cpu->gpr[0]; uint32_t psx_brB_BFC3CAAC = cpu->gpr[0]; - psx_taken_BFC3CAAC = (psx_brA_BFC3CAAC == psx_brB_BFC3CAAC); - psx_delay_BFC3CAAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3CAB0: A48E01AC sh $t6, 428($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AB0u); return; } g_debug_last_store_pc = 0x80054AB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA48E01ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AB0u); -#endif - if (psx_delay_BFC3CAAC) { - psx_delay_BFC3CAAC = 0; - if (psx_taken_BFC3CAAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054AB4u); - } -label_BFC3CAB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CAB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CAB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AB4u); -#endif - /* 0xBFC3CAB4: 948F01AC lhu $t7, 428($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AB4u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F01ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CAB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3CABC: 31F8000E andi $t8, $t7, 0xE */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xEu; - PGXP_ALU(0x31F8000Eu, cpu->gpr[24], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80054ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3CAC0: 0018C842 srl $t9, $t8, 1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] >> 1u; - PGXP_ALU(0x0018C842u, cpu->gpr[25], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80054AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CAC4: 100000FC beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CAC4 = cpu->gpr[0]; uint32_t psx_brB_BFC3CAC4 = cpu->gpr[0]; - psx_taken_BFC3CAC4 = (psx_brA_BFC3CAC4 == psx_brB_BFC3CAC4); - psx_delay_BFC3CAC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC3CAC8: A4D90000 sh $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AC8u); return; } g_debug_last_store_pc = 0x80054AC8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AC8u); -#endif - if (psx_delay_BFC3CAC4) { - psx_delay_BFC3CAC4 = 0; - if (psx_taken_BFC3CAC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054ACCu); - } -label_BFC3CACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054ACCu); -#endif - /* 0xBFC3CACC: 948201AA lhu $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054ACCu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AD0u); -#endif - /* 0xBFC3CAD0: 94C90000 lhu $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AD0u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x94C90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CAD4: 3042FF7F andi $v0, $v0, 0xFF7F */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFF7Fu; - PGXP_ALU(0x3042FF7Fu, cpu->gpr[2], _pgx1, 0xFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80054AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3CAD8: 312A0001 andi $t2, $t1, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0x1u; - PGXP_ALU(0x312A0001u, cpu->gpr[10], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CADC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3CAE0: 000A59C0 sll $t3, $t2, 7 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 7u; - PGXP_ALU(0x000A59C0u, cpu->gpr[11], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80054AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3CAE4: 004B1025 or $v0, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[11]; - PGXP_ALU(0x004B1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CAE8: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CAEC: 100000F2 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CAEC = cpu->gpr[0]; uint32_t psx_brB_BFC3CAEC = cpu->gpr[0]; - psx_taken_BFC3CAEC = (psx_brA_BFC3CAEC == psx_brB_BFC3CAEC); - psx_delay_BFC3CAEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CAF0: A48201AA sh $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AF0u); return; } g_debug_last_store_pc = 0x80054AF0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA48201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AF0u); -#endif - if (psx_delay_BFC3CAEC) { - psx_delay_BFC3CAEC = 0; - if (psx_taken_BFC3CAEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054AF4u); - } -label_BFC3CAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054AF4u); -#endif - /* 0xBFC3CAF4: 948201AA lhu $v0, 426($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054AF4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201AAu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CAF8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3CAFC: 304C0080 andi $t4, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304C0080u, cpu->gpr[12], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80054AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3CB00: 11800004 beq $t4, $zero, 0xBFC3CB14 */ - uint32_t psx_brA_BFC3CB00 = cpu->gpr[12]; uint32_t psx_brB_BFC3CB00 = cpu->gpr[0]; - psx_taken_BFC3CB00 = (psx_brA_BFC3CB00 == psx_brB_BFC3CB00); - psx_delay_BFC3CB00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054B04u); -#endif - if (psx_delay_BFC3CB00) { - psx_delay_BFC3CB00 = 0; - if (psx_taken_BFC3CB00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B14u); - goto label_BFC3CB14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B08u); - } -label_BFC3CB08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3CB08: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB0C: 100000EA beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CB0C = cpu->gpr[0]; uint32_t psx_brB_BFC3CB0C = cpu->gpr[0]; - psx_taken_BFC3CB0C = (psx_brA_BFC3CB0C == psx_brB_BFC3CB0C); - psx_delay_BFC3CB0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC3CB10: ACCD0000 sw $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054B10u); return; } g_debug_last_store_pc = 0x80054B10u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xACCD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B10u); -#endif - if (psx_delay_BFC3CB0C) { - psx_delay_BFC3CB0C = 0; - if (psx_taken_BFC3CB0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B14u); - } -label_BFC3CB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB14: 100000E8 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CB14 = cpu->gpr[0]; uint32_t psx_brB_BFC3CB14 = cpu->gpr[0]; - psx_taken_BFC3CB14 = (psx_brA_BFC3CB14 == psx_brB_BFC3CB14); - psx_delay_BFC3CB14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3CB18: ACC00000 sw $zero, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054B18u); return; } g_debug_last_store_pc = 0x80054B18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xACC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B18u); -#endif - if (psx_delay_BFC3CB14) { - psx_delay_BFC3CB14 = 0; - if (psx_taken_BFC3CB14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B1Cu); - } -label_BFC3CB1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B1Cu); -#endif - /* 0xBFC3CB1C: 94CE0000 lhu $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B1Cu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x94CE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3CB24: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB28: 100000E3 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CB28 = cpu->gpr[0]; uint32_t psx_brB_BFC3CB28 = cpu->gpr[0]; - psx_taken_BFC3CB28 = (psx_brA_BFC3CB28 == psx_brB_BFC3CB28); - psx_delay_BFC3CB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3CB2C: A48F01A2 sh $t7, 418($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 418; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (418)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B2Cu); return; } g_debug_last_store_pc = 0x80054B2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F01A2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B2Cu); -#endif - if (psx_delay_BFC3CB28) { - psx_delay_BFC3CB28 = 0; - if (psx_taken_BFC3CB28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B30u); - } -label_BFC3CB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B30u); -#endif - /* 0xBFC3CB30: 8CC30000 lw $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054B30u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } - PGXP_LOAD(0x8CC30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3CB34: 11000010 beq $t0, $zero, 0xBFC3CB78 */ - uint32_t psx_brA_BFC3CB34 = cpu->gpr[8]; uint32_t psx_brB_BFC3CB34 = cpu->gpr[0]; - psx_taken_BFC3CB34 = (psx_brA_BFC3CB34 == psx_brB_BFC3CB34); - psx_delay_BFC3CB34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3CB38: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054B38u); -#endif - if (psx_delay_BFC3CB34) { - psx_delay_BFC3CB34 = 0; - if (psx_taken_BFC3CB34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B78u); - goto label_BFC3CB78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B3Cu); - } -label_BFC3CB3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3CB3C: 0068001A div $v1, $t0 */ - { int32_t psx_n = (int32_t)cpu->gpr[3]; int32_t psx_d = (int32_t)cpu->gpr[8]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0068001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[8]); -#ifdef PSX_COSIM - cosim_instr(0x80054B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3CB40: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3CB44: 15000002 bne $t0, $zero, 0xBFC3CB50 */ - uint32_t psx_brA_BFC3CB44 = cpu->gpr[8]; uint32_t psx_brB_BFC3CB44 = cpu->gpr[0]; - psx_taken_BFC3CB44 = (psx_brA_BFC3CB44 != psx_brB_BFC3CB44); - psx_delay_BFC3CB44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054B48u); -#endif - if (psx_delay_BFC3CB44) { - psx_delay_BFC3CB44 = 0; - if (psx_taken_BFC3CB44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B50u); - goto label_BFC3CB50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B4Cu); - } -label_BFC3CB4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3CB4C: 0007000D break 0x1C00 */ - psx_break(cpu, 0x01C00u, 0x80054B4Cu); return; -#ifdef PSX_COSIM - cosim_instr(0x80054B4Cu); -#endif -label_BFC3CB50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CB50: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3CB54: 15010004 bne $t0, $at, 0xBFC3CB68 */ - uint32_t psx_brA_BFC3CB54 = cpu->gpr[8]; uint32_t psx_brB_BFC3CB54 = cpu->gpr[1]; - psx_taken_BFC3CB54 = (psx_brA_BFC3CB54 != psx_brB_BFC3CB54); - psx_delay_BFC3CB54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3CB58: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054B58u); -#endif - if (psx_delay_BFC3CB54) { - psx_delay_BFC3CB54 = 0; - if (psx_taken_BFC3CB54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B68u); - goto label_BFC3CB68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B5Cu); - } -label_BFC3CB5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3CB5C: 14610002 bne $v1, $at, 0xBFC3CB68 */ - uint32_t psx_brA_BFC3CB5C = cpu->gpr[3]; uint32_t psx_brB_BFC3CB5C = cpu->gpr[1]; - psx_taken_BFC3CB5C = (psx_brA_BFC3CB5C != psx_brB_BFC3CB5C); - psx_delay_BFC3CB5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054B60u); -#endif - if (psx_delay_BFC3CB5C) { - psx_delay_BFC3CB5C = 0; - if (psx_taken_BFC3CB5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B68u); - goto label_BFC3CB68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B64u); - } -label_BFC3CB64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC3CB64: 0006000D break 0x1800 */ - psx_break(cpu, 0x01800u, 0x80054B64u); return; -#ifdef PSX_COSIM - cosim_instr(0x80054B64u); -#endif -label_BFC3CB68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3CB68: 13000003 beq $t8, $zero, 0xBFC3CB78 */ - uint32_t psx_brA_BFC3CB68 = cpu->gpr[24]; uint32_t psx_brB_BFC3CB68 = cpu->gpr[0]; - psx_taken_BFC3CB68 = (psx_brA_BFC3CB68 == psx_brB_BFC3CB68); - psx_delay_BFC3CB68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3CB6C: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054B6Cu); -#endif - if (psx_delay_BFC3CB68) { - psx_delay_BFC3CB68 = 0; - if (psx_taken_BFC3CB68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B78u); - goto label_BFC3CB78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B70u); - } -label_BFC3CB70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3CB70: 00681821 addu $v1, $v1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[8]; - PGXP_ALU(0x00681821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3CB74: 25190001 addiu $t9, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054B74u); -#endif -label_BFC3CB78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000208u); -#endif - /* 0xBFC3CB78: 03234807 srav $t1, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[3] >> (cpu->gpr[25] & 0x1Fu)); - PGXP_ALU(0x03234807u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3CB7C: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB80: 100000CD beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CB80 = cpu->gpr[0]; uint32_t psx_brB_BFC3CB80 = cpu->gpr[0]; - psx_taken_BFC3CB80 = (psx_brA_BFC3CB80 == psx_brB_BFC3CB80); - psx_delay_BFC3CB80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC3CB84: A48A01A2 sh $t2, 418($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 418; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (418)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B84u); return; } g_debug_last_store_pc = 0x80054B84u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A01A2u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B84u); -#endif - if (psx_delay_BFC3CB80) { - psx_delay_BFC3CB80 = 0; - if (psx_taken_BFC3CB80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B88u); - } -label_BFC3CB88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B88u); -#endif - /* 0xBFC3CB88: 948B01A2 lhu $t3, 418($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 418; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (418)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B88u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B01A2u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3CB90: 316CFFFF andi $t4, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CB94: 100000C8 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CB94 = cpu->gpr[0]; uint32_t psx_brB_BFC3CB94 = cpu->gpr[0]; - psx_taken_BFC3CB94 = (psx_brA_BFC3CB94 == psx_brB_BFC3CB94); - psx_delay_BFC3CB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC3CB98: A4CC0000 sh $t4, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B98u); return; } g_debug_last_store_pc = 0x80054B98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4CC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B98u); -#endif - if (psx_delay_BFC3CB94) { - psx_delay_BFC3CB94 = 0; - if (psx_taken_BFC3CB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B9Cu); - } -label_BFC3CB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054B9Cu); -#endif - /* 0xBFC3CB9C: 948201A2 lhu $v0, 418($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 418; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (418)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054B9Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x948201A2u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2100u); -#endif - /* 0xBFC3CBA0: 250D0001 addiu $t5, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x250D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CBA4: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CBA8: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC3CBAC: 01A27004 sllv $t6, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[2] << (cpu->gpr[13] & 0x1Fu); - PGXP_ALU(0x01A27004u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CBB0: 100000C1 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CBB0 = cpu->gpr[0]; uint32_t psx_brB_BFC3CBB0 = cpu->gpr[0]; - psx_taken_BFC3CBB0 = (psx_brA_BFC3CBB0 == psx_brB_BFC3CBB0); - psx_delay_BFC3CBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC3CBB4: ACCE0000 sw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054BB4u); return; } g_debug_last_store_pc = 0x80054BB4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BB4u); -#endif - if (psx_delay_BFC3CBB0) { - psx_delay_BFC3CBB0 = 0; - if (psx_taken_BFC3CBB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054BB8u); - } -label_BFC3CBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3CBB8: 0C0153B2 jal 0xB0054EC8 */ - cpu->gpr[31] = 0x80054BC0u; /* jal link before delay slot */ - psx_delay_BFC3CBB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3CBBC: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054BBCu); -#endif - if (psx_delay_BFC3CBB8) { - psx_delay_BFC3CBB8 = 0; - cpu->gpr[31] = 0x80054BC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EC8u); - cpu->pc = 0x80054EC8u; return; - } -label_BFC3CBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CBC0: 100000BE beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CBC0 = cpu->gpr[0]; uint32_t psx_brB_BFC3CBC0 = cpu->gpr[0]; - psx_taken_BFC3CBC0 = (psx_brA_BFC3CBC0 == psx_brB_BFC3CBC0); - psx_delay_BFC3CBC0 = 1; - /* 0xBFC3CBC4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054BC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BC4u); -#endif - if (psx_delay_BFC3CBC0) { - psx_delay_BFC3CBC0 = 0; - if (psx_taken_BFC3CBC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054BC8u); - } -label_BFC3CBC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CBC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BC8u); -#endif - /* 0xBFC3CBC8: 8CCF0000 lw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054BC8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x40u); } - PGXP_LOAD(0x8CCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BC8u); -#endif - /* 0xBFC3CBCC: 94820198 lhu $v0, 408($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054BCCu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x94820198u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3CBD0: 31F8FFFF andi $t8, $t7, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xFFFFu; - PGXP_ALU(0x31F8FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3CBD4: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3CBD8: 00591025 or $v0, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[25]; - PGXP_ALU(0x00591025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CBDC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CBE0: A4820198 sh $v0, 408($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054BE0u); return; } g_debug_last_store_pc = 0x80054BE0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820198u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BE0u); -#endif - /* 0xBFC3CBE4: 8CC90000 lw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054BE4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x40u); } - PGXP_LOAD(0x8CC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BE4u); -#endif - /* 0xBFC3CBE8: 9482019A lhu $v0, 410($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 410; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054BE8u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x9482019Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3CBEC: 00095402 srl $t2, $t1, 16 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] >> 16u; - PGXP_ALU(0x00095402u, cpu->gpr[10], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3CBF0: 314B00FF andi $t3, $t2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFu; - PGXP_ALU(0x314B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3CBF4: 316CFFFF andi $t4, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0xFFFFu; - PGXP_ALU(0x316CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3CBF8: 004C1025 or $v0, $v0, $t4 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[12]; - PGXP_ALU(0x004C1025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CBFC: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CC00: 100000AD beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CC00 = cpu->gpr[0]; uint32_t psx_brB_BFC3CC00 = cpu->gpr[0]; - psx_taken_BFC3CC00 = (psx_brA_BFC3CC00 == psx_brB_BFC3CC00); - psx_delay_BFC3CC00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CC04: A482019A sh $v0, 410($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 410; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C04u); return; } g_debug_last_store_pc = 0x80054C04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA482019Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C04u); -#endif - if (psx_delay_BFC3CC00) { - psx_delay_BFC3CC00 = 0; - if (psx_taken_BFC3CC00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C08u); - } -label_BFC3CC08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C08u); -#endif - /* 0xBFC3CC08: 948D019A lhu $t5, 410($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 410; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C08u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D019Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C08u); -#endif - /* 0xBFC3CC0C: 94980198 lhu $t8, 408($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C0Cu); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x10u); } - PGXP_LOAD(0x94980198u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3CC10: 31AE00FF andi $t6, $t5, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFu; - PGXP_ALU(0x31AE00FFu, cpu->gpr[14], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3CC14: 000E7C00 sll $t7, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 16u; - PGXP_ALU(0x000E7C00u, cpu->gpr[15], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3CC18: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008200u); -#endif - /* 0xBFC3CC1C: 01F94825 or $t1, $t7, $t9 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[15] | cpu->gpr[25]; - PGXP_ALU(0x01F94825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CC20: 100000A5 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CC20 = cpu->gpr[0]; uint32_t psx_brB_BFC3CC20 = cpu->gpr[0]; - psx_taken_BFC3CC20 = (psx_brA_BFC3CC20 == psx_brB_BFC3CC20); - psx_delay_BFC3CC20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC3CC24: ACC90000 sw $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054C24u); return; } g_debug_last_store_pc = 0x80054C24u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xACC90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C24u); -#endif - if (psx_delay_BFC3CC20) { - psx_delay_BFC3CC20 = 0; - if (psx_taken_BFC3CC20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C28u); - } -label_BFC3CC28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C28u); -#endif - /* 0xBFC3CC28: 8CCA0000 lw $t2, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054C28u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x40u); } - PGXP_LOAD(0x8CCA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C28u); -#endif - /* 0xBFC3CC2C: 94820198 lhu $v0, 408($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C2Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x94820198u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3CC30: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1801u); -#endif - /* 0xBFC3CC34: 01606027 nor $t4, $t3, $zero */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = ~(cpu->gpr[11] | cpu->gpr[0]); - PGXP_ALU(0x01606027u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3CC38: 318DFFFF andi $t5, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu; - PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3CC3C: 004D1024 and $v0, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[13]; - PGXP_ALU(0x004D1024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CC40: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CC44: A4820198 sh $v0, 408($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (408)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C44u); return; } g_debug_last_store_pc = 0x80054C44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA4820198u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C44u); -#endif - /* 0xBFC3CC48: 8CCE0000 lw $t6, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054C48u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x40u); } - PGXP_LOAD(0x8CCE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C48u); -#endif - /* 0xBFC3CC4C: 9482019A lhu $v0, 410($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 410; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C4Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x9482019Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004000u); -#endif - /* 0xBFC3CC50: 000EC402 srl $t8, $t6, 16 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[14] >> 16u; - PGXP_ALU(0x000EC402u, cpu->gpr[24], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x80054C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3CC54: 330F00FF andi $t7, $t8, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] & 0xFFu; - PGXP_ALU(0x330F00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008001u); -#endif - /* 0xBFC3CC58: 01E0C827 nor $t9, $t7, $zero */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[15] | cpu->gpr[0]); - PGXP_ALU(0x01E0C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3CC5C: 3329FFFF andi $t1, $t9, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[25] & 0xFFFFu; - PGXP_ALU(0x3329FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3CC60: 00491024 and $v0, $v0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[9]; - PGXP_ALU(0x00491024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3CC64: 3042FFFF andi $v0, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x3042FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CC68: 10000093 beq $zero, $zero, 0xBFC3CEB8 */ - uint32_t psx_brA_BFC3CC68 = cpu->gpr[0]; uint32_t psx_brB_BFC3CC68 = cpu->gpr[0]; - psx_taken_BFC3CC68 = (psx_brA_BFC3CC68 == psx_brB_BFC3CC68); - psx_delay_BFC3CC68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3CC6C: A482019A sh $v0, 410($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 410; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (410)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054C6Cu); return; } g_debug_last_store_pc = 0x80054C6Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } - PGXP_STORE(0xA482019Au, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C6Cu); -#endif - if (psx_delay_BFC3CC68) { - psx_delay_BFC3CC68 = 0; - if (psx_taken_BFC3CC68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - goto label_BFC3CEB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C70u); - } -label_BFC3CC70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3CC70: 0C0154C1 jal 0xB0055304 */ - cpu->gpr[31] = 0x80054C78u; /* jal link before delay slot */ - psx_delay_BFC3CC70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3CC74: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C74u); -#endif - if (psx_delay_BFC3CC70) { - psx_delay_BFC3CC70 = 0; - cpu->gpr[31] = 0x80054C78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055304u); - cpu->pc = 0x80055304u; return; - } -label_BFC3CC78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CC78: 10000090 beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CC78 = cpu->gpr[0]; uint32_t psx_brB_BFC3CC78 = cpu->gpr[0]; - psx_taken_BFC3CC78 = (psx_brA_BFC3CC78 == psx_brB_BFC3CC78); - psx_delay_BFC3CC78 = 1; - /* 0xBFC3CC7C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054C7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C7Cu); -#endif - if (psx_delay_BFC3CC78) { - psx_delay_BFC3CC78 = 0; - if (psx_taken_BFC3CC78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C80u); - } -label_BFC3CC80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3CC80: 0C015597 jal 0xB005565C */ - cpu->gpr[31] = 0x80054C88u; /* jal link before delay slot */ - psx_delay_BFC3CC80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3CC84: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054C84u); -#endif - if (psx_delay_BFC3CC80) { - psx_delay_BFC3CC80 = 0; - cpu->gpr[31] = 0x80054C88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005565Cu); - cpu->pc = 0x8005565Cu; return; - } -label_BFC3CC88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CC88: 1000008C beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CC88 = cpu->gpr[0]; uint32_t psx_brB_BFC3CC88 = cpu->gpr[0]; - psx_taken_BFC3CC88 = (psx_brA_BFC3CC88 == psx_brB_BFC3CC88); - psx_delay_BFC3CC88 = 1; - /* 0xBFC3CC8C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054C8Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054C8Cu); -#endif - if (psx_delay_BFC3CC88) { - psx_delay_BFC3CC88 = 0; - if (psx_taken_BFC3CC88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C90u); - } -label_BFC3CC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CC90: 2401002D addiu $at, $zero, 45 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); - PGXP_ALU(0x2401002Du, cpu->gpr[1], _pgx1, 0x0000002Du); } -#ifdef PSX_COSIM - cosim_instr(0x80054C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CC94: 10A1FF63 beq $a1, $at, 0xBFC3CA24 */ - uint32_t psx_brA_BFC3CC94 = cpu->gpr[5]; uint32_t psx_brB_BFC3CC94 = cpu->gpr[1]; - psx_taken_BFC3CC94 = (psx_brA_BFC3CC94 == psx_brB_BFC3CC94); - psx_delay_BFC3CC94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CC98: 2CA1002E sltiu $at, $a1, 46 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Eu ? 1 : 0); - PGXP_ALU(0x2CA1002Eu, cpu->gpr[1], _pgx1, 0x002Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80054C98u); -#endif - if (psx_delay_BFC3CC94) { - psx_delay_BFC3CC94 = 0; - if (psx_taken_BFC3CC94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A24u); - goto label_BFC3CA24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C9Cu); - } -label_BFC3CC9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CC9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CC9C: 10200047 beq $at, $zero, 0xBFC3CDBC */ - uint32_t psx_brA_BFC3CC9C = cpu->gpr[1]; uint32_t psx_brB_BFC3CC9C = cpu->gpr[0]; - psx_taken_BFC3CC9C = (psx_brA_BFC3CC9C == psx_brB_BFC3CC9C); - psx_delay_BFC3CC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCA0: 24010022 addiu $at, $zero, 34 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); - PGXP_ALU(0x24010022u, cpu->gpr[1], _pgx1, 0x00000022u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CA0u); -#endif - if (psx_delay_BFC3CC9C) { - psx_delay_BFC3CC9C = 0; - if (psx_taken_BFC3CC9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DBCu); - goto label_BFC3CDBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CA4u); - } -label_BFC3CCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCA4: 10A1FF6D beq $a1, $at, 0xBFC3CA5C */ - uint32_t psx_brA_BFC3CCA4 = cpu->gpr[5]; uint32_t psx_brB_BFC3CCA4 = cpu->gpr[1]; - psx_taken_BFC3CCA4 = (psx_brA_BFC3CCA4 == psx_brB_BFC3CCA4); - psx_delay_BFC3CCA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCA8: 2CA10023 sltiu $at, $a1, 35 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000023u ? 1 : 0); - PGXP_ALU(0x2CA10023u, cpu->gpr[1], _pgx1, 0x0023u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CA8u); -#endif - if (psx_delay_BFC3CCA4) { - psx_delay_BFC3CCA4 = 0; - if (psx_taken_BFC3CCA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A5Cu); - goto label_BFC3CA5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CACu); - } -label_BFC3CCAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCAC: 10200023 beq $at, $zero, 0xBFC3CD3C */ - uint32_t psx_brA_BFC3CCAC = cpu->gpr[1]; uint32_t psx_brB_BFC3CCAC = cpu->gpr[0]; - psx_taken_BFC3CCAC = (psx_brA_BFC3CCAC == psx_brB_BFC3CCAC); - psx_delay_BFC3CCAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCB0: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CB0u); -#endif - if (psx_delay_BFC3CCAC) { - psx_delay_BFC3CCAC = 0; - if (psx_taken_BFC3CCAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D3Cu); - goto label_BFC3CD3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CB4u); - } -label_BFC3CCB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCB4: 10A1FEBC beq $a1, $at, 0xBFC3C7A8 */ - uint32_t psx_brA_BFC3CCB4 = cpu->gpr[5]; uint32_t psx_brB_BFC3CCB4 = cpu->gpr[1]; - psx_taken_BFC3CCB4 = (psx_brA_BFC3CCB4 == psx_brB_BFC3CCB4); - psx_delay_BFC3CCB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCB8: 2CA10011 sltiu $at, $a1, 17 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000011u ? 1 : 0); - PGXP_ALU(0x2CA10011u, cpu->gpr[1], _pgx1, 0x0011u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CB8u); -#endif - if (psx_delay_BFC3CCB4) { - psx_delay_BFC3CCB4 = 0; - if (psx_taken_BFC3CCB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547A8u); - goto label_BFC3C7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CBCu); - } -label_BFC3CCBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCBC: 10200011 beq $at, $zero, 0xBFC3CD04 */ - uint32_t psx_brA_BFC3CCBC = cpu->gpr[1]; uint32_t psx_brB_BFC3CCBC = cpu->gpr[0]; - psx_taken_BFC3CCBC = (psx_brA_BFC3CCBC == psx_brB_BFC3CCBC); - psx_delay_BFC3CCBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCC0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CC0u); -#endif - if (psx_delay_BFC3CCBC) { - psx_delay_BFC3CCBC = 0; - if (psx_taken_BFC3CCBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D04u); - goto label_BFC3CD04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CC4u); - } -label_BFC3CCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCC4: 10A1FEA2 beq $a1, $at, 0xBFC3C750 */ - uint32_t psx_brA_BFC3CCC4 = cpu->gpr[5]; uint32_t psx_brB_BFC3CCC4 = cpu->gpr[1]; - psx_taken_BFC3CCC4 = (psx_brA_BFC3CCC4 == psx_brB_BFC3CCC4); - psx_delay_BFC3CCC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCC8: 2CA10002 sltiu $at, $a1, 2 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0); - PGXP_ALU(0x2CA10002u, cpu->gpr[1], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CC8u); -#endif - if (psx_delay_BFC3CCC4) { - psx_delay_BFC3CCC4 = 0; - if (psx_taken_BFC3CCC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054750u); - goto label_BFC3C750; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CCCu); - } -label_BFC3CCCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCCC: 10200006 beq $at, $zero, 0xBFC3CCE8 */ - uint32_t psx_brA_BFC3CCCC = cpu->gpr[1]; uint32_t psx_brB_BFC3CCCC = cpu->gpr[0]; - psx_taken_BFC3CCCC = (psx_brA_BFC3CCCC == psx_brB_BFC3CCCC); - psx_delay_BFC3CCCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCD0: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CD0u); -#endif - if (psx_delay_BFC3CCCC) { - psx_delay_BFC3CCCC = 0; - if (psx_taken_BFC3CCCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CE8u); - goto label_BFC3CCE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CD4u); - } -label_BFC3CCD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3CCD4: 10A0FE9A beq $a1, $zero, 0xBFC3C740 */ - uint32_t psx_brA_BFC3CCD4 = cpu->gpr[5]; uint32_t psx_brB_BFC3CCD4 = cpu->gpr[0]; - psx_taken_BFC3CCD4 = (psx_brA_BFC3CCD4 == psx_brB_BFC3CCD4); - psx_delay_BFC3CCD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CCD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054CD8u); -#endif - if (psx_delay_BFC3CCD4) { - psx_delay_BFC3CCD4 = 0; - if (psx_taken_BFC3CCD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054740u); - goto label_BFC3C740; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CDCu); - } -label_BFC3CCDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CCDC: 10000004 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CCDC = cpu->gpr[0]; uint32_t psx_brB_BFC3CCDC = cpu->gpr[0]; - psx_taken_BFC3CCDC = (psx_brA_BFC3CCDC == psx_brB_BFC3CCDC); - psx_delay_BFC3CCDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CCE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054CE0u); -#endif - if (psx_delay_BFC3CCDC) { - psx_delay_BFC3CCDC = 0; - if (psx_taken_BFC3CCDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CE4u); - } -label_BFC3CCE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CCE4: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CE4u); -#endif -label_BFC3CCE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CCE8: 10A1FEA5 beq $a1, $at, 0xBFC3C780 */ - uint32_t psx_brA_BFC3CCE8 = cpu->gpr[5]; uint32_t psx_brB_BFC3CCE8 = cpu->gpr[1]; - psx_taken_BFC3CCE8 = (psx_brA_BFC3CCE8 == psx_brB_BFC3CCE8); - psx_delay_BFC3CCE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CCEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054CECu); -#endif - if (psx_delay_BFC3CCE8) { - psx_delay_BFC3CCE8 = 0; - if (psx_taken_BFC3CCE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054780u); - goto label_BFC3C780; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - } -label_BFC3CCF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3CCF0: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3CCF4: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80054CFCu; /* jal link before delay slot */ - psx_delay_BFC3CCF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3CCF8: 248498E8 addiu $a0, $a0, -26392 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26392)); - PGXP_ALU(0x248498E8u, cpu->gpr[4], _pgx1, 0xFFFF98E8u); } -#ifdef PSX_COSIM - cosim_instr(0x80054CF8u); -#endif - if (psx_delay_BFC3CCF4) { - psx_delay_BFC3CCF4 = 0; - cpu->gpr[31] = 0x80054CFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3CCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CCFC: 1000006F beq $zero, $zero, 0xBFC3CEBC */ - uint32_t psx_brA_BFC3CCFC = cpu->gpr[0]; uint32_t psx_brB_BFC3CCFC = cpu->gpr[0]; - psx_taken_BFC3CCFC = (psx_brA_BFC3CCFC == psx_brB_BFC3CCFC); - psx_delay_BFC3CCFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D00u); -#endif - /* 0xBFC3CD00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054D00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054D00u); -#endif - if (psx_delay_BFC3CCFC) { - psx_delay_BFC3CCFC = 0; - if (psx_taken_BFC3CCFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EBCu); - goto label_BFC3CEBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D04u); - } -label_BFC3CD04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD04: 24010020 addiu $at, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24010020u, cpu->gpr[1], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD08: 10A1FEBF beq $a1, $at, 0xBFC3C808 */ - uint32_t psx_brA_BFC3CD08 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD08 = cpu->gpr[1]; - psx_taken_BFC3CD08 = (psx_brA_BFC3CD08 == psx_brB_BFC3CD08); - psx_delay_BFC3CD08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD0C: 2CA10021 sltiu $at, $a1, 33 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000021u ? 1 : 0); - PGXP_ALU(0x2CA10021u, cpu->gpr[1], _pgx1, 0x0021u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D0Cu); -#endif - if (psx_delay_BFC3CD08) { - psx_delay_BFC3CD08 = 0; - if (psx_taken_BFC3CD08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054808u); - goto label_BFC3C808; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D10u); - } -label_BFC3CD10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD10: 10200005 beq $at, $zero, 0xBFC3CD28 */ - uint32_t psx_brA_BFC3CD10 = cpu->gpr[1]; uint32_t psx_brB_BFC3CD10 = cpu->gpr[0]; - psx_taken_BFC3CD10 = (psx_brA_BFC3CD10 == psx_brB_BFC3CD10); - psx_delay_BFC3CD10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD14: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D14u); -#endif - if (psx_delay_BFC3CD10) { - psx_delay_BFC3CD10 = 0; - if (psx_taken_BFC3CD10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D28u); - goto label_BFC3CD28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D18u); - } -label_BFC3CD18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD18: 10A1FEB1 beq $a1, $at, 0xBFC3C7E0 */ - uint32_t psx_brA_BFC3CD18 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD18 = cpu->gpr[1]; - psx_taken_BFC3CD18 = (psx_brA_BFC3CD18 == psx_brB_BFC3CD18); - psx_delay_BFC3CD18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D1Cu); -#endif - if (psx_delay_BFC3CD18) { - psx_delay_BFC3CD18 = 0; - if (psx_taken_BFC3CD18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800547E0u); - goto label_BFC3C7E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D20u); - } -label_BFC3CD20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD20: 1000FFF3 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CD20 = cpu->gpr[0]; uint32_t psx_brB_BFC3CD20 = cpu->gpr[0]; - psx_taken_BFC3CD20 = (psx_brA_BFC3CD20 == psx_brB_BFC3CD20); - psx_delay_BFC3CD20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D24u); -#endif - if (psx_delay_BFC3CD20) { - psx_delay_BFC3CD20 = 0; - if (psx_taken_BFC3CD20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D28u); - } -label_BFC3CD28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD28: 24010021 addiu $at, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24010021u, cpu->gpr[1], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD2C: 10A1FF43 beq $a1, $at, 0xBFC3CA3C */ - uint32_t psx_brA_BFC3CD2C = cpu->gpr[5]; uint32_t psx_brB_BFC3CD2C = cpu->gpr[1]; - psx_taken_BFC3CD2C = (psx_brA_BFC3CD2C == psx_brB_BFC3CD2C); - psx_delay_BFC3CD2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D30u); -#endif - if (psx_delay_BFC3CD2C) { - psx_delay_BFC3CD2C = 0; - if (psx_taken_BFC3CD2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A3Cu); - goto label_BFC3CA3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D34u); - } -label_BFC3CD34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD34: 1000FFEE beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CD34 = cpu->gpr[0]; uint32_t psx_brB_BFC3CD34 = cpu->gpr[0]; - psx_taken_BFC3CD34 = (psx_brA_BFC3CD34 == psx_brB_BFC3CD34); - psx_delay_BFC3CD34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D38u); -#endif - if (psx_delay_BFC3CD34) { - psx_delay_BFC3CD34 = 0; - if (psx_taken_BFC3CD34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D3Cu); - } -label_BFC3CD3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD3C: 24010029 addiu $at, $zero, 41 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (41)); - PGXP_ALU(0x24010029u, cpu->gpr[1], _pgx1, 0x00000029u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD40: 10A1FEB1 beq $a1, $at, 0xBFC3C808 */ - uint32_t psx_brA_BFC3CD40 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD40 = cpu->gpr[1]; - psx_taken_BFC3CD40 = (psx_brA_BFC3CD40 == psx_brB_BFC3CD40); - psx_delay_BFC3CD40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD44: 2CA1002A sltiu $at, $a1, 42 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Au ? 1 : 0); - PGXP_ALU(0x2CA1002Au, cpu->gpr[1], _pgx1, 0x002Au); } -#ifdef PSX_COSIM - cosim_instr(0x80054D44u); -#endif - if (psx_delay_BFC3CD40) { - psx_delay_BFC3CD40 = 0; - if (psx_taken_BFC3CD40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054808u); - goto label_BFC3C808; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D48u); - } -label_BFC3CD48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD48: 1020000E beq $at, $zero, 0xBFC3CD84 */ - uint32_t psx_brA_BFC3CD48 = cpu->gpr[1]; uint32_t psx_brB_BFC3CD48 = cpu->gpr[0]; - psx_taken_BFC3CD48 = (psx_brA_BFC3CD48 == psx_brB_BFC3CD48); - psx_delay_BFC3CD48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD4C: 24010025 addiu $at, $zero, 37 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); - PGXP_ALU(0x24010025u, cpu->gpr[1], _pgx1, 0x00000025u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D4Cu); -#endif - if (psx_delay_BFC3CD48) { - psx_delay_BFC3CD48 = 0; - if (psx_taken_BFC3CD48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D84u); - goto label_BFC3CD84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D50u); - } -label_BFC3CD50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD50: 10A1FF58 beq $a1, $at, 0xBFC3CAB4 */ - uint32_t psx_brA_BFC3CD50 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD50 = cpu->gpr[1]; - psx_taken_BFC3CD50 = (psx_brA_BFC3CD50 == psx_brB_BFC3CD50); - psx_delay_BFC3CD50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD54: 2CA10026 sltiu $at, $a1, 38 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000026u ? 1 : 0); - PGXP_ALU(0x2CA10026u, cpu->gpr[1], _pgx1, 0x0026u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D54u); -#endif - if (psx_delay_BFC3CD50) { - psx_delay_BFC3CD50 = 0; - if (psx_taken_BFC3CD50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054AB4u); - goto label_BFC3CAB4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D58u); - } -label_BFC3CD58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD58: 10200005 beq $at, $zero, 0xBFC3CD70 */ - uint32_t psx_brA_BFC3CD58 = cpu->gpr[1]; uint32_t psx_brB_BFC3CD58 = cpu->gpr[0]; - psx_taken_BFC3CD58 = (psx_brA_BFC3CD58 == psx_brB_BFC3CD58); - psx_delay_BFC3CD58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD5C: 24010024 addiu $at, $zero, 36 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); - PGXP_ALU(0x24010024u, cpu->gpr[1], _pgx1, 0x00000024u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D5Cu); -#endif - if (psx_delay_BFC3CD58) { - psx_delay_BFC3CD58 = 0; - if (psx_taken_BFC3CD58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D70u); - goto label_BFC3CD70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D60u); - } -label_BFC3CD60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD60: 10A1FF46 beq $a1, $at, 0xBFC3CA7C */ - uint32_t psx_brA_BFC3CD60 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD60 = cpu->gpr[1]; - psx_taken_BFC3CD60 = (psx_brA_BFC3CD60 == psx_brB_BFC3CD60); - psx_delay_BFC3CD60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D64u); -#endif - if (psx_delay_BFC3CD60) { - psx_delay_BFC3CD60 = 0; - if (psx_taken_BFC3CD60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A7Cu); - goto label_BFC3CA7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D68u); - } -label_BFC3CD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD68: 1000FFE1 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CD68 = cpu->gpr[0]; uint32_t psx_brB_BFC3CD68 = cpu->gpr[0]; - psx_taken_BFC3CD68 = (psx_brA_BFC3CD68 == psx_brB_BFC3CD68); - psx_delay_BFC3CD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D6Cu); -#endif - if (psx_delay_BFC3CD68) { - psx_delay_BFC3CD68 = 0; - if (psx_taken_BFC3CD68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D70u); - } -label_BFC3CD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD70: 24010028 addiu $at, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24010028u, cpu->gpr[1], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80054D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD74: 10A1FECE beq $a1, $at, 0xBFC3C8B0 */ - uint32_t psx_brA_BFC3CD74 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD74 = cpu->gpr[1]; - psx_taken_BFC3CD74 = (psx_brA_BFC3CD74 == psx_brB_BFC3CD74); - psx_delay_BFC3CD74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D78u); -#endif - if (psx_delay_BFC3CD74) { - psx_delay_BFC3CD74 = 0; - if (psx_taken_BFC3CD74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548B0u); - goto label_BFC3C8B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D7Cu); - } -label_BFC3CD7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD7C: 1000FFDC beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CD7C = cpu->gpr[0]; uint32_t psx_brB_BFC3CD7C = cpu->gpr[0]; - psx_taken_BFC3CD7C = (psx_brA_BFC3CD7C == psx_brB_BFC3CD7C); - psx_delay_BFC3CD7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D80u); -#endif - if (psx_delay_BFC3CD7C) { - psx_delay_BFC3CD7C = 0; - if (psx_taken_BFC3CD7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D84u); - } -label_BFC3CD84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD84: 2401002B addiu $at, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2401002Bu, cpu->gpr[1], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80054D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD88: 10A1FF0A beq $a1, $at, 0xBFC3C9B4 */ - uint32_t psx_brA_BFC3CD88 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD88 = cpu->gpr[1]; - psx_taken_BFC3CD88 = (psx_brA_BFC3CD88 == psx_brB_BFC3CD88); - psx_delay_BFC3CD88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD8C: 2CA1002C sltiu $at, $a1, 44 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000002Cu ? 1 : 0); - PGXP_ALU(0x2CA1002Cu, cpu->gpr[1], _pgx1, 0x002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80054D8Cu); -#endif - if (psx_delay_BFC3CD88) { - psx_delay_BFC3CD88 = 0; - if (psx_taken_BFC3CD88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800549B4u); - goto label_BFC3C9B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D90u); - } -label_BFC3CD90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD90: 10200005 beq $at, $zero, 0xBFC3CDA8 */ - uint32_t psx_brA_BFC3CD90 = cpu->gpr[1]; uint32_t psx_brB_BFC3CD90 = cpu->gpr[0]; - psx_taken_BFC3CD90 = (psx_brA_BFC3CD90 == psx_brB_BFC3CD90); - psx_delay_BFC3CD90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CD94: 2401002A addiu $at, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2401002Au, cpu->gpr[1], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x80054D94u); -#endif - if (psx_delay_BFC3CD90) { - psx_delay_BFC3CD90 = 0; - if (psx_taken_BFC3CD90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DA8u); - goto label_BFC3CDA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054D98u); - } -label_BFC3CD98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CD98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CD98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CD98: 10A1FEC5 beq $a1, $at, 0xBFC3C8B0 */ - uint32_t psx_brA_BFC3CD98 = cpu->gpr[5]; uint32_t psx_brB_BFC3CD98 = cpu->gpr[1]; - psx_taken_BFC3CD98 = (psx_brA_BFC3CD98 == psx_brB_BFC3CD98); - psx_delay_BFC3CD98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CD9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054D9Cu); -#endif - if (psx_delay_BFC3CD98) { - psx_delay_BFC3CD98 = 0; - if (psx_taken_BFC3CD98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800548B0u); - goto label_BFC3C8B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DA0u); - } -label_BFC3CDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDA0: 1000FFD3 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CDA0 = cpu->gpr[0]; uint32_t psx_brB_BFC3CDA0 = cpu->gpr[0]; - psx_taken_BFC3CDA0 = (psx_brA_BFC3CDA0 == psx_brB_BFC3CDA0); - psx_delay_BFC3CDA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054DA4u); -#endif - if (psx_delay_BFC3CDA0) { - psx_delay_BFC3CDA0 = 0; - if (psx_taken_BFC3CDA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DA8u); - } -label_BFC3CDA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDA8: 2401002C addiu $at, $zero, 44 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); - PGXP_ALU(0x2401002Cu, cpu->gpr[1], _pgx1, 0x0000002Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80054DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDAC: 10A1FF19 beq $a1, $at, 0xBFC3CA14 */ - uint32_t psx_brA_BFC3CDAC = cpu->gpr[5]; uint32_t psx_brB_BFC3CDAC = cpu->gpr[1]; - psx_taken_BFC3CDAC = (psx_brA_BFC3CDAC == psx_brB_BFC3CDAC); - psx_delay_BFC3CDAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054DB0u); -#endif - if (psx_delay_BFC3CDAC) { - psx_delay_BFC3CDAC = 0; - if (psx_taken_BFC3CDAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A14u); - goto label_BFC3CA14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DB4u); - } -label_BFC3CDB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDB4: 1000FFCE beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CDB4 = cpu->gpr[0]; uint32_t psx_brB_BFC3CDB4 = cpu->gpr[0]; - psx_taken_BFC3CDB4 = (psx_brA_BFC3CDB4 == psx_brB_BFC3CDB4); - psx_delay_BFC3CDB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054DB8u); -#endif - if (psx_delay_BFC3CDB4) { - psx_delay_BFC3CDB4 = 0; - if (psx_taken_BFC3CDB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DBCu); - } -label_BFC3CDBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDBC: 24010066 addiu $at, $zero, 102 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (102)); - PGXP_ALU(0x24010066u, cpu->gpr[1], _pgx1, 0x00000066u); } -#ifdef PSX_COSIM - cosim_instr(0x80054DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDC0: 10A1FF91 beq $a1, $at, 0xBFC3CC08 */ - uint32_t psx_brA_BFC3CDC0 = cpu->gpr[5]; uint32_t psx_brB_BFC3CDC0 = cpu->gpr[1]; - psx_taken_BFC3CDC0 = (psx_brA_BFC3CDC0 == psx_brB_BFC3CDC0); - psx_delay_BFC3CDC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDC4: 2CA10067 sltiu $at, $a1, 103 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000067u ? 1 : 0); - PGXP_ALU(0x2CA10067u, cpu->gpr[1], _pgx1, 0x0067u); } -#ifdef PSX_COSIM - cosim_instr(0x80054DC4u); -#endif - if (psx_delay_BFC3CDC0) { - psx_delay_BFC3CDC0 = 0; - if (psx_taken_BFC3CDC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C08u); - goto label_BFC3CC08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DC8u); - } -label_BFC3CDC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDC8: 10200020 beq $at, $zero, 0xBFC3CE4C */ - uint32_t psx_brA_BFC3CDC8 = cpu->gpr[1]; uint32_t psx_brB_BFC3CDC8 = cpu->gpr[0]; - psx_taken_BFC3CDC8 = (psx_brA_BFC3CDC8 == psx_brB_BFC3CDC8); - psx_delay_BFC3CDC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDCC: 24010061 addiu $at, $zero, 97 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (97)); - PGXP_ALU(0x24010061u, cpu->gpr[1], _pgx1, 0x00000061u); } -#ifdef PSX_COSIM - cosim_instr(0x80054DCCu); -#endif - if (psx_delay_BFC3CDC8) { - psx_delay_BFC3CDC8 = 0; - if (psx_taken_BFC3CDC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E4Cu); - goto label_BFC3CE4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DD0u); - } -label_BFC3CDD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDD0: 10A1FF52 beq $a1, $at, 0xBFC3CB1C */ - uint32_t psx_brA_BFC3CDD0 = cpu->gpr[5]; uint32_t psx_brB_BFC3CDD0 = cpu->gpr[1]; - psx_taken_BFC3CDD0 = (psx_brA_BFC3CDD0 == psx_brB_BFC3CDD0); - psx_delay_BFC3CDD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDD4: 2CA10062 sltiu $at, $a1, 98 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000062u ? 1 : 0); - PGXP_ALU(0x2CA10062u, cpu->gpr[1], _pgx1, 0x0062u); } -#ifdef PSX_COSIM - cosim_instr(0x80054DD4u); -#endif - if (psx_delay_BFC3CDD0) { - psx_delay_BFC3CDD0 = 0; - if (psx_taken_BFC3CDD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B1Cu); - goto label_BFC3CB1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DD8u); - } -label_BFC3CDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDD8: 1020000E beq $at, $zero, 0xBFC3CE14 */ - uint32_t psx_brA_BFC3CDD8 = cpu->gpr[1]; uint32_t psx_brB_BFC3CDD8 = cpu->gpr[0]; - psx_taken_BFC3CDD8 = (psx_brA_BFC3CDD8 == psx_brB_BFC3CDD8); - psx_delay_BFC3CDD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDDC: 2401002F addiu $at, $zero, 47 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (47)); - PGXP_ALU(0x2401002Fu, cpu->gpr[1], _pgx1, 0x0000002Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80054DDCu); -#endif - if (psx_delay_BFC3CDD8) { - psx_delay_BFC3CDD8 = 0; - if (psx_taken_BFC3CDD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E14u); - goto label_BFC3CE14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DE0u); - } -label_BFC3CDE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDE0: 10A1FF1A beq $a1, $at, 0xBFC3CA4C */ - uint32_t psx_brA_BFC3CDE0 = cpu->gpr[5]; uint32_t psx_brB_BFC3CDE0 = cpu->gpr[1]; - psx_taken_BFC3CDE0 = (psx_brA_BFC3CDE0 == psx_brB_BFC3CDE0); - psx_delay_BFC3CDE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDE4: 2CA10030 sltiu $at, $a1, 48 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000030u ? 1 : 0); - PGXP_ALU(0x2CA10030u, cpu->gpr[1], _pgx1, 0x0030u); } -#ifdef PSX_COSIM - cosim_instr(0x80054DE4u); -#endif - if (psx_delay_BFC3CDE0) { - psx_delay_BFC3CDE0 = 0; - if (psx_taken_BFC3CDE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A4Cu); - goto label_BFC3CA4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DE8u); - } -label_BFC3CDE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDE8: 10200005 beq $at, $zero, 0xBFC3CE00 */ - uint32_t psx_brA_BFC3CDE8 = cpu->gpr[1]; uint32_t psx_brB_BFC3CDE8 = cpu->gpr[0]; - psx_taken_BFC3CDE8 = (psx_brA_BFC3CDE8 == psx_brB_BFC3CDE8); - psx_delay_BFC3CDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CDEC: 2401002E addiu $at, $zero, 46 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (46)); - PGXP_ALU(0x2401002Eu, cpu->gpr[1], _pgx1, 0x0000002Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80054DECu); -#endif - if (psx_delay_BFC3CDE8) { - psx_delay_BFC3CDE8 = 0; - if (psx_taken_BFC3CDE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E00u); - goto label_BFC3CE00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DF0u); - } -label_BFC3CDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CDF0: 10A1FF12 beq $a1, $at, 0xBFC3CA3C */ - uint32_t psx_brA_BFC3CDF0 = cpu->gpr[5]; uint32_t psx_brB_BFC3CDF0 = cpu->gpr[1]; - psx_taken_BFC3CDF0 = (psx_brA_BFC3CDF0 == psx_brB_BFC3CDF0); - psx_delay_BFC3CDF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054DF4u); -#endif - if (psx_delay_BFC3CDF0) { - psx_delay_BFC3CDF0 = 0; - if (psx_taken_BFC3CDF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054A3Cu); - goto label_BFC3CA3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054DF8u); - } -label_BFC3CDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDF8: 1000FFBD beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CDF8 = cpu->gpr[0]; uint32_t psx_brB_BFC3CDF8 = cpu->gpr[0]; - psx_taken_BFC3CDF8 = (psx_brA_BFC3CDF8 == psx_brB_BFC3CDF8); - psx_delay_BFC3CDF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CDFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054DFCu); -#endif - if (psx_delay_BFC3CDF8) { - psx_delay_BFC3CDF8 = 0; - if (psx_taken_BFC3CDF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E00u); - } -label_BFC3CE00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE00: 24010060 addiu $at, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24010060u, cpu->gpr[1], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE04: 10A1FF31 beq $a1, $at, 0xBFC3CACC */ - uint32_t psx_brA_BFC3CE04 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE04 = cpu->gpr[1]; - psx_taken_BFC3CE04 = (psx_brA_BFC3CE04 == psx_brB_BFC3CE04); - psx_delay_BFC3CE04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E08u); -#endif - if (psx_delay_BFC3CE04) { - psx_delay_BFC3CE04 = 0; - if (psx_taken_BFC3CE04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054ACCu); - goto label_BFC3CACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E0Cu); - } -label_BFC3CE0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE0C: 1000FFB8 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CE0C = cpu->gpr[0]; uint32_t psx_brB_BFC3CE0C = cpu->gpr[0]; - psx_taken_BFC3CE0C = (psx_brA_BFC3CE0C == psx_brB_BFC3CE0C); - psx_delay_BFC3CE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E10u); -#endif - if (psx_delay_BFC3CE0C) { - psx_delay_BFC3CE0C = 0; - if (psx_taken_BFC3CE0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E14u); - } -label_BFC3CE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE14: 24010063 addiu $at, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24010063u, cpu->gpr[1], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE18: 10A1FF67 beq $a1, $at, 0xBFC3CBB8 */ - uint32_t psx_brA_BFC3CE18 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE18 = cpu->gpr[1]; - psx_taken_BFC3CE18 = (psx_brA_BFC3CE18 == psx_brB_BFC3CE18); - psx_delay_BFC3CE18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE1C: 2CA10064 sltiu $at, $a1, 100 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000064u ? 1 : 0); - PGXP_ALU(0x2CA10064u, cpu->gpr[1], _pgx1, 0x0064u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E1Cu); -#endif - if (psx_delay_BFC3CE18) { - psx_delay_BFC3CE18 = 0; - if (psx_taken_BFC3CE18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054BB8u); - goto label_BFC3CBB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E20u); - } -label_BFC3CE20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE20: 10200005 beq $at, $zero, 0xBFC3CE38 */ - uint32_t psx_brA_BFC3CE20 = cpu->gpr[1]; uint32_t psx_brB_BFC3CE20 = cpu->gpr[0]; - psx_taken_BFC3CE20 = (psx_brA_BFC3CE20 == psx_brB_BFC3CE20); - psx_delay_BFC3CE20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE24: 24010062 addiu $at, $zero, 98 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (98)); - PGXP_ALU(0x24010062u, cpu->gpr[1], _pgx1, 0x00000062u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E24u); -#endif - if (psx_delay_BFC3CE20) { - psx_delay_BFC3CE20 = 0; - if (psx_taken_BFC3CE20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E38u); - goto label_BFC3CE38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E28u); - } -label_BFC3CE28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE28: 10A1FF57 beq $a1, $at, 0xBFC3CB88 */ - uint32_t psx_brA_BFC3CE28 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE28 = cpu->gpr[1]; - psx_taken_BFC3CE28 = (psx_brA_BFC3CE28 == psx_brB_BFC3CE28); - psx_delay_BFC3CE28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E2Cu); -#endif - if (psx_delay_BFC3CE28) { - psx_delay_BFC3CE28 = 0; - if (psx_taken_BFC3CE28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B88u); - goto label_BFC3CB88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E30u); - } -label_BFC3CE30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE30: 1000FFAF beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CE30 = cpu->gpr[0]; uint32_t psx_brB_BFC3CE30 = cpu->gpr[0]; - psx_taken_BFC3CE30 = (psx_brA_BFC3CE30 == psx_brB_BFC3CE30); - psx_delay_BFC3CE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E34u); -#endif - if (psx_delay_BFC3CE30) { - psx_delay_BFC3CE30 = 0; - if (psx_taken_BFC3CE30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E38u); - } -label_BFC3CE38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE38: 24010065 addiu $at, $zero, 101 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (101)); - PGXP_ALU(0x24010065u, cpu->gpr[1], _pgx1, 0x00000065u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE3C: 10A1FF62 beq $a1, $at, 0xBFC3CBC8 */ - uint32_t psx_brA_BFC3CE3C = cpu->gpr[5]; uint32_t psx_brB_BFC3CE3C = cpu->gpr[1]; - psx_taken_BFC3CE3C = (psx_brA_BFC3CE3C == psx_brB_BFC3CE3C); - psx_delay_BFC3CE3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E40u); -#endif - if (psx_delay_BFC3CE3C) { - psx_delay_BFC3CE3C = 0; - if (psx_taken_BFC3CE3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054BC8u); - goto label_BFC3CBC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E44u); - } -label_BFC3CE44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE44: 1000FFAA beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CE44 = cpu->gpr[0]; uint32_t psx_brB_BFC3CE44 = cpu->gpr[0]; - psx_taken_BFC3CE44 = (psx_brA_BFC3CE44 == psx_brB_BFC3CE44); - psx_delay_BFC3CE44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE48: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E48u); -#endif - if (psx_delay_BFC3CE44) { - psx_delay_BFC3CE44 = 0; - if (psx_taken_BFC3CE44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E4Cu); - } -label_BFC3CE4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE4C: 2401006A addiu $at, $zero, 106 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (106)); - PGXP_ALU(0x2401006Au, cpu->gpr[1], _pgx1, 0x0000006Au); } -#ifdef PSX_COSIM - cosim_instr(0x80054E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE50: 10A1FF28 beq $a1, $at, 0xBFC3CAF4 */ - uint32_t psx_brA_BFC3CE50 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE50 = cpu->gpr[1]; - psx_taken_BFC3CE50 = (psx_brA_BFC3CE50 == psx_brB_BFC3CE50); - psx_delay_BFC3CE50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE54: 2CA1006B sltiu $at, $a1, 107 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x0000006Bu ? 1 : 0); - PGXP_ALU(0x2CA1006Bu, cpu->gpr[1], _pgx1, 0x006Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80054E54u); -#endif - if (psx_delay_BFC3CE50) { - psx_delay_BFC3CE50 = 0; - if (psx_taken_BFC3CE50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054AF4u); - goto label_BFC3CAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E58u); - } -label_BFC3CE58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE58: 1020000E beq $at, $zero, 0xBFC3CE94 */ - uint32_t psx_brA_BFC3CE58 = cpu->gpr[1]; uint32_t psx_brB_BFC3CE58 = cpu->gpr[0]; - psx_taken_BFC3CE58 = (psx_brA_BFC3CE58 == psx_brB_BFC3CE58); - psx_delay_BFC3CE58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE5C: 24010068 addiu $at, $zero, 104 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (104)); - PGXP_ALU(0x24010068u, cpu->gpr[1], _pgx1, 0x00000068u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E5Cu); -#endif - if (psx_delay_BFC3CE58) { - psx_delay_BFC3CE58 = 0; - if (psx_taken_BFC3CE58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E94u); - goto label_BFC3CE94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E60u); - } -label_BFC3CE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE60: 10A1FF33 beq $a1, $at, 0xBFC3CB30 */ - uint32_t psx_brA_BFC3CE60 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE60 = cpu->gpr[1]; - psx_taken_BFC3CE60 = (psx_brA_BFC3CE60 == psx_brB_BFC3CE60); - psx_delay_BFC3CE60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE64: 2CA10069 sltiu $at, $a1, 105 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000069u ? 1 : 0); - PGXP_ALU(0x2CA10069u, cpu->gpr[1], _pgx1, 0x0069u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E64u); -#endif - if (psx_delay_BFC3CE60) { - psx_delay_BFC3CE60 = 0; - if (psx_taken_BFC3CE60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B30u); - goto label_BFC3CB30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E68u); - } -label_BFC3CE68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE68: 10200005 beq $at, $zero, 0xBFC3CE80 */ - uint32_t psx_brA_BFC3CE68 = cpu->gpr[1]; uint32_t psx_brB_BFC3CE68 = cpu->gpr[0]; - psx_taken_BFC3CE68 = (psx_brA_BFC3CE68 == psx_brB_BFC3CE68); - psx_delay_BFC3CE68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE6C: 24010067 addiu $at, $zero, 103 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (103)); - PGXP_ALU(0x24010067u, cpu->gpr[1], _pgx1, 0x00000067u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E6Cu); -#endif - if (psx_delay_BFC3CE68) { - psx_delay_BFC3CE68 = 0; - if (psx_taken_BFC3CE68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E80u); - goto label_BFC3CE80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E70u); - } -label_BFC3CE70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE70: 10A1FF6D beq $a1, $at, 0xBFC3CC28 */ - uint32_t psx_brA_BFC3CE70 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE70 = cpu->gpr[1]; - psx_taken_BFC3CE70 = (psx_brA_BFC3CE70 == psx_brB_BFC3CE70); - psx_delay_BFC3CE70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E74u); -#endif - if (psx_delay_BFC3CE70) { - psx_delay_BFC3CE70 = 0; - if (psx_taken_BFC3CE70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C28u); - goto label_BFC3CC28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E78u); - } -label_BFC3CE78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE78: 1000FF9D beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CE78 = cpu->gpr[0]; uint32_t psx_brB_BFC3CE78 = cpu->gpr[0]; - psx_taken_BFC3CE78 = (psx_brA_BFC3CE78 == psx_brB_BFC3CE78); - psx_delay_BFC3CE78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E7Cu); -#endif - if (psx_delay_BFC3CE78) { - psx_delay_BFC3CE78 = 0; - if (psx_taken_BFC3CE78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E80u); - } -label_BFC3CE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE80: 24010069 addiu $at, $zero, 105 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (105)); - PGXP_ALU(0x24010069u, cpu->gpr[1], _pgx1, 0x00000069u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE84: 10A1FF45 beq $a1, $at, 0xBFC3CB9C */ - uint32_t psx_brA_BFC3CE84 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE84 = cpu->gpr[1]; - psx_taken_BFC3CE84 = (psx_brA_BFC3CE84 == psx_brB_BFC3CE84); - psx_delay_BFC3CE84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E88u); -#endif - if (psx_delay_BFC3CE84) { - psx_delay_BFC3CE84 = 0; - if (psx_taken_BFC3CE84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054B9Cu); - goto label_BFC3CB9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E8Cu); - } -label_BFC3CE8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE8C: 1000FF98 beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CE8C = cpu->gpr[0]; uint32_t psx_brB_BFC3CE8C = cpu->gpr[0]; - psx_taken_BFC3CE8C = (psx_brA_BFC3CE8C == psx_brB_BFC3CE8C); - psx_delay_BFC3CE8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CE90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054E90u); -#endif - if (psx_delay_BFC3CE8C) { - psx_delay_BFC3CE8C = 0; - if (psx_taken_BFC3CE8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054E94u); - } -label_BFC3CE94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CE94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CE94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CE94: 24010101 addiu $at, $zero, 257 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); - PGXP_ALU(0x24010101u, cpu->gpr[1], _pgx1, 0x00000101u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE98: 10A1FF79 beq $a1, $at, 0xBFC3CC80 */ - uint32_t psx_brA_BFC3CE98 = cpu->gpr[5]; uint32_t psx_brB_BFC3CE98 = cpu->gpr[1]; - psx_taken_BFC3CE98 = (psx_brA_BFC3CE98 == psx_brB_BFC3CE98); - psx_delay_BFC3CE98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CE9C: 2CA10102 sltiu $at, $a1, 258 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < 0x00000102u ? 1 : 0); - PGXP_ALU(0x2CA10102u, cpu->gpr[1], _pgx1, 0x0102u); } -#ifdef PSX_COSIM - cosim_instr(0x80054E9Cu); -#endif - if (psx_delay_BFC3CE98) { - psx_delay_BFC3CE98 = 0; - if (psx_taken_BFC3CE98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C80u); - goto label_BFC3CC80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EA0u); - } -label_BFC3CEA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CEA0: 1020FF93 beq $at, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CEA0 = cpu->gpr[1]; uint32_t psx_brB_BFC3CEA0 = cpu->gpr[0]; - psx_taken_BFC3CEA0 = (psx_brA_BFC3CEA0 == psx_brB_BFC3CEA0); - psx_delay_BFC3CEA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3CEA4: 24010100 addiu $at, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24010100u, cpu->gpr[1], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x80054EA4u); -#endif - if (psx_delay_BFC3CEA0) { - psx_delay_BFC3CEA0 = 0; - if (psx_taken_BFC3CEA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EA8u); - } -label_BFC3CEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3CEA8: 10A1FF71 beq $a1, $at, 0xBFC3CC70 */ - uint32_t psx_brA_BFC3CEA8 = cpu->gpr[5]; uint32_t psx_brB_BFC3CEA8 = cpu->gpr[1]; - psx_taken_BFC3CEA8 = (psx_brA_BFC3CEA8 == psx_brB_BFC3CEA8); - psx_delay_BFC3CEA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CEAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054EACu); -#endif - if (psx_delay_BFC3CEA8) { - psx_delay_BFC3CEA8 = 0; - if (psx_taken_BFC3CEA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054C70u); - goto label_BFC3CC70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB0u); - } -label_BFC3CEB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CEB0: 1000FF8F beq $zero, $zero, 0xBFC3CCF0 */ - uint32_t psx_brA_BFC3CEB0 = cpu->gpr[0]; uint32_t psx_brB_BFC3CEB0 = cpu->gpr[0]; - psx_taken_BFC3CEB0 = (psx_brA_BFC3CEB0 == psx_brB_BFC3CEB0); - psx_delay_BFC3CEB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CEB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054EB4u); -#endif - if (psx_delay_BFC3CEB0) { - psx_delay_BFC3CEB0 = 0; - if (psx_taken_BFC3CEB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054CF0u); - goto label_BFC3CCF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EB8u); - } -label_BFC3CEB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EB8u); -#endif - /* 0xBFC3CEB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054EB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80054EB8u); -#endif -label_BFC3CEBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3CEBC: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80054EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3CEC0: 03E00008 jr $ra */ - psx_delay_BFC3CEC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3CEC4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054EC4u); -#endif - if (psx_delay_BFC3CEC0) { - psx_delay_BFC3CEC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3CEC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3CEC8u); - int psx_delay_BFC3CED0 = 0; - int psx_taken_BFC3CED0 = 0; - int psx_delay_BFC3CED8 = 0; - int psx_taken_BFC3CED8 = 0; - int psx_delay_BFC3CEE4 = 0; - int psx_taken_BFC3CEE4 = 0; - int psx_delay_BFC3CEF0 = 0; - int psx_taken_BFC3CEF0 = 0; - int psx_delay_BFC3CF00 = 0; - int psx_taken_BFC3CF00 = 0; - int psx_delay_BFC3CF1C = 0; - int psx_taken_BFC3CF1C = 0; - int psx_delay_BFC3CF28 = 0; - int psx_taken_BFC3CF28 = 0; - int psx_delay_BFC3CF3C = 0; - int psx_taken_BFC3CF3C = 0; - int psx_delay_BFC3CF48 = 0; - int psx_taken_BFC3CF48 = 0; - int psx_delay_BFC3CF5C = 0; - int psx_taken_BFC3CF5C = 0; - int psx_delay_BFC3CF68 = 0; - int psx_taken_BFC3CF68 = 0; - int psx_delay_BFC3CF7C = 0; - int psx_taken_BFC3CF7C = 0; - int psx_delay_BFC3CF88 = 0; - int psx_taken_BFC3CF88 = 0; - int psx_delay_BFC3CF9C = 0; - int psx_taken_BFC3CF9C = 0; - int psx_delay_BFC3CFA8 = 0; - int psx_taken_BFC3CFA8 = 0; - int psx_delay_BFC3CFBC = 0; - int psx_taken_BFC3CFBC = 0; - int psx_delay_BFC3CFC8 = 0; - int psx_taken_BFC3CFC8 = 0; - int psx_delay_BFC3CFDC = 0; - int psx_taken_BFC3CFDC = 0; - int psx_delay_BFC3CFE8 = 0; - int psx_taken_BFC3CFE8 = 0; - int psx_delay_BFC3CFFC = 0; - int psx_taken_BFC3CFFC = 0; - int psx_delay_BFC3D008 = 0; - int psx_taken_BFC3D008 = 0; - int psx_delay_BFC3D01C = 0; - int psx_taken_BFC3D01C = 0; - int psx_delay_BFC3D028 = 0; - int psx_taken_BFC3D028 = 0; - int psx_delay_BFC3D03C = 0; - int psx_taken_BFC3D03C = 0; - int psx_delay_BFC3D048 = 0; - int psx_taken_BFC3D048 = 0; - int psx_delay_BFC3D05C = 0; - int psx_taken_BFC3D05C = 0; - int psx_delay_BFC3D068 = 0; - int psx_taken_BFC3D068 = 0; - int psx_delay_BFC3D07C = 0; - int psx_taken_BFC3D07C = 0; - int psx_delay_BFC3D088 = 0; - int psx_taken_BFC3D088 = 0; - int psx_delay_BFC3D09C = 0; - int psx_taken_BFC3D09C = 0; - int psx_delay_BFC3D0A8 = 0; - int psx_taken_BFC3D0A8 = 0; - int psx_delay_BFC3D0BC = 0; - int psx_taken_BFC3D0BC = 0; - int psx_delay_BFC3D0C8 = 0; - int psx_taken_BFC3D0C8 = 0; - int psx_delay_BFC3D0DC = 0; - int psx_taken_BFC3D0DC = 0; - int psx_delay_BFC3D0E8 = 0; - int psx_taken_BFC3D0E8 = 0; - int psx_delay_BFC3D0FC = 0; - int psx_taken_BFC3D0FC = 0; - int psx_delay_BFC3D108 = 0; - int psx_taken_BFC3D108 = 0; - int psx_delay_BFC3D11C = 0; - int psx_taken_BFC3D11C = 0; - int psx_delay_BFC3D128 = 0; - int psx_taken_BFC3D128 = 0; - int psx_delay_BFC3D13C = 0; - int psx_taken_BFC3D13C = 0; - int psx_delay_BFC3D148 = 0; - int psx_taken_BFC3D148 = 0; - int psx_delay_BFC3D15C = 0; - int psx_taken_BFC3D15C = 0; - int psx_delay_BFC3D168 = 0; - int psx_taken_BFC3D168 = 0; - int psx_delay_BFC3D17C = 0; - int psx_taken_BFC3D17C = 0; - int psx_delay_BFC3D188 = 0; - int psx_taken_BFC3D188 = 0; - int psx_delay_BFC3D19C = 0; - int psx_taken_BFC3D19C = 0; - int psx_delay_BFC3D1A8 = 0; - int psx_taken_BFC3D1A8 = 0; - int psx_delay_BFC3D1BC = 0; - int psx_taken_BFC3D1BC = 0; - int psx_delay_BFC3D1C8 = 0; - int psx_taken_BFC3D1C8 = 0; - int psx_delay_BFC3D1DC = 0; - int psx_taken_BFC3D1DC = 0; - int psx_delay_BFC3D1E8 = 0; - int psx_taken_BFC3D1E8 = 0; - int psx_delay_BFC3D1FC = 0; - int psx_taken_BFC3D1FC = 0; - int psx_delay_BFC3D208 = 0; - int psx_taken_BFC3D208 = 0; - int psx_delay_BFC3D21C = 0; - int psx_taken_BFC3D21C = 0; - int psx_delay_BFC3D228 = 0; - int psx_taken_BFC3D228 = 0; - int psx_delay_BFC3D23C = 0; - int psx_taken_BFC3D23C = 0; - int psx_delay_BFC3D248 = 0; - int psx_taken_BFC3D248 = 0; - int psx_delay_BFC3D25C = 0; - int psx_taken_BFC3D25C = 0; - int psx_delay_BFC3D268 = 0; - int psx_taken_BFC3D268 = 0; - int psx_delay_BFC3D27C = 0; - int psx_taken_BFC3D27C = 0; - int psx_delay_BFC3D288 = 0; - int psx_taken_BFC3D288 = 0; - int psx_delay_BFC3D29C = 0; - int psx_taken_BFC3D29C = 0; - int psx_delay_BFC3D2A8 = 0; - int psx_taken_BFC3D2A8 = 0; - int psx_delay_BFC3D2BC = 0; - int psx_taken_BFC3D2BC = 0; - int psx_delay_BFC3D2C8 = 0; - int psx_taken_BFC3D2C8 = 0; - int psx_delay_BFC3D2DC = 0; - int psx_taken_BFC3D2DC = 0; - int psx_delay_BFC3D2E8 = 0; - int psx_taken_BFC3D2E8 = 0; - int psx_delay_BFC3D2FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3CED8u: goto label_BFC3CED8; - case 0xBFC3CEE0u: goto label_BFC3CEE0; - case 0xBFC3CEE4u: goto label_BFC3CEE4; - case 0xBFC3CEECu: goto label_BFC3CEEC; - case 0xBFC3CEF8u: goto label_BFC3CEF8; - case 0xBFC3CF08u: goto label_BFC3CF08; - case 0xBFC3CF1Cu: goto label_BFC3CF1C; - case 0xBFC3CF24u: goto label_BFC3CF24; - case 0xBFC3CF30u: goto label_BFC3CF30; - case 0xBFC3CF3Cu: goto label_BFC3CF3C; - case 0xBFC3CF44u: goto label_BFC3CF44; - case 0xBFC3CF50u: goto label_BFC3CF50; - case 0xBFC3CF5Cu: goto label_BFC3CF5C; - case 0xBFC3CF64u: goto label_BFC3CF64; - case 0xBFC3CF70u: goto label_BFC3CF70; - case 0xBFC3CF7Cu: goto label_BFC3CF7C; - case 0xBFC3CF84u: goto label_BFC3CF84; - case 0xBFC3CF90u: goto label_BFC3CF90; - case 0xBFC3CF9Cu: goto label_BFC3CF9C; - case 0xBFC3CFA4u: goto label_BFC3CFA4; - case 0xBFC3CFB0u: goto label_BFC3CFB0; - case 0xBFC3CFBCu: goto label_BFC3CFBC; - case 0xBFC3CFC4u: goto label_BFC3CFC4; - case 0xBFC3CFD0u: goto label_BFC3CFD0; - case 0xBFC3CFDCu: goto label_BFC3CFDC; - case 0xBFC3CFE4u: goto label_BFC3CFE4; - case 0xBFC3CFF0u: goto label_BFC3CFF0; - case 0xBFC3CFFCu: goto label_BFC3CFFC; - case 0xBFC3D004u: goto label_BFC3D004; - case 0xBFC3D010u: goto label_BFC3D010; - case 0xBFC3D01Cu: goto label_BFC3D01C; - case 0xBFC3D024u: goto label_BFC3D024; - case 0xBFC3D030u: goto label_BFC3D030; - case 0xBFC3D03Cu: goto label_BFC3D03C; - case 0xBFC3D044u: goto label_BFC3D044; - case 0xBFC3D050u: goto label_BFC3D050; - case 0xBFC3D05Cu: goto label_BFC3D05C; - case 0xBFC3D064u: goto label_BFC3D064; - case 0xBFC3D070u: goto label_BFC3D070; - case 0xBFC3D07Cu: goto label_BFC3D07C; - case 0xBFC3D084u: goto label_BFC3D084; - case 0xBFC3D090u: goto label_BFC3D090; - case 0xBFC3D09Cu: goto label_BFC3D09C; - case 0xBFC3D0A4u: goto label_BFC3D0A4; - case 0xBFC3D0B0u: goto label_BFC3D0B0; - case 0xBFC3D0BCu: goto label_BFC3D0BC; - case 0xBFC3D0C4u: goto label_BFC3D0C4; - case 0xBFC3D0D0u: goto label_BFC3D0D0; - case 0xBFC3D0DCu: goto label_BFC3D0DC; - case 0xBFC3D0E4u: goto label_BFC3D0E4; - case 0xBFC3D0F0u: goto label_BFC3D0F0; - case 0xBFC3D0FCu: goto label_BFC3D0FC; - case 0xBFC3D104u: goto label_BFC3D104; - case 0xBFC3D110u: goto label_BFC3D110; - case 0xBFC3D11Cu: goto label_BFC3D11C; - case 0xBFC3D124u: goto label_BFC3D124; - case 0xBFC3D130u: goto label_BFC3D130; - case 0xBFC3D13Cu: goto label_BFC3D13C; - case 0xBFC3D144u: goto label_BFC3D144; - case 0xBFC3D150u: goto label_BFC3D150; - case 0xBFC3D15Cu: goto label_BFC3D15C; - case 0xBFC3D164u: goto label_BFC3D164; - case 0xBFC3D170u: goto label_BFC3D170; - case 0xBFC3D17Cu: goto label_BFC3D17C; - case 0xBFC3D184u: goto label_BFC3D184; - case 0xBFC3D190u: goto label_BFC3D190; - case 0xBFC3D19Cu: goto label_BFC3D19C; - case 0xBFC3D1A4u: goto label_BFC3D1A4; - case 0xBFC3D1B0u: goto label_BFC3D1B0; - case 0xBFC3D1BCu: goto label_BFC3D1BC; - case 0xBFC3D1C4u: goto label_BFC3D1C4; - case 0xBFC3D1D0u: goto label_BFC3D1D0; - case 0xBFC3D1DCu: goto label_BFC3D1DC; - case 0xBFC3D1E4u: goto label_BFC3D1E4; - case 0xBFC3D1F0u: goto label_BFC3D1F0; - case 0xBFC3D1FCu: goto label_BFC3D1FC; - case 0xBFC3D204u: goto label_BFC3D204; - case 0xBFC3D210u: goto label_BFC3D210; - case 0xBFC3D21Cu: goto label_BFC3D21C; - case 0xBFC3D224u: goto label_BFC3D224; - case 0xBFC3D230u: goto label_BFC3D230; - case 0xBFC3D23Cu: goto label_BFC3D23C; - case 0xBFC3D244u: goto label_BFC3D244; - case 0xBFC3D250u: goto label_BFC3D250; - case 0xBFC3D25Cu: goto label_BFC3D25C; - case 0xBFC3D264u: goto label_BFC3D264; - case 0xBFC3D270u: goto label_BFC3D270; - case 0xBFC3D27Cu: goto label_BFC3D27C; - case 0xBFC3D284u: goto label_BFC3D284; - case 0xBFC3D290u: goto label_BFC3D290; - case 0xBFC3D29Cu: goto label_BFC3D29C; - case 0xBFC3D2A4u: goto label_BFC3D2A4; - case 0xBFC3D2B0u: goto label_BFC3D2B0; - case 0xBFC3D2BCu: goto label_BFC3D2BC; - case 0xBFC3D2C4u: goto label_BFC3D2C4; - case 0xBFC3D2D0u: goto label_BFC3D2D0; - case 0xBFC3D2DCu: goto label_BFC3D2DC; - case 0xBFC3D2E4u: goto label_BFC3D2E4; - case 0xBFC3D2F0u: goto label_BFC3D2F0; - case 0xBFC3D2FCu: goto label_BFC3D2FC; - default: break; - } - } -label_BFC3CEC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EC8u); -#endif - /* 0xBFC3CEC8: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054EC8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80054EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CECC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3CED0: 14400004 bne $v0, $zero, 0xBFC3CEE4 */ - uint32_t psx_brA_BFC3CED0 = cpu->gpr[2]; uint32_t psx_brB_BFC3CED0 = cpu->gpr[0]; - psx_taken_BFC3CED0 = (psx_brA_BFC3CED0 != psx_brB_BFC3CED0); - psx_delay_BFC3CED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CED4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054ED4u); -#endif - if (psx_delay_BFC3CED0) { - psx_delay_BFC3CED0 = 0; - if (psx_taken_BFC3CED0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EE4u); - goto label_BFC3CEE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054ED8u); - } -label_BFC3CED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CED8: 10000002 beq $zero, $zero, 0xBFC3CEE4 */ - uint32_t psx_brA_BFC3CED8 = cpu->gpr[0]; uint32_t psx_brB_BFC3CED8 = cpu->gpr[0]; - psx_taken_BFC3CED8 = (psx_brA_BFC3CED8 == psx_brB_BFC3CED8); - psx_delay_BFC3CED8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CEDC: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054EDCu); -#endif - if (psx_delay_BFC3CED8) { - psx_delay_BFC3CED8 = 0; - if (psx_taken_BFC3CED8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EE4u); - goto label_BFC3CEE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EE0u); - } -label_BFC3CEE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CEE0: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80054EE0u); -#endif -label_BFC3CEE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CEE4: 14600008 bne $v1, $zero, 0xBFC3CF08 */ - uint32_t psx_brA_BFC3CEE4 = cpu->gpr[3]; uint32_t psx_brB_BFC3CEE4 = cpu->gpr[0]; - psx_taken_BFC3CEE4 = (psx_brA_BFC3CEE4 != psx_brB_BFC3CEE4); - psx_delay_BFC3CEE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CEE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054EE8u); -#endif - if (psx_delay_BFC3CEE4) { - psx_delay_BFC3CEE4 = 0; - if (psx_taken_BFC3CEE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F08u); - goto label_BFC3CF08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EECu); - } -label_BFC3CEEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3CEEC: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80054EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3CEF0: 15C00005 bne $t6, $zero, 0xBFC3CF08 */ - uint32_t psx_brA_BFC3CEF0 = cpu->gpr[14]; uint32_t psx_brB_BFC3CEF0 = cpu->gpr[0]; - psx_taken_BFC3CEF0 = (psx_brA_BFC3CEF0 != psx_brB_BFC3CEF0); - psx_delay_BFC3CEF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CEF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054EF4u); -#endif - if (psx_delay_BFC3CEF0) { - psx_delay_BFC3CEF0 = 0; - if (psx_taken_BFC3CEF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F08u); - goto label_BFC3CF08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054EF8u); - } -label_BFC3CEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CEF8: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054EF8u); -#endif - /* 0xBFC3CEFC: 8CA597A0 lw $a1, -26720($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054EFCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA597A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF00: 10000006 beq $zero, $zero, 0xBFC3CF1C */ - uint32_t psx_brA_BFC3CF00 = cpu->gpr[0]; uint32_t psx_brB_BFC3CF00 = cpu->gpr[0]; - psx_taken_BFC3CF00 = (psx_brA_BFC3CF00 == psx_brB_BFC3CF00); - psx_delay_BFC3CF00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F04u); -#endif - if (psx_delay_BFC3CF00) { - psx_delay_BFC3CF00 = 0; - if (psx_taken_BFC3CF00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F1Cu); - goto label_BFC3CF1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F08u); - } -label_BFC3CF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3CF08: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80054F08u); -#endif - /* 0xBFC3CF0C: 8CA597A0 lw $a1, -26720($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80054F0Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA597A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F10u); -#endif - /* 0xBFC3CF10: 948F0004 lhu $t7, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F10u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3CF18: A4AF01C0 sh $t7, 448($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (448)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F18u); return; } g_debug_last_store_pc = 0x80054F18u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01C0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F18u); -#endif -label_BFC3CF1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CF1C: 14600004 bne $v1, $zero, 0xBFC3CF30 */ - uint32_t psx_brA_BFC3CF1C = cpu->gpr[3]; uint32_t psx_brB_BFC3CF1C = cpu->gpr[0]; - psx_taken_BFC3CF1C = (psx_brA_BFC3CF1C != psx_brB_BFC3CF1C); - psx_delay_BFC3CF1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F20u); -#endif - if (psx_delay_BFC3CF1C) { - psx_delay_BFC3CF1C = 0; - if (psx_taken_BFC3CF1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F30u); - goto label_BFC3CF30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F24u); - } -label_BFC3CF24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3CF24: 30580002 andi $t8, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x2u; - PGXP_ALU(0x30580002u, cpu->gpr[24], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80054F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3CF28: 13000004 beq $t8, $zero, 0xBFC3CF3C */ - uint32_t psx_brA_BFC3CF28 = cpu->gpr[24]; uint32_t psx_brB_BFC3CF28 = cpu->gpr[0]; - psx_taken_BFC3CF28 = (psx_brA_BFC3CF28 == psx_brB_BFC3CF28); - psx_delay_BFC3CF28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F2Cu); -#endif - if (psx_delay_BFC3CF28) { - psx_delay_BFC3CF28 = 0; - if (psx_taken_BFC3CF28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F3Cu); - goto label_BFC3CF3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F30u); - } -label_BFC3CF30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F30u); -#endif - /* 0xBFC3CF30: 94990006 lhu $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F30u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3CF38: A4B901C2 sh $t9, 450($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 450; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (450)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F38u); return; } g_debug_last_store_pc = 0x80054F38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901C2u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F38u); -#endif -label_BFC3CF3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CF3C: 14600004 bne $v1, $zero, 0xBFC3CF50 */ - uint32_t psx_brA_BFC3CF3C = cpu->gpr[3]; uint32_t psx_brB_BFC3CF3C = cpu->gpr[0]; - psx_taken_BFC3CF3C = (psx_brA_BFC3CF3C != psx_brB_BFC3CF3C); - psx_delay_BFC3CF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F40u); -#endif - if (psx_delay_BFC3CF3C) { - psx_delay_BFC3CF3C = 0; - if (psx_taken_BFC3CF3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F50u); - goto label_BFC3CF50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F44u); - } -label_BFC3CF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3CF44: 30480004 andi $t0, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30480004u, cpu->gpr[8], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80054F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3CF48: 11000004 beq $t0, $zero, 0xBFC3CF5C */ - uint32_t psx_brA_BFC3CF48 = cpu->gpr[8]; uint32_t psx_brB_BFC3CF48 = cpu->gpr[0]; - psx_taken_BFC3CF48 = (psx_brA_BFC3CF48 == psx_brB_BFC3CF48); - psx_delay_BFC3CF48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F4Cu); -#endif - if (psx_delay_BFC3CF48) { - psx_delay_BFC3CF48 = 0; - if (psx_taken_BFC3CF48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F5Cu); - goto label_BFC3CF5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F50u); - } -label_BFC3CF50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F50u); -#endif - /* 0xBFC3CF50: 94890008 lhu $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F50u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF54: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3CF58: A4A901C4 sh $t1, 452($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (452)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F58u); return; } g_debug_last_store_pc = 0x80054F58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901C4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F58u); -#endif -label_BFC3CF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CF5C: 14600004 bne $v1, $zero, 0xBFC3CF70 */ - uint32_t psx_brA_BFC3CF5C = cpu->gpr[3]; uint32_t psx_brB_BFC3CF5C = cpu->gpr[0]; - psx_taken_BFC3CF5C = (psx_brA_BFC3CF5C != psx_brB_BFC3CF5C); - psx_delay_BFC3CF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F60u); -#endif - if (psx_delay_BFC3CF5C) { - psx_delay_BFC3CF5C = 0; - if (psx_taken_BFC3CF5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F70u); - goto label_BFC3CF70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F64u); - } -label_BFC3CF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3CF64: 304A0008 andi $t2, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304A0008u, cpu->gpr[10], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80054F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3CF68: 11400004 beq $t2, $zero, 0xBFC3CF7C */ - uint32_t psx_brA_BFC3CF68 = cpu->gpr[10]; uint32_t psx_brB_BFC3CF68 = cpu->gpr[0]; - psx_taken_BFC3CF68 = (psx_brA_BFC3CF68 == psx_brB_BFC3CF68); - psx_delay_BFC3CF68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F6Cu); -#endif - if (psx_delay_BFC3CF68) { - psx_delay_BFC3CF68 = 0; - if (psx_taken_BFC3CF68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F7Cu); - goto label_BFC3CF7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F70u); - } -label_BFC3CF70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F70u); -#endif - /* 0xBFC3CF70: 948B000A lhu $t3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F70u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3CF78: A4AB01C6 sh $t3, 454($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 454; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (454)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F78u); return; } g_debug_last_store_pc = 0x80054F78u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01C6u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F78u); -#endif -label_BFC3CF7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CF7C: 14600004 bne $v1, $zero, 0xBFC3CF90 */ - uint32_t psx_brA_BFC3CF7C = cpu->gpr[3]; uint32_t psx_brB_BFC3CF7C = cpu->gpr[0]; - psx_taken_BFC3CF7C = (psx_brA_BFC3CF7C != psx_brB_BFC3CF7C); - psx_delay_BFC3CF7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F80u); -#endif - if (psx_delay_BFC3CF7C) { - psx_delay_BFC3CF7C = 0; - if (psx_taken_BFC3CF7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F90u); - goto label_BFC3CF90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F84u); - } -label_BFC3CF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3CF84: 304C0010 andi $t4, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80054F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3CF88: 11800004 beq $t4, $zero, 0xBFC3CF9C */ - uint32_t psx_brA_BFC3CF88 = cpu->gpr[12]; uint32_t psx_brB_BFC3CF88 = cpu->gpr[0]; - psx_taken_BFC3CF88 = (psx_brA_BFC3CF88 == psx_brB_BFC3CF88); - psx_delay_BFC3CF88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F8Cu); -#endif - if (psx_delay_BFC3CF88) { - psx_delay_BFC3CF88 = 0; - if (psx_taken_BFC3CF88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F9Cu); - goto label_BFC3CF9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054F90u); - } -label_BFC3CF90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F90u); -#endif - /* 0xBFC3CF90: 948D000C lhu $t5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F90u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CF94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3CF98: A4AD01C8 sh $t5, 456($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (456)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054F98u); return; } g_debug_last_store_pc = 0x80054F98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01C8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80054F98u); -#endif -label_BFC3CF9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CF9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CF9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CF9C: 14600004 bne $v1, $zero, 0xBFC3CFB0 */ - uint32_t psx_brA_BFC3CF9C = cpu->gpr[3]; uint32_t psx_brB_BFC3CF9C = cpu->gpr[0]; - psx_taken_BFC3CF9C = (psx_brA_BFC3CF9C != psx_brB_BFC3CF9C); - psx_delay_BFC3CF9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FA0u); -#endif - if (psx_delay_BFC3CF9C) { - psx_delay_BFC3CF9C = 0; - if (psx_taken_BFC3CF9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FB0u); - goto label_BFC3CFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FA4u); - } -label_BFC3CFA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3CFA4: 304E0020 andi $t6, $v0, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x20u; - PGXP_ALU(0x304E0020u, cpu->gpr[14], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80054FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3CFA8: 11C00004 beq $t6, $zero, 0xBFC3CFBC */ - uint32_t psx_brA_BFC3CFA8 = cpu->gpr[14]; uint32_t psx_brB_BFC3CFA8 = cpu->gpr[0]; - psx_taken_BFC3CFA8 = (psx_brA_BFC3CFA8 == psx_brB_BFC3CFA8); - psx_delay_BFC3CFA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FACu); -#endif - if (psx_delay_BFC3CFA8) { - psx_delay_BFC3CFA8 = 0; - if (psx_taken_BFC3CFA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FBCu); - goto label_BFC3CFBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FB0u); - } -label_BFC3CFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FB0u); -#endif - /* 0xBFC3CFB0: 948F000E lhu $t7, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FB0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3CFB8: A4AF01CA sh $t7, 458($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 458; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (458)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FB8u); return; } g_debug_last_store_pc = 0x80054FB8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01CAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FB8u); -#endif -label_BFC3CFBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CFBC: 14600004 bne $v1, $zero, 0xBFC3CFD0 */ - uint32_t psx_brA_BFC3CFBC = cpu->gpr[3]; uint32_t psx_brB_BFC3CFBC = cpu->gpr[0]; - psx_taken_BFC3CFBC = (psx_brA_BFC3CFBC != psx_brB_BFC3CFBC); - psx_delay_BFC3CFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FC0u); -#endif - if (psx_delay_BFC3CFBC) { - psx_delay_BFC3CFBC = 0; - if (psx_taken_BFC3CFBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FD0u); - goto label_BFC3CFD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FC4u); - } -label_BFC3CFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3CFC4: 30580040 andi $t8, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x30580040u, cpu->gpr[24], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80054FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3CFC8: 13000004 beq $t8, $zero, 0xBFC3CFDC */ - uint32_t psx_brA_BFC3CFC8 = cpu->gpr[24]; uint32_t psx_brB_BFC3CFC8 = cpu->gpr[0]; - psx_taken_BFC3CFC8 = (psx_brA_BFC3CFC8 == psx_brB_BFC3CFC8); - psx_delay_BFC3CFC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FCCu); -#endif - if (psx_delay_BFC3CFC8) { - psx_delay_BFC3CFC8 = 0; - if (psx_taken_BFC3CFC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FDCu); - goto label_BFC3CFDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FD0u); - } -label_BFC3CFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FD0u); -#endif - /* 0xBFC3CFD0: 94990010 lhu $t9, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FD0u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3CFD8: A4B901CC sh $t9, 460($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 460; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (460)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FD8u); return; } g_debug_last_store_pc = 0x80054FD8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901CCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FD8u); -#endif -label_BFC3CFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CFDC: 14600004 bne $v1, $zero, 0xBFC3CFF0 */ - uint32_t psx_brA_BFC3CFDC = cpu->gpr[3]; uint32_t psx_brB_BFC3CFDC = cpu->gpr[0]; - psx_taken_BFC3CFDC = (psx_brA_BFC3CFDC != psx_brB_BFC3CFDC); - psx_delay_BFC3CFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FE0u); -#endif - if (psx_delay_BFC3CFDC) { - psx_delay_BFC3CFDC = 0; - if (psx_taken_BFC3CFDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FF0u); - goto label_BFC3CFF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FE4u); - } -label_BFC3CFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3CFE4: 30480080 andi $t0, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x30480080u, cpu->gpr[8], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80054FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3CFE8: 11000004 beq $t0, $zero, 0xBFC3CFFC */ - uint32_t psx_brA_BFC3CFE8 = cpu->gpr[8]; uint32_t psx_brB_BFC3CFE8 = cpu->gpr[0]; - psx_taken_BFC3CFE8 = (psx_brA_BFC3CFE8 == psx_brB_BFC3CFE8); - psx_delay_BFC3CFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FECu); -#endif - if (psx_delay_BFC3CFE8) { - psx_delay_BFC3CFE8 = 0; - if (psx_taken_BFC3CFE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FFCu); - goto label_BFC3CFFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054FF0u); - } -label_BFC3CFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FF0u); -#endif - /* 0xBFC3CFF0: 94890012 lhu $t1, 18($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 18; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FF0u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890012u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3CFF4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80054FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3CFF8: A4A901CE sh $t1, 462($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 462; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (462)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80054FF8u); return; } g_debug_last_store_pc = 0x80054FF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901CEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80054FF8u); -#endif -label_BFC3CFFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3CFFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3CFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80054FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3CFFC: 14600004 bne $v1, $zero, 0xBFC3D010 */ - uint32_t psx_brA_BFC3CFFC = cpu->gpr[3]; uint32_t psx_brB_BFC3CFFC = cpu->gpr[0]; - psx_taken_BFC3CFFC = (psx_brA_BFC3CFFC != psx_brB_BFC3CFFC); - psx_delay_BFC3CFFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D000: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055000u); -#endif - if (psx_delay_BFC3CFFC) { - psx_delay_BFC3CFFC = 0; - if (psx_taken_BFC3CFFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055010u); - goto label_BFC3D010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055004u); - } -label_BFC3D004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3D004: 304A0100 andi $t2, $v0, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x100u; - PGXP_ALU(0x304A0100u, cpu->gpr[10], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80055004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D008: 11400004 beq $t2, $zero, 0xBFC3D01C */ - uint32_t psx_brA_BFC3D008 = cpu->gpr[10]; uint32_t psx_brB_BFC3D008 = cpu->gpr[0]; - psx_taken_BFC3D008 = (psx_brA_BFC3D008 == psx_brB_BFC3D008); - psx_delay_BFC3D008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D00C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005500Cu); -#endif - if (psx_delay_BFC3D008) { - psx_delay_BFC3D008 = 0; - if (psx_taken_BFC3D008) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005501Cu); - goto label_BFC3D01C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055010u); - } -label_BFC3D010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055010u); -#endif - /* 0xBFC3D010: 948B0014 lhu $t3, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055010u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B0014u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D014: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D018: A4AB01D0 sh $t3, 464($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 464; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (464)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055018u); return; } g_debug_last_store_pc = 0x80055018u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01D0u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055018u); -#endif -label_BFC3D01C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D01Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D01Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005501Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D01C: 14600004 bne $v1, $zero, 0xBFC3D030 */ - uint32_t psx_brA_BFC3D01C = cpu->gpr[3]; uint32_t psx_brB_BFC3D01C = cpu->gpr[0]; - psx_taken_BFC3D01C = (psx_brA_BFC3D01C != psx_brB_BFC3D01C); - psx_delay_BFC3D01C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D020: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055020u); -#endif - if (psx_delay_BFC3D01C) { - psx_delay_BFC3D01C = 0; - if (psx_taken_BFC3D01C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055030u); - goto label_BFC3D030; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055024u); - } -label_BFC3D024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D024: 304C0200 andi $t4, $v0, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x200u; - PGXP_ALU(0x304C0200u, cpu->gpr[12], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x80055024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D028: 11800004 beq $t4, $zero, 0xBFC3D03C */ - uint32_t psx_brA_BFC3D028 = cpu->gpr[12]; uint32_t psx_brB_BFC3D028 = cpu->gpr[0]; - psx_taken_BFC3D028 = (psx_brA_BFC3D028 == psx_brB_BFC3D028); - psx_delay_BFC3D028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D02C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005502Cu); -#endif - if (psx_delay_BFC3D028) { - psx_delay_BFC3D028 = 0; - if (psx_taken_BFC3D028) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005503Cu); - goto label_BFC3D03C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055030u); - } -label_BFC3D030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055030u); -#endif - /* 0xBFC3D030: 948D0016 lhu $t5, 22($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 22; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055030u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D0016u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D034: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D038: A4AD01D2 sh $t5, 466($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 466; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (466)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055038u); return; } g_debug_last_store_pc = 0x80055038u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01D2u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055038u); -#endif -label_BFC3D03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005503Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D03C: 14600004 bne $v1, $zero, 0xBFC3D050 */ - uint32_t psx_brA_BFC3D03C = cpu->gpr[3]; uint32_t psx_brB_BFC3D03C = cpu->gpr[0]; - psx_taken_BFC3D03C = (psx_brA_BFC3D03C != psx_brB_BFC3D03C); - psx_delay_BFC3D03C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D040: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055040u); -#endif - if (psx_delay_BFC3D03C) { - psx_delay_BFC3D03C = 0; - if (psx_taken_BFC3D03C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055050u); - goto label_BFC3D050; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055044u); - } -label_BFC3D044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3D044: 304E0400 andi $t6, $v0, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x400u; - PGXP_ALU(0x304E0400u, cpu->gpr[14], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80055044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D048: 11C00004 beq $t6, $zero, 0xBFC3D05C */ - uint32_t psx_brA_BFC3D048 = cpu->gpr[14]; uint32_t psx_brB_BFC3D048 = cpu->gpr[0]; - psx_taken_BFC3D048 = (psx_brA_BFC3D048 == psx_brB_BFC3D048); - psx_delay_BFC3D048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D04C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005504Cu); -#endif - if (psx_delay_BFC3D048) { - psx_delay_BFC3D048 = 0; - if (psx_taken_BFC3D048) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005505Cu); - goto label_BFC3D05C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055050u); - } -label_BFC3D050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055050u); -#endif - /* 0xBFC3D050: 948F0018 lhu $t7, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055050u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D054: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D058: A4AF01D4 sh $t7, 468($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 468; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (468)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055058u); return; } g_debug_last_store_pc = 0x80055058u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01D4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055058u); -#endif -label_BFC3D05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005505Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D05C: 14600004 bne $v1, $zero, 0xBFC3D070 */ - uint32_t psx_brA_BFC3D05C = cpu->gpr[3]; uint32_t psx_brB_BFC3D05C = cpu->gpr[0]; - psx_taken_BFC3D05C = (psx_brA_BFC3D05C != psx_brB_BFC3D05C); - psx_delay_BFC3D05C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055060u); -#endif - if (psx_delay_BFC3D05C) { - psx_delay_BFC3D05C = 0; - if (psx_taken_BFC3D05C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055070u); - goto label_BFC3D070; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055064u); - } -label_BFC3D064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3D064: 30580800 andi $t8, $v0, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x800u; - PGXP_ALU(0x30580800u, cpu->gpr[24], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80055064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D068: 13000004 beq $t8, $zero, 0xBFC3D07C */ - uint32_t psx_brA_BFC3D068 = cpu->gpr[24]; uint32_t psx_brB_BFC3D068 = cpu->gpr[0]; - psx_taken_BFC3D068 = (psx_brA_BFC3D068 == psx_brB_BFC3D068); - psx_delay_BFC3D068 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D06C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005506Cu); -#endif - if (psx_delay_BFC3D068) { - psx_delay_BFC3D068 = 0; - if (psx_taken_BFC3D068) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005507Cu); - goto label_BFC3D07C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055070u); - } -label_BFC3D070: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D070u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055070u); -#endif - /* 0xBFC3D070: 9499001A lhu $t9, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055070u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x9499001Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D078: A4B901D6 sh $t9, 470($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 470; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (470)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055078u); return; } g_debug_last_store_pc = 0x80055078u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901D6u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055078u); -#endif -label_BFC3D07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005507Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D07C: 14600004 bne $v1, $zero, 0xBFC3D090 */ - uint32_t psx_brA_BFC3D07C = cpu->gpr[3]; uint32_t psx_brB_BFC3D07C = cpu->gpr[0]; - psx_taken_BFC3D07C = (psx_brA_BFC3D07C != psx_brB_BFC3D07C); - psx_delay_BFC3D07C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D080: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055080u); -#endif - if (psx_delay_BFC3D07C) { - psx_delay_BFC3D07C = 0; - if (psx_taken_BFC3D07C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055090u); - goto label_BFC3D090; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055084u); - } -label_BFC3D084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3D084: 30481000 andi $t0, $v0, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x1000u; - PGXP_ALU(0x30481000u, cpu->gpr[8], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80055084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D088: 11000004 beq $t0, $zero, 0xBFC3D09C */ - uint32_t psx_brA_BFC3D088 = cpu->gpr[8]; uint32_t psx_brB_BFC3D088 = cpu->gpr[0]; - psx_taken_BFC3D088 = (psx_brA_BFC3D088 == psx_brB_BFC3D088); - psx_delay_BFC3D088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D08C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005508Cu); -#endif - if (psx_delay_BFC3D088) { - psx_delay_BFC3D088 = 0; - if (psx_taken_BFC3D088) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005509Cu); - goto label_BFC3D09C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055090u); - } -label_BFC3D090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055090u); -#endif - /* 0xBFC3D090: 9489001C lhu $t1, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055090u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x9489001Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D098: A4A901D8 sh $t1, 472($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (472)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055098u); return; } g_debug_last_store_pc = 0x80055098u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901D8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055098u); -#endif -label_BFC3D09C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D09Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005509Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D09C: 14600004 bne $v1, $zero, 0xBFC3D0B0 */ - uint32_t psx_brA_BFC3D09C = cpu->gpr[3]; uint32_t psx_brB_BFC3D09C = cpu->gpr[0]; - psx_taken_BFC3D09C = (psx_brA_BFC3D09C != psx_brB_BFC3D09C); - psx_delay_BFC3D09C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550A0u); -#endif - if (psx_delay_BFC3D09C) { - psx_delay_BFC3D09C = 0; - if (psx_taken_BFC3D09C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550B0u); - goto label_BFC3D0B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550A4u); - } -label_BFC3D0A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3D0A4: 304A2000 andi $t2, $v0, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x2000u; - PGXP_ALU(0x304A2000u, cpu->gpr[10], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x800550A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D0A8: 11400004 beq $t2, $zero, 0xBFC3D0BC */ - uint32_t psx_brA_BFC3D0A8 = cpu->gpr[10]; uint32_t psx_brB_BFC3D0A8 = cpu->gpr[0]; - psx_taken_BFC3D0A8 = (psx_brA_BFC3D0A8 == psx_brB_BFC3D0A8); - psx_delay_BFC3D0A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550ACu); -#endif - if (psx_delay_BFC3D0A8) { - psx_delay_BFC3D0A8 = 0; - if (psx_taken_BFC3D0A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550BCu); - goto label_BFC3D0BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550B0u); - } -label_BFC3D0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550B0u); -#endif - /* 0xBFC3D0B0: 948B001E lhu $t3, 30($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (30)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550B0u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B001Eu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800550B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D0B8: A4AB01DA sh $t3, 474($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 474; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (474)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550B8u); return; } g_debug_last_store_pc = 0x800550B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01DAu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800550B8u); -#endif -label_BFC3D0BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D0BC: 14600004 bne $v1, $zero, 0xBFC3D0D0 */ - uint32_t psx_brA_BFC3D0BC = cpu->gpr[3]; uint32_t psx_brB_BFC3D0BC = cpu->gpr[0]; - psx_taken_BFC3D0BC = (psx_brA_BFC3D0BC != psx_brB_BFC3D0BC); - psx_delay_BFC3D0BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550C0u); -#endif - if (psx_delay_BFC3D0BC) { - psx_delay_BFC3D0BC = 0; - if (psx_taken_BFC3D0BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550D0u); - goto label_BFC3D0D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550C4u); - } -label_BFC3D0C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D0C4: 304C4000 andi $t4, $v0, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4000u; - PGXP_ALU(0x304C4000u, cpu->gpr[12], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x800550C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D0C8: 11800004 beq $t4, $zero, 0xBFC3D0DC */ - uint32_t psx_brA_BFC3D0C8 = cpu->gpr[12]; uint32_t psx_brB_BFC3D0C8 = cpu->gpr[0]; - psx_taken_BFC3D0C8 = (psx_brA_BFC3D0C8 == psx_brB_BFC3D0C8); - psx_delay_BFC3D0C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550CCu); -#endif - if (psx_delay_BFC3D0C8) { - psx_delay_BFC3D0C8 = 0; - if (psx_taken_BFC3D0C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550DCu); - goto label_BFC3D0DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550D0u); - } -label_BFC3D0D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550D0u); -#endif - /* 0xBFC3D0D0: 948D0020 lhu $t5, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550D0u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D0020u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800550D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D0D8: A4AD01DC sh $t5, 476($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (476)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550D8u); return; } g_debug_last_store_pc = 0x800550D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01DCu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800550D8u); -#endif -label_BFC3D0DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D0DC: 14600004 bne $v1, $zero, 0xBFC3D0F0 */ - uint32_t psx_brA_BFC3D0DC = cpu->gpr[3]; uint32_t psx_brB_BFC3D0DC = cpu->gpr[0]; - psx_taken_BFC3D0DC = (psx_brA_BFC3D0DC != psx_brB_BFC3D0DC); - psx_delay_BFC3D0DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550E0u); -#endif - if (psx_delay_BFC3D0DC) { - psx_delay_BFC3D0DC = 0; - if (psx_taken_BFC3D0DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550F0u); - goto label_BFC3D0F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550E4u); - } -label_BFC3D0E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3D0E4: 304E8000 andi $t6, $v0, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x8000u; - PGXP_ALU(0x304E8000u, cpu->gpr[14], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x800550E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D0E8: 11C00004 beq $t6, $zero, 0xBFC3D0FC */ - uint32_t psx_brA_BFC3D0E8 = cpu->gpr[14]; uint32_t psx_brB_BFC3D0E8 = cpu->gpr[0]; - psx_taken_BFC3D0E8 = (psx_brA_BFC3D0E8 == psx_brB_BFC3D0E8); - psx_delay_BFC3D0E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550ECu); -#endif - if (psx_delay_BFC3D0E8) { - psx_delay_BFC3D0E8 = 0; - if (psx_taken_BFC3D0E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550FCu); - goto label_BFC3D0FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800550F0u); - } -label_BFC3D0F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550F0u); -#endif - /* 0xBFC3D0F0: 948F0022 lhu $t7, 34($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 34; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (34)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550F0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0022u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800550F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D0F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800550F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D0F8: A4AF01DE sh $t7, 478($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 478; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (478)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800550F8u); return; } g_debug_last_store_pc = 0x800550F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01DEu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800550F8u); -#endif -label_BFC3D0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800550FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D0FC: 14600004 bne $v1, $zero, 0xBFC3D110 */ - uint32_t psx_brA_BFC3D0FC = cpu->gpr[3]; uint32_t psx_brB_BFC3D0FC = cpu->gpr[0]; - psx_taken_BFC3D0FC = (psx_brA_BFC3D0FC != psx_brB_BFC3D0FC); - psx_delay_BFC3D0FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D100: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055100u); -#endif - if (psx_delay_BFC3D0FC) { - psx_delay_BFC3D0FC = 0; - if (psx_taken_BFC3D0FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055110u); - goto label_BFC3D110; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055104u); - } -label_BFC3D104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3D104: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D108: 13000004 beq $t8, $zero, 0xBFC3D11C */ - uint32_t psx_brA_BFC3D108 = cpu->gpr[24]; uint32_t psx_brB_BFC3D108 = cpu->gpr[0]; - psx_taken_BFC3D108 = (psx_brA_BFC3D108 == psx_brB_BFC3D108); - psx_delay_BFC3D108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D10C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005510Cu); -#endif - if (psx_delay_BFC3D108) { - psx_delay_BFC3D108 = 0; - if (psx_taken_BFC3D108) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005511Cu); - goto label_BFC3D11C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055110u); - } -label_BFC3D110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055110u); -#endif - /* 0xBFC3D110: 94990024 lhu $t9, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055110u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990024u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D114: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D118: A4B901E0 sh $t9, 480($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 480; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (480)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055118u); return; } g_debug_last_store_pc = 0x80055118u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901E0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055118u); -#endif -label_BFC3D11C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D11Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D11Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005511Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D11C: 14600004 bne $v1, $zero, 0xBFC3D130 */ - uint32_t psx_brA_BFC3D11C = cpu->gpr[3]; uint32_t psx_brB_BFC3D11C = cpu->gpr[0]; - psx_taken_BFC3D11C = (psx_brA_BFC3D11C != psx_brB_BFC3D11C); - psx_delay_BFC3D11C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D120: 3C010002 lui $at, 0x2 */ - cpu->gpr[1] = 0x00020000u; - PGXP_ALU(0x3C010002u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055120u); -#endif - if (psx_delay_BFC3D11C) { - psx_delay_BFC3D11C = 0; - if (psx_taken_BFC3D11C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055130u); - goto label_BFC3D130; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055124u); - } -label_BFC3D124: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D124u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC3D124: 00414024 and $t0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D128: 11000004 beq $t0, $zero, 0xBFC3D13C */ - uint32_t psx_brA_BFC3D128 = cpu->gpr[8]; uint32_t psx_brB_BFC3D128 = cpu->gpr[0]; - psx_taken_BFC3D128 = (psx_brA_BFC3D128 == psx_brB_BFC3D128); - psx_delay_BFC3D128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D12C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005512Cu); -#endif - if (psx_delay_BFC3D128) { - psx_delay_BFC3D128 = 0; - if (psx_taken_BFC3D128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005513Cu); - goto label_BFC3D13C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055130u); - } -label_BFC3D130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055130u); -#endif - /* 0xBFC3D130: 94890026 lhu $t1, 38($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 38; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055130u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890026u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D138: A4A901E2 sh $t1, 482($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 482; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (482)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055138u); return; } g_debug_last_store_pc = 0x80055138u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901E2u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055138u); -#endif -label_BFC3D13C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D13Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D13Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005513Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D13C: 14600004 bne $v1, $zero, 0xBFC3D150 */ - uint32_t psx_brA_BFC3D13C = cpu->gpr[3]; uint32_t psx_brB_BFC3D13C = cpu->gpr[0]; - psx_taken_BFC3D13C = (psx_brA_BFC3D13C != psx_brB_BFC3D13C); - psx_delay_BFC3D13C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D140: 3C010004 lui $at, 0x4 */ - cpu->gpr[1] = 0x00040000u; - PGXP_ALU(0x3C010004u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055140u); -#endif - if (psx_delay_BFC3D13C) { - psx_delay_BFC3D13C = 0; - if (psx_taken_BFC3D13C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055150u); - goto label_BFC3D150; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055144u); - } -label_BFC3D144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC3D144: 00415024 and $t2, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D148: 11400004 beq $t2, $zero, 0xBFC3D15C */ - uint32_t psx_brA_BFC3D148 = cpu->gpr[10]; uint32_t psx_brB_BFC3D148 = cpu->gpr[0]; - psx_taken_BFC3D148 = (psx_brA_BFC3D148 == psx_brB_BFC3D148); - psx_delay_BFC3D148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D14C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005514Cu); -#endif - if (psx_delay_BFC3D148) { - psx_delay_BFC3D148 = 0; - if (psx_taken_BFC3D148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005515Cu); - goto label_BFC3D15C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055150u); - } -label_BFC3D150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055150u); -#endif - /* 0xBFC3D150: 948B0028 lhu $t3, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055150u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D154: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D158: A4AB01E4 sh $t3, 484($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 484; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (484)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055158u); return; } g_debug_last_store_pc = 0x80055158u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01E4u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055158u); -#endif -label_BFC3D15C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D15Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D15Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005515Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D15C: 14600004 bne $v1, $zero, 0xBFC3D170 */ - uint32_t psx_brA_BFC3D15C = cpu->gpr[3]; uint32_t psx_brB_BFC3D15C = cpu->gpr[0]; - psx_taken_BFC3D15C = (psx_brA_BFC3D15C != psx_brB_BFC3D15C); - psx_delay_BFC3D15C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D160: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055160u); -#endif - if (psx_delay_BFC3D15C) { - psx_delay_BFC3D15C = 0; - if (psx_taken_BFC3D15C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055170u); - goto label_BFC3D170; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055164u); - } -label_BFC3D164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC3D164: 00416024 and $t4, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D168: 11800004 beq $t4, $zero, 0xBFC3D17C */ - uint32_t psx_brA_BFC3D168 = cpu->gpr[12]; uint32_t psx_brB_BFC3D168 = cpu->gpr[0]; - psx_taken_BFC3D168 = (psx_brA_BFC3D168 == psx_brB_BFC3D168); - psx_delay_BFC3D168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D16C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005516Cu); -#endif - if (psx_delay_BFC3D168) { - psx_delay_BFC3D168 = 0; - if (psx_taken_BFC3D168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005517Cu); - goto label_BFC3D17C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055170u); - } -label_BFC3D170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055170u); -#endif - /* 0xBFC3D170: 948D002A lhu $t5, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055170u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D002Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D178: A4AD01E6 sh $t5, 486($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 486; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (486)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055178u); return; } g_debug_last_store_pc = 0x80055178u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01E6u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055178u); -#endif -label_BFC3D17C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D17Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005517Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D17C: 14600004 bne $v1, $zero, 0xBFC3D190 */ - uint32_t psx_brA_BFC3D17C = cpu->gpr[3]; uint32_t psx_brB_BFC3D17C = cpu->gpr[0]; - psx_taken_BFC3D17C = (psx_brA_BFC3D17C != psx_brB_BFC3D17C); - psx_delay_BFC3D17C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D180: 3C010010 lui $at, 0x10 */ - cpu->gpr[1] = 0x00100000u; - PGXP_ALU(0x3C010010u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055180u); -#endif - if (psx_delay_BFC3D17C) { - psx_delay_BFC3D17C = 0; - if (psx_taken_BFC3D17C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055190u); - goto label_BFC3D190; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055184u); - } -label_BFC3D184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC3D184: 00417024 and $t6, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D188: 11C00004 beq $t6, $zero, 0xBFC3D19C */ - uint32_t psx_brA_BFC3D188 = cpu->gpr[14]; uint32_t psx_brB_BFC3D188 = cpu->gpr[0]; - psx_taken_BFC3D188 = (psx_brA_BFC3D188 == psx_brB_BFC3D188); - psx_delay_BFC3D188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D18C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005518Cu); -#endif - if (psx_delay_BFC3D188) { - psx_delay_BFC3D188 = 0; - if (psx_taken_BFC3D188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005519Cu); - goto label_BFC3D19C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055190u); - } -label_BFC3D190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055190u); -#endif - /* 0xBFC3D190: 948F002C lhu $t7, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055190u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D194: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D198: A4AF01E8 sh $t7, 488($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (488)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055198u); return; } g_debug_last_store_pc = 0x80055198u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01E8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055198u); -#endif -label_BFC3D19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005519Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D19C: 14600004 bne $v1, $zero, 0xBFC3D1B0 */ - uint32_t psx_brA_BFC3D19C = cpu->gpr[3]; uint32_t psx_brB_BFC3D19C = cpu->gpr[0]; - psx_taken_BFC3D19C = (psx_brA_BFC3D19C != psx_brB_BFC3D19C); - psx_delay_BFC3D19C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D1A0: 3C010020 lui $at, 0x20 */ - cpu->gpr[1] = 0x00200000u; - PGXP_ALU(0x3C010020u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800551A0u); -#endif - if (psx_delay_BFC3D19C) { - psx_delay_BFC3D19C = 0; - if (psx_taken_BFC3D19C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551B0u); - goto label_BFC3D1B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551A4u); - } -label_BFC3D1A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3D1A4: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800551A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D1A8: 13000004 beq $t8, $zero, 0xBFC3D1BC */ - uint32_t psx_brA_BFC3D1A8 = cpu->gpr[24]; uint32_t psx_brB_BFC3D1A8 = cpu->gpr[0]; - psx_taken_BFC3D1A8 = (psx_brA_BFC3D1A8 == psx_brB_BFC3D1A8); - psx_delay_BFC3D1A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551ACu); -#endif - if (psx_delay_BFC3D1A8) { - psx_delay_BFC3D1A8 = 0; - if (psx_taken_BFC3D1A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551BCu); - goto label_BFC3D1BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551B0u); - } -label_BFC3D1B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551B0u); -#endif - /* 0xBFC3D1B0: 9499002E lhu $t9, 46($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 46; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (46)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551B0u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x9499002Eu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800551B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D1B8: A4B901EA sh $t9, 490($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 490; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (490)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551B8u); return; } g_debug_last_store_pc = 0x800551B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901EAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800551B8u); -#endif -label_BFC3D1BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D1BC: 14600004 bne $v1, $zero, 0xBFC3D1D0 */ - uint32_t psx_brA_BFC3D1BC = cpu->gpr[3]; uint32_t psx_brB_BFC3D1BC = cpu->gpr[0]; - psx_taken_BFC3D1BC = (psx_brA_BFC3D1BC != psx_brB_BFC3D1BC); - psx_delay_BFC3D1BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D1C0: 3C010040 lui $at, 0x40 */ - cpu->gpr[1] = 0x00400000u; - PGXP_ALU(0x3C010040u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800551C0u); -#endif - if (psx_delay_BFC3D1BC) { - psx_delay_BFC3D1BC = 0; - if (psx_taken_BFC3D1BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551D0u); - goto label_BFC3D1D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551C4u); - } -label_BFC3D1C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC3D1C4: 00414024 and $t0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800551C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D1C8: 11000004 beq $t0, $zero, 0xBFC3D1DC */ - uint32_t psx_brA_BFC3D1C8 = cpu->gpr[8]; uint32_t psx_brB_BFC3D1C8 = cpu->gpr[0]; - psx_taken_BFC3D1C8 = (psx_brA_BFC3D1C8 == psx_brB_BFC3D1C8); - psx_delay_BFC3D1C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551CCu); -#endif - if (psx_delay_BFC3D1C8) { - psx_delay_BFC3D1C8 = 0; - if (psx_taken_BFC3D1C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551DCu); - goto label_BFC3D1DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551D0u); - } -label_BFC3D1D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551D0u); -#endif - /* 0xBFC3D1D0: 94890030 lhu $t1, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551D0u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890030u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800551D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D1D8: A4A901EC sh $t1, 492($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 492; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (492)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551D8u); return; } g_debug_last_store_pc = 0x800551D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901ECu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800551D8u); -#endif -label_BFC3D1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D1DC: 14600004 bne $v1, $zero, 0xBFC3D1F0 */ - uint32_t psx_brA_BFC3D1DC = cpu->gpr[3]; uint32_t psx_brB_BFC3D1DC = cpu->gpr[0]; - psx_taken_BFC3D1DC = (psx_brA_BFC3D1DC != psx_brB_BFC3D1DC); - psx_delay_BFC3D1DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D1E0: 3C010080 lui $at, 0x80 */ - cpu->gpr[1] = 0x00800000u; - PGXP_ALU(0x3C010080u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800551E0u); -#endif - if (psx_delay_BFC3D1DC) { - psx_delay_BFC3D1DC = 0; - if (psx_taken_BFC3D1DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551F0u); - goto label_BFC3D1F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551E4u); - } -label_BFC3D1E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC3D1E4: 00415024 and $t2, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800551E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D1E8: 11400004 beq $t2, $zero, 0xBFC3D1FC */ - uint32_t psx_brA_BFC3D1E8 = cpu->gpr[10]; uint32_t psx_brB_BFC3D1E8 = cpu->gpr[0]; - psx_taken_BFC3D1E8 = (psx_brA_BFC3D1E8 == psx_brB_BFC3D1E8); - psx_delay_BFC3D1E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551ECu); -#endif - if (psx_delay_BFC3D1E8) { - psx_delay_BFC3D1E8 = 0; - if (psx_taken_BFC3D1E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551FCu); - goto label_BFC3D1FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800551F0u); - } -label_BFC3D1F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551F0u); -#endif - /* 0xBFC3D1F0: 948B0032 lhu $t3, 50($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 50; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (50)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551F0u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B0032u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800551F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D1F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800551F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D1F8: A4AB01EE sh $t3, 494($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 494; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (494)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800551F8u); return; } g_debug_last_store_pc = 0x800551F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01EEu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800551F8u); -#endif -label_BFC3D1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800551FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D1FC: 14600004 bne $v1, $zero, 0xBFC3D210 */ - uint32_t psx_brA_BFC3D1FC = cpu->gpr[3]; uint32_t psx_brB_BFC3D1FC = cpu->gpr[0]; - psx_taken_BFC3D1FC = (psx_brA_BFC3D1FC != psx_brB_BFC3D1FC); - psx_delay_BFC3D1FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D200: 3C010100 lui $at, 0x100 */ - cpu->gpr[1] = 0x01000000u; - PGXP_ALU(0x3C010100u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055200u); -#endif - if (psx_delay_BFC3D1FC) { - psx_delay_BFC3D1FC = 0; - if (psx_taken_BFC3D1FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055210u); - goto label_BFC3D210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055204u); - } -label_BFC3D204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC3D204: 00416024 and $t4, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D208: 11800004 beq $t4, $zero, 0xBFC3D21C */ - uint32_t psx_brA_BFC3D208 = cpu->gpr[12]; uint32_t psx_brB_BFC3D208 = cpu->gpr[0]; - psx_taken_BFC3D208 = (psx_brA_BFC3D208 == psx_brB_BFC3D208); - psx_delay_BFC3D208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D20C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005520Cu); -#endif - if (psx_delay_BFC3D208) { - psx_delay_BFC3D208 = 0; - if (psx_taken_BFC3D208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005521Cu); - goto label_BFC3D21C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055210u); - } -label_BFC3D210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055210u); -#endif - /* 0xBFC3D210: 948D0034 lhu $t5, 52($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055210u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D0034u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D214: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D218: A4AD01F0 sh $t5, 496($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 496; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (496)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055218u); return; } g_debug_last_store_pc = 0x80055218u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01F0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055218u); -#endif -label_BFC3D21C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D21Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D21Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005521Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D21C: 14600004 bne $v1, $zero, 0xBFC3D230 */ - uint32_t psx_brA_BFC3D21C = cpu->gpr[3]; uint32_t psx_brB_BFC3D21C = cpu->gpr[0]; - psx_taken_BFC3D21C = (psx_brA_BFC3D21C != psx_brB_BFC3D21C); - psx_delay_BFC3D21C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D220: 3C010200 lui $at, 0x200 */ - cpu->gpr[1] = 0x02000000u; - PGXP_ALU(0x3C010200u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055220u); -#endif - if (psx_delay_BFC3D21C) { - psx_delay_BFC3D21C = 0; - if (psx_taken_BFC3D21C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055230u); - goto label_BFC3D230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055224u); - } -label_BFC3D224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC3D224: 00417024 and $t6, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D228: 11C00004 beq $t6, $zero, 0xBFC3D23C */ - uint32_t psx_brA_BFC3D228 = cpu->gpr[14]; uint32_t psx_brB_BFC3D228 = cpu->gpr[0]; - psx_taken_BFC3D228 = (psx_brA_BFC3D228 == psx_brB_BFC3D228); - psx_delay_BFC3D228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D22C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005522Cu); -#endif - if (psx_delay_BFC3D228) { - psx_delay_BFC3D228 = 0; - if (psx_taken_BFC3D228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005523Cu); - goto label_BFC3D23C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055230u); - } -label_BFC3D230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055230u); -#endif - /* 0xBFC3D230: 948F0036 lhu $t7, 54($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 54; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (54)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055230u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0036u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D234: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D238: A4AF01F2 sh $t7, 498($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 498; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (498)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055238u); return; } g_debug_last_store_pc = 0x80055238u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01F2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055238u); -#endif -label_BFC3D23C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D23Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005523Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D23C: 14600004 bne $v1, $zero, 0xBFC3D250 */ - uint32_t psx_brA_BFC3D23C = cpu->gpr[3]; uint32_t psx_brB_BFC3D23C = cpu->gpr[0]; - psx_taken_BFC3D23C = (psx_brA_BFC3D23C != psx_brB_BFC3D23C); - psx_delay_BFC3D23C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D240: 3C010400 lui $at, 0x400 */ - cpu->gpr[1] = 0x04000000u; - PGXP_ALU(0x3C010400u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055240u); -#endif - if (psx_delay_BFC3D23C) { - psx_delay_BFC3D23C = 0; - if (psx_taken_BFC3D23C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055250u); - goto label_BFC3D250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055244u); - } -label_BFC3D244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3D244: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D248: 13000004 beq $t8, $zero, 0xBFC3D25C */ - uint32_t psx_brA_BFC3D248 = cpu->gpr[24]; uint32_t psx_brB_BFC3D248 = cpu->gpr[0]; - psx_taken_BFC3D248 = (psx_brA_BFC3D248 == psx_brB_BFC3D248); - psx_delay_BFC3D248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D24C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005524Cu); -#endif - if (psx_delay_BFC3D248) { - psx_delay_BFC3D248 = 0; - if (psx_taken_BFC3D248) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005525Cu); - goto label_BFC3D25C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055250u); - } -label_BFC3D250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055250u); -#endif - /* 0xBFC3D250: 94990038 lhu $t9, 56($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (56)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055250u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990038u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D258: A4B901F4 sh $t9, 500($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 500; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (500)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055258u); return; } g_debug_last_store_pc = 0x80055258u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901F4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055258u); -#endif -label_BFC3D25C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D25Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D25Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005525Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D25C: 14600004 bne $v1, $zero, 0xBFC3D270 */ - uint32_t psx_brA_BFC3D25C = cpu->gpr[3]; uint32_t psx_brB_BFC3D25C = cpu->gpr[0]; - psx_taken_BFC3D25C = (psx_brA_BFC3D25C != psx_brB_BFC3D25C); - psx_delay_BFC3D25C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D260: 3C010800 lui $at, 0x800 */ - cpu->gpr[1] = 0x08000000u; - PGXP_ALU(0x3C010800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055260u); -#endif - if (psx_delay_BFC3D25C) { - psx_delay_BFC3D25C = 0; - if (psx_taken_BFC3D25C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055270u); - goto label_BFC3D270; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055264u); - } -label_BFC3D264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x106u); -#endif - /* 0xBFC3D264: 00414024 and $t0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00414024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D268: 11000004 beq $t0, $zero, 0xBFC3D27C */ - uint32_t psx_brA_BFC3D268 = cpu->gpr[8]; uint32_t psx_brB_BFC3D268 = cpu->gpr[0]; - psx_taken_BFC3D268 = (psx_brA_BFC3D268 == psx_brB_BFC3D268); - psx_delay_BFC3D268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D26C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005526Cu); -#endif - if (psx_delay_BFC3D268) { - psx_delay_BFC3D268 = 0; - if (psx_taken_BFC3D268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005527Cu); - goto label_BFC3D27C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055270u); - } -label_BFC3D270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055270u); -#endif - /* 0xBFC3D270: 9489003A lhu $t1, 58($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 58; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (58)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055270u); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x9489003Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D274: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D278: A4A901F6 sh $t1, 502($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 502; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (502)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055278u); return; } g_debug_last_store_pc = 0x80055278u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901F6u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055278u); -#endif -label_BFC3D27C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D27Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005527Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D27C: 14600004 bne $v1, $zero, 0xBFC3D290 */ - uint32_t psx_brA_BFC3D27C = cpu->gpr[3]; uint32_t psx_brB_BFC3D27C = cpu->gpr[0]; - psx_taken_BFC3D27C = (psx_brA_BFC3D27C != psx_brB_BFC3D27C); - psx_delay_BFC3D27C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D280: 3C011000 lui $at, 0x1000 */ - cpu->gpr[1] = 0x10000000u; - PGXP_ALU(0x3C011000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055280u); -#endif - if (psx_delay_BFC3D27C) { - psx_delay_BFC3D27C = 0; - if (psx_taken_BFC3D27C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055290u); - goto label_BFC3D290; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055284u); - } -label_BFC3D284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406u); -#endif - /* 0xBFC3D284: 00415024 and $t2, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[10] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00415024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D288: 11400004 beq $t2, $zero, 0xBFC3D29C */ - uint32_t psx_brA_BFC3D288 = cpu->gpr[10]; uint32_t psx_brB_BFC3D288 = cpu->gpr[0]; - psx_taken_BFC3D288 = (psx_brA_BFC3D288 == psx_brB_BFC3D288); - psx_delay_BFC3D288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D28C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005528Cu); -#endif - if (psx_delay_BFC3D288) { - psx_delay_BFC3D288 = 0; - if (psx_taken_BFC3D288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005529Cu); - goto label_BFC3D29C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055290u); - } -label_BFC3D290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055290u); -#endif - /* 0xBFC3D290: 948B003C lhu $t3, 60($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (60)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055290u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B003Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D294: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D298: A4AB01F8 sh $t3, 504($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 504; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (504)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055298u); return; } g_debug_last_store_pc = 0x80055298u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01F8u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055298u); -#endif -label_BFC3D29C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D29Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005529Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D29C: 14600004 bne $v1, $zero, 0xBFC3D2B0 */ - uint32_t psx_brA_BFC3D29C = cpu->gpr[3]; uint32_t psx_brB_BFC3D29C = cpu->gpr[0]; - psx_taken_BFC3D29C = (psx_brA_BFC3D29C != psx_brB_BFC3D29C); - psx_delay_BFC3D29C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D2A0: 3C012000 lui $at, 0x2000 */ - cpu->gpr[1] = 0x20000000u; - PGXP_ALU(0x3C012000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800552A0u); -#endif - if (psx_delay_BFC3D29C) { - psx_delay_BFC3D29C = 0; - if (psx_taken_BFC3D29C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552B0u); - goto label_BFC3D2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552A4u); - } -label_BFC3D2A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1006u); -#endif - /* 0xBFC3D2A4: 00416024 and $t4, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00416024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800552A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D2A8: 11800004 beq $t4, $zero, 0xBFC3D2BC */ - uint32_t psx_brA_BFC3D2A8 = cpu->gpr[12]; uint32_t psx_brB_BFC3D2A8 = cpu->gpr[0]; - psx_taken_BFC3D2A8 = (psx_brA_BFC3D2A8 == psx_brB_BFC3D2A8); - psx_delay_BFC3D2A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552ACu); -#endif - if (psx_delay_BFC3D2A8) { - psx_delay_BFC3D2A8 = 0; - if (psx_taken_BFC3D2A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552BCu); - goto label_BFC3D2BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552B0u); - } -label_BFC3D2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552B0u); -#endif - /* 0xBFC3D2B0: 948D003E lhu $t5, 62($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 62; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (62)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552B0u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D003Eu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800552B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D2B8: A4AD01FA sh $t5, 506($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 506; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (506)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552B8u); return; } g_debug_last_store_pc = 0x800552B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01FAu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800552B8u); -#endif -label_BFC3D2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D2BC: 14600004 bne $v1, $zero, 0xBFC3D2D0 */ - uint32_t psx_brA_BFC3D2BC = cpu->gpr[3]; uint32_t psx_brB_BFC3D2BC = cpu->gpr[0]; - psx_taken_BFC3D2BC = (psx_brA_BFC3D2BC != psx_brB_BFC3D2BC); - psx_delay_BFC3D2BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D2C0: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800552C0u); -#endif - if (psx_delay_BFC3D2BC) { - psx_delay_BFC3D2BC = 0; - if (psx_taken_BFC3D2BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552D0u); - goto label_BFC3D2D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552C4u); - } -label_BFC3D2C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC3D2C4: 00417024 and $t6, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00417024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800552C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D2C8: 11C00004 beq $t6, $zero, 0xBFC3D2DC */ - uint32_t psx_brA_BFC3D2C8 = cpu->gpr[14]; uint32_t psx_brB_BFC3D2C8 = cpu->gpr[0]; - psx_taken_BFC3D2C8 = (psx_brA_BFC3D2C8 == psx_brB_BFC3D2C8); - psx_delay_BFC3D2C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552CCu); -#endif - if (psx_delay_BFC3D2C8) { - psx_delay_BFC3D2C8 = 0; - if (psx_taken_BFC3D2C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552DCu); - goto label_BFC3D2DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552D0u); - } -label_BFC3D2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552D0u); -#endif - /* 0xBFC3D2D0: 948F0040 lhu $t7, 64($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (64)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552D0u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0040u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800552D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D2D8: A4AF01FC sh $t7, 508($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 508; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (508)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552D8u); return; } g_debug_last_store_pc = 0x800552D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01FCu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800552D8u); -#endif -label_BFC3D2DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D2DC: 14600004 bne $v1, $zero, 0xBFC3D2F0 */ - uint32_t psx_brA_BFC3D2DC = cpu->gpr[3]; uint32_t psx_brB_BFC3D2DC = cpu->gpr[0]; - psx_taken_BFC3D2DC = (psx_brA_BFC3D2DC != psx_brB_BFC3D2DC); - psx_delay_BFC3D2DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D2E0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800552E0u); -#endif - if (psx_delay_BFC3D2DC) { - psx_delay_BFC3D2DC = 0; - if (psx_taken_BFC3D2DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552F0u); - goto label_BFC3D2F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552E4u); - } -label_BFC3D2E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3D2E4: 0041C024 and $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x0041C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800552E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D2E8: 13000004 beq $t8, $zero, 0xBFC3D2FC */ - uint32_t psx_brA_BFC3D2E8 = cpu->gpr[24]; uint32_t psx_brB_BFC3D2E8 = cpu->gpr[0]; - psx_taken_BFC3D2E8 = (psx_brA_BFC3D2E8 == psx_brB_BFC3D2E8); - psx_delay_BFC3D2E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552ECu); -#endif - if (psx_delay_BFC3D2E8) { - psx_delay_BFC3D2E8 = 0; - if (psx_taken_BFC3D2E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552FCu); - goto label_BFC3D2FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800552F0u); - } -label_BFC3D2F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552F0u); -#endif - /* 0xBFC3D2F0: 94990042 lhu $t9, 66($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 66; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (66)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552F0u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990042u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800552F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D2F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800552F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D2F8: A4B901FE sh $t9, 510($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 510; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (510)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800552F8u); return; } g_debug_last_store_pc = 0x800552F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901FEu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800552F8u); -#endif -label_BFC3D2FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D2FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800552FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3D2FC: 03E00008 jr $ra */ - psx_delay_BFC3D2FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D300: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055300u); -#endif - if (psx_delay_BFC3D2FC) { - psx_delay_BFC3D2FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3D304(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3D304u); - int psx_delay_BFC3D30C = 0; - int psx_taken_BFC3D30C = 0; - int psx_delay_BFC3D314 = 0; - int psx_taken_BFC3D314 = 0; - int psx_delay_BFC3D320 = 0; - int psx_taken_BFC3D320 = 0; - int psx_delay_BFC3D32C = 0; - int psx_taken_BFC3D32C = 0; - int psx_delay_BFC3D33C = 0; - int psx_taken_BFC3D33C = 0; - int psx_delay_BFC3D358 = 0; - int psx_taken_BFC3D358 = 0; - int psx_delay_BFC3D364 = 0; - int psx_taken_BFC3D364 = 0; - int psx_delay_BFC3D378 = 0; - int psx_taken_BFC3D378 = 0; - int psx_delay_BFC3D384 = 0; - int psx_taken_BFC3D384 = 0; - int psx_delay_BFC3D398 = 0; - int psx_taken_BFC3D398 = 0; - int psx_delay_BFC3D3A4 = 0; - int psx_taken_BFC3D3A4 = 0; - int psx_delay_BFC3D3B8 = 0; - int psx_taken_BFC3D3B8 = 0; - int psx_delay_BFC3D3C4 = 0; - int psx_taken_BFC3D3C4 = 0; - int psx_delay_BFC3D3D8 = 0; - int psx_taken_BFC3D3D8 = 0; - int psx_delay_BFC3D3E4 = 0; - int psx_taken_BFC3D3E4 = 0; - int psx_delay_BFC3D3F8 = 0; - int psx_taken_BFC3D3F8 = 0; - int psx_delay_BFC3D404 = 0; - int psx_taken_BFC3D404 = 0; - int psx_delay_BFC3D414 = 0; - int psx_taken_BFC3D414 = 0; - int psx_delay_BFC3D428 = 0; - int psx_taken_BFC3D428 = 0; - int psx_delay_BFC3D440 = 0; - int psx_taken_BFC3D440 = 0; - int psx_delay_BFC3D44C = 0; - int psx_taken_BFC3D44C = 0; - int psx_delay_BFC3D45C = 0; - int psx_taken_BFC3D45C = 0; - int psx_delay_BFC3D470 = 0; - int psx_taken_BFC3D470 = 0; - int psx_delay_BFC3D488 = 0; - int psx_taken_BFC3D488 = 0; - int psx_delay_BFC3D494 = 0; - int psx_taken_BFC3D494 = 0; - int psx_delay_BFC3D4A8 = 0; - int psx_taken_BFC3D4A8 = 0; - int psx_delay_BFC3D4B4 = 0; - int psx_taken_BFC3D4B4 = 0; - int psx_delay_BFC3D4C8 = 0; - int psx_taken_BFC3D4C8 = 0; - int psx_delay_BFC3D4D4 = 0; - int psx_taken_BFC3D4D4 = 0; - int psx_delay_BFC3D4E4 = 0; - int psx_taken_BFC3D4E4 = 0; - int psx_delay_BFC3D4F8 = 0; - int psx_taken_BFC3D4F8 = 0; - int psx_delay_BFC3D510 = 0; - int psx_taken_BFC3D510 = 0; - int psx_delay_BFC3D51C = 0; - int psx_taken_BFC3D51C = 0; - int psx_delay_BFC3D52C = 0; - int psx_taken_BFC3D52C = 0; - int psx_delay_BFC3D540 = 0; - int psx_taken_BFC3D540 = 0; - int psx_delay_BFC3D558 = 0; - int psx_taken_BFC3D558 = 0; - int psx_delay_BFC3D564 = 0; - int psx_taken_BFC3D564 = 0; - int psx_delay_BFC3D598 = 0; - int psx_taken_BFC3D598 = 0; - int psx_delay_BFC3D5A4 = 0; - int psx_taken_BFC3D5A4 = 0; - int psx_delay_BFC3D5D8 = 0; - int psx_taken_BFC3D5D8 = 0; - int psx_delay_BFC3D5E4 = 0; - int psx_taken_BFC3D5E4 = 0; - int psx_delay_BFC3D618 = 0; - int psx_taken_BFC3D618 = 0; - int psx_delay_BFC3D624 = 0; - int psx_taken_BFC3D624 = 0; - int psx_delay_BFC3D654 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3D314u: goto label_BFC3D314; - case 0xBFC3D31Cu: goto label_BFC3D31C; - case 0xBFC3D320u: goto label_BFC3D320; - case 0xBFC3D328u: goto label_BFC3D328; - case 0xBFC3D334u: goto label_BFC3D334; - case 0xBFC3D344u: goto label_BFC3D344; - case 0xBFC3D358u: goto label_BFC3D358; - case 0xBFC3D360u: goto label_BFC3D360; - case 0xBFC3D36Cu: goto label_BFC3D36C; - case 0xBFC3D378u: goto label_BFC3D378; - case 0xBFC3D380u: goto label_BFC3D380; - case 0xBFC3D38Cu: goto label_BFC3D38C; - case 0xBFC3D398u: goto label_BFC3D398; - case 0xBFC3D3A0u: goto label_BFC3D3A0; - case 0xBFC3D3ACu: goto label_BFC3D3AC; - case 0xBFC3D3B8u: goto label_BFC3D3B8; - case 0xBFC3D3C0u: goto label_BFC3D3C0; - case 0xBFC3D3CCu: goto label_BFC3D3CC; - case 0xBFC3D3D8u: goto label_BFC3D3D8; - case 0xBFC3D3E0u: goto label_BFC3D3E0; - case 0xBFC3D3ECu: goto label_BFC3D3EC; - case 0xBFC3D3F8u: goto label_BFC3D3F8; - case 0xBFC3D400u: goto label_BFC3D400; - case 0xBFC3D40Cu: goto label_BFC3D40C; - case 0xBFC3D41Cu: goto label_BFC3D41C; - case 0xBFC3D430u: goto label_BFC3D430; - case 0xBFC3D440u: goto label_BFC3D440; - case 0xBFC3D448u: goto label_BFC3D448; - case 0xBFC3D454u: goto label_BFC3D454; - case 0xBFC3D464u: goto label_BFC3D464; - case 0xBFC3D478u: goto label_BFC3D478; - case 0xBFC3D488u: goto label_BFC3D488; - case 0xBFC3D490u: goto label_BFC3D490; - case 0xBFC3D49Cu: goto label_BFC3D49C; - case 0xBFC3D4A8u: goto label_BFC3D4A8; - case 0xBFC3D4B0u: goto label_BFC3D4B0; - case 0xBFC3D4BCu: goto label_BFC3D4BC; - case 0xBFC3D4C8u: goto label_BFC3D4C8; - case 0xBFC3D4D0u: goto label_BFC3D4D0; - case 0xBFC3D4DCu: goto label_BFC3D4DC; - case 0xBFC3D4ECu: goto label_BFC3D4EC; - case 0xBFC3D500u: goto label_BFC3D500; - case 0xBFC3D510u: goto label_BFC3D510; - case 0xBFC3D518u: goto label_BFC3D518; - case 0xBFC3D524u: goto label_BFC3D524; - case 0xBFC3D534u: goto label_BFC3D534; - case 0xBFC3D548u: goto label_BFC3D548; - case 0xBFC3D558u: goto label_BFC3D558; - case 0xBFC3D560u: goto label_BFC3D560; - case 0xBFC3D56Cu: goto label_BFC3D56C; - case 0xBFC3D598u: goto label_BFC3D598; - case 0xBFC3D5A0u: goto label_BFC3D5A0; - case 0xBFC3D5ACu: goto label_BFC3D5AC; - case 0xBFC3D5D8u: goto label_BFC3D5D8; - case 0xBFC3D5E0u: goto label_BFC3D5E0; - case 0xBFC3D5ECu: goto label_BFC3D5EC; - case 0xBFC3D618u: goto label_BFC3D618; - case 0xBFC3D620u: goto label_BFC3D620; - case 0xBFC3D62Cu: goto label_BFC3D62C; - case 0xBFC3D654u: goto label_BFC3D654; - default: break; - } - } -label_BFC3D304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055304u); -#endif - /* 0xBFC3D304: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055304u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D308: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D30C: 14400004 bne $v0, $zero, 0xBFC3D320 */ - uint32_t psx_brA_BFC3D30C = cpu->gpr[2]; uint32_t psx_brB_BFC3D30C = cpu->gpr[0]; - psx_taken_BFC3D30C = (psx_brA_BFC3D30C != psx_brB_BFC3D30C); - psx_delay_BFC3D30C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D310: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055310u); -#endif - if (psx_delay_BFC3D30C) { - psx_delay_BFC3D30C = 0; - if (psx_taken_BFC3D30C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055320u); - goto label_BFC3D320; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055314u); - } -label_BFC3D314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D314: 10000002 beq $zero, $zero, 0xBFC3D320 */ - uint32_t psx_brA_BFC3D314 = cpu->gpr[0]; uint32_t psx_brB_BFC3D314 = cpu->gpr[0]; - psx_taken_BFC3D314 = (psx_brA_BFC3D314 == psx_brB_BFC3D314); - psx_delay_BFC3D314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D318: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055318u); -#endif - if (psx_delay_BFC3D314) { - psx_delay_BFC3D314 = 0; - if (psx_taken_BFC3D314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055320u); - goto label_BFC3D320; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005531Cu); - } -label_BFC3D31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005531Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D31C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005531Cu); -#endif -label_BFC3D320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D320: 14600008 bne $v1, $zero, 0xBFC3D344 */ - uint32_t psx_brA_BFC3D320 = cpu->gpr[3]; uint32_t psx_brB_BFC3D320 = cpu->gpr[0]; - psx_taken_BFC3D320 = (psx_brA_BFC3D320 != psx_brB_BFC3D320); - psx_delay_BFC3D320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D324: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055324u); -#endif - if (psx_delay_BFC3D320) { - psx_delay_BFC3D320 = 0; - if (psx_taken_BFC3D320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055344u); - goto label_BFC3D344; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055328u); - } -label_BFC3D328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3D328: 304E0001 andi $t6, $v0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1u; - PGXP_ALU(0x304E0001u, cpu->gpr[14], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D32C: 15C00005 bne $t6, $zero, 0xBFC3D344 */ - uint32_t psx_brA_BFC3D32C = cpu->gpr[14]; uint32_t psx_brB_BFC3D32C = cpu->gpr[0]; - psx_taken_BFC3D32C = (psx_brA_BFC3D32C != psx_brB_BFC3D32C); - psx_delay_BFC3D32C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D330: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055330u); -#endif - if (psx_delay_BFC3D32C) { - psx_delay_BFC3D32C = 0; - if (psx_taken_BFC3D32C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055344u); - goto label_BFC3D344; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055334u); - } -label_BFC3D334: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D334u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3D334: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055334u); -#endif - /* 0xBFC3D338: 8CA597A0 lw $a1, -26720($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055338u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA597A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80055338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D33C: 10000006 beq $zero, $zero, 0xBFC3D358 */ - uint32_t psx_brA_BFC3D33C = cpu->gpr[0]; uint32_t psx_brB_BFC3D33C = cpu->gpr[0]; - psx_taken_BFC3D33C = (psx_brA_BFC3D33C == psx_brB_BFC3D33C); - psx_delay_BFC3D33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D340: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055340u); -#endif - if (psx_delay_BFC3D33C) { - psx_delay_BFC3D33C = 0; - if (psx_taken_BFC3D33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055358u); - goto label_BFC3D358; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055344u); - } -label_BFC3D344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3D344: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055344u); -#endif - /* 0xBFC3D348: 8CA597A0 lw $a1, -26720($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055348u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA597A0u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80055348u); -#endif - /* 0xBFC3D34C: 948F0004 lhu $t7, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005534Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005534Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D350: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D354: A4AF0180 sh $t7, 384($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055354u); return; } g_debug_last_store_pc = 0x80055354u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF0180u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055354u); -#endif -label_BFC3D358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D358: 14600004 bne $v1, $zero, 0xBFC3D36C */ - uint32_t psx_brA_BFC3D358 = cpu->gpr[3]; uint32_t psx_brB_BFC3D358 = cpu->gpr[0]; - psx_taken_BFC3D358 = (psx_brA_BFC3D358 != psx_brB_BFC3D358); - psx_delay_BFC3D358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D35C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005535Cu); -#endif - if (psx_delay_BFC3D358) { - psx_delay_BFC3D358 = 0; - if (psx_taken_BFC3D358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005536Cu); - goto label_BFC3D36C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055360u); - } -label_BFC3D360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3D360: 30580002 andi $t8, $v0, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x2u; - PGXP_ALU(0x30580002u, cpu->gpr[24], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80055360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D364: 13000004 beq $t8, $zero, 0xBFC3D378 */ - uint32_t psx_brA_BFC3D364 = cpu->gpr[24]; uint32_t psx_brB_BFC3D364 = cpu->gpr[0]; - psx_taken_BFC3D364 = (psx_brA_BFC3D364 == psx_brB_BFC3D364); - psx_delay_BFC3D364 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D368: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055368u); -#endif - if (psx_delay_BFC3D364) { - psx_delay_BFC3D364 = 0; - if (psx_taken_BFC3D364) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055378u); - goto label_BFC3D378; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005536Cu); - } -label_BFC3D36C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D36Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005536Cu); -#endif - /* 0xBFC3D36C: 94990006 lhu $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005536Cu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x94990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005536Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D370: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D374: A4B90182 sh $t9, 386($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 386; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055374u); return; } g_debug_last_store_pc = 0x80055374u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B90182u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055374u); -#endif -label_BFC3D378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D378: 14600004 bne $v1, $zero, 0xBFC3D38C */ - uint32_t psx_brA_BFC3D378 = cpu->gpr[3]; uint32_t psx_brB_BFC3D378 = cpu->gpr[0]; - psx_taken_BFC3D378 = (psx_brA_BFC3D378 != psx_brB_BFC3D378); - psx_delay_BFC3D378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D37C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005537Cu); -#endif - if (psx_delay_BFC3D378) { - psx_delay_BFC3D378 = 0; - if (psx_taken_BFC3D378) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005538Cu); - goto label_BFC3D38C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055380u); - } -label_BFC3D380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3D380: 30480004 andi $t0, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30480004u, cpu->gpr[8], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80055380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D384: 11000004 beq $t0, $zero, 0xBFC3D398 */ - uint32_t psx_brA_BFC3D384 = cpu->gpr[8]; uint32_t psx_brB_BFC3D384 = cpu->gpr[0]; - psx_taken_BFC3D384 = (psx_brA_BFC3D384 == psx_brB_BFC3D384); - psx_delay_BFC3D384 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D388: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055388u); -#endif - if (psx_delay_BFC3D384) { - psx_delay_BFC3D384 = 0; - if (psx_taken_BFC3D384) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055398u); - goto label_BFC3D398; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005538Cu); - } -label_BFC3D38C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D38Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005538Cu); -#endif - /* 0xBFC3D38C: 84890008 lh $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005538Cu); return; } cpu->gpr[9] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x84890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005538Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D390: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D394: A4A90184 sh $t1, 388($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055394u); return; } g_debug_last_store_pc = 0x80055394u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A90184u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055394u); -#endif -label_BFC3D398: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D398u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D398: 14600004 bne $v1, $zero, 0xBFC3D3AC */ - uint32_t psx_brA_BFC3D398 = cpu->gpr[3]; uint32_t psx_brB_BFC3D398 = cpu->gpr[0]; - psx_taken_BFC3D398 = (psx_brA_BFC3D398 != psx_brB_BFC3D398); - psx_delay_BFC3D398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D39C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005539Cu); -#endif - if (psx_delay_BFC3D398) { - psx_delay_BFC3D398 = 0; - if (psx_taken_BFC3D398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553ACu); - goto label_BFC3D3AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553A0u); - } -label_BFC3D3A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3D3A0: 304A0008 andi $t2, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304A0008u, cpu->gpr[10], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x800553A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D3A4: 11400004 beq $t2, $zero, 0xBFC3D3B8 */ - uint32_t psx_brA_BFC3D3A4 = cpu->gpr[10]; uint32_t psx_brB_BFC3D3A4 = cpu->gpr[0]; - psx_taken_BFC3D3A4 = (psx_brA_BFC3D3A4 == psx_brB_BFC3D3A4); - psx_delay_BFC3D3A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553A8u); -#endif - if (psx_delay_BFC3D3A4) { - psx_delay_BFC3D3A4 = 0; - if (psx_taken_BFC3D3A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553B8u); - goto label_BFC3D3B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553ACu); - } -label_BFC3D3AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553ACu); -#endif - /* 0xBFC3D3AC: 848B000A lh $t3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553ACu); return; } cpu->gpr[11] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x848B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800553ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D3B4: A4AB0186 sh $t3, 390($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553B4u); return; } g_debug_last_store_pc = 0x800553B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB0186u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800553B4u); -#endif -label_BFC3D3B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D3B8: 14600004 bne $v1, $zero, 0xBFC3D3CC */ - uint32_t psx_brA_BFC3D3B8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D3B8 = cpu->gpr[0]; - psx_taken_BFC3D3B8 = (psx_brA_BFC3D3B8 != psx_brB_BFC3D3B8); - psx_delay_BFC3D3B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553BCu); -#endif - if (psx_delay_BFC3D3B8) { - psx_delay_BFC3D3B8 = 0; - if (psx_taken_BFC3D3B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553CCu); - goto label_BFC3D3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553C0u); - } -label_BFC3D3C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D3C0: 304C0010 andi $t4, $v0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x10u; - PGXP_ALU(0x304C0010u, cpu->gpr[12], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x800553C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D3C4: 11800004 beq $t4, $zero, 0xBFC3D3D8 */ - uint32_t psx_brA_BFC3D3C4 = cpu->gpr[12]; uint32_t psx_brB_BFC3D3C4 = cpu->gpr[0]; - psx_taken_BFC3D3C4 = (psx_brA_BFC3D3C4 == psx_brB_BFC3D3C4); - psx_delay_BFC3D3C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553C8u); -#endif - if (psx_delay_BFC3D3C4) { - psx_delay_BFC3D3C4 = 0; - if (psx_taken_BFC3D3C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553D8u); - goto label_BFC3D3D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553CCu); - } -label_BFC3D3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553CCu); -#endif - /* 0xBFC3D3CC: 948D000C lhu $t5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553CCu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800553CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D3D4: A4AD01B0 sh $t5, 432($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 432; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (432)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553D4u); return; } g_debug_last_store_pc = 0x800553D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01B0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800553D4u); -#endif -label_BFC3D3D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D3D8: 14600004 bne $v1, $zero, 0xBFC3D3EC */ - uint32_t psx_brA_BFC3D3D8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D3D8 = cpu->gpr[0]; - psx_taken_BFC3D3D8 = (psx_brA_BFC3D3D8 != psx_brB_BFC3D3D8); - psx_delay_BFC3D3D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553DCu); -#endif - if (psx_delay_BFC3D3D8) { - psx_delay_BFC3D3D8 = 0; - if (psx_taken_BFC3D3D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553ECu); - goto label_BFC3D3EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553E0u); - } -label_BFC3D3E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3D3E0: 304E0020 andi $t6, $v0, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x20u; - PGXP_ALU(0x304E0020u, cpu->gpr[14], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x800553E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D3E4: 11C00004 beq $t6, $zero, 0xBFC3D3F8 */ - uint32_t psx_brA_BFC3D3E4 = cpu->gpr[14]; uint32_t psx_brB_BFC3D3E4 = cpu->gpr[0]; - psx_taken_BFC3D3E4 = (psx_brA_BFC3D3E4 == psx_brB_BFC3D3E4); - psx_delay_BFC3D3E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553E8u); -#endif - if (psx_delay_BFC3D3E4) { - psx_delay_BFC3D3E4 = 0; - if (psx_taken_BFC3D3E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553F8u); - goto label_BFC3D3F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800553ECu); - } -label_BFC3D3EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553ECu); -#endif - /* 0xBFC3D3EC: 948F000E lhu $t7, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553ECu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800553ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D3F4: A4AF01B2 sh $t7, 434($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 434; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (434)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800553F4u); return; } g_debug_last_store_pc = 0x800553F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01B2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800553F4u); -#endif -label_BFC3D3F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D3F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800553F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D3F8: 14600004 bne $v1, $zero, 0xBFC3D40C */ - uint32_t psx_brA_BFC3D3F8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D3F8 = cpu->gpr[0]; - psx_taken_BFC3D3F8 = (psx_brA_BFC3D3F8 != psx_brB_BFC3D3F8); - psx_delay_BFC3D3F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D3FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800553FCu); -#endif - if (psx_delay_BFC3D3F8) { - psx_delay_BFC3D3F8 = 0; - if (psx_taken_BFC3D3F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005540Cu); - goto label_BFC3D40C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055400u); - } -label_BFC3D400: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D400u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3D400: 30580100 andi $t8, $v0, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x100u; - PGXP_ALU(0x30580100u, cpu->gpr[24], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80055400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3D404: 1300000E beq $t8, $zero, 0xBFC3D440 */ - uint32_t psx_brA_BFC3D404 = cpu->gpr[24]; uint32_t psx_brB_BFC3D404 = cpu->gpr[0]; - psx_taken_BFC3D404 = (psx_brA_BFC3D404 == psx_brB_BFC3D404); - psx_delay_BFC3D404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D408: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055408u); -#endif - if (psx_delay_BFC3D404) { - psx_delay_BFC3D404 = 0; - if (psx_taken_BFC3D404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055440u); - goto label_BFC3D440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005540Cu); - } -label_BFC3D40C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D40Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005540Cu); -#endif - /* 0xBFC3D40C: 8C990010 lw $t9, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005540Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } - PGXP_LOAD(0x8C990010u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005540Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D410: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3D414: 17200006 bne $t9, $zero, 0xBFC3D430 */ - uint32_t psx_brA_BFC3D414 = cpu->gpr[25]; uint32_t psx_brB_BFC3D414 = cpu->gpr[0]; - psx_taken_BFC3D414 = (psx_brA_BFC3D414 != psx_brB_BFC3D414); - psx_delay_BFC3D414 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D418: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055418u); -#endif - if (psx_delay_BFC3D414) { - psx_delay_BFC3D414 = 0; - if (psx_taken_BFC3D414) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055430u); - goto label_BFC3D430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005541Cu); - } -label_BFC3D41C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D41Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005541Cu); -#endif - /* 0xBFC3D41C: 94A801AA lhu $t0, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005541Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x20u); } - PGXP_LOAD(0x94A801AAu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005541Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D420: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D424: 3109FFFB andi $t1, $t0, 0xFFFB */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFBu; - PGXP_ALU(0x3109FFFBu, cpu->gpr[9], _pgx1, 0xFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x80055424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D428: 10000005 beq $zero, $zero, 0xBFC3D440 */ - uint32_t psx_brA_BFC3D428 = cpu->gpr[0]; uint32_t psx_brB_BFC3D428 = cpu->gpr[0]; - psx_taken_BFC3D428 = (psx_brA_BFC3D428 == psx_brB_BFC3D428); - psx_delay_BFC3D428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D42C: A4A901AA sh $t1, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005542Cu); return; } g_debug_last_store_pc = 0x8005542Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901AAu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005542Cu); -#endif - if (psx_delay_BFC3D428) { - psx_delay_BFC3D428 = 0; - if (psx_taken_BFC3D428) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055440u); - goto label_BFC3D440; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055430u); - } -label_BFC3D430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055430u); -#endif - /* 0xBFC3D430: 94AA01AA lhu $t2, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055430u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x94AA01AAu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D434: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D438: 354B0004 ori $t3, $t2, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] | 0x4u; - PGXP_ALU(0x354B0004u, cpu->gpr[11], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80055438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D43C: A4AB01AA sh $t3, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005543Cu); return; } g_debug_last_store_pc = 0x8005543Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01AAu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005543Cu); -#endif -label_BFC3D440: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D440u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D440: 14600004 bne $v1, $zero, 0xBFC3D454 */ - uint32_t psx_brA_BFC3D440 = cpu->gpr[3]; uint32_t psx_brB_BFC3D440 = cpu->gpr[0]; - psx_taken_BFC3D440 = (psx_brA_BFC3D440 != psx_brB_BFC3D440); - psx_delay_BFC3D440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D444: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055444u); -#endif - if (psx_delay_BFC3D440) { - psx_delay_BFC3D440 = 0; - if (psx_taken_BFC3D440) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055454u); - goto label_BFC3D454; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055448u); - } -label_BFC3D448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D448: 304C0400 andi $t4, $v0, 0x400 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x400u; - PGXP_ALU(0x304C0400u, cpu->gpr[12], _pgx1, 0x0400u); } -#ifdef PSX_COSIM - cosim_instr(0x80055448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D44C: 1180000E beq $t4, $zero, 0xBFC3D488 */ - uint32_t psx_brA_BFC3D44C = cpu->gpr[12]; uint32_t psx_brB_BFC3D44C = cpu->gpr[0]; - psx_taken_BFC3D44C = (psx_brA_BFC3D44C == psx_brB_BFC3D44C); - psx_delay_BFC3D44C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D450: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055450u); -#endif - if (psx_delay_BFC3D44C) { - psx_delay_BFC3D44C = 0; - if (psx_taken_BFC3D44C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055488u); - goto label_BFC3D488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055454u); - } -label_BFC3D454: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D454u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055454u); -#endif - /* 0xBFC3D454: 8C8D0014 lw $t5, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055454u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D0014u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D458: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3D45C: 15A00006 bne $t5, $zero, 0xBFC3D478 */ - uint32_t psx_brA_BFC3D45C = cpu->gpr[13]; uint32_t psx_brB_BFC3D45C = cpu->gpr[0]; - psx_taken_BFC3D45C = (psx_brA_BFC3D45C != psx_brB_BFC3D45C); - psx_delay_BFC3D45C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D460: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055460u); -#endif - if (psx_delay_BFC3D45C) { - psx_delay_BFC3D45C = 0; - if (psx_taken_BFC3D45C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055478u); - goto label_BFC3D478; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055464u); - } -label_BFC3D464: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D464u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055464u); -#endif - /* 0xBFC3D464: 94AE01AA lhu $t6, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055464u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x94AE01AAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D468: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D46C: 31CFFFFE andi $t7, $t6, 0xFFFE */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFEu; - PGXP_ALU(0x31CFFFFEu, cpu->gpr[15], _pgx1, 0xFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x8005546Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D470: 10000005 beq $zero, $zero, 0xBFC3D488 */ - uint32_t psx_brA_BFC3D470 = cpu->gpr[0]; uint32_t psx_brB_BFC3D470 = cpu->gpr[0]; - psx_taken_BFC3D470 = (psx_brA_BFC3D470 == psx_brB_BFC3D470); - psx_delay_BFC3D470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D474: A4AF01AA sh $t7, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055474u); return; } g_debug_last_store_pc = 0x80055474u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01AAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055474u); -#endif - if (psx_delay_BFC3D470) { - psx_delay_BFC3D470 = 0; - if (psx_taken_BFC3D470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055488u); - goto label_BFC3D488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055478u); - } -label_BFC3D478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055478u); -#endif - /* 0xBFC3D478: 94B801AA lhu $t8, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055478u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x94B801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D47C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005547Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D480: 37190001 ori $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x1u; - PGXP_ALU(0x37190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D484: A4B901AA sh $t9, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055484u); return; } g_debug_last_store_pc = 0x80055484u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901AAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055484u); -#endif -label_BFC3D488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D488: 14600004 bne $v1, $zero, 0xBFC3D49C */ - uint32_t psx_brA_BFC3D488 = cpu->gpr[3]; uint32_t psx_brB_BFC3D488 = cpu->gpr[0]; - psx_taken_BFC3D488 = (psx_brA_BFC3D488 != psx_brB_BFC3D488); - psx_delay_BFC3D488 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D48C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005548Cu); -#endif - if (psx_delay_BFC3D488) { - psx_delay_BFC3D488 = 0; - if (psx_taken_BFC3D488) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005549Cu); - goto label_BFC3D49C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055490u); - } -label_BFC3D490: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D490u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3D490: 30480040 andi $t0, $v0, 0x40 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x40u; - PGXP_ALU(0x30480040u, cpu->gpr[8], _pgx1, 0x0040u); } -#ifdef PSX_COSIM - cosim_instr(0x80055490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D494: 11000004 beq $t0, $zero, 0xBFC3D4A8 */ - uint32_t psx_brA_BFC3D494 = cpu->gpr[8]; uint32_t psx_brB_BFC3D494 = cpu->gpr[0]; - psx_taken_BFC3D494 = (psx_brA_BFC3D494 == psx_brB_BFC3D494); - psx_delay_BFC3D494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D498: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055498u); -#endif - if (psx_delay_BFC3D494) { - psx_delay_BFC3D494 = 0; - if (psx_taken_BFC3D494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554A8u); - goto label_BFC3D4A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005549Cu); - } -label_BFC3D49C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D49Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005549Cu); -#endif - /* 0xBFC3D49C: 94890018 lhu $t1, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005549Cu); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005549Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC3D4A4: A4A901B4 sh $t1, 436($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 436; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (436)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800554A4u); return; } g_debug_last_store_pc = 0x800554A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4A901B4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800554A4u); -#endif -label_BFC3D4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D4A8: 14600004 bne $v1, $zero, 0xBFC3D4BC */ - uint32_t psx_brA_BFC3D4A8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D4A8 = cpu->gpr[0]; - psx_taken_BFC3D4A8 = (psx_brA_BFC3D4A8 != psx_brB_BFC3D4A8); - psx_delay_BFC3D4A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554ACu); -#endif - if (psx_delay_BFC3D4A8) { - psx_delay_BFC3D4A8 = 0; - if (psx_taken_BFC3D4A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554BCu); - goto label_BFC3D4BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554B0u); - } -label_BFC3D4B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3D4B0: 304A0080 andi $t2, $v0, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] & 0x80u; - PGXP_ALU(0x304A0080u, cpu->gpr[10], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x800554B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3D4B4: 11400004 beq $t2, $zero, 0xBFC3D4C8 */ - uint32_t psx_brA_BFC3D4B4 = cpu->gpr[10]; uint32_t psx_brB_BFC3D4B4 = cpu->gpr[0]; - psx_taken_BFC3D4B4 = (psx_brA_BFC3D4B4 == psx_brB_BFC3D4B4); - psx_delay_BFC3D4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554B8u); -#endif - if (psx_delay_BFC3D4B4) { - psx_delay_BFC3D4B4 = 0; - if (psx_taken_BFC3D4B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554C8u); - goto label_BFC3D4C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554BCu); - } -label_BFC3D4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554BCu); -#endif - /* 0xBFC3D4BC: 948B001A lhu $t3, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800554BCu); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x10u); } - PGXP_LOAD(0x948B001Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800554BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D4C4: A4AB01B6 sh $t3, 438($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 438; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (438)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800554C4u); return; } g_debug_last_store_pc = 0x800554C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01B6u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800554C4u); -#endif -label_BFC3D4C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D4C8: 14600004 bne $v1, $zero, 0xBFC3D4DC */ - uint32_t psx_brA_BFC3D4C8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D4C8 = cpu->gpr[0]; - psx_taken_BFC3D4C8 = (psx_brA_BFC3D4C8 != psx_brB_BFC3D4C8); - psx_delay_BFC3D4C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554CCu); -#endif - if (psx_delay_BFC3D4C8) { - psx_delay_BFC3D4C8 = 0; - if (psx_taken_BFC3D4C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554DCu); - goto label_BFC3D4DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554D0u); - } -label_BFC3D4D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D4D0: 304C0200 andi $t4, $v0, 0x200 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x200u; - PGXP_ALU(0x304C0200u, cpu->gpr[12], _pgx1, 0x0200u); } -#ifdef PSX_COSIM - cosim_instr(0x800554D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D4D4: 1180000E beq $t4, $zero, 0xBFC3D510 */ - uint32_t psx_brA_BFC3D4D4 = cpu->gpr[12]; uint32_t psx_brB_BFC3D4D4 = cpu->gpr[0]; - psx_taken_BFC3D4D4 = (psx_brA_BFC3D4D4 == psx_brB_BFC3D4D4); - psx_delay_BFC3D4D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554D8u); -#endif - if (psx_delay_BFC3D4D4) { - psx_delay_BFC3D4D4 = 0; - if (psx_taken_BFC3D4D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055510u); - goto label_BFC3D510; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554DCu); - } -label_BFC3D4DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554DCu); -#endif - /* 0xBFC3D4DC: 8C8D001C lw $t5, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800554DCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x8C8D001Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800554DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3D4E4: 15A00006 bne $t5, $zero, 0xBFC3D500 */ - uint32_t psx_brA_BFC3D4E4 = cpu->gpr[13]; uint32_t psx_brB_BFC3D4E4 = cpu->gpr[0]; - psx_taken_BFC3D4E4 = (psx_brA_BFC3D4E4 != psx_brB_BFC3D4E4); - psx_delay_BFC3D4E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554E8u); -#endif - if (psx_delay_BFC3D4E4) { - psx_delay_BFC3D4E4 = 0; - if (psx_taken_BFC3D4E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055500u); - goto label_BFC3D500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800554ECu); - } -label_BFC3D4EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D4ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554ECu); -#endif - /* 0xBFC3D4EC: 94AE01AA lhu $t6, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800554ECu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x94AE01AAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800554ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800554F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800554F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D4F4: 31CFFFF7 andi $t7, $t6, 0xFFF7 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFF7u; - PGXP_ALU(0x31CFFFF7u, cpu->gpr[15], _pgx1, 0xFFF7u); } -#ifdef PSX_COSIM - cosim_instr(0x800554F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D4F8: 10000005 beq $zero, $zero, 0xBFC3D510 */ - uint32_t psx_brA_BFC3D4F8 = cpu->gpr[0]; uint32_t psx_brB_BFC3D4F8 = cpu->gpr[0]; - psx_taken_BFC3D4F8 = (psx_brA_BFC3D4F8 == psx_brB_BFC3D4F8); - psx_delay_BFC3D4F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D4FC: A4AF01AA sh $t7, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800554FCu); return; } g_debug_last_store_pc = 0x800554FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01AAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800554FCu); -#endif - if (psx_delay_BFC3D4F8) { - psx_delay_BFC3D4F8 = 0; - if (psx_taken_BFC3D4F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055510u); - goto label_BFC3D510; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055500u); - } -label_BFC3D500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055500u); -#endif - /* 0xBFC3D500: 94B801AA lhu $t8, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055500u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x94B801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D508: 37190008 ori $t9, $t8, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] | 0x8u; - PGXP_ALU(0x37190008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D50C: A4B901AA sh $t9, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005550Cu); return; } g_debug_last_store_pc = 0x8005550Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901AAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005550Cu); -#endif -label_BFC3D510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D510: 14600004 bne $v1, $zero, 0xBFC3D524 */ - uint32_t psx_brA_BFC3D510 = cpu->gpr[3]; uint32_t psx_brB_BFC3D510 = cpu->gpr[0]; - psx_taken_BFC3D510 = (psx_brA_BFC3D510 != psx_brB_BFC3D510); - psx_delay_BFC3D510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055514u); -#endif - if (psx_delay_BFC3D510) { - psx_delay_BFC3D510 = 0; - if (psx_taken_BFC3D510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055524u); - goto label_BFC3D524; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055518u); - } -label_BFC3D518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3D518: 30480800 andi $t0, $v0, 0x800 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] & 0x800u; - PGXP_ALU(0x30480800u, cpu->gpr[8], _pgx1, 0x0800u); } -#ifdef PSX_COSIM - cosim_instr(0x80055518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D51C: 1100000E beq $t0, $zero, 0xBFC3D558 */ - uint32_t psx_brA_BFC3D51C = cpu->gpr[8]; uint32_t psx_brB_BFC3D51C = cpu->gpr[0]; - psx_taken_BFC3D51C = (psx_brA_BFC3D51C == psx_brB_BFC3D51C); - psx_delay_BFC3D51C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D520: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055520u); -#endif - if (psx_delay_BFC3D51C) { - psx_delay_BFC3D51C = 0; - if (psx_taken_BFC3D51C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055558u); - goto label_BFC3D558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055524u); - } -label_BFC3D524: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D524u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055524u); -#endif - /* 0xBFC3D524: 8C890020 lw $t1, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055524u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x8C890020u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3D52C: 15200006 bne $t1, $zero, 0xBFC3D548 */ - uint32_t psx_brA_BFC3D52C = cpu->gpr[9]; uint32_t psx_brB_BFC3D52C = cpu->gpr[0]; - psx_taken_BFC3D52C = (psx_brA_BFC3D52C != psx_brB_BFC3D52C); - psx_delay_BFC3D52C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055530u); -#endif - if (psx_delay_BFC3D52C) { - psx_delay_BFC3D52C = 0; - if (psx_taken_BFC3D52C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055548u); - goto label_BFC3D548; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055534u); - } -label_BFC3D534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055534u); -#endif - /* 0xBFC3D534: 94AA01AA lhu $t2, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055534u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20u); } - PGXP_LOAD(0x94AA01AAu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D53C: 314BFFFD andi $t3, $t2, 0xFFFD */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFDu; - PGXP_ALU(0x314BFFFDu, cpu->gpr[11], _pgx1, 0xFFFDu); } -#ifdef PSX_COSIM - cosim_instr(0x8005553Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D540: 10000005 beq $zero, $zero, 0xBFC3D558 */ - uint32_t psx_brA_BFC3D540 = cpu->gpr[0]; uint32_t psx_brB_BFC3D540 = cpu->gpr[0]; - psx_taken_BFC3D540 = (psx_brA_BFC3D540 == psx_brB_BFC3D540); - psx_delay_BFC3D540 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D544: A4AB01AA sh $t3, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055544u); return; } g_debug_last_store_pc = 0x80055544u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01AAu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055544u); -#endif - if (psx_delay_BFC3D540) { - psx_delay_BFC3D540 = 0; - if (psx_taken_BFC3D540) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055558u); - goto label_BFC3D558; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055548u); - } -label_BFC3D548: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D548u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055548u); -#endif - /* 0xBFC3D548: 94AC01AA lhu $t4, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055548u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x94AC01AAu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D54C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005554Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3D550: 358D0002 ori $t5, $t4, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] | 0x2u; - PGXP_ALU(0x358D0002u, cpu->gpr[13], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80055550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D554: A4AD01AA sh $t5, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055554u); return; } g_debug_last_store_pc = 0x80055554u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01AAu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055554u); -#endif -label_BFC3D558: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D558u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D558: 14600004 bne $v1, $zero, 0xBFC3D56C */ - uint32_t psx_brA_BFC3D558 = cpu->gpr[3]; uint32_t psx_brB_BFC3D558 = cpu->gpr[0]; - psx_taken_BFC3D558 = (psx_brA_BFC3D558 != psx_brB_BFC3D558); - psx_delay_BFC3D558 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D55C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005555Cu); -#endif - if (psx_delay_BFC3D558) { - psx_delay_BFC3D558 = 0; - if (psx_taken_BFC3D558) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005556Cu); - goto label_BFC3D56C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055560u); - } -label_BFC3D560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3D560: 304E1000 andi $t6, $v0, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0x1000u; - PGXP_ALU(0x304E1000u, cpu->gpr[14], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80055560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3D564: 11C0000C beq $t6, $zero, 0xBFC3D598 */ - uint32_t psx_brA_BFC3D564 = cpu->gpr[14]; uint32_t psx_brB_BFC3D564 = cpu->gpr[0]; - psx_taken_BFC3D564 = (psx_brA_BFC3D564 == psx_brB_BFC3D564); - psx_delay_BFC3D564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D568: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055568u); -#endif - if (psx_delay_BFC3D564) { - psx_delay_BFC3D564 = 0; - if (psx_taken_BFC3D564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055598u); - goto label_BFC3D598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005556Cu); - } -label_BFC3D56C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D56Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005556Cu); -#endif - /* 0xBFC3D56C: 94AF01AA lhu $t7, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005556Cu); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20u); } - PGXP_LOAD(0x94AF01AAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005556Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D570: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3D574: 31F8C0FF andi $t8, $t7, 0xC0FF */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0xC0FFu; - PGXP_ALU(0x31F8C0FFu, cpu->gpr[24], _pgx1, 0xC0FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3D578: A4B801AA sh $t8, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055578u); return; } g_debug_last_store_pc = 0x80055578u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4B801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055578u); -#endif - /* 0xBFC3D57C: 94880024 lhu $t0, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005557Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005557Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055580u); -#endif - /* 0xBFC3D580: 94B901AA lhu $t9, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055580u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20u); } - PGXP_LOAD(0x94B901AAu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D584: 3109003F andi $t1, $t0, 0x3F */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3Fu; - PGXP_ALU(0x3109003Fu, cpu->gpr[9], _pgx1, 0x003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80055584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3D588: 00095200 sll $t2, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 8u; - PGXP_ALU(0x00095200u, cpu->gpr[10], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80055588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D58C: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005558Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001800u); -#endif - /* 0xBFC3D590: 032B6025 or $t4, $t9, $t3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[25] | cpu->gpr[11]; - PGXP_ALU(0x032B6025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020u); -#endif - /* 0xBFC3D594: A4AC01AA sh $t4, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055594u); return; } g_debug_last_store_pc = 0x80055594u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA4AC01AAu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055594u); -#endif -label_BFC3D598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D598: 14600004 bne $v1, $zero, 0xBFC3D5AC */ - uint32_t psx_brA_BFC3D598 = cpu->gpr[3]; uint32_t psx_brB_BFC3D598 = cpu->gpr[0]; - psx_taken_BFC3D598 = (psx_brA_BFC3D598 != psx_brB_BFC3D598); - psx_delay_BFC3D598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D59C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005559Cu); -#endif - if (psx_delay_BFC3D598) { - psx_delay_BFC3D598 = 0; - if (psx_taken_BFC3D598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555ACu); - goto label_BFC3D5AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555A0u); - } -label_BFC3D5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004u); -#endif - /* 0xBFC3D5A0: 304D2000 andi $t5, $v0, 0x2000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[13] = cpu->gpr[2] & 0x2000u; - PGXP_ALU(0x304D2000u, cpu->gpr[13], _pgx1, 0x2000u); } -#ifdef PSX_COSIM - cosim_instr(0x800555A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3D5A4: 11A0000C beq $t5, $zero, 0xBFC3D5D8 */ - uint32_t psx_brA_BFC3D5A4 = cpu->gpr[13]; uint32_t psx_brB_BFC3D5A4 = cpu->gpr[0]; - psx_taken_BFC3D5A4 = (psx_brA_BFC3D5A4 == psx_brB_BFC3D5A4); - psx_delay_BFC3D5A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D5A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800555A8u); -#endif - if (psx_delay_BFC3D5A4) { - psx_delay_BFC3D5A4 = 0; - if (psx_taken_BFC3D5A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555D8u); - goto label_BFC3D5D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555ACu); - } -label_BFC3D5AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D5ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555ACu); -#endif - /* 0xBFC3D5AC: 94AE01AA lhu $t6, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555ACu); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x94AE01AAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800555ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D5B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800555B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D5B4: 31CFFF7F andi $t7, $t6, 0xFF7F */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFF7Fu; - PGXP_ALU(0x31CFFF7Fu, cpu->gpr[15], _pgx1, 0xFF7Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800555B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D5B8: A4AF01AA sh $t7, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555B8u); return; } g_debug_last_store_pc = 0x800555B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01AAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800555B8u); -#endif - /* 0xBFC3D5BC: 94880026 lhu $t0, 38($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 38; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555BCu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880026u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800555BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555C0u); -#endif - /* 0xBFC3D5C0: 94B801AA lhu $t8, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555C0u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x94B801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800555C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D5C4: 31090001 andi $t1, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800555C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3D5C8: 000951C0 sll $t2, $t1, 7 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 7u; - PGXP_ALU(0x000951C0u, cpu->gpr[10], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x800555C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000400u); -#endif - /* 0xBFC3D5CC: 3159FFFF andi $t9, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x3159FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800555CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000800u); -#endif - /* 0xBFC3D5D0: 03195825 or $t3, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[11] = cpu->gpr[24] | cpu->gpr[25]; - PGXP_ALU(0x03195825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800555D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3D5D4: A4AB01AA sh $t3, 426($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 426; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555D4u); return; } g_debug_last_store_pc = 0x800555D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA4AB01AAu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800555D4u); -#endif -label_BFC3D5D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D5D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D5D8: 14600004 bne $v1, $zero, 0xBFC3D5EC */ - uint32_t psx_brA_BFC3D5D8 = cpu->gpr[3]; uint32_t psx_brB_BFC3D5D8 = cpu->gpr[0]; - psx_taken_BFC3D5D8 = (psx_brA_BFC3D5D8 != psx_brB_BFC3D5D8); - psx_delay_BFC3D5D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D5DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800555DCu); -#endif - if (psx_delay_BFC3D5D8) { - psx_delay_BFC3D5D8 = 0; - if (psx_taken_BFC3D5D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555ECu); - goto label_BFC3D5EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555E0u); - } -label_BFC3D5E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D5E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC3D5E0: 304C4000 andi $t4, $v0, 0x4000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x4000u; - PGXP_ALU(0x304C4000u, cpu->gpr[12], _pgx1, 0x4000u); } -#ifdef PSX_COSIM - cosim_instr(0x800555E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D5E4: 1180000C beq $t4, $zero, 0xBFC3D618 */ - uint32_t psx_brA_BFC3D5E4 = cpu->gpr[12]; uint32_t psx_brB_BFC3D5E4 = cpu->gpr[0]; - psx_taken_BFC3D5E4 = (psx_brA_BFC3D5E4 == psx_brB_BFC3D5E4); - psx_delay_BFC3D5E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D5E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800555E8u); -#endif - if (psx_delay_BFC3D5E4) { - psx_delay_BFC3D5E4 = 0; - if (psx_taken_BFC3D5E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055618u); - goto label_BFC3D618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800555ECu); - } -label_BFC3D5EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D5ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555ECu); -#endif - /* 0xBFC3D5EC: 94AD01AC lhu $t5, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555ECu); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20u); } - PGXP_LOAD(0x94AD01ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800555ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800555F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D5F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800555F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3D5F4: 31AEFFF1 andi $t6, $t5, 0xFFF1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFF1u; - PGXP_ALU(0x31AEFFF1u, cpu->gpr[14], _pgx1, 0xFFF1u); } -#ifdef PSX_COSIM - cosim_instr(0x800555F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC3D5F8: A4AE01AC sh $t6, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555F8u); return; } g_debug_last_store_pc = 0x800555F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA4AE01ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800555F8u); -#endif - /* 0xBFC3D5FC: 94880028 lhu $t0, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800555FCu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x94880028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800555FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055600u); -#endif - /* 0xBFC3D600: 94AF01AC lhu $t7, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055600u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20u); } - PGXP_LOAD(0x94AF01ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D604: 31090007 andi $t1, $t0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x7u; - PGXP_ALU(0x31090007u, cpu->gpr[9], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3D608: 00095040 sll $t2, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 1u; - PGXP_ALU(0x00095040u, cpu->gpr[10], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80055608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000400u); -#endif - /* 0xBFC3D60C: 3158FFFF andi $t8, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x3158FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005560Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008000u); -#endif - /* 0xBFC3D610: 01F8C825 or $t9, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[15] | cpu->gpr[24]; - PGXP_ALU(0x01F8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3D614: A4B901AC sh $t9, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055614u); return; } g_debug_last_store_pc = 0x80055614u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4B901ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055614u); -#endif -label_BFC3D618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D618: 14600004 bne $v1, $zero, 0xBFC3D62C */ - uint32_t psx_brA_BFC3D618 = cpu->gpr[3]; uint32_t psx_brB_BFC3D618 = cpu->gpr[0]; - psx_taken_BFC3D618 = (psx_brA_BFC3D618 != psx_brB_BFC3D618); - psx_delay_BFC3D618 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D61C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005561Cu); -#endif - if (psx_delay_BFC3D618) { - psx_delay_BFC3D618 = 0; - if (psx_taken_BFC3D618) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005562Cu); - goto label_BFC3D62C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055620u); - } -label_BFC3D620: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D620u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3D620: 304B8000 andi $t3, $v0, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8000u; - PGXP_ALU(0x304B8000u, cpu->gpr[11], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80055620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3D624: 1160000B beq $t3, $zero, 0xBFC3D654 */ - uint32_t psx_brA_BFC3D624 = cpu->gpr[11]; uint32_t psx_brB_BFC3D624 = cpu->gpr[0]; - psx_taken_BFC3D624 = (psx_brA_BFC3D624 == psx_brB_BFC3D624); - psx_delay_BFC3D624 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D628: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055628u); -#endif - if (psx_delay_BFC3D624) { - psx_delay_BFC3D624 = 0; - if (psx_taken_BFC3D624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055654u); - goto label_BFC3D654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005562Cu); - } -label_BFC3D62C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D62Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005562Cu); -#endif - /* 0xBFC3D62C: 94AC01AC lhu $t4, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005562Cu); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x94AC01ACu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005562Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D630: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3D634: 318DFFFE andi $t5, $t4, 0xFFFE */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFEu; - PGXP_ALU(0x318DFFFEu, cpu->gpr[13], _pgx1, 0xFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80055634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3D638: A4AD01AC sh $t5, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055638u); return; } g_debug_last_store_pc = 0x80055638u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA4AD01ACu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055638u); -#endif - /* 0xBFC3D63C: 9488002A lhu $t0, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005563Cu); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x10u); } - PGXP_LOAD(0x9488002Au, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005563Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055640u); -#endif - /* 0xBFC3D640: 94AE01AC lhu $t6, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055640u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x94AE01ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D644: 31090001 andi $t1, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3D648: 312AFFFF andi $t2, $t1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFFFu; - PGXP_ALU(0x312AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC400u); -#endif - /* 0xBFC3D64C: 01CA7825 or $t7, $t6, $t2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[14] | cpu->gpr[10]; - PGXP_ALU(0x01CA7825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005564Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3D650: A4AF01AC sh $t7, 428($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055650u); return; } g_debug_last_store_pc = 0x80055650u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4AF01ACu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055650u); -#endif -label_BFC3D654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3D654: 03E00008 jr $ra */ - psx_delay_BFC3D654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D658: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055658u); -#endif - if (psx_delay_BFC3D654) { - psx_delay_BFC3D654 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3D65C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3D65Cu); - int psx_delay_BFC3D6D4 = 0; - int psx_taken_BFC3D6D4 = 0; - int psx_delay_BFC3D6E0 = 0; - int psx_taken_BFC3D6E0 = 0; - int psx_delay_BFC3D6FC = 0; - int psx_taken_BFC3D6FC = 0; - int psx_delay_BFC3D704 = 0; - int psx_taken_BFC3D704 = 0; - int psx_delay_BFC3D73C = 0; - int psx_taken_BFC3D73C = 0; - int psx_delay_BFC3D744 = 0; - int psx_taken_BFC3D744 = 0; - int psx_delay_BFC3D75C = 0; - int psx_taken_BFC3D75C = 0; - int psx_delay_BFC3D764 = 0; - int psx_taken_BFC3D764 = 0; - int psx_delay_BFC3D790 = 0; - int psx_taken_BFC3D790 = 0; - int psx_delay_BFC3D79C = 0; - int psx_taken_BFC3D79C = 0; - int psx_delay_BFC3D7C8 = 0; - int psx_taken_BFC3D7C8 = 0; - int psx_delay_BFC3D7D4 = 0; - int psx_taken_BFC3D7D4 = 0; - int psx_delay_BFC3D808 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3D6DCu: goto label_BFC3D6DC; - case 0xBFC3D6E8u: goto label_BFC3D6E8; - case 0xBFC3D6F0u: goto label_BFC3D6F0; - case 0xBFC3D704u: goto label_BFC3D704; - case 0xBFC3D70Cu: goto label_BFC3D70C; - case 0xBFC3D710u: goto label_BFC3D710; - case 0xBFC3D744u: goto label_BFC3D744; - case 0xBFC3D74Cu: goto label_BFC3D74C; - case 0xBFC3D750u: goto label_BFC3D750; - case 0xBFC3D764u: goto label_BFC3D764; - case 0xBFC3D76Cu: goto label_BFC3D76C; - case 0xBFC3D770u: goto label_BFC3D770; - case 0xBFC3D798u: goto label_BFC3D798; - case 0xBFC3D7A4u: goto label_BFC3D7A4; - case 0xBFC3D7A8u: goto label_BFC3D7A8; - case 0xBFC3D7D0u: goto label_BFC3D7D0; - case 0xBFC3D7DCu: goto label_BFC3D7DC; - case 0xBFC3D7E0u: goto label_BFC3D7E0; - default: break; - } - } -label_BFC3D65C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D65Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3D65C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005565Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055660u); -#endif - /* 0xBFC3D660: 8C6397A0 lw $v1, -26720($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -26720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-26720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055660u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C6397A0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D664: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055664u); -#endif - /* 0xBFC3D668: 946E0180 lhu $t6, 384($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 384; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055668u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E0180u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D66C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005566Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D670: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3D674: A48F0004 sh $t7, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055674u); return; } g_debug_last_store_pc = 0x80055674u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055674u); -#endif - /* 0xBFC3D678: 94780182 lhu $t8, 386($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 386; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (386)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055678u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x94780182u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D67C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005567Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D680: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3D684: A4990006 sh $t9, 6($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055684u); return; } g_debug_last_store_pc = 0x80055684u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4990006u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055684u); -#endif - /* 0xBFC3D688: 94680184 lhu $t0, 388($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 388; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055688u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x94680184u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80055688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D68C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005568Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D690: 3109FFFF andi $t1, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFFFu; - PGXP_ALU(0x3109FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3D694: A4890008 sh $t1, 8($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055694u); return; } g_debug_last_store_pc = 0x80055694u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4890008u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055694u); -#endif - /* 0xBFC3D698: 946A0186 lhu $t2, 390($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 390; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055698u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A0186u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D69C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005569Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D6A0: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800556A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3D6A4: A48B000A sh $t3, 10($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 10; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556A4u); return; } g_debug_last_store_pc = 0x800556A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B000Au, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800556A4u); -#endif - /* 0xBFC3D6A8: 946C01B0 lhu $t4, 432($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 432; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (432)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556A8u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C01B0u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800556A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800556ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3D6B0: 318DFFFF andi $t5, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu; - PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800556B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC3D6B4: A48D000C sh $t5, 12($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (12)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556B4u); return; } g_debug_last_store_pc = 0x800556B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D000Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800556B4u); -#endif - /* 0xBFC3D6B8: 946E01B2 lhu $t6, 434($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 434; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (434)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556B8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E01B2u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800556B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800556BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D6C0: 31CFFFFF andi $t7, $t6, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFFFu; - PGXP_ALU(0x31CFFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800556C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3D6C4: A48F000E sh $t7, 14($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556C4u); return; } g_debug_last_store_pc = 0x800556C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA48F000Eu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800556C4u); -#endif - /* 0xBFC3D6C8: 947801AA lhu $t8, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556C8u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x947801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800556C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800556CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D6D0: 33190004 andi $t9, $t8, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x4u; - PGXP_ALU(0x33190004u, cpu->gpr[25], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800556D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3D6D4: 13200004 beq $t9, $zero, 0xBFC3D6E8 */ - uint32_t psx_brA_BFC3D6D4 = cpu->gpr[25]; uint32_t psx_brB_BFC3D6D4 = cpu->gpr[0]; - psx_taken_BFC3D6D4 = (psx_brA_BFC3D6D4 == psx_brB_BFC3D6D4); - psx_delay_BFC3D6D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800556D8u); -#endif - if (psx_delay_BFC3D6D4) { - psx_delay_BFC3D6D4 = 0; - if (psx_taken_BFC3D6D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800556E8u); - goto label_BFC3D6E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800556DCu); - } -label_BFC3D6DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D6DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D6DC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800556DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6E0: 10000003 beq $zero, $zero, 0xBFC3D6F0 */ - uint32_t psx_brA_BFC3D6E0 = cpu->gpr[0]; uint32_t psx_brB_BFC3D6E0 = cpu->gpr[0]; - psx_taken_BFC3D6E0 = (psx_brA_BFC3D6E0 == psx_brB_BFC3D6E0); - psx_delay_BFC3D6E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3D6E4: AC820010 sw $v0, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800556E4u); return; } g_debug_last_store_pc = 0x800556E4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC820010u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800556E4u); -#endif - if (psx_delay_BFC3D6E0) { - psx_delay_BFC3D6E0 = 0; - if (psx_taken_BFC3D6E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800556F0u); - goto label_BFC3D6F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800556E8u); - } -label_BFC3D6E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D6E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D6E8: AC800010 sw $zero, 16($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800556E8u); return; } g_debug_last_store_pc = 0x800556E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800010u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800556E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D6EC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800556ECu); -#endif -label_BFC3D6F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D6F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800556F0u); -#endif - /* 0xBFC3D6F0: 946801AA lhu $t0, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800556F0u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x946801AAu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800556F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D6F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800556F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D6F8: 31090001 andi $t1, $t0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x1u; - PGXP_ALU(0x31090001u, cpu->gpr[9], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800556F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3D6FC: 11200003 beq $t1, $zero, 0xBFC3D70C */ - uint32_t psx_brA_BFC3D6FC = cpu->gpr[9]; uint32_t psx_brB_BFC3D6FC = cpu->gpr[0]; - psx_taken_BFC3D6FC = (psx_brA_BFC3D6FC == psx_brB_BFC3D6FC); - psx_delay_BFC3D6FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D700: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055700u); -#endif - if (psx_delay_BFC3D6FC) { - psx_delay_BFC3D6FC = 0; - if (psx_taken_BFC3D6FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005570Cu); - goto label_BFC3D70C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055704u); - } -label_BFC3D704: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D704u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D704: 10000002 beq $zero, $zero, 0xBFC3D710 */ - uint32_t psx_brA_BFC3D704 = cpu->gpr[0]; uint32_t psx_brB_BFC3D704 = cpu->gpr[0]; - psx_taken_BFC3D704 = (psx_brA_BFC3D704 == psx_brB_BFC3D704); - psx_delay_BFC3D704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3D708: AC820014 sw $v0, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055708u); return; } g_debug_last_store_pc = 0x80055708u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC820014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055708u); -#endif - if (psx_delay_BFC3D704) { - psx_delay_BFC3D704 = 0; - if (psx_taken_BFC3D704) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055710u); - goto label_BFC3D710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005570Cu); - } -label_BFC3D70C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D70Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005570Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D70C: AC800014 sw $zero, 20($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005570Cu); return; } g_debug_last_store_pc = 0x8005570Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800014u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005570Cu); -#endif -label_BFC3D710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055710u); -#endif - /* 0xBFC3D710: 946A01B4 lhu $t2, 436($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 436; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (436)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055710u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A01B4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D714: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D718: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC3D71C: A48B0018 sh $t3, 24($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005571Cu); return; } g_debug_last_store_pc = 0x8005571Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[11] & 0xFFFFu)); } - PGXP_STORE(0xA48B0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005571Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055720u); -#endif - /* 0xBFC3D720: 946C01B6 lhu $t4, 438($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 438; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (438)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055720u); return; } cpu->gpr[12] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x8u); } - PGXP_LOAD(0x946C01B6u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D724: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3D728: 318DFFFF andi $t5, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[12] & 0xFFFFu; - PGXP_ALU(0x318DFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC3D72C: A48D001A sh $t5, 26($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (26)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005572Cu); return; } g_debug_last_store_pc = 0x8005572Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D001Au, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005572Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055730u); -#endif - /* 0xBFC3D730: 946E01AA lhu $t6, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055730u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E01AAu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D734: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D738: 31CF0008 andi $t7, $t6, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u; - PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3D73C: 11E00003 beq $t7, $zero, 0xBFC3D74C */ - uint32_t psx_brA_BFC3D73C = cpu->gpr[15]; uint32_t psx_brB_BFC3D73C = cpu->gpr[0]; - psx_taken_BFC3D73C = (psx_brA_BFC3D73C == psx_brB_BFC3D73C); - psx_delay_BFC3D73C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D740: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055740u); -#endif - if (psx_delay_BFC3D73C) { - psx_delay_BFC3D73C = 0; - if (psx_taken_BFC3D73C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005574Cu); - goto label_BFC3D74C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055744u); - } -label_BFC3D744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D744: 10000002 beq $zero, $zero, 0xBFC3D750 */ - uint32_t psx_brA_BFC3D744 = cpu->gpr[0]; uint32_t psx_brB_BFC3D744 = cpu->gpr[0]; - psx_taken_BFC3D744 = (psx_brA_BFC3D744 == psx_brB_BFC3D744); - psx_delay_BFC3D744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3D748: AC82001C sw $v0, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055748u); return; } g_debug_last_store_pc = 0x80055748u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC82001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055748u); -#endif - if (psx_delay_BFC3D744) { - psx_delay_BFC3D744 = 0; - if (psx_taken_BFC3D744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055750u); - goto label_BFC3D750; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005574Cu); - } -label_BFC3D74C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D74Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005574Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D74C: AC80001C sw $zero, 28($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005574Cu); return; } g_debug_last_store_pc = 0x8005574Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC80001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005574Cu); -#endif -label_BFC3D750: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D750u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055750u); -#endif - /* 0xBFC3D750: 947801AA lhu $t8, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055750u); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x947801AAu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D754: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D758: 33190002 andi $t9, $t8, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x2u; - PGXP_ALU(0x33190002u, cpu->gpr[25], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80055758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3D75C: 13200003 beq $t9, $zero, 0xBFC3D76C */ - uint32_t psx_brA_BFC3D75C = cpu->gpr[25]; uint32_t psx_brB_BFC3D75C = cpu->gpr[0]; - psx_taken_BFC3D75C = (psx_brA_BFC3D75C == psx_brB_BFC3D75C); - psx_delay_BFC3D75C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D760: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055760u); -#endif - if (psx_delay_BFC3D75C) { - psx_delay_BFC3D75C = 0; - if (psx_taken_BFC3D75C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005576Cu); - goto label_BFC3D76C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055764u); - } -label_BFC3D764: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D764u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D764: 10000002 beq $zero, $zero, 0xBFC3D770 */ - uint32_t psx_brA_BFC3D764 = cpu->gpr[0]; uint32_t psx_brB_BFC3D764 = cpu->gpr[0]; - psx_taken_BFC3D764 = (psx_brA_BFC3D764 == psx_brB_BFC3D764); - psx_delay_BFC3D764 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3D768: AC820020 sw $v0, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055768u); return; } g_debug_last_store_pc = 0x80055768u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC820020u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055768u); -#endif - if (psx_delay_BFC3D764) { - psx_delay_BFC3D764 = 0; - if (psx_taken_BFC3D764) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055770u); - goto label_BFC3D770; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005576Cu); - } -label_BFC3D76C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D76Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005576Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D76C: AC800020 sw $zero, 32($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005576Cu); return; } g_debug_last_store_pc = 0x8005576Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC800020u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005576Cu); -#endif -label_BFC3D770: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D770u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055770u); -#endif - /* 0xBFC3D770: 946801AA lhu $t0, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055770u); return; } cpu->gpr[8] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x946801AAu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80055770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D774: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3D778: 31093F00 andi $t1, $t0, 0x3F00 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0x3F00u; - PGXP_ALU(0x31093F00u, cpu->gpr[9], _pgx1, 0x3F00u); } -#ifdef PSX_COSIM - cosim_instr(0x80055778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3D77C: 00095202 srl $t2, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] >> 8u; - PGXP_ALU(0x00095202u, cpu->gpr[10], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005577Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC3D780: A48A0024 sh $t2, 36($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (36)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055780u); return; } g_debug_last_store_pc = 0x80055780u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA48A0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055780u); -#endif - /* 0xBFC3D784: 946B01AA lhu $t3, 426($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 426; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (426)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055784u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x946B01AAu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D788: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3D78C: 316C0080 andi $t4, $t3, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] & 0x80u; - PGXP_ALU(0x316C0080u, cpu->gpr[12], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x8005578Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D790: 11800004 beq $t4, $zero, 0xBFC3D7A4 */ - uint32_t psx_brA_BFC3D790 = cpu->gpr[12]; uint32_t psx_brB_BFC3D790 = cpu->gpr[0]; - psx_taken_BFC3D790 = (psx_brA_BFC3D790 == psx_brB_BFC3D790); - psx_delay_BFC3D790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D794: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055794u); -#endif - if (psx_delay_BFC3D790) { - psx_delay_BFC3D790 = 0; - if (psx_taken_BFC3D790) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557A4u); - goto label_BFC3D7A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055798u); - } -label_BFC3D798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3D798: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D79C: 10000002 beq $zero, $zero, 0xBFC3D7A8 */ - uint32_t psx_brA_BFC3D79C = cpu->gpr[0]; uint32_t psx_brB_BFC3D79C = cpu->gpr[0]; - psx_taken_BFC3D79C = (psx_brA_BFC3D79C == psx_brB_BFC3D79C); - psx_delay_BFC3D79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC3D7A0: A48D0026 sh $t5, 38($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557A0u); return; } g_debug_last_store_pc = 0x800557A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[13] & 0xFFFFu)); } - PGXP_STORE(0xA48D0026u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800557A0u); -#endif - if (psx_delay_BFC3D79C) { - psx_delay_BFC3D79C = 0; - if (psx_taken_BFC3D79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557A8u); - goto label_BFC3D7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557A4u); - } -label_BFC3D7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D7A4: A4800026 sh $zero, 38($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 38; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (38)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557A4u); return; } g_debug_last_store_pc = 0x800557A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4800026u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800557A4u); -#endif -label_BFC3D7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557A8u); -#endif - /* 0xBFC3D7A8: 946E01AC lhu $t6, 428($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557A8u); return; } cpu->gpr[14] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x946E01ACu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800557A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D7AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800557ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D7B0: 31CF000E andi $t7, $t6, 0xE */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xEu; - PGXP_ALU(0x31CF000Eu, cpu->gpr[15], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800557B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3D7B4: 000FC042 srl $t8, $t7, 1 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] >> 1u; - PGXP_ALU(0x000FC042u, cpu->gpr[24], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x800557B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC3D7B8: A4980028 sh $t8, 40($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (40)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557B8u); return; } g_debug_last_store_pc = 0x800557B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA4980028u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800557B8u); -#endif - /* 0xBFC3D7BC: 947901AC lhu $t9, 428($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557BCu); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x947901ACu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800557BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D7C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800557C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3D7C4: 33280001 andi $t0, $t9, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x1u; - PGXP_ALU(0x33280001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x800557C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D7C8: 11000004 beq $t0, $zero, 0xBFC3D7DC */ - uint32_t psx_brA_BFC3D7C8 = cpu->gpr[8]; uint32_t psx_brB_BFC3D7C8 = cpu->gpr[0]; - psx_taken_BFC3D7C8 = (psx_brA_BFC3D7C8 == psx_brB_BFC3D7C8); - psx_delay_BFC3D7C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D7CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800557CCu); -#endif - if (psx_delay_BFC3D7C8) { - psx_delay_BFC3D7C8 = 0; - if (psx_taken_BFC3D7C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557DCu); - goto label_BFC3D7DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557D0u); - } -label_BFC3D7D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D7D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3D7D0: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800557D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D7D4: 10000002 beq $zero, $zero, 0xBFC3D7E0 */ - uint32_t psx_brA_BFC3D7D4 = cpu->gpr[0]; uint32_t psx_brB_BFC3D7D4 = cpu->gpr[0]; - psx_taken_BFC3D7D4 = (psx_brA_BFC3D7D4 == psx_brB_BFC3D7D4); - psx_delay_BFC3D7D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x210u); -#endif - /* 0xBFC3D7D8: A489002A sh $t1, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557D8u); return; } g_debug_last_store_pc = 0x800557D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA489002Au, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800557D8u); -#endif - if (psx_delay_BFC3D7D4) { - psx_delay_BFC3D7D4 = 0; - if (psx_taken_BFC3D7D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557E0u); - goto label_BFC3D7E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800557DCu); - } -label_BFC3D7DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D7DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3D7DC: A480002A sh $zero, 42($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 42; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (42)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557DCu); return; } g_debug_last_store_pc = 0x800557DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA480002Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800557DCu); -#endif -label_BFC3D7E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D7E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D7E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557E0u); -#endif - /* 0xBFC3D7E0: 946A019E lhu $t2, 414($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 414; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (414)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557E0u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x8u); } - PGXP_LOAD(0x946A019Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800557E0u); -#endif - /* 0xBFC3D7E4: 946D019C lhu $t5, 412($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (412)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557E4u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x946D019Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800557E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D7E8: 314BFFFF andi $t3, $t2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0xFFFFu; - PGXP_ALU(0x314BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800557E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3D7EC: 000B6400 sll $t4, $t3, 16 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 16u; - PGXP_ALU(0x000B6400u, cpu->gpr[12], _pgx1, 16u); } -#ifdef PSX_COSIM - cosim_instr(0x800557ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800557F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3D7F0: 31AEFFFF andi $t6, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0xFFFFu; - PGXP_ALU(0x31AEFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800557F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xD000u); -#endif - /* 0xBFC3D7F4: 018E7821 addu $t7, $t4, $t6 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[12] + cpu->gpr[14]; - PGXP_ALU(0x018E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800557F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3D7F8: AC8F002C sw $t7, 44($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800557F8u); return; } g_debug_last_store_pc = 0x800557F8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC8F002Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800557F8u); -#endif - /* 0xBFC3D7FC: 947801AE lhu $t8, 430($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 430; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (430)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800557FCu); return; } cpu->gpr[24] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x947801AEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800557FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D800: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D804: 3319FFFF andi $t9, $t8, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0xFFFFu; - PGXP_ALU(0x3319FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3D808: 03E00008 jr $ra */ - psx_delay_BFC3D808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3D80C: A4990030 sh $t9, 48($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (48)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005580Cu); return; } g_debug_last_store_pc = 0x8005580Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4990030u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005580Cu); -#endif - if (psx_delay_BFC3D808) { - psx_delay_BFC3D808 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3D810(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3D810u); - int psx_delay_BFC3D834 = 0; - int psx_taken_BFC3D834 = 0; - int psx_delay_BFC3D83C = 0; - int psx_taken_BFC3D83C = 0; - int psx_delay_BFC3D848 = 0; - int psx_delay_BFC3D85C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3D828u: goto label_BFC3D828; - case 0xBFC3D83Cu: goto label_BFC3D83C; - case 0xBFC3D844u: goto label_BFC3D844; - case 0xBFC3D848u: goto label_BFC3D848; - case 0xBFC3D850u: goto label_BFC3D850; - default: break; - } - } -label_BFC3D810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3D810: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80055810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3D814: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055814u); return; } g_debug_last_store_pc = 0x80055814u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3D818: 00A02021 addu $a0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3D81C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005581Cu); return; } g_debug_last_store_pc = 0x8005581Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005581Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3D820: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3D824: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055824u); -#endif -label_BFC3D828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055828u); -#endif - /* 0xBFC3D828: 904E0001 lbu $t6, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 14, 0x4u); - PGXP_LOAD(0x904E0001u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3D82C: 24630010 addiu $v1, $v1, 16 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16)); - PGXP_ALU(0x24630010u, cpu->gpr[3], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005582Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3D830: 31CF0001 andi $t7, $t6, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x1u; - PGXP_ALU(0x31CF0001u, cpu->gpr[15], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3D834: 15E00004 bne $t7, $zero, 0xBFC3D848 */ - uint32_t psx_brA_BFC3D834 = cpu->gpr[15]; uint32_t psx_brB_BFC3D834 = cpu->gpr[0]; - psx_taken_BFC3D834 = (psx_brA_BFC3D834 != psx_brB_BFC3D834); - psx_delay_BFC3D834 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC3D838: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055838u); -#endif - if (psx_delay_BFC3D834) { - psx_delay_BFC3D834 = 0; - if (psx_taken_BFC3D834) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055848u); - goto label_BFC3D848; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005583Cu); - } -label_BFC3D83C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D83Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D83Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005583Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D83C: 1000FFFA beq $zero, $zero, 0xBFC3D828 */ - uint32_t psx_brA_BFC3D83C = cpu->gpr[0]; uint32_t psx_brB_BFC3D83C = cpu->gpr[0]; - psx_taken_BFC3D83C = (psx_brA_BFC3D83C == psx_brB_BFC3D83C); - psx_delay_BFC3D83C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3D840: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x80055840u); -#endif - if (psx_delay_BFC3D83C) { - psx_delay_BFC3D83C = 0; - if (psx_taken_BFC3D83C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055828u); - goto label_BFC3D828; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055844u); - } -label_BFC3D844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x29u); -#endif - /* 0xBFC3D844: 00602821 addu $a1, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00602821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055844u); -#endif -label_BFC3D848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3D848: 0C01510A jal 0xB0054428 */ - cpu->gpr[31] = 0x80055850u; /* jal link before delay slot */ - psx_delay_BFC3D848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3D84C: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005584Cu); return; } g_debug_last_store_pc = 0x8005584Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005584Cu); -#endif - if (psx_delay_BFC3D848) { - psx_delay_BFC3D848 = 0; - cpu->gpr[31] = 0x80055850u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054428u); - cpu->pc = 0x80054428u; return; - } -label_BFC3D850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055850u); -#endif - /* 0xBFC3D850: 8FA30018 lw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055850u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055850u); -#endif - /* 0xBFC3D854: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055854u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3D858: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80055858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3D85C: 03E00008 jr $ra */ - psx_delay_BFC3D85C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3D860: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055860u); -#endif - if (psx_delay_BFC3D85C) { - psx_delay_BFC3D85C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3D870(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3D870u); - int psx_delay_BFC3D89C = 0; - int psx_delay_BFC3D8B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3D8A4u: goto label_BFC3D8A4; - default: break; - } - } -label_BFC3D870: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D870u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3D870: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D874: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3D878: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80055878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3D87C: AC239F1C sw $v1, -24804($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24804; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24804)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005587Cu); return; } g_debug_last_store_pc = 0x8005587Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239F1Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005587Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3D880: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3D884: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055884u); return; } g_debug_last_store_pc = 0x80055884u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D888: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055888u); -#endif - /* 0xBFC3D88C: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005588Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005588Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3D890: AC239F2C sw $v1, -24788($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24788; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055890u); return; } g_debug_last_store_pc = 0x80055890u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239F2Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3D894: 27A60018 addiu $a2, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A60018u, cpu->gpr[6], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80055894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3D898: AFA30018 sw $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055898u); return; } g_debug_last_store_pc = 0x80055898u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3D89C: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x800558A4u; /* jal link before delay slot */ - psx_delay_BFC3D89C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3D8A0: 24050060 addiu $a1, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24050060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x800558A0u); -#endif - if (psx_delay_BFC3D89C) { - psx_delay_BFC3D89C = 0; - cpu->gpr[31] = 0x800558A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3D8A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D8A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558A4u); -#endif - /* 0xBFC3D8A4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800558A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3D8A8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800558A8u); -#endif - /* 0xBFC3D8AC: 8C429F1C lw $v0, -24804($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -24804; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-24804)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429F1Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800558ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3D8B0: 03E00008 jr $ra */ - psx_delay_BFC3D8B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3D8B4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800558B4u); -#endif - if (psx_delay_BFC3D8B0) { - psx_delay_BFC3D8B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3D8C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3D8C0u); - int psx_delay_BFC3D8D4 = 0; - int psx_taken_BFC3D8D4 = 0; - int psx_delay_BFC3D8DC = 0; - int psx_taken_BFC3D8DC = 0; - int psx_delay_BFC3D930 = 0; - int psx_delay_BFC3D948 = 0; - int psx_taken_BFC3D948 = 0; - int psx_delay_BFC3D96C = 0; - int psx_delay_BFC3D984 = 0; - int psx_taken_BFC3D984 = 0; - int psx_delay_BFC3D998 = 0; - int psx_taken_BFC3D998 = 0; - int psx_delay_BFC3D9B4 = 0; - int psx_taken_BFC3D9B4 = 0; - int psx_delay_BFC3D9BC = 0; - int psx_taken_BFC3D9BC = 0; - int psx_delay_BFC3D9D8 = 0; - int psx_delay_BFC3D9E4 = 0; - int psx_taken_BFC3D9E4 = 0; - int psx_delay_BFC3DA04 = 0; - int psx_taken_BFC3DA04 = 0; - int psx_delay_BFC3DA50 = 0; - int psx_delay_BFC3DA80 = 0; - int psx_delay_BFC3DA8C = 0; - int psx_taken_BFC3DA8C = 0; - int psx_delay_BFC3DA94 = 0; - int psx_taken_BFC3DA94 = 0; - int psx_delay_BFC3DAB0 = 0; - int psx_taken_BFC3DAB0 = 0; - int psx_delay_BFC3DAC8 = 0; - int psx_taken_BFC3DAC8 = 0; - int psx_delay_BFC3DADC = 0; - int psx_taken_BFC3DADC = 0; - int psx_delay_BFC3DAE4 = 0; - int psx_taken_BFC3DAE4 = 0; - int psx_delay_BFC3DAEC = 0; - int psx_taken_BFC3DAEC = 0; - int psx_delay_BFC3DB18 = 0; - int psx_taken_BFC3DB18 = 0; - int psx_delay_BFC3DB2C = 0; - int psx_taken_BFC3DB2C = 0; - int psx_delay_BFC3DB34 = 0; - int psx_taken_BFC3DB34 = 0; - int psx_delay_BFC3DB44 = 0; - int psx_taken_BFC3DB44 = 0; - int psx_delay_BFC3DB74 = 0; - int psx_delay_BFC3DC00 = 0; - int psx_taken_BFC3DC00 = 0; - int psx_delay_BFC3DC14 = 0; - int psx_taken_BFC3DC14 = 0; - int psx_delay_BFC3DC1C = 0; - int psx_taken_BFC3DC1C = 0; - int psx_delay_BFC3DC30 = 0; - int psx_taken_BFC3DC30 = 0; - int psx_delay_BFC3DC44 = 0; - int psx_taken_BFC3DC44 = 0; - int psx_delay_BFC3DC4C = 0; - int psx_taken_BFC3DC4C = 0; - int psx_delay_BFC3DC5C = 0; - int psx_taken_BFC3DC5C = 0; - int psx_delay_BFC3DC6C = 0; - int psx_taken_BFC3DC6C = 0; - int psx_delay_BFC3DC9C = 0; - int psx_delay_BFC3DCAC = 0; - int psx_taken_BFC3DCAC = 0; - int psx_delay_BFC3DCF4 = 0; - int psx_taken_BFC3DCF4 = 0; - int psx_delay_BFC3DD08 = 0; - int psx_taken_BFC3DD08 = 0; - int psx_delay_BFC3DD10 = 0; - int psx_taken_BFC3DD10 = 0; - int psx_delay_BFC3DD24 = 0; - int psx_taken_BFC3DD24 = 0; - int psx_delay_BFC3DD34 = 0; - int psx_taken_BFC3DD34 = 0; - int psx_delay_BFC3DD44 = 0; - int psx_taken_BFC3DD44 = 0; - int psx_delay_BFC3DD5C = 0; - int psx_delay_BFC3DD74 = 0; - int psx_taken_BFC3DD74 = 0; - int psx_delay_BFC3DD84 = 0; - int psx_taken_BFC3DD84 = 0; - int psx_delay_BFC3DD98 = 0; - int psx_taken_BFC3DD98 = 0; - int psx_delay_BFC3DDC8 = 0; - int psx_taken_BFC3DDC8 = 0; - int psx_delay_BFC3DDDC = 0; - int psx_taken_BFC3DDDC = 0; - int psx_delay_BFC3DE0C = 0; - int psx_taken_BFC3DE0C = 0; - int psx_delay_BFC3DE20 = 0; - int psx_delay_BFC3DE30 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3D8DCu: goto label_BFC3D8DC; - case 0xBFC3D8E4u: goto label_BFC3D8E4; - case 0xBFC3D8E8u: goto label_BFC3D8E8; - case 0xBFC3D938u: goto label_BFC3D938; - case 0xBFC3D950u: goto label_BFC3D950; - case 0xBFC3D974u: goto label_BFC3D974; - case 0xBFC3D984u: goto label_BFC3D984; - case 0xBFC3D98Cu: goto label_BFC3D98C; - case 0xBFC3D9A0u: goto label_BFC3D9A0; - case 0xBFC3D9A4u: goto label_BFC3D9A4; - case 0xBFC3D9BCu: goto label_BFC3D9BC; - case 0xBFC3D9C4u: goto label_BFC3D9C4; - case 0xBFC3D9E0u: goto label_BFC3D9E0; - case 0xBFC3D9ECu: goto label_BFC3D9EC; - case 0xBFC3DA0Cu: goto label_BFC3DA0C; - case 0xBFC3DA1Cu: goto label_BFC3DA1C; - case 0xBFC3DA58u: goto label_BFC3DA58; - case 0xBFC3DA88u: goto label_BFC3DA88; - case 0xBFC3DA94u: goto label_BFC3DA94; - case 0xBFC3DA9Cu: goto label_BFC3DA9C; - case 0xBFC3DAB8u: goto label_BFC3DAB8; - case 0xBFC3DAD0u: goto label_BFC3DAD0; - case 0xBFC3DAE4u: goto label_BFC3DAE4; - case 0xBFC3DAECu: goto label_BFC3DAEC; - case 0xBFC3DAF4u: goto label_BFC3DAF4; - case 0xBFC3DB14u: goto label_BFC3DB14; - case 0xBFC3DB20u: goto label_BFC3DB20; - case 0xBFC3DB34u: goto label_BFC3DB34; - case 0xBFC3DB3Cu: goto label_BFC3DB3C; - case 0xBFC3DB4Cu: goto label_BFC3DB4C; - case 0xBFC3DB7Cu: goto label_BFC3DB7C; - case 0xBFC3DB8Cu: goto label_BFC3DB8C; - case 0xBFC3DC08u: goto label_BFC3DC08; - case 0xBFC3DC1Cu: goto label_BFC3DC1C; - case 0xBFC3DC24u: goto label_BFC3DC24; - case 0xBFC3DC28u: goto label_BFC3DC28; - case 0xBFC3DC2Cu: goto label_BFC3DC2C; - case 0xBFC3DC38u: goto label_BFC3DC38; - case 0xBFC3DC4Cu: goto label_BFC3DC4C; - case 0xBFC3DC54u: goto label_BFC3DC54; - case 0xBFC3DC64u: goto label_BFC3DC64; - case 0xBFC3DC74u: goto label_BFC3DC74; - case 0xBFC3DCA4u: goto label_BFC3DCA4; - case 0xBFC3DCB4u: goto label_BFC3DCB4; - case 0xBFC3DCB8u: goto label_BFC3DCB8; - case 0xBFC3DCC4u: goto label_BFC3DCC4; - case 0xBFC3DCFCu: goto label_BFC3DCFC; - case 0xBFC3DD10u: goto label_BFC3DD10; - case 0xBFC3DD18u: goto label_BFC3DD18; - case 0xBFC3DD20u: goto label_BFC3DD20; - case 0xBFC3DD2Cu: goto label_BFC3DD2C; - case 0xBFC3DD3Cu: goto label_BFC3DD3C; - case 0xBFC3DD4Cu: goto label_BFC3DD4C; - case 0xBFC3DD64u: goto label_BFC3DD64; - case 0xBFC3DD70u: goto label_BFC3DD70; - case 0xBFC3DD7Cu: goto label_BFC3DD7C; - case 0xBFC3DD8Cu: goto label_BFC3DD8C; - case 0xBFC3DDA0u: goto label_BFC3DDA0; - case 0xBFC3DDC4u: goto label_BFC3DDC4; - case 0xBFC3DDD0u: goto label_BFC3DDD0; - case 0xBFC3DDE4u: goto label_BFC3DDE4; - case 0xBFC3DE08u: goto label_BFC3DE08; - case 0xBFC3DE14u: goto label_BFC3DE14; - case 0xBFC3DE28u: goto label_BFC3DE28; - case 0xBFC3DE2Cu: goto label_BFC3DE2C; - default: break; - } - } -label_BFC3D8C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D8C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3D8C0: 27BDFF50 addiu $sp, $sp, -176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-176)); - PGXP_ALU(0x27BDFF50u, cpu->gpr[29], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x800558C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3D8C4: AFBF002C sw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558C4u); return; } g_debug_last_store_pc = 0x800558C4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800558C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC3D8C8: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800558C8u); -#endif - /* 0xBFC3D8CC: 8CE80000 lw $t0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558CCu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x80u); } - PGXP_LOAD(0x8CE80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800558CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D8D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800558D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3D8D4: 15000004 bne $t0, $zero, 0xBFC3D8E8 */ - uint32_t psx_brA_BFC3D8D4 = cpu->gpr[8]; uint32_t psx_brB_BFC3D8D4 = cpu->gpr[0]; - psx_taken_BFC3D8D4 = (psx_brA_BFC3D8D4 != psx_brB_BFC3D8D4); - psx_delay_BFC3D8D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D8D8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800558D8u); -#endif - if (psx_delay_BFC3D8D4) { - psx_delay_BFC3D8D4 = 0; - if (psx_taken_BFC3D8D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800558E8u); - goto label_BFC3D8E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800558DCu); - } -label_BFC3D8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D8DC: 10000002 beq $zero, $zero, 0xBFC3D8E8 */ - uint32_t psx_brA_BFC3D8DC = cpu->gpr[0]; uint32_t psx_brB_BFC3D8DC = cpu->gpr[0]; - psx_taken_BFC3D8DC = (psx_brA_BFC3D8DC == psx_brB_BFC3D8DC); - psx_delay_BFC3D8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D8E0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800558E0u); -#endif - if (psx_delay_BFC3D8DC) { - psx_delay_BFC3D8DC = 0; - if (psx_taken_BFC3D8DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800558E8u); - goto label_BFC3D8E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800558E4u); - } -label_BFC3D8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D8E4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800558E4u); -#endif -label_BFC3D8E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D8E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D8E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3D8E8: AFA20064 sw $v0, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558E8u); return; } g_debug_last_store_pc = 0x800558E8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20064u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800558E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3D8EC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800558ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800558F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D8F0: AFA00040 sw $zero, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558F0u); return; } g_debug_last_store_pc = 0x800558F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00040u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800558F0u); -#endif - /* 0xBFC3D8F4: 8DCE9BE0 lw $t6, -25632($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25632; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25632)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9BE0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800558F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D8F8: AFA0003C sw $zero, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558F8u); return; } g_debug_last_store_pc = 0x800558F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0003Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800558F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D8FC: AFA00038 sw $zero, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800558FCu); return; } g_debug_last_store_pc = 0x800558FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00038u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800558FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055900u); -#endif - /* 0xBFC3D900: 95C301AC lhu $v1, 428($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055900u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4000u); } - PGXP_LOAD(0x95C301ACu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D904: AFA0006C sw $zero, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055904u); return; } g_debug_last_store_pc = 0x80055904u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0006Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3D908: 3063000E andi $v1, $v1, 0xE */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xEu; - PGXP_ALU(0x3063000Eu, cpu->gpr[3], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80055908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3D90C: 00031842 srl $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 1u; - PGXP_ALU(0x00031842u, cpu->gpr[3], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005590Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3D910: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3D914: AFA80068 sw $t0, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055914u); return; } g_debug_last_store_pc = 0x80055914u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80068u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80055914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3D918: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055918u); -#endif - /* 0xBFC3D91C: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005591Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005591Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3D920: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055920u); return; } g_debug_last_store_pc = 0x80055920u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3D924: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055924u); return; } g_debug_last_store_pc = 0x80055924u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3D928: AFA20060 sw $v0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055928u); return; } g_debug_last_store_pc = 0x80055928u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20060u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3D92C: 2405006A addiu $a1, $zero, 106 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (106)); - PGXP_ALU(0x2405006Au, cpu->gpr[5], _pgx1, 0x0000006Au); } -#ifdef PSX_COSIM - cosim_instr(0x8005592Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3D930: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055938u; /* jal link before delay slot */ - psx_delay_BFC3D930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3D934: 27A60050 addiu $a2, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A60050u, cpu->gpr[6], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80055934u); -#endif - if (psx_delay_BFC3D930) { - psx_delay_BFC3D930 = 0; - cpu->gpr[31] = 0x80055938u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3D938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055938u); -#endif - /* 0xBFC3D938: 8FAF0050 lw $t7, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055938u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0050u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055938u); -#endif - /* 0xBFC3D93C: 8FA20060 lw $v0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005593Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20060u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005593Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055940u); -#endif - /* 0xBFC3D940: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055940u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055940u); -#endif - /* 0xBFC3D944: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055944u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3D948: 11E0000E beq $t7, $zero, 0xBFC3D984 */ - uint32_t psx_brA_BFC3D948 = cpu->gpr[15]; uint32_t psx_brB_BFC3D948 = cpu->gpr[0]; - psx_taken_BFC3D948 = (psx_brA_BFC3D948 == psx_brB_BFC3D948); - psx_delay_BFC3D948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D94C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005594Cu); -#endif - if (psx_delay_BFC3D948) { - psx_delay_BFC3D948 = 0; - if (psx_taken_BFC3D948) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055984u); - goto label_BFC3D984; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055950u); - } -label_BFC3D950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3D950: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D954: AFA0004C sw $zero, 76($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055954u); return; } g_debug_last_store_pc = 0x80055954u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0004Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055954u); -#endif - /* 0xBFC3D958: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055958u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC3D95C: AFA20060 sw $v0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005595Cu); return; } g_debug_last_store_pc = 0x8005595Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAFA20060u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005595Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3D960: AFA30034 sw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055960u); return; } g_debug_last_store_pc = 0x80055960u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3D964: 24050060 addiu $a1, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24050060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80055964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3D968: 27A6004C addiu $a2, $sp, 76 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); - PGXP_ALU(0x27A6004Cu, cpu->gpr[6], _pgx1, 0x0000004Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3D96C: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055974u; /* jal link before delay slot */ - psx_delay_BFC3D96C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3D970: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055970u); return; } g_debug_last_store_pc = 0x80055970u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055970u); -#endif - if (psx_delay_BFC3D96C) { - psx_delay_BFC3D96C = 0; - cpu->gpr[31] = 0x80055974u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3D974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055974u); -#endif - /* 0xBFC3D974: 8FA20060 lw $v0, 96($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055974u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20060u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055974u); -#endif - /* 0xBFC3D978: 8FA30034 lw $v1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055978u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA30034u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055978u); -#endif - /* 0xBFC3D97C: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005597Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005597Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D980: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055980u); -#endif -label_BFC3D984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D984: 14400007 bne $v0, $zero, 0xBFC3D9A4 */ - uint32_t psx_brA_BFC3D984 = cpu->gpr[2]; uint32_t psx_brB_BFC3D984 = cpu->gpr[0]; - psx_taken_BFC3D984 = (psx_brA_BFC3D984 != psx_brB_BFC3D984); - psx_delay_BFC3D984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3D988: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055988u); -#endif - if (psx_delay_BFC3D984) { - psx_delay_BFC3D984 = 0; - if (psx_taken_BFC3D984) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559A4u); - goto label_BFC3D9A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005598Cu); - } -label_BFC3D98C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D98Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D98Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005598Cu); -#endif - /* 0xBFC3D98C: 8FB80068 lw $t8, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005598Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80068u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005598Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D990: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3D994: 33190001 andi $t9, $t8, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] & 0x1u; - PGXP_ALU(0x33190001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3D998: 1320005E beq $t9, $zero, 0xBFC3DB14 */ - uint32_t psx_brA_BFC3D998 = cpu->gpr[25]; uint32_t psx_brB_BFC3D998 = cpu->gpr[0]; - psx_taken_BFC3D998 = (psx_brA_BFC3D998 == psx_brB_BFC3D998); - psx_delay_BFC3D998 = 1; - /* 0xBFC3D99C: 8FA90064 lw $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005599Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005599Cu); -#endif - if (psx_delay_BFC3D998) { - psx_delay_BFC3D998 = 0; - if (psx_taken_BFC3D998) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B14u); - goto label_BFC3DB14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559A0u); - } -label_BFC3D9A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3D9A0: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800559A0u); -#endif -label_BFC3D9A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3D9A4: AFA90040 sw $t1, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559A4u); return; } g_debug_last_store_pc = 0x800559A4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90040u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800559A4u); -#endif - /* 0xBFC3D9A8: 8CE20004 lw $v0, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80u); } - PGXP_LOAD(0x8CE20004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800559A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D9AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800559ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3D9B0: 2841000A slti $at, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0); - PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800559B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3D9B4: 1020000D beq $at, $zero, 0xBFC3D9EC */ - uint32_t psx_brA_BFC3D9B4 = cpu->gpr[1]; uint32_t psx_brB_BFC3D9B4 = cpu->gpr[0]; - psx_taken_BFC3D9B4 = (psx_brA_BFC3D9B4 == psx_brB_BFC3D9B4); - psx_delay_BFC3D9B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D9B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800559B8u); -#endif - if (psx_delay_BFC3D9B4) { - psx_delay_BFC3D9B4 = 0; - if (psx_taken_BFC3D9B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559ECu); - goto label_BFC3D9EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559BCu); - } -label_BFC3D9BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3D9BC: 0440000B bltz $v0, 0xBFC3D9EC */ - uint32_t psx_brA_BFC3D9BC = cpu->gpr[2]; - psx_taken_BFC3D9BC = ((int32_t)psx_brA_BFC3D9BC < 0); - psx_delay_BFC3D9BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D9C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800559C0u); -#endif - if (psx_delay_BFC3D9BC) { - psx_delay_BFC3D9BC = 0; - if (psx_taken_BFC3D9BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559ECu); - goto label_BFC3D9EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559C4u); - } -label_BFC3D9C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3D9C4: 00025080 sll $t2, $v0, 2 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[10] = cpu->gpr[2] << 2u; - PGXP_ALU(0x00025080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800559C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3D9C8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800559C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3D9CC: 016A5821 addu $t3, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[11] + cpu->gpr[10]; - PGXP_ALU(0x016A5821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800559CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559D0u); -#endif - /* 0xBFC3D9D0: 8D6B9910 lw $t3, -26352($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -26352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-26352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559D0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9910u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800559D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3D9D4: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559D4u); return; } g_debug_last_store_pc = 0x800559D4u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800559D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3D9D8: 0C015B2E jal 0xB0056CB8 */ - cpu->gpr[31] = 0x800559E0u; /* jal link before delay slot */ - psx_delay_BFC3D9D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x818u); -#endif - /* 0xBFC3D9DC: 006B2004 sllv $a0, $t3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[11] << (cpu->gpr[3] & 0x1Fu); - PGXP_ALU(0x006B2004u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800559DCu); -#endif - if (psx_delay_BFC3D9D8) { - psx_delay_BFC3D9D8 = 0; - cpu->gpr[31] = 0x800559E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CB8u); - cpu->pc = 0x80056CB8u; return; - } -label_BFC3D9E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559E0u); -#endif - /* 0xBFC3D9E0: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559E0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800559E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3D9E4: 10400009 beq $v0, $zero, 0xBFC3DA0C */ - uint32_t psx_brA_BFC3D9E4 = cpu->gpr[2]; uint32_t psx_brB_BFC3D9E4 = cpu->gpr[0]; - psx_taken_BFC3D9E4 = (psx_brA_BFC3D9E4 == psx_brB_BFC3D9E4); - psx_delay_BFC3D9E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3D9E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800559E8u); -#endif - if (psx_delay_BFC3D9E4) { - psx_delay_BFC3D9E4 = 0; - if (psx_taken_BFC3D9E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A0Cu); - goto label_BFC3DA0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800559ECu); - } -label_BFC3D9EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3D9ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3D9ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3D9EC: AFA00050 sw $zero, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559ECu); return; } g_debug_last_store_pc = 0x800559ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800559ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800559F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3D9F0: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800559F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3D9F4: 240CFFFF addiu $t4, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800559F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3D9F8: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800559F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3D9FC: AC20E40C sw $zero, -7156($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800559FCu); return; } g_debug_last_store_pc = 0x800559FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E40Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800559FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3DA00: AFAC0054 sw $t4, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A00u); return; } g_debug_last_store_pc = 0x80055A00u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0054u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DA04: 10000005 beq $zero, $zero, 0xBFC3DA1C */ - uint32_t psx_brA_BFC3DA04 = cpu->gpr[0]; uint32_t psx_brB_BFC3DA04 = cpu->gpr[0]; - psx_taken_BFC3DA04 = (psx_brA_BFC3DA04 == psx_brB_BFC3DA04); - psx_delay_BFC3DA04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20002000u); -#endif - /* 0xBFC3DA08: AFAD0064 sw $t5, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A08u); return; } g_debug_last_store_pc = 0x80055A08u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAFAD0064u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A08u); -#endif - if (psx_delay_BFC3DA04) { - psx_delay_BFC3DA04 = 0; - if (psx_taken_BFC3DA04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A1Cu); - goto label_BFC3DA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A0Cu); - } -label_BFC3DA0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A0Cu); -#endif - /* 0xBFC3DA0C: 8CEE0004 lw $t6, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A0Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x8CEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DA10: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3DA14: AFA00054 sw $zero, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A14u); return; } g_debug_last_store_pc = 0x80055A14u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00054u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3DA18: AC2EE40C sw $t6, -7156($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A18u); return; } g_debug_last_store_pc = 0x80055A18u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EE40Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A18u); -#endif -label_BFC3DA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DA1C: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DA20: AC20E414 sw $zero, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A20u); return; } g_debug_last_store_pc = 0x80055A20u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E414u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DA24: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DA28: AC20E418 sw $zero, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A28u); return; } g_debug_last_store_pc = 0x80055A28u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E418u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DA2C: 3C0F8014 lui $t7, 0x8014 */ - cpu->gpr[15] = 0x80140000u; - PGXP_ALU(0x3C0F8014u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A30u); -#endif - /* 0xBFC3DA30: 8DEFE40C lw $t7, -7156($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A30u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE40Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DA34: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3DA38: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3DA3C: 27399910 addiu $t9, $t9, -26352 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[25] + (-26352)); - PGXP_ALU(0x27399910u, cpu->gpr[25], _pgx1, 0xFFFF9910u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A40u); -#endif - /* 0xBFC3DA40: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A40u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3DA44: 000FC080 sll $t8, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000FC080u, cpu->gpr[24], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC3DA48: 03193021 addu $a2, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[6] = cpu->gpr[24] + cpu->gpr[25]; - PGXP_ALU(0x03193021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3DA4C: 24050061 addiu $a1, $zero, 97 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (97)); - PGXP_ALU(0x24050061u, cpu->gpr[5], _pgx1, 0x00000061u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DA50: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055A58u; /* jal link before delay slot */ - psx_delay_BFC3DA50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3DA54: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A54u); return; } g_debug_last_store_pc = 0x80055A54u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A54u); -#endif - if (psx_delay_BFC3DA50) { - psx_delay_BFC3DA50 = 0; - cpu->gpr[31] = 0x80055A58u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3DA58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3DA58: 3C098014 lui $t1, 0x8014 */ - cpu->gpr[9] = 0x80140000u; - PGXP_ALU(0x3C098014u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A58u); -#endif - /* 0xBFC3DA5C: 8D29E40C lw $t1, -7156($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A5Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D29E40Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3DA60: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3DA64: 00095100 sll $t2, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] << 4u; - PGXP_ALU(0x00095100u, cpu->gpr[10], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3DA68: 01495021 addu $t2, $t2, $t1 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[9]; - PGXP_ALU(0x01495021u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055A68u); -#endif - /* 0xBFC3DA6C: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A6Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3DA70: 000A5080 sll $t2, $t2, 2 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] << 2u; - PGXP_ALU(0x000A5080u, cpu->gpr[10], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3DA74: 256B9938 addiu $t3, $t3, -26312 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-26312)); - PGXP_ALU(0x256B9938u, cpu->gpr[11], _pgx1, 0xFFFF9938u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC20u); -#endif - /* 0xBFC3DA78: 014B2821 addu $a1, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3DA7C: 27A4006C addiu $a0, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A4006Cu, cpu->gpr[4], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DA80: 0C016A54 jal 0xB005A950 */ - cpu->gpr[31] = 0x80055A88u; /* jal link before delay slot */ - psx_delay_BFC3DA80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3DA84: 24060044 addiu $a2, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24060044u, cpu->gpr[6], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80055A84u); -#endif - if (psx_delay_BFC3DA80) { - psx_delay_BFC3DA80 = 0; - cpu->gpr[31] = 0x80055A88u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A950u); - cpu->pc = 0x8005A950u; return; - } -label_BFC3DA88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A88u); -#endif - /* 0xBFC3DA88: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A88u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DA8C: 10000010 beq $zero, $zero, 0xBFC3DAD0 */ - uint32_t psx_brA_BFC3DA8C = cpu->gpr[0]; uint32_t psx_brB_BFC3DA8C = cpu->gpr[0]; - psx_taken_BFC3DA8C = (psx_brA_BFC3DA8C == psx_brB_BFC3DA8C); - psx_delay_BFC3DA8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DA90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055A90u); -#endif - if (psx_delay_BFC3DA8C) { - psx_delay_BFC3DA8C = 0; - if (psx_taken_BFC3DA8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AD0u); - goto label_BFC3DAD0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A94u); - } -label_BFC3DA94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DA94: 10000017 beq $zero, $zero, 0xBFC3DAF4 */ - uint32_t psx_brA_BFC3DA94 = cpu->gpr[0]; uint32_t psx_brB_BFC3DA94 = cpu->gpr[0]; - psx_taken_BFC3DA94 = (psx_brA_BFC3DA94 == psx_brB_BFC3DA94); - psx_delay_BFC3DA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3DA98: AFA00050 sw $zero, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055A98u); return; } g_debug_last_store_pc = 0x80055A98u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00050u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055A98u); -#endif - if (psx_delay_BFC3DA94) { - psx_delay_BFC3DA94 = 0; - if (psx_taken_BFC3DA94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AF4u); - goto label_BFC3DAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A9Cu); - } -label_BFC3DA9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DA9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3DA9C: 240C00FF addiu $t4, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240C00FFu, cpu->gpr[12], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DAA0: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3DAA4: AC2CE418 sw $t4, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055AA4u); return; } g_debug_last_store_pc = 0x80055AA4u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CE418u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DAA8: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3DAAC: 240D00FF addiu $t5, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240D00FFu, cpu->gpr[13], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DAB0: 10000010 beq $zero, $zero, 0xBFC3DAF4 */ - uint32_t psx_brA_BFC3DAB0 = cpu->gpr[0]; uint32_t psx_brB_BFC3DAB0 = cpu->gpr[0]; - psx_taken_BFC3DAB0 = (psx_brA_BFC3DAB0 == psx_brB_BFC3DAB0); - psx_delay_BFC3DAB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC3DAB4: AC2DE414 sw $t5, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055AB4u); return; } g_debug_last_store_pc = 0x80055AB4u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DE414u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055AB4u); -#endif - if (psx_delay_BFC3DAB0) { - psx_delay_BFC3DAB0 = 0; - if (psx_taken_BFC3DAB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AF4u); - goto label_BFC3DAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AB8u); - } -label_BFC3DAB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DAB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DAB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DAB8: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DABC: AC20E418 sw $zero, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055ABCu); return; } g_debug_last_store_pc = 0x80055ABCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E418u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DAC0: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3DAC4: 240E00FF addiu $t6, $zero, 255 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); - PGXP_ALU(0x240E00FFu, cpu->gpr[14], _pgx1, 0x000000FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80055AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DAC8: 1000000A beq $zero, $zero, 0xBFC3DAF4 */ - uint32_t psx_brA_BFC3DAC8 = cpu->gpr[0]; uint32_t psx_brB_BFC3DAC8 = cpu->gpr[0]; - psx_taken_BFC3DAC8 = (psx_brA_BFC3DAC8 == psx_brB_BFC3DAC8); - psx_delay_BFC3DAC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3DACC: AC2EE414 sw $t6, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055ACCu); return; } g_debug_last_store_pc = 0x80055ACCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EE414u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055ACCu); -#endif - if (psx_delay_BFC3DAC8) { - psx_delay_BFC3DAC8 = 0; - if (psx_taken_BFC3DAC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AF4u); - goto label_BFC3DAF4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AD0u); - } -label_BFC3DAD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DAD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DAD0: 3C0F8014 lui $t7, 0x8014 */ - cpu->gpr[15] = 0x80140000u; - PGXP_ALU(0x3C0F8014u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AD0u); -#endif - /* 0xBFC3DAD4: 8DEFE40C lw $t7, -7156($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055AD4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE40Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DAD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3DADC: 11E0FFED beq $t7, $zero, 0xBFC3DA94 */ - uint32_t psx_brA_BFC3DADC = cpu->gpr[15]; uint32_t psx_brB_BFC3DADC = cpu->gpr[0]; - psx_taken_BFC3DADC = (psx_brA_BFC3DADC == psx_brB_BFC3DADC); - psx_delay_BFC3DADC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DAE0: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055AE0u); -#endif - if (psx_delay_BFC3DADC) { - psx_delay_BFC3DADC = 0; - if (psx_taken_BFC3DADC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A94u); - goto label_BFC3DA94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AE4u); - } -label_BFC3DAE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DAE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DAE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3DAE4: 11E1FFED beq $t7, $at, 0xBFC3DA9C */ - uint32_t psx_brA_BFC3DAE4 = cpu->gpr[15]; uint32_t psx_brB_BFC3DAE4 = cpu->gpr[1]; - psx_taken_BFC3DAE4 = (psx_brA_BFC3DAE4 == psx_brB_BFC3DAE4); - psx_delay_BFC3DAE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DAE8: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055AE8u); -#endif - if (psx_delay_BFC3DAE4) { - psx_delay_BFC3DAE4 = 0; - if (psx_taken_BFC3DAE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055A9Cu); - goto label_BFC3DA9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AECu); - } -label_BFC3DAEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DAECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3DAEC: 11E1FFF2 beq $t7, $at, 0xBFC3DAB8 */ - uint32_t psx_brA_BFC3DAEC = cpu->gpr[15]; uint32_t psx_brB_BFC3DAEC = cpu->gpr[1]; - psx_taken_BFC3DAEC = (psx_brA_BFC3DAEC == psx_brB_BFC3DAEC); - psx_delay_BFC3DAEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DAF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055AF0u); -#endif - if (psx_delay_BFC3DAEC) { - psx_delay_BFC3DAEC = 0; - if (psx_taken_BFC3DAEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AB8u); - goto label_BFC3DAB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055AF4u); - } -label_BFC3DAF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DAF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DAF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DAF4: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AF4u); -#endif - /* 0xBFC3DAF8: 8F189BE0 lw $t8, -25632($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25632; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25632)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055AF8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189BE0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3DAFC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3DB00: A7000184 sh $zero, 388($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055B00u); return; } g_debug_last_store_pc = 0x80055B00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7000184u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B00u); -#endif - /* 0xBFC3DB04: 8F399BE0 lw $t9, -25632($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25632; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25632)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B04u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399BE0u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055B08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3DB0C: A7200186 sh $zero, 390($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055B0Cu); return; } g_debug_last_store_pc = 0x80055B0Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7200186u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B10u); -#endif - /* 0xBFC3DB10: 8FA90064 lw $t1, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B10u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90064u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B10u); -#endif -label_BFC3DB14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3DB18: 1520003B bne $t1, $zero, 0xBFC3DC08 */ - uint32_t psx_brA_BFC3DB18 = cpu->gpr[9]; uint32_t psx_brB_BFC3DB18 = cpu->gpr[0]; - psx_taken_BFC3DB18 = (psx_brA_BFC3DB18 != psx_brB_BFC3DB18); - psx_delay_BFC3DB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055B1Cu); -#endif - if (psx_delay_BFC3DB18) { - psx_delay_BFC3DB18 = 0; - if (psx_taken_BFC3DB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C08u); - goto label_BFC3DC08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B20u); - } -label_BFC3DB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B20u); -#endif - /* 0xBFC3DB20: 8FAA0068 lw $t2, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B20u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0068u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3DB28: 314B0008 andi $t3, $t2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x8u; - PGXP_ALU(0x314B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3DB2C: 1160003F beq $t3, $zero, 0xBFC3DC2C */ - uint32_t psx_brA_BFC3DB2C = cpu->gpr[11]; uint32_t psx_brB_BFC3DB2C = cpu->gpr[0]; - psx_taken_BFC3DB2C = (psx_brA_BFC3DB2C == psx_brB_BFC3DB2C); - psx_delay_BFC3DB2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B30u); -#endif - /* 0xBFC3DB30: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B30u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B30u); -#endif - if (psx_delay_BFC3DB2C) { - psx_delay_BFC3DB2C = 0; - if (psx_taken_BFC3DB2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C2Cu); - goto label_BFC3DC2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B34u); - } -label_BFC3DB34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB34: 10000034 beq $zero, $zero, 0xBFC3DC08 */ - uint32_t psx_brA_BFC3DB34 = cpu->gpr[0]; uint32_t psx_brB_BFC3DB34 = cpu->gpr[0]; - psx_taken_BFC3DB34 = (psx_brA_BFC3DB34 == psx_brB_BFC3DB34); - psx_delay_BFC3DB34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DB38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055B38u); -#endif - if (psx_delay_BFC3DB34) { - psx_delay_BFC3DB34 = 0; - if (psx_taken_BFC3DB34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C08u); - goto label_BFC3DC08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B3Cu); - } -label_BFC3DB3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B3Cu); -#endif - /* 0xBFC3DB3C: 8FAD0040 lw $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B3Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3DB40: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3DB44: 15A00011 bne $t5, $zero, 0xBFC3DB8C */ - uint32_t psx_brA_BFC3DB44 = cpu->gpr[13]; uint32_t psx_brB_BFC3DB44 = cpu->gpr[0]; - psx_taken_BFC3DB44 = (psx_brA_BFC3DB44 != psx_brB_BFC3DB44); - psx_delay_BFC3DB44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3DB48: AFAC003C sw $t4, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B48u); return; } g_debug_last_store_pc = 0x80055B48u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC003Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B48u); -#endif - if (psx_delay_BFC3DB44) { - psx_delay_BFC3DB44 = 0; - if (psx_taken_BFC3DB44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B8Cu); - goto label_BFC3DB8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B4Cu); - } -label_BFC3DB4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3DB4C: 3C0E8014 lui $t6, 0x8014 */ - cpu->gpr[14] = 0x80140000u; - PGXP_ALU(0x3C0E8014u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B50u); -#endif - /* 0xBFC3DB50: 8DCEE40C lw $t6, -7156($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEE40Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DB54: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3DB58: 000E7900 sll $t7, $t6, 4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] << 4u; - PGXP_ALU(0x000E7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3DB5C: 01EE7821 addu $t7, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[14]; - PGXP_ALU(0x01EE7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DB60: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DB64: 27189938 addiu $t8, $t8, -26312 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-26312)); - PGXP_ALU(0x27189938u, cpu->gpr[24], _pgx1, 0xFFFF9938u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC3DB68: 01F82821 addu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3DB6C: 27A4006C addiu $a0, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A4006Cu, cpu->gpr[4], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3DB70: 24060044 addiu $a2, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24060044u, cpu->gpr[6], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DB74: 0C016A54 jal 0xB005A950 */ - cpu->gpr[31] = 0x80055B7Cu; /* jal link before delay slot */ - psx_delay_BFC3DB74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3DB78: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B78u); return; } g_debug_last_store_pc = 0x80055B78u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B78u); -#endif - if (psx_delay_BFC3DB74) { - psx_delay_BFC3DB74 = 0; - cpu->gpr[31] = 0x80055B7Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A950u); - cpu->pc = 0x8005A950u; return; - } -label_BFC3DB7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3DB7C: 3C190C01 lui $t9, 0xC01 */ - cpu->gpr[25] = 0x0C010000u; - PGXP_ALU(0x3C190C01u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3DB80: 37391C00 ori $t9, $t9, 0x1C00 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[25] | 0x1C00u; - PGXP_ALU(0x37391C00u, cpu->gpr[25], _pgx1, 0x1C00u); } -#ifdef PSX_COSIM - cosim_instr(0x80055B80u); -#endif - /* 0xBFC3DB84: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B84u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3DB88: AFB9006C sw $t9, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B88u); return; } g_debug_last_store_pc = 0x80055B88u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9006Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B88u); -#endif -label_BFC3DB8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DB8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DB8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B8Cu); -#endif - /* 0xBFC3DB8C: 8CE9000C lw $t1, 12($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B8Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x80u); } - PGXP_LOAD(0x8CE9000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DB90: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3DB94: 3C0A8014 lui $t2, 0x8014 */ - cpu->gpr[10] = 0x80140000u; - PGXP_ALU(0x3C0A8014u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3DB98: AC29E414 sw $t1, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B98u); return; } g_debug_last_store_pc = 0x80055B98u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29E414u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B98u); -#endif - /* 0xBFC3DB9C: 8D4AE414 lw $t2, -7148($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -7148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055B9Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AE414u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DBA0: 2401007F addiu $at, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2401007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80055BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3DBA4: 000A5B40 sll $t3, $t2, 13 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] << 13u; - PGXP_ALU(0x000A5B40u, cpu->gpr[11], _pgx1, 13u); } -#ifdef PSX_COSIM - cosim_instr(0x80055BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3DBA8: 0161001A div $t3, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[11]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0161001Au, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80055BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3DBAC: 000A1300 sll $v0, $t2, 12 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[10] << 12u; - PGXP_ALU(0x000A1300u, cpu->gpr[2], _pgx1, 12u); } -#ifdef PSX_COSIM - cosim_instr(0x80055BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BB0u); -#endif - /* 0xBFC3DBB0: 97AD0070 lhu $t5, 112($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (112)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BB0u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x97AD0070u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BB0u); -#endif - /* 0xBFC3DBB4: 97AF0072 lhu $t7, 114($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 114; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (114)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BB4u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x97AF0072u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BB4u); -#endif - /* 0xBFC3DBB8: 97B9008A lhu $t9, 138($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 138; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (138)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BB8u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x97B9008Au, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BB8u); -#endif - /* 0xBFC3DBBC: 97AB0092 lhu $t3, 146($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 146; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (146)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BBCu); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x97AB0092u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BC0u); -#endif - /* 0xBFC3DBC0: 97AA00AA lhu $t2, 170($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BC0u); return; } cpu->gpr[10] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x97AA00AAu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3DBC4: 00006012 mflo $t4 */ - cpu->gpr[12] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006012u, cpu->gpr[12], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC3DBC8: 018D7023 subu $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] - cpu->gpr[13]; - PGXP_ALU(0x018D7023u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3DBCC: A7AE0084 sh $t6, 132($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (132)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BCCu); return; } g_debug_last_store_pc = 0x80055BCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE0084u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3DBD0: 0041001A div $v0, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[2]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0041001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80055BD0u); -#endif - /* 0xBFC3DBD4: 97AD00A8 lhu $t5, 168($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 168; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BD4u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x97AD00A8u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3DBD8: 00001012 mflo $v0 */ - cpu->gpr[2] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00001012u, cpu->gpr[2], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC3DBDC: 004FC023 subu $t8, $v0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[2] - cpu->gpr[15]; - PGXP_ALU(0x004FC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3DBE0: A7B80086 sh $t8, 134($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 134; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (134)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BE0u); return; } g_debug_last_store_pc = 0x80055BE0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA7B80086u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000204u); -#endif - /* 0xBFC3DBE4: 00594821 addu $t1, $v0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[9] = cpu->gpr[2] + cpu->gpr[25]; - PGXP_ALU(0x00594821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3DBE8: A7A90088 sh $t1, 136($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (136)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BE8u); return; } g_debug_last_store_pc = 0x80055BE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA7A90088u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC3DBEC: 004B6021 addu $t4, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[2] + cpu->gpr[11]; - PGXP_ALU(0x004B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8404u); -#endif - /* 0xBFC3DBF0: 004A7821 addu $t7, $v0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[10]; - PGXP_ALU(0x004A7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC3DBF4: 004D7021 addu $t6, $v0, $t5 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[2] + cpu->gpr[13]; - PGXP_ALU(0x004D7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3DBF8: A7AC0090 sh $t4, 144($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (144)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BF8u); return; } g_debug_last_store_pc = 0x80055BF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA7AC0090u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3DBFC: A7AE00A4 sh $t6, 164($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055BFCu); return; } g_debug_last_store_pc = 0x80055BFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA7AE00A4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC00: 10000009 beq $zero, $zero, 0xBFC3DC28 */ - uint32_t psx_brA_BFC3DC00 = cpu->gpr[0]; uint32_t psx_brB_BFC3DC00 = cpu->gpr[0]; - psx_taken_BFC3DC00 = (psx_brA_BFC3DC00 == psx_brB_BFC3DC00); - psx_delay_BFC3DC00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3DC04: A7AF00A6 sh $t7, 166($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 166; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (166)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055C04u); return; } g_debug_last_store_pc = 0x80055C04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA7AF00A6u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C04u); -#endif - if (psx_delay_BFC3DC00) { - psx_delay_BFC3DC00 = 0; - if (psx_taken_BFC3DC00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C28u); - goto label_BFC3DC28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C08u); - } -label_BFC3DC08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DC08: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055C08u); -#endif - /* 0xBFC3DC0C: 8F18E40C lw $t8, -7156($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C0Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E40Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DC10: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3DC14: 1301FFC9 beq $t8, $at, 0xBFC3DB3C */ - uint32_t psx_brA_BFC3DC14 = cpu->gpr[24]; uint32_t psx_brB_BFC3DC14 = cpu->gpr[1]; - psx_taken_BFC3DC14 = (psx_brA_BFC3DC14 == psx_brB_BFC3DC14); - psx_delay_BFC3DC14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DC18: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C18u); -#endif - if (psx_delay_BFC3DC14) { - psx_delay_BFC3DC14 = 0; - if (psx_taken_BFC3DC14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B3Cu); - goto label_BFC3DB3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C1Cu); - } -label_BFC3DC1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3DC1C: 1301FFC7 beq $t8, $at, 0xBFC3DB3C */ - uint32_t psx_brA_BFC3DC1C = cpu->gpr[24]; uint32_t psx_brB_BFC3DC1C = cpu->gpr[1]; - psx_taken_BFC3DC1C = (psx_brA_BFC3DC1C == psx_brB_BFC3DC1C); - psx_delay_BFC3DC1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DC20: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055C20u); -#endif - if (psx_delay_BFC3DC1C) { - psx_delay_BFC3DC1C = 0; - if (psx_taken_BFC3DC1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055B3Cu); - goto label_BFC3DB3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C24u); - } -label_BFC3DC24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DC24: AC20E414 sw $zero, -7148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C24u); return; } g_debug_last_store_pc = 0x80055C24u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E414u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C24u); -#endif -label_BFC3DC28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C28u); -#endif - /* 0xBFC3DC28: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C28u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C28u); -#endif -label_BFC3DC2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3DC30: 17200032 bne $t9, $zero, 0xBFC3DCFC */ - uint32_t psx_brA_BFC3DC30 = cpu->gpr[25]; uint32_t psx_brB_BFC3DC30 = cpu->gpr[0]; - psx_taken_BFC3DC30 = (psx_brA_BFC3DC30 != psx_brB_BFC3DC30); - psx_delay_BFC3DC30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC34: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055C34u); -#endif - if (psx_delay_BFC3DC30) { - psx_delay_BFC3DC30 = 0; - if (psx_taken_BFC3DC30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CFCu); - goto label_BFC3DCFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C38u); - } -label_BFC3DC38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C38u); -#endif - /* 0xBFC3DC38: 8FA90068 lw $t1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C38u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90068u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC3DC40: 312B0010 andi $t3, $t1, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[11] = cpu->gpr[9] & 0x10u; - PGXP_ALU(0x312B0010u, cpu->gpr[11], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3DC44: 11600036 beq $t3, $zero, 0xBFC3DD20 */ - uint32_t psx_brA_BFC3DC44 = cpu->gpr[11]; uint32_t psx_brB_BFC3DC44 = cpu->gpr[0]; - psx_taken_BFC3DC44 = (psx_brA_BFC3DC44 == psx_brB_BFC3DC44); - psx_delay_BFC3DC44 = 1; - /* 0xBFC3DC48: 8FB80040 lw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C48u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C48u); -#endif - if (psx_delay_BFC3DC44) { - psx_delay_BFC3DC44 = 0; - if (psx_taken_BFC3DC44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D20u); - goto label_BFC3DD20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C4Cu); - } -label_BFC3DC4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC4C: 1000002B beq $zero, $zero, 0xBFC3DCFC */ - uint32_t psx_brA_BFC3DC4C = cpu->gpr[0]; uint32_t psx_brB_BFC3DC4C = cpu->gpr[0]; - psx_taken_BFC3DC4C = (psx_brA_BFC3DC4C == psx_brB_BFC3DC4C); - psx_delay_BFC3DC4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055C50u); -#endif - if (psx_delay_BFC3DC4C) { - psx_delay_BFC3DC4C = 0; - if (psx_taken_BFC3DC4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CFCu); - goto label_BFC3DCFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C54u); - } -label_BFC3DC54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C54u); -#endif - /* 0xBFC3DC54: 8FAD0040 lw $t5, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C54u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0040u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3DC58: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3DC5C: 15A00019 bne $t5, $zero, 0xBFC3DCC4 */ - uint32_t psx_brA_BFC3DC5C = cpu->gpr[13]; uint32_t psx_brB_BFC3DC5C = cpu->gpr[0]; - psx_taken_BFC3DC5C = (psx_brA_BFC3DC5C != psx_brB_BFC3DC5C); - psx_delay_BFC3DC5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3DC60: AFAC0038 sw $t4, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C60u); return; } g_debug_last_store_pc = 0x80055C60u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0038u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C60u); -#endif - if (psx_delay_BFC3DC5C) { - psx_delay_BFC3DC5C = 0; - if (psx_taken_BFC3DC5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CC4u); - goto label_BFC3DCC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C64u); - } -label_BFC3DC64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C64u); -#endif - /* 0xBFC3DC64: 8FAE003C lw $t6, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C64u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE003Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DC68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3DC6C: 15C00012 bne $t6, $zero, 0xBFC3DCB8 */ - uint32_t psx_brA_BFC3DC6C = cpu->gpr[14]; uint32_t psx_brB_BFC3DC6C = cpu->gpr[0]; - psx_taken_BFC3DC6C = (psx_brA_BFC3DC6C != psx_brB_BFC3DC6C); - psx_delay_BFC3DC6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C70u); -#endif - /* 0xBFC3DC70: 8FA9006C lw $t1, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C70u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9006Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C70u); -#endif - if (psx_delay_BFC3DC6C) { - psx_delay_BFC3DC6C = 0; - if (psx_taken_BFC3DC6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CB8u); - goto label_BFC3DCB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C74u); - } -label_BFC3DC74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DC74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DC74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3DC74: 3C0A8014 lui $t2, 0x8014 */ - cpu->gpr[10] = 0x80140000u; - PGXP_ALU(0x3C0A8014u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055C74u); -#endif - /* 0xBFC3DC78: 8D4AE40C lw $t2, -7156($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055C78u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AE40Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DC7C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8400u); -#endif - /* 0xBFC3DC80: 000A7900 sll $t7, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[10] << 4u; - PGXP_ALU(0x000A7900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8400u); -#endif - /* 0xBFC3DC84: 01EA7821 addu $t7, $t7, $t2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[15] + cpu->gpr[10]; - PGXP_ALU(0x01EA7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DC88: 000F7880 sll $t7, $t7, 2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[15] << 2u; - PGXP_ALU(0x000F7880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3DC8C: 27189938 addiu $t8, $t8, -26312 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[24] + (-26312)); - PGXP_ALU(0x27189938u, cpu->gpr[24], _pgx1, 0xFFFF9938u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008020u); -#endif - /* 0xBFC3DC90: 01F82821 addu $a1, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[5] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F82821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3DC94: 27A4006C addiu $a0, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A4006Cu, cpu->gpr[4], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3DC98: 24060044 addiu $a2, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24060044u, cpu->gpr[6], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x80055C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DC9C: 0C016A54 jal 0xB005A950 */ - cpu->gpr[31] = 0x80055CA4u; /* jal link before delay slot */ - psx_delay_BFC3DC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3DCA0: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CA0u); return; } g_debug_last_store_pc = 0x80055CA0u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CA0u); -#endif - if (psx_delay_BFC3DC9C) { - psx_delay_BFC3DC9C = 0; - cpu->gpr[31] = 0x80055CA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A950u); - cpu->pc = 0x8005A950u; return; - } -label_BFC3DCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CA4u); -#endif - /* 0xBFC3DCA4: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3DCA8: 24190080 addiu $t9, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24190080u, cpu->gpr[25], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80055CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DCAC: 10000005 beq $zero, $zero, 0xBFC3DCC4 */ - uint32_t psx_brA_BFC3DCAC = cpu->gpr[0]; uint32_t psx_brB_BFC3DCAC = cpu->gpr[0]; - psx_taken_BFC3DCAC = (psx_brA_BFC3DCAC == psx_brB_BFC3DCAC); - psx_delay_BFC3DCAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC3DCB0: AFB9006C sw $t9, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CB0u); return; } g_debug_last_store_pc = 0x80055CB0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9006Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CB0u); -#endif - if (psx_delay_BFC3DCAC) { - psx_delay_BFC3DCAC = 0; - if (psx_taken_BFC3DCAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CC4u); - goto label_BFC3DCC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CB4u); - } -label_BFC3DCB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DCB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CB4u); -#endif - /* 0xBFC3DCB4: 8FA9006C lw $t1, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CB4u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9006Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CB4u); -#endif -label_BFC3DCB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DCB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DCB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DCB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC3DCBC: 352B0080 ori $t3, $t1, 0x80 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[11] = cpu->gpr[9] | 0x80u; - PGXP_ALU(0x352B0080u, cpu->gpr[11], _pgx1, 0x0080u); } -#ifdef PSX_COSIM - cosim_instr(0x80055CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC3DCC0: AFAB006C sw $t3, 108($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CC0u); return; } g_debug_last_store_pc = 0x80055CC0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB006Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CC0u); -#endif -label_BFC3DCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CC4u); -#endif - /* 0xBFC3DCC4: 8CEC0010 lw $t4, 16($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CC4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x80u); } - PGXP_LOAD(0x8CEC0010u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DCC8: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3DCCC: 3C0D8014 lui $t5, 0x8014 */ - cpu->gpr[13] = 0x80140000u; - PGXP_ALU(0x3C0D8014u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC3DCD0: AC2CE418 sw $t4, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CD0u); return; } g_debug_last_store_pc = 0x80055CD0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC2CE418u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CD0u); -#endif - /* 0xBFC3DCD4: 8DADE418 lw $t5, -7144($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -7144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CD4u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADE418u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DCD8: 2401007F addiu $at, $zero, 127 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); - PGXP_ALU(0x2401007Fu, cpu->gpr[1], _pgx1, 0x0000007Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80055CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3DCDC: 000D71C0 sll $t6, $t5, 7 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 7u; - PGXP_ALU(0x000D71C0u, cpu->gpr[14], _pgx1, 7u); } -#ifdef PSX_COSIM - cosim_instr(0x80055CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3DCE0: 01CD7021 addu $t6, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[13]; - PGXP_ALU(0x01CD7021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3DCE4: 000E7200 sll $t6, $t6, 8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] << 8u; - PGXP_ALU(0x000E7200u, cpu->gpr[14], _pgx1, 8u); } -#ifdef PSX_COSIM - cosim_instr(0x80055CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3DCE8: 01C1001A div $t6, $at */ - { int32_t psx_n = (int32_t)cpu->gpr[14]; int32_t psx_d = (int32_t)cpu->gpr[1]; if (psx_d == 0) { cpu->lo = (psx_n >= 0) ? 0xFFFFFFFFu : 0x00000001u; cpu->hi = (uint32_t)psx_n; } else if (psx_n == INT32_MIN && psx_d == -1) { cpu->lo = 0x80000000u; cpu->hi = 0u; } else { int32_t psx_q = psx_n / psx_d; int32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = (uint32_t)psx_q; cpu->hi = (uint32_t)psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x01C1001Au, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80055CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3DCEC: 00005012 mflo $t2 */ - cpu->gpr[10] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005012u, cpu->gpr[10], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000400u); -#endif - /* 0xBFC3DCF0: A7AA007E sh $t2, 126($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 126; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (126)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055CF0u); return; } g_debug_last_store_pc = 0x80055CF0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA7AA007Eu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DCF4: 1000000A beq $zero, $zero, 0xBFC3DD20 */ - uint32_t psx_brA_BFC3DCF4 = cpu->gpr[0]; uint32_t psx_brB_BFC3DCF4 = cpu->gpr[0]; - psx_taken_BFC3DCF4 = (psx_brA_BFC3DCF4 == psx_brB_BFC3DCF4); - psx_delay_BFC3DCF4 = 1; - /* 0xBFC3DCF8: 8FB80040 lw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055CF8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055CF8u); -#endif - if (psx_delay_BFC3DCF4) { - psx_delay_BFC3DCF4 = 0; - if (psx_taken_BFC3DCF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D20u); - goto label_BFC3DD20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055CFCu); - } -label_BFC3DCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DCFC: 3C0F8014 lui $t7, 0x8014 */ - cpu->gpr[15] = 0x80140000u; - PGXP_ALU(0x3C0F8014u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D00u); -#endif - /* 0xBFC3DD00: 8DEFE40C lw $t7, -7156($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D00u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFE40Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DD04: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3DD08: 11E1FFD2 beq $t7, $at, 0xBFC3DC54 */ - uint32_t psx_brA_BFC3DD08 = cpu->gpr[15]; uint32_t psx_brB_BFC3DD08 = cpu->gpr[1]; - psx_taken_BFC3DD08 = (psx_brA_BFC3DD08 == psx_brB_BFC3DD08); - psx_delay_BFC3DD08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DD0C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055D0Cu); -#endif - if (psx_delay_BFC3DD08) { - psx_delay_BFC3DD08 = 0; - if (psx_taken_BFC3DD08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C54u); - goto label_BFC3DC54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D10u); - } -label_BFC3DD10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3DD10: 11E1FFD0 beq $t7, $at, 0xBFC3DC54 */ - uint32_t psx_brA_BFC3DD10 = cpu->gpr[15]; uint32_t psx_brB_BFC3DD10 = cpu->gpr[1]; - psx_taken_BFC3DD10 = (psx_brA_BFC3DD10 == psx_brB_BFC3DD10); - psx_delay_BFC3DD10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DD14: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055D14u); -#endif - if (psx_delay_BFC3DD10) { - psx_delay_BFC3DD10 = 0; - if (psx_taken_BFC3DD10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055C54u); - goto label_BFC3DC54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D18u); - } -label_BFC3DD18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DD18: AC20E418 sw $zero, -7144($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D18u); return; } g_debug_last_store_pc = 0x80055D18u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20E418u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D18u); -#endif - /* 0xBFC3DD1C: 8FB80040 lw $t8, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D1Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80040u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D1Cu); -#endif -label_BFC3DD20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3DD24: 17000009 bne $t8, $zero, 0xBFC3DD4C */ - uint32_t psx_brA_BFC3DD24 = cpu->gpr[24]; uint32_t psx_brB_BFC3DD24 = cpu->gpr[0]; - psx_taken_BFC3DD24 = (psx_brA_BFC3DD24 != psx_brB_BFC3DD24); - psx_delay_BFC3DD24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD28: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D28u); -#endif - if (psx_delay_BFC3DD24) { - psx_delay_BFC3DD24 = 0; - if (psx_taken_BFC3DD24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D4Cu); - goto label_BFC3DD4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D2Cu); - } -label_BFC3DD2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D2Cu); -#endif - /* 0xBFC3DD2C: 8FB9003C lw $t9, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D2Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB9003Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3DD34: 17200005 bne $t9, $zero, 0xBFC3DD4C */ - uint32_t psx_brA_BFC3DD34 = cpu->gpr[25]; uint32_t psx_brB_BFC3DD34 = cpu->gpr[0]; - psx_taken_BFC3DD34 = (psx_brA_BFC3DD34 != psx_brB_BFC3DD34); - psx_delay_BFC3DD34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D38u); -#endif - if (psx_delay_BFC3DD34) { - psx_delay_BFC3DD34 = 0; - if (psx_taken_BFC3DD34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D4Cu); - goto label_BFC3DD4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D3Cu); - } -label_BFC3DD3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D3Cu); -#endif - /* 0xBFC3DD3C: 8FA90038 lw $t1, 56($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D3Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90038u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3DD44: 1120000A beq $t1, $zero, 0xBFC3DD70 */ - uint32_t psx_brA_BFC3DD44 = cpu->gpr[9]; uint32_t psx_brB_BFC3DD44 = cpu->gpr[0]; - psx_taken_BFC3DD44 = (psx_brA_BFC3DD44 == psx_brB_BFC3DD44); - psx_delay_BFC3DD44 = 1; - /* 0xBFC3DD48: 8FAB0040 lw $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D48u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D48u); -#endif - if (psx_delay_BFC3DD44) { - psx_delay_BFC3DD44 = 0; - if (psx_taken_BFC3DD44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D70u); - goto label_BFC3DD70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D4Cu); - } -label_BFC3DD4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DD4C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D50u); -#endif - /* 0xBFC3DD50: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D50u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3DD54: 24050063 addiu $a1, $zero, 99 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); - PGXP_ALU(0x24050063u, cpu->gpr[5], _pgx1, 0x00000063u); } -#ifdef PSX_COSIM - cosim_instr(0x80055D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3DD58: 27A6006C addiu $a2, $sp, 108 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); - PGXP_ALU(0x27A6006Cu, cpu->gpr[6], _pgx1, 0x0000006Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DD5C: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055D64u; /* jal link before delay slot */ - psx_delay_BFC3DD5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000080u); -#endif - /* 0xBFC3DD60: AFA700B0 sw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D60u); return; } g_debug_last_store_pc = 0x80055D60u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAFA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D60u); -#endif - if (psx_delay_BFC3DD5C) { - psx_delay_BFC3DD5C = 0; - cpu->gpr[31] = 0x80055D64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3DD64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D64u); -#endif - /* 0xBFC3DD64: 8FA700B0 lw $a3, 176($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 176; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D64u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } - PGXP_LOAD(0x8FA700B0u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D68u); -#endif - /* 0xBFC3DD6C: 8FAB0040 lw $t3, 64($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D6Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0040u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D6Cu); -#endif -label_BFC3DD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3DD74: 15600024 bne $t3, $zero, 0xBFC3DE08 */ - uint32_t psx_brA_BFC3DD74 = cpu->gpr[11]; uint32_t psx_brB_BFC3DD74 = cpu->gpr[0]; - psx_taken_BFC3DD74 = (psx_brA_BFC3DD74 != psx_brB_BFC3DD74); - psx_delay_BFC3DD74 = 1; - /* 0xBFC3DD78: 8FAA0050 lw $t2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D78u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0050u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D78u); -#endif - if (psx_delay_BFC3DD74) { - psx_delay_BFC3DD74 = 0; - if (psx_taken_BFC3DD74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055E08u); - goto label_BFC3DE08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D7Cu); - } -label_BFC3DD7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D7Cu); -#endif - /* 0xBFC3DD7C: 8FAC0064 lw $t4, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D7Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0064u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3DD84: 15800006 bne $t4, $zero, 0xBFC3DDA0 */ - uint32_t psx_brA_BFC3DD84 = cpu->gpr[12]; uint32_t psx_brB_BFC3DD84 = cpu->gpr[0]; - psx_taken_BFC3DD84 = (psx_brA_BFC3DD84 != psx_brB_BFC3DD84); - psx_delay_BFC3DD84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D88u); -#endif - if (psx_delay_BFC3DD84) { - psx_delay_BFC3DD84 = 0; - if (psx_taken_BFC3DD84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DA0u); - goto label_BFC3DDA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055D8Cu); - } -label_BFC3DD8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DD8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D8Cu); -#endif - /* 0xBFC3DD8C: 8FAD0068 lw $t5, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D8Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0068u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DD90: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3DD94: 31AE0002 andi $t6, $t5, 0x2 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x2u; - PGXP_ALU(0x31AE0002u, cpu->gpr[14], _pgx1, 0x0002u); } -#ifdef PSX_COSIM - cosim_instr(0x80055D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3DD98: 11C0000A beq $t6, $zero, 0xBFC3DDC4 */ - uint32_t psx_brA_BFC3DD98 = cpu->gpr[14]; uint32_t psx_brB_BFC3DD98 = cpu->gpr[0]; - psx_taken_BFC3DD98 = (psx_brA_BFC3DD98 == psx_brB_BFC3DD98); - psx_delay_BFC3DD98 = 1; - /* 0xBFC3DD9C: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055D9Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055D9Cu); -#endif - if (psx_delay_BFC3DD98) { - psx_delay_BFC3DD98 = 0; - if (psx_taken_BFC3DD98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DC4u); - goto label_BFC3DDC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DA0u); - } -label_BFC3DDA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DDA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DDA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3DDA0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055DA0u); -#endif - /* 0xBFC3DDA4: 8DEF9BE0 lw $t7, -25632($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25632; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25632)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055DA4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9BE0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DA4u); -#endif - /* 0xBFC3DDA8: 84EA0008 lh $t2, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DA8u); return; } cpu->gpr[10] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 10, 0x80u); } - PGXP_LOAD(0x84EA0008u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DDAC: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8400u); -#endif - /* 0xBFC3DDB0: A5EA0184 sh $t2, 388($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DB0u); return; } g_debug_last_store_pc = 0x80055DB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } - PGXP_STORE(0xA5EA0184u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DB0u); -#endif - /* 0xBFC3DDB4: 84F80008 lh $t8, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DB4u); return; } cpu->gpr[24] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 24, 0x80u); } - PGXP_LOAD(0x84F80008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DDB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3DDBC: A438E410 sh $t8, -7152($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7152)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DBCu); return; } g_debug_last_store_pc = 0x80055DBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[24] & 0xFFFFu)); } - PGXP_STORE(0xA438E410u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DC0u); -#endif - /* 0xBFC3DDC0: 8FB90064 lw $t9, 100($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055DC0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90064u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DC0u); -#endif -label_BFC3DDC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DDC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DDC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3DDC8: 17200006 bne $t9, $zero, 0xBFC3DDE4 */ - uint32_t psx_brA_BFC3DDC8 = cpu->gpr[25]; uint32_t psx_brB_BFC3DDC8 = cpu->gpr[0]; - psx_taken_BFC3DDC8 = (psx_brA_BFC3DDC8 != psx_brB_BFC3DDC8); - psx_delay_BFC3DDC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DDCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055DCCu); -#endif - if (psx_delay_BFC3DDC8) { - psx_delay_BFC3DDC8 = 0; - if (psx_taken_BFC3DDC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DE4u); - goto label_BFC3DDE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DD0u); - } -label_BFC3DDD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DDD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DDD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DD0u); -#endif - /* 0xBFC3DDD0: 8FA90068 lw $t1, 104($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055DD0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90068u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DDD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC3DDD8: 312B0004 andi $t3, $t1, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[11] = cpu->gpr[9] & 0x4u; - PGXP_ALU(0x312B0004u, cpu->gpr[11], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80055DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3DDDC: 1160000A beq $t3, $zero, 0xBFC3DE08 */ - uint32_t psx_brA_BFC3DDDC = cpu->gpr[11]; uint32_t psx_brB_BFC3DDDC = cpu->gpr[0]; - psx_taken_BFC3DDDC = (psx_brA_BFC3DDDC == psx_brB_BFC3DDDC); - psx_delay_BFC3DDDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DE0u); -#endif - /* 0xBFC3DDE0: 8FAA0050 lw $t2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055DE0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0050u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DE0u); -#endif - if (psx_delay_BFC3DDDC) { - psx_delay_BFC3DDDC = 0; - if (psx_taken_BFC3DDDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055E08u); - goto label_BFC3DE08; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055DE4u); - } -label_BFC3DDE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DDE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DDE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3DDE4: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055DE4u); -#endif - /* 0xBFC3DDE8: 8DAD9BE0 lw $t5, -25632($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25632; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25632)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055DE8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9BE0u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DE8u); -#endif - /* 0xBFC3DDEC: 84EC000A lh $t4, 10($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DECu); return; } cpu->gpr[12] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 12, 0x80u); } - PGXP_LOAD(0x84EC000Au, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DDF0: 3C018014 lui $at, 0x8014 */ - cpu->gpr[1] = 0x80140000u; - PGXP_ALU(0x3C018014u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC3DDF4: A5AC0186 sh $t4, 390($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + 390; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (390)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DF4u); return; } g_debug_last_store_pc = 0x80055DF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } - PGXP_STORE(0xA5AC0186u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DF4u); -#endif - /* 0xBFC3DDF8: 84EE000A lh $t6, 10($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 10; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (10)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055DF8u); return; } cpu->gpr[14] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x84EE000Au, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DDFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3DE00: A42EE412 sh $t6, -7150($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -7150; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-7150)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80055E00u); return; } g_debug_last_store_pc = 0x80055E00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[14] & 0xFFFFu)); } - PGXP_STORE(0xA42EE412u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E00u); -#endif - /* 0xBFC3DE04: 8FAA0050 lw $t2, 80($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055E04u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0050u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E04u); -#endif -label_BFC3DE08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DE08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DE08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DE08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3DE0C: 11400007 beq $t2, $zero, 0xBFC3DE2C */ - uint32_t psx_brA_BFC3DE0C = cpu->gpr[10]; uint32_t psx_brB_BFC3DE0C = cpu->gpr[0]; - psx_taken_BFC3DE0C = (psx_brA_BFC3DE0C == psx_brB_BFC3DE0C); - psx_delay_BFC3DE0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E10u); -#endif - /* 0xBFC3DE10: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055E10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E10u); -#endif - if (psx_delay_BFC3DE0C) { - psx_delay_BFC3DE0C = 0; - if (psx_taken_BFC3DE0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055E2Cu); - goto label_BFC3DE2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055E14u); - } -label_BFC3DE14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DE14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DE14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DE14: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055E14u); -#endif - /* 0xBFC3DE18: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055E18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3DE1C: 24050060 addiu $a1, $zero, 96 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (96)); - PGXP_ALU(0x24050060u, cpu->gpr[5], _pgx1, 0x00000060u); } -#ifdef PSX_COSIM - cosim_instr(0x80055E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DE20: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055E28u; /* jal link before delay slot */ - psx_delay_BFC3DE20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3DE24: 27A60050 addiu $a2, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27A60050u, cpu->gpr[6], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80055E24u); -#endif - if (psx_delay_BFC3DE20) { - psx_delay_BFC3DE20 = 0; - cpu->gpr[31] = 0x80055E28u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3DE28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DE28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DE28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E28u); -#endif - /* 0xBFC3DE28: 8FBF002C lw $ra, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055E28u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF002Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E28u); -#endif -label_BFC3DE2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DE2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DE2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E2Cu); -#endif - /* 0xBFC3DE2C: 8FA20054 lw $v0, 84($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055E2Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA20054u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80055E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3DE30: 03E00008 jr $ra */ - psx_delay_BFC3DE30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DE34: 27BD00B0 addiu $sp, $sp, 176 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (176)); - PGXP_ALU(0x27BD00B0u, cpu->gpr[29], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x80055E34u); -#endif - if (psx_delay_BFC3DE30) { - psx_delay_BFC3DE30 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3DED0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3DED0u); - int psx_delay_BFC3DEE0 = 0; - int psx_taken_BFC3DEE0 = 0; - int psx_delay_BFC3DEF0 = 0; - int psx_delay_BFC3DF0C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3DEE8u: goto label_BFC3DEE8; - case 0xBFC3DEF0u: goto label_BFC3DEF0; - case 0xBFC3DEF8u: goto label_BFC3DEF8; - default: break; - } - } -label_BFC3DED0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DED0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DED0: 3C010007 lui $at, 0x7 */ - cpu->gpr[1] = 0x00070000u; - PGXP_ALU(0x3C010007u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DED4: 3421F001 ori $at, $at, 0xF001 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF001u; - PGXP_ALU(0x3421F001u, cpu->gpr[1], _pgx1, 0xF001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DED8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80055ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3DEDC: 00A1082B sltu $at, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x00A1082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DEE0: 14200003 bne $at, $zero, 0xBFC3DEF0 */ - uint32_t psx_brA_BFC3DEE0 = cpu->gpr[1]; uint32_t psx_brB_BFC3DEE0 = cpu->gpr[0]; - psx_taken_BFC3DEE0 = (psx_brA_BFC3DEE0 != psx_brB_BFC3DEE0); - psx_delay_BFC3DEE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3DEE4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055EE4u); return; } g_debug_last_store_pc = 0x80055EE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055EE4u); -#endif - if (psx_delay_BFC3DEE0) { - psx_delay_BFC3DEE0 = 0; - if (psx_taken_BFC3DEE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055EF0u); - goto label_BFC3DEF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055EE8u); - } -label_BFC3DEE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DEE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DEE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3DEE8: 3C050007 lui $a1, 0x7 */ - cpu->gpr[5] = 0x00070000u; - PGXP_ALU(0x3C050007u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3DEEC: 34A5F000 ori $a1, $a1, 0xF000 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0xF000u; - PGXP_ALU(0x34A5F000u, cpu->gpr[5], _pgx1, 0xF000u); } -#ifdef PSX_COSIM - cosim_instr(0x80055EECu); -#endif -label_BFC3DEF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DEF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DEF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DEF0: 0C01510A jal 0xB0054428 */ - cpu->gpr[31] = 0x80055EF8u; /* jal link before delay slot */ - psx_delay_BFC3DEF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3DEF4: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055EF4u); return; } g_debug_last_store_pc = 0x80055EF4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80055EF4u); -#endif - if (psx_delay_BFC3DEF0) { - psx_delay_BFC3DEF0 = 0; - cpu->gpr[31] = 0x80055EF8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054428u); - cpu->pc = 0x80054428u; return; - } -label_BFC3DEF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DEF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DEF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055EF8u); -#endif - /* 0xBFC3DEF8: 8FA5001C lw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055EF8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80055EF8u); -#endif - /* 0xBFC3DEFC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055EFCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DF00: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DF04: AC209F28 sw $zero, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F04u); return; } g_debug_last_store_pc = 0x80055F04u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DF08: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3DF0C: 03E00008 jr $ra */ - psx_delay_BFC3DF0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3DF10: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055F10u); -#endif - if (psx_delay_BFC3DF0C) { - psx_delay_BFC3DF0C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3DF20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3DF20u); - int psx_delay_BFC3DF28 = 0; - int psx_taken_BFC3DF28 = 0; - int psx_delay_BFC3DF34 = 0; - int psx_taken_BFC3DF34 = 0; - int psx_delay_BFC3DF3C = 0; - int psx_taken_BFC3DF3C = 0; - int psx_delay_BFC3DF44 = 0; - int psx_taken_BFC3DF44 = 0; - int psx_delay_BFC3DF4C = 0; - int psx_taken_BFC3DF4C = 0; - int psx_delay_BFC3DF70 = 0; - int psx_delay_BFC3DF80 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3DF30u: goto label_BFC3DF30; - case 0xBFC3DF3Cu: goto label_BFC3DF3C; - case 0xBFC3DF44u: goto label_BFC3DF44; - case 0xBFC3DF4Cu: goto label_BFC3DF4C; - case 0xBFC3DF54u: goto label_BFC3DF54; - case 0xBFC3DF5Cu: goto label_BFC3DF5C; - case 0xBFC3DF78u: goto label_BFC3DF78; - default: break; - } - } -label_BFC3DF20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DF20: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3DF24: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F24u); return; } g_debug_last_store_pc = 0x80055F24u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DF28: 10000006 beq $zero, $zero, 0xBFC3DF44 */ - uint32_t psx_brA_BFC3DF28 = cpu->gpr[0]; uint32_t psx_brB_BFC3DF28 = cpu->gpr[0]; - psx_taken_BFC3DF28 = (psx_brA_BFC3DF28 == psx_brB_BFC3DF28); - psx_delay_BFC3DF28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3DF2C: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055F2Cu); -#endif - if (psx_delay_BFC3DF28) { - psx_delay_BFC3DF28 = 0; - if (psx_taken_BFC3DF28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F44u); - goto label_BFC3DF44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F30u); - } -label_BFC3DF30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3DF30: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DF34: 10000009 beq $zero, $zero, 0xBFC3DF5C */ - uint32_t psx_brA_BFC3DF34 = cpu->gpr[0]; uint32_t psx_brB_BFC3DF34 = cpu->gpr[0]; - psx_taken_BFC3DF34 = (psx_brA_BFC3DF34 == psx_brB_BFC3DF34); - psx_delay_BFC3DF34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC3DF38: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F38u); return; } g_debug_last_store_pc = 0x80055F38u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F38u); -#endif - if (psx_delay_BFC3DF34) { - psx_delay_BFC3DF34 = 0; - if (psx_taken_BFC3DF34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F5Cu); - goto label_BFC3DF5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F3Cu); - } -label_BFC3DF3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DF3C: 10000007 beq $zero, $zero, 0xBFC3DF5C */ - uint32_t psx_brA_BFC3DF3C = cpu->gpr[0]; uint32_t psx_brB_BFC3DF3C = cpu->gpr[0]; - psx_taken_BFC3DF3C = (psx_brA_BFC3DF3C == psx_brB_BFC3DF3C); - psx_delay_BFC3DF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC3DF40: AFA0001C sw $zero, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F40u); return; } g_debug_last_store_pc = 0x80055F40u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F40u); -#endif - if (psx_delay_BFC3DF3C) { - psx_delay_BFC3DF3C = 0; - if (psx_taken_BFC3DF3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F5Cu); - goto label_BFC3DF5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F44u); - } -label_BFC3DF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3DF44: 1060FFFA beq $v1, $zero, 0xBFC3DF30 */ - uint32_t psx_brA_BFC3DF44 = cpu->gpr[3]; uint32_t psx_brB_BFC3DF44 = cpu->gpr[0]; - psx_taken_BFC3DF44 = (psx_brA_BFC3DF44 == psx_brB_BFC3DF44); - psx_delay_BFC3DF44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DF48: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F48u); -#endif - if (psx_delay_BFC3DF44) { - psx_delay_BFC3DF44 = 0; - if (psx_taken_BFC3DF44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F30u); - goto label_BFC3DF30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F4Cu); - } -label_BFC3DF4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3DF4C: 1061FFFB beq $v1, $at, 0xBFC3DF3C */ - uint32_t psx_brA_BFC3DF4C = cpu->gpr[3]; uint32_t psx_brB_BFC3DF4C = cpu->gpr[1]; - psx_taken_BFC3DF4C = (psx_brA_BFC3DF4C == psx_brB_BFC3DF4C); - psx_delay_BFC3DF4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DF50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055F50u); -#endif - if (psx_delay_BFC3DF4C) { - psx_delay_BFC3DF4C = 0; - if (psx_taken_BFC3DF4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F3Cu); - goto label_BFC3DF3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055F54u); - } -label_BFC3DF54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3DF54: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3DF58: AFAF001C sw $t7, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F58u); return; } g_debug_last_store_pc = 0x80055F58u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF001Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F58u); -#endif -label_BFC3DF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DF5C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DF60: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055F60u); -#endif - /* 0xBFC3DF64: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3DF68: AC239F20 sw $v1, -24800($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F68u); return; } g_debug_last_store_pc = 0x80055F68u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC239F20u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3DF6C: 24050021 addiu $a1, $zero, 33 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); - PGXP_ALU(0x24050021u, cpu->gpr[5], _pgx1, 0x00000021u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DF70: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055F78u; /* jal link before delay slot */ - psx_delay_BFC3DF70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3DF74: 27A6001C addiu $a2, $sp, 28 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (28)); - PGXP_ALU(0x27A6001Cu, cpu->gpr[6], _pgx1, 0x0000001Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80055F74u); -#endif - if (psx_delay_BFC3DF70) { - psx_delay_BFC3DF70 = 0; - cpu->gpr[31] = 0x80055F78u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3DF78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F78u); -#endif - /* 0xBFC3DF78: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055F78u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DF7C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3DF80: 03E00008 jr $ra */ - psx_delay_BFC3DF80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DF84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055F84u); -#endif - if (psx_delay_BFC3DF80) { - psx_delay_BFC3DF80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3DF90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3DF90u); - int psx_delay_BFC3DFA0 = 0; - int psx_taken_BFC3DFA0 = 0; - int psx_delay_BFC3DFA8 = 0; - int psx_taken_BFC3DFA8 = 0; - int psx_delay_BFC3DFB4 = 0; - int psx_taken_BFC3DFB4 = 0; - int psx_delay_BFC3DFBC = 0; - int psx_taken_BFC3DFBC = 0; - int psx_delay_BFC3DFC8 = 0; - int psx_taken_BFC3DFC8 = 0; - int psx_delay_BFC3DFD0 = 0; - int psx_taken_BFC3DFD0 = 0; - int psx_delay_BFC3DFF4 = 0; - int psx_delay_BFC3E010 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3DFA8u: goto label_BFC3DFA8; - case 0xBFC3DFB0u: goto label_BFC3DFB0; - case 0xBFC3DFBCu: goto label_BFC3DFBC; - case 0xBFC3DFC4u: goto label_BFC3DFC4; - case 0xBFC3DFC8u: goto label_BFC3DFC8; - case 0xBFC3DFD0u: goto label_BFC3DFD0; - case 0xBFC3DFD8u: goto label_BFC3DFD8; - case 0xBFC3DFE8u: goto label_BFC3DFE8; - case 0xBFC3DFFCu: goto label_BFC3DFFC; - case 0xBFC3E008u: goto label_BFC3E008; - default: break; - } - } -label_BFC3DF90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DF90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DF90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DF90: 3C010007 lui $at, 0x7 */ - cpu->gpr[1] = 0x00070000u; - PGXP_ALU(0x3C010007u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3DF94: 3421F001 ori $at, $at, 0xF001 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xF001u; - PGXP_ALU(0x3421F001u, cpu->gpr[1], _pgx1, 0xF001u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3DF98: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80055F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3DF9C: 0081082B sltu $at, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[1] ? 1 : 0); - PGXP_ALU(0x0081082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DFA0: 14200003 bne $at, $zero, 0xBFC3DFB0 */ - uint32_t psx_brA_BFC3DFA0 = cpu->gpr[1]; uint32_t psx_brB_BFC3DFA0 = cpu->gpr[0]; - psx_taken_BFC3DFA0 = (psx_brA_BFC3DFA0 != psx_brB_BFC3DFA0); - psx_delay_BFC3DFA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3DFA4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055FA4u); return; } g_debug_last_store_pc = 0x80055FA4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80055FA4u); -#endif - if (psx_delay_BFC3DFA0) { - psx_delay_BFC3DFA0 = 0; - if (psx_taken_BFC3DFA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FB0u); - goto label_BFC3DFB0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FA8u); - } -label_BFC3DFA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DFA8: 10000017 beq $zero, $zero, 0xBFC3E008 */ - uint32_t psx_brA_BFC3DFA8 = cpu->gpr[0]; uint32_t psx_brB_BFC3DFA8 = cpu->gpr[0]; - psx_taken_BFC3DFA8 = (psx_brA_BFC3DFA8 == psx_brB_BFC3DFA8); - psx_delay_BFC3DFA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3DFAC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055FACu); -#endif - if (psx_delay_BFC3DFA8) { - psx_delay_BFC3DFA8 = 0; - if (psx_taken_BFC3DFA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056008u); - goto label_BFC3E008; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FB0u); - } -label_BFC3DFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3DFB0: 2C811000 sltiu $at, $a0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < 0x00001000u ? 1 : 0); - PGXP_ALU(0x2C811000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80055FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DFB4: 10200004 beq $at, $zero, 0xBFC3DFC8 */ - uint32_t psx_brA_BFC3DFB4 = cpu->gpr[1]; uint32_t psx_brB_BFC3DFB4 = cpu->gpr[0]; - psx_taken_BFC3DFB4 = (psx_brA_BFC3DFB4 == psx_brB_BFC3DFB4); - psx_delay_BFC3DFB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3DFB8: 308E0007 andi $t6, $a0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x7u; - PGXP_ALU(0x308E0007u, cpu->gpr[14], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055FB8u); -#endif - if (psx_delay_BFC3DFB4) { - psx_delay_BFC3DFB4 = 0; - if (psx_taken_BFC3DFB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FC8u); - goto label_BFC3DFC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FBCu); - } -label_BFC3DFBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DFBC: 10000012 beq $zero, $zero, 0xBFC3E008 */ - uint32_t psx_brA_BFC3DFBC = cpu->gpr[0]; uint32_t psx_brB_BFC3DFBC = cpu->gpr[0]; - psx_taken_BFC3DFBC = (psx_brA_BFC3DFBC == psx_brB_BFC3DFBC); - psx_delay_BFC3DFBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3DFC0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055FC0u); -#endif - if (psx_delay_BFC3DFBC) { - psx_delay_BFC3DFBC = 0; - if (psx_taken_BFC3DFBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056008u); - goto label_BFC3E008; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FC4u); - } -label_BFC3DFC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3DFC4: 308E0007 andi $t6, $a0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] & 0x7u; - PGXP_ALU(0x308E0007u, cpu->gpr[14], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80055FC4u); -#endif -label_BFC3DFC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3DFC8: 15C00003 bne $t6, $zero, 0xBFC3DFD8 */ - uint32_t psx_brA_BFC3DFC8 = cpu->gpr[14]; uint32_t psx_brB_BFC3DFC8 = cpu->gpr[0]; - psx_taken_BFC3DFC8 = (psx_brA_BFC3DFC8 != psx_brB_BFC3DFC8); - psx_delay_BFC3DFC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DFCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80055FCCu); -#endif - if (psx_delay_BFC3DFC8) { - psx_delay_BFC3DFC8 = 0; - if (psx_taken_BFC3DFC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FD8u); - goto label_BFC3DFD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FD0u); - } -label_BFC3DFD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3DFD0: 10000005 beq $zero, $zero, 0xBFC3DFE8 */ - uint32_t psx_brA_BFC3DFD0 = cpu->gpr[0]; uint32_t psx_brB_BFC3DFD0 = cpu->gpr[0]; - psx_taken_BFC3DFD0 = (psx_brA_BFC3DFD0 == psx_brB_BFC3DFD0); - psx_delay_BFC3DFD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3DFD4: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055FD4u); return; } g_debug_last_store_pc = 0x80055FD4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055FD4u); -#endif - if (psx_delay_BFC3DFD0) { - psx_delay_BFC3DFD0 = 0; - if (psx_taken_BFC3DFD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FE8u); - goto label_BFC3DFE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80055FD8u); - } -label_BFC3DFD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DFD8: 24840008 addiu $a0, $a0, 8 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (8)); - PGXP_ALU(0x24840008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80055FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3DFDC: 2401FFFB addiu $at, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x2401FFFBu, cpu->gpr[1], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x80055FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3DFE0: 00812024 and $a0, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[1]; - PGXP_ALU(0x00812024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80055FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3DFE4: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055FE4u); return; } g_debug_last_store_pc = 0x80055FE4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055FE4u); -#endif -label_BFC3DFE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3DFE8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80055FE8u); -#endif - /* 0xBFC3DFEC: 8C849F18 lw $a0, -24808($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055FECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F18u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3DFF0: 2405002B addiu $a1, $zero, 43 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); - PGXP_ALU(0x2405002Bu, cpu->gpr[5], _pgx1, 0x0000002Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80055FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3DFF4: 0C0151C4 jal 0xB0054710 */ - cpu->gpr[31] = 0x80055FFCu; /* jal link before delay slot */ - psx_delay_BFC3DFF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3DFF8: 27A60018 addiu $a2, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27A60018u, cpu->gpr[6], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80055FF8u); -#endif - if (psx_delay_BFC3DFF4) { - psx_delay_BFC3DFF4 = 0; - cpu->gpr[31] = 0x80055FFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80054710u); - cpu->pc = 0x80054710u; return; - } -label_BFC3DFFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3DFFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3DFFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80055FFCu); -#endif - /* 0xBFC3DFFC: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80055FFCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80055FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E000: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3E004: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056004u); -#endif -label_BFC3E008: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E008u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056008u); -#endif - /* 0xBFC3E008: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056008u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E00C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005600Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E010: 03E00008 jr $ra */ - psx_delay_BFC3E010 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E014: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056014u); -#endif - if (psx_delay_BFC3E010) { - psx_delay_BFC3E010 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E020(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E020u); - int psx_delay_BFC3E034 = 0; - int psx_taken_BFC3E034 = 0; - int psx_delay_BFC3E03C = 0; - int psx_taken_BFC3E03C = 0; - int psx_delay_BFC3E04C = 0; - int psx_delay_BFC3E05C = 0; - int psx_taken_BFC3E05C = 0; - int psx_delay_BFC3E064 = 0; - int psx_taken_BFC3E064 = 0; - int psx_delay_BFC3E074 = 0; - int psx_delay_BFC3E07C = 0; - int psx_taken_BFC3E07C = 0; - int psx_delay_BFC3E090 = 0; - int psx_taken_BFC3E090 = 0; - int psx_delay_BFC3E098 = 0; - int psx_taken_BFC3E098 = 0; - int psx_delay_BFC3E0B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E03Cu: goto label_BFC3E03C; - case 0xBFC3E044u: goto label_BFC3E044; - case 0xBFC3E054u: goto label_BFC3E054; - case 0xBFC3E064u: goto label_BFC3E064; - case 0xBFC3E06Cu: goto label_BFC3E06C; - case 0xBFC3E07Cu: goto label_BFC3E07C; - case 0xBFC3E084u: goto label_BFC3E084; - case 0xBFC3E088u: goto label_BFC3E088; - case 0xBFC3E098u: goto label_BFC3E098; - case 0xBFC3E0A0u: goto label_BFC3E0A0; - case 0xBFC3E0B0u: goto label_BFC3E0B0; - default: break; - } - } -label_BFC3E020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E020: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056020u); -#endif - /* 0xBFC3E024: 8DCE9F28 lw $t6, -24792($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056024u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E028: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80056028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3E02C: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005602Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3E030: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056030u); return; } g_debug_last_store_pc = 0x80056030u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC3E034: 15C50003 bne $t6, $a1, 0xBFC3E044 */ - uint32_t psx_brA_BFC3E034 = cpu->gpr[14]; uint32_t psx_brB_BFC3E034 = cpu->gpr[5]; - psx_taken_BFC3E034 = (psx_brA_BFC3E034 != psx_brB_BFC3E034); - psx_delay_BFC3E034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3E038: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056038u); return; } g_debug_last_store_pc = 0x80056038u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056038u); -#endif - if (psx_delay_BFC3E034) { - psx_delay_BFC3E034 = 0; - if (psx_taken_BFC3E034) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056044u); - goto label_BFC3E044; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005603Cu); - } -label_BFC3E03C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E03Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005603Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E03C: 1000001C beq $zero, $zero, 0xBFC3E0B0 */ - uint32_t psx_brA_BFC3E03C = cpu->gpr[0]; uint32_t psx_brB_BFC3E03C = cpu->gpr[0]; - psx_taken_BFC3E03C = (psx_brA_BFC3E03C == psx_brB_BFC3E03C); - psx_delay_BFC3E03C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E040: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056040u); -#endif - if (psx_delay_BFC3E03C) { - psx_delay_BFC3E03C = 0; - if (psx_taken_BFC3E03C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560B0u); - goto label_BFC3E0B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056044u); - } -label_BFC3E044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E044: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056044u); -#endif - /* 0xBFC3E048: 8C849F24 lw $a0, -24796($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24796; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056048u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F24u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3E04C: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x80056054u; /* jal link before delay slot */ - psx_delay_BFC3E04C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056050u); -#endif - if (psx_delay_BFC3E04C) { - psx_delay_BFC3E04C = 0; - cpu->gpr[31] = 0x80056054u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC3E054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056054u); -#endif - /* 0xBFC3E054: 8FAF0020 lw $t7, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056054u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0020u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3E058: 24050001 addiu $a1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24050001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3E05C: 15E5000E bne $t7, $a1, 0xBFC3E098 */ - uint32_t psx_brA_BFC3E05C = cpu->gpr[15]; uint32_t psx_brB_BFC3E05C = cpu->gpr[5]; - psx_taken_BFC3E05C = (psx_brA_BFC3E05C != psx_brB_BFC3E05C); - psx_delay_BFC3E05C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E060: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056060u); -#endif - if (psx_delay_BFC3E05C) { - psx_delay_BFC3E05C = 0; - if (psx_taken_BFC3E05C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056098u); - goto label_BFC3E098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056064u); - } -label_BFC3E064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E064: 14400008 bne $v0, $zero, 0xBFC3E088 */ - uint32_t psx_brA_BFC3E064 = cpu->gpr[2]; uint32_t psx_brB_BFC3E064 = cpu->gpr[0]; - psx_taken_BFC3E064 = (psx_brA_BFC3E064 != psx_brB_BFC3E064); - psx_delay_BFC3E064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E068: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056068u); -#endif - if (psx_delay_BFC3E064) { - psx_delay_BFC3E064 = 0; - if (psx_taken_BFC3E064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056088u); - goto label_BFC3E088; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005606Cu); - } -label_BFC3E06C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E06Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005606Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E06C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005606Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056070u); -#endif - /* 0xBFC3E070: 8C849F24 lw $a0, -24796($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -24796; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-24796)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056070u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849F24u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3E074: 0C016A80 jal 0xB005AA00 */ - cpu->gpr[31] = 0x8005607Cu; /* jal link before delay slot */ - psx_delay_BFC3E074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056078u); -#endif - if (psx_delay_BFC3E074) { - psx_delay_BFC3E074 = 0; - cpu->gpr[31] = 0x8005607Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA00u); - cpu->pc = 0x8005AA00u; return; - } -label_BFC3E07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005607Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E07C: 1040FFFB beq $v0, $zero, 0xBFC3E06C */ - uint32_t psx_brA_BFC3E07C = cpu->gpr[2]; uint32_t psx_brB_BFC3E07C = cpu->gpr[0]; - psx_taken_BFC3E07C = (psx_brA_BFC3E07C == psx_brB_BFC3E07C); - psx_delay_BFC3E07C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E080: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056080u); -#endif - if (psx_delay_BFC3E07C) { - psx_delay_BFC3E07C = 0; - if (psx_taken_BFC3E07C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005606Cu); - goto label_BFC3E06C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056084u); - } -label_BFC3E084: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E084u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E084: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056084u); -#endif -label_BFC3E088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E088: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3E08C: AC389F28 sw $t8, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005608Cu); return; } g_debug_last_store_pc = 0x8005608Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389F28u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005608Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E090: 10000007 beq $zero, $zero, 0xBFC3E0B0 */ - uint32_t psx_brA_BFC3E090 = cpu->gpr[0]; uint32_t psx_brB_BFC3E090 = cpu->gpr[0]; - psx_taken_BFC3E090 = (psx_brA_BFC3E090 == psx_brB_BFC3E090); - psx_delay_BFC3E090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E094: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056094u); -#endif - if (psx_delay_BFC3E090) { - psx_delay_BFC3E090 = 0; - if (psx_taken_BFC3E090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560B0u); - goto label_BFC3E0B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056098u); - } -label_BFC3E098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC3E098: 14450005 bne $v0, $a1, 0xBFC3E0B0 */ - uint32_t psx_brA_BFC3E098 = cpu->gpr[2]; uint32_t psx_brB_BFC3E098 = cpu->gpr[5]; - psx_taken_BFC3E098 = (psx_brA_BFC3E098 != psx_brB_BFC3E098); - psx_delay_BFC3E098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E09C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005609Cu); -#endif - if (psx_delay_BFC3E098) { - psx_delay_BFC3E098 = 0; - if (psx_taken_BFC3E098) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560B0u); - goto label_BFC3E0B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560A0u); - } -label_BFC3E0A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3E0A0: 24190001 addiu $t9, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24190001u, cpu->gpr[25], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800560A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E0A4: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800560A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3E0A8: AC399F28 sw $t9, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800560A8u); return; } g_debug_last_store_pc = 0x800560A8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399F28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800560A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E0AC: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800560ACu); -#endif -label_BFC3E0B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560B0u); -#endif - /* 0xBFC3E0B0: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800560B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800560B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E0B4: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800560B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E0B8: 03E00008 jr $ra */ - psx_delay_BFC3E0B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E0BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800560BCu); -#endif - if (psx_delay_BFC3E0B8) { - psx_delay_BFC3E0B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E0C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E0C0u); - int psx_delay_BFC3E0C4 = 0; - int psx_taken_BFC3E0C4 = 0; - int psx_delay_BFC3E0CC = 0; - int psx_delay_BFC3E0E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E0CCu: goto label_BFC3E0CC; - case 0xBFC3E0D4u: goto label_BFC3E0D4; - default: break; - } - } -label_BFC3E0C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E0C0: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800560C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3E0C4: 14810003 bne $a0, $at, 0xBFC3E0D4 */ - uint32_t psx_brA_BFC3E0C4 = cpu->gpr[4]; uint32_t psx_brB_BFC3E0C4 = cpu->gpr[1]; - psx_taken_BFC3E0C4 = (psx_brA_BFC3E0C4 != psx_brB_BFC3E0C4); - psx_delay_BFC3E0C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E0C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800560C8u); -#endif - if (psx_delay_BFC3E0C4) { - psx_delay_BFC3E0C4 = 0; - if (psx_taken_BFC3E0C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560D4u); - goto label_BFC3E0D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560CCu); - } -label_BFC3E0CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E0CC: 03E00008 jr $ra */ - psx_delay_BFC3E0CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E0D0: AC209F28 sw $zero, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800560D0u); return; } g_debug_last_store_pc = 0x800560D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209F28u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800560D0u); -#endif - if (psx_delay_BFC3E0CC) { - psx_delay_BFC3E0CC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3E0D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E0D4: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800560D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E0D8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800560D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3E0DC: AC2E9F28 sw $t6, -24792($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800560DCu); return; } g_debug_last_store_pc = 0x800560DCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2E9F28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800560DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E0E0: 03E00008 jr $ra */ - psx_delay_BFC3E0E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E0E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800560E4u); -#endif - if (psx_delay_BFC3E0E0) { - psx_delay_BFC3E0E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E0E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E0E8u); - int psx_delay_BFC3E0F4 = 0; - int psx_taken_BFC3E0F4 = 0; - int psx_delay_BFC3E0FC = 0; - int psx_delay_BFC3E108 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E0FCu: goto label_BFC3E0FC; - case 0xBFC3E108u: goto label_BFC3E108; - default: break; - } - } -label_BFC3E0E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E0E8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800560E8u); -#endif - /* 0xBFC3E0EC: 8DCE9F28 lw $t6, -24792($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -24792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-24792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800560ECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9F28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800560ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E0F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800560F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E0F4: 15C00004 bne $t6, $zero, 0xBFC3E108 */ - uint32_t psx_brA_BFC3E0F4 = cpu->gpr[14]; uint32_t psx_brB_BFC3E0F4 = cpu->gpr[0]; - psx_taken_BFC3E0F4 = (psx_brA_BFC3E0F4 != psx_brB_BFC3E0F4); - psx_delay_BFC3E0F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E0F8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800560F8u); -#endif - if (psx_delay_BFC3E0F4) { - psx_delay_BFC3E0F4 = 0; - if (psx_taken_BFC3E0F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056108u); - goto label_BFC3E108; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800560FCu); - } -label_BFC3E0FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E0FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800560FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E0FC: 03E00008 jr $ra */ - psx_delay_BFC3E0FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E100: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056100u); -#endif - if (psx_delay_BFC3E0FC) { - psx_delay_BFC3E0FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3E108: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E108u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E108: 03E00008 jr $ra */ - psx_delay_BFC3E108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E10C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005610Cu); -#endif - if (psx_delay_BFC3E108) { - psx_delay_BFC3E108 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E110(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E110u); - int psx_delay_BFC3E120 = 0; - int psx_taken_BFC3E120 = 0; - int psx_delay_BFC3E13C = 0; - int psx_taken_BFC3E13C = 0; - int psx_delay_BFC3E170 = 0; - int psx_taken_BFC3E170 = 0; - int psx_delay_BFC3E18C = 0; - int psx_taken_BFC3E18C = 0; - int psx_delay_BFC3E194 = 0; - int psx_taken_BFC3E194 = 0; - int psx_delay_BFC3E1A0 = 0; - int psx_taken_BFC3E1A0 = 0; - int psx_delay_BFC3E1B8 = 0; - int psx_taken_BFC3E1B8 = 0; - int psx_delay_BFC3E1D4 = 0; - int psx_taken_BFC3E1D4 = 0; - int psx_delay_BFC3E1E8 = 0; - int psx_taken_BFC3E1E8 = 0; - int psx_delay_BFC3E1F4 = 0; - int psx_taken_BFC3E1F4 = 0; - int psx_delay_BFC3E1FC = 0; - int psx_taken_BFC3E1FC = 0; - int psx_delay_BFC3E218 = 0; - int psx_taken_BFC3E218 = 0; - int psx_delay_BFC3E220 = 0; - int psx_taken_BFC3E220 = 0; - int psx_delay_BFC3E234 = 0; - int psx_taken_BFC3E234 = 0; - int psx_delay_BFC3E250 = 0; - int psx_taken_BFC3E250 = 0; - int psx_delay_BFC3E268 = 0; - int psx_taken_BFC3E268 = 0; - int psx_delay_BFC3E294 = 0; - int psx_taken_BFC3E294 = 0; - int psx_delay_BFC3E2A4 = 0; - int psx_taken_BFC3E2A4 = 0; - int psx_delay_BFC3E2B0 = 0; - int psx_taken_BFC3E2B0 = 0; - int psx_delay_BFC3E2C8 = 0; - int psx_taken_BFC3E2C8 = 0; - int psx_delay_BFC3E2D0 = 0; - int psx_taken_BFC3E2D0 = 0; - int psx_delay_BFC3E304 = 0; - int psx_taken_BFC3E304 = 0; - int psx_delay_BFC3E310 = 0; - int psx_taken_BFC3E310 = 0; - int psx_delay_BFC3E31C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E128u: goto label_BFC3E128; - case 0xBFC3E144u: goto label_BFC3E144; - case 0xBFC3E164u: goto label_BFC3E164; - case 0xBFC3E178u: goto label_BFC3E178; - case 0xBFC3E184u: goto label_BFC3E184; - case 0xBFC3E194u: goto label_BFC3E194; - case 0xBFC3E19Cu: goto label_BFC3E19C; - case 0xBFC3E1A0u: goto label_BFC3E1A0; - case 0xBFC3E1A8u: goto label_BFC3E1A8; - case 0xBFC3E1C0u: goto label_BFC3E1C0; - case 0xBFC3E1DCu: goto label_BFC3E1DC; - case 0xBFC3E1E4u: goto label_BFC3E1E4; - case 0xBFC3E1F0u: goto label_BFC3E1F0; - case 0xBFC3E1F4u: goto label_BFC3E1F4; - case 0xBFC3E1FCu: goto label_BFC3E1FC; - case 0xBFC3E204u: goto label_BFC3E204; - case 0xBFC3E208u: goto label_BFC3E208; - case 0xBFC3E20Cu: goto label_BFC3E20C; - case 0xBFC3E220u: goto label_BFC3E220; - case 0xBFC3E228u: goto label_BFC3E228; - case 0xBFC3E22Cu: goto label_BFC3E22C; - case 0xBFC3E23Cu: goto label_BFC3E23C; - case 0xBFC3E244u: goto label_BFC3E244; - case 0xBFC3E258u: goto label_BFC3E258; - case 0xBFC3E270u: goto label_BFC3E270; - case 0xBFC3E28Cu: goto label_BFC3E28C; - case 0xBFC3E29Cu: goto label_BFC3E29C; - case 0xBFC3E2A0u: goto label_BFC3E2A0; - case 0xBFC3E2ACu: goto label_BFC3E2AC; - case 0xBFC3E2B0u: goto label_BFC3E2B0; - case 0xBFC3E2B8u: goto label_BFC3E2B8; - case 0xBFC3E2BCu: goto label_BFC3E2BC; - case 0xBFC3E2D0u: goto label_BFC3E2D0; - case 0xBFC3E2D8u: goto label_BFC3E2D8; - case 0xBFC3E30Cu: goto label_BFC3E30C; - case 0xBFC3E318u: goto label_BFC3E318; - default: break; - } - } -label_BFC3E110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E110: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056110u); -#endif - /* 0xBFC3E114: 8C639BF4 lw $v1, -25612($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056114u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639BF4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E118: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3E11C: AFB00004 sw $s0, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005611Cu); return; } g_debug_last_store_pc = 0x8005611Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00004u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005611Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E120: 1C600008 bgtz $v1, 0xBFC3E144 */ - uint32_t psx_brA_BFC3E120 = cpu->gpr[3]; - psx_taken_BFC3E120 = ((int32_t)psx_brA_BFC3E120 > 0); - psx_delay_BFC3E120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E124: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056124u); -#endif - if (psx_delay_BFC3E120) { - psx_delay_BFC3E120 = 0; - if (psx_taken_BFC3E120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056144u); - goto label_BFC3E144; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056128u); - } -label_BFC3E128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E128: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056128u); -#endif - /* 0xBFC3E12C: 8C84EE44 lw $a0, -4540($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005612Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005612Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E130: 3C0D0FFF lui $t5, 0xFFF */ - cpu->gpr[13] = 0x0FFF0000u; - PGXP_ALU(0x3C0D0FFFu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3E134: 3C0C2FFF lui $t4, 0x2FFF */ - cpu->gpr[12] = 0x2FFF0000u; - PGXP_ALU(0x3C0C2FFFu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3E138: 358CFFFF ori $t4, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] | 0xFFFFu; - PGXP_ALU(0x358CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E13C: 1000002D beq $zero, $zero, 0xBFC3E1F4 */ - uint32_t psx_brA_BFC3E13C = cpu->gpr[0]; uint32_t psx_brB_BFC3E13C = cpu->gpr[0]; - psx_taken_BFC3E13C = (psx_brA_BFC3E13C == psx_brB_BFC3E13C); - psx_delay_BFC3E13C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E140: 35ADFFFF ori $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] | 0xFFFFu; - PGXP_ALU(0x35ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056140u); -#endif - if (psx_delay_BFC3E13C) { - psx_delay_BFC3E13C = 0; - if (psx_taken_BFC3E13C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561F4u); - goto label_BFC3E1F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056144u); - } -label_BFC3E144: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E144u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E144: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056144u); -#endif - /* 0xBFC3E148: 8C84EE44 lw $a0, -4540($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056148u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3E14C: 3C0C2FFF lui $t4, 0x2FFF */ - cpu->gpr[12] = 0x2FFF0000u; - PGXP_ALU(0x3C0C2FFFu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005614Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E150: 3C0D0FFF lui $t5, 0xFFF */ - cpu->gpr[13] = 0x0FFF0000u; - PGXP_ALU(0x3C0D0FFFu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E154: 35ADFFFF ori $t5, $t5, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = cpu->gpr[13] | 0xFFFFu; - PGXP_ALU(0x35ADFFFFu, cpu->gpr[13], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3E158: 358CFFFF ori $t4, $t4, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] | 0xFFFFu; - PGXP_ALU(0x358CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3E15C: 3C0B8000 lui $t3, 0x8000 */ - cpu->gpr[11] = 0x80000000u; - PGXP_ALU(0x3C0B8000u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005615Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3E160: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056160u); -#endif -label_BFC3E164: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E164u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056164u); -#endif - /* 0xBFC3E164: 8CA60000 lw $a2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056164u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x8CA60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3E168: 24480001 addiu $t0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24480001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4840u); -#endif - /* 0xBFC3E16C: 00CB7024 and $t6, $a2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[11]; - PGXP_ALU(0x00CB7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005616Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E170: 11C0001A beq $t6, $zero, 0xBFC3E1DC */ - uint32_t psx_brA_BFC3E170 = cpu->gpr[14]; uint32_t psx_brB_BFC3E170 = cpu->gpr[0]; - psx_taken_BFC3E170 = (psx_brA_BFC3E170 == psx_brB_BFC3E170); - psx_delay_BFC3E170 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056174u); -#endif - if (psx_delay_BFC3E170) { - psx_delay_BFC3E170 = 0; - if (psx_taken_BFC3E170) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561DCu); - goto label_BFC3E1DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056178u); - } -label_BFC3E178: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E178u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x181u); -#endif - /* 0xBFC3E178: 01003821 addu $a3, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC3E17C: 000778C0 sll $t7, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 3u; - PGXP_ALU(0x000778C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8005617Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8210u); -#endif - /* 0xBFC3E180: 008F4821 addu $t1, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F4821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056180u); -#endif -label_BFC3E184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056184u); -#endif - /* 0xBFC3E184: 8D2A0000 lw $t2, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056184u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } - PGXP_LOAD(0x8D2A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E188: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC3E18C: 158A0004 bne $t4, $t2, 0xBFC3E1A0 */ - uint32_t psx_brA_BFC3E18C = cpu->gpr[12]; uint32_t psx_brB_BFC3E18C = cpu->gpr[10]; - psx_taken_BFC3E18C = (psx_brA_BFC3E18C != psx_brB_BFC3E18C); - psx_delay_BFC3E18C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000C00u); -#endif - /* 0xBFC3E190: 014BC024 and $t8, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014BC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056190u); -#endif - if (psx_delay_BFC3E18C) { - psx_delay_BFC3E18C = 0; - if (psx_taken_BFC3E18C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561A0u); - goto label_BFC3E1A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056194u); - } -label_BFC3E194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E194: 1000FFFB beq $zero, $zero, 0xBFC3E184 */ - uint32_t psx_brA_BFC3E194 = cpu->gpr[0]; uint32_t psx_brB_BFC3E194 = cpu->gpr[0]; - psx_taken_BFC3E194 = (psx_brA_BFC3E194 == psx_brB_BFC3E194); - psx_delay_BFC3E194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E198: 25290008 addiu $t1, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (8)); - PGXP_ALU(0x25290008u, cpu->gpr[9], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056198u); -#endif - if (psx_delay_BFC3E194) { - psx_delay_BFC3E194 = 0; - if (psx_taken_BFC3E194) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056184u); - goto label_BFC3E184; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005619Cu); - } -label_BFC3E19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005619Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000C00u); -#endif - /* 0xBFC3E19C: 014BC024 and $t8, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014BC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005619Cu); -#endif -label_BFC3E1A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E1A0: 1300000E beq $t8, $zero, 0xBFC3E1DC */ - uint32_t psx_brA_BFC3E1A0 = cpu->gpr[24]; uint32_t psx_brB_BFC3E1A0 = cpu->gpr[0]; - psx_taken_BFC3E1A0 = (psx_brA_BFC3E1A0 == psx_brB_BFC3E1A0); - psx_delay_BFC3E1A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800561A4u); -#endif - if (psx_delay_BFC3E1A0) { - psx_delay_BFC3E1A0 = 0; - if (psx_taken_BFC3E1A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561DCu); - goto label_BFC3E1DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561A8u); - } -label_BFC3E1A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561A8u); -#endif - /* 0xBFC3E1A8: 8CAE0004 lw $t6, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800561A8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800561A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002040u); -#endif - /* 0xBFC3E1AC: 00CDC824 and $t9, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[6] & cpu->gpr[13]; - PGXP_ALU(0x00CDC824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002400u); -#endif - /* 0xBFC3E1B0: 014DC024 and $t8, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[13]; - PGXP_ALU(0x014DC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC3E1B4: 032E7821 addu $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3E1B8: 15F80008 bne $t7, $t8, 0xBFC3E1DC */ - uint32_t psx_brA_BFC3E1B8 = cpu->gpr[15]; uint32_t psx_brB_BFC3E1B8 = cpu->gpr[24]; - psx_taken_BFC3E1B8 = (psx_brA_BFC3E1B8 != psx_brB_BFC3E1B8); - psx_delay_BFC3E1B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800561BCu); -#endif - if (psx_delay_BFC3E1B8) { - psx_delay_BFC3E1B8 = 0; - if (psx_taken_BFC3E1B8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561DCu); - goto label_BFC3E1DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561C0u); - } -label_BFC3E1C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1200u); -#endif - /* 0xBFC3E1C0: AD2C0000 sw $t4, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800561C0u); return; } g_debug_last_store_pc = 0x800561C0u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAD2C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800561C0u); -#endif - /* 0xBFC3E1C4: 8CB90004 lw $t9, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800561C4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20u); } - PGXP_LOAD(0x8CB90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800561C4u); -#endif - /* 0xBFC3E1C8: 8D2E0004 lw $t6, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800561C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x200u); } - PGXP_LOAD(0x8D2E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800561C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800561CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200C000u); -#endif - /* 0xBFC3E1D0: 032E7821 addu $t7, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[25] + cpu->gpr[14]; - PGXP_ALU(0x032E7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1D4: 10000003 beq $zero, $zero, 0xBFC3E1E4 */ - uint32_t psx_brA_BFC3E1D4 = cpu->gpr[0]; uint32_t psx_brB_BFC3E1D4 = cpu->gpr[0]; - psx_taken_BFC3E1D4 = (psx_brA_BFC3E1D4 == psx_brB_BFC3E1D4); - psx_delay_BFC3E1D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3E1D8: ACAF0004 sw $t7, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800561D8u); return; } g_debug_last_store_pc = 0x800561D8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800561D8u); -#endif - if (psx_delay_BFC3E1D4) { - psx_delay_BFC3E1D4 = 0; - if (psx_taken_BFC3E1D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561E4u); - goto label_BFC3E1E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561DCu); - } -label_BFC3E1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC3E1DC: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3E1E0: 24A50008 addiu $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (8)); - PGXP_ALU(0x24A50008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800561E0u); -#endif -label_BFC3E1E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC3E1E4: 0043082A slt $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E1E8: 1420FFDE bne $at, $zero, 0xBFC3E164 */ - uint32_t psx_brA_BFC3E1E8 = cpu->gpr[1]; uint32_t psx_brB_BFC3E1E8 = cpu->gpr[0]; - psx_taken_BFC3E1E8 = (psx_brA_BFC3E1E8 != psx_brB_BFC3E1E8); - psx_delay_BFC3E1E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800561ECu); -#endif - if (psx_delay_BFC3E1E8) { - psx_delay_BFC3E1E8 = 0; - if (psx_taken_BFC3E1E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056164u); - goto label_BFC3E164; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561F0u); - } -label_BFC3E1F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E1F0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561F0u); -#endif -label_BFC3E1F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E1F4: 1C600004 bgtz $v1, 0xBFC3E208 */ - uint32_t psx_brA_BFC3E1F4 = cpu->gpr[3]; - psx_taken_BFC3E1F4 = ((int32_t)psx_brA_BFC3E1F4 > 0); - psx_delay_BFC3E1F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3E1F8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800561F8u); -#endif - if (psx_delay_BFC3E1F4) { - psx_delay_BFC3E1F4 = 0; - if (psx_taken_BFC3E1F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056208u); - goto label_BFC3E208; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800561FCu); - } -label_BFC3E1FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E1FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800561FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E1FC: 1000002C beq $zero, $zero, 0xBFC3E2B0 */ - uint32_t psx_brA_BFC3E1FC = cpu->gpr[0]; uint32_t psx_brB_BFC3E1FC = cpu->gpr[0]; - psx_taken_BFC3E1FC = (psx_brA_BFC3E1FC == psx_brB_BFC3E1FC); - psx_delay_BFC3E1FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3E200: 3C104000 lui $s0, 0x4000 */ - cpu->gpr[16] = 0x40000000u; - PGXP_ALU(0x3C104000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056200u); -#endif - if (psx_delay_BFC3E1FC) { - psx_delay_BFC3E1FC = 0; - if (psx_taken_BFC3E1FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562B0u); - goto label_BFC3E2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056204u); - } -label_BFC3E204: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E204u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3E204: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056204u); -#endif -label_BFC3E208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3E208: 3C104000 lui $s0, 0x4000 */ - cpu->gpr[16] = 0x40000000u; - PGXP_ALU(0x3C104000u, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056208u); -#endif -label_BFC3E20C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E20Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005620Cu); -#endif - /* 0xBFC3E20C: 8CB80000 lw $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005620Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20u); } - PGXP_LOAD(0x8CB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005620Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E210: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010000u); -#endif - /* 0xBFC3E214: 0310C824 and $t9, $t8, $s0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[16]; - PGXP_ALU(0x0310C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3E218: 13200004 beq $t9, $zero, 0xBFC3E22C */ - uint32_t psx_brA_BFC3E218 = cpu->gpr[25]; uint32_t psx_brB_BFC3E218 = cpu->gpr[0]; - psx_taken_BFC3E218 = (psx_brA_BFC3E218 == psx_brB_BFC3E218); - psx_delay_BFC3E218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3E21C: 246EFFFF addiu $t6, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x246EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005621Cu); -#endif - if (psx_delay_BFC3E218) { - psx_delay_BFC3E218 = 0; - if (psx_taken_BFC3E218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005622Cu); - goto label_BFC3E22C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056220u); - } -label_BFC3E220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E220: 10000023 beq $zero, $zero, 0xBFC3E2B0 */ - uint32_t psx_brA_BFC3E220 = cpu->gpr[0]; uint32_t psx_brB_BFC3E220 = cpu->gpr[0]; - psx_taken_BFC3E220 = (psx_brA_BFC3E220 == psx_brB_BFC3E220); - psx_delay_BFC3E220 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E224: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056224u); -#endif - if (psx_delay_BFC3E220) { - psx_delay_BFC3E220 = 0; - if (psx_taken_BFC3E220) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562B0u); - goto label_BFC3E2B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056228u); - } -label_BFC3E228: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E228u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3E228: 246EFFFF addiu $t6, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x246EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056228u); -#endif -label_BFC3E22C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E22Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4006u); -#endif - /* 0xBFC3E22C: 004E082A slt $at, $v0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x004E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005622Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3E230: 24480001 addiu $t0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24480001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E234: 10200019 beq $at, $zero, 0xBFC3E29C */ - uint32_t psx_brA_BFC3E234 = cpu->gpr[1]; uint32_t psx_brB_BFC3E234 = cpu->gpr[0]; - psx_taken_BFC3E234 = (psx_brA_BFC3E234 == psx_brB_BFC3E234); - psx_delay_BFC3E234 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x181u); -#endif - /* 0xBFC3E238: 01003821 addu $a3, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01003821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056238u); -#endif - if (psx_delay_BFC3E234) { - psx_delay_BFC3E234 = 0; - if (psx_taken_BFC3E234) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005629Cu); - goto label_BFC3E29C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005623Cu); - } -label_BFC3E23C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E23Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC3E23C: 000778C0 sll $t7, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[7] << 3u; - PGXP_ALU(0x000778C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8005623Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8210u); -#endif - /* 0xBFC3E240: 008F4821 addu $t1, $a0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[9] = cpu->gpr[4] + cpu->gpr[15]; - PGXP_ALU(0x008F4821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056240u); -#endif -label_BFC3E244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056244u); -#endif - /* 0xBFC3E244: 8D2A0000 lw $t2, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056244u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } - PGXP_LOAD(0x8D2A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E248: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010400u); -#endif - /* 0xBFC3E24C: 0150C024 and $t8, $t2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[10] & cpu->gpr[16]; - PGXP_ALU(0x0150C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005624Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E250: 17000013 bne $t8, $zero, 0xBFC3E2A0 */ - uint32_t psx_brA_BFC3E250 = cpu->gpr[24]; uint32_t psx_brB_BFC3E250 = cpu->gpr[0]; - psx_taken_BFC3E250 = (psx_brA_BFC3E250 != psx_brB_BFC3E250); - psx_delay_BFC3E250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC3E254: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056254u); -#endif - if (psx_delay_BFC3E250) { - psx_delay_BFC3E250 = 0; - if (psx_taken_BFC3E250) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562A0u); - goto label_BFC3E2A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056258u); - } -label_BFC3E258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056258u); -#endif - /* 0xBFC3E258: 8CA60000 lw $a2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056258u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x8CA60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002400u); -#endif - /* 0xBFC3E25C: 014DC824 and $t9, $t2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[10] & cpu->gpr[13]; - PGXP_ALU(0x014DC824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005625Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6040u); -#endif - /* 0xBFC3E260: 00CD7024 and $t6, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[6] & cpu->gpr[13]; - PGXP_ALU(0x00CD7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004002u); -#endif - /* 0xBFC3E264: 032E082B sltu $at, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)(cpu->gpr[25] < cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x032E082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E268: 10200008 beq $at, $zero, 0xBFC3E28C */ - uint32_t psx_brA_BFC3E268 = cpu->gpr[1]; uint32_t psx_brB_BFC3E268 = cpu->gpr[0]; - psx_taken_BFC3E268 = (psx_brA_BFC3E268 == psx_brB_BFC3E268); - psx_delay_BFC3E268 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E26C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005626Cu); -#endif - if (psx_delay_BFC3E268) { - psx_delay_BFC3E268 = 0; - if (psx_taken_BFC3E268) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005628Cu); - goto label_BFC3E28C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056270u); - } -label_BFC3E270: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E270u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC3E270: ACAA0000 sw $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056270u); return; } g_debug_last_store_pc = 0x80056270u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACAA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056270u); -#endif - /* 0xBFC3E274: 8D2F0004 lw $t7, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056274u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x200u); } - PGXP_LOAD(0x8D2F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056274u); -#endif - /* 0xBFC3E278: 8CAB0004 lw $t3, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056278u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20u); } - PGXP_LOAD(0x8CAB0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80056278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3E27C: ACAF0004 sw $t7, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005627Cu); return; } g_debug_last_store_pc = 0x8005627Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005627Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC3E280: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3E284: AD220000 sw $v0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056284u); return; } g_debug_last_store_pc = 0x80056284u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA00u); -#endif - /* 0xBFC3E288: AD2B0004 sw $t3, 4($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056288u); return; } g_debug_last_store_pc = 0x80056288u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAD2B0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80056288u); -#endif -label_BFC3E28C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E28Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E28Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E28C: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005628Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8Au); -#endif - /* 0xBFC3E290: 00E3082A slt $at, $a3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x00E3082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E294: 1420FFEB bne $at, $zero, 0xBFC3E244 */ - uint32_t psx_brA_BFC3E294 = cpu->gpr[1]; uint32_t psx_brB_BFC3E294 = cpu->gpr[0]; - psx_taken_BFC3E294 = (psx_brA_BFC3E294 != psx_brB_BFC3E294); - psx_delay_BFC3E294 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E298: 25290008 addiu $t1, $t1, 8 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (8)); - PGXP_ALU(0x25290008u, cpu->gpr[9], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056298u); -#endif - if (psx_delay_BFC3E294) { - psx_delay_BFC3E294 = 0; - if (psx_taken_BFC3E294) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056244u); - goto label_BFC3E244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005629Cu); - } -label_BFC3E29C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E29Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005629Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x105u); -#endif - /* 0xBFC3E29C: 01001021 addu $v0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005629Cu); -#endif -label_BFC3E2A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xEu); -#endif - /* 0xBFC3E2A0: 0043082A slt $at, $v0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); - PGXP_ALU(0x0043082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800562A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E2A4: 1420FFD9 bne $at, $zero, 0xBFC3E20C */ - uint32_t psx_brA_BFC3E2A4 = cpu->gpr[1]; uint32_t psx_brB_BFC3E2A4 = cpu->gpr[0]; - psx_taken_BFC3E2A4 = (psx_brA_BFC3E2A4 != psx_brB_BFC3E2A4); - psx_delay_BFC3E2A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3E2A8: 24A50008 addiu $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (8)); - PGXP_ALU(0x24A50008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800562A8u); -#endif - if (psx_delay_BFC3E2A4) { - psx_delay_BFC3E2A4 = 0; - if (psx_taken_BFC3E2A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005620Cu); - goto label_BFC3E20C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562ACu); - } -label_BFC3E2AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E2AC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800562ACu); -#endif -label_BFC3E2B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E2B0: 18600019 blez $v1, 0xBFC3E318 */ - uint32_t psx_brA_BFC3E2B0 = cpu->gpr[3]; - psx_taken_BFC3E2B0 = ((int32_t)psx_brA_BFC3E2B0 <= 0); - psx_delay_BFC3E2B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562B4u); -#endif - if (psx_delay_BFC3E2B0) { - psx_delay_BFC3E2B0 = 0; - if (psx_taken_BFC3E2B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056318u); - goto label_BFC3E318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562B8u); - } -label_BFC3E2B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3E2B8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800562B8u); -#endif -label_BFC3E2BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562BCu); -#endif - /* 0xBFC3E2BC: 8CA60000 lw $a2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800562BCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x8CA60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800562BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1010040u); -#endif - /* 0xBFC3E2C4: 00D0C024 and $t8, $a2, $s0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[24] = cpu->gpr[6] & cpu->gpr[16]; - PGXP_ALU(0x00D0C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800562C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E2C8: 17000013 bne $t8, $zero, 0xBFC3E318 */ - uint32_t psx_brA_BFC3E2C8 = cpu->gpr[24]; uint32_t psx_brB_BFC3E2C8 = cpu->gpr[0]; - psx_taken_BFC3E2C8 = (psx_brA_BFC3E2C8 != psx_brB_BFC3E2C8); - psx_delay_BFC3E2C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562CCu); -#endif - if (psx_delay_BFC3E2C8) { - psx_delay_BFC3E2C8 = 0; - if (psx_taken_BFC3E2C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056318u); - goto label_BFC3E318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562D0u); - } -label_BFC3E2D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC3E2D0: 1586000E bne $t4, $a2, 0xBFC3E30C */ - uint32_t psx_brA_BFC3E2D0 = cpu->gpr[12]; uint32_t psx_brB_BFC3E2D0 = cpu->gpr[6]; - psx_taken_BFC3E2D0 = (psx_brA_BFC3E2D0 != psx_brB_BFC3E2D0); - psx_delay_BFC3E2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562D4u); -#endif - if (psx_delay_BFC3E2D0) { - psx_delay_BFC3E2D0 = 0; - if (psx_taken_BFC3E2D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005630Cu); - goto label_BFC3E30C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562D8u); - } -label_BFC3E2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3E2D8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800562D8u); -#endif - /* 0xBFC3E2DC: 8F399BF8 lw $t9, -25608($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800562DCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399BF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800562DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E2E0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800562E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3E2E4: 001970C0 sll $t6, $t9, 3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[25] << 3u; - PGXP_ALU(0x001970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800562E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4018u); -#endif - /* 0xBFC3E2E8: 008E1821 addu $v1, $a0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[14]; - PGXP_ALU(0x008E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800562E8u); -#endif - /* 0xBFC3E2EC: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800562ECu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800562ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800562F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3E2F4: ACAF0000 sw $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800562F4u); return; } g_debug_last_store_pc = 0x800562F4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800562F4u); -#endif - /* 0xBFC3E2F8: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800562F8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800562F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E2FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800562FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3E300: ACB80004 sw $t8, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056300u); return; } g_debug_last_store_pc = 0x80056300u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB80004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E304: 10000004 beq $zero, $zero, 0xBFC3E318 */ - uint32_t psx_brA_BFC3E304 = cpu->gpr[0]; uint32_t psx_brB_BFC3E304 = cpu->gpr[0]; - psx_taken_BFC3E304 = (psx_brA_BFC3E304 == psx_brB_BFC3E304); - psx_delay_BFC3E304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3E308: AC229BF8 sw $v0, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056308u); return; } g_debug_last_store_pc = 0x80056308u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC229BF8u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056308u); -#endif - if (psx_delay_BFC3E304) { - psx_delay_BFC3E304 = 0; - if (psx_taken_BFC3E304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056318u); - goto label_BFC3E318; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005630Cu); - } -label_BFC3E30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3E30C: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005630Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3E310: 1443FFEA bne $v0, $v1, 0xBFC3E2BC */ - uint32_t psx_brA_BFC3E310 = cpu->gpr[2]; uint32_t psx_brB_BFC3E310 = cpu->gpr[3]; - psx_taken_BFC3E310 = (psx_brA_BFC3E310 != psx_brB_BFC3E310); - psx_delay_BFC3E310 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3E314: 24A50008 addiu $a1, $a1, 8 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (8)); - PGXP_ALU(0x24A50008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056314u); -#endif - if (psx_delay_BFC3E310) { - psx_delay_BFC3E310 = 0; - if (psx_taken_BFC3E310) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800562BCu); - goto label_BFC3E2BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056318u); - } -label_BFC3E318: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E318u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056318u); -#endif - /* 0xBFC3E318: 8FB00004 lw $s0, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056318u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00004u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80056318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E31C: 03E00008 jr $ra */ - psx_delay_BFC3E31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E320: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056320u); -#endif - if (psx_delay_BFC3E31C) { - psx_delay_BFC3E31C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E324(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E324u); - int psx_delay_BFC3E324 = 0; - int psx_taken_BFC3E324 = 0; - int psx_delay_BFC3E37C = 0; - int psx_delay_BFC3E388 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E32Cu: goto label_BFC3E32C; - case 0xBFC3E384u: goto label_BFC3E384; - default: break; - } - } -label_BFC3E324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E324: 18800017 blez $a0, 0xBFC3E384 */ - uint32_t psx_brA_BFC3E324 = cpu->gpr[4]; - psx_taken_BFC3E324 = ((int32_t)psx_brA_BFC3E324 <= 0); - psx_delay_BFC3E324 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E328: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056328u); -#endif - if (psx_delay_BFC3E324) { - psx_delay_BFC3E324 = 0; - if (psx_taken_BFC3E324) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056384u); - goto label_BFC3E384; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005632Cu); - } -label_BFC3E32C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E32Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3E32C: AC25EE44 sw $a1, -4540($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005632Cu); return; } g_debug_last_store_pc = 0x8005632Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE44u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005632Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E330: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E334: 3C0E4000 lui $t6, 0x4000 */ - cpu->gpr[14] = 0x40000000u; - PGXP_ALU(0x3C0E4000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E338: AC209BF8 sw $zero, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056338u); return; } g_debug_last_store_pc = 0x80056338u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209BF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80056338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E33C: 35CE1000 ori $t6, $t6, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x1000u; - PGXP_ALU(0x35CE1000u, cpu->gpr[14], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005633Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4020u); -#endif - /* 0xBFC3E340: ACAE0000 sw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056340u); return; } g_debug_last_store_pc = 0x80056340u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E344: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056344u); -#endif - /* 0xBFC3E348: 8DEF9BF0 lw $t7, -25616($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25616; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25616)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056348u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9BF0u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E34C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005634Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3E350: AC249BF4 sw $a0, -25612($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25612; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056350u); return; } g_debug_last_store_pc = 0x80056350u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249BF4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056350u); -#endif - /* 0xBFC3E354: 95E301AC lhu $v1, 428($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (428)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80056354u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8000u); } - PGXP_LOAD(0x95E301ACu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056354u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3E358: 3C180001 lui $t8, 0x1 */ - cpu->gpr[24] = 0x00010000u; - PGXP_ALU(0x3C180001u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E35C: 3063000E andi $v1, $v1, 0xE */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xEu; - PGXP_ALU(0x3063000Eu, cpu->gpr[3], _pgx1, 0x000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8005635Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E360: 00031842 srl $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 1u; - PGXP_ALU(0x00031842u, cpu->gpr[3], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80056360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E364: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000008u); -#endif - /* 0xBFC3E368: 0078C804 sllv $t9, $t8, $v1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[24] << (cpu->gpr[3] & 0x1Fu); - PGXP_ALU(0x0078C804u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3E36C: 2728F000 addiu $t0, $t9, -4096 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[25] + (-4096)); - PGXP_ALU(0x2728F000u, cpu->gpr[8], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005636Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC3E370: ACA80004 sw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056370u); return; } g_debug_last_store_pc = 0x80056370u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E374: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3E378: AC23EE40 sw $v1, -4544($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4544; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056378u); return; } g_debug_last_store_pc = 0x80056378u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE40u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E37C: 03E00008 jr $ra */ - psx_delay_BFC3E37C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3E380: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056380u); -#endif - if (psx_delay_BFC3E37C) { - psx_delay_BFC3E37C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3E384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E384: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E388: 03E00008 jr $ra */ - psx_delay_BFC3E388 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E38C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005638Cu); -#endif - if (psx_delay_BFC3E388) { - psx_delay_BFC3E388 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E390(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E390u); - int psx_delay_BFC3E3BC = 0; - int psx_taken_BFC3E3BC = 0; - int psx_delay_BFC3E3C4 = 0; - int psx_taken_BFC3E3C4 = 0; - int psx_delay_BFC3E3FC = 0; - int psx_taken_BFC3E3FC = 0; - int psx_delay_BFC3E404 = 0; - int psx_taken_BFC3E404 = 0; - int psx_delay_BFC3E42C = 0; - int psx_taken_BFC3E42C = 0; - int psx_delay_BFC3E43C = 0; - int psx_taken_BFC3E43C = 0; - int psx_delay_BFC3E450 = 0; - int psx_delay_BFC3E470 = 0; - int psx_taken_BFC3E470 = 0; - int psx_delay_BFC3E480 = 0; - int psx_taken_BFC3E480 = 0; - int psx_delay_BFC3E4A8 = 0; - int psx_taken_BFC3E4A8 = 0; - int psx_delay_BFC3E4B4 = 0; - int psx_taken_BFC3E4B4 = 0; - int psx_delay_BFC3E4C8 = 0; - int psx_taken_BFC3E4C8 = 0; - int psx_delay_BFC3E4D0 = 0; - int psx_taken_BFC3E4D0 = 0; - int psx_delay_BFC3E4D8 = 0; - int psx_taken_BFC3E4D8 = 0; - int psx_delay_BFC3E4E8 = 0; - int psx_taken_BFC3E4E8 = 0; - int psx_delay_BFC3E4F4 = 0; - int psx_taken_BFC3E4F4 = 0; - int psx_delay_BFC3E4FC = 0; - int psx_taken_BFC3E4FC = 0; - int psx_delay_BFC3E518 = 0; - int psx_taken_BFC3E518 = 0; - int psx_delay_BFC3E520 = 0; - int psx_taken_BFC3E520 = 0; - int psx_delay_BFC3E538 = 0; - int psx_taken_BFC3E538 = 0; - int psx_delay_BFC3E588 = 0; - int psx_taken_BFC3E588 = 0; - int psx_delay_BFC3E590 = 0; - int psx_taken_BFC3E590 = 0; - int psx_delay_BFC3E598 = 0; - int psx_taken_BFC3E598 = 0; - int psx_delay_BFC3E5AC = 0; - int psx_taken_BFC3E5AC = 0; - int psx_delay_BFC3E5C4 = 0; - int psx_taken_BFC3E5C4 = 0; - int psx_delay_BFC3E62C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E3C4u: goto label_BFC3E3C4; - case 0xBFC3E3CCu: goto label_BFC3E3CC; - case 0xBFC3E3F0u: goto label_BFC3E3F0; - case 0xBFC3E404u: goto label_BFC3E404; - case 0xBFC3E40Cu: goto label_BFC3E40C; - case 0xBFC3E410u: goto label_BFC3E410; - case 0xBFC3E434u: goto label_BFC3E434; - case 0xBFC3E444u: goto label_BFC3E444; - case 0xBFC3E458u: goto label_BFC3E458; - case 0xBFC3E478u: goto label_BFC3E478; - case 0xBFC3E488u: goto label_BFC3E488; - case 0xBFC3E49Cu: goto label_BFC3E49C; - case 0xBFC3E4B0u: goto label_BFC3E4B0; - case 0xBFC3E4BCu: goto label_BFC3E4BC; - case 0xBFC3E4D0u: goto label_BFC3E4D0; - case 0xBFC3E4D8u: goto label_BFC3E4D8; - case 0xBFC3E4E0u: goto label_BFC3E4E0; - case 0xBFC3E4F0u: goto label_BFC3E4F0; - case 0xBFC3E4F4u: goto label_BFC3E4F4; - case 0xBFC3E4FCu: goto label_BFC3E4FC; - case 0xBFC3E504u: goto label_BFC3E504; - case 0xBFC3E508u: goto label_BFC3E508; - case 0xBFC3E520u: goto label_BFC3E520; - case 0xBFC3E528u: goto label_BFC3E528; - case 0xBFC3E540u: goto label_BFC3E540; - case 0xBFC3E590u: goto label_BFC3E590; - case 0xBFC3E598u: goto label_BFC3E598; - case 0xBFC3E5A0u: goto label_BFC3E5A0; - case 0xBFC3E5B4u: goto label_BFC3E5B4; - case 0xBFC3E5CCu: goto label_BFC3E5CC; - case 0xBFC3E610u: goto label_BFC3E610; - case 0xBFC3E624u: goto label_BFC3E624; - default: break; - } - } -label_BFC3E390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E390: 3C07800E lui $a3, 0x800E */ - cpu->gpr[7] = 0x800E0000u; - PGXP_ALU(0x3C07800Eu, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056390u); -#endif - /* 0xBFC3E394: 8CE7EE40 lw $a3, -4544($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -4544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-4544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056394u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE7EE40u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80056394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E398: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056398u); -#endif - /* 0xBFC3E39C: 8DEF9F2C lw $t7, -24788($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24788; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005639Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005639Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E3A0: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800563A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E3A4: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x800563A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4088u); -#endif - /* 0xBFC3E3A8: 00EE1804 sllv $v1, $t6, $a3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[14] << (cpu->gpr[7] & 0x1Fu); - PGXP_ALU(0x00EE1804u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3E3AC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800563ACu); return; } g_debug_last_store_pc = 0x800563ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800563ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3E3B0: 00804021 addu $t0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00804021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3E3B4: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3E3B8: 240BFFFF addiu $t3, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800563B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E3BC: 15E00003 bne $t7, $zero, 0xBFC3E3CC */ - uint32_t psx_brA_BFC3E3BC = cpu->gpr[15]; uint32_t psx_brB_BFC3E3BC = cpu->gpr[0]; - psx_taken_BFC3E3BC = (psx_brA_BFC3E3BC != psx_brB_BFC3E3BC); - psx_delay_BFC3E3BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E3C0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563C0u); -#endif - if (psx_delay_BFC3E3BC) { - psx_delay_BFC3E3BC = 0; - if (psx_taken_BFC3E3BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800563CCu); - goto label_BFC3E3CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800563C4u); - } -label_BFC3E3C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E3C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E3C4: 1000000A beq $zero, $zero, 0xBFC3E3F0 */ - uint32_t psx_brA_BFC3E3C4 = cpu->gpr[0]; uint32_t psx_brB_BFC3E3C4 = cpu->gpr[0]; - psx_taken_BFC3E3C4 = (psx_brA_BFC3E3C4 == psx_brB_BFC3E3C4); - psx_delay_BFC3E3C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3E3C8: 00006021 addu $t4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00006021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563C8u); -#endif - if (psx_delay_BFC3E3C4) { - psx_delay_BFC3E3C4 = 0; - if (psx_taken_BFC3E3C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800563F0u); - goto label_BFC3E3F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800563CCu); - } -label_BFC3E3CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E3CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3E3CC: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800563CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563D0u); -#endif - /* 0xBFC3E3D0: 8F18E40C lw $t8, -7156($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800563D0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E40Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800563D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E3D4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800563D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3E3D8: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800563D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3E3DC: 01D97021 addu $t6, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D97021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563E0u); -#endif - /* 0xBFC3E3E0: 8DCE9910 lw $t6, -26352($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -26352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-26352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800563E0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9910u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800563E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E3E4: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800563E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC3E3E8: 01EEC023 subu $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EEC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001080u); -#endif - /* 0xBFC3E3EC: 00F86004 sllv $t4, $t8, $a3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[12] = cpu->gpr[24] << (cpu->gpr[7] & 0x1Fu); - PGXP_ALU(0x00F86004u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563ECu); -#endif -label_BFC3E3F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E3F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800563F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3E3F0: 2462FFFF addiu $v0, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2462FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800563F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000005u); -#endif - /* 0xBFC3E3F4: 0040C827 nor $t9, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[2] | cpu->gpr[0]); - PGXP_ALU(0x0040C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC3E3F8: 01197824 and $t7, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[15] = cpu->gpr[8] & cpu->gpr[25]; - PGXP_ALU(0x01197824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800563F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E3FC: 11E00004 beq $t7, $zero, 0xBFC3E410 */ - uint32_t psx_brA_BFC3E3FC = cpu->gpr[15]; uint32_t psx_brB_BFC3E3FC = cpu->gpr[0]; - psx_taken_BFC3E3FC = (psx_brA_BFC3E3FC == psx_brB_BFC3E3FC); - psx_delay_BFC3E3FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3E400: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056400u); -#endif - if (psx_delay_BFC3E3FC) { - psx_delay_BFC3E3FC = 0; - if (psx_taken_BFC3E3FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056410u); - goto label_BFC3E410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056404u); - } -label_BFC3E404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E404: 10000002 beq $zero, $zero, 0xBFC3E410 */ - uint32_t psx_brA_BFC3E404 = cpu->gpr[0]; uint32_t psx_brB_BFC3E404 = cpu->gpr[0]; - psx_taken_BFC3E404 = (psx_brA_BFC3E404 == psx_brB_BFC3E404); - psx_delay_BFC3E404 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E408: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056408u); -#endif - if (psx_delay_BFC3E404) { - psx_delay_BFC3E404 = 0; - if (psx_taken_BFC3E404) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056410u); - goto label_BFC3E410; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005640Cu); - } -label_BFC3E40C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E40Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005640Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3E40C: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005640Cu); -#endif -label_BFC3E410: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E410u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E410: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056410u); -#endif - /* 0xBFC3E414: 8DADEE44 lw $t5, -4540($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056414u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADEE44u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80056414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3E418: 3C064000 lui $a2, 0x4000 */ - cpu->gpr[6] = 0x40000000u; - PGXP_ALU(0x3C064000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056418u); -#endif - /* 0xBFC3E41C: 8DAE0000 lw $t6, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005641Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x2000u); } - PGXP_LOAD(0x8DAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005641Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3E420: 01034021 addu $t0, $t0, $v1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[3]; - PGXP_ALU(0x01034021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3E424: 00E84007 srav $t0, $t0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> (cpu->gpr[7] & 0x1Fu)); - PGXP_ALU(0x00E84007u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004040u); -#endif - /* 0xBFC3E428: 01C6C024 and $t8, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[6]; - PGXP_ALU(0x01C6C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E42C: 13000005 beq $t8, $zero, 0xBFC3E444 */ - uint32_t psx_brA_BFC3E42C = cpu->gpr[24]; uint32_t psx_brB_BFC3E42C = cpu->gpr[0]; - psx_taken_BFC3E42C = (psx_brA_BFC3E42C == psx_brB_BFC3E42C); - psx_delay_BFC3E42C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC3E430: 00E84004 sllv $t0, $t0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[8] << (cpu->gpr[7] & 0x1Fu); - PGXP_ALU(0x00E84004u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056430u); -#endif - if (psx_delay_BFC3E42C) { - psx_delay_BFC3E42C = 0; - if (psx_taken_BFC3E42C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056444u); - goto label_BFC3E444; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056434u); - } -label_BFC3E434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3E434: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056434u); -#endif - /* 0xBFC3E438: 8D4A9BF4 lw $t2, -25612($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056438u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9BF4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E43C: 1000002C beq $zero, $zero, 0xBFC3E4F0 */ - uint32_t psx_brA_BFC3E43C = cpu->gpr[0]; uint32_t psx_brB_BFC3E43C = cpu->gpr[0]; - psx_taken_BFC3E43C = (psx_brA_BFC3E43C == psx_brB_BFC3E43C); - psx_delay_BFC3E43C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3E440: 00005821 addu $t3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00005821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056440u); -#endif - if (psx_delay_BFC3E43C) { - psx_delay_BFC3E43C = 0; - if (psx_taken_BFC3E43C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564F0u); - goto label_BFC3E4F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056444u); - } -label_BFC3E444: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E444u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3E444: AFA5002C sw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056444u); return; } g_debug_last_store_pc = 0x80056444u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC3E448: AFA80030 sw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056448u); return; } g_debug_last_store_pc = 0x80056448u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC3E44C: AFAB0028 sw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005644Cu); return; } g_debug_last_store_pc = 0x8005644Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005644Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3E450: 0C015844 jal 0xB0056110 */ - cpu->gpr[31] = 0x80056458u; /* jal link before delay slot */ - psx_delay_BFC3E450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3E454: AFAC0018 sw $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056454u); return; } g_debug_last_store_pc = 0x80056454u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80056454u); -#endif - if (psx_delay_BFC3E450) { - psx_delay_BFC3E450 = 0; - cpu->gpr[31] = 0x80056458u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056110u); - cpu->pc = 0x80056110u; return; - } -label_BFC3E458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3E458: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056458u); -#endif - /* 0xBFC3E45C: 8D4A9BF4 lw $t2, -25612($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005645Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9BF4u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005645Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056460u); -#endif - /* 0xBFC3E460: 8FA5002C lw $a1, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056460u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5002Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056460u); -#endif - /* 0xBFC3E464: 8FA80030 lw $t0, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056464u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80030u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056464u); -#endif - /* 0xBFC3E468: 8FAB0028 lw $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056468u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80056468u); -#endif - /* 0xBFC3E46C: 8FAC0018 lw $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005646Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005646Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3E470: 1D400005 bgtz $t2, 0xBFC3E488 */ - uint32_t psx_brA_BFC3E470 = cpu->gpr[10]; - psx_taken_BFC3E470 = ((int32_t)psx_brA_BFC3E470 > 0); - psx_delay_BFC3E470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3E474: 3C064000 lui $a2, 0x4000 */ - cpu->gpr[6] = 0x40000000u; - PGXP_ALU(0x3C064000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056474u); -#endif - if (psx_delay_BFC3E470) { - psx_delay_BFC3E470 = 0; - if (psx_taken_BFC3E470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056488u); - goto label_BFC3E488; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056478u); - } -label_BFC3E478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E478: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056478u); -#endif - /* 0xBFC3E47C: 8DADEE44 lw $t5, -4540($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005647Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADEE44u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005647Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E480: 1000001C beq $zero, $zero, 0xBFC3E4F4 */ - uint32_t psx_brA_BFC3E480 = cpu->gpr[0]; uint32_t psx_brB_BFC3E480 = cpu->gpr[0]; - psx_taken_BFC3E480 = (psx_brA_BFC3E480 == psx_brB_BFC3E480); - psx_delay_BFC3E480 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E484: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056484u); -#endif - if (psx_delay_BFC3E480) { - psx_delay_BFC3E480 = 0; - if (psx_taken_BFC3E480) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564F4u); - goto label_BFC3E4F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056488u); - } -label_BFC3E488: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E488u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E488: 3C0D800E lui $t5, 0x800E */ - cpu->gpr[13] = 0x800E0000u; - PGXP_ALU(0x3C0D800Eu, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056488u); -#endif - /* 0xBFC3E48C: 8DADEE44 lw $t5, -4540($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005648Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DADEE44u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005648Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3E490: 0005C8C0 sll $t9, $a1, 3 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[5] << 3u; - PGXP_ALU(0x0005C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E494: 3C048000 lui $a0, 0x8000 */ - cpu->gpr[4] = 0x80000000u; - PGXP_ALU(0x3C048000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002008u); -#endif - /* 0xBFC3E498: 01B91821 addu $v1, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B91821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056498u); -#endif -label_BFC3E49C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E49Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005649Cu); -#endif - /* 0xBFC3E49C: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005649Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005649Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800564A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8044u); -#endif - /* 0xBFC3E4A4: 00467824 and $t7, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[6]; - PGXP_ALU(0x00467824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E4A8: 15E0000B bne $t7, $zero, 0xBFC3E4D8 */ - uint32_t psx_brA_BFC3E4A8 = cpu->gpr[15]; uint32_t psx_brB_BFC3E4A8 = cpu->gpr[0]; - psx_taken_BFC3E4A8 = (psx_brA_BFC3E4A8 != psx_brB_BFC3E4A8); - psx_delay_BFC3E4A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800564ACu); -#endif - if (psx_delay_BFC3E4A8) { - psx_delay_BFC3E4A8 = 0; - if (psx_taken_BFC3E4A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564D8u); - goto label_BFC3E4D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564B0u); - } -label_BFC3E4B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC3E4B0: 00447024 and $t6, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4]; - PGXP_ALU(0x00447024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E4B4: 11C0000A beq $t6, $zero, 0xBFC3E4E0 */ - uint32_t psx_brA_BFC3E4B4 = cpu->gpr[14]; uint32_t psx_brB_BFC3E4B4 = cpu->gpr[0]; - psx_taken_BFC3E4B4 = (psx_brA_BFC3E4B4 == psx_brB_BFC3E4B4); - psx_delay_BFC3E4B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800564B8u); -#endif - if (psx_delay_BFC3E4B4) { - psx_delay_BFC3E4B4 = 0; - if (psx_taken_BFC3E4B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564E0u); - goto label_BFC3E4E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564BCu); - } -label_BFC3E4BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564BCu); -#endif - /* 0xBFC3E4BC: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800564BCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800564BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800564C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000102u); -#endif - /* 0xBFC3E4C4: 0308082B sltu $at, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0308082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E4C8: 14200005 bne $at, $zero, 0xBFC3E4E0 */ - uint32_t psx_brA_BFC3E4C8 = cpu->gpr[1]; uint32_t psx_brB_BFC3E4C8 = cpu->gpr[0]; - psx_taken_BFC3E4C8 = (psx_brA_BFC3E4C8 != psx_brB_BFC3E4C8); - psx_delay_BFC3E4C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800564CCu); -#endif - if (psx_delay_BFC3E4C8) { - psx_delay_BFC3E4C8 = 0; - if (psx_taken_BFC3E4C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564E0u); - goto label_BFC3E4E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564D0u); - } -label_BFC3E4D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4D0: 10000007 beq $zero, $zero, 0xBFC3E4F0 */ - uint32_t psx_brA_BFC3E4D0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E4D0 = cpu->gpr[0]; - psx_taken_BFC3E4D0 = (psx_brA_BFC3E4D0 == psx_brB_BFC3E4D0); - psx_delay_BFC3E4D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x821u); -#endif - /* 0xBFC3E4D4: 00A05821 addu $t3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A05821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564D4u); -#endif - if (psx_delay_BFC3E4D0) { - psx_delay_BFC3E4D0 = 0; - if (psx_taken_BFC3E4D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564F0u); - goto label_BFC3E4F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564D8u); - } -label_BFC3E4D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4D8: 10000005 beq $zero, $zero, 0xBFC3E4F0 */ - uint32_t psx_brA_BFC3E4D8 = cpu->gpr[0]; uint32_t psx_brB_BFC3E4D8 = cpu->gpr[0]; - psx_taken_BFC3E4D8 = (psx_brA_BFC3E4D8 == psx_brB_BFC3E4D8); - psx_delay_BFC3E4D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x821u); -#endif - /* 0xBFC3E4DC: 00A05821 addu $t3, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A05821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564DCu); -#endif - if (psx_delay_BFC3E4D8) { - psx_delay_BFC3E4D8 = 0; - if (psx_taken_BFC3E4D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564F0u); - goto label_BFC3E4F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564E0u); - } -label_BFC3E4E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3E4E0: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800564E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x422u); -#endif - /* 0xBFC3E4E4: 00AA082A slt $at, $a1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x00AA082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800564E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E4E8: 1420FFEC bne $at, $zero, 0xBFC3E49C */ - uint32_t psx_brA_BFC3E4E8 = cpu->gpr[1]; uint32_t psx_brB_BFC3E4E8 = cpu->gpr[0]; - psx_taken_BFC3E4E8 = (psx_brA_BFC3E4E8 != psx_brB_BFC3E4E8); - psx_delay_BFC3E4E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3E4EC: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800564ECu); -#endif - if (psx_delay_BFC3E4E8) { - psx_delay_BFC3E4E8 = 0; - if (psx_taken_BFC3E4E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005649Cu); - goto label_BFC3E49C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564F0u); - } -label_BFC3E4F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E4F0: 2401FFFF addiu $at, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800564F0u); -#endif -label_BFC3E4F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3E4F4: 15610004 bne $t3, $at, 0xBFC3E508 */ - uint32_t psx_brA_BFC3E4F4 = cpu->gpr[11]; uint32_t psx_brB_BFC3E4F4 = cpu->gpr[1]; - psx_taken_BFC3E4F4 = (psx_brA_BFC3E4F4 != psx_brB_BFC3E4F4); - psx_delay_BFC3E4F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC3E4F8: 000BC8C0 sll $t9, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000BC8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800564F8u); -#endif - if (psx_delay_BFC3E4F4) { - psx_delay_BFC3E4F4 = 0; - if (psx_taken_BFC3E4F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056508u); - goto label_BFC3E508; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800564FCu); - } -label_BFC3E4FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E4FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800564FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E4FC: 10000049 beq $zero, $zero, 0xBFC3E624 */ - uint32_t psx_brA_BFC3E4FC = cpu->gpr[0]; uint32_t psx_brB_BFC3E4FC = cpu->gpr[0]; - psx_taken_BFC3E4FC = (psx_brA_BFC3E4FC == psx_brB_BFC3E4FC); - psx_delay_BFC3E4FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E500: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056500u); -#endif - if (psx_delay_BFC3E4FC) { - psx_delay_BFC3E4FC = 0; - if (psx_taken_BFC3E4FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056624u); - goto label_BFC3E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056504u); - } -label_BFC3E504: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E504u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000800u); -#endif - /* 0xBFC3E504: 000BC8C0 sll $t9, $t3, 3 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[25] = cpu->gpr[11] << 3u; - PGXP_ALU(0x000BC8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056504u); -#endif -label_BFC3E508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002020u); -#endif - /* 0xBFC3E508: 01B92821 addu $a1, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[5] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B92821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056508u); -#endif - /* 0xBFC3E50C: 8CA90000 lw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005650Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005650Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8240u); -#endif - /* 0xBFC3E514: 01267824 and $t7, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[6]; - PGXP_ALU(0x01267824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E518: 11E00021 beq $t7, $zero, 0xBFC3E5A0 */ - uint32_t psx_brA_BFC3E518 = cpu->gpr[15]; uint32_t psx_brB_BFC3E518 = cpu->gpr[0]; - psx_taken_BFC3E518 = (psx_brA_BFC3E518 == psx_brB_BFC3E518); - psx_delay_BFC3E518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC02u); -#endif - /* 0xBFC3E51C: 016A082A slt $at, $t3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[11] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x016A082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005651Cu); -#endif - if (psx_delay_BFC3E518) { - psx_delay_BFC3E518 = 0; - if (psx_taken_BFC3E518) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800565A0u); - goto label_BFC3E5A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056520u); - } -label_BFC3E520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E520: 1020001D beq $at, $zero, 0xBFC3E598 */ - uint32_t psx_brA_BFC3E520 = cpu->gpr[1]; uint32_t psx_brB_BFC3E520 = cpu->gpr[0]; - psx_taken_BFC3E520 = (psx_brA_BFC3E520 == psx_brB_BFC3E520); - psx_delay_BFC3E520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E524: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056524u); -#endif - if (psx_delay_BFC3E520) { - psx_delay_BFC3E520 = 0; - if (psx_taken_BFC3E520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056598u); - goto label_BFC3E598; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056528u); - } -label_BFC3E528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056528u); -#endif - /* 0xBFC3E528: 8CAE0004 lw $t6, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056528u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E52C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005652Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1005000u); -#endif - /* 0xBFC3E530: 01CCC023 subu $t8, $t6, $t4 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[24] = cpu->gpr[14] - cpu->gpr[12]; - PGXP_ALU(0x01CCC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000102u); -#endif - /* 0xBFC3E534: 0308082B sltu $at, $t8, $t0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)(cpu->gpr[24] < cpu->gpr[8] ? 1 : 0); - PGXP_ALU(0x0308082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E538: 14200015 bne $at, $zero, 0xBFC3E590 */ - uint32_t psx_brA_BFC3E538 = cpu->gpr[1]; uint32_t psx_brB_BFC3E538 = cpu->gpr[0]; - psx_taken_BFC3E538 = (psx_brA_BFC3E538 != psx_brB_BFC3E538); - psx_delay_BFC3E538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E53C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005653Cu); -#endif - if (psx_delay_BFC3E538) { - psx_delay_BFC3E538 = 0; - if (psx_taken_BFC3E538) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056590u); - goto label_BFC3E590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056540u); - } -label_BFC3E540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E540: 3C040FFF lui $a0, 0xFFF */ - cpu->gpr[4] = 0x0FFF0000u; - PGXP_ALU(0x3C040FFFu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E544: 3484FFFF ori $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xFFFFu; - PGXP_ALU(0x3484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x880u); -#endif - /* 0xBFC3E548: 25670001 addiu $a3, $t3, 1 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); - PGXP_ALU(0x25670001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8210u); -#endif - /* 0xBFC3E54C: 01247824 and $t7, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[9] & cpu->gpr[4]; - PGXP_ALU(0x01247824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005654Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC100u); -#endif - /* 0xBFC3E550: 01E87021 addu $t6, $t7, $t0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[14] = cpu->gpr[15] + cpu->gpr[8]; - PGXP_ALU(0x01E87021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E554: 0007C8C0 sll $t9, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 3u; - PGXP_ALU(0x0007C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002008u); -#endif - /* 0xBFC3E558: 01B91821 addu $v1, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B91821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004040u); -#endif - /* 0xBFC3E55C: 01C6C025 or $t8, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[6]; - PGXP_ALU(0x01C6C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005655Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3E560: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056560u); return; } g_debug_last_store_pc = 0x80056560u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056560u); -#endif - /* 0xBFC3E564: 8CB90004 lw $t9, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056564u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20u); } - PGXP_LOAD(0x8CB90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E568: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008100u); -#endif - /* 0xBFC3E56C: 03287823 subu $t7, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[15] = cpu->gpr[25] - cpu->gpr[8]; - PGXP_ALU(0x03287823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005656Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3E570: AC6F0004 sw $t7, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056570u); return; } g_debug_last_store_pc = 0x80056570u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056570u); -#endif - /* 0xBFC3E574: 8CAE0000 lw $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056574u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC3E578: ACA80004 sw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056578u); return; } g_debug_last_store_pc = 0x80056578u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004010u); -#endif - /* 0xBFC3E57C: 01C4C024 and $t8, $t6, $a0 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[4]; - PGXP_ALU(0x01C4C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005657Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3E580: ACB80000 sw $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056580u); return; } g_debug_last_store_pc = 0x80056580u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056580u); -#endif - /* 0xBFC3E584: 8CA20000 lw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056584u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E588: 10000026 beq $zero, $zero, 0xBFC3E624 */ - uint32_t psx_brA_BFC3E588 = cpu->gpr[0]; uint32_t psx_brB_BFC3E588 = cpu->gpr[0]; - psx_taken_BFC3E588 = (psx_brA_BFC3E588 == psx_brB_BFC3E588); - psx_delay_BFC3E588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3E58C: AC279BF8 sw $a3, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005658Cu); return; } g_debug_last_store_pc = 0x8005658Cu; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279BF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x8005658Cu); -#endif - if (psx_delay_BFC3E588) { - psx_delay_BFC3E588 = 0; - if (psx_taken_BFC3E588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056624u); - goto label_BFC3E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056590u); - } -label_BFC3E590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E590: 10000024 beq $zero, $zero, 0xBFC3E624 */ - uint32_t psx_brA_BFC3E590 = cpu->gpr[0]; uint32_t psx_brB_BFC3E590 = cpu->gpr[0]; - psx_taken_BFC3E590 = (psx_brA_BFC3E590 == psx_brB_BFC3E590); - psx_delay_BFC3E590 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E594: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056594u); -#endif - if (psx_delay_BFC3E590) { - psx_delay_BFC3E590 = 0; - if (psx_taken_BFC3E590) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056624u); - goto label_BFC3E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056598u); - } -label_BFC3E598: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E598u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E598: 10000022 beq $zero, $zero, 0xBFC3E624 */ - uint32_t psx_brA_BFC3E598 = cpu->gpr[0]; uint32_t psx_brB_BFC3E598 = cpu->gpr[0]; - psx_taken_BFC3E598 = (psx_brA_BFC3E598 == psx_brB_BFC3E598); - psx_delay_BFC3E598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E59C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005659Cu); -#endif - if (psx_delay_BFC3E598) { - psx_delay_BFC3E598 = 0; - if (psx_taken_BFC3E598) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056624u); - goto label_BFC3E624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800565A0u); - } -label_BFC3E5A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E5A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565A0u); -#endif - /* 0xBFC3E5A0: 8CA60004 lw $a2, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565A0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20u); } - PGXP_LOAD(0x8CA60004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800565A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E5A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800565A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x142u); -#endif - /* 0xBFC3E5A8: 0106082B sltu $at, $t0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)(cpu->gpr[8] < cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x0106082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E5AC: 10200018 beq $at, $zero, 0xBFC3E610 */ - uint32_t psx_brA_BFC3E5AC = cpu->gpr[1]; uint32_t psx_brB_BFC3E5AC = cpu->gpr[0]; - psx_taken_BFC3E5AC = (psx_brA_BFC3E5AC == psx_brB_BFC3E5AC); - psx_delay_BFC3E5AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E5B0: 3C040FFF lui $a0, 0xFFF */ - cpu->gpr[4] = 0x0FFF0000u; - PGXP_ALU(0x3C040FFFu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800565B0u); -#endif - if (psx_delay_BFC3E5AC) { - psx_delay_BFC3E5AC = 0; - if (psx_taken_BFC3E5AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056610u); - goto label_BFC3E610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800565B4u); - } -label_BFC3E5B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E5B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E5B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E5B4: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800565B4u); -#endif - /* 0xBFC3E5B8: 8CE79BF8 lw $a3, -25608($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565B8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79BF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x800565B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E5BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800565BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x482u); -#endif - /* 0xBFC3E5C0: 00EA082A slt $at, $a3, $t2 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[10] ? 1 : 0); - PGXP_ALU(0x00EA082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E5C4: 10200012 beq $at, $zero, 0xBFC3E610 */ - uint32_t psx_brA_BFC3E5C4 = cpu->gpr[1]; uint32_t psx_brB_BFC3E5C4 = cpu->gpr[0]; - psx_taken_BFC3E5C4 = (psx_brA_BFC3E5C4 == psx_brB_BFC3E5C4); - psx_delay_BFC3E5C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E5C8: 3C040FFF lui $a0, 0xFFF */ - cpu->gpr[4] = 0x0FFF0000u; - PGXP_ALU(0x3C040FFFu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800565C8u); -#endif - if (psx_delay_BFC3E5C4) { - psx_delay_BFC3E5C4 = 0; - if (psx_taken_BFC3E5C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056610u); - goto label_BFC3E610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800565CCu); - } -label_BFC3E5CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E5CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E5CC: 0007C8C0 sll $t9, $a3, 3 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] << 3u; - PGXP_ALU(0x0007C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800565CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002008u); -#endif - /* 0xBFC3E5D0: 01B91821 addu $v1, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[3] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B91821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565D0u); -#endif - /* 0xBFC3E5D4: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565D4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800565D4u); -#endif - /* 0xBFC3E5D8: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565D8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800565D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC3E5DC: 01282021 addu $a0, $t1, $t0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = cpu->gpr[9] + cpu->gpr[8]; - PGXP_ALU(0x01282021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E5E0: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800565E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3E5E4: AC6F0008 sw $t7, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565E4u); return; } g_debug_last_store_pc = 0x800565E4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800565E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x144u); -#endif - /* 0xBFC3E5E8: 00C81023 subu $v0, $a2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[6] - cpu->gpr[8]; - PGXP_ALU(0x00C81023u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000012u); -#endif - /* 0xBFC3E5EC: 0081C025 or $t8, $a0, $at */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[4] | cpu->gpr[1]; - PGXP_ALU(0x0081C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800565ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800565F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3E5F0: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565F0u); return; } g_debug_last_store_pc = 0x800565F0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800565F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3E5F4: AC620004 sw $v0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565F4u); return; } g_debug_last_store_pc = 0x800565F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800565F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3E5F8: AC6E000C sw $t6, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800565F8u); return; } g_debug_last_store_pc = 0x800565F8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E000Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800565F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E5FC: 24E70001 addiu $a3, $a3, 1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (1)); - PGXP_ALU(0x24E70001u, cpu->gpr[7], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800565FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056600u); -#endif - /* 0xBFC3E600: 8CA90000 lw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056600u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E604: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x82u); -#endif - /* 0xBFC3E608: AC279BF8 sw $a3, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056608u); return; } g_debug_last_store_pc = 0x80056608u; cpu->write_word(psx_addr, cpu->gpr[7]); } - PGXP_STORE(0xAC279BF8u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80056608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E60C: 3C040FFF lui $a0, 0xFFF */ - cpu->gpr[4] = 0x0FFF0000u; - PGXP_ALU(0x3C040FFFu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005660Cu); -#endif -label_BFC3E610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3E610: 3484FFFF ori $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0xFFFFu; - PGXP_ALU(0x3484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000210u); -#endif - /* 0xBFC3E614: 0124C824 and $t9, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[9] & cpu->gpr[4]; - PGXP_ALU(0x0124C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC3E618: ACB90000 sw $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056618u); return; } g_debug_last_store_pc = 0x80056618u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACB90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056618u); -#endif - /* 0xBFC3E61C: 8CA20000 lw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005661Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005661Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x120u); -#endif - /* 0xBFC3E620: ACA80004 sw $t0, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056620u); return; } g_debug_last_store_pc = 0x80056620u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xACA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056620u); -#endif -label_BFC3E624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056624u); -#endif - /* 0xBFC3E624: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056624u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E628: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80056628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E62C: 03E00008 jr $ra */ - psx_delay_BFC3E62C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E630: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056630u); -#endif - if (psx_delay_BFC3E62C) { - psx_delay_BFC3E62C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E634(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E634u); - int psx_delay_BFC3E658 = 0; - int psx_taken_BFC3E658 = 0; - int psx_delay_BFC3E660 = 0; - int psx_taken_BFC3E660 = 0; - int psx_delay_BFC3E69C = 0; - int psx_taken_BFC3E69C = 0; - int psx_delay_BFC3E6BC = 0; - int psx_taken_BFC3E6BC = 0; - int psx_delay_BFC3E6E8 = 0; - int psx_taken_BFC3E6E8 = 0; - int psx_delay_BFC3E6F0 = 0; - int psx_taken_BFC3E6F0 = 0; - int psx_delay_BFC3E6F8 = 0; - int psx_taken_BFC3E6F8 = 0; - int psx_delay_BFC3E700 = 0; - int psx_taken_BFC3E700 = 0; - int psx_delay_BFC3E720 = 0; - int psx_taken_BFC3E720 = 0; - int psx_delay_BFC3E728 = 0; - int psx_taken_BFC3E728 = 0; - int psx_delay_BFC3E774 = 0; - int psx_taken_BFC3E774 = 0; - int psx_delay_BFC3E794 = 0; - int psx_taken_BFC3E794 = 0; - int psx_delay_BFC3E79C = 0; - int psx_taken_BFC3E79C = 0; - int psx_delay_BFC3E7F0 = 0; - int psx_taken_BFC3E7F0 = 0; - int psx_delay_BFC3E7F8 = 0; - int psx_taken_BFC3E7F8 = 0; - int psx_delay_BFC3E800 = 0; - int psx_taken_BFC3E800 = 0; - int psx_delay_BFC3E820 = 0; - int psx_taken_BFC3E820 = 0; - int psx_delay_BFC3E828 = 0; - int psx_taken_BFC3E828 = 0; - int psx_delay_BFC3E848 = 0; - int psx_taken_BFC3E848 = 0; - int psx_delay_BFC3E850 = 0; - int psx_taken_BFC3E850 = 0; - int psx_delay_BFC3E884 = 0; - int psx_taken_BFC3E884 = 0; - int psx_delay_BFC3E890 = 0; - int psx_taken_BFC3E890 = 0; - int psx_delay_BFC3E8D0 = 0; - int psx_taken_BFC3E8D0 = 0; - int psx_delay_BFC3E8DC = 0; - int psx_taken_BFC3E8DC = 0; - int psx_delay_BFC3E8EC = 0; - int psx_taken_BFC3E8EC = 0; - int psx_delay_BFC3E90C = 0; - int psx_taken_BFC3E90C = 0; - int psx_delay_BFC3E914 = 0; - int psx_taken_BFC3E914 = 0; - int psx_delay_BFC3E930 = 0; - int psx_taken_BFC3E930 = 0; - int psx_delay_BFC3E978 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E660u: goto label_BFC3E660; - case 0xBFC3E668u: goto label_BFC3E668; - case 0xBFC3E694u: goto label_BFC3E694; - case 0xBFC3E6A4u: goto label_BFC3E6A4; - case 0xBFC3E6C4u: goto label_BFC3E6C4; - case 0xBFC3E6E4u: goto label_BFC3E6E4; - case 0xBFC3E6F0u: goto label_BFC3E6F0; - case 0xBFC3E6F8u: goto label_BFC3E6F8; - case 0xBFC3E700u: goto label_BFC3E700; - case 0xBFC3E708u: goto label_BFC3E708; - case 0xBFC3E728u: goto label_BFC3E728; - case 0xBFC3E730u: goto label_BFC3E730; - case 0xBFC3E734u: goto label_BFC3E734; - case 0xBFC3E77Cu: goto label_BFC3E77C; - case 0xBFC3E79Cu: goto label_BFC3E79C; - case 0xBFC3E7A4u: goto label_BFC3E7A4; - case 0xBFC3E7A8u: goto label_BFC3E7A8; - case 0xBFC3E7C4u: goto label_BFC3E7C4; - case 0xBFC3E7F8u: goto label_BFC3E7F8; - case 0xBFC3E800u: goto label_BFC3E800; - case 0xBFC3E808u: goto label_BFC3E808; - case 0xBFC3E828u: goto label_BFC3E828; - case 0xBFC3E830u: goto label_BFC3E830; - case 0xBFC3E850u: goto label_BFC3E850; - case 0xBFC3E858u: goto label_BFC3E858; - case 0xBFC3E85Cu: goto label_BFC3E85C; - case 0xBFC3E88Cu: goto label_BFC3E88C; - case 0xBFC3E898u: goto label_BFC3E898; - case 0xBFC3E8D8u: goto label_BFC3E8D8; - case 0xBFC3E8DCu: goto label_BFC3E8DC; - case 0xBFC3E8E4u: goto label_BFC3E8E4; - case 0xBFC3E8F4u: goto label_BFC3E8F4; - case 0xBFC3E914u: goto label_BFC3E914; - case 0xBFC3E91Cu: goto label_BFC3E91C; - case 0xBFC3E920u: goto label_BFC3E920; - case 0xBFC3E938u: goto label_BFC3E938; - case 0xBFC3E974u: goto label_BFC3E974; - case 0xBFC3E978u: goto label_BFC3E978; - default: break; - } - } -label_BFC3E634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3E634: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056634u); -#endif - /* 0xBFC3E638: 8D08EE44 lw $t0, -4540($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056638u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08EE44u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3E63C: 000470C0 sll $t6, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 3u; - PGXP_ALU(0x000470C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8005663Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E640: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4104u); -#endif - /* 0xBFC3E644: 010E1021 addu $v0, $t0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[14]; - PGXP_ALU(0x010E1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056644u); -#endif - /* 0xBFC3E648: 8C470000 lw $a3, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056648u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x4u); } - PGXP_LOAD(0x8C470000u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80056648u); -#endif - /* 0xBFC3E64C: 8DEF9F2C lw $t7, -24788($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24788; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005664Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005664Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056650u); -#endif - /* 0xBFC3E650: 8C490004 lw $t1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056650u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x4u); } - PGXP_LOAD(0x8C490004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E654: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80056654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E658: 15E00003 bne $t7, $zero, 0xBFC3E668 */ - uint32_t psx_brA_BFC3E658 = cpu->gpr[15]; uint32_t psx_brB_BFC3E658 = cpu->gpr[0]; - psx_taken_BFC3E658 = (psx_brA_BFC3E658 != psx_brB_BFC3E658); - psx_delay_BFC3E658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x89u); -#endif - /* 0xBFC3E65C: 00E01821 addu $v1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E01821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005665Cu); -#endif - if (psx_delay_BFC3E658) { - psx_delay_BFC3E658 = 0; - if (psx_taken_BFC3E658) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056668u); - goto label_BFC3E668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056660u); - } -label_BFC3E660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E660: 1000000C beq $zero, $zero, 0xBFC3E694 */ - uint32_t psx_brA_BFC3E660 = cpu->gpr[0]; uint32_t psx_brB_BFC3E660 = cpu->gpr[0]; - psx_taken_BFC3E660 = (psx_brA_BFC3E660 == psx_brB_BFC3E660); - psx_delay_BFC3E660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3E664: 00005821 addu $t3, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[11] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00005821u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056664u); -#endif - if (psx_delay_BFC3E660) { - psx_delay_BFC3E660 = 0; - if (psx_taken_BFC3E660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056694u); - goto label_BFC3E694; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056668u); - } -label_BFC3E668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3E668: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056668u); -#endif - /* 0xBFC3E66C: 8F18E40C lw $t8, -7156($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005666Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E40Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005666Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E670: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3E674: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80056674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004000u); -#endif - /* 0xBFC3E678: 01D97021 addu $t6, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[14] = cpu->gpr[14] + cpu->gpr[25]; - PGXP_ALU(0x01D97021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056678u); -#endif - /* 0xBFC3E67C: 8DCE9910 lw $t6, -26352($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -26352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-26352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005667Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9910u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005667Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3E680: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056680u); -#endif - /* 0xBFC3E684: 8F39EE40 lw $t9, -4544($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056684u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39EE40u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E688: 3C0F0001 lui $t7, 0x1 */ - cpu->gpr[15] = 0x00010000u; - PGXP_ALU(0x3C0F0001u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC3E68C: 01EEC023 subu $t8, $t7, $t6 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[24] = cpu->gpr[15] - cpu->gpr[14]; - PGXP_ALU(0x01EEC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005668Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000800u); -#endif - /* 0xBFC3E690: 03385804 sllv $t3, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[11] = cpu->gpr[24] << (cpu->gpr[25] & 0x1Fu); - PGXP_ALU(0x03385804u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056690u); -#endif -label_BFC3E694: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E694u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E694: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100Au); -#endif - /* 0xBFC3E698: 00616024 and $t4, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[12] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x00616024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3E69C: 11800009 beq $t4, $zero, 0xBFC3E6C4 */ - uint32_t psx_brA_BFC3E69C = cpu->gpr[12]; uint32_t psx_brB_BFC3E69C = cpu->gpr[0]; - psx_taken_BFC3E69C = (psx_brA_BFC3E69C == psx_brB_BFC3E69C); - psx_delay_BFC3E69C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E6A0: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800566A0u); -#endif - if (psx_delay_BFC3E69C) { - psx_delay_BFC3E69C = 0; - if (psx_taken_BFC3E69C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566C4u); - goto label_BFC3E6C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566A4u); - } -label_BFC3E6A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E6A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E6A4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800566A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC3E6A8: 00612024 and $a0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x430u); -#endif - /* 0xBFC3E6AC: 00A45023 subu $t2, $a1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[5] - cpu->gpr[4]; - PGXP_ALU(0x00A45023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8600u); -#endif - /* 0xBFC3E6B0: 012A7823 subu $t7, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012A7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20008000u); -#endif - /* 0xBFC3E6B4: AFAF0000 sw $t7, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800566B4u); return; } g_debug_last_store_pc = 0x800566B4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAFAF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800566B4u); -#endif - /* 0xBFC3E6B8: 8FAE0000 lw $t6, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800566B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20000000u); } - PGXP_LOAD(0x8FAE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800566B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E6BC: 10000009 beq $zero, $zero, 0xBFC3E6E4 */ - uint32_t psx_brA_BFC3E6BC = cpu->gpr[0]; uint32_t psx_brB_BFC3E6BC = cpu->gpr[0]; - psx_taken_BFC3E6BC = (psx_brA_BFC3E6BC == psx_brB_BFC3E6BC); - psx_delay_BFC3E6BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6800u); -#endif - /* 0xBFC3E6C0: 01CB6823 subu $t5, $t6, $t3 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[13] = cpu->gpr[14] - cpu->gpr[11]; - PGXP_ALU(0x01CB6823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566C0u); -#endif - if (psx_delay_BFC3E6BC) { - psx_delay_BFC3E6BC = 0; - if (psx_taken_BFC3E6BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566E4u); - goto label_BFC3E6E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566C4u); - } -label_BFC3E6C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E6C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E6C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E6C4: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800566C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E6C8: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800566C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC3E6CC: 00612024 and $a0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[4] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x00612024u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x430u); -#endif - /* 0xBFC3E6D0: 00A45023 subu $t2, $a1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = cpu->gpr[5] - cpu->gpr[4]; - PGXP_ALU(0x00A45023u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC3E6D4: 012AC023 subu $t8, $t1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[24] = cpu->gpr[9] - cpu->gpr[10]; - PGXP_ALU(0x012AC023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21000000u); -#endif - /* 0xBFC3E6D8: AFB80000 sw $t8, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800566D8u); return; } g_debug_last_store_pc = 0x800566D8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAFB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800566D8u); -#endif - /* 0xBFC3E6DC: 8FAD0000 lw $t5, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800566DCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800566DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E6E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800566E0u); -#endif -label_BFC3E6E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E6E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2042u); -#endif - /* 0xBFC3E6E4: 01A6082A slt $at, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x01A6082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800566E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E6E8: 10200003 beq $at, $zero, 0xBFC3E6F8 */ - uint32_t psx_brA_BFC3E6E8 = cpu->gpr[1]; uint32_t psx_brB_BFC3E6E8 = cpu->gpr[0]; - psx_taken_BFC3E6E8 = (psx_brA_BFC3E6E8 == psx_brB_BFC3E6E8); - psx_delay_BFC3E6E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E6EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800566ECu); -#endif - if (psx_delay_BFC3E6E8) { - psx_delay_BFC3E6E8 = 0; - if (psx_taken_BFC3E6E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566F8u); - goto label_BFC3E6F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566F0u); - } -label_BFC3E6F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E6F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E6F0: 100000A1 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E6F0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E6F0 = cpu->gpr[0]; - psx_taken_BFC3E6F0 = (psx_brA_BFC3E6F0 == psx_brB_BFC3E6F0); - psx_delay_BFC3E6F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E6F4: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800566F4u); -#endif - if (psx_delay_BFC3E6F0) { - psx_delay_BFC3E6F0 = 0; - if (psx_taken_BFC3E6F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800566F8u); - } -label_BFC3E6F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E6F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E6F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800566F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3E6F8: 1180003F beq $t4, $zero, 0xBFC3E7F8 */ - uint32_t psx_brA_BFC3E6F8 = cpu->gpr[12]; uint32_t psx_brB_BFC3E6F8 = cpu->gpr[0]; - psx_taken_BFC3E6F8 = (psx_brA_BFC3E6F8 == psx_brB_BFC3E6F8); - psx_delay_BFC3E6F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E6FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800566FCu); -#endif - if (psx_delay_BFC3E6F8) { - psx_delay_BFC3E6F8 = 0; - if (psx_taken_BFC3E6F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800567F8u); - goto label_BFC3E7F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056700u); - } -label_BFC3E700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3E700: 1940001E blez $t2, 0xBFC3E77C */ - uint32_t psx_brA_BFC3E700 = cpu->gpr[10]; - psx_taken_BFC3E700 = ((int32_t)psx_brA_BFC3E700 <= 0); - psx_delay_BFC3E700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056704u); -#endif - if (psx_delay_BFC3E700) { - psx_delay_BFC3E700 = 0; - if (psx_taken_BFC3E700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005677Cu); - goto label_BFC3E77C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056708u); - } -label_BFC3E708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3E708: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056708u); -#endif - /* 0xBFC3E70C: 8F399BF4 lw $t9, -25612($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005670Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399BF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005670Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E710: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056710u); -#endif - /* 0xBFC3E714: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056714u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008000u); -#endif - /* 0xBFC3E718: 272FFFFE addiu $t7, $t9, -2 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[25] + (-2)); - PGXP_ALU(0x272FFFFEu, cpu->gpr[15], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80056718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8202u); -#endif - /* 0xBFC3E71C: 01E9082A slt $at, $t7, $t1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x01E9082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005671Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E720: 10200004 beq $at, $zero, 0xBFC3E734 */ - uint32_t psx_brA_BFC3E720 = cpu->gpr[1]; uint32_t psx_brB_BFC3E720 = cpu->gpr[0]; - psx_taken_BFC3E720 = (psx_brA_BFC3E720 == psx_brB_BFC3E720); - psx_delay_BFC3E720 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC3E724: 000970C0 sll $t6, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056724u); -#endif - if (psx_delay_BFC3E720) { - psx_delay_BFC3E720 = 0; - if (psx_taken_BFC3E720) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056734u); - goto label_BFC3E734; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056728u); - } -label_BFC3E728: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E728u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E728: 10000093 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E728 = cpu->gpr[0]; uint32_t psx_brB_BFC3E728 = cpu->gpr[0]; - psx_taken_BFC3E728 = (psx_brA_BFC3E728 == psx_brB_BFC3E728); - psx_delay_BFC3E728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E72C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005672Cu); -#endif - if (psx_delay_BFC3E728) { - psx_delay_BFC3E728 = 0; - if (psx_taken_BFC3E728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056730u); - } -label_BFC3E730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4200u); -#endif - /* 0xBFC3E730: 000970C0 sll $t6, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[14] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000970C0u, cpu->gpr[14], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056730u); -#endif -label_BFC3E734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4180u); -#endif - /* 0xBFC3E734: 010E3821 addu $a3, $t0, $t6 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[14]; - PGXP_ALU(0x010E3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056734u); -#endif - /* 0xBFC3E738: 8CF80000 lw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056738u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x80u); } - PGXP_LOAD(0x8CF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E73C: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005673Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E740: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000002u); -#endif - /* 0xBFC3E744: 0301C824 and $t9, $t8, $at */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[1]; - PGXP_ALU(0x0301C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E748: ACF90000 sw $t9, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056748u); return; } g_debug_last_store_pc = 0x80056748u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056748u); -#endif - /* 0xBFC3E74C: 8CEF0000 lw $t7, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005674Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x8CEF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005674Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E750: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E754: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC3E758: 01E17025 or $t6, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC3E75C: ACEE0000 sw $t6, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005675Cu); return; } g_debug_last_store_pc = 0x8005675Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005675Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x480u); -#endif - /* 0xBFC3E760: ACEA0004 sw $t2, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056760u); return; } g_debug_last_store_pc = 0x80056760u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACEA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E764: 24E70008 addiu $a3, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (8)); - PGXP_ALU(0x24E70008u, cpu->gpr[7], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC3E768: 0009C0C0 sll $t8, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000180u); -#endif - /* 0xBFC3E76C: 01183821 addu $a3, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[24]; - PGXP_ALU(0x01183821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005676Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3E770: ACE50000 sw $a1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056770u); return; } g_debug_last_store_pc = 0x80056770u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xACE50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E774: 10000013 beq $zero, $zero, 0xBFC3E7C4 */ - uint32_t psx_brA_BFC3E774 = cpu->gpr[0]; uint32_t psx_brB_BFC3E774 = cpu->gpr[0]; - psx_taken_BFC3E774 = (psx_brA_BFC3E774 == psx_brB_BFC3E774); - psx_delay_BFC3E774 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC3E778: ACE60004 sw $a2, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056778u); return; } g_debug_last_store_pc = 0x80056778u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xACE60004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056778u); -#endif - if (psx_delay_BFC3E774) { - psx_delay_BFC3E774 = 0; - if (psx_taken_BFC3E774) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800567C4u); - goto label_BFC3E7C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005677Cu); - } -label_BFC3E77C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E77Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E77Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E77C: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005677Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3E780: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056780u); -#endif - /* 0xBFC3E784: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056784u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056784u); -#endif - /* 0xBFC3E788: 8F399BF4 lw $t9, -25612($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056788u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399BF4u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E78C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005678Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000202u); -#endif - /* 0xBFC3E790: 0139082A slt $at, $t1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0139082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E794: 14200004 bne $at, $zero, 0xBFC3E7A8 */ - uint32_t psx_brA_BFC3E794 = cpu->gpr[1]; uint32_t psx_brB_BFC3E794 = cpu->gpr[0]; - psx_taken_BFC3E794 = (psx_brA_BFC3E794 != psx_brB_BFC3E794); - psx_delay_BFC3E794 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC3E798: 000978C0 sll $t7, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[15] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000978C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056798u); -#endif - if (psx_delay_BFC3E794) { - psx_delay_BFC3E794 = 0; - if (psx_taken_BFC3E794) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800567A8u); - goto label_BFC3E7A8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005679Cu); - } -label_BFC3E79C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E79Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005679Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E79C: 10000076 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E79C = cpu->gpr[0]; uint32_t psx_brB_BFC3E79C = cpu->gpr[0]; - psx_taken_BFC3E79C = (psx_brA_BFC3E79C == psx_brB_BFC3E79C); - psx_delay_BFC3E79C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E7A0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800567A0u); -#endif - if (psx_delay_BFC3E79C) { - psx_delay_BFC3E79C = 0; - if (psx_taken_BFC3E79C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800567A4u); - } -label_BFC3E7A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E7A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E7A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8200u); -#endif - /* 0xBFC3E7A4: 000978C0 sll $t7, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[15] = cpu->gpr[9] << 3u; - PGXP_ALU(0x000978C0u, cpu->gpr[15], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x800567A4u); -#endif -label_BFC3E7A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E7A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8180u); -#endif - /* 0xBFC3E7A8: 010F3821 addu $a3, $t0, $t7 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[15]; - PGXP_ALU(0x010F3821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567A8u); -#endif - /* 0xBFC3E7AC: 8CEE0000 lw $t6, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x8CEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800567ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E7B0: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800567B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E7B4: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800567B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004002u); -#endif - /* 0xBFC3E7B8: 01C1C024 and $t8, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[1]; - PGXP_ALU(0x01C1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC3E7BC: ACF80000 sw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567BCu); return; } g_debug_last_store_pc = 0x800567BCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800567BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC3E7C0: ACE60004 sw $a2, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567C0u); return; } g_debug_last_store_pc = 0x800567C0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xACE60004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800567C0u); -#endif -label_BFC3E7C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E7C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E7C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000410u); -#endif - /* 0xBFC3E7C4: 008AC821 addu $t9, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[25] = cpu->gpr[4] + cpu->gpr[10]; - PGXP_ALU(0x008AC821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008040u); -#endif - /* 0xBFC3E7C8: 03267821 addu $t7, $t9, $a2 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[25] + cpu->gpr[6]; - PGXP_ALU(0x03267821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E7CC: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800567CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC002u); -#endif - /* 0xBFC3E7D0: 01E17025 or $t6, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[15] | cpu->gpr[1]; - PGXP_ALU(0x01E17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC3E7D4: ACEE0008 sw $t6, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567D4u); return; } g_debug_last_store_pc = 0x800567D4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800567D4u); -#endif - /* 0xBFC3E7D8: 8FB80000 lw $t8, 0($sp) */ - { uint32_t _pgxa = cpu->gpr[29]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567D8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800567D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E7DC: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800567DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC3E7E0: 0306C823 subu $t9, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[24] - cpu->gpr[6]; - PGXP_ALU(0x0306C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E7E4: ACF9000C sw $t9, 12($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567E4u); return; } g_debug_last_store_pc = 0x800567E4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF9000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800567E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E7E8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800567E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E7EC: 24E70008 addiu $a3, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (8)); - PGXP_ALU(0x24E70008u, cpu->gpr[7], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800567ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E7F0: 10000060 beq $zero, $zero, 0xBFC3E974 */ - uint32_t psx_brA_BFC3E7F0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E7F0 = cpu->gpr[0]; - psx_taken_BFC3E7F0 = (psx_brA_BFC3E7F0 == psx_brB_BFC3E7F0); - psx_delay_BFC3E7F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3E7F4: AC299BF8 sw $t1, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800567F4u); return; } g_debug_last_store_pc = 0x800567F4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800567F4u); -#endif - if (psx_delay_BFC3E7F0) { - psx_delay_BFC3E7F0 = 0; - if (psx_taken_BFC3E7F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056974u); - goto label_BFC3E974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800567F8u); - } -label_BFC3E7F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E7F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800567F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3E7F8: 19400038 blez $t2, 0xBFC3E8DC */ - uint32_t psx_brA_BFC3E7F8 = cpu->gpr[10]; - psx_taken_BFC3E7F8 = ((int32_t)psx_brA_BFC3E7F8 <= 0); - psx_delay_BFC3E7F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2042u); -#endif - /* 0xBFC3E7FC: 00CD082A slt $at, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800567FCu); -#endif - if (psx_delay_BFC3E7F8) { - psx_delay_BFC3E7F8 = 0; - if (psx_taken_BFC3E7F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800568DCu); - goto label_BFC3E8DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056800u); - } -label_BFC3E800: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E800u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC3E800: 15A6000B bne $t5, $a2, 0xBFC3E830 */ - uint32_t psx_brA_BFC3E800 = cpu->gpr[13]; uint32_t psx_brB_BFC3E800 = cpu->gpr[6]; - psx_taken_BFC3E800 = (psx_brA_BFC3E800 != psx_brB_BFC3E800); - psx_delay_BFC3E800 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E804: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056804u); -#endif - if (psx_delay_BFC3E800) { - psx_delay_BFC3E800 = 0; - if (psx_taken_BFC3E800) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056830u); - goto label_BFC3E830; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056808u); - } -label_BFC3E808: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E808u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E808: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056808u); -#endif - /* 0xBFC3E80C: 8DEF9BF4 lw $t7, -25612($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005680Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9BF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005680Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E810: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056810u); -#endif - /* 0xBFC3E814: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056814u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3E818: 25EEFFFE addiu $t6, $t7, -2 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[15] + (-2)); - PGXP_ALU(0x25EEFFFEu, cpu->gpr[14], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80056818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4202u); -#endif - /* 0xBFC3E81C: 01C9082A slt $at, $t6, $t1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[14] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x01C9082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005681Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E820: 1020000E beq $at, $zero, 0xBFC3E85C */ - uint32_t psx_brA_BFC3E820 = cpu->gpr[1]; uint32_t psx_brB_BFC3E820 = cpu->gpr[0]; - psx_taken_BFC3E820 = (psx_brA_BFC3E820 == psx_brB_BFC3E820); - psx_delay_BFC3E820 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3E824: 0009C8C0 sll $t9, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[25] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056824u); -#endif - if (psx_delay_BFC3E820) { - psx_delay_BFC3E820 = 0; - if (psx_taken_BFC3E820) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005685Cu); - goto label_BFC3E85C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056828u); - } -label_BFC3E828: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E828u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E828: 10000053 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E828 = cpu->gpr[0]; uint32_t psx_brB_BFC3E828 = cpu->gpr[0]; - psx_taken_BFC3E828 = (psx_brA_BFC3E828 == psx_brB_BFC3E828); - psx_delay_BFC3E828 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E82C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005682Cu); -#endif - if (psx_delay_BFC3E828) { - psx_delay_BFC3E828 = 0; - if (psx_taken_BFC3E828) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056830u); - } -label_BFC3E830: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E830u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E830: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3E834: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056834u); -#endif - /* 0xBFC3E838: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056838u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056838u); -#endif - /* 0xBFC3E83C: 8F189BF4 lw $t8, -25612($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005683Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189BF4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005683Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E840: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000202u); -#endif - /* 0xBFC3E844: 0138082A slt $at, $t1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[24] ? 1 : 0); - PGXP_ALU(0x0138082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E848: 14200004 bne $at, $zero, 0xBFC3E85C */ - uint32_t psx_brA_BFC3E848 = cpu->gpr[1]; uint32_t psx_brB_BFC3E848 = cpu->gpr[0]; - psx_taken_BFC3E848 = (psx_brA_BFC3E848 != psx_brB_BFC3E848); - psx_delay_BFC3E848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3E84C: 0009C8C0 sll $t9, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[25] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x8005684Cu); -#endif - if (psx_delay_BFC3E848) { - psx_delay_BFC3E848 = 0; - if (psx_taken_BFC3E848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005685Cu); - goto label_BFC3E85C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056850u); - } -label_BFC3E850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E850: 10000049 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E850 = cpu->gpr[0]; uint32_t psx_brB_BFC3E850 = cpu->gpr[0]; - psx_taken_BFC3E850 = (psx_brA_BFC3E850 == psx_brB_BFC3E850); - psx_delay_BFC3E850 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E854: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056854u); -#endif - if (psx_delay_BFC3E850) { - psx_delay_BFC3E850 = 0; - if (psx_taken_BFC3E850) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056858u); - } -label_BFC3E858: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E858u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000200u); -#endif - /* 0xBFC3E858: 0009C8C0 sll $t9, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[25] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C8C0u, cpu->gpr[25], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056858u); -#endif -label_BFC3E85C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E85Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E85Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005685Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000180u); -#endif - /* 0xBFC3E85C: 01193821 addu $a3, $t0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[25]; - PGXP_ALU(0x01193821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005685Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC3E860: AC4A0004 sw $t2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056860u); return; } g_debug_last_store_pc = 0x80056860u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC4A0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80056860u); -#endif - /* 0xBFC3E864: 8CEF0000 lw $t7, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056864u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x8CEF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056864u); -#endif - /* 0xBFC3E868: 8CEE0004 lw $t6, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056868u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x80u); } - PGXP_LOAD(0x8CEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056868u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3E86C: ACE50000 sw $a1, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005686Cu); return; } g_debug_last_store_pc = 0x8005686Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xACE50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005686Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2042u); -#endif - /* 0xBFC3E870: 01A6082A slt $at, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[13] < (int32_t)cpu->gpr[6] ? 1 : 0); - PGXP_ALU(0x01A6082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC0u); -#endif - /* 0xBFC3E874: ACE60004 sw $a2, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056874u); return; } g_debug_last_store_pc = 0x80056874u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xACE60004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC3E878: ACEF0008 sw $t7, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056878u); return; } g_debug_last_store_pc = 0x80056878u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E87C: 24E70008 addiu $a3, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (8)); - PGXP_ALU(0x24E70008u, cpu->gpr[7], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005687Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E880: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E884: 10200004 beq $at, $zero, 0xBFC3E898 */ - uint32_t psx_brA_BFC3E884 = cpu->gpr[1]; uint32_t psx_brB_BFC3E884 = cpu->gpr[0]; - psx_taken_BFC3E884 = (psx_brA_BFC3E884 == psx_brB_BFC3E884); - psx_delay_BFC3E884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC3E888: ACEE0004 sw $t6, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056888u); return; } g_debug_last_store_pc = 0x80056888u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056888u); -#endif - if (psx_delay_BFC3E884) { - psx_delay_BFC3E884 = 0; - if (psx_taken_BFC3E884) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056898u); - goto label_BFC3E898; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005688Cu); - } -label_BFC3E88C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E88Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E88C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005688Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E890: 10000038 beq $zero, $zero, 0xBFC3E974 */ - uint32_t psx_brA_BFC3E890 = cpu->gpr[0]; uint32_t psx_brB_BFC3E890 = cpu->gpr[0]; - psx_taken_BFC3E890 = (psx_brA_BFC3E890 == psx_brB_BFC3E890); - psx_delay_BFC3E890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3E894: AC299BF8 sw $t1, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056894u); return; } g_debug_last_store_pc = 0x80056894u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056894u); -#endif - if (psx_delay_BFC3E890) { - psx_delay_BFC3E890 = 0; - if (psx_taken_BFC3E890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056974u); - goto label_BFC3E974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056898u); - } -label_BFC3E898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056898u); -#endif - /* 0xBFC3E898: 8CF80000 lw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056898u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x80u); } - PGXP_LOAD(0x8CF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056898u); -#endif - /* 0xBFC3E89C: 8CF90004 lw $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005689Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x8CF90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005689Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8410u); -#endif - /* 0xBFC3E8A0: 008A7821 addu $t7, $a0, $t2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[4] + cpu->gpr[10]; - PGXP_ALU(0x008A7821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800568A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC3E8A4: 01E67021 addu $t6, $t7, $a2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[15] + cpu->gpr[6]; - PGXP_ALU(0x01E67021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800568A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E8A8: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC3E8AC: ACF80008 sw $t8, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568ACu); return; } g_debug_last_store_pc = 0x800568ACu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80008u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800568ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004002u); -#endif - /* 0xBFC3E8B0: 01C1C025 or $t8, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800568B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E8B4: ACF9000C sw $t9, 12($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568B4u); return; } g_debug_last_store_pc = 0x800568B4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF9000Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800568B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002040u); -#endif - /* 0xBFC3E8B8: 01A6C823 subu $t9, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[13] - cpu->gpr[6]; - PGXP_ALU(0x01A6C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800568B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC3E8BC: ACF80000 sw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568BCu); return; } g_debug_last_store_pc = 0x800568BCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800568BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E8C0: ACF90004 sw $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568C0u); return; } g_debug_last_store_pc = 0x800568C0u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800568C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E8C4: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800568C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E8C8: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3E8CC: 24E70008 addiu $a3, $a3, 8 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (8)); - PGXP_ALU(0x24E70008u, cpu->gpr[7], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800568CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E8D0: 10000028 beq $zero, $zero, 0xBFC3E974 */ - uint32_t psx_brA_BFC3E8D0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E8D0 = cpu->gpr[0]; - psx_taken_BFC3E8D0 = (psx_brA_BFC3E8D0 == psx_brB_BFC3E8D0); - psx_delay_BFC3E8D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3E8D4: AC299BF8 sw $t1, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568D4u); return; } g_debug_last_store_pc = 0x800568D4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800568D4u); -#endif - if (psx_delay_BFC3E8D0) { - psx_delay_BFC3E8D0 = 0; - if (psx_taken_BFC3E8D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056974u); - goto label_BFC3E974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800568D8u); - } -label_BFC3E8D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E8D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E8D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2042u); -#endif - /* 0xBFC3E8D8: 00CD082A slt $at, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800568D8u); -#endif -label_BFC3E8DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E8DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E8DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E8DC: 14200005 bne $at, $zero, 0xBFC3E8F4 */ - uint32_t psx_brA_BFC3E8DC = cpu->gpr[1]; uint32_t psx_brB_BFC3E8DC = cpu->gpr[0]; - psx_taken_BFC3E8DC = (psx_brA_BFC3E8DC != psx_brB_BFC3E8DC); - psx_delay_BFC3E8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E8E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800568E0u); -#endif - if (psx_delay_BFC3E8DC) { - psx_delay_BFC3E8DC = 0; - if (psx_taken_BFC3E8DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800568F4u); - goto label_BFC3E8F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800568E4u); - } -label_BFC3E8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E8E4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568E4u); -#endif - /* 0xBFC3E8E8: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568E8u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800568E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E8EC: 1000000C beq $zero, $zero, 0xBFC3E920 */ - uint32_t psx_brA_BFC3E8EC = cpu->gpr[0]; uint32_t psx_brB_BFC3E8EC = cpu->gpr[0]; - psx_taken_BFC3E8EC = (psx_brA_BFC3E8EC == psx_brB_BFC3E8EC); - psx_delay_BFC3E8EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E8F0: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568F0u); -#endif - if (psx_delay_BFC3E8EC) { - psx_delay_BFC3E8EC = 0; - if (psx_taken_BFC3E8EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056920u); - goto label_BFC3E920; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800568F4u); - } -label_BFC3E8F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E8F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E8F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800568F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E8F4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E8F8: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800568F8u); -#endif - /* 0xBFC3E8FC: 8D299BF8 lw $t1, -25608($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800568FCu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800568FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056900u); -#endif - /* 0xBFC3E900: 8DEF9BF4 lw $t7, -25612($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056900u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9BF4u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8202u); -#endif - /* 0xBFC3E908: 012F082A slt $at, $t1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x012F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E90C: 14200004 bne $at, $zero, 0xBFC3E920 */ - uint32_t psx_brA_BFC3E90C = cpu->gpr[1]; uint32_t psx_brB_BFC3E90C = cpu->gpr[0]; - psx_taken_BFC3E90C = (psx_brA_BFC3E90C != psx_brB_BFC3E90C); - psx_delay_BFC3E90C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E910: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056910u); -#endif - if (psx_delay_BFC3E90C) { - psx_delay_BFC3E90C = 0; - if (psx_taken_BFC3E90C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056920u); - goto label_BFC3E920; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056914u); - } -label_BFC3E914: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E914u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E914: 10000018 beq $zero, $zero, 0xBFC3E978 */ - uint32_t psx_brA_BFC3E914 = cpu->gpr[0]; uint32_t psx_brB_BFC3E914 = cpu->gpr[0]; - psx_taken_BFC3E914 = (psx_brA_BFC3E914 == psx_brB_BFC3E914); - psx_delay_BFC3E914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E918: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056918u); -#endif - if (psx_delay_BFC3E914) { - psx_delay_BFC3E914 = 0; - if (psx_taken_BFC3E914) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056978u); - goto label_BFC3E978; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005691Cu); - } -label_BFC3E91C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E91Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E91Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005691Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E91C: 3C010FFF lui $at, 0xFFF */ - cpu->gpr[1] = 0x0FFF0000u; - PGXP_ALU(0x3C010FFFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005691Cu); -#endif -label_BFC3E920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E920: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4082u); -#endif - /* 0xBFC3E924: 00E17024 and $t6, $a3, $at */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[7] & cpu->gpr[1]; - PGXP_ALU(0x00E17024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2042u); -#endif - /* 0xBFC3E928: 00CD082A slt $at, $a2, $t5 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[13] ? 1 : 0); - PGXP_ALU(0x00CD082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC3E92C: AC4E0000 sw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005692Cu); return; } g_debug_last_store_pc = 0x8005692Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005692Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3E930: 10200010 beq $at, $zero, 0xBFC3E974 */ - uint32_t psx_brA_BFC3E930 = cpu->gpr[1]; uint32_t psx_brB_BFC3E930 = cpu->gpr[0]; - psx_taken_BFC3E930 = (psx_brA_BFC3E930 == psx_brB_BFC3E930); - psx_delay_BFC3E930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC3E934: AC460004 sw $a2, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056934u); return; } g_debug_last_store_pc = 0x80056934u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC460004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056934u); -#endif - if (psx_delay_BFC3E930) { - psx_delay_BFC3E930 = 0; - if (psx_taken_BFC3E930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056974u); - goto label_BFC3E974; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056938u); - } -label_BFC3E938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000200u); -#endif - /* 0xBFC3E938: 0009C0C0 sll $t8, $t1, 3 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[24] = cpu->gpr[9] << 3u; - PGXP_ALU(0x0009C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000180u); -#endif - /* 0xBFC3E93C: 01183821 addu $a3, $t0, $t8 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[7] = cpu->gpr[8] + cpu->gpr[24]; - PGXP_ALU(0x01183821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005693Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056940u); -#endif - /* 0xBFC3E940: 8CF90000 lw $t9, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056940u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x80u); } - PGXP_LOAD(0x8CF90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4050u); -#endif - /* 0xBFC3E944: 00867021 addu $t6, $a0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[4] + cpu->gpr[6]; - PGXP_ALU(0x00867021u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E948: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E94C: ACF90008 sw $t9, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005694Cu); return; } g_debug_last_store_pc = 0x8005694Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF90008u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005694Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056950u); -#endif - /* 0xBFC3E950: 8CEF0004 lw $t7, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056950u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x80u); } - PGXP_LOAD(0x8CEF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004002u); -#endif - /* 0xBFC3E954: 01C1C025 or $t8, $t6, $at */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[1]; - PGXP_ALU(0x01C1C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC3E958: ACF80000 sw $t8, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056958u); return; } g_debug_last_store_pc = 0x80056958u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xACF80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002040u); -#endif - /* 0xBFC3E95C: 01A6C823 subu $t9, $t5, $a2 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[13] - cpu->gpr[6]; - PGXP_ALU(0x01A6C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005695Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC3E960: ACF90004 sw $t9, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056960u); return; } g_debug_last_store_pc = 0x80056960u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACF90004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3E964: 25290001 addiu $t1, $t1, 1 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1)); - PGXP_ALU(0x25290001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3E968: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC3E96C: ACEF000C sw $t7, 12($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005696Cu); return; } g_debug_last_store_pc = 0x8005696Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005696Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3E970: AC299BF8 sw $t1, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056970u); return; } g_debug_last_store_pc = 0x80056970u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC299BF8u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056970u); -#endif -label_BFC3E974: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E974u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3E974: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056974u); -#endif -label_BFC3E978: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E978u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3E978: 03E00008 jr $ra */ - psx_delay_BFC3E978 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E97C: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x8005697Cu); -#endif - if (psx_delay_BFC3E978) { - psx_delay_BFC3E978 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3E980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3E980u); - int psx_delay_BFC3E9A8 = 0; - int psx_taken_BFC3E9A8 = 0; - int psx_delay_BFC3E9B0 = 0; - int psx_taken_BFC3E9B0 = 0; - int psx_delay_BFC3E9E8 = 0; - int psx_taken_BFC3E9E8 = 0; - int psx_delay_BFC3E9F0 = 0; - int psx_taken_BFC3E9F0 = 0; - int psx_delay_BFC3EA0C = 0; - int psx_taken_BFC3EA0C = 0; - int psx_delay_BFC3EA14 = 0; - int psx_taken_BFC3EA14 = 0; - int psx_delay_BFC3EA30 = 0; - int psx_taken_BFC3EA30 = 0; - int psx_delay_BFC3EA38 = 0; - int psx_taken_BFC3EA38 = 0; - int psx_delay_BFC3EA54 = 0; - int psx_taken_BFC3EA54 = 0; - int psx_delay_BFC3EA5C = 0; - int psx_taken_BFC3EA5C = 0; - int psx_delay_BFC3EA7C = 0; - int psx_taken_BFC3EA7C = 0; - int psx_delay_BFC3EA94 = 0; - int psx_taken_BFC3EA94 = 0; - int psx_delay_BFC3EAB4 = 0; - int psx_taken_BFC3EAB4 = 0; - int psx_delay_BFC3EABC = 0; - int psx_taken_BFC3EABC = 0; - int psx_delay_BFC3EAF8 = 0; - int psx_taken_BFC3EAF8 = 0; - int psx_delay_BFC3EB18 = 0; - int psx_taken_BFC3EB18 = 0; - int psx_delay_BFC3EB20 = 0; - int psx_taken_BFC3EB20 = 0; - int psx_delay_BFC3EB4C = 0; - int psx_taken_BFC3EB4C = 0; - int psx_delay_BFC3EB5C = 0; - int psx_delay_BFC3EB9C = 0; - int psx_taken_BFC3EB9C = 0; - int psx_delay_BFC3EBAC = 0; - int psx_taken_BFC3EBAC = 0; - int psx_delay_BFC3EBC4 = 0; - int psx_taken_BFC3EBC4 = 0; - int psx_delay_BFC3EBD8 = 0; - int psx_taken_BFC3EBD8 = 0; - int psx_delay_BFC3EBE4 = 0; - int psx_taken_BFC3EBE4 = 0; - int psx_delay_BFC3EBF8 = 0; - int psx_taken_BFC3EBF8 = 0; - int psx_delay_BFC3EC04 = 0; - int psx_taken_BFC3EC04 = 0; - int psx_delay_BFC3EC10 = 0; - int psx_delay_BFC3EC18 = 0; - int psx_taken_BFC3EC18 = 0; - int psx_delay_BFC3EC2C = 0; - int psx_taken_BFC3EC2C = 0; - int psx_delay_BFC3EC38 = 0; - int psx_taken_BFC3EC38 = 0; - int psx_delay_BFC3EC48 = 0; - int psx_delay_BFC3EC50 = 0; - int psx_taken_BFC3EC50 = 0; - int psx_delay_BFC3EC5C = 0; - int psx_taken_BFC3EC5C = 0; - int psx_delay_BFC3EC68 = 0; - int psx_taken_BFC3EC68 = 0; - int psx_delay_BFC3EC80 = 0; - int psx_taken_BFC3EC80 = 0; - int psx_delay_BFC3EC88 = 0; - int psx_taken_BFC3EC88 = 0; - int psx_delay_BFC3EC98 = 0; - int psx_delay_BFC3ECB0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3E9B0u: goto label_BFC3E9B0; - case 0xBFC3E9B8u: goto label_BFC3E9B8; - case 0xBFC3E9DCu: goto label_BFC3E9DC; - case 0xBFC3E9F0u: goto label_BFC3E9F0; - case 0xBFC3E9F8u: goto label_BFC3E9F8; - case 0xBFC3E9FCu: goto label_BFC3E9FC; - case 0xBFC3EA14u: goto label_BFC3EA14; - case 0xBFC3EA1Cu: goto label_BFC3EA1C; - case 0xBFC3EA20u: goto label_BFC3EA20; - case 0xBFC3EA38u: goto label_BFC3EA38; - case 0xBFC3EA40u: goto label_BFC3EA40; - case 0xBFC3EA44u: goto label_BFC3EA44; - case 0xBFC3EA5Cu: goto label_BFC3EA5C; - case 0xBFC3EA64u: goto label_BFC3EA64; - case 0xBFC3EA84u: goto label_BFC3EA84; - case 0xBFC3EA9Cu: goto label_BFC3EA9C; - case 0xBFC3EABCu: goto label_BFC3EABC; - case 0xBFC3EAC4u: goto label_BFC3EAC4; - case 0xBFC3EB00u: goto label_BFC3EB00; - case 0xBFC3EB20u: goto label_BFC3EB20; - case 0xBFC3EB28u: goto label_BFC3EB28; - case 0xBFC3EB2Cu: goto label_BFC3EB2C; - case 0xBFC3EB4Cu: goto label_BFC3EB4C; - case 0xBFC3EB54u: goto label_BFC3EB54; - case 0xBFC3EB64u: goto label_BFC3EB64; - case 0xBFC3EB90u: goto label_BFC3EB90; - case 0xBFC3EBA4u: goto label_BFC3EBA4; - case 0xBFC3EBB4u: goto label_BFC3EBB4; - case 0xBFC3EBCCu: goto label_BFC3EBCC; - case 0xBFC3EBE0u: goto label_BFC3EBE0; - case 0xBFC3EBECu: goto label_BFC3EBEC; - case 0xBFC3EBF0u: goto label_BFC3EBF0; - case 0xBFC3EC00u: goto label_BFC3EC00; - case 0xBFC3EC0Cu: goto label_BFC3EC0C; - case 0xBFC3EC10u: goto label_BFC3EC10; - case 0xBFC3EC18u: goto label_BFC3EC18; - case 0xBFC3EC20u: goto label_BFC3EC20; - case 0xBFC3EC34u: goto label_BFC3EC34; - case 0xBFC3EC40u: goto label_BFC3EC40; - case 0xBFC3EC44u: goto label_BFC3EC44; - case 0xBFC3EC50u: goto label_BFC3EC50; - case 0xBFC3EC58u: goto label_BFC3EC58; - case 0xBFC3EC5Cu: goto label_BFC3EC5C; - case 0xBFC3EC64u: goto label_BFC3EC64; - case 0xBFC3EC70u: goto label_BFC3EC70; - case 0xBFC3EC88u: goto label_BFC3EC88; - case 0xBFC3EC90u: goto label_BFC3EC90; - case 0xBFC3EC94u: goto label_BFC3EC94; - case 0xBFC3ECA0u: goto label_BFC3ECA0; - case 0xBFC3ECA4u: goto label_BFC3ECA4; - case 0xBFC3ECA8u: goto label_BFC3ECA8; - default: break; - } - } -label_BFC3E980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3E980: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056980u); -#endif - /* 0xBFC3E984: 8CC6EE40 lw $a2, -4544($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056984u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6EE40u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3E988: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056988u); -#endif - /* 0xBFC3E98C: 8DEF9F2C lw $t7, -24788($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -24788; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-24788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005698Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9F2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005698Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3E990: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3E994: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4044u); -#endif - /* 0xBFC3E998: 00CE1004 sllv $v0, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[14] << (cpu->gpr[6] & 0x1Fu); - PGXP_ALU(0x00CE1004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3E99C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005699Cu); return; } g_debug_last_store_pc = 0x8005699Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005699Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x91u); -#endif - /* 0xBFC3E9A0: 00803821 addu $a3, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x221u); -#endif - /* 0xBFC3E9A4: 00A04821 addu $t1, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A04821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3E9A8: 15E00003 bne $t7, $zero, 0xBFC3E9B8 */ - uint32_t psx_brA_BFC3E9A8 = cpu->gpr[15]; uint32_t psx_brB_BFC3E9A8 = cpu->gpr[0]; - psx_taken_BFC3E9A8 = (psx_brA_BFC3E9A8 != psx_brB_BFC3E9A8); - psx_delay_BFC3E9A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E9AC: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569ACu); -#endif - if (psx_delay_BFC3E9A8) { - psx_delay_BFC3E9A8 = 0; - if (psx_taken_BFC3E9A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569B8u); - goto label_BFC3E9B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569B0u); - } -label_BFC3E9B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E9B0: 1000000A beq $zero, $zero, 0xBFC3E9DC */ - uint32_t psx_brA_BFC3E9B0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E9B0 = cpu->gpr[0]; - psx_taken_BFC3E9B0 = (psx_brA_BFC3E9B0 == psx_brB_BFC3E9B0); - psx_delay_BFC3E9B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3E9B4: 00006021 addu $t4, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00006021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569B4u); -#endif - if (psx_delay_BFC3E9B0) { - psx_delay_BFC3E9B0 = 0; - if (psx_taken_BFC3E9B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569DCu); - goto label_BFC3E9DC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569B8u); - } -label_BFC3E9B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3E9B8: 3C188014 lui $t8, 0x8014 */ - cpu->gpr[24] = 0x80140000u; - PGXP_ALU(0x3C188014u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800569B8u); -#endif - /* 0xBFC3E9BC: 8F18E40C lw $t8, -7156($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -7156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-7156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800569BCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18E40Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800569BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC3E9C0: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800569C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3E9C4: 0018C880 sll $t9, $t8, 2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[24] << 2u; - PGXP_ALU(0x0018C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800569C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002000u); -#endif - /* 0xBFC3E9C8: 01B96821 addu $t5, $t5, $t9 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[13] = cpu->gpr[13] + cpu->gpr[25]; - PGXP_ALU(0x01B96821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569C8u); -#endif - /* 0xBFC3E9CC: 8DAD9910 lw $t5, -26352($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -26352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-26352)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800569CCu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9910u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800569CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3E9D0: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800569D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC3E9D4: 01CD7823 subu $t7, $t6, $t5 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[15] = cpu->gpr[14] - cpu->gpr[13]; - PGXP_ALU(0x01CD7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9040u); -#endif - /* 0xBFC3E9D8: 00CF6004 sllv $t4, $t7, $a2 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[15] << (cpu->gpr[6] & 0x1Fu); - PGXP_ALU(0x00CF6004u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569D8u); -#endif -label_BFC3E9DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3E9DC: 2443FFFF addiu $v1, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2443FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800569DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC3E9E0: 00602027 nor $a0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = ~(cpu->gpr[3] | cpu->gpr[0]); - PGXP_ALU(0x00602027u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000210u); -#endif - /* 0xBFC3E9E4: 0124C024 and $t8, $t1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[9] & cpu->gpr[4]; - PGXP_ALU(0x0124C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3E9E8: 13000004 beq $t8, $zero, 0xBFC3E9FC */ - uint32_t psx_brA_BFC3E9E8 = cpu->gpr[24]; uint32_t psx_brB_BFC3E9E8 = cpu->gpr[0]; - psx_taken_BFC3E9E8 = (psx_brA_BFC3E9E8 == psx_brB_BFC3E9E8); - psx_delay_BFC3E9E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E9EC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569ECu); -#endif - if (psx_delay_BFC3E9E8) { - psx_delay_BFC3E9E8 = 0; - if (psx_taken_BFC3E9E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569FCu); - goto label_BFC3E9FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569F0u); - } -label_BFC3E9F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3E9F0: 10000002 beq $zero, $zero, 0xBFC3E9FC */ - uint32_t psx_brA_BFC3E9F0 = cpu->gpr[0]; uint32_t psx_brB_BFC3E9F0 = cpu->gpr[0]; - psx_taken_BFC3E9F0 = (psx_brA_BFC3E9F0 == psx_brB_BFC3E9F0); - psx_delay_BFC3E9F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3E9F4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569F4u); -#endif - if (psx_delay_BFC3E9F0) { - psx_delay_BFC3E9F0 = 0; - if (psx_taken_BFC3E9F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569FCu); - goto label_BFC3E9FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800569F8u); - } -label_BFC3E9F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3E9F8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569F8u); -#endif -label_BFC3E9FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3E9FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3E9FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800569FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC3E9FC: 01224821 addu $t1, $t1, $v0 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[9] + cpu->gpr[2]; - PGXP_ALU(0x01224821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800569FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC3EA00: 00C94807 srav $t1, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> (cpu->gpr[6] & 0x1Fu)); - PGXP_ALU(0x00C94807u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000090u); -#endif - /* 0xBFC3EA04: 00E4C824 and $t9, $a3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[7] & cpu->gpr[4]; - PGXP_ALU(0x00E4C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC3EA08: 00C94804 sllv $t1, $t1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[9] << (cpu->gpr[6] & 0x1Fu); - PGXP_ALU(0x00C94804u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3EA0C: 13200003 beq $t9, $zero, 0xBFC3EA1C */ - uint32_t psx_brA_BFC3EA0C = cpu->gpr[25]; uint32_t psx_brB_BFC3EA0C = cpu->gpr[0]; - psx_taken_BFC3EA0C = (psx_brA_BFC3EA0C == psx_brB_BFC3EA0C); - psx_delay_BFC3EA0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC3EA10: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A10u); -#endif - if (psx_delay_BFC3EA0C) { - psx_delay_BFC3EA0C = 0; - if (psx_taken_BFC3EA0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A1Cu); - goto label_BFC3EA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A14u); - } -label_BFC3EA14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA14: 10000002 beq $zero, $zero, 0xBFC3EA20 */ - uint32_t psx_brA_BFC3EA14 = cpu->gpr[0]; uint32_t psx_brB_BFC3EA14 = cpu->gpr[0]; - psx_taken_BFC3EA14 = (psx_brA_BFC3EA14 == psx_brB_BFC3EA14); - psx_delay_BFC3EA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3EA18: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A18u); -#endif - if (psx_delay_BFC3EA14) { - psx_delay_BFC3EA14 = 0; - if (psx_taken_BFC3EA14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A20u); - goto label_BFC3EA20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A1Cu); - } -label_BFC3EA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EA1C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A1Cu); -#endif -label_BFC3EA20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA4u); -#endif - /* 0xBFC3EA20: 00E22821 addu $a1, $a3, $v0 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[2]; - PGXP_ALU(0x00E22821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC3EA24: 00C52807 srav $a1, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> (cpu->gpr[6] & 0x1Fu)); - PGXP_ALU(0x00C52807u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60u); -#endif - /* 0xBFC3EA28: 00C52804 sllv $a1, $a1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] << (cpu->gpr[6] & 0x1Fu); - PGXP_ALU(0x00C52804u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3EA2C: 28A11000 slti $at, $a1, 4096 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4096) ? 1 : 0); - PGXP_ALU(0x28A11000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80056A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EA30: 10200004 beq $at, $zero, 0xBFC3EA44 */ - uint32_t psx_brA_BFC3EA30 = cpu->gpr[1]; uint32_t psx_brB_BFC3EA30 = cpu->gpr[0]; - psx_taken_BFC3EA30 = (psx_brA_BFC3EA30 == psx_brB_BFC3EA30); - psx_delay_BFC3EA30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EA34: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056A34u); -#endif - if (psx_delay_BFC3EA30) { - psx_delay_BFC3EA30 = 0; - if (psx_taken_BFC3EA30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A44u); - goto label_BFC3EA44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A38u); - } -label_BFC3EA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA38: 1000009B beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EA38 = cpu->gpr[0]; uint32_t psx_brB_BFC3EA38 = cpu->gpr[0]; - psx_taken_BFC3EA38 = (psx_brA_BFC3EA38 == psx_brB_BFC3EA38); - psx_delay_BFC3EA38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EA3C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056A3Cu); -#endif - if (psx_delay_BFC3EA38) { - psx_delay_BFC3EA38 = 0; - if (psx_taken_BFC3EA38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A40u); - } -label_BFC3EA40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EA40: 3C0E0001 lui $t6, 0x1 */ - cpu->gpr[14] = 0x00010000u; - PGXP_ALU(0x3C0E0001u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056A40u); -#endif -label_BFC3EA44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6040u); -#endif - /* 0xBFC3EA44: 00CE6804 sllv $t5, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[14] << (cpu->gpr[6] & 0x1Fu); - PGXP_ALU(0x00CE6804u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xB000u); -#endif - /* 0xBFC3EA48: 01AC7823 subu $t7, $t5, $t4 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[15] = cpu->gpr[13] - cpu->gpr[12]; - PGXP_ALU(0x01AC7823u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x224u); -#endif - /* 0xBFC3EA4C: 00A91021 addu $v0, $a1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[9]; - PGXP_ALU(0x00A91021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC3EA50: 01E2082A slt $at, $t7, $v0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[2] ? 1 : 0); - PGXP_ALU(0x01E2082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EA54: 10200003 beq $at, $zero, 0xBFC3EA64 */ - uint32_t psx_brA_BFC3EA54 = cpu->gpr[1]; uint32_t psx_brB_BFC3EA54 = cpu->gpr[0]; - psx_taken_BFC3EA54 = (psx_brA_BFC3EA54 == psx_brB_BFC3EA54); - psx_delay_BFC3EA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056A58u); -#endif - if (psx_delay_BFC3EA54) { - psx_delay_BFC3EA54 = 0; - if (psx_taken_BFC3EA54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A64u); - goto label_BFC3EA64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A5Cu); - } -label_BFC3EA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA5C: 10000092 beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EA5C = cpu->gpr[0]; uint32_t psx_brB_BFC3EA5C = cpu->gpr[0]; - psx_taken_BFC3EA5C = (psx_brA_BFC3EA5C == psx_brB_BFC3EA5C); - psx_delay_BFC3EA5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EA60: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056A60u); -#endif - if (psx_delay_BFC3EA5C) { - psx_delay_BFC3EA5C = 0; - if (psx_taken_BFC3EA5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A64u); - } -label_BFC3EA64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3EA64: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056A64u); -#endif - /* 0xBFC3EA68: 8C63EE44 lw $v1, -4540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056A68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3EA6C: 3C064000 lui $a2, 0x4000 */ - cpu->gpr[6] = 0x40000000u; - PGXP_ALU(0x3C064000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A70u); -#endif - /* 0xBFC3EA70: 8C780000 lw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056A70u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000040u); -#endif - /* 0xBFC3EA78: 0306C824 and $t9, $t8, $a2 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[6]; - PGXP_ALU(0x0306C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3EA7C: 13200035 beq $t9, $zero, 0xBFC3EB54 */ - uint32_t psx_brA_BFC3EA7C = cpu->gpr[25]; uint32_t psx_brB_BFC3EA7C = cpu->gpr[0]; - psx_taken_BFC3EA7C = (psx_brA_BFC3EA7C == psx_brB_BFC3EA7C); - psx_delay_BFC3EA7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EA80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056A80u); -#endif - if (psx_delay_BFC3EA7C) { - psx_delay_BFC3EA7C = 0; - if (psx_taken_BFC3EA7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B54u); - goto label_BFC3EB54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A84u); - } -label_BFC3EA84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A84u); -#endif - /* 0xBFC3EA84: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056A84u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3EA88: 28A11001 slti $at, $a1, 4097 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[5] < (4097) ? 1 : 0); - PGXP_ALU(0x28A11001u, cpu->gpr[1], _pgx1, 0x1001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056A88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6020u); -#endif - /* 0xBFC3EA8C: 01C56823 subu $t5, $t6, $a1 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[13] = cpu->gpr[14] - cpu->gpr[5]; - PGXP_ALU(0x01C56823u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2210u); -#endif - /* 0xBFC3EA90: 01A92023 subu $a0, $t5, $t1 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[13] - cpu->gpr[9]; - PGXP_ALU(0x01A92023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EA94: 1420001A bne $at, $zero, 0xBFC3EB00 */ - uint32_t psx_brA_BFC3EA94 = cpu->gpr[1]; uint32_t psx_brB_BFC3EA94 = cpu->gpr[0]; - psx_taken_BFC3EA94 = (psx_brA_BFC3EA94 != psx_brB_BFC3EA94); - psx_delay_BFC3EA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3EA98: 24841000 addiu $a0, $a0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4096)); - PGXP_ALU(0x24841000u, cpu->gpr[4], _pgx1, 0x00001000u); } -#ifdef PSX_COSIM - cosim_instr(0x80056A98u); -#endif - if (psx_delay_BFC3EA94) { - psx_delay_BFC3EA94 = 0; - if (psx_taken_BFC3EA94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B00u); - goto label_BFC3EB00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056A9Cu); - } -label_BFC3EA9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EA9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3EA9C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AA0u); -#endif - /* 0xBFC3EAA0: 8F189BF4 lw $t8, -25612($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AA0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189BF4u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3EAA4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056AA4u); -#endif - /* 0xBFC3EAA8: 8DEF9BF8 lw $t7, -25608($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AA8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9BF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3EAAC: 2719FFFE addiu $t9, $t8, -2 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-2)); - PGXP_ALU(0x2719FFFEu, cpu->gpr[25], _pgx1, 0xFFFFFFFEu); } -#ifdef PSX_COSIM - cosim_instr(0x80056AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008002u); -#endif - /* 0xBFC3EAB0: 032F082A slt $at, $t9, $t7 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[15] ? 1 : 0); - PGXP_ALU(0x032F082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EAB4: 10200003 beq $at, $zero, 0xBFC3EAC4 */ - uint32_t psx_brA_BFC3EAB4 = cpu->gpr[1]; uint32_t psx_brB_BFC3EAB4 = cpu->gpr[0]; - psx_taken_BFC3EAB4 = (psx_brA_BFC3EAB4 == psx_brB_BFC3EAB4); - psx_delay_BFC3EAB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EAB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056AB8u); -#endif - if (psx_delay_BFC3EAB4) { - psx_delay_BFC3EAB4 = 0; - if (psx_taken_BFC3EAB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056AC4u); - goto label_BFC3EAC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056ABCu); - } -label_BFC3EABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EABC: 1000007A beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EABC = cpu->gpr[0]; uint32_t psx_brB_BFC3EABC = cpu->gpr[0]; - psx_taken_BFC3EABC = (psx_brA_BFC3EABC == psx_brB_BFC3EABC); - psx_delay_BFC3EABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EAC0: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056AC0u); -#endif - if (psx_delay_BFC3EABC) { - psx_delay_BFC3EABC = 0; - if (psx_taken_BFC3EABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056AC4u); - } -label_BFC3EAC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EAC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EAC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3EAC4: AC650008 sw $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AC4u); return; } g_debug_last_store_pc = 0x80056AC4u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3EAC8: AC69000C sw $t1, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AC8u); return; } g_debug_last_store_pc = 0x80056AC8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC69000Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3EACC: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EAD0: 3C0E8000 lui $t6, 0x8000 */ - cpu->gpr[14] = 0x80000000u; - PGXP_ALU(0x3C0E8000u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000006u); -#endif - /* 0xBFC3EAD4: 0041C025 or $t8, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x0041C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3EAD8: AC780010 sw $t8, 16($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AD8u); return; } g_debug_last_store_pc = 0x80056AD8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780010u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EADC: 35CE1000 ori $t6, $t6, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = cpu->gpr[14] | 0x1000u; - PGXP_ALU(0x35CE1000u, cpu->gpr[14], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80056ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC3EAE0: 24ADF000 addiu $t5, $a1, -4096 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[5] + (-4096)); - PGXP_ALU(0x24ADF000u, cpu->gpr[13], _pgx1, 0xFFFFF000u); } -#ifdef PSX_COSIM - cosim_instr(0x80056AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3EAE4: AC6E0000 sw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AE4u); return; } g_debug_last_store_pc = 0x80056AE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3EAE8: AC6D0004 sw $t5, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AE8u); return; } g_debug_last_store_pc = 0x80056AE8u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3EAEC: AC640014 sw $a0, 20($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AECu); return; } g_debug_last_store_pc = 0x80056AECu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC640014u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3EAF0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3EAF4: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80056AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EAF8: 10000014 beq $zero, $zero, 0xBFC3EB4C */ - uint32_t psx_brA_BFC3EAF8 = cpu->gpr[0]; uint32_t psx_brB_BFC3EAF8 = cpu->gpr[0]; - psx_taken_BFC3EAF8 = (psx_brA_BFC3EAF8 == psx_brB_BFC3EAF8); - psx_delay_BFC3EAF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3EAFC: AC2F9BF8 sw $t7, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056AFCu); return; } g_debug_last_store_pc = 0x80056AFCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9BF8u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056AFCu); -#endif - if (psx_delay_BFC3EAF8) { - psx_delay_BFC3EAF8 = 0; - if (psx_taken_BFC3EAF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B4Cu); - goto label_BFC3EB4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B00u); - } -label_BFC3EB00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3EB00: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EB04: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B04u); -#endif - /* 0xBFC3EB08: 8DCE9BF4 lw $t6, -25612($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B08u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9BF4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B08u); -#endif - /* 0xBFC3EB0C: 8F399BF8 lw $t9, -25608($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25608; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B0Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399BF8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EB10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004002u); -#endif - /* 0xBFC3EB14: 032E082A slt $at, $t9, $t6 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[25] < (int32_t)cpu->gpr[14] ? 1 : 0); - PGXP_ALU(0x032E082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EB18: 14200004 bne $at, $zero, 0xBFC3EB2C */ - uint32_t psx_brA_BFC3EB18 = cpu->gpr[1]; uint32_t psx_brB_BFC3EB18 = cpu->gpr[0]; - psx_taken_BFC3EB18 = (psx_brA_BFC3EB18 != psx_brB_BFC3EB18); - psx_delay_BFC3EB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3EB1C: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B1Cu); -#endif - if (psx_delay_BFC3EB18) { - psx_delay_BFC3EB18 = 0; - if (psx_taken_BFC3EB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B2Cu); - goto label_BFC3EB2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B20u); - } -label_BFC3EB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EB20: 10000061 beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EB20 = cpu->gpr[0]; uint32_t psx_brB_BFC3EB20 = cpu->gpr[0]; - psx_taken_BFC3EB20 = (psx_brA_BFC3EB20 == psx_brB_BFC3EB20); - psx_delay_BFC3EB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EB24: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056B24u); -#endif - if (psx_delay_BFC3EB20) { - psx_delay_BFC3EB20 = 0; - if (psx_taken_BFC3EB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B28u); - } -label_BFC3EB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3EB28: 3C014000 lui $at, 0x4000 */ - cpu->gpr[1] = 0x40000000u; - PGXP_ALU(0x3C014000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B28u); -#endif -label_BFC3EB2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3EB2C: AC650000 sw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B2Cu); return; } g_debug_last_store_pc = 0x80056B2Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2006u); -#endif - /* 0xBFC3EB30: 00416825 or $t5, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[13] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00416825u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3EB34: AC690004 sw $t1, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B34u); return; } g_debug_last_store_pc = 0x80056B34u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2008u); -#endif - /* 0xBFC3EB38: AC6D0008 sw $t5, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B38u); return; } g_debug_last_store_pc = 0x80056B38u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC6D0008u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3EB3C: AC64000C sw $a0, 12($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B3Cu); return; } g_debug_last_store_pc = 0x80056B3Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC64000Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3EB40: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3EB44: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3EB48: AC389BF8 sw $t8, -25608($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25608; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25608)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B48u); return; } g_debug_last_store_pc = 0x80056B48u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389BF8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B48u); -#endif -label_BFC3EB4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EB4C: 10000056 beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EB4C = cpu->gpr[0]; uint32_t psx_brB_BFC3EB4C = cpu->gpr[0]; - psx_taken_BFC3EB4C = (psx_brA_BFC3EB4C == psx_brB_BFC3EB4C); - psx_delay_BFC3EB4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3EB50: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B50u); -#endif - if (psx_delay_BFC3EB4C) { - psx_delay_BFC3EB4C = 0; - if (psx_taken_BFC3EB4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B54u); - } -label_BFC3EB54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3EB54: AFA50028 sw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B54u); return; } g_debug_last_store_pc = 0x80056B54u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC3EB58: AFA9003C sw $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B58u); return; } g_debug_last_store_pc = 0x80056B58u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EB5C: 0C015844 jal 0xB0056110 */ - cpu->gpr[31] = 0x80056B64u; /* jal link before delay slot */ - psx_delay_BFC3EB5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC3EB60: AFAC0018 sw $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B60u); return; } g_debug_last_store_pc = 0x80056B60u; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAFAC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B60u); -#endif - if (psx_delay_BFC3EB5C) { - psx_delay_BFC3EB5C = 0; - cpu->gpr[31] = 0x80056B64u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056110u); - cpu->pc = 0x80056110u; return; - } -label_BFC3EB64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3EB64: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B64u); -#endif - /* 0xBFC3EB68: 8C63EE44 lw $v1, -4540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3EB6C: 3C0B0FFF lui $t3, 0xFFF */ - cpu->gpr[11] = 0x0FFF0000u; - PGXP_ALU(0x3C0B0FFFu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B70u); -#endif - /* 0xBFC3EB70: 8FA50028 lw $a1, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B70u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50028u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B70u); -#endif - /* 0xBFC3EB74: 8FA9003C lw $t1, 60($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B74u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA9003Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B74u); -#endif - /* 0xBFC3EB78: 8FAC0018 lw $t4, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B78u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0018u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3EB7C: 3C064000 lui $a2, 0x4000 */ - cpu->gpr[6] = 0x40000000u; - PGXP_ALU(0x3C064000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3EB80: 356BFFFF ori $t3, $t3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] | 0xFFFFu; - PGXP_ALU(0x356BFFFFu, cpu->gpr[11], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3EB84: 00004021 addu $t0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00004021u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3EB88: 3C0A8000 lui $t2, 0x8000 */ - cpu->gpr[10] = 0x80000000u; - PGXP_ALU(0x3C0A8000u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3EB8C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B8Cu); -#endif -label_BFC3EB90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EB90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056B90u); -#endif - /* 0xBFC3EB90: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056B90u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EB94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8408u); -#endif - /* 0xBFC3EB98: 006A7824 and $t7, $v1, $t2 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[10]; - PGXP_ALU(0x006A7824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3EB9C: 11E0002F beq $t7, $zero, 0xBFC3EC5C */ - uint32_t psx_brA_BFC3EB9C = cpu->gpr[15]; uint32_t psx_brB_BFC3EB9C = cpu->gpr[0]; - psx_taken_BFC3EB9C = (psx_brA_BFC3EB9C == psx_brB_BFC3EB9C); - psx_delay_BFC3EB9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8048u); -#endif - /* 0xBFC3EBA0: 00667824 and $t7, $v1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6]; - PGXP_ALU(0x00667824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BA0u); -#endif - if (psx_delay_BFC3EB9C) { - psx_delay_BFC3EB9C = 0; - if (psx_taken_BFC3EB9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C5Cu); - goto label_BFC3EC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BA4u); - } -label_BFC3EBA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x888u); -#endif - /* 0xBFC3EBA4: 006B3824 and $a3, $v1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[7] = cpu->gpr[3] & cpu->gpr[11]; - PGXP_ALU(0x006B3824u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA2u); -#endif - /* 0xBFC3EBA8: 00A7082B sltu $at, $a1, $a3 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[7] ? 1 : 0); - PGXP_ALU(0x00A7082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EBAC: 1420001C bne $at, $zero, 0xBFC3EC20 */ - uint32_t psx_brA_BFC3EBAC = cpu->gpr[1]; uint32_t psx_brB_BFC3EBAC = cpu->gpr[0]; - psx_taken_BFC3EBAC = (psx_brA_BFC3EBAC != psx_brB_BFC3EBAC); - psx_delay_BFC3EBAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EBB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056BB0u); -#endif - if (psx_delay_BFC3EBAC) { - psx_delay_BFC3EBAC = 0; - if (psx_taken_BFC3EBAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C20u); - goto label_BFC3EC20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BB4u); - } -label_BFC3EBB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BB4u); -#endif - /* 0xBFC3EBB4: 8C430004 lw $v1, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056BB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430004u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EBB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000088u); -#endif - /* 0xBFC3EBBC: 00E3C821 addu $t9, $a3, $v1 */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[25] = cpu->gpr[7] + cpu->gpr[3]; - PGXP_ALU(0x00E3C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000022u); -#endif - /* 0xBFC3EBC0: 00B9082B sltu $at, $a1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x00B9082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EBC4: 1420000A bne $at, $zero, 0xBFC3EBF0 */ - uint32_t psx_brA_BFC3EBC4 = cpu->gpr[1]; uint32_t psx_brB_BFC3EBC4 = cpu->gpr[0]; - psx_taken_BFC3EBC4 = (psx_brA_BFC3EBC4 != psx_brB_BFC3EBC4); - psx_delay_BFC3EBC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000028u); -#endif - /* 0xBFC3EBC8: 0065C023 subu $t8, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[3] - cpu->gpr[5]; - PGXP_ALU(0x0065C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BC8u); -#endif - if (psx_delay_BFC3EBC4) { - psx_delay_BFC3EBC4 = 0; - if (psx_taken_BFC3EBC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BF0u); - goto label_BFC3EBF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BCCu); - } -label_BFC3EBCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BCCu); -#endif - /* 0xBFC3EBCC: 8C4E0008 lw $t6, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056BCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0008u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EBD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6040u); -#endif - /* 0xBFC3EBD4: 01C66824 and $t5, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[14] & cpu->gpr[6]; - PGXP_ALU(0x01C66824u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC3EBD8: 15A00005 bne $t5, $zero, 0xBFC3EBF0 */ - uint32_t psx_brA_BFC3EBD8 = cpu->gpr[13]; uint32_t psx_brB_BFC3EBD8 = cpu->gpr[0]; - psx_taken_BFC3EBD8 = (psx_brA_BFC3EBD8 != psx_brB_BFC3EBD8); - psx_delay_BFC3EBD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000028u); -#endif - /* 0xBFC3EBDC: 0065C023 subu $t8, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[3] - cpu->gpr[5]; - PGXP_ALU(0x0065C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BDCu); -#endif - if (psx_delay_BFC3EBD8) { - psx_delay_BFC3EBD8 = 0; - if (psx_taken_BFC3EBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BF0u); - goto label_BFC3EBF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BE0u); - } -label_BFC3EBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3EBE0: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EBE4: 1000FFEA beq $zero, $zero, 0xBFC3EB90 */ - uint32_t psx_brA_BFC3EBE4 = cpu->gpr[0]; uint32_t psx_brB_BFC3EBE4 = cpu->gpr[0]; - psx_taken_BFC3EBE4 = (psx_brA_BFC3EBE4 == psx_brB_BFC3EBE4); - psx_delay_BFC3EBE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3EBE8: 24420008 addiu $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8)); - PGXP_ALU(0x24420008u, cpu->gpr[2], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056BE8u); -#endif - if (psx_delay_BFC3EBE4) { - psx_delay_BFC3EBE4 = 0; - if (psx_taken_BFC3EBE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B90u); - goto label_BFC3EB90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056BECu); - } -label_BFC3EBEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000028u); -#endif - /* 0xBFC3EBEC: 0065C023 subu $t8, $v1, $a1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[24] = cpu->gpr[3] - cpu->gpr[5]; - PGXP_ALU(0x0065C023u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BECu); -#endif -label_BFC3EBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000090u); -#endif - /* 0xBFC3EBF0: 03072021 addu $a0, $t8, $a3 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[24] + cpu->gpr[7]; - PGXP_ALU(0x03072021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x212u); -#endif - /* 0xBFC3EBF4: 0089082A slt $at, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EBF8: 10200005 beq $at, $zero, 0xBFC3EC10 */ - uint32_t psx_brA_BFC3EBF8 = cpu->gpr[1]; uint32_t psx_brB_BFC3EBF8 = cpu->gpr[0]; - psx_taken_BFC3EBF8 = (psx_brA_BFC3EBF8 == psx_brB_BFC3EBF8); - psx_delay_BFC3EBF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EBFC: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056BFCu); -#endif - if (psx_delay_BFC3EBF8) { - psx_delay_BFC3EBF8 = 0; - if (psx_taken_BFC3EBF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C10u); - goto label_BFC3EC10; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C00u); - } -label_BFC3EC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3EC00: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC04: 1000FFE2 beq $zero, $zero, 0xBFC3EB90 */ - uint32_t psx_brA_BFC3EC04 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC04 = cpu->gpr[0]; - psx_taken_BFC3EC04 = (psx_brA_BFC3EC04 == psx_brB_BFC3EC04); - psx_delay_BFC3EC04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3EC08: 24420008 addiu $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8)); - PGXP_ALU(0x24420008u, cpu->gpr[2], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C08u); -#endif - if (psx_delay_BFC3EC04) { - psx_delay_BFC3EC04 = 0; - if (psx_taken_BFC3EC04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B90u); - goto label_BFC3EB90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C0Cu); - } -label_BFC3EC0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EC0C: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C0Cu); -#endif -label_BFC3EC10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EC10: 0C01598D jal 0xB0056634 */ - cpu->gpr[31] = 0x80056C18u; /* jal link before delay slot */ - psx_delay_BFC3EC10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC3EC14: 01203021 addu $a2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C14u); -#endif - if (psx_delay_BFC3EC10) { - psx_delay_BFC3EC10 = 0; - cpu->gpr[31] = 0x80056C18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056634u); - cpu->pc = 0x80056634u; return; - } -label_BFC3EC18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC18: 10000022 beq $zero, $zero, 0xBFC3ECA4 */ - uint32_t psx_brA_BFC3EC18 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC18 = cpu->gpr[0]; - psx_taken_BFC3EC18 = (psx_brA_BFC3EC18 == psx_brB_BFC3EC18); - psx_delay_BFC3EC18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3EC1C: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C1Cu); -#endif - if (psx_delay_BFC3EC18) { - psx_delay_BFC3EC18 = 0; - if (psx_taken_BFC3EC18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA4u); - goto label_BFC3ECA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C20u); - } -label_BFC3EC20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C20u); -#endif - /* 0xBFC3EC20: 8C440004 lw $a0, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056C20u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } - PGXP_LOAD(0x8C440004u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x212u); -#endif - /* 0xBFC3EC28: 0089082A slt $at, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EC2C: 10200005 beq $at, $zero, 0xBFC3EC44 */ - uint32_t psx_brA_BFC3EC2C = cpu->gpr[1]; uint32_t psx_brB_BFC3EC2C = cpu->gpr[0]; - psx_taken_BFC3EC2C = (psx_brA_BFC3EC2C == psx_brB_BFC3EC2C); - psx_delay_BFC3EC2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EC30: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C30u); -#endif - if (psx_delay_BFC3EC2C) { - psx_delay_BFC3EC2C = 0; - if (psx_taken_BFC3EC2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C44u); - goto label_BFC3EC44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C34u); - } -label_BFC3EC34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3EC34: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC38: 1000FFD5 beq $zero, $zero, 0xBFC3EB90 */ - uint32_t psx_brA_BFC3EC38 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC38 = cpu->gpr[0]; - psx_taken_BFC3EC38 = (psx_brA_BFC3EC38 == psx_brB_BFC3EC38); - psx_delay_BFC3EC38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3EC3C: 24420008 addiu $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8)); - PGXP_ALU(0x24420008u, cpu->gpr[2], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C3Cu); -#endif - if (psx_delay_BFC3EC38) { - psx_delay_BFC3EC38 = 0; - if (psx_taken_BFC3EC38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B90u); - goto label_BFC3EB90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C40u); - } -label_BFC3EC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EC40: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C40u); -#endif -label_BFC3EC44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA1u); -#endif - /* 0xBFC3EC44: 00E02821 addu $a1, $a3, $zero */ - { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[0]; - PGXP_ALU(0x00E02821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EC48: 0C01598D jal 0xB0056634 */ - cpu->gpr[31] = 0x80056C50u; /* jal link before delay slot */ - psx_delay_BFC3EC48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC3EC4C: 01203021 addu $a2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C4Cu); -#endif - if (psx_delay_BFC3EC48) { - psx_delay_BFC3EC48 = 0; - cpu->gpr[31] = 0x80056C50u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056634u); - cpu->pc = 0x80056634u; return; - } -label_BFC3EC50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC50: 10000014 beq $zero, $zero, 0xBFC3ECA4 */ - uint32_t psx_brA_BFC3EC50 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC50 = cpu->gpr[0]; - psx_taken_BFC3EC50 = (psx_brA_BFC3EC50 == psx_brB_BFC3EC50); - psx_delay_BFC3EC50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3EC54: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C54u); -#endif - if (psx_delay_BFC3EC50) { - psx_delay_BFC3EC50 = 0; - if (psx_taken_BFC3EC50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA4u); - goto label_BFC3ECA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C58u); - } -label_BFC3EC58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8048u); -#endif - /* 0xBFC3EC58: 00667824 and $t7, $v1, $a2 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[3] & cpu->gpr[6]; - PGXP_ALU(0x00667824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C58u); -#endif -label_BFC3EC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3EC5C: 15E00004 bne $t7, $zero, 0xBFC3EC70 */ - uint32_t psx_brA_BFC3EC5C = cpu->gpr[15]; uint32_t psx_brB_BFC3EC5C = cpu->gpr[0]; - psx_taken_BFC3EC5C = (psx_brA_BFC3EC5C != psx_brB_BFC3EC5C); - psx_delay_BFC3EC5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC60: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056C60u); -#endif - if (psx_delay_BFC3EC5C) { - psx_delay_BFC3EC5C = 0; - if (psx_taken_BFC3EC5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C70u); - goto label_BFC3EC70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C64u); - } -label_BFC3EC64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3EC64: 25080001 addiu $t0, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25080001u, cpu->gpr[8], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC68: 1000FFC9 beq $zero, $zero, 0xBFC3EB90 */ - uint32_t psx_brA_BFC3EC68 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC68 = cpu->gpr[0]; - psx_taken_BFC3EC68 = (psx_brA_BFC3EC68 == psx_brB_BFC3EC68); - psx_delay_BFC3EC68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3EC6C: 24420008 addiu $v0, $v0, 8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8)); - PGXP_ALU(0x24420008u, cpu->gpr[2], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056C6Cu); -#endif - if (psx_delay_BFC3EC68) { - psx_delay_BFC3EC68 = 0; - if (psx_taken_BFC3EC68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056B90u); - goto label_BFC3EB90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C70u); - } -label_BFC3EC70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C70u); -#endif - /* 0xBFC3EC70: 8C590004 lw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056C70u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001010u); -#endif - /* 0xBFC3EC78: 032C2023 subu $a0, $t9, $t4 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[4] = cpu->gpr[25] - cpu->gpr[12]; - PGXP_ALU(0x032C2023u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x212u); -#endif - /* 0xBFC3EC7C: 0089082A slt $at, $a0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[9] ? 1 : 0); - PGXP_ALU(0x0089082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EC80: 10200004 beq $at, $zero, 0xBFC3EC94 */ - uint32_t psx_brA_BFC3EC80 = cpu->gpr[1]; uint32_t psx_brB_BFC3EC80 = cpu->gpr[0]; - psx_taken_BFC3EC80 = (psx_brA_BFC3EC80 == psx_brB_BFC3EC80); - psx_delay_BFC3EC80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EC84: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C84u); -#endif - if (psx_delay_BFC3EC80) { - psx_delay_BFC3EC80 = 0; - if (psx_taken_BFC3EC80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C94u); - goto label_BFC3EC94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C88u); - } -label_BFC3EC88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EC88: 10000007 beq $zero, $zero, 0xBFC3ECA8 */ - uint32_t psx_brA_BFC3EC88 = cpu->gpr[0]; uint32_t psx_brB_BFC3EC88 = cpu->gpr[0]; - psx_taken_BFC3EC88 = (psx_brA_BFC3EC88 == psx_brB_BFC3EC88); - psx_delay_BFC3EC88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EC8C: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056C8Cu); -#endif - if (psx_delay_BFC3EC88) { - psx_delay_BFC3EC88 = 0; - if (psx_taken_BFC3EC88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CA8u); - goto label_BFC3ECA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056C90u); - } -label_BFC3EC90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x111u); -#endif - /* 0xBFC3EC90: 01002021 addu $a0, $t0, $zero */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[8] + cpu->gpr[0]; - PGXP_ALU(0x01002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C90u); -#endif -label_BFC3EC94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EC94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x828u); -#endif - /* 0xBFC3EC94: 006B2824 and $a1, $v1, $t3 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[5] = cpu->gpr[3] & cpu->gpr[11]; - PGXP_ALU(0x006B2824u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EC98: 0C01598D jal 0xB0056634 */ - cpu->gpr[31] = 0x80056CA0u; /* jal link before delay slot */ - psx_delay_BFC3EC98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x241u); -#endif - /* 0xBFC3EC9C: 01203021 addu $a2, $t1, $zero */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[9] + cpu->gpr[0]; - PGXP_ALU(0x01203021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056C9Cu); -#endif - if (psx_delay_BFC3EC98) { - psx_delay_BFC3EC98 = 0; - cpu->gpr[31] = 0x80056CA0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056634u); - cpu->pc = 0x80056634u; return; - } -label_BFC3ECA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3ECA0: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CA0u); -#endif -label_BFC3ECA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC3ECA4: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CA4u); -#endif -label_BFC3ECA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CA8u); -#endif - /* 0xBFC3ECA8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056CA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3ECAC: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80056CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3ECB0: 03E00008 jr $ra */ - psx_delay_BFC3ECB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ECB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056CB4u); -#endif - if (psx_delay_BFC3ECB0) { - psx_delay_BFC3ECB0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3ECB8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3ECB8u); - int psx_delay_BFC3ECE0 = 0; - int psx_taken_BFC3ECE0 = 0; - int psx_delay_BFC3ECEC = 0; - int psx_taken_BFC3ECEC = 0; - int psx_delay_BFC3ECFC = 0; - int psx_taken_BFC3ECFC = 0; - int psx_delay_BFC3ED04 = 0; - int psx_delay_BFC3ED1C = 0; - int psx_taken_BFC3ED1C = 0; - int psx_delay_BFC3ED24 = 0; - int psx_delay_BFC3ED2C = 0; - int psx_taken_BFC3ED2C = 0; - int psx_delay_BFC3ED38 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3ECD4u: goto label_BFC3ECD4; - case 0xBFC3ECE8u: goto label_BFC3ECE8; - case 0xBFC3ECF4u: goto label_BFC3ECF4; - case 0xBFC3ED04u: goto label_BFC3ED04; - case 0xBFC3ED0Cu: goto label_BFC3ED0C; - case 0xBFC3ED24u: goto label_BFC3ED24; - case 0xBFC3ED2Cu: goto label_BFC3ED2C; - case 0xBFC3ED34u: goto label_BFC3ED34; - default: break; - } - } -label_BFC3ECB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3ECB8: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3ECBC: 3C080FFF lui $t0, 0xFFF */ - cpu->gpr[8] = 0x0FFF0000u; - PGXP_ALU(0x3C080FFFu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CC0u); -#endif - /* 0xBFC3ECC0: 8C63EE44 lw $v1, -4540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056CC0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3ECC4: 3508FFFF ori $t0, $t0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0xFFFFu; - PGXP_ALU(0x3508FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ECC8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3ECCC: 3C068000 lui $a2, 0x8000 */ - cpu->gpr[6] = 0x80000000u; - PGXP_ALU(0x3C068000u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3ECD0: 3C074000 lui $a3, 0x4000 */ - cpu->gpr[7] = 0x40000000u; - PGXP_ALU(0x3C074000u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056CD0u); -#endif -label_BFC3ECD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CD4u); -#endif - /* 0xBFC3ECD4: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056CD4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ECD8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4044u); -#endif - /* 0xBFC3ECDC: 00467024 and $t6, $v0, $a2 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[6]; - PGXP_ALU(0x00467024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3ECE0: 15C00012 bne $t6, $zero, 0xBFC3ED2C */ - uint32_t psx_brA_BFC3ECE0 = cpu->gpr[14]; uint32_t psx_brB_BFC3ECE0 = cpu->gpr[0]; - psx_taken_BFC3ECE0 = (psx_brA_BFC3ECE0 != psx_brB_BFC3ECE0); - psx_delay_BFC3ECE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ECE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056CE4u); -#endif - if (psx_delay_BFC3ECE0) { - psx_delay_BFC3ECE0 = 0; - if (psx_taken_BFC3ECE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D2Cu); - goto label_BFC3ED2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CE8u); - } -label_BFC3ECE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8084u); -#endif - /* 0xBFC3ECE8: 00477824 and $t7, $v0, $a3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[15] = cpu->gpr[2] & cpu->gpr[7]; - PGXP_ALU(0x00477824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3ECEC: 15E00011 bne $t7, $zero, 0xBFC3ED34 */ - uint32_t psx_brA_BFC3ECEC = cpu->gpr[15]; uint32_t psx_brB_BFC3ECEC = cpu->gpr[0]; - psx_taken_BFC3ECEC = (psx_brA_BFC3ECEC != psx_brB_BFC3ECEC); - psx_delay_BFC3ECEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ECF0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056CF0u); -#endif - if (psx_delay_BFC3ECEC) { - psx_delay_BFC3ECEC = 0; - if (psx_taken_BFC3ECEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D34u); - goto label_BFC3ED34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CF4u); - } -label_BFC3ECF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ECF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ECF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x124u); -#endif - /* 0xBFC3ECF4: 00482824 and $a1, $v0, $t0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[2] & cpu->gpr[8]; - PGXP_ALU(0x00482824u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x32u); -#endif - /* 0xBFC3ECF8: 00A4082B sltu $at, $a1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x00A4082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3ECFC: 14200003 bne $at, $zero, 0xBFC3ED0C */ - uint32_t psx_brA_BFC3ECFC = cpu->gpr[1]; uint32_t psx_brB_BFC3ECFC = cpu->gpr[0]; - psx_taken_BFC3ECFC = (psx_brA_BFC3ECFC != psx_brB_BFC3ECFC); - psx_delay_BFC3ECFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D00u); -#endif - if (psx_delay_BFC3ECFC) { - psx_delay_BFC3ECFC = 0; - if (psx_taken_BFC3ECFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D0Cu); - goto label_BFC3ED0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D04u); - } -label_BFC3ED04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3ED04: 03E00008 jr $ra */ - psx_delay_BFC3ED04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ED08: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D08u); -#endif - if (psx_delay_BFC3ED04) { - psx_delay_BFC3ED04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3ED0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D0Cu); -#endif - /* 0xBFC3ED0C: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D0Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC3ED14: 00B8C821 addu $t9, $a1, $t8 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[24]; - PGXP_ALU(0x00B8C821u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000012u); -#endif - /* 0xBFC3ED18: 0099082B sltu $at, $a0, $t9 */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[1] = (uint32_t)(cpu->gpr[4] < cpu->gpr[25] ? 1 : 0); - PGXP_ALU(0x0099082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3ED1C: 10200003 beq $at, $zero, 0xBFC3ED2C */ - uint32_t psx_brA_BFC3ED1C = cpu->gpr[1]; uint32_t psx_brB_BFC3ED1C = cpu->gpr[0]; - psx_taken_BFC3ED1C = (psx_brA_BFC3ED1C == psx_brB_BFC3ED1C); - psx_delay_BFC3ED1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D20u); -#endif - if (psx_delay_BFC3ED1C) { - psx_delay_BFC3ED1C = 0; - if (psx_taken_BFC3ED1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D2Cu); - goto label_BFC3ED2C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D24u); - } -label_BFC3ED24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3ED24: 03E00008 jr $ra */ - psx_delay_BFC3ED24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ED28: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D28u); -#endif - if (psx_delay_BFC3ED24) { - psx_delay_BFC3ED24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC3ED2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED2C: 1000FFE9 beq $zero, $zero, 0xBFC3ECD4 */ - uint32_t psx_brA_BFC3ED2C = cpu->gpr[0]; uint32_t psx_brB_BFC3ED2C = cpu->gpr[0]; - psx_taken_BFC3ED2C = (psx_brA_BFC3ED2C == psx_brB_BFC3ED2C); - psx_delay_BFC3ED2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3ED30: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D30u); -#endif - if (psx_delay_BFC3ED2C) { - psx_delay_BFC3ED2C = 0; - if (psx_taken_BFC3ED2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056CD4u); - goto label_BFC3ECD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D34u); - } -label_BFC3ED34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3ED34: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3ED38: 03E00008 jr $ra */ - psx_delay_BFC3ED38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D3Cu); -#endif - if (psx_delay_BFC3ED38) { - psx_delay_BFC3ED38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3ED40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3ED40u); - int psx_delay_BFC3ED54 = 0; - int psx_taken_BFC3ED54 = 0; - int psx_delay_BFC3ED74 = 0; - int psx_taken_BFC3ED74 = 0; - int psx_delay_BFC3ED7C = 0; - int psx_taken_BFC3ED7C = 0; - int psx_delay_BFC3ED88 = 0; - int psx_taken_BFC3ED88 = 0; - int psx_delay_BFC3ED94 = 0; - int psx_taken_BFC3ED94 = 0; - int psx_delay_BFC3ED9C = 0; - int psx_delay_BFC3EDAC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3ED5Cu: goto label_BFC3ED5C; - case 0xBFC3ED68u: goto label_BFC3ED68; - case 0xBFC3ED7Cu: goto label_BFC3ED7C; - case 0xBFC3ED84u: goto label_BFC3ED84; - case 0xBFC3ED90u: goto label_BFC3ED90; - case 0xBFC3ED9Cu: goto label_BFC3ED9C; - case 0xBFC3EDA4u: goto label_BFC3EDA4; - default: break; - } - } -label_BFC3ED40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3ED40: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056D40u); -#endif - /* 0xBFC3ED44: 8CE79BF4 lw $a3, -25612($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D44u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79BF4u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3ED48: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3ED4C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D4Cu); return; } g_debug_last_store_pc = 0x80056D4Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC3ED50: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC3ED54: 18E00011 blez $a3, 0xBFC3ED9C */ - uint32_t psx_brA_BFC3ED54 = cpu->gpr[7]; - psx_taken_BFC3ED54 = ((int32_t)psx_brA_BFC3ED54 <= 0); - psx_delay_BFC3ED54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3ED58: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D58u); -#endif - if (psx_delay_BFC3ED54) { - psx_delay_BFC3ED54 = 0; - if (psx_taken_BFC3ED54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D9Cu); - goto label_BFC3ED9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D5Cu); - } -label_BFC3ED5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3ED5C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D60u); -#endif - /* 0xBFC3ED60: 8C63EE44 lw $v1, -4540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D60u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3ED64: 3C044000 lui $a0, 0x4000 */ - cpu->gpr[4] = 0x40000000u; - PGXP_ALU(0x3C044000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056D64u); -#endif -label_BFC3ED68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D68u); -#endif - /* 0xBFC3ED68: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D68u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED6C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4014u); -#endif - /* 0xBFC3ED70: 00447024 and $t6, $v0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[2] & cpu->gpr[4]; - PGXP_ALU(0x00447024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3ED74: 15C00009 bne $t6, $zero, 0xBFC3ED9C */ - uint32_t psx_brA_BFC3ED74 = cpu->gpr[14]; uint32_t psx_brB_BFC3ED74 = cpu->gpr[0]; - psx_taken_BFC3ED74 = (psx_brA_BFC3ED74 != psx_brB_BFC3ED74); - psx_delay_BFC3ED74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056D78u); -#endif - if (psx_delay_BFC3ED74) { - psx_delay_BFC3ED74 = 0; - if (psx_taken_BFC3ED74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D9Cu); - goto label_BFC3ED9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D7Cu); - } -label_BFC3ED7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC3ED7C: 14C20004 bne $a2, $v0, 0xBFC3ED90 */ - uint32_t psx_brA_BFC3ED7C = cpu->gpr[6]; uint32_t psx_brB_BFC3ED7C = cpu->gpr[2]; - psx_taken_BFC3ED7C = (psx_brA_BFC3ED7C != psx_brB_BFC3ED7C); - psx_delay_BFC3ED7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3ED80: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056D80u); -#endif - if (psx_delay_BFC3ED7C) { - psx_delay_BFC3ED7C = 0; - if (psx_taken_BFC3ED7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D90u); - goto label_BFC3ED90; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D84u); - } -label_BFC3ED84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8006u); -#endif - /* 0xBFC3ED84: 00417825 or $t7, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[15] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00417825u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3ED88: 10000004 beq $zero, $zero, 0xBFC3ED9C */ - uint32_t psx_brA_BFC3ED88 = cpu->gpr[0]; uint32_t psx_brB_BFC3ED88 = cpu->gpr[0]; - psx_taken_BFC3ED88 = (psx_brA_BFC3ED88 == psx_brB_BFC3ED88); - psx_delay_BFC3ED88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3ED8C: AC6F0000 sw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056D8Cu); return; } g_debug_last_store_pc = 0x80056D8Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056D8Cu); -#endif - if (psx_delay_BFC3ED88) { - psx_delay_BFC3ED88 = 0; - if (psx_taken_BFC3ED88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D9Cu); - goto label_BFC3ED9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D90u); - } -label_BFC3ED90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3ED90: 24A50001 addiu $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); - PGXP_ALU(0x24A50001u, cpu->gpr[5], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0u); -#endif - /* 0xBFC3ED94: 14A7FFF4 bne $a1, $a3, 0xBFC3ED68 */ - uint32_t psx_brA_BFC3ED94 = cpu->gpr[5]; uint32_t psx_brB_BFC3ED94 = cpu->gpr[7]; - psx_taken_BFC3ED94 = (psx_brA_BFC3ED94 != psx_brB_BFC3ED94); - psx_delay_BFC3ED94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3ED98: 24630008 addiu $v1, $v1, 8 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (8)); - PGXP_ALU(0x24630008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056D98u); -#endif - if (psx_delay_BFC3ED94) { - psx_delay_BFC3ED94 = 0; - if (psx_taken_BFC3ED94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D68u); - goto label_BFC3ED68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056D9Cu); - } -label_BFC3ED9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3ED9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3ED9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3ED9C: 0C015844 jal 0xB0056110 */ - cpu->gpr[31] = 0x80056DA4u; /* jal link before delay slot */ - psx_delay_BFC3ED9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EDA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056DA0u); -#endif - if (psx_delay_BFC3ED9C) { - psx_delay_BFC3ED9C = 0; - cpu->gpr[31] = 0x80056DA4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056110u); - cpu->pc = 0x80056110u; return; - } -label_BFC3EDA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EDA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EDA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DA4u); -#endif - /* 0xBFC3EDA4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EDA8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80056DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EDAC: 03E00008 jr $ra */ - psx_delay_BFC3EDAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EDB0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056DB0u); -#endif - if (psx_delay_BFC3EDAC) { - psx_delay_BFC3EDAC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EDB4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EDB4u); - int psx_delay_BFC3EDBC = 0; - int psx_delay_BFC3EDD0 = 0; - int psx_taken_BFC3EDD0 = 0; - int psx_delay_BFC3EE04 = 0; - int psx_delay_BFC3EE28 = 0; - int psx_taken_BFC3EE28 = 0; - int psx_delay_BFC3EE3C = 0; - int psx_taken_BFC3EE3C = 0; - int psx_delay_BFC3EE54 = 0; - int psx_taken_BFC3EE54 = 0; - int psx_delay_BFC3EE74 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3EDC4u: goto label_BFC3EDC4; - case 0xBFC3EDD8u: goto label_BFC3EDD8; - case 0xBFC3EDF8u: goto label_BFC3EDF8; - case 0xBFC3EE0Cu: goto label_BFC3EE0C; - case 0xBFC3EE30u: goto label_BFC3EE30; - case 0xBFC3EE44u: goto label_BFC3EE44; - case 0xBFC3EE5Cu: goto label_BFC3EE5C; - case 0xBFC3EE70u: goto label_BFC3EE70; - default: break; - } - } -label_BFC3EDB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EDB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EDB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EDB4: 27BDFFC8 addiu $sp, $sp, -56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-56)); - PGXP_ALU(0x27BDFFC8u, cpu->gpr[29], _pgx1, 0xFFFFFFC8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3EDB8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DB8u); return; } g_debug_last_store_pc = 0x80056DB8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EDBC: 0C015844 jal 0xB0056110 */ - cpu->gpr[31] = 0x80056DC4u; /* jal link before delay slot */ - psx_delay_BFC3EDBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC3EDC0: AFB10018 sw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DC0u); return; } g_debug_last_store_pc = 0x80056DC0u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DC0u); -#endif - if (psx_delay_BFC3EDBC) { - psx_delay_BFC3EDBC = 0; - cpu->gpr[31] = 0x80056DC4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056110u); - cpu->pc = 0x80056110u; return; - } -label_BFC3EDC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EDC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EDC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EDC4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056DC4u); -#endif - /* 0xBFC3EDC8: 8DCE9BF4 lw $t6, -25612($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DC8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9BF4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC3EDCC: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EDD0: 05C00027 bltz $t6, 0xBFC3EE70 */ - uint32_t psx_brA_BFC3EDD0 = cpu->gpr[14]; - psx_taken_BFC3EDD0 = ((int32_t)psx_brA_BFC3EDD0 < 0); - psx_delay_BFC3EDD0 = 1; - /* 0xBFC3EDD4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DD4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DD4u); -#endif - if (psx_delay_BFC3EDD0) { - psx_delay_BFC3EDD0 = 0; - if (psx_taken_BFC3EDD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E70u); - goto label_BFC3EE70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056DD8u); - } -label_BFC3EDD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EDD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EDD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC3EDD8: AFB0002C sw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DD8u); return; } g_debug_last_store_pc = 0x80056DD8u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3EDDC: 3C10800E lui $s0, 0x800E */ - cpu->gpr[16] = 0x800E0000u; - PGXP_ALU(0x3C10800Eu, cpu->gpr[16], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC3EDE0: AFB20028 sw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DE0u); return; } g_debug_last_store_pc = 0x80056DE0u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3EDE4: 3C128008 lui $s2, 0x8008 */ - cpu->gpr[18] = 0x80080000u; - PGXP_ALU(0x3C128008u, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC3EDE8: AFB30024 sw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DE8u); return; } g_debug_last_store_pc = 0x80056DE8u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DE8u); -#endif - /* 0xBFC3EDEC: 8E10EE44 lw $s0, -4540($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x10000u); } - PGXP_LOAD(0x8E10EE44u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC3EDF0: 3C134000 lui $s3, 0x4000 */ - cpu->gpr[19] = 0x40000000u; - PGXP_ALU(0x3C134000u, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC3EDF4: 26529BFC addiu $s2, $s2, -25604 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-25604)); - PGXP_ALU(0x26529BFCu, cpu->gpr[18], _pgx1, 0xFFFF9BFCu); } -#ifdef PSX_COSIM - cosim_instr(0x80056DF4u); -#endif -label_BFC3EDF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EDF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EDF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056DF8u); -#endif - /* 0xBFC3EDF8: 8E060000 lw $a2, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DF8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } - PGXP_LOAD(0x8E060000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DF8u); -#endif - /* 0xBFC3EDFC: 8E070004 lw $a3, 4($s0) */ - { uint32_t _pgxa = cpu->gpr[16] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056DFCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } - PGXP_LOAD(0x8E070004u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80056DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40011u); -#endif - /* 0xBFC3EE00: 02402021 addu $a0, $s2, $zero */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[0]; - PGXP_ALU(0x02402021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EE04: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80056E0Cu; /* jal link before delay slot */ - psx_delay_BFC3EE04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20021u); -#endif - /* 0xBFC3EE08: 02202821 addu $a1, $s1, $zero */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[17] + cpu->gpr[0]; - PGXP_ALU(0x02202821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E08u); -#endif - if (psx_delay_BFC3EE04) { - psx_delay_BFC3EE04 = 0; - cpu->gpr[31] = 0x80056E0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC3EE0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3EE0C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E10u); -#endif - /* 0xBFC3EE10: 8DEFEE44 lw $t7, -4540($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E10u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFEE44u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1020000u); -#endif - /* 0xBFC3EE14: 0011C0C0 sll $t8, $s1, 3 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[24] = cpu->gpr[17] << 3u; - PGXP_ALU(0x0011C0C0u, cpu->gpr[24], _pgx1, 3u); } -#ifdef PSX_COSIM - cosim_instr(0x80056E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1018000u); -#endif - /* 0xBFC3EE18: 01F88021 addu $s0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F88021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E18u); -#endif - /* 0xBFC3EE1C: 8E190000 lw $t9, 0($s0) */ - { uint32_t _pgxa = cpu->gpr[16]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E1Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10000u); } - PGXP_LOAD(0x8E190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EE20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2080100u); -#endif - /* 0xBFC3EE24: 03334024 and $t0, $t9, $s3 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[8] = cpu->gpr[25] & cpu->gpr[19]; - PGXP_ALU(0x03334024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3EE28: 11000006 beq $t0, $zero, 0xBFC3EE44 */ - uint32_t psx_brA_BFC3EE28 = cpu->gpr[8]; uint32_t psx_brB_BFC3EE28 = cpu->gpr[0]; - psx_taken_BFC3EE28 = (psx_brA_BFC3EE28 == psx_brB_BFC3EE28); - psx_delay_BFC3EE28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EE2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056E2Cu); -#endif - if (psx_delay_BFC3EE28) { - psx_delay_BFC3EE28 = 0; - if (psx_taken_BFC3EE28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E44u); - goto label_BFC3EE44; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E30u); - } -label_BFC3EE30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E30u); -#endif - /* 0xBFC3EE30: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E30u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E30u); -#endif - /* 0xBFC3EE34: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E34u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E34u); -#endif - /* 0xBFC3EE38: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E38u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EE3C: 1000000C beq $zero, $zero, 0xBFC3EE70 */ - uint32_t psx_brA_BFC3EE3C = cpu->gpr[0]; uint32_t psx_brB_BFC3EE3C = cpu->gpr[0]; - psx_taken_BFC3EE3C = (psx_brA_BFC3EE3C == psx_brB_BFC3EE3C); - psx_delay_BFC3EE3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E40u); -#endif - /* 0xBFC3EE40: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E40u); -#endif - if (psx_delay_BFC3EE3C) { - psx_delay_BFC3EE3C = 0; - if (psx_taken_BFC3EE3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E70u); - goto label_BFC3EE70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E44u); - } -label_BFC3EE44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3EE44: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056E44u); -#endif - /* 0xBFC3EE48: 8D299BF4 lw $t1, -25612($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25612; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25612)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E48u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299BF4u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC3EE4C: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20202u); -#endif - /* 0xBFC3EE50: 0131082A slt $at, $t1, $s1 */ - { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (int32_t)cpu->gpr[17] ? 1 : 0); - PGXP_ALU(0x0131082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EE54: 1020FFE8 beq $at, $zero, 0xBFC3EDF8 */ - uint32_t psx_brA_BFC3EE54 = cpu->gpr[1]; uint32_t psx_brB_BFC3EE54 = cpu->gpr[0]; - psx_taken_BFC3EE54 = (psx_brA_BFC3EE54 == psx_brB_BFC3EE54); - psx_delay_BFC3EE54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC3EE58: 26100008 addiu $s0, $s0, 8 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (8)); - PGXP_ALU(0x26100008u, cpu->gpr[16], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80056E58u); -#endif - if (psx_delay_BFC3EE54) { - psx_delay_BFC3EE54 = 0; - if (psx_taken_BFC3EE54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056DF8u); - goto label_BFC3EDF8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E5Cu); - } -label_BFC3EE5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E5Cu); -#endif - /* 0xBFC3EE5C: 8FB0002C lw $s0, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E5Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB0002Cu, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E60u); -#endif - /* 0xBFC3EE60: 8FB20028 lw $s2, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E60u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20028u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E60u); -#endif - /* 0xBFC3EE64: 8FB30024 lw $s3, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E64u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30024u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EE68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056E68u); -#endif - /* 0xBFC3EE6C: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E6Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E6Cu); -#endif -label_BFC3EE70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E70u); -#endif - /* 0xBFC3EE70: 8FB10018 lw $s1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E70u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10018u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EE74: 03E00008 jr $ra */ - psx_delay_BFC3EE74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EE78: 27BD0038 addiu $sp, $sp, 56 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (56)); - PGXP_ALU(0x27BD0038u, cpu->gpr[29], _pgx1, 0x00000038u); } -#ifdef PSX_COSIM - cosim_instr(0x80056E78u); -#endif - if (psx_delay_BFC3EE74) { - psx_delay_BFC3EE74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EE80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EE80u); - int psx_delay_BFC3EEB0 = 0; - int psx_taken_BFC3EEB0 = 0; - int psx_delay_BFC3EEB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3EEA8u: goto label_BFC3EEA8; - case 0xBFC3EEB8u: goto label_BFC3EEB8; - default: break; - } - } -label_BFC3EE80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EE80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EE80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3EE80: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056E80u); -#endif - /* 0xBFC3EE84: 8DEF9C10 lw $t7, -25584($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E84u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C10u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3EE88: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3EE8C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3EE90: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056E90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E90u); -#endif - /* 0xBFC3EE94: 8F399C1C lw $t9, -25572($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25572)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056E94u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C1Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3EE98: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80056E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EE9C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3EEA0: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3EEA4: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056EA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EA4u); -#endif -label_BFC3EEA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EEA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EEA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC3EEA8: 24480003 addiu $t0, $v0, 3 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[2] + (3)); - PGXP_ALU(0x24480003u, cpu->gpr[8], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3EEAC: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3EEB0: 1443FFFD bne $v0, $v1, 0xBFC3EEA8 */ - uint32_t psx_brA_BFC3EEB0 = cpu->gpr[2]; uint32_t psx_brB_BFC3EEB0 = cpu->gpr[3]; - psx_taken_BFC3EEB0 = (psx_brA_BFC3EEB0 != psx_brB_BFC3EEB0); - psx_delay_BFC3EEB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3EEB4: AC080000 sw $t0, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056EB4u); return; } g_debug_last_store_pc = 0x80056EB4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC080000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EB4u); -#endif - if (psx_delay_BFC3EEB0) { - psx_delay_BFC3EEB0 = 0; - if (psx_taken_BFC3EEB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EA8u); - goto label_BFC3EEA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EB8u); - } -label_BFC3EEB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EEB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EEB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EEB8: 03E00008 jr $ra */ - psx_delay_BFC3EEB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EEBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056EBCu); -#endif - if (psx_delay_BFC3EEB8) { - psx_delay_BFC3EEB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EEC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EEC0u); - int psx_delay_BFC3EEDC = 0; -label_BFC3EEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3EEC0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056EC0u); -#endif - /* 0xBFC3EEC4: 8DEF9C10 lw $t7, -25584($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056EC4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C10u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3EEC8: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3EECC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3EED0: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056ED0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056ED0u); -#endif - /* 0xBFC3EED4: 8F399C18 lw $t9, -25576($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056ED4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C18u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3EED8: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80056ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EEDC: 03E00008 jr $ra */ - psx_delay_BFC3EEDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3EEE0: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056EE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EE0u); -#endif - if (psx_delay_BFC3EEDC) { - psx_delay_BFC3EEDC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EEE4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EEE4u); - int psx_delay_BFC3EF00 = 0; -label_BFC3EEE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EEE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EEE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3EEE4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056EE4u); -#endif - /* 0xBFC3EEE8: 8DEF9C10 lw $t7, -25584($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056EE8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C10u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3EEEC: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3EEF0: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC3EEF4: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056EF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EF4u); -#endif - /* 0xBFC3EEF8: 8F399C18 lw $t9, -25576($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25576; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25576)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056EF8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C18u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80056EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3EEFC: 24180018 addiu $t8, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24180018u, cpu->gpr[24], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80056EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EF00: 03E00008 jr $ra */ - psx_delay_BFC3EF00 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3EF04: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056F04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F04u); -#endif - if (psx_delay_BFC3EF00) { - psx_delay_BFC3EF00 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EF08(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EF08u); - int psx_delay_BFC3EF34 = 0; - int psx_taken_BFC3EF34 = 0; - int psx_delay_BFC3EF3C = 0; - int psx_delay_BFC3EF58 = 0; - int psx_taken_BFC3EF58 = 0; - int psx_delay_BFC3EF60 = 0; - int psx_taken_BFC3EF60 = 0; - int psx_delay_BFC3EF74 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3EF24u: goto label_BFC3EF24; - case 0xBFC3EF3Cu: goto label_BFC3EF3C; - case 0xBFC3EF44u: goto label_BFC3EF44; - case 0xBFC3EF60u: goto label_BFC3EF60; - case 0xBFC3EF68u: goto label_BFC3EF68; - case 0xBFC3EF6Cu: goto label_BFC3EF6C; - default: break; - } - } -label_BFC3EF08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3EF08: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3EF0C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EF10: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F10u); -#endif - /* 0xBFC3EF14: 8CA59C1C lw $a1, -25572($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25572)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F14u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C1Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F14u); -#endif - /* 0xBFC3EF18: 8C849C10 lw $a0, -25584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F18u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C10u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3EF1C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F1Cu); return; } g_debug_last_store_pc = 0x80056F1Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3EF20: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F20u); -#endif -label_BFC3EF24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3EF24: A0860000 sb $a2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056F24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F24u); -#endif - /* 0xBFC3EF28: 90A20000 lbu $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x90A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EF2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3EF30: 30430007 andi $v1, $v0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7u; - PGXP_ALU(0x30430007u, cpu->gpr[3], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3EF34: 1060FFFB beq $v1, $zero, 0xBFC3EF24 */ - uint32_t psx_brA_BFC3EF34 = cpu->gpr[3]; uint32_t psx_brB_BFC3EF34 = cpu->gpr[0]; - psx_taken_BFC3EF34 = (psx_brA_BFC3EF34 == psx_brB_BFC3EF34); - psx_delay_BFC3EF34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EF38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056F38u); -#endif - if (psx_delay_BFC3EF34) { - psx_delay_BFC3EF34 = 0; - if (psx_taken_BFC3EF34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F24u); - goto label_BFC3EF24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F3Cu); - } -label_BFC3EF3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EF3C: 0C015BA0 jal 0xB0056E80 */ - cpu->gpr[31] = 0x80056F44u; /* jal link before delay slot */ - psx_delay_BFC3EF3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3EF40: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F40u); return; } g_debug_last_store_pc = 0x80056F40u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F40u); -#endif - if (psx_delay_BFC3EF3C) { - psx_delay_BFC3EF3C = 0; - cpu->gpr[31] = 0x80056F44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E80u); - cpu->pc = 0x80056E80u; return; - } -label_BFC3EF44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EF44: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056F44u); -#endif - /* 0xBFC3EF48: 8DCE9C14 lw $t6, -25580($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F48u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C14u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F48u); -#endif - /* 0xBFC3EF4C: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F4Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EF50: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F50u); -#endif - /* 0xBFC3EF54: 91C40000 lbu $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 4, 0x4000u); - PGXP_LOAD(0x91C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3EF58: 14610004 bne $v1, $at, 0xBFC3EF6C */ - uint32_t psx_brA_BFC3EF58 = cpu->gpr[3]; uint32_t psx_brB_BFC3EF58 = cpu->gpr[1]; - psx_taken_BFC3EF58 = (psx_brA_BFC3EF58 != psx_brB_BFC3EF58); - psx_delay_BFC3EF58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3EF5C: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056F5Cu); -#endif - if (psx_delay_BFC3EF58) { - psx_delay_BFC3EF58 = 0; - if (psx_taken_BFC3EF58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F6Cu); - goto label_BFC3EF6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F60u); - } -label_BFC3EF60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EF60: 10000002 beq $zero, $zero, 0xBFC3EF6C */ - uint32_t psx_brA_BFC3EF60 = cpu->gpr[0]; uint32_t psx_brB_BFC3EF60 = cpu->gpr[0]; - psx_taken_BFC3EF60 = (psx_brA_BFC3EF60 == psx_brB_BFC3EF60); - psx_delay_BFC3EF60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EF64: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056F64u); -#endif - if (psx_delay_BFC3EF60) { - psx_delay_BFC3EF60 = 0; - if (psx_taken_BFC3EF60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F6Cu); - goto label_BFC3EF6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F68u); - } -label_BFC3EF68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3EF68: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056F68u); -#endif -label_BFC3EF6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F6Cu); -#endif - /* 0xBFC3EF6C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F6Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EF70: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EF74: 03E00008 jr $ra */ - psx_delay_BFC3EF74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EF78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056F78u); -#endif - if (psx_delay_BFC3EF74) { - psx_delay_BFC3EF74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EF7C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EF7Cu); - int psx_delay_BFC3EFA8 = 0; - int psx_taken_BFC3EFA8 = 0; - int psx_delay_BFC3EFB0 = 0; - int psx_delay_BFC3EFCC = 0; - int psx_taken_BFC3EFCC = 0; - int psx_delay_BFC3EFD4 = 0; - int psx_taken_BFC3EFD4 = 0; - int psx_delay_BFC3EFE8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3EF98u: goto label_BFC3EF98; - case 0xBFC3EFB0u: goto label_BFC3EFB0; - case 0xBFC3EFB8u: goto label_BFC3EFB8; - case 0xBFC3EFD4u: goto label_BFC3EFD4; - case 0xBFC3EFDCu: goto label_BFC3EFDC; - case 0xBFC3EFE0u: goto label_BFC3EFE0; - default: break; - } - } -label_BFC3EF7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3EF7C: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3EF80: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EF84: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F84u); -#endif - /* 0xBFC3EF88: 8CA59C1C lw $a1, -25572($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25572; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25572)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F88u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C1Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F88u); -#endif - /* 0xBFC3EF8C: 8C849C10 lw $a0, -25584($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F8Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C10u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3EF90: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056F90u); return; } g_debug_last_store_pc = 0x80056F90u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3EF94: 24060001 addiu $a2, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24060001u, cpu->gpr[6], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80056F94u); -#endif -label_BFC3EF98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EF98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EF98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC3EF98: A0860000 sb $a2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80056F98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA0860000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F98u); -#endif - /* 0xBFC3EF9C: 90A20000 lbu $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 2, 0x20u); - PGXP_LOAD(0x90A20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80056F9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EFA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3EFA4: 30430007 andi $v1, $v0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7u; - PGXP_ALU(0x30430007u, cpu->gpr[3], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x80056FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3EFA8: 1060FFFB beq $v1, $zero, 0xBFC3EF98 */ - uint32_t psx_brA_BFC3EFA8 = cpu->gpr[3]; uint32_t psx_brB_BFC3EFA8 = cpu->gpr[0]; - psx_taken_BFC3EFA8 = (psx_brA_BFC3EFA8 == psx_brB_BFC3EFA8); - psx_delay_BFC3EFA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EFAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056FACu); -#endif - if (psx_delay_BFC3EFA8) { - psx_delay_BFC3EFA8 = 0; - if (psx_taken_BFC3EFA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F98u); - goto label_BFC3EF98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FB0u); - } -label_BFC3EFB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EFB0: 0C015BA0 jal 0xB0056E80 */ - cpu->gpr[31] = 0x80056FB8u; /* jal link before delay slot */ - psx_delay_BFC3EFB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3EFB4: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056FB4u); return; } g_debug_last_store_pc = 0x80056FB4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FB4u); -#endif - if (psx_delay_BFC3EFB0) { - psx_delay_BFC3EFB0 = 0; - cpu->gpr[31] = 0x80056FB8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056E80u); - cpu->pc = 0x80056E80u; return; - } -label_BFC3EFB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3EFB8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80056FB8u); -#endif - /* 0xBFC3EFBC: 8DCE9C14 lw $t6, -25580($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056FBCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C14u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FC0u); -#endif - /* 0xBFC3EFC0: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056FC0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3EFC4: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80056FC4u); -#endif - /* 0xBFC3EFC8: 91C40000 lbu $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 4, 0x4000u); - PGXP_LOAD(0x91C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3EFCC: 14610004 bne $v1, $at, 0xBFC3EFE0 */ - uint32_t psx_brA_BFC3EFCC = cpu->gpr[3]; uint32_t psx_brB_BFC3EFCC = cpu->gpr[1]; - psx_taken_BFC3EFCC = (psx_brA_BFC3EFCC != psx_brB_BFC3EFCC); - psx_delay_BFC3EFCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3EFD0: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056FD0u); -#endif - if (psx_delay_BFC3EFCC) { - psx_delay_BFC3EFCC = 0; - if (psx_taken_BFC3EFCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FE0u); - goto label_BFC3EFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FD4u); - } -label_BFC3EFD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EFD4: 10000002 beq $zero, $zero, 0xBFC3EFE0 */ - uint32_t psx_brA_BFC3EFD4 = cpu->gpr[0]; uint32_t psx_brB_BFC3EFD4 = cpu->gpr[0]; - psx_taken_BFC3EFD4 = (psx_brA_BFC3EFD4 == psx_brB_BFC3EFD4); - psx_delay_BFC3EFD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3EFD8: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80056FD8u); -#endif - if (psx_delay_BFC3EFD4) { - psx_delay_BFC3EFD4 = 0; - if (psx_taken_BFC3EFD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FE0u); - goto label_BFC3EFE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056FDCu); - } -label_BFC3EFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3EFDC: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80056FDCu); -#endif -label_BFC3EFE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FE0u); -#endif - /* 0xBFC3EFE0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056FE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EFE4: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80056FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3EFE8: 03E00008 jr $ra */ - psx_delay_BFC3EFE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EFEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056FECu); -#endif - if (psx_delay_BFC3EFE8) { - psx_delay_BFC3EFE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3EFF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3EFF0u); - int psx_delay_BFC3EFF8 = 0; - int psx_delay_BFC3F018 = 0; - int psx_delay_BFC3F020 = 0; - int psx_taken_BFC3F020 = 0; - int psx_delay_BFC3F028 = 0; - int psx_delay_BFC3F030 = 0; - int psx_taken_BFC3F030 = 0; - int psx_delay_BFC3F038 = 0; - int psx_delay_BFC3F040 = 0; - int psx_taken_BFC3F040 = 0; - int psx_delay_BFC3F048 = 0; - int psx_delay_BFC3F050 = 0; - int psx_taken_BFC3F050 = 0; - int psx_delay_BFC3F05C = 0; - int psx_taken_BFC3F05C = 0; - int psx_delay_BFC3F064 = 0; - int psx_delay_BFC3F06C = 0; - int psx_taken_BFC3F06C = 0; - int psx_delay_BFC3F074 = 0; - int psx_delay_BFC3F088 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F000u: goto label_BFC3F000; - case 0xBFC3F020u: goto label_BFC3F020; - case 0xBFC3F028u: goto label_BFC3F028; - case 0xBFC3F030u: goto label_BFC3F030; - case 0xBFC3F038u: goto label_BFC3F038; - case 0xBFC3F040u: goto label_BFC3F040; - case 0xBFC3F048u: goto label_BFC3F048; - case 0xBFC3F050u: goto label_BFC3F050; - case 0xBFC3F058u: goto label_BFC3F058; - case 0xBFC3F05Cu: goto label_BFC3F05C; - case 0xBFC3F064u: goto label_BFC3F064; - case 0xBFC3F06Cu: goto label_BFC3F06C; - case 0xBFC3F074u: goto label_BFC3F074; - case 0xBFC3F07Cu: goto label_BFC3F07C; - case 0xBFC3F080u: goto label_BFC3F080; - default: break; - } - } -label_BFC3EFF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3EFF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3EFF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80056FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3EFF0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80056FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3EFF4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80056FF4u); return; } g_debug_last_store_pc = 0x80056FF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80056FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3EFF8: 0C015BB9 jal 0xB0056EE4 */ - cpu->gpr[31] = 0x80057000u; /* jal link before delay slot */ - psx_delay_BFC3EFF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3EFFC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80056FFCu); -#endif - if (psx_delay_BFC3EFF8) { - psx_delay_BFC3EFF8 = 0; - cpu->gpr[31] = 0x80057000u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EE4u); - cpu->pc = 0x80056EE4u; return; - } -label_BFC3F000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F000u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F000: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057000u); -#endif - /* 0xBFC3F004: 8DCE9C10 lw $t6, -25584($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25584; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25584)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057004u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C10u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3F008: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3F00C: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005700Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005700Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057010u); -#endif - /* 0xBFC3F010: 8F189C14 lw $t8, -25580($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25580; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25580)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057010u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C14u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F014: 240F001E addiu $t7, $zero, 30 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (30)); - PGXP_ALU(0x240F001Eu, cpu->gpr[15], _pgx1, 0x0000001Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80057014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F018: 0C015BC2 jal 0xB0056F08 */ - cpu->gpr[31] = 0x80057020u; /* jal link before delay slot */ - psx_delay_BFC3F018 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3F01C: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005701Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005701Cu); -#endif - if (psx_delay_BFC3F018) { - psx_delay_BFC3F018 = 0; - cpu->gpr[31] = 0x80057020u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F08u); - cpu->pc = 0x80056F08u; return; - } -label_BFC3F020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3F020: 04410005 bgez $v0, 0xBFC3F038 */ - uint32_t psx_brA_BFC3F020 = cpu->gpr[2]; - psx_taken_BFC3F020 = ((int32_t)psx_brA_BFC3F020 >= 0); - psx_delay_BFC3F020 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F024: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057024u); -#endif - if (psx_delay_BFC3F020) { - psx_delay_BFC3F020 = 0; - if (psx_taken_BFC3F020) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057038u); - goto label_BFC3F038; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057028u); - } -label_BFC3F028: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F028u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F028: 0C015BB0 jal 0xB0056EC0 */ - cpu->gpr[31] = 0x80057030u; /* jal link before delay slot */ - psx_delay_BFC3F028 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F02C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005702Cu); -#endif - if (psx_delay_BFC3F028) { - psx_delay_BFC3F028 = 0; - cpu->gpr[31] = 0x80057030u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EC0u); - cpu->pc = 0x80056EC0u; return; - } -label_BFC3F030: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F030u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F030: 10000013 beq $zero, $zero, 0xBFC3F080 */ - uint32_t psx_brA_BFC3F030 = cpu->gpr[0]; uint32_t psx_brB_BFC3F030 = cpu->gpr[0]; - psx_taken_BFC3F030 = (psx_brA_BFC3F030 == psx_brB_BFC3F030); - psx_delay_BFC3F030 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F034: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057034u); -#endif - if (psx_delay_BFC3F030) { - psx_delay_BFC3F030 = 0; - if (psx_taken_BFC3F030) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057080u); - goto label_BFC3F080; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057038u); - } -label_BFC3F038: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F038u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F038: 0C015BDF jal 0xB0056F7C */ - cpu->gpr[31] = 0x80057040u; /* jal link before delay slot */ - psx_delay_BFC3F038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F03C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005703Cu); -#endif - if (psx_delay_BFC3F038) { - psx_delay_BFC3F038 = 0; - cpu->gpr[31] = 0x80057040u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056F7Cu); - cpu->pc = 0x80056F7Cu; return; - } -label_BFC3F040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3F040: 04410006 bgez $v0, 0xBFC3F05C */ - uint32_t psx_brA_BFC3F040 = cpu->gpr[2]; - psx_taken_BFC3F040 = ((int32_t)psx_brA_BFC3F040 >= 0); - psx_delay_BFC3F040 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3F044: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0x80057044u); -#endif - if (psx_delay_BFC3F040) { - psx_delay_BFC3F040 = 0; - if (psx_taken_BFC3F040) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005705Cu); - goto label_BFC3F05C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057048u); - } -label_BFC3F048: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F048u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F048: 0C015BB0 jal 0xB0056EC0 */ - cpu->gpr[31] = 0x80057050u; /* jal link before delay slot */ - psx_delay_BFC3F048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F04C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005704Cu); -#endif - if (psx_delay_BFC3F048) { - psx_delay_BFC3F048 = 0; - cpu->gpr[31] = 0x80057050u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EC0u); - cpu->pc = 0x80056EC0u; return; - } -label_BFC3F050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F050: 1000000B beq $zero, $zero, 0xBFC3F080 */ - uint32_t psx_brA_BFC3F050 = cpu->gpr[0]; uint32_t psx_brB_BFC3F050 = cpu->gpr[0]; - psx_taken_BFC3F050 = (psx_brA_BFC3F050 == psx_brB_BFC3F050); - psx_delay_BFC3F050 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F054: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057054u); -#endif - if (psx_delay_BFC3F050) { - psx_delay_BFC3F050 = 0; - if (psx_taken_BFC3F050) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057080u); - goto label_BFC3F080; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057058u); - } -label_BFC3F058: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F058u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC3F058: 3059001D andi $t9, $v0, 0x1D */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[2] & 0x1Du; - PGXP_ALU(0x3059001Du, cpu->gpr[25], _pgx1, 0x001Du); } -#ifdef PSX_COSIM - cosim_instr(0x80057058u); -#endif -label_BFC3F05C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F05Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F05Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005705Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F05C: 13200005 beq $t9, $zero, 0xBFC3F074 */ - uint32_t psx_brA_BFC3F05C = cpu->gpr[25]; uint32_t psx_brB_BFC3F05C = cpu->gpr[0]; - psx_taken_BFC3F05C = (psx_brA_BFC3F05C == psx_brB_BFC3F05C); - psx_delay_BFC3F05C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F060: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057060u); -#endif - if (psx_delay_BFC3F05C) { - psx_delay_BFC3F05C = 0; - if (psx_taken_BFC3F05C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057074u); - goto label_BFC3F074; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057064u); - } -label_BFC3F064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F064: 0C015BB0 jal 0xB0056EC0 */ - cpu->gpr[31] = 0x8005706Cu; /* jal link before delay slot */ - psx_delay_BFC3F064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057068u); -#endif - if (psx_delay_BFC3F064) { - psx_delay_BFC3F064 = 0; - cpu->gpr[31] = 0x8005706Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EC0u); - cpu->pc = 0x80056EC0u; return; - } -label_BFC3F06C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F06Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005706Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F06C: 10000004 beq $zero, $zero, 0xBFC3F080 */ - uint32_t psx_brA_BFC3F06C = cpu->gpr[0]; uint32_t psx_brB_BFC3F06C = cpu->gpr[0]; - psx_taken_BFC3F06C = (psx_brA_BFC3F06C == psx_brB_BFC3F06C); - psx_delay_BFC3F06C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F070: 2402FFFF addiu $v0, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x2402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057070u); -#endif - if (psx_delay_BFC3F06C) { - psx_delay_BFC3F06C = 0; - if (psx_taken_BFC3F06C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057080u); - goto label_BFC3F080; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057074u); - } -label_BFC3F074: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F074u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F074: 0C015BB0 jal 0xB0056EC0 */ - cpu->gpr[31] = 0x8005707Cu; /* jal link before delay slot */ - psx_delay_BFC3F074 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F078: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057078u); -#endif - if (psx_delay_BFC3F074) { - psx_delay_BFC3F074 = 0; - cpu->gpr[31] = 0x8005707Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80056EC0u); - cpu->pc = 0x80056EC0u; return; - } -label_BFC3F07C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F07Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F07Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005707Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F07C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005707Cu); -#endif -label_BFC3F080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057080u); -#endif - /* 0xBFC3F080: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057080u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F084: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F088: 03E00008 jr $ra */ - psx_delay_BFC3F088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F08C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005708Cu); -#endif - if (psx_delay_BFC3F088) { - psx_delay_BFC3F088 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F090(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F090u); - int psx_delay_BFC3F138 = 0; - int psx_delay_BFC3F148 = 0; - int psx_delay_BFC3F17C = 0; - int psx_delay_BFC3F194 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F140u: goto label_BFC3F140; - case 0xBFC3F150u: goto label_BFC3F150; - case 0xBFC3F184u: goto label_BFC3F184; - default: break; - } - } -label_BFC3F090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F090: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F094: AC20EEA8 sw $zero, -4440($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057094u); return; } g_debug_last_store_pc = 0x80057094u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EEA8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F098: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F09C: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005709Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F0A0: AC20EEAC sw $zero, -4436($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4436; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4436)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570A0u); return; } g_debug_last_store_pc = 0x800570A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EEACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800570A0u); -#endif - /* 0xBFC3F0A4: 8C639C44 lw $v1, -25532($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800570A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F0A8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800570A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F0AC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800570ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F0B0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570B0u); return; } g_debug_last_store_pc = 0x800570B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800570B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F0B4: AC20EEB0 sw $zero, -4432($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4432; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4432)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570B4u); return; } g_debug_last_store_pc = 0x800570B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EEB0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800570B4u); -#endif - /* 0xBFC3F0B8: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800570B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3F0BC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800570BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC3F0C0: 2406FFFB addiu $a2, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x2406FFFBu, cpu->gpr[6], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x800570C0u); -#endif - /* 0xBFC3F0C4: 8C849C3C lw $a0, -25540($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C3Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800570C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC040u); -#endif - /* 0xBFC3F0C8: 01C67824 and $t7, $t6, $a2 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[6]; - PGXP_ALU(0x01C67824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800570C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3F0CC: AC6F0004 sw $t7, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570CCu); return; } g_debug_last_store_pc = 0x800570CCu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC6F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800570CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570D0u); -#endif - /* 0xBFC3F0D0: 8C780004 lw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570D0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800570D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC3F0D4: 2405FFF7 addiu $a1, $zero, -9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); - PGXP_ALU(0x2405FFF7u, cpu->gpr[5], _pgx1, 0xFFFFFFF7u); } -#ifdef PSX_COSIM - cosim_instr(0x800570D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000020u); -#endif - /* 0xBFC3F0D8: 0305C824 and $t9, $t8, $a1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[5]; - PGXP_ALU(0x0305C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800570D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC3F0DC: AC790004 sw $t9, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570DCu); return; } g_debug_last_store_pc = 0x800570DCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC790004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800570DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC3F0E0: AC660000 sw $a2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570E0u); return; } g_debug_last_store_pc = 0x800570E0u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC660000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800570E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3F0E4: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800570E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC3F0E8: AC650000 sw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570E8u); return; } g_debug_last_store_pc = 0x800570E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800570E8u); -#endif - /* 0xBFC3F0EC: 8D299C38 lw $t1, -25544($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570ECu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299C38u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800570ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800570F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3F0F0: 34089099 ori $t0, $zero, 0x9099 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] | 0x9099u; - PGXP_ALU(0x34089099u, cpu->gpr[8], _pgx1, 0x9099u); } -#ifdef PSX_COSIM - cosim_instr(0x800570F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3F0F4: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570F4u); return; } g_debug_last_store_pc = 0x800570F4u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800570F4u); -#endif - /* 0xBFC3F0F8: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800570F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800570F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F0FC: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800570FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F100: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3F104: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F108: 3C018800 lui $at, 0x8800 */ - cpu->gpr[1] = 0x88000000u; - PGXP_ALU(0x3C018800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3F10C: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005710Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F110: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3F114: 340AFFFF ori $t2, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3F118: AC820000 sw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057118u); return; } g_debug_last_store_pc = 0x80057118u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC3F11C: AC2AEE58 sw $t2, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005711Cu); return; } g_debug_last_store_pc = 0x8005711Cu; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AEE58u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005711Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F120: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3F124: 240B0CCC addiu $t3, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x240B0CCCu, cpu->gpr[11], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80057124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3F128: AC2BEE54 sw $t3, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057128u); return; } g_debug_last_store_pc = 0x80057128u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BEE54u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80057128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F12C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005712Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F130: AC20EE60 sw $zero, -4512($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057130u); return; } g_debug_last_store_pc = 0x80057130u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F134: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F138: 0C0161D1 jal 0xB0058744 */ - cpu->gpr[31] = 0x80057140u; /* jal link before delay slot */ - psx_delay_BFC3F138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F13C: AC20EE5C sw $zero, -4516($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005713Cu); return; } g_debug_last_store_pc = 0x8005713Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005713Cu); -#endif - if (psx_delay_BFC3F138) { - psx_delay_BFC3F138 = 0; - cpu->gpr[31] = 0x80057140u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058744u); - cpu->pc = 0x80058744u; return; - } -label_BFC3F140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F140: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057140u); -#endif - /* 0xBFC3F144: 8C639C44 lw $v1, -25532($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057144u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F148: 0C0161C8 jal 0xB0058720 */ - cpu->gpr[31] = 0x80057150u; /* jal link before delay slot */ - psx_delay_BFC3F148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F14C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005714Cu); -#endif - if (psx_delay_BFC3F148) { - psx_delay_BFC3F148 = 0; - cpu->gpr[31] = 0x80057150u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058720u); - cpu->pc = 0x80058720u; return; - } -label_BFC3F150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F150: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057150u); -#endif - /* 0xBFC3F154: 8C639C44 lw $v1, -25532($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057154u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C44u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3F158: 240CFFFB addiu $t4, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x240CFFFBu, cpu->gpr[12], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC3F15C: AC6C0000 sw $t4, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005715Cu); return; } g_debug_last_store_pc = 0x8005715Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005715Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057160u); -#endif - /* 0xBFC3F160: 8C6D0004 lw $t5, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057160u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0004u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80057160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F164: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3F168: 35AE0004 ori $t6, $t5, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] | 0x4u; - PGXP_ALU(0x35AE0004u, cpu->gpr[14], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC3F16C: AC6E0004 sw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005716Cu); return; } g_debug_last_store_pc = 0x8005716Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005716Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057170u); -#endif - /* 0xBFC3F170: 8C6F0004 lw $t7, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057170u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F174: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3F178: 35F80008 ori $t8, $t7, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] | 0x8u; - PGXP_ALU(0x35F80008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F17C: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x80057184u; /* jal link before delay slot */ - psx_delay_BFC3F17C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3F180: AC780004 sw $t8, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057180u); return; } g_debug_last_store_pc = 0x80057180u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780004u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057180u); -#endif - if (psx_delay_BFC3F17C) { - psx_delay_BFC3F17C = 0; - cpu->gpr[31] = 0x80057184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC3F184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057184u); -#endif - /* 0xBFC3F184: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057184u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F188: 3419FFFF ori $t9, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F18C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005718Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC3F190: AC39EE54 sw $t9, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057190u); return; } g_debug_last_store_pc = 0x80057190u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39EE54u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F194: 03E00008 jr $ra */ - psx_delay_BFC3F194 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F198: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057198u); -#endif - if (psx_delay_BFC3F194) { - psx_delay_BFC3F194 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F19C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F19Cu); - int psx_delay_BFC3F1B0 = 0; -label_BFC3F19C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F19Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005719Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F19C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005719Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571A0u); -#endif - /* 0xBFC3F1A0: 91CEEEA0 lbu $t6, -4448($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4448; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4448)), 14, 0x4000u); - PGXP_LOAD(0x91CEEEA0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800571A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F1A4: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800571A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3F1A8: A08E0000 sb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800571A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800571A8u); -#endif - /* 0xBFC3F1AC: 91EFEEA1 lbu $t7, -4447($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4447; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-4447)), 15, 0x8000u); - PGXP_LOAD(0x91EFEEA1u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800571ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F1B0: 03E00008 jr $ra */ - psx_delay_BFC3F1B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC3F1B4: A0AF0000 sb $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800571B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA0AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800571B4u); -#endif - if (psx_delay_BFC3F1B0) { - psx_delay_BFC3F1B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F1B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F1B8u); - int psx_delay_BFC3F1C0 = 0; - int psx_taken_BFC3F1C0 = 0; - int psx_delay_BFC3F1D4 = 0; - int psx_taken_BFC3F1D4 = 0; - int psx_delay_BFC3F1DC = 0; - int psx_taken_BFC3F1DC = 0; - int psx_delay_BFC3F1E4 = 0; - int psx_taken_BFC3F1E4 = 0; - int psx_delay_BFC3F1F8 = 0; - int psx_taken_BFC3F1F8 = 0; - int psx_delay_BFC3F200 = 0; - int psx_taken_BFC3F200 = 0; - int psx_delay_BFC3F208 = 0; - int psx_taken_BFC3F208 = 0; - int psx_delay_BFC3F228 = 0; - int psx_taken_BFC3F228 = 0; - int psx_delay_BFC3F230 = 0; - int psx_taken_BFC3F230 = 0; - int psx_delay_BFC3F238 = 0; - int psx_taken_BFC3F238 = 0; - int psx_delay_BFC3F240 = 0; - int psx_taken_BFC3F240 = 0; - int psx_delay_BFC3F24C = 0; - int psx_delay_BFC3F2AC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F1C8u: goto label_BFC3F1C8; - case 0xBFC3F1DCu: goto label_BFC3F1DC; - case 0xBFC3F1E4u: goto label_BFC3F1E4; - case 0xBFC3F1ECu: goto label_BFC3F1EC; - case 0xBFC3F200u: goto label_BFC3F200; - case 0xBFC3F208u: goto label_BFC3F208; - case 0xBFC3F210u: goto label_BFC3F210; - case 0xBFC3F230u: goto label_BFC3F230; - case 0xBFC3F238u: goto label_BFC3F238; - case 0xBFC3F240u: goto label_BFC3F240; - case 0xBFC3F244u: goto label_BFC3F244; - case 0xBFC3F248u: goto label_BFC3F248; - case 0xBFC3F24Cu: goto label_BFC3F24C; - case 0xBFC3F254u: goto label_BFC3F254; - case 0xBFC3F2A4u: goto label_BFC3F2A4; - default: break; - } - } -label_BFC3F1B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F1B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F1B8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800571B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F1BC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800571BCu); return; } g_debug_last_store_pc = 0x800571BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800571BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F1C0: 1000000A beq $zero, $zero, 0xBFC3F1EC */ - uint32_t psx_brA_BFC3F1C0 = cpu->gpr[0]; uint32_t psx_brB_BFC3F1C0 = cpu->gpr[0]; - psx_taken_BFC3F1C0 = (psx_brA_BFC3F1C0 == psx_brB_BFC3F1C0); - psx_delay_BFC3F1C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3F1C4: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800571C4u); -#endif - if (psx_delay_BFC3F1C0) { - psx_delay_BFC3F1C0 = 0; - if (psx_taken_BFC3F1C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571ECu); - goto label_BFC3F1EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571C8u); - } -label_BFC3F1C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F1C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F1C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F1C8: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800571C8u); -#endif - /* 0xBFC3F1CC: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800571CCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800571CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F1D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800571D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3F1D4: 15C0000E bne $t6, $zero, 0xBFC3F210 */ - uint32_t psx_brA_BFC3F1D4 = cpu->gpr[14]; uint32_t psx_brB_BFC3F1D4 = cpu->gpr[0]; - psx_taken_BFC3F1D4 = (psx_brA_BFC3F1D4 != psx_brB_BFC3F1D4); - psx_delay_BFC3F1D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F1D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800571D8u); -#endif - if (psx_delay_BFC3F1D4) { - psx_delay_BFC3F1D4 = 0; - if (psx_taken_BFC3F1D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057210u); - goto label_BFC3F210; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571DCu); - } -label_BFC3F1DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F1DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F1DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F1DC: 10000031 beq $zero, $zero, 0xBFC3F2A4 */ - uint32_t psx_brA_BFC3F1DC = cpu->gpr[0]; uint32_t psx_brB_BFC3F1DC = cpu->gpr[0]; - psx_taken_BFC3F1DC = (psx_brA_BFC3F1DC == psx_brB_BFC3F1DC); - psx_delay_BFC3F1DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F1E0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800571E0u); -#endif - if (psx_delay_BFC3F1DC) { - psx_delay_BFC3F1DC = 0; - if (psx_taken_BFC3F1DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572A4u); - goto label_BFC3F2A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571E4u); - } -label_BFC3F1E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F1E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F1E4: 1000002F beq $zero, $zero, 0xBFC3F2A4 */ - uint32_t psx_brA_BFC3F1E4 = cpu->gpr[0]; uint32_t psx_brB_BFC3F1E4 = cpu->gpr[0]; - psx_taken_BFC3F1E4 = (psx_brA_BFC3F1E4 == psx_brB_BFC3F1E4); - psx_delay_BFC3F1E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F1E8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800571E8u); -#endif - if (psx_delay_BFC3F1E4) { - psx_delay_BFC3F1E4 = 0; - if (psx_taken_BFC3F1E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572A4u); - goto label_BFC3F2A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571ECu); - } -label_BFC3F1EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F1ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3F1EC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800571ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800571F0u); -#endif - /* 0xBFC3F1F0: 8C84EE54 lw $a0, -4524($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800571F0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800571F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F1F4: 240300E6 addiu $v1, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240300E6u, cpu->gpr[3], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x800571F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3F1F8: 1083FFF3 beq $a0, $v1, 0xBFC3F1C8 */ - uint32_t psx_brA_BFC3F1F8 = cpu->gpr[4]; uint32_t psx_brB_BFC3F1F8 = cpu->gpr[3]; - psx_taken_BFC3F1F8 = (psx_brA_BFC3F1F8 == psx_brB_BFC3F1F8); - psx_delay_BFC3F1F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F1FC: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800571FCu); -#endif - if (psx_delay_BFC3F1F8) { - psx_delay_BFC3F1F8 = 0; - if (psx_taken_BFC3F1F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571C8u); - goto label_BFC3F1C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057200u); - } -label_BFC3F200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F200: 1081FFF1 beq $a0, $at, 0xBFC3F1C8 */ - uint32_t psx_brA_BFC3F200 = cpu->gpr[4]; uint32_t psx_brB_BFC3F200 = cpu->gpr[1]; - psx_taken_BFC3F200 = (psx_brA_BFC3F200 == psx_brB_BFC3F200); - psx_delay_BFC3F200 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F204: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057204u); -#endif - if (psx_delay_BFC3F200) { - psx_delay_BFC3F200 = 0; - if (psx_taken_BFC3F200) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571C8u); - goto label_BFC3F1C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057208u); - } -label_BFC3F208: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F208u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057208u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F208: 1481FFF6 bne $a0, $at, 0xBFC3F1E4 */ - uint32_t psx_brA_BFC3F208 = cpu->gpr[4]; uint32_t psx_brB_BFC3F208 = cpu->gpr[1]; - psx_taken_BFC3F208 = (psx_brA_BFC3F208 != psx_brB_BFC3F208); - psx_delay_BFC3F208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F20C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005720Cu); -#endif - if (psx_delay_BFC3F208) { - psx_delay_BFC3F208 = 0; - if (psx_taken_BFC3F208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800571E4u); - goto label_BFC3F1E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057210u); - } -label_BFC3F210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F210: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057210u); -#endif - /* 0xBFC3F214: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057214u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F218: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057218u); -#endif - /* 0xBFC3F21C: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005721Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F220: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3F224: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F228: 13010003 beq $t8, $at, 0xBFC3F238 */ - uint32_t psx_brA_BFC3F228 = cpu->gpr[24]; uint32_t psx_brB_BFC3F228 = cpu->gpr[1]; - psx_taken_BFC3F228 = (psx_brA_BFC3F228 == psx_brB_BFC3F228); - psx_delay_BFC3F228 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F22C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005722Cu); -#endif - if (psx_delay_BFC3F228) { - psx_delay_BFC3F228 = 0; - if (psx_taken_BFC3F228) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057238u); - goto label_BFC3F238; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057230u); - } -label_BFC3F230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F230: 1000001C beq $zero, $zero, 0xBFC3F2A4 */ - uint32_t psx_brA_BFC3F230 = cpu->gpr[0]; uint32_t psx_brB_BFC3F230 = cpu->gpr[0]; - psx_taken_BFC3F230 = (psx_brA_BFC3F230 == psx_brB_BFC3F230); - psx_delay_BFC3F230 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F234: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057234u); -#endif - if (psx_delay_BFC3F230) { - psx_delay_BFC3F230 = 0; - if (psx_taken_BFC3F230) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572A4u); - goto label_BFC3F2A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057238u); - } -label_BFC3F238: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F238u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3F238: 10830002 beq $a0, $v1, 0xBFC3F244 */ - uint32_t psx_brA_BFC3F238 = cpu->gpr[4]; uint32_t psx_brB_BFC3F238 = cpu->gpr[3]; - psx_taken_BFC3F238 = (psx_brA_BFC3F238 == psx_brB_BFC3F238); - psx_delay_BFC3F238 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F23C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x8005723Cu); -#endif - if (psx_delay_BFC3F238) { - psx_delay_BFC3F238 = 0; - if (psx_taken_BFC3F238) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057244u); - goto label_BFC3F244; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057240u); - } -label_BFC3F240: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F240u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F240: 14810002 bne $a0, $at, 0xBFC3F24C */ - uint32_t psx_brA_BFC3F240 = cpu->gpr[4]; uint32_t psx_brB_BFC3F240 = cpu->gpr[1]; - psx_taken_BFC3F240 = (psx_brA_BFC3F240 != psx_brB_BFC3F240); - psx_delay_BFC3F240 = 1; -label_BFC3F244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F244: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057244u); -#endif - if (psx_delay_BFC3F240) { - psx_delay_BFC3F240 = 0; - if (psx_taken_BFC3F240) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005724Cu); - goto label_BFC3F24C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057248u); - } -label_BFC3F248: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F248u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F248: AC24EE58 sw $a0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057248u); return; } g_debug_last_store_pc = 0x80057248u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE58u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057248u); -#endif -label_BFC3F24C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F24Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F24Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005724Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F24C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057254u; /* jal link before delay slot */ - psx_delay_BFC3F24C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3F250: AFA50018 sw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057250u); return; } g_debug_last_store_pc = 0x80057250u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057250u); -#endif - if (psx_delay_BFC3F24C) { - psx_delay_BFC3F24C = 0; - cpu->gpr[31] = 0x80057254u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F254: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F254u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3F254: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057254u); -#endif - /* 0xBFC3F258: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057258u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057258u); -#endif - /* 0xBFC3F25C: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005725Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005725Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F260: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057260u); -#endif - /* 0xBFC3F264: 8C639C30 lw $v1, -25552($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057264u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C30u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F268: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057268u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057268u); -#endif - /* 0xBFC3F26C: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005726Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3F270: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3F274: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057274u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057274u); -#endif - /* 0xBFC3F278: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3F27C: 240B0002 addiu $t3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240B0002u, cpu->gpr[11], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005727Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3F280: A0690000 sb $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057280u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057280u); -#endif - /* 0xBFC3F284: 90AA0002 lbu $t2, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 10, 0x20u); - PGXP_LOAD(0x90AA0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3F288: 240400F2 addiu $a0, $zero, 242 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); - PGXP_ALU(0x240400F2u, cpu->gpr[4], _pgx1, 0x000000F2u); } -#ifdef PSX_COSIM - cosim_instr(0x80057288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC3F28C: A06A0000 sb $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005728Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA06A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005728Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057290u); -#endif - /* 0xBFC3F290: 8D8C9C2C lw $t4, -25556($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057290u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9C2Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80057290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F294: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3F298: A18B0000 sb $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057298u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80057298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F29C: AC24EE54 sw $a0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005729Cu); return; } g_debug_last_store_pc = 0x8005729Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005729Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F2A0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800572A0u); -#endif -label_BFC3F2A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572A4u); -#endif - /* 0xBFC3F2A4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800572A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800572A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F2A8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800572A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F2AC: 03E00008 jr $ra */ - psx_delay_BFC3F2AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2B0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800572B0u); -#endif - if (psx_delay_BFC3F2AC) { - psx_delay_BFC3F2AC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F2B4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F2B4u); - int psx_delay_BFC3F2BC = 0; - int psx_taken_BFC3F2BC = 0; - int psx_delay_BFC3F2D0 = 0; - int psx_taken_BFC3F2D0 = 0; - int psx_delay_BFC3F2D8 = 0; - int psx_taken_BFC3F2D8 = 0; - int psx_delay_BFC3F2E0 = 0; - int psx_taken_BFC3F2E0 = 0; - int psx_delay_BFC3F2F4 = 0; - int psx_taken_BFC3F2F4 = 0; - int psx_delay_BFC3F2FC = 0; - int psx_taken_BFC3F2FC = 0; - int psx_delay_BFC3F304 = 0; - int psx_taken_BFC3F304 = 0; - int psx_delay_BFC3F30C = 0; - int psx_taken_BFC3F30C = 0; - int psx_delay_BFC3F314 = 0; - int psx_taken_BFC3F314 = 0; - int psx_delay_BFC3F31C = 0; - int psx_taken_BFC3F31C = 0; - int psx_delay_BFC3F33C = 0; - int psx_taken_BFC3F33C = 0; - int psx_delay_BFC3F344 = 0; - int psx_taken_BFC3F344 = 0; - int psx_delay_BFC3F350 = 0; - int psx_taken_BFC3F350 = 0; - int psx_delay_BFC3F358 = 0; - int psx_taken_BFC3F358 = 0; - int psx_delay_BFC3F360 = 0; - int psx_taken_BFC3F360 = 0; - int psx_delay_BFC3F368 = 0; - int psx_taken_BFC3F368 = 0; - int psx_delay_BFC3F370 = 0; - int psx_taken_BFC3F370 = 0; - int psx_delay_BFC3F37C = 0; - int psx_delay_BFC3F3DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F2C4u: goto label_BFC3F2C4; - case 0xBFC3F2D8u: goto label_BFC3F2D8; - case 0xBFC3F2E0u: goto label_BFC3F2E0; - case 0xBFC3F2E8u: goto label_BFC3F2E8; - case 0xBFC3F2FCu: goto label_BFC3F2FC; - case 0xBFC3F304u: goto label_BFC3F304; - case 0xBFC3F30Cu: goto label_BFC3F30C; - case 0xBFC3F314u: goto label_BFC3F314; - case 0xBFC3F31Cu: goto label_BFC3F31C; - case 0xBFC3F324u: goto label_BFC3F324; - case 0xBFC3F344u: goto label_BFC3F344; - case 0xBFC3F34Cu: goto label_BFC3F34C; - case 0xBFC3F350u: goto label_BFC3F350; - case 0xBFC3F358u: goto label_BFC3F358; - case 0xBFC3F360u: goto label_BFC3F360; - case 0xBFC3F368u: goto label_BFC3F368; - case 0xBFC3F370u: goto label_BFC3F370; - case 0xBFC3F374u: goto label_BFC3F374; - case 0xBFC3F378u: goto label_BFC3F378; - case 0xBFC3F37Cu: goto label_BFC3F37C; - case 0xBFC3F384u: goto label_BFC3F384; - case 0xBFC3F3D4u: goto label_BFC3F3D4; - default: break; - } - } -label_BFC3F2B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F2B4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800572B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F2B8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800572B8u); return; } g_debug_last_store_pc = 0x800572B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800572B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2BC: 1000000A beq $zero, $zero, 0xBFC3F2E8 */ - uint32_t psx_brA_BFC3F2BC = cpu->gpr[0]; uint32_t psx_brB_BFC3F2BC = cpu->gpr[0]; - psx_taken_BFC3F2BC = (psx_brA_BFC3F2BC == psx_brB_BFC3F2BC); - psx_delay_BFC3F2BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3F2C0: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800572C0u); -#endif - if (psx_delay_BFC3F2BC) { - psx_delay_BFC3F2BC = 0; - if (psx_taken_BFC3F2BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572E8u); - goto label_BFC3F2E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - } -label_BFC3F2C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F2C4: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800572C4u); -#endif - /* 0xBFC3F2C8: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800572C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800572C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800572CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3F2D0: 15C00014 bne $t6, $zero, 0xBFC3F324 */ - uint32_t psx_brA_BFC3F2D0 = cpu->gpr[14]; uint32_t psx_brB_BFC3F2D0 = cpu->gpr[0]; - psx_taken_BFC3F2D0 = (psx_brA_BFC3F2D0 != psx_brB_BFC3F2D0); - psx_delay_BFC3F2D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800572D4u); -#endif - if (psx_delay_BFC3F2D0) { - psx_delay_BFC3F2D0 = 0; - if (psx_taken_BFC3F2D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057324u); - goto label_BFC3F324; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572D8u); - } -label_BFC3F2D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2D8: 1000003E beq $zero, $zero, 0xBFC3F3D4 */ - uint32_t psx_brA_BFC3F2D8 = cpu->gpr[0]; uint32_t psx_brB_BFC3F2D8 = cpu->gpr[0]; - psx_taken_BFC3F2D8 = (psx_brA_BFC3F2D8 == psx_brB_BFC3F2D8); - psx_delay_BFC3F2D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F2DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800572DCu); -#endif - if (psx_delay_BFC3F2D8) { - psx_delay_BFC3F2D8 = 0; - if (psx_taken_BFC3F2D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800573D4u); - goto label_BFC3F3D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572E0u); - } -label_BFC3F2E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F2E0: 1000003C beq $zero, $zero, 0xBFC3F3D4 */ - uint32_t psx_brA_BFC3F2E0 = cpu->gpr[0]; uint32_t psx_brB_BFC3F2E0 = cpu->gpr[0]; - psx_taken_BFC3F2E0 = (psx_brA_BFC3F2E0 == psx_brB_BFC3F2E0); - psx_delay_BFC3F2E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F2E4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800572E4u); -#endif - if (psx_delay_BFC3F2E0) { - psx_delay_BFC3F2E0 = 0; - if (psx_taken_BFC3F2E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800573D4u); - goto label_BFC3F3D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572E8u); - } -label_BFC3F2E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3F2E8: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800572E8u); -#endif - /* 0xBFC3F2EC: 8C84EE54 lw $a0, -4524($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800572ECu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800572ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F2F0: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800572F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3F2F4: 1083FFF3 beq $a0, $v1, 0xBFC3F2C4 */ - uint32_t psx_brA_BFC3F2F4 = cpu->gpr[4]; uint32_t psx_brB_BFC3F2F4 = cpu->gpr[3]; - psx_taken_BFC3F2F4 = (psx_brA_BFC3F2F4 == psx_brB_BFC3F2F4); - psx_delay_BFC3F2F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F2F8: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800572F8u); -#endif - if (psx_delay_BFC3F2F4) { - psx_delay_BFC3F2F4 = 0; - if (psx_taken_BFC3F2F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - goto label_BFC3F2C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572FCu); - } -label_BFC3F2FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F2FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800572FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F2FC: 1081FFF1 beq $a0, $at, 0xBFC3F2C4 */ - uint32_t psx_brA_BFC3F2FC = cpu->gpr[4]; uint32_t psx_brB_BFC3F2FC = cpu->gpr[1]; - psx_taken_BFC3F2FC = (psx_brA_BFC3F2FC == psx_brB_BFC3F2FC); - psx_delay_BFC3F2FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F300: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80057300u); -#endif - if (psx_delay_BFC3F2FC) { - psx_delay_BFC3F2FC = 0; - if (psx_taken_BFC3F2FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - goto label_BFC3F2C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057304u); - } -label_BFC3F304: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F304u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F304: 1081FFEF beq $a0, $at, 0xBFC3F2C4 */ - uint32_t psx_brA_BFC3F304 = cpu->gpr[4]; uint32_t psx_brB_BFC3F304 = cpu->gpr[1]; - psx_taken_BFC3F304 = (psx_brA_BFC3F304 == psx_brB_BFC3F304); - psx_delay_BFC3F304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F308: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057308u); -#endif - if (psx_delay_BFC3F304) { - psx_delay_BFC3F304 = 0; - if (psx_taken_BFC3F304) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - goto label_BFC3F2C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005730Cu); - } -label_BFC3F30C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F30Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F30Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005730Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F30C: 1081FFED beq $a0, $at, 0xBFC3F2C4 */ - uint32_t psx_brA_BFC3F30C = cpu->gpr[4]; uint32_t psx_brB_BFC3F30C = cpu->gpr[1]; - psx_taken_BFC3F30C = (psx_brA_BFC3F30C == psx_brB_BFC3F30C); - psx_delay_BFC3F30C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F310: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057310u); -#endif - if (psx_delay_BFC3F30C) { - psx_delay_BFC3F30C = 0; - if (psx_taken_BFC3F30C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - goto label_BFC3F2C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057314u); - } -label_BFC3F314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F314: 1081FFEB beq $a0, $at, 0xBFC3F2C4 */ - uint32_t psx_brA_BFC3F314 = cpu->gpr[4]; uint32_t psx_brB_BFC3F314 = cpu->gpr[1]; - psx_taken_BFC3F314 = (psx_brA_BFC3F314 == psx_brB_BFC3F314); - psx_delay_BFC3F314 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F318: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057318u); -#endif - if (psx_delay_BFC3F314) { - psx_delay_BFC3F314 = 0; - if (psx_taken_BFC3F314) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572C4u); - goto label_BFC3F2C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005731Cu); - } -label_BFC3F31C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F31Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005731Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F31C: 1481FFF0 bne $a0, $at, 0xBFC3F2E0 */ - uint32_t psx_brA_BFC3F31C = cpu->gpr[4]; uint32_t psx_brB_BFC3F31C = cpu->gpr[1]; - psx_taken_BFC3F31C = (psx_brA_BFC3F31C != psx_brB_BFC3F31C); - psx_delay_BFC3F31C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F320: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057320u); -#endif - if (psx_delay_BFC3F31C) { - psx_delay_BFC3F31C = 0; - if (psx_taken_BFC3F31C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800572E0u); - goto label_BFC3F2E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057324u); - } -label_BFC3F324: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F324u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F324: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057324u); -#endif - /* 0xBFC3F328: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057328u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F32C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005732Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057330u); -#endif - /* 0xBFC3F330: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F334: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057334u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3F338: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F33C: 13010004 beq $t8, $at, 0xBFC3F350 */ - uint32_t psx_brA_BFC3F33C = cpu->gpr[24]; uint32_t psx_brB_BFC3F33C = cpu->gpr[1]; - psx_taken_BFC3F33C = (psx_brA_BFC3F33C == psx_brB_BFC3F33C); - psx_delay_BFC3F33C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F340: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057340u); -#endif - if (psx_delay_BFC3F33C) { - psx_delay_BFC3F33C = 0; - if (psx_taken_BFC3F33C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057350u); - goto label_BFC3F350; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057344u); - } -label_BFC3F344: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F344u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F344: 10000023 beq $zero, $zero, 0xBFC3F3D4 */ - uint32_t psx_brA_BFC3F344 = cpu->gpr[0]; uint32_t psx_brB_BFC3F344 = cpu->gpr[0]; - psx_taken_BFC3F344 = (psx_brA_BFC3F344 == psx_brB_BFC3F344); - psx_delay_BFC3F344 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F348: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057348u); -#endif - if (psx_delay_BFC3F344) { - psx_delay_BFC3F344 = 0; - if (psx_taken_BFC3F344) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800573D4u); - goto label_BFC3F3D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005734Cu); - } -label_BFC3F34C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F34Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005734Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F34C: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x8005734Cu); -#endif -label_BFC3F350: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F350u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F350: 10810008 beq $a0, $at, 0xBFC3F374 */ - uint32_t psx_brA_BFC3F350 = cpu->gpr[4]; uint32_t psx_brB_BFC3F350 = cpu->gpr[1]; - psx_taken_BFC3F350 = (psx_brA_BFC3F350 == psx_brB_BFC3F350); - psx_delay_BFC3F350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F354: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057354u); -#endif - if (psx_delay_BFC3F350) { - psx_delay_BFC3F350 = 0; - if (psx_taken_BFC3F350) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057374u); - goto label_BFC3F374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057358u); - } -label_BFC3F358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F358: 10810006 beq $a0, $at, 0xBFC3F374 */ - uint32_t psx_brA_BFC3F358 = cpu->gpr[4]; uint32_t psx_brB_BFC3F358 = cpu->gpr[1]; - psx_taken_BFC3F358 = (psx_brA_BFC3F358 == psx_brB_BFC3F358); - psx_delay_BFC3F358 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F35C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005735Cu); -#endif - if (psx_delay_BFC3F358) { - psx_delay_BFC3F358 = 0; - if (psx_taken_BFC3F358) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057374u); - goto label_BFC3F374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057360u); - } -label_BFC3F360: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F360u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3F360: 10830004 beq $a0, $v1, 0xBFC3F374 */ - uint32_t psx_brA_BFC3F360 = cpu->gpr[4]; uint32_t psx_brB_BFC3F360 = cpu->gpr[3]; - psx_taken_BFC3F360 = (psx_brA_BFC3F360 == psx_brB_BFC3F360); - psx_delay_BFC3F360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F364: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057364u); -#endif - if (psx_delay_BFC3F360) { - psx_delay_BFC3F360 = 0; - if (psx_taken_BFC3F360) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057374u); - goto label_BFC3F374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057368u); - } -label_BFC3F368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F368: 10810002 beq $a0, $at, 0xBFC3F374 */ - uint32_t psx_brA_BFC3F368 = cpu->gpr[4]; uint32_t psx_brB_BFC3F368 = cpu->gpr[1]; - psx_taken_BFC3F368 = (psx_brA_BFC3F368 == psx_brB_BFC3F368); - psx_delay_BFC3F368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F36C: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005736Cu); -#endif - if (psx_delay_BFC3F368) { - psx_delay_BFC3F368 = 0; - if (psx_taken_BFC3F368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057374u); - goto label_BFC3F374; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057370u); - } -label_BFC3F370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F370: 14810002 bne $a0, $at, 0xBFC3F37C */ - uint32_t psx_brA_BFC3F370 = cpu->gpr[4]; uint32_t psx_brB_BFC3F370 = cpu->gpr[1]; - psx_taken_BFC3F370 = (psx_brA_BFC3F370 != psx_brB_BFC3F370); - psx_delay_BFC3F370 = 1; -label_BFC3F374: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F374u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F374: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057374u); -#endif - if (psx_delay_BFC3F370) { - psx_delay_BFC3F370 = 0; - if (psx_taken_BFC3F370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005737Cu); - goto label_BFC3F37C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057378u); - } -label_BFC3F378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F378: AC24EE58 sw $a0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057378u); return; } g_debug_last_store_pc = 0x80057378u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE58u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057378u); -#endif -label_BFC3F37C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F37Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F37Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005737Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F37C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057384u; /* jal link before delay slot */ - psx_delay_BFC3F37C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC3F380: AFA50018 sw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057380u); return; } g_debug_last_store_pc = 0x80057380u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057380u); -#endif - if (psx_delay_BFC3F37C) { - psx_delay_BFC3F37C = 0; - cpu->gpr[31] = 0x80057384u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3F384: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057384u); -#endif - /* 0xBFC3F388: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057388u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057388u); -#endif - /* 0xBFC3F38C: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005738Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005738Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F390: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057390u); -#endif - /* 0xBFC3F394: 8C639C30 lw $v1, -25552($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057394u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C30u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F398: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057398u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057398u); -#endif - /* 0xBFC3F39C: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005739Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3F3A0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800573A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3F3A4: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800573A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800573A4u); -#endif - /* 0xBFC3F3A8: 90A90001 lbu $t1, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 9, 0x20u); - PGXP_LOAD(0x90A90001u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800573A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC3F3AC: 240B0002 addiu $t3, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240B0002u, cpu->gpr[11], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x800573ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC3F3B0: A0690000 sb $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800573B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800573B0u); -#endif - /* 0xBFC3F3B4: 90AA0002 lbu $t2, 2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (2)), 10, 0x20u); - PGXP_LOAD(0x90AA0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800573B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3F3B8: 240400E2 addiu $a0, $zero, 226 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (226)); - PGXP_ALU(0x240400E2u, cpu->gpr[4], _pgx1, 0x000000E2u); } -#ifdef PSX_COSIM - cosim_instr(0x800573B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC3F3BC: A06A0000 sb $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800573BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA06A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800573BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573C0u); -#endif - /* 0xBFC3F3C0: 8D8C9C2C lw $t4, -25556($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800573C0u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9C2Cu, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800573C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F3C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800573C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC3F3C8: A18B0000 sb $t3, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800573C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA18B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800573C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F3CC: AC24EE54 sw $a0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800573CCu); return; } g_debug_last_store_pc = 0x800573CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800573CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F3D0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800573D0u); -#endif -label_BFC3F3D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F3D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573D4u); -#endif - /* 0xBFC3F3D4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800573D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800573D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F3D8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800573D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F3DC: 03E00008 jr $ra */ - psx_delay_BFC3F3DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800573E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F3E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800573E0u); -#endif - if (psx_delay_BFC3F3DC) { - psx_delay_BFC3F3DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F484(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F484u); - int psx_delay_BFC3F494 = 0; - int psx_taken_BFC3F494 = 0; - int psx_delay_BFC3F4A0 = 0; - int psx_taken_BFC3F4A0 = 0; - int psx_delay_BFC3F4B0 = 0; - int psx_delay_BFC3F4E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F49Cu: goto label_BFC3F49C; - case 0xBFC3F4A4u: goto label_BFC3F4A4; - case 0xBFC3F4A8u: goto label_BFC3F4A8; - case 0xBFC3F4ACu: goto label_BFC3F4AC; - case 0xBFC3F4B8u: goto label_BFC3F4B8; - default: break; - } - } -label_BFC3F484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F484: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057484u); -#endif - /* 0xBFC3F488: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057488u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F48C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005748Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F490: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F494: 10610003 beq $v1, $at, 0xBFC3F4A4 */ - uint32_t psx_brA_BFC3F494 = cpu->gpr[3]; uint32_t psx_brB_BFC3F494 = cpu->gpr[1]; - psx_taken_BFC3F494 = (psx_brA_BFC3F494 == psx_brB_BFC3F494); - psx_delay_BFC3F494 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F498: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057498u); return; } g_debug_last_store_pc = 0x80057498u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057498u); -#endif - if (psx_delay_BFC3F494) { - psx_delay_BFC3F494 = 0; - if (psx_taken_BFC3F494) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800574A4u); - goto label_BFC3F4A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005749Cu); - } -label_BFC3F49C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F49Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F49C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x8005749Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F4A0: 14610002 bne $v1, $at, 0xBFC3F4AC */ - uint32_t psx_brA_BFC3F4A0 = cpu->gpr[3]; uint32_t psx_brB_BFC3F4A0 = cpu->gpr[1]; - psx_taken_BFC3F4A0 = (psx_brA_BFC3F4A0 != psx_brB_BFC3F4A0); - psx_delay_BFC3F4A0 = 1; -label_BFC3F4A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F4A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F4A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F4A4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574A4u); -#endif - if (psx_delay_BFC3F4A0) { - psx_delay_BFC3F4A0 = 0; - if (psx_taken_BFC3F4A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800574ACu); - goto label_BFC3F4AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800574A8u); - } -label_BFC3F4A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F4A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F4A8: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574A8u); return; } g_debug_last_store_pc = 0x800574A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800574A8u); -#endif -label_BFC3F4AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F4ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F4AC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F4B0: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800574B8u; /* jal link before delay slot */ - psx_delay_BFC3F4B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F4B4: AC24EEC4 sw $a0, -4412($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4412; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574B4u); return; } g_debug_last_store_pc = 0x800574B4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EEC4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800574B4u); -#endif - if (psx_delay_BFC3F4B0) { - psx_delay_BFC3F4B0 = 0; - cpu->gpr[31] = 0x800574B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F4B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F4B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F4B8: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574B8u); -#endif - /* 0xBFC3F4BC: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574BCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800574BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3F4C0: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3F4C4: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800574C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800574C4u); -#endif - /* 0xBFC3F4C8: 8F189C2C lw $t8, -25556($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574C8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800574C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F4CC: 240F0011 addiu $t7, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x240F0011u, cpu->gpr[15], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x800574CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC3F4D0: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800574D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800574D0u); -#endif - /* 0xBFC3F4D4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800574D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F4D8: 24030011 addiu $v1, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24030011u, cpu->gpr[3], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x800574D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F4DC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F4E0: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574E0u); return; } g_debug_last_store_pc = 0x800574E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800574E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F4E4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800574E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F4E8: 03E00008 jr $ra */ - psx_delay_BFC3F4E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F4EC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800574ECu); -#endif - if (psx_delay_BFC3F4E8) { - psx_delay_BFC3F4E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F4F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F4F0u); - int psx_delay_BFC3F500 = 0; - int psx_taken_BFC3F500 = 0; - int psx_delay_BFC3F50C = 0; - int psx_taken_BFC3F50C = 0; - int psx_delay_BFC3F520 = 0; - int psx_taken_BFC3F520 = 0; - int psx_delay_BFC3F52C = 0; - int psx_delay_BFC3F568 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F508u: goto label_BFC3F508; - case 0xBFC3F514u: goto label_BFC3F514; - case 0xBFC3F528u: goto label_BFC3F528; - case 0xBFC3F534u: goto label_BFC3F534; - case 0xBFC3F560u: goto label_BFC3F560; - default: break; - } - } -label_BFC3F4F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F4F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800574F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F4F0: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800574F0u); -#endif - /* 0xBFC3F4F4: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800574F4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800574F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F4F8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800574F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F4FC: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800574FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F500: 10610009 beq $v1, $at, 0xBFC3F528 */ - uint32_t psx_brA_BFC3F500 = cpu->gpr[3]; uint32_t psx_brB_BFC3F500 = cpu->gpr[1]; - psx_taken_BFC3F500 = (psx_brA_BFC3F500 == psx_brB_BFC3F500); - psx_delay_BFC3F500 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F504: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057504u); return; } g_debug_last_store_pc = 0x80057504u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057504u); -#endif - if (psx_delay_BFC3F500) { - psx_delay_BFC3F500 = 0; - if (psx_taken_BFC3F500) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057528u); - goto label_BFC3F528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057508u); - } -label_BFC3F508: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F508u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F508: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F50C: 10610006 beq $v1, $at, 0xBFC3F528 */ - uint32_t psx_brA_BFC3F50C = cpu->gpr[3]; uint32_t psx_brB_BFC3F50C = cpu->gpr[1]; - psx_taken_BFC3F50C = (psx_brA_BFC3F50C == psx_brB_BFC3F50C); - psx_delay_BFC3F50C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F510: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057510u); -#endif - if (psx_delay_BFC3F50C) { - psx_delay_BFC3F50C = 0; - if (psx_taken_BFC3F50C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057528u); - goto label_BFC3F528; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057514u); - } -label_BFC3F514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F514: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057514u); -#endif - /* 0xBFC3F518: 91CEEEC0 lbu $t6, -4416($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4416; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (-4416)), 14, 0x4000u); - PGXP_LOAD(0x91CEEEC0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F51C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005751Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F520: 1000000F beq $zero, $zero, 0xBFC3F560 */ - uint32_t psx_brA_BFC3F520 = cpu->gpr[0]; uint32_t psx_brB_BFC3F520 = cpu->gpr[0]; - psx_taken_BFC3F520 = (psx_brA_BFC3F520 == psx_brB_BFC3F520); - psx_delay_BFC3F520 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC3F524: A08E0000 sb $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057524u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA08E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057524u); -#endif - if (psx_delay_BFC3F520) { - psx_delay_BFC3F520 = 0; - if (psx_taken_BFC3F520) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057560u); - goto label_BFC3F560; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057528u); - } -label_BFC3F528: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F528u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F528: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F52C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057534u; /* jal link before delay slot */ - psx_delay_BFC3F52C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F530: AC24EE64 sw $a0, -4508($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4508; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4508)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057530u); return; } g_debug_last_store_pc = 0x80057530u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE64u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057530u); -#endif - if (psx_delay_BFC3F52C) { - psx_delay_BFC3F52C = 0; - cpu->gpr[31] = 0x80057534u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F534: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057534u); -#endif - /* 0xBFC3F538: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057538u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3F53C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005753Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F540: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057540u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057540u); -#endif - /* 0xBFC3F544: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057544u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F548: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F54C: 24030001 addiu $v1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24030001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005754Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F550: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3F554: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057554u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F558: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057558u); return; } g_debug_last_store_pc = 0x80057558u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F55C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005755Cu); -#endif -label_BFC3F560: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F560u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057560u); -#endif - /* 0xBFC3F560: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057560u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F564: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F568: 03E00008 jr $ra */ - psx_delay_BFC3F568 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F56C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005756Cu); -#endif - if (psx_delay_BFC3F568) { - psx_delay_BFC3F568 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F570(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F570u); - int psx_delay_BFC3F580 = 0; - int psx_taken_BFC3F580 = 0; - int psx_delay_BFC3F588 = 0; - int psx_taken_BFC3F588 = 0; - int psx_delay_BFC3F594 = 0; - int psx_delay_BFC3F5D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F588u: goto label_BFC3F588; - case 0xBFC3F590u: goto label_BFC3F590; - case 0xBFC3F59Cu: goto label_BFC3F59C; - case 0xBFC3F5C8u: goto label_BFC3F5C8; - default: break; - } - } -label_BFC3F570: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F570u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F570: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057570u); -#endif - /* 0xBFC3F574: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057574u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F578: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F57C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005757Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3F580: 11C10003 beq $t6, $at, 0xBFC3F590 */ - uint32_t psx_brA_BFC3F580 = cpu->gpr[14]; uint32_t psx_brB_BFC3F580 = cpu->gpr[1]; - psx_taken_BFC3F580 = (psx_brA_BFC3F580 == psx_brB_BFC3F580); - psx_delay_BFC3F580 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F584: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057584u); return; } g_debug_last_store_pc = 0x80057584u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057584u); -#endif - if (psx_delay_BFC3F580) { - psx_delay_BFC3F580 = 0; - if (psx_taken_BFC3F580) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057590u); - goto label_BFC3F590; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057588u); - } -label_BFC3F588: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F588u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F588: 1000000F beq $zero, $zero, 0xBFC3F5C8 */ - uint32_t psx_brA_BFC3F588 = cpu->gpr[0]; uint32_t psx_brB_BFC3F588 = cpu->gpr[0]; - psx_taken_BFC3F588 = (psx_brA_BFC3F588 == psx_brB_BFC3F588); - psx_delay_BFC3F588 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F58C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005758Cu); -#endif - if (psx_delay_BFC3F588) { - psx_delay_BFC3F588 = 0; - if (psx_taken_BFC3F588) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575C8u); - goto label_BFC3F5C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057590u); - } -label_BFC3F590: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F590u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F590: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F594: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x8005759Cu; /* jal link before delay slot */ - psx_delay_BFC3F594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F598: AC24EE68 sw $a0, -4504($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4504; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057598u); return; } g_debug_last_store_pc = 0x80057598u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE68u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057598u); -#endif - if (psx_delay_BFC3F594) { - psx_delay_BFC3F594 = 0; - cpu->gpr[31] = 0x8005759Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F59C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F59Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F59Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F59C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005759Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575A0u); -#endif - /* 0xBFC3F5A0: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575A0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800575A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3F5A4: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800575A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F5A8: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800575A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800575A8u); -#endif - /* 0xBFC3F5AC: 8D089C2C lw $t0, -25556($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575ACu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089C2Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800575ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F5B0: 2418000F addiu $t8, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2418000Fu, cpu->gpr[24], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800575B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F5B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800575B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F5B8: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575B8u); return; } g_debug_last_store_pc = 0x800575B8u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800575B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F5BC: 2419000F addiu $t9, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2419000Fu, cpu->gpr[25], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800575BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F5C0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800575C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3F5C4: A1190000 sb $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800575C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800575C4u); -#endif -label_BFC3F5C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F5C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575C8u); -#endif - /* 0xBFC3F5C8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800575C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F5CC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800575CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F5D0: 03E00008 jr $ra */ - psx_delay_BFC3F5D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F5D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800575D4u); -#endif - if (psx_delay_BFC3F5D0) { - psx_delay_BFC3F5D0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F5D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F5D8u); - int psx_delay_BFC3F5EC = 0; - int psx_taken_BFC3F5EC = 0; - int psx_delay_BFC3F5F4 = 0; - int psx_taken_BFC3F5F4 = 0; - int psx_delay_BFC3F5FC = 0; - int psx_taken_BFC3F5FC = 0; - int psx_delay_BFC3F630 = 0; - int psx_taken_BFC3F630 = 0; - int psx_delay_BFC3F640 = 0; - int psx_taken_BFC3F640 = 0; - int psx_delay_BFC3F64C = 0; - int psx_taken_BFC3F64C = 0; - int psx_delay_BFC3F65C = 0; - int psx_taken_BFC3F65C = 0; - int psx_delay_BFC3F688 = 0; - int psx_taken_BFC3F688 = 0; - int psx_delay_BFC3F690 = 0; - int psx_taken_BFC3F690 = 0; - int psx_delay_BFC3F698 = 0; - int psx_delay_BFC3F6E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F5F4u: goto label_BFC3F5F4; - case 0xBFC3F5FCu: goto label_BFC3F5FC; - case 0xBFC3F604u: goto label_BFC3F604; - case 0xBFC3F608u: goto label_BFC3F608; - case 0xBFC3F638u: goto label_BFC3F638; - case 0xBFC3F648u: goto label_BFC3F648; - case 0xBFC3F654u: goto label_BFC3F654; - case 0xBFC3F664u: goto label_BFC3F664; - case 0xBFC3F668u: goto label_BFC3F668; - case 0xBFC3F670u: goto label_BFC3F670; - case 0xBFC3F690u: goto label_BFC3F690; - case 0xBFC3F698u: goto label_BFC3F698; - case 0xBFC3F6A0u: goto label_BFC3F6A0; - case 0xBFC3F6E0u: goto label_BFC3F6E0; - default: break; - } - } -label_BFC3F5D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F5D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F5D8: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800575D8u); -#endif - /* 0xBFC3F5DC: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575DCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800575DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F5E0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800575E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F5E4: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800575E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F5E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800575E8u); return; } g_debug_last_store_pc = 0x800575E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800575E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3F5EC: 15C10003 bne $t6, $at, 0xBFC3F5FC */ - uint32_t psx_brA_BFC3F5EC = cpu->gpr[14]; uint32_t psx_brB_BFC3F5EC = cpu->gpr[1]; - psx_taken_BFC3F5EC = (psx_brA_BFC3F5EC != psx_brB_BFC3F5EC); - psx_delay_BFC3F5EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC3F5F0: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800575F0u); -#endif - if (psx_delay_BFC3F5EC) { - psx_delay_BFC3F5EC = 0; - if (psx_taken_BFC3F5EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575FCu); - goto label_BFC3F5FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575F4u); - } -label_BFC3F5F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F5F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F5F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3F5F4: 14800004 bne $a0, $zero, 0xBFC3F608 */ - uint32_t psx_brA_BFC3F5F4 = cpu->gpr[4]; uint32_t psx_brB_BFC3F5F4 = cpu->gpr[0]; - psx_taken_BFC3F5F4 = (psx_brA_BFC3F5F4 != psx_brB_BFC3F5F4); - psx_delay_BFC3F5F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3F5F8: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800575F8u); -#endif - if (psx_delay_BFC3F5F4) { - psx_delay_BFC3F5F4 = 0; - if (psx_taken_BFC3F5F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057608u); - goto label_BFC3F608; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800575FCu); - } -label_BFC3F5FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F5FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800575FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F5FC: 10000038 beq $zero, $zero, 0xBFC3F6E0 */ - uint32_t psx_brA_BFC3F5FC = cpu->gpr[0]; uint32_t psx_brB_BFC3F5FC = cpu->gpr[0]; - psx_taken_BFC3F5FC = (psx_brA_BFC3F5FC == psx_brB_BFC3F5FC); - psx_delay_BFC3F5FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F600: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057600u); -#endif - if (psx_delay_BFC3F5FC) { - psx_delay_BFC3F5FC = 0; - if (psx_taken_BFC3F5FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800576E0u); - goto label_BFC3F6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057604u); - } -label_BFC3F604: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F604u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057604u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC3F604: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057604u); -#endif -label_BFC3F608: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F608u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F608: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3F60C: AC22EE74 sw $v0, -4492($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4492; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005760Cu); return; } g_debug_last_store_pc = 0x8005760Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE74u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005760Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F610: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3F614: AC25EE7C sw $a1, -4484($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4484; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057614u); return; } g_debug_last_store_pc = 0x80057614u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE7Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F618: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC3F61C: AC26EE84 sw $a2, -4476($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005761Cu); return; } g_debug_last_store_pc = 0x8005761Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EE84u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005761Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F620: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F624: AC20EE5C sw $zero, -4516($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057624u); return; } g_debug_last_store_pc = 0x80057624u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F628: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC3F62C: 30CF0010 andi $t7, $a2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[6] & 0x10u; - PGXP_ALU(0x30CF0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005762Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F630: 11E00005 beq $t7, $zero, 0xBFC3F648 */ - uint32_t psx_brA_BFC3F630 = cpu->gpr[15]; uint32_t psx_brB_BFC3F630 = cpu->gpr[0]; - psx_taken_BFC3F630 = (psx_brA_BFC3F630 == psx_brB_BFC3F630); - psx_delay_BFC3F630 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3F634: AC22EE78 sw $v0, -4488($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057634u); return; } g_debug_last_store_pc = 0x80057634u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE78u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057634u); -#endif - if (psx_delay_BFC3F630) { - psx_delay_BFC3F630 = 0; - if (psx_taken_BFC3F630) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057648u); - goto label_BFC3F648; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057638u); - } -label_BFC3F638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F638: 24180246 addiu $t8, $zero, 582 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (582)); - PGXP_ALU(0x24180246u, cpu->gpr[24], _pgx1, 0x00000246u); } -#ifdef PSX_COSIM - cosim_instr(0x80057638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F63C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005763Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F640: 1000000B beq $zero, $zero, 0xBFC3F670 */ - uint32_t psx_brA_BFC3F640 = cpu->gpr[0]; uint32_t psx_brB_BFC3F640 = cpu->gpr[0]; - psx_taken_BFC3F640 = (psx_brA_BFC3F640 == psx_brB_BFC3F640); - psx_delay_BFC3F640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F644: AC38EE88 sw $t8, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057644u); return; } g_debug_last_store_pc = 0x80057644u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE88u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057644u); -#endif - if (psx_delay_BFC3F640) { - psx_delay_BFC3F640 = 0; - if (psx_taken_BFC3F640) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057670u); - goto label_BFC3F670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057648u); - } -label_BFC3F648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC3F648: 30D90020 andi $t9, $a2, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x20u; - PGXP_ALU(0x30D90020u, cpu->gpr[25], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80057648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F64C: 13200006 beq $t9, $zero, 0xBFC3F668 */ - uint32_t psx_brA_BFC3F64C = cpu->gpr[25]; uint32_t psx_brB_BFC3F64C = cpu->gpr[0]; - psx_taken_BFC3F64C = (psx_brA_BFC3F64C == psx_brB_BFC3F64C); - psx_delay_BFC3F64C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3F650: 24090200 addiu $t1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24090200u, cpu->gpr[9], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80057650u); -#endif - if (psx_delay_BFC3F64C) { - psx_delay_BFC3F64C = 0; - if (psx_taken_BFC3F64C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057668u); - goto label_BFC3F668; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057654u); - } -label_BFC3F654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3F654: 24080249 addiu $t0, $zero, 585 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (585)); - PGXP_ALU(0x24080249u, cpu->gpr[8], _pgx1, 0x00000249u); } -#ifdef PSX_COSIM - cosim_instr(0x80057654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F658: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F65C: 10000004 beq $zero, $zero, 0xBFC3F670 */ - uint32_t psx_brA_BFC3F65C = cpu->gpr[0]; uint32_t psx_brB_BFC3F65C = cpu->gpr[0]; - psx_taken_BFC3F65C = (psx_brA_BFC3F65C == psx_brB_BFC3F65C); - psx_delay_BFC3F65C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3F660: AC28EE88 sw $t0, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057660u); return; } g_debug_last_store_pc = 0x80057660u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE88u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057660u); -#endif - if (psx_delay_BFC3F65C) { - psx_delay_BFC3F65C = 0; - if (psx_taken_BFC3F65C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057670u); - goto label_BFC3F670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057664u); - } -label_BFC3F664: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F664u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3F664: 24090200 addiu $t1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24090200u, cpu->gpr[9], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80057664u); -#endif -label_BFC3F668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F668: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3F66C: AC29EE88 sw $t1, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005766Cu); return; } g_debug_last_store_pc = 0x8005766Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29EE88u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005766Cu); -#endif -label_BFC3F670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3F670: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057670u); -#endif - /* 0xBFC3F674: 8D4A9C28 lw $t2, -25560($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057674u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C28u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F678: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057678u); -#endif - /* 0xBFC3F67C: 91420000 lbu $v0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (0)), 2, 0x400u); - PGXP_LOAD(0x91420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005767Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F680: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3F684: 304B0008 andi $t3, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3F688: 11610003 beq $t3, $at, 0xBFC3F698 */ - uint32_t psx_brA_BFC3F688 = cpu->gpr[11]; uint32_t psx_brB_BFC3F688 = cpu->gpr[1]; - psx_taken_BFC3F688 = (psx_brA_BFC3F688 == psx_brB_BFC3F688); - psx_delay_BFC3F688 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F68C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005768Cu); -#endif - if (psx_delay_BFC3F688) { - psx_delay_BFC3F688 = 0; - if (psx_taken_BFC3F688) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057698u); - goto label_BFC3F698; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057690u); - } -label_BFC3F690: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F690u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F690: 10000013 beq $zero, $zero, 0xBFC3F6E0 */ - uint32_t psx_brA_BFC3F690 = cpu->gpr[0]; uint32_t psx_brB_BFC3F690 = cpu->gpr[0]; - psx_taken_BFC3F690 = (psx_brA_BFC3F690 == psx_brB_BFC3F690); - psx_delay_BFC3F690 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F694: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057694u); -#endif - if (psx_delay_BFC3F690) { - psx_delay_BFC3F690 = 0; - if (psx_taken_BFC3F690) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800576E0u); - goto label_BFC3F6E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057698u); - } -label_BFC3F698: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F698u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F698: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800576A0u; /* jal link before delay slot */ - psx_delay_BFC3F698 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC3F69C: AFA60020 sw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005769Cu); return; } g_debug_last_store_pc = 0x8005769Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005769Cu); -#endif - if (psx_delay_BFC3F698) { - psx_delay_BFC3F698 = 0; - cpu->gpr[31] = 0x800576A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F6A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F6A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3F6A0: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800576A0u); -#endif - /* 0xBFC3F6A4: 8D8C9C28 lw $t4, -25560($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576A4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9C28u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800576A4u); -#endif - /* 0xBFC3F6A8: 8FA60020 lw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576A8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800576A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F6AC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800576ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3F6B0: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800576B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800576B0u); -#endif - /* 0xBFC3F6B4: 8DCE9C30 lw $t6, -25552($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C30u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800576B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2040u); -#endif - /* 0xBFC3F6B8: 30CD00FF andi $t5, $a2, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[13] = cpu->gpr[6] & 0xFFu; - PGXP_ALU(0x30CD00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800576B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3F6BC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800576BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3F6C0: A1CD0000 sb $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800576C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA1CD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800576C0u); -#endif - /* 0xBFC3F6C4: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576C4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800576C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F6C8: 240F00FE addiu $t7, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240F00FEu, cpu->gpr[15], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800576C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F6CC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800576CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3F6D0: AC2FEE54 sw $t7, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576D0u); return; } g_debug_last_store_pc = 0x800576D0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE54u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800576D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F6D4: 2418000E addiu $t8, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2418000Eu, cpu->gpr[24], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800576D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F6D8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800576D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3F6DC: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800576DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800576DCu); -#endif -label_BFC3F6E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F6E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576E0u); -#endif - /* 0xBFC3F6E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800576E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F6E4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800576E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F6E8: 03E00008 jr $ra */ - psx_delay_BFC3F6E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F6EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800576ECu); -#endif - if (psx_delay_BFC3F6E8) { - psx_delay_BFC3F6E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F6F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F6F0u); - int psx_delay_BFC3F700 = 0; - int psx_taken_BFC3F700 = 0; - int psx_delay_BFC3F708 = 0; - int psx_taken_BFC3F708 = 0; - int psx_delay_BFC3F728 = 0; - int psx_taken_BFC3F728 = 0; - int psx_delay_BFC3F738 = 0; - int psx_taken_BFC3F738 = 0; - int psx_delay_BFC3F744 = 0; - int psx_taken_BFC3F744 = 0; - int psx_delay_BFC3F754 = 0; - int psx_taken_BFC3F754 = 0; - int psx_delay_BFC3F780 = 0; - int psx_taken_BFC3F780 = 0; - int psx_delay_BFC3F788 = 0; - int psx_taken_BFC3F788 = 0; - int psx_delay_BFC3F790 = 0; - int psx_delay_BFC3F7E0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F708u: goto label_BFC3F708; - case 0xBFC3F710u: goto label_BFC3F710; - case 0xBFC3F730u: goto label_BFC3F730; - case 0xBFC3F740u: goto label_BFC3F740; - case 0xBFC3F74Cu: goto label_BFC3F74C; - case 0xBFC3F75Cu: goto label_BFC3F75C; - case 0xBFC3F760u: goto label_BFC3F760; - case 0xBFC3F768u: goto label_BFC3F768; - case 0xBFC3F788u: goto label_BFC3F788; - case 0xBFC3F790u: goto label_BFC3F790; - case 0xBFC3F798u: goto label_BFC3F798; - case 0xBFC3F7D8u: goto label_BFC3F7D8; - default: break; - } - } -label_BFC3F6F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F6F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800576F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F6F0: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800576F0u); -#endif - /* 0xBFC3F6F4: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800576F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800576F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F6F8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800576F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F6FC: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800576FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3F700: 11C10003 beq $t6, $at, 0xBFC3F710 */ - uint32_t psx_brA_BFC3F700 = cpu->gpr[14]; uint32_t psx_brB_BFC3F700 = cpu->gpr[1]; - psx_taken_BFC3F700 = (psx_brA_BFC3F700 == psx_brB_BFC3F700); - psx_delay_BFC3F700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F704: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057704u); return; } g_debug_last_store_pc = 0x80057704u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057704u); -#endif - if (psx_delay_BFC3F700) { - psx_delay_BFC3F700 = 0; - if (psx_taken_BFC3F700) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057710u); - goto label_BFC3F710; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057708u); - } -label_BFC3F708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F708: 10000033 beq $zero, $zero, 0xBFC3F7D8 */ - uint32_t psx_brA_BFC3F708 = cpu->gpr[0]; uint32_t psx_brB_BFC3F708 = cpu->gpr[0]; - psx_taken_BFC3F708 = (psx_brA_BFC3F708 == psx_brB_BFC3F708); - psx_delay_BFC3F708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F70C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005770Cu); -#endif - if (psx_delay_BFC3F708) { - psx_delay_BFC3F708 = 0; - if (psx_taken_BFC3F708) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800577D8u); - goto label_BFC3F7D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057710u); - } -label_BFC3F710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F710: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F714: AC24EE84 sw $a0, -4476($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057714u); return; } g_debug_last_store_pc = 0x80057714u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE84u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F718: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F71C: AC20EE60 sw $zero, -4512($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005771Cu); return; } g_debug_last_store_pc = 0x8005771Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005771Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F720: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC3F724: 308F0010 andi $t7, $a0, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] & 0x10u; - PGXP_ALU(0x308F0010u, cpu->gpr[15], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80057724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F728: 11E00005 beq $t7, $zero, 0xBFC3F740 */ - uint32_t psx_brA_BFC3F728 = cpu->gpr[15]; uint32_t psx_brB_BFC3F728 = cpu->gpr[0]; - psx_taken_BFC3F728 = (psx_brA_BFC3F728 == psx_brB_BFC3F728); - psx_delay_BFC3F728 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F72C: AC20EE5C sw $zero, -4516($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005772Cu); return; } g_debug_last_store_pc = 0x8005772Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE5Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005772Cu); -#endif - if (psx_delay_BFC3F728) { - psx_delay_BFC3F728 = 0; - if (psx_taken_BFC3F728) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057740u); - goto label_BFC3F740; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057730u); - } -label_BFC3F730: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F730u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F730: 24180246 addiu $t8, $zero, 582 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (582)); - PGXP_ALU(0x24180246u, cpu->gpr[24], _pgx1, 0x00000246u); } -#ifdef PSX_COSIM - cosim_instr(0x80057730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F734: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F738: 1000000B beq $zero, $zero, 0xBFC3F768 */ - uint32_t psx_brA_BFC3F738 = cpu->gpr[0]; uint32_t psx_brB_BFC3F738 = cpu->gpr[0]; - psx_taken_BFC3F738 = (psx_brA_BFC3F738 == psx_brB_BFC3F738); - psx_delay_BFC3F738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F73C: AC38EE88 sw $t8, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005773Cu); return; } g_debug_last_store_pc = 0x8005773Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE88u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005773Cu); -#endif - if (psx_delay_BFC3F738) { - psx_delay_BFC3F738 = 0; - if (psx_taken_BFC3F738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057768u); - goto label_BFC3F768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057740u); - } -label_BFC3F740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3F740: 30990020 andi $t9, $a0, 0x20 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0x20u; - PGXP_ALU(0x30990020u, cpu->gpr[25], _pgx1, 0x0020u); } -#ifdef PSX_COSIM - cosim_instr(0x80057740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F744: 13200006 beq $t9, $zero, 0xBFC3F760 */ - uint32_t psx_brA_BFC3F744 = cpu->gpr[25]; uint32_t psx_brB_BFC3F744 = cpu->gpr[0]; - psx_taken_BFC3F744 = (psx_brA_BFC3F744 == psx_brB_BFC3F744); - psx_delay_BFC3F744 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3F748: 24090200 addiu $t1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24090200u, cpu->gpr[9], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80057748u); -#endif - if (psx_delay_BFC3F744) { - psx_delay_BFC3F744 = 0; - if (psx_taken_BFC3F744) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057760u); - goto label_BFC3F760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005774Cu); - } -label_BFC3F74C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F74Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005774Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3F74C: 24080249 addiu $t0, $zero, 585 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (585)); - PGXP_ALU(0x24080249u, cpu->gpr[8], _pgx1, 0x00000249u); } -#ifdef PSX_COSIM - cosim_instr(0x8005774Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F750: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F754: 10000004 beq $zero, $zero, 0xBFC3F768 */ - uint32_t psx_brA_BFC3F754 = cpu->gpr[0]; uint32_t psx_brB_BFC3F754 = cpu->gpr[0]; - psx_taken_BFC3F754 = (psx_brA_BFC3F754 == psx_brB_BFC3F754); - psx_delay_BFC3F754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3F758: AC28EE88 sw $t0, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057758u); return; } g_debug_last_store_pc = 0x80057758u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE88u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057758u); -#endif - if (psx_delay_BFC3F754) { - psx_delay_BFC3F754 = 0; - if (psx_taken_BFC3F754) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057768u); - goto label_BFC3F768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005775Cu); - } -label_BFC3F75C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F75Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005775Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3F75C: 24090200 addiu $t1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24090200u, cpu->gpr[9], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x8005775Cu); -#endif -label_BFC3F760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F760: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC3F764: AC29EE88 sw $t1, -4472($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4472; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057764u); return; } g_debug_last_store_pc = 0x80057764u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29EE88u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057764u); -#endif -label_BFC3F768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3F768: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057768u); -#endif - /* 0xBFC3F76C: 8D4A9C28 lw $t2, -25560($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005776Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C28u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005776Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F770: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057770u); -#endif - /* 0xBFC3F774: 91420000 lbu $v0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (0)), 2, 0x400u); - PGXP_LOAD(0x91420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F778: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC3F77C: 304B0008 andi $t3, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304B0008u, cpu->gpr[11], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005777Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC3F780: 11610003 beq $t3, $at, 0xBFC3F790 */ - uint32_t psx_brA_BFC3F780 = cpu->gpr[11]; uint32_t psx_brB_BFC3F780 = cpu->gpr[1]; - psx_taken_BFC3F780 = (psx_brA_BFC3F780 == psx_brB_BFC3F780); - psx_delay_BFC3F780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057784u); -#endif - if (psx_delay_BFC3F780) { - psx_delay_BFC3F780 = 0; - if (psx_taken_BFC3F780) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057790u); - goto label_BFC3F790; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057788u); - } -label_BFC3F788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F788: 10000013 beq $zero, $zero, 0xBFC3F7D8 */ - uint32_t psx_brA_BFC3F788 = cpu->gpr[0]; uint32_t psx_brB_BFC3F788 = cpu->gpr[0]; - psx_taken_BFC3F788 = (psx_brA_BFC3F788 == psx_brB_BFC3F788); - psx_delay_BFC3F788 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F78C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005778Cu); -#endif - if (psx_delay_BFC3F788) { - psx_delay_BFC3F788 = 0; - if (psx_taken_BFC3F788) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800577D8u); - goto label_BFC3F7D8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057790u); - } -label_BFC3F790: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F790u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F790: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057798u; /* jal link before delay slot */ - psx_delay_BFC3F790 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3F794: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057794u); return; } g_debug_last_store_pc = 0x80057794u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057794u); -#endif - if (psx_delay_BFC3F790) { - psx_delay_BFC3F790 = 0; - cpu->gpr[31] = 0x80057798u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F798: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F798u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC3F798: 3C0C8008 lui $t4, 0x8008 */ - cpu->gpr[12] = 0x80080000u; - PGXP_ALU(0x3C0C8008u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057798u); -#endif - /* 0xBFC3F79C: 8D8C9C28 lw $t4, -25560($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005779Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8C9C28u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005779Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577A0u); -#endif - /* 0xBFC3F7A0: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800577A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F7A4: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800577A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3F7A8: A1800000 sb $zero, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800577A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1800000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800577A8u); -#endif - /* 0xBFC3F7AC: 8DCE9C30 lw $t6, -25552($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577ACu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C30u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800577ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010u); -#endif - /* 0xBFC3F7B0: 308D00FF andi $t5, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308D00FFu, cpu->gpr[13], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800577B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3F7B4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800577B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC3F7B8: A1CD0000 sb $t5, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800577B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA1CD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800577B8u); -#endif - /* 0xBFC3F7BC: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577BCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800577BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F7C0: 240F00EE addiu $t7, $zero, 238 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (238)); - PGXP_ALU(0x240F00EEu, cpu->gpr[15], _pgx1, 0x000000EEu); } -#ifdef PSX_COSIM - cosim_instr(0x800577C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F7C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800577C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3F7C8: AC2FEE54 sw $t7, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577C8u); return; } g_debug_last_store_pc = 0x800577C8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE54u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800577C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F7CC: 2418000E addiu $t8, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2418000Eu, cpu->gpr[24], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x800577CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F7D0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800577D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3F7D4: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800577D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800577D4u); -#endif -label_BFC3F7D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F7D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F7D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577D8u); -#endif - /* 0xBFC3F7D8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800577D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F7DC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800577DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F7E0: 03E00008 jr $ra */ - psx_delay_BFC3F7E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F7E4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800577E4u); -#endif - if (psx_delay_BFC3F7E0) { - psx_delay_BFC3F7E0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F7E8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F7E8u); - int psx_delay_BFC3F7FC = 0; - int psx_taken_BFC3F7FC = 0; - int psx_delay_BFC3F808 = 0; - int psx_taken_BFC3F808 = 0; - int psx_delay_BFC3F81C = 0; - int psx_taken_BFC3F81C = 0; - int psx_delay_BFC3F824 = 0; - int psx_taken_BFC3F824 = 0; - int psx_delay_BFC3F82C = 0; - int psx_taken_BFC3F82C = 0; - int psx_delay_BFC3F840 = 0; - int psx_taken_BFC3F840 = 0; - int psx_delay_BFC3F848 = 0; - int psx_taken_BFC3F848 = 0; - int psx_delay_BFC3F864 = 0; - int psx_delay_BFC3F8C8 = 0; - int psx_delay_BFC3F8DC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F804u: goto label_BFC3F804; - case 0xBFC3F810u: goto label_BFC3F810; - case 0xBFC3F824u: goto label_BFC3F824; - case 0xBFC3F82Cu: goto label_BFC3F82C; - case 0xBFC3F834u: goto label_BFC3F834; - case 0xBFC3F848u: goto label_BFC3F848; - case 0xBFC3F850u: goto label_BFC3F850; - case 0xBFC3F854u: goto label_BFC3F854; - case 0xBFC3F86Cu: goto label_BFC3F86C; - case 0xBFC3F8D0u: goto label_BFC3F8D0; - case 0xBFC3F8D4u: goto label_BFC3F8D4; - default: break; - } - } -label_BFC3F7E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F7E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F7E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3F7E8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800577E8u); -#endif - /* 0xBFC3F7EC: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800577ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800577F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F7F0: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800577F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F7F4: 240300EB addiu $v1, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240300EBu, cpu->gpr[3], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800577F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F7F8: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800577F8u); return; } g_debug_last_store_pc = 0x800577F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800577F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3F7FC: 1043000D beq $v0, $v1, 0xBFC3F834 */ - uint32_t psx_brA_BFC3F7FC = cpu->gpr[2]; uint32_t psx_brB_BFC3F7FC = cpu->gpr[3]; - psx_taken_BFC3F7FC = (psx_brA_BFC3F7FC == psx_brB_BFC3F7FC); - psx_delay_BFC3F7FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3F800: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057800u); return; } g_debug_last_store_pc = 0x80057800u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057800u); -#endif - if (psx_delay_BFC3F7FC) { - psx_delay_BFC3F7FC = 0; - if (psx_taken_BFC3F7FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057834u); - goto label_BFC3F834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057804u); - } -label_BFC3F804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3F804: 240400E6 addiu $a0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240400E6u, cpu->gpr[4], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3F808: 1044000A beq $v0, $a0, 0xBFC3F834 */ - uint32_t psx_brA_BFC3F808 = cpu->gpr[2]; uint32_t psx_brB_BFC3F808 = cpu->gpr[4]; - psx_taken_BFC3F808 = (psx_brA_BFC3F808 == psx_brB_BFC3F808); - psx_delay_BFC3F808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F80C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005780Cu); -#endif - if (psx_delay_BFC3F808) { - psx_delay_BFC3F808 = 0; - if (psx_taken_BFC3F808) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057834u); - goto label_BFC3F834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057810u); - } -label_BFC3F810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3F810: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057810u); -#endif - /* 0xBFC3F814: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057814u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F818: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3F81C: 10430005 beq $v0, $v1, 0xBFC3F834 */ - uint32_t psx_brA_BFC3F81C = cpu->gpr[2]; uint32_t psx_brB_BFC3F81C = cpu->gpr[3]; - psx_taken_BFC3F81C = (psx_brA_BFC3F81C == psx_brB_BFC3F81C); - psx_delay_BFC3F81C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F820: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057820u); -#endif - if (psx_delay_BFC3F81C) { - psx_delay_BFC3F81C = 0; - if (psx_taken_BFC3F81C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057834u); - goto label_BFC3F834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057824u); - } -label_BFC3F824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC3F824: 10440003 beq $v0, $a0, 0xBFC3F834 */ - uint32_t psx_brA_BFC3F824 = cpu->gpr[2]; uint32_t psx_brB_BFC3F824 = cpu->gpr[4]; - psx_taken_BFC3F824 = (psx_brA_BFC3F824 == psx_brB_BFC3F824); - psx_delay_BFC3F824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F828: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057828u); -#endif - if (psx_delay_BFC3F824) { - psx_delay_BFC3F824 = 0; - if (psx_taken_BFC3F824) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057834u); - goto label_BFC3F834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005782Cu); - } -label_BFC3F82C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F82Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F82Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005782Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F82C: 10000029 beq $zero, $zero, 0xBFC3F8D4 */ - uint32_t psx_brA_BFC3F82C = cpu->gpr[0]; uint32_t psx_brB_BFC3F82C = cpu->gpr[0]; - psx_taken_BFC3F82C = (psx_brA_BFC3F82C == psx_brB_BFC3F82C); - psx_delay_BFC3F82C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F830: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057830u); -#endif - if (psx_delay_BFC3F82C) { - psx_delay_BFC3F82C = 0; - if (psx_taken_BFC3F82C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800578D4u); - goto label_BFC3F8D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057834u); - } -label_BFC3F834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F834: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057834u); -#endif - /* 0xBFC3F838: 8DCEEE60 lw $t6, -4512($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057838u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE60u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F83C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005783Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3F840: 11C00004 beq $t6, $zero, 0xBFC3F854 */ - uint32_t psx_brA_BFC3F840 = cpu->gpr[14]; uint32_t psx_brB_BFC3F840 = cpu->gpr[0]; - psx_taken_BFC3F840 = (psx_brA_BFC3F840 == psx_brB_BFC3F840); - psx_delay_BFC3F840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F844: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057844u); -#endif - if (psx_delay_BFC3F840) { - psx_delay_BFC3F840 = 0; - if (psx_taken_BFC3F840) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057854u); - goto label_BFC3F854; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057848u); - } -label_BFC3F848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F848: 10000022 beq $zero, $zero, 0xBFC3F8D4 */ - uint32_t psx_brA_BFC3F848 = cpu->gpr[0]; uint32_t psx_brB_BFC3F848 = cpu->gpr[0]; - psx_taken_BFC3F848 = (psx_brA_BFC3F848 == psx_brB_BFC3F848); - psx_delay_BFC3F848 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F84C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005784Cu); -#endif - if (psx_delay_BFC3F848) { - psx_delay_BFC3F848 = 0; - if (psx_taken_BFC3F848) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800578D4u); - goto label_BFC3F8D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057850u); - } -label_BFC3F850: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F850u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F850: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057850u); -#endif -label_BFC3F854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F854: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3F858: AC2FEE78 sw $t7, -4488($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057858u); return; } g_debug_last_store_pc = 0x80057858u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F85C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005785Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F860: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F864: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x8005786Cu; /* jal link before delay slot */ - psx_delay_BFC3F864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F868: AC38EE60 sw $t8, -4512($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057868u); return; } g_debug_last_store_pc = 0x80057868u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE60u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057868u); -#endif - if (psx_delay_BFC3F864) { - psx_delay_BFC3F864 = 0; - cpu->gpr[31] = 0x8005786Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F86C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F86Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005786Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3F86C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005786Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057870u); -#endif - /* 0xBFC3F870: 8C429C28 lw $v0, -25560($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057870u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429C28u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F874: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057874u); -#endif - /* 0xBFC3F878: 8C639C34 lw $v1, -25548($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057878u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C34u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057878u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F87C: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005787Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005787Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057880u); -#endif - /* 0xBFC3F880: 90400000 lbu $zero, 0($v0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 0, 0x4u); -#ifdef PSX_COSIM - cosim_instr(0x80057880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F884: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057884u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057884u); -#endif - /* 0xBFC3F888: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x80057888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F88C: 24190080 addiu $t9, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24190080u, cpu->gpr[25], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8005788Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F890: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057890u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC3F894: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC3F898: A0790000 sb $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057898u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057898u); -#endif - /* 0xBFC3F89C: 8D299C20 lw $t1, -25568($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25568; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005789Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299C20u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005789Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3F8A0: 3C080002 lui $t0, 0x2 */ - cpu->gpr[8] = 0x00020000u; - PGXP_ALU(0x3C080002u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800578A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3F8A4: 35080943 ori $t0, $t0, 0x943 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x943u; - PGXP_ALU(0x35080943u, cpu->gpr[8], _pgx1, 0x0943u); } -#ifdef PSX_COSIM - cosim_instr(0x800578A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC3F8A8: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800578A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3F8AC: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578ACu); return; } g_debug_last_store_pc = 0x800578ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800578ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578B0u); -#endif - /* 0xBFC3F8B0: 8D6B9C24 lw $t3, -25564($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25564; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578B0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9C24u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800578B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC3F8B4: 240A132C addiu $t2, $zero, 4908 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (4908)); - PGXP_ALU(0x240A132Cu, cpu->gpr[10], _pgx1, 0x0000132Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800578B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC3F8B8: AD6A0000 sw $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578B8u); return; } g_debug_last_store_pc = 0x800578B8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAD6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800578B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3F8BC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800578BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578C0u); -#endif - /* 0xBFC3F8C0: 8CA5EE88 lw $a1, -4472($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578C0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5EE88u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800578C0u); -#endif - /* 0xBFC3F8C4: 8FA40020 lw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800578C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F8C8: 0C0166EA jal 0xB0059BA8 */ - cpu->gpr[31] = 0x800578D0u; /* jal link before delay slot */ - psx_delay_BFC3F8C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F8CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800578CCu); -#endif - if (psx_delay_BFC3F8C8) { - psx_delay_BFC3F8C8 = 0; - cpu->gpr[31] = 0x800578D0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059BA8u); - cpu->pc = 0x80059BA8u; return; - } -label_BFC3F8D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F8D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F8D0: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800578D0u); -#endif -label_BFC3F8D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F8D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F8D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578D4u); -#endif - /* 0xBFC3F8D4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800578D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F8D8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800578D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F8DC: 03E00008 jr $ra */ - psx_delay_BFC3F8DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F8E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800578E0u); -#endif - if (psx_delay_BFC3F8DC) { - psx_delay_BFC3F8DC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F8E4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F8E4u); - int psx_delay_BFC3F8F4 = 0; - int psx_taken_BFC3F8F4 = 0; - int psx_delay_BFC3F900 = 0; - int psx_taken_BFC3F900 = 0; - int psx_delay_BFC3F908 = 0; - int psx_taken_BFC3F908 = 0; - int psx_delay_BFC3F92C = 0; - int psx_taken_BFC3F92C = 0; - int psx_delay_BFC3F934 = 0; - int psx_taken_BFC3F934 = 0; - int psx_delay_BFC3F944 = 0; - int psx_delay_BFC3F9A4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F8FCu: goto label_BFC3F8FC; - case 0xBFC3F908u: goto label_BFC3F908; - case 0xBFC3F910u: goto label_BFC3F910; - case 0xBFC3F934u: goto label_BFC3F934; - case 0xBFC3F93Cu: goto label_BFC3F93C; - case 0xBFC3F94Cu: goto label_BFC3F94C; - case 0xBFC3F99Cu: goto label_BFC3F99C; - default: break; - } - } -label_BFC3F8E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F8E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F8E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F8E4: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800578E4u); -#endif - /* 0xBFC3F8E8: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800578E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F8EC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800578ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F8F0: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800578F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F8F4: 10610006 beq $v1, $at, 0xBFC3F910 */ - uint32_t psx_brA_BFC3F8F4 = cpu->gpr[3]; uint32_t psx_brB_BFC3F8F4 = cpu->gpr[1]; - psx_taken_BFC3F8F4 = (psx_brA_BFC3F8F4 == psx_brB_BFC3F8F4); - psx_delay_BFC3F8F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F8F8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800578F8u); return; } g_debug_last_store_pc = 0x800578F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800578F8u); -#endif - if (psx_delay_BFC3F8F4) { - psx_delay_BFC3F8F4 = 0; - if (psx_taken_BFC3F8F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057910u); - goto label_BFC3F910; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800578FCu); - } -label_BFC3F8FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F8FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F8FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800578FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F8FC: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800578FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F900: 10610003 beq $v1, $at, 0xBFC3F910 */ - uint32_t psx_brA_BFC3F900 = cpu->gpr[3]; uint32_t psx_brB_BFC3F900 = cpu->gpr[1]; - psx_taken_BFC3F900 = (psx_brA_BFC3F900 == psx_brB_BFC3F900); - psx_delay_BFC3F900 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F904: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057904u); -#endif - if (psx_delay_BFC3F900) { - psx_delay_BFC3F900 = 0; - if (psx_taken_BFC3F900) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057910u); - goto label_BFC3F910; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057908u); - } -label_BFC3F908: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F908u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F908: 10000024 beq $zero, $zero, 0xBFC3F99C */ - uint32_t psx_brA_BFC3F908 = cpu->gpr[0]; uint32_t psx_brB_BFC3F908 = cpu->gpr[0]; - psx_taken_BFC3F908 = (psx_brA_BFC3F908 == psx_brB_BFC3F908); - psx_delay_BFC3F908 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F90C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005790Cu); -#endif - if (psx_delay_BFC3F908) { - psx_delay_BFC3F908 = 0; - if (psx_taken_BFC3F908) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005799Cu); - goto label_BFC3F99C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057910u); - } -label_BFC3F910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F910: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057910u); -#endif - /* 0xBFC3F914: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057914u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F918: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC3F91C: AC24EE84 sw $a0, -4476($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005791Cu); return; } g_debug_last_store_pc = 0x8005791Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE84u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005791Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057920u); -#endif - /* 0xBFC3F920: 91C20000 lbu $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 2, 0x4000u); - PGXP_LOAD(0x91C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F924: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057924u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC3F928: 304F0008 andi $t7, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC3F92C: 11E10003 beq $t7, $at, 0xBFC3F93C */ - uint32_t psx_brA_BFC3F92C = cpu->gpr[15]; uint32_t psx_brB_BFC3F92C = cpu->gpr[1]; - psx_taken_BFC3F92C = (psx_brA_BFC3F92C == psx_brB_BFC3F92C); - psx_delay_BFC3F92C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F930: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057930u); -#endif - if (psx_delay_BFC3F92C) { - psx_delay_BFC3F92C = 0; - if (psx_taken_BFC3F92C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005793Cu); - goto label_BFC3F93C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057934u); - } -label_BFC3F934: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F934u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F934: 10000019 beq $zero, $zero, 0xBFC3F99C */ - uint32_t psx_brA_BFC3F934 = cpu->gpr[0]; uint32_t psx_brB_BFC3F934 = cpu->gpr[0]; - psx_taken_BFC3F934 = (psx_brA_BFC3F934 == psx_brB_BFC3F934); - psx_delay_BFC3F934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F938: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057938u); -#endif - if (psx_delay_BFC3F934) { - psx_delay_BFC3F934 = 0; - if (psx_taken_BFC3F934) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005799Cu); - goto label_BFC3F99C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005793Cu); - } -label_BFC3F93C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F93Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F93Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005793Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F93C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005793Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F940: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057940u); return; } g_debug_last_store_pc = 0x80057940u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F944: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x8005794Cu; /* jal link before delay slot */ - psx_delay_BFC3F944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3F948: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057948u); return; } g_debug_last_store_pc = 0x80057948u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057948u); -#endif - if (psx_delay_BFC3F944) { - psx_delay_BFC3F944 = 0; - cpu->gpr[31] = 0x8005794Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F94C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F94Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F94Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3F94C: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005794Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057950u); -#endif - /* 0xBFC3F950: 8F189C28 lw $t8, -25560($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057950u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C28u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3F954: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057954u); -#endif - /* 0xBFC3F958: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057958u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057958u); -#endif - /* 0xBFC3F95C: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005795Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005795Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3F960: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F964: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057964u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057964u); -#endif - /* 0xBFC3F968: 8D089C30 lw $t0, -25552($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057968u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089C30u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC3F96C: 309900FF andi $t9, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x309900FFu, cpu->gpr[25], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005796Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F970: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3F974: A1190000 sb $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057974u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3F978: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F97C: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005797Cu); return; } g_debug_last_store_pc = 0x8005797Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005797Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057980u); -#endif - /* 0xBFC3F980: 8D4A9C2C lw $t2, -25556($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057980u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C2Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3F984: 2409000E addiu $t1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2409000Eu, cpu->gpr[9], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80057984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3F988: 2403000E addiu $v1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2403000Eu, cpu->gpr[3], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x80057988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F98C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005798Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3F990: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057990u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3F994: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057994u); return; } g_debug_last_store_pc = 0x80057994u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F998: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057998u); -#endif -label_BFC3F99C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F99Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F99Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005799Cu); -#endif - /* 0xBFC3F99C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005799Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005799Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F9A0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800579A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3F9A4: 03E00008 jr $ra */ - psx_delay_BFC3F9A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F9A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800579A8u); -#endif - if (psx_delay_BFC3F9A4) { - psx_delay_BFC3F9A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3F9AC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3F9ACu); - int psx_delay_BFC3F9BC = 0; - int psx_taken_BFC3F9BC = 0; - int psx_delay_BFC3F9C4 = 0; - int psx_taken_BFC3F9C4 = 0; - int psx_delay_BFC3F9CC = 0; - int psx_delay_BFC3FA08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3F9C4u: goto label_BFC3F9C4; - case 0xBFC3F9CCu: goto label_BFC3F9CC; - case 0xBFC3F9D4u: goto label_BFC3F9D4; - case 0xBFC3FA00u: goto label_BFC3FA00; - default: break; - } - } -label_BFC3F9AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F9ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F9ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3F9AC: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800579ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579B0u); -#endif - /* 0xBFC3F9B0: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800579B0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800579B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3F9B4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800579B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3F9B8: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800579B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3F9BC: 11C10003 beq $t6, $at, 0xBFC3F9CC */ - uint32_t psx_brA_BFC3F9BC = cpu->gpr[14]; uint32_t psx_brB_BFC3F9BC = cpu->gpr[1]; - psx_taken_BFC3F9BC = (psx_brA_BFC3F9BC == psx_brB_BFC3F9BC); - psx_delay_BFC3F9BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3F9C0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800579C0u); return; } g_debug_last_store_pc = 0x800579C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800579C0u); -#endif - if (psx_delay_BFC3F9BC) { - psx_delay_BFC3F9BC = 0; - if (psx_taken_BFC3F9BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800579CCu); - goto label_BFC3F9CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800579C4u); - } -label_BFC3F9C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F9C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F9C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F9C4: 1000000E beq $zero, $zero, 0xBFC3FA00 */ - uint32_t psx_brA_BFC3F9C4 = cpu->gpr[0]; uint32_t psx_brB_BFC3F9C4 = cpu->gpr[0]; - psx_taken_BFC3F9C4 = (psx_brA_BFC3F9C4 == psx_brB_BFC3F9C4); - psx_delay_BFC3F9C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F9C8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800579C8u); -#endif - if (psx_delay_BFC3F9C4) { - psx_delay_BFC3F9C4 = 0; - if (psx_taken_BFC3F9C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A00u); - goto label_BFC3FA00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800579CCu); - } -label_BFC3F9CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F9CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F9CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3F9CC: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800579D4u; /* jal link before delay slot */ - psx_delay_BFC3F9CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3F9D0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800579D0u); -#endif - if (psx_delay_BFC3F9CC) { - psx_delay_BFC3F9CC = 0; - cpu->gpr[31] = 0x800579D4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3F9D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3F9D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3F9D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3F9D4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800579D4u); -#endif - /* 0xBFC3F9D8: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800579D8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800579D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC3F9DC: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800579DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3F9E0: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800579E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800579E0u); -#endif - /* 0xBFC3F9E4: 8D089C2C lw $t0, -25556($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800579E4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089C2Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800579E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3F9E8: 24180007 addiu $t8, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24180007u, cpu->gpr[24], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x800579E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3F9EC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800579ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800579F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3F9F0: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800579F0u); return; } g_debug_last_store_pc = 0x800579F0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800579F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3F9F4: 24190007 addiu $t9, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24190007u, cpu->gpr[25], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x800579F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3F9F8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800579F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC3F9FC: A1190000 sb $t9, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800579FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA1190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800579FCu); -#endif -label_BFC3FA00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A00u); -#endif - /* 0xBFC3FA00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057A00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FA04: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FA08: 03E00008 jr $ra */ - psx_delay_BFC3FA08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057A0Cu); -#endif - if (psx_delay_BFC3FA08) { - psx_delay_BFC3FA08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FA10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FA10u); - int psx_delay_BFC3FA14 = 0; - int psx_taken_BFC3FA14 = 0; - int psx_delay_BFC3FA28 = 0; - int psx_taken_BFC3FA28 = 0; - int psx_delay_BFC3FA30 = 0; - int psx_taken_BFC3FA30 = 0; - int psx_delay_BFC3FA38 = 0; - int psx_taken_BFC3FA38 = 0; - int psx_delay_BFC3FA4C = 0; - int psx_taken_BFC3FA4C = 0; - int psx_delay_BFC3FA54 = 0; - int psx_taken_BFC3FA54 = 0; - int psx_delay_BFC3FA5C = 0; - int psx_taken_BFC3FA5C = 0; - int psx_delay_BFC3FA64 = 0; - int psx_taken_BFC3FA64 = 0; - int psx_delay_BFC3FA6C = 0; - int psx_taken_BFC3FA6C = 0; - int psx_delay_BFC3FA74 = 0; - int psx_taken_BFC3FA74 = 0; - int psx_delay_BFC3FA7C = 0; - int psx_taken_BFC3FA7C = 0; - int psx_delay_BFC3FA84 = 0; - int psx_taken_BFC3FA84 = 0; - int psx_delay_BFC3FA8C = 0; - int psx_taken_BFC3FA8C = 0; - int psx_delay_BFC3FA94 = 0; - int psx_taken_BFC3FA94 = 0; - int psx_delay_BFC3FA9C = 0; - int psx_taken_BFC3FA9C = 0; - int psx_delay_BFC3FAA8 = 0; - int psx_delay_BFC3FAE4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FA1Cu: goto label_BFC3FA1C; - case 0xBFC3FA30u: goto label_BFC3FA30; - case 0xBFC3FA38u: goto label_BFC3FA38; - case 0xBFC3FA40u: goto label_BFC3FA40; - case 0xBFC3FA54u: goto label_BFC3FA54; - case 0xBFC3FA5Cu: goto label_BFC3FA5C; - case 0xBFC3FA64u: goto label_BFC3FA64; - case 0xBFC3FA6Cu: goto label_BFC3FA6C; - case 0xBFC3FA74u: goto label_BFC3FA74; - case 0xBFC3FA7Cu: goto label_BFC3FA7C; - case 0xBFC3FA84u: goto label_BFC3FA84; - case 0xBFC3FA8Cu: goto label_BFC3FA8C; - case 0xBFC3FA94u: goto label_BFC3FA94; - case 0xBFC3FA9Cu: goto label_BFC3FA9C; - case 0xBFC3FAA0u: goto label_BFC3FAA0; - case 0xBFC3FAA4u: goto label_BFC3FAA4; - case 0xBFC3FAA8u: goto label_BFC3FAA8; - case 0xBFC3FAB0u: goto label_BFC3FAB0; - case 0xBFC3FADCu: goto label_BFC3FADC; - default: break; - } - } -label_BFC3FA10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FA10: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA14: 1000000A beq $zero, $zero, 0xBFC3FA40 */ - uint32_t psx_brA_BFC3FA14 = cpu->gpr[0]; uint32_t psx_brB_BFC3FA14 = cpu->gpr[0]; - psx_taken_BFC3FA14 = (psx_brA_BFC3FA14 == psx_brB_BFC3FA14); - psx_delay_BFC3FA14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FA18: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057A18u); return; } g_debug_last_store_pc = 0x80057A18u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057A18u); -#endif - if (psx_delay_BFC3FA14) { - psx_delay_BFC3FA14 = 0; - if (psx_taken_BFC3FA14) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A40u); - goto label_BFC3FA40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - } -label_BFC3FA1C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA1Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FA1C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A20u); -#endif - /* 0xBFC3FA20: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057A20u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA24: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3FA28: 15C00014 bne $t6, $zero, 0xBFC3FA7C */ - uint32_t psx_brA_BFC3FA28 = cpu->gpr[14]; uint32_t psx_brB_BFC3FA28 = cpu->gpr[0]; - psx_taken_BFC3FA28 = (psx_brA_BFC3FA28 != psx_brB_BFC3FA28); - psx_delay_BFC3FA28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA2C: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A2Cu); -#endif - if (psx_delay_BFC3FA28) { - psx_delay_BFC3FA28 = 0; - if (psx_taken_BFC3FA28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A7Cu); - goto label_BFC3FA7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A30u); - } -label_BFC3FA30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA30: 1000002A beq $zero, $zero, 0xBFC3FADC */ - uint32_t psx_brA_BFC3FA30 = cpu->gpr[0]; uint32_t psx_brB_BFC3FA30 = cpu->gpr[0]; - psx_taken_BFC3FA30 = (psx_brA_BFC3FA30 == psx_brB_BFC3FA30); - psx_delay_BFC3FA30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FA34: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057A34u); -#endif - if (psx_delay_BFC3FA30) { - psx_delay_BFC3FA30 = 0; - if (psx_taken_BFC3FA30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057ADCu); - goto label_BFC3FADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A38u); - } -label_BFC3FA38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA38: 10000028 beq $zero, $zero, 0xBFC3FADC */ - uint32_t psx_brA_BFC3FA38 = cpu->gpr[0]; uint32_t psx_brB_BFC3FA38 = cpu->gpr[0]; - psx_taken_BFC3FA38 = (psx_brA_BFC3FA38 == psx_brB_BFC3FA38); - psx_delay_BFC3FA38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FA3C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057A3Cu); -#endif - if (psx_delay_BFC3FA38) { - psx_delay_BFC3FA38 = 0; - if (psx_taken_BFC3FA38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057ADCu); - goto label_BFC3FADC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A40u); - } -label_BFC3FA40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FA40: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057A40u); -#endif - /* 0xBFC3FA44: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057A44u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FA48: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FA4C: 1062FFF3 beq $v1, $v0, 0xBFC3FA1C */ - uint32_t psx_brA_BFC3FA4C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA4C = cpu->gpr[2]; - psx_taken_BFC3FA4C = (psx_brA_BFC3FA4C == psx_brB_BFC3FA4C); - psx_delay_BFC3FA4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA50: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A50u); -#endif - if (psx_delay_BFC3FA4C) { - psx_delay_BFC3FA4C = 0; - if (psx_taken_BFC3FA4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - goto label_BFC3FA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A54u); - } -label_BFC3FA54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA54: 1061FFF1 beq $v1, $at, 0xBFC3FA1C */ - uint32_t psx_brA_BFC3FA54 = cpu->gpr[3]; uint32_t psx_brB_BFC3FA54 = cpu->gpr[1]; - psx_taken_BFC3FA54 = (psx_brA_BFC3FA54 == psx_brB_BFC3FA54); - psx_delay_BFC3FA54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA58: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A58u); -#endif - if (psx_delay_BFC3FA54) { - psx_delay_BFC3FA54 = 0; - if (psx_taken_BFC3FA54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - goto label_BFC3FA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A5Cu); - } -label_BFC3FA5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA5C: 1061FFEF beq $v1, $at, 0xBFC3FA1C */ - uint32_t psx_brA_BFC3FA5C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA5C = cpu->gpr[1]; - psx_taken_BFC3FA5C = (psx_brA_BFC3FA5C == psx_brB_BFC3FA5C); - psx_delay_BFC3FA5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA60: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A60u); -#endif - if (psx_delay_BFC3FA5C) { - psx_delay_BFC3FA5C = 0; - if (psx_taken_BFC3FA5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - goto label_BFC3FA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A64u); - } -label_BFC3FA64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA64: 1061FFED beq $v1, $at, 0xBFC3FA1C */ - uint32_t psx_brA_BFC3FA64 = cpu->gpr[3]; uint32_t psx_brB_BFC3FA64 = cpu->gpr[1]; - psx_taken_BFC3FA64 = (psx_brA_BFC3FA64 == psx_brB_BFC3FA64); - psx_delay_BFC3FA64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA68: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057A68u); -#endif - if (psx_delay_BFC3FA64) { - psx_delay_BFC3FA64 = 0; - if (psx_taken_BFC3FA64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - goto label_BFC3FA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A6Cu); - } -label_BFC3FA6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA6C: 1061FFEB beq $v1, $at, 0xBFC3FA1C */ - uint32_t psx_brA_BFC3FA6C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA6C = cpu->gpr[1]; - psx_taken_BFC3FA6C = (psx_brA_BFC3FA6C == psx_brB_BFC3FA6C); - psx_delay_BFC3FA6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA70: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057A70u); -#endif - if (psx_delay_BFC3FA6C) { - psx_delay_BFC3FA6C = 0; - if (psx_taken_BFC3FA6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A1Cu); - goto label_BFC3FA1C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A74u); - } -label_BFC3FA74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA74: 1461FFF0 bne $v1, $at, 0xBFC3FA38 */ - uint32_t psx_brA_BFC3FA74 = cpu->gpr[3]; uint32_t psx_brB_BFC3FA74 = cpu->gpr[1]; - psx_taken_BFC3FA74 = (psx_brA_BFC3FA74 != psx_brB_BFC3FA74); - psx_delay_BFC3FA74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA78: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A78u); -#endif - if (psx_delay_BFC3FA74) { - psx_delay_BFC3FA74 = 0; - if (psx_taken_BFC3FA74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A38u); - goto label_BFC3FA38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A7Cu); - } -label_BFC3FA7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA7C: 10610008 beq $v1, $at, 0xBFC3FAA0 */ - uint32_t psx_brA_BFC3FA7C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA7C = cpu->gpr[1]; - psx_taken_BFC3FA7C = (psx_brA_BFC3FA7C == psx_brB_BFC3FA7C); - psx_delay_BFC3FA7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA80: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057A80u); -#endif - if (psx_delay_BFC3FA7C) { - psx_delay_BFC3FA7C = 0; - if (psx_taken_BFC3FA7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA0u); - goto label_BFC3FAA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A84u); - } -label_BFC3FA84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA84: 10610006 beq $v1, $at, 0xBFC3FAA0 */ - uint32_t psx_brA_BFC3FA84 = cpu->gpr[3]; uint32_t psx_brB_BFC3FA84 = cpu->gpr[1]; - psx_taken_BFC3FA84 = (psx_brA_BFC3FA84 == psx_brB_BFC3FA84); - psx_delay_BFC3FA84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FA88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057A88u); -#endif - if (psx_delay_BFC3FA84) { - psx_delay_BFC3FA84 = 0; - if (psx_taken_BFC3FA84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA0u); - goto label_BFC3FAA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A8Cu); - } -label_BFC3FA8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FA8C: 10620004 beq $v1, $v0, 0xBFC3FAA0 */ - uint32_t psx_brA_BFC3FA8C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA8C = cpu->gpr[2]; - psx_taken_BFC3FA8C = (psx_brA_BFC3FA8C == psx_brB_BFC3FA8C); - psx_delay_BFC3FA8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA90: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A90u); -#endif - if (psx_delay_BFC3FA8C) { - psx_delay_BFC3FA8C = 0; - if (psx_taken_BFC3FA8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA0u); - goto label_BFC3FAA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A94u); - } -label_BFC3FA94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA94: 10610002 beq $v1, $at, 0xBFC3FAA0 */ - uint32_t psx_brA_BFC3FA94 = cpu->gpr[3]; uint32_t psx_brB_BFC3FA94 = cpu->gpr[1]; - psx_taken_BFC3FA94 = (psx_brA_BFC3FA94 == psx_brB_BFC3FA94); - psx_delay_BFC3FA94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FA98: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80057A98u); -#endif - if (psx_delay_BFC3FA94) { - psx_delay_BFC3FA94 = 0; - if (psx_taken_BFC3FA94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA0u); - goto label_BFC3FAA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057A9Cu); - } -label_BFC3FA9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FA9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FA9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FA9C: 14610002 bne $v1, $at, 0xBFC3FAA8 */ - uint32_t psx_brA_BFC3FA9C = cpu->gpr[3]; uint32_t psx_brB_BFC3FA9C = cpu->gpr[1]; - psx_taken_BFC3FA9C = (psx_brA_BFC3FA9C != psx_brB_BFC3FA9C); - psx_delay_BFC3FA9C = 1; -label_BFC3FAA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FAA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FAA0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057AA0u); -#endif - if (psx_delay_BFC3FA9C) { - psx_delay_BFC3FA9C = 0; - if (psx_taken_BFC3FA9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA8u); - goto label_BFC3FAA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057AA4u); - } -label_BFC3FAA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FAA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FAA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FAA4: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057AA4u); return; } g_debug_last_store_pc = 0x80057AA4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AA4u); -#endif -label_BFC3FAA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FAA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FAA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FAA8: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057AB0u; /* jal link before delay slot */ - psx_delay_BFC3FAA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FAAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057AACu); -#endif - if (psx_delay_BFC3FAA8) { - psx_delay_BFC3FAA8 = 0; - cpu->gpr[31] = 0x80057AB0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FAB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FAB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FAB0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057AB0u); -#endif - /* 0xBFC3FAB4: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057AB4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FAB8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057AB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FABC: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057ABCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AC0u); -#endif - /* 0xBFC3FAC0: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057AC0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3FAC4: 24180009 addiu $t8, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24180009u, cpu->gpr[24], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FAC8: 24030009 addiu $v1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24030009u, cpu->gpr[3], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FACC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3FAD0: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057AD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FAD4: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057AD4u); return; } g_debug_last_store_pc = 0x80057AD4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FAD8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AD8u); -#endif -label_BFC3FADC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FADCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057ADCu); -#endif - /* 0xBFC3FADC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057ADCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FAE0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FAE4: 03E00008 jr $ra */ - psx_delay_BFC3FAE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FAE8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057AE8u); -#endif - if (psx_delay_BFC3FAE4) { - psx_delay_BFC3FAE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FAEC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FAECu); - int psx_delay_BFC3FAFC = 0; - int psx_taken_BFC3FAFC = 0; - int psx_delay_BFC3FB08 = 0; - int psx_taken_BFC3FB08 = 0; - int psx_delay_BFC3FB10 = 0; - int psx_taken_BFC3FB10 = 0; - int psx_delay_BFC3FB18 = 0; - int psx_taken_BFC3FB18 = 0; - int psx_delay_BFC3FB20 = 0; - int psx_taken_BFC3FB20 = 0; - int psx_delay_BFC3FB28 = 0; - int psx_taken_BFC3FB28 = 0; - int psx_delay_BFC3FB3C = 0; - int psx_delay_BFC3FB6C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FB04u: goto label_BFC3FB04; - case 0xBFC3FB10u: goto label_BFC3FB10; - case 0xBFC3FB18u: goto label_BFC3FB18; - case 0xBFC3FB20u: goto label_BFC3FB20; - case 0xBFC3FB28u: goto label_BFC3FB28; - case 0xBFC3FB30u: goto label_BFC3FB30; - case 0xBFC3FB44u: goto label_BFC3FB44; - case 0xBFC3FB64u: goto label_BFC3FB64; - default: break; - } - } -label_BFC3FAEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FAECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FAECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3FAEC: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057AF0u); -#endif - /* 0xBFC3FAF0: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057AF0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FAF4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FAF8: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057AF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3FAFC: 10410006 beq $v0, $at, 0xBFC3FB18 */ - uint32_t psx_brA_BFC3FAFC = cpu->gpr[2]; uint32_t psx_brB_BFC3FAFC = cpu->gpr[1]; - psx_taken_BFC3FAFC = (psx_brA_BFC3FAFC == psx_brB_BFC3FAFC); - psx_delay_BFC3FAFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FB00: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B00u); return; } g_debug_last_store_pc = 0x80057B00u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B00u); -#endif - if (psx_delay_BFC3FAFC) { - psx_delay_BFC3FAFC = 0; - if (psx_taken_BFC3FAFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B18u); - goto label_BFC3FB18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B04u); - } -label_BFC3FB04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FB04: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC3FB08: 10410005 beq $v0, $at, 0xBFC3FB20 */ - uint32_t psx_brA_BFC3FB08 = cpu->gpr[2]; uint32_t psx_brB_BFC3FB08 = cpu->gpr[1]; - psx_taken_BFC3FB08 = (psx_brA_BFC3FB08 == psx_brB_BFC3FB08); - psx_delay_BFC3FB08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057B0Cu); -#endif - if (psx_delay_BFC3FB08) { - psx_delay_BFC3FB08 = 0; - if (psx_taken_BFC3FB08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B20u); - goto label_BFC3FB20; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B10u); - } -label_BFC3FB10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB10: 10000005 beq $zero, $zero, 0xBFC3FB28 */ - uint32_t psx_brA_BFC3FB10 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB10 = cpu->gpr[0]; - psx_taken_BFC3FB10 = (psx_brA_BFC3FB10 == psx_brB_BFC3FB10); - psx_delay_BFC3FB10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057B14u); -#endif - if (psx_delay_BFC3FB10) { - psx_delay_BFC3FB10 = 0; - if (psx_taken_BFC3FB10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B28u); - goto label_BFC3FB28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B18u); - } -label_BFC3FB18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB18: 10000005 beq $zero, $zero, 0xBFC3FB30 */ - uint32_t psx_brA_BFC3FB18 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB18 = cpu->gpr[0]; - psx_taken_BFC3FB18 = (psx_brA_BFC3FB18 == psx_brB_BFC3FB18); - psx_delay_BFC3FB18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FB1C: 24030006 addiu $v1, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x24030006u, cpu->gpr[3], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B1Cu); -#endif - if (psx_delay_BFC3FB18) { - psx_delay_BFC3FB18 = 0; - if (psx_taken_BFC3FB18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B30u); - goto label_BFC3FB30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B20u); - } -label_BFC3FB20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB20: 10000003 beq $zero, $zero, 0xBFC3FB30 */ - uint32_t psx_brA_BFC3FB20 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB20 = cpu->gpr[0]; - psx_taken_BFC3FB20 = (psx_brA_BFC3FB20 == psx_brB_BFC3FB20); - psx_delay_BFC3FB20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FB24: 2403001B addiu $v1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2403001Bu, cpu->gpr[3], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80057B24u); -#endif - if (psx_delay_BFC3FB20) { - psx_delay_BFC3FB20 = 0; - if (psx_taken_BFC3FB20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B30u); - goto label_BFC3FB30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B28u); - } -label_BFC3FB28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB28: 1000000E beq $zero, $zero, 0xBFC3FB64 */ - uint32_t psx_brA_BFC3FB28 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB28 = cpu->gpr[0]; - psx_taken_BFC3FB28 = (psx_brA_BFC3FB28 == psx_brB_BFC3FB28); - psx_delay_BFC3FB28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FB2C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057B2Cu); -#endif - if (psx_delay_BFC3FB28) { - psx_delay_BFC3FB28 = 0; - if (psx_taken_BFC3FB28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B64u); - goto label_BFC3FB64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B30u); - } -label_BFC3FB30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3FB30: 240E0050 addiu $t6, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x240E0050u, cpu->gpr[14], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FB34: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3FB38: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B38u); return; } g_debug_last_store_pc = 0x80057B38u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FB3C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057B44u; /* jal link before delay slot */ - psx_delay_BFC3FB3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC3FB40: A3A3001C sb $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057B40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (28)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA3A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B40u); -#endif - if (psx_delay_BFC3FB3C) { - psx_delay_BFC3FB3C = 0; - cpu->gpr[31] = 0x80057B44u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FB44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FB44: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057B44u); -#endif - /* 0xBFC3FB48: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B48u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B48u); -#endif - /* 0xBFC3FB4C: 93A3001C lbu $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 3, 0x20000000u); - PGXP_LOAD(0x93A3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC3FB50: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FB54: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057B54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B54u); -#endif - /* 0xBFC3FB58: 8F189C2C lw $t8, -25556($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B58u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FB5C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC3FB60: A3030000 sb $v1, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057B60u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA3030000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B60u); -#endif -label_BFC3FB64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B64u); -#endif - /* 0xBFC3FB64: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FB68: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FB6C: 03E00008 jr $ra */ - psx_delay_BFC3FB6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB70: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057B70u); -#endif - if (psx_delay_BFC3FB6C) { - psx_delay_BFC3FB6C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FB74(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FB74u); - int psx_delay_BFC3FB78 = 0; - int psx_taken_BFC3FB78 = 0; - int psx_delay_BFC3FB8C = 0; - int psx_taken_BFC3FB8C = 0; - int psx_delay_BFC3FB94 = 0; - int psx_taken_BFC3FB94 = 0; - int psx_delay_BFC3FB9C = 0; - int psx_taken_BFC3FB9C = 0; - int psx_delay_BFC3FBB0 = 0; - int psx_taken_BFC3FBB0 = 0; - int psx_delay_BFC3FBB8 = 0; - int psx_taken_BFC3FBB8 = 0; - int psx_delay_BFC3FBC0 = 0; - int psx_taken_BFC3FBC0 = 0; - int psx_delay_BFC3FBC8 = 0; - int psx_taken_BFC3FBC8 = 0; - int psx_delay_BFC3FBD0 = 0; - int psx_taken_BFC3FBD0 = 0; - int psx_delay_BFC3FBD8 = 0; - int psx_taken_BFC3FBD8 = 0; - int psx_delay_BFC3FBE0 = 0; - int psx_taken_BFC3FBE0 = 0; - int psx_delay_BFC3FBE8 = 0; - int psx_taken_BFC3FBE8 = 0; - int psx_delay_BFC3FBF0 = 0; - int psx_taken_BFC3FBF0 = 0; - int psx_delay_BFC3FBF8 = 0; - int psx_taken_BFC3FBF8 = 0; - int psx_delay_BFC3FC00 = 0; - int psx_taken_BFC3FC00 = 0; - int psx_delay_BFC3FC0C = 0; - int psx_delay_BFC3FC48 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FB80u: goto label_BFC3FB80; - case 0xBFC3FB94u: goto label_BFC3FB94; - case 0xBFC3FB9Cu: goto label_BFC3FB9C; - case 0xBFC3FBA4u: goto label_BFC3FBA4; - case 0xBFC3FBB8u: goto label_BFC3FBB8; - case 0xBFC3FBC0u: goto label_BFC3FBC0; - case 0xBFC3FBC8u: goto label_BFC3FBC8; - case 0xBFC3FBD0u: goto label_BFC3FBD0; - case 0xBFC3FBD8u: goto label_BFC3FBD8; - case 0xBFC3FBE0u: goto label_BFC3FBE0; - case 0xBFC3FBE8u: goto label_BFC3FBE8; - case 0xBFC3FBF0u: goto label_BFC3FBF0; - case 0xBFC3FBF8u: goto label_BFC3FBF8; - case 0xBFC3FC00u: goto label_BFC3FC00; - case 0xBFC3FC04u: goto label_BFC3FC04; - case 0xBFC3FC08u: goto label_BFC3FC08; - case 0xBFC3FC0Cu: goto label_BFC3FC0C; - case 0xBFC3FC14u: goto label_BFC3FC14; - case 0xBFC3FC40u: goto label_BFC3FC40; - default: break; - } - } -label_BFC3FB74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FB74: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB78: 1000000A beq $zero, $zero, 0xBFC3FBA4 */ - uint32_t psx_brA_BFC3FB78 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB78 = cpu->gpr[0]; - psx_taken_BFC3FB78 = (psx_brA_BFC3FB78 == psx_brB_BFC3FB78); - psx_delay_BFC3FB78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FB7C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B7Cu); return; } g_debug_last_store_pc = 0x80057B7Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B7Cu); -#endif - if (psx_delay_BFC3FB78) { - psx_delay_BFC3FB78 = 0; - if (psx_taken_BFC3FB78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BA4u); - goto label_BFC3FBA4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - } -label_BFC3FB80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FB80: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057B80u); -#endif - /* 0xBFC3FB84: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057B84u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3FB8C: 15C00014 bne $t6, $zero, 0xBFC3FBE0 */ - uint32_t psx_brA_BFC3FB8C = cpu->gpr[14]; uint32_t psx_brB_BFC3FB8C = cpu->gpr[0]; - psx_taken_BFC3FB8C = (psx_brA_BFC3FB8C != psx_brB_BFC3FB8C); - psx_delay_BFC3FB8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FB90: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057B90u); -#endif - if (psx_delay_BFC3FB8C) { - psx_delay_BFC3FB8C = 0; - if (psx_taken_BFC3FB8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BE0u); - goto label_BFC3FBE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B94u); - } -label_BFC3FB94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB94: 1000002A beq $zero, $zero, 0xBFC3FC40 */ - uint32_t psx_brA_BFC3FB94 = cpu->gpr[0]; uint32_t psx_brB_BFC3FB94 = cpu->gpr[0]; - psx_taken_BFC3FB94 = (psx_brA_BFC3FB94 == psx_brB_BFC3FB94); - psx_delay_BFC3FB94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FB98: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057B98u); -#endif - if (psx_delay_BFC3FB94) { - psx_delay_BFC3FB94 = 0; - if (psx_taken_BFC3FB94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C40u); - goto label_BFC3FC40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B9Cu); - } -label_BFC3FB9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FB9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FB9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FB9C: 10000028 beq $zero, $zero, 0xBFC3FC40 */ - uint32_t psx_brA_BFC3FB9C = cpu->gpr[0]; uint32_t psx_brB_BFC3FB9C = cpu->gpr[0]; - psx_taken_BFC3FB9C = (psx_brA_BFC3FB9C == psx_brB_BFC3FB9C); - psx_delay_BFC3FB9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FBA0: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057BA0u); -#endif - if (psx_delay_BFC3FB9C) { - psx_delay_BFC3FB9C = 0; - if (psx_taken_BFC3FB9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C40u); - goto label_BFC3FC40; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BA4u); - } -label_BFC3FBA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FBA4: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057BA4u); -#endif - /* 0xBFC3FBA8: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057BA8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FBAC: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FBB0: 1062FFF3 beq $v1, $v0, 0xBFC3FB80 */ - uint32_t psx_brA_BFC3FBB0 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBB0 = cpu->gpr[2]; - psx_taken_BFC3FBB0 = (psx_brA_BFC3FBB0 == psx_brB_BFC3FBB0); - psx_delay_BFC3FBB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBB4: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BB4u); -#endif - if (psx_delay_BFC3FBB0) { - psx_delay_BFC3FBB0 = 0; - if (psx_taken_BFC3FBB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - goto label_BFC3FB80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BB8u); - } -label_BFC3FBB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBB8: 1061FFF1 beq $v1, $at, 0xBFC3FB80 */ - uint32_t psx_brA_BFC3FBB8 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBB8 = cpu->gpr[1]; - psx_taken_BFC3FBB8 = (psx_brA_BFC3FBB8 == psx_brB_BFC3FBB8); - psx_delay_BFC3FBB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBBC: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BBCu); -#endif - if (psx_delay_BFC3FBB8) { - psx_delay_BFC3FBB8 = 0; - if (psx_taken_BFC3FBB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - goto label_BFC3FB80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BC0u); - } -label_BFC3FBC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBC0: 1061FFEF beq $v1, $at, 0xBFC3FB80 */ - uint32_t psx_brA_BFC3FBC0 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBC0 = cpu->gpr[1]; - psx_taken_BFC3FBC0 = (psx_brA_BFC3FBC0 == psx_brB_BFC3FBC0); - psx_delay_BFC3FBC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBC4: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BC4u); -#endif - if (psx_delay_BFC3FBC0) { - psx_delay_BFC3FBC0 = 0; - if (psx_taken_BFC3FBC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - goto label_BFC3FB80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BC8u); - } -label_BFC3FBC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBC8: 1061FFED beq $v1, $at, 0xBFC3FB80 */ - uint32_t psx_brA_BFC3FBC8 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBC8 = cpu->gpr[1]; - psx_taken_BFC3FBC8 = (psx_brA_BFC3FBC8 == psx_brB_BFC3FBC8); - psx_delay_BFC3FBC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBCC: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057BCCu); -#endif - if (psx_delay_BFC3FBC8) { - psx_delay_BFC3FBC8 = 0; - if (psx_taken_BFC3FBC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - goto label_BFC3FB80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BD0u); - } -label_BFC3FBD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBD0: 1061FFEB beq $v1, $at, 0xBFC3FB80 */ - uint32_t psx_brA_BFC3FBD0 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBD0 = cpu->gpr[1]; - psx_taken_BFC3FBD0 = (psx_brA_BFC3FBD0 == psx_brB_BFC3FBD0); - psx_delay_BFC3FBD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBD4: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057BD4u); -#endif - if (psx_delay_BFC3FBD0) { - psx_delay_BFC3FBD0 = 0; - if (psx_taken_BFC3FBD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B80u); - goto label_BFC3FB80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BD8u); - } -label_BFC3FBD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBD8: 1461FFF0 bne $v1, $at, 0xBFC3FB9C */ - uint32_t psx_brA_BFC3FBD8 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBD8 = cpu->gpr[1]; - psx_taken_BFC3FBD8 = (psx_brA_BFC3FBD8 != psx_brB_BFC3FBD8); - psx_delay_BFC3FBD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBDC: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BDCu); -#endif - if (psx_delay_BFC3FBD8) { - psx_delay_BFC3FBD8 = 0; - if (psx_taken_BFC3FBD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057B9Cu); - goto label_BFC3FB9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BE0u); - } -label_BFC3FBE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBE0: 10610008 beq $v1, $at, 0xBFC3FC04 */ - uint32_t psx_brA_BFC3FBE0 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBE0 = cpu->gpr[1]; - psx_taken_BFC3FBE0 = (psx_brA_BFC3FBE0 == psx_brB_BFC3FBE0); - psx_delay_BFC3FBE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBE4: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057BE4u); -#endif - if (psx_delay_BFC3FBE0) { - psx_delay_BFC3FBE0 = 0; - if (psx_taken_BFC3FBE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C04u); - goto label_BFC3FC04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BE8u); - } -label_BFC3FBE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBE8: 10610006 beq $v1, $at, 0xBFC3FC04 */ - uint32_t psx_brA_BFC3FBE8 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBE8 = cpu->gpr[1]; - psx_taken_BFC3FBE8 = (psx_brA_BFC3FBE8 == psx_brB_BFC3FBE8); - psx_delay_BFC3FBE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FBEC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057BECu); -#endif - if (psx_delay_BFC3FBE8) { - psx_delay_BFC3FBE8 = 0; - if (psx_taken_BFC3FBE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C04u); - goto label_BFC3FC04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BF0u); - } -label_BFC3FBF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FBF0: 10620004 beq $v1, $v0, 0xBFC3FC04 */ - uint32_t psx_brA_BFC3FBF0 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBF0 = cpu->gpr[2]; - psx_taken_BFC3FBF0 = (psx_brA_BFC3FBF0 == psx_brB_BFC3FBF0); - psx_delay_BFC3FBF0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBF4: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BF4u); -#endif - if (psx_delay_BFC3FBF0) { - psx_delay_BFC3FBF0 = 0; - if (psx_taken_BFC3FBF0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C04u); - goto label_BFC3FC04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057BF8u); - } -label_BFC3FBF8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FBF8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FBF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FBF8: 10610002 beq $v1, $at, 0xBFC3FC04 */ - uint32_t psx_brA_BFC3FBF8 = cpu->gpr[3]; uint32_t psx_brB_BFC3FBF8 = cpu->gpr[1]; - psx_taken_BFC3FBF8 = (psx_brA_BFC3FBF8 == psx_brB_BFC3FBF8); - psx_delay_BFC3FBF8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FBFC: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80057BFCu); -#endif - if (psx_delay_BFC3FBF8) { - psx_delay_BFC3FBF8 = 0; - if (psx_taken_BFC3FBF8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C04u); - goto label_BFC3FC04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C00u); - } -label_BFC3FC00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FC00: 14610002 bne $v1, $at, 0xBFC3FC0C */ - uint32_t psx_brA_BFC3FC00 = cpu->gpr[3]; uint32_t psx_brB_BFC3FC00 = cpu->gpr[1]; - psx_taken_BFC3FC00 = (psx_brA_BFC3FC00 != psx_brB_BFC3FC00); - psx_delay_BFC3FC00 = 1; -label_BFC3FC04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FC04: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C04u); -#endif - if (psx_delay_BFC3FC00) { - psx_delay_BFC3FC00 = 0; - if (psx_taken_BFC3FC00) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C0Cu); - goto label_BFC3FC0C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C08u); - } -label_BFC3FC08: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC08u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FC08: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C08u); return; } g_debug_last_store_pc = 0x80057C08u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C08u); -#endif -label_BFC3FC0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FC0C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057C14u; /* jal link before delay slot */ - psx_delay_BFC3FC0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057C10u); -#endif - if (psx_delay_BFC3FC0C) { - psx_delay_BFC3FC0C = 0; - cpu->gpr[31] = 0x80057C14u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FC14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FC14: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C14u); -#endif - /* 0xBFC3FC18: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C18u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FC1C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FC20: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057C20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C20u); -#endif - /* 0xBFC3FC24: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C24u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3FC28: 24180008 addiu $t8, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24180008u, cpu->gpr[24], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FC2C: 24030008 addiu $v1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24030008u, cpu->gpr[3], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FC30: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3FC34: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057C34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FC38: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C38u); return; } g_debug_last_store_pc = 0x80057C38u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FC3C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C3Cu); -#endif -label_BFC3FC40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C40u); -#endif - /* 0xBFC3FC40: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FC44: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FC48: 03E00008 jr $ra */ - psx_delay_BFC3FC48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057C4Cu); -#endif - if (psx_delay_BFC3FC48) { - psx_delay_BFC3FC48 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FC50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FC50u); - int psx_delay_BFC3FC54 = 0; - int psx_taken_BFC3FC54 = 0; - int psx_delay_BFC3FC68 = 0; - int psx_taken_BFC3FC68 = 0; - int psx_delay_BFC3FC70 = 0; - int psx_taken_BFC3FC70 = 0; - int psx_delay_BFC3FC78 = 0; - int psx_taken_BFC3FC78 = 0; - int psx_delay_BFC3FC8C = 0; - int psx_taken_BFC3FC8C = 0; - int psx_delay_BFC3FC94 = 0; - int psx_taken_BFC3FC94 = 0; - int psx_delay_BFC3FC9C = 0; - int psx_taken_BFC3FC9C = 0; - int psx_delay_BFC3FCA4 = 0; - int psx_taken_BFC3FCA4 = 0; - int psx_delay_BFC3FCAC = 0; - int psx_taken_BFC3FCAC = 0; - int psx_delay_BFC3FCB4 = 0; - int psx_taken_BFC3FCB4 = 0; - int psx_delay_BFC3FCBC = 0; - int psx_taken_BFC3FCBC = 0; - int psx_delay_BFC3FCC8 = 0; - int psx_delay_BFC3FD04 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FC5Cu: goto label_BFC3FC5C; - case 0xBFC3FC70u: goto label_BFC3FC70; - case 0xBFC3FC78u: goto label_BFC3FC78; - case 0xBFC3FC80u: goto label_BFC3FC80; - case 0xBFC3FC94u: goto label_BFC3FC94; - case 0xBFC3FC9Cu: goto label_BFC3FC9C; - case 0xBFC3FCA4u: goto label_BFC3FCA4; - case 0xBFC3FCACu: goto label_BFC3FCAC; - case 0xBFC3FCB4u: goto label_BFC3FCB4; - case 0xBFC3FCBCu: goto label_BFC3FCBC; - case 0xBFC3FCC0u: goto label_BFC3FCC0; - case 0xBFC3FCC4u: goto label_BFC3FCC4; - case 0xBFC3FCC8u: goto label_BFC3FCC8; - case 0xBFC3FCD0u: goto label_BFC3FCD0; - case 0xBFC3FCFCu: goto label_BFC3FCFC; - default: break; - } - } -label_BFC3FC50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FC50: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC54: 1000000A beq $zero, $zero, 0xBFC3FC80 */ - uint32_t psx_brA_BFC3FC54 = cpu->gpr[0]; uint32_t psx_brB_BFC3FC54 = cpu->gpr[0]; - psx_taken_BFC3FC54 = (psx_brA_BFC3FC54 == psx_brB_BFC3FC54); - psx_delay_BFC3FC54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FC58: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C58u); return; } g_debug_last_store_pc = 0x80057C58u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C58u); -#endif - if (psx_delay_BFC3FC54) { - psx_delay_BFC3FC54 = 0; - if (psx_taken_BFC3FC54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C80u); - goto label_BFC3FC80; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C5Cu); - } -label_BFC3FC5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FC5C: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C60u); -#endif - /* 0xBFC3FC60: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C60u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3FC68: 15C00010 bne $t6, $zero, 0xBFC3FCAC */ - uint32_t psx_brA_BFC3FC68 = cpu->gpr[14]; uint32_t psx_brB_BFC3FC68 = cpu->gpr[0]; - psx_taken_BFC3FC68 = (psx_brA_BFC3FC68 != psx_brB_BFC3FC68); - psx_delay_BFC3FC68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FC6C: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C6Cu); -#endif - if (psx_delay_BFC3FC68) { - psx_delay_BFC3FC68 = 0; - if (psx_taken_BFC3FC68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CACu); - goto label_BFC3FCAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C70u); - } -label_BFC3FC70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC70: 10000022 beq $zero, $zero, 0xBFC3FCFC */ - uint32_t psx_brA_BFC3FC70 = cpu->gpr[0]; uint32_t psx_brB_BFC3FC70 = cpu->gpr[0]; - psx_taken_BFC3FC70 = (psx_brA_BFC3FC70 == psx_brB_BFC3FC70); - psx_delay_BFC3FC70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FC74: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057C74u); -#endif - if (psx_delay_BFC3FC70) { - psx_delay_BFC3FC70 = 0; - if (psx_taken_BFC3FC70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CFCu); - goto label_BFC3FCFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C78u); - } -label_BFC3FC78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FC78: 10000020 beq $zero, $zero, 0xBFC3FCFC */ - uint32_t psx_brA_BFC3FC78 = cpu->gpr[0]; uint32_t psx_brB_BFC3FC78 = cpu->gpr[0]; - psx_taken_BFC3FC78 = (psx_brA_BFC3FC78 == psx_brB_BFC3FC78); - psx_delay_BFC3FC78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FC7C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057C7Cu); -#endif - if (psx_delay_BFC3FC78) { - psx_delay_BFC3FC78 = 0; - if (psx_taken_BFC3FC78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CFCu); - goto label_BFC3FCFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C80u); - } -label_BFC3FC80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FC80: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057C80u); -#endif - /* 0xBFC3FC84: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057C84u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FC88: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FC8C: 1062FFF3 beq $v1, $v0, 0xBFC3FC5C */ - uint32_t psx_brA_BFC3FC8C = cpu->gpr[3]; uint32_t psx_brB_BFC3FC8C = cpu->gpr[2]; - psx_taken_BFC3FC8C = (psx_brA_BFC3FC8C == psx_brB_BFC3FC8C); - psx_delay_BFC3FC8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FC90: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057C90u); -#endif - if (psx_delay_BFC3FC8C) { - psx_delay_BFC3FC8C = 0; - if (psx_taken_BFC3FC8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C5Cu); - goto label_BFC3FC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C94u); - } -label_BFC3FC94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FC94: 1061FFF1 beq $v1, $at, 0xBFC3FC5C */ - uint32_t psx_brA_BFC3FC94 = cpu->gpr[3]; uint32_t psx_brB_BFC3FC94 = cpu->gpr[1]; - psx_taken_BFC3FC94 = (psx_brA_BFC3FC94 == psx_brB_BFC3FC94); - psx_delay_BFC3FC94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FC98: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057C98u); -#endif - if (psx_delay_BFC3FC94) { - psx_delay_BFC3FC94 = 0; - if (psx_taken_BFC3FC94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C5Cu); - goto label_BFC3FC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C9Cu); - } -label_BFC3FC9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FC9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FC9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FC9C: 1061FFEF beq $v1, $at, 0xBFC3FC5C */ - uint32_t psx_brA_BFC3FC9C = cpu->gpr[3]; uint32_t psx_brB_BFC3FC9C = cpu->gpr[1]; - psx_taken_BFC3FC9C = (psx_brA_BFC3FC9C == psx_brB_BFC3FC9C); - psx_delay_BFC3FC9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FCA0: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057CA0u); -#endif - if (psx_delay_BFC3FC9C) { - psx_delay_BFC3FC9C = 0; - if (psx_taken_BFC3FC9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C5Cu); - goto label_BFC3FC5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CA4u); - } -label_BFC3FCA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FCA4: 1461FFF4 bne $v1, $at, 0xBFC3FC78 */ - uint32_t psx_brA_BFC3FCA4 = cpu->gpr[3]; uint32_t psx_brB_BFC3FCA4 = cpu->gpr[1]; - psx_taken_BFC3FCA4 = (psx_brA_BFC3FCA4 != psx_brB_BFC3FCA4); - psx_delay_BFC3FCA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FCA8: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057CA8u); -#endif - if (psx_delay_BFC3FCA4) { - psx_delay_BFC3FCA4 = 0; - if (psx_taken_BFC3FCA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057C78u); - goto label_BFC3FC78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CACu); - } -label_BFC3FCAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FCAC: 10610004 beq $v1, $at, 0xBFC3FCC0 */ - uint32_t psx_brA_BFC3FCAC = cpu->gpr[3]; uint32_t psx_brB_BFC3FCAC = cpu->gpr[1]; - psx_taken_BFC3FCAC = (psx_brA_BFC3FCAC == psx_brB_BFC3FCAC); - psx_delay_BFC3FCAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FCB0: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057CB0u); -#endif - if (psx_delay_BFC3FCAC) { - psx_delay_BFC3FCAC = 0; - if (psx_taken_BFC3FCAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CC0u); - goto label_BFC3FCC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CB4u); - } -label_BFC3FCB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FCB4: 10610002 beq $v1, $at, 0xBFC3FCC0 */ - uint32_t psx_brA_BFC3FCB4 = cpu->gpr[3]; uint32_t psx_brB_BFC3FCB4 = cpu->gpr[1]; - psx_taken_BFC3FCB4 = (psx_brA_BFC3FCB4 == psx_brB_BFC3FCB4); - psx_delay_BFC3FCB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FCB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057CB8u); -#endif - if (psx_delay_BFC3FCB4) { - psx_delay_BFC3FCB4 = 0; - if (psx_taken_BFC3FCB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CC0u); - goto label_BFC3FCC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CBCu); - } -label_BFC3FCBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FCBC: 14620002 bne $v1, $v0, 0xBFC3FCC8 */ - uint32_t psx_brA_BFC3FCBC = cpu->gpr[3]; uint32_t psx_brB_BFC3FCBC = cpu->gpr[2]; - psx_taken_BFC3FCBC = (psx_brA_BFC3FCBC != psx_brB_BFC3FCBC); - psx_delay_BFC3FCBC = 1; -label_BFC3FCC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FCC0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057CC0u); -#endif - if (psx_delay_BFC3FCBC) { - psx_delay_BFC3FCBC = 0; - if (psx_taken_BFC3FCBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CC8u); - goto label_BFC3FCC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057CC4u); - } -label_BFC3FCC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FCC4: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057CC4u); return; } g_debug_last_store_pc = 0x80057CC4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CC4u); -#endif -label_BFC3FCC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FCC8: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057CD0u; /* jal link before delay slot */ - psx_delay_BFC3FCC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FCCC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057CCCu); -#endif - if (psx_delay_BFC3FCC8) { - psx_delay_BFC3FCC8 = 0; - cpu->gpr[31] = 0x80057CD0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FCD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FCD0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057CD0u); -#endif - /* 0xBFC3FCD4: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057CD4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FCD8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FCDC: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057CDCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CE0u); -#endif - /* 0xBFC3FCE0: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057CE0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3FCE4: 2418000B addiu $t8, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2418000Bu, cpu->gpr[24], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80057CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FCE8: 2403000B addiu $v1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2403000Bu, cpu->gpr[3], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80057CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FCEC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057CECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3FCF0: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057CF0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FCF4: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057CF4u); return; } g_debug_last_store_pc = 0x80057CF4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FCF8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057CF8u); -#endif -label_BFC3FCFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FCFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FCFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057CFCu); -#endif - /* 0xBFC3FCFC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057CFCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FD00: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FD04: 03E00008 jr $ra */ - psx_delay_BFC3FD04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057D08u); -#endif - if (psx_delay_BFC3FD04) { - psx_delay_BFC3FD04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FD0C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FD0Cu); - int psx_delay_BFC3FD10 = 0; - int psx_taken_BFC3FD10 = 0; - int psx_delay_BFC3FD24 = 0; - int psx_taken_BFC3FD24 = 0; - int psx_delay_BFC3FD2C = 0; - int psx_taken_BFC3FD2C = 0; - int psx_delay_BFC3FD34 = 0; - int psx_taken_BFC3FD34 = 0; - int psx_delay_BFC3FD48 = 0; - int psx_taken_BFC3FD48 = 0; - int psx_delay_BFC3FD50 = 0; - int psx_taken_BFC3FD50 = 0; - int psx_delay_BFC3FD58 = 0; - int psx_taken_BFC3FD58 = 0; - int psx_delay_BFC3FD60 = 0; - int psx_taken_BFC3FD60 = 0; - int psx_delay_BFC3FD68 = 0; - int psx_taken_BFC3FD68 = 0; - int psx_delay_BFC3FD70 = 0; - int psx_taken_BFC3FD70 = 0; - int psx_delay_BFC3FD78 = 0; - int psx_taken_BFC3FD78 = 0; - int psx_delay_BFC3FD84 = 0; - int psx_delay_BFC3FDC0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FD18u: goto label_BFC3FD18; - case 0xBFC3FD2Cu: goto label_BFC3FD2C; - case 0xBFC3FD34u: goto label_BFC3FD34; - case 0xBFC3FD3Cu: goto label_BFC3FD3C; - case 0xBFC3FD50u: goto label_BFC3FD50; - case 0xBFC3FD58u: goto label_BFC3FD58; - case 0xBFC3FD60u: goto label_BFC3FD60; - case 0xBFC3FD68u: goto label_BFC3FD68; - case 0xBFC3FD70u: goto label_BFC3FD70; - case 0xBFC3FD78u: goto label_BFC3FD78; - case 0xBFC3FD7Cu: goto label_BFC3FD7C; - case 0xBFC3FD80u: goto label_BFC3FD80; - case 0xBFC3FD84u: goto label_BFC3FD84; - case 0xBFC3FD8Cu: goto label_BFC3FD8C; - case 0xBFC3FDB8u: goto label_BFC3FDB8; - default: break; - } - } -label_BFC3FD0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FD0C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD10: 1000000A beq $zero, $zero, 0xBFC3FD3C */ - uint32_t psx_brA_BFC3FD10 = cpu->gpr[0]; uint32_t psx_brB_BFC3FD10 = cpu->gpr[0]; - psx_taken_BFC3FD10 = (psx_brA_BFC3FD10 == psx_brB_BFC3FD10); - psx_delay_BFC3FD10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FD14: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D14u); return; } g_debug_last_store_pc = 0x80057D14u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D14u); -#endif - if (psx_delay_BFC3FD10) { - psx_delay_BFC3FD10 = 0; - if (psx_taken_BFC3FD10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D3Cu); - goto label_BFC3FD3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D18u); - } -label_BFC3FD18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FD18: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057D18u); -#endif - /* 0xBFC3FD1C: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D1Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC3FD24: 15C00010 bne $t6, $zero, 0xBFC3FD68 */ - uint32_t psx_brA_BFC3FD24 = cpu->gpr[14]; uint32_t psx_brB_BFC3FD24 = cpu->gpr[0]; - psx_taken_BFC3FD24 = (psx_brA_BFC3FD24 != psx_brB_BFC3FD24); - psx_delay_BFC3FD24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD28: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D28u); -#endif - if (psx_delay_BFC3FD24) { - psx_delay_BFC3FD24 = 0; - if (psx_taken_BFC3FD24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D68u); - goto label_BFC3FD68; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D2Cu); - } -label_BFC3FD2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD2C: 10000022 beq $zero, $zero, 0xBFC3FDB8 */ - uint32_t psx_brA_BFC3FD2C = cpu->gpr[0]; uint32_t psx_brB_BFC3FD2C = cpu->gpr[0]; - psx_taken_BFC3FD2C = (psx_brA_BFC3FD2C == psx_brB_BFC3FD2C); - psx_delay_BFC3FD2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FD30: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057D30u); -#endif - if (psx_delay_BFC3FD2C) { - psx_delay_BFC3FD2C = 0; - if (psx_taken_BFC3FD2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057DB8u); - goto label_BFC3FDB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D34u); - } -label_BFC3FD34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD34: 10000020 beq $zero, $zero, 0xBFC3FDB8 */ - uint32_t psx_brA_BFC3FD34 = cpu->gpr[0]; uint32_t psx_brB_BFC3FD34 = cpu->gpr[0]; - psx_taken_BFC3FD34 = (psx_brA_BFC3FD34 == psx_brB_BFC3FD34); - psx_delay_BFC3FD34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FD38: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057D38u); -#endif - if (psx_delay_BFC3FD34) { - psx_delay_BFC3FD34 = 0; - if (psx_taken_BFC3FD34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057DB8u); - goto label_BFC3FDB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D3Cu); - } -label_BFC3FD3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FD3C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D40u); -#endif - /* 0xBFC3FD40: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D40u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FD44: 24020003 addiu $v0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24020003u, cpu->gpr[2], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FD48: 1062FFF3 beq $v1, $v0, 0xBFC3FD18 */ - uint32_t psx_brA_BFC3FD48 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD48 = cpu->gpr[2]; - psx_taken_BFC3FD48 = (psx_brA_BFC3FD48 == psx_brB_BFC3FD48); - psx_delay_BFC3FD48 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD4C: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D4Cu); -#endif - if (psx_delay_BFC3FD48) { - psx_delay_BFC3FD48 = 0; - if (psx_taken_BFC3FD48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D18u); - goto label_BFC3FD18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D50u); - } -label_BFC3FD50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD50: 1061FFF1 beq $v1, $at, 0xBFC3FD18 */ - uint32_t psx_brA_BFC3FD50 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD50 = cpu->gpr[1]; - psx_taken_BFC3FD50 = (psx_brA_BFC3FD50 == psx_brB_BFC3FD50); - psx_delay_BFC3FD50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD54: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057D54u); -#endif - if (psx_delay_BFC3FD50) { - psx_delay_BFC3FD50 = 0; - if (psx_taken_BFC3FD50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D18u); - goto label_BFC3FD18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D58u); - } -label_BFC3FD58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD58: 1061FFEF beq $v1, $at, 0xBFC3FD18 */ - uint32_t psx_brA_BFC3FD58 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD58 = cpu->gpr[1]; - psx_taken_BFC3FD58 = (psx_brA_BFC3FD58 == psx_brB_BFC3FD58); - psx_delay_BFC3FD58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD5C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057D5Cu); -#endif - if (psx_delay_BFC3FD58) { - psx_delay_BFC3FD58 = 0; - if (psx_taken_BFC3FD58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D18u); - goto label_BFC3FD18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D60u); - } -label_BFC3FD60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD60: 1461FFF4 bne $v1, $at, 0xBFC3FD34 */ - uint32_t psx_brA_BFC3FD60 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD60 = cpu->gpr[1]; - psx_taken_BFC3FD60 = (psx_brA_BFC3FD60 != psx_brB_BFC3FD60); - psx_delay_BFC3FD60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD64: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80057D64u); -#endif - if (psx_delay_BFC3FD60) { - psx_delay_BFC3FD60 = 0; - if (psx_taken_BFC3FD60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D34u); - goto label_BFC3FD34; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D68u); - } -label_BFC3FD68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD68: 10610004 beq $v1, $at, 0xBFC3FD7C */ - uint32_t psx_brA_BFC3FD68 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD68 = cpu->gpr[1]; - psx_taken_BFC3FD68 = (psx_brA_BFC3FD68 == psx_brB_BFC3FD68); - psx_delay_BFC3FD68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FD6C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80057D6Cu); -#endif - if (psx_delay_BFC3FD68) { - psx_delay_BFC3FD68 = 0; - if (psx_taken_BFC3FD68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D7Cu); - goto label_BFC3FD7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D70u); - } -label_BFC3FD70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD70: 10610002 beq $v1, $at, 0xBFC3FD7C */ - uint32_t psx_brA_BFC3FD70 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD70 = cpu->gpr[1]; - psx_taken_BFC3FD70 = (psx_brA_BFC3FD70 == psx_brB_BFC3FD70); - psx_delay_BFC3FD70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057D74u); -#endif - if (psx_delay_BFC3FD70) { - psx_delay_BFC3FD70 = 0; - if (psx_taken_BFC3FD70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D7Cu); - goto label_BFC3FD7C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D78u); - } -label_BFC3FD78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC3FD78: 14620002 bne $v1, $v0, 0xBFC3FD84 */ - uint32_t psx_brA_BFC3FD78 = cpu->gpr[3]; uint32_t psx_brB_BFC3FD78 = cpu->gpr[2]; - psx_taken_BFC3FD78 = (psx_brA_BFC3FD78 != psx_brB_BFC3FD78); - psx_delay_BFC3FD78 = 1; -label_BFC3FD7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FD7C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057D7Cu); -#endif - if (psx_delay_BFC3FD78) { - psx_delay_BFC3FD78 = 0; - if (psx_taken_BFC3FD78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D84u); - goto label_BFC3FD84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057D80u); - } -label_BFC3FD80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FD80: AC23EE58 sw $v1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D80u); return; } g_debug_last_store_pc = 0x80057D80u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D80u); -#endif -label_BFC3FD84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FD84: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057D8Cu; /* jal link before delay slot */ - psx_delay_BFC3FD84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FD88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057D88u); -#endif - if (psx_delay_BFC3FD84) { - psx_delay_BFC3FD84 = 0; - cpu->gpr[31] = 0x80057D8Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FD8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FD8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FD8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FD8C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057D90u); -#endif - /* 0xBFC3FD90: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D90u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FD94: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FD98: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057D98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D98u); -#endif - /* 0xBFC3FD9C: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057D9Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057D9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC3FDA0: 2418000C addiu $t8, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2418000Cu, cpu->gpr[24], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80057DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FDA4: 2403000C addiu $v1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2403000Cu, cpu->gpr[3], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80057DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FDA8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC3FDAC: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057DACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC3FDB0: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DB0u); return; } g_debug_last_store_pc = 0x80057DB0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FDB4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057DB4u); -#endif -label_BFC3FDB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FDB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FDB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DB8u); -#endif - /* 0xBFC3FDB8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FDBC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FDC0: 03E00008 jr $ra */ - psx_delay_BFC3FDC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FDC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057DC4u); -#endif - if (psx_delay_BFC3FDC0) { - psx_delay_BFC3FDC0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FDC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FDC8u); - int psx_delay_BFC3FDD8 = 0; - int psx_taken_BFC3FDD8 = 0; - int psx_delay_BFC3FDE0 = 0; - int psx_taken_BFC3FDE0 = 0; - int psx_delay_BFC3FDE8 = 0; - int psx_delay_BFC3FE58 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FDE0u: goto label_BFC3FDE0; - case 0xBFC3FDE8u: goto label_BFC3FDE8; - case 0xBFC3FDF0u: goto label_BFC3FDF0; - case 0xBFC3FE50u: goto label_BFC3FE50; - default: break; - } - } -label_BFC3FDC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FDC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FDC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FDC8: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057DC8u); -#endif - /* 0xBFC3FDCC: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DCCu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FDD0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FDD4: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3FDD8: 11C10003 beq $t6, $at, 0xBFC3FDE8 */ - uint32_t psx_brA_BFC3FDD8 = cpu->gpr[14]; uint32_t psx_brB_BFC3FDD8 = cpu->gpr[1]; - psx_taken_BFC3FDD8 = (psx_brA_BFC3FDD8 == psx_brB_BFC3FDD8); - psx_delay_BFC3FDD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FDDC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DDCu); return; } g_debug_last_store_pc = 0x80057DDCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DDCu); -#endif - if (psx_delay_BFC3FDD8) { - psx_delay_BFC3FDD8 = 0; - if (psx_taken_BFC3FDD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057DE8u); - goto label_BFC3FDE8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057DE0u); - } -label_BFC3FDE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FDE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FDE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FDE0: 1000001B beq $zero, $zero, 0xBFC3FE50 */ - uint32_t psx_brA_BFC3FDE0 = cpu->gpr[0]; uint32_t psx_brB_BFC3FDE0 = cpu->gpr[0]; - psx_taken_BFC3FDE0 = (psx_brA_BFC3FDE0 == psx_brB_BFC3FDE0); - psx_delay_BFC3FDE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FDE4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057DE4u); -#endif - if (psx_delay_BFC3FDE0) { - psx_delay_BFC3FDE0 = 0; - if (psx_taken_BFC3FDE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E50u); - goto label_BFC3FE50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057DE8u); - } -label_BFC3FDE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FDE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FDE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FDE8: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057DF0u; /* jal link before delay slot */ - psx_delay_BFC3FDE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3FDEC: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DECu); return; } g_debug_last_store_pc = 0x80057DECu; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DECu); -#endif - if (psx_delay_BFC3FDE8) { - psx_delay_BFC3FDE8 = 0; - cpu->gpr[31] = 0x80057DF0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FDF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FDF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FDF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FDF0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057DF0u); -#endif - /* 0xBFC3FDF4: 8C639C28 lw $v1, -25560($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DF4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C28u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DF4u); -#endif - /* 0xBFC3FDF8: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057DF8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC3FDFC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC3FE00: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057E00u); -#endif - /* 0xBFC3FE04: 8CC69C34 lw $a2, -25548($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E04u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69C34u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E04u); -#endif - /* 0xBFC3FE08: 8CA59C30 lw $a1, -25552($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E08u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C30u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC3FE0C: 240F0002 addiu $t7, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x240F0002u, cpu->gpr[15], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC3FE10: A06F0000 sb $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E10u); -#endif - /* 0xBFC3FE14: 90980000 lbu $t8, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 24, 0x10u); - PGXP_LOAD(0x90980000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3FE18: 24080003 addiu $t0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24080003u, cpu->gpr[8], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC3FE1C: A0B80000 sb $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E20u); -#endif - /* 0xBFC3FE20: 90990001 lbu $t9, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 25, 0x10u); - PGXP_LOAD(0x90990001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3FE24: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC3FE28: A0D90000 sb $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC3FE2C: A0680000 sb $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E30u); -#endif - /* 0xBFC3FE30: 8D4A9C2C lw $t2, -25556($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E30u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C2Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E30u); -#endif - /* 0xBFC3FE34: 90890002 lbu $t1, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 9, 0x10u); - PGXP_LOAD(0x90890002u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC3FE38: 240C0020 addiu $t4, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x240C0020u, cpu->gpr[12], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3FE3C: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E40u); -#endif - /* 0xBFC3FE40: 908B0003 lbu $t3, 3($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 3; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (3)), 11, 0x10u); - PGXP_LOAD(0x908B0003u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FE44: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC3FE48: A0AB0000 sb $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E48u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA0AB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1040u); -#endif - /* 0xBFC3FE4C: A0CC0000 sb $t4, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057E4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA0CC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E4Cu); -#endif -label_BFC3FE50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FE50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FE50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E50u); -#endif - /* 0xBFC3FE50: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FE54: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FE58: 03E00008 jr $ra */ - psx_delay_BFC3FE58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FE5C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057E5Cu); -#endif - if (psx_delay_BFC3FE58) { - psx_delay_BFC3FE58 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FE60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FE60u); - int psx_delay_BFC3FE74 = 0; - int psx_taken_BFC3FE74 = 0; - int psx_delay_BFC3FE7C = 0; - int psx_taken_BFC3FE7C = 0; - int psx_delay_BFC3FE9C = 0; - int psx_taken_BFC3FE9C = 0; - int psx_delay_BFC3FEA4 = 0; - int psx_taken_BFC3FEA4 = 0; - int psx_delay_BFC3FEF4 = 0; - int psx_taken_BFC3FEF4 = 0; - int psx_delay_BFC3FEFC = 0; - int psx_delay_BFC3FF38 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FE7Cu: goto label_BFC3FE7C; - case 0xBFC3FE84u: goto label_BFC3FE84; - case 0xBFC3FEA4u: goto label_BFC3FEA4; - case 0xBFC3FEACu: goto label_BFC3FEAC; - case 0xBFC3FEC0u: goto label_BFC3FEC0; - case 0xBFC3FEFCu: goto label_BFC3FEFC; - case 0xBFC3FF04u: goto label_BFC3FF04; - case 0xBFC3FF30u: goto label_BFC3FF30; - default: break; - } - } -label_BFC3FE60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FE60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FE60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FE60: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057E60u); -#endif - /* 0xBFC3FE64: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E64u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FE68: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FE6C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FE70: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E70u); return; } g_debug_last_store_pc = 0x80057E70u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3FE74: 11C10003 beq $t6, $at, 0xBFC3FE84 */ - uint32_t psx_brA_BFC3FE74 = cpu->gpr[14]; uint32_t psx_brB_BFC3FE74 = cpu->gpr[1]; - psx_taken_BFC3FE74 = (psx_brA_BFC3FE74 == psx_brB_BFC3FE74); - psx_delay_BFC3FE74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC3FE78: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057E78u); -#endif - if (psx_delay_BFC3FE74) { - psx_delay_BFC3FE74 = 0; - if (psx_taken_BFC3FE74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E84u); - goto label_BFC3FE84; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E7Cu); - } -label_BFC3FE7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FE7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FE7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FE7C: 1000002C beq $zero, $zero, 0xBFC3FF30 */ - uint32_t psx_brA_BFC3FE7C = cpu->gpr[0]; uint32_t psx_brB_BFC3FE7C = cpu->gpr[0]; - psx_taken_BFC3FE7C = (psx_brA_BFC3FE7C == psx_brB_BFC3FE7C); - psx_delay_BFC3FE7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FE80: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057E80u); -#endif - if (psx_delay_BFC3FE7C) { - psx_delay_BFC3FE7C = 0; - if (psx_taken_BFC3FE7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F30u); - goto label_BFC3FF30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057E84u); - } -label_BFC3FE84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FE84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FE84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FE84: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057E84u); -#endif - /* 0xBFC3FE88: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057E88u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FE8C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057E90u); -#endif - /* 0xBFC3FE90: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FE94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3FE98: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3FE9C: 13010003 beq $t8, $at, 0xBFC3FEAC */ - uint32_t psx_brA_BFC3FE9C = cpu->gpr[24]; uint32_t psx_brB_BFC3FE9C = cpu->gpr[1]; - psx_taken_BFC3FE9C = (psx_brA_BFC3FE9C == psx_brB_BFC3FE9C); - psx_delay_BFC3FE9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FEA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057EA0u); -#endif - if (psx_delay_BFC3FE9C) { - psx_delay_BFC3FE9C = 0; - if (psx_taken_BFC3FE9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057EACu); - goto label_BFC3FEAC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057EA4u); - } -label_BFC3FEA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FEA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FEA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FEA4: 10000022 beq $zero, $zero, 0xBFC3FF30 */ - uint32_t psx_brA_BFC3FEA4 = cpu->gpr[0]; uint32_t psx_brB_BFC3FEA4 = cpu->gpr[0]; - psx_taken_BFC3FEA4 = (psx_brA_BFC3FEA4 == psx_brB_BFC3FEA4); - psx_delay_BFC3FEA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEA8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057EA8u); -#endif - if (psx_delay_BFC3FEA4) { - psx_delay_BFC3FEA4 = 0; - if (psx_taken_BFC3FEA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F30u); - goto label_BFC3FF30; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057EACu); - } -label_BFC3FEAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FEACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FEACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FEAC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3FEB0: AC25EE94 sw $a1, -4460($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4460; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057EB0u); return; } g_debug_last_store_pc = 0x80057EB0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE94u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FEB4: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3FEB8: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3FEBC: 24040064 addiu $a0, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80057EBCu); -#endif -label_BFC3FEC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FEC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FEC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEC0: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEC4: A0400001 sb $zero, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400001u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEC8: A0400002 sb $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FECC: A0400003 sb $zero, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057ECCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400003u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FED0: A0400004 sb $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057ED0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FED4: A0400005 sb $zero, 5($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057ED4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (5)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400005u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FED8: A0400006 sb $zero, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057ED8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400006u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEDC: A0400007 sb $zero, 7($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EDCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (7)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400007u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEE0: A0400008 sb $zero, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FEE4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEE8: A0400009 sb $zero, 9($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 9; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (9)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400009u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEEC: A040000A sb $zero, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (10)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FEF0: A040000B sb $zero, 11($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 11; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057EF0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (11)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040000Bu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3FEF4: 1464FFF2 bne $v1, $a0, 0xBFC3FEC0 */ - uint32_t psx_brA_BFC3FEF4 = cpu->gpr[3]; uint32_t psx_brB_BFC3FEF4 = cpu->gpr[4]; - psx_taken_BFC3FEF4 = (psx_brA_BFC3FEF4 != psx_brB_BFC3FEF4); - psx_delay_BFC3FEF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3FEF8: 2442000C addiu $v0, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (12)); - PGXP_ALU(0x2442000Cu, cpu->gpr[2], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80057EF8u); -#endif - if (psx_delay_BFC3FEF4) { - psx_delay_BFC3FEF4 = 0; - if (psx_taken_BFC3FEF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057EC0u); - goto label_BFC3FEC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057EFCu); - } -label_BFC3FEFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FEFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FEFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FEFC: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057F04u; /* jal link before delay slot */ - psx_delay_BFC3FEFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057F00u); -#endif - if (psx_delay_BFC3FEFC) { - psx_delay_BFC3FEFC = 0; - cpu->gpr[31] = 0x80057F04u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FF04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FF04: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F04u); -#endif - /* 0xBFC3FF08: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F08u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3FF0C: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3FF10: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057F10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F10u); -#endif - /* 0xBFC3FF14: 8D4A9C2C lw $t2, -25556($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F14u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C2Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC3FF18: 24080013 addiu $t0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24080013u, cpu->gpr[8], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FF1C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC3FF20: AC28EE54 sw $t0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F20u); return; } g_debug_last_store_pc = 0x80057F20u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE54u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC3FF24: 24090013 addiu $t1, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24090013u, cpu->gpr[9], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FF28: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC3FF2C: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057F2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F2Cu); -#endif -label_BFC3FF30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F30u); -#endif - /* 0xBFC3FF30: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FF34: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC3FF38: 03E00008 jr $ra */ - psx_delay_BFC3FF38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF3C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057F3Cu); -#endif - if (psx_delay_BFC3FF38) { - psx_delay_BFC3FF38 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC3FF40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC3FF40u); - int psx_delay_BFC3FF54 = 0; - int psx_taken_BFC3FF54 = 0; - int psx_delay_BFC3FF5C = 0; - int psx_taken_BFC3FF5C = 0; - int psx_delay_BFC3FF7C = 0; - int psx_taken_BFC3FF7C = 0; - int psx_delay_BFC3FF84 = 0; - int psx_taken_BFC3FF84 = 0; - int psx_delay_BFC3FFD4 = 0; - int psx_taken_BFC3FFD4 = 0; - int psx_delay_BFC3FFDC = 0; - int psx_delay_BFC4002C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC3FF5Cu: goto label_BFC3FF5C; - case 0xBFC3FF64u: goto label_BFC3FF64; - case 0xBFC3FF84u: goto label_BFC3FF84; - case 0xBFC3FF8Cu: goto label_BFC3FF8C; - case 0xBFC3FFA0u: goto label_BFC3FFA0; - case 0xBFC3FFDCu: goto label_BFC3FFDC; - case 0xBFC3FFE4u: goto label_BFC3FFE4; - case 0xBFC40024u: goto label_BFC40024; - default: break; - } - } -label_BFC3FF40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC3FF40: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F40u); -#endif - /* 0xBFC3FF44: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC3FF48: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FF4C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC3FF50: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F50u); return; } g_debug_last_store_pc = 0x80057F50u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC3FF54: 11C10003 beq $t6, $at, 0xBFC3FF64 */ - uint32_t psx_brA_BFC3FF54 = cpu->gpr[14]; uint32_t psx_brB_BFC3FF54 = cpu->gpr[1]; - psx_taken_BFC3FF54 = (psx_brA_BFC3FF54 == psx_brB_BFC3FF54); - psx_delay_BFC3FF54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC3FF58: AFA40020 sw $a0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F58u); return; } g_debug_last_store_pc = 0x80057F58u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F58u); -#endif - if (psx_delay_BFC3FF54) { - psx_delay_BFC3FF54 = 0; - if (psx_taken_BFC3FF54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F64u); - goto label_BFC3FF64; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F5Cu); - } -label_BFC3FF5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF5C: 10000031 beq $zero, $zero, 0xBFC40024 */ - uint32_t psx_brA_BFC3FF5C = cpu->gpr[0]; uint32_t psx_brB_BFC3FF5C = cpu->gpr[0]; - psx_taken_BFC3FF5C = (psx_brA_BFC3FF5C == psx_brB_BFC3FF5C); - psx_delay_BFC3FF5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FF60: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057F60u); -#endif - if (psx_delay_BFC3FF5C) { - psx_delay_BFC3FF5C = 0; - if (psx_taken_BFC3FF5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058024u); - goto label_BFC40024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F64u); - } -label_BFC3FF64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC3FF64: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F64u); -#endif - /* 0xBFC3FF68: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F68u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC3FF6C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F70u); -#endif - /* 0xBFC3FF70: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC3FF78: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC3FF7C: 13010003 beq $t8, $at, 0xBFC3FF8C */ - uint32_t psx_brA_BFC3FF7C = cpu->gpr[24]; uint32_t psx_brB_BFC3FF7C = cpu->gpr[1]; - psx_taken_BFC3FF7C = (psx_brA_BFC3FF7C == psx_brB_BFC3FF7C); - psx_delay_BFC3FF7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF80: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057F80u); -#endif - if (psx_delay_BFC3FF7C) { - psx_delay_BFC3FF7C = 0; - if (psx_taken_BFC3FF7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F8Cu); - goto label_BFC3FF8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F84u); - } -label_BFC3FF84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FF84: 10000027 beq $zero, $zero, 0xBFC40024 */ - uint32_t psx_brA_BFC3FF84 = cpu->gpr[0]; uint32_t psx_brB_BFC3FF84 = cpu->gpr[0]; - psx_taken_BFC3FF84 = (psx_brA_BFC3FF84 == psx_brB_BFC3FF84); - psx_delay_BFC3FF84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FF88: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057F88u); -#endif - if (psx_delay_BFC3FF84) { - psx_delay_BFC3FF84 = 0; - if (psx_taken_BFC3FF84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058024u); - goto label_BFC40024; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057F8Cu); - } -label_BFC3FF8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FF8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FF8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC3FF8C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC3FF90: AC25EE94 sw $a1, -4460($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4460; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057F90u); return; } g_debug_last_store_pc = 0x80057F90u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE94u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80057F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC3FF94: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057F94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x25u); -#endif - /* 0xBFC3FF98: 00A01021 addu $v0, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80057F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC3FF9C: 24040064 addiu $a0, $zero, 100 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); - PGXP_ALU(0x24040064u, cpu->gpr[4], _pgx1, 0x00000064u); } -#ifdef PSX_COSIM - cosim_instr(0x80057F9Cu); -#endif -label_BFC3FFA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FFA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FFA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFA0: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FA0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFA4: A0400001 sb $zero, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400001u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFA8: A0400002 sb $zero, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400002u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFAC: A0400003 sb $zero, 3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (3)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400003u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFB0: A0400004 sb $zero, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFB4: A0400005 sb $zero, 5($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (5)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400005u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFB8: A0400006 sb $zero, 6($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400006u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFBC: A0400007 sb $zero, 7($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (7)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400007u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFC0: A0400008 sb $zero, 8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 8; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400008u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC3FFC4: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80057FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFC8: A0400009 sb $zero, 9($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 9; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (9)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400009u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFCC: A040000A sb $zero, 10($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (10)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040000Au, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC3FFD0: A040000B sb $zero, 11($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 11; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (11)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA040000Bu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC3FFD4: 1464FFF2 bne $v1, $a0, 0xBFC3FFA0 */ - uint32_t psx_brA_BFC3FFD4 = cpu->gpr[3]; uint32_t psx_brB_BFC3FFD4 = cpu->gpr[4]; - psx_taken_BFC3FFD4 = (psx_brA_BFC3FFD4 != psx_brB_BFC3FFD4); - psx_delay_BFC3FFD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC3FFD8: 2442000C addiu $v0, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (12)); - PGXP_ALU(0x2442000Cu, cpu->gpr[2], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80057FD8u); -#endif - if (psx_delay_BFC3FFD4) { - psx_delay_BFC3FFD4 = 0; - if (psx_taken_BFC3FFD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057FA0u); - goto label_BFC3FFA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80057FDCu); - } -label_BFC3FFDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FFDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FFDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC3FFDC: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80057FE4u; /* jal link before delay slot */ - psx_delay_BFC3FFDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC3FFE0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80057FE0u); -#endif - if (psx_delay_BFC3FFDC) { - psx_delay_BFC3FFDC = 0; - cpu->gpr[31] = 0x80057FE4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC3FFE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC3FFE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC3FFE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC3FFE4: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057FE4u); -#endif - /* 0xBFC3FFE8: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057FE8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC3FFEC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80057FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80057FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC3FFF0: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80057FF0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FF0u); -#endif - /* 0xBFC3FFF4: 8FA80020 lw $t0, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057FF4u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80020u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FF4u); -#endif - /* 0xBFC3FFF8: 8D4A9C30 lw $t2, -25552($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80057FF8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C30u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80057FF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC3FFFC: 310900FF andi $t1, $t0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] & 0xFFu; - PGXP_ALU(0x310900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80057FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC40000: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC40004: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058004u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058004u); -#endif - /* 0xBFC40008: 8DAD9C2C lw $t5, -25556($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058008u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9C2Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80058008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC4000C: 240B0012 addiu $t3, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x240B0012u, cpu->gpr[11], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x8005800Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40010: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC40014: AC2BEE54 sw $t3, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058014u); return; } g_debug_last_store_pc = 0x80058014u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BEE54u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC40018: 240C0012 addiu $t4, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x240C0012u, cpu->gpr[12], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80058018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4001C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005801Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC40020: A1AC0000 sb $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058020u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA1AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80058020u); -#endif -label_BFC40024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058024u); -#endif - /* 0xBFC40024: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058024u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40028: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80058028u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4002C: 03E00008 jr $ra */ - psx_delay_BFC4002C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40030: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058030u); -#endif - if (psx_delay_BFC4002C) { - psx_delay_BFC4002C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40034(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40034u); - int psx_delay_BFC40038 = 0; - int psx_taken_BFC40038 = 0; - int psx_delay_BFC4004C = 0; - int psx_taken_BFC4004C = 0; - int psx_delay_BFC40054 = 0; - int psx_taken_BFC40054 = 0; - int psx_delay_BFC4005C = 0; - int psx_taken_BFC4005C = 0; - int psx_delay_BFC40070 = 0; - int psx_taken_BFC40070 = 0; - int psx_delay_BFC40078 = 0; - int psx_taken_BFC40078 = 0; - int psx_delay_BFC40080 = 0; - int psx_taken_BFC40080 = 0; - int psx_delay_BFC40088 = 0; - int psx_taken_BFC40088 = 0; - int psx_delay_BFC40090 = 0; - int psx_taken_BFC40090 = 0; - int psx_delay_BFC40098 = 0; - int psx_delay_BFC400D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40040u: goto label_BFC40040; - case 0xBFC40054u: goto label_BFC40054; - case 0xBFC4005Cu: goto label_BFC4005C; - case 0xBFC40064u: goto label_BFC40064; - case 0xBFC40078u: goto label_BFC40078; - case 0xBFC40080u: goto label_BFC40080; - case 0xBFC40088u: goto label_BFC40088; - case 0xBFC40090u: goto label_BFC40090; - case 0xBFC40098u: goto label_BFC40098; - case 0xBFC400A0u: goto label_BFC400A0; - case 0xBFC400CCu: goto label_BFC400CC; - default: break; - } - } -label_BFC40034: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40034u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40034: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40038: 1000000A beq $zero, $zero, 0xBFC40064 */ - uint32_t psx_brA_BFC40038 = cpu->gpr[0]; uint32_t psx_brB_BFC40038 = cpu->gpr[0]; - psx_taken_BFC40038 = (psx_brA_BFC40038 == psx_brB_BFC40038); - psx_delay_BFC40038 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4003C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005803Cu); return; } g_debug_last_store_pc = 0x8005803Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005803Cu); -#endif - if (psx_delay_BFC40038) { - psx_delay_BFC40038 = 0; - if (psx_taken_BFC40038) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058064u); - goto label_BFC40064; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058040u); - } -label_BFC40040: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40040u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC40040: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058040u); -#endif - /* 0xBFC40044: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058044u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058048u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC4004C: 15C00012 bne $t6, $zero, 0xBFC40098 */ - uint32_t psx_brA_BFC4004C = cpu->gpr[14]; uint32_t psx_brB_BFC4004C = cpu->gpr[0]; - psx_taken_BFC4004C = (psx_brA_BFC4004C != psx_brB_BFC4004C); - psx_delay_BFC4004C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40050: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058050u); -#endif - if (psx_delay_BFC4004C) { - psx_delay_BFC4004C = 0; - if (psx_taken_BFC4004C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058098u); - goto label_BFC40098; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058054u); - } -label_BFC40054: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40054u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40054: 1000001D beq $zero, $zero, 0xBFC400CC */ - uint32_t psx_brA_BFC40054 = cpu->gpr[0]; uint32_t psx_brB_BFC40054 = cpu->gpr[0]; - psx_taken_BFC40054 = (psx_brA_BFC40054 == psx_brB_BFC40054); - psx_delay_BFC40054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40058: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058058u); -#endif - if (psx_delay_BFC40054) { - psx_delay_BFC40054 = 0; - if (psx_taken_BFC40054) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580CCu); - goto label_BFC400CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005805Cu); - } -label_BFC4005C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4005Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4005Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005805Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4005C: 1000001B beq $zero, $zero, 0xBFC400CC */ - uint32_t psx_brA_BFC4005C = cpu->gpr[0]; uint32_t psx_brB_BFC4005C = cpu->gpr[0]; - psx_taken_BFC4005C = (psx_brA_BFC4005C == psx_brB_BFC4005C); - psx_delay_BFC4005C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40060: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058060u); -#endif - if (psx_delay_BFC4005C) { - psx_delay_BFC4005C = 0; - if (psx_taken_BFC4005C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580CCu); - goto label_BFC400CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058064u); - } -label_BFC40064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40064: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058064u); -#endif - /* 0xBFC40068: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058068u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4006C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005806Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40070: 1061FFF3 beq $v1, $at, 0xBFC40040 */ - uint32_t psx_brA_BFC40070 = cpu->gpr[3]; uint32_t psx_brB_BFC40070 = cpu->gpr[1]; - psx_taken_BFC40070 = (psx_brA_BFC40070 == psx_brB_BFC40070); - psx_delay_BFC40070 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40074: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80058074u); -#endif - if (psx_delay_BFC40070) { - psx_delay_BFC40070 = 0; - if (psx_taken_BFC40070) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058040u); - goto label_BFC40040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058078u); - } -label_BFC40078: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40078u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058078u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40078: 1061FFF1 beq $v1, $at, 0xBFC40040 */ - uint32_t psx_brA_BFC40078 = cpu->gpr[3]; uint32_t psx_brB_BFC40078 = cpu->gpr[1]; - psx_taken_BFC40078 = (psx_brA_BFC40078 == psx_brB_BFC40078); - psx_delay_BFC40078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4007C: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x8005807Cu); -#endif - if (psx_delay_BFC40078) { - psx_delay_BFC40078 = 0; - if (psx_taken_BFC40078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058040u); - goto label_BFC40040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058080u); - } -label_BFC40080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40080: 1061FFEF beq $v1, $at, 0xBFC40040 */ - uint32_t psx_brA_BFC40080 = cpu->gpr[3]; uint32_t psx_brB_BFC40080 = cpu->gpr[1]; - psx_taken_BFC40080 = (psx_brA_BFC40080 == psx_brB_BFC40080); - psx_delay_BFC40080 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40084: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058084u); -#endif - if (psx_delay_BFC40080) { - psx_delay_BFC40080 = 0; - if (psx_taken_BFC40080) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058040u); - goto label_BFC40040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058088u); - } -label_BFC40088: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40088u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058088u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40088: 1061FFED beq $v1, $at, 0xBFC40040 */ - uint32_t psx_brA_BFC40088 = cpu->gpr[3]; uint32_t psx_brB_BFC40088 = cpu->gpr[1]; - psx_taken_BFC40088 = (psx_brA_BFC40088 == psx_brB_BFC40088); - psx_delay_BFC40088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4008C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005808Cu); -#endif - if (psx_delay_BFC40088) { - psx_delay_BFC40088 = 0; - if (psx_taken_BFC40088) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058040u); - goto label_BFC40040; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058090u); - } -label_BFC40090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40090: 1461FFF2 bne $v1, $at, 0xBFC4005C */ - uint32_t psx_brA_BFC40090 = cpu->gpr[3]; uint32_t psx_brB_BFC40090 = cpu->gpr[1]; - psx_taken_BFC40090 = (psx_brA_BFC40090 != psx_brB_BFC40090); - psx_delay_BFC40090 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40094: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058094u); -#endif - if (psx_delay_BFC40090) { - psx_delay_BFC40090 = 0; - if (psx_taken_BFC40090) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005805Cu); - goto label_BFC4005C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058098u); - } -label_BFC40098: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40098u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40098: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800580A0u; /* jal link before delay slot */ - psx_delay_BFC40098 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4009C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005809Cu); -#endif - if (psx_delay_BFC40098) { - psx_delay_BFC40098 = 0; - cpu->gpr[31] = 0x800580A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC400A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC400A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC400A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC400A0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800580A0u); -#endif - /* 0xBFC400A4: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580A4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800580A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC400A8: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800580A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC400AC: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800580ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800580ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580B0u); -#endif - /* 0xBFC400B0: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580B0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800580B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC400B4: 24180004 addiu $t8, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24180004u, cpu->gpr[24], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800580B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC400B8: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800580B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC400BC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800580BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC400C0: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800580C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800580C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC400C4: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580C4u); return; } g_debug_last_store_pc = 0x800580C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800580C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC400C8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800580C8u); -#endif -label_BFC400CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC400CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC400CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580CCu); -#endif - /* 0xBFC400CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800580CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC400D0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800580D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC400D4: 03E00008 jr $ra */ - psx_delay_BFC400D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC400D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800580D8u); -#endif - if (psx_delay_BFC400D4) { - psx_delay_BFC400D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC400DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC400DCu); - int psx_delay_BFC400E0 = 0; - int psx_taken_BFC400E0 = 0; - int psx_delay_BFC400F4 = 0; - int psx_taken_BFC400F4 = 0; - int psx_delay_BFC400FC = 0; - int psx_taken_BFC400FC = 0; - int psx_delay_BFC40104 = 0; - int psx_taken_BFC40104 = 0; - int psx_delay_BFC40118 = 0; - int psx_taken_BFC40118 = 0; - int psx_delay_BFC40120 = 0; - int psx_taken_BFC40120 = 0; - int psx_delay_BFC40128 = 0; - int psx_taken_BFC40128 = 0; - int psx_delay_BFC40130 = 0; - int psx_taken_BFC40130 = 0; - int psx_delay_BFC40138 = 0; - int psx_taken_BFC40138 = 0; - int psx_delay_BFC40140 = 0; - int psx_delay_BFC4017C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC400E8u: goto label_BFC400E8; - case 0xBFC400FCu: goto label_BFC400FC; - case 0xBFC40104u: goto label_BFC40104; - case 0xBFC4010Cu: goto label_BFC4010C; - case 0xBFC40120u: goto label_BFC40120; - case 0xBFC40128u: goto label_BFC40128; - case 0xBFC40130u: goto label_BFC40130; - case 0xBFC40138u: goto label_BFC40138; - case 0xBFC40140u: goto label_BFC40140; - case 0xBFC40148u: goto label_BFC40148; - case 0xBFC40174u: goto label_BFC40174; - default: break; - } - } -label_BFC400DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC400DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC400DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC400DC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800580DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC400E0: 1000000A beq $zero, $zero, 0xBFC4010C */ - uint32_t psx_brA_BFC400E0 = cpu->gpr[0]; uint32_t psx_brB_BFC400E0 = cpu->gpr[0]; - psx_taken_BFC400E0 = (psx_brA_BFC400E0 == psx_brB_BFC400E0); - psx_delay_BFC400E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC400E4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580E4u); return; } g_debug_last_store_pc = 0x800580E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800580E4u); -#endif - if (psx_delay_BFC400E0) { - psx_delay_BFC400E0 = 0; - if (psx_taken_BFC400E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005810Cu); - goto label_BFC4010C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580E8u); - } -label_BFC400E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC400E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC400E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC400E8: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800580E8u); -#endif - /* 0xBFC400EC: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800580ECu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800580ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC400F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800580F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC400F4: 15C00012 bne $t6, $zero, 0xBFC40140 */ - uint32_t psx_brA_BFC400F4 = cpu->gpr[14]; uint32_t psx_brB_BFC400F4 = cpu->gpr[0]; - psx_taken_BFC400F4 = (psx_brA_BFC400F4 != psx_brB_BFC400F4); - psx_delay_BFC400F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC400F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800580F8u); -#endif - if (psx_delay_BFC400F4) { - psx_delay_BFC400F4 = 0; - if (psx_taken_BFC400F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058140u); - goto label_BFC40140; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580FCu); - } -label_BFC400FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC400FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC400FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800580FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC400FC: 1000001D beq $zero, $zero, 0xBFC40174 */ - uint32_t psx_brA_BFC400FC = cpu->gpr[0]; uint32_t psx_brB_BFC400FC = cpu->gpr[0]; - psx_taken_BFC400FC = (psx_brA_BFC400FC == psx_brB_BFC400FC); - psx_delay_BFC400FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40100: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058100u); -#endif - if (psx_delay_BFC400FC) { - psx_delay_BFC400FC = 0; - if (psx_taken_BFC400FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058174u); - goto label_BFC40174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058104u); - } -label_BFC40104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40104: 1000001B beq $zero, $zero, 0xBFC40174 */ - uint32_t psx_brA_BFC40104 = cpu->gpr[0]; uint32_t psx_brB_BFC40104 = cpu->gpr[0]; - psx_taken_BFC40104 = (psx_brA_BFC40104 == psx_brB_BFC40104); - psx_delay_BFC40104 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40108: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058108u); -#endif - if (psx_delay_BFC40104) { - psx_delay_BFC40104 = 0; - if (psx_taken_BFC40104) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058174u); - goto label_BFC40174; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005810Cu); - } -label_BFC4010C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4010Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4010Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4010C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005810Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058110u); -#endif - /* 0xBFC40110: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058110u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40114: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40118: 1061FFF3 beq $v1, $at, 0xBFC400E8 */ - uint32_t psx_brA_BFC40118 = cpu->gpr[3]; uint32_t psx_brB_BFC40118 = cpu->gpr[1]; - psx_taken_BFC40118 = (psx_brA_BFC40118 == psx_brB_BFC40118); - psx_delay_BFC40118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4011C: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005811Cu); -#endif - if (psx_delay_BFC40118) { - psx_delay_BFC40118 = 0; - if (psx_taken_BFC40118) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580E8u); - goto label_BFC400E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058120u); - } -label_BFC40120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40120: 1061FFF1 beq $v1, $at, 0xBFC400E8 */ - uint32_t psx_brA_BFC40120 = cpu->gpr[3]; uint32_t psx_brB_BFC40120 = cpu->gpr[1]; - psx_taken_BFC40120 = (psx_brA_BFC40120 == psx_brB_BFC40120); - psx_delay_BFC40120 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40124: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058124u); -#endif - if (psx_delay_BFC40120) { - psx_delay_BFC40120 = 0; - if (psx_taken_BFC40120) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580E8u); - goto label_BFC400E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058128u); - } -label_BFC40128: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40128u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40128: 1061FFEF beq $v1, $at, 0xBFC400E8 */ - uint32_t psx_brA_BFC40128 = cpu->gpr[3]; uint32_t psx_brB_BFC40128 = cpu->gpr[1]; - psx_taken_BFC40128 = (psx_brA_BFC40128 == psx_brB_BFC40128); - psx_delay_BFC40128 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4012C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x8005812Cu); -#endif - if (psx_delay_BFC40128) { - psx_delay_BFC40128 = 0; - if (psx_taken_BFC40128) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580E8u); - goto label_BFC400E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058130u); - } -label_BFC40130: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40130u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40130: 1061FFED beq $v1, $at, 0xBFC400E8 */ - uint32_t psx_brA_BFC40130 = cpu->gpr[3]; uint32_t psx_brB_BFC40130 = cpu->gpr[1]; - psx_taken_BFC40130 = (psx_brA_BFC40130 == psx_brB_BFC40130); - psx_delay_BFC40130 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40134: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058134u); -#endif - if (psx_delay_BFC40130) { - psx_delay_BFC40130 = 0; - if (psx_taken_BFC40130) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800580E8u); - goto label_BFC400E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058138u); - } -label_BFC40138: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40138u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058138u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40138: 1461FFF2 bne $v1, $at, 0xBFC40104 */ - uint32_t psx_brA_BFC40138 = cpu->gpr[3]; uint32_t psx_brB_BFC40138 = cpu->gpr[1]; - psx_taken_BFC40138 = (psx_brA_BFC40138 != psx_brB_BFC40138); - psx_delay_BFC40138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4013C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005813Cu); -#endif - if (psx_delay_BFC40138) { - psx_delay_BFC40138 = 0; - if (psx_taken_BFC40138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058104u); - goto label_BFC40104; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058140u); - } -label_BFC40140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40140: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80058148u; /* jal link before delay slot */ - psx_delay_BFC40140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40144: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058144u); -#endif - if (psx_delay_BFC40140) { - psx_delay_BFC40140 = 0; - cpu->gpr[31] = 0x80058148u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC40148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC40148: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058148u); -#endif - /* 0xBFC4014C: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005814Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005814Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC40150: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC40154: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058154u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80058154u); -#endif - /* 0xBFC40158: 8F399C2C lw $t9, -25556($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058158u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C2Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058158u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4015C: 24180005 addiu $t8, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24180005u, cpu->gpr[24], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005815Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC40160: 24030005 addiu $v1, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24030005u, cpu->gpr[3], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80058160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40164: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC40168: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058168u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC4016C: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005816Cu); return; } g_debug_last_store_pc = 0x8005816Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005816Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40170: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058170u); -#endif -label_BFC40174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058174u); -#endif - /* 0xBFC40174: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058174u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40178: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80058178u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4017C: 03E00008 jr $ra */ - psx_delay_BFC4017C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40180: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058180u); -#endif - if (psx_delay_BFC4017C) { - psx_delay_BFC4017C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40184(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40184u); - int psx_delay_BFC4018C = 0; - int psx_taken_BFC4018C = 0; - int psx_delay_BFC401A0 = 0; - int psx_taken_BFC401A0 = 0; - int psx_delay_BFC401A8 = 0; - int psx_taken_BFC401A8 = 0; - int psx_delay_BFC401B0 = 0; - int psx_taken_BFC401B0 = 0; - int psx_delay_BFC401C4 = 0; - int psx_taken_BFC401C4 = 0; - int psx_delay_BFC401CC = 0; - int psx_taken_BFC401CC = 0; - int psx_delay_BFC401D4 = 0; - int psx_taken_BFC401D4 = 0; - int psx_delay_BFC401DC = 0; - int psx_taken_BFC401DC = 0; - int psx_delay_BFC401E4 = 0; - int psx_taken_BFC401E4 = 0; - int psx_delay_BFC401EC = 0; - int psx_taken_BFC401EC = 0; - int psx_delay_BFC401F4 = 0; - int psx_delay_BFC40208 = 0; - int psx_taken_BFC40208 = 0; - int psx_delay_BFC40218 = 0; - int psx_taken_BFC40218 = 0; - int psx_delay_BFC40258 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40194u: goto label_BFC40194; - case 0xBFC401A8u: goto label_BFC401A8; - case 0xBFC401B0u: goto label_BFC401B0; - case 0xBFC401B8u: goto label_BFC401B8; - case 0xBFC401CCu: goto label_BFC401CC; - case 0xBFC401D4u: goto label_BFC401D4; - case 0xBFC401DCu: goto label_BFC401DC; - case 0xBFC401E4u: goto label_BFC401E4; - case 0xBFC401ECu: goto label_BFC401EC; - case 0xBFC401F4u: goto label_BFC401F4; - case 0xBFC401FCu: goto label_BFC401FC; - case 0xBFC40210u: goto label_BFC40210; - case 0xBFC40220u: goto label_BFC40220; - case 0xBFC40230u: goto label_BFC40230; - case 0xBFC40250u: goto label_BFC40250; - default: break; - } - } -label_BFC40184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40184: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40188: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058188u); return; } g_debug_last_store_pc = 0x80058188u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4018C: 1000000A beq $zero, $zero, 0xBFC401B8 */ - uint32_t psx_brA_BFC4018C = cpu->gpr[0]; uint32_t psx_brB_BFC4018C = cpu->gpr[0]; - psx_taken_BFC4018C = (psx_brA_BFC4018C == psx_brB_BFC4018C); - psx_delay_BFC4018C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40190: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058190u); -#endif - if (psx_delay_BFC4018C) { - psx_delay_BFC4018C = 0; - if (psx_taken_BFC4018C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581B8u); - goto label_BFC401B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058194u); - } -label_BFC40194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC40194: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058194u); -#endif - /* 0xBFC40198: 8DCEEE5C lw $t6, -4516($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058198u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE5Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4019C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005819Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC401A0: 15C00014 bne $t6, $zero, 0xBFC401F4 */ - uint32_t psx_brA_BFC401A0 = cpu->gpr[14]; uint32_t psx_brB_BFC401A0 = cpu->gpr[0]; - psx_taken_BFC401A0 = (psx_brA_BFC401A0 != psx_brB_BFC401A0); - psx_delay_BFC401A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC401A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800581A4u); -#endif - if (psx_delay_BFC401A0) { - psx_delay_BFC401A0 = 0; - if (psx_taken_BFC401A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581F4u); - goto label_BFC401F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581A8u); - } -label_BFC401A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC401A8: 10000029 beq $zero, $zero, 0xBFC40250 */ - uint32_t psx_brA_BFC401A8 = cpu->gpr[0]; uint32_t psx_brB_BFC401A8 = cpu->gpr[0]; - psx_taken_BFC401A8 = (psx_brA_BFC401A8 == psx_brB_BFC401A8); - psx_delay_BFC401A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC401AC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800581ACu); -#endif - if (psx_delay_BFC401A8) { - psx_delay_BFC401A8 = 0; - if (psx_taken_BFC401A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058250u); - goto label_BFC40250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581B0u); - } -label_BFC401B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC401B0: 10000027 beq $zero, $zero, 0xBFC40250 */ - uint32_t psx_brA_BFC401B0 = cpu->gpr[0]; uint32_t psx_brB_BFC401B0 = cpu->gpr[0]; - psx_taken_BFC401B0 = (psx_brA_BFC401B0 == psx_brB_BFC401B0); - psx_delay_BFC401B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC401B4: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800581B4u); -#endif - if (psx_delay_BFC401B0) { - psx_delay_BFC401B0 = 0; - if (psx_taken_BFC401B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058250u); - goto label_BFC40250; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581B8u); - } -label_BFC401B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC401B8: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800581B8u); -#endif - /* 0xBFC401BC: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800581BCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800581BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401C0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x800581C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401C4: 1061000B beq $v1, $at, 0xBFC401F4 */ - uint32_t psx_brA_BFC401C4 = cpu->gpr[3]; uint32_t psx_brB_BFC401C4 = cpu->gpr[1]; - psx_taken_BFC401C4 = (psx_brA_BFC401C4 == psx_brB_BFC401C4); - psx_delay_BFC401C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401C8: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800581C8u); -#endif - if (psx_delay_BFC401C4) { - psx_delay_BFC401C4 = 0; - if (psx_taken_BFC401C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581F4u); - goto label_BFC401F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581CCu); - } -label_BFC401CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401CC: 1061FFF1 beq $v1, $at, 0xBFC40194 */ - uint32_t psx_brA_BFC401CC = cpu->gpr[3]; uint32_t psx_brB_BFC401CC = cpu->gpr[1]; - psx_taken_BFC401CC = (psx_brA_BFC401CC == psx_brB_BFC401CC); - psx_delay_BFC401CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401D0: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x800581D0u); -#endif - if (psx_delay_BFC401CC) { - psx_delay_BFC401CC = 0; - if (psx_taken_BFC401CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058194u); - goto label_BFC40194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581D4u); - } -label_BFC401D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401D4: 1061FFEF beq $v1, $at, 0xBFC40194 */ - uint32_t psx_brA_BFC401D4 = cpu->gpr[3]; uint32_t psx_brB_BFC401D4 = cpu->gpr[1]; - psx_taken_BFC401D4 = (psx_brA_BFC401D4 == psx_brB_BFC401D4); - psx_delay_BFC401D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401D8: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x800581D8u); -#endif - if (psx_delay_BFC401D4) { - psx_delay_BFC401D4 = 0; - if (psx_taken_BFC401D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058194u); - goto label_BFC40194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581DCu); - } -label_BFC401DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401DC: 1061FFED beq $v1, $at, 0xBFC40194 */ - uint32_t psx_brA_BFC401DC = cpu->gpr[3]; uint32_t psx_brB_BFC401DC = cpu->gpr[1]; - psx_taken_BFC401DC = (psx_brA_BFC401DC == psx_brB_BFC401DC); - psx_delay_BFC401DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401E0: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800581E0u); -#endif - if (psx_delay_BFC401DC) { - psx_delay_BFC401DC = 0; - if (psx_taken_BFC401DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058194u); - goto label_BFC40194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581E4u); - } -label_BFC401E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401E4: 1061FFEB beq $v1, $at, 0xBFC40194 */ - uint32_t psx_brA_BFC401E4 = cpu->gpr[3]; uint32_t psx_brB_BFC401E4 = cpu->gpr[1]; - psx_taken_BFC401E4 = (psx_brA_BFC401E4 == psx_brB_BFC401E4); - psx_delay_BFC401E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC401E8: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800581E8u); -#endif - if (psx_delay_BFC401E4) { - psx_delay_BFC401E4 = 0; - if (psx_taken_BFC401E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058194u); - goto label_BFC40194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581ECu); - } -label_BFC401EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC401EC: 1461FFF0 bne $v1, $at, 0xBFC401B0 */ - uint32_t psx_brA_BFC401EC = cpu->gpr[3]; uint32_t psx_brB_BFC401EC = cpu->gpr[1]; - psx_taken_BFC401EC = (psx_brA_BFC401EC != psx_brB_BFC401EC); - psx_delay_BFC401EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC401F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800581F0u); -#endif - if (psx_delay_BFC401EC) { - psx_delay_BFC401EC = 0; - if (psx_taken_BFC401EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581B0u); - goto label_BFC401B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800581F4u); - } -label_BFC401F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC401F4: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800581FCu; /* jal link before delay slot */ - psx_delay_BFC401F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC401F8: A3A40018 sb $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800581F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (24)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA3A40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800581F8u); -#endif - if (psx_delay_BFC401F4) { - psx_delay_BFC401F4 = 0; - cpu->gpr[31] = 0x800581FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC401FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC401FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC401FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800581FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC401FC: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800581FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058200u); -#endif - /* 0xBFC40200: 93A40018 lbu $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 4, 0x20000000u); - PGXP_LOAD(0x93A40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058200u); -#endif - /* 0xBFC40204: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058204u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058204u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40208: 10800005 beq $a0, $zero, 0xBFC40220 */ - uint32_t psx_brA_BFC40208 = cpu->gpr[4]; uint32_t psx_brB_BFC40208 = cpu->gpr[0]; - psx_taken_BFC40208 = (psx_brA_BFC40208 == psx_brB_BFC40208); - psx_delay_BFC40208 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC4020C: A1E00000 sb $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005820Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005820Cu); -#endif - if (psx_delay_BFC40208) { - psx_delay_BFC40208 = 0; - if (psx_taken_BFC40208) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058220u); - goto label_BFC40220; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058210u); - } -label_BFC40210: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40210u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC40210: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058210u); -#endif - /* 0xBFC40214: 8F189C30 lw $t8, -25552($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058214u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C30u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40218: 10000005 beq $zero, $zero, 0xBFC40230 */ - uint32_t psx_brA_BFC40218 = cpu->gpr[0]; uint32_t psx_brB_BFC40218 = cpu->gpr[0]; - psx_taken_BFC40218 = (psx_brA_BFC40218 == psx_brB_BFC40218); - psx_delay_BFC40218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC4021C: A3040000 sb $a0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005821Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA3040000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005821Cu); -#endif - if (psx_delay_BFC40218) { - psx_delay_BFC40218 = 0; - if (psx_taken_BFC40218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058230u); - goto label_BFC40230; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058220u); - } -label_BFC40220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC40220: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058220u); -#endif - /* 0xBFC40224: 8F399C30 lw $t9, -25552($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058224u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C30u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40228: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC4022C: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005822Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005822Cu); -#endif -label_BFC40230: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40230u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC40230: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058230u); -#endif - /* 0xBFC40234: 8D299C2C lw $t1, -25556($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058234u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299C2Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC40238: 24080003 addiu $t0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24080003u, cpu->gpr[8], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058238u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC4023C: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005823Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40240: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC40244: A1280000 sb $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058244u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40248: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058248u); return; } g_debug_last_store_pc = 0x80058248u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4024C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005824Cu); -#endif -label_BFC40250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058250u); -#endif - /* 0xBFC40250: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058250u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40254: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80058254u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40258: 03E00008 jr $ra */ - psx_delay_BFC40258 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4025C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005825Cu); -#endif - if (psx_delay_BFC40258) { - psx_delay_BFC40258 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40260(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40260u); - int psx_delay_BFC40270 = 0; - int psx_taken_BFC40270 = 0; - int psx_delay_BFC4027C = 0; - int psx_taken_BFC4027C = 0; - int psx_delay_BFC40284 = 0; - int psx_taken_BFC40284 = 0; - int psx_delay_BFC40298 = 0; - int psx_delay_BFC402D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40278u: goto label_BFC40278; - case 0xBFC40284u: goto label_BFC40284; - case 0xBFC4028Cu: goto label_BFC4028C; - case 0xBFC402A0u: goto label_BFC402A0; - case 0xBFC402CCu: goto label_BFC402CC; - default: break; - } - } -label_BFC40260: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40260u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40260: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058260u); -#endif - /* 0xBFC40264: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058264u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40268: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4026C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005826Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC40270: 10610006 beq $v1, $at, 0xBFC4028C */ - uint32_t psx_brA_BFC40270 = cpu->gpr[3]; uint32_t psx_brB_BFC40270 = cpu->gpr[1]; - psx_taken_BFC40270 = (psx_brA_BFC40270 == psx_brB_BFC40270); - psx_delay_BFC40270 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40274: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058274u); return; } g_debug_last_store_pc = 0x80058274u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058274u); -#endif - if (psx_delay_BFC40270) { - psx_delay_BFC40270 = 0; - if (psx_taken_BFC40270) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005828Cu); - goto label_BFC4028C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058278u); - } -label_BFC40278: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40278u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40278: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC4027C: 10610003 beq $v1, $at, 0xBFC4028C */ - uint32_t psx_brA_BFC4027C = cpu->gpr[3]; uint32_t psx_brB_BFC4027C = cpu->gpr[1]; - psx_taken_BFC4027C = (psx_brA_BFC4027C == psx_brB_BFC4027C); - psx_delay_BFC4027C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40280: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058280u); -#endif - if (psx_delay_BFC4027C) { - psx_delay_BFC4027C = 0; - if (psx_taken_BFC4027C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005828Cu); - goto label_BFC4028C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058284u); - } -label_BFC40284: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40284u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40284: 10000011 beq $zero, $zero, 0xBFC402CC */ - uint32_t psx_brA_BFC40284 = cpu->gpr[0]; uint32_t psx_brB_BFC40284 = cpu->gpr[0]; - psx_taken_BFC40284 = (psx_brA_BFC40284 == psx_brB_BFC40284); - psx_delay_BFC40284 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40288: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058288u); -#endif - if (psx_delay_BFC40284) { - psx_delay_BFC40284 = 0; - if (psx_taken_BFC40284) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800582CCu); - goto label_BFC402CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005828Cu); - } -label_BFC4028C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4028Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4028Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005828Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4028C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005828Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC40290: AC24EE98 sw $a0, -4456($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058290u); return; } g_debug_last_store_pc = 0x80058290u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE98u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40294: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40298: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800582A0u; /* jal link before delay slot */ - psx_delay_BFC40298 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC4029C: AC25EE9C sw $a1, -4452($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005829Cu); return; } g_debug_last_store_pc = 0x8005829Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE9Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005829Cu); -#endif - if (psx_delay_BFC40298) { - psx_delay_BFC40298 = 0; - cpu->gpr[31] = 0x800582A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC402A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC402A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC402A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC402A0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800582A0u); -#endif - /* 0xBFC402A4: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582A4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800582A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC402A8: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800582A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC402AC: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800582ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800582ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582B0u); -#endif - /* 0xBFC402B0: 8F189C2C lw $t8, -25556($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582B0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800582B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC402B4: 240F001A addiu $t7, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x240F001Au, cpu->gpr[15], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x800582B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC402B8: 2403001A addiu $v1, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2403001Au, cpu->gpr[3], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x800582B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC402BC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800582BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC402C0: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800582C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800582C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC402C4: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582C4u); return; } g_debug_last_store_pc = 0x800582C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800582C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC402C8: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800582C8u); -#endif -label_BFC402CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC402CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC402CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582CCu); -#endif - /* 0xBFC402CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800582CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC402D0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800582D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC402D4: 03E00008 jr $ra */ - psx_delay_BFC402D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC402D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800582D8u); -#endif - if (psx_delay_BFC402D4) { - psx_delay_BFC402D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC402DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC402DCu); - int psx_delay_BFC402F0 = 0; - int psx_taken_BFC402F0 = 0; - int psx_delay_BFC402F8 = 0; - int psx_taken_BFC402F8 = 0; - int psx_delay_BFC40318 = 0; - int psx_taken_BFC40318 = 0; - int psx_delay_BFC40320 = 0; - int psx_taken_BFC40320 = 0; - int psx_delay_BFC40340 = 0; - int psx_delay_BFC40370 = 0; - int psx_taken_BFC40370 = 0; - int psx_delay_BFC4038C = 0; - int psx_taken_BFC4038C = 0; - int psx_delay_BFC403BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC402F8u: goto label_BFC402F8; - case 0xBFC40300u: goto label_BFC40300; - case 0xBFC40320u: goto label_BFC40320; - case 0xBFC40328u: goto label_BFC40328; - case 0xBFC40348u: goto label_BFC40348; - case 0xBFC40370u: goto label_BFC40370; - case 0xBFC40378u: goto label_BFC40378; - case 0xBFC40394u: goto label_BFC40394; - case 0xBFC403B4u: goto label_BFC403B4; - default: break; - } - } -label_BFC402DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC402DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC402DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC402DC: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800582DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582E0u); -#endif - /* 0xBFC402E0: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582E0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800582E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC402E4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x800582E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC402E8: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800582E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC402EC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800582ECu); return; } g_debug_last_store_pc = 0x800582ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800582ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC402F0: 11C10003 beq $t6, $at, 0xBFC40300 */ - uint32_t psx_brA_BFC402F0 = cpu->gpr[14]; uint32_t psx_brB_BFC402F0 = cpu->gpr[1]; - psx_taken_BFC402F0 = (psx_brA_BFC402F0 == psx_brB_BFC402F0); - psx_delay_BFC402F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC402F4: 00803021 addu $a2, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00803021u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800582F4u); -#endif - if (psx_delay_BFC402F0) { - psx_delay_BFC402F0 = 0; - if (psx_taken_BFC402F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058300u); - goto label_BFC40300; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800582F8u); - } -label_BFC402F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC402F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC402F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800582F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC402F8: 1000002E beq $zero, $zero, 0xBFC403B4 */ - uint32_t psx_brA_BFC402F8 = cpu->gpr[0]; uint32_t psx_brB_BFC402F8 = cpu->gpr[0]; - psx_taken_BFC402F8 = (psx_brA_BFC402F8 == psx_brB_BFC402F8); - psx_delay_BFC402F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC402FC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800582FCu); -#endif - if (psx_delay_BFC402F8) { - psx_delay_BFC402F8 = 0; - if (psx_taken_BFC402F8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583B4u); - goto label_BFC403B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058300u); - } -label_BFC40300: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40300u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC40300: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058300u); -#endif - /* 0xBFC40304: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058304u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40308: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80058308u); -#endif - /* 0xBFC4030C: 91E20000 lbu $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (0)), 2, 0x8000u); - PGXP_LOAD(0x91E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005830Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40310: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC40314: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80058314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC40318: 13010003 beq $t8, $at, 0xBFC40328 */ - uint32_t psx_brA_BFC40318 = cpu->gpr[24]; uint32_t psx_brB_BFC40318 = cpu->gpr[1]; - psx_taken_BFC40318 = (psx_brA_BFC40318 == psx_brB_BFC40318); - psx_delay_BFC40318 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4031C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005831Cu); -#endif - if (psx_delay_BFC40318) { - psx_delay_BFC40318 = 0; - if (psx_taken_BFC40318) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058328u); - goto label_BFC40328; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058320u); - } -label_BFC40320: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40320u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40320: 10000024 beq $zero, $zero, 0xBFC403B4 */ - uint32_t psx_brA_BFC40320 = cpu->gpr[0]; uint32_t psx_brB_BFC40320 = cpu->gpr[0]; - psx_taken_BFC40320 = (psx_brA_BFC40320 == psx_brB_BFC40320); - psx_delay_BFC40320 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40324: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058324u); -#endif - if (psx_delay_BFC40320) { - psx_delay_BFC40320 = 0; - if (psx_taken_BFC40320) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583B4u); - goto label_BFC403B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058328u); - } -label_BFC40328: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40328u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40328: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC4032C: AC25EE6C sw $a1, -4500($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4500; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4500)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005832Cu); return; } g_debug_last_store_pc = 0x8005832Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC25EE6Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005832Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40330: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC40334: AC26EE70 sw $a2, -4496($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4496; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4496)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058334u); return; } g_debug_last_store_pc = 0x80058334u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EE70u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80058334u); -#endif - /* 0xBFC40338: 90C30001 lbu $v1, 1($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (1)), 3, 0x40u); - PGXP_LOAD(0x90C30001u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC4033C: AFA60020 sw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005833Cu); return; } g_debug_last_store_pc = 0x8005833Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005833Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40340: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80058348u; /* jal link before delay slot */ - psx_delay_BFC40340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC40344: A3A30018 sb $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058344u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (24)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA3A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058344u); -#endif - if (psx_delay_BFC40340) { - psx_delay_BFC40340 = 0; - cpu->gpr[31] = 0x80058348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC40348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC40348: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058348u); -#endif - /* 0xBFC4034C: 8FA60020 lw $a2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005834Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60020u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005834Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058350u); -#endif - /* 0xBFC40350: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058350u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40354: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058354u); -#endif - /* 0xBFC40358: 8C849C30 lw $a0, -25552($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058358u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C30u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058358u); -#endif - /* 0xBFC4035C: 93A30018 lbu $v1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 3, 0x20000000u); - PGXP_LOAD(0x93A30018u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005835Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC40360: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058360u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80058360u); -#endif - /* 0xBFC40364: 90C80000 lbu $t0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 8, 0x40u); - PGXP_LOAD(0x90C80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40368: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110u); -#endif - /* 0xBFC4036C: A0880000 sb $t0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005836Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0880000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005836Cu); -#endif -label_BFC40370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC40370: 10600008 beq $v1, $zero, 0xBFC40394 */ - uint32_t psx_brA_BFC40370 = cpu->gpr[3]; uint32_t psx_brB_BFC40370 = cpu->gpr[0]; - psx_taken_BFC40370 = (psx_brA_BFC40370 == psx_brB_BFC40370); - psx_delay_BFC40370 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40374: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058374u); -#endif - if (psx_delay_BFC40370) { - psx_delay_BFC40370 = 0; - if (psx_taken_BFC40370) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058394u); - goto label_BFC40394; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058378u); - } -label_BFC40378: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40378u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x244u); -#endif - /* 0xBFC40378: 00C24821 addu $t1, $a2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[9] = cpu->gpr[6] + cpu->gpr[2]; - PGXP_ALU(0x00C24821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058378u); -#endif - /* 0xBFC4037C: 912A0002 lbu $t2, 2($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + 2; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (2)), 10, 0x200u); - PGXP_LOAD(0x912A0002u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005837Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40380: 2463FFFF addiu $v1, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x2463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40384: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40388: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4038C: 1000FFF8 beq $zero, $zero, 0xBFC40370 */ - uint32_t psx_brA_BFC4038C = cpu->gpr[0]; uint32_t psx_brB_BFC4038C = cpu->gpr[0]; - psx_taken_BFC4038C = (psx_brA_BFC4038C == psx_brB_BFC4038C); - psx_delay_BFC4038C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x410u); -#endif - /* 0xBFC40390: A08A0000 sb $t2, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058390u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA08A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80058390u); -#endif - if (psx_delay_BFC4038C) { - psx_delay_BFC4038C = 0; - if (psx_taken_BFC4038C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058370u); - goto label_BFC40370; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058394u); - } -label_BFC40394: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40394u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC40394: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058394u); -#endif - /* 0xBFC40398: 8DAD9C2C lw $t5, -25556($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058398u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9C2Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80058398u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC4039C: 240B0019 addiu $t3, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x240B0019u, cpu->gpr[11], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8005839Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC403A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800583A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC403A4: AC2BEE54 sw $t3, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800583A4u); return; } g_debug_last_store_pc = 0x800583A4u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BEE54u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800583A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC403A8: 240C0019 addiu $t4, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x240C0019u, cpu->gpr[12], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x800583A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC403AC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800583ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000u); -#endif - /* 0xBFC403B0: A1AC0000 sb $t4, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800583B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA1AC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800583B0u); -#endif -label_BFC403B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC403B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC403B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583B4u); -#endif - /* 0xBFC403B4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800583B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800583B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC403B8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800583B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC403BC: 03E00008 jr $ra */ - psx_delay_BFC403BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC403C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800583C0u); -#endif - if (psx_delay_BFC403BC) { - psx_delay_BFC403BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC403C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC403C4u); - int psx_delay_BFC403D0 = 0; - int psx_taken_BFC403D0 = 0; - int psx_delay_BFC403D8 = 0; - int psx_delay_BFC403FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC403D8u: goto label_BFC403D8; - case 0xBFC403E0u: goto label_BFC403E0; - default: break; - } - } -label_BFC403C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC403C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC403C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC403C4: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800583C4u); -#endif - /* 0xBFC403C8: 8DCEEE54 lw $t6, -4524($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800583C8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800583C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC403CC: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800583CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC403D0: 11C10003 beq $t6, $at, 0xBFC403E0 */ - uint32_t psx_brA_BFC403D0 = cpu->gpr[14]; uint32_t psx_brB_BFC403D0 = cpu->gpr[1]; - psx_taken_BFC403D0 = (psx_brA_BFC403D0 == psx_brB_BFC403D0); - psx_delay_BFC403D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC403D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800583D4u); -#endif - if (psx_delay_BFC403D0) { - psx_delay_BFC403D0 = 0; - if (psx_taken_BFC403D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583E0u); - goto label_BFC403E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800583D8u); - } -label_BFC403D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC403D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC403D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC403D8: 03E00008 jr $ra */ - psx_delay_BFC403D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC403DC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800583DCu); -#endif - if (psx_delay_BFC403D8) { - psx_delay_BFC403D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC403E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC403E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC403E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC403E0: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800583E0u); -#endif - /* 0xBFC403E4: 91EFEEA2 lbu $t7, -4446($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4446; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[15] + (-4446)), 15, 0x8000u); - PGXP_LOAD(0x91EFEEA2u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800583E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC403E8: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800583E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC403EC: A08F0000 sb $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800583ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800583ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800583F0u); -#endif - /* 0xBFC403F0: 9318EEA3 lbu $t8, -4445($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4445; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-4445)), 24, 0x1000000u); - PGXP_LOAD(0x9318EEA3u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800583F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC403F4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800583F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000020u); -#endif - /* 0xBFC403F8: A0B80000 sb $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800583F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800583F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC403FC: 03E00008 jr $ra */ - psx_delay_BFC403FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40400: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058400u); -#endif - if (psx_delay_BFC403FC) { - psx_delay_BFC403FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40404(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40404u); - int psx_delay_BFC40410 = 0; - int psx_taken_BFC40410 = 0; - int psx_delay_BFC40418 = 0; - int psx_taken_BFC40418 = 0; - int psx_delay_BFC40420 = 0; - int psx_taken_BFC40420 = 0; - int psx_delay_BFC40428 = 0; - int psx_delay_BFC40470 = 0; - int psx_taken_BFC40470 = 0; - int psx_delay_BFC4047C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40418u: goto label_BFC40418; - case 0xBFC40420u: goto label_BFC40420; - case 0xBFC40428u: goto label_BFC40428; - case 0xBFC40430u: goto label_BFC40430; - case 0xBFC40434u: goto label_BFC40434; - case 0xBFC40448u: goto label_BFC40448; - case 0xBFC40478u: goto label_BFC40478; - default: break; - } - } -label_BFC40404: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40404u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40404: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058404u); -#endif - /* 0xBFC40408: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058408u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058408u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4040C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005840Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40410: 10410007 beq $v0, $at, 0xBFC40430 */ - uint32_t psx_brA_BFC40410 = cpu->gpr[2]; uint32_t psx_brB_BFC40410 = cpu->gpr[1]; - psx_taken_BFC40410 = (psx_brA_BFC40410 == psx_brB_BFC40410); - psx_delay_BFC40410 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40414: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058414u); -#endif - if (psx_delay_BFC40410) { - psx_delay_BFC40410 = 0; - if (psx_taken_BFC40410) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058430u); - goto label_BFC40430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058418u); - } -label_BFC40418: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40418u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058418u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40418: 10410005 beq $v0, $at, 0xBFC40430 */ - uint32_t psx_brA_BFC40418 = cpu->gpr[2]; uint32_t psx_brB_BFC40418 = cpu->gpr[1]; - psx_taken_BFC40418 = (psx_brA_BFC40418 == psx_brB_BFC40418); - psx_delay_BFC40418 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4041C: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005841Cu); -#endif - if (psx_delay_BFC40418) { - psx_delay_BFC40418 = 0; - if (psx_taken_BFC40418) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058430u); - goto label_BFC40430; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058420u); - } -label_BFC40420: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40420u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40420: 10410004 beq $v0, $at, 0xBFC40434 */ - uint32_t psx_brA_BFC40420 = cpu->gpr[2]; uint32_t psx_brB_BFC40420 = cpu->gpr[1]; - psx_taken_BFC40420 = (psx_brA_BFC40420 == psx_brB_BFC40420); - psx_delay_BFC40420 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40424: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058424u); -#endif - if (psx_delay_BFC40420) { - psx_delay_BFC40420 = 0; - if (psx_taken_BFC40420) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058434u); - goto label_BFC40434; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058428u); - } -label_BFC40428: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40428u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40428: 03E00008 jr $ra */ - psx_delay_BFC40428 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4042C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005842Cu); -#endif - if (psx_delay_BFC40428) { - psx_delay_BFC40428 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC40430: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40430u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40430: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058430u); -#endif -label_BFC40434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40434: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC40438: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4043C: 24A5EEB8 addiu $a1, $a1, -4424 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4424)); - PGXP_ALU(0x24A5EEB8u, cpu->gpr[5], _pgx1, 0xFFFFEEB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005843Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40440: 2442EEC0 addiu $v0, $v0, -4416 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4416)); - PGXP_ALU(0x2442EEC0u, cpu->gpr[2], _pgx1, 0xFFFFEEC0u); } -#ifdef PSX_COSIM - cosim_instr(0x80058440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC40444: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058444u); -#endif -label_BFC40448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058448u); -#endif - /* 0xBFC40448: 90AE0000 lbu $t6, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 14, 0x20u); - PGXP_LOAD(0x90AE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4044C: 24A50004 addiu $a1, $a1, 4 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (4)); - PGXP_ALU(0x24A50004u, cpu->gpr[5], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005844Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC40450: A06E0000 sb $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058450u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA06E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058450u); -#endif - /* 0xBFC40454: 90AFFFFD lbu $t7, -3($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -3; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-3)), 15, 0x20u); - PGXP_LOAD(0x90AFFFFDu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40458: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC4045C: A06FFFFD sb $t7, -3($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005845Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-3)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06FFFFDu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005845Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058460u); -#endif - /* 0xBFC40460: 90B8FFFE lbu $t8, -2($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -2; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-2)), 24, 0x20u); - PGXP_LOAD(0x90B8FFFEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC40468: A078FFFE sb $t8, -2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058468u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA078FFFEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058468u); -#endif - /* 0xBFC4046C: 90B9FFFF lbu $t9, -1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -1; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (-1)), 25, 0x20u); - PGXP_LOAD(0x90B9FFFFu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005846Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC40470: 14A2FFF5 bne $a1, $v0, 0xBFC40448 */ - uint32_t psx_brA_BFC40470 = cpu->gpr[5]; uint32_t psx_brB_BFC40470 = cpu->gpr[2]; - psx_taken_BFC40470 = (psx_brA_BFC40470 != psx_brB_BFC40470); - psx_delay_BFC40470 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC40474: A079FFFF sb $t9, -1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058474u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA079FFFFu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058474u); -#endif - if (psx_delay_BFC40470) { - psx_delay_BFC40470 = 0; - if (psx_taken_BFC40470) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058448u); - goto label_BFC40448; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058478u); - } -label_BFC40478: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40478u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40478: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4047C: 03E00008 jr $ra */ - psx_delay_BFC4047C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40480: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058480u); -#endif - if (psx_delay_BFC4047C) { - psx_delay_BFC4047C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40484(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40484u); - int psx_delay_BFC404A0 = 0; - int psx_taken_BFC404A0 = 0; - int psx_delay_BFC404A8 = 0; - int psx_taken_BFC404A8 = 0; - int psx_delay_BFC404BC = 0; - int psx_taken_BFC404BC = 0; - int psx_delay_BFC404C4 = 0; - int psx_taken_BFC404C4 = 0; - int psx_delay_BFC40510 = 0; - int psx_taken_BFC40510 = 0; - int psx_delay_BFC4052C = 0; - int psx_delay_BFC40534 = 0; - int psx_delay_BFC40544 = 0; - int psx_taken_BFC40544 = 0; - int psx_delay_BFC4054C = 0; - int psx_delay_BFC4055C = 0; - int psx_taken_BFC4055C = 0; - int psx_delay_BFC40564 = 0; - int psx_delay_BFC40574 = 0; - int psx_taken_BFC40574 = 0; - int psx_delay_BFC4057C = 0; - int psx_delay_BFC4058C = 0; - int psx_taken_BFC4058C = 0; - int psx_delay_BFC40594 = 0; - int psx_delay_BFC405A4 = 0; - int psx_taken_BFC405A4 = 0; - int psx_delay_BFC405D4 = 0; - int psx_taken_BFC405D4 = 0; - int psx_delay_BFC40604 = 0; - int psx_taken_BFC40604 = 0; - int psx_delay_BFC40620 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC404A8u: goto label_BFC404A8; - case 0xBFC404B0u: goto label_BFC404B0; - case 0xBFC404C4u: goto label_BFC404C4; - case 0xBFC404CCu: goto label_BFC404CC; - case 0xBFC40518u: goto label_BFC40518; - case 0xBFC40534u: goto label_BFC40534; - case 0xBFC4053Cu: goto label_BFC4053C; - case 0xBFC4054Cu: goto label_BFC4054C; - case 0xBFC40554u: goto label_BFC40554; - case 0xBFC40564u: goto label_BFC40564; - case 0xBFC4056Cu: goto label_BFC4056C; - case 0xBFC4057Cu: goto label_BFC4057C; - case 0xBFC40584u: goto label_BFC40584; - case 0xBFC40594u: goto label_BFC40594; - case 0xBFC4059Cu: goto label_BFC4059C; - case 0xBFC405ACu: goto label_BFC405AC; - case 0xBFC405B0u: goto label_BFC405B0; - case 0xBFC405DCu: goto label_BFC405DC; - case 0xBFC405E0u: goto label_BFC405E0; - case 0xBFC4060Cu: goto label_BFC4060C; - case 0xBFC40610u: goto label_BFC40610; - case 0xBFC40618u: goto label_BFC40618; - default: break; - } - } -label_BFC40484: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40484u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058484u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40484: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058484u); -#endif - /* 0xBFC40488: 8C849C44 lw $a0, -25532($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058488u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058488u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4048C: 27BDFFC0 addiu $sp, $sp, -64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-64)); - PGXP_ALU(0x27BDFFC0u, cpu->gpr[29], _pgx1, 0xFFFFFFC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005848Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40490: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058490u); return; } g_debug_last_store_pc = 0x80058490u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058490u); -#endif - /* 0xBFC40494: 8C8E0004 lw $t6, 4($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058494u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x10u); } - PGXP_LOAD(0x8C8E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40498: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC4049C: 31CF0004 andi $t7, $t6, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x4u; - PGXP_ALU(0x31CF0004u, cpu->gpr[15], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005849Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC404A0: 15E00003 bne $t7, $zero, 0xBFC404B0 */ - uint32_t psx_brA_BFC404A0 = cpu->gpr[15]; uint32_t psx_brB_BFC404A0 = cpu->gpr[0]; - psx_taken_BFC404A0 = (psx_brA_BFC404A0 != psx_brB_BFC404A0); - psx_delay_BFC404A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC404A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800584A4u); -#endif - if (psx_delay_BFC404A0) { - psx_delay_BFC404A0 = 0; - if (psx_taken_BFC404A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584B0u); - goto label_BFC404B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584A8u); - } -label_BFC404A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC404A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC404A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC404A8: 1000005B beq $zero, $zero, 0xBFC40618 */ - uint32_t psx_brA_BFC404A8 = cpu->gpr[0]; uint32_t psx_brB_BFC404A8 = cpu->gpr[0]; - psx_taken_BFC404A8 = (psx_brA_BFC404A8 == psx_brB_BFC404A8); - psx_delay_BFC404A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC404AC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800584ACu); -#endif - if (psx_delay_BFC404A8) { - psx_delay_BFC404A8 = 0; - if (psx_taken_BFC404A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058618u); - goto label_BFC40618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584B0u); - } -label_BFC404B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC404B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC404B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584B0u); -#endif - /* 0xBFC404B0: 8C820000 lw $v0, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800584B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } - PGXP_LOAD(0x8C820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800584B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC404B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800584B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC404B8: 30580004 andi $t8, $v0, 0x4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x4u; - PGXP_ALU(0x30580004u, cpu->gpr[24], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800584B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC404BC: 17000003 bne $t8, $zero, 0xBFC404CC */ - uint32_t psx_brA_BFC404BC = cpu->gpr[24]; uint32_t psx_brB_BFC404BC = cpu->gpr[0]; - psx_taken_BFC404BC = (psx_brA_BFC404BC != psx_brB_BFC404BC); - psx_delay_BFC404BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC404C0: AC22EE50 sw $v0, -4528($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800584C0u); return; } g_debug_last_store_pc = 0x800584C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE50u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800584C0u); -#endif - if (psx_delay_BFC404BC) { - psx_delay_BFC404BC = 0; - if (psx_taken_BFC404BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584CCu); - goto label_BFC404CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584C4u); - } -label_BFC404C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC404C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC404C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC404C4: 10000054 beq $zero, $zero, 0xBFC40618 */ - uint32_t psx_brA_BFC404C4 = cpu->gpr[0]; uint32_t psx_brB_BFC404C4 = cpu->gpr[0]; - psx_taken_BFC404C4 = (psx_brA_BFC404C4 == psx_brB_BFC404C4); - psx_delay_BFC404C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC404C8: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800584C8u); -#endif - if (psx_delay_BFC404C4) { - psx_delay_BFC404C4 = 0; - if (psx_taken_BFC404C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058618u); - goto label_BFC40618; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800584CCu); - } -label_BFC404CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC404CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC404CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC404CC: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800584CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584D0u); -#endif - /* 0xBFC404D0: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800584D0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800584D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC404D4: 24090001 addiu $t1, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800584D4u); -#endif - /* 0xBFC404D8: 90B90000 lbu $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 25, 0x20u); - PGXP_LOAD(0x90B90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800584D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC404DC: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800584DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC404E0: 33280003 andi $t0, $t9, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x3u; - PGXP_ALU(0x33280003u, cpu->gpr[8], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800584E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC404E4: A3A80028 sb $t0, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800584E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (40)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA3A80028u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800584E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220u); -#endif - /* 0xBFC404E8: A0A90000 sb $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800584E8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA0A90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800584E8u); -#endif - /* 0xBFC404EC: 8D4A9C34 lw $t2, -25548($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800584ECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C34u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800584ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800584F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC404F0: 240BFFFB addiu $t3, $zero, -5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); - PGXP_ALU(0x240BFFFBu, cpu->gpr[11], _pgx1, 0xFFFFFFFBu); } -#ifdef PSX_COSIM - cosim_instr(0x800584F0u); -#endif - /* 0xBFC404F4: 91420000 lbu $v0, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (0)), 2, 0x400u); - PGXP_LOAD(0x91420000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800584F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x810u); -#endif - /* 0xBFC404F8: AC8B0000 sw $t3, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800584F8u); return; } g_debug_last_store_pc = 0x800584F8u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC8B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800584F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC404FC: 30420007 andi $v0, $v0, 0x7 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7u; - PGXP_ALU(0x30420007u, cpu->gpr[2], _pgx1, 0x0007u); } -#ifdef PSX_COSIM - cosim_instr(0x800584FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40500: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC40504: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC40508: 246CFFFF addiu $t4, $v1, -1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); - PGXP_ALU(0x246CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC4050C: 2D810005 sltiu $at, $t4, 5 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)(cpu->gpr[12] < 0x00000005u ? 1 : 0); - PGXP_ALU(0x2D810005u, cpu->gpr[1], _pgx1, 0x0005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005850Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40510: 10200026 beq $at, $zero, 0xBFC405AC */ - uint32_t psx_brA_BFC40510 = cpu->gpr[1]; uint32_t psx_brB_BFC40510 = cpu->gpr[0]; - psx_taken_BFC40510 = (psx_brA_BFC40510 == psx_brB_BFC40510); - psx_delay_BFC40510 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40514: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058514u); -#endif - if (psx_delay_BFC40510) { - psx_delay_BFC40510 = 0; - if (psx_taken_BFC40510) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585ACu); - goto label_BFC405AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058518u); - } -label_BFC40518: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40518u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC40518: 000C6080 sll $t4, $t4, 2 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 2u; - PGXP_ALU(0x000C6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80058518u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4051C: 3C018006 lui $at, 0x8006 */ - cpu->gpr[1] = 0x80060000u; - PGXP_ALU(0x3C018006u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005851Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC40520: 002C0821 addu $at, $at, $t4 */ - { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[1] = cpu->gpr[1] + cpu->gpr[12]; - PGXP_ALU(0x002C0821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058520u); -#endif - /* 0xBFC40524: 8C2CAE00 lw $t4, -20992($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -20992; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-20992)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058524u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x2u); } - PGXP_LOAD(0x8C2CAE00u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80058524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40528: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC4052C: 01800008 jr $t4 */ - psx_delay_BFC4052C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40530: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058530u); -#endif - if (psx_delay_BFC4052C) { - psx_delay_BFC4052C = 0; - /* jump table at 0x8005AE00, 5 entries */ - switch (cpu->gpr[12]) { - case 0x80058534u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058534u); - goto label_BFC40534; - case 0x8005854Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005854Cu); - goto label_BFC4054C; - case 0x80058564u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058564u); - goto label_BFC40564; - case 0x8005857Cu: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005857Cu); - goto label_BFC4057C; - case 0x80058594u: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058594u); - goto label_BFC40594; - default: -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[12]); - cpu->pc = cpu->gpr[12]; return; - } - } -label_BFC40534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40534: 0C0163CD jal 0xB0058F34 */ - cpu->gpr[31] = 0x8005853Cu; /* jal link before delay slot */ - psx_delay_BFC40534 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40538: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058538u); -#endif - if (psx_delay_BFC40534) { - psx_delay_BFC40534 = 0; - cpu->gpr[31] = 0x8005853Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F34u); - cpu->pc = 0x80058F34u; return; - } -label_BFC4053C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4053Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4053Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4053C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005853Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058540u); -#endif - /* 0xBFC40540: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058540u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80058540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40544: 1000001A beq $zero, $zero, 0xBFC405B0 */ - uint32_t psx_brA_BFC40544 = cpu->gpr[0]; uint32_t psx_brB_BFC40544 = cpu->gpr[0]; - psx_taken_BFC40544 = (psx_brA_BFC40544 == psx_brB_BFC40544); - psx_delay_BFC40544 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC40548: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058548u); -#endif - if (psx_delay_BFC40544) { - psx_delay_BFC40544 = 0; - if (psx_taken_BFC40544) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585B0u); - goto label_BFC405B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005854Cu); - } -label_BFC4054C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4054Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4054Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005854Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4054C: 0C0162DA jal 0xB0058B68 */ - cpu->gpr[31] = 0x80058554u; /* jal link before delay slot */ - psx_delay_BFC4054C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40550: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058550u); -#endif - if (psx_delay_BFC4054C) { - psx_delay_BFC4054C = 0; - cpu->gpr[31] = 0x80058554u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B68u); - cpu->pc = 0x80058B68u; return; - } -label_BFC40554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC40554: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058554u); -#endif - /* 0xBFC40558: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058558u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80058558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4055C: 10000014 beq $zero, $zero, 0xBFC405B0 */ - uint32_t psx_brA_BFC4055C = cpu->gpr[0]; uint32_t psx_brB_BFC4055C = cpu->gpr[0]; - psx_taken_BFC4055C = (psx_brA_BFC4055C == psx_brB_BFC4055C); - psx_delay_BFC4055C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC40560: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058560u); -#endif - if (psx_delay_BFC4055C) { - psx_delay_BFC4055C = 0; - if (psx_taken_BFC4055C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585B0u); - goto label_BFC405B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058564u); - } -label_BFC40564: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40564u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058564u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40564: 0C0161EE jal 0xB00587B8 */ - cpu->gpr[31] = 0x8005856Cu; /* jal link before delay slot */ - psx_delay_BFC40564 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40568: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058568u); -#endif - if (psx_delay_BFC40564) { - psx_delay_BFC40564 = 0; - cpu->gpr[31] = 0x8005856Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587B8u); - cpu->pc = 0x800587B8u; return; - } -label_BFC4056C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4056Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4056Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4056C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005856Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058570u); -#endif - /* 0xBFC40570: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058570u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80058570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40574: 1000000E beq $zero, $zero, 0xBFC405B0 */ - uint32_t psx_brA_BFC40574 = cpu->gpr[0]; uint32_t psx_brB_BFC40574 = cpu->gpr[0]; - psx_taken_BFC40574 = (psx_brA_BFC40574 == psx_brB_BFC40574); - psx_delay_BFC40574 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC40578: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058578u); -#endif - if (psx_delay_BFC40574) { - psx_delay_BFC40574 = 0; - if (psx_taken_BFC40574) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585B0u); - goto label_BFC405B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005857Cu); - } -label_BFC4057C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4057Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4057Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005857Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4057C: 0C01640B jal 0xB005902C */ - cpu->gpr[31] = 0x80058584u; /* jal link before delay slot */ - psx_delay_BFC4057C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40580: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058580u); -#endif - if (psx_delay_BFC4057C) { - psx_delay_BFC4057C = 0; - cpu->gpr[31] = 0x80058584u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005902Cu); - cpu->pc = 0x8005902Cu; return; - } -label_BFC40584: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40584u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC40584: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058584u); -#endif - /* 0xBFC40588: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058588u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80058588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4058C: 10000008 beq $zero, $zero, 0xBFC405B0 */ - uint32_t psx_brA_BFC4058C = cpu->gpr[0]; uint32_t psx_brB_BFC4058C = cpu->gpr[0]; - psx_taken_BFC4058C = (psx_brA_BFC4058C == psx_brB_BFC4058C); - psx_delay_BFC4058C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC40590: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058590u); -#endif - if (psx_delay_BFC4058C) { - psx_delay_BFC4058C = 0; - if (psx_taken_BFC4058C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585B0u); - goto label_BFC405B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058594u); - } -label_BFC40594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40594: 0C01637A jal 0xB0058DE8 */ - cpu->gpr[31] = 0x8005859Cu; /* jal link before delay slot */ - psx_delay_BFC40594 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40598: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058598u); -#endif - if (psx_delay_BFC40594) { - psx_delay_BFC40594 = 0; - cpu->gpr[31] = 0x8005859Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DE8u); - cpu->pc = 0x80058DE8u; return; - } -label_BFC4059C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4059Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4059Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4059C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005859Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585A0u); -#endif - /* 0xBFC405A0: 8CA59C28 lw $a1, -25560($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585A0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C28u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800585A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC405A4: 10000002 beq $zero, $zero, 0xBFC405B0 */ - uint32_t psx_brA_BFC405A4 = cpu->gpr[0]; uint32_t psx_brB_BFC405A4 = cpu->gpr[0]; - psx_taken_BFC405A4 = (psx_brA_BFC405A4 == psx_brB_BFC405A4); - psx_delay_BFC405A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC405A8: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800585A8u); -#endif - if (psx_delay_BFC405A4) { - psx_delay_BFC405A4 = 0; - if (psx_taken_BFC405A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585B0u); - goto label_BFC405B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585ACu); - } -label_BFC405AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC405ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC405ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC405AC: 240D0001 addiu $t5, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240D0001u, cpu->gpr[13], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800585ACu); -#endif -label_BFC405B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC405B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC405B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2020u); -#endif - /* 0xBFC405B0: A0AD0000 sb $t5, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800585B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[13] & 0xFFu)); - PGXP_STORE(0xA0AD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800585B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC405B4: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800585B4u); -#endif - /* 0xBFC405B8: 8DEF9C34 lw $t7, -25548($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585B8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C34u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800585B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC405BC: 240E0007 addiu $t6, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x240E0007u, cpu->gpr[14], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x800585BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC405C0: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800585C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800585C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC405C4: AFA00024 sw $zero, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585C4u); return; } g_debug_last_store_pc = 0x800585C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00024u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800585C4u); -#endif - /* 0xBFC405C8: 8FB80024 lw $t8, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585C8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB80024u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800585C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC405CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800585CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC405D0: 2B010004 slti $at, $t8, 4 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[24] < (4) ? 1 : 0); - PGXP_ALU(0x2B010004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800585D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC405D4: 1020000E beq $at, $zero, 0xBFC40610 */ - uint32_t psx_brA_BFC405D4 = cpu->gpr[1]; uint32_t psx_brB_BFC405D4 = cpu->gpr[0]; - psx_taken_BFC405D4 = (psx_brA_BFC405D4 == psx_brB_BFC405D4); - psx_delay_BFC405D4 = 1; - /* 0xBFC405D8: 93AB0028 lbu $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (40)), 11, 0x20000000u); - PGXP_LOAD(0x93AB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800585D8u); -#endif - if (psx_delay_BFC405D4) { - psx_delay_BFC405D4 = 0; - if (psx_taken_BFC405D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058610u); - goto label_BFC40610; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585DCu); - } -label_BFC405DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC405DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC405DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585DCu); -#endif - /* 0xBFC405DC: 8FB90024 lw $t9, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585DCu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90024u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800585DCu); -#endif -label_BFC405E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC405E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC405E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC405E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800585E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC405E4: AC190000 sw $t9, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585E4u); return; } g_debug_last_store_pc = 0x800585E4u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800585E4u); -#endif - /* 0xBFC405E8: 8FA80024 lw $t0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585E8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80024u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800585E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC405EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800585ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800585F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC405F0: 25090001 addiu $t1, $t0, 1 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); - PGXP_ALU(0x25090001u, cpu->gpr[9], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800585F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000200u); -#endif - /* 0xBFC405F4: AFA90024 sw $t1, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585F4u); return; } g_debug_last_store_pc = 0x800585F4u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAFA90024u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800585F4u); -#endif - /* 0xBFC405F8: 8FAA0024 lw $t2, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800585F8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0024u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800585F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC405FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800585FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC40600: 29410004 slti $at, $t2, 4 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (4) ? 1 : 0); - PGXP_ALU(0x29410004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40604: 1420FFF6 bne $at, $zero, 0xBFC405E0 */ - uint32_t psx_brA_BFC40604 = cpu->gpr[1]; uint32_t psx_brB_BFC40604 = cpu->gpr[0]; - psx_taken_BFC40604 = (psx_brA_BFC40604 != psx_brB_BFC40604); - psx_delay_BFC40604 = 1; - /* 0xBFC40608: 8FB90024 lw $t9, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058608u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x20000000u); } - PGXP_LOAD(0x8FB90024u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058608u); -#endif - if (psx_delay_BFC40604) { - psx_delay_BFC40604 = 0; - if (psx_taken_BFC40604) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800585E0u); - goto label_BFC405E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005860Cu); - } -label_BFC4060C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4060Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4060Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005860Cu); -#endif - /* 0xBFC4060C: 93AB0028 lbu $t3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (40)), 11, 0x20000000u); - PGXP_LOAD(0x93AB0028u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005860Cu); -#endif -label_BFC40610: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40610u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40610: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x820u); -#endif - /* 0xBFC40614: A0AB0000 sb $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058614u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA0AB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058614u); -#endif -label_BFC40618: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40618u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058618u); -#endif - /* 0xBFC40618: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058618u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4061C: 27BD0040 addiu $sp, $sp, 64 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (64)); - PGXP_ALU(0x27BD0040u, cpu->gpr[29], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8005861Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40620: 03E00008 jr $ra */ - psx_delay_BFC40620 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40624: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058624u); -#endif - if (psx_delay_BFC40620) { - psx_delay_BFC40620 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40628(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40628u); - int psx_delay_BFC40644 = 0; - int psx_taken_BFC40644 = 0; - int psx_delay_BFC4064C = 0; - int psx_taken_BFC4064C = 0; - int psx_delay_BFC40660 = 0; - int psx_taken_BFC40660 = 0; - int psx_delay_BFC40668 = 0; - int psx_taken_BFC40668 = 0; - int psx_delay_BFC406AC = 0; - int psx_taken_BFC406AC = 0; - int psx_delay_BFC406BC = 0; - int psx_delay_BFC406D8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4064Cu: goto label_BFC4064C; - case 0xBFC40654u: goto label_BFC40654; - case 0xBFC40668u: goto label_BFC40668; - case 0xBFC40670u: goto label_BFC40670; - case 0xBFC406B4u: goto label_BFC406B4; - case 0xBFC406C4u: goto label_BFC406C4; - case 0xBFC406D0u: goto label_BFC406D0; - default: break; - } - } -label_BFC40628: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40628u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC40628: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058628u); -#endif - /* 0xBFC4062C: 8CA59C44 lw $a1, -25532($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25532; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25532)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005862Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C44u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005862Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40630: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40634: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058634u); return; } g_debug_last_store_pc = 0x80058634u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058634u); -#endif - /* 0xBFC40638: 8CAE0004 lw $t6, 4($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058638u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x20u); } - PGXP_LOAD(0x8CAE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4063C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005863Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC40640: 31CF0008 andi $t7, $t6, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x8u; - PGXP_ALU(0x31CF0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80058640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC40644: 15E00003 bne $t7, $zero, 0xBFC40654 */ - uint32_t psx_brA_BFC40644 = cpu->gpr[15]; uint32_t psx_brB_BFC40644 = cpu->gpr[0]; - psx_taken_BFC40644 = (psx_brA_BFC40644 != psx_brB_BFC40644); - psx_delay_BFC40644 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40648: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058648u); -#endif - if (psx_delay_BFC40644) { - psx_delay_BFC40644 = 0; - if (psx_taken_BFC40644) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058654u); - goto label_BFC40654; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005864Cu); - } -label_BFC4064C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4064Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4064Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005864Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4064C: 10000020 beq $zero, $zero, 0xBFC406D0 */ - uint32_t psx_brA_BFC4064C = cpu->gpr[0]; uint32_t psx_brB_BFC4064C = cpu->gpr[0]; - psx_taken_BFC4064C = (psx_brA_BFC4064C == psx_brB_BFC4064C); - psx_delay_BFC4064C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40650: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058650u); -#endif - if (psx_delay_BFC4064C) { - psx_delay_BFC4064C = 0; - if (psx_taken_BFC4064C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800586D0u); - goto label_BFC406D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058654u); - } -label_BFC40654: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40654u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058654u); -#endif - /* 0xBFC40654: 8CA20000 lw $v0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058654u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } - PGXP_LOAD(0x8CA20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40658: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058658u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC4065C: 30580008 andi $t8, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[24] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x30580008u, cpu->gpr[24], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005865Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40660: 17000003 bne $t8, $zero, 0xBFC40670 */ - uint32_t psx_brA_BFC40660 = cpu->gpr[24]; uint32_t psx_brB_BFC40660 = cpu->gpr[0]; - psx_taken_BFC40660 = (psx_brA_BFC40660 != psx_brB_BFC40660); - psx_delay_BFC40660 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40664: AC22EE50 sw $v0, -4528($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058664u); return; } g_debug_last_store_pc = 0x80058664u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE50u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058664u); -#endif - if (psx_delay_BFC40660) { - psx_delay_BFC40660 = 0; - if (psx_taken_BFC40660) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058670u); - goto label_BFC40670; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058668u); - } -label_BFC40668: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40668u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058668u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40668: 10000019 beq $zero, $zero, 0xBFC406D0 */ - uint32_t psx_brA_BFC40668 = cpu->gpr[0]; uint32_t psx_brB_BFC40668 = cpu->gpr[0]; - psx_taken_BFC40668 = (psx_brA_BFC40668 == psx_brB_BFC40668); - psx_delay_BFC40668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4066C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005866Cu); -#endif - if (psx_delay_BFC40668) { - psx_delay_BFC40668 = 0; - if (psx_taken_BFC40668) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800586D0u); - goto label_BFC406D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058670u); - } -label_BFC40670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40670: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058670u); -#endif - /* 0xBFC40674: 8C639C3C lw $v1, -25540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058674u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C3Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40678: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058678u); -#endif - /* 0xBFC4067C: 8C84EE78 lw $a0, -4488($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005867Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE78u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005867Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC40680: 2419FFF7 addiu $t9, $zero, -9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); - PGXP_ALU(0x2419FFF7u, cpu->gpr[25], _pgx1, 0xFFFFFFF7u); } -#ifdef PSX_COSIM - cosim_instr(0x80058680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000020u); -#endif - /* 0xBFC40684: ACB90000 sw $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058684u); return; } g_debug_last_store_pc = 0x80058684u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xACB90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058684u); -#endif - /* 0xBFC40688: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058688u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4068C: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005868Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40690: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40694: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40698: 3C018800 lui $at, 0x8800 */ - cpu->gpr[1] = 0x88000000u; - PGXP_ALU(0x3C018800u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC4069C: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005869Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC406A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800586A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC406A4: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586A4u); return; } g_debug_last_store_pc = 0x800586A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800586A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC406A8: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800586A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC406AC: 14800005 bne $a0, $zero, 0xBFC406C4 */ - uint32_t psx_brA_BFC406AC = cpu->gpr[4]; uint32_t psx_brB_BFC406AC = cpu->gpr[0]; - psx_taken_BFC406AC = (psx_brA_BFC406AC != psx_brB_BFC406AC); - psx_delay_BFC406AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC406B0: AC24EE78 sw $a0, -4488($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586B0u); return; } g_debug_last_store_pc = 0x800586B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC24EE78u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800586B0u); -#endif - if (psx_delay_BFC406AC) { - psx_delay_BFC406AC = 0; - if (psx_taken_BFC406AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800586C4u); - goto label_BFC406C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800586B4u); - } -label_BFC406B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC406B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC406B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC406B4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800586B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC406B8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800586B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC406BC: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800586C4u; /* jal link before delay slot */ - psx_delay_BFC406BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC406C0: 24050010 addiu $a1, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24050010u, cpu->gpr[5], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800586C0u); -#endif - if (psx_delay_BFC406BC) { - psx_delay_BFC406BC = 0; - cpu->gpr[31] = 0x800586C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC406C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC406C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC406C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC406C4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800586C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC406C8: AC20EE60 sw $zero, -4512($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586C8u); return; } g_debug_last_store_pc = 0x800586C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EE60u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800586C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC406CC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800586CCu); -#endif -label_BFC406D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC406D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC406D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586D0u); -#endif - /* 0xBFC406D0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800586D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC406D4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800586D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC406D8: 03E00008 jr $ra */ - psx_delay_BFC406D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC406DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800586DCu); -#endif - if (psx_delay_BFC406D8) { - psx_delay_BFC406D8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC406E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC406E0u); - int psx_delay_BFC406E8 = 0; - int psx_delay_BFC406F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC406F0u: goto label_BFC406F0; - default: break; - } - } -label_BFC406E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC406E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC406E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC406E0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800586E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC406E4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586E4u); return; } g_debug_last_store_pc = 0x800586E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800586E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC406E8: 0C016AE8 jal 0xB005ABA0 */ - cpu->gpr[31] = 0x800586F0u; /* jal link before delay slot */ - psx_delay_BFC406E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC406EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800586ECu); -#endif - if (psx_delay_BFC406E8) { - psx_delay_BFC406E8 = 0; - cpu->gpr[31] = 0x800586F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABA0u); - cpu->pc = 0x8005ABA0u; return; - } -label_BFC406F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC406F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC406F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800586F0u); -#endif - /* 0xBFC406F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800586F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800586F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC406F4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800586F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC406F8: 03E00008 jr $ra */ - psx_delay_BFC406F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC406FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800586FCu); -#endif - if (psx_delay_BFC406F8) { - psx_delay_BFC406F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40700(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40700u); - int psx_delay_BFC40708 = 0; - int psx_delay_BFC40718 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40710u: goto label_BFC40710; - default: break; - } - } -label_BFC40700: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40700u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40700: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40704: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058704u); return; } g_debug_last_store_pc = 0x80058704u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058704u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40708: 0C016AE8 jal 0xB005ABA0 */ - cpu->gpr[31] = 0x80058710u; /* jal link before delay slot */ - psx_delay_BFC40708 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4070C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005870Cu); -#endif - if (psx_delay_BFC40708) { - psx_delay_BFC40708 = 0; - cpu->gpr[31] = 0x80058710u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABA0u); - cpu->pc = 0x8005ABA0u; return; - } -label_BFC40710: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40710u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058710u); -#endif - /* 0xBFC40710: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058710u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40714: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80058714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40718: 03E00008 jr $ra */ - psx_delay_BFC40718 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4071C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005871Cu); -#endif - if (psx_delay_BFC40718) { - psx_delay_BFC40718 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40720(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40720u); - int psx_delay_BFC4073C = 0; -label_BFC40720: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40720u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC40720: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058720u); -#endif - /* 0xBFC40724: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058724u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC40728: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC4072C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005872Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC40730: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058730u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058730u); -#endif - /* 0xBFC40734: 8F399C30 lw $t9, -25552($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058734u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C30u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40738: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80058738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4073C: 03E00008 jr $ra */ - psx_delay_BFC4073C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC40740: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058740u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058740u); -#endif - if (psx_delay_BFC4073C) { - psx_delay_BFC4073C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40744(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40744u); - int psx_delay_BFC40778 = 0; - int psx_taken_BFC40778 = 0; - int psx_delay_BFC407A8 = 0; - int psx_taken_BFC407A8 = 0; - int psx_delay_BFC407B0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40780u: goto label_BFC40780; - case 0xBFC40784u: goto label_BFC40784; - case 0xBFC407B0u: goto label_BFC407B0; - default: break; - } - } -label_BFC40744: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40744u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC40744: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058744u); -#endif - /* 0xBFC40748: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058748u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC4074C: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005874Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC40750: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC40754: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058754u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058754u); -#endif - /* 0xBFC40758: 8F399C34 lw $t9, -25548($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058758u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C34u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4075C: 2418001F addiu $t8, $zero, 31 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); - PGXP_ALU(0x2418001Fu, cpu->gpr[24], _pgx1, 0x0000001Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8005875Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40760: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC40764: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058764u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC40768: AFA00004 sw $zero, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058768u); return; } g_debug_last_store_pc = 0x80058768u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80058768u); -#endif - /* 0xBFC4076C: 8FA80004 lw $t0, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005876Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005876Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC40774: 29010004 slti $at, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0); - PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40778: 1020000D beq $at, $zero, 0xBFC407B0 */ - uint32_t psx_brA_BFC40778 = cpu->gpr[1]; uint32_t psx_brB_BFC40778 = cpu->gpr[0]; - psx_taken_BFC40778 = (psx_brA_BFC40778 == psx_brB_BFC40778); - psx_delay_BFC40778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4077C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005877Cu); -#endif - if (psx_delay_BFC40778) { - psx_delay_BFC40778 = 0; - if (psx_taken_BFC40778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587B0u); - goto label_BFC407B0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058780u); - } -label_BFC40780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058780u); -#endif - /* 0xBFC40780: 8FA90004 lw $t1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058780u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058780u); -#endif -label_BFC40784: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40784u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC40788: AC090000 sw $t1, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058788u); return; } g_debug_last_store_pc = 0x80058788u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058788u); -#endif - /* 0xBFC4078C: 8FAA0004 lw $t2, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005878Cu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005878Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40790: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC40794: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC40798: AFAB0004 sw $t3, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058798u); return; } g_debug_last_store_pc = 0x80058798u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058798u); -#endif - /* 0xBFC4079C: 8FAC0004 lw $t4, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005879Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005879Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407A0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800587A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC407A4: 29810004 slti $at, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0); - PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x800587A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC407A8: 1420FFF6 bne $at, $zero, 0xBFC40784 */ - uint32_t psx_brA_BFC407A8 = cpu->gpr[1]; uint32_t psx_brB_BFC407A8 = cpu->gpr[0]; - psx_taken_BFC407A8 = (psx_brA_BFC407A8 != psx_brB_BFC407A8); - psx_delay_BFC407A8 = 1; - /* 0xBFC407AC: 8FA90004 lw $t1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800587ACu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800587ACu); -#endif - if (psx_delay_BFC407A8) { - psx_delay_BFC407A8 = 0; - if (psx_taken_BFC407A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058784u); - goto label_BFC40784; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587B0u); - } -label_BFC407B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC407B0: 03E00008 jr $ra */ - psx_delay_BFC407B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC407B4: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800587B4u); -#endif - if (psx_delay_BFC407B0) { - psx_delay_BFC407B0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC407B8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC407B8u); - int psx_delay_BFC407C8 = 0; - int psx_taken_BFC407C8 = 0; - int psx_delay_BFC407D0 = 0; - int psx_delay_BFC407D8 = 0; - int psx_taken_BFC407D8 = 0; - int psx_delay_BFC407E4 = 0; - int psx_taken_BFC407E4 = 0; - int psx_delay_BFC407EC = 0; - int psx_delay_BFC407F4 = 0; - int psx_taken_BFC407F4 = 0; - int psx_delay_BFC4080C = 0; - int psx_taken_BFC4080C = 0; - int psx_delay_BFC40814 = 0; - int psx_delay_BFC4081C = 0; - int psx_taken_BFC4081C = 0; - int psx_delay_BFC40824 = 0; - int psx_delay_BFC4082C = 0; - int psx_taken_BFC4082C = 0; - int psx_delay_BFC4083C = 0; - int psx_taken_BFC4083C = 0; - int psx_delay_BFC4084C = 0; - int psx_taken_BFC4084C = 0; - int psx_delay_BFC40854 = 0; - int psx_delay_BFC4085C = 0; - int psx_taken_BFC4085C = 0; - int psx_delay_BFC40864 = 0; - int psx_delay_BFC4086C = 0; - int psx_taken_BFC4086C = 0; - int psx_delay_BFC40874 = 0; - int psx_delay_BFC4087C = 0; - int psx_taken_BFC4087C = 0; - int psx_delay_BFC40884 = 0; - int psx_delay_BFC4088C = 0; - int psx_taken_BFC4088C = 0; - int psx_delay_BFC40894 = 0; - int psx_delay_BFC4089C = 0; - int psx_taken_BFC4089C = 0; - int psx_delay_BFC408A4 = 0; - int psx_delay_BFC408AC = 0; - int psx_taken_BFC408AC = 0; - int psx_delay_BFC408B4 = 0; - int psx_delay_BFC408BC = 0; - int psx_taken_BFC408BC = 0; - int psx_delay_BFC408C4 = 0; - int psx_delay_BFC408CC = 0; - int psx_taken_BFC408CC = 0; - int psx_delay_BFC408D4 = 0; - int psx_delay_BFC408DC = 0; - int psx_taken_BFC408DC = 0; - int psx_delay_BFC408E4 = 0; - int psx_delay_BFC408EC = 0; - int psx_taken_BFC408EC = 0; - int psx_delay_BFC408FC = 0; - int psx_delay_BFC40904 = 0; - int psx_taken_BFC40904 = 0; - int psx_delay_BFC40910 = 0; - int psx_taken_BFC40910 = 0; - int psx_delay_BFC40918 = 0; - int psx_taken_BFC40918 = 0; - int psx_delay_BFC40920 = 0; - int psx_taken_BFC40920 = 0; - int psx_delay_BFC40928 = 0; - int psx_taken_BFC40928 = 0; - int psx_delay_BFC40930 = 0; - int psx_taken_BFC40930 = 0; - int psx_delay_BFC40938 = 0; - int psx_taken_BFC40938 = 0; - int psx_delay_BFC40940 = 0; - int psx_taken_BFC40940 = 0; - int psx_delay_BFC40948 = 0; - int psx_taken_BFC40948 = 0; - int psx_delay_BFC40950 = 0; - int psx_taken_BFC40950 = 0; - int psx_delay_BFC40958 = 0; - int psx_taken_BFC40958 = 0; - int psx_delay_BFC40960 = 0; - int psx_taken_BFC40960 = 0; - int psx_delay_BFC40968 = 0; - int psx_taken_BFC40968 = 0; - int psx_delay_BFC40974 = 0; - int psx_taken_BFC40974 = 0; - int psx_delay_BFC4097C = 0; - int psx_taken_BFC4097C = 0; - int psx_delay_BFC40988 = 0; - int psx_taken_BFC40988 = 0; - int psx_delay_BFC40990 = 0; - int psx_taken_BFC40990 = 0; - int psx_delay_BFC4099C = 0; - int psx_taken_BFC4099C = 0; - int psx_delay_BFC409A4 = 0; - int psx_taken_BFC409A4 = 0; - int psx_delay_BFC409AC = 0; - int psx_taken_BFC409AC = 0; - int psx_delay_BFC409B4 = 0; - int psx_taken_BFC409B4 = 0; - int psx_delay_BFC409C0 = 0; - int psx_taken_BFC409C0 = 0; - int psx_delay_BFC409C8 = 0; - int psx_taken_BFC409C8 = 0; - int psx_delay_BFC409D4 = 0; - int psx_taken_BFC409D4 = 0; - int psx_delay_BFC409DC = 0; - int psx_taken_BFC409DC = 0; - int psx_delay_BFC409E4 = 0; - int psx_taken_BFC409E4 = 0; - int psx_delay_BFC409EC = 0; - int psx_taken_BFC409EC = 0; - int psx_delay_BFC409F4 = 0; - int psx_taken_BFC409F4 = 0; - int psx_delay_BFC409FC = 0; - int psx_taken_BFC409FC = 0; - int psx_delay_BFC40A08 = 0; - int psx_taken_BFC40A08 = 0; - int psx_delay_BFC40A10 = 0; - int psx_taken_BFC40A10 = 0; - int psx_delay_BFC40A1C = 0; - int psx_taken_BFC40A1C = 0; - int psx_delay_BFC40A24 = 0; - int psx_taken_BFC40A24 = 0; - int psx_delay_BFC40A2C = 0; - int psx_taken_BFC40A2C = 0; - int psx_delay_BFC40A34 = 0; - int psx_taken_BFC40A34 = 0; - int psx_delay_BFC40A40 = 0; - int psx_taken_BFC40A40 = 0; - int psx_delay_BFC40A48 = 0; - int psx_taken_BFC40A48 = 0; - int psx_delay_BFC40A54 = 0; - int psx_taken_BFC40A54 = 0; - int psx_delay_BFC40A5C = 0; - int psx_taken_BFC40A5C = 0; - int psx_delay_BFC40A64 = 0; - int psx_taken_BFC40A64 = 0; - int psx_delay_BFC40A6C = 0; - int psx_taken_BFC40A6C = 0; - int psx_delay_BFC40A74 = 0; - int psx_taken_BFC40A74 = 0; - int psx_delay_BFC40A7C = 0; - int psx_taken_BFC40A7C = 0; - int psx_delay_BFC40A84 = 0; - int psx_taken_BFC40A84 = 0; - int psx_delay_BFC40A8C = 0; - int psx_taken_BFC40A8C = 0; - int psx_delay_BFC40A98 = 0; - int psx_taken_BFC40A98 = 0; - int psx_delay_BFC40AA0 = 0; - int psx_taken_BFC40AA0 = 0; - int psx_delay_BFC40AAC = 0; - int psx_taken_BFC40AAC = 0; - int psx_delay_BFC40AB4 = 0; - int psx_taken_BFC40AB4 = 0; - int psx_delay_BFC40ABC = 0; - int psx_taken_BFC40ABC = 0; - int psx_delay_BFC40AC4 = 0; - int psx_taken_BFC40AC4 = 0; - int psx_delay_BFC40AD0 = 0; - int psx_taken_BFC40AD0 = 0; - int psx_delay_BFC40AD8 = 0; - int psx_taken_BFC40AD8 = 0; - int psx_delay_BFC40AE4 = 0; - int psx_taken_BFC40AE4 = 0; - int psx_delay_BFC40AEC = 0; - int psx_taken_BFC40AEC = 0; - int psx_delay_BFC40AF4 = 0; - int psx_taken_BFC40AF4 = 0; - int psx_delay_BFC40AFC = 0; - int psx_taken_BFC40AFC = 0; - int psx_delay_BFC40B04 = 0; - int psx_taken_BFC40B04 = 0; - int psx_delay_BFC40B0C = 0; - int psx_taken_BFC40B0C = 0; - int psx_delay_BFC40B18 = 0; - int psx_taken_BFC40B18 = 0; - int psx_delay_BFC40B20 = 0; - int psx_taken_BFC40B20 = 0; - int psx_delay_BFC40B2C = 0; - int psx_taken_BFC40B2C = 0; - int psx_delay_BFC40B34 = 0; - int psx_taken_BFC40B34 = 0; - int psx_delay_BFC40B3C = 0; - int psx_taken_BFC40B3C = 0; - int psx_delay_BFC40B44 = 0; - int psx_taken_BFC40B44 = 0; - int psx_delay_BFC40B50 = 0; - int psx_taken_BFC40B50 = 0; - int psx_delay_BFC40B60 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC407D0u: goto label_BFC407D0; - case 0xBFC407D8u: goto label_BFC407D8; - case 0xBFC407E0u: goto label_BFC407E0; - case 0xBFC407ECu: goto label_BFC407EC; - case 0xBFC407F4u: goto label_BFC407F4; - case 0xBFC407FCu: goto label_BFC407FC; - case 0xBFC40814u: goto label_BFC40814; - case 0xBFC4081Cu: goto label_BFC4081C; - case 0xBFC40824u: goto label_BFC40824; - case 0xBFC4082Cu: goto label_BFC4082C; - case 0xBFC40834u: goto label_BFC40834; - case 0xBFC40838u: goto label_BFC40838; - case 0xBFC40844u: goto label_BFC40844; - case 0xBFC40848u: goto label_BFC40848; - case 0xBFC40854u: goto label_BFC40854; - case 0xBFC4085Cu: goto label_BFC4085C; - case 0xBFC40864u: goto label_BFC40864; - case 0xBFC4086Cu: goto label_BFC4086C; - case 0xBFC40874u: goto label_BFC40874; - case 0xBFC4087Cu: goto label_BFC4087C; - case 0xBFC40884u: goto label_BFC40884; - case 0xBFC4088Cu: goto label_BFC4088C; - case 0xBFC40894u: goto label_BFC40894; - case 0xBFC4089Cu: goto label_BFC4089C; - case 0xBFC408A4u: goto label_BFC408A4; - case 0xBFC408ACu: goto label_BFC408AC; - case 0xBFC408B4u: goto label_BFC408B4; - case 0xBFC408BCu: goto label_BFC408BC; - case 0xBFC408C4u: goto label_BFC408C4; - case 0xBFC408CCu: goto label_BFC408CC; - case 0xBFC408D4u: goto label_BFC408D4; - case 0xBFC408DCu: goto label_BFC408DC; - case 0xBFC408E4u: goto label_BFC408E4; - case 0xBFC408ECu: goto label_BFC408EC; - case 0xBFC408F4u: goto label_BFC408F4; - case 0xBFC408F8u: goto label_BFC408F8; - case 0xBFC40904u: goto label_BFC40904; - case 0xBFC4090Cu: goto label_BFC4090C; - case 0xBFC40918u: goto label_BFC40918; - case 0xBFC40920u: goto label_BFC40920; - case 0xBFC40928u: goto label_BFC40928; - case 0xBFC40930u: goto label_BFC40930; - case 0xBFC40938u: goto label_BFC40938; - case 0xBFC40940u: goto label_BFC40940; - case 0xBFC40948u: goto label_BFC40948; - case 0xBFC40950u: goto label_BFC40950; - case 0xBFC40958u: goto label_BFC40958; - case 0xBFC40960u: goto label_BFC40960; - case 0xBFC40968u: goto label_BFC40968; - case 0xBFC40970u: goto label_BFC40970; - case 0xBFC4097Cu: goto label_BFC4097C; - case 0xBFC40984u: goto label_BFC40984; - case 0xBFC40990u: goto label_BFC40990; - case 0xBFC40998u: goto label_BFC40998; - case 0xBFC409A4u: goto label_BFC409A4; - case 0xBFC409ACu: goto label_BFC409AC; - case 0xBFC409B4u: goto label_BFC409B4; - case 0xBFC409BCu: goto label_BFC409BC; - case 0xBFC409C8u: goto label_BFC409C8; - case 0xBFC409D0u: goto label_BFC409D0; - case 0xBFC409DCu: goto label_BFC409DC; - case 0xBFC409E4u: goto label_BFC409E4; - case 0xBFC409ECu: goto label_BFC409EC; - case 0xBFC409F4u: goto label_BFC409F4; - case 0xBFC409FCu: goto label_BFC409FC; - case 0xBFC40A04u: goto label_BFC40A04; - case 0xBFC40A10u: goto label_BFC40A10; - case 0xBFC40A18u: goto label_BFC40A18; - case 0xBFC40A24u: goto label_BFC40A24; - case 0xBFC40A2Cu: goto label_BFC40A2C; - case 0xBFC40A34u: goto label_BFC40A34; - case 0xBFC40A3Cu: goto label_BFC40A3C; - case 0xBFC40A48u: goto label_BFC40A48; - case 0xBFC40A50u: goto label_BFC40A50; - case 0xBFC40A5Cu: goto label_BFC40A5C; - case 0xBFC40A64u: goto label_BFC40A64; - case 0xBFC40A6Cu: goto label_BFC40A6C; - case 0xBFC40A74u: goto label_BFC40A74; - case 0xBFC40A7Cu: goto label_BFC40A7C; - case 0xBFC40A84u: goto label_BFC40A84; - case 0xBFC40A8Cu: goto label_BFC40A8C; - case 0xBFC40A94u: goto label_BFC40A94; - case 0xBFC40AA0u: goto label_BFC40AA0; - case 0xBFC40AA8u: goto label_BFC40AA8; - case 0xBFC40AB4u: goto label_BFC40AB4; - case 0xBFC40ABCu: goto label_BFC40ABC; - case 0xBFC40AC4u: goto label_BFC40AC4; - case 0xBFC40ACCu: goto label_BFC40ACC; - case 0xBFC40AD8u: goto label_BFC40AD8; - case 0xBFC40AE0u: goto label_BFC40AE0; - case 0xBFC40AECu: goto label_BFC40AEC; - case 0xBFC40AF4u: goto label_BFC40AF4; - case 0xBFC40AFCu: goto label_BFC40AFC; - case 0xBFC40B04u: goto label_BFC40B04; - case 0xBFC40B0Cu: goto label_BFC40B0C; - case 0xBFC40B14u: goto label_BFC40B14; - case 0xBFC40B20u: goto label_BFC40B20; - case 0xBFC40B28u: goto label_BFC40B28; - case 0xBFC40B34u: goto label_BFC40B34; - case 0xBFC40B3Cu: goto label_BFC40B3C; - case 0xBFC40B44u: goto label_BFC40B44; - case 0xBFC40B4Cu: goto label_BFC40B4C; - case 0xBFC40B58u: goto label_BFC40B58; - case 0xBFC40B5Cu: goto label_BFC40B5C; - default: break; - } - } -label_BFC407B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC407B8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800587B8u); -#endif - /* 0xBFC407BC: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800587BCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800587BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC407C0: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800587C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC407C4: 24010010 addiu $at, $zero, 16 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); - PGXP_ALU(0x24010010u, cpu->gpr[1], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x800587C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC407C8: 14410005 bne $v0, $at, 0xBFC407E0 */ - uint32_t psx_brA_BFC407C8 = cpu->gpr[2]; uint32_t psx_brB_BFC407C8 = cpu->gpr[1]; - psx_taken_BFC407C8 = (psx_brA_BFC407C8 != psx_brB_BFC407C8); - psx_delay_BFC407C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC407CC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800587CCu); return; } g_debug_last_store_pc = 0x800587CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800587CCu); -#endif - if (psx_delay_BFC407C8) { - psx_delay_BFC407C8 = 0; - if (psx_taken_BFC407C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587E0u); - goto label_BFC407E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587D0u); - } -label_BFC407D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC407D0: 0C016496 jal 0xB0059258 */ - cpu->gpr[31] = 0x800587D8u; /* jal link before delay slot */ - psx_delay_BFC407D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800587D4u); -#endif - if (psx_delay_BFC407D0) { - psx_delay_BFC407D0 = 0; - cpu->gpr[31] = 0x800587D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059258u); - cpu->pc = 0x80059258u; return; - } -label_BFC407D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407D8: 100000E0 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC407D8 = cpu->gpr[0]; uint32_t psx_brB_BFC407D8 = cpu->gpr[0]; - psx_taken_BFC407D8 = (psx_brA_BFC407D8 == psx_brB_BFC407D8); - psx_delay_BFC407D8 = 1; - /* 0xBFC407DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800587DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800587DCu); -#endif - if (psx_delay_BFC407D8) { - psx_delay_BFC407D8 = 0; - if (psx_taken_BFC407D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587E0u); - } -label_BFC407E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC407E0: 24010011 addiu $at, $zero, 17 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); - PGXP_ALU(0x24010011u, cpu->gpr[1], _pgx1, 0x00000011u); } -#ifdef PSX_COSIM - cosim_instr(0x800587E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC407E4: 14410005 bne $v0, $at, 0xBFC407FC */ - uint32_t psx_brA_BFC407E4 = cpu->gpr[2]; uint32_t psx_brB_BFC407E4 = cpu->gpr[1]; - psx_taken_BFC407E4 = (psx_brA_BFC407E4 != psx_brB_BFC407E4); - psx_delay_BFC407E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800587E8u); -#endif - if (psx_delay_BFC407E4) { - psx_delay_BFC407E4 = 0; - if (psx_taken_BFC407E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587FCu); - goto label_BFC407FC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587ECu); - } -label_BFC407EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC407EC: 0C0164C3 jal 0xB005930C */ - cpu->gpr[31] = 0x800587F4u; /* jal link before delay slot */ - psx_delay_BFC407EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800587F0u); -#endif - if (psx_delay_BFC407EC) { - psx_delay_BFC407EC = 0; - cpu->gpr[31] = 0x800587F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005930Cu); - cpu->pc = 0x8005930Cu; return; - } -label_BFC407F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC407F4: 100000D9 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC407F4 = cpu->gpr[0]; uint32_t psx_brB_BFC407F4 = cpu->gpr[0]; - psx_taken_BFC407F4 = (psx_brA_BFC407F4 == psx_brB_BFC407F4); - psx_delay_BFC407F4 = 1; - /* 0xBFC407F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800587F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800587F8u); -#endif - if (psx_delay_BFC407F4) { - psx_delay_BFC407F4 = 0; - if (psx_taken_BFC407F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800587FCu); - } -label_BFC407FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC407FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC407FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800587FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC407FC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800587FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058800u); -#endif - /* 0xBFC40800: 8DCE9C2C lw $t6, -25556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058800u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40804: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058804u); -#endif - /* 0xBFC40808: 91C40000 lbu $a0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 4, 0x4000u); - PGXP_LOAD(0x91C40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4080C: 1000003F beq $zero, $zero, 0xBFC4090C */ - uint32_t psx_brA_BFC4080C = cpu->gpr[0]; uint32_t psx_brB_BFC4080C = cpu->gpr[0]; - psx_taken_BFC4080C = (psx_brA_BFC4080C == psx_brB_BFC4080C); - psx_delay_BFC4080C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC40810: A024EEC0 sb $a0, -4416($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4416; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058810u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4416)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA024EEC0u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80058810u); -#endif - if (psx_delay_BFC4080C) { - psx_delay_BFC4080C = 0; - if (psx_taken_BFC4080C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005890Cu); - goto label_BFC4090C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058814u); - } -label_BFC40814: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40814u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40814: 0C016480 jal 0xB0059200 */ - cpu->gpr[31] = 0x8005881Cu; /* jal link before delay slot */ - psx_delay_BFC40814 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40818: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058818u); -#endif - if (psx_delay_BFC40814) { - psx_delay_BFC40814 = 0; - cpu->gpr[31] = 0x8005881Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059200u); - cpu->pc = 0x80059200u; return; - } -label_BFC4081C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4081Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4081Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005881Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4081C: 100000CF beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4081C = cpu->gpr[0]; uint32_t psx_brB_BFC4081C = cpu->gpr[0]; - psx_taken_BFC4081C = (psx_brA_BFC4081C == psx_brB_BFC4081C); - psx_delay_BFC4081C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058820u); -#endif - /* 0xBFC40820: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058820u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058820u); -#endif - if (psx_delay_BFC4081C) { - psx_delay_BFC4081C = 0; - if (psx_taken_BFC4081C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058824u); - } -label_BFC40824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40824: 0C016480 jal 0xB0059200 */ - cpu->gpr[31] = 0x8005882Cu; /* jal link before delay slot */ - psx_delay_BFC40824 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40828: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058828u); -#endif - if (psx_delay_BFC40824) { - psx_delay_BFC40824 = 0; - cpu->gpr[31] = 0x8005882Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059200u); - cpu->pc = 0x80059200u; return; - } -label_BFC4082C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4082Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4082Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005882Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4082C: 100000CB beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4082C = cpu->gpr[0]; uint32_t psx_brB_BFC4082C = cpu->gpr[0]; - psx_taken_BFC4082C = (psx_brA_BFC4082C == psx_brB_BFC4082C); - psx_delay_BFC4082C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058830u); -#endif - /* 0xBFC40830: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058830u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058830u); -#endif - if (psx_delay_BFC4082C) { - psx_delay_BFC4082C = 0; - if (psx_taken_BFC4082C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058834u); - } -label_BFC40834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC40834: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058834u); -#endif -label_BFC40838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40838: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4083C: 100000C6 beq $zero, $zero, 0xBFC40B58 */ - uint32_t psx_brA_BFC4083C = cpu->gpr[0]; uint32_t psx_brB_BFC4083C = cpu->gpr[0]; - psx_taken_BFC4083C = (psx_brA_BFC4083C == psx_brB_BFC4083C); - psx_delay_BFC4083C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC40840: AC2FEE5C sw $t7, -4516($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058840u); return; } g_debug_last_store_pc = 0x80058840u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE5Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058840u); -#endif - if (psx_delay_BFC4083C) { - psx_delay_BFC4083C = 0; - if (psx_taken_BFC4083C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058844u); - } -label_BFC40844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40844: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058844u); -#endif -label_BFC40848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40848: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4084C: 100000C2 beq $zero, $zero, 0xBFC40B58 */ - uint32_t psx_brA_BFC4084C = cpu->gpr[0]; uint32_t psx_brB_BFC4084C = cpu->gpr[0]; - psx_taken_BFC4084C = (psx_brA_BFC4084C == psx_brB_BFC4084C); - psx_delay_BFC4084C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC40850: AC38EE5C sw $t8, -4516($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058850u); return; } g_debug_last_store_pc = 0x80058850u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE5Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058850u); -#endif - if (psx_delay_BFC4084C) { - psx_delay_BFC4084C = 0; - if (psx_taken_BFC4084C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058854u); - } -label_BFC40854: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40854u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40854: 0C0164EC jal 0xB00593B0 */ - cpu->gpr[31] = 0x8005885Cu; /* jal link before delay slot */ - psx_delay_BFC40854 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058858u); -#endif - if (psx_delay_BFC40854) { - psx_delay_BFC40854 = 0; - cpu->gpr[31] = 0x8005885Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800593B0u); - cpu->pc = 0x800593B0u; return; - } -label_BFC4085C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4085Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4085Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005885Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4085C: 100000BF beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4085C = cpu->gpr[0]; uint32_t psx_brB_BFC4085C = cpu->gpr[0]; - psx_taken_BFC4085C = (psx_brA_BFC4085C == psx_brB_BFC4085C); - psx_delay_BFC4085C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058860u); -#endif - /* 0xBFC40860: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058860u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058860u); -#endif - if (psx_delay_BFC4085C) { - psx_delay_BFC4085C = 0; - if (psx_taken_BFC4085C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058864u); - } -label_BFC40864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40864: 0C0164FD jal 0xB00593F4 */ - cpu->gpr[31] = 0x8005886Cu; /* jal link before delay slot */ - psx_delay_BFC40864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40868: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058868u); -#endif - if (psx_delay_BFC40864) { - psx_delay_BFC40864 = 0; - cpu->gpr[31] = 0x8005886Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800593F4u); - cpu->pc = 0x800593F4u; return; - } -label_BFC4086C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4086Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4086Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005886Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4086C: 100000BB beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4086C = cpu->gpr[0]; uint32_t psx_brB_BFC4086C = cpu->gpr[0]; - psx_taken_BFC4086C = (psx_brA_BFC4086C == psx_brB_BFC4086C); - psx_delay_BFC4086C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058870u); -#endif - /* 0xBFC40870: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058870u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058870u); -#endif - if (psx_delay_BFC4086C) { - psx_delay_BFC4086C = 0; - if (psx_taken_BFC4086C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058874u); - } -label_BFC40874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40874: 0C016516 jal 0xB0059458 */ - cpu->gpr[31] = 0x8005887Cu; /* jal link before delay slot */ - psx_delay_BFC40874 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40878: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058878u); -#endif - if (psx_delay_BFC40874) { - psx_delay_BFC40874 = 0; - cpu->gpr[31] = 0x8005887Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059458u); - cpu->pc = 0x80059458u; return; - } -label_BFC4087C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4087Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4087Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005887Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4087C: 100000B7 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4087C = cpu->gpr[0]; uint32_t psx_brB_BFC4087C = cpu->gpr[0]; - psx_taken_BFC4087C = (psx_brA_BFC4087C == psx_brB_BFC4087C); - psx_delay_BFC4087C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058880u); -#endif - /* 0xBFC40880: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058880u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058880u); -#endif - if (psx_delay_BFC4087C) { - psx_delay_BFC4087C = 0; - if (psx_taken_BFC4087C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058884u); - } -label_BFC40884: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40884u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40884: 0C016601 jal 0xB0059804 */ - cpu->gpr[31] = 0x8005888Cu; /* jal link before delay slot */ - psx_delay_BFC40884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40888: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058888u); -#endif - if (psx_delay_BFC40884) { - psx_delay_BFC40884 = 0; - cpu->gpr[31] = 0x8005888Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059804u); - cpu->pc = 0x80059804u; return; - } -label_BFC4088C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4088Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4088Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005888Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4088C: 100000B3 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4088C = cpu->gpr[0]; uint32_t psx_brB_BFC4088C = cpu->gpr[0]; - psx_taken_BFC4088C = (psx_brA_BFC4088C == psx_brB_BFC4088C); - psx_delay_BFC4088C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058890u); -#endif - /* 0xBFC40890: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058890u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058890u); -#endif - if (psx_delay_BFC4088C) { - psx_delay_BFC4088C = 0; - if (psx_taken_BFC4088C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058894u); - } -label_BFC40894: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40894u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40894: 0C0165E2 jal 0xB0059788 */ - cpu->gpr[31] = 0x8005889Cu; /* jal link before delay slot */ - psx_delay_BFC40894 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40898: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058898u); -#endif - if (psx_delay_BFC40894) { - psx_delay_BFC40894 = 0; - cpu->gpr[31] = 0x8005889Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059788u); - cpu->pc = 0x80059788u; return; - } -label_BFC4089C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4089Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4089Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005889Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4089C: 100000AF beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4089C = cpu->gpr[0]; uint32_t psx_brB_BFC4089C = cpu->gpr[0]; - psx_taken_BFC4089C = (psx_brA_BFC4089C == psx_brB_BFC4089C); - psx_delay_BFC4089C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588A0u); -#endif - /* 0xBFC408A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588A0u); -#endif - if (psx_delay_BFC4089C) { - psx_delay_BFC4089C = 0; - if (psx_taken_BFC4089C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588A4u); - } -label_BFC408A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408A4: 0C016631 jal 0xB00598C4 */ - cpu->gpr[31] = 0x800588ACu; /* jal link before delay slot */ - psx_delay_BFC408A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408A8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800588A8u); -#endif - if (psx_delay_BFC408A4) { - psx_delay_BFC408A4 = 0; - cpu->gpr[31] = 0x800588ACu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800598C4u); - cpu->pc = 0x800598C4u; return; - } -label_BFC408AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408AC: 100000AB beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC408AC = cpu->gpr[0]; uint32_t psx_brB_BFC408AC = cpu->gpr[0]; - psx_taken_BFC408AC = (psx_brA_BFC408AC == psx_brB_BFC408AC); - psx_delay_BFC408AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588B0u); -#endif - /* 0xBFC408B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588B0u); -#endif - if (psx_delay_BFC408AC) { - psx_delay_BFC408AC = 0; - if (psx_taken_BFC408AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588B4u); - } -label_BFC408B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408B4: 0C016691 jal 0xB0059A44 */ - cpu->gpr[31] = 0x800588BCu; /* jal link before delay slot */ - psx_delay_BFC408B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800588B8u); -#endif - if (psx_delay_BFC408B4) { - psx_delay_BFC408B4 = 0; - cpu->gpr[31] = 0x800588BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059A44u); - cpu->pc = 0x80059A44u; return; - } -label_BFC408BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408BC: 100000A7 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC408BC = cpu->gpr[0]; uint32_t psx_brB_BFC408BC = cpu->gpr[0]; - psx_taken_BFC408BC = (psx_brA_BFC408BC == psx_brB_BFC408BC); - psx_delay_BFC408BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588C0u); -#endif - /* 0xBFC408C0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588C0u); -#endif - if (psx_delay_BFC408BC) { - psx_delay_BFC408BC = 0; - if (psx_taken_BFC408BC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588C4u); - } -label_BFC408C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408C4: 0C0165F3 jal 0xB00597CC */ - cpu->gpr[31] = 0x800588CCu; /* jal link before delay slot */ - psx_delay_BFC408C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800588C8u); -#endif - if (psx_delay_BFC408C4) { - psx_delay_BFC408C4 = 0; - cpu->gpr[31] = 0x800588CCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800597CCu); - cpu->pc = 0x800597CCu; return; - } -label_BFC408CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408CC: 100000A3 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC408CC = cpu->gpr[0]; uint32_t psx_brB_BFC408CC = cpu->gpr[0]; - psx_taken_BFC408CC = (psx_brA_BFC408CC == psx_brB_BFC408CC); - psx_delay_BFC408CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588D0u); -#endif - /* 0xBFC408D0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588D0u); -#endif - if (psx_delay_BFC408CC) { - psx_delay_BFC408CC = 0; - if (psx_taken_BFC408CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588D4u); - } -label_BFC408D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408D4: 0C01664B jal 0xB005992C */ - cpu->gpr[31] = 0x800588DCu; /* jal link before delay slot */ - psx_delay_BFC408D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408D8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800588D8u); -#endif - if (psx_delay_BFC408D4) { - psx_delay_BFC408D4 = 0; - cpu->gpr[31] = 0x800588DCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005992Cu); - cpu->pc = 0x8005992Cu; return; - } -label_BFC408DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408DC: 1000009F beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC408DC = cpu->gpr[0]; uint32_t psx_brB_BFC408DC = cpu->gpr[0]; - psx_taken_BFC408DC = (psx_brA_BFC408DC == psx_brB_BFC408DC); - psx_delay_BFC408DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588E0u); -#endif - /* 0xBFC408E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588E0u); -#endif - if (psx_delay_BFC408DC) { - psx_delay_BFC408DC = 0; - if (psx_taken_BFC408DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588E4u); - } -label_BFC408E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408E4: 0C0165C2 jal 0xB0059708 */ - cpu->gpr[31] = 0x800588ECu; /* jal link before delay slot */ - psx_delay_BFC408E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800588E8u); -#endif - if (psx_delay_BFC408E4) { - psx_delay_BFC408E4 = 0; - cpu->gpr[31] = 0x800588ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059708u); - cpu->pc = 0x80059708u; return; - } -label_BFC408EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC408EC: 1000009B beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC408EC = cpu->gpr[0]; uint32_t psx_brB_BFC408EC = cpu->gpr[0]; - psx_taken_BFC408EC = (psx_brA_BFC408EC == psx_brB_BFC408EC); - psx_delay_BFC408EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588F0u); -#endif - /* 0xBFC408F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800588F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800588F0u); -#endif - if (psx_delay_BFC408EC) { - psx_delay_BFC408EC = 0; - if (psx_taken_BFC408EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588F4u); - } -label_BFC408F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC408F4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800588F4u); -#endif -label_BFC408F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC408F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC408F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800588F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC408F8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800588F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC408FC: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058904u; /* jal link before delay slot */ - psx_delay_BFC408FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40900: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80058900u); -#endif - if (psx_delay_BFC408FC) { - psx_delay_BFC408FC = 0; - cpu->gpr[31] = 0x80058904u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40904: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40904u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40904: 10000095 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40904 = cpu->gpr[0]; uint32_t psx_brB_BFC40904 = cpu->gpr[0]; - psx_taken_BFC40904 = (psx_brA_BFC40904 == psx_brB_BFC40904); - psx_delay_BFC40904 = 1; - /* 0xBFC40908: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058908u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058908u); -#endif - if (psx_delay_BFC40904) { - psx_delay_BFC40904 = 0; - if (psx_taken_BFC40904) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005890Cu); - } -label_BFC4090C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4090Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4090Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005890Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4090C: 24010019 addiu $at, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24010019u, cpu->gpr[1], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8005890Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40910: 1041FFF4 beq $v0, $at, 0xBFC408E4 */ - uint32_t psx_brA_BFC40910 = cpu->gpr[2]; uint32_t psx_brB_BFC40910 = cpu->gpr[1]; - psx_taken_BFC40910 = (psx_brA_BFC40910 == psx_brB_BFC40910); - psx_delay_BFC40910 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40914: 2841001A slti $at, $v0, 26 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (26) ? 1 : 0); - PGXP_ALU(0x2841001Au, cpu->gpr[1], _pgx1, 0x001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80058914u); -#endif - if (psx_delay_BFC40910) { - psx_delay_BFC40910 = 0; - if (psx_taken_BFC40910) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588E4u); - goto label_BFC408E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058918u); - } -label_BFC40918: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40918u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058918u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40918: 1020004D beq $at, $zero, 0xBFC40A50 */ - uint32_t psx_brA_BFC40918 = cpu->gpr[1]; uint32_t psx_brB_BFC40918 = cpu->gpr[0]; - psx_taken_BFC40918 = (psx_brA_BFC40918 == psx_brB_BFC40918); - psx_delay_BFC40918 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4091C: 2401000E addiu $at, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2401000Eu, cpu->gpr[1], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8005891Cu); -#endif - if (psx_delay_BFC40918) { - psx_delay_BFC40918 = 0; - if (psx_taken_BFC40918) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A50u); - goto label_BFC40A50; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058920u); - } -label_BFC40920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40920: 1041FFE8 beq $v0, $at, 0xBFC408C4 */ - uint32_t psx_brA_BFC40920 = cpu->gpr[2]; uint32_t psx_brB_BFC40920 = cpu->gpr[1]; - psx_taken_BFC40920 = (psx_brA_BFC40920 == psx_brB_BFC40920); - psx_delay_BFC40920 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40924: 2841000F slti $at, $v0, 15 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0); - PGXP_ALU(0x2841000Fu, cpu->gpr[1], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80058924u); -#endif - if (psx_delay_BFC40920) { - psx_delay_BFC40920 = 0; - if (psx_taken_BFC40920) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588C4u); - goto label_BFC408C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058928u); - } -label_BFC40928: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40928u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058928u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40928: 10200029 beq $at, $zero, 0xBFC409D0 */ - uint32_t psx_brA_BFC40928 = cpu->gpr[1]; uint32_t psx_brB_BFC40928 = cpu->gpr[0]; - psx_taken_BFC40928 = (psx_brA_BFC40928 == psx_brB_BFC40928); - psx_delay_BFC40928 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4092C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005892Cu); -#endif - if (psx_delay_BFC40928) { - psx_delay_BFC40928 = 0; - if (psx_taken_BFC40928) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589D0u); - goto label_BFC409D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058930u); - } -label_BFC40930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40930: 10410089 beq $v0, $at, 0xBFC40B58 */ - uint32_t psx_brA_BFC40930 = cpu->gpr[2]; uint32_t psx_brB_BFC40930 = cpu->gpr[1]; - psx_taken_BFC40930 = (psx_brA_BFC40930 == psx_brB_BFC40930); - psx_delay_BFC40930 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40934: 28410009 slti $at, $v0, 9 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (9) ? 1 : 0); - PGXP_ALU(0x28410009u, cpu->gpr[1], _pgx1, 0x0009u); } -#ifdef PSX_COSIM - cosim_instr(0x80058934u); -#endif - if (psx_delay_BFC40930) { - psx_delay_BFC40930 = 0; - if (psx_taken_BFC40930) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058938u); - } -label_BFC40938: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40938u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058938u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40938: 10200017 beq $at, $zero, 0xBFC40998 */ - uint32_t psx_brA_BFC40938 = cpu->gpr[1]; uint32_t psx_brB_BFC40938 = cpu->gpr[0]; - psx_taken_BFC40938 = (psx_brA_BFC40938 == psx_brB_BFC40938); - psx_delay_BFC40938 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4093C: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x8005893Cu); -#endif - if (psx_delay_BFC40938) { - psx_delay_BFC40938 = 0; - if (psx_taken_BFC40938) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058998u); - goto label_BFC40998; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058940u); - } -label_BFC40940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40940: 1041FFC0 beq $v0, $at, 0xBFC40844 */ - uint32_t psx_brA_BFC40940 = cpu->gpr[2]; uint32_t psx_brB_BFC40940 = cpu->gpr[1]; - psx_taken_BFC40940 = (psx_brA_BFC40940 == psx_brB_BFC40940); - psx_delay_BFC40940 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40944: 28410006 slti $at, $v0, 6 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (6) ? 1 : 0); - PGXP_ALU(0x28410006u, cpu->gpr[1], _pgx1, 0x0006u); } -#ifdef PSX_COSIM - cosim_instr(0x80058944u); -#endif - if (psx_delay_BFC40940) { - psx_delay_BFC40940 = 0; - if (psx_taken_BFC40940) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058844u); - goto label_BFC40844; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058948u); - } -label_BFC40948: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40948u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40948: 1020000E beq $at, $zero, 0xBFC40984 */ - uint32_t psx_brA_BFC40948 = cpu->gpr[1]; uint32_t psx_brB_BFC40948 = cpu->gpr[0]; - psx_taken_BFC40948 = (psx_brA_BFC40948 == psx_brB_BFC40948); - psx_delay_BFC40948 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4094C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005894Cu); -#endif - if (psx_delay_BFC40948) { - psx_delay_BFC40948 = 0; - if (psx_taken_BFC40948) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058984u); - goto label_BFC40984; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058950u); - } -label_BFC40950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40950: 1041FFBC beq $v0, $at, 0xBFC40844 */ - uint32_t psx_brA_BFC40950 = cpu->gpr[2]; uint32_t psx_brB_BFC40950 = cpu->gpr[1]; - psx_taken_BFC40950 = (psx_brA_BFC40950 == psx_brB_BFC40950); - psx_delay_BFC40950 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40954: 28410004 slti $at, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0); - PGXP_ALU(0x28410004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058954u); -#endif - if (psx_delay_BFC40950) { - psx_delay_BFC40950 = 0; - if (psx_taken_BFC40950) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058844u); - goto label_BFC40844; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058958u); - } -label_BFC40958: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40958u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40958: 10200005 beq $at, $zero, 0xBFC40970 */ - uint32_t psx_brA_BFC40958 = cpu->gpr[1]; uint32_t psx_brB_BFC40958 = cpu->gpr[0]; - psx_taken_BFC40958 = (psx_brA_BFC40958 == psx_brB_BFC40958); - psx_delay_BFC40958 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4095C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005895Cu); -#endif - if (psx_delay_BFC40958) { - psx_delay_BFC40958 = 0; - if (psx_taken_BFC40958) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058970u); - goto label_BFC40970; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058960u); - } -label_BFC40960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40960: 1041FFBC beq $v0, $at, 0xBFC40854 */ - uint32_t psx_brA_BFC40960 = cpu->gpr[2]; uint32_t psx_brB_BFC40960 = cpu->gpr[1]; - psx_taken_BFC40960 = (psx_brA_BFC40960 == psx_brB_BFC40960); - psx_delay_BFC40960 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40964: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058964u); -#endif - if (psx_delay_BFC40960) { - psx_delay_BFC40960 = 0; - if (psx_taken_BFC40960) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058854u); - goto label_BFC40854; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058968u); - } -label_BFC40968: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40968u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40968: 1000007C beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40968 = cpu->gpr[0]; uint32_t psx_brB_BFC40968 = cpu->gpr[0]; - psx_taken_BFC40968 = (psx_brA_BFC40968 == psx_brB_BFC40968); - psx_delay_BFC40968 = 1; - /* 0xBFC4096C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005896Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005896Cu); -#endif - if (psx_delay_BFC40968) { - psx_delay_BFC40968 = 0; - if (psx_taken_BFC40968) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058970u); - } -label_BFC40970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40970: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40974: 1041FFB4 beq $v0, $at, 0xBFC40848 */ - uint32_t psx_brA_BFC40974 = cpu->gpr[2]; uint32_t psx_brB_BFC40974 = cpu->gpr[1]; - psx_taken_BFC40974 = (psx_brA_BFC40974 == psx_brB_BFC40974); - psx_delay_BFC40974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40978: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058978u); -#endif - if (psx_delay_BFC40974) { - psx_delay_BFC40974 = 0; - if (psx_taken_BFC40974) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058848u); - goto label_BFC40848; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005897Cu); - } -label_BFC4097C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4097Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4097Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005897Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4097C: 10000077 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC4097C = cpu->gpr[0]; uint32_t psx_brB_BFC4097C = cpu->gpr[0]; - psx_taken_BFC4097C = (psx_brA_BFC4097C == psx_brB_BFC4097C); - psx_delay_BFC4097C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058980u); -#endif - /* 0xBFC40980: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058980u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058980u); -#endif - if (psx_delay_BFC4097C) { - psx_delay_BFC4097C = 0; - if (psx_taken_BFC4097C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058984u); - } -label_BFC40984: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40984u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40984: 24010007 addiu $at, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24010007u, cpu->gpr[1], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x80058984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40988: 10410074 beq $v0, $at, 0xBFC40B5C */ - uint32_t psx_brA_BFC40988 = cpu->gpr[2]; uint32_t psx_brB_BFC40988 = cpu->gpr[1]; - psx_taken_BFC40988 = (psx_brA_BFC40988 == psx_brB_BFC40988); - psx_delay_BFC40988 = 1; - /* 0xBFC4098C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005898Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005898Cu); -#endif - if (psx_delay_BFC40988) { - psx_delay_BFC40988 = 0; - if (psx_taken_BFC40988) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058990u); - } -label_BFC40990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40990: 10000072 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40990 = cpu->gpr[0]; uint32_t psx_brB_BFC40990 = cpu->gpr[0]; - psx_taken_BFC40990 = (psx_brA_BFC40990 == psx_brB_BFC40990); - psx_delay_BFC40990 = 1; - /* 0xBFC40994: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058994u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058994u); -#endif - if (psx_delay_BFC40990) { - psx_delay_BFC40990 = 0; - if (psx_taken_BFC40990) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058998u); - } -label_BFC40998: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40998u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40998: 2401000B addiu $at, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2401000Bu, cpu->gpr[1], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80058998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC4099C: 1041FFBD beq $v0, $at, 0xBFC40894 */ - uint32_t psx_brA_BFC4099C = cpu->gpr[2]; uint32_t psx_brB_BFC4099C = cpu->gpr[1]; - psx_taken_BFC4099C = (psx_brA_BFC4099C == psx_brB_BFC4099C); - psx_delay_BFC4099C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409A0: 2841000C slti $at, $v0, 12 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (12) ? 1 : 0); - PGXP_ALU(0x2841000Cu, cpu->gpr[1], _pgx1, 0x000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800589A0u); -#endif - if (psx_delay_BFC4099C) { - psx_delay_BFC4099C = 0; - if (psx_taken_BFC4099C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058894u); - goto label_BFC40894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589A4u); - } -label_BFC409A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409A4: 10200005 beq $at, $zero, 0xBFC409BC */ - uint32_t psx_brA_BFC409A4 = cpu->gpr[1]; uint32_t psx_brB_BFC409A4 = cpu->gpr[0]; - psx_taken_BFC409A4 = (psx_brA_BFC409A4 == psx_brB_BFC409A4); - psx_delay_BFC409A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409A8: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x800589A8u); -#endif - if (psx_delay_BFC409A4) { - psx_delay_BFC409A4 = 0; - if (psx_taken_BFC409A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589BCu); - goto label_BFC409BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589ACu); - } -label_BFC409AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409AC: 1041006B beq $v0, $at, 0xBFC40B5C */ - uint32_t psx_brA_BFC409AC = cpu->gpr[2]; uint32_t psx_brB_BFC409AC = cpu->gpr[1]; - psx_taken_BFC409AC = (psx_brA_BFC409AC == psx_brB_BFC409AC); - psx_delay_BFC409AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589B0u); -#endif - /* 0xBFC409B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800589B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800589B0u); -#endif - if (psx_delay_BFC409AC) { - psx_delay_BFC409AC = 0; - if (psx_taken_BFC409AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589B4u); - } -label_BFC409B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC409B4: 10000069 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC409B4 = cpu->gpr[0]; uint32_t psx_brB_BFC409B4 = cpu->gpr[0]; - psx_taken_BFC409B4 = (psx_brA_BFC409B4 == psx_brB_BFC409B4); - psx_delay_BFC409B4 = 1; - /* 0xBFC409B8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800589B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800589B8u); -#endif - if (psx_delay_BFC409B4) { - psx_delay_BFC409B4 = 0; - if (psx_taken_BFC409B4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589BCu); - } -label_BFC409BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409BC: 2401000C addiu $at, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2401000Cu, cpu->gpr[1], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800589BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409C0: 1041FFB4 beq $v0, $at, 0xBFC40894 */ - uint32_t psx_brA_BFC409C0 = cpu->gpr[2]; uint32_t psx_brB_BFC409C0 = cpu->gpr[1]; - psx_taken_BFC409C0 = (psx_brA_BFC409C0 == psx_brB_BFC409C0); - psx_delay_BFC409C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC409C4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800589C4u); -#endif - if (psx_delay_BFC409C0) { - psx_delay_BFC409C0 = 0; - if (psx_taken_BFC409C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058894u); - goto label_BFC40894; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589C8u); - } -label_BFC409C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC409C8: 10000064 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC409C8 = cpu->gpr[0]; uint32_t psx_brB_BFC409C8 = cpu->gpr[0]; - psx_taken_BFC409C8 = (psx_brA_BFC409C8 == psx_brB_BFC409C8); - psx_delay_BFC409C8 = 1; - /* 0xBFC409CC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800589CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800589CCu); -#endif - if (psx_delay_BFC409C8) { - psx_delay_BFC409C8 = 0; - if (psx_taken_BFC409C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589D0u); - } -label_BFC409D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409D0: 24010014 addiu $at, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24010014u, cpu->gpr[1], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x800589D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409D4: 1041FFB7 beq $v0, $at, 0xBFC408B4 */ - uint32_t psx_brA_BFC409D4 = cpu->gpr[2]; uint32_t psx_brB_BFC409D4 = cpu->gpr[1]; - psx_taken_BFC409D4 = (psx_brA_BFC409D4 == psx_brB_BFC409D4); - psx_delay_BFC409D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409D8: 28410015 slti $at, $v0, 21 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (21) ? 1 : 0); - PGXP_ALU(0x28410015u, cpu->gpr[1], _pgx1, 0x0015u); } -#ifdef PSX_COSIM - cosim_instr(0x800589D8u); -#endif - if (psx_delay_BFC409D4) { - psx_delay_BFC409D4 = 0; - if (psx_taken_BFC409D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588B4u); - goto label_BFC408B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589DCu); - } -label_BFC409DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409DC: 1020000E beq $at, $zero, 0xBFC40A18 */ - uint32_t psx_brA_BFC409DC = cpu->gpr[1]; uint32_t psx_brB_BFC409DC = cpu->gpr[0]; - psx_taken_BFC409DC = (psx_brA_BFC409DC == psx_brB_BFC409DC); - psx_delay_BFC409DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409E0: 24010012 addiu $at, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24010012u, cpu->gpr[1], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x800589E0u); -#endif - if (psx_delay_BFC409DC) { - psx_delay_BFC409DC = 0; - if (psx_taken_BFC409DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A18u); - goto label_BFC40A18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589E4u); - } -label_BFC409E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409E4: 1041005C beq $v0, $at, 0xBFC40B58 */ - uint32_t psx_brA_BFC409E4 = cpu->gpr[2]; uint32_t psx_brB_BFC409E4 = cpu->gpr[1]; - psx_taken_BFC409E4 = (psx_brA_BFC409E4 == psx_brB_BFC409E4); - psx_delay_BFC409E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409E8: 28410013 slti $at, $v0, 19 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (19) ? 1 : 0); - PGXP_ALU(0x28410013u, cpu->gpr[1], _pgx1, 0x0013u); } -#ifdef PSX_COSIM - cosim_instr(0x800589E8u); -#endif - if (psx_delay_BFC409E4) { - psx_delay_BFC409E4 = 0; - if (psx_taken_BFC409E4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589ECu); - } -label_BFC409EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409EC: 10200005 beq $at, $zero, 0xBFC40A04 */ - uint32_t psx_brA_BFC409EC = cpu->gpr[1]; uint32_t psx_brB_BFC409EC = cpu->gpr[0]; - psx_taken_BFC409EC = (psx_brA_BFC409EC == psx_brB_BFC409EC); - psx_delay_BFC409EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC409F0: 2401000F addiu $at, $zero, 15 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); - PGXP_ALU(0x2401000Fu, cpu->gpr[1], _pgx1, 0x0000000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x800589F0u); -#endif - if (psx_delay_BFC409EC) { - psx_delay_BFC409EC = 0; - if (psx_taken_BFC409EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A04u); - goto label_BFC40A04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589F4u); - } -label_BFC409F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC409F4: 1041FF9B beq $v0, $at, 0xBFC40864 */ - uint32_t psx_brA_BFC409F4 = cpu->gpr[2]; uint32_t psx_brB_BFC409F4 = cpu->gpr[1]; - psx_taken_BFC409F4 = (psx_brA_BFC409F4 == psx_brB_BFC409F4); - psx_delay_BFC409F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC409F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800589F8u); -#endif - if (psx_delay_BFC409F4) { - psx_delay_BFC409F4 = 0; - if (psx_taken_BFC409F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058864u); - goto label_BFC40864; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800589FCu); - } -label_BFC409FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC409FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC409FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800589FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC409FC: 10000057 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC409FC = cpu->gpr[0]; uint32_t psx_brB_BFC409FC = cpu->gpr[0]; - psx_taken_BFC409FC = (psx_brA_BFC409FC == psx_brB_BFC409FC); - psx_delay_BFC409FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A00u); -#endif - /* 0xBFC40A00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A00u); -#endif - if (psx_delay_BFC409FC) { - psx_delay_BFC409FC = 0; - if (psx_taken_BFC409FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A04u); - } -label_BFC40A04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A04: 24010013 addiu $at, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24010013u, cpu->gpr[1], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A08: 1041FFB2 beq $v0, $at, 0xBFC408D4 */ - uint32_t psx_brA_BFC40A08 = cpu->gpr[2]; uint32_t psx_brB_BFC40A08 = cpu->gpr[1]; - psx_taken_BFC40A08 = (psx_brA_BFC40A08 == psx_brB_BFC40A08); - psx_delay_BFC40A08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058A0Cu); -#endif - if (psx_delay_BFC40A08) { - psx_delay_BFC40A08 = 0; - if (psx_taken_BFC40A08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588D4u); - goto label_BFC408D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A10u); - } -label_BFC40A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A10: 10000052 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A10 = cpu->gpr[0]; uint32_t psx_brB_BFC40A10 = cpu->gpr[0]; - psx_taken_BFC40A10 = (psx_brA_BFC40A10 == psx_brB_BFC40A10); - psx_delay_BFC40A10 = 1; - /* 0xBFC40A14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A14u); -#endif - if (psx_delay_BFC40A10) { - psx_delay_BFC40A10 = 0; - if (psx_taken_BFC40A10) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A18u); - } -label_BFC40A18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A18: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A1C: 1041004E beq $v0, $at, 0xBFC40B58 */ - uint32_t psx_brA_BFC40A1C = cpu->gpr[2]; uint32_t psx_brB_BFC40A1C = cpu->gpr[1]; - psx_taken_BFC40A1C = (psx_brA_BFC40A1C == psx_brB_BFC40A1C); - psx_delay_BFC40A1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A20: 28410017 slti $at, $v0, 23 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0); - PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A20u); -#endif - if (psx_delay_BFC40A1C) { - psx_delay_BFC40A1C = 0; - if (psx_taken_BFC40A1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A24u); - } -label_BFC40A24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A24: 10200005 beq $at, $zero, 0xBFC40A3C */ - uint32_t psx_brA_BFC40A24 = cpu->gpr[1]; uint32_t psx_brB_BFC40A24 = cpu->gpr[0]; - psx_taken_BFC40A24 = (psx_brA_BFC40A24 == psx_brB_BFC40A24); - psx_delay_BFC40A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A28: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A28u); -#endif - if (psx_delay_BFC40A24) { - psx_delay_BFC40A24 = 0; - if (psx_taken_BFC40A24) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A3Cu); - goto label_BFC40A3C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A2Cu); - } -label_BFC40A2C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A2Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A2C: 1041004B beq $v0, $at, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A2C = cpu->gpr[2]; uint32_t psx_brB_BFC40A2C = cpu->gpr[1]; - psx_taken_BFC40A2C = (psx_brA_BFC40A2C == psx_brB_BFC40A2C); - psx_delay_BFC40A2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A30u); -#endif - /* 0xBFC40A30: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A30u); -#endif - if (psx_delay_BFC40A2C) { - psx_delay_BFC40A2C = 0; - if (psx_taken_BFC40A2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A34u); - } -label_BFC40A34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A34: 10000049 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A34 = cpu->gpr[0]; uint32_t psx_brB_BFC40A34 = cpu->gpr[0]; - psx_taken_BFC40A34 = (psx_brA_BFC40A34 == psx_brB_BFC40A34); - psx_delay_BFC40A34 = 1; - /* 0xBFC40A38: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A38u); -#endif - if (psx_delay_BFC40A34) { - psx_delay_BFC40A34 = 0; - if (psx_taken_BFC40A34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A3Cu); - } -label_BFC40A3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A3C: 24010017 addiu $at, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24010017u, cpu->gpr[1], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A40: 1041FFA0 beq $v0, $at, 0xBFC408C4 */ - uint32_t psx_brA_BFC40A40 = cpu->gpr[2]; uint32_t psx_brB_BFC40A40 = cpu->gpr[1]; - psx_taken_BFC40A40 = (psx_brA_BFC40A40 == psx_brB_BFC40A40); - psx_delay_BFC40A40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058A44u); -#endif - if (psx_delay_BFC40A40) { - psx_delay_BFC40A40 = 0; - if (psx_taken_BFC40A40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588C4u); - goto label_BFC408C4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A48u); - } -label_BFC40A48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A48: 10000044 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A48 = cpu->gpr[0]; uint32_t psx_brB_BFC40A48 = cpu->gpr[0]; - psx_taken_BFC40A48 = (psx_brA_BFC40A48 == psx_brB_BFC40A48); - psx_delay_BFC40A48 = 1; - /* 0xBFC40A4C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A4Cu); -#endif - if (psx_delay_BFC40A48) { - psx_delay_BFC40A48 = 0; - if (psx_taken_BFC40A48) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A50u); - } -label_BFC40A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A50: 240100F6 addiu $at, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240100F6u, cpu->gpr[1], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A54: 1041FF77 beq $v0, $at, 0xBFC40834 */ - uint32_t psx_brA_BFC40A54 = cpu->gpr[2]; uint32_t psx_brB_BFC40A54 = cpu->gpr[1]; - psx_taken_BFC40A54 = (psx_brA_BFC40A54 == psx_brB_BFC40A54); - psx_delay_BFC40A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A58: 284100F7 slti $at, $v0, 247 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (247) ? 1 : 0); - PGXP_ALU(0x284100F7u, cpu->gpr[1], _pgx1, 0x00F7u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A58u); -#endif - if (psx_delay_BFC40A54) { - psx_delay_BFC40A54 = 0; - if (psx_taken_BFC40A54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058834u); - goto label_BFC40834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A5Cu); - } -label_BFC40A5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A5C: 10200020 beq $at, $zero, 0xBFC40AE0 */ - uint32_t psx_brA_BFC40A5C = cpu->gpr[1]; uint32_t psx_brB_BFC40A5C = cpu->gpr[0]; - psx_taken_BFC40A5C = (psx_brA_BFC40A5C == psx_brB_BFC40A5C); - psx_delay_BFC40A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A60: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A60u); -#endif - if (psx_delay_BFC40A5C) { - psx_delay_BFC40A5C = 0; - if (psx_taken_BFC40A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AE0u); - goto label_BFC40AE0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A64u); - } -label_BFC40A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A64: 1041FF73 beq $v0, $at, 0xBFC40834 */ - uint32_t psx_brA_BFC40A64 = cpu->gpr[2]; uint32_t psx_brB_BFC40A64 = cpu->gpr[1]; - psx_taken_BFC40A64 = (psx_brA_BFC40A64 == psx_brB_BFC40A64); - psx_delay_BFC40A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A68: 284100E7 slti $at, $v0, 231 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (231) ? 1 : 0); - PGXP_ALU(0x284100E7u, cpu->gpr[1], _pgx1, 0x00E7u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A68u); -#endif - if (psx_delay_BFC40A64) { - psx_delay_BFC40A64 = 0; - if (psx_taken_BFC40A64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058834u); - goto label_BFC40834; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A6Cu); - } -label_BFC40A6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A6C: 1020000E beq $at, $zero, 0xBFC40AA8 */ - uint32_t psx_brA_BFC40A6C = cpu->gpr[1]; uint32_t psx_brB_BFC40A6C = cpu->gpr[0]; - psx_taken_BFC40A6C = (psx_brA_BFC40A6C == psx_brB_BFC40A6C); - psx_delay_BFC40A6C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A70: 24010050 addiu $at, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24010050u, cpu->gpr[1], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A70u); -#endif - if (psx_delay_BFC40A6C) { - psx_delay_BFC40A6C = 0; - if (psx_taken_BFC40A6C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AA8u); - goto label_BFC40AA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A74u); - } -label_BFC40A74: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A74u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A74: 1041FF83 beq $v0, $at, 0xBFC40884 */ - uint32_t psx_brA_BFC40A74 = cpu->gpr[2]; uint32_t psx_brB_BFC40A74 = cpu->gpr[1]; - psx_taken_BFC40A74 = (psx_brA_BFC40A74 == psx_brB_BFC40A74); - psx_delay_BFC40A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A78: 28410051 slti $at, $v0, 81 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (81) ? 1 : 0); - PGXP_ALU(0x28410051u, cpu->gpr[1], _pgx1, 0x0051u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A78u); -#endif - if (psx_delay_BFC40A74) { - psx_delay_BFC40A74 = 0; - if (psx_taken_BFC40A74) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058884u); - goto label_BFC40884; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A7Cu); - } -label_BFC40A7C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A7Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A7C: 10200005 beq $at, $zero, 0xBFC40A94 */ - uint32_t psx_brA_BFC40A7C = cpu->gpr[1]; uint32_t psx_brB_BFC40A7C = cpu->gpr[0]; - psx_taken_BFC40A7C = (psx_brA_BFC40A7C == psx_brB_BFC40A7C); - psx_delay_BFC40A7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A80: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80058A80u); -#endif - if (psx_delay_BFC40A7C) { - psx_delay_BFC40A7C = 0; - if (psx_taken_BFC40A7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A94u); - goto label_BFC40A94; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A84u); - } -label_BFC40A84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A84: 10410035 beq $v0, $at, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A84 = cpu->gpr[2]; uint32_t psx_brB_BFC40A84 = cpu->gpr[1]; - psx_taken_BFC40A84 = (psx_brA_BFC40A84 == psx_brB_BFC40A84); - psx_delay_BFC40A84 = 1; - /* 0xBFC40A88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A88u); -#endif - if (psx_delay_BFC40A84) { - psx_delay_BFC40A84 = 0; - if (psx_taken_BFC40A84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A8Cu); - } -label_BFC40A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A8C: 10000033 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40A8C = cpu->gpr[0]; uint32_t psx_brB_BFC40A8C = cpu->gpr[0]; - psx_taken_BFC40A8C = (psx_brA_BFC40A8C == psx_brB_BFC40A8C); - psx_delay_BFC40A8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A90u); -#endif - /* 0xBFC40A90: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058A90u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058A90u); -#endif - if (psx_delay_BFC40A8C) { - psx_delay_BFC40A8C = 0; - if (psx_taken_BFC40A8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058A94u); - } -label_BFC40A94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40A94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40A94: 240100E2 addiu $at, $zero, 226 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (226)); - PGXP_ALU(0x240100E2u, cpu->gpr[1], _pgx1, 0x000000E2u); } -#ifdef PSX_COSIM - cosim_instr(0x80058A94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40A98: 1041FF62 beq $v0, $at, 0xBFC40824 */ - uint32_t psx_brA_BFC40A98 = cpu->gpr[2]; uint32_t psx_brB_BFC40A98 = cpu->gpr[1]; - psx_taken_BFC40A98 = (psx_brA_BFC40A98 == psx_brB_BFC40A98); - psx_delay_BFC40A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40A9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058A9Cu); -#endif - if (psx_delay_BFC40A98) { - psx_delay_BFC40A98 = 0; - if (psx_taken_BFC40A98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058824u); - goto label_BFC40824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AA0u); - } -label_BFC40AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40AA0: 1000002E beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40AA0 = cpu->gpr[0]; uint32_t psx_brB_BFC40AA0 = cpu->gpr[0]; - psx_taken_BFC40AA0 = (psx_brA_BFC40AA0 == psx_brB_BFC40AA0); - psx_delay_BFC40AA0 = 1; - /* 0xBFC40AA4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058AA4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058AA4u); -#endif - if (psx_delay_BFC40AA0) { - psx_delay_BFC40AA0 = 0; - if (psx_taken_BFC40AA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AA8u); - } -label_BFC40AA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AA8: 240100EE addiu $at, $zero, 238 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (238)); - PGXP_ALU(0x240100EEu, cpu->gpr[1], _pgx1, 0x000000EEu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AAC: 1041FF71 beq $v0, $at, 0xBFC40874 */ - uint32_t psx_brA_BFC40AAC = cpu->gpr[2]; uint32_t psx_brB_BFC40AAC = cpu->gpr[1]; - psx_taken_BFC40AAC = (psx_brA_BFC40AAC == psx_brB_BFC40AAC); - psx_delay_BFC40AAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AB0: 284100EF slti $at, $v0, 239 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (239) ? 1 : 0); - PGXP_ALU(0x284100EFu, cpu->gpr[1], _pgx1, 0x00EFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AB0u); -#endif - if (psx_delay_BFC40AAC) { - psx_delay_BFC40AAC = 0; - if (psx_taken_BFC40AAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058874u); - goto label_BFC40874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AB4u); - } -label_BFC40AB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AB4: 10200005 beq $at, $zero, 0xBFC40ACC */ - uint32_t psx_brA_BFC40AB4 = cpu->gpr[1]; uint32_t psx_brB_BFC40AB4 = cpu->gpr[0]; - psx_taken_BFC40AB4 = (psx_brA_BFC40AB4 == psx_brB_BFC40AB4); - psx_delay_BFC40AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AB8: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AB8u); -#endif - if (psx_delay_BFC40AB4) { - psx_delay_BFC40AB4 = 0; - if (psx_taken_BFC40AB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058ACCu); - goto label_BFC40ACC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058ABCu); - } -label_BFC40ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40ABC: 1041FF5E beq $v0, $at, 0xBFC40838 */ - uint32_t psx_brA_BFC40ABC = cpu->gpr[2]; uint32_t psx_brB_BFC40ABC = cpu->gpr[1]; - psx_taken_BFC40ABC = (psx_brA_BFC40ABC == psx_brB_BFC40ABC); - psx_delay_BFC40ABC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC40AC0: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058AC0u); -#endif - if (psx_delay_BFC40ABC) { - psx_delay_BFC40ABC = 0; - if (psx_taken_BFC40ABC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058838u); - goto label_BFC40838; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AC4u); - } -label_BFC40AC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40AC4: 10000025 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40AC4 = cpu->gpr[0]; uint32_t psx_brB_BFC40AC4 = cpu->gpr[0]; - psx_taken_BFC40AC4 = (psx_brA_BFC40AC4 == psx_brB_BFC40AC4); - psx_delay_BFC40AC4 = 1; - /* 0xBFC40AC8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058AC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058AC8u); -#endif - if (psx_delay_BFC40AC4) { - psx_delay_BFC40AC4 = 0; - if (psx_taken_BFC40AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058ACCu); - } -label_BFC40ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40ACC: 240100F2 addiu $at, $zero, 242 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); - PGXP_ALU(0x240100F2u, cpu->gpr[1], _pgx1, 0x000000F2u); } -#ifdef PSX_COSIM - cosim_instr(0x80058ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AD0: 1041FF50 beq $v0, $at, 0xBFC40814 */ - uint32_t psx_brA_BFC40AD0 = cpu->gpr[2]; uint32_t psx_brB_BFC40AD0 = cpu->gpr[1]; - psx_taken_BFC40AD0 = (psx_brA_BFC40AD0 == psx_brB_BFC40AD0); - psx_delay_BFC40AD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40AD4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058AD4u); -#endif - if (psx_delay_BFC40AD0) { - psx_delay_BFC40AD0 = 0; - if (psx_taken_BFC40AD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058814u); - goto label_BFC40814; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AD8u); - } -label_BFC40AD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40AD8: 10000020 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40AD8 = cpu->gpr[0]; uint32_t psx_brB_BFC40AD8 = cpu->gpr[0]; - psx_taken_BFC40AD8 = (psx_brA_BFC40AD8 == psx_brB_BFC40AD8); - psx_delay_BFC40AD8 = 1; - /* 0xBFC40ADC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058ADCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058ADCu); -#endif - if (psx_delay_BFC40AD8) { - psx_delay_BFC40AD8 = 0; - if (psx_taken_BFC40AD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AE0u); - } -label_BFC40AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AE0: 24010DDD addiu $at, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24010DDDu, cpu->gpr[1], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AE4: 1041001C beq $v0, $at, 0xBFC40B58 */ - uint32_t psx_brA_BFC40AE4 = cpu->gpr[2]; uint32_t psx_brB_BFC40AE4 = cpu->gpr[1]; - psx_taken_BFC40AE4 = (psx_brA_BFC40AE4 == psx_brB_BFC40AE4); - psx_delay_BFC40AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AE8: 28410DDE slti $at, $v0, 3550 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3550) ? 1 : 0); - PGXP_ALU(0x28410DDEu, cpu->gpr[1], _pgx1, 0x0DDEu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AE8u); -#endif - if (psx_delay_BFC40AE4) { - psx_delay_BFC40AE4 = 0; - if (psx_taken_BFC40AE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AECu); - } -label_BFC40AEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AEC: 1020000E beq $at, $zero, 0xBFC40B28 */ - uint32_t psx_brA_BFC40AEC = cpu->gpr[1]; uint32_t psx_brB_BFC40AEC = cpu->gpr[0]; - psx_taken_BFC40AEC = (psx_brA_BFC40AEC == psx_brB_BFC40AEC); - psx_delay_BFC40AEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AF0: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AF0u); -#endif - if (psx_delay_BFC40AEC) { - psx_delay_BFC40AEC = 0; - if (psx_taken_BFC40AEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B28u); - goto label_BFC40B28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AF4u); - } -label_BFC40AF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AF4: 1041FF5F beq $v0, $at, 0xBFC40874 */ - uint32_t psx_brA_BFC40AF4 = cpu->gpr[2]; uint32_t psx_brB_BFC40AF4 = cpu->gpr[1]; - psx_taken_BFC40AF4 = (psx_brA_BFC40AF4 == psx_brB_BFC40AF4); - psx_delay_BFC40AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40AF8: 284100FF slti $at, $v0, 255 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (255) ? 1 : 0); - PGXP_ALU(0x284100FFu, cpu->gpr[1], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058AF8u); -#endif - if (psx_delay_BFC40AF4) { - psx_delay_BFC40AF4 = 0; - if (psx_taken_BFC40AF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058874u); - goto label_BFC40874; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058AFCu); - } -label_BFC40AFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40AFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40AFC: 10200005 beq $at, $zero, 0xBFC40B14 */ - uint32_t psx_brA_BFC40AFC = cpu->gpr[1]; uint32_t psx_brB_BFC40AFC = cpu->gpr[0]; - psx_taken_BFC40AFC = (psx_brA_BFC40AFC == psx_brB_BFC40AFC); - psx_delay_BFC40AFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B00: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058B00u); -#endif - if (psx_delay_BFC40AFC) { - psx_delay_BFC40AFC = 0; - if (psx_taken_BFC40AFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B14u); - goto label_BFC40B14; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B04u); - } -label_BFC40B04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B04: 1041FF4C beq $v0, $at, 0xBFC40838 */ - uint32_t psx_brA_BFC40B04 = cpu->gpr[2]; uint32_t psx_brB_BFC40B04 = cpu->gpr[1]; - psx_taken_BFC40B04 = (psx_brA_BFC40B04 == psx_brB_BFC40B04); - psx_delay_BFC40B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC40B08: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B08u); -#endif - if (psx_delay_BFC40B04) { - psx_delay_BFC40B04 = 0; - if (psx_taken_BFC40B04) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058838u); - goto label_BFC40838; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B0Cu); - } -label_BFC40B0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B0C: 10000013 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40B0C = cpu->gpr[0]; uint32_t psx_brB_BFC40B0C = cpu->gpr[0]; - psx_taken_BFC40B0C = (psx_brA_BFC40B0C == psx_brB_BFC40B0C); - psx_delay_BFC40B0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B10u); -#endif - /* 0xBFC40B10: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B10u); -#endif - if (psx_delay_BFC40B0C) { - psx_delay_BFC40B0C = 0; - if (psx_taken_BFC40B0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B14u); - } -label_BFC40B14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B14: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80058B14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B18: 10410010 beq $v0, $at, 0xBFC40B5C */ - uint32_t psx_brA_BFC40B18 = cpu->gpr[2]; uint32_t psx_brB_BFC40B18 = cpu->gpr[1]; - psx_taken_BFC40B18 = (psx_brA_BFC40B18 == psx_brB_BFC40B18); - psx_delay_BFC40B18 = 1; - /* 0xBFC40B1C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B1Cu); -#endif - if (psx_delay_BFC40B18) { - psx_delay_BFC40B18 = 0; - if (psx_taken_BFC40B18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B20u); - } -label_BFC40B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B20: 1000000E beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40B20 = cpu->gpr[0]; uint32_t psx_brB_BFC40B20 = cpu->gpr[0]; - psx_taken_BFC40B20 = (psx_brA_BFC40B20 == psx_brB_BFC40B20); - psx_delay_BFC40B20 = 1; - /* 0xBFC40B24: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B24u); -#endif - if (psx_delay_BFC40B20) { - psx_delay_BFC40B20 = 0; - if (psx_taken_BFC40B20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B28u); - } -label_BFC40B28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B28: 24010FFF addiu $at, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x24010FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B2C: 1041000A beq $v0, $at, 0xBFC40B58 */ - uint32_t psx_brA_BFC40B2C = cpu->gpr[2]; uint32_t psx_brB_BFC40B2C = cpu->gpr[1]; - psx_taken_BFC40B2C = (psx_brA_BFC40B2C == psx_brB_BFC40B2C); - psx_delay_BFC40B2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B30: 28411000 slti $at, $v0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0); - PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B30u); -#endif - if (psx_delay_BFC40B2C) { - psx_delay_BFC40B2C = 0; - if (psx_taken_BFC40B2C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - goto label_BFC40B58; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B34u); - } -label_BFC40B34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B34: 10200005 beq $at, $zero, 0xBFC40B4C */ - uint32_t psx_brA_BFC40B34 = cpu->gpr[1]; uint32_t psx_brB_BFC40B34 = cpu->gpr[0]; - psx_taken_BFC40B34 = (psx_brA_BFC40B34 == psx_brB_BFC40B34); - psx_delay_BFC40B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B38: 24010F14 addiu $at, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x24010F14u, cpu->gpr[1], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B38u); -#endif - if (psx_delay_BFC40B34) { - psx_delay_BFC40B34 = 0; - if (psx_taken_BFC40B34) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B4Cu); - goto label_BFC40B4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B3Cu); - } -label_BFC40B3C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B3Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B3C: 1041FF59 beq $v0, $at, 0xBFC408A4 */ - uint32_t psx_brA_BFC40B3C = cpu->gpr[2]; uint32_t psx_brB_BFC40B3C = cpu->gpr[1]; - psx_taken_BFC40B3C = (psx_brA_BFC40B3C == psx_brB_BFC40B3C); - psx_delay_BFC40B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058B40u); -#endif - if (psx_delay_BFC40B3C) { - psx_delay_BFC40B3C = 0; - if (psx_taken_BFC40B3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588A4u); - goto label_BFC408A4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B44u); - } -label_BFC40B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B44: 10000005 beq $zero, $zero, 0xBFC40B5C */ - uint32_t psx_brA_BFC40B44 = cpu->gpr[0]; uint32_t psx_brB_BFC40B44 = cpu->gpr[0]; - psx_taken_BFC40B44 = (psx_brA_BFC40B44 == psx_brB_BFC40B44); - psx_delay_BFC40B44 = 1; - /* 0xBFC40B48: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B48u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B48u); -#endif - if (psx_delay_BFC40B44) { - psx_delay_BFC40B44 = 0; - if (psx_taken_BFC40B44) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B5Cu); - goto label_BFC40B5C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B4Cu); - } -label_BFC40B4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B4C: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B50: 1041FF69 beq $v0, $at, 0xBFC408F8 */ - uint32_t psx_brA_BFC40B50 = cpu->gpr[2]; uint32_t psx_brB_BFC40B50 = cpu->gpr[1]; - psx_taken_BFC40B50 = (psx_brA_BFC40B50 == psx_brB_BFC40B50); - psx_delay_BFC40B50 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40B54: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058B54u); -#endif - if (psx_delay_BFC40B50) { - psx_delay_BFC40B50 = 0; - if (psx_taken_BFC40B50) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800588F8u); - goto label_BFC408F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B58u); - } -label_BFC40B58: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B58u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B58u); -#endif - /* 0xBFC40B58: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B58u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B58u); -#endif -label_BFC40B5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40B5C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40B60: 03E00008 jr $ra */ - psx_delay_BFC40B60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058B64u); -#endif - if (psx_delay_BFC40B60) { - psx_delay_BFC40B60 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40B68(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40B68u); - int psx_delay_BFC40B88 = 0; - int psx_taken_BFC40B88 = 0; - int psx_delay_BFC40B90 = 0; - int psx_delay_BFC40B98 = 0; - int psx_taken_BFC40B98 = 0; - int psx_delay_BFC40BAC = 0; - int psx_taken_BFC40BAC = 0; - int psx_delay_BFC40BB4 = 0; - int psx_taken_BFC40BB4 = 0; - int psx_delay_BFC40BBC = 0; - int psx_taken_BFC40BBC = 0; - int psx_delay_BFC40BC4 = 0; - int psx_taken_BFC40BC4 = 0; - int psx_delay_BFC40BCC = 0; - int psx_taken_BFC40BCC = 0; - int psx_delay_BFC40BF4 = 0; - int psx_delay_BFC40BFC = 0; - int psx_taken_BFC40BFC = 0; - int psx_delay_BFC40C18 = 0; - int psx_delay_BFC40C20 = 0; - int psx_taken_BFC40C20 = 0; - int psx_delay_BFC40C44 = 0; - int psx_delay_BFC40C4C = 0; - int psx_taken_BFC40C4C = 0; - int psx_delay_BFC40C68 = 0; - int psx_taken_BFC40C68 = 0; - int psx_delay_BFC40CD0 = 0; - int psx_taken_BFC40CD0 = 0; - int psx_delay_BFC40CEC = 0; - int psx_delay_BFC40CF4 = 0; - int psx_taken_BFC40CF4 = 0; - int psx_delay_BFC40D04 = 0; - int psx_delay_BFC40D0C = 0; - int psx_taken_BFC40D0C = 0; - int psx_delay_BFC40D18 = 0; - int psx_taken_BFC40D18 = 0; - int psx_delay_BFC40D20 = 0; - int psx_taken_BFC40D20 = 0; - int psx_delay_BFC40D28 = 0; - int psx_taken_BFC40D28 = 0; - int psx_delay_BFC40D30 = 0; - int psx_taken_BFC40D30 = 0; - int psx_delay_BFC40D38 = 0; - int psx_taken_BFC40D38 = 0; - int psx_delay_BFC40D40 = 0; - int psx_taken_BFC40D40 = 0; - int psx_delay_BFC40D4C = 0; - int psx_taken_BFC40D4C = 0; - int psx_delay_BFC40D54 = 0; - int psx_taken_BFC40D54 = 0; - int psx_delay_BFC40D60 = 0; - int psx_taken_BFC40D60 = 0; - int psx_delay_BFC40D7C = 0; - int psx_delay_BFC40D84 = 0; - int psx_taken_BFC40D84 = 0; - int psx_delay_BFC40D90 = 0; - int psx_taken_BFC40D90 = 0; - int psx_delay_BFC40D98 = 0; - int psx_taken_BFC40D98 = 0; - int psx_delay_BFC40DA4 = 0; - int psx_taken_BFC40DA4 = 0; - int psx_delay_BFC40DAC = 0; - int psx_taken_BFC40DAC = 0; - int psx_delay_BFC40DB4 = 0; - int psx_taken_BFC40DB4 = 0; - int psx_delay_BFC40DBC = 0; - int psx_taken_BFC40DBC = 0; - int psx_delay_BFC40DC8 = 0; - int psx_taken_BFC40DC8 = 0; - int psx_delay_BFC40DD0 = 0; - int psx_taken_BFC40DD0 = 0; - int psx_delay_BFC40DE0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40B90u: goto label_BFC40B90; - case 0xBFC40B98u: goto label_BFC40B98; - case 0xBFC40BA0u: goto label_BFC40BA0; - case 0xBFC40BB4u: goto label_BFC40BB4; - case 0xBFC40BBCu: goto label_BFC40BBC; - case 0xBFC40BC4u: goto label_BFC40BC4; - case 0xBFC40BCCu: goto label_BFC40BCC; - case 0xBFC40BD4u: goto label_BFC40BD4; - case 0xBFC40BE4u: goto label_BFC40BE4; - case 0xBFC40BFCu: goto label_BFC40BFC; - case 0xBFC40C04u: goto label_BFC40C04; - case 0xBFC40C20u: goto label_BFC40C20; - case 0xBFC40C28u: goto label_BFC40C28; - case 0xBFC40C4Cu: goto label_BFC40C4C; - case 0xBFC40C54u: goto label_BFC40C54; - case 0xBFC40C70u: goto label_BFC40C70; - case 0xBFC40CA8u: goto label_BFC40CA8; - case 0xBFC40CD8u: goto label_BFC40CD8; - case 0xBFC40CF4u: goto label_BFC40CF4; - case 0xBFC40CFCu: goto label_BFC40CFC; - case 0xBFC40D00u: goto label_BFC40D00; - case 0xBFC40D0Cu: goto label_BFC40D0C; - case 0xBFC40D14u: goto label_BFC40D14; - case 0xBFC40D18u: goto label_BFC40D18; - case 0xBFC40D20u: goto label_BFC40D20; - case 0xBFC40D28u: goto label_BFC40D28; - case 0xBFC40D30u: goto label_BFC40D30; - case 0xBFC40D38u: goto label_BFC40D38; - case 0xBFC40D40u: goto label_BFC40D40; - case 0xBFC40D48u: goto label_BFC40D48; - case 0xBFC40D54u: goto label_BFC40D54; - case 0xBFC40D5Cu: goto label_BFC40D5C; - case 0xBFC40D60u: goto label_BFC40D60; - case 0xBFC40D68u: goto label_BFC40D68; - case 0xBFC40D6Cu: goto label_BFC40D6C; - case 0xBFC40D84u: goto label_BFC40D84; - case 0xBFC40D8Cu: goto label_BFC40D8C; - case 0xBFC40D98u: goto label_BFC40D98; - case 0xBFC40DA0u: goto label_BFC40DA0; - case 0xBFC40DACu: goto label_BFC40DAC; - case 0xBFC40DB4u: goto label_BFC40DB4; - case 0xBFC40DBCu: goto label_BFC40DBC; - case 0xBFC40DC4u: goto label_BFC40DC4; - case 0xBFC40DD0u: goto label_BFC40DD0; - case 0xBFC40DD8u: goto label_BFC40DD8; - case 0xBFC40DDCu: goto label_BFC40DDC; - default: break; - } - } -label_BFC40B68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC40B68: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058B68u); -#endif - /* 0xBFC40B6C: 8CA59C2C lw $a1, -25556($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C2Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40B70: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40B74: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058B74u); -#endif - /* 0xBFC40B78: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40B7C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B7Cu); return; } g_debug_last_store_pc = 0x80058B7Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B80: 24010012 addiu $at, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24010012u, cpu->gpr[1], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x80058B80u); -#endif - /* 0xBFC40B84: 90A30000 lbu $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 3, 0x20u); - PGXP_LOAD(0x90A30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40B88: 14410063 bne $v0, $at, 0xBFC40D18 */ - uint32_t psx_brA_BFC40B88 = cpu->gpr[2]; uint32_t psx_brB_BFC40B88 = cpu->gpr[1]; - psx_taken_BFC40B88 = (psx_brA_BFC40B88 != psx_brB_BFC40B88); - psx_delay_BFC40B88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40B8C: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80058B8Cu); -#endif - if (psx_delay_BFC40B88) { - psx_delay_BFC40B88 = 0; - if (psx_taken_BFC40B88) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D18u); - goto label_BFC40D18; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058B90u); - } -label_BFC40B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40B90: 0C016612 jal 0xB0059848 */ - cpu->gpr[31] = 0x80058B98u; /* jal link before delay slot */ - psx_delay_BFC40B90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058B94u); -#endif - if (psx_delay_BFC40B90) { - psx_delay_BFC40B90 = 0; - cpu->gpr[31] = 0x80058B98u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059848u); - cpu->pc = 0x80059848u; return; - } -label_BFC40B98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40B98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058B98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40B98: 10000090 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40B98 = cpu->gpr[0]; uint32_t psx_brB_BFC40B98 = cpu->gpr[0]; - psx_taken_BFC40B98 = (psx_brA_BFC40B98 == psx_brB_BFC40B98); - psx_delay_BFC40B98 = 1; - /* 0xBFC40B9C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058B9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058B9Cu); -#endif - if (psx_delay_BFC40B98) { - psx_delay_BFC40B98 = 0; - if (psx_taken_BFC40B98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BA0u); - } -label_BFC40BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40BA0: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058BA0u); -#endif - /* 0xBFC40BA4: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058BA4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058BA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40BA8: 240100E6 addiu $at, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240100E6u, cpu->gpr[1], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BAC: 10410009 beq $v0, $at, 0xBFC40BD4 */ - uint32_t psx_brA_BFC40BAC = cpu->gpr[2]; uint32_t psx_brB_BFC40BAC = cpu->gpr[1]; - psx_taken_BFC40BAC = (psx_brA_BFC40BAC == psx_brB_BFC40BAC); - psx_delay_BFC40BAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40BB0: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058BB0u); -#endif - if (psx_delay_BFC40BAC) { - psx_delay_BFC40BAC = 0; - if (psx_taken_BFC40BAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BD4u); - goto label_BFC40BD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BB4u); - } -label_BFC40BB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BB4: 10410007 beq $v0, $at, 0xBFC40BD4 */ - uint32_t psx_brA_BFC40BB4 = cpu->gpr[2]; uint32_t psx_brB_BFC40BB4 = cpu->gpr[1]; - psx_taken_BFC40BB4 = (psx_brA_BFC40BB4 == psx_brB_BFC40BB4); - psx_delay_BFC40BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40BB8: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BB8u); -#endif - if (psx_delay_BFC40BB4) { - psx_delay_BFC40BB4 = 0; - if (psx_taken_BFC40BB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BD4u); - goto label_BFC40BD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BBCu); - } -label_BFC40BBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BBC: 10410005 beq $v0, $at, 0xBFC40BD4 */ - uint32_t psx_brA_BFC40BBC = cpu->gpr[2]; uint32_t psx_brB_BFC40BBC = cpu->gpr[1]; - psx_taken_BFC40BBC = (psx_brA_BFC40BBC == psx_brB_BFC40BBC); - psx_delay_BFC40BBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40BC0: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BC0u); -#endif - if (psx_delay_BFC40BBC) { - psx_delay_BFC40BBC = 0; - if (psx_taken_BFC40BBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BD4u); - goto label_BFC40BD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BC4u); - } -label_BFC40BC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BC4: 10410003 beq $v0, $at, 0xBFC40BD4 */ - uint32_t psx_brA_BFC40BC4 = cpu->gpr[2]; uint32_t psx_brB_BFC40BC4 = cpu->gpr[1]; - psx_taken_BFC40BC4 = (psx_brA_BFC40BC4 == psx_brB_BFC40BC4); - psx_delay_BFC40BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40BC8: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BC8u); -#endif - if (psx_delay_BFC40BC4) { - psx_delay_BFC40BC4 = 0; - if (psx_taken_BFC40BC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BD4u); - goto label_BFC40BD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BCCu); - } -label_BFC40BCC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BCCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BCC: 14410005 bne $v0, $at, 0xBFC40BE4 */ - uint32_t psx_brA_BFC40BCC = cpu->gpr[2]; uint32_t psx_brB_BFC40BCC = cpu->gpr[1]; - psx_taken_BFC40BCC = (psx_brA_BFC40BCC != psx_brB_BFC40BCC); - psx_delay_BFC40BCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40BD0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058BD0u); -#endif - if (psx_delay_BFC40BCC) { - psx_delay_BFC40BCC = 0; - if (psx_taken_BFC40BCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BE4u); - goto label_BFC40BE4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BD4u); - } -label_BFC40BD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40BD4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40BD8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058BD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BDC: AC22EE58 sw $v0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058BDCu); return; } g_debug_last_store_pc = 0x80058BDCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40BE0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058BE0u); -#endif -label_BFC40BE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40BE4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40BE8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40BEC: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058BECu); return; } g_debug_last_store_pc = 0x80058BECu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40BF0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40BF4: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058BFCu; /* jal link before delay slot */ - psx_delay_BFC40BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40BF8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80058BF8u); -#endif - if (psx_delay_BFC40BF4) { - psx_delay_BFC40BF4 = 0; - cpu->gpr[31] = 0x80058BFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40BFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40BFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058BFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40BFC: 10000077 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40BFC = cpu->gpr[0]; uint32_t psx_brB_BFC40BFC = cpu->gpr[0]; - psx_taken_BFC40BFC = (psx_brA_BFC40BFC == psx_brB_BFC40BFC); - psx_delay_BFC40BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C00u); -#endif - /* 0xBFC40C00: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C00u); -#endif - if (psx_delay_BFC40BFC) { - psx_delay_BFC40BFC = 0; - if (psx_taken_BFC40BFC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C04u); - } -label_BFC40C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40C04: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40C08: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40C0C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40C10: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C10u); return; } g_debug_last_store_pc = 0x80058C10u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40C14: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40C18: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058C20u; /* jal link before delay slot */ - psx_delay_BFC40C18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40C1C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C1Cu); -#endif - if (psx_delay_BFC40C18) { - psx_delay_BFC40C18 = 0; - cpu->gpr[31] = 0x80058C20u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40C20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40C20: 1000006E beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40C20 = cpu->gpr[0]; uint32_t psx_brB_BFC40C20 = cpu->gpr[0]; - psx_taken_BFC40C20 = (psx_brA_BFC40C20 == psx_brB_BFC40C20); - psx_delay_BFC40C20 = 1; - /* 0xBFC40C24: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C24u); -#endif - if (psx_delay_BFC40C20) { - psx_delay_BFC40C20 = 0; - if (psx_taken_BFC40C20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C28u); - } -label_BFC40C28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40C28: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40C2C: AC20EEAC sw $zero, -4436($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4436; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4436)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C2Cu); return; } g_debug_last_store_pc = 0x80058C2Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EEACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40C30: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40C34: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40C38: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40C3C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40C40: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C40u); return; } g_debug_last_store_pc = 0x80058C40u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40C44: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058C4Cu; /* jal link before delay slot */ - psx_delay_BFC40C44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40C48: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C48u); -#endif - if (psx_delay_BFC40C44) { - psx_delay_BFC40C44 = 0; - cpu->gpr[31] = 0x80058C4Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40C4C: 10000063 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40C4C = cpu->gpr[0]; uint32_t psx_brB_BFC40C4C = cpu->gpr[0]; - psx_taken_BFC40C4C = (psx_brA_BFC40C4C == psx_brB_BFC40C4C); - psx_delay_BFC40C4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C50u); -#endif - /* 0xBFC40C50: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C50u); -#endif - if (psx_delay_BFC40C4C) { - psx_delay_BFC40C4C = 0; - if (psx_taken_BFC40C4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C54u); - } -label_BFC40C54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC40C54: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40C58: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC40C5C: AC2EEEA8 sw $t6, -4440($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C5Cu); return; } g_debug_last_store_pc = 0x80058C5Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEEA8u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40C60: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40C64: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40C68: 1000005B beq $zero, $zero, 0xBFC40DD8 */ - uint32_t psx_brA_BFC40C68 = cpu->gpr[0]; uint32_t psx_brB_BFC40C68 = cpu->gpr[0]; - psx_taken_BFC40C68 = (psx_brA_BFC40C68 == psx_brB_BFC40C68); - psx_delay_BFC40C68 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40C6C: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C6Cu); return; } g_debug_last_store_pc = 0x80058C6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C6Cu); -#endif - if (psx_delay_BFC40C68) { - psx_delay_BFC40C68 = 0; - if (psx_taken_BFC40C68) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DD8u); - goto label_BFC40DD8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C70u); - } -label_BFC40C70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40C70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC40C70: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058C70u); -#endif - /* 0xBFC40C74: 8CC6EE98 lw $a2, -4456($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4456; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058C74u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6EE98u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40C78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC40C7C: A0C30000 sb $v1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058C7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA0C30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C80u); -#endif - /* 0xBFC40C80: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x50u); -#endif - /* 0xBFC40C84: 24C40001 addiu $a0, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C40001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC40C88: A08F0000 sb $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058C88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA08F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C88u); -#endif - /* 0xBFC40C8C: 90B80000 lbu $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 24, 0x20u); - PGXP_LOAD(0x90B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC40C90: 24030004 addiu $v1, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24030004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000010u); -#endif - /* 0xBFC40C94: A0980001 sb $t8, 1($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058C94u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (1)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0980001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C94u); -#endif - /* 0xBFC40C98: 90B90000 lbu $t9, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 25, 0x20u); - PGXP_LOAD(0x90B90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058C98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC40C9C: 24C20004 addiu $v0, $a2, 4 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[6] + (4)); - PGXP_ALU(0x24C20004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC40CA0: A0990002 sb $t9, 2($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058CA0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (2)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0990002u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40CA4: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80058CA4u); -#endif -label_BFC40CA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40CA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CA8u); -#endif - /* 0xBFC40CA8: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40CAC: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC40CB0: A0480000 sb $t0, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058CB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA0480000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CB0u); -#endif - /* 0xBFC40CB4: 90A90000 lbu $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 9, 0x20u); - PGXP_LOAD(0x90A90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40CB8: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC40CBC: A049FFFD sb $t1, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058CBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FFFDu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CC0u); -#endif - /* 0xBFC40CC0: 90AA0000 lbu $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 10, 0x20u); - PGXP_LOAD(0x90AA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40CC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058CC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC40CC8: A04AFFFE sb $t2, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058CC8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFFFEu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CC8u); -#endif - /* 0xBFC40CCC: 90AB0000 lbu $t3, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 11, 0x20u); - PGXP_LOAD(0x90AB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC40CD0: 1464FFF5 bne $v1, $a0, 0xBFC40CA8 */ - uint32_t psx_brA_BFC40CD0 = cpu->gpr[3]; uint32_t psx_brB_BFC40CD0 = cpu->gpr[4]; - psx_taken_BFC40CD0 = (psx_brA_BFC40CD0 != psx_brB_BFC40CD0); - psx_delay_BFC40CD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x804u); -#endif - /* 0xBFC40CD4: A04BFFFF sb $t3, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058CD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[11] & 0xFFu)); - PGXP_STORE(0xA04BFFFFu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CD4u); -#endif - if (psx_delay_BFC40CD0) { - psx_delay_BFC40CD0 = 0; - if (psx_taken_BFC40CD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058CA8u); - goto label_BFC40CA8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058CD8u); - } -label_BFC40CD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40CD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40CD8: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058CD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40CDC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40CE0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40CE4: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058CE4u); return; } g_debug_last_store_pc = 0x80058CE4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40CE8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40CEC: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058CF4u; /* jal link before delay slot */ - psx_delay_BFC40CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40CF0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80058CF0u); -#endif - if (psx_delay_BFC40CEC) { - psx_delay_BFC40CEC = 0; - cpu->gpr[31] = 0x80058CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40CF4: 10000039 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40CF4 = cpu->gpr[0]; uint32_t psx_brB_BFC40CF4 = cpu->gpr[0]; - psx_taken_BFC40CF4 = (psx_brA_BFC40CF4 == psx_brB_BFC40CF4); - psx_delay_BFC40CF4 = 1; - /* 0xBFC40CF8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058CF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058CF8u); -#endif - if (psx_delay_BFC40CF4) { - psx_delay_BFC40CF4 = 0; - if (psx_taken_BFC40CF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058CFCu); - } -label_BFC40CFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40CFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40CFC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058CFCu); -#endif -label_BFC40D00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40D00: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40D04: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058D0Cu; /* jal link before delay slot */ - psx_delay_BFC40D04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40D08: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D08u); -#endif - if (psx_delay_BFC40D04) { - psx_delay_BFC40D04 = 0; - cpu->gpr[31] = 0x80058D0Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40D0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D0C: 10000033 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40D0C = cpu->gpr[0]; uint32_t psx_brB_BFC40D0C = cpu->gpr[0]; - psx_taken_BFC40D0C = (psx_brA_BFC40D0C == psx_brB_BFC40D0C); - psx_delay_BFC40D0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D10u); -#endif - /* 0xBFC40D10: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058D10u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058D10u); -#endif - if (psx_delay_BFC40D0C) { - psx_delay_BFC40D0C = 0; - if (psx_taken_BFC40D0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D14u); - } -label_BFC40D14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D14: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80058D14u); -#endif -label_BFC40D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D18: 1041FFCE beq $v0, $at, 0xBFC40C54 */ - uint32_t psx_brA_BFC40D18 = cpu->gpr[2]; uint32_t psx_brB_BFC40D18 = cpu->gpr[1]; - psx_taken_BFC40D18 = (psx_brA_BFC40D18 == psx_brB_BFC40D18); - psx_delay_BFC40D18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D1C: 28410CCD slti $at, $v0, 3277 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (3277) ? 1 : 0); - PGXP_ALU(0x28410CCDu, cpu->gpr[1], _pgx1, 0x0CCDu); } -#ifdef PSX_COSIM - cosim_instr(0x80058D1Cu); -#endif - if (psx_delay_BFC40D18) { - psx_delay_BFC40D18 = 0; - if (psx_taken_BFC40D18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C54u); - goto label_BFC40C54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D20u); - } -label_BFC40D20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D20: 1020001F beq $at, $zero, 0xBFC40DA0 */ - uint32_t psx_brA_BFC40D20 = cpu->gpr[1]; uint32_t psx_brB_BFC40D20 = cpu->gpr[0]; - psx_taken_BFC40D20 = (psx_brA_BFC40D20 == psx_brB_BFC40D20); - psx_delay_BFC40D20 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D24: 24010016 addiu $at, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24010016u, cpu->gpr[1], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D24u); -#endif - if (psx_delay_BFC40D20) { - psx_delay_BFC40D20 = 0; - if (psx_taken_BFC40D20) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DA0u); - goto label_BFC40DA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D28u); - } -label_BFC40D28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D28: 1041FF9D beq $v0, $at, 0xBFC40BA0 */ - uint32_t psx_brA_BFC40D28 = cpu->gpr[2]; uint32_t psx_brB_BFC40D28 = cpu->gpr[1]; - psx_taken_BFC40D28 = (psx_brA_BFC40D28 == psx_brB_BFC40D28); - psx_delay_BFC40D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D2C: 28410017 slti $at, $v0, 23 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (23) ? 1 : 0); - PGXP_ALU(0x28410017u, cpu->gpr[1], _pgx1, 0x0017u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D2Cu); -#endif - if (psx_delay_BFC40D28) { - psx_delay_BFC40D28 = 0; - if (psx_taken_BFC40D28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BA0u); - goto label_BFC40BA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D30u); - } -label_BFC40D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D30: 10200016 beq $at, $zero, 0xBFC40D8C */ - uint32_t psx_brA_BFC40D30 = cpu->gpr[1]; uint32_t psx_brB_BFC40D30 = cpu->gpr[0]; - psx_taken_BFC40D30 = (psx_brA_BFC40D30 == psx_brB_BFC40D30); - psx_delay_BFC40D30 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D34: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D34u); -#endif - if (psx_delay_BFC40D30) { - psx_delay_BFC40D30 = 0; - if (psx_taken_BFC40D30) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D8Cu); - goto label_BFC40D8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D38u); - } -label_BFC40D38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D38: 1041FF99 beq $v0, $at, 0xBFC40BA0 */ - uint32_t psx_brA_BFC40D38 = cpu->gpr[2]; uint32_t psx_brB_BFC40D38 = cpu->gpr[1]; - psx_taken_BFC40D38 = (psx_brA_BFC40D38 == psx_brB_BFC40D38); - psx_delay_BFC40D38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D3C: 2841000A slti $at, $v0, 10 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (10) ? 1 : 0); - PGXP_ALU(0x2841000Au, cpu->gpr[1], _pgx1, 0x000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80058D3Cu); -#endif - if (psx_delay_BFC40D38) { - psx_delay_BFC40D38 = 0; - if (psx_taken_BFC40D38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BA0u); - goto label_BFC40BA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D40u); - } -label_BFC40D40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D40: 10200007 beq $at, $zero, 0xBFC40D60 */ - uint32_t psx_brA_BFC40D40 = cpu->gpr[1]; uint32_t psx_brB_BFC40D40 = cpu->gpr[0]; - psx_taken_BFC40D40 = (psx_brA_BFC40D40 == psx_brB_BFC40D40); - psx_delay_BFC40D40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D44: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D44u); -#endif - if (psx_delay_BFC40D40) { - psx_delay_BFC40D40 = 0; - if (psx_taken_BFC40D40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D60u); - goto label_BFC40D60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D48u); - } -label_BFC40D48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40D48: 24040008 addiu $a0, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24040008u, cpu->gpr[4], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC40D4C: 1044FF94 beq $v0, $a0, 0xBFC40BA0 */ - uint32_t psx_brA_BFC40D4C = cpu->gpr[2]; uint32_t psx_brB_BFC40D4C = cpu->gpr[4]; - psx_taken_BFC40D4C = (psx_brA_BFC40D4C == psx_brB_BFC40D4C); - psx_delay_BFC40D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058D50u); -#endif - if (psx_delay_BFC40D4C) { - psx_delay_BFC40D4C = 0; - if (psx_taken_BFC40D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BA0u); - goto label_BFC40BA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D54u); - } -label_BFC40D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D54: 10000005 beq $zero, $zero, 0xBFC40D6C */ - uint32_t psx_brA_BFC40D54 = cpu->gpr[0]; uint32_t psx_brB_BFC40D54 = cpu->gpr[0]; - psx_taken_BFC40D54 = (psx_brA_BFC40D54 == psx_brB_BFC40D54); - psx_delay_BFC40D54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40D58: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058D58u); -#endif - if (psx_delay_BFC40D54) { - psx_delay_BFC40D54 = 0; - if (psx_taken_BFC40D54) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D6Cu); - goto label_BFC40D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D5Cu); - } -label_BFC40D5C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D5Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D5C: 24010015 addiu $at, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24010015u, cpu->gpr[1], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D5Cu); -#endif -label_BFC40D60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D60: 1041FF8F beq $v0, $at, 0xBFC40BA0 */ - uint32_t psx_brA_BFC40D60 = cpu->gpr[2]; uint32_t psx_brB_BFC40D60 = cpu->gpr[1]; - psx_taken_BFC40D60 = (psx_brA_BFC40D60 == psx_brB_BFC40D60); - psx_delay_BFC40D60 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D64: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058D64u); -#endif - if (psx_delay_BFC40D60) { - psx_delay_BFC40D60 = 0; - if (psx_taken_BFC40D60) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058BA0u); - goto label_BFC40BA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D68u); - } -label_BFC40D68: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D68u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40D68: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058D68u); -#endif -label_BFC40D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40D6C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40D70: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D74: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058D74u); return; } g_debug_last_store_pc = 0x80058D74u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058D74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40D78: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40D7C: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058D84u; /* jal link before delay slot */ - psx_delay_BFC40D7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40D80: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80058D80u); -#endif - if (psx_delay_BFC40D7C) { - psx_delay_BFC40D7C = 0; - cpu->gpr[31] = 0x80058D84u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40D84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D84: 10000015 beq $zero, $zero, 0xBFC40DDC */ - uint32_t psx_brA_BFC40D84 = cpu->gpr[0]; uint32_t psx_brB_BFC40D84 = cpu->gpr[0]; - psx_taken_BFC40D84 = (psx_brA_BFC40D84 == psx_brB_BFC40D84); - psx_delay_BFC40D84 = 1; - /* 0xBFC40D88: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058D88u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058D88u); -#endif - if (psx_delay_BFC40D84) { - psx_delay_BFC40D84 = 0; - if (psx_taken_BFC40D84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DDCu); - goto label_BFC40DDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D8Cu); - } -label_BFC40D8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40D8C: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80058D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40D90: 1041FFB7 beq $v0, $at, 0xBFC40C70 */ - uint32_t psx_brA_BFC40D90 = cpu->gpr[2]; uint32_t psx_brB_BFC40D90 = cpu->gpr[1]; - psx_taken_BFC40D90 = (psx_brA_BFC40D90 == psx_brB_BFC40D90); - psx_delay_BFC40D90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058D94u); -#endif - if (psx_delay_BFC40D90) { - psx_delay_BFC40D90 = 0; - if (psx_taken_BFC40D90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C70u); - goto label_BFC40C70; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D98u); - } -label_BFC40D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40D98: 1000FFF4 beq $zero, $zero, 0xBFC40D6C */ - uint32_t psx_brA_BFC40D98 = cpu->gpr[0]; uint32_t psx_brB_BFC40D98 = cpu->gpr[0]; - psx_taken_BFC40D98 = (psx_brA_BFC40D98 == psx_brB_BFC40D98); - psx_delay_BFC40D98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40D9C: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058D9Cu); -#endif - if (psx_delay_BFC40D98) { - psx_delay_BFC40D98 = 0; - if (psx_taken_BFC40D98) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D6Cu); - goto label_BFC40D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DA0u); - } -label_BFC40DA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40DA0: 24010FFF addiu $at, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x24010FFFu, cpu->gpr[1], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40DA4: 1041FF97 beq $v0, $at, 0xBFC40C04 */ - uint32_t psx_brA_BFC40DA4 = cpu->gpr[2]; uint32_t psx_brB_BFC40DA4 = cpu->gpr[1]; - psx_taken_BFC40DA4 = (psx_brA_BFC40DA4 == psx_brB_BFC40DA4); - psx_delay_BFC40DA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40DA8: 28411000 slti $at, $v0, 4096 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[2] < (4096) ? 1 : 0); - PGXP_ALU(0x28411000u, cpu->gpr[1], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80058DA8u); -#endif - if (psx_delay_BFC40DA4) { - psx_delay_BFC40DA4 = 0; - if (psx_taken_BFC40DA4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C04u); - goto label_BFC40C04; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DACu); - } -label_BFC40DAC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40DAC: 10200005 beq $at, $zero, 0xBFC40DC4 */ - uint32_t psx_brA_BFC40DAC = cpu->gpr[1]; uint32_t psx_brB_BFC40DAC = cpu->gpr[0]; - psx_taken_BFC40DAC = (psx_brA_BFC40DAC == psx_brB_BFC40DAC); - psx_delay_BFC40DAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40DB0: 24010DDD addiu $at, $zero, 3549 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); - PGXP_ALU(0x24010DDDu, cpu->gpr[1], _pgx1, 0x00000DDDu); } -#ifdef PSX_COSIM - cosim_instr(0x80058DB0u); -#endif - if (psx_delay_BFC40DAC) { - psx_delay_BFC40DAC = 0; - if (psx_taken_BFC40DAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DC4u); - goto label_BFC40DC4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DB4u); - } -label_BFC40DB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40DB4: 1041FF9C beq $v0, $at, 0xBFC40C28 */ - uint32_t psx_brA_BFC40DB4 = cpu->gpr[2]; uint32_t psx_brB_BFC40DB4 = cpu->gpr[1]; - psx_taken_BFC40DB4 = (psx_brA_BFC40DB4 == psx_brB_BFC40DB4); - psx_delay_BFC40DB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40DB8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058DB8u); -#endif - if (psx_delay_BFC40DB4) { - psx_delay_BFC40DB4 = 0; - if (psx_taken_BFC40DB4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058C28u); - goto label_BFC40C28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DBCu); - } -label_BFC40DBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40DBC: 1000FFEB beq $zero, $zero, 0xBFC40D6C */ - uint32_t psx_brA_BFC40DBC = cpu->gpr[0]; uint32_t psx_brB_BFC40DBC = cpu->gpr[0]; - psx_taken_BFC40DBC = (psx_brA_BFC40DBC == psx_brB_BFC40DBC); - psx_delay_BFC40DBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40DC0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058DC0u); -#endif - if (psx_delay_BFC40DBC) { - psx_delay_BFC40DBC = 0; - if (psx_taken_BFC40DBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D6Cu); - goto label_BFC40D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DC4u); - } -label_BFC40DC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40DC4: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058DC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40DC8: 1041FFCD beq $v0, $at, 0xBFC40D00 */ - uint32_t psx_brA_BFC40DC8 = cpu->gpr[2]; uint32_t psx_brB_BFC40DC8 = cpu->gpr[1]; - psx_taken_BFC40DC8 = (psx_brA_BFC40DC8 == psx_brB_BFC40DC8); - psx_delay_BFC40DC8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40DCC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058DCCu); -#endif - if (psx_delay_BFC40DC8) { - psx_delay_BFC40DC8 = 0; - if (psx_taken_BFC40DC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D00u); - goto label_BFC40D00; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DD0u); - } -label_BFC40DD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40DD0: 1000FFE6 beq $zero, $zero, 0xBFC40D6C */ - uint32_t psx_brA_BFC40DD0 = cpu->gpr[0]; uint32_t psx_brB_BFC40DD0 = cpu->gpr[0]; - psx_taken_BFC40DD0 = (psx_brA_BFC40DD0 == psx_brB_BFC40DD0); - psx_delay_BFC40DD0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40DD4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058DD4u); -#endif - if (psx_delay_BFC40DD0) { - psx_delay_BFC40DD0 = 0; - if (psx_taken_BFC40DD0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058D6Cu); - goto label_BFC40D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058DD8u); - } -label_BFC40DD8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DD8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DD8u); -#endif - /* 0xBFC40DD8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058DD8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058DD8u); -#endif -label_BFC40DDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40DDC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80058DDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40DE0: 03E00008 jr $ra */ - psx_delay_BFC40DE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40DE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058DE4u); -#endif - if (psx_delay_BFC40DE0) { - psx_delay_BFC40DE0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40DE8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40DE8u); - int psx_delay_BFC40E1C = 0; - int psx_taken_BFC40E1C = 0; - int psx_delay_BFC40E58 = 0; - int psx_taken_BFC40E58 = 0; - int psx_delay_BFC40E90 = 0; - int psx_taken_BFC40E90 = 0; - int psx_delay_BFC40EB8 = 0; - int psx_delay_BFC40EC0 = 0; - int psx_taken_BFC40EC0 = 0; - int psx_delay_BFC40ECC = 0; - int psx_taken_BFC40ECC = 0; - int psx_delay_BFC40EE8 = 0; - int psx_taken_BFC40EE8 = 0; - int psx_delay_BFC40F1C = 0; - int psx_delay_BFC40F2C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40E24u: goto label_BFC40E24; - case 0xBFC40E60u: goto label_BFC40E60; - case 0xBFC40E98u: goto label_BFC40E98; - case 0xBFC40E9Cu: goto label_BFC40E9C; - case 0xBFC40EC0u: goto label_BFC40EC0; - case 0xBFC40EC8u: goto label_BFC40EC8; - case 0xBFC40ECCu: goto label_BFC40ECC; - case 0xBFC40ED4u: goto label_BFC40ED4; - case 0xBFC40EF0u: goto label_BFC40EF0; - case 0xBFC40F24u: goto label_BFC40F24; - case 0xBFC40F28u: goto label_BFC40F28; - default: break; - } - } -label_BFC40DE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40DE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40DE8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058DE8u); -#endif - /* 0xBFC40DEC: 8C639C2C lw $v1, -25556($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058DECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C2Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058DECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40DF0: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40DF4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058DF4u); return; } g_debug_last_store_pc = 0x80058DF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058DF4u); -#endif - /* 0xBFC40DF8: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058DF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40DFC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC40E00: A02EEEA0 sb $t6, -4448($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4448; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058E00u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4448)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EEEA0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E00u); -#endif - /* 0xBFC40E04: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40E08: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40E0C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E10u); -#endif - /* 0xBFC40E10: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E10u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC40E14: A02FEEA1 sb $t7, -4447($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4447; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058E14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4447)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEEA1u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40E18: 2401001A addiu $at, $zero, 26 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); - PGXP_ALU(0x2401001Au, cpu->gpr[1], _pgx1, 0x0000001Au); } -#ifdef PSX_COSIM - cosim_instr(0x80058E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40E1C: 1441002B bne $v0, $at, 0xBFC40ECC */ - uint32_t psx_brA_BFC40E1C = cpu->gpr[2]; uint32_t psx_brB_BFC40E1C = cpu->gpr[1]; - psx_taken_BFC40E1C = (psx_brA_BFC40E1C != psx_brB_BFC40E1C); - psx_delay_BFC40E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40E20: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80058E20u); -#endif - if (psx_delay_BFC40E1C) { - psx_delay_BFC40E1C = 0; - if (psx_taken_BFC40E1C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058ECCu); - goto label_BFC40ECC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058E24u); - } -label_BFC40E24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40E24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40E24: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC40E28: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E28u); -#endif - /* 0xBFC40E2C: 8C42EE9C lw $v0, -4452($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4452; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E2Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE9Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E30u); -#endif - /* 0xBFC40E30: 9318EEA0 lbu $t8, -4448($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -4448; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (-4448)), 24, 0x1000000u); - PGXP_LOAD(0x9318EEA0u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC40E34: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC40E38: A0580000 sb $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058E38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E38u); -#endif - /* 0xBFC40E3C: 9339EEA1 lbu $t9, -4447($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4447; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (-4447)), 25, 0x2000000u); - PGXP_LOAD(0x9339EEA1u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC40E40: 24080002 addiu $t0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24080002u, cpu->gpr[8], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80058E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC40E44: A0590001 sb $t9, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058E44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0590001u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000100u); -#endif - /* 0xBFC40E48: AFA80018 sw $t0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E48u); return; } g_debug_last_store_pc = 0x80058E48u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAFA80018u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E48u); -#endif - /* 0xBFC40E4C: 8FA90018 lw $t1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E4Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90018u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40E50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC40E54: 29210004 slti $at, $t1, 4 */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[9] < (4) ? 1 : 0); - PGXP_ALU(0x29210004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40E58: 10200010 beq $at, $zero, 0xBFC40E9C */ - uint32_t psx_brA_BFC40E58 = cpu->gpr[1]; uint32_t psx_brB_BFC40E58 = cpu->gpr[0]; - psx_taken_BFC40E58 = (psx_brA_BFC40E58 == psx_brB_BFC40E58); - psx_delay_BFC40E58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40E5C: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058E5Cu); -#endif - if (psx_delay_BFC40E58) { - psx_delay_BFC40E58 = 0; - if (psx_taken_BFC40E58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058E9Cu); - goto label_BFC40E9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058E60u); - } -label_BFC40E60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40E60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E60u); -#endif - /* 0xBFC40E60: 906A0000 lbu $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 10, 0x8u); - PGXP_LOAD(0x906A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E60u); -#endif - /* 0xBFC40E64: 8FAB0018 lw $t3, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E64u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x20000000u); } - PGXP_LOAD(0x8FAB0018u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40E68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058E68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1804u); -#endif - /* 0xBFC40E6C: 004B6021 addu $t4, $v0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[2] + cpu->gpr[11]; - PGXP_ALU(0x004B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80058E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1400u); -#endif - /* 0xBFC40E70: A18A0000 sb $t2, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058E70u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA18A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E70u); -#endif - /* 0xBFC40E74: 8FAD0018 lw $t5, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E74u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x20000000u); } - PGXP_LOAD(0x8FAD0018u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40E78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC40E7C: 25AE0001 addiu $t6, $t5, 1 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); - PGXP_ALU(0x25AE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80058E7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC40E80: AFAE0018 sw $t6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E80u); return; } g_debug_last_store_pc = 0x80058E80u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE0018u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E80u); -#endif - /* 0xBFC40E84: 8FAF0018 lw $t7, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058E84u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x20000000u); } - PGXP_LOAD(0x8FAF0018u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80058E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40E88: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058E88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC40E8C: 29E10004 slti $at, $t7, 4 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (4) ? 1 : 0); - PGXP_ALU(0x29E10004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40E90: 1420FFF3 bne $at, $zero, 0xBFC40E60 */ - uint32_t psx_brA_BFC40E90 = cpu->gpr[1]; uint32_t psx_brB_BFC40E90 = cpu->gpr[0]; - psx_taken_BFC40E90 = (psx_brA_BFC40E90 != psx_brB_BFC40E90); - psx_delay_BFC40E90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40E94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058E94u); -#endif - if (psx_delay_BFC40E90) { - psx_delay_BFC40E90 = 0; - if (psx_taken_BFC40E90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058E60u); - goto label_BFC40E60; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058E98u); - } -label_BFC40E98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40E98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC40E98: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058E98u); -#endif -label_BFC40E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40E9C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC40EA0: AC38EE58 sw $t8, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EA0u); return; } g_debug_last_store_pc = 0x80058EA0u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40EA4: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058EA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40EA8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40EAC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058EACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40EB0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40EB4: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EB4u); return; } g_debug_last_store_pc = 0x80058EB4u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40EB8: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058EC0u; /* jal link before delay slot */ - psx_delay_BFC40EB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40EBC: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80058EBCu); -#endif - if (psx_delay_BFC40EB8) { - psx_delay_BFC40EB8 = 0; - cpu->gpr[31] = 0x80058EC0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40EC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40EC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40EC0: 10000019 beq $zero, $zero, 0xBFC40F28 */ - uint32_t psx_brA_BFC40EC0 = cpu->gpr[0]; uint32_t psx_brB_BFC40EC0 = cpu->gpr[0]; - psx_taken_BFC40EC0 = (psx_brA_BFC40EC0 == psx_brB_BFC40EC0); - psx_delay_BFC40EC0 = 1; - /* 0xBFC40EC4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EC4u); -#endif - if (psx_delay_BFC40EC0) { - psx_delay_BFC40EC0 = 0; - if (psx_taken_BFC40EC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F28u); - goto label_BFC40F28; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058EC8u); - } -label_BFC40EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40EC8: 24010CCC addiu $at, $zero, 3276 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); - PGXP_ALU(0x24010CCCu, cpu->gpr[1], _pgx1, 0x00000CCCu); } -#ifdef PSX_COSIM - cosim_instr(0x80058EC8u); -#endif -label_BFC40ECC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40ECCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40ECC: 14410008 bne $v0, $at, 0xBFC40EF0 */ - uint32_t psx_brA_BFC40ECC = cpu->gpr[2]; uint32_t psx_brB_BFC40ECC = cpu->gpr[1]; - psx_taken_BFC40ECC = (psx_brA_BFC40ECC != psx_brB_BFC40ECC); - psx_delay_BFC40ECC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40ED0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058ED0u); -#endif - if (psx_delay_BFC40ECC) { - psx_delay_BFC40ECC = 0; - if (psx_taken_BFC40ECC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058EF0u); - goto label_BFC40EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058ED4u); - } -label_BFC40ED4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40ED4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC40ED4: 24190002 addiu $t9, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24190002u, cpu->gpr[25], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80058ED4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40ED8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC40EDC: AC39EEA8 sw $t9, -4440($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EDCu); return; } g_debug_last_store_pc = 0x80058EDCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39EEA8u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC40EE0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40EE4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058EE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40EE8: 1000000E beq $zero, $zero, 0xBFC40F24 */ - uint32_t psx_brA_BFC40EE8 = cpu->gpr[0]; uint32_t psx_brB_BFC40EE8 = cpu->gpr[0]; - psx_taken_BFC40EE8 = (psx_brA_BFC40EE8 == psx_brB_BFC40EE8); - psx_delay_BFC40EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40EEC: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EECu); return; } g_debug_last_store_pc = 0x80058EECu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EECu); -#endif - if (psx_delay_BFC40EE8) { - psx_delay_BFC40EE8 = 0; - if (psx_taken_BFC40EE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F24u); - goto label_BFC40F24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058EF0u); - } -label_BFC40EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40EF0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40EF4: AC20EEAC sw $zero, -4436($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4436; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4436)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EF4u); return; } g_debug_last_store_pc = 0x80058EF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EEACu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40EF8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058EF8u); -#endif - /* 0xBFC40EFC: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058EFCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40F00: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC40F04: 3408FFFF ori $t0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3408FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC40F08: AC28EE58 sw $t0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F08u); return; } g_debug_last_store_pc = 0x80058F08u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE58u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40F0C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40F10: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40F14: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40F18: 34058000 ori $a1, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x34058000u, cpu->gpr[5], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40F1C: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80058F24u; /* jal link before delay slot */ - psx_delay_BFC40F1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40F20: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F20u); return; } g_debug_last_store_pc = 0x80058F20u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F20u); -#endif - if (psx_delay_BFC40F1C) { - psx_delay_BFC40F1C = 0; - cpu->gpr[31] = 0x80058F24u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC40F24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F24u); -#endif - /* 0xBFC40F24: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F24u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F24u); -#endif -label_BFC40F28: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F28u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40F28: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC40F2C: 03E00008 jr $ra */ - psx_delay_BFC40F2C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F30: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F30u); -#endif - if (psx_delay_BFC40F2C) { - psx_delay_BFC40F2C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC40F34(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC40F34u); - int psx_delay_BFC40F58 = 0; - int psx_taken_BFC40F58 = 0; - int psx_delay_BFC40F64 = 0; - int psx_taken_BFC40F64 = 0; - int psx_delay_BFC40F78 = 0; - int psx_taken_BFC40F78 = 0; - int psx_delay_BFC40F80 = 0; - int psx_taken_BFC40F80 = 0; - int psx_delay_BFC40F88 = 0; - int psx_delay_BFC40F90 = 0; - int psx_taken_BFC40F90 = 0; - int psx_delay_BFC40F9C = 0; - int psx_taken_BFC40F9C = 0; - int psx_delay_BFC40FA8 = 0; - int psx_taken_BFC40FA8 = 0; - int psx_delay_BFC40FB0 = 0; - int psx_taken_BFC40FB0 = 0; - int psx_delay_BFC40FB8 = 0; - int psx_taken_BFC40FB8 = 0; - int psx_delay_BFC40FC0 = 0; - int psx_delay_BFC40FC8 = 0; - int psx_taken_BFC40FC8 = 0; - int psx_delay_BFC40FD4 = 0; - int psx_taken_BFC40FD4 = 0; - int psx_delay_BFC40FDC = 0; - int psx_taken_BFC40FDC = 0; - int psx_delay_BFC40FE4 = 0; - int psx_taken_BFC40FE4 = 0; - int psx_delay_BFC40FEC = 0; - int psx_taken_BFC40FEC = 0; - int psx_delay_BFC40FF4 = 0; - int psx_taken_BFC40FF4 = 0; - int psx_delay_BFC40FFC = 0; - int psx_delay_BFC41004 = 0; - int psx_taken_BFC41004 = 0; - int psx_delay_BFC41014 = 0; - int psx_delay_BFC41024 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC40F60u: goto label_BFC40F60; - case 0xBFC40F6Cu: goto label_BFC40F6C; - case 0xBFC40F80u: goto label_BFC40F80; - case 0xBFC40F88u: goto label_BFC40F88; - case 0xBFC40F90u: goto label_BFC40F90; - case 0xBFC40F98u: goto label_BFC40F98; - case 0xBFC40FA4u: goto label_BFC40FA4; - case 0xBFC40FB0u: goto label_BFC40FB0; - case 0xBFC40FB8u: goto label_BFC40FB8; - case 0xBFC40FC0u: goto label_BFC40FC0; - case 0xBFC40FC8u: goto label_BFC40FC8; - case 0xBFC40FD0u: goto label_BFC40FD0; - case 0xBFC40FD4u: goto label_BFC40FD4; - case 0xBFC40FDCu: goto label_BFC40FDC; - case 0xBFC40FE4u: goto label_BFC40FE4; - case 0xBFC40FECu: goto label_BFC40FEC; - case 0xBFC40FF4u: goto label_BFC40FF4; - case 0xBFC40FFCu: goto label_BFC40FFC; - case 0xBFC41004u: goto label_BFC41004; - case 0xBFC4100Cu: goto label_BFC4100C; - case 0xBFC41010u: goto label_BFC41010; - case 0xBFC4101Cu: goto label_BFC4101C; - case 0xBFC41020u: goto label_BFC41020; - default: break; - } - } -label_BFC40F34: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F34u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC40F34: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F34u); -#endif - /* 0xBFC40F38: 8DCE9C2C lw $t6, -25556($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F38u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C2Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC40F3C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC40F40: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F40u); return; } g_debug_last_store_pc = 0x80058F40u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC40F44: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F44u); -#endif - /* 0xBFC40F48: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F48u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F48u); -#endif - /* 0xBFC40F4C: 91C60000 lbu $a2, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 6, 0x4000u); - PGXP_LOAD(0x91C60000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40F50: 240400F6 addiu $a0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240400F6u, cpu->gpr[4], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC40F54: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC40F58: 1044000B beq $v0, $a0, 0xBFC40F88 */ - uint32_t psx_brA_BFC40F58 = cpu->gpr[2]; uint32_t psx_brB_BFC40F58 = cpu->gpr[4]; - psx_taken_BFC40F58 = (psx_brA_BFC40F58 == psx_brB_BFC40F58); - psx_delay_BFC40F58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC40F5C: A026EEC0 sb $a2, -4416($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4416; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80058F5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4416)), (uint8_t)(cpu->gpr[6] & 0xFFu)); - PGXP_STORE(0xA026EEC0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F5Cu); -#endif - if (psx_delay_BFC40F58) { - psx_delay_BFC40F58 = 0; - if (psx_taken_BFC40F58) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F88u); - goto label_BFC40F88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F60u); - } -label_BFC40F60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40F60: 240500FB addiu $a1, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240500FBu, cpu->gpr[5], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC40F64: 10450008 beq $v0, $a1, 0xBFC40F88 */ - uint32_t psx_brA_BFC40F64 = cpu->gpr[2]; uint32_t psx_brB_BFC40F64 = cpu->gpr[5]; - psx_taken_BFC40F64 = (psx_brA_BFC40F64 == psx_brB_BFC40F64); - psx_delay_BFC40F64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F68u); -#endif - if (psx_delay_BFC40F64) { - psx_delay_BFC40F64 = 0; - if (psx_taken_BFC40F64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F88u); - goto label_BFC40F88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F6Cu); - } -label_BFC40F6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC40F6C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F70u); -#endif - /* 0xBFC40F70: 8C63EE58 lw $v1, -4520($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F70u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE58u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F74: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC40F78: 10640003 beq $v1, $a0, 0xBFC40F88 */ - uint32_t psx_brA_BFC40F78 = cpu->gpr[3]; uint32_t psx_brB_BFC40F78 = cpu->gpr[4]; - psx_taken_BFC40F78 = (psx_brA_BFC40F78 == psx_brB_BFC40F78); - psx_delay_BFC40F78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F7C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F7Cu); -#endif - if (psx_delay_BFC40F78) { - psx_delay_BFC40F78 = 0; - if (psx_taken_BFC40F78) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F88u); - goto label_BFC40F88; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F80u); - } -label_BFC40F80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC40F80: 14650005 bne $v1, $a1, 0xBFC40F98 */ - uint32_t psx_brA_BFC40F80 = cpu->gpr[3]; uint32_t psx_brB_BFC40F80 = cpu->gpr[5]; - psx_taken_BFC40F80 = (psx_brA_BFC40F80 != psx_brB_BFC40F80); - psx_delay_BFC40F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F84: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F84u); -#endif - if (psx_delay_BFC40F80) { - psx_delay_BFC40F80 = 0; - if (psx_taken_BFC40F80) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F98u); - goto label_BFC40F98; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F88u); - } -label_BFC40F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40F88: 0C016548 jal 0xB0059520 */ - cpu->gpr[31] = 0x80058F90u; /* jal link before delay slot */ - psx_delay_BFC40F88 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F8C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058F8Cu); -#endif - if (psx_delay_BFC40F88) { - psx_delay_BFC40F88 = 0; - cpu->gpr[31] = 0x80058F90u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059520u); - cpu->pc = 0x80059520u; return; - } -label_BFC40F90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40F90: 10000023 beq $zero, $zero, 0xBFC41020 */ - uint32_t psx_brA_BFC40F90 = cpu->gpr[0]; uint32_t psx_brB_BFC40F90 = cpu->gpr[0]; - psx_taken_BFC40F90 = (psx_brA_BFC40F90 == psx_brB_BFC40F90); - psx_delay_BFC40F90 = 1; - /* 0xBFC40F94: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058F94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058F94u); -#endif - if (psx_delay_BFC40F90) { - psx_delay_BFC40F90 = 0; - if (psx_taken_BFC40F90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059020u); - goto label_BFC41020; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058F98u); - } -label_BFC40F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC40F98: 240400E6 addiu $a0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240400E6u, cpu->gpr[4], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80058F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC40F9C: 10440008 beq $v0, $a0, 0xBFC40FC0 */ - uint32_t psx_brA_BFC40F9C = cpu->gpr[2]; uint32_t psx_brB_BFC40F9C = cpu->gpr[4]; - psx_taken_BFC40F9C = (psx_brA_BFC40F9C == psx_brB_BFC40F9C); - psx_delay_BFC40F9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40FA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058FA0u); -#endif - if (psx_delay_BFC40F9C) { - psx_delay_BFC40F9C = 0; - if (psx_taken_BFC40F9C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FC0u); - goto label_BFC40FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FA4u); - } -label_BFC40FA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC40FA4: 240500EB addiu $a1, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240500EBu, cpu->gpr[5], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x80058FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC40FA8: 10450005 beq $v0, $a1, 0xBFC40FC0 */ - uint32_t psx_brA_BFC40FA8 = cpu->gpr[2]; uint32_t psx_brB_BFC40FA8 = cpu->gpr[5]; - psx_taken_BFC40FA8 = (psx_brA_BFC40FA8 == psx_brB_BFC40FA8); - psx_delay_BFC40FA8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40FAC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058FACu); -#endif - if (psx_delay_BFC40FA8) { - psx_delay_BFC40FA8 = 0; - if (psx_taken_BFC40FA8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FC0u); - goto label_BFC40FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FB0u); - } -label_BFC40FB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC40FB0: 10640003 beq $v1, $a0, 0xBFC40FC0 */ - uint32_t psx_brA_BFC40FB0 = cpu->gpr[3]; uint32_t psx_brB_BFC40FB0 = cpu->gpr[4]; - psx_taken_BFC40FB0 = (psx_brA_BFC40FB0 == psx_brB_BFC40FB0); - psx_delay_BFC40FB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40FB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058FB4u); -#endif - if (psx_delay_BFC40FB0) { - psx_delay_BFC40FB0 = 0; - if (psx_taken_BFC40FB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FC0u); - goto label_BFC40FC0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FB8u); - } -label_BFC40FB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC40FB8: 14650006 bne $v1, $a1, 0xBFC40FD4 */ - uint32_t psx_brA_BFC40FB8 = cpu->gpr[3]; uint32_t psx_brB_BFC40FB8 = cpu->gpr[5]; - psx_taken_BFC40FB8 = (psx_brA_BFC40FB8 != psx_brB_BFC40FB8); - psx_delay_BFC40FB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FBC: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058FBCu); -#endif - if (psx_delay_BFC40FB8) { - psx_delay_BFC40FB8 = 0; - if (psx_taken_BFC40FB8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FD4u); - goto label_BFC40FD4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FC0u); - } -label_BFC40FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40FC0: 0C016592 jal 0xB0059648 */ - cpu->gpr[31] = 0x80058FC8u; /* jal link before delay slot */ - psx_delay_BFC40FC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40FC4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80058FC4u); -#endif - if (psx_delay_BFC40FC0) { - psx_delay_BFC40FC0 = 0; - cpu->gpr[31] = 0x80058FC8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059648u); - cpu->pc = 0x80059648u; return; - } -label_BFC40FC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC40FC8: 10000015 beq $zero, $zero, 0xBFC41020 */ - uint32_t psx_brA_BFC40FC8 = cpu->gpr[0]; uint32_t psx_brB_BFC40FC8 = cpu->gpr[0]; - psx_taken_BFC40FC8 = (psx_brA_BFC40FC8 == psx_brB_BFC40FC8); - psx_delay_BFC40FC8 = 1; - /* 0xBFC40FCC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80058FCCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80058FCCu); -#endif - if (psx_delay_BFC40FC8) { - psx_delay_BFC40FC8 = 0; - if (psx_taken_BFC40FC8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059020u); - goto label_BFC41020; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FD0u); - } -label_BFC40FD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FD0: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80058FD0u); -#endif -label_BFC40FD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40FD4: 10410009 beq $v0, $at, 0xBFC40FFC */ - uint32_t psx_brA_BFC40FD4 = cpu->gpr[2]; uint32_t psx_brB_BFC40FD4 = cpu->gpr[1]; - psx_taken_BFC40FD4 = (psx_brA_BFC40FD4 == psx_brB_BFC40FD4); - psx_delay_BFC40FD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FD8: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80058FD8u); -#endif - if (psx_delay_BFC40FD4) { - psx_delay_BFC40FD4 = 0; - if (psx_taken_BFC40FD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FFCu); - goto label_BFC40FFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FDCu); - } -label_BFC40FDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40FDC: 10410007 beq $v0, $at, 0xBFC40FFC */ - uint32_t psx_brA_BFC40FDC = cpu->gpr[2]; uint32_t psx_brB_BFC40FDC = cpu->gpr[1]; - psx_taken_BFC40FDC = (psx_brA_BFC40FDC == psx_brB_BFC40FDC); - psx_delay_BFC40FDC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FE0: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80058FE0u); -#endif - if (psx_delay_BFC40FDC) { - psx_delay_BFC40FDC = 0; - if (psx_taken_BFC40FDC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FFCu); - goto label_BFC40FFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FE4u); - } -label_BFC40FE4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FE4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40FE4: 10410005 beq $v0, $at, 0xBFC40FFC */ - uint32_t psx_brA_BFC40FE4 = cpu->gpr[2]; uint32_t psx_brB_BFC40FE4 = cpu->gpr[1]; - psx_taken_BFC40FE4 = (psx_brA_BFC40FE4 == psx_brB_BFC40FE4); - psx_delay_BFC40FE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FE8: 24010009 addiu $at, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24010009u, cpu->gpr[1], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80058FE8u); -#endif - if (psx_delay_BFC40FE4) { - psx_delay_BFC40FE4 = 0; - if (psx_taken_BFC40FE4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FFCu); - goto label_BFC40FFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FECu); - } -label_BFC40FEC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40FEC: 10410003 beq $v0, $at, 0xBFC40FFC */ - uint32_t psx_brA_BFC40FEC = cpu->gpr[2]; uint32_t psx_brB_BFC40FEC = cpu->gpr[1]; - psx_taken_BFC40FEC = (psx_brA_BFC40FEC == psx_brB_BFC40FEC); - psx_delay_BFC40FEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC40FF0: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80058FF0u); -#endif - if (psx_delay_BFC40FEC) { - psx_delay_BFC40FEC = 0; - if (psx_taken_BFC40FEC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FFCu); - goto label_BFC40FFC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FF4u); - } -label_BFC40FF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC40FF4: 14410006 bne $v0, $at, 0xBFC41010 */ - uint32_t psx_brA_BFC40FF4 = cpu->gpr[2]; uint32_t psx_brB_BFC40FF4 = cpu->gpr[1]; - psx_taken_BFC40FF4 = (psx_brA_BFC40FF4 != psx_brB_BFC40FF4); - psx_delay_BFC40FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC40FF8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80058FF8u); -#endif - if (psx_delay_BFC40FF4) { - psx_delay_BFC40FF4 = 0; - if (psx_taken_BFC40FF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059010u); - goto label_BFC41010; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80058FFCu); - } -label_BFC40FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC40FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC40FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80058FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC40FFC: 0C01659C jal 0xB0059670 */ - cpu->gpr[31] = 0x80059004u; /* jal link before delay slot */ - psx_delay_BFC40FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x51u); -#endif - /* 0xBFC41000: 00C02021 addu $a0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C02021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059000u); -#endif - if (psx_delay_BFC40FFC) { - psx_delay_BFC40FFC = 0; - cpu->gpr[31] = 0x80059004u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059670u); - cpu->pc = 0x80059670u; return; - } -label_BFC41004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41004: 10000006 beq $zero, $zero, 0xBFC41020 */ - uint32_t psx_brA_BFC41004 = cpu->gpr[0]; uint32_t psx_brB_BFC41004 = cpu->gpr[0]; - psx_taken_BFC41004 = (psx_brA_BFC41004 == psx_brB_BFC41004); - psx_delay_BFC41004 = 1; - /* 0xBFC41008: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059008u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059008u); -#endif - if (psx_delay_BFC41004) { - psx_delay_BFC41004 = 0; - if (psx_taken_BFC41004) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059020u); - goto label_BFC41020; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005900Cu); - } -label_BFC4100C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4100Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4100Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005900Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4100C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005900Cu); -#endif -label_BFC41010: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41010u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41010: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41014: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x8005901Cu; /* jal link before delay slot */ - psx_delay_BFC41014 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41018: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x80059018u); -#endif - if (psx_delay_BFC41014) { - psx_delay_BFC41014 = 0; - cpu->gpr[31] = 0x8005901Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC4101C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4101Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4101Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005901Cu); -#endif - /* 0xBFC4101C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005901Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005901Cu); -#endif -label_BFC41020: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41020u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41020: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80059020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41024: 03E00008 jr $ra */ - psx_delay_BFC41024 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41028: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059028u); -#endif - if (psx_delay_BFC41024) { - psx_delay_BFC41024 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC4102C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4102Cu); - int psx_delay_BFC4103C = 0; - int psx_taken_BFC4103C = 0; - int psx_delay_BFC41048 = 0; - int psx_taken_BFC41048 = 0; - int psx_delay_BFC4105C = 0; - int psx_taken_BFC4105C = 0; - int psx_delay_BFC41064 = 0; - int psx_taken_BFC41064 = 0; - int psx_delay_BFC41078 = 0; - int psx_taken_BFC41078 = 0; - int psx_delay_BFC41088 = 0; - int psx_delay_BFC4109C = 0; - int psx_taken_BFC4109C = 0; - int psx_delay_BFC410A4 = 0; - int psx_taken_BFC410A4 = 0; - int psx_delay_BFC410AC = 0; - int psx_taken_BFC410AC = 0; - int psx_delay_BFC410C4 = 0; - int psx_taken_BFC410C4 = 0; - int psx_delay_BFC410CC = 0; - int psx_taken_BFC410CC = 0; - int psx_delay_BFC410D8 = 0; - int psx_taken_BFC410D8 = 0; - int psx_delay_BFC410E0 = 0; - int psx_taken_BFC410E0 = 0; - int psx_delay_BFC410F4 = 0; - int psx_taken_BFC410F4 = 0; - int psx_delay_BFC410FC = 0; - int psx_taken_BFC410FC = 0; - int psx_delay_BFC41110 = 0; - int psx_taken_BFC41110 = 0; - int psx_delay_BFC41124 = 0; - int psx_delay_BFC41138 = 0; - int psx_taken_BFC41138 = 0; - int psx_delay_BFC41140 = 0; - int psx_taken_BFC41140 = 0; - int psx_delay_BFC41148 = 0; - int psx_taken_BFC41148 = 0; - int psx_delay_BFC41160 = 0; - int psx_taken_BFC41160 = 0; - int psx_delay_BFC41168 = 0; - int psx_taken_BFC41168 = 0; - int psx_delay_BFC41174 = 0; - int psx_taken_BFC41174 = 0; - int psx_delay_BFC4117C = 0; - int psx_taken_BFC4117C = 0; - int psx_delay_BFC41188 = 0; - int psx_taken_BFC41188 = 0; - int psx_delay_BFC4119C = 0; - int psx_delay_BFC411AC = 0; - int psx_taken_BFC411AC = 0; - int psx_delay_BFC411C0 = 0; - int psx_taken_BFC411C0 = 0; - int psx_delay_BFC411D0 = 0; - int psx_delay_BFC411D8 = 0; - int psx_taken_BFC411D8 = 0; - int psx_delay_BFC411E8 = 0; - int psx_delay_BFC411F8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41044u: goto label_BFC41044; - case 0xBFC41050u: goto label_BFC41050; - case 0xBFC41064u: goto label_BFC41064; - case 0xBFC4106Cu: goto label_BFC4106C; - case 0xBFC41080u: goto label_BFC41080; - case 0xBFC41090u: goto label_BFC41090; - case 0xBFC4109Cu: goto label_BFC4109C; - case 0xBFC410A4u: goto label_BFC410A4; - case 0xBFC410ACu: goto label_BFC410AC; - case 0xBFC410B4u: goto label_BFC410B4; - case 0xBFC410B8u: goto label_BFC410B8; - case 0xBFC410C0u: goto label_BFC410C0; - case 0xBFC410CCu: goto label_BFC410CC; - case 0xBFC410D4u: goto label_BFC410D4; - case 0xBFC410E0u: goto label_BFC410E0; - case 0xBFC410E8u: goto label_BFC410E8; - case 0xBFC410FCu: goto label_BFC410FC; - case 0xBFC41104u: goto label_BFC41104; - case 0xBFC41118u: goto label_BFC41118; - case 0xBFC4111Cu: goto label_BFC4111C; - case 0xBFC4112Cu: goto label_BFC4112C; - case 0xBFC41140u: goto label_BFC41140; - case 0xBFC41148u: goto label_BFC41148; - case 0xBFC41150u: goto label_BFC41150; - case 0xBFC41154u: goto label_BFC41154; - case 0xBFC4115Cu: goto label_BFC4115C; - case 0xBFC41168u: goto label_BFC41168; - case 0xBFC41170u: goto label_BFC41170; - case 0xBFC4117Cu: goto label_BFC4117C; - case 0xBFC41184u: goto label_BFC41184; - case 0xBFC41190u: goto label_BFC41190; - case 0xBFC41194u: goto label_BFC41194; - case 0xBFC411A4u: goto label_BFC411A4; - case 0xBFC411B4u: goto label_BFC411B4; - case 0xBFC411C8u: goto label_BFC411C8; - case 0xBFC411D8u: goto label_BFC411D8; - case 0xBFC411E0u: goto label_BFC411E0; - case 0xBFC411E4u: goto label_BFC411E4; - case 0xBFC411F0u: goto label_BFC411F0; - case 0xBFC411F4u: goto label_BFC411F4; - default: break; - } - } -label_BFC4102C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4102Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4102Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005902Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4102C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005902Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059030u); -#endif - /* 0xBFC41030: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059030u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41034: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059034u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41038: 240200F6 addiu $v0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240200F6u, cpu->gpr[2], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0x80059038u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC4103C: 1062000B beq $v1, $v0, 0xBFC4106C */ - uint32_t psx_brA_BFC4103C = cpu->gpr[3]; uint32_t psx_brB_BFC4103C = cpu->gpr[2]; - psx_taken_BFC4103C = (psx_brA_BFC4103C == psx_brB_BFC4103C); - psx_delay_BFC4103C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41040: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059040u); return; } g_debug_last_store_pc = 0x80059040u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059040u); -#endif - if (psx_delay_BFC4103C) { - psx_delay_BFC4103C = 0; - if (psx_taken_BFC4103C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005906Cu); - goto label_BFC4106C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059044u); - } -label_BFC41044: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41044u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41044: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x80059044u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41048: 10610008 beq $v1, $at, 0xBFC4106C */ - uint32_t psx_brA_BFC41048 = cpu->gpr[3]; uint32_t psx_brB_BFC41048 = cpu->gpr[1]; - psx_taken_BFC41048 = (psx_brA_BFC41048 == psx_brB_BFC41048); - psx_delay_BFC41048 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4104C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005904Cu); -#endif - if (psx_delay_BFC41048) { - psx_delay_BFC41048 = 0; - if (psx_taken_BFC41048) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005906Cu); - goto label_BFC4106C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059050u); - } -label_BFC41050: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41050u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41050: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059050u); -#endif - /* 0xBFC41054: 8DCEEE58 lw $t6, -4520($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059054u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059054u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41058: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059058u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC4105C: 11C20003 beq $t6, $v0, 0xBFC4106C */ - uint32_t psx_brA_BFC4105C = cpu->gpr[14]; uint32_t psx_brB_BFC4105C = cpu->gpr[2]; - psx_taken_BFC4105C = (psx_brA_BFC4105C == psx_brB_BFC4105C); - psx_delay_BFC4105C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41060: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x80059060u); -#endif - if (psx_delay_BFC4105C) { - psx_delay_BFC4105C = 0; - if (psx_taken_BFC4105C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005906Cu); - goto label_BFC4106C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059064u); - } -label_BFC41064: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41064u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41064: 15C10016 bne $t6, $at, 0xBFC410C0 */ - uint32_t psx_brA_BFC41064 = cpu->gpr[14]; uint32_t psx_brB_BFC41064 = cpu->gpr[1]; - psx_taken_BFC41064 = (psx_brA_BFC41064 != psx_brB_BFC41064); - psx_delay_BFC41064 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41068: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059068u); -#endif - if (psx_delay_BFC41064) { - psx_delay_BFC41064 = 0; - if (psx_taken_BFC41064) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590C0u); - goto label_BFC410C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005906Cu); - } -label_BFC4106C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4106Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4106Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC4106C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005906Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059070u); -#endif - /* 0xBFC41070: 8DEFEE78 lw $t7, -4488($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059070u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFEE78u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41078: 05E00008 bltz $t7, 0xBFC4109C */ - uint32_t psx_brA_BFC41078 = cpu->gpr[15]; - psx_taken_BFC41078 = ((int32_t)psx_brA_BFC41078 < 0); - psx_delay_BFC41078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4107C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005907Cu); -#endif - if (psx_delay_BFC41078) { - psx_delay_BFC41078 = 0; - if (psx_taken_BFC41078) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005909Cu); - goto label_BFC4109C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059080u); - } -label_BFC41080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41080: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41084: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41088: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059090u; /* jal link before delay slot */ - psx_delay_BFC41088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC4108C: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8005908Cu); -#endif - if (psx_delay_BFC41088) { - psx_delay_BFC41088 = 0; - cpu->gpr[31] = 0x80059090u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41090: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059090u); -#endif - /* 0xBFC41094: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059094u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41098: 240200F6 addiu $v0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240200F6u, cpu->gpr[2], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0x80059098u); -#endif -label_BFC4109C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4109Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4109Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005909Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC4109C: 10620003 beq $v1, $v0, 0xBFC410AC */ - uint32_t psx_brA_BFC4109C = cpu->gpr[3]; uint32_t psx_brB_BFC4109C = cpu->gpr[2]; - psx_taken_BFC4109C = (psx_brA_BFC4109C == psx_brB_BFC4109C); - psx_delay_BFC4109C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC410A0: 240100FB addiu $at, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240100FBu, cpu->gpr[1], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x800590A0u); -#endif - if (psx_delay_BFC4109C) { - psx_delay_BFC4109C = 0; - if (psx_taken_BFC4109C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590ACu); - goto label_BFC410AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590A4u); - } -label_BFC410A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC410A4: 14610004 bne $v1, $at, 0xBFC410B8 */ - uint32_t psx_brA_BFC410A4 = cpu->gpr[3]; uint32_t psx_brB_BFC410A4 = cpu->gpr[1]; - psx_taken_BFC410A4 = (psx_brA_BFC410A4 != psx_brB_BFC410A4); - psx_delay_BFC410A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC410A8: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800590A8u); -#endif - if (psx_delay_BFC410A4) { - psx_delay_BFC410A4 = 0; - if (psx_taken_BFC410A4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590B8u); - goto label_BFC410B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590ACu); - } -label_BFC410AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC410AC: 10000004 beq $zero, $zero, 0xBFC410C0 */ - uint32_t psx_brA_BFC410AC = cpu->gpr[0]; uint32_t psx_brB_BFC410AC = cpu->gpr[0]; - psx_taken_BFC410AC = (psx_brA_BFC410AC == psx_brB_BFC410AC); - psx_delay_BFC410AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC410B0: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800590B0u); -#endif - if (psx_delay_BFC410AC) { - psx_delay_BFC410AC = 0; - if (psx_taken_BFC410AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590C0u); - goto label_BFC410C0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590B4u); - } -label_BFC410B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC410B4: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800590B4u); -#endif -label_BFC410B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC410B8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800590B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC410BC: AC38EE58 sw $t8, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800590BCu); return; } g_debug_last_store_pc = 0x800590BCu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE58u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800590BCu); -#endif -label_BFC410C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC410C0: 240200E6 addiu $v0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240200E6u, cpu->gpr[2], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x800590C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC410C4: 14620003 bne $v1, $v0, 0xBFC410D4 */ - uint32_t psx_brA_BFC410C4 = cpu->gpr[3]; uint32_t psx_brB_BFC410C4 = cpu->gpr[2]; - psx_taken_BFC410C4 = (psx_brA_BFC410C4 != psx_brB_BFC410C4); - psx_delay_BFC410C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC410C8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800590C8u); -#endif - if (psx_delay_BFC410C4) { - psx_delay_BFC410C4 = 0; - if (psx_taken_BFC410C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590D4u); - goto label_BFC410D4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590CCu); - } -label_BFC410CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC410CC: 10000013 beq $zero, $zero, 0xBFC4111C */ - uint32_t psx_brA_BFC410CC = cpu->gpr[0]; uint32_t psx_brB_BFC410CC = cpu->gpr[0]; - psx_taken_BFC410CC = (psx_brA_BFC410CC == psx_brB_BFC410CC); - psx_delay_BFC410CC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC410D0: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800590D0u); return; } g_debug_last_store_pc = 0x800590D0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800590D0u); -#endif - if (psx_delay_BFC410CC) { - psx_delay_BFC410CC = 0; - if (psx_taken_BFC410CC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005911Cu); - goto label_BFC4111C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590D4u); - } -label_BFC410D4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410D4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC410D4: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800590D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC410D8: 14610003 bne $v1, $at, 0xBFC410E8 */ - uint32_t psx_brA_BFC410D8 = cpu->gpr[3]; uint32_t psx_brB_BFC410D8 = cpu->gpr[1]; - psx_taken_BFC410D8 = (psx_brA_BFC410D8 != psx_brB_BFC410D8); - psx_delay_BFC410D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC410DC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800590DCu); -#endif - if (psx_delay_BFC410D8) { - psx_delay_BFC410D8 = 0; - if (psx_taken_BFC410D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590E8u); - goto label_BFC410E8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590E0u); - } -label_BFC410E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC410E0: 1000000E beq $zero, $zero, 0xBFC4111C */ - uint32_t psx_brA_BFC410E0 = cpu->gpr[0]; uint32_t psx_brB_BFC410E0 = cpu->gpr[0]; - psx_taken_BFC410E0 = (psx_brA_BFC410E0 == psx_brB_BFC410E0); - psx_delay_BFC410E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC410E4: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800590E4u); return; } g_debug_last_store_pc = 0x800590E4u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800590E4u); -#endif - if (psx_delay_BFC410E0) { - psx_delay_BFC410E0 = 0; - if (psx_taken_BFC410E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005911Cu); - goto label_BFC4111C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590E8u); - } -label_BFC410E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC410E8: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800590E8u); -#endif - /* 0xBFC410EC: 8F39EE58 lw $t9, -4520($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800590ECu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39EE58u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800590ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC410F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800590F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC410F4: 17220003 bne $t9, $v0, 0xBFC41104 */ - uint32_t psx_brA_BFC410F4 = cpu->gpr[25]; uint32_t psx_brB_BFC410F4 = cpu->gpr[2]; - psx_taken_BFC410F4 = (psx_brA_BFC410F4 != psx_brB_BFC410F4); - psx_delay_BFC410F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC410F8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800590F8u); -#endif - if (psx_delay_BFC410F4) { - psx_delay_BFC410F4 = 0; - if (psx_taken_BFC410F4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059104u); - goto label_BFC41104; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800590FCu); - } -label_BFC410FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC410FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC410FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800590FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC410FC: 10000007 beq $zero, $zero, 0xBFC4111C */ - uint32_t psx_brA_BFC410FC = cpu->gpr[0]; uint32_t psx_brB_BFC410FC = cpu->gpr[0]; - psx_taken_BFC410FC = (psx_brA_BFC410FC == psx_brB_BFC410FC); - psx_delay_BFC410FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41100: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059100u); return; } g_debug_last_store_pc = 0x80059100u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059100u); -#endif - if (psx_delay_BFC410FC) { - psx_delay_BFC410FC = 0; - if (psx_taken_BFC410FC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005911Cu); - goto label_BFC4111C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059104u); - } -label_BFC41104: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41104u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC41104: 3C08800E lui $t0, 0x800E */ - cpu->gpr[8] = 0x800E0000u; - PGXP_ALU(0x3C08800Eu, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059104u); -#endif - /* 0xBFC41108: 8D08EE58 lw $t0, -4520($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059108u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D08EE58u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059108u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4110C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x8005910Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC41110: 15010012 bne $t0, $at, 0xBFC4115C */ - uint32_t psx_brA_BFC41110 = cpu->gpr[8]; uint32_t psx_brB_BFC41110 = cpu->gpr[1]; - psx_taken_BFC41110 = (psx_brA_BFC41110 != psx_brB_BFC41110); - psx_delay_BFC41110 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41114: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059114u); -#endif - if (psx_delay_BFC41110) { - psx_delay_BFC41110 = 0; - if (psx_taken_BFC41110) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005915Cu); - goto label_BFC4115C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059118u); - } -label_BFC41118: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41118u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059118u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41118: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059118u); return; } g_debug_last_store_pc = 0x80059118u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059118u); -#endif -label_BFC4111C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4111Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4111Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4111C: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005911Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41120: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41124: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x8005912Cu; /* jal link before delay slot */ - psx_delay_BFC41124 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41128: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x80059128u); -#endif - if (psx_delay_BFC41124) { - psx_delay_BFC41124 = 0; - cpu->gpr[31] = 0x8005912Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC4112C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4112Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4112Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005912Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4112C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005912Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059130u); -#endif - /* 0xBFC41130: 8C63EE54 lw $v1, -4524($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059130u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41134: 240200E6 addiu $v0, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240200E6u, cpu->gpr[2], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x80059134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC41138: 10620003 beq $v1, $v0, 0xBFC41148 */ - uint32_t psx_brA_BFC41138 = cpu->gpr[3]; uint32_t psx_brB_BFC41138 = cpu->gpr[2]; - psx_taken_BFC41138 = (psx_brA_BFC41138 == psx_brB_BFC41138); - psx_delay_BFC41138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4113C: 240100EB addiu $at, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240100EBu, cpu->gpr[1], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x8005913Cu); -#endif - if (psx_delay_BFC41138) { - psx_delay_BFC41138 = 0; - if (psx_taken_BFC41138) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059148u); - goto label_BFC41148; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059140u); - } -label_BFC41140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41140: 14610004 bne $v1, $at, 0xBFC41154 */ - uint32_t psx_brA_BFC41140 = cpu->gpr[3]; uint32_t psx_brB_BFC41140 = cpu->gpr[1]; - psx_taken_BFC41140 = (psx_brA_BFC41140 != psx_brB_BFC41140); - psx_delay_BFC41140 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC41144: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059144u); -#endif - if (psx_delay_BFC41140) { - psx_delay_BFC41140 = 0; - if (psx_taken_BFC41140) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059154u); - goto label_BFC41154; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059148u); - } -label_BFC41148: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41148u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059148u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41148: 10000004 beq $zero, $zero, 0xBFC4115C */ - uint32_t psx_brA_BFC41148 = cpu->gpr[0]; uint32_t psx_brB_BFC41148 = cpu->gpr[0]; - psx_taken_BFC41148 = (psx_brA_BFC41148 == psx_brB_BFC41148); - psx_delay_BFC41148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC4114C: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005914Cu); -#endif - if (psx_delay_BFC41148) { - psx_delay_BFC41148 = 0; - if (psx_taken_BFC41148) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005915Cu); - goto label_BFC4115C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059150u); - } -label_BFC41150: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41150u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059150u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC41150: 3409FFFF ori $t1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3409FFFFu, cpu->gpr[9], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059150u); -#endif -label_BFC41154: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41154u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41154: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059154u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC41158: AC29EE58 sw $t1, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059158u); return; } g_debug_last_store_pc = 0x80059158u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29EE58u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059158u); -#endif -label_BFC4115C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4115Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4115Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005915Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4115C: 24010003 addiu $at, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24010003u, cpu->gpr[1], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005915Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41160: 14610003 bne $v1, $at, 0xBFC41170 */ - uint32_t psx_brA_BFC41160 = cpu->gpr[3]; uint32_t psx_brB_BFC41160 = cpu->gpr[1]; - psx_taken_BFC41160 = (psx_brA_BFC41160 != psx_brB_BFC41160); - psx_delay_BFC41160 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41164: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059164u); -#endif - if (psx_delay_BFC41160) { - psx_delay_BFC41160 = 0; - if (psx_taken_BFC41160) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059170u); - goto label_BFC41170; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059168u); - } -label_BFC41168: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41168u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41168: 1000000A beq $zero, $zero, 0xBFC41194 */ - uint32_t psx_brA_BFC41168 = cpu->gpr[0]; uint32_t psx_brB_BFC41168 = cpu->gpr[0]; - psx_taken_BFC41168 = (psx_brA_BFC41168 == psx_brB_BFC41168); - psx_delay_BFC41168 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC4116C: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005916Cu); return; } g_debug_last_store_pc = 0x8005916Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005916Cu); -#endif - if (psx_delay_BFC41168) { - psx_delay_BFC41168 = 0; - if (psx_taken_BFC41168) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059194u); - goto label_BFC41194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059170u); - } -label_BFC41170: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41170u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41170: 24010004 addiu $at, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24010004u, cpu->gpr[1], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80059170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41174: 14610003 bne $v1, $at, 0xBFC41184 */ - uint32_t psx_brA_BFC41174 = cpu->gpr[3]; uint32_t psx_brB_BFC41174 = cpu->gpr[1]; - psx_taken_BFC41174 = (psx_brA_BFC41174 != psx_brB_BFC41174); - psx_delay_BFC41174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41178: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059178u); -#endif - if (psx_delay_BFC41174) { - psx_delay_BFC41174 = 0; - if (psx_taken_BFC41174) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059184u); - goto label_BFC41184; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005917Cu); - } -label_BFC4117C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4117Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4117Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005917Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4117C: 10000005 beq $zero, $zero, 0xBFC41194 */ - uint32_t psx_brA_BFC4117C = cpu->gpr[0]; uint32_t psx_brB_BFC4117C = cpu->gpr[0]; - psx_taken_BFC4117C = (psx_brA_BFC4117C == psx_brB_BFC4117C); - psx_delay_BFC4117C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41180: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059180u); return; } g_debug_last_store_pc = 0x80059180u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059180u); -#endif - if (psx_delay_BFC4117C) { - psx_delay_BFC4117C = 0; - if (psx_taken_BFC4117C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059194u); - goto label_BFC41194; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059184u); - } -label_BFC41184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41184: 24010005 addiu $at, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24010005u, cpu->gpr[1], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80059184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41188: 1461000A bne $v1, $at, 0xBFC411B4 */ - uint32_t psx_brA_BFC41188 = cpu->gpr[3]; uint32_t psx_brB_BFC41188 = cpu->gpr[1]; - psx_taken_BFC41188 = (psx_brA_BFC41188 != psx_brB_BFC41188); - psx_delay_BFC41188 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4118C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005918Cu); -#endif - if (psx_delay_BFC41188) { - psx_delay_BFC41188 = 0; - if (psx_taken_BFC41188) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591B4u); - goto label_BFC411B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059190u); - } -label_BFC41190: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41190u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41190: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059190u); return; } g_debug_last_store_pc = 0x80059190u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059190u); -#endif -label_BFC41194: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41194u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41194: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41198: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4119C: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800591A4u; /* jal link before delay slot */ - psx_delay_BFC4119C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC411A0: 24050080 addiu $a1, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x24050080u, cpu->gpr[5], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x800591A0u); -#endif - if (psx_delay_BFC4119C) { - psx_delay_BFC4119C = 0; - cpu->gpr[31] = 0x800591A4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC411A4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411A4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC411A4: 3403FFFF ori $v1, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3403FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800591A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC411A8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800591A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC411AC: 10000010 beq $zero, $zero, 0xBFC411F0 */ - uint32_t psx_brA_BFC411AC = cpu->gpr[0]; uint32_t psx_brB_BFC411AC = cpu->gpr[0]; - psx_taken_BFC411AC = (psx_brA_BFC411AC == psx_brB_BFC411AC); - psx_delay_BFC411AC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC411B0: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800591B0u); return; } g_debug_last_store_pc = 0x800591B0u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800591B0u); -#endif - if (psx_delay_BFC411AC) { - psx_delay_BFC411AC = 0; - if (psx_taken_BFC411AC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591F0u); - goto label_BFC411F0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591B4u); - } -label_BFC411B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC411B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800591B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC411B8: AC23EE54 sw $v1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800591B8u); return; } g_debug_last_store_pc = 0x800591B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAC23EE54u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800591B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC411BC: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800591BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC411C0: 14610008 bne $v1, $at, 0xBFC411E4 */ - uint32_t psx_brA_BFC411C0 = cpu->gpr[3]; uint32_t psx_brB_BFC411C0 = cpu->gpr[1]; - psx_taken_BFC411C0 = (psx_brA_BFC411C0 != psx_brB_BFC411C0); - psx_delay_BFC411C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC411C4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800591C4u); -#endif - if (psx_delay_BFC411C0) { - psx_delay_BFC411C0 = 0; - if (psx_taken_BFC411C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591E4u); - goto label_BFC411E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591C8u); - } -label_BFC411C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC411C8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800591C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC411CC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800591CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC411D0: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800591D8u; /* jal link before delay slot */ - psx_delay_BFC411D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC411D4: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x800591D4u); -#endif - if (psx_delay_BFC411D0) { - psx_delay_BFC411D0 = 0; - cpu->gpr[31] = 0x800591D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC411D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC411D8: 10000006 beq $zero, $zero, 0xBFC411F4 */ - uint32_t psx_brA_BFC411D8 = cpu->gpr[0]; uint32_t psx_brB_BFC411D8 = cpu->gpr[0]; - psx_taken_BFC411D8 = (psx_brA_BFC411D8 == psx_brB_BFC411D8); - psx_delay_BFC411D8 = 1; - /* 0xBFC411DC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800591DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800591DCu); -#endif - if (psx_delay_BFC411D8) { - psx_delay_BFC411D8 = 0; - if (psx_taken_BFC411D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591F4u); - goto label_BFC411F4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800591E0u); - } -label_BFC411E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC411E0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800591E0u); -#endif -label_BFC411E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC411E4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800591E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC411E8: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800591F0u; /* jal link before delay slot */ - psx_delay_BFC411E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC411EC: 24050200 addiu $a1, $zero, 512 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); - PGXP_ALU(0x24050200u, cpu->gpr[5], _pgx1, 0x00000200u); } -#ifdef PSX_COSIM - cosim_instr(0x800591ECu); -#endif - if (psx_delay_BFC411E8) { - psx_delay_BFC411E8 = 0; - cpu->gpr[31] = 0x800591F0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC411F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591F0u); -#endif - /* 0xBFC411F0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800591F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800591F0u); -#endif -label_BFC411F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC411F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC411F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800591F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC411F4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800591F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC411F8: 03E00008 jr $ra */ - psx_delay_BFC411F8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC411FC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800591FCu); -#endif - if (psx_delay_BFC411F8) { - psx_delay_BFC411F8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41200(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41200u); - int psx_delay_BFC41204 = 0; - int psx_taken_BFC41204 = 0; - int psx_delay_BFC4120C = 0; - int psx_taken_BFC4120C = 0; - int psx_delay_BFC4121C = 0; - int psx_delay_BFC41250 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4120Cu: goto label_BFC4120C; - case 0xBFC41214u: goto label_BFC41214; - case 0xBFC41218u: goto label_BFC41218; - case 0xBFC41224u: goto label_BFC41224; - default: break; - } - } -label_BFC41200: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41200u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41200: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC41204: 14800003 bne $a0, $zero, 0xBFC41214 */ - uint32_t psx_brA_BFC41204 = cpu->gpr[4]; uint32_t psx_brB_BFC41204 = cpu->gpr[0]; - psx_taken_BFC41204 = (psx_brA_BFC41204 != psx_brB_BFC41204); - psx_delay_BFC41204 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41208: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059208u); return; } g_debug_last_store_pc = 0x80059208u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059208u); -#endif - if (psx_delay_BFC41204) { - psx_delay_BFC41204 = 0; - if (psx_taken_BFC41204) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059214u); - goto label_BFC41214; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005920Cu); - } -label_BFC4120C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4120Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4120Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005920Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4120C: 10000002 beq $zero, $zero, 0xBFC41218 */ - uint32_t psx_brA_BFC4120C = cpu->gpr[0]; uint32_t psx_brB_BFC4120C = cpu->gpr[0]; - psx_taken_BFC4120C = (psx_brA_BFC4120C == psx_brB_BFC4120C); - psx_delay_BFC4120C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41210: 24020015 addiu $v0, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24020015u, cpu->gpr[2], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x80059210u); -#endif - if (psx_delay_BFC4120C) { - psx_delay_BFC4120C = 0; - if (psx_taken_BFC4120C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059218u); - goto label_BFC41218; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059214u); - } -label_BFC41214: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41214u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41214: 24020016 addiu $v0, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24020016u, cpu->gpr[2], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x80059214u); -#endif -label_BFC41218: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41218u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41218: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059218u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4121C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80059224u; /* jal link before delay slot */ - psx_delay_BFC4121C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41220: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059220u); return; } g_debug_last_store_pc = 0x80059220u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059220u); -#endif - if (psx_delay_BFC4121C) { - psx_delay_BFC4121C = 0; - cpu->gpr[31] = 0x80059224u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC41224: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41224u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41224: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059224u); -#endif - /* 0xBFC41228: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059228u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4122C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005922Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059230u); -#endif - /* 0xBFC41230: 8C42EE54 lw $v0, -4524($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059230u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41234: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41238: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059238u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059238u); -#endif - /* 0xBFC4123C: 8DEF9C2C lw $t7, -25556($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005923Cu); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C2Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005923Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41240: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC41244: A1E20000 sb $v0, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059244u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA1E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059244u); -#endif - /* 0xBFC41248: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059248u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059248u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4124C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005924Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41250: 03E00008 jr $ra */ - psx_delay_BFC41250 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41254: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059254u); -#endif - if (psx_delay_BFC41250) { - psx_delay_BFC41250 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41258(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41258u); - int psx_delay_BFC412B0 = 0; - int psx_taken_BFC412B0 = 0; - int psx_delay_BFC412C4 = 0; - int psx_taken_BFC412C4 = 0; - int psx_delay_BFC412D8 = 0; - int psx_taken_BFC412D8 = 0; - int psx_delay_BFC412F4 = 0; - int psx_delay_BFC41304 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4129Cu: goto label_BFC4129C; - case 0xBFC412B8u: goto label_BFC412B8; - case 0xBFC412CCu: goto label_BFC412CC; - case 0xBFC412E0u: goto label_BFC412E0; - case 0xBFC412ECu: goto label_BFC412EC; - case 0xBFC412FCu: goto label_BFC412FC; - default: break; - } - } -label_BFC41258: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41258u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41258: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059258u); -#endif - /* 0xBFC4125C: 8C639C2C lw $v1, -25556($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005925Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C2Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005925Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41260: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41264: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059264u); return; } g_debug_last_store_pc = 0x80059264u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41268: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059268u); -#endif - /* 0xBFC4126C: 8C42EE90 lw $v0, -4464($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4464; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4464)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005926Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE90u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005926Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059270u); -#endif - /* 0xBFC41270: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059270u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC41274: 24040005 addiu $a0, $zero, 5 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); - PGXP_ALU(0x24040005u, cpu->gpr[4], _pgx1, 0x00000005u); } -#ifdef PSX_COSIM - cosim_instr(0x80059274u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC41278: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059278u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059278u); -#endif - /* 0xBFC4127C: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005927Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41280: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC41284: A04F0001 sb $t7, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059284u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059284u); -#endif - /* 0xBFC41288: 90780000 lbu $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x90780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059288u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4128C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005928Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000004u); -#endif - /* 0xBFC41290: A0580002 sb $t8, 2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059290u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0580002u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059290u); -#endif - /* 0xBFC41294: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x80059294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41298: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059298u); -#endif -label_BFC4129C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4129Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4129Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005929Cu); -#endif - /* 0xBFC4129C: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x8005929Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592A0u); -#endif - /* 0xBFC412A0: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x800592A0u); -#endif - /* 0xBFC412A4: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x800592A4u); -#endif - /* 0xBFC412A8: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x800592A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC412AC: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800592ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC412B0: 1444FFFA bne $v0, $a0, 0xBFC4129C */ - uint32_t psx_brA_BFC412B0 = cpu->gpr[2]; uint32_t psx_brB_BFC412B0 = cpu->gpr[4]; - psx_taken_BFC412B0 = (psx_brA_BFC412B0 != psx_brB_BFC412B0); - psx_delay_BFC412B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC412B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800592B4u); -#endif - if (psx_delay_BFC412B0) { - psx_delay_BFC412B0 = 0; - if (psx_taken_BFC412B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005929Cu); - goto label_BFC4129C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800592B8u); - } -label_BFC412B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC412B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC412B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC412B8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800592B8u); -#endif - /* 0xBFC412BC: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800592BCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800592BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC412C0: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800592C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC412C4: 10410006 beq $v0, $at, 0xBFC412E0 */ - uint32_t psx_brA_BFC412C4 = cpu->gpr[2]; uint32_t psx_brB_BFC412C4 = cpu->gpr[1]; - psx_taken_BFC412C4 = (psx_brA_BFC412C4 == psx_brB_BFC412C4); - psx_delay_BFC412C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC412C8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800592C8u); -#endif - if (psx_delay_BFC412C4) { - psx_delay_BFC412C4 = 0; - if (psx_taken_BFC412C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800592E0u); - goto label_BFC412E0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800592CCu); - } -label_BFC412CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC412CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC412CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC412CC: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800592CCu); return; } g_debug_last_store_pc = 0x800592CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800592CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC412D0: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800592D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC412D4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800592D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC412D8: 10000004 beq $zero, $zero, 0xBFC412EC */ - uint32_t psx_brA_BFC412D8 = cpu->gpr[0]; uint32_t psx_brB_BFC412D8 = cpu->gpr[0]; - psx_taken_BFC412D8 = (psx_brA_BFC412D8 == psx_brB_BFC412D8); - psx_delay_BFC412D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC412DC: AC22EE58 sw $v0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800592DCu); return; } g_debug_last_store_pc = 0x800592DCu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800592DCu); -#endif - if (psx_delay_BFC412D8) { - psx_delay_BFC412D8 = 0; - if (psx_taken_BFC412D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800592ECu); - goto label_BFC412EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800592E0u); - } -label_BFC412E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC412E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC412E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC412E0: 3419FFFF ori $t9, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3419FFFFu, cpu->gpr[25], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800592E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC412E4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800592E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC412E8: AC39EE54 sw $t9, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800592E8u); return; } g_debug_last_store_pc = 0x800592E8u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39EE54u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800592E8u); -#endif -label_BFC412EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC412ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC412ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC412EC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800592ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC412F0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800592F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC412F4: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800592FCu; /* jal link before delay slot */ - psx_delay_BFC412F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC412F8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800592F8u); -#endif - if (psx_delay_BFC412F4) { - psx_delay_BFC412F4 = 0; - cpu->gpr[31] = 0x800592FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC412FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC412FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC412FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800592FCu); -#endif - /* 0xBFC412FC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800592FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800592FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41300: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80059300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41304: 03E00008 jr $ra */ - psx_delay_BFC41304 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41308: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059308u); -#endif - if (psx_delay_BFC41304) { - psx_delay_BFC41304 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC4130C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4130Cu); - int psx_delay_BFC41354 = 0; - int psx_taken_BFC41354 = 0; - int psx_delay_BFC41368 = 0; - int psx_taken_BFC41368 = 0; - int psx_delay_BFC4137C = 0; - int psx_taken_BFC4137C = 0; - int psx_delay_BFC41398 = 0; - int psx_delay_BFC413A8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4132Cu: goto label_BFC4132C; - case 0xBFC4135Cu: goto label_BFC4135C; - case 0xBFC41370u: goto label_BFC41370; - case 0xBFC41384u: goto label_BFC41384; - case 0xBFC41390u: goto label_BFC41390; - case 0xBFC413A0u: goto label_BFC413A0; - default: break; - } - } -label_BFC4130C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4130Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4130Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005930Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4130C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005930Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41310: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41314: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059314u); -#endif - /* 0xBFC41318: 8C429C2C lw $v0, -25556($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059318u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429C2Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059318u); -#endif - /* 0xBFC4131C: 8C63EEC4 lw $v1, -4412($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005931Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EEC4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005931Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41320: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059320u); return; } g_debug_last_store_pc = 0x80059320u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC41324: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41328: 24050008 addiu $a1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24050008u, cpu->gpr[5], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80059328u); -#endif -label_BFC4132C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4132Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4132Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005932Cu); -#endif - /* 0xBFC4132C: 904E0000 lbu $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 14, 0x4u); - PGXP_LOAD(0x904E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005932Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41330: 24840004 addiu $a0, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); - PGXP_ALU(0x24840004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80059330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC41334: A06E0000 sb $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059334u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA06E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059334u); -#endif - /* 0xBFC41338: 904F0000 lbu $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 15, 0x4u); - PGXP_LOAD(0x904F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4133C: 24630004 addiu $v1, $v1, 4 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (4)); - PGXP_ALU(0x24630004u, cpu->gpr[3], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x8005933Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC41340: A06FFFFD sb $t7, -3($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059340u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-3)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06FFFFDu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059340u); -#endif - /* 0xBFC41344: 90580000 lbu $t8, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 24, 0x4u); - PGXP_LOAD(0x90580000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059344u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41348: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC4134C: A078FFFE sb $t8, -2($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005934Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-2)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA078FFFEu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005934Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059350u); -#endif - /* 0xBFC41350: 90590000 lbu $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 25, 0x4u); - PGXP_LOAD(0x90590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC41354: 1485FFF5 bne $a0, $a1, 0xBFC4132C */ - uint32_t psx_brA_BFC41354 = cpu->gpr[4]; uint32_t psx_brB_BFC41354 = cpu->gpr[5]; - psx_taken_BFC41354 = (psx_brA_BFC41354 != psx_brB_BFC41354); - psx_delay_BFC41354 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC41358: A079FFFF sb $t9, -1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059358u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA079FFFFu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059358u); -#endif - if (psx_delay_BFC41354) { - psx_delay_BFC41354 = 0; - if (psx_taken_BFC41354) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005932Cu); - goto label_BFC4132C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005935Cu); - } -label_BFC4135C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4135Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4135Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005935Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4135C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005935Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059360u); -#endif - /* 0xBFC41360: 8C42EE58 lw $v0, -4520($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059360u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41364: 3401FFFF ori $at, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3401FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059364u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41368: 10410006 beq $v0, $at, 0xBFC41384 */ - uint32_t psx_brA_BFC41368 = cpu->gpr[2]; uint32_t psx_brB_BFC41368 = cpu->gpr[1]; - psx_taken_BFC41368 = (psx_brA_BFC41368 == psx_brB_BFC41368); - psx_delay_BFC41368 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4136C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005936Cu); -#endif - if (psx_delay_BFC41368) { - psx_delay_BFC41368 = 0; - if (psx_taken_BFC41368) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059384u); - goto label_BFC41384; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059370u); - } -label_BFC41370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41370: AC22EE54 sw $v0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059370u); return; } g_debug_last_store_pc = 0x80059370u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE54u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41374: 3402FFFF ori $v0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3402FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41378: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059378u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4137C: 10000004 beq $zero, $zero, 0xBFC41390 */ - uint32_t psx_brA_BFC4137C = cpu->gpr[0]; uint32_t psx_brB_BFC4137C = cpu->gpr[0]; - psx_taken_BFC4137C = (psx_brA_BFC4137C == psx_brB_BFC4137C); - psx_delay_BFC4137C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41380: AC22EE58 sw $v0, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059380u); return; } g_debug_last_store_pc = 0x80059380u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22EE58u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059380u); -#endif - if (psx_delay_BFC4137C) { - psx_delay_BFC4137C = 0; - if (psx_taken_BFC4137C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059390u); - goto label_BFC41390; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059384u); - } -label_BFC41384: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41384u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC41384: 3408FFFF ori $t0, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3408FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41388: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC4138C: AC28EE54 sw $t0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005938Cu); return; } g_debug_last_store_pc = 0x8005938Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE54u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005938Cu); -#endif -label_BFC41390: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41390u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41390: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41394: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41398: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800593A0u; /* jal link before delay slot */ - psx_delay_BFC41398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC4139C: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8005939Cu); -#endif - if (psx_delay_BFC41398) { - psx_delay_BFC41398 = 0; - cpu->gpr[31] = 0x800593A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC413A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC413A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC413A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593A0u); -#endif - /* 0xBFC413A0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800593A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC413A4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800593A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC413A8: 03E00008 jr $ra */ - psx_delay_BFC413A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC413AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800593ACu); -#endif - if (psx_delay_BFC413A8) { - psx_delay_BFC413A8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC413B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC413B0u); - int psx_delay_BFC413DC = 0; - int psx_delay_BFC413EC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC413E4u: goto label_BFC413E4; - default: break; - } - } -label_BFC413B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC413B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC413B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC413B0: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800593B0u); -#endif - /* 0xBFC413B4: 8DCEEE64 lw $t6, -4508($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4508; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4508)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593B4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE64u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800593B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC413B8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800593B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC413BC: 308300FF andi $v1, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800593BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC413C0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593C0u); return; } g_debug_last_store_pc = 0x800593C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800593C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC413C4: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800593C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC413C8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800593C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC413CC: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800593CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC413D0: A1C30000 sb $v1, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800593D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA1C30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800593D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC413D4: AC2FEE54 sw $t7, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593D4u); return; } g_debug_last_store_pc = 0x800593D4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE54u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800593D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC413D8: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800593D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC413DC: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800593E4u; /* jal link before delay slot */ - psx_delay_BFC413DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC413E0: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800593E0u); -#endif - if (psx_delay_BFC413DC) { - psx_delay_BFC413DC = 0; - cpu->gpr[31] = 0x800593E4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC413E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC413E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC413E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593E4u); -#endif - /* 0xBFC413E4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800593E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC413E8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800593E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC413EC: 03E00008 jr $ra */ - psx_delay_BFC413EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC413F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800593F0u); -#endif - if (psx_delay_BFC413EC) { - psx_delay_BFC413EC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC413F4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC413F4u); - int psx_delay_BFC41424 = 0; - int psx_taken_BFC41424 = 0; - int psx_delay_BFC41440 = 0; - int psx_delay_BFC41450 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4141Cu: goto label_BFC4141C; - case 0xBFC4142Cu: goto label_BFC4142C; - case 0xBFC41448u: goto label_BFC41448; - default: break; - } - } -label_BFC413F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC413F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC413F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800593F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC413F4: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800593F4u); -#endif - /* 0xBFC413F8: 8C849C2C lw $a0, -25556($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800593F8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800593F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC413FC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800593FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41400: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059400u); return; } g_debug_last_store_pc = 0x80059400u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41404: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059404u); -#endif - /* 0xBFC41408: 8DEFEE68 lw $t7, -4504($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4504; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059408u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFEE68u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059408u); -#endif - /* 0xBFC4140C: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005940Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41410: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC41414: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC41418: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059418u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059418u); -#endif -label_BFC4141C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4141Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4141Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005941Cu); -#endif - /* 0xBFC4141C: 90800000 lbu $zero, 0($a0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 0, 0x10u); -#ifdef PSX_COSIM - cosim_instr(0x8005941Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41420: 24420001 addiu $v0, $v0, 1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); - PGXP_ALU(0x24420001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC41424: 1443FFFD bne $v0, $v1, 0xBFC4141C */ - uint32_t psx_brA_BFC41424 = cpu->gpr[2]; uint32_t psx_brB_BFC41424 = cpu->gpr[3]; - psx_taken_BFC41424 = (psx_brA_BFC41424 != psx_brB_BFC41424); - psx_delay_BFC41424 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41428: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059428u); -#endif - if (psx_delay_BFC41424) { - psx_delay_BFC41424 = 0; - if (psx_taken_BFC41424) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005941Cu); - goto label_BFC4141C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005942Cu); - } -label_BFC4142C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4142Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4142Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005942Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4142C: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005942Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41430: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41434: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC41438: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059438u); return; } g_debug_last_store_pc = 0x80059438u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4143C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005943Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41440: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059448u; /* jal link before delay slot */ - psx_delay_BFC41440 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41444: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059444u); -#endif - if (psx_delay_BFC41440) { - psx_delay_BFC41440 = 0; - cpu->gpr[31] = 0x80059448u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41448: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41448u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059448u); -#endif - /* 0xBFC41448: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059448u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4144C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005944Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41450: 03E00008 jr $ra */ - psx_delay_BFC41450 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41454: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059454u); -#endif - if (psx_delay_BFC41450) { - psx_delay_BFC41450 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41458(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41458u); - int psx_delay_BFC41460 = 0; - int psx_delay_BFC41484 = 0; - int psx_taken_BFC41484 = 0; - int psx_delay_BFC41498 = 0; - int psx_taken_BFC41498 = 0; - int psx_delay_BFC414A8 = 0; - int psx_taken_BFC414A8 = 0; - int psx_delay_BFC414C8 = 0; - int psx_taken_BFC414C8 = 0; - int psx_delay_BFC414DC = 0; - int psx_taken_BFC414DC = 0; - int psx_delay_BFC414EC = 0; - int psx_taken_BFC414EC = 0; - int psx_delay_BFC41518 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41468u: goto label_BFC41468; - case 0xBFC4148Cu: goto label_BFC4148C; - case 0xBFC414A0u: goto label_BFC414A0; - case 0xBFC414B0u: goto label_BFC414B0; - case 0xBFC414B4u: goto label_BFC414B4; - case 0xBFC414BCu: goto label_BFC414BC; - case 0xBFC414D0u: goto label_BFC414D0; - case 0xBFC414E4u: goto label_BFC414E4; - case 0xBFC414F4u: goto label_BFC414F4; - case 0xBFC414F8u: goto label_BFC414F8; - case 0xBFC41500u: goto label_BFC41500; - case 0xBFC41510u: goto label_BFC41510; - default: break; - } - } -label_BFC41458: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41458u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41458: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4145C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005945Cu); return; } g_debug_last_store_pc = 0x8005945Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005945Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41460: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80059468u; /* jal link before delay slot */ - psx_delay_BFC41460 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41464: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059464u); -#endif - if (psx_delay_BFC41460) { - psx_delay_BFC41460 = 0; - cpu->gpr[31] = 0x80059468u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC41468: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41468u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41468: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059468u); -#endif - /* 0xBFC4146C: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005946Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005946Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41470: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41474: A1C00000 sb $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059474u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[14] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059474u); -#endif - /* 0xBFC41478: 8DEFEE84 lw $t7, -4476($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -4476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-4476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059478u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEFEE84u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4147C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005947Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC41480: 31F80100 andi $t8, $t7, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[15] & 0x100u; - PGXP_ALU(0x31F80100u, cpu->gpr[24], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80059480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41484: 17000012 bne $t8, $zero, 0xBFC414D0 */ - uint32_t psx_brA_BFC41484 = cpu->gpr[24]; uint32_t psx_brB_BFC41484 = cpu->gpr[0]; - psx_taken_BFC41484 = (psx_brA_BFC41484 != psx_brB_BFC41484); - psx_delay_BFC41484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41488: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059488u); -#endif - if (psx_delay_BFC41484) { - psx_delay_BFC41484 = 0; - if (psx_taken_BFC41484) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594D0u); - goto label_BFC414D0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005948Cu); - } -label_BFC4148C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4148Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4148Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC4148C: 3C19800E lui $t9, 0x800E */ - cpu->gpr[25] = 0x800E0000u; - PGXP_ALU(0x3C19800Eu, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005948Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059490u); -#endif - /* 0xBFC41490: 8F39EE54 lw $t9, -4524($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059490u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F39EE54u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41494: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0x80059494u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC41498: 17210006 bne $t9, $at, 0xBFC414B4 */ - uint32_t psx_brA_BFC41498 = cpu->gpr[25]; uint32_t psx_brB_BFC41498 = cpu->gpr[1]; - psx_taken_BFC41498 = (psx_brA_BFC41498 != psx_brB_BFC41498); - psx_delay_BFC41498 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC4149C: 240900E6 addiu $t1, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240900E6u, cpu->gpr[9], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x8005949Cu); -#endif - if (psx_delay_BFC41498) { - psx_delay_BFC41498 = 0; - if (psx_taken_BFC41498) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594B4u); - goto label_BFC414B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594A0u); - } -label_BFC414A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC414A0: 240800F6 addiu $t0, $zero, 246 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); - PGXP_ALU(0x240800F6u, cpu->gpr[8], _pgx1, 0x000000F6u); } -#ifdef PSX_COSIM - cosim_instr(0x800594A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC414A4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC414A8: 10000004 beq $zero, $zero, 0xBFC414BC */ - uint32_t psx_brA_BFC414A8 = cpu->gpr[0]; uint32_t psx_brB_BFC414A8 = cpu->gpr[0]; - psx_taken_BFC414A8 = (psx_brA_BFC414A8 == psx_brB_BFC414A8); - psx_delay_BFC414A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC414AC: AC28EE54 sw $t0, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594ACu); return; } g_debug_last_store_pc = 0x800594ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC28EE54u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800594ACu); -#endif - if (psx_delay_BFC414A8) { - psx_delay_BFC414A8 = 0; - if (psx_taken_BFC414A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594BCu); - goto label_BFC414BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594B0u); - } -label_BFC414B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC414B0: 240900E6 addiu $t1, $zero, 230 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); - PGXP_ALU(0x240900E6u, cpu->gpr[9], _pgx1, 0x000000E6u); } -#ifdef PSX_COSIM - cosim_instr(0x800594B0u); -#endif -label_BFC414B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC414B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC414B8: AC29EE54 sw $t1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594B8u); return; } g_debug_last_store_pc = 0x800594B8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29EE54u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800594B8u); -#endif -label_BFC414BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC414BC: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594C0u); -#endif - /* 0xBFC414C0: 8D6B9C2C lw $t3, -25556($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594C0u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9C2Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800594C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC414C4: 240A0006 addiu $t2, $zero, 6 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); - PGXP_ALU(0x240A0006u, cpu->gpr[10], _pgx1, 0x00000006u); } -#ifdef PSX_COSIM - cosim_instr(0x800594C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC414C8: 10000011 beq $zero, $zero, 0xBFC41510 */ - uint32_t psx_brA_BFC414C8 = cpu->gpr[0]; uint32_t psx_brB_BFC414C8 = cpu->gpr[0]; - psx_taken_BFC414C8 = (psx_brA_BFC414C8 == psx_brB_BFC414C8); - psx_delay_BFC414C8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC414CC: A16A0000 sb $t2, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800594CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[11] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA16A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800594CCu); -#endif - if (psx_delay_BFC414C8) { - psx_delay_BFC414C8 = 0; - if (psx_taken_BFC414C8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059510u); - goto label_BFC41510; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594D0u); - } -label_BFC414D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC414D0: 3C0C800E lui $t4, 0x800E */ - cpu->gpr[12] = 0x800E0000u; - PGXP_ALU(0x3C0C800Eu, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594D0u); -#endif - /* 0xBFC414D4: 8D8CEE54 lw $t4, -4524($t4) */ - { uint32_t _pgxa = cpu->gpr[12] + -4524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594D4u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x1000u); } - PGXP_LOAD(0x8D8CEE54u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800594D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC414D8: 240100FE addiu $at, $zero, 254 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); - PGXP_ALU(0x240100FEu, cpu->gpr[1], _pgx1, 0x000000FEu); } -#ifdef PSX_COSIM - cosim_instr(0x800594D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC414DC: 15810006 bne $t4, $at, 0xBFC414F8 */ - uint32_t psx_brA_BFC414DC = cpu->gpr[12]; uint32_t psx_brB_BFC414DC = cpu->gpr[1]; - psx_taken_BFC414DC = (psx_brA_BFC414DC != psx_brB_BFC414DC); - psx_delay_BFC414DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC414E0: 240E00EB addiu $t6, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240E00EBu, cpu->gpr[14], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800594E0u); -#endif - if (psx_delay_BFC414DC) { - psx_delay_BFC414DC = 0; - if (psx_taken_BFC414DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594F8u); - goto label_BFC414F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594E4u); - } -label_BFC414E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC414E4: 240D00FB addiu $t5, $zero, 251 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); - PGXP_ALU(0x240D00FBu, cpu->gpr[13], _pgx1, 0x000000FBu); } -#ifdef PSX_COSIM - cosim_instr(0x800594E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC414E8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC414EC: 10000004 beq $zero, $zero, 0xBFC41500 */ - uint32_t psx_brA_BFC414EC = cpu->gpr[0]; uint32_t psx_brB_BFC414EC = cpu->gpr[0]; - psx_taken_BFC414EC = (psx_brA_BFC414EC == psx_brB_BFC414EC); - psx_delay_BFC414EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC414F0: AC2DEE54 sw $t5, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594F0u); return; } g_debug_last_store_pc = 0x800594F0u; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DEE54u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800594F0u); -#endif - if (psx_delay_BFC414EC) { - psx_delay_BFC414EC = 0; - if (psx_taken_BFC414EC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059500u); - goto label_BFC41500; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800594F4u); - } -label_BFC414F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC414F4: 240E00EB addiu $t6, $zero, 235 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); - PGXP_ALU(0x240E00EBu, cpu->gpr[14], _pgx1, 0x000000EBu); } -#ifdef PSX_COSIM - cosim_instr(0x800594F4u); -#endif -label_BFC414F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC414F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC414F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800594F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC414F8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800594F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC414FC: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800594FCu); return; } g_debug_last_store_pc = 0x800594FCu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800594FCu); -#endif -label_BFC41500: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41500: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059500u); -#endif - /* 0xBFC41504: 8F189C2C lw $t8, -25556($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059504u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC41508: 240F001B addiu $t7, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x240F001Bu, cpu->gpr[15], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x80059508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC4150C: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005950Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005950Cu); -#endif -label_BFC41510: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41510u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059510u); -#endif - /* 0xBFC41510: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059510u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059510u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41514: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80059514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41518: 03E00008 jr $ra */ - psx_delay_BFC41518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4151C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005951Cu); -#endif - if (psx_delay_BFC41518) { - psx_delay_BFC41518 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41520(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41520u); - int psx_delay_BFC4152C = 0; - int psx_taken_BFC4152C = 0; - int psx_delay_BFC4154C = 0; - int psx_delay_BFC415BC = 0; - int psx_delay_BFC415E8 = 0; - int psx_taken_BFC415E8 = 0; - int psx_delay_BFC415F0 = 0; - int psx_delay_BFC4161C = 0; - int psx_taken_BFC4161C = 0; - int psx_delay_BFC41624 = 0; - int psx_taken_BFC41624 = 0; - int psx_delay_BFC41640 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41534u: goto label_BFC41534; - case 0xBFC41554u: goto label_BFC41554; - case 0xBFC415C4u: goto label_BFC415C4; - case 0xBFC415F0u: goto label_BFC415F0; - case 0xBFC415F8u: goto label_BFC415F8; - case 0xBFC41624u: goto label_BFC41624; - case 0xBFC4162Cu: goto label_BFC4162C; - case 0xBFC41638u: goto label_BFC41638; - case 0xBFC4163Cu: goto label_BFC4163C; - default: break; - } - } -label_BFC41520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41520: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059520u); -#endif - /* 0xBFC41524: 8CC6EE74 lw $a2, -4492($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4492; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059524u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6EE74u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41528: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059528u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC4152C: 18C0003D blez $a2, 0xBFC41624 */ - uint32_t psx_brA_BFC4152C = cpu->gpr[6]; - psx_taken_BFC4152C = ((int32_t)psx_brA_BFC4152C <= 0); - psx_delay_BFC4152C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41530: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059530u); return; } g_debug_last_store_pc = 0x80059530u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059530u); -#endif - if (psx_delay_BFC4152C) { - psx_delay_BFC4152C = 0; - if (psx_taken_BFC4152C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059624u); - goto label_BFC41624; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059534u); - } -label_BFC41534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41534: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059534u); -#endif - /* 0xBFC41538: 8DCEEE7C lw $t6, -4484($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4484; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059538u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE7Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059538u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4153C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005953Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41540: AC2EEE80 sw $t6, -4480($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4480; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4480)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059540u); return; } g_debug_last_store_pc = 0x80059540u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE80u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41544: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41548: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4154C: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80059554u; /* jal link before delay slot */ - psx_delay_BFC4154C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC41550: AC26EE74 sw $a2, -4492($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4492; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059550u); return; } g_debug_last_store_pc = 0x80059550u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EE74u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059550u); -#endif - if (psx_delay_BFC4154C) { - psx_delay_BFC4154C = 0; - cpu->gpr[31] = 0x80059554u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC41554: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41554u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059554u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41554: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059554u); -#endif - /* 0xBFC41558: 8C639C28 lw $v1, -25560($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059558u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C28u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059558u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4155C: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005955Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41560: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059560u); -#endif - /* 0xBFC41564: 8C429C34 lw $v0, -25548($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059564u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429C34u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059564u); -#endif - /* 0xBFC41568: 8CC6EE74 lw $a2, -4492($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4492; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059568u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6EE74u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059568u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC4156C: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005956Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005956Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059570u); -#endif - /* 0xBFC41570: 90600000 lbu $zero, 0($v1) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 0, 0x8u); -#ifdef PSX_COSIM - cosim_instr(0x80059570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41574: A0400000 sb $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059574u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059574u); -#endif - /* 0xBFC41578: 90400000 lbu $zero, 0($v0) */ - (void)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 0, 0x4u); -#ifdef PSX_COSIM - cosim_instr(0x80059578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC4157C: 240F0080 addiu $t7, $zero, 128 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (128)); - PGXP_ALU(0x240F0080u, cpu->gpr[15], _pgx1, 0x00000080u); } -#ifdef PSX_COSIM - cosim_instr(0x8005957Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC41580: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059580u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC41584: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC41588: A04F0000 sb $t7, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059588u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059588u); -#endif - /* 0xBFC4158C: 8F399C20 lw $t9, -25568($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25568; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005958Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C20u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005958Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41590: 3C180002 lui $t8, 0x2 */ - cpu->gpr[24] = 0x00020000u; - PGXP_ALU(0x3C180002u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41594: 37180943 ori $t8, $t8, 0x943 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] | 0x943u; - PGXP_ALU(0x37180943u, cpu->gpr[24], _pgx1, 0x0943u); } -#ifdef PSX_COSIM - cosim_instr(0x80059594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC41598: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059598u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC4159C: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005959Cu); return; } g_debug_last_store_pc = 0x8005959Cu; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005959Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595A0u); -#endif - /* 0xBFC415A0: 8D299C24 lw $t1, -25564($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25564; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595A0u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299C24u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800595A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC415A4: 2408132C addiu $t0, $zero, 4908 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (4908)); - PGXP_ALU(0x2408132Cu, cpu->gpr[8], _pgx1, 0x0000132Cu); } -#ifdef PSX_COSIM - cosim_instr(0x800595A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC415A8: AD280000 sw $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595A8u); return; } g_debug_last_store_pc = 0x800595A8u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAD280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800595A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC415AC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC415B0: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595B0u); -#endif - /* 0xBFC415B4: 8CA5EE88 lw $a1, -4472($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595B4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5EE88u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800595B4u); -#endif - /* 0xBFC415B8: 8C84EE7C lw $a0, -4484($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4484; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-4484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595B8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C84EE7Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x800595B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC415BC: 0C0166EA jal 0xB0059BA8 */ - cpu->gpr[31] = 0x800595C4u; /* jal link before delay slot */ - psx_delay_BFC415BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC415C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800595C0u); -#endif - if (psx_delay_BFC415BC) { - psx_delay_BFC415BC = 0; - cpu->gpr[31] = 0x800595C4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059BA8u); - cpu->pc = 0x80059BA8u; return; - } -label_BFC415C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC415C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC415C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC415C4: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595C4u); -#endif - /* 0xBFC415C8: 8D6BEE88 lw $t3, -4472($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -4472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-4472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595C8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BEE88u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x800595C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC415CC: 3C0A800E lui $t2, 0x800E */ - cpu->gpr[10] = 0x800E0000u; - PGXP_ALU(0x3C0A800Eu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595D0u); -#endif - /* 0xBFC415D0: 8D4AEE7C lw $t2, -4484($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -4484; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-4484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595D0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AEE7Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800595D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC415D4: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595D4u); -#endif - /* 0xBFC415D8: 8CC6EE74 lw $a2, -4492($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4492; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595D8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC6EE74u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x800595D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1800u); -#endif - /* 0xBFC415DC: 000B6080 sll $t4, $t3, 2 */ - { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[11] << 2u; - PGXP_ALU(0x000B6080u, cpu->gpr[12], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x800595DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC415E0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3400u); -#endif - /* 0xBFC415E4: 014C6821 addu $t5, $t2, $t4 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[10] + cpu->gpr[12]; - PGXP_ALU(0x014C6821u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800595E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC415E8: 14C00013 bne $a2, $zero, 0xBFC41638 */ - uint32_t psx_brA_BFC415E8 = cpu->gpr[6]; uint32_t psx_brB_BFC415E8 = cpu->gpr[0]; - psx_taken_BFC415E8 = (psx_brA_BFC415E8 != psx_brB_BFC415E8); - psx_delay_BFC415E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2002u); -#endif - /* 0xBFC415EC: AC2DEE7C sw $t5, -4484($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4484; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4484)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595ECu); return; } g_debug_last_store_pc = 0x800595ECu; cpu->write_word(psx_addr, cpu->gpr[13]); } - PGXP_STORE(0xAC2DEE7Cu, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x800595ECu); -#endif - if (psx_delay_BFC415E8) { - psx_delay_BFC415E8 = 0; - if (psx_taken_BFC415E8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059638u); - goto label_BFC41638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800595F0u); - } -label_BFC415F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC415F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC415F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC415F0: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800595F8u; /* jal link before delay slot */ - psx_delay_BFC415F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC415F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800595F4u); -#endif - if (psx_delay_BFC415F0) { - psx_delay_BFC415F0 = 0; - cpu->gpr[31] = 0x800595F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC415F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC415F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC415F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800595F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC415F8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800595F8u); -#endif - /* 0xBFC415FC: 8C639C28 lw $v1, -25560($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800595FCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C28u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800595FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41600: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC41604: A0600000 sb $zero, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059604u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA0600000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059604u); -#endif - /* 0xBFC41608: 8F189C2C lw $t8, -25556($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059608u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C2Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059608u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC4160C: 240E0FFF addiu $t6, $zero, 4095 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); - PGXP_ALU(0x240E0FFFu, cpu->gpr[14], _pgx1, 0x00000FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005960Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41610: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059610u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41614: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059614u); return; } g_debug_last_store_pc = 0x80059614u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC41618: 240F0009 addiu $t7, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x240F0009u, cpu->gpr[15], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x80059618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4161C: 10000006 beq $zero, $zero, 0xBFC41638 */ - uint32_t psx_brA_BFC4161C = cpu->gpr[0]; uint32_t psx_brB_BFC4161C = cpu->gpr[0]; - psx_taken_BFC4161C = (psx_brA_BFC4161C == psx_brB_BFC4161C); - psx_delay_BFC4161C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059620u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC41620: A30F0000 sb $t7, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059620u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA30F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059620u); -#endif - if (psx_delay_BFC4161C) { - psx_delay_BFC4161C = 0; - if (psx_taken_BFC4161C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059638u); - goto label_BFC41638; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059624u); - } -label_BFC41624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC41624: 14C00005 bne $a2, $zero, 0xBFC4163C */ - uint32_t psx_brA_BFC41624 = cpu->gpr[6]; uint32_t psx_brB_BFC41624 = cpu->gpr[0]; - psx_taken_BFC41624 = (psx_brA_BFC41624 != psx_brB_BFC41624); - psx_delay_BFC41624 = 1; - /* 0xBFC41628: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059628u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059628u); -#endif - if (psx_delay_BFC41624) { - psx_delay_BFC41624 = 0; - if (psx_taken_BFC41624) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005963Cu); - goto label_BFC4163C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005962Cu); - } -label_BFC4162C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4162Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4162Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005962Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC4162C: 24C6FFFF addiu $a2, $a2, -1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-1)); - PGXP_ALU(0x24C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005962Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41630: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059630u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x42u); -#endif - /* 0xBFC41634: AC26EE74 sw $a2, -4492($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4492; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4492)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059634u); return; } g_debug_last_store_pc = 0x80059634u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAC26EE74u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059634u); -#endif -label_BFC41638: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41638u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41638u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059638u); -#endif - /* 0xBFC41638: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059638u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059638u); -#endif -label_BFC4163C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4163Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4163Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4163C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005963Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41640: 03E00008 jr $ra */ - psx_delay_BFC41640 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41644: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059644u); -#endif - if (psx_delay_BFC41640) { - psx_delay_BFC41640 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41648(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41648u); - int psx_delay_BFC41658 = 0; - int psx_delay_BFC41668 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41660u: goto label_BFC41660; - default: break; - } - } -label_BFC41648: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41648u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41648: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4164C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005964Cu); return; } g_debug_last_store_pc = 0x8005964Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005964Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41650: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41654: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059654u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41658: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059660u; /* jal link before delay slot */ - psx_delay_BFC41658 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC4165C: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x8005965Cu); -#endif - if (psx_delay_BFC41658) { - psx_delay_BFC41658 = 0; - cpu->gpr[31] = 0x80059660u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41660: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41660u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059660u); -#endif - /* 0xBFC41660: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059660u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41664: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80059664u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41668: 03E00008 jr $ra */ - psx_delay_BFC41668 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4166C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005966Cu); -#endif - if (psx_delay_BFC41668) { - psx_delay_BFC41668 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41670(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41670u); - int psx_delay_BFC416E0 = 0; - int psx_taken_BFC416E0 = 0; - int psx_delay_BFC416F0 = 0; - int psx_delay_BFC41700 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC416B8u: goto label_BFC416B8; - case 0xBFC416E8u: goto label_BFC416E8; - case 0xBFC416F8u: goto label_BFC416F8; - default: break; - } - } -label_BFC41670: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41670u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41670: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059670u); -#endif - /* 0xBFC41674: 8C639C2C lw $v1, -25556($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059674u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C2Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41678: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4167C: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005967Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41680: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41684: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059684u); return; } g_debug_last_store_pc = 0x80059684u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41688: A024EEB8 sb $a0, -4424($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4424; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059688u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4424)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA024EEB8u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059688u); -#endif - /* 0xBFC4168C: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005968Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC41690: 24040004 addiu $a0, $zero, 4 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4)); - PGXP_ALU(0x24040004u, cpu->gpr[4], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x80059690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41694: A02EEEB9 sb $t6, -4423($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4423; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059694u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4423)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA02EEEB9u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059694u); -#endif - /* 0xBFC41698: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4169C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005969Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC416A0: A02FEEBA sb $t7, -4422($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4422; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596A0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4422)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA02FEEBAu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800596A0u); -#endif - /* 0xBFC416A4: 90780000 lbu $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 24, 0x8u); - PGXP_LOAD(0x90780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800596A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC416A8: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800596A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC416AC: 2442EEBC addiu $v0, $v0, -4420 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-4420)); - PGXP_ALU(0x2442EEBCu, cpu->gpr[2], _pgx1, 0xFFFFEEBCu); } -#ifdef PSX_COSIM - cosim_instr(0x800596ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC416B0: 2484EEC0 addiu $a0, $a0, -4416 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-4416)); - PGXP_ALU(0x2484EEC0u, cpu->gpr[4], _pgx1, 0xFFFFEEC0u); } -#ifdef PSX_COSIM - cosim_instr(0x800596B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC416B4: A038EEBB sb $t8, -4421($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4421; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4421)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA038EEBBu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800596B4u); -#endif -label_BFC416B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC416B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC416B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596B8u); -#endif - /* 0xBFC416B8: 90790000 lbu $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[25] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 25, 0x8u); - PGXP_LOAD(0x90790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800596B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC416BC: 24420004 addiu $v0, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4)); - PGXP_ALU(0x24420004u, cpu->gpr[2], _pgx1, 0x00000004u); } -#ifdef PSX_COSIM - cosim_instr(0x800596BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC416C0: A059FFFC sb $t9, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-4)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA059FFFCu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x800596C0u); -#endif - /* 0xBFC416C4: 90680000 lbu $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 8, 0x8u); - PGXP_LOAD(0x90680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800596C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC416C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800596C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC416CC: A048FFFD sb $t0, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA048FFFDu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x800596CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596D0u); -#endif - /* 0xBFC416D0: 90690000 lbu $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 9, 0x8u); - PGXP_LOAD(0x90690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800596D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC416D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800596D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC416D8: A049FFFE sb $t1, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FFFEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800596D8u); -#endif - /* 0xBFC416DC: 906A0000 lbu $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 10, 0x8u); - PGXP_LOAD(0x906A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800596DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC416E0: 1444FFF5 bne $v0, $a0, 0xBFC416B8 */ - uint32_t psx_brA_BFC416E0 = cpu->gpr[2]; uint32_t psx_brB_BFC416E0 = cpu->gpr[4]; - psx_taken_BFC416E0 = (psx_brA_BFC416E0 != psx_brB_BFC416E0); - psx_delay_BFC416E0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x404u); -#endif - /* 0xBFC416E4: A04AFFFF sb $t2, -1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800596E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA04AFFFFu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800596E4u); -#endif - if (psx_delay_BFC416E0) { - psx_delay_BFC416E0 = 0; - if (psx_taken_BFC416E0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800596B8u); - goto label_BFC416B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800596E8u); - } -label_BFC416E8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC416E8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC416E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC416E8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800596E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC416EC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800596ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC416F0: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800596F8u; /* jal link before delay slot */ - psx_delay_BFC416F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC416F4: 24050040 addiu $a1, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24050040u, cpu->gpr[5], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x800596F4u); -#endif - if (psx_delay_BFC416F0) { - psx_delay_BFC416F0 = 0; - cpu->gpr[31] = 0x800596F8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC416F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC416F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC416F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800596F8u); -#endif - /* 0xBFC416F8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800596F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800596F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC416FC: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800596FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41700: 03E00008 jr $ra */ - psx_delay_BFC41700 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41704: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059704u); -#endif - if (psx_delay_BFC41700) { - psx_delay_BFC41700 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41708(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41708u); - int psx_delay_BFC41738 = 0; - int psx_taken_BFC41738 = 0; - int psx_delay_BFC41754 = 0; - int psx_taken_BFC41754 = 0; - int psx_delay_BFC41770 = 0; - int psx_delay_BFC41780 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41738u: goto label_BFC41738; - case 0xBFC41740u: goto label_BFC41740; - case 0xBFC4175Cu: goto label_BFC4175C; - case 0xBFC41760u: goto label_BFC41760; - case 0xBFC41778u: goto label_BFC41778; - default: break; - } - } -label_BFC41708: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41708u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059708u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41708: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059708u); -#endif - /* 0xBFC4170C: 8CA5EE6C lw $a1, -4500($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -4500; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-4500)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005970Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA5EE6Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005970Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41710: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41714: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059714u); return; } g_debug_last_store_pc = 0x80059714u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41718: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059718u); -#endif - /* 0xBFC4171C: 90A20001 lbu $v0, 1($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 2, 0x20u); - PGXP_LOAD(0x90A20001u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005971Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC41720: A0A40000 sb $a0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059720u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA0A40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41724: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41728: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059728u); -#endif - /* 0xBFC4172C: 8C849C2C lw $a0, -25556($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005972Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849C2Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005972Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41730: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC41734: 00001821 addu $v1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059734u); -#endif -label_BFC41738: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41738u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41738: 10400009 beq $v0, $zero, 0xBFC41760 */ - uint32_t psx_brA_BFC41738 = cpu->gpr[2]; uint32_t psx_brB_BFC41738 = cpu->gpr[0]; - psx_taken_BFC41738 = (psx_brA_BFC41738 == psx_brB_BFC41738); - psx_delay_BFC41738 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4173C: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005973Cu); -#endif - if (psx_delay_BFC41738) { - psx_delay_BFC41738 = 0; - if (psx_taken_BFC41738) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059760u); - goto label_BFC41760; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059740u); - } -label_BFC41740: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41740u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059740u); -#endif - /* 0xBFC41740: 908E0000 lbu $t6, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 14, 0x10u); - PGXP_LOAD(0x908E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8028u); -#endif - /* 0xBFC41744: 00A37821 addu $t7, $a1, $v1 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[3]; - PGXP_ALU(0x00A37821u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41748: 2442FFFF addiu $v0, $v0, -1 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-1)); - PGXP_ALU(0x2442FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4174C: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005974Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41750: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41754: 1000FFF8 beq $zero, $zero, 0xBFC41738 */ - uint32_t psx_brA_BFC41754 = cpu->gpr[0]; uint32_t psx_brB_BFC41754 = cpu->gpr[0]; - psx_taken_BFC41754 = (psx_brA_BFC41754 == psx_brB_BFC41754); - psx_delay_BFC41754 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC41758: A1EE0002 sb $t6, 2($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059758u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (2)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0002u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059758u); -#endif - if (psx_delay_BFC41754) { - psx_delay_BFC41754 = 0; - if (psx_taken_BFC41754) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059738u); - goto label_BFC41738; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005975Cu); - } -label_BFC4175C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4175Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4175Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005975Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4175C: 3418FFFF ori $t8, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x3418FFFFu, cpu->gpr[24], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005975Cu); -#endif -label_BFC41760: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41760u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41760: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41764: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059764u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC41768: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059768u); return; } g_debug_last_store_pc = 0x80059768u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4176C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005976Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41770: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059778u; /* jal link before delay slot */ - psx_delay_BFC41770 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41774: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059774u); -#endif - if (psx_delay_BFC41770) { - psx_delay_BFC41770 = 0; - cpu->gpr[31] = 0x80059778u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41778: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41778u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059778u); -#endif - /* 0xBFC41778: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059778u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059778u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4177C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005977Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41780: 03E00008 jr $ra */ - psx_delay_BFC41780 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41784: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059784u); -#endif - if (psx_delay_BFC41780) { - psx_delay_BFC41780 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41788(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41788u); - int psx_delay_BFC417B4 = 0; - int psx_delay_BFC417C4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC417BCu: goto label_BFC417BC; - default: break; - } - } -label_BFC41788: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41788u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41788: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059788u); -#endif - /* 0xBFC4178C: 8DCEEE58 lw $t6, -4520($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005978Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005978Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41790: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41794: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059794u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41798: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059798u); return; } g_debug_last_store_pc = 0x80059798u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059798u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4179C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005979Cu); return; } g_debug_last_store_pc = 0x8005979Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005979Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC417A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800597A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC417A4: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x800597A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC417A8: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800597A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC417AC: AC2FEE58 sw $t7, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597ACu); return; } g_debug_last_store_pc = 0x800597ACu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800597ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC417B0: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800597B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC417B4: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800597BCu; /* jal link before delay slot */ - psx_delay_BFC417B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC417B8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800597B8u); -#endif - if (psx_delay_BFC417B4) { - psx_delay_BFC417B4 = 0; - cpu->gpr[31] = 0x800597BCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC417BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC417BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC417BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597BCu); -#endif - /* 0xBFC417BC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597BCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800597BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC417C0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800597C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC417C4: 03E00008 jr $ra */ - psx_delay_BFC417C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC417C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800597C8u); -#endif - if (psx_delay_BFC417C4) { - psx_delay_BFC417C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC417CC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC417CCu); - int psx_delay_BFC417EC = 0; - int psx_delay_BFC417FC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC417F4u: goto label_BFC417F4; - default: break; - } - } -label_BFC417CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC417CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC417CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC417CC: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800597CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597D0u); -#endif - /* 0xBFC417D0: 8DCEEE58 lw $t6, -4520($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597D0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800597D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC417D4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800597D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC417D8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597D8u); return; } g_debug_last_store_pc = 0x800597D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800597D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC417DC: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800597DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC417E0: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800597E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC417E4: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x800597E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC417E8: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x800597E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC417EC: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x800597F4u; /* jal link before delay slot */ - psx_delay_BFC417EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC417F0: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597F0u); return; } g_debug_last_store_pc = 0x800597F0u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800597F0u); -#endif - if (psx_delay_BFC417EC) { - psx_delay_BFC417EC = 0; - cpu->gpr[31] = 0x800597F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC417F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC417F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC417F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800597F4u); -#endif - /* 0xBFC417F4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800597F4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800597F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC417F8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800597F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC417FC: 03E00008 jr $ra */ - psx_delay_BFC417FC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41800: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059800u); -#endif - if (psx_delay_BFC417FC) { - psx_delay_BFC417FC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41804(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41804u); - int psx_delay_BFC41830 = 0; - int psx_delay_BFC41840 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41838u: goto label_BFC41838; - default: break; - } - } -label_BFC41804: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41804u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41804: 3C0E800E lui $t6, 0x800E */ - cpu->gpr[14] = 0x800E0000u; - PGXP_ALU(0x3C0E800Eu, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059804u); -#endif - /* 0xBFC41808: 8DCEEE58 lw $t6, -4520($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -4520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059808u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCEEE58u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059808u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4180C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005980Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41810: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41814: AC2EEE54 sw $t6, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059814u); return; } g_debug_last_store_pc = 0x80059814u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEE54u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41818: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059818u); return; } g_debug_last_store_pc = 0x80059818u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4181C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005981Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC41820: 340FFFFF ori $t7, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340FFFFFu, cpu->gpr[15], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059820u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41824: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC41828: AC2FEE58 sw $t7, -4520($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059828u); return; } g_debug_last_store_pc = 0x80059828u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FEE58u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4182C: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005982Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41830: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059838u; /* jal link before delay slot */ - psx_delay_BFC41830 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41834: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059834u); -#endif - if (psx_delay_BFC41830) { - psx_delay_BFC41830 = 0; - cpu->gpr[31] = 0x80059838u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059838u); -#endif - /* 0xBFC41838: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059838u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4183C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005983Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41840: 03E00008 jr $ra */ - psx_delay_BFC41840 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41844: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059844u); -#endif - if (psx_delay_BFC41840) { - psx_delay_BFC41840 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41848(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41848u); - int psx_delay_BFC41864 = 0; - int psx_taken_BFC41864 = 0; - int psx_delay_BFC4186C = 0; - int psx_delay_BFC41874 = 0; - int psx_taken_BFC41874 = 0; - int psx_delay_BFC41884 = 0; - int psx_delay_BFC418BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4186Cu: goto label_BFC4186C; - case 0xBFC41874u: goto label_BFC41874; - case 0xBFC4187Cu: goto label_BFC4187C; - case 0xBFC41880u: goto label_BFC41880; - case 0xBFC4188Cu: goto label_BFC4188C; - case 0xBFC418B8u: goto label_BFC418B8; - default: break; - } - } -label_BFC41848: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41848u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41848: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059848u); -#endif - /* 0xBFC4184C: 8DCE9C28 lw $t6, -25560($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005984Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C28u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005984Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41850: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41854: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059854u); return; } g_debug_last_store_pc = 0x80059854u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059854u); -#endif - /* 0xBFC41858: 91C20000 lbu $v0, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[14] + (0)), 2, 0x4000u); - PGXP_LOAD(0x91C20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4185C: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005985Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC41860: 304F0008 andi $t7, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[15] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304F0008u, cpu->gpr[15], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80059860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC41864: 11E10006 beq $t7, $at, 0xBFC41880 */ - uint32_t psx_brA_BFC41864 = cpu->gpr[15]; uint32_t psx_brB_BFC41864 = cpu->gpr[1]; - psx_taken_BFC41864 = (psx_brA_BFC41864 == psx_brB_BFC41864); - psx_delay_BFC41864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41868: 24180F14 addiu $t8, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x24180F14u, cpu->gpr[24], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0x80059868u); -#endif - if (psx_delay_BFC41864) { - psx_delay_BFC41864 = 0; - if (psx_taken_BFC41864) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059880u); - goto label_BFC41880; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005986Cu); - } -label_BFC4186C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4186Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4186Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005986Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4186C: 0C016701 jal 0xB0059C04 */ - cpu->gpr[31] = 0x80059874u; /* jal link before delay slot */ - psx_delay_BFC4186C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41870: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059870u); -#endif - if (psx_delay_BFC4186C) { - psx_delay_BFC4186C = 0; - cpu->gpr[31] = 0x80059874u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C04u); - cpu->pc = 0x80059C04u; return; - } -label_BFC41874: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41874u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41874: 10000010 beq $zero, $zero, 0xBFC418B8 */ - uint32_t psx_brA_BFC41874 = cpu->gpr[0]; uint32_t psx_brB_BFC41874 = cpu->gpr[0]; - psx_taken_BFC41874 = (psx_brA_BFC41874 == psx_brB_BFC41874); - psx_delay_BFC41874 = 1; - /* 0xBFC41878: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059878u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059878u); -#endif - if (psx_delay_BFC41874) { - psx_delay_BFC41874 = 0; - if (psx_taken_BFC41874) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800598B8u); - goto label_BFC418B8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005987Cu); - } -label_BFC4187C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4187Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4187Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005987Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC4187C: 24180F14 addiu $t8, $zero, 3860 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); - PGXP_ALU(0x24180F14u, cpu->gpr[24], _pgx1, 0x00000F14u); } -#ifdef PSX_COSIM - cosim_instr(0x8005987Cu); -#endif -label_BFC41880: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41880u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41880: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41884: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x8005988Cu; /* jal link before delay slot */ - psx_delay_BFC41884 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC41888: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059888u); return; } g_debug_last_store_pc = 0x80059888u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059888u); -#endif - if (psx_delay_BFC41884) { - psx_delay_BFC41884 = 0; - cpu->gpr[31] = 0x8005988Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC4188C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4188Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4188Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005988Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC4188C: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005988Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059890u); -#endif - /* 0xBFC41890: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059890u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC41894: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059894u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC41898: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059898u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059898u); -#endif - /* 0xBFC4189C: 8D089C30 lw $t0, -25552($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005989Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089C30u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005989Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC418A0: 3C0A8008 lui $t2, 0x8008 */ - cpu->gpr[10] = 0x80080000u; - PGXP_ALU(0x3C0A8008u, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800598A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC418A4: A1000000 sb $zero, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800598A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x800598A4u); -#endif - /* 0xBFC418A8: 8D4A9C2C lw $t2, -25556($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598A8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4A9C2Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x800598A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC418AC: 24090014 addiu $t1, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24090014u, cpu->gpr[9], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x800598ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC418B0: A1490000 sb $t1, 0($t2) */ - { uint32_t _pgxa = cpu->gpr[10]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800598B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[10] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA1490000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x800598B0u); -#endif - /* 0xBFC418B4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800598B4u); -#endif -label_BFC418B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC418B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC418B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC418B8: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x800598B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC418BC: 03E00008 jr $ra */ - psx_delay_BFC418BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC418C0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800598C0u); -#endif - if (psx_delay_BFC418BC) { - psx_delay_BFC418BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC418C4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC418C4u); - int psx_delay_BFC418EC = 0; - int psx_delay_BFC41924 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC418F4u: goto label_BFC418F4; - default: break; - } - } -label_BFC418C4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC418C4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC418C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC418C4: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800598C4u); -#endif - /* 0xBFC418C8: 8C639C2C lw $v1, -25556($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C2Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800598C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC418CC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x800598CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC418D0: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598D0u); return; } g_debug_last_store_pc = 0x800598D0u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800598D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC418D4: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800598D4u); -#endif - /* 0xBFC418D8: 8C42EE94 lw $v0, -4460($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4460; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598D8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EE94u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x800598D8u); -#endif - /* 0xBFC418DC: 906E0000 lbu $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 14, 0x8u); - PGXP_LOAD(0x906E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800598DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC418E0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x800598E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC418E4: A04E0000 sb $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800598E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA04E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x800598E4u); -#endif - /* 0xBFC418E8: 906F0000 lbu $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 15, 0x8u); - PGXP_LOAD(0x906F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800598E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC418EC: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800598F4u; /* jal link before delay slot */ - psx_delay_BFC418EC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8004u); -#endif - /* 0xBFC418F0: A04F0001 sb $t7, 1($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800598F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA04F0001u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x800598F0u); -#endif - if (psx_delay_BFC418EC) { - psx_delay_BFC418EC = 0; - cpu->gpr[31] = 0x800598F4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC418F4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC418F4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC418F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800598F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC418F4: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800598F4u); -#endif - /* 0xBFC418F8: 8F189C28 lw $t8, -25560($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800598F8u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C28u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x800598F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200u); -#endif - /* 0xBFC418FC: 3C098008 lui $t1, 0x8008 */ - cpu->gpr[9] = 0x80080000u; - PGXP_ALU(0x3C098008u, cpu->gpr[9], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800598FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41900: A3000000 sb $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059900u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[24] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059900u); -#endif - /* 0xBFC41904: 8D299C2C lw $t1, -25556($t1) */ - { uint32_t _pgxa = cpu->gpr[9] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059904u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x200u); } - PGXP_LOAD(0x8D299C2Cu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059904u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC41908: 24190013 addiu $t9, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24190013u, cpu->gpr[25], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80059908u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4190C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005990Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC41910: AC39EE54 sw $t9, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059910u); return; } g_debug_last_store_pc = 0x80059910u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39EE54u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC41914: 24080013 addiu $t0, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24080013u, cpu->gpr[8], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x80059914u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC41918: A1280000 sb $t0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059918u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[9] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA1280000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059918u); -#endif - /* 0xBFC4191C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005991Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005991Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41920: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x80059920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41924: 03E00008 jr $ra */ - psx_delay_BFC41924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41928: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059928u); -#endif - if (psx_delay_BFC41924) { - psx_delay_BFC41924 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC4192C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4192Cu); - int psx_delay_BFC419B0 = 0; - int psx_taken_BFC419B0 = 0; - int psx_delay_BFC419B8 = 0; - int psx_delay_BFC419C0 = 0; - int psx_taken_BFC419C0 = 0; - int psx_delay_BFC419F4 = 0; - int psx_delay_BFC41A3C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC419B8u: goto label_BFC419B8; - case 0xBFC419C0u: goto label_BFC419C0; - case 0xBFC419C8u: goto label_BFC419C8; - case 0xBFC419FCu: goto label_BFC419FC; - case 0xBFC41A38u: goto label_BFC41A38; - default: break; - } - } -label_BFC4192C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4192Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4192Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005992Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC4192C: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005992Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059930u); -#endif - /* 0xBFC41930: 8CE79C2C lw $a3, -25556($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059930u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79C2Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80059930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41934: 27BDFFD0 addiu $sp, $sp, -48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-48)); - PGXP_ALU(0x27BDFFD0u, cpu->gpr[29], _pgx1, 0xFFFFFFD0u); } -#ifdef PSX_COSIM - cosim_instr(0x80059934u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41938: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059938u); return; } g_debug_last_store_pc = 0x80059938u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059938u); -#endif - /* 0xBFC4193C: 90E20000 lbu $v0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 2, 0x80u); - PGXP_LOAD(0x90E20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005993Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41940: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC41944: 00021902 srl $v1, $v0, 4 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] >> 4u; - PGXP_ALU(0x00021902u, cpu->gpr[3], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059944u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xBu); -#endif - /* 0xBFC41948: 00600821 addu $at, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00600821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059948u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC4194C: 00011880 sll $v1, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[3] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00011880u, cpu->gpr[3], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005994Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41950: 00611821 addu $v1, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[1]; - PGXP_ALU(0x00611821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41954: 00031840 sll $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 1u; - PGXP_ALU(0x00031840u, cpu->gpr[3], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80059954u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41958: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059958u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC4195C: 304E000F andi $t6, $v0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFu; - PGXP_ALU(0x304E000Fu, cpu->gpr[14], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8005995Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4008u); -#endif - /* 0xBFC41960: 006E1821 addu $v1, $v1, $t6 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[14]; - PGXP_ALU(0x006E1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41964: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059964u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41968: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059968u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC4196C: A023EEA2 sb $v1, -4446($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4446; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8005996Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4446)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EEA2u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005996Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059970u); -#endif - /* 0xBFC41970: 90E40000 lbu $a0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 4, 0x80u); - PGXP_LOAD(0x90E40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059970u); -#endif - /* 0xBFC41974: 8F189C28 lw $t8, -25560($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059974u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C28u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059974u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x30u); -#endif - /* 0xBFC41978: 00042902 srl $a1, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] >> 4u; - PGXP_ALU(0x00042902u, cpu->gpr[5], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059978u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x23u); -#endif - /* 0xBFC4197C: 00A00821 addu $at, $a1, $zero */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[5] + cpu->gpr[0]; - PGXP_ALU(0x00A00821u, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005997Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC41980: 00012880 sll $a1, $at, 2 */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[1] << 2u; - PGXP_ALU(0x00012880u, cpu->gpr[5], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80059980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC41984: 00A12821 addu $a1, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[1]; - PGXP_ALU(0x00A12821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059984u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41988: 00052840 sll $a1, $a1, 1 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 1u; - PGXP_ALU(0x00052840u, cpu->gpr[5], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x80059988u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4198C: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005998Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41990: 308F000F andi $t7, $a0, 0xF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] & 0xFu; - PGXP_ALU(0x308F000Fu, cpu->gpr[15], _pgx1, 0x000Fu); } -#ifdef PSX_COSIM - cosim_instr(0x80059990u); -#endif - /* 0xBFC41994: 93060000 lbu $a2, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[24] + (0)), 6, 0x1000000u); - PGXP_LOAD(0x93060000u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059994u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8020u); -#endif - /* 0xBFC41998: 00AF2821 addu $a1, $a1, $t7 */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[15]; - PGXP_ALU(0x00AF2821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059998u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4199C: 30A500FF andi $a1, $a1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFu; - PGXP_ALU(0x30A500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005999Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC419A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22u); -#endif - /* 0xBFC419A4: A025EEA3 sb $a1, -4445($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4445; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800599A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4445)), (uint8_t)(cpu->gpr[5] & 0xFFu)); - PGXP_STORE(0xA025EEA3u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x800599A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC419A8: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x800599A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000040u); -#endif - /* 0xBFC419AC: 30D90008 andi $t9, $a2, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[6] & 0x8u; - PGXP_ALU(0x30D90008u, cpu->gpr[25], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x800599ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC419B0: 13210005 beq $t9, $at, 0xBFC419C8 */ - uint32_t psx_brA_BFC419B0 = cpu->gpr[25]; uint32_t psx_brB_BFC419B0 = cpu->gpr[1]; - psx_taken_BFC419B0 = (psx_brA_BFC419B0 == psx_brB_BFC419B0); - psx_delay_BFC419B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC419B4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599B4u); -#endif - if (psx_delay_BFC419B0) { - psx_delay_BFC419B0 = 0; - if (psx_taken_BFC419B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800599C8u); - goto label_BFC419C8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800599B8u); - } -label_BFC419B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC419B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC419B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC419B8: 0C016701 jal 0xB0059C04 */ - cpu->gpr[31] = 0x800599C0u; /* jal link before delay slot */ - psx_delay_BFC419B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC419BC: A023EEA4 sb $v1, -4444($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4444; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800599BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4444)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EEA4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800599BCu); -#endif - if (psx_delay_BFC419B8) { - psx_delay_BFC419B8 = 0; - cpu->gpr[31] = 0x800599C0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C04u); - cpu->pc = 0x80059C04u; return; - } -label_BFC419C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC419C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC419C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC419C0: 1000001D beq $zero, $zero, 0xBFC41A38 */ - uint32_t psx_brA_BFC419C0 = cpu->gpr[0]; uint32_t psx_brB_BFC419C0 = cpu->gpr[0]; - psx_taken_BFC419C0 = (psx_brA_BFC419C0 == psx_brB_BFC419C0); - psx_delay_BFC419C0 = 1; - /* 0xBFC419C4: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800599C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x800599C4u); -#endif - if (psx_delay_BFC419C0) { - psx_delay_BFC419C0 = 0; - if (psx_taken_BFC419C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059A38u); - goto label_BFC41A38; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x800599C8u); - } -label_BFC419C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC419C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC419C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC419C8: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x800599C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC419CC: 0061001B divu $v1, $at */ - { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0061001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x800599CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC419D0: 24630001 addiu $v1, $v1, 1 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); - PGXP_ALU(0x24630001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x800599D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC419D4: 306300FF andi $v1, $v1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFu; - PGXP_ALU(0x306300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800599D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC419D8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC419DC: A023EEA4 sb $v1, -4444($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4444; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800599DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4444)), (uint8_t)(cpu->gpr[3] & 0xFFu)); - PGXP_STORE(0xA023EEA4u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x800599DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC419E0: 00004012 mflo $t0 */ - cpu->gpr[8] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00004012u, cpu->gpr[8], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x300u); -#endif - /* 0xBFC419E4: 00084900 sll $t1, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[8] << 4u; - PGXP_ALU(0x00084900u, cpu->gpr[9], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x800599E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x600u); -#endif - /* 0xBFC419E8: 312A00FF andi $t2, $t1, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[9] & 0xFFu; - PGXP_ALU(0x312A00FFu, cpu->gpr[10], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x800599E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC419EC: 00005810 mfhi $t3 */ - cpu->gpr[11] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00005810u, cpu->gpr[11], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC419F0: 014B6021 addu $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[11]; - PGXP_ALU(0x014B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x800599F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC419F4: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x800599FCu; /* jal link before delay slot */ - psx_delay_BFC419F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001000u); -#endif - /* 0xBFC419F8: A3AC0020 sb $t4, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800599F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (32)), (uint8_t)(cpu->gpr[12] & 0xFFu)); - PGXP_STORE(0xA3AC0020u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x800599F8u); -#endif - if (psx_delay_BFC419F4) { - psx_delay_BFC419F4 = 0; - cpu->gpr[31] = 0x800599FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC419FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC419FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC419FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x800599FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC419FC: 3C0D8008 lui $t5, 0x8008 */ - cpu->gpr[13] = 0x80080000u; - PGXP_ALU(0x3C0D8008u, cpu->gpr[13], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x800599FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A00u); -#endif - /* 0xBFC41A00: 8DAD9C28 lw $t5, -25560($t5) */ - { uint32_t _pgxa = cpu->gpr[13] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A00u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x2000u); } - PGXP_LOAD(0x8DAD9C28u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC41A04: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A04u); -#endif - /* 0xBFC41A08: 8CE79C2C lw $a3, -25556($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A08u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79C2Cu, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2001u); -#endif - /* 0xBFC41A0C: A1A00000 sb $zero, 0($t5) */ - { uint32_t _pgxa = cpu->gpr[13]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059A0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[13] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA1A00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41A10: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A10u); -#endif - /* 0xBFC41A14: 8DEF9C30 lw $t7, -25552($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A14u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C30u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A14u); -#endif - /* 0xBFC41A18: 93AE0020 lbu $t6, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; cpu->gpr[14] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (32)), 14, 0x20000000u); - PGXP_LOAD(0x93AE0020u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41A1C: 24180014 addiu $t8, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24180014u, cpu->gpr[24], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41A20: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC41A24: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059A24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC41A28: AC38EE54 sw $t8, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A28u); return; } g_debug_last_store_pc = 0x80059A28u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC38EE54u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC41A2C: 24190014 addiu $t9, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24190014u, cpu->gpr[25], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC41A30: A0F90000 sb $t9, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059A30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[25] & 0xFFu)); - PGXP_STORE(0xA0F90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A30u); -#endif - /* 0xBFC41A34: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A34u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A34u); -#endif -label_BFC41A38: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41A38u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41A38: 27BD0030 addiu $sp, $sp, 48 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (48)); - PGXP_ALU(0x27BD0030u, cpu->gpr[29], _pgx1, 0x00000030u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41A3C: 03E00008 jr $ra */ - psx_delay_BFC41A3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41A40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059A40u); -#endif - if (psx_delay_BFC41A3C) { - psx_delay_BFC41A3C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41A44(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41A44u); - int psx_delay_BFC41A5C = 0; - int psx_taken_BFC41A5C = 0; - int psx_delay_BFC41A84 = 0; - int psx_taken_BFC41A84 = 0; - int psx_delay_BFC41AC4 = 0; - int psx_taken_BFC41AC4 = 0; - int psx_delay_BFC41AE0 = 0; - int psx_delay_BFC41AE8 = 0; - int psx_taken_BFC41AE8 = 0; - int psx_delay_BFC41B08 = 0; - int psx_taken_BFC41B08 = 0; - int psx_delay_BFC41B10 = 0; - int psx_delay_BFC41B18 = 0; - int psx_taken_BFC41B18 = 0; - int psx_delay_BFC41B3C = 0; - int psx_taken_BFC41B3C = 0; - int psx_delay_BFC41B58 = 0; - int psx_delay_BFC41BA0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41A64u: goto label_BFC41A64; - case 0xBFC41A8Cu: goto label_BFC41A8C; - case 0xBFC41ABCu: goto label_BFC41ABC; - case 0xBFC41ACCu: goto label_BFC41ACC; - case 0xBFC41AE8u: goto label_BFC41AE8; - case 0xBFC41AF0u: goto label_BFC41AF0; - case 0xBFC41B10u: goto label_BFC41B10; - case 0xBFC41B18u: goto label_BFC41B18; - case 0xBFC41B20u: goto label_BFC41B20; - case 0xBFC41B24u: goto label_BFC41B24; - case 0xBFC41B44u: goto label_BFC41B44; - case 0xBFC41B48u: goto label_BFC41B48; - case 0xBFC41B60u: goto label_BFC41B60; - case 0xBFC41B9Cu: goto label_BFC41B9C; - default: break; - } - } -label_BFC41A44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41A44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41A44: 3C06800E lui $a2, 0x800E */ - cpu->gpr[6] = 0x800E0000u; - PGXP_ALU(0x3C06800Eu, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A44u); -#endif - /* 0xBFC41A48: 90C6EEA3 lbu $a2, -4445($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -4445; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (-4445)), 6, 0x40u); - PGXP_LOAD(0x90C6EEA3u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41A4C: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A50u); -#endif - /* 0xBFC41A50: 9084EEA4 lbu $a0, -4444($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -4444; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (-4444)), 4, 0x10u); - PGXP_LOAD(0x9084EEA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41A54: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4040u); -#endif - /* 0xBFC41A58: 24CE0002 addiu $t6, $a2, 2 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[6] + (2)); - PGXP_ALU(0x24CE0002u, cpu->gpr[14], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC41A5C: 148E000B bne $a0, $t6, 0xBFC41A8C */ - uint32_t psx_brA_BFC41A5C = cpu->gpr[4]; uint32_t psx_brB_BFC41A5C = cpu->gpr[14]; - psx_taken_BFC41A5C = (psx_brA_BFC41A5C != psx_brB_BFC41A5C); - psx_delay_BFC41A5C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41A60: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A60u); return; } g_debug_last_store_pc = 0x80059A60u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A60u); -#endif - if (psx_delay_BFC41A5C) { - psx_delay_BFC41A5C = 0; - if (psx_taken_BFC41A5C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059A8Cu); - goto label_BFC41A8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059A64u); - } -label_BFC41A64: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41A64u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41A64: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A64u); -#endif - /* 0xBFC41A68: 8CA59C2C lw $a1, -25556($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A68u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C2Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41A6C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A70u); -#endif - /* 0xBFC41A70: 8C63EE94 lw $v1, -4460($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4460; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A70u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE94u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A70u); -#endif - /* 0xBFC41A74: 90AF0000 lbu $t7, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[15] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 15, 0x20u); - PGXP_LOAD(0x90AF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41A78: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059A78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8008u); -#endif - /* 0xBFC41A7C: A06F0000 sb $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059A7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[15] & 0xFFu)); - PGXP_STORE(0xA06F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A80u); -#endif - /* 0xBFC41A80: 90B80000 lbu $t8, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[24] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 24, 0x20u); - PGXP_LOAD(0x90B80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41A84: 1000000D beq $zero, $zero, 0xBFC41ABC */ - uint32_t psx_brA_BFC41A84 = cpu->gpr[0]; uint32_t psx_brB_BFC41A84 = cpu->gpr[0]; - psx_taken_BFC41A84 = (psx_brA_BFC41A84 == psx_brB_BFC41A84); - psx_delay_BFC41A84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC41A88: A0780001 sb $t8, 1($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059A88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (1)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA0780001u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A88u); -#endif - if (psx_delay_BFC41A84) { - psx_delay_BFC41A84 = 0; - if (psx_taken_BFC41A84) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059ABCu); - goto label_BFC41ABC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059A8Cu); - } -label_BFC41A8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41A8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41A8C: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059A90u); -#endif - /* 0xBFC41A90: 8CA59C2C lw $a1, -25556($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A90u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C2Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41A94: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059A94u); -#endif - /* 0xBFC41A98: 8C63EE94 lw $v1, -4460($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -4460; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-4460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059A98u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C63EE94u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059A98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC41A9C: 0004C880 sll $t9, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[4] << 2u; - PGXP_ALU(0x0004C880u, cpu->gpr[25], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80059A9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AA0u); -#endif - /* 0xBFC41AA0: 90A80000 lbu $t0, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 8, 0x20u); - PGXP_LOAD(0x90A80000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000010u); -#endif - /* 0xBFC41AA4: 0324C823 subu $t9, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[25] = cpu->gpr[25] - cpu->gpr[4]; - PGXP_ALU(0x0324C823u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059AA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000Cu); -#endif - /* 0xBFC41AA8: 00791021 addu $v0, $v1, $t9 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[25]; - PGXP_ALU(0x00791021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059AA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC41AAC: A048FFFD sb $t0, -3($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059AACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-3)), (uint8_t)(cpu->gpr[8] & 0xFFu)); - PGXP_STORE(0xA048FFFDu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AB0u); -#endif - /* 0xBFC41AB0: 90A90000 lbu $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 9, 0x20u); - PGXP_LOAD(0x90A90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41AB4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059AB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x204u); -#endif - /* 0xBFC41AB8: A049FFFE sb $t1, -2($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059AB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-2)), (uint8_t)(cpu->gpr[9] & 0xFFu)); - PGXP_STORE(0xA049FFFEu, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AB8u); -#endif -label_BFC41ABC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41ABCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC41ABC: 24C30001 addiu $v1, $a2, 1 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); - PGXP_ALU(0x24C30001u, cpu->gpr[3], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059ABCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1Au); -#endif - /* 0xBFC41AC0: 0064082B sltu $at, $v1, $a0 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); - PGXP_ALU(0x0064082Bu, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41AC4: 1020000A beq $at, $zero, 0xBFC41AF0 */ - uint32_t psx_brA_BFC41AC4 = cpu->gpr[1]; uint32_t psx_brB_BFC41AC4 = cpu->gpr[0]; - psx_taken_BFC41AC4 = (psx_brA_BFC41AC4 == psx_brB_BFC41AC4); - psx_delay_BFC41AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41AC8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059AC8u); -#endif - if (psx_delay_BFC41AC4) { - psx_delay_BFC41AC4 = 0; - if (psx_taken_BFC41AC4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059AF0u); - goto label_BFC41AF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059ACCu); - } -label_BFC41ACC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41ACCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC41ACC: 340AFFFF ori $t2, $zero, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[0] | 0xFFFFu; - PGXP_ALU(0x340AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059ACCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41AD0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41AD4: 3C04F000 lui $a0, 0xF000 */ - cpu->gpr[4] = 0xF0000000u; - PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059AD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x402u); -#endif - /* 0xBFC41AD8: AC2AEE54 sw $t2, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059AD8u); return; } g_debug_last_store_pc = 0x80059AD8u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC2AEE54u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41ADC: 34840003 ori $a0, $a0, 0x3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x3u; - PGXP_ALU(0x34840003u, cpu->gpr[4], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059ADCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41AE0: 0C016AE4 jal 0xB005AB90 */ - cpu->gpr[31] = 0x80059AE8u; /* jal link before delay slot */ - psx_delay_BFC41AE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC41AE4: 24050020 addiu $a1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24050020u, cpu->gpr[5], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059AE4u); -#endif - if (psx_delay_BFC41AE0) { - psx_delay_BFC41AE0 = 0; - cpu->gpr[31] = 0x80059AE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AB90u); - cpu->pc = 0x8005AB90u; return; - } -label_BFC41AE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41AE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41AE8: 1000002C beq $zero, $zero, 0xBFC41B9C */ - uint32_t psx_brA_BFC41AE8 = cpu->gpr[0]; uint32_t psx_brB_BFC41AE8 = cpu->gpr[0]; - psx_taken_BFC41AE8 = (psx_brA_BFC41AE8 == psx_brB_BFC41AE8); - psx_delay_BFC41AE8 = 1; - /* 0xBFC41AEC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059AECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AECu); -#endif - if (psx_delay_BFC41AE8) { - psx_delay_BFC41AE8 = 0; - if (psx_taken_BFC41AE8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B9Cu); - goto label_BFC41B9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059AF0u); - } -label_BFC41AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC41AF0: 3C0B8008 lui $t3, 0x8008 */ - cpu->gpr[11] = 0x80080000u; - PGXP_ALU(0x3C0B8008u, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059AF0u); -#endif - /* 0xBFC41AF4: 8D6B9C28 lw $t3, -25560($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059AF4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6B9C28u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41AF8: 24010008 addiu $at, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24010008u, cpu->gpr[1], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80059AF8u); -#endif - /* 0xBFC41AFC: 91620000 lbu $v0, 0($t3) */ - { uint32_t _pgxa = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (0)), 2, 0x800u); - PGXP_LOAD(0x91620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059AFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41B00: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1004u); -#endif - /* 0xBFC41B04: 304C0008 andi $t4, $v0, 0x8 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[12] = cpu->gpr[2] & 0x8u; - PGXP_ALU(0x304C0008u, cpu->gpr[12], _pgx1, 0x0008u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC41B08: 11810006 beq $t4, $at, 0xBFC41B24 */ - uint32_t psx_brA_BFC41B08 = cpu->gpr[12]; uint32_t psx_brB_BFC41B08 = cpu->gpr[1]; - psx_taken_BFC41B08 = (psx_brA_BFC41B08 == psx_brB_BFC41B08); - psx_delay_BFC41B08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41B0C: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80059B0Cu); -#endif - if (psx_delay_BFC41B08) { - psx_delay_BFC41B08 = 0; - if (psx_taken_BFC41B08) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B24u); - goto label_BFC41B24; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B10u); - } -label_BFC41B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41B10: 0C016701 jal 0xB0059C04 */ - cpu->gpr[31] = 0x80059B18u; /* jal link before delay slot */ - psx_delay_BFC41B10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41B14: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059B14u); -#endif - if (psx_delay_BFC41B10) { - psx_delay_BFC41B10 = 0; - cpu->gpr[31] = 0x80059B18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C04u); - cpu->pc = 0x80059C04u; return; - } -label_BFC41B18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41B18: 10000020 beq $zero, $zero, 0xBFC41B9C */ - uint32_t psx_brA_BFC41B18 = cpu->gpr[0]; uint32_t psx_brB_BFC41B18 = cpu->gpr[0]; - psx_taken_BFC41B18 = (psx_brA_BFC41B18 == psx_brB_BFC41B18); - psx_delay_BFC41B18 = 1; - /* 0xBFC41B1C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B1Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B1Cu); -#endif - if (psx_delay_BFC41B18) { - psx_delay_BFC41B18 = 0; - if (psx_taken_BFC41B18) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B9Cu); - goto label_BFC41B9C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B20u); - } -label_BFC41B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41B20: 2401000A addiu $at, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2401000Au, cpu->gpr[1], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x80059B20u); -#endif -label_BFC41B24: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B24u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41B24: 0081001B divu $a0, $at */ - { uint32_t psx_n = cpu->gpr[4]; uint32_t psx_d = cpu->gpr[1]; if (psx_d == 0) { cpu->lo = 0xFFFFFFFFu; cpu->hi = psx_n; } else { uint32_t psx_q = psx_n / psx_d; uint32_t psx_r = psx_n - (psx_q * psx_d); cpu->lo = psx_q; cpu->hi = psx_r; } } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_set(cpu, 37u); -#endif - PGXP_MULDIV(0x0081001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[1]); -#ifdef PSX_COSIM - cosim_instr(0x80059B24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000u); -#endif - /* 0xBFC41B28: 00006812 mflo $t5 */ - cpu->gpr[13] = cpu->lo; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x00006812u, cpu->gpr[13], cpu->lo, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC41B2C: 000D7100 sll $t6, $t5, 4 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] << 4u; - PGXP_ALU(0x000D7100u, cpu->gpr[14], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC41B30: 31CF00FF andi $t7, $t6, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0xFFu; - PGXP_ALU(0x31CF00FFu, cpu->gpr[15], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41B34: 0000C010 mfhi $t8 */ - cpu->gpr[24] = cpu->hi; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_muldiv_stall(cpu); -#endif - PGXP_ALU(0x0000C010u, cpu->gpr[24], cpu->hi, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008004u); -#endif - /* 0xBFC41B38: 01F81021 addu $v0, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[2] = cpu->gpr[15] + cpu->gpr[24]; - PGXP_ALU(0x01F81021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059B38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x18u); -#endif - /* 0xBFC41B3C: 14830002 bne $a0, $v1, 0xBFC41B48 */ - uint32_t psx_brA_BFC41B3C = cpu->gpr[4]; uint32_t psx_brB_BFC41B3C = cpu->gpr[3]; - psx_taken_BFC41B3C = (psx_brA_BFC41B3C != psx_brB_BFC41B3C); - psx_delay_BFC41B3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41B40: 304200FF andi $v0, $v0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0xFFu; - PGXP_ALU(0x304200FFu, cpu->gpr[2], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059B40u); -#endif - if (psx_delay_BFC41B3C) { - psx_delay_BFC41B3C = 0; - if (psx_taken_BFC41B3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B48u); - goto label_BFC41B48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059B44u); - } -label_BFC41B44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41B44: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059B44u); -#endif -label_BFC41B48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41B48: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41B4C: 308400FF andi $a0, $a0, 0xFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFu; - PGXP_ALU(0x308400FFu, cpu->gpr[4], _pgx1, 0x00FFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059B4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41B50: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41B54: A024EEA4 sb $a0, -4444($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4444; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059B54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[1] + (-4444)), (uint8_t)(cpu->gpr[4] & 0xFFu)); - PGXP_STORE(0xA024EEA4u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41B58: 0C016703 jal 0xB0059C0C */ - cpu->gpr[31] = 0x80059B60u; /* jal link before delay slot */ - psx_delay_BFC41B58 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000004u); -#endif - /* 0xBFC41B5C: A3A20018 sb $v0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059B5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (24)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA3A20018u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B5Cu); -#endif - if (psx_delay_BFC41B58) { - psx_delay_BFC41B58 = 0; - cpu->gpr[31] = 0x80059B60u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C0Cu); - cpu->pc = 0x80059C0Cu; return; - } -label_BFC41B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC41B60: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B60u); -#endif - /* 0xBFC41B64: 8F399C28 lw $t9, -25560($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B64u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C28u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41B68: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B68u); -#endif - /* 0xBFC41B6C: 8CA59C2C lw $a1, -25556($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C2Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B70u); -#endif - /* 0xBFC41B70: 93A20018 lbu $v0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (24)), 2, 0x20000000u); - PGXP_LOAD(0x93A20018u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC41B74: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC41B78: A3200000 sb $zero, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059B78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); - PGXP_STORE(0xA3200000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B78u); -#endif - /* 0xBFC41B7C: 8D089C30 lw $t0, -25552($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25552; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B7Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089C30u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC41B80: 24090014 addiu $t1, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24090014u, cpu->gpr[9], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41B84: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059B84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC41B88: A1020000 sb $v0, 0($t0) */ - { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059B88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); - PGXP_STORE(0xA1020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x202u); -#endif - /* 0xBFC41B8C: AC29EE54 sw $t1, -4524($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B8Cu); return; } g_debug_last_store_pc = 0x80059B8Cu; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC29EE54u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC41B90: 240A0014 addiu $t2, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x240A0014u, cpu->gpr[10], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x420u); -#endif - /* 0xBFC41B94: A0AA0000 sb $t2, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059B94u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[10] & 0xFFu)); - PGXP_STORE(0xA0AA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B94u); -#endif - /* 0xBFC41B98: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059B98u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059B98u); -#endif -label_BFC41B9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41B9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41B9C: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059B9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41BA0: 03E00008 jr $ra */ - psx_delay_BFC41BA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41BA4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059BA4u); -#endif - if (psx_delay_BFC41BA0) { - psx_delay_BFC41BA0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41BA8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41BA8u); - int psx_delay_BFC41BFC = 0; -label_BFC41BA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41BA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41BA8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BA8u); -#endif - /* 0xBFC41BAC: 8C639C3C lw $v1, -25540($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639C3Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41BB0: 3C0100FF lui $at, 0xFF */ - cpu->gpr[1] = 0x00FF0000u; - PGXP_ALU(0x3C0100FFu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BB0u); -#endif - /* 0xBFC41BB4: 8C620000 lw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } - PGXP_LOAD(0x8C620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41BB8: 3421FFFF ori $at, $at, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[1]; cpu->gpr[1] = cpu->gpr[1] | 0xFFFFu; - PGXP_ALU(0x3421FFFFu, cpu->gpr[1], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059BB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41BBC: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41BC0: 00411024 and $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[1]; - PGXP_ALU(0x00411024u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059BC0u); -#endif - /* 0xBFC41BC4: 8CC69C38 lw $a2, -25544($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BC4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69C38u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80u); -#endif - /* 0xBFC41BC8: 3C078008 lui $a3, 0x8008 */ - cpu->gpr[7] = 0x80080000u; - PGXP_ALU(0x3C078008u, cpu->gpr[7], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41BCC: 3C010088 lui $at, 0x88 */ - cpu->gpr[1] = 0x00880000u; - PGXP_ALU(0x3C010088u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BD0u); -#endif - /* 0xBFC41BD0: 8CE79C40 lw $a3, -25536($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + -25536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (-25536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BD0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } - PGXP_LOAD(0x8CE79C40u, _pgxa, cpu->gpr[7]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC41BD4: 00411025 or $v0, $v0, $at */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[1]; - PGXP_ALU(0x00411025u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059BD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC41BD8: AC620000 sw $v0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BD8u); return; } g_debug_last_store_pc = 0x80059BD8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BD8u); -#endif - /* 0xBFC41BDC: 8CC20000 lw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BDCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } - PGXP_LOAD(0x8CC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41BE0: 3C010001 lui $at, 0x1 */ - cpu->gpr[1] = 0x00010000u; - PGXP_ALU(0x3C010001u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41BE4: 34428000 ori $v0, $v0, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x8000u; - PGXP_ALU(0x34428000u, cpu->gpr[2], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059BE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x44u); -#endif - /* 0xBFC41BE8: ACC20000 sw $v0, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BE8u); return; } g_debug_last_store_pc = 0x80059BE8u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4022u); -#endif - /* 0xBFC41BEC: 00A17025 or $t6, $a1, $at */ - { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = cpu->gpr[5] | cpu->gpr[1]; - PGXP_ALU(0x00A17025u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059BECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x90u); -#endif - /* 0xBFC41BF0: ACE40000 sw $a0, 0($a3) */ - { uint32_t _pgxa = cpu->gpr[7]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BF0u); return; } g_debug_last_store_pc = 0x80059BF0u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xACE40000u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41BF4: 3C0F1100 lui $t7, 0x1100 */ - cpu->gpr[15] = 0x11000000u; - PGXP_ALU(0x3C0F1100u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059BF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4080u); -#endif - /* 0xBFC41BF8: ACEE0004 sw $t6, 4($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059BF8u); return; } g_debug_last_store_pc = 0x80059BF8u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xACEE0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059BF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41BFC: 03E00008 jr $ra */ - psx_delay_BFC41BFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8080u); -#endif - /* 0xBFC41C00: ACEF0008 sw $t7, 8($a3) */ - { uint32_t _pgxa = cpu->gpr[7] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C00u); return; } g_debug_last_store_pc = 0x80059C00u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACEF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C00u); -#endif - if (psx_delay_BFC41BFC) { - psx_delay_BFC41BFC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41C04(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41C04u); - int psx_delay_BFC41C04 = 0; -label_BFC41C04: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C04u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41C04: 03E00008 jr $ra */ - psx_delay_BFC41C04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C08: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C08u); -#endif - if (psx_delay_BFC41C04) { - psx_delay_BFC41C04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41C0C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41C0Cu); - int psx_delay_BFC41C40 = 0; - int psx_taken_BFC41C40 = 0; - int psx_delay_BFC41C70 = 0; - int psx_taken_BFC41C70 = 0; - int psx_delay_BFC41C78 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41C48u: goto label_BFC41C48; - case 0xBFC41C4Cu: goto label_BFC41C4C; - case 0xBFC41C78u: goto label_BFC41C78; - default: break; - } - } -label_BFC41C0C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C0Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41C0C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059C0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C10u); -#endif - /* 0xBFC41C10: 8DEF9C28 lw $t7, -25560($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C10u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9C28u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41C14: 240E0001 addiu $t6, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC41C18: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059C18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC41C1C: A1EE0000 sb $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059C1Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[15] + (0)), (uint8_t)(cpu->gpr[14] & 0xFFu)); - PGXP_STORE(0xA1EE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C20u); -#endif - /* 0xBFC41C20: 8F399C34 lw $t9, -25548($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C20u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C34u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41C24: 24180040 addiu $t8, $zero, 64 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (64)); - PGXP_ALU(0x24180040u, cpu->gpr[24], _pgx1, 0x00000040u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41C28: 27BDFFF8 addiu $sp, $sp, -8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-8)); - PGXP_ALU(0x27BDFFF8u, cpu->gpr[29], _pgx1, 0xFFFFFFF8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C28u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC41C2C: A3380000 sb $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80059C2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (0)), (uint8_t)(cpu->gpr[24] & 0xFFu)); - PGXP_STORE(0xA3380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000001u); -#endif - /* 0xBFC41C30: AFA00004 sw $zero, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C30u); return; } g_debug_last_store_pc = 0x80059C30u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAFA00004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C30u); -#endif - /* 0xBFC41C34: 8FA80004 lw $t0, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C34u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } - PGXP_LOAD(0x8FA80004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C38: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x102u); -#endif - /* 0xBFC41C3C: 29010004 slti $at, $t0, 4 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (4) ? 1 : 0); - PGXP_ALU(0x29010004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41C40: 1020000D beq $at, $zero, 0xBFC41C78 */ - uint32_t psx_brA_BFC41C40 = cpu->gpr[1]; uint32_t psx_brB_BFC41C40 = cpu->gpr[0]; - psx_taken_BFC41C40 = (psx_brA_BFC41C40 == psx_brB_BFC41C40); - psx_delay_BFC41C40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C44: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C44u); -#endif - if (psx_delay_BFC41C40) { - psx_delay_BFC41C40 = 0; - if (psx_taken_BFC41C40) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C78u); - goto label_BFC41C78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C48u); - } -label_BFC41C48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C48u); -#endif - /* 0xBFC41C48: 8FA90004 lw $t1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C48u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C48u); -#endif -label_BFC41C4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C4C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC41C50: AC090000 sw $t1, 0($zero) */ - { uint32_t _pgxa = cpu->gpr[0]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C50u); return; } g_debug_last_store_pc = 0x80059C50u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC090000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C50u); -#endif - /* 0xBFC41C54: 8FAA0004 lw $t2, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C54u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x20000000u); } - PGXP_LOAD(0x8FAA0004u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC41C5C: 254B0001 addiu $t3, $t2, 1 */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); - PGXP_ALU(0x254B0001u, cpu->gpr[11], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000800u); -#endif - /* 0xBFC41C60: AFAB0004 sw $t3, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C60u); return; } g_debug_last_store_pc = 0x80059C60u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAFAB0004u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C60u); -#endif - /* 0xBFC41C64: 8FAC0004 lw $t4, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C64u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20000000u); } - PGXP_LOAD(0x8FAC0004u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41C68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059C68u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1002u); -#endif - /* 0xBFC41C6C: 29810004 slti $at, $t4, 4 */ - { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[12] < (4) ? 1 : 0); - PGXP_ALU(0x29810004u, cpu->gpr[1], _pgx1, 0x0004u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41C70: 1420FFF6 bne $at, $zero, 0xBFC41C4C */ - uint32_t psx_brA_BFC41C70 = cpu->gpr[1]; uint32_t psx_brB_BFC41C70 = cpu->gpr[0]; - psx_taken_BFC41C70 = (psx_brA_BFC41C70 != psx_brB_BFC41C70); - psx_delay_BFC41C70 = 1; - /* 0xBFC41C74: 8FA90004 lw $t1, 4($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C74u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20000000u); } - PGXP_LOAD(0x8FA90004u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C74u); -#endif - if (psx_delay_BFC41C70) { - psx_delay_BFC41C70 = 0; - if (psx_taken_BFC41C70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C4Cu); - goto label_BFC41C4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059C78u); - } -label_BFC41C78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41C78: 03E00008 jr $ra */ - psx_delay_BFC41C78 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41C7C: 27BD0008 addiu $sp, $sp, 8 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (8)); - PGXP_ALU(0x27BD0008u, cpu->gpr[29], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C7Cu); -#endif - if (psx_delay_BFC41C78) { - psx_delay_BFC41C78 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41C80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41C80u); - int psx_delay_BFC41CB0 = 0; - int psx_taken_BFC41CB0 = 0; - int psx_delay_BFC41CC0 = 0; - int psx_taken_BFC41CC0 = 0; - int psx_delay_BFC41CCC = 0; - int psx_taken_BFC41CCC = 0; - int psx_delay_BFC41CD4 = 0; - int psx_taken_BFC41CD4 = 0; - int psx_delay_BFC41CEC = 0; - int psx_delay_BFC41D10 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41CB8u: goto label_BFC41CB8; - case 0xBFC41CC8u: goto label_BFC41CC8; - case 0xBFC41CD4u: goto label_BFC41CD4; - case 0xBFC41CDCu: goto label_BFC41CDC; - case 0xBFC41CF4u: goto label_BFC41CF4; - default: break; - } - } -label_BFC41C80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41C80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41C80: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059C80u); -#endif - /* 0xBFC41C84: 8CA59C7C lw $a1, -25476($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C84u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C7Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41C88: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41C8C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059C8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059C90u); -#endif - /* 0xBFC41C90: 8DCE9C80 lw $t6, -25472($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C90u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9C80u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41C94: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C94u); return; } g_debug_last_store_pc = 0x80059C94u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059C94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41C98: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059C98u); -#endif - /* 0xBFC41C9C: 8CA00000 lw $zero, 0($a1) */ - { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059C9Cu); return; } (void)psx_cyc_load_word(cpu, psx_addr, 0, 0x20u); } -#ifdef PSX_COSIM - cosim_instr(0x80059C9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CA0u); -#endif - /* 0xBFC41CA0: 8F189C84 lw $t8, -25468($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25468; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CA0u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C84u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CA0u); -#endif - /* 0xBFC41CA4: 8DCF0000 lw $t7, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CA4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x19u); -#endif - /* 0xBFC41CA8: 00801821 addu $v1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059CA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008040u); -#endif - /* 0xBFC41CAC: 01F83023 subu $a2, $t7, $t8 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[6] = cpu->gpr[15] - cpu->gpr[24]; - PGXP_ALU(0x01F83023u, cpu->gpr[6], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059CACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41CB0: 04610005 bgez $v1, 0xBFC41CC8 */ - uint32_t psx_brA_BFC41CB0 = cpu->gpr[3]; - psx_taken_BFC41CB0 = ((int32_t)psx_brA_BFC41CB0 >= 0); - psx_delay_BFC41CB0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41CB4: 30C6FFFF andi $a2, $a2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFFFFu; - PGXP_ALU(0x30C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059CB4u); -#endif - if (psx_delay_BFC41CB0) { - psx_delay_BFC41CB0 = 0; - if (psx_taken_BFC41CB0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CC8u); - goto label_BFC41CC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CB8u); - } -label_BFC41CB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41CB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41CB8: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059CB8u); -#endif - /* 0xBFC41CBC: 8C429D9C lw $v0, -25188($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429D9Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41CC0: 10000035 beq $zero, $zero, 0xBFC41D98 */ - uint32_t psx_brA_BFC41CC0 = cpu->gpr[0]; uint32_t psx_brB_BFC41CC0 = cpu->gpr[0]; - psx_taken_BFC41CC0 = (psx_brA_BFC41CC0 == psx_brB_BFC41CC0); - psx_delay_BFC41CC0 = 1; - /* 0xBFC41CC4: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CC4u); -#endif - if (psx_delay_BFC41CC0) { - psx_delay_BFC41CC0 = 0; - if (psx_taken_BFC41CC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D98u); - cpu->pc = 0x80059D98u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CC8u); - } -label_BFC41CC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41CC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41CC8: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059CC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xAu); -#endif - /* 0xBFC41CCC: 14610003 bne $v1, $at, 0xBFC41CDC */ - uint32_t psx_brA_BFC41CCC = cpu->gpr[3]; uint32_t psx_brB_BFC41CCC = cpu->gpr[1]; - psx_taken_BFC41CCC = (psx_brA_BFC41CCC != psx_brB_BFC41CCC); - psx_delay_BFC41CCC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41CD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059CD0u); -#endif - if (psx_delay_BFC41CCC) { - psx_delay_BFC41CCC = 0; - if (psx_taken_BFC41CCC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CDCu); - goto label_BFC41CDC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CD4u); - } -label_BFC41CD4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41CD4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41CD4: 1000002F beq $zero, $zero, 0xBFC41D94 */ - uint32_t psx_brA_BFC41CD4 = cpu->gpr[0]; uint32_t psx_brB_BFC41CD4 = cpu->gpr[0]; - psx_taken_BFC41CD4 = (psx_brA_BFC41CD4 == psx_brB_BFC41CD4); - psx_delay_BFC41CD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC41CD8: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059CD8u); -#endif - if (psx_delay_BFC41CD4) { - psx_delay_BFC41CD4 = 0; - if (psx_taken_BFC41CD4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D94u); - cpu->pc = 0x80059D94u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059CDCu); - } -label_BFC41CDC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41CDCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC41CDC: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059CDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CE0u); -#endif - /* 0xBFC41CE0: 8F399C88 lw $t9, -25464($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25464; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25464)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CE0u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399C88u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000040u); -#endif - /* 0xBFC41CE4: AFA60018 sw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CE4u); return; } g_debug_last_store_pc = 0x80059CE4u; cpu->write_word(psx_addr, cpu->gpr[6]); } - PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000018u); -#endif - /* 0xBFC41CE8: 03232021 addu $a0, $t9, $v1 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[25] + cpu->gpr[3]; - PGXP_ALU(0x03232021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059CE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41CEC: 0C016769 jal 0xB0059DA4 */ - cpu->gpr[31] = 0x80059CF4u; /* jal link before delay slot */ - psx_delay_BFC41CEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41CF0: 2484FFFF addiu $a0, $a0, -1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-1)); - PGXP_ALU(0x2484FFFFu, cpu->gpr[4], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059CF0u); -#endif - if (psx_delay_BFC41CEC) { - psx_delay_BFC41CEC = 0; - cpu->gpr[31] = 0x80059CF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DA4u); - cpu->pc = 0x80059DA4u; return; - } -label_BFC41CF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41CF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059CF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41CF4: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059CF4u); -#endif - /* 0xBFC41CF8: 8CA59C7C lw $a1, -25476($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059CF8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C7Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059CF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41CFC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059CFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D00u); -#endif - /* 0xBFC41D00: 8CA30000 lw $v1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D00u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } - PGXP_LOAD(0x8CA30000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D00u); -#endif - /* 0xBFC41D04: 8C849D9C lw $a0, -25188($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D04u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849D9Cu, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D04u); -#endif - /* 0xBFC41D08: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D08u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000008u); -#endif - /* 0xBFC41D0C: AFA3001C sw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D0Cu); return; } g_debug_last_store_pc = 0x80059D0Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } - PGXP_STORE(0xAFA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D0Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41D10: 0C016769 jal 0xB0059DA4 */ - cpu->gpr[31] = 0x80059D18u; /* jal link before delay slot */ - psx_delay_BFC41D10 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41D14: 24840001 addiu $a0, $a0, 1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1)); - PGXP_ALU(0x24840001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059D14u); -#endif - if (psx_delay_BFC41D10) { - psx_delay_BFC41D10 = 0; - cpu->gpr[31] = 0x80059D18u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DA4u); - cpu->pc = 0x80059DA4u; return; - } -} - -void SCPH1001_func_1FC41D18(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41D18u); - int psx_delay_BFC41D28 = 0; - int psx_taken_BFC41D28 = 0; - int psx_delay_BFC41D4C = 0; - int psx_taken_BFC41D4C = 0; - int psx_delay_BFC41D64 = 0; - int psx_taken_BFC41D64 = 0; - int psx_delay_BFC41D9C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41D94u: goto label_BFC41D94; - case 0xBFC41D98u: goto label_BFC41D98; - case 0xBFC41D30u: goto label_BFC41D30; - case 0xBFC41D54u: goto label_BFC41D54; - case 0xBFC41D6Cu: goto label_BFC41D6C; - default: break; - } - } -label_BFC41D18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D18u); -#endif - /* 0xBFC41D18: 8FA3001C lw $v1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D18u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } - PGXP_LOAD(0x8FA3001Cu, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41D1C: 3C010008 lui $at, 0x8 */ - cpu->gpr[1] = 0x00080000u; - PGXP_ALU(0x3C010008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D20u); -#endif - /* 0xBFC41D20: 8FA60018 lw $a2, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D20u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } - PGXP_LOAD(0x8FA60018u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10Au); -#endif - /* 0xBFC41D24: 00614024 and $t0, $v1, $at */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[8] = cpu->gpr[3] & cpu->gpr[1]; - PGXP_ALU(0x00614024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D24u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC41D28: 11000010 beq $t0, $zero, 0xBFC41D6C */ - uint32_t psx_brA_BFC41D28 = cpu->gpr[8]; uint32_t psx_brB_BFC41D28 = cpu->gpr[0]; - psx_taken_BFC41D28 = (psx_brA_BFC41D28 == psx_brB_BFC41D28); - psx_delay_BFC41D28 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41D2C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059D2Cu); -#endif - if (psx_delay_BFC41D28) { - psx_delay_BFC41D28 = 0; - if (psx_taken_BFC41D28) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D6Cu); - goto label_BFC41D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D30u); - } -label_BFC41D30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41D30: 3C058008 lui $a1, 0x8008 */ - cpu->gpr[5] = 0x80080000u; - PGXP_ALU(0x3C058008u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D30u); -#endif - /* 0xBFC41D34: 8CA59C7C lw $a1, -25476($a1) */ - { uint32_t _pgxa = cpu->gpr[5] + -25476; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-25476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D34u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } - PGXP_LOAD(0x8CA59C7Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41D38: 3C028000 lui $v0, 0x8000 */ - cpu->gpr[2] = 0x80000000u; - PGXP_ALU(0x3C028000u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D38u); -#endif - /* 0xBFC41D3C: 8CA90000 lw $t1, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D3Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } - PGXP_LOAD(0x8CA90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D3Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41D40: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059D40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x608u); -#endif - /* 0xBFC41D44: 00695026 xor $t2, $v1, $t1 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[3] ^ cpu->gpr[9]; - PGXP_ALU(0x00695026u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC04u); -#endif - /* 0xBFC41D48: 01425824 and $t3, $t2, $v0 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[11] = cpu->gpr[10] & cpu->gpr[2]; - PGXP_ALU(0x01425824u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x801u); -#endif - /* 0xBFC41D4C: 15600007 bne $t3, $zero, 0xBFC41D6C */ - uint32_t psx_brA_BFC41D4C = cpu->gpr[11]; uint32_t psx_brB_BFC41D4C = cpu->gpr[0]; - psx_taken_BFC41D4C = (psx_brA_BFC41D4C != psx_brB_BFC41D4C); - psx_delay_BFC41D4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41D50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059D50u); -#endif - if (psx_delay_BFC41D4C) { - psx_delay_BFC41D4C = 0; - if (psx_taken_BFC41D4C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D6Cu); - goto label_BFC41D6C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D54u); - } -label_BFC41D54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D54u); -#endif - /* 0xBFC41D54: 8CAC0000 lw $t4, 0($a1) */ - { uint32_t _pgxa = cpu->gpr[5]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D54u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20u); } - PGXP_LOAD(0x8CAC0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41D58: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059D58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3008u); -#endif - /* 0xBFC41D5C: 006C6826 xor $t5, $v1, $t4 */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = cpu->gpr[3] ^ cpu->gpr[12]; - PGXP_ALU(0x006C6826u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6004u); -#endif - /* 0xBFC41D60: 01A27024 and $t6, $t5, $v0 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[2]; - PGXP_ALU(0x01A27024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41D64: 11C0FFFB beq $t6, $zero, 0xBFC41D54 */ - uint32_t psx_brA_BFC41D64 = cpu->gpr[14]; uint32_t psx_brB_BFC41D64 = cpu->gpr[0]; - psx_taken_BFC41D64 = (psx_brA_BFC41D64 == psx_brB_BFC41D64); - psx_delay_BFC41D64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41D68: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059D68u); -#endif - if (psx_delay_BFC41D64) { - psx_delay_BFC41D64 = 0; - if (psx_taken_BFC41D64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D54u); - goto label_BFC41D54; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059D6Cu); - } -label_BFC41D6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41D6C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D70u); -#endif - /* 0xBFC41D70: 8DEF9D9C lw $t7, -25188($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D70u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9D9Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41D74: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D74u); -#endif - /* 0xBFC41D78: 8F189C80 lw $t8, -25472($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25472; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25472)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D78u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189C80u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41D7C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC41D80: AC2F9C88 sw $t7, -25464($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25464; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25464)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D80u); return; } g_debug_last_store_pc = 0x80059D80u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9C88u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D80u); -#endif - /* 0xBFC41D84: 8F190000 lw $t9, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D84u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x1000000u); } - PGXP_LOAD(0x8F190000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41D88: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059D88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x45u); -#endif - /* 0xBFC41D8C: 00C01021 addu $v0, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C01021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059D8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC41D90: AC399C84 sw $t9, -25468($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25468; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25468)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D90u); return; } g_debug_last_store_pc = 0x80059D90u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC399C84u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D90u); -#endif -label_BFC41D94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D94u); -#endif - /* 0xBFC41D94: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059D94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059D94u); -#endif -label_BFC41D98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41D98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41D98: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059D98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41D9C: 03E00008 jr $ra */ - psx_delay_BFC41D9C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41DA0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059DA0u); -#endif - if (psx_delay_BFC41D9C) { - psx_delay_BFC41D9C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41DA4(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41DA4u); - int psx_delay_BFC41DC0 = 0; - int psx_taken_BFC41DC0 = 0; -label_BFC41DA4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41DA4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41DA4: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x80059DA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41DA8: 340E8000 ori $t6, $zero, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = cpu->gpr[0] | 0x8000u; - PGXP_ALU(0x340E8000u, cpu->gpr[14], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059DA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20004000u); -#endif - /* 0xBFC41DAC: AFAE001C sw $t6, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DACu); return; } g_debug_last_store_pc = 0x80059DACu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAFAE001Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC41DB0: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059DB0u); -#endif - /* 0xBFC41DB4: 8DEF9D9C lw $t7, -25188($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DB4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9D9Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x31u); -#endif - /* 0xBFC41DB8: 00802821 addu $a1, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00802821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059DB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8022u); -#endif - /* 0xBFC41DBC: 01E5082A slt $at, $t7, $a1 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[15] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x01E5082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059DBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41DC0: 10200014 beq $at, $zero, 0xBFC41E14 */ - uint32_t psx_brA_BFC41DC0 = cpu->gpr[1]; uint32_t psx_brB_BFC41DC0 = cpu->gpr[0]; - psx_taken_BFC41DC0 = (psx_brA_BFC41DC0 == psx_brB_BFC41DC0); - psx_delay_BFC41DC0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41DC4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DC4u); return; } g_debug_last_store_pc = 0x80059DC4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DC4u); -#endif - if (psx_delay_BFC41DC0) { - psx_delay_BFC41DC0 = 0; - if (psx_taken_BFC41DC0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E14u); - cpu->pc = 0x80059E14u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DC8u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DC8u); - cpu->pc = 0x80059DC8u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC41DC8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41DC8u); - int psx_delay_BFC41DD8 = 0; - int psx_taken_BFC41DD8 = 0; - int psx_delay_BFC41DEC = 0; - int psx_delay_BFC41DF4 = 0; - int psx_taken_BFC41DF4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41DE0u: goto label_BFC41DE0; - case 0xBFC41DF4u: goto label_BFC41DF4; - default: break; - } - } -label_BFC41DC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41DC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41DC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DC8u); -#endif - /* 0xBFC41DC8: 8FA2001C lw $v0, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DC8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } - PGXP_LOAD(0x8FA2001Cu, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DC8u); -#endif - /* 0xBFC41DCC: 8FB8001C lw $t8, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DCCu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x20000000u); } - PGXP_LOAD(0x8FB8001Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41DD0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059DD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC41DD4: 2719FFFF addiu $t9, $t8, -1 */ - { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[24] + (-1)); - PGXP_ALU(0x2719FFFFu, cpu->gpr[25], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059DD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41DD8: 14400008 bne $v0, $zero, 0xBFC41DFC */ - uint32_t psx_brA_BFC41DD8 = cpu->gpr[2]; uint32_t psx_brB_BFC41DD8 = cpu->gpr[0]; - psx_taken_BFC41DD8 = (psx_brA_BFC41DD8 != psx_brB_BFC41DD8); - psx_delay_BFC41DD8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x22000000u); -#endif - /* 0xBFC41DDC: AFB9001C sw $t9, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DDCu); return; } g_debug_last_store_pc = 0x80059DDCu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAFB9001Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DDCu); -#endif - if (psx_delay_BFC41DD8) { - psx_delay_BFC41DD8 = 0; - if (psx_taken_BFC41DD8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DFCu); - cpu->pc = 0x80059DFCu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DE0u); - } -label_BFC41DE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41DE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41DE0: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059DE0u); -#endif - /* 0xBFC41DE4: 8CC69D9C lw $a2, -25188($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DE4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69D9Cu, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DE4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41DE8: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059DE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41DEC: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x80059DF4u; /* jal link before delay slot */ - psx_delay_BFC41DEC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41DF0: 24849C8C addiu $a0, $a0, -25460 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25460)); - PGXP_ALU(0x24849C8Cu, cpu->gpr[4], _pgx1, 0xFFFF9C8Cu); } -#ifdef PSX_COSIM - cosim_instr(0x80059DF0u); -#endif - if (psx_delay_BFC41DEC) { - psx_delay_BFC41DEC = 0; - cpu->gpr[31] = 0x80059DF4u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC41DF4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41DF4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41DF4: 10000008 beq $zero, $zero, 0xBFC41E18 */ - uint32_t psx_brA_BFC41DF4 = cpu->gpr[0]; uint32_t psx_brB_BFC41DF4 = cpu->gpr[0]; - psx_taken_BFC41DF4 = (psx_brA_BFC41DF4 == psx_brB_BFC41DF4); - psx_delay_BFC41DF4 = 1; - /* 0xBFC41DF8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059DF8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059DF8u); -#endif - if (psx_delay_BFC41DF4) { - psx_delay_BFC41DF4 = 0; - if (psx_taken_BFC41DF4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E18u); - cpu->pc = 0x80059E18u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DFCu); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DFCu); - cpu->pc = 0x80059DFCu; return; /* fallthrough */ -} - -void SCPH1001_func_1FC41DFC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41DFCu); - int psx_delay_BFC41E0C = 0; - int psx_taken_BFC41E0C = 0; -label_BFC41DFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41DFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC41DFC: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059DFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E00u); -#endif - /* 0xBFC41E00: 8D089D9C lw $t0, -25188($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059E00u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089D9Cu, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059E00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41E04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059E04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x122u); -#endif - /* 0xBFC41E08: 0105082A slt $at, $t0, $a1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[5] ? 1 : 0); - PGXP_ALU(0x0105082Au, cpu->gpr[1], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059E08u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41E0C: 1420FFEE bne $at, $zero, 0xBFC41DC8 */ - uint32_t psx_brA_BFC41E0C = cpu->gpr[1]; uint32_t psx_brB_BFC41E0C = cpu->gpr[0]; - psx_taken_BFC41E0C = (psx_brA_BFC41E0C != psx_brB_BFC41E0C); - psx_delay_BFC41E0C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41E10: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059E10u); -#endif - if (psx_delay_BFC41E0C) { - psx_delay_BFC41E0C = 0; - if (psx_taken_BFC41E0C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059DC8u); - cpu->pc = 0x80059DC8u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E14u); - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E14u); - cpu->pc = 0x80059E14u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC41E14(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41E14u); - int psx_delay_BFC41E1C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41E18u: goto label_BFC41E18; - default: break; - } - } -label_BFC41E14: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E14u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E14u); -#endif - /* 0xBFC41E14: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059E14u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059E14u); -#endif -label_BFC41E18: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E18u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41E18: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41E1C: 03E00008 jr $ra */ - psx_delay_BFC41E1C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41E20: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059E20u); -#endif - if (psx_delay_BFC41E1C) { - psx_delay_BFC41E1C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41E30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41E30u); - int psx_delay_BFC41E3C = 0; - int psx_taken_BFC41E3C = 0; - int psx_delay_BFC41E44 = 0; - int psx_delay_BFC41E64 = 0; - int psx_taken_BFC41E64 = 0; - int psx_delay_BFC41E70 = 0; - int psx_taken_BFC41E70 = 0; - int psx_delay_BFC41E7C = 0; - int psx_taken_BFC41E7C = 0; - int psx_delay_BFC41E8C = 0; - int psx_taken_BFC41E8C = 0; - int psx_delay_BFC41E94 = 0; - int psx_taken_BFC41E94 = 0; - int psx_delay_BFC41EA0 = 0; - int psx_taken_BFC41EA0 = 0; - int psx_delay_BFC41EAC = 0; - int psx_taken_BFC41EAC = 0; - int psx_delay_BFC41EBC = 0; - int psx_taken_BFC41EBC = 0; - int psx_delay_BFC41ED0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41E44u: goto label_BFC41E44; - case 0xBFC41E4Cu: goto label_BFC41E4C; - case 0xBFC41E6Cu: goto label_BFC41E6C; - case 0xBFC41E78u: goto label_BFC41E78; - case 0xBFC41E84u: goto label_BFC41E84; - case 0xBFC41E8Cu: goto label_BFC41E8C; - case 0xBFC41E94u: goto label_BFC41E94; - case 0xBFC41E9Cu: goto label_BFC41E9C; - case 0xBFC41EA0u: goto label_BFC41EA0; - case 0xBFC41EA8u: goto label_BFC41EA8; - case 0xBFC41EB4u: goto label_BFC41EB4; - case 0xBFC41EB8u: goto label_BFC41EB8; - case 0xBFC41EBCu: goto label_BFC41EBC; - case 0xBFC41EC4u: goto label_BFC41EC4; - case 0xBFC41EC8u: goto label_BFC41EC8; - default: break; - } - } -label_BFC41E30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41E30: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059E30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41E34: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41E38: 30A5FFFF andi $a1, $a1, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xFFFFu; - PGXP_ALU(0x30A5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059E38u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41E3C: 14200003 bne $at, $zero, 0xBFC41E4C */ - uint32_t psx_brA_BFC41E3C = cpu->gpr[1]; uint32_t psx_brB_BFC41E3C = cpu->gpr[0]; - psx_taken_BFC41E3C = (psx_brA_BFC41E3C != psx_brB_BFC41E3C); - psx_delay_BFC41E3C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC1u); -#endif - /* 0xBFC41E40: 00C03821 addu $a3, $a2, $zero */ - { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[7] = cpu->gpr[6] + cpu->gpr[0]; - PGXP_ALU(0x00C03821u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059E40u); -#endif - if (psx_delay_BFC41E3C) { - psx_delay_BFC41E3C = 0; - if (psx_taken_BFC41E3C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E4Cu); - goto label_BFC41E4C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E44u); - } -label_BFC41E44: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E44u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E44u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41E44: 03E00008 jr $ra */ - psx_delay_BFC41E44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41E48: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059E48u); -#endif - if (psx_delay_BFC41E44) { - psx_delay_BFC41E44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC41E4C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E4Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41E4C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059E4Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E50u); -#endif - /* 0xBFC41E50: 8DCE9CB4 lw $t6, -25420($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059E50u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9CB4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059E50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41E54: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC008u); -#endif - /* 0xBFC41E58: 01CF1821 addu $v1, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059E58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC41E5C: A4600004 sh $zero, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80059E5Cu); return; } g_debug_last_store_pc = 0x80059E5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA4600004u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059E5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC41E60: A4650008 sh $a1, 8($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80059E60u); return; } g_debug_last_store_pc = 0x80059E60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } - PGXP_STORE(0xA4650008u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x80059E60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC41E64: 10800004 beq $a0, $zero, 0xBFC41E78 */ - uint32_t psx_brA_BFC41E64 = cpu->gpr[4]; uint32_t psx_brB_BFC41E64 = cpu->gpr[0]; - psx_taken_BFC41E64 = (psx_brA_BFC41E64 == psx_brB_BFC41E64); - psx_delay_BFC41E64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC41E68: 24060048 addiu $a2, $zero, 72 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (72)); - PGXP_ALU(0x24060048u, cpu->gpr[6], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E68u); -#endif - if (psx_delay_BFC41E64) { - psx_delay_BFC41E64 = 0; - if (psx_taken_BFC41E64) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E78u); - goto label_BFC41E78; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E6Cu); - } -label_BFC41E6C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E6Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41E6C: 24010001 addiu $at, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24010001u, cpu->gpr[1], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41E70: 1481000B bne $a0, $at, 0xBFC41EA0 */ - uint32_t psx_brA_BFC41E70 = cpu->gpr[4]; uint32_t psx_brB_BFC41E70 = cpu->gpr[1]; - psx_taken_BFC41E70 = (psx_brA_BFC41E70 != psx_brB_BFC41E70); - psx_delay_BFC41E70 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41E74: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E74u); -#endif - if (psx_delay_BFC41E70) { - psx_delay_BFC41E70 = 0; - if (psx_taken_BFC41E70) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EA0u); - goto label_BFC41EA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E78u); - } -label_BFC41E78: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E78u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000080u); -#endif - /* 0xBFC41E78: 30F80010 andi $t8, $a3, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = cpu->gpr[7] & 0x10u; - PGXP_ALU(0x30F80010u, cpu->gpr[24], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41E7C: 13000003 beq $t8, $zero, 0xBFC41E8C */ - uint32_t psx_brA_BFC41E7C = cpu->gpr[24]; uint32_t psx_brB_BFC41E7C = cpu->gpr[0]; - psx_taken_BFC41E7C = (psx_brA_BFC41E7C == psx_brB_BFC41E7C); - psx_delay_BFC41E7C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC41E80: 30F90001 andi $t9, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E80u); -#endif - if (psx_delay_BFC41E7C) { - psx_delay_BFC41E7C = 0; - if (psx_taken_BFC41E7C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E8Cu); - goto label_BFC41E8C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E84u); - } -label_BFC41E84: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E84u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC41E84: 24060049 addiu $a2, $zero, 73 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (73)); - PGXP_ALU(0x24060049u, cpu->gpr[6], _pgx1, 0x00000049u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E84u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000080u); -#endif - /* 0xBFC41E88: 30F90001 andi $t9, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[25] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30F90001u, cpu->gpr[25], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E88u); -#endif -label_BFC41E8C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E8Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC41E8C: 1720000B bne $t9, $zero, 0xBFC41EBC */ - uint32_t psx_brA_BFC41E8C = cpu->gpr[25]; uint32_t psx_brB_BFC41E8C = cpu->gpr[0]; - psx_taken_BFC41E8C = (psx_brA_BFC41E8C != psx_brB_BFC41E8C); - psx_delay_BFC41E8C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC41E90: 30E91000 andi $t1, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E90u); -#endif - if (psx_delay_BFC41E8C) { - psx_delay_BFC41E8C = 0; - if (psx_taken_BFC41E8C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EBCu); - goto label_BFC41EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E94u); - } -label_BFC41E94: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E94u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41E94: 10000008 beq $zero, $zero, 0xBFC41EB8 */ - uint32_t psx_brA_BFC41E94 = cpu->gpr[0]; uint32_t psx_brB_BFC41E94 = cpu->gpr[0]; - psx_taken_BFC41E94 = (psx_brA_BFC41E94 == psx_brB_BFC41E94); - psx_delay_BFC41E94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41E98: 34C60100 ori $a2, $a2, 0x100 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x100u; - PGXP_ALU(0x34C60100u, cpu->gpr[6], _pgx1, 0x0100u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E98u); -#endif - if (psx_delay_BFC41E94) { - psx_delay_BFC41E94 = 0; - if (psx_taken_BFC41E94) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EB8u); - goto label_BFC41EB8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059E9Cu); - } -label_BFC41E9C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41E9Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059E9Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41E9C: 24010002 addiu $at, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24010002u, cpu->gpr[1], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x80059E9Cu); -#endif -label_BFC41EA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41EA0: 14810006 bne $a0, $at, 0xBFC41EBC */ - uint32_t psx_brA_BFC41EA0 = cpu->gpr[4]; uint32_t psx_brB_BFC41EA0 = cpu->gpr[1]; - psx_taken_BFC41EA0 = (psx_brA_BFC41EA0 != psx_brB_BFC41EA0); - psx_delay_BFC41EA0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC41EA4: 30E91000 andi $t1, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EA4u); -#endif - if (psx_delay_BFC41EA0) { - psx_delay_BFC41EA0 = 0; - if (psx_taken_BFC41EA0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EBCu); - goto label_BFC41EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EA8u); - } -label_BFC41EA8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EA8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC41EA8: 30E80001 andi $t0, $a3, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0x1u; - PGXP_ALU(0x30E80001u, cpu->gpr[8], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC41EAC: 15000003 bne $t0, $zero, 0xBFC41EBC */ - uint32_t psx_brA_BFC41EAC = cpu->gpr[8]; uint32_t psx_brB_BFC41EAC = cpu->gpr[0]; - psx_taken_BFC41EAC = (psx_brA_BFC41EAC != psx_brB_BFC41EAC); - psx_delay_BFC41EAC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC41EB0: 30E91000 andi $t1, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EB0u); -#endif - if (psx_delay_BFC41EAC) { - psx_delay_BFC41EAC = 0; - if (psx_taken_BFC41EAC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EBCu); - goto label_BFC41EBC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EB4u); - } -label_BFC41EB4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EB4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x41u); -#endif - /* 0xBFC41EB4: 24060248 addiu $a2, $zero, 584 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (584)); - PGXP_ALU(0x24060248u, cpu->gpr[6], _pgx1, 0x00000248u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EB4u); -#endif -label_BFC41EB8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EB8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EB8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x280u); -#endif - /* 0xBFC41EB8: 30E91000 andi $t1, $a3, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[9] = cpu->gpr[7] & 0x1000u; - PGXP_ALU(0x30E91000u, cpu->gpr[9], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EB8u); -#endif -label_BFC41EBC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EBCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EBCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC41EBC: 11200002 beq $t1, $zero, 0xBFC41EC8 */ - uint32_t psx_brA_BFC41EBC = cpu->gpr[9]; uint32_t psx_brB_BFC41EBC = cpu->gpr[0]; - psx_taken_BFC41EBC = (psx_brA_BFC41EBC == psx_brB_BFC41EBC); - psx_delay_BFC41EBC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41EC0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059EC0u); -#endif - if (psx_delay_BFC41EBC) { - psx_delay_BFC41EBC = 0; - if (psx_taken_BFC41EBC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EC8u); - goto label_BFC41EC8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EC4u); - } -label_BFC41EC4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EC4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC41EC4: 34C60010 ori $a2, $a2, 0x10 */ - { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x10u; - PGXP_ALU(0x34C60010u, cpu->gpr[6], _pgx1, 0x0010u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EC4u); -#endif -label_BFC41EC8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EC8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x48u); -#endif - /* 0xBFC41EC8: A4660004 sh $a2, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80059EC8u); return; } g_debug_last_store_pc = 0x80059EC8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[6] & 0xFFFFu)); } - PGXP_STORE(0xA4660004u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x80059EC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41ECC: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059ECCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059ED0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41ED0: 03E00008 jr $ra */ - psx_delay_BFC41ED0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41ED4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059ED4u); -#endif - if (psx_delay_BFC41ED0) { - psx_delay_BFC41ED0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41ED8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41ED8u); - int psx_delay_BFC41EE0 = 0; - int psx_taken_BFC41EE0 = 0; - int psx_delay_BFC41EE8 = 0; - int psx_delay_BFC41F08 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41EE8u: goto label_BFC41EE8; - case 0xBFC41EF0u: goto label_BFC41EF0; - default: break; - } - } -label_BFC41ED8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41ED8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41ED8: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059ED8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41EDC: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41EE0: 14200003 bne $at, $zero, 0xBFC41EF0 */ - uint32_t psx_brA_BFC41EE0 = cpu->gpr[1]; uint32_t psx_brB_BFC41EE0 = cpu->gpr[0]; - psx_taken_BFC41EE0 = (psx_brA_BFC41EE0 != psx_brB_BFC41EE0); - psx_delay_BFC41EE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41EE4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059EE4u); -#endif - if (psx_delay_BFC41EE0) { - psx_delay_BFC41EE0 = 0; - if (psx_taken_BFC41EE0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EF0u); - goto label_BFC41EF0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059EE8u); - } -label_BFC41EE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41EE8: 03E00008 jr $ra */ - psx_delay_BFC41EE8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41EEC: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059EECu); -#endif - if (psx_delay_BFC41EE8) { - psx_delay_BFC41EE8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC41EF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41EF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059EF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41EF0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059EF0u); -#endif - /* 0xBFC41EF4: 8DCE9CB4 lw $t6, -25420($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059EF4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9CB4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059EF4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41EF8: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059EF8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC41EFC: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059EFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F00u); -#endif - /* 0xBFC41F00: 97020000 lhu $v0, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80059F00u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x1000000u); } - PGXP_LOAD(0x97020000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41F04: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059F04u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41F08: 03E00008 jr $ra */ - psx_delay_BFC41F08 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41F0C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059F0Cu); -#endif - if (psx_delay_BFC41F08) { - psx_delay_BFC41F08 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41F10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41F10u); - int psx_delay_BFC41F38 = 0; - int psx_taken_BFC41F38 = 0; - int psx_delay_BFC41F40 = 0; - int psx_delay_BFC41F4C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41F40u: goto label_BFC41F40; - case 0xBFC41F48u: goto label_BFC41F48; - default: break; - } - } -label_BFC41F10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC41F10: 3C028008 lui $v0, 0x8008 */ - cpu->gpr[2] = 0x80080000u; - PGXP_ALU(0x3C028008u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059F10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41F14: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059F14u); -#endif - /* 0xBFC41F18: 8C429CB0 lw $v0, -25424($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -25424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-25424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F18u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C429CB0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F18u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41F1C: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F1Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41F20: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059F20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC41F24: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F24u); -#endif - /* 0xBFC41F28: 8F189CB8 lw $t8, -25416($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F28u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189CB8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F28u); -#endif - /* 0xBFC41F2C: 8C4E0004 lw $t6, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F2Cu); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F2Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41F30: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3004000u); -#endif - /* 0xBFC41F34: 01D8C825 or $t9, $t6, $t8 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[24]; cpu->gpr[25] = cpu->gpr[14] | cpu->gpr[24]; - PGXP_ALU(0x01D8C825u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F34u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41F38: 14200003 bne $at, $zero, 0xBFC41F48 */ - uint32_t psx_brA_BFC41F38 = cpu->gpr[1]; uint32_t psx_brB_BFC41F38 = cpu->gpr[0]; - psx_taken_BFC41F38 = (psx_brA_BFC41F38 != psx_brB_BFC41F38); - psx_delay_BFC41F38 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC41F3C: AC590004 sw $t9, 4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F3Cu); return; } g_debug_last_store_pc = 0x80059F3Cu; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC590004u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F3Cu); -#endif - if (psx_delay_BFC41F38) { - psx_delay_BFC41F38 = 0; - if (psx_taken_BFC41F38) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F48u); - goto label_BFC41F48; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F40u); - } -label_BFC41F40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41F40: 03E00008 jr $ra */ - psx_delay_BFC41F40 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41F44: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F44u); -#endif - if (psx_delay_BFC41F40) { - psx_delay_BFC41F40 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC41F48: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F48u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41F48: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F48u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41F4C: 03E00008 jr $ra */ - psx_delay_BFC41F4C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41F50: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059F50u); -#endif - if (psx_delay_BFC41F4C) { - psx_delay_BFC41F4C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41F54(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41F54u); - int psx_delay_BFC41F80 = 0; -label_BFC41F54: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F54u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41F54: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059F54u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC41F58: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059F58u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41F5C: 00047880 sll $t7, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047880u, cpu->gpr[15], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F5Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC41F60: 3C188008 lui $t8, 0x8008 */ - cpu->gpr[24] = 0x80080000u; - PGXP_ALU(0x3C188008u, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059F60u); -#endif - /* 0xBFC41F64: 8C639CB0 lw $v1, -25424($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F64u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639CB0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F64u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008000u); -#endif - /* 0xBFC41F68: 030FC021 addu $t8, $t8, $t7 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[24] + cpu->gpr[15]; - PGXP_ALU(0x030FC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F68u); -#endif - /* 0xBFC41F6C: 8F189CB8 lw $t8, -25416($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -25416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-25416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F6Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F189CB8u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F6Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F70u); -#endif - /* 0xBFC41F70: 8C6E0004 lw $t6, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F70u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0004u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000001u); -#endif - /* 0xBFC41F74: 0300C827 nor $t9, $t8, $zero */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[24] | cpu->gpr[0]); - PGXP_ALU(0x0300C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F74u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2004100u); -#endif - /* 0xBFC41F78: 01D94024 and $t0, $t6, $t9 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[14] & cpu->gpr[25]; - PGXP_ALU(0x01D94024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F78u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41F7C: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F7Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41F80: 03E00008 jr $ra */ - psx_delay_BFC41F80 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x108u); -#endif - /* 0xBFC41F84: AC680004 sw $t0, 4($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059F84u); return; } g_debug_last_store_pc = 0x80059F84u; cpu->write_word(psx_addr, cpu->gpr[8]); } - PGXP_STORE(0xAC680004u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x80059F84u); -#endif - if (psx_delay_BFC41F80) { - psx_delay_BFC41F80 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41F88(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41F88u); - int psx_delay_BFC41F90 = 0; - int psx_taken_BFC41F90 = 0; - int psx_delay_BFC41F98 = 0; - int psx_delay_BFC41FB8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41F98u: goto label_BFC41F98; - case 0xBFC41FA0u: goto label_BFC41FA0; - default: break; - } - } -label_BFC41F88: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F88u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41F88: 3084FFFF andi $a0, $a0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFFFFu; - PGXP_ALU(0x3084FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059F88u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41F8C: 28810003 slti $at, $a0, 3 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[4] < (3) ? 1 : 0); - PGXP_ALU(0x28810003u, cpu->gpr[1], _pgx1, 0x0003u); } -#ifdef PSX_COSIM - cosim_instr(0x80059F8Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41F90: 14200003 bne $at, $zero, 0xBFC41FA0 */ - uint32_t psx_brA_BFC41F90 = cpu->gpr[1]; uint32_t psx_brB_BFC41F90 = cpu->gpr[0]; - psx_taken_BFC41F90 = (psx_brA_BFC41F90 != psx_brB_BFC41F90); - psx_delay_BFC41F90 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41F94: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059F94u); -#endif - if (psx_delay_BFC41F90) { - psx_delay_BFC41F90 = 0; - if (psx_taken_BFC41F90) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059FA0u); - goto label_BFC41FA0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x80059F98u); - } -label_BFC41F98: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41F98u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059F98u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41F98: 03E00008 jr $ra */ - psx_delay_BFC41F98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41F9C: 00001021 addu $v0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00001021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059F9Cu); -#endif - if (psx_delay_BFC41F98) { - psx_delay_BFC41F98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -label_BFC41FA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41FA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC41FA0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FA0u); -#endif - /* 0xBFC41FA4: 8DCE9CB4 lw $t6, -25420($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059FA4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9CB4u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FA4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8010u); -#endif - /* 0xBFC41FA8: 00047900 sll $t7, $a0, 4 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[15] = cpu->gpr[4] << 4u; - PGXP_ALU(0x00047900u, cpu->gpr[15], _pgx1, 4u); } -#ifdef PSX_COSIM - cosim_instr(0x80059FA8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC41FAC: 01CFC021 addu $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CFC021u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x80059FACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC41FB0: A7000000 sh $zero, 0($t8) */ - { uint32_t _pgxa = cpu->gpr[24]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80059FB0u); return; } g_debug_last_store_pc = 0x80059FB0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA7000000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC41FB4: 24020001 addiu $v0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24020001u, cpu->gpr[2], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059FB4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC41FB8: 03E00008 jr $ra */ - psx_delay_BFC41FB8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC41FBC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x80059FBCu); -#endif - if (psx_delay_BFC41FB8) { - psx_delay_BFC41FB8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC41FC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC41FC0u); - int psx_delay_BFC41FE0 = 0; - int psx_delay_BFC41FF4 = 0; - int psx_delay_BFC41FFC = 0; - int psx_delay_BFC4200C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC41FE8u: goto label_BFC41FE8; - case 0xBFC41FFCu: goto label_BFC41FFC; - case 0xBFC42004u: goto label_BFC42004; - default: break; - } - } -label_BFC41FC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41FC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41FC0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x12u); -#endif - /* 0xBFC41FC4: AC249F30 sw $a0, -24784($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -24784; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-24784)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059FC4u); return; } g_debug_last_store_pc = 0x80059FC4u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAC249F30u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FC4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41FC8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FC8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC41FCC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x80059FCCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC41FD0: AC20EED4 sw $zero, -4396($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4396; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4396)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059FD0u); return; } g_debug_last_store_pc = 0x80059FD0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20EED4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC41FD4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059FD4u); return; } g_debug_last_store_pc = 0x80059FD4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FD4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC41FD8: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FD8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC41FDC: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x80059FDCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41FE0: 0C016818 jal 0xB005A060 */ - cpu->gpr[31] = 0x80059FE8u; /* jal link before delay slot */ - psx_delay_BFC41FE0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4002u); -#endif - /* 0xBFC41FE4: AC2EEED0 sw $t6, -4400($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -4400; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-4400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80059FE4u); return; } g_debug_last_store_pc = 0x80059FE4u; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xAC2EEED0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x80059FE4u); -#endif - if (psx_delay_BFC41FE0) { - psx_delay_BFC41FE0 = 0; - cpu->gpr[31] = 0x80059FE8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A060u); - cpu->pc = 0x8005A060u; return; - } -label_BFC41FE8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41FE8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41FE8: 3C042000 lui $a0, 0x2000 */ - cpu->gpr[4] = 0x20000000u; - PGXP_ALU(0x3C042000u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FE8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41FEC: 3C05800E lui $a1, 0x800E */ - cpu->gpr[5] = 0x800E0000u; - PGXP_ALU(0x3C05800Eu, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x80059FECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC41FF0: 24A5EED0 addiu $a1, $a1, -4400 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4400)); - PGXP_ALU(0x24A5EED0u, cpu->gpr[5], _pgx1, 0xFFFFEED0u); } -#ifdef PSX_COSIM - cosim_instr(0x80059FF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41FF4: 0C016AEC jal 0xB005ABB0 */ - cpu->gpr[31] = 0x80059FFCu; /* jal link before delay slot */ - psx_delay_BFC41FF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC41FF8: 34840001 ori $a0, $a0, 0x1 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1u; - PGXP_ALU(0x34840001u, cpu->gpr[4], _pgx1, 0x0001u); } -#ifdef PSX_COSIM - cosim_instr(0x80059FF8u); -#endif - if (psx_delay_BFC41FF4) { - psx_delay_BFC41FF4 = 0; - cpu->gpr[31] = 0x80059FFCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABB0u); - cpu->pc = 0x8005ABB0u; return; - } -label_BFC41FFC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC41FFCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC41FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x80059FFCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC41FFC: 0C016A60 jal 0xB005A980 */ - cpu->gpr[31] = 0x8005A004u; /* jal link before delay slot */ - psx_delay_BFC41FFC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A000u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42000: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A000u); -#endif - if (psx_delay_BFC41FFC) { - psx_delay_BFC41FFC = 0; - cpu->gpr[31] = 0x8005A004u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A980u); - cpu->pc = 0x8005A980u; return; - } -label_BFC42004: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42004u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A004u); -#endif - /* 0xBFC42004: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A004u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A004u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42008: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A008u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4200C: 03E00008 jr $ra */ - psx_delay_BFC4200C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A010u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42010: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A010u); -#endif - if (psx_delay_BFC4200C) { - psx_delay_BFC4200C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42014(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42014u); - int psx_delay_BFC4201C = 0; - int psx_delay_BFC42034 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42024u: goto label_BFC42024; - default: break; - } - } -label_BFC42014: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42014u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42014: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A014u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42018: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A018u); return; } g_debug_last_store_pc = 0x8005A018u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A018u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4201C: 0C016AF0 jal 0xB005ABC0 */ - cpu->gpr[31] = 0x8005A024u; /* jal link before delay slot */ - psx_delay_BFC4201C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A020u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC42020: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A020u); return; } g_debug_last_store_pc = 0x8005A020u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A020u); -#endif - if (psx_delay_BFC4201C) { - psx_delay_BFC4201C = 0; - cpu->gpr[31] = 0x8005A024u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABC0u); - cpu->pc = 0x8005ABC0u; return; - } -label_BFC42024: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42024u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A024u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42024: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A024u); -#endif - /* 0xBFC42028: 8C42EED0 lw $v0, -4400($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4400; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A028u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42EED0u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A028u); -#endif - /* 0xBFC4202C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A02Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A02Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42030: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A030u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42034: 03E00008 jr $ra */ - psx_delay_BFC42034 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC42038: 00401027 nor $v0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]); - PGXP_ALU(0x00401027u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A038u); -#endif - if (psx_delay_BFC42034) { - psx_delay_BFC42034 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC4203C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4203Cu); - int psx_delay_BFC42044 = 0; - int psx_delay_BFC42054 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4204Cu: goto label_BFC4204C; - default: break; - } - } -label_BFC4203C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4203Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4203Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4203C: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A03Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42040: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A040u); return; } g_debug_last_store_pc = 0x8005A040u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A040u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42044: 0C016AF4 jal 0xB005ABD0 */ - cpu->gpr[31] = 0x8005A04Cu; /* jal link before delay slot */ - psx_delay_BFC42044 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42048: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A048u); -#endif - if (psx_delay_BFC42044) { - psx_delay_BFC42044 = 0; - cpu->gpr[31] = 0x8005A04Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABD0u); - cpu->pc = 0x8005ABD0u; return; - } -label_BFC4204C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4204Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4204Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A04Cu); -#endif - /* 0xBFC4204C: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A04Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A04Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42050: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A050u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42054: 03E00008 jr $ra */ - psx_delay_BFC42054 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42058: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A058u); -#endif - if (psx_delay_BFC42054) { - psx_delay_BFC42054 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42060(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42060u); - int psx_delay_BFC42078 = 0; - int psx_delay_BFC42088 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42080u: goto label_BFC42080; - default: break; - } - } -label_BFC42060: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42060u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A060u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC42060: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A060u); -#endif - /* 0xBFC42064: 8DCE9D44 lw $t6, -25276($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A064u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A064u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42068: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A068u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4206C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A06Cu); return; } g_debug_last_store_pc = 0x8005A06Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A06Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A070u); -#endif - /* 0xBFC42070: 8DCF000C lw $t7, 12($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A070u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF000Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A070u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42074: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A074u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC42078: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8005A080u; /* jalr link before delay slot */ - psx_delay_BFC42078 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4207C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A07Cu); -#endif - if (psx_delay_BFC42078) { - psx_delay_BFC42078 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8005A080u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC42080: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42080u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A080u); -#endif - /* 0xBFC42080: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A080u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A080u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42084: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A084u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42088: 03E00008 jr $ra */ - psx_delay_BFC42088 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4208C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A08Cu); -#endif - if (psx_delay_BFC42088) { - psx_delay_BFC42088 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42090(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42090u); - int psx_delay_BFC420A8 = 0; - int psx_delay_BFC420B8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC420B0u: goto label_BFC420B0; - default: break; - } - } -label_BFC42090: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42090u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A090u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC42090: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A090u); -#endif - /* 0xBFC42094: 8DCE9D44 lw $t6, -25276($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A094u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A094u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42098: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A098u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4209C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A09Cu); return; } g_debug_last_store_pc = 0x8005A09Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A09Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0A0u); -#endif - /* 0xBFC420A0: 8DCF0008 lw $t7, 8($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0A0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0008u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC420A8: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8005A0B0u; /* jalr link before delay slot */ - psx_delay_BFC420A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0ACu); -#endif - if (psx_delay_BFC420A8) { - psx_delay_BFC420A8 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8005A0B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC420B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC420B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC420B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0B0u); -#endif - /* 0xBFC420B0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC420B4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC420B8: 03E00008 jr $ra */ - psx_delay_BFC420B8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420BC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0BCu); -#endif - if (psx_delay_BFC420B8) { - psx_delay_BFC420B8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC420C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC420C0u); - int psx_delay_BFC420D8 = 0; - int psx_delay_BFC420E8 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC420E0u: goto label_BFC420E0; - default: break; - } - } -label_BFC420C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC420C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC420C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC420C0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A0C0u); -#endif - /* 0xBFC420C4: 8DCE9D44 lw $t6, -25276($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0C4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC420C8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC420CC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0CCu); return; } g_debug_last_store_pc = 0x8005A0CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0D0u); -#endif - /* 0xBFC420D0: 8DCF0004 lw $t7, 4($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0D0u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0004u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420D4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC420D8: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8005A0E0u; /* jalr link before delay slot */ - psx_delay_BFC420D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0DCu); -#endif - if (psx_delay_BFC420D8) { - psx_delay_BFC420D8 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8005A0E0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC420E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC420E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC420E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0E0u); -#endif - /* 0xBFC420E0: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC420E4: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC420E8: 03E00008 jr $ra */ - psx_delay_BFC420E8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC420EC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A0ECu); -#endif - if (psx_delay_BFC420E8) { - psx_delay_BFC420E8 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC420F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC420F0u); - int psx_delay_BFC42108 = 0; - int psx_delay_BFC42118 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42110u: goto label_BFC42110; - default: break; - } - } -label_BFC420F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC420F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC420F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A0F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC420F0: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A0F0u); -#endif - /* 0xBFC420F4: 8DCE9D44 lw $t6, -25276($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0F4u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC420F8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC420FC: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A0FCu); return; } g_debug_last_store_pc = 0x8005A0FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A0FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A100u); -#endif - /* 0xBFC42100: 8DCF0014 lw $t7, 20($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A100u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0014u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A100u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42104: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A104u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC42108: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8005A110u; /* jalr link before delay slot */ - psx_delay_BFC42108 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4210C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A10Cu); -#endif - if (psx_delay_BFC42108) { - psx_delay_BFC42108 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8005A110u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC42110: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42110u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A110u); -#endif - /* 0xBFC42110: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A110u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A110u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42114: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A114u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42118: 03E00008 jr $ra */ - psx_delay_BFC42118 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4211C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A11Cu); -#endif - if (psx_delay_BFC42118) { - psx_delay_BFC42118 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42120(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42120u); - int psx_delay_BFC42138 = 0; - int psx_delay_BFC42148 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42140u: goto label_BFC42140; - default: break; - } - } -label_BFC42120: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42120u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A120u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC42120: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A120u); -#endif - /* 0xBFC42124: 8DCE9D44 lw $t6, -25276($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A124u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D44u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A124u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42128: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A128u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC4212C: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A12Cu); return; } g_debug_last_store_pc = 0x8005A12Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A12Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A130u); -#endif - /* 0xBFC42130: 8DCF0010 lw $t7, 16($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A130u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x4000u); } - PGXP_LOAD(0x8DCF0010u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A130u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42134: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A134u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80008000u); -#endif - /* 0xBFC42138: 01E0F809 jalr $ra, $t7 */ - cpu->gpr[31] = 0x8005A140u; /* jalr link before delay slot */ - psx_delay_BFC42138 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4213C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A13Cu); -#endif - if (psx_delay_BFC42138) { - psx_delay_BFC42138 = 0; - { uint32_t _t = cpu->gpr[15]; - cpu->gpr[31] = 0x8005A140u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC42140: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42140u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A140u); -#endif - /* 0xBFC42140: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A140u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A140u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42144: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A144u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42148: 03E00008 jr $ra */ - psx_delay_BFC42148 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4214C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A14Cu); -#endif - if (psx_delay_BFC42148) { - psx_delay_BFC42148 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42160(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42160u); - int psx_delay_BFC4216C = 0; - int psx_taken_BFC4216C = 0; - int psx_delay_BFC42174 = 0; - int psx_delay_BFC4217C = 0; - int psx_delay_BFC421C4 = 0; - int psx_taken_BFC421C4 = 0; - int psx_delay_BFC421D0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42174u: goto label_BFC42174; - case 0xBFC4217Cu: goto label_BFC4217C; - case 0xBFC42184u: goto label_BFC42184; - case 0xBFC421B4u: goto label_BFC421B4; - case 0xBFC421CCu: goto label_BFC421CC; - default: break; - } - } -label_BFC42160: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42160u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A160u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC42160: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A160u); -#endif - /* 0xBFC42164: 8DCE9D48 lw $t6, -25272($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A164u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D48u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A164u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42168: 27BDFFB0 addiu $sp, $sp, -80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-80)); - PGXP_ALU(0x27BDFFB0u, cpu->gpr[29], _pgx1, 0xFFFFFFB0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A168u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC4216C: 15C00080 bne $t6, $zero, 0xBFC42370 */ - uint32_t psx_brA_BFC4216C = cpu->gpr[14]; uint32_t psx_brB_BFC4216C = cpu->gpr[0]; - psx_taken_BFC4216C = (psx_brA_BFC4216C != psx_brB_BFC4216C); - psx_delay_BFC4216C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A170u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42170: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A170u); return; } g_debug_last_store_pc = 0x8005A170u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A170u); -#endif - if (psx_delay_BFC4216C) { - psx_delay_BFC4216C = 0; - if (psx_taken_BFC4216C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A370u); - cpu->pc = 0x8005A370u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A174u); - } -label_BFC42174: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42174u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A174u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42174: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x8005A17Cu; /* jal link before delay slot */ - psx_delay_BFC42174 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC42178: AFB10034 sw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A178u); return; } g_debug_last_store_pc = 0x8005A178u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A178u); -#endif - if (psx_delay_BFC42174) { - psx_delay_BFC42174 = 0; - cpu->gpr[31] = 0x8005A17Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC4217C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4217Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4217Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A17Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4217C: 0C01692A jal 0xB005A4A8 */ - cpu->gpr[31] = 0x8005A184u; /* jal link before delay slot */ - psx_delay_BFC4217C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A180u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42180: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A180u); -#endif - if (psx_delay_BFC4217C) { - psx_delay_BFC4217C = 0; - cpu->gpr[31] = 0x8005A184u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A4A8u); - cpu->pc = 0x8005A4A8u; return; - } -label_BFC42184: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42184u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42184: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A184u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42188: AC20FF0C sw $zero, -244($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A188u); return; } g_debug_last_store_pc = 0x8005A188u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF0Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A188u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4218C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A18Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42190: AC20FEE0 sw $zero, -288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A190u); return; } g_debug_last_store_pc = 0x8005A190u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A190u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42194: AC20FEE4 sw $zero, -284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A194u); return; } g_debug_last_store_pc = 0x8005A194u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A194u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42198: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A198u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4219C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A19Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC421A0: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC421A4: 2463FF0C addiu $v1, $v1, -244 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-244)); - PGXP_ALU(0x2463FF0Cu, cpu->gpr[3], _pgx1, 0xFFFFFF0Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC421A8: 2442FEEC addiu $v0, $v0, -276 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-276)); - PGXP_ALU(0x2442FEECu, cpu->gpr[2], _pgx1, 0xFFFFFEECu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC421AC: AC20FEE8 sw $zero, -280($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1ACu); return; } g_debug_last_store_pc = 0x8005A1ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC421B0: 24110003 addiu $s1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24110003u, cpu->gpr[17], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1B0u); -#endif -label_BFC421B4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC421B4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC421B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC421B4: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1B4u); return; } g_debug_last_store_pc = 0x8005A1B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC421B8: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC421BC: AC40FFF4 sw $zero, -12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1BCu); return; } g_debug_last_store_pc = 0x8005A1BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC421C0: AC40FFF8 sw $zero, -8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1C0u); return; } g_debug_last_store_pc = 0x8005A1C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC421C4: 1443FFFB bne $v0, $v1, 0xBFC421B4 */ - uint32_t psx_brA_BFC421C4 = cpu->gpr[2]; uint32_t psx_brB_BFC421C4 = cpu->gpr[3]; - psx_taken_BFC421C4 = (psx_brA_BFC421C4 != psx_brB_BFC421C4); - psx_delay_BFC421C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC421C8: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1C8u); return; } g_debug_last_store_pc = 0x8005A1C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1C8u); -#endif - if (psx_delay_BFC421C4) { - psx_delay_BFC421C4 = 0; - if (psx_taken_BFC421C4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A1B4u); - goto label_BFC421B4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A1CCu); - } -label_BFC421CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC421CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC421CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC421CC: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC421D0: 0C016AF8 jal 0xB005ABE0 */ - cpu->gpr[31] = 0x8005A1D8u; /* jal link before delay slot */ - psx_delay_BFC421D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC421D4: 2484FF10 addiu $a0, $a0, -240 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-240)); - PGXP_ALU(0x2484FF10u, cpu->gpr[4], _pgx1, 0xFFFFFF10u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1D4u); -#endif - if (psx_delay_BFC421D0) { - psx_delay_BFC421D0 = 0; - cpu->gpr[31] = 0x8005A1D8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABE0u); - cpu->pc = 0x8005ABE0u; return; - } -} - -void SCPH1001_func_1FC421D8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC421D8u); - int psx_delay_BFC421D8 = 0; - int psx_taken_BFC421D8 = 0; - int psx_delay_BFC42218 = 0; - int psx_taken_BFC42218 = 0; - int psx_delay_BFC4223C = 0; - int psx_taken_BFC4223C = 0; - int psx_delay_BFC42248 = 0; - int psx_delay_BFC4225C = 0; - int psx_taken_BFC4225C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4223Cu: goto label_BFC4223C; - case 0xBFC421E0u: goto label_BFC421E0; - case 0xBFC42220u: goto label_BFC42220; - case 0xBFC42244u: goto label_BFC42244; - case 0xBFC42250u: goto label_BFC42250; - case 0xBFC42264u: goto label_BFC42264; - default: break; - } - } -label_BFC421D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC421D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC421D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC421D8: 10400050 beq $v0, $zero, 0xBFC4231C */ - uint32_t psx_brA_BFC421D8 = cpu->gpr[2]; uint32_t psx_brB_BFC421D8 = cpu->gpr[0]; - psx_taken_BFC421D8 = (psx_brA_BFC421D8 == psx_brB_BFC421D8); - psx_delay_BFC421D8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC421DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A1DCu); -#endif - if (psx_delay_BFC421D8) { - psx_delay_BFC421D8 = 0; - if (psx_taken_BFC421D8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A31Cu); - cpu->pc = 0x8005A31Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A1E0u); - } -label_BFC421E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC421E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC421E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC421E0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1E0u); -#endif - /* 0xBFC421E4: 8C639D50 lw $v1, -25264($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639D50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC421E8: 240F0001 addiu $t7, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240F0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC421EC: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A1F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC421F0: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1F0u); -#endif - /* 0xBFC421F4: 8F18FF0C lw $t8, -244($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1F4u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18FF0Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC421F8: AFB4002C sw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A1F8u); return; } g_debug_last_store_pc = 0x8005A1F8u; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A1F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC421FC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A1FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A200u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC42200: AC2F9D4C sw $t7, -25268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A200u); return; } g_debug_last_store_pc = 0x8005A200u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9D4Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A200u); -#endif - /* 0xBFC42204: 8C849D54 lw $a0, -25260($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A204u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849D54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A204u); -#endif - /* 0xBFC42208: 94790000 lhu $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A208u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x94790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A208u); -#endif - /* 0xBFC4220C: 94890000 lhu $t1, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A20Cu); return; } cpu->gpr[9] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 9, 0x10u); } - PGXP_LOAD(0x94890000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A20Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000100u); -#endif - /* 0xBFC42210: 03194024 and $t0, $t8, $t9 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[24] & cpu->gpr[25]; - PGXP_ALU(0x03194024u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A210u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC42214: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A214u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42218: 1140003B beq $t2, $zero, 0xBFC42308 */ - uint32_t psx_brA_BFC42218 = cpu->gpr[10]; uint32_t psx_brB_BFC42218 = cpu->gpr[0]; - psx_taken_BFC42218 = (psx_brA_BFC42218 == psx_brB_BFC42218); - psx_delay_BFC42218 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC4221C: 24140100 addiu $s4, $zero, 256 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); - PGXP_ALU(0x24140100u, cpu->gpr[20], _pgx1, 0x00000100u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A21Cu); -#endif - if (psx_delay_BFC42218) { - psx_delay_BFC42218 = 0; - if (psx_taken_BFC42218) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A308u); - cpu->pc = 0x8005A308u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A220u); - } -label_BFC42220: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42220u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC42220: AFB20020 sw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A220u); return; } g_debug_last_store_pc = 0x8005A220u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A220u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC42224: 3C12800E lui $s2, 0x800E */ - cpu->gpr[18] = 0x800E0000u; - PGXP_ALU(0x3C12800Eu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A224u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC42228: AFB3001C sw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A228u); return; } g_debug_last_store_pc = 0x8005A228u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A228u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80001u); -#endif - /* 0xBFC4222C: 2413000B addiu $s3, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2413000Bu, cpu->gpr[19], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A22Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC42230: 2652FEE0 addiu $s2, $s2, -288 */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-288)); - PGXP_ALU(0x2652FEE0u, cpu->gpr[18], _pgx1, 0xFFFFFEE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A230u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC42234: AFB00024 sw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A234u); return; } g_debug_last_store_pc = 0x8005A234u; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A234u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100005u); -#endif - /* 0xBFC42238: 02801021 addu $v0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A238u); -#endif -label_BFC4223C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4223Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4223Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A23Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4223C: 14400009 bne $v0, $zero, 0xBFC42264 */ - uint32_t psx_brA_BFC4223C = cpu->gpr[2]; uint32_t psx_brB_BFC4223C = cpu->gpr[0]; - psx_taken_BFC4223C = (psx_brA_BFC4223C != psx_brB_BFC4223C); - psx_delay_BFC4223C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A240u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100000u); -#endif - /* 0xBFC42240: 2694FFFF addiu $s4, $s4, -1 */ - { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-1)); - PGXP_ALU(0x2694FFFFu, cpu->gpr[20], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A240u); -#endif - if (psx_delay_BFC4223C) { - psx_delay_BFC4223C = 0; - if (psx_taken_BFC4223C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A264u); - goto label_BFC42264; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A244u); - } -label_BFC42244: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42244u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42244: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A244u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42248: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005A250u; /* jal link before delay slot */ - psx_delay_BFC42248 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4224C: 24849D58 addiu $a0, $a0, -25256 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25256)); - PGXP_ALU(0x24849D58u, cpu->gpr[4], _pgx1, 0xFFFF9D58u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A24Cu); -#endif - if (psx_delay_BFC42248) { - psx_delay_BFC42248 = 0; - cpu->gpr[31] = 0x8005A250u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC42250: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42250u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42250u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A250u); -#endif - /* 0xBFC42250: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A250u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A250u); -#endif - /* 0xBFC42254: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A254u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A254u); -#endif - /* 0xBFC42258: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A258u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A258u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4225C: 1000002A beq $zero, $zero, 0xBFC42308 */ - uint32_t psx_brA_BFC4225C = cpu->gpr[0]; uint32_t psx_brB_BFC4225C = cpu->gpr[0]; - psx_taken_BFC4225C = (psx_brA_BFC4225C == psx_brB_BFC4225C); - psx_delay_BFC4225C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A260u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42260: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A260u); -#endif - if (psx_delay_BFC4225C) { - psx_delay_BFC4225C = 0; - if (psx_taken_BFC4225C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A308u); - cpu->pc = 0x8005A308u; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A264u); - } -label_BFC42264: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42264u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20001u); -#endif - /* 0xBFC42264: 00008821 addu $s1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A264u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC42268: 24100001 addiu $s0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A268u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A26Cu); - cpu->pc = 0x8005A26Cu; return; /* fallthrough */ -} - -void SCPH1001_func_1FC4226C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4226Cu); - int psx_delay_BFC42288 = 0; - int psx_taken_BFC42288 = 0; - int psx_delay_BFC422A8 = 0; - int psx_taken_BFC422A8 = 0; - int psx_delay_BFC422B0 = 0; - int psx_delay_BFC422D0 = 0; - int psx_taken_BFC422D0 = 0; - int psx_delay_BFC422F0 = 0; - int psx_taken_BFC422F0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42290u: goto label_BFC42290; - case 0xBFC422B0u: goto label_BFC422B0; - case 0xBFC422B8u: goto label_BFC422B8; - case 0xBFC422CCu: goto label_BFC422CC; - case 0xBFC422D8u: goto label_BFC422D8; - case 0xBFC422F8u: goto label_BFC422F8; - default: break; - } - } -label_BFC4226C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4226Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4226Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x800u); -#endif - /* 0xBFC4226C: 3C0B800E lui $t3, 0x800E */ - cpu->gpr[11] = 0x800E0000u; - PGXP_ALU(0x3C0B800Eu, cpu->gpr[11], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A26Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A270u); -#endif - /* 0xBFC42270: 8D6BFF0C lw $t3, -244($t3) */ - { uint32_t _pgxa = cpu->gpr[11] + -244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A270u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x800u); } - PGXP_LOAD(0x8D6BFF0Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A270u); -#endif - /* 0xBFC42274: 946D0000 lhu $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A274u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x946D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A274u); -#endif - /* 0xBFC42278: 948F0000 lhu $t7, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A278u); return; } cpu->gpr[15] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 15, 0x10u); } - PGXP_LOAD(0x948F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A278u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11800u); -#endif - /* 0xBFC4227C: 020B6024 and $t4, $s0, $t3 */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[16] & cpu->gpr[11]; - PGXP_ALU(0x020B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A27Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC42280: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A280u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100C000u); -#endif - /* 0xBFC42284: 01CFC024 and $t8, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[24] = cpu->gpr[14] & cpu->gpr[15]; - PGXP_ALU(0x01CFC024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A284u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC42288: 13000010 beq $t8, $zero, 0xBFC422CC */ - uint32_t psx_brA_BFC42288 = cpu->gpr[24]; uint32_t psx_brB_BFC42288 = cpu->gpr[0]; - psx_taken_BFC42288 = (psx_brA_BFC42288 == psx_brB_BFC42288); - psx_delay_BFC42288 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4228C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A28Cu); -#endif - if (psx_delay_BFC42288) { - psx_delay_BFC42288 = 0; - if (psx_taken_BFC42288) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A2CCu); - goto label_BFC422CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A290u); - } -label_BFC42290: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42290u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2010001u); -#endif - /* 0xBFC42290: 0200C827 nor $t9, $s0, $zero */ - { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[25] = ~(cpu->gpr[16] | cpu->gpr[0]); - PGXP_ALU(0x0200C827u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A290u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100u); -#endif - /* 0xBFC42294: 00114080 sll $t0, $s1, 2 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[8] = cpu->gpr[17] << 2u; - PGXP_ALU(0x00114080u, cpu->gpr[8], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A294u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000008u); -#endif - /* 0xBFC42298: A4790000 sh $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A298u); return; } g_debug_last_store_pc = 0x8005A298u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[25] & 0xFFFFu)); } - PGXP_STORE(0xA4790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A298u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40300u); -#endif - /* 0xBFC4229C: 02484821 addu $t1, $s2, $t0 */ - { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[18] + cpu->gpr[8]; - PGXP_ALU(0x02484821u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A29Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2A0u); -#endif - /* 0xBFC422A0: 8D220000 lw $v0, 0($t1) */ - { uint32_t _pgxa = cpu->gpr[9]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } - PGXP_LOAD(0x8D220000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2A0u); -#endif - /* 0xBFC422A4: 94600000 lhu $zero, 0($v1) */ - { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2A4u); return; } (void)psx_cyc_load_half(cpu, psx_addr, 0, 0x8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC422A8: 10400008 beq $v0, $zero, 0xBFC422CC */ - uint32_t psx_brA_BFC422A8 = cpu->gpr[2]; uint32_t psx_brB_BFC422A8 = cpu->gpr[0]; - psx_taken_BFC422A8 = (psx_brA_BFC422A8 == psx_brB_BFC422A8); - psx_delay_BFC422A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC422AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A2ACu); -#endif - if (psx_delay_BFC422A8) { - psx_delay_BFC422A8 = 0; - if (psx_taken_BFC422A8) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A2CCu); - goto label_BFC422CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A2B0u); - } -label_BFC422B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC422B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC422B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC422B0: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x8005A2B8u; /* jalr link before delay slot */ - psx_delay_BFC422B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC422B4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A2B4u); -#endif - if (psx_delay_BFC422B0) { - psx_delay_BFC422B0 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x8005A2B8u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC422B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC422B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC422B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC422B8: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A2B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC422BC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A2BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2C0u); -#endif - /* 0xBFC422C0: 8C849D54 lw $a0, -25260($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849D54u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2C0u); -#endif - /* 0xBFC422C4: 8C639D50 lw $v1, -25264($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639D50u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC422C8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A2C8u); -#endif -label_BFC422CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC422CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC422CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC422CC: 26310001 addiu $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); - PGXP_ALU(0x26310001u, cpu->gpr[17], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000u); -#endif - /* 0xBFC422D0: 1633FFE6 bne $s1, $s3, 0xBFC4226C */ - uint32_t psx_brA_BFC422D0 = cpu->gpr[17]; uint32_t psx_brB_BFC422D0 = cpu->gpr[19]; - psx_taken_BFC422D0 = (psx_brA_BFC422D0 != psx_brB_BFC422D0); - psx_delay_BFC422D0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC422D4: 00108040 sll $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 1u; - PGXP_ALU(0x00108040u, cpu->gpr[16], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2D4u); -#endif - if (psx_delay_BFC422D0) { - psx_delay_BFC422D0 = 0; - if (psx_taken_BFC422D0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A26Cu); - goto label_BFC4226C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A2D8u); - } -label_BFC422D8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC422D8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC422D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC422D8: 3C0A800E lui $t2, 0x800E */ - cpu->gpr[10] = 0x800E0000u; - PGXP_ALU(0x3C0A800Eu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A2D8u); -#endif - /* 0xBFC422DC: 8D4AFF0C lw $t2, -244($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2DCu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AFF0Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2E0u); -#endif - /* 0xBFC422E0: 946B0000 lhu $t3, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2E0u); return; } cpu->gpr[11] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 11, 0x8u); } - PGXP_LOAD(0x946B0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2E0u); -#endif - /* 0xBFC422E4: 948D0000 lhu $t5, 0($a0) */ - { uint32_t _pgxa = cpu->gpr[4]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2E4u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x10u); } - PGXP_LOAD(0x948D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1C00u); -#endif - /* 0xBFC422E8: 014B6024 and $t4, $t2, $t3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[10] & cpu->gpr[11]; - PGXP_ALU(0x014B6024u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x7000u); -#endif - /* 0xBFC422EC: 018D7024 and $t6, $t4, $t5 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[12] & cpu->gpr[13]; - PGXP_ALU(0x018D7024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC422F0: 15C0FFD2 bne $t6, $zero, 0xBFC4223C */ - uint32_t psx_brA_BFC422F0 = cpu->gpr[14]; uint32_t psx_brB_BFC422F0 = cpu->gpr[0]; - psx_taken_BFC422F0 = (psx_brA_BFC422F0 != psx_brB_BFC422F0); - psx_delay_BFC422F0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100005u); -#endif - /* 0xBFC422F4: 02801021 addu $v0, $s4, $zero */ - { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[0]; - PGXP_ALU(0x02801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2F4u); -#endif - if (psx_delay_BFC422F0) { - psx_delay_BFC422F0 = 0; - if (psx_taken_BFC422F0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A23Cu); - cpu->pc = 0x8005A23Cu; return; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A2F8u); - } -label_BFC422F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC422F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC422F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A2F8u); -#endif - /* 0xBFC422F8: 8FB00024 lw $s0, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2F8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00024u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2F8u); -#endif - /* 0xBFC422FC: 8FB20020 lw $s2, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A2FCu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB20020u, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A2FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A300u); -#endif - /* 0xBFC42300: 8FB3001C lw $s3, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A300u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB3001Cu, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A300u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42304: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A304u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A308u); - cpu->pc = 0x8005A308u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC42308(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42308u); - int psx_delay_BFC4230C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42314u: goto label_BFC42314; - default: break; - } - } -label_BFC42308: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42308u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42308: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A308u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4230C: 0C016AE8 jal 0xB005ABA0 */ - cpu->gpr[31] = 0x8005A314u; /* jal link before delay slot */ - psx_delay_BFC4230C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A310u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42310: AC209D4C sw $zero, -25268($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25268; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25268)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A310u); return; } g_debug_last_store_pc = 0x8005A310u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209D4Cu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A310u); -#endif - if (psx_delay_BFC4230C) { - psx_delay_BFC4230C = 0; - cpu->gpr[31] = 0x8005A314u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABA0u); - cpu->pc = 0x8005ABA0u; return; - } -label_BFC42314: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42314u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A314u); -#endif - /* 0xBFC42314: 8FB4002C lw $s4, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A314u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB4002Cu, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A314u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42318: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A318u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A31Cu); - cpu->pc = 0x8005A31Cu; return; /* fallthrough */ -} - -void SCPH1001_func_1FC4231C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4231Cu); - int psx_delay_BFC42330 = 0; - int psx_delay_BFC42340 = 0; - int psx_delay_BFC42350 = 0; - int psx_delay_BFC42360 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42338u: goto label_BFC42338; - case 0xBFC42348u: goto label_BFC42348; - case 0xBFC42358u: goto label_BFC42358; - case 0xBFC42368u: goto label_BFC42368; - default: break; - } - } -label_BFC4231C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4231Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4231Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC4231C: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A31Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC42320: 25EFFE90 addiu $t7, $t7, -368 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-368)); - PGXP_ALU(0x25EFFE90u, cpu->gpr[15], _pgx1, 0xFFFFFE90u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A320u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42324: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A324u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42328: 3C04800E lui $a0, 0x800E */ - cpu->gpr[4] = 0x800E0000u; - PGXP_ALU(0x3C04800Eu, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A328u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC4232C: AC2FFF14 sw $t7, -236($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A32Cu); return; } g_debug_last_store_pc = 0x8005A32Cu; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FFF14u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A32Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A330u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42330: 0C016AFC jal 0xB005ABF0 */ - cpu->gpr[31] = 0x8005A338u; /* jal link before delay slot */ - psx_delay_BFC42330 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42334: 2484FF10 addiu $a0, $a0, -240 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-240)); - PGXP_ALU(0x2484FF10u, cpu->gpr[4], _pgx1, 0xFFFFFF10u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A334u); -#endif - if (psx_delay_BFC42330) { - psx_delay_BFC42330 = 0; - cpu->gpr[31] = 0x8005A338u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005ABF0u); - cpu->pc = 0x8005ABF0u; return; - } -label_BFC42338: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42338u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC42338: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A338u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4233C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A33Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A340u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42340: 0C016950 jal 0xB005A540 */ - cpu->gpr[31] = 0x8005A348u; /* jal link before delay slot */ - psx_delay_BFC42340 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC42344: AC389D48 sw $t8, -25272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A344u); return; } g_debug_last_store_pc = 0x8005A344u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC389D48u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A344u); -#endif - if (psx_delay_BFC42340) { - psx_delay_BFC42340 = 0; - cpu->gpr[31] = 0x8005A348u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A540u); - cpu->pc = 0x8005A540u; return; - } -label_BFC42348: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42348u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A348u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC42348: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A348u); -#endif - /* 0xBFC4234C: 8F399D44 lw $t9, -25276($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A34Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399D44u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A34Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A350u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42350: 0C016990 jal 0xB005A640 */ - cpu->gpr[31] = 0x8005A358u; /* jal link before delay slot */ - psx_delay_BFC42350 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000004u); -#endif - /* 0xBFC42354: AF220014 sw $v0, 20($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A354u); return; } g_debug_last_store_pc = 0x8005A354u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAF220014u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A354u); -#endif - if (psx_delay_BFC42350) { - psx_delay_BFC42350 = 0; - cpu->gpr[31] = 0x8005A358u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A640u); - cpu->pc = 0x8005A640u; return; - } -label_BFC42358: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42358u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A358u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC42358: 3C088008 lui $t0, 0x8008 */ - cpu->gpr[8] = 0x80080000u; - PGXP_ALU(0x3C088008u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A358u); -#endif - /* 0xBFC4235C: 8D089D44 lw $t0, -25276($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A35Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x100u); } - PGXP_LOAD(0x8D089D44u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A35Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A360u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42360: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8005A368u; /* jal link before delay slot */ - psx_delay_BFC42360 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x104u); -#endif - /* 0xBFC42364: AD020004 sw $v0, 4($t0) */ - { uint32_t _pgxa = cpu->gpr[8] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A364u); return; } g_debug_last_store_pc = 0x8005A364u; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAD020004u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A364u); -#endif - if (psx_delay_BFC42360) { - psx_delay_BFC42360 = 0; - cpu->gpr[31] = 0x8005A368u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC42368: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42368u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A368u); -#endif - /* 0xBFC42368: 8FB10034 lw $s1, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A368u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10034u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A368u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4236C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A36Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A370u); - cpu->pc = 0x8005A370u; return; /* fallthrough */ -} - -void SCPH1001_func_1FC42370(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42370u); - int psx_delay_BFC42378 = 0; -label_BFC42370: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42370u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A370u); -#endif - /* 0xBFC42370: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A370u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A370u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42374: 27BD0050 addiu $sp, $sp, 80 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (80)); - PGXP_ALU(0x27BD0050u, cpu->gpr[29], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A374u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42378: 03E00008 jr $ra */ - psx_delay_BFC42378 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4237C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A37Cu); -#endif - if (psx_delay_BFC42378) { - psx_delay_BFC42378 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42380(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42380u); - int psx_delay_BFC42398 = 0; - int psx_taken_BFC42398 = 0; - int psx_delay_BFC423A0 = 0; - int psx_taken_BFC423A0 = 0; - int psx_delay_BFC423DC = 0; - int psx_taken_BFC423DC = 0; - int psx_delay_BFC4241C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC423A0u: goto label_BFC423A0; - case 0xBFC423A8u: goto label_BFC423A8; - case 0xBFC423E4u: goto label_BFC423E4; - case 0xBFC4241Cu: goto label_BFC4241C; - default: break; - } - } -label_BFC42380: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42380u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC42380: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A380u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC42384: 25EFFEE0 addiu $t7, $t7, -288 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-288)); - PGXP_ALU(0x25EFFEE0u, cpu->gpr[15], _pgx1, 0xFFFFFEE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A384u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC42388: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A388u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC4238C: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A38Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A390u); -#endif - /* 0xBFC42390: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A390u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A390u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42394: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A394u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC42398: 10A30020 beq $a1, $v1, 0xBFC4241C */ - uint32_t psx_brA_BFC42398 = cpu->gpr[5]; uint32_t psx_brB_BFC42398 = cpu->gpr[3]; - psx_taken_BFC42398 = (psx_brA_BFC42398 == psx_brB_BFC42398); - psx_delay_BFC42398 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4239C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A39Cu); -#endif - if (psx_delay_BFC42398) { - psx_delay_BFC42398 = 0; - if (psx_taken_BFC42398) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A41Cu); - goto label_BFC4241C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A3A0u); - } -label_BFC423A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC423A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC423A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC423A0: 10A00010 beq $a1, $zero, 0xBFC423E4 */ - uint32_t psx_brA_BFC423A0 = cpu->gpr[5]; uint32_t psx_brB_BFC423A0 = cpu->gpr[0]; - psx_taken_BFC423A0 = (psx_brA_BFC423A0 == psx_brB_BFC423A0); - psx_delay_BFC423A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC423A4: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3A4u); return; } g_debug_last_store_pc = 0x8005A3A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3A4u); -#endif - if (psx_delay_BFC423A0) { - psx_delay_BFC423A0 = 0; - if (psx_taken_BFC423A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A3E4u); - goto label_BFC423E4; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A3A8u); - } -label_BFC423A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC423A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC423A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC423A8: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A3A8u); -#endif - /* 0xBFC423AC: 8CC69D54 lw $a2, -25260($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3ACu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69D54u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC423B0: AC450000 sw $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3B0u); return; } g_debug_last_store_pc = 0x8005A3B0u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC423B4: 24180001 addiu $t8, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24180001u, cpu->gpr[24], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3B4u); -#endif - /* 0xBFC423B8: 94D90000 lhu $t9, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3B8u); return; } cpu->gpr[25] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 25, 0x40u); } - PGXP_LOAD(0x94D90000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000090u); -#endif - /* 0xBFC423BC: 00983804 sllv $a3, $t8, $a0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = cpu->gpr[24] << (cpu->gpr[4] & 0x1Fu); - PGXP_ALU(0x00983804u, cpu->gpr[7], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x180u); -#endif - /* 0xBFC423C0: 30E8FFFF andi $t0, $a3, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] & 0xFFFFu; - PGXP_ALU(0x30E8FFFFu, cpu->gpr[8], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000300u); -#endif - /* 0xBFC423C4: 03284825 or $t1, $t9, $t0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[25] | cpu->gpr[8]; - PGXP_ALU(0x03284825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400u); -#endif - /* 0xBFC423C8: 3C0A800E lui $t2, 0x800E */ - cpu->gpr[10] = 0x800E0000u; - PGXP_ALU(0x3C0A800Eu, cpu->gpr[10], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A3C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x240u); -#endif - /* 0xBFC423CC: A4C90000 sh $t1, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3CCu); return; } g_debug_last_store_pc = 0x8005A3CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[9] & 0xFFFFu)); } - PGXP_STORE(0xA4C90000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3D0u); -#endif - /* 0xBFC423D0: 8D4AFF0C lw $t2, -244($t2) */ - { uint32_t _pgxa = cpu->gpr[10] + -244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3D0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } - PGXP_LOAD(0x8D4AFF0Cu, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC423D4: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A3D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC80u); -#endif - /* 0xBFC423D8: 01475825 or $t3, $t2, $a3 */ - { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[11] = cpu->gpr[10] | cpu->gpr[7]; - PGXP_ALU(0x01475825u, cpu->gpr[11], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC423DC: 1000000F beq $zero, $zero, 0xBFC4241C */ - uint32_t psx_brA_BFC423DC = cpu->gpr[0]; uint32_t psx_brB_BFC423DC = cpu->gpr[0]; - psx_taken_BFC423DC = (psx_brA_BFC423DC == psx_brB_BFC423DC); - psx_delay_BFC423DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x802u); -#endif - /* 0xBFC423E0: AC2BFF0C sw $t3, -244($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3E0u); return; } g_debug_last_store_pc = 0x8005A3E0u; cpu->write_word(psx_addr, cpu->gpr[11]); } - PGXP_STORE(0xAC2BFF0Cu, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3E0u); -#endif - if (psx_delay_BFC423DC) { - psx_delay_BFC423DC = 0; - if (psx_taken_BFC423DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A41Cu); - goto label_BFC4241C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A3E4u); - } -label_BFC423E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC423E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC423E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC423E4: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A3E4u); -#endif - /* 0xBFC423E8: 8CC69D54 lw $a2, -25260($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3E8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69D54u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1001u); -#endif - /* 0xBFC423EC: 240C0001 addiu $t4, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x240C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A3F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1014u); -#endif - /* 0xBFC423F0: 008C1004 sllv $v0, $t4, $a0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[12] << (cpu->gpr[4] & 0x1Fu); - PGXP_ALU(0x008C1004u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3F0u); -#endif - /* 0xBFC423F4: 94CD0000 lhu $t5, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A3F4u); return; } cpu->gpr[13] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 13, 0x40u); } - PGXP_LOAD(0x94CD0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC423F8: 00401027 nor $v0, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = ~(cpu->gpr[2] | cpu->gpr[0]); - PGXP_ALU(0x00401027u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4004u); -#endif - /* 0xBFC423FC: 304EFFFF andi $t6, $v0, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[14] = cpu->gpr[2] & 0xFFFFu; - PGXP_ALU(0x304EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A3FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xE000u); -#endif - /* 0xBFC42400: 01AE7824 and $t7, $t5, $t6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[13] & cpu->gpr[14]; - PGXP_ALU(0x01AE7824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A400u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000000u); -#endif - /* 0xBFC42404: 3C18800E lui $t8, 0x800E */ - cpu->gpr[24] = 0x800E0000u; - PGXP_ALU(0x3C18800Eu, cpu->gpr[24], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A404u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC42408: A4CF0000 sh $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A408u); return; } g_debug_last_store_pc = 0x8005A408u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[15] & 0xFFFFu)); } - PGXP_STORE(0xA4CF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A408u); -#endif - /* 0xBFC4240C: 8F18FF0C lw $t8, -244($t8) */ - { uint32_t _pgxa = cpu->gpr[24] + -244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[24] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A40Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x1000000u); } - PGXP_LOAD(0x8F18FF0Cu, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A40Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42410: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A410u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000004u); -#endif - /* 0xBFC42414: 0302C824 and $t9, $t8, $v0 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[2]; - PGXP_ALU(0x0302C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A414u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000002u); -#endif - /* 0xBFC42418: AC39FF0C sw $t9, -244($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A418u); return; } g_debug_last_store_pc = 0x8005A418u; cpu->write_word(psx_addr, cpu->gpr[25]); } - PGXP_STORE(0xAC39FF0Cu, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A418u); -#endif -label_BFC4241C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4241Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4241Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A41Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4241C: 03E00008 jr $ra */ - psx_delay_BFC4241C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A420u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC42420: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A420u); -#endif - if (psx_delay_BFC4241C) { - psx_delay_BFC4241C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42424(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42424u); - int psx_delay_BFC4242C = 0; - int psx_delay_BFC42484 = 0; - int psx_taken_BFC42484 = 0; - int psx_delay_BFC42490 = 0; - int psx_delay_BFC424A0 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42434u: goto label_BFC42434; - case 0xBFC42474u: goto label_BFC42474; - case 0xBFC4248Cu: goto label_BFC4248C; - case 0xBFC42498u: goto label_BFC42498; - default: break; - } - } -label_BFC42424: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42424u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42424: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A424u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42428: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A428u); return; } g_debug_last_store_pc = 0x8005A428u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A428u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4242C: 0C016AA4 jal 0xB005AA90 */ - cpu->gpr[31] = 0x8005A434u; /* jal link before delay slot */ - psx_delay_BFC4242C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A430u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42430: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A430u); -#endif - if (psx_delay_BFC4242C) { - psx_delay_BFC4242C = 0; - cpu->gpr[31] = 0x8005A434u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA90u); - cpu->pc = 0x8005AA90u; return; - } -label_BFC42434: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42434u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A434u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC42434: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A434u); -#endif - /* 0xBFC42438: 8DCE9D50 lw $t6, -25264($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A438u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D50u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A438u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC4243C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A43Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A440u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC42440: A5C00000 sh $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A440u); return; } g_debug_last_store_pc = 0x8005A440u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5C00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A440u); -#endif - /* 0xBFC42444: 8DEF9D54 lw $t7, -25260($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25260; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A444u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9D54u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A444u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42448: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A448u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC4244C: A5E00000 sh $zero, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8005A44Cu); return; } g_debug_last_store_pc = 0x8005A44Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } - PGXP_STORE(0xA5E00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A44Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42450: AC20FEE4 sw $zero, -284($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -284; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A450u); return; } g_debug_last_store_pc = 0x8005A450u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A450u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42454: AC20FEE0 sw $zero, -288($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A454u); return; } g_debug_last_store_pc = 0x8005A454u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE0u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A454u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC42458: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A458u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4245C: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A45Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42460: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A460u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42464: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A464u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42468: 2442FEEC addiu $v0, $v0, -276 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-276)); - PGXP_ALU(0x2442FEECu, cpu->gpr[2], _pgx1, 0xFFFFFEECu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A468u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4246C: AC20FEE8 sw $zero, -280($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A46Cu); return; } g_debug_last_store_pc = 0x8005A46Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FEE8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A46Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A470u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC42470: 2463FF0C addiu $v1, $v1, -244 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-244)); - PGXP_ALU(0x2463FF0Cu, cpu->gpr[3], _pgx1, 0xFFFFFF0Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A470u); -#endif -label_BFC42474: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42474u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC42474: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A474u); return; } g_debug_last_store_pc = 0x8005A474u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A474u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42478: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A478u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC4247C: AC40FFF4 sw $zero, -12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A47Cu); return; } g_debug_last_store_pc = 0x8005A47Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A47Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC42480: AC40FFF8 sw $zero, -8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A480u); return; } g_debug_last_store_pc = 0x8005A480u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A480u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC42484: 1443FFFB bne $v0, $v1, 0xBFC42474 */ - uint32_t psx_brA_BFC42484 = cpu->gpr[2]; uint32_t psx_brB_BFC42484 = cpu->gpr[3]; - psx_taken_BFC42484 = (psx_brA_BFC42484 != psx_brB_BFC42484); - psx_delay_BFC42484 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC42488: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A488u); return; } g_debug_last_store_pc = 0x8005A488u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A488u); -#endif - if (psx_delay_BFC42484) { - psx_delay_BFC42484 = 0; - if (psx_taken_BFC42484) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A474u); - goto label_BFC42474; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A48Cu); - } -label_BFC4248C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4248Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4248Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4248C: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A48Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A490u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42490: 0C016A84 jal 0xB005AA10 */ - cpu->gpr[31] = 0x8005A498u; /* jal link before delay slot */ - psx_delay_BFC42490 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42494: AC209D48 sw $zero, -25272($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A494u); return; } g_debug_last_store_pc = 0x8005A494u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC209D48u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A494u); -#endif - if (psx_delay_BFC42490) { - psx_delay_BFC42490 = 0; - cpu->gpr[31] = 0x8005A498u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AA10u); - cpu->pc = 0x8005AA10u; return; - } -label_BFC42498: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42498u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A498u); -#endif - /* 0xBFC42498: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A498u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A498u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4249C: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A49Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC424A0: 03E00008 jr $ra */ - psx_delay_BFC424A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC424A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A4A4u); -#endif - if (psx_delay_BFC424A0) { - psx_delay_BFC424A0 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC424A8(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC424A8u); - int psx_delay_BFC4250C = 0; - int psx_taken_BFC4250C = 0; - int psx_delay_BFC42518 = 0; - int psx_delay_BFC42528 = 0; - int psx_delay_BFC42538 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42514u: goto label_BFC42514; - case 0xBFC42520u: goto label_BFC42520; - case 0xBFC42530u: goto label_BFC42530; - case 0xBFC42534u: goto label_BFC42534; - default: break; - } - } -label_BFC424A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC424A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC424A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC424A8: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC424AC: 3C021F80 lui $v0, 0x1F80 */ - cpu->gpr[2] = 0x1F800000u; - PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A4ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC424B0: 34421814 ori $v0, $v0, 0x1814 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1814u; - PGXP_ALU(0x34421814u, cpu->gpr[2], _pgx1, 0x1814u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC424B4: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4B4u); return; } g_debug_last_store_pc = 0x8005A4B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4B4u); -#endif - /* 0xBFC424B8: 8C4E0000 lw $t6, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4B8u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } - PGXP_LOAD(0x8C4E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC424BC: 3C04E100 lui $a0, 0xE100 */ - cpu->gpr[4] = 0xE1000000u; - PGXP_ALU(0x3C04E100u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A4BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC424C0: 34841000 ori $a0, $a0, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1000u; - PGXP_ALU(0x34841000u, cpu->gpr[4], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC424C4: 3C031F80 lui $v1, 0x1F80 */ - cpu->gpr[3] = 0x1F800000u; - PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A4C4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC424C8: 31CF3FFF andi $t7, $t6, 0x3FFF */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[14] & 0x3FFFu; - PGXP_ALU(0x31CF3FFFu, cpu->gpr[15], _pgx1, 0x3FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC424CC: 34631810 ori $v1, $v1, 0x1810 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1810u; - PGXP_ALU(0x34631810u, cpu->gpr[3], _pgx1, 0x1810u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008010u); -#endif - /* 0xBFC424D0: 01E4C025 or $t8, $t7, $a0 */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[24] = cpu->gpr[15] | cpu->gpr[4]; - PGXP_ALU(0x01E4C025u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000008u); -#endif - /* 0xBFC424D4: AC780000 sw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4D4u); return; } g_debug_last_store_pc = 0x8005A4D4u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAC780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4D4u); -#endif - /* 0xBFC424D8: 8C590000 lw $t9, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4D8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } - PGXP_LOAD(0x8C590000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC424DC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A4DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC424E0: 33283FFF andi $t0, $t9, 0x3FFF */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x3FFFu; - PGXP_ALU(0x33283FFFu, cpu->gpr[8], _pgx1, 0x3FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x310u); -#endif - /* 0xBFC424E4: 01044825 or $t1, $t0, $a0 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[9] = cpu->gpr[8] | cpu->gpr[4]; - PGXP_ALU(0x01044825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x208u); -#endif - /* 0xBFC424E8: AC690000 sw $t1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4E8u); return; } g_debug_last_store_pc = 0x8005A4E8u; cpu->write_word(psx_addr, cpu->gpr[9]); } - PGXP_STORE(0xAC690000u, _pgxa, cpu->gpr[9]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4E8u); -#endif - /* 0xBFC424EC: 8C4A0000 lw $t2, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4ECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } - PGXP_LOAD(0x8C4A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC424F0: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A4F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC00u); -#endif - /* 0xBFC424F4: 314B3FFF andi $t3, $t2, 0x3FFF */ - { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[11] = cpu->gpr[10] & 0x3FFFu; - PGXP_ALU(0x314B3FFFu, cpu->gpr[11], _pgx1, 0x3FFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4F4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1810u); -#endif - /* 0xBFC424F8: 01646025 or $t4, $t3, $a0 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[11] | cpu->gpr[4]; - PGXP_ALU(0x01646025u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008u); -#endif - /* 0xBFC424FC: AC6C0000 sw $t4, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A4FCu); return; } g_debug_last_store_pc = 0x8005A4FCu; cpu->write_word(psx_addr, cpu->gpr[12]); } - PGXP_STORE(0xAC6C0000u, _pgxa, cpu->gpr[12]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A4FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A500u); -#endif - /* 0xBFC42500: 8C4D0000 lw $t5, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A500u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x4u); } - PGXP_LOAD(0x8C4D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42504: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6000u); -#endif - /* 0xBFC42508: 31AE1000 andi $t6, $t5, 0x1000 */ - { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[14] = cpu->gpr[13] & 0x1000u; - PGXP_ALU(0x31AE1000u, cpu->gpr[14], _pgx1, 0x1000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC4250C: 15C00009 bne $t6, $zero, 0xBFC42534 */ - uint32_t psx_brA_BFC4250C = cpu->gpr[14]; uint32_t psx_brB_BFC4250C = cpu->gpr[0]; - psx_taken_BFC4250C = (psx_brA_BFC4250C != psx_brB_BFC4250C); - psx_delay_BFC4250C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A510u); -#endif - /* 0xBFC42510: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A510u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A510u); -#endif - if (psx_delay_BFC4250C) { - psx_delay_BFC4250C = 0; - if (psx_taken_BFC4250C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A534u); - goto label_BFC42534; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A514u); - } -label_BFC42514: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42514u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42514: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A514u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42518: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005A520u; /* jal link before delay slot */ - psx_delay_BFC42518 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC4251C: 24849D70 addiu $a0, $a0, -25232 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25232)); - PGXP_ALU(0x24849D70u, cpu->gpr[4], _pgx1, 0xFFFF9D70u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A51Cu); -#endif - if (psx_delay_BFC42518) { - psx_delay_BFC42518 = 0; - cpu->gpr[31] = 0x8005A520u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC42520: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42520u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A520u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42520: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A520u); -#endif - /* 0xBFC42524: 8C849D44 lw $a0, -25276($a0) */ - { uint32_t _pgxa = cpu->gpr[4] + -25276; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-25276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A524u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } - PGXP_LOAD(0x8C849D44u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A524u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42528: 0C016A34 jal 0xB005A8D0 */ - cpu->gpr[31] = 0x8005A530u; /* jal link before delay slot */ - psx_delay_BFC42528 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4252C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A52Cu); -#endif - if (psx_delay_BFC42528) { - psx_delay_BFC42528 = 0; - cpu->gpr[31] = 0x8005A530u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8D0u); - cpu->pc = 0x8005A8D0u; return; - } -label_BFC42530: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42530u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42530u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A530u); -#endif - /* 0xBFC42530: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A530u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A530u); -#endif -label_BFC42534: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42534u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42534: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A534u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42538: 03E00008 jr $ra */ - psx_delay_BFC42538 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4253C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A53Cu); -#endif - if (psx_delay_BFC42538) { - psx_delay_BFC42538 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42540(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42540u); - int psx_delay_BFC42554 = 0; - int psx_delay_BFC42564 = 0; - int psx_taken_BFC42564 = 0; - int psx_delay_BFC4258C = 0; - int psx_delay_BFC42598 = 0; - int psx_delay_BFC425B4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4255Cu: goto label_BFC4255C; - case 0xBFC4256Cu: goto label_BFC4256C; - case 0xBFC42594u: goto label_BFC42594; - case 0xBFC425A0u: goto label_BFC425A0; - case 0xBFC425ACu: goto label_BFC425AC; - default: break; - } - } -label_BFC42540: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42540u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42540: 27BDFFE0 addiu $sp, $sp, -32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-32)); - PGXP_ALU(0x27BDFFE0u, cpu->gpr[29], _pgx1, 0xFFFFFFE0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A540u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC42544: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A544u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42548: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A548u); return; } g_debug_last_store_pc = 0x8005A548u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A548u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4254C: 24A5A5BC addiu $a1, $a1, -23108 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23108)); - PGXP_ALU(0x24A5A5BCu, cpu->gpr[5], _pgx1, 0xFFFFA5BCu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A54Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC42550: AFA50018 sw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A550u); return; } g_debug_last_store_pc = 0x8005A550u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A550u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42554: 0C016824 jal 0xB005A090 */ - cpu->gpr[31] = 0x8005A55Cu; /* jal link before delay slot */ - psx_delay_BFC42554 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42558: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A558u); -#endif - if (psx_delay_BFC42554) { - psx_delay_BFC42554 = 0; - cpu->gpr[31] = 0x8005A55Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A090u); - cpu->pc = 0x8005A090u; return; - } -label_BFC4255C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4255Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4255Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A55Cu); -#endif - /* 0xBFC4255C: 8FA50018 lw $a1, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A55Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA50018u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A55Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42560: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A560u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC42564: 10450011 beq $v0, $a1, 0xBFC425AC */ - uint32_t psx_brA_BFC42564 = cpu->gpr[2]; uint32_t psx_brB_BFC42564 = cpu->gpr[5]; - psx_taken_BFC42564 = (psx_brA_BFC42564 == psx_brB_BFC42564); - psx_delay_BFC42564 = 1; - /* 0xBFC42568: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A568u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A568u); -#endif - if (psx_delay_BFC42564) { - psx_delay_BFC42564 = 0; - if (psx_taken_BFC42564) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A5ACu); - goto label_BFC425AC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A56Cu); - } -label_BFC4256C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4256Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4256Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC4256C: 3C0F8008 lui $t7, 0x8008 */ - cpu->gpr[15] = 0x80080000u; - PGXP_ALU(0x3C0F8008u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A56Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A570u); -#endif - /* 0xBFC42570: 8DEF9D98 lw $t7, -25192($t7) */ - { uint32_t _pgxa = cpu->gpr[15] + -25192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (-25192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A570u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } - PGXP_LOAD(0x8DEF9D98u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A570u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC42574: 240EFFFF addiu $t6, $zero, -1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); - PGXP_ALU(0x240EFFFFu, cpu->gpr[14], _pgx1, 0xFFFFFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A574u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC42578: 3C198008 lui $t9, 0x8008 */ - cpu->gpr[25] = 0x80080000u; - PGXP_ALU(0x3C198008u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A578u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC4257C: ADEE0000 sw $t6, 0($t7) */ - { uint32_t _pgxa = cpu->gpr[15]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A57Cu); return; } g_debug_last_store_pc = 0x8005A57Cu; cpu->write_word(psx_addr, cpu->gpr[14]); } - PGXP_STORE(0xADEE0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A57Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A580u); -#endif - /* 0xBFC42580: 8F399D94 lw $t9, -25196($t9) */ - { uint32_t _pgxa = cpu->gpr[25] + -25196; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (-25196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A580u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x2000000u); } - PGXP_LOAD(0x8F399D94u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A580u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000001u); -#endif - /* 0xBFC42584: 24180148 addiu $t8, $zero, 328 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[0] + (328)); - PGXP_ALU(0x24180148u, cpu->gpr[24], _pgx1, 0x00000148u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A584u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42588: 00002021 addu $a0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002021u, cpu->gpr[4], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A588u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4258C: 0C016A60 jal 0xB005A980 */ - cpu->gpr[31] = 0x8005A594u; /* jal link before delay slot */ - psx_delay_BFC4258C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A590u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3000000u); -#endif - /* 0xBFC42590: AF380000 sw $t8, 0($t9) */ - { uint32_t _pgxa = cpu->gpr[25]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A590u); return; } g_debug_last_store_pc = 0x8005A590u; cpu->write_word(psx_addr, cpu->gpr[24]); } - PGXP_STORE(0xAF380000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A590u); -#endif - if (psx_delay_BFC4258C) { - psx_delay_BFC4258C = 0; - cpu->gpr[31] = 0x8005A594u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A980u); - cpu->pc = 0x8005A980u; return; - } -label_BFC42594: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42594u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42594: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A594u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42598: 0C016B00 jal 0xB005AC00 */ - cpu->gpr[31] = 0x8005A5A0u; /* jal link before delay slot */ - psx_delay_BFC42598 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC4259C: 00002821 addu $a1, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00002821u, cpu->gpr[5], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A59Cu); -#endif - if (psx_delay_BFC42598) { - psx_delay_BFC42598 = 0; - cpu->gpr[31] = 0x8005A5A0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005AC00u); - cpu->pc = 0x8005AC00u; return; - } -label_BFC425A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC425A0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A5A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC425A4: AC20FF40 sw $zero, -192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5A4u); return; } g_debug_last_store_pc = 0x8005A5A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF40u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5A4u); -#endif - /* 0xBFC425A8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5A8u); -#endif -label_BFC425AC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425ACu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC425AC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A5ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC425B0: 2442A5FC addiu $v0, $v0, -23044 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-23044)); - PGXP_ALU(0x2442A5FCu, cpu->gpr[2], _pgx1, 0xFFFFA5FCu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC425B4: 03E00008 jr $ra */ - psx_delay_BFC425B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC425B8: 27BD0020 addiu $sp, $sp, 32 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); - PGXP_ALU(0x27BD0020u, cpu->gpr[29], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5B8u); -#endif - if (psx_delay_BFC425B4) { - psx_delay_BFC425B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC425BC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC425BCu); - int psx_delay_BFC425DC = 0; - int psx_taken_BFC425DC = 0; - int psx_delay_BFC425E4 = 0; - int psx_delay_BFC425F4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC425E4u: goto label_BFC425E4; - case 0xBFC425ECu: goto label_BFC425EC; - default: break; - } - } -label_BFC425BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC425BC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A5BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5C0u); -#endif - /* 0xBFC425C0: 8DCE9D9C lw $t6, -25188($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25188; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5C0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9D9Cu, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC425C4: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A5C4u); -#endif - /* 0xBFC425C8: 8C42FF40 lw $v0, -192($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42FF40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC425CC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC425D0: 3C018008 lui $at, 0x8008 */ - cpu->gpr[1] = 0x80080000u; - PGXP_ALU(0x3C018008u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A5D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC000u); -#endif - /* 0xBFC425D4: 25CF0001 addiu $t7, $t6, 1 */ - { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); - PGXP_ALU(0x25CF0001u, cpu->gpr[15], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5D4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC425D8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5D8u); return; } g_debug_last_store_pc = 0x8005A5D8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5D8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC425DC: 10400003 beq $v0, $zero, 0xBFC425EC */ - uint32_t psx_brA_BFC425DC = cpu->gpr[2]; uint32_t psx_brB_BFC425DC = cpu->gpr[0]; - psx_taken_BFC425DC = (psx_brA_BFC425DC == psx_brB_BFC425DC); - psx_delay_BFC425DC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC425E0: AC2F9D9C sw $t7, -25188($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -25188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-25188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5E0u); return; } g_debug_last_store_pc = 0x8005A5E0u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2F9D9Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5E0u); -#endif - if (psx_delay_BFC425DC) { - psx_delay_BFC425DC = 0; - if (psx_taken_BFC425DC) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A5ECu); - goto label_BFC425EC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A5E4u); - } -label_BFC425E4: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425E4u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC425E4: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x8005A5ECu; /* jalr link before delay slot */ - psx_delay_BFC425E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC425E8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A5E8u); -#endif - if (psx_delay_BFC425E4) { - psx_delay_BFC425E4 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x8005A5ECu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC425EC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425ECu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5ECu); -#endif - /* 0xBFC425EC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A5ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC425F0: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC425F4: 03E00008 jr $ra */ - psx_delay_BFC425F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC425F8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A5F8u); -#endif - if (psx_delay_BFC425F4) { - psx_delay_BFC425F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC425FC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC425FCu); - int psx_delay_BFC42604 = 0; - int psx_delay_BFC4261C = 0; - int psx_taken_BFC4261C = 0; - int psx_delay_BFC42638 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4260Cu: goto label_BFC4260C; - case 0xBFC42624u: goto label_BFC42624; - case 0xBFC42634u: goto label_BFC42634; - default: break; - } - } -label_BFC425FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC425FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC425FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC425FC: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A5FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42600: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A600u); return; } g_debug_last_store_pc = 0x8005A600u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A600u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42604: 0C016950 jal 0xB005A540 */ - cpu->gpr[31] = 0x8005A60Cu; /* jal link before delay slot */ - psx_delay_BFC42604 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000010u); -#endif - /* 0xBFC42608: AFA40018 sw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A608u); return; } g_debug_last_store_pc = 0x8005A608u; cpu->write_word(psx_addr, cpu->gpr[4]); } - PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A608u); -#endif - if (psx_delay_BFC42604) { - psx_delay_BFC42604 = 0; - cpu->gpr[31] = 0x8005A60Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A540u); - cpu->pc = 0x8005A540u; return; - } -label_BFC4260C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4260Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4260Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC4260C: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A60Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A610u); -#endif - /* 0xBFC42610: 8C42FF40 lw $v0, -192($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A610u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } - PGXP_LOAD(0x8C42FF40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A610u); -#endif - /* 0xBFC42614: 8FA40018 lw $a0, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A614u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } - PGXP_LOAD(0x8FA40018u, _pgxa, cpu->gpr[4]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A614u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC42618: 00401821 addu $v1, $v0, $zero */ - { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[0]; - PGXP_ALU(0x00401821u, cpu->gpr[3], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A618u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x14u); -#endif - /* 0xBFC4261C: 10820005 beq $a0, $v0, 0xBFC42634 */ - uint32_t psx_brA_BFC4261C = cpu->gpr[4]; uint32_t psx_brB_BFC4261C = cpu->gpr[2]; - psx_taken_BFC4261C = (psx_brA_BFC4261C == psx_brB_BFC4261C); - psx_delay_BFC4261C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A620u); -#endif - /* 0xBFC42620: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A620u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A620u); -#endif - if (psx_delay_BFC4261C) { - psx_delay_BFC4261C = 0; - if (psx_taken_BFC4261C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A634u); - goto label_BFC42634; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A624u); - } -label_BFC42624: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42624u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x15u); -#endif - /* 0xBFC42624: 00801021 addu $v0, $a0, $zero */ - { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[0]; - PGXP_ALU(0x00801021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A624u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42628: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A628u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6u); -#endif - /* 0xBFC4262C: AC22FF40 sw $v0, -192($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A62Cu); return; } g_debug_last_store_pc = 0x8005A62Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } - PGXP_STORE(0xAC22FF40u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A62Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A630u); -#endif - /* 0xBFC42630: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A630u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A630u); -#endif -label_BFC42634: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42634u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42634: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A634u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42638: 03E00008 jr $ra */ - psx_delay_BFC42638 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC4263C: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A63Cu); -#endif - if (psx_delay_BFC42638) { - psx_delay_BFC42638 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42640(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42640u); - int psx_delay_BFC42654 = 0; - int psx_delay_BFC42664 = 0; - int psx_taken_BFC42664 = 0; - int psx_delay_BFC426B0 = 0; - int psx_taken_BFC426B0 = 0; - int psx_delay_BFC426D4 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC4265Cu: goto label_BFC4265C; - case 0xBFC4266Cu: goto label_BFC4266C; - case 0xBFC426A0u: goto label_BFC426A0; - case 0xBFC426B8u: goto label_BFC426B8; - case 0xBFC426CCu: goto label_BFC426CC; - default: break; - } - } -label_BFC42640: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42640u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42640: 27BDFFD8 addiu $sp, $sp, -40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-40)); - PGXP_ALU(0x27BDFFD8u, cpu->gpr[29], _pgx1, 0xFFFFFFD8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A640u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC42644: 3C058006 lui $a1, 0x8006 */ - cpu->gpr[5] = 0x80060000u; - PGXP_ALU(0x3C058006u, cpu->gpr[5], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A644u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42648: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A648u); return; } g_debug_last_store_pc = 0x8005A648u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A648u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20u); -#endif - /* 0xBFC4264C: 24A5A70C addiu $a1, $a1, -22772 */ - { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-22772)); - PGXP_ALU(0x24A5A70Cu, cpu->gpr[5], _pgx1, 0xFFFFA70Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A64Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000020u); -#endif - /* 0xBFC42650: AFA5001C sw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A650u); return; } g_debug_last_store_pc = 0x8005A650u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A650u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC42654: 0C016824 jal 0xB005A090 */ - cpu->gpr[31] = 0x8005A65Cu; /* jal link before delay slot */ - psx_delay_BFC42654 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42658: 24040003 addiu $a0, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24040003u, cpu->gpr[4], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A658u); -#endif - if (psx_delay_BFC42654) { - psx_delay_BFC42654 = 0; - cpu->gpr[31] = 0x8005A65Cu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A090u); - cpu->pc = 0x8005A090u; return; - } -label_BFC4265C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4265Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4265Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A65Cu); -#endif - /* 0xBFC4265C: 8FA5001C lw $a1, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A65Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } - PGXP_LOAD(0x8FA5001Cu, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A65Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42660: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A660u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC42664: 10450019 beq $v0, $a1, 0xBFC426CC */ - uint32_t psx_brA_BFC42664 = cpu->gpr[2]; uint32_t psx_brB_BFC42664 = cpu->gpr[5]; - psx_taken_BFC42664 = (psx_brA_BFC42664 == psx_brB_BFC42664); - psx_delay_BFC42664 = 1; - /* 0xBFC42668: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A668u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A668u); -#endif - if (psx_delay_BFC42664) { - psx_delay_BFC42664 = 0; - if (psx_taken_BFC42664) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A6CCu); - goto label_BFC426CC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A66Cu); - } -label_BFC4266C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4266Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4266Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC4266C: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A66Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A670u); -#endif - /* 0xBFC42670: 8DCE9DA0 lw $t6, -25184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A670u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DA0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A670u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42674: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A674u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC42678: ADC00000 sw $zero, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A678u); return; } g_debug_last_store_pc = 0x8005A678u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xADC00000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A678u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC4267C: AC20FF54 sw $zero, -172($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A67Cu); return; } g_debug_last_store_pc = 0x8005A67Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF54u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A67Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42680: AC20FF50 sw $zero, -176($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A680u); return; } g_debug_last_store_pc = 0x8005A680u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF50u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A680u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x9u); -#endif - /* 0xBFC42684: 24030003 addiu $v1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24030003u, cpu->gpr[3], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A684u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC42688: 3C03800E lui $v1, 0x800E */ - cpu->gpr[3] = 0x800E0000u; - PGXP_ALU(0x3C03800Eu, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A688u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC4268C: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A68Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42690: 3C02800E lui $v0, 0x800E */ - cpu->gpr[2] = 0x800E0000u; - PGXP_ALU(0x3C02800Eu, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A690u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC42694: 2442FF5C addiu $v0, $v0, -164 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-164)); - PGXP_ALU(0x2442FF5Cu, cpu->gpr[2], _pgx1, 0xFFFFFF5Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A694u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3u); -#endif - /* 0xBFC42698: AC20FF58 sw $zero, -168($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A698u); return; } g_debug_last_store_pc = 0x8005A698u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC20FF58u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A698u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC4269C: 2463FF6C addiu $v1, $v1, -148 */ - { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-148)); - PGXP_ALU(0x2463FF6Cu, cpu->gpr[3], _pgx1, 0xFFFFFF6Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A69Cu); -#endif -label_BFC426A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC426A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC426A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC426A0: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6A0u); return; } g_debug_last_store_pc = 0x8005A6A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC426A4: 24420010 addiu $v0, $v0, 16 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (16)); - PGXP_ALU(0x24420010u, cpu->gpr[2], _pgx1, 0x00000010u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC426A8: AC40FFF4 sw $zero, -12($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -12; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6A8u); return; } g_debug_last_store_pc = 0x8005A6A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF4u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC426AC: AC40FFF8 sw $zero, -8($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6ACu); return; } g_debug_last_store_pc = 0x8005A6ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFF8u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xCu); -#endif - /* 0xBFC426B0: 1443FFFB bne $v0, $v1, 0xBFC426A0 */ - uint32_t psx_brA_BFC426B0 = cpu->gpr[2]; uint32_t psx_brB_BFC426B0 = cpu->gpr[3]; - psx_taken_BFC426B0 = (psx_brA_BFC426B0 != psx_brB_BFC426B0); - psx_delay_BFC426B0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC426B4: AC40FFFC sw $zero, -4($v0) */ - { uint32_t _pgxa = cpu->gpr[2] + -4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6B4u); return; } g_debug_last_store_pc = 0x8005A6B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC40FFFCu, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6B4u); -#endif - if (psx_delay_BFC426B0) { - psx_delay_BFC426B0 = 0; - if (psx_taken_BFC426B0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A6A0u); - goto label_BFC426A0; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A6B8u); - } -label_BFC426B8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC426B8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC426B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC426B8: 3C0F8006 lui $t7, 0x8006 */ - cpu->gpr[15] = 0x80060000u; - PGXP_ALU(0x3C0F8006u, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A6B8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC426BC: 25EFA6DC addiu $t7, $t7, -22820 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-22820)); - PGXP_ALU(0x25EFA6DCu, cpu->gpr[15], _pgx1, 0xFFFFA6DCu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC426C0: 3C01800E lui $at, 0x800E */ - cpu->gpr[1] = 0x800E0000u; - PGXP_ALU(0x3C01800Eu, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A6C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8002u); -#endif - /* 0xBFC426C4: AC2FFF6C sw $t7, -148($at) */ - { uint32_t _pgxa = cpu->gpr[1] + -148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (-148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6C4u); return; } g_debug_last_store_pc = 0x8005A6C4u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xAC2FFF6Cu, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6C4u); -#endif - /* 0xBFC426C8: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6C8u); -#endif -label_BFC426CC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC426CCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC426CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC426CC: 3C028006 lui $v0, 0x8006 */ - cpu->gpr[2] = 0x80060000u; - PGXP_ALU(0x3C028006u, cpu->gpr[2], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A6CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4u); -#endif - /* 0xBFC426D0: 2442A844 addiu $v0, $v0, -22460 */ - { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-22460)); - PGXP_ALU(0x2442A844u, cpu->gpr[2], _pgx1, 0xFFFFA844u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC426D4: 03E00008 jr $ra */ - psx_delay_BFC426D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC426D8: 27BD0028 addiu $sp, $sp, 40 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (40)); - PGXP_ALU(0x27BD0028u, cpu->gpr[29], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6D8u); -#endif - if (psx_delay_BFC426D4) { - psx_delay_BFC426D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC426DC(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC426DCu); - int psx_delay_BFC426F4 = 0; - int psx_delay_BFC42704 = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC426FCu: goto label_BFC426FC; - default: break; - } - } -label_BFC426DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC426DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC426DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4000u); -#endif - /* 0xBFC426DC: 3C0E8008 lui $t6, 0x8008 */ - cpu->gpr[14] = 0x80080000u; - PGXP_ALU(0x3C0E8008u, cpu->gpr[14], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A6DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6E0u); -#endif - /* 0xBFC426E0: 8DCE9DA0 lw $t6, -25184($t6) */ - { uint32_t _pgxa = cpu->gpr[14] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6E0u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4000u); } - PGXP_LOAD(0x8DCE9DA0u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC426E4: 27BDFFE8 addiu $sp, $sp, -24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); - PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6E4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC426E8: AFBF0014 sw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6E8u); return; } g_debug_last_store_pc = 0x8005A6E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6E8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC426EC: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A6ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6F0u); -#endif - /* 0xBFC426F0: 8DC50000 lw $a1, 0($t6) */ - { uint32_t _pgxa = cpu->gpr[14]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6F0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4000u); } - PGXP_LOAD(0x8DC50000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC426F4: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005A6FCu; /* jal link before delay slot */ - psx_delay_BFC426F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC426F8: 24849DA4 addiu $a0, $a0, -25180 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25180)); - PGXP_ALU(0x24849DA4u, cpu->gpr[4], _pgx1, 0xFFFF9DA4u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6F8u); -#endif - if (psx_delay_BFC426F4) { - psx_delay_BFC426F4 = 0; - cpu->gpr[31] = 0x8005A6FCu; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC426FC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC426FCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC426FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A6FCu); -#endif - /* 0xBFC426FC: 8FBF0014 lw $ra, 20($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A6FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A6FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42700: 27BD0018 addiu $sp, $sp, 24 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); - PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A700u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42704: 03E00008 jr $ra */ - psx_delay_BFC42704 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42708: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A708u); -#endif - if (psx_delay_BFC42704) { - psx_delay_BFC42704 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC4270C(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC4270Cu); - int psx_delay_BFC4272C = 0; - int psx_taken_BFC4272C = 0; - int psx_delay_BFC42778 = 0; - int psx_taken_BFC42778 = 0; - int psx_delay_BFC427A0 = 0; - int psx_taken_BFC427A0 = 0; - int psx_delay_BFC427A8 = 0; - int psx_delay_BFC427C0 = 0; - int psx_taken_BFC427C0 = 0; - int psx_delay_BFC427D4 = 0; - int psx_taken_BFC427D4 = 0; - int psx_delay_BFC42808 = 0; - int psx_taken_BFC42808 = 0; - int psx_delay_BFC4281C = 0; - int psx_taken_BFC4281C = 0; - int psx_delay_BFC4282C = 0; - int psx_delay_BFC4283C = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42734u: goto label_BFC42734; - case 0xBFC42768u: goto label_BFC42768; - case 0xBFC4276Cu: goto label_BFC4276C; - case 0xBFC42780u: goto label_BFC42780; - case 0xBFC427A8u: goto label_BFC427A8; - case 0xBFC427B0u: goto label_BFC427B0; - case 0xBFC427BCu: goto label_BFC427BC; - case 0xBFC427C8u: goto label_BFC427C8; - case 0xBFC427DCu: goto label_BFC427DC; - case 0xBFC427F8u: goto label_BFC427F8; - case 0xBFC42810u: goto label_BFC42810; - case 0xBFC42824u: goto label_BFC42824; - case 0xBFC42834u: goto label_BFC42834; - case 0xBFC42838u: goto label_BFC42838; - default: break; - } - } -label_BFC4270C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4270Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4270Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC4270C: 27BDFFB8 addiu $sp, $sp, -72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-72)); - PGXP_ALU(0x27BDFFB8u, cpu->gpr[29], _pgx1, 0xFFFFFFB8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A70Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A710u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC42710: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A710u); -#endif - /* 0xBFC42714: 8C639DA0 lw $v1, -25184($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A714u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639DA0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A714u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xA0000000u); -#endif - /* 0xBFC42718: AFBF001C sw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A718u); return; } g_debug_last_store_pc = 0x8005A718u; cpu->write_word(psx_addr, cpu->gpr[31]); } - PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A718u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20400000u); -#endif - /* 0xBFC4271C: AFB60018 sw $s6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A71Cu); return; } g_debug_last_store_pc = 0x8005A71Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } - PGXP_STORE(0xAFB60018u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A71Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A720u); -#endif - /* 0xBFC42720: 8C6E0000 lw $t6, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A720u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8u); } - PGXP_LOAD(0x8C6E0000u, _pgxa, cpu->gpr[14]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A720u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x400000u); -#endif - /* 0xBFC42724: 3C167F00 lui $s6, 0x7F00 */ - cpu->gpr[22] = 0x7F000000u; - PGXP_ALU(0x3C167F00u, cpu->gpr[22], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A724u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40C000u); -#endif - /* 0xBFC42728: 01D67824 and $t7, $t6, $s6 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[15] = cpu->gpr[14] & cpu->gpr[22]; - PGXP_ALU(0x01D67824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A728u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8001u); -#endif - /* 0xBFC4272C: 11E00032 beq $t7, $zero, 0xBFC427F8 */ - uint32_t psx_brA_BFC4272C = cpu->gpr[15]; uint32_t psx_brB_BFC4272C = cpu->gpr[0]; - psx_taken_BFC4272C = (psx_brA_BFC4272C == psx_brB_BFC4272C); - psx_delay_BFC4272C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A730u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42730: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A730u); -#endif - if (psx_delay_BFC4272C) { - psx_delay_BFC4272C = 0; - if (psx_taken_BFC4272C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7F8u); - goto label_BFC427F8; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A734u); - } -label_BFC42734: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42734u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20040000u); -#endif - /* 0xBFC42734: AFB2002C sw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A734u); return; } g_debug_last_store_pc = 0x8005A734u; cpu->write_word(psx_addr, cpu->gpr[18]); } - PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A734u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20080000u); -#endif - /* 0xBFC42738: AFB30028 sw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A738u); return; } g_debug_last_store_pc = 0x8005A738u; cpu->write_word(psx_addr, cpu->gpr[19]); } - PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A738u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20100000u); -#endif - /* 0xBFC4273C: AFB40024 sw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A73Cu); return; } g_debug_last_store_pc = 0x8005A73Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } - PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A73Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20200000u); -#endif - /* 0xBFC42740: AFB50020 sw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A740u); return; } g_debug_last_store_pc = 0x8005A740u; cpu->write_word(psx_addr, cpu->gpr[21]); } - PGXP_STORE(0xAFB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A740u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC42744: 3C13800E lui $s3, 0x800E */ - cpu->gpr[19] = 0x800E0000u; - PGXP_ALU(0x3C13800Eu, cpu->gpr[19], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A744u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC42748: 3C1200FF lui $s2, 0xFF */ - cpu->gpr[18] = 0x00FF0000u; - PGXP_ALU(0x3C1200FFu, cpu->gpr[18], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A748u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20010000u); -#endif - /* 0xBFC4274C: AFB00034 sw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A74Cu); return; } g_debug_last_store_pc = 0x8005A74Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } - PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A74Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40000u); -#endif - /* 0xBFC42750: 3652FFFF ori $s2, $s2, 0xFFFF */ - { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] | 0xFFFFu; - PGXP_ALU(0x3652FFFFu, cpu->gpr[18], _pgx1, 0xFFFFu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A750u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000u); -#endif - /* 0xBFC42754: 2673FF50 addiu $s3, $s3, -176 */ - { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (-176)); - PGXP_ALU(0x2673FF50u, cpu->gpr[19], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A754u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x200000u); -#endif - /* 0xBFC42758: 3C150100 lui $s5, 0x100 */ - cpu->gpr[21] = 0x01000000u; - PGXP_ALU(0x3C150100u, cpu->gpr[21], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A758u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100001u); -#endif - /* 0xBFC4275C: 24140007 addiu $s4, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24140007u, cpu->gpr[20], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A75Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20020000u); -#endif - /* 0xBFC42760: AFB10030 sw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A760u); return; } g_debug_last_store_pc = 0x8005A760u; cpu->write_word(psx_addr, cpu->gpr[17]); } - PGXP_STORE(0xAFB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A760u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC42764: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A764u); -#endif -label_BFC42768: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42768u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A768u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x220001u); -#endif - /* 0xBFC42768: 02A08821 addu $s1, $s5, $zero */ - { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[21] + cpu->gpr[0]; - PGXP_ALU(0x02A08821u, cpu->gpr[17], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A768u); -#endif -label_BFC4276C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4276Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4276Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A76Cu); -#endif - /* 0xBFC4276C: 8C780000 lw $t8, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A76Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8u); } - PGXP_LOAD(0x8C780000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A76Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42770: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A770u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3020000u); -#endif - /* 0xBFC42774: 0311C824 and $t9, $t8, $s1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[25] = cpu->gpr[24] & cpu->gpr[17]; - PGXP_ALU(0x0311C824u, cpu->gpr[25], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A774u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000001u); -#endif - /* 0xBFC42778: 13200010 beq $t9, $zero, 0xBFC427BC */ - uint32_t psx_brA_BFC42778 = cpu->gpr[25]; uint32_t psx_brB_BFC42778 = cpu->gpr[0]; - psx_taken_BFC42778 = (psx_brA_BFC42778 == psx_brB_BFC42778); - psx_delay_BFC42778 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4277C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A77Cu); -#endif - if (psx_delay_BFC42778) { - psx_delay_BFC42778 = 0; - if (psx_taken_BFC42778) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7BCu); - goto label_BFC427BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A780u); - } -label_BFC42780: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42780u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A780u); -#endif - /* 0xBFC42780: 8C680000 lw $t0, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A780u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } - PGXP_LOAD(0x8C680000u, _pgxa, cpu->gpr[8]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A780u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x60200u); -#endif - /* 0xBFC42784: 02324825 or $t1, $s1, $s2 */ - { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[9] = cpu->gpr[17] | cpu->gpr[18]; - PGXP_ALU(0x02324825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A784u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10800u); -#endif - /* 0xBFC42788: 00105880 sll $t3, $s0, 2 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = cpu->gpr[16] << 2u; - PGXP_ALU(0x00105880u, cpu->gpr[11], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A788u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x700u); -#endif - /* 0xBFC4278C: 01095024 and $t2, $t0, $t1 */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[8] & cpu->gpr[9]; - PGXP_ALU(0x01095024u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A78Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x408u); -#endif - /* 0xBFC42790: AC6A0000 sw $t2, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A790u); return; } g_debug_last_store_pc = 0x8005A790u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xAC6A0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A790u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x81800u); -#endif - /* 0xBFC42794: 026B6021 addu $t4, $s3, $t3 */ - { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[12] = cpu->gpr[19] + cpu->gpr[11]; - PGXP_ALU(0x026B6021u, cpu->gpr[12], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A794u); -#endif - /* 0xBFC42798: 8D820000 lw $v0, 0($t4) */ - { uint32_t _pgxa = cpu->gpr[12]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[12] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A798u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x1000u); } - PGXP_LOAD(0x8D820000u, _pgxa, cpu->gpr[2]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A798u); -#endif - /* 0xBFC4279C: 8C600000 lw $zero, 0($v1) */ - { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A79Cu); return; } (void)psx_cyc_load_word(cpu, psx_addr, 0, 0x8u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A79Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC427A0: 10400006 beq $v0, $zero, 0xBFC427BC */ - uint32_t psx_brA_BFC427A0 = cpu->gpr[2]; uint32_t psx_brB_BFC427A0 = cpu->gpr[0]; - psx_taken_BFC427A0 = (psx_brA_BFC427A0 == psx_brB_BFC427A0); - psx_delay_BFC427A0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC427A4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A7A4u); -#endif - if (psx_delay_BFC427A0) { - psx_delay_BFC427A0 = 0; - if (psx_taken_BFC427A0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7BCu); - goto label_BFC427BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7A8u); - } -label_BFC427A8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427A8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000004u); -#endif - /* 0xBFC427A8: 0040F809 jalr $ra, $v0 */ - cpu->gpr[31] = 0x8005A7B0u; /* jalr link before delay slot */ - psx_delay_BFC427A8 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC427AC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A7ACu); -#endif - if (psx_delay_BFC427A8) { - psx_delay_BFC427A8 = 0; - { uint32_t _t = cpu->gpr[2]; - cpu->gpr[31] = 0x8005A7B0u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, _t); - cpu->pc = _t; return; } - } -label_BFC427B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8u); -#endif - /* 0xBFC427B0: 3C038008 lui $v1, 0x8008 */ - cpu->gpr[3] = 0x80080000u; - PGXP_ALU(0x3C038008u, cpu->gpr[3], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A7B0u); -#endif - /* 0xBFC427B4: 8C639DA0 lw $v1, -25184($v1) */ - { uint32_t _pgxa = cpu->gpr[3] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7B4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } - PGXP_LOAD(0x8C639DA0u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC427B8: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A7B8u); -#endif -label_BFC427BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10000u); -#endif - /* 0xBFC427BC: 26100001 addiu $s0, $s0, 1 */ - { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (1)); - PGXP_ALU(0x26100001u, cpu->gpr[16], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x110000u); -#endif - /* 0xBFC427C0: 1614FFEA bne $s0, $s4, 0xBFC4276C */ - uint32_t psx_brA_BFC427C0 = cpu->gpr[16]; uint32_t psx_brB_BFC427C0 = cpu->gpr[20]; - psx_taken_BFC427C0 = (psx_brA_BFC427C0 != psx_brB_BFC427C0); - psx_delay_BFC427C0 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000u); -#endif - /* 0xBFC427C4: 00118840 sll $s1, $s1, 1 */ - { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] << 1u; - PGXP_ALU(0x00118840u, cpu->gpr[17], _pgx1, 1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7C4u); -#endif - if (psx_delay_BFC427C0) { - psx_delay_BFC427C0 = 0; - if (psx_taken_BFC427C0) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A76Cu); - goto label_BFC4276C; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7C8u); - } -label_BFC427C8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427C8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7C8u); -#endif - /* 0xBFC427C8: 8C6D0000 lw $t5, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7C8u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8u); } - PGXP_LOAD(0x8C6D0000u, _pgxa, cpu->gpr[13]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7C8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC427CC: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A7CCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x406000u); -#endif - /* 0xBFC427D0: 01B67024 and $t6, $t5, $s6 */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[14] = cpu->gpr[13] & cpu->gpr[22]; - PGXP_ALU(0x01B67024u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4001u); -#endif - /* 0xBFC427D4: 15C0FFE4 bne $t6, $zero, 0xBFC42768 */ - uint32_t psx_brA_BFC427D4 = cpu->gpr[14]; uint32_t psx_brB_BFC427D4 = cpu->gpr[0]; - psx_taken_BFC427D4 = (psx_brA_BFC427D4 != psx_brB_BFC427D4); - psx_delay_BFC427D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10001u); -#endif - /* 0xBFC427D8: 00008021 addu $s0, $zero, $zero */ - { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[0] + cpu->gpr[0]; - PGXP_ALU(0x00008021u, cpu->gpr[16], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7D8u); -#endif - if (psx_delay_BFC427D4) { - psx_delay_BFC427D4 = 0; - if (psx_taken_BFC427D4) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A768u); - goto label_BFC42768; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A7DCu); - } -label_BFC427DC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427DCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7DCu); -#endif - /* 0xBFC427DC: 8FB00034 lw $s0, 52($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } - PGXP_LOAD(0x8FB00034u, _pgxa, cpu->gpr[16]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7DCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7E0u); -#endif - /* 0xBFC427E0: 8FB10030 lw $s1, 48($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7E0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } - PGXP_LOAD(0x8FB10030u, _pgxa, cpu->gpr[17]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7E0u); -#endif - /* 0xBFC427E4: 8FB2002C lw $s2, 44($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7E4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } - PGXP_LOAD(0x8FB2002Cu, _pgxa, cpu->gpr[18]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7E4u); -#endif - /* 0xBFC427E8: 8FB30028 lw $s3, 40($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7E8u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } - PGXP_LOAD(0x8FB30028u, _pgxa, cpu->gpr[19]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7E8u); -#endif - /* 0xBFC427EC: 8FB40024 lw $s4, 36($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7ECu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } - PGXP_LOAD(0x8FB40024u, _pgxa, cpu->gpr[20]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7ECu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7F0u); -#endif - /* 0xBFC427F0: 8FB50020 lw $s5, 32($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7F0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } - PGXP_LOAD(0x8FB50020u, _pgxa, cpu->gpr[21]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC427F4: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A7F4u); -#endif -label_BFC427F8: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC427F8u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC427F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A7F8u); -#endif - /* 0xBFC427F8: 8C6F0000 lw $t7, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A7F8u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8u); } - PGXP_LOAD(0x8C6F0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A7F8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC427FC: 3C01FF00 lui $at, 0xFF00 */ - cpu->gpr[1] = 0xFF000000u; - PGXP_ALU(0x3C01FF00u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A7FCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1008002u); -#endif - /* 0xBFC42800: 01E1C024 and $t8, $t7, $at */ - { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[24] = cpu->gpr[15] & cpu->gpr[1]; - PGXP_ALU(0x01E1C024u, cpu->gpr[24], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A800u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42804: 3C018000 lui $at, 0x8000 */ - cpu->gpr[1] = 0x80000000u; - PGXP_ALU(0x3C018000u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A804u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000002u); -#endif - /* 0xBFC42808: 13010006 beq $t8, $at, 0xBFC42824 */ - uint32_t psx_brA_BFC42808 = cpu->gpr[24]; uint32_t psx_brB_BFC42808 = cpu->gpr[1]; - psx_taken_BFC42808 = (psx_brA_BFC42808 == psx_brB_BFC42808); - psx_delay_BFC42808 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC4280C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A80Cu); -#endif - if (psx_delay_BFC42808) { - psx_delay_BFC42808 = 0; - if (psx_taken_BFC42808) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A824u); - goto label_BFC42824; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A810u); - } -label_BFC42810: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42810u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A810u); -#endif - /* 0xBFC42810: 8C790000 lw $t9, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A810u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } - PGXP_LOAD(0x8C790000u, _pgxa, cpu->gpr[25]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A810u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42814: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A814u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000100u); -#endif - /* 0xBFC42818: 33288000 andi $t0, $t9, 0x8000 */ - { uint32_t _pgx1 = cpu->gpr[25]; cpu->gpr[8] = cpu->gpr[25] & 0x8000u; - PGXP_ALU(0x33288000u, cpu->gpr[8], _pgx1, 0x8000u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A818u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC4281C: 11000006 beq $t0, $zero, 0xBFC42838 */ - uint32_t psx_brA_BFC4281C = cpu->gpr[8]; uint32_t psx_brB_BFC4281C = cpu->gpr[0]; - psx_taken_BFC4281C = (psx_brA_BFC4281C == psx_brB_BFC4281C); - psx_delay_BFC4281C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A820u); -#endif - /* 0xBFC42820: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A820u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A820u); -#endif - if (psx_delay_BFC4281C) { - psx_delay_BFC4281C = 0; - if (psx_taken_BFC4281C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A838u); - goto label_BFC42838; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A824u); - } -label_BFC42824: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42824u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A824u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42824: 3C048008 lui $a0, 0x8008 */ - cpu->gpr[4] = 0x80080000u; - PGXP_ALU(0x3C048008u, cpu->gpr[4], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A824u); -#endif - /* 0xBFC42828: 8C650000 lw $a1, 0($v1) */ - { uint32_t _pgxa = cpu->gpr[3]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A828u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } - PGXP_LOAD(0x8C650000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A828u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000000u); -#endif - /* 0xBFC4282C: 0C016A44 jal 0xB005A910 */ - cpu->gpr[31] = 0x8005A834u; /* jal link before delay slot */ - psx_delay_BFC4282C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A830u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x10u); -#endif - /* 0xBFC42830: 24849DC0 addiu $a0, $a0, -25152 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25152)); - PGXP_ALU(0x24849DC0u, cpu->gpr[4], _pgx1, 0xFFFF9DC0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A830u); -#endif - if (psx_delay_BFC4282C) { - psx_delay_BFC4282C = 0; - cpu->gpr[31] = 0x8005A834u; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A910u); - cpu->pc = 0x8005A910u; return; - } -label_BFC42834: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42834u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42834u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A834u); -#endif - /* 0xBFC42834: 8FBF001C lw $ra, 28($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A834u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } - PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A834u); -#endif -label_BFC42838: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42838u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A838u); -#endif - /* 0xBFC42838: 8FB60018 lw $s6, 24($sp) */ - { uint32_t _pgxa = cpu->gpr[29] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A838u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } - PGXP_LOAD(0x8FB60018u, _pgxa, cpu->gpr[22]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A838u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC4283C: 03E00008 jr $ra */ - psx_delay_BFC4283C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A840u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x20000000u); -#endif - /* 0xBFC42840: 27BD0048 addiu $sp, $sp, 72 */ - { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (72)); - PGXP_ALU(0x27BD0048u, cpu->gpr[29], _pgx1, 0x00000048u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A840u); -#endif - if (psx_delay_BFC4283C) { - psx_delay_BFC4283C = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42844(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42844u); - int psx_delay_BFC4285C = 0; - int psx_taken_BFC4285C = 0; - int psx_delay_BFC42864 = 0; - int psx_taken_BFC42864 = 0; - int psx_delay_BFC42890 = 0; - int psx_taken_BFC42890 = 0; - int psx_delay_BFC428BC = 0; - if (cpu->pc != 0) { - uint32_t _cont = cpu->pc; - cpu->pc = 0; - switch (_cont) { - case 0xBFC42864u: goto label_BFC42864; - case 0xBFC4286Cu: goto label_BFC4286C; - case 0xBFC42898u: goto label_BFC42898; - case 0xBFC428BCu: goto label_BFC428BC; - default: break; - } - } -label_BFC42844: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42844u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC42844: 3C0F800E lui $t7, 0x800E */ - cpu->gpr[15] = 0x800E0000u; - PGXP_ALU(0x3C0F800Eu, cpu->gpr[15], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A844u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8000u); -#endif - /* 0xBFC42848: 25EFFF50 addiu $t7, $t7, -176 */ - { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (-176)); - PGXP_ALU(0x25EFFF50u, cpu->gpr[15], _pgx1, 0xFFFFFF50u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A848u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x4010u); -#endif - /* 0xBFC4284C: 00047080 sll $t6, $a0, 2 */ - { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[14] = cpu->gpr[4] << 2u; - PGXP_ALU(0x00047080u, cpu->gpr[14], _pgx1, 2u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A84Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A850u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC004u); -#endif - /* 0xBFC42850: 01CF1021 addu $v0, $t6, $t7 */ - { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[2] = cpu->gpr[14] + cpu->gpr[15]; - PGXP_ALU(0x01CF1021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A850u); -#endif - /* 0xBFC42854: 8C430000 lw $v1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A854u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } - PGXP_LOAD(0x8C430000u, _pgxa, cpu->gpr[3]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A854u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42858: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A858u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x28u); -#endif - /* 0xBFC4285C: 10A30017 beq $a1, $v1, 0xBFC428BC */ - uint32_t psx_brA_BFC4285C = cpu->gpr[5]; uint32_t psx_brB_BFC4285C = cpu->gpr[3]; - psx_taken_BFC4285C = (psx_brA_BFC4285C == psx_brB_BFC4285C); - psx_delay_BFC4285C = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A860u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42860: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005A860u); -#endif - if (psx_delay_BFC4285C) { - psx_delay_BFC4285C = 0; - if (psx_taken_BFC4285C) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8BCu); - goto label_BFC428BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A864u); - } -label_BFC42864: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42864u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A864u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x21u); -#endif - /* 0xBFC42864: 10A0000C beq $a1, $zero, 0xBFC42898 */ - uint32_t psx_brA_BFC42864 = cpu->gpr[5]; uint32_t psx_brB_BFC42864 = cpu->gpr[0]; - psx_taken_BFC42864 = (psx_brA_BFC42864 == psx_brB_BFC42864); - psx_delay_BFC42864 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x5u); -#endif - /* 0xBFC42868: AC400000 sw $zero, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A868u); return; } g_debug_last_store_pc = 0x8005A868u; cpu->write_word(psx_addr, cpu->gpr[0]); } - PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A868u); -#endif - if (psx_delay_BFC42864) { - psx_delay_BFC42864 = 0; - if (psx_taken_BFC42864) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A898u); - goto label_BFC42898; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A86Cu); - } -label_BFC4286C: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC4286Cu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC4286Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC4286C: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A86Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A870u); -#endif - /* 0xBFC42870: 8CC69DA0 lw $a2, -25184($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A870u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69DA0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A870u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x24u); -#endif - /* 0xBFC42874: AC450000 sw $a1, 0($v0) */ - { uint32_t _pgxa = cpu->gpr[2]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A874u); return; } g_debug_last_store_pc = 0x8005A874u; cpu->write_word(psx_addr, cpu->gpr[5]); } - PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A874u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000000u); -#endif - /* 0xBFC42878: 3C190101 lui $t9, 0x101 */ - cpu->gpr[25] = 0x01010000u; - PGXP_ALU(0x3C190101u, cpu->gpr[25], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A878u); -#endif - /* 0xBFC4287C: 8CD80000 lw $t8, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A87Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x40u); } - PGXP_LOAD(0x8CD80000u, _pgxa, cpu->gpr[24]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A87Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2000110u); -#endif - /* 0xBFC42880: 00994004 sllv $t0, $t9, $a0 */ - { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[8] = cpu->gpr[25] << (cpu->gpr[4] & 0x1Fu); - PGXP_ALU(0x00994004u, cpu->gpr[8], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A880u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC42884: 3C010080 lui $at, 0x80 */ - cpu->gpr[1] = 0x00800000u; - PGXP_ALU(0x3C010080u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A884u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x302u); -#endif - /* 0xBFC42888: 01014825 or $t1, $t0, $at */ - { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[9] = cpu->gpr[8] | cpu->gpr[1]; - PGXP_ALU(0x01014825u, cpu->gpr[9], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A888u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000600u); -#endif - /* 0xBFC4288C: 03095025 or $t2, $t8, $t1 */ - { uint32_t _pgx1 = cpu->gpr[24]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[10] = cpu->gpr[24] | cpu->gpr[9]; - PGXP_ALU(0x03095025u, cpu->gpr[10], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A88Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A890u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42890: 1000000A beq $zero, $zero, 0xBFC428BC */ - uint32_t psx_brA_BFC42890 = cpu->gpr[0]; uint32_t psx_brB_BFC42890 = cpu->gpr[0]; - psx_taken_BFC42890 = (psx_brA_BFC42890 == psx_brB_BFC42890); - psx_delay_BFC42890 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x440u); -#endif - /* 0xBFC42894: ACCA0000 sw $t2, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A894u); return; } g_debug_last_store_pc = 0x8005A894u; cpu->write_word(psx_addr, cpu->gpr[10]); } - PGXP_STORE(0xACCA0000u, _pgxa, cpu->gpr[10]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A894u); -#endif - if (psx_delay_BFC42890) { - psx_delay_BFC42890 = 0; - if (psx_taken_BFC42890) { -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A8BCu); - goto label_BFC428BC; - } -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, 0x8005A898u); - } -label_BFC42898: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42898u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A898u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x40u); -#endif - /* 0xBFC42898: 3C068008 lui $a2, 0x8008 */ - cpu->gpr[6] = 0x80080000u; - PGXP_ALU(0x3C068008u, cpu->gpr[6], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A898u); -#endif - /* 0xBFC4289C: 8CC69DA0 lw $a2, -25184($a2) */ - { uint32_t _pgxa = cpu->gpr[6] + -25184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (-25184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A89Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } - PGXP_LOAD(0x8CC69DA0u, _pgxa, cpu->gpr[6]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A89Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1000u); -#endif - /* 0xBFC428A0: 3C0C0001 lui $t4, 0x1 */ - cpu->gpr[12] = 0x00010000u; - PGXP_ALU(0x3C0C0001u, cpu->gpr[12], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A8A0u); -#endif - /* 0xBFC428A4: 8CCB0000 lw $t3, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A8A4u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x40u); } - PGXP_LOAD(0x8CCB0000u, _pgxa, cpu->gpr[11]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8A4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x3010u); -#endif - /* 0xBFC428A8: 008C6804 sllv $t5, $t4, $a0 */ - { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[13] = cpu->gpr[12] << (cpu->gpr[4] & 0x1Fu); - PGXP_ALU(0x008C6804u, cpu->gpr[13], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8A8u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x2u); -#endif - /* 0xBFC428AC: 3C01FF00 lui $at, 0xFF00 */ - cpu->gpr[1] = 0xFF000000u; - PGXP_ALU(0x3C01FF00u, cpu->gpr[1], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0x8005A8ACu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x6002u); -#endif - /* 0xBFC428B0: 01A17027 nor $t6, $t5, $at */ - { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[1]; cpu->gpr[14] = ~(cpu->gpr[13] | cpu->gpr[1]); - PGXP_ALU(0x01A17027u, cpu->gpr[14], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xC800u); -#endif - /* 0xBFC428B4: 016E7824 and $t7, $t3, $t6 */ - { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[15] = cpu->gpr[11] & cpu->gpr[14]; - PGXP_ALU(0x016E7824u, cpu->gpr[15], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8B4u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x8040u); -#endif - /* 0xBFC428B8: ACCF0000 sw $t7, 0($a2) */ - { uint32_t _pgxa = cpu->gpr[6]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8005A8B8u); return; } g_debug_last_store_pc = 0x8005A8B8u; cpu->write_word(psx_addr, cpu->gpr[15]); } - PGXP_STORE(0xACCF0000u, _pgxa, cpu->gpr[15]); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8B8u); -#endif -label_BFC428BC: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC428BCu); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC428BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8BCu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC428BC: 03E00008 jr $ra */ - psx_delay_BFC428BC = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0xDu); -#endif - /* 0xBFC428C0: 00601021 addu $v0, $v1, $zero */ - { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[0]; - PGXP_ALU(0x00601021u, cpu->gpr[2], _pgx1, _pgx2); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8C0u); -#endif - if (psx_delay_BFC428BC) { - psx_delay_BFC428BC = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC428D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC428D0u); - int psx_delay_BFC428D4 = 0; -label_BFC428D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC428D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC428D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428D0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428D4: 01400008 jr $t2 */ - psx_delay_BFC428D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC428D8: 24090072 addiu $t1, $zero, 114 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (114)); - PGXP_ALU(0x24090072u, cpu->gpr[9], _pgx1, 0x00000072u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8D8u); -#endif - if (psx_delay_BFC428D4) { - psx_delay_BFC428D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC428E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC428E0u); - int psx_delay_BFC428E4 = 0; -label_BFC428E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC428E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC428E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428E0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428E4: 01400008 jr $t2 */ - psx_delay_BFC428E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC428E8: 24090039 addiu $t1, $zero, 57 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (57)); - PGXP_ALU(0x24090039u, cpu->gpr[9], _pgx1, 0x00000039u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8E8u); -#endif - if (psx_delay_BFC428E4) { - psx_delay_BFC428E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC428F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC428F0u); - int psx_delay_BFC428F4 = 0; -label_BFC428F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC428F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC428F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428F0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC428F4: 01400008 jr $t2 */ - psx_delay_BFC428F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC428F8: 2409002F addiu $t1, $zero, 47 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (47)); - PGXP_ALU(0x2409002Fu, cpu->gpr[9], _pgx1, 0x0000002Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A8F8u); -#endif - if (psx_delay_BFC428F4) { - psx_delay_BFC428F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42900(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42900u); - int psx_delay_BFC42904 = 0; -label_BFC42900: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42900u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42900: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A900u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42904: 01400008 jr $t2 */ - psx_delay_BFC42904 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42908: 24090017 addiu $t1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24090017u, cpu->gpr[9], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A908u); -#endif - if (psx_delay_BFC42904) { - psx_delay_BFC42904 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42910(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42910u); - int psx_delay_BFC42914 = 0; -label_BFC42910: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42910u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42910: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A910u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42914: 01400008 jr $t2 */ - psx_delay_BFC42914 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42918: 2409003F addiu $t1, $zero, 63 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); - PGXP_ALU(0x2409003Fu, cpu->gpr[9], _pgx1, 0x0000003Fu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A918u); -#endif - if (psx_delay_BFC42914) { - psx_delay_BFC42914 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42920(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42920u); - int psx_delay_BFC42924 = 0; -label_BFC42920: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42920u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42920: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A920u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42924: 01400008 jr $t2 */ - psx_delay_BFC42924 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42928: 2409001B addiu $t1, $zero, 27 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (27)); - PGXP_ALU(0x2409001Bu, cpu->gpr[9], _pgx1, 0x0000001Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A928u); -#endif - if (psx_delay_BFC42924) { - psx_delay_BFC42924 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42930(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42930u); - int psx_delay_BFC42934 = 0; -label_BFC42930: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42930u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42930: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A930u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42934: 01400008 jr $t2 */ - psx_delay_BFC42934 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42938: 24090033 addiu $t1, $zero, 51 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (51)); - PGXP_ALU(0x24090033u, cpu->gpr[9], _pgx1, 0x00000033u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A938u); -#endif - if (psx_delay_BFC42934) { - psx_delay_BFC42934 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42940(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42940u); - int psx_delay_BFC42944 = 0; -label_BFC42940: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42940u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42940: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A940u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42944: 01400008 jr $t2 */ - psx_delay_BFC42944 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42948: 24090034 addiu $t1, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24090034u, cpu->gpr[9], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A948u); -#endif - if (psx_delay_BFC42944) { - psx_delay_BFC42944 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42950(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42950u); - int psx_delay_BFC42954 = 0; -label_BFC42950: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42950u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42950: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A950u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42954: 01400008 jr $t2 */ - psx_delay_BFC42954 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42958: 2409002A addiu $t1, $zero, 42 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (42)); - PGXP_ALU(0x2409002Au, cpu->gpr[9], _pgx1, 0x0000002Au); } -#ifdef PSX_COSIM - cosim_instr(0x8005A958u); -#endif - if (psx_delay_BFC42954) { - psx_delay_BFC42954 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42960(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42960u); - int psx_delay_BFC42964 = 0; -label_BFC42960: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42960u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42960: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A960u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42964: 01400008 jr $t2 */ - psx_delay_BFC42964 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42968: 2409004A addiu $t1, $zero, 74 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (74)); - PGXP_ALU(0x2409004Au, cpu->gpr[9], _pgx1, 0x0000004Au); } -#ifdef PSX_COSIM - cosim_instr(0x8005A968u); -#endif - if (psx_delay_BFC42964) { - psx_delay_BFC42964 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42970(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42970u); - int psx_delay_BFC42974 = 0; -label_BFC42970: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42970u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42970: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A970u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42974: 01400008 jr $t2 */ - psx_delay_BFC42974 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42978: 2409004B addiu $t1, $zero, 75 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); - PGXP_ALU(0x2409004Bu, cpu->gpr[9], _pgx1, 0x0000004Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A978u); -#endif - if (psx_delay_BFC42974) { - psx_delay_BFC42974 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42980(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42980u); - int psx_delay_BFC42984 = 0; -label_BFC42980: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42980u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42980: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A980u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42984: 01400008 jr $t2 */ - psx_delay_BFC42984 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42988: 2409005B addiu $t1, $zero, 91 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (91)); - PGXP_ALU(0x2409005Bu, cpu->gpr[9], _pgx1, 0x0000005Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A988u); -#endif - if (psx_delay_BFC42984) { - psx_delay_BFC42984 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42990(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42990u); - int psx_delay_BFC42994 = 0; -label_BFC42990: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42990u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42990: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A990u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42994: 01400008 jr $t2 */ - psx_delay_BFC42994 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42998: 24090070 addiu $t1, $zero, 112 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); - PGXP_ALU(0x24090070u, cpu->gpr[9], _pgx1, 0x00000070u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A998u); -#endif - if (psx_delay_BFC42994) { - psx_delay_BFC42994 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429A0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429A0u); - int psx_delay_BFC429A4 = 0; -label_BFC429A0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429A0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429A0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9A0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429A4: 01400008 jr $t2 */ - psx_delay_BFC429A4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429A8: 240900AD addiu $t1, $zero, 173 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (173)); - PGXP_ALU(0x240900ADu, cpu->gpr[9], _pgx1, 0x000000ADu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9A8u); -#endif - if (psx_delay_BFC429A4) { - psx_delay_BFC429A4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429B0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429B0u); - int psx_delay_BFC429B4 = 0; -label_BFC429B0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429B0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429B0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9B0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429B4: 01400008 jr $t2 */ - psx_delay_BFC429B4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429B8: 2409000E addiu $t1, $zero, 14 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); - PGXP_ALU(0x2409000Eu, cpu->gpr[9], _pgx1, 0x0000000Eu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9B8u); -#endif - if (psx_delay_BFC429B4) { - psx_delay_BFC429B4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429C0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429C0u); - int psx_delay_BFC429C4 = 0; -label_BFC429C0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429C0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429C0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9C0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429C4: 01400008 jr $t2 */ - psx_delay_BFC429C4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429C8: 24090002 addiu $t1, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24090002u, cpu->gpr[9], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9C8u); -#endif - if (psx_delay_BFC429C4) { - psx_delay_BFC429C4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429D0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429D0u); - int psx_delay_BFC429D4 = 0; -label_BFC429D0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429D0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429D0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9D0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429D4: 01400008 jr $t2 */ - psx_delay_BFC429D4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429D8: 24090008 addiu $t1, $zero, 8 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); - PGXP_ALU(0x24090008u, cpu->gpr[9], _pgx1, 0x00000008u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9D8u); -#endif - if (psx_delay_BFC429D4) { - psx_delay_BFC429D4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429E0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429E0u); - int psx_delay_BFC429E4 = 0; -label_BFC429E0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429E0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429E0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9E0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429E4: 01400008 jr $t2 */ - psx_delay_BFC429E4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429E8: 2409000C addiu $t1, $zero, 12 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); - PGXP_ALU(0x2409000Cu, cpu->gpr[9], _pgx1, 0x0000000Cu); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9E8u); -#endif - if (psx_delay_BFC429E4) { - psx_delay_BFC429E4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC429F0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC429F0u); - int psx_delay_BFC429F4 = 0; -label_BFC429F0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC429F0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC429F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429F0: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9F0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC429F4: 01400008 jr $t2 */ - psx_delay_BFC429F4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC429F8: 24090003 addiu $t1, $zero, 3 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); - PGXP_ALU(0x24090003u, cpu->gpr[9], _pgx1, 0x00000003u); } -#ifdef PSX_COSIM - cosim_instr(0x8005A9F8u); -#endif - if (psx_delay_BFC429F4) { - psx_delay_BFC429F4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A00u); - int psx_delay_BFC42A04 = 0; -label_BFC42A00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A00: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A04: 01400008 jr $t2 */ - psx_delay_BFC42A04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A08: 2409000B addiu $t1, $zero, 11 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (11)); - PGXP_ALU(0x2409000Bu, cpu->gpr[9], _pgx1, 0x0000000Bu); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA08u); -#endif - if (psx_delay_BFC42A04) { - psx_delay_BFC42A04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A10u); - int psx_delay_BFC42A18 = 0; -label_BFC42A10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42A10: 24040002 addiu $a0, $zero, 2 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); - PGXP_ALU(0x24040002u, cpu->gpr[4], _pgx1, 0x00000002u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC42A14: 0000000C syscall */ - cpu->pc = 0x8005AA14u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0x8005AA14u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42A18: 03E00008 jr $ra */ - psx_delay_BFC42A18 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42A1C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005AA1Cu); -#endif - if (psx_delay_BFC42A18) { - psx_delay_BFC42A18 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42A20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A20u); - int psx_delay_BFC42A24 = 0; -label_BFC42A20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A20: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A24: 01400008 jr $t2 */ - psx_delay_BFC42A24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A28: 24090019 addiu $t1, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24090019u, cpu->gpr[9], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA28u); -#endif - if (psx_delay_BFC42A24) { - psx_delay_BFC42A24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A30u); - int psx_delay_BFC42A34 = 0; -label_BFC42A30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A30: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A34: 01400008 jr $t2 */ - psx_delay_BFC42A34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A38: 24090042 addiu $t1, $zero, 66 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); - PGXP_ALU(0x24090042u, cpu->gpr[9], _pgx1, 0x00000042u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA38u); -#endif - if (psx_delay_BFC42A34) { - psx_delay_BFC42A34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A40u); - int psx_delay_BFC42A44 = 0; -label_BFC42A40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A40: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A44: 01400008 jr $t2 */ - psx_delay_BFC42A44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A48: 24090043 addiu $t1, $zero, 67 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); - PGXP_ALU(0x24090043u, cpu->gpr[9], _pgx1, 0x00000043u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA48u); -#endif - if (psx_delay_BFC42A44) { - psx_delay_BFC42A44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A50u); - int psx_delay_BFC42A54 = 0; -label_BFC42A50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A50: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A54: 01400008 jr $t2 */ - psx_delay_BFC42A54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A58: 24090015 addiu $t1, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24090015u, cpu->gpr[9], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA58u); -#endif - if (psx_delay_BFC42A54) { - psx_delay_BFC42A54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A60u); - int psx_delay_BFC42A64 = 0; -label_BFC42A60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A60: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A64: 01400008 jr $t2 */ - psx_delay_BFC42A64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A68: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA68u); -#endif - if (psx_delay_BFC42A64) { - psx_delay_BFC42A64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A70u); - int psx_delay_BFC42A74 = 0; -label_BFC42A70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A70: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A74: 01400008 jr $t2 */ - psx_delay_BFC42A74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A78: 24090018 addiu $t1, $zero, 24 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (24)); - PGXP_ALU(0x24090018u, cpu->gpr[9], _pgx1, 0x00000018u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA78u); -#endif - if (psx_delay_BFC42A74) { - psx_delay_BFC42A74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A80u); - int psx_delay_BFC42A84 = 0; -label_BFC42A80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A80: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42A84: 01400008 jr $t2 */ - psx_delay_BFC42A84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42A88: 24090046 addiu $t1, $zero, 70 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (70)); - PGXP_ALU(0x24090046u, cpu->gpr[9], _pgx1, 0x00000046u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA88u); -#endif - if (psx_delay_BFC42A84) { - psx_delay_BFC42A84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42A90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42A90u); - int psx_delay_BFC42A98 = 0; -label_BFC42A90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42A90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42A90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x11u); -#endif - /* 0xBFC42A90: 24040001 addiu $a0, $zero, 1 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1)); - PGXP_ALU(0x24040001u, cpu->gpr[4], _pgx1, 0x00000001u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AA90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x0u); -#endif - /* 0xBFC42A94: 0000000C syscall */ - cpu->pc = 0x8005AA94u; if (psx_syscall(cpu, cpu->gpr[2])) return; -#ifdef PSX_COSIM - cosim_instr(0x8005AA94u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x80000001u); -#endif - /* 0xBFC42A98: 03E00008 jr $ra */ - psx_delay_BFC42A98 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC42A9C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0x8005AA9Cu); -#endif - if (psx_delay_BFC42A98) { - psx_delay_BFC42A98 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[31]); - cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ - } -} - -void SCPH1001_func_1FC42AA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AA0u); - int psx_delay_BFC42AA4 = 0; -label_BFC42AA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AA0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AA4: 01400008 jr $t2 */ - psx_delay_BFC42AA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AA8: 24090045 addiu $t1, $zero, 69 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (69)); - PGXP_ALU(0x24090045u, cpu->gpr[9], _pgx1, 0x00000045u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAA8u); -#endif - if (psx_delay_BFC42AA4) { - psx_delay_BFC42AA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42AB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AB0u); - int psx_delay_BFC42AB4 = 0; -label_BFC42AB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AB0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AB4: 01400008 jr $t2 */ - psx_delay_BFC42AB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AB8: 24090032 addiu $t1, $zero, 50 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); - PGXP_ALU(0x24090032u, cpu->gpr[9], _pgx1, 0x00000032u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAB8u); -#endif - if (psx_delay_BFC42AB4) { - psx_delay_BFC42AB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42AC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AC0u); - int psx_delay_BFC42AC4 = 0; -label_BFC42AC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AC0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AC4: 01400008 jr $t2 */ - psx_delay_BFC42AC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AC8: 24090034 addiu $t1, $zero, 52 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); - PGXP_ALU(0x24090034u, cpu->gpr[9], _pgx1, 0x00000034u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAC8u); -#endif - if (psx_delay_BFC42AC4) { - psx_delay_BFC42AC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42AD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AD0u); - int psx_delay_BFC42AD4 = 0; -label_BFC42AD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AD0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AD4: 01400008 jr $t2 */ - psx_delay_BFC42AD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AD8: 24090036 addiu $t1, $zero, 54 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (54)); - PGXP_ALU(0x24090036u, cpu->gpr[9], _pgx1, 0x00000036u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAD8u); -#endif - if (psx_delay_BFC42AD4) { - psx_delay_BFC42AD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42AE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AE0u); - int psx_delay_BFC42AE4 = 0; -label_BFC42AE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AE0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AE4: 01400008 jr $t2 */ - psx_delay_BFC42AE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AE8: 24090035 addiu $t1, $zero, 53 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (53)); - PGXP_ALU(0x24090035u, cpu->gpr[9], _pgx1, 0x00000035u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAE8u); -#endif - if (psx_delay_BFC42AE4) { - psx_delay_BFC42AE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42AF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42AF0u); - int psx_delay_BFC42AF4 = 0; -label_BFC42AF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42AF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42AF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AF0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42AF4: 01400008 jr $t2 */ - psx_delay_BFC42AF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42AF8: 24090044 addiu $t1, $zero, 68 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); - PGXP_ALU(0x24090044u, cpu->gpr[9], _pgx1, 0x00000044u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AAF8u); -#endif - if (psx_delay_BFC42AF4) { - psx_delay_BFC42AF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B00u); - int psx_delay_BFC42B04 = 0; -label_BFC42B00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B00: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B04: 01400008 jr $t2 */ - psx_delay_BFC42B04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B08: 24090050 addiu $t1, $zero, 80 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); - PGXP_ALU(0x24090050u, cpu->gpr[9], _pgx1, 0x00000050u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB08u); -#endif - if (psx_delay_BFC42B04) { - psx_delay_BFC42B04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B10(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B10u); - int psx_delay_BFC42B14 = 0; -label_BFC42B10: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B10u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B10: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB10u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B14: 01400008 jr $t2 */ - psx_delay_BFC42B14 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B18: 240900AB addiu $t1, $zero, 171 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (171)); - PGXP_ALU(0x240900ABu, cpu->gpr[9], _pgx1, 0x000000ABu); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB18u); -#endif - if (psx_delay_BFC42B14) { - psx_delay_BFC42B14 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B20(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B20u); - int psx_delay_BFC42B24 = 0; -label_BFC42B20: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B20u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B20: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB20u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B24: 01400008 jr $t2 */ - psx_delay_BFC42B24 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B28: 24090020 addiu $t1, $zero, 32 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); - PGXP_ALU(0x24090020u, cpu->gpr[9], _pgx1, 0x00000020u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB28u); -#endif - if (psx_delay_BFC42B24) { - psx_delay_BFC42B24 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B30(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B30u); - int psx_delay_BFC42B34 = 0; -label_BFC42B30: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B30u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B30: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB30u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B34: 01400008 jr $t2 */ - psx_delay_BFC42B34 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B38: 24090009 addiu $t1, $zero, 9 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); - PGXP_ALU(0x24090009u, cpu->gpr[9], _pgx1, 0x00000009u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB38u); -#endif - if (psx_delay_BFC42B34) { - psx_delay_BFC42B34 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B40(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B40u); - int psx_delay_BFC42B44 = 0; -label_BFC42B40: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B40u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B40: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB40u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B44: 01400008 jr $t2 */ - psx_delay_BFC42B44 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B48: 24090012 addiu $t1, $zero, 18 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); - PGXP_ALU(0x24090012u, cpu->gpr[9], _pgx1, 0x00000012u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB48u); -#endif - if (psx_delay_BFC42B44) { - psx_delay_BFC42B44 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B50(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B50u); - int psx_delay_BFC42B54 = 0; -label_BFC42B50: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B50u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B50: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB50u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B54: 01400008 jr $t2 */ - psx_delay_BFC42B54 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B58: 24090013 addiu $t1, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24090013u, cpu->gpr[9], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB58u); -#endif - if (psx_delay_BFC42B54) { - psx_delay_BFC42B54 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B60(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B60u); - int psx_delay_BFC42B64 = 0; -label_BFC42B60: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B60u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B60: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB60u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B64: 01400008 jr $t2 */ - psx_delay_BFC42B64 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B68: 240900A1 addiu $t1, $zero, 161 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); - PGXP_ALU(0x240900A1u, cpu->gpr[9], _pgx1, 0x000000A1u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB68u); -#endif - if (psx_delay_BFC42B64) { - psx_delay_BFC42B64 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B70(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B70u); - int psx_delay_BFC42B74 = 0; -label_BFC42B70: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B70u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B70: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB70u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B74: 01400008 jr $t2 */ - psx_delay_BFC42B74 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B78: 24090049 addiu $t1, $zero, 73 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (73)); - PGXP_ALU(0x24090049u, cpu->gpr[9], _pgx1, 0x00000049u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB78u); -#endif - if (psx_delay_BFC42B74) { - psx_delay_BFC42B74 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B80(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B80u); - int psx_delay_BFC42B84 = 0; -label_BFC42B80: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B80u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B80: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB80u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B84: 01400008 jr $t2 */ - psx_delay_BFC42B84 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B88: 24090028 addiu $t1, $zero, 40 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); - PGXP_ALU(0x24090028u, cpu->gpr[9], _pgx1, 0x00000028u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB88u); -#endif - if (psx_delay_BFC42B84) { - psx_delay_BFC42B84 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42B90(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42B90u); - int psx_delay_BFC42B94 = 0; -label_BFC42B90: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42B90u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42B90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B90: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB90u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42B94: 01400008 jr $t2 */ - psx_delay_BFC42B94 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42B98: 24090007 addiu $t1, $zero, 7 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); - PGXP_ALU(0x24090007u, cpu->gpr[9], _pgx1, 0x00000007u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AB98u); -#endif - if (psx_delay_BFC42B94) { - psx_delay_BFC42B94 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BA0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BA0u); - int psx_delay_BFC42BA4 = 0; -label_BFC42BA0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BA0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BA0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABA0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BA4: 01400008 jr $t2 */ - psx_delay_BFC42BA4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BA8: 24090017 addiu $t1, $zero, 23 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (23)); - PGXP_ALU(0x24090017u, cpu->gpr[9], _pgx1, 0x00000017u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABA8u); -#endif - if (psx_delay_BFC42BA4) { - psx_delay_BFC42BA4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BB0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BB0u); - int psx_delay_BFC42BB4 = 0; -label_BFC42BB0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BB0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BB0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABB0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BB4: 01400008 jr $t2 */ - psx_delay_BFC42BB4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BB8: 24090015 addiu $t1, $zero, 21 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (21)); - PGXP_ALU(0x24090015u, cpu->gpr[9], _pgx1, 0x00000015u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABB8u); -#endif - if (psx_delay_BFC42BB4) { - psx_delay_BFC42BB4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BC0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BC0u); - int psx_delay_BFC42BC4 = 0; -label_BFC42BC0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BC0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BC0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABC0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BC4: 01400008 jr $t2 */ - psx_delay_BFC42BC4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BC8: 24090016 addiu $t1, $zero, 22 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); - PGXP_ALU(0x24090016u, cpu->gpr[9], _pgx1, 0x00000016u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABC8u); -#endif - if (psx_delay_BFC42BC4) { - psx_delay_BFC42BC4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BD0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BD0u); - int psx_delay_BFC42BD4 = 0; -label_BFC42BD0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BD0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BD0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABD0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BD4: 01400008 jr $t2 */ - psx_delay_BFC42BD4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BD8: 24090014 addiu $t1, $zero, 20 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); - PGXP_ALU(0x24090014u, cpu->gpr[9], _pgx1, 0x00000014u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABD8u); -#endif - if (psx_delay_BFC42BD4) { - psx_delay_BFC42BD4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BE0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BE0u); - int psx_delay_BFC42BE4 = 0; -label_BFC42BE0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BE0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BE0: 240A00A0 addiu $t2, $zero, 160 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); - PGXP_ALU(0x240A00A0u, cpu->gpr[10], _pgx1, 0x000000A0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABE0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BE4: 01400008 jr $t2 */ - psx_delay_BFC42BE4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BE8: 24090013 addiu $t1, $zero, 19 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); - PGXP_ALU(0x24090013u, cpu->gpr[9], _pgx1, 0x00000013u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABE8u); -#endif - if (psx_delay_BFC42BE4) { - psx_delay_BFC42BE4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42BF0(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42BF0u); - int psx_delay_BFC42BF4 = 0; -label_BFC42BF0: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42BF0u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42BF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005ABF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BF0: 240A00B0 addiu $t2, $zero, 176 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); - PGXP_ALU(0x240A00B0u, cpu->gpr[10], _pgx1, 0x000000B0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABF0u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42BF4: 01400008 jr $t2 */ - psx_delay_BFC42BF4 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42BF8: 24090019 addiu $t1, $zero, 25 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (25)); - PGXP_ALU(0x24090019u, cpu->gpr[9], _pgx1, 0x00000019u); } -#ifdef PSX_COSIM - cosim_instr(0x8005ABF8u); -#endif - if (psx_delay_BFC42BF4) { - psx_delay_BFC42BF4 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_1FC42C00(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0x1FC42C00u); - int psx_delay_BFC42C04 = 0; -label_BFC42C00: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x1FC42C00u); -#endif -#ifdef PSX_COSIM - cosim_block(0x1FC42C00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0x8005AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42C00: 240A00C0 addiu $t2, $zero, 192 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); - PGXP_ALU(0x240A00C0u, cpu->gpr[10], _pgx1, 0x000000C0u); } -#ifdef PSX_COSIM - cosim_instr(0x8005AC00u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x401u); -#endif - /* 0xBFC42C04: 01400008 jr $t2 */ - psx_delay_BFC42C04 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x201u); -#endif - /* 0xBFC42C08: 2409000A addiu $t1, $zero, 10 */ - { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); - PGXP_ALU(0x2409000Au, cpu->gpr[9], _pgx1, 0x0000000Au); } -#ifdef PSX_COSIM - cosim_instr(0x8005AC08u); -#endif - if (psx_delay_BFC42C04) { - psx_delay_BFC42C04 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[10]); - cpu->pc = cpu->gpr[10]; return; - } -} - -void SCPH1001_func_A0000500(CPUState* cpu) { -#if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) - __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; - psx_cyc_bb_defer_begin(); -#endif - debug_server_log_call_entry(0xA0000500u); - int psx_delay_BFC10008 = 0; -label_BFC10000: -#ifndef PSX_NO_DEBUG_TOOLS - debug_server_cyc_observe(0x00000500u); -#endif -#ifdef PSX_COSIM - cosim_block(0x00000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xA0000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10000: 3C080000 lui $t0, 0x0 */ - cpu->gpr[8] = 0x00000000u; - PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); -#ifdef PSX_COSIM - cosim_instr(0xA0000500u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xA0000504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x100u); -#endif - /* 0xBFC10004: 25080598 addiu $t0, $t0, 1432 */ - { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1432)); - PGXP_ALU(0x25080598u, cpu->gpr[8], _pgx1, 0x00000598u); } -#ifdef PSX_COSIM - cosim_instr(0xA0000504u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xA0000508u); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x101u); -#endif - /* 0xBFC10008: 01000008 jr $t0 */ - psx_delay_BFC10008 = 1; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_icache_fetch(cpu, 0xA000050Cu); -#endif -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_step(cpu, 0x1u); -#endif - /* 0xBFC1000C: 00000000 nop */ - /* nop */ -#ifdef PSX_COSIM - cosim_instr(0xA000050Cu); -#endif - if (psx_delay_BFC10008) { - psx_delay_BFC10008 = 0; -#ifdef PSX_ENABLE_BLOCK_CYCLES - psx_cyc_bb_defer_flush(); -#endif - psx_check_interrupts_at(cpu, cpu->gpr[8]); - cpu->pc = cpu->gpr[8]; return; - } -} - -void SCPH1001_func_1FC02324(CPUState* cpu) { - psx_unknown_dispatch(cpu, 0xBFC02324u, 0x1FC02324u); -} - - -/* --- 11702 continuation wrappers for jal/jalr return routing --- */ - -void SCPH1001_func_00000540_cont_BFC10054(CPUState* cpu) { - cpu->pc = 0xBFC10054u; - SCPH1001_func_00000540(cpu); -} - -void SCPH1001_func_00000540_cont_BFC10068(CPUState* cpu) { - cpu->pc = 0xBFC10068u; - SCPH1001_func_00000540(cpu); -} - -void SCPH1001_func_00000540_cont_BFC1007C(CPUState* cpu) { - cpu->pc = 0xBFC1007Cu; - SCPH1001_func_00000540(cpu); -} - -void SCPH1001_func_00000540_cont_BFC10090(CPUState* cpu) { - cpu->pc = 0xBFC10090u; - SCPH1001_func_00000540(cpu); -} - -void SCPH1001_func_00000598_cont_BFC100A8(CPUState* cpu) { - cpu->pc = 0xBFC100A8u; - SCPH1001_func_00000598(cpu); -} - -void SCPH1001_func_00000598_cont_BFC100BC(CPUState* cpu) { - cpu->pc = 0xBFC100BCu; - SCPH1001_func_00000598(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC107B8(CPUState* cpu) { - cpu->pc = 0xBFC107B8u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC107C0(CPUState* cpu) { - cpu->pc = 0xBFC107C0u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC107CC(CPUState* cpu) { - cpu->pc = 0xBFC107CCu; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC107E8(CPUState* cpu) { - cpu->pc = 0xBFC107E8u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC107EC(CPUState* cpu) { - cpu->pc = 0xBFC107ECu; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10800(CPUState* cpu) { - cpu->pc = 0xBFC10800u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC108E8(CPUState* cpu) { - cpu->pc = 0xBFC108E8u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC108F8(CPUState* cpu) { - cpu->pc = 0xBFC108F8u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10908(CPUState* cpu) { - cpu->pc = 0xBFC10908u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10910(CPUState* cpu) { - cpu->pc = 0xBFC10910u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10918(CPUState* cpu) { - cpu->pc = 0xBFC10918u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10920(CPUState* cpu) { - cpu->pc = 0xBFC10920u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10928(CPUState* cpu) { - cpu->pc = 0xBFC10928u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10938(CPUState* cpu) { - cpu->pc = 0xBFC10938u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000C80_cont_BFC10944(CPUState* cpu) { - cpu->pc = 0xBFC10944u; - SCPH1001_func_00000C80(cpu); -} - -void SCPH1001_func_00000EB0_cont_BFC109C8(CPUState* cpu) { - cpu->pc = 0xBFC109C8u; - SCPH1001_func_00000EB0(cpu); -} - -void SCPH1001_func_00000EB0_cont_BFC109DC(CPUState* cpu) { - cpu->pc = 0xBFC109DCu; - SCPH1001_func_00000EB0(cpu); -} - -void SCPH1001_func_00000EB0_cont_BFC109F0(CPUState* cpu) { - cpu->pc = 0xBFC109F0u; - SCPH1001_func_00000EB0(cpu); -} - -void SCPH1001_func_00000EB0_cont_BFC10A04(CPUState* cpu) { - cpu->pc = 0xBFC10A04u; - SCPH1001_func_00000EB0(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B38(CPUState* cpu) { - cpu->pc = 0xBFC10B38u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B50(CPUState* cpu) { - cpu->pc = 0xBFC10B50u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B5C(CPUState* cpu) { - cpu->pc = 0xBFC10B5Cu; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B60(CPUState* cpu) { - cpu->pc = 0xBFC10B60u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B64(CPUState* cpu) { - cpu->pc = 0xBFC10B64u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B94(CPUState* cpu) { - cpu->pc = 0xBFC10B94u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10B9C(CPUState* cpu) { - cpu->pc = 0xBFC10B9Cu; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10BA0(CPUState* cpu) { - cpu->pc = 0xBFC10BA0u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10BA8(CPUState* cpu) { - cpu->pc = 0xBFC10BA8u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_00001030_cont_BFC10BB0(CPUState* cpu) { - cpu->pc = 0xBFC10BB0u; - SCPH1001_func_00001030(cpu); -} - -void SCPH1001_func_000010B8_cont_BFC10BD8(CPUState* cpu) { - cpu->pc = 0xBFC10BD8u; - SCPH1001_func_000010B8(cpu); -} - -void SCPH1001_func_000010E4_cont_BFC10BFC(CPUState* cpu) { - cpu->pc = 0xBFC10BFCu; - SCPH1001_func_000010E4(cpu); -} - -void SCPH1001_func_000010E4_cont_BFC10C00(CPUState* cpu) { - cpu->pc = 0xBFC10C00u; - SCPH1001_func_000010E4(cpu); -} - -void SCPH1001_func_000010E4_cont_BFC10C1C(CPUState* cpu) { - cpu->pc = 0xBFC10C1Cu; - SCPH1001_func_000010E4(cpu); -} - -void SCPH1001_func_000010E4_cont_BFC10C20(CPUState* cpu) { - cpu->pc = 0xBFC10C20u; - SCPH1001_func_000010E4(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10CB0(CPUState* cpu) { - cpu->pc = 0xBFC10CB0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10CB8(CPUState* cpu) { - cpu->pc = 0xBFC10CB8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10CD8(CPUState* cpu) { - cpu->pc = 0xBFC10CD8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10CE0(CPUState* cpu) { - cpu->pc = 0xBFC10CE0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10CE4(CPUState* cpu) { - cpu->pc = 0xBFC10CE4u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D04(CPUState* cpu) { - cpu->pc = 0xBFC10D04u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D0C(CPUState* cpu) { - cpu->pc = 0xBFC10D0Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D14(CPUState* cpu) { - cpu->pc = 0xBFC10D14u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D30(CPUState* cpu) { - cpu->pc = 0xBFC10D30u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D48(CPUState* cpu) { - cpu->pc = 0xBFC10D48u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D50(CPUState* cpu) { - cpu->pc = 0xBFC10D50u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D5C(CPUState* cpu) { - cpu->pc = 0xBFC10D5Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D70(CPUState* cpu) { - cpu->pc = 0xBFC10D70u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D74(CPUState* cpu) { - cpu->pc = 0xBFC10D74u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D7C(CPUState* cpu) { - cpu->pc = 0xBFC10D7Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D98(CPUState* cpu) { - cpu->pc = 0xBFC10D98u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10D9C(CPUState* cpu) { - cpu->pc = 0xBFC10D9Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DB8(CPUState* cpu) { - cpu->pc = 0xBFC10DB8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DBC(CPUState* cpu) { - cpu->pc = 0xBFC10DBCu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DC4(CPUState* cpu) { - cpu->pc = 0xBFC10DC4u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DE8(CPUState* cpu) { - cpu->pc = 0xBFC10DE8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DF4(CPUState* cpu) { - cpu->pc = 0xBFC10DF4u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10DFC(CPUState* cpu) { - cpu->pc = 0xBFC10DFCu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E04(CPUState* cpu) { - cpu->pc = 0xBFC10E04u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E0C(CPUState* cpu) { - cpu->pc = 0xBFC10E0Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E20(CPUState* cpu) { - cpu->pc = 0xBFC10E20u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E24(CPUState* cpu) { - cpu->pc = 0xBFC10E24u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E2C(CPUState* cpu) { - cpu->pc = 0xBFC10E2Cu; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E48(CPUState* cpu) { - cpu->pc = 0xBFC10E48u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E50(CPUState* cpu) { - cpu->pc = 0xBFC10E50u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E68(CPUState* cpu) { - cpu->pc = 0xBFC10E68u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E70(CPUState* cpu) { - cpu->pc = 0xBFC10E70u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10E94(CPUState* cpu) { - cpu->pc = 0xBFC10E94u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EA0(CPUState* cpu) { - cpu->pc = 0xBFC10EA0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EA8(CPUState* cpu) { - cpu->pc = 0xBFC10EA8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EB0(CPUState* cpu) { - cpu->pc = 0xBFC10EB0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EB8(CPUState* cpu) { - cpu->pc = 0xBFC10EB8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EC8(CPUState* cpu) { - cpu->pc = 0xBFC10EC8u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EE0(CPUState* cpu) { - cpu->pc = 0xBFC10EE0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001174_cont_BFC10EF0(CPUState* cpu) { - cpu->pc = 0xBFC10EF0u; - SCPH1001_func_00001174(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F64(CPUState* cpu) { - cpu->pc = 0xBFC10F64u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F6C(CPUState* cpu) { - cpu->pc = 0xBFC10F6Cu; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F74(CPUState* cpu) { - cpu->pc = 0xBFC10F74u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F84(CPUState* cpu) { - cpu->pc = 0xBFC10F84u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F94(CPUState* cpu) { - cpu->pc = 0xBFC10F94u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10F9C(CPUState* cpu) { - cpu->pc = 0xBFC10F9Cu; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FA4(CPUState* cpu) { - cpu->pc = 0xBFC10FA4u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FB0(CPUState* cpu) { - cpu->pc = 0xBFC10FB0u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FB8(CPUState* cpu) { - cpu->pc = 0xBFC10FB8u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FC4(CPUState* cpu) { - cpu->pc = 0xBFC10FC4u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FC8(CPUState* cpu) { - cpu->pc = 0xBFC10FC8u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FD4(CPUState* cpu) { - cpu->pc = 0xBFC10FD4u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FE4(CPUState* cpu) { - cpu->pc = 0xBFC10FE4u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FEC(CPUState* cpu) { - cpu->pc = 0xBFC10FECu; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC10FFC(CPUState* cpu) { - cpu->pc = 0xBFC10FFCu; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001444_cont_BFC11000(CPUState* cpu) { - cpu->pc = 0xBFC11000u; - SCPH1001_func_00001444(cpu); -} - -void SCPH1001_func_00001508_cont_BFC11050(CPUState* cpu) { - cpu->pc = 0xBFC11050u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC11070(CPUState* cpu) { - cpu->pc = 0xBFC11070u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC11080(CPUState* cpu) { - cpu->pc = 0xBFC11080u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC1108C(CPUState* cpu) { - cpu->pc = 0xBFC1108Cu; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC11094(CPUState* cpu) { - cpu->pc = 0xBFC11094u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC1109C(CPUState* cpu) { - cpu->pc = 0xBFC1109Cu; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC110A8(CPUState* cpu) { - cpu->pc = 0xBFC110A8u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_00001508_cont_BFC110B4(CPUState* cpu) { - cpu->pc = 0xBFC110B4u; - SCPH1001_func_00001508(cpu); -} - -void SCPH1001_func_000015F8_cont_BFC1110C(CPUState* cpu) { - cpu->pc = 0xBFC1110Cu; - SCPH1001_func_000015F8(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11140(CPUState* cpu) { - cpu->pc = 0xBFC11140u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC1114C(CPUState* cpu) { - cpu->pc = 0xBFC1114Cu; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11158(CPUState* cpu) { - cpu->pc = 0xBFC11158u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11160(CPUState* cpu) { - cpu->pc = 0xBFC11160u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11168(CPUState* cpu) { - cpu->pc = 0xBFC11168u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11170(CPUState* cpu) { - cpu->pc = 0xBFC11170u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11174(CPUState* cpu) { - cpu->pc = 0xBFC11174u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC1117C(CPUState* cpu) { - cpu->pc = 0xBFC1117Cu; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11188(CPUState* cpu) { - cpu->pc = 0xBFC11188u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC1118C(CPUState* cpu) { - cpu->pc = 0xBFC1118Cu; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11190(CPUState* cpu) { - cpu->pc = 0xBFC11190u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC11198(CPUState* cpu) { - cpu->pc = 0xBFC11198u; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_00001614_cont_BFC1119C(CPUState* cpu) { - cpu->pc = 0xBFC1119Cu; - SCPH1001_func_00001614(cpu); -} - -void SCPH1001_func_000016AC_cont_BFC111BC(CPUState* cpu) { - cpu->pc = 0xBFC111BCu; - SCPH1001_func_000016AC(cpu); -} - -void SCPH1001_func_000016E4_cont_BFC11214(CPUState* cpu) { - cpu->pc = 0xBFC11214u; - SCPH1001_func_000016E4(cpu); -} - -void SCPH1001_func_0000175C_cont_BFC1126C(CPUState* cpu) { - cpu->pc = 0xBFC1126Cu; - SCPH1001_func_0000175C(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112B8(CPUState* cpu) { - cpu->pc = 0xBFC112B8u; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112CC(CPUState* cpu) { - cpu->pc = 0xBFC112CCu; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112D4(CPUState* cpu) { - cpu->pc = 0xBFC112D4u; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112D8(CPUState* cpu) { - cpu->pc = 0xBFC112D8u; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112E0(CPUState* cpu) { - cpu->pc = 0xBFC112E0u; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_00001794_cont_BFC112E4(CPUState* cpu) { - cpu->pc = 0xBFC112E4u; - SCPH1001_func_00001794(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC11318(CPUState* cpu) { - cpu->pc = 0xBFC11318u; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC1132C(CPUState* cpu) { - cpu->pc = 0xBFC1132Cu; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC11334(CPUState* cpu) { - cpu->pc = 0xBFC11334u; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC11338(CPUState* cpu) { - cpu->pc = 0xBFC11338u; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC11344(CPUState* cpu) { - cpu->pc = 0xBFC11344u; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_000017F4_cont_BFC11348(CPUState* cpu) { - cpu->pc = 0xBFC11348u; - SCPH1001_func_000017F4(cpu); -} - -void SCPH1001_func_00001858_cont_BFC1137C(CPUState* cpu) { - cpu->pc = 0xBFC1137Cu; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_00001858_cont_BFC11390(CPUState* cpu) { - cpu->pc = 0xBFC11390u; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_00001858_cont_BFC11398(CPUState* cpu) { - cpu->pc = 0xBFC11398u; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_00001858_cont_BFC1139C(CPUState* cpu) { - cpu->pc = 0xBFC1139Cu; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_00001858_cont_BFC113A8(CPUState* cpu) { - cpu->pc = 0xBFC113A8u; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_00001858_cont_BFC113AC(CPUState* cpu) { - cpu->pc = 0xBFC113ACu; - SCPH1001_func_00001858(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC113E0(CPUState* cpu) { - cpu->pc = 0xBFC113E0u; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC113F4(CPUState* cpu) { - cpu->pc = 0xBFC113F4u; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC113FC(CPUState* cpu) { - cpu->pc = 0xBFC113FCu; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC11400(CPUState* cpu) { - cpu->pc = 0xBFC11400u; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC1140C(CPUState* cpu) { - cpu->pc = 0xBFC1140Cu; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_000018BC_cont_BFC11410(CPUState* cpu) { - cpu->pc = 0xBFC11410u; - SCPH1001_func_000018BC(cpu); -} - -void SCPH1001_func_00001920_cont_BFC11434(CPUState* cpu) { - cpu->pc = 0xBFC11434u; - SCPH1001_func_00001920(cpu); -} - -void SCPH1001_func_00001920_cont_BFC11448(CPUState* cpu) { - cpu->pc = 0xBFC11448u; - SCPH1001_func_00001920(cpu); -} - -void SCPH1001_func_00001958_cont_BFC1146C(CPUState* cpu) { - cpu->pc = 0xBFC1146Cu; - SCPH1001_func_00001958(cpu); -} - -void SCPH1001_func_00001958_cont_BFC11480(CPUState* cpu) { - cpu->pc = 0xBFC11480u; - SCPH1001_func_00001958(cpu); -} - -void SCPH1001_func_00001990_cont_BFC114A4(CPUState* cpu) { - cpu->pc = 0xBFC114A4u; - SCPH1001_func_00001990(cpu); -} - -void SCPH1001_func_00001990_cont_BFC114B8(CPUState* cpu) { - cpu->pc = 0xBFC114B8u; - SCPH1001_func_00001990(cpu); -} - -void SCPH1001_func_000019C8_cont_BFC114DC(CPUState* cpu) { - cpu->pc = 0xBFC114DCu; - SCPH1001_func_000019C8(cpu); -} - -void SCPH1001_func_000019C8_cont_BFC114F0(CPUState* cpu) { - cpu->pc = 0xBFC114F0u; - SCPH1001_func_000019C8(cpu); -} - -void SCPH1001_func_00001A2C_cont_BFC11544(CPUState* cpu) { - cpu->pc = 0xBFC11544u; - SCPH1001_func_00001A2C(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC11574(CPUState* cpu) { - cpu->pc = 0xBFC11574u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC11580(CPUState* cpu) { - cpu->pc = 0xBFC11580u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC11584(CPUState* cpu) { - cpu->pc = 0xBFC11584u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC11598(CPUState* cpu) { - cpu->pc = 0xBFC11598u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC115AC(CPUState* cpu) { - cpu->pc = 0xBFC115ACu; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC115C0(CPUState* cpu) { - cpu->pc = 0xBFC115C0u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC115D0(CPUState* cpu) { - cpu->pc = 0xBFC115D0u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC115D8(CPUState* cpu) { - cpu->pc = 0xBFC115D8u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001A60_cont_BFC115E0(CPUState* cpu) { - cpu->pc = 0xBFC115E0u; - SCPH1001_func_00001A60(cpu); -} - -void SCPH1001_func_00001AE8_cont_BFC115F0(CPUState* cpu) { - cpu->pc = 0xBFC115F0u; - SCPH1001_func_00001AE8(cpu); -} - -void SCPH1001_func_00001AE8_cont_BFC115F8(CPUState* cpu) { - cpu->pc = 0xBFC115F8u; - SCPH1001_func_00001AE8(cpu); -} - -void SCPH1001_func_00001AFC_cont_BFC11608(CPUState* cpu) { - cpu->pc = 0xBFC11608u; - SCPH1001_func_00001AFC(cpu); -} - -void SCPH1001_func_00001B20_cont_BFC11634(CPUState* cpu) { - cpu->pc = 0xBFC11634u; - SCPH1001_func_00001B20(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116A0(CPUState* cpu) { - cpu->pc = 0xBFC116A0u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116B8(CPUState* cpu) { - cpu->pc = 0xBFC116B8u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116C8(CPUState* cpu) { - cpu->pc = 0xBFC116C8u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116D8(CPUState* cpu) { - cpu->pc = 0xBFC116D8u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116E8(CPUState* cpu) { - cpu->pc = 0xBFC116E8u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC116F8(CPUState* cpu) { - cpu->pc = 0xBFC116F8u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11700(CPUState* cpu) { - cpu->pc = 0xBFC11700u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11708(CPUState* cpu) { - cpu->pc = 0xBFC11708u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11718(CPUState* cpu) { - cpu->pc = 0xBFC11718u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11720(CPUState* cpu) { - cpu->pc = 0xBFC11720u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11730(CPUState* cpu) { - cpu->pc = 0xBFC11730u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001B44_cont_BFC11740(CPUState* cpu) { - cpu->pc = 0xBFC11740u; - SCPH1001_func_00001B44(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC1179C(CPUState* cpu) { - cpu->pc = 0xBFC1179Cu; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117A4(CPUState* cpu) { - cpu->pc = 0xBFC117A4u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117B4(CPUState* cpu) { - cpu->pc = 0xBFC117B4u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117C4(CPUState* cpu) { - cpu->pc = 0xBFC117C4u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117D4(CPUState* cpu) { - cpu->pc = 0xBFC117D4u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117E4(CPUState* cpu) { - cpu->pc = 0xBFC117E4u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117E8(CPUState* cpu) { - cpu->pc = 0xBFC117E8u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001C5C_cont_BFC117F8(CPUState* cpu) { - cpu->pc = 0xBFC117F8u; - SCPH1001_func_00001C5C(cpu); -} - -void SCPH1001_func_00001D40_cont_BFC11850(CPUState* cpu) { - cpu->pc = 0xBFC11850u; - SCPH1001_func_00001D40(cpu); -} - -void SCPH1001_func_00001D70_cont_BFC11880(CPUState* cpu) { - cpu->pc = 0xBFC11880u; - SCPH1001_func_00001D70(cpu); -} - -void SCPH1001_func_00001D8C_cont_BFC118B4(CPUState* cpu) { - cpu->pc = 0xBFC118B4u; - SCPH1001_func_00001D8C(cpu); -} - -void SCPH1001_func_00001D8C_cont_BFC118C4(CPUState* cpu) { - cpu->pc = 0xBFC118C4u; - SCPH1001_func_00001D8C(cpu); -} - -void SCPH1001_func_00001D8C_cont_BFC118CC(CPUState* cpu) { - cpu->pc = 0xBFC118CCu; - SCPH1001_func_00001D8C(cpu); -} - -void SCPH1001_func_00001D8C_cont_BFC1190C(CPUState* cpu) { - cpu->pc = 0xBFC1190Cu; - SCPH1001_func_00001D8C(cpu); -} - -void SCPH1001_func_00001E44_cont_BFC11970(CPUState* cpu) { - cpu->pc = 0xBFC11970u; - SCPH1001_func_00001E44(cpu); -} - -void SCPH1001_func_00001E80_cont_BFC11990(CPUState* cpu) { - cpu->pc = 0xBFC11990u; - SCPH1001_func_00001E80(cpu); -} - -void SCPH1001_func_00001E98_cont_BFC119A8(CPUState* cpu) { - cpu->pc = 0xBFC119A8u; - SCPH1001_func_00001E98(cpu); -} - -void SCPH1001_func_00001E98_cont_BFC119B8(CPUState* cpu) { - cpu->pc = 0xBFC119B8u; - SCPH1001_func_00001E98(cpu); -} - -void SCPH1001_func_00001EC8_cont_BFC119F4(CPUState* cpu) { - cpu->pc = 0xBFC119F4u; - SCPH1001_func_00001EC8(cpu); -} - -void SCPH1001_func_00001F10_cont_BFC11A3C(CPUState* cpu) { - cpu->pc = 0xBFC11A3Cu; - SCPH1001_func_00001F10(cpu); -} - -void SCPH1001_func_00001F10_cont_BFC11A44(CPUState* cpu) { - cpu->pc = 0xBFC11A44u; - SCPH1001_func_00001F10(cpu); -} - -void SCPH1001_func_00001F4C_cont_BFC11A78(CPUState* cpu) { - cpu->pc = 0xBFC11A78u; - SCPH1001_func_00001F4C(cpu); -} - -void SCPH1001_func_00001F4C_cont_BFC11A80(CPUState* cpu) { - cpu->pc = 0xBFC11A80u; - SCPH1001_func_00001F4C(cpu); -} - -void SCPH1001_func_00001F88_cont_BFC11AC8(CPUState* cpu) { - cpu->pc = 0xBFC11AC8u; - SCPH1001_func_00001F88(cpu); -} - -void SCPH1001_func_00001F88_cont_BFC11ACC(CPUState* cpu) { - cpu->pc = 0xBFC11ACCu; - SCPH1001_func_00001F88(cpu); -} - -void SCPH1001_func_00001F88_cont_BFC11ADC(CPUState* cpu) { - cpu->pc = 0xBFC11ADCu; - SCPH1001_func_00001F88(cpu); -} - -void SCPH1001_func_00001FFC_cont_BFC11B0C(CPUState* cpu) { - cpu->pc = 0xBFC11B0Cu; - SCPH1001_func_00001FFC(cpu); -} - -void SCPH1001_func_00002018_cont_BFC11B3C(CPUState* cpu) { - cpu->pc = 0xBFC11B3Cu; - SCPH1001_func_00002018(cpu); -} - -void SCPH1001_func_00002018_cont_BFC11B50(CPUState* cpu) { - cpu->pc = 0xBFC11B50u; - SCPH1001_func_00002018(cpu); -} - -void SCPH1001_func_00002018_cont_BFC11B58(CPUState* cpu) { - cpu->pc = 0xBFC11B58u; - SCPH1001_func_00002018(cpu); -} - -void SCPH1001_func_00002018_cont_BFC11B98(CPUState* cpu) { - cpu->pc = 0xBFC11B98u; - SCPH1001_func_00002018(cpu); -} - -void SCPH1001_func_000020D4_cont_BFC11C04(CPUState* cpu) { - cpu->pc = 0xBFC11C04u; - SCPH1001_func_000020D4(cpu); -} - -void SCPH1001_func_00002114_cont_BFC11C1C(CPUState* cpu) { - cpu->pc = 0xBFC11C1Cu; - SCPH1001_func_00002114(cpu); -} - -void SCPH1001_func_00002124_cont_BFC11C2C(CPUState* cpu) { - cpu->pc = 0xBFC11C2Cu; - SCPH1001_func_00002124(cpu); -} - -void SCPH1001_func_00002124_cont_BFC11C44(CPUState* cpu) { - cpu->pc = 0xBFC11C44u; - SCPH1001_func_00002124(cpu); -} - -void SCPH1001_func_00002150_cont_BFC11C58(CPUState* cpu) { - cpu->pc = 0xBFC11C58u; - SCPH1001_func_00002150(cpu); -} - -void SCPH1001_func_00002150_cont_BFC11C60(CPUState* cpu) { - cpu->pc = 0xBFC11C60u; - SCPH1001_func_00002150(cpu); -} - -void SCPH1001_func_00002168_cont_BFC11C70(CPUState* cpu) { - cpu->pc = 0xBFC11C70u; - SCPH1001_func_00002168(cpu); -} - -void SCPH1001_func_00002168_cont_BFC11C80(CPUState* cpu) { - cpu->pc = 0xBFC11C80u; - SCPH1001_func_00002168(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11CB8(CPUState* cpu) { - cpu->pc = 0xBFC11CB8u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11CC8(CPUState* cpu) { - cpu->pc = 0xBFC11CC8u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11CD4(CPUState* cpu) { - cpu->pc = 0xBFC11CD4u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11CF0(CPUState* cpu) { - cpu->pc = 0xBFC11CF0u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D00(CPUState* cpu) { - cpu->pc = 0xBFC11D00u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D0C(CPUState* cpu) { - cpu->pc = 0xBFC11D0Cu; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D28(CPUState* cpu) { - cpu->pc = 0xBFC11D28u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D38(CPUState* cpu) { - cpu->pc = 0xBFC11D38u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D44(CPUState* cpu) { - cpu->pc = 0xBFC11D44u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D60(CPUState* cpu) { - cpu->pc = 0xBFC11D60u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D70(CPUState* cpu) { - cpu->pc = 0xBFC11D70u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D7C(CPUState* cpu) { - cpu->pc = 0xBFC11D7Cu; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11D98(CPUState* cpu) { - cpu->pc = 0xBFC11D98u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11DA8(CPUState* cpu) { - cpu->pc = 0xBFC11DA8u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11DB4(CPUState* cpu) { - cpu->pc = 0xBFC11DB4u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11DD0(CPUState* cpu) { - cpu->pc = 0xBFC11DD0u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11DE0(CPUState* cpu) { - cpu->pc = 0xBFC11DE0u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11DEC(CPUState* cpu) { - cpu->pc = 0xBFC11DECu; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E08(CPUState* cpu) { - cpu->pc = 0xBFC11E08u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E18(CPUState* cpu) { - cpu->pc = 0xBFC11E18u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E24(CPUState* cpu) { - cpu->pc = 0xBFC11E24u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E40(CPUState* cpu) { - cpu->pc = 0xBFC11E40u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E50(CPUState* cpu) { - cpu->pc = 0xBFC11E50u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E5C(CPUState* cpu) { - cpu->pc = 0xBFC11E5Cu; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E78(CPUState* cpu) { - cpu->pc = 0xBFC11E78u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E88(CPUState* cpu) { - cpu->pc = 0xBFC11E88u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11E94(CPUState* cpu) { - cpu->pc = 0xBFC11E94u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11EB0(CPUState* cpu) { - cpu->pc = 0xBFC11EB0u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11EC0(CPUState* cpu) { - cpu->pc = 0xBFC11EC0u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11ECC(CPUState* cpu) { - cpu->pc = 0xBFC11ECCu; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11EE8(CPUState* cpu) { - cpu->pc = 0xBFC11EE8u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11EF8(CPUState* cpu) { - cpu->pc = 0xBFC11EF8u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11F04(CPUState* cpu) { - cpu->pc = 0xBFC11F04u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11F18(CPUState* cpu) { - cpu->pc = 0xBFC11F18u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11F28(CPUState* cpu) { - cpu->pc = 0xBFC11F28u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11F34(CPUState* cpu) { - cpu->pc = 0xBFC11F34u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_0000218C_cont_BFC11F40(CPUState* cpu) { - cpu->pc = 0xBFC11F40u; - SCPH1001_func_0000218C(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11F84(CPUState* cpu) { - cpu->pc = 0xBFC11F84u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11F94(CPUState* cpu) { - cpu->pc = 0xBFC11F94u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11FA0(CPUState* cpu) { - cpu->pc = 0xBFC11FA0u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11FBC(CPUState* cpu) { - cpu->pc = 0xBFC11FBCu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11FCC(CPUState* cpu) { - cpu->pc = 0xBFC11FCCu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11FD8(CPUState* cpu) { - cpu->pc = 0xBFC11FD8u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC11FF4(CPUState* cpu) { - cpu->pc = 0xBFC11FF4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12004(CPUState* cpu) { - cpu->pc = 0xBFC12004u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12010(CPUState* cpu) { - cpu->pc = 0xBFC12010u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1202C(CPUState* cpu) { - cpu->pc = 0xBFC1202Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1203C(CPUState* cpu) { - cpu->pc = 0xBFC1203Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12048(CPUState* cpu) { - cpu->pc = 0xBFC12048u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12064(CPUState* cpu) { - cpu->pc = 0xBFC12064u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12074(CPUState* cpu) { - cpu->pc = 0xBFC12074u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12080(CPUState* cpu) { - cpu->pc = 0xBFC12080u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1209C(CPUState* cpu) { - cpu->pc = 0xBFC1209Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC120AC(CPUState* cpu) { - cpu->pc = 0xBFC120ACu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC120B8(CPUState* cpu) { - cpu->pc = 0xBFC120B8u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC120D4(CPUState* cpu) { - cpu->pc = 0xBFC120D4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC120E4(CPUState* cpu) { - cpu->pc = 0xBFC120E4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC120F0(CPUState* cpu) { - cpu->pc = 0xBFC120F0u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1210C(CPUState* cpu) { - cpu->pc = 0xBFC1210Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1211C(CPUState* cpu) { - cpu->pc = 0xBFC1211Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12128(CPUState* cpu) { - cpu->pc = 0xBFC12128u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12144(CPUState* cpu) { - cpu->pc = 0xBFC12144u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12154(CPUState* cpu) { - cpu->pc = 0xBFC12154u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12160(CPUState* cpu) { - cpu->pc = 0xBFC12160u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1217C(CPUState* cpu) { - cpu->pc = 0xBFC1217Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1218C(CPUState* cpu) { - cpu->pc = 0xBFC1218Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12198(CPUState* cpu) { - cpu->pc = 0xBFC12198u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC121B4(CPUState* cpu) { - cpu->pc = 0xBFC121B4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC121C4(CPUState* cpu) { - cpu->pc = 0xBFC121C4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC121D0(CPUState* cpu) { - cpu->pc = 0xBFC121D0u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC121E4(CPUState* cpu) { - cpu->pc = 0xBFC121E4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC121F4(CPUState* cpu) { - cpu->pc = 0xBFC121F4u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC12200(CPUState* cpu) { - cpu->pc = 0xBFC12200u; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002458_cont_BFC1220C(CPUState* cpu) { - cpu->pc = 0xBFC1220Cu; - SCPH1001_func_00002458(cpu); -} - -void SCPH1001_func_00002724_cont_BFC12258(CPUState* cpu) { - cpu->pc = 0xBFC12258u; - SCPH1001_func_00002724(cpu); -} - -void SCPH1001_func_00002724_cont_BFC12270(CPUState* cpu) { - cpu->pc = 0xBFC12270u; - SCPH1001_func_00002724(cpu); -} - -void SCPH1001_func_00002724_cont_BFC1227C(CPUState* cpu) { - cpu->pc = 0xBFC1227Cu; - SCPH1001_func_00002724(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC12328(CPUState* cpu) { - cpu->pc = 0xBFC12328u; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC12330(CPUState* cpu) { - cpu->pc = 0xBFC12330u; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC1233C(CPUState* cpu) { - cpu->pc = 0xBFC1233Cu; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC12344(CPUState* cpu) { - cpu->pc = 0xBFC12344u; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC12358(CPUState* cpu) { - cpu->pc = 0xBFC12358u; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_000027C0_cont_BFC12360(CPUState* cpu) { - cpu->pc = 0xBFC12360u; - SCPH1001_func_000027C0(cpu); -} - -void SCPH1001_func_00002870_cont_BFC12384(CPUState* cpu) { - cpu->pc = 0xBFC12384u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123A0(CPUState* cpu) { - cpu->pc = 0xBFC123A0u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123A8(CPUState* cpu) { - cpu->pc = 0xBFC123A8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123B8(CPUState* cpu) { - cpu->pc = 0xBFC123B8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123C0(CPUState* cpu) { - cpu->pc = 0xBFC123C0u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123C8(CPUState* cpu) { - cpu->pc = 0xBFC123C8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123D0(CPUState* cpu) { - cpu->pc = 0xBFC123D0u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123D8(CPUState* cpu) { - cpu->pc = 0xBFC123D8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123E0(CPUState* cpu) { - cpu->pc = 0xBFC123E0u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123E8(CPUState* cpu) { - cpu->pc = 0xBFC123E8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123F0(CPUState* cpu) { - cpu->pc = 0xBFC123F0u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123F8(CPUState* cpu) { - cpu->pc = 0xBFC123F8u; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002870_cont_BFC123FC(CPUState* cpu) { - cpu->pc = 0xBFC123FCu; - SCPH1001_func_00002870(cpu); -} - -void SCPH1001_func_00002908_cont_BFC12418(CPUState* cpu) { - cpu->pc = 0xBFC12418u; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002908_cont_BFC12420(CPUState* cpu) { - cpu->pc = 0xBFC12420u; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002908_cont_BFC12430(CPUState* cpu) { - cpu->pc = 0xBFC12430u; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002908_cont_BFC12438(CPUState* cpu) { - cpu->pc = 0xBFC12438u; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002908_cont_BFC12448(CPUState* cpu) { - cpu->pc = 0xBFC12448u; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002908_cont_BFC1244C(CPUState* cpu) { - cpu->pc = 0xBFC1244Cu; - SCPH1001_func_00002908(cpu); -} - -void SCPH1001_func_00002958_cont_BFC1246C(CPUState* cpu) { - cpu->pc = 0xBFC1246Cu; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC12474(CPUState* cpu) { - cpu->pc = 0xBFC12474u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC12488(CPUState* cpu) { - cpu->pc = 0xBFC12488u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC1249C(CPUState* cpu) { - cpu->pc = 0xBFC1249Cu; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC124AC(CPUState* cpu) { - cpu->pc = 0xBFC124ACu; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC124C4(CPUState* cpu) { - cpu->pc = 0xBFC124C4u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC1250C(CPUState* cpu) { - cpu->pc = 0xBFC1250Cu; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC12518(CPUState* cpu) { - cpu->pc = 0xBFC12518u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC12530(CPUState* cpu) { - cpu->pc = 0xBFC12530u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002958_cont_BFC12554(CPUState* cpu) { - cpu->pc = 0xBFC12554u; - SCPH1001_func_00002958(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12578(CPUState* cpu) { - cpu->pc = 0xBFC12578u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12588(CPUState* cpu) { - cpu->pc = 0xBFC12588u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12598(CPUState* cpu) { - cpu->pc = 0xBFC12598u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC125AC(CPUState* cpu) { - cpu->pc = 0xBFC125ACu; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC125B4(CPUState* cpu) { - cpu->pc = 0xBFC125B4u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC125C8(CPUState* cpu) { - cpu->pc = 0xBFC125C8u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC125D8(CPUState* cpu) { - cpu->pc = 0xBFC125D8u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC125F8(CPUState* cpu) { - cpu->pc = 0xBFC125F8u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12600(CPUState* cpu) { - cpu->pc = 0xBFC12600u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12608(CPUState* cpu) { - cpu->pc = 0xBFC12608u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12610(CPUState* cpu) { - cpu->pc = 0xBFC12610u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002A64_cont_BFC12618(CPUState* cpu) { - cpu->pc = 0xBFC12618u; - SCPH1001_func_00002A64(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1263C(CPUState* cpu) { - cpu->pc = 0xBFC1263Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12644(CPUState* cpu) { - cpu->pc = 0xBFC12644u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12654(CPUState* cpu) { - cpu->pc = 0xBFC12654u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12668(CPUState* cpu) { - cpu->pc = 0xBFC12668u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12670(CPUState* cpu) { - cpu->pc = 0xBFC12670u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1268C(CPUState* cpu) { - cpu->pc = 0xBFC1268Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC126A8(CPUState* cpu) { - cpu->pc = 0xBFC126A8u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC126B4(CPUState* cpu) { - cpu->pc = 0xBFC126B4u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC126B8(CPUState* cpu) { - cpu->pc = 0xBFC126B8u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC126E0(CPUState* cpu) { - cpu->pc = 0xBFC126E0u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC126FC(CPUState* cpu) { - cpu->pc = 0xBFC126FCu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12700(CPUState* cpu) { - cpu->pc = 0xBFC12700u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12708(CPUState* cpu) { - cpu->pc = 0xBFC12708u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12714(CPUState* cpu) { - cpu->pc = 0xBFC12714u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1271C(CPUState* cpu) { - cpu->pc = 0xBFC1271Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12738(CPUState* cpu) { - cpu->pc = 0xBFC12738u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1273C(CPUState* cpu) { - cpu->pc = 0xBFC1273Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12750(CPUState* cpu) { - cpu->pc = 0xBFC12750u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1275C(CPUState* cpu) { - cpu->pc = 0xBFC1275Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC1276C(CPUState* cpu) { - cpu->pc = 0xBFC1276Cu; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12774(CPUState* cpu) { - cpu->pc = 0xBFC12774u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002B28_cont_BFC12784(CPUState* cpu) { - cpu->pc = 0xBFC12784u; - SCPH1001_func_00002B28(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127A8(CPUState* cpu) { - cpu->pc = 0xBFC127A8u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127B0(CPUState* cpu) { - cpu->pc = 0xBFC127B0u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127C0(CPUState* cpu) { - cpu->pc = 0xBFC127C0u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127D4(CPUState* cpu) { - cpu->pc = 0xBFC127D4u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127DC(CPUState* cpu) { - cpu->pc = 0xBFC127DCu; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC127F8(CPUState* cpu) { - cpu->pc = 0xBFC127F8u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12814(CPUState* cpu) { - cpu->pc = 0xBFC12814u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12820(CPUState* cpu) { - cpu->pc = 0xBFC12820u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12824(CPUState* cpu) { - cpu->pc = 0xBFC12824u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC1284C(CPUState* cpu) { - cpu->pc = 0xBFC1284Cu; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12868(CPUState* cpu) { - cpu->pc = 0xBFC12868u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC1286C(CPUState* cpu) { - cpu->pc = 0xBFC1286Cu; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12874(CPUState* cpu) { - cpu->pc = 0xBFC12874u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12880(CPUState* cpu) { - cpu->pc = 0xBFC12880u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC12888(CPUState* cpu) { - cpu->pc = 0xBFC12888u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128A4(CPUState* cpu) { - cpu->pc = 0xBFC128A4u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128A8(CPUState* cpu) { - cpu->pc = 0xBFC128A8u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128BC(CPUState* cpu) { - cpu->pc = 0xBFC128BCu; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128C8(CPUState* cpu) { - cpu->pc = 0xBFC128C8u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128D8(CPUState* cpu) { - cpu->pc = 0xBFC128D8u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128E0(CPUState* cpu) { - cpu->pc = 0xBFC128E0u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002C94_cont_BFC128F0(CPUState* cpu) { - cpu->pc = 0xBFC128F0u; - SCPH1001_func_00002C94(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12918(CPUState* cpu) { - cpu->pc = 0xBFC12918u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12920(CPUState* cpu) { - cpu->pc = 0xBFC12920u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12930(CPUState* cpu) { - cpu->pc = 0xBFC12930u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12944(CPUState* cpu) { - cpu->pc = 0xBFC12944u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12960(CPUState* cpu) { - cpu->pc = 0xBFC12960u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC1296C(CPUState* cpu) { - cpu->pc = 0xBFC1296Cu; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12980(CPUState* cpu) { - cpu->pc = 0xBFC12980u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E00_cont_BFC12988(CPUState* cpu) { - cpu->pc = 0xBFC12988u; - SCPH1001_func_00002E00(cpu); -} - -void SCPH1001_func_00002E98_cont_BFC129A8(CPUState* cpu) { - cpu->pc = 0xBFC129A8u; - SCPH1001_func_00002E98(cpu); -} - -void SCPH1001_func_00002E98_cont_BFC129B0(CPUState* cpu) { - cpu->pc = 0xBFC129B0u; - SCPH1001_func_00002E98(cpu); -} - -void SCPH1001_func_00002E98_cont_BFC129C0(CPUState* cpu) { - cpu->pc = 0xBFC129C0u; - SCPH1001_func_00002E98(cpu); -} - -void SCPH1001_func_00002E98_cont_BFC129D4(CPUState* cpu) { - cpu->pc = 0xBFC129D4u; - SCPH1001_func_00002E98(cpu); -} - -void SCPH1001_func_00002E98_cont_BFC129DC(CPUState* cpu) { - cpu->pc = 0xBFC129DCu; - SCPH1001_func_00002E98(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A10(CPUState* cpu) { - cpu->pc = 0xBFC12A10u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A20(CPUState* cpu) { - cpu->pc = 0xBFC12A20u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A30(CPUState* cpu) { - cpu->pc = 0xBFC12A30u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A44(CPUState* cpu) { - cpu->pc = 0xBFC12A44u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A4C(CPUState* cpu) { - cpu->pc = 0xBFC12A4Cu; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A58(CPUState* cpu) { - cpu->pc = 0xBFC12A58u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A5C(CPUState* cpu) { - cpu->pc = 0xBFC12A5Cu; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A64(CPUState* cpu) { - cpu->pc = 0xBFC12A64u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A6C(CPUState* cpu) { - cpu->pc = 0xBFC12A6Cu; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A70(CPUState* cpu) { - cpu->pc = 0xBFC12A70u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A78(CPUState* cpu) { - cpu->pc = 0xBFC12A78u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12A94(CPUState* cpu) { - cpu->pc = 0xBFC12A94u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12AA0(CPUState* cpu) { - cpu->pc = 0xBFC12AA0u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12AB4(CPUState* cpu) { - cpu->pc = 0xBFC12AB4u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002EFC_cont_BFC12AB8(CPUState* cpu) { - cpu->pc = 0xBFC12AB8u; - SCPH1001_func_00002EFC(cpu); -} - -void SCPH1001_func_00002FC8_cont_BFC12AE8(CPUState* cpu) { - cpu->pc = 0xBFC12AE8u; - SCPH1001_func_00002FC8(cpu); -} - -void SCPH1001_func_00002FC8_cont_BFC12AF0(CPUState* cpu) { - cpu->pc = 0xBFC12AF0u; - SCPH1001_func_00002FC8(cpu); -} - -void SCPH1001_func_00003000_cont_BFC12B1C(CPUState* cpu) { - cpu->pc = 0xBFC12B1Cu; - SCPH1001_func_00003000(cpu); -} - -void SCPH1001_func_00003000_cont_BFC12B24(CPUState* cpu) { - cpu->pc = 0xBFC12B24u; - SCPH1001_func_00003000(cpu); -} - -void SCPH1001_func_00003000_cont_BFC12B30(CPUState* cpu) { - cpu->pc = 0xBFC12B30u; - SCPH1001_func_00003000(cpu); -} - -void SCPH1001_func_00003000_cont_BFC12B40(CPUState* cpu) { - cpu->pc = 0xBFC12B40u; - SCPH1001_func_00003000(cpu); -} - -void SCPH1001_func_00003000_cont_BFC12B4C(CPUState* cpu) { - cpu->pc = 0xBFC12B4Cu; - SCPH1001_func_00003000(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12B78(CPUState* cpu) { - cpu->pc = 0xBFC12B78u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12B88(CPUState* cpu) { - cpu->pc = 0xBFC12B88u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12B90(CPUState* cpu) { - cpu->pc = 0xBFC12B90u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12BA0(CPUState* cpu) { - cpu->pc = 0xBFC12BA0u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12BB4(CPUState* cpu) { - cpu->pc = 0xBFC12BB4u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_00003060_cont_BFC12BB8(CPUState* cpu) { - cpu->pc = 0xBFC12BB8u; - SCPH1001_func_00003060(cpu); -} - -void SCPH1001_func_000030C8_cont_BFC12BD0(CPUState* cpu) { - cpu->pc = 0xBFC12BD0u; - SCPH1001_func_000030C8(cpu); -} - -void SCPH1001_func_000030C8_cont_BFC12BD8(CPUState* cpu) { - cpu->pc = 0xBFC12BD8u; - SCPH1001_func_000030C8(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12C54(CPUState* cpu) { - cpu->pc = 0xBFC12C54u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12C64(CPUState* cpu) { - cpu->pc = 0xBFC12C64u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12C6C(CPUState* cpu) { - cpu->pc = 0xBFC12C6Cu; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12C74(CPUState* cpu) { - cpu->pc = 0xBFC12C74u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12C7C(CPUState* cpu) { - cpu->pc = 0xBFC12C7Cu; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CA0(CPUState* cpu) { - cpu->pc = 0xBFC12CA0u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CA4(CPUState* cpu) { - cpu->pc = 0xBFC12CA4u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CB8(CPUState* cpu) { - cpu->pc = 0xBFC12CB8u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CC4(CPUState* cpu) { - cpu->pc = 0xBFC12CC4u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CCC(CPUState* cpu) { - cpu->pc = 0xBFC12CCCu; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_00003108_cont_BFC12CD0(CPUState* cpu) { - cpu->pc = 0xBFC12CD0u; - SCPH1001_func_00003108(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D10(CPUState* cpu) { - cpu->pc = 0xBFC12D10u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D20(CPUState* cpu) { - cpu->pc = 0xBFC12D20u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D3C(CPUState* cpu) { - cpu->pc = 0xBFC12D3Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D44(CPUState* cpu) { - cpu->pc = 0xBFC12D44u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D50(CPUState* cpu) { - cpu->pc = 0xBFC12D50u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D68(CPUState* cpu) { - cpu->pc = 0xBFC12D68u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D70(CPUState* cpu) { - cpu->pc = 0xBFC12D70u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D74(CPUState* cpu) { - cpu->pc = 0xBFC12D74u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12D8C(CPUState* cpu) { - cpu->pc = 0xBFC12D8Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12DBC(CPUState* cpu) { - cpu->pc = 0xBFC12DBCu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12DDC(CPUState* cpu) { - cpu->pc = 0xBFC12DDCu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12DFC(CPUState* cpu) { - cpu->pc = 0xBFC12DFCu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E04(CPUState* cpu) { - cpu->pc = 0xBFC12E04u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E24(CPUState* cpu) { - cpu->pc = 0xBFC12E24u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E2C(CPUState* cpu) { - cpu->pc = 0xBFC12E2Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E30(CPUState* cpu) { - cpu->pc = 0xBFC12E30u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E58(CPUState* cpu) { - cpu->pc = 0xBFC12E58u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E5C(CPUState* cpu) { - cpu->pc = 0xBFC12E5Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E6C(CPUState* cpu) { - cpu->pc = 0xBFC12E6Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E74(CPUState* cpu) { - cpu->pc = 0xBFC12E74u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E80(CPUState* cpu) { - cpu->pc = 0xBFC12E80u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E88(CPUState* cpu) { - cpu->pc = 0xBFC12E88u; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000031E8_cont_BFC12E8C(CPUState* cpu) { - cpu->pc = 0xBFC12E8Cu; - SCPH1001_func_000031E8(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12EBC(CPUState* cpu) { - cpu->pc = 0xBFC12EBCu; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12EC8(CPUState* cpu) { - cpu->pc = 0xBFC12EC8u; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12EE4(CPUState* cpu) { - cpu->pc = 0xBFC12EE4u; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12EF4(CPUState* cpu) { - cpu->pc = 0xBFC12EF4u; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12F3C(CPUState* cpu) { - cpu->pc = 0xBFC12F3Cu; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12F50(CPUState* cpu) { - cpu->pc = 0xBFC12F50u; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12F58(CPUState* cpu) { - cpu->pc = 0xBFC12F58u; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_000033A4_cont_BFC12F5C(CPUState* cpu) { - cpu->pc = 0xBFC12F5Cu; - SCPH1001_func_000033A4(cpu); -} - -void SCPH1001_func_0000346C_cont_BFC12F7C(CPUState* cpu) { - cpu->pc = 0xBFC12F7Cu; - SCPH1001_func_0000346C(cpu); -} - -void SCPH1001_func_0000346C_cont_BFC12F8C(CPUState* cpu) { - cpu->pc = 0xBFC12F8Cu; - SCPH1001_func_0000346C(cpu); -} - -void SCPH1001_func_0000346C_cont_BFC12FA8(CPUState* cpu) { - cpu->pc = 0xBFC12FA8u; - SCPH1001_func_0000346C(cpu); -} - -void SCPH1001_func_000034B4_cont_BFC12FD4(CPUState* cpu) { - cpu->pc = 0xBFC12FD4u; - SCPH1001_func_000034B4(cpu); -} - -void SCPH1001_func_000034B4_cont_BFC12FE4(CPUState* cpu) { - cpu->pc = 0xBFC12FE4u; - SCPH1001_func_000034B4(cpu); -} - -void SCPH1001_func_000034B4_cont_BFC12FF4(CPUState* cpu) { - cpu->pc = 0xBFC12FF4u; - SCPH1001_func_000034B4(cpu); -} - -void SCPH1001_func_000034B4_cont_BFC13014(CPUState* cpu) { - cpu->pc = 0xBFC13014u; - SCPH1001_func_000034B4(cpu); -} - -void SCPH1001_func_000034B4_cont_BFC1301C(CPUState* cpu) { - cpu->pc = 0xBFC1301Cu; - SCPH1001_func_000034B4(cpu); -} - -void SCPH1001_func_0000352C_cont_BFC13044(CPUState* cpu) { - cpu->pc = 0xBFC13044u; - SCPH1001_func_0000352C(cpu); -} - -void SCPH1001_func_0000352C_cont_BFC1304C(CPUState* cpu) { - cpu->pc = 0xBFC1304Cu; - SCPH1001_func_0000352C(cpu); -} - -void SCPH1001_func_0000352C_cont_BFC13050(CPUState* cpu) { - cpu->pc = 0xBFC13050u; - SCPH1001_func_0000352C(cpu); -} - -void SCPH1001_func_0000352C_cont_BFC13060(CPUState* cpu) { - cpu->pc = 0xBFC13060u; - SCPH1001_func_0000352C(cpu); -} - -void SCPH1001_func_0000352C_cont_BFC13068(CPUState* cpu) { - cpu->pc = 0xBFC13068u; - SCPH1001_func_0000352C(cpu); -} - -void SCPH1001_func_00003570_cont_BFC13088(CPUState* cpu) { - cpu->pc = 0xBFC13088u; - SCPH1001_func_00003570(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC130BC(CPUState* cpu) { - cpu->pc = 0xBFC130BCu; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC130C4(CPUState* cpu) { - cpu->pc = 0xBFC130C4u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC130D8(CPUState* cpu) { - cpu->pc = 0xBFC130D8u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC130EC(CPUState* cpu) { - cpu->pc = 0xBFC130ECu; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC130FC(CPUState* cpu) { - cpu->pc = 0xBFC130FCu; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC13114(CPUState* cpu) { - cpu->pc = 0xBFC13114u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC13144(CPUState* cpu) { - cpu->pc = 0xBFC13144u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC13150(CPUState* cpu) { - cpu->pc = 0xBFC13150u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC13164(CPUState* cpu) { - cpu->pc = 0xBFC13164u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_000035AC_cont_BFC13168(CPUState* cpu) { - cpu->pc = 0xBFC13168u; - SCPH1001_func_000035AC(cpu); -} - -void SCPH1001_func_00003678_cont_BFC13188(CPUState* cpu) { - cpu->pc = 0xBFC13188u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC13190(CPUState* cpu) { - cpu->pc = 0xBFC13190u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC131A4(CPUState* cpu) { - cpu->pc = 0xBFC131A4u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC131B8(CPUState* cpu) { - cpu->pc = 0xBFC131B8u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC131C8(CPUState* cpu) { - cpu->pc = 0xBFC131C8u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC131E0(CPUState* cpu) { - cpu->pc = 0xBFC131E0u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC13210(CPUState* cpu) { - cpu->pc = 0xBFC13210u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC1321C(CPUState* cpu) { - cpu->pc = 0xBFC1321Cu; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC13230(CPUState* cpu) { - cpu->pc = 0xBFC13230u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003678_cont_BFC13234(CPUState* cpu) { - cpu->pc = 0xBFC13234u; - SCPH1001_func_00003678(cpu); -} - -void SCPH1001_func_00003744_cont_BFC13254(CPUState* cpu) { - cpu->pc = 0xBFC13254u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC1325C(CPUState* cpu) { - cpu->pc = 0xBFC1325Cu; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC13270(CPUState* cpu) { - cpu->pc = 0xBFC13270u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC13284(CPUState* cpu) { - cpu->pc = 0xBFC13284u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC13294(CPUState* cpu) { - cpu->pc = 0xBFC13294u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC132AC(CPUState* cpu) { - cpu->pc = 0xBFC132ACu; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC132DC(CPUState* cpu) { - cpu->pc = 0xBFC132DCu; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC132E8(CPUState* cpu) { - cpu->pc = 0xBFC132E8u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC132FC(CPUState* cpu) { - cpu->pc = 0xBFC132FCu; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003744_cont_BFC13300(CPUState* cpu) { - cpu->pc = 0xBFC13300u; - SCPH1001_func_00003744(cpu); -} - -void SCPH1001_func_00003810_cont_BFC13320(CPUState* cpu) { - cpu->pc = 0xBFC13320u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC13328(CPUState* cpu) { - cpu->pc = 0xBFC13328u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC1333C(CPUState* cpu) { - cpu->pc = 0xBFC1333Cu; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC13350(CPUState* cpu) { - cpu->pc = 0xBFC13350u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC13360(CPUState* cpu) { - cpu->pc = 0xBFC13360u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC13374(CPUState* cpu) { - cpu->pc = 0xBFC13374u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC133A4(CPUState* cpu) { - cpu->pc = 0xBFC133A4u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC133B0(CPUState* cpu) { - cpu->pc = 0xBFC133B0u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC133C4(CPUState* cpu) { - cpu->pc = 0xBFC133C4u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_00003810_cont_BFC133C8(CPUState* cpu) { - cpu->pc = 0xBFC133C8u; - SCPH1001_func_00003810(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC133E8(CPUState* cpu) { - cpu->pc = 0xBFC133E8u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC133F0(CPUState* cpu) { - cpu->pc = 0xBFC133F0u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13404(CPUState* cpu) { - cpu->pc = 0xBFC13404u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13418(CPUState* cpu) { - cpu->pc = 0xBFC13418u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13428(CPUState* cpu) { - cpu->pc = 0xBFC13428u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13440(CPUState* cpu) { - cpu->pc = 0xBFC13440u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13444(CPUState* cpu) { - cpu->pc = 0xBFC13444u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13470(CPUState* cpu) { - cpu->pc = 0xBFC13470u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC1347C(CPUState* cpu) { - cpu->pc = 0xBFC1347Cu; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13490(CPUState* cpu) { - cpu->pc = 0xBFC13490u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000038D8_cont_BFC13494(CPUState* cpu) { - cpu->pc = 0xBFC13494u; - SCPH1001_func_000038D8(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC134C0(CPUState* cpu) { - cpu->pc = 0xBFC134C0u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC134C8(CPUState* cpu) { - cpu->pc = 0xBFC134C8u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC134D8(CPUState* cpu) { - cpu->pc = 0xBFC134D8u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC134EC(CPUState* cpu) { - cpu->pc = 0xBFC134ECu; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC134FC(CPUState* cpu) { - cpu->pc = 0xBFC134FCu; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC13508(CPUState* cpu) { - cpu->pc = 0xBFC13508u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC13528(CPUState* cpu) { - cpu->pc = 0xBFC13528u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_000039A4_cont_BFC13560(CPUState* cpu) { - cpu->pc = 0xBFC13560u; - SCPH1001_func_000039A4(cpu); -} - -void SCPH1001_func_00003A70_cont_BFC1359C(CPUState* cpu) { - cpu->pc = 0xBFC1359Cu; - SCPH1001_func_00003A70(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC135C4(CPUState* cpu) { - cpu->pc = 0xBFC135C4u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC135CC(CPUState* cpu) { - cpu->pc = 0xBFC135CCu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC135E0(CPUState* cpu) { - cpu->pc = 0xBFC135E0u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC135E8(CPUState* cpu) { - cpu->pc = 0xBFC135E8u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC135F0(CPUState* cpu) { - cpu->pc = 0xBFC135F0u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13608(CPUState* cpu) { - cpu->pc = 0xBFC13608u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1361C(CPUState* cpu) { - cpu->pc = 0xBFC1361Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1362C(CPUState* cpu) { - cpu->pc = 0xBFC1362Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1363C(CPUState* cpu) { - cpu->pc = 0xBFC1363Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13654(CPUState* cpu) { - cpu->pc = 0xBFC13654u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1366C(CPUState* cpu) { - cpu->pc = 0xBFC1366Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1367C(CPUState* cpu) { - cpu->pc = 0xBFC1367Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13688(CPUState* cpu) { - cpu->pc = 0xBFC13688u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13698(CPUState* cpu) { - cpu->pc = 0xBFC13698u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1369C(CPUState* cpu) { - cpu->pc = 0xBFC1369Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC136E0(CPUState* cpu) { - cpu->pc = 0xBFC136E0u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC136F4(CPUState* cpu) { - cpu->pc = 0xBFC136F4u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13708(CPUState* cpu) { - cpu->pc = 0xBFC13708u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC13710(CPUState* cpu) { - cpu->pc = 0xBFC13710u; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003AAC_cont_BFC1371C(CPUState* cpu) { - cpu->pc = 0xBFC1371Cu; - SCPH1001_func_00003AAC(cpu); -} - -void SCPH1001_func_00003C6C_cont_BFC1377C(CPUState* cpu) { - cpu->pc = 0xBFC1377Cu; - SCPH1001_func_00003C6C(cpu); -} - -void SCPH1001_func_00003C6C_cont_BFC13790(CPUState* cpu) { - cpu->pc = 0xBFC13790u; - SCPH1001_func_00003C6C(cpu); -} - -void SCPH1001_func_00003C6C_cont_BFC1379C(CPUState* cpu) { - cpu->pc = 0xBFC1379Cu; - SCPH1001_func_00003C6C(cpu); -} - -void SCPH1001_func_00003CBC_cont_BFC137CC(CPUState* cpu) { - cpu->pc = 0xBFC137CCu; - SCPH1001_func_00003CBC(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC1382C(CPUState* cpu) { - cpu->pc = 0xBFC1382Cu; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC1383C(CPUState* cpu) { - cpu->pc = 0xBFC1383Cu; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC13844(CPUState* cpu) { - cpu->pc = 0xBFC13844u; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC1384C(CPUState* cpu) { - cpu->pc = 0xBFC1384Cu; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC1385C(CPUState* cpu) { - cpu->pc = 0xBFC1385Cu; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC13868(CPUState* cpu) { - cpu->pc = 0xBFC13868u; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC13890(CPUState* cpu) { - cpu->pc = 0xBFC13890u; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003CE0_cont_BFC13894(CPUState* cpu) { - cpu->pc = 0xBFC13894u; - SCPH1001_func_00003CE0(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC138EC(CPUState* cpu) { - cpu->pc = 0xBFC138ECu; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC138F8(CPUState* cpu) { - cpu->pc = 0xBFC138F8u; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC13908(CPUState* cpu) { - cpu->pc = 0xBFC13908u; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC13914(CPUState* cpu) { - cpu->pc = 0xBFC13914u; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC13934(CPUState* cpu) { - cpu->pc = 0xBFC13934u; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC13944(CPUState* cpu) { - cpu->pc = 0xBFC13944u; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003DAC_cont_BFC1394C(CPUState* cpu) { - cpu->pc = 0xBFC1394Cu; - SCPH1001_func_00003DAC(cpu); -} - -void SCPH1001_func_00003E80_cont_BFC139A8(CPUState* cpu) { - cpu->pc = 0xBFC139A8u; - SCPH1001_func_00003E80(cpu); -} - -void SCPH1001_func_00003E80_cont_BFC139BC(CPUState* cpu) { - cpu->pc = 0xBFC139BCu; - SCPH1001_func_00003E80(cpu); -} - -void SCPH1001_func_00003E80_cont_BFC139DC(CPUState* cpu) { - cpu->pc = 0xBFC139DCu; - SCPH1001_func_00003E80(cpu); -} - -void SCPH1001_func_00003E80_cont_BFC139EC(CPUState* cpu) { - cpu->pc = 0xBFC139ECu; - SCPH1001_func_00003E80(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A1C(CPUState* cpu) { - cpu->pc = 0xBFC13A1Cu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A30(CPUState* cpu) { - cpu->pc = 0xBFC13A30u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A40(CPUState* cpu) { - cpu->pc = 0xBFC13A40u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A4C(CPUState* cpu) { - cpu->pc = 0xBFC13A4Cu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A5C(CPUState* cpu) { - cpu->pc = 0xBFC13A5Cu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A68(CPUState* cpu) { - cpu->pc = 0xBFC13A68u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A6C(CPUState* cpu) { - cpu->pc = 0xBFC13A6Cu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A78(CPUState* cpu) { - cpu->pc = 0xBFC13A78u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13A8C(CPUState* cpu) { - cpu->pc = 0xBFC13A8Cu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AA0(CPUState* cpu) { - cpu->pc = 0xBFC13AA0u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AA4(CPUState* cpu) { - cpu->pc = 0xBFC13AA4u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AAC(CPUState* cpu) { - cpu->pc = 0xBFC13AACu; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AC0(CPUState* cpu) { - cpu->pc = 0xBFC13AC0u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AD4(CPUState* cpu) { - cpu->pc = 0xBFC13AD4u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AE0(CPUState* cpu) { - cpu->pc = 0xBFC13AE0u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003F04_cont_BFC13AE4(CPUState* cpu) { - cpu->pc = 0xBFC13AE4u; - SCPH1001_func_00003F04(cpu); -} - -void SCPH1001_func_00003FF0_cont_BFC13B08(CPUState* cpu) { - cpu->pc = 0xBFC13B08u; - SCPH1001_func_00003FF0(cpu); -} - -void SCPH1001_func_00004024_cont_BFC13B38(CPUState* cpu) { - cpu->pc = 0xBFC13B38u; - SCPH1001_func_00004024(cpu); -} - -void SCPH1001_func_00004024_cont_BFC13B40(CPUState* cpu) { - cpu->pc = 0xBFC13B40u; - SCPH1001_func_00004024(cpu); -} - -void SCPH1001_func_00004024_cont_BFC13B48(CPUState* cpu) { - cpu->pc = 0xBFC13B48u; - SCPH1001_func_00004024(cpu); -} - -void SCPH1001_func_00004024_cont_BFC13B4C(CPUState* cpu) { - cpu->pc = 0xBFC13B4Cu; - SCPH1001_func_00004024(cpu); -} - -void SCPH1001_func_00004024_cont_BFC13B5C(CPUState* cpu) { - cpu->pc = 0xBFC13B5Cu; - SCPH1001_func_00004024(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13B84(CPUState* cpu) { - cpu->pc = 0xBFC13B84u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13B90(CPUState* cpu) { - cpu->pc = 0xBFC13B90u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13B98(CPUState* cpu) { - cpu->pc = 0xBFC13B98u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BA4(CPUState* cpu) { - cpu->pc = 0xBFC13BA4u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BAC(CPUState* cpu) { - cpu->pc = 0xBFC13BACu; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BC4(CPUState* cpu) { - cpu->pc = 0xBFC13BC4u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BCC(CPUState* cpu) { - cpu->pc = 0xBFC13BCCu; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BD0(CPUState* cpu) { - cpu->pc = 0xBFC13BD0u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BD8(CPUState* cpu) { - cpu->pc = 0xBFC13BD8u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BE0(CPUState* cpu) { - cpu->pc = 0xBFC13BE0u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13BE4(CPUState* cpu) { - cpu->pc = 0xBFC13BE4u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13C00(CPUState* cpu) { - cpu->pc = 0xBFC13C00u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13C14(CPUState* cpu) { - cpu->pc = 0xBFC13C14u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13C18(CPUState* cpu) { - cpu->pc = 0xBFC13C18u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13C24(CPUState* cpu) { - cpu->pc = 0xBFC13C24u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_0000406C_cont_BFC13C28(CPUState* cpu) { - cpu->pc = 0xBFC13C28u; - SCPH1001_func_0000406C(cpu); -} - -void SCPH1001_func_00004134_cont_BFC13C54(CPUState* cpu) { - cpu->pc = 0xBFC13C54u; - SCPH1001_func_00004134(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CB0(CPUState* cpu) { - cpu->pc = 0xBFC13CB0u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CB8(CPUState* cpu) { - cpu->pc = 0xBFC13CB8u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CCC(CPUState* cpu) { - cpu->pc = 0xBFC13CCCu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CD4(CPUState* cpu) { - cpu->pc = 0xBFC13CD4u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CDC(CPUState* cpu) { - cpu->pc = 0xBFC13CDCu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CE4(CPUState* cpu) { - cpu->pc = 0xBFC13CE4u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CEC(CPUState* cpu) { - cpu->pc = 0xBFC13CECu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CF4(CPUState* cpu) { - cpu->pc = 0xBFC13CF4u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13CFC(CPUState* cpu) { - cpu->pc = 0xBFC13CFCu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D04(CPUState* cpu) { - cpu->pc = 0xBFC13D04u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D14(CPUState* cpu) { - cpu->pc = 0xBFC13D14u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D20(CPUState* cpu) { - cpu->pc = 0xBFC13D20u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D28(CPUState* cpu) { - cpu->pc = 0xBFC13D28u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D30(CPUState* cpu) { - cpu->pc = 0xBFC13D30u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D38(CPUState* cpu) { - cpu->pc = 0xBFC13D38u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D40(CPUState* cpu) { - cpu->pc = 0xBFC13D40u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D4C(CPUState* cpu) { - cpu->pc = 0xBFC13D4Cu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D50(CPUState* cpu) { - cpu->pc = 0xBFC13D50u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D58(CPUState* cpu) { - cpu->pc = 0xBFC13D58u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D64(CPUState* cpu) { - cpu->pc = 0xBFC13D64u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D6C(CPUState* cpu) { - cpu->pc = 0xBFC13D6Cu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D74(CPUState* cpu) { - cpu->pc = 0xBFC13D74u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D7C(CPUState* cpu) { - cpu->pc = 0xBFC13D7Cu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13D84(CPUState* cpu) { - cpu->pc = 0xBFC13D84u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DA0(CPUState* cpu) { - cpu->pc = 0xBFC13DA0u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DB0(CPUState* cpu) { - cpu->pc = 0xBFC13DB0u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DBC(CPUState* cpu) { - cpu->pc = 0xBFC13DBCu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DC4(CPUState* cpu) { - cpu->pc = 0xBFC13DC4u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DCC(CPUState* cpu) { - cpu->pc = 0xBFC13DCCu; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004164_cont_BFC13DD4(CPUState* cpu) { - cpu->pc = 0xBFC13DD4u; - SCPH1001_func_00004164(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E1C(CPUState* cpu) { - cpu->pc = 0xBFC13E1Cu; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E24(CPUState* cpu) { - cpu->pc = 0xBFC13E24u; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E34(CPUState* cpu) { - cpu->pc = 0xBFC13E34u; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E3C(CPUState* cpu) { - cpu->pc = 0xBFC13E3Cu; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E4C(CPUState* cpu) { - cpu->pc = 0xBFC13E4Cu; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004304_cont_BFC13E50(CPUState* cpu) { - cpu->pc = 0xBFC13E50u; - SCPH1001_func_00004304(cpu); -} - -void SCPH1001_func_00004360_cont_BFC13E78(CPUState* cpu) { - cpu->pc = 0xBFC13E78u; - SCPH1001_func_00004360(cpu); -} - -void SCPH1001_func_000043E8_cont_BFC13F20(CPUState* cpu) { - cpu->pc = 0xBFC13F20u; - SCPH1001_func_000043E8(cpu); -} - -void SCPH1001_func_000043E8_cont_BFC13F30(CPUState* cpu) { - cpu->pc = 0xBFC13F30u; - SCPH1001_func_000043E8(cpu); -} - -void SCPH1001_func_000043E8_cont_BFC13F40(CPUState* cpu) { - cpu->pc = 0xBFC13F40u; - SCPH1001_func_000043E8(cpu); -} - -void SCPH1001_func_0000445C_cont_BFC13F78(CPUState* cpu) { - cpu->pc = 0xBFC13F78u; - SCPH1001_func_0000445C(cpu); -} - -void SCPH1001_func_0000445C_cont_BFC13F90(CPUState* cpu) { - cpu->pc = 0xBFC13F90u; - SCPH1001_func_0000445C(cpu); -} - -void SCPH1001_func_00004498_cont_BFC13FE0(CPUState* cpu) { - cpu->pc = 0xBFC13FE0u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC13FE8(CPUState* cpu) { - cpu->pc = 0xBFC13FE8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC13FEC(CPUState* cpu) { - cpu->pc = 0xBFC13FECu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14024(CPUState* cpu) { - cpu->pc = 0xBFC14024u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1402C(CPUState* cpu) { - cpu->pc = 0xBFC1402Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14030(CPUState* cpu) { - cpu->pc = 0xBFC14030u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14048(CPUState* cpu) { - cpu->pc = 0xBFC14048u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1406C(CPUState* cpu) { - cpu->pc = 0xBFC1406Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14080(CPUState* cpu) { - cpu->pc = 0xBFC14080u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14084(CPUState* cpu) { - cpu->pc = 0xBFC14084u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14090(CPUState* cpu) { - cpu->pc = 0xBFC14090u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC140C4(CPUState* cpu) { - cpu->pc = 0xBFC140C4u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC140D8(CPUState* cpu) { - cpu->pc = 0xBFC140D8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC140E4(CPUState* cpu) { - cpu->pc = 0xBFC140E4u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC140F8(CPUState* cpu) { - cpu->pc = 0xBFC140F8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC140FC(CPUState* cpu) { - cpu->pc = 0xBFC140FCu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14114(CPUState* cpu) { - cpu->pc = 0xBFC14114u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14128(CPUState* cpu) { - cpu->pc = 0xBFC14128u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1412C(CPUState* cpu) { - cpu->pc = 0xBFC1412Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14138(CPUState* cpu) { - cpu->pc = 0xBFC14138u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14164(CPUState* cpu) { - cpu->pc = 0xBFC14164u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14178(CPUState* cpu) { - cpu->pc = 0xBFC14178u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141A4(CPUState* cpu) { - cpu->pc = 0xBFC141A4u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141A8(CPUState* cpu) { - cpu->pc = 0xBFC141A8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141BC(CPUState* cpu) { - cpu->pc = 0xBFC141BCu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141C0(CPUState* cpu) { - cpu->pc = 0xBFC141C0u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141D8(CPUState* cpu) { - cpu->pc = 0xBFC141D8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141EC(CPUState* cpu) { - cpu->pc = 0xBFC141ECu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC141FC(CPUState* cpu) { - cpu->pc = 0xBFC141FCu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14228(CPUState* cpu) { - cpu->pc = 0xBFC14228u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1423C(CPUState* cpu) { - cpu->pc = 0xBFC1423Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14254(CPUState* cpu) { - cpu->pc = 0xBFC14254u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1425C(CPUState* cpu) { - cpu->pc = 0xBFC1425Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14270(CPUState* cpu) { - cpu->pc = 0xBFC14270u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14274(CPUState* cpu) { - cpu->pc = 0xBFC14274u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1428C(CPUState* cpu) { - cpu->pc = 0xBFC1428Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC142A0(CPUState* cpu) { - cpu->pc = 0xBFC142A0u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC142B4(CPUState* cpu) { - cpu->pc = 0xBFC142B4u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC142B8(CPUState* cpu) { - cpu->pc = 0xBFC142B8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC142C8(CPUState* cpu) { - cpu->pc = 0xBFC142C8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC142F4(CPUState* cpu) { - cpu->pc = 0xBFC142F4u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14308(CPUState* cpu) { - cpu->pc = 0xBFC14308u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1431C(CPUState* cpu) { - cpu->pc = 0xBFC1431Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14330(CPUState* cpu) { - cpu->pc = 0xBFC14330u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1433C(CPUState* cpu) { - cpu->pc = 0xBFC1433Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14350(CPUState* cpu) { - cpu->pc = 0xBFC14350u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14378(CPUState* cpu) { - cpu->pc = 0xBFC14378u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC1437C(CPUState* cpu) { - cpu->pc = 0xBFC1437Cu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14394(CPUState* cpu) { - cpu->pc = 0xBFC14394u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC143A8(CPUState* cpu) { - cpu->pc = 0xBFC143A8u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC143BC(CPUState* cpu) { - cpu->pc = 0xBFC143BCu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC143C0(CPUState* cpu) { - cpu->pc = 0xBFC143C0u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC143D0(CPUState* cpu) { - cpu->pc = 0xBFC143D0u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC143FC(CPUState* cpu) { - cpu->pc = 0xBFC143FCu; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14410(CPUState* cpu) { - cpu->pc = 0xBFC14410u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14434(CPUState* cpu) { - cpu->pc = 0xBFC14434u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14438(CPUState* cpu) { - cpu->pc = 0xBFC14438u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14450(CPUState* cpu) { - cpu->pc = 0xBFC14450u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14454(CPUState* cpu) { - cpu->pc = 0xBFC14454u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14490(CPUState* cpu) { - cpu->pc = 0xBFC14490u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_00004498_cont_BFC14498(CPUState* cpu) { - cpu->pc = 0xBFC14498u; - SCPH1001_func_00004498(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC144D0(CPUState* cpu) { - cpu->pc = 0xBFC144D0u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC144D8(CPUState* cpu) { - cpu->pc = 0xBFC144D8u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC144E0(CPUState* cpu) { - cpu->pc = 0xBFC144E0u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC144F4(CPUState* cpu) { - cpu->pc = 0xBFC144F4u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC144FC(CPUState* cpu) { - cpu->pc = 0xBFC144FCu; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC14510(CPUState* cpu) { - cpu->pc = 0xBFC14510u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC14520(CPUState* cpu) { - cpu->pc = 0xBFC14520u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC14534(CPUState* cpu) { - cpu->pc = 0xBFC14534u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC1453C(CPUState* cpu) { - cpu->pc = 0xBFC1453Cu; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_000049BC_cont_BFC14540(CPUState* cpu) { - cpu->pc = 0xBFC14540u; - SCPH1001_func_000049BC(cpu); -} - -void SCPH1001_func_00004A4C_cont_BFC1456C(CPUState* cpu) { - cpu->pc = 0xBFC1456Cu; - SCPH1001_func_00004A4C(cpu); -} - -void SCPH1001_func_00004A4C_cont_BFC14580(CPUState* cpu) { - cpu->pc = 0xBFC14580u; - SCPH1001_func_00004A4C(cpu); -} - -void SCPH1001_func_00004A88_cont_BFC1458C(CPUState* cpu) { - cpu->pc = 0xBFC1458Cu; - SCPH1001_func_00004A88(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC145F4(CPUState* cpu) { - cpu->pc = 0xBFC145F4u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14600(CPUState* cpu) { - cpu->pc = 0xBFC14600u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14614(CPUState* cpu) { - cpu->pc = 0xBFC14614u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14640(CPUState* cpu) { - cpu->pc = 0xBFC14640u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14650(CPUState* cpu) { - cpu->pc = 0xBFC14650u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14658(CPUState* cpu) { - cpu->pc = 0xBFC14658u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004AC8_cont_BFC14660(CPUState* cpu) { - cpu->pc = 0xBFC14660u; - SCPH1001_func_00004AC8(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146A0(CPUState* cpu) { - cpu->pc = 0xBFC146A0u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146A8(CPUState* cpu) { - cpu->pc = 0xBFC146A8u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146B8(CPUState* cpu) { - cpu->pc = 0xBFC146B8u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146C8(CPUState* cpu) { - cpu->pc = 0xBFC146C8u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146EC(CPUState* cpu) { - cpu->pc = 0xBFC146ECu; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC146F8(CPUState* cpu) { - cpu->pc = 0xBFC146F8u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004B90_cont_BFC14700(CPUState* cpu) { - cpu->pc = 0xBFC14700u; - SCPH1001_func_00004B90(cpu); -} - -void SCPH1001_func_00004C10_cont_BFC14720(CPUState* cpu) { - cpu->pc = 0xBFC14720u; - SCPH1001_func_00004C10(cpu); -} - -void SCPH1001_func_00004C10_cont_BFC1472C(CPUState* cpu) { - cpu->pc = 0xBFC1472Cu; - SCPH1001_func_00004C10(cpu); -} - -void SCPH1001_func_00004C10_cont_BFC1473C(CPUState* cpu) { - cpu->pc = 0xBFC1473Cu; - SCPH1001_func_00004C10(cpu); -} - -void SCPH1001_func_00004C10_cont_BFC14744(CPUState* cpu) { - cpu->pc = 0xBFC14744u; - SCPH1001_func_00004C10(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC14780(CPUState* cpu) { - cpu->pc = 0xBFC14780u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC14788(CPUState* cpu) { - cpu->pc = 0xBFC14788u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC14798(CPUState* cpu) { - cpu->pc = 0xBFC14798u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC147A8(CPUState* cpu) { - cpu->pc = 0xBFC147A8u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC147C8(CPUState* cpu) { - cpu->pc = 0xBFC147C8u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC147D4(CPUState* cpu) { - cpu->pc = 0xBFC147D4u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004C70_cont_BFC147E4(CPUState* cpu) { - cpu->pc = 0xBFC147E4u; - SCPH1001_func_00004C70(cpu); -} - -void SCPH1001_func_00004CF4_cont_BFC14804(CPUState* cpu) { - cpu->pc = 0xBFC14804u; - SCPH1001_func_00004CF4(cpu); -} - -void SCPH1001_func_00004CF4_cont_BFC14810(CPUState* cpu) { - cpu->pc = 0xBFC14810u; - SCPH1001_func_00004CF4(cpu); -} - -void SCPH1001_func_00004CF4_cont_BFC14820(CPUState* cpu) { - cpu->pc = 0xBFC14820u; - SCPH1001_func_00004CF4(cpu); -} - -void SCPH1001_func_00004CF4_cont_BFC1482C(CPUState* cpu) { - cpu->pc = 0xBFC1482Cu; - SCPH1001_func_00004CF4(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14880(CPUState* cpu) { - cpu->pc = 0xBFC14880u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14888(CPUState* cpu) { - cpu->pc = 0xBFC14888u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC1488C(CPUState* cpu) { - cpu->pc = 0xBFC1488Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC148AC(CPUState* cpu) { - cpu->pc = 0xBFC148ACu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC148DC(CPUState* cpu) { - cpu->pc = 0xBFC148DCu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC148E4(CPUState* cpu) { - cpu->pc = 0xBFC148E4u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC148F0(CPUState* cpu) { - cpu->pc = 0xBFC148F0u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC148F8(CPUState* cpu) { - cpu->pc = 0xBFC148F8u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14900(CPUState* cpu) { - cpu->pc = 0xBFC14900u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14908(CPUState* cpu) { - cpu->pc = 0xBFC14908u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14910(CPUState* cpu) { - cpu->pc = 0xBFC14910u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14934(CPUState* cpu) { - cpu->pc = 0xBFC14934u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC1495C(CPUState* cpu) { - cpu->pc = 0xBFC1495Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC1498C(CPUState* cpu) { - cpu->pc = 0xBFC1498Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC1499C(CPUState* cpu) { - cpu->pc = 0xBFC1499Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC149BC(CPUState* cpu) { - cpu->pc = 0xBFC149BCu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC149E0(CPUState* cpu) { - cpu->pc = 0xBFC149E0u; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14A0C(CPUState* cpu) { - cpu->pc = 0xBFC14A0Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004D6C_cont_BFC14A3C(CPUState* cpu) { - cpu->pc = 0xBFC14A3Cu; - SCPH1001_func_00004D6C(cpu); -} - -void SCPH1001_func_00004F54_cont_BFC14A6C(CPUState* cpu) { - cpu->pc = 0xBFC14A6Cu; - SCPH1001_func_00004F54(cpu); -} - -void SCPH1001_func_00004F54_cont_BFC14A7C(CPUState* cpu) { - cpu->pc = 0xBFC14A7Cu; - SCPH1001_func_00004F54(cpu); -} - -void SCPH1001_func_00004F54_cont_BFC14A80(CPUState* cpu) { - cpu->pc = 0xBFC14A80u; - SCPH1001_func_00004F54(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AB4(CPUState* cpu) { - cpu->pc = 0xBFC14AB4u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AC8(CPUState* cpu) { - cpu->pc = 0xBFC14AC8u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AD0(CPUState* cpu) { - cpu->pc = 0xBFC14AD0u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AD8(CPUState* cpu) { - cpu->pc = 0xBFC14AD8u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AE4(CPUState* cpu) { - cpu->pc = 0xBFC14AE4u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AEC(CPUState* cpu) { - cpu->pc = 0xBFC14AECu; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00004F90_cont_BFC14AF0(CPUState* cpu) { - cpu->pc = 0xBFC14AF0u; - SCPH1001_func_00004F90(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B18(CPUState* cpu) { - cpu->pc = 0xBFC14B18u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B28(CPUState* cpu) { - cpu->pc = 0xBFC14B28u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B38(CPUState* cpu) { - cpu->pc = 0xBFC14B38u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B48(CPUState* cpu) { - cpu->pc = 0xBFC14B48u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B58(CPUState* cpu) { - cpu->pc = 0xBFC14B58u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14B6C(CPUState* cpu) { - cpu->pc = 0xBFC14B6Cu; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14BE0(CPUState* cpu) { - cpu->pc = 0xBFC14BE0u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14BF0(CPUState* cpu) { - cpu->pc = 0xBFC14BF0u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14C00(CPUState* cpu) { - cpu->pc = 0xBFC14C00u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14C28(CPUState* cpu) { - cpu->pc = 0xBFC14C28u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14C68(CPUState* cpu) { - cpu->pc = 0xBFC14C68u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14C70(CPUState* cpu) { - cpu->pc = 0xBFC14C70u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14CB0(CPUState* cpu) { - cpu->pc = 0xBFC14CB0u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14CC0(CPUState* cpu) { - cpu->pc = 0xBFC14CC0u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14CD0(CPUState* cpu) { - cpu->pc = 0xBFC14CD0u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_00005000_cont_BFC14CE4(CPUState* cpu) { - cpu->pc = 0xBFC14CE4u; - SCPH1001_func_00005000(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14D28(CPUState* cpu) { - cpu->pc = 0xBFC14D28u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14D44(CPUState* cpu) { - cpu->pc = 0xBFC14D44u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14D4C(CPUState* cpu) { - cpu->pc = 0xBFC14D4Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14D54(CPUState* cpu) { - cpu->pc = 0xBFC14D54u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14D58(CPUState* cpu) { - cpu->pc = 0xBFC14D58u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14DC4(CPUState* cpu) { - cpu->pc = 0xBFC14DC4u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14DF8(CPUState* cpu) { - cpu->pc = 0xBFC14DF8u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14E40(CPUState* cpu) { - cpu->pc = 0xBFC14E40u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14E4C(CPUState* cpu) { - cpu->pc = 0xBFC14E4Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14E74(CPUState* cpu) { - cpu->pc = 0xBFC14E74u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14E84(CPUState* cpu) { - cpu->pc = 0xBFC14E84u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14E98(CPUState* cpu) { - cpu->pc = 0xBFC14E98u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14ECC(CPUState* cpu) { - cpu->pc = 0xBFC14ECCu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14ED4(CPUState* cpu) { - cpu->pc = 0xBFC14ED4u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14F10(CPUState* cpu) { - cpu->pc = 0xBFC14F10u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14F18(CPUState* cpu) { - cpu->pc = 0xBFC14F18u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14F2C(CPUState* cpu) { - cpu->pc = 0xBFC14F2Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14F80(CPUState* cpu) { - cpu->pc = 0xBFC14F80u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14F88(CPUState* cpu) { - cpu->pc = 0xBFC14F88u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14FCC(CPUState* cpu) { - cpu->pc = 0xBFC14FCCu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC14FFC(CPUState* cpu) { - cpu->pc = 0xBFC14FFCu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15030(CPUState* cpu) { - cpu->pc = 0xBFC15030u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15038(CPUState* cpu) { - cpu->pc = 0xBFC15038u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1506C(CPUState* cpu) { - cpu->pc = 0xBFC1506Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15074(CPUState* cpu) { - cpu->pc = 0xBFC15074u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15088(CPUState* cpu) { - cpu->pc = 0xBFC15088u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1509C(CPUState* cpu) { - cpu->pc = 0xBFC1509Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC150B0(CPUState* cpu) { - cpu->pc = 0xBFC150B0u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC150D0(CPUState* cpu) { - cpu->pc = 0xBFC150D0u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15104(CPUState* cpu) { - cpu->pc = 0xBFC15104u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15118(CPUState* cpu) { - cpu->pc = 0xBFC15118u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15128(CPUState* cpu) { - cpu->pc = 0xBFC15128u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1512C(CPUState* cpu) { - cpu->pc = 0xBFC1512Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15134(CPUState* cpu) { - cpu->pc = 0xBFC15134u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1513C(CPUState* cpu) { - cpu->pc = 0xBFC1513Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15144(CPUState* cpu) { - cpu->pc = 0xBFC15144u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1514C(CPUState* cpu) { - cpu->pc = 0xBFC1514Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15154(CPUState* cpu) { - cpu->pc = 0xBFC15154u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1515C(CPUState* cpu) { - cpu->pc = 0xBFC1515Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15164(CPUState* cpu) { - cpu->pc = 0xBFC15164u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC1516C(CPUState* cpu) { - cpu->pc = 0xBFC1516Cu; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15174(CPUState* cpu) { - cpu->pc = 0xBFC15174u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_000051F4_cont_BFC15178(CPUState* cpu) { - cpu->pc = 0xBFC15178u; - SCPH1001_func_000051F4(cpu); -} - -void SCPH1001_func_00005688_cont_BFC151CC(CPUState* cpu) { - cpu->pc = 0xBFC151CCu; - SCPH1001_func_00005688(cpu); -} - -void SCPH1001_func_000056E8_cont_BFC151F0(CPUState* cpu) { - cpu->pc = 0xBFC151F0u; - SCPH1001_func_000056E8(cpu); -} - -void SCPH1001_func_000056E8_cont_BFC151F8(CPUState* cpu) { - cpu->pc = 0xBFC151F8u; - SCPH1001_func_000056E8(cpu); -} - -void SCPH1001_func_000056E8_cont_BFC151FC(CPUState* cpu) { - cpu->pc = 0xBFC151FCu; - SCPH1001_func_000056E8(cpu); -} - -void SCPH1001_func_0000579C_cont_BFC152DC(CPUState* cpu) { - cpu->pc = 0xBFC152DCu; - SCPH1001_func_0000579C(cpu); -} - -void SCPH1001_func_0000579C_cont_BFC152E8(CPUState* cpu) { - cpu->pc = 0xBFC152E8u; - SCPH1001_func_0000579C(cpu); -} - -void SCPH1001_func_0000579C_cont_BFC15310(CPUState* cpu) { - cpu->pc = 0xBFC15310u; - SCPH1001_func_0000579C(cpu); -} - -void SCPH1001_func_0000579C_cont_BFC15320(CPUState* cpu) { - cpu->pc = 0xBFC15320u; - SCPH1001_func_0000579C(cpu); -} - -void SCPH1001_func_00005834_cont_BFC15368(CPUState* cpu) { - cpu->pc = 0xBFC15368u; - SCPH1001_func_00005834(cpu); -} - -void SCPH1001_func_00005870_cont_BFC153AC(CPUState* cpu) { - cpu->pc = 0xBFC153ACu; - SCPH1001_func_00005870(cpu); -} - -void SCPH1001_func_00005918_cont_BFC1544C(CPUState* cpu) { - cpu->pc = 0xBFC1544Cu; - SCPH1001_func_00005918(cpu); -} - -void SCPH1001_func_00005954_cont_BFC15488(CPUState* cpu) { - cpu->pc = 0xBFC15488u; - SCPH1001_func_00005954(cpu); -} - -void SCPH1001_func_00005990_cont_BFC154C8(CPUState* cpu) { - cpu->pc = 0xBFC154C8u; - SCPH1001_func_00005990(cpu); -} - -void SCPH1001_func_000059CC_cont_BFC154D0(CPUState* cpu) { - cpu->pc = 0xBFC154D0u; - SCPH1001_func_000059CC(cpu); -} - -void SCPH1001_func_00005A08_cont_BFC15540(CPUState* cpu) { - cpu->pc = 0xBFC15540u; - SCPH1001_func_00005A08(cpu); -} - -void SCPH1001_func_00005A44_cont_BFC15548(CPUState* cpu) { - cpu->pc = 0xBFC15548u; - SCPH1001_func_00005A44(cpu); -} - -void SCPH1001_func_00005A44_cont_BFC15550(CPUState* cpu) { - cpu->pc = 0xBFC15550u; - SCPH1001_func_00005A44(cpu); -} - -void SCPH1001_func_00005AF8_cont_BFC15600(CPUState* cpu) { - cpu->pc = 0xBFC15600u; - SCPH1001_func_00005AF8(cpu); -} - -void SCPH1001_func_00005AF8_cont_BFC15614(CPUState* cpu) { - cpu->pc = 0xBFC15614u; - SCPH1001_func_00005AF8(cpu); -} - -void SCPH1001_func_00005AF8_cont_BFC15628(CPUState* cpu) { - cpu->pc = 0xBFC15628u; - SCPH1001_func_00005AF8(cpu); -} - -void SCPH1001_func_00005B34_cont_BFC15638(CPUState* cpu) { - cpu->pc = 0xBFC15638u; - SCPH1001_func_00005B34(cpu); -} - -void SCPH1001_func_00005B34_cont_BFC15640(CPUState* cpu) { - cpu->pc = 0xBFC15640u; - SCPH1001_func_00005B34(cpu); -} - -void SCPH1001_func_00005B34_cont_BFC15648(CPUState* cpu) { - cpu->pc = 0xBFC15648u; - SCPH1001_func_00005B34(cpu); -} - -void SCPH1001_func_00005B64_cont_BFC15688(CPUState* cpu) { - cpu->pc = 0xBFC15688u; - SCPH1001_func_00005B64(cpu); -} - -void SCPH1001_func_00005BA4_cont_BFC156AC(CPUState* cpu) { - cpu->pc = 0xBFC156ACu; - SCPH1001_func_00005BA4(cpu); -} - -void SCPH1001_func_00005BA4_cont_BFC156B4(CPUState* cpu) { - cpu->pc = 0xBFC156B4u; - SCPH1001_func_00005BA4(cpu); -} - -void SCPH1001_func_00005BA4_cont_BFC156B8(CPUState* cpu) { - cpu->pc = 0xBFC156B8u; - SCPH1001_func_00005BA4(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC15798(CPUState* cpu) { - cpu->pc = 0xBFC15798u; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC157A4(CPUState* cpu) { - cpu->pc = 0xBFC157A4u; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC157CC(CPUState* cpu) { - cpu->pc = 0xBFC157CCu; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC157DC(CPUState* cpu) { - cpu->pc = 0xBFC157DCu; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC157F0(CPUState* cpu) { - cpu->pc = 0xBFC157F0u; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC157FC(CPUState* cpu) { - cpu->pc = 0xBFC157FCu; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC15824(CPUState* cpu) { - cpu->pc = 0xBFC15824u; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005C58_cont_BFC15834(CPUState* cpu) { - cpu->pc = 0xBFC15834u; - SCPH1001_func_00005C58(cpu); -} - -void SCPH1001_func_00005D48_cont_BFC1587C(CPUState* cpu) { - cpu->pc = 0xBFC1587Cu; - SCPH1001_func_00005D48(cpu); -} - -void SCPH1001_func_00005D48_cont_BFC15884(CPUState* cpu) { - cpu->pc = 0xBFC15884u; - SCPH1001_func_00005D48(cpu); -} - -void SCPH1001_func_00005D48_cont_BFC1588C(CPUState* cpu) { - cpu->pc = 0xBFC1588Cu; - SCPH1001_func_00005D48(cpu); -} - -void SCPH1001_func_00005DA8_cont_BFC158B8(CPUState* cpu) { - cpu->pc = 0xBFC158B8u; - SCPH1001_func_00005DA8(cpu); -} - -void SCPH1001_func_00005DD8_cont_BFC15910(CPUState* cpu) { - cpu->pc = 0xBFC15910u; - SCPH1001_func_00005DD8(cpu); -} - -void SCPH1001_func_00005DD8_cont_BFC15918(CPUState* cpu) { - cpu->pc = 0xBFC15918u; - SCPH1001_func_00005DD8(cpu); -} - -void SCPH1001_func_00005E50_cont_BFC15960(CPUState* cpu) { - cpu->pc = 0xBFC15960u; - SCPH1001_func_00005E50(cpu); -} - -void SCPH1001_func_00005E50_cont_BFC15964(CPUState* cpu) { - cpu->pc = 0xBFC15964u; - SCPH1001_func_00005E50(cpu); -} - -void SCPH1001_func_00005E50_cont_BFC15980(CPUState* cpu) { - cpu->pc = 0xBFC15980u; - SCPH1001_func_00005E50(cpu); -} - -void SCPH1001_func_00005E50_cont_BFC15988(CPUState* cpu) { - cpu->pc = 0xBFC15988u; - SCPH1001_func_00005E50(cpu); -} - -void SCPH1001_func_00005E50_cont_BFC15990(CPUState* cpu) { - cpu->pc = 0xBFC15990u; - SCPH1001_func_00005E50(cpu); -} - -void SCPH1001_func_00005F04_cont_BFC15A14(CPUState* cpu) { - cpu->pc = 0xBFC15A14u; - SCPH1001_func_00005F04(cpu); -} - -void SCPH1001_func_00005F04_cont_BFC15A18(CPUState* cpu) { - cpu->pc = 0xBFC15A18u; - SCPH1001_func_00005F04(cpu); -} - -void SCPH1001_func_00005F04_cont_BFC15A34(CPUState* cpu) { - cpu->pc = 0xBFC15A34u; - SCPH1001_func_00005F04(cpu); -} - -void SCPH1001_func_00005F04_cont_BFC15A3C(CPUState* cpu) { - cpu->pc = 0xBFC15A3Cu; - SCPH1001_func_00005F04(cpu); -} - -void SCPH1001_func_00005F04_cont_BFC15A44(CPUState* cpu) { - cpu->pc = 0xBFC15A44u; - SCPH1001_func_00005F04(cpu); -} - -void SCPH1001_func_00005FB8_cont_BFC15AC8(CPUState* cpu) { - cpu->pc = 0xBFC15AC8u; - SCPH1001_func_00005FB8(cpu); -} - -void SCPH1001_func_00005FB8_cont_BFC15ACC(CPUState* cpu) { - cpu->pc = 0xBFC15ACCu; - SCPH1001_func_00005FB8(cpu); -} - -void SCPH1001_func_00005FB8_cont_BFC15AE8(CPUState* cpu) { - cpu->pc = 0xBFC15AE8u; - SCPH1001_func_00005FB8(cpu); -} - -void SCPH1001_func_00006070_cont_BFC15B7C(CPUState* cpu) { - cpu->pc = 0xBFC15B7Cu; - SCPH1001_func_00006070(cpu); -} - -void SCPH1001_func_00006070_cont_BFC15B90(CPUState* cpu) { - cpu->pc = 0xBFC15B90u; - SCPH1001_func_00006070(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BBC(CPUState* cpu) { - cpu->pc = 0xBFC15BBCu; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BC8(CPUState* cpu) { - cpu->pc = 0xBFC15BC8u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BD0(CPUState* cpu) { - cpu->pc = 0xBFC15BD0u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BDC(CPUState* cpu) { - cpu->pc = 0xBFC15BDCu; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BE8(CPUState* cpu) { - cpu->pc = 0xBFC15BE8u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15BF4(CPUState* cpu) { - cpu->pc = 0xBFC15BF4u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15C44(CPUState* cpu) { - cpu->pc = 0xBFC15C44u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15C70(CPUState* cpu) { - cpu->pc = 0xBFC15C70u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15C8C(CPUState* cpu) { - cpu->pc = 0xBFC15C8Cu; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15C9C(CPUState* cpu) { - cpu->pc = 0xBFC15C9Cu; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15CA4(CPUState* cpu) { - cpu->pc = 0xBFC15CA4u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15CB0(CPUState* cpu) { - cpu->pc = 0xBFC15CB0u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_0000609C_cont_BFC15CB4(CPUState* cpu) { - cpu->pc = 0xBFC15CB4u; - SCPH1001_func_0000609C(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15CE8(CPUState* cpu) { - cpu->pc = 0xBFC15CE8u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15CF0(CPUState* cpu) { - cpu->pc = 0xBFC15CF0u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D04(CPUState* cpu) { - cpu->pc = 0xBFC15D04u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D0C(CPUState* cpu) { - cpu->pc = 0xBFC15D0Cu; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D10(CPUState* cpu) { - cpu->pc = 0xBFC15D10u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D18(CPUState* cpu) { - cpu->pc = 0xBFC15D18u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D4C(CPUState* cpu) { - cpu->pc = 0xBFC15D4Cu; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D70(CPUState* cpu) { - cpu->pc = 0xBFC15D70u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D80(CPUState* cpu) { - cpu->pc = 0xBFC15D80u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15D98(CPUState* cpu) { - cpu->pc = 0xBFC15D98u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15DA8(CPUState* cpu) { - cpu->pc = 0xBFC15DA8u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15DBC(CPUState* cpu) { - cpu->pc = 0xBFC15DBCu; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15DD0(CPUState* cpu) { - cpu->pc = 0xBFC15DD0u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15DD8(CPUState* cpu) { - cpu->pc = 0xBFC15DD8u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15E0C(CPUState* cpu) { - cpu->pc = 0xBFC15E0Cu; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15E30(CPUState* cpu) { - cpu->pc = 0xBFC15E30u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15E40(CPUState* cpu) { - cpu->pc = 0xBFC15E40u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15E58(CPUState* cpu) { - cpu->pc = 0xBFC15E58u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000061C4_cont_BFC15E68(CPUState* cpu) { - cpu->pc = 0xBFC15E68u; - SCPH1001_func_000061C4(cpu); -} - -void SCPH1001_func_000063BC_cont_BFC15EDC(CPUState* cpu) { - cpu->pc = 0xBFC15EDCu; - SCPH1001_func_000063BC(cpu); -} - -void SCPH1001_func_000063BC_cont_BFC15EF0(CPUState* cpu) { - cpu->pc = 0xBFC15EF0u; - SCPH1001_func_000063BC(cpu); -} - -void SCPH1001_func_00006408_cont_BFC15F18(CPUState* cpu) { - cpu->pc = 0xBFC15F18u; - SCPH1001_func_00006408(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC15F30(CPUState* cpu) { - cpu->pc = 0xBFC15F30u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC15F58(CPUState* cpu) { - cpu->pc = 0xBFC15F58u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC15F74(CPUState* cpu) { - cpu->pc = 0xBFC15F74u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC15FE8(CPUState* cpu) { - cpu->pc = 0xBFC15FE8u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC15FEC(CPUState* cpu) { - cpu->pc = 0xBFC15FECu; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC1600C(CPUState* cpu) { - cpu->pc = 0xBFC1600Cu; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC16014(CPUState* cpu) { - cpu->pc = 0xBFC16014u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC16088(CPUState* cpu) { - cpu->pc = 0xBFC16088u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC1608C(CPUState* cpu) { - cpu->pc = 0xBFC1608Cu; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_0000641C_cont_BFC16094(CPUState* cpu) { - cpu->pc = 0xBFC16094u; - SCPH1001_func_0000641C(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1618C(CPUState* cpu) { - cpu->pc = 0xBFC1618Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161A8(CPUState* cpu) { - cpu->pc = 0xBFC161A8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161C4(CPUState* cpu) { - cpu->pc = 0xBFC161C4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161D8(CPUState* cpu) { - cpu->pc = 0xBFC161D8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161E0(CPUState* cpu) { - cpu->pc = 0xBFC161E0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161E8(CPUState* cpu) { - cpu->pc = 0xBFC161E8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161EC(CPUState* cpu) { - cpu->pc = 0xBFC161ECu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161F4(CPUState* cpu) { - cpu->pc = 0xBFC161F4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC161FC(CPUState* cpu) { - cpu->pc = 0xBFC161FCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16204(CPUState* cpu) { - cpu->pc = 0xBFC16204u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16208(CPUState* cpu) { - cpu->pc = 0xBFC16208u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16210(CPUState* cpu) { - cpu->pc = 0xBFC16210u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16218(CPUState* cpu) { - cpu->pc = 0xBFC16218u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16220(CPUState* cpu) { - cpu->pc = 0xBFC16220u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16224(CPUState* cpu) { - cpu->pc = 0xBFC16224u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1622C(CPUState* cpu) { - cpu->pc = 0xBFC1622Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16234(CPUState* cpu) { - cpu->pc = 0xBFC16234u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1623C(CPUState* cpu) { - cpu->pc = 0xBFC1623Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16240(CPUState* cpu) { - cpu->pc = 0xBFC16240u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16248(CPUState* cpu) { - cpu->pc = 0xBFC16248u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16250(CPUState* cpu) { - cpu->pc = 0xBFC16250u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16258(CPUState* cpu) { - cpu->pc = 0xBFC16258u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1625C(CPUState* cpu) { - cpu->pc = 0xBFC1625Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16264(CPUState* cpu) { - cpu->pc = 0xBFC16264u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1626C(CPUState* cpu) { - cpu->pc = 0xBFC1626Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16274(CPUState* cpu) { - cpu->pc = 0xBFC16274u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16278(CPUState* cpu) { - cpu->pc = 0xBFC16278u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16280(CPUState* cpu) { - cpu->pc = 0xBFC16280u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1628C(CPUState* cpu) { - cpu->pc = 0xBFC1628Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16290(CPUState* cpu) { - cpu->pc = 0xBFC16290u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162B8(CPUState* cpu) { - cpu->pc = 0xBFC162B8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162CC(CPUState* cpu) { - cpu->pc = 0xBFC162CCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162D4(CPUState* cpu) { - cpu->pc = 0xBFC162D4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162DC(CPUState* cpu) { - cpu->pc = 0xBFC162DCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162E0(CPUState* cpu) { - cpu->pc = 0xBFC162E0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162E8(CPUState* cpu) { - cpu->pc = 0xBFC162E8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162F0(CPUState* cpu) { - cpu->pc = 0xBFC162F0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162F8(CPUState* cpu) { - cpu->pc = 0xBFC162F8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC162FC(CPUState* cpu) { - cpu->pc = 0xBFC162FCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16304(CPUState* cpu) { - cpu->pc = 0xBFC16304u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1630C(CPUState* cpu) { - cpu->pc = 0xBFC1630Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16314(CPUState* cpu) { - cpu->pc = 0xBFC16314u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16318(CPUState* cpu) { - cpu->pc = 0xBFC16318u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16320(CPUState* cpu) { - cpu->pc = 0xBFC16320u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1632C(CPUState* cpu) { - cpu->pc = 0xBFC1632Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16330(CPUState* cpu) { - cpu->pc = 0xBFC16330u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16338(CPUState* cpu) { - cpu->pc = 0xBFC16338u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16344(CPUState* cpu) { - cpu->pc = 0xBFC16344u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16348(CPUState* cpu) { - cpu->pc = 0xBFC16348u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16370(CPUState* cpu) { - cpu->pc = 0xBFC16370u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16384(CPUState* cpu) { - cpu->pc = 0xBFC16384u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1638C(CPUState* cpu) { - cpu->pc = 0xBFC1638Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16394(CPUState* cpu) { - cpu->pc = 0xBFC16394u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16398(CPUState* cpu) { - cpu->pc = 0xBFC16398u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163A0(CPUState* cpu) { - cpu->pc = 0xBFC163A0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163A8(CPUState* cpu) { - cpu->pc = 0xBFC163A8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163B0(CPUState* cpu) { - cpu->pc = 0xBFC163B0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163B4(CPUState* cpu) { - cpu->pc = 0xBFC163B4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163BC(CPUState* cpu) { - cpu->pc = 0xBFC163BCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163C4(CPUState* cpu) { - cpu->pc = 0xBFC163C4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163CC(CPUState* cpu) { - cpu->pc = 0xBFC163CCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163D0(CPUState* cpu) { - cpu->pc = 0xBFC163D0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163D8(CPUState* cpu) { - cpu->pc = 0xBFC163D8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163E4(CPUState* cpu) { - cpu->pc = 0xBFC163E4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163E8(CPUState* cpu) { - cpu->pc = 0xBFC163E8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163F0(CPUState* cpu) { - cpu->pc = 0xBFC163F0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC163FC(CPUState* cpu) { - cpu->pc = 0xBFC163FCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16400(CPUState* cpu) { - cpu->pc = 0xBFC16400u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16428(CPUState* cpu) { - cpu->pc = 0xBFC16428u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1643C(CPUState* cpu) { - cpu->pc = 0xBFC1643Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16444(CPUState* cpu) { - cpu->pc = 0xBFC16444u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1644C(CPUState* cpu) { - cpu->pc = 0xBFC1644Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16450(CPUState* cpu) { - cpu->pc = 0xBFC16450u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16458(CPUState* cpu) { - cpu->pc = 0xBFC16458u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16460(CPUState* cpu) { - cpu->pc = 0xBFC16460u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16468(CPUState* cpu) { - cpu->pc = 0xBFC16468u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1646C(CPUState* cpu) { - cpu->pc = 0xBFC1646Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16474(CPUState* cpu) { - cpu->pc = 0xBFC16474u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1647C(CPUState* cpu) { - cpu->pc = 0xBFC1647Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16484(CPUState* cpu) { - cpu->pc = 0xBFC16484u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16488(CPUState* cpu) { - cpu->pc = 0xBFC16488u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16490(CPUState* cpu) { - cpu->pc = 0xBFC16490u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC1649C(CPUState* cpu) { - cpu->pc = 0xBFC1649Cu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164A0(CPUState* cpu) { - cpu->pc = 0xBFC164A0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164A8(CPUState* cpu) { - cpu->pc = 0xBFC164A8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164B4(CPUState* cpu) { - cpu->pc = 0xBFC164B4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164B8(CPUState* cpu) { - cpu->pc = 0xBFC164B8u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164E0(CPUState* cpu) { - cpu->pc = 0xBFC164E0u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164F4(CPUState* cpu) { - cpu->pc = 0xBFC164F4u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC164FC(CPUState* cpu) { - cpu->pc = 0xBFC164FCu; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16500(CPUState* cpu) { - cpu->pc = 0xBFC16500u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_00006670_cont_BFC16538(CPUState* cpu) { - cpu->pc = 0xBFC16538u; - SCPH1001_func_00006670(cpu); -} - -void SCPH1001_func_1FC00000_cont_BFC00150(CPUState* cpu) { - cpu->pc = 0xBFC00150u; - SCPH1001_func_1FC00000(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC00250(CPUState* cpu) { - cpu->pc = 0xBFC00250u; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC00278(CPUState* cpu) { - cpu->pc = 0xBFC00278u; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC002A0(CPUState* cpu) { - cpu->pc = 0xBFC002A0u; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC00328(CPUState* cpu) { - cpu->pc = 0xBFC00328u; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC003B8(CPUState* cpu) { - cpu->pc = 0xBFC003B8u; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00180_cont_BFC003CC(CPUState* cpu) { - cpu->pc = 0xBFC003CCu; - SCPH1001_func_1FC00180(cpu); -} - -void SCPH1001_func_1FC00420_cont_BFC00434(CPUState* cpu) { - cpu->pc = 0xBFC00434u; - SCPH1001_func_1FC00420(cpu); -} - -void SCPH1001_func_1FC00420_cont_BFC0044C(CPUState* cpu) { - cpu->pc = 0xBFC0044Cu; - SCPH1001_func_1FC00420(cpu); -} - -void SCPH1001_func_1FC00678_cont_BFC00688(CPUState* cpu) { - cpu->pc = 0xBFC00688u; - SCPH1001_func_1FC00678(cpu); -} - -void SCPH1001_func_1FC00678_cont_BFC00698(CPUState* cpu) { - cpu->pc = 0xBFC00698u; - SCPH1001_func_1FC00678(cpu); -} - -void SCPH1001_func_1FC006A8_cont_BFC006B8(CPUState* cpu) { - cpu->pc = 0xBFC006B8u; - SCPH1001_func_1FC006A8(cpu); -} - -void SCPH1001_func_1FC006A8_cont_BFC006C8(CPUState* cpu) { - cpu->pc = 0xBFC006C8u; - SCPH1001_func_1FC006A8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC006F4(CPUState* cpu) { - cpu->pc = 0xBFC006F4u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC006FC(CPUState* cpu) { - cpu->pc = 0xBFC006FCu; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC00708(CPUState* cpu) { - cpu->pc = 0xBFC00708u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC00714(CPUState* cpu) { - cpu->pc = 0xBFC00714u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC0071C(CPUState* cpu) { - cpu->pc = 0xBFC0071Cu; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC00728(CPUState* cpu) { - cpu->pc = 0xBFC00728u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC00730(CPUState* cpu) { - cpu->pc = 0xBFC00730u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC0073C(CPUState* cpu) { - cpu->pc = 0xBFC0073Cu; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC006D8_cont_BFC00768(CPUState* cpu) { - cpu->pc = 0xBFC00768u; - SCPH1001_func_1FC006D8(cpu); -} - -void SCPH1001_func_1FC00778_cont_BFC007A0(CPUState* cpu) { - cpu->pc = 0xBFC007A0u; - SCPH1001_func_1FC00778(cpu); -} - -void SCPH1001_func_1FC00778_cont_BFC007C0(CPUState* cpu) { - cpu->pc = 0xBFC007C0u; - SCPH1001_func_1FC00778(cpu); -} - -void SCPH1001_func_1FC00778_cont_BFC007E0(CPUState* cpu) { - cpu->pc = 0xBFC007E0u; - SCPH1001_func_1FC00778(cpu); -} - -void SCPH1001_func_1FC00778_cont_BFC00800(CPUState* cpu) { - cpu->pc = 0xBFC00800u; - SCPH1001_func_1FC00778(cpu); -} - -void SCPH1001_func_1FC00810_cont_BFC00890(CPUState* cpu) { - cpu->pc = 0xBFC00890u; - SCPH1001_func_1FC00810(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC008BC(CPUState* cpu) { - cpu->pc = 0xBFC008BCu; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC008CC(CPUState* cpu) { - cpu->pc = 0xBFC008CCu; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC008EC(CPUState* cpu) { - cpu->pc = 0xBFC008ECu; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC00904(CPUState* cpu) { - cpu->pc = 0xBFC00904u; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC0091C(CPUState* cpu) { - cpu->pc = 0xBFC0091Cu; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC008A0_cont_BFC00934(CPUState* cpu) { - cpu->pc = 0xBFC00934u; - SCPH1001_func_1FC008A0(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00970(CPUState* cpu) { - cpu->pc = 0xBFC00970u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00978(CPUState* cpu) { - cpu->pc = 0xBFC00978u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00980(CPUState* cpu) { - cpu->pc = 0xBFC00980u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00990(CPUState* cpu) { - cpu->pc = 0xBFC00990u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00998(CPUState* cpu) { - cpu->pc = 0xBFC00998u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009A0(CPUState* cpu) { - cpu->pc = 0xBFC009A0u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009A4(CPUState* cpu) { - cpu->pc = 0xBFC009A4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009B4(CPUState* cpu) { - cpu->pc = 0xBFC009B4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009BC(CPUState* cpu) { - cpu->pc = 0xBFC009BCu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009CC(CPUState* cpu) { - cpu->pc = 0xBFC009CCu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009DC(CPUState* cpu) { - cpu->pc = 0xBFC009DCu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009E4(CPUState* cpu) { - cpu->pc = 0xBFC009E4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009F4(CPUState* cpu) { - cpu->pc = 0xBFC009F4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC009FC(CPUState* cpu) { - cpu->pc = 0xBFC009FCu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A04(CPUState* cpu) { - cpu->pc = 0xBFC00A04u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A30(CPUState* cpu) { - cpu->pc = 0xBFC00A30u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A38(CPUState* cpu) { - cpu->pc = 0xBFC00A38u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A40(CPUState* cpu) { - cpu->pc = 0xBFC00A40u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A64(CPUState* cpu) { - cpu->pc = 0xBFC00A64u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A6C(CPUState* cpu) { - cpu->pc = 0xBFC00A6Cu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A74(CPUState* cpu) { - cpu->pc = 0xBFC00A74u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00A7C(CPUState* cpu) { - cpu->pc = 0xBFC00A7Cu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AA4(CPUState* cpu) { - cpu->pc = 0xBFC00AA4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AAC(CPUState* cpu) { - cpu->pc = 0xBFC00AACu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AB4(CPUState* cpu) { - cpu->pc = 0xBFC00AB4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00ADC(CPUState* cpu) { - cpu->pc = 0xBFC00ADCu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AE0(CPUState* cpu) { - cpu->pc = 0xBFC00AE0u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AE8(CPUState* cpu) { - cpu->pc = 0xBFC00AE8u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AEC(CPUState* cpu) { - cpu->pc = 0xBFC00AECu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00AF4(CPUState* cpu) { - cpu->pc = 0xBFC00AF4u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B04(CPUState* cpu) { - cpu->pc = 0xBFC00B04u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B0C(CPUState* cpu) { - cpu->pc = 0xBFC00B0Cu; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B20(CPUState* cpu) { - cpu->pc = 0xBFC00B20u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B48(CPUState* cpu) { - cpu->pc = 0xBFC00B48u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B64(CPUState* cpu) { - cpu->pc = 0xBFC00B64u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00944_cont_BFC00B68(CPUState* cpu) { - cpu->pc = 0xBFC00B68u; - SCPH1001_func_1FC00944(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00BAC(CPUState* cpu) { - cpu->pc = 0xBFC00BACu; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00BBC(CPUState* cpu) { - cpu->pc = 0xBFC00BBCu; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00BC4(CPUState* cpu) { - cpu->pc = 0xBFC00BC4u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00BD0(CPUState* cpu) { - cpu->pc = 0xBFC00BD0u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00BD8(CPUState* cpu) { - cpu->pc = 0xBFC00BD8u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C04(CPUState* cpu) { - cpu->pc = 0xBFC00C04u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C0C(CPUState* cpu) { - cpu->pc = 0xBFC00C0Cu; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C14(CPUState* cpu) { - cpu->pc = 0xBFC00C14u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C38(CPUState* cpu) { - cpu->pc = 0xBFC00C38u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C40(CPUState* cpu) { - cpu->pc = 0xBFC00C40u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C48(CPUState* cpu) { - cpu->pc = 0xBFC00C48u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C50(CPUState* cpu) { - cpu->pc = 0xBFC00C50u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C74(CPUState* cpu) { - cpu->pc = 0xBFC00C74u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C7C(CPUState* cpu) { - cpu->pc = 0xBFC00C7Cu; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00C84(CPUState* cpu) { - cpu->pc = 0xBFC00C84u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00CA8(CPUState* cpu) { - cpu->pc = 0xBFC00CA8u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00CB0(CPUState* cpu) { - cpu->pc = 0xBFC00CB0u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00CC0(CPUState* cpu) { - cpu->pc = 0xBFC00CC0u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00CE4(CPUState* cpu) { - cpu->pc = 0xBFC00CE4u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D04(CPUState* cpu) { - cpu->pc = 0xBFC00D04u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D14(CPUState* cpu) { - cpu->pc = 0xBFC00D14u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D28(CPUState* cpu) { - cpu->pc = 0xBFC00D28u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D38(CPUState* cpu) { - cpu->pc = 0xBFC00D38u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D48(CPUState* cpu) { - cpu->pc = 0xBFC00D48u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D50(CPUState* cpu) { - cpu->pc = 0xBFC00D50u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D60(CPUState* cpu) { - cpu->pc = 0xBFC00D60u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D68(CPUState* cpu) { - cpu->pc = 0xBFC00D68u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D78(CPUState* cpu) { - cpu->pc = 0xBFC00D78u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D88(CPUState* cpu) { - cpu->pc = 0xBFC00D88u; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00B7C_cont_BFC00D8C(CPUState* cpu) { - cpu->pc = 0xBFC00D8Cu; - SCPH1001_func_1FC00B7C(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00DB8(CPUState* cpu) { - cpu->pc = 0xBFC00DB8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00DC0(CPUState* cpu) { - cpu->pc = 0xBFC00DC0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E1C(CPUState* cpu) { - cpu->pc = 0xBFC00E1Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E2C(CPUState* cpu) { - cpu->pc = 0xBFC00E2Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E58(CPUState* cpu) { - cpu->pc = 0xBFC00E58u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E5C(CPUState* cpu) { - cpu->pc = 0xBFC00E5Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E64(CPUState* cpu) { - cpu->pc = 0xBFC00E64u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E6C(CPUState* cpu) { - cpu->pc = 0xBFC00E6Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E90(CPUState* cpu) { - cpu->pc = 0xBFC00E90u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00E94(CPUState* cpu) { - cpu->pc = 0xBFC00E94u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EA8(CPUState* cpu) { - cpu->pc = 0xBFC00EA8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EB8(CPUState* cpu) { - cpu->pc = 0xBFC00EB8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EC0(CPUState* cpu) { - cpu->pc = 0xBFC00EC0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EC8(CPUState* cpu) { - cpu->pc = 0xBFC00EC8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00ED0(CPUState* cpu) { - cpu->pc = 0xBFC00ED0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EE0(CPUState* cpu) { - cpu->pc = 0xBFC00EE0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EE4(CPUState* cpu) { - cpu->pc = 0xBFC00EE4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EEC(CPUState* cpu) { - cpu->pc = 0xBFC00EECu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00EF4(CPUState* cpu) { - cpu->pc = 0xBFC00EF4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F04(CPUState* cpu) { - cpu->pc = 0xBFC00F04u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F10(CPUState* cpu) { - cpu->pc = 0xBFC00F10u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F14(CPUState* cpu) { - cpu->pc = 0xBFC00F14u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F1C(CPUState* cpu) { - cpu->pc = 0xBFC00F1Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F34(CPUState* cpu) { - cpu->pc = 0xBFC00F34u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F38(CPUState* cpu) { - cpu->pc = 0xBFC00F38u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F58(CPUState* cpu) { - cpu->pc = 0xBFC00F58u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F70(CPUState* cpu) { - cpu->pc = 0xBFC00F70u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F74(CPUState* cpu) { - cpu->pc = 0xBFC00F74u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F7C(CPUState* cpu) { - cpu->pc = 0xBFC00F7Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F84(CPUState* cpu) { - cpu->pc = 0xBFC00F84u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F8C(CPUState* cpu) { - cpu->pc = 0xBFC00F8Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F94(CPUState* cpu) { - cpu->pc = 0xBFC00F94u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F98(CPUState* cpu) { - cpu->pc = 0xBFC00F98u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00F9C(CPUState* cpu) { - cpu->pc = 0xBFC00F9Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FBC(CPUState* cpu) { - cpu->pc = 0xBFC00FBCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FD4(CPUState* cpu) { - cpu->pc = 0xBFC00FD4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FE0(CPUState* cpu) { - cpu->pc = 0xBFC00FE0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FE8(CPUState* cpu) { - cpu->pc = 0xBFC00FE8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FF0(CPUState* cpu) { - cpu->pc = 0xBFC00FF0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC00FF8(CPUState* cpu) { - cpu->pc = 0xBFC00FF8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01014(CPUState* cpu) { - cpu->pc = 0xBFC01014u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01018(CPUState* cpu) { - cpu->pc = 0xBFC01018u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01028(CPUState* cpu) { - cpu->pc = 0xBFC01028u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01034(CPUState* cpu) { - cpu->pc = 0xBFC01034u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01040(CPUState* cpu) { - cpu->pc = 0xBFC01040u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0104C(CPUState* cpu) { - cpu->pc = 0xBFC0104Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01054(CPUState* cpu) { - cpu->pc = 0xBFC01054u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01058(CPUState* cpu) { - cpu->pc = 0xBFC01058u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01060(CPUState* cpu) { - cpu->pc = 0xBFC01060u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0106C(CPUState* cpu) { - cpu->pc = 0xBFC0106Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01078(CPUState* cpu) { - cpu->pc = 0xBFC01078u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0108C(CPUState* cpu) { - cpu->pc = 0xBFC0108Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01090(CPUState* cpu) { - cpu->pc = 0xBFC01090u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01098(CPUState* cpu) { - cpu->pc = 0xBFC01098u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010AC(CPUState* cpu) { - cpu->pc = 0xBFC010ACu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010B0(CPUState* cpu) { - cpu->pc = 0xBFC010B0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010C0(CPUState* cpu) { - cpu->pc = 0xBFC010C0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010C8(CPUState* cpu) { - cpu->pc = 0xBFC010C8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010D8(CPUState* cpu) { - cpu->pc = 0xBFC010D8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010E4(CPUState* cpu) { - cpu->pc = 0xBFC010E4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010F0(CPUState* cpu) { - cpu->pc = 0xBFC010F0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC010FC(CPUState* cpu) { - cpu->pc = 0xBFC010FCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01104(CPUState* cpu) { - cpu->pc = 0xBFC01104u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0110C(CPUState* cpu) { - cpu->pc = 0xBFC0110Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01124(CPUState* cpu) { - cpu->pc = 0xBFC01124u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01134(CPUState* cpu) { - cpu->pc = 0xBFC01134u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0113C(CPUState* cpu) { - cpu->pc = 0xBFC0113Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01144(CPUState* cpu) { - cpu->pc = 0xBFC01144u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01154(CPUState* cpu) { - cpu->pc = 0xBFC01154u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0117C(CPUState* cpu) { - cpu->pc = 0xBFC0117Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0118C(CPUState* cpu) { - cpu->pc = 0xBFC0118Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01194(CPUState* cpu) { - cpu->pc = 0xBFC01194u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0119C(CPUState* cpu) { - cpu->pc = 0xBFC0119Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011A4(CPUState* cpu) { - cpu->pc = 0xBFC011A4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011CC(CPUState* cpu) { - cpu->pc = 0xBFC011CCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011D0(CPUState* cpu) { - cpu->pc = 0xBFC011D0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011E4(CPUState* cpu) { - cpu->pc = 0xBFC011E4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011F0(CPUState* cpu) { - cpu->pc = 0xBFC011F0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC011FC(CPUState* cpu) { - cpu->pc = 0xBFC011FCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01208(CPUState* cpu) { - cpu->pc = 0xBFC01208u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01210(CPUState* cpu) { - cpu->pc = 0xBFC01210u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01218(CPUState* cpu) { - cpu->pc = 0xBFC01218u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01228(CPUState* cpu) { - cpu->pc = 0xBFC01228u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01238(CPUState* cpu) { - cpu->pc = 0xBFC01238u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01244(CPUState* cpu) { - cpu->pc = 0xBFC01244u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01250(CPUState* cpu) { - cpu->pc = 0xBFC01250u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0125C(CPUState* cpu) { - cpu->pc = 0xBFC0125Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01264(CPUState* cpu) { - cpu->pc = 0xBFC01264u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01268(CPUState* cpu) { - cpu->pc = 0xBFC01268u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01274(CPUState* cpu) { - cpu->pc = 0xBFC01274u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0127C(CPUState* cpu) { - cpu->pc = 0xBFC0127Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01280(CPUState* cpu) { - cpu->pc = 0xBFC01280u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01288(CPUState* cpu) { - cpu->pc = 0xBFC01288u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01290(CPUState* cpu) { - cpu->pc = 0xBFC01290u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01298(CPUState* cpu) { - cpu->pc = 0xBFC01298u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012A0(CPUState* cpu) { - cpu->pc = 0xBFC012A0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012A8(CPUState* cpu) { - cpu->pc = 0xBFC012A8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012CC(CPUState* cpu) { - cpu->pc = 0xBFC012CCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012D0(CPUState* cpu) { - cpu->pc = 0xBFC012D0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012D8(CPUState* cpu) { - cpu->pc = 0xBFC012D8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012E8(CPUState* cpu) { - cpu->pc = 0xBFC012E8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC012F4(CPUState* cpu) { - cpu->pc = 0xBFC012F4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01304(CPUState* cpu) { - cpu->pc = 0xBFC01304u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01310(CPUState* cpu) { - cpu->pc = 0xBFC01310u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01314(CPUState* cpu) { - cpu->pc = 0xBFC01314u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01318(CPUState* cpu) { - cpu->pc = 0xBFC01318u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01328(CPUState* cpu) { - cpu->pc = 0xBFC01328u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01338(CPUState* cpu) { - cpu->pc = 0xBFC01338u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01344(CPUState* cpu) { - cpu->pc = 0xBFC01344u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01354(CPUState* cpu) { - cpu->pc = 0xBFC01354u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0136C(CPUState* cpu) { - cpu->pc = 0xBFC0136Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01374(CPUState* cpu) { - cpu->pc = 0xBFC01374u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01378(CPUState* cpu) { - cpu->pc = 0xBFC01378u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01380(CPUState* cpu) { - cpu->pc = 0xBFC01380u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0138C(CPUState* cpu) { - cpu->pc = 0xBFC0138Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01394(CPUState* cpu) { - cpu->pc = 0xBFC01394u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC013A8(CPUState* cpu) { - cpu->pc = 0xBFC013A8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC013B0(CPUState* cpu) { - cpu->pc = 0xBFC013B0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC013DC(CPUState* cpu) { - cpu->pc = 0xBFC013DCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC013E4(CPUState* cpu) { - cpu->pc = 0xBFC013E4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC013EC(CPUState* cpu) { - cpu->pc = 0xBFC013ECu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01410(CPUState* cpu) { - cpu->pc = 0xBFC01410u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0141C(CPUState* cpu) { - cpu->pc = 0xBFC0141Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01424(CPUState* cpu) { - cpu->pc = 0xBFC01424u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0144C(CPUState* cpu) { - cpu->pc = 0xBFC0144Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01470(CPUState* cpu) { - cpu->pc = 0xBFC01470u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0147C(CPUState* cpu) { - cpu->pc = 0xBFC0147Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01490(CPUState* cpu) { - cpu->pc = 0xBFC01490u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01498(CPUState* cpu) { - cpu->pc = 0xBFC01498u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC014C4(CPUState* cpu) { - cpu->pc = 0xBFC014C4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC014C8(CPUState* cpu) { - cpu->pc = 0xBFC014C8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC014DC(CPUState* cpu) { - cpu->pc = 0xBFC014DCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC014E4(CPUState* cpu) { - cpu->pc = 0xBFC014E4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01514(CPUState* cpu) { - cpu->pc = 0xBFC01514u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01518(CPUState* cpu) { - cpu->pc = 0xBFC01518u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01524(CPUState* cpu) { - cpu->pc = 0xBFC01524u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01530(CPUState* cpu) { - cpu->pc = 0xBFC01530u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01558(CPUState* cpu) { - cpu->pc = 0xBFC01558u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01564(CPUState* cpu) { - cpu->pc = 0xBFC01564u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0156C(CPUState* cpu) { - cpu->pc = 0xBFC0156Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01594(CPUState* cpu) { - cpu->pc = 0xBFC01594u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01598(CPUState* cpu) { - cpu->pc = 0xBFC01598u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015A0(CPUState* cpu) { - cpu->pc = 0xBFC015A0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015B4(CPUState* cpu) { - cpu->pc = 0xBFC015B4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015BC(CPUState* cpu) { - cpu->pc = 0xBFC015BCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015E8(CPUState* cpu) { - cpu->pc = 0xBFC015E8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015EC(CPUState* cpu) { - cpu->pc = 0xBFC015ECu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC015FC(CPUState* cpu) { - cpu->pc = 0xBFC015FCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01604(CPUState* cpu) { - cpu->pc = 0xBFC01604u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01608(CPUState* cpu) { - cpu->pc = 0xBFC01608u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0160C(CPUState* cpu) { - cpu->pc = 0xBFC0160Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01620(CPUState* cpu) { - cpu->pc = 0xBFC01620u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01624(CPUState* cpu) { - cpu->pc = 0xBFC01624u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0164C(CPUState* cpu) { - cpu->pc = 0xBFC0164Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01654(CPUState* cpu) { - cpu->pc = 0xBFC01654u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0165C(CPUState* cpu) { - cpu->pc = 0xBFC0165Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01664(CPUState* cpu) { - cpu->pc = 0xBFC01664u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0166C(CPUState* cpu) { - cpu->pc = 0xBFC0166Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01674(CPUState* cpu) { - cpu->pc = 0xBFC01674u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0167C(CPUState* cpu) { - cpu->pc = 0xBFC0167Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01684(CPUState* cpu) { - cpu->pc = 0xBFC01684u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0168C(CPUState* cpu) { - cpu->pc = 0xBFC0168Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01694(CPUState* cpu) { - cpu->pc = 0xBFC01694u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0169C(CPUState* cpu) { - cpu->pc = 0xBFC0169Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016A4(CPUState* cpu) { - cpu->pc = 0xBFC016A4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016AC(CPUState* cpu) { - cpu->pc = 0xBFC016ACu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016B4(CPUState* cpu) { - cpu->pc = 0xBFC016B4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016B8(CPUState* cpu) { - cpu->pc = 0xBFC016B8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016C0(CPUState* cpu) { - cpu->pc = 0xBFC016C0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016F0(CPUState* cpu) { - cpu->pc = 0xBFC016F0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC016F8(CPUState* cpu) { - cpu->pc = 0xBFC016F8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01700(CPUState* cpu) { - cpu->pc = 0xBFC01700u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01708(CPUState* cpu) { - cpu->pc = 0xBFC01708u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01710(CPUState* cpu) { - cpu->pc = 0xBFC01710u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01718(CPUState* cpu) { - cpu->pc = 0xBFC01718u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01720(CPUState* cpu) { - cpu->pc = 0xBFC01720u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0172C(CPUState* cpu) { - cpu->pc = 0xBFC0172Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01734(CPUState* cpu) { - cpu->pc = 0xBFC01734u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01738(CPUState* cpu) { - cpu->pc = 0xBFC01738u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01740(CPUState* cpu) { - cpu->pc = 0xBFC01740u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01748(CPUState* cpu) { - cpu->pc = 0xBFC01748u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01750(CPUState* cpu) { - cpu->pc = 0xBFC01750u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01758(CPUState* cpu) { - cpu->pc = 0xBFC01758u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01760(CPUState* cpu) { - cpu->pc = 0xBFC01760u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01768(CPUState* cpu) { - cpu->pc = 0xBFC01768u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01774(CPUState* cpu) { - cpu->pc = 0xBFC01774u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0177C(CPUState* cpu) { - cpu->pc = 0xBFC0177Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01788(CPUState* cpu) { - cpu->pc = 0xBFC01788u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01790(CPUState* cpu) { - cpu->pc = 0xBFC01790u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01798(CPUState* cpu) { - cpu->pc = 0xBFC01798u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017A0(CPUState* cpu) { - cpu->pc = 0xBFC017A0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017AC(CPUState* cpu) { - cpu->pc = 0xBFC017ACu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017B4(CPUState* cpu) { - cpu->pc = 0xBFC017B4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017B8(CPUState* cpu) { - cpu->pc = 0xBFC017B8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017C0(CPUState* cpu) { - cpu->pc = 0xBFC017C0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017C8(CPUState* cpu) { - cpu->pc = 0xBFC017C8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017D0(CPUState* cpu) { - cpu->pc = 0xBFC017D0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017D8(CPUState* cpu) { - cpu->pc = 0xBFC017D8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017E0(CPUState* cpu) { - cpu->pc = 0xBFC017E0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017E8(CPUState* cpu) { - cpu->pc = 0xBFC017E8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017F0(CPUState* cpu) { - cpu->pc = 0xBFC017F0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC017F8(CPUState* cpu) { - cpu->pc = 0xBFC017F8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01804(CPUState* cpu) { - cpu->pc = 0xBFC01804u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0180C(CPUState* cpu) { - cpu->pc = 0xBFC0180Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01818(CPUState* cpu) { - cpu->pc = 0xBFC01818u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01820(CPUState* cpu) { - cpu->pc = 0xBFC01820u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01828(CPUState* cpu) { - cpu->pc = 0xBFC01828u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01830(CPUState* cpu) { - cpu->pc = 0xBFC01830u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0183C(CPUState* cpu) { - cpu->pc = 0xBFC0183Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01844(CPUState* cpu) { - cpu->pc = 0xBFC01844u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01850(CPUState* cpu) { - cpu->pc = 0xBFC01850u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01858(CPUState* cpu) { - cpu->pc = 0xBFC01858u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01860(CPUState* cpu) { - cpu->pc = 0xBFC01860u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01868(CPUState* cpu) { - cpu->pc = 0xBFC01868u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01870(CPUState* cpu) { - cpu->pc = 0xBFC01870u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01878(CPUState* cpu) { - cpu->pc = 0xBFC01878u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01884(CPUState* cpu) { - cpu->pc = 0xBFC01884u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC0188C(CPUState* cpu) { - cpu->pc = 0xBFC0188Cu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC01898(CPUState* cpu) { - cpu->pc = 0xBFC01898u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018A0(CPUState* cpu) { - cpu->pc = 0xBFC018A0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018A8(CPUState* cpu) { - cpu->pc = 0xBFC018A8u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018B0(CPUState* cpu) { - cpu->pc = 0xBFC018B0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018BC(CPUState* cpu) { - cpu->pc = 0xBFC018BCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018C4(CPUState* cpu) { - cpu->pc = 0xBFC018C4u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018CC(CPUState* cpu) { - cpu->pc = 0xBFC018CCu; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC00DA0_cont_BFC018D0(CPUState* cpu) { - cpu->pc = 0xBFC018D0u; - SCPH1001_func_1FC00DA0(cpu); -} - -void SCPH1001_func_1FC018E0_cont_BFC01910(CPUState* cpu) { - cpu->pc = 0xBFC01910u; - SCPH1001_func_1FC018E0(cpu); -} - -void SCPH1001_func_1FC0193C_cont_BFC01960(CPUState* cpu) { - cpu->pc = 0xBFC01960u; - SCPH1001_func_1FC0193C(cpu); -} - -void SCPH1001_func_1FC0193C_cont_BFC01988(CPUState* cpu) { - cpu->pc = 0xBFC01988u; - SCPH1001_func_1FC0193C(cpu); -} - -void SCPH1001_func_1FC0193C_cont_BFC019B0(CPUState* cpu) { - cpu->pc = 0xBFC019B0u; - SCPH1001_func_1FC0193C(cpu); -} - -void SCPH1001_func_1FC0193C_cont_BFC01A38(CPUState* cpu) { - cpu->pc = 0xBFC01A38u; - SCPH1001_func_1FC0193C(cpu); -} - -void SCPH1001_func_1FC01A60_cont_BFC01A78(CPUState* cpu) { - cpu->pc = 0xBFC01A78u; - SCPH1001_func_1FC01A60(cpu); -} - -void SCPH1001_func_1FC01A90_cont_BFC01A98(CPUState* cpu) { - cpu->pc = 0xBFC01A98u; - SCPH1001_func_1FC01A90(cpu); -} - -void SCPH1001_func_1FC01A90_cont_BFC01AA0(CPUState* cpu) { - cpu->pc = 0xBFC01AA0u; - SCPH1001_func_1FC01A90(cpu); -} - -void SCPH1001_func_1FC01A90_cont_BFC01AA8(CPUState* cpu) { - cpu->pc = 0xBFC01AA8u; - SCPH1001_func_1FC01A90(cpu); -} - -void SCPH1001_func_1FC01A90_cont_BFC01AC0(CPUState* cpu) { - cpu->pc = 0xBFC01AC0u; - SCPH1001_func_1FC01A90(cpu); -} - -void SCPH1001_func_1FC01ACC_cont_BFC01AD4(CPUState* cpu) { - cpu->pc = 0xBFC01AD4u; - SCPH1001_func_1FC01ACC(cpu); -} - -void SCPH1001_func_1FC01ACC_cont_BFC01ADC(CPUState* cpu) { - cpu->pc = 0xBFC01ADCu; - SCPH1001_func_1FC01ACC(cpu); -} - -void SCPH1001_func_1FC01ACC_cont_BFC01AE4(CPUState* cpu) { - cpu->pc = 0xBFC01AE4u; - SCPH1001_func_1FC01ACC(cpu); -} - -void SCPH1001_func_1FC01ACC_cont_BFC01AEC(CPUState* cpu) { - cpu->pc = 0xBFC01AECu; - SCPH1001_func_1FC01ACC(cpu); -} - -void SCPH1001_func_1FC01ACC_cont_BFC01AFC(CPUState* cpu) { - cpu->pc = 0xBFC01AFCu; - SCPH1001_func_1FC01ACC(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B10(CPUState* cpu) { - cpu->pc = 0xBFC01B10u; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B18(CPUState* cpu) { - cpu->pc = 0xBFC01B18u; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B24(CPUState* cpu) { - cpu->pc = 0xBFC01B24u; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B2C(CPUState* cpu) { - cpu->pc = 0xBFC01B2Cu; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B40(CPUState* cpu) { - cpu->pc = 0xBFC01B40u; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B4C(CPUState* cpu) { - cpu->pc = 0xBFC01B4Cu; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B54(CPUState* cpu) { - cpu->pc = 0xBFC01B54u; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B5C(CPUState* cpu) { - cpu->pc = 0xBFC01B5Cu; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B08_cont_BFC01B6C(CPUState* cpu) { - cpu->pc = 0xBFC01B6Cu; - SCPH1001_func_1FC01B08(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01B88(CPUState* cpu) { - cpu->pc = 0xBFC01B88u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BA0(CPUState* cpu) { - cpu->pc = 0xBFC01BA0u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BAC(CPUState* cpu) { - cpu->pc = 0xBFC01BACu; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BB0(CPUState* cpu) { - cpu->pc = 0xBFC01BB0u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BB4(CPUState* cpu) { - cpu->pc = 0xBFC01BB4u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BE4(CPUState* cpu) { - cpu->pc = 0xBFC01BE4u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BEC(CPUState* cpu) { - cpu->pc = 0xBFC01BECu; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BF0(CPUState* cpu) { - cpu->pc = 0xBFC01BF0u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01BF8(CPUState* cpu) { - cpu->pc = 0xBFC01BF8u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C00(CPUState* cpu) { - cpu->pc = 0xBFC01C00u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C08(CPUState* cpu) { - cpu->pc = 0xBFC01C08u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C28(CPUState* cpu) { - cpu->pc = 0xBFC01C28u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C34(CPUState* cpu) { - cpu->pc = 0xBFC01C34u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C4C(CPUState* cpu) { - cpu->pc = 0xBFC01C4Cu; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C50(CPUState* cpu) { - cpu->pc = 0xBFC01C50u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C6C(CPUState* cpu) { - cpu->pc = 0xBFC01C6Cu; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01B80_cont_BFC01C70(CPUState* cpu) { - cpu->pc = 0xBFC01C70u; - SCPH1001_func_1FC01B80(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01CAC(CPUState* cpu) { - cpu->pc = 0xBFC01CACu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01CB4(CPUState* cpu) { - cpu->pc = 0xBFC01CB4u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01CD0(CPUState* cpu) { - cpu->pc = 0xBFC01CD0u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01CE8(CPUState* cpu) { - cpu->pc = 0xBFC01CE8u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D00(CPUState* cpu) { - cpu->pc = 0xBFC01D00u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D0C(CPUState* cpu) { - cpu->pc = 0xBFC01D0Cu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D1C(CPUState* cpu) { - cpu->pc = 0xBFC01D1Cu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D24(CPUState* cpu) { - cpu->pc = 0xBFC01D24u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D40(CPUState* cpu) { - cpu->pc = 0xBFC01D40u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D50(CPUState* cpu) { - cpu->pc = 0xBFC01D50u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D54(CPUState* cpu) { - cpu->pc = 0xBFC01D54u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D70(CPUState* cpu) { - cpu->pc = 0xBFC01D70u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01D9C(CPUState* cpu) { - cpu->pc = 0xBFC01D9Cu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01DA8(CPUState* cpu) { - cpu->pc = 0xBFC01DA8u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01DAC(CPUState* cpu) { - cpu->pc = 0xBFC01DACu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01DBC(CPUState* cpu) { - cpu->pc = 0xBFC01DBCu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01DC4(CPUState* cpu) { - cpu->pc = 0xBFC01DC4u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01DC8(CPUState* cpu) { - cpu->pc = 0xBFC01DC8u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01E08(CPUState* cpu) { - cpu->pc = 0xBFC01E08u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01E0C(CPUState* cpu) { - cpu->pc = 0xBFC01E0Cu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01E14(CPUState* cpu) { - cpu->pc = 0xBFC01E14u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01E18(CPUState* cpu) { - cpu->pc = 0xBFC01E18u; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01C8C_cont_BFC01E1C(CPUState* cpu) { - cpu->pc = 0xBFC01E1Cu; - SCPH1001_func_1FC01C8C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01E98(CPUState* cpu) { - cpu->pc = 0xBFC01E98u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EA0(CPUState* cpu) { - cpu->pc = 0xBFC01EA0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EC0(CPUState* cpu) { - cpu->pc = 0xBFC01EC0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EC8(CPUState* cpu) { - cpu->pc = 0xBFC01EC8u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01ECC(CPUState* cpu) { - cpu->pc = 0xBFC01ECCu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EEC(CPUState* cpu) { - cpu->pc = 0xBFC01EECu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EF4(CPUState* cpu) { - cpu->pc = 0xBFC01EF4u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01EFC(CPUState* cpu) { - cpu->pc = 0xBFC01EFCu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F18(CPUState* cpu) { - cpu->pc = 0xBFC01F18u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F30(CPUState* cpu) { - cpu->pc = 0xBFC01F30u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F38(CPUState* cpu) { - cpu->pc = 0xBFC01F38u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F44(CPUState* cpu) { - cpu->pc = 0xBFC01F44u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F58(CPUState* cpu) { - cpu->pc = 0xBFC01F58u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F5C(CPUState* cpu) { - cpu->pc = 0xBFC01F5Cu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F64(CPUState* cpu) { - cpu->pc = 0xBFC01F64u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F80(CPUState* cpu) { - cpu->pc = 0xBFC01F80u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01F84(CPUState* cpu) { - cpu->pc = 0xBFC01F84u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FA0(CPUState* cpu) { - cpu->pc = 0xBFC01FA0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FA4(CPUState* cpu) { - cpu->pc = 0xBFC01FA4u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FAC(CPUState* cpu) { - cpu->pc = 0xBFC01FACu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FD0(CPUState* cpu) { - cpu->pc = 0xBFC01FD0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FDC(CPUState* cpu) { - cpu->pc = 0xBFC01FDCu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FE4(CPUState* cpu) { - cpu->pc = 0xBFC01FE4u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FEC(CPUState* cpu) { - cpu->pc = 0xBFC01FECu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC01FF4(CPUState* cpu) { - cpu->pc = 0xBFC01FF4u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02008(CPUState* cpu) { - cpu->pc = 0xBFC02008u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC0200C(CPUState* cpu) { - cpu->pc = 0xBFC0200Cu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02014(CPUState* cpu) { - cpu->pc = 0xBFC02014u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02030(CPUState* cpu) { - cpu->pc = 0xBFC02030u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02038(CPUState* cpu) { - cpu->pc = 0xBFC02038u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02050(CPUState* cpu) { - cpu->pc = 0xBFC02050u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02058(CPUState* cpu) { - cpu->pc = 0xBFC02058u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC0207C(CPUState* cpu) { - cpu->pc = 0xBFC0207Cu; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02088(CPUState* cpu) { - cpu->pc = 0xBFC02088u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02090(CPUState* cpu) { - cpu->pc = 0xBFC02090u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC02098(CPUState* cpu) { - cpu->pc = 0xBFC02098u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC020A0(CPUState* cpu) { - cpu->pc = 0xBFC020A0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC020B0(CPUState* cpu) { - cpu->pc = 0xBFC020B0u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC020C8(CPUState* cpu) { - cpu->pc = 0xBFC020C8u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC01E5C_cont_BFC020D8(CPUState* cpu) { - cpu->pc = 0xBFC020D8u; - SCPH1001_func_1FC01E5C(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC0211C(CPUState* cpu) { - cpu->pc = 0xBFC0211Cu; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02124(CPUState* cpu) { - cpu->pc = 0xBFC02124u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC0212C(CPUState* cpu) { - cpu->pc = 0xBFC0212Cu; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02134(CPUState* cpu) { - cpu->pc = 0xBFC02134u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC0213C(CPUState* cpu) { - cpu->pc = 0xBFC0213Cu; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02144(CPUState* cpu) { - cpu->pc = 0xBFC02144u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02148(CPUState* cpu) { - cpu->pc = 0xBFC02148u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02154(CPUState* cpu) { - cpu->pc = 0xBFC02154u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02160(CPUState* cpu) { - cpu->pc = 0xBFC02160u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC0216C(CPUState* cpu) { - cpu->pc = 0xBFC0216Cu; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02178(CPUState* cpu) { - cpu->pc = 0xBFC02178u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02184(CPUState* cpu) { - cpu->pc = 0xBFC02184u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC0218C(CPUState* cpu) { - cpu->pc = 0xBFC0218Cu; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC02104_cont_BFC02190(CPUState* cpu) { - cpu->pc = 0xBFC02190u; - SCPH1001_func_1FC02104(cpu); -} - -void SCPH1001_func_1FC021A0_cont_BFC021C0(CPUState* cpu) { - cpu->pc = 0xBFC021C0u; - SCPH1001_func_1FC021A0(cpu); -} - -void SCPH1001_func_1FC021A0_cont_BFC021CC(CPUState* cpu) { - cpu->pc = 0xBFC021CCu; - SCPH1001_func_1FC021A0(cpu); -} - -void SCPH1001_func_1FC021A0_cont_BFC021D4(CPUState* cpu) { - cpu->pc = 0xBFC021D4u; - SCPH1001_func_1FC021A0(cpu); -} - -void SCPH1001_func_1FC021A0_cont_BFC021E0(CPUState* cpu) { - cpu->pc = 0xBFC021E0u; - SCPH1001_func_1FC021A0(cpu); -} - -void SCPH1001_func_1FC021A0_cont_BFC021EC(CPUState* cpu) { - cpu->pc = 0xBFC021ECu; - SCPH1001_func_1FC021A0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC022E8(CPUState* cpu) { - cpu->pc = 0xBFC022E8u; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC022F0(CPUState* cpu) { - cpu->pc = 0xBFC022F0u; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC022FC(CPUState* cpu) { - cpu->pc = 0xBFC022FCu; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC02304(CPUState* cpu) { - cpu->pc = 0xBFC02304u; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC0230C(CPUState* cpu) { - cpu->pc = 0xBFC0230Cu; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC02310(CPUState* cpu) { - cpu->pc = 0xBFC02310u; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC022C0_cont_BFC02314(CPUState* cpu) { - cpu->pc = 0xBFC02314u; - SCPH1001_func_1FC022C0(cpu); -} - -void SCPH1001_func_1FC02590_cont_BFC025A0(CPUState* cpu) { - cpu->pc = 0xBFC025A0u; - SCPH1001_func_1FC02590(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC025D8(CPUState* cpu) { - cpu->pc = 0xBFC025D8u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC025E0(CPUState* cpu) { - cpu->pc = 0xBFC025E0u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0260C(CPUState* cpu) { - cpu->pc = 0xBFC0260Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02630(CPUState* cpu) { - cpu->pc = 0xBFC02630u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02638(CPUState* cpu) { - cpu->pc = 0xBFC02638u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02640(CPUState* cpu) { - cpu->pc = 0xBFC02640u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02644(CPUState* cpu) { - cpu->pc = 0xBFC02644u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0264C(CPUState* cpu) { - cpu->pc = 0xBFC0264Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02654(CPUState* cpu) { - cpu->pc = 0xBFC02654u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0265C(CPUState* cpu) { - cpu->pc = 0xBFC0265Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02670(CPUState* cpu) { - cpu->pc = 0xBFC02670u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0267C(CPUState* cpu) { - cpu->pc = 0xBFC0267Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02684(CPUState* cpu) { - cpu->pc = 0xBFC02684u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0268C(CPUState* cpu) { - cpu->pc = 0xBFC0268Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0269C(CPUState* cpu) { - cpu->pc = 0xBFC0269Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026AC(CPUState* cpu) { - cpu->pc = 0xBFC026ACu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026B4(CPUState* cpu) { - cpu->pc = 0xBFC026B4u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026C0(CPUState* cpu) { - cpu->pc = 0xBFC026C0u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026C8(CPUState* cpu) { - cpu->pc = 0xBFC026C8u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026D0(CPUState* cpu) { - cpu->pc = 0xBFC026D0u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026D8(CPUState* cpu) { - cpu->pc = 0xBFC026D8u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC026E4(CPUState* cpu) { - cpu->pc = 0xBFC026E4u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02700(CPUState* cpu) { - cpu->pc = 0xBFC02700u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC0270C(CPUState* cpu) { - cpu->pc = 0xBFC0270Cu; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC025B0_cont_BFC02720(CPUState* cpu) { - cpu->pc = 0xBFC02720u; - SCPH1001_func_1FC025B0(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02768(CPUState* cpu) { - cpu->pc = 0xBFC02768u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02770(CPUState* cpu) { - cpu->pc = 0xBFC02770u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0279C(CPUState* cpu) { - cpu->pc = 0xBFC0279Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027C0(CPUState* cpu) { - cpu->pc = 0xBFC027C0u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027CC(CPUState* cpu) { - cpu->pc = 0xBFC027CCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027DC(CPUState* cpu) { - cpu->pc = 0xBFC027DCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027E0(CPUState* cpu) { - cpu->pc = 0xBFC027E0u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027E8(CPUState* cpu) { - cpu->pc = 0xBFC027E8u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027F0(CPUState* cpu) { - cpu->pc = 0xBFC027F0u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027F4(CPUState* cpu) { - cpu->pc = 0xBFC027F4u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC027FC(CPUState* cpu) { - cpu->pc = 0xBFC027FCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02804(CPUState* cpu) { - cpu->pc = 0xBFC02804u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0280C(CPUState* cpu) { - cpu->pc = 0xBFC0280Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02820(CPUState* cpu) { - cpu->pc = 0xBFC02820u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0282C(CPUState* cpu) { - cpu->pc = 0xBFC0282Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02834(CPUState* cpu) { - cpu->pc = 0xBFC02834u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0283C(CPUState* cpu) { - cpu->pc = 0xBFC0283Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0284C(CPUState* cpu) { - cpu->pc = 0xBFC0284Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC0285C(CPUState* cpu) { - cpu->pc = 0xBFC0285Cu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02864(CPUState* cpu) { - cpu->pc = 0xBFC02864u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02870(CPUState* cpu) { - cpu->pc = 0xBFC02870u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02878(CPUState* cpu) { - cpu->pc = 0xBFC02878u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02880(CPUState* cpu) { - cpu->pc = 0xBFC02880u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02888(CPUState* cpu) { - cpu->pc = 0xBFC02888u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC02894(CPUState* cpu) { - cpu->pc = 0xBFC02894u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC028A8(CPUState* cpu) { - cpu->pc = 0xBFC028A8u; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC028AC(CPUState* cpu) { - cpu->pc = 0xBFC028ACu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC028CC(CPUState* cpu) { - cpu->pc = 0xBFC028CCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC028DC(CPUState* cpu) { - cpu->pc = 0xBFC028DCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02738_cont_BFC028FC(CPUState* cpu) { - cpu->pc = 0xBFC028FCu; - SCPH1001_func_1FC02738(cpu); -} - -void SCPH1001_func_1FC02918_cont_BFC02920(CPUState* cpu) { - cpu->pc = 0xBFC02920u; - SCPH1001_func_1FC02918(cpu); -} - -void SCPH1001_func_1FC02918_cont_BFC02928(CPUState* cpu) { - cpu->pc = 0xBFC02928u; - SCPH1001_func_1FC02918(cpu); -} - -void SCPH1001_func_1FC02918_cont_BFC0292C(CPUState* cpu) { - cpu->pc = 0xBFC0292Cu; - SCPH1001_func_1FC02918(cpu); -} - -void SCPH1001_func_1FC02934_cont_BFC0293C(CPUState* cpu) { - cpu->pc = 0xBFC0293Cu; - SCPH1001_func_1FC02934(cpu); -} - -void SCPH1001_func_1FC02934_cont_BFC02944(CPUState* cpu) { - cpu->pc = 0xBFC02944u; - SCPH1001_func_1FC02934(cpu); -} - -void SCPH1001_func_1FC02934_cont_BFC02948(CPUState* cpu) { - cpu->pc = 0xBFC02948u; - SCPH1001_func_1FC02934(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC0297C(CPUState* cpu) { - cpu->pc = 0xBFC0297Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02984(CPUState* cpu) { - cpu->pc = 0xBFC02984u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029B0(CPUState* cpu) { - cpu->pc = 0xBFC029B0u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029D4(CPUState* cpu) { - cpu->pc = 0xBFC029D4u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029E0(CPUState* cpu) { - cpu->pc = 0xBFC029E0u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029F0(CPUState* cpu) { - cpu->pc = 0xBFC029F0u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029F4(CPUState* cpu) { - cpu->pc = 0xBFC029F4u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC029FC(CPUState* cpu) { - cpu->pc = 0xBFC029FCu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A0C(CPUState* cpu) { - cpu->pc = 0xBFC02A0Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A1C(CPUState* cpu) { - cpu->pc = 0xBFC02A1Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A2C(CPUState* cpu) { - cpu->pc = 0xBFC02A2Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A38(CPUState* cpu) { - cpu->pc = 0xBFC02A38u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A40(CPUState* cpu) { - cpu->pc = 0xBFC02A40u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A48(CPUState* cpu) { - cpu->pc = 0xBFC02A48u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A50(CPUState* cpu) { - cpu->pc = 0xBFC02A50u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A54(CPUState* cpu) { - cpu->pc = 0xBFC02A54u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A5C(CPUState* cpu) { - cpu->pc = 0xBFC02A5Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A68(CPUState* cpu) { - cpu->pc = 0xBFC02A68u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A88(CPUState* cpu) { - cpu->pc = 0xBFC02A88u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02A8C(CPUState* cpu) { - cpu->pc = 0xBFC02A8Cu; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02AA8(CPUState* cpu) { - cpu->pc = 0xBFC02AA8u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02AB4(CPUState* cpu) { - cpu->pc = 0xBFC02AB4u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02AC0(CPUState* cpu) { - cpu->pc = 0xBFC02AC0u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02950_cont_BFC02AD4(CPUState* cpu) { - cpu->pc = 0xBFC02AD4u; - SCPH1001_func_1FC02950(cpu); -} - -void SCPH1001_func_1FC02AF0_cont_BFC02B00(CPUState* cpu) { - cpu->pc = 0xBFC02B00u; - SCPH1001_func_1FC02AF0(cpu); -} - -void SCPH1001_func_1FC02B10_cont_BFC02B28(CPUState* cpu) { - cpu->pc = 0xBFC02B28u; - SCPH1001_func_1FC02B10(cpu); -} - -void SCPH1001_func_1FC02B50_cont_BFC02B58(CPUState* cpu) { - cpu->pc = 0xBFC02B58u; - SCPH1001_func_1FC02B50(cpu); -} - -void SCPH1001_func_1FC02B50_cont_BFC02B60(CPUState* cpu) { - cpu->pc = 0xBFC02B60u; - SCPH1001_func_1FC02B50(cpu); -} - -void SCPH1001_func_1FC02B50_cont_BFC02B68(CPUState* cpu) { - cpu->pc = 0xBFC02B68u; - SCPH1001_func_1FC02B50(cpu); -} - -void SCPH1001_func_1FC02B50_cont_BFC02B80(CPUState* cpu) { - cpu->pc = 0xBFC02B80u; - SCPH1001_func_1FC02B50(cpu); -} - -void SCPH1001_func_1FC02B8C_cont_BFC02B94(CPUState* cpu) { - cpu->pc = 0xBFC02B94u; - SCPH1001_func_1FC02B8C(cpu); -} - -void SCPH1001_func_1FC02B8C_cont_BFC02B9C(CPUState* cpu) { - cpu->pc = 0xBFC02B9Cu; - SCPH1001_func_1FC02B8C(cpu); -} - -void SCPH1001_func_1FC02B8C_cont_BFC02BA4(CPUState* cpu) { - cpu->pc = 0xBFC02BA4u; - SCPH1001_func_1FC02B8C(cpu); -} - -void SCPH1001_func_1FC02B8C_cont_BFC02BAC(CPUState* cpu) { - cpu->pc = 0xBFC02BACu; - SCPH1001_func_1FC02B8C(cpu); -} - -void SCPH1001_func_1FC02B8C_cont_BFC02BBC(CPUState* cpu) { - cpu->pc = 0xBFC02BBCu; - SCPH1001_func_1FC02B8C(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02BD0(CPUState* cpu) { - cpu->pc = 0xBFC02BD0u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02BDC(CPUState* cpu) { - cpu->pc = 0xBFC02BDCu; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02BE4(CPUState* cpu) { - cpu->pc = 0xBFC02BE4u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02BF4(CPUState* cpu) { - cpu->pc = 0xBFC02BF4u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C04(CPUState* cpu) { - cpu->pc = 0xBFC02C04u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C1C(CPUState* cpu) { - cpu->pc = 0xBFC02C1Cu; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C24(CPUState* cpu) { - cpu->pc = 0xBFC02C24u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C2C(CPUState* cpu) { - cpu->pc = 0xBFC02C2Cu; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C44(CPUState* cpu) { - cpu->pc = 0xBFC02C44u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02BC8_cont_BFC02C48(CPUState* cpu) { - cpu->pc = 0xBFC02C48u; - SCPH1001_func_1FC02BC8(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C58(CPUState* cpu) { - cpu->pc = 0xBFC02C58u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C60(CPUState* cpu) { - cpu->pc = 0xBFC02C60u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C6C(CPUState* cpu) { - cpu->pc = 0xBFC02C6Cu; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C74(CPUState* cpu) { - cpu->pc = 0xBFC02C74u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C88(CPUState* cpu) { - cpu->pc = 0xBFC02C88u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C94(CPUState* cpu) { - cpu->pc = 0xBFC02C94u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02C9C(CPUState* cpu) { - cpu->pc = 0xBFC02C9Cu; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02CA4(CPUState* cpu) { - cpu->pc = 0xBFC02CA4u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02C50_cont_BFC02CB4(CPUState* cpu) { - cpu->pc = 0xBFC02CB4u; - SCPH1001_func_1FC02C50(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02CC8(CPUState* cpu) { - cpu->pc = 0xBFC02CC8u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02CD0(CPUState* cpu) { - cpu->pc = 0xBFC02CD0u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02CDC(CPUState* cpu) { - cpu->pc = 0xBFC02CDCu; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02CE4(CPUState* cpu) { - cpu->pc = 0xBFC02CE4u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02CF4(CPUState* cpu) { - cpu->pc = 0xBFC02CF4u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02D00(CPUState* cpu) { - cpu->pc = 0xBFC02D00u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02D08(CPUState* cpu) { - cpu->pc = 0xBFC02D08u; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02CC0_cont_BFC02D0C(CPUState* cpu) { - cpu->pc = 0xBFC02D0Cu; - SCPH1001_func_1FC02CC0(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D4C(CPUState* cpu) { - cpu->pc = 0xBFC02D4Cu; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D58(CPUState* cpu) { - cpu->pc = 0xBFC02D58u; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D64(CPUState* cpu) { - cpu->pc = 0xBFC02D64u; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D6C(CPUState* cpu) { - cpu->pc = 0xBFC02D6Cu; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D78(CPUState* cpu) { - cpu->pc = 0xBFC02D78u; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D7C(CPUState* cpu) { - cpu->pc = 0xBFC02D7Cu; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D84(CPUState* cpu) { - cpu->pc = 0xBFC02D84u; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D8C(CPUState* cpu) { - cpu->pc = 0xBFC02D8Cu; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02D20_cont_BFC02D90(CPUState* cpu) { - cpu->pc = 0xBFC02D90u; - SCPH1001_func_1FC02D20(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02DE8(CPUState* cpu) { - cpu->pc = 0xBFC02DE8u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02DF4(CPUState* cpu) { - cpu->pc = 0xBFC02DF4u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02DFC(CPUState* cpu) { - cpu->pc = 0xBFC02DFCu; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E0C(CPUState* cpu) { - cpu->pc = 0xBFC02E0Cu; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E10(CPUState* cpu) { - cpu->pc = 0xBFC02E10u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E28(CPUState* cpu) { - cpu->pc = 0xBFC02E28u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E30(CPUState* cpu) { - cpu->pc = 0xBFC02E30u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E38(CPUState* cpu) { - cpu->pc = 0xBFC02E38u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E3C(CPUState* cpu) { - cpu->pc = 0xBFC02E3Cu; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E48(CPUState* cpu) { - cpu->pc = 0xBFC02E48u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E60(CPUState* cpu) { - cpu->pc = 0xBFC02E60u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E68(CPUState* cpu) { - cpu->pc = 0xBFC02E68u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E70(CPUState* cpu) { - cpu->pc = 0xBFC02E70u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02DAC_cont_BFC02E74(CPUState* cpu) { - cpu->pc = 0xBFC02E74u; - SCPH1001_func_1FC02DAC(cpu); -} - -void SCPH1001_func_1FC02EA0_cont_BFC02EC8(CPUState* cpu) { - cpu->pc = 0xBFC02EC8u; - SCPH1001_func_1FC02EA0(cpu); -} - -void SCPH1001_func_1FC02EA0_cont_BFC02ED4(CPUState* cpu) { - cpu->pc = 0xBFC02ED4u; - SCPH1001_func_1FC02EA0(cpu); -} - -void SCPH1001_func_1FC02EDC_cont_BFC02F04(CPUState* cpu) { - cpu->pc = 0xBFC02F04u; - SCPH1001_func_1FC02EDC(cpu); -} - -void SCPH1001_func_1FC02EDC_cont_BFC02F10(CPUState* cpu) { - cpu->pc = 0xBFC02F10u; - SCPH1001_func_1FC02EDC(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F58(CPUState* cpu) { - cpu->pc = 0xBFC02F58u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F64(CPUState* cpu) { - cpu->pc = 0xBFC02F64u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F70(CPUState* cpu) { - cpu->pc = 0xBFC02F70u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F74(CPUState* cpu) { - cpu->pc = 0xBFC02F74u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F84(CPUState* cpu) { - cpu->pc = 0xBFC02F84u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02F94(CPUState* cpu) { - cpu->pc = 0xBFC02F94u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02FB4(CPUState* cpu) { - cpu->pc = 0xBFC02FB4u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02FD0(CPUState* cpu) { - cpu->pc = 0xBFC02FD0u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02FD8(CPUState* cpu) { - cpu->pc = 0xBFC02FD8u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02FE0(CPUState* cpu) { - cpu->pc = 0xBFC02FE0u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC02FF0(CPUState* cpu) { - cpu->pc = 0xBFC02FF0u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03014(CPUState* cpu) { - cpu->pc = 0xBFC03014u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC0301C(CPUState* cpu) { - cpu->pc = 0xBFC0301Cu; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03024(CPUState* cpu) { - cpu->pc = 0xBFC03024u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03034(CPUState* cpu) { - cpu->pc = 0xBFC03034u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03038(CPUState* cpu) { - cpu->pc = 0xBFC03038u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03040(CPUState* cpu) { - cpu->pc = 0xBFC03040u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03050(CPUState* cpu) { - cpu->pc = 0xBFC03050u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03064(CPUState* cpu) { - cpu->pc = 0xBFC03064u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC0306C(CPUState* cpu) { - cpu->pc = 0xBFC0306Cu; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC02F20_cont_BFC03070(CPUState* cpu) { - cpu->pc = 0xBFC03070u; - SCPH1001_func_1FC02F20(cpu); -} - -void SCPH1001_func_1FC03098_cont_BFC030C0(CPUState* cpu) { - cpu->pc = 0xBFC030C0u; - SCPH1001_func_1FC03098(cpu); -} - -void SCPH1001_func_1FC03098_cont_BFC030CC(CPUState* cpu) { - cpu->pc = 0xBFC030CCu; - SCPH1001_func_1FC03098(cpu); -} - -void SCPH1001_func_1FC03098_cont_BFC030E4(CPUState* cpu) { - cpu->pc = 0xBFC030E4u; - SCPH1001_func_1FC03098(cpu); -} - -void SCPH1001_func_1FC03098_cont_BFC030F4(CPUState* cpu) { - cpu->pc = 0xBFC030F4u; - SCPH1001_func_1FC03098(cpu); -} - -void SCPH1001_func_1FC03104_cont_BFC0314C(CPUState* cpu) { - cpu->pc = 0xBFC0314Cu; - SCPH1001_func_1FC03104(cpu); -} - -void SCPH1001_func_1FC03104_cont_BFC03160(CPUState* cpu) { - cpu->pc = 0xBFC03160u; - SCPH1001_func_1FC03104(cpu); -} - -void SCPH1001_func_1FC03104_cont_BFC03178(CPUState* cpu) { - cpu->pc = 0xBFC03178u; - SCPH1001_func_1FC03104(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC03198(CPUState* cpu) { - cpu->pc = 0xBFC03198u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031A0(CPUState* cpu) { - cpu->pc = 0xBFC031A0u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031A8(CPUState* cpu) { - cpu->pc = 0xBFC031A8u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031B8(CPUState* cpu) { - cpu->pc = 0xBFC031B8u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031C8(CPUState* cpu) { - cpu->pc = 0xBFC031C8u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031E0(CPUState* cpu) { - cpu->pc = 0xBFC031E0u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03190_cont_BFC031F4(CPUState* cpu) { - cpu->pc = 0xBFC031F4u; - SCPH1001_func_1FC03190(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03208(CPUState* cpu) { - cpu->pc = 0xBFC03208u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03210(CPUState* cpu) { - cpu->pc = 0xBFC03210u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03218(CPUState* cpu) { - cpu->pc = 0xBFC03218u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03228(CPUState* cpu) { - cpu->pc = 0xBFC03228u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03238(CPUState* cpu) { - cpu->pc = 0xBFC03238u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03250(CPUState* cpu) { - cpu->pc = 0xBFC03250u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC0325C(CPUState* cpu) { - cpu->pc = 0xBFC0325Cu; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC03268(CPUState* cpu) { - cpu->pc = 0xBFC03268u; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03200_cont_BFC0327C(CPUState* cpu) { - cpu->pc = 0xBFC0327Cu; - SCPH1001_func_1FC03200(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC03290(CPUState* cpu) { - cpu->pc = 0xBFC03290u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC03298(CPUState* cpu) { - cpu->pc = 0xBFC03298u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032A0(CPUState* cpu) { - cpu->pc = 0xBFC032A0u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032A8(CPUState* cpu) { - cpu->pc = 0xBFC032A8u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032B0(CPUState* cpu) { - cpu->pc = 0xBFC032B0u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032B8(CPUState* cpu) { - cpu->pc = 0xBFC032B8u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032C0(CPUState* cpu) { - cpu->pc = 0xBFC032C0u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032D4(CPUState* cpu) { - cpu->pc = 0xBFC032D4u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032D8(CPUState* cpu) { - cpu->pc = 0xBFC032D8u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032E0(CPUState* cpu) { - cpu->pc = 0xBFC032E0u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032E8(CPUState* cpu) { - cpu->pc = 0xBFC032E8u; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03288_cont_BFC032FC(CPUState* cpu) { - cpu->pc = 0xBFC032FCu; - SCPH1001_func_1FC03288(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03318(CPUState* cpu) { - cpu->pc = 0xBFC03318u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03320(CPUState* cpu) { - cpu->pc = 0xBFC03320u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03328(CPUState* cpu) { - cpu->pc = 0xBFC03328u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03330(CPUState* cpu) { - cpu->pc = 0xBFC03330u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03338(CPUState* cpu) { - cpu->pc = 0xBFC03338u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03340(CPUState* cpu) { - cpu->pc = 0xBFC03340u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC0334C(CPUState* cpu) { - cpu->pc = 0xBFC0334Cu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03354(CPUState* cpu) { - cpu->pc = 0xBFC03354u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03368(CPUState* cpu) { - cpu->pc = 0xBFC03368u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC0336C(CPUState* cpu) { - cpu->pc = 0xBFC0336Cu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03374(CPUState* cpu) { - cpu->pc = 0xBFC03374u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC0337C(CPUState* cpu) { - cpu->pc = 0xBFC0337Cu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC03388(CPUState* cpu) { - cpu->pc = 0xBFC03388u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC0339C(CPUState* cpu) { - cpu->pc = 0xBFC0339Cu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC033A4(CPUState* cpu) { - cpu->pc = 0xBFC033A4u; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC033AC(CPUState* cpu) { - cpu->pc = 0xBFC033ACu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC03310_cont_BFC033BC(CPUState* cpu) { - cpu->pc = 0xBFC033BCu; - SCPH1001_func_1FC03310(cpu); -} - -void SCPH1001_func_1FC033C8_cont_BFC033D0(CPUState* cpu) { - cpu->pc = 0xBFC033D0u; - SCPH1001_func_1FC033C8(cpu); -} - -void SCPH1001_func_1FC033C8_cont_BFC033D8(CPUState* cpu) { - cpu->pc = 0xBFC033D8u; - SCPH1001_func_1FC033C8(cpu); -} - -void SCPH1001_func_1FC033C8_cont_BFC033E0(CPUState* cpu) { - cpu->pc = 0xBFC033E0u; - SCPH1001_func_1FC033C8(cpu); -} - -void SCPH1001_func_1FC033C8_cont_BFC033F8(CPUState* cpu) { - cpu->pc = 0xBFC033F8u; - SCPH1001_func_1FC033C8(cpu); -} - -void SCPH1001_func_1FC033C8_cont_BFC0340C(CPUState* cpu) { - cpu->pc = 0xBFC0340Cu; - SCPH1001_func_1FC033C8(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03420(CPUState* cpu) { - cpu->pc = 0xBFC03420u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03428(CPUState* cpu) { - cpu->pc = 0xBFC03428u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03430(CPUState* cpu) { - cpu->pc = 0xBFC03430u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC0343C(CPUState* cpu) { - cpu->pc = 0xBFC0343Cu; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03450(CPUState* cpu) { - cpu->pc = 0xBFC03450u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03460(CPUState* cpu) { - cpu->pc = 0xBFC03460u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03474(CPUState* cpu) { - cpu->pc = 0xBFC03474u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC0347C(CPUState* cpu) { - cpu->pc = 0xBFC0347Cu; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03418_cont_BFC03488(CPUState* cpu) { - cpu->pc = 0xBFC03488u; - SCPH1001_func_1FC03418(cpu); -} - -void SCPH1001_func_1FC03494_cont_BFC0349C(CPUState* cpu) { - cpu->pc = 0xBFC0349Cu; - SCPH1001_func_1FC03494(cpu); -} - -void SCPH1001_func_1FC03494_cont_BFC034A4(CPUState* cpu) { - cpu->pc = 0xBFC034A4u; - SCPH1001_func_1FC03494(cpu); -} - -void SCPH1001_func_1FC03494_cont_BFC034B4(CPUState* cpu) { - cpu->pc = 0xBFC034B4u; - SCPH1001_func_1FC03494(cpu); -} - -void SCPH1001_func_1FC03494_cont_BFC034C4(CPUState* cpu) { - cpu->pc = 0xBFC034C4u; - SCPH1001_func_1FC03494(cpu); -} - -void SCPH1001_func_1FC03494_cont_BFC034C8(CPUState* cpu) { - cpu->pc = 0xBFC034C8u; - SCPH1001_func_1FC03494(cpu); -} - -void SCPH1001_func_1FC034D0_cont_BFC034DC(CPUState* cpu) { - cpu->pc = 0xBFC034DCu; - SCPH1001_func_1FC034D0(cpu); -} - -void SCPH1001_func_1FC034D0_cont_BFC034E4(CPUState* cpu) { - cpu->pc = 0xBFC034E4u; - SCPH1001_func_1FC034D0(cpu); -} - -void SCPH1001_func_1FC034D0_cont_BFC034F4(CPUState* cpu) { - cpu->pc = 0xBFC034F4u; - SCPH1001_func_1FC034D0(cpu); -} - -void SCPH1001_func_1FC034D0_cont_BFC034FC(CPUState* cpu) { - cpu->pc = 0xBFC034FCu; - SCPH1001_func_1FC034D0(cpu); -} - -void SCPH1001_func_1FC034D0_cont_BFC03508(CPUState* cpu) { - cpu->pc = 0xBFC03508u; - SCPH1001_func_1FC034D0(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03520(CPUState* cpu) { - cpu->pc = 0xBFC03520u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03528(CPUState* cpu) { - cpu->pc = 0xBFC03528u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03538(CPUState* cpu) { - cpu->pc = 0xBFC03538u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03548(CPUState* cpu) { - cpu->pc = 0xBFC03548u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC0354C(CPUState* cpu) { - cpu->pc = 0xBFC0354Cu; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC0355C(CPUState* cpu) { - cpu->pc = 0xBFC0355Cu; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03564(CPUState* cpu) { - cpu->pc = 0xBFC03564u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC03514_cont_BFC03570(CPUState* cpu) { - cpu->pc = 0xBFC03570u; - SCPH1001_func_1FC03514(cpu); -} - -void SCPH1001_func_1FC0357C_cont_BFC03588(CPUState* cpu) { - cpu->pc = 0xBFC03588u; - SCPH1001_func_1FC0357C(cpu); -} - -void SCPH1001_func_1FC0357C_cont_BFC03590(CPUState* cpu) { - cpu->pc = 0xBFC03590u; - SCPH1001_func_1FC0357C(cpu); -} - -void SCPH1001_func_1FC0357C_cont_BFC035A0(CPUState* cpu) { - cpu->pc = 0xBFC035A0u; - SCPH1001_func_1FC0357C(cpu); -} - -void SCPH1001_func_1FC0357C_cont_BFC035A8(CPUState* cpu) { - cpu->pc = 0xBFC035A8u; - SCPH1001_func_1FC0357C(cpu); -} - -void SCPH1001_func_1FC0357C_cont_BFC035B4(CPUState* cpu) { - cpu->pc = 0xBFC035B4u; - SCPH1001_func_1FC0357C(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC035CC(CPUState* cpu) { - cpu->pc = 0xBFC035CCu; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC035D4(CPUState* cpu) { - cpu->pc = 0xBFC035D4u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC035E4(CPUState* cpu) { - cpu->pc = 0xBFC035E4u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC035F4(CPUState* cpu) { - cpu->pc = 0xBFC035F4u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC035F8(CPUState* cpu) { - cpu->pc = 0xBFC035F8u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC03608(CPUState* cpu) { - cpu->pc = 0xBFC03608u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC03610(CPUState* cpu) { - cpu->pc = 0xBFC03610u; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC035C0_cont_BFC0361C(CPUState* cpu) { - cpu->pc = 0xBFC0361Cu; - SCPH1001_func_1FC035C0(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03638(CPUState* cpu) { - cpu->pc = 0xBFC03638u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03640(CPUState* cpu) { - cpu->pc = 0xBFC03640u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03648(CPUState* cpu) { - cpu->pc = 0xBFC03648u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03650(CPUState* cpu) { - cpu->pc = 0xBFC03650u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03658(CPUState* cpu) { - cpu->pc = 0xBFC03658u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03660(CPUState* cpu) { - cpu->pc = 0xBFC03660u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03670(CPUState* cpu) { - cpu->pc = 0xBFC03670u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03680(CPUState* cpu) { - cpu->pc = 0xBFC03680u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC03688(CPUState* cpu) { - cpu->pc = 0xBFC03688u; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03628_cont_BFC0368C(CPUState* cpu) { - cpu->pc = 0xBFC0368Cu; - SCPH1001_func_1FC03628(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036A4(CPUState* cpu) { - cpu->pc = 0xBFC036A4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036AC(CPUState* cpu) { - cpu->pc = 0xBFC036ACu; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036B4(CPUState* cpu) { - cpu->pc = 0xBFC036B4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036BC(CPUState* cpu) { - cpu->pc = 0xBFC036BCu; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036C4(CPUState* cpu) { - cpu->pc = 0xBFC036C4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036D4(CPUState* cpu) { - cpu->pc = 0xBFC036D4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036E4(CPUState* cpu) { - cpu->pc = 0xBFC036E4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC03694_cont_BFC036F4(CPUState* cpu) { - cpu->pc = 0xBFC036F4u; - SCPH1001_func_1FC03694(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0370C(CPUState* cpu) { - cpu->pc = 0xBFC0370Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC03714(CPUState* cpu) { - cpu->pc = 0xBFC03714u; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0371C(CPUState* cpu) { - cpu->pc = 0xBFC0371Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC03724(CPUState* cpu) { - cpu->pc = 0xBFC03724u; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0372C(CPUState* cpu) { - cpu->pc = 0xBFC0372Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0373C(CPUState* cpu) { - cpu->pc = 0xBFC0373Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0374C(CPUState* cpu) { - cpu->pc = 0xBFC0374Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC036FC_cont_BFC0375C(CPUState* cpu) { - cpu->pc = 0xBFC0375Cu; - SCPH1001_func_1FC036FC(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03778(CPUState* cpu) { - cpu->pc = 0xBFC03778u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03788(CPUState* cpu) { - cpu->pc = 0xBFC03788u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC0379C(CPUState* cpu) { - cpu->pc = 0xBFC0379Cu; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037AC(CPUState* cpu) { - cpu->pc = 0xBFC037ACu; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037B8(CPUState* cpu) { - cpu->pc = 0xBFC037B8u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037C0(CPUState* cpu) { - cpu->pc = 0xBFC037C0u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037C8(CPUState* cpu) { - cpu->pc = 0xBFC037C8u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037D0(CPUState* cpu) { - cpu->pc = 0xBFC037D0u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037D8(CPUState* cpu) { - cpu->pc = 0xBFC037D8u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037E8(CPUState* cpu) { - cpu->pc = 0xBFC037E8u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC037F8(CPUState* cpu) { - cpu->pc = 0xBFC037F8u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03800(CPUState* cpu) { - cpu->pc = 0xBFC03800u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC0380C(CPUState* cpu) { - cpu->pc = 0xBFC0380Cu; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03814(CPUState* cpu) { - cpu->pc = 0xBFC03814u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03824(CPUState* cpu) { - cpu->pc = 0xBFC03824u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC0382C(CPUState* cpu) { - cpu->pc = 0xBFC0382Cu; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03834(CPUState* cpu) { - cpu->pc = 0xBFC03834u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03844(CPUState* cpu) { - cpu->pc = 0xBFC03844u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03854(CPUState* cpu) { - cpu->pc = 0xBFC03854u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC0385C(CPUState* cpu) { - cpu->pc = 0xBFC0385Cu; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03864(CPUState* cpu) { - cpu->pc = 0xBFC03864u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03870(CPUState* cpu) { - cpu->pc = 0xBFC03870u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03764_cont_BFC03884(CPUState* cpu) { - cpu->pc = 0xBFC03884u; - SCPH1001_func_1FC03764(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038A8(CPUState* cpu) { - cpu->pc = 0xBFC038A8u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038B8(CPUState* cpu) { - cpu->pc = 0xBFC038B8u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038C8(CPUState* cpu) { - cpu->pc = 0xBFC038C8u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038D0(CPUState* cpu) { - cpu->pc = 0xBFC038D0u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038D8(CPUState* cpu) { - cpu->pc = 0xBFC038D8u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038E4(CPUState* cpu) { - cpu->pc = 0xBFC038E4u; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038EC(CPUState* cpu) { - cpu->pc = 0xBFC038ECu; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03894_cont_BFC038FC(CPUState* cpu) { - cpu->pc = 0xBFC038FCu; - SCPH1001_func_1FC03894(cpu); -} - -void SCPH1001_func_1FC03910_cont_BFC03930(CPUState* cpu) { - cpu->pc = 0xBFC03930u; - SCPH1001_func_1FC03910(cpu); -} - -void SCPH1001_func_1FC03910_cont_BFC03944(CPUState* cpu) { - cpu->pc = 0xBFC03944u; - SCPH1001_func_1FC03910(cpu); -} - -void SCPH1001_func_1FC03910_cont_BFC03948(CPUState* cpu) { - cpu->pc = 0xBFC03948u; - SCPH1001_func_1FC03910(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039C4(CPUState* cpu) { - cpu->pc = 0xBFC039C4u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039CC(CPUState* cpu) { - cpu->pc = 0xBFC039CCu; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039D4(CPUState* cpu) { - cpu->pc = 0xBFC039D4u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039E0(CPUState* cpu) { - cpu->pc = 0xBFC039E0u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039EC(CPUState* cpu) { - cpu->pc = 0xBFC039ECu; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039F4(CPUState* cpu) { - cpu->pc = 0xBFC039F4u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC039FC(CPUState* cpu) { - cpu->pc = 0xBFC039FCu; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC03A04(CPUState* cpu) { - cpu->pc = 0xBFC03A04u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC039B0_cont_BFC03A08(CPUState* cpu) { - cpu->pc = 0xBFC03A08u; - SCPH1001_func_1FC039B0(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A2C(CPUState* cpu) { - cpu->pc = 0xBFC03A2Cu; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A34(CPUState* cpu) { - cpu->pc = 0xBFC03A34u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A3C(CPUState* cpu) { - cpu->pc = 0xBFC03A3Cu; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A48(CPUState* cpu) { - cpu->pc = 0xBFC03A48u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A54(CPUState* cpu) { - cpu->pc = 0xBFC03A54u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A5C(CPUState* cpu) { - cpu->pc = 0xBFC03A5Cu; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A64(CPUState* cpu) { - cpu->pc = 0xBFC03A64u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A68(CPUState* cpu) { - cpu->pc = 0xBFC03A68u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A7C(CPUState* cpu) { - cpu->pc = 0xBFC03A7Cu; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A88(CPUState* cpu) { - cpu->pc = 0xBFC03A88u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A90(CPUState* cpu) { - cpu->pc = 0xBFC03A90u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03A18_cont_BFC03A94(CPUState* cpu) { - cpu->pc = 0xBFC03A94u; - SCPH1001_func_1FC03A18(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03ACC(CPUState* cpu) { - cpu->pc = 0xBFC03ACCu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03AD8(CPUState* cpu) { - cpu->pc = 0xBFC03AD8u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03AE0(CPUState* cpu) { - cpu->pc = 0xBFC03AE0u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03AF4(CPUState* cpu) { - cpu->pc = 0xBFC03AF4u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03AFC(CPUState* cpu) { - cpu->pc = 0xBFC03AFCu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B08(CPUState* cpu) { - cpu->pc = 0xBFC03B08u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B10(CPUState* cpu) { - cpu->pc = 0xBFC03B10u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B20(CPUState* cpu) { - cpu->pc = 0xBFC03B20u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B28(CPUState* cpu) { - cpu->pc = 0xBFC03B28u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B38(CPUState* cpu) { - cpu->pc = 0xBFC03B38u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B40(CPUState* cpu) { - cpu->pc = 0xBFC03B40u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B48(CPUState* cpu) { - cpu->pc = 0xBFC03B48u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B58(CPUState* cpu) { - cpu->pc = 0xBFC03B58u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B68(CPUState* cpu) { - cpu->pc = 0xBFC03B68u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B78(CPUState* cpu) { - cpu->pc = 0xBFC03B78u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03B9C(CPUState* cpu) { - cpu->pc = 0xBFC03B9Cu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03BB0(CPUState* cpu) { - cpu->pc = 0xBFC03BB0u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03BBC(CPUState* cpu) { - cpu->pc = 0xBFC03BBCu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03BE4(CPUState* cpu) { - cpu->pc = 0xBFC03BE4u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03BEC(CPUState* cpu) { - cpu->pc = 0xBFC03BECu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03BF8(CPUState* cpu) { - cpu->pc = 0xBFC03BF8u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C0C(CPUState* cpu) { - cpu->pc = 0xBFC03C0Cu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C14(CPUState* cpu) { - cpu->pc = 0xBFC03C14u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C24(CPUState* cpu) { - cpu->pc = 0xBFC03C24u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C2C(CPUState* cpu) { - cpu->pc = 0xBFC03C2Cu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C5C(CPUState* cpu) { - cpu->pc = 0xBFC03C5Cu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C74(CPUState* cpu) { - cpu->pc = 0xBFC03C74u; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03AA4_cont_BFC03C7C(CPUState* cpu) { - cpu->pc = 0xBFC03C7Cu; - SCPH1001_func_1FC03AA4(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CAC(CPUState* cpu) { - cpu->pc = 0xBFC03CACu; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CB8(CPUState* cpu) { - cpu->pc = 0xBFC03CB8u; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CC0(CPUState* cpu) { - cpu->pc = 0xBFC03CC0u; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CC4(CPUState* cpu) { - cpu->pc = 0xBFC03CC4u; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CD4(CPUState* cpu) { - cpu->pc = 0xBFC03CD4u; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03C90_cont_BFC03CD8(CPUState* cpu) { - cpu->pc = 0xBFC03CD8u; - SCPH1001_func_1FC03C90(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D10(CPUState* cpu) { - cpu->pc = 0xBFC03D10u; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D18(CPUState* cpu) { - cpu->pc = 0xBFC03D18u; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D28(CPUState* cpu) { - cpu->pc = 0xBFC03D28u; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D38(CPUState* cpu) { - cpu->pc = 0xBFC03D38u; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D4C(CPUState* cpu) { - cpu->pc = 0xBFC03D4Cu; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03CF0_cont_BFC03D60(CPUState* cpu) { - cpu->pc = 0xBFC03D60u; - SCPH1001_func_1FC03CF0(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03DBC(CPUState* cpu) { - cpu->pc = 0xBFC03DBCu; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03DCC(CPUState* cpu) { - cpu->pc = 0xBFC03DCCu; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03DD4(CPUState* cpu) { - cpu->pc = 0xBFC03DD4u; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03DDC(CPUState* cpu) { - cpu->pc = 0xBFC03DDCu; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03DFC(CPUState* cpu) { - cpu->pc = 0xBFC03DFCu; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03E04(CPUState* cpu) { - cpu->pc = 0xBFC03E04u; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03E68(CPUState* cpu) { - cpu->pc = 0xBFC03E68u; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03E70(CPUState* cpu) { - cpu->pc = 0xBFC03E70u; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03E88(CPUState* cpu) { - cpu->pc = 0xBFC03E88u; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03D80_cont_BFC03E8C(CPUState* cpu) { - cpu->pc = 0xBFC03E8Cu; - SCPH1001_func_1FC03D80(cpu); -} - -void SCPH1001_func_1FC03EA0_cont_BFC03EBC(CPUState* cpu) { - cpu->pc = 0xBFC03EBCu; - SCPH1001_func_1FC03EA0(cpu); -} - -void SCPH1001_func_1FC03EA0_cont_BFC03F5C(CPUState* cpu) { - cpu->pc = 0xBFC03F5Cu; - SCPH1001_func_1FC03EA0(cpu); -} - -void SCPH1001_func_1FC03EA0_cont_BFC03F60(CPUState* cpu) { - cpu->pc = 0xBFC03F60u; - SCPH1001_func_1FC03EA0(cpu); -} - -void SCPH1001_func_1FC03FAC_cont_BFC03FBC(CPUState* cpu) { - cpu->pc = 0xBFC03FBCu; - SCPH1001_func_1FC03FAC(cpu); -} - -void SCPH1001_func_1FC03FE0_cont_BFC03FF4(CPUState* cpu) { - cpu->pc = 0xBFC03FF4u; - SCPH1001_func_1FC03FE0(cpu); -} - -void SCPH1001_func_1FC03FE0_cont_BFC04008(CPUState* cpu) { - cpu->pc = 0xBFC04008u; - SCPH1001_func_1FC03FE0(cpu); -} - -void SCPH1001_func_1FC03FE0_cont_BFC04014(CPUState* cpu) { - cpu->pc = 0xBFC04014u; - SCPH1001_func_1FC03FE0(cpu); -} - -void SCPH1001_func_1FC03FE0_cont_BFC0402C(CPUState* cpu) { - cpu->pc = 0xBFC0402Cu; - SCPH1001_func_1FC03FE0(cpu); -} - -void SCPH1001_func_1FC0403C_cont_BFC04058(CPUState* cpu) { - cpu->pc = 0xBFC04058u; - SCPH1001_func_1FC0403C(cpu); -} - -void SCPH1001_func_1FC0403C_cont_BFC04060(CPUState* cpu) { - cpu->pc = 0xBFC04060u; - SCPH1001_func_1FC0403C(cpu); -} - -void SCPH1001_func_1FC0403C_cont_BFC040BC(CPUState* cpu) { - cpu->pc = 0xBFC040BCu; - SCPH1001_func_1FC0403C(cpu); -} - -void SCPH1001_func_1FC0403C_cont_BFC040DC(CPUState* cpu) { - cpu->pc = 0xBFC040DCu; - SCPH1001_func_1FC0403C(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC0415C(CPUState* cpu) { - cpu->pc = 0xBFC0415Cu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04170(CPUState* cpu) { - cpu->pc = 0xBFC04170u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04174(CPUState* cpu) { - cpu->pc = 0xBFC04174u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC0417C(CPUState* cpu) { - cpu->pc = 0xBFC0417Cu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04188(CPUState* cpu) { - cpu->pc = 0xBFC04188u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04190(CPUState* cpu) { - cpu->pc = 0xBFC04190u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041A4(CPUState* cpu) { - cpu->pc = 0xBFC041A4u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041AC(CPUState* cpu) { - cpu->pc = 0xBFC041ACu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041CC(CPUState* cpu) { - cpu->pc = 0xBFC041CCu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041D0(CPUState* cpu) { - cpu->pc = 0xBFC041D0u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041D8(CPUState* cpu) { - cpu->pc = 0xBFC041D8u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041E4(CPUState* cpu) { - cpu->pc = 0xBFC041E4u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC041EC(CPUState* cpu) { - cpu->pc = 0xBFC041ECu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04200(CPUState* cpu) { - cpu->pc = 0xBFC04200u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04214(CPUState* cpu) { - cpu->pc = 0xBFC04214u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04228(CPUState* cpu) { - cpu->pc = 0xBFC04228u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC0422C(CPUState* cpu) { - cpu->pc = 0xBFC0422Cu; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04234(CPUState* cpu) { - cpu->pc = 0xBFC04234u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04240(CPUState* cpu) { - cpu->pc = 0xBFC04240u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04248(CPUState* cpu) { - cpu->pc = 0xBFC04248u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04138_cont_BFC04250(CPUState* cpu) { - cpu->pc = 0xBFC04250u; - SCPH1001_func_1FC04138(cpu); -} - -void SCPH1001_func_1FC04260_cont_BFC04284(CPUState* cpu) { - cpu->pc = 0xBFC04284u; - SCPH1001_func_1FC04260(cpu); -} - -void SCPH1001_func_1FC04260_cont_BFC0428C(CPUState* cpu) { - cpu->pc = 0xBFC0428Cu; - SCPH1001_func_1FC04260(cpu); -} - -void SCPH1001_func_1FC042A0_cont_BFC042B4(CPUState* cpu) { - cpu->pc = 0xBFC042B4u; - SCPH1001_func_1FC042A0(cpu); -} - -void SCPH1001_func_1FC042A0_cont_BFC042C8(CPUState* cpu) { - cpu->pc = 0xBFC042C8u; - SCPH1001_func_1FC042A0(cpu); -} - -void SCPH1001_func_1FC042D0_cont_BFC042E4(CPUState* cpu) { - cpu->pc = 0xBFC042E4u; - SCPH1001_func_1FC042D0(cpu); -} - -void SCPH1001_func_1FC042D0_cont_BFC042F8(CPUState* cpu) { - cpu->pc = 0xBFC042F8u; - SCPH1001_func_1FC042D0(cpu); -} - -void SCPH1001_func_1FC04610_cont_BFC0462C(CPUState* cpu) { - cpu->pc = 0xBFC0462Cu; - SCPH1001_func_1FC04610(cpu); -} - -void SCPH1001_func_1FC04610_cont_BFC04638(CPUState* cpu) { - cpu->pc = 0xBFC04638u; - SCPH1001_func_1FC04610(cpu); -} - -void SCPH1001_func_1FC04610_cont_BFC04640(CPUState* cpu) { - cpu->pc = 0xBFC04640u; - SCPH1001_func_1FC04610(cpu); -} - -void SCPH1001_func_1FC04610_cont_BFC0464C(CPUState* cpu) { - cpu->pc = 0xBFC0464Cu; - SCPH1001_func_1FC04610(cpu); -} - -void SCPH1001_func_1FC04610_cont_BFC04668(CPUState* cpu) { - cpu->pc = 0xBFC04668u; - SCPH1001_func_1FC04610(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC04698(CPUState* cpu) { - cpu->pc = 0xBFC04698u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC046C0(CPUState* cpu) { - cpu->pc = 0xBFC046C0u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC046CC(CPUState* cpu) { - cpu->pc = 0xBFC046CCu; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC046D4(CPUState* cpu) { - cpu->pc = 0xBFC046D4u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC046D8(CPUState* cpu) { - cpu->pc = 0xBFC046D8u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC04708(CPUState* cpu) { - cpu->pc = 0xBFC04708u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC04718(CPUState* cpu) { - cpu->pc = 0xBFC04718u; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC04678_cont_BFC0471C(CPUState* cpu) { - cpu->pc = 0xBFC0471Cu; - SCPH1001_func_1FC04678(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC04754(CPUState* cpu) { - cpu->pc = 0xBFC04754u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC04788(CPUState* cpu) { - cpu->pc = 0xBFC04788u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC04790(CPUState* cpu) { - cpu->pc = 0xBFC04790u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC04798(CPUState* cpu) { - cpu->pc = 0xBFC04798u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047A4(CPUState* cpu) { - cpu->pc = 0xBFC047A4u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047B0(CPUState* cpu) { - cpu->pc = 0xBFC047B0u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047B8(CPUState* cpu) { - cpu->pc = 0xBFC047B8u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047D4(CPUState* cpu) { - cpu->pc = 0xBFC047D4u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047E4(CPUState* cpu) { - cpu->pc = 0xBFC047E4u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC047E8(CPUState* cpu) { - cpu->pc = 0xBFC047E8u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC04808(CPUState* cpu) { - cpu->pc = 0xBFC04808u; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC0480C(CPUState* cpu) { - cpu->pc = 0xBFC0480Cu; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC0481C(CPUState* cpu) { - cpu->pc = 0xBFC0481Cu; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC0472C_cont_BFC0483C(CPUState* cpu) { - cpu->pc = 0xBFC0483Cu; - SCPH1001_func_1FC0472C(cpu); -} - -void SCPH1001_func_1FC04850_cont_BFC04890(CPUState* cpu) { - cpu->pc = 0xBFC04890u; - SCPH1001_func_1FC04850(cpu); -} - -void SCPH1001_func_1FC04850_cont_BFC048C0(CPUState* cpu) { - cpu->pc = 0xBFC048C0u; - SCPH1001_func_1FC04850(cpu); -} - -void SCPH1001_func_1FC048D0_cont_BFC048EC(CPUState* cpu) { - cpu->pc = 0xBFC048ECu; - SCPH1001_func_1FC048D0(cpu); -} - -void SCPH1001_func_1FC048D0_cont_BFC04900(CPUState* cpu) { - cpu->pc = 0xBFC04900u; - SCPH1001_func_1FC048D0(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04934(CPUState* cpu) { - cpu->pc = 0xBFC04934u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC049DC(CPUState* cpu) { - cpu->pc = 0xBFC049DCu; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC049EC(CPUState* cpu) { - cpu->pc = 0xBFC049ECu; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A20(CPUState* cpu) { - cpu->pc = 0xBFC04A20u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A48(CPUState* cpu) { - cpu->pc = 0xBFC04A48u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A5C(CPUState* cpu) { - cpu->pc = 0xBFC04A5Cu; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A64(CPUState* cpu) { - cpu->pc = 0xBFC04A64u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A6C(CPUState* cpu) { - cpu->pc = 0xBFC04A6Cu; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A80(CPUState* cpu) { - cpu->pc = 0xBFC04A80u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A88(CPUState* cpu) { - cpu->pc = 0xBFC04A88u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04910_cont_BFC04A90(CPUState* cpu) { - cpu->pc = 0xBFC04A90u; - SCPH1001_func_1FC04910(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04ACC(CPUState* cpu) { - cpu->pc = 0xBFC04ACCu; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04AE0(CPUState* cpu) { - cpu->pc = 0xBFC04AE0u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04AE8(CPUState* cpu) { - cpu->pc = 0xBFC04AE8u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04AF0(CPUState* cpu) { - cpu->pc = 0xBFC04AF0u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B04(CPUState* cpu) { - cpu->pc = 0xBFC04B04u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B0C(CPUState* cpu) { - cpu->pc = 0xBFC04B0Cu; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B14(CPUState* cpu) { - cpu->pc = 0xBFC04B14u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B34(CPUState* cpu) { - cpu->pc = 0xBFC04B34u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B3C(CPUState* cpu) { - cpu->pc = 0xBFC04B3Cu; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B44(CPUState* cpu) { - cpu->pc = 0xBFC04B44u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B5C(CPUState* cpu) { - cpu->pc = 0xBFC04B5Cu; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B60(CPUState* cpu) { - cpu->pc = 0xBFC04B60u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B64(CPUState* cpu) { - cpu->pc = 0xBFC04B64u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04B68(CPUState* cpu) { - cpu->pc = 0xBFC04B68u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04ABC_cont_BFC04BB4(CPUState* cpu) { - cpu->pc = 0xBFC04BB4u; - SCPH1001_func_1FC04ABC(cpu); -} - -void SCPH1001_func_1FC04BC4_cont_BFC04BE0(CPUState* cpu) { - cpu->pc = 0xBFC04BE0u; - SCPH1001_func_1FC04BC4(cpu); -} - -void SCPH1001_func_1FC04BC4_cont_BFC04BE8(CPUState* cpu) { - cpu->pc = 0xBFC04BE8u; - SCPH1001_func_1FC04BC4(cpu); -} - -void SCPH1001_func_1FC04BC4_cont_BFC04BF0(CPUState* cpu) { - cpu->pc = 0xBFC04BF0u; - SCPH1001_func_1FC04BC4(cpu); -} - -void SCPH1001_func_1FC04BC4_cont_BFC04C28(CPUState* cpu) { - cpu->pc = 0xBFC04C28u; - SCPH1001_func_1FC04BC4(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04C54(CPUState* cpu) { - cpu->pc = 0xBFC04C54u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04C5C(CPUState* cpu) { - cpu->pc = 0xBFC04C5Cu; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04C64(CPUState* cpu) { - cpu->pc = 0xBFC04C64u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04C70(CPUState* cpu) { - cpu->pc = 0xBFC04C70u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CAC(CPUState* cpu) { - cpu->pc = 0xBFC04CACu; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CBC(CPUState* cpu) { - cpu->pc = 0xBFC04CBCu; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CC8(CPUState* cpu) { - cpu->pc = 0xBFC04CC8u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CD8(CPUState* cpu) { - cpu->pc = 0xBFC04CD8u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CDC(CPUState* cpu) { - cpu->pc = 0xBFC04CDCu; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04CE4(CPUState* cpu) { - cpu->pc = 0xBFC04CE4u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04D04(CPUState* cpu) { - cpu->pc = 0xBFC04D04u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04D0C(CPUState* cpu) { - cpu->pc = 0xBFC04D0Cu; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04C38_cont_BFC04D40(CPUState* cpu) { - cpu->pc = 0xBFC04D40u; - SCPH1001_func_1FC04C38(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04D68(CPUState* cpu) { - cpu->pc = 0xBFC04D68u; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04D70(CPUState* cpu) { - cpu->pc = 0xBFC04D70u; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04D78(CPUState* cpu) { - cpu->pc = 0xBFC04D78u; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04DA0(CPUState* cpu) { - cpu->pc = 0xBFC04DA0u; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04DA8(CPUState* cpu) { - cpu->pc = 0xBFC04DA8u; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04D50_cont_BFC04DDC(CPUState* cpu) { - cpu->pc = 0xBFC04DDCu; - SCPH1001_func_1FC04D50(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E10(CPUState* cpu) { - cpu->pc = 0xBFC04E10u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E18(CPUState* cpu) { - cpu->pc = 0xBFC04E18u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E2C(CPUState* cpu) { - cpu->pc = 0xBFC04E2Cu; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E34(CPUState* cpu) { - cpu->pc = 0xBFC04E34u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E64(CPUState* cpu) { - cpu->pc = 0xBFC04E64u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04E88(CPUState* cpu) { - cpu->pc = 0xBFC04E88u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04EB8(CPUState* cpu) { - cpu->pc = 0xBFC04EB8u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04EBC(CPUState* cpu) { - cpu->pc = 0xBFC04EBCu; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04EC8(CPUState* cpu) { - cpu->pc = 0xBFC04EC8u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04EE8(CPUState* cpu) { - cpu->pc = 0xBFC04EE8u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F18(CPUState* cpu) { - cpu->pc = 0xBFC04F18u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F1C(CPUState* cpu) { - cpu->pc = 0xBFC04F1Cu; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F2C(CPUState* cpu) { - cpu->pc = 0xBFC04F2Cu; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F48(CPUState* cpu) { - cpu->pc = 0xBFC04F48u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F50(CPUState* cpu) { - cpu->pc = 0xBFC04F50u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F58(CPUState* cpu) { - cpu->pc = 0xBFC04F58u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F60(CPUState* cpu) { - cpu->pc = 0xBFC04F60u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F68(CPUState* cpu) { - cpu->pc = 0xBFC04F68u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F70(CPUState* cpu) { - cpu->pc = 0xBFC04F70u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F78(CPUState* cpu) { - cpu->pc = 0xBFC04F78u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F80(CPUState* cpu) { - cpu->pc = 0xBFC04F80u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F88(CPUState* cpu) { - cpu->pc = 0xBFC04F88u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F90(CPUState* cpu) { - cpu->pc = 0xBFC04F90u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04F98(CPUState* cpu) { - cpu->pc = 0xBFC04F98u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04FA0(CPUState* cpu) { - cpu->pc = 0xBFC04FA0u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04FA8(CPUState* cpu) { - cpu->pc = 0xBFC04FA8u; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04DEC_cont_BFC04FAC(CPUState* cpu) { - cpu->pc = 0xBFC04FACu; - SCPH1001_func_1FC04DEC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC04FE0(CPUState* cpu) { - cpu->pc = 0xBFC04FE0u; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC04FE8(CPUState* cpu) { - cpu->pc = 0xBFC04FE8u; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC04FFC(CPUState* cpu) { - cpu->pc = 0xBFC04FFCu; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC05004(CPUState* cpu) { - cpu->pc = 0xBFC05004u; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC05040(CPUState* cpu) { - cpu->pc = 0xBFC05040u; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC05050(CPUState* cpu) { - cpu->pc = 0xBFC05050u; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC04FBC_cont_BFC0505C(CPUState* cpu) { - cpu->pc = 0xBFC0505Cu; - SCPH1001_func_1FC04FBC(cpu); -} - -void SCPH1001_func_1FC0506C_cont_BFC05080(CPUState* cpu) { - cpu->pc = 0xBFC05080u; - SCPH1001_func_1FC0506C(cpu); -} - -void SCPH1001_func_1FC0506C_cont_BFC05094(CPUState* cpu) { - cpu->pc = 0xBFC05094u; - SCPH1001_func_1FC0506C(cpu); -} - -void SCPH1001_func_1FC050A4_cont_BFC050B8(CPUState* cpu) { - cpu->pc = 0xBFC050B8u; - SCPH1001_func_1FC050A4(cpu); -} - -void SCPH1001_func_1FC050A4_cont_BFC050CC(CPUState* cpu) { - cpu->pc = 0xBFC050CCu; - SCPH1001_func_1FC050A4(cpu); -} - -void SCPH1001_func_1FC05120_cont_BFC0515C(CPUState* cpu) { - cpu->pc = 0xBFC0515Cu; - SCPH1001_func_1FC05120(cpu); -} - -void SCPH1001_func_1FC05120_cont_BFC05160(CPUState* cpu) { - cpu->pc = 0xBFC05160u; - SCPH1001_func_1FC05120(cpu); -} - -void SCPH1001_func_1FC05120_cont_BFC0518C(CPUState* cpu) { - cpu->pc = 0xBFC0518Cu; - SCPH1001_func_1FC05120(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051AC(CPUState* cpu) { - cpu->pc = 0xBFC051ACu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051B4(CPUState* cpu) { - cpu->pc = 0xBFC051B4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051BC(CPUState* cpu) { - cpu->pc = 0xBFC051BCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051C8(CPUState* cpu) { - cpu->pc = 0xBFC051C8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051D0(CPUState* cpu) { - cpu->pc = 0xBFC051D0u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051D8(CPUState* cpu) { - cpu->pc = 0xBFC051D8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051F0(CPUState* cpu) { - cpu->pc = 0xBFC051F0u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC051F8(CPUState* cpu) { - cpu->pc = 0xBFC051F8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05200(CPUState* cpu) { - cpu->pc = 0xBFC05200u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05208(CPUState* cpu) { - cpu->pc = 0xBFC05208u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05210(CPUState* cpu) { - cpu->pc = 0xBFC05210u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05214(CPUState* cpu) { - cpu->pc = 0xBFC05214u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05220(CPUState* cpu) { - cpu->pc = 0xBFC05220u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05224(CPUState* cpu) { - cpu->pc = 0xBFC05224u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0523C(CPUState* cpu) { - cpu->pc = 0xBFC0523Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05244(CPUState* cpu) { - cpu->pc = 0xBFC05244u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0524C(CPUState* cpu) { - cpu->pc = 0xBFC0524Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05254(CPUState* cpu) { - cpu->pc = 0xBFC05254u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0525C(CPUState* cpu) { - cpu->pc = 0xBFC0525Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05264(CPUState* cpu) { - cpu->pc = 0xBFC05264u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0526C(CPUState* cpu) { - cpu->pc = 0xBFC0526Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05274(CPUState* cpu) { - cpu->pc = 0xBFC05274u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0527C(CPUState* cpu) { - cpu->pc = 0xBFC0527Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05284(CPUState* cpu) { - cpu->pc = 0xBFC05284u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0528C(CPUState* cpu) { - cpu->pc = 0xBFC0528Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05294(CPUState* cpu) { - cpu->pc = 0xBFC05294u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0529C(CPUState* cpu) { - cpu->pc = 0xBFC0529Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052A4(CPUState* cpu) { - cpu->pc = 0xBFC052A4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052AC(CPUState* cpu) { - cpu->pc = 0xBFC052ACu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052B4(CPUState* cpu) { - cpu->pc = 0xBFC052B4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052BC(CPUState* cpu) { - cpu->pc = 0xBFC052BCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052C4(CPUState* cpu) { - cpu->pc = 0xBFC052C4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052CC(CPUState* cpu) { - cpu->pc = 0xBFC052CCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052D4(CPUState* cpu) { - cpu->pc = 0xBFC052D4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052DC(CPUState* cpu) { - cpu->pc = 0xBFC052DCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052E4(CPUState* cpu) { - cpu->pc = 0xBFC052E4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052E8(CPUState* cpu) { - cpu->pc = 0xBFC052E8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052F4(CPUState* cpu) { - cpu->pc = 0xBFC052F4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC052FC(CPUState* cpu) { - cpu->pc = 0xBFC052FCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05300(CPUState* cpu) { - cpu->pc = 0xBFC05300u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05308(CPUState* cpu) { - cpu->pc = 0xBFC05308u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05310(CPUState* cpu) { - cpu->pc = 0xBFC05310u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05318(CPUState* cpu) { - cpu->pc = 0xBFC05318u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05320(CPUState* cpu) { - cpu->pc = 0xBFC05320u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05328(CPUState* cpu) { - cpu->pc = 0xBFC05328u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05330(CPUState* cpu) { - cpu->pc = 0xBFC05330u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05338(CPUState* cpu) { - cpu->pc = 0xBFC05338u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05340(CPUState* cpu) { - cpu->pc = 0xBFC05340u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05348(CPUState* cpu) { - cpu->pc = 0xBFC05348u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05350(CPUState* cpu) { - cpu->pc = 0xBFC05350u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05358(CPUState* cpu) { - cpu->pc = 0xBFC05358u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05360(CPUState* cpu) { - cpu->pc = 0xBFC05360u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0536C(CPUState* cpu) { - cpu->pc = 0xBFC0536Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05374(CPUState* cpu) { - cpu->pc = 0xBFC05374u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05380(CPUState* cpu) { - cpu->pc = 0xBFC05380u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05388(CPUState* cpu) { - cpu->pc = 0xBFC05388u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05394(CPUState* cpu) { - cpu->pc = 0xBFC05394u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0539C(CPUState* cpu) { - cpu->pc = 0xBFC0539Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053A4(CPUState* cpu) { - cpu->pc = 0xBFC053A4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053AC(CPUState* cpu) { - cpu->pc = 0xBFC053ACu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053B8(CPUState* cpu) { - cpu->pc = 0xBFC053B8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053C0(CPUState* cpu) { - cpu->pc = 0xBFC053C0u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053CC(CPUState* cpu) { - cpu->pc = 0xBFC053CCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053D4(CPUState* cpu) { - cpu->pc = 0xBFC053D4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053DC(CPUState* cpu) { - cpu->pc = 0xBFC053DCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053E4(CPUState* cpu) { - cpu->pc = 0xBFC053E4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053EC(CPUState* cpu) { - cpu->pc = 0xBFC053ECu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC053F4(CPUState* cpu) { - cpu->pc = 0xBFC053F4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05400(CPUState* cpu) { - cpu->pc = 0xBFC05400u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05408(CPUState* cpu) { - cpu->pc = 0xBFC05408u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05414(CPUState* cpu) { - cpu->pc = 0xBFC05414u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0541C(CPUState* cpu) { - cpu->pc = 0xBFC0541Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05424(CPUState* cpu) { - cpu->pc = 0xBFC05424u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0542C(CPUState* cpu) { - cpu->pc = 0xBFC0542Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05438(CPUState* cpu) { - cpu->pc = 0xBFC05438u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05440(CPUState* cpu) { - cpu->pc = 0xBFC05440u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0544C(CPUState* cpu) { - cpu->pc = 0xBFC0544Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05454(CPUState* cpu) { - cpu->pc = 0xBFC05454u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0545C(CPUState* cpu) { - cpu->pc = 0xBFC0545Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05464(CPUState* cpu) { - cpu->pc = 0xBFC05464u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0546C(CPUState* cpu) { - cpu->pc = 0xBFC0546Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05474(CPUState* cpu) { - cpu->pc = 0xBFC05474u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0547C(CPUState* cpu) { - cpu->pc = 0xBFC0547Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05484(CPUState* cpu) { - cpu->pc = 0xBFC05484u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05490(CPUState* cpu) { - cpu->pc = 0xBFC05490u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05498(CPUState* cpu) { - cpu->pc = 0xBFC05498u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054A4(CPUState* cpu) { - cpu->pc = 0xBFC054A4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054AC(CPUState* cpu) { - cpu->pc = 0xBFC054ACu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054B4(CPUState* cpu) { - cpu->pc = 0xBFC054B4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054BC(CPUState* cpu) { - cpu->pc = 0xBFC054BCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054C8(CPUState* cpu) { - cpu->pc = 0xBFC054C8u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054D0(CPUState* cpu) { - cpu->pc = 0xBFC054D0u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054DC(CPUState* cpu) { - cpu->pc = 0xBFC054DCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054E4(CPUState* cpu) { - cpu->pc = 0xBFC054E4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054EC(CPUState* cpu) { - cpu->pc = 0xBFC054ECu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054F4(CPUState* cpu) { - cpu->pc = 0xBFC054F4u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC054FC(CPUState* cpu) { - cpu->pc = 0xBFC054FCu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05504(CPUState* cpu) { - cpu->pc = 0xBFC05504u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05510(CPUState* cpu) { - cpu->pc = 0xBFC05510u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05518(CPUState* cpu) { - cpu->pc = 0xBFC05518u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05524(CPUState* cpu) { - cpu->pc = 0xBFC05524u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0552C(CPUState* cpu) { - cpu->pc = 0xBFC0552Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05534(CPUState* cpu) { - cpu->pc = 0xBFC05534u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0553C(CPUState* cpu) { - cpu->pc = 0xBFC0553Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC05548(CPUState* cpu) { - cpu->pc = 0xBFC05548u; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05194_cont_BFC0554C(CPUState* cpu) { - cpu->pc = 0xBFC0554Cu; - SCPH1001_func_1FC05194(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05580(CPUState* cpu) { - cpu->pc = 0xBFC05580u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05588(CPUState* cpu) { - cpu->pc = 0xBFC05588u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05590(CPUState* cpu) { - cpu->pc = 0xBFC05590u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055A4(CPUState* cpu) { - cpu->pc = 0xBFC055A4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055AC(CPUState* cpu) { - cpu->pc = 0xBFC055ACu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055B4(CPUState* cpu) { - cpu->pc = 0xBFC055B4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055C0(CPUState* cpu) { - cpu->pc = 0xBFC055C0u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055C8(CPUState* cpu) { - cpu->pc = 0xBFC055C8u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055D8(CPUState* cpu) { - cpu->pc = 0xBFC055D8u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055F0(CPUState* cpu) { - cpu->pc = 0xBFC055F0u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC055F8(CPUState* cpu) { - cpu->pc = 0xBFC055F8u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05614(CPUState* cpu) { - cpu->pc = 0xBFC05614u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0561C(CPUState* cpu) { - cpu->pc = 0xBFC0561Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05640(CPUState* cpu) { - cpu->pc = 0xBFC05640u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05648(CPUState* cpu) { - cpu->pc = 0xBFC05648u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05664(CPUState* cpu) { - cpu->pc = 0xBFC05664u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05674(CPUState* cpu) { - cpu->pc = 0xBFC05674u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056A4(CPUState* cpu) { - cpu->pc = 0xBFC056A4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056C0(CPUState* cpu) { - cpu->pc = 0xBFC056C0u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056C8(CPUState* cpu) { - cpu->pc = 0xBFC056C8u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056CC(CPUState* cpu) { - cpu->pc = 0xBFC056CCu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056D8(CPUState* cpu) { - cpu->pc = 0xBFC056D8u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056E0(CPUState* cpu) { - cpu->pc = 0xBFC056E0u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056E4(CPUState* cpu) { - cpu->pc = 0xBFC056E4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056EC(CPUState* cpu) { - cpu->pc = 0xBFC056ECu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056F4(CPUState* cpu) { - cpu->pc = 0xBFC056F4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC056FC(CPUState* cpu) { - cpu->pc = 0xBFC056FCu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05704(CPUState* cpu) { - cpu->pc = 0xBFC05704u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0570C(CPUState* cpu) { - cpu->pc = 0xBFC0570Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05714(CPUState* cpu) { - cpu->pc = 0xBFC05714u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0571C(CPUState* cpu) { - cpu->pc = 0xBFC0571Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05724(CPUState* cpu) { - cpu->pc = 0xBFC05724u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05730(CPUState* cpu) { - cpu->pc = 0xBFC05730u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05734(CPUState* cpu) { - cpu->pc = 0xBFC05734u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0574C(CPUState* cpu) { - cpu->pc = 0xBFC0574Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05754(CPUState* cpu) { - cpu->pc = 0xBFC05754u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05760(CPUState* cpu) { - cpu->pc = 0xBFC05760u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05768(CPUState* cpu) { - cpu->pc = 0xBFC05768u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05774(CPUState* cpu) { - cpu->pc = 0xBFC05774u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0577C(CPUState* cpu) { - cpu->pc = 0xBFC0577Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05784(CPUState* cpu) { - cpu->pc = 0xBFC05784u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC0578C(CPUState* cpu) { - cpu->pc = 0xBFC0578Cu; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC05798(CPUState* cpu) { - cpu->pc = 0xBFC05798u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC057A0(CPUState* cpu) { - cpu->pc = 0xBFC057A0u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC05558_cont_BFC057A4(CPUState* cpu) { - cpu->pc = 0xBFC057A4u; - SCPH1001_func_1FC05558(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC057EC(CPUState* cpu) { - cpu->pc = 0xBFC057ECu; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05828(CPUState* cpu) { - cpu->pc = 0xBFC05828u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05860(CPUState* cpu) { - cpu->pc = 0xBFC05860u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05864(CPUState* cpu) { - cpu->pc = 0xBFC05864u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05888(CPUState* cpu) { - cpu->pc = 0xBFC05888u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05890(CPUState* cpu) { - cpu->pc = 0xBFC05890u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05894(CPUState* cpu) { - cpu->pc = 0xBFC05894u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC0589C(CPUState* cpu) { - cpu->pc = 0xBFC0589Cu; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC058AC(CPUState* cpu) { - cpu->pc = 0xBFC058ACu; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC058C0(CPUState* cpu) { - cpu->pc = 0xBFC058C0u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC058EC(CPUState* cpu) { - cpu->pc = 0xBFC058ECu; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC058F4(CPUState* cpu) { - cpu->pc = 0xBFC058F4u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC0592C(CPUState* cpu) { - cpu->pc = 0xBFC0592Cu; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC057B0_cont_BFC05930(CPUState* cpu) { - cpu->pc = 0xBFC05930u; - SCPH1001_func_1FC057B0(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05964(CPUState* cpu) { - cpu->pc = 0xBFC05964u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05970(CPUState* cpu) { - cpu->pc = 0xBFC05970u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05984(CPUState* cpu) { - cpu->pc = 0xBFC05984u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC0598C(CPUState* cpu) { - cpu->pc = 0xBFC0598Cu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05994(CPUState* cpu) { - cpu->pc = 0xBFC05994u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC0599C(CPUState* cpu) { - cpu->pc = 0xBFC0599Cu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059A8(CPUState* cpu) { - cpu->pc = 0xBFC059A8u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059B4(CPUState* cpu) { - cpu->pc = 0xBFC059B4u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059BC(CPUState* cpu) { - cpu->pc = 0xBFC059BCu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059C4(CPUState* cpu) { - cpu->pc = 0xBFC059C4u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059CC(CPUState* cpu) { - cpu->pc = 0xBFC059CCu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059D4(CPUState* cpu) { - cpu->pc = 0xBFC059D4u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059D8(CPUState* cpu) { - cpu->pc = 0xBFC059D8u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059E0(CPUState* cpu) { - cpu->pc = 0xBFC059E0u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059E8(CPUState* cpu) { - cpu->pc = 0xBFC059E8u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059F0(CPUState* cpu) { - cpu->pc = 0xBFC059F0u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC059F8(CPUState* cpu) { - cpu->pc = 0xBFC059F8u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A00(CPUState* cpu) { - cpu->pc = 0xBFC05A00u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A04(CPUState* cpu) { - cpu->pc = 0xBFC05A04u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A0C(CPUState* cpu) { - cpu->pc = 0xBFC05A0Cu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A1C(CPUState* cpu) { - cpu->pc = 0xBFC05A1Cu; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A24(CPUState* cpu) { - cpu->pc = 0xBFC05A24u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A28(CPUState* cpu) { - cpu->pc = 0xBFC05A28u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A34(CPUState* cpu) { - cpu->pc = 0xBFC05A34u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC0593C_cont_BFC05A38(CPUState* cpu) { - cpu->pc = 0xBFC05A38u; - SCPH1001_func_1FC0593C(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05A5C(CPUState* cpu) { - cpu->pc = 0xBFC05A5Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05A68(CPUState* cpu) { - cpu->pc = 0xBFC05A68u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05A7C(CPUState* cpu) { - cpu->pc = 0xBFC05A7Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05A84(CPUState* cpu) { - cpu->pc = 0xBFC05A84u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05A98(CPUState* cpu) { - cpu->pc = 0xBFC05A98u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AA8(CPUState* cpu) { - cpu->pc = 0xBFC05AA8u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AB4(CPUState* cpu) { - cpu->pc = 0xBFC05AB4u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05ABC(CPUState* cpu) { - cpu->pc = 0xBFC05ABCu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AC4(CPUState* cpu) { - cpu->pc = 0xBFC05AC4u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05ACC(CPUState* cpu) { - cpu->pc = 0xBFC05ACCu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AD0(CPUState* cpu) { - cpu->pc = 0xBFC05AD0u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AD8(CPUState* cpu) { - cpu->pc = 0xBFC05AD8u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AE4(CPUState* cpu) { - cpu->pc = 0xBFC05AE4u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AEC(CPUState* cpu) { - cpu->pc = 0xBFC05AECu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05AF8(CPUState* cpu) { - cpu->pc = 0xBFC05AF8u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B00(CPUState* cpu) { - cpu->pc = 0xBFC05B00u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B14(CPUState* cpu) { - cpu->pc = 0xBFC05B14u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B1C(CPUState* cpu) { - cpu->pc = 0xBFC05B1Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B30(CPUState* cpu) { - cpu->pc = 0xBFC05B30u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B34(CPUState* cpu) { - cpu->pc = 0xBFC05B34u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B44(CPUState* cpu) { - cpu->pc = 0xBFC05B44u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B58(CPUState* cpu) { - cpu->pc = 0xBFC05B58u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B60(CPUState* cpu) { - cpu->pc = 0xBFC05B60u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B68(CPUState* cpu) { - cpu->pc = 0xBFC05B68u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B6C(CPUState* cpu) { - cpu->pc = 0xBFC05B6Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B74(CPUState* cpu) { - cpu->pc = 0xBFC05B74u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B80(CPUState* cpu) { - cpu->pc = 0xBFC05B80u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B88(CPUState* cpu) { - cpu->pc = 0xBFC05B88u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B94(CPUState* cpu) { - cpu->pc = 0xBFC05B94u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05B9C(CPUState* cpu) { - cpu->pc = 0xBFC05B9Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BA8(CPUState* cpu) { - cpu->pc = 0xBFC05BA8u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BAC(CPUState* cpu) { - cpu->pc = 0xBFC05BACu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BBC(CPUState* cpu) { - cpu->pc = 0xBFC05BBCu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BCC(CPUState* cpu) { - cpu->pc = 0xBFC05BCCu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BE0(CPUState* cpu) { - cpu->pc = 0xBFC05BE0u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BF0(CPUState* cpu) { - cpu->pc = 0xBFC05BF0u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BF8(CPUState* cpu) { - cpu->pc = 0xBFC05BF8u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05BFC(CPUState* cpu) { - cpu->pc = 0xBFC05BFCu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05C08(CPUState* cpu) { - cpu->pc = 0xBFC05C08u; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05A44_cont_BFC05C0C(CPUState* cpu) { - cpu->pc = 0xBFC05C0Cu; - SCPH1001_func_1FC05A44(cpu); -} - -void SCPH1001_func_1FC05C18_cont_BFC05C20(CPUState* cpu) { - cpu->pc = 0xBFC05C20u; - SCPH1001_func_1FC05C18(cpu); -} - -void SCPH1001_func_1FC05C18_cont_BFC05C28(CPUState* cpu) { - cpu->pc = 0xBFC05C28u; - SCPH1001_func_1FC05C18(cpu); -} - -void SCPH1001_func_1FC05C18_cont_BFC05C2C(CPUState* cpu) { - cpu->pc = 0xBFC05C2Cu; - SCPH1001_func_1FC05C18(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05C94(CPUState* cpu) { - cpu->pc = 0xBFC05C94u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05CB0(CPUState* cpu) { - cpu->pc = 0xBFC05CB0u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05CC4(CPUState* cpu) { - cpu->pc = 0xBFC05CC4u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05CD8(CPUState* cpu) { - cpu->pc = 0xBFC05CD8u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05CE4(CPUState* cpu) { - cpu->pc = 0xBFC05CE4u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05C50_cont_BFC05CF4(CPUState* cpu) { - cpu->pc = 0xBFC05CF4u; - SCPH1001_func_1FC05C50(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05D20(CPUState* cpu) { - cpu->pc = 0xBFC05D20u; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05D3C(CPUState* cpu) { - cpu->pc = 0xBFC05D3Cu; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05D6C(CPUState* cpu) { - cpu->pc = 0xBFC05D6Cu; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05D84(CPUState* cpu) { - cpu->pc = 0xBFC05D84u; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05D90(CPUState* cpu) { - cpu->pc = 0xBFC05D90u; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05D04_cont_BFC05DA0(CPUState* cpu) { - cpu->pc = 0xBFC05DA0u; - SCPH1001_func_1FC05D04(cpu); -} - -void SCPH1001_func_1FC05DB0_cont_BFC05DE4(CPUState* cpu) { - cpu->pc = 0xBFC05DE4u; - SCPH1001_func_1FC05DB0(cpu); -} - -void SCPH1001_func_1FC05DF4_cont_BFC05E1C(CPUState* cpu) { - cpu->pc = 0xBFC05E1Cu; - SCPH1001_func_1FC05DF4(cpu); -} - -void SCPH1001_func_1FC05DF4_cont_BFC05E2C(CPUState* cpu) { - cpu->pc = 0xBFC05E2Cu; - SCPH1001_func_1FC05DF4(cpu); -} - -void SCPH1001_func_1FC05DF4_cont_BFC05E48(CPUState* cpu) { - cpu->pc = 0xBFC05E48u; - SCPH1001_func_1FC05DF4(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05E7C(CPUState* cpu) { - cpu->pc = 0xBFC05E7Cu; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05E90(CPUState* cpu) { - cpu->pc = 0xBFC05E90u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EA0(CPUState* cpu) { - cpu->pc = 0xBFC05EA0u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EA4(CPUState* cpu) { - cpu->pc = 0xBFC05EA4u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EAC(CPUState* cpu) { - cpu->pc = 0xBFC05EACu; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EC0(CPUState* cpu) { - cpu->pc = 0xBFC05EC0u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05ED4(CPUState* cpu) { - cpu->pc = 0xBFC05ED4u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EE4(CPUState* cpu) { - cpu->pc = 0xBFC05EE4u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EE8(CPUState* cpu) { - cpu->pc = 0xBFC05EE8u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05E58_cont_BFC05EF0(CPUState* cpu) { - cpu->pc = 0xBFC05EF0u; - SCPH1001_func_1FC05E58(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC05F1C(CPUState* cpu) { - cpu->pc = 0xBFC05F1Cu; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC05F94(CPUState* cpu) { - cpu->pc = 0xBFC05F94u; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC05FC8(CPUState* cpu) { - cpu->pc = 0xBFC05FC8u; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC05FEC(CPUState* cpu) { - cpu->pc = 0xBFC05FECu; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC05FF4(CPUState* cpu) { - cpu->pc = 0xBFC05FF4u; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC06000(CPUState* cpu) { - cpu->pc = 0xBFC06000u; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC05F08_cont_BFC06004(CPUState* cpu) { - cpu->pc = 0xBFC06004u; - SCPH1001_func_1FC05F08(cpu); -} - -void SCPH1001_func_1FC06010_cont_BFC06028(CPUState* cpu) { - cpu->pc = 0xBFC06028u; - SCPH1001_func_1FC06010(cpu); -} - -void SCPH1001_func_1FC06038_cont_BFC0608C(CPUState* cpu) { - cpu->pc = 0xBFC0608Cu; - SCPH1001_func_1FC06038(cpu); -} - -void SCPH1001_func_1FC06038_cont_BFC060BC(CPUState* cpu) { - cpu->pc = 0xBFC060BCu; - SCPH1001_func_1FC06038(cpu); -} - -void SCPH1001_func_1FC06038_cont_BFC060CC(CPUState* cpu) { - cpu->pc = 0xBFC060CCu; - SCPH1001_func_1FC06038(cpu); -} - -void SCPH1001_func_1FC060DC_cont_BFC0610C(CPUState* cpu) { - cpu->pc = 0xBFC0610Cu; - SCPH1001_func_1FC060DC(cpu); -} - -void SCPH1001_func_1FC060DC_cont_BFC06114(CPUState* cpu) { - cpu->pc = 0xBFC06114u; - SCPH1001_func_1FC060DC(cpu); -} - -void SCPH1001_func_1FC060DC_cont_BFC06130(CPUState* cpu) { - cpu->pc = 0xBFC06130u; - SCPH1001_func_1FC060DC(cpu); -} - -void SCPH1001_func_1FC060DC_cont_BFC06134(CPUState* cpu) { - cpu->pc = 0xBFC06134u; - SCPH1001_func_1FC060DC(cpu); -} - -void SCPH1001_func_1FC060DC_cont_BFC0614C(CPUState* cpu) { - cpu->pc = 0xBFC0614Cu; - SCPH1001_func_1FC060DC(cpu); -} - -void SCPH1001_func_1FC0615C_cont_BFC06190(CPUState* cpu) { - cpu->pc = 0xBFC06190u; - SCPH1001_func_1FC0615C(cpu); -} - -void SCPH1001_func_1FC061A0_cont_BFC061C4(CPUState* cpu) { - cpu->pc = 0xBFC061C4u; - SCPH1001_func_1FC061A0(cpu); -} - -void SCPH1001_func_1FC061D4_cont_BFC06208(CPUState* cpu) { - cpu->pc = 0xBFC06208u; - SCPH1001_func_1FC061D4(cpu); -} - -void SCPH1001_func_1FC06218_cont_BFC0623C(CPUState* cpu) { - cpu->pc = 0xBFC0623Cu; - SCPH1001_func_1FC06218(cpu); -} - -void SCPH1001_func_1FC06218_cont_BFC06244(CPUState* cpu) { - cpu->pc = 0xBFC06244u; - SCPH1001_func_1FC06218(cpu); -} - -void SCPH1001_func_1FC06218_cont_BFC0624C(CPUState* cpu) { - cpu->pc = 0xBFC0624Cu; - SCPH1001_func_1FC06218(cpu); -} - -void SCPH1001_func_1FC06218_cont_BFC06250(CPUState* cpu) { - cpu->pc = 0xBFC06250u; - SCPH1001_func_1FC06218(cpu); -} - -void SCPH1001_func_1FC06218_cont_BFC0627C(CPUState* cpu) { - cpu->pc = 0xBFC0627Cu; - SCPH1001_func_1FC06218(cpu); -} - -void SCPH1001_func_1FC062CC_cont_BFC06358(CPUState* cpu) { - cpu->pc = 0xBFC06358u; - SCPH1001_func_1FC062CC(cpu); -} - -void SCPH1001_func_1FC062CC_cont_BFC06364(CPUState* cpu) { - cpu->pc = 0xBFC06364u; - SCPH1001_func_1FC062CC(cpu); -} - -void SCPH1001_func_1FC062CC_cont_BFC0636C(CPUState* cpu) { - cpu->pc = 0xBFC0636Cu; - SCPH1001_func_1FC062CC(cpu); -} - -void SCPH1001_func_1FC062CC_cont_BFC063C0(CPUState* cpu) { - cpu->pc = 0xBFC063C0u; - SCPH1001_func_1FC062CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC06420(CPUState* cpu) { - cpu->pc = 0xBFC06420u; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC0643C(CPUState* cpu) { - cpu->pc = 0xBFC0643Cu; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC06444(CPUState* cpu) { - cpu->pc = 0xBFC06444u; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC06464(CPUState* cpu) { - cpu->pc = 0xBFC06464u; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC0646C(CPUState* cpu) { - cpu->pc = 0xBFC0646Cu; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC06474(CPUState* cpu) { - cpu->pc = 0xBFC06474u; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC06478(CPUState* cpu) { - cpu->pc = 0xBFC06478u; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC063CC_cont_BFC064CC(CPUState* cpu) { - cpu->pc = 0xBFC064CCu; - SCPH1001_func_1FC063CC(cpu); -} - -void SCPH1001_func_1FC064D8_cont_BFC064F0(CPUState* cpu) { - cpu->pc = 0xBFC064F0u; - SCPH1001_func_1FC064D8(cpu); -} - -void SCPH1001_func_1FC064D8_cont_BFC06500(CPUState* cpu) { - cpu->pc = 0xBFC06500u; - SCPH1001_func_1FC064D8(cpu); -} - -void SCPH1001_func_1FC064D8_cont_BFC06510(CPUState* cpu) { - cpu->pc = 0xBFC06510u; - SCPH1001_func_1FC064D8(cpu); -} - -void SCPH1001_func_1FC064D8_cont_BFC06520(CPUState* cpu) { - cpu->pc = 0xBFC06520u; - SCPH1001_func_1FC064D8(cpu); -} - -void SCPH1001_func_1FC064D8_cont_BFC06530(CPUState* cpu) { - cpu->pc = 0xBFC06530u; - SCPH1001_func_1FC064D8(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC06568(CPUState* cpu) { - cpu->pc = 0xBFC06568u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC06574(CPUState* cpu) { - cpu->pc = 0xBFC06574u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC06580(CPUState* cpu) { - cpu->pc = 0xBFC06580u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC0658C(CPUState* cpu) { - cpu->pc = 0xBFC0658Cu; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC06598(CPUState* cpu) { - cpu->pc = 0xBFC06598u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC065A4(CPUState* cpu) { - cpu->pc = 0xBFC065A4u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06548_cont_BFC065B0(CPUState* cpu) { - cpu->pc = 0xBFC065B0u; - SCPH1001_func_1FC06548(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066AC(CPUState* cpu) { - cpu->pc = 0xBFC066ACu; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066B4(CPUState* cpu) { - cpu->pc = 0xBFC066B4u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066BC(CPUState* cpu) { - cpu->pc = 0xBFC066BCu; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066C4(CPUState* cpu) { - cpu->pc = 0xBFC066C4u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066C8(CPUState* cpu) { - cpu->pc = 0xBFC066C8u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066CC(CPUState* cpu) { - cpu->pc = 0xBFC066CCu; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066DC(CPUState* cpu) { - cpu->pc = 0xBFC066DCu; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066E4(CPUState* cpu) { - cpu->pc = 0xBFC066E4u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066F0(CPUState* cpu) { - cpu->pc = 0xBFC066F0u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06680_cont_BFC066F4(CPUState* cpu) { - cpu->pc = 0xBFC066F4u; - SCPH1001_func_1FC06680(cpu); -} - -void SCPH1001_func_1FC06700_cont_BFC06718(CPUState* cpu) { - cpu->pc = 0xBFC06718u; - SCPH1001_func_1FC06700(cpu); -} - -void SCPH1001_func_1FC06750_cont_BFC06774(CPUState* cpu) { - cpu->pc = 0xBFC06774u; - SCPH1001_func_1FC06750(cpu); -} - -void SCPH1001_func_1FC06784_cont_BFC0679C(CPUState* cpu) { - cpu->pc = 0xBFC0679Cu; - SCPH1001_func_1FC06784(cpu); -} - -void SCPH1001_func_1FC06784_cont_BFC067AC(CPUState* cpu) { - cpu->pc = 0xBFC067ACu; - SCPH1001_func_1FC06784(cpu); -} - -void SCPH1001_func_1FC06784_cont_BFC067BC(CPUState* cpu) { - cpu->pc = 0xBFC067BCu; - SCPH1001_func_1FC06784(cpu); -} - -void SCPH1001_func_1FC06784_cont_BFC067CC(CPUState* cpu) { - cpu->pc = 0xBFC067CCu; - SCPH1001_func_1FC06784(cpu); -} - -void SCPH1001_func_1FC06784_cont_BFC067D8(CPUState* cpu) { - cpu->pc = 0xBFC067D8u; - SCPH1001_func_1FC06784(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06800(CPUState* cpu) { - cpu->pc = 0xBFC06800u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06808(CPUState* cpu) { - cpu->pc = 0xBFC06808u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06814(CPUState* cpu) { - cpu->pc = 0xBFC06814u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06834(CPUState* cpu) { - cpu->pc = 0xBFC06834u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0683C(CPUState* cpu) { - cpu->pc = 0xBFC0683Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06844(CPUState* cpu) { - cpu->pc = 0xBFC06844u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0684C(CPUState* cpu) { - cpu->pc = 0xBFC0684Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06854(CPUState* cpu) { - cpu->pc = 0xBFC06854u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0685C(CPUState* cpu) { - cpu->pc = 0xBFC0685Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06864(CPUState* cpu) { - cpu->pc = 0xBFC06864u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0686C(CPUState* cpu) { - cpu->pc = 0xBFC0686Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06874(CPUState* cpu) { - cpu->pc = 0xBFC06874u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC068AC(CPUState* cpu) { - cpu->pc = 0xBFC068ACu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC068B4(CPUState* cpu) { - cpu->pc = 0xBFC068B4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC068C0(CPUState* cpu) { - cpu->pc = 0xBFC068C0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC068C8(CPUState* cpu) { - cpu->pc = 0xBFC068C8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC068F8(CPUState* cpu) { - cpu->pc = 0xBFC068F8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06904(CPUState* cpu) { - cpu->pc = 0xBFC06904u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06914(CPUState* cpu) { - cpu->pc = 0xBFC06914u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0691C(CPUState* cpu) { - cpu->pc = 0xBFC0691Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06924(CPUState* cpu) { - cpu->pc = 0xBFC06924u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0692C(CPUState* cpu) { - cpu->pc = 0xBFC0692Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0693C(CPUState* cpu) { - cpu->pc = 0xBFC0693Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC0694C(CPUState* cpu) { - cpu->pc = 0xBFC0694Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06954(CPUState* cpu) { - cpu->pc = 0xBFC06954u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06978(CPUState* cpu) { - cpu->pc = 0xBFC06978u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06980(CPUState* cpu) { - cpu->pc = 0xBFC06980u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06988(CPUState* cpu) { - cpu->pc = 0xBFC06988u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06990(CPUState* cpu) { - cpu->pc = 0xBFC06990u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06998(CPUState* cpu) { - cpu->pc = 0xBFC06998u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069A0(CPUState* cpu) { - cpu->pc = 0xBFC069A0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069B4(CPUState* cpu) { - cpu->pc = 0xBFC069B4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069C0(CPUState* cpu) { - cpu->pc = 0xBFC069C0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069C8(CPUState* cpu) { - cpu->pc = 0xBFC069C8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069D0(CPUState* cpu) { - cpu->pc = 0xBFC069D0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069D8(CPUState* cpu) { - cpu->pc = 0xBFC069D8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069E4(CPUState* cpu) { - cpu->pc = 0xBFC069E4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069EC(CPUState* cpu) { - cpu->pc = 0xBFC069ECu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC069F8(CPUState* cpu) { - cpu->pc = 0xBFC069F8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A04(CPUState* cpu) { - cpu->pc = 0xBFC06A04u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A0C(CPUState* cpu) { - cpu->pc = 0xBFC06A0Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A14(CPUState* cpu) { - cpu->pc = 0xBFC06A14u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A1C(CPUState* cpu) { - cpu->pc = 0xBFC06A1Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A28(CPUState* cpu) { - cpu->pc = 0xBFC06A28u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A30(CPUState* cpu) { - cpu->pc = 0xBFC06A30u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A38(CPUState* cpu) { - cpu->pc = 0xBFC06A38u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A3C(CPUState* cpu) { - cpu->pc = 0xBFC06A3Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A44(CPUState* cpu) { - cpu->pc = 0xBFC06A44u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A4C(CPUState* cpu) { - cpu->pc = 0xBFC06A4Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A5C(CPUState* cpu) { - cpu->pc = 0xBFC06A5Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A68(CPUState* cpu) { - cpu->pc = 0xBFC06A68u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A70(CPUState* cpu) { - cpu->pc = 0xBFC06A70u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A78(CPUState* cpu) { - cpu->pc = 0xBFC06A78u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A7C(CPUState* cpu) { - cpu->pc = 0xBFC06A7Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A8C(CPUState* cpu) { - cpu->pc = 0xBFC06A8Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06A94(CPUState* cpu) { - cpu->pc = 0xBFC06A94u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AAC(CPUState* cpu) { - cpu->pc = 0xBFC06AACu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06ABC(CPUState* cpu) { - cpu->pc = 0xBFC06ABCu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AC4(CPUState* cpu) { - cpu->pc = 0xBFC06AC4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AD8(CPUState* cpu) { - cpu->pc = 0xBFC06AD8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AE4(CPUState* cpu) { - cpu->pc = 0xBFC06AE4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AEC(CPUState* cpu) { - cpu->pc = 0xBFC06AECu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06AF4(CPUState* cpu) { - cpu->pc = 0xBFC06AF4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B10(CPUState* cpu) { - cpu->pc = 0xBFC06B10u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B18(CPUState* cpu) { - cpu->pc = 0xBFC06B18u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B24(CPUState* cpu) { - cpu->pc = 0xBFC06B24u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B2C(CPUState* cpu) { - cpu->pc = 0xBFC06B2Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B34(CPUState* cpu) { - cpu->pc = 0xBFC06B34u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B50(CPUState* cpu) { - cpu->pc = 0xBFC06B50u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B60(CPUState* cpu) { - cpu->pc = 0xBFC06B60u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B6C(CPUState* cpu) { - cpu->pc = 0xBFC06B6Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B74(CPUState* cpu) { - cpu->pc = 0xBFC06B74u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B7C(CPUState* cpu) { - cpu->pc = 0xBFC06B7Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B84(CPUState* cpu) { - cpu->pc = 0xBFC06B84u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06B98(CPUState* cpu) { - cpu->pc = 0xBFC06B98u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BA4(CPUState* cpu) { - cpu->pc = 0xBFC06BA4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BAC(CPUState* cpu) { - cpu->pc = 0xBFC06BACu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BB4(CPUState* cpu) { - cpu->pc = 0xBFC06BB4u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BBC(CPUState* cpu) { - cpu->pc = 0xBFC06BBCu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BD0(CPUState* cpu) { - cpu->pc = 0xBFC06BD0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BD8(CPUState* cpu) { - cpu->pc = 0xBFC06BD8u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06BE0(CPUState* cpu) { - cpu->pc = 0xBFC06BE0u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C04(CPUState* cpu) { - cpu->pc = 0xBFC06C04u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C20(CPUState* cpu) { - cpu->pc = 0xBFC06C20u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C48(CPUState* cpu) { - cpu->pc = 0xBFC06C48u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C50(CPUState* cpu) { - cpu->pc = 0xBFC06C50u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C5C(CPUState* cpu) { - cpu->pc = 0xBFC06C5Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C64(CPUState* cpu) { - cpu->pc = 0xBFC06C64u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C6C(CPUState* cpu) { - cpu->pc = 0xBFC06C6Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C80(CPUState* cpu) { - cpu->pc = 0xBFC06C80u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C8C(CPUState* cpu) { - cpu->pc = 0xBFC06C8Cu; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC067E8_cont_BFC06C94(CPUState* cpu) { - cpu->pc = 0xBFC06C94u; - SCPH1001_func_1FC067E8(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CC8(CPUState* cpu) { - cpu->pc = 0xBFC06CC8u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CD4(CPUState* cpu) { - cpu->pc = 0xBFC06CD4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CDC(CPUState* cpu) { - cpu->pc = 0xBFC06CDCu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CE4(CPUState* cpu) { - cpu->pc = 0xBFC06CE4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CEC(CPUState* cpu) { - cpu->pc = 0xBFC06CECu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CF4(CPUState* cpu) { - cpu->pc = 0xBFC06CF4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06CFC(CPUState* cpu) { - cpu->pc = 0xBFC06CFCu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D1C(CPUState* cpu) { - cpu->pc = 0xBFC06D1Cu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D28(CPUState* cpu) { - cpu->pc = 0xBFC06D28u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D30(CPUState* cpu) { - cpu->pc = 0xBFC06D30u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D40(CPUState* cpu) { - cpu->pc = 0xBFC06D40u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D48(CPUState* cpu) { - cpu->pc = 0xBFC06D48u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D50(CPUState* cpu) { - cpu->pc = 0xBFC06D50u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D58(CPUState* cpu) { - cpu->pc = 0xBFC06D58u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D68(CPUState* cpu) { - cpu->pc = 0xBFC06D68u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D78(CPUState* cpu) { - cpu->pc = 0xBFC06D78u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D80(CPUState* cpu) { - cpu->pc = 0xBFC06D80u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06D94(CPUState* cpu) { - cpu->pc = 0xBFC06D94u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DA0(CPUState* cpu) { - cpu->pc = 0xBFC06DA0u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DA8(CPUState* cpu) { - cpu->pc = 0xBFC06DA8u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DB0(CPUState* cpu) { - cpu->pc = 0xBFC06DB0u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DB8(CPUState* cpu) { - cpu->pc = 0xBFC06DB8u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DC4(CPUState* cpu) { - cpu->pc = 0xBFC06DC4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DCC(CPUState* cpu) { - cpu->pc = 0xBFC06DCCu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DD4(CPUState* cpu) { - cpu->pc = 0xBFC06DD4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DDC(CPUState* cpu) { - cpu->pc = 0xBFC06DDCu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DF0(CPUState* cpu) { - cpu->pc = 0xBFC06DF0u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06DF8(CPUState* cpu) { - cpu->pc = 0xBFC06DF8u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E00(CPUState* cpu) { - cpu->pc = 0xBFC06E00u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E24(CPUState* cpu) { - cpu->pc = 0xBFC06E24u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E40(CPUState* cpu) { - cpu->pc = 0xBFC06E40u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E68(CPUState* cpu) { - cpu->pc = 0xBFC06E68u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E70(CPUState* cpu) { - cpu->pc = 0xBFC06E70u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E7C(CPUState* cpu) { - cpu->pc = 0xBFC06E7Cu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E84(CPUState* cpu) { - cpu->pc = 0xBFC06E84u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06E8C(CPUState* cpu) { - cpu->pc = 0xBFC06E8Cu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06EA0(CPUState* cpu) { - cpu->pc = 0xBFC06EA0u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06EAC(CPUState* cpu) { - cpu->pc = 0xBFC06EACu; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06CA4_cont_BFC06EB4(CPUState* cpu) { - cpu->pc = 0xBFC06EB4u; - SCPH1001_func_1FC06CA4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06ED4(CPUState* cpu) { - cpu->pc = 0xBFC06ED4u; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06EF0(CPUState* cpu) { - cpu->pc = 0xBFC06EF0u; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06EFC(CPUState* cpu) { - cpu->pc = 0xBFC06EFCu; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06F04(CPUState* cpu) { - cpu->pc = 0xBFC06F04u; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06F0C(CPUState* cpu) { - cpu->pc = 0xBFC06F0Cu; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06EC4_cont_BFC06F18(CPUState* cpu) { - cpu->pc = 0xBFC06F18u; - SCPH1001_func_1FC06EC4(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F3C(CPUState* cpu) { - cpu->pc = 0xBFC06F3Cu; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F4C(CPUState* cpu) { - cpu->pc = 0xBFC06F4Cu; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F54(CPUState* cpu) { - cpu->pc = 0xBFC06F54u; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F5C(CPUState* cpu) { - cpu->pc = 0xBFC06F5Cu; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F64(CPUState* cpu) { - cpu->pc = 0xBFC06F64u; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F74(CPUState* cpu) { - cpu->pc = 0xBFC06F74u; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F84(CPUState* cpu) { - cpu->pc = 0xBFC06F84u; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F8C(CPUState* cpu) { - cpu->pc = 0xBFC06F8Cu; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06F28_cont_BFC06F94(CPUState* cpu) { - cpu->pc = 0xBFC06F94u; - SCPH1001_func_1FC06F28(cpu); -} - -void SCPH1001_func_1FC06FA4_cont_BFC06FB8(CPUState* cpu) { - cpu->pc = 0xBFC06FB8u; - SCPH1001_func_1FC06FA4(cpu); -} - -void SCPH1001_func_1FC06FA4_cont_BFC06FC4(CPUState* cpu) { - cpu->pc = 0xBFC06FC4u; - SCPH1001_func_1FC06FA4(cpu); -} - -void SCPH1001_func_1FC06FF0_cont_BFC07014(CPUState* cpu) { - cpu->pc = 0xBFC07014u; - SCPH1001_func_1FC06FF0(cpu); -} - -void SCPH1001_func_1FC06FF0_cont_BFC0701C(CPUState* cpu) { - cpu->pc = 0xBFC0701Cu; - SCPH1001_func_1FC06FF0(cpu); -} - -void SCPH1001_func_1FC06FF0_cont_BFC0702C(CPUState* cpu) { - cpu->pc = 0xBFC0702Cu; - SCPH1001_func_1FC06FF0(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC0705C(CPUState* cpu) { - cpu->pc = 0xBFC0705Cu; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC07064(CPUState* cpu) { - cpu->pc = 0xBFC07064u; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC07078(CPUState* cpu) { - cpu->pc = 0xBFC07078u; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC07088(CPUState* cpu) { - cpu->pc = 0xBFC07088u; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC07098(CPUState* cpu) { - cpu->pc = 0xBFC07098u; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC0703C_cont_BFC070A4(CPUState* cpu) { - cpu->pc = 0xBFC070A4u; - SCPH1001_func_1FC0703C(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC070CC(CPUState* cpu) { - cpu->pc = 0xBFC070CCu; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC070D4(CPUState* cpu) { - cpu->pc = 0xBFC070D4u; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC070E8(CPUState* cpu) { - cpu->pc = 0xBFC070E8u; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC070F8(CPUState* cpu) { - cpu->pc = 0xBFC070F8u; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC07108(CPUState* cpu) { - cpu->pc = 0xBFC07108u; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC070AC_cont_BFC07114(CPUState* cpu) { - cpu->pc = 0xBFC07114u; - SCPH1001_func_1FC070AC(cpu); -} - -void SCPH1001_func_1FC0711C_cont_BFC07138(CPUState* cpu) { - cpu->pc = 0xBFC07138u; - SCPH1001_func_1FC0711C(cpu); -} - -void SCPH1001_func_1FC07148_cont_BFC0715C(CPUState* cpu) { - cpu->pc = 0xBFC0715Cu; - SCPH1001_func_1FC07148(cpu); -} - -void SCPH1001_func_1FC07148_cont_BFC07170(CPUState* cpu) { - cpu->pc = 0xBFC07170u; - SCPH1001_func_1FC07148(cpu); -} - -void SCPH1001_func_1FC07148_cont_BFC07184(CPUState* cpu) { - cpu->pc = 0xBFC07184u; - SCPH1001_func_1FC07148(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC071B0(CPUState* cpu) { - cpu->pc = 0xBFC071B0u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC071C8(CPUState* cpu) { - cpu->pc = 0xBFC071C8u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC071E8(CPUState* cpu) { - cpu->pc = 0xBFC071E8u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC07208(CPUState* cpu) { - cpu->pc = 0xBFC07208u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC07228(CPUState* cpu) { - cpu->pc = 0xBFC07228u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC07248(CPUState* cpu) { - cpu->pc = 0xBFC07248u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC0725C(CPUState* cpu) { - cpu->pc = 0xBFC0725Cu; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC0726C(CPUState* cpu) { - cpu->pc = 0xBFC0726Cu; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC0727C(CPUState* cpu) { - cpu->pc = 0xBFC0727Cu; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC0728C(CPUState* cpu) { - cpu->pc = 0xBFC0728Cu; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC0729C(CPUState* cpu) { - cpu->pc = 0xBFC0729Cu; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC071A0_cont_BFC072A4(CPUState* cpu) { - cpu->pc = 0xBFC072A4u; - SCPH1001_func_1FC071A0(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC072C8(CPUState* cpu) { - cpu->pc = 0xBFC072C8u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC072D8(CPUState* cpu) { - cpu->pc = 0xBFC072D8u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC072E8(CPUState* cpu) { - cpu->pc = 0xBFC072E8u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC072F8(CPUState* cpu) { - cpu->pc = 0xBFC072F8u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC07308(CPUState* cpu) { - cpu->pc = 0xBFC07308u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC07318(CPUState* cpu) { - cpu->pc = 0xBFC07318u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC072B8_cont_BFC07320(CPUState* cpu) { - cpu->pc = 0xBFC07320u; - SCPH1001_func_1FC072B8(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07340(CPUState* cpu) { - cpu->pc = 0xBFC07340u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07348(CPUState* cpu) { - cpu->pc = 0xBFC07348u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07350(CPUState* cpu) { - cpu->pc = 0xBFC07350u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07358(CPUState* cpu) { - cpu->pc = 0xBFC07358u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07360(CPUState* cpu) { - cpu->pc = 0xBFC07360u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07330_cont_BFC07364(CPUState* cpu) { - cpu->pc = 0xBFC07364u; - SCPH1001_func_1FC07330(cpu); -} - -void SCPH1001_func_1FC07370_cont_BFC07380(CPUState* cpu) { - cpu->pc = 0xBFC07380u; - SCPH1001_func_1FC07370(cpu); -} - -void SCPH1001_func_1FC07370_cont_BFC07390(CPUState* cpu) { - cpu->pc = 0xBFC07390u; - SCPH1001_func_1FC07370(cpu); -} - -void SCPH1001_func_1FC073A0_cont_BFC073B0(CPUState* cpu) { - cpu->pc = 0xBFC073B0u; - SCPH1001_func_1FC073A0(cpu); -} - -void SCPH1001_func_1FC073A0_cont_BFC073C8(CPUState* cpu) { - cpu->pc = 0xBFC073C8u; - SCPH1001_func_1FC073A0(cpu); -} - -void SCPH1001_func_1FC073A0_cont_BFC073CC(CPUState* cpu) { - cpu->pc = 0xBFC073CCu; - SCPH1001_func_1FC073A0(cpu); -} - -void SCPH1001_func_1FC073A0_cont_BFC073F8(CPUState* cpu) { - cpu->pc = 0xBFC073F8u; - SCPH1001_func_1FC073A0(cpu); -} - -void SCPH1001_func_1FC073A0_cont_BFC07400(CPUState* cpu) { - cpu->pc = 0xBFC07400u; - SCPH1001_func_1FC073A0(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07438(CPUState* cpu) { - cpu->pc = 0xBFC07438u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07444(CPUState* cpu) { - cpu->pc = 0xBFC07444u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC0744C(CPUState* cpu) { - cpu->pc = 0xBFC0744Cu; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07464(CPUState* cpu) { - cpu->pc = 0xBFC07464u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC0746C(CPUState* cpu) { - cpu->pc = 0xBFC0746Cu; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07474(CPUState* cpu) { - cpu->pc = 0xBFC07474u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC074F0(CPUState* cpu) { - cpu->pc = 0xBFC074F0u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC074F8(CPUState* cpu) { - cpu->pc = 0xBFC074F8u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07500(CPUState* cpu) { - cpu->pc = 0xBFC07500u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07518(CPUState* cpu) { - cpu->pc = 0xBFC07518u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07540(CPUState* cpu) { - cpu->pc = 0xBFC07540u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07560(CPUState* cpu) { - cpu->pc = 0xBFC07560u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07570(CPUState* cpu) { - cpu->pc = 0xBFC07570u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07580(CPUState* cpu) { - cpu->pc = 0xBFC07580u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC075DC(CPUState* cpu) { - cpu->pc = 0xBFC075DCu; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC075F8(CPUState* cpu) { - cpu->pc = 0xBFC075F8u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07604(CPUState* cpu) { - cpu->pc = 0xBFC07604u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC0760C(CPUState* cpu) { - cpu->pc = 0xBFC0760Cu; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07618(CPUState* cpu) { - cpu->pc = 0xBFC07618u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07620(CPUState* cpu) { - cpu->pc = 0xBFC07620u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07630(CPUState* cpu) { - cpu->pc = 0xBFC07630u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07410_cont_BFC07650(CPUState* cpu) { - cpu->pc = 0xBFC07650u; - SCPH1001_func_1FC07410(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC0769C(CPUState* cpu) { - cpu->pc = 0xBFC0769Cu; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076AC(CPUState* cpu) { - cpu->pc = 0xBFC076ACu; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076B8(CPUState* cpu) { - cpu->pc = 0xBFC076B8u; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076C0(CPUState* cpu) { - cpu->pc = 0xBFC076C0u; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076C8(CPUState* cpu) { - cpu->pc = 0xBFC076C8u; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076E0(CPUState* cpu) { - cpu->pc = 0xBFC076E0u; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07664_cont_BFC076E4(CPUState* cpu) { - cpu->pc = 0xBFC076E4u; - SCPH1001_func_1FC07664(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07718(CPUState* cpu) { - cpu->pc = 0xBFC07718u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07720(CPUState* cpu) { - cpu->pc = 0xBFC07720u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC0775C(CPUState* cpu) { - cpu->pc = 0xBFC0775Cu; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07768(CPUState* cpu) { - cpu->pc = 0xBFC07768u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07774(CPUState* cpu) { - cpu->pc = 0xBFC07774u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC077A8(CPUState* cpu) { - cpu->pc = 0xBFC077A8u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC077B8(CPUState* cpu) { - cpu->pc = 0xBFC077B8u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC077C8(CPUState* cpu) { - cpu->pc = 0xBFC077C8u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07834(CPUState* cpu) { - cpu->pc = 0xBFC07834u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07854(CPUState* cpu) { - cpu->pc = 0xBFC07854u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07860(CPUState* cpu) { - cpu->pc = 0xBFC07860u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07870(CPUState* cpu) { - cpu->pc = 0xBFC07870u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC07700_cont_BFC07894(CPUState* cpu) { - cpu->pc = 0xBFC07894u; - SCPH1001_func_1FC07700(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078C8(CPUState* cpu) { - cpu->pc = 0xBFC078C8u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078D4(CPUState* cpu) { - cpu->pc = 0xBFC078D4u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078DC(CPUState* cpu) { - cpu->pc = 0xBFC078DCu; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078E4(CPUState* cpu) { - cpu->pc = 0xBFC078E4u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078F4(CPUState* cpu) { - cpu->pc = 0xBFC078F4u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC078F8(CPUState* cpu) { - cpu->pc = 0xBFC078F8u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07908(CPUState* cpu) { - cpu->pc = 0xBFC07908u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07910(CPUState* cpu) { - cpu->pc = 0xBFC07910u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07920(CPUState* cpu) { - cpu->pc = 0xBFC07920u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07928(CPUState* cpu) { - cpu->pc = 0xBFC07928u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07938(CPUState* cpu) { - cpu->pc = 0xBFC07938u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07940(CPUState* cpu) { - cpu->pc = 0xBFC07940u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07948(CPUState* cpu) { - cpu->pc = 0xBFC07948u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07958(CPUState* cpu) { - cpu->pc = 0xBFC07958u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07968(CPUState* cpu) { - cpu->pc = 0xBFC07968u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07978(CPUState* cpu) { - cpu->pc = 0xBFC07978u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC0797C(CPUState* cpu) { - cpu->pc = 0xBFC0797Cu; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07984(CPUState* cpu) { - cpu->pc = 0xBFC07984u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC07990(CPUState* cpu) { - cpu->pc = 0xBFC07990u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC079A0(CPUState* cpu) { - cpu->pc = 0xBFC079A0u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC078A4_cont_BFC079E0(CPUState* cpu) { - cpu->pc = 0xBFC079E0u; - SCPH1001_func_1FC078A4(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A28(CPUState* cpu) { - cpu->pc = 0xBFC07A28u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A30(CPUState* cpu) { - cpu->pc = 0xBFC07A30u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A34(CPUState* cpu) { - cpu->pc = 0xBFC07A34u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A3C(CPUState* cpu) { - cpu->pc = 0xBFC07A3Cu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A50(CPUState* cpu) { - cpu->pc = 0xBFC07A50u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A54(CPUState* cpu) { - cpu->pc = 0xBFC07A54u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A60(CPUState* cpu) { - cpu->pc = 0xBFC07A60u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A74(CPUState* cpu) { - cpu->pc = 0xBFC07A74u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A84(CPUState* cpu) { - cpu->pc = 0xBFC07A84u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A8C(CPUState* cpu) { - cpu->pc = 0xBFC07A8Cu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07A9C(CPUState* cpu) { - cpu->pc = 0xBFC07A9Cu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AA4(CPUState* cpu) { - cpu->pc = 0xBFC07AA4u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AB0(CPUState* cpu) { - cpu->pc = 0xBFC07AB0u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AC0(CPUState* cpu) { - cpu->pc = 0xBFC07AC0u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AD8(CPUState* cpu) { - cpu->pc = 0xBFC07AD8u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AE8(CPUState* cpu) { - cpu->pc = 0xBFC07AE8u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07AEC(CPUState* cpu) { - cpu->pc = 0xBFC07AECu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B04(CPUState* cpu) { - cpu->pc = 0xBFC07B04u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B08(CPUState* cpu) { - cpu->pc = 0xBFC07B08u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B20(CPUState* cpu) { - cpu->pc = 0xBFC07B20u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B30(CPUState* cpu) { - cpu->pc = 0xBFC07B30u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B40(CPUState* cpu) { - cpu->pc = 0xBFC07B40u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B5C(CPUState* cpu) { - cpu->pc = 0xBFC07B5Cu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B64(CPUState* cpu) { - cpu->pc = 0xBFC07B64u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B68(CPUState* cpu) { - cpu->pc = 0xBFC07B68u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B6C(CPUState* cpu) { - cpu->pc = 0xBFC07B6Cu; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07A04_cont_BFC07B78(CPUState* cpu) { - cpu->pc = 0xBFC07B78u; - SCPH1001_func_1FC07A04(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07B98(CPUState* cpu) { - cpu->pc = 0xBFC07B98u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BA4(CPUState* cpu) { - cpu->pc = 0xBFC07BA4u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BAC(CPUState* cpu) { - cpu->pc = 0xBFC07BACu; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BB4(CPUState* cpu) { - cpu->pc = 0xBFC07BB4u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BC8(CPUState* cpu) { - cpu->pc = 0xBFC07BC8u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BCC(CPUState* cpu) { - cpu->pc = 0xBFC07BCCu; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BD4(CPUState* cpu) { - cpu->pc = 0xBFC07BD4u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BDC(CPUState* cpu) { - cpu->pc = 0xBFC07BDCu; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07BF0(CPUState* cpu) { - cpu->pc = 0xBFC07BF0u; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07B88_cont_BFC07C0C(CPUState* cpu) { - cpu->pc = 0xBFC07C0Cu; - SCPH1001_func_1FC07B88(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07C5C(CPUState* cpu) { - cpu->pc = 0xBFC07C5Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07C64(CPUState* cpu) { - cpu->pc = 0xBFC07C64u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07C70(CPUState* cpu) { - cpu->pc = 0xBFC07C70u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07C78(CPUState* cpu) { - cpu->pc = 0xBFC07C78u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07D8C(CPUState* cpu) { - cpu->pc = 0xBFC07D8Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07D94(CPUState* cpu) { - cpu->pc = 0xBFC07D94u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DA0(CPUState* cpu) { - cpu->pc = 0xBFC07DA0u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DA8(CPUState* cpu) { - cpu->pc = 0xBFC07DA8u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DB0(CPUState* cpu) { - cpu->pc = 0xBFC07DB0u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DB8(CPUState* cpu) { - cpu->pc = 0xBFC07DB8u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DC4(CPUState* cpu) { - cpu->pc = 0xBFC07DC4u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DCC(CPUState* cpu) { - cpu->pc = 0xBFC07DCCu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DDC(CPUState* cpu) { - cpu->pc = 0xBFC07DDCu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DE4(CPUState* cpu) { - cpu->pc = 0xBFC07DE4u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07DF0(CPUState* cpu) { - cpu->pc = 0xBFC07DF0u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E00(CPUState* cpu) { - cpu->pc = 0xBFC07E00u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E08(CPUState* cpu) { - cpu->pc = 0xBFC07E08u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E14(CPUState* cpu) { - cpu->pc = 0xBFC07E14u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E1C(CPUState* cpu) { - cpu->pc = 0xBFC07E1Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E2C(CPUState* cpu) { - cpu->pc = 0xBFC07E2Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E34(CPUState* cpu) { - cpu->pc = 0xBFC07E34u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E40(CPUState* cpu) { - cpu->pc = 0xBFC07E40u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E50(CPUState* cpu) { - cpu->pc = 0xBFC07E50u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E58(CPUState* cpu) { - cpu->pc = 0xBFC07E58u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E60(CPUState* cpu) { - cpu->pc = 0xBFC07E60u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E6C(CPUState* cpu) { - cpu->pc = 0xBFC07E6Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E74(CPUState* cpu) { - cpu->pc = 0xBFC07E74u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E7C(CPUState* cpu) { - cpu->pc = 0xBFC07E7Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E8C(CPUState* cpu) { - cpu->pc = 0xBFC07E8Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E94(CPUState* cpu) { - cpu->pc = 0xBFC07E94u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07E9C(CPUState* cpu) { - cpu->pc = 0xBFC07E9Cu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EAC(CPUState* cpu) { - cpu->pc = 0xBFC07EACu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EB4(CPUState* cpu) { - cpu->pc = 0xBFC07EB4u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EC0(CPUState* cpu) { - cpu->pc = 0xBFC07EC0u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EC8(CPUState* cpu) { - cpu->pc = 0xBFC07EC8u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07ED8(CPUState* cpu) { - cpu->pc = 0xBFC07ED8u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EE0(CPUState* cpu) { - cpu->pc = 0xBFC07EE0u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EEC(CPUState* cpu) { - cpu->pc = 0xBFC07EECu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EF4(CPUState* cpu) { - cpu->pc = 0xBFC07EF4u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07EFC(CPUState* cpu) { - cpu->pc = 0xBFC07EFCu; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07C1C_cont_BFC07F00(CPUState* cpu) { - cpu->pc = 0xBFC07F00u; - SCPH1001_func_1FC07C1C(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F44(CPUState* cpu) { - cpu->pc = 0xBFC07F44u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F50(CPUState* cpu) { - cpu->pc = 0xBFC07F50u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F5C(CPUState* cpu) { - cpu->pc = 0xBFC07F5Cu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F64(CPUState* cpu) { - cpu->pc = 0xBFC07F64u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F70(CPUState* cpu) { - cpu->pc = 0xBFC07F70u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F78(CPUState* cpu) { - cpu->pc = 0xBFC07F78u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F84(CPUState* cpu) { - cpu->pc = 0xBFC07F84u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F8C(CPUState* cpu) { - cpu->pc = 0xBFC07F8Cu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F94(CPUState* cpu) { - cpu->pc = 0xBFC07F94u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07F9C(CPUState* cpu) { - cpu->pc = 0xBFC07F9Cu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FAC(CPUState* cpu) { - cpu->pc = 0xBFC07FACu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FB8(CPUState* cpu) { - cpu->pc = 0xBFC07FB8u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FC4(CPUState* cpu) { - cpu->pc = 0xBFC07FC4u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FD4(CPUState* cpu) { - cpu->pc = 0xBFC07FD4u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FE0(CPUState* cpu) { - cpu->pc = 0xBFC07FE0u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FEC(CPUState* cpu) { - cpu->pc = 0xBFC07FECu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC07FF8(CPUState* cpu) { - cpu->pc = 0xBFC07FF8u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC08000(CPUState* cpu) { - cpu->pc = 0xBFC08000u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC0800C(CPUState* cpu) { - cpu->pc = 0xBFC0800Cu; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC07F28_cont_BFC08010(CPUState* cpu) { - cpu->pc = 0xBFC08010u; - SCPH1001_func_1FC07F28(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC08030(CPUState* cpu) { - cpu->pc = 0xBFC08030u; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC08038(CPUState* cpu) { - cpu->pc = 0xBFC08038u; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC0803C(CPUState* cpu) { - cpu->pc = 0xBFC0803Cu; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC0804C(CPUState* cpu) { - cpu->pc = 0xBFC0804Cu; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC08054(CPUState* cpu) { - cpu->pc = 0xBFC08054u; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC0805C(CPUState* cpu) { - cpu->pc = 0xBFC0805Cu; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC0806C(CPUState* cpu) { - cpu->pc = 0xBFC0806Cu; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC0807C(CPUState* cpu) { - cpu->pc = 0xBFC0807Cu; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC08084(CPUState* cpu) { - cpu->pc = 0xBFC08084u; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08020_cont_BFC08090(CPUState* cpu) { - cpu->pc = 0xBFC08090u; - SCPH1001_func_1FC08020(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC080B0(CPUState* cpu) { - cpu->pc = 0xBFC080B0u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC080BC(CPUState* cpu) { - cpu->pc = 0xBFC080BCu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC080CC(CPUState* cpu) { - cpu->pc = 0xBFC080CCu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC080D8(CPUState* cpu) { - cpu->pc = 0xBFC080D8u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC080EC(CPUState* cpu) { - cpu->pc = 0xBFC080ECu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08100(CPUState* cpu) { - cpu->pc = 0xBFC08100u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC0811C(CPUState* cpu) { - cpu->pc = 0xBFC0811Cu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08130(CPUState* cpu) { - cpu->pc = 0xBFC08130u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC0814C(CPUState* cpu) { - cpu->pc = 0xBFC0814Cu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08154(CPUState* cpu) { - cpu->pc = 0xBFC08154u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08174(CPUState* cpu) { - cpu->pc = 0xBFC08174u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08180(CPUState* cpu) { - cpu->pc = 0xBFC08180u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC08194(CPUState* cpu) { - cpu->pc = 0xBFC08194u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC081E8(CPUState* cpu) { - cpu->pc = 0xBFC081E8u; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC08098_cont_BFC081EC(CPUState* cpu) { - cpu->pc = 0xBFC081ECu; - SCPH1001_func_1FC08098(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08218(CPUState* cpu) { - cpu->pc = 0xBFC08218u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08220(CPUState* cpu) { - cpu->pc = 0xBFC08220u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08234(CPUState* cpu) { - cpu->pc = 0xBFC08234u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08250(CPUState* cpu) { - cpu->pc = 0xBFC08250u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08258(CPUState* cpu) { - cpu->pc = 0xBFC08258u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08264(CPUState* cpu) { - cpu->pc = 0xBFC08264u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08274(CPUState* cpu) { - cpu->pc = 0xBFC08274u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC0827C(CPUState* cpu) { - cpu->pc = 0xBFC0827Cu; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08290(CPUState* cpu) { - cpu->pc = 0xBFC08290u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08298(CPUState* cpu) { - cpu->pc = 0xBFC08298u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082A0(CPUState* cpu) { - cpu->pc = 0xBFC082A0u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082A8(CPUState* cpu) { - cpu->pc = 0xBFC082A8u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082B4(CPUState* cpu) { - cpu->pc = 0xBFC082B4u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082C8(CPUState* cpu) { - cpu->pc = 0xBFC082C8u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082D8(CPUState* cpu) { - cpu->pc = 0xBFC082D8u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082EC(CPUState* cpu) { - cpu->pc = 0xBFC082ECu; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC082F0(CPUState* cpu) { - cpu->pc = 0xBFC082F0u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08300(CPUState* cpu) { - cpu->pc = 0xBFC08300u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08304(CPUState* cpu) { - cpu->pc = 0xBFC08304u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC0830C(CPUState* cpu) { - cpu->pc = 0xBFC0830Cu; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC0832C(CPUState* cpu) { - cpu->pc = 0xBFC0832Cu; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC081FC_cont_BFC08344(CPUState* cpu) { - cpu->pc = 0xBFC08344u; - SCPH1001_func_1FC081FC(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC0837C(CPUState* cpu) { - cpu->pc = 0xBFC0837Cu; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC08388(CPUState* cpu) { - cpu->pc = 0xBFC08388u; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC08394(CPUState* cpu) { - cpu->pc = 0xBFC08394u; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC083A8(CPUState* cpu) { - cpu->pc = 0xBFC083A8u; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC083B0(CPUState* cpu) { - cpu->pc = 0xBFC083B0u; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC08354_cont_BFC083B8(CPUState* cpu) { - cpu->pc = 0xBFC083B8u; - SCPH1001_func_1FC08354(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08404(CPUState* cpu) { - cpu->pc = 0xBFC08404u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC0841C(CPUState* cpu) { - cpu->pc = 0xBFC0841Cu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC0842C(CPUState* cpu) { - cpu->pc = 0xBFC0842Cu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08438(CPUState* cpu) { - cpu->pc = 0xBFC08438u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08440(CPUState* cpu) { - cpu->pc = 0xBFC08440u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08454(CPUState* cpu) { - cpu->pc = 0xBFC08454u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC0846C(CPUState* cpu) { - cpu->pc = 0xBFC0846Cu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC0847C(CPUState* cpu) { - cpu->pc = 0xBFC0847Cu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08484(CPUState* cpu) { - cpu->pc = 0xBFC08484u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08498(CPUState* cpu) { - cpu->pc = 0xBFC08498u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084A0(CPUState* cpu) { - cpu->pc = 0xBFC084A0u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084A8(CPUState* cpu) { - cpu->pc = 0xBFC084A8u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084BC(CPUState* cpu) { - cpu->pc = 0xBFC084BCu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084C4(CPUState* cpu) { - cpu->pc = 0xBFC084C4u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084CC(CPUState* cpu) { - cpu->pc = 0xBFC084CCu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084D8(CPUState* cpu) { - cpu->pc = 0xBFC084D8u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084DC(CPUState* cpu) { - cpu->pc = 0xBFC084DCu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084E4(CPUState* cpu) { - cpu->pc = 0xBFC084E4u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084EC(CPUState* cpu) { - cpu->pc = 0xBFC084ECu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084F0(CPUState* cpu) { - cpu->pc = 0xBFC084F0u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC084FC(CPUState* cpu) { - cpu->pc = 0xBFC084FCu; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08504(CPUState* cpu) { - cpu->pc = 0xBFC08504u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08510(CPUState* cpu) { - cpu->pc = 0xBFC08510u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08518(CPUState* cpu) { - cpu->pc = 0xBFC08518u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08520(CPUState* cpu) { - cpu->pc = 0xBFC08520u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08538(CPUState* cpu) { - cpu->pc = 0xBFC08538u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08554(CPUState* cpu) { - cpu->pc = 0xBFC08554u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08560(CPUState* cpu) { - cpu->pc = 0xBFC08560u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08568(CPUState* cpu) { - cpu->pc = 0xBFC08568u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08574(CPUState* cpu) { - cpu->pc = 0xBFC08574u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08584(CPUState* cpu) { - cpu->pc = 0xBFC08584u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC083CC_cont_BFC08588(CPUState* cpu) { - cpu->pc = 0xBFC08588u; - SCPH1001_func_1FC083CC(cpu); -} - -void SCPH1001_func_1FC085B0_cont_BFC085C4(CPUState* cpu) { - cpu->pc = 0xBFC085C4u; - SCPH1001_func_1FC085B0(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC085E4(CPUState* cpu) { - cpu->pc = 0xBFC085E4u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC085EC(CPUState* cpu) { - cpu->pc = 0xBFC085ECu; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC085F4(CPUState* cpu) { - cpu->pc = 0xBFC085F4u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08600(CPUState* cpu) { - cpu->pc = 0xBFC08600u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08608(CPUState* cpu) { - cpu->pc = 0xBFC08608u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08610(CPUState* cpu) { - cpu->pc = 0xBFC08610u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08618(CPUState* cpu) { - cpu->pc = 0xBFC08618u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08624(CPUState* cpu) { - cpu->pc = 0xBFC08624u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC0862C(CPUState* cpu) { - cpu->pc = 0xBFC0862Cu; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08634(CPUState* cpu) { - cpu->pc = 0xBFC08634u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC0863C(CPUState* cpu) { - cpu->pc = 0xBFC0863Cu; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC0864C(CPUState* cpu) { - cpu->pc = 0xBFC0864Cu; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08654(CPUState* cpu) { - cpu->pc = 0xBFC08654u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08660(CPUState* cpu) { - cpu->pc = 0xBFC08660u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08670(CPUState* cpu) { - cpu->pc = 0xBFC08670u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08678(CPUState* cpu) { - cpu->pc = 0xBFC08678u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08684(CPUState* cpu) { - cpu->pc = 0xBFC08684u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08690(CPUState* cpu) { - cpu->pc = 0xBFC08690u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC08698(CPUState* cpu) { - cpu->pc = 0xBFC08698u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC086A0(CPUState* cpu) { - cpu->pc = 0xBFC086A0u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC085D4_cont_BFC086A4(CPUState* cpu) { - cpu->pc = 0xBFC086A4u; - SCPH1001_func_1FC085D4(cpu); -} - -void SCPH1001_func_1FC086B0_cont_BFC086C4(CPUState* cpu) { - cpu->pc = 0xBFC086C4u; - SCPH1001_func_1FC086B0(cpu); -} - -void SCPH1001_func_1FC086EC_cont_BFC08708(CPUState* cpu) { - cpu->pc = 0xBFC08708u; - SCPH1001_func_1FC086EC(cpu); -} - -void SCPH1001_func_1FC08720_cont_BFC08758(CPUState* cpu) { - cpu->pc = 0xBFC08758u; - SCPH1001_func_1FC08720(cpu); -} - -void SCPH1001_func_1FC08720_cont_BFC087A0(CPUState* cpu) { - cpu->pc = 0xBFC087A0u; - SCPH1001_func_1FC08720(cpu); -} - -void SCPH1001_func_1FC08720_cont_BFC087B0(CPUState* cpu) { - cpu->pc = 0xBFC087B0u; - SCPH1001_func_1FC08720(cpu); -} - -void SCPH1001_func_1FC08720_cont_BFC087BC(CPUState* cpu) { - cpu->pc = 0xBFC087BCu; - SCPH1001_func_1FC08720(cpu); -} - -void SCPH1001_func_1FC087C4_cont_BFC087FC(CPUState* cpu) { - cpu->pc = 0xBFC087FCu; - SCPH1001_func_1FC087C4(cpu); -} - -void SCPH1001_func_1FC087C4_cont_BFC08844(CPUState* cpu) { - cpu->pc = 0xBFC08844u; - SCPH1001_func_1FC087C4(cpu); -} - -void SCPH1001_func_1FC0884C_cont_BFC08870(CPUState* cpu) { - cpu->pc = 0xBFC08870u; - SCPH1001_func_1FC0884C(cpu); -} - -void SCPH1001_func_1FC0884C_cont_BFC08888(CPUState* cpu) { - cpu->pc = 0xBFC08888u; - SCPH1001_func_1FC0884C(cpu); -} - -void SCPH1001_func_1FC0884C_cont_BFC08890(CPUState* cpu) { - cpu->pc = 0xBFC08890u; - SCPH1001_func_1FC0884C(cpu); -} - -void SCPH1001_func_1FC088A0_cont_BFC088D4(CPUState* cpu) { - cpu->pc = 0xBFC088D4u; - SCPH1001_func_1FC088A0(cpu); -} - -void SCPH1001_func_1FC088A0_cont_BFC088F8(CPUState* cpu) { - cpu->pc = 0xBFC088F8u; - SCPH1001_func_1FC088A0(cpu); -} - -void SCPH1001_func_1FC088A0_cont_BFC08904(CPUState* cpu) { - cpu->pc = 0xBFC08904u; - SCPH1001_func_1FC088A0(cpu); -} - -void SCPH1001_func_1FC088A0_cont_BFC08910(CPUState* cpu) { - cpu->pc = 0xBFC08910u; - SCPH1001_func_1FC088A0(cpu); -} - -void SCPH1001_func_1FC088A0_cont_BFC08934(CPUState* cpu) { - cpu->pc = 0xBFC08934u; - SCPH1001_func_1FC088A0(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC0896C(CPUState* cpu) { - cpu->pc = 0xBFC0896Cu; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC08978(CPUState* cpu) { - cpu->pc = 0xBFC08978u; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC08988(CPUState* cpu) { - cpu->pc = 0xBFC08988u; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC08990(CPUState* cpu) { - cpu->pc = 0xBFC08990u; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC0899C(CPUState* cpu) { - cpu->pc = 0xBFC0899Cu; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC089A8(CPUState* cpu) { - cpu->pc = 0xBFC089A8u; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC0895C_cont_BFC089B0(CPUState* cpu) { - cpu->pc = 0xBFC089B0u; - SCPH1001_func_1FC0895C(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC089F0(CPUState* cpu) { - cpu->pc = 0xBFC089F0u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC089F4(CPUState* cpu) { - cpu->pc = 0xBFC089F4u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A0C(CPUState* cpu) { - cpu->pc = 0xBFC08A0Cu; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A18(CPUState* cpu) { - cpu->pc = 0xBFC08A18u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A20(CPUState* cpu) { - cpu->pc = 0xBFC08A20u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A28(CPUState* cpu) { - cpu->pc = 0xBFC08A28u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A38(CPUState* cpu) { - cpu->pc = 0xBFC08A38u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A48(CPUState* cpu) { - cpu->pc = 0xBFC08A48u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A5C(CPUState* cpu) { - cpu->pc = 0xBFC08A5Cu; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A64(CPUState* cpu) { - cpu->pc = 0xBFC08A64u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A6C(CPUState* cpu) { - cpu->pc = 0xBFC08A6Cu; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A74(CPUState* cpu) { - cpu->pc = 0xBFC08A74u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A78(CPUState* cpu) { - cpu->pc = 0xBFC08A78u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A80(CPUState* cpu) { - cpu->pc = 0xBFC08A80u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A88(CPUState* cpu) { - cpu->pc = 0xBFC08A88u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A90(CPUState* cpu) { - cpu->pc = 0xBFC08A90u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A98(CPUState* cpu) { - cpu->pc = 0xBFC08A98u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08A9C(CPUState* cpu) { - cpu->pc = 0xBFC08A9Cu; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08AC0(CPUState* cpu) { - cpu->pc = 0xBFC08AC0u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08ACC(CPUState* cpu) { - cpu->pc = 0xBFC08ACCu; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08AD8(CPUState* cpu) { - cpu->pc = 0xBFC08AD8u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08B00(CPUState* cpu) { - cpu->pc = 0xBFC08B00u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08B20(CPUState* cpu) { - cpu->pc = 0xBFC08B20u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08B24(CPUState* cpu) { - cpu->pc = 0xBFC08B24u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC089C0_cont_BFC08B28(CPUState* cpu) { - cpu->pc = 0xBFC08B28u; - SCPH1001_func_1FC089C0(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08B64(CPUState* cpu) { - cpu->pc = 0xBFC08B64u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08B7C(CPUState* cpu) { - cpu->pc = 0xBFC08B7Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08B80(CPUState* cpu) { - cpu->pc = 0xBFC08B80u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08B98(CPUState* cpu) { - cpu->pc = 0xBFC08B98u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08BA4(CPUState* cpu) { - cpu->pc = 0xBFC08BA4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08BAC(CPUState* cpu) { - cpu->pc = 0xBFC08BACu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08BB4(CPUState* cpu) { - cpu->pc = 0xBFC08BB4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08BB8(CPUState* cpu) { - cpu->pc = 0xBFC08BB8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08BF4(CPUState* cpu) { - cpu->pc = 0xBFC08BF4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C04(CPUState* cpu) { - cpu->pc = 0xBFC08C04u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C14(CPUState* cpu) { - cpu->pc = 0xBFC08C14u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C28(CPUState* cpu) { - cpu->pc = 0xBFC08C28u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C34(CPUState* cpu) { - cpu->pc = 0xBFC08C34u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C3C(CPUState* cpu) { - cpu->pc = 0xBFC08C3Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C40(CPUState* cpu) { - cpu->pc = 0xBFC08C40u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C7C(CPUState* cpu) { - cpu->pc = 0xBFC08C7Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C84(CPUState* cpu) { - cpu->pc = 0xBFC08C84u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C94(CPUState* cpu) { - cpu->pc = 0xBFC08C94u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08C9C(CPUState* cpu) { - cpu->pc = 0xBFC08C9Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08CC0(CPUState* cpu) { - cpu->pc = 0xBFC08CC0u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08CD8(CPUState* cpu) { - cpu->pc = 0xBFC08CD8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08CF0(CPUState* cpu) { - cpu->pc = 0xBFC08CF0u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08CF8(CPUState* cpu) { - cpu->pc = 0xBFC08CF8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D08(CPUState* cpu) { - cpu->pc = 0xBFC08D08u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D10(CPUState* cpu) { - cpu->pc = 0xBFC08D10u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D18(CPUState* cpu) { - cpu->pc = 0xBFC08D18u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D20(CPUState* cpu) { - cpu->pc = 0xBFC08D20u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D24(CPUState* cpu) { - cpu->pc = 0xBFC08D24u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D44(CPUState* cpu) { - cpu->pc = 0xBFC08D44u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D4C(CPUState* cpu) { - cpu->pc = 0xBFC08D4Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D54(CPUState* cpu) { - cpu->pc = 0xBFC08D54u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D78(CPUState* cpu) { - cpu->pc = 0xBFC08D78u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D7C(CPUState* cpu) { - cpu->pc = 0xBFC08D7Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D8C(CPUState* cpu) { - cpu->pc = 0xBFC08D8Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08D98(CPUState* cpu) { - cpu->pc = 0xBFC08D98u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DA4(CPUState* cpu) { - cpu->pc = 0xBFC08DA4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DB8(CPUState* cpu) { - cpu->pc = 0xBFC08DB8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DC4(CPUState* cpu) { - cpu->pc = 0xBFC08DC4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DC8(CPUState* cpu) { - cpu->pc = 0xBFC08DC8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DD4(CPUState* cpu) { - cpu->pc = 0xBFC08DD4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08DEC(CPUState* cpu) { - cpu->pc = 0xBFC08DECu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E04(CPUState* cpu) { - cpu->pc = 0xBFC08E04u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E18(CPUState* cpu) { - cpu->pc = 0xBFC08E18u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E2C(CPUState* cpu) { - cpu->pc = 0xBFC08E2Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E34(CPUState* cpu) { - cpu->pc = 0xBFC08E34u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E38(CPUState* cpu) { - cpu->pc = 0xBFC08E38u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E54(CPUState* cpu) { - cpu->pc = 0xBFC08E54u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E58(CPUState* cpu) { - cpu->pc = 0xBFC08E58u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E68(CPUState* cpu) { - cpu->pc = 0xBFC08E68u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E70(CPUState* cpu) { - cpu->pc = 0xBFC08E70u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08E74(CPUState* cpu) { - cpu->pc = 0xBFC08E74u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EA0(CPUState* cpu) { - cpu->pc = 0xBFC08EA0u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EA8(CPUState* cpu) { - cpu->pc = 0xBFC08EA8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EB8(CPUState* cpu) { - cpu->pc = 0xBFC08EB8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EC4(CPUState* cpu) { - cpu->pc = 0xBFC08EC4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08ED4(CPUState* cpu) { - cpu->pc = 0xBFC08ED4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EEC(CPUState* cpu) { - cpu->pc = 0xBFC08EECu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08EF8(CPUState* cpu) { - cpu->pc = 0xBFC08EF8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F1C(CPUState* cpu) { - cpu->pc = 0xBFC08F1Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F28(CPUState* cpu) { - cpu->pc = 0xBFC08F28u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F30(CPUState* cpu) { - cpu->pc = 0xBFC08F30u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F38(CPUState* cpu) { - cpu->pc = 0xBFC08F38u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F40(CPUState* cpu) { - cpu->pc = 0xBFC08F40u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F48(CPUState* cpu) { - cpu->pc = 0xBFC08F48u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F50(CPUState* cpu) { - cpu->pc = 0xBFC08F50u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F58(CPUState* cpu) { - cpu->pc = 0xBFC08F58u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F60(CPUState* cpu) { - cpu->pc = 0xBFC08F60u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F64(CPUState* cpu) { - cpu->pc = 0xBFC08F64u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F74(CPUState* cpu) { - cpu->pc = 0xBFC08F74u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F84(CPUState* cpu) { - cpu->pc = 0xBFC08F84u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F8C(CPUState* cpu) { - cpu->pc = 0xBFC08F8Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F90(CPUState* cpu) { - cpu->pc = 0xBFC08F90u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08F9C(CPUState* cpu) { - cpu->pc = 0xBFC08F9Cu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08FA8(CPUState* cpu) { - cpu->pc = 0xBFC08FA8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08FB4(CPUState* cpu) { - cpu->pc = 0xBFC08FB4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08FD4(CPUState* cpu) { - cpu->pc = 0xBFC08FD4u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08FD8(CPUState* cpu) { - cpu->pc = 0xBFC08FD8u; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08B3C_cont_BFC08FDC(CPUState* cpu) { - cpu->pc = 0xBFC08FDCu; - SCPH1001_func_1FC08B3C(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC0902C(CPUState* cpu) { - cpu->pc = 0xBFC0902Cu; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09034(CPUState* cpu) { - cpu->pc = 0xBFC09034u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09038(CPUState* cpu) { - cpu->pc = 0xBFC09038u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09040(CPUState* cpu) { - cpu->pc = 0xBFC09040u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09048(CPUState* cpu) { - cpu->pc = 0xBFC09048u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09050(CPUState* cpu) { - cpu->pc = 0xBFC09050u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09068(CPUState* cpu) { - cpu->pc = 0xBFC09068u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC0906C(CPUState* cpu) { - cpu->pc = 0xBFC0906Cu; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09080(CPUState* cpu) { - cpu->pc = 0xBFC09080u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09088(CPUState* cpu) { - cpu->pc = 0xBFC09088u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09094(CPUState* cpu) { - cpu->pc = 0xBFC09094u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09098(CPUState* cpu) { - cpu->pc = 0xBFC09098u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090B0(CPUState* cpu) { - cpu->pc = 0xBFC090B0u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090B8(CPUState* cpu) { - cpu->pc = 0xBFC090B8u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090C8(CPUState* cpu) { - cpu->pc = 0xBFC090C8u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090D0(CPUState* cpu) { - cpu->pc = 0xBFC090D0u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090D8(CPUState* cpu) { - cpu->pc = 0xBFC090D8u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC090FC(CPUState* cpu) { - cpu->pc = 0xBFC090FCu; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09104(CPUState* cpu) { - cpu->pc = 0xBFC09104u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09108(CPUState* cpu) { - cpu->pc = 0xBFC09108u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09128(CPUState* cpu) { - cpu->pc = 0xBFC09128u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC09130(CPUState* cpu) { - cpu->pc = 0xBFC09130u; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC08FFC_cont_BFC0913C(CPUState* cpu) { - cpu->pc = 0xBFC0913Cu; - SCPH1001_func_1FC08FFC(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC09158(CPUState* cpu) { - cpu->pc = 0xBFC09158u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC0916C(CPUState* cpu) { - cpu->pc = 0xBFC0916Cu; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC09174(CPUState* cpu) { - cpu->pc = 0xBFC09174u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC0917C(CPUState* cpu) { - cpu->pc = 0xBFC0917Cu; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC09188(CPUState* cpu) { - cpu->pc = 0xBFC09188u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC09198(CPUState* cpu) { - cpu->pc = 0xBFC09198u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC091A0(CPUState* cpu) { - cpu->pc = 0xBFC091A0u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC091A8(CPUState* cpu) { - cpu->pc = 0xBFC091A8u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC091AC(CPUState* cpu) { - cpu->pc = 0xBFC091ACu; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC091B4(CPUState* cpu) { - cpu->pc = 0xBFC091B4u; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC09144_cont_BFC091BC(CPUState* cpu) { - cpu->pc = 0xBFC091BCu; - SCPH1001_func_1FC09144(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09208(CPUState* cpu) { - cpu->pc = 0xBFC09208u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09224(CPUState* cpu) { - cpu->pc = 0xBFC09224u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09228(CPUState* cpu) { - cpu->pc = 0xBFC09228u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC0922C(CPUState* cpu) { - cpu->pc = 0xBFC0922Cu; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09238(CPUState* cpu) { - cpu->pc = 0xBFC09238u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09240(CPUState* cpu) { - cpu->pc = 0xBFC09240u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09244(CPUState* cpu) { - cpu->pc = 0xBFC09244u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09250(CPUState* cpu) { - cpu->pc = 0xBFC09250u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09258(CPUState* cpu) { - cpu->pc = 0xBFC09258u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC0926C(CPUState* cpu) { - cpu->pc = 0xBFC0926Cu; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC09274(CPUState* cpu) { - cpu->pc = 0xBFC09274u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC0927C(CPUState* cpu) { - cpu->pc = 0xBFC0927Cu; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC092A0(CPUState* cpu) { - cpu->pc = 0xBFC092A0u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC092B4(CPUState* cpu) { - cpu->pc = 0xBFC092B4u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC092C4(CPUState* cpu) { - cpu->pc = 0xBFC092C4u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC091CC_cont_BFC092C8(CPUState* cpu) { - cpu->pc = 0xBFC092C8u; - SCPH1001_func_1FC091CC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0932C(CPUState* cpu) { - cpu->pc = 0xBFC0932Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09334(CPUState* cpu) { - cpu->pc = 0xBFC09334u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09348(CPUState* cpu) { - cpu->pc = 0xBFC09348u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0934C(CPUState* cpu) { - cpu->pc = 0xBFC0934Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09350(CPUState* cpu) { - cpu->pc = 0xBFC09350u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0935C(CPUState* cpu) { - cpu->pc = 0xBFC0935Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09364(CPUState* cpu) { - cpu->pc = 0xBFC09364u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09368(CPUState* cpu) { - cpu->pc = 0xBFC09368u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09374(CPUState* cpu) { - cpu->pc = 0xBFC09374u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09380(CPUState* cpu) { - cpu->pc = 0xBFC09380u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09390(CPUState* cpu) { - cpu->pc = 0xBFC09390u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09398(CPUState* cpu) { - cpu->pc = 0xBFC09398u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093A4(CPUState* cpu) { - cpu->pc = 0xBFC093A4u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093B4(CPUState* cpu) { - cpu->pc = 0xBFC093B4u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093BC(CPUState* cpu) { - cpu->pc = 0xBFC093BCu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093C0(CPUState* cpu) { - cpu->pc = 0xBFC093C0u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093CC(CPUState* cpu) { - cpu->pc = 0xBFC093CCu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093D4(CPUState* cpu) { - cpu->pc = 0xBFC093D4u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC093F8(CPUState* cpu) { - cpu->pc = 0xBFC093F8u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09400(CPUState* cpu) { - cpu->pc = 0xBFC09400u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09420(CPUState* cpu) { - cpu->pc = 0xBFC09420u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09424(CPUState* cpu) { - cpu->pc = 0xBFC09424u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09434(CPUState* cpu) { - cpu->pc = 0xBFC09434u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09440(CPUState* cpu) { - cpu->pc = 0xBFC09440u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09448(CPUState* cpu) { - cpu->pc = 0xBFC09448u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09454(CPUState* cpu) { - cpu->pc = 0xBFC09454u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0945C(CPUState* cpu) { - cpu->pc = 0xBFC0945Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09464(CPUState* cpu) { - cpu->pc = 0xBFC09464u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09470(CPUState* cpu) { - cpu->pc = 0xBFC09470u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0947C(CPUState* cpu) { - cpu->pc = 0xBFC0947Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09480(CPUState* cpu) { - cpu->pc = 0xBFC09480u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09490(CPUState* cpu) { - cpu->pc = 0xBFC09490u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09498(CPUState* cpu) { - cpu->pc = 0xBFC09498u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC0949C(CPUState* cpu) { - cpu->pc = 0xBFC0949Cu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094A8(CPUState* cpu) { - cpu->pc = 0xBFC094A8u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094B0(CPUState* cpu) { - cpu->pc = 0xBFC094B0u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094D4(CPUState* cpu) { - cpu->pc = 0xBFC094D4u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094DC(CPUState* cpu) { - cpu->pc = 0xBFC094DCu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094E4(CPUState* cpu) { - cpu->pc = 0xBFC094E4u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094EC(CPUState* cpu) { - cpu->pc = 0xBFC094ECu; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC094F0(CPUState* cpu) { - cpu->pc = 0xBFC094F0u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09510(CPUState* cpu) { - cpu->pc = 0xBFC09510u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC092EC_cont_BFC09518(CPUState* cpu) { - cpu->pc = 0xBFC09518u; - SCPH1001_func_1FC092EC(cpu); -} - -void SCPH1001_func_1FC09540_cont_BFC09568(CPUState* cpu) { - cpu->pc = 0xBFC09568u; - SCPH1001_func_1FC09540(cpu); -} - -void SCPH1001_func_1FC09540_cont_BFC09578(CPUState* cpu) { - cpu->pc = 0xBFC09578u; - SCPH1001_func_1FC09540(cpu); -} - -void SCPH1001_func_1FC09540_cont_BFC09580(CPUState* cpu) { - cpu->pc = 0xBFC09580u; - SCPH1001_func_1FC09540(cpu); -} - -void SCPH1001_func_1FC09540_cont_BFC0958C(CPUState* cpu) { - cpu->pc = 0xBFC0958Cu; - SCPH1001_func_1FC09540(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC095F4(CPUState* cpu) { - cpu->pc = 0xBFC095F4u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC095F8(CPUState* cpu) { - cpu->pc = 0xBFC095F8u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09618(CPUState* cpu) { - cpu->pc = 0xBFC09618u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09630(CPUState* cpu) { - cpu->pc = 0xBFC09630u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC0963C(CPUState* cpu) { - cpu->pc = 0xBFC0963Cu; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09644(CPUState* cpu) { - cpu->pc = 0xBFC09644u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC0964C(CPUState* cpu) { - cpu->pc = 0xBFC0964Cu; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09650(CPUState* cpu) { - cpu->pc = 0xBFC09650u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09668(CPUState* cpu) { - cpu->pc = 0xBFC09668u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09670(CPUState* cpu) { - cpu->pc = 0xBFC09670u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09678(CPUState* cpu) { - cpu->pc = 0xBFC09678u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09680(CPUState* cpu) { - cpu->pc = 0xBFC09680u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC09688(CPUState* cpu) { - cpu->pc = 0xBFC09688u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC0968C(CPUState* cpu) { - cpu->pc = 0xBFC0968Cu; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096B0(CPUState* cpu) { - cpu->pc = 0xBFC096B0u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096C0(CPUState* cpu) { - cpu->pc = 0xBFC096C0u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096C8(CPUState* cpu) { - cpu->pc = 0xBFC096C8u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096D8(CPUState* cpu) { - cpu->pc = 0xBFC096D8u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096E0(CPUState* cpu) { - cpu->pc = 0xBFC096E0u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096E8(CPUState* cpu) { - cpu->pc = 0xBFC096E8u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09598_cont_BFC096F0(CPUState* cpu) { - cpu->pc = 0xBFC096F0u; - SCPH1001_func_1FC09598(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09774(CPUState* cpu) { - cpu->pc = 0xBFC09774u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC0977C(CPUState* cpu) { - cpu->pc = 0xBFC0977Cu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09790(CPUState* cpu) { - cpu->pc = 0xBFC09790u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09798(CPUState* cpu) { - cpu->pc = 0xBFC09798u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097A0(CPUState* cpu) { - cpu->pc = 0xBFC097A0u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097A8(CPUState* cpu) { - cpu->pc = 0xBFC097A8u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097AC(CPUState* cpu) { - cpu->pc = 0xBFC097ACu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097DC(CPUState* cpu) { - cpu->pc = 0xBFC097DCu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097E4(CPUState* cpu) { - cpu->pc = 0xBFC097E4u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC097F8(CPUState* cpu) { - cpu->pc = 0xBFC097F8u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09804(CPUState* cpu) { - cpu->pc = 0xBFC09804u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC0980C(CPUState* cpu) { - cpu->pc = 0xBFC0980Cu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09814(CPUState* cpu) { - cpu->pc = 0xBFC09814u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09820(CPUState* cpu) { - cpu->pc = 0xBFC09820u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09824(CPUState* cpu) { - cpu->pc = 0xBFC09824u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC0982C(CPUState* cpu) { - cpu->pc = 0xBFC0982Cu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09834(CPUState* cpu) { - cpu->pc = 0xBFC09834u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09840(CPUState* cpu) { - cpu->pc = 0xBFC09840u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09848(CPUState* cpu) { - cpu->pc = 0xBFC09848u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09850(CPUState* cpu) { - cpu->pc = 0xBFC09850u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC0985C(CPUState* cpu) { - cpu->pc = 0xBFC0985Cu; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC09720_cont_BFC09860(CPUState* cpu) { - cpu->pc = 0xBFC09860u; - SCPH1001_func_1FC09720(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC098C0(CPUState* cpu) { - cpu->pc = 0xBFC098C0u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC098C8(CPUState* cpu) { - cpu->pc = 0xBFC098C8u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC098E0(CPUState* cpu) { - cpu->pc = 0xBFC098E0u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC098F8(CPUState* cpu) { - cpu->pc = 0xBFC098F8u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC09900(CPUState* cpu) { - cpu->pc = 0xBFC09900u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC098A8_cont_BFC09904(CPUState* cpu) { - cpu->pc = 0xBFC09904u; - SCPH1001_func_1FC098A8(cpu); -} - -void SCPH1001_func_1FC09914_cont_BFC0992C(CPUState* cpu) { - cpu->pc = 0xBFC0992Cu; - SCPH1001_func_1FC09914(cpu); -} - -void SCPH1001_func_1FC09914_cont_BFC09934(CPUState* cpu) { - cpu->pc = 0xBFC09934u; - SCPH1001_func_1FC09914(cpu); -} - -void SCPH1001_func_1FC09914_cont_BFC0993C(CPUState* cpu) { - cpu->pc = 0xBFC0993Cu; - SCPH1001_func_1FC09914(cpu); -} - -void SCPH1001_func_1FC0994C_cont_BFC0995C(CPUState* cpu) { - cpu->pc = 0xBFC0995Cu; - SCPH1001_func_1FC0994C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099A8(CPUState* cpu) { - cpu->pc = 0xBFC099A8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099AC(CPUState* cpu) { - cpu->pc = 0xBFC099ACu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099C8(CPUState* cpu) { - cpu->pc = 0xBFC099C8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099D0(CPUState* cpu) { - cpu->pc = 0xBFC099D0u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099D8(CPUState* cpu) { - cpu->pc = 0xBFC099D8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099E8(CPUState* cpu) { - cpu->pc = 0xBFC099E8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099F4(CPUState* cpu) { - cpu->pc = 0xBFC099F4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC099FC(CPUState* cpu) { - cpu->pc = 0xBFC099FCu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A04(CPUState* cpu) { - cpu->pc = 0xBFC09A04u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A08(CPUState* cpu) { - cpu->pc = 0xBFC09A08u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A14(CPUState* cpu) { - cpu->pc = 0xBFC09A14u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A1C(CPUState* cpu) { - cpu->pc = 0xBFC09A1Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A2C(CPUState* cpu) { - cpu->pc = 0xBFC09A2Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A38(CPUState* cpu) { - cpu->pc = 0xBFC09A38u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A48(CPUState* cpu) { - cpu->pc = 0xBFC09A48u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A80(CPUState* cpu) { - cpu->pc = 0xBFC09A80u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A94(CPUState* cpu) { - cpu->pc = 0xBFC09A94u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09A98(CPUState* cpu) { - cpu->pc = 0xBFC09A98u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09AA4(CPUState* cpu) { - cpu->pc = 0xBFC09AA4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09AC0(CPUState* cpu) { - cpu->pc = 0xBFC09AC0u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09AD4(CPUState* cpu) { - cpu->pc = 0xBFC09AD4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09AD8(CPUState* cpu) { - cpu->pc = 0xBFC09AD8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09AF0(CPUState* cpu) { - cpu->pc = 0xBFC09AF0u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B04(CPUState* cpu) { - cpu->pc = 0xBFC09B04u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B14(CPUState* cpu) { - cpu->pc = 0xBFC09B14u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B4C(CPUState* cpu) { - cpu->pc = 0xBFC09B4Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B70(CPUState* cpu) { - cpu->pc = 0xBFC09B70u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B90(CPUState* cpu) { - cpu->pc = 0xBFC09B90u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09B98(CPUState* cpu) { - cpu->pc = 0xBFC09B98u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09BA8(CPUState* cpu) { - cpu->pc = 0xBFC09BA8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09BB8(CPUState* cpu) { - cpu->pc = 0xBFC09BB8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09BC0(CPUState* cpu) { - cpu->pc = 0xBFC09BC0u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09BD4(CPUState* cpu) { - cpu->pc = 0xBFC09BD4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09BE4(CPUState* cpu) { - cpu->pc = 0xBFC09BE4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C00(CPUState* cpu) { - cpu->pc = 0xBFC09C00u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C18(CPUState* cpu) { - cpu->pc = 0xBFC09C18u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C1C(CPUState* cpu) { - cpu->pc = 0xBFC09C1Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C28(CPUState* cpu) { - cpu->pc = 0xBFC09C28u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C30(CPUState* cpu) { - cpu->pc = 0xBFC09C30u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C40(CPUState* cpu) { - cpu->pc = 0xBFC09C40u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C58(CPUState* cpu) { - cpu->pc = 0xBFC09C58u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C60(CPUState* cpu) { - cpu->pc = 0xBFC09C60u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C70(CPUState* cpu) { - cpu->pc = 0xBFC09C70u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C7C(CPUState* cpu) { - cpu->pc = 0xBFC09C7Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09C8C(CPUState* cpu) { - cpu->pc = 0xBFC09C8Cu; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09CA8(CPUState* cpu) { - cpu->pc = 0xBFC09CA8u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC0996C_cont_BFC09CC4(CPUState* cpu) { - cpu->pc = 0xBFC09CC4u; - SCPH1001_func_1FC0996C(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09CF8(CPUState* cpu) { - cpu->pc = 0xBFC09CF8u; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09CFC(CPUState* cpu) { - cpu->pc = 0xBFC09CFCu; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09D18(CPUState* cpu) { - cpu->pc = 0xBFC09D18u; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09D20(CPUState* cpu) { - cpu->pc = 0xBFC09D20u; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09D28(CPUState* cpu) { - cpu->pc = 0xBFC09D28u; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09CDC_cont_BFC09D2C(CPUState* cpu) { - cpu->pc = 0xBFC09D2Cu; - SCPH1001_func_1FC09CDC(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09D84(CPUState* cpu) { - cpu->pc = 0xBFC09D84u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09D88(CPUState* cpu) { - cpu->pc = 0xBFC09D88u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DA4(CPUState* cpu) { - cpu->pc = 0xBFC09DA4u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DAC(CPUState* cpu) { - cpu->pc = 0xBFC09DACu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DB4(CPUState* cpu) { - cpu->pc = 0xBFC09DB4u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DC8(CPUState* cpu) { - cpu->pc = 0xBFC09DC8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DD8(CPUState* cpu) { - cpu->pc = 0xBFC09DD8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DEC(CPUState* cpu) { - cpu->pc = 0xBFC09DECu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09DFC(CPUState* cpu) { - cpu->pc = 0xBFC09DFCu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09E20(CPUState* cpu) { - cpu->pc = 0xBFC09E20u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09E24(CPUState* cpu) { - cpu->pc = 0xBFC09E24u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09E34(CPUState* cpu) { - cpu->pc = 0xBFC09E34u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09E4C(CPUState* cpu) { - cpu->pc = 0xBFC09E4Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09E5C(CPUState* cpu) { - cpu->pc = 0xBFC09E5Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09EB4(CPUState* cpu) { - cpu->pc = 0xBFC09EB4u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09EBC(CPUState* cpu) { - cpu->pc = 0xBFC09EBCu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09ED8(CPUState* cpu) { - cpu->pc = 0xBFC09ED8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09EEC(CPUState* cpu) { - cpu->pc = 0xBFC09EECu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F00(CPUState* cpu) { - cpu->pc = 0xBFC09F00u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F10(CPUState* cpu) { - cpu->pc = 0xBFC09F10u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F1C(CPUState* cpu) { - cpu->pc = 0xBFC09F1Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F20(CPUState* cpu) { - cpu->pc = 0xBFC09F20u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F30(CPUState* cpu) { - cpu->pc = 0xBFC09F30u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F3C(CPUState* cpu) { - cpu->pc = 0xBFC09F3Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F50(CPUState* cpu) { - cpu->pc = 0xBFC09F50u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F68(CPUState* cpu) { - cpu->pc = 0xBFC09F68u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F70(CPUState* cpu) { - cpu->pc = 0xBFC09F70u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F78(CPUState* cpu) { - cpu->pc = 0xBFC09F78u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F80(CPUState* cpu) { - cpu->pc = 0xBFC09F80u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F88(CPUState* cpu) { - cpu->pc = 0xBFC09F88u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F8C(CPUState* cpu) { - cpu->pc = 0xBFC09F8Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09F9C(CPUState* cpu) { - cpu->pc = 0xBFC09F9Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FA4(CPUState* cpu) { - cpu->pc = 0xBFC09FA4u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FA8(CPUState* cpu) { - cpu->pc = 0xBFC09FA8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FB8(CPUState* cpu) { - cpu->pc = 0xBFC09FB8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FCC(CPUState* cpu) { - cpu->pc = 0xBFC09FCCu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FD8(CPUState* cpu) { - cpu->pc = 0xBFC09FD8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FE8(CPUState* cpu) { - cpu->pc = 0xBFC09FE8u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FEC(CPUState* cpu) { - cpu->pc = 0xBFC09FECu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC09FFC(CPUState* cpu) { - cpu->pc = 0xBFC09FFCu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC0A00C(CPUState* cpu) { - cpu->pc = 0xBFC0A00Cu; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC0A034(CPUState* cpu) { - cpu->pc = 0xBFC0A034u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC0A044(CPUState* cpu) { - cpu->pc = 0xBFC0A044u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC0A048(CPUState* cpu) { - cpu->pc = 0xBFC0A048u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC09D3C_cont_BFC0A060(CPUState* cpu) { - cpu->pc = 0xBFC0A060u; - SCPH1001_func_1FC09D3C(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A0C8(CPUState* cpu) { - cpu->pc = 0xBFC0A0C8u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A0CC(CPUState* cpu) { - cpu->pc = 0xBFC0A0CCu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A0E8(CPUState* cpu) { - cpu->pc = 0xBFC0A0E8u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A0F0(CPUState* cpu) { - cpu->pc = 0xBFC0A0F0u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A0F8(CPUState* cpu) { - cpu->pc = 0xBFC0A0F8u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A10C(CPUState* cpu) { - cpu->pc = 0xBFC0A10Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A11C(CPUState* cpu) { - cpu->pc = 0xBFC0A11Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A130(CPUState* cpu) { - cpu->pc = 0xBFC0A130u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A140(CPUState* cpu) { - cpu->pc = 0xBFC0A140u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A164(CPUState* cpu) { - cpu->pc = 0xBFC0A164u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A168(CPUState* cpu) { - cpu->pc = 0xBFC0A168u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A178(CPUState* cpu) { - cpu->pc = 0xBFC0A178u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A190(CPUState* cpu) { - cpu->pc = 0xBFC0A190u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A1A0(CPUState* cpu) { - cpu->pc = 0xBFC0A1A0u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A1F8(CPUState* cpu) { - cpu->pc = 0xBFC0A1F8u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A200(CPUState* cpu) { - cpu->pc = 0xBFC0A200u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A21C(CPUState* cpu) { - cpu->pc = 0xBFC0A21Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A230(CPUState* cpu) { - cpu->pc = 0xBFC0A230u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A244(CPUState* cpu) { - cpu->pc = 0xBFC0A244u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A254(CPUState* cpu) { - cpu->pc = 0xBFC0A254u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A260(CPUState* cpu) { - cpu->pc = 0xBFC0A260u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A264(CPUState* cpu) { - cpu->pc = 0xBFC0A264u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A284(CPUState* cpu) { - cpu->pc = 0xBFC0A284u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A290(CPUState* cpu) { - cpu->pc = 0xBFC0A290u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2A4(CPUState* cpu) { - cpu->pc = 0xBFC0A2A4u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2BC(CPUState* cpu) { - cpu->pc = 0xBFC0A2BCu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2C4(CPUState* cpu) { - cpu->pc = 0xBFC0A2C4u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2CC(CPUState* cpu) { - cpu->pc = 0xBFC0A2CCu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2D4(CPUState* cpu) { - cpu->pc = 0xBFC0A2D4u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2DC(CPUState* cpu) { - cpu->pc = 0xBFC0A2DCu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2E0(CPUState* cpu) { - cpu->pc = 0xBFC0A2E0u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2F0(CPUState* cpu) { - cpu->pc = 0xBFC0A2F0u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2F8(CPUState* cpu) { - cpu->pc = 0xBFC0A2F8u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A2FC(CPUState* cpu) { - cpu->pc = 0xBFC0A2FCu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A30C(CPUState* cpu) { - cpu->pc = 0xBFC0A30Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A320(CPUState* cpu) { - cpu->pc = 0xBFC0A320u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A32C(CPUState* cpu) { - cpu->pc = 0xBFC0A32Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A33C(CPUState* cpu) { - cpu->pc = 0xBFC0A33Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A340(CPUState* cpu) { - cpu->pc = 0xBFC0A340u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A350(CPUState* cpu) { - cpu->pc = 0xBFC0A350u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A360(CPUState* cpu) { - cpu->pc = 0xBFC0A360u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A388(CPUState* cpu) { - cpu->pc = 0xBFC0A388u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A398(CPUState* cpu) { - cpu->pc = 0xBFC0A398u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A39C(CPUState* cpu) { - cpu->pc = 0xBFC0A39Cu; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A080_cont_BFC0A3B4(CPUState* cpu) { - cpu->pc = 0xBFC0A3B4u; - SCPH1001_func_1FC0A080(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A3E0(CPUState* cpu) { - cpu->pc = 0xBFC0A3E0u; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A400(CPUState* cpu) { - cpu->pc = 0xBFC0A400u; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A414(CPUState* cpu) { - cpu->pc = 0xBFC0A414u; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A420(CPUState* cpu) { - cpu->pc = 0xBFC0A420u; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A428(CPUState* cpu) { - cpu->pc = 0xBFC0A428u; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A3D4_cont_BFC0A42C(CPUState* cpu) { - cpu->pc = 0xBFC0A42Cu; - SCPH1001_func_1FC0A3D4(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A44C(CPUState* cpu) { - cpu->pc = 0xBFC0A44Cu; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A454(CPUState* cpu) { - cpu->pc = 0xBFC0A454u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A458(CPUState* cpu) { - cpu->pc = 0xBFC0A458u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A468(CPUState* cpu) { - cpu->pc = 0xBFC0A468u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A470(CPUState* cpu) { - cpu->pc = 0xBFC0A470u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A478(CPUState* cpu) { - cpu->pc = 0xBFC0A478u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A488(CPUState* cpu) { - cpu->pc = 0xBFC0A488u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A498(CPUState* cpu) { - cpu->pc = 0xBFC0A498u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A4A0(CPUState* cpu) { - cpu->pc = 0xBFC0A4A0u; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A43C_cont_BFC0A4AC(CPUState* cpu) { - cpu->pc = 0xBFC0A4ACu; - SCPH1001_func_1FC0A43C(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A4D8(CPUState* cpu) { - cpu->pc = 0xBFC0A4D8u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A4DC(CPUState* cpu) { - cpu->pc = 0xBFC0A4DCu; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A4F8(CPUState* cpu) { - cpu->pc = 0xBFC0A4F8u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A508(CPUState* cpu) { - cpu->pc = 0xBFC0A508u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A51C(CPUState* cpu) { - cpu->pc = 0xBFC0A51Cu; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A548(CPUState* cpu) { - cpu->pc = 0xBFC0A548u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A560(CPUState* cpu) { - cpu->pc = 0xBFC0A560u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A570(CPUState* cpu) { - cpu->pc = 0xBFC0A570u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A5C4(CPUState* cpu) { - cpu->pc = 0xBFC0A5C4u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A4B4_cont_BFC0A5D4(CPUState* cpu) { - cpu->pc = 0xBFC0A5D4u; - SCPH1001_func_1FC0A4B4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A60C(CPUState* cpu) { - cpu->pc = 0xBFC0A60Cu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A610(CPUState* cpu) { - cpu->pc = 0xBFC0A610u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A62C(CPUState* cpu) { - cpu->pc = 0xBFC0A62Cu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A634(CPUState* cpu) { - cpu->pc = 0xBFC0A634u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A640(CPUState* cpu) { - cpu->pc = 0xBFC0A640u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A64C(CPUState* cpu) { - cpu->pc = 0xBFC0A64Cu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A654(CPUState* cpu) { - cpu->pc = 0xBFC0A654u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A65C(CPUState* cpu) { - cpu->pc = 0xBFC0A65Cu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A660(CPUState* cpu) { - cpu->pc = 0xBFC0A660u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A678(CPUState* cpu) { - cpu->pc = 0xBFC0A678u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A688(CPUState* cpu) { - cpu->pc = 0xBFC0A688u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A694(CPUState* cpu) { - cpu->pc = 0xBFC0A694u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6A4(CPUState* cpu) { - cpu->pc = 0xBFC0A6A4u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6AC(CPUState* cpu) { - cpu->pc = 0xBFC0A6ACu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6B0(CPUState* cpu) { - cpu->pc = 0xBFC0A6B0u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6C4(CPUState* cpu) { - cpu->pc = 0xBFC0A6C4u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6CC(CPUState* cpu) { - cpu->pc = 0xBFC0A6CCu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6D4(CPUState* cpu) { - cpu->pc = 0xBFC0A6D4u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6DC(CPUState* cpu) { - cpu->pc = 0xBFC0A6DCu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A6F0(CPUState* cpu) { - cpu->pc = 0xBFC0A6F0u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A700(CPUState* cpu) { - cpu->pc = 0xBFC0A700u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A714(CPUState* cpu) { - cpu->pc = 0xBFC0A714u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A718(CPUState* cpu) { - cpu->pc = 0xBFC0A718u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A728(CPUState* cpu) { - cpu->pc = 0xBFC0A728u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A72C(CPUState* cpu) { - cpu->pc = 0xBFC0A72Cu; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A5E4_cont_BFC0A744(CPUState* cpu) { - cpu->pc = 0xBFC0A744u; - SCPH1001_func_1FC0A5E4(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A774(CPUState* cpu) { - cpu->pc = 0xBFC0A774u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7A0(CPUState* cpu) { - cpu->pc = 0xBFC0A7A0u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7A4(CPUState* cpu) { - cpu->pc = 0xBFC0A7A4u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7BC(CPUState* cpu) { - cpu->pc = 0xBFC0A7BCu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7C4(CPUState* cpu) { - cpu->pc = 0xBFC0A7C4u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7CC(CPUState* cpu) { - cpu->pc = 0xBFC0A7CCu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7DC(CPUState* cpu) { - cpu->pc = 0xBFC0A7DCu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7E8(CPUState* cpu) { - cpu->pc = 0xBFC0A7E8u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7F0(CPUState* cpu) { - cpu->pc = 0xBFC0A7F0u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A7FC(CPUState* cpu) { - cpu->pc = 0xBFC0A7FCu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A804(CPUState* cpu) { - cpu->pc = 0xBFC0A804u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A824(CPUState* cpu) { - cpu->pc = 0xBFC0A824u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A834(CPUState* cpu) { - cpu->pc = 0xBFC0A834u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A840(CPUState* cpu) { - cpu->pc = 0xBFC0A840u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A848(CPUState* cpu) { - cpu->pc = 0xBFC0A848u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A854(CPUState* cpu) { - cpu->pc = 0xBFC0A854u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A85C(CPUState* cpu) { - cpu->pc = 0xBFC0A85Cu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A87C(CPUState* cpu) { - cpu->pc = 0xBFC0A87Cu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A88C(CPUState* cpu) { - cpu->pc = 0xBFC0A88Cu; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A8A4(CPUState* cpu) { - cpu->pc = 0xBFC0A8A4u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A754_cont_BFC0A8A8(CPUState* cpu) { - cpu->pc = 0xBFC0A8A8u; - SCPH1001_func_1FC0A754(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A8E0(CPUState* cpu) { - cpu->pc = 0xBFC0A8E0u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A8E4(CPUState* cpu) { - cpu->pc = 0xBFC0A8E4u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A900(CPUState* cpu) { - cpu->pc = 0xBFC0A900u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A908(CPUState* cpu) { - cpu->pc = 0xBFC0A908u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A918(CPUState* cpu) { - cpu->pc = 0xBFC0A918u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A924(CPUState* cpu) { - cpu->pc = 0xBFC0A924u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A92C(CPUState* cpu) { - cpu->pc = 0xBFC0A92Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A934(CPUState* cpu) { - cpu->pc = 0xBFC0A934u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A93C(CPUState* cpu) { - cpu->pc = 0xBFC0A93Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A94C(CPUState* cpu) { - cpu->pc = 0xBFC0A94Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A958(CPUState* cpu) { - cpu->pc = 0xBFC0A958u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A96C(CPUState* cpu) { - cpu->pc = 0xBFC0A96Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A984(CPUState* cpu) { - cpu->pc = 0xBFC0A984u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A99C(CPUState* cpu) { - cpu->pc = 0xBFC0A99Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A9EC(CPUState* cpu) { - cpu->pc = 0xBFC0A9ECu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0A9F0(CPUState* cpu) { - cpu->pc = 0xBFC0A9F0u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA00(CPUState* cpu) { - cpu->pc = 0xBFC0AA00u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA0C(CPUState* cpu) { - cpu->pc = 0xBFC0AA0Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA10(CPUState* cpu) { - cpu->pc = 0xBFC0AA10u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA24(CPUState* cpu) { - cpu->pc = 0xBFC0AA24u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA2C(CPUState* cpu) { - cpu->pc = 0xBFC0AA2Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA3C(CPUState* cpu) { - cpu->pc = 0xBFC0AA3Cu; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA44(CPUState* cpu) { - cpu->pc = 0xBFC0AA44u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA48(CPUState* cpu) { - cpu->pc = 0xBFC0AA48u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA50(CPUState* cpu) { - cpu->pc = 0xBFC0AA50u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA68(CPUState* cpu) { - cpu->pc = 0xBFC0AA68u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA80(CPUState* cpu) { - cpu->pc = 0xBFC0AA80u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA90(CPUState* cpu) { - cpu->pc = 0xBFC0AA90u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AA98(CPUState* cpu) { - cpu->pc = 0xBFC0AA98u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AAB0(CPUState* cpu) { - cpu->pc = 0xBFC0AAB0u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AAC0(CPUState* cpu) { - cpu->pc = 0xBFC0AAC0u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AAD8(CPUState* cpu) { - cpu->pc = 0xBFC0AAD8u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AAE4(CPUState* cpu) { - cpu->pc = 0xBFC0AAE4u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AAF0(CPUState* cpu) { - cpu->pc = 0xBFC0AAF0u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB00(CPUState* cpu) { - cpu->pc = 0xBFC0AB00u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB10(CPUState* cpu) { - cpu->pc = 0xBFC0AB10u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB24(CPUState* cpu) { - cpu->pc = 0xBFC0AB24u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB30(CPUState* cpu) { - cpu->pc = 0xBFC0AB30u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB44(CPUState* cpu) { - cpu->pc = 0xBFC0AB44u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0A8BC_cont_BFC0AB50(CPUState* cpu) { - cpu->pc = 0xBFC0AB50u; - SCPH1001_func_1FC0A8BC(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AB94(CPUState* cpu) { - cpu->pc = 0xBFC0AB94u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AB98(CPUState* cpu) { - cpu->pc = 0xBFC0AB98u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABB4(CPUState* cpu) { - cpu->pc = 0xBFC0ABB4u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABBC(CPUState* cpu) { - cpu->pc = 0xBFC0ABBCu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABC8(CPUState* cpu) { - cpu->pc = 0xBFC0ABC8u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABD4(CPUState* cpu) { - cpu->pc = 0xBFC0ABD4u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABDC(CPUState* cpu) { - cpu->pc = 0xBFC0ABDCu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABE4(CPUState* cpu) { - cpu->pc = 0xBFC0ABE4u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABEC(CPUState* cpu) { - cpu->pc = 0xBFC0ABECu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ABFC(CPUState* cpu) { - cpu->pc = 0xBFC0ABFCu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC08(CPUState* cpu) { - cpu->pc = 0xBFC0AC08u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC18(CPUState* cpu) { - cpu->pc = 0xBFC0AC18u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC1C(CPUState* cpu) { - cpu->pc = 0xBFC0AC1Cu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC28(CPUState* cpu) { - cpu->pc = 0xBFC0AC28u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC34(CPUState* cpu) { - cpu->pc = 0xBFC0AC34u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC44(CPUState* cpu) { - cpu->pc = 0xBFC0AC44u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC5C(CPUState* cpu) { - cpu->pc = 0xBFC0AC5Cu; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0AC74(CPUState* cpu) { - cpu->pc = 0xBFC0AC74u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACA8(CPUState* cpu) { - cpu->pc = 0xBFC0ACA8u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACC8(CPUState* cpu) { - cpu->pc = 0xBFC0ACC8u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACD0(CPUState* cpu) { - cpu->pc = 0xBFC0ACD0u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACE0(CPUState* cpu) { - cpu->pc = 0xBFC0ACE0u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACF0(CPUState* cpu) { - cpu->pc = 0xBFC0ACF0u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AB60_cont_BFC0ACF8(CPUState* cpu) { - cpu->pc = 0xBFC0ACF8u; - SCPH1001_func_1FC0AB60(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD2C(CPUState* cpu) { - cpu->pc = 0xBFC0AD2Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD30(CPUState* cpu) { - cpu->pc = 0xBFC0AD30u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD4C(CPUState* cpu) { - cpu->pc = 0xBFC0AD4Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD54(CPUState* cpu) { - cpu->pc = 0xBFC0AD54u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD64(CPUState* cpu) { - cpu->pc = 0xBFC0AD64u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD70(CPUState* cpu) { - cpu->pc = 0xBFC0AD70u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD78(CPUState* cpu) { - cpu->pc = 0xBFC0AD78u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD80(CPUState* cpu) { - cpu->pc = 0xBFC0AD80u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD88(CPUState* cpu) { - cpu->pc = 0xBFC0AD88u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AD98(CPUState* cpu) { - cpu->pc = 0xBFC0AD98u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADA4(CPUState* cpu) { - cpu->pc = 0xBFC0ADA4u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADB8(CPUState* cpu) { - cpu->pc = 0xBFC0ADB8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADC0(CPUState* cpu) { - cpu->pc = 0xBFC0ADC0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADD0(CPUState* cpu) { - cpu->pc = 0xBFC0ADD0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADE0(CPUState* cpu) { - cpu->pc = 0xBFC0ADE0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0ADF0(CPUState* cpu) { - cpu->pc = 0xBFC0ADF0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE24(CPUState* cpu) { - cpu->pc = 0xBFC0AE24u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE34(CPUState* cpu) { - cpu->pc = 0xBFC0AE34u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE3C(CPUState* cpu) { - cpu->pc = 0xBFC0AE3Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE50(CPUState* cpu) { - cpu->pc = 0xBFC0AE50u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE54(CPUState* cpu) { - cpu->pc = 0xBFC0AE54u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE64(CPUState* cpu) { - cpu->pc = 0xBFC0AE64u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE6C(CPUState* cpu) { - cpu->pc = 0xBFC0AE6Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE70(CPUState* cpu) { - cpu->pc = 0xBFC0AE70u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE84(CPUState* cpu) { - cpu->pc = 0xBFC0AE84u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE8C(CPUState* cpu) { - cpu->pc = 0xBFC0AE8Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AE9C(CPUState* cpu) { - cpu->pc = 0xBFC0AE9Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AEA0(CPUState* cpu) { - cpu->pc = 0xBFC0AEA0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AEA8(CPUState* cpu) { - cpu->pc = 0xBFC0AEA8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AEC0(CPUState* cpu) { - cpu->pc = 0xBFC0AEC0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AED0(CPUState* cpu) { - cpu->pc = 0xBFC0AED0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AED4(CPUState* cpu) { - cpu->pc = 0xBFC0AED4u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AEE8(CPUState* cpu) { - cpu->pc = 0xBFC0AEE8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AEF0(CPUState* cpu) { - cpu->pc = 0xBFC0AEF0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF04(CPUState* cpu) { - cpu->pc = 0xBFC0AF04u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF08(CPUState* cpu) { - cpu->pc = 0xBFC0AF08u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF28(CPUState* cpu) { - cpu->pc = 0xBFC0AF28u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF40(CPUState* cpu) { - cpu->pc = 0xBFC0AF40u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF60(CPUState* cpu) { - cpu->pc = 0xBFC0AF60u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF6C(CPUState* cpu) { - cpu->pc = 0xBFC0AF6Cu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF78(CPUState* cpu) { - cpu->pc = 0xBFC0AF78u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF80(CPUState* cpu) { - cpu->pc = 0xBFC0AF80u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF84(CPUState* cpu) { - cpu->pc = 0xBFC0AF84u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AF98(CPUState* cpu) { - cpu->pc = 0xBFC0AF98u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFA0(CPUState* cpu) { - cpu->pc = 0xBFC0AFA0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFA4(CPUState* cpu) { - cpu->pc = 0xBFC0AFA4u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFAC(CPUState* cpu) { - cpu->pc = 0xBFC0AFACu; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFC8(CPUState* cpu) { - cpu->pc = 0xBFC0AFC8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFD0(CPUState* cpu) { - cpu->pc = 0xBFC0AFD0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFE8(CPUState* cpu) { - cpu->pc = 0xBFC0AFE8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFF0(CPUState* cpu) { - cpu->pc = 0xBFC0AFF0u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0AFF8(CPUState* cpu) { - cpu->pc = 0xBFC0AFF8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B010(CPUState* cpu) { - cpu->pc = 0xBFC0B010u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B024(CPUState* cpu) { - cpu->pc = 0xBFC0B024u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B028(CPUState* cpu) { - cpu->pc = 0xBFC0B028u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B034(CPUState* cpu) { - cpu->pc = 0xBFC0B034u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B040(CPUState* cpu) { - cpu->pc = 0xBFC0B040u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B050(CPUState* cpu) { - cpu->pc = 0xBFC0B050u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B060(CPUState* cpu) { - cpu->pc = 0xBFC0B060u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B074(CPUState* cpu) { - cpu->pc = 0xBFC0B074u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B080(CPUState* cpu) { - cpu->pc = 0xBFC0B080u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B094(CPUState* cpu) { - cpu->pc = 0xBFC0B094u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B0A4(CPUState* cpu) { - cpu->pc = 0xBFC0B0A4u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B0A8(CPUState* cpu) { - cpu->pc = 0xBFC0B0A8u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0AD08_cont_BFC0B0B4(CPUState* cpu) { - cpu->pc = 0xBFC0B0B4u; - SCPH1001_func_1FC0AD08(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B0F0(CPUState* cpu) { - cpu->pc = 0xBFC0B0F0u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B0F4(CPUState* cpu) { - cpu->pc = 0xBFC0B0F4u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B110(CPUState* cpu) { - cpu->pc = 0xBFC0B110u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B120(CPUState* cpu) { - cpu->pc = 0xBFC0B120u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B128(CPUState* cpu) { - cpu->pc = 0xBFC0B128u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B13C(CPUState* cpu) { - cpu->pc = 0xBFC0B13Cu; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B148(CPUState* cpu) { - cpu->pc = 0xBFC0B148u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B158(CPUState* cpu) { - cpu->pc = 0xBFC0B158u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B0D0_cont_BFC0B160(CPUState* cpu) { - cpu->pc = 0xBFC0B160u; - SCPH1001_func_1FC0B0D0(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B19C(CPUState* cpu) { - cpu->pc = 0xBFC0B19Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1A0(CPUState* cpu) { - cpu->pc = 0xBFC0B1A0u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1B8(CPUState* cpu) { - cpu->pc = 0xBFC0B1B8u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1D0(CPUState* cpu) { - cpu->pc = 0xBFC0B1D0u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1D8(CPUState* cpu) { - cpu->pc = 0xBFC0B1D8u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1E8(CPUState* cpu) { - cpu->pc = 0xBFC0B1E8u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1F4(CPUState* cpu) { - cpu->pc = 0xBFC0B1F4u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B1FC(CPUState* cpu) { - cpu->pc = 0xBFC0B1FCu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B218(CPUState* cpu) { - cpu->pc = 0xBFC0B218u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B248(CPUState* cpu) { - cpu->pc = 0xBFC0B248u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B258(CPUState* cpu) { - cpu->pc = 0xBFC0B258u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B274(CPUState* cpu) { - cpu->pc = 0xBFC0B274u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B27C(CPUState* cpu) { - cpu->pc = 0xBFC0B27Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B290(CPUState* cpu) { - cpu->pc = 0xBFC0B290u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B298(CPUState* cpu) { - cpu->pc = 0xBFC0B298u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B2B8(CPUState* cpu) { - cpu->pc = 0xBFC0B2B8u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B2C0(CPUState* cpu) { - cpu->pc = 0xBFC0B2C0u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B2CC(CPUState* cpu) { - cpu->pc = 0xBFC0B2CCu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B2F8(CPUState* cpu) { - cpu->pc = 0xBFC0B2F8u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B30C(CPUState* cpu) { - cpu->pc = 0xBFC0B30Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B314(CPUState* cpu) { - cpu->pc = 0xBFC0B314u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B324(CPUState* cpu) { - cpu->pc = 0xBFC0B324u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B32C(CPUState* cpu) { - cpu->pc = 0xBFC0B32Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B34C(CPUState* cpu) { - cpu->pc = 0xBFC0B34Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B354(CPUState* cpu) { - cpu->pc = 0xBFC0B354u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B360(CPUState* cpu) { - cpu->pc = 0xBFC0B360u; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B170_cont_BFC0B37C(CPUState* cpu) { - cpu->pc = 0xBFC0B37Cu; - SCPH1001_func_1FC0B170(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3A4(CPUState* cpu) { - cpu->pc = 0xBFC0B3A4u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3B8(CPUState* cpu) { - cpu->pc = 0xBFC0B3B8u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3BC(CPUState* cpu) { - cpu->pc = 0xBFC0B3BCu; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3D8(CPUState* cpu) { - cpu->pc = 0xBFC0B3D8u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3E4(CPUState* cpu) { - cpu->pc = 0xBFC0B3E4u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3EC(CPUState* cpu) { - cpu->pc = 0xBFC0B3ECu; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B3F4(CPUState* cpu) { - cpu->pc = 0xBFC0B3F4u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B438(CPUState* cpu) { - cpu->pc = 0xBFC0B438u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B450(CPUState* cpu) { - cpu->pc = 0xBFC0B450u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B464(CPUState* cpu) { - cpu->pc = 0xBFC0B464u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B468(CPUState* cpu) { - cpu->pc = 0xBFC0B468u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B488(CPUState* cpu) { - cpu->pc = 0xBFC0B488u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B498(CPUState* cpu) { - cpu->pc = 0xBFC0B498u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B4A4(CPUState* cpu) { - cpu->pc = 0xBFC0B4A4u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B4A8(CPUState* cpu) { - cpu->pc = 0xBFC0B4A8u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B4B0(CPUState* cpu) { - cpu->pc = 0xBFC0B4B0u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B4E0(CPUState* cpu) { - cpu->pc = 0xBFC0B4E0u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B4FC(CPUState* cpu) { - cpu->pc = 0xBFC0B4FCu; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B530(CPUState* cpu) { - cpu->pc = 0xBFC0B530u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B534(CPUState* cpu) { - cpu->pc = 0xBFC0B534u; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B394_cont_BFC0B53C(CPUState* cpu) { - cpu->pc = 0xBFC0B53Cu; - SCPH1001_func_1FC0B394(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B55C(CPUState* cpu) { - cpu->pc = 0xBFC0B55Cu; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B564(CPUState* cpu) { - cpu->pc = 0xBFC0B564u; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B568(CPUState* cpu) { - cpu->pc = 0xBFC0B568u; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B588(CPUState* cpu) { - cpu->pc = 0xBFC0B588u; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B590(CPUState* cpu) { - cpu->pc = 0xBFC0B590u; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B54C_cont_BFC0B594(CPUState* cpu) { - cpu->pc = 0xBFC0B594u; - SCPH1001_func_1FC0B54C(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5B0(CPUState* cpu) { - cpu->pc = 0xBFC0B5B0u; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5B8(CPUState* cpu) { - cpu->pc = 0xBFC0B5B8u; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5BC(CPUState* cpu) { - cpu->pc = 0xBFC0B5BCu; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5DC(CPUState* cpu) { - cpu->pc = 0xBFC0B5DCu; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5E4(CPUState* cpu) { - cpu->pc = 0xBFC0B5E4u; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5A0_cont_BFC0B5E8(CPUState* cpu) { - cpu->pc = 0xBFC0B5E8u; - SCPH1001_func_1FC0B5A0(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B604(CPUState* cpu) { - cpu->pc = 0xBFC0B604u; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B60C(CPUState* cpu) { - cpu->pc = 0xBFC0B60Cu; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B610(CPUState* cpu) { - cpu->pc = 0xBFC0B610u; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B630(CPUState* cpu) { - cpu->pc = 0xBFC0B630u; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B638(CPUState* cpu) { - cpu->pc = 0xBFC0B638u; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B5F4_cont_BFC0B63C(CPUState* cpu) { - cpu->pc = 0xBFC0B63Cu; - SCPH1001_func_1FC0B5F4(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B658(CPUState* cpu) { - cpu->pc = 0xBFC0B658u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B66C(CPUState* cpu) { - cpu->pc = 0xBFC0B66Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B670(CPUState* cpu) { - cpu->pc = 0xBFC0B670u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B68C(CPUState* cpu) { - cpu->pc = 0xBFC0B68Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B6A0(CPUState* cpu) { - cpu->pc = 0xBFC0B6A0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B6BC(CPUState* cpu) { - cpu->pc = 0xBFC0B6BCu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B6E0(CPUState* cpu) { - cpu->pc = 0xBFC0B6E0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B6EC(CPUState* cpu) { - cpu->pc = 0xBFC0B6ECu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B70C(CPUState* cpu) { - cpu->pc = 0xBFC0B70Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B714(CPUState* cpu) { - cpu->pc = 0xBFC0B714u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B788(CPUState* cpu) { - cpu->pc = 0xBFC0B788u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B79C(CPUState* cpu) { - cpu->pc = 0xBFC0B79Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7AC(CPUState* cpu) { - cpu->pc = 0xBFC0B7ACu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7B0(CPUState* cpu) { - cpu->pc = 0xBFC0B7B0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7C0(CPUState* cpu) { - cpu->pc = 0xBFC0B7C0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7CC(CPUState* cpu) { - cpu->pc = 0xBFC0B7CCu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7E8(CPUState* cpu) { - cpu->pc = 0xBFC0B7E8u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B7F4(CPUState* cpu) { - cpu->pc = 0xBFC0B7F4u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B818(CPUState* cpu) { - cpu->pc = 0xBFC0B818u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B828(CPUState* cpu) { - cpu->pc = 0xBFC0B828u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B834(CPUState* cpu) { - cpu->pc = 0xBFC0B834u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B84C(CPUState* cpu) { - cpu->pc = 0xBFC0B84Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B850(CPUState* cpu) { - cpu->pc = 0xBFC0B850u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B864(CPUState* cpu) { - cpu->pc = 0xBFC0B864u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B8D8(CPUState* cpu) { - cpu->pc = 0xBFC0B8D8u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B8EC(CPUState* cpu) { - cpu->pc = 0xBFC0B8ECu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B8FC(CPUState* cpu) { - cpu->pc = 0xBFC0B8FCu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B900(CPUState* cpu) { - cpu->pc = 0xBFC0B900u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B920(CPUState* cpu) { - cpu->pc = 0xBFC0B920u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B92C(CPUState* cpu) { - cpu->pc = 0xBFC0B92Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B948(CPUState* cpu) { - cpu->pc = 0xBFC0B948u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B954(CPUState* cpu) { - cpu->pc = 0xBFC0B954u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B9D0(CPUState* cpu) { - cpu->pc = 0xBFC0B9D0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B9E0(CPUState* cpu) { - cpu->pc = 0xBFC0B9E0u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0B9EC(CPUState* cpu) { - cpu->pc = 0xBFC0B9ECu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA04(CPUState* cpu) { - cpu->pc = 0xBFC0BA04u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA10(CPUState* cpu) { - cpu->pc = 0xBFC0BA10u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA2C(CPUState* cpu) { - cpu->pc = 0xBFC0BA2Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA38(CPUState* cpu) { - cpu->pc = 0xBFC0BA38u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA44(CPUState* cpu) { - cpu->pc = 0xBFC0BA44u; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0B648_cont_BFC0BA6C(CPUState* cpu) { - cpu->pc = 0xBFC0BA6Cu; - SCPH1001_func_1FC0B648(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BA98(CPUState* cpu) { - cpu->pc = 0xBFC0BA98u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BAA0(CPUState* cpu) { - cpu->pc = 0xBFC0BAA0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BABC(CPUState* cpu) { - cpu->pc = 0xBFC0BABCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BAC4(CPUState* cpu) { - cpu->pc = 0xBFC0BAC4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BACC(CPUState* cpu) { - cpu->pc = 0xBFC0BACCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BAD4(CPUState* cpu) { - cpu->pc = 0xBFC0BAD4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BAF4(CPUState* cpu) { - cpu->pc = 0xBFC0BAF4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB00(CPUState* cpu) { - cpu->pc = 0xBFC0BB00u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB04(CPUState* cpu) { - cpu->pc = 0xBFC0BB04u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB20(CPUState* cpu) { - cpu->pc = 0xBFC0BB20u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB28(CPUState* cpu) { - cpu->pc = 0xBFC0BB28u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB48(CPUState* cpu) { - cpu->pc = 0xBFC0BB48u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB58(CPUState* cpu) { - cpu->pc = 0xBFC0BB58u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB80(CPUState* cpu) { - cpu->pc = 0xBFC0BB80u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BB9C(CPUState* cpu) { - cpu->pc = 0xBFC0BB9Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BBA8(CPUState* cpu) { - cpu->pc = 0xBFC0BBA8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BBC4(CPUState* cpu) { - cpu->pc = 0xBFC0BBC4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BBCC(CPUState* cpu) { - cpu->pc = 0xBFC0BBCCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BBF4(CPUState* cpu) { - cpu->pc = 0xBFC0BBF4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BBFC(CPUState* cpu) { - cpu->pc = 0xBFC0BBFCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BC14(CPUState* cpu) { - cpu->pc = 0xBFC0BC14u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BC1C(CPUState* cpu) { - cpu->pc = 0xBFC0BC1Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BC5C(CPUState* cpu) { - cpu->pc = 0xBFC0BC5Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BC64(CPUState* cpu) { - cpu->pc = 0xBFC0BC64u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BC8C(CPUState* cpu) { - cpu->pc = 0xBFC0BC8Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BCA0(CPUState* cpu) { - cpu->pc = 0xBFC0BCA0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BCAC(CPUState* cpu) { - cpu->pc = 0xBFC0BCACu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BCC8(CPUState* cpu) { - cpu->pc = 0xBFC0BCC8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BCD0(CPUState* cpu) { - cpu->pc = 0xBFC0BCD0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BCFC(CPUState* cpu) { - cpu->pc = 0xBFC0BCFCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD18(CPUState* cpu) { - cpu->pc = 0xBFC0BD18u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD2C(CPUState* cpu) { - cpu->pc = 0xBFC0BD2Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD38(CPUState* cpu) { - cpu->pc = 0xBFC0BD38u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD44(CPUState* cpu) { - cpu->pc = 0xBFC0BD44u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD5C(CPUState* cpu) { - cpu->pc = 0xBFC0BD5Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD74(CPUState* cpu) { - cpu->pc = 0xBFC0BD74u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD84(CPUState* cpu) { - cpu->pc = 0xBFC0BD84u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BD94(CPUState* cpu) { - cpu->pc = 0xBFC0BD94u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BDB8(CPUState* cpu) { - cpu->pc = 0xBFC0BDB8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BDBC(CPUState* cpu) { - cpu->pc = 0xBFC0BDBCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BDCC(CPUState* cpu) { - cpu->pc = 0xBFC0BDCCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BDD4(CPUState* cpu) { - cpu->pc = 0xBFC0BDD4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BDD8(CPUState* cpu) { - cpu->pc = 0xBFC0BDD8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE04(CPUState* cpu) { - cpu->pc = 0xBFC0BE04u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE0C(CPUState* cpu) { - cpu->pc = 0xBFC0BE0Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE1C(CPUState* cpu) { - cpu->pc = 0xBFC0BE1Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE28(CPUState* cpu) { - cpu->pc = 0xBFC0BE28u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE38(CPUState* cpu) { - cpu->pc = 0xBFC0BE38u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE44(CPUState* cpu) { - cpu->pc = 0xBFC0BE44u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE50(CPUState* cpu) { - cpu->pc = 0xBFC0BE50u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE74(CPUState* cpu) { - cpu->pc = 0xBFC0BE74u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BE90(CPUState* cpu) { - cpu->pc = 0xBFC0BE90u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEA0(CPUState* cpu) { - cpu->pc = 0xBFC0BEA0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEAC(CPUState* cpu) { - cpu->pc = 0xBFC0BEACu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEB8(CPUState* cpu) { - cpu->pc = 0xBFC0BEB8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEBC(CPUState* cpu) { - cpu->pc = 0xBFC0BEBCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEDC(CPUState* cpu) { - cpu->pc = 0xBFC0BEDCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEF4(CPUState* cpu) { - cpu->pc = 0xBFC0BEF4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BEFC(CPUState* cpu) { - cpu->pc = 0xBFC0BEFCu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BF38(CPUState* cpu) { - cpu->pc = 0xBFC0BF38u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BF60(CPUState* cpu) { - cpu->pc = 0xBFC0BF60u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BF74(CPUState* cpu) { - cpu->pc = 0xBFC0BF74u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BF80(CPUState* cpu) { - cpu->pc = 0xBFC0BF80u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BF9C(CPUState* cpu) { - cpu->pc = 0xBFC0BF9Cu; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFA4(CPUState* cpu) { - cpu->pc = 0xBFC0BFA4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFB0(CPUState* cpu) { - cpu->pc = 0xBFC0BFB0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFB8(CPUState* cpu) { - cpu->pc = 0xBFC0BFB8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFD8(CPUState* cpu) { - cpu->pc = 0xBFC0BFD8u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFE0(CPUState* cpu) { - cpu->pc = 0xBFC0BFE0u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BA8C_cont_BFC0BFE4(CPUState* cpu) { - cpu->pc = 0xBFC0BFE4u; - SCPH1001_func_1FC0BA8C(cpu); -} - -void SCPH1001_func_1FC0BFF0_cont_BFC0C038(CPUState* cpu) { - cpu->pc = 0xBFC0C038u; - SCPH1001_func_1FC0BFF0(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C070(CPUState* cpu) { - cpu->pc = 0xBFC0C070u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C074(CPUState* cpu) { - cpu->pc = 0xBFC0C074u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C090(CPUState* cpu) { - cpu->pc = 0xBFC0C090u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C0B0(CPUState* cpu) { - cpu->pc = 0xBFC0C0B0u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C0B8(CPUState* cpu) { - cpu->pc = 0xBFC0C0B8u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C0C8(CPUState* cpu) { - cpu->pc = 0xBFC0C0C8u; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C048_cont_BFC0C0CC(CPUState* cpu) { - cpu->pc = 0xBFC0C0CCu; - SCPH1001_func_1FC0C048(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C0F8(CPUState* cpu) { - cpu->pc = 0xBFC0C0F8u; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C0FC(CPUState* cpu) { - cpu->pc = 0xBFC0C0FCu; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C114(CPUState* cpu) { - cpu->pc = 0xBFC0C114u; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C120(CPUState* cpu) { - cpu->pc = 0xBFC0C120u; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C12C(CPUState* cpu) { - cpu->pc = 0xBFC0C12Cu; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C0DC_cont_BFC0C130(CPUState* cpu) { - cpu->pc = 0xBFC0C130u; - SCPH1001_func_1FC0C0DC(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C168(CPUState* cpu) { - cpu->pc = 0xBFC0C168u; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C16C(CPUState* cpu) { - cpu->pc = 0xBFC0C16Cu; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C190(CPUState* cpu) { - cpu->pc = 0xBFC0C190u; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C1A0(CPUState* cpu) { - cpu->pc = 0xBFC0C1A0u; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C1AC(CPUState* cpu) { - cpu->pc = 0xBFC0C1ACu; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C1B0(CPUState* cpu) { - cpu->pc = 0xBFC0C1B0u; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C140_cont_BFC0C1CC(CPUState* cpu) { - cpu->pc = 0xBFC0C1CCu; - SCPH1001_func_1FC0C140(cpu); -} - -void SCPH1001_func_1FC0C1FC_cont_BFC0C210(CPUState* cpu) { - cpu->pc = 0xBFC0C210u; - SCPH1001_func_1FC0C1FC(cpu); -} - -void SCPH1001_func_1FC0C220_cont_BFC0C238(CPUState* cpu) { - cpu->pc = 0xBFC0C238u; - SCPH1001_func_1FC0C220(cpu); -} - -void SCPH1001_func_1FC0C248_cont_BFC0C260(CPUState* cpu) { - cpu->pc = 0xBFC0C260u; - SCPH1001_func_1FC0C248(cpu); -} - -void SCPH1001_func_1FC0C270_cont_BFC0C288(CPUState* cpu) { - cpu->pc = 0xBFC0C288u; - SCPH1001_func_1FC0C270(cpu); -} - -void SCPH1001_func_1FC0C298_cont_BFC0C2B0(CPUState* cpu) { - cpu->pc = 0xBFC0C2B0u; - SCPH1001_func_1FC0C298(cpu); -} - -void SCPH1001_func_1FC0C2C0_cont_BFC0C2D8(CPUState* cpu) { - cpu->pc = 0xBFC0C2D8u; - SCPH1001_func_1FC0C2C0(cpu); -} - -void SCPH1001_func_1FC0C2E8_cont_BFC0C2F8(CPUState* cpu) { - cpu->pc = 0xBFC0C2F8u; - SCPH1001_func_1FC0C2E8(cpu); -} - -void SCPH1001_func_1FC0C2E8_cont_BFC0C300(CPUState* cpu) { - cpu->pc = 0xBFC0C300u; - SCPH1001_func_1FC0C2E8(cpu); -} - -void SCPH1001_func_1FC0C2E8_cont_BFC0C308(CPUState* cpu) { - cpu->pc = 0xBFC0C308u; - SCPH1001_func_1FC0C2E8(cpu); -} - -void SCPH1001_func_1FC0C318_cont_BFC0C32C(CPUState* cpu) { - cpu->pc = 0xBFC0C32Cu; - SCPH1001_func_1FC0C318(cpu); -} - -void SCPH1001_func_1FC0C318_cont_BFC0C33C(CPUState* cpu) { - cpu->pc = 0xBFC0C33Cu; - SCPH1001_func_1FC0C318(cpu); -} - -void SCPH1001_func_1FC0C318_cont_BFC0C344(CPUState* cpu) { - cpu->pc = 0xBFC0C344u; - SCPH1001_func_1FC0C318(cpu); -} - -void SCPH1001_func_1FC0C354_cont_BFC0C36C(CPUState* cpu) { - cpu->pc = 0xBFC0C36Cu; - SCPH1001_func_1FC0C354(cpu); -} - -void SCPH1001_func_1FC0C354_cont_BFC0C37C(CPUState* cpu) { - cpu->pc = 0xBFC0C37Cu; - SCPH1001_func_1FC0C354(cpu); -} - -void SCPH1001_func_1FC0C354_cont_BFC0C38C(CPUState* cpu) { - cpu->pc = 0xBFC0C38Cu; - SCPH1001_func_1FC0C354(cpu); -} - -void SCPH1001_func_1FC0C354_cont_BFC0C39C(CPUState* cpu) { - cpu->pc = 0xBFC0C39Cu; - SCPH1001_func_1FC0C354(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C598(CPUState* cpu) { - cpu->pc = 0xBFC0C598u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C5AC(CPUState* cpu) { - cpu->pc = 0xBFC0C5ACu; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C5B4(CPUState* cpu) { - cpu->pc = 0xBFC0C5B4u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C5F4(CPUState* cpu) { - cpu->pc = 0xBFC0C5F4u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C608(CPUState* cpu) { - cpu->pc = 0xBFC0C608u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C60C(CPUState* cpu) { - cpu->pc = 0xBFC0C60Cu; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C638(CPUState* cpu) { - cpu->pc = 0xBFC0C638u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C640(CPUState* cpu) { - cpu->pc = 0xBFC0C640u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C648(CPUState* cpu) { - cpu->pc = 0xBFC0C648u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C660(CPUState* cpu) { - cpu->pc = 0xBFC0C660u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C664(CPUState* cpu) { - cpu->pc = 0xBFC0C664u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C678(CPUState* cpu) { - cpu->pc = 0xBFC0C678u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C69C(CPUState* cpu) { - cpu->pc = 0xBFC0C69Cu; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C6A4(CPUState* cpu) { - cpu->pc = 0xBFC0C6A4u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C6BC(CPUState* cpu) { - cpu->pc = 0xBFC0C6BCu; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C6C0(CPUState* cpu) { - cpu->pc = 0xBFC0C6C0u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C6D4(CPUState* cpu) { - cpu->pc = 0xBFC0C6D4u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C6F8(CPUState* cpu) { - cpu->pc = 0xBFC0C6F8u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C700(CPUState* cpu) { - cpu->pc = 0xBFC0C700u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C708(CPUState* cpu) { - cpu->pc = 0xBFC0C708u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C580_cont_BFC0C710(CPUState* cpu) { - cpu->pc = 0xBFC0C710u; - SCPH1001_func_1FC0C580(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C738(CPUState* cpu) { - cpu->pc = 0xBFC0C738u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C750(CPUState* cpu) { - cpu->pc = 0xBFC0C750u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C758(CPUState* cpu) { - cpu->pc = 0xBFC0C758u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C790(CPUState* cpu) { - cpu->pc = 0xBFC0C790u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7A4(CPUState* cpu) { - cpu->pc = 0xBFC0C7A4u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7A8(CPUState* cpu) { - cpu->pc = 0xBFC0C7A8u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7D4(CPUState* cpu) { - cpu->pc = 0xBFC0C7D4u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7DC(CPUState* cpu) { - cpu->pc = 0xBFC0C7DCu; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7E4(CPUState* cpu) { - cpu->pc = 0xBFC0C7E4u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7F0(CPUState* cpu) { - cpu->pc = 0xBFC0C7F0u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C7FC(CPUState* cpu) { - cpu->pc = 0xBFC0C7FCu; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C804(CPUState* cpu) { - cpu->pc = 0xBFC0C804u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C80C(CPUState* cpu) { - cpu->pc = 0xBFC0C80Cu; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C814(CPUState* cpu) { - cpu->pc = 0xBFC0C814u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C720_cont_BFC0C818(CPUState* cpu) { - cpu->pc = 0xBFC0C818u; - SCPH1001_func_1FC0C720(cpu); -} - -void SCPH1001_func_1FC0C830_cont_BFC0C84C(CPUState* cpu) { - cpu->pc = 0xBFC0C84Cu; - SCPH1001_func_1FC0C830(cpu); -} - -void SCPH1001_func_1FC0C830_cont_BFC0C854(CPUState* cpu) { - cpu->pc = 0xBFC0C854u; - SCPH1001_func_1FC0C830(cpu); -} - -void SCPH1001_func_1FC0C830_cont_BFC0C860(CPUState* cpu) { - cpu->pc = 0xBFC0C860u; - SCPH1001_func_1FC0C830(cpu); -} - -void SCPH1001_func_1FC0C830_cont_BFC0C868(CPUState* cpu) { - cpu->pc = 0xBFC0C868u; - SCPH1001_func_1FC0C830(cpu); -} - -void SCPH1001_func_1FC0C830_cont_BFC0C874(CPUState* cpu) { - cpu->pc = 0xBFC0C874u; - SCPH1001_func_1FC0C830(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C8B0(CPUState* cpu) { - cpu->pc = 0xBFC0C8B0u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C8C0(CPUState* cpu) { - cpu->pc = 0xBFC0C8C0u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C8D0(CPUState* cpu) { - cpu->pc = 0xBFC0C8D0u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C8F0(CPUState* cpu) { - cpu->pc = 0xBFC0C8F0u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C8FC(CPUState* cpu) { - cpu->pc = 0xBFC0C8FCu; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C908(CPUState* cpu) { - cpu->pc = 0xBFC0C908u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C914(CPUState* cpu) { - cpu->pc = 0xBFC0C914u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C920(CPUState* cpu) { - cpu->pc = 0xBFC0C920u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C944(CPUState* cpu) { - cpu->pc = 0xBFC0C944u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C950(CPUState* cpu) { - cpu->pc = 0xBFC0C950u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C95C(CPUState* cpu) { - cpu->pc = 0xBFC0C95Cu; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C968(CPUState* cpu) { - cpu->pc = 0xBFC0C968u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C974(CPUState* cpu) { - cpu->pc = 0xBFC0C974u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C994(CPUState* cpu) { - cpu->pc = 0xBFC0C994u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C890_cont_BFC0C9B4(CPUState* cpu) { - cpu->pc = 0xBFC0C9B4u; - SCPH1001_func_1FC0C890(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0C9EC(CPUState* cpu) { - cpu->pc = 0xBFC0C9ECu; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0C9FC(CPUState* cpu) { - cpu->pc = 0xBFC0C9FCu; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA0C(CPUState* cpu) { - cpu->pc = 0xBFC0CA0Cu; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA38(CPUState* cpu) { - cpu->pc = 0xBFC0CA38u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA44(CPUState* cpu) { - cpu->pc = 0xBFC0CA44u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA50(CPUState* cpu) { - cpu->pc = 0xBFC0CA50u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA5C(CPUState* cpu) { - cpu->pc = 0xBFC0CA5Cu; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA68(CPUState* cpu) { - cpu->pc = 0xBFC0CA68u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA74(CPUState* cpu) { - cpu->pc = 0xBFC0CA74u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CA90(CPUState* cpu) { - cpu->pc = 0xBFC0CA90u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0C9CC_cont_BFC0CAA4(CPUState* cpu) { - cpu->pc = 0xBFC0CAA4u; - SCPH1001_func_1FC0C9CC(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CAD4(CPUState* cpu) { - cpu->pc = 0xBFC0CAD4u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB00(CPUState* cpu) { - cpu->pc = 0xBFC0CB00u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB0C(CPUState* cpu) { - cpu->pc = 0xBFC0CB0Cu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB14(CPUState* cpu) { - cpu->pc = 0xBFC0CB14u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB1C(CPUState* cpu) { - cpu->pc = 0xBFC0CB1Cu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB28(CPUState* cpu) { - cpu->pc = 0xBFC0CB28u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB30(CPUState* cpu) { - cpu->pc = 0xBFC0CB30u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB44(CPUState* cpu) { - cpu->pc = 0xBFC0CB44u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB58(CPUState* cpu) { - cpu->pc = 0xBFC0CB58u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB60(CPUState* cpu) { - cpu->pc = 0xBFC0CB60u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB74(CPUState* cpu) { - cpu->pc = 0xBFC0CB74u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB88(CPUState* cpu) { - cpu->pc = 0xBFC0CB88u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CB9C(CPUState* cpu) { - cpu->pc = 0xBFC0CB9Cu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CBA4(CPUState* cpu) { - cpu->pc = 0xBFC0CBA4u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CBD0(CPUState* cpu) { - cpu->pc = 0xBFC0CBD0u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CBE0(CPUState* cpu) { - cpu->pc = 0xBFC0CBE0u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CBEC(CPUState* cpu) { - cpu->pc = 0xBFC0CBECu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC00(CPUState* cpu) { - cpu->pc = 0xBFC0CC00u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC10(CPUState* cpu) { - cpu->pc = 0xBFC0CC10u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC28(CPUState* cpu) { - cpu->pc = 0xBFC0CC28u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC40(CPUState* cpu) { - cpu->pc = 0xBFC0CC40u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC4C(CPUState* cpu) { - cpu->pc = 0xBFC0CC4Cu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC58(CPUState* cpu) { - cpu->pc = 0xBFC0CC58u; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CAB4_cont_BFC0CC5C(CPUState* cpu) { - cpu->pc = 0xBFC0CC5Cu; - SCPH1001_func_1FC0CAB4(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCAC(CPUState* cpu) { - cpu->pc = 0xBFC0CCACu; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCB8(CPUState* cpu) { - cpu->pc = 0xBFC0CCB8u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCC0(CPUState* cpu) { - cpu->pc = 0xBFC0CCC0u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCC8(CPUState* cpu) { - cpu->pc = 0xBFC0CCC8u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCD0(CPUState* cpu) { - cpu->pc = 0xBFC0CCD0u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCD8(CPUState* cpu) { - cpu->pc = 0xBFC0CCD8u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCE0(CPUState* cpu) { - cpu->pc = 0xBFC0CCE0u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCE8(CPUState* cpu) { - cpu->pc = 0xBFC0CCE8u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCF4(CPUState* cpu) { - cpu->pc = 0xBFC0CCF4u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CCFC(CPUState* cpu) { - cpu->pc = 0xBFC0CCFCu; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD04(CPUState* cpu) { - cpu->pc = 0xBFC0CD04u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD0C(CPUState* cpu) { - cpu->pc = 0xBFC0CD0Cu; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD20(CPUState* cpu) { - cpu->pc = 0xBFC0CD20u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD34(CPUState* cpu) { - cpu->pc = 0xBFC0CD34u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD44(CPUState* cpu) { - cpu->pc = 0xBFC0CD44u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD4C(CPUState* cpu) { - cpu->pc = 0xBFC0CD4Cu; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD54(CPUState* cpu) { - cpu->pc = 0xBFC0CD54u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD58(CPUState* cpu) { - cpu->pc = 0xBFC0CD58u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD64(CPUState* cpu) { - cpu->pc = 0xBFC0CD64u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD68(CPUState* cpu) { - cpu->pc = 0xBFC0CD68u; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CC68_cont_BFC0CD6C(CPUState* cpu) { - cpu->pc = 0xBFC0CD6Cu; - SCPH1001_func_1FC0CC68(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CDAC(CPUState* cpu) { - cpu->pc = 0xBFC0CDACu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CDB8(CPUState* cpu) { - cpu->pc = 0xBFC0CDB8u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CDE4(CPUState* cpu) { - cpu->pc = 0xBFC0CDE4u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CDF0(CPUState* cpu) { - cpu->pc = 0xBFC0CDF0u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CDF8(CPUState* cpu) { - cpu->pc = 0xBFC0CDF8u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE08(CPUState* cpu) { - cpu->pc = 0xBFC0CE08u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE14(CPUState* cpu) { - cpu->pc = 0xBFC0CE14u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE20(CPUState* cpu) { - cpu->pc = 0xBFC0CE20u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE2C(CPUState* cpu) { - cpu->pc = 0xBFC0CE2Cu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE40(CPUState* cpu) { - cpu->pc = 0xBFC0CE40u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE4C(CPUState* cpu) { - cpu->pc = 0xBFC0CE4Cu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE74(CPUState* cpu) { - cpu->pc = 0xBFC0CE74u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE78(CPUState* cpu) { - cpu->pc = 0xBFC0CE78u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CE94(CPUState* cpu) { - cpu->pc = 0xBFC0CE94u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CEA8(CPUState* cpu) { - cpu->pc = 0xBFC0CEA8u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CEAC(CPUState* cpu) { - cpu->pc = 0xBFC0CEACu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CED0(CPUState* cpu) { - cpu->pc = 0xBFC0CED0u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CED4(CPUState* cpu) { - cpu->pc = 0xBFC0CED4u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CEF0(CPUState* cpu) { - cpu->pc = 0xBFC0CEF0u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF00(CPUState* cpu) { - cpu->pc = 0xBFC0CF00u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF14(CPUState* cpu) { - cpu->pc = 0xBFC0CF14u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF18(CPUState* cpu) { - cpu->pc = 0xBFC0CF18u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF20(CPUState* cpu) { - cpu->pc = 0xBFC0CF20u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF2C(CPUState* cpu) { - cpu->pc = 0xBFC0CF2Cu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF6C(CPUState* cpu) { - cpu->pc = 0xBFC0CF6Cu; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CD80_cont_BFC0CF78(CPUState* cpu) { - cpu->pc = 0xBFC0CF78u; - SCPH1001_func_1FC0CD80(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CF8C(CPUState* cpu) { - cpu->pc = 0xBFC0CF8Cu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CF94(CPUState* cpu) { - cpu->pc = 0xBFC0CF94u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CF9C(CPUState* cpu) { - cpu->pc = 0xBFC0CF9Cu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFA4(CPUState* cpu) { - cpu->pc = 0xBFC0CFA4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFAC(CPUState* cpu) { - cpu->pc = 0xBFC0CFACu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFB4(CPUState* cpu) { - cpu->pc = 0xBFC0CFB4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFBC(CPUState* cpu) { - cpu->pc = 0xBFC0CFBCu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFC4(CPUState* cpu) { - cpu->pc = 0xBFC0CFC4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFCC(CPUState* cpu) { - cpu->pc = 0xBFC0CFCCu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFD4(CPUState* cpu) { - cpu->pc = 0xBFC0CFD4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFDC(CPUState* cpu) { - cpu->pc = 0xBFC0CFDCu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFE4(CPUState* cpu) { - cpu->pc = 0xBFC0CFE4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFEC(CPUState* cpu) { - cpu->pc = 0xBFC0CFECu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFF0(CPUState* cpu) { - cpu->pc = 0xBFC0CFF0u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0CFF8(CPUState* cpu) { - cpu->pc = 0xBFC0CFF8u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D000(CPUState* cpu) { - cpu->pc = 0xBFC0D000u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D008(CPUState* cpu) { - cpu->pc = 0xBFC0D008u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D010(CPUState* cpu) { - cpu->pc = 0xBFC0D010u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D018(CPUState* cpu) { - cpu->pc = 0xBFC0D018u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D020(CPUState* cpu) { - cpu->pc = 0xBFC0D020u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D028(CPUState* cpu) { - cpu->pc = 0xBFC0D028u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D030(CPUState* cpu) { - cpu->pc = 0xBFC0D030u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D03C(CPUState* cpu) { - cpu->pc = 0xBFC0D03Cu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D044(CPUState* cpu) { - cpu->pc = 0xBFC0D044u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D050(CPUState* cpu) { - cpu->pc = 0xBFC0D050u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D058(CPUState* cpu) { - cpu->pc = 0xBFC0D058u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D060(CPUState* cpu) { - cpu->pc = 0xBFC0D060u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D068(CPUState* cpu) { - cpu->pc = 0xBFC0D068u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D074(CPUState* cpu) { - cpu->pc = 0xBFC0D074u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D07C(CPUState* cpu) { - cpu->pc = 0xBFC0D07Cu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D088(CPUState* cpu) { - cpu->pc = 0xBFC0D088u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D090(CPUState* cpu) { - cpu->pc = 0xBFC0D090u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D098(CPUState* cpu) { - cpu->pc = 0xBFC0D098u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D0A0(CPUState* cpu) { - cpu->pc = 0xBFC0D0A0u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D0A8(CPUState* cpu) { - cpu->pc = 0xBFC0D0A8u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D0B0(CPUState* cpu) { - cpu->pc = 0xBFC0D0B0u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D0BC(CPUState* cpu) { - cpu->pc = 0xBFC0D0BCu; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0CF84_cont_BFC0D0C4(CPUState* cpu) { - cpu->pc = 0xBFC0D0C4u; - SCPH1001_func_1FC0CF84(cpu); -} - -void SCPH1001_func_1FC0D0CC_cont_BFC0D0E0(CPUState* cpu) { - cpu->pc = 0xBFC0D0E0u; - SCPH1001_func_1FC0D0CC(cpu); -} - -void SCPH1001_func_1FC0D0CC_cont_BFC0D0F0(CPUState* cpu) { - cpu->pc = 0xBFC0D0F0u; - SCPH1001_func_1FC0D0CC(cpu); -} - -void SCPH1001_func_1FC0D0CC_cont_BFC0D0FC(CPUState* cpu) { - cpu->pc = 0xBFC0D0FCu; - SCPH1001_func_1FC0D0CC(cpu); -} - -void SCPH1001_func_1FC0D0CC_cont_BFC0D108(CPUState* cpu) { - cpu->pc = 0xBFC0D108u; - SCPH1001_func_1FC0D0CC(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D150(CPUState* cpu) { - cpu->pc = 0xBFC0D150u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D158(CPUState* cpu) { - cpu->pc = 0xBFC0D158u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D15C(CPUState* cpu) { - cpu->pc = 0xBFC0D15Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D164(CPUState* cpu) { - cpu->pc = 0xBFC0D164u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D178(CPUState* cpu) { - cpu->pc = 0xBFC0D178u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D17C(CPUState* cpu) { - cpu->pc = 0xBFC0D17Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D1A0(CPUState* cpu) { - cpu->pc = 0xBFC0D1A0u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D1A4(CPUState* cpu) { - cpu->pc = 0xBFC0D1A4u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D1C0(CPUState* cpu) { - cpu->pc = 0xBFC0D1C0u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D1EC(CPUState* cpu) { - cpu->pc = 0xBFC0D1ECu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D1F0(CPUState* cpu) { - cpu->pc = 0xBFC0D1F0u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D20C(CPUState* cpu) { - cpu->pc = 0xBFC0D20Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D218(CPUState* cpu) { - cpu->pc = 0xBFC0D218u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D22C(CPUState* cpu) { - cpu->pc = 0xBFC0D22Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D230(CPUState* cpu) { - cpu->pc = 0xBFC0D230u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D238(CPUState* cpu) { - cpu->pc = 0xBFC0D238u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D240(CPUState* cpu) { - cpu->pc = 0xBFC0D240u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D244(CPUState* cpu) { - cpu->pc = 0xBFC0D244u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D24C(CPUState* cpu) { - cpu->pc = 0xBFC0D24Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D25C(CPUState* cpu) { - cpu->pc = 0xBFC0D25Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D26C(CPUState* cpu) { - cpu->pc = 0xBFC0D26Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D28C(CPUState* cpu) { - cpu->pc = 0xBFC0D28Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D298(CPUState* cpu) { - cpu->pc = 0xBFC0D298u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2AC(CPUState* cpu) { - cpu->pc = 0xBFC0D2ACu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2C0(CPUState* cpu) { - cpu->pc = 0xBFC0D2C0u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2CC(CPUState* cpu) { - cpu->pc = 0xBFC0D2CCu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2D4(CPUState* cpu) { - cpu->pc = 0xBFC0D2D4u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2E4(CPUState* cpu) { - cpu->pc = 0xBFC0D2E4u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D2EC(CPUState* cpu) { - cpu->pc = 0xBFC0D2ECu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D318(CPUState* cpu) { - cpu->pc = 0xBFC0D318u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D31C(CPUState* cpu) { - cpu->pc = 0xBFC0D31Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D338(CPUState* cpu) { - cpu->pc = 0xBFC0D338u; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D11C_cont_BFC0D33C(CPUState* cpu) { - cpu->pc = 0xBFC0D33Cu; - SCPH1001_func_1FC0D11C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D39C(CPUState* cpu) { - cpu->pc = 0xBFC0D39Cu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3A4(CPUState* cpu) { - cpu->pc = 0xBFC0D3A4u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3B8(CPUState* cpu) { - cpu->pc = 0xBFC0D3B8u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3BC(CPUState* cpu) { - cpu->pc = 0xBFC0D3BCu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3D8(CPUState* cpu) { - cpu->pc = 0xBFC0D3D8u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3EC(CPUState* cpu) { - cpu->pc = 0xBFC0D3ECu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D3F4(CPUState* cpu) { - cpu->pc = 0xBFC0D3F4u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D400(CPUState* cpu) { - cpu->pc = 0xBFC0D400u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D414(CPUState* cpu) { - cpu->pc = 0xBFC0D414u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D41C(CPUState* cpu) { - cpu->pc = 0xBFC0D41Cu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D444(CPUState* cpu) { - cpu->pc = 0xBFC0D444u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D448(CPUState* cpu) { - cpu->pc = 0xBFC0D448u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D464(CPUState* cpu) { - cpu->pc = 0xBFC0D464u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D468(CPUState* cpu) { - cpu->pc = 0xBFC0D468u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D470(CPUState* cpu) { - cpu->pc = 0xBFC0D470u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D498(CPUState* cpu) { - cpu->pc = 0xBFC0D498u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D49C(CPUState* cpu) { - cpu->pc = 0xBFC0D49Cu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D4B8(CPUState* cpu) { - cpu->pc = 0xBFC0D4B8u; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D34C_cont_BFC0D4BC(CPUState* cpu) { - cpu->pc = 0xBFC0D4BCu; - SCPH1001_func_1FC0D34C(cpu); -} - -void SCPH1001_func_1FC0D4CC_cont_BFC0D4E0(CPUState* cpu) { - cpu->pc = 0xBFC0D4E0u; - SCPH1001_func_1FC0D4CC(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D500(CPUState* cpu) { - cpu->pc = 0xBFC0D500u; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D51C(CPUState* cpu) { - cpu->pc = 0xBFC0D51Cu; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D534(CPUState* cpu) { - cpu->pc = 0xBFC0D534u; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D540(CPUState* cpu) { - cpu->pc = 0xBFC0D540u; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D54C(CPUState* cpu) { - cpu->pc = 0xBFC0D54Cu; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D4F0_cont_BFC0D564(CPUState* cpu) { - cpu->pc = 0xBFC0D564u; - SCPH1001_func_1FC0D4F0(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D588(CPUState* cpu) { - cpu->pc = 0xBFC0D588u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D59C(CPUState* cpu) { - cpu->pc = 0xBFC0D59Cu; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5A4(CPUState* cpu) { - cpu->pc = 0xBFC0D5A4u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5AC(CPUState* cpu) { - cpu->pc = 0xBFC0D5ACu; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5B8(CPUState* cpu) { - cpu->pc = 0xBFC0D5B8u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5C0(CPUState* cpu) { - cpu->pc = 0xBFC0D5C0u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5C8(CPUState* cpu) { - cpu->pc = 0xBFC0D5C8u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5D4(CPUState* cpu) { - cpu->pc = 0xBFC0D5D4u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5DC(CPUState* cpu) { - cpu->pc = 0xBFC0D5DCu; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D570_cont_BFC0D5F0(CPUState* cpu) { - cpu->pc = 0xBFC0D5F0u; - SCPH1001_func_1FC0D570(cpu); -} - -void SCPH1001_func_1FC0D600_cont_BFC0D628(CPUState* cpu) { - cpu->pc = 0xBFC0D628u; - SCPH1001_func_1FC0D600(cpu); -} - -void SCPH1001_func_1FC0D600_cont_BFC0D638(CPUState* cpu) { - cpu->pc = 0xBFC0D638u; - SCPH1001_func_1FC0D600(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D6B4(CPUState* cpu) { - cpu->pc = 0xBFC0D6B4u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D6E0(CPUState* cpu) { - cpu->pc = 0xBFC0D6E0u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D6E8(CPUState* cpu) { - cpu->pc = 0xBFC0D6E8u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D6F4(CPUState* cpu) { - cpu->pc = 0xBFC0D6F4u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D6FC(CPUState* cpu) { - cpu->pc = 0xBFC0D6FCu; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D704(CPUState* cpu) { - cpu->pc = 0xBFC0D704u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D70C(CPUState* cpu) { - cpu->pc = 0xBFC0D70Cu; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D688_cont_BFC0D710(CPUState* cpu) { - cpu->pc = 0xBFC0D710u; - SCPH1001_func_1FC0D688(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D73C(CPUState* cpu) { - cpu->pc = 0xBFC0D73Cu; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D744(CPUState* cpu) { - cpu->pc = 0xBFC0D744u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D764(CPUState* cpu) { - cpu->pc = 0xBFC0D764u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D76C(CPUState* cpu) { - cpu->pc = 0xBFC0D76Cu; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D774(CPUState* cpu) { - cpu->pc = 0xBFC0D774u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D77C(CPUState* cpu) { - cpu->pc = 0xBFC0D77Cu; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D780(CPUState* cpu) { - cpu->pc = 0xBFC0D780u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D788(CPUState* cpu) { - cpu->pc = 0xBFC0D788u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D790(CPUState* cpu) { - cpu->pc = 0xBFC0D790u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D798(CPUState* cpu) { - cpu->pc = 0xBFC0D798u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D7A0(CPUState* cpu) { - cpu->pc = 0xBFC0D7A0u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D7A8(CPUState* cpu) { - cpu->pc = 0xBFC0D7A8u; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D72C_cont_BFC0D7AC(CPUState* cpu) { - cpu->pc = 0xBFC0D7ACu; - SCPH1001_func_1FC0D72C(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D7CC(CPUState* cpu) { - cpu->pc = 0xBFC0D7CCu; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D7D4(CPUState* cpu) { - cpu->pc = 0xBFC0D7D4u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D7F4(CPUState* cpu) { - cpu->pc = 0xBFC0D7F4u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D7FC(CPUState* cpu) { - cpu->pc = 0xBFC0D7FCu; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D804(CPUState* cpu) { - cpu->pc = 0xBFC0D804u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D80C(CPUState* cpu) { - cpu->pc = 0xBFC0D80Cu; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D810(CPUState* cpu) { - cpu->pc = 0xBFC0D810u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D818(CPUState* cpu) { - cpu->pc = 0xBFC0D818u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D820(CPUState* cpu) { - cpu->pc = 0xBFC0D820u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D828(CPUState* cpu) { - cpu->pc = 0xBFC0D828u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D830(CPUState* cpu) { - cpu->pc = 0xBFC0D830u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D838(CPUState* cpu) { - cpu->pc = 0xBFC0D838u; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D7BC_cont_BFC0D83C(CPUState* cpu) { - cpu->pc = 0xBFC0D83Cu; - SCPH1001_func_1FC0D7BC(cpu); -} - -void SCPH1001_func_1FC0D850_cont_BFC0D864(CPUState* cpu) { - cpu->pc = 0xBFC0D864u; - SCPH1001_func_1FC0D850(cpu); -} - -void SCPH1001_func_1FC0D850_cont_BFC0D874(CPUState* cpu) { - cpu->pc = 0xBFC0D874u; - SCPH1001_func_1FC0D850(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18010(CPUState* cpu) { - cpu->pc = 0xBFC18010u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC1802C(CPUState* cpu) { - cpu->pc = 0xBFC1802Cu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18034(CPUState* cpu) { - cpu->pc = 0xBFC18034u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18060(CPUState* cpu) { - cpu->pc = 0xBFC18060u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18068(CPUState* cpu) { - cpu->pc = 0xBFC18068u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18070(CPUState* cpu) { - cpu->pc = 0xBFC18070u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18078(CPUState* cpu) { - cpu->pc = 0xBFC18078u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18088(CPUState* cpu) { - cpu->pc = 0xBFC18088u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18090(CPUState* cpu) { - cpu->pc = 0xBFC18090u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18098(CPUState* cpu) { - cpu->pc = 0xBFC18098u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180A0(CPUState* cpu) { - cpu->pc = 0xBFC180A0u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180A8(CPUState* cpu) { - cpu->pc = 0xBFC180A8u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180B0(CPUState* cpu) { - cpu->pc = 0xBFC180B0u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180B8(CPUState* cpu) { - cpu->pc = 0xBFC180B8u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180C0(CPUState* cpu) { - cpu->pc = 0xBFC180C0u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC180FC(CPUState* cpu) { - cpu->pc = 0xBFC180FCu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18104(CPUState* cpu) { - cpu->pc = 0xBFC18104u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC1810C(CPUState* cpu) { - cpu->pc = 0xBFC1810Cu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18118(CPUState* cpu) { - cpu->pc = 0xBFC18118u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18120(CPUState* cpu) { - cpu->pc = 0xBFC18120u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18128(CPUState* cpu) { - cpu->pc = 0xBFC18128u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18130(CPUState* cpu) { - cpu->pc = 0xBFC18130u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18144(CPUState* cpu) { - cpu->pc = 0xBFC18144u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18158(CPUState* cpu) { - cpu->pc = 0xBFC18158u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18160(CPUState* cpu) { - cpu->pc = 0xBFC18160u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18168(CPUState* cpu) { - cpu->pc = 0xBFC18168u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18170(CPUState* cpu) { - cpu->pc = 0xBFC18170u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18184(CPUState* cpu) { - cpu->pc = 0xBFC18184u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC1818C(CPUState* cpu) { - cpu->pc = 0xBFC1818Cu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18194(CPUState* cpu) { - cpu->pc = 0xBFC18194u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC1819C(CPUState* cpu) { - cpu->pc = 0xBFC1819Cu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181C4(CPUState* cpu) { - cpu->pc = 0xBFC181C4u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181CC(CPUState* cpu) { - cpu->pc = 0xBFC181CCu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181D4(CPUState* cpu) { - cpu->pc = 0xBFC181D4u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181DC(CPUState* cpu) { - cpu->pc = 0xBFC181DCu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181E4(CPUState* cpu) { - cpu->pc = 0xBFC181E4u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC181E8(CPUState* cpu) { - cpu->pc = 0xBFC181E8u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18208(CPUState* cpu) { - cpu->pc = 0xBFC18208u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC1821C(CPUState* cpu) { - cpu->pc = 0xBFC1821Cu; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18228(CPUState* cpu) { - cpu->pc = 0xBFC18228u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18230(CPUState* cpu) { - cpu->pc = 0xBFC18230u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18244(CPUState* cpu) { - cpu->pc = 0xBFC18244u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18000_cont_BFC18248(CPUState* cpu) { - cpu->pc = 0xBFC18248u; - SCPH1001_func_1FC18000(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1826C(CPUState* cpu) { - cpu->pc = 0xBFC1826Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1827C(CPUState* cpu) { - cpu->pc = 0xBFC1827Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18284(CPUState* cpu) { - cpu->pc = 0xBFC18284u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1828C(CPUState* cpu) { - cpu->pc = 0xBFC1828Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18298(CPUState* cpu) { - cpu->pc = 0xBFC18298u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182A8(CPUState* cpu) { - cpu->pc = 0xBFC182A8u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182B0(CPUState* cpu) { - cpu->pc = 0xBFC182B0u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182C0(CPUState* cpu) { - cpu->pc = 0xBFC182C0u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182D4(CPUState* cpu) { - cpu->pc = 0xBFC182D4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182E8(CPUState* cpu) { - cpu->pc = 0xBFC182E8u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC182FC(CPUState* cpu) { - cpu->pc = 0xBFC182FCu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18300(CPUState* cpu) { - cpu->pc = 0xBFC18300u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1831C(CPUState* cpu) { - cpu->pc = 0xBFC1831Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18330(CPUState* cpu) { - cpu->pc = 0xBFC18330u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18344(CPUState* cpu) { - cpu->pc = 0xBFC18344u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18360(CPUState* cpu) { - cpu->pc = 0xBFC18360u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18374(CPUState* cpu) { - cpu->pc = 0xBFC18374u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1837C(CPUState* cpu) { - cpu->pc = 0xBFC1837Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18384(CPUState* cpu) { - cpu->pc = 0xBFC18384u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183A0(CPUState* cpu) { - cpu->pc = 0xBFC183A0u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183BC(CPUState* cpu) { - cpu->pc = 0xBFC183BCu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183D4(CPUState* cpu) { - cpu->pc = 0xBFC183D4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183DC(CPUState* cpu) { - cpu->pc = 0xBFC183DCu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183E4(CPUState* cpu) { - cpu->pc = 0xBFC183E4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183EC(CPUState* cpu) { - cpu->pc = 0xBFC183ECu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183F4(CPUState* cpu) { - cpu->pc = 0xBFC183F4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC183FC(CPUState* cpu) { - cpu->pc = 0xBFC183FCu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18404(CPUState* cpu) { - cpu->pc = 0xBFC18404u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18418(CPUState* cpu) { - cpu->pc = 0xBFC18418u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18440(CPUState* cpu) { - cpu->pc = 0xBFC18440u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18454(CPUState* cpu) { - cpu->pc = 0xBFC18454u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1845C(CPUState* cpu) { - cpu->pc = 0xBFC1845Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18464(CPUState* cpu) { - cpu->pc = 0xBFC18464u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18474(CPUState* cpu) { - cpu->pc = 0xBFC18474u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18484(CPUState* cpu) { - cpu->pc = 0xBFC18484u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18494(CPUState* cpu) { - cpu->pc = 0xBFC18494u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184A4(CPUState* cpu) { - cpu->pc = 0xBFC184A4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184B4(CPUState* cpu) { - cpu->pc = 0xBFC184B4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184C8(CPUState* cpu) { - cpu->pc = 0xBFC184C8u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184D0(CPUState* cpu) { - cpu->pc = 0xBFC184D0u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184E4(CPUState* cpu) { - cpu->pc = 0xBFC184E4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184EC(CPUState* cpu) { - cpu->pc = 0xBFC184ECu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184F4(CPUState* cpu) { - cpu->pc = 0xBFC184F4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC184FC(CPUState* cpu) { - cpu->pc = 0xBFC184FCu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1850C(CPUState* cpu) { - cpu->pc = 0xBFC1850Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1851C(CPUState* cpu) { - cpu->pc = 0xBFC1851Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1852C(CPUState* cpu) { - cpu->pc = 0xBFC1852Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18534(CPUState* cpu) { - cpu->pc = 0xBFC18534u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18548(CPUState* cpu) { - cpu->pc = 0xBFC18548u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18560(CPUState* cpu) { - cpu->pc = 0xBFC18560u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18568(CPUState* cpu) { - cpu->pc = 0xBFC18568u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18578(CPUState* cpu) { - cpu->pc = 0xBFC18578u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1858C(CPUState* cpu) { - cpu->pc = 0xBFC1858Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1859C(CPUState* cpu) { - cpu->pc = 0xBFC1859Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC185C8(CPUState* cpu) { - cpu->pc = 0xBFC185C8u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC185F4(CPUState* cpu) { - cpu->pc = 0xBFC185F4u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18600(CPUState* cpu) { - cpu->pc = 0xBFC18600u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18618(CPUState* cpu) { - cpu->pc = 0xBFC18618u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18628(CPUState* cpu) { - cpu->pc = 0xBFC18628u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18638(CPUState* cpu) { - cpu->pc = 0xBFC18638u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18640(CPUState* cpu) { - cpu->pc = 0xBFC18640u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18648(CPUState* cpu) { - cpu->pc = 0xBFC18648u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC1865C(CPUState* cpu) { - cpu->pc = 0xBFC1865Cu; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18254_cont_BFC18670(CPUState* cpu) { - cpu->pc = 0xBFC18670u; - SCPH1001_func_1FC18254(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186A0(CPUState* cpu) { - cpu->pc = 0xBFC186A0u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186A8(CPUState* cpu) { - cpu->pc = 0xBFC186A8u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186B0(CPUState* cpu) { - cpu->pc = 0xBFC186B0u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186C4(CPUState* cpu) { - cpu->pc = 0xBFC186C4u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186D8(CPUState* cpu) { - cpu->pc = 0xBFC186D8u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186E0(CPUState* cpu) { - cpu->pc = 0xBFC186E0u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186E8(CPUState* cpu) { - cpu->pc = 0xBFC186E8u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186F0(CPUState* cpu) { - cpu->pc = 0xBFC186F0u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC186F8(CPUState* cpu) { - cpu->pc = 0xBFC186F8u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18700(CPUState* cpu) { - cpu->pc = 0xBFC18700u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18708(CPUState* cpu) { - cpu->pc = 0xBFC18708u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18710(CPUState* cpu) { - cpu->pc = 0xBFC18710u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18718(CPUState* cpu) { - cpu->pc = 0xBFC18718u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18720(CPUState* cpu) { - cpu->pc = 0xBFC18720u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18728(CPUState* cpu) { - cpu->pc = 0xBFC18728u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18730(CPUState* cpu) { - cpu->pc = 0xBFC18730u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18738(CPUState* cpu) { - cpu->pc = 0xBFC18738u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18740(CPUState* cpu) { - cpu->pc = 0xBFC18740u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC1874C(CPUState* cpu) { - cpu->pc = 0xBFC1874Cu; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18754(CPUState* cpu) { - cpu->pc = 0xBFC18754u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC1875C(CPUState* cpu) { - cpu->pc = 0xBFC1875Cu; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18764(CPUState* cpu) { - cpu->pc = 0xBFC18764u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC1876C(CPUState* cpu) { - cpu->pc = 0xBFC1876Cu; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18774(CPUState* cpu) { - cpu->pc = 0xBFC18774u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18684_cont_BFC18778(CPUState* cpu) { - cpu->pc = 0xBFC18778u; - SCPH1001_func_1FC18684(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC187B8(CPUState* cpu) { - cpu->pc = 0xBFC187B8u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC187C8(CPUState* cpu) { - cpu->pc = 0xBFC187C8u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC187D4(CPUState* cpu) { - cpu->pc = 0xBFC187D4u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC187E4(CPUState* cpu) { - cpu->pc = 0xBFC187E4u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC187F8(CPUState* cpu) { - cpu->pc = 0xBFC187F8u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18808(CPUState* cpu) { - cpu->pc = 0xBFC18808u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18818(CPUState* cpu) { - cpu->pc = 0xBFC18818u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18828(CPUState* cpu) { - cpu->pc = 0xBFC18828u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC1883C(CPUState* cpu) { - cpu->pc = 0xBFC1883Cu; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18848(CPUState* cpu) { - cpu->pc = 0xBFC18848u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18854(CPUState* cpu) { - cpu->pc = 0xBFC18854u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC1885C(CPUState* cpu) { - cpu->pc = 0xBFC1885Cu; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC1886C(CPUState* cpu) { - cpu->pc = 0xBFC1886Cu; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC1887C(CPUState* cpu) { - cpu->pc = 0xBFC1887Cu; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18884(CPUState* cpu) { - cpu->pc = 0xBFC18884u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC18898(CPUState* cpu) { - cpu->pc = 0xBFC18898u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC188A0(CPUState* cpu) { - cpu->pc = 0xBFC188A0u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC18798_cont_BFC188A4(CPUState* cpu) { - cpu->pc = 0xBFC188A4u; - SCPH1001_func_1FC18798(cpu); -} - -void SCPH1001_func_1FC188B4_cont_BFC188C0(CPUState* cpu) { - cpu->pc = 0xBFC188C0u; - SCPH1001_func_1FC188B4(cpu); -} - -void SCPH1001_func_1FC188B4_cont_BFC188DC(CPUState* cpu) { - cpu->pc = 0xBFC188DCu; - SCPH1001_func_1FC188B4(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18900(CPUState* cpu) { - cpu->pc = 0xBFC18900u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC1891C(CPUState* cpu) { - cpu->pc = 0xBFC1891Cu; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18930(CPUState* cpu) { - cpu->pc = 0xBFC18930u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18940(CPUState* cpu) { - cpu->pc = 0xBFC18940u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18948(CPUState* cpu) { - cpu->pc = 0xBFC18948u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18958(CPUState* cpu) { - cpu->pc = 0xBFC18958u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18960(CPUState* cpu) { - cpu->pc = 0xBFC18960u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18968(CPUState* cpu) { - cpu->pc = 0xBFC18968u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18974(CPUState* cpu) { - cpu->pc = 0xBFC18974u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC188F0_cont_BFC18978(CPUState* cpu) { - cpu->pc = 0xBFC18978u; - SCPH1001_func_1FC188F0(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC189A4(CPUState* cpu) { - cpu->pc = 0xBFC189A4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC189B0(CPUState* cpu) { - cpu->pc = 0xBFC189B0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC189D0(CPUState* cpu) { - cpu->pc = 0xBFC189D0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC189E4(CPUState* cpu) { - cpu->pc = 0xBFC189E4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC189F8(CPUState* cpu) { - cpu->pc = 0xBFC189F8u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A00(CPUState* cpu) { - cpu->pc = 0xBFC18A00u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A14(CPUState* cpu) { - cpu->pc = 0xBFC18A14u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A28(CPUState* cpu) { - cpu->pc = 0xBFC18A28u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A3C(CPUState* cpu) { - cpu->pc = 0xBFC18A3Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A44(CPUState* cpu) { - cpu->pc = 0xBFC18A44u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A5C(CPUState* cpu) { - cpu->pc = 0xBFC18A5Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A70(CPUState* cpu) { - cpu->pc = 0xBFC18A70u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A7C(CPUState* cpu) { - cpu->pc = 0xBFC18A7Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18A90(CPUState* cpu) { - cpu->pc = 0xBFC18A90u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18AA4(CPUState* cpu) { - cpu->pc = 0xBFC18AA4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18AB8(CPUState* cpu) { - cpu->pc = 0xBFC18AB8u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18AC0(CPUState* cpu) { - cpu->pc = 0xBFC18AC0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18AC8(CPUState* cpu) { - cpu->pc = 0xBFC18AC8u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18ADC(CPUState* cpu) { - cpu->pc = 0xBFC18ADCu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18AF0(CPUState* cpu) { - cpu->pc = 0xBFC18AF0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B04(CPUState* cpu) { - cpu->pc = 0xBFC18B04u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B0C(CPUState* cpu) { - cpu->pc = 0xBFC18B0Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B14(CPUState* cpu) { - cpu->pc = 0xBFC18B14u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B1C(CPUState* cpu) { - cpu->pc = 0xBFC18B1Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B30(CPUState* cpu) { - cpu->pc = 0xBFC18B30u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B38(CPUState* cpu) { - cpu->pc = 0xBFC18B38u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B40(CPUState* cpu) { - cpu->pc = 0xBFC18B40u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B48(CPUState* cpu) { - cpu->pc = 0xBFC18B48u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B50(CPUState* cpu) { - cpu->pc = 0xBFC18B50u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B58(CPUState* cpu) { - cpu->pc = 0xBFC18B58u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B7C(CPUState* cpu) { - cpu->pc = 0xBFC18B7Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B84(CPUState* cpu) { - cpu->pc = 0xBFC18B84u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B8C(CPUState* cpu) { - cpu->pc = 0xBFC18B8Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18B94(CPUState* cpu) { - cpu->pc = 0xBFC18B94u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18BA4(CPUState* cpu) { - cpu->pc = 0xBFC18BA4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18BB8(CPUState* cpu) { - cpu->pc = 0xBFC18BB8u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18BCC(CPUState* cpu) { - cpu->pc = 0xBFC18BCCu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18BDC(CPUState* cpu) { - cpu->pc = 0xBFC18BDCu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18BF0(CPUState* cpu) { - cpu->pc = 0xBFC18BF0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C04(CPUState* cpu) { - cpu->pc = 0xBFC18C04u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C0C(CPUState* cpu) { - cpu->pc = 0xBFC18C0Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C14(CPUState* cpu) { - cpu->pc = 0xBFC18C14u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C2C(CPUState* cpu) { - cpu->pc = 0xBFC18C2Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C3C(CPUState* cpu) { - cpu->pc = 0xBFC18C3Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C50(CPUState* cpu) { - cpu->pc = 0xBFC18C50u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C58(CPUState* cpu) { - cpu->pc = 0xBFC18C58u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C60(CPUState* cpu) { - cpu->pc = 0xBFC18C60u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C6C(CPUState* cpu) { - cpu->pc = 0xBFC18C6Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C7C(CPUState* cpu) { - cpu->pc = 0xBFC18C7Cu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18C90(CPUState* cpu) { - cpu->pc = 0xBFC18C90u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18CA4(CPUState* cpu) { - cpu->pc = 0xBFC18CA4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18CB8(CPUState* cpu) { - cpu->pc = 0xBFC18CB8u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18CCC(CPUState* cpu) { - cpu->pc = 0xBFC18CCCu; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18CE0(CPUState* cpu) { - cpu->pc = 0xBFC18CE0u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18CF4(CPUState* cpu) { - cpu->pc = 0xBFC18CF4u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18D00(CPUState* cpu) { - cpu->pc = 0xBFC18D00u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18990_cont_BFC18D04(CPUState* cpu) { - cpu->pc = 0xBFC18D04u; - SCPH1001_func_1FC18990(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D2C(CPUState* cpu) { - cpu->pc = 0xBFC18D2Cu; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D34(CPUState* cpu) { - cpu->pc = 0xBFC18D34u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D44(CPUState* cpu) { - cpu->pc = 0xBFC18D44u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D54(CPUState* cpu) { - cpu->pc = 0xBFC18D54u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D5C(CPUState* cpu) { - cpu->pc = 0xBFC18D5Cu; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D78(CPUState* cpu) { - cpu->pc = 0xBFC18D78u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18D98(CPUState* cpu) { - cpu->pc = 0xBFC18D98u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18DB8(CPUState* cpu) { - cpu->pc = 0xBFC18DB8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18DD8(CPUState* cpu) { - cpu->pc = 0xBFC18DD8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18DEC(CPUState* cpu) { - cpu->pc = 0xBFC18DECu; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18DF4(CPUState* cpu) { - cpu->pc = 0xBFC18DF4u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E20(CPUState* cpu) { - cpu->pc = 0xBFC18E20u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E3C(CPUState* cpu) { - cpu->pc = 0xBFC18E3Cu; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E48(CPUState* cpu) { - cpu->pc = 0xBFC18E48u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E54(CPUState* cpu) { - cpu->pc = 0xBFC18E54u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E60(CPUState* cpu) { - cpu->pc = 0xBFC18E60u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E78(CPUState* cpu) { - cpu->pc = 0xBFC18E78u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18E90(CPUState* cpu) { - cpu->pc = 0xBFC18E90u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18EA8(CPUState* cpu) { - cpu->pc = 0xBFC18EA8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18EC0(CPUState* cpu) { - cpu->pc = 0xBFC18EC0u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18ED8(CPUState* cpu) { - cpu->pc = 0xBFC18ED8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18EF0(CPUState* cpu) { - cpu->pc = 0xBFC18EF0u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18F48(CPUState* cpu) { - cpu->pc = 0xBFC18F48u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC18FC8(CPUState* cpu) { - cpu->pc = 0xBFC18FC8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19050(CPUState* cpu) { - cpu->pc = 0xBFC19050u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC190D0(CPUState* cpu) { - cpu->pc = 0xBFC190D0u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19150(CPUState* cpu) { - cpu->pc = 0xBFC19150u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC191D0(CPUState* cpu) { - cpu->pc = 0xBFC191D0u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19250(CPUState* cpu) { - cpu->pc = 0xBFC19250u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19280(CPUState* cpu) { - cpu->pc = 0xBFC19280u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19288(CPUState* cpu) { - cpu->pc = 0xBFC19288u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC19294(CPUState* cpu) { - cpu->pc = 0xBFC19294u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC1929C(CPUState* cpu) { - cpu->pc = 0xBFC1929Cu; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC192A4(CPUState* cpu) { - cpu->pc = 0xBFC192A4u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC192B0(CPUState* cpu) { - cpu->pc = 0xBFC192B0u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC192B8(CPUState* cpu) { - cpu->pc = 0xBFC192B8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC192C8(CPUState* cpu) { - cpu->pc = 0xBFC192C8u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC18D10_cont_BFC192D4(CPUState* cpu) { - cpu->pc = 0xBFC192D4u; - SCPH1001_func_1FC18D10(cpu); -} - -void SCPH1001_func_1FC192E4_cont_BFC192FC(CPUState* cpu) { - cpu->pc = 0xBFC192FCu; - SCPH1001_func_1FC192E4(cpu); -} - -void SCPH1001_func_1FC192E4_cont_BFC193A4(CPUState* cpu) { - cpu->pc = 0xBFC193A4u; - SCPH1001_func_1FC192E4(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC193E8(CPUState* cpu) { - cpu->pc = 0xBFC193E8u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC193FC(CPUState* cpu) { - cpu->pc = 0xBFC193FCu; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19408(CPUState* cpu) { - cpu->pc = 0xBFC19408u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19418(CPUState* cpu) { - cpu->pc = 0xBFC19418u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC1942C(CPUState* cpu) { - cpu->pc = 0xBFC1942Cu; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19440(CPUState* cpu) { - cpu->pc = 0xBFC19440u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19454(CPUState* cpu) { - cpu->pc = 0xBFC19454u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19468(CPUState* cpu) { - cpu->pc = 0xBFC19468u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19488(CPUState* cpu) { - cpu->pc = 0xBFC19488u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC194C0(CPUState* cpu) { - cpu->pc = 0xBFC194C0u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC194F0(CPUState* cpu) { - cpu->pc = 0xBFC194F0u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC19508(CPUState* cpu) { - cpu->pc = 0xBFC19508u; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC193C0_cont_BFC1951C(CPUState* cpu) { - cpu->pc = 0xBFC1951Cu; - SCPH1001_func_1FC193C0(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC19544(CPUState* cpu) { - cpu->pc = 0xBFC19544u; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC19558(CPUState* cpu) { - cpu->pc = 0xBFC19558u; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC1957C(CPUState* cpu) { - cpu->pc = 0xBFC1957Cu; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC19598(CPUState* cpu) { - cpu->pc = 0xBFC19598u; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC195D8(CPUState* cpu) { - cpu->pc = 0xBFC195D8u; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC1952C_cont_BFC19614(CPUState* cpu) { - cpu->pc = 0xBFC19614u; - SCPH1001_func_1FC1952C(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19650(CPUState* cpu) { - cpu->pc = 0xBFC19650u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19658(CPUState* cpu) { - cpu->pc = 0xBFC19658u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19660(CPUState* cpu) { - cpu->pc = 0xBFC19660u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19684(CPUState* cpu) { - cpu->pc = 0xBFC19684u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19688(CPUState* cpu) { - cpu->pc = 0xBFC19688u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC19698(CPUState* cpu) { - cpu->pc = 0xBFC19698u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC1969C(CPUState* cpu) { - cpu->pc = 0xBFC1969Cu; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC196A8(CPUState* cpu) { - cpu->pc = 0xBFC196A8u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC19630_cont_BFC196B8(CPUState* cpu) { - cpu->pc = 0xBFC196B8u; - SCPH1001_func_1FC19630(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC196F4(CPUState* cpu) { - cpu->pc = 0xBFC196F4u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19704(CPUState* cpu) { - cpu->pc = 0xBFC19704u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1970C(CPUState* cpu) { - cpu->pc = 0xBFC1970Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1972C(CPUState* cpu) { - cpu->pc = 0xBFC1972Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1973C(CPUState* cpu) { - cpu->pc = 0xBFC1973Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19754(CPUState* cpu) { - cpu->pc = 0xBFC19754u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19760(CPUState* cpu) { - cpu->pc = 0xBFC19760u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19770(CPUState* cpu) { - cpu->pc = 0xBFC19770u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19780(CPUState* cpu) { - cpu->pc = 0xBFC19780u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1979C(CPUState* cpu) { - cpu->pc = 0xBFC1979Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197AC(CPUState* cpu) { - cpu->pc = 0xBFC197ACu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197BC(CPUState* cpu) { - cpu->pc = 0xBFC197BCu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197C8(CPUState* cpu) { - cpu->pc = 0xBFC197C8u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197CC(CPUState* cpu) { - cpu->pc = 0xBFC197CCu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197D8(CPUState* cpu) { - cpu->pc = 0xBFC197D8u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197E4(CPUState* cpu) { - cpu->pc = 0xBFC197E4u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC197F0(CPUState* cpu) { - cpu->pc = 0xBFC197F0u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19834(CPUState* cpu) { - cpu->pc = 0xBFC19834u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1983C(CPUState* cpu) { - cpu->pc = 0xBFC1983Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19840(CPUState* cpu) { - cpu->pc = 0xBFC19840u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19848(CPUState* cpu) { - cpu->pc = 0xBFC19848u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1993C(CPUState* cpu) { - cpu->pc = 0xBFC1993Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19944(CPUState* cpu) { - cpu->pc = 0xBFC19944u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19958(CPUState* cpu) { - cpu->pc = 0xBFC19958u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19960(CPUState* cpu) { - cpu->pc = 0xBFC19960u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19968(CPUState* cpu) { - cpu->pc = 0xBFC19968u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19970(CPUState* cpu) { - cpu->pc = 0xBFC19970u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19984(CPUState* cpu) { - cpu->pc = 0xBFC19984u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19998(CPUState* cpu) { - cpu->pc = 0xBFC19998u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC1999C(CPUState* cpu) { - cpu->pc = 0xBFC1999Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199C4(CPUState* cpu) { - cpu->pc = 0xBFC199C4u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199D8(CPUState* cpu) { - cpu->pc = 0xBFC199D8u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199DC(CPUState* cpu) { - cpu->pc = 0xBFC199DCu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199E4(CPUState* cpu) { - cpu->pc = 0xBFC199E4u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199E8(CPUState* cpu) { - cpu->pc = 0xBFC199E8u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC199FC(CPUState* cpu) { - cpu->pc = 0xBFC199FCu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19A18(CPUState* cpu) { - cpu->pc = 0xBFC19A18u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19A2C(CPUState* cpu) { - cpu->pc = 0xBFC19A2Cu; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19A38(CPUState* cpu) { - cpu->pc = 0xBFC19A38u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19A44(CPUState* cpu) { - cpu->pc = 0xBFC19A44u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC196D4_cont_BFC19A48(CPUState* cpu) { - cpu->pc = 0xBFC19A48u; - SCPH1001_func_1FC196D4(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19A74(CPUState* cpu) { - cpu->pc = 0xBFC19A74u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AAC(CPUState* cpu) { - cpu->pc = 0xBFC19AACu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AB4(CPUState* cpu) { - cpu->pc = 0xBFC19AB4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AC4(CPUState* cpu) { - cpu->pc = 0xBFC19AC4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AD8(CPUState* cpu) { - cpu->pc = 0xBFC19AD8u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AE0(CPUState* cpu) { - cpu->pc = 0xBFC19AE0u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AE4(CPUState* cpu) { - cpu->pc = 0xBFC19AE4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19AF0(CPUState* cpu) { - cpu->pc = 0xBFC19AF0u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B04(CPUState* cpu) { - cpu->pc = 0xBFC19B04u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B0C(CPUState* cpu) { - cpu->pc = 0xBFC19B0Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B10(CPUState* cpu) { - cpu->pc = 0xBFC19B10u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B1C(CPUState* cpu) { - cpu->pc = 0xBFC19B1Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B30(CPUState* cpu) { - cpu->pc = 0xBFC19B30u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B38(CPUState* cpu) { - cpu->pc = 0xBFC19B38u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B3C(CPUState* cpu) { - cpu->pc = 0xBFC19B3Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B48(CPUState* cpu) { - cpu->pc = 0xBFC19B48u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B5C(CPUState* cpu) { - cpu->pc = 0xBFC19B5Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B60(CPUState* cpu) { - cpu->pc = 0xBFC19B60u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B90(CPUState* cpu) { - cpu->pc = 0xBFC19B90u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19B94(CPUState* cpu) { - cpu->pc = 0xBFC19B94u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19BEC(CPUState* cpu) { - cpu->pc = 0xBFC19BECu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19BF0(CPUState* cpu) { - cpu->pc = 0xBFC19BF0u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19C30(CPUState* cpu) { - cpu->pc = 0xBFC19C30u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19C54(CPUState* cpu) { - cpu->pc = 0xBFC19C54u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19C74(CPUState* cpu) { - cpu->pc = 0xBFC19C74u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19C80(CPUState* cpu) { - cpu->pc = 0xBFC19C80u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CB4(CPUState* cpu) { - cpu->pc = 0xBFC19CB4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CC0(CPUState* cpu) { - cpu->pc = 0xBFC19CC0u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CD4(CPUState* cpu) { - cpu->pc = 0xBFC19CD4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CE4(CPUState* cpu) { - cpu->pc = 0xBFC19CE4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CE8(CPUState* cpu) { - cpu->pc = 0xBFC19CE8u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CF4(CPUState* cpu) { - cpu->pc = 0xBFC19CF4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19CFC(CPUState* cpu) { - cpu->pc = 0xBFC19CFCu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D04(CPUState* cpu) { - cpu->pc = 0xBFC19D04u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D0C(CPUState* cpu) { - cpu->pc = 0xBFC19D0Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D18(CPUState* cpu) { - cpu->pc = 0xBFC19D18u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D20(CPUState* cpu) { - cpu->pc = 0xBFC19D20u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D28(CPUState* cpu) { - cpu->pc = 0xBFC19D28u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D3C(CPUState* cpu) { - cpu->pc = 0xBFC19D3Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D54(CPUState* cpu) { - cpu->pc = 0xBFC19D54u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D5C(CPUState* cpu) { - cpu->pc = 0xBFC19D5Cu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D74(CPUState* cpu) { - cpu->pc = 0xBFC19D74u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19D94(CPUState* cpu) { - cpu->pc = 0xBFC19D94u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19DBC(CPUState* cpu) { - cpu->pc = 0xBFC19DBCu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19DC8(CPUState* cpu) { - cpu->pc = 0xBFC19DC8u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19DD4(CPUState* cpu) { - cpu->pc = 0xBFC19DD4u; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19A58_cont_BFC19DDC(CPUState* cpu) { - cpu->pc = 0xBFC19DDCu; - SCPH1001_func_1FC19A58(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E24(CPUState* cpu) { - cpu->pc = 0xBFC19E24u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E4C(CPUState* cpu) { - cpu->pc = 0xBFC19E4Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E5C(CPUState* cpu) { - cpu->pc = 0xBFC19E5Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E6C(CPUState* cpu) { - cpu->pc = 0xBFC19E6Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E74(CPUState* cpu) { - cpu->pc = 0xBFC19E74u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E78(CPUState* cpu) { - cpu->pc = 0xBFC19E78u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E90(CPUState* cpu) { - cpu->pc = 0xBFC19E90u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19E94(CPUState* cpu) { - cpu->pc = 0xBFC19E94u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EA0(CPUState* cpu) { - cpu->pc = 0xBFC19EA0u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EAC(CPUState* cpu) { - cpu->pc = 0xBFC19EACu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EB8(CPUState* cpu) { - cpu->pc = 0xBFC19EB8u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EC8(CPUState* cpu) { - cpu->pc = 0xBFC19EC8u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19ED4(CPUState* cpu) { - cpu->pc = 0xBFC19ED4u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EDC(CPUState* cpu) { - cpu->pc = 0xBFC19EDCu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EE4(CPUState* cpu) { - cpu->pc = 0xBFC19EE4u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19EF4(CPUState* cpu) { - cpu->pc = 0xBFC19EF4u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F04(CPUState* cpu) { - cpu->pc = 0xBFC19F04u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F10(CPUState* cpu) { - cpu->pc = 0xBFC19F10u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F20(CPUState* cpu) { - cpu->pc = 0xBFC19F20u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F28(CPUState* cpu) { - cpu->pc = 0xBFC19F28u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F30(CPUState* cpu) { - cpu->pc = 0xBFC19F30u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F4C(CPUState* cpu) { - cpu->pc = 0xBFC19F4Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F50(CPUState* cpu) { - cpu->pc = 0xBFC19F50u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F5C(CPUState* cpu) { - cpu->pc = 0xBFC19F5Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F74(CPUState* cpu) { - cpu->pc = 0xBFC19F74u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19F8C(CPUState* cpu) { - cpu->pc = 0xBFC19F8Cu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19FA4(CPUState* cpu) { - cpu->pc = 0xBFC19FA4u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19FAC(CPUState* cpu) { - cpu->pc = 0xBFC19FACu; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19DF4_cont_BFC19FB0(CPUState* cpu) { - cpu->pc = 0xBFC19FB0u; - SCPH1001_func_1FC19DF4(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC19FE8(CPUState* cpu) { - cpu->pc = 0xBFC19FE8u; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A00C(CPUState* cpu) { - cpu->pc = 0xBFC1A00Cu; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A014(CPUState* cpu) { - cpu->pc = 0xBFC1A014u; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A01C(CPUState* cpu) { - cpu->pc = 0xBFC1A01Cu; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A024(CPUState* cpu) { - cpu->pc = 0xBFC1A024u; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A02C(CPUState* cpu) { - cpu->pc = 0xBFC1A02Cu; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A034(CPUState* cpu) { - cpu->pc = 0xBFC1A034u; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC19FD0_cont_BFC1A040(CPUState* cpu) { - cpu->pc = 0xBFC1A040u; - SCPH1001_func_1FC19FD0(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A068(CPUState* cpu) { - cpu->pc = 0xBFC1A068u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A070(CPUState* cpu) { - cpu->pc = 0xBFC1A070u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A084(CPUState* cpu) { - cpu->pc = 0xBFC1A084u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A098(CPUState* cpu) { - cpu->pc = 0xBFC1A098u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A0AC(CPUState* cpu) { - cpu->pc = 0xBFC1A0ACu; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A0B4(CPUState* cpu) { - cpu->pc = 0xBFC1A0B4u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A0BC(CPUState* cpu) { - cpu->pc = 0xBFC1A0BCu; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A0D4(CPUState* cpu) { - cpu->pc = 0xBFC1A0D4u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A0F4(CPUState* cpu) { - cpu->pc = 0xBFC1A0F4u; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A050_cont_BFC1A10C(CPUState* cpu) { - cpu->pc = 0xBFC1A10Cu; - SCPH1001_func_1FC1A050(cpu); -} - -void SCPH1001_func_1FC1A11C_cont_BFC1A134(CPUState* cpu) { - cpu->pc = 0xBFC1A134u; - SCPH1001_func_1FC1A11C(cpu); -} - -void SCPH1001_func_1FC1A11C_cont_BFC1A14C(CPUState* cpu) { - cpu->pc = 0xBFC1A14Cu; - SCPH1001_func_1FC1A11C(cpu); -} - -void SCPH1001_func_1FC1A15C_cont_BFC1A16C(CPUState* cpu) { - cpu->pc = 0xBFC1A16Cu; - SCPH1001_func_1FC1A15C(cpu); -} - -void SCPH1001_func_1FC1A17C_cont_BFC1A18C(CPUState* cpu) { - cpu->pc = 0xBFC1A18Cu; - SCPH1001_func_1FC1A17C(cpu); -} - -void SCPH1001_func_1FC1A19C_cont_BFC1A1AC(CPUState* cpu) { - cpu->pc = 0xBFC1A1ACu; - SCPH1001_func_1FC1A19C(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A1D4(CPUState* cpu) { - cpu->pc = 0xBFC1A1D4u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A1DC(CPUState* cpu) { - cpu->pc = 0xBFC1A1DCu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A1E4(CPUState* cpu) { - cpu->pc = 0xBFC1A1E4u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A1F0(CPUState* cpu) { - cpu->pc = 0xBFC1A1F0u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A1F8(CPUState* cpu) { - cpu->pc = 0xBFC1A1F8u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A204(CPUState* cpu) { - cpu->pc = 0xBFC1A204u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A20C(CPUState* cpu) { - cpu->pc = 0xBFC1A20Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A218(CPUState* cpu) { - cpu->pc = 0xBFC1A218u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A220(CPUState* cpu) { - cpu->pc = 0xBFC1A220u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A22C(CPUState* cpu) { - cpu->pc = 0xBFC1A22Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A234(CPUState* cpu) { - cpu->pc = 0xBFC1A234u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A240(CPUState* cpu) { - cpu->pc = 0xBFC1A240u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A248(CPUState* cpu) { - cpu->pc = 0xBFC1A248u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A254(CPUState* cpu) { - cpu->pc = 0xBFC1A254u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A25C(CPUState* cpu) { - cpu->pc = 0xBFC1A25Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A268(CPUState* cpu) { - cpu->pc = 0xBFC1A268u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A270(CPUState* cpu) { - cpu->pc = 0xBFC1A270u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A27C(CPUState* cpu) { - cpu->pc = 0xBFC1A27Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A284(CPUState* cpu) { - cpu->pc = 0xBFC1A284u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A290(CPUState* cpu) { - cpu->pc = 0xBFC1A290u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2B8(CPUState* cpu) { - cpu->pc = 0xBFC1A2B8u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2C0(CPUState* cpu) { - cpu->pc = 0xBFC1A2C0u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2CC(CPUState* cpu) { - cpu->pc = 0xBFC1A2CCu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2D4(CPUState* cpu) { - cpu->pc = 0xBFC1A2D4u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2E0(CPUState* cpu) { - cpu->pc = 0xBFC1A2E0u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2E8(CPUState* cpu) { - cpu->pc = 0xBFC1A2E8u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2F0(CPUState* cpu) { - cpu->pc = 0xBFC1A2F0u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A2F8(CPUState* cpu) { - cpu->pc = 0xBFC1A2F8u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A300(CPUState* cpu) { - cpu->pc = 0xBFC1A300u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A308(CPUState* cpu) { - cpu->pc = 0xBFC1A308u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A310(CPUState* cpu) { - cpu->pc = 0xBFC1A310u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A318(CPUState* cpu) { - cpu->pc = 0xBFC1A318u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A320(CPUState* cpu) { - cpu->pc = 0xBFC1A320u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A328(CPUState* cpu) { - cpu->pc = 0xBFC1A328u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A33C(CPUState* cpu) { - cpu->pc = 0xBFC1A33Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A344(CPUState* cpu) { - cpu->pc = 0xBFC1A344u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A348(CPUState* cpu) { - cpu->pc = 0xBFC1A348u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A34C(CPUState* cpu) { - cpu->pc = 0xBFC1A34Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A354(CPUState* cpu) { - cpu->pc = 0xBFC1A354u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A358(CPUState* cpu) { - cpu->pc = 0xBFC1A358u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A360(CPUState* cpu) { - cpu->pc = 0xBFC1A360u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A368(CPUState* cpu) { - cpu->pc = 0xBFC1A368u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A378(CPUState* cpu) { - cpu->pc = 0xBFC1A378u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A380(CPUState* cpu) { - cpu->pc = 0xBFC1A380u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A38C(CPUState* cpu) { - cpu->pc = 0xBFC1A38Cu; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A394(CPUState* cpu) { - cpu->pc = 0xBFC1A394u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A3A0(CPUState* cpu) { - cpu->pc = 0xBFC1A3A0u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A1BC_cont_BFC1A3A8(CPUState* cpu) { - cpu->pc = 0xBFC1A3A8u; - SCPH1001_func_1FC1A1BC(cpu); -} - -void SCPH1001_func_1FC1A3B8_cont_BFC1A400(CPUState* cpu) { - cpu->pc = 0xBFC1A400u; - SCPH1001_func_1FC1A3B8(cpu); -} - -void SCPH1001_func_1FC1A3B8_cont_BFC1A40C(CPUState* cpu) { - cpu->pc = 0xBFC1A40Cu; - SCPH1001_func_1FC1A3B8(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A450(CPUState* cpu) { - cpu->pc = 0xBFC1A450u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A45C(CPUState* cpu) { - cpu->pc = 0xBFC1A45Cu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A460(CPUState* cpu) { - cpu->pc = 0xBFC1A460u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A468(CPUState* cpu) { - cpu->pc = 0xBFC1A468u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A470(CPUState* cpu) { - cpu->pc = 0xBFC1A470u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A484(CPUState* cpu) { - cpu->pc = 0xBFC1A484u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A48C(CPUState* cpu) { - cpu->pc = 0xBFC1A48Cu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A49C(CPUState* cpu) { - cpu->pc = 0xBFC1A49Cu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4AC(CPUState* cpu) { - cpu->pc = 0xBFC1A4ACu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4B4(CPUState* cpu) { - cpu->pc = 0xBFC1A4B4u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4C8(CPUState* cpu) { - cpu->pc = 0xBFC1A4C8u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4D4(CPUState* cpu) { - cpu->pc = 0xBFC1A4D4u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4E4(CPUState* cpu) { - cpu->pc = 0xBFC1A4E4u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A4FC(CPUState* cpu) { - cpu->pc = 0xBFC1A4FCu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A504(CPUState* cpu) { - cpu->pc = 0xBFC1A504u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A50C(CPUState* cpu) { - cpu->pc = 0xBFC1A50Cu; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A520(CPUState* cpu) { - cpu->pc = 0xBFC1A520u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A528(CPUState* cpu) { - cpu->pc = 0xBFC1A528u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A538(CPUState* cpu) { - cpu->pc = 0xBFC1A538u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A548(CPUState* cpu) { - cpu->pc = 0xBFC1A548u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A550(CPUState* cpu) { - cpu->pc = 0xBFC1A550u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A564(CPUState* cpu) { - cpu->pc = 0xBFC1A564u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A570(CPUState* cpu) { - cpu->pc = 0xBFC1A570u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A580(CPUState* cpu) { - cpu->pc = 0xBFC1A580u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A430_cont_BFC1A5A0(CPUState* cpu) { - cpu->pc = 0xBFC1A5A0u; - SCPH1001_func_1FC1A430(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A5C8(CPUState* cpu) { - cpu->pc = 0xBFC1A5C8u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A5E0(CPUState* cpu) { - cpu->pc = 0xBFC1A5E0u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A5F4(CPUState* cpu) { - cpu->pc = 0xBFC1A5F4u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A608(CPUState* cpu) { - cpu->pc = 0xBFC1A608u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A61C(CPUState* cpu) { - cpu->pc = 0xBFC1A61Cu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A624(CPUState* cpu) { - cpu->pc = 0xBFC1A624u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A630(CPUState* cpu) { - cpu->pc = 0xBFC1A630u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A650(CPUState* cpu) { - cpu->pc = 0xBFC1A650u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A66C(CPUState* cpu) { - cpu->pc = 0xBFC1A66Cu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A674(CPUState* cpu) { - cpu->pc = 0xBFC1A674u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A67C(CPUState* cpu) { - cpu->pc = 0xBFC1A67Cu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A684(CPUState* cpu) { - cpu->pc = 0xBFC1A684u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A68C(CPUState* cpu) { - cpu->pc = 0xBFC1A68Cu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A694(CPUState* cpu) { - cpu->pc = 0xBFC1A694u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A69C(CPUState* cpu) { - cpu->pc = 0xBFC1A69Cu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6A4(CPUState* cpu) { - cpu->pc = 0xBFC1A6A4u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6AC(CPUState* cpu) { - cpu->pc = 0xBFC1A6ACu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6B4(CPUState* cpu) { - cpu->pc = 0xBFC1A6B4u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6BC(CPUState* cpu) { - cpu->pc = 0xBFC1A6BCu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6C4(CPUState* cpu) { - cpu->pc = 0xBFC1A6C4u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6CC(CPUState* cpu) { - cpu->pc = 0xBFC1A6CCu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6D4(CPUState* cpu) { - cpu->pc = 0xBFC1A6D4u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6DC(CPUState* cpu) { - cpu->pc = 0xBFC1A6DCu; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A5B0_cont_BFC1A6E0(CPUState* cpu) { - cpu->pc = 0xBFC1A6E0u; - SCPH1001_func_1FC1A5B0(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A71C(CPUState* cpu) { - cpu->pc = 0xBFC1A71Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A728(CPUState* cpu) { - cpu->pc = 0xBFC1A728u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A750(CPUState* cpu) { - cpu->pc = 0xBFC1A750u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A760(CPUState* cpu) { - cpu->pc = 0xBFC1A760u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A774(CPUState* cpu) { - cpu->pc = 0xBFC1A774u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A780(CPUState* cpu) { - cpu->pc = 0xBFC1A780u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A794(CPUState* cpu) { - cpu->pc = 0xBFC1A794u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7A8(CPUState* cpu) { - cpu->pc = 0xBFC1A7A8u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7BC(CPUState* cpu) { - cpu->pc = 0xBFC1A7BCu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7C0(CPUState* cpu) { - cpu->pc = 0xBFC1A7C0u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7C8(CPUState* cpu) { - cpu->pc = 0xBFC1A7C8u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7D4(CPUState* cpu) { - cpu->pc = 0xBFC1A7D4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7DC(CPUState* cpu) { - cpu->pc = 0xBFC1A7DCu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7E0(CPUState* cpu) { - cpu->pc = 0xBFC1A7E0u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7EC(CPUState* cpu) { - cpu->pc = 0xBFC1A7ECu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A7F4(CPUState* cpu) { - cpu->pc = 0xBFC1A7F4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A80C(CPUState* cpu) { - cpu->pc = 0xBFC1A80Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A814(CPUState* cpu) { - cpu->pc = 0xBFC1A814u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A818(CPUState* cpu) { - cpu->pc = 0xBFC1A818u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A820(CPUState* cpu) { - cpu->pc = 0xBFC1A820u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A82C(CPUState* cpu) { - cpu->pc = 0xBFC1A82Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A838(CPUState* cpu) { - cpu->pc = 0xBFC1A838u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A840(CPUState* cpu) { - cpu->pc = 0xBFC1A840u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A854(CPUState* cpu) { - cpu->pc = 0xBFC1A854u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A85C(CPUState* cpu) { - cpu->pc = 0xBFC1A85Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A864(CPUState* cpu) { - cpu->pc = 0xBFC1A864u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A870(CPUState* cpu) { - cpu->pc = 0xBFC1A870u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A87C(CPUState* cpu) { - cpu->pc = 0xBFC1A87Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A884(CPUState* cpu) { - cpu->pc = 0xBFC1A884u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A898(CPUState* cpu) { - cpu->pc = 0xBFC1A898u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8AC(CPUState* cpu) { - cpu->pc = 0xBFC1A8ACu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8B4(CPUState* cpu) { - cpu->pc = 0xBFC1A8B4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8C0(CPUState* cpu) { - cpu->pc = 0xBFC1A8C0u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8CC(CPUState* cpu) { - cpu->pc = 0xBFC1A8CCu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8D4(CPUState* cpu) { - cpu->pc = 0xBFC1A8D4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8D8(CPUState* cpu) { - cpu->pc = 0xBFC1A8D8u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8E0(CPUState* cpu) { - cpu->pc = 0xBFC1A8E0u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A8F8(CPUState* cpu) { - cpu->pc = 0xBFC1A8F8u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A908(CPUState* cpu) { - cpu->pc = 0xBFC1A908u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A92C(CPUState* cpu) { - cpu->pc = 0xBFC1A92Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A940(CPUState* cpu) { - cpu->pc = 0xBFC1A940u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A964(CPUState* cpu) { - cpu->pc = 0xBFC1A964u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A970(CPUState* cpu) { - cpu->pc = 0xBFC1A970u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A974(CPUState* cpu) { - cpu->pc = 0xBFC1A974u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A980(CPUState* cpu) { - cpu->pc = 0xBFC1A980u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A9A4(CPUState* cpu) { - cpu->pc = 0xBFC1A9A4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A9C4(CPUState* cpu) { - cpu->pc = 0xBFC1A9C4u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1A9E8(CPUState* cpu) { - cpu->pc = 0xBFC1A9E8u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA00(CPUState* cpu) { - cpu->pc = 0xBFC1AA00u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA18(CPUState* cpu) { - cpu->pc = 0xBFC1AA18u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA30(CPUState* cpu) { - cpu->pc = 0xBFC1AA30u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA44(CPUState* cpu) { - cpu->pc = 0xBFC1AA44u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA5C(CPUState* cpu) { - cpu->pc = 0xBFC1AA5Cu; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA74(CPUState* cpu) { - cpu->pc = 0xBFC1AA74u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA80(CPUState* cpu) { - cpu->pc = 0xBFC1AA80u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1A6EC_cont_BFC1AA84(CPUState* cpu) { - cpu->pc = 0xBFC1AA84u; - SCPH1001_func_1FC1A6EC(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AAA8(CPUState* cpu) { - cpu->pc = 0xBFC1AAA8u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AAB8(CPUState* cpu) { - cpu->pc = 0xBFC1AAB8u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AAD0(CPUState* cpu) { - cpu->pc = 0xBFC1AAD0u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AADC(CPUState* cpu) { - cpu->pc = 0xBFC1AADCu; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AAE8(CPUState* cpu) { - cpu->pc = 0xBFC1AAE8u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AAF4(CPUState* cpu) { - cpu->pc = 0xBFC1AAF4u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB00(CPUState* cpu) { - cpu->pc = 0xBFC1AB00u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB10(CPUState* cpu) { - cpu->pc = 0xBFC1AB10u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB20(CPUState* cpu) { - cpu->pc = 0xBFC1AB20u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB30(CPUState* cpu) { - cpu->pc = 0xBFC1AB30u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB40(CPUState* cpu) { - cpu->pc = 0xBFC1AB40u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB50(CPUState* cpu) { - cpu->pc = 0xBFC1AB50u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB64(CPUState* cpu) { - cpu->pc = 0xBFC1AB64u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB70(CPUState* cpu) { - cpu->pc = 0xBFC1AB70u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB74(CPUState* cpu) { - cpu->pc = 0xBFC1AB74u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB78(CPUState* cpu) { - cpu->pc = 0xBFC1AB78u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AB84(CPUState* cpu) { - cpu->pc = 0xBFC1AB84u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1ABC0(CPUState* cpu) { - cpu->pc = 0xBFC1ABC0u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1ABC8(CPUState* cpu) { - cpu->pc = 0xBFC1ABC8u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1ABCC(CPUState* cpu) { - cpu->pc = 0xBFC1ABCCu; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1ABD8(CPUState* cpu) { - cpu->pc = 0xBFC1ABD8u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AC14(CPUState* cpu) { - cpu->pc = 0xBFC1AC14u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AC1C(CPUState* cpu) { - cpu->pc = 0xBFC1AC1Cu; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AC58(CPUState* cpu) { - cpu->pc = 0xBFC1AC58u; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AA90_cont_BFC1AC5C(CPUState* cpu) { - cpu->pc = 0xBFC1AC5Cu; - SCPH1001_func_1FC1AA90(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AC80(CPUState* cpu) { - cpu->pc = 0xBFC1AC80u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACA0(CPUState* cpu) { - cpu->pc = 0xBFC1ACA0u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACBC(CPUState* cpu) { - cpu->pc = 0xBFC1ACBCu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACC4(CPUState* cpu) { - cpu->pc = 0xBFC1ACC4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACCC(CPUState* cpu) { - cpu->pc = 0xBFC1ACCCu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACD4(CPUState* cpu) { - cpu->pc = 0xBFC1ACD4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACE8(CPUState* cpu) { - cpu->pc = 0xBFC1ACE8u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACF0(CPUState* cpu) { - cpu->pc = 0xBFC1ACF0u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACF4(CPUState* cpu) { - cpu->pc = 0xBFC1ACF4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ACFC(CPUState* cpu) { - cpu->pc = 0xBFC1ACFCu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD04(CPUState* cpu) { - cpu->pc = 0xBFC1AD04u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD08(CPUState* cpu) { - cpu->pc = 0xBFC1AD08u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD10(CPUState* cpu) { - cpu->pc = 0xBFC1AD10u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD1C(CPUState* cpu) { - cpu->pc = 0xBFC1AD1Cu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD34(CPUState* cpu) { - cpu->pc = 0xBFC1AD34u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD50(CPUState* cpu) { - cpu->pc = 0xBFC1AD50u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD5C(CPUState* cpu) { - cpu->pc = 0xBFC1AD5Cu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD60(CPUState* cpu) { - cpu->pc = 0xBFC1AD60u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD74(CPUState* cpu) { - cpu->pc = 0xBFC1AD74u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD84(CPUState* cpu) { - cpu->pc = 0xBFC1AD84u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD88(CPUState* cpu) { - cpu->pc = 0xBFC1AD88u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD8C(CPUState* cpu) { - cpu->pc = 0xBFC1AD8Cu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AD94(CPUState* cpu) { - cpu->pc = 0xBFC1AD94u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADA4(CPUState* cpu) { - cpu->pc = 0xBFC1ADA4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADB4(CPUState* cpu) { - cpu->pc = 0xBFC1ADB4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADB8(CPUState* cpu) { - cpu->pc = 0xBFC1ADB8u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADC0(CPUState* cpu) { - cpu->pc = 0xBFC1ADC0u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADD4(CPUState* cpu) { - cpu->pc = 0xBFC1ADD4u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADF0(CPUState* cpu) { - cpu->pc = 0xBFC1ADF0u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1ADFC(CPUState* cpu) { - cpu->pc = 0xBFC1ADFCu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AE04(CPUState* cpu) { - cpu->pc = 0xBFC1AE04u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AE0C(CPUState* cpu) { - cpu->pc = 0xBFC1AE0Cu; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AE14(CPUState* cpu) { - cpu->pc = 0xBFC1AE14u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AC68_cont_BFC1AE18(CPUState* cpu) { - cpu->pc = 0xBFC1AE18u; - SCPH1001_func_1FC1AC68(cpu); -} - -void SCPH1001_func_1FC1AE34_cont_BFC1AE48(CPUState* cpu) { - cpu->pc = 0xBFC1AE48u; - SCPH1001_func_1FC1AE34(cpu); -} - -void SCPH1001_func_1FC1AE34_cont_BFC1AE60(CPUState* cpu) { - cpu->pc = 0xBFC1AE60u; - SCPH1001_func_1FC1AE34(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AE80(CPUState* cpu) { - cpu->pc = 0xBFC1AE80u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AE94(CPUState* cpu) { - cpu->pc = 0xBFC1AE94u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AEA8(CPUState* cpu) { - cpu->pc = 0xBFC1AEA8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AEBC(CPUState* cpu) { - cpu->pc = 0xBFC1AEBCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AEC4(CPUState* cpu) { - cpu->pc = 0xBFC1AEC4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AED0(CPUState* cpu) { - cpu->pc = 0xBFC1AED0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AEE4(CPUState* cpu) { - cpu->pc = 0xBFC1AEE4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF04(CPUState* cpu) { - cpu->pc = 0xBFC1AF04u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF18(CPUState* cpu) { - cpu->pc = 0xBFC1AF18u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF28(CPUState* cpu) { - cpu->pc = 0xBFC1AF28u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF3C(CPUState* cpu) { - cpu->pc = 0xBFC1AF3Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF44(CPUState* cpu) { - cpu->pc = 0xBFC1AF44u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF4C(CPUState* cpu) { - cpu->pc = 0xBFC1AF4Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF50(CPUState* cpu) { - cpu->pc = 0xBFC1AF50u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF64(CPUState* cpu) { - cpu->pc = 0xBFC1AF64u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AF90(CPUState* cpu) { - cpu->pc = 0xBFC1AF90u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFA0(CPUState* cpu) { - cpu->pc = 0xBFC1AFA0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFB8(CPUState* cpu) { - cpu->pc = 0xBFC1AFB8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFCC(CPUState* cpu) { - cpu->pc = 0xBFC1AFCCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFDC(CPUState* cpu) { - cpu->pc = 0xBFC1AFDCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFE0(CPUState* cpu) { - cpu->pc = 0xBFC1AFE0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1AFE8(CPUState* cpu) { - cpu->pc = 0xBFC1AFE8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B010(CPUState* cpu) { - cpu->pc = 0xBFC1B010u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B01C(CPUState* cpu) { - cpu->pc = 0xBFC1B01Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B054(CPUState* cpu) { - cpu->pc = 0xBFC1B054u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B06C(CPUState* cpu) { - cpu->pc = 0xBFC1B06Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B078(CPUState* cpu) { - cpu->pc = 0xBFC1B078u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B08C(CPUState* cpu) { - cpu->pc = 0xBFC1B08Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0A0(CPUState* cpu) { - cpu->pc = 0xBFC1B0A0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0A8(CPUState* cpu) { - cpu->pc = 0xBFC1B0A8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0B0(CPUState* cpu) { - cpu->pc = 0xBFC1B0B0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0B8(CPUState* cpu) { - cpu->pc = 0xBFC1B0B8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0C8(CPUState* cpu) { - cpu->pc = 0xBFC1B0C8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0CC(CPUState* cpu) { - cpu->pc = 0xBFC1B0CCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0D4(CPUState* cpu) { - cpu->pc = 0xBFC1B0D4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B0E4(CPUState* cpu) { - cpu->pc = 0xBFC1B0E4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B100(CPUState* cpu) { - cpu->pc = 0xBFC1B100u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B110(CPUState* cpu) { - cpu->pc = 0xBFC1B110u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B11C(CPUState* cpu) { - cpu->pc = 0xBFC1B11Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B120(CPUState* cpu) { - cpu->pc = 0xBFC1B120u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B128(CPUState* cpu) { - cpu->pc = 0xBFC1B128u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B130(CPUState* cpu) { - cpu->pc = 0xBFC1B130u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B140(CPUState* cpu) { - cpu->pc = 0xBFC1B140u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B150(CPUState* cpu) { - cpu->pc = 0xBFC1B150u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B174(CPUState* cpu) { - cpu->pc = 0xBFC1B174u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B17C(CPUState* cpu) { - cpu->pc = 0xBFC1B17Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B190(CPUState* cpu) { - cpu->pc = 0xBFC1B190u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B1A4(CPUState* cpu) { - cpu->pc = 0xBFC1B1A4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B1AC(CPUState* cpu) { - cpu->pc = 0xBFC1B1ACu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B1B4(CPUState* cpu) { - cpu->pc = 0xBFC1B1B4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B1DC(CPUState* cpu) { - cpu->pc = 0xBFC1B1DCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B1F4(CPUState* cpu) { - cpu->pc = 0xBFC1B1F4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B200(CPUState* cpu) { - cpu->pc = 0xBFC1B200u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B220(CPUState* cpu) { - cpu->pc = 0xBFC1B220u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B228(CPUState* cpu) { - cpu->pc = 0xBFC1B228u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B23C(CPUState* cpu) { - cpu->pc = 0xBFC1B23Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B244(CPUState* cpu) { - cpu->pc = 0xBFC1B244u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B24C(CPUState* cpu) { - cpu->pc = 0xBFC1B24Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B260(CPUState* cpu) { - cpu->pc = 0xBFC1B260u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B270(CPUState* cpu) { - cpu->pc = 0xBFC1B270u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B274(CPUState* cpu) { - cpu->pc = 0xBFC1B274u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B280(CPUState* cpu) { - cpu->pc = 0xBFC1B280u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B294(CPUState* cpu) { - cpu->pc = 0xBFC1B294u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2A0(CPUState* cpu) { - cpu->pc = 0xBFC1B2A0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2AC(CPUState* cpu) { - cpu->pc = 0xBFC1B2ACu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2B0(CPUState* cpu) { - cpu->pc = 0xBFC1B2B0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2B8(CPUState* cpu) { - cpu->pc = 0xBFC1B2B8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2C8(CPUState* cpu) { - cpu->pc = 0xBFC1B2C8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2E4(CPUState* cpu) { - cpu->pc = 0xBFC1B2E4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2E8(CPUState* cpu) { - cpu->pc = 0xBFC1B2E8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B2F0(CPUState* cpu) { - cpu->pc = 0xBFC1B2F0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B308(CPUState* cpu) { - cpu->pc = 0xBFC1B308u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B31C(CPUState* cpu) { - cpu->pc = 0xBFC1B31Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B324(CPUState* cpu) { - cpu->pc = 0xBFC1B324u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B328(CPUState* cpu) { - cpu->pc = 0xBFC1B328u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B33C(CPUState* cpu) { - cpu->pc = 0xBFC1B33Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B344(CPUState* cpu) { - cpu->pc = 0xBFC1B344u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B358(CPUState* cpu) { - cpu->pc = 0xBFC1B358u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B36C(CPUState* cpu) { - cpu->pc = 0xBFC1B36Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B378(CPUState* cpu) { - cpu->pc = 0xBFC1B378u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3B4(CPUState* cpu) { - cpu->pc = 0xBFC1B3B4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3C8(CPUState* cpu) { - cpu->pc = 0xBFC1B3C8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3D0(CPUState* cpu) { - cpu->pc = 0xBFC1B3D0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3D4(CPUState* cpu) { - cpu->pc = 0xBFC1B3D4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3E8(CPUState* cpu) { - cpu->pc = 0xBFC1B3E8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3F0(CPUState* cpu) { - cpu->pc = 0xBFC1B3F0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B3FC(CPUState* cpu) { - cpu->pc = 0xBFC1B3FCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B410(CPUState* cpu) { - cpu->pc = 0xBFC1B410u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B428(CPUState* cpu) { - cpu->pc = 0xBFC1B428u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B43C(CPUState* cpu) { - cpu->pc = 0xBFC1B43Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B460(CPUState* cpu) { - cpu->pc = 0xBFC1B460u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B468(CPUState* cpu) { - cpu->pc = 0xBFC1B468u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B474(CPUState* cpu) { - cpu->pc = 0xBFC1B474u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B47C(CPUState* cpu) { - cpu->pc = 0xBFC1B47Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B488(CPUState* cpu) { - cpu->pc = 0xBFC1B488u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B494(CPUState* cpu) { - cpu->pc = 0xBFC1B494u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4A4(CPUState* cpu) { - cpu->pc = 0xBFC1B4A4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4BC(CPUState* cpu) { - cpu->pc = 0xBFC1B4BCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4C4(CPUState* cpu) { - cpu->pc = 0xBFC1B4C4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4D0(CPUState* cpu) { - cpu->pc = 0xBFC1B4D0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4E8(CPUState* cpu) { - cpu->pc = 0xBFC1B4E8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B4F4(CPUState* cpu) { - cpu->pc = 0xBFC1B4F4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B508(CPUState* cpu) { - cpu->pc = 0xBFC1B508u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B528(CPUState* cpu) { - cpu->pc = 0xBFC1B528u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B538(CPUState* cpu) { - cpu->pc = 0xBFC1B538u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B54C(CPUState* cpu) { - cpu->pc = 0xBFC1B54Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B560(CPUState* cpu) { - cpu->pc = 0xBFC1B560u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B56C(CPUState* cpu) { - cpu->pc = 0xBFC1B56Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B58C(CPUState* cpu) { - cpu->pc = 0xBFC1B58Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B59C(CPUState* cpu) { - cpu->pc = 0xBFC1B59Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5A4(CPUState* cpu) { - cpu->pc = 0xBFC1B5A4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5BC(CPUState* cpu) { - cpu->pc = 0xBFC1B5BCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5C0(CPUState* cpu) { - cpu->pc = 0xBFC1B5C0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5C8(CPUState* cpu) { - cpu->pc = 0xBFC1B5C8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5E0(CPUState* cpu) { - cpu->pc = 0xBFC1B5E0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5EC(CPUState* cpu) { - cpu->pc = 0xBFC1B5ECu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B5FC(CPUState* cpu) { - cpu->pc = 0xBFC1B5FCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B604(CPUState* cpu) { - cpu->pc = 0xBFC1B604u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B610(CPUState* cpu) { - cpu->pc = 0xBFC1B610u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B618(CPUState* cpu) { - cpu->pc = 0xBFC1B618u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B624(CPUState* cpu) { - cpu->pc = 0xBFC1B624u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B62C(CPUState* cpu) { - cpu->pc = 0xBFC1B62Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B654(CPUState* cpu) { - cpu->pc = 0xBFC1B654u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B65C(CPUState* cpu) { - cpu->pc = 0xBFC1B65Cu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B664(CPUState* cpu) { - cpu->pc = 0xBFC1B664u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B670(CPUState* cpu) { - cpu->pc = 0xBFC1B670u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B680(CPUState* cpu) { - cpu->pc = 0xBFC1B680u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B688(CPUState* cpu) { - cpu->pc = 0xBFC1B688u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B690(CPUState* cpu) { - cpu->pc = 0xBFC1B690u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B698(CPUState* cpu) { - cpu->pc = 0xBFC1B698u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6A4(CPUState* cpu) { - cpu->pc = 0xBFC1B6A4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6B4(CPUState* cpu) { - cpu->pc = 0xBFC1B6B4u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6BC(CPUState* cpu) { - cpu->pc = 0xBFC1B6BCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6C8(CPUState* cpu) { - cpu->pc = 0xBFC1B6C8u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6D0(CPUState* cpu) { - cpu->pc = 0xBFC1B6D0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6DC(CPUState* cpu) { - cpu->pc = 0xBFC1B6DCu; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1AE68_cont_BFC1B6E0(CPUState* cpu) { - cpu->pc = 0xBFC1B6E0u; - SCPH1001_func_1FC1AE68(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B704(CPUState* cpu) { - cpu->pc = 0xBFC1B704u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B718(CPUState* cpu) { - cpu->pc = 0xBFC1B718u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B738(CPUState* cpu) { - cpu->pc = 0xBFC1B738u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B748(CPUState* cpu) { - cpu->pc = 0xBFC1B748u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B764(CPUState* cpu) { - cpu->pc = 0xBFC1B764u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B774(CPUState* cpu) { - cpu->pc = 0xBFC1B774u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B6EC_cont_BFC1B778(CPUState* cpu) { - cpu->pc = 0xBFC1B778u; - SCPH1001_func_1FC1B6EC(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B7F8(CPUState* cpu) { - cpu->pc = 0xBFC1B7F8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B80C(CPUState* cpu) { - cpu->pc = 0xBFC1B80Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B820(CPUState* cpu) { - cpu->pc = 0xBFC1B820u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B82C(CPUState* cpu) { - cpu->pc = 0xBFC1B82Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B834(CPUState* cpu) { - cpu->pc = 0xBFC1B834u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B848(CPUState* cpu) { - cpu->pc = 0xBFC1B848u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B85C(CPUState* cpu) { - cpu->pc = 0xBFC1B85Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B868(CPUState* cpu) { - cpu->pc = 0xBFC1B868u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B870(CPUState* cpu) { - cpu->pc = 0xBFC1B870u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B88C(CPUState* cpu) { - cpu->pc = 0xBFC1B88Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8A8(CPUState* cpu) { - cpu->pc = 0xBFC1B8A8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8AC(CPUState* cpu) { - cpu->pc = 0xBFC1B8ACu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8B4(CPUState* cpu) { - cpu->pc = 0xBFC1B8B4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8D0(CPUState* cpu) { - cpu->pc = 0xBFC1B8D0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8D8(CPUState* cpu) { - cpu->pc = 0xBFC1B8D8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8E4(CPUState* cpu) { - cpu->pc = 0xBFC1B8E4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B8F0(CPUState* cpu) { - cpu->pc = 0xBFC1B8F0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B900(CPUState* cpu) { - cpu->pc = 0xBFC1B900u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B90C(CPUState* cpu) { - cpu->pc = 0xBFC1B90Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B918(CPUState* cpu) { - cpu->pc = 0xBFC1B918u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B928(CPUState* cpu) { - cpu->pc = 0xBFC1B928u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B934(CPUState* cpu) { - cpu->pc = 0xBFC1B934u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B940(CPUState* cpu) { - cpu->pc = 0xBFC1B940u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B950(CPUState* cpu) { - cpu->pc = 0xBFC1B950u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B958(CPUState* cpu) { - cpu->pc = 0xBFC1B958u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B960(CPUState* cpu) { - cpu->pc = 0xBFC1B960u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B968(CPUState* cpu) { - cpu->pc = 0xBFC1B968u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B9B4(CPUState* cpu) { - cpu->pc = 0xBFC1B9B4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B9C8(CPUState* cpu) { - cpu->pc = 0xBFC1B9C8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B9D8(CPUState* cpu) { - cpu->pc = 0xBFC1B9D8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1B9EC(CPUState* cpu) { - cpu->pc = 0xBFC1B9ECu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA04(CPUState* cpu) { - cpu->pc = 0xBFC1BA04u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA0C(CPUState* cpu) { - cpu->pc = 0xBFC1BA0Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA18(CPUState* cpu) { - cpu->pc = 0xBFC1BA18u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA20(CPUState* cpu) { - cpu->pc = 0xBFC1BA20u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA28(CPUState* cpu) { - cpu->pc = 0xBFC1BA28u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA34(CPUState* cpu) { - cpu->pc = 0xBFC1BA34u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA48(CPUState* cpu) { - cpu->pc = 0xBFC1BA48u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA4C(CPUState* cpu) { - cpu->pc = 0xBFC1BA4Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA58(CPUState* cpu) { - cpu->pc = 0xBFC1BA58u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA60(CPUState* cpu) { - cpu->pc = 0xBFC1BA60u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA68(CPUState* cpu) { - cpu->pc = 0xBFC1BA68u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA7C(CPUState* cpu) { - cpu->pc = 0xBFC1BA7Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BA90(CPUState* cpu) { - cpu->pc = 0xBFC1BA90u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BAE8(CPUState* cpu) { - cpu->pc = 0xBFC1BAE8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BAF4(CPUState* cpu) { - cpu->pc = 0xBFC1BAF4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB0C(CPUState* cpu) { - cpu->pc = 0xBFC1BB0Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB10(CPUState* cpu) { - cpu->pc = 0xBFC1BB10u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB18(CPUState* cpu) { - cpu->pc = 0xBFC1BB18u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB20(CPUState* cpu) { - cpu->pc = 0xBFC1BB20u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB2C(CPUState* cpu) { - cpu->pc = 0xBFC1BB2Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB44(CPUState* cpu) { - cpu->pc = 0xBFC1BB44u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB5C(CPUState* cpu) { - cpu->pc = 0xBFC1BB5Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB60(CPUState* cpu) { - cpu->pc = 0xBFC1BB60u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB68(CPUState* cpu) { - cpu->pc = 0xBFC1BB68u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB74(CPUState* cpu) { - cpu->pc = 0xBFC1BB74u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB7C(CPUState* cpu) { - cpu->pc = 0xBFC1BB7Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BB88(CPUState* cpu) { - cpu->pc = 0xBFC1BB88u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBA0(CPUState* cpu) { - cpu->pc = 0xBFC1BBA0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBB8(CPUState* cpu) { - cpu->pc = 0xBFC1BBB8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBC4(CPUState* cpu) { - cpu->pc = 0xBFC1BBC4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBD0(CPUState* cpu) { - cpu->pc = 0xBFC1BBD0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBE8(CPUState* cpu) { - cpu->pc = 0xBFC1BBE8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BBF0(CPUState* cpu) { - cpu->pc = 0xBFC1BBF0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC0C(CPUState* cpu) { - cpu->pc = 0xBFC1BC0Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC10(CPUState* cpu) { - cpu->pc = 0xBFC1BC10u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC18(CPUState* cpu) { - cpu->pc = 0xBFC1BC18u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC20(CPUState* cpu) { - cpu->pc = 0xBFC1BC20u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC2C(CPUState* cpu) { - cpu->pc = 0xBFC1BC2Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC3C(CPUState* cpu) { - cpu->pc = 0xBFC1BC3Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC50(CPUState* cpu) { - cpu->pc = 0xBFC1BC50u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC60(CPUState* cpu) { - cpu->pc = 0xBFC1BC60u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC68(CPUState* cpu) { - cpu->pc = 0xBFC1BC68u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC74(CPUState* cpu) { - cpu->pc = 0xBFC1BC74u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC90(CPUState* cpu) { - cpu->pc = 0xBFC1BC90u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BC98(CPUState* cpu) { - cpu->pc = 0xBFC1BC98u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BCA4(CPUState* cpu) { - cpu->pc = 0xBFC1BCA4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BCC0(CPUState* cpu) { - cpu->pc = 0xBFC1BCC0u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BCD8(CPUState* cpu) { - cpu->pc = 0xBFC1BCD8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BCE8(CPUState* cpu) { - cpu->pc = 0xBFC1BCE8u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BCF4(CPUState* cpu) { - cpu->pc = 0xBFC1BCF4u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BD0C(CPUState* cpu) { - cpu->pc = 0xBFC1BD0Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BD18(CPUState* cpu) { - cpu->pc = 0xBFC1BD18u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BD1C(CPUState* cpu) { - cpu->pc = 0xBFC1BD1Cu; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1B7E0_cont_BFC1BD20(CPUState* cpu) { - cpu->pc = 0xBFC1BD20u; - SCPH1001_func_1FC1B7E0(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BD80(CPUState* cpu) { - cpu->pc = 0xBFC1BD80u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BD98(CPUState* cpu) { - cpu->pc = 0xBFC1BD98u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BDAC(CPUState* cpu) { - cpu->pc = 0xBFC1BDACu; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BDC0(CPUState* cpu) { - cpu->pc = 0xBFC1BDC0u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BDD4(CPUState* cpu) { - cpu->pc = 0xBFC1BDD4u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BDDC(CPUState* cpu) { - cpu->pc = 0xBFC1BDDCu; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BDF8(CPUState* cpu) { - cpu->pc = 0xBFC1BDF8u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE14(CPUState* cpu) { - cpu->pc = 0xBFC1BE14u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE1C(CPUState* cpu) { - cpu->pc = 0xBFC1BE1Cu; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE24(CPUState* cpu) { - cpu->pc = 0xBFC1BE24u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE38(CPUState* cpu) { - cpu->pc = 0xBFC1BE38u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE50(CPUState* cpu) { - cpu->pc = 0xBFC1BE50u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE64(CPUState* cpu) { - cpu->pc = 0xBFC1BE64u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE6C(CPUState* cpu) { - cpu->pc = 0xBFC1BE6Cu; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE78(CPUState* cpu) { - cpu->pc = 0xBFC1BE78u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE80(CPUState* cpu) { - cpu->pc = 0xBFC1BE80u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE88(CPUState* cpu) { - cpu->pc = 0xBFC1BE88u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE90(CPUState* cpu) { - cpu->pc = 0xBFC1BE90u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BE98(CPUState* cpu) { - cpu->pc = 0xBFC1BE98u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BEA4(CPUState* cpu) { - cpu->pc = 0xBFC1BEA4u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BEB0(CPUState* cpu) { - cpu->pc = 0xBFC1BEB0u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BEB8(CPUState* cpu) { - cpu->pc = 0xBFC1BEB8u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BEC0(CPUState* cpu) { - cpu->pc = 0xBFC1BEC0u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BEC8(CPUState* cpu) { - cpu->pc = 0xBFC1BEC8u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BED0(CPUState* cpu) { - cpu->pc = 0xBFC1BED0u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BD68_cont_BFC1BED4(CPUState* cpu) { - cpu->pc = 0xBFC1BED4u; - SCPH1001_func_1FC1BD68(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BEF4(CPUState* cpu) { - cpu->pc = 0xBFC1BEF4u; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BF08(CPUState* cpu) { - cpu->pc = 0xBFC1BF08u; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BF1C(CPUState* cpu) { - cpu->pc = 0xBFC1BF1Cu; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BF2C(CPUState* cpu) { - cpu->pc = 0xBFC1BF2Cu; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BF34(CPUState* cpu) { - cpu->pc = 0xBFC1BF34u; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BEE0_cont_BFC1BF38(CPUState* cpu) { - cpu->pc = 0xBFC1BF38u; - SCPH1001_func_1FC1BEE0(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BF64(CPUState* cpu) { - cpu->pc = 0xBFC1BF64u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BF80(CPUState* cpu) { - cpu->pc = 0xBFC1BF80u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BF90(CPUState* cpu) { - cpu->pc = 0xBFC1BF90u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BFC8(CPUState* cpu) { - cpu->pc = 0xBFC1BFC8u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BFD4(CPUState* cpu) { - cpu->pc = 0xBFC1BFD4u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BFE4(CPUState* cpu) { - cpu->pc = 0xBFC1BFE4u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BFEC(CPUState* cpu) { - cpu->pc = 0xBFC1BFECu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1BFF8(CPUState* cpu) { - cpu->pc = 0xBFC1BFF8u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C010(CPUState* cpu) { - cpu->pc = 0xBFC1C010u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C018(CPUState* cpu) { - cpu->pc = 0xBFC1C018u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C030(CPUState* cpu) { - cpu->pc = 0xBFC1C030u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C03C(CPUState* cpu) { - cpu->pc = 0xBFC1C03Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C048(CPUState* cpu) { - cpu->pc = 0xBFC1C048u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C054(CPUState* cpu) { - cpu->pc = 0xBFC1C054u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C05C(CPUState* cpu) { - cpu->pc = 0xBFC1C05Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C068(CPUState* cpu) { - cpu->pc = 0xBFC1C068u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C070(CPUState* cpu) { - cpu->pc = 0xBFC1C070u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C07C(CPUState* cpu) { - cpu->pc = 0xBFC1C07Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C094(CPUState* cpu) { - cpu->pc = 0xBFC1C094u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C09C(CPUState* cpu) { - cpu->pc = 0xBFC1C09Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C0B0(CPUState* cpu) { - cpu->pc = 0xBFC1C0B0u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C0B8(CPUState* cpu) { - cpu->pc = 0xBFC1C0B8u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C0D0(CPUState* cpu) { - cpu->pc = 0xBFC1C0D0u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C0D8(CPUState* cpu) { - cpu->pc = 0xBFC1C0D8u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C0EC(CPUState* cpu) { - cpu->pc = 0xBFC1C0ECu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C104(CPUState* cpu) { - cpu->pc = 0xBFC1C104u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C10C(CPUState* cpu) { - cpu->pc = 0xBFC1C10Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C114(CPUState* cpu) { - cpu->pc = 0xBFC1C114u; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1BF44_cont_BFC1C11C(CPUState* cpu) { - cpu->pc = 0xBFC1C11Cu; - SCPH1001_func_1FC1BF44(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C154(CPUState* cpu) { - cpu->pc = 0xBFC1C154u; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C15C(CPUState* cpu) { - cpu->pc = 0xBFC1C15Cu; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C170(CPUState* cpu) { - cpu->pc = 0xBFC1C170u; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C174(CPUState* cpu) { - cpu->pc = 0xBFC1C174u; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C188(CPUState* cpu) { - cpu->pc = 0xBFC1C188u; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C18C(CPUState* cpu) { - cpu->pc = 0xBFC1C18Cu; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C130_cont_BFC1C194(CPUState* cpu) { - cpu->pc = 0xBFC1C194u; - SCPH1001_func_1FC1C130(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C1C8(CPUState* cpu) { - cpu->pc = 0xBFC1C1C8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C1D4(CPUState* cpu) { - cpu->pc = 0xBFC1C1D4u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C1E4(CPUState* cpu) { - cpu->pc = 0xBFC1C1E4u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C1EC(CPUState* cpu) { - cpu->pc = 0xBFC1C1ECu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C1F8(CPUState* cpu) { - cpu->pc = 0xBFC1C1F8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C210(CPUState* cpu) { - cpu->pc = 0xBFC1C210u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C218(CPUState* cpu) { - cpu->pc = 0xBFC1C218u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C230(CPUState* cpu) { - cpu->pc = 0xBFC1C230u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C244(CPUState* cpu) { - cpu->pc = 0xBFC1C244u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C250(CPUState* cpu) { - cpu->pc = 0xBFC1C250u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C25C(CPUState* cpu) { - cpu->pc = 0xBFC1C25Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C264(CPUState* cpu) { - cpu->pc = 0xBFC1C264u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C270(CPUState* cpu) { - cpu->pc = 0xBFC1C270u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C27C(CPUState* cpu) { - cpu->pc = 0xBFC1C27Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C28C(CPUState* cpu) { - cpu->pc = 0xBFC1C28Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C294(CPUState* cpu) { - cpu->pc = 0xBFC1C294u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C29C(CPUState* cpu) { - cpu->pc = 0xBFC1C29Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C2A8(CPUState* cpu) { - cpu->pc = 0xBFC1C2A8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C2CC(CPUState* cpu) { - cpu->pc = 0xBFC1C2CCu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C2D0(CPUState* cpu) { - cpu->pc = 0xBFC1C2D0u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C2D8(CPUState* cpu) { - cpu->pc = 0xBFC1C2D8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C308(CPUState* cpu) { - cpu->pc = 0xBFC1C308u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C30C(CPUState* cpu) { - cpu->pc = 0xBFC1C30Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C31C(CPUState* cpu) { - cpu->pc = 0xBFC1C31Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C338(CPUState* cpu) { - cpu->pc = 0xBFC1C338u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C348(CPUState* cpu) { - cpu->pc = 0xBFC1C348u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C34C(CPUState* cpu) { - cpu->pc = 0xBFC1C34Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C36C(CPUState* cpu) { - cpu->pc = 0xBFC1C36Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C370(CPUState* cpu) { - cpu->pc = 0xBFC1C370u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C380(CPUState* cpu) { - cpu->pc = 0xBFC1C380u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3B0(CPUState* cpu) { - cpu->pc = 0xBFC1C3B0u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3C0(CPUState* cpu) { - cpu->pc = 0xBFC1C3C0u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3D4(CPUState* cpu) { - cpu->pc = 0xBFC1C3D4u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3D8(CPUState* cpu) { - cpu->pc = 0xBFC1C3D8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3DC(CPUState* cpu) { - cpu->pc = 0xBFC1C3DCu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3E4(CPUState* cpu) { - cpu->pc = 0xBFC1C3E4u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C3F8(CPUState* cpu) { - cpu->pc = 0xBFC1C3F8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C408(CPUState* cpu) { - cpu->pc = 0xBFC1C408u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C428(CPUState* cpu) { - cpu->pc = 0xBFC1C428u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C42C(CPUState* cpu) { - cpu->pc = 0xBFC1C42Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C438(CPUState* cpu) { - cpu->pc = 0xBFC1C438u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C43C(CPUState* cpu) { - cpu->pc = 0xBFC1C43Cu; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C448(CPUState* cpu) { - cpu->pc = 0xBFC1C448u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C454(CPUState* cpu) { - cpu->pc = 0xBFC1C454u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C460(CPUState* cpu) { - cpu->pc = 0xBFC1C460u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C488(CPUState* cpu) { - cpu->pc = 0xBFC1C488u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C4A0(CPUState* cpu) { - cpu->pc = 0xBFC1C4A0u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C4A8(CPUState* cpu) { - cpu->pc = 0xBFC1C4A8u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C1A4_cont_BFC1C4B0(CPUState* cpu) { - cpu->pc = 0xBFC1C4B0u; - SCPH1001_func_1FC1C1A4(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C4D8(CPUState* cpu) { - cpu->pc = 0xBFC1C4D8u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C4EC(CPUState* cpu) { - cpu->pc = 0xBFC1C4ECu; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C500(CPUState* cpu) { - cpu->pc = 0xBFC1C500u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C508(CPUState* cpu) { - cpu->pc = 0xBFC1C508u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C518(CPUState* cpu) { - cpu->pc = 0xBFC1C518u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C520(CPUState* cpu) { - cpu->pc = 0xBFC1C520u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C538(CPUState* cpu) { - cpu->pc = 0xBFC1C538u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C540(CPUState* cpu) { - cpu->pc = 0xBFC1C540u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C550(CPUState* cpu) { - cpu->pc = 0xBFC1C550u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C558(CPUState* cpu) { - cpu->pc = 0xBFC1C558u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C564(CPUState* cpu) { - cpu->pc = 0xBFC1C564u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C578(CPUState* cpu) { - cpu->pc = 0xBFC1C578u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C588(CPUState* cpu) { - cpu->pc = 0xBFC1C588u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C58C(CPUState* cpu) { - cpu->pc = 0xBFC1C58Cu; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C594(CPUState* cpu) { - cpu->pc = 0xBFC1C594u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C598(CPUState* cpu) { - cpu->pc = 0xBFC1C598u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C5A0(CPUState* cpu) { - cpu->pc = 0xBFC1C5A0u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C5A8(CPUState* cpu) { - cpu->pc = 0xBFC1C5A8u; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C4C0_cont_BFC1C5AC(CPUState* cpu) { - cpu->pc = 0xBFC1C5ACu; - SCPH1001_func_1FC1C4C0(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C5D8(CPUState* cpu) { - cpu->pc = 0xBFC1C5D8u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C5E0(CPUState* cpu) { - cpu->pc = 0xBFC1C5E0u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C5F4(CPUState* cpu) { - cpu->pc = 0xBFC1C5F4u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C604(CPUState* cpu) { - cpu->pc = 0xBFC1C604u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C618(CPUState* cpu) { - cpu->pc = 0xBFC1C618u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C638(CPUState* cpu) { - cpu->pc = 0xBFC1C638u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C64C(CPUState* cpu) { - cpu->pc = 0xBFC1C64Cu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C65C(CPUState* cpu) { - cpu->pc = 0xBFC1C65Cu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C660(CPUState* cpu) { - cpu->pc = 0xBFC1C660u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C674(CPUState* cpu) { - cpu->pc = 0xBFC1C674u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C694(CPUState* cpu) { - cpu->pc = 0xBFC1C694u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C6AC(CPUState* cpu) { - cpu->pc = 0xBFC1C6ACu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C6C0(CPUState* cpu) { - cpu->pc = 0xBFC1C6C0u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C6C8(CPUState* cpu) { - cpu->pc = 0xBFC1C6C8u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C6D4(CPUState* cpu) { - cpu->pc = 0xBFC1C6D4u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C6E8(CPUState* cpu) { - cpu->pc = 0xBFC1C6E8u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C708(CPUState* cpu) { - cpu->pc = 0xBFC1C708u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C70C(CPUState* cpu) { - cpu->pc = 0xBFC1C70Cu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C714(CPUState* cpu) { - cpu->pc = 0xBFC1C714u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C720(CPUState* cpu) { - cpu->pc = 0xBFC1C720u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C738(CPUState* cpu) { - cpu->pc = 0xBFC1C738u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C73C(CPUState* cpu) { - cpu->pc = 0xBFC1C73Cu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C744(CPUState* cpu) { - cpu->pc = 0xBFC1C744u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C770(CPUState* cpu) { - cpu->pc = 0xBFC1C770u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C774(CPUState* cpu) { - cpu->pc = 0xBFC1C774u; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C5B8_cont_BFC1C77C(CPUState* cpu) { - cpu->pc = 0xBFC1C77Cu; - SCPH1001_func_1FC1C5B8(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7A4(CPUState* cpu) { - cpu->pc = 0xBFC1C7A4u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7B0(CPUState* cpu) { - cpu->pc = 0xBFC1C7B0u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7C0(CPUState* cpu) { - cpu->pc = 0xBFC1C7C0u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7C8(CPUState* cpu) { - cpu->pc = 0xBFC1C7C8u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7DC(CPUState* cpu) { - cpu->pc = 0xBFC1C7DCu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7F0(CPUState* cpu) { - cpu->pc = 0xBFC1C7F0u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C7FC(CPUState* cpu) { - cpu->pc = 0xBFC1C7FCu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C808(CPUState* cpu) { - cpu->pc = 0xBFC1C808u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C818(CPUState* cpu) { - cpu->pc = 0xBFC1C818u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C81C(CPUState* cpu) { - cpu->pc = 0xBFC1C81Cu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C824(CPUState* cpu) { - cpu->pc = 0xBFC1C824u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C830(CPUState* cpu) { - cpu->pc = 0xBFC1C830u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C838(CPUState* cpu) { - cpu->pc = 0xBFC1C838u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C840(CPUState* cpu) { - cpu->pc = 0xBFC1C840u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C854(CPUState* cpu) { - cpu->pc = 0xBFC1C854u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C868(CPUState* cpu) { - cpu->pc = 0xBFC1C868u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C870(CPUState* cpu) { - cpu->pc = 0xBFC1C870u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C874(CPUState* cpu) { - cpu->pc = 0xBFC1C874u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C87C(CPUState* cpu) { - cpu->pc = 0xBFC1C87Cu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C888(CPUState* cpu) { - cpu->pc = 0xBFC1C888u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C890(CPUState* cpu) { - cpu->pc = 0xBFC1C890u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8A8(CPUState* cpu) { - cpu->pc = 0xBFC1C8A8u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8BC(CPUState* cpu) { - cpu->pc = 0xBFC1C8BCu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8C4(CPUState* cpu) { - cpu->pc = 0xBFC1C8C4u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8C8(CPUState* cpu) { - cpu->pc = 0xBFC1C8C8u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8D0(CPUState* cpu) { - cpu->pc = 0xBFC1C8D0u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8DC(CPUState* cpu) { - cpu->pc = 0xBFC1C8DCu; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C78C_cont_BFC1C8E0(CPUState* cpu) { - cpu->pc = 0xBFC1C8E0u; - SCPH1001_func_1FC1C78C(cpu); -} - -void SCPH1001_func_1FC1C8EC_cont_BFC1C904(CPUState* cpu) { - cpu->pc = 0xBFC1C904u; - SCPH1001_func_1FC1C8EC(cpu); -} - -void SCPH1001_func_1FC1C8EC_cont_BFC1C91C(CPUState* cpu) { - cpu->pc = 0xBFC1C91Cu; - SCPH1001_func_1FC1C8EC(cpu); -} - -void SCPH1001_func_1FC1C8EC_cont_BFC1C934(CPUState* cpu) { - cpu->pc = 0xBFC1C934u; - SCPH1001_func_1FC1C8EC(cpu); -} - -void SCPH1001_func_1FC1C8EC_cont_BFC1C93C(CPUState* cpu) { - cpu->pc = 0xBFC1C93Cu; - SCPH1001_func_1FC1C8EC(cpu); -} - -void SCPH1001_func_1FC1C8EC_cont_BFC1C96C(CPUState* cpu) { - cpu->pc = 0xBFC1C96Cu; - SCPH1001_func_1FC1C8EC(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1C9C8(CPUState* cpu) { - cpu->pc = 0xBFC1C9C8u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1C9DC(CPUState* cpu) { - cpu->pc = 0xBFC1C9DCu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1C9F0(CPUState* cpu) { - cpu->pc = 0xBFC1C9F0u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA00(CPUState* cpu) { - cpu->pc = 0xBFC1CA00u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA14(CPUState* cpu) { - cpu->pc = 0xBFC1CA14u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA1C(CPUState* cpu) { - cpu->pc = 0xBFC1CA1Cu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA24(CPUState* cpu) { - cpu->pc = 0xBFC1CA24u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA2C(CPUState* cpu) { - cpu->pc = 0xBFC1CA2Cu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA34(CPUState* cpu) { - cpu->pc = 0xBFC1CA34u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA38(CPUState* cpu) { - cpu->pc = 0xBFC1CA38u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA48(CPUState* cpu) { - cpu->pc = 0xBFC1CA48u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA50(CPUState* cpu) { - cpu->pc = 0xBFC1CA50u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA58(CPUState* cpu) { - cpu->pc = 0xBFC1CA58u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA5C(CPUState* cpu) { - cpu->pc = 0xBFC1CA5Cu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA6C(CPUState* cpu) { - cpu->pc = 0xBFC1CA6Cu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA74(CPUState* cpu) { - cpu->pc = 0xBFC1CA74u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA7C(CPUState* cpu) { - cpu->pc = 0xBFC1CA7Cu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA80(CPUState* cpu) { - cpu->pc = 0xBFC1CA80u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA90(CPUState* cpu) { - cpu->pc = 0xBFC1CA90u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CA98(CPUState* cpu) { - cpu->pc = 0xBFC1CA98u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAA0(CPUState* cpu) { - cpu->pc = 0xBFC1CAA0u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAA4(CPUState* cpu) { - cpu->pc = 0xBFC1CAA4u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAB4(CPUState* cpu) { - cpu->pc = 0xBFC1CAB4u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CABC(CPUState* cpu) { - cpu->pc = 0xBFC1CABCu; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAC4(CPUState* cpu) { - cpu->pc = 0xBFC1CAC4u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAC8(CPUState* cpu) { - cpu->pc = 0xBFC1CAC8u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAD8(CPUState* cpu) { - cpu->pc = 0xBFC1CAD8u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAE0(CPUState* cpu) { - cpu->pc = 0xBFC1CAE0u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1C9B4_cont_BFC1CAE4(CPUState* cpu) { - cpu->pc = 0xBFC1CAE4u; - SCPH1001_func_1FC1C9B4(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB08(CPUState* cpu) { - cpu->pc = 0xBFC1CB08u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB2C(CPUState* cpu) { - cpu->pc = 0xBFC1CB2Cu; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB34(CPUState* cpu) { - cpu->pc = 0xBFC1CB34u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB3C(CPUState* cpu) { - cpu->pc = 0xBFC1CB3Cu; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB48(CPUState* cpu) { - cpu->pc = 0xBFC1CB48u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB54(CPUState* cpu) { - cpu->pc = 0xBFC1CB54u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB5C(CPUState* cpu) { - cpu->pc = 0xBFC1CB5Cu; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB68(CPUState* cpu) { - cpu->pc = 0xBFC1CB68u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB70(CPUState* cpu) { - cpu->pc = 0xBFC1CB70u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB7C(CPUState* cpu) { - cpu->pc = 0xBFC1CB7Cu; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB88(CPUState* cpu) { - cpu->pc = 0xBFC1CB88u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB90(CPUState* cpu) { - cpu->pc = 0xBFC1CB90u; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CAF0_cont_BFC1CB9C(CPUState* cpu) { - cpu->pc = 0xBFC1CB9Cu; - SCPH1001_func_1FC1CAF0(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBCC(CPUState* cpu) { - cpu->pc = 0xBFC1CBCCu; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBD8(CPUState* cpu) { - cpu->pc = 0xBFC1CBD8u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBE0(CPUState* cpu) { - cpu->pc = 0xBFC1CBE0u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBE4(CPUState* cpu) { - cpu->pc = 0xBFC1CBE4u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBF0(CPUState* cpu) { - cpu->pc = 0xBFC1CBF0u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CBF4(CPUState* cpu) { - cpu->pc = 0xBFC1CBF4u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CC3C(CPUState* cpu) { - cpu->pc = 0xBFC1CC3Cu; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CC88(CPUState* cpu) { - cpu->pc = 0xBFC1CC88u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CC90(CPUState* cpu) { - cpu->pc = 0xBFC1CC90u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CCB0(CPUState* cpu) { - cpu->pc = 0xBFC1CCB0u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CCB8(CPUState* cpu) { - cpu->pc = 0xBFC1CCB8u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CCCC(CPUState* cpu) { - cpu->pc = 0xBFC1CCCCu; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CCDC(CPUState* cpu) { - cpu->pc = 0xBFC1CCDCu; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CCF0(CPUState* cpu) { - cpu->pc = 0xBFC1CCF0u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CD00(CPUState* cpu) { - cpu->pc = 0xBFC1CD00u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CBAC_cont_BFC1CD30(CPUState* cpu) { - cpu->pc = 0xBFC1CD30u; - SCPH1001_func_1FC1CBAC(cpu); -} - -void SCPH1001_func_1FC1CD40_cont_BFC1CD64(CPUState* cpu) { - cpu->pc = 0xBFC1CD64u; - SCPH1001_func_1FC1CD40(cpu); -} - -void SCPH1001_func_1FC1CD40_cont_BFC1CD68(CPUState* cpu) { - cpu->pc = 0xBFC1CD68u; - SCPH1001_func_1FC1CD40(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CDF0(CPUState* cpu) { - cpu->pc = 0xBFC1CDF0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE04(CPUState* cpu) { - cpu->pc = 0xBFC1CE04u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE24(CPUState* cpu) { - cpu->pc = 0xBFC1CE24u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE3C(CPUState* cpu) { - cpu->pc = 0xBFC1CE3Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE58(CPUState* cpu) { - cpu->pc = 0xBFC1CE58u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE6C(CPUState* cpu) { - cpu->pc = 0xBFC1CE6Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE74(CPUState* cpu) { - cpu->pc = 0xBFC1CE74u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE7C(CPUState* cpu) { - cpu->pc = 0xBFC1CE7Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE84(CPUState* cpu) { - cpu->pc = 0xBFC1CE84u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CE8C(CPUState* cpu) { - cpu->pc = 0xBFC1CE8Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CEB0(CPUState* cpu) { - cpu->pc = 0xBFC1CEB0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CEC0(CPUState* cpu) { - cpu->pc = 0xBFC1CEC0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CED4(CPUState* cpu) { - cpu->pc = 0xBFC1CED4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CEE8(CPUState* cpu) { - cpu->pc = 0xBFC1CEE8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CEF0(CPUState* cpu) { - cpu->pc = 0xBFC1CEF0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CEF8(CPUState* cpu) { - cpu->pc = 0xBFC1CEF8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF00(CPUState* cpu) { - cpu->pc = 0xBFC1CF00u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF08(CPUState* cpu) { - cpu->pc = 0xBFC1CF08u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF1C(CPUState* cpu) { - cpu->pc = 0xBFC1CF1Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF48(CPUState* cpu) { - cpu->pc = 0xBFC1CF48u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF50(CPUState* cpu) { - cpu->pc = 0xBFC1CF50u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF58(CPUState* cpu) { - cpu->pc = 0xBFC1CF58u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CF6C(CPUState* cpu) { - cpu->pc = 0xBFC1CF6Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFA8(CPUState* cpu) { - cpu->pc = 0xBFC1CFA8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFBC(CPUState* cpu) { - cpu->pc = 0xBFC1CFBCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFC4(CPUState* cpu) { - cpu->pc = 0xBFC1CFC4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFE4(CPUState* cpu) { - cpu->pc = 0xBFC1CFE4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFF4(CPUState* cpu) { - cpu->pc = 0xBFC1CFF4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1CFF8(CPUState* cpu) { - cpu->pc = 0xBFC1CFF8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D000(CPUState* cpu) { - cpu->pc = 0xBFC1D000u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D028(CPUState* cpu) { - cpu->pc = 0xBFC1D028u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D03C(CPUState* cpu) { - cpu->pc = 0xBFC1D03Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D054(CPUState* cpu) { - cpu->pc = 0xBFC1D054u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D068(CPUState* cpu) { - cpu->pc = 0xBFC1D068u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D078(CPUState* cpu) { - cpu->pc = 0xBFC1D078u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D090(CPUState* cpu) { - cpu->pc = 0xBFC1D090u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D0A0(CPUState* cpu) { - cpu->pc = 0xBFC1D0A0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D0E4(CPUState* cpu) { - cpu->pc = 0xBFC1D0E4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D118(CPUState* cpu) { - cpu->pc = 0xBFC1D118u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D130(CPUState* cpu) { - cpu->pc = 0xBFC1D130u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D144(CPUState* cpu) { - cpu->pc = 0xBFC1D144u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D154(CPUState* cpu) { - cpu->pc = 0xBFC1D154u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D16C(CPUState* cpu) { - cpu->pc = 0xBFC1D16Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D17C(CPUState* cpu) { - cpu->pc = 0xBFC1D17Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D190(CPUState* cpu) { - cpu->pc = 0xBFC1D190u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D1A4(CPUState* cpu) { - cpu->pc = 0xBFC1D1A4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D1A8(CPUState* cpu) { - cpu->pc = 0xBFC1D1A8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D1B0(CPUState* cpu) { - cpu->pc = 0xBFC1D1B0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D1EC(CPUState* cpu) { - cpu->pc = 0xBFC1D1ECu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D220(CPUState* cpu) { - cpu->pc = 0xBFC1D220u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D234(CPUState* cpu) { - cpu->pc = 0xBFC1D234u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D244(CPUState* cpu) { - cpu->pc = 0xBFC1D244u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D260(CPUState* cpu) { - cpu->pc = 0xBFC1D260u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D268(CPUState* cpu) { - cpu->pc = 0xBFC1D268u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D288(CPUState* cpu) { - cpu->pc = 0xBFC1D288u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D294(CPUState* cpu) { - cpu->pc = 0xBFC1D294u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D2BC(CPUState* cpu) { - cpu->pc = 0xBFC1D2BCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D2C8(CPUState* cpu) { - cpu->pc = 0xBFC1D2C8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D2DC(CPUState* cpu) { - cpu->pc = 0xBFC1D2DCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D2F4(CPUState* cpu) { - cpu->pc = 0xBFC1D2F4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D304(CPUState* cpu) { - cpu->pc = 0xBFC1D304u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D324(CPUState* cpu) { - cpu->pc = 0xBFC1D324u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D348(CPUState* cpu) { - cpu->pc = 0xBFC1D348u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D368(CPUState* cpu) { - cpu->pc = 0xBFC1D368u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D384(CPUState* cpu) { - cpu->pc = 0xBFC1D384u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D388(CPUState* cpu) { - cpu->pc = 0xBFC1D388u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D39C(CPUState* cpu) { - cpu->pc = 0xBFC1D39Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D3BC(CPUState* cpu) { - cpu->pc = 0xBFC1D3BCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D3F4(CPUState* cpu) { - cpu->pc = 0xBFC1D3F4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D414(CPUState* cpu) { - cpu->pc = 0xBFC1D414u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D42C(CPUState* cpu) { - cpu->pc = 0xBFC1D42Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D44C(CPUState* cpu) { - cpu->pc = 0xBFC1D44Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D454(CPUState* cpu) { - cpu->pc = 0xBFC1D454u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D468(CPUState* cpu) { - cpu->pc = 0xBFC1D468u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D470(CPUState* cpu) { - cpu->pc = 0xBFC1D470u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D480(CPUState* cpu) { - cpu->pc = 0xBFC1D480u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D4BC(CPUState* cpu) { - cpu->pc = 0xBFC1D4BCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D4F4(CPUState* cpu) { - cpu->pc = 0xBFC1D4F4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D508(CPUState* cpu) { - cpu->pc = 0xBFC1D508u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D514(CPUState* cpu) { - cpu->pc = 0xBFC1D514u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D528(CPUState* cpu) { - cpu->pc = 0xBFC1D528u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D53C(CPUState* cpu) { - cpu->pc = 0xBFC1D53Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D550(CPUState* cpu) { - cpu->pc = 0xBFC1D550u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D58C(CPUState* cpu) { - cpu->pc = 0xBFC1D58Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D59C(CPUState* cpu) { - cpu->pc = 0xBFC1D59Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D5D0(CPUState* cpu) { - cpu->pc = 0xBFC1D5D0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D5E0(CPUState* cpu) { - cpu->pc = 0xBFC1D5E0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D5F0(CPUState* cpu) { - cpu->pc = 0xBFC1D5F0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D608(CPUState* cpu) { - cpu->pc = 0xBFC1D608u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D618(CPUState* cpu) { - cpu->pc = 0xBFC1D618u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D61C(CPUState* cpu) { - cpu->pc = 0xBFC1D61Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D628(CPUState* cpu) { - cpu->pc = 0xBFC1D628u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D630(CPUState* cpu) { - cpu->pc = 0xBFC1D630u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D638(CPUState* cpu) { - cpu->pc = 0xBFC1D638u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D640(CPUState* cpu) { - cpu->pc = 0xBFC1D640u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D664(CPUState* cpu) { - cpu->pc = 0xBFC1D664u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D66C(CPUState* cpu) { - cpu->pc = 0xBFC1D66Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D690(CPUState* cpu) { - cpu->pc = 0xBFC1D690u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D6A8(CPUState* cpu) { - cpu->pc = 0xBFC1D6A8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D6B8(CPUState* cpu) { - cpu->pc = 0xBFC1D6B8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D6D8(CPUState* cpu) { - cpu->pc = 0xBFC1D6D8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D6EC(CPUState* cpu) { - cpu->pc = 0xBFC1D6ECu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D70C(CPUState* cpu) { - cpu->pc = 0xBFC1D70Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D718(CPUState* cpu) { - cpu->pc = 0xBFC1D718u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D71C(CPUState* cpu) { - cpu->pc = 0xBFC1D71Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D730(CPUState* cpu) { - cpu->pc = 0xBFC1D730u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D750(CPUState* cpu) { - cpu->pc = 0xBFC1D750u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D770(CPUState* cpu) { - cpu->pc = 0xBFC1D770u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D790(CPUState* cpu) { - cpu->pc = 0xBFC1D790u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D798(CPUState* cpu) { - cpu->pc = 0xBFC1D798u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D7AC(CPUState* cpu) { - cpu->pc = 0xBFC1D7ACu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D7C0(CPUState* cpu) { - cpu->pc = 0xBFC1D7C0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D7D0(CPUState* cpu) { - cpu->pc = 0xBFC1D7D0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D804(CPUState* cpu) { - cpu->pc = 0xBFC1D804u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D814(CPUState* cpu) { - cpu->pc = 0xBFC1D814u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D81C(CPUState* cpu) { - cpu->pc = 0xBFC1D81Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D824(CPUState* cpu) { - cpu->pc = 0xBFC1D824u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D850(CPUState* cpu) { - cpu->pc = 0xBFC1D850u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D86C(CPUState* cpu) { - cpu->pc = 0xBFC1D86Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D874(CPUState* cpu) { - cpu->pc = 0xBFC1D874u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D87C(CPUState* cpu) { - cpu->pc = 0xBFC1D87Cu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8A8(CPUState* cpu) { - cpu->pc = 0xBFC1D8A8u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8B0(CPUState* cpu) { - cpu->pc = 0xBFC1D8B0u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8C4(CPUState* cpu) { - cpu->pc = 0xBFC1D8C4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8CC(CPUState* cpu) { - cpu->pc = 0xBFC1D8CCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8D4(CPUState* cpu) { - cpu->pc = 0xBFC1D8D4u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8DC(CPUState* cpu) { - cpu->pc = 0xBFC1D8DCu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D8EC(CPUState* cpu) { - cpu->pc = 0xBFC1D8ECu; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1CDD8_cont_BFC1D970(CPUState* cpu) { - cpu->pc = 0xBFC1D970u; - SCPH1001_func_1FC1CDD8(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1D9F8(CPUState* cpu) { - cpu->pc = 0xBFC1D9F8u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA00(CPUState* cpu) { - cpu->pc = 0xBFC1DA00u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA08(CPUState* cpu) { - cpu->pc = 0xBFC1DA08u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA10(CPUState* cpu) { - cpu->pc = 0xBFC1DA10u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA18(CPUState* cpu) { - cpu->pc = 0xBFC1DA18u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA30(CPUState* cpu) { - cpu->pc = 0xBFC1DA30u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA38(CPUState* cpu) { - cpu->pc = 0xBFC1DA38u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA40(CPUState* cpu) { - cpu->pc = 0xBFC1DA40u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA60(CPUState* cpu) { - cpu->pc = 0xBFC1DA60u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA68(CPUState* cpu) { - cpu->pc = 0xBFC1DA68u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA70(CPUState* cpu) { - cpu->pc = 0xBFC1DA70u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA78(CPUState* cpu) { - cpu->pc = 0xBFC1DA78u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA90(CPUState* cpu) { - cpu->pc = 0xBFC1DA90u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DA98(CPUState* cpu) { - cpu->pc = 0xBFC1DA98u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAA0(CPUState* cpu) { - cpu->pc = 0xBFC1DAA0u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAAC(CPUState* cpu) { - cpu->pc = 0xBFC1DAACu; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAB4(CPUState* cpu) { - cpu->pc = 0xBFC1DAB4u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAB8(CPUState* cpu) { - cpu->pc = 0xBFC1DAB8u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAC4(CPUState* cpu) { - cpu->pc = 0xBFC1DAC4u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAD8(CPUState* cpu) { - cpu->pc = 0xBFC1DAD8u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAF4(CPUState* cpu) { - cpu->pc = 0xBFC1DAF4u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DAFC(CPUState* cpu) { - cpu->pc = 0xBFC1DAFCu; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB04(CPUState* cpu) { - cpu->pc = 0xBFC1DB04u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB0C(CPUState* cpu) { - cpu->pc = 0xBFC1DB0Cu; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB20(CPUState* cpu) { - cpu->pc = 0xBFC1DB20u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB30(CPUState* cpu) { - cpu->pc = 0xBFC1DB30u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB48(CPUState* cpu) { - cpu->pc = 0xBFC1DB48u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB60(CPUState* cpu) { - cpu->pc = 0xBFC1DB60u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB74(CPUState* cpu) { - cpu->pc = 0xBFC1DB74u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB78(CPUState* cpu) { - cpu->pc = 0xBFC1DB78u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB90(CPUState* cpu) { - cpu->pc = 0xBFC1DB90u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DB9C(CPUState* cpu) { - cpu->pc = 0xBFC1DB9Cu; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBAC(CPUState* cpu) { - cpu->pc = 0xBFC1DBACu; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBB0(CPUState* cpu) { - cpu->pc = 0xBFC1DBB0u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBB8(CPUState* cpu) { - cpu->pc = 0xBFC1DBB8u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBC4(CPUState* cpu) { - cpu->pc = 0xBFC1DBC4u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBD0(CPUState* cpu) { - cpu->pc = 0xBFC1DBD0u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBE0(CPUState* cpu) { - cpu->pc = 0xBFC1DBE0u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1D9C4_cont_BFC1DBE4(CPUState* cpu) { - cpu->pc = 0xBFC1DBE4u; - SCPH1001_func_1FC1D9C4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DC04(CPUState* cpu) { - cpu->pc = 0xBFC1DC04u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DC10(CPUState* cpu) { - cpu->pc = 0xBFC1DC10u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DC54(CPUState* cpu) { - cpu->pc = 0xBFC1DC54u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DCA4(CPUState* cpu) { - cpu->pc = 0xBFC1DCA4u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DCBC(CPUState* cpu) { - cpu->pc = 0xBFC1DCBCu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DCDC(CPUState* cpu) { - cpu->pc = 0xBFC1DCDCu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DCFC(CPUState* cpu) { - cpu->pc = 0xBFC1DCFCu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD1C(CPUState* cpu) { - cpu->pc = 0xBFC1DD1Cu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD3C(CPUState* cpu) { - cpu->pc = 0xBFC1DD3Cu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD5C(CPUState* cpu) { - cpu->pc = 0xBFC1DD5Cu; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD70(CPUState* cpu) { - cpu->pc = 0xBFC1DD70u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD80(CPUState* cpu) { - cpu->pc = 0xBFC1DD80u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DD90(CPUState* cpu) { - cpu->pc = 0xBFC1DD90u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DDA0(CPUState* cpu) { - cpu->pc = 0xBFC1DDA0u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DDB0(CPUState* cpu) { - cpu->pc = 0xBFC1DDB0u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DDC0(CPUState* cpu) { - cpu->pc = 0xBFC1DDC0u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DBF4_cont_BFC1DDC8(CPUState* cpu) { - cpu->pc = 0xBFC1DDC8u; - SCPH1001_func_1FC1DBF4(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DDF4(CPUState* cpu) { - cpu->pc = 0xBFC1DDF4u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DE44(CPUState* cpu) { - cpu->pc = 0xBFC1DE44u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DE78(CPUState* cpu) { - cpu->pc = 0xBFC1DE78u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DE90(CPUState* cpu) { - cpu->pc = 0xBFC1DE90u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DEAC(CPUState* cpu) { - cpu->pc = 0xBFC1DEACu; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DEC4(CPUState* cpu) { - cpu->pc = 0xBFC1DEC4u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DED8(CPUState* cpu) { - cpu->pc = 0xBFC1DED8u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DDD8_cont_BFC1DEF0(CPUState* cpu) { - cpu->pc = 0xBFC1DEF0u; - SCPH1001_func_1FC1DDD8(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DF94(CPUState* cpu) { - cpu->pc = 0xBFC1DF94u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DFB0(CPUState* cpu) { - cpu->pc = 0xBFC1DFB0u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DFD0(CPUState* cpu) { - cpu->pc = 0xBFC1DFD0u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DFD8(CPUState* cpu) { - cpu->pc = 0xBFC1DFD8u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DFEC(CPUState* cpu) { - cpu->pc = 0xBFC1DFECu; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1DFF4(CPUState* cpu) { - cpu->pc = 0xBFC1DFF4u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E024(CPUState* cpu) { - cpu->pc = 0xBFC1E024u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E03C(CPUState* cpu) { - cpu->pc = 0xBFC1E03Cu; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E044(CPUState* cpu) { - cpu->pc = 0xBFC1E044u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E058(CPUState* cpu) { - cpu->pc = 0xBFC1E058u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E070(CPUState* cpu) { - cpu->pc = 0xBFC1E070u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E078(CPUState* cpu) { - cpu->pc = 0xBFC1E078u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E07C(CPUState* cpu) { - cpu->pc = 0xBFC1E07Cu; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E084(CPUState* cpu) { - cpu->pc = 0xBFC1E084u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E09C(CPUState* cpu) { - cpu->pc = 0xBFC1E09Cu; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E0A4(CPUState* cpu) { - cpu->pc = 0xBFC1E0A4u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E0A8(CPUState* cpu) { - cpu->pc = 0xBFC1E0A8u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1DF50_cont_BFC1E0B4(CPUState* cpu) { - cpu->pc = 0xBFC1E0B4u; - SCPH1001_func_1FC1DF50(cpu); -} - -void SCPH1001_func_1FC1E0C4_cont_BFC1E0DC(CPUState* cpu) { - cpu->pc = 0xBFC1E0DCu; - SCPH1001_func_1FC1E0C4(cpu); -} - -void SCPH1001_func_1FC1E0C4_cont_BFC1E0FC(CPUState* cpu) { - cpu->pc = 0xBFC1E0FCu; - SCPH1001_func_1FC1E0C4(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E118(CPUState* cpu) { - cpu->pc = 0xBFC1E118u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E130(CPUState* cpu) { - cpu->pc = 0xBFC1E130u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E13C(CPUState* cpu) { - cpu->pc = 0xBFC1E13Cu; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E160(CPUState* cpu) { - cpu->pc = 0xBFC1E160u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E18C(CPUState* cpu) { - cpu->pc = 0xBFC1E18Cu; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E194(CPUState* cpu) { - cpu->pc = 0xBFC1E194u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E19C(CPUState* cpu) { - cpu->pc = 0xBFC1E19Cu; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E1B0(CPUState* cpu) { - cpu->pc = 0xBFC1E1B0u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E10C_cont_BFC1E1B4(CPUState* cpu) { - cpu->pc = 0xBFC1E1B4u; - SCPH1001_func_1FC1E10C(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E1EC(CPUState* cpu) { - cpu->pc = 0xBFC1E1ECu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E208(CPUState* cpu) { - cpu->pc = 0xBFC1E208u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E210(CPUState* cpu) { - cpu->pc = 0xBFC1E210u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E218(CPUState* cpu) { - cpu->pc = 0xBFC1E218u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E228(CPUState* cpu) { - cpu->pc = 0xBFC1E228u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E260(CPUState* cpu) { - cpu->pc = 0xBFC1E260u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E268(CPUState* cpu) { - cpu->pc = 0xBFC1E268u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E28C(CPUState* cpu) { - cpu->pc = 0xBFC1E28Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E294(CPUState* cpu) { - cpu->pc = 0xBFC1E294u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E2B8(CPUState* cpu) { - cpu->pc = 0xBFC1E2B8u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E2C0(CPUState* cpu) { - cpu->pc = 0xBFC1E2C0u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E2D0(CPUState* cpu) { - cpu->pc = 0xBFC1E2D0u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E2D8(CPUState* cpu) { - cpu->pc = 0xBFC1E2D8u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E2E0(CPUState* cpu) { - cpu->pc = 0xBFC1E2E0u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E300(CPUState* cpu) { - cpu->pc = 0xBFC1E300u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E308(CPUState* cpu) { - cpu->pc = 0xBFC1E308u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E314(CPUState* cpu) { - cpu->pc = 0xBFC1E314u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E31C(CPUState* cpu) { - cpu->pc = 0xBFC1E31Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E324(CPUState* cpu) { - cpu->pc = 0xBFC1E324u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E32C(CPUState* cpu) { - cpu->pc = 0xBFC1E32Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E33C(CPUState* cpu) { - cpu->pc = 0xBFC1E33Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E344(CPUState* cpu) { - cpu->pc = 0xBFC1E344u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E350(CPUState* cpu) { - cpu->pc = 0xBFC1E350u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E358(CPUState* cpu) { - cpu->pc = 0xBFC1E358u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E36C(CPUState* cpu) { - cpu->pc = 0xBFC1E36Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E374(CPUState* cpu) { - cpu->pc = 0xBFC1E374u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E37C(CPUState* cpu) { - cpu->pc = 0xBFC1E37Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E384(CPUState* cpu) { - cpu->pc = 0xBFC1E384u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E38C(CPUState* cpu) { - cpu->pc = 0xBFC1E38Cu; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E398(CPUState* cpu) { - cpu->pc = 0xBFC1E398u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E1CC_cont_BFC1E3A4(CPUState* cpu) { - cpu->pc = 0xBFC1E3A4u; - SCPH1001_func_1FC1E1CC(cpu); -} - -void SCPH1001_func_1FC1E3AC_cont_BFC1E3B4(CPUState* cpu) { - cpu->pc = 0xBFC1E3B4u; - SCPH1001_func_1FC1E3AC(cpu); -} - -void SCPH1001_func_1FC1E3AC_cont_BFC1E3BC(CPUState* cpu) { - cpu->pc = 0xBFC1E3BCu; - SCPH1001_func_1FC1E3AC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E3E4(CPUState* cpu) { - cpu->pc = 0xBFC1E3E4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E3F0(CPUState* cpu) { - cpu->pc = 0xBFC1E3F0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E410(CPUState* cpu) { - cpu->pc = 0xBFC1E410u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E42C(CPUState* cpu) { - cpu->pc = 0xBFC1E42Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E448(CPUState* cpu) { - cpu->pc = 0xBFC1E448u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E450(CPUState* cpu) { - cpu->pc = 0xBFC1E450u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E474(CPUState* cpu) { - cpu->pc = 0xBFC1E474u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E47C(CPUState* cpu) { - cpu->pc = 0xBFC1E47Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E48C(CPUState* cpu) { - cpu->pc = 0xBFC1E48Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E4C0(CPUState* cpu) { - cpu->pc = 0xBFC1E4C0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E4DC(CPUState* cpu) { - cpu->pc = 0xBFC1E4DCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E4EC(CPUState* cpu) { - cpu->pc = 0xBFC1E4ECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E508(CPUState* cpu) { - cpu->pc = 0xBFC1E508u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E518(CPUState* cpu) { - cpu->pc = 0xBFC1E518u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E528(CPUState* cpu) { - cpu->pc = 0xBFC1E528u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E538(CPUState* cpu) { - cpu->pc = 0xBFC1E538u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E548(CPUState* cpu) { - cpu->pc = 0xBFC1E548u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E558(CPUState* cpu) { - cpu->pc = 0xBFC1E558u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E568(CPUState* cpu) { - cpu->pc = 0xBFC1E568u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E578(CPUState* cpu) { - cpu->pc = 0xBFC1E578u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E58C(CPUState* cpu) { - cpu->pc = 0xBFC1E58Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5A4(CPUState* cpu) { - cpu->pc = 0xBFC1E5A4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5B8(CPUState* cpu) { - cpu->pc = 0xBFC1E5B8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5C4(CPUState* cpu) { - cpu->pc = 0xBFC1E5C4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5D0(CPUState* cpu) { - cpu->pc = 0xBFC1E5D0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5E4(CPUState* cpu) { - cpu->pc = 0xBFC1E5E4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5EC(CPUState* cpu) { - cpu->pc = 0xBFC1E5ECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E5FC(CPUState* cpu) { - cpu->pc = 0xBFC1E5FCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E624(CPUState* cpu) { - cpu->pc = 0xBFC1E624u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E630(CPUState* cpu) { - cpu->pc = 0xBFC1E630u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E640(CPUState* cpu) { - cpu->pc = 0xBFC1E640u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E64C(CPUState* cpu) { - cpu->pc = 0xBFC1E64Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E654(CPUState* cpu) { - cpu->pc = 0xBFC1E654u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E668(CPUState* cpu) { - cpu->pc = 0xBFC1E668u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E67C(CPUState* cpu) { - cpu->pc = 0xBFC1E67Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E688(CPUState* cpu) { - cpu->pc = 0xBFC1E688u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E694(CPUState* cpu) { - cpu->pc = 0xBFC1E694u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E6A4(CPUState* cpu) { - cpu->pc = 0xBFC1E6A4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E6BC(CPUState* cpu) { - cpu->pc = 0xBFC1E6BCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E6D4(CPUState* cpu) { - cpu->pc = 0xBFC1E6D4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E6E4(CPUState* cpu) { - cpu->pc = 0xBFC1E6E4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E6FC(CPUState* cpu) { - cpu->pc = 0xBFC1E6FCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E708(CPUState* cpu) { - cpu->pc = 0xBFC1E708u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E718(CPUState* cpu) { - cpu->pc = 0xBFC1E718u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E730(CPUState* cpu) { - cpu->pc = 0xBFC1E730u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E738(CPUState* cpu) { - cpu->pc = 0xBFC1E738u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E74C(CPUState* cpu) { - cpu->pc = 0xBFC1E74Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E77C(CPUState* cpu) { - cpu->pc = 0xBFC1E77Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E790(CPUState* cpu) { - cpu->pc = 0xBFC1E790u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E798(CPUState* cpu) { - cpu->pc = 0xBFC1E798u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7A0(CPUState* cpu) { - cpu->pc = 0xBFC1E7A0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7A8(CPUState* cpu) { - cpu->pc = 0xBFC1E7A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7B0(CPUState* cpu) { - cpu->pc = 0xBFC1E7B0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7B8(CPUState* cpu) { - cpu->pc = 0xBFC1E7B8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7C4(CPUState* cpu) { - cpu->pc = 0xBFC1E7C4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7D8(CPUState* cpu) { - cpu->pc = 0xBFC1E7D8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E7E0(CPUState* cpu) { - cpu->pc = 0xBFC1E7E0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E800(CPUState* cpu) { - cpu->pc = 0xBFC1E800u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E80C(CPUState* cpu) { - cpu->pc = 0xBFC1E80Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E824(CPUState* cpu) { - cpu->pc = 0xBFC1E824u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E840(CPUState* cpu) { - cpu->pc = 0xBFC1E840u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E84C(CPUState* cpu) { - cpu->pc = 0xBFC1E84Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E864(CPUState* cpu) { - cpu->pc = 0xBFC1E864u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E86C(CPUState* cpu) { - cpu->pc = 0xBFC1E86Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E874(CPUState* cpu) { - cpu->pc = 0xBFC1E874u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E880(CPUState* cpu) { - cpu->pc = 0xBFC1E880u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E89C(CPUState* cpu) { - cpu->pc = 0xBFC1E89Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8AC(CPUState* cpu) { - cpu->pc = 0xBFC1E8ACu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8CC(CPUState* cpu) { - cpu->pc = 0xBFC1E8CCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8DC(CPUState* cpu) { - cpu->pc = 0xBFC1E8DCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8E8(CPUState* cpu) { - cpu->pc = 0xBFC1E8E8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8F0(CPUState* cpu) { - cpu->pc = 0xBFC1E8F0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E8FC(CPUState* cpu) { - cpu->pc = 0xBFC1E8FCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E910(CPUState* cpu) { - cpu->pc = 0xBFC1E910u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E918(CPUState* cpu) { - cpu->pc = 0xBFC1E918u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E92C(CPUState* cpu) { - cpu->pc = 0xBFC1E92Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E934(CPUState* cpu) { - cpu->pc = 0xBFC1E934u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E954(CPUState* cpu) { - cpu->pc = 0xBFC1E954u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E95C(CPUState* cpu) { - cpu->pc = 0xBFC1E95Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E964(CPUState* cpu) { - cpu->pc = 0xBFC1E964u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E96C(CPUState* cpu) { - cpu->pc = 0xBFC1E96Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E974(CPUState* cpu) { - cpu->pc = 0xBFC1E974u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E98C(CPUState* cpu) { - cpu->pc = 0xBFC1E98Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9A0(CPUState* cpu) { - cpu->pc = 0xBFC1E9A0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9B4(CPUState* cpu) { - cpu->pc = 0xBFC1E9B4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9C8(CPUState* cpu) { - cpu->pc = 0xBFC1E9C8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9D0(CPUState* cpu) { - cpu->pc = 0xBFC1E9D0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9D8(CPUState* cpu) { - cpu->pc = 0xBFC1E9D8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1E9F8(CPUState* cpu) { - cpu->pc = 0xBFC1E9F8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA00(CPUState* cpu) { - cpu->pc = 0xBFC1EA00u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA08(CPUState* cpu) { - cpu->pc = 0xBFC1EA08u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA10(CPUState* cpu) { - cpu->pc = 0xBFC1EA10u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA18(CPUState* cpu) { - cpu->pc = 0xBFC1EA18u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA20(CPUState* cpu) { - cpu->pc = 0xBFC1EA20u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA2C(CPUState* cpu) { - cpu->pc = 0xBFC1EA2Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA34(CPUState* cpu) { - cpu->pc = 0xBFC1EA34u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA4C(CPUState* cpu) { - cpu->pc = 0xBFC1EA4Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA60(CPUState* cpu) { - cpu->pc = 0xBFC1EA60u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA78(CPUState* cpu) { - cpu->pc = 0xBFC1EA78u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EA84(CPUState* cpu) { - cpu->pc = 0xBFC1EA84u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAA0(CPUState* cpu) { - cpu->pc = 0xBFC1EAA0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAA8(CPUState* cpu) { - cpu->pc = 0xBFC1EAA8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAB0(CPUState* cpu) { - cpu->pc = 0xBFC1EAB0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAC0(CPUState* cpu) { - cpu->pc = 0xBFC1EAC0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAC8(CPUState* cpu) { - cpu->pc = 0xBFC1EAC8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAD0(CPUState* cpu) { - cpu->pc = 0xBFC1EAD0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAE4(CPUState* cpu) { - cpu->pc = 0xBFC1EAE4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAEC(CPUState* cpu) { - cpu->pc = 0xBFC1EAECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAF4(CPUState* cpu) { - cpu->pc = 0xBFC1EAF4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EAFC(CPUState* cpu) { - cpu->pc = 0xBFC1EAFCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB10(CPUState* cpu) { - cpu->pc = 0xBFC1EB10u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB1C(CPUState* cpu) { - cpu->pc = 0xBFC1EB1Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB24(CPUState* cpu) { - cpu->pc = 0xBFC1EB24u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB3C(CPUState* cpu) { - cpu->pc = 0xBFC1EB3Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB50(CPUState* cpu) { - cpu->pc = 0xBFC1EB50u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB68(CPUState* cpu) { - cpu->pc = 0xBFC1EB68u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB74(CPUState* cpu) { - cpu->pc = 0xBFC1EB74u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB94(CPUState* cpu) { - cpu->pc = 0xBFC1EB94u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EB9C(CPUState* cpu) { - cpu->pc = 0xBFC1EB9Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBA4(CPUState* cpu) { - cpu->pc = 0xBFC1EBA4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBAC(CPUState* cpu) { - cpu->pc = 0xBFC1EBACu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBB8(CPUState* cpu) { - cpu->pc = 0xBFC1EBB8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBC0(CPUState* cpu) { - cpu->pc = 0xBFC1EBC0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBC8(CPUState* cpu) { - cpu->pc = 0xBFC1EBC8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBDC(CPUState* cpu) { - cpu->pc = 0xBFC1EBDCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EBF0(CPUState* cpu) { - cpu->pc = 0xBFC1EBF0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC00(CPUState* cpu) { - cpu->pc = 0xBFC1EC00u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC1C(CPUState* cpu) { - cpu->pc = 0xBFC1EC1Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC24(CPUState* cpu) { - cpu->pc = 0xBFC1EC24u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC2C(CPUState* cpu) { - cpu->pc = 0xBFC1EC2Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC4C(CPUState* cpu) { - cpu->pc = 0xBFC1EC4Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC54(CPUState* cpu) { - cpu->pc = 0xBFC1EC54u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC74(CPUState* cpu) { - cpu->pc = 0xBFC1EC74u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EC7C(CPUState* cpu) { - cpu->pc = 0xBFC1EC7Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECA0(CPUState* cpu) { - cpu->pc = 0xBFC1ECA0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECA8(CPUState* cpu) { - cpu->pc = 0xBFC1ECA8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECB0(CPUState* cpu) { - cpu->pc = 0xBFC1ECB0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECD0(CPUState* cpu) { - cpu->pc = 0xBFC1ECD0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECD8(CPUState* cpu) { - cpu->pc = 0xBFC1ECD8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ECE0(CPUState* cpu) { - cpu->pc = 0xBFC1ECE0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED00(CPUState* cpu) { - cpu->pc = 0xBFC1ED00u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED10(CPUState* cpu) { - cpu->pc = 0xBFC1ED10u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED1C(CPUState* cpu) { - cpu->pc = 0xBFC1ED1Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED34(CPUState* cpu) { - cpu->pc = 0xBFC1ED34u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED40(CPUState* cpu) { - cpu->pc = 0xBFC1ED40u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED48(CPUState* cpu) { - cpu->pc = 0xBFC1ED48u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED50(CPUState* cpu) { - cpu->pc = 0xBFC1ED50u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED64(CPUState* cpu) { - cpu->pc = 0xBFC1ED64u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED78(CPUState* cpu) { - cpu->pc = 0xBFC1ED78u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED80(CPUState* cpu) { - cpu->pc = 0xBFC1ED80u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED88(CPUState* cpu) { - cpu->pc = 0xBFC1ED88u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED90(CPUState* cpu) { - cpu->pc = 0xBFC1ED90u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1ED98(CPUState* cpu) { - cpu->pc = 0xBFC1ED98u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EDA0(CPUState* cpu) { - cpu->pc = 0xBFC1EDA0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EDB4(CPUState* cpu) { - cpu->pc = 0xBFC1EDB4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EDD4(CPUState* cpu) { - cpu->pc = 0xBFC1EDD4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EDE4(CPUState* cpu) { - cpu->pc = 0xBFC1EDE4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EDF0(CPUState* cpu) { - cpu->pc = 0xBFC1EDF0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE08(CPUState* cpu) { - cpu->pc = 0xBFC1EE08u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE14(CPUState* cpu) { - cpu->pc = 0xBFC1EE14u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE1C(CPUState* cpu) { - cpu->pc = 0xBFC1EE1Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE24(CPUState* cpu) { - cpu->pc = 0xBFC1EE24u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE2C(CPUState* cpu) { - cpu->pc = 0xBFC1EE2Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE34(CPUState* cpu) { - cpu->pc = 0xBFC1EE34u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE48(CPUState* cpu) { - cpu->pc = 0xBFC1EE48u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE5C(CPUState* cpu) { - cpu->pc = 0xBFC1EE5Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE70(CPUState* cpu) { - cpu->pc = 0xBFC1EE70u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE78(CPUState* cpu) { - cpu->pc = 0xBFC1EE78u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EE80(CPUState* cpu) { - cpu->pc = 0xBFC1EE80u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEA0(CPUState* cpu) { - cpu->pc = 0xBFC1EEA0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEA8(CPUState* cpu) { - cpu->pc = 0xBFC1EEA8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEB0(CPUState* cpu) { - cpu->pc = 0xBFC1EEB0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEB8(CPUState* cpu) { - cpu->pc = 0xBFC1EEB8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEC0(CPUState* cpu) { - cpu->pc = 0xBFC1EEC0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EED4(CPUState* cpu) { - cpu->pc = 0xBFC1EED4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEE0(CPUState* cpu) { - cpu->pc = 0xBFC1EEE0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EEEC(CPUState* cpu) { - cpu->pc = 0xBFC1EEECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF00(CPUState* cpu) { - cpu->pc = 0xBFC1EF00u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF28(CPUState* cpu) { - cpu->pc = 0xBFC1EF28u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF34(CPUState* cpu) { - cpu->pc = 0xBFC1EF34u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF38(CPUState* cpu) { - cpu->pc = 0xBFC1EF38u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF40(CPUState* cpu) { - cpu->pc = 0xBFC1EF40u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF4C(CPUState* cpu) { - cpu->pc = 0xBFC1EF4Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF50(CPUState* cpu) { - cpu->pc = 0xBFC1EF50u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF5C(CPUState* cpu) { - cpu->pc = 0xBFC1EF5Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF84(CPUState* cpu) { - cpu->pc = 0xBFC1EF84u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF8C(CPUState* cpu) { - cpu->pc = 0xBFC1EF8Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF90(CPUState* cpu) { - cpu->pc = 0xBFC1EF90u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF94(CPUState* cpu) { - cpu->pc = 0xBFC1EF94u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EF9C(CPUState* cpu) { - cpu->pc = 0xBFC1EF9Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EFA4(CPUState* cpu) { - cpu->pc = 0xBFC1EFA4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EFC4(CPUState* cpu) { - cpu->pc = 0xBFC1EFC4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EFEC(CPUState* cpu) { - cpu->pc = 0xBFC1EFECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EFF4(CPUState* cpu) { - cpu->pc = 0xBFC1EFF4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1EFFC(CPUState* cpu) { - cpu->pc = 0xBFC1EFFCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F01C(CPUState* cpu) { - cpu->pc = 0xBFC1F01Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F024(CPUState* cpu) { - cpu->pc = 0xBFC1F024u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F038(CPUState* cpu) { - cpu->pc = 0xBFC1F038u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F050(CPUState* cpu) { - cpu->pc = 0xBFC1F050u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F058(CPUState* cpu) { - cpu->pc = 0xBFC1F058u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F05C(CPUState* cpu) { - cpu->pc = 0xBFC1F05Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F064(CPUState* cpu) { - cpu->pc = 0xBFC1F064u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F078(CPUState* cpu) { - cpu->pc = 0xBFC1F078u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F08C(CPUState* cpu) { - cpu->pc = 0xBFC1F08Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0A0(CPUState* cpu) { - cpu->pc = 0xBFC1F0A0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0A8(CPUState* cpu) { - cpu->pc = 0xBFC1F0A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0B8(CPUState* cpu) { - cpu->pc = 0xBFC1F0B8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0C0(CPUState* cpu) { - cpu->pc = 0xBFC1F0C0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0C8(CPUState* cpu) { - cpu->pc = 0xBFC1F0C8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0E0(CPUState* cpu) { - cpu->pc = 0xBFC1F0E0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F0E8(CPUState* cpu) { - cpu->pc = 0xBFC1F0E8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F108(CPUState* cpu) { - cpu->pc = 0xBFC1F108u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F124(CPUState* cpu) { - cpu->pc = 0xBFC1F124u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F128(CPUState* cpu) { - cpu->pc = 0xBFC1F128u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F130(CPUState* cpu) { - cpu->pc = 0xBFC1F130u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F138(CPUState* cpu) { - cpu->pc = 0xBFC1F138u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F148(CPUState* cpu) { - cpu->pc = 0xBFC1F148u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F154(CPUState* cpu) { - cpu->pc = 0xBFC1F154u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F160(CPUState* cpu) { - cpu->pc = 0xBFC1F160u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F178(CPUState* cpu) { - cpu->pc = 0xBFC1F178u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F180(CPUState* cpu) { - cpu->pc = 0xBFC1F180u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1A8(CPUState* cpu) { - cpu->pc = 0xBFC1F1A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1B4(CPUState* cpu) { - cpu->pc = 0xBFC1F1B4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1C8(CPUState* cpu) { - cpu->pc = 0xBFC1F1C8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1D4(CPUState* cpu) { - cpu->pc = 0xBFC1F1D4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1E8(CPUState* cpu) { - cpu->pc = 0xBFC1F1E8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F1F4(CPUState* cpu) { - cpu->pc = 0xBFC1F1F4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F208(CPUState* cpu) { - cpu->pc = 0xBFC1F208u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F214(CPUState* cpu) { - cpu->pc = 0xBFC1F214u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F21C(CPUState* cpu) { - cpu->pc = 0xBFC1F21Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F224(CPUState* cpu) { - cpu->pc = 0xBFC1F224u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F230(CPUState* cpu) { - cpu->pc = 0xBFC1F230u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F23C(CPUState* cpu) { - cpu->pc = 0xBFC1F23Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F250(CPUState* cpu) { - cpu->pc = 0xBFC1F250u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F268(CPUState* cpu) { - cpu->pc = 0xBFC1F268u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F278(CPUState* cpu) { - cpu->pc = 0xBFC1F278u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F284(CPUState* cpu) { - cpu->pc = 0xBFC1F284u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F290(CPUState* cpu) { - cpu->pc = 0xBFC1F290u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2A0(CPUState* cpu) { - cpu->pc = 0xBFC1F2A0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2A8(CPUState* cpu) { - cpu->pc = 0xBFC1F2A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2B8(CPUState* cpu) { - cpu->pc = 0xBFC1F2B8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2BC(CPUState* cpu) { - cpu->pc = 0xBFC1F2BCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2C4(CPUState* cpu) { - cpu->pc = 0xBFC1F2C4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2D0(CPUState* cpu) { - cpu->pc = 0xBFC1F2D0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2D8(CPUState* cpu) { - cpu->pc = 0xBFC1F2D8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F2F8(CPUState* cpu) { - cpu->pc = 0xBFC1F2F8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F308(CPUState* cpu) { - cpu->pc = 0xBFC1F308u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F31C(CPUState* cpu) { - cpu->pc = 0xBFC1F31Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F32C(CPUState* cpu) { - cpu->pc = 0xBFC1F32Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F340(CPUState* cpu) { - cpu->pc = 0xBFC1F340u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F348(CPUState* cpu) { - cpu->pc = 0xBFC1F348u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F360(CPUState* cpu) { - cpu->pc = 0xBFC1F360u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F364(CPUState* cpu) { - cpu->pc = 0xBFC1F364u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F370(CPUState* cpu) { - cpu->pc = 0xBFC1F370u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F37C(CPUState* cpu) { - cpu->pc = 0xBFC1F37Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F388(CPUState* cpu) { - cpu->pc = 0xBFC1F388u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F394(CPUState* cpu) { - cpu->pc = 0xBFC1F394u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F39C(CPUState* cpu) { - cpu->pc = 0xBFC1F39Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3A8(CPUState* cpu) { - cpu->pc = 0xBFC1F3A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3AC(CPUState* cpu) { - cpu->pc = 0xBFC1F3ACu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3B4(CPUState* cpu) { - cpu->pc = 0xBFC1F3B4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3C0(CPUState* cpu) { - cpu->pc = 0xBFC1F3C0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3D4(CPUState* cpu) { - cpu->pc = 0xBFC1F3D4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3E4(CPUState* cpu) { - cpu->pc = 0xBFC1F3E4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F3F8(CPUState* cpu) { - cpu->pc = 0xBFC1F3F8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F408(CPUState* cpu) { - cpu->pc = 0xBFC1F408u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F41C(CPUState* cpu) { - cpu->pc = 0xBFC1F41Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F430(CPUState* cpu) { - cpu->pc = 0xBFC1F430u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F440(CPUState* cpu) { - cpu->pc = 0xBFC1F440u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F454(CPUState* cpu) { - cpu->pc = 0xBFC1F454u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F468(CPUState* cpu) { - cpu->pc = 0xBFC1F468u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F478(CPUState* cpu) { - cpu->pc = 0xBFC1F478u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F48C(CPUState* cpu) { - cpu->pc = 0xBFC1F48Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F498(CPUState* cpu) { - cpu->pc = 0xBFC1F498u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4A8(CPUState* cpu) { - cpu->pc = 0xBFC1F4A8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4B4(CPUState* cpu) { - cpu->pc = 0xBFC1F4B4u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4B8(CPUState* cpu) { - cpu->pc = 0xBFC1F4B8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4CC(CPUState* cpu) { - cpu->pc = 0xBFC1F4CCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4E0(CPUState* cpu) { - cpu->pc = 0xBFC1F4E0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F4F8(CPUState* cpu) { - cpu->pc = 0xBFC1F4F8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F50C(CPUState* cpu) { - cpu->pc = 0xBFC1F50Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F518(CPUState* cpu) { - cpu->pc = 0xBFC1F518u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F524(CPUState* cpu) { - cpu->pc = 0xBFC1F524u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F538(CPUState* cpu) { - cpu->pc = 0xBFC1F538u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F540(CPUState* cpu) { - cpu->pc = 0xBFC1F540u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F550(CPUState* cpu) { - cpu->pc = 0xBFC1F550u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F578(CPUState* cpu) { - cpu->pc = 0xBFC1F578u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F584(CPUState* cpu) { - cpu->pc = 0xBFC1F584u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F59C(CPUState* cpu) { - cpu->pc = 0xBFC1F59Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F5B0(CPUState* cpu) { - cpu->pc = 0xBFC1F5B0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F5CC(CPUState* cpu) { - cpu->pc = 0xBFC1F5CCu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F5EC(CPUState* cpu) { - cpu->pc = 0xBFC1F5ECu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F5F8(CPUState* cpu) { - cpu->pc = 0xBFC1F5F8u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F600(CPUState* cpu) { - cpu->pc = 0xBFC1F600u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F608(CPUState* cpu) { - cpu->pc = 0xBFC1F608u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F61C(CPUState* cpu) { - cpu->pc = 0xBFC1F61Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F624(CPUState* cpu) { - cpu->pc = 0xBFC1F624u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F638(CPUState* cpu) { - cpu->pc = 0xBFC1F638u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F640(CPUState* cpu) { - cpu->pc = 0xBFC1F640u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F648(CPUState* cpu) { - cpu->pc = 0xBFC1F648u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F654(CPUState* cpu) { - cpu->pc = 0xBFC1F654u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F668(CPUState* cpu) { - cpu->pc = 0xBFC1F668u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F670(CPUState* cpu) { - cpu->pc = 0xBFC1F670u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F678(CPUState* cpu) { - cpu->pc = 0xBFC1F678u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F680(CPUState* cpu) { - cpu->pc = 0xBFC1F680u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F694(CPUState* cpu) { - cpu->pc = 0xBFC1F694u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F69C(CPUState* cpu) { - cpu->pc = 0xBFC1F69Cu; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1E3CC_cont_BFC1F6A0(CPUState* cpu) { - cpu->pc = 0xBFC1F6A0u; - SCPH1001_func_1FC1E3CC(cpu); -} - -void SCPH1001_func_1FC1F6AC_cont_BFC1F6C8(CPUState* cpu) { - cpu->pc = 0xBFC1F6C8u; - SCPH1001_func_1FC1F6AC(cpu); -} - -void SCPH1001_func_1FC1F6AC_cont_BFC1F704(CPUState* cpu) { - cpu->pc = 0xBFC1F704u; - SCPH1001_func_1FC1F6AC(cpu); -} - -void SCPH1001_func_1FC1F6AC_cont_BFC1F73C(CPUState* cpu) { - cpu->pc = 0xBFC1F73Cu; - SCPH1001_func_1FC1F6AC(cpu); -} - -void SCPH1001_func_1FC1F6AC_cont_BFC1F754(CPUState* cpu) { - cpu->pc = 0xBFC1F754u; - SCPH1001_func_1FC1F6AC(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F7B4(CPUState* cpu) { - cpu->pc = 0xBFC1F7B4u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F7D4(CPUState* cpu) { - cpu->pc = 0xBFC1F7D4u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F7DC(CPUState* cpu) { - cpu->pc = 0xBFC1F7DCu; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F7E4(CPUState* cpu) { - cpu->pc = 0xBFC1F7E4u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F7F8(CPUState* cpu) { - cpu->pc = 0xBFC1F7F8u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F804(CPUState* cpu) { - cpu->pc = 0xBFC1F804u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F824(CPUState* cpu) { - cpu->pc = 0xBFC1F824u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F84C(CPUState* cpu) { - cpu->pc = 0xBFC1F84Cu; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F858(CPUState* cpu) { - cpu->pc = 0xBFC1F858u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F860(CPUState* cpu) { - cpu->pc = 0xBFC1F860u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F868(CPUState* cpu) { - cpu->pc = 0xBFC1F868u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F86C(CPUState* cpu) { - cpu->pc = 0xBFC1F86Cu; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F878(CPUState* cpu) { - cpu->pc = 0xBFC1F878u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F8A8(CPUState* cpu) { - cpu->pc = 0xBFC1F8A8u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F8D4(CPUState* cpu) { - cpu->pc = 0xBFC1F8D4u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F8DC(CPUState* cpu) { - cpu->pc = 0xBFC1F8DCu; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F8E4(CPUState* cpu) { - cpu->pc = 0xBFC1F8E4u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F8F8(CPUState* cpu) { - cpu->pc = 0xBFC1F8F8u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F904(CPUState* cpu) { - cpu->pc = 0xBFC1F904u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F924(CPUState* cpu) { - cpu->pc = 0xBFC1F924u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F92C(CPUState* cpu) { - cpu->pc = 0xBFC1F92Cu; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F934(CPUState* cpu) { - cpu->pc = 0xBFC1F934u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F948(CPUState* cpu) { - cpu->pc = 0xBFC1F948u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F954(CPUState* cpu) { - cpu->pc = 0xBFC1F954u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F778_cont_BFC1F970(CPUState* cpu) { - cpu->pc = 0xBFC1F970u; - SCPH1001_func_1FC1F778(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F998(CPUState* cpu) { - cpu->pc = 0xBFC1F998u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9BC(CPUState* cpu) { - cpu->pc = 0xBFC1F9BCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9C4(CPUState* cpu) { - cpu->pc = 0xBFC1F9C4u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9D0(CPUState* cpu) { - cpu->pc = 0xBFC1F9D0u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9D8(CPUState* cpu) { - cpu->pc = 0xBFC1F9D8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9E0(CPUState* cpu) { - cpu->pc = 0xBFC1F9E0u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9F4(CPUState* cpu) { - cpu->pc = 0xBFC1F9F4u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1F9F8(CPUState* cpu) { - cpu->pc = 0xBFC1F9F8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA0C(CPUState* cpu) { - cpu->pc = 0xBFC1FA0Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA14(CPUState* cpu) { - cpu->pc = 0xBFC1FA14u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA1C(CPUState* cpu) { - cpu->pc = 0xBFC1FA1Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA24(CPUState* cpu) { - cpu->pc = 0xBFC1FA24u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA2C(CPUState* cpu) { - cpu->pc = 0xBFC1FA2Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA34(CPUState* cpu) { - cpu->pc = 0xBFC1FA34u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA44(CPUState* cpu) { - cpu->pc = 0xBFC1FA44u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA50(CPUState* cpu) { - cpu->pc = 0xBFC1FA50u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA54(CPUState* cpu) { - cpu->pc = 0xBFC1FA54u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA78(CPUState* cpu) { - cpu->pc = 0xBFC1FA78u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA80(CPUState* cpu) { - cpu->pc = 0xBFC1FA80u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA88(CPUState* cpu) { - cpu->pc = 0xBFC1FA88u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FA94(CPUState* cpu) { - cpu->pc = 0xBFC1FA94u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FAA8(CPUState* cpu) { - cpu->pc = 0xBFC1FAA8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FABC(CPUState* cpu) { - cpu->pc = 0xBFC1FABCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FADC(CPUState* cpu) { - cpu->pc = 0xBFC1FADCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FAE8(CPUState* cpu) { - cpu->pc = 0xBFC1FAE8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FAFC(CPUState* cpu) { - cpu->pc = 0xBFC1FAFCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB10(CPUState* cpu) { - cpu->pc = 0xBFC1FB10u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB18(CPUState* cpu) { - cpu->pc = 0xBFC1FB18u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB20(CPUState* cpu) { - cpu->pc = 0xBFC1FB20u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB40(CPUState* cpu) { - cpu->pc = 0xBFC1FB40u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB48(CPUState* cpu) { - cpu->pc = 0xBFC1FB48u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB4C(CPUState* cpu) { - cpu->pc = 0xBFC1FB4Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB54(CPUState* cpu) { - cpu->pc = 0xBFC1FB54u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB5C(CPUState* cpu) { - cpu->pc = 0xBFC1FB5Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB80(CPUState* cpu) { - cpu->pc = 0xBFC1FB80u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB84(CPUState* cpu) { - cpu->pc = 0xBFC1FB84u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB8C(CPUState* cpu) { - cpu->pc = 0xBFC1FB8Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB94(CPUState* cpu) { - cpu->pc = 0xBFC1FB94u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FB9C(CPUState* cpu) { - cpu->pc = 0xBFC1FB9Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBA4(CPUState* cpu) { - cpu->pc = 0xBFC1FBA4u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBAC(CPUState* cpu) { - cpu->pc = 0xBFC1FBACu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBB4(CPUState* cpu) { - cpu->pc = 0xBFC1FBB4u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBB8(CPUState* cpu) { - cpu->pc = 0xBFC1FBB8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBD8(CPUState* cpu) { - cpu->pc = 0xBFC1FBD8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBE0(CPUState* cpu) { - cpu->pc = 0xBFC1FBE0u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBE8(CPUState* cpu) { - cpu->pc = 0xBFC1FBE8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FBFC(CPUState* cpu) { - cpu->pc = 0xBFC1FBFCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC04(CPUState* cpu) { - cpu->pc = 0xBFC1FC04u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC18(CPUState* cpu) { - cpu->pc = 0xBFC1FC18u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC20(CPUState* cpu) { - cpu->pc = 0xBFC1FC20u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC28(CPUState* cpu) { - cpu->pc = 0xBFC1FC28u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC30(CPUState* cpu) { - cpu->pc = 0xBFC1FC30u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC38(CPUState* cpu) { - cpu->pc = 0xBFC1FC38u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC40(CPUState* cpu) { - cpu->pc = 0xBFC1FC40u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC50(CPUState* cpu) { - cpu->pc = 0xBFC1FC50u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC5C(CPUState* cpu) { - cpu->pc = 0xBFC1FC5Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC60(CPUState* cpu) { - cpu->pc = 0xBFC1FC60u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC84(CPUState* cpu) { - cpu->pc = 0xBFC1FC84u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC8C(CPUState* cpu) { - cpu->pc = 0xBFC1FC8Cu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FC94(CPUState* cpu) { - cpu->pc = 0xBFC1FC94u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FCB8(CPUState* cpu) { - cpu->pc = 0xBFC1FCB8u; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1F980_cont_BFC1FCBC(CPUState* cpu) { - cpu->pc = 0xBFC1FCBCu; - SCPH1001_func_1FC1F980(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC1FFC4(CPUState* cpu) { - cpu->pc = 0xBFC1FFC4u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC1FFD0(CPUState* cpu) { - cpu->pc = 0xBFC1FFD0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC1FFE4(CPUState* cpu) { - cpu->pc = 0xBFC1FFE4u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC1FFF0(CPUState* cpu) { - cpu->pc = 0xBFC1FFF0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20014(CPUState* cpu) { - cpu->pc = 0xBFC20014u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2001C(CPUState* cpu) { - cpu->pc = 0xBFC2001Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20028(CPUState* cpu) { - cpu->pc = 0xBFC20028u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20034(CPUState* cpu) { - cpu->pc = 0xBFC20034u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2003C(CPUState* cpu) { - cpu->pc = 0xBFC2003Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20048(CPUState* cpu) { - cpu->pc = 0xBFC20048u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2005C(CPUState* cpu) { - cpu->pc = 0xBFC2005Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20064(CPUState* cpu) { - cpu->pc = 0xBFC20064u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20084(CPUState* cpu) { - cpu->pc = 0xBFC20084u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2008C(CPUState* cpu) { - cpu->pc = 0xBFC2008Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20094(CPUState* cpu) { - cpu->pc = 0xBFC20094u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC200B0(CPUState* cpu) { - cpu->pc = 0xBFC200B0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC200C0(CPUState* cpu) { - cpu->pc = 0xBFC200C0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC200C8(CPUState* cpu) { - cpu->pc = 0xBFC200C8u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC200DC(CPUState* cpu) { - cpu->pc = 0xBFC200DCu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC200FC(CPUState* cpu) { - cpu->pc = 0xBFC200FCu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20104(CPUState* cpu) { - cpu->pc = 0xBFC20104u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20110(CPUState* cpu) { - cpu->pc = 0xBFC20110u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20124(CPUState* cpu) { - cpu->pc = 0xBFC20124u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2012C(CPUState* cpu) { - cpu->pc = 0xBFC2012Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20140(CPUState* cpu) { - cpu->pc = 0xBFC20140u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20150(CPUState* cpu) { - cpu->pc = 0xBFC20150u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2016C(CPUState* cpu) { - cpu->pc = 0xBFC2016Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20174(CPUState* cpu) { - cpu->pc = 0xBFC20174u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20188(CPUState* cpu) { - cpu->pc = 0xBFC20188u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC201A8(CPUState* cpu) { - cpu->pc = 0xBFC201A8u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC201BC(CPUState* cpu) { - cpu->pc = 0xBFC201BCu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC201C4(CPUState* cpu) { - cpu->pc = 0xBFC201C4u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC201D8(CPUState* cpu) { - cpu->pc = 0xBFC201D8u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC201E8(CPUState* cpu) { - cpu->pc = 0xBFC201E8u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20204(CPUState* cpu) { - cpu->pc = 0xBFC20204u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2020C(CPUState* cpu) { - cpu->pc = 0xBFC2020Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2022C(CPUState* cpu) { - cpu->pc = 0xBFC2022Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20230(CPUState* cpu) { - cpu->pc = 0xBFC20230u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20238(CPUState* cpu) { - cpu->pc = 0xBFC20238u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20250(CPUState* cpu) { - cpu->pc = 0xBFC20250u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20260(CPUState* cpu) { - cpu->pc = 0xBFC20260u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC20268(CPUState* cpu) { - cpu->pc = 0xBFC20268u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2027C(CPUState* cpu) { - cpu->pc = 0xBFC2027Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC2029C(CPUState* cpu) { - cpu->pc = 0xBFC2029Cu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC202B0(CPUState* cpu) { - cpu->pc = 0xBFC202B0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC202BC(CPUState* cpu) { - cpu->pc = 0xBFC202BCu; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC202C0(CPUState* cpu) { - cpu->pc = 0xBFC202C0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC202C8(CPUState* cpu) { - cpu->pc = 0xBFC202C8u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC1FFA8_cont_BFC202D0(CPUState* cpu) { - cpu->pc = 0xBFC202D0u; - SCPH1001_func_1FC1FFA8(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20348(CPUState* cpu) { - cpu->pc = 0xBFC20348u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20350(CPUState* cpu) { - cpu->pc = 0xBFC20350u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20364(CPUState* cpu) { - cpu->pc = 0xBFC20364u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20378(CPUState* cpu) { - cpu->pc = 0xBFC20378u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20380(CPUState* cpu) { - cpu->pc = 0xBFC20380u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20394(CPUState* cpu) { - cpu->pc = 0xBFC20394u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2039C(CPUState* cpu) { - cpu->pc = 0xBFC2039Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203A8(CPUState* cpu) { - cpu->pc = 0xBFC203A8u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203BC(CPUState* cpu) { - cpu->pc = 0xBFC203BCu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203C4(CPUState* cpu) { - cpu->pc = 0xBFC203C4u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203D0(CPUState* cpu) { - cpu->pc = 0xBFC203D0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203D8(CPUState* cpu) { - cpu->pc = 0xBFC203D8u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203E4(CPUState* cpu) { - cpu->pc = 0xBFC203E4u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC203F0(CPUState* cpu) { - cpu->pc = 0xBFC203F0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20404(CPUState* cpu) { - cpu->pc = 0xBFC20404u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20410(CPUState* cpu) { - cpu->pc = 0xBFC20410u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2041C(CPUState* cpu) { - cpu->pc = 0xBFC2041Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20428(CPUState* cpu) { - cpu->pc = 0xBFC20428u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20430(CPUState* cpu) { - cpu->pc = 0xBFC20430u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2043C(CPUState* cpu) { - cpu->pc = 0xBFC2043Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20450(CPUState* cpu) { - cpu->pc = 0xBFC20450u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2045C(CPUState* cpu) { - cpu->pc = 0xBFC2045Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20464(CPUState* cpu) { - cpu->pc = 0xBFC20464u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2046C(CPUState* cpu) { - cpu->pc = 0xBFC2046Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2048C(CPUState* cpu) { - cpu->pc = 0xBFC2048Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20490(CPUState* cpu) { - cpu->pc = 0xBFC20490u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2049C(CPUState* cpu) { - cpu->pc = 0xBFC2049Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204A4(CPUState* cpu) { - cpu->pc = 0xBFC204A4u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204AC(CPUState* cpu) { - cpu->pc = 0xBFC204ACu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204C0(CPUState* cpu) { - cpu->pc = 0xBFC204C0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204D4(CPUState* cpu) { - cpu->pc = 0xBFC204D4u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204DC(CPUState* cpu) { - cpu->pc = 0xBFC204DCu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC204FC(CPUState* cpu) { - cpu->pc = 0xBFC204FCu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20510(CPUState* cpu) { - cpu->pc = 0xBFC20510u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20528(CPUState* cpu) { - cpu->pc = 0xBFC20528u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2053C(CPUState* cpu) { - cpu->pc = 0xBFC2053Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20550(CPUState* cpu) { - cpu->pc = 0xBFC20550u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20558(CPUState* cpu) { - cpu->pc = 0xBFC20558u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20560(CPUState* cpu) { - cpu->pc = 0xBFC20560u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20580(CPUState* cpu) { - cpu->pc = 0xBFC20580u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20584(CPUState* cpu) { - cpu->pc = 0xBFC20584u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20590(CPUState* cpu) { - cpu->pc = 0xBFC20590u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205A4(CPUState* cpu) { - cpu->pc = 0xBFC205A4u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205B8(CPUState* cpu) { - cpu->pc = 0xBFC205B8u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205C0(CPUState* cpu) { - cpu->pc = 0xBFC205C0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205CC(CPUState* cpu) { - cpu->pc = 0xBFC205CCu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205E0(CPUState* cpu) { - cpu->pc = 0xBFC205E0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205E8(CPUState* cpu) { - cpu->pc = 0xBFC205E8u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205F0(CPUState* cpu) { - cpu->pc = 0xBFC205F0u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC205F8(CPUState* cpu) { - cpu->pc = 0xBFC205F8u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20600(CPUState* cpu) { - cpu->pc = 0xBFC20600u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20608(CPUState* cpu) { - cpu->pc = 0xBFC20608u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20610(CPUState* cpu) { - cpu->pc = 0xBFC20610u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20618(CPUState* cpu) { - cpu->pc = 0xBFC20618u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2062C(CPUState* cpu) { - cpu->pc = 0xBFC2062Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20634(CPUState* cpu) { - cpu->pc = 0xBFC20634u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC2063C(CPUState* cpu) { - cpu->pc = 0xBFC2063Cu; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20650(CPUState* cpu) { - cpu->pc = 0xBFC20650u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC20338_cont_BFC20670(CPUState* cpu) { - cpu->pc = 0xBFC20670u; - SCPH1001_func_1FC20338(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206AC(CPUState* cpu) { - cpu->pc = 0xBFC206ACu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206B4(CPUState* cpu) { - cpu->pc = 0xBFC206B4u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206C8(CPUState* cpu) { - cpu->pc = 0xBFC206C8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206D0(CPUState* cpu) { - cpu->pc = 0xBFC206D0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206E8(CPUState* cpu) { - cpu->pc = 0xBFC206E8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206F0(CPUState* cpu) { - cpu->pc = 0xBFC206F0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC206FC(CPUState* cpu) { - cpu->pc = 0xBFC206FCu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20704(CPUState* cpu) { - cpu->pc = 0xBFC20704u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20718(CPUState* cpu) { - cpu->pc = 0xBFC20718u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20728(CPUState* cpu) { - cpu->pc = 0xBFC20728u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20730(CPUState* cpu) { - cpu->pc = 0xBFC20730u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2073C(CPUState* cpu) { - cpu->pc = 0xBFC2073Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20744(CPUState* cpu) { - cpu->pc = 0xBFC20744u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20758(CPUState* cpu) { - cpu->pc = 0xBFC20758u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20764(CPUState* cpu) { - cpu->pc = 0xBFC20764u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20770(CPUState* cpu) { - cpu->pc = 0xBFC20770u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2077C(CPUState* cpu) { - cpu->pc = 0xBFC2077Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20784(CPUState* cpu) { - cpu->pc = 0xBFC20784u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20790(CPUState* cpu) { - cpu->pc = 0xBFC20790u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20798(CPUState* cpu) { - cpu->pc = 0xBFC20798u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207AC(CPUState* cpu) { - cpu->pc = 0xBFC207ACu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207C0(CPUState* cpu) { - cpu->pc = 0xBFC207C0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207C8(CPUState* cpu) { - cpu->pc = 0xBFC207C8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207D0(CPUState* cpu) { - cpu->pc = 0xBFC207D0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207D8(CPUState* cpu) { - cpu->pc = 0xBFC207D8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207EC(CPUState* cpu) { - cpu->pc = 0xBFC207ECu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC207F8(CPUState* cpu) { - cpu->pc = 0xBFC207F8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20804(CPUState* cpu) { - cpu->pc = 0xBFC20804u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2081C(CPUState* cpu) { - cpu->pc = 0xBFC2081Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20844(CPUState* cpu) { - cpu->pc = 0xBFC20844u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20854(CPUState* cpu) { - cpu->pc = 0xBFC20854u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20858(CPUState* cpu) { - cpu->pc = 0xBFC20858u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20860(CPUState* cpu) { - cpu->pc = 0xBFC20860u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2086C(CPUState* cpu) { - cpu->pc = 0xBFC2086Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20874(CPUState* cpu) { - cpu->pc = 0xBFC20874u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20878(CPUState* cpu) { - cpu->pc = 0xBFC20878u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20884(CPUState* cpu) { - cpu->pc = 0xBFC20884u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC208AC(CPUState* cpu) { - cpu->pc = 0xBFC208ACu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC208B4(CPUState* cpu) { - cpu->pc = 0xBFC208B4u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC208B8(CPUState* cpu) { - cpu->pc = 0xBFC208B8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC208BC(CPUState* cpu) { - cpu->pc = 0xBFC208BCu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC208DC(CPUState* cpu) { - cpu->pc = 0xBFC208DCu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20908(CPUState* cpu) { - cpu->pc = 0xBFC20908u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20918(CPUState* cpu) { - cpu->pc = 0xBFC20918u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20920(CPUState* cpu) { - cpu->pc = 0xBFC20920u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20928(CPUState* cpu) { - cpu->pc = 0xBFC20928u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20930(CPUState* cpu) { - cpu->pc = 0xBFC20930u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20934(CPUState* cpu) { - cpu->pc = 0xBFC20934u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2093C(CPUState* cpu) { - cpu->pc = 0xBFC2093Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20944(CPUState* cpu) { - cpu->pc = 0xBFC20944u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2094C(CPUState* cpu) { - cpu->pc = 0xBFC2094Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2096C(CPUState* cpu) { - cpu->pc = 0xBFC2096Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20974(CPUState* cpu) { - cpu->pc = 0xBFC20974u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC2097C(CPUState* cpu) { - cpu->pc = 0xBFC2097Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20990(CPUState* cpu) { - cpu->pc = 0xBFC20990u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC209B0(CPUState* cpu) { - cpu->pc = 0xBFC209B0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC209D0(CPUState* cpu) { - cpu->pc = 0xBFC209D0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A04(CPUState* cpu) { - cpu->pc = 0xBFC20A04u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A1C(CPUState* cpu) { - cpu->pc = 0xBFC20A1Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A24(CPUState* cpu) { - cpu->pc = 0xBFC20A24u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A28(CPUState* cpu) { - cpu->pc = 0xBFC20A28u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A30(CPUState* cpu) { - cpu->pc = 0xBFC20A30u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A38(CPUState* cpu) { - cpu->pc = 0xBFC20A38u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A40(CPUState* cpu) { - cpu->pc = 0xBFC20A40u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A60(CPUState* cpu) { - cpu->pc = 0xBFC20A60u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A68(CPUState* cpu) { - cpu->pc = 0xBFC20A68u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A70(CPUState* cpu) { - cpu->pc = 0xBFC20A70u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A84(CPUState* cpu) { - cpu->pc = 0xBFC20A84u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20A9C(CPUState* cpu) { - cpu->pc = 0xBFC20A9Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20AD0(CPUState* cpu) { - cpu->pc = 0xBFC20AD0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20AE8(CPUState* cpu) { - cpu->pc = 0xBFC20AE8u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20AF0(CPUState* cpu) { - cpu->pc = 0xBFC20AF0u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20AF4(CPUState* cpu) { - cpu->pc = 0xBFC20AF4u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20AFC(CPUState* cpu) { - cpu->pc = 0xBFC20AFCu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B04(CPUState* cpu) { - cpu->pc = 0xBFC20B04u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B0C(CPUState* cpu) { - cpu->pc = 0xBFC20B0Cu; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B14(CPUState* cpu) { - cpu->pc = 0xBFC20B14u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B18(CPUState* cpu) { - cpu->pc = 0xBFC20B18u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B20(CPUState* cpu) { - cpu->pc = 0xBFC20B20u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B28(CPUState* cpu) { - cpu->pc = 0xBFC20B28u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B30(CPUState* cpu) { - cpu->pc = 0xBFC20B30u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC2069C_cont_BFC20B50(CPUState* cpu) { - cpu->pc = 0xBFC20B50u; - SCPH1001_func_1FC2069C(cpu); -} - -void SCPH1001_func_1FC20B60_cont_BFC20B74(CPUState* cpu) { - cpu->pc = 0xBFC20B74u; - SCPH1001_func_1FC20B60(cpu); -} - -void SCPH1001_func_1FC20B60_cont_BFC20B7C(CPUState* cpu) { - cpu->pc = 0xBFC20B7Cu; - SCPH1001_func_1FC20B60(cpu); -} - -void SCPH1001_func_1FC20B60_cont_BFC20B94(CPUState* cpu) { - cpu->pc = 0xBFC20B94u; - SCPH1001_func_1FC20B60(cpu); -} - -void SCPH1001_func_1FC20B9C_cont_BFC20BB0(CPUState* cpu) { - cpu->pc = 0xBFC20BB0u; - SCPH1001_func_1FC20B9C(cpu); -} - -void SCPH1001_func_1FC20B9C_cont_BFC20BB8(CPUState* cpu) { - cpu->pc = 0xBFC20BB8u; - SCPH1001_func_1FC20B9C(cpu); -} - -void SCPH1001_func_1FC20B9C_cont_BFC20BDC(CPUState* cpu) { - cpu->pc = 0xBFC20BDCu; - SCPH1001_func_1FC20B9C(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20BFC(CPUState* cpu) { - cpu->pc = 0xBFC20BFCu; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C08(CPUState* cpu) { - cpu->pc = 0xBFC20C08u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C18(CPUState* cpu) { - cpu->pc = 0xBFC20C18u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C20(CPUState* cpu) { - cpu->pc = 0xBFC20C20u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C2C(CPUState* cpu) { - cpu->pc = 0xBFC20C2Cu; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C34(CPUState* cpu) { - cpu->pc = 0xBFC20C34u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C3C(CPUState* cpu) { - cpu->pc = 0xBFC20C3Cu; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C44(CPUState* cpu) { - cpu->pc = 0xBFC20C44u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C50(CPUState* cpu) { - cpu->pc = 0xBFC20C50u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20BE4_cont_BFC20C54(CPUState* cpu) { - cpu->pc = 0xBFC20C54u; - SCPH1001_func_1FC20BE4(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20C80(CPUState* cpu) { - cpu->pc = 0xBFC20C80u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20C8C(CPUState* cpu) { - cpu->pc = 0xBFC20C8Cu; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CAC(CPUState* cpu) { - cpu->pc = 0xBFC20CACu; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CB4(CPUState* cpu) { - cpu->pc = 0xBFC20CB4u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CB8(CPUState* cpu) { - cpu->pc = 0xBFC20CB8u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CC0(CPUState* cpu) { - cpu->pc = 0xBFC20CC0u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CC8(CPUState* cpu) { - cpu->pc = 0xBFC20CC8u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CD0(CPUState* cpu) { - cpu->pc = 0xBFC20CD0u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20C64_cont_BFC20CD4(CPUState* cpu) { - cpu->pc = 0xBFC20CD4u; - SCPH1001_func_1FC20C64(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D00(CPUState* cpu) { - cpu->pc = 0xBFC20D00u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D0C(CPUState* cpu) { - cpu->pc = 0xBFC20D0Cu; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D14(CPUState* cpu) { - cpu->pc = 0xBFC20D14u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D1C(CPUState* cpu) { - cpu->pc = 0xBFC20D1Cu; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D20(CPUState* cpu) { - cpu->pc = 0xBFC20D20u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D28(CPUState* cpu) { - cpu->pc = 0xBFC20D28u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D30(CPUState* cpu) { - cpu->pc = 0xBFC20D30u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D38(CPUState* cpu) { - cpu->pc = 0xBFC20D38u; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20CE4_cont_BFC20D3C(CPUState* cpu) { - cpu->pc = 0xBFC20D3Cu; - SCPH1001_func_1FC20CE4(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D68(CPUState* cpu) { - cpu->pc = 0xBFC20D68u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D74(CPUState* cpu) { - cpu->pc = 0xBFC20D74u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D7C(CPUState* cpu) { - cpu->pc = 0xBFC20D7Cu; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D84(CPUState* cpu) { - cpu->pc = 0xBFC20D84u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D88(CPUState* cpu) { - cpu->pc = 0xBFC20D88u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D90(CPUState* cpu) { - cpu->pc = 0xBFC20D90u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20D98(CPUState* cpu) { - cpu->pc = 0xBFC20D98u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20DA0(CPUState* cpu) { - cpu->pc = 0xBFC20DA0u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20D4C_cont_BFC20DA4(CPUState* cpu) { - cpu->pc = 0xBFC20DA4u; - SCPH1001_func_1FC20D4C(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DC8(CPUState* cpu) { - cpu->pc = 0xBFC20DC8u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DD4(CPUState* cpu) { - cpu->pc = 0xBFC20DD4u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DDC(CPUState* cpu) { - cpu->pc = 0xBFC20DDCu; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DE4(CPUState* cpu) { - cpu->pc = 0xBFC20DE4u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DE8(CPUState* cpu) { - cpu->pc = 0xBFC20DE8u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DF0(CPUState* cpu) { - cpu->pc = 0xBFC20DF0u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20DF8(CPUState* cpu) { - cpu->pc = 0xBFC20DF8u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20E00(CPUState* cpu) { - cpu->pc = 0xBFC20E00u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20DB4_cont_BFC20E04(CPUState* cpu) { - cpu->pc = 0xBFC20E04u; - SCPH1001_func_1FC20DB4(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E24(CPUState* cpu) { - cpu->pc = 0xBFC20E24u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E30(CPUState* cpu) { - cpu->pc = 0xBFC20E30u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E38(CPUState* cpu) { - cpu->pc = 0xBFC20E38u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E40(CPUState* cpu) { - cpu->pc = 0xBFC20E40u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E44(CPUState* cpu) { - cpu->pc = 0xBFC20E44u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E4C(CPUState* cpu) { - cpu->pc = 0xBFC20E4Cu; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E54(CPUState* cpu) { - cpu->pc = 0xBFC20E54u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E5C(CPUState* cpu) { - cpu->pc = 0xBFC20E5Cu; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E10_cont_BFC20E60(CPUState* cpu) { - cpu->pc = 0xBFC20E60u; - SCPH1001_func_1FC20E10(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20E80(CPUState* cpu) { - cpu->pc = 0xBFC20E80u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20E8C(CPUState* cpu) { - cpu->pc = 0xBFC20E8Cu; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20E94(CPUState* cpu) { - cpu->pc = 0xBFC20E94u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20E9C(CPUState* cpu) { - cpu->pc = 0xBFC20E9Cu; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20EA0(CPUState* cpu) { - cpu->pc = 0xBFC20EA0u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20EA8(CPUState* cpu) { - cpu->pc = 0xBFC20EA8u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20EB0(CPUState* cpu) { - cpu->pc = 0xBFC20EB0u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20EB8(CPUState* cpu) { - cpu->pc = 0xBFC20EB8u; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20E6C_cont_BFC20EBC(CPUState* cpu) { - cpu->pc = 0xBFC20EBCu; - SCPH1001_func_1FC20E6C(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20EDC(CPUState* cpu) { - cpu->pc = 0xBFC20EDCu; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20EE8(CPUState* cpu) { - cpu->pc = 0xBFC20EE8u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20EF0(CPUState* cpu) { - cpu->pc = 0xBFC20EF0u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20EF8(CPUState* cpu) { - cpu->pc = 0xBFC20EF8u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20EFC(CPUState* cpu) { - cpu->pc = 0xBFC20EFCu; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20F04(CPUState* cpu) { - cpu->pc = 0xBFC20F04u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20F0C(CPUState* cpu) { - cpu->pc = 0xBFC20F0Cu; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20F14(CPUState* cpu) { - cpu->pc = 0xBFC20F14u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20EC8_cont_BFC20F18(CPUState* cpu) { - cpu->pc = 0xBFC20F18u; - SCPH1001_func_1FC20EC8(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F40(CPUState* cpu) { - cpu->pc = 0xBFC20F40u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F4C(CPUState* cpu) { - cpu->pc = 0xBFC20F4Cu; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F54(CPUState* cpu) { - cpu->pc = 0xBFC20F54u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F5C(CPUState* cpu) { - cpu->pc = 0xBFC20F5Cu; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F60(CPUState* cpu) { - cpu->pc = 0xBFC20F60u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F68(CPUState* cpu) { - cpu->pc = 0xBFC20F68u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F70(CPUState* cpu) { - cpu->pc = 0xBFC20F70u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F78(CPUState* cpu) { - cpu->pc = 0xBFC20F78u; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F24_cont_BFC20F7C(CPUState* cpu) { - cpu->pc = 0xBFC20F7Cu; - SCPH1001_func_1FC20F24(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FA0(CPUState* cpu) { - cpu->pc = 0xBFC20FA0u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FAC(CPUState* cpu) { - cpu->pc = 0xBFC20FACu; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FB4(CPUState* cpu) { - cpu->pc = 0xBFC20FB4u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FBC(CPUState* cpu) { - cpu->pc = 0xBFC20FBCu; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FC0(CPUState* cpu) { - cpu->pc = 0xBFC20FC0u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FC8(CPUState* cpu) { - cpu->pc = 0xBFC20FC8u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FD0(CPUState* cpu) { - cpu->pc = 0xBFC20FD0u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FD8(CPUState* cpu) { - cpu->pc = 0xBFC20FD8u; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20F8C_cont_BFC20FDC(CPUState* cpu) { - cpu->pc = 0xBFC20FDCu; - SCPH1001_func_1FC20F8C(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC20FFC(CPUState* cpu) { - cpu->pc = 0xBFC20FFCu; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21008(CPUState* cpu) { - cpu->pc = 0xBFC21008u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21010(CPUState* cpu) { - cpu->pc = 0xBFC21010u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21018(CPUState* cpu) { - cpu->pc = 0xBFC21018u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC2101C(CPUState* cpu) { - cpu->pc = 0xBFC2101Cu; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21024(CPUState* cpu) { - cpu->pc = 0xBFC21024u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC2102C(CPUState* cpu) { - cpu->pc = 0xBFC2102Cu; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21034(CPUState* cpu) { - cpu->pc = 0xBFC21034u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC20FE8_cont_BFC21038(CPUState* cpu) { - cpu->pc = 0xBFC21038u; - SCPH1001_func_1FC20FE8(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC21060(CPUState* cpu) { - cpu->pc = 0xBFC21060u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC2106C(CPUState* cpu) { - cpu->pc = 0xBFC2106Cu; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC21074(CPUState* cpu) { - cpu->pc = 0xBFC21074u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC2107C(CPUState* cpu) { - cpu->pc = 0xBFC2107Cu; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC21088(CPUState* cpu) { - cpu->pc = 0xBFC21088u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC21090(CPUState* cpu) { - cpu->pc = 0xBFC21090u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC21098(CPUState* cpu) { - cpu->pc = 0xBFC21098u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC210A0(CPUState* cpu) { - cpu->pc = 0xBFC210A0u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC210AC(CPUState* cpu) { - cpu->pc = 0xBFC210ACu; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC21044_cont_BFC210B0(CPUState* cpu) { - cpu->pc = 0xBFC210B0u; - SCPH1001_func_1FC21044(cpu); -} - -void SCPH1001_func_1FC210C0_cont_BFC210DC(CPUState* cpu) { - cpu->pc = 0xBFC210DCu; - SCPH1001_func_1FC210C0(cpu); -} - -void SCPH1001_func_1FC210C0_cont_BFC210E8(CPUState* cpu) { - cpu->pc = 0xBFC210E8u; - SCPH1001_func_1FC210C0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC210F8(CPUState* cpu) { - cpu->pc = 0xBFC210F8u; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC210FC(CPUState* cpu) { - cpu->pc = 0xBFC210FCu; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC21104(CPUState* cpu) { - cpu->pc = 0xBFC21104u; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC2110C(CPUState* cpu) { - cpu->pc = 0xBFC2110Cu; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC21114(CPUState* cpu) { - cpu->pc = 0xBFC21114u; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC210F0_cont_BFC21118(CPUState* cpu) { - cpu->pc = 0xBFC21118u; - SCPH1001_func_1FC210F0(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC2113C(CPUState* cpu) { - cpu->pc = 0xBFC2113Cu; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21148(CPUState* cpu) { - cpu->pc = 0xBFC21148u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21150(CPUState* cpu) { - cpu->pc = 0xBFC21150u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21158(CPUState* cpu) { - cpu->pc = 0xBFC21158u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC2115C(CPUState* cpu) { - cpu->pc = 0xBFC2115Cu; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21164(CPUState* cpu) { - cpu->pc = 0xBFC21164u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC2116C(CPUState* cpu) { - cpu->pc = 0xBFC2116Cu; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21174(CPUState* cpu) { - cpu->pc = 0xBFC21174u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21128_cont_BFC21178(CPUState* cpu) { - cpu->pc = 0xBFC21178u; - SCPH1001_func_1FC21128(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211A8(CPUState* cpu) { - cpu->pc = 0xBFC211A8u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211B4(CPUState* cpu) { - cpu->pc = 0xBFC211B4u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211C0(CPUState* cpu) { - cpu->pc = 0xBFC211C0u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211C8(CPUState* cpu) { - cpu->pc = 0xBFC211C8u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211CC(CPUState* cpu) { - cpu->pc = 0xBFC211CCu; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211D4(CPUState* cpu) { - cpu->pc = 0xBFC211D4u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211E0(CPUState* cpu) { - cpu->pc = 0xBFC211E0u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211E8(CPUState* cpu) { - cpu->pc = 0xBFC211E8u; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21184_cont_BFC211EC(CPUState* cpu) { - cpu->pc = 0xBFC211ECu; - SCPH1001_func_1FC21184(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC21224(CPUState* cpu) { - cpu->pc = 0xBFC21224u; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC21228(CPUState* cpu) { - cpu->pc = 0xBFC21228u; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC21230(CPUState* cpu) { - cpu->pc = 0xBFC21230u; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC2123C(CPUState* cpu) { - cpu->pc = 0xBFC2123Cu; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC21244(CPUState* cpu) { - cpu->pc = 0xBFC21244u; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC21200_cont_BFC21248(CPUState* cpu) { - cpu->pc = 0xBFC21248u; - SCPH1001_func_1FC21200(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC21278(CPUState* cpu) { - cpu->pc = 0xBFC21278u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC21284(CPUState* cpu) { - cpu->pc = 0xBFC21284u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC2128C(CPUState* cpu) { - cpu->pc = 0xBFC2128Cu; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC21294(CPUState* cpu) { - cpu->pc = 0xBFC21294u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC21298(CPUState* cpu) { - cpu->pc = 0xBFC21298u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC212A0(CPUState* cpu) { - cpu->pc = 0xBFC212A0u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC212A8(CPUState* cpu) { - cpu->pc = 0xBFC212A8u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC212B0(CPUState* cpu) { - cpu->pc = 0xBFC212B0u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC2125C_cont_BFC212B4(CPUState* cpu) { - cpu->pc = 0xBFC212B4u; - SCPH1001_func_1FC2125C(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC212D8(CPUState* cpu) { - cpu->pc = 0xBFC212D8u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC212E4(CPUState* cpu) { - cpu->pc = 0xBFC212E4u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC212EC(CPUState* cpu) { - cpu->pc = 0xBFC212ECu; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC212F4(CPUState* cpu) { - cpu->pc = 0xBFC212F4u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC212F8(CPUState* cpu) { - cpu->pc = 0xBFC212F8u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC21300(CPUState* cpu) { - cpu->pc = 0xBFC21300u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC21308(CPUState* cpu) { - cpu->pc = 0xBFC21308u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC21310(CPUState* cpu) { - cpu->pc = 0xBFC21310u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC212C4_cont_BFC21314(CPUState* cpu) { - cpu->pc = 0xBFC21314u; - SCPH1001_func_1FC212C4(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC2133C(CPUState* cpu) { - cpu->pc = 0xBFC2133Cu; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21348(CPUState* cpu) { - cpu->pc = 0xBFC21348u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21364(CPUState* cpu) { - cpu->pc = 0xBFC21364u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC2136C(CPUState* cpu) { - cpu->pc = 0xBFC2136Cu; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21370(CPUState* cpu) { - cpu->pc = 0xBFC21370u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21378(CPUState* cpu) { - cpu->pc = 0xBFC21378u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21384(CPUState* cpu) { - cpu->pc = 0xBFC21384u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC2138C(CPUState* cpu) { - cpu->pc = 0xBFC2138Cu; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC21320_cont_BFC21390(CPUState* cpu) { - cpu->pc = 0xBFC21390u; - SCPH1001_func_1FC21320(cpu); -} - -void SCPH1001_func_1FC213A4_cont_BFC213BC(CPUState* cpu) { - cpu->pc = 0xBFC213BCu; - SCPH1001_func_1FC213A4(cpu); -} - -void SCPH1001_func_1FC213A4_cont_BFC213C8(CPUState* cpu) { - cpu->pc = 0xBFC213C8u; - SCPH1001_func_1FC213A4(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21428(CPUState* cpu) { - cpu->pc = 0xBFC21428u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21430(CPUState* cpu) { - cpu->pc = 0xBFC21430u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21438(CPUState* cpu) { - cpu->pc = 0xBFC21438u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC2144C(CPUState* cpu) { - cpu->pc = 0xBFC2144Cu; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21460(CPUState* cpu) { - cpu->pc = 0xBFC21460u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21468(CPUState* cpu) { - cpu->pc = 0xBFC21468u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC2146C(CPUState* cpu) { - cpu->pc = 0xBFC2146Cu; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21474(CPUState* cpu) { - cpu->pc = 0xBFC21474u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC21488(CPUState* cpu) { - cpu->pc = 0xBFC21488u; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC213FC_cont_BFC2148C(CPUState* cpu) { - cpu->pc = 0xBFC2148Cu; - SCPH1001_func_1FC213FC(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC214CC(CPUState* cpu) { - cpu->pc = 0xBFC214CCu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC214E8(CPUState* cpu) { - cpu->pc = 0xBFC214E8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC214F0(CPUState* cpu) { - cpu->pc = 0xBFC214F0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21504(CPUState* cpu) { - cpu->pc = 0xBFC21504u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2150C(CPUState* cpu) { - cpu->pc = 0xBFC2150Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21520(CPUState* cpu) { - cpu->pc = 0xBFC21520u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21534(CPUState* cpu) { - cpu->pc = 0xBFC21534u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2153C(CPUState* cpu) { - cpu->pc = 0xBFC2153Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21544(CPUState* cpu) { - cpu->pc = 0xBFC21544u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21554(CPUState* cpu) { - cpu->pc = 0xBFC21554u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21564(CPUState* cpu) { - cpu->pc = 0xBFC21564u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21578(CPUState* cpu) { - cpu->pc = 0xBFC21578u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21584(CPUState* cpu) { - cpu->pc = 0xBFC21584u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21598(CPUState* cpu) { - cpu->pc = 0xBFC21598u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC215F8(CPUState* cpu) { - cpu->pc = 0xBFC215F8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21608(CPUState* cpu) { - cpu->pc = 0xBFC21608u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21610(CPUState* cpu) { - cpu->pc = 0xBFC21610u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21628(CPUState* cpu) { - cpu->pc = 0xBFC21628u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2163C(CPUState* cpu) { - cpu->pc = 0xBFC2163Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21648(CPUState* cpu) { - cpu->pc = 0xBFC21648u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21658(CPUState* cpu) { - cpu->pc = 0xBFC21658u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21660(CPUState* cpu) { - cpu->pc = 0xBFC21660u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21668(CPUState* cpu) { - cpu->pc = 0xBFC21668u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21674(CPUState* cpu) { - cpu->pc = 0xBFC21674u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2167C(CPUState* cpu) { - cpu->pc = 0xBFC2167Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21684(CPUState* cpu) { - cpu->pc = 0xBFC21684u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2168C(CPUState* cpu) { - cpu->pc = 0xBFC2168Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216A0(CPUState* cpu) { - cpu->pc = 0xBFC216A0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216B4(CPUState* cpu) { - cpu->pc = 0xBFC216B4u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216BC(CPUState* cpu) { - cpu->pc = 0xBFC216BCu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216C4(CPUState* cpu) { - cpu->pc = 0xBFC216C4u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216D0(CPUState* cpu) { - cpu->pc = 0xBFC216D0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216D8(CPUState* cpu) { - cpu->pc = 0xBFC216D8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216E4(CPUState* cpu) { - cpu->pc = 0xBFC216E4u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216EC(CPUState* cpu) { - cpu->pc = 0xBFC216ECu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC216F8(CPUState* cpu) { - cpu->pc = 0xBFC216F8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21700(CPUState* cpu) { - cpu->pc = 0xBFC21700u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2170C(CPUState* cpu) { - cpu->pc = 0xBFC2170Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21714(CPUState* cpu) { - cpu->pc = 0xBFC21714u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21720(CPUState* cpu) { - cpu->pc = 0xBFC21720u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21748(CPUState* cpu) { - cpu->pc = 0xBFC21748u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21750(CPUState* cpu) { - cpu->pc = 0xBFC21750u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2175C(CPUState* cpu) { - cpu->pc = 0xBFC2175Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21764(CPUState* cpu) { - cpu->pc = 0xBFC21764u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21770(CPUState* cpu) { - cpu->pc = 0xBFC21770u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21778(CPUState* cpu) { - cpu->pc = 0xBFC21778u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21780(CPUState* cpu) { - cpu->pc = 0xBFC21780u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21788(CPUState* cpu) { - cpu->pc = 0xBFC21788u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21794(CPUState* cpu) { - cpu->pc = 0xBFC21794u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2179C(CPUState* cpu) { - cpu->pc = 0xBFC2179Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217A8(CPUState* cpu) { - cpu->pc = 0xBFC217A8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217B0(CPUState* cpu) { - cpu->pc = 0xBFC217B0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217C0(CPUState* cpu) { - cpu->pc = 0xBFC217C0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217C8(CPUState* cpu) { - cpu->pc = 0xBFC217C8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217D4(CPUState* cpu) { - cpu->pc = 0xBFC217D4u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217DC(CPUState* cpu) { - cpu->pc = 0xBFC217DCu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217E8(CPUState* cpu) { - cpu->pc = 0xBFC217E8u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC217F0(CPUState* cpu) { - cpu->pc = 0xBFC217F0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21800(CPUState* cpu) { - cpu->pc = 0xBFC21800u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21808(CPUState* cpu) { - cpu->pc = 0xBFC21808u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21814(CPUState* cpu) { - cpu->pc = 0xBFC21814u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2181C(CPUState* cpu) { - cpu->pc = 0xBFC2181Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21828(CPUState* cpu) { - cpu->pc = 0xBFC21828u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21830(CPUState* cpu) { - cpu->pc = 0xBFC21830u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21840(CPUState* cpu) { - cpu->pc = 0xBFC21840u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21854(CPUState* cpu) { - cpu->pc = 0xBFC21854u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC2185C(CPUState* cpu) { - cpu->pc = 0xBFC2185Cu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21860(CPUState* cpu) { - cpu->pc = 0xBFC21860u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21864(CPUState* cpu) { - cpu->pc = 0xBFC21864u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21880(CPUState* cpu) { - cpu->pc = 0xBFC21880u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21888(CPUState* cpu) { - cpu->pc = 0xBFC21888u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC21898(CPUState* cpu) { - cpu->pc = 0xBFC21898u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC218BC(CPUState* cpu) { - cpu->pc = 0xBFC218BCu; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC214B0_cont_BFC218C0(CPUState* cpu) { - cpu->pc = 0xBFC218C0u; - SCPH1001_func_1FC214B0(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC218E0(CPUState* cpu) { - cpu->pc = 0xBFC218E0u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC218F4(CPUState* cpu) { - cpu->pc = 0xBFC218F4u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC218FC(CPUState* cpu) { - cpu->pc = 0xBFC218FCu; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC21908(CPUState* cpu) { - cpu->pc = 0xBFC21908u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC21910(CPUState* cpu) { - cpu->pc = 0xBFC21910u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC21914(CPUState* cpu) { - cpu->pc = 0xBFC21914u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC21924(CPUState* cpu) { - cpu->pc = 0xBFC21924u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC2192C(CPUState* cpu) { - cpu->pc = 0xBFC2192Cu; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC218CC_cont_BFC21930(CPUState* cpu) { - cpu->pc = 0xBFC21930u; - SCPH1001_func_1FC218CC(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC2195C(CPUState* cpu) { - cpu->pc = 0xBFC2195Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC2196C(CPUState* cpu) { - cpu->pc = 0xBFC2196Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21974(CPUState* cpu) { - cpu->pc = 0xBFC21974u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21984(CPUState* cpu) { - cpu->pc = 0xBFC21984u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21988(CPUState* cpu) { - cpu->pc = 0xBFC21988u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21990(CPUState* cpu) { - cpu->pc = 0xBFC21990u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC2199C(CPUState* cpu) { - cpu->pc = 0xBFC2199Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A1C(CPUState* cpu) { - cpu->pc = 0xBFC21A1Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A24(CPUState* cpu) { - cpu->pc = 0xBFC21A24u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A38(CPUState* cpu) { - cpu->pc = 0xBFC21A38u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A3C(CPUState* cpu) { - cpu->pc = 0xBFC21A3Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A54(CPUState* cpu) { - cpu->pc = 0xBFC21A54u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A5C(CPUState* cpu) { - cpu->pc = 0xBFC21A5Cu; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A68(CPUState* cpu) { - cpu->pc = 0xBFC21A68u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC2193C_cont_BFC21A78(CPUState* cpu) { - cpu->pc = 0xBFC21A78u; - SCPH1001_func_1FC2193C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21AB0(CPUState* cpu) { - cpu->pc = 0xBFC21AB0u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21ADC(CPUState* cpu) { - cpu->pc = 0xBFC21ADCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21AF0(CPUState* cpu) { - cpu->pc = 0xBFC21AF0u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21AF8(CPUState* cpu) { - cpu->pc = 0xBFC21AF8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B04(CPUState* cpu) { - cpu->pc = 0xBFC21B04u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B10(CPUState* cpu) { - cpu->pc = 0xBFC21B10u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B28(CPUState* cpu) { - cpu->pc = 0xBFC21B28u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B3C(CPUState* cpu) { - cpu->pc = 0xBFC21B3Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B44(CPUState* cpu) { - cpu->pc = 0xBFC21B44u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B4C(CPUState* cpu) { - cpu->pc = 0xBFC21B4Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B5C(CPUState* cpu) { - cpu->pc = 0xBFC21B5Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B6C(CPUState* cpu) { - cpu->pc = 0xBFC21B6Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B78(CPUState* cpu) { - cpu->pc = 0xBFC21B78u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21B7C(CPUState* cpu) { - cpu->pc = 0xBFC21B7Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BA4(CPUState* cpu) { - cpu->pc = 0xBFC21BA4u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BAC(CPUState* cpu) { - cpu->pc = 0xBFC21BACu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BBC(CPUState* cpu) { - cpu->pc = 0xBFC21BBCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BC8(CPUState* cpu) { - cpu->pc = 0xBFC21BC8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BD8(CPUState* cpu) { - cpu->pc = 0xBFC21BD8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21BE0(CPUState* cpu) { - cpu->pc = 0xBFC21BE0u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21C38(CPUState* cpu) { - cpu->pc = 0xBFC21C38u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21C6C(CPUState* cpu) { - cpu->pc = 0xBFC21C6Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21C78(CPUState* cpu) { - cpu->pc = 0xBFC21C78u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21C90(CPUState* cpu) { - cpu->pc = 0xBFC21C90u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D0C(CPUState* cpu) { - cpu->pc = 0xBFC21D0Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D18(CPUState* cpu) { - cpu->pc = 0xBFC21D18u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D30(CPUState* cpu) { - cpu->pc = 0xBFC21D30u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D40(CPUState* cpu) { - cpu->pc = 0xBFC21D40u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D64(CPUState* cpu) { - cpu->pc = 0xBFC21D64u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D88(CPUState* cpu) { - cpu->pc = 0xBFC21D88u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21D9C(CPUState* cpu) { - cpu->pc = 0xBFC21D9Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21DA4(CPUState* cpu) { - cpu->pc = 0xBFC21DA4u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21DBC(CPUState* cpu) { - cpu->pc = 0xBFC21DBCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21E38(CPUState* cpu) { - cpu->pc = 0xBFC21E38u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21E44(CPUState* cpu) { - cpu->pc = 0xBFC21E44u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21E5C(CPUState* cpu) { - cpu->pc = 0xBFC21E5Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21E6C(CPUState* cpu) { - cpu->pc = 0xBFC21E6Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21E90(CPUState* cpu) { - cpu->pc = 0xBFC21E90u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21EB4(CPUState* cpu) { - cpu->pc = 0xBFC21EB4u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21EB8(CPUState* cpu) { - cpu->pc = 0xBFC21EB8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F10(CPUState* cpu) { - cpu->pc = 0xBFC21F10u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F18(CPUState* cpu) { - cpu->pc = 0xBFC21F18u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F2C(CPUState* cpu) { - cpu->pc = 0xBFC21F2Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F6C(CPUState* cpu) { - cpu->pc = 0xBFC21F6Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F78(CPUState* cpu) { - cpu->pc = 0xBFC21F78u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21F90(CPUState* cpu) { - cpu->pc = 0xBFC21F90u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21FA0(CPUState* cpu) { - cpu->pc = 0xBFC21FA0u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21FC4(CPUState* cpu) { - cpu->pc = 0xBFC21FC4u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC21FE8(CPUState* cpu) { - cpu->pc = 0xBFC21FE8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC22028(CPUState* cpu) { - cpu->pc = 0xBFC22028u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC2207C(CPUState* cpu) { - cpu->pc = 0xBFC2207Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC2209C(CPUState* cpu) { - cpu->pc = 0xBFC2209Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220AC(CPUState* cpu) { - cpu->pc = 0xBFC220ACu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220BC(CPUState* cpu) { - cpu->pc = 0xBFC220BCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220C8(CPUState* cpu) { - cpu->pc = 0xBFC220C8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220DC(CPUState* cpu) { - cpu->pc = 0xBFC220DCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220E8(CPUState* cpu) { - cpu->pc = 0xBFC220E8u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC220FC(CPUState* cpu) { - cpu->pc = 0xBFC220FCu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC22130(CPUState* cpu) { - cpu->pc = 0xBFC22130u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC2214C(CPUState* cpu) { - cpu->pc = 0xBFC2214Cu; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC22154(CPUState* cpu) { - cpu->pc = 0xBFC22154u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC21A9C_cont_BFC22158(CPUState* cpu) { - cpu->pc = 0xBFC22158u; - SCPH1001_func_1FC21A9C(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22194(CPUState* cpu) { - cpu->pc = 0xBFC22194u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221A0(CPUState* cpu) { - cpu->pc = 0xBFC221A0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221A8(CPUState* cpu) { - cpu->pc = 0xBFC221A8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221B8(CPUState* cpu) { - cpu->pc = 0xBFC221B8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221C8(CPUState* cpu) { - cpu->pc = 0xBFC221C8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221D0(CPUState* cpu) { - cpu->pc = 0xBFC221D0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221E0(CPUState* cpu) { - cpu->pc = 0xBFC221E0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221F0(CPUState* cpu) { - cpu->pc = 0xBFC221F0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC221F4(CPUState* cpu) { - cpu->pc = 0xBFC221F4u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2221C(CPUState* cpu) { - cpu->pc = 0xBFC2221Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22234(CPUState* cpu) { - cpu->pc = 0xBFC22234u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2223C(CPUState* cpu) { - cpu->pc = 0xBFC2223Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22248(CPUState* cpu) { - cpu->pc = 0xBFC22248u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22258(CPUState* cpu) { - cpu->pc = 0xBFC22258u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22268(CPUState* cpu) { - cpu->pc = 0xBFC22268u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22278(CPUState* cpu) { - cpu->pc = 0xBFC22278u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22280(CPUState* cpu) { - cpu->pc = 0xBFC22280u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222B0(CPUState* cpu) { - cpu->pc = 0xBFC222B0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222BC(CPUState* cpu) { - cpu->pc = 0xBFC222BCu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222C4(CPUState* cpu) { - cpu->pc = 0xBFC222C4u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222C8(CPUState* cpu) { - cpu->pc = 0xBFC222C8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222D4(CPUState* cpu) { - cpu->pc = 0xBFC222D4u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222E0(CPUState* cpu) { - cpu->pc = 0xBFC222E0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222F0(CPUState* cpu) { - cpu->pc = 0xBFC222F0u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC222F4(CPUState* cpu) { - cpu->pc = 0xBFC222F4u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22308(CPUState* cpu) { - cpu->pc = 0xBFC22308u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2230C(CPUState* cpu) { - cpu->pc = 0xBFC2230Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22314(CPUState* cpu) { - cpu->pc = 0xBFC22314u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22328(CPUState* cpu) { - cpu->pc = 0xBFC22328u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22330(CPUState* cpu) { - cpu->pc = 0xBFC22330u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2233C(CPUState* cpu) { - cpu->pc = 0xBFC2233Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2234C(CPUState* cpu) { - cpu->pc = 0xBFC2234Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22350(CPUState* cpu) { - cpu->pc = 0xBFC22350u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22370(CPUState* cpu) { - cpu->pc = 0xBFC22370u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC2238C(CPUState* cpu) { - cpu->pc = 0xBFC2238Cu; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22434(CPUState* cpu) { - cpu->pc = 0xBFC22434u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC224B8(CPUState* cpu) { - cpu->pc = 0xBFC224B8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC224C8(CPUState* cpu) { - cpu->pc = 0xBFC224C8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC22530(CPUState* cpu) { - cpu->pc = 0xBFC22530u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC225A8(CPUState* cpu) { - cpu->pc = 0xBFC225A8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC22164_cont_BFC226A8(CPUState* cpu) { - cpu->pc = 0xBFC226A8u; - SCPH1001_func_1FC22164(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC226E4(CPUState* cpu) { - cpu->pc = 0xBFC226E4u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC226F8(CPUState* cpu) { - cpu->pc = 0xBFC226F8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22700(CPUState* cpu) { - cpu->pc = 0xBFC22700u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC2271C(CPUState* cpu) { - cpu->pc = 0xBFC2271Cu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22724(CPUState* cpu) { - cpu->pc = 0xBFC22724u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC2272C(CPUState* cpu) { - cpu->pc = 0xBFC2272Cu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22734(CPUState* cpu) { - cpu->pc = 0xBFC22734u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22740(CPUState* cpu) { - cpu->pc = 0xBFC22740u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22748(CPUState* cpu) { - cpu->pc = 0xBFC22748u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22750(CPUState* cpu) { - cpu->pc = 0xBFC22750u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22758(CPUState* cpu) { - cpu->pc = 0xBFC22758u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22760(CPUState* cpu) { - cpu->pc = 0xBFC22760u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22768(CPUState* cpu) { - cpu->pc = 0xBFC22768u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22770(CPUState* cpu) { - cpu->pc = 0xBFC22770u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22778(CPUState* cpu) { - cpu->pc = 0xBFC22778u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22780(CPUState* cpu) { - cpu->pc = 0xBFC22780u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22788(CPUState* cpu) { - cpu->pc = 0xBFC22788u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22790(CPUState* cpu) { - cpu->pc = 0xBFC22790u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22798(CPUState* cpu) { - cpu->pc = 0xBFC22798u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227A0(CPUState* cpu) { - cpu->pc = 0xBFC227A0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227A8(CPUState* cpu) { - cpu->pc = 0xBFC227A8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227B0(CPUState* cpu) { - cpu->pc = 0xBFC227B0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227B8(CPUState* cpu) { - cpu->pc = 0xBFC227B8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227C0(CPUState* cpu) { - cpu->pc = 0xBFC227C0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227CC(CPUState* cpu) { - cpu->pc = 0xBFC227CCu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227D4(CPUState* cpu) { - cpu->pc = 0xBFC227D4u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227DC(CPUState* cpu) { - cpu->pc = 0xBFC227DCu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227E0(CPUState* cpu) { - cpu->pc = 0xBFC227E0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227E8(CPUState* cpu) { - cpu->pc = 0xBFC227E8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227EC(CPUState* cpu) { - cpu->pc = 0xBFC227ECu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC227FC(CPUState* cpu) { - cpu->pc = 0xBFC227FCu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22804(CPUState* cpu) { - cpu->pc = 0xBFC22804u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC2280C(CPUState* cpu) { - cpu->pc = 0xBFC2280Cu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22810(CPUState* cpu) { - cpu->pc = 0xBFC22810u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22820(CPUState* cpu) { - cpu->pc = 0xBFC22820u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22830(CPUState* cpu) { - cpu->pc = 0xBFC22830u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22840(CPUState* cpu) { - cpu->pc = 0xBFC22840u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22850(CPUState* cpu) { - cpu->pc = 0xBFC22850u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22870(CPUState* cpu) { - cpu->pc = 0xBFC22870u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22878(CPUState* cpu) { - cpu->pc = 0xBFC22878u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC2288C(CPUState* cpu) { - cpu->pc = 0xBFC2288Cu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC22894(CPUState* cpu) { - cpu->pc = 0xBFC22894u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC2289C(CPUState* cpu) { - cpu->pc = 0xBFC2289Cu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228A4(CPUState* cpu) { - cpu->pc = 0xBFC228A4u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228B0(CPUState* cpu) { - cpu->pc = 0xBFC228B0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228B8(CPUState* cpu) { - cpu->pc = 0xBFC228B8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228C0(CPUState* cpu) { - cpu->pc = 0xBFC228C0u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228C8(CPUState* cpu) { - cpu->pc = 0xBFC228C8u; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC226D0_cont_BFC228CC(CPUState* cpu) { - cpu->pc = 0xBFC228CCu; - SCPH1001_func_1FC226D0(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC228F0(CPUState* cpu) { - cpu->pc = 0xBFC228F0u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC2296C(CPUState* cpu) { - cpu->pc = 0xBFC2296Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC2297C(CPUState* cpu) { - cpu->pc = 0xBFC2297Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC229A4(CPUState* cpu) { - cpu->pc = 0xBFC229A4u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC229D0(CPUState* cpu) { - cpu->pc = 0xBFC229D0u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC229D8(CPUState* cpu) { - cpu->pc = 0xBFC229D8u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC229E0(CPUState* cpu) { - cpu->pc = 0xBFC229E0u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC229F8(CPUState* cpu) { - cpu->pc = 0xBFC229F8u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A18(CPUState* cpu) { - cpu->pc = 0xBFC22A18u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A38(CPUState* cpu) { - cpu->pc = 0xBFC22A38u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A58(CPUState* cpu) { - cpu->pc = 0xBFC22A58u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A6C(CPUState* cpu) { - cpu->pc = 0xBFC22A6Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A7C(CPUState* cpu) { - cpu->pc = 0xBFC22A7Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A8C(CPUState* cpu) { - cpu->pc = 0xBFC22A8Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22A9C(CPUState* cpu) { - cpu->pc = 0xBFC22A9Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22AA4(CPUState* cpu) { - cpu->pc = 0xBFC22AA4u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22AAC(CPUState* cpu) { - cpu->pc = 0xBFC22AACu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22AB4(CPUState* cpu) { - cpu->pc = 0xBFC22AB4u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22AC4(CPUState* cpu) { - cpu->pc = 0xBFC22AC4u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22ACC(CPUState* cpu) { - cpu->pc = 0xBFC22ACCu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B1C(CPUState* cpu) { - cpu->pc = 0xBFC22B1Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B28(CPUState* cpu) { - cpu->pc = 0xBFC22B28u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B30(CPUState* cpu) { - cpu->pc = 0xBFC22B30u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B3C(CPUState* cpu) { - cpu->pc = 0xBFC22B3Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B40(CPUState* cpu) { - cpu->pc = 0xBFC22B40u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B50(CPUState* cpu) { - cpu->pc = 0xBFC22B50u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B5C(CPUState* cpu) { - cpu->pc = 0xBFC22B5Cu; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B64(CPUState* cpu) { - cpu->pc = 0xBFC22B64u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B70(CPUState* cpu) { - cpu->pc = 0xBFC22B70u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC228D8_cont_BFC22B74(CPUState* cpu) { - cpu->pc = 0xBFC22B74u; - SCPH1001_func_1FC228D8(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22B94(CPUState* cpu) { - cpu->pc = 0xBFC22B94u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BAC(CPUState* cpu) { - cpu->pc = 0xBFC22BACu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BBC(CPUState* cpu) { - cpu->pc = 0xBFC22BBCu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BC4(CPUState* cpu) { - cpu->pc = 0xBFC22BC4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BC8(CPUState* cpu) { - cpu->pc = 0xBFC22BC8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BD0(CPUState* cpu) { - cpu->pc = 0xBFC22BD0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BD8(CPUState* cpu) { - cpu->pc = 0xBFC22BD8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BE0(CPUState* cpu) { - cpu->pc = 0xBFC22BE0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BE8(CPUState* cpu) { - cpu->pc = 0xBFC22BE8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BF0(CPUState* cpu) { - cpu->pc = 0xBFC22BF0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22BF8(CPUState* cpu) { - cpu->pc = 0xBFC22BF8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C00(CPUState* cpu) { - cpu->pc = 0xBFC22C00u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C14(CPUState* cpu) { - cpu->pc = 0xBFC22C14u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C20(CPUState* cpu) { - cpu->pc = 0xBFC22C20u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C28(CPUState* cpu) { - cpu->pc = 0xBFC22C28u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C2C(CPUState* cpu) { - cpu->pc = 0xBFC22C2Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C34(CPUState* cpu) { - cpu->pc = 0xBFC22C34u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C3C(CPUState* cpu) { - cpu->pc = 0xBFC22C3Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C44(CPUState* cpu) { - cpu->pc = 0xBFC22C44u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C48(CPUState* cpu) { - cpu->pc = 0xBFC22C48u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C58(CPUState* cpu) { - cpu->pc = 0xBFC22C58u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C60(CPUState* cpu) { - cpu->pc = 0xBFC22C60u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C68(CPUState* cpu) { - cpu->pc = 0xBFC22C68u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C6C(CPUState* cpu) { - cpu->pc = 0xBFC22C6Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C80(CPUState* cpu) { - cpu->pc = 0xBFC22C80u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C88(CPUState* cpu) { - cpu->pc = 0xBFC22C88u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C94(CPUState* cpu) { - cpu->pc = 0xBFC22C94u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22C9C(CPUState* cpu) { - cpu->pc = 0xBFC22C9Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CA0(CPUState* cpu) { - cpu->pc = 0xBFC22CA0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CA4(CPUState* cpu) { - cpu->pc = 0xBFC22CA4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CB0(CPUState* cpu) { - cpu->pc = 0xBFC22CB0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CB8(CPUState* cpu) { - cpu->pc = 0xBFC22CB8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CC0(CPUState* cpu) { - cpu->pc = 0xBFC22CC0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CC4(CPUState* cpu) { - cpu->pc = 0xBFC22CC4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CD4(CPUState* cpu) { - cpu->pc = 0xBFC22CD4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CDC(CPUState* cpu) { - cpu->pc = 0xBFC22CDCu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CE8(CPUState* cpu) { - cpu->pc = 0xBFC22CE8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CF0(CPUState* cpu) { - cpu->pc = 0xBFC22CF0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22CF8(CPUState* cpu) { - cpu->pc = 0xBFC22CF8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D08(CPUState* cpu) { - cpu->pc = 0xBFC22D08u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D10(CPUState* cpu) { - cpu->pc = 0xBFC22D10u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D14(CPUState* cpu) { - cpu->pc = 0xBFC22D14u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D1C(CPUState* cpu) { - cpu->pc = 0xBFC22D1Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D20(CPUState* cpu) { - cpu->pc = 0xBFC22D20u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D38(CPUState* cpu) { - cpu->pc = 0xBFC22D38u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D40(CPUState* cpu) { - cpu->pc = 0xBFC22D40u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D44(CPUState* cpu) { - cpu->pc = 0xBFC22D44u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D4C(CPUState* cpu) { - cpu->pc = 0xBFC22D4Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D54(CPUState* cpu) { - cpu->pc = 0xBFC22D54u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D64(CPUState* cpu) { - cpu->pc = 0xBFC22D64u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D68(CPUState* cpu) { - cpu->pc = 0xBFC22D68u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D74(CPUState* cpu) { - cpu->pc = 0xBFC22D74u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D7C(CPUState* cpu) { - cpu->pc = 0xBFC22D7Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D80(CPUState* cpu) { - cpu->pc = 0xBFC22D80u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D90(CPUState* cpu) { - cpu->pc = 0xBFC22D90u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22D98(CPUState* cpu) { - cpu->pc = 0xBFC22D98u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DA0(CPUState* cpu) { - cpu->pc = 0xBFC22DA0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DA8(CPUState* cpu) { - cpu->pc = 0xBFC22DA8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DB0(CPUState* cpu) { - cpu->pc = 0xBFC22DB0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DB8(CPUState* cpu) { - cpu->pc = 0xBFC22DB8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DC0(CPUState* cpu) { - cpu->pc = 0xBFC22DC0u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DC8(CPUState* cpu) { - cpu->pc = 0xBFC22DC8u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DDC(CPUState* cpu) { - cpu->pc = 0xBFC22DDCu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DE4(CPUState* cpu) { - cpu->pc = 0xBFC22DE4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DEC(CPUState* cpu) { - cpu->pc = 0xBFC22DECu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DF4(CPUState* cpu) { - cpu->pc = 0xBFC22DF4u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22DFC(CPUState* cpu) { - cpu->pc = 0xBFC22DFCu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22E04(CPUState* cpu) { - cpu->pc = 0xBFC22E04u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22E0C(CPUState* cpu) { - cpu->pc = 0xBFC22E0Cu; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22B80_cont_BFC22E10(CPUState* cpu) { - cpu->pc = 0xBFC22E10u; - SCPH1001_func_1FC22B80(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E30(CPUState* cpu) { - cpu->pc = 0xBFC22E30u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E3C(CPUState* cpu) { - cpu->pc = 0xBFC22E3Cu; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E44(CPUState* cpu) { - cpu->pc = 0xBFC22E44u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E54(CPUState* cpu) { - cpu->pc = 0xBFC22E54u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E64(CPUState* cpu) { - cpu->pc = 0xBFC22E64u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E6C(CPUState* cpu) { - cpu->pc = 0xBFC22E6Cu; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E74(CPUState* cpu) { - cpu->pc = 0xBFC22E74u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E7C(CPUState* cpu) { - cpu->pc = 0xBFC22E7Cu; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E1C_cont_BFC22E80(CPUState* cpu) { - cpu->pc = 0xBFC22E80u; - SCPH1001_func_1FC22E1C(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC22F60(CPUState* cpu) { - cpu->pc = 0xBFC22F60u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC22FC4(CPUState* cpu) { - cpu->pc = 0xBFC22FC4u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC22FEC(CPUState* cpu) { - cpu->pc = 0xBFC22FECu; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC22FF8(CPUState* cpu) { - cpu->pc = 0xBFC22FF8u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC23004(CPUState* cpu) { - cpu->pc = 0xBFC23004u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC23008(CPUState* cpu) { - cpu->pc = 0xBFC23008u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC23014(CPUState* cpu) { - cpu->pc = 0xBFC23014u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC23020(CPUState* cpu) { - cpu->pc = 0xBFC23020u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC2303C(CPUState* cpu) { - cpu->pc = 0xBFC2303Cu; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC22E90_cont_BFC23054(CPUState* cpu) { - cpu->pc = 0xBFC23054u; - SCPH1001_func_1FC22E90(cpu); -} - -void SCPH1001_func_1FC23078_cont_BFC23098(CPUState* cpu) { - cpu->pc = 0xBFC23098u; - SCPH1001_func_1FC23078(cpu); -} - -void SCPH1001_func_1FC23078_cont_BFC230A0(CPUState* cpu) { - cpu->pc = 0xBFC230A0u; - SCPH1001_func_1FC23078(cpu); -} - -void SCPH1001_func_1FC23078_cont_BFC230AC(CPUState* cpu) { - cpu->pc = 0xBFC230ACu; - SCPH1001_func_1FC23078(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC230D8(CPUState* cpu) { - cpu->pc = 0xBFC230D8u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC230E0(CPUState* cpu) { - cpu->pc = 0xBFC230E0u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC230E4(CPUState* cpu) { - cpu->pc = 0xBFC230E4u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC230F0(CPUState* cpu) { - cpu->pc = 0xBFC230F0u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC230F8(CPUState* cpu) { - cpu->pc = 0xBFC230F8u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC230C4_cont_BFC23108(CPUState* cpu) { - cpu->pc = 0xBFC23108u; - SCPH1001_func_1FC230C4(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC23170(CPUState* cpu) { - cpu->pc = 0xBFC23170u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC2317C(CPUState* cpu) { - cpu->pc = 0xBFC2317Cu; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC23184(CPUState* cpu) { - cpu->pc = 0xBFC23184u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC2318C(CPUState* cpu) { - cpu->pc = 0xBFC2318Cu; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC231CC(CPUState* cpu) { - cpu->pc = 0xBFC231CCu; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC231DC(CPUState* cpu) { - cpu->pc = 0xBFC231DCu; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC231F0(CPUState* cpu) { - cpu->pc = 0xBFC231F0u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC2321C(CPUState* cpu) { - cpu->pc = 0xBFC2321Cu; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC23224(CPUState* cpu) { - cpu->pc = 0xBFC23224u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC23230(CPUState* cpu) { - cpu->pc = 0xBFC23230u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2311C_cont_BFC23234(CPUState* cpu) { - cpu->pc = 0xBFC23234u; - SCPH1001_func_1FC2311C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC23294(CPUState* cpu) { - cpu->pc = 0xBFC23294u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232A0(CPUState* cpu) { - cpu->pc = 0xBFC232A0u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232A8(CPUState* cpu) { - cpu->pc = 0xBFC232A8u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232B0(CPUState* cpu) { - cpu->pc = 0xBFC232B0u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232B4(CPUState* cpu) { - cpu->pc = 0xBFC232B4u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232BC(CPUState* cpu) { - cpu->pc = 0xBFC232BCu; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC2324C_cont_BFC232C0(CPUState* cpu) { - cpu->pc = 0xBFC232C0u; - SCPH1001_func_1FC2324C(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC232FC(CPUState* cpu) { - cpu->pc = 0xBFC232FCu; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC2332C(CPUState* cpu) { - cpu->pc = 0xBFC2332Cu; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC23344(CPUState* cpu) { - cpu->pc = 0xBFC23344u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC23360(CPUState* cpu) { - cpu->pc = 0xBFC23360u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC2337C(CPUState* cpu) { - cpu->pc = 0xBFC2337Cu; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC233C0(CPUState* cpu) { - cpu->pc = 0xBFC233C0u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC2340C(CPUState* cpu) { - cpu->pc = 0xBFC2340Cu; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC23450(CPUState* cpu) { - cpu->pc = 0xBFC23450u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC23490(CPUState* cpu) { - cpu->pc = 0xBFC23490u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC234D0(CPUState* cpu) { - cpu->pc = 0xBFC234D0u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC232DC_cont_BFC234E0(CPUState* cpu) { - cpu->pc = 0xBFC234E0u; - SCPH1001_func_1FC232DC(cpu); -} - -void SCPH1001_func_1FC23500_cont_BFC2350C(CPUState* cpu) { - cpu->pc = 0xBFC2350Cu; - SCPH1001_func_1FC23500(cpu); -} - -void SCPH1001_func_1FC23500_cont_BFC23514(CPUState* cpu) { - cpu->pc = 0xBFC23514u; - SCPH1001_func_1FC23500(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23544(CPUState* cpu) { - cpu->pc = 0xBFC23544u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23570(CPUState* cpu) { - cpu->pc = 0xBFC23570u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC2357C(CPUState* cpu) { - cpu->pc = 0xBFC2357Cu; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235A4(CPUState* cpu) { - cpu->pc = 0xBFC235A4u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235A8(CPUState* cpu) { - cpu->pc = 0xBFC235A8u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235B0(CPUState* cpu) { - cpu->pc = 0xBFC235B0u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235C4(CPUState* cpu) { - cpu->pc = 0xBFC235C4u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235C8(CPUState* cpu) { - cpu->pc = 0xBFC235C8u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC235D0(CPUState* cpu) { - cpu->pc = 0xBFC235D0u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23620(CPUState* cpu) { - cpu->pc = 0xBFC23620u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23628(CPUState* cpu) { - cpu->pc = 0xBFC23628u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23630(CPUState* cpu) { - cpu->pc = 0xBFC23630u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23634(CPUState* cpu) { - cpu->pc = 0xBFC23634u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC2364C(CPUState* cpu) { - cpu->pc = 0xBFC2364Cu; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23660(CPUState* cpu) { - cpu->pc = 0xBFC23660u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC236E8(CPUState* cpu) { - cpu->pc = 0xBFC236E8u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23770(CPUState* cpu) { - cpu->pc = 0xBFC23770u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC237C0(CPUState* cpu) { - cpu->pc = 0xBFC237C0u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC237F4(CPUState* cpu) { - cpu->pc = 0xBFC237F4u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23828(CPUState* cpu) { - cpu->pc = 0xBFC23828u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23858(CPUState* cpu) { - cpu->pc = 0xBFC23858u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC238E0(CPUState* cpu) { - cpu->pc = 0xBFC238E0u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23968(CPUState* cpu) { - cpu->pc = 0xBFC23968u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC239B0(CPUState* cpu) { - cpu->pc = 0xBFC239B0u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC239E4(CPUState* cpu) { - cpu->pc = 0xBFC239E4u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23A18(CPUState* cpu) { - cpu->pc = 0xBFC23A18u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23A48(CPUState* cpu) { - cpu->pc = 0xBFC23A48u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23A64(CPUState* cpu) { - cpu->pc = 0xBFC23A64u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23A74(CPUState* cpu) { - cpu->pc = 0xBFC23A74u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23A78(CPUState* cpu) { - cpu->pc = 0xBFC23A78u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23AA4(CPUState* cpu) { - cpu->pc = 0xBFC23AA4u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23AB8(CPUState* cpu) { - cpu->pc = 0xBFC23AB8u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23AC8(CPUState* cpu) { - cpu->pc = 0xBFC23AC8u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23B3C(CPUState* cpu) { - cpu->pc = 0xBFC23B3Cu; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23B48(CPUState* cpu) { - cpu->pc = 0xBFC23B48u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23B54(CPUState* cpu) { - cpu->pc = 0xBFC23B54u; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23BCC(CPUState* cpu) { - cpu->pc = 0xBFC23BCCu; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23524_cont_BFC23C4C(CPUState* cpu) { - cpu->pc = 0xBFC23C4Cu; - SCPH1001_func_1FC23524(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23D5C(CPUState* cpu) { - cpu->pc = 0xBFC23D5Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23D64(CPUState* cpu) { - cpu->pc = 0xBFC23D64u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23D74(CPUState* cpu) { - cpu->pc = 0xBFC23D74u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23D88(CPUState* cpu) { - cpu->pc = 0xBFC23D88u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23D90(CPUState* cpu) { - cpu->pc = 0xBFC23D90u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DA0(CPUState* cpu) { - cpu->pc = 0xBFC23DA0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DB4(CPUState* cpu) { - cpu->pc = 0xBFC23DB4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DB8(CPUState* cpu) { - cpu->pc = 0xBFC23DB8u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DC0(CPUState* cpu) { - cpu->pc = 0xBFC23DC0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DD4(CPUState* cpu) { - cpu->pc = 0xBFC23DD4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DE4(CPUState* cpu) { - cpu->pc = 0xBFC23DE4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23DF0(CPUState* cpu) { - cpu->pc = 0xBFC23DF0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E00(CPUState* cpu) { - cpu->pc = 0xBFC23E00u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E10(CPUState* cpu) { - cpu->pc = 0xBFC23E10u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E20(CPUState* cpu) { - cpu->pc = 0xBFC23E20u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E2C(CPUState* cpu) { - cpu->pc = 0xBFC23E2Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E38(CPUState* cpu) { - cpu->pc = 0xBFC23E38u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E4C(CPUState* cpu) { - cpu->pc = 0xBFC23E4Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E54(CPUState* cpu) { - cpu->pc = 0xBFC23E54u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E70(CPUState* cpu) { - cpu->pc = 0xBFC23E70u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E7C(CPUState* cpu) { - cpu->pc = 0xBFC23E7Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E8C(CPUState* cpu) { - cpu->pc = 0xBFC23E8Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23E9C(CPUState* cpu) { - cpu->pc = 0xBFC23E9Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23EB0(CPUState* cpu) { - cpu->pc = 0xBFC23EB0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23EB4(CPUState* cpu) { - cpu->pc = 0xBFC23EB4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23EC8(CPUState* cpu) { - cpu->pc = 0xBFC23EC8u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23EE0(CPUState* cpu) { - cpu->pc = 0xBFC23EE0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23EEC(CPUState* cpu) { - cpu->pc = 0xBFC23EECu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F04(CPUState* cpu) { - cpu->pc = 0xBFC23F04u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F18(CPUState* cpu) { - cpu->pc = 0xBFC23F18u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F28(CPUState* cpu) { - cpu->pc = 0xBFC23F28u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F34(CPUState* cpu) { - cpu->pc = 0xBFC23F34u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F40(CPUState* cpu) { - cpu->pc = 0xBFC23F40u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F58(CPUState* cpu) { - cpu->pc = 0xBFC23F58u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F6C(CPUState* cpu) { - cpu->pc = 0xBFC23F6Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F74(CPUState* cpu) { - cpu->pc = 0xBFC23F74u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F7C(CPUState* cpu) { - cpu->pc = 0xBFC23F7Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23F98(CPUState* cpu) { - cpu->pc = 0xBFC23F98u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FA4(CPUState* cpu) { - cpu->pc = 0xBFC23FA4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FB4(CPUState* cpu) { - cpu->pc = 0xBFC23FB4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FC4(CPUState* cpu) { - cpu->pc = 0xBFC23FC4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FD4(CPUState* cpu) { - cpu->pc = 0xBFC23FD4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FF4(CPUState* cpu) { - cpu->pc = 0xBFC23FF4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC23FFC(CPUState* cpu) { - cpu->pc = 0xBFC23FFCu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24014(CPUState* cpu) { - cpu->pc = 0xBFC24014u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24028(CPUState* cpu) { - cpu->pc = 0xBFC24028u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2403C(CPUState* cpu) { - cpu->pc = 0xBFC2403Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24058(CPUState* cpu) { - cpu->pc = 0xBFC24058u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24064(CPUState* cpu) { - cpu->pc = 0xBFC24064u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24074(CPUState* cpu) { - cpu->pc = 0xBFC24074u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24084(CPUState* cpu) { - cpu->pc = 0xBFC24084u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24094(CPUState* cpu) { - cpu->pc = 0xBFC24094u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240BC(CPUState* cpu) { - cpu->pc = 0xBFC240BCu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240CC(CPUState* cpu) { - cpu->pc = 0xBFC240CCu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240D4(CPUState* cpu) { - cpu->pc = 0xBFC240D4u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240DC(CPUState* cpu) { - cpu->pc = 0xBFC240DCu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240E0(CPUState* cpu) { - cpu->pc = 0xBFC240E0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC240EC(CPUState* cpu) { - cpu->pc = 0xBFC240ECu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24108(CPUState* cpu) { - cpu->pc = 0xBFC24108u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24114(CPUState* cpu) { - cpu->pc = 0xBFC24114u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24124(CPUState* cpu) { - cpu->pc = 0xBFC24124u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24134(CPUState* cpu) { - cpu->pc = 0xBFC24134u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24144(CPUState* cpu) { - cpu->pc = 0xBFC24144u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2416C(CPUState* cpu) { - cpu->pc = 0xBFC2416Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2417C(CPUState* cpu) { - cpu->pc = 0xBFC2417Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24184(CPUState* cpu) { - cpu->pc = 0xBFC24184u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2418C(CPUState* cpu) { - cpu->pc = 0xBFC2418Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC241B8(CPUState* cpu) { - cpu->pc = 0xBFC241B8u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC241D0(CPUState* cpu) { - cpu->pc = 0xBFC241D0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC241E0(CPUState* cpu) { - cpu->pc = 0xBFC241E0u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24208(CPUState* cpu) { - cpu->pc = 0xBFC24208u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24218(CPUState* cpu) { - cpu->pc = 0xBFC24218u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24228(CPUState* cpu) { - cpu->pc = 0xBFC24228u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24238(CPUState* cpu) { - cpu->pc = 0xBFC24238u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24248(CPUState* cpu) { - cpu->pc = 0xBFC24248u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24250(CPUState* cpu) { - cpu->pc = 0xBFC24250u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24254(CPUState* cpu) { - cpu->pc = 0xBFC24254u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2425C(CPUState* cpu) { - cpu->pc = 0xBFC2425Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2426C(CPUState* cpu) { - cpu->pc = 0xBFC2426Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24274(CPUState* cpu) { - cpu->pc = 0xBFC24274u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC24278(CPUState* cpu) { - cpu->pc = 0xBFC24278u; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC23D3C_cont_BFC2427C(CPUState* cpu) { - cpu->pc = 0xBFC2427Cu; - SCPH1001_func_1FC23D3C(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242A0(CPUState* cpu) { - cpu->pc = 0xBFC242A0u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242B4(CPUState* cpu) { - cpu->pc = 0xBFC242B4u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242C8(CPUState* cpu) { - cpu->pc = 0xBFC242C8u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242DC(CPUState* cpu) { - cpu->pc = 0xBFC242DCu; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242E4(CPUState* cpu) { - cpu->pc = 0xBFC242E4u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242F8(CPUState* cpu) { - cpu->pc = 0xBFC242F8u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC242FC(CPUState* cpu) { - cpu->pc = 0xBFC242FCu; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24304(CPUState* cpu) { - cpu->pc = 0xBFC24304u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24308(CPUState* cpu) { - cpu->pc = 0xBFC24308u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24314(CPUState* cpu) { - cpu->pc = 0xBFC24314u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC2432C(CPUState* cpu) { - cpu->pc = 0xBFC2432Cu; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24334(CPUState* cpu) { - cpu->pc = 0xBFC24334u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24338(CPUState* cpu) { - cpu->pc = 0xBFC24338u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24340(CPUState* cpu) { - cpu->pc = 0xBFC24340u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24350(CPUState* cpu) { - cpu->pc = 0xBFC24350u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC2435C(CPUState* cpu) { - cpu->pc = 0xBFC2435Cu; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24390(CPUState* cpu) { - cpu->pc = 0xBFC24390u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24398(CPUState* cpu) { - cpu->pc = 0xBFC24398u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC243A0(CPUState* cpu) { - cpu->pc = 0xBFC243A0u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC243F8(CPUState* cpu) { - cpu->pc = 0xBFC243F8u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC24408(CPUState* cpu) { - cpu->pc = 0xBFC24408u; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24288_cont_BFC2440C(CPUState* cpu) { - cpu->pc = 0xBFC2440Cu; - SCPH1001_func_1FC24288(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC2443C(CPUState* cpu) { - cpu->pc = 0xBFC2443Cu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC24454(CPUState* cpu) { - cpu->pc = 0xBFC24454u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC2447C(CPUState* cpu) { - cpu->pc = 0xBFC2447Cu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC24484(CPUState* cpu) { - cpu->pc = 0xBFC24484u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC2449C(CPUState* cpu) { - cpu->pc = 0xBFC2449Cu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC244C4(CPUState* cpu) { - cpu->pc = 0xBFC244C4u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC244CC(CPUState* cpu) { - cpu->pc = 0xBFC244CCu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC244D8(CPUState* cpu) { - cpu->pc = 0xBFC244D8u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC244EC(CPUState* cpu) { - cpu->pc = 0xBFC244ECu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC24550(CPUState* cpu) { - cpu->pc = 0xBFC24550u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC24588(CPUState* cpu) { - cpu->pc = 0xBFC24588u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC24598(CPUState* cpu) { - cpu->pc = 0xBFC24598u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC245AC(CPUState* cpu) { - cpu->pc = 0xBFC245ACu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC245D4(CPUState* cpu) { - cpu->pc = 0xBFC245D4u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC245E8(CPUState* cpu) { - cpu->pc = 0xBFC245E8u; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC245FC(CPUState* cpu) { - cpu->pc = 0xBFC245FCu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24418_cont_BFC2462C(CPUState* cpu) { - cpu->pc = 0xBFC2462Cu; - SCPH1001_func_1FC24418(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24664(CPUState* cpu) { - cpu->pc = 0xBFC24664u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2467C(CPUState* cpu) { - cpu->pc = 0xBFC2467Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC246B8(CPUState* cpu) { - cpu->pc = 0xBFC246B8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC246C4(CPUState* cpu) { - cpu->pc = 0xBFC246C4u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC246F0(CPUState* cpu) { - cpu->pc = 0xBFC246F0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC246F8(CPUState* cpu) { - cpu->pc = 0xBFC246F8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC246FC(CPUState* cpu) { - cpu->pc = 0xBFC246FCu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24734(CPUState* cpu) { - cpu->pc = 0xBFC24734u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24740(CPUState* cpu) { - cpu->pc = 0xBFC24740u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2476C(CPUState* cpu) { - cpu->pc = 0xBFC2476Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24770(CPUState* cpu) { - cpu->pc = 0xBFC24770u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC247CC(CPUState* cpu) { - cpu->pc = 0xBFC247CCu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC247D8(CPUState* cpu) { - cpu->pc = 0xBFC247D8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC247F0(CPUState* cpu) { - cpu->pc = 0xBFC247F0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC247F8(CPUState* cpu) { - cpu->pc = 0xBFC247F8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24800(CPUState* cpu) { - cpu->pc = 0xBFC24800u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2480C(CPUState* cpu) { - cpu->pc = 0xBFC2480Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24814(CPUState* cpu) { - cpu->pc = 0xBFC24814u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2482C(CPUState* cpu) { - cpu->pc = 0xBFC2482Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24830(CPUState* cpu) { - cpu->pc = 0xBFC24830u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2489C(CPUState* cpu) { - cpu->pc = 0xBFC2489Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC248B0(CPUState* cpu) { - cpu->pc = 0xBFC248B0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC248C0(CPUState* cpu) { - cpu->pc = 0xBFC248C0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC248C8(CPUState* cpu) { - cpu->pc = 0xBFC248C8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC248FC(CPUState* cpu) { - cpu->pc = 0xBFC248FCu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24904(CPUState* cpu) { - cpu->pc = 0xBFC24904u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2493C(CPUState* cpu) { - cpu->pc = 0xBFC2493Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24960(CPUState* cpu) { - cpu->pc = 0xBFC24960u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24978(CPUState* cpu) { - cpu->pc = 0xBFC24978u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24984(CPUState* cpu) { - cpu->pc = 0xBFC24984u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24988(CPUState* cpu) { - cpu->pc = 0xBFC24988u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24998(CPUState* cpu) { - cpu->pc = 0xBFC24998u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC2499C(CPUState* cpu) { - cpu->pc = 0xBFC2499Cu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249A4(CPUState* cpu) { - cpu->pc = 0xBFC249A4u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249A8(CPUState* cpu) { - cpu->pc = 0xBFC249A8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249B8(CPUState* cpu) { - cpu->pc = 0xBFC249B8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249D0(CPUState* cpu) { - cpu->pc = 0xBFC249D0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249D8(CPUState* cpu) { - cpu->pc = 0xBFC249D8u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249DC(CPUState* cpu) { - cpu->pc = 0xBFC249DCu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249E0(CPUState* cpu) { - cpu->pc = 0xBFC249E0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249F0(CPUState* cpu) { - cpu->pc = 0xBFC249F0u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC249FC(CPUState* cpu) { - cpu->pc = 0xBFC249FCu; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24A00(CPUState* cpu) { - cpu->pc = 0xBFC24A00u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24A08(CPUState* cpu) { - cpu->pc = 0xBFC24A08u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24640_cont_BFC24A34(CPUState* cpu) { - cpu->pc = 0xBFC24A34u; - SCPH1001_func_1FC24640(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24A7C(CPUState* cpu) { - cpu->pc = 0xBFC24A7Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24A94(CPUState* cpu) { - cpu->pc = 0xBFC24A94u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24AB0(CPUState* cpu) { - cpu->pc = 0xBFC24AB0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24AC8(CPUState* cpu) { - cpu->pc = 0xBFC24AC8u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24AE0(CPUState* cpu) { - cpu->pc = 0xBFC24AE0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24AF0(CPUState* cpu) { - cpu->pc = 0xBFC24AF0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24AFC(CPUState* cpu) { - cpu->pc = 0xBFC24AFCu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B44(CPUState* cpu) { - cpu->pc = 0xBFC24B44u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B50(CPUState* cpu) { - cpu->pc = 0xBFC24B50u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B58(CPUState* cpu) { - cpu->pc = 0xBFC24B58u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B60(CPUState* cpu) { - cpu->pc = 0xBFC24B60u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B68(CPUState* cpu) { - cpu->pc = 0xBFC24B68u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B74(CPUState* cpu) { - cpu->pc = 0xBFC24B74u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24B7C(CPUState* cpu) { - cpu->pc = 0xBFC24B7Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24BC4(CPUState* cpu) { - cpu->pc = 0xBFC24BC4u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24BD8(CPUState* cpu) { - cpu->pc = 0xBFC24BD8u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24BDC(CPUState* cpu) { - cpu->pc = 0xBFC24BDCu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C00(CPUState* cpu) { - cpu->pc = 0xBFC24C00u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C1C(CPUState* cpu) { - cpu->pc = 0xBFC24C1Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C34(CPUState* cpu) { - cpu->pc = 0xBFC24C34u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C40(CPUState* cpu) { - cpu->pc = 0xBFC24C40u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C88(CPUState* cpu) { - cpu->pc = 0xBFC24C88u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C94(CPUState* cpu) { - cpu->pc = 0xBFC24C94u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24C9C(CPUState* cpu) { - cpu->pc = 0xBFC24C9Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24CA4(CPUState* cpu) { - cpu->pc = 0xBFC24CA4u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24CAC(CPUState* cpu) { - cpu->pc = 0xBFC24CACu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24CB8(CPUState* cpu) { - cpu->pc = 0xBFC24CB8u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24CC0(CPUState* cpu) { - cpu->pc = 0xBFC24CC0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D3C(CPUState* cpu) { - cpu->pc = 0xBFC24D3Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D48(CPUState* cpu) { - cpu->pc = 0xBFC24D48u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D54(CPUState* cpu) { - cpu->pc = 0xBFC24D54u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D60(CPUState* cpu) { - cpu->pc = 0xBFC24D60u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D68(CPUState* cpu) { - cpu->pc = 0xBFC24D68u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24D98(CPUState* cpu) { - cpu->pc = 0xBFC24D98u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24DA0(CPUState* cpu) { - cpu->pc = 0xBFC24DA0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24DD8(CPUState* cpu) { - cpu->pc = 0xBFC24DD8u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24DFC(CPUState* cpu) { - cpu->pc = 0xBFC24DFCu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E14(CPUState* cpu) { - cpu->pc = 0xBFC24E14u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E20(CPUState* cpu) { - cpu->pc = 0xBFC24E20u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E24(CPUState* cpu) { - cpu->pc = 0xBFC24E24u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E34(CPUState* cpu) { - cpu->pc = 0xBFC24E34u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E38(CPUState* cpu) { - cpu->pc = 0xBFC24E38u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E40(CPUState* cpu) { - cpu->pc = 0xBFC24E40u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E44(CPUState* cpu) { - cpu->pc = 0xBFC24E44u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E54(CPUState* cpu) { - cpu->pc = 0xBFC24E54u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E6C(CPUState* cpu) { - cpu->pc = 0xBFC24E6Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E74(CPUState* cpu) { - cpu->pc = 0xBFC24E74u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E78(CPUState* cpu) { - cpu->pc = 0xBFC24E78u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E7C(CPUState* cpu) { - cpu->pc = 0xBFC24E7Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E8C(CPUState* cpu) { - cpu->pc = 0xBFC24E8Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E98(CPUState* cpu) { - cpu->pc = 0xBFC24E98u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24E9C(CPUState* cpu) { - cpu->pc = 0xBFC24E9Cu; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24EA4(CPUState* cpu) { - cpu->pc = 0xBFC24EA4u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24EB0(CPUState* cpu) { - cpu->pc = 0xBFC24EB0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24EB4(CPUState* cpu) { - cpu->pc = 0xBFC24EB4u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24EC8(CPUState* cpu) { - cpu->pc = 0xBFC24EC8u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24A48_cont_BFC24EE0(CPUState* cpu) { - cpu->pc = 0xBFC24EE0u; - SCPH1001_func_1FC24A48(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F18(CPUState* cpu) { - cpu->pc = 0xBFC24F18u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F28(CPUState* cpu) { - cpu->pc = 0xBFC24F28u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F2C(CPUState* cpu) { - cpu->pc = 0xBFC24F2Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F34(CPUState* cpu) { - cpu->pc = 0xBFC24F34u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F3C(CPUState* cpu) { - cpu->pc = 0xBFC24F3Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F44(CPUState* cpu) { - cpu->pc = 0xBFC24F44u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F50(CPUState* cpu) { - cpu->pc = 0xBFC24F50u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F74(CPUState* cpu) { - cpu->pc = 0xBFC24F74u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F80(CPUState* cpu) { - cpu->pc = 0xBFC24F80u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F84(CPUState* cpu) { - cpu->pc = 0xBFC24F84u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F90(CPUState* cpu) { - cpu->pc = 0xBFC24F90u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24F9C(CPUState* cpu) { - cpu->pc = 0xBFC24F9Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FBC(CPUState* cpu) { - cpu->pc = 0xBFC24FBCu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FC8(CPUState* cpu) { - cpu->pc = 0xBFC24FC8u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FD4(CPUState* cpu) { - cpu->pc = 0xBFC24FD4u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FDC(CPUState* cpu) { - cpu->pc = 0xBFC24FDCu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FE8(CPUState* cpu) { - cpu->pc = 0xBFC24FE8u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FF0(CPUState* cpu) { - cpu->pc = 0xBFC24FF0u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC24FFC(CPUState* cpu) { - cpu->pc = 0xBFC24FFCu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25004(CPUState* cpu) { - cpu->pc = 0xBFC25004u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25010(CPUState* cpu) { - cpu->pc = 0xBFC25010u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25018(CPUState* cpu) { - cpu->pc = 0xBFC25018u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25024(CPUState* cpu) { - cpu->pc = 0xBFC25024u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC2502C(CPUState* cpu) { - cpu->pc = 0xBFC2502Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25038(CPUState* cpu) { - cpu->pc = 0xBFC25038u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25040(CPUState* cpu) { - cpu->pc = 0xBFC25040u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC2504C(CPUState* cpu) { - cpu->pc = 0xBFC2504Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25054(CPUState* cpu) { - cpu->pc = 0xBFC25054u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25060(CPUState* cpu) { - cpu->pc = 0xBFC25060u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25068(CPUState* cpu) { - cpu->pc = 0xBFC25068u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25074(CPUState* cpu) { - cpu->pc = 0xBFC25074u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC2509C(CPUState* cpu) { - cpu->pc = 0xBFC2509Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250A4(CPUState* cpu) { - cpu->pc = 0xBFC250A4u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250B0(CPUState* cpu) { - cpu->pc = 0xBFC250B0u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250B8(CPUState* cpu) { - cpu->pc = 0xBFC250B8u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250C4(CPUState* cpu) { - cpu->pc = 0xBFC250C4u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250D0(CPUState* cpu) { - cpu->pc = 0xBFC250D0u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250D8(CPUState* cpu) { - cpu->pc = 0xBFC250D8u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250E4(CPUState* cpu) { - cpu->pc = 0xBFC250E4u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250EC(CPUState* cpu) { - cpu->pc = 0xBFC250ECu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC250F8(CPUState* cpu) { - cpu->pc = 0xBFC250F8u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25108(CPUState* cpu) { - cpu->pc = 0xBFC25108u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25110(CPUState* cpu) { - cpu->pc = 0xBFC25110u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25120(CPUState* cpu) { - cpu->pc = 0xBFC25120u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25148(CPUState* cpu) { - cpu->pc = 0xBFC25148u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25150(CPUState* cpu) { - cpu->pc = 0xBFC25150u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25154(CPUState* cpu) { - cpu->pc = 0xBFC25154u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC2515C(CPUState* cpu) { - cpu->pc = 0xBFC2515Cu; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25164(CPUState* cpu) { - cpu->pc = 0xBFC25164u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25178(CPUState* cpu) { - cpu->pc = 0xBFC25178u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25180(CPUState* cpu) { - cpu->pc = 0xBFC25180u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25194(CPUState* cpu) { - cpu->pc = 0xBFC25194u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC24F00_cont_BFC25198(CPUState* cpu) { - cpu->pc = 0xBFC25198u; - SCPH1001_func_1FC24F00(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251B8(CPUState* cpu) { - cpu->pc = 0xBFC251B8u; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251C4(CPUState* cpu) { - cpu->pc = 0xBFC251C4u; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251CC(CPUState* cpu) { - cpu->pc = 0xBFC251CCu; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251D4(CPUState* cpu) { - cpu->pc = 0xBFC251D4u; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251DC(CPUState* cpu) { - cpu->pc = 0xBFC251DCu; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC251A8_cont_BFC251F0(CPUState* cpu) { - cpu->pc = 0xBFC251F0u; - SCPH1001_func_1FC251A8(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25210(CPUState* cpu) { - cpu->pc = 0xBFC25210u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25220(CPUState* cpu) { - cpu->pc = 0xBFC25220u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25228(CPUState* cpu) { - cpu->pc = 0xBFC25228u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25230(CPUState* cpu) { - cpu->pc = 0xBFC25230u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25238(CPUState* cpu) { - cpu->pc = 0xBFC25238u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25248(CPUState* cpu) { - cpu->pc = 0xBFC25248u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25250(CPUState* cpu) { - cpu->pc = 0xBFC25250u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25258(CPUState* cpu) { - cpu->pc = 0xBFC25258u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25260(CPUState* cpu) { - cpu->pc = 0xBFC25260u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25270(CPUState* cpu) { - cpu->pc = 0xBFC25270u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25278(CPUState* cpu) { - cpu->pc = 0xBFC25278u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25280(CPUState* cpu) { - cpu->pc = 0xBFC25280u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25288(CPUState* cpu) { - cpu->pc = 0xBFC25288u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC25298(CPUState* cpu) { - cpu->pc = 0xBFC25298u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC252A0(CPUState* cpu) { - cpu->pc = 0xBFC252A0u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC252A8(CPUState* cpu) { - cpu->pc = 0xBFC252A8u; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC25200_cont_BFC252AC(CPUState* cpu) { - cpu->pc = 0xBFC252ACu; - SCPH1001_func_1FC25200(cpu); -} - -void SCPH1001_func_1FC252BC_cont_BFC252D4(CPUState* cpu) { - cpu->pc = 0xBFC252D4u; - SCPH1001_func_1FC252BC(cpu); -} - -void SCPH1001_func_1FC252BC_cont_BFC252E4(CPUState* cpu) { - cpu->pc = 0xBFC252E4u; - SCPH1001_func_1FC252BC(cpu); -} - -void SCPH1001_func_1FC252BC_cont_BFC252F4(CPUState* cpu) { - cpu->pc = 0xBFC252F4u; - SCPH1001_func_1FC252BC(cpu); -} - -void SCPH1001_func_1FC252BC_cont_BFC25304(CPUState* cpu) { - cpu->pc = 0xBFC25304u; - SCPH1001_func_1FC252BC(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC2532C(CPUState* cpu) { - cpu->pc = 0xBFC2532Cu; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC2533C(CPUState* cpu) { - cpu->pc = 0xBFC2533Cu; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC2534C(CPUState* cpu) { - cpu->pc = 0xBFC2534Cu; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC2535C(CPUState* cpu) { - cpu->pc = 0xBFC2535Cu; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC2536C(CPUState* cpu) { - cpu->pc = 0xBFC2536Cu; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC2531C_cont_BFC25374(CPUState* cpu) { - cpu->pc = 0xBFC25374u; - SCPH1001_func_1FC2531C(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253A4(CPUState* cpu) { - cpu->pc = 0xBFC253A4u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253B8(CPUState* cpu) { - cpu->pc = 0xBFC253B8u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253C0(CPUState* cpu) { - cpu->pc = 0xBFC253C0u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253C4(CPUState* cpu) { - cpu->pc = 0xBFC253C4u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253D8(CPUState* cpu) { - cpu->pc = 0xBFC253D8u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC253E4(CPUState* cpu) { - cpu->pc = 0xBFC253E4u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC25404(CPUState* cpu) { - cpu->pc = 0xBFC25404u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC2540C(CPUState* cpu) { - cpu->pc = 0xBFC2540Cu; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC25418(CPUState* cpu) { - cpu->pc = 0xBFC25418u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC25444(CPUState* cpu) { - cpu->pc = 0xBFC25444u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC25468(CPUState* cpu) { - cpu->pc = 0xBFC25468u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC25484(CPUState* cpu) { - cpu->pc = 0xBFC25484u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC25390_cont_BFC254A0(CPUState* cpu) { - cpu->pc = 0xBFC254A0u; - SCPH1001_func_1FC25390(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC254C0(CPUState* cpu) { - cpu->pc = 0xBFC254C0u; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC254DC(CPUState* cpu) { - cpu->pc = 0xBFC254DCu; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC254EC(CPUState* cpu) { - cpu->pc = 0xBFC254ECu; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC25500(CPUState* cpu) { - cpu->pc = 0xBFC25500u; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC2550C(CPUState* cpu) { - cpu->pc = 0xBFC2550Cu; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC25520(CPUState* cpu) { - cpu->pc = 0xBFC25520u; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC2552C(CPUState* cpu) { - cpu->pc = 0xBFC2552Cu; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC254B0_cont_BFC25534(CPUState* cpu) { - cpu->pc = 0xBFC25534u; - SCPH1001_func_1FC254B0(cpu); -} - -void SCPH1001_func_1FC25558_cont_BFC25570(CPUState* cpu) { - cpu->pc = 0xBFC25570u; - SCPH1001_func_1FC25558(cpu); -} - -void SCPH1001_func_1FC25558_cont_BFC25584(CPUState* cpu) { - cpu->pc = 0xBFC25584u; - SCPH1001_func_1FC25558(cpu); -} - -void SCPH1001_func_1FC25558_cont_BFC25590(CPUState* cpu) { - cpu->pc = 0xBFC25590u; - SCPH1001_func_1FC25558(cpu); -} - -void SCPH1001_func_1FC255A0_cont_BFC255D8(CPUState* cpu) { - cpu->pc = 0xBFC255D8u; - SCPH1001_func_1FC255A0(cpu); -} - -void SCPH1001_func_1FC255A0_cont_BFC25604(CPUState* cpu) { - cpu->pc = 0xBFC25604u; - SCPH1001_func_1FC255A0(cpu); -} - -void SCPH1001_func_1FC255A0_cont_BFC25628(CPUState* cpu) { - cpu->pc = 0xBFC25628u; - SCPH1001_func_1FC255A0(cpu); -} - -void SCPH1001_func_1FC255A0_cont_BFC25658(CPUState* cpu) { - cpu->pc = 0xBFC25658u; - SCPH1001_func_1FC255A0(cpu); -} - -void SCPH1001_func_1FC255A0_cont_BFC25698(CPUState* cpu) { - cpu->pc = 0xBFC25698u; - SCPH1001_func_1FC255A0(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC256E4(CPUState* cpu) { - cpu->pc = 0xBFC256E4u; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC256FC(CPUState* cpu) { - cpu->pc = 0xBFC256FCu; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC25714(CPUState* cpu) { - cpu->pc = 0xBFC25714u; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC2571C(CPUState* cpu) { - cpu->pc = 0xBFC2571Cu; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC25730(CPUState* cpu) { - cpu->pc = 0xBFC25730u; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC256D8_cont_BFC25744(CPUState* cpu) { - cpu->pc = 0xBFC25744u; - SCPH1001_func_1FC256D8(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC25788(CPUState* cpu) { - cpu->pc = 0xBFC25788u; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC257A4(CPUState* cpu) { - cpu->pc = 0xBFC257A4u; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC257E0(CPUState* cpu) { - cpu->pc = 0xBFC257E0u; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC257EC(CPUState* cpu) { - cpu->pc = 0xBFC257ECu; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC25800(CPUState* cpu) { - cpu->pc = 0xBFC25800u; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC2580C(CPUState* cpu) { - cpu->pc = 0xBFC2580Cu; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25754_cont_BFC25840(CPUState* cpu) { - cpu->pc = 0xBFC25840u; - SCPH1001_func_1FC25754(cpu); -} - -void SCPH1001_func_1FC25884_cont_BFC25890(CPUState* cpu) { - cpu->pc = 0xBFC25890u; - SCPH1001_func_1FC25884(cpu); -} - -void SCPH1001_func_1FC25884_cont_BFC258AC(CPUState* cpu) { - cpu->pc = 0xBFC258ACu; - SCPH1001_func_1FC25884(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC25944(CPUState* cpu) { - cpu->pc = 0xBFC25944u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC2594C(CPUState* cpu) { - cpu->pc = 0xBFC2594Cu; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC25964(CPUState* cpu) { - cpu->pc = 0xBFC25964u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC25968(CPUState* cpu) { - cpu->pc = 0xBFC25968u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC25980(CPUState* cpu) { - cpu->pc = 0xBFC25980u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC25988(CPUState* cpu) { - cpu->pc = 0xBFC25988u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC259A0(CPUState* cpu) { - cpu->pc = 0xBFC259A0u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC2592C_cont_BFC259A4(CPUState* cpu) { - cpu->pc = 0xBFC259A4u; - SCPH1001_func_1FC2592C(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A04(CPUState* cpu) { - cpu->pc = 0xBFC25A04u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A0C(CPUState* cpu) { - cpu->pc = 0xBFC25A0Cu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A18(CPUState* cpu) { - cpu->pc = 0xBFC25A18u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A24(CPUState* cpu) { - cpu->pc = 0xBFC25A24u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A2C(CPUState* cpu) { - cpu->pc = 0xBFC25A2Cu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A60(CPUState* cpu) { - cpu->pc = 0xBFC25A60u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A74(CPUState* cpu) { - cpu->pc = 0xBFC25A74u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25A88(CPUState* cpu) { - cpu->pc = 0xBFC25A88u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AA0(CPUState* cpu) { - cpu->pc = 0xBFC25AA0u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AB4(CPUState* cpu) { - cpu->pc = 0xBFC25AB4u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AC8(CPUState* cpu) { - cpu->pc = 0xBFC25AC8u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AD4(CPUState* cpu) { - cpu->pc = 0xBFC25AD4u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AEC(CPUState* cpu) { - cpu->pc = 0xBFC25AECu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25AFC(CPUState* cpu) { - cpu->pc = 0xBFC25AFCu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B04(CPUState* cpu) { - cpu->pc = 0xBFC25B04u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B14(CPUState* cpu) { - cpu->pc = 0xBFC25B14u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B48(CPUState* cpu) { - cpu->pc = 0xBFC25B48u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B54(CPUState* cpu) { - cpu->pc = 0xBFC25B54u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B5C(CPUState* cpu) { - cpu->pc = 0xBFC25B5Cu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B64(CPUState* cpu) { - cpu->pc = 0xBFC25B64u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B68(CPUState* cpu) { - cpu->pc = 0xBFC25B68u; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC259D8_cont_BFC25B6C(CPUState* cpu) { - cpu->pc = 0xBFC25B6Cu; - SCPH1001_func_1FC259D8(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25B9C(CPUState* cpu) { - cpu->pc = 0xBFC25B9Cu; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25BA8(CPUState* cpu) { - cpu->pc = 0xBFC25BA8u; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25BBC(CPUState* cpu) { - cpu->pc = 0xBFC25BBCu; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25BC0(CPUState* cpu) { - cpu->pc = 0xBFC25BC0u; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25BD4(CPUState* cpu) { - cpu->pc = 0xBFC25BD4u; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25BFC(CPUState* cpu) { - cpu->pc = 0xBFC25BFCu; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25B74_cont_BFC25C38(CPUState* cpu) { - cpu->pc = 0xBFC25C38u; - SCPH1001_func_1FC25B74(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25CE8(CPUState* cpu) { - cpu->pc = 0xBFC25CE8u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D04(CPUState* cpu) { - cpu->pc = 0xBFC25D04u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D18(CPUState* cpu) { - cpu->pc = 0xBFC25D18u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D20(CPUState* cpu) { - cpu->pc = 0xBFC25D20u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D54(CPUState* cpu) { - cpu->pc = 0xBFC25D54u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D7C(CPUState* cpu) { - cpu->pc = 0xBFC25D7Cu; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25CC0_cont_BFC25D80(CPUState* cpu) { - cpu->pc = 0xBFC25D80u; - SCPH1001_func_1FC25CC0(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DA8(CPUState* cpu) { - cpu->pc = 0xBFC25DA8u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DB0(CPUState* cpu) { - cpu->pc = 0xBFC25DB0u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DB8(CPUState* cpu) { - cpu->pc = 0xBFC25DB8u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DC0(CPUState* cpu) { - cpu->pc = 0xBFC25DC0u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DE0(CPUState* cpu) { - cpu->pc = 0xBFC25DE0u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25DF0(CPUState* cpu) { - cpu->pc = 0xBFC25DF0u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E00(CPUState* cpu) { - cpu->pc = 0xBFC25E00u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E0C(CPUState* cpu) { - cpu->pc = 0xBFC25E0Cu; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E18(CPUState* cpu) { - cpu->pc = 0xBFC25E18u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E28(CPUState* cpu) { - cpu->pc = 0xBFC25E28u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E3C(CPUState* cpu) { - cpu->pc = 0xBFC25E3Cu; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25D8C_cont_BFC25E40(CPUState* cpu) { - cpu->pc = 0xBFC25E40u; - SCPH1001_func_1FC25D8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25E9C(CPUState* cpu) { - cpu->pc = 0xBFC25E9Cu; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25EB8(CPUState* cpu) { - cpu->pc = 0xBFC25EB8u; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25ECC(CPUState* cpu) { - cpu->pc = 0xBFC25ECCu; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25ED8(CPUState* cpu) { - cpu->pc = 0xBFC25ED8u; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25EE0(CPUState* cpu) { - cpu->pc = 0xBFC25EE0u; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25E8C_cont_BFC25EE8(CPUState* cpu) { - cpu->pc = 0xBFC25EE8u; - SCPH1001_func_1FC25E8C(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F24(CPUState* cpu) { - cpu->pc = 0xBFC25F24u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F34(CPUState* cpu) { - cpu->pc = 0xBFC25F34u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F3C(CPUState* cpu) { - cpu->pc = 0xBFC25F3Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F48(CPUState* cpu) { - cpu->pc = 0xBFC25F48u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F58(CPUState* cpu) { - cpu->pc = 0xBFC25F58u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F60(CPUState* cpu) { - cpu->pc = 0xBFC25F60u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F6C(CPUState* cpu) { - cpu->pc = 0xBFC25F6Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F74(CPUState* cpu) { - cpu->pc = 0xBFC25F74u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F88(CPUState* cpu) { - cpu->pc = 0xBFC25F88u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25F9C(CPUState* cpu) { - cpu->pc = 0xBFC25F9Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FA4(CPUState* cpu) { - cpu->pc = 0xBFC25FA4u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FAC(CPUState* cpu) { - cpu->pc = 0xBFC25FACu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FC4(CPUState* cpu) { - cpu->pc = 0xBFC25FC4u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FC8(CPUState* cpu) { - cpu->pc = 0xBFC25FC8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FD0(CPUState* cpu) { - cpu->pc = 0xBFC25FD0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FD8(CPUState* cpu) { - cpu->pc = 0xBFC25FD8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC25FF0(CPUState* cpu) { - cpu->pc = 0xBFC25FF0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26048(CPUState* cpu) { - cpu->pc = 0xBFC26048u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2604C(CPUState* cpu) { - cpu->pc = 0xBFC2604Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26060(CPUState* cpu) { - cpu->pc = 0xBFC26060u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26064(CPUState* cpu) { - cpu->pc = 0xBFC26064u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2606C(CPUState* cpu) { - cpu->pc = 0xBFC2606Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2607C(CPUState* cpu) { - cpu->pc = 0xBFC2607Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2608C(CPUState* cpu) { - cpu->pc = 0xBFC2608Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC260AC(CPUState* cpu) { - cpu->pc = 0xBFC260ACu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC260F8(CPUState* cpu) { - cpu->pc = 0xBFC260F8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC260FC(CPUState* cpu) { - cpu->pc = 0xBFC260FCu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2610C(CPUState* cpu) { - cpu->pc = 0xBFC2610Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26110(CPUState* cpu) { - cpu->pc = 0xBFC26110u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26120(CPUState* cpu) { - cpu->pc = 0xBFC26120u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26130(CPUState* cpu) { - cpu->pc = 0xBFC26130u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26138(CPUState* cpu) { - cpu->pc = 0xBFC26138u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26148(CPUState* cpu) { - cpu->pc = 0xBFC26148u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26150(CPUState* cpu) { - cpu->pc = 0xBFC26150u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26164(CPUState* cpu) { - cpu->pc = 0xBFC26164u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26178(CPUState* cpu) { - cpu->pc = 0xBFC26178u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26180(CPUState* cpu) { - cpu->pc = 0xBFC26180u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2618C(CPUState* cpu) { - cpu->pc = 0xBFC2618Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26198(CPUState* cpu) { - cpu->pc = 0xBFC26198u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2619C(CPUState* cpu) { - cpu->pc = 0xBFC2619Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC261A4(CPUState* cpu) { - cpu->pc = 0xBFC261A4u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC261B0(CPUState* cpu) { - cpu->pc = 0xBFC261B0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC261CC(CPUState* cpu) { - cpu->pc = 0xBFC261CCu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC261E0(CPUState* cpu) { - cpu->pc = 0xBFC261E0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC261EC(CPUState* cpu) { - cpu->pc = 0xBFC261ECu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26200(CPUState* cpu) { - cpu->pc = 0xBFC26200u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26208(CPUState* cpu) { - cpu->pc = 0xBFC26208u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2621C(CPUState* cpu) { - cpu->pc = 0xBFC2621Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2622C(CPUState* cpu) { - cpu->pc = 0xBFC2622Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26244(CPUState* cpu) { - cpu->pc = 0xBFC26244u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2624C(CPUState* cpu) { - cpu->pc = 0xBFC2624Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26254(CPUState* cpu) { - cpu->pc = 0xBFC26254u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26264(CPUState* cpu) { - cpu->pc = 0xBFC26264u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2627C(CPUState* cpu) { - cpu->pc = 0xBFC2627Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26284(CPUState* cpu) { - cpu->pc = 0xBFC26284u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2628C(CPUState* cpu) { - cpu->pc = 0xBFC2628Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26294(CPUState* cpu) { - cpu->pc = 0xBFC26294u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26298(CPUState* cpu) { - cpu->pc = 0xBFC26298u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262A0(CPUState* cpu) { - cpu->pc = 0xBFC262A0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262B4(CPUState* cpu) { - cpu->pc = 0xBFC262B4u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262C8(CPUState* cpu) { - cpu->pc = 0xBFC262C8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262D0(CPUState* cpu) { - cpu->pc = 0xBFC262D0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262D8(CPUState* cpu) { - cpu->pc = 0xBFC262D8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262E0(CPUState* cpu) { - cpu->pc = 0xBFC262E0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262E8(CPUState* cpu) { - cpu->pc = 0xBFC262E8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262F0(CPUState* cpu) { - cpu->pc = 0xBFC262F0u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262F8(CPUState* cpu) { - cpu->pc = 0xBFC262F8u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC262FC(CPUState* cpu) { - cpu->pc = 0xBFC262FCu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26304(CPUState* cpu) { - cpu->pc = 0xBFC26304u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC2630C(CPUState* cpu) { - cpu->pc = 0xBFC2630Cu; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26314(CPUState* cpu) { - cpu->pc = 0xBFC26314u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC25EF8_cont_BFC26318(CPUState* cpu) { - cpu->pc = 0xBFC26318u; - SCPH1001_func_1FC25EF8(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26344(CPUState* cpu) { - cpu->pc = 0xBFC26344u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26358(CPUState* cpu) { - cpu->pc = 0xBFC26358u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26360(CPUState* cpu) { - cpu->pc = 0xBFC26360u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26368(CPUState* cpu) { - cpu->pc = 0xBFC26368u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26378(CPUState* cpu) { - cpu->pc = 0xBFC26378u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26388(CPUState* cpu) { - cpu->pc = 0xBFC26388u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26390(CPUState* cpu) { - cpu->pc = 0xBFC26390u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26398(CPUState* cpu) { - cpu->pc = 0xBFC26398u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263A0(CPUState* cpu) { - cpu->pc = 0xBFC263A0u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263A8(CPUState* cpu) { - cpu->pc = 0xBFC263A8u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263C8(CPUState* cpu) { - cpu->pc = 0xBFC263C8u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263D8(CPUState* cpu) { - cpu->pc = 0xBFC263D8u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263E0(CPUState* cpu) { - cpu->pc = 0xBFC263E0u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263F0(CPUState* cpu) { - cpu->pc = 0xBFC263F0u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC263FC(CPUState* cpu) { - cpu->pc = 0xBFC263FCu; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26404(CPUState* cpu) { - cpu->pc = 0xBFC26404u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC2640C(CPUState* cpu) { - cpu->pc = 0xBFC2640Cu; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26414(CPUState* cpu) { - cpu->pc = 0xBFC26414u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26420(CPUState* cpu) { - cpu->pc = 0xBFC26420u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26428(CPUState* cpu) { - cpu->pc = 0xBFC26428u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26430(CPUState* cpu) { - cpu->pc = 0xBFC26430u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC26438(CPUState* cpu) { - cpu->pc = 0xBFC26438u; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2632C_cont_BFC2643C(CPUState* cpu) { - cpu->pc = 0xBFC2643Cu; - SCPH1001_func_1FC2632C(cpu); -} - -void SCPH1001_func_1FC2644C_cont_BFC26468(CPUState* cpu) { - cpu->pc = 0xBFC26468u; - SCPH1001_func_1FC2644C(cpu); -} - -void SCPH1001_func_1FC2644C_cont_BFC26474(CPUState* cpu) { - cpu->pc = 0xBFC26474u; - SCPH1001_func_1FC2644C(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC264B8(CPUState* cpu) { - cpu->pc = 0xBFC264B8u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC264D0(CPUState* cpu) { - cpu->pc = 0xBFC264D0u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC264EC(CPUState* cpu) { - cpu->pc = 0xBFC264ECu; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC264F4(CPUState* cpu) { - cpu->pc = 0xBFC264F4u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC26508(CPUState* cpu) { - cpu->pc = 0xBFC26508u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC26510(CPUState* cpu) { - cpu->pc = 0xBFC26510u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC26518(CPUState* cpu) { - cpu->pc = 0xBFC26518u; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC264A0_cont_BFC2652C(CPUState* cpu) { - cpu->pc = 0xBFC2652Cu; - SCPH1001_func_1FC264A0(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC2656C(CPUState* cpu) { - cpu->pc = 0xBFC2656Cu; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC26580(CPUState* cpu) { - cpu->pc = 0xBFC26580u; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC2658C(CPUState* cpu) { - cpu->pc = 0xBFC2658Cu; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC26594(CPUState* cpu) { - cpu->pc = 0xBFC26594u; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC26598(CPUState* cpu) { - cpu->pc = 0xBFC26598u; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC265A0(CPUState* cpu) { - cpu->pc = 0xBFC265A0u; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC26550_cont_BFC265A4(CPUState* cpu) { - cpu->pc = 0xBFC265A4u; - SCPH1001_func_1FC26550(cpu); -} - -void SCPH1001_func_1FC265C0_cont_BFC265D0(CPUState* cpu) { - cpu->pc = 0xBFC265D0u; - SCPH1001_func_1FC265C0(cpu); -} - -void SCPH1001_func_1FC265C0_cont_BFC265E4(CPUState* cpu) { - cpu->pc = 0xBFC265E4u; - SCPH1001_func_1FC265C0(cpu); -} - -void SCPH1001_func_1FC265C0_cont_BFC265F0(CPUState* cpu) { - cpu->pc = 0xBFC265F0u; - SCPH1001_func_1FC265C0(cpu); -} - -void SCPH1001_func_1FC26610_cont_BFC26620(CPUState* cpu) { - cpu->pc = 0xBFC26620u; - SCPH1001_func_1FC26610(cpu); -} - -void SCPH1001_func_1FC26610_cont_BFC26634(CPUState* cpu) { - cpu->pc = 0xBFC26634u; - SCPH1001_func_1FC26610(cpu); -} - -void SCPH1001_func_1FC26610_cont_BFC26640(CPUState* cpu) { - cpu->pc = 0xBFC26640u; - SCPH1001_func_1FC26610(cpu); -} - -void SCPH1001_func_1FC26670_cont_BFC26680(CPUState* cpu) { - cpu->pc = 0xBFC26680u; - SCPH1001_func_1FC26670(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC266C8(CPUState* cpu) { - cpu->pc = 0xBFC266C8u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC266DC(CPUState* cpu) { - cpu->pc = 0xBFC266DCu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC266EC(CPUState* cpu) { - cpu->pc = 0xBFC266ECu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26704(CPUState* cpu) { - cpu->pc = 0xBFC26704u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26728(CPUState* cpu) { - cpu->pc = 0xBFC26728u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC2673C(CPUState* cpu) { - cpu->pc = 0xBFC2673Cu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26748(CPUState* cpu) { - cpu->pc = 0xBFC26748u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26750(CPUState* cpu) { - cpu->pc = 0xBFC26750u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26760(CPUState* cpu) { - cpu->pc = 0xBFC26760u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26768(CPUState* cpu) { - cpu->pc = 0xBFC26768u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC2676C(CPUState* cpu) { - cpu->pc = 0xBFC2676Cu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26774(CPUState* cpu) { - cpu->pc = 0xBFC26774u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26780(CPUState* cpu) { - cpu->pc = 0xBFC26780u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26798(CPUState* cpu) { - cpu->pc = 0xBFC26798u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267A4(CPUState* cpu) { - cpu->pc = 0xBFC267A4u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267AC(CPUState* cpu) { - cpu->pc = 0xBFC267ACu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267B4(CPUState* cpu) { - cpu->pc = 0xBFC267B4u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267C8(CPUState* cpu) { - cpu->pc = 0xBFC267C8u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267CC(CPUState* cpu) { - cpu->pc = 0xBFC267CCu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267E0(CPUState* cpu) { - cpu->pc = 0xBFC267E0u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267E8(CPUState* cpu) { - cpu->pc = 0xBFC267E8u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC267FC(CPUState* cpu) { - cpu->pc = 0xBFC267FCu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26804(CPUState* cpu) { - cpu->pc = 0xBFC26804u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26820(CPUState* cpu) { - cpu->pc = 0xBFC26820u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26824(CPUState* cpu) { - cpu->pc = 0xBFC26824u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC2682C(CPUState* cpu) { - cpu->pc = 0xBFC2682Cu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26834(CPUState* cpu) { - cpu->pc = 0xBFC26834u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26844(CPUState* cpu) { - cpu->pc = 0xBFC26844u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26850(CPUState* cpu) { - cpu->pc = 0xBFC26850u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26870(CPUState* cpu) { - cpu->pc = 0xBFC26870u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26878(CPUState* cpu) { - cpu->pc = 0xBFC26878u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26880(CPUState* cpu) { - cpu->pc = 0xBFC26880u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC26894(CPUState* cpu) { - cpu->pc = 0xBFC26894u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC268B0(CPUState* cpu) { - cpu->pc = 0xBFC268B0u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC268CC(CPUState* cpu) { - cpu->pc = 0xBFC268CCu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC268D4(CPUState* cpu) { - cpu->pc = 0xBFC268D4u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC268DC(CPUState* cpu) { - cpu->pc = 0xBFC268DCu; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC266B0_cont_BFC268E0(CPUState* cpu) { - cpu->pc = 0xBFC268E0u; - SCPH1001_func_1FC266B0(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26908(CPUState* cpu) { - cpu->pc = 0xBFC26908u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC2691C(CPUState* cpu) { - cpu->pc = 0xBFC2691Cu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26928(CPUState* cpu) { - cpu->pc = 0xBFC26928u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26940(CPUState* cpu) { - cpu->pc = 0xBFC26940u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC2695C(CPUState* cpu) { - cpu->pc = 0xBFC2695Cu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC269E0(CPUState* cpu) { - cpu->pc = 0xBFC269E0u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC269E8(CPUState* cpu) { - cpu->pc = 0xBFC269E8u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC269F0(CPUState* cpu) { - cpu->pc = 0xBFC269F0u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC269F8(CPUState* cpu) { - cpu->pc = 0xBFC269F8u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A0C(CPUState* cpu) { - cpu->pc = 0xBFC26A0Cu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A38(CPUState* cpu) { - cpu->pc = 0xBFC26A38u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A4C(CPUState* cpu) { - cpu->pc = 0xBFC26A4Cu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A74(CPUState* cpu) { - cpu->pc = 0xBFC26A74u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A7C(CPUState* cpu) { - cpu->pc = 0xBFC26A7Cu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A80(CPUState* cpu) { - cpu->pc = 0xBFC26A80u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26A88(CPUState* cpu) { - cpu->pc = 0xBFC26A88u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AA0(CPUState* cpu) { - cpu->pc = 0xBFC26AA0u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AAC(CPUState* cpu) { - cpu->pc = 0xBFC26AACu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AB4(CPUState* cpu) { - cpu->pc = 0xBFC26AB4u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AB8(CPUState* cpu) { - cpu->pc = 0xBFC26AB8u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AC0(CPUState* cpu) { - cpu->pc = 0xBFC26AC0u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AE8(CPUState* cpu) { - cpu->pc = 0xBFC26AE8u; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC268EC_cont_BFC26AEC(CPUState* cpu) { - cpu->pc = 0xBFC26AECu; - SCPH1001_func_1FC268EC(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C24(CPUState* cpu) { - cpu->pc = 0xBFC26C24u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C40(CPUState* cpu) { - cpu->pc = 0xBFC26C40u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C48(CPUState* cpu) { - cpu->pc = 0xBFC26C48u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C50(CPUState* cpu) { - cpu->pc = 0xBFC26C50u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C74(CPUState* cpu) { - cpu->pc = 0xBFC26C74u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C84(CPUState* cpu) { - cpu->pc = 0xBFC26C84u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C8C(CPUState* cpu) { - cpu->pc = 0xBFC26C8Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26C9C(CPUState* cpu) { - cpu->pc = 0xBFC26C9Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26CB4(CPUState* cpu) { - cpu->pc = 0xBFC26CB4u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26CBC(CPUState* cpu) { - cpu->pc = 0xBFC26CBCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26CC8(CPUState* cpu) { - cpu->pc = 0xBFC26CC8u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26CDC(CPUState* cpu) { - cpu->pc = 0xBFC26CDCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26CF0(CPUState* cpu) { - cpu->pc = 0xBFC26CF0u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D04(CPUState* cpu) { - cpu->pc = 0xBFC26D04u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D0C(CPUState* cpu) { - cpu->pc = 0xBFC26D0Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D18(CPUState* cpu) { - cpu->pc = 0xBFC26D18u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D28(CPUState* cpu) { - cpu->pc = 0xBFC26D28u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D30(CPUState* cpu) { - cpu->pc = 0xBFC26D30u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D38(CPUState* cpu) { - cpu->pc = 0xBFC26D38u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D50(CPUState* cpu) { - cpu->pc = 0xBFC26D50u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D5C(CPUState* cpu) { - cpu->pc = 0xBFC26D5Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D64(CPUState* cpu) { - cpu->pc = 0xBFC26D64u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D78(CPUState* cpu) { - cpu->pc = 0xBFC26D78u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D8C(CPUState* cpu) { - cpu->pc = 0xBFC26D8Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26D98(CPUState* cpu) { - cpu->pc = 0xBFC26D98u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DA0(CPUState* cpu) { - cpu->pc = 0xBFC26DA0u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DA8(CPUState* cpu) { - cpu->pc = 0xBFC26DA8u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DBC(CPUState* cpu) { - cpu->pc = 0xBFC26DBCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DC8(CPUState* cpu) { - cpu->pc = 0xBFC26DC8u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DCC(CPUState* cpu) { - cpu->pc = 0xBFC26DCCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DDC(CPUState* cpu) { - cpu->pc = 0xBFC26DDCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DE8(CPUState* cpu) { - cpu->pc = 0xBFC26DE8u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DEC(CPUState* cpu) { - cpu->pc = 0xBFC26DECu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26DFC(CPUState* cpu) { - cpu->pc = 0xBFC26DFCu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26E30(CPUState* cpu) { - cpu->pc = 0xBFC26E30u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26E3C(CPUState* cpu) { - cpu->pc = 0xBFC26E3Cu; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26E48(CPUState* cpu) { - cpu->pc = 0xBFC26E48u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26E54(CPUState* cpu) { - cpu->pc = 0xBFC26E54u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26C10_cont_BFC26E58(CPUState* cpu) { - cpu->pc = 0xBFC26E58u; - SCPH1001_func_1FC26C10(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26E88(CPUState* cpu) { - cpu->pc = 0xBFC26E88u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26E90(CPUState* cpu) { - cpu->pc = 0xBFC26E90u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26E98(CPUState* cpu) { - cpu->pc = 0xBFC26E98u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26E9C(CPUState* cpu) { - cpu->pc = 0xBFC26E9Cu; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EA4(CPUState* cpu) { - cpu->pc = 0xBFC26EA4u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EAC(CPUState* cpu) { - cpu->pc = 0xBFC26EACu; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EB0(CPUState* cpu) { - cpu->pc = 0xBFC26EB0u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EC0(CPUState* cpu) { - cpu->pc = 0xBFC26EC0u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EC8(CPUState* cpu) { - cpu->pc = 0xBFC26EC8u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26ED8(CPUState* cpu) { - cpu->pc = 0xBFC26ED8u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EE0(CPUState* cpu) { - cpu->pc = 0xBFC26EE0u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26E64_cont_BFC26EE8(CPUState* cpu) { - cpu->pc = 0xBFC26EE8u; - SCPH1001_func_1FC26E64(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27024(CPUState* cpu) { - cpu->pc = 0xBFC27024u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2702C(CPUState* cpu) { - cpu->pc = 0xBFC2702Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27034(CPUState* cpu) { - cpu->pc = 0xBFC27034u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2703C(CPUState* cpu) { - cpu->pc = 0xBFC2703Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27044(CPUState* cpu) { - cpu->pc = 0xBFC27044u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27048(CPUState* cpu) { - cpu->pc = 0xBFC27048u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27058(CPUState* cpu) { - cpu->pc = 0xBFC27058u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27060(CPUState* cpu) { - cpu->pc = 0xBFC27060u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2706C(CPUState* cpu) { - cpu->pc = 0xBFC2706Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2707C(CPUState* cpu) { - cpu->pc = 0xBFC2707Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27084(CPUState* cpu) { - cpu->pc = 0xBFC27084u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2708C(CPUState* cpu) { - cpu->pc = 0xBFC2708Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270A4(CPUState* cpu) { - cpu->pc = 0xBFC270A4u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270AC(CPUState* cpu) { - cpu->pc = 0xBFC270ACu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270B8(CPUState* cpu) { - cpu->pc = 0xBFC270B8u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270C8(CPUState* cpu) { - cpu->pc = 0xBFC270C8u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270D0(CPUState* cpu) { - cpu->pc = 0xBFC270D0u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270D8(CPUState* cpu) { - cpu->pc = 0xBFC270D8u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270E8(CPUState* cpu) { - cpu->pc = 0xBFC270E8u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270F0(CPUState* cpu) { - cpu->pc = 0xBFC270F0u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC270FC(CPUState* cpu) { - cpu->pc = 0xBFC270FCu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27104(CPUState* cpu) { - cpu->pc = 0xBFC27104u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27114(CPUState* cpu) { - cpu->pc = 0xBFC27114u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2711C(CPUState* cpu) { - cpu->pc = 0xBFC2711Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2712C(CPUState* cpu) { - cpu->pc = 0xBFC2712Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2713C(CPUState* cpu) { - cpu->pc = 0xBFC2713Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27144(CPUState* cpu) { - cpu->pc = 0xBFC27144u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC27154(CPUState* cpu) { - cpu->pc = 0xBFC27154u; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2715C(CPUState* cpu) { - cpu->pc = 0xBFC2715Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC26EF8_cont_BFC2716C(CPUState* cpu) { - cpu->pc = 0xBFC2716Cu; - SCPH1001_func_1FC26EF8(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC271C0(CPUState* cpu) { - cpu->pc = 0xBFC271C0u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC271C8(CPUState* cpu) { - cpu->pc = 0xBFC271C8u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC271E8(CPUState* cpu) { - cpu->pc = 0xBFC271E8u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27208(CPUState* cpu) { - cpu->pc = 0xBFC27208u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27228(CPUState* cpu) { - cpu->pc = 0xBFC27228u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27248(CPUState* cpu) { - cpu->pc = 0xBFC27248u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC2725C(CPUState* cpu) { - cpu->pc = 0xBFC2725Cu; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC272B8(CPUState* cpu) { - cpu->pc = 0xBFC272B8u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC272EC(CPUState* cpu) { - cpu->pc = 0xBFC272ECu; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC272F4(CPUState* cpu) { - cpu->pc = 0xBFC272F4u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27324(CPUState* cpu) { - cpu->pc = 0xBFC27324u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27328(CPUState* cpu) { - cpu->pc = 0xBFC27328u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27330(CPUState* cpu) { - cpu->pc = 0xBFC27330u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27338(CPUState* cpu) { - cpu->pc = 0xBFC27338u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC2734C(CPUState* cpu) { - cpu->pc = 0xBFC2734Cu; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC2738C(CPUState* cpu) { - cpu->pc = 0xBFC2738Cu; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC27398(CPUState* cpu) { - cpu->pc = 0xBFC27398u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC273A0(CPUState* cpu) { - cpu->pc = 0xBFC273A0u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC273A8(CPUState* cpu) { - cpu->pc = 0xBFC273A8u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC27190_cont_BFC273B8(CPUState* cpu) { - cpu->pc = 0xBFC273B8u; - SCPH1001_func_1FC27190(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27434(CPUState* cpu) { - cpu->pc = 0xBFC27434u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27448(CPUState* cpu) { - cpu->pc = 0xBFC27448u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27454(CPUState* cpu) { - cpu->pc = 0xBFC27454u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2745C(CPUState* cpu) { - cpu->pc = 0xBFC2745Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2746C(CPUState* cpu) { - cpu->pc = 0xBFC2746Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27480(CPUState* cpu) { - cpu->pc = 0xBFC27480u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27494(CPUState* cpu) { - cpu->pc = 0xBFC27494u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274A8(CPUState* cpu) { - cpu->pc = 0xBFC274A8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274C4(CPUState* cpu) { - cpu->pc = 0xBFC274C4u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274C8(CPUState* cpu) { - cpu->pc = 0xBFC274C8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274D4(CPUState* cpu) { - cpu->pc = 0xBFC274D4u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274DC(CPUState* cpu) { - cpu->pc = 0xBFC274DCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274E0(CPUState* cpu) { - cpu->pc = 0xBFC274E0u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC274EC(CPUState* cpu) { - cpu->pc = 0xBFC274ECu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27508(CPUState* cpu) { - cpu->pc = 0xBFC27508u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2750C(CPUState* cpu) { - cpu->pc = 0xBFC2750Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27518(CPUState* cpu) { - cpu->pc = 0xBFC27518u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27520(CPUState* cpu) { - cpu->pc = 0xBFC27520u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27524(CPUState* cpu) { - cpu->pc = 0xBFC27524u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27530(CPUState* cpu) { - cpu->pc = 0xBFC27530u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2754C(CPUState* cpu) { - cpu->pc = 0xBFC2754Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27550(CPUState* cpu) { - cpu->pc = 0xBFC27550u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2755C(CPUState* cpu) { - cpu->pc = 0xBFC2755Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27564(CPUState* cpu) { - cpu->pc = 0xBFC27564u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27568(CPUState* cpu) { - cpu->pc = 0xBFC27568u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27574(CPUState* cpu) { - cpu->pc = 0xBFC27574u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27590(CPUState* cpu) { - cpu->pc = 0xBFC27590u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27594(CPUState* cpu) { - cpu->pc = 0xBFC27594u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275A0(CPUState* cpu) { - cpu->pc = 0xBFC275A0u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275A8(CPUState* cpu) { - cpu->pc = 0xBFC275A8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275AC(CPUState* cpu) { - cpu->pc = 0xBFC275ACu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275B8(CPUState* cpu) { - cpu->pc = 0xBFC275B8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275C0(CPUState* cpu) { - cpu->pc = 0xBFC275C0u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275C8(CPUState* cpu) { - cpu->pc = 0xBFC275C8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275D4(CPUState* cpu) { - cpu->pc = 0xBFC275D4u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275F0(CPUState* cpu) { - cpu->pc = 0xBFC275F0u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC275FC(CPUState* cpu) { - cpu->pc = 0xBFC275FCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27600(CPUState* cpu) { - cpu->pc = 0xBFC27600u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27614(CPUState* cpu) { - cpu->pc = 0xBFC27614u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC276CC(CPUState* cpu) { - cpu->pc = 0xBFC276CCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC276D8(CPUState* cpu) { - cpu->pc = 0xBFC276D8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC276F8(CPUState* cpu) { - cpu->pc = 0xBFC276F8u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27700(CPUState* cpu) { - cpu->pc = 0xBFC27700u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27708(CPUState* cpu) { - cpu->pc = 0xBFC27708u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27714(CPUState* cpu) { - cpu->pc = 0xBFC27714u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27734(CPUState* cpu) { - cpu->pc = 0xBFC27734u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2773C(CPUState* cpu) { - cpu->pc = 0xBFC2773Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2775C(CPUState* cpu) { - cpu->pc = 0xBFC2775Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27760(CPUState* cpu) { - cpu->pc = 0xBFC27760u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2777C(CPUState* cpu) { - cpu->pc = 0xBFC2777Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2779C(CPUState* cpu) { - cpu->pc = 0xBFC2779Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC277BC(CPUState* cpu) { - cpu->pc = 0xBFC277BCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC277DC(CPUState* cpu) { - cpu->pc = 0xBFC277DCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC277FC(CPUState* cpu) { - cpu->pc = 0xBFC277FCu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27804(CPUState* cpu) { - cpu->pc = 0xBFC27804u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27824(CPUState* cpu) { - cpu->pc = 0xBFC27824u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC27828(CPUState* cpu) { - cpu->pc = 0xBFC27828u; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC273E4_cont_BFC2783C(CPUState* cpu) { - cpu->pc = 0xBFC2783Cu; - SCPH1001_func_1FC273E4(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC27890(CPUState* cpu) { - cpu->pc = 0xBFC27890u; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC278C8(CPUState* cpu) { - cpu->pc = 0xBFC278C8u; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC278D8(CPUState* cpu) { - cpu->pc = 0xBFC278D8u; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC278EC(CPUState* cpu) { - cpu->pc = 0xBFC278ECu; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC278F4(CPUState* cpu) { - cpu->pc = 0xBFC278F4u; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27868_cont_BFC278F8(CPUState* cpu) { - cpu->pc = 0xBFC278F8u; - SCPH1001_func_1FC27868(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC2792C(CPUState* cpu) { - cpu->pc = 0xBFC2792Cu; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27954(CPUState* cpu) { - cpu->pc = 0xBFC27954u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27974(CPUState* cpu) { - cpu->pc = 0xBFC27974u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC2799C(CPUState* cpu) { - cpu->pc = 0xBFC2799Cu; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC279D8(CPUState* cpu) { - cpu->pc = 0xBFC279D8u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC279E0(CPUState* cpu) { - cpu->pc = 0xBFC279E0u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC279F0(CPUState* cpu) { - cpu->pc = 0xBFC279F0u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27A00(CPUState* cpu) { - cpu->pc = 0xBFC27A00u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27A04(CPUState* cpu) { - cpu->pc = 0xBFC27A04u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27A0C(CPUState* cpu) { - cpu->pc = 0xBFC27A0Cu; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27A14(CPUState* cpu) { - cpu->pc = 0xBFC27A14u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27910_cont_BFC27A18(CPUState* cpu) { - cpu->pc = 0xBFC27A18u; - SCPH1001_func_1FC27910(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27A64(CPUState* cpu) { - cpu->pc = 0xBFC27A64u; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27A84(CPUState* cpu) { - cpu->pc = 0xBFC27A84u; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27AAC(CPUState* cpu) { - cpu->pc = 0xBFC27AACu; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27AE8(CPUState* cpu) { - cpu->pc = 0xBFC27AE8u; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27AF0(CPUState* cpu) { - cpu->pc = 0xBFC27AF0u; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27B0C(CPUState* cpu) { - cpu->pc = 0xBFC27B0Cu; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27A2C_cont_BFC27B10(CPUState* cpu) { - cpu->pc = 0xBFC27B10u; - SCPH1001_func_1FC27A2C(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27B34(CPUState* cpu) { - cpu->pc = 0xBFC27B34u; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27B58(CPUState* cpu) { - cpu->pc = 0xBFC27B58u; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27B7C(CPUState* cpu) { - cpu->pc = 0xBFC27B7Cu; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27BA0(CPUState* cpu) { - cpu->pc = 0xBFC27BA0u; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27BC4(CPUState* cpu) { - cpu->pc = 0xBFC27BC4u; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27B24_cont_BFC27BCC(CPUState* cpu) { - cpu->pc = 0xBFC27BCCu; - SCPH1001_func_1FC27B24(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27C14(CPUState* cpu) { - cpu->pc = 0xBFC27C14u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27C30(CPUState* cpu) { - cpu->pc = 0xBFC27C30u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27C58(CPUState* cpu) { - cpu->pc = 0xBFC27C58u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27C8C(CPUState* cpu) { - cpu->pc = 0xBFC27C8Cu; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27C94(CPUState* cpu) { - cpu->pc = 0xBFC27C94u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27CB0(CPUState* cpu) { - cpu->pc = 0xBFC27CB0u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27BDC_cont_BFC27CB4(CPUState* cpu) { - cpu->pc = 0xBFC27CB4u; - SCPH1001_func_1FC27BDC(cpu); -} - -void SCPH1001_func_1FC27CC8_cont_BFC27CD8(CPUState* cpu) { - cpu->pc = 0xBFC27CD8u; - SCPH1001_func_1FC27CC8(cpu); -} - -void SCPH1001_func_1FC27CC8_cont_BFC27CE0(CPUState* cpu) { - cpu->pc = 0xBFC27CE0u; - SCPH1001_func_1FC27CC8(cpu); -} - -void SCPH1001_func_1FC27D2C_cont_BFC27D48(CPUState* cpu) { - cpu->pc = 0xBFC27D48u; - SCPH1001_func_1FC27D2C(cpu); -} - -void SCPH1001_func_1FC27D2C_cont_BFC27D70(CPUState* cpu) { - cpu->pc = 0xBFC27D70u; - SCPH1001_func_1FC27D2C(cpu); -} - -void SCPH1001_func_1FC27D2C_cont_BFC27D7C(CPUState* cpu) { - cpu->pc = 0xBFC27D7Cu; - SCPH1001_func_1FC27D2C(cpu); -} - -void SCPH1001_func_1FC27D2C_cont_BFC27D8C(CPUState* cpu) { - cpu->pc = 0xBFC27D8Cu; - SCPH1001_func_1FC27D2C(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DBC(CPUState* cpu) { - cpu->pc = 0xBFC27DBCu; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DC4(CPUState* cpu) { - cpu->pc = 0xBFC27DC4u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DCC(CPUState* cpu) { - cpu->pc = 0xBFC27DCCu; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DD8(CPUState* cpu) { - cpu->pc = 0xBFC27DD8u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DE8(CPUState* cpu) { - cpu->pc = 0xBFC27DE8u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27DF8(CPUState* cpu) { - cpu->pc = 0xBFC27DF8u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27E08(CPUState* cpu) { - cpu->pc = 0xBFC27E08u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27E18(CPUState* cpu) { - cpu->pc = 0xBFC27E18u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27E28(CPUState* cpu) { - cpu->pc = 0xBFC27E28u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27DB0_cont_BFC27E58(CPUState* cpu) { - cpu->pc = 0xBFC27E58u; - SCPH1001_func_1FC27DB0(cpu); -} - -void SCPH1001_func_1FC27E68_cont_BFC27E78(CPUState* cpu) { - cpu->pc = 0xBFC27E78u; - SCPH1001_func_1FC27E68(cpu); -} - -void SCPH1001_func_1FC27E88_cont_BFC27EA0(CPUState* cpu) { - cpu->pc = 0xBFC27EA0u; - SCPH1001_func_1FC27E88(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27ED4(CPUState* cpu) { - cpu->pc = 0xBFC27ED4u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27EF0(CPUState* cpu) { - cpu->pc = 0xBFC27EF0u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27EF8(CPUState* cpu) { - cpu->pc = 0xBFC27EF8u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F08(CPUState* cpu) { - cpu->pc = 0xBFC27F08u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F10(CPUState* cpu) { - cpu->pc = 0xBFC27F10u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F18(CPUState* cpu) { - cpu->pc = 0xBFC27F18u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F28(CPUState* cpu) { - cpu->pc = 0xBFC27F28u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F30(CPUState* cpu) { - cpu->pc = 0xBFC27F30u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F38(CPUState* cpu) { - cpu->pc = 0xBFC27F38u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F48(CPUState* cpu) { - cpu->pc = 0xBFC27F48u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F50(CPUState* cpu) { - cpu->pc = 0xBFC27F50u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F58(CPUState* cpu) { - cpu->pc = 0xBFC27F58u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F68(CPUState* cpu) { - cpu->pc = 0xBFC27F68u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F70(CPUState* cpu) { - cpu->pc = 0xBFC27F70u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F78(CPUState* cpu) { - cpu->pc = 0xBFC27F78u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F88(CPUState* cpu) { - cpu->pc = 0xBFC27F88u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F90(CPUState* cpu) { - cpu->pc = 0xBFC27F90u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27F98(CPUState* cpu) { - cpu->pc = 0xBFC27F98u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27EB4_cont_BFC27FA8(CPUState* cpu) { - cpu->pc = 0xBFC27FA8u; - SCPH1001_func_1FC27EB4(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC27FC4(CPUState* cpu) { - cpu->pc = 0xBFC27FC4u; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC27FDC(CPUState* cpu) { - cpu->pc = 0xBFC27FDCu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC27FEC(CPUState* cpu) { - cpu->pc = 0xBFC27FECu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC27FF8(CPUState* cpu) { - cpu->pc = 0xBFC27FF8u; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC2800C(CPUState* cpu) { - cpu->pc = 0xBFC2800Cu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC28018(CPUState* cpu) { - cpu->pc = 0xBFC28018u; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC28024(CPUState* cpu) { - cpu->pc = 0xBFC28024u; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC2802C(CPUState* cpu) { - cpu->pc = 0xBFC2802Cu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC2803C(CPUState* cpu) { - cpu->pc = 0xBFC2803Cu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC2804C(CPUState* cpu) { - cpu->pc = 0xBFC2804Cu; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC27FB0_cont_BFC28054(CPUState* cpu) { - cpu->pc = 0xBFC28054u; - SCPH1001_func_1FC27FB0(cpu); -} - -void SCPH1001_func_1FC28064_cont_BFC2807C(CPUState* cpu) { - cpu->pc = 0xBFC2807Cu; - SCPH1001_func_1FC28064(cpu); -} - -void SCPH1001_func_1FC282E8_cont_BFC282FC(CPUState* cpu) { - cpu->pc = 0xBFC282FCu; - SCPH1001_func_1FC282E8(cpu); -} - -void SCPH1001_func_1FC282E8_cont_BFC28324(CPUState* cpu) { - cpu->pc = 0xBFC28324u; - SCPH1001_func_1FC282E8(cpu); -} - -void SCPH1001_func_1FC282E8_cont_BFC2834C(CPUState* cpu) { - cpu->pc = 0xBFC2834Cu; - SCPH1001_func_1FC282E8(cpu); -} - -void SCPH1001_func_1FC282E8_cont_BFC28354(CPUState* cpu) { - cpu->pc = 0xBFC28354u; - SCPH1001_func_1FC282E8(cpu); -} - -void SCPH1001_func_1FC282E8_cont_BFC28360(CPUState* cpu) { - cpu->pc = 0xBFC28360u; - SCPH1001_func_1FC282E8(cpu); -} - -void SCPH1001_func_1FC28370_cont_BFC28388(CPUState* cpu) { - cpu->pc = 0xBFC28388u; - SCPH1001_func_1FC28370(cpu); -} - -void SCPH1001_func_1FC28370_cont_BFC283AC(CPUState* cpu) { - cpu->pc = 0xBFC283ACu; - SCPH1001_func_1FC28370(cpu); -} - -void SCPH1001_func_1FC28370_cont_BFC283D0(CPUState* cpu) { - cpu->pc = 0xBFC283D0u; - SCPH1001_func_1FC28370(cpu); -} - -void SCPH1001_func_1FC28370_cont_BFC283D8(CPUState* cpu) { - cpu->pc = 0xBFC283D8u; - SCPH1001_func_1FC28370(cpu); -} - -void SCPH1001_func_1FC28370_cont_BFC283E0(CPUState* cpu) { - cpu->pc = 0xBFC283E0u; - SCPH1001_func_1FC28370(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC283F8(CPUState* cpu) { - cpu->pc = 0xBFC283F8u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC2840C(CPUState* cpu) { - cpu->pc = 0xBFC2840Cu; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28418(CPUState* cpu) { - cpu->pc = 0xBFC28418u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28420(CPUState* cpu) { - cpu->pc = 0xBFC28420u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28424(CPUState* cpu) { - cpu->pc = 0xBFC28424u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28444(CPUState* cpu) { - cpu->pc = 0xBFC28444u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28450(CPUState* cpu) { - cpu->pc = 0xBFC28450u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC2845C(CPUState* cpu) { - cpu->pc = 0xBFC2845Cu; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC283F0_cont_BFC28480(CPUState* cpu) { - cpu->pc = 0xBFC28480u; - SCPH1001_func_1FC283F0(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284AC(CPUState* cpu) { - cpu->pc = 0xBFC284ACu; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284B4(CPUState* cpu) { - cpu->pc = 0xBFC284B4u; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284C0(CPUState* cpu) { - cpu->pc = 0xBFC284C0u; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284C8(CPUState* cpu) { - cpu->pc = 0xBFC284C8u; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284D0(CPUState* cpu) { - cpu->pc = 0xBFC284D0u; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284D8(CPUState* cpu) { - cpu->pc = 0xBFC284D8u; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC28490_cont_BFC284DC(CPUState* cpu) { - cpu->pc = 0xBFC284DCu; - SCPH1001_func_1FC28490(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28504(CPUState* cpu) { - cpu->pc = 0xBFC28504u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28514(CPUState* cpu) { - cpu->pc = 0xBFC28514u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2851C(CPUState* cpu) { - cpu->pc = 0xBFC2851Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2852C(CPUState* cpu) { - cpu->pc = 0xBFC2852Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2853C(CPUState* cpu) { - cpu->pc = 0xBFC2853Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28544(CPUState* cpu) { - cpu->pc = 0xBFC28544u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28568(CPUState* cpu) { - cpu->pc = 0xBFC28568u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28578(CPUState* cpu) { - cpu->pc = 0xBFC28578u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28580(CPUState* cpu) { - cpu->pc = 0xBFC28580u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28594(CPUState* cpu) { - cpu->pc = 0xBFC28594u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285A4(CPUState* cpu) { - cpu->pc = 0xBFC285A4u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285B8(CPUState* cpu) { - cpu->pc = 0xBFC285B8u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285C0(CPUState* cpu) { - cpu->pc = 0xBFC285C0u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285C4(CPUState* cpu) { - cpu->pc = 0xBFC285C4u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285CC(CPUState* cpu) { - cpu->pc = 0xBFC285CCu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285D0(CPUState* cpu) { - cpu->pc = 0xBFC285D0u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285DC(CPUState* cpu) { - cpu->pc = 0xBFC285DCu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285F0(CPUState* cpu) { - cpu->pc = 0xBFC285F0u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285F8(CPUState* cpu) { - cpu->pc = 0xBFC285F8u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC285FC(CPUState* cpu) { - cpu->pc = 0xBFC285FCu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28610(CPUState* cpu) { - cpu->pc = 0xBFC28610u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28614(CPUState* cpu) { - cpu->pc = 0xBFC28614u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28620(CPUState* cpu) { - cpu->pc = 0xBFC28620u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28628(CPUState* cpu) { - cpu->pc = 0xBFC28628u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2863C(CPUState* cpu) { - cpu->pc = 0xBFC2863Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28644(CPUState* cpu) { - cpu->pc = 0xBFC28644u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28648(CPUState* cpu) { - cpu->pc = 0xBFC28648u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28650(CPUState* cpu) { - cpu->pc = 0xBFC28650u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28654(CPUState* cpu) { - cpu->pc = 0xBFC28654u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28660(CPUState* cpu) { - cpu->pc = 0xBFC28660u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28674(CPUState* cpu) { - cpu->pc = 0xBFC28674u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2867C(CPUState* cpu) { - cpu->pc = 0xBFC2867Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28688(CPUState* cpu) { - cpu->pc = 0xBFC28688u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2868C(CPUState* cpu) { - cpu->pc = 0xBFC2868Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC286C4(CPUState* cpu) { - cpu->pc = 0xBFC286C4u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC286FC(CPUState* cpu) { - cpu->pc = 0xBFC286FCu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28734(CPUState* cpu) { - cpu->pc = 0xBFC28734u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2873C(CPUState* cpu) { - cpu->pc = 0xBFC2873Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28750(CPUState* cpu) { - cpu->pc = 0xBFC28750u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28788(CPUState* cpu) { - cpu->pc = 0xBFC28788u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC287C0(CPUState* cpu) { - cpu->pc = 0xBFC287C0u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC287F8(CPUState* cpu) { - cpu->pc = 0xBFC287F8u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC287FC(CPUState* cpu) { - cpu->pc = 0xBFC287FCu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28808(CPUState* cpu) { - cpu->pc = 0xBFC28808u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28810(CPUState* cpu) { - cpu->pc = 0xBFC28810u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28818(CPUState* cpu) { - cpu->pc = 0xBFC28818u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28820(CPUState* cpu) { - cpu->pc = 0xBFC28820u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28834(CPUState* cpu) { - cpu->pc = 0xBFC28834u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2883C(CPUState* cpu) { - cpu->pc = 0xBFC2883Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28840(CPUState* cpu) { - cpu->pc = 0xBFC28840u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28848(CPUState* cpu) { - cpu->pc = 0xBFC28848u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2884C(CPUState* cpu) { - cpu->pc = 0xBFC2884Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC2885C(CPUState* cpu) { - cpu->pc = 0xBFC2885Cu; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC284F0_cont_BFC28860(CPUState* cpu) { - cpu->pc = 0xBFC28860u; - SCPH1001_func_1FC284F0(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC288A0(CPUState* cpu) { - cpu->pc = 0xBFC288A0u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC288D4(CPUState* cpu) { - cpu->pc = 0xBFC288D4u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28900(CPUState* cpu) { - cpu->pc = 0xBFC28900u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC2892C(CPUState* cpu) { - cpu->pc = 0xBFC2892Cu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28958(CPUState* cpu) { - cpu->pc = 0xBFC28958u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28988(CPUState* cpu) { - cpu->pc = 0xBFC28988u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC289B8(CPUState* cpu) { - cpu->pc = 0xBFC289B8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC289E8(CPUState* cpu) { - cpu->pc = 0xBFC289E8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC289F0(CPUState* cpu) { - cpu->pc = 0xBFC289F0u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC289F8(CPUState* cpu) { - cpu->pc = 0xBFC289F8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC289FC(CPUState* cpu) { - cpu->pc = 0xBFC289FCu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A34(CPUState* cpu) { - cpu->pc = 0xBFC28A34u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A38(CPUState* cpu) { - cpu->pc = 0xBFC28A38u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A44(CPUState* cpu) { - cpu->pc = 0xBFC28A44u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A4C(CPUState* cpu) { - cpu->pc = 0xBFC28A4Cu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A50(CPUState* cpu) { - cpu->pc = 0xBFC28A50u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A58(CPUState* cpu) { - cpu->pc = 0xBFC28A58u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A60(CPUState* cpu) { - cpu->pc = 0xBFC28A60u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A68(CPUState* cpu) { - cpu->pc = 0xBFC28A68u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28A6C(CPUState* cpu) { - cpu->pc = 0xBFC28A6Cu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AA4(CPUState* cpu) { - cpu->pc = 0xBFC28AA4u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AA8(CPUState* cpu) { - cpu->pc = 0xBFC28AA8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AB4(CPUState* cpu) { - cpu->pc = 0xBFC28AB4u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28ABC(CPUState* cpu) { - cpu->pc = 0xBFC28ABCu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AC0(CPUState* cpu) { - cpu->pc = 0xBFC28AC0u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AC8(CPUState* cpu) { - cpu->pc = 0xBFC28AC8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AD0(CPUState* cpu) { - cpu->pc = 0xBFC28AD0u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28AD8(CPUState* cpu) { - cpu->pc = 0xBFC28AD8u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28ADC(CPUState* cpu) { - cpu->pc = 0xBFC28ADCu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B14(CPUState* cpu) { - cpu->pc = 0xBFC28B14u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B18(CPUState* cpu) { - cpu->pc = 0xBFC28B18u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B24(CPUState* cpu) { - cpu->pc = 0xBFC28B24u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B2C(CPUState* cpu) { - cpu->pc = 0xBFC28B2Cu; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B30(CPUState* cpu) { - cpu->pc = 0xBFC28B30u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B38(CPUState* cpu) { - cpu->pc = 0xBFC28B38u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC2886C_cont_BFC28B54(CPUState* cpu) { - cpu->pc = 0xBFC28B54u; - SCPH1001_func_1FC2886C(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28BCC(CPUState* cpu) { - cpu->pc = 0xBFC28BCCu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28BD0(CPUState* cpu) { - cpu->pc = 0xBFC28BD0u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28BDC(CPUState* cpu) { - cpu->pc = 0xBFC28BDCu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28BE4(CPUState* cpu) { - cpu->pc = 0xBFC28BE4u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28BE8(CPUState* cpu) { - cpu->pc = 0xBFC28BE8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C40(CPUState* cpu) { - cpu->pc = 0xBFC28C40u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C44(CPUState* cpu) { - cpu->pc = 0xBFC28C44u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C50(CPUState* cpu) { - cpu->pc = 0xBFC28C50u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C58(CPUState* cpu) { - cpu->pc = 0xBFC28C58u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C5C(CPUState* cpu) { - cpu->pc = 0xBFC28C5Cu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28C90(CPUState* cpu) { - cpu->pc = 0xBFC28C90u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28CB8(CPUState* cpu) { - cpu->pc = 0xBFC28CB8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28CEC(CPUState* cpu) { - cpu->pc = 0xBFC28CECu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28D20(CPUState* cpu) { - cpu->pc = 0xBFC28D20u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28D54(CPUState* cpu) { - cpu->pc = 0xBFC28D54u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28D88(CPUState* cpu) { - cpu->pc = 0xBFC28D88u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28DB8(CPUState* cpu) { - cpu->pc = 0xBFC28DB8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28DE8(CPUState* cpu) { - cpu->pc = 0xBFC28DE8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28E18(CPUState* cpu) { - cpu->pc = 0xBFC28E18u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28E48(CPUState* cpu) { - cpu->pc = 0xBFC28E48u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28E74(CPUState* cpu) { - cpu->pc = 0xBFC28E74u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28E9C(CPUState* cpu) { - cpu->pc = 0xBFC28E9Cu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28ED0(CPUState* cpu) { - cpu->pc = 0xBFC28ED0u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28F04(CPUState* cpu) { - cpu->pc = 0xBFC28F04u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28F38(CPUState* cpu) { - cpu->pc = 0xBFC28F38u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28F68(CPUState* cpu) { - cpu->pc = 0xBFC28F68u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28F98(CPUState* cpu) { - cpu->pc = 0xBFC28F98u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28FC8(CPUState* cpu) { - cpu->pc = 0xBFC28FC8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC28FF4(CPUState* cpu) { - cpu->pc = 0xBFC28FF4u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC2901C(CPUState* cpu) { - cpu->pc = 0xBFC2901Cu; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29050(CPUState* cpu) { - cpu->pc = 0xBFC29050u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29084(CPUState* cpu) { - cpu->pc = 0xBFC29084u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC290B8(CPUState* cpu) { - cpu->pc = 0xBFC290B8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC290E8(CPUState* cpu) { - cpu->pc = 0xBFC290E8u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29118(CPUState* cpu) { - cpu->pc = 0xBFC29118u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29148(CPUState* cpu) { - cpu->pc = 0xBFC29148u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29174(CPUState* cpu) { - cpu->pc = 0xBFC29174u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC28B84_cont_BFC29194(CPUState* cpu) { - cpu->pc = 0xBFC29194u; - SCPH1001_func_1FC28B84(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC291E8(CPUState* cpu) { - cpu->pc = 0xBFC291E8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29210(CPUState* cpu) { - cpu->pc = 0xBFC29210u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29214(CPUState* cpu) { - cpu->pc = 0xBFC29214u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29220(CPUState* cpu) { - cpu->pc = 0xBFC29220u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29224(CPUState* cpu) { - cpu->pc = 0xBFC29224u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2924C(CPUState* cpu) { - cpu->pc = 0xBFC2924Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29254(CPUState* cpu) { - cpu->pc = 0xBFC29254u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29258(CPUState* cpu) { - cpu->pc = 0xBFC29258u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2928C(CPUState* cpu) { - cpu->pc = 0xBFC2928Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29290(CPUState* cpu) { - cpu->pc = 0xBFC29290u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2929C(CPUState* cpu) { - cpu->pc = 0xBFC2929Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292A4(CPUState* cpu) { - cpu->pc = 0xBFC292A4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292A8(CPUState* cpu) { - cpu->pc = 0xBFC292A8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292B8(CPUState* cpu) { - cpu->pc = 0xBFC292B8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292BC(CPUState* cpu) { - cpu->pc = 0xBFC292BCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292E4(CPUState* cpu) { - cpu->pc = 0xBFC292E4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC292E8(CPUState* cpu) { - cpu->pc = 0xBFC292E8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2932C(CPUState* cpu) { - cpu->pc = 0xBFC2932Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29344(CPUState* cpu) { - cpu->pc = 0xBFC29344u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29350(CPUState* cpu) { - cpu->pc = 0xBFC29350u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29368(CPUState* cpu) { - cpu->pc = 0xBFC29368u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC293E4(CPUState* cpu) { - cpu->pc = 0xBFC293E4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29458(CPUState* cpu) { - cpu->pc = 0xBFC29458u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29460(CPUState* cpu) { - cpu->pc = 0xBFC29460u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294BC(CPUState* cpu) { - cpu->pc = 0xBFC294BCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294C0(CPUState* cpu) { - cpu->pc = 0xBFC294C0u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294CC(CPUState* cpu) { - cpu->pc = 0xBFC294CCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294D4(CPUState* cpu) { - cpu->pc = 0xBFC294D4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294D8(CPUState* cpu) { - cpu->pc = 0xBFC294D8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC294E4(CPUState* cpu) { - cpu->pc = 0xBFC294E4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29558(CPUState* cpu) { - cpu->pc = 0xBFC29558u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2955C(CPUState* cpu) { - cpu->pc = 0xBFC2955Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29568(CPUState* cpu) { - cpu->pc = 0xBFC29568u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29570(CPUState* cpu) { - cpu->pc = 0xBFC29570u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29574(CPUState* cpu) { - cpu->pc = 0xBFC29574u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295AC(CPUState* cpu) { - cpu->pc = 0xBFC295ACu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295B0(CPUState* cpu) { - cpu->pc = 0xBFC295B0u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295BC(CPUState* cpu) { - cpu->pc = 0xBFC295BCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295C4(CPUState* cpu) { - cpu->pc = 0xBFC295C4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295C8(CPUState* cpu) { - cpu->pc = 0xBFC295C8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC295DC(CPUState* cpu) { - cpu->pc = 0xBFC295DCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29640(CPUState* cpu) { - cpu->pc = 0xBFC29640u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29644(CPUState* cpu) { - cpu->pc = 0xBFC29644u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29650(CPUState* cpu) { - cpu->pc = 0xBFC29650u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29658(CPUState* cpu) { - cpu->pc = 0xBFC29658u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2965C(CPUState* cpu) { - cpu->pc = 0xBFC2965Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29664(CPUState* cpu) { - cpu->pc = 0xBFC29664u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC296D8(CPUState* cpu) { - cpu->pc = 0xBFC296D8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC296DC(CPUState* cpu) { - cpu->pc = 0xBFC296DCu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC296E8(CPUState* cpu) { - cpu->pc = 0xBFC296E8u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC296F0(CPUState* cpu) { - cpu->pc = 0xBFC296F0u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC296F4(CPUState* cpu) { - cpu->pc = 0xBFC296F4u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2972C(CPUState* cpu) { - cpu->pc = 0xBFC2972Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29730(CPUState* cpu) { - cpu->pc = 0xBFC29730u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2973C(CPUState* cpu) { - cpu->pc = 0xBFC2973Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29744(CPUState* cpu) { - cpu->pc = 0xBFC29744u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29748(CPUState* cpu) { - cpu->pc = 0xBFC29748u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC2975C(CPUState* cpu) { - cpu->pc = 0xBFC2975Cu; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC291C4_cont_BFC29760(CPUState* cpu) { - cpu->pc = 0xBFC29760u; - SCPH1001_func_1FC291C4(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29788(CPUState* cpu) { - cpu->pc = 0xBFC29788u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC297A0(CPUState* cpu) { - cpu->pc = 0xBFC297A0u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC297E0(CPUState* cpu) { - cpu->pc = 0xBFC297E0u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29834(CPUState* cpu) { - cpu->pc = 0xBFC29834u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC2983C(CPUState* cpu) { - cpu->pc = 0xBFC2983Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC2984C(CPUState* cpu) { - cpu->pc = 0xBFC2984Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC2986C(CPUState* cpu) { - cpu->pc = 0xBFC2986Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29878(CPUState* cpu) { - cpu->pc = 0xBFC29878u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29880(CPUState* cpu) { - cpu->pc = 0xBFC29880u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29888(CPUState* cpu) { - cpu->pc = 0xBFC29888u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC2989C(CPUState* cpu) { - cpu->pc = 0xBFC2989Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC298D4(CPUState* cpu) { - cpu->pc = 0xBFC298D4u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC298DC(CPUState* cpu) { - cpu->pc = 0xBFC298DCu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC298EC(CPUState* cpu) { - cpu->pc = 0xBFC298ECu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29958(CPUState* cpu) { - cpu->pc = 0xBFC29958u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC2995C(CPUState* cpu) { - cpu->pc = 0xBFC2995Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29968(CPUState* cpu) { - cpu->pc = 0xBFC29968u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29970(CPUState* cpu) { - cpu->pc = 0xBFC29970u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29974(CPUState* cpu) { - cpu->pc = 0xBFC29974u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29994(CPUState* cpu) { - cpu->pc = 0xBFC29994u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29998(CPUState* cpu) { - cpu->pc = 0xBFC29998u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299A4(CPUState* cpu) { - cpu->pc = 0xBFC299A4u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299AC(CPUState* cpu) { - cpu->pc = 0xBFC299ACu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299B0(CPUState* cpu) { - cpu->pc = 0xBFC299B0u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299D8(CPUState* cpu) { - cpu->pc = 0xBFC299D8u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299DC(CPUState* cpu) { - cpu->pc = 0xBFC299DCu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299E8(CPUState* cpu) { - cpu->pc = 0xBFC299E8u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299F0(CPUState* cpu) { - cpu->pc = 0xBFC299F0u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC299F4(CPUState* cpu) { - cpu->pc = 0xBFC299F4u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A3C(CPUState* cpu) { - cpu->pc = 0xBFC29A3Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A40(CPUState* cpu) { - cpu->pc = 0xBFC29A40u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A4C(CPUState* cpu) { - cpu->pc = 0xBFC29A4Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A54(CPUState* cpu) { - cpu->pc = 0xBFC29A54u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A58(CPUState* cpu) { - cpu->pc = 0xBFC29A58u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A6C(CPUState* cpu) { - cpu->pc = 0xBFC29A6Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A88(CPUState* cpu) { - cpu->pc = 0xBFC29A88u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29A9C(CPUState* cpu) { - cpu->pc = 0xBFC29A9Cu; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29AB4(CPUState* cpu) { - cpu->pc = 0xBFC29AB4u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29770_cont_BFC29AC8(CPUState* cpu) { - cpu->pc = 0xBFC29AC8u; - SCPH1001_func_1FC29770(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B20(CPUState* cpu) { - cpu->pc = 0xBFC29B20u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B30(CPUState* cpu) { - cpu->pc = 0xBFC29B30u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B38(CPUState* cpu) { - cpu->pc = 0xBFC29B38u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B40(CPUState* cpu) { - cpu->pc = 0xBFC29B40u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B60(CPUState* cpu) { - cpu->pc = 0xBFC29B60u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29B80(CPUState* cpu) { - cpu->pc = 0xBFC29B80u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29BA0(CPUState* cpu) { - cpu->pc = 0xBFC29BA0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29BC0(CPUState* cpu) { - cpu->pc = 0xBFC29BC0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29BDC(CPUState* cpu) { - cpu->pc = 0xBFC29BDCu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C34(CPUState* cpu) { - cpu->pc = 0xBFC29C34u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C58(CPUState* cpu) { - cpu->pc = 0xBFC29C58u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C60(CPUState* cpu) { - cpu->pc = 0xBFC29C60u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C70(CPUState* cpu) { - cpu->pc = 0xBFC29C70u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C80(CPUState* cpu) { - cpu->pc = 0xBFC29C80u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C8C(CPUState* cpu) { - cpu->pc = 0xBFC29C8Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29C98(CPUState* cpu) { - cpu->pc = 0xBFC29C98u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CA4(CPUState* cpu) { - cpu->pc = 0xBFC29CA4u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CB0(CPUState* cpu) { - cpu->pc = 0xBFC29CB0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CBC(CPUState* cpu) { - cpu->pc = 0xBFC29CBCu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CD0(CPUState* cpu) { - cpu->pc = 0xBFC29CD0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CE0(CPUState* cpu) { - cpu->pc = 0xBFC29CE0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29CF4(CPUState* cpu) { - cpu->pc = 0xBFC29CF4u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D08(CPUState* cpu) { - cpu->pc = 0xBFC29D08u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D20(CPUState* cpu) { - cpu->pc = 0xBFC29D20u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D2C(CPUState* cpu) { - cpu->pc = 0xBFC29D2Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D30(CPUState* cpu) { - cpu->pc = 0xBFC29D30u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D38(CPUState* cpu) { - cpu->pc = 0xBFC29D38u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D40(CPUState* cpu) { - cpu->pc = 0xBFC29D40u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D44(CPUState* cpu) { - cpu->pc = 0xBFC29D44u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D48(CPUState* cpu) { - cpu->pc = 0xBFC29D48u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D5C(CPUState* cpu) { - cpu->pc = 0xBFC29D5Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D74(CPUState* cpu) { - cpu->pc = 0xBFC29D74u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D7C(CPUState* cpu) { - cpu->pc = 0xBFC29D7Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D84(CPUState* cpu) { - cpu->pc = 0xBFC29D84u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29D9C(CPUState* cpu) { - cpu->pc = 0xBFC29D9Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29DAC(CPUState* cpu) { - cpu->pc = 0xBFC29DACu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29DB8(CPUState* cpu) { - cpu->pc = 0xBFC29DB8u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29DDC(CPUState* cpu) { - cpu->pc = 0xBFC29DDCu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29DEC(CPUState* cpu) { - cpu->pc = 0xBFC29DECu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29E7C(CPUState* cpu) { - cpu->pc = 0xBFC29E7Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29EB4(CPUState* cpu) { - cpu->pc = 0xBFC29EB4u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29ECC(CPUState* cpu) { - cpu->pc = 0xBFC29ECCu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29EE0(CPUState* cpu) { - cpu->pc = 0xBFC29EE0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29EEC(CPUState* cpu) { - cpu->pc = 0xBFC29EECu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29EF4(CPUState* cpu) { - cpu->pc = 0xBFC29EF4u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F10(CPUState* cpu) { - cpu->pc = 0xBFC29F10u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F14(CPUState* cpu) { - cpu->pc = 0xBFC29F14u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F5C(CPUState* cpu) { - cpu->pc = 0xBFC29F5Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F6C(CPUState* cpu) { - cpu->pc = 0xBFC29F6Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F7C(CPUState* cpu) { - cpu->pc = 0xBFC29F7Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F8C(CPUState* cpu) { - cpu->pc = 0xBFC29F8Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29F9C(CPUState* cpu) { - cpu->pc = 0xBFC29F9Cu; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29FB0(CPUState* cpu) { - cpu->pc = 0xBFC29FB0u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29AE0_cont_BFC29FB8(CPUState* cpu) { - cpu->pc = 0xBFC29FB8u; - SCPH1001_func_1FC29AE0(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A024(CPUState* cpu) { - cpu->pc = 0xBFC2A024u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A05C(CPUState* cpu) { - cpu->pc = 0xBFC2A05Cu; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A068(CPUState* cpu) { - cpu->pc = 0xBFC2A068u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A158(CPUState* cpu) { - cpu->pc = 0xBFC2A158u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A2C8(CPUState* cpu) { - cpu->pc = 0xBFC2A2C8u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A2D0(CPUState* cpu) { - cpu->pc = 0xBFC2A2D0u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A2D8(CPUState* cpu) { - cpu->pc = 0xBFC2A2D8u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A2E4(CPUState* cpu) { - cpu->pc = 0xBFC2A2E4u; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC29FE8_cont_BFC2A30C(CPUState* cpu) { - cpu->pc = 0xBFC2A30Cu; - SCPH1001_func_1FC29FE8(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A344(CPUState* cpu) { - cpu->pc = 0xBFC2A344u; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A3B8(CPUState* cpu) { - cpu->pc = 0xBFC2A3B8u; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A3C0(CPUState* cpu) { - cpu->pc = 0xBFC2A3C0u; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A3C8(CPUState* cpu) { - cpu->pc = 0xBFC2A3C8u; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A3CC(CPUState* cpu) { - cpu->pc = 0xBFC2A3CCu; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A400(CPUState* cpu) { - cpu->pc = 0xBFC2A400u; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A31C_cont_BFC2A40C(CPUState* cpu) { - cpu->pc = 0xBFC2A40Cu; - SCPH1001_func_1FC2A31C(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A550(CPUState* cpu) { - cpu->pc = 0xBFC2A550u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A55C(CPUState* cpu) { - cpu->pc = 0xBFC2A55Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A56C(CPUState* cpu) { - cpu->pc = 0xBFC2A56Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A578(CPUState* cpu) { - cpu->pc = 0xBFC2A578u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A580(CPUState* cpu) { - cpu->pc = 0xBFC2A580u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A588(CPUState* cpu) { - cpu->pc = 0xBFC2A588u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A58C(CPUState* cpu) { - cpu->pc = 0xBFC2A58Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5A0(CPUState* cpu) { - cpu->pc = 0xBFC2A5A0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5A4(CPUState* cpu) { - cpu->pc = 0xBFC2A5A4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5AC(CPUState* cpu) { - cpu->pc = 0xBFC2A5ACu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5B4(CPUState* cpu) { - cpu->pc = 0xBFC2A5B4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5CC(CPUState* cpu) { - cpu->pc = 0xBFC2A5CCu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5D4(CPUState* cpu) { - cpu->pc = 0xBFC2A5D4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5E0(CPUState* cpu) { - cpu->pc = 0xBFC2A5E0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5E8(CPUState* cpu) { - cpu->pc = 0xBFC2A5E8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5EC(CPUState* cpu) { - cpu->pc = 0xBFC2A5ECu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A5F8(CPUState* cpu) { - cpu->pc = 0xBFC2A5F8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A600(CPUState* cpu) { - cpu->pc = 0xBFC2A600u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A61C(CPUState* cpu) { - cpu->pc = 0xBFC2A61Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A62C(CPUState* cpu) { - cpu->pc = 0xBFC2A62Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A638(CPUState* cpu) { - cpu->pc = 0xBFC2A638u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A654(CPUState* cpu) { - cpu->pc = 0xBFC2A654u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A660(CPUState* cpu) { - cpu->pc = 0xBFC2A660u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A668(CPUState* cpu) { - cpu->pc = 0xBFC2A668u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A670(CPUState* cpu) { - cpu->pc = 0xBFC2A670u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A68C(CPUState* cpu) { - cpu->pc = 0xBFC2A68Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A690(CPUState* cpu) { - cpu->pc = 0xBFC2A690u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6A0(CPUState* cpu) { - cpu->pc = 0xBFC2A6A0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6A8(CPUState* cpu) { - cpu->pc = 0xBFC2A6A8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6AC(CPUState* cpu) { - cpu->pc = 0xBFC2A6ACu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6C0(CPUState* cpu) { - cpu->pc = 0xBFC2A6C0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6C4(CPUState* cpu) { - cpu->pc = 0xBFC2A6C4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6CC(CPUState* cpu) { - cpu->pc = 0xBFC2A6CCu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A6D8(CPUState* cpu) { - cpu->pc = 0xBFC2A6D8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A700(CPUState* cpu) { - cpu->pc = 0xBFC2A700u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A884(CPUState* cpu) { - cpu->pc = 0xBFC2A884u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A994(CPUState* cpu) { - cpu->pc = 0xBFC2A994u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9A4(CPUState* cpu) { - cpu->pc = 0xBFC2A9A4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9B4(CPUState* cpu) { - cpu->pc = 0xBFC2A9B4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9BC(CPUState* cpu) { - cpu->pc = 0xBFC2A9BCu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9CC(CPUState* cpu) { - cpu->pc = 0xBFC2A9CCu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9D4(CPUState* cpu) { - cpu->pc = 0xBFC2A9D4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9E4(CPUState* cpu) { - cpu->pc = 0xBFC2A9E4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9E8(CPUState* cpu) { - cpu->pc = 0xBFC2A9E8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9F4(CPUState* cpu) { - cpu->pc = 0xBFC2A9F4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2A9F8(CPUState* cpu) { - cpu->pc = 0xBFC2A9F8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AA00(CPUState* cpu) { - cpu->pc = 0xBFC2AA00u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AA04(CPUState* cpu) { - cpu->pc = 0xBFC2AA04u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AA14(CPUState* cpu) { - cpu->pc = 0xBFC2AA14u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AA20(CPUState* cpu) { - cpu->pc = 0xBFC2AA20u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AAC0(CPUState* cpu) { - cpu->pc = 0xBFC2AAC0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AAC8(CPUState* cpu) { - cpu->pc = 0xBFC2AAC8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AAD0(CPUState* cpu) { - cpu->pc = 0xBFC2AAD0u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AAD8(CPUState* cpu) { - cpu->pc = 0xBFC2AAD8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AADC(CPUState* cpu) { - cpu->pc = 0xBFC2AADCu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AAE4(CPUState* cpu) { - cpu->pc = 0xBFC2AAE4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB00(CPUState* cpu) { - cpu->pc = 0xBFC2AB00u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB10(CPUState* cpu) { - cpu->pc = 0xBFC2AB10u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB18(CPUState* cpu) { - cpu->pc = 0xBFC2AB18u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB20(CPUState* cpu) { - cpu->pc = 0xBFC2AB20u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB28(CPUState* cpu) { - cpu->pc = 0xBFC2AB28u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB2C(CPUState* cpu) { - cpu->pc = 0xBFC2AB2Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB38(CPUState* cpu) { - cpu->pc = 0xBFC2AB38u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB44(CPUState* cpu) { - cpu->pc = 0xBFC2AB44u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB88(CPUState* cpu) { - cpu->pc = 0xBFC2AB88u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB90(CPUState* cpu) { - cpu->pc = 0xBFC2AB90u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2AB9C(CPUState* cpu) { - cpu->pc = 0xBFC2AB9Cu; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2ABA8(CPUState* cpu) { - cpu->pc = 0xBFC2ABA8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2ABD4(CPUState* cpu) { - cpu->pc = 0xBFC2ABD4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2ABD8(CPUState* cpu) { - cpu->pc = 0xBFC2ABD8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2ABF4(CPUState* cpu) { - cpu->pc = 0xBFC2ABF4u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2A4E0_cont_BFC2ABF8(CPUState* cpu) { - cpu->pc = 0xBFC2ABF8u; - SCPH1001_func_1FC2A4E0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ACEC(CPUState* cpu) { - cpu->pc = 0xBFC2ACECu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD08(CPUState* cpu) { - cpu->pc = 0xBFC2AD08u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD24(CPUState* cpu) { - cpu->pc = 0xBFC2AD24u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD38(CPUState* cpu) { - cpu->pc = 0xBFC2AD38u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD40(CPUState* cpu) { - cpu->pc = 0xBFC2AD40u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD48(CPUState* cpu) { - cpu->pc = 0xBFC2AD48u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD4C(CPUState* cpu) { - cpu->pc = 0xBFC2AD4Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD54(CPUState* cpu) { - cpu->pc = 0xBFC2AD54u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD5C(CPUState* cpu) { - cpu->pc = 0xBFC2AD5Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD64(CPUState* cpu) { - cpu->pc = 0xBFC2AD64u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD68(CPUState* cpu) { - cpu->pc = 0xBFC2AD68u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD70(CPUState* cpu) { - cpu->pc = 0xBFC2AD70u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD78(CPUState* cpu) { - cpu->pc = 0xBFC2AD78u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD80(CPUState* cpu) { - cpu->pc = 0xBFC2AD80u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD84(CPUState* cpu) { - cpu->pc = 0xBFC2AD84u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD8C(CPUState* cpu) { - cpu->pc = 0xBFC2AD8Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD94(CPUState* cpu) { - cpu->pc = 0xBFC2AD94u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AD9C(CPUState* cpu) { - cpu->pc = 0xBFC2AD9Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADA0(CPUState* cpu) { - cpu->pc = 0xBFC2ADA0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADA8(CPUState* cpu) { - cpu->pc = 0xBFC2ADA8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADB0(CPUState* cpu) { - cpu->pc = 0xBFC2ADB0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADB8(CPUState* cpu) { - cpu->pc = 0xBFC2ADB8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADBC(CPUState* cpu) { - cpu->pc = 0xBFC2ADBCu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADC4(CPUState* cpu) { - cpu->pc = 0xBFC2ADC4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADCC(CPUState* cpu) { - cpu->pc = 0xBFC2ADCCu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADD4(CPUState* cpu) { - cpu->pc = 0xBFC2ADD4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADD8(CPUState* cpu) { - cpu->pc = 0xBFC2ADD8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADE0(CPUState* cpu) { - cpu->pc = 0xBFC2ADE0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADEC(CPUState* cpu) { - cpu->pc = 0xBFC2ADECu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2ADF0(CPUState* cpu) { - cpu->pc = 0xBFC2ADF0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE18(CPUState* cpu) { - cpu->pc = 0xBFC2AE18u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE2C(CPUState* cpu) { - cpu->pc = 0xBFC2AE2Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE34(CPUState* cpu) { - cpu->pc = 0xBFC2AE34u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE3C(CPUState* cpu) { - cpu->pc = 0xBFC2AE3Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE40(CPUState* cpu) { - cpu->pc = 0xBFC2AE40u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE48(CPUState* cpu) { - cpu->pc = 0xBFC2AE48u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE50(CPUState* cpu) { - cpu->pc = 0xBFC2AE50u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE58(CPUState* cpu) { - cpu->pc = 0xBFC2AE58u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE5C(CPUState* cpu) { - cpu->pc = 0xBFC2AE5Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE64(CPUState* cpu) { - cpu->pc = 0xBFC2AE64u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE6C(CPUState* cpu) { - cpu->pc = 0xBFC2AE6Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE74(CPUState* cpu) { - cpu->pc = 0xBFC2AE74u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE78(CPUState* cpu) { - cpu->pc = 0xBFC2AE78u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE80(CPUState* cpu) { - cpu->pc = 0xBFC2AE80u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE8C(CPUState* cpu) { - cpu->pc = 0xBFC2AE8Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE90(CPUState* cpu) { - cpu->pc = 0xBFC2AE90u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AE98(CPUState* cpu) { - cpu->pc = 0xBFC2AE98u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEA4(CPUState* cpu) { - cpu->pc = 0xBFC2AEA4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEA8(CPUState* cpu) { - cpu->pc = 0xBFC2AEA8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AED0(CPUState* cpu) { - cpu->pc = 0xBFC2AED0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEE4(CPUState* cpu) { - cpu->pc = 0xBFC2AEE4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEEC(CPUState* cpu) { - cpu->pc = 0xBFC2AEECu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEF4(CPUState* cpu) { - cpu->pc = 0xBFC2AEF4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AEF8(CPUState* cpu) { - cpu->pc = 0xBFC2AEF8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF00(CPUState* cpu) { - cpu->pc = 0xBFC2AF00u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF08(CPUState* cpu) { - cpu->pc = 0xBFC2AF08u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF10(CPUState* cpu) { - cpu->pc = 0xBFC2AF10u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF14(CPUState* cpu) { - cpu->pc = 0xBFC2AF14u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF1C(CPUState* cpu) { - cpu->pc = 0xBFC2AF1Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF24(CPUState* cpu) { - cpu->pc = 0xBFC2AF24u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF2C(CPUState* cpu) { - cpu->pc = 0xBFC2AF2Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF30(CPUState* cpu) { - cpu->pc = 0xBFC2AF30u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF38(CPUState* cpu) { - cpu->pc = 0xBFC2AF38u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF44(CPUState* cpu) { - cpu->pc = 0xBFC2AF44u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF48(CPUState* cpu) { - cpu->pc = 0xBFC2AF48u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF50(CPUState* cpu) { - cpu->pc = 0xBFC2AF50u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF5C(CPUState* cpu) { - cpu->pc = 0xBFC2AF5Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF60(CPUState* cpu) { - cpu->pc = 0xBFC2AF60u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF88(CPUState* cpu) { - cpu->pc = 0xBFC2AF88u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AF9C(CPUState* cpu) { - cpu->pc = 0xBFC2AF9Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFA4(CPUState* cpu) { - cpu->pc = 0xBFC2AFA4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFAC(CPUState* cpu) { - cpu->pc = 0xBFC2AFACu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFB0(CPUState* cpu) { - cpu->pc = 0xBFC2AFB0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFB8(CPUState* cpu) { - cpu->pc = 0xBFC2AFB8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFC0(CPUState* cpu) { - cpu->pc = 0xBFC2AFC0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFC8(CPUState* cpu) { - cpu->pc = 0xBFC2AFC8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFCC(CPUState* cpu) { - cpu->pc = 0xBFC2AFCCu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFD4(CPUState* cpu) { - cpu->pc = 0xBFC2AFD4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFDC(CPUState* cpu) { - cpu->pc = 0xBFC2AFDCu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFE4(CPUState* cpu) { - cpu->pc = 0xBFC2AFE4u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFE8(CPUState* cpu) { - cpu->pc = 0xBFC2AFE8u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFF0(CPUState* cpu) { - cpu->pc = 0xBFC2AFF0u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2AFFC(CPUState* cpu) { - cpu->pc = 0xBFC2AFFCu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B000(CPUState* cpu) { - cpu->pc = 0xBFC2B000u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B008(CPUState* cpu) { - cpu->pc = 0xBFC2B008u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B014(CPUState* cpu) { - cpu->pc = 0xBFC2B014u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B018(CPUState* cpu) { - cpu->pc = 0xBFC2B018u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B040(CPUState* cpu) { - cpu->pc = 0xBFC2B040u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B054(CPUState* cpu) { - cpu->pc = 0xBFC2B054u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B05C(CPUState* cpu) { - cpu->pc = 0xBFC2B05Cu; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B060(CPUState* cpu) { - cpu->pc = 0xBFC2B060u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2ACD0_cont_BFC2B098(CPUState* cpu) { - cpu->pc = 0xBFC2B098u; - SCPH1001_func_1FC2ACD0(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0C0(CPUState* cpu) { - cpu->pc = 0xBFC2B0C0u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0CC(CPUState* cpu) { - cpu->pc = 0xBFC2B0CCu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0D4(CPUState* cpu) { - cpu->pc = 0xBFC2B0D4u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0D8(CPUState* cpu) { - cpu->pc = 0xBFC2B0D8u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0E0(CPUState* cpu) { - cpu->pc = 0xBFC2B0E0u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0E8(CPUState* cpu) { - cpu->pc = 0xBFC2B0E8u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0F0(CPUState* cpu) { - cpu->pc = 0xBFC2B0F0u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0F4(CPUState* cpu) { - cpu->pc = 0xBFC2B0F4u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B0FC(CPUState* cpu) { - cpu->pc = 0xBFC2B0FCu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B104(CPUState* cpu) { - cpu->pc = 0xBFC2B104u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B10C(CPUState* cpu) { - cpu->pc = 0xBFC2B10Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B110(CPUState* cpu) { - cpu->pc = 0xBFC2B110u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B118(CPUState* cpu) { - cpu->pc = 0xBFC2B118u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B120(CPUState* cpu) { - cpu->pc = 0xBFC2B120u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B12C(CPUState* cpu) { - cpu->pc = 0xBFC2B12Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B130(CPUState* cpu) { - cpu->pc = 0xBFC2B130u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B138(CPUState* cpu) { - cpu->pc = 0xBFC2B138u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B140(CPUState* cpu) { - cpu->pc = 0xBFC2B140u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B148(CPUState* cpu) { - cpu->pc = 0xBFC2B148u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B14C(CPUState* cpu) { - cpu->pc = 0xBFC2B14Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B154(CPUState* cpu) { - cpu->pc = 0xBFC2B154u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B15C(CPUState* cpu) { - cpu->pc = 0xBFC2B15Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B168(CPUState* cpu) { - cpu->pc = 0xBFC2B168u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B16C(CPUState* cpu) { - cpu->pc = 0xBFC2B16Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B174(CPUState* cpu) { - cpu->pc = 0xBFC2B174u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B17C(CPUState* cpu) { - cpu->pc = 0xBFC2B17Cu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B184(CPUState* cpu) { - cpu->pc = 0xBFC2B184u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B190(CPUState* cpu) { - cpu->pc = 0xBFC2B190u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B198(CPUState* cpu) { - cpu->pc = 0xBFC2B198u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B1A0(CPUState* cpu) { - cpu->pc = 0xBFC2B1A0u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B1C4(CPUState* cpu) { - cpu->pc = 0xBFC2B1C4u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B1C8(CPUState* cpu) { - cpu->pc = 0xBFC2B1C8u; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B0A8_cont_BFC2B1EC(CPUState* cpu) { - cpu->pc = 0xBFC2B1ECu; - SCPH1001_func_1FC2B0A8(cpu); -} - -void SCPH1001_func_1FC2B1FC_cont_BFC2B208(CPUState* cpu) { - cpu->pc = 0xBFC2B208u; - SCPH1001_func_1FC2B1FC(cpu); -} - -void SCPH1001_func_1FC2B1FC_cont_BFC2B224(CPUState* cpu) { - cpu->pc = 0xBFC2B224u; - SCPH1001_func_1FC2B1FC(cpu); -} - -void SCPH1001_func_1FC2B22C_cont_BFC2B238(CPUState* cpu) { - cpu->pc = 0xBFC2B238u; - SCPH1001_func_1FC2B22C(cpu); -} - -void SCPH1001_func_1FC2B22C_cont_BFC2B24C(CPUState* cpu) { - cpu->pc = 0xBFC2B24Cu; - SCPH1001_func_1FC2B22C(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B2D8(CPUState* cpu) { - cpu->pc = 0xBFC2B2D8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B2E4(CPUState* cpu) { - cpu->pc = 0xBFC2B2E4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B2F4(CPUState* cpu) { - cpu->pc = 0xBFC2B2F4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B304(CPUState* cpu) { - cpu->pc = 0xBFC2B304u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B30C(CPUState* cpu) { - cpu->pc = 0xBFC2B30Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B320(CPUState* cpu) { - cpu->pc = 0xBFC2B320u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B324(CPUState* cpu) { - cpu->pc = 0xBFC2B324u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B338(CPUState* cpu) { - cpu->pc = 0xBFC2B338u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B33C(CPUState* cpu) { - cpu->pc = 0xBFC2B33Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B344(CPUState* cpu) { - cpu->pc = 0xBFC2B344u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B34C(CPUState* cpu) { - cpu->pc = 0xBFC2B34Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B364(CPUState* cpu) { - cpu->pc = 0xBFC2B364u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B36C(CPUState* cpu) { - cpu->pc = 0xBFC2B36Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B378(CPUState* cpu) { - cpu->pc = 0xBFC2B378u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B380(CPUState* cpu) { - cpu->pc = 0xBFC2B380u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B384(CPUState* cpu) { - cpu->pc = 0xBFC2B384u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B394(CPUState* cpu) { - cpu->pc = 0xBFC2B394u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B3A0(CPUState* cpu) { - cpu->pc = 0xBFC2B3A0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B3CC(CPUState* cpu) { - cpu->pc = 0xBFC2B3CCu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B3DC(CPUState* cpu) { - cpu->pc = 0xBFC2B3DCu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B3E8(CPUState* cpu) { - cpu->pc = 0xBFC2B3E8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B418(CPUState* cpu) { - cpu->pc = 0xBFC2B418u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B424(CPUState* cpu) { - cpu->pc = 0xBFC2B424u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B42C(CPUState* cpu) { - cpu->pc = 0xBFC2B42Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B434(CPUState* cpu) { - cpu->pc = 0xBFC2B434u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B44C(CPUState* cpu) { - cpu->pc = 0xBFC2B44Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B458(CPUState* cpu) { - cpu->pc = 0xBFC2B458u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B460(CPUState* cpu) { - cpu->pc = 0xBFC2B460u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B4A4(CPUState* cpu) { - cpu->pc = 0xBFC2B4A4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B574(CPUState* cpu) { - cpu->pc = 0xBFC2B574u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B680(CPUState* cpu) { - cpu->pc = 0xBFC2B680u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B688(CPUState* cpu) { - cpu->pc = 0xBFC2B688u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B690(CPUState* cpu) { - cpu->pc = 0xBFC2B690u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B698(CPUState* cpu) { - cpu->pc = 0xBFC2B698u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B6D0(CPUState* cpu) { - cpu->pc = 0xBFC2B6D0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B7A4(CPUState* cpu) { - cpu->pc = 0xBFC2B7A4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8B0(CPUState* cpu) { - cpu->pc = 0xBFC2B8B0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8B8(CPUState* cpu) { - cpu->pc = 0xBFC2B8B8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8BC(CPUState* cpu) { - cpu->pc = 0xBFC2B8BCu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8D4(CPUState* cpu) { - cpu->pc = 0xBFC2B8D4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8D8(CPUState* cpu) { - cpu->pc = 0xBFC2B8D8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8E4(CPUState* cpu) { - cpu->pc = 0xBFC2B8E4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B8F4(CPUState* cpu) { - cpu->pc = 0xBFC2B8F4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B908(CPUState* cpu) { - cpu->pc = 0xBFC2B908u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B924(CPUState* cpu) { - cpu->pc = 0xBFC2B924u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B92C(CPUState* cpu) { - cpu->pc = 0xBFC2B92Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B938(CPUState* cpu) { - cpu->pc = 0xBFC2B938u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B944(CPUState* cpu) { - cpu->pc = 0xBFC2B944u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B94C(CPUState* cpu) { - cpu->pc = 0xBFC2B94Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2B970(CPUState* cpu) { - cpu->pc = 0xBFC2B970u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BB04(CPUState* cpu) { - cpu->pc = 0xBFC2BB04u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC2C(CPUState* cpu) { - cpu->pc = 0xBFC2BC2Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC48(CPUState* cpu) { - cpu->pc = 0xBFC2BC48u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC54(CPUState* cpu) { - cpu->pc = 0xBFC2BC54u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC64(CPUState* cpu) { - cpu->pc = 0xBFC2BC64u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC70(CPUState* cpu) { - cpu->pc = 0xBFC2BC70u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC88(CPUState* cpu) { - cpu->pc = 0xBFC2BC88u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC8C(CPUState* cpu) { - cpu->pc = 0xBFC2BC8Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BC94(CPUState* cpu) { - cpu->pc = 0xBFC2BC94u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCA4(CPUState* cpu) { - cpu->pc = 0xBFC2BCA4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCA8(CPUState* cpu) { - cpu->pc = 0xBFC2BCA8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCB4(CPUState* cpu) { - cpu->pc = 0xBFC2BCB4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCB8(CPUState* cpu) { - cpu->pc = 0xBFC2BCB8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCC0(CPUState* cpu) { - cpu->pc = 0xBFC2BCC0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCC4(CPUState* cpu) { - cpu->pc = 0xBFC2BCC4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCD4(CPUState* cpu) { - cpu->pc = 0xBFC2BCD4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BCEC(CPUState* cpu) { - cpu->pc = 0xBFC2BCECu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BD90(CPUState* cpu) { - cpu->pc = 0xBFC2BD90u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BD98(CPUState* cpu) { - cpu->pc = 0xBFC2BD98u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDA0(CPUState* cpu) { - cpu->pc = 0xBFC2BDA0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDA8(CPUState* cpu) { - cpu->pc = 0xBFC2BDA8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDAC(CPUState* cpu) { - cpu->pc = 0xBFC2BDACu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDB4(CPUState* cpu) { - cpu->pc = 0xBFC2BDB4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDD0(CPUState* cpu) { - cpu->pc = 0xBFC2BDD0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDE0(CPUState* cpu) { - cpu->pc = 0xBFC2BDE0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDE8(CPUState* cpu) { - cpu->pc = 0xBFC2BDE8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDF0(CPUState* cpu) { - cpu->pc = 0xBFC2BDF0u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDF8(CPUState* cpu) { - cpu->pc = 0xBFC2BDF8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BDFC(CPUState* cpu) { - cpu->pc = 0xBFC2BDFCu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE08(CPUState* cpu) { - cpu->pc = 0xBFC2BE08u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE14(CPUState* cpu) { - cpu->pc = 0xBFC2BE14u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE58(CPUState* cpu) { - cpu->pc = 0xBFC2BE58u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE60(CPUState* cpu) { - cpu->pc = 0xBFC2BE60u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE6C(CPUState* cpu) { - cpu->pc = 0xBFC2BE6Cu; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BE78(CPUState* cpu) { - cpu->pc = 0xBFC2BE78u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BEA4(CPUState* cpu) { - cpu->pc = 0xBFC2BEA4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BEA8(CPUState* cpu) { - cpu->pc = 0xBFC2BEA8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BEC4(CPUState* cpu) { - cpu->pc = 0xBFC2BEC4u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2B260_cont_BFC2BEC8(CPUState* cpu) { - cpu->pc = 0xBFC2BEC8u; - SCPH1001_func_1FC2B260(cpu); -} - -void SCPH1001_func_1FC2BF1C_cont_BFC2BF64(CPUState* cpu) { - cpu->pc = 0xBFC2BF64u; - SCPH1001_func_1FC2BF1C(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BF98(CPUState* cpu) { - cpu->pc = 0xBFC2BF98u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BFA0(CPUState* cpu) { - cpu->pc = 0xBFC2BFA0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BFAC(CPUState* cpu) { - cpu->pc = 0xBFC2BFACu; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BFC0(CPUState* cpu) { - cpu->pc = 0xBFC2BFC0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BFD0(CPUState* cpu) { - cpu->pc = 0xBFC2BFD0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2BFF8(CPUState* cpu) { - cpu->pc = 0xBFC2BFF8u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C000(CPUState* cpu) { - cpu->pc = 0xBFC2C000u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C020(CPUState* cpu) { - cpu->pc = 0xBFC2C020u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C030(CPUState* cpu) { - cpu->pc = 0xBFC2C030u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C040(CPUState* cpu) { - cpu->pc = 0xBFC2C040u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C060(CPUState* cpu) { - cpu->pc = 0xBFC2C060u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C068(CPUState* cpu) { - cpu->pc = 0xBFC2C068u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C070(CPUState* cpu) { - cpu->pc = 0xBFC2C070u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C074(CPUState* cpu) { - cpu->pc = 0xBFC2C074u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C090(CPUState* cpu) { - cpu->pc = 0xBFC2C090u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0B0(CPUState* cpu) { - cpu->pc = 0xBFC2C0B0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0B8(CPUState* cpu) { - cpu->pc = 0xBFC2C0B8u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0BC(CPUState* cpu) { - cpu->pc = 0xBFC2C0BCu; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0D4(CPUState* cpu) { - cpu->pc = 0xBFC2C0D4u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0DC(CPUState* cpu) { - cpu->pc = 0xBFC2C0DCu; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0E0(CPUState* cpu) { - cpu->pc = 0xBFC2C0E0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C0F8(CPUState* cpu) { - cpu->pc = 0xBFC2C0F8u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C108(CPUState* cpu) { - cpu->pc = 0xBFC2C108u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C158(CPUState* cpu) { - cpu->pc = 0xBFC2C158u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C16C(CPUState* cpu) { - cpu->pc = 0xBFC2C16Cu; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C1B0(CPUState* cpu) { - cpu->pc = 0xBFC2C1B0u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2BF74_cont_BFC2C1B4(CPUState* cpu) { - cpu->pc = 0xBFC2C1B4u; - SCPH1001_func_1FC2BF74(cpu); -} - -void SCPH1001_func_1FC2C1C4_cont_BFC2C1E8(CPUState* cpu) { - cpu->pc = 0xBFC2C1E8u; - SCPH1001_func_1FC2C1C4(cpu); -} - -void SCPH1001_func_1FC2C1C4_cont_BFC2C290(CPUState* cpu) { - cpu->pc = 0xBFC2C290u; - SCPH1001_func_1FC2C1C4(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C314(CPUState* cpu) { - cpu->pc = 0xBFC2C314u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C320(CPUState* cpu) { - cpu->pc = 0xBFC2C320u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C328(CPUState* cpu) { - cpu->pc = 0xBFC2C328u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C348(CPUState* cpu) { - cpu->pc = 0xBFC2C348u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C364(CPUState* cpu) { - cpu->pc = 0xBFC2C364u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C370(CPUState* cpu) { - cpu->pc = 0xBFC2C370u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C39C(CPUState* cpu) { - cpu->pc = 0xBFC2C39Cu; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C3AC(CPUState* cpu) { - cpu->pc = 0xBFC2C3ACu; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C3BC(CPUState* cpu) { - cpu->pc = 0xBFC2C3BCu; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C3C0(CPUState* cpu) { - cpu->pc = 0xBFC2C3C0u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C2F0_cont_BFC2C3D0(CPUState* cpu) { - cpu->pc = 0xBFC2C3D0u; - SCPH1001_func_1FC2C2F0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C3FC(CPUState* cpu) { - cpu->pc = 0xBFC2C3FCu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C420(CPUState* cpu) { - cpu->pc = 0xBFC2C420u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C45C(CPUState* cpu) { - cpu->pc = 0xBFC2C45Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C468(CPUState* cpu) { - cpu->pc = 0xBFC2C468u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C46C(CPUState* cpu) { - cpu->pc = 0xBFC2C46Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C470(CPUState* cpu) { - cpu->pc = 0xBFC2C470u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C47C(CPUState* cpu) { - cpu->pc = 0xBFC2C47Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C484(CPUState* cpu) { - cpu->pc = 0xBFC2C484u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C48C(CPUState* cpu) { - cpu->pc = 0xBFC2C48Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C494(CPUState* cpu) { - cpu->pc = 0xBFC2C494u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4B0(CPUState* cpu) { - cpu->pc = 0xBFC2C4B0u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4BC(CPUState* cpu) { - cpu->pc = 0xBFC2C4BCu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4C4(CPUState* cpu) { - cpu->pc = 0xBFC2C4C4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4C8(CPUState* cpu) { - cpu->pc = 0xBFC2C4C8u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4D8(CPUState* cpu) { - cpu->pc = 0xBFC2C4D8u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C4E4(CPUState* cpu) { - cpu->pc = 0xBFC2C4E4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C614(CPUState* cpu) { - cpu->pc = 0xBFC2C614u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C618(CPUState* cpu) { - cpu->pc = 0xBFC2C618u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C620(CPUState* cpu) { - cpu->pc = 0xBFC2C620u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C624(CPUState* cpu) { - cpu->pc = 0xBFC2C624u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C62C(CPUState* cpu) { - cpu->pc = 0xBFC2C62Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C630(CPUState* cpu) { - cpu->pc = 0xBFC2C630u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C638(CPUState* cpu) { - cpu->pc = 0xBFC2C638u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C69C(CPUState* cpu) { - cpu->pc = 0xBFC2C69Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6B0(CPUState* cpu) { - cpu->pc = 0xBFC2C6B0u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6B4(CPUState* cpu) { - cpu->pc = 0xBFC2C6B4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6C8(CPUState* cpu) { - cpu->pc = 0xBFC2C6C8u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6CC(CPUState* cpu) { - cpu->pc = 0xBFC2C6CCu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6D8(CPUState* cpu) { - cpu->pc = 0xBFC2C6D8u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C6E4(CPUState* cpu) { - cpu->pc = 0xBFC2C6E4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C760(CPUState* cpu) { - cpu->pc = 0xBFC2C760u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C764(CPUState* cpu) { - cpu->pc = 0xBFC2C764u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C76C(CPUState* cpu) { - cpu->pc = 0xBFC2C76Cu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C794(CPUState* cpu) { - cpu->pc = 0xBFC2C794u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C7A8(CPUState* cpu) { - cpu->pc = 0xBFC2C7A8u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C7AC(CPUState* cpu) { - cpu->pc = 0xBFC2C7ACu; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C7C0(CPUState* cpu) { - cpu->pc = 0xBFC2C7C0u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C7C4(CPUState* cpu) { - cpu->pc = 0xBFC2C7C4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C3E0_cont_BFC2C7E4(CPUState* cpu) { - cpu->pc = 0xBFC2C7E4u; - SCPH1001_func_1FC2C3E0(cpu); -} - -void SCPH1001_func_1FC2C7F4_cont_BFC2C814(CPUState* cpu) { - cpu->pc = 0xBFC2C814u; - SCPH1001_func_1FC2C7F4(cpu); -} - -void SCPH1001_func_1FC2C7F4_cont_BFC2C880(CPUState* cpu) { - cpu->pc = 0xBFC2C880u; - SCPH1001_func_1FC2C7F4(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C8B8(CPUState* cpu) { - cpu->pc = 0xBFC2C8B8u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C8E8(CPUState* cpu) { - cpu->pc = 0xBFC2C8E8u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C8EC(CPUState* cpu) { - cpu->pc = 0xBFC2C8ECu; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C8F8(CPUState* cpu) { - cpu->pc = 0xBFC2C8F8u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C8FC(CPUState* cpu) { - cpu->pc = 0xBFC2C8FCu; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C908(CPUState* cpu) { - cpu->pc = 0xBFC2C908u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C90C(CPUState* cpu) { - cpu->pc = 0xBFC2C90Cu; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C920(CPUState* cpu) { - cpu->pc = 0xBFC2C920u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C924(CPUState* cpu) { - cpu->pc = 0xBFC2C924u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C8A8_cont_BFC2C980(CPUState* cpu) { - cpu->pc = 0xBFC2C980u; - SCPH1001_func_1FC2C8A8(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2C998(CPUState* cpu) { - cpu->pc = 0xBFC2C998u; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2C9B8(CPUState* cpu) { - cpu->pc = 0xBFC2C9B8u; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2C9BC(CPUState* cpu) { - cpu->pc = 0xBFC2C9BCu; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2C9D0(CPUState* cpu) { - cpu->pc = 0xBFC2C9D0u; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2C9D4(CPUState* cpu) { - cpu->pc = 0xBFC2C9D4u; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2C988_cont_BFC2CA48(CPUState* cpu) { - cpu->pc = 0xBFC2CA48u; - SCPH1001_func_1FC2C988(cpu); -} - -void SCPH1001_func_1FC2CA58_cont_BFC2CA78(CPUState* cpu) { - cpu->pc = 0xBFC2CA78u; - SCPH1001_func_1FC2CA58(cpu); -} - -void SCPH1001_func_1FC2CA58_cont_BFC2CA88(CPUState* cpu) { - cpu->pc = 0xBFC2CA88u; - SCPH1001_func_1FC2CA58(cpu); -} - -void SCPH1001_func_1FC2CA9C_cont_BFC2CAB8(CPUState* cpu) { - cpu->pc = 0xBFC2CAB8u; - SCPH1001_func_1FC2CA9C(cpu); -} - -void SCPH1001_func_1FC2CA9C_cont_BFC2CAC0(CPUState* cpu) { - cpu->pc = 0xBFC2CAC0u; - SCPH1001_func_1FC2CA9C(cpu); -} - -void SCPH1001_func_1FC2CA9C_cont_BFC2CAC8(CPUState* cpu) { - cpu->pc = 0xBFC2CAC8u; - SCPH1001_func_1FC2CA9C(cpu); -} - -void SCPH1001_func_1FC2CA9C_cont_BFC2CAD0(CPUState* cpu) { - cpu->pc = 0xBFC2CAD0u; - SCPH1001_func_1FC2CA9C(cpu); -} - -void SCPH1001_func_1FC2CA9C_cont_BFC2CAD4(CPUState* cpu) { - cpu->pc = 0xBFC2CAD4u; - SCPH1001_func_1FC2CA9C(cpu); -} - -void SCPH1001_func_1FC2CAE0_cont_BFC2CAFC(CPUState* cpu) { - cpu->pc = 0xBFC2CAFCu; - SCPH1001_func_1FC2CAE0(cpu); -} - -void SCPH1001_func_1FC2CAE0_cont_BFC2CB04(CPUState* cpu) { - cpu->pc = 0xBFC2CB04u; - SCPH1001_func_1FC2CAE0(cpu); -} - -void SCPH1001_func_1FC2CAE0_cont_BFC2CB0C(CPUState* cpu) { - cpu->pc = 0xBFC2CB0Cu; - SCPH1001_func_1FC2CAE0(cpu); -} - -void SCPH1001_func_1FC2CAE0_cont_BFC2CB14(CPUState* cpu) { - cpu->pc = 0xBFC2CB14u; - SCPH1001_func_1FC2CAE0(cpu); -} - -void SCPH1001_func_1FC2CAE0_cont_BFC2CB18(CPUState* cpu) { - cpu->pc = 0xBFC2CB18u; - SCPH1001_func_1FC2CAE0(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB40(CPUState* cpu) { - cpu->pc = 0xBFC2CB40u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB48(CPUState* cpu) { - cpu->pc = 0xBFC2CB48u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB50(CPUState* cpu) { - cpu->pc = 0xBFC2CB50u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB60(CPUState* cpu) { - cpu->pc = 0xBFC2CB60u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB70(CPUState* cpu) { - cpu->pc = 0xBFC2CB70u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB24_cont_BFC2CB74(CPUState* cpu) { - cpu->pc = 0xBFC2CB74u; - SCPH1001_func_1FC2CB24(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CB9C(CPUState* cpu) { - cpu->pc = 0xBFC2CB9Cu; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CBB4(CPUState* cpu) { - cpu->pc = 0xBFC2CBB4u; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CBBC(CPUState* cpu) { - cpu->pc = 0xBFC2CBBCu; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CBDC(CPUState* cpu) { - cpu->pc = 0xBFC2CBDCu; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CBFC(CPUState* cpu) { - cpu->pc = 0xBFC2CBFCu; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CB80_cont_BFC2CC00(CPUState* cpu) { - cpu->pc = 0xBFC2CC00u; - SCPH1001_func_1FC2CB80(cpu); -} - -void SCPH1001_func_1FC2CC10_cont_BFC2CC40(CPUState* cpu) { - cpu->pc = 0xBFC2CC40u; - SCPH1001_func_1FC2CC10(cpu); -} - -void SCPH1001_func_1FC2CC10_cont_BFC2CC4C(CPUState* cpu) { - cpu->pc = 0xBFC2CC4Cu; - SCPH1001_func_1FC2CC10(cpu); -} - -void SCPH1001_func_1FC2CC10_cont_BFC2CC5C(CPUState* cpu) { - cpu->pc = 0xBFC2CC5Cu; - SCPH1001_func_1FC2CC10(cpu); -} - -void SCPH1001_func_1FC2CC10_cont_BFC2CC70(CPUState* cpu) { - cpu->pc = 0xBFC2CC70u; - SCPH1001_func_1FC2CC10(cpu); -} - -void SCPH1001_func_1FC2CC10_cont_BFC2CC88(CPUState* cpu) { - cpu->pc = 0xBFC2CC88u; - SCPH1001_func_1FC2CC10(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CCDC(CPUState* cpu) { - cpu->pc = 0xBFC2CCDCu; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CCE8(CPUState* cpu) { - cpu->pc = 0xBFC2CCE8u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CCF0(CPUState* cpu) { - cpu->pc = 0xBFC2CCF0u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CD28(CPUState* cpu) { - cpu->pc = 0xBFC2CD28u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CD4C(CPUState* cpu) { - cpu->pc = 0xBFC2CD4Cu; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CD88(CPUState* cpu) { - cpu->pc = 0xBFC2CD88u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CDA0(CPUState* cpu) { - cpu->pc = 0xBFC2CDA0u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CDAC(CPUState* cpu) { - cpu->pc = 0xBFC2CDACu; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CDE0(CPUState* cpu) { - cpu->pc = 0xBFC2CDE0u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CCC4_cont_BFC2CDF8(CPUState* cpu) { - cpu->pc = 0xBFC2CDF8u; - SCPH1001_func_1FC2CCC4(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CE28(CPUState* cpu) { - cpu->pc = 0xBFC2CE28u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CE30(CPUState* cpu) { - cpu->pc = 0xBFC2CE30u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CE38(CPUState* cpu) { - cpu->pc = 0xBFC2CE38u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CE70(CPUState* cpu) { - cpu->pc = 0xBFC2CE70u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CE94(CPUState* cpu) { - cpu->pc = 0xBFC2CE94u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CED4(CPUState* cpu) { - cpu->pc = 0xBFC2CED4u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CEEC(CPUState* cpu) { - cpu->pc = 0xBFC2CEECu; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CEF8(CPUState* cpu) { - cpu->pc = 0xBFC2CEF8u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CF2C(CPUState* cpu) { - cpu->pc = 0xBFC2CF2Cu; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CE08_cont_BFC2CF44(CPUState* cpu) { - cpu->pc = 0xBFC2CF44u; - SCPH1001_func_1FC2CE08(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CF6C(CPUState* cpu) { - cpu->pc = 0xBFC2CF6Cu; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CF74(CPUState* cpu) { - cpu->pc = 0xBFC2CF74u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CF7C(CPUState* cpu) { - cpu->pc = 0xBFC2CF7Cu; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CFB0(CPUState* cpu) { - cpu->pc = 0xBFC2CFB0u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CFD4(CPUState* cpu) { - cpu->pc = 0xBFC2CFD4u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2CFE0(CPUState* cpu) { - cpu->pc = 0xBFC2CFE0u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2D004(CPUState* cpu) { - cpu->pc = 0xBFC2D004u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2D06C(CPUState* cpu) { - cpu->pc = 0xBFC2D06Cu; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2CF54_cont_BFC2D094(CPUState* cpu) { - cpu->pc = 0xBFC2D094u; - SCPH1001_func_1FC2CF54(cpu); -} - -void SCPH1001_func_1FC2D0A4_cont_BFC2D0B8(CPUState* cpu) { - cpu->pc = 0xBFC2D0B8u; - SCPH1001_func_1FC2D0A4(cpu); -} - -void SCPH1001_func_1FC2D0A4_cont_BFC2D0C8(CPUState* cpu) { - cpu->pc = 0xBFC2D0C8u; - SCPH1001_func_1FC2D0A4(cpu); -} - -void SCPH1001_func_1FC2D0A4_cont_BFC2D0CC(CPUState* cpu) { - cpu->pc = 0xBFC2D0CCu; - SCPH1001_func_1FC2D0A4(cpu); -} - -void SCPH1001_func_1FC2D0A4_cont_BFC2D0D8(CPUState* cpu) { - cpu->pc = 0xBFC2D0D8u; - SCPH1001_func_1FC2D0A4(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D134(CPUState* cpu) { - cpu->pc = 0xBFC2D134u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D144(CPUState* cpu) { - cpu->pc = 0xBFC2D144u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D154(CPUState* cpu) { - cpu->pc = 0xBFC2D154u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D1A4(CPUState* cpu) { - cpu->pc = 0xBFC2D1A4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D1B8(CPUState* cpu) { - cpu->pc = 0xBFC2D1B8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D1CC(CPUState* cpu) { - cpu->pc = 0xBFC2D1CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D1E0(CPUState* cpu) { - cpu->pc = 0xBFC2D1E0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D1EC(CPUState* cpu) { - cpu->pc = 0xBFC2D1ECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D214(CPUState* cpu) { - cpu->pc = 0xBFC2D214u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D218(CPUState* cpu) { - cpu->pc = 0xBFC2D218u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D224(CPUState* cpu) { - cpu->pc = 0xBFC2D224u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D22C(CPUState* cpu) { - cpu->pc = 0xBFC2D22Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D230(CPUState* cpu) { - cpu->pc = 0xBFC2D230u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D240(CPUState* cpu) { - cpu->pc = 0xBFC2D240u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D2B0(CPUState* cpu) { - cpu->pc = 0xBFC2D2B0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D2BC(CPUState* cpu) { - cpu->pc = 0xBFC2D2BCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D2D4(CPUState* cpu) { - cpu->pc = 0xBFC2D2D4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D2F8(CPUState* cpu) { - cpu->pc = 0xBFC2D2F8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D308(CPUState* cpu) { - cpu->pc = 0xBFC2D308u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D310(CPUState* cpu) { - cpu->pc = 0xBFC2D310u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D31C(CPUState* cpu) { - cpu->pc = 0xBFC2D31Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D370(CPUState* cpu) { - cpu->pc = 0xBFC2D370u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D384(CPUState* cpu) { - cpu->pc = 0xBFC2D384u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D38C(CPUState* cpu) { - cpu->pc = 0xBFC2D38Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D3D8(CPUState* cpu) { - cpu->pc = 0xBFC2D3D8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D400(CPUState* cpu) { - cpu->pc = 0xBFC2D400u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D414(CPUState* cpu) { - cpu->pc = 0xBFC2D414u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D41C(CPUState* cpu) { - cpu->pc = 0xBFC2D41Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D450(CPUState* cpu) { - cpu->pc = 0xBFC2D450u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D458(CPUState* cpu) { - cpu->pc = 0xBFC2D458u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D45C(CPUState* cpu) { - cpu->pc = 0xBFC2D45Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D464(CPUState* cpu) { - cpu->pc = 0xBFC2D464u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D46C(CPUState* cpu) { - cpu->pc = 0xBFC2D46Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D470(CPUState* cpu) { - cpu->pc = 0xBFC2D470u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D488(CPUState* cpu) { - cpu->pc = 0xBFC2D488u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D494(CPUState* cpu) { - cpu->pc = 0xBFC2D494u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D4CC(CPUState* cpu) { - cpu->pc = 0xBFC2D4CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D4E0(CPUState* cpu) { - cpu->pc = 0xBFC2D4E0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D530(CPUState* cpu) { - cpu->pc = 0xBFC2D530u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D534(CPUState* cpu) { - cpu->pc = 0xBFC2D534u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D540(CPUState* cpu) { - cpu->pc = 0xBFC2D540u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D548(CPUState* cpu) { - cpu->pc = 0xBFC2D548u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D54C(CPUState* cpu) { - cpu->pc = 0xBFC2D54Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D55C(CPUState* cpu) { - cpu->pc = 0xBFC2D55Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D5CC(CPUState* cpu) { - cpu->pc = 0xBFC2D5CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D5D8(CPUState* cpu) { - cpu->pc = 0xBFC2D5D8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D5F0(CPUState* cpu) { - cpu->pc = 0xBFC2D5F0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D614(CPUState* cpu) { - cpu->pc = 0xBFC2D614u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D624(CPUState* cpu) { - cpu->pc = 0xBFC2D624u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D644(CPUState* cpu) { - cpu->pc = 0xBFC2D644u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D648(CPUState* cpu) { - cpu->pc = 0xBFC2D648u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D658(CPUState* cpu) { - cpu->pc = 0xBFC2D658u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D66C(CPUState* cpu) { - cpu->pc = 0xBFC2D66Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D674(CPUState* cpu) { - cpu->pc = 0xBFC2D674u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D684(CPUState* cpu) { - cpu->pc = 0xBFC2D684u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D68C(CPUState* cpu) { - cpu->pc = 0xBFC2D68Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6AC(CPUState* cpu) { - cpu->pc = 0xBFC2D6ACu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6B0(CPUState* cpu) { - cpu->pc = 0xBFC2D6B0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6BC(CPUState* cpu) { - cpu->pc = 0xBFC2D6BCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6C4(CPUState* cpu) { - cpu->pc = 0xBFC2D6C4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6C8(CPUState* cpu) { - cpu->pc = 0xBFC2D6C8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6D0(CPUState* cpu) { - cpu->pc = 0xBFC2D6D0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D6E4(CPUState* cpu) { - cpu->pc = 0xBFC2D6E4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D734(CPUState* cpu) { - cpu->pc = 0xBFC2D734u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D748(CPUState* cpu) { - cpu->pc = 0xBFC2D748u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D758(CPUState* cpu) { - cpu->pc = 0xBFC2D758u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D764(CPUState* cpu) { - cpu->pc = 0xBFC2D764u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D76C(CPUState* cpu) { - cpu->pc = 0xBFC2D76Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D77C(CPUState* cpu) { - cpu->pc = 0xBFC2D77Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D784(CPUState* cpu) { - cpu->pc = 0xBFC2D784u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D78C(CPUState* cpu) { - cpu->pc = 0xBFC2D78Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7A4(CPUState* cpu) { - cpu->pc = 0xBFC2D7A4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7A8(CPUState* cpu) { - cpu->pc = 0xBFC2D7A8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7B0(CPUState* cpu) { - cpu->pc = 0xBFC2D7B0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7B8(CPUState* cpu) { - cpu->pc = 0xBFC2D7B8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7C0(CPUState* cpu) { - cpu->pc = 0xBFC2D7C0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D7CC(CPUState* cpu) { - cpu->pc = 0xBFC2D7CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D870(CPUState* cpu) { - cpu->pc = 0xBFC2D870u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D878(CPUState* cpu) { - cpu->pc = 0xBFC2D878u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D87C(CPUState* cpu) { - cpu->pc = 0xBFC2D87Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D894(CPUState* cpu) { - cpu->pc = 0xBFC2D894u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D89C(CPUState* cpu) { - cpu->pc = 0xBFC2D89Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8A0(CPUState* cpu) { - cpu->pc = 0xBFC2D8A0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8B8(CPUState* cpu) { - cpu->pc = 0xBFC2D8B8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8BC(CPUState* cpu) { - cpu->pc = 0xBFC2D8BCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8CC(CPUState* cpu) { - cpu->pc = 0xBFC2D8CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8D4(CPUState* cpu) { - cpu->pc = 0xBFC2D8D4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8D8(CPUState* cpu) { - cpu->pc = 0xBFC2D8D8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8F0(CPUState* cpu) { - cpu->pc = 0xBFC2D8F0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D8F8(CPUState* cpu) { - cpu->pc = 0xBFC2D8F8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D90C(CPUState* cpu) { - cpu->pc = 0xBFC2D90Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D910(CPUState* cpu) { - cpu->pc = 0xBFC2D910u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D964(CPUState* cpu) { - cpu->pc = 0xBFC2D964u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D990(CPUState* cpu) { - cpu->pc = 0xBFC2D990u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D998(CPUState* cpu) { - cpu->pc = 0xBFC2D998u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D99C(CPUState* cpu) { - cpu->pc = 0xBFC2D99Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D9CC(CPUState* cpu) { - cpu->pc = 0xBFC2D9CCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D9EC(CPUState* cpu) { - cpu->pc = 0xBFC2D9ECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2D9F0(CPUState* cpu) { - cpu->pc = 0xBFC2D9F0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA00(CPUState* cpu) { - cpu->pc = 0xBFC2DA00u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA18(CPUState* cpu) { - cpu->pc = 0xBFC2DA18u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA2C(CPUState* cpu) { - cpu->pc = 0xBFC2DA2Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA34(CPUState* cpu) { - cpu->pc = 0xBFC2DA34u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA38(CPUState* cpu) { - cpu->pc = 0xBFC2DA38u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA54(CPUState* cpu) { - cpu->pc = 0xBFC2DA54u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA5C(CPUState* cpu) { - cpu->pc = 0xBFC2DA5Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA6C(CPUState* cpu) { - cpu->pc = 0xBFC2DA6Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA70(CPUState* cpu) { - cpu->pc = 0xBFC2DA70u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DA78(CPUState* cpu) { - cpu->pc = 0xBFC2DA78u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DABC(CPUState* cpu) { - cpu->pc = 0xBFC2DABCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DAC8(CPUState* cpu) { - cpu->pc = 0xBFC2DAC8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DADC(CPUState* cpu) { - cpu->pc = 0xBFC2DADCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DAE4(CPUState* cpu) { - cpu->pc = 0xBFC2DAE4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DAEC(CPUState* cpu) { - cpu->pc = 0xBFC2DAECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB00(CPUState* cpu) { - cpu->pc = 0xBFC2DB00u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB14(CPUState* cpu) { - cpu->pc = 0xBFC2DB14u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB18(CPUState* cpu) { - cpu->pc = 0xBFC2DB18u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB24(CPUState* cpu) { - cpu->pc = 0xBFC2DB24u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB2C(CPUState* cpu) { - cpu->pc = 0xBFC2DB2Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB44(CPUState* cpu) { - cpu->pc = 0xBFC2DB44u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB50(CPUState* cpu) { - cpu->pc = 0xBFC2DB50u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB60(CPUState* cpu) { - cpu->pc = 0xBFC2DB60u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB6C(CPUState* cpu) { - cpu->pc = 0xBFC2DB6Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB74(CPUState* cpu) { - cpu->pc = 0xBFC2DB74u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB94(CPUState* cpu) { - cpu->pc = 0xBFC2DB94u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DB98(CPUState* cpu) { - cpu->pc = 0xBFC2DB98u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DBA0(CPUState* cpu) { - cpu->pc = 0xBFC2DBA0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DBB4(CPUState* cpu) { - cpu->pc = 0xBFC2DBB4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DBF4(CPUState* cpu) { - cpu->pc = 0xBFC2DBF4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC08(CPUState* cpu) { - cpu->pc = 0xBFC2DC08u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC20(CPUState* cpu) { - cpu->pc = 0xBFC2DC20u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC34(CPUState* cpu) { - cpu->pc = 0xBFC2DC34u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC38(CPUState* cpu) { - cpu->pc = 0xBFC2DC38u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC60(CPUState* cpu) { - cpu->pc = 0xBFC2DC60u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DC90(CPUState* cpu) { - cpu->pc = 0xBFC2DC90u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DCA8(CPUState* cpu) { - cpu->pc = 0xBFC2DCA8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DCC0(CPUState* cpu) { - cpu->pc = 0xBFC2DCC0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DCC8(CPUState* cpu) { - cpu->pc = 0xBFC2DCC8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DCE0(CPUState* cpu) { - cpu->pc = 0xBFC2DCE0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DCF0(CPUState* cpu) { - cpu->pc = 0xBFC2DCF0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DD08(CPUState* cpu) { - cpu->pc = 0xBFC2DD08u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DD20(CPUState* cpu) { - cpu->pc = 0xBFC2DD20u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DD28(CPUState* cpu) { - cpu->pc = 0xBFC2DD28u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DD40(CPUState* cpu) { - cpu->pc = 0xBFC2DD40u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DD6C(CPUState* cpu) { - cpu->pc = 0xBFC2DD6Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DDD4(CPUState* cpu) { - cpu->pc = 0xBFC2DDD4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DDE0(CPUState* cpu) { - cpu->pc = 0xBFC2DDE0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DDEC(CPUState* cpu) { - cpu->pc = 0xBFC2DDECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DE0C(CPUState* cpu) { - cpu->pc = 0xBFC2DE0Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DE30(CPUState* cpu) { - cpu->pc = 0xBFC2DE30u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DE40(CPUState* cpu) { - cpu->pc = 0xBFC2DE40u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DE6C(CPUState* cpu) { - cpu->pc = 0xBFC2DE6Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DEA8(CPUState* cpu) { - cpu->pc = 0xBFC2DEA8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DEBC(CPUState* cpu) { - cpu->pc = 0xBFC2DEBCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DED0(CPUState* cpu) { - cpu->pc = 0xBFC2DED0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DEE0(CPUState* cpu) { - cpu->pc = 0xBFC2DEE0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DEE8(CPUState* cpu) { - cpu->pc = 0xBFC2DEE8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DEF4(CPUState* cpu) { - cpu->pc = 0xBFC2DEF4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF38(CPUState* cpu) { - cpu->pc = 0xBFC2DF38u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF48(CPUState* cpu) { - cpu->pc = 0xBFC2DF48u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF60(CPUState* cpu) { - cpu->pc = 0xBFC2DF60u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF78(CPUState* cpu) { - cpu->pc = 0xBFC2DF78u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF80(CPUState* cpu) { - cpu->pc = 0xBFC2DF80u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DF98(CPUState* cpu) { - cpu->pc = 0xBFC2DF98u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DFA8(CPUState* cpu) { - cpu->pc = 0xBFC2DFA8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DFC0(CPUState* cpu) { - cpu->pc = 0xBFC2DFC0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DFD8(CPUState* cpu) { - cpu->pc = 0xBFC2DFD8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DFE0(CPUState* cpu) { - cpu->pc = 0xBFC2DFE0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2DFF8(CPUState* cpu) { - cpu->pc = 0xBFC2DFF8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E02C(CPUState* cpu) { - cpu->pc = 0xBFC2E02Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E038(CPUState* cpu) { - cpu->pc = 0xBFC2E038u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E060(CPUState* cpu) { - cpu->pc = 0xBFC2E060u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E084(CPUState* cpu) { - cpu->pc = 0xBFC2E084u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E094(CPUState* cpu) { - cpu->pc = 0xBFC2E094u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E0C0(CPUState* cpu) { - cpu->pc = 0xBFC2E0C0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E0FC(CPUState* cpu) { - cpu->pc = 0xBFC2E0FCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E110(CPUState* cpu) { - cpu->pc = 0xBFC2E110u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E118(CPUState* cpu) { - cpu->pc = 0xBFC2E118u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E134(CPUState* cpu) { - cpu->pc = 0xBFC2E134u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E15C(CPUState* cpu) { - cpu->pc = 0xBFC2E15Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E19C(CPUState* cpu) { - cpu->pc = 0xBFC2E19Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E1A8(CPUState* cpu) { - cpu->pc = 0xBFC2E1A8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E1B0(CPUState* cpu) { - cpu->pc = 0xBFC2E1B0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E1B8(CPUState* cpu) { - cpu->pc = 0xBFC2E1B8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E204(CPUState* cpu) { - cpu->pc = 0xBFC2E204u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E208(CPUState* cpu) { - cpu->pc = 0xBFC2E208u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E218(CPUState* cpu) { - cpu->pc = 0xBFC2E218u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E224(CPUState* cpu) { - cpu->pc = 0xBFC2E224u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E238(CPUState* cpu) { - cpu->pc = 0xBFC2E238u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E240(CPUState* cpu) { - cpu->pc = 0xBFC2E240u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E254(CPUState* cpu) { - cpu->pc = 0xBFC2E254u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2A4(CPUState* cpu) { - cpu->pc = 0xBFC2E2A4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2B0(CPUState* cpu) { - cpu->pc = 0xBFC2E2B0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2C8(CPUState* cpu) { - cpu->pc = 0xBFC2E2C8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2D0(CPUState* cpu) { - cpu->pc = 0xBFC2E2D0u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2D4(CPUState* cpu) { - cpu->pc = 0xBFC2E2D4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2E8(CPUState* cpu) { - cpu->pc = 0xBFC2E2E8u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2EC(CPUState* cpu) { - cpu->pc = 0xBFC2E2ECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E2FC(CPUState* cpu) { - cpu->pc = 0xBFC2E2FCu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E30C(CPUState* cpu) { - cpu->pc = 0xBFC2E30Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E32C(CPUState* cpu) { - cpu->pc = 0xBFC2E32Cu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E370(CPUState* cpu) { - cpu->pc = 0xBFC2E370u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E380(CPUState* cpu) { - cpu->pc = 0xBFC2E380u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E390(CPUState* cpu) { - cpu->pc = 0xBFC2E390u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E3A4(CPUState* cpu) { - cpu->pc = 0xBFC2E3A4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E3B4(CPUState* cpu) { - cpu->pc = 0xBFC2E3B4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E3C4(CPUState* cpu) { - cpu->pc = 0xBFC2E3C4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E3EC(CPUState* cpu) { - cpu->pc = 0xBFC2E3ECu; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E3F4(CPUState* cpu) { - cpu->pc = 0xBFC2E3F4u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E410(CPUState* cpu) { - cpu->pc = 0xBFC2E410u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2D0E0_cont_BFC2E420(CPUState* cpu) { - cpu->pc = 0xBFC2E420u; - SCPH1001_func_1FC2D0E0(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E458(CPUState* cpu) { - cpu->pc = 0xBFC2E458u; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E460(CPUState* cpu) { - cpu->pc = 0xBFC2E460u; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E468(CPUState* cpu) { - cpu->pc = 0xBFC2E468u; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E474(CPUState* cpu) { - cpu->pc = 0xBFC2E474u; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E47C(CPUState* cpu) { - cpu->pc = 0xBFC2E47Cu; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E44C_cont_BFC2E4C0(CPUState* cpu) { - cpu->pc = 0xBFC2E4C0u; - SCPH1001_func_1FC2E44C(cpu); -} - -void SCPH1001_func_1FC2E574_cont_BFC2E588(CPUState* cpu) { - cpu->pc = 0xBFC2E588u; - SCPH1001_func_1FC2E574(cpu); -} - -void SCPH1001_func_1FC2E574_cont_BFC2E590(CPUState* cpu) { - cpu->pc = 0xBFC2E590u; - SCPH1001_func_1FC2E574(cpu); -} - -void SCPH1001_func_1FC2E5C0_cont_BFC2E5D0(CPUState* cpu) { - cpu->pc = 0xBFC2E5D0u; - SCPH1001_func_1FC2E5C0(cpu); -} - -void SCPH1001_func_1FC2E5C0_cont_BFC2E5E0(CPUState* cpu) { - cpu->pc = 0xBFC2E5E0u; - SCPH1001_func_1FC2E5C0(cpu); -} - -void SCPH1001_func_1FC2E5C0_cont_BFC2E5E8(CPUState* cpu) { - cpu->pc = 0xBFC2E5E8u; - SCPH1001_func_1FC2E5C0(cpu); -} - -void SCPH1001_func_1FC2E5C0_cont_BFC2E5F4(CPUState* cpu) { - cpu->pc = 0xBFC2E5F4u; - SCPH1001_func_1FC2E5C0(cpu); -} - -void SCPH1001_func_1FC2E600_cont_BFC2E610(CPUState* cpu) { - cpu->pc = 0xBFC2E610u; - SCPH1001_func_1FC2E600(cpu); -} - -void SCPH1001_func_1FC2E65C_cont_BFC2E66C(CPUState* cpu) { - cpu->pc = 0xBFC2E66Cu; - SCPH1001_func_1FC2E65C(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E704(CPUState* cpu) { - cpu->pc = 0xBFC2E704u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E714(CPUState* cpu) { - cpu->pc = 0xBFC2E714u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E744(CPUState* cpu) { - cpu->pc = 0xBFC2E744u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E74C(CPUState* cpu) { - cpu->pc = 0xBFC2E74Cu; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E750(CPUState* cpu) { - cpu->pc = 0xBFC2E750u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E760(CPUState* cpu) { - cpu->pc = 0xBFC2E760u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E770(CPUState* cpu) { - cpu->pc = 0xBFC2E770u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E7A0(CPUState* cpu) { - cpu->pc = 0xBFC2E7A0u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E7B4(CPUState* cpu) { - cpu->pc = 0xBFC2E7B4u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E7C4(CPUState* cpu) { - cpu->pc = 0xBFC2E7C4u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E7F4(CPUState* cpu) { - cpu->pc = 0xBFC2E7F4u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E800(CPUState* cpu) { - cpu->pc = 0xBFC2E800u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E814(CPUState* cpu) { - cpu->pc = 0xBFC2E814u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E824(CPUState* cpu) { - cpu->pc = 0xBFC2E824u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E854(CPUState* cpu) { - cpu->pc = 0xBFC2E854u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E860(CPUState* cpu) { - cpu->pc = 0xBFC2E860u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E874(CPUState* cpu) { - cpu->pc = 0xBFC2E874u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E884(CPUState* cpu) { - cpu->pc = 0xBFC2E884u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E8B4(CPUState* cpu) { - cpu->pc = 0xBFC2E8B4u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E8BC(CPUState* cpu) { - cpu->pc = 0xBFC2E8BCu; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E6B8_cont_BFC2E8C0(CPUState* cpu) { - cpu->pc = 0xBFC2E8C0u; - SCPH1001_func_1FC2E6B8(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E8F4(CPUState* cpu) { - cpu->pc = 0xBFC2E8F4u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E900(CPUState* cpu) { - cpu->pc = 0xBFC2E900u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E938(CPUState* cpu) { - cpu->pc = 0xBFC2E938u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E968(CPUState* cpu) { - cpu->pc = 0xBFC2E968u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E978(CPUState* cpu) { - cpu->pc = 0xBFC2E978u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E97C(CPUState* cpu) { - cpu->pc = 0xBFC2E97Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E98C(CPUState* cpu) { - cpu->pc = 0xBFC2E98Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E9BC(CPUState* cpu) { - cpu->pc = 0xBFC2E9BCu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E9C8(CPUState* cpu) { - cpu->pc = 0xBFC2E9C8u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E9DC(CPUState* cpu) { - cpu->pc = 0xBFC2E9DCu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2E9EC(CPUState* cpu) { - cpu->pc = 0xBFC2E9ECu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA1C(CPUState* cpu) { - cpu->pc = 0xBFC2EA1Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA28(CPUState* cpu) { - cpu->pc = 0xBFC2EA28u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA3C(CPUState* cpu) { - cpu->pc = 0xBFC2EA3Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA4C(CPUState* cpu) { - cpu->pc = 0xBFC2EA4Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA7C(CPUState* cpu) { - cpu->pc = 0xBFC2EA7Cu; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA84(CPUState* cpu) { - cpu->pc = 0xBFC2EA84u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2E8CC_cont_BFC2EA88(CPUState* cpu) { - cpu->pc = 0xBFC2EA88u; - SCPH1001_func_1FC2E8CC(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EAD8(CPUState* cpu) { - cpu->pc = 0xBFC2EAD8u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EB34(CPUState* cpu) { - cpu->pc = 0xBFC2EB34u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EB58(CPUState* cpu) { - cpu->pc = 0xBFC2EB58u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EB88(CPUState* cpu) { - cpu->pc = 0xBFC2EB88u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EBC0(CPUState* cpu) { - cpu->pc = 0xBFC2EBC0u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EBE4(CPUState* cpu) { - cpu->pc = 0xBFC2EBE4u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EA94_cont_BFC2EC68(CPUState* cpu) { - cpu->pc = 0xBFC2EC68u; - SCPH1001_func_1FC2EA94(cpu); -} - -void SCPH1001_func_1FC2EC90_cont_BFC2ECA4(CPUState* cpu) { - cpu->pc = 0xBFC2ECA4u; - SCPH1001_func_1FC2EC90(cpu); -} - -void SCPH1001_func_1FC2EC90_cont_BFC2ECB4(CPUState* cpu) { - cpu->pc = 0xBFC2ECB4u; - SCPH1001_func_1FC2EC90(cpu); -} - -void SCPH1001_func_1FC2EC90_cont_BFC2ECC4(CPUState* cpu) { - cpu->pc = 0xBFC2ECC4u; - SCPH1001_func_1FC2EC90(cpu); -} - -void SCPH1001_func_1FC2EC90_cont_BFC2ECD0(CPUState* cpu) { - cpu->pc = 0xBFC2ECD0u; - SCPH1001_func_1FC2EC90(cpu); -} - -void SCPH1001_func_1FC2ED1C_cont_BFC2ED2C(CPUState* cpu) { - cpu->pc = 0xBFC2ED2Cu; - SCPH1001_func_1FC2ED1C(cpu); -} - -void SCPH1001_func_1FC2ED1C_cont_BFC2ED74(CPUState* cpu) { - cpu->pc = 0xBFC2ED74u; - SCPH1001_func_1FC2ED1C(cpu); -} - -void SCPH1001_func_1FC2ED1C_cont_BFC2ED98(CPUState* cpu) { - cpu->pc = 0xBFC2ED98u; - SCPH1001_func_1FC2ED1C(cpu); -} - -void SCPH1001_func_1FC2EE6C_cont_BFC2EE80(CPUState* cpu) { - cpu->pc = 0xBFC2EE80u; - SCPH1001_func_1FC2EE6C(cpu); -} - -void SCPH1001_func_1FC2EE6C_cont_BFC2EE90(CPUState* cpu) { - cpu->pc = 0xBFC2EE90u; - SCPH1001_func_1FC2EE6C(cpu); -} - -void SCPH1001_func_1FC2EE6C_cont_BFC2EEA0(CPUState* cpu) { - cpu->pc = 0xBFC2EEA0u; - SCPH1001_func_1FC2EE6C(cpu); -} - -void SCPH1001_func_1FC2EE6C_cont_BFC2EEA8(CPUState* cpu) { - cpu->pc = 0xBFC2EEA8u; - SCPH1001_func_1FC2EE6C(cpu); -} - -void SCPH1001_func_1FC2EE6C_cont_BFC2EEB4(CPUState* cpu) { - cpu->pc = 0xBFC2EEB4u; - SCPH1001_func_1FC2EE6C(cpu); -} - -void SCPH1001_func_1FC2EEC0_cont_BFC2EED8(CPUState* cpu) { - cpu->pc = 0xBFC2EED8u; - SCPH1001_func_1FC2EEC0(cpu); -} - -void SCPH1001_func_1FC2EEC0_cont_BFC2EEE8(CPUState* cpu) { - cpu->pc = 0xBFC2EEE8u; - SCPH1001_func_1FC2EEC0(cpu); -} - -void SCPH1001_func_1FC2EEC0_cont_BFC2EEEC(CPUState* cpu) { - cpu->pc = 0xBFC2EEECu; - SCPH1001_func_1FC2EEC0(cpu); -} - -void SCPH1001_func_1FC2EEC0_cont_BFC2EEF8(CPUState* cpu) { - cpu->pc = 0xBFC2EEF8u; - SCPH1001_func_1FC2EEC0(cpu); -} - -void SCPH1001_func_1FC2EF00_cont_BFC2EF18(CPUState* cpu) { - cpu->pc = 0xBFC2EF18u; - SCPH1001_func_1FC2EF00(cpu); -} - -void SCPH1001_func_1FC2EF00_cont_BFC2EF28(CPUState* cpu) { - cpu->pc = 0xBFC2EF28u; - SCPH1001_func_1FC2EF00(cpu); -} - -void SCPH1001_func_1FC2EF00_cont_BFC2EF2C(CPUState* cpu) { - cpu->pc = 0xBFC2EF2Cu; - SCPH1001_func_1FC2EF00(cpu); -} - -void SCPH1001_func_1FC2EF00_cont_BFC2EF38(CPUState* cpu) { - cpu->pc = 0xBFC2EF38u; - SCPH1001_func_1FC2EF00(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EF6C(CPUState* cpu) { - cpu->pc = 0xBFC2EF6Cu; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EF78(CPUState* cpu) { - cpu->pc = 0xBFC2EF78u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EF88(CPUState* cpu) { - cpu->pc = 0xBFC2EF88u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EFB0(CPUState* cpu) { - cpu->pc = 0xBFC2EFB0u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EFB8(CPUState* cpu) { - cpu->pc = 0xBFC2EFB8u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2EFC8(CPUState* cpu) { - cpu->pc = 0xBFC2EFC8u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F014(CPUState* cpu) { - cpu->pc = 0xBFC2F014u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F020(CPUState* cpu) { - cpu->pc = 0xBFC2F020u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F030(CPUState* cpu) { - cpu->pc = 0xBFC2F030u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F034(CPUState* cpu) { - cpu->pc = 0xBFC2F034u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F03C(CPUState* cpu) { - cpu->pc = 0xBFC2F03Cu; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F070(CPUState* cpu) { - cpu->pc = 0xBFC2F070u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2EF40_cont_BFC2F084(CPUState* cpu) { - cpu->pc = 0xBFC2F084u; - SCPH1001_func_1FC2EF40(cpu); -} - -void SCPH1001_func_1FC2F1D4_cont_BFC2F1E0(CPUState* cpu) { - cpu->pc = 0xBFC2F1E0u; - SCPH1001_func_1FC2F1D4(cpu); -} - -void SCPH1001_func_1FC2F1D4_cont_BFC2F1FC(CPUState* cpu) { - cpu->pc = 0xBFC2F1FCu; - SCPH1001_func_1FC2F1D4(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F228(CPUState* cpu) { - cpu->pc = 0xBFC2F228u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F230(CPUState* cpu) { - cpu->pc = 0xBFC2F230u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F240(CPUState* cpu) { - cpu->pc = 0xBFC2F240u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F248(CPUState* cpu) { - cpu->pc = 0xBFC2F248u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F254(CPUState* cpu) { - cpu->pc = 0xBFC2F254u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F264(CPUState* cpu) { - cpu->pc = 0xBFC2F264u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F29C(CPUState* cpu) { - cpu->pc = 0xBFC2F29Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F2C4(CPUState* cpu) { - cpu->pc = 0xBFC2F2C4u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F2F0(CPUState* cpu) { - cpu->pc = 0xBFC2F2F0u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F31C(CPUState* cpu) { - cpu->pc = 0xBFC2F31Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F330(CPUState* cpu) { - cpu->pc = 0xBFC2F330u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F388(CPUState* cpu) { - cpu->pc = 0xBFC2F388u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F3A0(CPUState* cpu) { - cpu->pc = 0xBFC2F3A0u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F3A4(CPUState* cpu) { - cpu->pc = 0xBFC2F3A4u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F3C4(CPUState* cpu) { - cpu->pc = 0xBFC2F3C4u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F3C8(CPUState* cpu) { - cpu->pc = 0xBFC2F3C8u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F3FC(CPUState* cpu) { - cpu->pc = 0xBFC2F3FCu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F424(CPUState* cpu) { - cpu->pc = 0xBFC2F424u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F450(CPUState* cpu) { - cpu->pc = 0xBFC2F450u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F47C(CPUState* cpu) { - cpu->pc = 0xBFC2F47Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F490(CPUState* cpu) { - cpu->pc = 0xBFC2F490u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F4E8(CPUState* cpu) { - cpu->pc = 0xBFC2F4E8u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F50C(CPUState* cpu) { - cpu->pc = 0xBFC2F50Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F518(CPUState* cpu) { - cpu->pc = 0xBFC2F518u; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F58C(CPUState* cpu) { - cpu->pc = 0xBFC2F58Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F210_cont_BFC2F60C(CPUState* cpu) { - cpu->pc = 0xBFC2F60Cu; - SCPH1001_func_1FC2F210(cpu); -} - -void SCPH1001_func_1FC2F618_cont_BFC2F62C(CPUState* cpu) { - cpu->pc = 0xBFC2F62Cu; - SCPH1001_func_1FC2F618(cpu); -} - -void SCPH1001_func_1FC2F618_cont_BFC2F630(CPUState* cpu) { - cpu->pc = 0xBFC2F630u; - SCPH1001_func_1FC2F618(cpu); -} - -void SCPH1001_func_1FC2F618_cont_BFC2F63C(CPUState* cpu) { - cpu->pc = 0xBFC2F63Cu; - SCPH1001_func_1FC2F618(cpu); -} - -void SCPH1001_func_1FC2F618_cont_BFC2F644(CPUState* cpu) { - cpu->pc = 0xBFC2F644u; - SCPH1001_func_1FC2F618(cpu); -} - -void SCPH1001_func_1FC2F618_cont_BFC2F64C(CPUState* cpu) { - cpu->pc = 0xBFC2F64Cu; - SCPH1001_func_1FC2F618(cpu); -} - -void SCPH1001_func_1FC2F65C_cont_BFC2F670(CPUState* cpu) { - cpu->pc = 0xBFC2F670u; - SCPH1001_func_1FC2F65C(cpu); -} - -void SCPH1001_func_1FC2F65C_cont_BFC2F674(CPUState* cpu) { - cpu->pc = 0xBFC2F674u; - SCPH1001_func_1FC2F65C(cpu); -} - -void SCPH1001_func_1FC2F65C_cont_BFC2F680(CPUState* cpu) { - cpu->pc = 0xBFC2F680u; - SCPH1001_func_1FC2F65C(cpu); -} - -void SCPH1001_func_1FC2F65C_cont_BFC2F688(CPUState* cpu) { - cpu->pc = 0xBFC2F688u; - SCPH1001_func_1FC2F65C(cpu); -} - -void SCPH1001_func_1FC2F65C_cont_BFC2F690(CPUState* cpu) { - cpu->pc = 0xBFC2F690u; - SCPH1001_func_1FC2F65C(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F6BC(CPUState* cpu) { - cpu->pc = 0xBFC2F6BCu; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F6C8(CPUState* cpu) { - cpu->pc = 0xBFC2F6C8u; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F6CC(CPUState* cpu) { - cpu->pc = 0xBFC2F6CCu; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F6E0(CPUState* cpu) { - cpu->pc = 0xBFC2F6E0u; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F6F8(CPUState* cpu) { - cpu->pc = 0xBFC2F6F8u; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F700(CPUState* cpu) { - cpu->pc = 0xBFC2F700u; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F6A0_cont_BFC2F704(CPUState* cpu) { - cpu->pc = 0xBFC2F704u; - SCPH1001_func_1FC2F6A0(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F728(CPUState* cpu) { - cpu->pc = 0xBFC2F728u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F730(CPUState* cpu) { - cpu->pc = 0xBFC2F730u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F740(CPUState* cpu) { - cpu->pc = 0xBFC2F740u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F750(CPUState* cpu) { - cpu->pc = 0xBFC2F750u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F760(CPUState* cpu) { - cpu->pc = 0xBFC2F760u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F774(CPUState* cpu) { - cpu->pc = 0xBFC2F774u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F784(CPUState* cpu) { - cpu->pc = 0xBFC2F784u; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F718_cont_BFC2F78C(CPUState* cpu) { - cpu->pc = 0xBFC2F78Cu; - SCPH1001_func_1FC2F718(cpu); -} - -void SCPH1001_func_1FC2F79C_cont_BFC2F7F8(CPUState* cpu) { - cpu->pc = 0xBFC2F7F8u; - SCPH1001_func_1FC2F79C(cpu); -} - -void SCPH1001_func_1FC2F808_cont_BFC2F81C(CPUState* cpu) { - cpu->pc = 0xBFC2F81Cu; - SCPH1001_func_1FC2F808(cpu); -} - -void SCPH1001_func_1FC2F808_cont_BFC2F830(CPUState* cpu) { - cpu->pc = 0xBFC2F830u; - SCPH1001_func_1FC2F808(cpu); -} - -void SCPH1001_func_1FC2F808_cont_BFC2F840(CPUState* cpu) { - cpu->pc = 0xBFC2F840u; - SCPH1001_func_1FC2F808(cpu); -} - -void SCPH1001_func_1FC2F808_cont_BFC2F84C(CPUState* cpu) { - cpu->pc = 0xBFC2F84Cu; - SCPH1001_func_1FC2F808(cpu); -} - -void SCPH1001_func_1FC2F85C_cont_BFC2F874(CPUState* cpu) { - cpu->pc = 0xBFC2F874u; - SCPH1001_func_1FC2F85C(cpu); -} - -void SCPH1001_func_1FC2F85C_cont_BFC2F87C(CPUState* cpu) { - cpu->pc = 0xBFC2F87Cu; - SCPH1001_func_1FC2F85C(cpu); -} - -void SCPH1001_func_1FC2F85C_cont_BFC2F884(CPUState* cpu) { - cpu->pc = 0xBFC2F884u; - SCPH1001_func_1FC2F85C(cpu); -} - -void SCPH1001_func_1FC2F85C_cont_BFC2F88C(CPUState* cpu) { - cpu->pc = 0xBFC2F88Cu; - SCPH1001_func_1FC2F85C(cpu); -} - -void SCPH1001_func_1FC2F85C_cont_BFC2F898(CPUState* cpu) { - cpu->pc = 0xBFC2F898u; - SCPH1001_func_1FC2F85C(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F924(CPUState* cpu) { - cpu->pc = 0xBFC2F924u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F928(CPUState* cpu) { - cpu->pc = 0xBFC2F928u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F934(CPUState* cpu) { - cpu->pc = 0xBFC2F934u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F93C(CPUState* cpu) { - cpu->pc = 0xBFC2F93Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F940(CPUState* cpu) { - cpu->pc = 0xBFC2F940u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F948(CPUState* cpu) { - cpu->pc = 0xBFC2F948u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F94C(CPUState* cpu) { - cpu->pc = 0xBFC2F94Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F958(CPUState* cpu) { - cpu->pc = 0xBFC2F958u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F960(CPUState* cpu) { - cpu->pc = 0xBFC2F960u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F964(CPUState* cpu) { - cpu->pc = 0xBFC2F964u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F96C(CPUState* cpu) { - cpu->pc = 0xBFC2F96Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F970(CPUState* cpu) { - cpu->pc = 0xBFC2F970u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F97C(CPUState* cpu) { - cpu->pc = 0xBFC2F97Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F984(CPUState* cpu) { - cpu->pc = 0xBFC2F984u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F988(CPUState* cpu) { - cpu->pc = 0xBFC2F988u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F990(CPUState* cpu) { - cpu->pc = 0xBFC2F990u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F99C(CPUState* cpu) { - cpu->pc = 0xBFC2F99Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F9A4(CPUState* cpu) { - cpu->pc = 0xBFC2F9A4u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F9C0(CPUState* cpu) { - cpu->pc = 0xBFC2F9C0u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F9F0(CPUState* cpu) { - cpu->pc = 0xBFC2F9F0u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2F9F8(CPUState* cpu) { - cpu->pc = 0xBFC2F9F8u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA08(CPUState* cpu) { - cpu->pc = 0xBFC2FA08u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA10(CPUState* cpu) { - cpu->pc = 0xBFC2FA10u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA18(CPUState* cpu) { - cpu->pc = 0xBFC2FA18u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA28(CPUState* cpu) { - cpu->pc = 0xBFC2FA28u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA48(CPUState* cpu) { - cpu->pc = 0xBFC2FA48u; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA4C(CPUState* cpu) { - cpu->pc = 0xBFC2FA4Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2F8AC_cont_BFC2FA5C(CPUState* cpu) { - cpu->pc = 0xBFC2FA5Cu; - SCPH1001_func_1FC2F8AC(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FAEC(CPUState* cpu) { - cpu->pc = 0xBFC2FAECu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FAF0(CPUState* cpu) { - cpu->pc = 0xBFC2FAF0u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FAFC(CPUState* cpu) { - cpu->pc = 0xBFC2FAFCu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB04(CPUState* cpu) { - cpu->pc = 0xBFC2FB04u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB08(CPUState* cpu) { - cpu->pc = 0xBFC2FB08u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB10(CPUState* cpu) { - cpu->pc = 0xBFC2FB10u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB14(CPUState* cpu) { - cpu->pc = 0xBFC2FB14u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB20(CPUState* cpu) { - cpu->pc = 0xBFC2FB20u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB28(CPUState* cpu) { - cpu->pc = 0xBFC2FB28u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB2C(CPUState* cpu) { - cpu->pc = 0xBFC2FB2Cu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB34(CPUState* cpu) { - cpu->pc = 0xBFC2FB34u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB38(CPUState* cpu) { - cpu->pc = 0xBFC2FB38u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB44(CPUState* cpu) { - cpu->pc = 0xBFC2FB44u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB4C(CPUState* cpu) { - cpu->pc = 0xBFC2FB4Cu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB50(CPUState* cpu) { - cpu->pc = 0xBFC2FB50u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB58(CPUState* cpu) { - cpu->pc = 0xBFC2FB58u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB94(CPUState* cpu) { - cpu->pc = 0xBFC2FB94u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FB9C(CPUState* cpu) { - cpu->pc = 0xBFC2FB9Cu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBB8(CPUState* cpu) { - cpu->pc = 0xBFC2FBB8u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBC0(CPUState* cpu) { - cpu->pc = 0xBFC2FBC0u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBC8(CPUState* cpu) { - cpu->pc = 0xBFC2FBC8u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBDC(CPUState* cpu) { - cpu->pc = 0xBFC2FBDCu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBEC(CPUState* cpu) { - cpu->pc = 0xBFC2FBECu; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FA78_cont_BFC2FBF4(CPUState* cpu) { - cpu->pc = 0xBFC2FBF4u; - SCPH1001_func_1FC2FA78(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FCDC(CPUState* cpu) { - cpu->pc = 0xBFC2FCDCu; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FD24(CPUState* cpu) { - cpu->pc = 0xBFC2FD24u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FD64(CPUState* cpu) { - cpu->pc = 0xBFC2FD64u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FD6C(CPUState* cpu) { - cpu->pc = 0xBFC2FD6Cu; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FDB4(CPUState* cpu) { - cpu->pc = 0xBFC2FDB4u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FDF4(CPUState* cpu) { - cpu->pc = 0xBFC2FDF4u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FDFC(CPUState* cpu) { - cpu->pc = 0xBFC2FDFCu; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE38(CPUState* cpu) { - cpu->pc = 0xBFC2FE38u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE40(CPUState* cpu) { - cpu->pc = 0xBFC2FE40u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE48(CPUState* cpu) { - cpu->pc = 0xBFC2FE48u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE54(CPUState* cpu) { - cpu->pc = 0xBFC2FE54u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE5C(CPUState* cpu) { - cpu->pc = 0xBFC2FE5Cu; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FCC4_cont_BFC2FE60(CPUState* cpu) { - cpu->pc = 0xBFC2FE60u; - SCPH1001_func_1FC2FCC4(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FEAC(CPUState* cpu) { - cpu->pc = 0xBFC2FEACu; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FEB4(CPUState* cpu) { - cpu->pc = 0xBFC2FEB4u; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FEC4(CPUState* cpu) { - cpu->pc = 0xBFC2FEC4u; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FEE0(CPUState* cpu) { - cpu->pc = 0xBFC2FEE0u; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FEEC(CPUState* cpu) { - cpu->pc = 0xBFC2FEECu; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FF20(CPUState* cpu) { - cpu->pc = 0xBFC2FF20u; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FE6C_cont_BFC2FF24(CPUState* cpu) { - cpu->pc = 0xBFC2FF24u; - SCPH1001_func_1FC2FE6C(cpu); -} - -void SCPH1001_func_1FC2FF34_cont_BFC2FF40(CPUState* cpu) { - cpu->pc = 0xBFC2FF40u; - SCPH1001_func_1FC2FF34(cpu); -} - -void SCPH1001_func_1FC2FF34_cont_BFC2FF5C(CPUState* cpu) { - cpu->pc = 0xBFC2FF5Cu; - SCPH1001_func_1FC2FF34(cpu); -} - -void SCPH1001_func_1FC3010C_cont_BFC3012C(CPUState* cpu) { - cpu->pc = 0xBFC3012Cu; - SCPH1001_func_1FC3010C(cpu); -} - -void SCPH1001_func_1FC3010C_cont_BFC30138(CPUState* cpu) { - cpu->pc = 0xBFC30138u; - SCPH1001_func_1FC3010C(cpu); -} - -void SCPH1001_func_1FC3015C_cont_BFC3017C(CPUState* cpu) { - cpu->pc = 0xBFC3017Cu; - SCPH1001_func_1FC3015C(cpu); -} - -void SCPH1001_func_1FC3015C_cont_BFC30188(CPUState* cpu) { - cpu->pc = 0xBFC30188u; - SCPH1001_func_1FC3015C(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC301D8(CPUState* cpu) { - cpu->pc = 0xBFC301D8u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC301E8(CPUState* cpu) { - cpu->pc = 0xBFC301E8u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC301F0(CPUState* cpu) { - cpu->pc = 0xBFC301F0u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC301F4(CPUState* cpu) { - cpu->pc = 0xBFC301F4u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC30200(CPUState* cpu) { - cpu->pc = 0xBFC30200u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC30208(CPUState* cpu) { - cpu->pc = 0xBFC30208u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC30214(CPUState* cpu) { - cpu->pc = 0xBFC30214u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC3021C(CPUState* cpu) { - cpu->pc = 0xBFC3021Cu; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC301AC_cont_BFC30220(CPUState* cpu) { - cpu->pc = 0xBFC30220u; - SCPH1001_func_1FC301AC(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30258(CPUState* cpu) { - cpu->pc = 0xBFC30258u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30260(CPUState* cpu) { - cpu->pc = 0xBFC30260u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30268(CPUState* cpu) { - cpu->pc = 0xBFC30268u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30270(CPUState* cpu) { - cpu->pc = 0xBFC30270u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30278(CPUState* cpu) { - cpu->pc = 0xBFC30278u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30284(CPUState* cpu) { - cpu->pc = 0xBFC30284u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC3028C(CPUState* cpu) { - cpu->pc = 0xBFC3028Cu; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3022C_cont_BFC30290(CPUState* cpu) { - cpu->pc = 0xBFC30290u; - SCPH1001_func_1FC3022C(cpu); -} - -void SCPH1001_func_1FC3029C_cont_BFC302AC(CPUState* cpu) { - cpu->pc = 0xBFC302ACu; - SCPH1001_func_1FC3029C(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302D0(CPUState* cpu) { - cpu->pc = 0xBFC302D0u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302DC(CPUState* cpu) { - cpu->pc = 0xBFC302DCu; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302E4(CPUState* cpu) { - cpu->pc = 0xBFC302E4u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302E8(CPUState* cpu) { - cpu->pc = 0xBFC302E8u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302F0(CPUState* cpu) { - cpu->pc = 0xBFC302F0u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302F8(CPUState* cpu) { - cpu->pc = 0xBFC302F8u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC302FC(CPUState* cpu) { - cpu->pc = 0xBFC302FCu; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC30304(CPUState* cpu) { - cpu->pc = 0xBFC30304u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC3030C(CPUState* cpu) { - cpu->pc = 0xBFC3030Cu; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC302BC_cont_BFC30310(CPUState* cpu) { - cpu->pc = 0xBFC30310u; - SCPH1001_func_1FC302BC(cpu); -} - -void SCPH1001_func_1FC3031C_cont_BFC30340(CPUState* cpu) { - cpu->pc = 0xBFC30340u; - SCPH1001_func_1FC3031C(cpu); -} - -void SCPH1001_func_1FC30350_cont_BFC30384(CPUState* cpu) { - cpu->pc = 0xBFC30384u; - SCPH1001_func_1FC30350(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC303C0(CPUState* cpu) { - cpu->pc = 0xBFC303C0u; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC303D4(CPUState* cpu) { - cpu->pc = 0xBFC303D4u; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC303E8(CPUState* cpu) { - cpu->pc = 0xBFC303E8u; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC303FC(CPUState* cpu) { - cpu->pc = 0xBFC303FCu; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC30404(CPUState* cpu) { - cpu->pc = 0xBFC30404u; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC3040C(CPUState* cpu) { - cpu->pc = 0xBFC3040Cu; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC303A4_cont_BFC30414(CPUState* cpu) { - cpu->pc = 0xBFC30414u; - SCPH1001_func_1FC303A4(cpu); -} - -void SCPH1001_func_1FC3041C_cont_BFC30440(CPUState* cpu) { - cpu->pc = 0xBFC30440u; - SCPH1001_func_1FC3041C(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC304D0(CPUState* cpu) { - cpu->pc = 0xBFC304D0u; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC304DC(CPUState* cpu) { - cpu->pc = 0xBFC304DCu; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC304E8(CPUState* cpu) { - cpu->pc = 0xBFC304E8u; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC304F4(CPUState* cpu) { - cpu->pc = 0xBFC304F4u; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC304FC(CPUState* cpu) { - cpu->pc = 0xBFC304FCu; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC30504(CPUState* cpu) { - cpu->pc = 0xBFC30504u; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC304B4_cont_BFC3050C(CPUState* cpu) { - cpu->pc = 0xBFC3050Cu; - SCPH1001_func_1FC304B4(cpu); -} - -void SCPH1001_func_1FC30514_cont_BFC30538(CPUState* cpu) { - cpu->pc = 0xBFC30538u; - SCPH1001_func_1FC30514(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC305DC(CPUState* cpu) { - cpu->pc = 0xBFC305DCu; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC305E0(CPUState* cpu) { - cpu->pc = 0xBFC305E0u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30600(CPUState* cpu) { - cpu->pc = 0xBFC30600u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30604(CPUState* cpu) { - cpu->pc = 0xBFC30604u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30624(CPUState* cpu) { - cpu->pc = 0xBFC30624u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30628(CPUState* cpu) { - cpu->pc = 0xBFC30628u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30638(CPUState* cpu) { - cpu->pc = 0xBFC30638u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC3063C(CPUState* cpu) { - cpu->pc = 0xBFC3063Cu; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC3064C(CPUState* cpu) { - cpu->pc = 0xBFC3064Cu; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30650(CPUState* cpu) { - cpu->pc = 0xBFC30650u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30660(CPUState* cpu) { - cpu->pc = 0xBFC30660u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC3058C_cont_BFC30664(CPUState* cpu) { - cpu->pc = 0xBFC30664u; - SCPH1001_func_1FC3058C(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC306C0(CPUState* cpu) { - cpu->pc = 0xBFC306C0u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC306C4(CPUState* cpu) { - cpu->pc = 0xBFC306C4u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC306E4(CPUState* cpu) { - cpu->pc = 0xBFC306E4u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC306E8(CPUState* cpu) { - cpu->pc = 0xBFC306E8u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30708(CPUState* cpu) { - cpu->pc = 0xBFC30708u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC3070C(CPUState* cpu) { - cpu->pc = 0xBFC3070Cu; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC3072C(CPUState* cpu) { - cpu->pc = 0xBFC3072Cu; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30730(CPUState* cpu) { - cpu->pc = 0xBFC30730u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30750(CPUState* cpu) { - cpu->pc = 0xBFC30750u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30754(CPUState* cpu) { - cpu->pc = 0xBFC30754u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30764(CPUState* cpu) { - cpu->pc = 0xBFC30764u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30768(CPUState* cpu) { - cpu->pc = 0xBFC30768u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30778(CPUState* cpu) { - cpu->pc = 0xBFC30778u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC3077C(CPUState* cpu) { - cpu->pc = 0xBFC3077Cu; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC3078C(CPUState* cpu) { - cpu->pc = 0xBFC3078Cu; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC30670_cont_BFC30790(CPUState* cpu) { - cpu->pc = 0xBFC30790u; - SCPH1001_func_1FC30670(cpu); -} - -void SCPH1001_func_1FC3079C_cont_BFC307C0(CPUState* cpu) { - cpu->pc = 0xBFC307C0u; - SCPH1001_func_1FC3079C(cpu); -} - -void SCPH1001_func_1FC3079C_cont_BFC307D4(CPUState* cpu) { - cpu->pc = 0xBFC307D4u; - SCPH1001_func_1FC3079C(cpu); -} - -void SCPH1001_func_1FC30868_cont_BFC3088C(CPUState* cpu) { - cpu->pc = 0xBFC3088Cu; - SCPH1001_func_1FC30868(cpu); -} - -void SCPH1001_func_1FC30868_cont_BFC308A0(CPUState* cpu) { - cpu->pc = 0xBFC308A0u; - SCPH1001_func_1FC30868(cpu); -} - -void SCPH1001_func_1FC30960_cont_BFC30998(CPUState* cpu) { - cpu->pc = 0xBFC30998u; - SCPH1001_func_1FC30960(cpu); -} - -void SCPH1001_func_1FC30960_cont_BFC309A8(CPUState* cpu) { - cpu->pc = 0xBFC309A8u; - SCPH1001_func_1FC30960(cpu); -} - -void SCPH1001_func_1FC30960_cont_BFC309CC(CPUState* cpu) { - cpu->pc = 0xBFC309CCu; - SCPH1001_func_1FC30960(cpu); -} - -void SCPH1001_func_1FC30960_cont_BFC30A14(CPUState* cpu) { - cpu->pc = 0xBFC30A14u; - SCPH1001_func_1FC30960(cpu); -} - -void SCPH1001_func_1FC30960_cont_BFC30A20(CPUState* cpu) { - cpu->pc = 0xBFC30A20u; - SCPH1001_func_1FC30960(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30AD4(CPUState* cpu) { - cpu->pc = 0xBFC30AD4u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30AE8(CPUState* cpu) { - cpu->pc = 0xBFC30AE8u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30B0C(CPUState* cpu) { - cpu->pc = 0xBFC30B0Cu; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30BD8(CPUState* cpu) { - cpu->pc = 0xBFC30BD8u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30BE0(CPUState* cpu) { - cpu->pc = 0xBFC30BE0u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30C18(CPUState* cpu) { - cpu->pc = 0xBFC30C18u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30C44(CPUState* cpu) { - cpu->pc = 0xBFC30C44u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30C84(CPUState* cpu) { - cpu->pc = 0xBFC30C84u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30CB4(CPUState* cpu) { - cpu->pc = 0xBFC30CB4u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30CE8(CPUState* cpu) { - cpu->pc = 0xBFC30CE8u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30D14(CPUState* cpu) { - cpu->pc = 0xBFC30D14u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30D50(CPUState* cpu) { - cpu->pc = 0xBFC30D50u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30D80(CPUState* cpu) { - cpu->pc = 0xBFC30D80u; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30A80_cont_BFC30D8C(CPUState* cpu) { - cpu->pc = 0xBFC30D8Cu; - SCPH1001_func_1FC30A80(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30E3C(CPUState* cpu) { - cpu->pc = 0xBFC30E3Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30E4C(CPUState* cpu) { - cpu->pc = 0xBFC30E4Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30E68(CPUState* cpu) { - cpu->pc = 0xBFC30E68u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30E7C(CPUState* cpu) { - cpu->pc = 0xBFC30E7Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30E8C(CPUState* cpu) { - cpu->pc = 0xBFC30E8Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30EAC(CPUState* cpu) { - cpu->pc = 0xBFC30EACu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30ECC(CPUState* cpu) { - cpu->pc = 0xBFC30ECCu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30EDC(CPUState* cpu) { - cpu->pc = 0xBFC30EDCu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F38(CPUState* cpu) { - cpu->pc = 0xBFC30F38u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F44(CPUState* cpu) { - cpu->pc = 0xBFC30F44u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F50(CPUState* cpu) { - cpu->pc = 0xBFC30F50u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F58(CPUState* cpu) { - cpu->pc = 0xBFC30F58u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F68(CPUState* cpu) { - cpu->pc = 0xBFC30F68u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F6C(CPUState* cpu) { - cpu->pc = 0xBFC30F6Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F78(CPUState* cpu) { - cpu->pc = 0xBFC30F78u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F80(CPUState* cpu) { - cpu->pc = 0xBFC30F80u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F84(CPUState* cpu) { - cpu->pc = 0xBFC30F84u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F8C(CPUState* cpu) { - cpu->pc = 0xBFC30F8Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30F94(CPUState* cpu) { - cpu->pc = 0xBFC30F94u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FA8(CPUState* cpu) { - cpu->pc = 0xBFC30FA8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FAC(CPUState* cpu) { - cpu->pc = 0xBFC30FACu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FB8(CPUState* cpu) { - cpu->pc = 0xBFC30FB8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FC0(CPUState* cpu) { - cpu->pc = 0xBFC30FC0u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FC4(CPUState* cpu) { - cpu->pc = 0xBFC30FC4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FCC(CPUState* cpu) { - cpu->pc = 0xBFC30FCCu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FD4(CPUState* cpu) { - cpu->pc = 0xBFC30FD4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FE4(CPUState* cpu) { - cpu->pc = 0xBFC30FE4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FE8(CPUState* cpu) { - cpu->pc = 0xBFC30FE8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FF4(CPUState* cpu) { - cpu->pc = 0xBFC30FF4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC30FFC(CPUState* cpu) { - cpu->pc = 0xBFC30FFCu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31000(CPUState* cpu) { - cpu->pc = 0xBFC31000u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31008(CPUState* cpu) { - cpu->pc = 0xBFC31008u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31018(CPUState* cpu) { - cpu->pc = 0xBFC31018u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC3101C(CPUState* cpu) { - cpu->pc = 0xBFC3101Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31028(CPUState* cpu) { - cpu->pc = 0xBFC31028u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31030(CPUState* cpu) { - cpu->pc = 0xBFC31030u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31034(CPUState* cpu) { - cpu->pc = 0xBFC31034u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC3103C(CPUState* cpu) { - cpu->pc = 0xBFC3103Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31044(CPUState* cpu) { - cpu->pc = 0xBFC31044u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31058(CPUState* cpu) { - cpu->pc = 0xBFC31058u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC3105C(CPUState* cpu) { - cpu->pc = 0xBFC3105Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31068(CPUState* cpu) { - cpu->pc = 0xBFC31068u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31070(CPUState* cpu) { - cpu->pc = 0xBFC31070u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31074(CPUState* cpu) { - cpu->pc = 0xBFC31074u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC3107C(CPUState* cpu) { - cpu->pc = 0xBFC3107Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31084(CPUState* cpu) { - cpu->pc = 0xBFC31084u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31094(CPUState* cpu) { - cpu->pc = 0xBFC31094u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31098(CPUState* cpu) { - cpu->pc = 0xBFC31098u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310A4(CPUState* cpu) { - cpu->pc = 0xBFC310A4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310AC(CPUState* cpu) { - cpu->pc = 0xBFC310ACu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310B0(CPUState* cpu) { - cpu->pc = 0xBFC310B0u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310B4(CPUState* cpu) { - cpu->pc = 0xBFC310B4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310C4(CPUState* cpu) { - cpu->pc = 0xBFC310C4u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310D0(CPUState* cpu) { - cpu->pc = 0xBFC310D0u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310D8(CPUState* cpu) { - cpu->pc = 0xBFC310D8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310E0(CPUState* cpu) { - cpu->pc = 0xBFC310E0u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310E8(CPUState* cpu) { - cpu->pc = 0xBFC310E8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310EC(CPUState* cpu) { - cpu->pc = 0xBFC310ECu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC310F8(CPUState* cpu) { - cpu->pc = 0xBFC310F8u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31100(CPUState* cpu) { - cpu->pc = 0xBFC31100u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC3111C(CPUState* cpu) { - cpu->pc = 0xBFC3111Cu; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31128(CPUState* cpu) { - cpu->pc = 0xBFC31128u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC30DF0_cont_BFC31138(CPUState* cpu) { - cpu->pc = 0xBFC31138u; - SCPH1001_func_1FC30DF0(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC311CC(CPUState* cpu) { - cpu->pc = 0xBFC311CCu; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC311DC(CPUState* cpu) { - cpu->pc = 0xBFC311DCu; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31200(CPUState* cpu) { - cpu->pc = 0xBFC31200u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31234(CPUState* cpu) { - cpu->pc = 0xBFC31234u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC3123C(CPUState* cpu) { - cpu->pc = 0xBFC3123Cu; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31244(CPUState* cpu) { - cpu->pc = 0xBFC31244u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31288(CPUState* cpu) { - cpu->pc = 0xBFC31288u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31290(CPUState* cpu) { - cpu->pc = 0xBFC31290u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31294(CPUState* cpu) { - cpu->pc = 0xBFC31294u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC312D4(CPUState* cpu) { - cpu->pc = 0xBFC312D4u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC312D8(CPUState* cpu) { - cpu->pc = 0xBFC312D8u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC312E4(CPUState* cpu) { - cpu->pc = 0xBFC312E4u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC312E8(CPUState* cpu) { - cpu->pc = 0xBFC312E8u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC312FC(CPUState* cpu) { - cpu->pc = 0xBFC312FCu; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31300(CPUState* cpu) { - cpu->pc = 0xBFC31300u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC3130C(CPUState* cpu) { - cpu->pc = 0xBFC3130Cu; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31314(CPUState* cpu) { - cpu->pc = 0xBFC31314u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31194_cont_BFC31320(CPUState* cpu) { - cpu->pc = 0xBFC31320u; - SCPH1001_func_1FC31194(cpu); -} - -void SCPH1001_func_1FC31380_cont_BFC313AC(CPUState* cpu) { - cpu->pc = 0xBFC313ACu; - SCPH1001_func_1FC31380(cpu); -} - -void SCPH1001_func_1FC31380_cont_BFC313B8(CPUState* cpu) { - cpu->pc = 0xBFC313B8u; - SCPH1001_func_1FC31380(cpu); -} - -void SCPH1001_func_1FC31380_cont_BFC313D0(CPUState* cpu) { - cpu->pc = 0xBFC313D0u; - SCPH1001_func_1FC31380(cpu); -} - -void SCPH1001_func_1FC313EC_cont_BFC31410(CPUState* cpu) { - cpu->pc = 0xBFC31410u; - SCPH1001_func_1FC313EC(cpu); -} - -void SCPH1001_func_1FC313EC_cont_BFC31418(CPUState* cpu) { - cpu->pc = 0xBFC31418u; - SCPH1001_func_1FC313EC(cpu); -} - -void SCPH1001_func_1FC313EC_cont_BFC31430(CPUState* cpu) { - cpu->pc = 0xBFC31430u; - SCPH1001_func_1FC313EC(cpu); -} - -void SCPH1001_func_1FC31448_cont_BFC31500(CPUState* cpu) { - cpu->pc = 0xBFC31500u; - SCPH1001_func_1FC31448(cpu); -} - -void SCPH1001_func_1FC31448_cont_BFC31530(CPUState* cpu) { - cpu->pc = 0xBFC31530u; - SCPH1001_func_1FC31448(cpu); -} - -void SCPH1001_func_1FC31448_cont_BFC31540(CPUState* cpu) { - cpu->pc = 0xBFC31540u; - SCPH1001_func_1FC31448(cpu); -} - -void SCPH1001_func_1FC31448_cont_BFC31550(CPUState* cpu) { - cpu->pc = 0xBFC31550u; - SCPH1001_func_1FC31448(cpu); -} - -void SCPH1001_func_1FC31448_cont_BFC31554(CPUState* cpu) { - cpu->pc = 0xBFC31554u; - SCPH1001_func_1FC31448(cpu); -} - -void SCPH1001_func_1FC31580_cont_BFC315B8(CPUState* cpu) { - cpu->pc = 0xBFC315B8u; - SCPH1001_func_1FC31580(cpu); -} - -void SCPH1001_func_1FC31580_cont_BFC315FC(CPUState* cpu) { - cpu->pc = 0xBFC315FCu; - SCPH1001_func_1FC31580(cpu); -} - -void SCPH1001_func_1FC31580_cont_BFC31614(CPUState* cpu) { - cpu->pc = 0xBFC31614u; - SCPH1001_func_1FC31580(cpu); -} - -void SCPH1001_func_1FC31638_cont_BFC3165C(CPUState* cpu) { - cpu->pc = 0xBFC3165Cu; - SCPH1001_func_1FC31638(cpu); -} - -void SCPH1001_func_1FC31638_cont_BFC316DC(CPUState* cpu) { - cpu->pc = 0xBFC316DCu; - SCPH1001_func_1FC31638(cpu); -} - -void SCPH1001_func_1FC31638_cont_BFC31708(CPUState* cpu) { - cpu->pc = 0xBFC31708u; - SCPH1001_func_1FC31638(cpu); -} - -void SCPH1001_func_1FC31638_cont_BFC31724(CPUState* cpu) { - cpu->pc = 0xBFC31724u; - SCPH1001_func_1FC31638(cpu); -} - -void SCPH1001_func_1FC31638_cont_BFC31744(CPUState* cpu) { - cpu->pc = 0xBFC31744u; - SCPH1001_func_1FC31638(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3180C(CPUState* cpu) { - cpu->pc = 0xBFC3180Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31828(CPUState* cpu) { - cpu->pc = 0xBFC31828u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3182C(CPUState* cpu) { - cpu->pc = 0xBFC3182Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31858(CPUState* cpu) { - cpu->pc = 0xBFC31858u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31860(CPUState* cpu) { - cpu->pc = 0xBFC31860u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31864(CPUState* cpu) { - cpu->pc = 0xBFC31864u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3186C(CPUState* cpu) { - cpu->pc = 0xBFC3186Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31874(CPUState* cpu) { - cpu->pc = 0xBFC31874u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31878(CPUState* cpu) { - cpu->pc = 0xBFC31878u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31880(CPUState* cpu) { - cpu->pc = 0xBFC31880u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31884(CPUState* cpu) { - cpu->pc = 0xBFC31884u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC318C4(CPUState* cpu) { - cpu->pc = 0xBFC318C4u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC318E0(CPUState* cpu) { - cpu->pc = 0xBFC318E0u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC318E4(CPUState* cpu) { - cpu->pc = 0xBFC318E4u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31910(CPUState* cpu) { - cpu->pc = 0xBFC31910u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31918(CPUState* cpu) { - cpu->pc = 0xBFC31918u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3191C(CPUState* cpu) { - cpu->pc = 0xBFC3191Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31924(CPUState* cpu) { - cpu->pc = 0xBFC31924u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3192C(CPUState* cpu) { - cpu->pc = 0xBFC3192Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31930(CPUState* cpu) { - cpu->pc = 0xBFC31930u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31938(CPUState* cpu) { - cpu->pc = 0xBFC31938u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC3193C(CPUState* cpu) { - cpu->pc = 0xBFC3193Cu; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC317D0_cont_BFC31958(CPUState* cpu) { - cpu->pc = 0xBFC31958u; - SCPH1001_func_1FC317D0(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC3197C(CPUState* cpu) { - cpu->pc = 0xBFC3197Cu; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC31994(CPUState* cpu) { - cpu->pc = 0xBFC31994u; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC319AC(CPUState* cpu) { - cpu->pc = 0xBFC319ACu; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC319B8(CPUState* cpu) { - cpu->pc = 0xBFC319B8u; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC319D0(CPUState* cpu) { - cpu->pc = 0xBFC319D0u; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC31968_cont_BFC319DC(CPUState* cpu) { - cpu->pc = 0xBFC319DCu; - SCPH1001_func_1FC31968(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A18(CPUState* cpu) { - cpu->pc = 0xBFC31A18u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A20(CPUState* cpu) { - cpu->pc = 0xBFC31A20u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A24(CPUState* cpu) { - cpu->pc = 0xBFC31A24u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A2C(CPUState* cpu) { - cpu->pc = 0xBFC31A2Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A34(CPUState* cpu) { - cpu->pc = 0xBFC31A34u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A38(CPUState* cpu) { - cpu->pc = 0xBFC31A38u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A4C(CPUState* cpu) { - cpu->pc = 0xBFC31A4Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A50(CPUState* cpu) { - cpu->pc = 0xBFC31A50u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31A9C(CPUState* cpu) { - cpu->pc = 0xBFC31A9Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31AA8(CPUState* cpu) { - cpu->pc = 0xBFC31AA8u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31AF4(CPUState* cpu) { - cpu->pc = 0xBFC31AF4u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31AFC(CPUState* cpu) { - cpu->pc = 0xBFC31AFCu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B28(CPUState* cpu) { - cpu->pc = 0xBFC31B28u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B38(CPUState* cpu) { - cpu->pc = 0xBFC31B38u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B40(CPUState* cpu) { - cpu->pc = 0xBFC31B40u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B48(CPUState* cpu) { - cpu->pc = 0xBFC31B48u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B4C(CPUState* cpu) { - cpu->pc = 0xBFC31B4Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B54(CPUState* cpu) { - cpu->pc = 0xBFC31B54u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B5C(CPUState* cpu) { - cpu->pc = 0xBFC31B5Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B60(CPUState* cpu) { - cpu->pc = 0xBFC31B60u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B74(CPUState* cpu) { - cpu->pc = 0xBFC31B74u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31B78(CPUState* cpu) { - cpu->pc = 0xBFC31B78u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31BC0(CPUState* cpu) { - cpu->pc = 0xBFC31BC0u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31BCC(CPUState* cpu) { - cpu->pc = 0xBFC31BCCu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31C18(CPUState* cpu) { - cpu->pc = 0xBFC31C18u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31C20(CPUState* cpu) { - cpu->pc = 0xBFC31C20u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31C4C(CPUState* cpu) { - cpu->pc = 0xBFC31C4Cu; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC319EC_cont_BFC31C50(CPUState* cpu) { - cpu->pc = 0xBFC31C50u; - SCPH1001_func_1FC319EC(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31C84(CPUState* cpu) { - cpu->pc = 0xBFC31C84u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31C88(CPUState* cpu) { - cpu->pc = 0xBFC31C88u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CB0(CPUState* cpu) { - cpu->pc = 0xBFC31CB0u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CB8(CPUState* cpu) { - cpu->pc = 0xBFC31CB8u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CBC(CPUState* cpu) { - cpu->pc = 0xBFC31CBCu; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CC4(CPUState* cpu) { - cpu->pc = 0xBFC31CC4u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CCC(CPUState* cpu) { - cpu->pc = 0xBFC31CCCu; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CD0(CPUState* cpu) { - cpu->pc = 0xBFC31CD0u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CD8(CPUState* cpu) { - cpu->pc = 0xBFC31CD8u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31CDC(CPUState* cpu) { - cpu->pc = 0xBFC31CDCu; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31C64_cont_BFC31D04(CPUState* cpu) { - cpu->pc = 0xBFC31D04u; - SCPH1001_func_1FC31C64(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D34(CPUState* cpu) { - cpu->pc = 0xBFC31D34u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D38(CPUState* cpu) { - cpu->pc = 0xBFC31D38u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D60(CPUState* cpu) { - cpu->pc = 0xBFC31D60u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D68(CPUState* cpu) { - cpu->pc = 0xBFC31D68u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D6C(CPUState* cpu) { - cpu->pc = 0xBFC31D6Cu; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D74(CPUState* cpu) { - cpu->pc = 0xBFC31D74u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D7C(CPUState* cpu) { - cpu->pc = 0xBFC31D7Cu; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D80(CPUState* cpu) { - cpu->pc = 0xBFC31D80u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D88(CPUState* cpu) { - cpu->pc = 0xBFC31D88u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31D8C(CPUState* cpu) { - cpu->pc = 0xBFC31D8Cu; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31D14_cont_BFC31DB4(CPUState* cpu) { - cpu->pc = 0xBFC31DB4u; - SCPH1001_func_1FC31D14(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31DE4(CPUState* cpu) { - cpu->pc = 0xBFC31DE4u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31DE8(CPUState* cpu) { - cpu->pc = 0xBFC31DE8u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E10(CPUState* cpu) { - cpu->pc = 0xBFC31E10u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E18(CPUState* cpu) { - cpu->pc = 0xBFC31E18u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E1C(CPUState* cpu) { - cpu->pc = 0xBFC31E1Cu; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E24(CPUState* cpu) { - cpu->pc = 0xBFC31E24u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E2C(CPUState* cpu) { - cpu->pc = 0xBFC31E2Cu; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E30(CPUState* cpu) { - cpu->pc = 0xBFC31E30u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E38(CPUState* cpu) { - cpu->pc = 0xBFC31E38u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E3C(CPUState* cpu) { - cpu->pc = 0xBFC31E3Cu; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31DC4_cont_BFC31E64(CPUState* cpu) { - cpu->pc = 0xBFC31E64u; - SCPH1001_func_1FC31DC4(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31E94(CPUState* cpu) { - cpu->pc = 0xBFC31E94u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31E98(CPUState* cpu) { - cpu->pc = 0xBFC31E98u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EC0(CPUState* cpu) { - cpu->pc = 0xBFC31EC0u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EC8(CPUState* cpu) { - cpu->pc = 0xBFC31EC8u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31ECC(CPUState* cpu) { - cpu->pc = 0xBFC31ECCu; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31ED4(CPUState* cpu) { - cpu->pc = 0xBFC31ED4u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EDC(CPUState* cpu) { - cpu->pc = 0xBFC31EDCu; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EE0(CPUState* cpu) { - cpu->pc = 0xBFC31EE0u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EE8(CPUState* cpu) { - cpu->pc = 0xBFC31EE8u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31EEC(CPUState* cpu) { - cpu->pc = 0xBFC31EECu; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC31E74_cont_BFC31F14(CPUState* cpu) { - cpu->pc = 0xBFC31F14u; - SCPH1001_func_1FC31E74(cpu); -} - -void SCPH1001_func_1FC32010_cont_BFC32024(CPUState* cpu) { - cpu->pc = 0xBFC32024u; - SCPH1001_func_1FC32010(cpu); -} - -void SCPH1001_func_1FC32010_cont_BFC32038(CPUState* cpu) { - cpu->pc = 0xBFC32038u; - SCPH1001_func_1FC32010(cpu); -} - -void SCPH1001_func_1FC32040_cont_BFC32054(CPUState* cpu) { - cpu->pc = 0xBFC32054u; - SCPH1001_func_1FC32040(cpu); -} - -void SCPH1001_func_1FC32040_cont_BFC32070(CPUState* cpu) { - cpu->pc = 0xBFC32070u; - SCPH1001_func_1FC32040(cpu); -} - -void SCPH1001_func_1FC32078_cont_BFC32090(CPUState* cpu) { - cpu->pc = 0xBFC32090u; - SCPH1001_func_1FC32078(cpu); -} - -void SCPH1001_func_1FC32078_cont_BFC320AC(CPUState* cpu) { - cpu->pc = 0xBFC320ACu; - SCPH1001_func_1FC32078(cpu); -} - -void SCPH1001_func_1FC320B4_cont_BFC320D0(CPUState* cpu) { - cpu->pc = 0xBFC320D0u; - SCPH1001_func_1FC320B4(cpu); -} - -void SCPH1001_func_1FC320B4_cont_BFC320F8(CPUState* cpu) { - cpu->pc = 0xBFC320F8u; - SCPH1001_func_1FC320B4(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC32114(CPUState* cpu) { - cpu->pc = 0xBFC32114u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC3211C(CPUState* cpu) { - cpu->pc = 0xBFC3211Cu; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC32130(CPUState* cpu) { - cpu->pc = 0xBFC32130u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC32144(CPUState* cpu) { - cpu->pc = 0xBFC32144u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC3214C(CPUState* cpu) { - cpu->pc = 0xBFC3214Cu; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321CC(CPUState* cpu) { - cpu->pc = 0xBFC321CCu; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321D0(CPUState* cpu) { - cpu->pc = 0xBFC321D0u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321D8(CPUState* cpu) { - cpu->pc = 0xBFC321D8u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321DC(CPUState* cpu) { - cpu->pc = 0xBFC321DCu; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321E4(CPUState* cpu) { - cpu->pc = 0xBFC321E4u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC32100_cont_BFC321E8(CPUState* cpu) { - cpu->pc = 0xBFC321E8u; - SCPH1001_func_1FC32100(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC32208(CPUState* cpu) { - cpu->pc = 0xBFC32208u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC32210(CPUState* cpu) { - cpu->pc = 0xBFC32210u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC32224(CPUState* cpu) { - cpu->pc = 0xBFC32224u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC32238(CPUState* cpu) { - cpu->pc = 0xBFC32238u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322C0(CPUState* cpu) { - cpu->pc = 0xBFC322C0u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322C4(CPUState* cpu) { - cpu->pc = 0xBFC322C4u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322CC(CPUState* cpu) { - cpu->pc = 0xBFC322CCu; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322D0(CPUState* cpu) { - cpu->pc = 0xBFC322D0u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322D8(CPUState* cpu) { - cpu->pc = 0xBFC322D8u; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC321F0_cont_BFC322DC(CPUState* cpu) { - cpu->pc = 0xBFC322DCu; - SCPH1001_func_1FC321F0(cpu); -} - -void SCPH1001_func_1FC322E4_cont_BFC32324(CPUState* cpu) { - cpu->pc = 0xBFC32324u; - SCPH1001_func_1FC322E4(cpu); -} - -void SCPH1001_func_1FC322E4_cont_BFC32348(CPUState* cpu) { - cpu->pc = 0xBFC32348u; - SCPH1001_func_1FC322E4(cpu); -} - -void SCPH1001_func_1FC322E4_cont_BFC32354(CPUState* cpu) { - cpu->pc = 0xBFC32354u; - SCPH1001_func_1FC322E4(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC3239C(CPUState* cpu) { - cpu->pc = 0xBFC3239Cu; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323A0(CPUState* cpu) { - cpu->pc = 0xBFC323A0u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323A8(CPUState* cpu) { - cpu->pc = 0xBFC323A8u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323AC(CPUState* cpu) { - cpu->pc = 0xBFC323ACu; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323B8(CPUState* cpu) { - cpu->pc = 0xBFC323B8u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323C0(CPUState* cpu) { - cpu->pc = 0xBFC323C0u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323C4(CPUState* cpu) { - cpu->pc = 0xBFC323C4u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323CC(CPUState* cpu) { - cpu->pc = 0xBFC323CCu; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323D4(CPUState* cpu) { - cpu->pc = 0xBFC323D4u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323D8(CPUState* cpu) { - cpu->pc = 0xBFC323D8u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323EC(CPUState* cpu) { - cpu->pc = 0xBFC323ECu; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323F0(CPUState* cpu) { - cpu->pc = 0xBFC323F0u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC323FC(CPUState* cpu) { - cpu->pc = 0xBFC323FCu; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC32404(CPUState* cpu) { - cpu->pc = 0xBFC32404u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32368_cont_BFC32408(CPUState* cpu) { - cpu->pc = 0xBFC32408u; - SCPH1001_func_1FC32368(cpu); -} - -void SCPH1001_func_1FC32410_cont_BFC32434(CPUState* cpu) { - cpu->pc = 0xBFC32434u; - SCPH1001_func_1FC32410(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC32490(CPUState* cpu) { - cpu->pc = 0xBFC32490u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC324A4(CPUState* cpu) { - cpu->pc = 0xBFC324A4u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC324AC(CPUState* cpu) { - cpu->pc = 0xBFC324ACu; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC324C8(CPUState* cpu) { - cpu->pc = 0xBFC324C8u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC324D0(CPUState* cpu) { - cpu->pc = 0xBFC324D0u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC324F8(CPUState* cpu) { - cpu->pc = 0xBFC324F8u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC32514(CPUState* cpu) { - cpu->pc = 0xBFC32514u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC3251C(CPUState* cpu) { - cpu->pc = 0xBFC3251Cu; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC32534(CPUState* cpu) { - cpu->pc = 0xBFC32534u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC32540(CPUState* cpu) { - cpu->pc = 0xBFC32540u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC32450_cont_BFC32548(CPUState* cpu) { - cpu->pc = 0xBFC32548u; - SCPH1001_func_1FC32450(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3258C(CPUState* cpu) { - cpu->pc = 0xBFC3258Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC325A8(CPUState* cpu) { - cpu->pc = 0xBFC325A8u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC325B0(CPUState* cpu) { - cpu->pc = 0xBFC325B0u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC325C8(CPUState* cpu) { - cpu->pc = 0xBFC325C8u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC325E4(CPUState* cpu) { - cpu->pc = 0xBFC325E4u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC325EC(CPUState* cpu) { - cpu->pc = 0xBFC325ECu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32604(CPUState* cpu) { - cpu->pc = 0xBFC32604u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3260C(CPUState* cpu) { - cpu->pc = 0xBFC3260Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32624(CPUState* cpu) { - cpu->pc = 0xBFC32624u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3262C(CPUState* cpu) { - cpu->pc = 0xBFC3262Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32644(CPUState* cpu) { - cpu->pc = 0xBFC32644u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3264C(CPUState* cpu) { - cpu->pc = 0xBFC3264Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3265C(CPUState* cpu) { - cpu->pc = 0xBFC3265Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32660(CPUState* cpu) { - cpu->pc = 0xBFC32660u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3266C(CPUState* cpu) { - cpu->pc = 0xBFC3266Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32674(CPUState* cpu) { - cpu->pc = 0xBFC32674u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3267C(CPUState* cpu) { - cpu->pc = 0xBFC3267Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3268C(CPUState* cpu) { - cpu->pc = 0xBFC3268Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC32690(CPUState* cpu) { - cpu->pc = 0xBFC32690u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC3269C(CPUState* cpu) { - cpu->pc = 0xBFC3269Cu; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC326C0(CPUState* cpu) { - cpu->pc = 0xBFC326C0u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC326D0(CPUState* cpu) { - cpu->pc = 0xBFC326D0u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC326E8(CPUState* cpu) { - cpu->pc = 0xBFC326E8u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC326F0(CPUState* cpu) { - cpu->pc = 0xBFC326F0u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC3255C_cont_BFC326F8(CPUState* cpu) { - cpu->pc = 0xBFC326F8u; - SCPH1001_func_1FC3255C(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC32758(CPUState* cpu) { - cpu->pc = 0xBFC32758u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC32764(CPUState* cpu) { - cpu->pc = 0xBFC32764u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC3278C(CPUState* cpu) { - cpu->pc = 0xBFC3278Cu; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC327C4(CPUState* cpu) { - cpu->pc = 0xBFC327C4u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC327CC(CPUState* cpu) { - cpu->pc = 0xBFC327CCu; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC327E0(CPUState* cpu) { - cpu->pc = 0xBFC327E0u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC327F4(CPUState* cpu) { - cpu->pc = 0xBFC327F4u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC327F8(CPUState* cpu) { - cpu->pc = 0xBFC327F8u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC32800(CPUState* cpu) { - cpu->pc = 0xBFC32800u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32724_cont_BFC32808(CPUState* cpu) { - cpu->pc = 0xBFC32808u; - SCPH1001_func_1FC32724(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC3285C(CPUState* cpu) { - cpu->pc = 0xBFC3285Cu; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC3286C(CPUState* cpu) { - cpu->pc = 0xBFC3286Cu; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC32874(CPUState* cpu) { - cpu->pc = 0xBFC32874u; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC328BC(CPUState* cpu) { - cpu->pc = 0xBFC328BCu; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC328C0(CPUState* cpu) { - cpu->pc = 0xBFC328C0u; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC32820_cont_BFC328CC(CPUState* cpu) { - cpu->pc = 0xBFC328CCu; - SCPH1001_func_1FC32820(cpu); -} - -void SCPH1001_func_1FC328F4_cont_BFC3291C(CPUState* cpu) { - cpu->pc = 0xBFC3291Cu; - SCPH1001_func_1FC328F4(cpu); -} - -void SCPH1001_func_1FC328F4_cont_BFC32934(CPUState* cpu) { - cpu->pc = 0xBFC32934u; - SCPH1001_func_1FC328F4(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC3294C(CPUState* cpu) { - cpu->pc = 0xBFC3294Cu; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC3296C(CPUState* cpu) { - cpu->pc = 0xBFC3296Cu; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC32988(CPUState* cpu) { - cpu->pc = 0xBFC32988u; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC329A8(CPUState* cpu) { - cpu->pc = 0xBFC329A8u; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC329B0(CPUState* cpu) { - cpu->pc = 0xBFC329B0u; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC329B8(CPUState* cpu) { - cpu->pc = 0xBFC329B8u; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC32944_cont_BFC329C0(CPUState* cpu) { - cpu->pc = 0xBFC329C0u; - SCPH1001_func_1FC32944(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32A44(CPUState* cpu) { - cpu->pc = 0xBFC32A44u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32A48(CPUState* cpu) { - cpu->pc = 0xBFC32A48u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32A50(CPUState* cpu) { - cpu->pc = 0xBFC32A50u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32A5C(CPUState* cpu) { - cpu->pc = 0xBFC32A5Cu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32A6C(CPUState* cpu) { - cpu->pc = 0xBFC32A6Cu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AA4(CPUState* cpu) { - cpu->pc = 0xBFC32AA4u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AA8(CPUState* cpu) { - cpu->pc = 0xBFC32AA8u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AB8(CPUState* cpu) { - cpu->pc = 0xBFC32AB8u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32ABC(CPUState* cpu) { - cpu->pc = 0xBFC32ABCu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AC4(CPUState* cpu) { - cpu->pc = 0xBFC32AC4u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AEC(CPUState* cpu) { - cpu->pc = 0xBFC32AECu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AF0(CPUState* cpu) { - cpu->pc = 0xBFC32AF0u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32AF4(CPUState* cpu) { - cpu->pc = 0xBFC32AF4u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32B0C(CPUState* cpu) { - cpu->pc = 0xBFC32B0Cu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32B18(CPUState* cpu) { - cpu->pc = 0xBFC32B18u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32B1C(CPUState* cpu) { - cpu->pc = 0xBFC32B1Cu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32C30(CPUState* cpu) { - cpu->pc = 0xBFC32C30u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32C50(CPUState* cpu) { - cpu->pc = 0xBFC32C50u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32C90(CPUState* cpu) { - cpu->pc = 0xBFC32C90u; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC329F0_cont_BFC32C9C(CPUState* cpu) { - cpu->pc = 0xBFC32C9Cu; - SCPH1001_func_1FC329F0(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D0C(CPUState* cpu) { - cpu->pc = 0xBFC32D0Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D18(CPUState* cpu) { - cpu->pc = 0xBFC32D18u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D20(CPUState* cpu) { - cpu->pc = 0xBFC32D20u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D3C(CPUState* cpu) { - cpu->pc = 0xBFC32D3Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D44(CPUState* cpu) { - cpu->pc = 0xBFC32D44u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D54(CPUState* cpu) { - cpu->pc = 0xBFC32D54u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D58(CPUState* cpu) { - cpu->pc = 0xBFC32D58u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D64(CPUState* cpu) { - cpu->pc = 0xBFC32D64u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D6C(CPUState* cpu) { - cpu->pc = 0xBFC32D6Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D70(CPUState* cpu) { - cpu->pc = 0xBFC32D70u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D78(CPUState* cpu) { - cpu->pc = 0xBFC32D78u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D80(CPUState* cpu) { - cpu->pc = 0xBFC32D80u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D94(CPUState* cpu) { - cpu->pc = 0xBFC32D94u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32D98(CPUState* cpu) { - cpu->pc = 0xBFC32D98u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DA4(CPUState* cpu) { - cpu->pc = 0xBFC32DA4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DAC(CPUState* cpu) { - cpu->pc = 0xBFC32DACu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DB0(CPUState* cpu) { - cpu->pc = 0xBFC32DB0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DB8(CPUState* cpu) { - cpu->pc = 0xBFC32DB8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DC0(CPUState* cpu) { - cpu->pc = 0xBFC32DC0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DD0(CPUState* cpu) { - cpu->pc = 0xBFC32DD0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DD4(CPUState* cpu) { - cpu->pc = 0xBFC32DD4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DE0(CPUState* cpu) { - cpu->pc = 0xBFC32DE0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DE8(CPUState* cpu) { - cpu->pc = 0xBFC32DE8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DEC(CPUState* cpu) { - cpu->pc = 0xBFC32DECu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32DF4(CPUState* cpu) { - cpu->pc = 0xBFC32DF4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E04(CPUState* cpu) { - cpu->pc = 0xBFC32E04u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E08(CPUState* cpu) { - cpu->pc = 0xBFC32E08u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E14(CPUState* cpu) { - cpu->pc = 0xBFC32E14u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E1C(CPUState* cpu) { - cpu->pc = 0xBFC32E1Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E20(CPUState* cpu) { - cpu->pc = 0xBFC32E20u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E28(CPUState* cpu) { - cpu->pc = 0xBFC32E28u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E30(CPUState* cpu) { - cpu->pc = 0xBFC32E30u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E44(CPUState* cpu) { - cpu->pc = 0xBFC32E44u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E48(CPUState* cpu) { - cpu->pc = 0xBFC32E48u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E54(CPUState* cpu) { - cpu->pc = 0xBFC32E54u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E5C(CPUState* cpu) { - cpu->pc = 0xBFC32E5Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E60(CPUState* cpu) { - cpu->pc = 0xBFC32E60u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E68(CPUState* cpu) { - cpu->pc = 0xBFC32E68u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E70(CPUState* cpu) { - cpu->pc = 0xBFC32E70u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E80(CPUState* cpu) { - cpu->pc = 0xBFC32E80u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E84(CPUState* cpu) { - cpu->pc = 0xBFC32E84u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E90(CPUState* cpu) { - cpu->pc = 0xBFC32E90u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E98(CPUState* cpu) { - cpu->pc = 0xBFC32E98u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32E9C(CPUState* cpu) { - cpu->pc = 0xBFC32E9Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32EA0(CPUState* cpu) { - cpu->pc = 0xBFC32EA0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32EB0(CPUState* cpu) { - cpu->pc = 0xBFC32EB0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32EBC(CPUState* cpu) { - cpu->pc = 0xBFC32EBCu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32ECC(CPUState* cpu) { - cpu->pc = 0xBFC32ECCu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32ED4(CPUState* cpu) { - cpu->pc = 0xBFC32ED4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F0C(CPUState* cpu) { - cpu->pc = 0xBFC32F0Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F10(CPUState* cpu) { - cpu->pc = 0xBFC32F10u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F1C(CPUState* cpu) { - cpu->pc = 0xBFC32F1Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F20(CPUState* cpu) { - cpu->pc = 0xBFC32F20u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F2C(CPUState* cpu) { - cpu->pc = 0xBFC32F2Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F30(CPUState* cpu) { - cpu->pc = 0xBFC32F30u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F3C(CPUState* cpu) { - cpu->pc = 0xBFC32F3Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F40(CPUState* cpu) { - cpu->pc = 0xBFC32F40u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F44(CPUState* cpu) { - cpu->pc = 0xBFC32F44u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F4C(CPUState* cpu) { - cpu->pc = 0xBFC32F4Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F5C(CPUState* cpu) { - cpu->pc = 0xBFC32F5Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F60(CPUState* cpu) { - cpu->pc = 0xBFC32F60u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F6C(CPUState* cpu) { - cpu->pc = 0xBFC32F6Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F74(CPUState* cpu) { - cpu->pc = 0xBFC32F74u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F78(CPUState* cpu) { - cpu->pc = 0xBFC32F78u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F80(CPUState* cpu) { - cpu->pc = 0xBFC32F80u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F88(CPUState* cpu) { - cpu->pc = 0xBFC32F88u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32F9C(CPUState* cpu) { - cpu->pc = 0xBFC32F9Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FA0(CPUState* cpu) { - cpu->pc = 0xBFC32FA0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FAC(CPUState* cpu) { - cpu->pc = 0xBFC32FACu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FB4(CPUState* cpu) { - cpu->pc = 0xBFC32FB4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FB8(CPUState* cpu) { - cpu->pc = 0xBFC32FB8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FC0(CPUState* cpu) { - cpu->pc = 0xBFC32FC0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FC8(CPUState* cpu) { - cpu->pc = 0xBFC32FC8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FD8(CPUState* cpu) { - cpu->pc = 0xBFC32FD8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FDC(CPUState* cpu) { - cpu->pc = 0xBFC32FDCu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FE8(CPUState* cpu) { - cpu->pc = 0xBFC32FE8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FF0(CPUState* cpu) { - cpu->pc = 0xBFC32FF0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FF4(CPUState* cpu) { - cpu->pc = 0xBFC32FF4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC32FFC(CPUState* cpu) { - cpu->pc = 0xBFC32FFCu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3300C(CPUState* cpu) { - cpu->pc = 0xBFC3300Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33010(CPUState* cpu) { - cpu->pc = 0xBFC33010u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3301C(CPUState* cpu) { - cpu->pc = 0xBFC3301Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33024(CPUState* cpu) { - cpu->pc = 0xBFC33024u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33028(CPUState* cpu) { - cpu->pc = 0xBFC33028u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33030(CPUState* cpu) { - cpu->pc = 0xBFC33030u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33038(CPUState* cpu) { - cpu->pc = 0xBFC33038u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3304C(CPUState* cpu) { - cpu->pc = 0xBFC3304Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33050(CPUState* cpu) { - cpu->pc = 0xBFC33050u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3305C(CPUState* cpu) { - cpu->pc = 0xBFC3305Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33064(CPUState* cpu) { - cpu->pc = 0xBFC33064u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33068(CPUState* cpu) { - cpu->pc = 0xBFC33068u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33070(CPUState* cpu) { - cpu->pc = 0xBFC33070u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33078(CPUState* cpu) { - cpu->pc = 0xBFC33078u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33088(CPUState* cpu) { - cpu->pc = 0xBFC33088u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3308C(CPUState* cpu) { - cpu->pc = 0xBFC3308Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33098(CPUState* cpu) { - cpu->pc = 0xBFC33098u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330A0(CPUState* cpu) { - cpu->pc = 0xBFC330A0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330A4(CPUState* cpu) { - cpu->pc = 0xBFC330A4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330A8(CPUState* cpu) { - cpu->pc = 0xBFC330A8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330B8(CPUState* cpu) { - cpu->pc = 0xBFC330B8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330C4(CPUState* cpu) { - cpu->pc = 0xBFC330C4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330D8(CPUState* cpu) { - cpu->pc = 0xBFC330D8u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330E4(CPUState* cpu) { - cpu->pc = 0xBFC330E4u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC330F0(CPUState* cpu) { - cpu->pc = 0xBFC330F0u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33104(CPUState* cpu) { - cpu->pc = 0xBFC33104u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC33114(CPUState* cpu) { - cpu->pc = 0xBFC33114u; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC32CCC_cont_BFC3311C(CPUState* cpu) { - cpu->pc = 0xBFC3311Cu; - SCPH1001_func_1FC32CCC(cpu); -} - -void SCPH1001_func_1FC33138_cont_BFC33148(CPUState* cpu) { - cpu->pc = 0xBFC33148u; - SCPH1001_func_1FC33138(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC331E8(CPUState* cpu) { - cpu->pc = 0xBFC331E8u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC331F0(CPUState* cpu) { - cpu->pc = 0xBFC331F0u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC331F4(CPUState* cpu) { - cpu->pc = 0xBFC331F4u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33208(CPUState* cpu) { - cpu->pc = 0xBFC33208u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33210(CPUState* cpu) { - cpu->pc = 0xBFC33210u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33214(CPUState* cpu) { - cpu->pc = 0xBFC33214u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33220(CPUState* cpu) { - cpu->pc = 0xBFC33220u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33228(CPUState* cpu) { - cpu->pc = 0xBFC33228u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3322C(CPUState* cpu) { - cpu->pc = 0xBFC3322Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33238(CPUState* cpu) { - cpu->pc = 0xBFC33238u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33240(CPUState* cpu) { - cpu->pc = 0xBFC33240u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33244(CPUState* cpu) { - cpu->pc = 0xBFC33244u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33250(CPUState* cpu) { - cpu->pc = 0xBFC33250u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3325C(CPUState* cpu) { - cpu->pc = 0xBFC3325Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33268(CPUState* cpu) { - cpu->pc = 0xBFC33268u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3327C(CPUState* cpu) { - cpu->pc = 0xBFC3327Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3328C(CPUState* cpu) { - cpu->pc = 0xBFC3328Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3329C(CPUState* cpu) { - cpu->pc = 0xBFC3329Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332B4(CPUState* cpu) { - cpu->pc = 0xBFC332B4u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332C0(CPUState* cpu) { - cpu->pc = 0xBFC332C0u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332C4(CPUState* cpu) { - cpu->pc = 0xBFC332C4u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332CC(CPUState* cpu) { - cpu->pc = 0xBFC332CCu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332D8(CPUState* cpu) { - cpu->pc = 0xBFC332D8u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332EC(CPUState* cpu) { - cpu->pc = 0xBFC332ECu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC332FC(CPUState* cpu) { - cpu->pc = 0xBFC332FCu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3330C(CPUState* cpu) { - cpu->pc = 0xBFC3330Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33324(CPUState* cpu) { - cpu->pc = 0xBFC33324u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC3332C(CPUState* cpu) { - cpu->pc = 0xBFC3332Cu; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC331A0_cont_BFC33330(CPUState* cpu) { - cpu->pc = 0xBFC33330u; - SCPH1001_func_1FC331A0(cpu); -} - -void SCPH1001_func_1FC33358_cont_BFC33398(CPUState* cpu) { - cpu->pc = 0xBFC33398u; - SCPH1001_func_1FC33358(cpu); -} - -void SCPH1001_func_1FC33358_cont_BFC333BC(CPUState* cpu) { - cpu->pc = 0xBFC333BCu; - SCPH1001_func_1FC33358(cpu); -} - -void SCPH1001_func_1FC33358_cont_BFC333E0(CPUState* cpu) { - cpu->pc = 0xBFC333E0u; - SCPH1001_func_1FC33358(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33438(CPUState* cpu) { - cpu->pc = 0xBFC33438u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33460(CPUState* cpu) { - cpu->pc = 0xBFC33460u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33468(CPUState* cpu) { - cpu->pc = 0xBFC33468u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33478(CPUState* cpu) { - cpu->pc = 0xBFC33478u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC3347C(CPUState* cpu) { - cpu->pc = 0xBFC3347Cu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC3348C(CPUState* cpu) { - cpu->pc = 0xBFC3348Cu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC3349C(CPUState* cpu) { - cpu->pc = 0xBFC3349Cu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334AC(CPUState* cpu) { - cpu->pc = 0xBFC334ACu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334BC(CPUState* cpu) { - cpu->pc = 0xBFC334BCu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334C4(CPUState* cpu) { - cpu->pc = 0xBFC334C4u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334CC(CPUState* cpu) { - cpu->pc = 0xBFC334CCu; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334D0(CPUState* cpu) { - cpu->pc = 0xBFC334D0u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334E0(CPUState* cpu) { - cpu->pc = 0xBFC334E0u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC334F0(CPUState* cpu) { - cpu->pc = 0xBFC334F0u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33504(CPUState* cpu) { - cpu->pc = 0xBFC33504u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33400_cont_BFC33528(CPUState* cpu) { - cpu->pc = 0xBFC33528u; - SCPH1001_func_1FC33400(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3356C(CPUState* cpu) { - cpu->pc = 0xBFC3356Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33574(CPUState* cpu) { - cpu->pc = 0xBFC33574u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33580(CPUState* cpu) { - cpu->pc = 0xBFC33580u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33588(CPUState* cpu) { - cpu->pc = 0xBFC33588u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33594(CPUState* cpu) { - cpu->pc = 0xBFC33594u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3359C(CPUState* cpu) { - cpu->pc = 0xBFC3359Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335A8(CPUState* cpu) { - cpu->pc = 0xBFC335A8u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335B0(CPUState* cpu) { - cpu->pc = 0xBFC335B0u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335BC(CPUState* cpu) { - cpu->pc = 0xBFC335BCu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335C0(CPUState* cpu) { - cpu->pc = 0xBFC335C0u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335CC(CPUState* cpu) { - cpu->pc = 0xBFC335CCu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335D4(CPUState* cpu) { - cpu->pc = 0xBFC335D4u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335E0(CPUState* cpu) { - cpu->pc = 0xBFC335E0u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335E4(CPUState* cpu) { - cpu->pc = 0xBFC335E4u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC335F8(CPUState* cpu) { - cpu->pc = 0xBFC335F8u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33600(CPUState* cpu) { - cpu->pc = 0xBFC33600u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3360C(CPUState* cpu) { - cpu->pc = 0xBFC3360Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33614(CPUState* cpu) { - cpu->pc = 0xBFC33614u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33620(CPUState* cpu) { - cpu->pc = 0xBFC33620u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33628(CPUState* cpu) { - cpu->pc = 0xBFC33628u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33634(CPUState* cpu) { - cpu->pc = 0xBFC33634u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33638(CPUState* cpu) { - cpu->pc = 0xBFC33638u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33644(CPUState* cpu) { - cpu->pc = 0xBFC33644u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3364C(CPUState* cpu) { - cpu->pc = 0xBFC3364Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3365C(CPUState* cpu) { - cpu->pc = 0xBFC3365Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33660(CPUState* cpu) { - cpu->pc = 0xBFC33660u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33674(CPUState* cpu) { - cpu->pc = 0xBFC33674u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3367C(CPUState* cpu) { - cpu->pc = 0xBFC3367Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33684(CPUState* cpu) { - cpu->pc = 0xBFC33684u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3368C(CPUState* cpu) { - cpu->pc = 0xBFC3368Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC33698(CPUState* cpu) { - cpu->pc = 0xBFC33698u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC3369C(CPUState* cpu) { - cpu->pc = 0xBFC3369Cu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336A8(CPUState* cpu) { - cpu->pc = 0xBFC336A8u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336AC(CPUState* cpu) { - cpu->pc = 0xBFC336ACu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336BC(CPUState* cpu) { - cpu->pc = 0xBFC336BCu; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336C4(CPUState* cpu) { - cpu->pc = 0xBFC336C4u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336D0(CPUState* cpu) { - cpu->pc = 0xBFC336D0u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336D4(CPUState* cpu) { - cpu->pc = 0xBFC336D4u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336E0(CPUState* cpu) { - cpu->pc = 0xBFC336E0u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC33538_cont_BFC336E4(CPUState* cpu) { - cpu->pc = 0xBFC336E4u; - SCPH1001_func_1FC33538(cpu); -} - -void SCPH1001_func_1FC339F0_cont_BFC33A58(CPUState* cpu) { - cpu->pc = 0xBFC33A58u; - SCPH1001_func_1FC339F0(cpu); -} - -void SCPH1001_func_1FC33AB8_cont_BFC33B20(CPUState* cpu) { - cpu->pc = 0xBFC33B20u; - SCPH1001_func_1FC33AB8(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33B9C(CPUState* cpu) { - cpu->pc = 0xBFC33B9Cu; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33BC0(CPUState* cpu) { - cpu->pc = 0xBFC33BC0u; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33BC8(CPUState* cpu) { - cpu->pc = 0xBFC33BC8u; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33BCC(CPUState* cpu) { - cpu->pc = 0xBFC33BCCu; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33BD4(CPUState* cpu) { - cpu->pc = 0xBFC33BD4u; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33B80_cont_BFC33BFC(CPUState* cpu) { - cpu->pc = 0xBFC33BFCu; - SCPH1001_func_1FC33B80(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C20(CPUState* cpu) { - cpu->pc = 0xBFC33C20u; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C44(CPUState* cpu) { - cpu->pc = 0xBFC33C44u; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C4C(CPUState* cpu) { - cpu->pc = 0xBFC33C4Cu; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C50(CPUState* cpu) { - cpu->pc = 0xBFC33C50u; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C58(CPUState* cpu) { - cpu->pc = 0xBFC33C58u; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C04_cont_BFC33C78(CPUState* cpu) { - cpu->pc = 0xBFC33C78u; - SCPH1001_func_1FC33C04(cpu); -} - -void SCPH1001_func_1FC33C98_cont_BFC33CB4(CPUState* cpu) { - cpu->pc = 0xBFC33CB4u; - SCPH1001_func_1FC33C98(cpu); -} - -void SCPH1001_func_1FC33C98_cont_BFC33CBC(CPUState* cpu) { - cpu->pc = 0xBFC33CBCu; - SCPH1001_func_1FC33C98(cpu); -} - -void SCPH1001_func_1FC33CC0_cont_BFC33CE0(CPUState* cpu) { - cpu->pc = 0xBFC33CE0u; - SCPH1001_func_1FC33CC0(cpu); -} - -void SCPH1001_func_1FC33CC0_cont_BFC33CE8(CPUState* cpu) { - cpu->pc = 0xBFC33CE8u; - SCPH1001_func_1FC33CC0(cpu); -} - -void SCPH1001_func_1FC33CC0_cont_BFC33CEC(CPUState* cpu) { - cpu->pc = 0xBFC33CECu; - SCPH1001_func_1FC33CC0(cpu); -} - -void SCPH1001_func_1FC33CC0_cont_BFC33CF4(CPUState* cpu) { - cpu->pc = 0xBFC33CF4u; - SCPH1001_func_1FC33CC0(cpu); -} - -void SCPH1001_func_1FC33D24_cont_BFC33D30(CPUState* cpu) { - cpu->pc = 0xBFC33D30u; - SCPH1001_func_1FC33D24(cpu); -} - -void SCPH1001_func_1FC33D24_cont_BFC33D9C(CPUState* cpu) { - cpu->pc = 0xBFC33D9Cu; - SCPH1001_func_1FC33D24(cpu); -} - -void SCPH1001_func_1FC34110_cont_BFC34120(CPUState* cpu) { - cpu->pc = 0xBFC34120u; - SCPH1001_func_1FC34110(cpu); -} - -void SCPH1001_func_1FC34110_cont_BFC34130(CPUState* cpu) { - cpu->pc = 0xBFC34130u; - SCPH1001_func_1FC34110(cpu); -} - -void SCPH1001_func_1FC34110_cont_BFC34148(CPUState* cpu) { - cpu->pc = 0xBFC34148u; - SCPH1001_func_1FC34110(cpu); -} - -void SCPH1001_func_1FC34110_cont_BFC34158(CPUState* cpu) { - cpu->pc = 0xBFC34158u; - SCPH1001_func_1FC34110(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC34188(CPUState* cpu) { - cpu->pc = 0xBFC34188u; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC34194(CPUState* cpu) { - cpu->pc = 0xBFC34194u; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC341A0(CPUState* cpu) { - cpu->pc = 0xBFC341A0u; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC341B0(CPUState* cpu) { - cpu->pc = 0xBFC341B0u; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC341C4(CPUState* cpu) { - cpu->pc = 0xBFC341C4u; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34160_cont_BFC341DC(CPUState* cpu) { - cpu->pc = 0xBFC341DCu; - SCPH1001_func_1FC34160(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC3432C(CPUState* cpu) { - cpu->pc = 0xBFC3432Cu; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC34338(CPUState* cpu) { - cpu->pc = 0xBFC34338u; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC34344(CPUState* cpu) { - cpu->pc = 0xBFC34344u; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC34354(CPUState* cpu) { - cpu->pc = 0xBFC34354u; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC34368(CPUState* cpu) { - cpu->pc = 0xBFC34368u; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC34304_cont_BFC34380(CPUState* cpu) { - cpu->pc = 0xBFC34380u; - SCPH1001_func_1FC34304(cpu); -} - -void SCPH1001_func_1FC344A4_cont_BFC344BC(CPUState* cpu) { - cpu->pc = 0xBFC344BCu; - SCPH1001_func_1FC344A4(cpu); -} - -void SCPH1001_func_1FC344A4_cont_BFC344D0(CPUState* cpu) { - cpu->pc = 0xBFC344D0u; - SCPH1001_func_1FC344A4(cpu); -} - -void SCPH1001_func_1FC345F4_cont_BFC3460C(CPUState* cpu) { - cpu->pc = 0xBFC3460Cu; - SCPH1001_func_1FC345F4(cpu); -} - -void SCPH1001_func_1FC345F4_cont_BFC34620(CPUState* cpu) { - cpu->pc = 0xBFC34620u; - SCPH1001_func_1FC345F4(cpu); -} - -void SCPH1001_func_1FC34748_cont_BFC34760(CPUState* cpu) { - cpu->pc = 0xBFC34760u; - SCPH1001_func_1FC34748(cpu); -} - -void SCPH1001_func_1FC34748_cont_BFC34774(CPUState* cpu) { - cpu->pc = 0xBFC34774u; - SCPH1001_func_1FC34748(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348A8(CPUState* cpu) { - cpu->pc = 0xBFC348A8u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348B4(CPUState* cpu) { - cpu->pc = 0xBFC348B4u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348BC(CPUState* cpu) { - cpu->pc = 0xBFC348BCu; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348C0(CPUState* cpu) { - cpu->pc = 0xBFC348C0u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348C8(CPUState* cpu) { - cpu->pc = 0xBFC348C8u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348D0(CPUState* cpu) { - cpu->pc = 0xBFC348D0u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348D8(CPUState* cpu) { - cpu->pc = 0xBFC348D8u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348E0(CPUState* cpu) { - cpu->pc = 0xBFC348E0u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348E4(CPUState* cpu) { - cpu->pc = 0xBFC348E4u; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC34898_cont_BFC348EC(CPUState* cpu) { - cpu->pc = 0xBFC348ECu; - SCPH1001_func_1FC34898(cpu); -} - -void SCPH1001_func_1FC348FC_cont_BFC34904(CPUState* cpu) { - cpu->pc = 0xBFC34904u; - SCPH1001_func_1FC348FC(cpu); -} - -void SCPH1001_func_1FC348FC_cont_BFC3490C(CPUState* cpu) { - cpu->pc = 0xBFC3490Cu; - SCPH1001_func_1FC348FC(cpu); -} - -void SCPH1001_func_1FC34928_cont_BFC34930(CPUState* cpu) { - cpu->pc = 0xBFC34930u; - SCPH1001_func_1FC34928(cpu); -} - -void SCPH1001_func_1FC34928_cont_BFC34938(CPUState* cpu) { - cpu->pc = 0xBFC34938u; - SCPH1001_func_1FC34928(cpu); -} - -void SCPH1001_func_1FC34958_cont_BFC34960(CPUState* cpu) { - cpu->pc = 0xBFC34960u; - SCPH1001_func_1FC34958(cpu); -} - -void SCPH1001_func_1FC34958_cont_BFC34968(CPUState* cpu) { - cpu->pc = 0xBFC34968u; - SCPH1001_func_1FC34958(cpu); -} - -void SCPH1001_func_1FC34984_cont_BFC3498C(CPUState* cpu) { - cpu->pc = 0xBFC3498Cu; - SCPH1001_func_1FC34984(cpu); -} - -void SCPH1001_func_1FC34984_cont_BFC34994(CPUState* cpu) { - cpu->pc = 0xBFC34994u; - SCPH1001_func_1FC34984(cpu); -} - -void SCPH1001_func_1FC34984_cont_BFC349B0(CPUState* cpu) { - cpu->pc = 0xBFC349B0u; - SCPH1001_func_1FC34984(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349C0(CPUState* cpu) { - cpu->pc = 0xBFC349C0u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349C4(CPUState* cpu) { - cpu->pc = 0xBFC349C4u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349CC(CPUState* cpu) { - cpu->pc = 0xBFC349CCu; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349D4(CPUState* cpu) { - cpu->pc = 0xBFC349D4u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349D8(CPUState* cpu) { - cpu->pc = 0xBFC349D8u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349E0(CPUState* cpu) { - cpu->pc = 0xBFC349E0u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC349B8_cont_BFC349E8(CPUState* cpu) { - cpu->pc = 0xBFC349E8u; - SCPH1001_func_1FC349B8(cpu); -} - -void SCPH1001_func_1FC34A08_cont_BFC34A10(CPUState* cpu) { - cpu->pc = 0xBFC34A10u; - SCPH1001_func_1FC34A08(cpu); -} - -void SCPH1001_func_1FC34A08_cont_BFC34A18(CPUState* cpu) { - cpu->pc = 0xBFC34A18u; - SCPH1001_func_1FC34A08(cpu); -} - -void SCPH1001_func_1FC34A34_cont_BFC34A3C(CPUState* cpu) { - cpu->pc = 0xBFC34A3Cu; - SCPH1001_func_1FC34A34(cpu); -} - -void SCPH1001_func_1FC34A34_cont_BFC34A44(CPUState* cpu) { - cpu->pc = 0xBFC34A44u; - SCPH1001_func_1FC34A34(cpu); -} - -void SCPH1001_func_1FC34A64_cont_BFC34A6C(CPUState* cpu) { - cpu->pc = 0xBFC34A6Cu; - SCPH1001_func_1FC34A64(cpu); -} - -void SCPH1001_func_1FC34A64_cont_BFC34A74(CPUState* cpu) { - cpu->pc = 0xBFC34A74u; - SCPH1001_func_1FC34A64(cpu); -} - -void SCPH1001_func_1FC34A64_cont_BFC34A88(CPUState* cpu) { - cpu->pc = 0xBFC34A88u; - SCPH1001_func_1FC34A64(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AB4(CPUState* cpu) { - cpu->pc = 0xBFC34AB4u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AB8(CPUState* cpu) { - cpu->pc = 0xBFC34AB8u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AC4(CPUState* cpu) { - cpu->pc = 0xBFC34AC4u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34ACC(CPUState* cpu) { - cpu->pc = 0xBFC34ACCu; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AD0(CPUState* cpu) { - cpu->pc = 0xBFC34AD0u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AD8(CPUState* cpu) { - cpu->pc = 0xBFC34AD8u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34AA0_cont_BFC34AE0(CPUState* cpu) { - cpu->pc = 0xBFC34AE0u; - SCPH1001_func_1FC34AA0(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B1C(CPUState* cpu) { - cpu->pc = 0xBFC34B1Cu; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B20(CPUState* cpu) { - cpu->pc = 0xBFC34B20u; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B2C(CPUState* cpu) { - cpu->pc = 0xBFC34B2Cu; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B34(CPUState* cpu) { - cpu->pc = 0xBFC34B34u; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B38(CPUState* cpu) { - cpu->pc = 0xBFC34B38u; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B40(CPUState* cpu) { - cpu->pc = 0xBFC34B40u; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B08_cont_BFC34B48(CPUState* cpu) { - cpu->pc = 0xBFC34B48u; - SCPH1001_func_1FC34B08(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34CC8(CPUState* cpu) { - cpu->pc = 0xBFC34CC8u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34CD0(CPUState* cpu) { - cpu->pc = 0xBFC34CD0u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34CE0(CPUState* cpu) { - cpu->pc = 0xBFC34CE0u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34CE8(CPUState* cpu) { - cpu->pc = 0xBFC34CE8u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34CF4(CPUState* cpu) { - cpu->pc = 0xBFC34CF4u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D04(CPUState* cpu) { - cpu->pc = 0xBFC34D04u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D24(CPUState* cpu) { - cpu->pc = 0xBFC34D24u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D2C(CPUState* cpu) { - cpu->pc = 0xBFC34D2Cu; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D40(CPUState* cpu) { - cpu->pc = 0xBFC34D40u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D54(CPUState* cpu) { - cpu->pc = 0xBFC34D54u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D60(CPUState* cpu) { - cpu->pc = 0xBFC34D60u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D70(CPUState* cpu) { - cpu->pc = 0xBFC34D70u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D80(CPUState* cpu) { - cpu->pc = 0xBFC34D80u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34D9C(CPUState* cpu) { - cpu->pc = 0xBFC34D9Cu; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34DC8(CPUState* cpu) { - cpu->pc = 0xBFC34DC8u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34B58_cont_BFC34DF0(CPUState* cpu) { - cpu->pc = 0xBFC34DF0u; - SCPH1001_func_1FC34B58(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E18(CPUState* cpu) { - cpu->pc = 0xBFC34E18u; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E28(CPUState* cpu) { - cpu->pc = 0xBFC34E28u; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E34(CPUState* cpu) { - cpu->pc = 0xBFC34E34u; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E58(CPUState* cpu) { - cpu->pc = 0xBFC34E58u; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E80(CPUState* cpu) { - cpu->pc = 0xBFC34E80u; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34E00_cont_BFC34E8C(CPUState* cpu) { - cpu->pc = 0xBFC34E8Cu; - SCPH1001_func_1FC34E00(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F38(CPUState* cpu) { - cpu->pc = 0xBFC34F38u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F40(CPUState* cpu) { - cpu->pc = 0xBFC34F40u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F50(CPUState* cpu) { - cpu->pc = 0xBFC34F50u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F60(CPUState* cpu) { - cpu->pc = 0xBFC34F60u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F70(CPUState* cpu) { - cpu->pc = 0xBFC34F70u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F80(CPUState* cpu) { - cpu->pc = 0xBFC34F80u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F88(CPUState* cpu) { - cpu->pc = 0xBFC34F88u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F90(CPUState* cpu) { - cpu->pc = 0xBFC34F90u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC34EC4_cont_BFC34F94(CPUState* cpu) { - cpu->pc = 0xBFC34F94u; - SCPH1001_func_1FC34EC4(cpu); -} - -void SCPH1001_func_1FC35B88_cont_BFC35BA0(CPUState* cpu) { - cpu->pc = 0xBFC35BA0u; - SCPH1001_func_1FC35B88(cpu); -} - -void SCPH1001_func_1FC35B88_cont_BFC35BB0(CPUState* cpu) { - cpu->pc = 0xBFC35BB0u; - SCPH1001_func_1FC35B88(cpu); -} - -void SCPH1001_func_1FC35C28_cont_BFC35C3C(CPUState* cpu) { - cpu->pc = 0xBFC35C3Cu; - SCPH1001_func_1FC35C28(cpu); -} - -void SCPH1001_func_1FC35C28_cont_BFC35C4C(CPUState* cpu) { - cpu->pc = 0xBFC35C4Cu; - SCPH1001_func_1FC35C28(cpu); -} - -void SCPH1001_func_1FC363A0_cont_BFC363A8(CPUState* cpu) { - cpu->pc = 0xBFC363A8u; - SCPH1001_func_1FC363A0(cpu); -} - -void SCPH1001_func_1FC363A0_cont_BFC363E8(CPUState* cpu) { - cpu->pc = 0xBFC363E8u; - SCPH1001_func_1FC363A0(cpu); -} - -void SCPH1001_func_1FC363F0_cont_BFC363F8(CPUState* cpu) { - cpu->pc = 0xBFC363F8u; - SCPH1001_func_1FC363F0(cpu); -} - -void SCPH1001_func_1FC363F0_cont_BFC36450(CPUState* cpu) { - cpu->pc = 0xBFC36450u; - SCPH1001_func_1FC363F0(cpu); -} - -void SCPH1001_func_1FC365F8_cont_BFC36654(CPUState* cpu) { - cpu->pc = 0xBFC36654u; - SCPH1001_func_1FC365F8(cpu); -} - -void SCPH1001_func_1FC365F8_cont_BFC3665C(CPUState* cpu) { - cpu->pc = 0xBFC3665Cu; - SCPH1001_func_1FC365F8(cpu); -} - -void SCPH1001_func_1FC365F8_cont_BFC3667C(CPUState* cpu) { - cpu->pc = 0xBFC3667Cu; - SCPH1001_func_1FC365F8(cpu); -} - -void SCPH1001_func_1FC36684_cont_BFC366E0(CPUState* cpu) { - cpu->pc = 0xBFC366E0u; - SCPH1001_func_1FC36684(cpu); -} - -void SCPH1001_func_1FC36684_cont_BFC366E8(CPUState* cpu) { - cpu->pc = 0xBFC366E8u; - SCPH1001_func_1FC36684(cpu); -} - -void SCPH1001_func_1FC36684_cont_BFC36738(CPUState* cpu) { - cpu->pc = 0xBFC36738u; - SCPH1001_func_1FC36684(cpu); -} - -void SCPH1001_func_1FC36740_cont_BFC36798(CPUState* cpu) { - cpu->pc = 0xBFC36798u; - SCPH1001_func_1FC36740(cpu); -} - -void SCPH1001_func_1FC36740_cont_BFC367A0(CPUState* cpu) { - cpu->pc = 0xBFC367A0u; - SCPH1001_func_1FC36740(cpu); -} - -void SCPH1001_func_1FC36740_cont_BFC367CC(CPUState* cpu) { - cpu->pc = 0xBFC367CCu; - SCPH1001_func_1FC36740(cpu); -} - -void SCPH1001_func_1FC367D4_cont_BFC36828(CPUState* cpu) { - cpu->pc = 0xBFC36828u; - SCPH1001_func_1FC367D4(cpu); -} - -void SCPH1001_func_1FC367D4_cont_BFC36830(CPUState* cpu) { - cpu->pc = 0xBFC36830u; - SCPH1001_func_1FC367D4(cpu); -} - -void SCPH1001_func_1FC367D4_cont_BFC36834(CPUState* cpu) { - cpu->pc = 0xBFC36834u; - SCPH1001_func_1FC367D4(cpu); -} - -void SCPH1001_func_1FC367D4_cont_BFC36878(CPUState* cpu) { - cpu->pc = 0xBFC36878u; - SCPH1001_func_1FC367D4(cpu); -} - -void SCPH1001_func_1FC36880_cont_BFC368D8(CPUState* cpu) { - cpu->pc = 0xBFC368D8u; - SCPH1001_func_1FC36880(cpu); -} - -void SCPH1001_func_1FC36880_cont_BFC368E0(CPUState* cpu) { - cpu->pc = 0xBFC368E0u; - SCPH1001_func_1FC36880(cpu); -} - -void SCPH1001_func_1FC36880_cont_BFC36938(CPUState* cpu) { - cpu->pc = 0xBFC36938u; - SCPH1001_func_1FC36880(cpu); -} - -void SCPH1001_func_1FC36A3C_cont_BFC36A94(CPUState* cpu) { - cpu->pc = 0xBFC36A94u; - SCPH1001_func_1FC36A3C(cpu); -} - -void SCPH1001_func_1FC36A3C_cont_BFC36A98(CPUState* cpu) { - cpu->pc = 0xBFC36A98u; - SCPH1001_func_1FC36A3C(cpu); -} - -void SCPH1001_func_1FC36A3C_cont_BFC36A9C(CPUState* cpu) { - cpu->pc = 0xBFC36A9Cu; - SCPH1001_func_1FC36A3C(cpu); -} - -void SCPH1001_func_1FC36A3C_cont_BFC36B0C(CPUState* cpu) { - cpu->pc = 0xBFC36B0Cu; - SCPH1001_func_1FC36A3C(cpu); -} - -void SCPH1001_func_1FC36B14_cont_BFC36B6C(CPUState* cpu) { - cpu->pc = 0xBFC36B6Cu; - SCPH1001_func_1FC36B14(cpu); -} - -void SCPH1001_func_1FC36B14_cont_BFC36B70(CPUState* cpu) { - cpu->pc = 0xBFC36B70u; - SCPH1001_func_1FC36B14(cpu); -} - -void SCPH1001_func_1FC36B14_cont_BFC36B74(CPUState* cpu) { - cpu->pc = 0xBFC36B74u; - SCPH1001_func_1FC36B14(cpu); -} - -void SCPH1001_func_1FC36B14_cont_BFC36BE4(CPUState* cpu) { - cpu->pc = 0xBFC36BE4u; - SCPH1001_func_1FC36B14(cpu); -} - -void SCPH1001_func_1FC36BEC_cont_BFC36C24(CPUState* cpu) { - cpu->pc = 0xBFC36C24u; - SCPH1001_func_1FC36BEC(cpu); -} - -void SCPH1001_func_1FC36BEC_cont_BFC36C34(CPUState* cpu) { - cpu->pc = 0xBFC36C34u; - SCPH1001_func_1FC36BEC(cpu); -} - -void SCPH1001_func_1FC36C60_cont_BFC36C74(CPUState* cpu) { - cpu->pc = 0xBFC36C74u; - SCPH1001_func_1FC36C60(cpu); -} - -void SCPH1001_func_1FC36C60_cont_BFC36C84(CPUState* cpu) { - cpu->pc = 0xBFC36C84u; - SCPH1001_func_1FC36C60(cpu); -} - -void SCPH1001_func_1FC36CA4_cont_BFC36CB8(CPUState* cpu) { - cpu->pc = 0xBFC36CB8u; - SCPH1001_func_1FC36CA4(cpu); -} - -void SCPH1001_func_1FC36CA4_cont_BFC36CC8(CPUState* cpu) { - cpu->pc = 0xBFC36CC8u; - SCPH1001_func_1FC36CA4(cpu); -} - -void SCPH1001_func_1FC36CF0_cont_BFC36D0C(CPUState* cpu) { - cpu->pc = 0xBFC36D0Cu; - SCPH1001_func_1FC36CF0(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36D50(CPUState* cpu) { - cpu->pc = 0xBFC36D50u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36D68(CPUState* cpu) { - cpu->pc = 0xBFC36D68u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36D78(CPUState* cpu) { - cpu->pc = 0xBFC36D78u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36D94(CPUState* cpu) { - cpu->pc = 0xBFC36D94u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36DA0(CPUState* cpu) { - cpu->pc = 0xBFC36DA0u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36DA8(CPUState* cpu) { - cpu->pc = 0xBFC36DA8u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36D48_cont_BFC36DC4(CPUState* cpu) { - cpu->pc = 0xBFC36DC4u; - SCPH1001_func_1FC36D48(cpu); -} - -void SCPH1001_func_1FC36DD0_cont_BFC36DEC(CPUState* cpu) { - cpu->pc = 0xBFC36DECu; - SCPH1001_func_1FC36DD0(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E0C(CPUState* cpu) { - cpu->pc = 0xBFC36E0Cu; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E14(CPUState* cpu) { - cpu->pc = 0xBFC36E14u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E18(CPUState* cpu) { - cpu->pc = 0xBFC36E18u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E34(CPUState* cpu) { - cpu->pc = 0xBFC36E34u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E54(CPUState* cpu) { - cpu->pc = 0xBFC36E54u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E68(CPUState* cpu) { - cpu->pc = 0xBFC36E68u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E80(CPUState* cpu) { - cpu->pc = 0xBFC36E80u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E8C(CPUState* cpu) { - cpu->pc = 0xBFC36E8Cu; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36E94(CPUState* cpu) { - cpu->pc = 0xBFC36E94u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36EB0(CPUState* cpu) { - cpu->pc = 0xBFC36EB0u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36DF8_cont_BFC36EB4(CPUState* cpu) { - cpu->pc = 0xBFC36EB4u; - SCPH1001_func_1FC36DF8(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36EE0(CPUState* cpu) { - cpu->pc = 0xBFC36EE0u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36EE8(CPUState* cpu) { - cpu->pc = 0xBFC36EE8u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36EEC(CPUState* cpu) { - cpu->pc = 0xBFC36EECu; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F08(CPUState* cpu) { - cpu->pc = 0xBFC36F08u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F28(CPUState* cpu) { - cpu->pc = 0xBFC36F28u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F3C(CPUState* cpu) { - cpu->pc = 0xBFC36F3Cu; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F50(CPUState* cpu) { - cpu->pc = 0xBFC36F50u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F5C(CPUState* cpu) { - cpu->pc = 0xBFC36F5Cu; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F60(CPUState* cpu) { - cpu->pc = 0xBFC36F60u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F64(CPUState* cpu) { - cpu->pc = 0xBFC36F64u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F80(CPUState* cpu) { - cpu->pc = 0xBFC36F80u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36EC0_cont_BFC36F84(CPUState* cpu) { - cpu->pc = 0xBFC36F84u; - SCPH1001_func_1FC36EC0(cpu); -} - -void SCPH1001_func_1FC36F90_cont_BFC36FB0(CPUState* cpu) { - cpu->pc = 0xBFC36FB0u; - SCPH1001_func_1FC36F90(cpu); -} - -void SCPH1001_func_1FC36F90_cont_BFC36FD8(CPUState* cpu) { - cpu->pc = 0xBFC36FD8u; - SCPH1001_func_1FC36F90(cpu); -} - -void SCPH1001_func_1FC36F90_cont_BFC36FE0(CPUState* cpu) { - cpu->pc = 0xBFC36FE0u; - SCPH1001_func_1FC36F90(cpu); -} - -void SCPH1001_func_1FC37028_cont_BFC37034(CPUState* cpu) { - cpu->pc = 0xBFC37034u; - SCPH1001_func_1FC37028(cpu); -} - -void SCPH1001_func_1FC37028_cont_BFC3703C(CPUState* cpu) { - cpu->pc = 0xBFC3703Cu; - SCPH1001_func_1FC37028(cpu); -} - -void SCPH1001_func_1FC37028_cont_BFC37044(CPUState* cpu) { - cpu->pc = 0xBFC37044u; - SCPH1001_func_1FC37028(cpu); -} - -void SCPH1001_func_1FC37028_cont_BFC37060(CPUState* cpu) { - cpu->pc = 0xBFC37060u; - SCPH1001_func_1FC37028(cpu); -} - -void SCPH1001_func_1FC37070_cont_BFC37090(CPUState* cpu) { - cpu->pc = 0xBFC37090u; - SCPH1001_func_1FC37070(cpu); -} - -void SCPH1001_func_1FC370A0_cont_BFC370E4(CPUState* cpu) { - cpu->pc = 0xBFC370E4u; - SCPH1001_func_1FC370A0(cpu); -} - -void SCPH1001_func_1FC370F4_cont_BFC37120(CPUState* cpu) { - cpu->pc = 0xBFC37120u; - SCPH1001_func_1FC370F4(cpu); -} - -void SCPH1001_func_1FC37130_cont_BFC3715C(CPUState* cpu) { - cpu->pc = 0xBFC3715Cu; - SCPH1001_func_1FC37130(cpu); -} - -void SCPH1001_func_1FC3716C_cont_BFC371D4(CPUState* cpu) { - cpu->pc = 0xBFC371D4u; - SCPH1001_func_1FC3716C(cpu); -} - -void SCPH1001_func_1FC37334_cont_BFC37358(CPUState* cpu) { - cpu->pc = 0xBFC37358u; - SCPH1001_func_1FC37334(cpu); -} - -void SCPH1001_func_1FC37368_cont_BFC37380(CPUState* cpu) { - cpu->pc = 0xBFC37380u; - SCPH1001_func_1FC37368(cpu); -} - -void SCPH1001_func_1FC37368_cont_BFC37390(CPUState* cpu) { - cpu->pc = 0xBFC37390u; - SCPH1001_func_1FC37368(cpu); -} - -void SCPH1001_func_1FC37368_cont_BFC373AC(CPUState* cpu) { - cpu->pc = 0xBFC373ACu; - SCPH1001_func_1FC37368(cpu); -} - -void SCPH1001_func_1FC37368_cont_BFC373D0(CPUState* cpu) { - cpu->pc = 0xBFC373D0u; - SCPH1001_func_1FC37368(cpu); -} - -void SCPH1001_func_1FC373E0_cont_BFC373F8(CPUState* cpu) { - cpu->pc = 0xBFC373F8u; - SCPH1001_func_1FC373E0(cpu); -} - -void SCPH1001_func_1FC373E0_cont_BFC37400(CPUState* cpu) { - cpu->pc = 0xBFC37400u; - SCPH1001_func_1FC373E0(cpu); -} - -void SCPH1001_func_1FC373E0_cont_BFC37408(CPUState* cpu) { - cpu->pc = 0xBFC37408u; - SCPH1001_func_1FC373E0(cpu); -} - -void SCPH1001_func_1FC373E0_cont_BFC37424(CPUState* cpu) { - cpu->pc = 0xBFC37424u; - SCPH1001_func_1FC373E0(cpu); -} - -void SCPH1001_func_1FC373E0_cont_BFC37428(CPUState* cpu) { - cpu->pc = 0xBFC37428u; - SCPH1001_func_1FC373E0(cpu); -} - -void SCPH1001_func_1FC37434_cont_BFC37458(CPUState* cpu) { - cpu->pc = 0xBFC37458u; - SCPH1001_func_1FC37434(cpu); -} - -void SCPH1001_func_1FC37434_cont_BFC37494(CPUState* cpu) { - cpu->pc = 0xBFC37494u; - SCPH1001_func_1FC37434(cpu); -} - -void SCPH1001_func_1FC37434_cont_BFC374A8(CPUState* cpu) { - cpu->pc = 0xBFC374A8u; - SCPH1001_func_1FC37434(cpu); -} - -void SCPH1001_func_1FC374BC_cont_BFC374DC(CPUState* cpu) { - cpu->pc = 0xBFC374DCu; - SCPH1001_func_1FC374BC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37508(CPUState* cpu) { - cpu->pc = 0xBFC37508u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37518(CPUState* cpu) { - cpu->pc = 0xBFC37518u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37538(CPUState* cpu) { - cpu->pc = 0xBFC37538u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37550(CPUState* cpu) { - cpu->pc = 0xBFC37550u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37570(CPUState* cpu) { - cpu->pc = 0xBFC37570u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375A0(CPUState* cpu) { - cpu->pc = 0xBFC375A0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375A8(CPUState* cpu) { - cpu->pc = 0xBFC375A8u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375AC(CPUState* cpu) { - cpu->pc = 0xBFC375ACu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375C4(CPUState* cpu) { - cpu->pc = 0xBFC375C4u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375CC(CPUState* cpu) { - cpu->pc = 0xBFC375CCu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375D0(CPUState* cpu) { - cpu->pc = 0xBFC375D0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375DC(CPUState* cpu) { - cpu->pc = 0xBFC375DCu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375E4(CPUState* cpu) { - cpu->pc = 0xBFC375E4u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375F0(CPUState* cpu) { - cpu->pc = 0xBFC375F0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375F8(CPUState* cpu) { - cpu->pc = 0xBFC375F8u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC375FC(CPUState* cpu) { - cpu->pc = 0xBFC375FCu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37600(CPUState* cpu) { - cpu->pc = 0xBFC37600u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37610(CPUState* cpu) { - cpu->pc = 0xBFC37610u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37618(CPUState* cpu) { - cpu->pc = 0xBFC37618u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3761C(CPUState* cpu) { - cpu->pc = 0xBFC3761Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37624(CPUState* cpu) { - cpu->pc = 0xBFC37624u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3762C(CPUState* cpu) { - cpu->pc = 0xBFC3762Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37630(CPUState* cpu) { - cpu->pc = 0xBFC37630u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37634(CPUState* cpu) { - cpu->pc = 0xBFC37634u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3763C(CPUState* cpu) { - cpu->pc = 0xBFC3763Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37644(CPUState* cpu) { - cpu->pc = 0xBFC37644u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37648(CPUState* cpu) { - cpu->pc = 0xBFC37648u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37650(CPUState* cpu) { - cpu->pc = 0xBFC37650u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37658(CPUState* cpu) { - cpu->pc = 0xBFC37658u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3765C(CPUState* cpu) { - cpu->pc = 0xBFC3765Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37660(CPUState* cpu) { - cpu->pc = 0xBFC37660u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3766C(CPUState* cpu) { - cpu->pc = 0xBFC3766Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37674(CPUState* cpu) { - cpu->pc = 0xBFC37674u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37678(CPUState* cpu) { - cpu->pc = 0xBFC37678u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37680(CPUState* cpu) { - cpu->pc = 0xBFC37680u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37688(CPUState* cpu) { - cpu->pc = 0xBFC37688u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3768C(CPUState* cpu) { - cpu->pc = 0xBFC3768Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37690(CPUState* cpu) { - cpu->pc = 0xBFC37690u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC376C8(CPUState* cpu) { - cpu->pc = 0xBFC376C8u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37700(CPUState* cpu) { - cpu->pc = 0xBFC37700u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37718(CPUState* cpu) { - cpu->pc = 0xBFC37718u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37720(CPUState* cpu) { - cpu->pc = 0xBFC37720u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37730(CPUState* cpu) { - cpu->pc = 0xBFC37730u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37734(CPUState* cpu) { - cpu->pc = 0xBFC37734u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37744(CPUState* cpu) { - cpu->pc = 0xBFC37744u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37748(CPUState* cpu) { - cpu->pc = 0xBFC37748u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3775C(CPUState* cpu) { - cpu->pc = 0xBFC3775Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37760(CPUState* cpu) { - cpu->pc = 0xBFC37760u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37774(CPUState* cpu) { - cpu->pc = 0xBFC37774u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3777C(CPUState* cpu) { - cpu->pc = 0xBFC3777Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37780(CPUState* cpu) { - cpu->pc = 0xBFC37780u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37788(CPUState* cpu) { - cpu->pc = 0xBFC37788u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37790(CPUState* cpu) { - cpu->pc = 0xBFC37790u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37794(CPUState* cpu) { - cpu->pc = 0xBFC37794u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3779C(CPUState* cpu) { - cpu->pc = 0xBFC3779Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377A4(CPUState* cpu) { - cpu->pc = 0xBFC377A4u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377A8(CPUState* cpu) { - cpu->pc = 0xBFC377A8u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377B0(CPUState* cpu) { - cpu->pc = 0xBFC377B0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377B8(CPUState* cpu) { - cpu->pc = 0xBFC377B8u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377BC(CPUState* cpu) { - cpu->pc = 0xBFC377BCu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377C4(CPUState* cpu) { - cpu->pc = 0xBFC377C4u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377CC(CPUState* cpu) { - cpu->pc = 0xBFC377CCu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377D0(CPUState* cpu) { - cpu->pc = 0xBFC377D0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377E4(CPUState* cpu) { - cpu->pc = 0xBFC377E4u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377EC(CPUState* cpu) { - cpu->pc = 0xBFC377ECu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC377F0(CPUState* cpu) { - cpu->pc = 0xBFC377F0u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC3780C(CPUState* cpu) { - cpu->pc = 0xBFC3780Cu; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC374EC_cont_BFC37824(CPUState* cpu) { - cpu->pc = 0xBFC37824u; - SCPH1001_func_1FC374EC(cpu); -} - -void SCPH1001_func_1FC37838_cont_BFC37858(CPUState* cpu) { - cpu->pc = 0xBFC37858u; - SCPH1001_func_1FC37838(cpu); -} - -void SCPH1001_func_1FC37868_cont_BFC37888(CPUState* cpu) { - cpu->pc = 0xBFC37888u; - SCPH1001_func_1FC37868(cpu); -} - -void SCPH1001_func_1FC37868_cont_BFC37898(CPUState* cpu) { - cpu->pc = 0xBFC37898u; - SCPH1001_func_1FC37868(cpu); -} - -void SCPH1001_func_1FC37868_cont_BFC378A0(CPUState* cpu) { - cpu->pc = 0xBFC378A0u; - SCPH1001_func_1FC37868(cpu); -} - -void SCPH1001_func_1FC37868_cont_BFC378A4(CPUState* cpu) { - cpu->pc = 0xBFC378A4u; - SCPH1001_func_1FC37868(cpu); -} - -void SCPH1001_func_1FC378B4_cont_BFC378E8(CPUState* cpu) { - cpu->pc = 0xBFC378E8u; - SCPH1001_func_1FC378B4(cpu); -} - -void SCPH1001_func_1FC37908_cont_BFC37948(CPUState* cpu) { - cpu->pc = 0xBFC37948u; - SCPH1001_func_1FC37908(cpu); -} - -void SCPH1001_func_1FC37908_cont_BFC3797C(CPUState* cpu) { - cpu->pc = 0xBFC3797Cu; - SCPH1001_func_1FC37908(cpu); -} - -void SCPH1001_func_1FC37998_cont_BFC379D4(CPUState* cpu) { - cpu->pc = 0xBFC379D4u; - SCPH1001_func_1FC37998(cpu); -} - -void SCPH1001_func_1FC37A4C_cont_BFC37A90(CPUState* cpu) { - cpu->pc = 0xBFC37A90u; - SCPH1001_func_1FC37A4C(cpu); -} - -void SCPH1001_func_1FC37A4C_cont_BFC37AA8(CPUState* cpu) { - cpu->pc = 0xBFC37AA8u; - SCPH1001_func_1FC37A4C(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37AF0(CPUState* cpu) { - cpu->pc = 0xBFC37AF0u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37B1C(CPUState* cpu) { - cpu->pc = 0xBFC37B1Cu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37B40(CPUState* cpu) { - cpu->pc = 0xBFC37B40u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37B64(CPUState* cpu) { - cpu->pc = 0xBFC37B64u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37B80(CPUState* cpu) { - cpu->pc = 0xBFC37B80u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37BA8(CPUState* cpu) { - cpu->pc = 0xBFC37BA8u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37BE0(CPUState* cpu) { - cpu->pc = 0xBFC37BE0u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37BE8(CPUState* cpu) { - cpu->pc = 0xBFC37BE8u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37BEC(CPUState* cpu) { - cpu->pc = 0xBFC37BECu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37BFC(CPUState* cpu) { - cpu->pc = 0xBFC37BFCu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C04(CPUState* cpu) { - cpu->pc = 0xBFC37C04u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C08(CPUState* cpu) { - cpu->pc = 0xBFC37C08u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C0C(CPUState* cpu) { - cpu->pc = 0xBFC37C0Cu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C10(CPUState* cpu) { - cpu->pc = 0xBFC37C10u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C20(CPUState* cpu) { - cpu->pc = 0xBFC37C20u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C28(CPUState* cpu) { - cpu->pc = 0xBFC37C28u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C3C(CPUState* cpu) { - cpu->pc = 0xBFC37C3Cu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C44(CPUState* cpu) { - cpu->pc = 0xBFC37C44u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C48(CPUState* cpu) { - cpu->pc = 0xBFC37C48u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C5C(CPUState* cpu) { - cpu->pc = 0xBFC37C5Cu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C64(CPUState* cpu) { - cpu->pc = 0xBFC37C64u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C6C(CPUState* cpu) { - cpu->pc = 0xBFC37C6Cu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C70(CPUState* cpu) { - cpu->pc = 0xBFC37C70u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C78(CPUState* cpu) { - cpu->pc = 0xBFC37C78u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C80(CPUState* cpu) { - cpu->pc = 0xBFC37C80u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C84(CPUState* cpu) { - cpu->pc = 0xBFC37C84u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37C98(CPUState* cpu) { - cpu->pc = 0xBFC37C98u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37CAC(CPUState* cpu) { - cpu->pc = 0xBFC37CACu; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37CB0(CPUState* cpu) { - cpu->pc = 0xBFC37CB0u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37D40(CPUState* cpu) { - cpu->pc = 0xBFC37D40u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37AC4_cont_BFC37D90(CPUState* cpu) { - cpu->pc = 0xBFC37D90u; - SCPH1001_func_1FC37AC4(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37DDC(CPUState* cpu) { - cpu->pc = 0xBFC37DDCu; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37DE4(CPUState* cpu) { - cpu->pc = 0xBFC37DE4u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37DEC(CPUState* cpu) { - cpu->pc = 0xBFC37DECu; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37DF0(CPUState* cpu) { - cpu->pc = 0xBFC37DF0u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37DF8(CPUState* cpu) { - cpu->pc = 0xBFC37DF8u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E00(CPUState* cpu) { - cpu->pc = 0xBFC37E00u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E04(CPUState* cpu) { - cpu->pc = 0xBFC37E04u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E1C(CPUState* cpu) { - cpu->pc = 0xBFC37E1Cu; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E24(CPUState* cpu) { - cpu->pc = 0xBFC37E24u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E2C(CPUState* cpu) { - cpu->pc = 0xBFC37E2Cu; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E30(CPUState* cpu) { - cpu->pc = 0xBFC37E30u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E38(CPUState* cpu) { - cpu->pc = 0xBFC37E38u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E40(CPUState* cpu) { - cpu->pc = 0xBFC37E40u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37DC8_cont_BFC37E44(CPUState* cpu) { - cpu->pc = 0xBFC37E44u; - SCPH1001_func_1FC37DC8(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E74(CPUState* cpu) { - cpu->pc = 0xBFC37E74u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E7C(CPUState* cpu) { - cpu->pc = 0xBFC37E7Cu; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E88(CPUState* cpu) { - cpu->pc = 0xBFC37E88u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E90(CPUState* cpu) { - cpu->pc = 0xBFC37E90u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E94(CPUState* cpu) { - cpu->pc = 0xBFC37E94u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37E9C(CPUState* cpu) { - cpu->pc = 0xBFC37E9Cu; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EA4(CPUState* cpu) { - cpu->pc = 0xBFC37EA4u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EB4(CPUState* cpu) { - cpu->pc = 0xBFC37EB4u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EC8(CPUState* cpu) { - cpu->pc = 0xBFC37EC8u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37ED0(CPUState* cpu) { - cpu->pc = 0xBFC37ED0u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37ED4(CPUState* cpu) { - cpu->pc = 0xBFC37ED4u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EE0(CPUState* cpu) { - cpu->pc = 0xBFC37EE0u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EE8(CPUState* cpu) { - cpu->pc = 0xBFC37EE8u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EF0(CPUState* cpu) { - cpu->pc = 0xBFC37EF0u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EF4(CPUState* cpu) { - cpu->pc = 0xBFC37EF4u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37EFC(CPUState* cpu) { - cpu->pc = 0xBFC37EFCu; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37F00(CPUState* cpu) { - cpu->pc = 0xBFC37F00u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37F08(CPUState* cpu) { - cpu->pc = 0xBFC37F08u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37F10(CPUState* cpu) { - cpu->pc = 0xBFC37F10u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37E60_cont_BFC37F30(CPUState* cpu) { - cpu->pc = 0xBFC37F30u; - SCPH1001_func_1FC37E60(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F60(CPUState* cpu) { - cpu->pc = 0xBFC37F60u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F68(CPUState* cpu) { - cpu->pc = 0xBFC37F68u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F74(CPUState* cpu) { - cpu->pc = 0xBFC37F74u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F7C(CPUState* cpu) { - cpu->pc = 0xBFC37F7Cu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F80(CPUState* cpu) { - cpu->pc = 0xBFC37F80u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F88(CPUState* cpu) { - cpu->pc = 0xBFC37F88u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37F90(CPUState* cpu) { - cpu->pc = 0xBFC37F90u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FA0(CPUState* cpu) { - cpu->pc = 0xBFC37FA0u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FB4(CPUState* cpu) { - cpu->pc = 0xBFC37FB4u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FBC(CPUState* cpu) { - cpu->pc = 0xBFC37FBCu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FC0(CPUState* cpu) { - cpu->pc = 0xBFC37FC0u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FCC(CPUState* cpu) { - cpu->pc = 0xBFC37FCCu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FD4(CPUState* cpu) { - cpu->pc = 0xBFC37FD4u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FDC(CPUState* cpu) { - cpu->pc = 0xBFC37FDCu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FE0(CPUState* cpu) { - cpu->pc = 0xBFC37FE0u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FE8(CPUState* cpu) { - cpu->pc = 0xBFC37FE8u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FEC(CPUState* cpu) { - cpu->pc = 0xBFC37FECu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FF4(CPUState* cpu) { - cpu->pc = 0xBFC37FF4u; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC37FFC(CPUState* cpu) { - cpu->pc = 0xBFC37FFCu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC37F4C_cont_BFC3801C(CPUState* cpu) { - cpu->pc = 0xBFC3801Cu; - SCPH1001_func_1FC37F4C(cpu); -} - -void SCPH1001_func_1FC38038_cont_BFC38054(CPUState* cpu) { - cpu->pc = 0xBFC38054u; - SCPH1001_func_1FC38038(cpu); -} - -void SCPH1001_func_1FC38038_cont_BFC38070(CPUState* cpu) { - cpu->pc = 0xBFC38070u; - SCPH1001_func_1FC38038(cpu); -} - -void SCPH1001_func_1FC38090_cont_BFC38098(CPUState* cpu) { - cpu->pc = 0xBFC38098u; - SCPH1001_func_1FC38090(cpu); -} - -void SCPH1001_func_1FC38090_cont_BFC38100(CPUState* cpu) { - cpu->pc = 0xBFC38100u; - SCPH1001_func_1FC38090(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38110(CPUState* cpu) { - cpu->pc = 0xBFC38110u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC3811C(CPUState* cpu) { - cpu->pc = 0xBFC3811Cu; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38130(CPUState* cpu) { - cpu->pc = 0xBFC38130u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38148(CPUState* cpu) { - cpu->pc = 0xBFC38148u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38150(CPUState* cpu) { - cpu->pc = 0xBFC38150u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38158(CPUState* cpu) { - cpu->pc = 0xBFC38158u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC3816C(CPUState* cpu) { - cpu->pc = 0xBFC3816Cu; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC38188(CPUState* cpu) { - cpu->pc = 0xBFC38188u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC3818C(CPUState* cpu) { - cpu->pc = 0xBFC3818Cu; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC3819C(CPUState* cpu) { - cpu->pc = 0xBFC3819Cu; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381B0(CPUState* cpu) { - cpu->pc = 0xBFC381B0u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381B4(CPUState* cpu) { - cpu->pc = 0xBFC381B4u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381B8(CPUState* cpu) { - cpu->pc = 0xBFC381B8u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381C0(CPUState* cpu) { - cpu->pc = 0xBFC381C0u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381D4(CPUState* cpu) { - cpu->pc = 0xBFC381D4u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381DC(CPUState* cpu) { - cpu->pc = 0xBFC381DCu; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38108_cont_BFC381E4(CPUState* cpu) { - cpu->pc = 0xBFC381E4u; - SCPH1001_func_1FC38108(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC38270(CPUState* cpu) { - cpu->pc = 0xBFC38270u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC38290(CPUState* cpu) { - cpu->pc = 0xBFC38290u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC38298(CPUState* cpu) { - cpu->pc = 0xBFC38298u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC382A0(CPUState* cpu) { - cpu->pc = 0xBFC382A0u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC382A8(CPUState* cpu) { - cpu->pc = 0xBFC382A8u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC382C8(CPUState* cpu) { - cpu->pc = 0xBFC382C8u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC382CC(CPUState* cpu) { - cpu->pc = 0xBFC382CCu; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC38204_cont_BFC382D0(CPUState* cpu) { - cpu->pc = 0xBFC382D0u; - SCPH1001_func_1FC38204(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38320(CPUState* cpu) { - cpu->pc = 0xBFC38320u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38328(CPUState* cpu) { - cpu->pc = 0xBFC38328u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3832C(CPUState* cpu) { - cpu->pc = 0xBFC3832Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3833C(CPUState* cpu) { - cpu->pc = 0xBFC3833Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38344(CPUState* cpu) { - cpu->pc = 0xBFC38344u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38348(CPUState* cpu) { - cpu->pc = 0xBFC38348u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3834C(CPUState* cpu) { - cpu->pc = 0xBFC3834Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38350(CPUState* cpu) { - cpu->pc = 0xBFC38350u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38360(CPUState* cpu) { - cpu->pc = 0xBFC38360u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38368(CPUState* cpu) { - cpu->pc = 0xBFC38368u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3837C(CPUState* cpu) { - cpu->pc = 0xBFC3837Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38384(CPUState* cpu) { - cpu->pc = 0xBFC38384u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38388(CPUState* cpu) { - cpu->pc = 0xBFC38388u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3839C(CPUState* cpu) { - cpu->pc = 0xBFC3839Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383A4(CPUState* cpu) { - cpu->pc = 0xBFC383A4u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383AC(CPUState* cpu) { - cpu->pc = 0xBFC383ACu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383B0(CPUState* cpu) { - cpu->pc = 0xBFC383B0u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383B8(CPUState* cpu) { - cpu->pc = 0xBFC383B8u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383C0(CPUState* cpu) { - cpu->pc = 0xBFC383C0u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383C4(CPUState* cpu) { - cpu->pc = 0xBFC383C4u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383D8(CPUState* cpu) { - cpu->pc = 0xBFC383D8u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383EC(CPUState* cpu) { - cpu->pc = 0xBFC383ECu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC383F0(CPUState* cpu) { - cpu->pc = 0xBFC383F0u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC3847C(CPUState* cpu) { - cpu->pc = 0xBFC3847Cu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38494(CPUState* cpu) { - cpu->pc = 0xBFC38494u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC384AC(CPUState* cpu) { - cpu->pc = 0xBFC384ACu; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC384C0(CPUState* cpu) { - cpu->pc = 0xBFC384C0u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC384C4(CPUState* cpu) { - cpu->pc = 0xBFC384C4u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38508(CPUState* cpu) { - cpu->pc = 0xBFC38508u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC382E0_cont_BFC38514(CPUState* cpu) { - cpu->pc = 0xBFC38514u; - SCPH1001_func_1FC382E0(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC3856C(CPUState* cpu) { - cpu->pc = 0xBFC3856Cu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38574(CPUState* cpu) { - cpu->pc = 0xBFC38574u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38578(CPUState* cpu) { - cpu->pc = 0xBFC38578u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38588(CPUState* cpu) { - cpu->pc = 0xBFC38588u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38590(CPUState* cpu) { - cpu->pc = 0xBFC38590u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38594(CPUState* cpu) { - cpu->pc = 0xBFC38594u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38598(CPUState* cpu) { - cpu->pc = 0xBFC38598u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC3859C(CPUState* cpu) { - cpu->pc = 0xBFC3859Cu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385AC(CPUState* cpu) { - cpu->pc = 0xBFC385ACu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385B4(CPUState* cpu) { - cpu->pc = 0xBFC385B4u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385C8(CPUState* cpu) { - cpu->pc = 0xBFC385C8u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385D0(CPUState* cpu) { - cpu->pc = 0xBFC385D0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385D4(CPUState* cpu) { - cpu->pc = 0xBFC385D4u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385E8(CPUState* cpu) { - cpu->pc = 0xBFC385E8u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385F0(CPUState* cpu) { - cpu->pc = 0xBFC385F0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385F8(CPUState* cpu) { - cpu->pc = 0xBFC385F8u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC385FC(CPUState* cpu) { - cpu->pc = 0xBFC385FCu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38604(CPUState* cpu) { - cpu->pc = 0xBFC38604u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC3860C(CPUState* cpu) { - cpu->pc = 0xBFC3860Cu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38610(CPUState* cpu) { - cpu->pc = 0xBFC38610u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38624(CPUState* cpu) { - cpu->pc = 0xBFC38624u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38630(CPUState* cpu) { - cpu->pc = 0xBFC38630u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38634(CPUState* cpu) { - cpu->pc = 0xBFC38634u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38644(CPUState* cpu) { - cpu->pc = 0xBFC38644u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38660(CPUState* cpu) { - cpu->pc = 0xBFC38660u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38664(CPUState* cpu) { - cpu->pc = 0xBFC38664u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38670(CPUState* cpu) { - cpu->pc = 0xBFC38670u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38690(CPUState* cpu) { - cpu->pc = 0xBFC38690u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38698(CPUState* cpu) { - cpu->pc = 0xBFC38698u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386A0(CPUState* cpu) { - cpu->pc = 0xBFC386A0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386C0(CPUState* cpu) { - cpu->pc = 0xBFC386C0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386E0(CPUState* cpu) { - cpu->pc = 0xBFC386E0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386EC(CPUState* cpu) { - cpu->pc = 0xBFC386ECu; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386F0(CPUState* cpu) { - cpu->pc = 0xBFC386F0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC386F4(CPUState* cpu) { - cpu->pc = 0xBFC386F4u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38718(CPUState* cpu) { - cpu->pc = 0xBFC38718u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38720(CPUState* cpu) { - cpu->pc = 0xBFC38720u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38724(CPUState* cpu) { - cpu->pc = 0xBFC38724u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38730(CPUState* cpu) { - cpu->pc = 0xBFC38730u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38748(CPUState* cpu) { - cpu->pc = 0xBFC38748u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38750(CPUState* cpu) { - cpu->pc = 0xBFC38750u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38754(CPUState* cpu) { - cpu->pc = 0xBFC38754u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC38760(CPUState* cpu) { - cpu->pc = 0xBFC38760u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC38524_cont_BFC387C0(CPUState* cpu) { - cpu->pc = 0xBFC387C0u; - SCPH1001_func_1FC38524(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38818(CPUState* cpu) { - cpu->pc = 0xBFC38818u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38820(CPUState* cpu) { - cpu->pc = 0xBFC38820u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38824(CPUState* cpu) { - cpu->pc = 0xBFC38824u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38834(CPUState* cpu) { - cpu->pc = 0xBFC38834u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC3883C(CPUState* cpu) { - cpu->pc = 0xBFC3883Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38840(CPUState* cpu) { - cpu->pc = 0xBFC38840u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38844(CPUState* cpu) { - cpu->pc = 0xBFC38844u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38848(CPUState* cpu) { - cpu->pc = 0xBFC38848u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38858(CPUState* cpu) { - cpu->pc = 0xBFC38858u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38860(CPUState* cpu) { - cpu->pc = 0xBFC38860u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38874(CPUState* cpu) { - cpu->pc = 0xBFC38874u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC3887C(CPUState* cpu) { - cpu->pc = 0xBFC3887Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38880(CPUState* cpu) { - cpu->pc = 0xBFC38880u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38894(CPUState* cpu) { - cpu->pc = 0xBFC38894u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC3889C(CPUState* cpu) { - cpu->pc = 0xBFC3889Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388A4(CPUState* cpu) { - cpu->pc = 0xBFC388A4u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388A8(CPUState* cpu) { - cpu->pc = 0xBFC388A8u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388B0(CPUState* cpu) { - cpu->pc = 0xBFC388B0u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388B8(CPUState* cpu) { - cpu->pc = 0xBFC388B8u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388BC(CPUState* cpu) { - cpu->pc = 0xBFC388BCu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388DC(CPUState* cpu) { - cpu->pc = 0xBFC388DCu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388E0(CPUState* cpu) { - cpu->pc = 0xBFC388E0u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388EC(CPUState* cpu) { - cpu->pc = 0xBFC388ECu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC388F4(CPUState* cpu) { - cpu->pc = 0xBFC388F4u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38914(CPUState* cpu) { - cpu->pc = 0xBFC38914u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC3891C(CPUState* cpu) { - cpu->pc = 0xBFC3891Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38924(CPUState* cpu) { - cpu->pc = 0xBFC38924u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC3892C(CPUState* cpu) { - cpu->pc = 0xBFC3892Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38940(CPUState* cpu) { - cpu->pc = 0xBFC38940u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38960(CPUState* cpu) { - cpu->pc = 0xBFC38960u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38968(CPUState* cpu) { - cpu->pc = 0xBFC38968u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389AC(CPUState* cpu) { - cpu->pc = 0xBFC389ACu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389C0(CPUState* cpu) { - cpu->pc = 0xBFC389C0u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389C8(CPUState* cpu) { - cpu->pc = 0xBFC389C8u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389D0(CPUState* cpu) { - cpu->pc = 0xBFC389D0u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389D4(CPUState* cpu) { - cpu->pc = 0xBFC389D4u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389E0(CPUState* cpu) { - cpu->pc = 0xBFC389E0u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC389F8(CPUState* cpu) { - cpu->pc = 0xBFC389F8u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38A00(CPUState* cpu) { - cpu->pc = 0xBFC38A00u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38A04(CPUState* cpu) { - cpu->pc = 0xBFC38A04u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38A10(CPUState* cpu) { - cpu->pc = 0xBFC38A10u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38A68(CPUState* cpu) { - cpu->pc = 0xBFC38A68u; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC387D4_cont_BFC38A6C(CPUState* cpu) { - cpu->pc = 0xBFC38A6Cu; - SCPH1001_func_1FC387D4(cpu); -} - -void SCPH1001_func_1FC38A7C_cont_BFC38A94(CPUState* cpu) { - cpu->pc = 0xBFC38A94u; - SCPH1001_func_1FC38A7C(cpu); -} - -void SCPH1001_func_1FC38AF0_cont_BFC38AFC(CPUState* cpu) { - cpu->pc = 0xBFC38AFCu; - SCPH1001_func_1FC38AF0(cpu); -} - -void SCPH1001_func_1FC38AF0_cont_BFC38B08(CPUState* cpu) { - cpu->pc = 0xBFC38B08u; - SCPH1001_func_1FC38AF0(cpu); -} - -void SCPH1001_func_1FC38AF0_cont_BFC38B20(CPUState* cpu) { - cpu->pc = 0xBFC38B20u; - SCPH1001_func_1FC38AF0(cpu); -} - -void SCPH1001_func_1FC38BE8_cont_BFC38C24(CPUState* cpu) { - cpu->pc = 0xBFC38C24u; - SCPH1001_func_1FC38BE8(cpu); -} - -void SCPH1001_func_1FC38BE8_cont_BFC38C58(CPUState* cpu) { - cpu->pc = 0xBFC38C58u; - SCPH1001_func_1FC38BE8(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38C94(CPUState* cpu) { - cpu->pc = 0xBFC38C94u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CA8(CPUState* cpu) { - cpu->pc = 0xBFC38CA8u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CB0(CPUState* cpu) { - cpu->pc = 0xBFC38CB0u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CB8(CPUState* cpu) { - cpu->pc = 0xBFC38CB8u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CC0(CPUState* cpu) { - cpu->pc = 0xBFC38CC0u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CD4(CPUState* cpu) { - cpu->pc = 0xBFC38CD4u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38CD8(CPUState* cpu) { - cpu->pc = 0xBFC38CD8u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38D78(CPUState* cpu) { - cpu->pc = 0xBFC38D78u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38D80(CPUState* cpu) { - cpu->pc = 0xBFC38D80u; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38C68_cont_BFC38D9C(CPUState* cpu) { - cpu->pc = 0xBFC38D9Cu; - SCPH1001_func_1FC38C68(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38DC0(CPUState* cpu) { - cpu->pc = 0xBFC38DC0u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38DC8(CPUState* cpu) { - cpu->pc = 0xBFC38DC8u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38DE8(CPUState* cpu) { - cpu->pc = 0xBFC38DE8u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38DFC(CPUState* cpu) { - cpu->pc = 0xBFC38DFCu; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E1C(CPUState* cpu) { - cpu->pc = 0xBFC38E1Cu; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E24(CPUState* cpu) { - cpu->pc = 0xBFC38E24u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E40(CPUState* cpu) { - cpu->pc = 0xBFC38E40u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E48(CPUState* cpu) { - cpu->pc = 0xBFC38E48u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E68(CPUState* cpu) { - cpu->pc = 0xBFC38E68u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E70(CPUState* cpu) { - cpu->pc = 0xBFC38E70u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E78(CPUState* cpu) { - cpu->pc = 0xBFC38E78u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38E98(CPUState* cpu) { - cpu->pc = 0xBFC38E98u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F20(CPUState* cpu) { - cpu->pc = 0xBFC38F20u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F3C(CPUState* cpu) { - cpu->pc = 0xBFC38F3Cu; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F48(CPUState* cpu) { - cpu->pc = 0xBFC38F48u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F5C(CPUState* cpu) { - cpu->pc = 0xBFC38F5Cu; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F64(CPUState* cpu) { - cpu->pc = 0xBFC38F64u; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38DAC_cont_BFC38F7C(CPUState* cpu) { - cpu->pc = 0xBFC38F7Cu; - SCPH1001_func_1FC38DAC(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC38F94(CPUState* cpu) { - cpu->pc = 0xBFC38F94u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC38FCC(CPUState* cpu) { - cpu->pc = 0xBFC38FCCu; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39018(CPUState* cpu) { - cpu->pc = 0xBFC39018u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39020(CPUState* cpu) { - cpu->pc = 0xBFC39020u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39028(CPUState* cpu) { - cpu->pc = 0xBFC39028u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39034(CPUState* cpu) { - cpu->pc = 0xBFC39034u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC3906C(CPUState* cpu) { - cpu->pc = 0xBFC3906Cu; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39074(CPUState* cpu) { - cpu->pc = 0xBFC39074u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC38F8C_cont_BFC39078(CPUState* cpu) { - cpu->pc = 0xBFC39078u; - SCPH1001_func_1FC38F8C(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC3908C(CPUState* cpu) { - cpu->pc = 0xBFC3908Cu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC3909C(CPUState* cpu) { - cpu->pc = 0xBFC3909Cu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390B8(CPUState* cpu) { - cpu->pc = 0xBFC390B8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390C8(CPUState* cpu) { - cpu->pc = 0xBFC390C8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390CC(CPUState* cpu) { - cpu->pc = 0xBFC390CCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390D4(CPUState* cpu) { - cpu->pc = 0xBFC390D4u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390DC(CPUState* cpu) { - cpu->pc = 0xBFC390DCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC390F0(CPUState* cpu) { - cpu->pc = 0xBFC390F0u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39110(CPUState* cpu) { - cpu->pc = 0xBFC39110u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39118(CPUState* cpu) { - cpu->pc = 0xBFC39118u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39134(CPUState* cpu) { - cpu->pc = 0xBFC39134u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC3913C(CPUState* cpu) { - cpu->pc = 0xBFC3913Cu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39144(CPUState* cpu) { - cpu->pc = 0xBFC39144u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC3914C(CPUState* cpu) { - cpu->pc = 0xBFC3914Cu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39160(CPUState* cpu) { - cpu->pc = 0xBFC39160u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39180(CPUState* cpu) { - cpu->pc = 0xBFC39180u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39194(CPUState* cpu) { - cpu->pc = 0xBFC39194u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC3919C(CPUState* cpu) { - cpu->pc = 0xBFC3919Cu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC391BC(CPUState* cpu) { - cpu->pc = 0xBFC391BCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC391C8(CPUState* cpu) { - cpu->pc = 0xBFC391C8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC391DC(CPUState* cpu) { - cpu->pc = 0xBFC391DCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC391E4(CPUState* cpu) { - cpu->pc = 0xBFC391E4u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC391EC(CPUState* cpu) { - cpu->pc = 0xBFC391ECu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39200(CPUState* cpu) { - cpu->pc = 0xBFC39200u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39220(CPUState* cpu) { - cpu->pc = 0xBFC39220u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39228(CPUState* cpu) { - cpu->pc = 0xBFC39228u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39244(CPUState* cpu) { - cpu->pc = 0xBFC39244u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39264(CPUState* cpu) { - cpu->pc = 0xBFC39264u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39284(CPUState* cpu) { - cpu->pc = 0xBFC39284u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC39290(CPUState* cpu) { - cpu->pc = 0xBFC39290u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392A8(CPUState* cpu) { - cpu->pc = 0xBFC392A8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392B8(CPUState* cpu) { - cpu->pc = 0xBFC392B8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392BC(CPUState* cpu) { - cpu->pc = 0xBFC392BCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392C8(CPUState* cpu) { - cpu->pc = 0xBFC392C8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392CC(CPUState* cpu) { - cpu->pc = 0xBFC392CCu; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39080_cont_BFC392D8(CPUState* cpu) { - cpu->pc = 0xBFC392D8u; - SCPH1001_func_1FC39080(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC39320(CPUState* cpu) { - cpu->pc = 0xBFC39320u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC39340(CPUState* cpu) { - cpu->pc = 0xBFC39340u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC39348(CPUState* cpu) { - cpu->pc = 0xBFC39348u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC3934C(CPUState* cpu) { - cpu->pc = 0xBFC3934Cu; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC3936C(CPUState* cpu) { - cpu->pc = 0xBFC3936Cu; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC39374(CPUState* cpu) { - cpu->pc = 0xBFC39374u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC39378(CPUState* cpu) { - cpu->pc = 0xBFC39378u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC393A8(CPUState* cpu) { - cpu->pc = 0xBFC393A8u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC393B0(CPUState* cpu) { - cpu->pc = 0xBFC393B0u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC393B8(CPUState* cpu) { - cpu->pc = 0xBFC393B8u; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC39300_cont_BFC393BC(CPUState* cpu) { - cpu->pc = 0xBFC393BCu; - SCPH1001_func_1FC39300(cpu); -} - -void SCPH1001_func_1FC393CC_cont_BFC393D8(CPUState* cpu) { - cpu->pc = 0xBFC393D8u; - SCPH1001_func_1FC393CC(cpu); -} - -void SCPH1001_func_1FC393CC_cont_BFC393F4(CPUState* cpu) { - cpu->pc = 0xBFC393F4u; - SCPH1001_func_1FC393CC(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39440(CPUState* cpu) { - cpu->pc = 0xBFC39440u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39454(CPUState* cpu) { - cpu->pc = 0xBFC39454u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39458(CPUState* cpu) { - cpu->pc = 0xBFC39458u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39464(CPUState* cpu) { - cpu->pc = 0xBFC39464u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39478(CPUState* cpu) { - cpu->pc = 0xBFC39478u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC3947C(CPUState* cpu) { - cpu->pc = 0xBFC3947Cu; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39488(CPUState* cpu) { - cpu->pc = 0xBFC39488u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC3948C(CPUState* cpu) { - cpu->pc = 0xBFC3948Cu; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC39494(CPUState* cpu) { - cpu->pc = 0xBFC39494u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC3949C(CPUState* cpu) { - cpu->pc = 0xBFC3949Cu; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC394A4(CPUState* cpu) { - cpu->pc = 0xBFC394A4u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC394AC(CPUState* cpu) { - cpu->pc = 0xBFC394ACu; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC394C0(CPUState* cpu) { - cpu->pc = 0xBFC394C0u; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC39410_cont_BFC394DC(CPUState* cpu) { - cpu->pc = 0xBFC394DCu; - SCPH1001_func_1FC39410(cpu); -} - -void SCPH1001_func_1FC394EC_cont_BFC3952C(CPUState* cpu) { - cpu->pc = 0xBFC3952Cu; - SCPH1001_func_1FC394EC(cpu); -} - -void SCPH1001_func_1FC394EC_cont_BFC3953C(CPUState* cpu) { - cpu->pc = 0xBFC3953Cu; - SCPH1001_func_1FC394EC(cpu); -} - -void SCPH1001_func_1FC3954C_cont_BFC395A0(CPUState* cpu) { - cpu->pc = 0xBFC395A0u; - SCPH1001_func_1FC3954C(cpu); -} - -void SCPH1001_func_1FC3954C_cont_BFC395A8(CPUState* cpu) { - cpu->pc = 0xBFC395A8u; - SCPH1001_func_1FC3954C(cpu); -} - -void SCPH1001_func_1FC3954C_cont_BFC395AC(CPUState* cpu) { - cpu->pc = 0xBFC395ACu; - SCPH1001_func_1FC3954C(cpu); -} - -void SCPH1001_func_1FC3954C_cont_BFC395CC(CPUState* cpu) { - cpu->pc = 0xBFC395CCu; - SCPH1001_func_1FC3954C(cpu); -} - -void SCPH1001_func_1FC39630_cont_BFC3964C(CPUState* cpu) { - cpu->pc = 0xBFC3964Cu; - SCPH1001_func_1FC39630(cpu); -} - -void SCPH1001_func_1FC39630_cont_BFC39664(CPUState* cpu) { - cpu->pc = 0xBFC39664u; - SCPH1001_func_1FC39630(cpu); -} - -void SCPH1001_func_1FC39630_cont_BFC39694(CPUState* cpu) { - cpu->pc = 0xBFC39694u; - SCPH1001_func_1FC39630(cpu); -} - -void SCPH1001_func_1FC39630_cont_BFC39698(CPUState* cpu) { - cpu->pc = 0xBFC39698u; - SCPH1001_func_1FC39630(cpu); -} - -void SCPH1001_func_1FC39630_cont_BFC396C0(CPUState* cpu) { - cpu->pc = 0xBFC396C0u; - SCPH1001_func_1FC39630(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC396FC(CPUState* cpu) { - cpu->pc = 0xBFC396FCu; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC39708(CPUState* cpu) { - cpu->pc = 0xBFC39708u; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC39740(CPUState* cpu) { - cpu->pc = 0xBFC39740u; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC39748(CPUState* cpu) { - cpu->pc = 0xBFC39748u; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC39780(CPUState* cpu) { - cpu->pc = 0xBFC39780u; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC396E8_cont_BFC39784(CPUState* cpu) { - cpu->pc = 0xBFC39784u; - SCPH1001_func_1FC396E8(cpu); -} - -void SCPH1001_func_1FC398D4_cont_BFC398DC(CPUState* cpu) { - cpu->pc = 0xBFC398DCu; - SCPH1001_func_1FC398D4(cpu); -} - -void SCPH1001_func_1FC398D4_cont_BFC398F4(CPUState* cpu) { - cpu->pc = 0xBFC398F4u; - SCPH1001_func_1FC398D4(cpu); -} - -void SCPH1001_func_1FC39910_cont_BFC39918(CPUState* cpu) { - cpu->pc = 0xBFC39918u; - SCPH1001_func_1FC39910(cpu); -} - -void SCPH1001_func_1FC39910_cont_BFC39930(CPUState* cpu) { - cpu->pc = 0xBFC39930u; - SCPH1001_func_1FC39910(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39D70(CPUState* cpu) { - cpu->pc = 0xBFC39D70u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39D8C(CPUState* cpu) { - cpu->pc = 0xBFC39D8Cu; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39DB4(CPUState* cpu) { - cpu->pc = 0xBFC39DB4u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39DCC(CPUState* cpu) { - cpu->pc = 0xBFC39DCCu; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39DE4(CPUState* cpu) { - cpu->pc = 0xBFC39DE4u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39DEC(CPUState* cpu) { - cpu->pc = 0xBFC39DECu; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39DF4(CPUState* cpu) { - cpu->pc = 0xBFC39DF4u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39E30(CPUState* cpu) { - cpu->pc = 0xBFC39E30u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39E38(CPUState* cpu) { - cpu->pc = 0xBFC39E38u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39E74(CPUState* cpu) { - cpu->pc = 0xBFC39E74u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39D38_cont_BFC39E78(CPUState* cpu) { - cpu->pc = 0xBFC39E78u; - SCPH1001_func_1FC39D38(cpu); -} - -void SCPH1001_func_1FC39E84_cont_BFC39EBC(CPUState* cpu) { - cpu->pc = 0xBFC39EBCu; - SCPH1001_func_1FC39E84(cpu); -} - -void SCPH1001_func_1FC39E84_cont_BFC39EE4(CPUState* cpu) { - cpu->pc = 0xBFC39EE4u; - SCPH1001_func_1FC39E84(cpu); -} - -void SCPH1001_func_1FC39E84_cont_BFC39EFC(CPUState* cpu) { - cpu->pc = 0xBFC39EFCu; - SCPH1001_func_1FC39E84(cpu); -} - -void SCPH1001_func_1FC39E84_cont_BFC39F14(CPUState* cpu) { - cpu->pc = 0xBFC39F14u; - SCPH1001_func_1FC39E84(cpu); -} - -void SCPH1001_func_1FC39F30_cont_BFC39F40(CPUState* cpu) { - cpu->pc = 0xBFC39F40u; - SCPH1001_func_1FC39F30(cpu); -} - -void SCPH1001_func_1FC39F30_cont_BFC39F50(CPUState* cpu) { - cpu->pc = 0xBFC39F50u; - SCPH1001_func_1FC39F30(cpu); -} - -void SCPH1001_func_1FC39F30_cont_BFC39F58(CPUState* cpu) { - cpu->pc = 0xBFC39F58u; - SCPH1001_func_1FC39F30(cpu); -} - -void SCPH1001_func_1FC39F30_cont_BFC39F60(CPUState* cpu) { - cpu->pc = 0xBFC39F60u; - SCPH1001_func_1FC39F30(cpu); -} - -void SCPH1001_func_1FC39F30_cont_BFC39F80(CPUState* cpu) { - cpu->pc = 0xBFC39F80u; - SCPH1001_func_1FC39F30(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FA0(CPUState* cpu) { - cpu->pc = 0xBFC39FA0u; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FAC(CPUState* cpu) { - cpu->pc = 0xBFC39FACu; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FB4(CPUState* cpu) { - cpu->pc = 0xBFC39FB4u; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FBC(CPUState* cpu) { - cpu->pc = 0xBFC39FBCu; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FD8(CPUState* cpu) { - cpu->pc = 0xBFC39FD8u; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39F90_cont_BFC39FDC(CPUState* cpu) { - cpu->pc = 0xBFC39FDCu; - SCPH1001_func_1FC39F90(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A014(CPUState* cpu) { - cpu->pc = 0xBFC3A014u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A020(CPUState* cpu) { - cpu->pc = 0xBFC3A020u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A02C(CPUState* cpu) { - cpu->pc = 0xBFC3A02Cu; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A034(CPUState* cpu) { - cpu->pc = 0xBFC3A034u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A044(CPUState* cpu) { - cpu->pc = 0xBFC3A044u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A060(CPUState* cpu) { - cpu->pc = 0xBFC3A060u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A06C(CPUState* cpu) { - cpu->pc = 0xBFC3A06Cu; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A078(CPUState* cpu) { - cpu->pc = 0xBFC3A078u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A080(CPUState* cpu) { - cpu->pc = 0xBFC3A080u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC39FE4_cont_BFC3A084(CPUState* cpu) { - cpu->pc = 0xBFC3A084u; - SCPH1001_func_1FC39FE4(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A0C8(CPUState* cpu) { - cpu->pc = 0xBFC3A0C8u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A0E4(CPUState* cpu) { - cpu->pc = 0xBFC3A0E4u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A114(CPUState* cpu) { - cpu->pc = 0xBFC3A114u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A120(CPUState* cpu) { - cpu->pc = 0xBFC3A120u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A13C(CPUState* cpu) { - cpu->pc = 0xBFC3A13Cu; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A150(CPUState* cpu) { - cpu->pc = 0xBFC3A150u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A164(CPUState* cpu) { - cpu->pc = 0xBFC3A164u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A16C(CPUState* cpu) { - cpu->pc = 0xBFC3A16Cu; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A178(CPUState* cpu) { - cpu->pc = 0xBFC3A178u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A184(CPUState* cpu) { - cpu->pc = 0xBFC3A184u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A198(CPUState* cpu) { - cpu->pc = 0xBFC3A198u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A1AC(CPUState* cpu) { - cpu->pc = 0xBFC3A1ACu; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A1C8(CPUState* cpu) { - cpu->pc = 0xBFC3A1C8u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A1DC(CPUState* cpu) { - cpu->pc = 0xBFC3A1DCu; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A1EC(CPUState* cpu) { - cpu->pc = 0xBFC3A1ECu; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A1F8(CPUState* cpu) { - cpu->pc = 0xBFC3A1F8u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A094_cont_BFC3A210(CPUState* cpu) { - cpu->pc = 0xBFC3A210u; - SCPH1001_func_1FC3A094(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A244(CPUState* cpu) { - cpu->pc = 0xBFC3A244u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A250(CPUState* cpu) { - cpu->pc = 0xBFC3A250u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A268(CPUState* cpu) { - cpu->pc = 0xBFC3A268u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A274(CPUState* cpu) { - cpu->pc = 0xBFC3A274u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A2A4(CPUState* cpu) { - cpu->pc = 0xBFC3A2A4u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A2AC(CPUState* cpu) { - cpu->pc = 0xBFC3A2ACu; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A228_cont_BFC3A2B0(CPUState* cpu) { - cpu->pc = 0xBFC3A2B0u; - SCPH1001_func_1FC3A228(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A2D4(CPUState* cpu) { - cpu->pc = 0xBFC3A2D4u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A2F4(CPUState* cpu) { - cpu->pc = 0xBFC3A2F4u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A308(CPUState* cpu) { - cpu->pc = 0xBFC3A308u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A31C(CPUState* cpu) { - cpu->pc = 0xBFC3A31Cu; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A334(CPUState* cpu) { - cpu->pc = 0xBFC3A334u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A33C(CPUState* cpu) { - cpu->pc = 0xBFC3A33Cu; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A340(CPUState* cpu) { - cpu->pc = 0xBFC3A340u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A344(CPUState* cpu) { - cpu->pc = 0xBFC3A344u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A358(CPUState* cpu) { - cpu->pc = 0xBFC3A358u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A36C(CPUState* cpu) { - cpu->pc = 0xBFC3A36Cu; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A3B8(CPUState* cpu) { - cpu->pc = 0xBFC3A3B8u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A3BC(CPUState* cpu) { - cpu->pc = 0xBFC3A3BCu; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A3CC(CPUState* cpu) { - cpu->pc = 0xBFC3A3CCu; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A2C0_cont_BFC3A3F4(CPUState* cpu) { - cpu->pc = 0xBFC3A3F4u; - SCPH1001_func_1FC3A2C0(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A480(CPUState* cpu) { - cpu->pc = 0xBFC3A480u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A498(CPUState* cpu) { - cpu->pc = 0xBFC3A498u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A4AC(CPUState* cpu) { - cpu->pc = 0xBFC3A4ACu; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A4CC(CPUState* cpu) { - cpu->pc = 0xBFC3A4CCu; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A4DC(CPUState* cpu) { - cpu->pc = 0xBFC3A4DCu; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A4E4(CPUState* cpu) { - cpu->pc = 0xBFC3A4E4u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A4F8(CPUState* cpu) { - cpu->pc = 0xBFC3A4F8u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A508(CPUState* cpu) { - cpu->pc = 0xBFC3A508u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A510(CPUState* cpu) { - cpu->pc = 0xBFC3A510u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A518(CPUState* cpu) { - cpu->pc = 0xBFC3A518u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A524(CPUState* cpu) { - cpu->pc = 0xBFC3A524u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A52C(CPUState* cpu) { - cpu->pc = 0xBFC3A52Cu; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A540(CPUState* cpu) { - cpu->pc = 0xBFC3A540u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A550(CPUState* cpu) { - cpu->pc = 0xBFC3A550u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A560(CPUState* cpu) { - cpu->pc = 0xBFC3A560u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A568(CPUState* cpu) { - cpu->pc = 0xBFC3A568u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A57C(CPUState* cpu) { - cpu->pc = 0xBFC3A57Cu; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A584(CPUState* cpu) { - cpu->pc = 0xBFC3A584u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5A0(CPUState* cpu) { - cpu->pc = 0xBFC3A5A0u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5A8(CPUState* cpu) { - cpu->pc = 0xBFC3A5A8u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5B0(CPUState* cpu) { - cpu->pc = 0xBFC3A5B0u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5B8(CPUState* cpu) { - cpu->pc = 0xBFC3A5B8u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5C0(CPUState* cpu) { - cpu->pc = 0xBFC3A5C0u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5C4(CPUState* cpu) { - cpu->pc = 0xBFC3A5C4u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5D0(CPUState* cpu) { - cpu->pc = 0xBFC3A5D0u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5D4(CPUState* cpu) { - cpu->pc = 0xBFC3A5D4u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A5F4(CPUState* cpu) { - cpu->pc = 0xBFC3A5F4u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A608(CPUState* cpu) { - cpu->pc = 0xBFC3A608u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A610(CPUState* cpu) { - cpu->pc = 0xBFC3A610u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A624(CPUState* cpu) { - cpu->pc = 0xBFC3A624u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A44C_cont_BFC3A628(CPUState* cpu) { - cpu->pc = 0xBFC3A628u; - SCPH1001_func_1FC3A44C(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A714(CPUState* cpu) { - cpu->pc = 0xBFC3A714u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A730(CPUState* cpu) { - cpu->pc = 0xBFC3A730u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A734(CPUState* cpu) { - cpu->pc = 0xBFC3A734u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A74C(CPUState* cpu) { - cpu->pc = 0xBFC3A74Cu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A764(CPUState* cpu) { - cpu->pc = 0xBFC3A764u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A778(CPUState* cpu) { - cpu->pc = 0xBFC3A778u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A77C(CPUState* cpu) { - cpu->pc = 0xBFC3A77Cu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A78C(CPUState* cpu) { - cpu->pc = 0xBFC3A78Cu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7A4(CPUState* cpu) { - cpu->pc = 0xBFC3A7A4u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7B8(CPUState* cpu) { - cpu->pc = 0xBFC3A7B8u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7BC(CPUState* cpu) { - cpu->pc = 0xBFC3A7BCu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7CC(CPUState* cpu) { - cpu->pc = 0xBFC3A7CCu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7E0(CPUState* cpu) { - cpu->pc = 0xBFC3A7E0u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7E8(CPUState* cpu) { - cpu->pc = 0xBFC3A7E8u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7F0(CPUState* cpu) { - cpu->pc = 0xBFC3A7F0u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A7F4(CPUState* cpu) { - cpu->pc = 0xBFC3A7F4u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A894(CPUState* cpu) { - cpu->pc = 0xBFC3A894u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A8A8(CPUState* cpu) { - cpu->pc = 0xBFC3A8A8u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A8BC(CPUState* cpu) { - cpu->pc = 0xBFC3A8BCu; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A8D4(CPUState* cpu) { - cpu->pc = 0xBFC3A8D4u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A900(CPUState* cpu) { - cpu->pc = 0xBFC3A900u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A638_cont_BFC3A930(CPUState* cpu) { - cpu->pc = 0xBFC3A930u; - SCPH1001_func_1FC3A638(cpu); -} - -void SCPH1001_func_1FC3A95C_cont_BFC3A974(CPUState* cpu) { - cpu->pc = 0xBFC3A974u; - SCPH1001_func_1FC3A95C(cpu); -} - -void SCPH1001_func_1FC3A95C_cont_BFC3A988(CPUState* cpu) { - cpu->pc = 0xBFC3A988u; - SCPH1001_func_1FC3A95C(cpu); -} - -void SCPH1001_func_1FC3A95C_cont_BFC3A98C(CPUState* cpu) { - cpu->pc = 0xBFC3A98Cu; - SCPH1001_func_1FC3A95C(cpu); -} - -void SCPH1001_func_1FC3A95C_cont_BFC3A99C(CPUState* cpu) { - cpu->pc = 0xBFC3A99Cu; - SCPH1001_func_1FC3A95C(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AA20(CPUState* cpu) { - cpu->pc = 0xBFC3AA20u; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AA24(CPUState* cpu) { - cpu->pc = 0xBFC3AA24u; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AA4C(CPUState* cpu) { - cpu->pc = 0xBFC3AA4Cu; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AA50(CPUState* cpu) { - cpu->pc = 0xBFC3AA50u; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AA9C(CPUState* cpu) { - cpu->pc = 0xBFC3AA9Cu; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AAA8(CPUState* cpu) { - cpu->pc = 0xBFC3AAA8u; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AAB0(CPUState* cpu) { - cpu->pc = 0xBFC3AAB0u; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3A9EC_cont_BFC3AABC(CPUState* cpu) { - cpu->pc = 0xBFC3AABCu; - SCPH1001_func_1FC3A9EC(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AAE0(CPUState* cpu) { - cpu->pc = 0xBFC3AAE0u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AAF4(CPUState* cpu) { - cpu->pc = 0xBFC3AAF4u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AB20(CPUState* cpu) { - cpu->pc = 0xBFC3AB20u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AB34(CPUState* cpu) { - cpu->pc = 0xBFC3AB34u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AB50(CPUState* cpu) { - cpu->pc = 0xBFC3AB50u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AAC4_cont_BFC3AB68(CPUState* cpu) { - cpu->pc = 0xBFC3AB68u; - SCPH1001_func_1FC3AAC4(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3ABB4(CPUState* cpu) { - cpu->pc = 0xBFC3ABB4u; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3ABD8(CPUState* cpu) { - cpu->pc = 0xBFC3ABD8u; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3ABDC(CPUState* cpu) { - cpu->pc = 0xBFC3ABDCu; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3ABF4(CPUState* cpu) { - cpu->pc = 0xBFC3ABF4u; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3AC18(CPUState* cpu) { - cpu->pc = 0xBFC3AC18u; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3AC1C(CPUState* cpu) { - cpu->pc = 0xBFC3AC1Cu; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AB70_cont_BFC3AC34(CPUState* cpu) { - cpu->pc = 0xBFC3AC34u; - SCPH1001_func_1FC3AB70(cpu); -} - -void SCPH1001_func_1FC3AC9C_cont_BFC3ACB0(CPUState* cpu) { - cpu->pc = 0xBFC3ACB0u; - SCPH1001_func_1FC3AC9C(cpu); -} - -void SCPH1001_func_1FC3AC9C_cont_BFC3ACB8(CPUState* cpu) { - cpu->pc = 0xBFC3ACB8u; - SCPH1001_func_1FC3AC9C(cpu); -} - -void SCPH1001_func_1FC3AC9C_cont_BFC3ACD0(CPUState* cpu) { - cpu->pc = 0xBFC3ACD0u; - SCPH1001_func_1FC3AC9C(cpu); -} - -void SCPH1001_func_1FC3AC9C_cont_BFC3ACE8(CPUState* cpu) { - cpu->pc = 0xBFC3ACE8u; - SCPH1001_func_1FC3AC9C(cpu); -} - -void SCPH1001_func_1FC3AC9C_cont_BFC3ACF4(CPUState* cpu) { - cpu->pc = 0xBFC3ACF4u; - SCPH1001_func_1FC3AC9C(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3ADA0(CPUState* cpu) { - cpu->pc = 0xBFC3ADA0u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3ADA8(CPUState* cpu) { - cpu->pc = 0xBFC3ADA8u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3ADB0(CPUState* cpu) { - cpu->pc = 0xBFC3ADB0u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE34(CPUState* cpu) { - cpu->pc = 0xBFC3AE34u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE48(CPUState* cpu) { - cpu->pc = 0xBFC3AE48u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE50(CPUState* cpu) { - cpu->pc = 0xBFC3AE50u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE60(CPUState* cpu) { - cpu->pc = 0xBFC3AE60u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE68(CPUState* cpu) { - cpu->pc = 0xBFC3AE68u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE6C(CPUState* cpu) { - cpu->pc = 0xBFC3AE6Cu; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE74(CPUState* cpu) { - cpu->pc = 0xBFC3AE74u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AE84(CPUState* cpu) { - cpu->pc = 0xBFC3AE84u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AEB0(CPUState* cpu) { - cpu->pc = 0xBFC3AEB0u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AF44(CPUState* cpu) { - cpu->pc = 0xBFC3AF44u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AF68(CPUState* cpu) { - cpu->pc = 0xBFC3AF68u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AF70(CPUState* cpu) { - cpu->pc = 0xBFC3AF70u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AFD8(CPUState* cpu) { - cpu->pc = 0xBFC3AFD8u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AFE0(CPUState* cpu) { - cpu->pc = 0xBFC3AFE0u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3AFEC(CPUState* cpu) { - cpu->pc = 0xBFC3AFECu; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3B004(CPUState* cpu) { - cpu->pc = 0xBFC3B004u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3B018(CPUState* cpu) { - cpu->pc = 0xBFC3B018u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3B028(CPUState* cpu) { - cpu->pc = 0xBFC3B028u; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3B02C(CPUState* cpu) { - cpu->pc = 0xBFC3B02Cu; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3AD68_cont_BFC3B03C(CPUState* cpu) { - cpu->pc = 0xBFC3B03Cu; - SCPH1001_func_1FC3AD68(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B0A8(CPUState* cpu) { - cpu->pc = 0xBFC3B0A8u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B0B8(CPUState* cpu) { - cpu->pc = 0xBFC3B0B8u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B0D4(CPUState* cpu) { - cpu->pc = 0xBFC3B0D4u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B0E4(CPUState* cpu) { - cpu->pc = 0xBFC3B0E4u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B0F4(CPUState* cpu) { - cpu->pc = 0xBFC3B0F4u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B104(CPUState* cpu) { - cpu->pc = 0xBFC3B104u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B110(CPUState* cpu) { - cpu->pc = 0xBFC3B110u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B118(CPUState* cpu) { - cpu->pc = 0xBFC3B118u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B12C(CPUState* cpu) { - cpu->pc = 0xBFC3B12Cu; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B054_cont_BFC3B134(CPUState* cpu) { - cpu->pc = 0xBFC3B134u; - SCPH1001_func_1FC3B054(cpu); -} - -void SCPH1001_func_1FC3B160_cont_BFC3B174(CPUState* cpu) { - cpu->pc = 0xBFC3B174u; - SCPH1001_func_1FC3B160(cpu); -} - -void SCPH1001_func_1FC3B160_cont_BFC3B17C(CPUState* cpu) { - cpu->pc = 0xBFC3B17Cu; - SCPH1001_func_1FC3B160(cpu); -} - -void SCPH1001_func_1FC3B160_cont_BFC3B1B8(CPUState* cpu) { - cpu->pc = 0xBFC3B1B8u; - SCPH1001_func_1FC3B160(cpu); -} - -void SCPH1001_func_1FC3B30C_cont_BFC3B320(CPUState* cpu) { - cpu->pc = 0xBFC3B320u; - SCPH1001_func_1FC3B30C(cpu); -} - -void SCPH1001_func_1FC3B30C_cont_BFC3B338(CPUState* cpu) { - cpu->pc = 0xBFC3B338u; - SCPH1001_func_1FC3B30C(cpu); -} - -void SCPH1001_func_1FC3B30C_cont_BFC3B350(CPUState* cpu) { - cpu->pc = 0xBFC3B350u; - SCPH1001_func_1FC3B30C(cpu); -} - -void SCPH1001_func_1FC3B30C_cont_BFC3B358(CPUState* cpu) { - cpu->pc = 0xBFC3B358u; - SCPH1001_func_1FC3B30C(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B388(CPUState* cpu) { - cpu->pc = 0xBFC3B388u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B39C(CPUState* cpu) { - cpu->pc = 0xBFC3B39Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3A4(CPUState* cpu) { - cpu->pc = 0xBFC3B3A4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3B4(CPUState* cpu) { - cpu->pc = 0xBFC3B3B4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3C4(CPUState* cpu) { - cpu->pc = 0xBFC3B3C4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3CC(CPUState* cpu) { - cpu->pc = 0xBFC3B3CCu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3D4(CPUState* cpu) { - cpu->pc = 0xBFC3B3D4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3E0(CPUState* cpu) { - cpu->pc = 0xBFC3B3E0u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3EC(CPUState* cpu) { - cpu->pc = 0xBFC3B3ECu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B3FC(CPUState* cpu) { - cpu->pc = 0xBFC3B3FCu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B424(CPUState* cpu) { - cpu->pc = 0xBFC3B424u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B430(CPUState* cpu) { - cpu->pc = 0xBFC3B430u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B438(CPUState* cpu) { - cpu->pc = 0xBFC3B438u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B444(CPUState* cpu) { - cpu->pc = 0xBFC3B444u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B460(CPUState* cpu) { - cpu->pc = 0xBFC3B460u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B46C(CPUState* cpu) { - cpu->pc = 0xBFC3B46Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B470(CPUState* cpu) { - cpu->pc = 0xBFC3B470u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B490(CPUState* cpu) { - cpu->pc = 0xBFC3B490u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B498(CPUState* cpu) { - cpu->pc = 0xBFC3B498u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B4A8(CPUState* cpu) { - cpu->pc = 0xBFC3B4A8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B4C4(CPUState* cpu) { - cpu->pc = 0xBFC3B4C4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B4C8(CPUState* cpu) { - cpu->pc = 0xBFC3B4C8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B4F0(CPUState* cpu) { - cpu->pc = 0xBFC3B4F0u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B4FC(CPUState* cpu) { - cpu->pc = 0xBFC3B4FCu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B50C(CPUState* cpu) { - cpu->pc = 0xBFC3B50Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B528(CPUState* cpu) { - cpu->pc = 0xBFC3B528u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B530(CPUState* cpu) { - cpu->pc = 0xBFC3B530u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B544(CPUState* cpu) { - cpu->pc = 0xBFC3B544u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B548(CPUState* cpu) { - cpu->pc = 0xBFC3B548u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B554(CPUState* cpu) { - cpu->pc = 0xBFC3B554u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B558(CPUState* cpu) { - cpu->pc = 0xBFC3B558u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B560(CPUState* cpu) { - cpu->pc = 0xBFC3B560u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B57C(CPUState* cpu) { - cpu->pc = 0xBFC3B57Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B58C(CPUState* cpu) { - cpu->pc = 0xBFC3B58Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B5A8(CPUState* cpu) { - cpu->pc = 0xBFC3B5A8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B5AC(CPUState* cpu) { - cpu->pc = 0xBFC3B5ACu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B5E0(CPUState* cpu) { - cpu->pc = 0xBFC3B5E0u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B5EC(CPUState* cpu) { - cpu->pc = 0xBFC3B5ECu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B610(CPUState* cpu) { - cpu->pc = 0xBFC3B610u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B614(CPUState* cpu) { - cpu->pc = 0xBFC3B614u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B62C(CPUState* cpu) { - cpu->pc = 0xBFC3B62Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B634(CPUState* cpu) { - cpu->pc = 0xBFC3B634u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B668(CPUState* cpu) { - cpu->pc = 0xBFC3B668u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B674(CPUState* cpu) { - cpu->pc = 0xBFC3B674u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B698(CPUState* cpu) { - cpu->pc = 0xBFC3B698u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B6A4(CPUState* cpu) { - cpu->pc = 0xBFC3B6A4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B6AC(CPUState* cpu) { - cpu->pc = 0xBFC3B6ACu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B6B8(CPUState* cpu) { - cpu->pc = 0xBFC3B6B8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B6C4(CPUState* cpu) { - cpu->pc = 0xBFC3B6C4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B6EC(CPUState* cpu) { - cpu->pc = 0xBFC3B6ECu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B70C(CPUState* cpu) { - cpu->pc = 0xBFC3B70Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B71C(CPUState* cpu) { - cpu->pc = 0xBFC3B71Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B738(CPUState* cpu) { - cpu->pc = 0xBFC3B738u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B750(CPUState* cpu) { - cpu->pc = 0xBFC3B750u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B760(CPUState* cpu) { - cpu->pc = 0xBFC3B760u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B77C(CPUState* cpu) { - cpu->pc = 0xBFC3B77Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B780(CPUState* cpu) { - cpu->pc = 0xBFC3B780u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B798(CPUState* cpu) { - cpu->pc = 0xBFC3B798u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7AC(CPUState* cpu) { - cpu->pc = 0xBFC3B7ACu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7B4(CPUState* cpu) { - cpu->pc = 0xBFC3B7B4u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7B8(CPUState* cpu) { - cpu->pc = 0xBFC3B7B8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7C0(CPUState* cpu) { - cpu->pc = 0xBFC3B7C0u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7D8(CPUState* cpu) { - cpu->pc = 0xBFC3B7D8u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7DC(CPUState* cpu) { - cpu->pc = 0xBFC3B7DCu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B7F0(CPUState* cpu) { - cpu->pc = 0xBFC3B7F0u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B808(CPUState* cpu) { - cpu->pc = 0xBFC3B808u; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B80C(CPUState* cpu) { - cpu->pc = 0xBFC3B80Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B81C(CPUState* cpu) { - cpu->pc = 0xBFC3B81Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B82C(CPUState* cpu) { - cpu->pc = 0xBFC3B82Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B368_cont_BFC3B84C(CPUState* cpu) { - cpu->pc = 0xBFC3B84Cu; - SCPH1001_func_1FC3B368(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B87C(CPUState* cpu) { - cpu->pc = 0xBFC3B87Cu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B884(CPUState* cpu) { - cpu->pc = 0xBFC3B884u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B88C(CPUState* cpu) { - cpu->pc = 0xBFC3B88Cu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8A8(CPUState* cpu) { - cpu->pc = 0xBFC3B8A8u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8B0(CPUState* cpu) { - cpu->pc = 0xBFC3B8B0u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8B4(CPUState* cpu) { - cpu->pc = 0xBFC3B8B4u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8D0(CPUState* cpu) { - cpu->pc = 0xBFC3B8D0u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8DC(CPUState* cpu) { - cpu->pc = 0xBFC3B8DCu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B8FC(CPUState* cpu) { - cpu->pc = 0xBFC3B8FCu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B914(CPUState* cpu) { - cpu->pc = 0xBFC3B914u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B91C(CPUState* cpu) { - cpu->pc = 0xBFC3B91Cu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B920(CPUState* cpu) { - cpu->pc = 0xBFC3B920u; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B85C_cont_BFC3B92C(CPUState* cpu) { - cpu->pc = 0xBFC3B92Cu; - SCPH1001_func_1FC3B85C(cpu); -} - -void SCPH1001_func_1FC3B93C_cont_BFC3B950(CPUState* cpu) { - cpu->pc = 0xBFC3B950u; - SCPH1001_func_1FC3B93C(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3B9BC(CPUState* cpu) { - cpu->pc = 0xBFC3B9BCu; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3B9CC(CPUState* cpu) { - cpu->pc = 0xBFC3B9CCu; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3BA4C(CPUState* cpu) { - cpu->pc = 0xBFC3BA4Cu; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3BA58(CPUState* cpu) { - cpu->pc = 0xBFC3BA58u; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3BA60(CPUState* cpu) { - cpu->pc = 0xBFC3BA60u; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3B964_cont_BFC3BA6C(CPUState* cpu) { - cpu->pc = 0xBFC3BA6Cu; - SCPH1001_func_1FC3B964(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BA98(CPUState* cpu) { - cpu->pc = 0xBFC3BA98u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BAA4(CPUState* cpu) { - cpu->pc = 0xBFC3BAA4u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BAAC(CPUState* cpu) { - cpu->pc = 0xBFC3BAACu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BADC(CPUState* cpu) { - cpu->pc = 0xBFC3BADCu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BAF0(CPUState* cpu) { - cpu->pc = 0xBFC3BAF0u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BAFC(CPUState* cpu) { - cpu->pc = 0xBFC3BAFCu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB10(CPUState* cpu) { - cpu->pc = 0xBFC3BB10u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB14(CPUState* cpu) { - cpu->pc = 0xBFC3BB14u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB20(CPUState* cpu) { - cpu->pc = 0xBFC3BB20u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB28(CPUState* cpu) { - cpu->pc = 0xBFC3BB28u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB2C(CPUState* cpu) { - cpu->pc = 0xBFC3BB2Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB3C(CPUState* cpu) { - cpu->pc = 0xBFC3BB3Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB40(CPUState* cpu) { - cpu->pc = 0xBFC3BB40u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB60(CPUState* cpu) { - cpu->pc = 0xBFC3BB60u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB64(CPUState* cpu) { - cpu->pc = 0xBFC3BB64u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB70(CPUState* cpu) { - cpu->pc = 0xBFC3BB70u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB78(CPUState* cpu) { - cpu->pc = 0xBFC3BB78u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB7C(CPUState* cpu) { - cpu->pc = 0xBFC3BB7Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BB88(CPUState* cpu) { - cpu->pc = 0xBFC3BB88u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BBD4(CPUState* cpu) { - cpu->pc = 0xBFC3BBD4u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BBE0(CPUState* cpu) { - cpu->pc = 0xBFC3BBE0u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BBEC(CPUState* cpu) { - cpu->pc = 0xBFC3BBECu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BC0C(CPUState* cpu) { - cpu->pc = 0xBFC3BC0Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BC14(CPUState* cpu) { - cpu->pc = 0xBFC3BC14u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BC8C(CPUState* cpu) { - cpu->pc = 0xBFC3BC8Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BC9C(CPUState* cpu) { - cpu->pc = 0xBFC3BC9Cu; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BCA8(CPUState* cpu) { - cpu->pc = 0xBFC3BCA8u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BA74_cont_BFC3BCB0(CPUState* cpu) { - cpu->pc = 0xBFC3BCB0u; - SCPH1001_func_1FC3BA74(cpu); -} - -void SCPH1001_func_1FC3BD78_cont_BFC3BD88(CPUState* cpu) { - cpu->pc = 0xBFC3BD88u; - SCPH1001_func_1FC3BD78(cpu); -} - -void SCPH1001_func_1FC3BD98_cont_BFC3BDA8(CPUState* cpu) { - cpu->pc = 0xBFC3BDA8u; - SCPH1001_func_1FC3BD98(cpu); -} - -void SCPH1001_func_1FC3BDB8_cont_BFC3BDCC(CPUState* cpu) { - cpu->pc = 0xBFC3BDCCu; - SCPH1001_func_1FC3BDB8(cpu); -} - -void SCPH1001_func_1FC3BDB8_cont_BFC3BDD8(CPUState* cpu) { - cpu->pc = 0xBFC3BDD8u; - SCPH1001_func_1FC3BDB8(cpu); -} - -void SCPH1001_func_1FC3BDB8_cont_BFC3BDF8(CPUState* cpu) { - cpu->pc = 0xBFC3BDF8u; - SCPH1001_func_1FC3BDB8(cpu); -} - -void SCPH1001_func_1FC3BDB8_cont_BFC3BE04(CPUState* cpu) { - cpu->pc = 0xBFC3BE04u; - SCPH1001_func_1FC3BDB8(cpu); -} - -void SCPH1001_func_1FC3BDB8_cont_BFC3BE08(CPUState* cpu) { - cpu->pc = 0xBFC3BE08u; - SCPH1001_func_1FC3BDB8(cpu); -} - -void SCPH1001_func_1FC3BE6C_cont_BFC3BE7C(CPUState* cpu) { - cpu->pc = 0xBFC3BE7Cu; - SCPH1001_func_1FC3BE6C(cpu); -} - -void SCPH1001_func_1FC3BE90_cont_BFC3BEF4(CPUState* cpu) { - cpu->pc = 0xBFC3BEF4u; - SCPH1001_func_1FC3BE90(cpu); -} - -void SCPH1001_func_1FC3BF10_cont_BFC3BF30(CPUState* cpu) { - cpu->pc = 0xBFC3BF30u; - SCPH1001_func_1FC3BF10(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF64(CPUState* cpu) { - cpu->pc = 0xBFC3BF64u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF6C(CPUState* cpu) { - cpu->pc = 0xBFC3BF6Cu; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF74(CPUState* cpu) { - cpu->pc = 0xBFC3BF74u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF84(CPUState* cpu) { - cpu->pc = 0xBFC3BF84u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF8C(CPUState* cpu) { - cpu->pc = 0xBFC3BF8Cu; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BF98(CPUState* cpu) { - cpu->pc = 0xBFC3BF98u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFA0(CPUState* cpu) { - cpu->pc = 0xBFC3BFA0u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFA8(CPUState* cpu) { - cpu->pc = 0xBFC3BFA8u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFB4(CPUState* cpu) { - cpu->pc = 0xBFC3BFB4u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFBC(CPUState* cpu) { - cpu->pc = 0xBFC3BFBCu; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFCC(CPUState* cpu) { - cpu->pc = 0xBFC3BFCCu; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BF40_cont_BFC3BFD8(CPUState* cpu) { - cpu->pc = 0xBFC3BFD8u; - SCPH1001_func_1FC3BF40(cpu); -} - -void SCPH1001_func_1FC3BFF0_cont_BFC3C014(CPUState* cpu) { - cpu->pc = 0xBFC3C014u; - SCPH1001_func_1FC3BFF0(cpu); -} - -void SCPH1001_func_1FC3BFF0_cont_BFC3C024(CPUState* cpu) { - cpu->pc = 0xBFC3C024u; - SCPH1001_func_1FC3BFF0(cpu); -} - -void SCPH1001_func_1FC3BFF0_cont_BFC3C030(CPUState* cpu) { - cpu->pc = 0xBFC3C030u; - SCPH1001_func_1FC3BFF0(cpu); -} - -void SCPH1001_func_1FC3BFF0_cont_BFC3C044(CPUState* cpu) { - cpu->pc = 0xBFC3C044u; - SCPH1001_func_1FC3BFF0(cpu); -} - -void SCPH1001_func_1FC3BFF0_cont_BFC3C050(CPUState* cpu) { - cpu->pc = 0xBFC3C050u; - SCPH1001_func_1FC3BFF0(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C070(CPUState* cpu) { - cpu->pc = 0xBFC3C070u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C080(CPUState* cpu) { - cpu->pc = 0xBFC3C080u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C0D8(CPUState* cpu) { - cpu->pc = 0xBFC3C0D8u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C0F0(CPUState* cpu) { - cpu->pc = 0xBFC3C0F0u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C100(CPUState* cpu) { - cpu->pc = 0xBFC3C100u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C118(CPUState* cpu) { - cpu->pc = 0xBFC3C118u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C128(CPUState* cpu) { - cpu->pc = 0xBFC3C128u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C060_cont_BFC3C130(CPUState* cpu) { - cpu->pc = 0xBFC3C130u; - SCPH1001_func_1FC3C060(cpu); -} - -void SCPH1001_func_1FC3C140_cont_BFC3C15C(CPUState* cpu) { - cpu->pc = 0xBFC3C15Cu; - SCPH1001_func_1FC3C140(cpu); -} - -void SCPH1001_func_1FC3C140_cont_BFC3C160(CPUState* cpu) { - cpu->pc = 0xBFC3C160u; - SCPH1001_func_1FC3C140(cpu); -} - -void SCPH1001_func_1FC3C140_cont_BFC3C194(CPUState* cpu) { - cpu->pc = 0xBFC3C194u; - SCPH1001_func_1FC3C140(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C1EC(CPUState* cpu) { - cpu->pc = 0xBFC3C1ECu; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C200(CPUState* cpu) { - cpu->pc = 0xBFC3C200u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C208(CPUState* cpu) { - cpu->pc = 0xBFC3C208u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C218(CPUState* cpu) { - cpu->pc = 0xBFC3C218u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C230(CPUState* cpu) { - cpu->pc = 0xBFC3C230u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C240(CPUState* cpu) { - cpu->pc = 0xBFC3C240u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C254(CPUState* cpu) { - cpu->pc = 0xBFC3C254u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C258(CPUState* cpu) { - cpu->pc = 0xBFC3C258u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C25C(CPUState* cpu) { - cpu->pc = 0xBFC3C25Cu; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C2C0(CPUState* cpu) { - cpu->pc = 0xBFC3C2C0u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C2E0(CPUState* cpu) { - cpu->pc = 0xBFC3C2E0u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C384(CPUState* cpu) { - cpu->pc = 0xBFC3C384u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3A8(CPUState* cpu) { - cpu->pc = 0xBFC3C3A8u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3B0(CPUState* cpu) { - cpu->pc = 0xBFC3C3B0u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3B8(CPUState* cpu) { - cpu->pc = 0xBFC3C3B8u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3C0(CPUState* cpu) { - cpu->pc = 0xBFC3C3C0u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3E4(CPUState* cpu) { - cpu->pc = 0xBFC3C3E4u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3EC(CPUState* cpu) { - cpu->pc = 0xBFC3C3ECu; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3F4(CPUState* cpu) { - cpu->pc = 0xBFC3C3F4u; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C19C_cont_BFC3C3FC(CPUState* cpu) { - cpu->pc = 0xBFC3C3FCu; - SCPH1001_func_1FC3C19C(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C46C(CPUState* cpu) { - cpu->pc = 0xBFC3C46Cu; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C478(CPUState* cpu) { - cpu->pc = 0xBFC3C478u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C488(CPUState* cpu) { - cpu->pc = 0xBFC3C488u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4A0(CPUState* cpu) { - cpu->pc = 0xBFC3C4A0u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4A8(CPUState* cpu) { - cpu->pc = 0xBFC3C4A8u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4BC(CPUState* cpu) { - cpu->pc = 0xBFC3C4BCu; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4C0(CPUState* cpu) { - cpu->pc = 0xBFC3C4C0u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4C4(CPUState* cpu) { - cpu->pc = 0xBFC3C4C4u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C428_cont_BFC3C4D0(CPUState* cpu) { - cpu->pc = 0xBFC3C4D0u; - SCPH1001_func_1FC3C428(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C528(CPUState* cpu) { - cpu->pc = 0xBFC3C528u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C53C(CPUState* cpu) { - cpu->pc = 0xBFC3C53Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C540(CPUState* cpu) { - cpu->pc = 0xBFC3C540u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C54C(CPUState* cpu) { - cpu->pc = 0xBFC3C54Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C564(CPUState* cpu) { - cpu->pc = 0xBFC3C564u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C574(CPUState* cpu) { - cpu->pc = 0xBFC3C574u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C588(CPUState* cpu) { - cpu->pc = 0xBFC3C588u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C58C(CPUState* cpu) { - cpu->pc = 0xBFC3C58Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C594(CPUState* cpu) { - cpu->pc = 0xBFC3C594u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C59C(CPUState* cpu) { - cpu->pc = 0xBFC3C59Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5A4(CPUState* cpu) { - cpu->pc = 0xBFC3C5A4u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5AC(CPUState* cpu) { - cpu->pc = 0xBFC3C5ACu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5B0(CPUState* cpu) { - cpu->pc = 0xBFC3C5B0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5B8(CPUState* cpu) { - cpu->pc = 0xBFC3C5B8u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5D0(CPUState* cpu) { - cpu->pc = 0xBFC3C5D0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C5F0(CPUState* cpu) { - cpu->pc = 0xBFC3C5F0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C604(CPUState* cpu) { - cpu->pc = 0xBFC3C604u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C608(CPUState* cpu) { - cpu->pc = 0xBFC3C608u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C614(CPUState* cpu) { - cpu->pc = 0xBFC3C614u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C62C(CPUState* cpu) { - cpu->pc = 0xBFC3C62Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C63C(CPUState* cpu) { - cpu->pc = 0xBFC3C63Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C650(CPUState* cpu) { - cpu->pc = 0xBFC3C650u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C654(CPUState* cpu) { - cpu->pc = 0xBFC3C654u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C65C(CPUState* cpu) { - cpu->pc = 0xBFC3C65Cu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C664(CPUState* cpu) { - cpu->pc = 0xBFC3C664u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C670(CPUState* cpu) { - cpu->pc = 0xBFC3C670u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C678(CPUState* cpu) { - cpu->pc = 0xBFC3C678u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6A0(CPUState* cpu) { - cpu->pc = 0xBFC3C6A0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6A8(CPUState* cpu) { - cpu->pc = 0xBFC3C6A8u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6B8(CPUState* cpu) { - cpu->pc = 0xBFC3C6B8u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6D0(CPUState* cpu) { - cpu->pc = 0xBFC3C6D0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6D8(CPUState* cpu) { - cpu->pc = 0xBFC3C6D8u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6EC(CPUState* cpu) { - cpu->pc = 0xBFC3C6ECu; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6F0(CPUState* cpu) { - cpu->pc = 0xBFC3C6F0u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C4E0_cont_BFC3C6F4(CPUState* cpu) { - cpu->pc = 0xBFC3C6F4u; - SCPH1001_func_1FC3C4E0(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C740(CPUState* cpu) { - cpu->pc = 0xBFC3C740u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C748(CPUState* cpu) { - cpu->pc = 0xBFC3C748u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C750(CPUState* cpu) { - cpu->pc = 0xBFC3C750u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C758(CPUState* cpu) { - cpu->pc = 0xBFC3C758u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C76C(CPUState* cpu) { - cpu->pc = 0xBFC3C76Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C780(CPUState* cpu) { - cpu->pc = 0xBFC3C780u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C794(CPUState* cpu) { - cpu->pc = 0xBFC3C794u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C79C(CPUState* cpu) { - cpu->pc = 0xBFC3C79Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7A0(CPUState* cpu) { - cpu->pc = 0xBFC3C7A0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7A8(CPUState* cpu) { - cpu->pc = 0xBFC3C7A8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7B0(CPUState* cpu) { - cpu->pc = 0xBFC3C7B0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7C8(CPUState* cpu) { - cpu->pc = 0xBFC3C7C8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7E0(CPUState* cpu) { - cpu->pc = 0xBFC3C7E0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C7F4(CPUState* cpu) { - cpu->pc = 0xBFC3C7F4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C800(CPUState* cpu) { - cpu->pc = 0xBFC3C800u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C808(CPUState* cpu) { - cpu->pc = 0xBFC3C808u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C828(CPUState* cpu) { - cpu->pc = 0xBFC3C828u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C83C(CPUState* cpu) { - cpu->pc = 0xBFC3C83Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C85C(CPUState* cpu) { - cpu->pc = 0xBFC3C85Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C864(CPUState* cpu) { - cpu->pc = 0xBFC3C864u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C874(CPUState* cpu) { - cpu->pc = 0xBFC3C874u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C88C(CPUState* cpu) { - cpu->pc = 0xBFC3C88Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C894(CPUState* cpu) { - cpu->pc = 0xBFC3C894u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8A8(CPUState* cpu) { - cpu->pc = 0xBFC3C8A8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8B0(CPUState* cpu) { - cpu->pc = 0xBFC3C8B0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8BC(CPUState* cpu) { - cpu->pc = 0xBFC3C8BCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8CC(CPUState* cpu) { - cpu->pc = 0xBFC3C8CCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8D0(CPUState* cpu) { - cpu->pc = 0xBFC3C8D0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8DC(CPUState* cpu) { - cpu->pc = 0xBFC3C8DCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8E4(CPUState* cpu) { - cpu->pc = 0xBFC3C8E4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8E8(CPUState* cpu) { - cpu->pc = 0xBFC3C8E8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8F0(CPUState* cpu) { - cpu->pc = 0xBFC3C8F0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C8F8(CPUState* cpu) { - cpu->pc = 0xBFC3C8F8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C918(CPUState* cpu) { - cpu->pc = 0xBFC3C918u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C92C(CPUState* cpu) { - cpu->pc = 0xBFC3C92Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C940(CPUState* cpu) { - cpu->pc = 0xBFC3C940u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C960(CPUState* cpu) { - cpu->pc = 0xBFC3C960u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C968(CPUState* cpu) { - cpu->pc = 0xBFC3C968u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C978(CPUState* cpu) { - cpu->pc = 0xBFC3C978u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C990(CPUState* cpu) { - cpu->pc = 0xBFC3C990u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C998(CPUState* cpu) { - cpu->pc = 0xBFC3C998u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9AC(CPUState* cpu) { - cpu->pc = 0xBFC3C9ACu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9B4(CPUState* cpu) { - cpu->pc = 0xBFC3C9B4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9C0(CPUState* cpu) { - cpu->pc = 0xBFC3C9C0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9D0(CPUState* cpu) { - cpu->pc = 0xBFC3C9D0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9D4(CPUState* cpu) { - cpu->pc = 0xBFC3C9D4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9E0(CPUState* cpu) { - cpu->pc = 0xBFC3C9E0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9E8(CPUState* cpu) { - cpu->pc = 0xBFC3C9E8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9EC(CPUState* cpu) { - cpu->pc = 0xBFC3C9ECu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9F4(CPUState* cpu) { - cpu->pc = 0xBFC3C9F4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3C9FC(CPUState* cpu) { - cpu->pc = 0xBFC3C9FCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA14(CPUState* cpu) { - cpu->pc = 0xBFC3CA14u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA24(CPUState* cpu) { - cpu->pc = 0xBFC3CA24u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA3C(CPUState* cpu) { - cpu->pc = 0xBFC3CA3Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA4C(CPUState* cpu) { - cpu->pc = 0xBFC3CA4Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA5C(CPUState* cpu) { - cpu->pc = 0xBFC3CA5Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA74(CPUState* cpu) { - cpu->pc = 0xBFC3CA74u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA7C(CPUState* cpu) { - cpu->pc = 0xBFC3CA7Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CA98(CPUState* cpu) { - cpu->pc = 0xBFC3CA98u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CAB4(CPUState* cpu) { - cpu->pc = 0xBFC3CAB4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CACC(CPUState* cpu) { - cpu->pc = 0xBFC3CACCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CAF4(CPUState* cpu) { - cpu->pc = 0xBFC3CAF4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB08(CPUState* cpu) { - cpu->pc = 0xBFC3CB08u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB14(CPUState* cpu) { - cpu->pc = 0xBFC3CB14u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB1C(CPUState* cpu) { - cpu->pc = 0xBFC3CB1Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB30(CPUState* cpu) { - cpu->pc = 0xBFC3CB30u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB3C(CPUState* cpu) { - cpu->pc = 0xBFC3CB3Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB4C(CPUState* cpu) { - cpu->pc = 0xBFC3CB4Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB50(CPUState* cpu) { - cpu->pc = 0xBFC3CB50u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB5C(CPUState* cpu) { - cpu->pc = 0xBFC3CB5Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB64(CPUState* cpu) { - cpu->pc = 0xBFC3CB64u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB68(CPUState* cpu) { - cpu->pc = 0xBFC3CB68u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB70(CPUState* cpu) { - cpu->pc = 0xBFC3CB70u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB78(CPUState* cpu) { - cpu->pc = 0xBFC3CB78u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB88(CPUState* cpu) { - cpu->pc = 0xBFC3CB88u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CB9C(CPUState* cpu) { - cpu->pc = 0xBFC3CB9Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CBB8(CPUState* cpu) { - cpu->pc = 0xBFC3CBB8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CBC0(CPUState* cpu) { - cpu->pc = 0xBFC3CBC0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CBC8(CPUState* cpu) { - cpu->pc = 0xBFC3CBC8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC08(CPUState* cpu) { - cpu->pc = 0xBFC3CC08u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC28(CPUState* cpu) { - cpu->pc = 0xBFC3CC28u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC70(CPUState* cpu) { - cpu->pc = 0xBFC3CC70u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC78(CPUState* cpu) { - cpu->pc = 0xBFC3CC78u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC80(CPUState* cpu) { - cpu->pc = 0xBFC3CC80u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC88(CPUState* cpu) { - cpu->pc = 0xBFC3CC88u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC90(CPUState* cpu) { - cpu->pc = 0xBFC3CC90u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CC9C(CPUState* cpu) { - cpu->pc = 0xBFC3CC9Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCA4(CPUState* cpu) { - cpu->pc = 0xBFC3CCA4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCAC(CPUState* cpu) { - cpu->pc = 0xBFC3CCACu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCB4(CPUState* cpu) { - cpu->pc = 0xBFC3CCB4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCBC(CPUState* cpu) { - cpu->pc = 0xBFC3CCBCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCC4(CPUState* cpu) { - cpu->pc = 0xBFC3CCC4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCCC(CPUState* cpu) { - cpu->pc = 0xBFC3CCCCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCD4(CPUState* cpu) { - cpu->pc = 0xBFC3CCD4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCDC(CPUState* cpu) { - cpu->pc = 0xBFC3CCDCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCE4(CPUState* cpu) { - cpu->pc = 0xBFC3CCE4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCE8(CPUState* cpu) { - cpu->pc = 0xBFC3CCE8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCF0(CPUState* cpu) { - cpu->pc = 0xBFC3CCF0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CCFC(CPUState* cpu) { - cpu->pc = 0xBFC3CCFCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD04(CPUState* cpu) { - cpu->pc = 0xBFC3CD04u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD10(CPUState* cpu) { - cpu->pc = 0xBFC3CD10u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD18(CPUState* cpu) { - cpu->pc = 0xBFC3CD18u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD20(CPUState* cpu) { - cpu->pc = 0xBFC3CD20u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD28(CPUState* cpu) { - cpu->pc = 0xBFC3CD28u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD34(CPUState* cpu) { - cpu->pc = 0xBFC3CD34u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD3C(CPUState* cpu) { - cpu->pc = 0xBFC3CD3Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD48(CPUState* cpu) { - cpu->pc = 0xBFC3CD48u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD50(CPUState* cpu) { - cpu->pc = 0xBFC3CD50u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD58(CPUState* cpu) { - cpu->pc = 0xBFC3CD58u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD60(CPUState* cpu) { - cpu->pc = 0xBFC3CD60u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD68(CPUState* cpu) { - cpu->pc = 0xBFC3CD68u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD70(CPUState* cpu) { - cpu->pc = 0xBFC3CD70u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD7C(CPUState* cpu) { - cpu->pc = 0xBFC3CD7Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD84(CPUState* cpu) { - cpu->pc = 0xBFC3CD84u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD90(CPUState* cpu) { - cpu->pc = 0xBFC3CD90u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CD98(CPUState* cpu) { - cpu->pc = 0xBFC3CD98u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDA0(CPUState* cpu) { - cpu->pc = 0xBFC3CDA0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDA8(CPUState* cpu) { - cpu->pc = 0xBFC3CDA8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDB4(CPUState* cpu) { - cpu->pc = 0xBFC3CDB4u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDBC(CPUState* cpu) { - cpu->pc = 0xBFC3CDBCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDC8(CPUState* cpu) { - cpu->pc = 0xBFC3CDC8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDD0(CPUState* cpu) { - cpu->pc = 0xBFC3CDD0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDD8(CPUState* cpu) { - cpu->pc = 0xBFC3CDD8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDE0(CPUState* cpu) { - cpu->pc = 0xBFC3CDE0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDE8(CPUState* cpu) { - cpu->pc = 0xBFC3CDE8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDF0(CPUState* cpu) { - cpu->pc = 0xBFC3CDF0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CDF8(CPUState* cpu) { - cpu->pc = 0xBFC3CDF8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE00(CPUState* cpu) { - cpu->pc = 0xBFC3CE00u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE0C(CPUState* cpu) { - cpu->pc = 0xBFC3CE0Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE14(CPUState* cpu) { - cpu->pc = 0xBFC3CE14u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE20(CPUState* cpu) { - cpu->pc = 0xBFC3CE20u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE28(CPUState* cpu) { - cpu->pc = 0xBFC3CE28u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE30(CPUState* cpu) { - cpu->pc = 0xBFC3CE30u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE38(CPUState* cpu) { - cpu->pc = 0xBFC3CE38u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE44(CPUState* cpu) { - cpu->pc = 0xBFC3CE44u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE4C(CPUState* cpu) { - cpu->pc = 0xBFC3CE4Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE58(CPUState* cpu) { - cpu->pc = 0xBFC3CE58u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE60(CPUState* cpu) { - cpu->pc = 0xBFC3CE60u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE68(CPUState* cpu) { - cpu->pc = 0xBFC3CE68u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE70(CPUState* cpu) { - cpu->pc = 0xBFC3CE70u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE78(CPUState* cpu) { - cpu->pc = 0xBFC3CE78u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE80(CPUState* cpu) { - cpu->pc = 0xBFC3CE80u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE8C(CPUState* cpu) { - cpu->pc = 0xBFC3CE8Cu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CE94(CPUState* cpu) { - cpu->pc = 0xBFC3CE94u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CEA0(CPUState* cpu) { - cpu->pc = 0xBFC3CEA0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CEA8(CPUState* cpu) { - cpu->pc = 0xBFC3CEA8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CEB0(CPUState* cpu) { - cpu->pc = 0xBFC3CEB0u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CEB8(CPUState* cpu) { - cpu->pc = 0xBFC3CEB8u; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3C710_cont_BFC3CEBC(CPUState* cpu) { - cpu->pc = 0xBFC3CEBCu; - SCPH1001_func_1FC3C710(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CED8(CPUState* cpu) { - cpu->pc = 0xBFC3CED8u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CEE0(CPUState* cpu) { - cpu->pc = 0xBFC3CEE0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CEE4(CPUState* cpu) { - cpu->pc = 0xBFC3CEE4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CEEC(CPUState* cpu) { - cpu->pc = 0xBFC3CEECu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CEF8(CPUState* cpu) { - cpu->pc = 0xBFC3CEF8u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF08(CPUState* cpu) { - cpu->pc = 0xBFC3CF08u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF1C(CPUState* cpu) { - cpu->pc = 0xBFC3CF1Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF24(CPUState* cpu) { - cpu->pc = 0xBFC3CF24u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF30(CPUState* cpu) { - cpu->pc = 0xBFC3CF30u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF3C(CPUState* cpu) { - cpu->pc = 0xBFC3CF3Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF44(CPUState* cpu) { - cpu->pc = 0xBFC3CF44u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF50(CPUState* cpu) { - cpu->pc = 0xBFC3CF50u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF5C(CPUState* cpu) { - cpu->pc = 0xBFC3CF5Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF64(CPUState* cpu) { - cpu->pc = 0xBFC3CF64u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF70(CPUState* cpu) { - cpu->pc = 0xBFC3CF70u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF7C(CPUState* cpu) { - cpu->pc = 0xBFC3CF7Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF84(CPUState* cpu) { - cpu->pc = 0xBFC3CF84u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF90(CPUState* cpu) { - cpu->pc = 0xBFC3CF90u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CF9C(CPUState* cpu) { - cpu->pc = 0xBFC3CF9Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFA4(CPUState* cpu) { - cpu->pc = 0xBFC3CFA4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFB0(CPUState* cpu) { - cpu->pc = 0xBFC3CFB0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFBC(CPUState* cpu) { - cpu->pc = 0xBFC3CFBCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFC4(CPUState* cpu) { - cpu->pc = 0xBFC3CFC4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFD0(CPUState* cpu) { - cpu->pc = 0xBFC3CFD0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFDC(CPUState* cpu) { - cpu->pc = 0xBFC3CFDCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFE4(CPUState* cpu) { - cpu->pc = 0xBFC3CFE4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFF0(CPUState* cpu) { - cpu->pc = 0xBFC3CFF0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3CFFC(CPUState* cpu) { - cpu->pc = 0xBFC3CFFCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D004(CPUState* cpu) { - cpu->pc = 0xBFC3D004u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D010(CPUState* cpu) { - cpu->pc = 0xBFC3D010u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D01C(CPUState* cpu) { - cpu->pc = 0xBFC3D01Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D024(CPUState* cpu) { - cpu->pc = 0xBFC3D024u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D030(CPUState* cpu) { - cpu->pc = 0xBFC3D030u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D03C(CPUState* cpu) { - cpu->pc = 0xBFC3D03Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D044(CPUState* cpu) { - cpu->pc = 0xBFC3D044u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D050(CPUState* cpu) { - cpu->pc = 0xBFC3D050u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D05C(CPUState* cpu) { - cpu->pc = 0xBFC3D05Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D064(CPUState* cpu) { - cpu->pc = 0xBFC3D064u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D070(CPUState* cpu) { - cpu->pc = 0xBFC3D070u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D07C(CPUState* cpu) { - cpu->pc = 0xBFC3D07Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D084(CPUState* cpu) { - cpu->pc = 0xBFC3D084u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D090(CPUState* cpu) { - cpu->pc = 0xBFC3D090u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D09C(CPUState* cpu) { - cpu->pc = 0xBFC3D09Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0A4(CPUState* cpu) { - cpu->pc = 0xBFC3D0A4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0B0(CPUState* cpu) { - cpu->pc = 0xBFC3D0B0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0BC(CPUState* cpu) { - cpu->pc = 0xBFC3D0BCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0C4(CPUState* cpu) { - cpu->pc = 0xBFC3D0C4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0D0(CPUState* cpu) { - cpu->pc = 0xBFC3D0D0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0DC(CPUState* cpu) { - cpu->pc = 0xBFC3D0DCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0E4(CPUState* cpu) { - cpu->pc = 0xBFC3D0E4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0F0(CPUState* cpu) { - cpu->pc = 0xBFC3D0F0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D0FC(CPUState* cpu) { - cpu->pc = 0xBFC3D0FCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D104(CPUState* cpu) { - cpu->pc = 0xBFC3D104u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D110(CPUState* cpu) { - cpu->pc = 0xBFC3D110u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D11C(CPUState* cpu) { - cpu->pc = 0xBFC3D11Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D124(CPUState* cpu) { - cpu->pc = 0xBFC3D124u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D130(CPUState* cpu) { - cpu->pc = 0xBFC3D130u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D13C(CPUState* cpu) { - cpu->pc = 0xBFC3D13Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D144(CPUState* cpu) { - cpu->pc = 0xBFC3D144u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D150(CPUState* cpu) { - cpu->pc = 0xBFC3D150u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D15C(CPUState* cpu) { - cpu->pc = 0xBFC3D15Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D164(CPUState* cpu) { - cpu->pc = 0xBFC3D164u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D170(CPUState* cpu) { - cpu->pc = 0xBFC3D170u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D17C(CPUState* cpu) { - cpu->pc = 0xBFC3D17Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D184(CPUState* cpu) { - cpu->pc = 0xBFC3D184u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D190(CPUState* cpu) { - cpu->pc = 0xBFC3D190u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D19C(CPUState* cpu) { - cpu->pc = 0xBFC3D19Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1A4(CPUState* cpu) { - cpu->pc = 0xBFC3D1A4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1B0(CPUState* cpu) { - cpu->pc = 0xBFC3D1B0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1BC(CPUState* cpu) { - cpu->pc = 0xBFC3D1BCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1C4(CPUState* cpu) { - cpu->pc = 0xBFC3D1C4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1D0(CPUState* cpu) { - cpu->pc = 0xBFC3D1D0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1DC(CPUState* cpu) { - cpu->pc = 0xBFC3D1DCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1E4(CPUState* cpu) { - cpu->pc = 0xBFC3D1E4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1F0(CPUState* cpu) { - cpu->pc = 0xBFC3D1F0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D1FC(CPUState* cpu) { - cpu->pc = 0xBFC3D1FCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D204(CPUState* cpu) { - cpu->pc = 0xBFC3D204u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D210(CPUState* cpu) { - cpu->pc = 0xBFC3D210u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D21C(CPUState* cpu) { - cpu->pc = 0xBFC3D21Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D224(CPUState* cpu) { - cpu->pc = 0xBFC3D224u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D230(CPUState* cpu) { - cpu->pc = 0xBFC3D230u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D23C(CPUState* cpu) { - cpu->pc = 0xBFC3D23Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D244(CPUState* cpu) { - cpu->pc = 0xBFC3D244u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D250(CPUState* cpu) { - cpu->pc = 0xBFC3D250u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D25C(CPUState* cpu) { - cpu->pc = 0xBFC3D25Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D264(CPUState* cpu) { - cpu->pc = 0xBFC3D264u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D270(CPUState* cpu) { - cpu->pc = 0xBFC3D270u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D27C(CPUState* cpu) { - cpu->pc = 0xBFC3D27Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D284(CPUState* cpu) { - cpu->pc = 0xBFC3D284u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D290(CPUState* cpu) { - cpu->pc = 0xBFC3D290u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D29C(CPUState* cpu) { - cpu->pc = 0xBFC3D29Cu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2A4(CPUState* cpu) { - cpu->pc = 0xBFC3D2A4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2B0(CPUState* cpu) { - cpu->pc = 0xBFC3D2B0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2BC(CPUState* cpu) { - cpu->pc = 0xBFC3D2BCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2C4(CPUState* cpu) { - cpu->pc = 0xBFC3D2C4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2D0(CPUState* cpu) { - cpu->pc = 0xBFC3D2D0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2DC(CPUState* cpu) { - cpu->pc = 0xBFC3D2DCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2E4(CPUState* cpu) { - cpu->pc = 0xBFC3D2E4u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2F0(CPUState* cpu) { - cpu->pc = 0xBFC3D2F0u; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3CEC8_cont_BFC3D2FC(CPUState* cpu) { - cpu->pc = 0xBFC3D2FCu; - SCPH1001_func_1FC3CEC8(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D314(CPUState* cpu) { - cpu->pc = 0xBFC3D314u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D31C(CPUState* cpu) { - cpu->pc = 0xBFC3D31Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D320(CPUState* cpu) { - cpu->pc = 0xBFC3D320u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D328(CPUState* cpu) { - cpu->pc = 0xBFC3D328u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D334(CPUState* cpu) { - cpu->pc = 0xBFC3D334u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D344(CPUState* cpu) { - cpu->pc = 0xBFC3D344u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D358(CPUState* cpu) { - cpu->pc = 0xBFC3D358u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D360(CPUState* cpu) { - cpu->pc = 0xBFC3D360u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D36C(CPUState* cpu) { - cpu->pc = 0xBFC3D36Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D378(CPUState* cpu) { - cpu->pc = 0xBFC3D378u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D380(CPUState* cpu) { - cpu->pc = 0xBFC3D380u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D38C(CPUState* cpu) { - cpu->pc = 0xBFC3D38Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D398(CPUState* cpu) { - cpu->pc = 0xBFC3D398u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3A0(CPUState* cpu) { - cpu->pc = 0xBFC3D3A0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3AC(CPUState* cpu) { - cpu->pc = 0xBFC3D3ACu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3B8(CPUState* cpu) { - cpu->pc = 0xBFC3D3B8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3C0(CPUState* cpu) { - cpu->pc = 0xBFC3D3C0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3CC(CPUState* cpu) { - cpu->pc = 0xBFC3D3CCu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3D8(CPUState* cpu) { - cpu->pc = 0xBFC3D3D8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3E0(CPUState* cpu) { - cpu->pc = 0xBFC3D3E0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3EC(CPUState* cpu) { - cpu->pc = 0xBFC3D3ECu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D3F8(CPUState* cpu) { - cpu->pc = 0xBFC3D3F8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D400(CPUState* cpu) { - cpu->pc = 0xBFC3D400u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D40C(CPUState* cpu) { - cpu->pc = 0xBFC3D40Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D41C(CPUState* cpu) { - cpu->pc = 0xBFC3D41Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D430(CPUState* cpu) { - cpu->pc = 0xBFC3D430u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D440(CPUState* cpu) { - cpu->pc = 0xBFC3D440u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D448(CPUState* cpu) { - cpu->pc = 0xBFC3D448u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D454(CPUState* cpu) { - cpu->pc = 0xBFC3D454u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D464(CPUState* cpu) { - cpu->pc = 0xBFC3D464u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D478(CPUState* cpu) { - cpu->pc = 0xBFC3D478u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D488(CPUState* cpu) { - cpu->pc = 0xBFC3D488u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D490(CPUState* cpu) { - cpu->pc = 0xBFC3D490u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D49C(CPUState* cpu) { - cpu->pc = 0xBFC3D49Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4A8(CPUState* cpu) { - cpu->pc = 0xBFC3D4A8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4B0(CPUState* cpu) { - cpu->pc = 0xBFC3D4B0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4BC(CPUState* cpu) { - cpu->pc = 0xBFC3D4BCu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4C8(CPUState* cpu) { - cpu->pc = 0xBFC3D4C8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4D0(CPUState* cpu) { - cpu->pc = 0xBFC3D4D0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4DC(CPUState* cpu) { - cpu->pc = 0xBFC3D4DCu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D4EC(CPUState* cpu) { - cpu->pc = 0xBFC3D4ECu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D500(CPUState* cpu) { - cpu->pc = 0xBFC3D500u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D510(CPUState* cpu) { - cpu->pc = 0xBFC3D510u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D518(CPUState* cpu) { - cpu->pc = 0xBFC3D518u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D524(CPUState* cpu) { - cpu->pc = 0xBFC3D524u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D534(CPUState* cpu) { - cpu->pc = 0xBFC3D534u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D548(CPUState* cpu) { - cpu->pc = 0xBFC3D548u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D558(CPUState* cpu) { - cpu->pc = 0xBFC3D558u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D560(CPUState* cpu) { - cpu->pc = 0xBFC3D560u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D56C(CPUState* cpu) { - cpu->pc = 0xBFC3D56Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D598(CPUState* cpu) { - cpu->pc = 0xBFC3D598u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D5A0(CPUState* cpu) { - cpu->pc = 0xBFC3D5A0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D5AC(CPUState* cpu) { - cpu->pc = 0xBFC3D5ACu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D5D8(CPUState* cpu) { - cpu->pc = 0xBFC3D5D8u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D5E0(CPUState* cpu) { - cpu->pc = 0xBFC3D5E0u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D5EC(CPUState* cpu) { - cpu->pc = 0xBFC3D5ECu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D618(CPUState* cpu) { - cpu->pc = 0xBFC3D618u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D620(CPUState* cpu) { - cpu->pc = 0xBFC3D620u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D62C(CPUState* cpu) { - cpu->pc = 0xBFC3D62Cu; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D304_cont_BFC3D654(CPUState* cpu) { - cpu->pc = 0xBFC3D654u; - SCPH1001_func_1FC3D304(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D6DC(CPUState* cpu) { - cpu->pc = 0xBFC3D6DCu; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D6E8(CPUState* cpu) { - cpu->pc = 0xBFC3D6E8u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D6F0(CPUState* cpu) { - cpu->pc = 0xBFC3D6F0u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D704(CPUState* cpu) { - cpu->pc = 0xBFC3D704u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D70C(CPUState* cpu) { - cpu->pc = 0xBFC3D70Cu; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D710(CPUState* cpu) { - cpu->pc = 0xBFC3D710u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D744(CPUState* cpu) { - cpu->pc = 0xBFC3D744u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D74C(CPUState* cpu) { - cpu->pc = 0xBFC3D74Cu; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D750(CPUState* cpu) { - cpu->pc = 0xBFC3D750u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D764(CPUState* cpu) { - cpu->pc = 0xBFC3D764u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D76C(CPUState* cpu) { - cpu->pc = 0xBFC3D76Cu; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D770(CPUState* cpu) { - cpu->pc = 0xBFC3D770u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D798(CPUState* cpu) { - cpu->pc = 0xBFC3D798u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D7A4(CPUState* cpu) { - cpu->pc = 0xBFC3D7A4u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D7A8(CPUState* cpu) { - cpu->pc = 0xBFC3D7A8u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D7D0(CPUState* cpu) { - cpu->pc = 0xBFC3D7D0u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D7DC(CPUState* cpu) { - cpu->pc = 0xBFC3D7DCu; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D65C_cont_BFC3D7E0(CPUState* cpu) { - cpu->pc = 0xBFC3D7E0u; - SCPH1001_func_1FC3D65C(cpu); -} - -void SCPH1001_func_1FC3D810_cont_BFC3D828(CPUState* cpu) { - cpu->pc = 0xBFC3D828u; - SCPH1001_func_1FC3D810(cpu); -} - -void SCPH1001_func_1FC3D810_cont_BFC3D83C(CPUState* cpu) { - cpu->pc = 0xBFC3D83Cu; - SCPH1001_func_1FC3D810(cpu); -} - -void SCPH1001_func_1FC3D810_cont_BFC3D844(CPUState* cpu) { - cpu->pc = 0xBFC3D844u; - SCPH1001_func_1FC3D810(cpu); -} - -void SCPH1001_func_1FC3D810_cont_BFC3D848(CPUState* cpu) { - cpu->pc = 0xBFC3D848u; - SCPH1001_func_1FC3D810(cpu); -} - -void SCPH1001_func_1FC3D810_cont_BFC3D850(CPUState* cpu) { - cpu->pc = 0xBFC3D850u; - SCPH1001_func_1FC3D810(cpu); -} - -void SCPH1001_func_1FC3D870_cont_BFC3D8A4(CPUState* cpu) { - cpu->pc = 0xBFC3D8A4u; - SCPH1001_func_1FC3D870(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D8DC(CPUState* cpu) { - cpu->pc = 0xBFC3D8DCu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D8E4(CPUState* cpu) { - cpu->pc = 0xBFC3D8E4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D8E8(CPUState* cpu) { - cpu->pc = 0xBFC3D8E8u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D938(CPUState* cpu) { - cpu->pc = 0xBFC3D938u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D950(CPUState* cpu) { - cpu->pc = 0xBFC3D950u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D974(CPUState* cpu) { - cpu->pc = 0xBFC3D974u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D984(CPUState* cpu) { - cpu->pc = 0xBFC3D984u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D98C(CPUState* cpu) { - cpu->pc = 0xBFC3D98Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9A0(CPUState* cpu) { - cpu->pc = 0xBFC3D9A0u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9A4(CPUState* cpu) { - cpu->pc = 0xBFC3D9A4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9BC(CPUState* cpu) { - cpu->pc = 0xBFC3D9BCu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9C4(CPUState* cpu) { - cpu->pc = 0xBFC3D9C4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9E0(CPUState* cpu) { - cpu->pc = 0xBFC3D9E0u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3D9EC(CPUState* cpu) { - cpu->pc = 0xBFC3D9ECu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA0C(CPUState* cpu) { - cpu->pc = 0xBFC3DA0Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA1C(CPUState* cpu) { - cpu->pc = 0xBFC3DA1Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA58(CPUState* cpu) { - cpu->pc = 0xBFC3DA58u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA88(CPUState* cpu) { - cpu->pc = 0xBFC3DA88u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA94(CPUState* cpu) { - cpu->pc = 0xBFC3DA94u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DA9C(CPUState* cpu) { - cpu->pc = 0xBFC3DA9Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DAB8(CPUState* cpu) { - cpu->pc = 0xBFC3DAB8u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DAD0(CPUState* cpu) { - cpu->pc = 0xBFC3DAD0u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DAE4(CPUState* cpu) { - cpu->pc = 0xBFC3DAE4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DAEC(CPUState* cpu) { - cpu->pc = 0xBFC3DAECu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DAF4(CPUState* cpu) { - cpu->pc = 0xBFC3DAF4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB14(CPUState* cpu) { - cpu->pc = 0xBFC3DB14u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB20(CPUState* cpu) { - cpu->pc = 0xBFC3DB20u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB34(CPUState* cpu) { - cpu->pc = 0xBFC3DB34u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB3C(CPUState* cpu) { - cpu->pc = 0xBFC3DB3Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB4C(CPUState* cpu) { - cpu->pc = 0xBFC3DB4Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB7C(CPUState* cpu) { - cpu->pc = 0xBFC3DB7Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DB8C(CPUState* cpu) { - cpu->pc = 0xBFC3DB8Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC08(CPUState* cpu) { - cpu->pc = 0xBFC3DC08u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC1C(CPUState* cpu) { - cpu->pc = 0xBFC3DC1Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC24(CPUState* cpu) { - cpu->pc = 0xBFC3DC24u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC28(CPUState* cpu) { - cpu->pc = 0xBFC3DC28u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC2C(CPUState* cpu) { - cpu->pc = 0xBFC3DC2Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC38(CPUState* cpu) { - cpu->pc = 0xBFC3DC38u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC4C(CPUState* cpu) { - cpu->pc = 0xBFC3DC4Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC54(CPUState* cpu) { - cpu->pc = 0xBFC3DC54u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC64(CPUState* cpu) { - cpu->pc = 0xBFC3DC64u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DC74(CPUState* cpu) { - cpu->pc = 0xBFC3DC74u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DCA4(CPUState* cpu) { - cpu->pc = 0xBFC3DCA4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DCB4(CPUState* cpu) { - cpu->pc = 0xBFC3DCB4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DCB8(CPUState* cpu) { - cpu->pc = 0xBFC3DCB8u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DCC4(CPUState* cpu) { - cpu->pc = 0xBFC3DCC4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DCFC(CPUState* cpu) { - cpu->pc = 0xBFC3DCFCu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD10(CPUState* cpu) { - cpu->pc = 0xBFC3DD10u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD18(CPUState* cpu) { - cpu->pc = 0xBFC3DD18u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD20(CPUState* cpu) { - cpu->pc = 0xBFC3DD20u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD2C(CPUState* cpu) { - cpu->pc = 0xBFC3DD2Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD3C(CPUState* cpu) { - cpu->pc = 0xBFC3DD3Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD4C(CPUState* cpu) { - cpu->pc = 0xBFC3DD4Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD64(CPUState* cpu) { - cpu->pc = 0xBFC3DD64u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD70(CPUState* cpu) { - cpu->pc = 0xBFC3DD70u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD7C(CPUState* cpu) { - cpu->pc = 0xBFC3DD7Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DD8C(CPUState* cpu) { - cpu->pc = 0xBFC3DD8Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DDA0(CPUState* cpu) { - cpu->pc = 0xBFC3DDA0u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DDC4(CPUState* cpu) { - cpu->pc = 0xBFC3DDC4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DDD0(CPUState* cpu) { - cpu->pc = 0xBFC3DDD0u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DDE4(CPUState* cpu) { - cpu->pc = 0xBFC3DDE4u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DE08(CPUState* cpu) { - cpu->pc = 0xBFC3DE08u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DE14(CPUState* cpu) { - cpu->pc = 0xBFC3DE14u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DE28(CPUState* cpu) { - cpu->pc = 0xBFC3DE28u; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3D8C0_cont_BFC3DE2C(CPUState* cpu) { - cpu->pc = 0xBFC3DE2Cu; - SCPH1001_func_1FC3D8C0(cpu); -} - -void SCPH1001_func_1FC3DED0_cont_BFC3DEE8(CPUState* cpu) { - cpu->pc = 0xBFC3DEE8u; - SCPH1001_func_1FC3DED0(cpu); -} - -void SCPH1001_func_1FC3DED0_cont_BFC3DEF0(CPUState* cpu) { - cpu->pc = 0xBFC3DEF0u; - SCPH1001_func_1FC3DED0(cpu); -} - -void SCPH1001_func_1FC3DED0_cont_BFC3DEF8(CPUState* cpu) { - cpu->pc = 0xBFC3DEF8u; - SCPH1001_func_1FC3DED0(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF30(CPUState* cpu) { - cpu->pc = 0xBFC3DF30u; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF3C(CPUState* cpu) { - cpu->pc = 0xBFC3DF3Cu; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF44(CPUState* cpu) { - cpu->pc = 0xBFC3DF44u; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF4C(CPUState* cpu) { - cpu->pc = 0xBFC3DF4Cu; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF54(CPUState* cpu) { - cpu->pc = 0xBFC3DF54u; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF5C(CPUState* cpu) { - cpu->pc = 0xBFC3DF5Cu; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF20_cont_BFC3DF78(CPUState* cpu) { - cpu->pc = 0xBFC3DF78u; - SCPH1001_func_1FC3DF20(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFA8(CPUState* cpu) { - cpu->pc = 0xBFC3DFA8u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFB0(CPUState* cpu) { - cpu->pc = 0xBFC3DFB0u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFBC(CPUState* cpu) { - cpu->pc = 0xBFC3DFBCu; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFC4(CPUState* cpu) { - cpu->pc = 0xBFC3DFC4u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFC8(CPUState* cpu) { - cpu->pc = 0xBFC3DFC8u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFD0(CPUState* cpu) { - cpu->pc = 0xBFC3DFD0u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFD8(CPUState* cpu) { - cpu->pc = 0xBFC3DFD8u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFE8(CPUState* cpu) { - cpu->pc = 0xBFC3DFE8u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3DFFC(CPUState* cpu) { - cpu->pc = 0xBFC3DFFCu; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3DF90_cont_BFC3E008(CPUState* cpu) { - cpu->pc = 0xBFC3E008u; - SCPH1001_func_1FC3DF90(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E03C(CPUState* cpu) { - cpu->pc = 0xBFC3E03Cu; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E044(CPUState* cpu) { - cpu->pc = 0xBFC3E044u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E054(CPUState* cpu) { - cpu->pc = 0xBFC3E054u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E064(CPUState* cpu) { - cpu->pc = 0xBFC3E064u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E06C(CPUState* cpu) { - cpu->pc = 0xBFC3E06Cu; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E07C(CPUState* cpu) { - cpu->pc = 0xBFC3E07Cu; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E084(CPUState* cpu) { - cpu->pc = 0xBFC3E084u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E088(CPUState* cpu) { - cpu->pc = 0xBFC3E088u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E098(CPUState* cpu) { - cpu->pc = 0xBFC3E098u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E0A0(CPUState* cpu) { - cpu->pc = 0xBFC3E0A0u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E020_cont_BFC3E0B0(CPUState* cpu) { - cpu->pc = 0xBFC3E0B0u; - SCPH1001_func_1FC3E020(cpu); -} - -void SCPH1001_func_1FC3E0C0_cont_BFC3E0CC(CPUState* cpu) { - cpu->pc = 0xBFC3E0CCu; - SCPH1001_func_1FC3E0C0(cpu); -} - -void SCPH1001_func_1FC3E0C0_cont_BFC3E0D4(CPUState* cpu) { - cpu->pc = 0xBFC3E0D4u; - SCPH1001_func_1FC3E0C0(cpu); -} - -void SCPH1001_func_1FC3E0E8_cont_BFC3E0FC(CPUState* cpu) { - cpu->pc = 0xBFC3E0FCu; - SCPH1001_func_1FC3E0E8(cpu); -} - -void SCPH1001_func_1FC3E0E8_cont_BFC3E108(CPUState* cpu) { - cpu->pc = 0xBFC3E108u; - SCPH1001_func_1FC3E0E8(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E128(CPUState* cpu) { - cpu->pc = 0xBFC3E128u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E144(CPUState* cpu) { - cpu->pc = 0xBFC3E144u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E164(CPUState* cpu) { - cpu->pc = 0xBFC3E164u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E178(CPUState* cpu) { - cpu->pc = 0xBFC3E178u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E184(CPUState* cpu) { - cpu->pc = 0xBFC3E184u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E194(CPUState* cpu) { - cpu->pc = 0xBFC3E194u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E19C(CPUState* cpu) { - cpu->pc = 0xBFC3E19Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1A0(CPUState* cpu) { - cpu->pc = 0xBFC3E1A0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1A8(CPUState* cpu) { - cpu->pc = 0xBFC3E1A8u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1C0(CPUState* cpu) { - cpu->pc = 0xBFC3E1C0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1DC(CPUState* cpu) { - cpu->pc = 0xBFC3E1DCu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1E4(CPUState* cpu) { - cpu->pc = 0xBFC3E1E4u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1F0(CPUState* cpu) { - cpu->pc = 0xBFC3E1F0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1F4(CPUState* cpu) { - cpu->pc = 0xBFC3E1F4u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E1FC(CPUState* cpu) { - cpu->pc = 0xBFC3E1FCu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E204(CPUState* cpu) { - cpu->pc = 0xBFC3E204u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E208(CPUState* cpu) { - cpu->pc = 0xBFC3E208u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E20C(CPUState* cpu) { - cpu->pc = 0xBFC3E20Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E220(CPUState* cpu) { - cpu->pc = 0xBFC3E220u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E228(CPUState* cpu) { - cpu->pc = 0xBFC3E228u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E22C(CPUState* cpu) { - cpu->pc = 0xBFC3E22Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E23C(CPUState* cpu) { - cpu->pc = 0xBFC3E23Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E244(CPUState* cpu) { - cpu->pc = 0xBFC3E244u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E258(CPUState* cpu) { - cpu->pc = 0xBFC3E258u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E270(CPUState* cpu) { - cpu->pc = 0xBFC3E270u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E28C(CPUState* cpu) { - cpu->pc = 0xBFC3E28Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E29C(CPUState* cpu) { - cpu->pc = 0xBFC3E29Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2A0(CPUState* cpu) { - cpu->pc = 0xBFC3E2A0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2AC(CPUState* cpu) { - cpu->pc = 0xBFC3E2ACu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2B0(CPUState* cpu) { - cpu->pc = 0xBFC3E2B0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2B8(CPUState* cpu) { - cpu->pc = 0xBFC3E2B8u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2BC(CPUState* cpu) { - cpu->pc = 0xBFC3E2BCu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2D0(CPUState* cpu) { - cpu->pc = 0xBFC3E2D0u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E2D8(CPUState* cpu) { - cpu->pc = 0xBFC3E2D8u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E30C(CPUState* cpu) { - cpu->pc = 0xBFC3E30Cu; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E110_cont_BFC3E318(CPUState* cpu) { - cpu->pc = 0xBFC3E318u; - SCPH1001_func_1FC3E110(cpu); -} - -void SCPH1001_func_1FC3E324_cont_BFC3E32C(CPUState* cpu) { - cpu->pc = 0xBFC3E32Cu; - SCPH1001_func_1FC3E324(cpu); -} - -void SCPH1001_func_1FC3E324_cont_BFC3E384(CPUState* cpu) { - cpu->pc = 0xBFC3E384u; - SCPH1001_func_1FC3E324(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E3C4(CPUState* cpu) { - cpu->pc = 0xBFC3E3C4u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E3CC(CPUState* cpu) { - cpu->pc = 0xBFC3E3CCu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E3F0(CPUState* cpu) { - cpu->pc = 0xBFC3E3F0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E404(CPUState* cpu) { - cpu->pc = 0xBFC3E404u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E40C(CPUState* cpu) { - cpu->pc = 0xBFC3E40Cu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E410(CPUState* cpu) { - cpu->pc = 0xBFC3E410u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E434(CPUState* cpu) { - cpu->pc = 0xBFC3E434u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E444(CPUState* cpu) { - cpu->pc = 0xBFC3E444u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E458(CPUState* cpu) { - cpu->pc = 0xBFC3E458u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E478(CPUState* cpu) { - cpu->pc = 0xBFC3E478u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E488(CPUState* cpu) { - cpu->pc = 0xBFC3E488u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E49C(CPUState* cpu) { - cpu->pc = 0xBFC3E49Cu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4B0(CPUState* cpu) { - cpu->pc = 0xBFC3E4B0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4BC(CPUState* cpu) { - cpu->pc = 0xBFC3E4BCu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4D0(CPUState* cpu) { - cpu->pc = 0xBFC3E4D0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4D8(CPUState* cpu) { - cpu->pc = 0xBFC3E4D8u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4E0(CPUState* cpu) { - cpu->pc = 0xBFC3E4E0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4F0(CPUState* cpu) { - cpu->pc = 0xBFC3E4F0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4F4(CPUState* cpu) { - cpu->pc = 0xBFC3E4F4u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E4FC(CPUState* cpu) { - cpu->pc = 0xBFC3E4FCu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E504(CPUState* cpu) { - cpu->pc = 0xBFC3E504u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E508(CPUState* cpu) { - cpu->pc = 0xBFC3E508u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E520(CPUState* cpu) { - cpu->pc = 0xBFC3E520u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E528(CPUState* cpu) { - cpu->pc = 0xBFC3E528u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E540(CPUState* cpu) { - cpu->pc = 0xBFC3E540u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E590(CPUState* cpu) { - cpu->pc = 0xBFC3E590u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E598(CPUState* cpu) { - cpu->pc = 0xBFC3E598u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E5A0(CPUState* cpu) { - cpu->pc = 0xBFC3E5A0u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E5B4(CPUState* cpu) { - cpu->pc = 0xBFC3E5B4u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E5CC(CPUState* cpu) { - cpu->pc = 0xBFC3E5CCu; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E610(CPUState* cpu) { - cpu->pc = 0xBFC3E610u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E390_cont_BFC3E624(CPUState* cpu) { - cpu->pc = 0xBFC3E624u; - SCPH1001_func_1FC3E390(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E660(CPUState* cpu) { - cpu->pc = 0xBFC3E660u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E668(CPUState* cpu) { - cpu->pc = 0xBFC3E668u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E694(CPUState* cpu) { - cpu->pc = 0xBFC3E694u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E6A4(CPUState* cpu) { - cpu->pc = 0xBFC3E6A4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E6C4(CPUState* cpu) { - cpu->pc = 0xBFC3E6C4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E6E4(CPUState* cpu) { - cpu->pc = 0xBFC3E6E4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E6F0(CPUState* cpu) { - cpu->pc = 0xBFC3E6F0u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E6F8(CPUState* cpu) { - cpu->pc = 0xBFC3E6F8u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E700(CPUState* cpu) { - cpu->pc = 0xBFC3E700u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E708(CPUState* cpu) { - cpu->pc = 0xBFC3E708u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E728(CPUState* cpu) { - cpu->pc = 0xBFC3E728u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E730(CPUState* cpu) { - cpu->pc = 0xBFC3E730u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E734(CPUState* cpu) { - cpu->pc = 0xBFC3E734u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E77C(CPUState* cpu) { - cpu->pc = 0xBFC3E77Cu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E79C(CPUState* cpu) { - cpu->pc = 0xBFC3E79Cu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E7A4(CPUState* cpu) { - cpu->pc = 0xBFC3E7A4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E7A8(CPUState* cpu) { - cpu->pc = 0xBFC3E7A8u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E7C4(CPUState* cpu) { - cpu->pc = 0xBFC3E7C4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E7F8(CPUState* cpu) { - cpu->pc = 0xBFC3E7F8u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E800(CPUState* cpu) { - cpu->pc = 0xBFC3E800u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E808(CPUState* cpu) { - cpu->pc = 0xBFC3E808u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E828(CPUState* cpu) { - cpu->pc = 0xBFC3E828u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E830(CPUState* cpu) { - cpu->pc = 0xBFC3E830u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E850(CPUState* cpu) { - cpu->pc = 0xBFC3E850u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E858(CPUState* cpu) { - cpu->pc = 0xBFC3E858u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E85C(CPUState* cpu) { - cpu->pc = 0xBFC3E85Cu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E88C(CPUState* cpu) { - cpu->pc = 0xBFC3E88Cu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E898(CPUState* cpu) { - cpu->pc = 0xBFC3E898u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E8D8(CPUState* cpu) { - cpu->pc = 0xBFC3E8D8u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E8DC(CPUState* cpu) { - cpu->pc = 0xBFC3E8DCu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E8E4(CPUState* cpu) { - cpu->pc = 0xBFC3E8E4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E8F4(CPUState* cpu) { - cpu->pc = 0xBFC3E8F4u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E914(CPUState* cpu) { - cpu->pc = 0xBFC3E914u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E91C(CPUState* cpu) { - cpu->pc = 0xBFC3E91Cu; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E920(CPUState* cpu) { - cpu->pc = 0xBFC3E920u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E938(CPUState* cpu) { - cpu->pc = 0xBFC3E938u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E974(CPUState* cpu) { - cpu->pc = 0xBFC3E974u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E634_cont_BFC3E978(CPUState* cpu) { - cpu->pc = 0xBFC3E978u; - SCPH1001_func_1FC3E634(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9B0(CPUState* cpu) { - cpu->pc = 0xBFC3E9B0u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9B8(CPUState* cpu) { - cpu->pc = 0xBFC3E9B8u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9DC(CPUState* cpu) { - cpu->pc = 0xBFC3E9DCu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9F0(CPUState* cpu) { - cpu->pc = 0xBFC3E9F0u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9F8(CPUState* cpu) { - cpu->pc = 0xBFC3E9F8u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3E9FC(CPUState* cpu) { - cpu->pc = 0xBFC3E9FCu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA14(CPUState* cpu) { - cpu->pc = 0xBFC3EA14u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA1C(CPUState* cpu) { - cpu->pc = 0xBFC3EA1Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA20(CPUState* cpu) { - cpu->pc = 0xBFC3EA20u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA38(CPUState* cpu) { - cpu->pc = 0xBFC3EA38u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA40(CPUState* cpu) { - cpu->pc = 0xBFC3EA40u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA44(CPUState* cpu) { - cpu->pc = 0xBFC3EA44u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA5C(CPUState* cpu) { - cpu->pc = 0xBFC3EA5Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA64(CPUState* cpu) { - cpu->pc = 0xBFC3EA64u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA84(CPUState* cpu) { - cpu->pc = 0xBFC3EA84u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EA9C(CPUState* cpu) { - cpu->pc = 0xBFC3EA9Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EABC(CPUState* cpu) { - cpu->pc = 0xBFC3EABCu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EAC4(CPUState* cpu) { - cpu->pc = 0xBFC3EAC4u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB00(CPUState* cpu) { - cpu->pc = 0xBFC3EB00u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB20(CPUState* cpu) { - cpu->pc = 0xBFC3EB20u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB28(CPUState* cpu) { - cpu->pc = 0xBFC3EB28u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB2C(CPUState* cpu) { - cpu->pc = 0xBFC3EB2Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB4C(CPUState* cpu) { - cpu->pc = 0xBFC3EB4Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB54(CPUState* cpu) { - cpu->pc = 0xBFC3EB54u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB64(CPUState* cpu) { - cpu->pc = 0xBFC3EB64u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EB90(CPUState* cpu) { - cpu->pc = 0xBFC3EB90u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBA4(CPUState* cpu) { - cpu->pc = 0xBFC3EBA4u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBB4(CPUState* cpu) { - cpu->pc = 0xBFC3EBB4u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBCC(CPUState* cpu) { - cpu->pc = 0xBFC3EBCCu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBE0(CPUState* cpu) { - cpu->pc = 0xBFC3EBE0u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBEC(CPUState* cpu) { - cpu->pc = 0xBFC3EBECu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EBF0(CPUState* cpu) { - cpu->pc = 0xBFC3EBF0u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC00(CPUState* cpu) { - cpu->pc = 0xBFC3EC00u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC0C(CPUState* cpu) { - cpu->pc = 0xBFC3EC0Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC10(CPUState* cpu) { - cpu->pc = 0xBFC3EC10u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC18(CPUState* cpu) { - cpu->pc = 0xBFC3EC18u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC20(CPUState* cpu) { - cpu->pc = 0xBFC3EC20u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC34(CPUState* cpu) { - cpu->pc = 0xBFC3EC34u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC40(CPUState* cpu) { - cpu->pc = 0xBFC3EC40u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC44(CPUState* cpu) { - cpu->pc = 0xBFC3EC44u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC50(CPUState* cpu) { - cpu->pc = 0xBFC3EC50u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC58(CPUState* cpu) { - cpu->pc = 0xBFC3EC58u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC5C(CPUState* cpu) { - cpu->pc = 0xBFC3EC5Cu; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC64(CPUState* cpu) { - cpu->pc = 0xBFC3EC64u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC70(CPUState* cpu) { - cpu->pc = 0xBFC3EC70u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC88(CPUState* cpu) { - cpu->pc = 0xBFC3EC88u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC90(CPUState* cpu) { - cpu->pc = 0xBFC3EC90u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3EC94(CPUState* cpu) { - cpu->pc = 0xBFC3EC94u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3ECA0(CPUState* cpu) { - cpu->pc = 0xBFC3ECA0u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3ECA4(CPUState* cpu) { - cpu->pc = 0xBFC3ECA4u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3E980_cont_BFC3ECA8(CPUState* cpu) { - cpu->pc = 0xBFC3ECA8u; - SCPH1001_func_1FC3E980(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ECD4(CPUState* cpu) { - cpu->pc = 0xBFC3ECD4u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ECE8(CPUState* cpu) { - cpu->pc = 0xBFC3ECE8u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ECF4(CPUState* cpu) { - cpu->pc = 0xBFC3ECF4u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ED04(CPUState* cpu) { - cpu->pc = 0xBFC3ED04u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ED0C(CPUState* cpu) { - cpu->pc = 0xBFC3ED0Cu; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ED24(CPUState* cpu) { - cpu->pc = 0xBFC3ED24u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ED2C(CPUState* cpu) { - cpu->pc = 0xBFC3ED2Cu; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ECB8_cont_BFC3ED34(CPUState* cpu) { - cpu->pc = 0xBFC3ED34u; - SCPH1001_func_1FC3ECB8(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED5C(CPUState* cpu) { - cpu->pc = 0xBFC3ED5Cu; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED68(CPUState* cpu) { - cpu->pc = 0xBFC3ED68u; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED7C(CPUState* cpu) { - cpu->pc = 0xBFC3ED7Cu; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED84(CPUState* cpu) { - cpu->pc = 0xBFC3ED84u; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED90(CPUState* cpu) { - cpu->pc = 0xBFC3ED90u; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3ED9C(CPUState* cpu) { - cpu->pc = 0xBFC3ED9Cu; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3ED40_cont_BFC3EDA4(CPUState* cpu) { - cpu->pc = 0xBFC3EDA4u; - SCPH1001_func_1FC3ED40(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EDC4(CPUState* cpu) { - cpu->pc = 0xBFC3EDC4u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EDD8(CPUState* cpu) { - cpu->pc = 0xBFC3EDD8u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EDF8(CPUState* cpu) { - cpu->pc = 0xBFC3EDF8u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EE0C(CPUState* cpu) { - cpu->pc = 0xBFC3EE0Cu; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EE30(CPUState* cpu) { - cpu->pc = 0xBFC3EE30u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EE44(CPUState* cpu) { - cpu->pc = 0xBFC3EE44u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EE5C(CPUState* cpu) { - cpu->pc = 0xBFC3EE5Cu; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EDB4_cont_BFC3EE70(CPUState* cpu) { - cpu->pc = 0xBFC3EE70u; - SCPH1001_func_1FC3EDB4(cpu); -} - -void SCPH1001_func_1FC3EE80_cont_BFC3EEA8(CPUState* cpu) { - cpu->pc = 0xBFC3EEA8u; - SCPH1001_func_1FC3EE80(cpu); -} - -void SCPH1001_func_1FC3EE80_cont_BFC3EEB8(CPUState* cpu) { - cpu->pc = 0xBFC3EEB8u; - SCPH1001_func_1FC3EE80(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF24(CPUState* cpu) { - cpu->pc = 0xBFC3EF24u; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF3C(CPUState* cpu) { - cpu->pc = 0xBFC3EF3Cu; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF44(CPUState* cpu) { - cpu->pc = 0xBFC3EF44u; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF60(CPUState* cpu) { - cpu->pc = 0xBFC3EF60u; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF68(CPUState* cpu) { - cpu->pc = 0xBFC3EF68u; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF08_cont_BFC3EF6C(CPUState* cpu) { - cpu->pc = 0xBFC3EF6Cu; - SCPH1001_func_1FC3EF08(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EF98(CPUState* cpu) { - cpu->pc = 0xBFC3EF98u; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EFB0(CPUState* cpu) { - cpu->pc = 0xBFC3EFB0u; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EFB8(CPUState* cpu) { - cpu->pc = 0xBFC3EFB8u; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EFD4(CPUState* cpu) { - cpu->pc = 0xBFC3EFD4u; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EFDC(CPUState* cpu) { - cpu->pc = 0xBFC3EFDCu; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EF7C_cont_BFC3EFE0(CPUState* cpu) { - cpu->pc = 0xBFC3EFE0u; - SCPH1001_func_1FC3EF7C(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F000(CPUState* cpu) { - cpu->pc = 0xBFC3F000u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F020(CPUState* cpu) { - cpu->pc = 0xBFC3F020u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F028(CPUState* cpu) { - cpu->pc = 0xBFC3F028u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F030(CPUState* cpu) { - cpu->pc = 0xBFC3F030u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F038(CPUState* cpu) { - cpu->pc = 0xBFC3F038u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F040(CPUState* cpu) { - cpu->pc = 0xBFC3F040u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F048(CPUState* cpu) { - cpu->pc = 0xBFC3F048u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F050(CPUState* cpu) { - cpu->pc = 0xBFC3F050u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F058(CPUState* cpu) { - cpu->pc = 0xBFC3F058u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F05C(CPUState* cpu) { - cpu->pc = 0xBFC3F05Cu; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F064(CPUState* cpu) { - cpu->pc = 0xBFC3F064u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F06C(CPUState* cpu) { - cpu->pc = 0xBFC3F06Cu; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F074(CPUState* cpu) { - cpu->pc = 0xBFC3F074u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F07C(CPUState* cpu) { - cpu->pc = 0xBFC3F07Cu; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3EFF0_cont_BFC3F080(CPUState* cpu) { - cpu->pc = 0xBFC3F080u; - SCPH1001_func_1FC3EFF0(cpu); -} - -void SCPH1001_func_1FC3F090_cont_BFC3F140(CPUState* cpu) { - cpu->pc = 0xBFC3F140u; - SCPH1001_func_1FC3F090(cpu); -} - -void SCPH1001_func_1FC3F090_cont_BFC3F150(CPUState* cpu) { - cpu->pc = 0xBFC3F150u; - SCPH1001_func_1FC3F090(cpu); -} - -void SCPH1001_func_1FC3F090_cont_BFC3F184(CPUState* cpu) { - cpu->pc = 0xBFC3F184u; - SCPH1001_func_1FC3F090(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F1C8(CPUState* cpu) { - cpu->pc = 0xBFC3F1C8u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F1DC(CPUState* cpu) { - cpu->pc = 0xBFC3F1DCu; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F1E4(CPUState* cpu) { - cpu->pc = 0xBFC3F1E4u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F1EC(CPUState* cpu) { - cpu->pc = 0xBFC3F1ECu; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F200(CPUState* cpu) { - cpu->pc = 0xBFC3F200u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F208(CPUState* cpu) { - cpu->pc = 0xBFC3F208u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F210(CPUState* cpu) { - cpu->pc = 0xBFC3F210u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F230(CPUState* cpu) { - cpu->pc = 0xBFC3F230u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F238(CPUState* cpu) { - cpu->pc = 0xBFC3F238u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F240(CPUState* cpu) { - cpu->pc = 0xBFC3F240u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F244(CPUState* cpu) { - cpu->pc = 0xBFC3F244u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F248(CPUState* cpu) { - cpu->pc = 0xBFC3F248u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F24C(CPUState* cpu) { - cpu->pc = 0xBFC3F24Cu; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F254(CPUState* cpu) { - cpu->pc = 0xBFC3F254u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F1B8_cont_BFC3F2A4(CPUState* cpu) { - cpu->pc = 0xBFC3F2A4u; - SCPH1001_func_1FC3F1B8(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F2C4(CPUState* cpu) { - cpu->pc = 0xBFC3F2C4u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F2D8(CPUState* cpu) { - cpu->pc = 0xBFC3F2D8u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F2E0(CPUState* cpu) { - cpu->pc = 0xBFC3F2E0u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F2E8(CPUState* cpu) { - cpu->pc = 0xBFC3F2E8u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F2FC(CPUState* cpu) { - cpu->pc = 0xBFC3F2FCu; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F304(CPUState* cpu) { - cpu->pc = 0xBFC3F304u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F30C(CPUState* cpu) { - cpu->pc = 0xBFC3F30Cu; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F314(CPUState* cpu) { - cpu->pc = 0xBFC3F314u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F31C(CPUState* cpu) { - cpu->pc = 0xBFC3F31Cu; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F324(CPUState* cpu) { - cpu->pc = 0xBFC3F324u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F344(CPUState* cpu) { - cpu->pc = 0xBFC3F344u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F34C(CPUState* cpu) { - cpu->pc = 0xBFC3F34Cu; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F350(CPUState* cpu) { - cpu->pc = 0xBFC3F350u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F358(CPUState* cpu) { - cpu->pc = 0xBFC3F358u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F360(CPUState* cpu) { - cpu->pc = 0xBFC3F360u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F368(CPUState* cpu) { - cpu->pc = 0xBFC3F368u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F370(CPUState* cpu) { - cpu->pc = 0xBFC3F370u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F374(CPUState* cpu) { - cpu->pc = 0xBFC3F374u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F378(CPUState* cpu) { - cpu->pc = 0xBFC3F378u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F37C(CPUState* cpu) { - cpu->pc = 0xBFC3F37Cu; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F384(CPUState* cpu) { - cpu->pc = 0xBFC3F384u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F2B4_cont_BFC3F3D4(CPUState* cpu) { - cpu->pc = 0xBFC3F3D4u; - SCPH1001_func_1FC3F2B4(cpu); -} - -void SCPH1001_func_1FC3F484_cont_BFC3F49C(CPUState* cpu) { - cpu->pc = 0xBFC3F49Cu; - SCPH1001_func_1FC3F484(cpu); -} - -void SCPH1001_func_1FC3F484_cont_BFC3F4A4(CPUState* cpu) { - cpu->pc = 0xBFC3F4A4u; - SCPH1001_func_1FC3F484(cpu); -} - -void SCPH1001_func_1FC3F484_cont_BFC3F4A8(CPUState* cpu) { - cpu->pc = 0xBFC3F4A8u; - SCPH1001_func_1FC3F484(cpu); -} - -void SCPH1001_func_1FC3F484_cont_BFC3F4AC(CPUState* cpu) { - cpu->pc = 0xBFC3F4ACu; - SCPH1001_func_1FC3F484(cpu); -} - -void SCPH1001_func_1FC3F484_cont_BFC3F4B8(CPUState* cpu) { - cpu->pc = 0xBFC3F4B8u; - SCPH1001_func_1FC3F484(cpu); -} - -void SCPH1001_func_1FC3F4F0_cont_BFC3F508(CPUState* cpu) { - cpu->pc = 0xBFC3F508u; - SCPH1001_func_1FC3F4F0(cpu); -} - -void SCPH1001_func_1FC3F4F0_cont_BFC3F514(CPUState* cpu) { - cpu->pc = 0xBFC3F514u; - SCPH1001_func_1FC3F4F0(cpu); -} - -void SCPH1001_func_1FC3F4F0_cont_BFC3F528(CPUState* cpu) { - cpu->pc = 0xBFC3F528u; - SCPH1001_func_1FC3F4F0(cpu); -} - -void SCPH1001_func_1FC3F4F0_cont_BFC3F534(CPUState* cpu) { - cpu->pc = 0xBFC3F534u; - SCPH1001_func_1FC3F4F0(cpu); -} - -void SCPH1001_func_1FC3F4F0_cont_BFC3F560(CPUState* cpu) { - cpu->pc = 0xBFC3F560u; - SCPH1001_func_1FC3F4F0(cpu); -} - -void SCPH1001_func_1FC3F570_cont_BFC3F588(CPUState* cpu) { - cpu->pc = 0xBFC3F588u; - SCPH1001_func_1FC3F570(cpu); -} - -void SCPH1001_func_1FC3F570_cont_BFC3F590(CPUState* cpu) { - cpu->pc = 0xBFC3F590u; - SCPH1001_func_1FC3F570(cpu); -} - -void SCPH1001_func_1FC3F570_cont_BFC3F59C(CPUState* cpu) { - cpu->pc = 0xBFC3F59Cu; - SCPH1001_func_1FC3F570(cpu); -} - -void SCPH1001_func_1FC3F570_cont_BFC3F5C8(CPUState* cpu) { - cpu->pc = 0xBFC3F5C8u; - SCPH1001_func_1FC3F570(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F5F4(CPUState* cpu) { - cpu->pc = 0xBFC3F5F4u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F5FC(CPUState* cpu) { - cpu->pc = 0xBFC3F5FCu; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F604(CPUState* cpu) { - cpu->pc = 0xBFC3F604u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F608(CPUState* cpu) { - cpu->pc = 0xBFC3F608u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F638(CPUState* cpu) { - cpu->pc = 0xBFC3F638u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F648(CPUState* cpu) { - cpu->pc = 0xBFC3F648u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F654(CPUState* cpu) { - cpu->pc = 0xBFC3F654u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F664(CPUState* cpu) { - cpu->pc = 0xBFC3F664u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F668(CPUState* cpu) { - cpu->pc = 0xBFC3F668u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F670(CPUState* cpu) { - cpu->pc = 0xBFC3F670u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F690(CPUState* cpu) { - cpu->pc = 0xBFC3F690u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F698(CPUState* cpu) { - cpu->pc = 0xBFC3F698u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F6A0(CPUState* cpu) { - cpu->pc = 0xBFC3F6A0u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F5D8_cont_BFC3F6E0(CPUState* cpu) { - cpu->pc = 0xBFC3F6E0u; - SCPH1001_func_1FC3F5D8(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F708(CPUState* cpu) { - cpu->pc = 0xBFC3F708u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F710(CPUState* cpu) { - cpu->pc = 0xBFC3F710u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F730(CPUState* cpu) { - cpu->pc = 0xBFC3F730u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F740(CPUState* cpu) { - cpu->pc = 0xBFC3F740u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F74C(CPUState* cpu) { - cpu->pc = 0xBFC3F74Cu; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F75C(CPUState* cpu) { - cpu->pc = 0xBFC3F75Cu; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F760(CPUState* cpu) { - cpu->pc = 0xBFC3F760u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F768(CPUState* cpu) { - cpu->pc = 0xBFC3F768u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F788(CPUState* cpu) { - cpu->pc = 0xBFC3F788u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F790(CPUState* cpu) { - cpu->pc = 0xBFC3F790u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F798(CPUState* cpu) { - cpu->pc = 0xBFC3F798u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F6F0_cont_BFC3F7D8(CPUState* cpu) { - cpu->pc = 0xBFC3F7D8u; - SCPH1001_func_1FC3F6F0(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F804(CPUState* cpu) { - cpu->pc = 0xBFC3F804u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F810(CPUState* cpu) { - cpu->pc = 0xBFC3F810u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F824(CPUState* cpu) { - cpu->pc = 0xBFC3F824u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F82C(CPUState* cpu) { - cpu->pc = 0xBFC3F82Cu; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F834(CPUState* cpu) { - cpu->pc = 0xBFC3F834u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F848(CPUState* cpu) { - cpu->pc = 0xBFC3F848u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F850(CPUState* cpu) { - cpu->pc = 0xBFC3F850u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F854(CPUState* cpu) { - cpu->pc = 0xBFC3F854u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F86C(CPUState* cpu) { - cpu->pc = 0xBFC3F86Cu; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F8D0(CPUState* cpu) { - cpu->pc = 0xBFC3F8D0u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F7E8_cont_BFC3F8D4(CPUState* cpu) { - cpu->pc = 0xBFC3F8D4u; - SCPH1001_func_1FC3F7E8(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F8FC(CPUState* cpu) { - cpu->pc = 0xBFC3F8FCu; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F908(CPUState* cpu) { - cpu->pc = 0xBFC3F908u; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F910(CPUState* cpu) { - cpu->pc = 0xBFC3F910u; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F934(CPUState* cpu) { - cpu->pc = 0xBFC3F934u; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F93C(CPUState* cpu) { - cpu->pc = 0xBFC3F93Cu; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F94C(CPUState* cpu) { - cpu->pc = 0xBFC3F94Cu; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F8E4_cont_BFC3F99C(CPUState* cpu) { - cpu->pc = 0xBFC3F99Cu; - SCPH1001_func_1FC3F8E4(cpu); -} - -void SCPH1001_func_1FC3F9AC_cont_BFC3F9C4(CPUState* cpu) { - cpu->pc = 0xBFC3F9C4u; - SCPH1001_func_1FC3F9AC(cpu); -} - -void SCPH1001_func_1FC3F9AC_cont_BFC3F9CC(CPUState* cpu) { - cpu->pc = 0xBFC3F9CCu; - SCPH1001_func_1FC3F9AC(cpu); -} - -void SCPH1001_func_1FC3F9AC_cont_BFC3F9D4(CPUState* cpu) { - cpu->pc = 0xBFC3F9D4u; - SCPH1001_func_1FC3F9AC(cpu); -} - -void SCPH1001_func_1FC3F9AC_cont_BFC3FA00(CPUState* cpu) { - cpu->pc = 0xBFC3FA00u; - SCPH1001_func_1FC3F9AC(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA1C(CPUState* cpu) { - cpu->pc = 0xBFC3FA1Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA30(CPUState* cpu) { - cpu->pc = 0xBFC3FA30u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA38(CPUState* cpu) { - cpu->pc = 0xBFC3FA38u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA40(CPUState* cpu) { - cpu->pc = 0xBFC3FA40u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA54(CPUState* cpu) { - cpu->pc = 0xBFC3FA54u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA5C(CPUState* cpu) { - cpu->pc = 0xBFC3FA5Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA64(CPUState* cpu) { - cpu->pc = 0xBFC3FA64u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA6C(CPUState* cpu) { - cpu->pc = 0xBFC3FA6Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA74(CPUState* cpu) { - cpu->pc = 0xBFC3FA74u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA7C(CPUState* cpu) { - cpu->pc = 0xBFC3FA7Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA84(CPUState* cpu) { - cpu->pc = 0xBFC3FA84u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA8C(CPUState* cpu) { - cpu->pc = 0xBFC3FA8Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA94(CPUState* cpu) { - cpu->pc = 0xBFC3FA94u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FA9C(CPUState* cpu) { - cpu->pc = 0xBFC3FA9Cu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FAA0(CPUState* cpu) { - cpu->pc = 0xBFC3FAA0u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FAA4(CPUState* cpu) { - cpu->pc = 0xBFC3FAA4u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FAA8(CPUState* cpu) { - cpu->pc = 0xBFC3FAA8u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FAB0(CPUState* cpu) { - cpu->pc = 0xBFC3FAB0u; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FA10_cont_BFC3FADC(CPUState* cpu) { - cpu->pc = 0xBFC3FADCu; - SCPH1001_func_1FC3FA10(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB04(CPUState* cpu) { - cpu->pc = 0xBFC3FB04u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB10(CPUState* cpu) { - cpu->pc = 0xBFC3FB10u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB18(CPUState* cpu) { - cpu->pc = 0xBFC3FB18u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB20(CPUState* cpu) { - cpu->pc = 0xBFC3FB20u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB28(CPUState* cpu) { - cpu->pc = 0xBFC3FB28u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB30(CPUState* cpu) { - cpu->pc = 0xBFC3FB30u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB44(CPUState* cpu) { - cpu->pc = 0xBFC3FB44u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FAEC_cont_BFC3FB64(CPUState* cpu) { - cpu->pc = 0xBFC3FB64u; - SCPH1001_func_1FC3FAEC(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FB80(CPUState* cpu) { - cpu->pc = 0xBFC3FB80u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FB94(CPUState* cpu) { - cpu->pc = 0xBFC3FB94u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FB9C(CPUState* cpu) { - cpu->pc = 0xBFC3FB9Cu; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBA4(CPUState* cpu) { - cpu->pc = 0xBFC3FBA4u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBB8(CPUState* cpu) { - cpu->pc = 0xBFC3FBB8u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBC0(CPUState* cpu) { - cpu->pc = 0xBFC3FBC0u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBC8(CPUState* cpu) { - cpu->pc = 0xBFC3FBC8u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBD0(CPUState* cpu) { - cpu->pc = 0xBFC3FBD0u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBD8(CPUState* cpu) { - cpu->pc = 0xBFC3FBD8u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBE0(CPUState* cpu) { - cpu->pc = 0xBFC3FBE0u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBE8(CPUState* cpu) { - cpu->pc = 0xBFC3FBE8u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBF0(CPUState* cpu) { - cpu->pc = 0xBFC3FBF0u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FBF8(CPUState* cpu) { - cpu->pc = 0xBFC3FBF8u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC00(CPUState* cpu) { - cpu->pc = 0xBFC3FC00u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC04(CPUState* cpu) { - cpu->pc = 0xBFC3FC04u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC08(CPUState* cpu) { - cpu->pc = 0xBFC3FC08u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC0C(CPUState* cpu) { - cpu->pc = 0xBFC3FC0Cu; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC14(CPUState* cpu) { - cpu->pc = 0xBFC3FC14u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FB74_cont_BFC3FC40(CPUState* cpu) { - cpu->pc = 0xBFC3FC40u; - SCPH1001_func_1FC3FB74(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC5C(CPUState* cpu) { - cpu->pc = 0xBFC3FC5Cu; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC70(CPUState* cpu) { - cpu->pc = 0xBFC3FC70u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC78(CPUState* cpu) { - cpu->pc = 0xBFC3FC78u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC80(CPUState* cpu) { - cpu->pc = 0xBFC3FC80u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC94(CPUState* cpu) { - cpu->pc = 0xBFC3FC94u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FC9C(CPUState* cpu) { - cpu->pc = 0xBFC3FC9Cu; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCA4(CPUState* cpu) { - cpu->pc = 0xBFC3FCA4u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCAC(CPUState* cpu) { - cpu->pc = 0xBFC3FCACu; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCB4(CPUState* cpu) { - cpu->pc = 0xBFC3FCB4u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCBC(CPUState* cpu) { - cpu->pc = 0xBFC3FCBCu; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCC0(CPUState* cpu) { - cpu->pc = 0xBFC3FCC0u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCC4(CPUState* cpu) { - cpu->pc = 0xBFC3FCC4u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCC8(CPUState* cpu) { - cpu->pc = 0xBFC3FCC8u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCD0(CPUState* cpu) { - cpu->pc = 0xBFC3FCD0u; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FC50_cont_BFC3FCFC(CPUState* cpu) { - cpu->pc = 0xBFC3FCFCu; - SCPH1001_func_1FC3FC50(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD18(CPUState* cpu) { - cpu->pc = 0xBFC3FD18u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD2C(CPUState* cpu) { - cpu->pc = 0xBFC3FD2Cu; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD34(CPUState* cpu) { - cpu->pc = 0xBFC3FD34u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD3C(CPUState* cpu) { - cpu->pc = 0xBFC3FD3Cu; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD50(CPUState* cpu) { - cpu->pc = 0xBFC3FD50u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD58(CPUState* cpu) { - cpu->pc = 0xBFC3FD58u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD60(CPUState* cpu) { - cpu->pc = 0xBFC3FD60u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD68(CPUState* cpu) { - cpu->pc = 0xBFC3FD68u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD70(CPUState* cpu) { - cpu->pc = 0xBFC3FD70u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD78(CPUState* cpu) { - cpu->pc = 0xBFC3FD78u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD7C(CPUState* cpu) { - cpu->pc = 0xBFC3FD7Cu; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD80(CPUState* cpu) { - cpu->pc = 0xBFC3FD80u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD84(CPUState* cpu) { - cpu->pc = 0xBFC3FD84u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FD8C(CPUState* cpu) { - cpu->pc = 0xBFC3FD8Cu; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FD0C_cont_BFC3FDB8(CPUState* cpu) { - cpu->pc = 0xBFC3FDB8u; - SCPH1001_func_1FC3FD0C(cpu); -} - -void SCPH1001_func_1FC3FDC8_cont_BFC3FDE0(CPUState* cpu) { - cpu->pc = 0xBFC3FDE0u; - SCPH1001_func_1FC3FDC8(cpu); -} - -void SCPH1001_func_1FC3FDC8_cont_BFC3FDE8(CPUState* cpu) { - cpu->pc = 0xBFC3FDE8u; - SCPH1001_func_1FC3FDC8(cpu); -} - -void SCPH1001_func_1FC3FDC8_cont_BFC3FDF0(CPUState* cpu) { - cpu->pc = 0xBFC3FDF0u; - SCPH1001_func_1FC3FDC8(cpu); -} - -void SCPH1001_func_1FC3FDC8_cont_BFC3FE50(CPUState* cpu) { - cpu->pc = 0xBFC3FE50u; - SCPH1001_func_1FC3FDC8(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FE7C(CPUState* cpu) { - cpu->pc = 0xBFC3FE7Cu; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FE84(CPUState* cpu) { - cpu->pc = 0xBFC3FE84u; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FEA4(CPUState* cpu) { - cpu->pc = 0xBFC3FEA4u; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FEAC(CPUState* cpu) { - cpu->pc = 0xBFC3FEACu; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FEC0(CPUState* cpu) { - cpu->pc = 0xBFC3FEC0u; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FEFC(CPUState* cpu) { - cpu->pc = 0xBFC3FEFCu; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FF04(CPUState* cpu) { - cpu->pc = 0xBFC3FF04u; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FE60_cont_BFC3FF30(CPUState* cpu) { - cpu->pc = 0xBFC3FF30u; - SCPH1001_func_1FC3FE60(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FF5C(CPUState* cpu) { - cpu->pc = 0xBFC3FF5Cu; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FF64(CPUState* cpu) { - cpu->pc = 0xBFC3FF64u; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FF84(CPUState* cpu) { - cpu->pc = 0xBFC3FF84u; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FF8C(CPUState* cpu) { - cpu->pc = 0xBFC3FF8Cu; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FFA0(CPUState* cpu) { - cpu->pc = 0xBFC3FFA0u; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FFDC(CPUState* cpu) { - cpu->pc = 0xBFC3FFDCu; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC3FFE4(CPUState* cpu) { - cpu->pc = 0xBFC3FFE4u; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC3FF40_cont_BFC40024(CPUState* cpu) { - cpu->pc = 0xBFC40024u; - SCPH1001_func_1FC3FF40(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40040(CPUState* cpu) { - cpu->pc = 0xBFC40040u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40054(CPUState* cpu) { - cpu->pc = 0xBFC40054u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC4005C(CPUState* cpu) { - cpu->pc = 0xBFC4005Cu; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40064(CPUState* cpu) { - cpu->pc = 0xBFC40064u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40078(CPUState* cpu) { - cpu->pc = 0xBFC40078u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40080(CPUState* cpu) { - cpu->pc = 0xBFC40080u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40088(CPUState* cpu) { - cpu->pc = 0xBFC40088u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40090(CPUState* cpu) { - cpu->pc = 0xBFC40090u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC40098(CPUState* cpu) { - cpu->pc = 0xBFC40098u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC400A0(CPUState* cpu) { - cpu->pc = 0xBFC400A0u; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC40034_cont_BFC400CC(CPUState* cpu) { - cpu->pc = 0xBFC400CCu; - SCPH1001_func_1FC40034(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC400E8(CPUState* cpu) { - cpu->pc = 0xBFC400E8u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC400FC(CPUState* cpu) { - cpu->pc = 0xBFC400FCu; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40104(CPUState* cpu) { - cpu->pc = 0xBFC40104u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC4010C(CPUState* cpu) { - cpu->pc = 0xBFC4010Cu; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40120(CPUState* cpu) { - cpu->pc = 0xBFC40120u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40128(CPUState* cpu) { - cpu->pc = 0xBFC40128u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40130(CPUState* cpu) { - cpu->pc = 0xBFC40130u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40138(CPUState* cpu) { - cpu->pc = 0xBFC40138u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40140(CPUState* cpu) { - cpu->pc = 0xBFC40140u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40148(CPUState* cpu) { - cpu->pc = 0xBFC40148u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC400DC_cont_BFC40174(CPUState* cpu) { - cpu->pc = 0xBFC40174u; - SCPH1001_func_1FC400DC(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC40194(CPUState* cpu) { - cpu->pc = 0xBFC40194u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401A8(CPUState* cpu) { - cpu->pc = 0xBFC401A8u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401B0(CPUState* cpu) { - cpu->pc = 0xBFC401B0u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401B8(CPUState* cpu) { - cpu->pc = 0xBFC401B8u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401CC(CPUState* cpu) { - cpu->pc = 0xBFC401CCu; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401D4(CPUState* cpu) { - cpu->pc = 0xBFC401D4u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401DC(CPUState* cpu) { - cpu->pc = 0xBFC401DCu; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401E4(CPUState* cpu) { - cpu->pc = 0xBFC401E4u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401EC(CPUState* cpu) { - cpu->pc = 0xBFC401ECu; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401F4(CPUState* cpu) { - cpu->pc = 0xBFC401F4u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC401FC(CPUState* cpu) { - cpu->pc = 0xBFC401FCu; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC40210(CPUState* cpu) { - cpu->pc = 0xBFC40210u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC40220(CPUState* cpu) { - cpu->pc = 0xBFC40220u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC40230(CPUState* cpu) { - cpu->pc = 0xBFC40230u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40184_cont_BFC40250(CPUState* cpu) { - cpu->pc = 0xBFC40250u; - SCPH1001_func_1FC40184(cpu); -} - -void SCPH1001_func_1FC40260_cont_BFC40278(CPUState* cpu) { - cpu->pc = 0xBFC40278u; - SCPH1001_func_1FC40260(cpu); -} - -void SCPH1001_func_1FC40260_cont_BFC40284(CPUState* cpu) { - cpu->pc = 0xBFC40284u; - SCPH1001_func_1FC40260(cpu); -} - -void SCPH1001_func_1FC40260_cont_BFC4028C(CPUState* cpu) { - cpu->pc = 0xBFC4028Cu; - SCPH1001_func_1FC40260(cpu); -} - -void SCPH1001_func_1FC40260_cont_BFC402A0(CPUState* cpu) { - cpu->pc = 0xBFC402A0u; - SCPH1001_func_1FC40260(cpu); -} - -void SCPH1001_func_1FC40260_cont_BFC402CC(CPUState* cpu) { - cpu->pc = 0xBFC402CCu; - SCPH1001_func_1FC40260(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC402F8(CPUState* cpu) { - cpu->pc = 0xBFC402F8u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40300(CPUState* cpu) { - cpu->pc = 0xBFC40300u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40320(CPUState* cpu) { - cpu->pc = 0xBFC40320u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40328(CPUState* cpu) { - cpu->pc = 0xBFC40328u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40348(CPUState* cpu) { - cpu->pc = 0xBFC40348u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40370(CPUState* cpu) { - cpu->pc = 0xBFC40370u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40378(CPUState* cpu) { - cpu->pc = 0xBFC40378u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC40394(CPUState* cpu) { - cpu->pc = 0xBFC40394u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC402DC_cont_BFC403B4(CPUState* cpu) { - cpu->pc = 0xBFC403B4u; - SCPH1001_func_1FC402DC(cpu); -} - -void SCPH1001_func_1FC403C4_cont_BFC403D8(CPUState* cpu) { - cpu->pc = 0xBFC403D8u; - SCPH1001_func_1FC403C4(cpu); -} - -void SCPH1001_func_1FC403C4_cont_BFC403E0(CPUState* cpu) { - cpu->pc = 0xBFC403E0u; - SCPH1001_func_1FC403C4(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40418(CPUState* cpu) { - cpu->pc = 0xBFC40418u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40420(CPUState* cpu) { - cpu->pc = 0xBFC40420u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40428(CPUState* cpu) { - cpu->pc = 0xBFC40428u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40430(CPUState* cpu) { - cpu->pc = 0xBFC40430u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40434(CPUState* cpu) { - cpu->pc = 0xBFC40434u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40448(CPUState* cpu) { - cpu->pc = 0xBFC40448u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40404_cont_BFC40478(CPUState* cpu) { - cpu->pc = 0xBFC40478u; - SCPH1001_func_1FC40404(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC404A8(CPUState* cpu) { - cpu->pc = 0xBFC404A8u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC404B0(CPUState* cpu) { - cpu->pc = 0xBFC404B0u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC404C4(CPUState* cpu) { - cpu->pc = 0xBFC404C4u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC404CC(CPUState* cpu) { - cpu->pc = 0xBFC404CCu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40518(CPUState* cpu) { - cpu->pc = 0xBFC40518u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40534(CPUState* cpu) { - cpu->pc = 0xBFC40534u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4053C(CPUState* cpu) { - cpu->pc = 0xBFC4053Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4054C(CPUState* cpu) { - cpu->pc = 0xBFC4054Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40554(CPUState* cpu) { - cpu->pc = 0xBFC40554u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40564(CPUState* cpu) { - cpu->pc = 0xBFC40564u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4056C(CPUState* cpu) { - cpu->pc = 0xBFC4056Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4057C(CPUState* cpu) { - cpu->pc = 0xBFC4057Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40584(CPUState* cpu) { - cpu->pc = 0xBFC40584u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40594(CPUState* cpu) { - cpu->pc = 0xBFC40594u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4059C(CPUState* cpu) { - cpu->pc = 0xBFC4059Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC405AC(CPUState* cpu) { - cpu->pc = 0xBFC405ACu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC405B0(CPUState* cpu) { - cpu->pc = 0xBFC405B0u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC405DC(CPUState* cpu) { - cpu->pc = 0xBFC405DCu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC405E0(CPUState* cpu) { - cpu->pc = 0xBFC405E0u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC4060C(CPUState* cpu) { - cpu->pc = 0xBFC4060Cu; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40610(CPUState* cpu) { - cpu->pc = 0xBFC40610u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40484_cont_BFC40618(CPUState* cpu) { - cpu->pc = 0xBFC40618u; - SCPH1001_func_1FC40484(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC4064C(CPUState* cpu) { - cpu->pc = 0xBFC4064Cu; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC40654(CPUState* cpu) { - cpu->pc = 0xBFC40654u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC40668(CPUState* cpu) { - cpu->pc = 0xBFC40668u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC40670(CPUState* cpu) { - cpu->pc = 0xBFC40670u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC406B4(CPUState* cpu) { - cpu->pc = 0xBFC406B4u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC406C4(CPUState* cpu) { - cpu->pc = 0xBFC406C4u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC40628_cont_BFC406D0(CPUState* cpu) { - cpu->pc = 0xBFC406D0u; - SCPH1001_func_1FC40628(cpu); -} - -void SCPH1001_func_1FC406E0_cont_BFC406F0(CPUState* cpu) { - cpu->pc = 0xBFC406F0u; - SCPH1001_func_1FC406E0(cpu); -} - -void SCPH1001_func_1FC40700_cont_BFC40710(CPUState* cpu) { - cpu->pc = 0xBFC40710u; - SCPH1001_func_1FC40700(cpu); -} - -void SCPH1001_func_1FC40744_cont_BFC40780(CPUState* cpu) { - cpu->pc = 0xBFC40780u; - SCPH1001_func_1FC40744(cpu); -} - -void SCPH1001_func_1FC40744_cont_BFC40784(CPUState* cpu) { - cpu->pc = 0xBFC40784u; - SCPH1001_func_1FC40744(cpu); -} - -void SCPH1001_func_1FC40744_cont_BFC407B0(CPUState* cpu) { - cpu->pc = 0xBFC407B0u; - SCPH1001_func_1FC40744(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407D0(CPUState* cpu) { - cpu->pc = 0xBFC407D0u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407D8(CPUState* cpu) { - cpu->pc = 0xBFC407D8u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407E0(CPUState* cpu) { - cpu->pc = 0xBFC407E0u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407EC(CPUState* cpu) { - cpu->pc = 0xBFC407ECu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407F4(CPUState* cpu) { - cpu->pc = 0xBFC407F4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC407FC(CPUState* cpu) { - cpu->pc = 0xBFC407FCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40814(CPUState* cpu) { - cpu->pc = 0xBFC40814u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4081C(CPUState* cpu) { - cpu->pc = 0xBFC4081Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40824(CPUState* cpu) { - cpu->pc = 0xBFC40824u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4082C(CPUState* cpu) { - cpu->pc = 0xBFC4082Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40834(CPUState* cpu) { - cpu->pc = 0xBFC40834u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40838(CPUState* cpu) { - cpu->pc = 0xBFC40838u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40844(CPUState* cpu) { - cpu->pc = 0xBFC40844u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40848(CPUState* cpu) { - cpu->pc = 0xBFC40848u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40854(CPUState* cpu) { - cpu->pc = 0xBFC40854u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4085C(CPUState* cpu) { - cpu->pc = 0xBFC4085Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40864(CPUState* cpu) { - cpu->pc = 0xBFC40864u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4086C(CPUState* cpu) { - cpu->pc = 0xBFC4086Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40874(CPUState* cpu) { - cpu->pc = 0xBFC40874u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4087C(CPUState* cpu) { - cpu->pc = 0xBFC4087Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40884(CPUState* cpu) { - cpu->pc = 0xBFC40884u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4088C(CPUState* cpu) { - cpu->pc = 0xBFC4088Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40894(CPUState* cpu) { - cpu->pc = 0xBFC40894u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4089C(CPUState* cpu) { - cpu->pc = 0xBFC4089Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408A4(CPUState* cpu) { - cpu->pc = 0xBFC408A4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408AC(CPUState* cpu) { - cpu->pc = 0xBFC408ACu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408B4(CPUState* cpu) { - cpu->pc = 0xBFC408B4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408BC(CPUState* cpu) { - cpu->pc = 0xBFC408BCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408C4(CPUState* cpu) { - cpu->pc = 0xBFC408C4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408CC(CPUState* cpu) { - cpu->pc = 0xBFC408CCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408D4(CPUState* cpu) { - cpu->pc = 0xBFC408D4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408DC(CPUState* cpu) { - cpu->pc = 0xBFC408DCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408E4(CPUState* cpu) { - cpu->pc = 0xBFC408E4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408EC(CPUState* cpu) { - cpu->pc = 0xBFC408ECu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408F4(CPUState* cpu) { - cpu->pc = 0xBFC408F4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC408F8(CPUState* cpu) { - cpu->pc = 0xBFC408F8u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40904(CPUState* cpu) { - cpu->pc = 0xBFC40904u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4090C(CPUState* cpu) { - cpu->pc = 0xBFC4090Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40918(CPUState* cpu) { - cpu->pc = 0xBFC40918u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40920(CPUState* cpu) { - cpu->pc = 0xBFC40920u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40928(CPUState* cpu) { - cpu->pc = 0xBFC40928u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40930(CPUState* cpu) { - cpu->pc = 0xBFC40930u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40938(CPUState* cpu) { - cpu->pc = 0xBFC40938u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40940(CPUState* cpu) { - cpu->pc = 0xBFC40940u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40948(CPUState* cpu) { - cpu->pc = 0xBFC40948u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40950(CPUState* cpu) { - cpu->pc = 0xBFC40950u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40958(CPUState* cpu) { - cpu->pc = 0xBFC40958u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40960(CPUState* cpu) { - cpu->pc = 0xBFC40960u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40968(CPUState* cpu) { - cpu->pc = 0xBFC40968u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40970(CPUState* cpu) { - cpu->pc = 0xBFC40970u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC4097C(CPUState* cpu) { - cpu->pc = 0xBFC4097Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40984(CPUState* cpu) { - cpu->pc = 0xBFC40984u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40990(CPUState* cpu) { - cpu->pc = 0xBFC40990u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40998(CPUState* cpu) { - cpu->pc = 0xBFC40998u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409A4(CPUState* cpu) { - cpu->pc = 0xBFC409A4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409AC(CPUState* cpu) { - cpu->pc = 0xBFC409ACu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409B4(CPUState* cpu) { - cpu->pc = 0xBFC409B4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409BC(CPUState* cpu) { - cpu->pc = 0xBFC409BCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409C8(CPUState* cpu) { - cpu->pc = 0xBFC409C8u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409D0(CPUState* cpu) { - cpu->pc = 0xBFC409D0u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409DC(CPUState* cpu) { - cpu->pc = 0xBFC409DCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409E4(CPUState* cpu) { - cpu->pc = 0xBFC409E4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409EC(CPUState* cpu) { - cpu->pc = 0xBFC409ECu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409F4(CPUState* cpu) { - cpu->pc = 0xBFC409F4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC409FC(CPUState* cpu) { - cpu->pc = 0xBFC409FCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A04(CPUState* cpu) { - cpu->pc = 0xBFC40A04u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A10(CPUState* cpu) { - cpu->pc = 0xBFC40A10u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A18(CPUState* cpu) { - cpu->pc = 0xBFC40A18u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A24(CPUState* cpu) { - cpu->pc = 0xBFC40A24u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A2C(CPUState* cpu) { - cpu->pc = 0xBFC40A2Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A34(CPUState* cpu) { - cpu->pc = 0xBFC40A34u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A3C(CPUState* cpu) { - cpu->pc = 0xBFC40A3Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A48(CPUState* cpu) { - cpu->pc = 0xBFC40A48u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A50(CPUState* cpu) { - cpu->pc = 0xBFC40A50u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A5C(CPUState* cpu) { - cpu->pc = 0xBFC40A5Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A64(CPUState* cpu) { - cpu->pc = 0xBFC40A64u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A6C(CPUState* cpu) { - cpu->pc = 0xBFC40A6Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A74(CPUState* cpu) { - cpu->pc = 0xBFC40A74u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A7C(CPUState* cpu) { - cpu->pc = 0xBFC40A7Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A84(CPUState* cpu) { - cpu->pc = 0xBFC40A84u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A8C(CPUState* cpu) { - cpu->pc = 0xBFC40A8Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40A94(CPUState* cpu) { - cpu->pc = 0xBFC40A94u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AA0(CPUState* cpu) { - cpu->pc = 0xBFC40AA0u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AA8(CPUState* cpu) { - cpu->pc = 0xBFC40AA8u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AB4(CPUState* cpu) { - cpu->pc = 0xBFC40AB4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40ABC(CPUState* cpu) { - cpu->pc = 0xBFC40ABCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AC4(CPUState* cpu) { - cpu->pc = 0xBFC40AC4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40ACC(CPUState* cpu) { - cpu->pc = 0xBFC40ACCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AD8(CPUState* cpu) { - cpu->pc = 0xBFC40AD8u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AE0(CPUState* cpu) { - cpu->pc = 0xBFC40AE0u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AEC(CPUState* cpu) { - cpu->pc = 0xBFC40AECu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AF4(CPUState* cpu) { - cpu->pc = 0xBFC40AF4u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40AFC(CPUState* cpu) { - cpu->pc = 0xBFC40AFCu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B04(CPUState* cpu) { - cpu->pc = 0xBFC40B04u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B0C(CPUState* cpu) { - cpu->pc = 0xBFC40B0Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B14(CPUState* cpu) { - cpu->pc = 0xBFC40B14u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B20(CPUState* cpu) { - cpu->pc = 0xBFC40B20u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B28(CPUState* cpu) { - cpu->pc = 0xBFC40B28u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B34(CPUState* cpu) { - cpu->pc = 0xBFC40B34u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B3C(CPUState* cpu) { - cpu->pc = 0xBFC40B3Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B44(CPUState* cpu) { - cpu->pc = 0xBFC40B44u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B4C(CPUState* cpu) { - cpu->pc = 0xBFC40B4Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B58(CPUState* cpu) { - cpu->pc = 0xBFC40B58u; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC407B8_cont_BFC40B5C(CPUState* cpu) { - cpu->pc = 0xBFC40B5Cu; - SCPH1001_func_1FC407B8(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40B90(CPUState* cpu) { - cpu->pc = 0xBFC40B90u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40B98(CPUState* cpu) { - cpu->pc = 0xBFC40B98u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BA0(CPUState* cpu) { - cpu->pc = 0xBFC40BA0u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BB4(CPUState* cpu) { - cpu->pc = 0xBFC40BB4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BBC(CPUState* cpu) { - cpu->pc = 0xBFC40BBCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BC4(CPUState* cpu) { - cpu->pc = 0xBFC40BC4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BCC(CPUState* cpu) { - cpu->pc = 0xBFC40BCCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BD4(CPUState* cpu) { - cpu->pc = 0xBFC40BD4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BE4(CPUState* cpu) { - cpu->pc = 0xBFC40BE4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40BFC(CPUState* cpu) { - cpu->pc = 0xBFC40BFCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C04(CPUState* cpu) { - cpu->pc = 0xBFC40C04u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C20(CPUState* cpu) { - cpu->pc = 0xBFC40C20u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C28(CPUState* cpu) { - cpu->pc = 0xBFC40C28u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C4C(CPUState* cpu) { - cpu->pc = 0xBFC40C4Cu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C54(CPUState* cpu) { - cpu->pc = 0xBFC40C54u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40C70(CPUState* cpu) { - cpu->pc = 0xBFC40C70u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40CA8(CPUState* cpu) { - cpu->pc = 0xBFC40CA8u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40CD8(CPUState* cpu) { - cpu->pc = 0xBFC40CD8u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40CF4(CPUState* cpu) { - cpu->pc = 0xBFC40CF4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40CFC(CPUState* cpu) { - cpu->pc = 0xBFC40CFCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D00(CPUState* cpu) { - cpu->pc = 0xBFC40D00u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D0C(CPUState* cpu) { - cpu->pc = 0xBFC40D0Cu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D14(CPUState* cpu) { - cpu->pc = 0xBFC40D14u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D18(CPUState* cpu) { - cpu->pc = 0xBFC40D18u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D20(CPUState* cpu) { - cpu->pc = 0xBFC40D20u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D28(CPUState* cpu) { - cpu->pc = 0xBFC40D28u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D30(CPUState* cpu) { - cpu->pc = 0xBFC40D30u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D38(CPUState* cpu) { - cpu->pc = 0xBFC40D38u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D40(CPUState* cpu) { - cpu->pc = 0xBFC40D40u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D48(CPUState* cpu) { - cpu->pc = 0xBFC40D48u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D54(CPUState* cpu) { - cpu->pc = 0xBFC40D54u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D5C(CPUState* cpu) { - cpu->pc = 0xBFC40D5Cu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D60(CPUState* cpu) { - cpu->pc = 0xBFC40D60u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D68(CPUState* cpu) { - cpu->pc = 0xBFC40D68u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D6C(CPUState* cpu) { - cpu->pc = 0xBFC40D6Cu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D84(CPUState* cpu) { - cpu->pc = 0xBFC40D84u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D8C(CPUState* cpu) { - cpu->pc = 0xBFC40D8Cu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40D98(CPUState* cpu) { - cpu->pc = 0xBFC40D98u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DA0(CPUState* cpu) { - cpu->pc = 0xBFC40DA0u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DAC(CPUState* cpu) { - cpu->pc = 0xBFC40DACu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DB4(CPUState* cpu) { - cpu->pc = 0xBFC40DB4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DBC(CPUState* cpu) { - cpu->pc = 0xBFC40DBCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DC4(CPUState* cpu) { - cpu->pc = 0xBFC40DC4u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DD0(CPUState* cpu) { - cpu->pc = 0xBFC40DD0u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DD8(CPUState* cpu) { - cpu->pc = 0xBFC40DD8u; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40B68_cont_BFC40DDC(CPUState* cpu) { - cpu->pc = 0xBFC40DDCu; - SCPH1001_func_1FC40B68(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40E24(CPUState* cpu) { - cpu->pc = 0xBFC40E24u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40E60(CPUState* cpu) { - cpu->pc = 0xBFC40E60u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40E98(CPUState* cpu) { - cpu->pc = 0xBFC40E98u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40E9C(CPUState* cpu) { - cpu->pc = 0xBFC40E9Cu; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40EC0(CPUState* cpu) { - cpu->pc = 0xBFC40EC0u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40EC8(CPUState* cpu) { - cpu->pc = 0xBFC40EC8u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40ECC(CPUState* cpu) { - cpu->pc = 0xBFC40ECCu; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40ED4(CPUState* cpu) { - cpu->pc = 0xBFC40ED4u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40EF0(CPUState* cpu) { - cpu->pc = 0xBFC40EF0u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40F24(CPUState* cpu) { - cpu->pc = 0xBFC40F24u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40DE8_cont_BFC40F28(CPUState* cpu) { - cpu->pc = 0xBFC40F28u; - SCPH1001_func_1FC40DE8(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F60(CPUState* cpu) { - cpu->pc = 0xBFC40F60u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F6C(CPUState* cpu) { - cpu->pc = 0xBFC40F6Cu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F80(CPUState* cpu) { - cpu->pc = 0xBFC40F80u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F88(CPUState* cpu) { - cpu->pc = 0xBFC40F88u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F90(CPUState* cpu) { - cpu->pc = 0xBFC40F90u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40F98(CPUState* cpu) { - cpu->pc = 0xBFC40F98u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FA4(CPUState* cpu) { - cpu->pc = 0xBFC40FA4u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FB0(CPUState* cpu) { - cpu->pc = 0xBFC40FB0u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FB8(CPUState* cpu) { - cpu->pc = 0xBFC40FB8u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FC0(CPUState* cpu) { - cpu->pc = 0xBFC40FC0u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FC8(CPUState* cpu) { - cpu->pc = 0xBFC40FC8u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FD0(CPUState* cpu) { - cpu->pc = 0xBFC40FD0u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FD4(CPUState* cpu) { - cpu->pc = 0xBFC40FD4u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FDC(CPUState* cpu) { - cpu->pc = 0xBFC40FDCu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FE4(CPUState* cpu) { - cpu->pc = 0xBFC40FE4u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FEC(CPUState* cpu) { - cpu->pc = 0xBFC40FECu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FF4(CPUState* cpu) { - cpu->pc = 0xBFC40FF4u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC40FFC(CPUState* cpu) { - cpu->pc = 0xBFC40FFCu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC41004(CPUState* cpu) { - cpu->pc = 0xBFC41004u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC4100C(CPUState* cpu) { - cpu->pc = 0xBFC4100Cu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC41010(CPUState* cpu) { - cpu->pc = 0xBFC41010u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC4101C(CPUState* cpu) { - cpu->pc = 0xBFC4101Cu; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC40F34_cont_BFC41020(CPUState* cpu) { - cpu->pc = 0xBFC41020u; - SCPH1001_func_1FC40F34(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41044(CPUState* cpu) { - cpu->pc = 0xBFC41044u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41050(CPUState* cpu) { - cpu->pc = 0xBFC41050u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41064(CPUState* cpu) { - cpu->pc = 0xBFC41064u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4106C(CPUState* cpu) { - cpu->pc = 0xBFC4106Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41080(CPUState* cpu) { - cpu->pc = 0xBFC41080u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41090(CPUState* cpu) { - cpu->pc = 0xBFC41090u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4109C(CPUState* cpu) { - cpu->pc = 0xBFC4109Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410A4(CPUState* cpu) { - cpu->pc = 0xBFC410A4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410AC(CPUState* cpu) { - cpu->pc = 0xBFC410ACu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410B4(CPUState* cpu) { - cpu->pc = 0xBFC410B4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410B8(CPUState* cpu) { - cpu->pc = 0xBFC410B8u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410C0(CPUState* cpu) { - cpu->pc = 0xBFC410C0u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410CC(CPUState* cpu) { - cpu->pc = 0xBFC410CCu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410D4(CPUState* cpu) { - cpu->pc = 0xBFC410D4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410E0(CPUState* cpu) { - cpu->pc = 0xBFC410E0u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410E8(CPUState* cpu) { - cpu->pc = 0xBFC410E8u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC410FC(CPUState* cpu) { - cpu->pc = 0xBFC410FCu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41104(CPUState* cpu) { - cpu->pc = 0xBFC41104u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41118(CPUState* cpu) { - cpu->pc = 0xBFC41118u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4111C(CPUState* cpu) { - cpu->pc = 0xBFC4111Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4112C(CPUState* cpu) { - cpu->pc = 0xBFC4112Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41140(CPUState* cpu) { - cpu->pc = 0xBFC41140u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41148(CPUState* cpu) { - cpu->pc = 0xBFC41148u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41150(CPUState* cpu) { - cpu->pc = 0xBFC41150u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41154(CPUState* cpu) { - cpu->pc = 0xBFC41154u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4115C(CPUState* cpu) { - cpu->pc = 0xBFC4115Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41168(CPUState* cpu) { - cpu->pc = 0xBFC41168u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41170(CPUState* cpu) { - cpu->pc = 0xBFC41170u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC4117C(CPUState* cpu) { - cpu->pc = 0xBFC4117Cu; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41184(CPUState* cpu) { - cpu->pc = 0xBFC41184u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41190(CPUState* cpu) { - cpu->pc = 0xBFC41190u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC41194(CPUState* cpu) { - cpu->pc = 0xBFC41194u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411A4(CPUState* cpu) { - cpu->pc = 0xBFC411A4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411B4(CPUState* cpu) { - cpu->pc = 0xBFC411B4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411C8(CPUState* cpu) { - cpu->pc = 0xBFC411C8u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411D8(CPUState* cpu) { - cpu->pc = 0xBFC411D8u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411E0(CPUState* cpu) { - cpu->pc = 0xBFC411E0u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411E4(CPUState* cpu) { - cpu->pc = 0xBFC411E4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411F0(CPUState* cpu) { - cpu->pc = 0xBFC411F0u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC4102C_cont_BFC411F4(CPUState* cpu) { - cpu->pc = 0xBFC411F4u; - SCPH1001_func_1FC4102C(cpu); -} - -void SCPH1001_func_1FC41200_cont_BFC4120C(CPUState* cpu) { - cpu->pc = 0xBFC4120Cu; - SCPH1001_func_1FC41200(cpu); -} - -void SCPH1001_func_1FC41200_cont_BFC41214(CPUState* cpu) { - cpu->pc = 0xBFC41214u; - SCPH1001_func_1FC41200(cpu); -} - -void SCPH1001_func_1FC41200_cont_BFC41218(CPUState* cpu) { - cpu->pc = 0xBFC41218u; - SCPH1001_func_1FC41200(cpu); -} - -void SCPH1001_func_1FC41200_cont_BFC41224(CPUState* cpu) { - cpu->pc = 0xBFC41224u; - SCPH1001_func_1FC41200(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC4129C(CPUState* cpu) { - cpu->pc = 0xBFC4129Cu; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC412B8(CPUState* cpu) { - cpu->pc = 0xBFC412B8u; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC412CC(CPUState* cpu) { - cpu->pc = 0xBFC412CCu; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC412E0(CPUState* cpu) { - cpu->pc = 0xBFC412E0u; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC412EC(CPUState* cpu) { - cpu->pc = 0xBFC412ECu; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC41258_cont_BFC412FC(CPUState* cpu) { - cpu->pc = 0xBFC412FCu; - SCPH1001_func_1FC41258(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC4132C(CPUState* cpu) { - cpu->pc = 0xBFC4132Cu; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC4135C(CPUState* cpu) { - cpu->pc = 0xBFC4135Cu; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC41370(CPUState* cpu) { - cpu->pc = 0xBFC41370u; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC41384(CPUState* cpu) { - cpu->pc = 0xBFC41384u; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC41390(CPUState* cpu) { - cpu->pc = 0xBFC41390u; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC4130C_cont_BFC413A0(CPUState* cpu) { - cpu->pc = 0xBFC413A0u; - SCPH1001_func_1FC4130C(cpu); -} - -void SCPH1001_func_1FC413B0_cont_BFC413E4(CPUState* cpu) { - cpu->pc = 0xBFC413E4u; - SCPH1001_func_1FC413B0(cpu); -} - -void SCPH1001_func_1FC413F4_cont_BFC4141C(CPUState* cpu) { - cpu->pc = 0xBFC4141Cu; - SCPH1001_func_1FC413F4(cpu); -} - -void SCPH1001_func_1FC413F4_cont_BFC4142C(CPUState* cpu) { - cpu->pc = 0xBFC4142Cu; - SCPH1001_func_1FC413F4(cpu); -} - -void SCPH1001_func_1FC413F4_cont_BFC41448(CPUState* cpu) { - cpu->pc = 0xBFC41448u; - SCPH1001_func_1FC413F4(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC41468(CPUState* cpu) { - cpu->pc = 0xBFC41468u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC4148C(CPUState* cpu) { - cpu->pc = 0xBFC4148Cu; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414A0(CPUState* cpu) { - cpu->pc = 0xBFC414A0u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414B0(CPUState* cpu) { - cpu->pc = 0xBFC414B0u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414B4(CPUState* cpu) { - cpu->pc = 0xBFC414B4u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414BC(CPUState* cpu) { - cpu->pc = 0xBFC414BCu; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414D0(CPUState* cpu) { - cpu->pc = 0xBFC414D0u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414E4(CPUState* cpu) { - cpu->pc = 0xBFC414E4u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414F4(CPUState* cpu) { - cpu->pc = 0xBFC414F4u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC414F8(CPUState* cpu) { - cpu->pc = 0xBFC414F8u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC41500(CPUState* cpu) { - cpu->pc = 0xBFC41500u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41458_cont_BFC41510(CPUState* cpu) { - cpu->pc = 0xBFC41510u; - SCPH1001_func_1FC41458(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC41534(CPUState* cpu) { - cpu->pc = 0xBFC41534u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC41554(CPUState* cpu) { - cpu->pc = 0xBFC41554u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC415C4(CPUState* cpu) { - cpu->pc = 0xBFC415C4u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC415F0(CPUState* cpu) { - cpu->pc = 0xBFC415F0u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC415F8(CPUState* cpu) { - cpu->pc = 0xBFC415F8u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC41624(CPUState* cpu) { - cpu->pc = 0xBFC41624u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC4162C(CPUState* cpu) { - cpu->pc = 0xBFC4162Cu; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC41638(CPUState* cpu) { - cpu->pc = 0xBFC41638u; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41520_cont_BFC4163C(CPUState* cpu) { - cpu->pc = 0xBFC4163Cu; - SCPH1001_func_1FC41520(cpu); -} - -void SCPH1001_func_1FC41648_cont_BFC41660(CPUState* cpu) { - cpu->pc = 0xBFC41660u; - SCPH1001_func_1FC41648(cpu); -} - -void SCPH1001_func_1FC41670_cont_BFC416B8(CPUState* cpu) { - cpu->pc = 0xBFC416B8u; - SCPH1001_func_1FC41670(cpu); -} - -void SCPH1001_func_1FC41670_cont_BFC416E8(CPUState* cpu) { - cpu->pc = 0xBFC416E8u; - SCPH1001_func_1FC41670(cpu); -} - -void SCPH1001_func_1FC41670_cont_BFC416F8(CPUState* cpu) { - cpu->pc = 0xBFC416F8u; - SCPH1001_func_1FC41670(cpu); -} - -void SCPH1001_func_1FC41708_cont_BFC41738(CPUState* cpu) { - cpu->pc = 0xBFC41738u; - SCPH1001_func_1FC41708(cpu); -} - -void SCPH1001_func_1FC41708_cont_BFC41740(CPUState* cpu) { - cpu->pc = 0xBFC41740u; - SCPH1001_func_1FC41708(cpu); -} - -void SCPH1001_func_1FC41708_cont_BFC4175C(CPUState* cpu) { - cpu->pc = 0xBFC4175Cu; - SCPH1001_func_1FC41708(cpu); -} - -void SCPH1001_func_1FC41708_cont_BFC41760(CPUState* cpu) { - cpu->pc = 0xBFC41760u; - SCPH1001_func_1FC41708(cpu); -} - -void SCPH1001_func_1FC41708_cont_BFC41778(CPUState* cpu) { - cpu->pc = 0xBFC41778u; - SCPH1001_func_1FC41708(cpu); -} - -void SCPH1001_func_1FC41788_cont_BFC417BC(CPUState* cpu) { - cpu->pc = 0xBFC417BCu; - SCPH1001_func_1FC41788(cpu); -} - -void SCPH1001_func_1FC417CC_cont_BFC417F4(CPUState* cpu) { - cpu->pc = 0xBFC417F4u; - SCPH1001_func_1FC417CC(cpu); -} - -void SCPH1001_func_1FC41804_cont_BFC41838(CPUState* cpu) { - cpu->pc = 0xBFC41838u; - SCPH1001_func_1FC41804(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC4186C(CPUState* cpu) { - cpu->pc = 0xBFC4186Cu; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC41874(CPUState* cpu) { - cpu->pc = 0xBFC41874u; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC4187C(CPUState* cpu) { - cpu->pc = 0xBFC4187Cu; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC41880(CPUState* cpu) { - cpu->pc = 0xBFC41880u; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC4188C(CPUState* cpu) { - cpu->pc = 0xBFC4188Cu; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC41848_cont_BFC418B8(CPUState* cpu) { - cpu->pc = 0xBFC418B8u; - SCPH1001_func_1FC41848(cpu); -} - -void SCPH1001_func_1FC418C4_cont_BFC418F4(CPUState* cpu) { - cpu->pc = 0xBFC418F4u; - SCPH1001_func_1FC418C4(cpu); -} - -void SCPH1001_func_1FC4192C_cont_BFC419B8(CPUState* cpu) { - cpu->pc = 0xBFC419B8u; - SCPH1001_func_1FC4192C(cpu); -} - -void SCPH1001_func_1FC4192C_cont_BFC419C0(CPUState* cpu) { - cpu->pc = 0xBFC419C0u; - SCPH1001_func_1FC4192C(cpu); -} - -void SCPH1001_func_1FC4192C_cont_BFC419C8(CPUState* cpu) { - cpu->pc = 0xBFC419C8u; - SCPH1001_func_1FC4192C(cpu); -} - -void SCPH1001_func_1FC4192C_cont_BFC419FC(CPUState* cpu) { - cpu->pc = 0xBFC419FCu; - SCPH1001_func_1FC4192C(cpu); -} - -void SCPH1001_func_1FC4192C_cont_BFC41A38(CPUState* cpu) { - cpu->pc = 0xBFC41A38u; - SCPH1001_func_1FC4192C(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41A64(CPUState* cpu) { - cpu->pc = 0xBFC41A64u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41A8C(CPUState* cpu) { - cpu->pc = 0xBFC41A8Cu; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41ABC(CPUState* cpu) { - cpu->pc = 0xBFC41ABCu; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41ACC(CPUState* cpu) { - cpu->pc = 0xBFC41ACCu; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41AE8(CPUState* cpu) { - cpu->pc = 0xBFC41AE8u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41AF0(CPUState* cpu) { - cpu->pc = 0xBFC41AF0u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B10(CPUState* cpu) { - cpu->pc = 0xBFC41B10u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B18(CPUState* cpu) { - cpu->pc = 0xBFC41B18u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B20(CPUState* cpu) { - cpu->pc = 0xBFC41B20u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B24(CPUState* cpu) { - cpu->pc = 0xBFC41B24u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B44(CPUState* cpu) { - cpu->pc = 0xBFC41B44u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B48(CPUState* cpu) { - cpu->pc = 0xBFC41B48u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B60(CPUState* cpu) { - cpu->pc = 0xBFC41B60u; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41A44_cont_BFC41B9C(CPUState* cpu) { - cpu->pc = 0xBFC41B9Cu; - SCPH1001_func_1FC41A44(cpu); -} - -void SCPH1001_func_1FC41C0C_cont_BFC41C48(CPUState* cpu) { - cpu->pc = 0xBFC41C48u; - SCPH1001_func_1FC41C0C(cpu); -} - -void SCPH1001_func_1FC41C0C_cont_BFC41C4C(CPUState* cpu) { - cpu->pc = 0xBFC41C4Cu; - SCPH1001_func_1FC41C0C(cpu); -} - -void SCPH1001_func_1FC41C0C_cont_BFC41C78(CPUState* cpu) { - cpu->pc = 0xBFC41C78u; - SCPH1001_func_1FC41C0C(cpu); -} - -void SCPH1001_func_1FC41C80_cont_BFC41CB8(CPUState* cpu) { - cpu->pc = 0xBFC41CB8u; - SCPH1001_func_1FC41C80(cpu); -} - -void SCPH1001_func_1FC41C80_cont_BFC41CC8(CPUState* cpu) { - cpu->pc = 0xBFC41CC8u; - SCPH1001_func_1FC41C80(cpu); -} - -void SCPH1001_func_1FC41C80_cont_BFC41CD4(CPUState* cpu) { - cpu->pc = 0xBFC41CD4u; - SCPH1001_func_1FC41C80(cpu); -} - -void SCPH1001_func_1FC41C80_cont_BFC41CDC(CPUState* cpu) { - cpu->pc = 0xBFC41CDCu; - SCPH1001_func_1FC41C80(cpu); -} - -void SCPH1001_func_1FC41C80_cont_BFC41CF4(CPUState* cpu) { - cpu->pc = 0xBFC41CF4u; - SCPH1001_func_1FC41C80(cpu); -} - -void SCPH1001_func_1FC41D18_cont_BFC41D30(CPUState* cpu) { - cpu->pc = 0xBFC41D30u; - SCPH1001_func_1FC41D18(cpu); -} - -void SCPH1001_func_1FC41D18_cont_BFC41D54(CPUState* cpu) { - cpu->pc = 0xBFC41D54u; - SCPH1001_func_1FC41D18(cpu); -} - -void SCPH1001_func_1FC41D18_cont_BFC41D6C(CPUState* cpu) { - cpu->pc = 0xBFC41D6Cu; - SCPH1001_func_1FC41D18(cpu); -} - -void SCPH1001_func_1FC41D18_cont_BFC41D94(CPUState* cpu) { - cpu->pc = 0xBFC41D94u; - SCPH1001_func_1FC41D18(cpu); -} - -void SCPH1001_func_1FC41D18_cont_BFC41D98(CPUState* cpu) { - cpu->pc = 0xBFC41D98u; - SCPH1001_func_1FC41D18(cpu); -} - -void SCPH1001_func_1FC41DC8_cont_BFC41DE0(CPUState* cpu) { - cpu->pc = 0xBFC41DE0u; - SCPH1001_func_1FC41DC8(cpu); -} - -void SCPH1001_func_1FC41DC8_cont_BFC41DF4(CPUState* cpu) { - cpu->pc = 0xBFC41DF4u; - SCPH1001_func_1FC41DC8(cpu); -} - -void SCPH1001_func_1FC41E14_cont_BFC41E18(CPUState* cpu) { - cpu->pc = 0xBFC41E18u; - SCPH1001_func_1FC41E14(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E44(CPUState* cpu) { - cpu->pc = 0xBFC41E44u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E4C(CPUState* cpu) { - cpu->pc = 0xBFC41E4Cu; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E6C(CPUState* cpu) { - cpu->pc = 0xBFC41E6Cu; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E78(CPUState* cpu) { - cpu->pc = 0xBFC41E78u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E84(CPUState* cpu) { - cpu->pc = 0xBFC41E84u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E8C(CPUState* cpu) { - cpu->pc = 0xBFC41E8Cu; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E94(CPUState* cpu) { - cpu->pc = 0xBFC41E94u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41E9C(CPUState* cpu) { - cpu->pc = 0xBFC41E9Cu; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EA0(CPUState* cpu) { - cpu->pc = 0xBFC41EA0u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EA8(CPUState* cpu) { - cpu->pc = 0xBFC41EA8u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EB4(CPUState* cpu) { - cpu->pc = 0xBFC41EB4u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EB8(CPUState* cpu) { - cpu->pc = 0xBFC41EB8u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EBC(CPUState* cpu) { - cpu->pc = 0xBFC41EBCu; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EC4(CPUState* cpu) { - cpu->pc = 0xBFC41EC4u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41E30_cont_BFC41EC8(CPUState* cpu) { - cpu->pc = 0xBFC41EC8u; - SCPH1001_func_1FC41E30(cpu); -} - -void SCPH1001_func_1FC41ED8_cont_BFC41EE8(CPUState* cpu) { - cpu->pc = 0xBFC41EE8u; - SCPH1001_func_1FC41ED8(cpu); -} - -void SCPH1001_func_1FC41ED8_cont_BFC41EF0(CPUState* cpu) { - cpu->pc = 0xBFC41EF0u; - SCPH1001_func_1FC41ED8(cpu); -} - -void SCPH1001_func_1FC41F10_cont_BFC41F40(CPUState* cpu) { - cpu->pc = 0xBFC41F40u; - SCPH1001_func_1FC41F10(cpu); -} - -void SCPH1001_func_1FC41F10_cont_BFC41F48(CPUState* cpu) { - cpu->pc = 0xBFC41F48u; - SCPH1001_func_1FC41F10(cpu); -} - -void SCPH1001_func_1FC41F88_cont_BFC41F98(CPUState* cpu) { - cpu->pc = 0xBFC41F98u; - SCPH1001_func_1FC41F88(cpu); -} - -void SCPH1001_func_1FC41F88_cont_BFC41FA0(CPUState* cpu) { - cpu->pc = 0xBFC41FA0u; - SCPH1001_func_1FC41F88(cpu); -} - -void SCPH1001_func_1FC41FC0_cont_BFC41FE8(CPUState* cpu) { - cpu->pc = 0xBFC41FE8u; - SCPH1001_func_1FC41FC0(cpu); -} - -void SCPH1001_func_1FC41FC0_cont_BFC41FFC(CPUState* cpu) { - cpu->pc = 0xBFC41FFCu; - SCPH1001_func_1FC41FC0(cpu); -} - -void SCPH1001_func_1FC41FC0_cont_BFC42004(CPUState* cpu) { - cpu->pc = 0xBFC42004u; - SCPH1001_func_1FC41FC0(cpu); -} - -void SCPH1001_func_1FC42014_cont_BFC42024(CPUState* cpu) { - cpu->pc = 0xBFC42024u; - SCPH1001_func_1FC42014(cpu); -} - -void SCPH1001_func_1FC4203C_cont_BFC4204C(CPUState* cpu) { - cpu->pc = 0xBFC4204Cu; - SCPH1001_func_1FC4203C(cpu); -} - -void SCPH1001_func_1FC42060_cont_BFC42080(CPUState* cpu) { - cpu->pc = 0xBFC42080u; - SCPH1001_func_1FC42060(cpu); -} - -void SCPH1001_func_1FC42090_cont_BFC420B0(CPUState* cpu) { - cpu->pc = 0xBFC420B0u; - SCPH1001_func_1FC42090(cpu); -} - -void SCPH1001_func_1FC420C0_cont_BFC420E0(CPUState* cpu) { - cpu->pc = 0xBFC420E0u; - SCPH1001_func_1FC420C0(cpu); -} - -void SCPH1001_func_1FC420F0_cont_BFC42110(CPUState* cpu) { - cpu->pc = 0xBFC42110u; - SCPH1001_func_1FC420F0(cpu); -} - -void SCPH1001_func_1FC42120_cont_BFC42140(CPUState* cpu) { - cpu->pc = 0xBFC42140u; - SCPH1001_func_1FC42120(cpu); -} - -void SCPH1001_func_1FC42160_cont_BFC42174(CPUState* cpu) { - cpu->pc = 0xBFC42174u; - SCPH1001_func_1FC42160(cpu); -} - -void SCPH1001_func_1FC42160_cont_BFC4217C(CPUState* cpu) { - cpu->pc = 0xBFC4217Cu; - SCPH1001_func_1FC42160(cpu); -} - -void SCPH1001_func_1FC42160_cont_BFC42184(CPUState* cpu) { - cpu->pc = 0xBFC42184u; - SCPH1001_func_1FC42160(cpu); -} - -void SCPH1001_func_1FC42160_cont_BFC421B4(CPUState* cpu) { - cpu->pc = 0xBFC421B4u; - SCPH1001_func_1FC42160(cpu); -} - -void SCPH1001_func_1FC42160_cont_BFC421CC(CPUState* cpu) { - cpu->pc = 0xBFC421CCu; - SCPH1001_func_1FC42160(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC421E0(CPUState* cpu) { - cpu->pc = 0xBFC421E0u; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC42220(CPUState* cpu) { - cpu->pc = 0xBFC42220u; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC4223C(CPUState* cpu) { - cpu->pc = 0xBFC4223Cu; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC42244(CPUState* cpu) { - cpu->pc = 0xBFC42244u; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC42250(CPUState* cpu) { - cpu->pc = 0xBFC42250u; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC421D8_cont_BFC42264(CPUState* cpu) { - cpu->pc = 0xBFC42264u; - SCPH1001_func_1FC421D8(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC42290(CPUState* cpu) { - cpu->pc = 0xBFC42290u; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC422B0(CPUState* cpu) { - cpu->pc = 0xBFC422B0u; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC422B8(CPUState* cpu) { - cpu->pc = 0xBFC422B8u; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC422CC(CPUState* cpu) { - cpu->pc = 0xBFC422CCu; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC422D8(CPUState* cpu) { - cpu->pc = 0xBFC422D8u; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC4226C_cont_BFC422F8(CPUState* cpu) { - cpu->pc = 0xBFC422F8u; - SCPH1001_func_1FC4226C(cpu); -} - -void SCPH1001_func_1FC42308_cont_BFC42314(CPUState* cpu) { - cpu->pc = 0xBFC42314u; - SCPH1001_func_1FC42308(cpu); -} - -void SCPH1001_func_1FC4231C_cont_BFC42338(CPUState* cpu) { - cpu->pc = 0xBFC42338u; - SCPH1001_func_1FC4231C(cpu); -} - -void SCPH1001_func_1FC4231C_cont_BFC42348(CPUState* cpu) { - cpu->pc = 0xBFC42348u; - SCPH1001_func_1FC4231C(cpu); -} - -void SCPH1001_func_1FC4231C_cont_BFC42358(CPUState* cpu) { - cpu->pc = 0xBFC42358u; - SCPH1001_func_1FC4231C(cpu); -} - -void SCPH1001_func_1FC4231C_cont_BFC42368(CPUState* cpu) { - cpu->pc = 0xBFC42368u; - SCPH1001_func_1FC4231C(cpu); -} - -void SCPH1001_func_1FC42380_cont_BFC423A0(CPUState* cpu) { - cpu->pc = 0xBFC423A0u; - SCPH1001_func_1FC42380(cpu); -} - -void SCPH1001_func_1FC42380_cont_BFC423A8(CPUState* cpu) { - cpu->pc = 0xBFC423A8u; - SCPH1001_func_1FC42380(cpu); -} - -void SCPH1001_func_1FC42380_cont_BFC423E4(CPUState* cpu) { - cpu->pc = 0xBFC423E4u; - SCPH1001_func_1FC42380(cpu); -} - -void SCPH1001_func_1FC42380_cont_BFC4241C(CPUState* cpu) { - cpu->pc = 0xBFC4241Cu; - SCPH1001_func_1FC42380(cpu); -} - -void SCPH1001_func_1FC42424_cont_BFC42434(CPUState* cpu) { - cpu->pc = 0xBFC42434u; - SCPH1001_func_1FC42424(cpu); -} - -void SCPH1001_func_1FC42424_cont_BFC42474(CPUState* cpu) { - cpu->pc = 0xBFC42474u; - SCPH1001_func_1FC42424(cpu); -} - -void SCPH1001_func_1FC42424_cont_BFC4248C(CPUState* cpu) { - cpu->pc = 0xBFC4248Cu; - SCPH1001_func_1FC42424(cpu); -} - -void SCPH1001_func_1FC42424_cont_BFC42498(CPUState* cpu) { - cpu->pc = 0xBFC42498u; - SCPH1001_func_1FC42424(cpu); -} - -void SCPH1001_func_1FC424A8_cont_BFC42514(CPUState* cpu) { - cpu->pc = 0xBFC42514u; - SCPH1001_func_1FC424A8(cpu); -} - -void SCPH1001_func_1FC424A8_cont_BFC42520(CPUState* cpu) { - cpu->pc = 0xBFC42520u; - SCPH1001_func_1FC424A8(cpu); -} - -void SCPH1001_func_1FC424A8_cont_BFC42530(CPUState* cpu) { - cpu->pc = 0xBFC42530u; - SCPH1001_func_1FC424A8(cpu); -} - -void SCPH1001_func_1FC424A8_cont_BFC42534(CPUState* cpu) { - cpu->pc = 0xBFC42534u; - SCPH1001_func_1FC424A8(cpu); -} - -void SCPH1001_func_1FC42540_cont_BFC4255C(CPUState* cpu) { - cpu->pc = 0xBFC4255Cu; - SCPH1001_func_1FC42540(cpu); -} - -void SCPH1001_func_1FC42540_cont_BFC4256C(CPUState* cpu) { - cpu->pc = 0xBFC4256Cu; - SCPH1001_func_1FC42540(cpu); -} - -void SCPH1001_func_1FC42540_cont_BFC42594(CPUState* cpu) { - cpu->pc = 0xBFC42594u; - SCPH1001_func_1FC42540(cpu); -} - -void SCPH1001_func_1FC42540_cont_BFC425A0(CPUState* cpu) { - cpu->pc = 0xBFC425A0u; - SCPH1001_func_1FC42540(cpu); -} - -void SCPH1001_func_1FC42540_cont_BFC425AC(CPUState* cpu) { - cpu->pc = 0xBFC425ACu; - SCPH1001_func_1FC42540(cpu); -} - -void SCPH1001_func_1FC425BC_cont_BFC425E4(CPUState* cpu) { - cpu->pc = 0xBFC425E4u; - SCPH1001_func_1FC425BC(cpu); -} - -void SCPH1001_func_1FC425BC_cont_BFC425EC(CPUState* cpu) { - cpu->pc = 0xBFC425ECu; - SCPH1001_func_1FC425BC(cpu); -} - -void SCPH1001_func_1FC425FC_cont_BFC4260C(CPUState* cpu) { - cpu->pc = 0xBFC4260Cu; - SCPH1001_func_1FC425FC(cpu); -} - -void SCPH1001_func_1FC425FC_cont_BFC42624(CPUState* cpu) { - cpu->pc = 0xBFC42624u; - SCPH1001_func_1FC425FC(cpu); -} - -void SCPH1001_func_1FC425FC_cont_BFC42634(CPUState* cpu) { - cpu->pc = 0xBFC42634u; - SCPH1001_func_1FC425FC(cpu); -} - -void SCPH1001_func_1FC42640_cont_BFC4265C(CPUState* cpu) { - cpu->pc = 0xBFC4265Cu; - SCPH1001_func_1FC42640(cpu); -} - -void SCPH1001_func_1FC42640_cont_BFC4266C(CPUState* cpu) { - cpu->pc = 0xBFC4266Cu; - SCPH1001_func_1FC42640(cpu); -} - -void SCPH1001_func_1FC42640_cont_BFC426A0(CPUState* cpu) { - cpu->pc = 0xBFC426A0u; - SCPH1001_func_1FC42640(cpu); -} - -void SCPH1001_func_1FC42640_cont_BFC426B8(CPUState* cpu) { - cpu->pc = 0xBFC426B8u; - SCPH1001_func_1FC42640(cpu); -} - -void SCPH1001_func_1FC42640_cont_BFC426CC(CPUState* cpu) { - cpu->pc = 0xBFC426CCu; - SCPH1001_func_1FC42640(cpu); -} - -void SCPH1001_func_1FC426DC_cont_BFC426FC(CPUState* cpu) { - cpu->pc = 0xBFC426FCu; - SCPH1001_func_1FC426DC(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42734(CPUState* cpu) { - cpu->pc = 0xBFC42734u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42768(CPUState* cpu) { - cpu->pc = 0xBFC42768u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC4276C(CPUState* cpu) { - cpu->pc = 0xBFC4276Cu; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42780(CPUState* cpu) { - cpu->pc = 0xBFC42780u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427A8(CPUState* cpu) { - cpu->pc = 0xBFC427A8u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427B0(CPUState* cpu) { - cpu->pc = 0xBFC427B0u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427BC(CPUState* cpu) { - cpu->pc = 0xBFC427BCu; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427C8(CPUState* cpu) { - cpu->pc = 0xBFC427C8u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427DC(CPUState* cpu) { - cpu->pc = 0xBFC427DCu; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC427F8(CPUState* cpu) { - cpu->pc = 0xBFC427F8u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42810(CPUState* cpu) { - cpu->pc = 0xBFC42810u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42824(CPUState* cpu) { - cpu->pc = 0xBFC42824u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42834(CPUState* cpu) { - cpu->pc = 0xBFC42834u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC4270C_cont_BFC42838(CPUState* cpu) { - cpu->pc = 0xBFC42838u; - SCPH1001_func_1FC4270C(cpu); -} - -void SCPH1001_func_1FC42844_cont_BFC42864(CPUState* cpu) { - cpu->pc = 0xBFC42864u; - SCPH1001_func_1FC42844(cpu); -} - -void SCPH1001_func_1FC42844_cont_BFC4286C(CPUState* cpu) { - cpu->pc = 0xBFC4286Cu; - SCPH1001_func_1FC42844(cpu); -} - -void SCPH1001_func_1FC42844_cont_BFC42898(CPUState* cpu) { - cpu->pc = 0xBFC42898u; - SCPH1001_func_1FC42844(cpu); -} - -void SCPH1001_func_1FC42844_cont_BFC428BC(CPUState* cpu) { - cpu->pc = 0xBFC428BCu; - SCPH1001_func_1FC42844(cpu); -} -